summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcvs2git <rtems-devel@rtems.org>2000-02-11 15:54:48 +0000
committercvs2git <rtems-devel@rtems.org>2000-02-11 15:54:48 +0000
commitd5e393115929dd892626fb4a3282cddc0d3d4548 (patch)
tree68478b91a8aac9cc5c6022517aed200943c7575c
parentIncreased block size to 128 and added comments based on feedback from (diff)
downloadrtems-d5e393115929dd892626fb4a3282cddc0d3d4548.tar.bz2
This commit was manufactured by cvs2svn to create branch 'rtems-4-5-branch'.
Sprout from master 2000-02-11 15:54:47 UTC Joel Sherrill <joel.sherrill@OARcorp.com> 'Increased block size to 128 and added comments based on feedback from' Delete: c/src/ada-tests/mptests/mp01/config.h c/src/ada-tests/mptests/mp01/mp01.adb c/src/ada-tests/mptests/mp01/mptest.adb c/src/ada-tests/mptests/mp01/mptest.ads c/src/ada-tests/mptests/mp01/node1/mp01.scn c/src/ada-tests/mptests/mp01/node1/mptest-per_node_configuration.adb c/src/ada-tests/mptests/mp01/node2/mp01.scn c/src/ada-tests/mptests/mp01/node2/mptest-per_node_configuration.adb c/src/ada-tests/mptests/mp02/mptest.adb c/src/ada-tests/mptests/mp02/mptest.ads c/src/ada-tests/mptests/mp02/node1/mp02.scn c/src/ada-tests/mptests/mp02/node1/mptest-per_node_configuration.adb c/src/ada-tests/mptests/mp02/node2/mp02.scn c/src/ada-tests/mptests/mp02/node2/mptest-per_node_configuration.adb c/src/ada-tests/mptests/mp03/mptest.adb c/src/ada-tests/mptests/mp03/mptest.ads c/src/ada-tests/mptests/mp03/node1/mp03.scn c/src/ada-tests/mptests/mp03/node1/mptest-per_node_configuration.adb c/src/ada-tests/mptests/mp03/node2/mp03.scn c/src/ada-tests/mptests/mp03/node2/mptest-per_node_configuration.adb c/src/ada-tests/mptests/mp04/mptest.adb c/src/ada-tests/mptests/mp04/mptest.ads c/src/ada-tests/mptests/mp04/node1/mp04.scn c/src/ada-tests/mptests/mp04/node1/mptest-per_node_configuration.adb c/src/ada-tests/mptests/mp04/node2/mp04.scn c/src/ada-tests/mptests/mp04/node2/mptest-per_node_configuration.adb c/src/ada-tests/mptests/mp05/mptest.adb c/src/ada-tests/mptests/mp05/mptest.ads c/src/ada-tests/mptests/mp05/node1/mp05.scn c/src/ada-tests/mptests/mp05/node1/mptest-per_node_configuration.adb c/src/ada-tests/mptests/mp05/node2/mp05.scn c/src/ada-tests/mptests/mp05/node2/mptest-per_node_configuration.adb c/src/ada-tests/mptests/mp06/mptest.adb c/src/ada-tests/mptests/mp06/mptest.ads c/src/ada-tests/mptests/mp06/node1/mp06.scn c/src/ada-tests/mptests/mp06/node1/mptest-per_node_configuration.adb c/src/ada-tests/mptests/mp06/node2/mp06.scn c/src/ada-tests/mptests/mp06/node2/mptest-per_node_configuration.adb c/src/ada-tests/mptests/mp07/mptest.adb c/src/ada-tests/mptests/mp07/mptest.ads c/src/ada-tests/mptests/mp07/node1/mp07.scn c/src/ada-tests/mptests/mp07/node1/mptest-per_node_configuration.adb c/src/ada-tests/mptests/mp07/node2/mp07.scn c/src/ada-tests/mptests/mp07/node2/mptest-per_node_configuration.adb c/src/ada-tests/mptests/mp08/mptest.adb c/src/ada-tests/mptests/mp08/mptest.ads c/src/ada-tests/mptests/mp08/node1/mp08.scn c/src/ada-tests/mptests/mp08/node1/mptest-per_node_configuration.adb c/src/ada-tests/mptests/mp08/node2/mp08.scn c/src/ada-tests/mptests/mp08/node2/mptest-per_node_configuration.adb c/src/ada-tests/mptests/mp09/mptest.adb c/src/ada-tests/mptests/mp09/mptest.ads c/src/ada-tests/mptests/mp09/node1/mp09.scn c/src/ada-tests/mptests/mp09/node1/mptest-per_node_configuration.adb c/src/ada-tests/mptests/mp09/node2/mp09.scn c/src/ada-tests/mptests/mp09/node2/mptest-per_node_configuration.adb c/src/ada-tests/mptests/mp10/mptest.adb c/src/ada-tests/mptests/mp10/mptest.ads c/src/ada-tests/mptests/mp10/node1/mp10.scn c/src/ada-tests/mptests/mp10/node1/mptest-per_node_configuration.adb c/src/ada-tests/mptests/mp10/node2/mp10.scn c/src/ada-tests/mptests/mp10/node2/mptest-per_node_configuration.adb c/src/ada-tests/mptests/mp11/mptest.adb c/src/ada-tests/mptests/mp11/mptest.ads c/src/ada-tests/mptests/mp11/node1/mp11.scn c/src/ada-tests/mptests/mp11/node1/mptest-per_node_configuration.adb c/src/ada-tests/mptests/mp11/node2/mp11.scn c/src/ada-tests/mptests/mp11/node2/mptest-per_node_configuration.adb c/src/ada-tests/mptests/mp12/mptest.adb c/src/ada-tests/mptests/mp12/mptest.ads c/src/ada-tests/mptests/mp12/node1/mp12.scn c/src/ada-tests/mptests/mp12/node1/mptest-per_node_configuration.adb c/src/ada-tests/mptests/mp12/node2/mp12.scn c/src/ada-tests/mptests/mp12/node2/mptest-per_node_configuration.adb c/src/ada-tests/mptests/mp13/mptest.adb c/src/ada-tests/mptests/mp13/mptest.ads c/src/ada-tests/mptests/mp13/node1/mp13.scn c/src/ada-tests/mptests/mp13/node1/mptest-per_node_configuration.adb c/src/ada-tests/mptests/mp13/node2/mp13.scn c/src/ada-tests/mptests/mp13/node2/mptest-per_node_configuration.adb c/src/ada-tests/mptests/mp14/mptest.adb c/src/ada-tests/mptests/mp14/mptest.ads c/src/ada-tests/mptests/mp14/node1/mp14.scn c/src/ada-tests/mptests/mp14/node1/mptest-per_node_configuration.adb c/src/ada-tests/mptests/mp14/node2/mp14.scn c/src/ada-tests/mptests/mp14/node2/mptest-per_node_configuration.adb c/src/ada-tests/samples/base_mp/mptest.adb c/src/ada-tests/samples/base_mp/mptest.ads c/src/ada-tests/samples/base_mp/node1/base_mp.scn c/src/ada-tests/samples/base_mp/node1/mptest-per_node_configuration.adb c/src/ada-tests/samples/base_mp/node2/base_mp.scn c/src/ada-tests/samples/base_mp/node2/mptest-per_node_configuration.adb c/src/ada-tests/samples/base_sp/base_sp.adb c/src/ada-tests/samples/base_sp/base_sp.scn c/src/ada-tests/samples/base_sp/config.h c/src/ada-tests/samples/base_sp/sptest.adb c/src/ada-tests/samples/base_sp/sptest.ads c/src/ada-tests/samples/hello/config.h c/src/ada-tests/samples/hello/hello.adb c/src/ada-tests/samples/hello/hello.scn c/src/ada-tests/samples/hello/sptest.adb c/src/ada-tests/samples/hello/sptest.ads c/src/ada-tests/samples/ticker/config.h c/src/ada-tests/samples/ticker/sptest.adb c/src/ada-tests/samples/ticker/sptest.ads c/src/ada-tests/samples/ticker/ticker.adb c/src/ada-tests/samples/ticker/ticker.scn c/src/ada-tests/sptests/sp01/config.h c/src/ada-tests/sptests/sp01/sp01.adb c/src/ada-tests/sptests/sp01/sp01.scn c/src/ada-tests/sptests/sp01/sptest.adb c/src/ada-tests/sptests/sp01/sptest.ads c/src/ada-tests/sptests/sp02/config.h c/src/ada-tests/sptests/sp02/sp02.adb c/src/ada-tests/sptests/sp02/sp02.scn c/src/ada-tests/sptests/sp02/sptest.adb c/src/ada-tests/sptests/sp02/sptest.ads c/src/ada-tests/sptests/sp03/config.h c/src/ada-tests/sptests/sp03/sp03.adb c/src/ada-tests/sptests/sp03/sp03.scn c/src/ada-tests/sptests/sp03/sptest.adb c/src/ada-tests/sptests/sp03/sptest.ads c/src/ada-tests/sptests/sp04/README c/src/ada-tests/sptests/sp04/config.h c/src/ada-tests/sptests/sp04/sp04.adb c/src/ada-tests/sptests/sp04/sp04.scn c/src/ada-tests/sptests/sp04/sptest.adb c/src/ada-tests/sptests/sp04/sptest.ads c/src/ada-tests/sptests/sp05/config.h c/src/ada-tests/sptests/sp05/sp05.adb c/src/ada-tests/sptests/sp05/sp05.scn c/src/ada-tests/sptests/sp05/sptest.adb c/src/ada-tests/sptests/sp05/sptest.ads c/src/ada-tests/sptests/sp06/config.h c/src/ada-tests/sptests/sp06/sp06.adb c/src/ada-tests/sptests/sp06/sp06.scn c/src/ada-tests/sptests/sp06/sptest.adb c/src/ada-tests/sptests/sp06/sptest.ads c/src/ada-tests/sptests/sp07/config.h c/src/ada-tests/sptests/sp07/sp07.adb c/src/ada-tests/sptests/sp07/sp07.scn c/src/ada-tests/sptests/sp07/sptest.adb c/src/ada-tests/sptests/sp07/sptest.ads c/src/ada-tests/sptests/sp08/config.h c/src/ada-tests/sptests/sp08/sp08.adb c/src/ada-tests/sptests/sp08/sp08.scn c/src/ada-tests/sptests/sp08/sptest.adb c/src/ada-tests/sptests/sp08/sptest.ads c/src/ada-tests/sptests/sp09/config.h c/src/ada-tests/sptests/sp09/sp09.adb c/src/ada-tests/sptests/sp09/sp09.scn c/src/ada-tests/sptests/sp09/sptest.adb c/src/ada-tests/sptests/sp09/sptest.ads c/src/ada-tests/sptests/sp11/config.h c/src/ada-tests/sptests/sp11/sp11.adb c/src/ada-tests/sptests/sp11/sp11.scn c/src/ada-tests/sptests/sp11/sptest.adb c/src/ada-tests/sptests/sp11/sptest.ads c/src/ada-tests/sptests/sp12/config.h c/src/ada-tests/sptests/sp12/sp12.adb c/src/ada-tests/sptests/sp12/sp12.scn c/src/ada-tests/sptests/sp12/sptest.adb c/src/ada-tests/sptests/sp12/sptest.ads c/src/ada-tests/sptests/sp13/config.h c/src/ada-tests/sptests/sp13/sp13.adb c/src/ada-tests/sptests/sp13/sp13.scn c/src/ada-tests/sptests/sp13/sptest.adb c/src/ada-tests/sptests/sp13/sptest.ads c/src/ada-tests/sptests/sp14/config.h c/src/ada-tests/sptests/sp14/sp14.adb c/src/ada-tests/sptests/sp14/sp14.scn c/src/ada-tests/sptests/sp14/sptest.adb c/src/ada-tests/sptests/sp14/sptest.ads c/src/ada-tests/sptests/sp15/config.h c/src/ada-tests/sptests/sp15/sp15.adb c/src/ada-tests/sptests/sp15/sp15.scn c/src/ada-tests/sptests/sp15/sptest.adb c/src/ada-tests/sptests/sp15/sptest.ads c/src/ada-tests/sptests/sp16/config.h c/src/ada-tests/sptests/sp16/sp16.adb c/src/ada-tests/sptests/sp16/sp16.scn c/src/ada-tests/sptests/sp16/sptest.adb c/src/ada-tests/sptests/sp16/sptest.ads c/src/ada-tests/sptests/sp17/config.h c/src/ada-tests/sptests/sp17/sp17.adb c/src/ada-tests/sptests/sp17/sp17.scn c/src/ada-tests/sptests/sp17/sptest.adb c/src/ada-tests/sptests/sp17/sptest.ads c/src/ada-tests/sptests/sp19/README c/src/ada-tests/sptests/sp19/config.h c/src/ada-tests/sptests/sp19/sp19.adb c/src/ada-tests/sptests/sp19/sp19.scn c/src/ada-tests/sptests/sp19/sptest.ads c/src/ada-tests/sptests/sp20/config.h c/src/ada-tests/sptests/sp20/sp20.adb c/src/ada-tests/sptests/sp20/sp20.scn c/src/ada-tests/sptests/sp20/sptest.adb c/src/ada-tests/sptests/sp20/sptest.ads c/src/ada-tests/sptests/sp21/config.h c/src/ada-tests/sptests/sp21/sp21.adb c/src/ada-tests/sptests/sp21/sp21.scn c/src/ada-tests/sptests/sp21/sptest.adb c/src/ada-tests/sptests/sp21/sptest.ads c/src/ada-tests/sptests/sp22/config.h c/src/ada-tests/sptests/sp22/sp22.adb c/src/ada-tests/sptests/sp22/sp22.scn c/src/ada-tests/sptests/sp22/sptest.adb c/src/ada-tests/sptests/sp22/sptest.ads c/src/ada-tests/sptests/sp23/config.h c/src/ada-tests/sptests/sp23/sp23.adb c/src/ada-tests/sptests/sp23/sp23.scn c/src/ada-tests/sptests/sp23/sptest.adb c/src/ada-tests/sptests/sp23/sptest.ads c/src/ada-tests/sptests/sp24/config.h c/src/ada-tests/sptests/sp24/sp24.adb c/src/ada-tests/sptests/sp24/sp24.scn c/src/ada-tests/sptests/sp24/sptest.adb c/src/ada-tests/sptests/sp24/sptest.ads c/src/ada-tests/sptests/sp25/config.h c/src/ada-tests/sptests/sp25/sp25.adb c/src/ada-tests/sptests/sp25/sp25.scn c/src/ada-tests/sptests/sp25/sptest.adb c/src/ada-tests/sptests/sp25/sptest.ads c/src/ada-tests/sptests/spsize/spsize.adb c/src/ada-tests/sptests/spsize/sptest.adb c/src/ada-tests/sptests/spsize/sptest.ads c/src/ada-tests/support/address_io.adb c/src/ada-tests/support/address_io.ads c/src/ada-tests/support/float_io.ads c/src/ada-tests/support/fp.inc c/src/ada-tests/support/init.c c/src/ada-tests/support/integer.inc c/src/ada-tests/support/rtems_calling_overhead.ads c/src/ada-tests/support/status_io.ads c/src/ada-tests/support/test_support.adb c/src/ada-tests/support/test_support.ads c/src/ada-tests/support/time_test_support.adb c/src/ada-tests/support/time_test_support.ads c/src/ada-tests/support/timer_driver.adb c/src/ada-tests/support/timer_driver.ads c/src/ada-tests/support/unsigned32_io.ads c/src/ada-tests/tmtests/tm01/config.h c/src/ada-tests/tmtests/tm01/tm01.adb c/src/ada-tests/tmtests/tm01/tmtest.adb c/src/ada-tests/tmtests/tm01/tmtest.ads c/src/ada-tests/tmtests/tm02/config.h c/src/ada-tests/tmtests/tm02/tm02.adb c/src/ada-tests/tmtests/tm02/tmtest.adb c/src/ada-tests/tmtests/tm02/tmtest.ads c/src/ada-tests/tmtests/tm03/config.h c/src/ada-tests/tmtests/tm03/tm03.adb c/src/ada-tests/tmtests/tm03/tmtest.adb c/src/ada-tests/tmtests/tm03/tmtest.ads c/src/ada-tests/tmtests/tm04/config.h c/src/ada-tests/tmtests/tm04/tm04.adb c/src/ada-tests/tmtests/tm04/tmtest.adb c/src/ada-tests/tmtests/tm04/tmtest.ads c/src/ada-tests/tmtests/tm05/config.h c/src/ada-tests/tmtests/tm05/tm05.adb c/src/ada-tests/tmtests/tm05/tmtest.adb c/src/ada-tests/tmtests/tm05/tmtest.ads c/src/ada-tests/tmtests/tm06/config.h c/src/ada-tests/tmtests/tm06/tm06.adb c/src/ada-tests/tmtests/tm06/tmtest.adb c/src/ada-tests/tmtests/tm06/tmtest.ads c/src/ada-tests/tmtests/tm07/config.h c/src/ada-tests/tmtests/tm07/tm07.adb c/src/ada-tests/tmtests/tm07/tmtest.adb c/src/ada-tests/tmtests/tm07/tmtest.ads c/src/ada-tests/tmtests/tm08/config.h c/src/ada-tests/tmtests/tm08/tm08.adb c/src/ada-tests/tmtests/tm08/tmtest.adb c/src/ada-tests/tmtests/tm08/tmtest.ads c/src/ada-tests/tmtests/tm09/config.h c/src/ada-tests/tmtests/tm09/tm09.adb c/src/ada-tests/tmtests/tm09/tmtest.adb c/src/ada-tests/tmtests/tm09/tmtest.ads c/src/ada-tests/tmtests/tm10/config.h c/src/ada-tests/tmtests/tm10/tm10.adb c/src/ada-tests/tmtests/tm10/tmtest.adb c/src/ada-tests/tmtests/tm10/tmtest.ads c/src/ada-tests/tmtests/tm11/config.h c/src/ada-tests/tmtests/tm11/tm11.adb c/src/ada-tests/tmtests/tm11/tmtest.adb c/src/ada-tests/tmtests/tm11/tmtest.ads c/src/ada-tests/tmtests/tm12/config.h c/src/ada-tests/tmtests/tm12/tm12.adb c/src/ada-tests/tmtests/tm12/tmtest.adb c/src/ada-tests/tmtests/tm12/tmtest.ads c/src/ada-tests/tmtests/tm13/config.h c/src/ada-tests/tmtests/tm13/tm13.adb c/src/ada-tests/tmtests/tm13/tmtest.adb c/src/ada-tests/tmtests/tm13/tmtest.ads c/src/ada-tests/tmtests/tm14/config.h c/src/ada-tests/tmtests/tm14/tm14.adb c/src/ada-tests/tmtests/tm14/tmtest.adb c/src/ada-tests/tmtests/tm14/tmtest.ads c/src/ada-tests/tmtests/tm15/config.h c/src/ada-tests/tmtests/tm15/tm15.adb c/src/ada-tests/tmtests/tm15/tmtest.adb c/src/ada-tests/tmtests/tm15/tmtest.ads c/src/ada-tests/tmtests/tm16/config.h c/src/ada-tests/tmtests/tm16/tm16.adb c/src/ada-tests/tmtests/tm16/tmtest.adb c/src/ada-tests/tmtests/tm16/tmtest.ads c/src/ada-tests/tmtests/tm17/config.h c/src/ada-tests/tmtests/tm17/tm17.adb c/src/ada-tests/tmtests/tm17/tmtest.adb c/src/ada-tests/tmtests/tm17/tmtest.ads c/src/ada-tests/tmtests/tm18/config.h c/src/ada-tests/tmtests/tm18/tm18.adb c/src/ada-tests/tmtests/tm18/tmtest.adb c/src/ada-tests/tmtests/tm18/tmtest.ads c/src/ada-tests/tmtests/tm19/config.h c/src/ada-tests/tmtests/tm19/tm19.adb c/src/ada-tests/tmtests/tm19/tmtest.adb c/src/ada-tests/tmtests/tm19/tmtest.ads c/src/ada-tests/tmtests/tm20/config.h c/src/ada-tests/tmtests/tm20/tm20.adb c/src/ada-tests/tmtests/tm20/tmtest.adb c/src/ada-tests/tmtests/tm20/tmtest.ads c/src/ada-tests/tmtests/tm21/config.h c/src/ada-tests/tmtests/tm21/tm21.adb c/src/ada-tests/tmtests/tm21/tmtest.adb c/src/ada-tests/tmtests/tm21/tmtest.ads c/src/ada-tests/tmtests/tm22/config.h c/src/ada-tests/tmtests/tm22/tm22.adb c/src/ada-tests/tmtests/tm22/tmtest.adb c/src/ada-tests/tmtests/tm22/tmtest.ads c/src/ada-tests/tmtests/tm23/config.h c/src/ada-tests/tmtests/tm23/tm23.adb c/src/ada-tests/tmtests/tm23/tmtest.adb c/src/ada-tests/tmtests/tm23/tmtest.ads c/src/ada-tests/tmtests/tm24/config.h c/src/ada-tests/tmtests/tm24/tm24.adb c/src/ada-tests/tmtests/tm24/tmtest.adb c/src/ada-tests/tmtests/tm24/tmtest.ads c/src/ada-tests/tmtests/tm25/config.h c/src/ada-tests/tmtests/tm25/tm25.adb c/src/ada-tests/tmtests/tm25/tmtest.adb c/src/ada-tests/tmtests/tm25/tmtest.ads c/src/ada-tests/tmtests/tm26/README c/src/ada-tests/tmtests/tm26/config.h c/src/ada-tests/tmtests/tm26/tm26.adb c/src/ada-tests/tmtests/tm26/tmtest.adp c/src/ada-tests/tmtests/tm26/tmtest.ads c/src/ada-tests/tmtests/tm27/README c/src/ada-tests/tmtests/tm27/config.h c/src/ada-tests/tmtests/tm27/tm27.adb c/src/ada-tests/tmtests/tm27/tmtest.adb c/src/ada-tests/tmtests/tm27/tmtest.ads c/src/ada-tests/tmtests/tm28/config.h c/src/ada-tests/tmtests/tm28/tm28.adb c/src/ada-tests/tmtests/tm28/tmtest.adb c/src/ada-tests/tmtests/tm28/tmtest.ads c/src/ada-tests/tmtests/tm29/config.h c/src/ada-tests/tmtests/tm29/tm29.adb c/src/ada-tests/tmtests/tm29/tmtest.adb c/src/ada-tests/tmtests/tm29/tmtest.ads c/src/ada-tests/tmtests/tmck/config.h c/src/ada-tests/tmtests/tmck/tmck.adb c/src/ada-tests/tmtests/tmck/tmtest.adb c/src/ada-tests/tmtests/tmck/tmtest.ads c/src/ada-tests/tmtests/tmoverhd/README c/src/ada-tests/tmtests/tmoverhd/config.h c/src/ada-tests/tmtests/tmoverhd/dummy_rtems.adb c/src/ada-tests/tmtests/tmoverhd/dummy_rtems.ads c/src/ada-tests/tmtests/tmoverhd/tmoverhd.adb c/src/ada-tests/tmtests/tmoverhd/tmtest.adb c/src/ada-tests/tmtests/tmoverhd/tmtest.ads c/src/ada/rtems.adb c/src/ada/rtems.ads c/src/exec/include/rtems/libio_.h c/src/exec/libcsupport/Makefile.am c/src/exec/libcsupport/include/chain.h c/src/exec/libcsupport/include/clockdrv.h c/src/exec/libcsupport/include/console.h c/src/exec/libcsupport/include/iosupp.h c/src/exec/libcsupport/include/motorola/mc68230.h c/src/exec/libcsupport/include/motorola/mc68681.h c/src/exec/libcsupport/include/ringbuf.h c/src/exec/libcsupport/include/rtems/assoc.h c/src/exec/libcsupport/include/rtems/error.h c/src/exec/libcsupport/include/rtems/libcsupport.h c/src/exec/libcsupport/include/rtems/libio.h c/src/exec/libcsupport/include/rtems/libio_.h c/src/exec/libcsupport/include/spurious.h c/src/exec/libcsupport/include/sys/filio.h c/src/exec/libcsupport/include/sys/ioctl.h c/src/exec/libcsupport/include/sys/sockio.h c/src/exec/libcsupport/include/sys/termios.h c/src/exec/libcsupport/include/sys/utime.h c/src/exec/libcsupport/include/sys/utsname.h c/src/exec/libcsupport/include/timerdrv.h c/src/exec/libcsupport/include/vmeintr.h c/src/exec/libcsupport/include/zilog/z8036.h c/src/exec/libcsupport/include/zilog/z8530.h c/src/exec/libcsupport/include/zilog/z8536.h c/src/exec/libcsupport/src/CASES c/src/exec/libcsupport/src/Makefile.am c/src/exec/libcsupport/src/README c/src/exec/libcsupport/src/TODO c/src/exec/libcsupport/src/__brk.c c/src/exec/libcsupport/src/__getpid.c c/src/exec/libcsupport/src/__gettod.c c/src/exec/libcsupport/src/__sbrk.c c/src/exec/libcsupport/src/__times.c c/src/exec/libcsupport/src/access.c c/src/exec/libcsupport/src/assoc.c c/src/exec/libcsupport/src/assocnamebad.c c/src/exec/libcsupport/src/base_fs.c c/src/exec/libcsupport/src/cfgetispeed.c c/src/exec/libcsupport/src/cfgetospeed.c c/src/exec/libcsupport/src/cfsetispeed.c c/src/exec/libcsupport/src/cfsetospeed.c c/src/exec/libcsupport/src/chdir.c c/src/exec/libcsupport/src/chmod.c c/src/exec/libcsupport/src/chown.c c/src/exec/libcsupport/src/close.c c/src/exec/libcsupport/src/closedir.c c/src/exec/libcsupport/src/creat.c c/src/exec/libcsupport/src/ctermid.c c/src/exec/libcsupport/src/dup.c c/src/exec/libcsupport/src/dup2.c c/src/exec/libcsupport/src/error.c c/src/exec/libcsupport/src/eval.c c/src/exec/libcsupport/src/fchmod.c c/src/exec/libcsupport/src/fcntl.c c/src/exec/libcsupport/src/fdatasync.c c/src/exec/libcsupport/src/fpathconf.c c/src/exec/libcsupport/src/fs_null_handlers.c c/src/exec/libcsupport/src/fstat.c c/src/exec/libcsupport/src/fsync.c c/src/exec/libcsupport/src/ftruncate.c c/src/exec/libcsupport/src/getcwd.c c/src/exec/libcsupport/src/getdents.c c/src/exec/libcsupport/src/getgrent.c c/src/exec/libcsupport/src/getpwent.c c/src/exec/libcsupport/src/hosterr.c c/src/exec/libcsupport/src/ioctl.c c/src/exec/libcsupport/src/isatty.c c/src/exec/libcsupport/src/libio.c c/src/exec/libcsupport/src/libio_sockets.c c/src/exec/libcsupport/src/link.c c/src/exec/libcsupport/src/lseek.c c/src/exec/libcsupport/src/lstat.c c/src/exec/libcsupport/src/malloc.c c/src/exec/libcsupport/src/mkdir.c c/src/exec/libcsupport/src/mkfifo.c c/src/exec/libcsupport/src/mknod.c c/src/exec/libcsupport/src/mount.c c/src/exec/libcsupport/src/newlibc.c c/src/exec/libcsupport/src/no_libc.c c/src/exec/libcsupport/src/no_posix.c c/src/exec/libcsupport/src/open.c c/src/exec/libcsupport/src/opendir.c c/src/exec/libcsupport/src/pathconf.c c/src/exec/libcsupport/src/pipe.c c/src/exec/libcsupport/src/read.c c/src/exec/libcsupport/src/readdir.c c/src/exec/libcsupport/src/readlink.c c/src/exec/libcsupport/src/rewinddir.c c/src/exec/libcsupport/src/rmdir.c c/src/exec/libcsupport/src/scandir.c c/src/exec/libcsupport/src/seekdir.c c/src/exec/libcsupport/src/stat.c c/src/exec/libcsupport/src/symlink.c c/src/exec/libcsupport/src/tcdrain.c c/src/exec/libcsupport/src/tcflow.c c/src/exec/libcsupport/src/tcflush.c c/src/exec/libcsupport/src/tcgetattr.c c/src/exec/libcsupport/src/tcgetprgrp.c c/src/exec/libcsupport/src/tcsendbreak.c c/src/exec/libcsupport/src/tcsetattr.c c/src/exec/libcsupport/src/tcsetpgrp.c c/src/exec/libcsupport/src/telldir.c c/src/exec/libcsupport/src/termios.c c/src/exec/libcsupport/src/termiosinitialize.c c/src/exec/libcsupport/src/termiosreserveresources.c c/src/exec/libcsupport/src/truncate.c c/src/exec/libcsupport/src/ttyname.c c/src/exec/libcsupport/src/ttyname_r.c c/src/exec/libcsupport/src/umask.c c/src/exec/libcsupport/src/unixlibc.c c/src/exec/libcsupport/src/unlink.c c/src/exec/libcsupport/src/unmount.c c/src/exec/libcsupport/src/utime.c c/src/exec/libcsupport/src/utsname.c c/src/exec/libcsupport/src/write.c c/src/exec/libfs/src/imfs/deviceio.c c/src/exec/libfs/src/imfs/imfs.h c/src/exec/libfs/src/imfs/imfs_chown.c c/src/exec/libfs/src/imfs/imfs_creat.c c/src/exec/libfs/src/imfs/imfs_debug.c c/src/exec/libfs/src/imfs/imfs_directory.c c/src/exec/libfs/src/imfs/imfs_eval.c c/src/exec/libfs/src/imfs/imfs_fchmod.c c/src/exec/libfs/src/imfs/imfs_fcntl.c c/src/exec/libfs/src/imfs/imfs_fdatasync.c c/src/exec/libfs/src/imfs/imfs_free.c c/src/exec/libfs/src/imfs/imfs_fsunmount.c c/src/exec/libfs/src/imfs/imfs_getchild.c c/src/exec/libfs/src/imfs/imfs_gtkn.c c/src/exec/libfs/src/imfs/imfs_handlers_device.c c/src/exec/libfs/src/imfs/imfs_handlers_directory.c c/src/exec/libfs/src/imfs/imfs_handlers_link.c c/src/exec/libfs/src/imfs/imfs_handlers_memfile.c c/src/exec/libfs/src/imfs/imfs_init.c c/src/exec/libfs/src/imfs/imfs_initsupp.c c/src/exec/libfs/src/imfs/imfs_link.c c/src/exec/libfs/src/imfs/imfs_mknod.c c/src/exec/libfs/src/imfs/imfs_mount.c c/src/exec/libfs/src/imfs/imfs_ntype.c c/src/exec/libfs/src/imfs/imfs_readlink.c c/src/exec/libfs/src/imfs/imfs_rmnod.c c/src/exec/libfs/src/imfs/imfs_stat.c c/src/exec/libfs/src/imfs/imfs_symlink.c c/src/exec/libfs/src/imfs/imfs_unixstub.c c/src/exec/libfs/src/imfs/imfs_unlink.c c/src/exec/libfs/src/imfs/imfs_unmount.c c/src/exec/libfs/src/imfs/imfs_utime.c c/src/exec/libfs/src/imfs/ioman.c c/src/exec/libfs/src/imfs/memfile.c c/src/exec/libfs/src/imfs/miniimfs_init.c c/src/exec/libnetworking/Makefile.am c/src/exec/libnetworking/README c/src/exec/libnetworking/arpa/Makefile.am c/src/exec/libnetworking/arpa/ftp.h c/src/exec/libnetworking/arpa/inet.h c/src/exec/libnetworking/arpa/nameser.h c/src/exec/libnetworking/arpa/nameser_compat.h c/src/exec/libnetworking/arpa/telnet.h c/src/exec/libnetworking/bpfilter.h c/src/exec/libnetworking/kern/Makefile.am c/src/exec/libnetworking/kern/kern_subr.c c/src/exec/libnetworking/kern/uipc_domain.c c/src/exec/libnetworking/kern/uipc_mbuf.c c/src/exec/libnetworking/kern/uipc_socket.c c/src/exec/libnetworking/kern/uipc_socket2.c c/src/exec/libnetworking/lib/Makefile.am c/src/exec/libnetworking/lib/README c/src/exec/libnetworking/lib/getprotoby.c c/src/exec/libnetworking/lib/rtems_bsdnet_ntp.c c/src/exec/libnetworking/lib/syslog.c c/src/exec/libnetworking/lib/tftpDriver.c c/src/exec/libnetworking/libc/Makefile.am c/src/exec/libnetworking/libc/addr2ascii.3 c/src/exec/libnetworking/libc/addr2ascii.c c/src/exec/libnetworking/libc/ascii2addr.c c/src/exec/libnetworking/libc/base64.c c/src/exec/libnetworking/libc/byteorder.3 c/src/exec/libnetworking/libc/ether_addr.c c/src/exec/libnetworking/libc/ethers.3 c/src/exec/libnetworking/libc/gethostbydns.c c/src/exec/libnetworking/libc/gethostbyht.c c/src/exec/libnetworking/libc/gethostbyname.3 c/src/exec/libnetworking/libc/gethostbynis.c c/src/exec/libnetworking/libc/gethostnamadr.c c/src/exec/libnetworking/libc/gethostname.c c/src/exec/libnetworking/libc/getnetbydns.c c/src/exec/libnetworking/libc/getnetbyht.c c/src/exec/libnetworking/libc/getnetbynis.c c/src/exec/libnetworking/libc/getnetent.3 c/src/exec/libnetworking/libc/getnetnamadr.c c/src/exec/libnetworking/libc/getproto.c c/src/exec/libnetworking/libc/getprotoent.3 c/src/exec/libnetworking/libc/getprotoent.c c/src/exec/libnetworking/libc/getprotoname.c c/src/exec/libnetworking/libc/getservbyname.c c/src/exec/libnetworking/libc/getservbyport.c c/src/exec/libnetworking/libc/getservent.3 c/src/exec/libnetworking/libc/getservent.c c/src/exec/libnetworking/libc/herror.c c/src/exec/libnetworking/libc/inet.3 c/src/exec/libnetworking/libc/inet_addr.c c/src/exec/libnetworking/libc/inet_lnaof.c c/src/exec/libnetworking/libc/inet_makeaddr.c c/src/exec/libnetworking/libc/inet_net_ntop.c c/src/exec/libnetworking/libc/inet_net_pton.c c/src/exec/libnetworking/libc/inet_neta.c c/src/exec/libnetworking/libc/inet_netof.c c/src/exec/libnetworking/libc/inet_network.c c/src/exec/libnetworking/libc/inet_ntoa.c c/src/exec/libnetworking/libc/inet_ntop.c c/src/exec/libnetworking/libc/inet_pton.c c/src/exec/libnetworking/libc/iso_addr.3 c/src/exec/libnetworking/libc/iso_addr.c c/src/exec/libnetworking/libc/linkaddr.3 c/src/exec/libnetworking/libc/linkaddr.c c/src/exec/libnetworking/libc/map_v4v6.c c/src/exec/libnetworking/libc/ns.3 c/src/exec/libnetworking/libc/ns_addr.c c/src/exec/libnetworking/libc/ns_name.c c/src/exec/libnetworking/libc/ns_netint.c c/src/exec/libnetworking/libc/ns_ntoa.c c/src/exec/libnetworking/libc/ns_parse.c c/src/exec/libnetworking/libc/ns_print.c c/src/exec/libnetworking/libc/ns_ttl.c c/src/exec/libnetworking/libc/nsap_addr.c c/src/exec/libnetworking/libc/rcmd.3 c/src/exec/libnetworking/libc/rcmd.c c/src/exec/libnetworking/libc/recv.c c/src/exec/libnetworking/libc/res_comp.c c/src/exec/libnetworking/libc/res_config.h c/src/exec/libnetworking/libc/res_data.c c/src/exec/libnetworking/libc/res_debug.c c/src/exec/libnetworking/libc/res_init.c c/src/exec/libnetworking/libc/res_mkquery.c c/src/exec/libnetworking/libc/res_mkupdate.c c/src/exec/libnetworking/libc/res_query.c c/src/exec/libnetworking/libc/res_send.c c/src/exec/libnetworking/libc/res_stubs.c c/src/exec/libnetworking/libc/res_update.c c/src/exec/libnetworking/libc/resolver.3 c/src/exec/libnetworking/libc/send.c c/src/exec/libnetworking/libc/strsep.c c/src/exec/libnetworking/loop.h c/src/exec/libnetworking/machine/Makefile.am c/src/exec/libnetworking/machine/conf.h c/src/exec/libnetworking/machine/cpu.h c/src/exec/libnetworking/machine/cpufunc.h c/src/exec/libnetworking/machine/endian.h c/src/exec/libnetworking/machine/in_cksum.h c/src/exec/libnetworking/machine/limits.h c/src/exec/libnetworking/machine/param.h c/src/exec/libnetworking/machine/types.h c/src/exec/libnetworking/machine/vmparam.h c/src/exec/libnetworking/net/Makefile.am c/src/exec/libnetworking/net/bpf.h c/src/exec/libnetworking/net/ethernet.h c/src/exec/libnetworking/net/if.c c/src/exec/libnetworking/net/if.h c/src/exec/libnetworking/net/if_arp.h c/src/exec/libnetworking/net/if_dl.h c/src/exec/libnetworking/net/if_ethersubr.c c/src/exec/libnetworking/net/if_llc.h c/src/exec/libnetworking/net/if_loop.c c/src/exec/libnetworking/net/if_ppp.h c/src/exec/libnetworking/net/if_types.h c/src/exec/libnetworking/net/netisr.h c/src/exec/libnetworking/net/ppp-comp.h c/src/exec/libnetworking/net/ppp_defs.h c/src/exec/libnetworking/net/radix.c c/src/exec/libnetworking/net/radix.h c/src/exec/libnetworking/net/raw_cb.c c/src/exec/libnetworking/net/raw_cb.h c/src/exec/libnetworking/net/raw_usrreq.c c/src/exec/libnetworking/net/route.c c/src/exec/libnetworking/net/route.h c/src/exec/libnetworking/net/rtsock.c c/src/exec/libnetworking/netdb.h c/src/exec/libnetworking/netinet/Makefile.am c/src/exec/libnetworking/netinet/icmp_var.h c/src/exec/libnetworking/netinet/if_ether.c c/src/exec/libnetworking/netinet/if_ether.h c/src/exec/libnetworking/netinet/igmp.c c/src/exec/libnetworking/netinet/igmp.h c/src/exec/libnetworking/netinet/igmp_var.h c/src/exec/libnetworking/netinet/in.c c/src/exec/libnetworking/netinet/in.h c/src/exec/libnetworking/netinet/in_cksum.c c/src/exec/libnetworking/netinet/in_cksum_i386.c c/src/exec/libnetworking/netinet/in_cksum_m68k.c c/src/exec/libnetworking/netinet/in_cksum_powerpc.c c/src/exec/libnetworking/netinet/in_pcb.c c/src/exec/libnetworking/netinet/in_pcb.h c/src/exec/libnetworking/netinet/in_proto.c c/src/exec/libnetworking/netinet/in_rmx.c c/src/exec/libnetworking/netinet/in_systm.h c/src/exec/libnetworking/netinet/in_var.h c/src/exec/libnetworking/netinet/ip.h c/src/exec/libnetworking/netinet/ip_divert.c c/src/exec/libnetworking/netinet/ip_fw.c c/src/exec/libnetworking/netinet/ip_fw.h c/src/exec/libnetworking/netinet/ip_icmp.c c/src/exec/libnetworking/netinet/ip_icmp.h c/src/exec/libnetworking/netinet/ip_input.c c/src/exec/libnetworking/netinet/ip_mroute.c c/src/exec/libnetworking/netinet/ip_mroute.h c/src/exec/libnetworking/netinet/ip_output.c c/src/exec/libnetworking/netinet/ip_var.h c/src/exec/libnetworking/netinet/raw_ip.c c/src/exec/libnetworking/netinet/tcp.h c/src/exec/libnetworking/netinet/tcp_debug.c c/src/exec/libnetworking/netinet/tcp_debug.h c/src/exec/libnetworking/netinet/tcp_fsm.h c/src/exec/libnetworking/netinet/tcp_input.c c/src/exec/libnetworking/netinet/tcp_output.c c/src/exec/libnetworking/netinet/tcp_seq.h c/src/exec/libnetworking/netinet/tcp_subr.c c/src/exec/libnetworking/netinet/tcp_timer.c c/src/exec/libnetworking/netinet/tcp_timer.h c/src/exec/libnetworking/netinet/tcp_usrreq.c c/src/exec/libnetworking/netinet/tcp_var.h c/src/exec/libnetworking/netinet/tcpip.h c/src/exec/libnetworking/netinet/udp.h c/src/exec/libnetworking/netinet/udp_usrreq.c c/src/exec/libnetworking/netinet/udp_var.h c/src/exec/libnetworking/nfs/Makefile.am c/src/exec/libnetworking/nfs/bootp_subr.c c/src/exec/libnetworking/nfs/krpc.h c/src/exec/libnetworking/nfs/nfs.h c/src/exec/libnetworking/nfs/nfsdiskless.h c/src/exec/libnetworking/nfs/nfsproto.h c/src/exec/libnetworking/nfs/rpcv2.h c/src/exec/libnetworking/nfs/xdr_subs.h c/src/exec/libnetworking/opt_ipfw.h c/src/exec/libnetworking/opt_mrouting.h c/src/exec/libnetworking/opt_tcpdebug.h c/src/exec/libnetworking/poll.h c/src/exec/libnetworking/resolv.h c/src/exec/libnetworking/rtems/Makefile.am c/src/exec/libnetworking/rtems/issetugid.c c/src/exec/libnetworking/rtems/rtems_bootp.c c/src/exec/libnetworking/rtems/rtems_bsdnet.h c/src/exec/libnetworking/rtems/rtems_bsdnet_internal.h c/src/exec/libnetworking/rtems/rtems_glue.c c/src/exec/libnetworking/rtems/rtems_select.c c/src/exec/libnetworking/rtems/rtems_showicmpstat.c c/src/exec/libnetworking/rtems/rtems_showifstat.c c/src/exec/libnetworking/rtems/rtems_showipstat.c c/src/exec/libnetworking/rtems/rtems_showmbuf.c c/src/exec/libnetworking/rtems/rtems_showroute.c c/src/exec/libnetworking/rtems/rtems_showtcpstat.c c/src/exec/libnetworking/rtems/rtems_showudpstat.c c/src/exec/libnetworking/rtems/rtems_syscall.c c/src/exec/libnetworking/rtems/sghostname.c c/src/exec/libnetworking/rtems/tftp.h c/src/exec/libnetworking/sys/Makefile.am c/src/exec/libnetworking/sys/buf.h c/src/exec/libnetworking/sys/callout.h c/src/exec/libnetworking/sys/conf.h c/src/exec/libnetworking/sys/domain.h c/src/exec/libnetworking/sys/kernel.h c/src/exec/libnetworking/sys/libkern.h c/src/exec/libnetworking/sys/malloc.h c/src/exec/libnetworking/sys/mbuf.h c/src/exec/libnetworking/sys/mount.h c/src/exec/libnetworking/sys/param.h c/src/exec/libnetworking/sys/proc.h c/src/exec/libnetworking/sys/protosw.h c/src/exec/libnetworking/sys/queue.h c/src/exec/libnetworking/sys/reboot.h c/src/exec/libnetworking/sys/resourcevar.h c/src/exec/libnetworking/sys/rtprio.h c/src/exec/libnetworking/sys/select.h c/src/exec/libnetworking/sys/signalvar.h c/src/exec/libnetworking/sys/socket.h c/src/exec/libnetworking/sys/socketvar.h c/src/exec/libnetworking/sys/sysctl.h c/src/exec/libnetworking/sys/syslimits.h c/src/exec/libnetworking/sys/syslog.h c/src/exec/libnetworking/sys/systm.h c/src/exec/libnetworking/sys/ttydefaults.h c/src/exec/libnetworking/sys/ucred.h c/src/exec/libnetworking/sys/uio.h c/src/exec/libnetworking/syslog.h c/src/exec/libnetworking/vm/Makefile.am c/src/exec/libnetworking/vm/vm.h c/src/exec/libnetworking/vm/vm_extern.h c/src/exec/libnetworking/vm/vm_kern.h c/src/exec/libnetworking/vm/vm_param.h c/src/exec/libnetworking/wrapup/Makefile.am c/src/exec/librpc/Makefile.am c/src/exec/librpc/include/Makefile.am c/src/exec/librpc/include/rpc/Makefile.am c/src/exec/librpc/include/rpc/auth.h c/src/exec/librpc/include/rpc/clnt.h c/src/exec/librpc/include/rpc/rpc.h c/src/exec/librpc/include/rpc/rpc_msg.h c/src/exec/librpc/include/rpc/svc.h c/src/exec/librpc/include/rpc/svc_auth.h c/src/exec/librpc/include/rpc/types.h c/src/exec/librpc/include/rpc/xdr.h c/src/exec/librpc/src/Makefile.am c/src/exec/score/cpu/a29k/rtems/score/types.h c/src/exec/score/cpu/hppa1.1/rtems/score/types.h c/src/exec/score/cpu/i386/rtems/score/types.h c/src/exec/score/cpu/i960/rtems/score/types.h c/src/exec/score/cpu/m68k/rtems/score/types.h c/src/exec/score/cpu/mips/Makefile.am c/src/exec/score/cpu/mips/asm.h c/src/exec/score/cpu/mips/configure.in c/src/exec/score/cpu/mips/cpu.c c/src/exec/score/cpu/mips/cpu_asm.S c/src/exec/score/cpu/mips/cpu_asm.h c/src/exec/score/cpu/mips/idtcpu.h c/src/exec/score/cpu/mips/idtmon.h c/src/exec/score/cpu/mips/iregdef.h c/src/exec/score/cpu/mips/rtems.c c/src/exec/score/cpu/mips/rtems/Makefile.am c/src/exec/score/cpu/mips/rtems/score/Makefile.am c/src/exec/score/cpu/mips/rtems/score/cpu.h c/src/exec/score/cpu/mips/rtems/score/mips.h c/src/exec/score/cpu/mips/rtems/score/mips64orion.h c/src/exec/score/cpu/mips/rtems/score/mipstypes.h c/src/exec/score/cpu/mips/rtems/score/types.h c/src/exec/score/cpu/mips64orion/rtems/score/types.h c/src/exec/score/cpu/no_cpu/rtems/score/types.h c/src/exec/score/cpu/powerpc/asm.h c/src/exec/score/cpu/powerpc/rtems/score/ppc.h c/src/exec/score/cpu/powerpc/rtems/score/ppctypes.h c/src/exec/score/cpu/powerpc/rtems/score/types.h c/src/exec/score/cpu/sh/rtems/score/types.h c/src/exec/score/cpu/sparc/rtems/score/types.h c/src/exec/score/cpu/unix/rtems/score/types.h c/src/lib/include/rtems/assoc.h c/src/lib/include/rtems/error.h c/src/lib/include/rtems/libcsupport.h c/src/lib/include/rtems/libio.h c/src/lib/include/rtems/libio_.h c/src/lib/include/sys/filio.h c/src/lib/include/sys/ioctl.h c/src/lib/include/sys/sockio.h c/src/lib/include/sys/utsname.h c/src/lib/libbsp/i386/shared/irq/idt.c c/src/lib/libbsp/m68k/ods68302/startup/cpuboot.c c/src/lib/libbsp/mips/Makefile.am c/src/lib/libbsp/mips/README c/src/lib/libbsp/mips/configure.in c/src/lib/libbsp/mips/p4000/Makefile.am c/src/lib/libbsp/mips/p4000/README c/src/lib/libbsp/mips/p4000/bsp_specs c/src/lib/libbsp/mips/p4000/configure.in c/src/lib/libbsp/mips/p4000/console/Makefile.am c/src/lib/libbsp/mips/p4000/console/console.c c/src/lib/libbsp/mips/p4000/console/led.S c/src/lib/libbsp/mips/p4000/include/Makefile.am c/src/lib/libbsp/mips/p4000/include/bsp.h c/src/lib/libbsp/mips/p4000/include/coverhd.h c/src/lib/libbsp/mips/p4000/liblnk/Makefile.am c/src/lib/libbsp/mips/p4000/liblnk/lnklib.S c/src/lib/libbsp/mips/p4000/start/Makefile.am c/src/lib/libbsp/mips/p4000/start/start.S c/src/lib/libbsp/mips/p4000/startup/Makefile.am c/src/lib/libbsp/mips/p4000/startup/bspclean.c c/src/lib/libbsp/mips/p4000/startup/bspstart.c c/src/lib/libbsp/mips/p4000/startup/ghlinkcmds c/src/lib/libbsp/mips/p4000/startup/idtmem.S c/src/lib/libbsp/mips/p4000/startup/idttlb.S c/src/lib/libbsp/mips/p4000/startup/inittlb.c c/src/lib/libbsp/mips/p4000/startup/linkcmds c/src/lib/libbsp/mips/p4000/startup/setvec.c c/src/lib/libbsp/mips/p4000/times c/src/lib/libbsp/mips/p4000/wrapup/Makefile.am c/src/lib/libbsp/powerpc/support/new_exception_processing/Makefile.am c/src/lib/libbsp/powerpc/support/new_exception_processing/c_isr.inl c/src/lib/libbsp/powerpc/support/new_exception_processing/cpu.c c/src/lib/libbsp/powerpc/support/new_exception_processing/cpu.h c/src/lib/libbsp/powerpc/support/new_exception_processing/cpu_asm.S c/src/lib/libbsp/powerpc/support/old_exception_processing/Makefile.am c/src/lib/libbsp/powerpc/support/old_exception_processing/README c/src/lib/libbsp/powerpc/support/old_exception_processing/TODO c/src/lib/libbsp/powerpc/support/old_exception_processing/c_isr.inl c/src/lib/libbsp/powerpc/support/old_exception_processing/cpu.c c/src/lib/libbsp/powerpc/support/old_exception_processing/cpu.h c/src/lib/libbsp/powerpc/support/old_exception_processing/cpu_asm.S c/src/lib/libbsp/powerpc/support/old_exception_processing/irq_stub.S c/src/lib/libbsp/powerpc/support/old_exception_processing/ppccache.c c/src/lib/libbsp/powerpc/support/old_exception_processing/rtems.S c/src/lib/libc/utsname.c c/src/lib/libcpu/i386/idt.c c/src/lib/libcpu/m68k/shared/misc/memcpy.c c/src/lib/libcpu/mips/Makefile.am c/src/lib/libcpu/mips/clock/Makefile.am c/src/lib/libcpu/mips/clock/ckinit.c c/src/lib/libcpu/mips/clock/clock.S c/src/lib/libcpu/mips/clock/clock.h c/src/lib/libcpu/mips/configure.in c/src/lib/libcpu/mips/timer/Makefile.am c/src/lib/libcpu/mips/timer/gettime.S c/src/lib/libcpu/mips/timer/timer.c c/src/lib/libcpu/powerpc/new-exceptions/cpu.c c/src/lib/libcpu/powerpc/new-exceptions/cpu_asm.S c/src/lib/libcpu/powerpc/new_exception_processing/Makefile.am c/src/lib/libcpu/powerpc/new_exception_processing/c_isr.inl c/src/lib/libcpu/powerpc/new_exception_processing/cpu.c c/src/lib/libcpu/powerpc/new_exception_processing/cpu.h c/src/lib/libcpu/powerpc/new_exception_processing/cpu_asm.S c/src/lib/libcpu/powerpc/old-exceptions/README c/src/lib/libcpu/powerpc/old-exceptions/TODO c/src/lib/libcpu/powerpc/old-exceptions/cpu.c c/src/lib/libcpu/powerpc/old-exceptions/cpu_asm.S c/src/lib/libcpu/powerpc/old-exceptions/irq_stub.S c/src/lib/libcpu/powerpc/old-exceptions/ppccache.c c/src/lib/libcpu/powerpc/old_exception_processing/Makefile.am c/src/lib/libcpu/powerpc/old_exception_processing/README c/src/lib/libcpu/powerpc/old_exception_processing/TODO c/src/lib/libcpu/powerpc/old_exception_processing/c_isr.inl c/src/lib/libcpu/powerpc/old_exception_processing/cpu.c c/src/lib/libcpu/powerpc/old_exception_processing/cpu.h c/src/lib/libcpu/powerpc/old_exception_processing/cpu_asm.S c/src/lib/libcpu/powerpc/old_exception_processing/irq_stub.S c/src/lib/libcpu/powerpc/old_exception_processing/rtems.S c/src/lib/libcpu/sh/sh7032/include/iosh7032.h c/src/lib/libcpu/sh/sh7032/include/ispsh7032.h c/src/lib/libcpu/sh/sh7032/score/cpu_asm.c c/src/lib/libcpu/sh/sh7032/score/ispsh7032.c c/src/lib/libcpu/sh/sh7045/include/io_types.h c/src/lib/libcpu/sh/sh7045/include/iosh7045.h c/src/lib/libcpu/sh/sh7045/include/ispsh7045.h c/src/lib/libcpu/sh/sh7045/score/cpu_asm.c c/src/lib/libcpu/sh/sh7045/score/ispsh7045.c c/src/lib/libcpu/sparc/include/erc32.h c/src/libchip/shmdr/README c/src/libchip/shmdr/addlq.c c/src/libchip/shmdr/cnvpkt.c c/src/libchip/shmdr/dump.c c/src/libchip/shmdr/fatal.c c/src/libchip/shmdr/getlq.c c/src/libchip/shmdr/getpkt.c c/src/libchip/shmdr/init.c c/src/libchip/shmdr/initlq.c c/src/libchip/shmdr/intr.c c/src/libchip/shmdr/mpci.h c/src/libchip/shmdr/mpisr.c c/src/libchip/shmdr/poll.c c/src/libchip/shmdr/receive.c c/src/libchip/shmdr/retpkt.c c/src/libchip/shmdr/send.c c/src/libchip/shmdr/setckvec.c c/src/libchip/shmdr/shm_driver.h c/src/libfs/src/imfs/deviceio.c c/src/libfs/src/imfs/imfs.h c/src/libfs/src/imfs/imfs_chown.c c/src/libfs/src/imfs/imfs_creat.c c/src/libfs/src/imfs/imfs_debug.c c/src/libfs/src/imfs/imfs_directory.c c/src/libfs/src/imfs/imfs_eval.c c/src/libfs/src/imfs/imfs_fchmod.c c/src/libfs/src/imfs/imfs_fcntl.c c/src/libfs/src/imfs/imfs_fdatasync.c c/src/libfs/src/imfs/imfs_free.c c/src/libfs/src/imfs/imfs_fsunmount.c c/src/libfs/src/imfs/imfs_getchild.c c/src/libfs/src/imfs/imfs_gtkn.c c/src/libfs/src/imfs/imfs_handlers_device.c c/src/libfs/src/imfs/imfs_handlers_directory.c c/src/libfs/src/imfs/imfs_handlers_link.c c/src/libfs/src/imfs/imfs_handlers_memfile.c c/src/libfs/src/imfs/imfs_init.c c/src/libfs/src/imfs/imfs_initsupp.c c/src/libfs/src/imfs/imfs_link.c c/src/libfs/src/imfs/imfs_mknod.c c/src/libfs/src/imfs/imfs_mount.c c/src/libfs/src/imfs/imfs_ntype.c c/src/libfs/src/imfs/imfs_readlink.c c/src/libfs/src/imfs/imfs_rmnod.c c/src/libfs/src/imfs/imfs_stat.c c/src/libfs/src/imfs/imfs_symlink.c c/src/libfs/src/imfs/imfs_unixstub.c c/src/libfs/src/imfs/imfs_unlink.c c/src/libfs/src/imfs/imfs_unmount.c c/src/libfs/src/imfs/imfs_utime.c c/src/libfs/src/imfs/ioman.c c/src/libfs/src/imfs/memfile.c c/src/libfs/src/imfs/miniimfs_init.c c/src/librdbg/src/powerpc/new_exception_processing/Makefile.am c/src/librdbg/src/powerpc/new_exception_processing/remdeb.h c/src/librdbg/src/powerpc/new_exception_processing/remdeb_f.x c/src/librdbg/src/powerpc/new_exception_processing/remdeb_svc.c c/src/librdbg/src/powerpc/new_exception_processing/remdeb_xdr.c c/src/make/README c/src/make/compilers/gcc-target-default.cfg c/src/make/directory.cfg c/src/make/host.cfg.in c/src/make/lib.cfg c/src/optman/rtems/Makefile.am c/src/optman/rtems/no-dpmem.c c/src/optman/rtems/no-event.c c/src/optman/rtems/no-mp.c c/src/optman/rtems/no-msg.c c/src/optman/rtems/no-part.c c/src/optman/rtems/no-region.c c/src/optman/rtems/no-rtmon.c c/src/optman/rtems/no-sem.c c/src/optman/rtems/no-signal.c c/src/optman/rtems/no-timer.c c/src/optman/sapi/Makefile.am c/src/optman/sapi/no-ext.c c/src/optman/sapi/no-io.c cpukit/Makefile.am cpukit/ada/rtems.adb cpukit/ada/rtems.ads cpukit/ftpd/Makefile.am cpukit/ftpd/ftpd.c cpukit/ftpd/ftpd.h cpukit/httpd/Makefile.am cpukit/httpd/asp.c cpukit/httpd/balloc.c cpukit/httpd/default.c cpukit/httpd/ej.h cpukit/httpd/ejlex.c cpukit/httpd/ejparse.c cpukit/httpd/form.c cpukit/httpd/h.c cpukit/httpd/handler.c cpukit/httpd/mime.c cpukit/httpd/misc.c cpukit/httpd/ringq.c cpukit/httpd/rom.c cpukit/httpd/rtems_webserver.h cpukit/httpd/security.c cpukit/httpd/socket.c cpukit/httpd/sym.c cpukit/httpd/uemf.c cpukit/httpd/uemf.h cpukit/httpd/url.c cpukit/httpd/value.c cpukit/httpd/wbase64.c cpukit/httpd/webcomp.c cpukit/httpd/webmain.c cpukit/httpd/webpage.c cpukit/httpd/webrom.c cpukit/httpd/webs.c cpukit/httpd/webs.h cpukit/httpd/websuemf.c cpukit/httpd/wsIntrn.h cpukit/include/rtems/libio_.h cpukit/itron/Makefile.am cpukit/itron/include/Makefile.am cpukit/itron/include/itron.h cpukit/itron/include/itronsys/README cpukit/itron/include/itronsys/eventflags.h cpukit/itron/include/itronsys/fmempool.h cpukit/itron/include/itronsys/intr.h cpukit/itron/include/itronsys/mbox.h cpukit/itron/include/itronsys/msgbuffer.h cpukit/itron/include/itronsys/network.h cpukit/itron/include/itronsys/port.h cpukit/itron/include/itronsys/semaphore.h cpukit/itron/include/itronsys/status.h cpukit/itron/include/itronsys/sysmgmt.h cpukit/itron/include/itronsys/task.h cpukit/itron/include/itronsys/time.h cpukit/itron/include/itronsys/types.h cpukit/itron/include/itronsys/vmempool.h cpukit/itron/include/rtems/itron/README cpukit/itron/include/rtems/itron/config.h cpukit/itron/include/rtems/itron/eventflags.h cpukit/itron/include/rtems/itron/fmempool.h cpukit/itron/include/rtems/itron/intr.h cpukit/itron/include/rtems/itron/itronapi.h cpukit/itron/include/rtems/itron/mbox.h cpukit/itron/include/rtems/itron/msgbuffer.h cpukit/itron/include/rtems/itron/network.h cpukit/itron/include/rtems/itron/object.h cpukit/itron/include/rtems/itron/port.h cpukit/itron/include/rtems/itron/semaphore.h cpukit/itron/include/rtems/itron/sysmgmt.h cpukit/itron/include/rtems/itron/task.h cpukit/itron/include/rtems/itron/time.h cpukit/itron/include/rtems/itron/vmempool.h cpukit/itron/inline/Makefile.am cpukit/itron/inline/rtems/itron/eventflags.inl cpukit/itron/inline/rtems/itron/fmempool.inl cpukit/itron/inline/rtems/itron/intr.inl cpukit/itron/inline/rtems/itron/mbox.inl cpukit/itron/inline/rtems/itron/msgbuffer.inl cpukit/itron/inline/rtems/itron/network.inl cpukit/itron/inline/rtems/itron/port.inl cpukit/itron/inline/rtems/itron/semaphore.inl cpukit/itron/inline/rtems/itron/sysmgmt.inl cpukit/itron/inline/rtems/itron/task.inl cpukit/itron/inline/rtems/itron/time.inl cpukit/itron/inline/rtems/itron/vmempool.inl cpukit/itron/src/Makefile.am cpukit/itron/src/TODO cpukit/itron/src/can_wup.c cpukit/itron/src/chg_pri.c cpukit/itron/src/cre_mbf.c cpukit/itron/src/cre_mbx.c cpukit/itron/src/cre_sem.c cpukit/itron/src/cre_tsk.c cpukit/itron/src/del_mbf.c cpukit/itron/src/del_mbx.c cpukit/itron/src/del_sem.c cpukit/itron/src/del_tsk.c cpukit/itron/src/dis_dsp.c cpukit/itron/src/ena_dsp.c cpukit/itron/src/eventflags.c cpukit/itron/src/exd_tsk.c cpukit/itron/src/ext_tsk.c cpukit/itron/src/fmempool.c cpukit/itron/src/frsm_tsk.c cpukit/itron/src/get_tid.c cpukit/itron/src/itronintr.c cpukit/itron/src/itronsem.c cpukit/itron/src/itrontime.c cpukit/itron/src/mbox.c cpukit/itron/src/mboxtranslatereturncode.c cpukit/itron/src/msgbuffer.c cpukit/itron/src/msgbuffertranslatereturncode.c cpukit/itron/src/network.c cpukit/itron/src/port.c cpukit/itron/src/prcv_mbf.c cpukit/itron/src/prcv_mbx.c cpukit/itron/src/preq_sem.c cpukit/itron/src/psnd_mbf.c cpukit/itron/src/rcv_mbf.c cpukit/itron/src/rcv_mbx.c cpukit/itron/src/ref_mbf.c cpukit/itron/src/ref_mbx.c cpukit/itron/src/ref_sem.c cpukit/itron/src/ref_tsk.c cpukit/itron/src/rel_wai.c cpukit/itron/src/rot_rdq.c cpukit/itron/src/rsm_tsk.c cpukit/itron/src/sig_sem.c cpukit/itron/src/slp_tsk.c cpukit/itron/src/snd_mbf.c cpukit/itron/src/snd_mbx.c cpukit/itron/src/sta_tsk.c cpukit/itron/src/sus_tsk.c cpukit/itron/src/sysmgmt.c cpukit/itron/src/task.c cpukit/itron/src/ter_tsk.c cpukit/itron/src/trcv_mbf.c cpukit/itron/src/trcv_mbx.c cpukit/itron/src/tslp_tsk.c cpukit/itron/src/tsnd_mbf.c cpukit/itron/src/twai_sem.c cpukit/itron/src/vmempool.c cpukit/itron/src/wai_sem.c cpukit/itron/src/wup_tsk.c cpukit/libcsupport/Makefile.am cpukit/libcsupport/include/chain.h cpukit/libcsupport/include/clockdrv.h cpukit/libcsupport/include/console.h cpukit/libcsupport/include/iosupp.h cpukit/libcsupport/include/motorola/mc68230.h cpukit/libcsupport/include/motorola/mc68681.h cpukit/libcsupport/include/ringbuf.h cpukit/libcsupport/include/rtems/assoc.h cpukit/libcsupport/include/rtems/error.h cpukit/libcsupport/include/rtems/libcsupport.h cpukit/libcsupport/include/rtems/libio.h cpukit/libcsupport/include/rtems/libio_.h cpukit/libcsupport/include/spurious.h cpukit/libcsupport/include/sys/filio.h cpukit/libcsupport/include/sys/ioctl.h cpukit/libcsupport/include/sys/sockio.h cpukit/libcsupport/include/sys/termios.h cpukit/libcsupport/include/sys/utime.h cpukit/libcsupport/include/sys/utsname.h cpukit/libcsupport/include/timerdrv.h cpukit/libcsupport/include/vmeintr.h cpukit/libcsupport/include/zilog/z8036.h cpukit/libcsupport/include/zilog/z8530.h cpukit/libcsupport/include/zilog/z8536.h cpukit/libcsupport/src/CASES cpukit/libcsupport/src/README cpukit/libcsupport/src/TODO cpukit/libcsupport/src/__brk.c cpukit/libcsupport/src/__getpid.c cpukit/libcsupport/src/__gettod.c cpukit/libcsupport/src/__sbrk.c cpukit/libcsupport/src/__times.c cpukit/libcsupport/src/access.c cpukit/libcsupport/src/assoc.c cpukit/libcsupport/src/assocnamebad.c cpukit/libcsupport/src/base_fs.c cpukit/libcsupport/src/cfgetispeed.c cpukit/libcsupport/src/cfgetospeed.c cpukit/libcsupport/src/cfsetispeed.c cpukit/libcsupport/src/cfsetospeed.c cpukit/libcsupport/src/chdir.c cpukit/libcsupport/src/chmod.c cpukit/libcsupport/src/chown.c cpukit/libcsupport/src/close.c cpukit/libcsupport/src/closedir.c cpukit/libcsupport/src/creat.c cpukit/libcsupport/src/ctermid.c cpukit/libcsupport/src/dup.c cpukit/libcsupport/src/dup2.c cpukit/libcsupport/src/error.c cpukit/libcsupport/src/eval.c cpukit/libcsupport/src/fchmod.c cpukit/libcsupport/src/fcntl.c cpukit/libcsupport/src/fdatasync.c cpukit/libcsupport/src/fpathconf.c cpukit/libcsupport/src/fs_null_handlers.c cpukit/libcsupport/src/fstat.c cpukit/libcsupport/src/fsync.c cpukit/libcsupport/src/ftruncate.c cpukit/libcsupport/src/getcwd.c cpukit/libcsupport/src/getdents.c cpukit/libcsupport/src/getgrent.c cpukit/libcsupport/src/getpwent.c cpukit/libcsupport/src/hosterr.c cpukit/libcsupport/src/ioctl.c cpukit/libcsupport/src/isatty.c cpukit/libcsupport/src/libio.c cpukit/libcsupport/src/libio_sockets.c cpukit/libcsupport/src/link.c cpukit/libcsupport/src/lseek.c cpukit/libcsupport/src/lstat.c cpukit/libcsupport/src/malloc.c cpukit/libcsupport/src/mkdir.c cpukit/libcsupport/src/mkfifo.c cpukit/libcsupport/src/mknod.c cpukit/libcsupport/src/mount.c cpukit/libcsupport/src/newlibc.c cpukit/libcsupport/src/no_libc.c cpukit/libcsupport/src/no_posix.c cpukit/libcsupport/src/open.c cpukit/libcsupport/src/opendir.c cpukit/libcsupport/src/pathconf.c cpukit/libcsupport/src/pipe.c cpukit/libcsupport/src/read.c cpukit/libcsupport/src/readdir.c cpukit/libcsupport/src/readlink.c cpukit/libcsupport/src/rewinddir.c cpukit/libcsupport/src/rmdir.c cpukit/libcsupport/src/scandir.c cpukit/libcsupport/src/seekdir.c cpukit/libcsupport/src/stat.c cpukit/libcsupport/src/symlink.c cpukit/libcsupport/src/tcdrain.c cpukit/libcsupport/src/tcflow.c cpukit/libcsupport/src/tcflush.c cpukit/libcsupport/src/tcgetattr.c cpukit/libcsupport/src/tcgetprgrp.c cpukit/libcsupport/src/tcsendbreak.c cpukit/libcsupport/src/tcsetattr.c cpukit/libcsupport/src/tcsetpgrp.c cpukit/libcsupport/src/telldir.c cpukit/libcsupport/src/termios.c cpukit/libcsupport/src/termiosinitialize.c cpukit/libcsupport/src/termiosreserveresources.c cpukit/libcsupport/src/truncate.c cpukit/libcsupport/src/ttyname.c cpukit/libcsupport/src/ttyname_r.c cpukit/libcsupport/src/umask.c cpukit/libcsupport/src/unixlibc.c cpukit/libcsupport/src/unlink.c cpukit/libcsupport/src/unmount.c cpukit/libcsupport/src/utime.c cpukit/libcsupport/src/utsname.c cpukit/libcsupport/src/write.c cpukit/libfs/src/imfs/deviceio.c cpukit/libfs/src/imfs/imfs.h cpukit/libfs/src/imfs/imfs_chown.c cpukit/libfs/src/imfs/imfs_creat.c cpukit/libfs/src/imfs/imfs_debug.c cpukit/libfs/src/imfs/imfs_directory.c cpukit/libfs/src/imfs/imfs_eval.c cpukit/libfs/src/imfs/imfs_fchmod.c cpukit/libfs/src/imfs/imfs_fcntl.c cpukit/libfs/src/imfs/imfs_fdatasync.c cpukit/libfs/src/imfs/imfs_free.c cpukit/libfs/src/imfs/imfs_fsunmount.c cpukit/libfs/src/imfs/imfs_getchild.c cpukit/libfs/src/imfs/imfs_gtkn.c cpukit/libfs/src/imfs/imfs_handlers_device.c cpukit/libfs/src/imfs/imfs_handlers_directory.c cpukit/libfs/src/imfs/imfs_handlers_link.c cpukit/libfs/src/imfs/imfs_handlers_memfile.c cpukit/libfs/src/imfs/imfs_init.c cpukit/libfs/src/imfs/imfs_initsupp.c cpukit/libfs/src/imfs/imfs_link.c cpukit/libfs/src/imfs/imfs_mknod.c cpukit/libfs/src/imfs/imfs_mount.c cpukit/libfs/src/imfs/imfs_ntype.c cpukit/libfs/src/imfs/imfs_readlink.c cpukit/libfs/src/imfs/imfs_rmnod.c cpukit/libfs/src/imfs/imfs_stat.c cpukit/libfs/src/imfs/imfs_symlink.c cpukit/libfs/src/imfs/imfs_unixstub.c cpukit/libfs/src/imfs/imfs_unlink.c cpukit/libfs/src/imfs/imfs_unmount.c cpukit/libfs/src/imfs/imfs_utime.c cpukit/libfs/src/imfs/ioman.c cpukit/libfs/src/imfs/memfile.c cpukit/libfs/src/imfs/miniimfs_init.c cpukit/libmisc/Makefile.am cpukit/libmisc/README cpukit/libmisc/cpuuse/Makefile.am cpukit/libmisc/cpuuse/README cpukit/libmisc/cpuuse/cpuuse.c cpukit/libmisc/cpuuse/cpuuse.h cpukit/libmisc/dummy/Makefile.am cpukit/libmisc/dummy/README cpukit/libmisc/dummy/dummy.c cpukit/libmisc/dumpbuf/Makefile.am cpukit/libmisc/dumpbuf/dumpbuf.c cpukit/libmisc/dumpbuf/dumpbuf.h cpukit/libmisc/monitor/Makefile.am cpukit/libmisc/monitor/README cpukit/libmisc/monitor/mon-command.c cpukit/libmisc/monitor/mon-config.c cpukit/libmisc/monitor/mon-dname.c cpukit/libmisc/monitor/mon-driver.c cpukit/libmisc/monitor/mon-extension.c cpukit/libmisc/monitor/mon-itask.c cpukit/libmisc/monitor/mon-manager.c cpukit/libmisc/monitor/mon-monitor.c cpukit/libmisc/monitor/mon-mpci.c cpukit/libmisc/monitor/mon-object.c cpukit/libmisc/monitor/mon-prmisc.c cpukit/libmisc/monitor/mon-queue.c cpukit/libmisc/monitor/mon-server.c cpukit/libmisc/monitor/mon-symbols.c cpukit/libmisc/monitor/mon-task.c cpukit/libmisc/monitor/monitor.h cpukit/libmisc/monitor/symbols.h cpukit/libmisc/rtmonuse/Makefile.am cpukit/libmisc/rtmonuse/rtmonuse.c cpukit/libmisc/rtmonuse/rtmonuse.h cpukit/libmisc/stackchk/Makefile.am cpukit/libmisc/stackchk/README cpukit/libmisc/stackchk/check.c cpukit/libmisc/stackchk/internal.h cpukit/libmisc/stackchk/stackchk.h cpukit/libmisc/untar/Makefile.am cpukit/libmisc/untar/README cpukit/libmisc/untar/untar.c cpukit/libmisc/untar/untar.h cpukit/libmisc/wrapup/Makefile.am cpukit/libnetworking/Makefile.am cpukit/libnetworking/README cpukit/libnetworking/arpa/Makefile.am cpukit/libnetworking/arpa/ftp.h cpukit/libnetworking/arpa/inet.h cpukit/libnetworking/arpa/nameser.h cpukit/libnetworking/arpa/nameser_compat.h cpukit/libnetworking/arpa/telnet.h cpukit/libnetworking/bpfilter.h cpukit/libnetworking/kern/Makefile.am cpukit/libnetworking/kern/kern_subr.c cpukit/libnetworking/kern/uipc_domain.c cpukit/libnetworking/kern/uipc_mbuf.c cpukit/libnetworking/kern/uipc_socket.c cpukit/libnetworking/kern/uipc_socket2.c cpukit/libnetworking/lib/Makefile.am cpukit/libnetworking/lib/README cpukit/libnetworking/lib/getprotoby.c cpukit/libnetworking/lib/rtems_bsdnet_ntp.c cpukit/libnetworking/lib/syslog.c cpukit/libnetworking/lib/tftpDriver.c cpukit/libnetworking/libc/Makefile.am cpukit/libnetworking/libc/addr2ascii.3 cpukit/libnetworking/libc/addr2ascii.c cpukit/libnetworking/libc/ascii2addr.c cpukit/libnetworking/libc/base64.c cpukit/libnetworking/libc/byteorder.3 cpukit/libnetworking/libc/ether_addr.c cpukit/libnetworking/libc/ethers.3 cpukit/libnetworking/libc/gethostbydns.c cpukit/libnetworking/libc/gethostbyht.c cpukit/libnetworking/libc/gethostbyname.3 cpukit/libnetworking/libc/gethostbynis.c cpukit/libnetworking/libc/gethostnamadr.c cpukit/libnetworking/libc/gethostname.c cpukit/libnetworking/libc/getnetbydns.c cpukit/libnetworking/libc/getnetbyht.c cpukit/libnetworking/libc/getnetbynis.c cpukit/libnetworking/libc/getnetent.3 cpukit/libnetworking/libc/getnetnamadr.c cpukit/libnetworking/libc/getproto.c cpukit/libnetworking/libc/getprotoent.3 cpukit/libnetworking/libc/getprotoent.c cpukit/libnetworking/libc/getprotoname.c cpukit/libnetworking/libc/getservbyname.c cpukit/libnetworking/libc/getservbyport.c cpukit/libnetworking/libc/getservent.3 cpukit/libnetworking/libc/getservent.c cpukit/libnetworking/libc/herror.c cpukit/libnetworking/libc/inet.3 cpukit/libnetworking/libc/inet_addr.c cpukit/libnetworking/libc/inet_lnaof.c cpukit/libnetworking/libc/inet_makeaddr.c cpukit/libnetworking/libc/inet_net_ntop.c cpukit/libnetworking/libc/inet_net_pton.c cpukit/libnetworking/libc/inet_neta.c cpukit/libnetworking/libc/inet_netof.c cpukit/libnetworking/libc/inet_network.c cpukit/libnetworking/libc/inet_ntoa.c cpukit/libnetworking/libc/inet_ntop.c cpukit/libnetworking/libc/inet_pton.c cpukit/libnetworking/libc/iso_addr.3 cpukit/libnetworking/libc/iso_addr.c cpukit/libnetworking/libc/linkaddr.3 cpukit/libnetworking/libc/linkaddr.c cpukit/libnetworking/libc/map_v4v6.c cpukit/libnetworking/libc/ns.3 cpukit/libnetworking/libc/ns_addr.c cpukit/libnetworking/libc/ns_name.c cpukit/libnetworking/libc/ns_netint.c cpukit/libnetworking/libc/ns_ntoa.c cpukit/libnetworking/libc/ns_parse.c cpukit/libnetworking/libc/ns_print.c cpukit/libnetworking/libc/ns_ttl.c cpukit/libnetworking/libc/nsap_addr.c cpukit/libnetworking/libc/rcmd.3 cpukit/libnetworking/libc/rcmd.c cpukit/libnetworking/libc/recv.c cpukit/libnetworking/libc/res_comp.c cpukit/libnetworking/libc/res_config.h cpukit/libnetworking/libc/res_data.c cpukit/libnetworking/libc/res_debug.c cpukit/libnetworking/libc/res_init.c cpukit/libnetworking/libc/res_mkquery.c cpukit/libnetworking/libc/res_mkupdate.c cpukit/libnetworking/libc/res_query.c cpukit/libnetworking/libc/res_send.c cpukit/libnetworking/libc/res_stubs.c cpukit/libnetworking/libc/res_update.c cpukit/libnetworking/libc/resolver.3 cpukit/libnetworking/libc/send.c cpukit/libnetworking/libc/strsep.c cpukit/libnetworking/loop.h cpukit/libnetworking/machine/Makefile.am cpukit/libnetworking/machine/conf.h cpukit/libnetworking/machine/cpu.h cpukit/libnetworking/machine/cpufunc.h cpukit/libnetworking/machine/endian.h cpukit/libnetworking/machine/in_cksum.h cpukit/libnetworking/machine/limits.h cpukit/libnetworking/machine/param.h cpukit/libnetworking/machine/types.h cpukit/libnetworking/machine/vmparam.h cpukit/libnetworking/net/Makefile.am cpukit/libnetworking/net/bpf.h cpukit/libnetworking/net/ethernet.h cpukit/libnetworking/net/if.c cpukit/libnetworking/net/if.h cpukit/libnetworking/net/if_arp.h cpukit/libnetworking/net/if_dl.h cpukit/libnetworking/net/if_ethersubr.c cpukit/libnetworking/net/if_llc.h cpukit/libnetworking/net/if_loop.c cpukit/libnetworking/net/if_ppp.h cpukit/libnetworking/net/if_types.h cpukit/libnetworking/net/netisr.h cpukit/libnetworking/net/ppp-comp.h cpukit/libnetworking/net/ppp_defs.h cpukit/libnetworking/net/radix.c cpukit/libnetworking/net/radix.h cpukit/libnetworking/net/raw_cb.c cpukit/libnetworking/net/raw_cb.h cpukit/libnetworking/net/raw_usrreq.c cpukit/libnetworking/net/route.c cpukit/libnetworking/net/route.h cpukit/libnetworking/net/rtsock.c cpukit/libnetworking/netdb.h cpukit/libnetworking/netinet/Makefile.am cpukit/libnetworking/netinet/icmp_var.h cpukit/libnetworking/netinet/if_ether.c cpukit/libnetworking/netinet/if_ether.h cpukit/libnetworking/netinet/igmp.c cpukit/libnetworking/netinet/igmp.h cpukit/libnetworking/netinet/igmp_var.h cpukit/libnetworking/netinet/in.c cpukit/libnetworking/netinet/in.h cpukit/libnetworking/netinet/in_cksum.c cpukit/libnetworking/netinet/in_cksum_i386.c cpukit/libnetworking/netinet/in_cksum_i386.h cpukit/libnetworking/netinet/in_cksum_m68k.c cpukit/libnetworking/netinet/in_cksum_m68k.h cpukit/libnetworking/netinet/in_cksum_powerpc.c cpukit/libnetworking/netinet/in_cksum_powerpc.h cpukit/libnetworking/netinet/in_pcb.c cpukit/libnetworking/netinet/in_pcb.h cpukit/libnetworking/netinet/in_proto.c cpukit/libnetworking/netinet/in_rmx.c cpukit/libnetworking/netinet/in_systm.h cpukit/libnetworking/netinet/in_var.h cpukit/libnetworking/netinet/ip.h cpukit/libnetworking/netinet/ip_divert.c cpukit/libnetworking/netinet/ip_fw.c cpukit/libnetworking/netinet/ip_fw.h cpukit/libnetworking/netinet/ip_icmp.c cpukit/libnetworking/netinet/ip_icmp.h cpukit/libnetworking/netinet/ip_input.c cpukit/libnetworking/netinet/ip_mroute.c cpukit/libnetworking/netinet/ip_mroute.h cpukit/libnetworking/netinet/ip_output.c cpukit/libnetworking/netinet/ip_var.h cpukit/libnetworking/netinet/raw_ip.c cpukit/libnetworking/netinet/tcp.h cpukit/libnetworking/netinet/tcp_debug.c cpukit/libnetworking/netinet/tcp_debug.h cpukit/libnetworking/netinet/tcp_fsm.h cpukit/libnetworking/netinet/tcp_input.c cpukit/libnetworking/netinet/tcp_output.c cpukit/libnetworking/netinet/tcp_seq.h cpukit/libnetworking/netinet/tcp_subr.c cpukit/libnetworking/netinet/tcp_timer.c cpukit/libnetworking/netinet/tcp_timer.h cpukit/libnetworking/netinet/tcp_usrreq.c cpukit/libnetworking/netinet/tcp_var.h cpukit/libnetworking/netinet/tcpip.h cpukit/libnetworking/netinet/udp.h cpukit/libnetworking/netinet/udp_usrreq.c cpukit/libnetworking/netinet/udp_var.h cpukit/libnetworking/nfs/Makefile.am cpukit/libnetworking/nfs/bootp_subr.c cpukit/libnetworking/nfs/krpc.h cpukit/libnetworking/nfs/nfs.h cpukit/libnetworking/nfs/nfsdiskless.h cpukit/libnetworking/nfs/nfsproto.h cpukit/libnetworking/nfs/rpcv2.h cpukit/libnetworking/nfs/xdr_subs.h cpukit/libnetworking/opt_ipfw.h cpukit/libnetworking/opt_mrouting.h cpukit/libnetworking/opt_tcpdebug.h cpukit/libnetworking/poll.h cpukit/libnetworking/resolv.h cpukit/libnetworking/rtems/Makefile.am cpukit/libnetworking/rtems/issetugid.c cpukit/libnetworking/rtems/rtems_bootp.c cpukit/libnetworking/rtems/rtems_bsdnet.h cpukit/libnetworking/rtems/rtems_bsdnet_internal.h cpukit/libnetworking/rtems/rtems_glue.c cpukit/libnetworking/rtems/rtems_select.c cpukit/libnetworking/rtems/rtems_showicmpstat.c cpukit/libnetworking/rtems/rtems_showifstat.c cpukit/libnetworking/rtems/rtems_showipstat.c cpukit/libnetworking/rtems/rtems_showmbuf.c cpukit/libnetworking/rtems/rtems_showroute.c cpukit/libnetworking/rtems/rtems_showtcpstat.c cpukit/libnetworking/rtems/rtems_showudpstat.c cpukit/libnetworking/rtems/rtems_syscall.c cpukit/libnetworking/rtems/sghostname.c cpukit/libnetworking/rtems/tftp.h cpukit/libnetworking/sys/Makefile.am cpukit/libnetworking/sys/buf.h cpukit/libnetworking/sys/callout.h cpukit/libnetworking/sys/conf.h cpukit/libnetworking/sys/domain.h cpukit/libnetworking/sys/kernel.h cpukit/libnetworking/sys/libkern.h cpukit/libnetworking/sys/malloc.h cpukit/libnetworking/sys/mbuf.h cpukit/libnetworking/sys/mount.h cpukit/libnetworking/sys/param.h cpukit/libnetworking/sys/proc.h cpukit/libnetworking/sys/protosw.h cpukit/libnetworking/sys/queue.h cpukit/libnetworking/sys/reboot.h cpukit/libnetworking/sys/resourcevar.h cpukit/libnetworking/sys/rtprio.h cpukit/libnetworking/sys/select.h cpukit/libnetworking/sys/signalvar.h cpukit/libnetworking/sys/socket.h cpukit/libnetworking/sys/socketvar.h cpukit/libnetworking/sys/sysctl.h cpukit/libnetworking/sys/syslimits.h cpukit/libnetworking/sys/syslog.h cpukit/libnetworking/sys/systm.h cpukit/libnetworking/sys/ttydefaults.h cpukit/libnetworking/sys/ucred.h cpukit/libnetworking/sys/uio.h cpukit/libnetworking/syslog.h cpukit/libnetworking/vm/Makefile.am cpukit/libnetworking/vm/vm.h cpukit/libnetworking/vm/vm_extern.h cpukit/libnetworking/vm/vm_kern.h cpukit/libnetworking/vm/vm_param.h cpukit/libnetworking/wrapup/Makefile.am cpukit/librpc/Makefile.am cpukit/librpc/include/Makefile.am cpukit/librpc/include/rpc/Makefile.am cpukit/librpc/include/rpc/auth.h cpukit/librpc/include/rpc/clnt.h cpukit/librpc/include/rpc/rpc.h cpukit/librpc/include/rpc/rpc_msg.h cpukit/librpc/include/rpc/svc.h cpukit/librpc/include/rpc/svc_auth.h cpukit/librpc/include/rpc/types.h cpukit/librpc/include/rpc/xdr.h cpukit/librpc/src/Makefile.am cpukit/posix/Makefile.am cpukit/posix/include/Makefile.am cpukit/posix/include/aio.h cpukit/posix/include/devctl.h cpukit/posix/include/intr.h cpukit/posix/include/mqueue.h cpukit/posix/include/rtems/posix/cancel.h cpukit/posix/include/rtems/posix/cond.h cpukit/posix/include/rtems/posix/condmp.h cpukit/posix/include/rtems/posix/config.h cpukit/posix/include/rtems/posix/intr.h cpukit/posix/include/rtems/posix/key.h cpukit/posix/include/rtems/posix/mqueue.h cpukit/posix/include/rtems/posix/mqueuemp.h cpukit/posix/include/rtems/posix/mutex.h cpukit/posix/include/rtems/posix/mutexmp.h cpukit/posix/include/rtems/posix/posixapi.h cpukit/posix/include/rtems/posix/priority.h cpukit/posix/include/rtems/posix/psignal.h cpukit/posix/include/rtems/posix/pthread.h cpukit/posix/include/rtems/posix/pthreadmp.h cpukit/posix/include/rtems/posix/ptimer.h cpukit/posix/include/rtems/posix/semaphore.h cpukit/posix/include/rtems/posix/semaphoremp.h cpukit/posix/include/rtems/posix/threadsup.h cpukit/posix/include/rtems/posix/time.h cpukit/posix/include/rtems/posix/timer.h cpukit/posix/include/sched.h cpukit/posix/include/semaphore.h cpukit/posix/inline/Makefile.am cpukit/posix/inline/rtems/posix/cond.inl cpukit/posix/inline/rtems/posix/intr.inl cpukit/posix/inline/rtems/posix/key.inl cpukit/posix/inline/rtems/posix/mqueue.inl cpukit/posix/inline/rtems/posix/mutex.inl cpukit/posix/inline/rtems/posix/priority.inl cpukit/posix/inline/rtems/posix/pthread.inl cpukit/posix/inline/rtems/posix/semaphore.inl cpukit/posix/macros/Makefile.am cpukit/posix/src/Makefile.am cpukit/posix/src/README.mqueue cpukit/posix/src/adasupp.c cpukit/posix/src/aio.c cpukit/posix/src/alarm.c cpukit/posix/src/cancel.c cpukit/posix/src/cancelrun.c cpukit/posix/src/cleanuppop.c cpukit/posix/src/cleanuppush.c cpukit/posix/src/clockgetcpuclockid.c cpukit/posix/src/clockgetenableattr.c cpukit/posix/src/clockgetres.c cpukit/posix/src/clockgettime.c cpukit/posix/src/clocksetenableattr.c cpukit/posix/src/clocksettime.c cpukit/posix/src/cond.c cpukit/posix/src/condattrdestroy.c cpukit/posix/src/condattrgetpshared.c cpukit/posix/src/condattrinit.c cpukit/posix/src/condattrsetpshared.c cpukit/posix/src/condbroadcast.c cpukit/posix/src/conddefaultattributes.c cpukit/posix/src/conddestroy.c cpukit/posix/src/condinit.c cpukit/posix/src/condmp.c cpukit/posix/src/condsignal.c cpukit/posix/src/condsignalsupp.c cpukit/posix/src/condtimedwait.c cpukit/posix/src/condwait.c cpukit/posix/src/condwaitsupp.c cpukit/posix/src/devctl.c cpukit/posix/src/execl.c cpukit/posix/src/execle.c cpukit/posix/src/execlp.c cpukit/posix/src/execv.c cpukit/posix/src/execve.c cpukit/posix/src/execvp.c cpukit/posix/src/fork.c cpukit/posix/src/getegid.c cpukit/posix/src/geteuid.c cpukit/posix/src/getgid.c cpukit/posix/src/getgroups.c cpukit/posix/src/getlogin.c cpukit/posix/src/getpgrp.c cpukit/posix/src/getpid.c cpukit/posix/src/getppid.c cpukit/posix/src/getuid.c cpukit/posix/src/intr.c cpukit/posix/src/key.c cpukit/posix/src/keycreate.c cpukit/posix/src/keydelete.c cpukit/posix/src/keygetspecific.c cpukit/posix/src/keyrundestructors.c cpukit/posix/src/keysetspecific.c cpukit/posix/src/kill.c cpukit/posix/src/killinfo.c cpukit/posix/src/mqueue.c cpukit/posix/src/mqueueclose.c cpukit/posix/src/mqueuecreatesupp.c cpukit/posix/src/mqueuedeletesupp.c cpukit/posix/src/mqueuegetattr.c cpukit/posix/src/mqueuenametoid.c cpukit/posix/src/mqueuenotify.c cpukit/posix/src/mqueueopen.c cpukit/posix/src/mqueuereceive.c cpukit/posix/src/mqueuerecvsupp.c cpukit/posix/src/mqueuesend.c cpukit/posix/src/mqueuesendsupp.c cpukit/posix/src/mqueuesetattr.c cpukit/posix/src/mqueuetimedreceive.c cpukit/posix/src/mqueuetimedsend.c cpukit/posix/src/mqueuetranslatereturncode.c cpukit/posix/src/mqueueunlink.c cpukit/posix/src/mutex.c cpukit/posix/src/mutexattrdestroy.c cpukit/posix/src/mutexattrgetprioceiling.c cpukit/posix/src/mutexattrgetprotocol.c cpukit/posix/src/mutexattrgetpshared.c cpukit/posix/src/mutexattrinit.c cpukit/posix/src/mutexattrsetprioceiling.c cpukit/posix/src/mutexattrsetprotocol.c cpukit/posix/src/mutexattrsetpshared.c cpukit/posix/src/mutexdefaultattributes.c cpukit/posix/src/mutexdestroy.c cpukit/posix/src/mutexfromcorestatus.c cpukit/posix/src/mutexgetprioceiling.c cpukit/posix/src/mutexinit.c cpukit/posix/src/mutexlock.c cpukit/posix/src/mutexlocksupp.c cpukit/posix/src/mutexmp.c cpukit/posix/src/mutexsetprioceiling.c cpukit/posix/src/mutextimedlock.c cpukit/posix/src/mutextrylock.c cpukit/posix/src/mutexunlock.c cpukit/posix/src/nanosleep.c cpukit/posix/src/pause.c cpukit/posix/src/posixintervaltotimespec.c cpukit/posix/src/posixtimespecsubtract.c cpukit/posix/src/posixtimespectointerval.c cpukit/posix/src/psignal.c cpukit/posix/src/psignalchecksignal.c cpukit/posix/src/psignalclearprocesssignals.c cpukit/posix/src/psignalclearsignals.c cpukit/posix/src/psignalsetprocesssignals.c cpukit/posix/src/psignalunblockthread.c cpukit/posix/src/pthread.c cpukit/posix/src/pthreadatfork.c cpukit/posix/src/pthreadattrdestroy.c cpukit/posix/src/pthreadattrgetdetachstate.c cpukit/posix/src/pthreadattrgetinheritsched.c cpukit/posix/src/pthreadattrgetschedparam.c cpukit/posix/src/pthreadattrgetschedpolicy.c cpukit/posix/src/pthreadattrgetscope.c cpukit/posix/src/pthreadattrgetstackaddr.c cpukit/posix/src/pthreadattrgetstacksize.c cpukit/posix/src/pthreadattrinit.c cpukit/posix/src/pthreadattrsetdetachstate.c cpukit/posix/src/pthreadattrsetinheritsched.c cpukit/posix/src/pthreadattrsetschedparam.c cpukit/posix/src/pthreadattrsetschedpolicy.c cpukit/posix/src/pthreadattrsetscope.c cpukit/posix/src/pthreadattrsetstackaddr.c cpukit/posix/src/pthreadattrsetstacksize.c cpukit/posix/src/pthreadcreate.c cpukit/posix/src/pthreaddetach.c cpukit/posix/src/pthreadequal.c cpukit/posix/src/pthreadexit.c cpukit/posix/src/pthreadgetcpuclockid.c cpukit/posix/src/pthreadgetcputime.c cpukit/posix/src/pthreadgetschedparam.c cpukit/posix/src/pthreadjoin.c cpukit/posix/src/pthreadkill.c cpukit/posix/src/pthreadonce.c cpukit/posix/src/pthreadself.c cpukit/posix/src/pthreadsetcputime.c cpukit/posix/src/pthreadsetschedparam.c cpukit/posix/src/pthreadsigmask.c cpukit/posix/src/ptimer.c cpukit/posix/src/ptimer1.c cpukit/posix/src/sched.c cpukit/posix/src/semaphore.c cpukit/posix/src/semaphorecreatesupp.c cpukit/posix/src/semaphoredeletesupp.c cpukit/posix/src/semaphoremp.c cpukit/posix/src/semaphorenametoid.c cpukit/posix/src/semaphorewaitsupp.c cpukit/posix/src/semclose.c cpukit/posix/src/semdestroy.c cpukit/posix/src/semgetvalue.c cpukit/posix/src/seminit.c cpukit/posix/src/semopen.c cpukit/posix/src/sempost.c cpukit/posix/src/semtimedwait.c cpukit/posix/src/semtrywait.c cpukit/posix/src/semunlink.c cpukit/posix/src/semwait.c cpukit/posix/src/setcancelstate.c cpukit/posix/src/setcanceltype.c cpukit/posix/src/setpgid.c cpukit/posix/src/setsid.c cpukit/posix/src/sigaction.c cpukit/posix/src/sigaddset.c cpukit/posix/src/sigdelset.c cpukit/posix/src/sigemptyset.c cpukit/posix/src/sigfillset.c cpukit/posix/src/sigismember.c cpukit/posix/src/signal_2.c cpukit/posix/src/sigpending.c cpukit/posix/src/sigprocmask.c cpukit/posix/src/sigqueue.c cpukit/posix/src/sigsuspend.c cpukit/posix/src/sigtimedwait.c cpukit/posix/src/sigwait.c cpukit/posix/src/sigwaitinfo.c cpukit/posix/src/sleep.c cpukit/posix/src/sysconf.c cpukit/posix/src/testcancel.c cpukit/posix/src/time.c cpukit/posix/src/types.c cpukit/posix/src/wait.c cpukit/posix/src/waitpid.c cpukit/pppd/Makefile.am cpukit/pppd/README cpukit/pppd/STATUS cpukit/pppd/auth.c cpukit/pppd/cbcp.c cpukit/pppd/cbcp.h cpukit/pppd/ccp.c cpukit/pppd/ccp.h cpukit/pppd/chap.c cpukit/pppd/chap.h cpukit/pppd/chap_ms.c cpukit/pppd/chap_ms.h cpukit/pppd/chat.c cpukit/pppd/demand.c cpukit/pppd/fsm.c cpukit/pppd/fsm.h cpukit/pppd/ipcp.c cpukit/pppd/ipcp.h cpukit/pppd/ipxcp.c cpukit/pppd/ipxcp.h cpukit/pppd/lcp.c cpukit/pppd/lcp.h cpukit/pppd/magic.c cpukit/pppd/magic.h cpukit/pppd/md4.c cpukit/pppd/md4.h cpukit/pppd/md5.c cpukit/pppd/md5.h cpukit/pppd/options.c cpukit/pppd/patchlevel.h cpukit/pppd/pathnames.h cpukit/pppd/pppd.h cpukit/pppd/upap.c cpukit/pppd/upap.h cpukit/rtems/Makefile.am cpukit/rtems/include/Makefile.am cpukit/rtems/include/rtems.h cpukit/rtems/include/rtems/rtems/asr.h cpukit/rtems/include/rtems/rtems/attr.h cpukit/rtems/include/rtems/rtems/clock.h cpukit/rtems/include/rtems/rtems/config.h cpukit/rtems/include/rtems/rtems/dpmem.h cpukit/rtems/include/rtems/rtems/event.h cpukit/rtems/include/rtems/rtems/eventmp.h cpukit/rtems/include/rtems/rtems/eventset.h cpukit/rtems/include/rtems/rtems/intr.h cpukit/rtems/include/rtems/rtems/message.h cpukit/rtems/include/rtems/rtems/modes.h cpukit/rtems/include/rtems/rtems/mp.h cpukit/rtems/include/rtems/rtems/msgmp.h cpukit/rtems/include/rtems/rtems/options.h cpukit/rtems/include/rtems/rtems/part.h cpukit/rtems/include/rtems/rtems/partmp.h cpukit/rtems/include/rtems/rtems/ratemon.h cpukit/rtems/include/rtems/rtems/region.h cpukit/rtems/include/rtems/rtems/regionmp.h cpukit/rtems/include/rtems/rtems/rtemsapi.h cpukit/rtems/include/rtems/rtems/sem.h cpukit/rtems/include/rtems/rtems/semmp.h cpukit/rtems/include/rtems/rtems/signal.h cpukit/rtems/include/rtems/rtems/signalmp.h cpukit/rtems/include/rtems/rtems/status.h cpukit/rtems/include/rtems/rtems/support.h cpukit/rtems/include/rtems/rtems/taskmp.h cpukit/rtems/include/rtems/rtems/tasks.h cpukit/rtems/include/rtems/rtems/timer.h cpukit/rtems/include/rtems/rtems/types.h cpukit/rtems/inline/Makefile.am cpukit/rtems/inline/rtems/rtems/asr.inl cpukit/rtems/inline/rtems/rtems/attr.inl cpukit/rtems/inline/rtems/rtems/dpmem.inl cpukit/rtems/inline/rtems/rtems/event.inl cpukit/rtems/inline/rtems/rtems/eventset.inl cpukit/rtems/inline/rtems/rtems/message.inl cpukit/rtems/inline/rtems/rtems/modes.inl cpukit/rtems/inline/rtems/rtems/options.inl cpukit/rtems/inline/rtems/rtems/part.inl cpukit/rtems/inline/rtems/rtems/ratemon.inl cpukit/rtems/inline/rtems/rtems/region.inl cpukit/rtems/inline/rtems/rtems/sem.inl cpukit/rtems/inline/rtems/rtems/status.inl cpukit/rtems/inline/rtems/rtems/support.inl cpukit/rtems/inline/rtems/rtems/tasks.inl cpukit/rtems/inline/rtems/rtems/timer.inl cpukit/rtems/macros/Makefile.am cpukit/rtems/macros/rtems/rtems/asr.inl cpukit/rtems/macros/rtems/rtems/attr.inl cpukit/rtems/macros/rtems/rtems/dpmem.inl cpukit/rtems/macros/rtems/rtems/event.inl cpukit/rtems/macros/rtems/rtems/eventset.inl cpukit/rtems/macros/rtems/rtems/message.inl cpukit/rtems/macros/rtems/rtems/modes.inl cpukit/rtems/macros/rtems/rtems/options.inl cpukit/rtems/macros/rtems/rtems/part.inl cpukit/rtems/macros/rtems/rtems/ratemon.inl cpukit/rtems/macros/rtems/rtems/region.inl cpukit/rtems/macros/rtems/rtems/sem.inl cpukit/rtems/macros/rtems/rtems/status.inl cpukit/rtems/macros/rtems/rtems/support.inl cpukit/rtems/macros/rtems/rtems/tasks.inl cpukit/rtems/macros/rtems/rtems/timer.inl cpukit/rtems/src/Makefile.am cpukit/rtems/src/attr.c cpukit/rtems/src/clockget.c cpukit/rtems/src/clockset.c cpukit/rtems/src/clocktick.c cpukit/rtems/src/clocktodtoseconds.c cpukit/rtems/src/clocktodvalidate.c cpukit/rtems/src/dpmem.c cpukit/rtems/src/dpmemcreate.c cpukit/rtems/src/dpmemdelete.c cpukit/rtems/src/dpmemexternal2internal.c cpukit/rtems/src/dpmemident.c cpukit/rtems/src/dpmeminternal2external.c cpukit/rtems/src/event.c cpukit/rtems/src/eventmp.c cpukit/rtems/src/eventreceive.c cpukit/rtems/src/eventseize.c cpukit/rtems/src/eventsend.c cpukit/rtems/src/eventsurrender.c cpukit/rtems/src/eventtimeout.c cpukit/rtems/src/intr.c cpukit/rtems/src/intrbody.c cpukit/rtems/src/intrcatch.c cpukit/rtems/src/mp.c cpukit/rtems/src/msg.c cpukit/rtems/src/msgmp.c cpukit/rtems/src/msgqallocate.c cpukit/rtems/src/msgqbroadcast.c cpukit/rtems/src/msgqcreate.c cpukit/rtems/src/msgqdelete.c cpukit/rtems/src/msgqflush.c cpukit/rtems/src/msgqgetnumberpending.c cpukit/rtems/src/msgqident.c cpukit/rtems/src/msgqreceive.c cpukit/rtems/src/msgqsend.c cpukit/rtems/src/msgqsubmit.c cpukit/rtems/src/msgqtranslatereturncode.c cpukit/rtems/src/msgqurgent.c cpukit/rtems/src/part.c cpukit/rtems/src/partcreate.c cpukit/rtems/src/partdelete.c cpukit/rtems/src/partgetbuffer.c cpukit/rtems/src/partident.c cpukit/rtems/src/partmp.c cpukit/rtems/src/partreturnbuffer.c cpukit/rtems/src/ratemon.c cpukit/rtems/src/ratemoncancel.c cpukit/rtems/src/ratemoncreate.c cpukit/rtems/src/ratemondelete.c cpukit/rtems/src/ratemongetstatus.c cpukit/rtems/src/ratemonident.c cpukit/rtems/src/ratemonperiod.c cpukit/rtems/src/ratemontimeout.c cpukit/rtems/src/region.c cpukit/rtems/src/regioncreate.c cpukit/rtems/src/regiondelete.c cpukit/rtems/src/regionextend.c cpukit/rtems/src/regiongetsegment.c cpukit/rtems/src/regiongetsegmentsize.c cpukit/rtems/src/regionident.c cpukit/rtems/src/regionmp.c cpukit/rtems/src/regionreturnsegment.c cpukit/rtems/src/rtclock.c cpukit/rtems/src/rtemstimer.c cpukit/rtems/src/sem.c cpukit/rtems/src/semcreate.c cpukit/rtems/src/semdelete.c cpukit/rtems/src/semflush.c cpukit/rtems/src/semident.c cpukit/rtems/src/semmp.c cpukit/rtems/src/semobtain.c cpukit/rtems/src/semrelease.c cpukit/rtems/src/semtranslatereturncode.c cpukit/rtems/src/signal.c cpukit/rtems/src/signalcatch.c cpukit/rtems/src/signalmp.c cpukit/rtems/src/signalsend.c cpukit/rtems/src/taskcreate.c cpukit/rtems/src/taskdelete.c cpukit/rtems/src/taskgetnote.c cpukit/rtems/src/taskident.c cpukit/rtems/src/taskinitusers.c cpukit/rtems/src/taskissuspended.c cpukit/rtems/src/taskmode.c cpukit/rtems/src/taskmp.c cpukit/rtems/src/taskrestart.c cpukit/rtems/src/taskresume.c cpukit/rtems/src/tasks.c cpukit/rtems/src/tasksetnote.c cpukit/rtems/src/tasksetpriority.c cpukit/rtems/src/taskstart.c cpukit/rtems/src/tasksuspend.c cpukit/rtems/src/taskvariableadd.c cpukit/rtems/src/taskvariabledelete.c cpukit/rtems/src/taskvariableget.c cpukit/rtems/src/taskwakeafter.c cpukit/rtems/src/taskwakewhen.c cpukit/rtems/src/timercancel.c cpukit/rtems/src/timercreate.c cpukit/rtems/src/timerdelete.c cpukit/rtems/src/timerfireafter.c cpukit/rtems/src/timerfirewhen.c cpukit/rtems/src/timerident.c cpukit/rtems/src/timerreset.c cpukit/sapi/Makefile.am cpukit/sapi/include/Makefile.am cpukit/sapi/include/confdefs.h cpukit/sapi/include/rtems/README cpukit/sapi/include/rtems/config.h cpukit/sapi/include/rtems/extension.h cpukit/sapi/include/rtems/fatal.h cpukit/sapi/include/rtems/init.h cpukit/sapi/include/rtems/io.h cpukit/sapi/include/rtems/mptables.h cpukit/sapi/include/rtems/sptables.h.in cpukit/sapi/inline/Makefile.am cpukit/sapi/inline/rtems/extension.inl cpukit/sapi/macros/Makefile.am cpukit/sapi/macros/rtems/extension.inl cpukit/sapi/src/Makefile.am cpukit/sapi/src/debug.c cpukit/sapi/src/exinit.c cpukit/sapi/src/extension.c cpukit/sapi/src/fatal.c cpukit/sapi/src/io.c cpukit/sapi/src/itronapi.c cpukit/sapi/src/posixapi.c cpukit/sapi/src/rtemsapi.c cpukit/score/Makefile.am cpukit/score/cpu/Makefile.am cpukit/score/cpu/a29k/Makefile.am cpukit/score/cpu/a29k/amd.ah cpukit/score/cpu/a29k/asm.h cpukit/score/cpu/a29k/cpu.c cpukit/score/cpu/a29k/cpu_asm.S cpukit/score/cpu/a29k/pswmacro.ah cpukit/score/cpu/a29k/register.ah cpukit/score/cpu/a29k/rtems/score/a29k.h cpukit/score/cpu/a29k/rtems/score/cpu.h cpukit/score/cpu/a29k/rtems/score/cpu_asm.h cpukit/score/cpu/a29k/rtems/score/types.h cpukit/score/cpu/a29k/sig.S cpukit/score/cpu/hppa1.1/Makefile.am cpukit/score/cpu/hppa1.1/cpu.c cpukit/score/cpu/hppa1.1/cpu_asm.S cpukit/score/cpu/hppa1.1/rtems/score/cpu.h cpukit/score/cpu/hppa1.1/rtems/score/cpu_asm.h cpukit/score/cpu/hppa1.1/rtems/score/hppa.h cpukit/score/cpu/hppa1.1/rtems/score/types.h cpukit/score/cpu/i386/Makefile.am cpukit/score/cpu/i386/asm.h cpukit/score/cpu/i386/cpu.c cpukit/score/cpu/i386/cpu_asm.S cpukit/score/cpu/i386/rtems/asm.h cpukit/score/cpu/i386/rtems/score/cpu.h cpukit/score/cpu/i386/rtems/score/i386.h cpukit/score/cpu/i386/rtems/score/types.h cpukit/score/cpu/i960/Makefile.am cpukit/score/cpu/i960/asm.h cpukit/score/cpu/i960/cpu.c cpukit/score/cpu/i960/cpu_asm.S cpukit/score/cpu/i960/rtems/score/cpu.h cpukit/score/cpu/i960/rtems/score/i960.h cpukit/score/cpu/i960/rtems/score/types.h cpukit/score/cpu/m68k/Makefile.am cpukit/score/cpu/m68k/asm.h cpukit/score/cpu/m68k/cpu.c cpukit/score/cpu/m68k/cpu_asm.S cpukit/score/cpu/m68k/m68302.h cpukit/score/cpu/m68k/m68360.h cpukit/score/cpu/m68k/memcpy.c cpukit/score/cpu/m68k/qsm.h cpukit/score/cpu/m68k/rtems/asm.h cpukit/score/cpu/m68k/rtems/m68k/m68302.h cpukit/score/cpu/m68k/rtems/m68k/m68360.h cpukit/score/cpu/m68k/rtems/m68k/qsm.h cpukit/score/cpu/m68k/rtems/m68k/sim.h cpukit/score/cpu/m68k/rtems/score/cpu.h cpukit/score/cpu/m68k/rtems/score/m68k.h cpukit/score/cpu/m68k/rtems/score/types.h cpukit/score/cpu/m68k/sim.h cpukit/score/cpu/mips/Makefile.am cpukit/score/cpu/mips/asm.h cpukit/score/cpu/mips/cpu.c cpukit/score/cpu/mips/cpu_asm.S cpukit/score/cpu/mips/idtcpu.h cpukit/score/cpu/mips/iregdef.h cpukit/score/cpu/mips/rtems/asm.h cpukit/score/cpu/mips/rtems/mips/idtcpu.h cpukit/score/cpu/mips/rtems/mips/iregdef.h cpukit/score/cpu/mips/rtems/score/cpu.h cpukit/score/cpu/mips/rtems/score/mips.h cpukit/score/cpu/mips/rtems/score/types.h cpukit/score/cpu/mips64orion/Makefile.am cpukit/score/cpu/mips64orion/asm.h cpukit/score/cpu/mips64orion/cpu.c cpukit/score/cpu/mips64orion/cpu_asm.S cpukit/score/cpu/mips64orion/cpu_asm.h cpukit/score/cpu/mips64orion/idtcpu.h cpukit/score/cpu/mips64orion/idtmon.h cpukit/score/cpu/mips64orion/iregdef.h cpukit/score/cpu/mips64orion/rtems/score/cpu.h cpukit/score/cpu/mips64orion/rtems/score/mips64orion.h cpukit/score/cpu/mips64orion/rtems/score/types.h cpukit/score/cpu/no_cpu/Makefile.am cpukit/score/cpu/no_cpu/asm.h cpukit/score/cpu/no_cpu/cpu.c cpukit/score/cpu/no_cpu/cpu_asm.c cpukit/score/cpu/no_cpu/rtems/asm.h cpukit/score/cpu/no_cpu/rtems/score/cpu.h cpukit/score/cpu/no_cpu/rtems/score/cpu_asm.h cpukit/score/cpu/no_cpu/rtems/score/no_cpu.h cpukit/score/cpu/no_cpu/rtems/score/types.h cpukit/score/cpu/powerpc/Makefile.am cpukit/score/cpu/powerpc/asm.h cpukit/score/cpu/powerpc/rtems/asm.h cpukit/score/cpu/powerpc/rtems/score/ppc.h cpukit/score/cpu/powerpc/rtems/score/types.h cpukit/score/cpu/sh/Makefile.am cpukit/score/cpu/sh/asm.h cpukit/score/cpu/sh/cpu.c cpukit/score/cpu/sh/rtems/asm.h cpukit/score/cpu/sh/rtems/score/cpu.h cpukit/score/cpu/sh/rtems/score/sh.h cpukit/score/cpu/sh/rtems/score/sh_io.h cpukit/score/cpu/sh/rtems/score/types.h cpukit/score/cpu/sparc/Makefile.am cpukit/score/cpu/sparc/README cpukit/score/cpu/sparc/asm.h cpukit/score/cpu/sparc/cpu.c cpukit/score/cpu/sparc/cpu_asm.S cpukit/score/cpu/sparc/rtems/asm.h cpukit/score/cpu/sparc/rtems/score/cpu.h cpukit/score/cpu/sparc/rtems/score/sparc.h cpukit/score/cpu/sparc/rtems/score/types.h cpukit/score/cpu/unix/Makefile.am cpukit/score/cpu/unix/cpu.c cpukit/score/cpu/unix/rtems/score/cpu.h cpukit/score/cpu/unix/rtems/score/types.h cpukit/score/cpu/unix/rtems/score/unix.h cpukit/score/include/Makefile.am cpukit/score/include/rtems/debug.h cpukit/score/include/rtems/score/address.h cpukit/score/include/rtems/score/apiext.h cpukit/score/include/rtems/score/bitfield.h cpukit/score/include/rtems/score/chain.h cpukit/score/include/rtems/score/context.h cpukit/score/include/rtems/score/copyrt.h cpukit/score/include/rtems/score/coremsg.h cpukit/score/include/rtems/score/coremutex.h cpukit/score/include/rtems/score/coresem.h cpukit/score/include/rtems/score/heap.h cpukit/score/include/rtems/score/interr.h cpukit/score/include/rtems/score/isr.h cpukit/score/include/rtems/score/mpci.h cpukit/score/include/rtems/score/mppkt.h cpukit/score/include/rtems/score/object.h cpukit/score/include/rtems/score/objectmp.h cpukit/score/include/rtems/score/priority.h cpukit/score/include/rtems/score/stack.h cpukit/score/include/rtems/score/states.h cpukit/score/include/rtems/score/sysstate.h cpukit/score/include/rtems/score/thread.h cpukit/score/include/rtems/score/threadmp.h cpukit/score/include/rtems/score/threadq.h cpukit/score/include/rtems/score/tod.h cpukit/score/include/rtems/score/tqdata.h cpukit/score/include/rtems/score/userext.h cpukit/score/include/rtems/score/watchdog.h cpukit/score/include/rtems/score/wkspace.h cpukit/score/include/rtems/system.h cpukit/score/inline/Makefile.am cpukit/score/inline/rtems/score/address.inl cpukit/score/inline/rtems/score/chain.inl cpukit/score/inline/rtems/score/coremsg.inl cpukit/score/inline/rtems/score/coremutex.inl cpukit/score/inline/rtems/score/coresem.inl cpukit/score/inline/rtems/score/heap.inl cpukit/score/inline/rtems/score/isr.inl cpukit/score/inline/rtems/score/mppkt.inl cpukit/score/inline/rtems/score/object.inl cpukit/score/inline/rtems/score/objectmp.inl cpukit/score/inline/rtems/score/priority.inl cpukit/score/inline/rtems/score/stack.inl cpukit/score/inline/rtems/score/states.inl cpukit/score/inline/rtems/score/sysstate.inl cpukit/score/inline/rtems/score/thread.inl cpukit/score/inline/rtems/score/threadmp.inl cpukit/score/inline/rtems/score/tod.inl cpukit/score/inline/rtems/score/tqdata.inl cpukit/score/inline/rtems/score/userext.inl cpukit/score/inline/rtems/score/watchdog.inl cpukit/score/inline/rtems/score/wkspace.inl cpukit/score/macros/Makefile.am cpukit/score/macros/README cpukit/score/macros/rtems/score/README cpukit/score/macros/rtems/score/address.inl cpukit/score/macros/rtems/score/chain.inl cpukit/score/macros/rtems/score/coremsg.inl cpukit/score/macros/rtems/score/coremutex.inl cpukit/score/macros/rtems/score/coresem.inl cpukit/score/macros/rtems/score/heap.inl cpukit/score/macros/rtems/score/isr.inl cpukit/score/macros/rtems/score/mppkt.inl cpukit/score/macros/rtems/score/object.inl cpukit/score/macros/rtems/score/objectmp.inl cpukit/score/macros/rtems/score/priority.inl cpukit/score/macros/rtems/score/stack.inl cpukit/score/macros/rtems/score/states.inl cpukit/score/macros/rtems/score/sysstate.inl cpukit/score/macros/rtems/score/thread.inl cpukit/score/macros/rtems/score/threadmp.inl cpukit/score/macros/rtems/score/tod.inl cpukit/score/macros/rtems/score/tqdata.inl cpukit/score/macros/rtems/score/userext.inl cpukit/score/macros/rtems/score/watchdog.inl cpukit/score/macros/rtems/score/wkspace.inl cpukit/score/src/Makefile.am cpukit/score/src/Unlimited.txt cpukit/score/src/apiext.c cpukit/score/src/chain.c cpukit/score/src/coremsg.c cpukit/score/src/coremsgbroadcast.c cpukit/score/src/coremsgclose.c cpukit/score/src/coremsgflush.c cpukit/score/src/coremsgflushsupp.c cpukit/score/src/coremsgflushwait.c cpukit/score/src/coremsginsert.c cpukit/score/src/coremsgseize.c cpukit/score/src/coremsgsubmit.c cpukit/score/src/coremutex.c cpukit/score/src/coremutexflush.c cpukit/score/src/coremutexseize.c cpukit/score/src/coremutexsurrender.c cpukit/score/src/coresem.c cpukit/score/src/coresemflush.c cpukit/score/src/coresemseize.c cpukit/score/src/coresemsurrender.c cpukit/score/src/coretod.c cpukit/score/src/coretodset.c cpukit/score/src/coretodtickle.c cpukit/score/src/coretodtoseconds.c cpukit/score/src/coretodvalidate.c cpukit/score/src/heap.c cpukit/score/src/heapallocate.c cpukit/score/src/heapextend.c cpukit/score/src/heapfree.c cpukit/score/src/heapsizeofuserarea.c cpukit/score/src/heapwalk.c cpukit/score/src/interr.c cpukit/score/src/isr.c cpukit/score/src/mpci.c cpukit/score/src/object.c cpukit/score/src/objectallocate.c cpukit/score/src/objectallocatebyindex.c cpukit/score/src/objectclearname.c cpukit/score/src/objectcomparenameraw.c cpukit/score/src/objectcomparenamestring.c cpukit/score/src/objectcopynameraw.c cpukit/score/src/objectcopynamestring.c cpukit/score/src/objectextendinformation.c cpukit/score/src/objectfree.c cpukit/score/src/objectget.c cpukit/score/src/objectgetbyindex.c cpukit/score/src/objectgetnext.c cpukit/score/src/objectinitializeinformation.c cpukit/score/src/objectmp.c cpukit/score/src/objectnametoid.c cpukit/score/src/objectshrinkinformation.c cpukit/score/src/thread.c cpukit/score/src/threadchangepriority.c cpukit/score/src/threadclearstate.c cpukit/score/src/threadclose.c cpukit/score/src/threadcreateidle.c cpukit/score/src/threaddelayended.c cpukit/score/src/threaddispatch.c cpukit/score/src/threadevaluatemode.c cpukit/score/src/threadget.c cpukit/score/src/threadhandler.c cpukit/score/src/threadidlebody.c cpukit/score/src/threadinitialize.c cpukit/score/src/threadloadenv.c cpukit/score/src/threadmp.c cpukit/score/src/threadq.c cpukit/score/src/threadqdequeue.c cpukit/score/src/threadqdequeuefifo.c cpukit/score/src/threadqdequeuepriority.c cpukit/score/src/threadqenqueue.c cpukit/score/src/threadqenqueuefifo.c cpukit/score/src/threadqenqueuepriority.c cpukit/score/src/threadqextract.c cpukit/score/src/threadqextractfifo.c cpukit/score/src/threadqextractpriority.c cpukit/score/src/threadqextractwithproxy.c cpukit/score/src/threadqfirst.c cpukit/score/src/threadqfirstfifo.c cpukit/score/src/threadqfirstpriority.c cpukit/score/src/threadqflush.c cpukit/score/src/threadqtimeout.c cpukit/score/src/threadready.c cpukit/score/src/threadreset.c cpukit/score/src/threadresettimeslice.c cpukit/score/src/threadrestart.c cpukit/score/src/threadresume.c cpukit/score/src/threadrotatequeue.c cpukit/score/src/threadsetpriority.c cpukit/score/src/threadsetstate.c cpukit/score/src/threadsettransient.c cpukit/score/src/threadstackallocate.c cpukit/score/src/threadstackfree.c cpukit/score/src/threadstart.c cpukit/score/src/threadstartmultitasking.c cpukit/score/src/threadsuspend.c cpukit/score/src/threadtickletimeslice.c cpukit/score/src/threadyieldprocessor.c cpukit/score/src/userext.c cpukit/score/src/watchdog.c cpukit/score/src/watchdogadjust.c cpukit/score/src/watchdoginsert.c cpukit/score/src/watchdogremove.c cpukit/score/src/watchdogtickle.c cpukit/score/src/wkspace.c cpukit/wrapup/Makefile.am cpukit/zlib/doc/rfc1950.txt cpukit/zlib/doc/rfc1951.txt cpukit/zlib/doc/rfc1952.txt doc/BAD.html doc/FAQ/FAQ.texi doc/FAQ/Makefile doc/FAQ/basic.t doc/FAQ/bsp.t doc/FAQ/concepts.t doc/FAQ/debug.t doc/FAQ/embeddedinfo.t doc/FAQ/endoftime.t doc/FAQ/entry doc/FAQ/freesw.t doc/FAQ/hwdebugaids.t doc/FAQ/projects.t doc/FAQ/tools.t doc/HELP.html doc/Make.config doc/Makefile doc/README doc/TODO doc/VERSION doc/ada_user/Makefile doc/ada_user/ada_user.texi doc/ada_user/example.texi doc/archgrey.gif doc/bsp_howto/Makefile doc/bsp_howto/adaintr.t doc/bsp_howto/analog.t doc/bsp_howto/bsp_howto.texi doc/bsp_howto/clock.t doc/bsp_howto/console.t doc/bsp_howto/discrete.t doc/bsp_howto/init.t doc/bsp_howto/intro.t doc/bsp_howto/linkcmds.t doc/bsp_howto/makefiles.t doc/bsp_howto/nvmem.t doc/bsp_howto/rtc.t doc/bsp_howto/shmsupp.t doc/bsp_howto/support.t doc/bsp_howto/target.t doc/bsp_howto/timer.t doc/common/cpright.texi doc/common/dvi.gif doc/common/oaronly.jpg doc/common/pdf.gif doc/common/pdf1.gif doc/common/ps.gif doc/common/setup.texi doc/common/timemac.texi doc/common/timetbl.t doc/common/timing.t doc/common/treedef.tex doc/common/up-arrow.gif doc/common/wksheets.t doc/develenv/Makefile doc/develenv/compile.texi doc/develenv/develenv.texi doc/develenv/direct.texi doc/develenv/intro.texi doc/develenv/sample.texi doc/develenv/utils.texi doc/do_docs doc/filesystem/Makefile doc/filesystem/filesystem.texi doc/filesystem/fsrequirements.t doc/filesystem/imfs.t doc/filesystem/init.t doc/filesystem/miniimfs.t doc/filesystem/mounting.t doc/filesystem/patheval.t doc/filesystem/preface.texi doc/filesystem/syscalls.t doc/filesystem/tftp.t doc/gnu_docs/Tool_Doc_Instructions doc/gnu_docs/gen_docs doc/gnu_docs/gnu_footer.html doc/gnu_docs/gnu_header.html doc/gnu_docs/index.html doc/gnu_docs/mk_install_dir doc/gnu_docs/refcard.html doc/gnu_docs/rtems_tools_index.html doc/index.html doc/itron3.0/Makefile doc/itron3.0/config.t doc/itron3.0/eventflags.t doc/itron3.0/fixedblock.t doc/itron3.0/gen_all doc/itron3.0/gen_section doc/itron3.0/gen_status_shell doc/itron3.0/interrupt.t doc/itron3.0/itron.texi doc/itron3.0/mailbox.t doc/itron3.0/memorypool.t doc/itron3.0/msgbuffer.t doc/itron3.0/network.t doc/itron3.0/preface.texi doc/itron3.0/rendezvous.t doc/itron3.0/semaphore.t doc/itron3.0/status.t doc/itron3.0/task.t doc/itron3.0/tasksync.t doc/itron3.0/time.t doc/networking/Makefile doc/networking/PCIreg.eps doc/networking/PCIreg.jpg doc/networking/PCIreg.pdf doc/networking/decdriver.t doc/networking/driver.t doc/networking/networkapp.t doc/networking/networkflow.eps doc/networking/networkflow.jpg doc/networking/networkflow.pdf doc/networking/networkflow.png doc/networking/networking.texi doc/networking/networktasks.t doc/networking/preface.texi doc/networking/recvbd.eps doc/networking/recvbd.jpg doc/networking/recvbd.pdf doc/networking/servers.t doc/networking/testing.t doc/new_chapters/Makefile doc/new_chapters/STATUS doc/new_chapters/TODO doc/new_chapters/adminiface.t doc/new_chapters/base.t doc/new_chapters/confspace.t doc/new_chapters/cpuuse.t doc/new_chapters/dumpcontrol.t doc/new_chapters/error.t doc/new_chapters/eventlog.t doc/new_chapters/gen_section doc/new_chapters/monitor.t doc/new_chapters/new_chapters.texi doc/new_chapters/rtmonuse.t doc/new_chapters/stackchk.t doc/oaronly.jpg doc/porting/Makefile doc/porting/codetuning.t doc/porting/cpuinit.t doc/porting/cpumodels.t doc/porting/developtools.t doc/porting/idlethread.t doc/porting/interrupts.t doc/porting/miscellaneous.t doc/porting/porting.texi doc/porting/preface.texi doc/porting/prioritybitmap.t doc/porting/sourcecode.t doc/porting/taskcontext.t doc/posix1003.1/Makefile doc/posix1003.1/ch01.t doc/posix1003.1/ch02.t doc/posix1003.1/ch03.t doc/posix1003.1/ch04.t doc/posix1003.1/ch05.t doc/posix1003.1/ch06.t doc/posix1003.1/ch07.t doc/posix1003.1/ch08.t doc/posix1003.1/ch09.t doc/posix1003.1/ch10.t doc/posix1003.1/ch11.t doc/posix1003.1/ch12.t doc/posix1003.1/ch13.t doc/posix1003.1/ch14.t doc/posix1003.1/ch15.t doc/posix1003.1/ch16.t doc/posix1003.1/ch17.t doc/posix1003.1/ch18.t doc/posix1003.1/posix1003_1.texi doc/posix1003.1/preface.texi doc/posix1003.1/summarize doc/posix_users/Makefile doc/posix_users/cancel.t doc/posix_users/clock.t doc/posix_users/cond.t doc/posix_users/cspecific.t doc/posix_users/device.t doc/posix_users/files.t doc/posix_users/gen_size_report doc/posix_users/io.t doc/posix_users/key.t doc/posix_users/libc.t doc/posix_users/libm.t doc/posix_users/memorymgmt.t doc/posix_users/message.t doc/posix_users/mutex.t doc/posix_users/posix_users.texi doc/posix_users/preface.texi doc/posix_users/procenv.t doc/posix_users/process.t doc/posix_users/sched.t doc/posix_users/semaphores.t doc/posix_users/signal.t doc/posix_users/status.t doc/posix_users/systemdb.t doc/posix_users/thread.t doc/posix_users/timer.t doc/relnotes/Makefile doc/relnotes/install.texi doc/relnotes/intro.texi doc/relnotes/probrep.texi doc/relnotes/relnotes.texi doc/relnotes/status.texi doc/rgdb_specs/Makefile doc/rgdb_specs/comm.t doc/rgdb_specs/conclusion.t doc/rgdb_specs/daemon.t doc/rgdb_specs/garde.eps doc/rgdb_specs/garde.pdf doc/rgdb_specs/gdbinternals.t doc/rgdb_specs/interfacing.t doc/rgdb_specs/intro.t doc/rgdb_specs/layers.eps doc/rgdb_specs/layers.jpg doc/rgdb_specs/layers.pdf doc/rgdb_specs/objectives.t doc/rgdb_specs/process.eps doc/rgdb_specs/process.jpg doc/rgdb_specs/process.pdf doc/rgdb_specs/revision.t doc/rgdb_specs/rgdb_specs.texi doc/rgdb_specs/seqbreak.eps doc/rgdb_specs/seqbreak.jpg doc/rgdb_specs/seqbreak.pdf doc/rgdb_specs/seqdetach.eps doc/rgdb_specs/seqdetach.jpg doc/rgdb_specs/seqdetach.pdf doc/rgdb_specs/seqinit.eps doc/rgdb_specs/seqinit.jpg doc/rgdb_specs/seqinit.pdf doc/rtems_footer.html doc/rtems_gdb/Makefile doc/rtems_gdb/commands.t doc/rtems_gdb/example.t doc/rtems_gdb/intro.t doc/rtems_gdb/rtems_gdb.texi doc/rtems_gdb/started.t doc/rtems_gdb/swarch.t doc/rtems_gdb/trouble.t doc/rtems_header.html doc/rtems_support.html doc/src2html/Makefile doc/src2html/RTEMS.test doc/started/Makefile doc/started/buildc.t doc/started/buildrt.t doc/started/gdb.t doc/started/intro.t doc/started/nt.t doc/started/pictures/bit_ada.jpg doc/started/pictures/bit_ada.vsd doc/started/pictures/bit_c.jpg doc/started/pictures/bit_c.vsd doc/started/pictures/scfile10.jpg doc/started/pictures/scfile10.vsd doc/started/pictures/scfile11.jpg doc/started/pictures/scfile11.vsd doc/started/pictures/scfile12.jpg doc/started/pictures/scfile12.vsd doc/started/pictures/scfile13.jpg doc/started/pictures/scfile13.vsd doc/started/pictures/scsfile1.jpg doc/started/pictures/scsfile1.vsd doc/started/pictures/scsfile2.jpg doc/started/pictures/scsfile2.vsd doc/started/pictures/scsfile3.jpg doc/started/pictures/scsfile3.vsd doc/started/pictures/scsfile4.jpg doc/started/pictures/scsfile4.vsd doc/started/pictures/scsfile5.jpg doc/started/pictures/scsfile5.vsd doc/started/pictures/scsfile6.jpg doc/started/pictures/scsfile6.vsd doc/started/pictures/scsfile7.jpg doc/started/pictures/scsfile7.vsd doc/started/pictures/scsfile8.jpg doc/started/pictures/scsfile8.vsd doc/started/pictures/scsfile9.jpg doc/started/pictures/scsfile9.vsd doc/started/pictures/sfile12c.jpg doc/started/pictures/sfile12c.vsd doc/started/require.t doc/started/sample.t doc/started/started.texi doc/started/versions.texi doc/started_ada/Makefile doc/started_ada/buildada.t doc/started_ada/buildrt.t doc/started_ada/gdb.t doc/started_ada/intro.t doc/started_ada/require.t doc/started_ada/sample.t doc/started_ada/started_ada.texi doc/started_ada/versions.texi doc/supplements/hppa1_1/Makefile doc/supplements/hppa1_1/SIMHPPA_TIMES doc/supplements/hppa1_1/bsp.t doc/supplements/hppa1_1/callconv.t doc/supplements/hppa1_1/cpumodel.t doc/supplements/hppa1_1/cputable.t doc/supplements/hppa1_1/fatalerr.t doc/supplements/hppa1_1/hppa1_1.texi doc/supplements/hppa1_1/intr_NOTIMES.t doc/supplements/hppa1_1/memmodel.t doc/supplements/hppa1_1/preface.texi doc/supplements/hppa1_1/timeSIMHPPA.t doc/supplements/i386/FORCE386_TIMES doc/supplements/i386/Makefile doc/supplements/i386/bsp.t doc/supplements/i386/callconv.t doc/supplements/i386/cpumodel.t doc/supplements/i386/cputable.t doc/supplements/i386/fatalerr.t doc/supplements/i386/i386.texi doc/supplements/i386/intr_NOTIMES.t doc/supplements/i386/memmodel.t doc/supplements/i386/preface.texi doc/supplements/i386/timeFORCE386.t doc/supplements/i960/CVME961_TIMES doc/supplements/i960/Makefile doc/supplements/i960/bsp.t doc/supplements/i960/callconv.t doc/supplements/i960/cpumodel.t doc/supplements/i960/cputable.t doc/supplements/i960/fatalerr.t doc/supplements/i960/i960.texi doc/supplements/i960/intr_NOTIMES.t doc/supplements/i960/memmodel.t doc/supplements/i960/preface.texi doc/supplements/i960/timeCVME961.t doc/supplements/m68k/MVME136_TIMES doc/supplements/m68k/Makefile doc/supplements/m68k/bsp.t doc/supplements/m68k/callconv.t doc/supplements/m68k/cpumodel.t doc/supplements/m68k/cputable.t doc/supplements/m68k/fatalerr.t doc/supplements/m68k/intr_NOTIMES.t doc/supplements/m68k/m68k.texi doc/supplements/m68k/memmodel.t doc/supplements/m68k/preface.texi doc/supplements/m68k/timeMVME136.t doc/supplements/m68k/timedata.t doc/supplements/mips64orion/BSP_TIMES doc/supplements/mips64orion/Makefile doc/supplements/mips64orion/bsp.t doc/supplements/mips64orion/callconv.t doc/supplements/mips64orion/cpumodel.t doc/supplements/mips64orion/cputable.t doc/supplements/mips64orion/fatalerr.t doc/supplements/mips64orion/intr_NOTIMES.t doc/supplements/mips64orion/memmodel.t doc/supplements/mips64orion/mips64orion.texi doc/supplements/mips64orion/preface.texi doc/supplements/mips64orion/timeBSP.t doc/supplements/powerpc/DMV177_TIMES doc/supplements/powerpc/Makefile doc/supplements/powerpc/PSIM_TIMES doc/supplements/powerpc/bsp.t doc/supplements/powerpc/callconv.t doc/supplements/powerpc/cpumodel.t doc/supplements/powerpc/cputable.t doc/supplements/powerpc/fatalerr.t doc/supplements/powerpc/intr_NOTIMES.t doc/supplements/powerpc/memmodel.t doc/supplements/powerpc/powerpc.texi doc/supplements/powerpc/preface.texi doc/supplements/powerpc/timeDMV177.t doc/supplements/powerpc/timePSIM.t doc/supplements/sh/BSP_TIMES doc/supplements/sh/Makefile doc/supplements/sh/bsp.t doc/supplements/sh/callconv.t doc/supplements/sh/cpumodel.t doc/supplements/sh/cputable.t doc/supplements/sh/fatalerr.t doc/supplements/sh/intr_NOTIMES.t doc/supplements/sh/memmodel.t doc/supplements/sh/preface.texi doc/supplements/sh/sh.texi doc/supplements/sh/timeBSP.t doc/supplements/sparc/ERC32_TIMES doc/supplements/sparc/Makefile doc/supplements/sparc/bsp.t doc/supplements/sparc/callconv.t doc/supplements/sparc/cpumodel.t doc/supplements/sparc/cputable.t doc/supplements/sparc/fatalerr.t doc/supplements/sparc/intr_NOTIMES.t doc/supplements/sparc/memmodel.t doc/supplements/sparc/preface.texi doc/supplements/sparc/sparc.texi doc/supplements/sparc/timeERC32.t doc/supplements/template/BSP_TIMES doc/supplements/template/Makefile doc/supplements/template/bsp.t doc/supplements/template/callconv.t doc/supplements/template/cpumodel.t doc/supplements/template/cputable.t doc/supplements/template/fatalerr.t doc/supplements/template/intr_NOTIMES.t doc/supplements/template/memmodel.t doc/supplements/template/preface.texi doc/supplements/template/template.texi doc/supplements/template/timeBSP.t doc/texinfo/texinfo.tex doc/tools/bmenu/Makefile doc/tools/bmenu/address.h doc/tools/bmenu/address.inl doc/tools/bmenu/base.h doc/tools/bmenu/chain.c doc/tools/bmenu/chain.h doc/tools/bmenu/chain.inl doc/tools/bmenu/isr.h doc/tools/bmenu/main.c doc/tools/bmenu/system.h doc/tools/pdl2texi/Makefile doc/tools/pdl2texi/address.h doc/tools/pdl2texi/address.inl doc/tools/pdl2texi/base.h doc/tools/pdl2texi/chain.c doc/tools/pdl2texi/chain.h doc/tools/pdl2texi/chain.inl doc/tools/pdl2texi/isr.h doc/tools/pdl2texi/main.c doc/tools/pdl2texi/s.d doc/tools/pdl2texi/sample.d doc/tools/pdl2texi/system.h doc/tools/pdl2texi/test_cases/enum.d doc/tools/pdl2texi/test_cases/enumbad.d doc/tools/pdl2texi/test_cases/table.d doc/tools/src2html/Makefile doc/tools/src2html1.4a/Ctags/C.c doc/tools/src2html1.4a/Ctags/Makefile doc/tools/src2html1.4a/Ctags/ctags.1 doc/tools/src2html1.4a/Ctags/ctags.c doc/tools/src2html1.4a/Ctags/ctags.h doc/tools/src2html1.4a/Ctags/fortran.c doc/tools/src2html1.4a/Ctags/lisp.c doc/tools/src2html1.4a/Ctags/print.c doc/tools/src2html1.4a/Ctags/strerror.c doc/tools/src2html1.4a/Ctags/tree.c doc/tools/src2html1.4a/Ctags/yacc.c doc/tools/src2html1.4a/Ctags/z.c doc/tools/src2html1.4a/FreeBSD/FreeBSD.hdr doc/tools/src2html1.4a/FreeBSD/FreeBSD.s2h doc/tools/src2html1.4a/FreeBSD/conf.hdr doc/tools/src2html1.4a/FreeBSD/ddb.hdr doc/tools/src2html1.4a/FreeBSD/i386.i386.hdr doc/tools/src2html1.4a/FreeBSD/i386.include.hdr doc/tools/src2html1.4a/FreeBSD/i386.isa.hdr doc/tools/src2html1.4a/FreeBSD/i386.stand.hdr doc/tools/src2html1.4a/FreeBSD/kern.hdr doc/tools/src2html1.4a/FreeBSD/net.hdr doc/tools/src2html1.4a/FreeBSD/netinet.hdr doc/tools/src2html1.4a/FreeBSD/nfs.hdr doc/tools/src2html1.4a/FreeBSD/stand.hdr doc/tools/src2html1.4a/FreeBSD/sys.hdr doc/tools/src2html1.4a/FreeBSD/ufs.hdr doc/tools/src2html1.4a/FreeBSD/vm.hdr doc/tools/src2html1.4a/Readme doc/tools/src2html1.4a/ctags-emacs/README doc/tools/src2html1.4a/ctags-emacs/ctags doc/tools/src2html1.4a/ctags-emacs/etags.c-ada-patch doc/tools/src2html1.4a/ctags-wr doc/tools/src2html1.4a/src2html doc/tools/src2html1.4a/src2html.1 doc/tools/src2html1.4a/src2html.cgi doc/tools/texi2www/Makefile doc/tools/texi2www/archive/texi2www-960103.tgz doc/tools/texi2www/dir-arrow.gif doc/tools/texi2www/missing-arrow.gif doc/tools/texi2www/next-arrow.gif doc/tools/texi2www/prev-arrow.gif doc/tools/texi2www/texi2dvi doc/tools/texi2www/texi2www doc/tools/texi2www/texi2www.texi doc/tools/texi2www/up-arrow.gif doc/tools/update doc/tools/word-replace doc/user/Makefile doc/user/bsp.t doc/user/c_user.texi doc/user/clock.t doc/user/concepts.t doc/user/conf.t doc/user/dirstat.texi doc/user/dpmem.t doc/user/event.t doc/user/example.texi doc/user/fatal.t doc/user/glossary.texi doc/user/init.t doc/user/intr.t doc/user/io.t doc/user/mp.t doc/user/msg.t doc/user/overview.t doc/user/part.t doc/user/preface.texi doc/user/region.t doc/user/rtemsarc.gif doc/user/rtemsarc.png doc/user/rtemspie.eps doc/user/rtemspie.gif doc/user/rtemspie.pdf doc/user/rtemspie.png doc/user/rtmon.t doc/user/schedule.t doc/user/sem.t doc/user/signal.t doc/user/states.eps doc/user/states.gif doc/user/states.pdf doc/user/states.png doc/user/task.t doc/user/timer.t doc/user/userext.t testsuites/Makefile.am testsuites/PROBLEMS testsuites/README testsuites/itrontests/Makefile.am testsuites/itrontests/README testsuites/itrontests/itronhello/Makefile.am testsuites/itrontests/itronhello/init.c testsuites/itrontests/itronhello/itronhello.doc testsuites/itrontests/itronhello/itronhello.scn testsuites/itrontests/itronhello/system.h testsuites/itrontests/itronmbf01/Makefile.am testsuites/itrontests/itronmbf01/init.c testsuites/itrontests/itronmbf01/itronmbf01.doc testsuites/itrontests/itronmbf01/itronmbf01.scn testsuites/itrontests/itronmbf01/system.h testsuites/itrontests/itronmbox01/Makefile.am testsuites/itrontests/itronmbox01/init.c testsuites/itrontests/itronmbox01/itronmbox01.doc testsuites/itrontests/itronmbox01/itronmbox01.scn testsuites/itrontests/itronmbox01/system.h testsuites/itrontests/itronsem01/Makefile.am testsuites/itrontests/itronsem01/init.c testsuites/itrontests/itronsem01/itronsem01.doc testsuites/itrontests/itronsem01/itronsem01.scn testsuites/itrontests/itronsem01/system.h testsuites/itrontests/itrontask01/Makefile.am testsuites/itrontests/itrontask01/init.c testsuites/itrontests/itrontask01/itrontask01.doc testsuites/itrontests/itrontask01/itrontask01.scn testsuites/itrontests/itrontask01/system.h testsuites/itrontests/itrontask01/task1.c testsuites/itrontests/itrontask02/Makefile.am testsuites/itrontests/itrontask02/dormant.c testsuites/itrontests/itrontask02/init.c testsuites/itrontests/itrontask02/itrontask02.doc testsuites/itrontests/itrontask02/itrontask02.scn testsuites/itrontests/itrontask02/system.h testsuites/itrontests/itrontask03/Makefile.am testsuites/itrontests/itrontask03/init.c testsuites/itrontests/itrontask03/itrontask03.doc testsuites/itrontests/itrontask03/itrontask03.scn testsuites/itrontests/itrontask03/preempt.c testsuites/itrontests/itrontask03/system.h testsuites/itrontests/itrontask03/task1.c testsuites/itrontests/itrontask03/task2.c testsuites/itrontests/itrontask03/task3.c testsuites/itrontests/itrontask04/Makefile.am testsuites/itrontests/itrontask04/init.c testsuites/itrontests/itrontask04/itrontask04.doc testsuites/itrontests/itrontask04/itrontask04.scn testsuites/itrontests/itrontask04/system.h testsuites/itrontests/itrontask04/task1.c testsuites/itrontests/itrontask04/task2.c testsuites/itrontests/itrontask04/task3.c testsuites/itrontests/itrontests.am testsuites/itrontests/itrontime01/Makefile.am testsuites/itrontests/itrontime01/init.c testsuites/itrontests/itrontime01/itrontime01.doc testsuites/itrontests/itrontime01/itrontime01.scn testsuites/itrontests/itrontime01/system.h testsuites/libtests/Makefile.am testsuites/libtests/README testsuites/libtests/cpuuse/Makefile.am testsuites/libtests/cpuuse/cpuuse.scn testsuites/libtests/cpuuse/init.c testsuites/libtests/cpuuse/system.h testsuites/libtests/cpuuse/task1.c testsuites/libtests/cpuuse/task2.c testsuites/libtests/cpuuse/task3.c testsuites/libtests/cpuuse/tswitch.c testsuites/libtests/libtests.am testsuites/libtests/malloctest/Makefile.am testsuites/libtests/malloctest/init.c testsuites/libtests/malloctest/system.h testsuites/libtests/malloctest/task1.c testsuites/libtests/monitor/Makefile.am testsuites/libtests/monitor/init.c testsuites/libtests/monitor/system.h testsuites/libtests/putenvtest/Makefile.am testsuites/libtests/putenvtest/init.c testsuites/libtests/rtems++/Init.cc testsuites/libtests/rtems++/Makefile.am testsuites/libtests/rtems++/System.h testsuites/libtests/rtems++/Task1.cc testsuites/libtests/rtems++/Task2.cc testsuites/libtests/rtems++/Task3.cc testsuites/libtests/rtems++/rtems++.doc testsuites/libtests/rtems++/rtems++.scn testsuites/libtests/rtmonuse/Makefile.am testsuites/libtests/rtmonuse/getall.c testsuites/libtests/rtmonuse/init.c testsuites/libtests/rtmonuse/rtmonuse.scn testsuites/libtests/rtmonuse/system.h testsuites/libtests/rtmonuse/task1.c testsuites/libtests/stackchk/Makefile.am testsuites/libtests/stackchk/blow.c testsuites/libtests/stackchk/init.c testsuites/libtests/stackchk/stackchk.scn testsuites/libtests/stackchk/system.h testsuites/libtests/stackchk/task1.c testsuites/libtests/termios/Makefile.am testsuites/libtests/termios/README testsuites/libtests/termios/init.c testsuites/mptests/Makefile.am testsuites/mptests/README testsuites/mptests/mp01/Makefile.am testsuites/mptests/mp01/init.c testsuites/mptests/mp01/node1/Makefile.am testsuites/mptests/mp01/node1/mp01.doc testsuites/mptests/mp01/node1/mp01.scn testsuites/mptests/mp01/node2/Makefile.am testsuites/mptests/mp01/node2/mp01.doc testsuites/mptests/mp01/node2/mp01.scn testsuites/mptests/mp01/system.h testsuites/mptests/mp01/task1.c testsuites/mptests/mp02/Makefile.am testsuites/mptests/mp02/init.c testsuites/mptests/mp02/node1/Makefile.am testsuites/mptests/mp02/node1/mp02.doc testsuites/mptests/mp02/node1/mp02.scn testsuites/mptests/mp02/node2/Makefile.am testsuites/mptests/mp02/node2/mp02.doc testsuites/mptests/mp02/node2/mp02.scn testsuites/mptests/mp02/system.h testsuites/mptests/mp02/task1.c testsuites/mptests/mp03/Makefile.am testsuites/mptests/mp03/delay.c testsuites/mptests/mp03/init.c testsuites/mptests/mp03/node1/Makefile.am testsuites/mptests/mp03/node1/mp03.doc testsuites/mptests/mp03/node1/mp03.scn testsuites/mptests/mp03/node2/Makefile.am testsuites/mptests/mp03/node2/mp03.doc testsuites/mptests/mp03/node2/mp03.scn testsuites/mptests/mp03/system.h testsuites/mptests/mp03/task1.c testsuites/mptests/mp04/Makefile.am testsuites/mptests/mp04/init.c testsuites/mptests/mp04/node1/Makefile.am testsuites/mptests/mp04/node1/mp04.doc testsuites/mptests/mp04/node1/mp04.scn testsuites/mptests/mp04/node2/Makefile.am testsuites/mptests/mp04/node2/mp04.doc testsuites/mptests/mp04/node2/mp04.scn testsuites/mptests/mp04/system.h testsuites/mptests/mp04/task1.c testsuites/mptests/mp05/Makefile.am testsuites/mptests/mp05/asr.c testsuites/mptests/mp05/init.c testsuites/mptests/mp05/node1/Makefile.am testsuites/mptests/mp05/node1/mp05.doc testsuites/mptests/mp05/node1/mp05.scn testsuites/mptests/mp05/node2/Makefile.am testsuites/mptests/mp05/node2/mp05.doc testsuites/mptests/mp05/node2/mp05.scn testsuites/mptests/mp05/system.h testsuites/mptests/mp05/task1.c testsuites/mptests/mp06/Makefile.am testsuites/mptests/mp06/init.c testsuites/mptests/mp06/node1/Makefile.am testsuites/mptests/mp06/node1/mp06.doc testsuites/mptests/mp06/node1/mp06.scn testsuites/mptests/mp06/node2/Makefile.am testsuites/mptests/mp06/node2/mp06.doc testsuites/mptests/mp06/node2/mp06.scn testsuites/mptests/mp06/system.h testsuites/mptests/mp06/task1.c testsuites/mptests/mp07/Makefile.am testsuites/mptests/mp07/init.c testsuites/mptests/mp07/node1/Makefile.am testsuites/mptests/mp07/node1/mp07.doc testsuites/mptests/mp07/node1/mp07.scn testsuites/mptests/mp07/node2/Makefile.am testsuites/mptests/mp07/node2/mp07.doc testsuites/mptests/mp07/node2/mp07.scn testsuites/mptests/mp07/system.h testsuites/mptests/mp07/task1.c testsuites/mptests/mp08/Makefile.am testsuites/mptests/mp08/init.c testsuites/mptests/mp08/node1/Makefile.am testsuites/mptests/mp08/node1/mp08.doc testsuites/mptests/mp08/node1/mp08.scn testsuites/mptests/mp08/node2/Makefile.am testsuites/mptests/mp08/node2/mp08.doc testsuites/mptests/mp08/node2/mp08.scn testsuites/mptests/mp08/system.h testsuites/mptests/mp08/task1.c testsuites/mptests/mp09/Makefile.am testsuites/mptests/mp09/init.c testsuites/mptests/mp09/node1/Makefile.am testsuites/mptests/mp09/node1/mp09.doc testsuites/mptests/mp09/node1/mp09.scn testsuites/mptests/mp09/node2/Makefile.am testsuites/mptests/mp09/node2/mp09.doc testsuites/mptests/mp09/node2/mp09.scn testsuites/mptests/mp09/recvmsg.c testsuites/mptests/mp09/sendmsg.c testsuites/mptests/mp09/system.h testsuites/mptests/mp09/task1.c testsuites/mptests/mp10/Makefile.am testsuites/mptests/mp10/init.c testsuites/mptests/mp10/node1/Makefile.am testsuites/mptests/mp10/node1/mp10.doc testsuites/mptests/mp10/node1/mp10.scn testsuites/mptests/mp10/node2/Makefile.am testsuites/mptests/mp10/node2/mp10.doc testsuites/mptests/mp10/node2/mp10.scn testsuites/mptests/mp10/system.h testsuites/mptests/mp10/task1.c testsuites/mptests/mp10/task2.c testsuites/mptests/mp10/task3.c testsuites/mptests/mp11/Makefile.am testsuites/mptests/mp11/init.c testsuites/mptests/mp11/node1/Makefile.am testsuites/mptests/mp11/node1/mp11.doc testsuites/mptests/mp11/node1/mp11.scn testsuites/mptests/mp11/node2/Makefile.am testsuites/mptests/mp11/node2/mp11.doc testsuites/mptests/mp11/node2/mp11.scn testsuites/mptests/mp11/system.h testsuites/mptests/mp12/Makefile.am testsuites/mptests/mp12/init.c testsuites/mptests/mp12/node1/Makefile.am testsuites/mptests/mp12/node1/mp12.doc testsuites/mptests/mp12/node1/mp12.scn testsuites/mptests/mp12/node2/Makefile.am testsuites/mptests/mp12/node2/mp12.doc testsuites/mptests/mp12/node2/mp12.scn testsuites/mptests/mp12/system.h testsuites/mptests/mp13/Makefile.am testsuites/mptests/mp13/init.c testsuites/mptests/mp13/node1/Makefile.am testsuites/mptests/mp13/node1/mp13.doc testsuites/mptests/mp13/node1/mp13.scn testsuites/mptests/mp13/node2/Makefile.am testsuites/mptests/mp13/node2/mp13.doc testsuites/mptests/mp13/node2/mp13.scn testsuites/mptests/mp13/system.h testsuites/mptests/mp13/task1.c testsuites/mptests/mp13/task2.c testsuites/mptests/mp14/Makefile.am testsuites/mptests/mp14/delay.c testsuites/mptests/mp14/evtask1.c testsuites/mptests/mp14/evtmtask.c testsuites/mptests/mp14/exit.c testsuites/mptests/mp14/init.c testsuites/mptests/mp14/msgtask1.c testsuites/mptests/mp14/node1/Makefile.am testsuites/mptests/mp14/node1/mp14.doc testsuites/mptests/mp14/node1/mp14.scn testsuites/mptests/mp14/node2/Makefile.am testsuites/mptests/mp14/node2/mp14.doc testsuites/mptests/mp14/node2/mp14.scn testsuites/mptests/mp14/pttask1.c testsuites/mptests/mp14/smtask1.c testsuites/mptests/mp14/system.h testsuites/mptests/mptests.am testsuites/psxtests/Makefile.am testsuites/psxtests/include/Makefile.am testsuites/psxtests/include/pmacros.h testsuites/psxtests/psx01/Makefile.am testsuites/psxtests/psx01/init.c testsuites/psxtests/psx01/psx01.scn testsuites/psxtests/psx01/system.h testsuites/psxtests/psx01/task.c testsuites/psxtests/psx02/Makefile.am testsuites/psxtests/psx02/init.c testsuites/psxtests/psx02/psx02.scn testsuites/psxtests/psx02/system.h testsuites/psxtests/psx02/task.c testsuites/psxtests/psx03/Makefile.am testsuites/psxtests/psx03/init.c testsuites/psxtests/psx03/psx03.scn testsuites/psxtests/psx03/system.h testsuites/psxtests/psx03/task.c testsuites/psxtests/psx04/Makefile.am testsuites/psxtests/psx04/init.c testsuites/psxtests/psx04/psx04.scn testsuites/psxtests/psx04/system.h testsuites/psxtests/psx04/task1.c testsuites/psxtests/psx04/task2.c testsuites/psxtests/psx04/task3.c testsuites/psxtests/psx05/Makefile.am testsuites/psxtests/psx05/init.c testsuites/psxtests/psx05/psx05.scn testsuites/psxtests/psx05/system.h testsuites/psxtests/psx05/task.c testsuites/psxtests/psx05/task2.c testsuites/psxtests/psx05/task3.c testsuites/psxtests/psx06/Makefile.am testsuites/psxtests/psx06/init.c testsuites/psxtests/psx06/psx06.scn testsuites/psxtests/psx06/system.h testsuites/psxtests/psx06/task.c testsuites/psxtests/psx06/task2.c testsuites/psxtests/psx07/Makefile.am testsuites/psxtests/psx07/init.c testsuites/psxtests/psx07/psx07.scn testsuites/psxtests/psx07/system.h testsuites/psxtests/psx07/task.c testsuites/psxtests/psx08/Makefile.am testsuites/psxtests/psx08/init.c testsuites/psxtests/psx08/psx08.scn testsuites/psxtests/psx08/system.h testsuites/psxtests/psx08/task1.c testsuites/psxtests/psx08/task2.c testsuites/psxtests/psx08/task3.c testsuites/psxtests/psx09/Makefile.am testsuites/psxtests/psx09/init.c testsuites/psxtests/psx09/psx09.scn testsuites/psxtests/psx09/system.h testsuites/psxtests/psx10/Makefile.am testsuites/psxtests/psx10/init.c testsuites/psxtests/psx10/psx10.scn testsuites/psxtests/psx10/system.h testsuites/psxtests/psx10/task.c testsuites/psxtests/psx10/task2.c testsuites/psxtests/psx10/task3.c testsuites/psxtests/psx11/Makefile.am testsuites/psxtests/psx11/init.c testsuites/psxtests/psx11/psx11.scn testsuites/psxtests/psx11/system.h testsuites/psxtests/psx11/task.c testsuites/psxtests/psx12/Makefile.am testsuites/psxtests/psx12/init.c testsuites/psxtests/psx12/psx12.scn testsuites/psxtests/psx12/system.h testsuites/psxtests/psx12/task.c testsuites/psxtests/psx13/Makefile.am testsuites/psxtests/psx13/main.c testsuites/psxtests/psx13/psx13.scn testsuites/psxtests/psx13/test.c testsuites/psxtests/psxcancel/Makefile.am testsuites/psxtests/psxcancel/init.c testsuites/psxtests/psxcancel/psxcancel.scn testsuites/psxtests/psxfile01/Makefile.am testsuites/psxtests/psxfile01/main.c testsuites/psxtests/psxfile01/psxfile01.scn testsuites/psxtests/psxfile01/test.c testsuites/psxtests/psxfile01/test_cat.c testsuites/psxtests/psxfile01/test_extend.c testsuites/psxtests/psxfile01/test_write.c testsuites/psxtests/psxhdrs/Makefile.am testsuites/psxtests/psxhdrs/clock01.c testsuites/psxtests/psxhdrs/clock02.c testsuites/psxtests/psxhdrs/clock03.c testsuites/psxtests/psxhdrs/clock04.c testsuites/psxtests/psxhdrs/clock05.c testsuites/psxtests/psxhdrs/clock06.c testsuites/psxtests/psxhdrs/cond01.c testsuites/psxtests/psxhdrs/cond02.c testsuites/psxtests/psxhdrs/cond03.c testsuites/psxtests/psxhdrs/cond04.c testsuites/psxtests/psxhdrs/cond05.c testsuites/psxtests/psxhdrs/cond06.c testsuites/psxtests/psxhdrs/cond07.c testsuites/psxtests/psxhdrs/cond08.c testsuites/psxtests/psxhdrs/cond09.c testsuites/psxtests/psxhdrs/cond10.c testsuites/psxtests/psxhdrs/key01.c testsuites/psxtests/psxhdrs/key02.c testsuites/psxtests/psxhdrs/key03.c testsuites/psxtests/psxhdrs/key04.c testsuites/psxtests/psxhdrs/mutex01.c testsuites/psxtests/psxhdrs/mutex02.c testsuites/psxtests/psxhdrs/mutex03.c testsuites/psxtests/psxhdrs/mutex04.c testsuites/psxtests/psxhdrs/mutex05.c testsuites/psxtests/psxhdrs/mutex06.c testsuites/psxtests/psxhdrs/mutex07.c testsuites/psxtests/psxhdrs/mutex08.c testsuites/psxtests/psxhdrs/mutex09.c testsuites/psxtests/psxhdrs/mutex10.c testsuites/psxtests/psxhdrs/mutex11.c testsuites/psxtests/psxhdrs/mutex12.c testsuites/psxtests/psxhdrs/mutex13.c testsuites/psxtests/psxhdrs/mutex14.c testsuites/psxtests/psxhdrs/mutex15.c testsuites/psxtests/psxhdrs/mutex16.c testsuites/psxtests/psxhdrs/proc01.c testsuites/psxtests/psxhdrs/proc02.c testsuites/psxtests/psxhdrs/proc03.c testsuites/psxtests/psxhdrs/proc04.c testsuites/psxtests/psxhdrs/proc05.c testsuites/psxtests/psxhdrs/proc06.c testsuites/psxtests/psxhdrs/proc07.c testsuites/psxtests/psxhdrs/proc08.c testsuites/psxtests/psxhdrs/proc09.c testsuites/psxtests/psxhdrs/proc10.c testsuites/psxtests/psxhdrs/proc11.c testsuites/psxtests/psxhdrs/proc12.c testsuites/psxtests/psxhdrs/proc13.c testsuites/psxtests/psxhdrs/proc14.c testsuites/psxtests/psxhdrs/pthread01.c testsuites/psxtests/psxhdrs/pthread02.c testsuites/psxtests/psxhdrs/pthread03.c testsuites/psxtests/psxhdrs/pthread04.c testsuites/psxtests/psxhdrs/pthread05.c testsuites/psxtests/psxhdrs/pthread06.c testsuites/psxtests/psxhdrs/pthread07.c testsuites/psxtests/psxhdrs/pthread08.c testsuites/psxtests/psxhdrs/pthread09.c testsuites/psxtests/psxhdrs/pthread10.c testsuites/psxtests/psxhdrs/pthread11.c testsuites/psxtests/psxhdrs/pthread12.c testsuites/psxtests/psxhdrs/pthread13.c testsuites/psxtests/psxhdrs/pthread14.c testsuites/psxtests/psxhdrs/pthread15.c testsuites/psxtests/psxhdrs/pthread16.c testsuites/psxtests/psxhdrs/pthread17.c testsuites/psxtests/psxhdrs/pthread18.c testsuites/psxtests/psxhdrs/pthread19.c testsuites/psxtests/psxhdrs/pthread20.c testsuites/psxtests/psxhdrs/pthread21.c testsuites/psxtests/psxhdrs/pthread22.c testsuites/psxtests/psxhdrs/pthread23.c testsuites/psxtests/psxhdrs/pthread24.c testsuites/psxtests/psxhdrs/pthread25.c testsuites/psxtests/psxhdrs/pthread26.c testsuites/psxtests/psxhdrs/pthread27.c testsuites/psxtests/psxhdrs/pthread28.c testsuites/psxtests/psxhdrs/pthread29.c testsuites/psxtests/psxhdrs/pthread30.c testsuites/psxtests/psxhdrs/pthread31.c testsuites/psxtests/psxhdrs/pthread32.c testsuites/psxtests/psxhdrs/pthread33.c testsuites/psxtests/psxhdrs/pthread34.c testsuites/psxtests/psxhdrs/pthread35.c testsuites/psxtests/psxhdrs/pthread36.c testsuites/psxtests/psxhdrs/sched01.c testsuites/psxtests/psxhdrs/sched02.c testsuites/psxtests/psxhdrs/sched03.c testsuites/psxtests/psxhdrs/sched04.c testsuites/psxtests/psxhdrs/sched05.c testsuites/psxtests/psxhdrs/sched06.c testsuites/psxtests/psxhdrs/sched07.c testsuites/psxtests/psxhdrs/sched08.c testsuites/psxtests/psxhdrs/signal01.c testsuites/psxtests/psxhdrs/signal02.c testsuites/psxtests/psxhdrs/signal03.c testsuites/psxtests/psxhdrs/signal04.c testsuites/psxtests/psxhdrs/signal05.c testsuites/psxtests/psxhdrs/signal06.c testsuites/psxtests/psxhdrs/signal07.c testsuites/psxtests/psxhdrs/signal08.c testsuites/psxtests/psxhdrs/signal09.c testsuites/psxtests/psxhdrs/signal10.c testsuites/psxtests/psxhdrs/signal11.c testsuites/psxtests/psxhdrs/signal12.c testsuites/psxtests/psxhdrs/signal13.c testsuites/psxtests/psxhdrs/signal14.c testsuites/psxtests/psxhdrs/signal15.c testsuites/psxtests/psxhdrs/signal16.c testsuites/psxtests/psxhdrs/signal17.c testsuites/psxtests/psxhdrs/signal18.c testsuites/psxtests/psxhdrs/signal19.c testsuites/psxtests/psxhdrs/signal20.c testsuites/psxtests/psxhdrs/signal21.c testsuites/psxtests/psxhdrs/signal22.c testsuites/psxtests/psxhdrs/time01.c testsuites/psxtests/psxhdrs/time02.c testsuites/psxtests/psxhdrs/time03.c testsuites/psxtests/psxhdrs/time04.c testsuites/psxtests/psxhdrs/time05.c testsuites/psxtests/psxhdrs/time06.c testsuites/psxtests/psxhdrs/time07.c testsuites/psxtests/psxhdrs/time08.c testsuites/psxtests/psxhdrs/time09.c testsuites/psxtests/psxhdrs/time10.c testsuites/psxtests/psxhdrs/time11.c testsuites/psxtests/psxhdrs/time12.c testsuites/psxtests/psxhdrs/time13.c testsuites/psxtests/psxhdrs/timer01.c testsuites/psxtests/psxhdrs/timer02.c testsuites/psxtests/psxhdrs/timer03.c testsuites/psxtests/psxhdrs/timer04.c testsuites/psxtests/psxhdrs/timer05.c testsuites/psxtests/psxhdrs/timer06.c testsuites/psxtests/psxmount/Makefile.am testsuites/psxtests/psxmount/main.c testsuites/psxtests/psxmount/psxmount.scn testsuites/psxtests/psxmount/test.c testsuites/psxtests/psxmsgq01/Makefile.am testsuites/psxtests/psxmsgq01/init.c testsuites/psxtests/psxmsgq01/psxmsgq01.scn testsuites/psxtests/psxmsgq01/system.h testsuites/psxtests/psxreaddir/Makefile.am testsuites/psxtests/psxreaddir/main.c testsuites/psxtests/psxreaddir/psxreaddir.scn testsuites/psxtests/psxreaddir/test.c testsuites/psxtests/psxsem01/Makefile.am testsuites/psxtests/psxsem01/init.c testsuites/psxtests/psxsem01/psxsem01.scn testsuites/psxtests/psxsem01/system.h testsuites/psxtests/psxstat/Makefile.am testsuites/psxtests/psxstat/main.c testsuites/psxtests/psxstat/psxstat.scn testsuites/psxtests/psxstat/test.c testsuites/psxtests/psxtests.am testsuites/psxtests/psxtime/Makefile.am testsuites/psxtests/psxtime/main.c testsuites/psxtests/psxtime/psxtime.scn testsuites/psxtests/psxtime/test.c testsuites/psxtests/psxtimer/Makefile.am testsuites/psxtests/psxtimer/psxtimer.c testsuites/psxtests/psxtimer/psxtimer.scn testsuites/psxtests/psxtimer/system.h testsuites/samples/Makefile.am testsuites/samples/README testsuites/samples/base_mp/Makefile.am testsuites/samples/base_mp/apptask.c testsuites/samples/base_mp/init.c testsuites/samples/base_mp/node1/Makefile.am testsuites/samples/base_mp/node1/base_mp.doc testsuites/samples/base_mp/node1/base_mp.scn testsuites/samples/base_mp/node2/Makefile.am testsuites/samples/base_mp/node2/base_mp.doc testsuites/samples/base_mp/node2/base_mp.scn testsuites/samples/base_mp/system.h testsuites/samples/base_sp/Makefile.am testsuites/samples/base_sp/apptask.c testsuites/samples/base_sp/base_sp.doc testsuites/samples/base_sp/base_sp.scn testsuites/samples/base_sp/init.c testsuites/samples/base_sp/system.h testsuites/samples/cdtest/Makefile.am testsuites/samples/cdtest/cdtest.scn testsuites/samples/cdtest/init.c testsuites/samples/cdtest/main.cc testsuites/samples/cdtest/system.h testsuites/samples/hello/Makefile.am testsuites/samples/hello/hello.doc testsuites/samples/hello/hello.scn testsuites/samples/hello/init.c testsuites/samples/hello/system.h testsuites/samples/minimum/Makefile.am testsuites/samples/minimum/init.c testsuites/samples/minimum/minimum.doc testsuites/samples/minimum/minimum.scn testsuites/samples/paranoia/Makefile.am testsuites/samples/paranoia/init.c testsuites/samples/paranoia/paranoia.c testsuites/samples/paranoia/paranoia.doc testsuites/samples/paranoia/system.h testsuites/samples/sample.am testsuites/samples/ticker/Makefile.am testsuites/samples/ticker/init.c testsuites/samples/ticker/system.h testsuites/samples/ticker/tasks.c testsuites/samples/ticker/ticker.doc testsuites/samples/ticker/ticker.scn testsuites/samples/unlimited/Makefile.am testsuites/samples/unlimited/init.c testsuites/samples/unlimited/system.h testsuites/samples/unlimited/test1.c testsuites/samples/unlimited/test2.c testsuites/samples/unlimited/test3.c testsuites/samples/unlimited/unlimited.doc testsuites/samples/unlimited/unlimited.scn testsuites/sptests/Makefile.am testsuites/sptests/README testsuites/sptests/sp01/Makefile.am testsuites/sptests/sp01/init.c testsuites/sptests/sp01/sp01.doc testsuites/sptests/sp01/sp01.scn testsuites/sptests/sp01/system.h testsuites/sptests/sp01/task1.c testsuites/sptests/sp02/Makefile.am testsuites/sptests/sp02/init.c testsuites/sptests/sp02/preempt.c testsuites/sptests/sp02/sp02.doc testsuites/sptests/sp02/sp02.scn testsuites/sptests/sp02/system.h testsuites/sptests/sp02/task1.c testsuites/sptests/sp02/task2.c testsuites/sptests/sp02/task3.c testsuites/sptests/sp03/Makefile.am testsuites/sptests/sp03/init.c testsuites/sptests/sp03/sp03.doc testsuites/sptests/sp03/sp03.scn testsuites/sptests/sp03/system.h testsuites/sptests/sp03/task1.c testsuites/sptests/sp03/task2.c testsuites/sptests/sp04/Makefile.am testsuites/sptests/sp04/init.c testsuites/sptests/sp04/sp04.doc testsuites/sptests/sp04/sp04.scn testsuites/sptests/sp04/system.h testsuites/sptests/sp04/task1.c testsuites/sptests/sp04/task2.c testsuites/sptests/sp04/task3.c testsuites/sptests/sp04/tswitch.c testsuites/sptests/sp05/Makefile.am testsuites/sptests/sp05/init.c testsuites/sptests/sp05/sp05.doc testsuites/sptests/sp05/sp05.scn testsuites/sptests/sp05/system.h testsuites/sptests/sp05/task1.c testsuites/sptests/sp05/task2.c testsuites/sptests/sp05/task3.c testsuites/sptests/sp06/Makefile.am testsuites/sptests/sp06/init.c testsuites/sptests/sp06/sp06.doc testsuites/sptests/sp06/sp06.scn testsuites/sptests/sp06/system.h testsuites/sptests/sp06/task1.c testsuites/sptests/sp06/task2.c testsuites/sptests/sp06/task3.c testsuites/sptests/sp07/Makefile.am testsuites/sptests/sp07/init.c testsuites/sptests/sp07/sp07.doc testsuites/sptests/sp07/sp07.scn testsuites/sptests/sp07/system.h testsuites/sptests/sp07/task1.c testsuites/sptests/sp07/task2.c testsuites/sptests/sp07/task3.c testsuites/sptests/sp07/task4.c testsuites/sptests/sp07/taskexit.c testsuites/sptests/sp07/tcreate.c testsuites/sptests/sp07/tdelete.c testsuites/sptests/sp07/trestart.c testsuites/sptests/sp07/tstart.c testsuites/sptests/sp08/Makefile.am testsuites/sptests/sp08/init.c testsuites/sptests/sp08/sp08.doc testsuites/sptests/sp08/sp08.scn testsuites/sptests/sp08/system.h testsuites/sptests/sp08/task1.c testsuites/sptests/sp09/Makefile.am testsuites/sptests/sp09/delay.c testsuites/sptests/sp09/init.c testsuites/sptests/sp09/isr.c testsuites/sptests/sp09/screen01.c testsuites/sptests/sp09/screen02.c testsuites/sptests/sp09/screen03.c testsuites/sptests/sp09/screen04.c testsuites/sptests/sp09/screen05.c testsuites/sptests/sp09/screen06.c testsuites/sptests/sp09/screen07.c testsuites/sptests/sp09/screen08.c testsuites/sptests/sp09/screen09.c testsuites/sptests/sp09/screen10.c testsuites/sptests/sp09/screen11.c testsuites/sptests/sp09/screen12.c testsuites/sptests/sp09/screen13.c testsuites/sptests/sp09/screen14.c testsuites/sptests/sp09/sp09.doc testsuites/sptests/sp09/sp09.scn testsuites/sptests/sp09/system.h testsuites/sptests/sp09/task1.c testsuites/sptests/sp09/task2.c testsuites/sptests/sp09/task3.c testsuites/sptests/sp09/task4.c testsuites/sptests/sp11/Makefile.am testsuites/sptests/sp11/init.c testsuites/sptests/sp11/sp11.doc testsuites/sptests/sp11/sp11.scn testsuites/sptests/sp11/system.h testsuites/sptests/sp11/task1.c testsuites/sptests/sp11/task2.c testsuites/sptests/sp11/timer.c testsuites/sptests/sp12/Makefile.am testsuites/sptests/sp12/init.c testsuites/sptests/sp12/pridrv.c testsuites/sptests/sp12/pritask.c testsuites/sptests/sp12/sp12.doc testsuites/sptests/sp12/sp12.scn testsuites/sptests/sp12/system.h testsuites/sptests/sp12/task1.c testsuites/sptests/sp12/task2.c testsuites/sptests/sp12/task3.c testsuites/sptests/sp12/task4.c testsuites/sptests/sp12/task5.c testsuites/sptests/sp13/Makefile.am testsuites/sptests/sp13/fillbuff.c testsuites/sptests/sp13/init.c testsuites/sptests/sp13/putbuff.c testsuites/sptests/sp13/sp13.doc testsuites/sptests/sp13/sp13.scn testsuites/sptests/sp13/system.h testsuites/sptests/sp13/task1.c testsuites/sptests/sp13/task2.c testsuites/sptests/sp13/task3.c testsuites/sptests/sp14/Makefile.am testsuites/sptests/sp14/asr.c testsuites/sptests/sp14/init.c testsuites/sptests/sp14/sp14.doc testsuites/sptests/sp14/sp14.scn testsuites/sptests/sp14/system.h testsuites/sptests/sp14/task1.c testsuites/sptests/sp14/task2.c testsuites/sptests/sp15/Makefile.am testsuites/sptests/sp15/init.c testsuites/sptests/sp15/sp15.doc testsuites/sptests/sp15/sp15.scn testsuites/sptests/sp15/system.h testsuites/sptests/sp15/task1.c testsuites/sptests/sp16/Makefile.am testsuites/sptests/sp16/init.c testsuites/sptests/sp16/sp16.doc testsuites/sptests/sp16/sp16.scn testsuites/sptests/sp16/system.h testsuites/sptests/sp16/task1.c testsuites/sptests/sp16/task2.c testsuites/sptests/sp16/task3.c testsuites/sptests/sp16/task4.c testsuites/sptests/sp16/task5.c testsuites/sptests/sp17/Makefile.am testsuites/sptests/sp17/asr.c testsuites/sptests/sp17/init.c testsuites/sptests/sp17/sp17.doc testsuites/sptests/sp17/sp17.scn testsuites/sptests/sp17/system.h testsuites/sptests/sp17/task1.c testsuites/sptests/sp17/task2.c testsuites/sptests/sp19/Makefile.am testsuites/sptests/sp19/first.c testsuites/sptests/sp19/fptask.c testsuites/sptests/sp19/fptest.h testsuites/sptests/sp19/init.c testsuites/sptests/sp19/inttest.h testsuites/sptests/sp19/sp19.doc testsuites/sptests/sp19/sp19.scn testsuites/sptests/sp19/system.h testsuites/sptests/sp19/task1.c testsuites/sptests/sp20/Makefile.am testsuites/sptests/sp20/getall.c testsuites/sptests/sp20/init.c testsuites/sptests/sp20/sp20.doc testsuites/sptests/sp20/sp20.scn testsuites/sptests/sp20/system.h testsuites/sptests/sp20/task1.c testsuites/sptests/sp21/Makefile.am testsuites/sptests/sp21/init.c testsuites/sptests/sp21/sp21.doc testsuites/sptests/sp21/sp21.scn testsuites/sptests/sp21/system.h testsuites/sptests/sp21/task1.c testsuites/sptests/sp22/Makefile.am testsuites/sptests/sp22/delay.c testsuites/sptests/sp22/init.c testsuites/sptests/sp22/prtime.c testsuites/sptests/sp22/sp22.doc testsuites/sptests/sp22/sp22.scn testsuites/sptests/sp22/system.h testsuites/sptests/sp22/task1.c testsuites/sptests/sp23/Makefile.am testsuites/sptests/sp23/init.c testsuites/sptests/sp23/sp23.doc testsuites/sptests/sp23/sp23.scn testsuites/sptests/sp23/system.h testsuites/sptests/sp23/task1.c testsuites/sptests/sp24/Makefile.am testsuites/sptests/sp24/init.c testsuites/sptests/sp24/resume.c testsuites/sptests/sp24/sp24.doc testsuites/sptests/sp24/sp24.scn testsuites/sptests/sp24/system.h testsuites/sptests/sp24/task1.c testsuites/sptests/sp25/Makefile.am testsuites/sptests/sp25/init.c testsuites/sptests/sp25/sp25.doc testsuites/sptests/sp25/sp25.scn testsuites/sptests/sp25/system.h testsuites/sptests/sp25/task1.c testsuites/sptests/sp26/Makefile.am testsuites/sptests/sp26/init.c testsuites/sptests/sp26/sp26.doc testsuites/sptests/sp26/sp26.scn testsuites/sptests/sp26/system.h testsuites/sptests/sp26/task1.c testsuites/sptests/sp27/Makefile.am testsuites/sptests/sp27/init.c testsuites/sptests/sp27/sp27.doc testsuites/sptests/sp27/sp27.scn testsuites/sptests/sp28/Makefile.am testsuites/sptests/sp28/init.c testsuites/sptests/sp28/sp28.doc testsuites/sptests/sp28/sp28.scn testsuites/sptests/sp29/Makefile.am testsuites/sptests/sp29/init.c testsuites/sptests/sp29/sp29.doc testsuites/sptests/sp29/sp29.scn testsuites/sptests/spfatal/Makefile.am testsuites/sptests/spfatal/README testsuites/sptests/spfatal/fatal.c testsuites/sptests/spfatal/init.c testsuites/sptests/spfatal/puterr.c testsuites/sptests/spfatal/spfatal.doc testsuites/sptests/spfatal/spfatal.scn testsuites/sptests/spfatal/system.h testsuites/sptests/spfatal/task1.c testsuites/sptests/spsize/Makefile.am testsuites/sptests/spsize/getint.c testsuites/sptests/spsize/init.c testsuites/sptests/spsize/size.c testsuites/sptests/spsize/size.scn testsuites/sptests/spsize/system.h testsuites/sptests/sptests.am testsuites/support/Makefile.am testsuites/support/include/tmacros.h testsuites/tmitrontests/Makefile.am testsuites/tmitrontests/README testsuites/tmitrontests/include/Makefile.am testsuites/tmitrontests/include/timesys.h testsuites/tmitrontests/tmitronsem01/Makefile.am testsuites/tmitrontests/tmitronsem01/init.c testsuites/tmitrontests/tmitronsem01/system.h testsuites/tmitrontests/tmitronsem01/tmitronsem01.doc testsuites/tmitrontests/tmitrontests.am testsuites/tmtests/Makefile.am testsuites/tmtests/README testsuites/tmtests/include/Makefile.am testsuites/tmtests/include/timesys.h testsuites/tmtests/tm01/Makefile.am testsuites/tmtests/tm01/system.h testsuites/tmtests/tm01/task1.c testsuites/tmtests/tm01/tm01.doc testsuites/tmtests/tm02/Makefile.am testsuites/tmtests/tm02/system.h testsuites/tmtests/tm02/task1.c testsuites/tmtests/tm02/tm02.doc testsuites/tmtests/tm03/Makefile.am testsuites/tmtests/tm03/system.h testsuites/tmtests/tm03/task1.c testsuites/tmtests/tm03/tm03.doc testsuites/tmtests/tm04/Makefile.am testsuites/tmtests/tm04/system.h testsuites/tmtests/tm04/task1.c testsuites/tmtests/tm04/tm04.doc testsuites/tmtests/tm05/Makefile.am testsuites/tmtests/tm05/system.h testsuites/tmtests/tm05/task1.c testsuites/tmtests/tm05/tm05.doc testsuites/tmtests/tm06/Makefile.am testsuites/tmtests/tm06/system.h testsuites/tmtests/tm06/task1.c testsuites/tmtests/tm06/tm06.doc testsuites/tmtests/tm07/Makefile.am testsuites/tmtests/tm07/system.h testsuites/tmtests/tm07/task1.c testsuites/tmtests/tm07/tm07.doc testsuites/tmtests/tm08/Makefile.am testsuites/tmtests/tm08/system.h testsuites/tmtests/tm08/task1.c testsuites/tmtests/tm08/tm08.doc testsuites/tmtests/tm09/Makefile.am testsuites/tmtests/tm09/system.h testsuites/tmtests/tm09/task1.c testsuites/tmtests/tm09/tm09.doc testsuites/tmtests/tm10/Makefile.am testsuites/tmtests/tm10/system.h testsuites/tmtests/tm10/task1.c testsuites/tmtests/tm10/tm10.doc testsuites/tmtests/tm11/Makefile.am testsuites/tmtests/tm11/system.h testsuites/tmtests/tm11/task1.c testsuites/tmtests/tm11/tm11.doc testsuites/tmtests/tm12/Makefile.am testsuites/tmtests/tm12/system.h testsuites/tmtests/tm12/task1.c testsuites/tmtests/tm12/tm12.doc testsuites/tmtests/tm13/Makefile.am testsuites/tmtests/tm13/system.h testsuites/tmtests/tm13/task1.c testsuites/tmtests/tm13/tm13.doc testsuites/tmtests/tm14/Makefile.am testsuites/tmtests/tm14/system.h testsuites/tmtests/tm14/task1.c testsuites/tmtests/tm14/tm14.doc testsuites/tmtests/tm15/Makefile.am testsuites/tmtests/tm15/system.h testsuites/tmtests/tm15/task1.c testsuites/tmtests/tm15/tm15.doc testsuites/tmtests/tm16/Makefile.am testsuites/tmtests/tm16/system.h testsuites/tmtests/tm16/task1.c testsuites/tmtests/tm16/tm16.doc testsuites/tmtests/tm17/Makefile.am testsuites/tmtests/tm17/system.h testsuites/tmtests/tm17/task1.c testsuites/tmtests/tm17/tm17.doc testsuites/tmtests/tm18/Makefile.am testsuites/tmtests/tm18/system.h testsuites/tmtests/tm18/task1.c testsuites/tmtests/tm18/tm18.doc testsuites/tmtests/tm19/Makefile.am testsuites/tmtests/tm19/system.h testsuites/tmtests/tm19/task1.c testsuites/tmtests/tm19/tm19.doc testsuites/tmtests/tm20/Makefile.am testsuites/tmtests/tm20/system.h testsuites/tmtests/tm20/task1.c testsuites/tmtests/tm20/tm20.doc testsuites/tmtests/tm21/Makefile.am testsuites/tmtests/tm21/system.h testsuites/tmtests/tm21/task1.c testsuites/tmtests/tm21/tm21.doc testsuites/tmtests/tm22/Makefile.am testsuites/tmtests/tm22/system.h testsuites/tmtests/tm22/task1.c testsuites/tmtests/tm22/tm22.doc testsuites/tmtests/tm23/Makefile.am testsuites/tmtests/tm23/system.h testsuites/tmtests/tm23/task1.c testsuites/tmtests/tm23/tm23.doc testsuites/tmtests/tm24/Makefile.am testsuites/tmtests/tm24/system.h testsuites/tmtests/tm24/task1.c testsuites/tmtests/tm24/tm24.doc testsuites/tmtests/tm25/Makefile.am testsuites/tmtests/tm25/system.h testsuites/tmtests/tm25/task1.c testsuites/tmtests/tm25/tm25.doc testsuites/tmtests/tm26/Makefile.am testsuites/tmtests/tm26/fptest.h testsuites/tmtests/tm26/system.h testsuites/tmtests/tm26/task1.c testsuites/tmtests/tm26/tm26.doc testsuites/tmtests/tm27/Makefile.am testsuites/tmtests/tm27/system.h testsuites/tmtests/tm27/task1.c testsuites/tmtests/tm27/tm27.doc testsuites/tmtests/tm28/Makefile.am testsuites/tmtests/tm28/system.h testsuites/tmtests/tm28/task1.c testsuites/tmtests/tm28/tm28.doc testsuites/tmtests/tm29/Makefile.am testsuites/tmtests/tm29/system.h testsuites/tmtests/tm29/task1.c testsuites/tmtests/tm29/tm29.doc testsuites/tmtests/tmck/Makefile.am testsuites/tmtests/tmck/system.h testsuites/tmtests/tmck/task1.c testsuites/tmtests/tmck/tmck.doc testsuites/tmtests/tmoverhd/Makefile.am testsuites/tmtests/tmoverhd/dumrtems.h testsuites/tmtests/tmoverhd/empty.c testsuites/tmtests/tmoverhd/system.h testsuites/tmtests/tmoverhd/testtask.c testsuites/tmtests/tmoverhd/tmoverhd.doc testsuites/tmtests/tmtests.am testsuites/tools/Makefile.am testsuites/tools/generic/Makefile.am testsuites/tools/generic/difftest.in testsuites/tools/generic/sorttimes.in
-rw-r--r--c/src/ada-tests/mptests/mp01/config.h33
-rw-r--r--c/src/ada-tests/mptests/mp01/mp01.adb57
-rw-r--r--c/src/ada-tests/mptests/mp01/mptest.adb235
-rw-r--r--c/src/ada-tests/mptests/mp01/mptest.ads164
-rw-r--r--c/src/ada-tests/mptests/mp01/node1/mp01.scn15
-rw-r--r--c/src/ada-tests/mptests/mp01/node1/mptest-per_node_configuration.adb43
-rw-r--r--c/src/ada-tests/mptests/mp01/node2/mp01.scn15
-rw-r--r--c/src/ada-tests/mptests/mp01/node2/mptest-per_node_configuration.adb43
-rw-r--r--c/src/ada-tests/mptests/mp02/mptest.adb213
-rw-r--r--c/src/ada-tests/mptests/mp02/mptest.ads164
-rw-r--r--c/src/ada-tests/mptests/mp02/node1/mp02.scn11
-rw-r--r--c/src/ada-tests/mptests/mp02/node1/mptest-per_node_configuration.adb43
-rw-r--r--c/src/ada-tests/mptests/mp02/node2/mp02.scn11
-rw-r--r--c/src/ada-tests/mptests/mp02/node2/mptest-per_node_configuration.adb43
-rw-r--r--c/src/ada-tests/mptests/mp03/mptest.adb277
-rw-r--r--c/src/ada-tests/mptests/mp03/mptest.ads214
-rw-r--r--c/src/ada-tests/mptests/mp03/node1/mp03.scn28
-rw-r--r--c/src/ada-tests/mptests/mp03/node1/mptest-per_node_configuration.adb43
-rw-r--r--c/src/ada-tests/mptests/mp03/node2/mp03.scn28
-rw-r--r--c/src/ada-tests/mptests/mp03/node2/mptest-per_node_configuration.adb43
-rw-r--r--c/src/ada-tests/mptests/mp04/mptest.adb169
-rw-r--r--c/src/ada-tests/mptests/mp04/mptest.ads178
-rw-r--r--c/src/ada-tests/mptests/mp04/node1/mp04.scn8
-rw-r--r--c/src/ada-tests/mptests/mp04/node1/mptest-per_node_configuration.adb43
-rw-r--r--c/src/ada-tests/mptests/mp04/node2/mp04.scn8
-rw-r--r--c/src/ada-tests/mptests/mp04/node2/mptest-per_node_configuration.adb43
-rw-r--r--c/src/ada-tests/mptests/mp05/mptest.adb252
-rw-r--r--c/src/ada-tests/mptests/mp05/mptest.ads243
-rw-r--r--c/src/ada-tests/mptests/mp05/node1/mp05.scn11
-rw-r--r--c/src/ada-tests/mptests/mp05/node1/mptest-per_node_configuration.adb43
-rw-r--r--c/src/ada-tests/mptests/mp05/node2/mp05.scn10
-rw-r--r--c/src/ada-tests/mptests/mp05/node2/mptest-per_node_configuration.adb43
-rw-r--r--c/src/ada-tests/mptests/mp06/mptest.adb257
-rw-r--r--c/src/ada-tests/mptests/mp06/mptest.ads250
-rw-r--r--c/src/ada-tests/mptests/mp06/node1/mp06.scn10
-rw-r--r--c/src/ada-tests/mptests/mp06/node1/mptest-per_node_configuration.adb43
-rw-r--r--c/src/ada-tests/mptests/mp06/node2/mp06.scn11
-rw-r--r--c/src/ada-tests/mptests/mp06/node2/mptest-per_node_configuration.adb43
-rw-r--r--c/src/ada-tests/mptests/mp07/mptest.adb210
-rw-r--r--c/src/ada-tests/mptests/mp07/mptest.ads210
-rw-r--r--c/src/ada-tests/mptests/mp07/node1/mp07.scn10
-rw-r--r--c/src/ada-tests/mptests/mp07/node1/mptest-per_node_configuration.adb43
-rw-r--r--c/src/ada-tests/mptests/mp07/node2/mp07.scn9
-rw-r--r--c/src/ada-tests/mptests/mp07/node2/mptest-per_node_configuration.adb43
-rw-r--r--c/src/ada-tests/mptests/mp08/mptest.adb207
-rw-r--r--c/src/ada-tests/mptests/mp08/mptest.ads192
-rw-r--r--c/src/ada-tests/mptests/mp08/node1/mp08.scn9
-rw-r--r--c/src/ada-tests/mptests/mp08/node1/mptest-per_node_configuration.adb43
-rw-r--r--c/src/ada-tests/mptests/mp08/node2/mp08.scn10
-rw-r--r--c/src/ada-tests/mptests/mp08/node2/mptest-per_node_configuration.adb43
-rw-r--r--c/src/ada-tests/mptests/mp09/mptest.adb381
-rw-r--r--c/src/ada-tests/mptests/mp09/mptest.ads254
-rw-r--r--c/src/ada-tests/mptests/mp09/node1/mp09.scn20
-rw-r--r--c/src/ada-tests/mptests/mp09/node1/mptest-per_node_configuration.adb43
-rw-r--r--c/src/ada-tests/mptests/mp09/node2/mp09.scn26
-rw-r--r--c/src/ada-tests/mptests/mp09/node2/mptest-per_node_configuration.adb43
-rw-r--r--c/src/ada-tests/mptests/mp10/mptest.adb301
-rw-r--r--c/src/ada-tests/mptests/mp10/mptest.ads224
-rw-r--r--c/src/ada-tests/mptests/mp10/node1/mp10.scn4
-rw-r--r--c/src/ada-tests/mptests/mp10/node1/mptest-per_node_configuration.adb43
-rw-r--r--c/src/ada-tests/mptests/mp10/node2/mp10.scn18
-rw-r--r--c/src/ada-tests/mptests/mp10/node2/mptest-per_node_configuration.adb43
-rw-r--r--c/src/ada-tests/mptests/mp11/mptest.adb138
-rw-r--r--c/src/ada-tests/mptests/mp11/mptest.ads184
-rw-r--r--c/src/ada-tests/mptests/mp11/node1/mp11.scn10
-rw-r--r--c/src/ada-tests/mptests/mp11/node1/mptest-per_node_configuration.adb43
-rw-r--r--c/src/ada-tests/mptests/mp11/node2/mp11.scn2
-rw-r--r--c/src/ada-tests/mptests/mp11/node2/mptest-per_node_configuration.adb43
-rw-r--r--c/src/ada-tests/mptests/mp12/mptest.adb152
-rw-r--r--c/src/ada-tests/mptests/mp12/mptest.ads182
-rw-r--r--c/src/ada-tests/mptests/mp12/node1/mp12.scn6
-rw-r--r--c/src/ada-tests/mptests/mp12/node1/mptest-per_node_configuration.adb43
-rw-r--r--c/src/ada-tests/mptests/mp12/node2/mp12.scn9
-rw-r--r--c/src/ada-tests/mptests/mp12/node2/mptest-per_node_configuration.adb43
-rw-r--r--c/src/ada-tests/mptests/mp13/mptest.adb328
-rw-r--r--c/src/ada-tests/mptests/mp13/mptest.ads206
-rw-r--r--c/src/ada-tests/mptests/mp13/node1/mp13.scn14
-rw-r--r--c/src/ada-tests/mptests/mp13/node1/mptest-per_node_configuration.adb43
-rw-r--r--c/src/ada-tests/mptests/mp13/node2/mp13.scn16
-rw-r--r--c/src/ada-tests/mptests/mp13/node2/mptest-per_node_configuration.adb43
-rw-r--r--c/src/ada-tests/mptests/mp14/mptest.adb764
-rw-r--r--c/src/ada-tests/mptests/mp14/mptest.ads347
-rw-r--r--c/src/ada-tests/mptests/mp14/node1/mp14.scn33
-rw-r--r--c/src/ada-tests/mptests/mp14/node1/mptest-per_node_configuration.adb43
-rw-r--r--c/src/ada-tests/mptests/mp14/node2/mp14.scn28
-rw-r--r--c/src/ada-tests/mptests/mp14/node2/mptest-per_node_configuration.adb43
-rw-r--r--c/src/ada-tests/samples/base_mp/mptest.adb108
-rw-r--r--c/src/ada-tests/samples/base_mp/mptest.ads166
-rw-r--r--c/src/ada-tests/samples/base_mp/node1/base_mp.scn5
-rw-r--r--c/src/ada-tests/samples/base_mp/node1/mptest-per_node_configuration.adb43
-rw-r--r--c/src/ada-tests/samples/base_mp/node2/base_mp.scn5
-rw-r--r--c/src/ada-tests/samples/base_mp/node2/mptest-per_node_configuration.adb43
-rw-r--r--c/src/ada-tests/samples/base_sp/base_sp.adb58
-rw-r--r--c/src/ada-tests/samples/base_sp/base_sp.scn4
-rw-r--r--c/src/ada-tests/samples/base_sp/config.h33
-rw-r--r--c/src/ada-tests/samples/base_sp/sptest.adb98
-rw-r--r--c/src/ada-tests/samples/base_sp/sptest.ads60
-rw-r--r--c/src/ada-tests/samples/hello/config.h32
-rw-r--r--c/src/ada-tests/samples/hello/hello.adb57
-rw-r--r--c/src/ada-tests/samples/hello/hello.scn3
-rw-r--r--c/src/ada-tests/samples/hello/sptest.adb52
-rw-r--r--c/src/ada-tests/samples/hello/sptest.ads48
-rw-r--r--c/src/ada-tests/samples/ticker/config.h33
-rw-r--r--c/src/ada-tests/samples/ticker/sptest.adb162
-rw-r--r--c/src/ada-tests/samples/ticker/sptest.ads60
-rw-r--r--c/src/ada-tests/samples/ticker/ticker.adb57
-rw-r--r--c/src/ada-tests/samples/ticker/ticker.scn16
-rw-r--r--c/src/ada-tests/sptests/sp01/config.h33
-rw-r--r--c/src/ada-tests/sptests/sp01/sp01.adb57
-rw-r--r--c/src/ada-tests/sptests/sp01/sp01.scn16
-rw-r--r--c/src/ada-tests/sptests/sp01/sptest.adb162
-rw-r--r--c/src/ada-tests/sptests/sp01/sptest.ads60
-rw-r--r--c/src/ada-tests/sptests/sp02/config.h33
-rw-r--r--c/src/ada-tests/sptests/sp02/sp02.adb57
-rw-r--r--c/src/ada-tests/sptests/sp02/sp02.scn15
-rw-r--r--c/src/ada-tests/sptests/sp02/sptest.adb331
-rw-r--r--c/src/ada-tests/sptests/sp02/sptest.ads99
-rw-r--r--c/src/ada-tests/sptests/sp03/config.h33
-rw-r--r--c/src/ada-tests/sptests/sp03/sp03.adb57
-rw-r--r--c/src/ada-tests/sptests/sp03/sp03.scn26
-rw-r--r--c/src/ada-tests/sptests/sp03/sptest.adb173
-rw-r--r--c/src/ada-tests/sptests/sp03/sptest.ads74
-rw-r--r--c/src/ada-tests/sptests/sp04/README13
-rw-r--r--c/src/ada-tests/sptests/sp04/config.h36
-rw-r--r--c/src/ada-tests/sptests/sp04/sp04.adb57
-rw-r--r--c/src/ada-tests/sptests/sp04/sp04.scn23
-rw-r--r--c/src/ada-tests/sptests/sp04/sptest.adb317
-rw-r--r--c/src/ada-tests/sptests/sp04/sptest.ads133
-rw-r--r--c/src/ada-tests/sptests/sp05/config.h35
-rw-r--r--c/src/ada-tests/sptests/sp05/sp05.adb57
-rw-r--r--c/src/ada-tests/sptests/sp05/sp05.scn48
-rw-r--r--c/src/ada-tests/sptests/sp05/sptest.adb229
-rw-r--r--c/src/ada-tests/sptests/sp05/sptest.ads84
-rw-r--r--c/src/ada-tests/sptests/sp06/config.h35
-rw-r--r--c/src/ada-tests/sptests/sp06/sp06.adb57
-rw-r--r--c/src/ada-tests/sptests/sp06/sp06.scn38
-rw-r--r--c/src/ada-tests/sptests/sp06/sptest.adb222
-rw-r--r--c/src/ada-tests/sptests/sp06/sptest.ads91
-rw-r--r--c/src/ada-tests/sptests/sp07/config.h36
-rw-r--r--c/src/ada-tests/sptests/sp07/sp07.adb57
-rw-r--r--c/src/ada-tests/sptests/sp07/sp07.scn32
-rw-r--r--c/src/ada-tests/sptests/sp07/sptest.adb496
-rw-r--r--c/src/ada-tests/sptests/sp07/sptest.ads186
-rw-r--r--c/src/ada-tests/sptests/sp08/config.h35
-rw-r--r--c/src/ada-tests/sptests/sp08/sp08.adb57
-rw-r--r--c/src/ada-tests/sptests/sp08/sp08.scn20
-rw-r--r--c/src/ada-tests/sptests/sp08/sptest.adb351
-rw-r--r--c/src/ada-tests/sptests/sp08/sptest.ads74
-rw-r--r--c/src/ada-tests/sptests/sp09/config.h42
-rw-r--r--c/src/ada-tests/sptests/sp09/sp09.adb57
-rw-r--r--c/src/ada-tests/sptests/sp09/sp09.scn250
-rw-r--r--c/src/ada-tests/sptests/sp09/sptest.adb3208
-rw-r--r--c/src/ada-tests/sptests/sp09/sptest.ads402
-rw-r--r--c/src/ada-tests/sptests/sp11/config.h36
-rw-r--r--c/src/ada-tests/sptests/sp11/sp11.adb57
-rw-r--r--c/src/ada-tests/sptests/sp11/sp11.scn74
-rw-r--r--c/src/ada-tests/sptests/sp11/sptest.adb900
-rw-r--r--c/src/ada-tests/sptests/sp11/sptest.ads178
-rw-r--r--c/src/ada-tests/sptests/sp12/config.h36
-rw-r--r--c/src/ada-tests/sptests/sp12/sp12.adb58
-rw-r--r--c/src/ada-tests/sptests/sp12/sp12.scn78
-rw-r--r--c/src/ada-tests/sptests/sp12/sptest.adb812
-rw-r--r--c/src/ada-tests/sptests/sp12/sptest.ads142
-rw-r--r--c/src/ada-tests/sptests/sp13/config.h36
-rw-r--r--c/src/ada-tests/sptests/sp13/sp13.adb57
-rw-r--r--c/src/ada-tests/sptests/sp13/sp13.scn66
-rw-r--r--c/src/ada-tests/sptests/sp13/sptest.adb723
-rw-r--r--c/src/ada-tests/sptests/sp13/sptest.ads132
-rw-r--r--c/src/ada-tests/sptests/sp14/config.h36
-rw-r--r--c/src/ada-tests/sptests/sp14/sp14.adb57
-rw-r--r--c/src/ada-tests/sptests/sp14/sp14.scn33
-rw-r--r--c/src/ada-tests/sptests/sp14/sptest.adb330
-rw-r--r--c/src/ada-tests/sptests/sp14/sptest.ads131
-rw-r--r--c/src/ada-tests/sptests/sp15/config.h36
-rw-r--r--c/src/ada-tests/sptests/sp15/sp15.adb57
-rw-r--r--c/src/ada-tests/sptests/sp15/sp15.scn16
-rw-r--r--c/src/ada-tests/sptests/sp15/sptest.adb284
-rw-r--r--c/src/ada-tests/sptests/sp15/sptest.ads118
-rw-r--r--c/src/ada-tests/sptests/sp16/config.h36
-rw-r--r--c/src/ada-tests/sptests/sp16/sp16.adb57
-rw-r--r--c/src/ada-tests/sptests/sp16/sp16.scn48
-rw-r--r--c/src/ada-tests/sptests/sp16/sptest.adb686
-rw-r--r--c/src/ada-tests/sptests/sp16/sptest.ads195
-rw-r--r--c/src/ada-tests/sptests/sp17/config.h36
-rw-r--r--c/src/ada-tests/sptests/sp17/sp17.adb57
-rw-r--r--c/src/ada-tests/sptests/sp17/sp17.scn8
-rw-r--r--c/src/ada-tests/sptests/sp17/sptest.adb173
-rw-r--r--c/src/ada-tests/sptests/sp17/sptest.ads93
-rw-r--r--c/src/ada-tests/sptests/sp19/README23
-rw-r--r--c/src/ada-tests/sptests/sp19/config.h33
-rw-r--r--c/src/ada-tests/sptests/sp19/sp19.adb57
-rw-r--r--c/src/ada-tests/sptests/sp19/sp19.scn56
-rw-r--r--c/src/ada-tests/sptests/sp19/sptest.ads102
-rw-r--r--c/src/ada-tests/sptests/sp20/config.h35
-rw-r--r--c/src/ada-tests/sptests/sp20/sp20.adb56
-rw-r--r--c/src/ada-tests/sptests/sp20/sp20.scn27
-rw-r--r--c/src/ada-tests/sptests/sp20/sptest.adb280
-rw-r--r--c/src/ada-tests/sptests/sp20/sptest.ads105
-rw-r--r--c/src/ada-tests/sptests/sp21/config.h34
-rw-r--r--c/src/ada-tests/sptests/sp21/sp21.adb57
-rw-r--r--c/src/ada-tests/sptests/sp21/sp21.scn19
-rw-r--r--c/src/ada-tests/sptests/sp21/sptest.adb270
-rw-r--r--c/src/ada-tests/sptests/sp21/sptest.ads69
-rw-r--r--c/src/ada-tests/sptests/sp22/config.h35
-rw-r--r--c/src/ada-tests/sptests/sp22/sp22.adb57
-rw-r--r--c/src/ada-tests/sptests/sp22/sp22.scn29
-rw-r--r--c/src/ada-tests/sptests/sp22/sptest.adb299
-rw-r--r--c/src/ada-tests/sptests/sp22/sptest.ads92
-rw-r--r--c/src/ada-tests/sptests/sp23/config.h35
-rw-r--r--c/src/ada-tests/sptests/sp23/sp23.adb57
-rw-r--r--c/src/ada-tests/sptests/sp23/sp23.scn9
-rw-r--r--c/src/ada-tests/sptests/sp23/sptest.adb179
-rw-r--r--c/src/ada-tests/sptests/sp23/sptest.ads118
-rw-r--r--c/src/ada-tests/sptests/sp24/config.h35
-rw-r--r--c/src/ada-tests/sptests/sp24/sp24.adb57
-rw-r--r--c/src/ada-tests/sptests/sp24/sp24.scn17
-rw-r--r--c/src/ada-tests/sptests/sp24/sptest.adb171
-rw-r--r--c/src/ada-tests/sptests/sp24/sptest.ads82
-rw-r--r--c/src/ada-tests/sptests/sp25/config.h35
-rw-r--r--c/src/ada-tests/sptests/sp25/sp25.adb57
-rw-r--r--c/src/ada-tests/sptests/sp25/sp25.scn29
-rw-r--r--c/src/ada-tests/sptests/sp25/sptest.adb367
-rw-r--r--c/src/ada-tests/sptests/sp25/sptest.ads103
-rw-r--r--c/src/ada-tests/sptests/spsize/spsize.adb57
-rw-r--r--c/src/ada-tests/sptests/spsize/sptest.adb199
-rw-r--r--c/src/ada-tests/sptests/spsize/sptest.ads56
-rw-r--r--c/src/ada-tests/support/address_io.adb47
-rw-r--r--c/src/ada-tests/support/address_io.ads35
-rw-r--r--c/src/ada-tests/support/float_io.ads27
-rw-r--r--c/src/ada-tests/support/fp.inc154
-rw-r--r--c/src/ada-tests/support/init.c44
-rw-r--r--c/src/ada-tests/support/integer.inc145
-rw-r--r--c/src/ada-tests/support/rtems_calling_overhead.ads105
-rw-r--r--c/src/ada-tests/support/status_io.ads28
-rw-r--r--c/src/ada-tests/support/test_support.adb236
-rw-r--r--c/src/ada-tests/support/test_support.ads173
-rw-r--r--c/src/ada-tests/support/time_test_support.adb77
-rw-r--r--c/src/ada-tests/support/time_test_support.ads54
-rw-r--r--c/src/ada-tests/support/timer_driver.adb45
-rw-r--r--c/src/ada-tests/support/timer_driver.ads81
-rw-r--r--c/src/ada-tests/support/unsigned32_io.ads28
-rw-r--r--c/src/ada-tests/tmtests/tm01/config.h37
-rw-r--r--c/src/ada-tests/tmtests/tm01/tm01.adb57
-rw-r--r--c/src/ada-tests/tmtests/tm01/tmtest.adb276
-rw-r--r--c/src/ada-tests/tmtests/tm01/tmtest.ads68
-rw-r--r--c/src/ada-tests/tmtests/tm02/config.h38
-rw-r--r--c/src/ada-tests/tmtests/tm02/tm02.adb57
-rw-r--r--c/src/ada-tests/tmtests/tm02/tmtest.adb209
-rw-r--r--c/src/ada-tests/tmtests/tm02/tmtest.ads103
-rw-r--r--c/src/ada-tests/tmtests/tm03/config.h38
-rw-r--r--c/src/ada-tests/tmtests/tm03/tm03.adb57
-rw-r--r--c/src/ada-tests/tmtests/tm03/tmtest.adb194
-rw-r--r--c/src/ada-tests/tmtests/tm03/tmtest.ads95
-rw-r--r--c/src/ada-tests/tmtests/tm04/config.h37
-rw-r--r--c/src/ada-tests/tmtests/tm04/tm04.adb57
-rw-r--r--c/src/ada-tests/tmtests/tm04/tmtest.adb501
-rw-r--r--c/src/ada-tests/tmtests/tm04/tmtest.ads161
-rw-r--r--c/src/ada-tests/tmtests/tm05/config.h38
-rw-r--r--c/src/ada-tests/tmtests/tm05/tm05.adb57
-rw-r--r--c/src/ada-tests/tmtests/tm05/tmtest.adb174
-rw-r--r--c/src/ada-tests/tmtests/tm05/tmtest.ads113
-rw-r--r--c/src/ada-tests/tmtests/tm06/config.h38
-rw-r--r--c/src/ada-tests/tmtests/tm06/tm06.adb57
-rw-r--r--c/src/ada-tests/tmtests/tm06/tmtest.adb210
-rw-r--r--c/src/ada-tests/tmtests/tm06/tmtest.ads104
-rw-r--r--c/src/ada-tests/tmtests/tm07/config.h38
-rw-r--r--c/src/ada-tests/tmtests/tm07/tm07.adb57
-rw-r--r--c/src/ada-tests/tmtests/tm07/tmtest.adb179
-rw-r--r--c/src/ada-tests/tmtests/tm07/tmtest.ads111
-rw-r--r--c/src/ada-tests/tmtests/tm08/config.h38
-rw-r--r--c/src/ada-tests/tmtests/tm08/tm08.adb57
-rw-r--r--c/src/ada-tests/tmtests/tm08/tmtest.adb341
-rw-r--r--c/src/ada-tests/tmtests/tm08/tmtest.ads99
-rw-r--r--c/src/ada-tests/tmtests/tm09/config.h36
-rw-r--r--c/src/ada-tests/tmtests/tm09/tm09.adb57
-rw-r--r--c/src/ada-tests/tmtests/tm09/tmtest.adb302
-rw-r--r--c/src/ada-tests/tmtests/tm09/tmtest.ads100
-rw-r--r--c/src/ada-tests/tmtests/tm10/config.h37
-rw-r--r--c/src/ada-tests/tmtests/tm10/tm10.adb57
-rw-r--r--c/src/ada-tests/tmtests/tm10/tmtest.adb225
-rw-r--r--c/src/ada-tests/tmtests/tm10/tmtest.ads117
-rw-r--r--c/src/ada-tests/tmtests/tm11/config.h37
-rw-r--r--c/src/ada-tests/tmtests/tm11/tm11.adb57
-rw-r--r--c/src/ada-tests/tmtests/tm11/tmtest.adb219
-rw-r--r--c/src/ada-tests/tmtests/tm11/tmtest.ads114
-rw-r--r--c/src/ada-tests/tmtests/tm12/config.h37
-rw-r--r--c/src/ada-tests/tmtests/tm12/tm12.adb57
-rw-r--r--c/src/ada-tests/tmtests/tm12/tmtest.adb212
-rw-r--r--c/src/ada-tests/tmtests/tm12/tmtest.ads105
-rw-r--r--c/src/ada-tests/tmtests/tm13/config.h37
-rw-r--r--c/src/ada-tests/tmtests/tm13/tm13.adb57
-rw-r--r--c/src/ada-tests/tmtests/tm13/tmtest.adb217
-rw-r--r--c/src/ada-tests/tmtests/tm13/tmtest.ads114
-rw-r--r--c/src/ada-tests/tmtests/tm14/config.h37
-rw-r--r--c/src/ada-tests/tmtests/tm14/tm14.adb57
-rw-r--r--c/src/ada-tests/tmtests/tm14/tmtest.adb216
-rw-r--r--c/src/ada-tests/tmtests/tm14/tmtest.ads105
-rw-r--r--c/src/ada-tests/tmtests/tm15/config.h37
-rw-r--r--c/src/ada-tests/tmtests/tm15/tm15.adb57
-rw-r--r--c/src/ada-tests/tmtests/tm15/tmtest.adb276
-rw-r--r--c/src/ada-tests/tmtests/tm15/tmtest.ads109
-rw-r--r--c/src/ada-tests/tmtests/tm16/config.h37
-rw-r--r--c/src/ada-tests/tmtests/tm16/tm16.adb57
-rw-r--r--c/src/ada-tests/tmtests/tm16/tmtest.adb197
-rw-r--r--c/src/ada-tests/tmtests/tm16/tmtest.ads111
-rw-r--r--c/src/ada-tests/tmtests/tm17/config.h37
-rw-r--r--c/src/ada-tests/tmtests/tm17/tm17.adb57
-rw-r--r--c/src/ada-tests/tmtests/tm17/tmtest.adb160
-rw-r--r--c/src/ada-tests/tmtests/tm17/tmtest.ads109
-rw-r--r--c/src/ada-tests/tmtests/tm18/config.h37
-rw-r--r--c/src/ada-tests/tmtests/tm18/tm18.adb57
-rw-r--r--c/src/ada-tests/tmtests/tm18/tmtest.adb154
-rw-r--r--c/src/ada-tests/tmtests/tm18/tmtest.ads97
-rw-r--r--c/src/ada-tests/tmtests/tm19/config.h37
-rw-r--r--c/src/ada-tests/tmtests/tm19/tm19.adb57
-rw-r--r--c/src/ada-tests/tmtests/tm19/tmtest.adb287
-rw-r--r--c/src/ada-tests/tmtests/tm19/tmtest.ads144
-rw-r--r--c/src/ada-tests/tmtests/tm20/config.h37
-rw-r--r--c/src/ada-tests/tmtests/tm20/tm20.adb57
-rw-r--r--c/src/ada-tests/tmtests/tm20/tmtest.adb588
-rw-r--r--c/src/ada-tests/tmtests/tm20/tmtest.ads151
-rw-r--r--c/src/ada-tests/tmtests/tm21/config.h43
-rw-r--r--c/src/ada-tests/tmtests/tm21/tm21.adb57
-rw-r--r--c/src/ada-tests/tmtests/tm21/tmtest.adb302
-rw-r--r--c/src/ada-tests/tmtests/tm21/tmtest.ads122
-rw-r--r--c/src/ada-tests/tmtests/tm22/config.h37
-rw-r--r--c/src/ada-tests/tmtests/tm22/tm22.adb57
-rw-r--r--c/src/ada-tests/tmtests/tm22/tmtest.adb256
-rw-r--r--c/src/ada-tests/tmtests/tm22/tmtest.ads119
-rw-r--r--c/src/ada-tests/tmtests/tm23/config.h37
-rw-r--r--c/src/ada-tests/tmtests/tm23/tm23.adb57
-rw-r--r--c/src/ada-tests/tmtests/tm23/tmtest.adb399
-rw-r--r--c/src/ada-tests/tmtests/tm23/tmtest.ads130
-rw-r--r--c/src/ada-tests/tmtests/tm24/config.h36
-rw-r--r--c/src/ada-tests/tmtests/tm24/tm24.adb57
-rw-r--r--c/src/ada-tests/tmtests/tm24/tmtest.adb165
-rw-r--r--c/src/ada-tests/tmtests/tm24/tmtest.ads99
-rw-r--r--c/src/ada-tests/tmtests/tm25/config.h37
-rw-r--r--c/src/ada-tests/tmtests/tm25/tm25.adb57
-rw-r--r--c/src/ada-tests/tmtests/tm25/tmtest.adb157
-rw-r--r--c/src/ada-tests/tmtests/tm25/tmtest.ads80
-rw-r--r--c/src/ada-tests/tmtests/tm26/README6
-rw-r--r--c/src/ada-tests/tmtests/tm26/config.h37
-rw-r--r--c/src/ada-tests/tmtests/tm26/tm26.adb57
-rw-r--r--c/src/ada-tests/tmtests/tm26/tmtest.adp650
-rw-r--r--c/src/ada-tests/tmtests/tm26/tmtest.ads189
-rw-r--r--c/src/ada-tests/tmtests/tm27/README8
-rw-r--r--c/src/ada-tests/tmtests/tm27/config.h36
-rw-r--r--c/src/ada-tests/tmtests/tm27/tm27.adb57
-rw-r--r--c/src/ada-tests/tmtests/tm27/tmtest.adb268
-rw-r--r--c/src/ada-tests/tmtests/tm27/tmtest.ads131
-rw-r--r--c/src/ada-tests/tmtests/tm28/config.h37
-rw-r--r--c/src/ada-tests/tmtests/tm28/tm28.adb57
-rw-r--r--c/src/ada-tests/tmtests/tm28/tmtest.adb176
-rw-r--r--c/src/ada-tests/tmtests/tm28/tmtest.ads106
-rw-r--r--c/src/ada-tests/tmtests/tm29/config.h37
-rw-r--r--c/src/ada-tests/tmtests/tm29/tm29.adb57
-rw-r--r--c/src/ada-tests/tmtests/tm29/tmtest.adb234
-rw-r--r--c/src/ada-tests/tmtests/tm29/tmtest.ads96
-rw-r--r--c/src/ada-tests/tmtests/tmck/config.h37
-rw-r--r--c/src/ada-tests/tmtests/tmck/tmck.adb57
-rw-r--r--c/src/ada-tests/tmtests/tmck/tmtest.adb220
-rw-r--r--c/src/ada-tests/tmtests/tmck/tmtest.ads97
-rw-r--r--c/src/ada-tests/tmtests/tmoverhd/README9
-rw-r--r--c/src/ada-tests/tmtests/tmoverhd/config.h37
-rw-r--r--c/src/ada-tests/tmtests/tmoverhd/dummy_rtems.adb877
-rw-r--r--c/src/ada-tests/tmtests/tmoverhd/dummy_rtems.ads521
-rw-r--r--c/src/ada-tests/tmtests/tmoverhd/tmoverhd.adb57
-rw-r--r--c/src/ada-tests/tmtests/tmoverhd/tmtest.adb1564
-rw-r--r--c/src/ada-tests/tmtests/tmoverhd/tmtest.ads155
-rw-r--r--c/src/ada/rtems.adb2064
-rw-r--r--c/src/ada/rtems.ads1439
-rw-r--r--c/src/exec/include/rtems/libio_.h272
-rw-r--r--c/src/exec/libcsupport/Makefile.am12
-rw-r--r--c/src/exec/libcsupport/include/chain.h362
-rw-r--r--c/src/exec/libcsupport/include/clockdrv.h50
-rw-r--r--c/src/exec/libcsupport/include/console.h72
-rw-r--r--c/src/exec/libcsupport/include/iosupp.h43
-rw-r--r--c/src/exec/libcsupport/include/motorola/mc68230.h70
-rw-r--r--c/src/exec/libcsupport/include/motorola/mc68681.h306
-rw-r--r--c/src/exec/libcsupport/include/ringbuf.h53
-rw-r--r--c/src/exec/libcsupport/include/rtems/assoc.h42
-rw-r--r--c/src/exec/libcsupport/include/rtems/error.h38
-rw-r--r--c/src/exec/libcsupport/include/rtems/libcsupport.h42
-rw-r--r--c/src/exec/libcsupport/include/rtems/libio.h584
-rw-r--r--c/src/exec/libcsupport/include/rtems/libio_.h272
-rw-r--r--c/src/exec/libcsupport/include/spurious.h38
-rw-r--r--c/src/exec/libcsupport/include/sys/filio.h56
-rw-r--r--c/src/exec/libcsupport/include/sys/ioctl.h77
-rw-r--r--c/src/exec/libcsupport/include/sys/sockio.h92
-rw-r--r--c/src/exec/libcsupport/include/sys/termios.h189
-rw-r--r--c/src/exec/libcsupport/include/sys/utime.h25
-rw-r--r--c/src/exec/libcsupport/include/sys/utsname.h49
-rw-r--r--c/src/exec/libcsupport/include/timerdrv.h39
-rw-r--r--c/src/exec/libcsupport/include/vmeintr.h57
-rw-r--r--c/src/exec/libcsupport/include/zilog/z8036.h108
-rw-r--r--c/src/exec/libcsupport/include/zilog/z8530.h98
-rw-r--r--c/src/exec/libcsupport/include/zilog/z8536.h111
-rw-r--r--c/src/exec/libcsupport/src/CASES23
-rw-r--r--c/src/exec/libcsupport/src/Makefile.am124
-rw-r--r--c/src/exec/libcsupport/src/README37
-rw-r--r--c/src/exec/libcsupport/src/TODO11
-rw-r--r--c/src/exec/libcsupport/src/__brk.c28
-rw-r--r--c/src/exec/libcsupport/src/__getpid.c14
-rw-r--r--c/src/exec/libcsupport/src/__gettod.c116
-rw-r--r--c/src/exec/libcsupport/src/__sbrk.c28
-rw-r--r--c/src/exec/libcsupport/src/__times.c85
-rw-r--r--c/src/exec/libcsupport/src/access.c45
-rw-r--r--c/src/exec/libcsupport/src/assoc.c250
-rw-r--r--c/src/exec/libcsupport/src/assocnamebad.c37
-rw-r--r--c/src/exec/libcsupport/src/base_fs.c113
-rw-r--r--c/src/exec/libcsupport/src/cfgetispeed.c28
-rw-r--r--c/src/exec/libcsupport/src/cfgetospeed.c28
-rw-r--r--c/src/exec/libcsupport/src/cfsetispeed.c35
-rw-r--r--c/src/exec/libcsupport/src/cfsetospeed.c35
-rw-r--r--c/src/exec/libcsupport/src/chdir.c55
-rw-r--r--c/src/exec/libcsupport/src/chmod.c46
-rw-r--r--c/src/exec/libcsupport/src/chown.c44
-rw-r--r--c/src/exec/libcsupport/src/close.c53
-rw-r--r--c/src/exec/libcsupport/src/closedir.c70
-rw-r--r--c/src/exec/libcsupport/src/creat.c11
-rw-r--r--c/src/exec/libcsupport/src/ctermid.c32
-rw-r--r--c/src/exec/libcsupport/src/dup.c22
-rw-r--r--c/src/exec/libcsupport/src/dup2.c48
-rw-r--r--c/src/exec/libcsupport/src/error.c210
-rw-r--r--c/src/exec/libcsupport/src/eval.c73
-rw-r--r--c/src/exec/libcsupport/src/fchmod.c44
-rw-r--r--c/src/exec/libcsupport/src/fcntl.c142
-rw-r--r--c/src/exec/libcsupport/src/fdatasync.c37
-rw-r--r--c/src/exec/libcsupport/src/fpathconf.c82
-rw-r--r--c/src/exec/libcsupport/src/fs_null_handlers.c36
-rw-r--r--c/src/exec/libcsupport/src/fstat.c75
-rw-r--r--c/src/exec/libcsupport/src/fsync.c37
-rw-r--r--c/src/exec/libcsupport/src/ftruncate.c53
-rw-r--r--c/src/exec/libcsupport/src/getcwd.c280
-rw-r--r--c/src/exec/libcsupport/src/getdents.c58
-rw-r--r--c/src/exec/libcsupport/src/getgrent.c173
-rw-r--r--c/src/exec/libcsupport/src/getpwent.c227
-rw-r--r--c/src/exec/libcsupport/src/hosterr.c47
-rw-r--r--c/src/exec/libcsupport/src/ioctl.c42
-rw-r--r--c/src/exec/libcsupport/src/isatty.c17
-rw-r--r--c/src/exec/libcsupport/src/libio.c327
-rw-r--r--c/src/exec/libcsupport/src/libio_sockets.c63
-rw-r--r--c/src/exec/libcsupport/src/link.c94
-rw-r--r--c/src/exec/libcsupport/src/lseek.c78
-rw-r--r--c/src/exec/libcsupport/src/lstat.c18
-rw-r--r--c/src/exec/libcsupport/src/malloc.c422
-rw-r--r--c/src/exec/libcsupport/src/mkdir.c27
-rw-r--r--c/src/exec/libcsupport/src/mkfifo.c24
-rw-r--r--c/src/exec/libcsupport/src/mknod.c64
-rw-r--r--c/src/exec/libcsupport/src/mount.c286
-rw-r--r--c/src/exec/libcsupport/src/newlibc.c359
-rw-r--r--c/src/exec/libcsupport/src/no_libc.c56
-rw-r--r--c/src/exec/libcsupport/src/no_posix.c101
-rw-r--r--c/src/exec/libcsupport/src/open.c205
-rw-r--r--c/src/exec/libcsupport/src/opendir.c85
-rw-r--r--c/src/exec/libcsupport/src/pathconf.c37
-rw-r--r--c/src/exec/libcsupport/src/pipe.c22
-rw-r--r--c/src/exec/libcsupport/src/read.c66
-rw-r--r--c/src/exec/libcsupport/src/readdir.c86
-rw-r--r--c/src/exec/libcsupport/src/readlink.c52
-rw-r--r--c/src/exec/libcsupport/src/rewinddir.c35
-rw-r--r--c/src/exec/libcsupport/src/rmdir.c65
-rw-r--r--c/src/exec/libcsupport/src/scandir.c149
-rw-r--r--c/src/exec/libcsupport/src/seekdir.c40
-rw-r--r--c/src/exec/libcsupport/src/stat.c98
-rw-r--r--c/src/exec/libcsupport/src/symlink.c37
-rw-r--r--c/src/exec/libcsupport/src/tcdrain.c34
-rw-r--r--c/src/exec/libcsupport/src/tcflow.c32
-rw-r--r--c/src/exec/libcsupport/src/tcflush.c32
-rw-r--r--c/src/exec/libcsupport/src/tcgetattr.c34
-rw-r--r--c/src/exec/libcsupport/src/tcgetprgrp.c32
-rw-r--r--c/src/exec/libcsupport/src/tcsendbreak.c32
-rw-r--r--c/src/exec/libcsupport/src/tcsetattr.c48
-rw-r--r--c/src/exec/libcsupport/src/tcsetpgrp.c32
-rw-r--r--c/src/exec/libcsupport/src/telldir.c43
-rw-r--r--c/src/exec/libcsupport/src/termios.c1131
-rw-r--r--c/src/exec/libcsupport/src/termiosinitialize.c50
-rw-r--r--c/src/exec/libcsupport/src/termiosreserveresources.c28
-rw-r--r--c/src/exec/libcsupport/src/truncate.c40
-rw-r--r--c/src/exec/libcsupport/src/ttyname.c74
-rw-r--r--c/src/exec/libcsupport/src/ttyname_r.c113
-rw-r--r--c/src/exec/libcsupport/src/umask.c29
-rw-r--r--c/src/exec/libcsupport/src/unixlibc.c32
-rw-r--r--c/src/exec/libcsupport/src/unlink.c73
-rw-r--r--c/src/exec/libcsupport/src/unmount.c223
-rw-r--r--c/src/exec/libcsupport/src/utime.c39
-rw-r--r--c/src/exec/libcsupport/src/utsname.c49
-rw-r--r--c/src/exec/libcsupport/src/write.c74
-rw-r--r--c/src/exec/libfs/src/imfs/deviceio.c221
-rw-r--r--c/src/exec/libfs/src/imfs/imfs.h516
-rw-r--r--c/src/exec/libfs/src/imfs/imfs_chown.c51
-rw-r--r--c/src/exec/libfs/src/imfs/imfs_creat.c129
-rw-r--r--c/src/exec/libfs/src/imfs/imfs_debug.c159
-rw-r--r--c/src/exec/libfs/src/imfs/imfs_directory.c347
-rw-r--r--c/src/exec/libfs/src/imfs/imfs_eval.c639
-rw-r--r--c/src/exec/libfs/src/imfs/imfs_fchmod.c54
-rw-r--r--c/src/exec/libfs/src/imfs/imfs_fcntl.c24
-rw-r--r--c/src/exec/libfs/src/imfs/imfs_fdatasync.c25
-rw-r--r--c/src/exec/libfs/src/imfs/imfs_free.c36
-rw-r--r--c/src/exec/libfs/src/imfs/imfs_fsunmount.c96
-rw-r--r--c/src/exec/libfs/src/imfs/imfs_getchild.c68
-rw-r--r--c/src/exec/libfs/src/imfs/imfs_gtkn.c84
-rw-r--r--c/src/exec/libfs/src/imfs/imfs_handlers_device.c37
-rw-r--r--c/src/exec/libfs/src/imfs/imfs_handlers_directory.c45
-rw-r--r--c/src/exec/libfs/src/imfs/imfs_handlers_link.c37
-rw-r--r--c/src/exec/libfs/src/imfs/imfs_handlers_memfile.c37
-rw-r--r--c/src/exec/libfs/src/imfs/imfs_init.c66
-rw-r--r--c/src/exec/libfs/src/imfs/imfs_initsupp.c80
-rw-r--r--c/src/exec/libfs/src/imfs/imfs_link.c71
-rw-r--r--c/src/exec/libfs/src/imfs/imfs_mknod.c73
-rw-r--r--c/src/exec/libfs/src/imfs/imfs_mount.c48
-rw-r--r--c/src/exec/libfs/src/imfs/imfs_ntype.c28
-rw-r--r--c/src/exec/libfs/src/imfs/imfs_readlink.c39
-rw-r--r--c/src/exec/libfs/src/imfs/imfs_rmnod.c76
-rw-r--r--c/src/exec/libfs/src/imfs/imfs_stat.c58
-rw-r--r--c/src/exec/libfs/src/imfs/imfs_symlink.c59
-rw-r--r--c/src/exec/libfs/src/imfs/imfs_unixstub.c70
-rw-r--r--c/src/exec/libfs/src/imfs/imfs_unlink.c73
-rw-r--r--c/src/exec/libfs/src/imfs/imfs_unmount.c57
-rw-r--r--c/src/exec/libfs/src/imfs/imfs_utime.c37
-rw-r--r--c/src/exec/libfs/src/imfs/ioman.c101
-rw-r--r--c/src/exec/libfs/src/imfs/memfile.c1096
-rw-r--r--c/src/exec/libfs/src/imfs/miniimfs_init.c69
-rw-r--r--c/src/exec/libnetworking/Makefile.am15
-rw-r--r--c/src/exec/libnetworking/README18
-rw-r--r--c/src/exec/libnetworking/arpa/Makefile.am9
-rw-r--r--c/src/exec/libnetworking/arpa/ftp.h111
-rw-r--r--c/src/exec/libnetworking/arpa/inet.h105
-rw-r--r--c/src/exec/libnetworking/arpa/nameser.h448
-rw-r--r--c/src/exec/libnetworking/arpa/nameser_compat.h194
-rw-r--r--c/src/exec/libnetworking/arpa/telnet.h342
-rw-r--r--c/src/exec/libnetworking/bpfilter.h6
-rw-r--r--c/src/exec/libnetworking/kern/Makefile.am35
-rw-r--r--c/src/exec/libnetworking/kern/kern_subr.c206
-rw-r--r--c/src/exec/libnetworking/kern/uipc_domain.c228
-rw-r--r--c/src/exec/libnetworking/kern/uipc_mbuf.c748
-rw-r--r--c/src/exec/libnetworking/kern/uipc_socket.c1143
-rw-r--r--c/src/exec/libnetworking/kern/uipc_socket2.c965
-rw-r--r--c/src/exec/libnetworking/lib/Makefile.am33
-rw-r--r--c/src/exec/libnetworking/lib/README5
-rw-r--r--c/src/exec/libnetworking/lib/getprotoby.c46
-rw-r--r--c/src/exec/libnetworking/lib/rtems_bsdnet_ntp.c158
-rw-r--r--c/src/exec/libnetworking/lib/syslog.c189
-rw-r--r--c/src/exec/libnetworking/lib/tftpDriver.c775
-rw-r--r--c/src/exec/libnetworking/libc/Makefile.am57
-rw-r--r--c/src/exec/libnetworking/libc/addr2ascii.3217
-rw-r--r--c/src/exec/libnetworking/libc/addr2ascii.c94
-rw-r--r--c/src/exec/libnetworking/libc/ascii2addr.c74
-rw-r--r--c/src/exec/libnetworking/libc/base64.c318
-rw-r--r--c/src/exec/libnetworking/libc/byteorder.377
-rw-r--r--c/src/exec/libnetworking/libc/ether_addr.c226
-rw-r--r--c/src/exec/libnetworking/libc/ethers.3193
-rw-r--r--c/src/exec/libnetworking/libc/gethostbydns.c773
-rw-r--r--c/src/exec/libnetworking/libc/gethostbyht.c202
-rw-r--r--c/src/exec/libnetworking/libc/gethostbyname.3305
-rw-r--r--c/src/exec/libnetworking/libc/gethostbynis.c142
-rw-r--r--c/src/exec/libnetworking/libc/gethostnamadr.c224
-rw-r--r--c/src/exec/libnetworking/libc/gethostname.c26
-rw-r--r--c/src/exec/libnetworking/libc/getnetbydns.c313
-rw-r--r--c/src/exec/libnetworking/libc/getnetbyht.c173
-rw-r--r--c/src/exec/libnetworking/libc/getnetbynis.c177
-rw-r--r--c/src/exec/libnetworking/libc/getnetent.3159
-rw-r--r--c/src/exec/libnetworking/libc/getnetnamadr.c190
-rw-r--r--c/src/exec/libnetworking/libc/getproto.c57
-rw-r--r--c/src/exec/libnetworking/libc/getprotoent.3147
-rw-r--r--c/src/exec/libnetworking/libc/getprotoent.c121
-rw-r--r--c/src/exec/libnetworking/libc/getprotoname.c64
-rw-r--r--c/src/exec/libnetworking/libc/getservbyname.c81
-rw-r--r--c/src/exec/libnetworking/libc/getservbyport.c76
-rw-r--r--c/src/exec/libnetworking/libc/getservent.3156
-rw-r--r--c/src/exec/libnetworking/libc/getservent.c280
-rw-r--r--c/src/exec/libnetworking/libc/herror.c122
-rw-r--r--c/src/exec/libnetworking/libc/inet.3210
-rw-r--r--c/src/exec/libnetworking/libc/inet_addr.c180
-rw-r--r--c/src/exec/libnetworking/libc/inet_lnaof.c61
-rw-r--r--c/src/exec/libnetworking/libc/inet_makeaddr.c64
-rw-r--r--c/src/exec/libnetworking/libc/inet_net_ntop.c140
-rw-r--r--c/src/exec/libnetworking/libc/inet_net_pton.c207
-rw-r--r--c/src/exec/libnetworking/libc/inet_neta.c84
-rw-r--r--c/src/exec/libnetworking/libc/inet_netof.c60
-rw-r--r--c/src/exec/libnetworking/libc/inet_network.c92
-rw-r--r--c/src/exec/libnetworking/libc/inet_ntoa.c59
-rw-r--r--c/src/exec/libnetworking/libc/inet_ntop.c191
-rw-r--r--c/src/exec/libnetworking/libc/inet_pton.c214
-rw-r--r--c/src/exec/libnetworking/libc/iso_addr.3111
-rw-r--r--c/src/exec/libnetworking/libc/iso_addr.c119
-rw-r--r--c/src/exec/libnetworking/libc/linkaddr.3138
-rw-r--r--c/src/exec/libnetworking/libc/linkaddr.c160
-rw-r--r--c/src/exec/libnetworking/libc/map_v4v6.c128
-rw-r--r--c/src/exec/libnetworking/libc/ns.3131
-rw-r--r--c/src/exec/libnetworking/libc/ns_addr.c229
-rw-r--r--c/src/exec/libnetworking/libc/ns_name.c595
-rw-r--r--c/src/exec/libnetworking/libc/ns_netint.c56
-rw-r--r--c/src/exec/libnetworking/libc/ns_ntoa.c102
-rw-r--r--c/src/exec/libnetworking/libc/ns_parse.c192
-rw-r--r--c/src/exec/libnetworking/libc/ns_print.c745
-rw-r--r--c/src/exec/libnetworking/libc/ns_ttl.c153
-rw-r--r--c/src/exec/libnetworking/libc/nsap_addr.c105
-rw-r--r--c/src/exec/libnetworking/libc/rcmd.3204
-rw-r--r--c/src/exec/libnetworking/libc/rcmd.c520
-rw-r--r--c/src/exec/libnetworking/libc/recv.c52
-rw-r--r--c/src/exec/libnetworking/libc/res_comp.c258
-rw-r--r--c/src/exec/libnetworking/libc/res_config.h20
-rw-r--r--c/src/exec/libnetworking/libc/res_data.c83
-rw-r--r--c/src/exec/libnetworking/libc/res_debug.c966
-rw-r--r--c/src/exec/libnetworking/libc/res_init.c497
-rw-r--r--c/src/exec/libnetworking/libc/res_mkquery.c199
-rw-r--r--c/src/exec/libnetworking/libc/res_mkupdate.c415
-rw-r--r--c/src/exec/libnetworking/libc/res_query.c410
-rw-r--r--c/src/exec/libnetworking/libc/res_send.c929
-rw-r--r--c/src/exec/libnetworking/libc/res_stubs.c75
-rw-r--r--c/src/exec/libnetworking/libc/res_update.c518
-rw-r--r--c/src/exec/libnetworking/libc/resolver.3352
-rw-r--r--c/src/exec/libnetworking/libc/send.c52
-rw-r--r--c/src/exec/libnetworking/libc/strsep.c85
-rw-r--r--c/src/exec/libnetworking/loop.h5
-rw-r--r--c/src/exec/libnetworking/machine/Makefile.am10
-rw-r--r--c/src/exec/libnetworking/machine/conf.h6
-rw-r--r--c/src/exec/libnetworking/machine/cpu.h6
-rw-r--r--c/src/exec/libnetworking/machine/cpufunc.h5
-rw-r--r--c/src/exec/libnetworking/machine/endian.h64
-rw-r--r--c/src/exec/libnetworking/machine/in_cksum.h218
-rw-r--r--c/src/exec/libnetworking/machine/limits.h6
-rw-r--r--c/src/exec/libnetworking/machine/param.h92
-rw-r--r--c/src/exec/libnetworking/machine/types.h34
-rw-r--r--c/src/exec/libnetworking/machine/vmparam.h6
-rw-r--r--c/src/exec/libnetworking/net/Makefile.am37
-rw-r--r--c/src/exec/libnetworking/net/bpf.h236
-rw-r--r--c/src/exec/libnetworking/net/ethernet.h63
-rw-r--r--c/src/exec/libnetworking/net/if.c794
-rw-r--r--c/src/exec/libnetworking/net/if.h474
-rw-r--r--c/src/exec/libnetworking/net/if_arp.h91
-rw-r--r--c/src/exec/libnetworking/net/if_dl.h86
-rw-r--r--c/src/exec/libnetworking/net/if_ethersubr.c997
-rw-r--r--c/src/exec/libnetworking/net/if_llc.h145
-rw-r--r--c/src/exec/libnetworking/net/if_loop.c301
-rw-r--r--c/src/exec/libnetworking/net/if_ppp.h132
-rw-r--r--c/src/exec/libnetworking/net/if_types.h101
-rw-r--r--c/src/exec/libnetworking/net/netisr.h90
-rw-r--r--c/src/exec/libnetworking/net/ppp-comp.h165
-rw-r--r--c/src/exec/libnetworking/net/ppp_defs.h183
-rw-r--r--c/src/exec/libnetworking/net/radix.c1028
-rw-r--r--c/src/exec/libnetworking/net/radix.h165
-rw-r--r--c/src/exec/libnetworking/net/raw_cb.c148
-rw-r--r--c/src/exec/libnetworking/net/raw_cb.h75
-rw-r--r--c/src/exec/libnetworking/net/raw_usrreq.c315
-rw-r--r--c/src/exec/libnetworking/net/route.c959
-rw-r--r--c/src/exec/libnetworking/net/route.h286
-rw-r--r--c/src/exec/libnetworking/net/rtsock.c829
-rw-r--r--c/src/exec/libnetworking/netdb.h182
-rw-r--r--c/src/exec/libnetworking/netinet/Makefile.am43
-rw-r--r--c/src/exec/libnetworking/netinet/icmp_var.h78
-rw-r--r--c/src/exec/libnetworking/netinet/if_ether.c638
-rw-r--r--c/src/exec/libnetworking/netinet/if_ether.h209
-rw-r--r--c/src/exec/libnetworking/netinet/igmp.c479
-rw-r--r--c/src/exec/libnetworking/netinet/igmp.h96
-rw-r--r--c/src/exec/libnetworking/netinet/igmp_var.h111
-rw-r--r--c/src/exec/libnetworking/netinet/in.c728
-rw-r--r--c/src/exec/libnetworking/netinet/in.h433
-rw-r--r--c/src/exec/libnetworking/netinet/in_cksum.c170
-rw-r--r--c/src/exec/libnetworking/netinet/in_cksum_i386.c200
-rw-r--r--c/src/exec/libnetworking/netinet/in_cksum_m68k.c223
-rw-r--r--c/src/exec/libnetworking/netinet/in_cksum_powerpc.c173
-rw-r--r--c/src/exec/libnetworking/netinet/in_pcb.c757
-rw-r--r--c/src/exec/libnetworking/netinet/in_pcb.h124
-rw-r--r--c/src/exec/libnetworking/netinet/in_proto.c203
-rw-r--r--c/src/exec/libnetworking/netinet/in_rmx.c384
-rw-r--r--c/src/exec/libnetworking/netinet/in_systm.h62
-rw-r--r--c/src/exec/libnetworking/netinet/in_var.h235
-rw-r--r--c/src/exec/libnetworking/netinet/ip.h190
-rw-r--r--c/src/exec/libnetworking/netinet/ip_divert.c382
-rw-r--r--c/src/exec/libnetworking/netinet/ip_fw.c1069
-rw-r--r--c/src/exec/libnetworking/netinet/ip_fw.h183
-rw-r--r--c/src/exec/libnetworking/netinet/ip_icmp.c711
-rw-r--r--c/src/exec/libnetworking/netinet/ip_icmp.h190
-rw-r--r--c/src/exec/libnetworking/netinet/ip_input.c1488
-rw-r--r--c/src/exec/libnetworking/netinet/ip_mroute.c2302
-rw-r--r--c/src/exec/libnetworking/netinet/ip_mroute.h262
-rw-r--r--c/src/exec/libnetworking/netinet/ip_output.c1307
-rw-r--r--c/src/exec/libnetworking/netinet/ip_var.h211
-rw-r--r--c/src/exec/libnetworking/netinet/raw_ip.c486
-rw-r--r--c/src/exec/libnetworking/netinet/tcp.h122
-rw-r--r--c/src/exec/libnetworking/netinet/tcp_debug.c172
-rw-r--r--c/src/exec/libnetworking/netinet/tcp_debug.h69
-rw-r--r--c/src/exec/libnetworking/netinet/tcp_fsm.h92
-rw-r--r--c/src/exec/libnetworking/netinet/tcp_input.c2150
-rw-r--r--c/src/exec/libnetworking/netinet/tcp_output.c755
-rw-r--r--c/src/exec/libnetworking/netinet/tcp_seq.h102
-rw-r--r--c/src/exec/libnetworking/netinet/tcp_subr.c634
-rw-r--r--c/src/exec/libnetworking/netinet/tcp_timer.c387
-rw-r--r--c/src/exec/libnetworking/netinet/tcp_timer.h138
-rw-r--r--c/src/exec/libnetworking/netinet/tcp_usrreq.c840
-rw-r--r--c/src/exec/libnetworking/netinet/tcp_var.h374
-rw-r--r--c/src/exec/libnetworking/netinet/tcpip.h75
-rw-r--r--c/src/exec/libnetworking/netinet/udp.h51
-rw-r--r--c/src/exec/libnetworking/netinet/udp_usrreq.c613
-rw-r--r--c/src/exec/libnetworking/netinet/udp_var.h103
-rw-r--r--c/src/exec/libnetworking/nfs/Makefile.am35
-rw-r--r--c/src/exec/libnetworking/nfs/bootp_subr.c1036
-rw-r--r--c/src/exec/libnetworking/nfs/krpc.h26
-rw-r--r--c/src/exec/libnetworking/nfs/nfs.h620
-rw-r--r--c/src/exec/libnetworking/nfs/nfsdiskless.h100
-rw-r--r--c/src/exec/libnetworking/nfs/nfsproto.h441
-rw-r--r--c/src/exec/libnetworking/nfs/rpcv2.h142
-rw-r--r--c/src/exec/libnetworking/nfs/xdr_subs.h90
-rw-r--r--c/src/exec/libnetworking/opt_ipfw.h6
-rw-r--r--c/src/exec/libnetworking/opt_mrouting.h6
-rw-r--r--c/src/exec/libnetworking/opt_tcpdebug.h16
-rw-r--r--c/src/exec/libnetworking/poll.h108
-rw-r--r--c/src/exec/libnetworking/resolv.h306
-rw-r--r--c/src/exec/libnetworking/rtems/Makefile.am41
-rw-r--r--c/src/exec/libnetworking/rtems/issetugid.c11
-rw-r--r--c/src/exec/libnetworking/rtems/rtems_bootp.c19
-rw-r--r--c/src/exec/libnetworking/rtems/rtems_bsdnet.h140
-rw-r--r--c/src/exec/libnetworking/rtems/rtems_bsdnet_internal.h193
-rw-r--r--c/src/exec/libnetworking/rtems/rtems_glue.c1020
-rw-r--r--c/src/exec/libnetworking/rtems/rtems_select.c174
-rw-r--r--c/src/exec/libnetworking/rtems/rtems_showicmpstat.c60
-rw-r--r--c/src/exec/libnetworking/rtems/rtems_showifstat.c112
-rw-r--r--c/src/exec/libnetworking/rtems/rtems_showipstat.c59
-rw-r--r--c/src/exec/libnetworking/rtems/rtems_showmbuf.c65
-rw-r--r--c/src/exec/libnetworking/rtems/rtems_showroute.c236
-rw-r--r--c/src/exec/libnetworking/rtems/rtems_showtcpstat.c102
-rw-r--r--c/src/exec/libnetworking/rtems/rtems_showudpstat.c48
-rw-r--r--c/src/exec/libnetworking/rtems/rtems_syscall.c760
-rw-r--r--c/src/exec/libnetworking/rtems/sghostname.c49
-rw-r--r--c/src/exec/libnetworking/rtems/tftp.h43
-rw-r--r--c/src/exec/libnetworking/sys/Makefile.am13
-rw-r--r--c/src/exec/libnetworking/sys/buf.h248
-rw-r--r--c/src/exec/libnetworking/sys/callout.h57
-rw-r--r--c/src/exec/libnetworking/sys/conf.h228
-rw-r--r--c/src/exec/libnetworking/sys/domain.h75
-rw-r--r--c/src/exec/libnetworking/sys/kernel.h251
-rw-r--r--c/src/exec/libnetworking/sys/libkern.h89
-rw-r--r--c/src/exec/libnetworking/sys/malloc.h355
-rw-r--r--c/src/exec/libnetworking/sys/mbuf.h440
-rw-r--r--c/src/exec/libnetworking/sys/mount.h531
-rw-r--r--c/src/exec/libnetworking/sys/param.h231
-rw-r--r--c/src/exec/libnetworking/sys/proc.h8
-rw-r--r--c/src/exec/libnetworking/sys/protosw.h300
-rw-r--r--c/src/exec/libnetworking/sys/queue.h446
-rw-r--r--c/src/exec/libnetworking/sys/reboot.h106
-rw-r--r--c/src/exec/libnetworking/sys/resourcevar.h5
-rw-r--r--c/src/exec/libnetworking/sys/rtprio.h70
-rw-r--r--c/src/exec/libnetworking/sys/select.h57
-rw-r--r--c/src/exec/libnetworking/sys/signalvar.h171
-rw-r--r--c/src/exec/libnetworking/sys/socket.h371
-rw-r--r--c/src/exec/libnetworking/sys/socketvar.h281
-rw-r--r--c/src/exec/libnetworking/sys/sysctl.h379
-rw-r--r--c/src/exec/libnetworking/sys/syslimits.h85
-rw-r--r--c/src/exec/libnetworking/sys/syslog.h195
-rw-r--r--c/src/exec/libnetworking/sys/systm.h198
-rw-r--r--c/src/exec/libnetworking/sys/ttydefaults.h97
-rw-r--r--c/src/exec/libnetworking/sys/ucred.h64
-rw-r--r--c/src/exec/libnetworking/sys/uio.h92
-rw-r--r--c/src/exec/libnetworking/syslog.h5
-rw-r--r--c/src/exec/libnetworking/vm/Makefile.am9
-rw-r--r--c/src/exec/libnetworking/vm/vm.h73
-rw-r--r--c/src/exec/libnetworking/vm/vm_extern.h103
-rw-r--r--c/src/exec/libnetworking/vm/vm_kern.h84
-rw-r--r--c/src/exec/libnetworking/vm/vm_param.h165
-rw-r--r--c/src/exec/libnetworking/wrapup/Makefile.am35
-rw-r--r--c/src/exec/librpc/Makefile.am11
-rw-r--r--c/src/exec/librpc/include/Makefile.am10
-rw-r--r--c/src/exec/librpc/include/rpc/Makefile.am26
-rw-r--r--c/src/exec/librpc/include/rpc/auth.h167
-rw-r--r--c/src/exec/librpc/include/rpc/clnt.h336
-rw-r--r--c/src/exec/librpc/include/rpc/rpc.h86
-rw-r--r--c/src/exec/librpc/include/rpc/rpc_msg.h192
-rw-r--r--c/src/exec/librpc/include/rpc/svc.h291
-rw-r--r--c/src/exec/librpc/include/rpc/svc_auth.h47
-rw-r--r--c/src/exec/librpc/include/rpc/types.h75
-rw-r--r--c/src/exec/librpc/include/rpc/xdr.h275
-rw-r--r--c/src/exec/librpc/src/Makefile.am35
-rw-r--r--c/src/exec/score/cpu/a29k/rtems/score/types.h56
-rw-r--r--c/src/exec/score/cpu/hppa1.1/rtems/score/types.h46
-rw-r--r--c/src/exec/score/cpu/i386/rtems/score/types.h57
-rw-r--r--c/src/exec/score/cpu/i960/rtems/score/types.h57
-rw-r--r--c/src/exec/score/cpu/m68k/rtems/score/types.h57
-rw-r--r--c/src/exec/score/cpu/mips/Makefile.am49
-rw-r--r--c/src/exec/score/cpu/mips/asm.h102
-rw-r--r--c/src/exec/score/cpu/mips/configure.in34
-rw-r--r--c/src/exec/score/cpu/mips/cpu.c218
-rw-r--r--c/src/exec/score/cpu/mips/cpu_asm.S971
-rw-r--r--c/src/exec/score/cpu/mips/cpu_asm.h115
-rw-r--r--c/src/exec/score/cpu/mips/idtcpu.h440
-rw-r--r--c/src/exec/score/cpu/mips/idtmon.h171
-rw-r--r--c/src/exec/score/cpu/mips/iregdef.h325
-rw-r--r--c/src/exec/score/cpu/mips/rtems.c52
-rw-r--r--c/src/exec/score/cpu/mips/rtems/Makefile.am10
-rw-r--r--c/src/exec/score/cpu/mips/rtems/score/Makefile.am26
-rw-r--r--c/src/exec/score/cpu/mips/rtems/score/cpu.h980
-rw-r--r--c/src/exec/score/cpu/mips/rtems/score/mips.h74
-rw-r--r--c/src/exec/score/cpu/mips/rtems/score/mips64orion.h74
-rw-r--r--c/src/exec/score/cpu/mips/rtems/score/mipstypes.h72
-rw-r--r--c/src/exec/score/cpu/mips/rtems/score/types.h72
-rw-r--r--c/src/exec/score/cpu/mips64orion/rtems/score/types.h72
-rw-r--r--c/src/exec/score/cpu/no_cpu/rtems/score/types.h56
-rw-r--r--c/src/exec/score/cpu/powerpc/asm.h275
-rw-r--r--c/src/exec/score/cpu/powerpc/rtems/score/ppc.h632
-rw-r--r--c/src/exec/score/cpu/powerpc/rtems/score/ppctypes.h73
-rw-r--r--c/src/exec/score/cpu/powerpc/rtems/score/types.h73
-rw-r--r--c/src/exec/score/cpu/sh/rtems/score/types.h67
-rw-r--r--c/src/exec/score/cpu/sparc/rtems/score/types.h63
-rw-r--r--c/src/exec/score/cpu/unix/rtems/score/types.h71
-rw-r--r--c/src/lib/include/rtems/assoc.h42
-rw-r--r--c/src/lib/include/rtems/error.h38
-rw-r--r--c/src/lib/include/rtems/libcsupport.h42
-rw-r--r--c/src/lib/include/rtems/libio.h584
-rw-r--r--c/src/lib/include/rtems/libio_.h272
-rw-r--r--c/src/lib/include/sys/filio.h56
-rw-r--r--c/src/lib/include/sys/ioctl.h77
-rw-r--r--c/src/lib/include/sys/sockio.h92
-rw-r--r--c/src/lib/include/sys/utsname.h49
-rw-r--r--c/src/lib/libbsp/i386/shared/irq/idt.c288
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/startup/cpuboot.c133
-rw-r--r--c/src/lib/libbsp/mips/Makefile.am12
-rw-r--r--c/src/lib/libbsp/mips/README7
-rw-r--r--c/src/lib/libbsp/mips/configure.in24
-rw-r--r--c/src/lib/libbsp/mips/p4000/Makefile.am17
-rw-r--r--c/src/lib/libbsp/mips/p4000/README47
-rw-r--r--c/src/lib/libbsp/mips/p4000/bsp_specs23
-rw-r--r--c/src/lib/libbsp/mips/p4000/configure.in32
-rw-r--r--c/src/lib/libbsp/mips/p4000/console/Makefile.am35
-rw-r--r--c/src/lib/libbsp/mips/p4000/console/console.c274
-rw-r--r--c/src/lib/libbsp/mips/p4000/console/led.S23
-rw-r--r--c/src/lib/libbsp/mips/p4000/include/Makefile.am21
-rw-r--r--c/src/lib/libbsp/mips/p4000/include/bsp.h117
-rw-r--r--c/src/lib/libbsp/mips/p4000/include/coverhd.h115
-rw-r--r--c/src/lib/libbsp/mips/p4000/liblnk/Makefile.am32
-rw-r--r--c/src/lib/libbsp/mips/p4000/liblnk/lnklib.S62
-rw-r--r--c/src/lib/libbsp/mips/p4000/start/Makefile.am32
-rw-r--r--c/src/lib/libbsp/mips/p4000/start/start.S299
-rw-r--r--c/src/lib/libbsp/mips/p4000/startup/Makefile.am47
-rw-r--r--c/src/lib/libbsp/mips/p4000/startup/bspclean.c37
-rw-r--r--c/src/lib/libbsp/mips/p4000/startup/bspstart.c119
-rw-r--r--c/src/lib/libbsp/mips/p4000/startup/ghlinkcmds19
-rw-r--r--c/src/lib/libbsp/mips/p4000/startup/idtmem.S938
-rw-r--r--c/src/lib/libbsp/mips/p4000/startup/idttlb.S390
-rw-r--r--c/src/lib/libbsp/mips/p4000/startup/inittlb.c16
-rw-r--r--c/src/lib/libbsp/mips/p4000/startup/linkcmds113
-rw-r--r--c/src/lib/libbsp/mips/p4000/startup/setvec.c52
-rw-r--r--c/src/lib/libbsp/mips/p4000/times200
-rw-r--r--c/src/lib/libbsp/mips/p4000/wrapup/Makefile.am34
-rw-r--r--c/src/lib/libbsp/powerpc/support/new_exception_processing/Makefile.am64
-rw-r--r--c/src/lib/libbsp/powerpc/support/new_exception_processing/c_isr.inl9
-rw-r--r--c/src/lib/libbsp/powerpc/support/new_exception_processing/cpu.c116
-rw-r--r--c/src/lib/libbsp/powerpc/support/new_exception_processing/cpu.h947
-rw-r--r--c/src/lib/libbsp/powerpc/support/new_exception_processing/cpu_asm.S396
-rw-r--r--c/src/lib/libbsp/powerpc/support/old_exception_processing/Makefile.am66
-rw-r--r--c/src/lib/libbsp/powerpc/support/old_exception_processing/README80
-rw-r--r--c/src/lib/libbsp/powerpc/support/old_exception_processing/TODO8
-rw-r--r--c/src/lib/libbsp/powerpc/support/old_exception_processing/c_isr.inl4
-rw-r--r--c/src/lib/libbsp/powerpc/support/old_exception_processing/cpu.c853
-rw-r--r--c/src/lib/libbsp/powerpc/support/old_exception_processing/cpu.h1200
-rw-r--r--c/src/lib/libbsp/powerpc/support/old_exception_processing/cpu_asm.S809
-rw-r--r--c/src/lib/libbsp/powerpc/support/old_exception_processing/irq_stub.S268
-rw-r--r--c/src/lib/libbsp/powerpc/support/old_exception_processing/ppccache.c61
-rw-r--r--c/src/lib/libbsp/powerpc/support/old_exception_processing/rtems.S132
-rw-r--r--c/src/lib/libc/utsname.c49
-rw-r--r--c/src/lib/libcpu/i386/idt.c288
-rw-r--r--c/src/lib/libcpu/m68k/shared/misc/memcpy.c87
-rw-r--r--c/src/lib/libcpu/mips/Makefile.am11
-rw-r--r--c/src/lib/libcpu/mips/clock/Makefile.am33
-rw-r--r--c/src/lib/libcpu/mips/clock/ckinit.c245
-rw-r--r--c/src/lib/libcpu/mips/clock/clock.S45
-rw-r--r--c/src/lib/libcpu/mips/clock/clock.h25
-rw-r--r--c/src/lib/libcpu/mips/configure.in33
-rw-r--r--c/src/lib/libcpu/mips/timer/Makefile.am31
-rw-r--r--c/src/lib/libcpu/mips/timer/gettime.S35
-rw-r--r--c/src/lib/libcpu/mips/timer/timer.c138
-rw-r--r--c/src/lib/libcpu/powerpc/new-exceptions/cpu.c116
-rw-r--r--c/src/lib/libcpu/powerpc/new-exceptions/cpu_asm.S396
-rw-r--r--c/src/lib/libcpu/powerpc/new_exception_processing/Makefile.am64
-rw-r--r--c/src/lib/libcpu/powerpc/new_exception_processing/c_isr.inl9
-rw-r--r--c/src/lib/libcpu/powerpc/new_exception_processing/cpu.c116
-rw-r--r--c/src/lib/libcpu/powerpc/new_exception_processing/cpu.h947
-rw-r--r--c/src/lib/libcpu/powerpc/new_exception_processing/cpu_asm.S396
-rw-r--r--c/src/lib/libcpu/powerpc/old-exceptions/README80
-rw-r--r--c/src/lib/libcpu/powerpc/old-exceptions/TODO8
-rw-r--r--c/src/lib/libcpu/powerpc/old-exceptions/cpu.c853
-rw-r--r--c/src/lib/libcpu/powerpc/old-exceptions/cpu_asm.S809
-rw-r--r--c/src/lib/libcpu/powerpc/old-exceptions/irq_stub.S268
-rw-r--r--c/src/lib/libcpu/powerpc/old-exceptions/ppccache.c61
-rw-r--r--c/src/lib/libcpu/powerpc/old_exception_processing/Makefile.am66
-rw-r--r--c/src/lib/libcpu/powerpc/old_exception_processing/README80
-rw-r--r--c/src/lib/libcpu/powerpc/old_exception_processing/TODO8
-rw-r--r--c/src/lib/libcpu/powerpc/old_exception_processing/c_isr.inl4
-rw-r--r--c/src/lib/libcpu/powerpc/old_exception_processing/cpu.c853
-rw-r--r--c/src/lib/libcpu/powerpc/old_exception_processing/cpu.h1200
-rw-r--r--c/src/lib/libcpu/powerpc/old_exception_processing/cpu_asm.S809
-rw-r--r--c/src/lib/libcpu/powerpc/old_exception_processing/irq_stub.S268
-rw-r--r--c/src/lib/libcpu/powerpc/old_exception_processing/rtems.S132
-rw-r--r--c/src/lib/libcpu/sh/sh7032/include/iosh7032.h223
-rw-r--r--c/src/lib/libcpu/sh/sh7032/include/ispsh7032.h165
-rw-r--r--c/src/lib/libcpu/sh/sh7032/score/cpu_asm.c318
-rw-r--r--c/src/lib/libcpu/sh/sh7032/score/ispsh7032.c256
-rw-r--r--c/src/lib/libcpu/sh/sh7045/include/io_types.h87
-rw-r--r--c/src/lib/libcpu/sh/sh7045/include/iosh7045.h321
-rw-r--r--c/src/lib/libcpu/sh/sh7045/include/ispsh7045.h211
-rw-r--r--c/src/lib/libcpu/sh/sh7045/score/cpu_asm.c318
-rw-r--r--c/src/lib/libcpu/sh/sh7045/score/ispsh7045.c315
-rw-r--r--c/src/lib/libcpu/sparc/include/erc32.h520
-rw-r--r--c/src/libchip/shmdr/README9
-rw-r--r--c/src/libchip/shmdr/addlq.c42
-rw-r--r--c/src/libchip/shmdr/cnvpkt.c41
-rw-r--r--c/src/libchip/shmdr/dump.c50
-rw-r--r--c/src/libchip/shmdr/fatal.c38
-rw-r--r--c/src/libchip/shmdr/getlq.c47
-rw-r--r--c/src/libchip/shmdr/getpkt.c35
-rw-r--r--c/src/libchip/shmdr/init.c253
-rw-r--r--c/src/libchip/shmdr/initlq.c34
-rw-r--r--c/src/libchip/shmdr/intr.c57
-rw-r--r--c/src/libchip/shmdr/mpci.h58
-rw-r--r--c/src/libchip/shmdr/mpisr.c22
-rw-r--r--c/src/libchip/shmdr/poll.c52
-rw-r--r--c/src/libchip/shmdr/receive.c43
-rw-r--r--c/src/libchip/shmdr/retpkt.c31
-rw-r--r--c/src/libchip/shmdr/send.c60
-rw-r--r--c/src/libchip/shmdr/setckvec.c33
-rw-r--r--c/src/libchip/shmdr/shm_driver.h541
-rw-r--r--c/src/libfs/src/imfs/deviceio.c221
-rw-r--r--c/src/libfs/src/imfs/imfs.h516
-rw-r--r--c/src/libfs/src/imfs/imfs_chown.c51
-rw-r--r--c/src/libfs/src/imfs/imfs_creat.c129
-rw-r--r--c/src/libfs/src/imfs/imfs_debug.c159
-rw-r--r--c/src/libfs/src/imfs/imfs_directory.c347
-rw-r--r--c/src/libfs/src/imfs/imfs_eval.c639
-rw-r--r--c/src/libfs/src/imfs/imfs_fchmod.c54
-rw-r--r--c/src/libfs/src/imfs/imfs_fcntl.c24
-rw-r--r--c/src/libfs/src/imfs/imfs_fdatasync.c25
-rw-r--r--c/src/libfs/src/imfs/imfs_free.c36
-rw-r--r--c/src/libfs/src/imfs/imfs_fsunmount.c96
-rw-r--r--c/src/libfs/src/imfs/imfs_getchild.c68
-rw-r--r--c/src/libfs/src/imfs/imfs_gtkn.c84
-rw-r--r--c/src/libfs/src/imfs/imfs_handlers_device.c37
-rw-r--r--c/src/libfs/src/imfs/imfs_handlers_directory.c45
-rw-r--r--c/src/libfs/src/imfs/imfs_handlers_link.c37
-rw-r--r--c/src/libfs/src/imfs/imfs_handlers_memfile.c37
-rw-r--r--c/src/libfs/src/imfs/imfs_init.c66
-rw-r--r--c/src/libfs/src/imfs/imfs_initsupp.c80
-rw-r--r--c/src/libfs/src/imfs/imfs_link.c71
-rw-r--r--c/src/libfs/src/imfs/imfs_mknod.c73
-rw-r--r--c/src/libfs/src/imfs/imfs_mount.c48
-rw-r--r--c/src/libfs/src/imfs/imfs_ntype.c28
-rw-r--r--c/src/libfs/src/imfs/imfs_readlink.c39
-rw-r--r--c/src/libfs/src/imfs/imfs_rmnod.c76
-rw-r--r--c/src/libfs/src/imfs/imfs_stat.c58
-rw-r--r--c/src/libfs/src/imfs/imfs_symlink.c59
-rw-r--r--c/src/libfs/src/imfs/imfs_unixstub.c70
-rw-r--r--c/src/libfs/src/imfs/imfs_unlink.c73
-rw-r--r--c/src/libfs/src/imfs/imfs_unmount.c57
-rw-r--r--c/src/libfs/src/imfs/imfs_utime.c37
-rw-r--r--c/src/libfs/src/imfs/ioman.c101
-rw-r--r--c/src/libfs/src/imfs/memfile.c1096
-rw-r--r--c/src/libfs/src/imfs/miniimfs_init.c69
-rw-r--r--c/src/librdbg/src/powerpc/new_exception_processing/Makefile.am93
-rw-r--r--c/src/librdbg/src/powerpc/new_exception_processing/remdeb.h581
-rw-r--r--c/src/librdbg/src/powerpc/new_exception_processing/remdeb_f.x76
-rw-r--r--c/src/librdbg/src/powerpc/new_exception_processing/remdeb_svc.c122
-rw-r--r--c/src/librdbg/src/powerpc/new_exception_processing/remdeb_xdr.c928
-rw-r--r--c/src/make/README489
-rw-r--r--c/src/make/compilers/gcc-target-default.cfg295
-rw-r--r--c/src/make/directory.cfg60
-rw-r--r--c/src/make/host.cfg.in80
-rw-r--r--c/src/make/lib.cfg18
-rw-r--r--c/src/optman/rtems/Makefile.am35
-rw-r--r--c/src/optman/rtems/no-dpmem.c97
-rw-r--r--c/src/optman/rtems/no-event.c55
-rw-r--r--c/src/optman/rtems/no-mp.c203
-rw-r--r--c/src/optman/rtems/no-msg.c191
-rw-r--r--c/src/optman/rtems/no-part.c96
-rw-r--r--c/src/optman/rtems/no-region.c113
-rw-r--r--c/src/optman/rtems/no-rtmon.c116
-rw-r--r--c/src/optman/rtems/no-sem.c113
-rw-r--r--c/src/optman/rtems/no-signal.c55
-rw-r--r--c/src/optman/rtems/no-timer.c122
-rw-r--r--c/src/optman/sapi/Makefile.am34
-rw-r--r--c/src/optman/sapi/no-ext.c66
-rw-r--r--c/src/optman/sapi/no-io.c143
-rw-r--r--cpukit/Makefile.am19
-rw-r--r--cpukit/ada/rtems.adb2064
-rw-r--r--cpukit/ada/rtems.ads1439
-rw-r--r--cpukit/ftpd/Makefile.am31
-rw-r--r--cpukit/ftpd/ftpd.c1072
-rw-r--r--cpukit/ftpd/ftpd.h42
-rw-r--r--cpukit/httpd/Makefile.am41
-rw-r--r--cpukit/httpd/asp.c313
-rw-r--r--cpukit/httpd/balloc.c836
-rw-r--r--cpukit/httpd/default.c389
-rw-r--r--cpukit/httpd/ej.h226
-rw-r--r--cpukit/httpd/ejlex.c679
-rw-r--r--cpukit/httpd/ejparse.c1665
-rw-r--r--cpukit/httpd/form.c163
-rw-r--r--cpukit/httpd/h.c171
-rw-r--r--cpukit/httpd/handler.c284
-rw-r--r--cpukit/httpd/mime.c112
-rw-r--r--cpukit/httpd/misc.c581
-rw-r--r--cpukit/httpd/ringq.c537
-rw-r--r--cpukit/httpd/rom.c198
-rw-r--r--cpukit/httpd/rtems_webserver.h7
-rw-r--r--cpukit/httpd/security.c109
-rw-r--r--cpukit/httpd/socket.c994
-rw-r--r--cpukit/httpd/sym.c452
-rw-r--r--cpukit/httpd/uemf.c193
-rw-r--r--cpukit/httpd/uemf.h666
-rw-r--r--cpukit/httpd/url.c203
-rw-r--r--cpukit/httpd/value.c74
-rw-r--r--cpukit/httpd/wbase64.c149
-rw-r--r--cpukit/httpd/webcomp.c177
-rw-r--r--cpukit/httpd/webmain.c417
-rw-r--r--cpukit/httpd/webpage.c138
-rw-r--r--cpukit/httpd/webrom.c12
-rw-r--r--cpukit/httpd/webs.c1841
-rw-r--r--cpukit/httpd/webs.h182
-rw-r--r--cpukit/httpd/websuemf.c39
-rw-r--r--cpukit/httpd/wsIntrn.h268
-rw-r--r--cpukit/include/rtems/libio_.h272
-rw-r--r--cpukit/itron/Makefile.am11
-rw-r--r--cpukit/itron/include/Makefile.am27
-rw-r--r--cpukit/itron/include/itron.h52
-rw-r--r--cpukit/itron/include/itronsys/README9
-rw-r--r--cpukit/itron/include/itronsys/eventflags.h146
-rw-r--r--cpukit/itron/include/itronsys/fmempool.h125
-rw-r--r--cpukit/itron/include/itronsys/intr.h106
-rw-r--r--cpukit/itron/include/itronsys/mbox.h138
-rw-r--r--cpukit/itron/include/itronsys/msgbuffer.h160
-rw-r--r--cpukit/itron/include/itronsys/network.h78
-rw-r--r--cpukit/itron/include/itronsys/port.h190
-rw-r--r--cpukit/itron/include/itronsys/semaphore.h121
-rw-r--r--cpukit/itron/include/itronsys/status.h70
-rw-r--r--cpukit/itron/include/itronsys/sysmgmt.h319
-rw-r--r--cpukit/itron/include/itronsys/task.h298
-rw-r--r--cpukit/itron/include/itronsys/time.h185
-rw-r--r--cpukit/itron/include/itronsys/types.h121
-rw-r--r--cpukit/itron/include/itronsys/vmempool.h132
-rw-r--r--cpukit/itron/include/rtems/itron/README10
-rw-r--r--cpukit/itron/include/rtems/itron/config.h62
-rw-r--r--cpukit/itron/include/rtems/itron/eventflags.h61
-rw-r--r--cpukit/itron/include/rtems/itron/fmempool.h62
-rw-r--r--cpukit/itron/include/rtems/itron/intr.h31
-rw-r--r--cpukit/itron/include/rtems/itron/itronapi.h30
-rw-r--r--cpukit/itron/include/rtems/itron/mbox.h73
-rw-r--r--cpukit/itron/include/rtems/itron/msgbuffer.h72
-rw-r--r--cpukit/itron/include/rtems/itron/network.h31
-rw-r--r--cpukit/itron/include/rtems/itron/object.h120
-rw-r--r--cpukit/itron/include/rtems/itron/port.h61
-rw-r--r--cpukit/itron/include/rtems/itron/semaphore.h59
-rw-r--r--cpukit/itron/include/rtems/itron/sysmgmt.h31
-rw-r--r--cpukit/itron/include/rtems/itron/task.h102
-rw-r--r--cpukit/itron/include/rtems/itron/time.h31
-rw-r--r--cpukit/itron/include/rtems/itron/vmempool.h62
-rw-r--r--cpukit/itron/inline/Makefile.am10
-rw-r--r--cpukit/itron/inline/rtems/itron/eventflags.inl151
-rw-r--r--cpukit/itron/inline/rtems/itron/fmempool.inl158
-rw-r--r--cpukit/itron/inline/rtems/itron/intr.inl30
-rw-r--r--cpukit/itron/inline/rtems/itron/mbox.inl151
-rw-r--r--cpukit/itron/inline/rtems/itron/msgbuffer.inl156
-rw-r--r--cpukit/itron/inline/rtems/itron/network.inl30
-rw-r--r--cpukit/itron/inline/rtems/itron/port.inl151
-rw-r--r--cpukit/itron/inline/rtems/itron/semaphore.inl183
-rw-r--r--cpukit/itron/inline/rtems/itron/sysmgmt.inl30
-rw-r--r--cpukit/itron/inline/rtems/itron/task.inl181
-rw-r--r--cpukit/itron/inline/rtems/itron/time.inl30
-rw-r--r--cpukit/itron/inline/rtems/itron/vmempool.inl161
-rw-r--r--cpukit/itron/src/Makefile.am69
-rw-r--r--cpukit/itron/src/TODO13
-rw-r--r--cpukit/itron/src/can_wup.c49
-rw-r--r--cpukit/itron/src/chg_pri.c66
-rw-r--r--cpukit/itron/src/cre_mbf.c87
-rw-r--r--cpukit/itron/src/cre_mbx.c103
-rw-r--r--cpukit/itron/src/cre_sem.c96
-rw-r--r--cpukit/itron/src/cre_tsk.c117
-rw-r--r--cpukit/itron/src/del_mbf.c54
-rw-r--r--cpukit/itron/src/del_mbx.c64
-rw-r--r--cpukit/itron/src/del_sem.c64
-rw-r--r--cpukit/itron/src/del_tsk.c55
-rw-r--r--cpukit/itron/src/dis_dsp.c38
-rw-r--r--cpukit/itron/src/ena_dsp.c33
-rw-r--r--cpukit/itron/src/eventflags.c155
-rw-r--r--cpukit/itron/src/exd_tsk.c43
-rw-r--r--cpukit/itron/src/ext_tsk.c42
-rw-r--r--cpukit/itron/src/fmempool.c138
-rw-r--r--cpukit/itron/src/frsm_tsk.c58
-rw-r--r--cpukit/itron/src/get_tid.c38
-rw-r--r--cpukit/itron/src/itronintr.c107
-rw-r--r--cpukit/itron/src/itronsem.c56
-rw-r--r--cpukit/itron/src/itrontime.c244
-rw-r--r--cpukit/itron/src/mbox.c54
-rw-r--r--cpukit/itron/src/mboxtranslatereturncode.c44
-rw-r--r--cpukit/itron/src/msgbuffer.c57
-rw-r--r--cpukit/itron/src/msgbuffertranslatereturncode.c44
-rw-r--r--cpukit/itron/src/network.c68
-rw-r--r--cpukit/itron/src/port.c205
-rw-r--r--cpukit/itron/src/prcv_mbf.c30
-rw-r--r--cpukit/itron/src/prcv_mbx.c29
-rw-r--r--cpukit/itron/src/preq_sem.c29
-rw-r--r--cpukit/itron/src/psnd_mbf.c30
-rw-r--r--cpukit/itron/src/rcv_mbf.c30
-rw-r--r--cpukit/itron/src/rcv_mbx.c29
-rw-r--r--cpukit/itron/src/ref_mbf.c79
-rw-r--r--cpukit/itron/src/ref_mbx.c62
-rw-r--r--cpukit/itron/src/ref_sem.c62
-rw-r--r--cpukit/itron/src/ref_tsk.c99
-rw-r--r--cpukit/itron/src/rel_wai.c51
-rw-r--r--cpukit/itron/src/rot_rdq.c53
-rw-r--r--cpukit/itron/src/rsm_tsk.c57
-rw-r--r--cpukit/itron/src/sig_sem.c52
-rw-r--r--cpukit/itron/src/slp_tsk.c31
-rw-r--r--cpukit/itron/src/snd_mbf.c30
-rw-r--r--cpukit/itron/src/snd_mbx.c67
-rw-r--r--cpukit/itron/src/sta_tsk.c69
-rw-r--r--cpukit/itron/src/sus_tsk.c65
-rw-r--r--cpukit/itron/src/sysmgmt.c72
-rw-r--r--cpukit/itron/src/task.c218
-rw-r--r--cpukit/itron/src/ter_tsk.c61
-rw-r--r--cpukit/itron/src/trcv_mbf.c80
-rw-r--r--cpukit/itron/src/trcv_mbx.c72
-rw-r--r--cpukit/itron/src/tslp_tsk.c34
-rw-r--r--cpukit/itron/src/tsnd_mbf.c85
-rw-r--r--cpukit/itron/src/twai_sem.c65
-rw-r--r--cpukit/itron/src/vmempool.c141
-rw-r--r--cpukit/itron/src/wai_sem.c29
-rw-r--r--cpukit/itron/src/wup_tsk.c33
-rw-r--r--cpukit/libcsupport/Makefile.am12
-rw-r--r--cpukit/libcsupport/include/chain.h362
-rw-r--r--cpukit/libcsupport/include/clockdrv.h50
-rw-r--r--cpukit/libcsupport/include/console.h72
-rw-r--r--cpukit/libcsupport/include/iosupp.h43
-rw-r--r--cpukit/libcsupport/include/motorola/mc68230.h70
-rw-r--r--cpukit/libcsupport/include/motorola/mc68681.h306
-rw-r--r--cpukit/libcsupport/include/ringbuf.h53
-rw-r--r--cpukit/libcsupport/include/rtems/assoc.h42
-rw-r--r--cpukit/libcsupport/include/rtems/error.h38
-rw-r--r--cpukit/libcsupport/include/rtems/libcsupport.h42
-rw-r--r--cpukit/libcsupport/include/rtems/libio.h584
-rw-r--r--cpukit/libcsupport/include/rtems/libio_.h272
-rw-r--r--cpukit/libcsupport/include/spurious.h38
-rw-r--r--cpukit/libcsupport/include/sys/filio.h56
-rw-r--r--cpukit/libcsupport/include/sys/ioctl.h77
-rw-r--r--cpukit/libcsupport/include/sys/sockio.h92
-rw-r--r--cpukit/libcsupport/include/sys/termios.h189
-rw-r--r--cpukit/libcsupport/include/sys/utime.h25
-rw-r--r--cpukit/libcsupport/include/sys/utsname.h49
-rw-r--r--cpukit/libcsupport/include/timerdrv.h39
-rw-r--r--cpukit/libcsupport/include/vmeintr.h57
-rw-r--r--cpukit/libcsupport/include/zilog/z8036.h108
-rw-r--r--cpukit/libcsupport/include/zilog/z8530.h98
-rw-r--r--cpukit/libcsupport/include/zilog/z8536.h111
-rw-r--r--cpukit/libcsupport/src/CASES23
-rw-r--r--cpukit/libcsupport/src/README37
-rw-r--r--cpukit/libcsupport/src/TODO11
-rw-r--r--cpukit/libcsupport/src/__brk.c28
-rw-r--r--cpukit/libcsupport/src/__getpid.c14
-rw-r--r--cpukit/libcsupport/src/__gettod.c116
-rw-r--r--cpukit/libcsupport/src/__sbrk.c28
-rw-r--r--cpukit/libcsupport/src/__times.c85
-rw-r--r--cpukit/libcsupport/src/access.c45
-rw-r--r--cpukit/libcsupport/src/assoc.c250
-rw-r--r--cpukit/libcsupport/src/assocnamebad.c37
-rw-r--r--cpukit/libcsupport/src/base_fs.c113
-rw-r--r--cpukit/libcsupport/src/cfgetispeed.c28
-rw-r--r--cpukit/libcsupport/src/cfgetospeed.c28
-rw-r--r--cpukit/libcsupport/src/cfsetispeed.c35
-rw-r--r--cpukit/libcsupport/src/cfsetospeed.c35
-rw-r--r--cpukit/libcsupport/src/chdir.c55
-rw-r--r--cpukit/libcsupport/src/chmod.c46
-rw-r--r--cpukit/libcsupport/src/chown.c44
-rw-r--r--cpukit/libcsupport/src/close.c53
-rw-r--r--cpukit/libcsupport/src/closedir.c70
-rw-r--r--cpukit/libcsupport/src/creat.c11
-rw-r--r--cpukit/libcsupport/src/ctermid.c32
-rw-r--r--cpukit/libcsupport/src/dup.c22
-rw-r--r--cpukit/libcsupport/src/dup2.c48
-rw-r--r--cpukit/libcsupport/src/error.c210
-rw-r--r--cpukit/libcsupport/src/eval.c73
-rw-r--r--cpukit/libcsupport/src/fchmod.c44
-rw-r--r--cpukit/libcsupport/src/fcntl.c142
-rw-r--r--cpukit/libcsupport/src/fdatasync.c37
-rw-r--r--cpukit/libcsupport/src/fpathconf.c82
-rw-r--r--cpukit/libcsupport/src/fs_null_handlers.c36
-rw-r--r--cpukit/libcsupport/src/fstat.c75
-rw-r--r--cpukit/libcsupport/src/fsync.c37
-rw-r--r--cpukit/libcsupport/src/ftruncate.c53
-rw-r--r--cpukit/libcsupport/src/getcwd.c280
-rw-r--r--cpukit/libcsupport/src/getdents.c58
-rw-r--r--cpukit/libcsupport/src/getgrent.c173
-rw-r--r--cpukit/libcsupport/src/getpwent.c227
-rw-r--r--cpukit/libcsupport/src/hosterr.c47
-rw-r--r--cpukit/libcsupport/src/ioctl.c42
-rw-r--r--cpukit/libcsupport/src/isatty.c17
-rw-r--r--cpukit/libcsupport/src/libio.c327
-rw-r--r--cpukit/libcsupport/src/libio_sockets.c63
-rw-r--r--cpukit/libcsupport/src/link.c94
-rw-r--r--cpukit/libcsupport/src/lseek.c78
-rw-r--r--cpukit/libcsupport/src/lstat.c18
-rw-r--r--cpukit/libcsupport/src/malloc.c422
-rw-r--r--cpukit/libcsupport/src/mkdir.c27
-rw-r--r--cpukit/libcsupport/src/mkfifo.c24
-rw-r--r--cpukit/libcsupport/src/mknod.c64
-rw-r--r--cpukit/libcsupport/src/mount.c286
-rw-r--r--cpukit/libcsupport/src/newlibc.c359
-rw-r--r--cpukit/libcsupport/src/no_libc.c56
-rw-r--r--cpukit/libcsupport/src/no_posix.c101
-rw-r--r--cpukit/libcsupport/src/open.c205
-rw-r--r--cpukit/libcsupport/src/opendir.c85
-rw-r--r--cpukit/libcsupport/src/pathconf.c37
-rw-r--r--cpukit/libcsupport/src/pipe.c22
-rw-r--r--cpukit/libcsupport/src/read.c66
-rw-r--r--cpukit/libcsupport/src/readdir.c86
-rw-r--r--cpukit/libcsupport/src/readlink.c52
-rw-r--r--cpukit/libcsupport/src/rewinddir.c35
-rw-r--r--cpukit/libcsupport/src/rmdir.c65
-rw-r--r--cpukit/libcsupport/src/scandir.c149
-rw-r--r--cpukit/libcsupport/src/seekdir.c40
-rw-r--r--cpukit/libcsupport/src/stat.c98
-rw-r--r--cpukit/libcsupport/src/symlink.c37
-rw-r--r--cpukit/libcsupport/src/tcdrain.c34
-rw-r--r--cpukit/libcsupport/src/tcflow.c32
-rw-r--r--cpukit/libcsupport/src/tcflush.c32
-rw-r--r--cpukit/libcsupport/src/tcgetattr.c34
-rw-r--r--cpukit/libcsupport/src/tcgetprgrp.c32
-rw-r--r--cpukit/libcsupport/src/tcsendbreak.c32
-rw-r--r--cpukit/libcsupport/src/tcsetattr.c48
-rw-r--r--cpukit/libcsupport/src/tcsetpgrp.c32
-rw-r--r--cpukit/libcsupport/src/telldir.c43
-rw-r--r--cpukit/libcsupport/src/termios.c1131
-rw-r--r--cpukit/libcsupport/src/termiosinitialize.c50
-rw-r--r--cpukit/libcsupport/src/termiosreserveresources.c28
-rw-r--r--cpukit/libcsupport/src/truncate.c40
-rw-r--r--cpukit/libcsupport/src/ttyname.c74
-rw-r--r--cpukit/libcsupport/src/ttyname_r.c113
-rw-r--r--cpukit/libcsupport/src/umask.c29
-rw-r--r--cpukit/libcsupport/src/unixlibc.c32
-rw-r--r--cpukit/libcsupport/src/unlink.c73
-rw-r--r--cpukit/libcsupport/src/unmount.c223
-rw-r--r--cpukit/libcsupport/src/utime.c39
-rw-r--r--cpukit/libcsupport/src/utsname.c49
-rw-r--r--cpukit/libcsupport/src/write.c74
-rw-r--r--cpukit/libfs/src/imfs/deviceio.c221
-rw-r--r--cpukit/libfs/src/imfs/imfs.h516
-rw-r--r--cpukit/libfs/src/imfs/imfs_chown.c51
-rw-r--r--cpukit/libfs/src/imfs/imfs_creat.c129
-rw-r--r--cpukit/libfs/src/imfs/imfs_debug.c159
-rw-r--r--cpukit/libfs/src/imfs/imfs_directory.c347
-rw-r--r--cpukit/libfs/src/imfs/imfs_eval.c639
-rw-r--r--cpukit/libfs/src/imfs/imfs_fchmod.c54
-rw-r--r--cpukit/libfs/src/imfs/imfs_fcntl.c24
-rw-r--r--cpukit/libfs/src/imfs/imfs_fdatasync.c25
-rw-r--r--cpukit/libfs/src/imfs/imfs_free.c36
-rw-r--r--cpukit/libfs/src/imfs/imfs_fsunmount.c96
-rw-r--r--cpukit/libfs/src/imfs/imfs_getchild.c68
-rw-r--r--cpukit/libfs/src/imfs/imfs_gtkn.c84
-rw-r--r--cpukit/libfs/src/imfs/imfs_handlers_device.c37
-rw-r--r--cpukit/libfs/src/imfs/imfs_handlers_directory.c45
-rw-r--r--cpukit/libfs/src/imfs/imfs_handlers_link.c37
-rw-r--r--cpukit/libfs/src/imfs/imfs_handlers_memfile.c37
-rw-r--r--cpukit/libfs/src/imfs/imfs_init.c66
-rw-r--r--cpukit/libfs/src/imfs/imfs_initsupp.c80
-rw-r--r--cpukit/libfs/src/imfs/imfs_link.c71
-rw-r--r--cpukit/libfs/src/imfs/imfs_mknod.c73
-rw-r--r--cpukit/libfs/src/imfs/imfs_mount.c48
-rw-r--r--cpukit/libfs/src/imfs/imfs_ntype.c28
-rw-r--r--cpukit/libfs/src/imfs/imfs_readlink.c39
-rw-r--r--cpukit/libfs/src/imfs/imfs_rmnod.c76
-rw-r--r--cpukit/libfs/src/imfs/imfs_stat.c58
-rw-r--r--cpukit/libfs/src/imfs/imfs_symlink.c59
-rw-r--r--cpukit/libfs/src/imfs/imfs_unixstub.c70
-rw-r--r--cpukit/libfs/src/imfs/imfs_unlink.c73
-rw-r--r--cpukit/libfs/src/imfs/imfs_unmount.c57
-rw-r--r--cpukit/libfs/src/imfs/imfs_utime.c37
-rw-r--r--cpukit/libfs/src/imfs/ioman.c101
-rw-r--r--cpukit/libfs/src/imfs/memfile.c1096
-rw-r--r--cpukit/libfs/src/imfs/miniimfs_init.c69
-rw-r--r--cpukit/libmisc/Makefile.am13
-rw-r--r--cpukit/libmisc/README23
-rw-r--r--cpukit/libmisc/cpuuse/Makefile.am41
-rw-r--r--cpukit/libmisc/cpuuse/README41
-rw-r--r--cpukit/libmisc/cpuuse/cpuuse.c139
-rw-r--r--cpukit/libmisc/cpuuse/cpuuse.h40
-rw-r--r--cpukit/libmisc/dummy/Makefile.am36
-rw-r--r--cpukit/libmisc/dummy/README23
-rw-r--r--cpukit/libmisc/dummy/dummy.c35
-rw-r--r--cpukit/libmisc/dumpbuf/Makefile.am41
-rw-r--r--cpukit/libmisc/dumpbuf/dumpbuf.c75
-rw-r--r--cpukit/libmisc/dumpbuf/dumpbuf.h21
-rw-r--r--cpukit/libmisc/monitor/Makefile.am54
-rw-r--r--cpukit/libmisc/monitor/README97
-rw-r--r--cpukit/libmisc/monitor/mon-command.c186
-rw-r--r--cpukit/libmisc/monitor/mon-config.c131
-rw-r--r--cpukit/libmisc/monitor/mon-dname.c112
-rw-r--r--cpukit/libmisc/monitor/mon-driver.c136
-rw-r--r--cpukit/libmisc/monitor/mon-extension.c98
-rw-r--r--cpukit/libmisc/monitor/mon-itask.c115
-rw-r--r--cpukit/libmisc/monitor/mon-manager.c48
-rw-r--r--cpukit/libmisc/monitor/mon-monitor.c518
-rw-r--r--cpukit/libmisc/monitor/mon-mpci.c159
-rw-r--r--cpukit/libmisc/monitor/mon-object.c382
-rw-r--r--cpukit/libmisc/monitor/mon-prmisc.c259
-rw-r--r--cpukit/libmisc/monitor/mon-queue.c64
-rw-r--r--cpukit/libmisc/monitor/mon-server.c303
-rw-r--r--cpukit/libmisc/monitor/mon-symbols.c484
-rw-r--r--cpukit/libmisc/monitor/mon-task.c93
-rw-r--r--cpukit/libmisc/monitor/monitor.h449
-rw-r--r--cpukit/libmisc/monitor/symbols.h62
-rw-r--r--cpukit/libmisc/rtmonuse/Makefile.am41
-rw-r--r--cpukit/libmisc/rtmonuse/rtmonuse.c178
-rw-r--r--cpukit/libmisc/rtmonuse/rtmonuse.h18
-rw-r--r--cpukit/libmisc/stackchk/Makefile.am42
-rw-r--r--cpukit/libmisc/stackchk/README56
-rw-r--r--cpukit/libmisc/stackchk/check.c531
-rw-r--r--cpukit/libmisc/stackchk/internal.h95
-rw-r--r--cpukit/libmisc/stackchk/stackchk.h82
-rw-r--r--cpukit/libmisc/untar/Makefile.am41
-rw-r--r--cpukit/libmisc/untar/README26
-rw-r--r--cpukit/libmisc/untar/untar.c382
-rw-r--r--cpukit/libmisc/untar/untar.h25
-rw-r--r--cpukit/libmisc/wrapup/Makefile.am39
-rw-r--r--cpukit/libnetworking/Makefile.am15
-rw-r--r--cpukit/libnetworking/README18
-rw-r--r--cpukit/libnetworking/arpa/Makefile.am9
-rw-r--r--cpukit/libnetworking/arpa/ftp.h111
-rw-r--r--cpukit/libnetworking/arpa/inet.h105
-rw-r--r--cpukit/libnetworking/arpa/nameser.h448
-rw-r--r--cpukit/libnetworking/arpa/nameser_compat.h194
-rw-r--r--cpukit/libnetworking/arpa/telnet.h342
-rw-r--r--cpukit/libnetworking/bpfilter.h6
-rw-r--r--cpukit/libnetworking/kern/Makefile.am35
-rw-r--r--cpukit/libnetworking/kern/kern_subr.c206
-rw-r--r--cpukit/libnetworking/kern/uipc_domain.c228
-rw-r--r--cpukit/libnetworking/kern/uipc_mbuf.c748
-rw-r--r--cpukit/libnetworking/kern/uipc_socket.c1143
-rw-r--r--cpukit/libnetworking/kern/uipc_socket2.c965
-rw-r--r--cpukit/libnetworking/lib/Makefile.am33
-rw-r--r--cpukit/libnetworking/lib/README5
-rw-r--r--cpukit/libnetworking/lib/getprotoby.c46
-rw-r--r--cpukit/libnetworking/lib/rtems_bsdnet_ntp.c158
-rw-r--r--cpukit/libnetworking/lib/syslog.c189
-rw-r--r--cpukit/libnetworking/lib/tftpDriver.c775
-rw-r--r--cpukit/libnetworking/libc/Makefile.am57
-rw-r--r--cpukit/libnetworking/libc/addr2ascii.3217
-rw-r--r--cpukit/libnetworking/libc/addr2ascii.c94
-rw-r--r--cpukit/libnetworking/libc/ascii2addr.c74
-rw-r--r--cpukit/libnetworking/libc/base64.c318
-rw-r--r--cpukit/libnetworking/libc/byteorder.377
-rw-r--r--cpukit/libnetworking/libc/ether_addr.c226
-rw-r--r--cpukit/libnetworking/libc/ethers.3193
-rw-r--r--cpukit/libnetworking/libc/gethostbydns.c773
-rw-r--r--cpukit/libnetworking/libc/gethostbyht.c202
-rw-r--r--cpukit/libnetworking/libc/gethostbyname.3305
-rw-r--r--cpukit/libnetworking/libc/gethostbynis.c142
-rw-r--r--cpukit/libnetworking/libc/gethostnamadr.c224
-rw-r--r--cpukit/libnetworking/libc/gethostname.c26
-rw-r--r--cpukit/libnetworking/libc/getnetbydns.c313
-rw-r--r--cpukit/libnetworking/libc/getnetbyht.c173
-rw-r--r--cpukit/libnetworking/libc/getnetbynis.c177
-rw-r--r--cpukit/libnetworking/libc/getnetent.3159
-rw-r--r--cpukit/libnetworking/libc/getnetnamadr.c190
-rw-r--r--cpukit/libnetworking/libc/getproto.c57
-rw-r--r--cpukit/libnetworking/libc/getprotoent.3147
-rw-r--r--cpukit/libnetworking/libc/getprotoent.c121
-rw-r--r--cpukit/libnetworking/libc/getprotoname.c64
-rw-r--r--cpukit/libnetworking/libc/getservbyname.c81
-rw-r--r--cpukit/libnetworking/libc/getservbyport.c76
-rw-r--r--cpukit/libnetworking/libc/getservent.3156
-rw-r--r--cpukit/libnetworking/libc/getservent.c280
-rw-r--r--cpukit/libnetworking/libc/herror.c122
-rw-r--r--cpukit/libnetworking/libc/inet.3210
-rw-r--r--cpukit/libnetworking/libc/inet_addr.c180
-rw-r--r--cpukit/libnetworking/libc/inet_lnaof.c61
-rw-r--r--cpukit/libnetworking/libc/inet_makeaddr.c64
-rw-r--r--cpukit/libnetworking/libc/inet_net_ntop.c140
-rw-r--r--cpukit/libnetworking/libc/inet_net_pton.c207
-rw-r--r--cpukit/libnetworking/libc/inet_neta.c84
-rw-r--r--cpukit/libnetworking/libc/inet_netof.c60
-rw-r--r--cpukit/libnetworking/libc/inet_network.c92
-rw-r--r--cpukit/libnetworking/libc/inet_ntoa.c59
-rw-r--r--cpukit/libnetworking/libc/inet_ntop.c191
-rw-r--r--cpukit/libnetworking/libc/inet_pton.c214
-rw-r--r--cpukit/libnetworking/libc/iso_addr.3111
-rw-r--r--cpukit/libnetworking/libc/iso_addr.c119
-rw-r--r--cpukit/libnetworking/libc/linkaddr.3138
-rw-r--r--cpukit/libnetworking/libc/linkaddr.c160
-rw-r--r--cpukit/libnetworking/libc/map_v4v6.c128
-rw-r--r--cpukit/libnetworking/libc/ns.3131
-rw-r--r--cpukit/libnetworking/libc/ns_addr.c229
-rw-r--r--cpukit/libnetworking/libc/ns_name.c595
-rw-r--r--cpukit/libnetworking/libc/ns_netint.c56
-rw-r--r--cpukit/libnetworking/libc/ns_ntoa.c102
-rw-r--r--cpukit/libnetworking/libc/ns_parse.c192
-rw-r--r--cpukit/libnetworking/libc/ns_print.c745
-rw-r--r--cpukit/libnetworking/libc/ns_ttl.c153
-rw-r--r--cpukit/libnetworking/libc/nsap_addr.c105
-rw-r--r--cpukit/libnetworking/libc/rcmd.3204
-rw-r--r--cpukit/libnetworking/libc/rcmd.c520
-rw-r--r--cpukit/libnetworking/libc/recv.c52
-rw-r--r--cpukit/libnetworking/libc/res_comp.c258
-rw-r--r--cpukit/libnetworking/libc/res_config.h20
-rw-r--r--cpukit/libnetworking/libc/res_data.c83
-rw-r--r--cpukit/libnetworking/libc/res_debug.c966
-rw-r--r--cpukit/libnetworking/libc/res_init.c497
-rw-r--r--cpukit/libnetworking/libc/res_mkquery.c199
-rw-r--r--cpukit/libnetworking/libc/res_mkupdate.c415
-rw-r--r--cpukit/libnetworking/libc/res_query.c410
-rw-r--r--cpukit/libnetworking/libc/res_send.c929
-rw-r--r--cpukit/libnetworking/libc/res_stubs.c75
-rw-r--r--cpukit/libnetworking/libc/res_update.c518
-rw-r--r--cpukit/libnetworking/libc/resolver.3352
-rw-r--r--cpukit/libnetworking/libc/send.c52
-rw-r--r--cpukit/libnetworking/libc/strsep.c85
-rw-r--r--cpukit/libnetworking/loop.h5
-rw-r--r--cpukit/libnetworking/machine/Makefile.am10
-rw-r--r--cpukit/libnetworking/machine/conf.h6
-rw-r--r--cpukit/libnetworking/machine/cpu.h6
-rw-r--r--cpukit/libnetworking/machine/cpufunc.h5
-rw-r--r--cpukit/libnetworking/machine/endian.h64
-rw-r--r--cpukit/libnetworking/machine/in_cksum.h218
-rw-r--r--cpukit/libnetworking/machine/limits.h6
-rw-r--r--cpukit/libnetworking/machine/param.h92
-rw-r--r--cpukit/libnetworking/machine/types.h34
-rw-r--r--cpukit/libnetworking/machine/vmparam.h6
-rw-r--r--cpukit/libnetworking/net/Makefile.am37
-rw-r--r--cpukit/libnetworking/net/bpf.h236
-rw-r--r--cpukit/libnetworking/net/ethernet.h63
-rw-r--r--cpukit/libnetworking/net/if.c794
-rw-r--r--cpukit/libnetworking/net/if.h474
-rw-r--r--cpukit/libnetworking/net/if_arp.h91
-rw-r--r--cpukit/libnetworking/net/if_dl.h86
-rw-r--r--cpukit/libnetworking/net/if_ethersubr.c997
-rw-r--r--cpukit/libnetworking/net/if_llc.h145
-rw-r--r--cpukit/libnetworking/net/if_loop.c301
-rw-r--r--cpukit/libnetworking/net/if_ppp.h132
-rw-r--r--cpukit/libnetworking/net/if_types.h101
-rw-r--r--cpukit/libnetworking/net/netisr.h90
-rw-r--r--cpukit/libnetworking/net/ppp-comp.h165
-rw-r--r--cpukit/libnetworking/net/ppp_defs.h183
-rw-r--r--cpukit/libnetworking/net/radix.c1028
-rw-r--r--cpukit/libnetworking/net/radix.h165
-rw-r--r--cpukit/libnetworking/net/raw_cb.c148
-rw-r--r--cpukit/libnetworking/net/raw_cb.h75
-rw-r--r--cpukit/libnetworking/net/raw_usrreq.c315
-rw-r--r--cpukit/libnetworking/net/route.c959
-rw-r--r--cpukit/libnetworking/net/route.h286
-rw-r--r--cpukit/libnetworking/net/rtsock.c829
-rw-r--r--cpukit/libnetworking/netdb.h182
-rw-r--r--cpukit/libnetworking/netinet/Makefile.am43
-rw-r--r--cpukit/libnetworking/netinet/icmp_var.h78
-rw-r--r--cpukit/libnetworking/netinet/if_ether.c638
-rw-r--r--cpukit/libnetworking/netinet/if_ether.h209
-rw-r--r--cpukit/libnetworking/netinet/igmp.c479
-rw-r--r--cpukit/libnetworking/netinet/igmp.h96
-rw-r--r--cpukit/libnetworking/netinet/igmp_var.h111
-rw-r--r--cpukit/libnetworking/netinet/in.c728
-rw-r--r--cpukit/libnetworking/netinet/in.h433
-rw-r--r--cpukit/libnetworking/netinet/in_cksum.c170
-rw-r--r--cpukit/libnetworking/netinet/in_cksum_i386.c200
-rw-r--r--cpukit/libnetworking/netinet/in_cksum_i386.h200
-rw-r--r--cpukit/libnetworking/netinet/in_cksum_m68k.c223
-rw-r--r--cpukit/libnetworking/netinet/in_cksum_m68k.h223
-rw-r--r--cpukit/libnetworking/netinet/in_cksum_powerpc.c173
-rw-r--r--cpukit/libnetworking/netinet/in_cksum_powerpc.h173
-rw-r--r--cpukit/libnetworking/netinet/in_pcb.c757
-rw-r--r--cpukit/libnetworking/netinet/in_pcb.h124
-rw-r--r--cpukit/libnetworking/netinet/in_proto.c203
-rw-r--r--cpukit/libnetworking/netinet/in_rmx.c384
-rw-r--r--cpukit/libnetworking/netinet/in_systm.h62
-rw-r--r--cpukit/libnetworking/netinet/in_var.h235
-rw-r--r--cpukit/libnetworking/netinet/ip.h190
-rw-r--r--cpukit/libnetworking/netinet/ip_divert.c382
-rw-r--r--cpukit/libnetworking/netinet/ip_fw.c1069
-rw-r--r--cpukit/libnetworking/netinet/ip_fw.h183
-rw-r--r--cpukit/libnetworking/netinet/ip_icmp.c711
-rw-r--r--cpukit/libnetworking/netinet/ip_icmp.h190
-rw-r--r--cpukit/libnetworking/netinet/ip_input.c1488
-rw-r--r--cpukit/libnetworking/netinet/ip_mroute.c2302
-rw-r--r--cpukit/libnetworking/netinet/ip_mroute.h262
-rw-r--r--cpukit/libnetworking/netinet/ip_output.c1307
-rw-r--r--cpukit/libnetworking/netinet/ip_var.h211
-rw-r--r--cpukit/libnetworking/netinet/raw_ip.c486
-rw-r--r--cpukit/libnetworking/netinet/tcp.h122
-rw-r--r--cpukit/libnetworking/netinet/tcp_debug.c172
-rw-r--r--cpukit/libnetworking/netinet/tcp_debug.h69
-rw-r--r--cpukit/libnetworking/netinet/tcp_fsm.h92
-rw-r--r--cpukit/libnetworking/netinet/tcp_input.c2150
-rw-r--r--cpukit/libnetworking/netinet/tcp_output.c755
-rw-r--r--cpukit/libnetworking/netinet/tcp_seq.h102
-rw-r--r--cpukit/libnetworking/netinet/tcp_subr.c634
-rw-r--r--cpukit/libnetworking/netinet/tcp_timer.c387
-rw-r--r--cpukit/libnetworking/netinet/tcp_timer.h138
-rw-r--r--cpukit/libnetworking/netinet/tcp_usrreq.c840
-rw-r--r--cpukit/libnetworking/netinet/tcp_var.h374
-rw-r--r--cpukit/libnetworking/netinet/tcpip.h75
-rw-r--r--cpukit/libnetworking/netinet/udp.h51
-rw-r--r--cpukit/libnetworking/netinet/udp_usrreq.c613
-rw-r--r--cpukit/libnetworking/netinet/udp_var.h103
-rw-r--r--cpukit/libnetworking/nfs/Makefile.am35
-rw-r--r--cpukit/libnetworking/nfs/bootp_subr.c1036
-rw-r--r--cpukit/libnetworking/nfs/krpc.h26
-rw-r--r--cpukit/libnetworking/nfs/nfs.h620
-rw-r--r--cpukit/libnetworking/nfs/nfsdiskless.h100
-rw-r--r--cpukit/libnetworking/nfs/nfsproto.h441
-rw-r--r--cpukit/libnetworking/nfs/rpcv2.h142
-rw-r--r--cpukit/libnetworking/nfs/xdr_subs.h90
-rw-r--r--cpukit/libnetworking/opt_ipfw.h6
-rw-r--r--cpukit/libnetworking/opt_mrouting.h6
-rw-r--r--cpukit/libnetworking/opt_tcpdebug.h16
-rw-r--r--cpukit/libnetworking/poll.h108
-rw-r--r--cpukit/libnetworking/resolv.h306
-rw-r--r--cpukit/libnetworking/rtems/Makefile.am41
-rw-r--r--cpukit/libnetworking/rtems/issetugid.c11
-rw-r--r--cpukit/libnetworking/rtems/rtems_bootp.c19
-rw-r--r--cpukit/libnetworking/rtems/rtems_bsdnet.h140
-rw-r--r--cpukit/libnetworking/rtems/rtems_bsdnet_internal.h193
-rw-r--r--cpukit/libnetworking/rtems/rtems_glue.c1020
-rw-r--r--cpukit/libnetworking/rtems/rtems_select.c174
-rw-r--r--cpukit/libnetworking/rtems/rtems_showicmpstat.c60
-rw-r--r--cpukit/libnetworking/rtems/rtems_showifstat.c112
-rw-r--r--cpukit/libnetworking/rtems/rtems_showipstat.c59
-rw-r--r--cpukit/libnetworking/rtems/rtems_showmbuf.c65
-rw-r--r--cpukit/libnetworking/rtems/rtems_showroute.c236
-rw-r--r--cpukit/libnetworking/rtems/rtems_showtcpstat.c102
-rw-r--r--cpukit/libnetworking/rtems/rtems_showudpstat.c48
-rw-r--r--cpukit/libnetworking/rtems/rtems_syscall.c760
-rw-r--r--cpukit/libnetworking/rtems/sghostname.c49
-rw-r--r--cpukit/libnetworking/rtems/tftp.h43
-rw-r--r--cpukit/libnetworking/sys/Makefile.am13
-rw-r--r--cpukit/libnetworking/sys/buf.h248
-rw-r--r--cpukit/libnetworking/sys/callout.h57
-rw-r--r--cpukit/libnetworking/sys/conf.h228
-rw-r--r--cpukit/libnetworking/sys/domain.h75
-rw-r--r--cpukit/libnetworking/sys/kernel.h251
-rw-r--r--cpukit/libnetworking/sys/libkern.h89
-rw-r--r--cpukit/libnetworking/sys/malloc.h355
-rw-r--r--cpukit/libnetworking/sys/mbuf.h440
-rw-r--r--cpukit/libnetworking/sys/mount.h531
-rw-r--r--cpukit/libnetworking/sys/param.h231
-rw-r--r--cpukit/libnetworking/sys/proc.h8
-rw-r--r--cpukit/libnetworking/sys/protosw.h300
-rw-r--r--cpukit/libnetworking/sys/queue.h446
-rw-r--r--cpukit/libnetworking/sys/reboot.h106
-rw-r--r--cpukit/libnetworking/sys/resourcevar.h5
-rw-r--r--cpukit/libnetworking/sys/rtprio.h70
-rw-r--r--cpukit/libnetworking/sys/select.h57
-rw-r--r--cpukit/libnetworking/sys/signalvar.h171
-rw-r--r--cpukit/libnetworking/sys/socket.h371
-rw-r--r--cpukit/libnetworking/sys/socketvar.h281
-rw-r--r--cpukit/libnetworking/sys/sysctl.h379
-rw-r--r--cpukit/libnetworking/sys/syslimits.h85
-rw-r--r--cpukit/libnetworking/sys/syslog.h195
-rw-r--r--cpukit/libnetworking/sys/systm.h198
-rw-r--r--cpukit/libnetworking/sys/ttydefaults.h97
-rw-r--r--cpukit/libnetworking/sys/ucred.h64
-rw-r--r--cpukit/libnetworking/sys/uio.h92
-rw-r--r--cpukit/libnetworking/syslog.h5
-rw-r--r--cpukit/libnetworking/vm/Makefile.am9
-rw-r--r--cpukit/libnetworking/vm/vm.h73
-rw-r--r--cpukit/libnetworking/vm/vm_extern.h103
-rw-r--r--cpukit/libnetworking/vm/vm_kern.h84
-rw-r--r--cpukit/libnetworking/vm/vm_param.h165
-rw-r--r--cpukit/libnetworking/wrapup/Makefile.am35
-rw-r--r--cpukit/librpc/Makefile.am11
-rw-r--r--cpukit/librpc/include/Makefile.am10
-rw-r--r--cpukit/librpc/include/rpc/Makefile.am26
-rw-r--r--cpukit/librpc/include/rpc/auth.h167
-rw-r--r--cpukit/librpc/include/rpc/clnt.h336
-rw-r--r--cpukit/librpc/include/rpc/rpc.h86
-rw-r--r--cpukit/librpc/include/rpc/rpc_msg.h192
-rw-r--r--cpukit/librpc/include/rpc/svc.h291
-rw-r--r--cpukit/librpc/include/rpc/svc_auth.h47
-rw-r--r--cpukit/librpc/include/rpc/types.h75
-rw-r--r--cpukit/librpc/include/rpc/xdr.h275
-rw-r--r--cpukit/librpc/src/Makefile.am35
-rw-r--r--cpukit/posix/Makefile.am11
-rw-r--r--cpukit/posix/include/Makefile.am32
-rw-r--r--cpukit/posix/include/aio.h145
-rw-r--r--cpukit/posix/include/devctl.h38
-rw-r--r--cpukit/posix/include/intr.h80
-rw-r--r--cpukit/posix/include/mqueue.h153
-rw-r--r--cpukit/posix/include/rtems/posix/cancel.h29
-rw-r--r--cpukit/posix/include/rtems/posix/cond.h167
-rw-r--r--cpukit/posix/include/rtems/posix/condmp.h161
-rw-r--r--cpukit/posix/include/rtems/posix/config.h62
-rw-r--r--cpukit/posix/include/rtems/posix/intr.h153
-rw-r--r--cpukit/posix/include/rtems/posix/key.h135
-rw-r--r--cpukit/posix/include/rtems/posix/mqueue.h242
-rw-r--r--cpukit/posix/include/rtems/posix/mqueuemp.h160
-rw-r--r--cpukit/posix/include/rtems/posix/mutex.h156
-rw-r--r--cpukit/posix/include/rtems/posix/mutexmp.h173
-rw-r--r--cpukit/posix/include/rtems/posix/posixapi.h33
-rw-r--r--cpukit/posix/include/rtems/posix/priority.h44
-rw-r--r--cpukit/posix/include/rtems/posix/psignal.h121
-rw-r--r--cpukit/posix/include/rtems/posix/pthread.h150
-rw-r--r--cpukit/posix/include/rtems/posix/pthreadmp.h160
-rw-r--r--cpukit/posix/include/rtems/posix/ptimer.h91
-rw-r--r--cpukit/posix/include/rtems/posix/semaphore.h181
-rw-r--r--cpukit/posix/include/rtems/posix/semaphoremp.h160
-rw-r--r--cpukit/posix/include/rtems/posix/threadsup.h44
-rw-r--r--cpukit/posix/include/rtems/posix/time.h50
-rw-r--r--cpukit/posix/include/rtems/posix/timer.h57
-rw-r--r--cpukit/posix/include/sched.h96
-rw-r--r--cpukit/posix/include/semaphore.h116
-rw-r--r--cpukit/posix/inline/Makefile.am10
-rw-r--r--cpukit/posix/inline/rtems/posix/cond.inl76
-rw-r--r--cpukit/posix/inline/rtems/posix/intr.inl71
-rw-r--r--cpukit/posix/inline/rtems/posix/key.inl69
-rw-r--r--cpukit/posix/inline/rtems/posix/mqueue.inl110
-rw-r--r--cpukit/posix/inline/rtems/posix/mutex.inl92
-rw-r--r--cpukit/posix/inline/rtems/posix/priority.inl37
-rw-r--r--cpukit/posix/inline/rtems/posix/pthread.inl69
-rw-r--r--cpukit/posix/inline/rtems/posix/semaphore.inl85
-rw-r--r--cpukit/posix/macros/Makefile.am10
-rw-r--r--cpukit/posix/src/Makefile.am109
-rw-r--r--cpukit/posix/src/README.mqueue27
-rw-r--r--cpukit/posix/src/adasupp.c28
-rw-r--r--cpukit/posix/src/aio.c114
-rw-r--r--cpukit/posix/src/alarm.c47
-rw-r--r--cpukit/posix/src/cancel.c46
-rw-r--r--cpukit/posix/src/cancelrun.c55
-rw-r--r--cpukit/posix/src/cleanuppop.c47
-rw-r--r--cpukit/posix/src/cleanuppush.c47
-rw-r--r--cpukit/posix/src/clockgetcpuclockid.c28
-rw-r--r--cpukit/posix/src/clockgetenableattr.c28
-rw-r--r--cpukit/posix/src/clockgetres.c48
-rw-r--r--cpukit/posix/src/clockgettime.c65
-rw-r--r--cpukit/posix/src/clocksetenableattr.c28
-rw-r--r--cpukit/posix/src/clocksettime.c84
-rw-r--r--cpukit/posix/src/cond.c43
-rw-r--r--cpukit/posix/src/condattrdestroy.c31
-rw-r--r--cpukit/posix/src/condattrgetpshared.c32
-rw-r--r--cpukit/posix/src/condattrinit.c31
-rw-r--r--cpukit/posix/src/condattrsetpshared.c39
-rw-r--r--cpukit/posix/src/condbroadcast.c26
-rw-r--r--cpukit/posix/src/conddefaultattributes.c24
-rw-r--r--cpukit/posix/src/conddestroy.c76
-rw-r--r--cpukit/posix/src/condinit.c101
-rw-r--r--cpukit/posix/src/condmp.c42
-rw-r--r--cpukit/posix/src/condsignal.c26
-rw-r--r--cpukit/posix/src/condsignalsupp.c57
-rw-r--r--cpukit/posix/src/condtimedwait.c57
-rw-r--r--cpukit/posix/src/condwait.c32
-rw-r--r--cpukit/posix/src/condwaitsupp.c104
-rw-r--r--cpukit/posix/src/devctl.c22
-rw-r--r--cpukit/posix/src/execl.c17
-rw-r--r--cpukit/posix/src/execle.c17
-rw-r--r--cpukit/posix/src/execlp.c17
-rw-r--r--cpukit/posix/src/execv.c17
-rw-r--r--cpukit/posix/src/execve.c18
-rw-r--r--cpukit/posix/src/execvp.c16
-rw-r--r--cpukit/posix/src/fork.c14
-rw-r--r--cpukit/posix/src/getegid.c26
-rw-r--r--cpukit/posix/src/geteuid.c25
-rw-r--r--cpukit/posix/src/getgid.c38
-rw-r--r--cpukit/posix/src/getgroups.c26
-rw-r--r--cpukit/posix/src/getlogin.c46
-rw-r--r--cpukit/posix/src/getpgrp.c27
-rw-r--r--cpukit/posix/src/getpid.c41
-rw-r--r--cpukit/posix/src/getppid.c25
-rw-r--r--cpukit/posix/src/getuid.c38
-rw-r--r--cpukit/posix/src/intr.c340
-rw-r--r--cpukit/posix/src/key.c37
-rw-r--r--cpukit/posix/src/keycreate.c85
-rw-r--r--cpukit/posix/src/keydelete.c54
-rw-r--r--cpukit/posix/src/keygetspecific.c43
-rw-r--r--cpukit/posix/src/keyrundestructors.c76
-rw-r--r--cpukit/posix/src/keysetspecific.c43
-rw-r--r--cpukit/posix/src/kill.c49
-rw-r--r--cpukit/posix/src/killinfo.c330
-rw-r--r--cpukit/posix/src/mqueue.c57
-rw-r--r--cpukit/posix/src/mqueueclose.c58
-rw-r--r--cpukit/posix/src/mqueuecreatesupp.c157
-rw-r--r--cpukit/posix/src/mqueuedeletesupp.c70
-rw-r--r--cpukit/posix/src/mqueuegetattr.c76
-rw-r--r--cpukit/posix/src/mqueuenametoid.c62
-rw-r--r--cpukit/posix/src/mqueuenotify.c101
-rw-r--r--cpukit/posix/src/mqueueopen.c134
-rw-r--r--cpukit/posix/src/mqueuereceive.c53
-rw-r--r--cpukit/posix/src/mqueuerecvsupp.c101
-rw-r--r--cpukit/posix/src/mqueuesend.c53
-rw-r--r--cpukit/posix/src/mqueuesendsupp.c99
-rw-r--r--cpukit/posix/src/mqueuesetattr.c97
-rw-r--r--cpukit/posix/src/mqueuetimedreceive.c54
-rw-r--r--cpukit/posix/src/mqueuetimedsend.c54
-rw-r--r--cpukit/posix/src/mqueuetranslatereturncode.c97
-rw-r--r--cpukit/posix/src/mqueueunlink.c80
-rw-r--r--cpukit/posix/src/mutex.c45
-rw-r--r--cpukit/posix/src/mutexattrdestroy.c34
-rw-r--r--cpukit/posix/src/mutexattrgetprioceiling.c34
-rw-r--r--cpukit/posix/src/mutexattrgetprotocol.c34
-rw-r--r--cpukit/posix/src/mutexattrgetpshared.c34
-rw-r--r--cpukit/posix/src/mutexattrinit.c33
-rw-r--r--cpukit/posix/src/mutexattrsetprioceiling.c37
-rw-r--r--cpukit/posix/src/mutexattrsetprotocol.c42
-rw-r--r--cpukit/posix/src/mutexattrsetpshared.c42
-rw-r--r--cpukit/posix/src/mutexdefaultattributes.c30
-rw-r--r--cpukit/posix/src/mutexdestroy.c83
-rw-r--r--cpukit/posix/src/mutexfromcorestatus.c48
-rw-r--r--cpukit/posix/src/mutexgetprioceiling.c51
-rw-r--r--cpukit/posix/src/mutexinit.c184
-rw-r--r--cpukit/posix/src/mutexlock.c31
-rw-r--r--cpukit/posix/src/mutexlocksupp.c62
-rw-r--r--cpukit/posix/src/mutexmp.c62
-rw-r--r--cpukit/posix/src/mutexsetprioceiling.c78
-rw-r--r--cpukit/posix/src/mutextimedlock.c36
-rw-r--r--cpukit/posix/src/mutextrylock.c31
-rw-r--r--cpukit/posix/src/mutexunlock.c62
-rw-r--r--cpukit/posix/src/nanosleep.c100
-rw-r--r--cpukit/posix/src/pause.c38
-rw-r--r--cpukit/posix/src/posixintervaltotimespec.c34
-rw-r--r--cpukit/posix/src/posixtimespecsubtract.c46
-rw-r--r--cpukit/posix/src/posixtimespectointerval.c38
-rw-r--r--cpukit/posix/src/psignal.c246
-rw-r--r--cpukit/posix/src/psignalchecksignal.c90
-rw-r--r--cpukit/posix/src/psignalclearprocesssignals.c38
-rw-r--r--cpukit/posix/src/psignalclearsignals.c85
-rw-r--r--cpukit/posix/src/psignalsetprocesssignals.c38
-rw-r--r--cpukit/posix/src/psignalunblockthread.c89
-rw-r--r--cpukit/posix/src/pthread.c377
-rw-r--r--cpukit/posix/src/pthreadatfork.c27
-rw-r--r--cpukit/posix/src/pthreadattrdestroy.c29
-rw-r--r--cpukit/posix/src/pthreadattrgetdetachstate.c29
-rw-r--r--cpukit/posix/src/pthreadattrgetinheritsched.c29
-rw-r--r--cpukit/posix/src/pthreadattrgetschedparam.c28
-rw-r--r--cpukit/posix/src/pthreadattrgetschedpolicy.c29
-rw-r--r--cpukit/posix/src/pthreadattrgetscope.c28
-rw-r--r--cpukit/posix/src/pthreadattrgetstackaddr.c28
-rw-r--r--cpukit/posix/src/pthreadattrgetstacksize.c28
-rw-r--r--cpukit/posix/src/pthreadattrinit.c30
-rw-r--r--cpukit/posix/src/pthreadattrsetdetachstate.c35
-rw-r--r--cpukit/posix/src/pthreadattrsetinheritsched.c38
-rw-r--r--cpukit/posix/src/pthreadattrsetschedparam.c28
-rw-r--r--cpukit/posix/src/pthreadattrsetschedpolicy.c40
-rw-r--r--cpukit/posix/src/pthreadattrsetscope.c40
-rw-r--r--cpukit/posix/src/pthreadattrsetstackaddr.c28
-rw-r--r--cpukit/posix/src/pthreadattrsetstacksize.c33
-rw-r--r--cpukit/posix/src/pthreadcreate.c249
-rw-r--r--cpukit/posix/src/pthreaddetach.c45
-rw-r--r--cpukit/posix/src/pthreadequal.c79
-rw-r--r--cpukit/posix/src/pthreadexit.c46
-rw-r--r--cpukit/posix/src/pthreadgetcpuclockid.c24
-rw-r--r--cpukit/posix/src/pthreadgetcputime.c28
-rw-r--r--cpukit/posix/src/pthreadgetschedparam.c53
-rw-r--r--cpukit/posix/src/pthreadjoin.c69
-rw-r--r--cpukit/posix/src/pthreadkill.c76
-rw-r--r--cpukit/posix/src/pthreadonce.c39
-rw-r--r--cpukit/posix/src/pthreadself.c24
-rw-r--r--cpukit/posix/src/pthreadsetcputime.c35
-rw-r--r--cpukit/posix/src/pthreadsetschedparam.c126
-rw-r--r--cpukit/posix/src/pthreadsigmask.c70
-rw-r--r--cpukit/posix/src/ptimer.c98
-rw-r--r--cpukit/posix/src/ptimer1.c897
-rw-r--r--cpukit/posix/src/sched.c153
-rw-r--r--cpukit/posix/src/semaphore.c45
-rw-r--r--cpukit/posix/src/semaphorecreatesupp.c130
-rw-r--r--cpukit/posix/src/semaphoredeletesupp.c61
-rw-r--r--cpukit/posix/src/semaphoremp.c142
-rw-r--r--cpukit/posix/src/semaphorenametoid.c48
-rw-r--r--cpukit/posix/src/semaphorewaitsupp.c67
-rw-r--r--cpukit/posix/src/semclose.c51
-rw-r--r--cpukit/posix/src/semdestroy.c54
-rw-r--r--cpukit/posix/src/semgetvalue.c46
-rw-r--r--cpukit/posix/src/seminit.c47
-rw-r--r--cpukit/posix/src/semopen.c120
-rw-r--r--cpukit/posix/src/sempost.c53
-rw-r--r--cpukit/posix/src/semtimedwait.c36
-rw-r--r--cpukit/posix/src/semtrywait.c31
-rw-r--r--cpukit/posix/src/semunlink.c71
-rw-r--r--cpukit/posix/src/semwait.c31
-rw-r--r--cpukit/posix/src/setcancelstate.c46
-rw-r--r--cpukit/posix/src/setcanceltype.c46
-rw-r--r--cpukit/posix/src/setpgid.c25
-rw-r--r--cpukit/posix/src/setsid.c24
-rw-r--r--cpukit/posix/src/sigaction.c90
-rw-r--r--cpukit/posix/src/sigaddset.c39
-rw-r--r--cpukit/posix/src/sigdelset.c44
-rw-r--r--cpukit/posix/src/sigemptyset.c33
-rw-r--r--cpukit/posix/src/sigfillset.c33
-rw-r--r--cpukit/posix/src/sigismember.c42
-rw-r--r--cpukit/posix/src/signal_2.c49
-rw-r--r--cpukit/posix/src/sigpending.c37
-rw-r--r--cpukit/posix/src/sigprocmask.c36
-rw-r--r--cpukit/posix/src/sigqueue.c30
-rw-r--r--cpukit/posix/src/sigsuspend.c42
-rw-r--r--cpukit/posix/src/sigtimedwait.c123
-rw-r--r--cpukit/posix/src/sigwait.c42
-rw-r--r--cpukit/posix/src/sigwaitinfo.c30
-rw-r--r--cpukit/posix/src/sleep.c27
-rw-r--r--cpukit/posix/src/sysconf.c20
-rw-r--r--cpukit/posix/src/testcancel.c31
-rw-r--r--cpukit/posix/src/time.c48
-rw-r--r--cpukit/posix/src/types.c43
-rw-r--r--cpukit/posix/src/wait.c17
-rw-r--r--cpukit/posix/src/waitpid.c17
-rw-r--r--cpukit/pppd/Makefile.am44
-rw-r--r--cpukit/pppd/README58
-rw-r--r--cpukit/pppd/STATUS27
-rw-r--r--cpukit/pppd/auth.c843
-rw-r--r--cpukit/pppd/cbcp.c431
-rw-r--r--cpukit/pppd/cbcp.h26
-rw-r--r--cpukit/pppd/ccp.c1117
-rw-r--r--cpukit/pppd/ccp.h48
-rw-r--r--cpukit/pppd/chap.c872
-rw-r--r--cpukit/pppd/chap.h124
-rw-r--r--cpukit/pppd/chap_ms.c335
-rw-r--r--cpukit/pppd/chap_ms.h33
-rw-r--r--cpukit/pppd/chat.c1004
-rw-r--r--cpukit/pppd/demand.c348
-rw-r--r--cpukit/pppd/fsm.c798
-rw-r--r--cpukit/pppd/fsm.h144
-rw-r--r--cpukit/pppd/ipcp.c1506
-rw-r--r--cpukit/pppd/ipcp.h70
-rw-r--r--cpukit/pppd/ipxcp.c1399
-rw-r--r--cpukit/pppd/ipxcp.h71
-rw-r--r--cpukit/pppd/lcp.c1858
-rw-r--r--cpukit/pppd/lcp.h88
-rw-r--r--cpukit/pppd/magic.c86
-rw-r--r--cpukit/pppd/magic.h23
-rw-r--r--cpukit/pppd/md4.c298
-rw-r--r--cpukit/pppd/md4.h64
-rw-r--r--cpukit/pppd/md5.c306
-rw-r--r--cpukit/pppd/md5.h58
-rw-r--r--cpukit/pppd/options.c393
-rw-r--r--cpukit/pppd/patchlevel.h6
-rw-r--r--cpukit/pppd/pathnames.h30
-rw-r--r--cpukit/pppd/pppd.h497
-rw-r--r--cpukit/pppd/upap.c619
-rw-r--r--cpukit/pppd/upap.h87
-rw-r--r--cpukit/rtems/Makefile.am10
-rw-r--r--cpukit/rtems/include/Makefile.am27
-rw-r--r--cpukit/rtems/include/rtems.h121
-rw-r--r--cpukit/rtems/include/rtems/rtems/asr.h111
-rw-r--r--cpukit/rtems/include/rtems/rtems/attr.h89
-rw-r--r--cpukit/rtems/include/rtems/rtems/clock.h102
-rw-r--r--cpukit/rtems/include/rtems/rtems/config.h53
-rw-r--r--cpukit/rtems/include/rtems/rtems/dpmem.h156
-rw-r--r--cpukit/rtems/include/rtems/rtems/event.h175
-rw-r--r--cpukit/rtems/include/rtems/rtems/eventmp.h146
-rw-r--r--cpukit/rtems/include/rtems/rtems/eventset.h88
-rw-r--r--cpukit/rtems/include/rtems/rtems/intr.h159
-rw-r--r--cpukit/rtems/include/rtems/rtems/message.h328
-rw-r--r--cpukit/rtems/include/rtems/rtems/modes.h88
-rw-r--r--cpukit/rtems/include/rtems/rtems/mp.h52
-rw-r--r--cpukit/rtems/include/rtems/rtems/msgmp.h176
-rw-r--r--cpukit/rtems/include/rtems/rtems/options.h52
-rw-r--r--cpukit/rtems/include/rtems/rtems/part.h169
-rw-r--r--cpukit/rtems/include/rtems/rtems/partmp.h160
-rw-r--r--cpukit/rtems/include/rtems/rtems/ratemon.h212
-rw-r--r--cpukit/rtems/include/rtems/rtems/region.h235
-rw-r--r--cpukit/rtems/include/rtems/rtems/regionmp.h165
-rw-r--r--cpukit/rtems/include/rtems/rtems/rtemsapi.h33
-rw-r--r--cpukit/rtems/include/rtems/rtems/sem.h276
-rw-r--r--cpukit/rtems/include/rtems/rtems/semmp.h162
-rw-r--r--cpukit/rtems/include/rtems/rtems/signal.h84
-rw-r--r--cpukit/rtems/include/rtems/rtems/signalmp.h146
-rw-r--r--cpukit/rtems/include/rtems/rtems/status.h83
-rw-r--r--cpukit/rtems/include/rtems/rtems/support.h98
-rw-r--r--cpukit/rtems/include/rtems/rtems/taskmp.h166
-rw-r--r--cpukit/rtems/include/rtems/rtems/tasks.h467
-rw-r--r--cpukit/rtems/include/rtems/rtems/timer.h206
-rw-r--r--cpukit/rtems/include/rtems/rtems/types.h101
-rw-r--r--cpukit/rtems/inline/Makefile.am10
-rw-r--r--cpukit/rtems/inline/rtems/rtems/asr.inl127
-rw-r--r--cpukit/rtems/inline/rtems/rtems/attr.inl212
-rw-r--r--cpukit/rtems/inline/rtems/rtems/dpmem.inl94
-rw-r--r--cpukit/rtems/inline/rtems/rtems/event.inl20
-rw-r--r--cpukit/rtems/inline/rtems/rtems/eventset.inl94
-rw-r--r--cpukit/rtems/inline/rtems/rtems/message.inl82
-rw-r--r--cpukit/rtems/inline/rtems/rtems/modes.inl151
-rw-r--r--cpukit/rtems/inline/rtems/rtems/options.inl54
-rw-r--r--cpukit/rtems/inline/rtems/rtems/part.inl198
-rw-r--r--cpukit/rtems/inline/rtems/rtems/ratemon.inl142
-rw-r--r--cpukit/rtems/inline/rtems/rtems/region.inl126
-rw-r--r--cpukit/rtems/inline/rtems/rtems/sem.inl92
-rw-r--r--cpukit/rtems/inline/rtems/rtems/status.inl55
-rw-r--r--cpukit/rtems/inline/rtems/rtems/support.inl60
-rw-r--r--cpukit/rtems/inline/rtems/rtems/tasks.inl89
-rw-r--r--cpukit/rtems/inline/rtems/rtems/timer.inl141
-rw-r--r--cpukit/rtems/macros/Makefile.am10
-rw-r--r--cpukit/rtems/macros/rtems/rtems/asr.inl89
-rw-r--r--cpukit/rtems/macros/rtems/rtems/attr.inl119
-rw-r--r--cpukit/rtems/macros/rtems/rtems/dpmem.inl58
-rw-r--r--cpukit/rtems/macros/rtems/rtems/event.inl20
-rw-r--r--cpukit/rtems/macros/rtems/rtems/eventset.inl58
-rw-r--r--cpukit/rtems/macros/rtems/rtems/message.inl48
-rw-r--r--cpukit/rtems/macros/rtems/rtems/modes.inl91
-rw-r--r--cpukit/rtems/macros/rtems/rtems/options.inl38
-rw-r--r--cpukit/rtems/macros/rtems/rtems/part.inl116
-rw-r--r--cpukit/rtems/macros/rtems/rtems/ratemon.inl84
-rw-r--r--cpukit/rtems/macros/rtems/rtems/region.inl74
-rw-r--r--cpukit/rtems/macros/rtems/rtems/sem.inl57
-rw-r--r--cpukit/rtems/macros/rtems/rtems/status.inl38
-rw-r--r--cpukit/rtems/macros/rtems/rtems/support.inl43
-rw-r--r--cpukit/rtems/macros/rtems/rtems/tasks.inl57
-rw-r--r--cpukit/rtems/macros/rtems/rtems/timer.inl84
-rw-r--r--cpukit/rtems/src/Makefile.am79
-rw-r--r--cpukit/rtems/src/attr.c29
-rw-r--r--cpukit/rtems/src/clockget.c89
-rw-r--r--cpukit/rtems/src/clockset.c50
-rw-r--r--cpukit/rtems/src/clocktick.c51
-rw-r--r--cpukit/rtems/src/clocktodtoseconds.c64
-rw-r--r--cpukit/rtems/src/clocktodvalidate.c63
-rw-r--r--cpukit/rtems/src/dpmem.c50
-rw-r--r--cpukit/rtems/src/dpmemcreate.c81
-rw-r--r--cpukit/rtems/src/dpmemdelete.c61
-rw-r--r--cpukit/rtems/src/dpmemexternal2internal.c72
-rw-r--r--cpukit/rtems/src/dpmemident.c55
-rw-r--r--cpukit/rtems/src/dpmeminternal2external.c72
-rw-r--r--cpukit/rtems/src/event.c44
-rw-r--r--cpukit/rtems/src/eventmp.c189
-rw-r--r--cpukit/rtems/src/eventreceive.c62
-rw-r--r--cpukit/rtems/src/eventseize.c138
-rw-r--r--cpukit/rtems/src/eventsend.c71
-rw-r--r--cpukit/rtems/src/eventsurrender.c105
-rw-r--r--cpukit/rtems/src/eventtimeout.c75
-rw-r--r--cpukit/rtems/src/intr.c31
-rw-r--r--cpukit/rtems/src/intrbody.c70
-rw-r--r--cpukit/rtems/src/intrcatch.c54
-rw-r--r--cpukit/rtems/src/mp.c41
-rw-r--r--cpukit/rtems/src/msg.c72
-rw-r--r--cpukit/rtems/src/msgmp.c504
-rw-r--r--cpukit/rtems/src/msgqallocate.c56
-rw-r--r--cpukit/rtems/src/msgqbroadcast.c103
-rw-r--r--cpukit/rtems/src/msgqcreate.c165
-rw-r--r--cpukit/rtems/src/msgqdelete.c104
-rw-r--r--cpukit/rtems/src/msgqflush.c86
-rw-r--r--cpukit/rtems/src/msgqgetnumberpending.c83
-rw-r--r--cpukit/rtems/src/msgqident.c67
-rw-r--r--cpukit/rtems/src/msgqreceive.c104
-rw-r--r--cpukit/rtems/src/msgqsend.c57
-rw-r--r--cpukit/rtems/src/msgqsubmit.c140
-rw-r--r--cpukit/rtems/src/msgqtranslatereturncode.c73
-rw-r--r--cpukit/rtems/src/msgqurgent.c57
-rw-r--r--cpukit/rtems/src/part.c63
-rw-r--r--cpukit/rtems/src/partcreate.c115
-rw-r--r--cpukit/rtems/src/partdelete.c87
-rw-r--r--cpukit/rtems/src/partgetbuffer.c79
-rw-r--r--cpukit/rtems/src/partident.c53
-rw-r--r--cpukit/rtems/src/partmp.c301
-rw-r--r--cpukit/rtems/src/partreturnbuffer.c75
-rw-r--r--cpukit/rtems/src/ratemon.c53
-rw-r--r--cpukit/rtems/src/ratemoncancel.c64
-rw-r--r--cpukit/rtems/src/ratemoncreate.c67
-rw-r--r--cpukit/rtems/src/ratemondelete.c62
-rw-r--r--cpukit/rtems/src/ratemongetstatus.c79
-rw-r--r--cpukit/rtems/src/ratemonident.c55
-rw-r--r--cpukit/rtems/src/ratemonperiod.c158
-rw-r--r--cpukit/rtems/src/ratemontimeout.c76
-rw-r--r--cpukit/rtems/src/region.c63
-rw-r--r--cpukit/rtems/src/regioncreate.c105
-rw-r--r--cpukit/rtems/src/regiondelete.c68
-rw-r--r--cpukit/rtems/src/regionextend.c89
-rw-r--r--cpukit/rtems/src/regiongetsegment.c108
-rw-r--r--cpukit/rtems/src/regiongetsegmentsize.c71
-rw-r--r--cpukit/rtems/src/regionident.c56
-rw-r--r--cpukit/rtems/src/regionmp.c309
-rw-r--r--cpukit/rtems/src/regionreturnsegment.c118
-rw-r--r--cpukit/rtems/src/rtclock.c22
-rw-r--r--cpukit/rtems/src/rtemstimer.c50
-rw-r--r--cpukit/rtems/src/sem.c86
-rw-r--r--cpukit/rtems/src/semcreate.c231
-rw-r--r--cpukit/rtems/src/semdelete.c133
-rw-r--r--cpukit/rtems/src/semflush.c98
-rw-r--r--cpukit/rtems/src/semident.c77
-rw-r--r--cpukit/rtems/src/semmp.c361
-rw-r--r--cpukit/rtems/src/semobtain.c119
-rw-r--r--cpukit/rtems/src/semrelease.c117
-rw-r--r--cpukit/rtems/src/semtranslatereturncode.c120
-rw-r--r--cpukit/rtems/src/signal.c47
-rw-r--r--cpukit/rtems/src/signalcatch.c65
-rw-r--r--cpukit/rtems/src/signalmp.c188
-rw-r--r--cpukit/rtems/src/signalsend.c87
-rw-r--r--cpukit/rtems/src/taskcreate.c228
-rw-r--r--cpukit/rtems/src/taskdelete.c100
-rw-r--r--cpukit/rtems/src/taskgetnote.c105
-rw-r--r--cpukit/rtems/src/taskident.c65
-rw-r--r--cpukit/rtems/src/taskinitusers.c83
-rw-r--r--cpukit/rtems/src/taskissuspended.c77
-rw-r--r--cpukit/rtems/src/taskmode.c121
-rw-r--r--cpukit/rtems/src/taskmp.c339
-rw-r--r--cpukit/rtems/src/taskrestart.c79
-rw-r--r--cpukit/rtems/src/taskresume.c81
-rw-r--r--cpukit/rtems/src/tasks.c277
-rw-r--r--cpukit/rtems/src/tasksetnote.c102
-rw-r--r--cpukit/rtems/src/tasksetpriority.c98
-rw-r--r--cpukit/rtems/src/taskstart.c84
-rw-r--r--cpukit/rtems/src/tasksuspend.c82
-rw-r--r--cpukit/rtems/src/taskvariableadd.c85
-rw-r--r--cpukit/rtems/src/taskvariabledelete.c68
-rw-r--r--cpukit/rtems/src/taskvariableget.c72
-rw-r--r--cpukit/rtems/src/taskwakeafter.c64
-rw-r--r--cpukit/rtems/src/taskwakewhen.c79
-rw-r--r--cpukit/rtems/src/timercancel.c61
-rw-r--r--cpukit/rtems/src/timercreate.c66
-rw-r--r--cpukit/rtems/src/timerdelete.c62
-rw-r--r--cpukit/rtems/src/timerfireafter.c71
-rw-r--r--cpukit/rtems/src/timerfirewhen.c82
-rw-r--r--cpukit/rtems/src/timerident.c56
-rw-r--r--cpukit/rtems/src/timerreset.c64
-rw-r--r--cpukit/sapi/Makefile.am10
-rw-r--r--cpukit/sapi/include/Makefile.am27
-rw-r--r--cpukit/sapi/include/confdefs.h933
-rw-r--r--cpukit/sapi/include/rtems/README135
-rw-r--r--cpukit/sapi/include/rtems/config.h182
-rw-r--r--cpukit/sapi/include/rtems/extension.h137
-rw-r--r--cpukit/sapi/include/rtems/fatal.h48
-rw-r--r--cpukit/sapi/include/rtems/init.h109
-rw-r--r--cpukit/sapi/include/rtems/io.h243
-rw-r--r--cpukit/sapi/include/rtems/mptables.h28
-rw-r--r--cpukit/sapi/include/rtems/sptables.h.in85
-rw-r--r--cpukit/sapi/inline/Makefile.am10
-rw-r--r--cpukit/sapi/inline/rtems/extension.inl90
-rw-r--r--cpukit/sapi/macros/Makefile.am10
-rw-r--r--cpukit/sapi/macros/rtems/extension.inl57
-rw-r--r--cpukit/sapi/src/Makefile.am27
-rw-r--r--cpukit/sapi/src/debug.c61
-rw-r--r--cpukit/sapi/src/exinit.c320
-rw-r--r--cpukit/sapi/src/extension.c164
-rw-r--r--cpukit/sapi/src/fatal.c37
-rw-r--r--cpukit/sapi/src/io.c348
-rw-r--r--cpukit/sapi/src/itronapi.c116
-rw-r--r--cpukit/sapi/src/posixapi.c111
-rw-r--r--cpukit/sapi/src/rtemsapi.c93
-rw-r--r--cpukit/score/Makefile.am10
-rw-r--r--cpukit/score/cpu/Makefile.am14
-rw-r--r--cpukit/score/cpu/a29k/Makefile.am52
-rw-r--r--cpukit/score/cpu/a29k/amd.ah531
-rw-r--r--cpukit/score/cpu/a29k/asm.h103
-rw-r--r--cpukit/score/cpu/a29k/cpu.c262
-rw-r--r--cpukit/score/cpu/a29k/cpu_asm.S490
-rw-r--r--cpukit/score/cpu/a29k/pswmacro.ah442
-rw-r--r--cpukit/score/cpu/a29k/register.ah214
-rw-r--r--cpukit/score/cpu/a29k/rtems/score/a29k.h59
-rw-r--r--cpukit/score/cpu/a29k/rtems/score/cpu.h992
-rw-r--r--cpukit/score/cpu/a29k/rtems/score/cpu_asm.h71
-rw-r--r--cpukit/score/cpu/a29k/rtems/score/types.h56
-rw-r--r--cpukit/score/cpu/a29k/sig.S197
-rw-r--r--cpukit/score/cpu/hppa1.1/Makefile.am46
-rw-r--r--cpukit/score/cpu/hppa1.1/cpu.c184
-rw-r--r--cpukit/score/cpu/hppa1.1/cpu_asm.S778
-rw-r--r--cpukit/score/cpu/hppa1.1/rtems/score/cpu.h635
-rw-r--r--cpukit/score/cpu/hppa1.1/rtems/score/cpu_asm.h73
-rw-r--r--cpukit/score/cpu/hppa1.1/rtems/score/hppa.h716
-rw-r--r--cpukit/score/cpu/hppa1.1/rtems/score/types.h46
-rw-r--r--cpukit/score/cpu/i386/Makefile.am48
-rw-r--r--cpukit/score/cpu/i386/asm.h138
-rw-r--r--cpukit/score/cpu/i386/cpu.c196
-rw-r--r--cpukit/score/cpu/i386/cpu_asm.S274
-rw-r--r--cpukit/score/cpu/i386/rtems/asm.h138
-rw-r--r--cpukit/score/cpu/i386/rtems/score/cpu.h501
-rw-r--r--cpukit/score/cpu/i386/rtems/score/i386.h195
-rw-r--r--cpukit/score/cpu/i386/rtems/score/types.h57
-rw-r--r--cpukit/score/cpu/i960/Makefile.am48
-rw-r--r--cpukit/score/cpu/i960/asm.h110
-rw-r--r--cpukit/score/cpu/i960/cpu.c185
-rw-r--r--cpukit/score/cpu/i960/cpu_asm.S244
-rw-r--r--cpukit/score/cpu/i960/rtems/score/cpu.h479
-rw-r--r--cpukit/score/cpu/i960/rtems/score/i960.h513
-rw-r--r--cpukit/score/cpu/i960/rtems/score/types.h57
-rw-r--r--cpukit/score/cpu/m68k/Makefile.am49
-rw-r--r--cpukit/score/cpu/m68k/asm.h144
-rw-r--r--cpukit/score/cpu/m68k/cpu.c203
-rw-r--r--cpukit/score/cpu/m68k/cpu_asm.S290
-rw-r--r--cpukit/score/cpu/m68k/m68302.h661
-rw-r--r--cpukit/score/cpu/m68k/m68360.h889
-rw-r--r--cpukit/score/cpu/m68k/memcpy.c87
-rw-r--r--cpukit/score/cpu/m68k/qsm.h209
-rw-r--r--cpukit/score/cpu/m68k/rtems/asm.h144
-rw-r--r--cpukit/score/cpu/m68k/rtems/m68k/m68302.h661
-rw-r--r--cpukit/score/cpu/m68k/rtems/m68k/m68360.h889
-rw-r--r--cpukit/score/cpu/m68k/rtems/m68k/qsm.h209
-rw-r--r--cpukit/score/cpu/m68k/rtems/m68k/sim.h342
-rw-r--r--cpukit/score/cpu/m68k/rtems/score/cpu.h658
-rw-r--r--cpukit/score/cpu/m68k/rtems/score/m68k.h362
-rw-r--r--cpukit/score/cpu/m68k/rtems/score/types.h57
-rw-r--r--cpukit/score/cpu/m68k/sim.h342
-rw-r--r--cpukit/score/cpu/mips/Makefile.am49
-rw-r--r--cpukit/score/cpu/mips/asm.h102
-rw-r--r--cpukit/score/cpu/mips/cpu.c218
-rw-r--r--cpukit/score/cpu/mips/cpu_asm.S971
-rw-r--r--cpukit/score/cpu/mips/idtcpu.h440
-rw-r--r--cpukit/score/cpu/mips/iregdef.h325
-rw-r--r--cpukit/score/cpu/mips/rtems/asm.h102
-rw-r--r--cpukit/score/cpu/mips/rtems/mips/idtcpu.h440
-rw-r--r--cpukit/score/cpu/mips/rtems/mips/iregdef.h325
-rw-r--r--cpukit/score/cpu/mips/rtems/score/cpu.h980
-rw-r--r--cpukit/score/cpu/mips/rtems/score/mips.h74
-rw-r--r--cpukit/score/cpu/mips/rtems/score/types.h72
-rw-r--r--cpukit/score/cpu/mips64orion/Makefile.am49
-rw-r--r--cpukit/score/cpu/mips64orion/asm.h102
-rw-r--r--cpukit/score/cpu/mips64orion/cpu.c218
-rw-r--r--cpukit/score/cpu/mips64orion/cpu_asm.S971
-rw-r--r--cpukit/score/cpu/mips64orion/cpu_asm.h115
-rw-r--r--cpukit/score/cpu/mips64orion/idtcpu.h440
-rw-r--r--cpukit/score/cpu/mips64orion/idtmon.h171
-rw-r--r--cpukit/score/cpu/mips64orion/iregdef.h325
-rw-r--r--cpukit/score/cpu/mips64orion/rtems/score/cpu.h980
-rw-r--r--cpukit/score/cpu/mips64orion/rtems/score/mips64orion.h74
-rw-r--r--cpukit/score/cpu/mips64orion/rtems/score/types.h72
-rw-r--r--cpukit/score/cpu/no_cpu/Makefile.am45
-rw-r--r--cpukit/score/cpu/no_cpu/asm.h101
-rw-r--r--cpukit/score/cpu/no_cpu/cpu.c161
-rw-r--r--cpukit/score/cpu/no_cpu/cpu_asm.c164
-rw-r--r--cpukit/score/cpu/no_cpu/rtems/asm.h101
-rw-r--r--cpukit/score/cpu/no_cpu/rtems/score/cpu.h887
-rw-r--r--cpukit/score/cpu/no_cpu/rtems/score/cpu_asm.h70
-rw-r--r--cpukit/score/cpu/no_cpu/rtems/score/no_cpu.h56
-rw-r--r--cpukit/score/cpu/no_cpu/rtems/score/types.h56
-rw-r--r--cpukit/score/cpu/powerpc/Makefile.am17
-rw-r--r--cpukit/score/cpu/powerpc/asm.h275
-rw-r--r--cpukit/score/cpu/powerpc/rtems/asm.h275
-rw-r--r--cpukit/score/cpu/powerpc/rtems/score/ppc.h632
-rw-r--r--cpukit/score/cpu/powerpc/rtems/score/types.h73
-rw-r--r--cpukit/score/cpu/sh/Makefile.am45
-rw-r--r--cpukit/score/cpu/sh/asm.h137
-rw-r--r--cpukit/score/cpu/sh/cpu.c232
-rw-r--r--cpukit/score/cpu/sh/rtems/asm.h137
-rw-r--r--cpukit/score/cpu/sh/rtems/score/cpu.h889
-rw-r--r--cpukit/score/cpu/sh/rtems/score/sh.h165
-rw-r--r--cpukit/score/cpu/sh/rtems/score/sh_io.h48
-rw-r--r--cpukit/score/cpu/sh/rtems/score/types.h67
-rw-r--r--cpukit/score/cpu/sparc/Makefile.am48
-rw-r--r--cpukit/score/cpu/sparc/README110
-rw-r--r--cpukit/score/cpu/sparc/asm.h123
-rw-r--r--cpukit/score/cpu/sparc/cpu.c408
-rw-r--r--cpukit/score/cpu/sparc/cpu_asm.S795
-rw-r--r--cpukit/score/cpu/sparc/rtems/asm.h123
-rw-r--r--cpukit/score/cpu/sparc/rtems/score/cpu.h1027
-rw-r--r--cpukit/score/cpu/sparc/rtems/score/sparc.h256
-rw-r--r--cpukit/score/cpu/sparc/rtems/score/types.h63
-rw-r--r--cpukit/score/cpu/unix/Makefile.am32
-rw-r--r--cpukit/score/cpu/unix/cpu.c1117
-rw-r--r--cpukit/score/cpu/unix/rtems/score/cpu.h1095
-rw-r--r--cpukit/score/cpu/unix/rtems/score/types.h71
-rw-r--r--cpukit/score/cpu/unix/rtems/score/unix.h64
-rw-r--r--cpukit/score/include/Makefile.am10
-rw-r--r--cpukit/score/include/rtems/debug.h97
-rw-r--r--cpukit/score/include/rtems/score/address.h30
-rw-r--r--cpukit/score/include/rtems/score/apiext.h101
-rw-r--r--cpukit/score/include/rtems/score/bitfield.h97
-rw-r--r--cpukit/score/include/rtems/score/chain.h167
-rw-r--r--cpukit/score/include/rtems/score/context.h133
-rw-r--r--cpukit/score/include/rtems/score/copyrt.h40
-rw-r--r--cpukit/score/include/rtems/score/coremsg.h301
-rw-r--r--cpukit/score/include/rtems/score/coremutex.h201
-rw-r--r--cpukit/score/include/rtems/score/coresem.h157
-rw-r--r--cpukit/score/include/rtems/score/heap.h225
-rw-r--r--cpukit/score/include/rtems/score/interr.h96
-rw-r--r--cpukit/score/include/rtems/score/isr.h230
-rw-r--r--cpukit/score/include/rtems/score/mpci.h411
-rw-r--r--cpukit/score/include/rtems/score/mppkt.h100
-rw-r--r--cpukit/score/include/rtems/score/object.h476
-rw-r--r--cpukit/score/include/rtems/score/objectmp.h151
-rw-r--r--cpukit/score/include/rtems/score/priority.h96
-rw-r--r--cpukit/score/include/rtems/score/stack.h49
-rw-r--r--cpukit/score/include/rtems/score/states.h83
-rw-r--r--cpukit/score/include/rtems/score/sysstate.h66
-rw-r--r--cpukit/score/include/rtems/score/thread.h761
-rw-r--r--cpukit/score/include/rtems/score/threadmp.h88
-rw-r--r--cpukit/score/include/rtems/score/threadq.h300
-rw-r--r--cpukit/score/include/rtems/score/tod.h276
-rw-r--r--cpukit/score/include/rtems/score/tqdata.h89
-rw-r--r--cpukit/score/include/rtems/score/userext.h210
-rw-r--r--cpukit/score/include/rtems/score/watchdog.h193
-rw-r--r--cpukit/score/include/rtems/score/wkspace.h70
-rw-r--r--cpukit/score/include/rtems/system.h200
-rw-r--r--cpukit/score/inline/Makefile.am10
-rw-r--r--cpukit/score/inline/rtems/score/address.inl119
-rw-r--r--cpukit/score/inline/rtems/score/chain.inl389
-rw-r--r--cpukit/score/inline/rtems/score/coremsg.inl275
-rw-r--r--cpukit/score/inline/rtems/score/coremutex.inl105
-rw-r--r--cpukit/score/inline/rtems/score/coresem.inl53
-rw-r--r--cpukit/score/inline/rtems/score/heap.inl273
-rw-r--r--cpukit/score/inline/rtems/score/isr.inl81
-rw-r--r--cpukit/score/inline/rtems/score/mppkt.inl57
-rw-r--r--cpukit/score/inline/rtems/score/object.inl290
-rw-r--r--cpukit/score/inline/rtems/score/objectmp.inl72
-rw-r--r--cpukit/score/inline/rtems/score/priority.inl246
-rw-r--r--cpukit/score/inline/rtems/score/stack.inl80
-rw-r--r--cpukit/score/inline/rtems/score/states.inl383
-rw-r--r--cpukit/score/inline/rtems/score/sysstate.inl153
-rw-r--r--cpukit/score/inline/rtems/score/thread.inl385
-rw-r--r--cpukit/score/inline/rtems/score/threadmp.inl60
-rw-r--r--cpukit/score/inline/rtems/score/tod.inl66
-rw-r--r--cpukit/score/inline/rtems/score/tqdata.inl72
-rw-r--r--cpukit/score/inline/rtems/score/userext.inl131
-rw-r--r--cpukit/score/inline/rtems/score/watchdog.inl323
-rw-r--r--cpukit/score/inline/rtems/score/wkspace.inl56
-rw-r--r--cpukit/score/macros/Makefile.am12
-rw-r--r--cpukit/score/macros/README18
-rw-r--r--cpukit/score/macros/rtems/score/README18
-rw-r--r--cpukit/score/macros/rtems/score/address.inl67
-rw-r--r--cpukit/score/macros/rtems/score/chain.inl199
-rw-r--r--cpukit/score/macros/rtems/score/coremsg.inl144
-rw-r--r--cpukit/score/macros/rtems/score/coremutex.inl67
-rw-r--r--cpukit/score/macros/rtems/score/coresem.inl39
-rw-r--r--cpukit/score/macros/rtems/score/heap.inl149
-rw-r--r--cpukit/score/macros/rtems/score/isr.inl47
-rw-r--r--cpukit/score/macros/rtems/score/mppkt.inl40
-rw-r--r--cpukit/score/macros/rtems/score/object.inl165
-rw-r--r--cpukit/score/macros/rtems/score/objectmp.inl49
-rw-r--r--cpukit/score/macros/rtems/score/priority.inl169
-rw-r--r--cpukit/score/macros/rtems/score/stack.inl49
-rw-r--r--cpukit/score/macros/rtems/score/states.inl209
-rw-r--r--cpukit/score/macros/rtems/score/sysstate.inl89
-rw-r--r--cpukit/score/macros/rtems/score/thread.inl207
-rw-r--r--cpukit/score/macros/rtems/score/threadmp.inl49
-rw-r--r--cpukit/score/macros/rtems/score/tod.inl48
-rw-r--r--cpukit/score/macros/rtems/score/tqdata.inl49
-rw-r--r--cpukit/score/macros/rtems/score/userext.inl133
-rw-r--r--cpukit/score/macros/rtems/score/watchdog.inl171
-rw-r--r--cpukit/score/macros/rtems/score/wkspace.inl38
-rw-r--r--cpukit/score/src/Makefile.am80
-rw-r--r--cpukit/score/src/Unlimited.txt387
-rw-r--r--cpukit/score/src/apiext.c104
-rw-r--r--cpukit/score/src/chain.c201
-rw-r--r--cpukit/score/src/coremsg.c108
-rw-r--r--cpukit/score/src/coremsgbroadcast.c112
-rw-r--r--cpukit/score/src/coremsgclose.c77
-rw-r--r--cpukit/score/src/coremsgflush.c55
-rw-r--r--cpukit/score/src/coremsgflushsupp.c105
-rw-r--r--cpukit/score/src/coremsgflushwait.c70
-rw-r--r--cpukit/score/src/coremsginsert.c102
-rw-r--r--cpukit/score/src/coremsgseize.c137
-rw-r--r--cpukit/score/src/coremsgsubmit.c162
-rw-r--r--cpukit/score/src/coremutex.c92
-rw-r--r--cpukit/score/src/coremutexflush.c51
-rw-r--r--cpukit/score/src/coremutexseize.c160
-rw-r--r--cpukit/score/src/coremutexsurrender.c144
-rw-r--r--cpukit/score/src/coresem.c68
-rw-r--r--cpukit/score/src/coresemflush.c57
-rw-r--r--cpukit/score/src/coresemseize.c80
-rw-r--r--cpukit/score/src/coresemsurrender.c74
-rw-r--r--cpukit/score/src/coretod.c59
-rw-r--r--cpukit/score/src/coretodset.c63
-rw-r--r--cpukit/score/src/coretodtickle.c67
-rw-r--r--cpukit/score/src/coretodtoseconds.c64
-rw-r--r--cpukit/score/src/coretodvalidate.c63
-rw-r--r--cpukit/score/src/heap.c93
-rw-r--r--cpukit/score/src/heapallocate.c106
-rw-r--r--cpukit/score/src/heapextend.c112
-rw-r--r--cpukit/score/src/heapfree.c104
-rw-r--r--cpukit/score/src/heapsizeofuserarea.c63
-rw-r--r--cpukit/score/src/heapwalk.c149
-rw-r--r--cpukit/score/src/interr.c60
-rw-r--r--cpukit/score/src/isr.c59
-rw-r--r--cpukit/score/src/mpci.c526
-rw-r--r--cpukit/score/src/object.c64
-rw-r--r--cpukit/score/src/objectallocate.c68
-rw-r--r--cpukit/score/src/objectallocatebyindex.c73
-rw-r--r--cpukit/score/src/objectclearname.c46
-rw-r--r--cpukit/score/src/objectcomparenameraw.c49
-rw-r--r--cpukit/score/src/objectcomparenamestring.c52
-rw-r--r--cpukit/score/src/objectcopynameraw.c46
-rw-r--r--cpukit/score/src/objectcopynamestring.c45
-rw-r--r--cpukit/score/src/objectextendinformation.c285
-rw-r--r--cpukit/score/src/objectfree.c65
-rw-r--r--cpukit/score/src/objectget.c80
-rw-r--r--cpukit/score/src/objectgetbyindex.c73
-rw-r--r--cpukit/score/src/objectgetnext.c90
-rw-r--r--cpukit/score/src/objectinitializeinformation.c168
-rw-r--r--cpukit/score/src/objectmp.c274
-rw-r--r--cpukit/score/src/objectnametoid.c97
-rw-r--r--cpukit/score/src/objectshrinkinformation.c115
-rw-r--r--cpukit/score/src/thread.c101
-rw-r--r--cpukit/score/src/threadchangepriority.c113
-rw-r--r--cpukit/score/src/threadclearstate.c81
-rw-r--r--cpukit/score/src/threadclose.c72
-rw-r--r--cpukit/score/src/threadcreateidle.c96
-rw-r--r--cpukit/score/src/threaddelayended.c60
-rw-r--r--cpukit/score/src/threaddispatch.c129
-rw-r--r--cpukit/score/src/threadevaluatemode.c49
-rw-r--r--cpukit/score/src/threadget.c72
-rw-r--r--cpukit/score/src/threadhandler.c129
-rw-r--r--cpukit/score/src/threadidlebody.c50
-rw-r--r--cpukit/score/src/threadinitialize.c190
-rw-r--r--cpukit/score/src/threadloadenv.c68
-rw-r--r--cpukit/score/src/threadmp.c163
-rw-r--r--cpukit/score/src/threadq.c71
-rw-r--r--cpukit/score/src/threadqdequeue.c62
-rw-r--r--cpukit/score/src/threadqdequeuefifo.c86
-rw-r--r--cpukit/score/src/threadqdequeuepriority.c125
-rw-r--r--cpukit/score/src/threadqenqueue.c77
-rw-r--r--cpukit/score/src/threadqenqueuefifo.c101
-rw-r--r--cpukit/score/src/threadqenqueuepriority.c221
-rw-r--r--cpukit/score/src/threadqextract.c54
-rw-r--r--cpukit/score/src/threadqextractfifo.c73
-rw-r--r--cpukit/score/src/threadqextractpriority.c104
-rw-r--r--cpukit/score/src/threadqextractwithproxy.c62
-rw-r--r--cpukit/score/src/threadqfirst.c58
-rw-r--r--cpukit/score/src/threadqfirstfifo.c47
-rw-r--r--cpukit/score/src/threadqfirstpriority.c52
-rw-r--r--cpukit/score/src/threadqflush.c55
-rw-r--r--cpukit/score/src/threadqtimeout.c78
-rw-r--r--cpukit/score/src/threadready.c74
-rw-r--r--cpukit/score/src/threadreset.c65
-rw-r--r--cpukit/score/src/threadresettimeslice.c71
-rw-r--r--cpukit/score/src/threadrestart.c64
-rw-r--r--cpukit/score/src/threadresume.c94
-rw-r--r--cpukit/score/src/threadrotatequeue.c92
-rw-r--r--cpukit/score/src/threadsetpriority.c52
-rw-r--r--cpukit/score/src/threadsetstate.c83
-rw-r--r--cpukit/score/src/threadsettransient.c73
-rw-r--r--cpukit/score/src/threadstackallocate.c81
-rw-r--r--cpukit/score/src/threadstackfree.c56
-rw-r--r--cpukit/score/src/threadstart.c66
-rw-r--r--cpukit/score/src/threadstartmultitasking.c89
-rw-r--r--cpukit/score/src/threadsuspend.c82
-rw-r--r--cpukit/score/src/threadtickletimeslice.c86
-rw-r--r--cpukit/score/src/threadyieldprocessor.c72
-rw-r--r--cpukit/score/src/userext.c203
-rw-r--r--cpukit/score/src/watchdog.c38
-rw-r--r--cpukit/score/src/watchdogadjust.c62
-rw-r--r--cpukit/score/src/watchdoginsert.c96
-rw-r--r--cpukit/score/src/watchdogremove.c70
-rw-r--r--cpukit/score/src/watchdogtickle.c77
-rw-r--r--cpukit/score/src/wkspace.c87
-rw-r--r--cpukit/wrapup/Makefile.am18
-rw-r--r--cpukit/zlib/doc/rfc1950.txt619
-rw-r--r--cpukit/zlib/doc/rfc1951.txt955
-rw-r--r--cpukit/zlib/doc/rfc1952.txt675
-rw-r--r--doc/BAD.html22
-rw-r--r--doc/FAQ/FAQ.texi123
-rw-r--r--doc/FAQ/Makefile117
-rw-r--r--doc/FAQ/basic.t177
-rw-r--r--doc/FAQ/bsp.t35
-rw-r--r--doc/FAQ/concepts.t19
-rw-r--r--doc/FAQ/debug.t100
-rw-r--r--doc/FAQ/embeddedinfo.t38
-rw-r--r--doc/FAQ/endoftime.t111
-rw-r--r--doc/FAQ/entry57
-rw-r--r--doc/FAQ/freesw.t162
-rw-r--r--doc/FAQ/hwdebugaids.t110
-rw-r--r--doc/FAQ/projects.t113
-rw-r--r--doc/FAQ/tools.t51
-rw-r--r--doc/HELP.html22
-rw-r--r--doc/Make.config64
-rw-r--r--doc/Makefile57
-rw-r--r--doc/README36
-rw-r--r--doc/TODO77
-rw-r--r--doc/VERSION5
-rw-r--r--doc/ada_user/Makefile73
-rw-r--r--doc/ada_user/ada_user.texi169
-rw-r--r--doc/ada_user/example.texi21
-rw-r--r--doc/archgrey.gifbin12160 -> 0 bytes
-rw-r--r--doc/bsp_howto/Makefile152
-rw-r--r--doc/bsp_howto/adaintr.t81
-rw-r--r--doc/bsp_howto/analog.t167
-rw-r--r--doc/bsp_howto/bsp_howto.texi130
-rw-r--r--doc/bsp_howto/clock.t132
-rw-r--r--doc/bsp_howto/console.t377
-rw-r--r--doc/bsp_howto/discrete.t187
-rw-r--r--doc/bsp_howto/init.t430
-rw-r--r--doc/bsp_howto/intro.t57
-rw-r--r--doc/bsp_howto/linkcmds.t425
-rw-r--r--doc/bsp_howto/makefiles.t235
-rw-r--r--doc/bsp_howto/nvmem.t235
-rw-r--r--doc/bsp_howto/rtc.t188
-rw-r--r--doc/bsp_howto/shmsupp.t269
-rw-r--r--doc/bsp_howto/support.t257
-rw-r--r--doc/bsp_howto/target.t214
-rw-r--r--doc/bsp_howto/timer.t121
-rw-r--r--doc/common/cpright.texi45
-rw-r--r--doc/common/dvi.gifbin156 -> 0 bytes
-rw-r--r--doc/common/oaronly.jpgbin1584 -> 0 bytes
-rw-r--r--doc/common/pdf.gifbin249 -> 0 bytes
-rw-r--r--doc/common/pdf1.gifbin173 -> 0 bytes
-rw-r--r--doc/common/ps.gifbin244 -> 0 bytes
-rw-r--r--doc/common/setup.texi75
-rw-r--r--doc/common/timemac.texi36
-rw-r--r--doc/common/timetbl.t1330
-rw-r--r--doc/common/timing.t396
-rw-r--r--doc/common/treedef.tex317
-rw-r--r--doc/common/up-arrow.gifbin264 -> 0 bytes
-rw-r--r--doc/common/wksheets.t409
-rw-r--r--doc/develenv/Makefile54
-rw-r--r--doc/develenv/compile.texi159
-rw-r--r--doc/develenv/develenv.texi122
-rw-r--r--doc/develenv/direct.texi730
-rw-r--r--doc/develenv/intro.texi58
-rw-r--r--doc/develenv/sample.texi287
-rw-r--r--doc/develenv/utils.texi312
-rwxr-xr-xdoc/do_docs53
-rw-r--r--doc/filesystem/Makefile120
-rw-r--r--doc/filesystem/filesystem.texi115
-rw-r--r--doc/filesystem/fsrequirements.t1183
-rw-r--r--doc/filesystem/imfs.t2038
-rw-r--r--doc/filesystem/init.t113
-rw-r--r--doc/filesystem/miniimfs.t16
-rw-r--r--doc/filesystem/mounting.t171
-rw-r--r--doc/filesystem/patheval.t109
-rw-r--r--doc/filesystem/preface.texi83
-rw-r--r--doc/filesystem/syscalls.t1130
-rw-r--r--doc/filesystem/tftp.t14
-rw-r--r--doc/gnu_docs/Tool_Doc_Instructions32
-rw-r--r--doc/gnu_docs/gen_docs125
-rw-r--r--doc/gnu_docs/gnu_footer.html2
-rw-r--r--doc/gnu_docs/gnu_header.html5
-rw-r--r--doc/gnu_docs/index.html143
-rw-r--r--doc/gnu_docs/mk_install_dir29
-rw-r--r--doc/gnu_docs/refcard.html13
-rw-r--r--doc/gnu_docs/rtems_tools_index.html15
-rw-r--r--doc/index.html275
-rw-r--r--doc/itron3.0/Makefile133
-rw-r--r--doc/itron3.0/config.t187
-rw-r--r--doc/itron3.0/eventflags.t860
-rw-r--r--doc/itron3.0/fixedblock.t389
-rw-r--r--doc/itron3.0/gen_all4
-rw-r--r--doc/itron3.0/gen_section191
-rw-r--r--doc/itron3.0/gen_status_shell230
-rw-r--r--doc/itron3.0/interrupt.t306
-rw-r--r--doc/itron3.0/itron.texi149
-rw-r--r--doc/itron3.0/mailbox.t338
-rw-r--r--doc/itron3.0/memorypool.t401
-rw-r--r--doc/itron3.0/msgbuffer.t826
-rw-r--r--doc/itron3.0/network.t162
-rw-r--r--doc/itron3.0/preface.texi14
-rw-r--r--doc/itron3.0/rendezvous.t395
-rw-r--r--doc/itron3.0/semaphore.t642
-rw-r--r--doc/itron3.0/status.t943
-rw-r--r--doc/itron3.0/task.t767
-rw-r--r--doc/itron3.0/tasksync.t388
-rw-r--r--doc/itron3.0/time.t310
-rw-r--r--doc/networking/Makefile109
-rw-r--r--doc/networking/PCIreg.eps319
-rw-r--r--doc/networking/PCIreg.jpgbin48116 -> 0 bytes
-rw-r--r--doc/networking/PCIreg.pdfbin1906 -> 0 bytes
-rw-r--r--doc/networking/decdriver.t291
-rw-r--r--doc/networking/driver.t342
-rw-r--r--doc/networking/networkapp.t447
-rw-r--r--doc/networking/networkflow.eps1343
-rw-r--r--doc/networking/networkflow.jpgbin36969 -> 0 bytes
-rw-r--r--doc/networking/networkflow.pdfbin19170 -> 0 bytes
-rw-r--r--doc/networking/networkflow.pngbin12933 -> 0 bytes
-rw-r--r--doc/networking/networking.texi111
-rw-r--r--doc/networking/networktasks.t62
-rw-r--r--doc/networking/preface.texi52
-rw-r--r--doc/networking/recvbd.eps181
-rw-r--r--doc/networking/recvbd.jpgbin11100 -> 0 bytes
-rw-r--r--doc/networking/recvbd.pdfbin1101 -> 0 bytes
-rw-r--r--doc/networking/servers.t118
-rw-r--r--doc/networking/testing.t220
-rw-r--r--doc/new_chapters/Makefile107
-rw-r--r--doc/new_chapters/STATUS9
-rw-r--r--doc/new_chapters/TODO4
-rw-r--r--doc/new_chapters/adminiface.t129
-rw-r--r--doc/new_chapters/base.t62
-rw-r--r--doc/new_chapters/confspace.t1351
-rw-r--r--doc/new_chapters/cpuuse.t142
-rw-r--r--doc/new_chapters/dumpcontrol.t98
-rw-r--r--doc/new_chapters/error.t164
-rw-r--r--doc/new_chapters/eventlog.t1265
-rw-r--r--doc/new_chapters/gen_section238
-rw-r--r--doc/new_chapters/monitor.t224
-rw-r--r--doc/new_chapters/new_chapters.texi137
-rw-r--r--doc/new_chapters/rtmonuse.t294
-rw-r--r--doc/new_chapters/stackchk.t192
-rw-r--r--doc/oaronly.jpgbin1584 -> 0 bytes
-rw-r--r--doc/porting/Makefile111
-rw-r--r--doc/porting/codetuning.t155
-rw-r--r--doc/porting/cpuinit.t150
-rw-r--r--doc/porting/cpumodels.t144
-rw-r--r--doc/porting/developtools.t26
-rw-r--r--doc/porting/idlethread.t116
-rw-r--r--doc/porting/interrupts.t402
-rw-r--r--doc/porting/miscellaneous.t170
-rw-r--r--doc/porting/porting.texi139
-rw-r--r--doc/porting/preface.texi42
-rw-r--r--doc/porting/prioritybitmap.t166
-rw-r--r--doc/porting/sourcecode.t23
-rw-r--r--doc/porting/taskcontext.t476
-rw-r--r--doc/posix1003.1/Makefile163
-rw-r--r--doc/posix1003.1/ch01.t40
-rw-r--r--doc/posix1003.1/ch02.t279
-rw-r--r--doc/posix1003.1/ch03.t203
-rw-r--r--doc/posix1003.1/ch04.t181
-rw-r--r--doc/posix1003.1/ch05.t222
-rw-r--r--doc/posix1003.1/ch06.t175
-rw-r--r--doc/posix1003.1/ch07.t207
-rw-r--r--doc/posix1003.1/ch08.t288
-rw-r--r--doc/posix1003.1/ch09.t38
-rw-r--r--doc/posix1003.1/ch10.t68
-rw-r--r--doc/posix1003.1/ch11.t133
-rw-r--r--doc/posix1003.1/ch12.t77
-rw-r--r--doc/posix1003.1/ch13.t132
-rw-r--r--doc/posix1003.1/ch14.t71
-rw-r--r--doc/posix1003.1/ch15.t72
-rw-r--r--doc/posix1003.1/ch16.t72
-rw-r--r--doc/posix1003.1/ch17.t31
-rw-r--r--doc/posix1003.1/ch18.t66
-rw-r--r--doc/posix1003.1/posix1003_1.texi138
-rw-r--r--doc/posix1003.1/preface.texi29
-rwxr-xr-xdoc/posix1003.1/summarize199
-rw-r--r--doc/posix_users/Makefile177
-rw-r--r--doc/posix_users/cancel.t239
-rw-r--r--doc/posix_users/clock.t313
-rw-r--r--doc/posix_users/cond.t383
-rw-r--r--doc/posix_users/cspecific.t749
-rw-r--r--doc/posix_users/device.t540
-rw-r--r--doc/posix_users/files.t2347
-rw-r--r--doc/posix_users/gen_size_report209
-rw-r--r--doc/posix_users/io.t1107
-rw-r--r--doc/posix_users/key.t152
-rw-r--r--doc/posix_users/libc.t348
-rw-r--r--doc/posix_users/libm.t58
-rw-r--r--doc/posix_users/memorymgmt.t375
-rw-r--r--doc/posix_users/message.t693
-rw-r--r--doc/posix_users/mutex.t744
-rw-r--r--doc/posix_users/posix_users.texi165
-rw-r--r--doc/posix_users/preface.texi34
-rw-r--r--doc/posix_users/procenv.t819
-rw-r--r--doc/posix_users/process.t480
-rw-r--r--doc/posix_users/sched.t219
-rw-r--r--doc/posix_users/semaphores.t593
-rw-r--r--doc/posix_users/signal.t836
-rw-r--r--doc/posix_users/status.t61
-rw-r--r--doc/posix_users/systemdb.t307
-rw-r--r--doc/posix_users/thread.t1332
-rw-r--r--doc/posix_users/timer.t196
-rw-r--r--doc/relnotes/Makefile53
-rw-r--r--doc/relnotes/install.texi176
-rw-r--r--doc/relnotes/intro.texi217
-rw-r--r--doc/relnotes/probrep.texi62
-rw-r--r--doc/relnotes/relnotes.texi119
-rw-r--r--doc/relnotes/status.texi260
-rw-r--r--doc/rgdb_specs/Makefile114
-rw-r--r--doc/rgdb_specs/comm.t115
-rw-r--r--doc/rgdb_specs/conclusion.t51
-rw-r--r--doc/rgdb_specs/daemon.t437
-rw-r--r--doc/rgdb_specs/garde.eps8168
-rw-r--r--doc/rgdb_specs/garde.pdfbin272042 -> 0 bytes
-rw-r--r--doc/rgdb_specs/gdbinternals.t309
-rw-r--r--doc/rgdb_specs/interfacing.t79
-rw-r--r--doc/rgdb_specs/intro.t39
-rw-r--r--doc/rgdb_specs/layers.eps359
-rw-r--r--doc/rgdb_specs/layers.jpgbin31318 -> 0 bytes
-rw-r--r--doc/rgdb_specs/layers.pdfbin4594 -> 0 bytes
-rw-r--r--doc/rgdb_specs/objectives.t307
-rw-r--r--doc/rgdb_specs/process.eps672
-rw-r--r--doc/rgdb_specs/process.jpgbin136532 -> 0 bytes
-rw-r--r--doc/rgdb_specs/process.pdfbin7144 -> 0 bytes
-rw-r--r--doc/rgdb_specs/revision.t42
-rw-r--r--doc/rgdb_specs/rgdb_specs.texi115
-rw-r--r--doc/rgdb_specs/seqbreak.eps311
-rw-r--r--doc/rgdb_specs/seqbreak.jpgbin79883 -> 0 bytes
-rw-r--r--doc/rgdb_specs/seqbreak.pdfbin2033 -> 0 bytes
-rw-r--r--doc/rgdb_specs/seqdetach.eps167
-rw-r--r--doc/rgdb_specs/seqdetach.jpgbin24799 -> 0 bytes
-rw-r--r--doc/rgdb_specs/seqdetach.pdfbin1293 -> 0 bytes
-rw-r--r--doc/rgdb_specs/seqinit.eps204
-rw-r--r--doc/rgdb_specs/seqinit.jpgbin34525 -> 0 bytes
-rw-r--r--doc/rgdb_specs/seqinit.pdfbin1511 -> 0 bytes
-rw-r--r--doc/rtems_footer.html1
-rw-r--r--doc/rtems_gdb/Makefile94
-rw-r--r--doc/rtems_gdb/commands.t51
-rw-r--r--doc/rtems_gdb/example.t88
-rw-r--r--doc/rtems_gdb/intro.t22
-rw-r--r--doc/rtems_gdb/rtems_gdb.texi111
-rw-r--r--doc/rtems_gdb/started.t53
-rw-r--r--doc/rtems_gdb/swarch.t32
-rw-r--r--doc/rtems_gdb/trouble.t46
-rw-r--r--doc/rtems_header.html5
-rw-r--r--doc/rtems_support.html59
-rw-r--r--doc/src2html/Makefile40
-rw-r--r--doc/src2html/RTEMS.test62
-rw-r--r--doc/started/Makefile97
-rw-r--r--doc/started/buildc.t566
-rw-r--r--doc/started/buildrt.t137
-rw-r--r--doc/started/gdb.t222
-rw-r--r--doc/started/intro.t162
-rw-r--r--doc/started/nt.t345
-rw-r--r--doc/started/pictures/bit_ada.jpgbin30320 -> 0 bytes
-rw-r--r--doc/started/pictures/bit_ada.vsdbin15360 -> 0 bytes
-rw-r--r--doc/started/pictures/bit_c.jpgbin29778 -> 0 bytes
-rw-r--r--doc/started/pictures/bit_c.vsdbin14336 -> 0 bytes
-rw-r--r--doc/started/pictures/scfile10.jpgbin12972 -> 0 bytes
-rw-r--r--doc/started/pictures/scfile10.vsdbin26112 -> 0 bytes
-rw-r--r--doc/started/pictures/scfile11.jpgbin45560 -> 0 bytes
-rw-r--r--doc/started/pictures/scfile11.vsdbin24576 -> 0 bytes
-rw-r--r--doc/started/pictures/scfile12.jpgbin12972 -> 0 bytes
-rw-r--r--doc/started/pictures/scfile12.vsdbin11776 -> 0 bytes
-rw-r--r--doc/started/pictures/scfile13.jpgbin33103 -> 0 bytes
-rw-r--r--doc/started/pictures/scfile13.vsdbin15360 -> 0 bytes
-rw-r--r--doc/started/pictures/scsfile1.jpgbin88599 -> 0 bytes
-rw-r--r--doc/started/pictures/scsfile1.vsdbin25088 -> 0 bytes
-rw-r--r--doc/started/pictures/scsfile2.jpgbin175286 -> 0 bytes
-rw-r--r--doc/started/pictures/scsfile2.vsdbin26624 -> 0 bytes
-rw-r--r--doc/started/pictures/scsfile3.jpgbin87075 -> 0 bytes
-rw-r--r--doc/started/pictures/scsfile3.vsdbin19456 -> 0 bytes
-rw-r--r--doc/started/pictures/scsfile4.jpgbin97380 -> 0 bytes
-rw-r--r--doc/started/pictures/scsfile4.vsdbin16896 -> 0 bytes
-rw-r--r--doc/started/pictures/scsfile5.jpgbin22942 -> 0 bytes
-rw-r--r--doc/started/pictures/scsfile5.vsdbin13824 -> 0 bytes
-rw-r--r--doc/started/pictures/scsfile6.jpgbin34989 -> 0 bytes
-rw-r--r--doc/started/pictures/scsfile6.vsdbin13824 -> 0 bytes
-rw-r--r--doc/started/pictures/scsfile7.jpgbin99516 -> 0 bytes
-rw-r--r--doc/started/pictures/scsfile7.vsdbin19456 -> 0 bytes
-rw-r--r--doc/started/pictures/scsfile8.jpgbin52638 -> 0 bytes
-rw-r--r--doc/started/pictures/scsfile8.vsdbin16896 -> 0 bytes
-rw-r--r--doc/started/pictures/scsfile9.jpgbin62821 -> 0 bytes
-rw-r--r--doc/started/pictures/scsfile9.vsdbin13824 -> 0 bytes
-rw-r--r--doc/started/pictures/sfile12c.jpgbin11663 -> 0 bytes
-rw-r--r--doc/started/pictures/sfile12c.vsdbin11264 -> 0 bytes
-rw-r--r--doc/started/require.t56
-rw-r--r--doc/started/sample.t57
-rw-r--r--doc/started/started.texi117
-rw-r--r--doc/started/versions.texi86
-rw-r--r--doc/started_ada/Makefile92
-rw-r--r--doc/started_ada/buildada.t541
-rw-r--r--doc/started_ada/buildrt.t141
-rw-r--r--doc/started_ada/gdb.t232
-rw-r--r--doc/started_ada/intro.t161
-rw-r--r--doc/started_ada/require.t102
-rw-r--r--doc/started_ada/sample.t54
-rw-r--r--doc/started_ada/started_ada.texi115
-rw-r--r--doc/started_ada/versions.texi96
-rw-r--r--doc/supplements/hppa1_1/Makefile152
-rw-r--r--doc/supplements/hppa1_1/SIMHPPA_TIMES247
-rw-r--r--doc/supplements/hppa1_1/bsp.t53
-rw-r--r--doc/supplements/hppa1_1/callconv.t143
-rw-r--r--doc/supplements/hppa1_1/cpumodel.t56
-rw-r--r--doc/supplements/hppa1_1/cputable.t116
-rw-r--r--doc/supplements/hppa1_1/fatalerr.t32
-rw-r--r--doc/supplements/hppa1_1/hppa1_1.texi121
-rw-r--r--doc/supplements/hppa1_1/intr_NOTIMES.t191
-rw-r--r--doc/supplements/hppa1_1/memmodel.t67
-rw-r--r--doc/supplements/hppa1_1/preface.texi36
-rw-r--r--doc/supplements/hppa1_1/timeSIMHPPA.t86
-rw-r--r--doc/supplements/i386/FORCE386_TIMES247
-rw-r--r--doc/supplements/i386/Makefile170
-rw-r--r--doc/supplements/i386/bsp.t109
-rw-r--r--doc/supplements/i386/callconv.t90
-rw-r--r--doc/supplements/i386/cpumodel.t72
-rw-r--r--doc/supplements/i386/cputable.t119
-rw-r--r--doc/supplements/i386/fatalerr.t31
-rw-r--r--doc/supplements/i386/i386.texi120
-rw-r--r--doc/supplements/i386/intr_NOTIMES.t168
-rw-r--r--doc/supplements/i386/memmodel.t72
-rw-r--r--doc/supplements/i386/preface.texi41
-rw-r--r--doc/supplements/i386/timeFORCE386.t101
-rw-r--r--doc/supplements/i960/CVME961_TIMES247
-rw-r--r--doc/supplements/i960/Makefile161
-rw-r--r--doc/supplements/i960/bsp.t54
-rw-r--r--doc/supplements/i960/callconv.t97
-rw-r--r--doc/supplements/i960/cpumodel.t62
-rw-r--r--doc/supplements/i960/cputable.t121
-rw-r--r--doc/supplements/i960/fatalerr.t30
-rw-r--r--doc/supplements/i960/i960.texi120
-rw-r--r--doc/supplements/i960/intr_NOTIMES.t193
-rw-r--r--doc/supplements/i960/memmodel.t40
-rw-r--r--doc/supplements/i960/preface.texi40
-rw-r--r--doc/supplements/i960/timeCVME961.t88
-rw-r--r--doc/supplements/m68k/MVME136_TIMES247
-rw-r--r--doc/supplements/m68k/Makefile170
-rw-r--r--doc/supplements/m68k/bsp.t93
-rw-r--r--doc/supplements/m68k/callconv.t92
-rw-r--r--doc/supplements/m68k/cpumodel.t91
-rw-r--r--doc/supplements/m68k/cputable.t109
-rw-r--r--doc/supplements/m68k/fatalerr.t31
-rw-r--r--doc/supplements/m68k/intr_NOTIMES.t196
-rw-r--r--doc/supplements/m68k/m68k.texi121
-rw-r--r--doc/supplements/m68k/memmodel.t39
-rw-r--r--doc/supplements/m68k/preface.texi60
-rw-r--r--doc/supplements/m68k/timeMVME136.t108
-rw-r--r--doc/supplements/m68k/timedata.t150
-rw-r--r--doc/supplements/mips64orion/BSP_TIMES247
-rw-r--r--doc/supplements/mips64orion/Makefile161
-rw-r--r--doc/supplements/mips64orion/bsp.t93
-rw-r--r--doc/supplements/mips64orion/callconv.t92
-rw-r--r--doc/supplements/mips64orion/cpumodel.t68
-rw-r--r--doc/supplements/mips64orion/cputable.t109
-rw-r--r--doc/supplements/mips64orion/fatalerr.t31
-rw-r--r--doc/supplements/mips64orion/intr_NOTIMES.t196
-rw-r--r--doc/supplements/mips64orion/memmodel.t39
-rw-r--r--doc/supplements/mips64orion/mips64orion.texi120
-rw-r--r--doc/supplements/mips64orion/preface.texi57
-rw-r--r--doc/supplements/mips64orion/timeBSP.t108
-rw-r--r--doc/supplements/powerpc/DMV177_TIMES248
-rw-r--r--doc/supplements/powerpc/Makefile183
-rw-r--r--doc/supplements/powerpc/PSIM_TIMES248
-rw-r--r--doc/supplements/powerpc/bsp.t76
-rw-r--r--doc/supplements/powerpc/callconv.t229
-rw-r--r--doc/supplements/powerpc/cpumodel.t156
-rw-r--r--doc/supplements/powerpc/cputable.t155
-rw-r--r--doc/supplements/powerpc/fatalerr.t47
-rw-r--r--doc/supplements/powerpc/intr_NOTIMES.t184
-rw-r--r--doc/supplements/powerpc/memmodel.t110
-rw-r--r--doc/supplements/powerpc/powerpc.texi121
-rw-r--r--doc/supplements/powerpc/preface.texi94
-rw-r--r--doc/supplements/powerpc/timeDMV177.t113
-rw-r--r--doc/supplements/powerpc/timePSIM.t97
-rw-r--r--doc/supplements/sh/BSP_TIMES247
-rw-r--r--doc/supplements/sh/Makefile161
-rw-r--r--doc/supplements/sh/bsp.t93
-rw-r--r--doc/supplements/sh/callconv.t102
-rw-r--r--doc/supplements/sh/cpumodel.t68
-rw-r--r--doc/supplements/sh/cputable.t109
-rw-r--r--doc/supplements/sh/fatalerr.t31
-rw-r--r--doc/supplements/sh/intr_NOTIMES.t196
-rw-r--r--doc/supplements/sh/memmodel.t39
-rw-r--r--doc/supplements/sh/preface.texi55
-rw-r--r--doc/supplements/sh/sh.texi120
-rw-r--r--doc/supplements/sh/timeBSP.t108
-rw-r--r--doc/supplements/sparc/ERC32_TIMES247
-rw-r--r--doc/supplements/sparc/Makefile163
-rw-r--r--doc/supplements/sparc/bsp.t87
-rw-r--r--doc/supplements/sparc/callconv.t392
-rw-r--r--doc/supplements/sparc/cpumodel.t128
-rw-r--r--doc/supplements/sparc/cputable.t102
-rw-r--r--doc/supplements/sparc/fatalerr.t32
-rw-r--r--doc/supplements/sparc/intr_NOTIMES.t199
-rw-r--r--doc/supplements/sparc/memmodel.t104
-rw-r--r--doc/supplements/sparc/preface.texi91
-rw-r--r--doc/supplements/sparc/sparc.texi119
-rw-r--r--doc/supplements/sparc/timeERC32.t120
-rw-r--r--doc/supplements/template/BSP_TIMES247
-rw-r--r--doc/supplements/template/Makefile159
-rw-r--r--doc/supplements/template/bsp.t93
-rw-r--r--doc/supplements/template/callconv.t92
-rw-r--r--doc/supplements/template/cpumodel.t68
-rw-r--r--doc/supplements/template/cputable.t109
-rw-r--r--doc/supplements/template/fatalerr.t31
-rw-r--r--doc/supplements/template/intr_NOTIMES.t196
-rw-r--r--doc/supplements/template/memmodel.t39
-rw-r--r--doc/supplements/template/preface.texi55
-rw-r--r--doc/supplements/template/template.texi121
-rw-r--r--doc/supplements/template/timeBSP.t108
-rw-r--r--doc/texinfo/texinfo.tex4426
-rw-r--r--doc/tools/bmenu/Makefile45
-rw-r--r--doc/tools/bmenu/address.h110
-rw-r--r--doc/tools/bmenu/address.inl105
-rw-r--r--doc/tools/bmenu/base.h113
-rw-r--r--doc/tools/bmenu/chain.c229
-rw-r--r--doc/tools/bmenu/chain.h347
-rw-r--r--doc/tools/bmenu/chain.inl271
-rw-r--r--doc/tools/bmenu/isr.h18
-rw-r--r--doc/tools/bmenu/main.c1061
-rw-r--r--doc/tools/bmenu/system.h36
-rw-r--r--doc/tools/pdl2texi/Makefile85
-rw-r--r--doc/tools/pdl2texi/address.h110
-rw-r--r--doc/tools/pdl2texi/address.inl104
-rw-r--r--doc/tools/pdl2texi/base.h119
-rw-r--r--doc/tools/pdl2texi/chain.c229
-rw-r--r--doc/tools/pdl2texi/chain.h347
-rw-r--r--doc/tools/pdl2texi/chain.inl270
-rw-r--r--doc/tools/pdl2texi/isr.h18
-rw-r--r--doc/tools/pdl2texi/main.c3616
-rw-r--r--doc/tools/pdl2texi/s.d129
-rw-r--r--doc/tools/pdl2texi/sample.d136
-rw-r--r--doc/tools/pdl2texi/system.h36
-rw-r--r--doc/tools/pdl2texi/test_cases/enum.d44
-rw-r--r--doc/tools/pdl2texi/test_cases/enumbad.d48
-rw-r--r--doc/tools/pdl2texi/test_cases/table.d27
-rw-r--r--doc/tools/src2html/Makefile38
-rw-r--r--doc/tools/src2html1.4a/Ctags/C.c444
-rw-r--r--doc/tools/src2html1.4a/Ctags/Makefile15
-rw-r--r--doc/tools/src2html1.4a/Ctags/ctags.1225
-rw-r--r--doc/tools/src2html1.4a/Ctags/ctags.c265
-rw-r--r--doc/tools/src2html1.4a/Ctags/ctags.h81
-rw-r--r--doc/tools/src2html1.4a/Ctags/fortran.c155
-rw-r--r--doc/tools/src2html1.4a/Ctags/lisp.c97
-rw-r--r--doc/tools/src2html1.4a/Ctags/print.c130
-rw-r--r--doc/tools/src2html1.4a/Ctags/strerror.c6
-rw-r--r--doc/tools/src2html1.4a/Ctags/tree.c138
-rw-r--r--doc/tools/src2html1.4a/Ctags/yacc.c144
-rw-r--r--doc/tools/src2html1.4a/Ctags/z.c20
-rw-r--r--doc/tools/src2html1.4a/FreeBSD/FreeBSD.hdr25
-rw-r--r--doc/tools/src2html1.4a/FreeBSD/FreeBSD.s2h68
-rw-r--r--doc/tools/src2html1.4a/FreeBSD/conf.hdr9
-rw-r--r--doc/tools/src2html1.4a/FreeBSD/ddb.hdr6
-rw-r--r--doc/tools/src2html1.4a/FreeBSD/i386.i386.hdr5
-rw-r--r--doc/tools/src2html1.4a/FreeBSD/i386.include.hdr5
-rw-r--r--doc/tools/src2html1.4a/FreeBSD/i386.isa.hdr10
-rw-r--r--doc/tools/src2html1.4a/FreeBSD/i386.stand.hdr14
-rw-r--r--doc/tools/src2html1.4a/FreeBSD/kern.hdr18
-rw-r--r--doc/tools/src2html1.4a/FreeBSD/net.hdr11
-rw-r--r--doc/tools/src2html1.4a/FreeBSD/netinet.hdr10
-rw-r--r--doc/tools/src2html1.4a/FreeBSD/nfs.hdr7
-rw-r--r--doc/tools/src2html1.4a/FreeBSD/stand.hdr14
-rw-r--r--doc/tools/src2html1.4a/FreeBSD/sys.hdr6
-rw-r--r--doc/tools/src2html1.4a/FreeBSD/ufs.hdr10
-rw-r--r--doc/tools/src2html1.4a/FreeBSD/vm.hdr9
-rw-r--r--doc/tools/src2html1.4a/Readme65
-rw-r--r--doc/tools/src2html1.4a/ctags-emacs/README20
-rw-r--r--doc/tools/src2html1.4a/ctags-emacs/ctagsbin145997 -> 0 bytes
-rw-r--r--doc/tools/src2html1.4a/ctags-emacs/etags.c-ada-patch424
-rw-r--r--doc/tools/src2html1.4a/ctags-wr41
-rw-r--r--doc/tools/src2html1.4a/src2html704
-rw-r--r--doc/tools/src2html1.4a/src2html.1244
-rw-r--r--doc/tools/src2html1.4a/src2html.cgi100
-rw-r--r--doc/tools/texi2www/Makefile50
-rw-r--r--doc/tools/texi2www/archive/texi2www-960103.tgzbin131143 -> 0 bytes
-rw-r--r--doc/tools/texi2www/dir-arrow.gifbin2609 -> 0 bytes
-rw-r--r--doc/tools/texi2www/missing-arrow.gifbin166 -> 0 bytes
-rw-r--r--doc/tools/texi2www/next-arrow.gifbin275 -> 0 bytes
-rw-r--r--doc/tools/texi2www/prev-arrow.gifbin279 -> 0 bytes
-rw-r--r--doc/tools/texi2www/texi2dvi218
-rwxr-xr-xdoc/tools/texi2www/texi2www1284
-rw-r--r--doc/tools/texi2www/texi2www.texi707
-rw-r--r--doc/tools/texi2www/up-arrow.gifbin264 -> 0 bytes
-rw-r--r--doc/tools/update221
-rwxr-xr-xdoc/tools/word-replace89
-rw-r--r--doc/user/Makefile194
-rw-r--r--doc/user/bsp.t318
-rw-r--r--doc/user/c_user.texi170
-rw-r--r--doc/user/clock.t420
-rw-r--r--doc/user/concepts.t331
-rw-r--r--doc/user/conf.t1502
-rw-r--r--doc/user/dirstat.texi42
-rw-r--r--doc/user/dpmem.t360
-rw-r--r--doc/user/event.t337
-rw-r--r--doc/user/example.texi105
-rw-r--r--doc/user/fatal.t170
-rw-r--r--doc/user/glossary.texi771
-rw-r--r--doc/user/init.t416
-rw-r--r--doc/user/intr.t467
-rw-r--r--doc/user/io.t617
-rw-r--r--doc/user/mp.t618
-rw-r--r--doc/user/msg.t824
-rw-r--r--doc/user/overview.t532
-rw-r--r--doc/user/part.t448
-rw-r--r--doc/user/preface.texi189
-rw-r--r--doc/user/region.t657
-rw-r--r--doc/user/rtemsarc.gifbin7653 -> 0 bytes
-rw-r--r--doc/user/rtemsarc.pngbin5698 -> 0 bytes
-rw-r--r--doc/user/rtemspie.eps2164
-rw-r--r--doc/user/rtemspie.gifbin31070 -> 0 bytes
-rw-r--r--doc/user/rtemspie.pdfbin5715766 -> 0 bytes
-rw-r--r--doc/user/rtemspie.pngbin31984 -> 0 bytes
-rw-r--r--doc/user/rtmon.t1174
-rw-r--r--doc/user/schedule.t407
-rw-r--r--doc/user/sem.t821
-rw-r--r--doc/user/signal.t383
-rw-r--r--doc/user/states.eps13822
-rw-r--r--doc/user/states.gifbin31256 -> 0 bytes
-rw-r--r--doc/user/states.pdfbin488333 -> 0 bytes
-rw-r--r--doc/user/states.pngbin22036 -> 0 bytes
-rw-r--r--doc/user/task.t1729
-rw-r--r--doc/user/timer.t504
-rw-r--r--doc/user/userext.t685
-rw-r--r--testsuites/Makefile.am13
-rw-r--r--testsuites/PROBLEMS42
-rw-r--r--testsuites/README44
-rw-r--r--testsuites/itrontests/Makefile.am14
-rw-r--r--testsuites/itrontests/README6
-rw-r--r--testsuites/itrontests/itronhello/Makefile.am42
-rw-r--r--testsuites/itrontests/itronhello/init.c33
-rw-r--r--testsuites/itrontests/itronhello/itronhello.doc23
-rw-r--r--testsuites/itrontests/itronhello/itronhello.scn3
-rw-r--r--testsuites/itrontests/itronhello/system.h37
-rw-r--r--testsuites/itrontests/itronmbf01/Makefile.am42
-rw-r--r--testsuites/itrontests/itronmbf01/init.c367
-rw-r--r--testsuites/itrontests/itronmbf01/itronmbf01.doc12
-rw-r--r--testsuites/itrontests/itronmbf01/itronmbf01.scn71
-rw-r--r--testsuites/itrontests/itronmbf01/system.h38
-rw-r--r--testsuites/itrontests/itronmbox01/Makefile.am42
-rw-r--r--testsuites/itrontests/itronmbox01/init.c36
-rw-r--r--testsuites/itrontests/itronmbox01/itronmbox01.doc0
-rw-r--r--testsuites/itrontests/itronmbox01/itronmbox01.scn0
-rw-r--r--testsuites/itrontests/itronmbox01/system.h35
-rw-r--r--testsuites/itrontests/itronsem01/Makefile.am42
-rw-r--r--testsuites/itrontests/itronsem01/init.c331
-rw-r--r--testsuites/itrontests/itronsem01/itronsem01.doc12
-rw-r--r--testsuites/itrontests/itronsem01/itronsem01.scn61
-rw-r--r--testsuites/itrontests/itronsem01/system.h38
-rw-r--r--testsuites/itrontests/itrontask01/Makefile.am42
-rw-r--r--testsuites/itrontests/itrontask01/init.c71
-rw-r--r--testsuites/itrontests/itrontask01/itrontask01.doc61
-rw-r--r--testsuites/itrontests/itrontask01/itrontask01.scn18
-rw-r--r--testsuites/itrontests/itrontask01/system.h38
-rw-r--r--testsuites/itrontests/itrontask01/task1.c54
-rw-r--r--testsuites/itrontests/itrontask02/Makefile.am42
-rw-r--r--testsuites/itrontests/itrontask02/dormant.c44
-rw-r--r--testsuites/itrontests/itrontask02/init.c580
-rw-r--r--testsuites/itrontests/itrontask02/itrontask02.doc34
-rw-r--r--testsuites/itrontests/itrontask02/itrontask02.scn80
-rw-r--r--testsuites/itrontests/itrontask02/system.h44
-rw-r--r--testsuites/itrontests/itrontask03/Makefile.am42
-rw-r--r--testsuites/itrontests/itrontask03/init.c144
-rw-r--r--testsuites/itrontests/itrontask03/itrontask03.doc54
-rw-r--r--testsuites/itrontests/itrontask03/itrontask03.scn21
-rw-r--r--testsuites/itrontests/itrontask03/preempt.c54
-rw-r--r--testsuites/itrontests/itrontask03/system.h46
-rw-r--r--testsuites/itrontests/itrontask03/task1.c57
-rw-r--r--testsuites/itrontests/itrontask03/task2.c31
-rw-r--r--testsuites/itrontests/itrontask03/task3.c39
-rw-r--r--testsuites/itrontests/itrontask04/Makefile.am42
-rw-r--r--testsuites/itrontests/itrontask04/init.c93
-rw-r--r--testsuites/itrontests/itrontask04/itrontask04.doc49
-rw-r--r--testsuites/itrontests/itrontask04/itrontask04.scn35
-rw-r--r--testsuites/itrontests/itrontask04/system.h44
-rw-r--r--testsuites/itrontests/itrontask04/task1.c44
-rw-r--r--testsuites/itrontests/itrontask04/task2.c40
-rw-r--r--testsuites/itrontests/itrontask04/task3.c53
-rw-r--r--testsuites/itrontests/itrontests.am23
-rw-r--r--testsuites/itrontests/itrontime01/Makefile.am42
-rw-r--r--testsuites/itrontests/itrontime01/init.c62
-rw-r--r--testsuites/itrontests/itrontime01/itrontime01.doc0
-rw-r--r--testsuites/itrontests/itrontime01/itrontime01.scn0
-rw-r--r--testsuites/itrontests/itrontime01/system.h35
-rw-r--r--testsuites/libtests/Makefile.am14
-rw-r--r--testsuites/libtests/README10
-rw-r--r--testsuites/libtests/cpuuse/Makefile.am41
-rw-r--r--testsuites/libtests/cpuuse/cpuuse.scn24
-rw-r--r--testsuites/libtests/cpuuse/init.c105
-rw-r--r--testsuites/libtests/cpuuse/system.h68
-rw-r--r--testsuites/libtests/cpuuse/task1.c102
-rw-r--r--testsuites/libtests/cpuuse/task2.c28
-rw-r--r--testsuites/libtests/cpuuse/task3.c28
-rw-r--r--testsuites/libtests/cpuuse/tswitch.c61
-rw-r--r--testsuites/libtests/libtests.am11
-rw-r--r--testsuites/libtests/malloctest/Makefile.am41
-rw-r--r--testsuites/libtests/malloctest/init.c113
-rw-r--r--testsuites/libtests/malloctest/system.h50
-rw-r--r--testsuites/libtests/malloctest/task1.c72
-rw-r--r--testsuites/libtests/monitor/Makefile.am42
-rw-r--r--testsuites/libtests/monitor/init.c73
-rw-r--r--testsuites/libtests/monitor/system.h57
-rw-r--r--testsuites/libtests/putenvtest/Makefile.am41
-rw-r--r--testsuites/libtests/putenvtest/init.c61
-rw-r--r--testsuites/libtests/rtems++/Init.cc62
-rw-r--r--testsuites/libtests/rtems++/Makefile.am47
-rw-r--r--testsuites/libtests/rtems++/System.h136
-rw-r--r--testsuites/libtests/rtems++/Task1.cc681
-rw-r--r--testsuites/libtests/rtems++/Task2.cc80
-rw-r--r--testsuites/libtests/rtems++/Task3.cc80
-rw-r--r--testsuites/libtests/rtems++/rtems++.doc29
-rw-r--r--testsuites/libtests/rtems++/rtems++.scn161
-rw-r--r--testsuites/libtests/rtmonuse/Makefile.am41
-rw-r--r--testsuites/libtests/rtmonuse/getall.c42
-rw-r--r--testsuites/libtests/rtmonuse/init.c70
-rw-r--r--testsuites/libtests/rtmonuse/rtmonuse.scn27
-rw-r--r--testsuites/libtests/rtmonuse/system.h61
-rw-r--r--testsuites/libtests/rtmonuse/task1.c123
-rw-r--r--testsuites/libtests/stackchk/Makefile.am41
-rw-r--r--testsuites/libtests/stackchk/blow.c48
-rw-r--r--testsuites/libtests/stackchk/init.c85
-rw-r--r--testsuites/libtests/stackchk/stackchk.scn9
-rw-r--r--testsuites/libtests/stackchk/system.h52
-rw-r--r--testsuites/libtests/stackchk/task1.c43
-rw-r--r--testsuites/libtests/termios/Makefile.am41
-rw-r--r--testsuites/libtests/termios/README45
-rw-r--r--testsuites/libtests/termios/init.c145
-rw-r--r--testsuites/mptests/Makefile.am14
-rw-r--r--testsuites/mptests/README10
-rw-r--r--testsuites/mptests/mp01/Makefile.am12
-rw-r--r--testsuites/mptests/mp01/init.c95
-rw-r--r--testsuites/mptests/mp01/node1/Makefile.am50
-rw-r--r--testsuites/mptests/mp01/node1/mp01.doc52
-rw-r--r--testsuites/mptests/mp01/node1/mp01.scn15
-rw-r--r--testsuites/mptests/mp01/node2/Makefile.am50
-rw-r--r--testsuites/mptests/mp01/node2/mp01.doc12
-rw-r--r--testsuites/mptests/mp01/node2/mp01.scn15
-rw-r--r--testsuites/mptests/mp01/system.h45
-rw-r--r--testsuites/mptests/mp01/task1.c83
-rw-r--r--testsuites/mptests/mp02/Makefile.am12
-rw-r--r--testsuites/mptests/mp02/init.c59
-rw-r--r--testsuites/mptests/mp02/node1/Makefile.am50
-rw-r--r--testsuites/mptests/mp02/node1/mp02.doc46
-rw-r--r--testsuites/mptests/mp02/node1/mp02.scn14
-rw-r--r--testsuites/mptests/mp02/node2/Makefile.am50
-rw-r--r--testsuites/mptests/mp02/node2/mp02.doc12
-rw-r--r--testsuites/mptests/mp02/node2/mp02.scn14
-rw-r--r--testsuites/mptests/mp02/system.h44
-rw-r--r--testsuites/mptests/mp02/task1.c117
-rw-r--r--testsuites/mptests/mp03/Makefile.am12
-rw-r--r--testsuites/mptests/mp03/delay.c30
-rw-r--r--testsuites/mptests/mp03/init.c64
-rw-r--r--testsuites/mptests/mp03/node1/Makefile.am50
-rw-r--r--testsuites/mptests/mp03/node1/mp03.doc44
-rw-r--r--testsuites/mptests/mp03/node1/mp03.scn24
-rw-r--r--testsuites/mptests/mp03/node2/Makefile.am50
-rw-r--r--testsuites/mptests/mp03/node2/mp03.doc12
-rw-r--r--testsuites/mptests/mp03/node2/mp03.scn24
-rw-r--r--testsuites/mptests/mp03/system.h57
-rw-r--r--testsuites/mptests/mp03/task1.c154
-rw-r--r--testsuites/mptests/mp04/Makefile.am12
-rw-r--r--testsuites/mptests/mp04/init.c59
-rw-r--r--testsuites/mptests/mp04/node1/Makefile.am50
-rw-r--r--testsuites/mptests/mp04/node1/mp04.doc40
-rw-r--r--testsuites/mptests/mp04/node1/mp04.scn8
-rw-r--r--testsuites/mptests/mp04/node2/Makefile.am50
-rw-r--r--testsuites/mptests/mp04/node2/mp04.doc12
-rw-r--r--testsuites/mptests/mp04/node2/mp04.scn8
-rw-r--r--testsuites/mptests/mp04/system.h46
-rw-r--r--testsuites/mptests/mp04/task1.c82
-rw-r--r--testsuites/mptests/mp05/Makefile.am12
-rw-r--r--testsuites/mptests/mp05/asr.c36
-rw-r--r--testsuites/mptests/mp05/init.c64
-rw-r--r--testsuites/mptests/mp05/node1/Makefile.am50
-rw-r--r--testsuites/mptests/mp05/node1/mp05.doc44
-rw-r--r--testsuites/mptests/mp05/node1/mp05.scn11
-rw-r--r--testsuites/mptests/mp05/node2/Makefile.am50
-rw-r--r--testsuites/mptests/mp05/node2/mp05.doc12
-rw-r--r--testsuites/mptests/mp05/node2/mp05.scn10
-rw-r--r--testsuites/mptests/mp05/system.h62
-rw-r--r--testsuites/mptests/mp05/task1.c105
-rw-r--r--testsuites/mptests/mp06/Makefile.am12
-rw-r--r--testsuites/mptests/mp06/init.c64
-rw-r--r--testsuites/mptests/mp06/node1/Makefile.am50
-rw-r--r--testsuites/mptests/mp06/node1/mp06.doc44
-rw-r--r--testsuites/mptests/mp06/node1/mp06.scn11
-rw-r--r--testsuites/mptests/mp06/node2/Makefile.am50
-rw-r--r--testsuites/mptests/mp06/node2/mp06.doc12
-rw-r--r--testsuites/mptests/mp06/node2/mp06.scn12
-rw-r--r--testsuites/mptests/mp06/system.h51
-rw-r--r--testsuites/mptests/mp06/task1.c175
-rw-r--r--testsuites/mptests/mp07/Makefile.am12
-rw-r--r--testsuites/mptests/mp07/init.c64
-rw-r--r--testsuites/mptests/mp07/node1/Makefile.am50
-rw-r--r--testsuites/mptests/mp07/node1/mp07.doc45
-rw-r--r--testsuites/mptests/mp07/node1/mp07.scn10
-rw-r--r--testsuites/mptests/mp07/node2/Makefile.am50
-rw-r--r--testsuites/mptests/mp07/node2/mp07.doc12
-rw-r--r--testsuites/mptests/mp07/node2/mp07.scn9
-rw-r--r--testsuites/mptests/mp07/system.h51
-rw-r--r--testsuites/mptests/mp07/task1.c102
-rw-r--r--testsuites/mptests/mp08/Makefile.am12
-rw-r--r--testsuites/mptests/mp08/init.c73
-rw-r--r--testsuites/mptests/mp08/node1/Makefile.am50
-rw-r--r--testsuites/mptests/mp08/node1/mp08.doc51
-rw-r--r--testsuites/mptests/mp08/node1/mp08.scn11
-rw-r--r--testsuites/mptests/mp08/node2/Makefile.am50
-rw-r--r--testsuites/mptests/mp08/node2/mp08.doc12
-rw-r--r--testsuites/mptests/mp08/node2/mp08.scn12
-rw-r--r--testsuites/mptests/mp08/system.h50
-rw-r--r--testsuites/mptests/mp08/task1.c88
-rw-r--r--testsuites/mptests/mp09/Makefile.am12
-rw-r--r--testsuites/mptests/mp09/init.c73
-rw-r--r--testsuites/mptests/mp09/node1/Makefile.am50
-rw-r--r--testsuites/mptests/mp09/node1/mp09.doc49
-rw-r--r--testsuites/mptests/mp09/node1/mp09.scn22
-rw-r--r--testsuites/mptests/mp09/node2/Makefile.am50
-rw-r--r--testsuites/mptests/mp09/node2/mp09.doc12
-rw-r--r--testsuites/mptests/mp09/node2/mp09.scn27
-rw-r--r--testsuites/mptests/mp09/recvmsg.c46
-rw-r--r--testsuites/mptests/mp09/sendmsg.c59
-rw-r--r--testsuites/mptests/mp09/system.h59
-rw-r--r--testsuites/mptests/mp09/task1.c108
-rw-r--r--testsuites/mptests/mp10/Makefile.am12
-rw-r--r--testsuites/mptests/mp10/init.c142
-rw-r--r--testsuites/mptests/mp10/node1/Makefile.am50
-rw-r--r--testsuites/mptests/mp10/node1/mp10.doc45
-rw-r--r--testsuites/mptests/mp10/node1/mp10.scn4
-rw-r--r--testsuites/mptests/mp10/node2/Makefile.am50
-rw-r--r--testsuites/mptests/mp10/node2/mp10.doc12
-rw-r--r--testsuites/mptests/mp10/node2/mp10.scn19
-rw-r--r--testsuites/mptests/mp10/system.h63
-rw-r--r--testsuites/mptests/mp10/task1.c51
-rw-r--r--testsuites/mptests/mp10/task2.c46
-rw-r--r--testsuites/mptests/mp10/task3.c49
-rw-r--r--testsuites/mptests/mp11/Makefile.am12
-rw-r--r--testsuites/mptests/mp11/init.c104
-rw-r--r--testsuites/mptests/mp11/node1/Makefile.am50
-rw-r--r--testsuites/mptests/mp11/node1/mp11.doc41
-rw-r--r--testsuites/mptests/mp11/node1/mp11.scn10
-rw-r--r--testsuites/mptests/mp11/node2/Makefile.am50
-rw-r--r--testsuites/mptests/mp11/node2/mp11.doc12
-rw-r--r--testsuites/mptests/mp11/node2/mp11.scn2
-rw-r--r--testsuites/mptests/mp11/system.h55
-rw-r--r--testsuites/mptests/mp12/Makefile.am12
-rw-r--r--testsuites/mptests/mp12/init.c112
-rw-r--r--testsuites/mptests/mp12/node1/Makefile.am50
-rw-r--r--testsuites/mptests/mp12/node1/mp12.doc51
-rw-r--r--testsuites/mptests/mp12/node1/mp12.scn6
-rw-r--r--testsuites/mptests/mp12/node2/Makefile.am50
-rw-r--r--testsuites/mptests/mp12/node2/mp12.doc12
-rw-r--r--testsuites/mptests/mp12/node2/mp12.scn10
-rw-r--r--testsuites/mptests/mp12/system.h54
-rw-r--r--testsuites/mptests/mp13/Makefile.am12
-rw-r--r--testsuites/mptests/mp13/init.c114
-rw-r--r--testsuites/mptests/mp13/node1/Makefile.am50
-rw-r--r--testsuites/mptests/mp13/node1/mp13.doc47
-rw-r--r--testsuites/mptests/mp13/node1/mp13.scn14
-rw-r--r--testsuites/mptests/mp13/node2/Makefile.am50
-rw-r--r--testsuites/mptests/mp13/node2/mp13.doc12
-rw-r--r--testsuites/mptests/mp13/node2/mp13.scn16
-rw-r--r--testsuites/mptests/mp13/system.h59
-rw-r--r--testsuites/mptests/mp13/task1.c72
-rw-r--r--testsuites/mptests/mp13/task2.c105
-rw-r--r--testsuites/mptests/mp14/Makefile.am12
-rw-r--r--testsuites/mptests/mp14/delay.c33
-rw-r--r--testsuites/mptests/mp14/evtask1.c86
-rw-r--r--testsuites/mptests/mp14/evtmtask.c64
-rw-r--r--testsuites/mptests/mp14/exit.c39
-rw-r--r--testsuites/mptests/mp14/init.c190
-rw-r--r--testsuites/mptests/mp14/msgtask1.c106
-rw-r--r--testsuites/mptests/mp14/node1/Makefile.am51
-rw-r--r--testsuites/mptests/mp14/node1/mp14.doc49
-rw-r--r--testsuites/mptests/mp14/node1/mp14.scn41
-rw-r--r--testsuites/mptests/mp14/node2/Makefile.am51
-rw-r--r--testsuites/mptests/mp14/node2/mp14.doc12
-rw-r--r--testsuites/mptests/mp14/node2/mp14.scn38
-rw-r--r--testsuites/mptests/mp14/pttask1.c70
-rw-r--r--testsuites/mptests/mp14/smtask1.c72
-rw-r--r--testsuites/mptests/mp14/system.h118
-rw-r--r--testsuites/mptests/mptests.am27
-rw-r--r--testsuites/psxtests/Makefile.am22
-rw-r--r--testsuites/psxtests/include/Makefile.am9
-rw-r--r--testsuites/psxtests/include/pmacros.h87
-rw-r--r--testsuites/psxtests/psx01/Makefile.am43
-rw-r--r--testsuites/psxtests/psx01/init.c242
-rw-r--r--testsuites/psxtests/psx01/psx01.scn53
-rw-r--r--testsuites/psxtests/psx01/system.h55
-rw-r--r--testsuites/psxtests/psx01/task.c93
-rw-r--r--testsuites/psxtests/psx02/Makefile.am43
-rw-r--r--testsuites/psxtests/psx02/init.c145
-rw-r--r--testsuites/psxtests/psx02/psx02.scn26
-rw-r--r--testsuites/psxtests/psx02/system.h51
-rw-r--r--testsuites/psxtests/psx02/task.c44
-rw-r--r--testsuites/psxtests/psx03/Makefile.am43
-rw-r--r--testsuites/psxtests/psx03/init.c203
-rw-r--r--testsuites/psxtests/psx03/psx03.scn21
-rw-r--r--testsuites/psxtests/psx03/system.h54
-rw-r--r--testsuites/psxtests/psx03/task.c64
-rw-r--r--testsuites/psxtests/psx04/Makefile.am43
-rw-r--r--testsuites/psxtests/psx04/init.c568
-rw-r--r--testsuites/psxtests/psx04/psx04.scn100
-rw-r--r--testsuites/psxtests/psx04/system.h64
-rw-r--r--testsuites/psxtests/psx04/task1.c43
-rw-r--r--testsuites/psxtests/psx04/task2.c41
-rw-r--r--testsuites/psxtests/psx04/task3.c118
-rw-r--r--testsuites/psxtests/psx05/Makefile.am43
-rw-r--r--testsuites/psxtests/psx05/init.c583
-rw-r--r--testsuites/psxtests/psx05/psx05.scn103
-rw-r--r--testsuites/psxtests/psx05/system.h66
-rw-r--r--testsuites/psxtests/psx05/task.c57
-rw-r--r--testsuites/psxtests/psx05/task2.c48
-rw-r--r--testsuites/psxtests/psx05/task3.c50
-rw-r--r--testsuites/psxtests/psx06/Makefile.am43
-rw-r--r--testsuites/psxtests/psx06/init.c120
-rw-r--r--testsuites/psxtests/psx06/psx06.scn20
-rw-r--r--testsuites/psxtests/psx06/system.h60
-rw-r--r--testsuites/psxtests/psx06/task.c50
-rw-r--r--testsuites/psxtests/psx06/task2.c51
-rw-r--r--testsuites/psxtests/psx07/Makefile.am43
-rw-r--r--testsuites/psxtests/psx07/init.c492
-rw-r--r--testsuites/psxtests/psx07/psx07.scn96
-rw-r--r--testsuites/psxtests/psx07/system.h50
-rw-r--r--testsuites/psxtests/psx07/task.c33
-rw-r--r--testsuites/psxtests/psx08/Makefile.am43
-rw-r--r--testsuites/psxtests/psx08/init.c97
-rw-r--r--testsuites/psxtests/psx08/psx08.scn22
-rw-r--r--testsuites/psxtests/psx08/system.h60
-rw-r--r--testsuites/psxtests/psx08/task1.c31
-rw-r--r--testsuites/psxtests/psx08/task2.c55
-rw-r--r--testsuites/psxtests/psx08/task3.c51
-rw-r--r--testsuites/psxtests/psx09/Makefile.am43
-rw-r--r--testsuites/psxtests/psx09/init.c225
-rw-r--r--testsuites/psxtests/psx09/psx09.scn22
-rw-r--r--testsuites/psxtests/psx09/system.h57
-rw-r--r--testsuites/psxtests/psx10/Makefile.am43
-rw-r--r--testsuites/psxtests/psx10/init.c311
-rw-r--r--testsuites/psxtests/psx10/psx10.scn55
-rw-r--r--testsuites/psxtests/psx10/system.h68
-rw-r--r--testsuites/psxtests/psx10/task.c64
-rw-r--r--testsuites/psxtests/psx10/task2.c46
-rw-r--r--testsuites/psxtests/psx10/task3.c45
-rw-r--r--testsuites/psxtests/psx11/Makefile.am43
-rw-r--r--testsuites/psxtests/psx11/init.c107
-rw-r--r--testsuites/psxtests/psx11/psx11.scn18
-rw-r--r--testsuites/psxtests/psx11/system.h50
-rw-r--r--testsuites/psxtests/psx11/task.c91
-rw-r--r--testsuites/psxtests/psx12/Makefile.am43
-rw-r--r--testsuites/psxtests/psx12/init.c139
-rw-r--r--testsuites/psxtests/psx12/psx12.scn11
-rw-r--r--testsuites/psxtests/psx12/system.h53
-rw-r--r--testsuites/psxtests/psx12/task.c33
-rw-r--r--testsuites/psxtests/psx13/Makefile.am38
-rw-r--r--testsuites/psxtests/psx13/main.c39
-rw-r--r--testsuites/psxtests/psx13/psx13.scn16
-rw-r--r--testsuites/psxtests/psx13/test.c686
-rw-r--r--testsuites/psxtests/psxcancel/Makefile.am43
-rw-r--r--testsuites/psxtests/psxcancel/init.c27
-rw-r--r--testsuites/psxtests/psxcancel/psxcancel.scn3
-rw-r--r--testsuites/psxtests/psxfile01/Makefile.am41
-rw-r--r--testsuites/psxtests/psxfile01/main.c39
-rw-r--r--testsuites/psxtests/psxfile01/psxfile01.scn197
-rw-r--r--testsuites/psxtests/psxfile01/test.c500
-rw-r--r--testsuites/psxtests/psxfile01/test_cat.c81
-rw-r--r--testsuites/psxtests/psxfile01/test_extend.c60
-rw-r--r--testsuites/psxtests/psxfile01/test_write.c59
-rw-r--r--testsuites/psxtests/psxhdrs/Makefile.am39
-rw-r--r--testsuites/psxtests/psxhdrs/clock01.c28
-rw-r--r--testsuites/psxtests/psxhdrs/clock02.c28
-rw-r--r--testsuites/psxtests/psxhdrs/clock03.c28
-rw-r--r--testsuites/psxtests/psxhdrs/clock04.c28
-rw-r--r--testsuites/psxtests/psxhdrs/clock05.c34
-rw-r--r--testsuites/psxtests/psxhdrs/clock06.c31
-rw-r--r--testsuites/psxtests/psxhdrs/cond01.c27
-rw-r--r--testsuites/psxtests/psxhdrs/cond02.c27
-rw-r--r--testsuites/psxtests/psxhdrs/cond03.c28
-rw-r--r--testsuites/psxtests/psxhdrs/cond04.c27
-rw-r--r--testsuites/psxtests/psxhdrs/cond05.c27
-rw-r--r--testsuites/psxtests/psxhdrs/cond06.c28
-rw-r--r--testsuites/psxtests/psxhdrs/cond07.c29
-rw-r--r--testsuites/psxtests/psxhdrs/cond08.c31
-rw-r--r--testsuites/psxtests/psxhdrs/cond09.c34
-rw-r--r--testsuites/psxtests/psxhdrs/cond10.c27
-rw-r--r--testsuites/psxtests/psxhdrs/key01.c33
-rw-r--r--testsuites/psxtests/psxhdrs/key02.c31
-rw-r--r--testsuites/psxtests/psxhdrs/key03.c29
-rw-r--r--testsuites/psxtests/psxhdrs/key04.c27
-rw-r--r--testsuites/psxtests/psxhdrs/mutex01.c27
-rw-r--r--testsuites/psxtests/psxhdrs/mutex02.c27
-rw-r--r--testsuites/psxtests/psxhdrs/mutex03.c28
-rw-r--r--testsuites/psxtests/psxhdrs/mutex04.c27
-rw-r--r--testsuites/psxtests/psxhdrs/mutex05.c27
-rw-r--r--testsuites/psxtests/psxhdrs/mutex06.c27
-rw-r--r--testsuites/psxtests/psxhdrs/mutex07.c35
-rw-r--r--testsuites/psxtests/psxhdrs/mutex08.c31
-rw-r--r--testsuites/psxtests/psxhdrs/mutex09.c31
-rw-r--r--testsuites/psxtests/psxhdrs/mutex10.c31
-rw-r--r--testsuites/psxtests/psxhdrs/mutex11.c34
-rw-r--r--testsuites/psxtests/psxhdrs/mutex12.c27
-rw-r--r--testsuites/psxtests/psxhdrs/mutex13.c31
-rw-r--r--testsuites/psxtests/psxhdrs/mutex14.c31
-rw-r--r--testsuites/psxtests/psxhdrs/mutex15.c31
-rw-r--r--testsuites/psxtests/psxhdrs/mutex16.c34
-rw-r--r--testsuites/psxtests/psxhdrs/proc01.c22
-rw-r--r--testsuites/psxtests/psxhdrs/proc02.c22
-rw-r--r--testsuites/psxtests/psxhdrs/proc03.c23
-rw-r--r--testsuites/psxtests/psxhdrs/proc04.c23
-rw-r--r--testsuites/psxtests/psxhdrs/proc05.c23
-rw-r--r--testsuites/psxtests/psxhdrs/proc06.c23
-rw-r--r--testsuites/psxtests/psxhdrs/proc07.c25
-rw-r--r--testsuites/psxtests/psxhdrs/proc08.c25
-rw-r--r--testsuites/psxtests/psxhdrs/proc09.c26
-rw-r--r--testsuites/psxtests/psxhdrs/proc10.c22
-rw-r--r--testsuites/psxtests/psxhdrs/proc11.c24
-rw-r--r--testsuites/psxtests/psxhdrs/proc12.c22
-rw-r--r--testsuites/psxtests/psxhdrs/proc13.c22
-rw-r--r--testsuites/psxtests/psxhdrs/proc14.c24
-rw-r--r--testsuites/psxtests/psxhdrs/pthread01.c27
-rw-r--r--testsuites/psxtests/psxhdrs/pthread02.c27
-rw-r--r--testsuites/psxtests/psxhdrs/pthread03.c31
-rw-r--r--testsuites/psxtests/psxhdrs/pthread04.c28
-rw-r--r--testsuites/psxtests/psxhdrs/pthread05.c35
-rw-r--r--testsuites/psxtests/psxhdrs/pthread06.c32
-rw-r--r--testsuites/psxtests/psxhdrs/pthread07.c37
-rw-r--r--testsuites/psxtests/psxhdrs/pthread08.c26
-rw-r--r--testsuites/psxtests/psxhdrs/pthread09.c26
-rw-r--r--testsuites/psxtests/psxhdrs/pthread10.c28
-rw-r--r--testsuites/psxtests/psxhdrs/pthread11.c51
-rw-r--r--testsuites/psxtests/psxhdrs/pthread12.c31
-rw-r--r--testsuites/psxtests/psxhdrs/pthread13.c31
-rw-r--r--testsuites/psxtests/psxhdrs/pthread14.c28
-rw-r--r--testsuites/psxtests/psxhdrs/pthread15.c31
-rw-r--r--testsuites/psxtests/psxhdrs/pthread16.c28
-rw-r--r--testsuites/psxtests/psxhdrs/pthread17.c35
-rw-r--r--testsuites/psxtests/psxhdrs/pthread18.c28
-rw-r--r--testsuites/psxtests/psxhdrs/pthread19.c28
-rw-r--r--testsuites/psxtests/psxhdrs/pthread20.c28
-rw-r--r--testsuites/psxtests/psxhdrs/pthread21.c28
-rw-r--r--testsuites/psxtests/psxhdrs/pthread22.c49
-rw-r--r--testsuites/psxtests/psxhdrs/pthread23.c29
-rw-r--r--testsuites/psxtests/psxhdrs/pthread24.c35
-rw-r--r--testsuites/psxtests/psxhdrs/pthread25.c33
-rw-r--r--testsuites/psxtests/psxhdrs/pthread26.c30
-rw-r--r--testsuites/psxtests/psxhdrs/pthread27.c31
-rw-r--r--testsuites/psxtests/psxhdrs/pthread28.c32
-rw-r--r--testsuites/psxtests/psxhdrs/pthread29.c35
-rw-r--r--testsuites/psxtests/psxhdrs/pthread30.c35
-rw-r--r--testsuites/psxtests/psxhdrs/pthread31.c28
-rw-r--r--testsuites/psxtests/psxhdrs/pthread32.c34
-rw-r--r--testsuites/psxtests/psxhdrs/pthread33.c24
-rw-r--r--testsuites/psxtests/psxhdrs/pthread34.c30
-rw-r--r--testsuites/psxtests/psxhdrs/pthread35.c31
-rw-r--r--testsuites/psxtests/psxhdrs/pthread36.c28
-rw-r--r--testsuites/psxtests/psxhdrs/sched01.c43
-rw-r--r--testsuites/psxtests/psxhdrs/sched02.c30
-rw-r--r--testsuites/psxtests/psxhdrs/sched03.c51
-rw-r--r--testsuites/psxtests/psxhdrs/sched04.c29
-rw-r--r--testsuites/psxtests/psxhdrs/sched05.c26
-rw-r--r--testsuites/psxtests/psxhdrs/sched06.c34
-rw-r--r--testsuites/psxtests/psxhdrs/sched07.c34
-rw-r--r--testsuites/psxtests/psxhdrs/sched08.c30
-rw-r--r--testsuites/psxtests/psxhdrs/signal01.c26
-rw-r--r--testsuites/psxtests/psxhdrs/signal02.c26
-rw-r--r--testsuites/psxtests/psxhdrs/signal03.c23
-rw-r--r--testsuites/psxtests/psxhdrs/signal04.c26
-rw-r--r--testsuites/psxtests/psxhdrs/signal05.c23
-rw-r--r--testsuites/psxtests/psxhdrs/signal06.c38
-rw-r--r--testsuites/psxtests/psxhdrs/signal07.c31
-rw-r--r--testsuites/psxtests/psxhdrs/signal08.c33
-rw-r--r--testsuites/psxtests/psxhdrs/signal09.c28
-rw-r--r--testsuites/psxtests/psxhdrs/signal10.c24
-rw-r--r--testsuites/psxtests/psxhdrs/signal11.c25
-rw-r--r--testsuites/psxtests/psxhdrs/signal12.c25
-rw-r--r--testsuites/psxtests/psxhdrs/signal13.c31
-rw-r--r--testsuites/psxtests/psxhdrs/signal14.c25
-rw-r--r--testsuites/psxtests/psxhdrs/signal15.c25
-rw-r--r--testsuites/psxtests/psxhdrs/signal16.c35
-rw-r--r--testsuites/psxtests/psxhdrs/signal17.c26
-rw-r--r--testsuites/psxtests/psxhdrs/signal18.c27
-rw-r--r--testsuites/psxtests/psxhdrs/signal19.c26
-rw-r--r--testsuites/psxtests/psxhdrs/signal20.c25
-rw-r--r--testsuites/psxtests/psxhdrs/signal21.c22
-rw-r--r--testsuites/psxtests/psxhdrs/signal22.c25
-rw-r--r--testsuites/psxtests/psxhdrs/time01.c22
-rw-r--r--testsuites/psxtests/psxhdrs/time02.c27
-rw-r--r--testsuites/psxtests/psxhdrs/time03.c33
-rw-r--r--testsuites/psxtests/psxhdrs/time04.c22
-rw-r--r--testsuites/psxtests/psxhdrs/time05.c27
-rw-r--r--testsuites/psxtests/psxhdrs/time06.c23
-rw-r--r--testsuites/psxtests/psxhdrs/time07.c23
-rw-r--r--testsuites/psxtests/psxhdrs/time08.c23
-rw-r--r--testsuites/psxtests/psxhdrs/time09.c23
-rw-r--r--testsuites/psxtests/psxhdrs/time10.c24
-rw-r--r--testsuites/psxtests/psxhdrs/time11.c24
-rw-r--r--testsuites/psxtests/psxhdrs/time12.c24
-rw-r--r--testsuites/psxtests/psxhdrs/time13.c24
-rw-r--r--testsuites/psxtests/psxhdrs/timer01.c36
-rw-r--r--testsuites/psxtests/psxhdrs/timer02.c27
-rw-r--r--testsuites/psxtests/psxhdrs/timer03.c38
-rw-r--r--testsuites/psxtests/psxhdrs/timer04.c28
-rw-r--r--testsuites/psxtests/psxhdrs/timer05.c27
-rw-r--r--testsuites/psxtests/psxhdrs/timer06.c30
-rw-r--r--testsuites/psxtests/psxmount/Makefile.am38
-rw-r--r--testsuites/psxtests/psxmount/main.c31
-rw-r--r--testsuites/psxtests/psxmount/psxmount.scn86
-rw-r--r--testsuites/psxtests/psxmount/test.c445
-rw-r--r--testsuites/psxtests/psxmsgq01/Makefile.am43
-rw-r--r--testsuites/psxtests/psxmsgq01/init.c1297
-rw-r--r--testsuites/psxtests/psxmsgq01/psxmsgq01.scn116
-rw-r--r--testsuites/psxtests/psxmsgq01/system.h77
-rw-r--r--testsuites/psxtests/psxreaddir/Makefile.am38
-rw-r--r--testsuites/psxtests/psxreaddir/main.c29
-rw-r--r--testsuites/psxtests/psxreaddir/psxreaddir.scn225
-rw-r--r--testsuites/psxtests/psxreaddir/test.c449
-rw-r--r--testsuites/psxtests/psxsem01/Makefile.am43
-rw-r--r--testsuites/psxtests/psxsem01/init.c246
-rw-r--r--testsuites/psxtests/psxsem01/psxsem01.scn37
-rw-r--r--testsuites/psxtests/psxsem01/system.h57
-rw-r--r--testsuites/psxtests/psxstat/Makefile.am38
-rw-r--r--testsuites/psxtests/psxstat/main.c41
-rw-r--r--testsuites/psxtests/psxstat/psxstat.scn1245
-rw-r--r--testsuites/psxtests/psxstat/test.c835
-rw-r--r--testsuites/psxtests/psxtests.am23
-rw-r--r--testsuites/psxtests/psxtime/Makefile.am38
-rw-r--r--testsuites/psxtests/psxtime/main.c39
-rw-r--r--testsuites/psxtests/psxtime/psxtime.scn302
-rw-r--r--testsuites/psxtests/psxtime/test.c115
-rw-r--r--testsuites/psxtests/psxtimer/Makefile.am43
-rw-r--r--testsuites/psxtests/psxtimer/psxtimer.c337
-rw-r--r--testsuites/psxtests/psxtimer/psxtimer.scn38
-rw-r--r--testsuites/psxtests/psxtimer/system.h70
-rw-r--r--testsuites/samples/Makefile.am24
-rw-r--r--testsuites/samples/README72
-rw-r--r--testsuites/samples/base_mp/Makefile.am12
-rw-r--r--testsuites/samples/base_mp/apptask.c36
-rw-r--r--testsuites/samples/base_mp/init.c45
-rw-r--r--testsuites/samples/base_mp/node1/Makefile.am50
-rw-r--r--testsuites/samples/base_mp/node1/base_mp.doc12
-rw-r--r--testsuites/samples/base_mp/node1/base_mp.scn5
-rw-r--r--testsuites/samples/base_mp/node2/Makefile.am50
-rw-r--r--testsuites/samples/base_mp/node2/base_mp.doc12
-rw-r--r--testsuites/samples/base_mp/node2/base_mp.scn5
-rw-r--r--testsuites/samples/base_mp/system.h47
-rw-r--r--testsuites/samples/base_sp/Makefile.am41
-rw-r--r--testsuites/samples/base_sp/apptask.c37
-rw-r--r--testsuites/samples/base_sp/base_sp.doc12
-rw-r--r--testsuites/samples/base_sp/base_sp.scn5
-rw-r--r--testsuites/samples/base_sp/init.c47
-rw-r--r--testsuites/samples/base_sp/system.h43
-rw-r--r--testsuites/samples/cdtest/Makefile.am52
-rw-r--r--testsuites/samples/cdtest/cdtest.scn31
-rw-r--r--testsuites/samples/cdtest/init.c25
-rw-r--r--testsuites/samples/cdtest/main.cc215
-rw-r--r--testsuites/samples/cdtest/system.h41
-rw-r--r--testsuites/samples/hello/Makefile.am43
-rw-r--r--testsuites/samples/hello/hello.doc12
-rw-r--r--testsuites/samples/hello/hello.scn3
-rw-r--r--testsuites/samples/hello/init.c35
-rw-r--r--testsuites/samples/hello/system.h38
-rw-r--r--testsuites/samples/minimum/Makefile.am41
-rw-r--r--testsuites/samples/minimum/init.c37
-rw-r--r--testsuites/samples/minimum/minimum.doc12
-rw-r--r--testsuites/samples/minimum/minimum.scn1
-rw-r--r--testsuites/samples/paranoia/Makefile.am49
-rw-r--r--testsuites/samples/paranoia/init.c47
-rw-r--r--testsuites/samples/paranoia/paranoia.c2304
-rw-r--r--testsuites/samples/paranoia/paranoia.doc12
-rw-r--r--testsuites/samples/paranoia/system.h41
-rw-r--r--testsuites/samples/sample.am18
-rw-r--r--testsuites/samples/ticker/Makefile.am43
-rw-r--r--testsuites/samples/ticker/init.c60
-rw-r--r--testsuites/samples/ticker/system.h46
-rw-r--r--testsuites/samples/ticker/tasks.c43
-rw-r--r--testsuites/samples/ticker/ticker.doc12
-rw-r--r--testsuites/samples/ticker/ticker.scn16
-rw-r--r--testsuites/samples/unlimited/Makefile.am43
-rw-r--r--testsuites/samples/unlimited/init.c127
-rw-r--r--testsuites/samples/unlimited/system.h95
-rw-r--r--testsuites/samples/unlimited/test1.c103
-rw-r--r--testsuites/samples/unlimited/test2.c229
-rw-r--r--testsuites/samples/unlimited/test3.c146
-rw-r--r--testsuites/samples/unlimited/unlimited.doc37
-rw-r--r--testsuites/samples/unlimited/unlimited.scn337
-rw-r--r--testsuites/sptests/Makefile.am16
-rw-r--r--testsuites/sptests/README9
-rw-r--r--testsuites/sptests/sp01/Makefile.am38
-rw-r--r--testsuites/sptests/sp01/init.c85
-rw-r--r--testsuites/sptests/sp01/sp01.doc42
-rw-r--r--testsuites/sptests/sp01/sp01.scn18
-rw-r--r--testsuites/sptests/sp01/system.h46
-rw-r--r--testsuites/sptests/sp01/task1.c49
-rw-r--r--testsuites/sptests/sp02/Makefile.am38
-rw-r--r--testsuites/sptests/sp02/init.c151
-rw-r--r--testsuites/sptests/sp02/preempt.c31
-rw-r--r--testsuites/sptests/sp02/sp02.doc36
-rw-r--r--testsuites/sptests/sp02/sp02.scn15
-rw-r--r--testsuites/sptests/sp02/system.h59
-rw-r--r--testsuites/sptests/sp02/task1.c65
-rw-r--r--testsuites/sptests/sp02/task2.c33
-rw-r--r--testsuites/sptests/sp02/task3.c36
-rw-r--r--testsuites/sptests/sp03/Makefile.am38
-rw-r--r--testsuites/sptests/sp03/init.c66
-rw-r--r--testsuites/sptests/sp03/sp03.doc23
-rw-r--r--testsuites/sptests/sp03/sp03.scn26
-rw-r--r--testsuites/sptests/sp03/system.h50
-rw-r--r--testsuites/sptests/sp03/task1.c58
-rw-r--r--testsuites/sptests/sp03/task2.c45
-rw-r--r--testsuites/sptests/sp04/Makefile.am38
-rw-r--r--testsuites/sptests/sp04/init.c109
-rw-r--r--testsuites/sptests/sp04/sp04.doc37
-rw-r--r--testsuites/sptests/sp04/sp04.scn25
-rw-r--r--testsuites/sptests/sp04/system.h79
-rw-r--r--testsuites/sptests/sp04/task1.c117
-rw-r--r--testsuites/sptests/sp04/task2.c28
-rw-r--r--testsuites/sptests/sp04/task3.c28
-rw-r--r--testsuites/sptests/sp04/tswitch.c62
-rw-r--r--testsuites/sptests/sp05/Makefile.am38
-rw-r--r--testsuites/sptests/sp05/init.c80
-rw-r--r--testsuites/sptests/sp05/sp05.doc25
-rw-r--r--testsuites/sptests/sp05/sp05.scn47
-rw-r--r--testsuites/sptests/sp05/system.h54
-rw-r--r--testsuites/sptests/sp05/task1.c77
-rw-r--r--testsuites/sptests/sp05/task2.c38
-rw-r--r--testsuites/sptests/sp05/task3.c38
-rw-r--r--testsuites/sptests/sp06/Makefile.am38
-rw-r--r--testsuites/sptests/sp06/init.c86
-rw-r--r--testsuites/sptests/sp06/sp06.doc25
-rw-r--r--testsuites/sptests/sp06/sp06.scn40
-rw-r--r--testsuites/sptests/sp06/system.h57
-rw-r--r--testsuites/sptests/sp06/task1.c60
-rw-r--r--testsuites/sptests/sp06/task2.c39
-rw-r--r--testsuites/sptests/sp06/task3.c31
-rw-r--r--testsuites/sptests/sp07/Makefile.am39
-rw-r--r--testsuites/sptests/sp07/init.c127
-rw-r--r--testsuites/sptests/sp07/sp07.doc36
-rw-r--r--testsuites/sptests/sp07/sp07.scn33
-rw-r--r--testsuites/sptests/sp07/system.h88
-rw-r--r--testsuites/sptests/sp07/task1.c84
-rw-r--r--testsuites/sptests/sp07/task2.c77
-rw-r--r--testsuites/sptests/sp07/task3.c33
-rw-r--r--testsuites/sptests/sp07/task4.c29
-rw-r--r--testsuites/sptests/sp07/taskexit.c32
-rw-r--r--testsuites/sptests/sp07/tcreate.c34
-rw-r--r--testsuites/sptests/sp07/tdelete.c36
-rw-r--r--testsuites/sptests/sp07/trestart.c33
-rw-r--r--testsuites/sptests/sp07/tstart.c33
-rw-r--r--testsuites/sptests/sp08/Makefile.am38
-rw-r--r--testsuites/sptests/sp08/init.c52
-rw-r--r--testsuites/sptests/sp08/sp08.doc25
-rw-r--r--testsuites/sptests/sp08/sp08.scn22
-rw-r--r--testsuites/sptests/sp08/system.h51
-rw-r--r--testsuites/sptests/sp08/task1.c255
-rw-r--r--testsuites/sptests/sp09/Makefile.am42
-rw-r--r--testsuites/sptests/sp09/delay.c27
-rw-r--r--testsuites/sptests/sp09/init.c119
-rw-r--r--testsuites/sptests/sp09/isr.c26
-rw-r--r--testsuites/sptests/sp09/screen01.c179
-rw-r--r--testsuites/sptests/sp09/screen02.c191
-rw-r--r--testsuites/sptests/sp09/screen03.c217
-rw-r--r--testsuites/sptests/sp09/screen04.c84
-rw-r--r--testsuites/sptests/sp09/screen05.c170
-rw-r--r--testsuites/sptests/sp09/screen06.c124
-rw-r--r--testsuites/sptests/sp09/screen07.c206
-rw-r--r--testsuites/sptests/sp09/screen08.c127
-rw-r--r--testsuites/sptests/sp09/screen09.c151
-rw-r--r--testsuites/sptests/sp09/screen10.c163
-rw-r--r--testsuites/sptests/sp09/screen11.c256
-rw-r--r--testsuites/sptests/sp09/screen12.c336
-rw-r--r--testsuites/sptests/sp09/screen13.c113
-rw-r--r--testsuites/sptests/sp09/screen14.c153
-rw-r--r--testsuites/sptests/sp09/sp09.doc35
-rw-r--r--testsuites/sptests/sp09/sp09.scn251
-rw-r--r--testsuites/sptests/sp09/system.h142
-rw-r--r--testsuites/sptests/sp09/task1.c69
-rw-r--r--testsuites/sptests/sp09/task2.c47
-rw-r--r--testsuites/sptests/sp09/task3.c52
-rw-r--r--testsuites/sptests/sp09/task4.c49
-rw-r--r--testsuites/sptests/sp11/Makefile.am38
-rw-r--r--testsuites/sptests/sp11/init.c91
-rw-r--r--testsuites/sptests/sp11/sp11.doc25
-rw-r--r--testsuites/sptests/sp11/sp11.scn74
-rw-r--r--testsuites/sptests/sp11/system.h91
-rw-r--r--testsuites/sptests/sp11/task1.c409
-rw-r--r--testsuites/sptests/sp11/task2.c125
-rw-r--r--testsuites/sptests/sp11/timer.c96
-rw-r--r--testsuites/sptests/sp12/Makefile.am38
-rw-r--r--testsuites/sptests/sp12/init.c178
-rw-r--r--testsuites/sptests/sp12/pridrv.c130
-rw-r--r--testsuites/sptests/sp12/pritask.c90
-rw-r--r--testsuites/sptests/sp12/sp12.doc26
-rw-r--r--testsuites/sptests/sp12/sp12.scn78
-rw-r--r--testsuites/sptests/sp12/system.h83
-rw-r--r--testsuites/sptests/sp12/task1.c152
-rw-r--r--testsuites/sptests/sp12/task2.c64
-rw-r--r--testsuites/sptests/sp12/task3.c49
-rw-r--r--testsuites/sptests/sp12/task4.c36
-rw-r--r--testsuites/sptests/sp12/task5.c54
-rw-r--r--testsuites/sptests/sp13/Makefile.am38
-rw-r--r--testsuites/sptests/sp13/fillbuff.c30
-rw-r--r--testsuites/sptests/sp13/init.c111
-rw-r--r--testsuites/sptests/sp13/putbuff.c28
-rw-r--r--testsuites/sptests/sp13/sp13.doc24
-rw-r--r--testsuites/sptests/sp13/sp13.scn78
-rw-r--r--testsuites/sptests/sp13/system.h69
-rw-r--r--testsuites/sptests/sp13/task1.c361
-rw-r--r--testsuites/sptests/sp13/task2.c138
-rw-r--r--testsuites/sptests/sp13/task3.c77
-rw-r--r--testsuites/sptests/sp14/Makefile.am38
-rw-r--r--testsuites/sptests/sp14/asr.c46
-rw-r--r--testsuites/sptests/sp14/init.c71
-rw-r--r--testsuites/sptests/sp14/sp14.doc23
-rw-r--r--testsuites/sptests/sp14/sp14.scn33
-rw-r--r--testsuites/sptests/sp14/system.h79
-rw-r--r--testsuites/sptests/sp14/task1.c115
-rw-r--r--testsuites/sptests/sp14/task2.c47
-rw-r--r--testsuites/sptests/sp15/Makefile.am38
-rw-r--r--testsuites/sptests/sp15/init.c77
-rw-r--r--testsuites/sptests/sp15/sp15.doc23
-rw-r--r--testsuites/sptests/sp15/sp15.scn16
-rw-r--r--testsuites/sptests/sp15/system.h61
-rw-r--r--testsuites/sptests/sp15/task1.c128
-rw-r--r--testsuites/sptests/sp16/Makefile.am38
-rw-r--r--testsuites/sptests/sp16/init.c127
-rw-r--r--testsuites/sptests/sp16/sp16.doc23
-rw-r--r--testsuites/sptests/sp16/sp16.scn58
-rw-r--r--testsuites/sptests/sp16/system.h90
-rw-r--r--testsuites/sptests/sp16/task1.c281
-rw-r--r--testsuites/sptests/sp16/task2.c85
-rw-r--r--testsuites/sptests/sp16/task3.c56
-rw-r--r--testsuites/sptests/sp16/task4.c59
-rw-r--r--testsuites/sptests/sp16/task5.c72
-rw-r--r--testsuites/sptests/sp17/Makefile.am38
-rw-r--r--testsuites/sptests/sp17/asr.c31
-rw-r--r--testsuites/sptests/sp17/init.c68
-rw-r--r--testsuites/sptests/sp17/sp17.doc34
-rw-r--r--testsuites/sptests/sp17/sp17.scn8
-rw-r--r--testsuites/sptests/sp17/system.h57
-rw-r--r--testsuites/sptests/sp17/task1.c47
-rw-r--r--testsuites/sptests/sp17/task2.c44
-rw-r--r--testsuites/sptests/sp19/Makefile.am38
-rw-r--r--testsuites/sptests/sp19/first.c65
-rw-r--r--testsuites/sptests/sp19/fptask.c97
-rw-r--r--testsuites/sptests/sp19/fptest.h171
-rw-r--r--testsuites/sptests/sp19/init.c149
-rw-r--r--testsuites/sptests/sp19/inttest.h148
-rw-r--r--testsuites/sptests/sp19/sp19.doc22
-rw-r--r--testsuites/sptests/sp19/sp19.scn50
-rw-r--r--testsuites/sptests/sp19/system.h58
-rw-r--r--testsuites/sptests/sp19/task1.c58
-rw-r--r--testsuites/sptests/sp20/Makefile.am38
-rw-r--r--testsuites/sptests/sp20/getall.c42
-rw-r--r--testsuites/sptests/sp20/init.c67
-rw-r--r--testsuites/sptests/sp20/sp20.doc23
-rw-r--r--testsuites/sptests/sp20/sp20.scn27
-rw-r--r--testsuites/sptests/sp20/system.h62
-rw-r--r--testsuites/sptests/sp20/task1.c115
-rw-r--r--testsuites/sptests/sp21/Makefile.am40
-rw-r--r--testsuites/sptests/sp21/init.c52
-rw-r--r--testsuites/sptests/sp21/sp21.doc27
-rw-r--r--testsuites/sptests/sp21/sp21.scn19
-rw-r--r--testsuites/sptests/sp21/system.h45
-rw-r--r--testsuites/sptests/sp21/task1.c104
-rw-r--r--testsuites/sptests/sp22/Makefile.am38
-rw-r--r--testsuites/sptests/sp22/delay.c31
-rw-r--r--testsuites/sptests/sp22/init.c65
-rw-r--r--testsuites/sptests/sp22/prtime.c31
-rw-r--r--testsuites/sptests/sp22/sp22.doc19
-rw-r--r--testsuites/sptests/sp22/sp22.scn29
-rw-r--r--testsuites/sptests/sp22/system.h59
-rw-r--r--testsuites/sptests/sp22/task1.c163
-rw-r--r--testsuites/sptests/sp23/Makefile.am38
-rw-r--r--testsuites/sptests/sp23/init.c68
-rw-r--r--testsuites/sptests/sp23/sp23.doc25
-rw-r--r--testsuites/sptests/sp23/sp23.scn9
-rw-r--r--testsuites/sptests/sp23/system.h58
-rw-r--r--testsuites/sptests/sp23/task1.c95
-rw-r--r--testsuites/sptests/sp24/Makefile.am38
-rw-r--r--testsuites/sptests/sp24/init.c75
-rw-r--r--testsuites/sptests/sp24/resume.c33
-rw-r--r--testsuites/sptests/sp24/sp24.doc50
-rw-r--r--testsuites/sptests/sp24/sp24.scn16
-rw-r--r--testsuites/sptests/sp24/system.h56
-rw-r--r--testsuites/sptests/sp24/task1.c57
-rw-r--r--testsuites/sptests/sp25/Makefile.am38
-rw-r--r--testsuites/sptests/sp25/init.c65
-rw-r--r--testsuites/sptests/sp25/sp25.doc31
-rw-r--r--testsuites/sptests/sp25/sp25.scn29
-rw-r--r--testsuites/sptests/sp25/system.h56
-rw-r--r--testsuites/sptests/sp25/task1.c240
-rw-r--r--testsuites/sptests/sp26/Makefile.am38
-rw-r--r--testsuites/sptests/sp26/init.c38
-rw-r--r--testsuites/sptests/sp26/sp26.doc23
-rw-r--r--testsuites/sptests/sp26/sp26.scn8
-rw-r--r--testsuites/sptests/sp26/system.h54
-rw-r--r--testsuites/sptests/sp26/task1.c118
-rw-r--r--testsuites/sptests/sp27/Makefile.am35
-rw-r--r--testsuites/sptests/sp27/init.c103
-rw-r--r--testsuites/sptests/sp27/sp27.doc0
-rw-r--r--testsuites/sptests/sp27/sp27.scn2
-rw-r--r--testsuites/sptests/sp28/Makefile.am35
-rw-r--r--testsuites/sptests/sp28/init.c99
-rw-r--r--testsuites/sptests/sp28/sp28.doc0
-rw-r--r--testsuites/sptests/sp28/sp28.scn3
-rw-r--r--testsuites/sptests/sp29/Makefile.am35
-rw-r--r--testsuites/sptests/sp29/init.c180
-rw-r--r--testsuites/sptests/sp29/sp29.doc0
-rw-r--r--testsuites/sptests/sp29/sp29.scn4
-rw-r--r--testsuites/sptests/spfatal/Makefile.am38
-rw-r--r--testsuites/sptests/spfatal/README8
-rw-r--r--testsuites/sptests/spfatal/fatal.c136
-rw-r--r--testsuites/sptests/spfatal/init.c50
-rw-r--r--testsuites/sptests/spfatal/puterr.c67
-rw-r--r--testsuites/sptests/spfatal/spfatal.doc27
-rw-r--r--testsuites/sptests/spfatal/spfatal.scn8
-rw-r--r--testsuites/sptests/spfatal/system.h76
-rw-r--r--testsuites/sptests/spfatal/task1.c28
-rw-r--r--testsuites/sptests/spsize/Makefile.am36
-rw-r--r--testsuites/sptests/spsize/getint.c31
-rw-r--r--testsuites/sptests/spsize/init.c63
-rw-r--r--testsuites/sptests/spsize/size.c693
-rw-r--r--testsuites/sptests/spsize/size.scn1
-rw-r--r--testsuites/sptests/spsize/system.h46
-rw-r--r--testsuites/sptests/sptests.am23
-rw-r--r--testsuites/support/Makefile.am11
-rw-r--r--testsuites/support/include/tmacros.h226
-rw-r--r--testsuites/tmitrontests/Makefile.am15
-rw-r--r--testsuites/tmitrontests/README6
-rw-r--r--testsuites/tmitrontests/include/Makefile.am9
-rw-r--r--testsuites/tmitrontests/include/timesys.h55
-rw-r--r--testsuites/tmitrontests/tmitronsem01/Makefile.am44
-rw-r--r--testsuites/tmitrontests/tmitronsem01/init.c144
-rw-r--r--testsuites/tmitrontests/tmitronsem01/system.h38
-rw-r--r--testsuites/tmitrontests/tmitronsem01/tmitronsem01.doc9
-rw-r--r--testsuites/tmitrontests/tmitrontests.am11
-rw-r--r--testsuites/tmtests/Makefile.am15
-rw-r--r--testsuites/tmtests/README21
-rw-r--r--testsuites/tmtests/include/Makefile.am9
-rw-r--r--testsuites/tmtests/include/timesys.h66
-rw-r--r--testsuites/tmtests/tm01/Makefile.am44
-rw-r--r--testsuites/tmtests/tm01/system.h42
-rw-r--r--testsuites/tmtests/tm01/task1.c188
-rw-r--r--testsuites/tmtests/tm01/tm01.doc12
-rw-r--r--testsuites/tmtests/tm02/Makefile.am44
-rw-r--r--testsuites/tmtests/tm02/system.h43
-rw-r--r--testsuites/tmtests/tm02/task1.c157
-rw-r--r--testsuites/tmtests/tm02/tm02.doc12
-rw-r--r--testsuites/tmtests/tm03/Makefile.am44
-rw-r--r--testsuites/tmtests/tm03/system.h43
-rw-r--r--testsuites/tmtests/tm03/task1.c150
-rw-r--r--testsuites/tmtests/tm03/tm03.doc12
-rw-r--r--testsuites/tmtests/tm04/Makefile.am44
-rw-r--r--testsuites/tmtests/tm04/system.h42
-rw-r--r--testsuites/tmtests/tm04/task1.c387
-rw-r--r--testsuites/tmtests/tm04/tm04.doc12
-rw-r--r--testsuites/tmtests/tm05/Makefile.am44
-rw-r--r--testsuites/tmtests/tm05/system.h43
-rw-r--r--testsuites/tmtests/tm05/task1.c131
-rw-r--r--testsuites/tmtests/tm05/tm05.doc12
-rw-r--r--testsuites/tmtests/tm06/Makefile.am44
-rw-r--r--testsuites/tmtests/tm06/system.h43
-rw-r--r--testsuites/tmtests/tm06/task1.c161
-rw-r--r--testsuites/tmtests/tm06/tm06.doc12
-rw-r--r--testsuites/tmtests/tm07/Makefile.am44
-rw-r--r--testsuites/tmtests/tm07/system.h43
-rw-r--r--testsuites/tmtests/tm07/task1.c119
-rw-r--r--testsuites/tmtests/tm07/tm07.doc12
-rw-r--r--testsuites/tmtests/tm08/Makefile.am44
-rw-r--r--testsuites/tmtests/tm08/system.h43
-rw-r--r--testsuites/tmtests/tm08/task1.c254
-rw-r--r--testsuites/tmtests/tm08/tm08.doc12
-rw-r--r--testsuites/tmtests/tm09/Makefile.am44
-rw-r--r--testsuites/tmtests/tm09/system.h43
-rw-r--r--testsuites/tmtests/tm09/task1.c225
-rw-r--r--testsuites/tmtests/tm09/tm09.doc12
-rw-r--r--testsuites/tmtests/tm10/Makefile.am44
-rw-r--r--testsuites/tmtests/tm10/system.h42
-rw-r--r--testsuites/tmtests/tm10/task1.c164
-rw-r--r--testsuites/tmtests/tm10/tm10.doc12
-rw-r--r--testsuites/tmtests/tm11/Makefile.am44
-rw-r--r--testsuites/tmtests/tm11/system.h42
-rw-r--r--testsuites/tmtests/tm11/task1.c154
-rw-r--r--testsuites/tmtests/tm11/tm11.doc12
-rw-r--r--testsuites/tmtests/tm12/Makefile.am44
-rw-r--r--testsuites/tmtests/tm12/system.h42
-rw-r--r--testsuites/tmtests/tm12/task1.c145
-rw-r--r--testsuites/tmtests/tm12/tm12.doc12
-rw-r--r--testsuites/tmtests/tm13/Makefile.am44
-rw-r--r--testsuites/tmtests/tm13/system.h42
-rw-r--r--testsuites/tmtests/tm13/task1.c153
-rw-r--r--testsuites/tmtests/tm13/tm13.doc12
-rw-r--r--testsuites/tmtests/tm14/Makefile.am44
-rw-r--r--testsuites/tmtests/tm14/system.h42
-rw-r--r--testsuites/tmtests/tm14/task1.c145
-rw-r--r--testsuites/tmtests/tm14/tm14.doc12
-rw-r--r--testsuites/tmtests/tm15/Makefile.am44
-rw-r--r--testsuites/tmtests/tm15/system.h42
-rw-r--r--testsuites/tmtests/tm15/task1.c221
-rw-r--r--testsuites/tmtests/tm15/tm15.doc12
-rw-r--r--testsuites/tmtests/tm16/Makefile.am44
-rw-r--r--testsuites/tmtests/tm16/system.h42
-rw-r--r--testsuites/tmtests/tm16/task1.c147
-rw-r--r--testsuites/tmtests/tm16/tm16.doc12
-rw-r--r--testsuites/tmtests/tm17/Makefile.am44
-rw-r--r--testsuites/tmtests/tm17/system.h42
-rw-r--r--testsuites/tmtests/tm17/task1.c126
-rw-r--r--testsuites/tmtests/tm17/tm17.doc12
-rw-r--r--testsuites/tmtests/tm18/Makefile.am44
-rw-r--r--testsuites/tmtests/tm18/system.h42
-rw-r--r--testsuites/tmtests/tm18/task1.c111
-rw-r--r--testsuites/tmtests/tm18/tm18.doc12
-rw-r--r--testsuites/tmtests/tm19/Makefile.am44
-rw-r--r--testsuites/tmtests/tm19/system.h42
-rw-r--r--testsuites/tmtests/tm19/task1.c207
-rw-r--r--testsuites/tmtests/tm19/tm19.doc12
-rw-r--r--testsuites/tmtests/tm20/Makefile.am44
-rw-r--r--testsuites/tmtests/tm20/system.h43
-rw-r--r--testsuites/tmtests/tm20/task1.c473
-rw-r--r--testsuites/tmtests/tm20/tm20.doc12
-rw-r--r--testsuites/tmtests/tm21/Makefile.am44
-rw-r--r--testsuites/tmtests/tm21/system.h49
-rw-r--r--testsuites/tmtests/tm21/task1.c235
-rw-r--r--testsuites/tmtests/tm21/tm21.doc12
-rw-r--r--testsuites/tmtests/tm22/Makefile.am44
-rw-r--r--testsuites/tmtests/tm22/system.h42
-rw-r--r--testsuites/tmtests/tm22/task1.c199
-rw-r--r--testsuites/tmtests/tm22/tm22.doc12
-rw-r--r--testsuites/tmtests/tm23/Makefile.am44
-rw-r--r--testsuites/tmtests/tm23/system.h42
-rw-r--r--testsuites/tmtests/tm23/task1.c301
-rw-r--r--testsuites/tmtests/tm23/tm23.doc12
-rw-r--r--testsuites/tmtests/tm24/Makefile.am44
-rw-r--r--testsuites/tmtests/tm24/system.h41
-rw-r--r--testsuites/tmtests/tm24/task1.c123
-rw-r--r--testsuites/tmtests/tm24/tm24.doc12
-rw-r--r--testsuites/tmtests/tm25/Makefile.am44
-rw-r--r--testsuites/tmtests/tm25/system.h42
-rw-r--r--testsuites/tmtests/tm25/task1.c108
-rw-r--r--testsuites/tmtests/tm25/tm25.doc12
-rw-r--r--testsuites/tmtests/tm26/Makefile.am44
-rw-r--r--testsuites/tmtests/tm26/fptest.h164
-rw-r--r--testsuites/tmtests/tm26/system.h42
-rw-r--r--testsuites/tmtests/tm26/task1.c579
-rw-r--r--testsuites/tmtests/tm26/tm26.doc12
-rw-r--r--testsuites/tmtests/tm27/Makefile.am44
-rw-r--r--testsuites/tmtests/tm27/system.h41
-rw-r--r--testsuites/tmtests/tm27/task1.c272
-rw-r--r--testsuites/tmtests/tm27/tm27.doc12
-rw-r--r--testsuites/tmtests/tm28/Makefile.am44
-rw-r--r--testsuites/tmtests/tm28/system.h42
-rw-r--r--testsuites/tmtests/tm28/task1.c133
-rw-r--r--testsuites/tmtests/tm28/tm28.doc12
-rw-r--r--testsuites/tmtests/tm29/Makefile.am44
-rw-r--r--testsuites/tmtests/tm29/system.h43
-rw-r--r--testsuites/tmtests/tm29/task1.c206
-rw-r--r--testsuites/tmtests/tm29/tm29.doc12
-rw-r--r--testsuites/tmtests/tmck/Makefile.am44
-rw-r--r--testsuites/tmtests/tmck/system.h41
-rw-r--r--testsuites/tmtests/tmck/task1.c179
-rw-r--r--testsuites/tmtests/tmck/tmck.doc19
-rw-r--r--testsuites/tmtests/tmoverhd/Makefile.am44
-rw-r--r--testsuites/tmtests/tmoverhd/dumrtems.h254
-rw-r--r--testsuites/tmtests/tmoverhd/empty.c40
-rw-r--r--testsuites/tmtests/tmoverhd/system.h59
-rw-r--r--testsuites/tmtests/tmoverhd/testtask.c1278
-rw-r--r--testsuites/tmtests/tmoverhd/tmoverhd.doc12
-rw-r--r--testsuites/tmtests/tmtests.am11
-rw-r--r--testsuites/tools/Makefile.am11
-rw-r--r--testsuites/tools/generic/Makefile.am28
-rw-r--r--testsuites/tools/generic/difftest.in117
-rw-r--r--testsuites/tools/generic/sorttimes.in194
3785 files changed, 0 insertions, 578944 deletions
diff --git a/c/src/ada-tests/mptests/mp01/config.h b/c/src/ada-tests/mptests/mp01/config.h
deleted file mode 100644
index 513e94359d..0000000000
--- a/c/src/ada-tests/mptests/mp01/config.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_MPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/mptests/mp01/mp01.adb b/c/src/ada-tests/mptests/mp01/mp01.adb
deleted file mode 100644
index 0b1e0a0eba..0000000000
--- a/c/src/ada-tests/mptests/mp01/mp01.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test MP01 of the Multiprocessor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with MPTEST;
-with TEST_SUPPORT;
-
-procedure MP01 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.GLOBAL,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- MPTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end MP01;
-
diff --git a/c/src/ada-tests/mptests/mp01/mptest.adb b/c/src/ada-tests/mptests/mp01/mptest.adb
deleted file mode 100644
index 3f3fbe6c30..0000000000
--- a/c/src/ada-tests/mptests/mp01/mptest.adb
+++ /dev/null
@@ -1,235 +0,0 @@
---
--- MPTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation for Test 1 of the RTEMS
--- Multiprocessor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with TEST_SUPPORT;
-with TEXT_IO;
-with UNSIGNED32_IO;
-
-package body MPTEST is
-
- package body PER_NODE_CONFIGURATION is separate;
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- C : RTEMS.CHARACTER;
- TIME : RTEMS.TIME_OF_DAY;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT( "*** TEST 1 -- NODE " );
- UNSIGNED32_IO.PUT(
- MPTEST.MULTIPROCESSING_CONFIGURATION.NODE,
- WIDTH => 1
- );
- TEXT_IO.PUT_LINE( " ***" );
-
- if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE /= 1 then
- C := 'S';
- else
- C := 'M';
- end if;
-
- MPTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME( C, 'A', '1', ' ' );
- MPTEST.TASK_NAME( 2 ) := RTEMS.BUILD_NAME( C, 'A', '2', ' ' );
- MPTEST.TASK_NAME( 3 ) := RTEMS.BUILD_NAME( C, 'A', '3', ' ' );
-
- TIME := ( 1988, 12, 31, 9, 0, 0, 0 );
-
- RTEMS.CLOCK_SET( TIME, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_SET" );
-
- TEXT_IO.PUT_LINE( "Creating task 1 (Global)" );
-
- RTEMS.TASK_CREATE(
- MPTEST.TASK_NAME( 1 ),
- 1,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.GLOBAL,
- MPTEST.TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA1" );
-
- TEXT_IO.PUT_LINE( "Creating task 2 (Global)" );
-
- RTEMS.TASK_CREATE(
- MPTEST.TASK_NAME( 2 ),
- 1,
- 2048,
- RTEMS.TIMESLICE,
- RTEMS.GLOBAL,
- MPTEST.TASK_ID( 2 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA2" );
-
- TEXT_IO.PUT_LINE( "Creating task 3 (Local)" );
-
- RTEMS.TASK_CREATE(
- MPTEST.TASK_NAME( 3 ),
- 1,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- MPTEST.TASK_ID( 3 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA3" );
-
- RTEMS.TASK_START(
- MPTEST.TASK_ID( 1 ),
- MPTEST.TEST_TASK'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA1" );
-
- RTEMS.TASK_START(
- MPTEST.TASK_ID( 2 ),
- MPTEST.TEST_TASK'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA2" );
-
- RTEMS.TASK_START(
- MPTEST.TASK_ID( 3 ),
- MPTEST.TEST_TASK'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA3" );
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- TEST_TASK
---
-
- procedure TEST_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- TIME : RTEMS.TIME_OF_DAY;
- TID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.TASK_IDENT( RTEMS.SELF, RTEMS.SEARCH_ALL_NODES, TID, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_IDENT OF SELF" );
-
- RTEMS.CLOCK_GET( RTEMS.CLOCK_GET_TOD, TIME'ADDRESS, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_GET" );
-
- TEST_SUPPORT.PUT_NAME(
- MPTEST.TASK_NAME( TEST_SUPPORT.TASK_NUMBER( TID ) ),
- FALSE
- );
-
- TEST_SUPPORT.PRINT_TIME( "- clock_get - ", TIME, "" );
- TEXT_IO.NEW_LINE;
-
- RTEMS.TASK_WAKE_AFTER(
- TEST_SUPPORT.TASK_NUMBER( TID ) * 5 *
- TEST_SUPPORT.TICKS_PER_SECOND,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- RTEMS.CLOCK_GET( RTEMS.CLOCK_GET_TOD, TIME'ADDRESS, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_GET" );
-
- TEST_SUPPORT.PUT_NAME(
- MPTEST.TASK_NAME( TEST_SUPPORT.TASK_NUMBER( TID ) ),
- FALSE
- );
-
- TEST_SUPPORT.PRINT_TIME( "- clock_get - ", TIME, "" );
- TEXT_IO.NEW_LINE;
-
- if TEST_SUPPORT.TASK_NUMBER( TID ) = 1 then -- TASK 1
-
- TEST_SUPPORT.PUT_NAME(
- MPTEST.TASK_NAME( TEST_SUPPORT.TASK_NUMBER( TID ) ),
- FALSE
- );
-
- TEXT_IO.PUT_LINE( " - deleting self" );
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- else if TEST_SUPPORT.TASK_NUMBER( TID ) = 2 then -- TASK 2
-
- TEST_SUPPORT.PUT_NAME( MPTEST.TASK_NAME( 2 ), FALSE );
- TEXT_IO.PUT( " - waiting to be deleted by " );
- TEST_SUPPORT.PUT_NAME( MPTEST.TASK_NAME( 3 ), TRUE );
-
- loop
- TEST_SUPPORT.DO_NOTHING; -- can't be optimized away
- end loop;
-
- else -- TASK 3
-
- TEST_SUPPORT.PUT_NAME( MPTEST.TASK_NAME( 3 ), FALSE );
- TEXT_IO.PUT( " - getting TID of " );
- TEST_SUPPORT.PUT_NAME( MPTEST.TASK_NAME( 2 ), TRUE );
-
- RTEMS.TASK_IDENT(
- MPTEST.TASK_NAME( 2 ),
- RTEMS.SEARCH_ALL_NODES,
- TID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_IDENT OF TA2" );
-
- TEST_SUPPORT.PUT_NAME( MPTEST.TASK_NAME( 3 ), FALSE );
- TEXT_IO.PUT( " - deleting " );
- TEST_SUPPORT.PUT_NAME( MPTEST.TASK_NAME( 2 ), TRUE );
-
- RTEMS.TASK_DELETE( TID, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF TA2" );
-
- end if;
- end if;
-
- TEXT_IO.PUT_LINE( "*** END OF TEST 1 ***" );
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end TEST_TASK;
-
-end MPTEST;
diff --git a/c/src/ada-tests/mptests/mp01/mptest.ads b/c/src/ada-tests/mptests/mp01/mptest.ads
deleted file mode 100644
index 42bf917bb1..0000000000
--- a/c/src/ada-tests/mptests/mp01/mptest.ads
+++ /dev/null
@@ -1,164 +0,0 @@
---
--- MPTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 1 of the RTEMS
--- Multiprocessor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with BSP_MPCI;
-with RTEMS;
-
-package MPTEST is
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
- TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TEST_TASK
---
--- DESCRIPTION:
---
--- This is the body of the RTEMS tasks which constitute this test.
---
-
- procedure TEST_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- This is the Driver Address Table for this test.
---
-
- DEVICE_DRIVERS : aliased RTEMS.DRIVER_ADDRESS_TABLE( 1 .. 1 ) :=
- (1=>
- (
- CLOCK_DRIVER.INITIALIZE'ACCESS, -- Initialization
- RTEMS.NO_DRIVER_ENTRY, -- Open
- RTEMS.NO_DRIVER_ENTRY, -- Close
- RTEMS.NO_DRIVER_ENTRY, -- Read
- RTEMS.NO_DRIVER_ENTRY, -- Write
- RTEMS.NO_DRIVER_ENTRY -- Control
- )
- );
-
---
--- This is the Initialization Tasks Table for this test.
---
-
- INITIALIZATION_TASKS : aliased RTEMS.INITIALIZATION_TASKS_TABLE( 1 .. 1 ) :=
- (1=>
- (
- RTEMS.BUILD_NAME( 'U', 'I', '1', ' ' ), -- task name
- 2048, -- stack size
- 1, -- priority
- RTEMS.GLOBAL, -- attributes
- MPTEST.INIT'ACCESS, -- entry point
- RTEMS.NO_PREEMPT, -- initial mode
- 0 -- argument list
- )
- );
-
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
--- BEGIN SUBPACKAGE --
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-
- --
- -- MPTEST.PER_NODE_CONFIGURATION / SPECIFICATION
- --
- -- DESCRIPTION:
- --
- -- This package is the specification for the subpackage
- -- which will define the per node configuration parameters.
- --
-
- package PER_NODE_CONFIGURATION is
-
- --
- -- LOCAL_NODE_NUMBER
- --
- -- DESCRIPTION:
- --
- -- This function returns the node number for this node.
- --
-
- function LOCAL_NODE_NUMBER
- return RTEMS.UNSIGNED32;
-
- pragma INLINE ( LOCAL_NODE_NUMBER );
-
- end PER_NODE_CONFIGURATION;
-
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
--- END SUBPACKAGE --
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-
---
--- This is the Multiprocessor Configuration Table for this test.
---
-
- MULTIPROCESSING_CONFIGURATION : aliased RTEMS.MULTIPROCESSING_TABLE := (
- MPTEST.PER_NODE_CONFIGURATION.LOCAL_NODE_NUMBER,
- 2, -- maximum # nodes in system
- 33, -- maximum # global objects
- 33 -- maximum # proxies
- );
-
---
--- This is the Configuration Table for this test.
---
-
- CONFIGURATION : aliased RTEMS.CONFIGURATION_TABLE := (
- RTEMS.NULL_ADDRESS, -- will be replaced by BSP
- 64 * 1024, -- executive RAM size
- 10, -- maximum # tasks
- 0, -- maximum # timers
- 0, -- maximum # semaphores
- 0, -- maximum # message queues
- 0, -- maximum # messages
- 0, -- maximum # partitions
- 0, -- maximum # regions
- 0, -- maximum # dp memory areas
- 0, -- maximum # periods
- 0, -- maximum # user extensions
- RTEMS.MILLISECONDS_TO_MICROSECONDS(10), -- # us in a tick
- 50 -- # ticks in a timeslice
- );
-
-end MPTEST;
diff --git a/c/src/ada-tests/mptests/mp01/node1/mp01.scn b/c/src/ada-tests/mptests/mp01/node1/mp01.scn
deleted file mode 100644
index d7495bfa0d..0000000000
--- a/c/src/ada-tests/mptests/mp01/node1/mp01.scn
+++ /dev/null
@@ -1,15 +0,0 @@
-*** TEST 1 -- NODE 1 ***
-Creating task 1 (Global)
-Creating task 2 (Global)
-Creating task 3 (Local)
-MA1 - clock_get - 9: 0: 0 12/31/1988
-MA2 - clock_get - 9: 0: 0 12/31/1988
-MA3 - clock_get - 9: 0: 0 12/31/1988
-MA1 - clock_get - 9: 0: 5 12/31/1988
-MA1 - deleting self
-MA2 - clock_get - 9: 0:10 12/31/1988
-MA2 - waiting to be deleted by MA3
-MA3 - clock_get - 9: 0:15 12/31/1988
-MA3 - getting TID of MA2
-MA3 - deleting MA2
-*** END OF TEST 1 ***
diff --git a/c/src/ada-tests/mptests/mp01/node1/mptest-per_node_configuration.adb b/c/src/ada-tests/mptests/mp01/node1/mptest-per_node_configuration.adb
deleted file mode 100644
index 7df5087537..0000000000
--- a/c/src/ada-tests/mptests/mp01/node1/mptest-per_node_configuration.adb
+++ /dev/null
@@ -1,43 +0,0 @@
---
--- MPTEST.PER_NODE_CONFIGURATION / BODY
---
--- DESCRIPTION:
---
--- This package is the specification for the subpackage
--- which will define the per node configuration parameters.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-separate ( MPTEST )
-
-package body PER_NODE_CONFIGURATION is
-
---PAGE
---
--- LOCAL_NODE_NUMBER
---
-
- function LOCAL_NODE_NUMBER
- return RTEMS.UNSIGNED32 is
- begin
-
- return 1;
-
- end LOCAL_NODE_NUMBER;
-
-end PER_NODE_CONFIGURATION;
diff --git a/c/src/ada-tests/mptests/mp01/node2/mp01.scn b/c/src/ada-tests/mptests/mp01/node2/mp01.scn
deleted file mode 100644
index 98047240f3..0000000000
--- a/c/src/ada-tests/mptests/mp01/node2/mp01.scn
+++ /dev/null
@@ -1,15 +0,0 @@
-*** TEST 1 -- NODE 2 ***
-Creating task 1 (Global)
-Creating task 2 (Global)
-Creating task 3 (Local)
-SA1 - clock_get - 9: 0: 0 12/31/1988
-SA2 - clock_get - 9: 0: 0 12/31/1988
-SA3 - clock_get - 9: 0: 0 12/31/1988
-SA1 - clock_get - 9: 0: 5 12/31/1988
-SA1 - deleting self
-SA2 - clock_get - 9: 0:10 12/31/1988
-SA2 - waiting to be deleted by SA3
-SA3 - clock_get - 9: 0:15 12/31/1988
-SA3 - getting TID of SA2
-SA3 - deleting SA2
-*** END OF TEST 1 ***
diff --git a/c/src/ada-tests/mptests/mp01/node2/mptest-per_node_configuration.adb b/c/src/ada-tests/mptests/mp01/node2/mptest-per_node_configuration.adb
deleted file mode 100644
index e127cc5573..0000000000
--- a/c/src/ada-tests/mptests/mp01/node2/mptest-per_node_configuration.adb
+++ /dev/null
@@ -1,43 +0,0 @@
---
--- MPTEST.PER_NODE_CONFIGURATION / BODY
---
--- DESCRIPTION:
---
--- This package is the specification for the subpackage
--- which will define the per node configuration parameters.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-separate ( MPTEST )
-
-package body PER_NODE_CONFIGURATION is
-
---PAGE
---
--- LOCAL_NODE_NUMBER
---
-
- function LOCAL_NODE_NUMBER
- return RTEMS.UNSIGNED32 is
- begin
-
- return 2;
-
- end LOCAL_NODE_NUMBER;
-
-end PER_NODE_CONFIGURATION;
diff --git a/c/src/ada-tests/mptests/mp02/mptest.adb b/c/src/ada-tests/mptests/mp02/mptest.adb
deleted file mode 100644
index 44b6d564ad..0000000000
--- a/c/src/ada-tests/mptests/mp02/mptest.adb
+++ /dev/null
@@ -1,213 +0,0 @@
---
--- MPTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation for Test 2 of the RTEMS
--- Multiprocessor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with TEST_SUPPORT;
-with TEXT_IO;
-with UNSIGNED32_IO;
-
-package body MPTEST is
-
- package body PER_NODE_CONFIGURATION is separate;
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT( "*** TEST 2 -- NODE " );
- UNSIGNED32_IO.PUT(
- MPTEST.MULTIPROCESSING_CONFIGURATION.NODE,
- WIDTH => 1
- );
- TEXT_IO.PUT_LINE( " ***" );
-
- MPTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME( '1', '1', '1', ' ' );
- MPTEST.TASK_NAME( 2 ) := RTEMS.BUILD_NAME( '2', '2', '2', ' ' );
-
- TEXT_IO.PUT_LINE( "Creating test task (Global)" );
-
- RTEMS.TASK_CREATE(
- MPTEST.TASK_NAME( MPTEST.MULTIPROCESSING_CONFIGURATION.NODE ),
- 1,
- 2048,
- RTEMS.NO_PREEMPT,
- RTEMS.GLOBAL,
- MPTEST.TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE" );
-
- RTEMS.TASK_START(
- MPTEST.TASK_ID( 1 ),
- MPTEST.TEST_TASK'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START" );
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- TEST_TASK
---
-
- procedure TEST_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- TID : RTEMS.ID;
- TEST_TID : RTEMS.ID;
- REMOTE_TID : RTEMS.ID;
- REMOTE_NODE : RTEMS.UNSIGNED32;
- NOTE : RTEMS.UNSIGNED32;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.TASK_IDENT( RTEMS.SELF, RTEMS.SEARCH_ALL_NODES, TID, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_IDENT OF SELF" );
-
- if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then
- REMOTE_NODE := 2;
- else
- REMOTE_NODE := 1;
- end if;
-
- TEXT_IO.PUT_LINE( "Getting TID of remote task (all nodes)" );
-
- loop
-
- RTEMS.TASK_IDENT(
- MPTEST.TASK_NAME( REMOTE_NODE ),
- RTEMS.SEARCH_ALL_NODES,
- REMOTE_TID,
- STATUS
- );
-
- exit when RTEMS.IS_STATUS_SUCCESSFUL( STATUS );
-
- end loop;
-
- --
- -- We just got this ID above so looping is not necessary.
- --
-
- TEXT_IO.PUT_LINE( "Getting TID of remote task (1 node)" );
- RTEMS.TASK_IDENT(
- MPTEST.TASK_NAME( REMOTE_NODE ),
- REMOTE_NODE,
- TEST_TID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_IDENT" );
-
- if TEST_TID /= REMOTE_TID then
- TEXT_IO.PUT_LINE( "task_ident tid's do not match!!" );
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
- end if;
-
- RTEMS.TASK_DELETE( REMOTE_TID, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.ILLEGAL_ON_REMOTE_OBJECT,
- "task_delete of remote task"
- );
- TEXT_IO.PUT_LINE(
- "task_delete of remote task returned the correct error"
- );
-
- RTEMS.TASK_START( REMOTE_TID, MPTEST.TEST_TASK'ACCESS, 0, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.ILLEGAL_ON_REMOTE_OBJECT,
- "task_start of remote task"
- );
- TEXT_IO.PUT_LINE(
- "task_start of remote task returned the correct error"
- );
-
- RTEMS.TASK_RESTART( REMOTE_TID, 0, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.ILLEGAL_ON_REMOTE_OBJECT,
- "task_restart of remote task"
- );
- TEXT_IO.PUT_LINE(
- "task_restart of remote task returned the correct error"
- );
-
-
- TEXT_IO.PUT( "Setting notepad " );
- UNSIGNED32_IO.PUT( RTEMS.GET_NODE( TID ), WIDTH=>1 );
- TEXT_IO.PUT( " of the remote task to " );
- UNSIGNED32_IO.PUT( RTEMS.GET_NODE( TID ), WIDTH=>1 );
- TEXT_IO.NEW_LINE;
- RTEMS.TASK_SET_NOTE(
- REMOTE_TID,
- RTEMS.GET_NODE( TID ),
- RTEMS.GET_NODE( TID ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SET_NOTE" );
-
- TEXT_IO.PUT_LINE( "Getting a notepad of the remote task" );
- RTEMS.TASK_GET_NOTE(
- REMOTE_TID,
- RTEMS.GET_NODE( TID ),
- NOTE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_GET_NOTE" );
-
- if NOTE = RTEMS.GET_NODE( TID ) then
- TEXT_IO.PUT_LINE( "Remote notepad set and read correctly" );
- else
- TEXT_IO.PUT(
- "FAILURE!!! Remote notepad was not set and read correctly ("
- );
- UNSIGNED32_IO.PUT( NOTE );
- TEXT_IO.PUT( ", " );
- UNSIGNED32_IO.PUT( RTEMS.GET_NODE( TID ) );
- TEXT_IO.PUT_LINE( ")" );
-
- end if;
-
- RTEMS.TASK_DELETE( REMOTE_TID, STATUS );
- TEXT_IO.PUT_LINE( "*** END OF TEST 2 ***" );
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end TEST_TASK;
-
-end MPTEST;
diff --git a/c/src/ada-tests/mptests/mp02/mptest.ads b/c/src/ada-tests/mptests/mp02/mptest.ads
deleted file mode 100644
index 82e7aacbb3..0000000000
--- a/c/src/ada-tests/mptests/mp02/mptest.ads
+++ /dev/null
@@ -1,164 +0,0 @@
---
--- MPTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 2 of the RTEMS
--- Multiprocessor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with BSP_MPCI;
-with RTEMS;
-
-package MPTEST is
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
- TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TEST_TASK
---
--- DESCRIPTION:
---
--- This is the body of the RTEMS tasks which constitute this test.
---
-
- procedure TEST_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- This is the Driver Address Table for this test.
---
-
- DEVICE_DRIVERS : aliased RTEMS.DRIVER_ADDRESS_TABLE( 1 .. 1 ) :=
- (1=>
- (
- CLOCK_DRIVER.INITIALIZE'ACCESS, -- Initialization
- RTEMS.NO_DRIVER_ENTRY, -- Open
- RTEMS.NO_DRIVER_ENTRY, -- Close
- RTEMS.NO_DRIVER_ENTRY, -- Read
- RTEMS.NO_DRIVER_ENTRY, -- Write
- RTEMS.NO_DRIVER_ENTRY -- Control
- )
- );
-
---
--- This is the Initialization Tasks Table for this test.
---
-
- INITIALIZATION_TASKS : aliased RTEMS.INITIALIZATION_TASKS_TABLE( 1 .. 1 ) :=
- (1=>
- (
- RTEMS.BUILD_NAME( 'U', 'I', '1', ' ' ), -- task name
- 2048, -- stack size
- 1, -- priority
- RTEMS.DEFAULT_ATTRIBUTES, -- attributes
- MPTEST.INIT'ACCESS, -- entry point
- RTEMS.NO_PREEMPT, -- initial mode
- 0 -- argument list
- )
- );
-
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
--- BEGIN SUBPACKAGE --
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-
- --
- -- MPTEST.PER_NODE_CONFIGURATION / SPECIFICATION
- --
- -- DESCRIPTION:
- --
- -- This package is the specification for the subpackage
- -- which will define the per node configuration parameters.
- --
-
- package PER_NODE_CONFIGURATION is
-
- --
- -- LOCAL_NODE_NUMBER
- --
- -- DESCRIPTION:
- --
- -- This function returns the node number for this node.
- --
-
- function LOCAL_NODE_NUMBER
- return RTEMS.UNSIGNED32;
-
- pragma INLINE ( LOCAL_NODE_NUMBER );
-
- end PER_NODE_CONFIGURATION;
-
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
--- END SUBPACKAGE --
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-
---
--- This is the Multiprocessor Configuration Table for this test.
---
-
- MULTIPROCESSING_CONFIGURATION : aliased RTEMS.MULTIPROCESSING_TABLE := (
- MPTEST.PER_NODE_CONFIGURATION.LOCAL_NODE_NUMBER,
- 2, -- maximum # nodes in system
- 32, -- maximum # global objects
- 32 -- maximum # proxies
- );
-
---
--- This is the Configuration Table for this test.
---
-
- CONFIGURATION : aliased RTEMS.CONFIGURATION_TABLE := (
- RTEMS.NULL_ADDRESS, -- will be replaced by BSP
- 64 * 1024, -- executive RAM size
- 10, -- maximum # tasks
- 0, -- maximum # timers
- 0, -- maximum # semaphores
- 0, -- maximum # message queues
- 0, -- maximum # messages
- 0, -- maximum # partitions
- 0, -- maximum # regions
- 0, -- maximum # dp memory areas
- 0, -- maximum # periods
- 0, -- maximum # user extensions
- RTEMS.MILLISECONDS_TO_MICROSECONDS(10), -- # us in a tick
- 50 -- # ticks in a timeslice
- );
-
-end MPTEST;
diff --git a/c/src/ada-tests/mptests/mp02/node1/mp02.scn b/c/src/ada-tests/mptests/mp02/node1/mp02.scn
deleted file mode 100644
index 91b57321f7..0000000000
--- a/c/src/ada-tests/mptests/mp02/node1/mp02.scn
+++ /dev/null
@@ -1,11 +0,0 @@
-*** TEST 2 -- NODE 1 ***
-Creating test task (Global)
-Getting TID of remote task (all nodes)
-Getting TID of remote task (1 node)
-task_delete of remote task returned the correct error
-task_start of remote task returned the correct error
-task_restart of remote task returned the correct error
-Setting notepad 1 of the remote task to 1
-Getting a notepad of the remote task
-Remote notepad set and read correctly
-*** END OF TEST 2 ***
diff --git a/c/src/ada-tests/mptests/mp02/node1/mptest-per_node_configuration.adb b/c/src/ada-tests/mptests/mp02/node1/mptest-per_node_configuration.adb
deleted file mode 100644
index 7df5087537..0000000000
--- a/c/src/ada-tests/mptests/mp02/node1/mptest-per_node_configuration.adb
+++ /dev/null
@@ -1,43 +0,0 @@
---
--- MPTEST.PER_NODE_CONFIGURATION / BODY
---
--- DESCRIPTION:
---
--- This package is the specification for the subpackage
--- which will define the per node configuration parameters.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-separate ( MPTEST )
-
-package body PER_NODE_CONFIGURATION is
-
---PAGE
---
--- LOCAL_NODE_NUMBER
---
-
- function LOCAL_NODE_NUMBER
- return RTEMS.UNSIGNED32 is
- begin
-
- return 1;
-
- end LOCAL_NODE_NUMBER;
-
-end PER_NODE_CONFIGURATION;
diff --git a/c/src/ada-tests/mptests/mp02/node2/mp02.scn b/c/src/ada-tests/mptests/mp02/node2/mp02.scn
deleted file mode 100644
index 14239a546d..0000000000
--- a/c/src/ada-tests/mptests/mp02/node2/mp02.scn
+++ /dev/null
@@ -1,11 +0,0 @@
-*** TEST 2 -- NODE 2 ***
-Creating test task (Global)
-Getting TID of remote task (all nodes)
-Getting TID of remote task (1 node)
-task_delete of remote task returned the correct error
-task_start of remote task returned the correct error
-task_restart of remote task returned the correct error
-Setting notepad 2 of the remote task to 2
-Getting a notepad of the remote task
-Remote notepad set and read correctly
-*** END OF TEST 2 ***
diff --git a/c/src/ada-tests/mptests/mp02/node2/mptest-per_node_configuration.adb b/c/src/ada-tests/mptests/mp02/node2/mptest-per_node_configuration.adb
deleted file mode 100644
index e127cc5573..0000000000
--- a/c/src/ada-tests/mptests/mp02/node2/mptest-per_node_configuration.adb
+++ /dev/null
@@ -1,43 +0,0 @@
---
--- MPTEST.PER_NODE_CONFIGURATION / BODY
---
--- DESCRIPTION:
---
--- This package is the specification for the subpackage
--- which will define the per node configuration parameters.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-separate ( MPTEST )
-
-package body PER_NODE_CONFIGURATION is
-
---PAGE
---
--- LOCAL_NODE_NUMBER
---
-
- function LOCAL_NODE_NUMBER
- return RTEMS.UNSIGNED32 is
- begin
-
- return 2;
-
- end LOCAL_NODE_NUMBER;
-
-end PER_NODE_CONFIGURATION;
diff --git a/c/src/ada-tests/mptests/mp03/mptest.adb b/c/src/ada-tests/mptests/mp03/mptest.adb
deleted file mode 100644
index ea662c3422..0000000000
--- a/c/src/ada-tests/mptests/mp03/mptest.adb
+++ /dev/null
@@ -1,277 +0,0 @@
---
--- MPTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation for Test 3 of the RTEMS
--- Multiprocessor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with TEST_SUPPORT;
-with TEXT_IO;
-with UNSIGNED32_IO;
-
-package body MPTEST is
-
- package body PER_NODE_CONFIGURATION is separate;
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT( "*** TEST 3 -- NODE " );
- UNSIGNED32_IO.PUT(
- MPTEST.MULTIPROCESSING_CONFIGURATION.NODE,
- WIDTH => 1
- );
- TEXT_IO.PUT_LINE( " ***" );
-
- MPTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME( '1', '1', '1', ' ' );
- MPTEST.TASK_NAME( 2 ) := RTEMS.BUILD_NAME( '2', '2', '2', ' ' );
-
- TEXT_IO.PUT_LINE( "Creating Test_task (Global)" );
- RTEMS.TASK_CREATE(
- MPTEST.TASK_NAME( MPTEST.MULTIPROCESSING_CONFIGURATION.NODE ),
- 1,
- 2048,
- RTEMS.NO_PREEMPT,
- RTEMS.GLOBAL,
- MPTEST.TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE" );
-
- TEXT_IO.PUT_LINE( "Starting Test_task (Global)" );
- RTEMS.TASK_START(
- MPTEST.TASK_ID( 1 ),
- MPTEST.TEST_TASK'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START" );
-
- MPTEST.TIMER_NAME( 1 ) := RTEMS.BUILD_NAME( 'T', 'M', '1', ' ' );
-
- RTEMS.TIMER_CREATE(
- MPTEST.TIMER_NAME( 1 ),
- MPTEST.TIMER_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_CREATE" );
-
- TEXT_IO.PUT_LINE( "Deleting initialization task" );
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- DELAYED_SEND_EVENT
---
-
- procedure DELAYED_SEND_EVENT (
- IGNORED_ID : in RTEMS.ID;
- IGNORED_ADDRESS : in RTEMS.ADDRESS
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.EVENT_SEND( MPTEST.TASK_ID( 1 ), RTEMS.EVENT_16, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "EVENT_SEND" );
-
- end DELAYED_SEND_EVENT;
-
---PAGE
---
--- TEST_TASK
---
-
- procedure TEST_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- TID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.TASK_IDENT( RTEMS.SELF, RTEMS.SEARCH_ALL_NODES, TID, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_IDENT OF SELF" );
-
- TEXT_IO.PUT_LINE( "Getting TID of remote task" );
- if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then
- MPTEST.REMOTE_NODE := 2;
- else
- MPTEST.REMOTE_NODE := 1;
- end if;
-
- TEXT_IO.PUT( "Remote task's name is : " );
- TEST_SUPPORT.PUT_NAME( MPTEST.TASK_NAME( MPTEST.REMOTE_NODE ), TRUE );
-
- loop
-
- RTEMS.TASK_IDENT(
- MPTEST.TASK_NAME( MPTEST.REMOTE_NODE ),
- RTEMS.SEARCH_ALL_NODES,
- MPTEST.REMOTE_TID,
- STATUS
- );
-
- exit when RTEMS.IS_STATUS_SUCCESSFUL( STATUS );
-
- end loop;
-
- RTEMS.TIMER_FIRE_AFTER(
- MPTEST.TIMER_ID( 1 ),
- 10 * TEST_SUPPORT.TICKS_PER_SECOND,
- MPTEST.DELAYED_SEND_EVENT'ACCESS,
- RTEMS.NULL_ADDRESS,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_FIRE_AFTER" );
-
- MPTEST.TEST_TASK_SUPPORT( 1 );
-
- RTEMS.TIMER_FIRE_AFTER(
- MPTEST.TIMER_ID( 1 ),
- 11 * TEST_SUPPORT.TICKS_PER_SECOND,
- MPTEST.DELAYED_SEND_EVENT'ACCESS,
- RTEMS.NULL_ADDRESS,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_FIRE_AFTER" );
-
- if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 2 then
-
- RTEMS.TASK_WAKE_AFTER(
- 2 * TEST_SUPPORT.TICKS_PER_SECOND,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- end if;
-
- MPTEST.TEST_TASK_SUPPORT( 2 );
-
- TEXT_IO.PUT_LINE( "*** END OF TEST 3 ***" );
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end TEST_TASK;
-
---PAGE
---
--- TEST_TASK_SUPPORT
---
-
-
- procedure TEST_TASK_SUPPORT (
- NODE : in RTEMS.UNSIGNED32
- ) is
- EVENTS : RTEMS.EVENT_SET;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = NODE then
-
- loop
-
- RTEMS.EVENT_RECEIVE(
- RTEMS.EVENT_16,
- RTEMS.NO_WAIT,
- RTEMS.NO_TIMEOUT,
- EVENTS,
- STATUS
- );
-
- exit when RTEMS.ARE_STATUSES_EQUAL( RTEMS.SUCCESSFUL, STATUS );
-
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.UNSATISFIED,
- "EVENT_RECEIVE"
- );
-
- RTEMS.TASK_WAKE_AFTER(
- 2 * TEST_SUPPORT.TICKS_PER_SECOND,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- TEST_SUPPORT.PUT_NAME( MPTEST.TASK_NAME( NODE ), FALSE );
- TEXT_IO.PUT_LINE( " - Suspending remote task" );
- RTEMS.TASK_SUSPEND( MPTEST.REMOTE_TID, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SUSPEND" );
-
- RTEMS.TASK_WAKE_AFTER(
- 2 * TEST_SUPPORT.TICKS_PER_SECOND,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- TEST_SUPPORT.PUT_NAME( MPTEST.TASK_NAME( NODE ), FALSE );
- TEXT_IO.PUT_LINE( " - Resuming remote task" );
-
- RTEMS.TASK_RESUME( MPTEST.REMOTE_TID, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_RESUME" );
-
- end loop;
-
- else
-
- loop
-
- RTEMS.EVENT_RECEIVE(
- RTEMS.EVENT_16,
- RTEMS.NO_WAIT,
- RTEMS.NO_TIMEOUT,
- EVENTS,
- STATUS
- );
-
- exit when RTEMS.ARE_STATUSES_EQUAL( RTEMS.SUCCESSFUL, STATUS );
-
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.UNSATISFIED,
- "EVENT_RECEIVE"
- );
-
- TEST_SUPPORT.PUT_NAME( MPTEST.TASK_NAME( REMOTE_NODE ), FALSE );
- TEXT_IO.PUT_LINE( " - have I been suspended???" );
- RTEMS.TASK_WAKE_AFTER(
- TEST_SUPPORT.TICKS_PER_SECOND / 2,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- end loop;
-
- end if;
-
- end TEST_TASK_SUPPORT;
-
-end MPTEST;
diff --git a/c/src/ada-tests/mptests/mp03/mptest.ads b/c/src/ada-tests/mptests/mp03/mptest.ads
deleted file mode 100644
index 5542682111..0000000000
--- a/c/src/ada-tests/mptests/mp03/mptest.ads
+++ /dev/null
@@ -1,214 +0,0 @@
---
--- MPTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 3 of the RTEMS
--- Multiprocessor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with BSP_MPCI;
-with RTEMS;
-
-package MPTEST is
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
- TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS timers created
--- by this test.
---
-
- TIMER_ID : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.ID;
- TIMER_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.NAME;
-
---
--- This variable contains the ID of the remote task with which this
--- test interacts.
---
-
- REMOTE_TID : RTEMS.ID;
-
---
--- This variable contains the node on which the remote task with which
--- this test interacts resides.
---
-
- REMOTE_NODE : RTEMS.UNSIGNED32;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- DELAYED_SEND_EVENT
---
--- DESCRIPTION:
---
--- This subprogram is a timer service routine which sends an
--- event set to a waiting task.
---
-
- procedure DELAYED_SEND_EVENT (
- IGNORED_ID : in RTEMS.ID;
- IGNORED_ADDRESS : in RTEMS.ADDRESS
- );
-
---
--- TEST_TASK
---
--- DESCRIPTION:
---
--- This is the body of the RTEMS tasks which constitute this test.
---
-
- procedure TEST_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TEST_TASK_SUPPORT
---
--- DESCRIPTION:
---
--- This subprogram performs the bulk of the test. Based on the NODE
--- specified, this subprogram loops suspending/resuming a remote task
--- or waiting for itself to be suspended/resumed.
---
-
- procedure TEST_TASK_SUPPORT (
- NODE : in RTEMS.UNSIGNED32
- );
-
---
--- This is the Driver Address Table for this test.
---
-
- DEVICE_DRIVERS : aliased RTEMS.DRIVER_ADDRESS_TABLE( 1 .. 1 ) :=
- (1=>
- (
- CLOCK_DRIVER.INITIALIZE'ACCESS, -- Initialization
- RTEMS.NO_DRIVER_ENTRY, -- Open
- RTEMS.NO_DRIVER_ENTRY, -- Close
- RTEMS.NO_DRIVER_ENTRY, -- Read
- RTEMS.NO_DRIVER_ENTRY, -- Write
- RTEMS.NO_DRIVER_ENTRY -- Control
- )
- );
-
---
--- This is the Initialization Tasks Table for this test.
---
-
- INITIALIZATION_TASKS : aliased RTEMS.INITIALIZATION_TASKS_TABLE( 1 .. 1 ) :=
- (1=>
- (
- RTEMS.BUILD_NAME( 'U', 'I', '1', ' ' ), -- task name
- 2048, -- stack size
- 1, -- priority
- RTEMS.DEFAULT_ATTRIBUTES, -- attributes
- MPTEST.INIT'ACCESS, -- entry point
- RTEMS.NO_PREEMPT, -- initial mode
- 0 -- argument list
- )
- );
-
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
--- BEGIN SUBPACKAGE --
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-
- --
- -- MPTEST.PER_NODE_CONFIGURATION / SPECIFICATION
- --
- -- DESCRIPTION:
- --
- -- This package is the specification for the subpackage
- -- which will define the per node configuration parameters.
- --
-
- package PER_NODE_CONFIGURATION is
-
- --
- -- LOCAL_NODE_NUMBER
- --
- -- DESCRIPTION:
- --
- -- This function returns the node number for this node.
- --
-
- function LOCAL_NODE_NUMBER
- return RTEMS.UNSIGNED32;
-
- pragma INLINE ( LOCAL_NODE_NUMBER );
-
- end PER_NODE_CONFIGURATION;
-
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
--- END SUBPACKAGE --
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-
---
--- This is the Multiprocessor Configuration Table for this test.
---
-
- MULTIPROCESSING_CONFIGURATION : aliased RTEMS.MULTIPROCESSING_TABLE := (
- MPTEST.PER_NODE_CONFIGURATION.LOCAL_NODE_NUMBER,
- 2, -- maximum # nodes in system
- 32, -- maximum # global objects
- 32 -- maximum # proxies
- );
-
---
--- This is the Configuration Table for this test.
---
-
- CONFIGURATION : aliased RTEMS.CONFIGURATION_TABLE := (
- RTEMS.NULL_ADDRESS, -- will be replaced by BSP
- 64 * 1024, -- executive RAM size
- 10, -- maximum # tasks
- 1, -- maximum # timers
- 0, -- maximum # semaphores
- 0, -- maximum # message queues
- 0, -- maximum # messages
- 0, -- maximum # partitions
- 0, -- maximum # regions
- 0, -- maximum # dp memory areas
- 0, -- maximum # periods
- 0, -- maximum # user extensions
- RTEMS.MILLISECONDS_TO_MICROSECONDS(10), -- # us in a tick
- 50 -- # ticks in a timeslice
- );
-
-end MPTEST;
diff --git a/c/src/ada-tests/mptests/mp03/node1/mp03.scn b/c/src/ada-tests/mptests/mp03/node1/mp03.scn
deleted file mode 100644
index d749db49e2..0000000000
--- a/c/src/ada-tests/mptests/mp03/node1/mp03.scn
+++ /dev/null
@@ -1,28 +0,0 @@
-*** TEST 3 -- NODE 1 ***
-Creating Test_task (Global)
-Starting Test_task (Global)
-Deleting initialization task
-Getting TID of remote task
-Remote task's name is : 222
-111 - Suspending remote task
-111 - Resuming remote task
-111 - Suspending remote task
-111 - Resuming remote task
-111 - Suspending remote task
-111 - Resuming remote task
-222 - have I been suspended???
-222 - have I been suspended???
-222 - have I been suspended???
-222 - have I been suspended???
-222 - have I been suspended???
-222 - have I been suspended???
-222 - have I been suspended???
-222 - have I been suspended???
-222 - have I been suspended???
-222 - have I been suspended???
-222 - have I been suspended???
-222 - have I been suspended???
-222 - have I been suspended???
-222 - have I been suspended???
-*** END OF TEST 3 ***
-
diff --git a/c/src/ada-tests/mptests/mp03/node1/mptest-per_node_configuration.adb b/c/src/ada-tests/mptests/mp03/node1/mptest-per_node_configuration.adb
deleted file mode 100644
index 7df5087537..0000000000
--- a/c/src/ada-tests/mptests/mp03/node1/mptest-per_node_configuration.adb
+++ /dev/null
@@ -1,43 +0,0 @@
---
--- MPTEST.PER_NODE_CONFIGURATION / BODY
---
--- DESCRIPTION:
---
--- This package is the specification for the subpackage
--- which will define the per node configuration parameters.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-separate ( MPTEST )
-
-package body PER_NODE_CONFIGURATION is
-
---PAGE
---
--- LOCAL_NODE_NUMBER
---
-
- function LOCAL_NODE_NUMBER
- return RTEMS.UNSIGNED32 is
- begin
-
- return 1;
-
- end LOCAL_NODE_NUMBER;
-
-end PER_NODE_CONFIGURATION;
diff --git a/c/src/ada-tests/mptests/mp03/node2/mp03.scn b/c/src/ada-tests/mptests/mp03/node2/mp03.scn
deleted file mode 100644
index 56298f5b8d..0000000000
--- a/c/src/ada-tests/mptests/mp03/node2/mp03.scn
+++ /dev/null
@@ -1,28 +0,0 @@
-*** TEST 3 -- NODE 2 ***
-Creating Test_task (Global)
-Starting Test_task (Global)
-Deleting initialization task
-Getting TID of remote task
-Remote task's name is : 111
-111 - have I been suspended???
-111 - have I been suspended???
-111 - have I been suspended???
-111 - have I been suspended???
-111 - have I been suspended???
-111 - have I been suspended???
-111 - have I been suspended???
-111 - have I been suspended???
-111 - have I been suspended???
-111 - have I been suspended???
-111 - have I been suspended???
-111 - have I been suspended???
-111 - have I been suspended???
-111 - have I been suspended???
-222 - Suspending remote task
-222 - Resuming remote task
-222 - Suspending remote task
-222 - Resuming remote task
-222 - Suspending remote task
-222 - Resuming remote task
-*** END OF TEST 3 ***
-
diff --git a/c/src/ada-tests/mptests/mp03/node2/mptest-per_node_configuration.adb b/c/src/ada-tests/mptests/mp03/node2/mptest-per_node_configuration.adb
deleted file mode 100644
index e127cc5573..0000000000
--- a/c/src/ada-tests/mptests/mp03/node2/mptest-per_node_configuration.adb
+++ /dev/null
@@ -1,43 +0,0 @@
---
--- MPTEST.PER_NODE_CONFIGURATION / BODY
---
--- DESCRIPTION:
---
--- This package is the specification for the subpackage
--- which will define the per node configuration parameters.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-separate ( MPTEST )
-
-package body PER_NODE_CONFIGURATION is
-
---PAGE
---
--- LOCAL_NODE_NUMBER
---
-
- function LOCAL_NODE_NUMBER
- return RTEMS.UNSIGNED32 is
- begin
-
- return 2;
-
- end LOCAL_NODE_NUMBER;
-
-end PER_NODE_CONFIGURATION;
diff --git a/c/src/ada-tests/mptests/mp04/mptest.adb b/c/src/ada-tests/mptests/mp04/mptest.adb
deleted file mode 100644
index c44f521eaa..0000000000
--- a/c/src/ada-tests/mptests/mp04/mptest.adb
+++ /dev/null
@@ -1,169 +0,0 @@
---
--- MPTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation for Test 4 of the RTEMS
--- Multiprocessor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with TEST_SUPPORT;
-with TEXT_IO;
-with UNSIGNED32_IO;
-
-package body MPTEST is
-
- package body PER_NODE_CONFIGURATION is separate;
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT( "*** TEST 4 -- NODE " );
- UNSIGNED32_IO.PUT(
- MPTEST.MULTIPROCESSING_CONFIGURATION.NODE,
- WIDTH => 1
- );
- TEXT_IO.PUT_LINE( " ***" );
-
- MPTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME( '1', '1', '1', ' ' );
- MPTEST.TASK_NAME( 2 ) := RTEMS.BUILD_NAME( '2', '2', '2', ' ' );
-
- TEXT_IO.PUT_LINE( "Creating Test_task (Global)" );
-
- RTEMS.TASK_CREATE(
- MPTEST.TASK_NAME( MPTEST.MULTIPROCESSING_CONFIGURATION.NODE ),
- MPTEST.MULTIPROCESSING_CONFIGURATION.NODE,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.GLOBAL,
- MPTEST.TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE" );
-
- TEXT_IO.PUT_LINE( "Starting Test_task (Global)" );
-
- RTEMS.TASK_START(
- MPTEST.TASK_ID( 1 ),
- MPTEST.TEST_TASK'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START" );
-
- TEXT_IO.PUT_LINE( "Deleting initialization task" );
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- TEST_TASK
---
-
- procedure TEST_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- TID : RTEMS.ID;
- PREVIOUS_PRIORITY : RTEMS.TASK_PRIORITY;
- PREVIOUS_PRIORITY_1 : RTEMS.TASK_PRIORITY;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.TASK_IDENT( RTEMS.SELF, RTEMS.SEARCH_ALL_NODES, TID, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_IDENT OF SELF" );
-
- TEXT_IO.PUT_LINE( "Getting TID of remote task" );
- if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then
- MPTEST.REMOTE_NODE := 2;
- else
- MPTEST.REMOTE_NODE := 1;
- end if;
-
- TEXT_IO.PUT( "Remote task's name is : " );
- TEST_SUPPORT.PUT_NAME( MPTEST.TASK_NAME( MPTEST.REMOTE_NODE ), TRUE );
-
- loop
-
- RTEMS.TASK_IDENT(
- MPTEST.TASK_NAME( MPTEST.REMOTE_NODE ),
- RTEMS.SEARCH_ALL_NODES,
- MPTEST.REMOTE_TID,
- STATUS
- );
-
- exit when RTEMS.IS_STATUS_SUCCESSFUL( STATUS );
-
- end loop;
-
- RTEMS.TASK_SET_PRIORITY(
- MPTEST.REMOTE_TID,
- MPTEST.MULTIPROCESSING_CONFIGURATION.NODE,
- PREVIOUS_PRIORITY,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SET_PRIORITY" );
-
- if PREVIOUS_PRIORITY /= MPTEST.REMOTE_NODE then
-
- TEXT_IO.PUT( "Remote priority (0x" );
- UNSIGNED32_IO.PUT( PREVIOUS_PRIORITY, BASE => 16 );
- TEXT_IO.PUT( "does not match remote node (0x" );
- UNSIGNED32_IO.PUT( MPTEST.REMOTE_NODE, BASE => 16 );
- TEXT_IO.PUT_LINE( ")!!!" );
-
- RTEMS.SHUTDOWN_EXECUTIVE( 16#F00000# );
-
- end if;
-
- loop
-
- RTEMS.TASK_SET_PRIORITY(
- RTEMS.SELF,
- RTEMS.CURRENT_PRIORITY,
- PREVIOUS_PRIORITY_1,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SET_PRIORITY" );
-
- exit when PREVIOUS_PRIORITY_1 = MPTEST.REMOTE_NODE;
-
- end loop;
-
-
- TEXT_IO.PUT_LINE( "Local task priority has been set" );
-
- TEXT_IO.PUT_LINE( "*** END OF TEST 4 ***" );
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end TEST_TASK;
-
-end MPTEST;
diff --git a/c/src/ada-tests/mptests/mp04/mptest.ads b/c/src/ada-tests/mptests/mp04/mptest.ads
deleted file mode 100644
index 2541ff5a93..0000000000
--- a/c/src/ada-tests/mptests/mp04/mptest.ads
+++ /dev/null
@@ -1,178 +0,0 @@
---
--- MPTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 4 of the RTEMS
--- Multiprocessor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with BSP_MPCI;
-with RTEMS;
-
-package MPTEST is
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
- TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
-
---
--- This variable contains the ID of the remote task with which this
--- test interacts.
---
-
- REMOTE_TID : RTEMS.ID;
-
---
--- This variable contains the node on which the remote task with which
--- this test interacts resides.
---
-
- REMOTE_NODE : RTEMS.UNSIGNED32;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TEST_TASK
---
--- DESCRIPTION:
---
--- This is the body of the RTEMS tasks which constitute this test.
---
-
- procedure TEST_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- This is the Driver Address Table for this test.
---
-
- DEVICE_DRIVERS : aliased RTEMS.DRIVER_ADDRESS_TABLE( 1 .. 1 ) :=
- (1=>
- (
- CLOCK_DRIVER.INITIALIZE'ACCESS, -- Initialization
- RTEMS.NO_DRIVER_ENTRY, -- Open
- RTEMS.NO_DRIVER_ENTRY, -- Close
- RTEMS.NO_DRIVER_ENTRY, -- Read
- RTEMS.NO_DRIVER_ENTRY, -- Write
- RTEMS.NO_DRIVER_ENTRY -- Control
- )
- );
-
---
--- This is the Initialization Tasks Table for this test.
---
-
- INITIALIZATION_TASKS : aliased RTEMS.INITIALIZATION_TASKS_TABLE( 1 .. 1 ) :=
- (1=>
- (
- RTEMS.BUILD_NAME( 'U', 'I', '1', ' ' ), -- task name
- 2048, -- stack size
- 1, -- priority
- RTEMS.DEFAULT_ATTRIBUTES, -- attributes
- MPTEST.INIT'ACCESS, -- entry point
- RTEMS.NO_PREEMPT, -- initial mode
- 0 -- argument list
- )
- );
-
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
--- BEGIN SUBPACKAGE --
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-
- --
- -- MPTEST.PER_NODE_CONFIGURATION / SPECIFICATION
- --
- -- DESCRIPTION:
- --
- -- This package is the specification for the subpackage
- -- which will define the per node configuration parameters.
- --
-
- package PER_NODE_CONFIGURATION is
-
- --
- -- LOCAL_NODE_NUMBER
- --
- -- DESCRIPTION:
- --
- -- This function returns the node number for this node.
- --
-
- function LOCAL_NODE_NUMBER
- return RTEMS.UNSIGNED32;
-
- pragma INLINE ( LOCAL_NODE_NUMBER );
-
- end PER_NODE_CONFIGURATION;
-
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
--- END SUBPACKAGE --
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-
---
--- This is the Multiprocessor Configuration Table for this test.
---
-
- MULTIPROCESSING_CONFIGURATION : aliased RTEMS.MULTIPROCESSING_TABLE := (
- MPTEST.PER_NODE_CONFIGURATION.LOCAL_NODE_NUMBER,
- 2, -- maximum # nodes in system
- 32, -- maximum # global objects
- 32 -- maximum # proxies
- );
-
---
--- This is the Configuration Table for this test.
---
-
- CONFIGURATION : aliased RTEMS.CONFIGURATION_TABLE := (
- RTEMS.NULL_ADDRESS, -- will be replaced by BSP
- 64 * 1024, -- executive RAM size
- 10, -- maximum # tasks
- 1, -- maximum # timers
- 0, -- maximum # semaphores
- 0, -- maximum # message queues
- 0, -- maximum # messages
- 0, -- maximum # partitions
- 0, -- maximum # regions
- 0, -- maximum # dp memory areas
- 0, -- maximum # periods
- 0, -- maximum # user extensions
- RTEMS.MILLISECONDS_TO_MICROSECONDS(10), -- # us in a tick
- 50 -- # ticks in a timeslice
- );
-
-end MPTEST;
diff --git a/c/src/ada-tests/mptests/mp04/node1/mp04.scn b/c/src/ada-tests/mptests/mp04/node1/mp04.scn
deleted file mode 100644
index e9518f3ac2..0000000000
--- a/c/src/ada-tests/mptests/mp04/node1/mp04.scn
+++ /dev/null
@@ -1,8 +0,0 @@
-*** TEST 4 -- NODE 1 ***
-Creating Test_task (Global)
-Starting Test_task (Global)
-Deleting initialization task
-Getting TID of remote task
-Remote task's name is : 222
-Local task priority has been set
-*** END OF TEST 4 ***
diff --git a/c/src/ada-tests/mptests/mp04/node1/mptest-per_node_configuration.adb b/c/src/ada-tests/mptests/mp04/node1/mptest-per_node_configuration.adb
deleted file mode 100644
index 7df5087537..0000000000
--- a/c/src/ada-tests/mptests/mp04/node1/mptest-per_node_configuration.adb
+++ /dev/null
@@ -1,43 +0,0 @@
---
--- MPTEST.PER_NODE_CONFIGURATION / BODY
---
--- DESCRIPTION:
---
--- This package is the specification for the subpackage
--- which will define the per node configuration parameters.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-separate ( MPTEST )
-
-package body PER_NODE_CONFIGURATION is
-
---PAGE
---
--- LOCAL_NODE_NUMBER
---
-
- function LOCAL_NODE_NUMBER
- return RTEMS.UNSIGNED32 is
- begin
-
- return 1;
-
- end LOCAL_NODE_NUMBER;
-
-end PER_NODE_CONFIGURATION;
diff --git a/c/src/ada-tests/mptests/mp04/node2/mp04.scn b/c/src/ada-tests/mptests/mp04/node2/mp04.scn
deleted file mode 100644
index 8ccfcfef79..0000000000
--- a/c/src/ada-tests/mptests/mp04/node2/mp04.scn
+++ /dev/null
@@ -1,8 +0,0 @@
-*** TEST 4 -- NODE 2 ***
-Creating Test_task (Global)
-Starting Test_task (Global)
-Deleting initialization task
-Getting TID of remote task
-Remote task's name is : 111
-Local task priority has been set
-*** END OF TEST 4 ***
diff --git a/c/src/ada-tests/mptests/mp04/node2/mptest-per_node_configuration.adb b/c/src/ada-tests/mptests/mp04/node2/mptest-per_node_configuration.adb
deleted file mode 100644
index e127cc5573..0000000000
--- a/c/src/ada-tests/mptests/mp04/node2/mptest-per_node_configuration.adb
+++ /dev/null
@@ -1,43 +0,0 @@
---
--- MPTEST.PER_NODE_CONFIGURATION / BODY
---
--- DESCRIPTION:
---
--- This package is the specification for the subpackage
--- which will define the per node configuration parameters.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-separate ( MPTEST )
-
-package body PER_NODE_CONFIGURATION is
-
---PAGE
---
--- LOCAL_NODE_NUMBER
---
-
- function LOCAL_NODE_NUMBER
- return RTEMS.UNSIGNED32 is
- begin
-
- return 2;
-
- end LOCAL_NODE_NUMBER;
-
-end PER_NODE_CONFIGURATION;
diff --git a/c/src/ada-tests/mptests/mp05/mptest.adb b/c/src/ada-tests/mptests/mp05/mptest.adb
deleted file mode 100644
index 2bab2ddbb7..0000000000
--- a/c/src/ada-tests/mptests/mp05/mptest.adb
+++ /dev/null
@@ -1,252 +0,0 @@
---
--- MPTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation for Test 5 of the RTEMS
--- Multiprocessor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with TEST_SUPPORT;
-with TEXT_IO;
-with UNSIGNED32_IO;
-
-package body MPTEST is
-
- package body PER_NODE_CONFIGURATION is separate;
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT( "*** TEST 5 -- NODE " );
- UNSIGNED32_IO.PUT(
- MPTEST.MULTIPROCESSING_CONFIGURATION.NODE,
- WIDTH => 1
- );
- TEXT_IO.PUT_LINE( " ***" );
-
- MPTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME( '1', '1', '1', ' ' );
- MPTEST.TASK_NAME( 2 ) := RTEMS.BUILD_NAME( '2', '2', '2', ' ' );
-
- TEXT_IO.PUT_LINE( "Creating Test_task (Global)" );
-
- RTEMS.TASK_CREATE(
- MPTEST.TASK_NAME( MPTEST.MULTIPROCESSING_CONFIGURATION.NODE ),
- 1,
- 2048,
- RTEMS.TIMESLICE,
- RTEMS.GLOBAL,
- MPTEST.TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE" );
-
- TEXT_IO.PUT_LINE( "Starting Test_task (Global)" );
-
- RTEMS.TASK_START(
- MPTEST.TASK_ID( 1 ),
- MPTEST.TEST_TASK'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START" );
-
- MPTEST.TIMER_NAME( 1 ) := RTEMS.BUILD_NAME( 'T', 'M', '1', ' ' );
- MPTEST.TIMER_NAME( 2 ) := RTEMS.BUILD_NAME( 'T', 'M', '2', ' ' );
-
- RTEMS.TIMER_CREATE(
- MPTEST.TIMER_NAME( MPTEST.MULTIPROCESSING_CONFIGURATION.NODE ),
- MPTEST.TIMER_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_CREATE" );
-
- TEXT_IO.PUT_LINE( "Deleting initialization task" );
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- PROCESS_ASR
---
-
- procedure PROCESS_ASR (
- SIGNAL : in RTEMS.SIGNAL_SET
- )
- is
- begin
-
- if SIGNAL /= MPTEST.EXPECTED_SIGNAL then
-
- TEXT_IO.PUT( "ERROR: I was expecting signal 0x" );
- UNSIGNED32_IO.PUT( EXPECTED_SIGNAL, BASE => 16 );
- TEXT_IO.PUT( " got 0x" );
- UNSIGNED32_IO.PUT( SIGNAL, BASE => 16 );
- TEXT_IO.NEW_LINE;
-
- RTEMS.FATAL_ERROR_OCCURRED( 16#000F_0000# );
-
- end if;
-
- MPTEST.SIGNAL_CAUGHT := TRUE;
-
- end PROCESS_ASR;
-
---PAGE
---
--- STOP_TEST_TSR
---
-
- procedure STOP_TEST_TSR (
- IGNORED_ID : in RTEMS.ID;
- IGNORED_ADDRESS : in RTEMS.ADDRESS
- ) is
- begin
-
- MPTEST.STOP_TEST := TRUE;
-
- end STOP_TEST_TSR;
-
---PAGE
---
--- TEST_TASK
---
-
- procedure TEST_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- MPTEST.STOP_TEST := FALSE;
-
- MPTEST.SIGNAL_CAUGHT := FALSE;
- MPTEST.SIGNAL_COUNT := 0;
-
- TEXT_IO.PUT_LINE( "signal_catch: initializing signal catcher" );
- RTEMS.SIGNAL_CATCH(
- MPTEST.PROCESS_ASR'ACCESS,
- RTEMS.NO_ASR + RTEMS.NO_PREEMPT,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SIGNAL_CATCH" );
-
- if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then
- MPTEST.REMOTE_NODE := 2;
- MPTEST.REMOTE_SIGNAL := RTEMS.SIGNAL_18;
- MPTEST.EXPECTED_SIGNAL := RTEMS.SIGNAL_17;
- else
- MPTEST.REMOTE_NODE := 1;
- MPTEST.REMOTE_SIGNAL := RTEMS.SIGNAL_17;
- MPTEST.EXPECTED_SIGNAL := RTEMS.SIGNAL_18;
- end if;
-
- TEXT_IO.PUT( "Remote task's name is : " );
- TEST_SUPPORT.PUT_NAME( MPTEST.TASK_NAME( MPTEST.REMOTE_NODE ), TRUE );
-
- TEXT_IO.PUT_LINE( "Getting TID of remote task" );
- loop
-
- RTEMS.TASK_IDENT(
- MPTEST.TASK_NAME( MPTEST.REMOTE_NODE ),
- RTEMS.SEARCH_ALL_NODES,
- MPTEST.REMOTE_TID,
- STATUS
- );
-
- exit when RTEMS.IS_STATUS_SUCCESSFUL( STATUS );
-
- end loop;
-
- RTEMS.TIMER_FIRE_AFTER(
- MPTEST.TIMER_ID( 1 ),
- 3 * TEST_SUPPORT.TICKS_PER_SECOND,
- MPTEST.STOP_TEST_TSR'ACCESS,
- RTEMS.NULL_ADDRESS,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_FIRE_AFTER" );
-
- if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then
-
- TEXT_IO.PUT_LINE( "Sending signal to remote task" );
- loop
- RTEMS.SIGNAL_SEND(
- MPTEST.REMOTE_TID,
- MPTEST.REMOTE_SIGNAL,
- STATUS
- );
-
- exit when RTEMS.IS_STATUS_SUCCESSFUL( STATUS );
-
- exit when not RTEMS.ARE_STATUSES_EQUAL( STATUS, RTEMS.NOT_DEFINED );
-
- end loop;
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SIGNAL_SEND" );
-
- end if;
-
- loop
-
- exit when MPTEST.STOP_TEST = TRUE;
-
- if MPTEST.SIGNAL_CAUGHT = TRUE then
-
- MPTEST.SIGNAL_CAUGHT := FALSE;
- MPTEST.SIGNAL_COUNT := MPTEST.SIGNAL_COUNT + 1;
-
- if MPTEST.SIGNAL_COUNT >= MPTEST.SIGNALS_PER_DOT then
-
- MPTEST.SIGNAL_COUNT := 0;
-
- TEST_SUPPORT.PUT_DOT( "." );
-
- end if;
-
- RTEMS.SIGNAL_SEND(
- MPTEST.REMOTE_TID,
- MPTEST.REMOTE_SIGNAL,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SIGNAL_SEND" );
-
- end if;
-
- end loop;
-
- TEXT_IO.NEW_LINE;
- TEXT_IO.PUT_LINE( "*** END OF TEST 5 ***" );
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end TEST_TASK;
-
-end MPTEST;
diff --git a/c/src/ada-tests/mptests/mp05/mptest.ads b/c/src/ada-tests/mptests/mp05/mptest.ads
deleted file mode 100644
index 9f95ede392..0000000000
--- a/c/src/ada-tests/mptests/mp05/mptest.ads
+++ /dev/null
@@ -1,243 +0,0 @@
---
--- MPTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 5 of the RTEMS
--- Multiprocessor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with BSP_MPCI;
-with RTEMS;
-
-package MPTEST is
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
- TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS timers created
--- by this test.
---
-
- TIMER_ID : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.ID;
- TIMER_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.NAME;
-
---
--- This variable is set when the test should stop executing.
---
- STOP_TEST : RTEMS.BOOLEAN;
-
---
--- This variable contains the ID of the remote task with which this
--- test interacts.
---
-
- REMOTE_TID : RTEMS.ID;
-
---
--- This variable contains the node on which the remote task with which
--- this test interacts resides.
---
-
- REMOTE_NODE : RTEMS.UNSIGNED32;
-
---
--- This is the signal set which is sent to the task on the other node.
---
-
- REMOTE_SIGNAL : RTEMS.SIGNAL_SET;
-
---
--- This is the signal set the task on this node expects to receive
--- from the other node.
---
-
- EXPECTED_SIGNAL : RTEMS.SIGNAL_SET;
-
---
--- These keep track of if a signal set has been caught and how many
--- signal sets have been caught cumulative.
---
-
- SIGNAL_CAUGHT : RTEMS.BOOLEAN;
- SIGNAL_COUNT : RTEMS.UNSIGNED32;
-
---
--- The number of signals to process per dot printed out.
---
-
- SIGNALS_PER_DOT : constant RTEMS.UNSIGNED32 := 15;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- PROCESS_ASR
---
--- DESCRIPTION:
---
--- This subprogram is an ASR for TEST_TASK.
---
-
- procedure PROCESS_ASR (
- SIGNAL : in RTEMS.SIGNAL_SET
- );
-
---
--- STOP_TEST_TSR
---
--- DESCRIPTION:
---
--- This subprogram is a TSR which sets the "stop test" flag.
---
-
- procedure STOP_TEST_TSR (
- IGNORED_ID : in RTEMS.ID;
- IGNORED_ADDRESS : in RTEMS.ADDRESS
- );
-
---
--- TEST_TASK
---
--- DESCRIPTION:
---
--- This is the body of the RTEMS tasks which constitute this test.
---
-
- procedure TEST_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- This is the Driver Address Table for this test.
---
-
- DEVICE_DRIVERS : aliased RTEMS.DRIVER_ADDRESS_TABLE( 1 .. 1 ) :=
- (1=>
- (
- CLOCK_DRIVER.INITIALIZE'ACCESS, -- Initialization
- RTEMS.NO_DRIVER_ENTRY, -- Open
- RTEMS.NO_DRIVER_ENTRY, -- Close
- RTEMS.NO_DRIVER_ENTRY, -- Read
- RTEMS.NO_DRIVER_ENTRY, -- Write
- RTEMS.NO_DRIVER_ENTRY -- Control
- )
- );
-
---
--- This is the Initialization Tasks Table for this test.
---
-
- INITIALIZATION_TASKS : aliased RTEMS.INITIALIZATION_TASKS_TABLE( 1 .. 1 ) :=
- (1=>
- (
- RTEMS.BUILD_NAME( 'U', 'I', '1', ' ' ), -- task name
- 2048, -- stack size
- 1, -- priority
- RTEMS.DEFAULT_ATTRIBUTES, -- attributes
- MPTEST.INIT'ACCESS, -- entry point
- RTEMS.NO_PREEMPT, -- initial mode
- 0 -- argument list
- )
- );
-
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
--- BEGIN SUBPACKAGE --
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-
- --
- -- MPTEST.PER_NODE_CONFIGURATION / SPECIFICATION
- --
- -- DESCRIPTION:
- --
- -- This package is the specification for the subpackage
- -- which will define the per node configuration parameters.
- --
-
- package PER_NODE_CONFIGURATION is
-
- --
- -- LOCAL_NODE_NUMBER
- --
- -- DESCRIPTION:
- --
- -- This function returns the node number for this node.
- --
-
- function LOCAL_NODE_NUMBER
- return RTEMS.UNSIGNED32;
-
- pragma INLINE ( LOCAL_NODE_NUMBER );
-
- end PER_NODE_CONFIGURATION;
-
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
--- END SUBPACKAGE --
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-
---
--- This is the Multiprocessor Configuration Table for this test.
---
-
- MULTIPROCESSING_CONFIGURATION : aliased RTEMS.MULTIPROCESSING_TABLE := (
- MPTEST.PER_NODE_CONFIGURATION.LOCAL_NODE_NUMBER,
- 2, -- maximum # nodes in system
- 32, -- maximum # global objects
- 32 -- maximum # proxies
- );
-
---
--- This is the Configuration Table for this test.
---
-
- CONFIGURATION : aliased RTEMS.CONFIGURATION_TABLE := (
- RTEMS.NULL_ADDRESS, -- will be replaced by BSP
- 64 * 1024, -- executive RAM size
- 10, -- maximum # tasks
- 1, -- maximum # timers
- 2, -- maximum # semaphores
- 0, -- maximum # message queues
- 0, -- maximum # messages
- 0, -- maximum # partitions
- 0, -- maximum # regions
- 0, -- maximum # dp memory areas
- 0, -- maximum # periods
- 0, -- maximum # user extensions
- RTEMS.MILLISECONDS_TO_MICROSECONDS(10), -- # us in a tick
- 50 -- # ticks in a timeslice
- );
-
-end MPTEST;
diff --git a/c/src/ada-tests/mptests/mp05/node1/mp05.scn b/c/src/ada-tests/mptests/mp05/node1/mp05.scn
deleted file mode 100644
index 6f0ea4b639..0000000000
--- a/c/src/ada-tests/mptests/mp05/node1/mp05.scn
+++ /dev/null
@@ -1,11 +0,0 @@
-*** TEST 5 -- NODE 1 ***
-Creating Test_task (Global)
-Starting Test_task (Global)
-Deleting initialization task
-signal_catch: initializing signal catcher
-Remote task's name is : 222
-Getting TID of remote task
-Sending signal to remote task
-....................................................
-....................................................
-*** END OF TEST 5 ***
diff --git a/c/src/ada-tests/mptests/mp05/node1/mptest-per_node_configuration.adb b/c/src/ada-tests/mptests/mp05/node1/mptest-per_node_configuration.adb
deleted file mode 100644
index 7df5087537..0000000000
--- a/c/src/ada-tests/mptests/mp05/node1/mptest-per_node_configuration.adb
+++ /dev/null
@@ -1,43 +0,0 @@
---
--- MPTEST.PER_NODE_CONFIGURATION / BODY
---
--- DESCRIPTION:
---
--- This package is the specification for the subpackage
--- which will define the per node configuration parameters.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-separate ( MPTEST )
-
-package body PER_NODE_CONFIGURATION is
-
---PAGE
---
--- LOCAL_NODE_NUMBER
---
-
- function LOCAL_NODE_NUMBER
- return RTEMS.UNSIGNED32 is
- begin
-
- return 1;
-
- end LOCAL_NODE_NUMBER;
-
-end PER_NODE_CONFIGURATION;
diff --git a/c/src/ada-tests/mptests/mp05/node2/mp05.scn b/c/src/ada-tests/mptests/mp05/node2/mp05.scn
deleted file mode 100644
index 1fb18c132b..0000000000
--- a/c/src/ada-tests/mptests/mp05/node2/mp05.scn
+++ /dev/null
@@ -1,10 +0,0 @@
-*** TEST 5 -- NODE 2 ***
-Creating Test_task (Global)
-Starting Test_task (Global)
-Deleting initialization task
-signal_catch: initializing signal catcher
-Remote task's name is : 111
-Getting TID of remote task
-....................................................
-....................................................
-*** END OF TEST 5 ***
diff --git a/c/src/ada-tests/mptests/mp05/node2/mptest-per_node_configuration.adb b/c/src/ada-tests/mptests/mp05/node2/mptest-per_node_configuration.adb
deleted file mode 100644
index e127cc5573..0000000000
--- a/c/src/ada-tests/mptests/mp05/node2/mptest-per_node_configuration.adb
+++ /dev/null
@@ -1,43 +0,0 @@
---
--- MPTEST.PER_NODE_CONFIGURATION / BODY
---
--- DESCRIPTION:
---
--- This package is the specification for the subpackage
--- which will define the per node configuration parameters.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-separate ( MPTEST )
-
-package body PER_NODE_CONFIGURATION is
-
---PAGE
---
--- LOCAL_NODE_NUMBER
---
-
- function LOCAL_NODE_NUMBER
- return RTEMS.UNSIGNED32 is
- begin
-
- return 2;
-
- end LOCAL_NODE_NUMBER;
-
-end PER_NODE_CONFIGURATION;
diff --git a/c/src/ada-tests/mptests/mp06/mptest.adb b/c/src/ada-tests/mptests/mp06/mptest.adb
deleted file mode 100644
index 56a0841e20..0000000000
--- a/c/src/ada-tests/mptests/mp06/mptest.adb
+++ /dev/null
@@ -1,257 +0,0 @@
---
--- MPTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation for Test 6 of the RTEMS
--- Multiprocessor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with TEST_SUPPORT;
-with TEXT_IO;
-with UNSIGNED32_IO;
-
-package body MPTEST is
-
- package body PER_NODE_CONFIGURATION is separate;
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT( "*** TEST 6 -- NODE " );
- UNSIGNED32_IO.PUT(
- MPTEST.MULTIPROCESSING_CONFIGURATION.NODE,
- WIDTH => 1
- );
- TEXT_IO.PUT_LINE( " ***" );
-
- MPTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME( '1', '1', '1', ' ' );
- MPTEST.TASK_NAME( 2 ) := RTEMS.BUILD_NAME( '2', '2', '2', ' ' );
-
- TEXT_IO.PUT_LINE( "Creating Test_task (Global)" );
-
- RTEMS.TASK_CREATE(
- MPTEST.TASK_NAME( MPTEST.MULTIPROCESSING_CONFIGURATION.NODE ),
- MPTEST.MULTIPROCESSING_CONFIGURATION.NODE,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.GLOBAL,
- MPTEST.TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE" );
-
- TEXT_IO.PUT_LINE( "Starting Test_task (Global)" );
-
- RTEMS.TASK_START(
- MPTEST.TASK_ID( 1 ),
- MPTEST.TEST_TASK'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START" );
-
- MPTEST.TIMER_NAME( 1 ) := RTEMS.BUILD_NAME( 'T', 'M', '1', ' ' );
- MPTEST.TIMER_NAME( 2 ) := RTEMS.BUILD_NAME( 'T', 'M', '2', ' ' );
-
- RTEMS.TIMER_CREATE(
- MPTEST.TIMER_NAME( MPTEST.MULTIPROCESSING_CONFIGURATION.NODE ),
- MPTEST.TIMER_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_CREATE" );
-
- TEXT_IO.PUT_LINE( "Deleting initialization task" );
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- STOP_TEST_TSR
---
-
- procedure STOP_TEST_TSR (
- IGNORED1 : in RTEMS.ID;
- IGNORED2 : in RTEMS.ADDRESS
- ) is
- begin
-
- MPTEST.STOP_TEST := TRUE;
-
- end STOP_TEST_TSR;
-
---PAGE
---
--- TEST_TASK
---
-
- procedure TEST_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- COUNT : RTEMS.UNSIGNED32;
- EVENT_OUT : RTEMS.EVENT_SET;
- EVENT_FOR_THIS_ITERATION : RTEMS.EVENT_SET;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- MPTEST.STOP_TEST := FALSE;
-
- if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then
- MPTEST.REMOTE_NODE := 2;
- else
- MPTEST.REMOTE_NODE := 1;
- end if;
-
- TEXT_IO.PUT( "Remote task's name is : " );
- TEST_SUPPORT.PUT_NAME( MPTEST.TASK_NAME( MPTEST.REMOTE_NODE ), TRUE );
-
- TEXT_IO.PUT_LINE( "Getting TID of remote task" );
-
- loop
-
- RTEMS.TASK_IDENT(
- MPTEST.TASK_NAME( MPTEST.REMOTE_NODE ),
- RTEMS.SEARCH_ALL_NODES,
- MPTEST.REMOTE_TID,
- STATUS
- );
-
- exit when RTEMS.IS_STATUS_SUCCESSFUL( STATUS );
-
- end loop;
-
- if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then
- TEXT_IO.PUT_LINE( "Sending events to remote task" );
- else
- TEXT_IO.PUT_LINE( "Receiving events from remote task" );
- end if;
-
- RTEMS.TIMER_FIRE_AFTER(
- MPTEST.TIMER_ID( 1 ),
- 5 * TEST_SUPPORT.TICKS_PER_SECOND,
- MPTEST.STOP_TEST_TSR'ACCESS,
- RTEMS.NULL_ADDRESS,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_FIRE_AFTER" );
-
- COUNT := 0;
-
- loop
-
- exit when MPTEST.STOP_TEST = TRUE;
-
- EVENT_FOR_THIS_ITERATION :=
- MPTEST.EVENT_SET_TABLE(
- INTEGER( COUNT ) mod MPTEST.EVENT_SET_TABLE'LAST + 1
- );
-
- if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then
-
- RTEMS.EVENT_SEND(
- MPTEST.REMOTE_TID,
- EVENT_FOR_THIS_ITERATION,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "EVENT_SEND" );
-
- else
-
- RTEMS.EVENT_RECEIVE(
- EVENT_FOR_THIS_ITERATION,
- RTEMS.DEFAULT_OPTIONS,
- 1 * TEST_SUPPORT.TICKS_PER_SECOND,
- EVENT_OUT,
- STATUS
- );
-
- if RTEMS.ARE_STATUSES_EQUAL( STATUS, RTEMS.TIMEOUT ) then
- TEXT_IO.NEW_LINE( 1 );
-
- if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 2 then
- TEXT_IO.PUT_LINE(
- "Correct behavior if the other node exitted."
- );
- else
- TEXT_IO.PUT_LINE(
- "ERROR... node 1 died"
- );
- end if;
-
- exit;
-
- else
-
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "EVENT_RECEIVE" );
-
- end if;
-
- end if;
-
- if (COUNT mod MPTEST.MAXIMUM_DOTS) = 0 then
-
- TEST_SUPPORT.PUT_DOT( "." );
-
- end if;
-
- COUNT := COUNT + 1;
-
- end loop;
-
- TEXT_IO.NEW_LINE;
-
- if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 2 then
-
- RTEMS.EVENT_RECEIVE(
- RTEMS.EVENT_16,
- RTEMS.DEFAULT_OPTIONS,
- 1 * TEST_SUPPORT.TICKS_PER_SECOND,
- EVENT_OUT,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- RTEMS.TIMEOUT,
- STATUS,
- "EVENT_RECEIVE"
- );
-
- TEXT_IO.NEW_LINE;
- TEXT_IO.PUT_LINE( "event_receive - correctly returned TIMEOUT" );
-
- end if;
-
- TEXT_IO.PUT_LINE( "*** END OF TEST 6 ***" );
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end TEST_TASK;
-
-end MPTEST;
diff --git a/c/src/ada-tests/mptests/mp06/mptest.ads b/c/src/ada-tests/mptests/mp06/mptest.ads
deleted file mode 100644
index f7fb4f599d..0000000000
--- a/c/src/ada-tests/mptests/mp06/mptest.ads
+++ /dev/null
@@ -1,250 +0,0 @@
---
--- MPTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 6 of the RTEMS
--- Multiprocessor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with BSP_MPCI;
-with RTEMS;
-
-package MPTEST is
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
- TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS timers created
--- by this test.
---
-
- TIMER_ID : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.ID;
- TIMER_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.NAME;
-
---
--- This variable is set when the test should stop executing.
---
- STOP_TEST : RTEMS.BOOLEAN;
-
---
--- This variable contains the ID of the remote task with which this
--- test interacts.
---
-
- REMOTE_TID : RTEMS.ID;
-
---
--- This variable contains the node on which the remote task with which
--- this test interacts resides.
---
-
- REMOTE_NODE : RTEMS.UNSIGNED32;
-
---
--- The number of signals to process per dot printed out.
---
-
- MAXIMUM_DOTS : constant RTEMS.UNSIGNED32 := 25;
-
---
--- The following is a table of the event sets which consist of
--- a single event. This test cycles through all of these
--- events.
---
-
- EVENT_SET_TABLE : constant array ( 0 .. 30 ) of RTEMS.EVENT_SET := (
- RTEMS.EVENT_0,
- RTEMS.EVENT_1,
- RTEMS.EVENT_2,
- RTEMS.EVENT_3,
- RTEMS.EVENT_4,
- RTEMS.EVENT_5,
- RTEMS.EVENT_6,
- RTEMS.EVENT_7,
- RTEMS.EVENT_8,
- RTEMS.EVENT_9,
- RTEMS.EVENT_10,
- RTEMS.EVENT_11,
- RTEMS.EVENT_12,
- RTEMS.EVENT_13,
- RTEMS.EVENT_14,
- RTEMS.EVENT_15,
- RTEMS.EVENT_16,
- RTEMS.EVENT_17,
- RTEMS.EVENT_18,
- RTEMS.EVENT_19,
- RTEMS.EVENT_20,
- RTEMS.EVENT_21,
- RTEMS.EVENT_22,
- RTEMS.EVENT_23,
- RTEMS.EVENT_24,
- RTEMS.EVENT_25,
- RTEMS.EVENT_26,
- RTEMS.EVENT_27,
- RTEMS.EVENT_28,
- RTEMS.EVENT_29,
- RTEMS.EVENT_30
- );
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- STOP_TEST_TSR
---
--- DESCRIPTION:
---
--- This subprogram is a TSR which sets the "stop test" flag.
---
-
- procedure STOP_TEST_TSR (
- IGNORED1 : in RTEMS.ID;
- IGNORED2 : in RTEMS.ADDRESS
- );
-
---
--- TEST_TASK
---
--- DESCRIPTION:
---
--- This is the body of the RTEMS tasks which constitute this test.
---
-
- procedure TEST_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- This is the Driver Address Table for this test.
---
-
- DEVICE_DRIVERS : aliased RTEMS.DRIVER_ADDRESS_TABLE( 1 .. 1 ) :=
- (1=>
- (
- CLOCK_DRIVER.INITIALIZE'ACCESS, -- Initialization
- RTEMS.NO_DRIVER_ENTRY, -- Open
- RTEMS.NO_DRIVER_ENTRY, -- Close
- RTEMS.NO_DRIVER_ENTRY, -- Read
- RTEMS.NO_DRIVER_ENTRY, -- Write
- RTEMS.NO_DRIVER_ENTRY -- Control
- )
- );
-
---
--- This is the Initialization Tasks Table for this test.
---
-
- INITIALIZATION_TASKS : aliased RTEMS.INITIALIZATION_TASKS_TABLE( 1 .. 1 ) :=
- (1=>
- (
- RTEMS.BUILD_NAME( 'U', 'I', '1', ' ' ), -- task name
- 2048, -- stack size
- 1, -- priority
- RTEMS.DEFAULT_ATTRIBUTES, -- attributes
- MPTEST.INIT'ACCESS, -- entry point
- RTEMS.NO_PREEMPT, -- initial mode
- 0 -- argument list
- )
- );
-
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
--- BEGIN SUBPACKAGE --
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-
- --
- -- MPTEST.PER_NODE_CONFIGURATION / SPECIFICATION
- --
- -- DESCRIPTION:
- --
- -- This package is the specification for the subpackage
- -- which will define the per node configuration parameters.
- --
-
- package PER_NODE_CONFIGURATION is
-
- --
- -- LOCAL_NODE_NUMBER
- --
- -- DESCRIPTION:
- --
- -- This function returns the node number for this node.
- --
-
- function LOCAL_NODE_NUMBER
- return RTEMS.UNSIGNED32;
-
- pragma INLINE ( LOCAL_NODE_NUMBER );
-
- end PER_NODE_CONFIGURATION;
-
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
--- END SUBPACKAGE --
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-
---
--- This is the Multiprocessor Configuration Table for this test.
---
-
- MULTIPROCESSING_CONFIGURATION : aliased RTEMS.MULTIPROCESSING_TABLE := (
- MPTEST.PER_NODE_CONFIGURATION.LOCAL_NODE_NUMBER,
- 2, -- maximum # nodes in system
- 32, -- maximum # global objects
- 32 -- maximum # proxies
- );
-
---
--- This is the Configuration Table for this test.
---
-
- CONFIGURATION : aliased RTEMS.CONFIGURATION_TABLE := (
- RTEMS.NULL_ADDRESS, -- will be replaced by BSP
- 64 * 1024, -- executive RAM size
- 10, -- maximum # tasks
- 1, -- maximum # timers
- 2, -- maximum # semaphores
- 0, -- maximum # message queues
- 0, -- maximum # messages
- 0, -- maximum # partitions
- 0, -- maximum # regions
- 0, -- maximum # dp memory areas
- 0, -- maximum # periods
- 0, -- maximum # user extensions
- RTEMS.MILLISECONDS_TO_MICROSECONDS(10), -- # us in a tick
- 50 -- # ticks in a timeslice
- );
-
-end MPTEST;
diff --git a/c/src/ada-tests/mptests/mp06/node1/mp06.scn b/c/src/ada-tests/mptests/mp06/node1/mp06.scn
deleted file mode 100644
index 71da651eca..0000000000
--- a/c/src/ada-tests/mptests/mp06/node1/mp06.scn
+++ /dev/null
@@ -1,10 +0,0 @@
-*** TEST 6 -- NODE 1 ***
-Creating Test_task (Global)
-Starting Test_task (Global)
-Deleting initialization task
-Remote task's name is : 222
-Getting TID of remote task
-Sending events to remote task
-....................................................
-....................................................
-*** END OF TEST 6 ***
diff --git a/c/src/ada-tests/mptests/mp06/node1/mptest-per_node_configuration.adb b/c/src/ada-tests/mptests/mp06/node1/mptest-per_node_configuration.adb
deleted file mode 100644
index 7df5087537..0000000000
--- a/c/src/ada-tests/mptests/mp06/node1/mptest-per_node_configuration.adb
+++ /dev/null
@@ -1,43 +0,0 @@
---
--- MPTEST.PER_NODE_CONFIGURATION / BODY
---
--- DESCRIPTION:
---
--- This package is the specification for the subpackage
--- which will define the per node configuration parameters.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-separate ( MPTEST )
-
-package body PER_NODE_CONFIGURATION is
-
---PAGE
---
--- LOCAL_NODE_NUMBER
---
-
- function LOCAL_NODE_NUMBER
- return RTEMS.UNSIGNED32 is
- begin
-
- return 1;
-
- end LOCAL_NODE_NUMBER;
-
-end PER_NODE_CONFIGURATION;
diff --git a/c/src/ada-tests/mptests/mp06/node2/mp06.scn b/c/src/ada-tests/mptests/mp06/node2/mp06.scn
deleted file mode 100644
index da449041b4..0000000000
--- a/c/src/ada-tests/mptests/mp06/node2/mp06.scn
+++ /dev/null
@@ -1,11 +0,0 @@
-*** TEST 6 -- NODE 2 ***
-Creating Test_task (Global)
-Starting Test_task (Global)
-Deleting initialization task
-Remote task's name is : 111
-Getting TID of remote task
-Receiving events from remote task
-....................................................
-....................................................
-event_receive - correctly returned TIMEOUT
-*** END OF TEST 6 ***
diff --git a/c/src/ada-tests/mptests/mp06/node2/mptest-per_node_configuration.adb b/c/src/ada-tests/mptests/mp06/node2/mptest-per_node_configuration.adb
deleted file mode 100644
index e127cc5573..0000000000
--- a/c/src/ada-tests/mptests/mp06/node2/mptest-per_node_configuration.adb
+++ /dev/null
@@ -1,43 +0,0 @@
---
--- MPTEST.PER_NODE_CONFIGURATION / BODY
---
--- DESCRIPTION:
---
--- This package is the specification for the subpackage
--- which will define the per node configuration parameters.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-separate ( MPTEST )
-
-package body PER_NODE_CONFIGURATION is
-
---PAGE
---
--- LOCAL_NODE_NUMBER
---
-
- function LOCAL_NODE_NUMBER
- return RTEMS.UNSIGNED32 is
- begin
-
- return 2;
-
- end LOCAL_NODE_NUMBER;
-
-end PER_NODE_CONFIGURATION;
diff --git a/c/src/ada-tests/mptests/mp07/mptest.adb b/c/src/ada-tests/mptests/mp07/mptest.adb
deleted file mode 100644
index 2f86bb310c..0000000000
--- a/c/src/ada-tests/mptests/mp07/mptest.adb
+++ /dev/null
@@ -1,210 +0,0 @@
---
--- MPTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation for Test 7 of the RTEMS
--- Multiprocessor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with TEST_SUPPORT;
-with TEXT_IO;
-with UNSIGNED32_IO;
-
-package body MPTEST is
-
- package body PER_NODE_CONFIGURATION is separate;
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT( "*** TEST 7 -- NODE " );
- UNSIGNED32_IO.PUT(
- MPTEST.MULTIPROCESSING_CONFIGURATION.NODE,
- WIDTH => 1
- );
- TEXT_IO.PUT_LINE( " ***" );
-
- MPTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME( '1', '1', '1', ' ' );
- MPTEST.TASK_NAME( 2 ) := RTEMS.BUILD_NAME( '2', '2', '2', ' ' );
-
- TEXT_IO.PUT_LINE( "Creating Test_task (Global)" );
- RTEMS.TASK_CREATE(
- MPTEST.TASK_NAME( MPTEST.MULTIPROCESSING_CONFIGURATION.NODE ),
- MPTEST.MULTIPROCESSING_CONFIGURATION.NODE,
- 2048,
- RTEMS.TIMESLICE,
- RTEMS.GLOBAL,
- MPTEST.TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE" );
-
- TEXT_IO.PUT_LINE( "Starting Test_task (Global)" );
- RTEMS.TASK_START(
- MPTEST.TASK_ID( 1 ),
- MPTEST.TEST_TASK'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START" );
-
- MPTEST.TIMER_NAME( 1 ) := RTEMS.BUILD_NAME( 'T', 'M', '1', ' ' );
-
- RTEMS.TIMER_CREATE(
- MPTEST.TIMER_NAME( 1 ),
- MPTEST.TIMER_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_CREATE" );
-
- TEXT_IO.PUT_LINE( "Deleting initialization task" );
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- STOP_TEST_TSR
---
-
- procedure STOP_TEST_TSR (
- IGNORED1 : in RTEMS.ID;
- IGNORED2 : in RTEMS.ADDRESS
- ) is
- begin
-
- MPTEST.STOP_TEST := TRUE;
-
- end STOP_TEST_TSR;
-
---PAGE
---
--- TEST_TASK
---
-
- procedure TEST_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- COUNT : RTEMS.UNSIGNED32;
- EVENT_OUT : RTEMS.EVENT_SET;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- MPTEST.STOP_TEST := FALSE;
-
- if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then
- MPTEST.REMOTE_NODE := 2;
- else
- MPTEST.REMOTE_NODE := 1;
- end if;
-
- TEXT_IO.PUT( "Remote task's name is : " );
- TEST_SUPPORT.PUT_NAME( MPTEST.TASK_NAME( MPTEST.REMOTE_NODE ), TRUE );
-
- TEXT_IO.PUT_LINE( "Getting TID of remote task" );
- loop
- RTEMS.TASK_IDENT(
- MPTEST.TASK_NAME( MPTEST.REMOTE_NODE ),
- RTEMS.SEARCH_ALL_NODES,
- MPTEST.REMOTE_TID,
- STATUS
- );
-
- exit when RTEMS.ARE_STATUSES_EQUAL( STATUS, RTEMS.SUCCESSFUL );
-
- end loop;
-
- if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then
-
- TEXT_IO.PUT_LINE( "Sending first event to remote task" );
- RTEMS.EVENT_SEND(
- MPTEST.REMOTE_TID,
- RTEMS.EVENT_16,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "EVENT_SEND" );
-
- end if;
-
- RTEMS.TIMER_FIRE_AFTER(
- MPTEST.TIMER_ID( 1 ),
- 5 * TEST_SUPPORT.TICKS_PER_SECOND,
- MPTEST.STOP_TEST_TSR'ACCESS,
- RTEMS.NULL_ADDRESS,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_FIRE_AFTER" );
-
- loop
-
- exit when MPTEST.STOP_TEST = TRUE;
-
- for COUNT in 1 .. MPTEST.PER_DOT
- loop
-
- RTEMS.EVENT_RECEIVE(
- RTEMS.EVENT_16,
- RTEMS.DEFAULT_OPTIONS,
- TEST_SUPPORT.TICKS_PER_SECOND,
- EVENT_OUT,
- STATUS
- );
- if RTEMS.ARE_STATUSES_EQUAL( STATUS, RTEMS.TIMEOUT ) then
- TEXT_IO.NEW_LINE;
- TEXT_IO.PUT_LINE(
- "TA1 - TIMEOUT .. probably OK if the other node exits"
- );
- exit;
- else
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "EVENT_RECEIVE" );
- end if;
-
- RTEMS.EVENT_SEND(
- MPTEST.REMOTE_TID,
- RTEMS.EVENT_16,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "EVENT_SEND" );
-
- end loop;
-
- TEST_SUPPORT.PUT_DOT( "." );
-
- end loop;
-
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT_LINE( "*** END OF TEST 7 ***" );
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end TEST_TASK;
-
-end MPTEST;
diff --git a/c/src/ada-tests/mptests/mp07/mptest.ads b/c/src/ada-tests/mptests/mp07/mptest.ads
deleted file mode 100644
index 6640261d88..0000000000
--- a/c/src/ada-tests/mptests/mp07/mptest.ads
+++ /dev/null
@@ -1,210 +0,0 @@
---
--- MPTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 7 of the RTEMS
--- Multiprocessor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with BSP_MPCI;
-with RTEMS;
-
-package MPTEST is
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
- TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS timers created
--- by this test.
---
-
- TIMER_ID : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.ID;
- TIMER_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.NAME;
-
---
--- This variable is set when the test should stop executing.
---
- STOP_TEST : RTEMS.BOOLEAN;
-
---
--- This variable contains the ID of the remote task with which this
--- test interacts.
---
-
- REMOTE_TID : RTEMS.ID;
-
---
--- This variable contains the node on which the remote task with which
--- this test interacts resides.
---
-
- REMOTE_NODE : RTEMS.UNSIGNED32;
-
---
--- The number of events to process per dot printed out.
---
-
- PER_DOT : constant RTEMS.UNSIGNED32 := 100;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- STOP_TEST_TSR
---
--- DESCRIPTION:
---
--- This subprogram is a TSR which sets the "stop test" flag.
---
-
- procedure STOP_TEST_TSR (
- IGNORED1 : in RTEMS.ID;
- IGNORED2 : in RTEMS.ADDRESS
- );
-
---
--- TEST_TASK
---
--- DESCRIPTION:
---
--- This is the body of the RTEMS tasks which constitute this test.
---
-
- procedure TEST_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- This is the Driver Address Table for this test.
---
-
- DEVICE_DRIVERS : aliased RTEMS.DRIVER_ADDRESS_TABLE( 1 .. 1 ) :=
- (1=>
- (
- CLOCK_DRIVER.INITIALIZE'ACCESS, -- Initialization
- RTEMS.NO_DRIVER_ENTRY, -- Open
- RTEMS.NO_DRIVER_ENTRY, -- Close
- RTEMS.NO_DRIVER_ENTRY, -- Read
- RTEMS.NO_DRIVER_ENTRY, -- Write
- RTEMS.NO_DRIVER_ENTRY -- Control
- )
- );
-
---
--- This is the Initialization Tasks Table for this test.
---
-
- INITIALIZATION_TASKS : aliased RTEMS.INITIALIZATION_TASKS_TABLE( 1 .. 1 ) :=
- (1=>
- (
- RTEMS.BUILD_NAME( 'U', 'I', '1', ' ' ), -- task name
- 2048, -- stack size
- 1, -- priority
- RTEMS.DEFAULT_ATTRIBUTES, -- attributes
- MPTEST.INIT'ACCESS, -- entry point
- RTEMS.NO_PREEMPT, -- initial mode
- 0 -- argument list
- )
- );
-
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
--- BEGIN SUBPACKAGE --
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-
- --
- -- MPTEST.PER_NODE_CONFIGURATION / SPECIFICATION
- --
- -- DESCRIPTION:
- --
- -- This package is the specification for the subpackage
- -- which will define the per node configuration parameters.
- --
-
- package PER_NODE_CONFIGURATION is
-
- --
- -- LOCAL_NODE_NUMBER
- --
- -- DESCRIPTION:
- --
- -- This function returns the node number for this node.
- --
-
- function LOCAL_NODE_NUMBER
- return RTEMS.UNSIGNED32;
-
- pragma INLINE ( LOCAL_NODE_NUMBER );
-
- end PER_NODE_CONFIGURATION;
-
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
--- END SUBPACKAGE --
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-
---
--- This is the Multiprocessor Configuration Table for this test.
---
-
- MULTIPROCESSING_CONFIGURATION : aliased RTEMS.MULTIPROCESSING_TABLE := (
- MPTEST.PER_NODE_CONFIGURATION.LOCAL_NODE_NUMBER,
- 2, -- maximum # nodes in system
- 32, -- maximum # global objects
- 32 -- maximum # proxies
- );
-
---
--- This is the Configuration Table for this test.
---
-
- CONFIGURATION : aliased RTEMS.CONFIGURATION_TABLE := (
- RTEMS.NULL_ADDRESS, -- will be replaced by BSP
- 64 * 1024, -- executive RAM size
- 10, -- maximum # tasks
- 1, -- maximum # timers
- 2, -- maximum # semaphores
- 0, -- maximum # message queues
- 0, -- maximum # messages
- 0, -- maximum # partitions
- 0, -- maximum # regions
- 0, -- maximum # dp memory areas
- 0, -- maximum # periods
- 0, -- maximum # user extensions
- RTEMS.MILLISECONDS_TO_MICROSECONDS(10), -- # us in a tick
- 50 -- # ticks in a timeslice
- );
-
-end MPTEST;
diff --git a/c/src/ada-tests/mptests/mp07/node1/mp07.scn b/c/src/ada-tests/mptests/mp07/node1/mp07.scn
deleted file mode 100644
index 71e0956329..0000000000
--- a/c/src/ada-tests/mptests/mp07/node1/mp07.scn
+++ /dev/null
@@ -1,10 +0,0 @@
-*** TEST 7 -- NODE 1 ***
-Creating Test_task (Global)
-Starting Test_task (Global)
-Deleting initialization task
-Remote task's name is : 222
-Getting TID of remote task
-Sending first event to remote task
-....................................................
-....................................................
-*** END OF TEST 7 ***
diff --git a/c/src/ada-tests/mptests/mp07/node1/mptest-per_node_configuration.adb b/c/src/ada-tests/mptests/mp07/node1/mptest-per_node_configuration.adb
deleted file mode 100644
index 7df5087537..0000000000
--- a/c/src/ada-tests/mptests/mp07/node1/mptest-per_node_configuration.adb
+++ /dev/null
@@ -1,43 +0,0 @@
---
--- MPTEST.PER_NODE_CONFIGURATION / BODY
---
--- DESCRIPTION:
---
--- This package is the specification for the subpackage
--- which will define the per node configuration parameters.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-separate ( MPTEST )
-
-package body PER_NODE_CONFIGURATION is
-
---PAGE
---
--- LOCAL_NODE_NUMBER
---
-
- function LOCAL_NODE_NUMBER
- return RTEMS.UNSIGNED32 is
- begin
-
- return 1;
-
- end LOCAL_NODE_NUMBER;
-
-end PER_NODE_CONFIGURATION;
diff --git a/c/src/ada-tests/mptests/mp07/node2/mp07.scn b/c/src/ada-tests/mptests/mp07/node2/mp07.scn
deleted file mode 100644
index c31011e85c..0000000000
--- a/c/src/ada-tests/mptests/mp07/node2/mp07.scn
+++ /dev/null
@@ -1,9 +0,0 @@
-*** TEST 7 -- NODE 2 ***
-Creating Test_task (Global)
-Starting Test_task (Global)
-Deleting initialization task
-Remote task's name is : 111
-Getting TID of remote task
-....................................................
-....................................................
-*** END OF TEST 7 ***
diff --git a/c/src/ada-tests/mptests/mp07/node2/mptest-per_node_configuration.adb b/c/src/ada-tests/mptests/mp07/node2/mptest-per_node_configuration.adb
deleted file mode 100644
index e127cc5573..0000000000
--- a/c/src/ada-tests/mptests/mp07/node2/mptest-per_node_configuration.adb
+++ /dev/null
@@ -1,43 +0,0 @@
---
--- MPTEST.PER_NODE_CONFIGURATION / BODY
---
--- DESCRIPTION:
---
--- This package is the specification for the subpackage
--- which will define the per node configuration parameters.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-separate ( MPTEST )
-
-package body PER_NODE_CONFIGURATION is
-
---PAGE
---
--- LOCAL_NODE_NUMBER
---
-
- function LOCAL_NODE_NUMBER
- return RTEMS.UNSIGNED32 is
- begin
-
- return 2;
-
- end LOCAL_NODE_NUMBER;
-
-end PER_NODE_CONFIGURATION;
diff --git a/c/src/ada-tests/mptests/mp08/mptest.adb b/c/src/ada-tests/mptests/mp08/mptest.adb
deleted file mode 100644
index e07fa1dc4c..0000000000
--- a/c/src/ada-tests/mptests/mp08/mptest.adb
+++ /dev/null
@@ -1,207 +0,0 @@
---
--- MPTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation for Test 8 of the RTEMS
--- Multiprocessor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with TEST_SUPPORT;
-with TEXT_IO;
-with UNSIGNED32_IO;
-
-package body MPTEST is
-
- package body PER_NODE_CONFIGURATION is separate;
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT( "*** TEST 8 -- NODE " );
- UNSIGNED32_IO.PUT(
- MPTEST.MULTIPROCESSING_CONFIGURATION.NODE,
- WIDTH => 1
- );
- TEXT_IO.PUT_LINE( " ***" );
-
- MPTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME( '1', '1', '1', ' ' );
- MPTEST.TASK_NAME( 2 ) := RTEMS.BUILD_NAME( '2', '2', '2', ' ' );
-
- MPTEST.SEMAPHORE_NAME( 1 ) := RTEMS.BUILD_NAME( 'S', 'E', 'M', ' ' );
-
- if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then
-
- TEXT_IO.PUT_LINE( "Creating Semaphore(Global)" );
-
- RTEMS.SEMAPHORE_CREATE(
- MPTEST.SEMAPHORE_NAME( 1 ),
- 1,
- RTEMS.GLOBAL,
- MPTEST.SEMAPHORE_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_CREATE" );
-
- end if;
-
- TEXT_IO.PUT_LINE( "Creating Test_task (Global)" );
- RTEMS.TASK_CREATE(
- MPTEST.TASK_NAME( MPTEST.MULTIPROCESSING_CONFIGURATION.NODE ),
- MPTEST.MULTIPROCESSING_CONFIGURATION.NODE,
- 2048,
- RTEMS.TIMESLICE,
- RTEMS.GLOBAL,
- MPTEST.TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE" );
-
- TEXT_IO.PUT_LINE( "Starting Test_task (Global)" );
- RTEMS.TASK_START(
- MPTEST.TASK_ID( 1 ),
- MPTEST.TEST_TASK'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START" );
-
- TEXT_IO.PUT_LINE( "Deleting initialization task" );
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- TEST_TASK
---
-
- procedure TEST_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- DOTS : RTEMS.UNSIGNED32;
- COUNT : RTEMS.UNSIGNED32;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.PUT_LINE( "Getting SMID of semaphore" );
- loop
-
- RTEMS.SEMAPHORE_IDENT(
- MPTEST.SEMAPHORE_NAME( 1 ),
- RTEMS.SEARCH_ALL_NODES,
- MPTEST.SEMAPHORE_ID( 1 ),
- STATUS
- );
-
- exit when RTEMS.IS_STATUS_SUCCESSFUL( STATUS );
-
- end loop;
-
- if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 2 then
-
- RTEMS.SEMAPHORE_DELETE(
- MPTEST.SEMAPHORE_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.ILLEGAL_ON_REMOTE_OBJECT,
- "SEMAPHORE_DELETE"
- );
-
- TEXT_IO.PUT_LINE(
- "semaphore_delete correctly returned ILLEGAL_ON_REMOTE_OBJECT"
- );
-
- end if;
-
- COUNT := 0;
-
- loop
-
- TEST_SUPPORT.PUT_DOT( "p" );
-
- RTEMS.SEMAPHORE_OBTAIN(
- MPTEST.SEMAPHORE_ID( 1 ),
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- STATUS
- );
-
- if not RTEMS.IS_STATUS_SUCCESSFUL( STATUS ) then
-
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.OBJECT_WAS_DELETED,
- "SEMAPHORE_OBTAIN"
- );
-
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT_LINE( "Global semaphore deleted" );
-
- TEXT_IO.PUT_LINE( "*** END OF TEST 8 ***" );
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end if;
-
- COUNT := COUNT + 1;
-
- if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 and then
- COUNT >= 1000 then
-
- RTEMS.TASK_WAKE_AFTER( TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT_LINE( "Deleting global semaphore" );
-
- RTEMS.SEMAPHORE_DELETE( MPTEST.SEMAPHORE_ID( 1 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_DELETE" );
-
- TEXT_IO.PUT_LINE( "*** END OF TEST 8 ***" );
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end if;
-
- TEST_SUPPORT.PUT_DOT( "v" );
-
- RTEMS.SEMAPHORE_RELEASE( MPTEST.SEMAPHORE_ID( 1 ), STATUS );
-
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_RELEASE" );
-
- end loop;
-
- end TEST_TASK;
-
-end MPTEST;
diff --git a/c/src/ada-tests/mptests/mp08/mptest.ads b/c/src/ada-tests/mptests/mp08/mptest.ads
deleted file mode 100644
index 8467cbe217..0000000000
--- a/c/src/ada-tests/mptests/mp08/mptest.ads
+++ /dev/null
@@ -1,192 +0,0 @@
---
--- MPTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 8 of the RTEMS
--- Multiprocessor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with BSP_MPCI;
-with RTEMS;
-
-package MPTEST is
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
- TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS semaphores created
--- by this test.
---
-
- SEMAPHORE_ID : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.ID;
- SEMAPHORE_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.NAME;
-
---
--- This variable contains the ID of the remote task with which this
--- test interacts.
---
-
- REMOTE_TID : RTEMS.ID;
-
---
--- This variable contains the node on which the remote task with which
--- this test interacts resides.
---
-
- REMOTE_NODE : RTEMS.UNSIGNED32;
-
---
--- The number of events to process per dot printed out.
---
-
- PER_DOT : constant RTEMS.UNSIGNED32 := 100;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TEST_TASK
---
--- DESCRIPTION:
---
--- This is the body of the RTEMS tasks which constitute this test.
---
-
- procedure TEST_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- This is the Driver Address Table for this test.
---
-
- DEVICE_DRIVERS : aliased RTEMS.DRIVER_ADDRESS_TABLE( 1 .. 1 ) :=
- (1=>
- (
- CLOCK_DRIVER.INITIALIZE'ACCESS, -- Initialization
- RTEMS.NO_DRIVER_ENTRY, -- Open
- RTEMS.NO_DRIVER_ENTRY, -- Close
- RTEMS.NO_DRIVER_ENTRY, -- Read
- RTEMS.NO_DRIVER_ENTRY, -- Write
- RTEMS.NO_DRIVER_ENTRY -- Control
- )
- );
-
---
--- This is the Initialization Tasks Table for this test.
---
-
- INITIALIZATION_TASKS : aliased RTEMS.INITIALIZATION_TASKS_TABLE( 1 .. 1 ) :=
- (1=>
- (
- RTEMS.BUILD_NAME( 'U', 'I', '1', ' ' ), -- task name
- 2048, -- stack size
- 1, -- priority
- RTEMS.DEFAULT_ATTRIBUTES, -- attributes
- MPTEST.INIT'ACCESS, -- entry point
- RTEMS.NO_PREEMPT, -- initial mode
- 0 -- argument list
- )
- );
-
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
--- BEGIN SUBPACKAGE --
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-
- --
- -- MPTEST.PER_NODE_CONFIGURATION / SPECIFICATION
- --
- -- DESCRIPTION:
- --
- -- This package is the specification for the subpackage
- -- which will define the per node configuration parameters.
- --
-
- package PER_NODE_CONFIGURATION is
-
- --
- -- LOCAL_NODE_NUMBER
- --
- -- DESCRIPTION:
- --
- -- This function returns the node number for this node.
- --
-
- function LOCAL_NODE_NUMBER
- return RTEMS.UNSIGNED32;
-
- pragma INLINE ( LOCAL_NODE_NUMBER );
-
- end PER_NODE_CONFIGURATION;
-
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
--- END SUBPACKAGE --
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-
---
--- This is the Multiprocessor Configuration Table for this test.
---
-
- MULTIPROCESSING_CONFIGURATION : aliased RTEMS.MULTIPROCESSING_TABLE := (
- MPTEST.PER_NODE_CONFIGURATION.LOCAL_NODE_NUMBER,
- 2, -- maximum # nodes in system
- 32, -- maximum # global objects
- 32 -- maximum # proxies
- );
-
---
--- This is the Configuration Table for this test.
---
-
- CONFIGURATION : aliased RTEMS.CONFIGURATION_TABLE := (
- RTEMS.NULL_ADDRESS, -- will be replaced by BSP
- 64 * 1024, -- executive RAM size
- 10, -- maximum # tasks
- 1, -- maximum # timers
- 1, -- maximum # semaphores
- 0, -- maximum # message queues
- 0, -- maximum # messages
- 0, -- maximum # partitions
- 0, -- maximum # regions
- 0, -- maximum # dp memory areas
- 0, -- maximum # periods
- 0, -- maximum # user extensions
- RTEMS.MILLISECONDS_TO_MICROSECONDS(10), -- # us in a tick
- 50 -- # ticks in a timeslice
- );
-
-end MPTEST;
diff --git a/c/src/ada-tests/mptests/mp08/node1/mp08.scn b/c/src/ada-tests/mptests/mp08/node1/mp08.scn
deleted file mode 100644
index ba9f089e96..0000000000
--- a/c/src/ada-tests/mptests/mp08/node1/mp08.scn
+++ /dev/null
@@ -1,9 +0,0 @@
-*** TEST 8 -- NODE 1 ***
-Creating Test_task (Global)
-Starting Test_task (Global)
-Deleting initialization task
-Getting SMID of semaphore
-pvpvpvpvpvp.......
-(continued) pvp
-Deleting global semaphore
-*** END OF TEST 8 ***
diff --git a/c/src/ada-tests/mptests/mp08/node1/mptest-per_node_configuration.adb b/c/src/ada-tests/mptests/mp08/node1/mptest-per_node_configuration.adb
deleted file mode 100644
index 7df5087537..0000000000
--- a/c/src/ada-tests/mptests/mp08/node1/mptest-per_node_configuration.adb
+++ /dev/null
@@ -1,43 +0,0 @@
---
--- MPTEST.PER_NODE_CONFIGURATION / BODY
---
--- DESCRIPTION:
---
--- This package is the specification for the subpackage
--- which will define the per node configuration parameters.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-separate ( MPTEST )
-
-package body PER_NODE_CONFIGURATION is
-
---PAGE
---
--- LOCAL_NODE_NUMBER
---
-
- function LOCAL_NODE_NUMBER
- return RTEMS.UNSIGNED32 is
- begin
-
- return 1;
-
- end LOCAL_NODE_NUMBER;
-
-end PER_NODE_CONFIGURATION;
diff --git a/c/src/ada-tests/mptests/mp08/node2/mp08.scn b/c/src/ada-tests/mptests/mp08/node2/mp08.scn
deleted file mode 100644
index 8ac712ae93..0000000000
--- a/c/src/ada-tests/mptests/mp08/node2/mp08.scn
+++ /dev/null
@@ -1,10 +0,0 @@
-*** TEST 8 -- NODE 2 ***
-Creating Test_task (Global)
-Starting Test_task (Global)
-Deleting initialization task
-Getting SMID of semaphore
-semaphore_delete correctly returned ILLEGAL_ON_REMOTE_OBJECT
-pvpvpvpvpvp.......
-(continued) pvp
-Global semaphore deleted
-*** END OF TEST 8 ***
diff --git a/c/src/ada-tests/mptests/mp08/node2/mptest-per_node_configuration.adb b/c/src/ada-tests/mptests/mp08/node2/mptest-per_node_configuration.adb
deleted file mode 100644
index e127cc5573..0000000000
--- a/c/src/ada-tests/mptests/mp08/node2/mptest-per_node_configuration.adb
+++ /dev/null
@@ -1,43 +0,0 @@
---
--- MPTEST.PER_NODE_CONFIGURATION / BODY
---
--- DESCRIPTION:
---
--- This package is the specification for the subpackage
--- which will define the per node configuration parameters.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-separate ( MPTEST )
-
-package body PER_NODE_CONFIGURATION is
-
---PAGE
---
--- LOCAL_NODE_NUMBER
---
-
- function LOCAL_NODE_NUMBER
- return RTEMS.UNSIGNED32 is
- begin
-
- return 2;
-
- end LOCAL_NODE_NUMBER;
-
-end PER_NODE_CONFIGURATION;
diff --git a/c/src/ada-tests/mptests/mp09/mptest.adb b/c/src/ada-tests/mptests/mp09/mptest.adb
deleted file mode 100644
index f8f0f594d0..0000000000
--- a/c/src/ada-tests/mptests/mp09/mptest.adb
+++ /dev/null
@@ -1,381 +0,0 @@
---
--- MPTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation for Test 9 of the RTEMS
--- Multiprocessor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with TEST_SUPPORT;
-with TEXT_IO;
-with UNSIGNED32_IO;
-
-package body MPTEST is
-
- package body PER_NODE_CONFIGURATION is separate;
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT( "*** TEST 9 -- NODE " );
- UNSIGNED32_IO.PUT(
- MPTEST.MULTIPROCESSING_CONFIGURATION.NODE,
- WIDTH => 1
- );
- TEXT_IO.PUT_LINE( " ***" );
-
- MPTEST.RECEIVE_BUFFER :=
- RTEMS.TO_BUFFER_POINTER( MPTEST.RECEIVE_BUFFER_AREA'ADDRESS );
-
- MPTEST.BUFFER_1 :=
- RTEMS.TO_BUFFER_POINTER( MPTEST.BUFFER_AREA_1'ADDRESS );
-
- MPTEST.BUFFER_2 :=
- RTEMS.TO_BUFFER_POINTER( MPTEST.BUFFER_AREA_2'ADDRESS );
-
- MPTEST.BUFFER_3 :=
- RTEMS.TO_BUFFER_POINTER( MPTEST.BUFFER_AREA_3'ADDRESS );
-
- MPTEST.BUFFER_4 :=
- RTEMS.TO_BUFFER_POINTER( MPTEST.BUFFER_AREA_4'ADDRESS );
-
- MPTEST.FILL_BUFFER( "123456789012345 ", MPTEST.BUFFER_AREA_1 );
- MPTEST.FILL_BUFFER( "abcdefghijklmno ", MPTEST.BUFFER_AREA_2 );
- MPTEST.FILL_BUFFER( "ABCDEFGHIJKLMNO ", MPTEST.BUFFER_AREA_3 );
- MPTEST.FILL_BUFFER( "PQRSTUVWXYZ(){} ", MPTEST.BUFFER_AREA_4 );
-
- MPTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME( '1', '1', '1', ' ' );
- MPTEST.TASK_NAME( 2 ) := RTEMS.BUILD_NAME( '2', '2', '2', ' ' );
-
- MPTEST.QUEUE_NAME( 1 ) := RTEMS.BUILD_NAME( 'M', 'S', 'G', ' ' );
-
- if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then
-
- TEXT_IO.PUT_LINE( "Creating Message Queue (Global)" );
- RTEMS.MESSAGE_QUEUE_CREATE(
- MPTEST.QUEUE_NAME( 1 ),
- 3,
- RTEMS.GLOBAL + RTEMS.LIMIT,
- MPTEST.QUEUE_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_CREATE" );
-
- end if;
-
- TEXT_IO.PUT_LINE( "Creating Test_task (local)" );
- RTEMS.TASK_CREATE(
- MPTEST.TASK_NAME( MPTEST.MULTIPROCESSING_CONFIGURATION.NODE ),
- MPTEST.MULTIPROCESSING_CONFIGURATION.NODE,
- 2048,
- RTEMS.TIMESLICE,
- RTEMS.DEFAULT_ATTRIBUTES,
- MPTEST.TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE" );
-
- TEXT_IO.PUT_LINE( "Starting Test_task (local)" );
- RTEMS.TASK_START(
- MPTEST.TASK_ID( 1 ),
- MPTEST.TEST_TASK'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START" );
-
- TEXT_IO.PUT_LINE( "Deleting initialization task" );
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- SEND_MESSAGES
---
-
- procedure SEND_MESSAGES is
- BROADCAST_COUNT : RTEMS.UNSIGNED32;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.PUT( "message_queue_send : " );
- MPTEST.PUT_BUFFER( MPTEST.BUFFER_AREA_1 );
- TEXT_IO.NEW_LINE;
-
- RTEMS.MESSAGE_QUEUE_SEND(
- MPTEST.QUEUE_ID( 1 ),
- MPTEST.BUFFER_1,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_SEND" );
-
- TEXT_IO.PUT_LINE( "Delaying for a second" );
- RTEMS.TASK_WAKE_AFTER(
- 1 * TEST_SUPPORT.TICKS_PER_SECOND,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- TEXT_IO.PUT( "message_queue_urgent : " );
- MPTEST.PUT_BUFFER( MPTEST.BUFFER_AREA_2 );
- TEXT_IO.NEW_LINE;
-
- RTEMS.MESSAGE_QUEUE_URGENT(
- MPTEST.QUEUE_ID( 1 ),
- MPTEST.BUFFER_2,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_URGENT" );
-
- TEXT_IO.PUT_LINE( "Delaying for a second" );
- RTEMS.TASK_WAKE_AFTER(
- 1 * TEST_SUPPORT.TICKS_PER_SECOND,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- TEXT_IO.PUT( "message_queue_broadcast : " );
- MPTEST.PUT_BUFFER( MPTEST.BUFFER_AREA_3 );
- TEXT_IO.NEW_LINE;
-
- RTEMS.MESSAGE_QUEUE_BROADCAST(
- MPTEST.QUEUE_ID( 1 ),
- MPTEST.BUFFER_3,
- BROADCAST_COUNT,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_BROADCAST" );
-
- TEXT_IO.PUT_LINE( "Delaying for a second" );
- RTEMS.TASK_WAKE_AFTER(
- 1 * TEST_SUPPORT.TICKS_PER_SECOND,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- end SEND_MESSAGES;
-
---PAGE
---
--- RECEIVE_MESSAGES
---
-
- procedure RECEIVE_MESSAGES is
- INDEX : RTEMS.UNSIGNED32;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- for INDEX in 1 .. 3
- loop
-
- TEXT_IO.PUT_LINE( "Receiving message ..." );
- RTEMS.MESSAGE_QUEUE_RECEIVE(
- MPTEST.QUEUE_ID( 1 ),
- MPTEST.RECEIVE_BUFFER,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_RECEIVE" );
-
- TEXT_IO.PUT( "Received : " );
- MPTEST.PUT_BUFFER( MPTEST.RECEIVE_BUFFER_AREA );
- TEXT_IO.NEW_LINE;
-
- end loop;
-
- TEXT_IO.PUT_LINE( "Receiver delaying for a second" );
-
- RTEMS.TASK_WAKE_AFTER( 1 * TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- end RECEIVE_MESSAGES;
-
---PAGE
---
--- FILL_BUFFER
---
-
---
--- Depends on tricks to make the copy work.
---
-
- procedure FILL_BUFFER (
- SOURCE : in STRING;
- BUFFER : out RTEMS.BUFFER
- ) is
- SOURCE_BUFFER : RTEMS.BUFFER_POINTER;
- begin
-
- SOURCE_BUFFER := RTEMS.TO_BUFFER_POINTER(
- SOURCE( SOURCE'FIRST )'ADDRESS
- );
-
- BUFFER.FIELD1 := SOURCE_BUFFER.FIELD1;
- BUFFER.FIELD2 := SOURCE_BUFFER.FIELD2;
- BUFFER.FIELD3 := SOURCE_BUFFER.FIELD3;
- BUFFER.FIELD4 := SOURCE_BUFFER.FIELD4;
-
- end FILL_BUFFER;
-
---PAGE
---
--- PUT_BUFFER
---
-
---
--- Depends on tricks to make the output work.
---
-
- procedure PUT_BUFFER (
- BUFFER : in RTEMS.BUFFER
- ) is
- begin
-
- TEST_SUPPORT.PUT_NAME( BUFFER.FIELD1, FALSE );
- TEST_SUPPORT.PUT_NAME( BUFFER.FIELD2, FALSE );
- TEST_SUPPORT.PUT_NAME( BUFFER.FIELD3, FALSE );
- TEST_SUPPORT.PUT_NAME( BUFFER.FIELD4, FALSE );
-
- end PUT_BUFFER;
-
---PAGE
---
--- TEST_TASK
---
-
- procedure TEST_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- COUNT : RTEMS.UNSIGNED32;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.TASK_WAKE_AFTER( 1 * TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- TEXT_IO.PUT_LINE( "Getting QID of message queue" );
-
- loop
-
- RTEMS.MESSAGE_QUEUE_IDENT(
- MPTEST.QUEUE_NAME( 1 ),
- RTEMS.SEARCH_ALL_NODES,
- MPTEST.QUEUE_ID( 1 ),
- STATUS
- );
-
- exit when RTEMS.IS_STATUS_SUCCESSFUL( STATUS );
-
- end loop;
-
- if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 2 then
-
- RTEMS.MESSAGE_QUEUE_DELETE( MPTEST.QUEUE_ID( 1 ), STATUS );
-
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.ILLEGAL_ON_REMOTE_OBJECT,
- "MESSAGE_QUEUE_DELETE"
- );
-
- TEXT_IO.PUT_LINE(
- "message_queue_delete correctly returned ILLEGAL_ON_REMOTE_OBJECT"
- );
-
- MPTEST.SEND_MESSAGES;
-
- MPTEST.RECEIVE_MESSAGES;
-
- TEXT_IO.PUT_LINE( "Flushing remote empty queue" );
- RTEMS.MESSAGE_QUEUE_FLUSH( MPTEST.QUEUE_ID( 1 ), COUNT, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_FLUSH" );
- UNSIGNED32_IO.PUT( COUNT, WIDTH => 1 );
- TEXT_IO.PUT_LINE(
- " messages were flushed from remote empty queue"
- );
-
- TEXT_IO.PUT_LINE(
- "Send messages to be flushed from remote queue"
- );
- RTEMS.MESSAGE_QUEUE_SEND(
- MPTEST.QUEUE_ID( 1 ),
- MPTEST.BUFFER_1,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_SEND" );
-
- TEXT_IO.PUT_LINE( "Flushing remote queue" );
- RTEMS.MESSAGE_QUEUE_FLUSH( MPTEST.QUEUE_ID( 1 ), COUNT, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_FLUSH" );
- UNSIGNED32_IO.PUT( COUNT, WIDTH => 1 );
- TEXT_IO.PUT_LINE(
- " messages were flushed from the remote queue"
- );
-
- TEXT_IO.PUT_LINE( "Waiting for message queue to be deleted" );
- RTEMS.MESSAGE_QUEUE_RECEIVE(
- MPTEST.QUEUE_ID( 1 ),
- MPTEST.RECEIVE_BUFFER,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.OBJECT_WAS_DELETED,
- "MESSAGE_QUEUE_FLUSH"
- );
-
- else
-
- MPTEST.RECEIVE_MESSAGES;
-
- MPTEST.SEND_MESSAGES;
-
- RTEMS.TASK_WAKE_AFTER(
- 5 * TEST_SUPPORT.TICKS_PER_SECOND,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- RTEMS.MESSAGE_QUEUE_DELETE( MPTEST.QUEUE_ID( 1 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_DELETE" );
-
- end if;
-
- TEXT_IO.PUT_LINE( "*** END OF TEST 9 ***" );
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end TEST_TASK;
-
-end MPTEST;
diff --git a/c/src/ada-tests/mptests/mp09/mptest.ads b/c/src/ada-tests/mptests/mp09/mptest.ads
deleted file mode 100644
index b981b4664c..0000000000
--- a/c/src/ada-tests/mptests/mp09/mptest.ads
+++ /dev/null
@@ -1,254 +0,0 @@
---
--- MPTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 9 of the RTEMS
--- Multiprocessor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with BSP_MPCI;
-with RTEMS;
-
-package MPTEST is
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
- TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS message
--- queues created by this test.
---
-
- QUEUE_ID : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.ID;
- QUEUE_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.NAME;
-
---
--- The following are message buffers used to contain the test messages
--- and pointers to those buffers.
---
-
- RECEIVE_BUFFER_AREA : RTEMS.BUFFER;
- BUFFER_AREA_1 : RTEMS.BUFFER;
- BUFFER_AREA_2 : RTEMS.BUFFER;
- BUFFER_AREA_3 : RTEMS.BUFFER;
- BUFFER_AREA_4 : RTEMS.BUFFER;
-
- RECEIVE_BUFFER : RTEMS.BUFFER_POINTER;
- BUFFER_1 : RTEMS.BUFFER_POINTER;
- BUFFER_2 : RTEMS.BUFFER_POINTER;
- BUFFER_3 : RTEMS.BUFFER_POINTER;
- BUFFER_4 : RTEMS.BUFFER_POINTER;
-
---
--- This variable contains the ID of the remote task with which this
--- test interacts.
---
-
- REMOTE_TID : RTEMS.ID;
-
---
--- This variable contains the node on which the remote task with which
--- this test interacts resides.
---
-
- REMOTE_NODE : RTEMS.UNSIGNED32;
-
---
--- The number of events to process per dot printed out.
---
-
- PER_DOT : constant RTEMS.UNSIGNED32 := 100;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- SEND_MESSAGES
---
--- This subprogram prints and sends a sequence of three test messages.
--- One of the messages is sent, one is urgent, and one is broadcast.
--- A one second pause is between each the sending of each message.
---
-
- procedure SEND_MESSAGES;
-
---
--- RECEIVE_MESSAGES
---
--- This subprogram receives and prints a sequence of three test messages.
---
-
- procedure RECEIVE_MESSAGES;
-
---
--- FILL_BUFFER
---
--- DESCRIPTION:
---
--- This subprogram takes the SOURCE input string and places
--- up to the first sixteen characters of that string into
--- the message BUFFER.
---
-
- procedure FILL_BUFFER (
- SOURCE : in STRING;
- BUFFER : out RTEMS.BUFFER
- );
-
---
--- PUT_BUFFER
---
--- DESCRIPTION:
---
--- This subprogram prints the specified message BUFFER.
---
-
- procedure PUT_BUFFER (
- BUFFER : in RTEMS.BUFFER
- );
-
---
--- TEST_TASK
---
--- DESCRIPTION:
---
--- This is the body of the RTEMS tasks which constitute this test.
---
-
- procedure TEST_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- This is the Driver Address Table for this test.
---
-
- DEVICE_DRIVERS : aliased RTEMS.DRIVER_ADDRESS_TABLE( 1 .. 1 ) :=
- (1=>
- (
- CLOCK_DRIVER.INITIALIZE'ACCESS, -- Initialization
- RTEMS.NO_DRIVER_ENTRY, -- Open
- RTEMS.NO_DRIVER_ENTRY, -- Close
- RTEMS.NO_DRIVER_ENTRY, -- Read
- RTEMS.NO_DRIVER_ENTRY, -- Write
- RTEMS.NO_DRIVER_ENTRY -- Control
- )
- );
-
---
--- This is the Initialization Tasks Table for this test.
---
-
- INITIALIZATION_TASKS : aliased RTEMS.INITIALIZATION_TASKS_TABLE( 1 .. 1 ) :=
- (1=>
- (
- RTEMS.BUILD_NAME( 'U', 'I', '1', ' ' ), -- task name
- 2048, -- stack size
- 1, -- priority
- RTEMS.DEFAULT_ATTRIBUTES, -- attributes
- MPTEST.INIT'ACCESS, -- entry point
- RTEMS.NO_PREEMPT, -- initial mode
- 0 -- argument list
- )
- );
-
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
--- BEGIN SUBPACKAGE --
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-
- --
- -- MPTEST.PER_NODE_CONFIGURATION / SPECIFICATION
- --
- -- DESCRIPTION:
- --
- -- This package is the specification for the subpackage
- -- which will define the per node configuration parameters.
- --
-
- package PER_NODE_CONFIGURATION is
-
- --
- -- LOCAL_NODE_NUMBER
- --
- -- DESCRIPTION:
- --
- -- This function returns the node number for this node.
- --
-
- function LOCAL_NODE_NUMBER
- return RTEMS.UNSIGNED32;
-
- pragma INLINE ( LOCAL_NODE_NUMBER );
-
- end PER_NODE_CONFIGURATION;
-
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
--- END SUBPACKAGE --
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-
---
--- This is the Multiprocessor Configuration Table for this test.
---
-
- MULTIPROCESSING_CONFIGURATION : aliased RTEMS.MULTIPROCESSING_TABLE := (
- MPTEST.PER_NODE_CONFIGURATION.LOCAL_NODE_NUMBER,
- 2, -- maximum # nodes in system
- 32, -- maximum # global objects
- 32 -- maximum # proxies
- );
-
---
--- This is the Configuration Table for this test.
---
-
- CONFIGURATION : aliased RTEMS.CONFIGURATION_TABLE := (
- RTEMS.NULL_ADDRESS, -- will be replaced by BSP
- 64 * 1024, -- executive RAM size
- 10, -- maximum # tasks
- 0, -- maximum # timers
- 0, -- maximum # semaphores
- 1, -- maximum # message queues
- 1, -- maximum # messages
- 0, -- maximum # partitions
- 0, -- maximum # regions
- 0, -- maximum # dp memory areas
- 0, -- maximum # periods
- 0, -- maximum # user extensions
- RTEMS.MILLISECONDS_TO_MICROSECONDS(10), -- # us in a tick
- 50 -- # ticks in a timeslice
- );
-
-end MPTEST;
diff --git a/c/src/ada-tests/mptests/mp09/node1/mp09.scn b/c/src/ada-tests/mptests/mp09/node1/mp09.scn
deleted file mode 100644
index 167d6e18a5..0000000000
--- a/c/src/ada-tests/mptests/mp09/node1/mp09.scn
+++ /dev/null
@@ -1,20 +0,0 @@
-*** TEST 9 -- NODE 1 ***
-Creating Message Queue (Global)
-Creating Test_task (local)
-Starting Test_task (local)
-Deleting initialization task
-Getting QID of message queue
-Receiving message ...
-Received : 123456789012345
-Receiving message ...
-Received : abcdefghijklmno
-Receiving message ...
-Received : ABCDEFGHIJKLMNO
-Receiver delaying for a second
-message_queue_send : 123456789012345
-Delaying for a second
-message_queue_urgent : abcdefghijklmno
-Delaying for a second
-message_queue_broadcast : ABCDEFGHIJKLMNO
-Delaying for a second
-*** END OF TEST 9 ***
diff --git a/c/src/ada-tests/mptests/mp09/node1/mptest-per_node_configuration.adb b/c/src/ada-tests/mptests/mp09/node1/mptest-per_node_configuration.adb
deleted file mode 100644
index 7df5087537..0000000000
--- a/c/src/ada-tests/mptests/mp09/node1/mptest-per_node_configuration.adb
+++ /dev/null
@@ -1,43 +0,0 @@
---
--- MPTEST.PER_NODE_CONFIGURATION / BODY
---
--- DESCRIPTION:
---
--- This package is the specification for the subpackage
--- which will define the per node configuration parameters.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-separate ( MPTEST )
-
-package body PER_NODE_CONFIGURATION is
-
---PAGE
---
--- LOCAL_NODE_NUMBER
---
-
- function LOCAL_NODE_NUMBER
- return RTEMS.UNSIGNED32 is
- begin
-
- return 1;
-
- end LOCAL_NODE_NUMBER;
-
-end PER_NODE_CONFIGURATION;
diff --git a/c/src/ada-tests/mptests/mp09/node2/mp09.scn b/c/src/ada-tests/mptests/mp09/node2/mp09.scn
deleted file mode 100644
index 4cd8a7bff7..0000000000
--- a/c/src/ada-tests/mptests/mp09/node2/mp09.scn
+++ /dev/null
@@ -1,26 +0,0 @@
-*** TEST 9 -- NODE 2 ***
-Creating Test_task (local)
-Starting Test_task (local)
-Deleting initialization task
-Getting QID of message queue
-message_queue_delete correctly returned ILLEGAL_ON_REMOTE_OBJECT
-message_queue_send : 123456789012345
-Delaying for a second
-message_queue_urgent : abcdefghijklmno
-Delaying for a second
-message_queue_broadcast : ABCDEFGHIJKLMNO
-Delaying for a second
-Receiving message ...
-Received : 123456789012345
-Receiving message ...
-Received : abcdefghijklmno
-Receiving message ...
-Received : ABCDEFGHIJKLMNO
-Receiver delaying for a second
-Flushing remote empty queue
-0 messages were flushed from remote empty queue
-Send messages to be flushed from remote queue
-Flushing remote queue
-1 messages were flushed from the remote queue
-Waiting for message queue to be deleted
-*** END OF TEST 9 ***
diff --git a/c/src/ada-tests/mptests/mp09/node2/mptest-per_node_configuration.adb b/c/src/ada-tests/mptests/mp09/node2/mptest-per_node_configuration.adb
deleted file mode 100644
index e127cc5573..0000000000
--- a/c/src/ada-tests/mptests/mp09/node2/mptest-per_node_configuration.adb
+++ /dev/null
@@ -1,43 +0,0 @@
---
--- MPTEST.PER_NODE_CONFIGURATION / BODY
---
--- DESCRIPTION:
---
--- This package is the specification for the subpackage
--- which will define the per node configuration parameters.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-separate ( MPTEST )
-
-package body PER_NODE_CONFIGURATION is
-
---PAGE
---
--- LOCAL_NODE_NUMBER
---
-
- function LOCAL_NODE_NUMBER
- return RTEMS.UNSIGNED32 is
- begin
-
- return 2;
-
- end LOCAL_NODE_NUMBER;
-
-end PER_NODE_CONFIGURATION;
diff --git a/c/src/ada-tests/mptests/mp10/mptest.adb b/c/src/ada-tests/mptests/mp10/mptest.adb
deleted file mode 100644
index 011d1f83e7..0000000000
--- a/c/src/ada-tests/mptests/mp10/mptest.adb
+++ /dev/null
@@ -1,301 +0,0 @@
---
--- MPTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation for Test 10 of the RTEMS
--- Multiprocessor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with TEST_SUPPORT;
-with TEXT_IO;
-with UNSIGNED32_IO;
-
-package body MPTEST is
-
- package body PER_NODE_CONFIGURATION is separate;
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT( "*** TEST 10 -- NODE " );
- UNSIGNED32_IO.PUT(
- MPTEST.MULTIPROCESSING_CONFIGURATION.NODE,
- WIDTH => 1
- );
- TEXT_IO.PUT_LINE( " ***" );
-
-
- MPTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME( 'T', 'A', '1', ' ' );
- MPTEST.TASK_NAME( 2 ) := RTEMS.BUILD_NAME( 'T', 'A', '2', ' ' );
- MPTEST.TASK_NAME( 3 ) := RTEMS.BUILD_NAME( 'S', 'A', '3', ' ' );
-
- MPTEST.QUEUE_NAME( 1 ) := RTEMS.BUILD_NAME( 'M', 'S', 'G', ' ' );
-
- MPTEST.SEMAPHORE_NAME( 1 ) := RTEMS.BUILD_NAME( 'S', 'E', 'M', ' ' );
-
- if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then
-
- TEXT_IO.PUT_LINE( "Creating Message Queue (Global)" );
- RTEMS.MESSAGE_QUEUE_CREATE(
- MPTEST.QUEUE_NAME( 1 ),
- 3,
- RTEMS.GLOBAL + RTEMS.LIMIT,
- MPTEST.QUEUE_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_CREATE" );
-
- TEXT_IO.PUT_LINE( "Creating Semaphore (Global)" );
- RTEMS.SEMAPHORE_CREATE(
- MPTEST.SEMAPHORE_NAME( 1 ),
- 0,
- RTEMS.GLOBAL + RTEMS.PRIORITY,
- MPTEST.SEMAPHORE_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_CREATE" );
-
- RTEMS.TASK_WAKE_AFTER( 10 * TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- else
-
- TEXT_IO.PUT_LINE( "Creating Test_task 1 (local)" );
- RTEMS.TASK_CREATE(
- MPTEST.TASK_NAME( 1 ),
- 1,
- 2048,
- RTEMS.TIMESLICE,
- RTEMS.DEFAULT_ATTRIBUTES,
- MPTEST.TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE" );
-
- TEXT_IO.PUT_LINE( "Starting Test_task 1 (local)" );
- RTEMS.TASK_START(
- MPTEST.TASK_ID( 1 ),
- MPTEST.TEST_TASK_1'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START" );
-
- TEXT_IO.PUT_LINE( "Creating Test_task 2 (local)" );
- RTEMS.TASK_CREATE(
- MPTEST.TASK_NAME( 2 ),
- 1,
- 2048,
- RTEMS.TIMESLICE,
- RTEMS.DEFAULT_ATTRIBUTES,
- MPTEST.TASK_ID( 2 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE" );
-
- TEXT_IO.PUT_LINE( "Starting Test_task 2 (local)" );
- RTEMS.TASK_START(
- MPTEST.TASK_ID( 2 ),
- MPTEST.TEST_TASK_2'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START" );
-
- TEXT_IO.PUT_LINE( "Creating Test_task 3 (local)" );
- RTEMS.TASK_CREATE(
- MPTEST.TASK_NAME( 3 ),
- 1,
- 2048,
- RTEMS.TIMESLICE,
- RTEMS.DEFAULT_ATTRIBUTES,
- MPTEST.TASK_ID( 3 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE" );
-
- TEXT_IO.PUT_LINE( "Starting Test_task 3 (local)" );
- RTEMS.TASK_START(
- MPTEST.TASK_ID( 3 ),
- MPTEST.TEST_TASK_3'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START" );
-
- TEXT_IO.PUT_LINE( "Sleeping for 1 second ..." );
- RTEMS.TASK_WAKE_AFTER( TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- TEXT_IO.PUT_LINE( "Deleting Test_task 2" );
- RTEMS.TASK_DELETE( MPTEST.TASK_ID( 2 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF 2" );
-
- TEXT_IO.PUT_LINE( "Deleting Test_task 1" );
- RTEMS.TASK_DELETE( MPTEST.TASK_ID( 1 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF 1" );
-
- TEXT_IO.PUT_LINE( "Restarting Test_task 3" );
- RTEMS.TASK_RESTART( MPTEST.TASK_ID( 3 ), 1, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_RESTART OF 3" );
-
- end if;
-
- TEXT_IO.PUT_LINE( "*** END OF TEST 10 ***" );
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end INIT;
-
---PAGE
---
--- TEST_TASK_1
---
-
- procedure TEST_TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- COUNT : RTEMS.UNSIGNED32;
- RECEIVE_BUFFER_AREA : RTEMS.BUFFER;
- RECEIVE_BUFFER : RTEMS.BUFFER_POINTER;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RECEIVE_BUFFER :=
- RTEMS.TO_BUFFER_POINTER( RECEIVE_BUFFER_AREA'ADDRESS );
-
- TEXT_IO.PUT_LINE( "Getting QID of message queue" );
-
- loop
-
- RTEMS.MESSAGE_QUEUE_IDENT(
- MPTEST.QUEUE_NAME( 1 ),
- RTEMS.SEARCH_ALL_NODES,
- MPTEST.QUEUE_ID( 1 ),
- STATUS
- );
-
- exit when RTEMS.IS_STATUS_SUCCESSFUL( STATUS );
-
- end loop;
-
- TEXT_IO.PUT_LINE( "Attempting to receive message ..." );
- RTEMS.MESSAGE_QUEUE_RECEIVE(
- MPTEST.QUEUE_ID( 1 ),
- RECEIVE_BUFFER,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_RECEIVE" );
-
- end TEST_TASK_1;
-
---PAGE
---
--- TEST_TASK_2
---
-
- procedure TEST_TASK_2 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.PUT_LINE( "Getting SMID of semaphore" );
-
- loop
-
- RTEMS.SEMAPHORE_IDENT(
- MPTEST.SEMAPHORE_NAME( 1 ),
- RTEMS.SEARCH_ALL_NODES,
- MPTEST.SEMAPHORE_ID( 1 ),
- STATUS
- );
-
- exit when RTEMS.IS_STATUS_SUCCESSFUL( STATUS );
-
- end loop;
-
- TEXT_IO.PUT_LINE( "Attempting to acquire semaphore ..." );
- RTEMS.SEMAPHORE_OBTAIN(
- MPTEST.SEMAPHORE_ID( 1 ),
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_OBTAIN" );
-
- end TEST_TASK_2;
-
---PAGE
---
--- TEST_TASK_3
---
-
- procedure TEST_TASK_3 (
- RESTART : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- if RESTART = 1 then
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE" );
-
- end if;
-
- TEXT_IO.PUT_LINE( "Getting SMID of semaphore" );
-
- loop
-
- RTEMS.SEMAPHORE_IDENT(
- MPTEST.SEMAPHORE_NAME( 1 ),
- RTEMS.SEARCH_ALL_NODES,
- MPTEST.SEMAPHORE_ID( 1 ),
- STATUS
- );
-
- exit when RTEMS.IS_STATUS_SUCCESSFUL( STATUS );
-
- end loop;
-
- TEXT_IO.PUT_LINE( "Attempting to acquire semaphore ..." );
- RTEMS.SEMAPHORE_OBTAIN(
- MPTEST.SEMAPHORE_ID( 1 ),
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_OBTAIN" );
-
- end TEST_TASK_3;
-
-end MPTEST;
diff --git a/c/src/ada-tests/mptests/mp10/mptest.ads b/c/src/ada-tests/mptests/mp10/mptest.ads
deleted file mode 100644
index a574adf43f..0000000000
--- a/c/src/ada-tests/mptests/mp10/mptest.ads
+++ /dev/null
@@ -1,224 +0,0 @@
---
--- MPTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 10 of the RTEMS
--- Multiprocessor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with BSP_MPCI;
-with RTEMS;
-
-package MPTEST is
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
- TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS message
--- queues created by this test.
---
-
- QUEUE_ID : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.ID;
- QUEUE_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.NAME;
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS semaphore
--- created by this test.
---
-
- SEMAPHORE_ID : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.ID;
- SEMAPHORE_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.NAME;
-
---
--- This variable contains the ID of the remote task with which this
--- test interacts.
---
-
- REMOTE_TID : RTEMS.ID;
-
---
--- This variable contains the node on which the remote task with which
--- this test interacts resides.
---
-
- REMOTE_NODE : RTEMS.UNSIGNED32;
-
---
--- The number of events to process per dot printed out.
---
-
- PER_DOT : constant RTEMS.UNSIGNED32 := 100;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TEST_TASK_1
---
--- DESCRIPTION:
---
--- This is the body of one of the RTEMS tasks which constitute this test.
---
-
- procedure TEST_TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TEST_TASK_2
---
--- DESCRIPTION:
---
--- This is the body of one of the RTEMS tasks which constitute this test.
---
-
- procedure TEST_TASK_2 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TEST_TASK_3
---
--- DESCRIPTION:
---
--- This is the body of one of the RTEMS tasks which constitute this test.
---
-
- procedure TEST_TASK_3 (
- RESTART : in RTEMS.TASK_ARGUMENT
- );
-
---
--- This is the Driver Address Table for this test.
---
-
- DEVICE_DRIVERS : aliased RTEMS.DRIVER_ADDRESS_TABLE( 1 .. 1 ) :=
- (1=>
- (
- CLOCK_DRIVER.INITIALIZE'ACCESS, -- Initialization
- RTEMS.NO_DRIVER_ENTRY, -- Open
- RTEMS.NO_DRIVER_ENTRY, -- Close
- RTEMS.NO_DRIVER_ENTRY, -- Read
- RTEMS.NO_DRIVER_ENTRY, -- Write
- RTEMS.NO_DRIVER_ENTRY -- Control
- )
- );
-
---
--- This is the Initialization Tasks Table for this test.
---
-
- INITIALIZATION_TASKS : aliased RTEMS.INITIALIZATION_TASKS_TABLE( 1 .. 1 ) :=
- (1=>
- (
- RTEMS.BUILD_NAME( 'U', 'I', '1', ' ' ), -- task name
- 2048, -- stack size
- 1, -- priority
- RTEMS.DEFAULT_ATTRIBUTES, -- attributes
- MPTEST.INIT'ACCESS, -- entry point
- RTEMS.NO_PREEMPT, -- initial mode
- 0 -- argument list
- )
- );
-
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
--- BEGIN SUBPACKAGE --
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-
- --
- -- MPTEST.PER_NODE_CONFIGURATION / SPECIFICATION
- --
- -- DESCRIPTION:
- --
- -- This package is the specification for the subpackage
- -- which will define the per node configuration parameters.
- --
-
- package PER_NODE_CONFIGURATION is
-
- --
- -- LOCAL_NODE_NUMBER
- --
- -- DESCRIPTION:
- --
- -- This function returns the node number for this node.
- --
-
- function LOCAL_NODE_NUMBER
- return RTEMS.UNSIGNED32;
-
- pragma INLINE ( LOCAL_NODE_NUMBER );
-
- end PER_NODE_CONFIGURATION;
-
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
--- END SUBPACKAGE --
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-
---
--- This is the Multiprocessor Configuration Table for this test.
---
-
- MULTIPROCESSING_CONFIGURATION : aliased RTEMS.MULTIPROCESSING_TABLE := (
- MPTEST.PER_NODE_CONFIGURATION.LOCAL_NODE_NUMBER,
- 2, -- maximum # nodes in system
- 32, -- maximum # global objects
- 32 -- maximum # proxies
- );
-
---
--- This is the Configuration Table for this test.
---
-
- CONFIGURATION : aliased RTEMS.CONFIGURATION_TABLE := (
- RTEMS.NULL_ADDRESS, -- will be replaced by BSP
- 64 * 1024, -- executive RAM size
- 10, -- maximum # tasks
- 0, -- maximum # timers
- 1, -- maximum # semaphores
- 1, -- maximum # message queues
- 0, -- maximum # messages
- 0, -- maximum # partitions
- 0, -- maximum # regions
- 0, -- maximum # dp memory areas
- 0, -- maximum # periods
- 0, -- maximum # user extensions
- RTEMS.MILLISECONDS_TO_MICROSECONDS(10), -- # us in a tick
- 50 -- # ticks in a timeslice
- );
-
-end MPTEST;
diff --git a/c/src/ada-tests/mptests/mp10/node1/mp10.scn b/c/src/ada-tests/mptests/mp10/node1/mp10.scn
deleted file mode 100644
index deeafc0a9a..0000000000
--- a/c/src/ada-tests/mptests/mp10/node1/mp10.scn
+++ /dev/null
@@ -1,4 +0,0 @@
-*** TEST 10 -- NODE 1 ***
-Creating Message Queue (Global)
-Creating Semaphore (Global)
-*** END OF TEST 10 ***
diff --git a/c/src/ada-tests/mptests/mp10/node1/mptest-per_node_configuration.adb b/c/src/ada-tests/mptests/mp10/node1/mptest-per_node_configuration.adb
deleted file mode 100644
index 7df5087537..0000000000
--- a/c/src/ada-tests/mptests/mp10/node1/mptest-per_node_configuration.adb
+++ /dev/null
@@ -1,43 +0,0 @@
---
--- MPTEST.PER_NODE_CONFIGURATION / BODY
---
--- DESCRIPTION:
---
--- This package is the specification for the subpackage
--- which will define the per node configuration parameters.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-separate ( MPTEST )
-
-package body PER_NODE_CONFIGURATION is
-
---PAGE
---
--- LOCAL_NODE_NUMBER
---
-
- function LOCAL_NODE_NUMBER
- return RTEMS.UNSIGNED32 is
- begin
-
- return 1;
-
- end LOCAL_NODE_NUMBER;
-
-end PER_NODE_CONFIGURATION;
diff --git a/c/src/ada-tests/mptests/mp10/node2/mp10.scn b/c/src/ada-tests/mptests/mp10/node2/mp10.scn
deleted file mode 100644
index c0337fdacf..0000000000
--- a/c/src/ada-tests/mptests/mp10/node2/mp10.scn
+++ /dev/null
@@ -1,18 +0,0 @@
-*** TEST 10 -- NODE 2 ***
-Creating Test_task 1 (local)
-Starting Test_task 1 (local)
-Creating Test_task 2 (local)
-Starting Test_task 2 (local)
-Creating Test_task 3 (local)
-Starting Test_task 3 (local)
-Sleeping for 1 second ...
-Getting QID of message queue
-Attempting to receive message ...
-Getting SMID of semaphore
-Attempting to acquire semaphore ...
-Getting SMID of semaphore
-Attempting to acquire semaphore ...
-Deleting Test_task 2
-Deleting Test_task 1
-Restarting Test_task 3
-*** END OF TEST 10 ***
diff --git a/c/src/ada-tests/mptests/mp10/node2/mptest-per_node_configuration.adb b/c/src/ada-tests/mptests/mp10/node2/mptest-per_node_configuration.adb
deleted file mode 100644
index e127cc5573..0000000000
--- a/c/src/ada-tests/mptests/mp10/node2/mptest-per_node_configuration.adb
+++ /dev/null
@@ -1,43 +0,0 @@
---
--- MPTEST.PER_NODE_CONFIGURATION / BODY
---
--- DESCRIPTION:
---
--- This package is the specification for the subpackage
--- which will define the per node configuration parameters.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-separate ( MPTEST )
-
-package body PER_NODE_CONFIGURATION is
-
---PAGE
---
--- LOCAL_NODE_NUMBER
---
-
- function LOCAL_NODE_NUMBER
- return RTEMS.UNSIGNED32 is
- begin
-
- return 2;
-
- end LOCAL_NODE_NUMBER;
-
-end PER_NODE_CONFIGURATION;
diff --git a/c/src/ada-tests/mptests/mp11/mptest.adb b/c/src/ada-tests/mptests/mp11/mptest.adb
deleted file mode 100644
index c94ca43eaa..0000000000
--- a/c/src/ada-tests/mptests/mp11/mptest.adb
+++ /dev/null
@@ -1,138 +0,0 @@
---
--- MPTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation for Test 11 of the RTEMS
--- Multiprocessor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with TEST_SUPPORT;
-with TEXT_IO;
-with UNSIGNED32_IO;
-
-package body MPTEST is
-
- package body PER_NODE_CONFIGURATION is separate;
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT( "*** TEST 11 -- NODE " );
- UNSIGNED32_IO.PUT(
- MPTEST.MULTIPROCESSING_CONFIGURATION.NODE,
- WIDTH => 1
- );
- TEXT_IO.PUT_LINE( " ***" );
-
- MPTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME( '1', '1', '1', ' ' );
- MPTEST.TASK_NAME( 2 ) := RTEMS.BUILD_NAME( '2', '2', '2', ' ' );
-
- MPTEST.QUEUE_NAME( 1 ) := RTEMS.BUILD_NAME( 'M', 'S', 'G', ' ' );
-
- MPTEST.SEMAPHORE_NAME( 1 ) := RTEMS.BUILD_NAME( 'S', 'E', 'M', ' ' );
-
- MPTEST.PARTITION_NAME( 1 ) := RTEMS.BUILD_NAME( 'P', 'A', 'R', ' ' );
-
- if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then
-
- TEXT_IO.PUT_LINE( "Attempting to create Test_task (Global)" );
- RTEMS.TASK_CREATE(
- MPTEST.TASK_NAME( 1 ),
- 1,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.GLOBAL,
- MPTEST.TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.TOO_MANY,
- "TASK_CREATE"
- );
- TEXT_IO.PUT_LINE( "task_create correctly returned TOO_MANY" );
-
- TEXT_IO.PUT_LINE( "Attempting to create Message Queue (Global)" );
- RTEMS.MESSAGE_QUEUE_CREATE(
- MPTEST.QUEUE_NAME( 1 ),
- 3,
- RTEMS.GLOBAL + RTEMS.LIMIT,
- MPTEST.QUEUE_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.TOO_MANY,
- "MESSAGE_QUEUE_CREATE"
- );
- TEXT_IO.PUT_LINE(
- "message_queue_create correctly returned TOO_MANY"
- );
-
- TEXT_IO.PUT_LINE( "Creating Semaphore (Global)" );
- RTEMS.SEMAPHORE_CREATE(
- MPTEST.SEMAPHORE_NAME( 1 ),
- 1,
- RTEMS.GLOBAL,
- MPTEST.SEMAPHORE_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.TOO_MANY,
- "SEMAPHORE_CREATE"
- );
- TEXT_IO.PUT_LINE( "semaphore_create correctly returned TOO_MANY" );
-
- TEXT_IO.PUT_LINE( "Creating Partition (Global)" );
- RTEMS.PARTITION_CREATE(
- MPTEST.PARTITION_NAME( 1 ),
- MPTEST.PARTITION_AREA( 0 )'ADDRESS,
- 128,
- 64,
- RTEMS.GLOBAL,
- MPTEST.PARTITION_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.TOO_MANY,
- "PARTITION_CREATE"
- );
- TEXT_IO.PUT_LINE( "partition_create correctly returned TOO_MANY" );
-
- end if;
-
- TEXT_IO.PUT_LINE( "*** END OF TEST 11 ***" );
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end INIT;
-
-end MPTEST;
diff --git a/c/src/ada-tests/mptests/mp11/mptest.ads b/c/src/ada-tests/mptests/mp11/mptest.ads
deleted file mode 100644
index 6d54d45084..0000000000
--- a/c/src/ada-tests/mptests/mp11/mptest.ads
+++ /dev/null
@@ -1,184 +0,0 @@
---
--- MPTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 11 of the RTEMS
--- Multiprocessor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with BSP_MPCI;
-with RTEMS;
-
-package MPTEST is
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
- TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS message
--- queues created by this test.
---
-
- QUEUE_ID : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.ID;
- QUEUE_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.NAME;
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS semaphore
--- created by this test.
---
-
- SEMAPHORE_ID : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.ID;
- SEMAPHORE_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.NAME;
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS partition
--- created by this test.
---
-
- PARTITION_ID : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.ID;
- PARTITION_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.NAME;
-
---
--- This is the area used for the partition.
---
-
- PARTITION_AREA :
- array ( RTEMS.UNSIGNED32 range 0 .. 1023 ) of RTEMS.UNSIGNED8;
- for PARTITION_AREA'ALIGNMENT use RTEMS.STRUCTURE_ALIGNMENT;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- This is the Driver Address Table for this test.
---
-
- DEVICE_DRIVERS : aliased RTEMS.DRIVER_ADDRESS_TABLE( 1 .. 1 ) :=
- (1=>
- (
- CLOCK_DRIVER.INITIALIZE'ACCESS, -- Initialization
- RTEMS.NO_DRIVER_ENTRY, -- Open
- RTEMS.NO_DRIVER_ENTRY, -- Close
- RTEMS.NO_DRIVER_ENTRY, -- Read
- RTEMS.NO_DRIVER_ENTRY, -- Write
- RTEMS.NO_DRIVER_ENTRY -- Control
- )
- );
-
---
--- This is the Initialization Tasks Table for this test.
---
-
- INITIALIZATION_TASKS : aliased RTEMS.INITIALIZATION_TASKS_TABLE( 1 .. 1 ) :=
- (1=>
- (
- RTEMS.BUILD_NAME( 'U', 'I', '1', ' ' ), -- task name
- 2048, -- stack size
- 1, -- priority
- RTEMS.DEFAULT_ATTRIBUTES, -- attributes
- MPTEST.INIT'ACCESS, -- entry point
- RTEMS.NO_PREEMPT, -- initial mode
- 0 -- argument list
- )
- );
-
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
--- BEGIN SUBPACKAGE --
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-
- --
- -- MPTEST.PER_NODE_CONFIGURATION / SPECIFICATION
- --
- -- DESCRIPTION:
- --
- -- This package is the specification for the subpackage
- -- which will define the per node configuration parameters.
- --
-
- package PER_NODE_CONFIGURATION is
-
- --
- -- LOCAL_NODE_NUMBER
- --
- -- DESCRIPTION:
- --
- -- This function returns the node number for this node.
- --
-
- function LOCAL_NODE_NUMBER
- return RTEMS.UNSIGNED32;
-
- pragma INLINE ( LOCAL_NODE_NUMBER );
-
- end PER_NODE_CONFIGURATION;
-
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
--- END SUBPACKAGE --
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-
---
--- This is the Multiprocessor Configuration Table for this test.
---
-
- MULTIPROCESSING_CONFIGURATION : aliased RTEMS.MULTIPROCESSING_TABLE := (
- MPTEST.PER_NODE_CONFIGURATION.LOCAL_NODE_NUMBER,
- 2, -- maximum # nodes in system
- 0, -- maximum # global objects
- 0 -- maximum # proxies
- );
-
---
--- This is the Configuration Table for this test.
---
-
- CONFIGURATION : aliased RTEMS.CONFIGURATION_TABLE := (
- RTEMS.NULL_ADDRESS, -- will be replaced by BSP
- 64 * 1024, -- executive RAM size
- 10, -- maximum # tasks
- 0, -- maximum # timers
- 1, -- maximum # semaphores
- 1, -- maximum # message queues
- 0, -- maximum # messages
- 1, -- maximum # partitions
- 0, -- maximum # regions
- 0, -- maximum # dp memory areas
- 0, -- maximum # periods
- 0, -- maximum # user extensions
- RTEMS.MILLISECONDS_TO_MICROSECONDS(10), -- # us in a tick
- 50 -- # ticks in a timeslice
- );
-
-end MPTEST;
diff --git a/c/src/ada-tests/mptests/mp11/node1/mp11.scn b/c/src/ada-tests/mptests/mp11/node1/mp11.scn
deleted file mode 100644
index 013426bf91..0000000000
--- a/c/src/ada-tests/mptests/mp11/node1/mp11.scn
+++ /dev/null
@@ -1,10 +0,0 @@
-*** TEST 11 -- NODE 1 ***
-Attempting to create Test_task (Global)
-task_create correctly returned TOO_MANY
-Attempting to create Message Queue (Global)
-message_queue_create correctly returned TOO_MANY
-Creating Semaphore (Global)
-semaphore_create correctly returned TOO_MANY
-Creating Partition (Global)
-partition_create correctly returned TOO_MANY
-*** END OF TEST 11 ***
diff --git a/c/src/ada-tests/mptests/mp11/node1/mptest-per_node_configuration.adb b/c/src/ada-tests/mptests/mp11/node1/mptest-per_node_configuration.adb
deleted file mode 100644
index 7df5087537..0000000000
--- a/c/src/ada-tests/mptests/mp11/node1/mptest-per_node_configuration.adb
+++ /dev/null
@@ -1,43 +0,0 @@
---
--- MPTEST.PER_NODE_CONFIGURATION / BODY
---
--- DESCRIPTION:
---
--- This package is the specification for the subpackage
--- which will define the per node configuration parameters.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-separate ( MPTEST )
-
-package body PER_NODE_CONFIGURATION is
-
---PAGE
---
--- LOCAL_NODE_NUMBER
---
-
- function LOCAL_NODE_NUMBER
- return RTEMS.UNSIGNED32 is
- begin
-
- return 1;
-
- end LOCAL_NODE_NUMBER;
-
-end PER_NODE_CONFIGURATION;
diff --git a/c/src/ada-tests/mptests/mp11/node2/mp11.scn b/c/src/ada-tests/mptests/mp11/node2/mp11.scn
deleted file mode 100644
index 49bd8a3219..0000000000
--- a/c/src/ada-tests/mptests/mp11/node2/mp11.scn
+++ /dev/null
@@ -1,2 +0,0 @@
-*** TEST 11 -- NODE 2 ***
-*** END OF TEST 11 ***
diff --git a/c/src/ada-tests/mptests/mp11/node2/mptest-per_node_configuration.adb b/c/src/ada-tests/mptests/mp11/node2/mptest-per_node_configuration.adb
deleted file mode 100644
index e127cc5573..0000000000
--- a/c/src/ada-tests/mptests/mp11/node2/mptest-per_node_configuration.adb
+++ /dev/null
@@ -1,43 +0,0 @@
---
--- MPTEST.PER_NODE_CONFIGURATION / BODY
---
--- DESCRIPTION:
---
--- This package is the specification for the subpackage
--- which will define the per node configuration parameters.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-separate ( MPTEST )
-
-package body PER_NODE_CONFIGURATION is
-
---PAGE
---
--- LOCAL_NODE_NUMBER
---
-
- function LOCAL_NODE_NUMBER
- return RTEMS.UNSIGNED32 is
- begin
-
- return 2;
-
- end LOCAL_NODE_NUMBER;
-
-end PER_NODE_CONFIGURATION;
diff --git a/c/src/ada-tests/mptests/mp12/mptest.adb b/c/src/ada-tests/mptests/mp12/mptest.adb
deleted file mode 100644
index e99006ec72..0000000000
--- a/c/src/ada-tests/mptests/mp12/mptest.adb
+++ /dev/null
@@ -1,152 +0,0 @@
---
--- MPTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation for Test 12 of the RTEMS
--- Multiprocessor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with TEST_SUPPORT;
-with TEXT_IO;
-with UNSIGNED32_IO;
-
-package body MPTEST is
-
- package body PER_NODE_CONFIGURATION is separate;
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- BUFFER_ADDRESS : RTEMS.ADDRESS;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT( "*** TEST 12 -- NODE " );
- UNSIGNED32_IO.PUT(
- MPTEST.MULTIPROCESSING_CONFIGURATION.NODE,
- WIDTH => 1
- );
- TEXT_IO.PUT_LINE( " ***" );
-
- MPTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME( '1', '1', '1', ' ' );
- MPTEST.TASK_NAME( 2 ) := RTEMS.BUILD_NAME( '2', '2', '2', ' ' );
-
- MPTEST.PARTITION_NAME( 1 ) := RTEMS.BUILD_NAME( 'P', 'A', 'R', ' ' );
-
- TEXT_IO.PUT_LINE( "Got to the initialization task" );
-
- if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 2 then
-
- RTEMS.TASK_WAKE_AFTER( 1 * TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- TEXT_IO.PUT_LINE( "Getting ID of remote Partition (Global)" );
-
- loop
-
- RTEMS.PARTITION_IDENT(
- MPTEST.PARTITION_NAME( 1 ),
- RTEMS.SEARCH_ALL_NODES,
- MPTEST.PARTITION_ID( 1 ),
- STATUS
- );
-
- exit when RTEMS.IS_STATUS_SUCCESSFUL( STATUS );
-
- end loop;
-
- TEXT_IO.PUT_LINE(
- "Attempting to delete remote Partition (Global)"
- );
-
- RTEMS.PARTITION_DELETE( MPTEST.PARTITION_ID( 1 ), STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.ILLEGAL_ON_REMOTE_OBJECT,
- "PARTITION_DELETE"
- );
-
- TEXT_IO.PUT_LINE(
- "partition_delete correctly returned ILLEGAL_ON_REMOTE_OBJECT!!"
- );
-
- TEXT_IO.PUT_LINE( "Obtaining a buffer from the global partition" );
-
- RTEMS.PARTITION_GET_BUFFER(
- MPTEST.PARTITION_ID( 1 ),
- BUFFER_ADDRESS,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "PARTITION_GET_BUFFER" );
- TEXT_IO.PUT( "Address returned was : " );
- UNSIGNED32_IO.PUT(
- RTEMS.SUBTRACT( BUFFER_ADDRESS, RTEMS.NULL_ADDRESS ),
- WIDTH => 8,
- BASE => 16
- );
- TEXT_IO.NEW_LINE;
-
- RTEMS.PARTITION_RETURN_BUFFER(
- MPTEST.PARTITION_ID( 1 ),
- BUFFER_ADDRESS,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "PARTITION_RETURN_BUFFER" );
-
- RTEMS.TASK_WAKE_AFTER( 2 * TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- else
-
- TEXT_IO.PUT_LINE( "Creating Partition (Global)" );
- RTEMS.PARTITION_CREATE(
- MPTEST.PARTITION_NAME( 1 ),
- MPTEST.PARTITION_AREA( 0 )'ADDRESS,
- 128,
- 64,
- RTEMS.GLOBAL,
- MPTEST.PARTITION_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "PARTITION_CREATE" );
-
- TEXT_IO.PUT_LINE( "Sleeping for three seconds" );
- RTEMS.TASK_WAKE_AFTER( 3 * TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- TEXT_IO.PUT_LINE( "Deleting Partition (Global)" );
- RTEMS.PARTITION_DELETE( MPTEST.PARTITION_ID( 1 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "PARTITION_DELETE" );
-
- end if;
-
- TEXT_IO.PUT_LINE( "*** END OF TEST 12 ***" );
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end INIT;
-
-end MPTEST;
diff --git a/c/src/ada-tests/mptests/mp12/mptest.ads b/c/src/ada-tests/mptests/mp12/mptest.ads
deleted file mode 100644
index bc6b0d8827..0000000000
--- a/c/src/ada-tests/mptests/mp12/mptest.ads
+++ /dev/null
@@ -1,182 +0,0 @@
---
--- MPTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 12 of the RTEMS
--- Multiprocessor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with BSP_MPCI;
-with RTEMS;
-
-package MPTEST is
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
- TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS semaphore
--- created by this test.
---
-
- PARTITION_ID : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.ID;
- PARTITION_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.NAME;
-
---
--- This variable contains the ID of the remote task with which this
--- test interacts.
---
-
- REMOTE_TID : RTEMS.ID;
-
---
--- This variable contains the node on which the remote task with which
--- this test interacts resides.
---
-
- REMOTE_NODE : RTEMS.UNSIGNED32;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- This is the area used for the partition.
---
-
- PARTITION_AREA :
- array ( RTEMS.UNSIGNED32 range 0 .. 1023 ) of RTEMS.UNSIGNED8;
- for PARTITION_AREA'ALIGNMENT use RTEMS.STRUCTURE_ALIGNMENT;
-
---
--- This is the Driver Address Table for this test.
---
-
- DEVICE_DRIVERS : aliased RTEMS.DRIVER_ADDRESS_TABLE( 1 .. 1 ) :=
- (1=>
- (
- CLOCK_DRIVER.INITIALIZE'ACCESS, -- Initialization
- RTEMS.NO_DRIVER_ENTRY, -- Open
- RTEMS.NO_DRIVER_ENTRY, -- Close
- RTEMS.NO_DRIVER_ENTRY, -- Read
- RTEMS.NO_DRIVER_ENTRY, -- Write
- RTEMS.NO_DRIVER_ENTRY -- Control
- )
- );
-
---
--- This is the Initialization Tasks Table for this test.
---
-
- INITIALIZATION_TASKS : aliased RTEMS.INITIALIZATION_TASKS_TABLE( 1 .. 1 ) :=
- (1=>
- (
- RTEMS.BUILD_NAME( 'U', 'I', '1', ' ' ), -- task name
- 2048, -- stack size
- 1, -- priority
- RTEMS.DEFAULT_ATTRIBUTES, -- attributes
- MPTEST.INIT'ACCESS, -- entry point
- RTEMS.NO_PREEMPT, -- initial mode
- 0 -- argument list
- )
- );
-
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
--- BEGIN SUBPACKAGE --
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-
- --
- -- MPTEST.PER_NODE_CONFIGURATION / SPECIFICATION
- --
- -- DESCRIPTION:
- --
- -- This package is the specification for the subpackage
- -- which will define the per node configuration parameters.
- --
-
- package PER_NODE_CONFIGURATION is
-
- --
- -- LOCAL_NODE_NUMBER
- --
- -- DESCRIPTION:
- --
- -- This function returns the node number for this node.
- --
-
- function LOCAL_NODE_NUMBER
- return RTEMS.UNSIGNED32;
-
- pragma INLINE ( LOCAL_NODE_NUMBER );
-
- end PER_NODE_CONFIGURATION;
-
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
--- END SUBPACKAGE --
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-
---
--- This is the Multiprocessor Configuration Table for this test.
---
-
- MULTIPROCESSING_CONFIGURATION : aliased RTEMS.MULTIPROCESSING_TABLE := (
- MPTEST.PER_NODE_CONFIGURATION.LOCAL_NODE_NUMBER,
- 2, -- maximum # nodes in system
- 32, -- maximum # global objects
- 32 -- maximum # proxies
- );
-
---
--- This is the Configuration Table for this test.
---
-
- CONFIGURATION : aliased RTEMS.CONFIGURATION_TABLE := (
- RTEMS.NULL_ADDRESS, -- will be replaced by BSP
- 64 * 1024, -- executive RAM size
- 10, -- maximum # tasks
- 0, -- maximum # timers
- 0, -- maximum # semaphores
- 0, -- maximum # message queues
- 0, -- maximum # messages
- 1, -- maximum # partitions
- 0, -- maximum # regions
- 0, -- maximum # dp memory areas
- 0, -- maximum # periods
- 0, -- maximum # user extensions
- RTEMS.MILLISECONDS_TO_MICROSECONDS(10), -- # us in a tick
- 50 -- # ticks in a timeslice
- );
-
-end MPTEST;
diff --git a/c/src/ada-tests/mptests/mp12/node1/mp12.scn b/c/src/ada-tests/mptests/mp12/node1/mp12.scn
deleted file mode 100644
index 40646722eb..0000000000
--- a/c/src/ada-tests/mptests/mp12/node1/mp12.scn
+++ /dev/null
@@ -1,6 +0,0 @@
-*** TEST 12 -- NODE 1 ***
-Got to the initialization task
-Creating Partition (Global)
-Sleeping for three seconds
-Deleting Partition (Global)
-*** END OF TEST 12 ***
diff --git a/c/src/ada-tests/mptests/mp12/node1/mptest-per_node_configuration.adb b/c/src/ada-tests/mptests/mp12/node1/mptest-per_node_configuration.adb
deleted file mode 100644
index 7df5087537..0000000000
--- a/c/src/ada-tests/mptests/mp12/node1/mptest-per_node_configuration.adb
+++ /dev/null
@@ -1,43 +0,0 @@
---
--- MPTEST.PER_NODE_CONFIGURATION / BODY
---
--- DESCRIPTION:
---
--- This package is the specification for the subpackage
--- which will define the per node configuration parameters.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-separate ( MPTEST )
-
-package body PER_NODE_CONFIGURATION is
-
---PAGE
---
--- LOCAL_NODE_NUMBER
---
-
- function LOCAL_NODE_NUMBER
- return RTEMS.UNSIGNED32 is
- begin
-
- return 1;
-
- end LOCAL_NODE_NUMBER;
-
-end PER_NODE_CONFIGURATION;
diff --git a/c/src/ada-tests/mptests/mp12/node2/mp12.scn b/c/src/ada-tests/mptests/mp12/node2/mp12.scn
deleted file mode 100644
index 2189ae9959..0000000000
--- a/c/src/ada-tests/mptests/mp12/node2/mp12.scn
+++ /dev/null
@@ -1,9 +0,0 @@
-*** TEST 12 -- NODE 2 ***
-Got to the initialization task
-Getting ID of remote Partition (Global)
-Attempting to delete remote Partition (Global)
-partition_delete correctly returned ILLEGAL_ON_REMOTE_OBJECT!!
-Obtaining a buffer from the global partition
-Address returned was : 0x200f0000
-NOTE: Address printed will probably differ!!!
-*** END OF TEST 12 ***
diff --git a/c/src/ada-tests/mptests/mp12/node2/mptest-per_node_configuration.adb b/c/src/ada-tests/mptests/mp12/node2/mptest-per_node_configuration.adb
deleted file mode 100644
index e127cc5573..0000000000
--- a/c/src/ada-tests/mptests/mp12/node2/mptest-per_node_configuration.adb
+++ /dev/null
@@ -1,43 +0,0 @@
---
--- MPTEST.PER_NODE_CONFIGURATION / BODY
---
--- DESCRIPTION:
---
--- This package is the specification for the subpackage
--- which will define the per node configuration parameters.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-separate ( MPTEST )
-
-package body PER_NODE_CONFIGURATION is
-
---PAGE
---
--- LOCAL_NODE_NUMBER
---
-
- function LOCAL_NODE_NUMBER
- return RTEMS.UNSIGNED32 is
- begin
-
- return 2;
-
- end LOCAL_NODE_NUMBER;
-
-end PER_NODE_CONFIGURATION;
diff --git a/c/src/ada-tests/mptests/mp13/mptest.adb b/c/src/ada-tests/mptests/mp13/mptest.adb
deleted file mode 100644
index 33aebf6cd8..0000000000
--- a/c/src/ada-tests/mptests/mp13/mptest.adb
+++ /dev/null
@@ -1,328 +0,0 @@
---
--- MPTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation for Test 13 of the RTEMS
--- Multiprocessor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with TEST_SUPPORT;
-with TEXT_IO;
-with UNSIGNED32_IO;
-
-package body MPTEST is
-
- package body PER_NODE_CONFIGURATION is separate;
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT( "*** TEST 13 -- NODE " );
- UNSIGNED32_IO.PUT(
- MPTEST.MULTIPROCESSING_CONFIGURATION.NODE,
- WIDTH => 1
- );
- TEXT_IO.PUT_LINE( " ***" );
-
- MPTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME( '1', '1', '1', ' ' );
- MPTEST.TASK_NAME( 2 ) := RTEMS.BUILD_NAME( '2', '2', '2', ' ' );
-
- MPTEST.QUEUE_NAME( 1 ) := RTEMS.BUILD_NAME( 'M', 'S', 'G', ' ' );
-
- MPTEST.SEMAPHORE_NAME( 1 ) := RTEMS.BUILD_NAME( 'S', 'E', 'M', ' ' );
-
- if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then
-
- TEXT_IO.PUT_LINE( "Creating Message Queue (Global)" );
- RTEMS.MESSAGE_QUEUE_CREATE(
- MPTEST.QUEUE_NAME( 1 ),
- 3,
- RTEMS.GLOBAL + RTEMS.LIMIT,
- MPTEST.QUEUE_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_CREATE" );
-
- TEXT_IO.PUT_LINE( "Creating Semaphore (Global)" );
- RTEMS.SEMAPHORE_CREATE(
- MPTEST.SEMAPHORE_NAME( 1 ),
- 1,
- RTEMS.GLOBAL + RTEMS.PRIORITY,
- MPTEST.SEMAPHORE_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_CREATE" );
-
- RTEMS.SEMAPHORE_OBTAIN(
- MPTEST.SEMAPHORE_ID( 1 ),
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_OBTAIN" );
-
- end if;
-
- TEXT_IO.PUT_LINE( "Creating Test_task 1 (local)" );
- RTEMS.TASK_CREATE(
- MPTEST.TASK_NAME( 1 ),
- 1,
- 2048,
- RTEMS.TIMESLICE,
- RTEMS.DEFAULT_ATTRIBUTES,
- MPTEST.TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE" );
-
- TEXT_IO.PUT_LINE( "Starting Test_task 1 (local)" );
- RTEMS.TASK_START(
- MPTEST.TASK_ID( 1 ),
- MPTEST.TEST_TASK_1'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START" );
-
- TEXT_IO.PUT_LINE( "Creating Test_task 2 (local)" );
- RTEMS.TASK_CREATE(
- MPTEST.TASK_NAME( 2 ),
- 1,
- 2048,
- RTEMS.TIMESLICE,
- RTEMS.DEFAULT_ATTRIBUTES,
- MPTEST.TASK_ID( 2 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE" );
-
- TEXT_IO.PUT_LINE( "Starting Test_task 2 (local)" );
- RTEMS.TASK_START(
- MPTEST.TASK_ID( 2 ),
- MPTEST.TEST_TASK_2'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START" );
-
- if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then
-
- RTEMS.TASK_WAKE_AFTER( 5 * TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- TEXT_IO.PUT_LINE( "*** END OF TEST 13 ***" );
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end if;
-
- TEXT_IO.PUT_LINE( "Deleting initialization task" );
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- TEST_TASK_1
---
-
- procedure TEST_TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- COUNT : RTEMS.UNSIGNED32;
- RECEIVE_BUFFER_AREA : RTEMS.BUFFER;
- RECEIVE_BUFFER : RTEMS.BUFFER_POINTER;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RECEIVE_BUFFER :=
- RTEMS.TO_BUFFER_POINTER( RECEIVE_BUFFER_AREA'ADDRESS );
-
- TEXT_IO.PUT_LINE( "Getting QID of message queue" );
-
- loop
-
- RTEMS.MESSAGE_QUEUE_IDENT(
- MPTEST.QUEUE_NAME( 1 ),
- RTEMS.SEARCH_ALL_NODES,
- MPTEST.QUEUE_ID( 1 ),
- STATUS
- );
-
- exit when RTEMS.IS_STATUS_SUCCESSFUL( STATUS );
-
- end loop;
-
- if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then
-
- TEXT_IO.PUT_LINE( "Receiving message ..." );
- RTEMS.MESSAGE_QUEUE_RECEIVE(
- MPTEST.QUEUE_ID( 1 ),
- RECEIVE_BUFFER,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- STATUS
- );
- TEXT_IO.PUT_LINE( "How did I get back from here???" );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_RECEIVE" );
-
- end if;
-
- RTEMS.TASK_WAKE_AFTER( TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- TEXT_IO.PUT_LINE( "Receiving message ..." );
- RTEMS.MESSAGE_QUEUE_RECEIVE(
- MPTEST.QUEUE_ID( 1 ),
- RECEIVE_BUFFER,
- RTEMS.DEFAULT_OPTIONS,
- 2 * TEST_SUPPORT.TICKS_PER_SECOND,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.TIMEOUT,
- "MESSAGE_QUEUE_RECEIVE"
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.TIMEOUT,
- "MESSAGE_QUEUE_OBTAIN"
- );
-
- TEXT_IO.PUT_LINE(
- "message_queue_receive correctly returned TIMEOUT"
- );
-
- TEXT_IO.PUT_LINE( "Deleting self" );
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end TEST_TASK_1;
-
---PAGE
---
--- TEST_TASK_2
---
-
- procedure TEST_TASK_2 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.PUT_LINE( "Getting SMID of semaphore" );
-
- loop
-
- RTEMS.SEMAPHORE_IDENT(
- MPTEST.SEMAPHORE_NAME( 1 ),
- RTEMS.SEARCH_ALL_NODES,
- MPTEST.SEMAPHORE_ID( 1 ),
- STATUS
- );
-
- exit when RTEMS.IS_STATUS_SUCCESSFUL( STATUS );
-
- end loop;
-
- if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then
-
- RTEMS.TASK_WAKE_AFTER( TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- TEXT_IO.PUT_LINE( "Releasing semaphore ..." );
- RTEMS.SEMAPHORE_RELEASE( MPTEST.SEMAPHORE_ID( 1 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_RELEASE" );
-
- RTEMS.TASK_WAKE_AFTER( TEST_SUPPORT.TICKS_PER_SECOND / 2, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- TEXT_IO.PUT_LINE( "Getting semaphore ..." );
- RTEMS.SEMAPHORE_OBTAIN(
- MPTEST.SEMAPHORE_ID( 1 ),
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_OBTAIN" );
-
- TEXT_IO.PUT_LINE( "Getting semaphore ..." );
- RTEMS.SEMAPHORE_OBTAIN(
- MPTEST.SEMAPHORE_ID( 1 ),
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- STATUS
- );
- TEXT_IO.PUT_LINE( "How did I get back from here???" );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_OBTAIN" );
-
- end if;
-
- RTEMS.TASK_WAKE_AFTER( TEST_SUPPORT.TICKS_PER_SECOND / 2, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- TEXT_IO.PUT_LINE( "Getting semaphore ..." );
- RTEMS.SEMAPHORE_OBTAIN(
- MPTEST.SEMAPHORE_ID( 1 ),
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_OBTAIN" );
-
- TEXT_IO.PUT_LINE( "Releasing semaphore ..." );
- RTEMS.SEMAPHORE_RELEASE( MPTEST.SEMAPHORE_ID( 1 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_RELEASE" );
-
- RTEMS.TASK_WAKE_AFTER( TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- TEXT_IO.PUT_LINE( "Getting semaphore ..." );
- RTEMS.SEMAPHORE_OBTAIN(
- MPTEST.SEMAPHORE_ID( 1 ),
- RTEMS.DEFAULT_OPTIONS,
- 2 * TEST_SUPPORT.TICKS_PER_SECOND,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.TIMEOUT,
- "SEMAPHORE_OBTAIN"
- );
- TEXT_IO.PUT_LINE( "semaphore_obtain correctly returned TIMEOUT" );
-
- TEXT_IO.PUT_LINE( "*** END OF TEST 13 ***" );
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end TEST_TASK_2;
-
-end MPTEST;
diff --git a/c/src/ada-tests/mptests/mp13/mptest.ads b/c/src/ada-tests/mptests/mp13/mptest.ads
deleted file mode 100644
index 1575c5adeb..0000000000
--- a/c/src/ada-tests/mptests/mp13/mptest.ads
+++ /dev/null
@@ -1,206 +0,0 @@
---
--- MPTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 13 of the RTEMS
--- Multiprocessor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with BSP_MPCI;
-with RTEMS;
-
-package MPTEST is
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
- TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS message
--- queues created by this test.
---
-
- QUEUE_ID : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.ID;
- QUEUE_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.NAME;
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS semaphore
--- created by this test.
---
-
- SEMAPHORE_ID : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.ID;
- SEMAPHORE_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.NAME;
-
---
--- This variable contains the ID of the remote task with which this
--- test interacts.
---
-
- REMOTE_TID : RTEMS.ID;
-
---
--- This variable contains the node on which the remote task with which
--- this test interacts resides.
---
-
- REMOTE_NODE : RTEMS.UNSIGNED32;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TEST_TASK_1
---
--- DESCRIPTION:
---
--- This is the body of one of the RTEMS tasks which constitute this test.
---
-
- procedure TEST_TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TEST_TASK_2
---
--- DESCRIPTION:
---
--- This is the body of one of the RTEMS tasks which constitute this test.
---
-
- procedure TEST_TASK_2 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- This is the Driver Address Table for this test.
---
-
- DEVICE_DRIVERS : aliased RTEMS.DRIVER_ADDRESS_TABLE( 1 .. 1 ) :=
- (1=>
- (
- CLOCK_DRIVER.INITIALIZE'ACCESS, -- Initialization
- RTEMS.NO_DRIVER_ENTRY, -- Open
- RTEMS.NO_DRIVER_ENTRY, -- Close
- RTEMS.NO_DRIVER_ENTRY, -- Read
- RTEMS.NO_DRIVER_ENTRY, -- Write
- RTEMS.NO_DRIVER_ENTRY -- Control
- )
- );
-
---
--- This is the Initialization Tasks Table for this test.
---
-
- INITIALIZATION_TASKS : aliased RTEMS.INITIALIZATION_TASKS_TABLE( 1 .. 1 ) :=
- (1=>
- (
- RTEMS.BUILD_NAME( 'U', 'I', '1', ' ' ), -- task name
- 2048, -- stack size
- 1, -- priority
- RTEMS.DEFAULT_ATTRIBUTES, -- attributes
- MPTEST.INIT'ACCESS, -- entry point
- RTEMS.NO_PREEMPT, -- initial mode
- 0 -- argument list
- )
- );
-
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
--- BEGIN SUBPACKAGE --
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-
- --
- -- MPTEST.PER_NODE_CONFIGURATION / SPECIFICATION
- --
- -- DESCRIPTION:
- --
- -- This package is the specification for the subpackage
- -- which will define the per node configuration parameters.
- --
-
- package PER_NODE_CONFIGURATION is
-
- --
- -- LOCAL_NODE_NUMBER
- --
- -- DESCRIPTION:
- --
- -- This function returns the node number for this node.
- --
-
- function LOCAL_NODE_NUMBER
- return RTEMS.UNSIGNED32;
-
- pragma INLINE ( LOCAL_NODE_NUMBER );
-
- end PER_NODE_CONFIGURATION;
-
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
--- END SUBPACKAGE --
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-
---
--- This is the Multiprocessor Configuration Table for this test.
---
-
- MULTIPROCESSING_CONFIGURATION : aliased RTEMS.MULTIPROCESSING_TABLE := (
- MPTEST.PER_NODE_CONFIGURATION.LOCAL_NODE_NUMBER,
- 2, -- maximum # nodes in system
- 32, -- maximum # global objects
- 32 -- maximum # proxies
- );
-
---
--- This is the Configuration Table for this test.
---
-
- CONFIGURATION : aliased RTEMS.CONFIGURATION_TABLE := (
- RTEMS.NULL_ADDRESS, -- will be replaced by BSP
- 64 * 1024, -- executive RAM size
- 10, -- maximum # tasks
- 0, -- maximum # timers
- 1, -- maximum # semaphores
- 1, -- maximum # message queues
- 0, -- maximum # messages
- 0, -- maximum # partitions
- 0, -- maximum # regions
- 0, -- maximum # dp memory areas
- 0, -- maximum # periods
- 0, -- maximum # user extensions
- RTEMS.MILLISECONDS_TO_MICROSECONDS(10), -- # us in a tick
- 50 -- # ticks in a timeslice
- );
-
-end MPTEST;
diff --git a/c/src/ada-tests/mptests/mp13/node1/mp13.scn b/c/src/ada-tests/mptests/mp13/node1/mp13.scn
deleted file mode 100644
index d3bd11f65e..0000000000
--- a/c/src/ada-tests/mptests/mp13/node1/mp13.scn
+++ /dev/null
@@ -1,14 +0,0 @@
-*** TEST 13 -- NODE 1 ***
-Creating Message Queue (Global)
-Creating Semaphore (Global)
-Creating Test_task 1 (local)
-Starting Test_task 1 (local)
-Creating Test_task 2 (local)
-Starting Test_task 2 (local)
-Getting QID of message queue
-Receiving message ...
-Getting SMID of semaphore
-Releasing semaphore ...
-Getting semaphore ...
-Getting semaphore ...
-*** END OF TEST 13 ***
diff --git a/c/src/ada-tests/mptests/mp13/node1/mptest-per_node_configuration.adb b/c/src/ada-tests/mptests/mp13/node1/mptest-per_node_configuration.adb
deleted file mode 100644
index 7df5087537..0000000000
--- a/c/src/ada-tests/mptests/mp13/node1/mptest-per_node_configuration.adb
+++ /dev/null
@@ -1,43 +0,0 @@
---
--- MPTEST.PER_NODE_CONFIGURATION / BODY
---
--- DESCRIPTION:
---
--- This package is the specification for the subpackage
--- which will define the per node configuration parameters.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-separate ( MPTEST )
-
-package body PER_NODE_CONFIGURATION is
-
---PAGE
---
--- LOCAL_NODE_NUMBER
---
-
- function LOCAL_NODE_NUMBER
- return RTEMS.UNSIGNED32 is
- begin
-
- return 1;
-
- end LOCAL_NODE_NUMBER;
-
-end PER_NODE_CONFIGURATION;
diff --git a/c/src/ada-tests/mptests/mp13/node2/mp13.scn b/c/src/ada-tests/mptests/mp13/node2/mp13.scn
deleted file mode 100644
index 3254046292..0000000000
--- a/c/src/ada-tests/mptests/mp13/node2/mp13.scn
+++ /dev/null
@@ -1,16 +0,0 @@
-*** TEST 13 -- NODE 2 ***
-Creating Test_task 1 (local)
-Starting Test_task 1 (local)
-Creating Test_task 2 (local)
-Starting Test_task 2 (local)
-Deleting initialization task
-Getting QID of message queue
-Getting SMID of semaphore
-Getting semaphore ...
-Releasing semaphore ...
-Receiving message ...
-Getting semaphore ...
-message_queue_receive correctly returned TIMEOUT
-Deleting self
-semaphore_obtain correctly returned TIMEOUT
-*** END OF TEST 13 ***
diff --git a/c/src/ada-tests/mptests/mp13/node2/mptest-per_node_configuration.adb b/c/src/ada-tests/mptests/mp13/node2/mptest-per_node_configuration.adb
deleted file mode 100644
index e127cc5573..0000000000
--- a/c/src/ada-tests/mptests/mp13/node2/mptest-per_node_configuration.adb
+++ /dev/null
@@ -1,43 +0,0 @@
---
--- MPTEST.PER_NODE_CONFIGURATION / BODY
---
--- DESCRIPTION:
---
--- This package is the specification for the subpackage
--- which will define the per node configuration parameters.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-separate ( MPTEST )
-
-package body PER_NODE_CONFIGURATION is
-
---PAGE
---
--- LOCAL_NODE_NUMBER
---
-
- function LOCAL_NODE_NUMBER
- return RTEMS.UNSIGNED32 is
- begin
-
- return 2;
-
- end LOCAL_NODE_NUMBER;
-
-end PER_NODE_CONFIGURATION;
diff --git a/c/src/ada-tests/mptests/mp14/mptest.adb b/c/src/ada-tests/mptests/mp14/mptest.adb
deleted file mode 100644
index e43aec8ae5..0000000000
--- a/c/src/ada-tests/mptests/mp14/mptest.adb
+++ /dev/null
@@ -1,764 +0,0 @@
---
--- MPTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation for Test 14 of the RTEMS
--- Multiprocessor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with BSP;
-with BSP_MPCI;
-with RTEMS;
-with TEST_SUPPORT;
-with TEXT_IO;
-with UNSIGNED32_IO;
-
-package body MPTEST is
-
- package body PER_NODE_CONFIGURATION is separate;
-
---PAGE
---
--- STOP_TEST_TSR
---
-
- procedure STOP_TEST_TSR (
- IGNORED_ID : in RTEMS.ID;
- IGNORED_ADDRESS : in RTEMS.ADDRESS
- ) is
- begin
-
- MPTEST.STOP_TEST := TRUE;
-
- end STOP_TEST_TSR;
-
---PAGE
---
--- EXIT_TEST
---
-
- procedure EXIT_TEST is
- OLD_MODE : RTEMS.MODE;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.TASK_MODE( RTEMS.NO_PREEMPT, RTEMS.PREEMPT_MASK, OLD_MODE, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_MODE" );
-
- BSP_MPCI.PRINT_STATISTICS;
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end EXIT_TEST;
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- INDEX : RTEMS.UNSIGNED32;
- STATUS : RTEMS.STATUS_CODES;
- PREVIOUS_PRIORITY : RTEMS.TASK_PRIORITY;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT( "*** TEST 14 -- NODE " );
- UNSIGNED32_IO.PUT(
- MPTEST.MULTIPROCESSING_CONFIGURATION.NODE,
- WIDTH => 1
- );
- TEXT_IO.PUT_LINE( " ***" );
-
- MPTEST.STOP_TIMER_NAME := RTEMS.BUILD_NAME( 'S', 'T', 'O', 'P' );
-
- MPTEST.STOP_TEST := FALSE;
-
- RTEMS.TIMER_CREATE(
- MPTEST.STOP_TIMER_NAME,
- MPTEST.STOP_TIMER_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_CREATE" );
-
- RTEMS.TIMER_FIRE_AFTER(
- MPTEST.STOP_TIMER_ID,
- BSP.MAXIMUM_LONG_TEST_DURATION * TEST_SUPPORT.TICKS_PER_SECOND,
- MPTEST.STOP_TEST_TSR'ACCESS,
- RTEMS.NULL_ADDRESS,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_FIRE_AFTER" );
-
- MPTEST.EVENT_TASK_NAME( 1 ) := RTEMS.BUILD_NAME( '1', '1', '1', ' ' );
- MPTEST.EVENT_TASK_NAME( 2 ) := RTEMS.BUILD_NAME( '2', '2', '2', ' ' );
-
- MPTEST.QUEUE_TASK_NAME( 1 ) := RTEMS.BUILD_NAME( 'M', 'T', '1', ' ' );
- MPTEST.QUEUE_TASK_NAME( 2 ) := RTEMS.BUILD_NAME( 'M', 'T', '2', ' ' );
-
- MPTEST.PARTITION_TASK_NAME( 1 ) :=
- RTEMS.BUILD_NAME( 'P', 'T', '1', ' ' );
- MPTEST.PARTITION_TASK_NAME( 2 ) :=
- RTEMS.BUILD_NAME( 'P', 'T', '2', ' ' );
-
- MPTEST.SEMAPHORE_TASK_NAME( 1 ) :=
- RTEMS.BUILD_NAME( 'S', 'M', '1', ' ' );
- MPTEST.SEMAPHORE_TASK_NAME( 2 ) :=
- RTEMS.BUILD_NAME( 'S', 'M', '2', ' ' );
-
- MPTEST.SEMAPHORE_NAME( 1 ) := RTEMS.BUILD_NAME( 'S', 'E', 'M', ' ' );
-
- MPTEST.QUEUE_NAME( 1 ) := RTEMS.BUILD_NAME( 'M', 'S', 'G', ' ' );
-
- MPTEST.PARTITION_NAME( 1 ) := RTEMS.BUILD_NAME( 'P', 'A', 'R', ' ' );
-
- MPTEST.TIMER_NAME( 1 ) := RTEMS.BUILD_NAME( 'T', 'M', 'R', ' ' );
-
- for INDEX in MPTEST.BUFFERS'FIRST .. MPTEST.BUFFERS'LAST
- loop
-
- MPTEST.BUFFERS( INDEX ) :=
- RTEMS.TO_BUFFER_POINTER( MPTEST.BUFFER_AREAS( INDEX )'ADDRESS );
-
- end loop;
-
- if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then
-
- TEXT_IO.PUT_LINE( "Creating Semaphore (Global)" );
- RTEMS.SEMAPHORE_CREATE(
- MPTEST.SEMAPHORE_NAME( 1 ),
- 1,
- RTEMS.GLOBAL,
- MPTEST.SEMAPHORE_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_CREATE" );
-
- TEXT_IO.PUT_LINE( "Creating Message Queue (Global)" );
- RTEMS.MESSAGE_QUEUE_CREATE(
- MPTEST.QUEUE_NAME( 1 ),
- 1,
- RTEMS.GLOBAL,
- MPTEST.QUEUE_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_CREATE" );
-
- TEXT_IO.PUT_LINE( "Creating Partition (Global)" );
- RTEMS.PARTITION_CREATE(
- MPTEST.PARTITION_NAME( 1 ),
- MPTEST.PARTITION_AREA( 0 )'ADDRESS,
- 16#8000#,
- 16#3000#,
- RTEMS.GLOBAL,
- MPTEST.PARTITION_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "PARTITION_CREATE" );
-
- end if;
-
- TEXT_IO.PUT_LINE( "Creating Event task (Global)" );
- RTEMS.TASK_CREATE(
- MPTEST.EVENT_TASK_NAME(
- MPTEST.MULTIPROCESSING_CONFIGURATION.NODE
- ),
- 2,
- 2048,
- RTEMS.TIMESLICE,
- RTEMS.GLOBAL,
- MPTEST.EVENT_TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE" );
-
- TEXT_IO.PUT_LINE( "Starting Event task (Global)" );
- RTEMS.TASK_START(
- MPTEST.EVENT_TASK_ID( 1 ),
- MPTEST.TEST_TASK'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START" );
-
- TEXT_IO.PUT_LINE( "Creating Semaphore task (Global)" );
- RTEMS.TASK_CREATE(
- MPTEST.SEMAPHORE_TASK_NAME(
- MPTEST.MULTIPROCESSING_CONFIGURATION.NODE
- ),
- 2,
- 2048,
- RTEMS.TIMESLICE,
- RTEMS.GLOBAL,
- MPTEST.SEMAPHORE_TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE" );
-
- TEXT_IO.PUT_LINE( "Starting Semaphore task (Global)" );
- RTEMS.TASK_START(
- MPTEST.SEMAPHORE_TASK_ID( 1 ),
- MPTEST.SEMAPHORE_TASK'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START" );
-
- TEXT_IO.PUT_LINE( "Creating Message Queue task (Global)" );
- RTEMS.TASK_CREATE(
- MPTEST.QUEUE_TASK_NAME(
- MPTEST.MULTIPROCESSING_CONFIGURATION.NODE
- ),
- 2,
- 2048,
- RTEMS.TIMESLICE,
- RTEMS.GLOBAL,
- MPTEST.QUEUE_TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE" );
-
- TEXT_IO.PUT_LINE( "Starting Message Queue task (Global)" );
- RTEMS.TASK_START(
- MPTEST.QUEUE_TASK_ID( 1 ),
- MPTEST.MESSAGE_QUEUE_TASK'ACCESS,
- 1, -- index of buffer
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START" );
-
- TEXT_IO.PUT_LINE( "Creating Partition task (Global)" );
- RTEMS.TASK_CREATE(
- MPTEST.PARTITION_TASK_NAME(
- MPTEST.MULTIPROCESSING_CONFIGURATION.NODE
- ),
- 2,
- 2048,
- RTEMS.TIMESLICE,
- RTEMS.GLOBAL,
- MPTEST.PARTITION_TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE" );
-
- TEXT_IO.PUT_LINE( "Starting Partition task (Global)" );
- RTEMS.TASK_START(
- MPTEST.PARTITION_TASK_ID( 1 ),
- MPTEST.PARTITION_TASK'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START" );
-
- RTEMS.TASK_SET_PRIORITY( RTEMS.SELF, 2, PREVIOUS_PRIORITY, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SET_PRIORITY" );
-
- MPTEST.DELAYED_EVENTS_TASK( 1 );
-
- end INIT;
-
---
--- DELAYED_SEND_EVENT
---
--- DESCRIPTION:
---
--- This subprogram is a timer service routine which sends an
--- event set to a waiting task.
---
-
- procedure DELAYED_SEND_EVENT (
- TIMER_ID : in RTEMS.ID;
- IGNORED_ADDRESS : in RTEMS.ADDRESS
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.EVENT_SEND(
- MPTEST.TASK_ID( RTEMS.GET_INDEX( TIMER_ID ) ),
- RTEMS.EVENT_16,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "EVENT_SEND" );
-
- end DELAYED_SEND_EVENT;
-
---
--- TEST_TASK
---
--- DESCRIPTION:
---
--- This is one of the test tasks.
---
-
- procedure TEST_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- REMOTE_NODE : RTEMS.UNSIGNED32;
- REMOTE_TID : RTEMS.ID;
- COUNT : RTEMS.UNSIGNED32;
- EVENT_OUT : RTEMS.EVENT_SET;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then
- REMOTE_NODE := 2;
- else
- REMOTE_NODE := 1;
- end if;
-
- TEXT_IO.PUT_LINE( "About to go to sleep!" );
- RTEMS.TASK_WAKE_AFTER( 1 * TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
- TEXT_IO.PUT_LINE( "Waking up!" );
-
- TEXT_IO.PUT( "Remote task's name is : " );
- TEST_SUPPORT.PUT_NAME( MPTEST.EVENT_TASK_NAME( REMOTE_NODE ), TRUE );
-
- TEXT_IO.PUT_LINE( "Getting TID of remote task" );
-
- loop
-
- RTEMS.TASK_IDENT(
- MPTEST.EVENT_TASK_NAME( REMOTE_NODE ),
- RTEMS.SEARCH_ALL_NODES,
- REMOTE_TID,
- STATUS
- );
-
- exit when RTEMS.IS_STATUS_SUCCESSFUL( STATUS );
-
- TEXT_IO.PUT_LINE( "task_ident" );
-
- end loop;
-
- if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then
- TEXT_IO.PUT_LINE( "Sending events to remote task" );
-
- loop
- exit when MPTEST.STOP_TEST = TRUE;
-
- for COUNT in 1 .. MPTEST.EVENT_TASK_DOT_COUNT
- loop
- RTEMS.EVENT_SEND(
- REMOTE_TID,
- RTEMS.EVENT_16,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "EVENT_SEND" );
-
- exit when MPTEST.STOP_TEST = TRUE;
-
- end loop;
-
- TEST_SUPPORT.PUT_DOT( "e" );
-
- end loop;
-
- end if;
-
- TEXT_IO.PUT_LINE( "Receiving events from remote task" );
-
- loop
- exit when MPTEST.STOP_TEST = TRUE;
-
- for COUNT in 1 .. MPTEST.EVENT_TASK_DOT_COUNT
- loop
- exit when MPTEST.STOP_TEST = TRUE;
-
- RTEMS.EVENT_RECEIVE(
- RTEMS.EVENT_16,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- EVENT_OUT,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "EVENT_RECEIVE" );
-
- end loop;
-
- TEST_SUPPORT.PUT_DOT( "e" );
-
- end loop;
-
- MPTEST.EXIT_TEST;
-
- end TEST_TASK;
-
---
--- DELAYED_EVENTS_TASK
---
--- DESCRIPTION:
---
--- This is one of the test tasks.
---
-
- procedure DELAYED_EVENTS_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- COUNT : RTEMS.UNSIGNED32;
- PREVIOUS_MODE : RTEMS.MODE;
- EVENTS_OUT : RTEMS.EVENT_SET;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.TASK_MODE(
- RTEMS.PREEMPT + RTEMS.TIMESLICE,
- RTEMS.PREEMPT_MASK + RTEMS.TIMESLICE_MASK,
- PREVIOUS_MODE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_MODE" );
-
- RTEMS.TIMER_CREATE(
- MPTEST.TIMER_NAME( 1 ),
- MPTEST.TIMER_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_CREATE" );
-
- RTEMS.TASK_IDENT(
- RTEMS.SELF,
- RTEMS.SEARCH_ALL_NODES,
- MPTEST.TASK_ID( RTEMS.GET_INDEX( MPTEST.TIMER_ID( 1 ) ) ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_IDENTS" );
-
- loop
-
- for COUNT in 1 .. MPTEST.DELAYED_EVENT_DOT_COUNT
- loop
- RTEMS.TIMER_FIRE_AFTER(
- MPTEST.TIMER_ID( 1 ),
- 1,
- MPTEST.DELAYED_SEND_EVENT'ACCESS,
- RTEMS.NULL_ADDRESS,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_FIRE_AFTER" );
-
- RTEMS.EVENT_RECEIVE(
- RTEMS.EVENT_16,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- EVENTS_OUT,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "EVENT_RECEIVE" );
-
- end loop;
-
- TEST_SUPPORT.PUT_DOT( "." );
-
- end loop;
-
- MPTEST.EXIT_TEST;
-
- end DELAYED_EVENTS_TASK;
-
---
--- MESSAGE_QUEUE_TASK
---
--- DESCRIPTION:
---
--- This is one of the test tasks.
---
-
- procedure MESSAGE_QUEUE_TASK (
- INDEX : in RTEMS.TASK_ARGUMENT
- ) is
- COUNT : RTEMS.UNSIGNED32;
- YIELD_COUNT : RTEMS.UNSIGNED32;
- OVERFLOW_COUNT : RTEMS.UNSIGNED32_POINTER;
- BUFFER_COUNT : RTEMS.UNSIGNED32_POINTER;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- MPTEST.BUFFERS( INDEX ).FIELD1 := 0;
- MPTEST.BUFFERS( INDEX ).FIELD2 := 0;
- MPTEST.BUFFERS( INDEX ).FIELD3 := 0;
- MPTEST.BUFFERS( INDEX ).FIELD4 := 0;
-
- TEXT_IO.PUT_LINE( "Getting ID of message queue" );
-
- loop
-
- RTEMS.MESSAGE_QUEUE_IDENT(
- MPTEST.QUEUE_NAME( 1 ),
- RTEMS.SEARCH_ALL_NODES,
- MPTEST.QUEUE_ID( 1 ),
- STATUS
- );
- exit when RTEMS.IS_STATUS_SUCCESSFUL( STATUS );
-
- TEXT_IO.PUT_LINE( "message_queue_ident FAILED!!" );
-
- end loop;
-
- if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then
-
- RTEMS.MESSAGE_QUEUE_SEND(
- MPTEST.QUEUE_ID( 1 ),
- MPTEST.BUFFERS( INDEX ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_SEND" );
-
- OVERFLOW_COUNT := RTEMS.TO_UNSIGNED32_POINTER(
- MPTEST.BUFFERS( INDEX ).FIELD1'ADDRESS
- );
-
- BUFFER_COUNT := RTEMS.TO_UNSIGNED32_POINTER(
- MPTEST.BUFFERS( INDEX ).FIELD2'ADDRESS
- );
-
- else
-
- OVERFLOW_COUNT := RTEMS.TO_UNSIGNED32_POINTER(
- MPTEST.BUFFERS( INDEX ).FIELD3'ADDRESS
- );
-
- BUFFER_COUNT := RTEMS.TO_UNSIGNED32_POINTER(
- MPTEST.BUFFERS( INDEX ).FIELD4'ADDRESS
- );
-
- end if;
-
- loop
-
- exit when MPTEST.STOP_TEST = TRUE;
-
- YIELD_COUNT := 100;
-
- for COUNT in 1 .. MPTEST.MESSAGE_DOT_COUNT
- loop
-
- exit when MPTEST.STOP_TEST = TRUE;
-
- RTEMS.MESSAGE_QUEUE_RECEIVE(
- MPTEST.QUEUE_ID( 1 ),
- MPTEST.BUFFERS( INDEX ),
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED(
- STATUS,
- "MESSAGE_QUEUE_RECEIVE"
- );
-
- if BUFFER_COUNT.ALL = RTEMS.UNSIGNED32'LAST then
- BUFFER_COUNT.ALL := 0;
- OVERFLOW_COUNT.ALL := OVERFLOW_COUNT.ALL + 1;
- else
- BUFFER_COUNT.ALL := BUFFER_COUNT.ALL + 1;
- end if;
-
- RTEMS.MESSAGE_QUEUE_SEND(
- MPTEST.QUEUE_ID( 1 ),
- MPTEST.BUFFERS( INDEX ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_SEND" );
-
- if MPTEST.STOP_TEST = FALSE then
- if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then
-
- YIELD_COUNT := YIELD_COUNT - 1;
-
- if YIELD_COUNT = 0 then
-
- RTEMS.TASK_WAKE_AFTER( RTEMS.YIELD_PROCESSOR, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "YIELD" );
-
- YIELD_COUNT := 100;
-
- end if;
-
- end if;
-
- end if;
-
- end loop;
-
- TEST_SUPPORT.PUT_DOT( "m" );
-
- end loop;
-
- MPTEST.EXIT_TEST;
-
- end MESSAGE_QUEUE_TASK;
-
---
--- PARTITION_TASK
---
--- DESCRIPTION:
---
--- This is one of the test tasks.
---
-
- procedure PARTITION_TASK (
- IGNORED : in RTEMS.TASK_ARGUMENT
- ) is
- COUNT : RTEMS.UNSIGNED32;
- BUFFER : RTEMS.ADDRESS;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.PUT_LINE( "Getting ID of partition" );
-
- loop
-
- RTEMS.PARTITION_IDENT(
- MPTEST.PARTITION_NAME( 1 ),
- RTEMS.SEARCH_ALL_NODES,
- MPTEST.PARTITION_ID( 1 ),
- STATUS
- );
- exit when RTEMS.IS_STATUS_SUCCESSFUL( STATUS );
-
- TEXT_IO.PUT_LINE( "partition_ident FAILED!!" );
-
- end loop;
-
- loop
-
- exit when MPTEST.STOP_TEST = TRUE;
-
- for COUNT in 1 .. MPTEST.PARTITION_DOT_COUNT
- loop
-
- exit when MPTEST.STOP_TEST = TRUE;
-
- RTEMS.PARTITION_GET_BUFFER(
- MPTEST.PARTITION_ID( 1 ),
- BUFFER,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "PARTITION_GET_BUFFER" );
-
- RTEMS.PARTITION_RETURN_BUFFER(
- MPTEST.PARTITION_ID( 1 ),
- BUFFER,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED(
- STATUS,
- "PARTITION_RETURN_BUFFER"
- );
-
- if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then
-
- RTEMS.TASK_WAKE_AFTER( RTEMS.YIELD_PROCESSOR, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "YIELD" );
-
- end if;
-
- end loop;
-
- TEST_SUPPORT.PUT_DOT( "p" );
-
- end loop;
-
- MPTEST.EXIT_TEST;
-
- end PARTITION_TASK;
-
---
--- SEMAPHORE_TASK
---
--- DESCRIPTION:
---
--- This is one of the test tasks.
---
-
- procedure SEMAPHORE_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- COUNT : RTEMS.UNSIGNED32;
- YIELD_COUNT : RTEMS.UNSIGNED32;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.PUT_LINE( "Getting ID of semaphore" );
-
- loop
-
- RTEMS.SEMAPHORE_IDENT(
- MPTEST.SEMAPHORE_NAME( 1 ),
- RTEMS.SEARCH_ALL_NODES,
- MPTEST.SEMAPHORE_ID( 1 ),
- STATUS
- );
- exit when RTEMS.IS_STATUS_SUCCESSFUL( STATUS );
-
- TEXT_IO.PUT_LINE( "semaphore_ident FAILED!!" );
-
- end loop;
-
- loop
-
- YIELD_COUNT := 100;
-
- exit when MPTEST.STOP_TEST = TRUE;
-
- for COUNT in 1 .. MPTEST.SEMAPHORE_DOT_COUNT
- loop
-
- exit when MPTEST.STOP_TEST = TRUE;
-
- RTEMS.SEMAPHORE_OBTAIN(
- MPTEST.SEMAPHORE_ID( 1 ),
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_OBTAIN" );
-
- RTEMS.SEMAPHORE_RELEASE( MPTEST.SEMAPHORE_ID( 1 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_RELEASE" );
-
- if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then
-
- YIELD_COUNT := YIELD_COUNT - 1;
-
- if YIELD_COUNT = 0 then
-
- RTEMS.TASK_WAKE_AFTER( RTEMS.YIELD_PROCESSOR, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "YIELD" );
-
- YIELD_COUNT := 100;
-
- end if;
-
- end if;
-
- end loop;
-
- TEST_SUPPORT.PUT_DOT( "s" );
-
- end loop;
-
- MPTEST.EXIT_TEST;
-
- end SEMAPHORE_TASK;
-
-end MPTEST;
diff --git a/c/src/ada-tests/mptests/mp14/mptest.ads b/c/src/ada-tests/mptests/mp14/mptest.ads
deleted file mode 100644
index 83786f5fe0..0000000000
--- a/c/src/ada-tests/mptests/mp14/mptest.ads
+++ /dev/null
@@ -1,347 +0,0 @@
---
--- MPTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 14 of the RTEMS
--- Multiprocessor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with BSP_MPCI;
-with RTEMS;
-
-package MPTEST is
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test for passing event sets.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ID;
- TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.NAME;
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test for passing event sets.
---
-
- EVENT_TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ID;
- EVENT_TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.NAME;
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test for manipulating semaphores.
---
-
- SEMAPHORE_TASK_ID :
- array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ID;
- SEMAPHORE_TASK_NAME :
- array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.NAME;
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test for passing messages.
---
-
- QUEUE_TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ID;
- QUEUE_TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.NAME;
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test for manipulating the global partitions.
---
-
- PARTITION_TASK_ID :
- array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ID;
- PARTITION_TASK_NAME :
- array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.NAME;
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS partitions
--- created by this test.
---
-
- PARTITION_ID : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ID;
- PARTITION_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.NAME;
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS semaphores
--- created by this test.
---
-
- SEMAPHORE_ID : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ID;
- SEMAPHORE_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.NAME;
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS message_queues
--- created by this test.
---
-
- QUEUE_ID : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ID;
- QUEUE_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.NAME;
-
---
---
--- These arrays contain the IDs and NAMEs of all RTEMS timers
--- created by this test.
---
-
- TIMER_ID : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ID;
- TIMER_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.NAME;
-
---
--- The following are message buffers used to contain the test messages
--- and pointers to those buffers.
---
-
- BUFFER_AREAS : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.BUFFER;
- BUFFERS :
- array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.BUFFER_POINTER;
-
---
--- This is the area used for the partition.
---
-
- PARTITION_AREA :
- array ( RTEMS.UNSIGNED32 range 0 .. 16#7FFF# ) of RTEMS.UNSIGNED8;
- for PARTITION_AREA'ALIGNMENT use RTEMS.STRUCTURE_ALIGNMENT;
-
---
--- The following constants control the flow of "dot" indicators
--- from the various test componenents.
---
-
- EVENT_TASK_DOT_COUNT : constant RTEMS.UNSIGNED32 := 100;
- EVENT_SEND_DOT_COUNT : constant RTEMS.UNSIGNED32 := 100;
- DELAYED_EVENT_DOT_COUNT : constant RTEMS.UNSIGNED32 := 1000;
- MESSAGE_DOT_COUNT : constant RTEMS.UNSIGNED32 := 200;
- PARTITION_DOT_COUNT : constant RTEMS.UNSIGNED32 := 200;
- SEMAPHORE_DOT_COUNT : constant RTEMS.UNSIGNED32 := 200;
-
---
--- These contain the IDs and NAMEs of the RTEMS timers used
--- by this test to stop.
---
-
- STOP_TIMER_ID : RTEMS.ID;
- STOP_TIMER_NAME : RTEMS.NAME;
-
---
--- This variable is set when the test should stop executing.
---
-
- STOP_TEST : RTEMS.BOOLEAN;
-
---
--- EXIT_TEST
---
--- DESCRIPTION:
---
--- This subprogram is invoked to stop this test.
---
-
- procedure EXIT_TEST;
-
---
--- DELAYED_SEND_EVENT
---
--- DESCRIPTION:
---
--- This subprogram is a timer service routine which sends an
--- event set to a waiting task.
---
-
- procedure DELAYED_SEND_EVENT (
- TIMER_ID : in RTEMS.ID;
- IGNORED_ADDRESS : in RTEMS.ADDRESS
- );
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TEST_TASK
---
--- DESCRIPTION:
---
--- This is one of the test tasks.
---
-
- procedure TEST_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- DELAYED_EVENTS_TASK
---
--- DESCRIPTION:
---
--- This is one of the test tasks.
---
-
- procedure DELAYED_EVENTS_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- MESSAGE_QUEUE_TASK
---
--- DESCRIPTION:
---
--- This is one of the test tasks.
---
-
- procedure MESSAGE_QUEUE_TASK (
- INDEX : in RTEMS.TASK_ARGUMENT
- );
-
---
--- PARTITION_TASK
---
--- DESCRIPTION:
---
--- This is one of the test tasks.
---
-
- procedure PARTITION_TASK (
- IGNORED : in RTEMS.TASK_ARGUMENT
- );
-
---
--- SEMAPHORE_TASK
---
--- DESCRIPTION:
---
--- This is one of the test tasks.
---
-
- procedure SEMAPHORE_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- This is the Driver Address Table for this test.
---
-
- DEVICE_DRIVERS : aliased RTEMS.DRIVER_ADDRESS_TABLE( 1 .. 1 ) :=
- (1=>
- (
- CLOCK_DRIVER.INITIALIZE'ACCESS, -- Initialization
- RTEMS.NO_DRIVER_ENTRY, -- Open
- RTEMS.NO_DRIVER_ENTRY, -- Close
- RTEMS.NO_DRIVER_ENTRY, -- Read
- RTEMS.NO_DRIVER_ENTRY, -- Write
- RTEMS.NO_DRIVER_ENTRY -- Control
- )
- );
-
---
--- This is the Initialization Tasks Table for this test.
---
-
- INITIALIZATION_TASKS : aliased RTEMS.INITIALIZATION_TASKS_TABLE( 1 .. 1 ) :=
- (1=>
- (
- RTEMS.BUILD_NAME( 'U', 'I', '1', ' ' ), -- task name
- 2048, -- stack size
- 1, -- priority
- RTEMS.DEFAULT_ATTRIBUTES, -- attributes
- MPTEST.INIT'ACCESS, -- entry point
- RTEMS.TIMESLICE, -- initial mode
- 0 -- argument list
- )
- );
-
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
--- BEGIN SUBPACKAGE --
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-
- --
- -- MPTEST.PER_NODE_CONFIGURATION / SPECIFICATION
- --
- -- DESCRIPTION:
- --
- -- This package is the specification for the subpackage
- -- which will define the per node configuration parameters.
- --
-
- package PER_NODE_CONFIGURATION is
-
- --
- -- LOCAL_NODE_NUMBER
- --
- -- DESCRIPTION:
- --
- -- This function returns the node number for this node.
- --
-
- function LOCAL_NODE_NUMBER
- return RTEMS.UNSIGNED32;
-
- pragma INLINE ( LOCAL_NODE_NUMBER );
-
- end PER_NODE_CONFIGURATION;
-
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
--- END SUBPACKAGE --
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-
---
--- This is the Multiprocessor Configuration Table for this test.
---
-
- MULTIPROCESSING_CONFIGURATION : aliased RTEMS.MULTIPROCESSING_TABLE := (
- MPTEST.PER_NODE_CONFIGURATION.LOCAL_NODE_NUMBER,
- 2, -- maximum # nodes in system
- 32, -- maximum # global objects
- 32 -- maximum # proxies
- );
-
---
--- This is the Configuration Table for this test.
---
-
- CONFIGURATION : aliased RTEMS.CONFIGURATION_TABLE := (
- RTEMS.NULL_ADDRESS, -- will be replaced by BSP
- 64 * 1024, -- executive RAM size
- 10, -- maximum # tasks
- 12, -- maximum # timers
- 1, -- maximum # semaphores
- 1, -- maximum # message queues
- 1, -- maximum # messages
- 1, -- maximum # partitions
- 0, -- maximum # regions
- 0, -- maximum # dp memory areas
- 0, -- maximum # periods
- 0, -- maximum # user extensions
- RTEMS.MILLISECONDS_TO_MICROSECONDS(10), -- # us in a tick
- 1 -- # ticks in a timeslice
- );
-
-end MPTEST;
diff --git a/c/src/ada-tests/mptests/mp14/node1/mp14.scn b/c/src/ada-tests/mptests/mp14/node1/mp14.scn
deleted file mode 100644
index d1b6feefe9..0000000000
--- a/c/src/ada-tests/mptests/mp14/node1/mp14.scn
+++ /dev/null
@@ -1,33 +0,0 @@
-*** TEST 14 -- NODE 1 ***
-Creating Semaphore (Global)
-Creating Message Queue (Global)
-Creating Partition (Global)
-Creating Event task (Global)
-Starting Event task (Global)
-Creating Semaphore task (Global)
-About to go to sleep!
-Starting Semaphore task (Global)
-Creating Message Queue task (Global)
-Getting SMID of semaphore
-Starting Message Queue task (Global)
-Creating Partition task (Global)
-Getting ID of msg queue
-Starting Partition task (Global)
-Getting ID of partition
-Waking up!
-Remote task's name is : 222
-Getting TID of remote task
-Sending events to remote task
-<stream of following characters>
-. - indicates 100 iterations of
-tm_evafter of 1 tick and event_receive.
-e - indicates that 100
-events have been sent to the remote task.
-m - indicates 100 iterations of
-message_queue_send and message_queue_receive.
-p - indicates 100 iterations of
-partition_get_buffer and partition_return_buffer.
-s - indicates 100 iterations of
-semaphore_obtain and semaphore_release.
-NOTE: The characters in the stream could begin to appear whenever any
-task is started.
diff --git a/c/src/ada-tests/mptests/mp14/node1/mptest-per_node_configuration.adb b/c/src/ada-tests/mptests/mp14/node1/mptest-per_node_configuration.adb
deleted file mode 100644
index 7df5087537..0000000000
--- a/c/src/ada-tests/mptests/mp14/node1/mptest-per_node_configuration.adb
+++ /dev/null
@@ -1,43 +0,0 @@
---
--- MPTEST.PER_NODE_CONFIGURATION / BODY
---
--- DESCRIPTION:
---
--- This package is the specification for the subpackage
--- which will define the per node configuration parameters.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-separate ( MPTEST )
-
-package body PER_NODE_CONFIGURATION is
-
---PAGE
---
--- LOCAL_NODE_NUMBER
---
-
- function LOCAL_NODE_NUMBER
- return RTEMS.UNSIGNED32 is
- begin
-
- return 1;
-
- end LOCAL_NODE_NUMBER;
-
-end PER_NODE_CONFIGURATION;
diff --git a/c/src/ada-tests/mptests/mp14/node2/mp14.scn b/c/src/ada-tests/mptests/mp14/node2/mp14.scn
deleted file mode 100644
index a245b11faa..0000000000
--- a/c/src/ada-tests/mptests/mp14/node2/mp14.scn
+++ /dev/null
@@ -1,28 +0,0 @@
-*** TEST 14 -- NODE 2 ***
-Creating Event task (Global)
-Starting Event task (Global)
-Creating Semaphore task (Global)
-About to go to sleep!
-Starting Semaphore task (Global)
-Creating Message Queue task (Global)
-Getting SMID of semaphore
-Starting Message Queue task (Global)
-Creating Partition task (Global)
-Getting ID of msg queue
-Starting Partition task (Global)
-Getting ID of partition
-Waking up!
-Remote task's name is : 111
-Getting TID of remote task
-Receiving events from remote task
-<stream of following characters>
-. - indicates 100 iterations of
-tm_evafter of 1 tick and event_receive.
-e - indicates that 100
-events have been sent to the remote task.
-m - indicates 100 iterations of
-message_queue_send and message_queue_receive.
-p - indicates 100 iterations of
-partition_get_buffer and partition_return_buffer.
-s - indicates 100 iterations of
-semaphore_obtain and semaphore_release.
diff --git a/c/src/ada-tests/mptests/mp14/node2/mptest-per_node_configuration.adb b/c/src/ada-tests/mptests/mp14/node2/mptest-per_node_configuration.adb
deleted file mode 100644
index e127cc5573..0000000000
--- a/c/src/ada-tests/mptests/mp14/node2/mptest-per_node_configuration.adb
+++ /dev/null
@@ -1,43 +0,0 @@
---
--- MPTEST.PER_NODE_CONFIGURATION / BODY
---
--- DESCRIPTION:
---
--- This package is the specification for the subpackage
--- which will define the per node configuration parameters.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-separate ( MPTEST )
-
-package body PER_NODE_CONFIGURATION is
-
---PAGE
---
--- LOCAL_NODE_NUMBER
---
-
- function LOCAL_NODE_NUMBER
- return RTEMS.UNSIGNED32 is
- begin
-
- return 2;
-
- end LOCAL_NODE_NUMBER;
-
-end PER_NODE_CONFIGURATION;
diff --git a/c/src/ada-tests/samples/base_mp/mptest.adb b/c/src/ada-tests/samples/base_mp/mptest.adb
deleted file mode 100644
index 61990654b4..0000000000
--- a/c/src/ada-tests/samples/base_mp/mptest.adb
+++ /dev/null
@@ -1,108 +0,0 @@
---
--- MPTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation for Test 1 of the RTEMS
--- Multiprocessor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with TEST_SUPPORT;
-with TEXT_IO;
-with UNSIGNED32_IO;
-
-package body MPTEST is
-
- package body PER_NODE_CONFIGURATION is separate;
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- C : RTEMS.CHARACTER;
- TIME : RTEMS.TIME_OF_DAY;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT( "*** SAMPLE MULTIPROCESSOR APPLICATION ***" );
- TEXT_IO.PUT( "Creating and starting an application task" );
-
-
- MPTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME( 'T', 'A', '1', ' ' );
-
- RTEMS.TASK_CREATE(
- MPTEST.TASK_NAME( 1 ),
- 1,
- 2048,
- RTEMS.INTERRUPT_LEVEL( 0 ),
- RTEMS.DEFAULT_ATTRIBUTES,
- MPTEST.TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA1" );
-
- RTEMS.TASK_START(
- MPTEST.TASK_ID( 1 ),
- MPTEST.APPLICATION_TASK'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA1" );
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- APPLICATION_TASK
---
-
- procedure APPLICATION_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- TIME : RTEMS.TIME_OF_DAY;
- TID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.TASK_IDENT( RTEMS.SELF, RTEMS.SEARCH_ALL_NODES, TID, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_IDENT OF SELF" );
-
- TEXT_IO.PUT( "This task was invoked with node argument (" );
- UNSIGNED32_IO.PUT( ARGUMENT );
- TEXT_IO.PUT_LINE( ")" );
-
- TEXT_IO.PUT( "This task has the id of 0x" );
- UNSIGNED32_IO.PUT( TID, BASE => 16 );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT_LINE( "*** END OF SAMPLE MULTIPROCESSOR APPLICATION ***" );
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end APPLICATION_TASK;
-
-end MPTEST;
diff --git a/c/src/ada-tests/samples/base_mp/mptest.ads b/c/src/ada-tests/samples/base_mp/mptest.ads
deleted file mode 100644
index 7b76581a62..0000000000
--- a/c/src/ada-tests/samples/base_mp/mptest.ads
+++ /dev/null
@@ -1,166 +0,0 @@
---
--- MPTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 1 of the RTEMS
--- Multiprocessor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with BSP_MPCI;
-with RTEMS;
-
-package MPTEST is
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
- TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- APPLICATION_TASK
---
--- DESCRIPTION:
---
--- This routine is as an example of an application task which
--- prints a message including its RTEMS task id. This task
--- then invokes exit to return to the monitor.
---
-
- procedure APPLICATION_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- This is the Driver Address Table for this test.
---
-
- DEVICE_DRIVERS : aliased RTEMS.DRIVER_ADDRESS_TABLE( 1 .. 1 ) :=
- (1=>
- (
- CLOCK_DRIVER.INITIALIZE'ACCESS, -- Initialization
- RTEMS.NO_DRIVER_ENTRY, -- Open
- RTEMS.NO_DRIVER_ENTRY, -- Close
- RTEMS.NO_DRIVER_ENTRY, -- Read
- RTEMS.NO_DRIVER_ENTRY, -- Write
- RTEMS.NO_DRIVER_ENTRY -- Control
- )
- );
-
---
--- This is the Initialization Tasks Table for this test.
---
-
- INITIALIZATION_TASKS : aliased RTEMS.INITIALIZATION_TASKS_TABLE( 1 .. 1 ) :=
- (1=>
- (
- RTEMS.BUILD_NAME( 'U', 'I', '1', ' ' ), -- task name
- 2048, -- stack size
- 1, -- priority
- RTEMS.GLOBAL, -- attributes
- MPTEST.INIT'ACCESS, -- entry point
- RTEMS.NO_PREEMPT, -- initial mode
- 0 -- argument list
- )
- );
-
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
--- BEGIN SUBPACKAGE --
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-
- --
- -- MPTEST.PER_NODE_CONFIGURATION / SPECIFICATION
- --
- -- DESCRIPTION:
- --
- -- This package is the specification for the subpackage
- -- which will define the per node configuration parameters.
- --
-
- package PER_NODE_CONFIGURATION is
-
- --
- -- LOCAL_NODE_NUMBER
- --
- -- DESCRIPTION:
- --
- -- This function returns the node number for this node.
- --
-
- function LOCAL_NODE_NUMBER
- return RTEMS.UNSIGNED32;
-
- pragma INLINE ( LOCAL_NODE_NUMBER );
-
- end PER_NODE_CONFIGURATION;
-
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
--- END SUBPACKAGE --
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-
---
--- This is the Multiprocessor Configuration Table for this test.
---
-
- MULTIPROCESSING_CONFIGURATION : aliased RTEMS.MULTIPROCESSING_TABLE := (
- MPTEST.PER_NODE_CONFIGURATION.LOCAL_NODE_NUMBER,
- 2, -- maximum # nodes in system
- 33, -- maximum # global objects
- 33 -- maximum # proxies
- );
-
---
--- This is the Configuration Table for this test.
---
-
- CONFIGURATION : aliased RTEMS.CONFIGURATION_TABLE := (
- RTEMS.NULL_ADDRESS, -- will be replaced by BSP
- 64 * 1024, -- executive RAM size
- 10, -- maximum # tasks
- 0, -- maximum # timers
- 0, -- maximum # semaphores
- 0, -- maximum # message queues
- 0, -- maximum # messages
- 0, -- maximum # partitions
- 0, -- maximum # regions
- 0, -- maximum # dp memory areas
- 0, -- maximum # periods
- 0, -- maximum # user extensions
- RTEMS.MILLISECONDS_TO_MICROSECONDS(10), -- # us in a tick
- 50 -- # ticks in a timeslice
- );
-
-end MPTEST;
diff --git a/c/src/ada-tests/samples/base_mp/node1/base_mp.scn b/c/src/ada-tests/samples/base_mp/node1/base_mp.scn
deleted file mode 100644
index a2d2f359be..0000000000
--- a/c/src/ada-tests/samples/base_mp/node1/base_mp.scn
+++ /dev/null
@@ -1,5 +0,0 @@
-*** SAMPLE MULTIPROCESSOR APPLICATION ***
-Creating and starting an application task
-This task was invoked with the node argument (1)
-This task has the id of 0x10002
-*** END OF SAMPLE MULTIPROCESSOR APPLICATION ***
diff --git a/c/src/ada-tests/samples/base_mp/node1/mptest-per_node_configuration.adb b/c/src/ada-tests/samples/base_mp/node1/mptest-per_node_configuration.adb
deleted file mode 100644
index 7df5087537..0000000000
--- a/c/src/ada-tests/samples/base_mp/node1/mptest-per_node_configuration.adb
+++ /dev/null
@@ -1,43 +0,0 @@
---
--- MPTEST.PER_NODE_CONFIGURATION / BODY
---
--- DESCRIPTION:
---
--- This package is the specification for the subpackage
--- which will define the per node configuration parameters.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-separate ( MPTEST )
-
-package body PER_NODE_CONFIGURATION is
-
---PAGE
---
--- LOCAL_NODE_NUMBER
---
-
- function LOCAL_NODE_NUMBER
- return RTEMS.UNSIGNED32 is
- begin
-
- return 1;
-
- end LOCAL_NODE_NUMBER;
-
-end PER_NODE_CONFIGURATION;
diff --git a/c/src/ada-tests/samples/base_mp/node2/base_mp.scn b/c/src/ada-tests/samples/base_mp/node2/base_mp.scn
deleted file mode 100644
index 95bc96a808..0000000000
--- a/c/src/ada-tests/samples/base_mp/node2/base_mp.scn
+++ /dev/null
@@ -1,5 +0,0 @@
-*** SAMPLE MULTIPROCESSOR APPLICATION ***
-Creating and starting an application task
-This task was invoked with the node argument (2)
-This task has the id of 0x20002
-*** END OF SAMPLE MULTIPROCESSOR APPLICATION ***
diff --git a/c/src/ada-tests/samples/base_mp/node2/mptest-per_node_configuration.adb b/c/src/ada-tests/samples/base_mp/node2/mptest-per_node_configuration.adb
deleted file mode 100644
index e127cc5573..0000000000
--- a/c/src/ada-tests/samples/base_mp/node2/mptest-per_node_configuration.adb
+++ /dev/null
@@ -1,43 +0,0 @@
---
--- MPTEST.PER_NODE_CONFIGURATION / BODY
---
--- DESCRIPTION:
---
--- This package is the specification for the subpackage
--- which will define the per node configuration parameters.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-separate ( MPTEST )
-
-package body PER_NODE_CONFIGURATION is
-
---PAGE
---
--- LOCAL_NODE_NUMBER
---
-
- function LOCAL_NODE_NUMBER
- return RTEMS.UNSIGNED32 is
- begin
-
- return 2;
-
- end LOCAL_NODE_NUMBER;
-
-end PER_NODE_CONFIGURATION;
diff --git a/c/src/ada-tests/samples/base_sp/base_sp.adb b/c/src/ada-tests/samples/base_sp/base_sp.adb
deleted file mode 100644
index 0800b3da48..0000000000
--- a/c/src/ada-tests/samples/base_sp/base_sp.adb
+++ /dev/null
@@ -1,58 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Base Single Process Example of the
--- Sample Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with SPTEST;
-with TEST_SUPPORT;
-
-procedure Base_SP is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- SPTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end Base_SP;
-
diff --git a/c/src/ada-tests/samples/base_sp/base_sp.scn b/c/src/ada-tests/samples/base_sp/base_sp.scn
deleted file mode 100644
index 90794be60c..0000000000
--- a/c/src/ada-tests/samples/base_sp/base_sp.scn
+++ /dev/null
@@ -1,4 +0,0 @@
-*** SAMPLE SINGLE PROCESSOR APPLICATION ***
-Creating and starting an application task
-Application task was invoked with argument (0) and has id of 0x10002
-*** END OF SAMPLE SINGLE PROCESSOR APPLICATION ***
diff --git a/c/src/ada-tests/samples/base_sp/config.h b/c/src/ada-tests/samples/base_sp/config.h
deleted file mode 100644
index bfb614cd4e..0000000000
--- a/c/src/ada-tests/samples/base_sp/config.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/samples/base_sp/sptest.adb b/c/src/ada-tests/samples/base_sp/sptest.adb
deleted file mode 100644
index 5ae17e18da..0000000000
--- a/c/src/ada-tests/samples/base_sp/sptest.adb
+++ /dev/null
@@ -1,98 +0,0 @@
---
--- SPTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 1 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with TEST_SUPPORT;
-with TEXT_IO;
-with UNSIGNED32_IO;
-
-package body SPTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** SAMPLE SINGLE PROCESSOR APPLICATION ***" );
- TEXT_IO.PUT_LINE( "Creating and starting an application task" );
-
- SPTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME( 'T', 'A', '1', ' ' );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 1 ),
- 1,
- 2048,
- RTEMS.INTERRUPT_LEVEL( 0 ),
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA1" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 1 ),
- SPTEST.APPLICATION_TASK'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA1" );
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- APPLICATION_TASK
---
-
- procedure APPLICATION_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- TID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.TASK_IDENT( RTEMS.SELF, RTEMS.SEARCH_ALL_NODES, TID, STATUS );
-
- TEXT_IO.PUT( "Application task was invoked with argument (" );
- UNSIGNED32_IO.PUT( ARGUMENT );
- TEXT_IO.PUT( ") and has id of 0x" );
- UNSIGNED32_IO.PUT( TID, BASE => 16 );
-
- TEXT_IO.PUT_LINE( "*** END OF SAMPLE SINGLE PROCESSOR APPLICATION ***" );
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end APPLICATION_TASK;
-
-end SPTEST;
diff --git a/c/src/ada-tests/samples/base_sp/sptest.ads b/c/src/ada-tests/samples/base_sp/sptest.ads
deleted file mode 100644
index 62ed876e9f..0000000000
--- a/c/src/ada-tests/samples/base_sp/sptest.ads
+++ /dev/null
@@ -1,60 +0,0 @@
---
--- SPTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 1 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-package SPTEST is
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
- TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- APPLICATION_TASK
---
--- DESCRIPTION:
---
--- This is the body of the RTEMS task which constitutes this test.
---
-
- procedure APPLICATION_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end SPTEST;
diff --git a/c/src/ada-tests/samples/hello/config.h b/c/src/ada-tests/samples/hello/config.h
deleted file mode 100644
index 32dae5a93d..0000000000
--- a/c/src/ada-tests/samples/hello/config.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/samples/hello/hello.adb b/c/src/ada-tests/samples/hello/hello.adb
deleted file mode 100644
index d2fa9d1155..0000000000
--- a/c/src/ada-tests/samples/hello/hello.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test Hello of the Sample Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with SPTEST;
-with TEST_SUPPORT;
-
-procedure Hello is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- SPTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end Hello;
-
diff --git a/c/src/ada-tests/samples/hello/hello.scn b/c/src/ada-tests/samples/hello/hello.scn
deleted file mode 100644
index d9e92d81d5..0000000000
--- a/c/src/ada-tests/samples/hello/hello.scn
+++ /dev/null
@@ -1,3 +0,0 @@
-*** HELLO WORLD TEST ***
-Hello World
-*** END OF HELLO WORLD TEST ***
diff --git a/c/src/ada-tests/samples/hello/sptest.adb b/c/src/ada-tests/samples/hello/sptest.adb
deleted file mode 100644
index db2add4365..0000000000
--- a/c/src/ada-tests/samples/hello/sptest.adb
+++ /dev/null
@@ -1,52 +0,0 @@
---
--- SPTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 1 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with TEST_SUPPORT;
-with TEXT_IO;
-
-package body SPTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- TIME : RTEMS.TIME_OF_DAY;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** HELLO WORLD TEST ***" );
- TEXT_IO.PUT_LINE( "Hello World" );
- TEXT_IO.PUT_LINE( "*** END OF HELLO WORLD TEST ***" );
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end INIT;
-
-end SPTEST;
diff --git a/c/src/ada-tests/samples/hello/sptest.ads b/c/src/ada-tests/samples/hello/sptest.ads
deleted file mode 100644
index e632f1a499..0000000000
--- a/c/src/ada-tests/samples/hello/sptest.ads
+++ /dev/null
@@ -1,48 +0,0 @@
---
--- SPTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for the Hello World Test of the RTEMS
--- Sample Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-package SPTEST is
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
- TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end SPTEST;
diff --git a/c/src/ada-tests/samples/ticker/config.h b/c/src/ada-tests/samples/ticker/config.h
deleted file mode 100644
index bfb614cd4e..0000000000
--- a/c/src/ada-tests/samples/ticker/config.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/samples/ticker/sptest.adb b/c/src/ada-tests/samples/ticker/sptest.adb
deleted file mode 100644
index c755f3783d..0000000000
--- a/c/src/ada-tests/samples/ticker/sptest.adb
+++ /dev/null
@@ -1,162 +0,0 @@
---
--- SPTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 1 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with TEST_SUPPORT;
-with TEXT_IO;
-
-package body SPTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- TIME : RTEMS.TIME_OF_DAY;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TEST 1 ***" );
-
- TIME := ( 1988, 12, 31, 9, 0, 0, 0 );
-
- RTEMS.CLOCK_SET( TIME, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_SET" );
-
- SPTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME( 'T', 'A', '1', ' ' );
- SPTEST.TASK_NAME( 2 ) := RTEMS.BUILD_NAME( 'T', 'A', '2', ' ' );
- SPTEST.TASK_NAME( 3 ) := RTEMS.BUILD_NAME( 'T', 'A', '3', ' ' );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 1 ),
- 1,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA1" );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 2 ),
- 1,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 2 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA2" );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 3 ),
- 1,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 3 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA3" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 1 ),
- SPTEST.TASK_1_THROUGH_3'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA1" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 2 ),
- SPTEST.TASK_1_THROUGH_3'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA2" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 3 ),
- SPTEST.TASK_1_THROUGH_3'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA3" );
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- TASK_1_THROUGH_3
---
-
- procedure TASK_1_THROUGH_3 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- TID : RTEMS.ID;
- TIME : RTEMS.TIME_OF_DAY;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.TASK_IDENT( RTEMS.SELF, RTEMS.SEARCH_ALL_NODES, TID, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_IDENT OF SELF" );
-
- loop
-
- RTEMS.CLOCK_GET( RTEMS.CLOCK_GET_TOD, TIME'ADDRESS, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_GET" );
-
- if TIME.SECOND >= 35 then
- TEXT_IO.PUT_LINE( "*** END OF CLOCK TICK TEST ***" );
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
- end if;
-
- TEST_SUPPORT.PUT_NAME(
- SPTEST.TASK_NAME( TEST_SUPPORT.TASK_NUMBER( TID ) ),
- FALSE
- );
-
- TEST_SUPPORT.PRINT_TIME( "- clock_get - ", TIME, "" );
- TEXT_IO.NEW_LINE;
-
- RTEMS.TASK_WAKE_AFTER(
- TEST_SUPPORT.TASK_NUMBER( TID ) * 5 *
- TEST_SUPPORT.TICKS_PER_SECOND,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- end loop;
-
- end TASK_1_THROUGH_3;
-
-end SPTEST;
diff --git a/c/src/ada-tests/samples/ticker/sptest.ads b/c/src/ada-tests/samples/ticker/sptest.ads
deleted file mode 100644
index e03ccd0e64..0000000000
--- a/c/src/ada-tests/samples/ticker/sptest.ads
+++ /dev/null
@@ -1,60 +0,0 @@
---
--- SPTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 1 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-package SPTEST is
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
- TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_1_THROUGH_3
---
--- DESCRIPTION:
---
--- This is the body of the RTEMS tasks which constitute this test.
---
-
- procedure TASK_1_THROUGH_3 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end SPTEST;
diff --git a/c/src/ada-tests/samples/ticker/ticker.adb b/c/src/ada-tests/samples/ticker/ticker.adb
deleted file mode 100644
index dff51ce83b..0000000000
--- a/c/src/ada-tests/samples/ticker/ticker.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test Ticker of the Sample Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with SPTEST;
-with TEST_SUPPORT;
-
-procedure Ticker is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- SPTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end Ticker;
-
diff --git a/c/src/ada-tests/samples/ticker/ticker.scn b/c/src/ada-tests/samples/ticker/ticker.scn
deleted file mode 100644
index b95fee033f..0000000000
--- a/c/src/ada-tests/samples/ticker/ticker.scn
+++ /dev/null
@@ -1,16 +0,0 @@
-*** CLOCK TICK TEST ***
-TA1 - clock_get - 9: 0: 0 12/31/1988
-TA2 - clock_get - 9: 0: 0 12/31/1988
-TA3 - clock_get - 9: 0: 0 12/31/1988
-TA1 - clock_get - 9: 0: 5 12/31/1988
-TA2 - clock_get - 9: 0:10 12/31/1988
-TA1 - clock_get - 9: 0:10 12/31/1988
-TA1 - clock_get - 9: 0:15 12/31/1988
-TA3 - clock_get - 9: 0:15 12/31/1988
-TA2 - clock_get - 9: 0:20 12/31/1988
-TA1 - clock_get - 9: 0:20 12/31/1988
-TA1 - clock_get - 9: 0:25 12/31/1988
-TA2 - clock_get - 9: 0:30 12/31/1988
-TA1 - clock_get - 9: 0:30 12/31/1988
-TA3 - clock_get - 9: 0:30 12/31/1988
-*** END OF CLOCK TICK TEST ***
diff --git a/c/src/ada-tests/sptests/sp01/config.h b/c/src/ada-tests/sptests/sp01/config.h
deleted file mode 100644
index bfb614cd4e..0000000000
--- a/c/src/ada-tests/sptests/sp01/config.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/sptests/sp01/sp01.adb b/c/src/ada-tests/sptests/sp01/sp01.adb
deleted file mode 100644
index c1264df6f3..0000000000
--- a/c/src/ada-tests/sptests/sp01/sp01.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test SP01 of the Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with SPTEST;
-with TEST_SUPPORT;
-
-procedure SP01 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- SPTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end SP01;
-
diff --git a/c/src/ada-tests/sptests/sp01/sp01.scn b/c/src/ada-tests/sptests/sp01/sp01.scn
deleted file mode 100644
index dac3add1f2..0000000000
--- a/c/src/ada-tests/sptests/sp01/sp01.scn
+++ /dev/null
@@ -1,16 +0,0 @@
-*** TEST 1 ***
-TA1 - clock_get - 9: 0: 0 12/31/1988
-TA2 - clock_get - 9: 0: 0 12/31/1988
-TA3 - clock_get - 9: 0: 0 12/31/1988
-TA1 - clock_get - 9: 0: 5 12/31/1988
-TA2 - clock_get - 9: 0:10 12/31/1988
-TA1 - clock_get - 9: 0:10 12/31/1988
-TA3 - clock_get - 9: 0:15 12/31/1988
-TA1 - clock_get - 9: 0:15 12/31/1988
-TA2 - clock_get - 9: 0:20 12/31/1988
-TA1 - clock_get - 9: 0:20 12/31/1988
-TA1 - clock_get - 9: 0:25 12/31/1988
-TA3 - clock_get - 9: 0:30 12/31/1988
-TA1 - clock_get - 9: 0:30 12/31/1988
-TA2 - clock_get - 9: 0:30 12/31/1988
-*** END OF TEST 1 ***
diff --git a/c/src/ada-tests/sptests/sp01/sptest.adb b/c/src/ada-tests/sptests/sp01/sptest.adb
deleted file mode 100644
index e74a80c0cf..0000000000
--- a/c/src/ada-tests/sptests/sp01/sptest.adb
+++ /dev/null
@@ -1,162 +0,0 @@
---
--- SPTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 1 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with TEST_SUPPORT;
-with TEXT_IO;
-
-package body SPTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- TIME : RTEMS.TIME_OF_DAY;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TEST 1 ***" );
-
- TIME := ( 1988, 12, 31, 9, 0, 0, 0 );
-
- RTEMS.CLOCK_SET( TIME, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_SET" );
-
- SPTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME( 'T', 'A', '1', ' ' );
- SPTEST.TASK_NAME( 2 ) := RTEMS.BUILD_NAME( 'T', 'A', '2', ' ' );
- SPTEST.TASK_NAME( 3 ) := RTEMS.BUILD_NAME( 'T', 'A', '3', ' ' );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 1 ),
- 1,
- 2048,
- RTEMS.INTERRUPT_LEVEL( 31 ),
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA1" );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 2 ),
- 1,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 2 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA2" );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 3 ),
- 1,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 3 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA3" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 1 ),
- SPTEST.TASK_1_THROUGH_3'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA1" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 2 ),
- SPTEST.TASK_1_THROUGH_3'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA2" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 3 ),
- SPTEST.TASK_1_THROUGH_3'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA3" );
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- TASK_1_THROUGH_3
---
-
- procedure TASK_1_THROUGH_3 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- TID : RTEMS.ID;
- TIME : RTEMS.TIME_OF_DAY;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.TASK_IDENT( RTEMS.SELF, RTEMS.SEARCH_ALL_NODES, TID, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_IDENT OF SELF" );
-
- loop
-
- RTEMS.CLOCK_GET( RTEMS.CLOCK_GET_TOD, TIME'ADDRESS, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_GET" );
-
- if TIME.SECOND >= 35 then
- TEXT_IO.PUT_LINE( "*** END OF TEST 1 ***" );
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
- end if;
-
- TEST_SUPPORT.PUT_NAME(
- SPTEST.TASK_NAME( TEST_SUPPORT.TASK_NUMBER( TID ) ),
- FALSE
- );
-
- TEST_SUPPORT.PRINT_TIME( "- clock_get - ", TIME, "" );
- TEXT_IO.NEW_LINE;
-
- RTEMS.TASK_WAKE_AFTER(
- TEST_SUPPORT.TASK_NUMBER( TID ) * 5 *
- TEST_SUPPORT.TICKS_PER_SECOND,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- end loop;
-
- end TASK_1_THROUGH_3;
-
-end SPTEST;
diff --git a/c/src/ada-tests/sptests/sp01/sptest.ads b/c/src/ada-tests/sptests/sp01/sptest.ads
deleted file mode 100644
index e03ccd0e64..0000000000
--- a/c/src/ada-tests/sptests/sp01/sptest.ads
+++ /dev/null
@@ -1,60 +0,0 @@
---
--- SPTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 1 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-package SPTEST is
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
- TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_1_THROUGH_3
---
--- DESCRIPTION:
---
--- This is the body of the RTEMS tasks which constitute this test.
---
-
- procedure TASK_1_THROUGH_3 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end SPTEST;
diff --git a/c/src/ada-tests/sptests/sp02/config.h b/c/src/ada-tests/sptests/sp02/config.h
deleted file mode 100644
index bfb614cd4e..0000000000
--- a/c/src/ada-tests/sptests/sp02/config.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/sptests/sp02/sp02.adb b/c/src/ada-tests/sptests/sp02/sp02.adb
deleted file mode 100644
index e7c9631161..0000000000
--- a/c/src/ada-tests/sptests/sp02/sp02.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test SP02 of the Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with SPTEST;
-with TEST_SUPPORT;
-
-procedure SP02 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- SPTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end SP02;
-
diff --git a/c/src/ada-tests/sptests/sp02/sp02.scn b/c/src/ada-tests/sptests/sp02/sp02.scn
deleted file mode 100644
index 9db0bc4100..0000000000
--- a/c/src/ada-tests/sptests/sp02/sp02.scn
+++ /dev/null
@@ -1,15 +0,0 @@
-*** TEST 2 ***
-INIT - task_wake_after - yielding processor
-PREEMPT - task_delete - deleting self
-INIT - suspending TA2 while middle task on a ready chain
-TA1 - task_wake_after - sleep 1 second
-TA2 - task_wake_after - sleep 1 minute
-TA3 - task_wake_after - sleep 5 seconds
-TA1 - task_ident - tid of TA2 (16#10007#)
-TA1 - task_ident - tid of TA3 (16#10008#)
-TA1 - task_set_priority - set TA3's priority to 2
-TA1 - task_suspend - suspend TA2
-TA1 - task_delete - delete TA2
-TA1 - task_wake_after - sleep for 5 seconds
-TA3 - task_delete - delete self
-*** END OF TEST 2 ***
diff --git a/c/src/ada-tests/sptests/sp02/sptest.adb b/c/src/ada-tests/sptests/sp02/sptest.adb
deleted file mode 100644
index dd2b9172ac..0000000000
--- a/c/src/ada-tests/sptests/sp02/sptest.adb
+++ /dev/null
@@ -1,331 +0,0 @@
---
--- SPTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 2 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with TEST_SUPPORT;
-with TEXT_IO;
-with UNSIGNED32_IO;
-
-package body SPTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TEST 2 ***" );
-
- SPTEST.PREEMPT_TASK_NAME := RTEMS.BUILD_NAME( 'P', 'R', 'M', 'T' );
-
- RTEMS.TASK_CREATE(
- SPTEST.PREEMPT_TASK_NAME,
- 1,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.PREEMPT_TASK_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF PREEMPT" );
-
- RTEMS.TASK_START(
- SPTEST.PREEMPT_TASK_ID,
- SPTEST.PREEMPT_TASK'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF PREEMPT" );
-
- TEXT_IO.PUT_LINE( "INIT - task_wake_after - yielding processor" );
- RTEMS.TASK_WAKE_AFTER( RTEMS.YIELD_PROCESSOR, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- SPTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME( 'T', 'A', '1', ' ' );
- SPTEST.TASK_NAME( 2 ) := RTEMS.BUILD_NAME( 'T', 'A', '2', ' ' );
- SPTEST.TASK_NAME( 3 ) := RTEMS.BUILD_NAME( 'T', 'A', '3', ' ' );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 1 ),
- 3,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA1" );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 2 ),
- 3,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 2 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA2" );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 3 ),
- 3,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 3 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA3" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 1 ),
- SPTEST.TASK_1'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA1" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 2 ),
- SPTEST.TASK_2'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA2" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 3 ),
- SPTEST.TASK_3'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA3" );
-
- TEXT_IO.PUT_LINE(
- "INIT - suspending TA2 while middle task on a ready chain"
- );
-
- RTEMS.TASK_SUSPEND( SPTEST.TASK_ID( 2 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SUSPEND OF TA2" );
-
- RTEMS.TASK_DELETE( SPTEST.TASK_ID( 1 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF TA1" );
-
- RTEMS.TASK_DELETE( SPTEST.TASK_ID( 2 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF TA2" );
-
- RTEMS.TASK_DELETE( SPTEST.TASK_ID( 3 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF TA3" );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 1 ),
- 1,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA1" );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 2 ),
- 3,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 2 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA2" );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 3 ),
- 3,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 3 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA3" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 1 ),
- SPTEST.TASK_1'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA1" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 2 ),
- SPTEST.TASK_2'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA2" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 3 ),
- SPTEST.TASK_3'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA3" );
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- PREEMPT_TASK
---
-
- procedure PREEMPT_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.PUT_LINE( "PREEMPT - task_delete - deleting self" );
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF PREEMPT" );
-
- end PREEMPT_TASK;
-
---PAGE
---
--- TASK_1
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- TID2 : RTEMS.ID;
- TID3 : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
- PREVIOUS_PRIORITY : RTEMS.TASK_PRIORITY;
- begin
-
- TEXT_IO.PUT_LINE( "TA1 - task_wake_after - sleep 1 second" );
- RTEMS.TASK_WAKE_AFTER( TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- RTEMS.TASK_IDENT(
- SPTEST.TASK_NAME( 2 ),
- RTEMS.SEARCH_ALL_NODES,
- TID2,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_IDENT OF TA2" );
-
- TEXT_IO.PUT( "TA1 - task_ident - tid of TA2 (" );
- UNSIGNED32_IO.PUT( TID2, WIDTH => 8, BASE => 10#16# );
- TEXT_IO.PUT_LINE( ")" );
-
- RTEMS.TASK_IDENT(
- SPTEST.TASK_NAME( 3 ),
- RTEMS.SEARCH_ALL_NODES,
- TID3,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_IDENT OF TA3" );
-
- TEXT_IO.PUT( "TA1 - task_ident - tid of TA3 (" );
- UNSIGNED32_IO.PUT( TID3, WIDTH => 8, BASE => 10#16# );
- TEXT_IO.PUT_LINE( ")" );
-
- RTEMS.TASK_SET_PRIORITY( TID3, 2, PREVIOUS_PRIORITY, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SET_PRIORITY" );
-
- TEXT_IO.PUT_LINE(
- "TA1 - task_set_priority - set TA3's priority to 2"
- );
-
- TEXT_IO.PUT_LINE( "TA1 - task_suspend - suspend TA2" );
- RTEMS.TASK_SUSPEND( TID2, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SUSPEND OF TA2" );
-
- TEXT_IO.PUT_LINE( "TA1 - task_delete - delete TA2" );
- RTEMS.TASK_DELETE( TID2, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF TA2" );
-
- TEXT_IO.PUT_LINE( "TA1 - task_wake_after - sleep for 5 seconds" );
- RTEMS.TASK_WAKE_AFTER( 5 * TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- TEXT_IO.PUT_LINE( "*** END OF TEST 2 ***" );
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end TASK_1;
-
---PAGE
---
--- TASK_2
---
-
- procedure TASK_2 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.PUT_LINE( "TA2 - task_wake_after - sleep 1 minute" );
- RTEMS.TASK_WAKE_AFTER( 60 * TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER IN TA2" );
-
- end TASK_2;
-
---PAGE
---
--- TASK_3
---
-
- procedure TASK_3 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.PUT_LINE( "TA3 - task_wake_after - sleep 5 seconds" );
- RTEMS.TASK_WAKE_AFTER( 5 * TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER IN TA3" );
-
- TEXT_IO.PUT_LINE( "TA3 - task_delete - delete self" );
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF TA3" );
-
- end TASK_3;
-
-end SPTEST;
diff --git a/c/src/ada-tests/sptests/sp02/sptest.ads b/c/src/ada-tests/sptests/sp02/sptest.ads
deleted file mode 100644
index 2d5141f540..0000000000
--- a/c/src/ada-tests/sptests/sp02/sptest.ads
+++ /dev/null
@@ -1,99 +0,0 @@
---
--- SPTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 2 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-package SPTEST is
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
- TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
-
- PREEMPT_TASK_ID : RTEMS.ID;
- PREEMPT_TASK_NAME : RTEMS.NAME;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- PREEMPT_TASK
---
--- DESCRIPTION:
---
--- This RTEMS task tests the basic preemption capability.
---
-
- procedure PREEMPT_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_1
---
--- DESCRIPTION:
---
--- This RTEMS task tests some of the capabilities of the Task Manager.
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_2
---
--- DESCRIPTION:
---
--- This RTEMS task tests some of the capabilities of the Task Manager.
---
-
- procedure TASK_2 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_3
---
--- DESCRIPTION:
---
--- This RTEMS task tests some of the capabilities of the Task Manager.
---
-
- procedure TASK_3 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end SPTEST;
diff --git a/c/src/ada-tests/sptests/sp03/config.h b/c/src/ada-tests/sptests/sp03/config.h
deleted file mode 100644
index bfb614cd4e..0000000000
--- a/c/src/ada-tests/sptests/sp03/config.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/sptests/sp03/sp03.adb b/c/src/ada-tests/sptests/sp03/sp03.adb
deleted file mode 100644
index 5455671942..0000000000
--- a/c/src/ada-tests/sptests/sp03/sp03.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test SP03 of the Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with SPTEST;
-with TEST_SUPPORT;
-
-procedure SP03 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- SPTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end SP03;
-
diff --git a/c/src/ada-tests/sptests/sp03/sp03.scn b/c/src/ada-tests/sptests/sp03/sp03.scn
deleted file mode 100644
index a13d9ae2e6..0000000000
--- a/c/src/ada-tests/sptests/sp03/sp03.scn
+++ /dev/null
@@ -1,26 +0,0 @@
-*** TEST 3 ***
-TA1 sets clock: 9:15: 0 12/31/1988
-TA1 going to sleep: 9:15: 0 12/31/1988
-TA2 9:15: 1 12/31/1988
-TA2 9:15: 2 12/31/1988
-TA2 9:15: 3 12/31/1988
-TA2 9:15: 4 12/31/1988
-TA1 awakened: 9:15: 5 12/31/1988
-TA1 going to sleep: 9:15: 5 12/31/1988
-TA2 9:15: 5 12/31/1988
-TA2 9:15: 6 12/31/1988
-TA2 9:15: 7 12/31/1988
-TA2 9:15: 8 12/31/1988
-TA2 9:15: 9 12/31/1988
-TA1 awakened: 9:15:10 12/31/1988
-TA1 going to sleep: 9:15:10 12/31/1988
-TA2 9:15:10 12/31/1988
-TA2 9:15:11 12/31/1988
-TA2 9:15:12 12/31/1988
-TA2 9:15:13 12/31/1988
-TA2 9:15:14 12/31/1988
-TA1 awakened: 9:15:15 12/31/1988
-TA1 going to sleep: 9:15:15 12/31/1988
-TA2 9:15:15 12/31/1988
-TA2 9:15:16 12/31/1988
-*** END OF TEST 3 ***
diff --git a/c/src/ada-tests/sptests/sp03/sptest.adb b/c/src/ada-tests/sptests/sp03/sptest.adb
deleted file mode 100644
index 789740f0c3..0000000000
--- a/c/src/ada-tests/sptests/sp03/sptest.adb
+++ /dev/null
@@ -1,173 +0,0 @@
---
--- SPTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 3 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with TEST_SUPPORT;
-with TEXT_IO;
-
-package body SPTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- TIME : RTEMS.TIME_OF_DAY;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TEST 3 ***" );
-
- SPTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME( 'T', 'A', '1', ' ' );
- SPTEST.TASK_NAME( 2 ) := RTEMS.BUILD_NAME( 'T', 'A', '2', ' ' );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 1 ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA1" );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 2 ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 2 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA2" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 1 ),
- SPTEST.TASK_1'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA1" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 2 ),
- SPTEST.TASK_2'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA2" );
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- TASK_1
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- TIME : RTEMS.TIME_OF_DAY;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TIME := ( 1988, 12, 31, 9, 15, 0, 0 );
-
- RTEMS.CLOCK_SET( TIME, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_SET" );
-
- TEST_SUPPORT.PUT_NAME( SPTEST.TASK_NAME( 1 ), FALSE );
- TEST_SUPPORT.PRINT_TIME( "sets clock: ", TIME, "" );
- TEXT_IO.NEW_LINE;
-
- loop
-
- RTEMS.CLOCK_GET( RTEMS.CLOCK_GET_TOD, TIME'ADDRESS, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_GET" );
-
- TEST_SUPPORT.PUT_NAME( SPTEST.TASK_NAME( 1 ), FALSE );
- TEST_SUPPORT.PRINT_TIME( "going to sleep: ", TIME, "" );
- TEXT_IO.NEW_LINE;
-
- TIME.SECOND := TIME.SECOND + 5;
- TIME.MINUTE := TIME.MINUTE + (TIME.SECOND / 60 );
- TIME.SECOND := TIME.SECOND mod 60;
- TIME.HOUR := TIME.HOUR + (TIME.MINUTE / 60 );
- TIME.MINUTE := TIME.MINUTE mod 60;
- TIME.HOUR := TIME.HOUR mod 24;
-
- RTEMS.TASK_WAKE_WHEN( TIME, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_WHEN" );
-
- TEST_SUPPORT.PUT_NAME( SPTEST.TASK_NAME( 1 ), FALSE );
- TEST_SUPPORT.PRINT_TIME( "awakened: ", TIME, "" );
- TEXT_IO.NEW_LINE;
-
- end loop;
-
- end TASK_1;
-
---PAGE
---
--- TASK_2
---
-
- procedure TASK_2 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- TIME : RTEMS.TIME_OF_DAY;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- loop
-
- RTEMS.TASK_WAKE_AFTER( TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- RTEMS.CLOCK_GET( RTEMS.CLOCK_GET_TOD, TIME'ADDRESS, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_GET" );
-
- if TIME.SECOND >= 17 then
- TEXT_IO.PUT_LINE( "*** END OF TEST 3 ***" );
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
- end if;
-
- TEST_SUPPORT.PUT_NAME( SPTEST.TASK_NAME( 2 ), FALSE );
- TEST_SUPPORT.PRINT_TIME( " ", TIME, "" );
- TEXT_IO.NEW_LINE;
-
- end loop;
-
- end TASK_2;
-
-end SPTEST;
diff --git a/c/src/ada-tests/sptests/sp03/sptest.ads b/c/src/ada-tests/sptests/sp03/sptest.ads
deleted file mode 100644
index fda2add5e2..0000000000
--- a/c/src/ada-tests/sptests/sp03/sptest.ads
+++ /dev/null
@@ -1,74 +0,0 @@
---
--- SPTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 3 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-package SPTEST is
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
- TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_1
---
--- DESCRIPTION:
---
--- This RTEMS task tests the TASK_WAKE_WHEN directive of
--- the Task Manager.
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_1
---
--- DESCRIPTION:
---
--- This RTEMS task tests the TASK_WAKE_AFTER directive of
--- the Task Manager.
---
-
- procedure TASK_2 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end SPTEST;
diff --git a/c/src/ada-tests/sptests/sp04/README b/c/src/ada-tests/sptests/sp04/README
deleted file mode 100644
index 6928aaea49..0000000000
--- a/c/src/ada-tests/sptests/sp04/README
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# $Id$
-#
-
-This test is broken as it is currently implemented. It is illegal for
-a task to do Ada IO during a extension since the Ada run-time uses
-locks to safeguard data structures. Dispatching is disabled and the
-call to Text_IO in the Switch extension will lock the system up.
-
-The proper solution is to have the Switch extension lock task and
-time when it a switch occurs and have a single task print this
-information as necessary.
-
diff --git a/c/src/ada-tests/sptests/sp04/config.h b/c/src/ada-tests/sptests/sp04/config.h
deleted file mode 100644
index 8a9352ccc9..0000000000
--- a/c/src/ada-tests/sptests/sp04/config.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MAXIMUM_USER_EXTENSIONS 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 100
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/sptests/sp04/sp04.adb b/c/src/ada-tests/sptests/sp04/sp04.adb
deleted file mode 100644
index 511ccb36a5..0000000000
--- a/c/src/ada-tests/sptests/sp04/sp04.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test SP04 of the Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with SPTEST;
-with TEST_SUPPORT;
-
-procedure SP04 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- SPTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end SP04;
-
diff --git a/c/src/ada-tests/sptests/sp04/sp04.scn b/c/src/ada-tests/sptests/sp04/sp04.scn
deleted file mode 100644
index dc075e2b94..0000000000
--- a/c/src/ada-tests/sptests/sp04/sp04.scn
+++ /dev/null
@@ -1,23 +0,0 @@
-*** TEST 4 ***
-TA1 - 9:15: 0 12/31/1988
-TA1 - task_suspend - on Task 2
-TA1 - task_suspend - on Task 3
-TA1 - killing time
-TA1 - task_resume - on Task 2
-TA1 - task_resume - on Task 3
-TA2 - 9:15: 4 12/31/1988
-TA3 - 9:15: 5 12/31/1988
-TA1 - 9:15: 6 12/31/1988
-TA2 - 9:15: 7 12/31/1988
-TA3 - 9:15: 8 12/31/1988
-TA1 - 9:15: 9 12/31/1988
-TA1 - task_mode - change mode to NO PREEMPT
-TA1 - 9:15:10 12/31/1988
-TA1 - 9:15:11 12/31/1988
-TA1 - 9:15:12 12/31/1988
-TA1 - 9:15:13 12/31/1988
-TA1 - 9:15:14 12/31/1988
-TA1 - 9:15:15 12/31/1988
-TA1 - task_mode - change mode to PREEMPT
-TA2 - 9:15:16 12/31/1988
-*** END OF TEST 4 ***
diff --git a/c/src/ada-tests/sptests/sp04/sptest.adb b/c/src/ada-tests/sptests/sp04/sptest.adb
deleted file mode 100644
index 8056f9225e..0000000000
--- a/c/src/ada-tests/sptests/sp04/sptest.adb
+++ /dev/null
@@ -1,317 +0,0 @@
---
--- SPTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 4 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with TEST_SUPPORT;
-with TEXT_IO;
-
-package body SPTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- TIME : RTEMS.TIME_OF_DAY;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TEST 4 ***" );
-
- TIME := ( 1988, 12, 31, 9, 15, 0, 0 );
-
- RTEMS.CLOCK_SET( TIME, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_SET" );
-
- SPTEST.EXTENSION_NAME( 1 ) := RTEMS.BUILD_NAME( 'E', 'X', 'T', ' ' );
-
- RTEMS.EXTENSION_CREATE(
- SPTEST.EXTENSION_NAME( 1 ),
- SPTEST.EXTENSIONS'ACCESS,
- EXTENSION_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "EXTENSION_CREATE" );
-
- SPTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME( 'T', 'A', '1', ' ' );
- SPTEST.TASK_NAME( 2 ) := RTEMS.BUILD_NAME( 'T', 'A', '2', ' ' );
- SPTEST.TASK_NAME( 3 ) := RTEMS.BUILD_NAME( 'T', 'A', '3', ' ' );
-
- SPTEST.RUN_COUNT( 1 ) := 0;
- SPTEST.RUN_COUNT( 2 ) := 0;
- SPTEST.RUN_COUNT( 3 ) := 0;
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 1 ),
- 1,
- 2048,
- RTEMS.TIMESLICE,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA1" );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 2 ),
- 1,
- 2048,
- RTEMS.TIMESLICE,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 2 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA2" );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 3 ),
- 1,
- 2048,
- RTEMS.TIMESLICE,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 3 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA3" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 1 ),
- SPTEST.TASK_1'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA1" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 2 ),
- SPTEST.TASK_2'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA2" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 3 ),
- SPTEST.TASK_3'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA3" );
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- TASK_1
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- SECONDS : RTEMS.UNSIGNED32;
- OLD_SECONDS : RTEMS.UNSIGNED32;
- STARTED_DELAY : RTEMS.UNSIGNED32;
- PREVIOUS_MODE : RTEMS.MODE;
- TIME : RTEMS.TIME_OF_DAY;
- START_TIME : RTEMS.INTERVAL;
- END_TIME : RTEMS.INTERVAL;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.PUT_LINE( "TA1 - task_suspend - on Task 2" );
- RTEMS.TASK_SUSPEND( TASK_ID( 2 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SUSPEND OF TA2" );
-
- TEXT_IO.PUT_LINE( "TA1 - task_suspend - on Task 3" );
- RTEMS.TASK_SUSPEND( TASK_ID( 3 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SUSPEND OF TA3" );
-
- TEXT_IO.PUT_LINE( "TA1 - killing time" );
-
- RTEMS.CLOCK_GET(
- RTEMS.CLOCK_GET_SECONDS_SINCE_EPOCH,
- START_TIME'ADDRESS,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_GET" );
-
- loop
- RTEMS.CLOCK_GET(
- RTEMS.CLOCK_GET_SECONDS_SINCE_EPOCH,
- END_TIME'ADDRESS,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_GET" );
-
- exit when END_TIME > (START_TIME + 2);
- end loop;
-
- TEXT_IO.PUT_LINE( "TA1 - task_resume - on Task 2" );
- RTEMS.TASK_RESUME( TASK_ID( 2 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_RESUME OF TA2" );
-
- TEXT_IO.PUT_LINE( "TA1 - task_resume - on Task 3" );
- RTEMS.TASK_RESUME( TASK_ID( 3 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_RESUME OF TA3" );
-
- loop
-
- if SPTEST.RUN_COUNT( 1 ) = 3 then
-
- TEXT_IO.PUT_LINE(
- "TA1 - task_mode - change mode to NO PREEMPT"
- );
- RTEMS.TASK_MODE(
- RTEMS.NO_PREEMPT,
- RTEMS.PREEMPT_MASK,
- PREVIOUS_MODE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_MODE" );
-
- RTEMS.CLOCK_GET( RTEMS.CLOCK_GET_TOD, TIME'ADDRESS, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_GET" );
-
- OLD_SECONDS := TIME.SECOND;
-
- SECONDS := 0;
- loop
-
- exit when SECONDS >= 6;
-
- RTEMS.CLOCK_GET( RTEMS.CLOCK_GET_TOD, TIME'ADDRESS, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_GET" );
-
- if TIME.SECOND /= OLD_SECONDS then
- OLD_SECONDS := TIME.SECOND;
- SECONDS := SECONDS + 1;
- TEST_SUPPORT.PRINT_TIME( "TA1 - ", TIME, "" );
- TEXT_IO.NEW_LINE;
- end if;
-
- end loop;
-
- TEXT_IO.PUT_LINE(
- "TA1 - task_mode - change mode to PREEMPT"
- );
-
- RTEMS.TASK_MODE(
- RTEMS.PREEMPT,
- RTEMS.PREEMPT_MASK,
- PREVIOUS_MODE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_MODE" );
-
-<<LOOP_LABEL>>
- goto LOOP_LABEL;
-
- end if;
-
- end loop;
-
- end TASK_1;
-
---PAGE
---
--- TASK_2
---
-
- procedure TASK_2 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- begin
-
-<<LOOP_LABEL>>
- goto LOOP_LABEL;
-
- end TASK_2;
-
---PAGE
---
--- TASK_3
---
-
- procedure TASK_3 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- begin
-
-<<LOOP_LABEL>>
- goto LOOP_LABEL;
-
- end TASK_3;
-
---PAGE
---
--- TASK_SWITCH
---
-
- procedure TASK_SWITCH (
- UNUSED : in RTEMS.TCB_POINTER;
- HEIR : in RTEMS.TCB_POINTER
- ) is
- INDEX : RTEMS.UNSIGNED32;
- TIME : RTEMS.TIME_OF_DAY;
- STATUS : RTEMS.STATUS_CODES;
- function TCB_To_ID (
- TCB : RTEMS.TCB_POINTER
- ) return RTEMS.ID;
- pragma Import (C, TCB_To_ID, "tcb_to_id" );
-
- begin
-
- --INDEX := TEST_SUPPORT.TASK_NUMBER( HEIR.OBJECT.ID );
- INDEX := TCB_To_ID( HEIR );
-
- case INDEX is
- when 1 | 2 | 3 =>
- SPTEST.RUN_COUNT( INDEX ) := SPTEST.RUN_COUNT( INDEX ) + 1;
-
- RTEMS.CLOCK_GET( RTEMS.CLOCK_GET_TOD, TIME'ADDRESS, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_GET" );
-
- TEST_SUPPORT.PUT_NAME( SPTEST.TASK_NAME( INDEX ), FALSE );
- TEST_SUPPORT.PRINT_TIME( "- ", TIME, "" );
- TEXT_IO.NEW_LINE;
-
- if TIME.SECOND >= 16 then
- TEXT_IO.PUT_LINE( "*** END OF TEST 4 ***" );
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
- end if;
-
- when others =>
- NULL;
- end case;
-
- end TASK_SWITCH;
-
-end SPTEST;
diff --git a/c/src/ada-tests/sptests/sp04/sptest.ads b/c/src/ada-tests/sptests/sp04/sptest.ads
deleted file mode 100644
index ce3237bedd..0000000000
--- a/c/src/ada-tests/sptests/sp04/sptest.ads
+++ /dev/null
@@ -1,133 +0,0 @@
---
--- SPTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 4 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-package SPTEST is
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
- TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS extensions created
--- by this test.
---
-
- EXTENSION_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
- EXTENSION_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
-
---
--- This array contains the number of times each of the test tasks has
--- been context switched TO.
---
-
- RUN_COUNT : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.UNSIGNED32;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_1
---
--- DESCRIPTION:
---
--- This RTEMS task tests some of the capabilities of the Task Manager.
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_2
---
--- DESCRIPTION:
---
--- This RTEMS task is used as a background task to suspend, resume,
--- and context switch to.
---
-
- procedure TASK_2 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_3
---
--- DESCRIPTION:
---
--- This RTEMS task is used as a background task to suspend, resume,
--- and context switch to.
---
-
- procedure TASK_3 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_SWITCH
---
--- DESCRIPTION:
---
--- This subprogram is the TASK_SWITCH extension for this test.
--- It is invoked at each context switch and counts the number
--- of times each application task has been context switched to.
---
-
- procedure TASK_SWITCH (
- UNUSED : in RTEMS.TCB_POINTER;
- HEIR : in RTEMS.TCB_POINTER
- );
-
---
--- This is the User Extension Table for this test.
---
-
- EXTENSIONS : aliased RTEMS.EXTENSIONS_TABLE :=
- (
- NULL, -- Task create
- NULL, -- Task start
- NULL, -- Task restart
- NULL, -- Task delete
- SPTEST.TASK_SWITCH'ACCESS, -- Task switch
- NULL, -- Task post switch
- NULL, -- Task begin
- NULL, -- Task exitted
- NULL -- Fatal error
- );
-
-end SPTEST;
diff --git a/c/src/ada-tests/sptests/sp05/config.h b/c/src/ada-tests/sptests/sp05/config.h
deleted file mode 100644
index 7fc8c7580e..0000000000
--- a/c/src/ada-tests/sptests/sp05/config.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_TICKS_PER_TIMESLICE 100
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/sptests/sp05/sp05.adb b/c/src/ada-tests/sptests/sp05/sp05.adb
deleted file mode 100644
index bd6407a0c7..0000000000
--- a/c/src/ada-tests/sptests/sp05/sp05.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test SP05 of the Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with SPTEST;
-with TEST_SUPPORT;
-
-procedure SP05 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- SPTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end SP05;
-
diff --git a/c/src/ada-tests/sptests/sp05/sp05.scn b/c/src/ada-tests/sptests/sp05/sp05.scn
deleted file mode 100644
index 59c30a0b97..0000000000
--- a/c/src/ada-tests/sptests/sp05/sp05.scn
+++ /dev/null
@@ -1,48 +0,0 @@
-*** TEST 5 ***
-TA1 - task_wake_after - sleep 5 seconds
-TA2 - task_suspend - suspend self
-TA3 - task_suspend - suspend self
-TA1 - task_suspend - suspend TA3
-TA1 - task_resume - resume TA2
-TA1 - task_wake_after - sleep 5 seconds
-TA2 - task_wake_after - sleep 1 second
-TA2 - task_wake_after - sleep 1 second
-TA2 - task_wake_after - sleep 1 second
-TA2 - task_wake_after - sleep 1 second
-TA2 - task_wake_after - sleep 1 second
-TA1 - task_suspend - suspend TA2
-TA1 - task_resume - resume TA3
-TA1 - task_wake_after - sleep 5 seconds
-TA3 - task_wake_after - sleep 1 second
-TA3 - task_wake_after - sleep 1 second
-TA3 - task_wake_after - sleep 1 second
-TA3 - task_wake_after - sleep 1 second
-TA3 - task_wake_after - sleep 1 second
-TA1 - task_suspend - suspend TA3
-TA1 - task_resume - resume TA2
-TA1 - task_wake_after - sleep 5 seconds
-TA2 - task_wake_after - sleep 1 second
-TA2 - task_wake_after - sleep 1 second
-TA2 - task_wake_after - sleep 1 second
-TA2 - task_wake_after - sleep 1 second
-TA2 - task_wake_after - sleep 1 second
-TA1 - task_suspend - suspend TA2
-TA1 - task_resume - resume TA3
-TA1 - task_wake_after - sleep 5 seconds
-TA3 - task_wake_after - sleep 1 second
-TA3 - task_wake_after - sleep 1 second
-TA3 - task_wake_after - sleep 1 second
-TA3 - task_wake_after - sleep 1 second
-TA3 - task_wake_after - sleep 1 second
-TA1 - task_suspend - suspend TA3
-TA1 - task_resume - resume TA2
-TA1 - task_wake_after - sleep 5 seconds
-TA2 - task_wake_after - sleep 1 second
-TA2 - task_wake_after - sleep 1 second
-TA2 - task_wake_after - sleep 1 second
-TA2 - task_wake_after - sleep 1 second
-TA2 - task_wake_after - sleep 1 second
-TA1 - task_suspend - suspend TA2
-TA1 - task_resume - resume TA3
-*** END OF TEST 5 ***
-
diff --git a/c/src/ada-tests/sptests/sp05/sptest.adb b/c/src/ada-tests/sptests/sp05/sptest.adb
deleted file mode 100644
index 22d64fa54f..0000000000
--- a/c/src/ada-tests/sptests/sp05/sptest.adb
+++ /dev/null
@@ -1,229 +0,0 @@
---
--- SPTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 5 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with TEST_SUPPORT;
-with TEXT_IO;
-
-package body SPTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TEST 5 ***" );
-
- SPTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME( 'T', 'A', '1', ' ' );
- SPTEST.TASK_NAME( 2 ) := RTEMS.BUILD_NAME( 'T', 'A', '2', ' ' );
- SPTEST.TASK_NAME( 3 ) := RTEMS.BUILD_NAME( 'T', 'A', '3', ' ' );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 1 ),
- 1,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA1" );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 2 ),
- 1,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 2 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA2" );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 3 ),
- 1,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 3 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA3" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 1 ),
- SPTEST.TASK_1'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA1" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 2 ),
- SPTEST.TASK_2'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA2" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 3 ),
- SPTEST.TASK_3'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA3" );
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- TASK_1
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- TID2 : RTEMS.ID;
- TID3 : RTEMS.ID;
- PASS : RTEMS.UNSIGNED32;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.TASK_IDENT(
- SPTEST.TASK_NAME( 2 ),
- 1,
- TID2,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_IDENT OF TA2" );
-
- RTEMS.TASK_IDENT(
- SPTEST.TASK_NAME( 3 ),
- 1,
- TID3,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_IDENT OF TA3" );
-
- for PASS in 1 .. 3
- loop
-
- TEXT_IO.PUT_LINE( "TA1 - task_wake_after - sleep 5 seconds" );
- RTEMS.TASK_WAKE_AFTER( 5 * TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER OF TA1" );
-
- TEXT_IO.PUT_LINE( "TA1 - task_suspend - suspend TA3" );
- RTEMS.TASK_SUSPEND( TID3, STATUS );
- if PASS = 1 then
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.ALREADY_SUSPENDED,
- "TASK_SUSPEND OF TA3"
- );
- else
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SUSPEND OF TA3" );
- end if;
-
- TEXT_IO.PUT_LINE( "TA1 - task_resume - resume TA2" );
- RTEMS.TASK_RESUME( TID2, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_RESUME OF TA2" );
-
- TEXT_IO.PUT_LINE( "TA1 - task_wake_after - sleep 5 seconds" );
- RTEMS.TASK_WAKE_AFTER( 5 * TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- TEXT_IO.PUT_LINE( "TA1 - task_suspend - suspend TA2" );
- RTEMS.TASK_SUSPEND( TID2, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SUSPEND OF TA2" );
-
- TEXT_IO.PUT_LINE( "TA1 - task_resume - resume TA3" );
- RTEMS.TASK_RESUME( TID3, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_RESUME OF TA3" );
-
- end loop;
-
- TEXT_IO.PUT_LINE( "*** END OF TEST 5 ***" );
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end TASK_1;
-
---PAGE
---
--- TASK_2
---
-
- procedure TASK_2 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.PUT_LINE( "TA2 - task_suspend - suspend self" );
- RTEMS.TASK_SUSPEND( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SUSPEND OF TA2" );
-
- loop
- TEXT_IO.PUT_LINE( "TA2 - task_wake_after - sleep 1 second" );
- RTEMS.TASK_WAKE_AFTER( TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER OF TA2" );
- end loop;
-
- end TASK_2;
-
---PAGE
---
--- TASK_3
---
-
- procedure TASK_3 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.PUT_LINE( "TA3 - task_suspend - suspend self" );
- RTEMS.TASK_SUSPEND( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SUSPEND OF TA3" );
-
- loop
- TEXT_IO.PUT_LINE( "TA3 - task_wake_after - sleep 1 second" );
- RTEMS.TASK_WAKE_AFTER( TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER OF TA3" );
- end loop;
-
- end TASK_3;
-
-end SPTEST;
diff --git a/c/src/ada-tests/sptests/sp05/sptest.ads b/c/src/ada-tests/sptests/sp05/sptest.ads
deleted file mode 100644
index 74b2e956bc..0000000000
--- a/c/src/ada-tests/sptests/sp05/sptest.ads
+++ /dev/null
@@ -1,84 +0,0 @@
---
--- SPTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 5 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-package SPTEST is
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
- TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_1
---
--- DESCRIPTION:
---
--- This RTEMS task tests some of the capabilities of the Task Manager.
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_2
---
--- DESCRIPTION:
---
--- This RTEMS task tests some of the capabilities of the Task Manager.
---
-
- procedure TASK_2 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_3
---
--- DESCRIPTION:
---
--- This RTEMS task tests the Message Queue Manager.
---
-
- procedure TASK_3 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end SPTEST;
diff --git a/c/src/ada-tests/sptests/sp06/config.h b/c/src/ada-tests/sptests/sp06/config.h
deleted file mode 100644
index 7fc8c7580e..0000000000
--- a/c/src/ada-tests/sptests/sp06/config.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_TICKS_PER_TIMESLICE 100
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/sptests/sp06/sp06.adb b/c/src/ada-tests/sptests/sp06/sp06.adb
deleted file mode 100644
index 8cd49904d7..0000000000
--- a/c/src/ada-tests/sptests/sp06/sp06.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test SP06 of the Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with SPTEST;
-with TEST_SUPPORT;
-
-procedure SP06 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- SPTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end SP06;
-
diff --git a/c/src/ada-tests/sptests/sp06/sp06.scn b/c/src/ada-tests/sptests/sp06/sp06.scn
deleted file mode 100644
index 8dc6c6afae..0000000000
--- a/c/src/ada-tests/sptests/sp06/sp06.scn
+++ /dev/null
@@ -1,38 +0,0 @@
-*** TEST 6 ***
-TA1 - is beginning to run
-TA1 - restarting TA3
-TA2 - is beginning to run
-TA2 - task_wake_after - sleep 1/2 second
-TA2 - task_wake_after - sleep 1/2 second
-TA1 - task_restart - restarting TA2
-TA2 - is beginning to run
-TA2 - task_wake_after - sleep 1/2 second
-TA2 - task_wake_after - sleep 1/2 second
-TA1 - task_restart - restarting self
-TA2 - task_wake_after - sleep 1/2 second
-TA1 - is beginning to run
-TA2 - task_wake_after - sleep 1/2 second
-TA1 - task_restart - restarting TA2
-TA2 - is beginning to run
-TA2 - task_wake_after - sleep 1/2 second
-TA2 - task_wake_after - sleep 1/2 second
-TA1 - task_restart - restarting self
-TA2 - task_wake_after - sleep 1/2 second
-TA1 - is beginning to run
-TA2 - task_wake_after - sleep 1/2 second
-TA1 - task_restart - restarting TA2
-TA2 - is beginning to run
-TA2 - task_wake_after - sleep 1/2 second
-TA2 - task_wake_after - sleep 1/2 second
-TA1 - task_restart - restarting self
-TA2 - task_wake_after - sleep 1/2 second
-TA1 - is beginning to run
-TA2 - task_wake_after - sleep 1/2 second
-TA1 - task_restart - restarting TA2
-TA2 - is beginning to run
-TA2 - task_wake_after - sleep 1/2 second
-TA2 - task_wake_after - sleep 1/2 second
-TA1 - task_restart - restarting self
-TA2 - task_wake_after - sleep 1/2 second
-TA1 - is beginning to run
-*** END OF TEST 6 ***
diff --git a/c/src/ada-tests/sptests/sp06/sptest.adb b/c/src/ada-tests/sptests/sp06/sptest.adb
deleted file mode 100644
index db068639c0..0000000000
--- a/c/src/ada-tests/sptests/sp06/sptest.adb
+++ /dev/null
@@ -1,222 +0,0 @@
---
--- SPTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 6 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with TEST_SUPPORT;
-with TEXT_IO;
-
-package body SPTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- PREVIOUS_PRIORITY : RTEMS.TASK_PRIORITY;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TEST 6 ***" );
-
- SPTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME( 'T', 'A', '1', ' ' );
- SPTEST.TASK_NAME( 2 ) := RTEMS.BUILD_NAME( 'T', 'A', '2', ' ' );
- SPTEST.TASK_NAME( 3 ) := RTEMS.BUILD_NAME( 'T', 'A', '3', ' ' );
-
- SPTEST.ARGUMENT := 0;
- SPTEST.RESTART_ARGUMENT := 1;
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 1 ),
- 1,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA1" );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 2 ),
- 1,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 2 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA2" );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 3 ),
- 10,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 3 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA3" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 1 ),
- SPTEST.TASK_1'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA1" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 2 ),
- SPTEST.TASK_2'ACCESS,
- SPTEST.ARGUMENT,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA2" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 3 ),
- SPTEST.TASK_3'ACCESS,
- SPTEST.ARGUMENT,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA3" );
-
- RTEMS.TASK_SET_PRIORITY(
- SPTEST.TASK_ID( 3 ),
- 5,
- PREVIOUS_PRIORITY,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SET_PRIORITY OF TA3" );
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- TASK_1
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- PASS : RTEMS.UNSIGNED32;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.PUT_LINE( "TA1 - is beginning to run" );
-
- PASS := ARGUMENT + 1;
-
- if PASS = 5 then
- TEXT_IO.PUT_LINE( "*** END OF TEST 6 ***" );
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
- end if;
-
- if PASS = 1 then
- TEXT_IO.PUT_LINE( "TA1 - restarting TA3" );
- RTEMS.TASK_RESTART(
- SPTEST.TASK_ID( 3 ),
- SPTEST.RESTART_ARGUMENT,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_RESTART OF TA3" );
-
- RTEMS.TASK_WAKE_AFTER( 2 * TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- end if;
-
- RTEMS.TASK_WAKE_AFTER( TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- TEXT_IO.PUT_LINE( "TA1 - task_restart - restarting TA2" );
- RTEMS.TASK_RESTART(
- SPTEST.TASK_ID( 2 ),
- SPTEST.RESTART_ARGUMENT,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_RESTART OF TA2" );
-
- RTEMS.TASK_WAKE_AFTER( TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- TEXT_IO.PUT_LINE( "TA1 - task_restart - restarting self" );
- RTEMS.TASK_RESTART( SPTEST.TASK_ID( 1 ), PASS, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_RESTART OF SELF" );
-
- end TASK_1;
-
---PAGE
---
--- TASK_2
---
-
- procedure TASK_2 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.PUT_LINE( "TA2 - is beginning to run" );
-
- if ARGUMENT = SPTEST.ARGUMENT then
- RTEMS.TASK_WAKE_AFTER( 2 * TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
- end if;
-
- loop
-
- TEXT_IO.PUT_LINE( "TA2 - task_wake_after - sleep 1/2 second" );
- RTEMS.TASK_WAKE_AFTER( TEST_SUPPORT.TICKS_PER_SECOND / 2, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- end loop;
-
- end TASK_2;
-
---PAGE
---
--- TASK_3
---
-
- procedure TASK_3 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end TASK_3;
-
-end SPTEST;
diff --git a/c/src/ada-tests/sptests/sp06/sptest.ads b/c/src/ada-tests/sptests/sp06/sptest.ads
deleted file mode 100644
index 53d4825ec4..0000000000
--- a/c/src/ada-tests/sptests/sp06/sptest.ads
+++ /dev/null
@@ -1,91 +0,0 @@
---
--- SPTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 6 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-package SPTEST is
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
- TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
-
---
--- The following are used as arguments to the various RTEMS tasks
--- in this test to indicate when a restart should be performed.
-
- ARGUMENT : RTEMS.UNSIGNED32;
- RESTART_ARGUMENT : RTEMS.UNSIGNED32;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_1
---
--- DESCRIPTION:
---
--- This RTEMS task tests some of the capabilities of the Task Manager.
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_2
---
--- DESCRIPTION:
---
--- This RTEMS task tests some of the capabilities of the Task Manager.
---
-
- procedure TASK_2 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_3
---
--- DESCRIPTION:
---
--- This RTEMS task tests some of the capabilities of the Task Manager.
---
-
- procedure TASK_3 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end SPTEST;
diff --git a/c/src/ada-tests/sptests/sp07/config.h b/c/src/ada-tests/sptests/sp07/config.h
deleted file mode 100644
index 8a9352ccc9..0000000000
--- a/c/src/ada-tests/sptests/sp07/config.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MAXIMUM_USER_EXTENSIONS 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 100
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/sptests/sp07/sp07.adb b/c/src/ada-tests/sptests/sp07/sp07.adb
deleted file mode 100644
index e86ec72e6d..0000000000
--- a/c/src/ada-tests/sptests/sp07/sp07.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test SP07 of the Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with SPTEST;
-with TEST_SUPPORT;
-
-procedure SP07 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- SPTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end SP07;
-
diff --git a/c/src/ada-tests/sptests/sp07/sp07.scn b/c/src/ada-tests/sptests/sp07/sp07.scn
deleted file mode 100644
index 3f171037a7..0000000000
--- a/c/src/ada-tests/sptests/sp07/sp07.scn
+++ /dev/null
@@ -1,32 +0,0 @@
-*** TEST 7 ***
-TASKS_CREATE - TA1 - created.
-TASKS_CREATE - TA2 - created.
-TASKS_CREATE - TA3 - created.
-TASKS_CREATE - TA4 - created.
-TASKS_START - TA1 - started.
-TASKS_START - TA2 - started.
-TASKS_START - TA3 - started.
-TASKS_START - TA4 - started.
-TASKS_RESTART - TA3 - restarted.
-INIT - task_set_note - set TA1's NOTEPAD_8 to TA1's initial priority: 4
-INIT - task_set_note - set TA2's NOTEPAD_8 to TA2's initial priority: 4
-<pause>
-TA1 - task_set_priority - get initial priority of self: 4
-TA1 - task_get_note - get NOTEPAD_8 - current priority: 4
-TA1 - task_set_note - set TA2's NOTEPAD_8: 3
-TA1 - task_set_priority - set TA2's priority: 3
-TA2 - task_get_note - get NOTEPAD_8 - current priority: 3
-TA2 - task_set_note - set TA1's NOTEPAD_8: 2
-TA2 - task_set_priority - set TA1's priority: 2
-TA1 - task_get_note - get NOTEPAD_8 - current priority: 2
-TA1 - task_set_note - set TA2's NOTEPAD_8: 1
-TA1 - task_set_priority - set TA2's priority: 1
-TA2 - task_get_note - get NOTEPAD_8 - current priority: 1
-TA2 - task_suspend - suspend TA1
-TA2 - task_set_priority - set priority of TA1 ( blocked )
-TASKS_DELETE - TA2 deleting TA1
-TASKS_DELETE - TA2 deleting TA3
-TASKS_DELETE - TA2 deleting TA2
-TA4 - exitting task
-TASK_EXITTED - user extension invoked correctly
-*** END OF TEST 7 ***
diff --git a/c/src/ada-tests/sptests/sp07/sptest.adb b/c/src/ada-tests/sptests/sp07/sptest.adb
deleted file mode 100644
index 0c46cf1a62..0000000000
--- a/c/src/ada-tests/sptests/sp07/sptest.adb
+++ /dev/null
@@ -1,496 +0,0 @@
---
--- SPTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 7 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with TEST_SUPPORT;
-with TEXT_IO;
-with UNSIGNED32_IO;
-
-package body SPTEST is
-
---PAGE
---
--- TCB_To_ID
---
-
- function TCB_To_ID (
- TCB : RTEMS.TCB_POINTER
- ) return RTEMS.ID;
- pragma Import (C, TCB_To_ID, "tcb_to_id" );
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- TIME : RTEMS.TIME_OF_DAY;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TEST 7 ***" );
-
- SPTEST.EXTENSION_NAME( 1 ) := RTEMS.BUILD_NAME( 'E', 'X', 'T', ' ' );
-
- RTEMS.EXTENSION_CREATE(
- SPTEST.EXTENSION_NAME( 1 ),
- SPTEST.EXTENSIONS'ACCESS,
- EXTENSION_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "EXTENSION_CREATE" );
-
- SPTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME( 'T', 'A', '1', ' ' );
- SPTEST.TASK_NAME( 2 ) := RTEMS.BUILD_NAME( 'T', 'A', '2', ' ' );
- SPTEST.TASK_NAME( 3 ) := RTEMS.BUILD_NAME( 'T', 'A', '3', ' ' );
- SPTEST.TASK_NAME( 4 ) := RTEMS.BUILD_NAME( 'T', 'A', '4', ' ' );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 1 ),
- 4,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA1" );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 2 ),
- 4,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 2 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA2" );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 3 ),
- 250,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 3 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA3" );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 4 ),
- 254,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 4 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA4" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 1 ),
- SPTEST.TASK_1'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA1" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 2 ),
- SPTEST.TASK_2'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA2" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 3 ),
- SPTEST.TASK_3'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA3" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 4 ),
- SPTEST.TASK_4'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA4" );
-
- RTEMS.TASK_RESTART( SPTEST.TASK_ID( 3 ), 0, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_RESTART OF TA3" );
-
- RTEMS.TASK_SET_NOTE( SPTEST.TASK_ID( 1 ), 8, 4, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SET_NOTE OF TA1" );
- TEXT_IO.PUT( "INIT - task_set_note - set TA1's NOTEPAD_8" );
- TEXT_IO.PUT_LINE( " to TA1's initial priority: 4" );
-
- RTEMS.TASK_SET_NOTE( SPTEST.TASK_ID( 2 ), 8, 4, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SET_NOTE OF TA2" );
- TEXT_IO.PUT( "INIT - task_set_note - set TA2's NOTEPAD_8" );
- TEXT_IO.PUT_LINE( " to TA2's initial priority: 4" );
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- TASK_1
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- THE_PRIORITY : RTEMS.TASK_PRIORITY;
- PREVIOUS_PRIORITY : RTEMS.TASK_PRIORITY;
- begin
-
- TEST_SUPPORT.PAUSE;
-
- RTEMS.TASK_SET_PRIORITY(
- RTEMS.SELF,
- RTEMS.CURRENT_PRIORITY,
- THE_PRIORITY,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SET_PRIORITY" );
- TEXT_IO.PUT( "TA1 - task_set_priority - ");
- TEXT_IO.PUT( "get initial priority of self: ");
- UNSIGNED32_IO.PUT( THE_PRIORITY, BASE => 10, WIDTH => 2 );
- TEXT_IO.NEW_LINE;
-
- loop
-
- RTEMS.TASK_GET_NOTE( RTEMS.SELF, 8, THE_PRIORITY, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_GET_NOTE" );
- TEXT_IO.PUT( "TA1 - task_get_note - ");
- TEXT_IO.PUT( "get NOTEPAD_8 - current priority: " );
- UNSIGNED32_IO.PUT( THE_PRIORITY, BASE => 10, WIDTH => 2 );
- TEXT_IO.NEW_LINE;
-
- THE_PRIORITY := THE_PRIORITY - 1;
-
- if THE_PRIORITY = 0 then
- TEXT_IO.PUT_LINE( "TA1 - task_suspend - suspend TA2" );
- RTEMS.TASK_SUSPEND( SPTEST.TASK_ID( 2 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SUSPEND" );
-
- TEXT_IO.PUT( "TA1 - task_set_priority - ");
- TEXT_IO.PUT_LINE( "set priority of TA2 ( blocked )");
- RTEMS.TASK_SET_PRIORITY(
- SPTEST.TASK_ID( 2 ),
- 5,
- PREVIOUS_PRIORITY,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SET_PRIORITY" );
-
- RTEMS.TASK_DELETE( SPTEST.TASK_ID( 2 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF TA2" );
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end if;
-
- TEXT_IO.PUT( "TA1 - task_set_note - set TA2's NOTEPAD_8: " );
- UNSIGNED32_IO.PUT( THE_PRIORITY, BASE => 10, WIDTH => 2 );
- TEXT_IO.NEW_LINE;
- RTEMS.TASK_SET_NOTE(
- SPTEST.TASK_ID( 2 ),
- 8,
- THE_PRIORITY,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SET_NOTE" );
-
- TEXT_IO.PUT("TA1 - task_set_priority - set TA2's priority: ");
- UNSIGNED32_IO.PUT( THE_PRIORITY, BASE => 10, WIDTH => 2 );
- TEXT_IO.NEW_LINE;
- RTEMS.TASK_SET_PRIORITY(
- SPTEST.TASK_ID( 2 ),
- THE_PRIORITY,
- PREVIOUS_PRIORITY,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SET_PRIORITY" );
-
- end loop;
-
- end TASK_1;
-
---PAGE
---
--- TASK_2
---
-
- procedure TASK_2 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- THE_PRIORITY : RTEMS.TASK_PRIORITY;
- PREVIOUS_PRIORITY : RTEMS.TASK_PRIORITY;
- begin
-
- loop
-
- RTEMS.TASK_GET_NOTE( RTEMS.SELF, 8, THE_PRIORITY, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_GET_NOTE" );
- TEXT_IO.PUT( "TA2 - task_get_note - ");
- TEXT_IO.PUT( "get NOTEPAD_8 - current priority: " );
- UNSIGNED32_IO.PUT( THE_PRIORITY, BASE => 10, WIDTH => 2 );
- TEXT_IO.NEW_LINE;
-
- THE_PRIORITY := THE_PRIORITY - 1;
-
- if THE_PRIORITY = 0 then
- TEXT_IO.PUT_LINE( "TA2 - task_suspend - suspend TA1" );
- RTEMS.TASK_SUSPEND( SPTEST.TASK_ID( 1 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SUSPEND" );
-
- TEXT_IO.PUT( "TA2 - task_set_priority - ");
- TEXT_IO.PUT_LINE( "set priority of TA1 ( blocked )");
- RTEMS.TASK_SET_PRIORITY(
- SPTEST.TASK_ID( 1 ),
- 5,
- PREVIOUS_PRIORITY,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SET_PRIORITY" );
-
- RTEMS.TASK_DELETE(
- SPTEST.TASK_ID( 1 ),
- STATUS
- ); -- TA1 is blocked
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF TA1" );
-
- RTEMS.TASK_DELETE(
- SPTEST.TASK_ID( 3 ),
- STATUS
- ); -- TA3 is ready
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF TA3" );
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- else
-
- TEXT_IO.PUT( "TA2 - task_set_note - set TA1's NOTEPAD_8: " );
- UNSIGNED32_IO.PUT( THE_PRIORITY, BASE => 10, WIDTH => 2 );
- TEXT_IO.NEW_LINE;
- RTEMS.TASK_SET_NOTE(
- SPTEST.TASK_ID( 1 ),
- 8,
- THE_PRIORITY,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SET_NOTE" );
-
- TEXT_IO.PUT( "TA2 - task_set_priority - ");
- TEXT_IO.PUT( "set TA1's priority: ");
- UNSIGNED32_IO.PUT( THE_PRIORITY, BASE => 10, WIDTH => 2);
- TEXT_IO.NEW_LINE;
- RTEMS.TASK_SET_PRIORITY(
- SPTEST.TASK_ID( 1 ),
- THE_PRIORITY,
- PREVIOUS_PRIORITY,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SET_PRIORITY" );
-
- end if;
-
- end loop;
-
- end TASK_2;
-
---PAGE
---
--- TASK_3
---
-
- procedure TASK_3 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- loop
-
- RTEMS.TASK_WAKE_AFTER( RTEMS.YIELD_PROCESSOR, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- end loop;
-
- end TASK_3;
-
---PAGE
---
--- TASK_4
---
-
- procedure TASK_4 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- begin
-
- TEXT_IO.PUT_LINE( "TA4 - exitting task" );
-
- end TASK_4;
-
---PAGE
---
--- TASK_EXIT_EXTENSION
---
-
- procedure TASK_EXIT_EXTENSION (
- RUNNING_TASK : in RTEMS.TCB_POINTER
- ) is
- begin
-
- if TEST_SUPPORT.TASK_NUMBER( TCB_To_ID( RUNNING_TASK ) ) > 0 then
- TEXT_IO.PUT_LINE( "TASK_EXITTED - user extension invoked correctly" );
- end if;
-
- TEXT_IO.PUT_LINE( "*** END OF TEST 7 ***" );
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end TASK_EXIT_EXTENSION;
-
---PAGE
---
--- TASK_CREATE_EXTENSION
---
-
- procedure TASK_CREATE_EXTENSION (
- UNUSED : in RTEMS.TCB_POINTER;
- CREATED_TASK : in RTEMS.TCB_POINTER
- ) is
- begin
-
- if TEST_SUPPORT.TASK_NUMBER( TCB_To_ID( CREATED_TASK ) ) > 0 then
- TEXT_IO.PUT( "TASKS_CREATE - " );
- TEST_SUPPORT.PUT_NAME(
- SPTEST.TASK_NAME(
- TEST_SUPPORT.TASK_NUMBER( TCB_To_ID( CREATED_TASK ) )
- ),
- FALSE
- );
- TEXT_IO.PUT_LINE( "- created." );
- end if;
-
- end TASK_CREATE_EXTENSION;
-
---PAGE
---
--- TASK_DELETE_EXTENSION
---
-
- procedure TASK_DELETE_EXTENSION (
- RUNNING_TASK : in RTEMS.TCB_POINTER;
- DELETED_TASK : in RTEMS.TCB_POINTER
- ) is
- begin
-
- if TEST_SUPPORT.TASK_NUMBER( TCB_To_ID( RUNNING_TASK ) ) > 0 then
- TEXT_IO.PUT( "TASKS_DELETE - " );
- TEST_SUPPORT.PUT_NAME(
- SPTEST.TASK_NAME(
- TEST_SUPPORT.TASK_NUMBER( TCB_To_ID( RUNNING_TASK ) )
- ),
- FALSE
- );
- end if;
-
- if TEST_SUPPORT.TASK_NUMBER( TCB_To_ID( DELETED_TASK ) ) > 0 then
- TEXT_IO.PUT( "deleting " );
- TEST_SUPPORT.PUT_NAME(
- SPTEST.TASK_NAME(
- TEST_SUPPORT.TASK_NUMBER( TCB_To_ID( DELETED_TASK ) )
- ),
- TRUE
- );
- end if;
-
- end TASK_DELETE_EXTENSION;
-
---PAGE
---
--- TASK_RESTART_EXTENSION
---
-
- procedure TASK_RESTART_EXTENSION (
- UNUSED : in RTEMS.TCB_POINTER;
- RESTARTED_TASK : in RTEMS.TCB_POINTER
- ) is
- begin
-
- if TEST_SUPPORT.TASK_NUMBER( TCB_To_ID( RESTARTED_TASK ) ) > 0 then
- TEXT_IO.PUT( "TASKS_RESTART - " );
- TEST_SUPPORT.PUT_NAME(
- SPTEST.TASK_NAME(
- TEST_SUPPORT.TASK_NUMBER( TCB_To_ID( RESTARTED_TASK ) )
- ),
- FALSE
- );
- TEXT_IO.PUT_LINE( " - restarted." );
- end if;
-
- end TASK_RESTART_EXTENSION;
-
---PAGE
---
--- TASK_START_EXTENSION
---
-
- procedure TASK_START_EXTENSION (
- UNUSED : in RTEMS.TCB_POINTER;
- STARTED_TASK : in RTEMS.TCB_POINTER
- ) is
- begin
-
- if TEST_SUPPORT.TASK_NUMBER( TCB_To_ID( STARTED_TASK ) ) > 0 then
- TEXT_IO.PUT( "TASKS_START - " );
- TEST_SUPPORT.PUT_NAME(
- SPTEST.TASK_NAME(
- TEST_SUPPORT.TASK_NUMBER( TCB_To_ID( STARTED_TASK ) )
- ),
- FALSE
- );
- TEXT_IO.PUT_LINE( " - started." );
- end if;
-
- end TASK_START_EXTENSION;
-
-end SPTEST;
diff --git a/c/src/ada-tests/sptests/sp07/sptest.ads b/c/src/ada-tests/sptests/sp07/sptest.ads
deleted file mode 100644
index 2fcfec1888..0000000000
--- a/c/src/ada-tests/sptests/sp07/sptest.ads
+++ /dev/null
@@ -1,186 +0,0 @@
---
--- SPTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 7 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-package SPTEST is
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ID;
- TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.NAME;
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS extensions created
--- by this test.
---
-
- EXTENSION_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
- EXTENSION_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_1
---
--- DESCRIPTION:
---
--- This RTEMS task tests some of the capabilities of the Task Manager.
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_2
---
--- DESCRIPTION:
---
--- This RTEMS task tests some of the capabilities of the Task Manager.
---
-
- procedure TASK_2 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_3
---
--- DESCRIPTION:
---
--- This RTEMS task tests some of the capabilities of the Task Manager.
---
-
- procedure TASK_3 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_4
---
--- DESCRIPTION:
---
--- This RTEMS task tests the Message Queue Manager.
---
-
- procedure TASK_4 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_CREATE_EXTENSION
---
--- DESCRIPTION:
---
--- This subprogram is the TASK_CREATE extension for this test.
---
-
- procedure TASK_CREATE_EXTENSION (
- UNUSED : in RTEMS.TCB_POINTER;
- CREATED_TASK : in RTEMS.TCB_POINTER
- );
-
---
--- TASK_DELETE_EXTENSION
---
--- DESCRIPTION:
---
--- This subprogram is the TASK_DELETE extension for this test.
---
-
- procedure TASK_DELETE_EXTENSION (
- RUNNING_TASK : in RTEMS.TCB_POINTER;
- DELETED_TASK : in RTEMS.TCB_POINTER
- );
-
---
--- TASK_RESTART_EXTENSION
---
--- DESCRIPTION:
---
--- This subprogram is the TASK_RESTART extension for this test.
---
-
- procedure TASK_RESTART_EXTENSION (
- UNUSED : in RTEMS.TCB_POINTER;
- RESTARTED_TASK : in RTEMS.TCB_POINTER
- );
-
---
--- TASK_START_EXTENSION
---
--- DESCRIPTION:
---
--- This subprogram is the TASK_START extension for this test.
---
-
- procedure TASK_START_EXTENSION (
- UNUSED : in RTEMS.TCB_POINTER;
- STARTED_TASK : in RTEMS.TCB_POINTER
- );
-
---
--- TASK_EXIT_EXTENSION
---
--- DESCRIPTION:
---
--- This subprogram is the TASK_EXIT extension for this test.
--- It is invoked when a RTEMS task exits from its entry point.
---
-
- procedure TASK_EXIT_EXTENSION (
- RUNNING_TASK : in RTEMS.TCB_POINTER
- );
-
---
--- This is the User Extension Table for this test.
---
-
- EXTENSIONS : aliased RTEMS.EXTENSIONS_TABLE :=
- (
- SPTEST.TASK_CREATE_EXTENSION'ACCESS, -- Task create
- SPTEST.TASK_START_EXTENSION'ACCESS, -- Task start
- SPTEST.TASK_RESTART_EXTENSION'ACCESS, -- Task restart
- SPTEST.TASK_DELETE_EXTENSION'ACCESS, -- Task delete
- NULL, -- Task switch
- NULL, -- Task post switch
- NULL, -- Task begin
- SPTEST.TASK_EXIT_EXTENSION'ACCESS, -- Task exitted
- NULL -- Fatal error
- );
-
-end SPTEST;
diff --git a/c/src/ada-tests/sptests/sp08/config.h b/c/src/ada-tests/sptests/sp08/config.h
deleted file mode 100644
index 7fc8c7580e..0000000000
--- a/c/src/ada-tests/sptests/sp08/config.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_TICKS_PER_TIMESLICE 100
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/sptests/sp08/sp08.adb b/c/src/ada-tests/sptests/sp08/sp08.adb
deleted file mode 100644
index 2f1a587979..0000000000
--- a/c/src/ada-tests/sptests/sp08/sp08.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test SP08 of the Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with SPTEST;
-with TEST_SUPPORT;
-
-procedure SP08 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- SPTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end SP08;
-
diff --git a/c/src/ada-tests/sptests/sp08/sp08.scn b/c/src/ada-tests/sptests/sp08/sp08.scn
deleted file mode 100644
index bc829b849a..0000000000
--- a/c/src/ada-tests/sptests/sp08/sp08.scn
+++ /dev/null
@@ -1,20 +0,0 @@
-*** TEST 8 ***
-TA1 - task_mode - ASR - previous mode: 16#0#
-TA1 - task_mode - NO_ASR - previous mode: 16#0#
-TA1 - task_mode - NO_ASR - previous mode: 16#400#
-TA1 - task_mode - ASR - previous mode: 16#400#
-TA1 - task_mode - NO_TIMESLICE - previous mode: 16#0#
-TA1 - task_mode - TIMESLICE - previous mode: 16#0#
-TA1 - task_mode - TIMESLICE - previous mode: 16#200#
-TA1 - task_mode - NO_TIMESLICE - previous mode: 16#200#
-TA1 - task_mode - PREEMPT - previous mode: 16#0#
-TA1 - task_mode - NO_PREEMPT - previous mode: 16#0#
-TA1 - task_mode - NO_PREEMPT - previous mode: 16#100#
-TA1 - task_mode - PREEMPT - previous mode: 16#100#
-TA1 - task_mode - INTERRUPT_LEVEL( 3 ) - previous mode: 16#0#
-TA1 - task_mode - INTERRUPT_LEVEL( 5 ) - previous mode: 16#3#
-TA1 - task_mode - set all modes - previous mode: 16#5#
-TA1 - task_mode - set all modes - previous mode: 16#703#
-TA1 - task_mode - clear all modes - previous mode: 16#703#
-TA1 - task_mode - get current mode - previous mode: 16#0#
-*** END OF TEST 8 ***
diff --git a/c/src/ada-tests/sptests/sp08/sptest.adb b/c/src/ada-tests/sptests/sp08/sptest.adb
deleted file mode 100644
index 725849df43..0000000000
--- a/c/src/ada-tests/sptests/sp08/sptest.adb
+++ /dev/null
@@ -1,351 +0,0 @@
---
--- SPTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 8 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with TEST_SUPPORT;
-with TEXT_IO;
-with UNSIGNED32_IO;
-
-package body SPTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TEST 8 ***" );
-
- SPTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME( 'T', 'A', '1', ' ' );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 1 ),
- 1,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA1" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 1 ),
- SPTEST.TASK_1'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA1" );
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- PUT_MODE
---
-
- procedure PUT_MODE(
- COMMENT : in STRING;
- OUTPUT_MODE : in RTEMS.MODE
- ) is
- begin
-
- TEXT_IO.PUT( COMMENT );
- UNSIGNED32_IO.PUT( OUTPUT_MODE, BASE => 16, WIDTH => 8 );
- TEXT_IO.NEW_LINE;
-
- end PUT_MODE;
-
---PAGE
---
--- TASK_1
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- PREVIOUS_MODE : RTEMS.MODE;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
--- BEGINNING OF ASR
-
- RTEMS.TASK_MODE(
- RTEMS.ASR,
- RTEMS.ASR_MASK,
- PREVIOUS_MODE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_MODE" );
- SPTEST.PUT_MODE(
- "TA1 - task_mode - ASR - previous mode: ",
- PREVIOUS_MODE
- );
-
- RTEMS.TASK_MODE(
- RTEMS.NO_ASR,
- RTEMS.ASR_MASK,
- PREVIOUS_MODE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_MODE" );
- SPTEST.PUT_MODE(
- "TA1 - task_mode - NO_ASR - previous mode: ",
- PREVIOUS_MODE
- );
-
- RTEMS.TASK_MODE(
- RTEMS.NO_ASR,
- RTEMS.ASR_MASK,
- PREVIOUS_MODE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_MODE" );
- SPTEST.PUT_MODE(
- "TA1 - task_mode - NO_ASR - previous mode: ",
- PREVIOUS_MODE
- );
-
- RTEMS.TASK_MODE(
- RTEMS.ASR,
- RTEMS.ASR_MASK,
- PREVIOUS_MODE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_MODE" );
- SPTEST.PUT_MODE(
- "TA1 - task_mode - ASR - previous mode: ",
- PREVIOUS_MODE
- );
-
--- END OF ASR
-
--- BEGINNING OF TIMESLICE
-
- RTEMS.TASK_MODE(
- RTEMS.NO_TIMESLICE,
- RTEMS.TIMESLICE_MASK,
- PREVIOUS_MODE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_MODE" );
- SPTEST.PUT_MODE(
- "TA1 - task_mode - NO_TIMESLICE - previous mode: ",
- PREVIOUS_MODE
- );
-
- RTEMS.TASK_MODE(
- RTEMS.TIMESLICE,
- RTEMS.TIMESLICE_MASK,
- PREVIOUS_MODE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_MODE" );
- SPTEST.PUT_MODE(
- "TA1 - task_mode - TIMESLICE - previous mode: ",
- PREVIOUS_MODE
- );
-
- RTEMS.TASK_MODE(
- RTEMS.TIMESLICE,
- RTEMS.TIMESLICE_MASK,
- PREVIOUS_MODE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_MODE" );
- SPTEST.PUT_MODE(
- "TA1 - task_mode - TIMESLICE - previous mode: ",
- PREVIOUS_MODE
- );
-
- RTEMS.TASK_MODE(
- RTEMS.NO_TIMESLICE,
- RTEMS.TIMESLICE_MASK,
- PREVIOUS_MODE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_MODE" );
- SPTEST.PUT_MODE(
- "TA1 - task_mode - NO_TIMESLICE - previous mode: ",
- PREVIOUS_MODE
- );
-
--- END OF TIMESLICE
-
--- BEGINNING OF PREEMPT
-
- RTEMS.TASK_MODE(
- RTEMS.PREEMPT,
- RTEMS.PREEMPT_MASK,
- PREVIOUS_MODE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_MODE" );
- SPTEST.PUT_MODE(
- "TA1 - task_mode - PREEMPT - previous mode: ",
- PREVIOUS_MODE
- );
-
- RTEMS.TASK_MODE(
- RTEMS.NO_PREEMPT,
- RTEMS.PREEMPT_MASK,
- PREVIOUS_MODE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_MODE" );
- SPTEST.PUT_MODE(
- "TA1 - task_mode - NO_PREEMPT - previous mode: ",
- PREVIOUS_MODE
- );
-
- RTEMS.TASK_MODE(
- RTEMS.NO_PREEMPT,
- RTEMS.PREEMPT_MASK,
- PREVIOUS_MODE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_MODE" );
- SPTEST.PUT_MODE(
- "TA1 - task_mode - NO_PREEMPT - previous mode: ",
- PREVIOUS_MODE
- );
-
- RTEMS.TASK_MODE(
- RTEMS.PREEMPT,
- RTEMS.PREEMPT_MASK,
- PREVIOUS_MODE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_MODE" );
- SPTEST.PUT_MODE(
- "TA1 - task_mode - PREEMPT - previous mode: ",
- PREVIOUS_MODE
- );
-
--- END OF PREEMPT
-
--- BEGINNING OF INTERRUPT LEVEL
-
- RTEMS.TASK_MODE(
- RTEMS.INTERRUPT_LEVEL( 3 ),
- RTEMS.INTERRUPT_MASK,
- PREVIOUS_MODE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_MODE" );
- SPTEST.PUT_MODE(
- "TA1 - task_mode - INTERRUPT_LEVEL( 3 ) - previous mode: ",
- PREVIOUS_MODE
- );
-
- RTEMS.TASK_MODE(
- RTEMS.INTERRUPT_LEVEL( 5 ),
- RTEMS.INTERRUPT_MASK,
- PREVIOUS_MODE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_MODE" );
- SPTEST.PUT_MODE(
- "TA1 - task_mode - INTERRUPT_LEVEL( 5 ) - previous mode: ",
- PREVIOUS_MODE
- );
-
--- END OF INTERRUPT LEVEL
-
--- BEGINNING OF COMBINATIONS
-
- RTEMS.TASK_MODE(
- RTEMS.INTERRUPT_LEVEL( 3 ) + RTEMS.NO_ASR +
- RTEMS.TIMESLICE + RTEMS.NO_PREEMPT,
- RTEMS.INTERRUPT_MASK + RTEMS.ASR_MASK +
- RTEMS.TIMESLICE_MASK + RTEMS.PREEMPT_MASK,
- PREVIOUS_MODE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_MODE" );
- SPTEST.PUT_MODE(
- "TA1 - task_mode - set all modes - previous mode: ",
- PREVIOUS_MODE
- );
-
- RTEMS.TASK_MODE(
- RTEMS.INTERRUPT_LEVEL( 3 ) + RTEMS.NO_ASR +
- RTEMS.TIMESLICE + RTEMS.NO_PREEMPT,
- RTEMS.INTERRUPT_MASK + RTEMS.ASR_MASK +
- RTEMS.TIMESLICE_MASK + RTEMS.PREEMPT_MASK,
- PREVIOUS_MODE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_MODE" );
- SPTEST.PUT_MODE(
- "TA1 - task_mode - set all modes - previous mode: ",
- PREVIOUS_MODE
- );
-
- RTEMS.TASK_MODE(
- RTEMS.INTERRUPT_LEVEL( 0 ) + RTEMS.ASR +
- RTEMS.NO_TIMESLICE + RTEMS.PREEMPT,
- RTEMS.INTERRUPT_MASK + RTEMS.ASR_MASK +
- RTEMS.TIMESLICE_MASK + RTEMS.PREEMPT_MASK,
- PREVIOUS_MODE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_MODE" );
- SPTEST.PUT_MODE(
- "TA1 - task_mode - clear all modes - previous mode: ",
- PREVIOUS_MODE
- );
-
--- END OF COMBINATIONS
-
--- BEGINNING OF CURRENT MODE
-
- RTEMS.TASK_MODE(
- RTEMS.CURRENT_MODE,
- RTEMS.CURRENT_MODE,
- PREVIOUS_MODE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_MODE" );
- SPTEST.PUT_MODE(
- "TA1 - task_mode - get current mode - previous mode: ",
- PREVIOUS_MODE
- );
-
--- END OF CURRENT MODE
-
- TEXT_IO.PUT_LINE( "*** END OF TEST 8 ***" );
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
- end TASK_1;
-
-end SPTEST;
diff --git a/c/src/ada-tests/sptests/sp08/sptest.ads b/c/src/ada-tests/sptests/sp08/sptest.ads
deleted file mode 100644
index c9f0327172..0000000000
--- a/c/src/ada-tests/sptests/sp08/sptest.ads
+++ /dev/null
@@ -1,74 +0,0 @@
---
--- SPTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 8 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-package SPTEST is
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
- TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- PUT_MODE
---
--- DESCRIPTION:
---
--- This subprogram prints the COMMENT and the OUTPUT_MODE followed
--- by a carriage return.
---
-
- procedure PUT_MODE(
- COMMENT : in STRING;
- OUTPUT_MODE : in RTEMS.MODE
- );
-
---
--- TASK_1
---
--- DESCRIPTION:
---
--- This RTEMS task tests the TASK_MODE directive of the Task Manager.
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end SPTEST;
diff --git a/c/src/ada-tests/sptests/sp09/config.h b/c/src/ada-tests/sptests/sp09/config.h
deleted file mode 100644
index adf05616b7..0000000000
--- a/c/src/ada-tests/sptests/sp09/config.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MAXIMUM_TIMERS 1
-#define CONFIGURE_MAXIMUM_SEMAPHORES 2
-#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_MAXIMUM_PARTITIONS 1
-#define CONFIGURE_MAXIMUM_REGIONS 1
-#define CONFIGURE_MAXIMUM_PERIODS 1
-#define CONFIGURE_MAXIMUM_USER_EXTENSIONS 0
-#define CONFIGURE_TICKS_PER_TIMESLICE 100
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/sptests/sp09/sp09.adb b/c/src/ada-tests/sptests/sp09/sp09.adb
deleted file mode 100644
index 669b52c1ef..0000000000
--- a/c/src/ada-tests/sptests/sp09/sp09.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test SP09 of the Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with SPTEST;
-with TEST_SUPPORT;
-
-procedure SP09 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- SPTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end SP09;
-
diff --git a/c/src/ada-tests/sptests/sp09/sp09.scn b/c/src/ada-tests/sptests/sp09/sp09.scn
deleted file mode 100644
index a82582e51f..0000000000
--- a/c/src/ada-tests/sptests/sp09/sp09.scn
+++ /dev/null
@@ -1,250 +0,0 @@
-*** TEST 9 ***
-INIT - task_create - INVALID_SIZE -- NOT CHECKED
-INIT - task_create - INVALID_PRIORITY
-INIT - task_restart - INCORRECT_STATE
-TA1 - task_delete - INVALID_ID
-TA1 - task_get_note - INVALID_NUMBER -- constraint error
-TA1 - task_get_note - INVALID_ID
-TA1 - task_ident - current task SUCCESSFUL
-TA1 - task_ident - global INVALID_NAME
-TA1 - task_ident - local INVALID_NAME
-TA1 - task_ident - INVALID_NODE
-TA1 - task_restart - INVALID_ID
-TA1 - task_resume - INVALID_ID
-TA1 - task_resume - INCORRECT_STATE
-TA1 - task_set_priority - INVALID_PRIORITY -- constraint error
-TA1 - task_set_priority - INVALID_ID
-TA1 - task_set_note - INVALID_NUMBER -- constraint error
-TA1 - task_set_note - INVALID_ID
-TA1 - task_start - INVALID_ID
-TA1 - task_start - INCORRECT_STATE
-TA1 - task_suspend - INVALID_ID
-<pause - screen 2>
-TA1 - clock_get - NOT_DEFINED
-TA1 - task_wake_when - NOT_DEFINED
-TA1 - timer_fire_when - NOT_DEFINED
-TA1 - clock_set - 8:30:45 2/ 5/1987 - INVALID_CLOCK
-TA1 - clock_set - 8:30:45 15/ 5/1988 - INVALID_CLOCK
-TA1 - clock_set - 8:30:45 2/32/1988 - INVALID_CLOCK
-TA1 - clock_set - 25:30:45 2/ 5/1988 - INVALID_CLOCK
-TA1 - clock_set - 8:61:45 2/ 5/1988 - INVALID_CLOCK
-TA1 - clock_set - 8:30:61 2/ 5/1988 - INVALID_CLOCK
-TA1 - clock_set - 8:30:45 2/ 5/1988 - INVALID_CLOCK
-TA1 - clock_set - 8:30:45 2/ 5/1988 - SUCCESSFUL
-TA1 - task_wake_when - TICK INVALID - sleep about 3 seconds
-TA1 - task_wake_when - TICK INVALID - woke up SUCCESSFUL
-TA1 - task_wake_when - 8:30:48 2/ 5/1961 - INVALID_CLOCK
-TA1 - task_wake_when - 25:30:48 2/ 5/1988 - INVALID_CLOCK
-TA1 - current time - 8:30:48 2/ 5/1988
-TA1 - task_wake_when - 8:30:48 1/ 5/1988 - INVALID_CLOCK
-<pause - screen 3>
-TA1 - task_create - INVALID_NAME
-TA1 - task_create - stack size - UNSATISFIED
-TA1 - task_create - TA2 created - SUCCESSFUL
-TA1 - task_suspend - suspend TA2 - SUCCESSFUL
-TA1 - task_suspend - suspend TA2 - ALREADY_SUSPENDED
-TA1 - task_resume - TA2 resumed - SUCCESSFUL
-TA1 - task_create - TA3 created - SUCCESSFUL
-TA1 - task_create - 4 created - SUCCESSFUL
-TA1 - task_create - 5 created - SUCCESSFUL
-TA1 - task_create - 6 created - SUCCESSFUL
-TA1 - task_create - 7 created - SUCCESSFUL
-TA1 - task_create - 8 created - SUCCESSFUL
-TA1 - task_create - 9 created - SUCCESSFUL
-TA1 - task_create - 10 created - SUCCESSFUL
-TA1 - task_create - 11 - TOO_MANY
-TA1 - task_create - MP_NOT_CONFIGURED
-<pause - screen 4>
-TA1 - event_receive - UNSATISFIED ( all conditions )
-TA1 - event_receive - UNSATISFIED ( any conditions )
-TA1 - event_receive - timeout in 3 seconds
-TA1 - event_receive - woke with TIMEOUT
-TA1 - event_send - INVALID_ID
-TA1 - task_wake_after - sleep 1 second - SUCCESSFUL
-TA1 - clock_set - 8:30:45 2/ 5/1988 - SUCCESSFUL
-<pause - screen 5>
-TA1 - semaphore_create - INVALID_NAME
-TA1 - semaphore_create - 1 - SUCCESSFUL
-TA1 - semaphore_create - 2 - SUCCESSFUL
-TA1 - semaphore_create - 3 - TOO_MANY
-TA1 - semaphore_create - NOT_DEFINED
-TA1 - semaphore_create - NOT_DEFINED
-TA1 - semaphore_create - INVALID_NUMBER
-TA1 - semaphore_create - MP_NOT_CONFIGURED
-TA1 - semaphore_delete - unknown INVALID_ID
-TA1 - semaphore_delete - local INVALID_ID
-TA1 - semaphore_ident - global INVALID_NAME
-TA1 - semaphore_ident - local INVALID_NAME
-<pause - screen 6>
-TA1 - semaphore_obtain - INVALID_ID
-TA1 - semaphore_obtain - got sem 1 - SUCCESSFUL
-TA1 - semaphore_obtain - UNSATISFIED
-TA1 - semaphore_obtain - timeout in 3 seconds
-TA1 - semaphore_obtain - woke with TIMEOUT
-TA1 - semaphore_release - NOT_OWNER_OF_RESOURCE
-TA1 - semaphore_release - INVALID_ID
-TA1 - task_start - start TA2 - SUCCESSFUL
-TA1 - task_wake_after - yield processor - SUCCESSFUL
-TA2 - semaphore_obtain - sem 1 - WAIT FOREVER
-TA1 - semaphore_delete - delete sem 1 - SUCCESSFUL
-TA1 - semaphore_obtain - binary semaphore
-TA1 - semaphore_delete - delete sem 2 - RESOURCE_IN_USE
-TA1 - task_wake_after - yield processor - SUCCESSFUL
-TA2 - semaphore_obtain - woke up with OBJECT_WAS_DELETED
-TA2 - task_delete - delete self - SUCCESSFUL
-TA1 - task_delete TA2 - already deleted INVALID_ID
-<pause - screen 7>
-TA1 - message_queue_broadcast - INVALID_ID
-TA1 - message_queue_create - Q 1 - INVALID_NAME
-TA1 - message_queue_create - Q 1 - MP_NOT_CONFIGURED
-TA1 - message_queue_create - Q 1 - 2 DEEP - SUCCESSFUL
-TA1 - message_queue_create - Q 2 - TOO_MANY
-TA1 - message_queue_delete - unknown INVALID_ID
-TA1 - message_queue_delete - local INVALID_ID
-TA1 - message_queue_ident - INVALID_NAME
-TA1 - message_queue_flush - INVALID_ID
-TA1 - message_queue_receive - INVALID_ID
-TA1 - message_queue_receive - Q 1 - UNSATISFIED
-TA1 - message_queue_receive - Q 1 - timeout in 3 seconds
-TA1 - message_queue_receive - Q 1 - woke up with TIMEOUT
-TA1 - message_queue_send - INVALID_ID
-TA1 - message_queue_send - BUFFER 1 TO Q 1 - SUCCESSFUL
-TA1 - message_queue_send - BUFFER 2 TO Q 1 - SUCCESSFUL
-TA1 - message_queue_send - BUFFER 3 TO Q 1 - TOO_MANY
-<pause - screen 8>
-TA1 - message_queue_delete - Q 1 - SUCCESSFUL
-TA1 - message_queue_create - Q 1 - 2 DEEP - SUCCESSFUL
-TA1 - message_queue_send - BUFFER 1 TO Q 1 - SUCCESSFUL
-TA1 - message_queue_send - BUFFER 2 TO Q 1 - SUCCESSFUL
-TA1 - message_queue_send - BUFFER 3 TO Q 1 - TOO_MANY
-TA1 - message_queue_delete - Q 1 - SUCCESSFUL
-TA1 - message_queue_create - Q 1 - 3 DEEP - SUCCESSFUL
-TA1 - message_queue_send - BUFFER 1 TO Q 1 - SUCCESSFUL
-TA1 - message_queue_send - BUFFER 2 TO Q 1 - SUCCESSFUL
-TA1 - message_queue_send - BUFFER 3 TO Q 1 - SUCCESSFUL
-TA1 - message_queue_send - BUFFER 4 TO Q 1 - TOO_MANY
-TA1 - message_queue_delete - Q 1 - SUCCESSFUL
-TA1 - message_queue_create - Q 1 - 3 DEEP - SUCCESSFUL
-TA1 - task_start - start TA3 - SUCCESSFUL
-TA1 - task_wake_after - yield processor - SUCCESSFUL
-TA3 - message_queue_receive - Q 1 - WAIT FOREVER
-TA1 - message_queue_delete - delete Q 1 - SUCCESSFUL
-TA1 - task_wake_after - yield processor - SUCCESSFUL
-TA3 - message_queue_receive - woke up with OBJECT_WAS_DELETED
-TA3 - task_delete - delete self - SUCCESSFUL
-<pause - screen 9>
-TA1 - interrupt_catch - INVALID_NUMBER -- constraint error
-TA1 - interrupt_catch - INVALID_ADDRESS
-TA1 - signal_send - INVALID_ID
-TA1 - signal_send - NOT_DEFINED
-TA1 - port_create - INVALID_NAME
-TA1 - port_create - INVALID_ADDRESS
-TA1 - port_create - TOO_MANY
-TA1 - port_delete - INVALID_ID
-TA1 - port_ident - INVALID_NAME
-TA1 - port_internal_to_external - INVALID_ID
-TA1 - port_external_to_internal - INVALID_ID
-<pause - screen 10>
-TA1 - rate_monotonic_create - INVALID_NAME
-TA1 - rate_monotonic_create - SUCCESSFUL
-TA1 - rate_monotonic_create - TOO_MANY
-TA1 - rate_monotonic_ident - INVALID_NAME
-TA1 - rate_monotonic_period - unknown INVALID_ID
-TA1 - rate_monotonic_period - local INVALID_ID
-TA1 - rate_monotonic_period( STATUS ) - NOT_DEFINED
-TA1 - rate_monotonic_period - 100 ticks - SUCCESSFUL
-TA1 - rate_monotonic_period( STATUS ) - SUCCESSFUL
-TA1 - rate_monotonic_period( STATUS ) - TIMEOUT
-TA1 - rate_monotonic_cancel - unknown INVALID_ID
-TA1 - rate_monotonic_cancel - local INVALID_ID
-TA1 - rate_monotonic_cancel - SUCCESSFUL
-TA1 - rate_monotonic_period - 5 ticks - TIMEOUT
-TA1 - task_wake_after - yielding to TA4
-TA4 - rate_monotonic_cancel - NOT_OWNER_OF_RESOURCE
-TA4 - rate_monotonic_period - NOT_OWNER_OF_RESOURCE
-TA4 - task_delete - delete self - SUCCESSFUL
-TA1 - rate_monotonic_delete - unknown INVALID_ID
-TA1 - rate_monotonic_delete - local INVALID_ID
-TA1 - rate_monotonic_delete - SUCCESSFUL
-<pause - screen 11>
-TA1 - partition_create - INVALID_NAME
-TA1 - partition_create - length - INVALID_SIZE
-TA1 - partition_create - buffer size - INVALID_SIZE
-TA1 - partition_create - length < buffer size - INVALID_SIZE
-TA1 - partition_create - MP_NOT_CONFIGURED
-TA1 - partition_create - INVALID_ADDRESS
-TA1 - partition_create - INVALID_SIZE
-TA1 - partition_delete - unknown INVALID_ID
-TA1 - partition_delete - local INVALID_ID
-TA1 - partition_get_buffer - INVALID_ID
-TA1 - partition_ident - INVALID_NAME
-TA1 - partition_return_buffer - INVALID_ID
-TA1 - partition_create - SUCCESSFUL
-TA1 - partition_create - TOO_MANY
-TA1 - partition_get_buffer - SUCCESSFUL
-TA1 - partition_get_buffer - SUCCESSFUL
-TA1 - partition_get_buffer - UNSATISFIED
-TA1 - partition_delete - RESOURCE_IN_USE
-TA1 - partition_return_buffer - INVALID_ADDRESS - out of range
-TA1 - partition_return_buffer - INVALID_ADDRESS - not on boundary
-<pause - screen 12>
-TA1 - region_create - INVALID_NAME
-TA1 - region_create - INVALID_ADDRESS
-TA1 - region_create - INVALID_SIZE
-TA1 - region_create - SUCCESSFUL
-TA1 - region_create - TOO_MANY
-TA1 - region_delete - unknown INVALID_ID
-TA1 - region_delete - local INVALID_ID
-TA1 - region_ident - INVALID_NAME
-TA1 - region_get_segment - INVALID_ID
-TA1 - region_get_segment - INVALID_SIZE
-TA1 - region_get_segment - SUCCESSFUL
-TA1 - region_get_segment - UNSATISFIED
-TA1 - region_get_segment - timeout in 3 seconds
-TA1 - region_get_segment - woke up with TIMEOUT
-TA1 - region_delete - RESOURCE_IN_USE
-TA1 - region_return_segment - INVALID_ID
-TA1 - region_return_segment - INVALID_ADDRESS
-TA1 - debug_disable - DEBUG_REGION
-TA1 - region_return_segment - INVALID_ADDRESS
-TA1 - region_return_segment - INVALID_ADDRESS
-TA1 - debug_enable - DEBUG_REGION
-TA1 - region_extend - INVALID_ID
-TA1 - region_extend - within heap - INVALID_ADDRESS
-TA1 - region_extend - non-contiguous lower - NOT_IMPLEMENTED
-TA1 - region_extend - contiguous lower - NOT_IMPLEMENTED
-TA1 - region_extend - non-contiguous higher - NOT_IMPLEMENTED
-<pause - screen 13>
-TA1 - io_close - INVALID_NUMBER
-TA1 - io_control - INVALID_NUMBER
-TA1 - io_initialize - INVALID_NUMBER
-TA1 - io_open - INVALID_NUMBER
-TA1 - io_read - INVALID_NUMBER
-TA1 - io_write - INVALID_NUMBER
-TA1 - clock_set - 23:59:59 12/31/2000 - SUCCESSFUL
-TA1 - clock_get - 0: 0: 0 1/ 1/2001 - SUCCESSFUL
-TA1 - clock_set - 23:59:59 12/31/1999 - SUCCESSFUL
-TA1 - clock_get - 0: 0: 0 1/ 1/2000 - SUCCESSFUL
-TA1 - clock_set - 23:59:59 12/31/2100 - SUCCESSFUL
-TA1 - clock_get - 0: 0: 0 1/ 1/2101 - SUCCESSFUL
-TA1 - clock_set - 23:59:59 12/31/2099 - SUCCESSFUL
-TA1 - clock_get - 0: 0: 0 1/ 1/2100 - SUCCESSFUL
-TA1 - clock_set - 23:59:59 12/31/1991 - SUCCESSFUL
-TA1 - clock_get - 0: 0: 0 1/ 1/1992 - SUCCESSFUL
-<pause - screen 14>
-TA1 - timer_create - INVALID_NAME
-TA1 - timer_create - 1 - SUCCESSFUL
-TA1 - timer_create - 2 - TOO_MANY
-TA1 - timer_delete - local INVALID_ID
-TA1 - timer_delete - global INVALID_ID
-TA1 - timer_ident - INVALID_NAME
-TA1 - timer_cancel - INVALID_ID
-TA1 - timer_reset - INVALID_ID
-TA1 - timer_reset - NOT_DEFINED
-TA1 - timer_fire_after - INVALID_ID
-TA1 - timer_fire_when - INVALID_ID
-TA1 - timer_fire_after - INVALID_NUMBER
-TA1 - timer_fire_when - 8:30:45 2/ 5/1987 - INVALID_CLOCK
-TA1 - clock_get - 0: 0: 0 1/ 1/1992
-TA1 - timer_fire_when - 8:30:45 2/ 5/1990 - before INVALID_CLOCK
-*** END OF TEST 9 ***
diff --git a/c/src/ada-tests/sptests/sp09/sptest.adb b/c/src/ada-tests/sptests/sp09/sptest.adb
deleted file mode 100644
index 960b610f77..0000000000
--- a/c/src/ada-tests/sptests/sp09/sptest.adb
+++ /dev/null
@@ -1,3208 +0,0 @@
---
--- SPTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 9 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with TEST_SUPPORT;
-with TEXT_IO;
-
-package body SPTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TEST 9 ***" );
-
- SPTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME( 'T', 'A', '1', ' ' );
- SPTEST.TASK_NAME( 2 ) := RTEMS.BUILD_NAME( 'T', 'A', '2', ' ' );
- SPTEST.TASK_NAME( 3 ) := RTEMS.BUILD_NAME( 'T', 'A', '3', ' ' );
- SPTEST.TASK_NAME( 4 ) := RTEMS.BUILD_NAME( 'T', 'A', '4', ' ' );
- SPTEST.TASK_NAME( 5 ) := RTEMS.BUILD_NAME( 'T', 'A', '5', ' ' );
- SPTEST.TASK_NAME( 6 ) := RTEMS.BUILD_NAME( 'T', 'A', '6', ' ' );
- SPTEST.TASK_NAME( 7 ) := RTEMS.BUILD_NAME( 'T', 'A', '7', ' ' );
- SPTEST.TASK_NAME( 8 ) := RTEMS.BUILD_NAME( 'T', 'A', '8', ' ' );
- SPTEST.TASK_NAME( 9 ) := RTEMS.BUILD_NAME( 'T', 'A', '9', ' ' );
- SPTEST.TASK_NAME( 10 ) := RTEMS.BUILD_NAME( 'T', 'A', 'A', ' ' );
-
- SPTEST.TIMER_NAME( 1 ) := RTEMS.BUILD_NAME( 'T', 'M', '1', ' ' );
-
- SPTEST.SEMAPHORE_NAME( 1 ) := RTEMS.BUILD_NAME( 'S', 'M', '1', ' ' );
- SPTEST.SEMAPHORE_NAME( 2 ) := RTEMS.BUILD_NAME( 'S', 'M', '2', ' ' );
- SPTEST.SEMAPHORE_NAME( 3 ) := RTEMS.BUILD_NAME( 'S', 'M', '3', ' ' );
-
- SPTEST.QUEUE_NAME( 1 ) := RTEMS.BUILD_NAME( 'M', 'Q', '1', ' ' );
- SPTEST.QUEUE_NAME( 2 ) := RTEMS.BUILD_NAME( 'M', 'Q', '2', ' ' );
-
- SPTEST.PARTITION_NAME( 1 ) := RTEMS.BUILD_NAME( 'P', 'T', '1', ' ' );
-
- SPTEST.REGION_NAME( 1 ) := RTEMS.BUILD_NAME( 'R', 'N', '1', ' ' );
-
- SPTEST.PORT_NAME( 1 ) := RTEMS.BUILD_NAME( 'D', 'P', '1', ' ' );
-
- SPTEST.PERIOD_NAME( 1 ) := RTEMS.BUILD_NAME( 'T', 'M', '1', ' ' );
-
--- RTEMS.TASK_CREATE(
--- SPTEST.TASK_NAME( 1 ),
--- 4,
--- 10,
--- RTEMS.DEFAULT_MODES,
--- RTEMS.DEFAULT_ATTRIBUTES,
--- SPTEST.TASK_ID( 1 ),
--- STATUS
--- );
--- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
--- STATUS,
--- RTEMS.INVALID_SIZE,
--- "TASK_CREATE WITH ILLEGAL STACK SIZE"
--- );
- TEXT_IO.PUT_LINE( "INIT - task_create - INVALID_SIZE -- NOT CHECKED" );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 1 ),
- 0,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_PRIORITY,
- "TASK_CREATE WITH ILLEGAL PRIORITY"
- );
- TEXT_IO.PUT_LINE( "INIT - task_create - INVALID_PRIORITY" );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 1 ),
- 4,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA1" );
-
- RTEMS.TASK_RESTART(
- SPTEST.TASK_ID( 1 ),
- 0,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INCORRECT_STATE,
- "TASK_RESTART OF DORMANT TASK"
- );
- TEXT_IO.PUT_LINE( "INIT - task_restart - INCORRECT_STATE" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 1 ),
- SPTEST.TASK_1'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA1" );
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- DELAYED_SUBPROGRAM
---
-
- procedure DELAYED_SUBPROGRAM (
- IGNORED_ID : in RTEMS.ID;
- IGNORED_ADDRESS : in RTEMS.ADDRESS
- ) is
- begin
-
- NULL;
-
- end DELAYED_SUBPROGRAM;
-
---PAGE
---
--- SERVICE_ROUTINE
---
-
- procedure SERVICE_ROUTINE (
- IGNORED : in RTEMS.VECTOR_NUMBER
- ) is
- begin
-
- NULL;
-
- end SERVICE_ROUTINE;
-
---PAGE
---
--- SCREEN_1
---
-
- procedure SCREEN_1
- is
- NOTEPAD_VALUE : RTEMS.UNSIGNED32;
- SELF_ID : RTEMS.ID;
- PREVIOUS_PRIORITY : RTEMS.TASK_PRIORITY;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.TASK_DELETE( 100, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ID,
- "TASK_DELETE WITH ILLEGAL ID"
- );
- TEXT_IO.PUT_LINE( "TA1 - task_delete - INVALID_ID" );
-
--- RTEMS.TASK_GET_NOTE( RTEMS.SELF,
--- RTEMS.NOTEPAD_INDEX'LAST + 10,
--- NOTEPAD_VALUE,
--- STATUS
--- );
--- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
--- STATUS,
--- RTEMS.INVALID_NUMBER,
--- "TASK_GET_NOTE WITH ILLEGAL NOTEPAD"
--- );
--- TEXT_IO.PUT_LINE( "TA1 - task_get_note - INVALID_NUMBER" );
- TEXT_IO.PUT_LINE(
- "TA1 - task_get_note - INVALID_NUMBER -- constraint error"
- );
-
- RTEMS.TASK_GET_NOTE(
- 100,
- RTEMS.NOTEPAD_INDEX'LAST,
- NOTEPAD_VALUE,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ID,
- "TASK_GET_NOTE WITH ILLEGAL ID"
- );
- TEXT_IO.PUT_LINE( "TA1 - task_get_note - INVALID_ID" );
-
- RTEMS.TASK_IDENT(
- RTEMS.SELF,
- RTEMS.SEARCH_ALL_NODES,
- SELF_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_IDENT OF SELF" );
- if SELF_ID /= SPTEST.TASK_ID( 1 ) then
- TEXT_IO.PUT_LINE( "ERROR - task_ident - incorrect ID returned!" );
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
- end if;
- TEXT_IO.PUT_LINE(
- "TA1 - task_ident - current task SUCCESSFUL"
- );
-
- RTEMS.TASK_IDENT(
- 100,
- RTEMS.SEARCH_ALL_NODES,
- SPTEST.JUNK_ID,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_NAME,
- "TASK_IDENT WITH ILLEGAL NAME (local)"
- );
- TEXT_IO.PUT_LINE( "TA1 - task_ident - global INVALID_NAME" );
-
- RTEMS.TASK_IDENT( 100, 1, SPTEST.JUNK_ID, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_NAME,
- "TASK_IDENT WITH ILLEGAL NAME (global)"
- );
- TEXT_IO.PUT_LINE( "TA1 - task_ident - local INVALID_NAME" );
-
- RTEMS.TASK_IDENT( 100, 2, SPTEST.JUNK_ID, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_NODE,
- "TASK_IDENT WITH ILLEGAL NODE"
- );
- TEXT_IO.PUT_LINE( "TA1 - task_ident - INVALID_NODE" );
-
- RTEMS.TASK_RESTART( 100, 0, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ID,
- "TASK_RESTART WITH ILLEGAL ID"
- );
- TEXT_IO.PUT_LINE( "TA1 - task_restart - INVALID_ID" );
-
- RTEMS.TASK_RESUME( 100, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ID,
- "TASK_RESUME WITH ILLEGAL ID"
- );
- TEXT_IO.PUT_LINE( "TA1 - task_resume - INVALID_ID" );
-
- RTEMS.TASK_RESUME( RTEMS.SELF, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INCORRECT_STATE,
- "TASK_RESUME OF READY TASK"
- );
- TEXT_IO.PUT_LINE( "TA1 - task_resume - INCORRECT_STATE" );
-
--- RTEMS.TASK_SET_PRIORITY( RTEMS.SELF, 512, PREVIOUS_PRIORITY, STATUS );
--- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
--- STATUS,
--- RTEMS.INVALID_PRIORITY,
--- "TASK_SET_PRIORITY WITH ILLEGAL PRIORITY"
--- );
--- TEXT_IO.PUT_LINE(
--- "TA1 - task_set_priority - INVALID_PRIORITY"
--- );
- TEXT_IO.PUT_LINE(
- "TA1 - task_set_priority - INVALID_PRIORITY -- constraint error"
- );
-
- RTEMS.TASK_SET_PRIORITY( 100, 8, PREVIOUS_PRIORITY, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ID,
- "TASK_SET_PRIORITY WITH ILLEGAL ID"
- );
- TEXT_IO.PUT_LINE( "TA1 - task_set_priority - INVALID_ID" );
-
--- RTEMS.TASK_SET_NOTE( RTEMS.SELF,
--- RTEMS.NOTEPAD_INDEX'LAST + 10,
--- NOTEPAD_VALUE,
--- STATUS
--- );
--- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
--- STATUS,
--- RTEMS.INVALID_NUMBER,
--- "TASK_SET_NOTE WITH ILLEGAL NOTEPAD"
--- );
--- TEXT_IO.PUT_LINE( "TA1 - task_set_note - INVALID_NUMBER" );
- TEXT_IO.PUT_LINE(
- "TA1 - task_set_note - INVALID_NUMBER -- constraint error"
- );
-
- RTEMS.TASK_SET_NOTE(
- 100,
- RTEMS.NOTEPAD_INDEX'LAST,
- NOTEPAD_VALUE,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ID,
- "TASK_SET_NOTE WITH ILLEGAL ID"
- );
- TEXT_IO.PUT_LINE( "TA1 - task_set_note - INVALID_ID" );
-
- RTEMS.TASK_START( 100, SPTEST.TASK_1'ACCESS, 0, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ID,
- "TASK_START WITH ILLEGAL ID"
- );
- TEXT_IO.PUT_LINE( "TA1 - task_start - INVALID_ID" );
-
- RTEMS.TASK_START( RTEMS.SELF, SPTEST.TASK_1'ACCESS, 0, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INCORRECT_STATE,
- "TASK_START OF READY TASK"
- );
- TEXT_IO.PUT_LINE( "TA1 - task_start - INCORRECT_STATE" );
-
- RTEMS.TASK_SUSPEND( 100, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ID,
- "TASK_SUSPEND WITH INVALID ID"
- );
- TEXT_IO.PUT_LINE( "TA1 - task_suspend - INVALID_ID" );
-
- end SCREEN_1;
-
---PAGE
---
--- SCREEN_2
---
-
- procedure SCREEN_2
- is
- TIME : RTEMS.TIME_OF_DAY;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
--- errors before clock is set
-
- RTEMS.CLOCK_GET( RTEMS.CLOCK_GET_TOD, TIME'ADDRESS, STATUS );
-
- if RTEMS.IS_STATUS_SUCCESSFUL( STATUS ) then
- TEXT_IO.PUT_LINE(
- "TA1 - clock_get - NOT_DEFINED -- DID THE BSP SET THE TIME OF DAY?"
- );
- else
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.NOT_DEFINED,
- "CLOCK_GET BEFORE CLOCK IS SET"
- );
- TEXT_IO.PUT_LINE( "TA1 - clock_get - NOT_DEFINED" );
- end if;
-
- RTEMS.TASK_WAKE_WHEN( TIME, STATUS );
- if RTEMS.IS_STATUS_SUCCESSFUL( STATUS ) then
- TEXT_IO.PUT( "TA1 - task_wake_when - NOT_DEFINED -- " );
- TEXT_IO.PUT_LINE( "DID THE BSP SET THE TIME OF DAY?" );
- else
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.NOT_DEFINED,
- "TASK_WAKE_WHEN BEFORE CLOCK IS SET"
- );
- TEXT_IO.PUT_LINE( "TA1 - task_wake_when - NOT_DEFINED" );
- end if;
-
- RTEMS.TIMER_FIRE_WHEN(
- 0,
- TIME,
- SPTEST.DELAYED_SUBPROGRAM'ACCESS,
- RTEMS.NULL_ADDRESS,
- STATUS
- );
-
- if RTEMS.IS_STATUS_SUCCESSFUL( STATUS ) then
- TEXT_IO.PUT( "TA1 - task_fire_when - NOT_DEFINED -- " );
- TEXT_IO.PUT_LINE( "DID THE BSP SET THE TIME OF DAY?" );
- else
-
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.NOT_DEFINED,
- "TIMER_FIRE_WHEN BEFORE CLOCK IS SET"
- );
- TEXT_IO.PUT_LINE( "TA1 - timer_fire_when - NOT_DEFINED" );
-
- end if;
-
--- invalid time of day field
-
- TIME := ( 1987, 2, 5, 8, 30, 45, 0 );
- TEST_SUPPORT.PRINT_TIME( "TA1 - clock_set - ", TIME, "" );
- RTEMS.CLOCK_SET( TIME, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_CLOCK,
- "CLOCK_SET WITH INVALID YEAR"
- );
- TEXT_IO.PUT_LINE( " - INVALID_CLOCK" );
-
- TIME := ( 1988, 15, 5, 8, 30, 45, 0 );
- TEST_SUPPORT.PRINT_TIME( "TA1 - clock_set - ", TIME, "" );
- RTEMS.CLOCK_SET( TIME, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_CLOCK,
- "CLOCK_SET WITH INVALID MONTH"
- );
- TEXT_IO.PUT_LINE( " - INVALID_CLOCK" );
-
- TIME := ( 1988, 2, 32, 8, 30, 45, 0 );
- TEST_SUPPORT.PRINT_TIME( "TA1 - clock_set - ", TIME, "" );
- RTEMS.CLOCK_SET( TIME, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_CLOCK,
- "CLOCK_SET WITH INVALID DAY"
- );
- TEXT_IO.PUT_LINE( " - INVALID_CLOCK" );
-
- TIME := ( 1988, 2, 5, 25, 30, 45, 0 );
- TEST_SUPPORT.PRINT_TIME( "TA1 - clock_set - ", TIME, "" );
- RTEMS.CLOCK_SET( TIME, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_CLOCK,
- "CLOCK_SET WITH INVALID HOUR"
- );
- TEXT_IO.PUT_LINE( " - INVALID_CLOCK" );
-
- TIME := ( 1988, 2, 5, 8, 61, 45, 0 );
- TEST_SUPPORT.PRINT_TIME( "TA1 - clock_set - ", TIME, "" );
- RTEMS.CLOCK_SET( TIME, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_CLOCK,
- "CLOCK_SET WITH INVALID MINUTE"
- );
- TEXT_IO.PUT_LINE( " - INVALID_CLOCK" );
-
- TIME := ( 1988, 2, 5, 8, 30, 61, 0 );
- TEST_SUPPORT.PRINT_TIME( "TA1 - clock_set - ", TIME, "" );
- RTEMS.CLOCK_SET( TIME, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_CLOCK,
- "CLOCK_SET WITH INVALID SECOND"
- );
- TEXT_IO.PUT_LINE( " - INVALID_CLOCK" );
-
- TIME := ( 1988, 2, 5, 8, 30, 45, TEST_SUPPORT.TICKS_PER_SECOND + 1 );
- TEST_SUPPORT.PRINT_TIME( "TA1 - clock_set - ", TIME, "" );
- RTEMS.CLOCK_SET( TIME, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_CLOCK,
- "CLOCK_SET WITH INVALID TICKS PER SECOND"
- );
- TEXT_IO.PUT_LINE( " - INVALID_CLOCK" );
-
- TIME := ( 1988, 2, 5, 8, 30, 45, 0 );
- TEST_SUPPORT.PRINT_TIME( "TA1 - clock_set - ", TIME, "" );
- RTEMS.CLOCK_SET( TIME, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_SET SUCCESSFUL" );
- TEXT_IO.PUT_LINE( " - SUCCESSFUL" );
-
--- task_wake_when
-
- TIME := ( 1988, 2, 5, 8, 30, 48, TEST_SUPPORT.TICKS_PER_SECOND + 1 );
- TEXT_IO.PUT( "TA1 - task_wake_when - TICK INVALID - " );
- TEXT_IO.PUT_LINE( "sleep about 3 seconds" );
- RTEMS.TASK_WAKE_WHEN( TIME, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED(
- STATUS,
- "TASK_WAKE_WHEN WITH INVALID TICKS PER SECOND"
- );
- TEXT_IO.PUT( "TA1 - task_wake_when - TICK INVALID - " );
- TEXT_IO.PUT_LINE( "woke up SUCCESSFUL" );
-
- TIME := ( 1961, 2, 5, 8, 30, 48, 0 );
- TEST_SUPPORT.PRINT_TIME( "TA1 - task_wake_when - ", TIME, "" );
- RTEMS.TASK_WAKE_WHEN( TIME, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_CLOCK,
- "TASK_WAKE_WHEN WITH INVALID YEAR"
- );
- TEXT_IO.PUT_LINE( " - INVALID_CLOCK" );
-
- TIME := ( 1988, 2, 5, 25, 30, 48, 0 );
- TEST_SUPPORT.PRINT_TIME( "TA1 - task_wake_when - ", TIME, "" );
- RTEMS.TASK_WAKE_WHEN( TIME, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_CLOCK,
- "TASK_WAKE_WHEN WITH INVALID HOUR"
- );
- TEXT_IO.PUT_LINE( " - INVALID_CLOCK" );
-
- RTEMS.CLOCK_GET( RTEMS.CLOCK_GET_TOD, TIME'ADDRESS, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_GET SUCCESSFUL" );
- TEST_SUPPORT.PRINT_TIME( "TA1 - current time - ", TIME, "" );
- TEXT_IO.NEW_LINE;
-
- TIME.MONTH := 1;
- TEST_SUPPORT.PRINT_TIME( "TA1 - task_wake_when - ", TIME, "" );
- RTEMS.TASK_WAKE_WHEN( TIME, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_CLOCK,
- "TASK_WAKE_WHEN BEFORE CURRENT TIME"
- );
- TEXT_IO.PUT_LINE( " - INVALID_CLOCK" );
-
- end SCREEN_2;
-
---PAGE
---
--- SCREEN_3
---
-
- procedure SCREEN_3
- is
- TASK_NAME : RTEMS.NAME;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TASK_NAME := 1;
-
- RTEMS.TASK_CREATE(
- 0,
- 1,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.JUNK_ID,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_NAME,
- "TASK_CREATE WITH ILLEGAL NAME"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - task_create - INVALID_NAME"
- );
-
- RTEMS.TASK_CREATE(
- TASK_NAME,
- 1,
- RTEMS.CONFIGURATION.WORK_SPACE_SIZE,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.JUNK_ID,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.UNSATISFIED,
- "TASK_CREATE WITH A STACK SIZE LARGER THAN THE WORKSPACE"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - task_create - stack size - UNSATISFIED"
- );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 2 ),
- 4,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 2 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA2" );
- TEXT_IO.PUT_LINE(
- "TA1 - task_create - TA2 created - SUCCESSFUL"
- );
-
- RTEMS.TASK_SUSPEND( SPTEST.TASK_ID( 2 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SUSPEND OF TA2" );
- TEXT_IO.PUT_LINE(
- "TA1 - task_suspend - suspend TA2 - SUCCESSFUL"
- );
-
- RTEMS.TASK_SUSPEND( SPTEST.TASK_ID( 2 ), STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.ALREADY_SUSPENDED,
- "TASK_SUSPEND ON SUSPENDED TA2"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - task_suspend - suspend TA2 - ALREADY_SUSPENDED"
- );
-
- RTEMS.TASK_RESUME( SPTEST.TASK_ID( 2 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_RESUME OF TA2" );
- TEXT_IO.PUT_LINE(
- "TA1 - task_resume - TA2 resumed - SUCCESSFUL"
- );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 3 ),
- 4,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 3 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA3" );
- TEXT_IO.PUT_LINE(
- "TA1 - task_create - TA3 created - SUCCESSFUL"
- );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 4 ),
- 4,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 4 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA4" );
- TEXT_IO.PUT_LINE(
- "TA1 - task_create - 4 created - SUCCESSFUL"
- );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 5 ),
- 4,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 5 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA5" );
- TEXT_IO.PUT_LINE(
- "TA1 - task_create - 5 created - SUCCESSFUL"
- );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 6 ),
- 4,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 6 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA6" );
- TEXT_IO.PUT_LINE(
- "TA1 - task_create - 6 created - SUCCESSFUL"
- );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 7 ),
- 4,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 7 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA7" );
- TEXT_IO.PUT_LINE(
- "TA1 - task_create - 7 created - SUCCESSFUL"
- );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 8 ),
- 4,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 8 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA8" );
- TEXT_IO.PUT_LINE(
- "TA1 - task_create - 8 created - SUCCESSFUL"
- );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 9 ),
- 4,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 9 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA9" );
- TEXT_IO.PUT_LINE(
- "TA1 - task_create - 9 created - SUCCESSFUL"
- );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 10 ),
- 4,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 10 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA10" );
- TEXT_IO.PUT_LINE(
- "TA1 - task_create - 10 created - SUCCESSFUL"
- );
-
- RTEMS.TASK_CREATE(
- TASK_NAME,
- 4,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.JUNK_ID,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.TOO_MANY,
- "TASK_CREATE FOR TOO MANY TASKS"
- );
- TEXT_IO.PUT_LINE( "TA1 - task_create - 11 - TOO_MANY" );
-
- RTEMS.TASK_CREATE(
- TASK_NAME,
- 4,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.GLOBAL,
- SPTEST.JUNK_ID,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.MP_NOT_CONFIGURED,
- "TASK_CREATE OF GLOBAL TASK IN SINGLE CPU SYSTEM"
- );
- TEXT_IO.PUT_LINE( "TA1 - task_create - MP_NOT_CONFIGURED" );
-
- end SCREEN_3;
-
---PAGE
---
--- SCREEN_4
---
-
- procedure SCREEN_4
- is
- EVENT_OUT : RTEMS.EVENT_SET;
- TIME : RTEMS.TIME_OF_DAY;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.EVENT_RECEIVE(
- RTEMS.EVENT_16,
- RTEMS.NO_WAIT,
- RTEMS.NO_TIMEOUT,
- EVENT_OUT,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.UNSATISFIED,
- "EVENT_RECEIVE UNSATISFIED (ALL)"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - event_receive - UNSATISFIED ( all conditions )"
- );
-
- RTEMS.EVENT_RECEIVE(
- RTEMS.EVENT_16,
- RTEMS.NO_WAIT + RTEMS.EVENT_ANY,
- RTEMS.NO_TIMEOUT,
- EVENT_OUT,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.UNSATISFIED,
- "EVENT_RECEIVE UNSATISFIED (ANY)"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - event_receive - UNSATISFIED ( any conditions )"
- );
-
- TEXT_IO.PUT_LINE( "TA1 - event_receive - timeout in 3 seconds" );
- RTEMS.EVENT_RECEIVE(
- RTEMS.EVENT_16,
- RTEMS.DEFAULT_OPTIONS,
- 3 * TEST_SUPPORT.TICKS_PER_SECOND,
- EVENT_OUT,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.TIMEOUT,
- "EVENT_RECEIVE AFTER 3 SECOND TIMEOUT"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - event_receive - woke with TIMEOUT"
- );
-
- RTEMS.EVENT_SEND(
- 100,
- RTEMS.EVENT_16,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ID,
- "EVENT_SEND WITH ILLEGAL ID"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - event_send - INVALID_ID"
- );
-
- TEXT_IO.PUT_LINE(
- "TA1 - task_wake_after - sleep 1 second - SUCCESSFUL"
- );
- RTEMS.TASK_WAKE_AFTER( TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER (1 SECOND)" );
-
- TIME := ( 1988, 2, 5, 8, 30, 45, 0 );
- TEST_SUPPORT.PRINT_TIME( "TA1 - clock_set - ", TIME, "" );
- RTEMS.CLOCK_SET( TIME, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_SET SUCCESSFUL" );
- TEXT_IO.PUT_LINE( " - SUCCESSFUL" );
-
- end SCREEN_4;
-
---PAGE
---
--- SCREEN_5
---
-
- procedure SCREEN_5
- is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.SEMAPHORE_CREATE(
- 0,
- 1,
- RTEMS.DEFAULT_ATTRIBUTES,
- RTEMS.NO_PRIORITY,
- SPTEST.JUNK_ID,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_NAME,
- "SEMAPHORE_CREATE WITH ILLEGAL NAME"
- );
- TEXT_IO.PUT_LINE( "TA1 - semaphore_create - INVALID_NAME" );
-
- RTEMS.SEMAPHORE_CREATE(
- SPTEST.SEMAPHORE_NAME( 1 ),
- 1,
- RTEMS.DEFAULT_ATTRIBUTES,
- RTEMS.NO_PRIORITY,
- SPTEST.SEMAPHORE_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED(
- STATUS,
- "SEMAPHORE_CREATE SUCCESSFUL"
- );
- TEXT_IO.PUT_LINE( "TA1 - semaphore_create - 1 - SUCCESSFUL" );
-
- RTEMS.SEMAPHORE_CREATE(
- SPTEST.SEMAPHORE_NAME( 2 ),
- 1,
- RTEMS.BINARY_SEMAPHORE,
- RTEMS.NO_PRIORITY,
- SPTEST.SEMAPHORE_ID( 2 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED(
- STATUS,
- "SEMAPHORE_CREATE SUCCESSFUL"
- );
- TEXT_IO.PUT_LINE( "TA1 - semaphore_create - 2 - SUCCESSFUL" );
-
- loop
- RTEMS.SEMAPHORE_CREATE(
- SPTEST.SEMAPHORE_NAME( 3 ),
- 1,
- RTEMS.DEFAULT_ATTRIBUTES,
- RTEMS.NO_PRIORITY,
- SPTEST.JUNK_ID,
- STATUS
- );
-
- exit when not RTEMS.ARE_STATUSES_EQUAL( STATUS, RTEMS.SUCCESSFUL );
- end loop;
-
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.TOO_MANY,
- "SEMAPHORE_CREATE OF TOO MANY"
- );
- TEXT_IO.PUT_LINE( "TA1 - semaphore_create - 3 - TOO_MANY" );
-
- RTEMS.SEMAPHORE_CREATE(
- SPTEST.SEMAPHORE_NAME( 1 ),
- 1,
- RTEMS.INHERIT_PRIORITY + RTEMS.BINARY_SEMAPHORE + RTEMS.FIFO,
- RTEMS.NO_PRIORITY,
- SPTEST.JUNK_ID,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.NOT_DEFINED,
- "SEMAPHORE_CREATE OF FIFO INHERIT PRIORITY"
- );
- TEXT_IO.PUT_LINE("TA1 - semaphore_create - NOT_DEFINED");
-
- RTEMS.SEMAPHORE_CREATE(
- SPTEST.SEMAPHORE_NAME( 1 ),
- 1,
- RTEMS.INHERIT_PRIORITY + RTEMS.COUNTING_SEMAPHORE + RTEMS.PRIORITY,
- RTEMS.NO_PRIORITY,
- SPTEST.JUNK_ID,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.NOT_DEFINED,
- "SEMAPHORE_CREATE OF COUNTING_SEMAPHORE INHERIT PRIORITY"
- );
- TEXT_IO.PUT_LINE("TA1 - semaphore_create - NOT_DEFINED");
-
- RTEMS.SEMAPHORE_CREATE(
- SPTEST.SEMAPHORE_NAME( 1 ),
- 2,
- RTEMS.BINARY_SEMAPHORE,
- RTEMS.NO_PRIORITY,
- SPTEST.JUNK_ID,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_NUMBER,
- "SEMAPHORE_CREATE OF BINARY_SEMAPHORE with COUNT > 1"
- );
- TEXT_IO.PUT_LINE("TA1 - semaphore_create - INVALID_NUMBER");
-
- RTEMS.SEMAPHORE_CREATE(
- SPTEST.SEMAPHORE_NAME( 3 ),
- 1,
- RTEMS.GLOBAL,
- RTEMS.NO_PRIORITY,
- SPTEST.JUNK_ID,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.MP_NOT_CONFIGURED,
- "SEMAPHORE_CREATE OF MP_NOT_CONFIGURED"
- );
- TEXT_IO.PUT_LINE("TA1 - semaphore_create - MP_NOT_CONFIGURED");
-
- RTEMS.SEMAPHORE_DELETE( 100, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ID,
- "SEMAPHORE_DELETE WITH ILLEGAL ID"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - semaphore_delete - unknown INVALID_ID"
- );
-
- RTEMS.SEMAPHORE_DELETE( 16#10100#, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ID,
- "SEMAPHORE_DELETE WITH LOCAL ILLEGAL ID"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - semaphore_delete - local INVALID_ID"
- );
-
- RTEMS.SEMAPHORE_IDENT(
- 100,
- RTEMS.SEARCH_ALL_NODES,
- SPTEST.JUNK_ID,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_NAME,
- "SEMAPHORE_IDENT WITH ILLEGAL NAME (local)"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - semaphore_ident - global INVALID_NAME"
- );
-
- RTEMS.SEMAPHORE_IDENT( 100, 1, SPTEST.JUNK_ID, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_NAME,
- "SEMAPHORE_IDENT WITH ILLEGAL NAME (global)"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - semaphore_ident - local INVALID_NAME"
- );
-
- end SCREEN_5;
-
---PAGE
---
--- SCREEN_6
---
-
- procedure SCREEN_6
- is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.SEMAPHORE_OBTAIN(
- 100,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ID,
- "SEMAPHORE_OBTAIN WITH ILLEGAL ID"
- );
- TEXT_IO.PUT_LINE( "TA1 - semaphore_obtain - INVALID_ID" );
-
- RTEMS.SEMAPHORE_OBTAIN(
- SPTEST.SEMAPHORE_ID( 1 ),
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED(STATUS, "SEMAPHORE_OBTAIN SUCCESSFUL");
- TEXT_IO.PUT_LINE(
- "TA1 - semaphore_obtain - got sem 1 - SUCCESSFUL"
- );
-
- RTEMS.SEMAPHORE_OBTAIN(
- SPTEST.SEMAPHORE_ID( 1 ),
- RTEMS.NO_WAIT,
- RTEMS.NO_TIMEOUT,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.UNSATISFIED,
- "SEMAPHORE_OBTAIN NOT AVAILABLE"
- );
- TEXT_IO.PUT_LINE( "TA1 - semaphore_obtain - UNSATISFIED" );
-
- TEXT_IO.PUT_LINE( "TA1 - semaphore_obtain - timeout in 3 seconds" );
- RTEMS.SEMAPHORE_OBTAIN(
- SPTEST.SEMAPHORE_ID( 1 ),
- RTEMS.DEFAULT_OPTIONS,
- 3 * TEST_SUPPORT.TICKS_PER_SECOND,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.TIMEOUT,
- "SEMAPHORE_OBTAIN NOT AVAILABLE"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - semaphore_obtain - woke with TIMEOUT"
- );
-
- RTEMS.SEMAPHORE_RELEASE( SPTEST.SEMAPHORE_ID( 2 ), STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.NOT_OWNER_OF_RESOURCE,
- "SEMAPHORE_RELEASE AND NOT OWNER"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - semaphore_release - NOT_OWNER_OF_RESOURCE"
- );
-
- RTEMS.SEMAPHORE_RELEASE( 100, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ID,
- "SEMAPHORE_RELEASE WITH ILLEGAL ID"
- );
- TEXT_IO.PUT_LINE( "TA1 - semaphore_release - INVALID_ID" );
-
- TEXT_IO.PUT_LINE(
- "TA1 - task_start - start TA2 - SUCCESSFUL"
- );
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 2 ),
- SPTEST.TASK_2'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA2" );
-
- TEXT_IO.PUT_LINE(
- "TA1 - task_wake_after - yield processor - SUCCESSFUL"
- );
- RTEMS.TASK_WAKE_AFTER( RTEMS.YIELD_PROCESSOR, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER (yield)" );
-
- TEXT_IO.PUT_LINE(
- "TA1 - semaphore_delete - delete sem 1 - SUCCESSFUL"
- );
- RTEMS.SEMAPHORE_DELETE( SPTEST.SEMAPHORE_ID( 1 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_DELETE OF SM1" );
-
- TEXT_IO.PUT_LINE( "TA1 - semaphore_obtain - binary semaphore" );
- RTEMS.SEMAPHORE_OBTAIN(
- SPTEST.SEMAPHORE_ID( 2 ),
- RTEMS.NO_WAIT,
- RTEMS.NO_TIMEOUT,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_OBTAIN" );
-
- TEXT_IO.PUT_LINE(
- "TA1 - semaphore_delete - delete sem 2 - RESOURCE_IN_USE"
- );
- RTEMS.SEMAPHORE_DELETE( SPTEST.SEMAPHORE_ID( 2 ), STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.RESOURCE_IN_USE,
- "SEMAPHORE_DELETE OF SM2"
- );
-
- TEXT_IO.PUT_LINE(
- "TA1 - task_wake_after - yield processor - SUCCESSFUL"
- );
- RTEMS.TASK_WAKE_AFTER( RTEMS.YIELD_PROCESSOR, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER (yield)" );
-
- RTEMS.TASK_DELETE( SPTEST.TASK_ID( 2 ), STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ID,
- "TASK_DELETE AFTER THE TASK HAS BEEN DELETED"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - task_delete TA2 - already deleted INVALID_ID"
- );
-
- end SCREEN_6;
-
---PAGE
---
--- SCREEN_7
---
-
- procedure SCREEN_7
- is
- BUFFER : SPTEST.BUFFER;
- BUFFER_POINTER : RTEMS.ADDRESS;
- COUNT : RTEMS.UNSIGNED32;
- MESSAGE_SIZE : RTEMS.UNSIGNED32;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- BUFFER_POINTER := BUFFER'ADDRESS;
-
- RTEMS.MESSAGE_QUEUE_BROADCAST(
- 100,
- BUFFER_POINTER,
- 16,
- COUNT,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ID,
- "MESSAGE_QUEUE_BROADCAST WITH ILLEGAL ID"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - message_queue_broadcast - INVALID_ID"
- );
-
- RTEMS.MESSAGE_QUEUE_CREATE(
- 0,
- 3,
- 16,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.JUNK_ID,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_NAME,
- "MESSAGE_QUEUE_CREATE WITH ILLEGAL NAME"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - message_queue_create - Q 1 - INVALID_NAME"
- );
-
- RTEMS.MESSAGE_QUEUE_CREATE(
- SPTEST.QUEUE_NAME( 1 ),
- 1,
- 16,
- RTEMS.GLOBAL,
- SPTEST.JUNK_ID,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.MP_NOT_CONFIGURED,
- "MESSAGE_QUEUE_CREATE OF MP NOT CONFIGURED"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - message_queue_create - Q 1 - MP_NOT_CONFIGURED");
-
- RTEMS.MESSAGE_QUEUE_CREATE(
- SPTEST.QUEUE_NAME( 1 ),
- 2,
- 16,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.QUEUE_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED(
- STATUS,
- "MESSAGE_QUEUE_CREATE SUCCESSFUL"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - message_queue_create - Q 1 - 2 DEEP - SUCCESSFUL"
- );
-
- RTEMS.MESSAGE_QUEUE_CREATE(
- SPTEST.QUEUE_NAME( 2 ),
- 1,
- 16,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.JUNK_ID,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.TOO_MANY,
- "MESSAGE_QUEUE_CREATE OF TOO MANY"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - message_queue_create - Q 2 - TOO_MANY"
- );
-
- RTEMS.MESSAGE_QUEUE_DELETE( 100, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ID,
- "MESSAGE_QUEUE_DELETE WITH ILLEGAL ID"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - message_queue_delete - unknown INVALID_ID"
- );
-
- RTEMS.MESSAGE_QUEUE_DELETE( 16#10100#, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ID,
- "MESSAGE_QUEUE_DELETE WITH LOCAL ILLEGAL ID"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - message_queue_delete - local INVALID_ID"
- );
-
- RTEMS.MESSAGE_QUEUE_IDENT(
- 100,
- RTEMS.SEARCH_ALL_NODES,
- SPTEST.JUNK_ID,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_NAME,
- "MESSAGE_QUEUE_IDENT WITH ILLEGAL NAME"
- );
- TEXT_IO.PUT_LINE( "TA1 - message_queue_ident - INVALID_NAME" );
-
- RTEMS.MESSAGE_QUEUE_FLUSH( 100, COUNT, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ID,
- "MESSAGE_QUEUE_FLUSH WITH ILLEGAL ID"
- );
- TEXT_IO.PUT_LINE( "TA1 - message_queue_flush - INVALID_ID" );
-
- RTEMS.MESSAGE_QUEUE_RECEIVE(
- 100,
- BUFFER_POINTER,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- MESSAGE_SIZE,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ID,
- "MESSAGE_QUEUE_RECEIVE WITH ILLEGAL ID"
- );
- TEXT_IO.PUT_LINE( "TA1 - message_queue_receive - INVALID_ID" );
-
- RTEMS.MESSAGE_QUEUE_RECEIVE(
- SPTEST.QUEUE_ID( 1 ),
- BUFFER_POINTER,
- RTEMS.NO_WAIT,
- RTEMS.NO_TIMEOUT,
- MESSAGE_SIZE,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.UNSATISFIED,
- "MESSAGE_QUEUE_RECEIVE UNSATISFIED"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - message_queue_receive - Q 1 - UNSATISFIED"
- );
-
- TEXT_IO.PUT_LINE(
- "TA1 - message_queue_receive - Q 1 - timeout in 3 seconds"
- );
- RTEMS.MESSAGE_QUEUE_RECEIVE(
- SPTEST.QUEUE_ID( 1 ),
- BUFFER_POINTER,
- RTEMS.DEFAULT_OPTIONS,
- 3 * TEST_SUPPORT.TICKS_PER_SECOND,
- MESSAGE_SIZE,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.TIMEOUT,
- "MESSAGE_QUEUE_RECEIVE 3 SECOND TIMEOUT"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - message_queue_receive - Q 1 - woke up with TIMEOUT"
- );
-
- RTEMS.MESSAGE_QUEUE_SEND( 100, BUFFER_POINTER, 16, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ID,
- "MESSAGE_QUEUE_SEND WITH ILLEGAL ID"
- );
- TEXT_IO.PUT_LINE( "TA1 - message_queue_send - INVALID_ID" );
-
- RTEMS.MESSAGE_QUEUE_SEND(
- SPTEST.QUEUE_ID( 1 ),
- BUFFER_POINTER,
- 16,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_SEND" );
- TEXT_IO.PUT_LINE(
- "TA1 - message_queue_send - BUFFER 1 TO Q 1 - SUCCESSFUL"
- );
-
- RTEMS.MESSAGE_QUEUE_SEND(
- SPTEST.QUEUE_ID( 1 ),
- BUFFER_POINTER,
- 16,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_SEND" );
- TEXT_IO.PUT_LINE(
- "TA1 - message_queue_send - BUFFER 2 TO Q 1 - SUCCESSFUL"
- );
-
- RTEMS.MESSAGE_QUEUE_SEND(
- SPTEST.QUEUE_ID( 1 ),
- BUFFER_POINTER,
- 16,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.TOO_MANY,
- "MESSAGE_QUEUE_SEND TOO MANY TO LIMITED QUEUE"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - message_queue_send - BUFFER 3 TO Q 1 - TOO_MANY"
- );
-
- end SCREEN_7;
-
---PAGE
---
--- SCREEN_8
---
-
- procedure SCREEN_8
- is
- BUFFER : SPTEST.BUFFER;
- BUFFER_POINTER : RTEMS.ADDRESS;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- BUFFER_POINTER := BUFFER'ADDRESS;
-
- RTEMS.MESSAGE_QUEUE_DELETE( SPTEST.QUEUE_ID( 1 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED(
- STATUS,
- "MESSAGE_QUEUE_DELETE SUCCESSFUL"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - message_queue_delete - Q 1 - SUCCESSFUL"
- );
-
- RTEMS.MESSAGE_QUEUE_CREATE(
- SPTEST.QUEUE_NAME( 1 ),
- 2,
- 16,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.QUEUE_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED(
- STATUS,
- "MESSAGE_QUEUE_CREATE SUCCESSFUL"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - message_queue_create - Q 1 - 2 DEEP - SUCCESSFUL"
- );
-
- RTEMS.MESSAGE_QUEUE_SEND(
- SPTEST.QUEUE_ID( 1 ),
- BUFFER_POINTER,
- 16,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_SEND" );
- TEXT_IO.PUT_LINE(
- "TA1 - message_queue_send - BUFFER 1 TO Q 1 - SUCCESSFUL"
- );
-
- RTEMS.MESSAGE_QUEUE_SEND(
- SPTEST.QUEUE_ID( 1 ),
- BUFFER_POINTER,
- 16,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_SEND" );
- TEXT_IO.PUT_LINE(
- "TA1 - message_queue_send - BUFFER 2 TO Q 1 - SUCCESSFUL"
- );
-
- RTEMS.MESSAGE_QUEUE_SEND(
- SPTEST.QUEUE_ID( 1 ),
- BUFFER_POINTER,
- 16,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.TOO_MANY,
- "MESSAGE_QUEUE_SEND TOO MANY TO LIMITED QUEUE"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - message_queue_send - BUFFER 3 TO Q 1 - TOO_MANY"
- );
-
- RTEMS.MESSAGE_QUEUE_DELETE( SPTEST.QUEUE_ID( 1 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED(
- STATUS,
- "MESSAGE_QUEUE_DELETE SUCCESSFUL"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - message_queue_delete - Q 1 - SUCCESSFUL"
- );
-
- RTEMS.MESSAGE_QUEUE_CREATE(
- SPTEST.QUEUE_NAME( 1 ),
- 3,
- 16,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.QUEUE_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED(
- STATUS,
- "MESSAGE_QUEUE_CREATE SUCCESSFUL"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - message_queue_create - Q 1 - 3 DEEP - SUCCESSFUL"
- );
-
- RTEMS.MESSAGE_QUEUE_SEND(
- SPTEST.QUEUE_ID( 1 ),
- BUFFER_POINTER,
- 16,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_SEND" );
- TEXT_IO.PUT_LINE(
- "TA1 - message_queue_send - BUFFER 1 TO Q 1 - SUCCESSFUL"
- );
-
- RTEMS.MESSAGE_QUEUE_SEND(
- SPTEST.QUEUE_ID( 1 ),
- BUFFER_POINTER,
- 16,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_SEND" );
- TEXT_IO.PUT_LINE(
- "TA1 - message_queue_send - BUFFER 2 TO Q 1 - SUCCESSFUL"
- );
-
- RTEMS.MESSAGE_QUEUE_SEND(
- SPTEST.QUEUE_ID( 1 ),
- BUFFER_POINTER,
- 16,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_SEND" );
- TEXT_IO.PUT_LINE(
- "TA1 - message_queue_send - BUFFER 3 TO Q 1 - SUCCESSFUL"
- );
-
- RTEMS.MESSAGE_QUEUE_SEND(
- SPTEST.QUEUE_ID( 1 ),
- BUFFER_POINTER,
- 16,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.TOO_MANY,
- "MESSAGE_QUEUE_SEND TOO MANY TO LIMITED QUEUE"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - message_queue_send - BUFFER 4 TO Q 1 - TOO_MANY"
- );
-
- RTEMS.MESSAGE_QUEUE_DELETE( SPTEST.QUEUE_ID( 1 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED(
- STATUS,
- "MESSAGE_QUEUE_DELETE SUCCESSFUL"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - message_queue_delete - Q 1 - SUCCESSFUL"
- );
-
- RTEMS.MESSAGE_QUEUE_CREATE(
- SPTEST.QUEUE_NAME( 1 ),
- 2,
- 16,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.QUEUE_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED(
- STATUS,
- "MESSAGE_QUEUE_CREATE SUCCESSFUL"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - message_queue_create - Q 1 - 3 DEEP - SUCCESSFUL"
- );
-
- TEXT_IO.PUT_LINE(
- "TA1 - task_start - start TA3 - SUCCESSFUL"
- );
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 3 ),
- SPTEST.TASK_3'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA3" );
-
- TEXT_IO.PUT_LINE(
- "TA1 - task_wake_after - yield processor - SUCCESSFUL"
- );
- RTEMS.TASK_WAKE_AFTER( RTEMS.YIELD_PROCESSOR, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER (yield)" );
-
- RTEMS.MESSAGE_QUEUE_DELETE( SPTEST.QUEUE_ID( 1 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED(
- STATUS,
- "MESSAGE_QUEUE_DELETE SUCCESSFUL"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - message_queue_delete - delete Q 1 - SUCCESSFUL"
- );
-
- TEXT_IO.PUT_LINE(
- "TA1 - task_wake_after - yield processor - SUCCESSFUL"
- );
- RTEMS.TASK_WAKE_AFTER( RTEMS.YIELD_PROCESSOR, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER (yield)" );
-
- end SCREEN_8;
-
---PAGE
---
--- SCREEN_9
---
-
- procedure SCREEN_9
- is
- CONVERTED : RTEMS.ADDRESS;
- STATUS : RTEMS.STATUS_CODES;
- OLD_SERVICE_ROUTINE : RTEMS.ADDRESS;
- begin
-
--- RTEMS.INTERRUPT_CATCH(
--- SPTEST.SERVICE_ROUTINE'ACCESS,
--- 500,
--- OLD_SERVICE_ROUTINE,
--- STATUS
--- );
--- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
--- STATUS,
--- RTEMS.INVALID_NUMBER,
--- "INTERRUPT_CATCH WITH INVALID VECTOR"
--- );
--- TEXT_IO.PUT_LINE( "TA1 - interrupt_catch - INVALID_NUMBER" );
- TEXT_IO.PUT_LINE(
- "TA1 - interrupt_catch - INVALID_NUMBER -- constraint error"
- );
-
- RTEMS.INTERRUPT_CATCH(
- RTEMS.NULL_ADDRESS,
- 3,
- OLD_SERVICE_ROUTINE,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ADDRESS,
- "INTERRUPT_CATCH WITH INVALID HANDLER"
- );
- TEXT_IO.PUT_LINE( "TA1 - interrupt_catch - INVALID_ADDRESS" );
-
- RTEMS.SIGNAL_SEND( 100, RTEMS.SIGNAL_1, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ID,
- "SIGNAL_SEND WITH ILLEGAL ID"
- );
- TEXT_IO.PUT_LINE( "TA1 - signal_send - INVALID_ID" );
-
- RTEMS.SIGNAL_SEND( RTEMS.SELF, RTEMS.SIGNAL_16, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.NOT_DEFINED,
- "SIGNAL_SEND WITH NO HANDLER"
- );
- TEXT_IO.PUT_LINE( "TA1 - signal_send - NOT_DEFINED" );
-
- RTEMS.PORT_CREATE(
- 0,
- SPTEST.INTERNAL_PORT_AREA'ADDRESS,
- SPTEST.EXTERNAL_PORT_AREA'ADDRESS,
- SPTEST.INTERNAL_PORT_AREA'LENGTH,
- SPTEST.JUNK_ID,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_NAME,
- "PORT_CREATE WITH ILLEGAL NAME"
- );
- TEXT_IO.PUT_LINE( "TA1 - port_create - INVALID_NAME" );
-
- RTEMS.PORT_CREATE(
- SPTEST.PORT_NAME( 1 ),
- SPTEST.INTERNAL_PORT_AREA( 1 )'ADDRESS,
- SPTEST.EXTERNAL_PORT_AREA'ADDRESS,
- SPTEST.INTERNAL_PORT_AREA'LENGTH,
- SPTEST.JUNK_ID,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ADDRESS,
- "PORT_CREATE WITH ILLEGAL ADDRESS"
- );
- TEXT_IO.PUT_LINE( "TA1 - port_create - INVALID_ADDRESS" );
-
- RTEMS.PORT_CREATE(
- SPTEST.PORT_NAME( 1 ),
- SPTEST.INTERNAL_PORT_AREA'ADDRESS,
- SPTEST.EXTERNAL_PORT_AREA'ADDRESS,
- SPTEST.INTERNAL_PORT_AREA'LENGTH,
- SPTEST.JUNK_ID,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.TOO_MANY,
- "PORT_CREATE OF TOO MANY"
- );
- TEXT_IO.PUT_LINE( "TA1 - port_create - TOO_MANY" );
-
- RTEMS.PORT_DELETE( 0, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ID,
- "PORT_DELETE WITH ILLEGAL ID"
- );
- TEXT_IO.PUT_LINE( "TA1 - port_delete - INVALID_ID" );
-
- RTEMS.PORT_IDENT( 0, SPTEST.JUNK_ID, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_NAME,
- "PORT_IDENT WITH ILLEGAL NAME"
- );
- TEXT_IO.PUT_LINE( "TA1 - port_ident - INVALID_NAME" );
-
- RTEMS.PORT_INTERNAL_TO_EXTERNAL(
- 100,
- SPTEST.INTERNAL_PORT_AREA'ADDRESS,
- CONVERTED,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ID,
- "PORT_INTERNAL_TO_EXTERNAL WITH ILLEGAL ID"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - port_internal_to_external - INVALID_ID"
- );
-
- RTEMS.PORT_EXTERNAL_TO_INTERNAL(
- 100,
- SPTEST.EXTERNAL_PORT_AREA'ADDRESS,
- CONVERTED,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ID,
- "PORT_EXTERNAL_TO_INTERNAL WITH ILLEGAL ID"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - port_external_to_internal - INVALID_ID"
- );
-
- end SCREEN_9;
-
---PAGE
---
--- SCREEN_10
---
-
- procedure SCREEN_10
- is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.RATE_MONOTONIC_CREATE( 0, SPTEST.JUNK_ID, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_NAME,
- "RATE_MONOTONIC_CREATE WITH ILLEGAL NAME"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - rate_monotonic_create - INVALID_NAME"
- );
-
- RTEMS.RATE_MONOTONIC_CREATE(
- SPTEST.PERIOD_NAME( 1 ),
- SPTEST.PERIOD_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "RATE_MONOTONIC_CREATE" );
- TEXT_IO.PUT_LINE(
- "TA1 - rate_monotonic_create - SUCCESSFUL"
- );
-
- RTEMS.RATE_MONOTONIC_CREATE(
- SPTEST.PERIOD_NAME( 1 ),
- SPTEST.JUNK_ID,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.TOO_MANY,
- "RATE_MONOTONIC_CREATE FOR TOO MANY"
- );
- TEXT_IO.PUT_LINE( "TA1 - rate_monotonic_create - TOO_MANY" );
-
- RTEMS.RATE_MONOTONIC_IDENT( 0, SPTEST.JUNK_ID, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_NAME,
- "RATE_MONOTONIC_IDENT WITH ILLEGAL NAME"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - rate_monotonic_ident - INVALID_NAME"
- );
-
- RTEMS.RATE_MONOTONIC_PERIOD( 100, 5, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ID,
- "RATE_MONOTONIC_PERIOD WITH ILLEGAL ID"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - rate_monotonic_period - unknown INVALID_ID"
- );
-
- RTEMS.RATE_MONOTONIC_PERIOD( 16#10100#, 5, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ID,
- "RATE_MONOTONIC_PERIOD WITH ILLEGAL ID"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - rate_monotonic_period - local INVALID_ID"
- );
-
- RTEMS.RATE_MONOTONIC_PERIOD(
- SPTEST.PERIOD_ID( 1 ),
- RTEMS.PERIOD_STATUS,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.NOT_DEFINED,
- "RATE_MONOTONIC_PERIOD STATUS NOT DEFINED"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - rate_monotonic_period( STATUS ) - NOT_DEFINED"
- );
-
- RTEMS.RATE_MONOTONIC_PERIOD( SPTEST.PERIOD_ID( 1 ), 100, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED(
- STATUS,
- "RATE_MONOTONIC_PERIOD 100 TICKS"
- );
- TEXT_IO.PUT( "TA1 - rate_monotonic_period - 100 ticks - " );
- TEXT_IO.PUT_LINE( "SUCCESSFUL" );
-
- RTEMS.RATE_MONOTONIC_PERIOD(
- SPTEST.PERIOD_ID( 1 ),
- RTEMS.PERIOD_STATUS,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED(
- STATUS,
- "RATE_MONOTONIC_PERIOD STATUS"
- );
- TEXT_IO.PUT( "TA1 - rate_monotonic_period( STATUS ) - " );
- TEXT_IO.PUT_LINE( "SUCCESSFUL" );
-
- loop
-
- RTEMS.RATE_MONOTONIC_PERIOD(
- SPTEST.PERIOD_ID( 1 ),
- RTEMS.PERIOD_STATUS,
- STATUS
- );
-
- exit when RTEMS.ARE_STATUSES_EQUAL( STATUS, RTEMS.TIMEOUT );
-
- TEST_SUPPORT.DIRECTIVE_FAILED(
- STATUS,
- "RATE_MONOTONIC_PERIOD STATUS WAITING FOR TIMEOUT"
- );
-
- end loop;
- TEXT_IO.PUT( "TA1 - rate_monotonic_period( STATUS ) - " );
- TEXT_IO.PUT_LINE( "TIMEOUT" );
-
- RTEMS.RATE_MONOTONIC_CANCEL( 100, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ID,
- "RATE_MONOTONIC_CANCEL WITH ILLEGAL ID"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - rate_monotonic_cancel - unknown INVALID_ID"
- );
-
- RTEMS.RATE_MONOTONIC_CANCEL( 16#10100#, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ID,
- "RATE_MONOTONIC_CANCEL WITH ILLEGAL ID"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - rate_monotonic_cancel - local INVALID_ID"
- );
-
- RTEMS.RATE_MONOTONIC_CANCEL( SPTEST.PERIOD_ID( 1 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "RATE_MONOTONIC_CANCEL" );
- TEXT_IO.PUT_LINE( "TA1 - rate_monotonic_cancel - SUCCESSFUL" );
-
- RTEMS.RATE_MONOTONIC_PERIOD( SPTEST.PERIOD_ID( 1 ), 5, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED(
- STATUS,
- "RATE_MONOTONIC_PERIOD RESTART"
- );
-
- RTEMS.TASK_WAKE_AFTER( TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- RTEMS.RATE_MONOTONIC_PERIOD( SPTEST.PERIOD_ID( 1 ), 5, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.TIMEOUT,
- "RATE_MONOTONIC_PERIOD TIMED OUT"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - rate_monotonic_period - 5 ticks - TIMEOUT"
- );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 4 ),
- SPTEST.TASK_4'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA4" );
-
- TEXT_IO.PUT_LINE( "TA1 - task_wake_after - yielding to TA4" );
- RTEMS.TASK_WAKE_AFTER( RTEMS.YIELD_PROCESSOR, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER (yield)" );
-
- RTEMS.RATE_MONOTONIC_DELETE( 100, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ID,
- "RATE_MONOTONIC_DELETE WITH ILLEGAL ID"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - rate_monotonic_delete - unknown INVALID_ID"
- );
-
- RTEMS.RATE_MONOTONIC_DELETE( 16#10100#, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ID,
- "RATE_MONOTONIC_DELETE WITH ILLEGAL ID"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - rate_monotonic_delete - local INVALID_ID"
- );
-
- RTEMS.RATE_MONOTONIC_DELETE( SPTEST.PERIOD_ID( 1 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "RATE_MONOTONIC_DELETE" );
- TEXT_IO.PUT_LINE(
- "TA1 - rate_monotonic_delete - SUCCESSFUL"
- );
-
- end SCREEN_10;
-
---PAGE
---
--- SCREEN_11
---
-
- procedure SCREEN_11
- is
- BUFFER_ADDRESS_1 : RTEMS.ADDRESS;
- BUFFER_ADDRESS_2 : RTEMS.ADDRESS;
- BUFFER_ADDRESS_3 : RTEMS.ADDRESS;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.PARTITION_CREATE(
- 0,
- SPTEST.PARTITION_GOOD_AREA'ADDRESS,
- 128,
- 40,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.JUNK_ID,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_NAME,
- "PARTITION_CREATE WITH ILLEGAL NAME"
- );
- TEXT_IO.PUT_LINE( "TA1 - partition_create - INVALID_NAME" );
-
- RTEMS.PARTITION_CREATE(
- SPTEST.PARTITION_NAME( 1 ),
- SPTEST.PARTITION_GOOD_AREA'ADDRESS,
- 0,
- 80,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.JUNK_ID,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_SIZE,
- "PARTITION_CREATE WITH ILLEGAL LENGTH"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - partition_create - length - INVALID_SIZE"
- );
-
- RTEMS.PARTITION_CREATE(
- SPTEST.PARTITION_NAME( 1 ),
- SPTEST.PARTITION_GOOD_AREA'ADDRESS,
- 128,
- 0,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.JUNK_ID,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_SIZE,
- "PARTITION_CREATE WITH ILLEGAL BUFFER_SIZE"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - partition_create - buffer size - INVALID_SIZE"
- );
-
- RTEMS.PARTITION_CREATE(
- SPTEST.PARTITION_NAME( 1 ),
- SPTEST.PARTITION_GOOD_AREA'ADDRESS,
- 128,
- 256,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.JUNK_ID,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_SIZE,
- "PARTITION_CREATE WITH BUFFER_SIZE > LENGTH"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - partition_create - length < buffer size - INVALID_SIZE"
- );
-
- RTEMS.PARTITION_CREATE(
- SPTEST.PARTITION_NAME( 1 ),
- SPTEST.PARTITION_GOOD_AREA'ADDRESS,
- 128,
- 64,
- RTEMS.GLOBAL,
- SPTEST.JUNK_ID,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.MP_NOT_CONFIGURED,
- "PARTITION_CREATE OF GLOBAL"
- );
- TEXT_IO.PUT_LINE("TA1 - partition_create - MP_NOT_CONFIGURED");
-
- RTEMS.PARTITION_CREATE(
- SPTEST.PARTITION_NAME( 1 ),
- SPTEST.PARTITION_BAD_AREA'ADDRESS,
- 128,
- 64,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.JUNK_ID,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ADDRESS,
- "PARTITION_CREATE WITH BAD ADDRESS"
- );
- TEXT_IO.PUT_LINE( "TA1 - partition_create - INVALID_ADDRESS" );
-
- RTEMS.PARTITION_CREATE(
- SPTEST.PARTITION_NAME( 1 ),
- SPTEST.PARTITION_GOOD_AREA'ADDRESS,
- 128,
- 34,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.JUNK_ID,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_SIZE,
- "PARTITION_CREATE WITH UNALIGNED BUFFER_SIZE"
- );
- TEXT_IO.PUT_LINE( "TA1 - partition_create - INVALID_SIZE" );
-
- RTEMS.PARTITION_DELETE( 100, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ID,
- "PARTITION_DELETE WITH ILLEGAL ID"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - partition_delete - unknown INVALID_ID"
- );
-
- RTEMS.PARTITION_DELETE( 16#10100#, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ID,
- "PARTITION_DELETE WITH ILLEGAL ID"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - partition_delete - local INVALID_ID"
- );
-
- RTEMS.PARTITION_GET_BUFFER( 100, BUFFER_ADDRESS_1, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ID,
- "PARTITION_GET_BUFFER WITH ILLEGAL ID"
- );
- TEXT_IO.PUT_LINE( "TA1 - partition_get_buffer - INVALID_ID" );
-
- RTEMS.PARTITION_IDENT(
- 0,
- RTEMS.SEARCH_ALL_NODES,
- SPTEST.JUNK_ID,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_NAME,
- "PARTITION_IDENT WITH ILLEGAL NAME"
- );
- TEXT_IO.PUT_LINE( "TA1 - partition_ident - INVALID_NAME" );
-
- RTEMS.PARTITION_RETURN_BUFFER( 100, BUFFER_ADDRESS_1, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ID,
- "PARTITION_RETURN WITH ILLEGAL ID"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - partition_return_buffer - INVALID_ID"
- );
-
- RTEMS.PARTITION_CREATE(
- SPTEST.PARTITION_NAME( 1 ),
- SPTEST.PARTITION_GOOD_AREA'ADDRESS,
- 128,
- 64,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.PARTITION_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "PARTITION_CREATE" );
- TEXT_IO.PUT_LINE( "TA1 - partition_create - SUCCESSFUL" );
-
- RTEMS.PARTITION_CREATE(
- SPTEST.PARTITION_NAME( 1 ),
- SPTEST.PARTITION_GOOD_AREA'ADDRESS,
- 128,
- 64,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.JUNK_ID,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.TOO_MANY,
- "PARTITION_CREATE OF TOO MANY"
- );
- TEXT_IO.PUT_LINE( "TA1 - partition_create - TOO_MANY" );
-
- RTEMS.PARTITION_GET_BUFFER(
- SPTEST.PARTITION_ID( 1 ),
- BUFFER_ADDRESS_1,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "PARTITION_GET_BUFFER" );
- TEXT_IO.PUT_LINE( "TA1 - partition_get_buffer - SUCCESSFUL" );
-
- RTEMS.PARTITION_GET_BUFFER(
- SPTEST.PARTITION_ID( 1 ),
- BUFFER_ADDRESS_2,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "PARTITION_GET_BUFFER" );
- TEXT_IO.PUT_LINE( "TA1 - partition_get_buffer - SUCCESSFUL" );
-
- RTEMS.PARTITION_GET_BUFFER(
- SPTEST.PARTITION_ID( 1 ),
- BUFFER_ADDRESS_3,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.UNSATISFIED,
- "PARTITION_GET_BUFFER UNSATISFIED"
- );
- TEXT_IO.PUT_LINE( "TA1 - partition_get_buffer - UNSATISFIED" );
-
- RTEMS.PARTITION_DELETE(
- SPTEST.PARTITION_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.RESOURCE_IN_USE,
- "PARTITION_DELETE WITH BUFFERS IN USE"
- );
- TEXT_IO.PUT_LINE( "TA1 - partition_delete - RESOURCE_IN_USE" );
-
- RTEMS.PARTITION_RETURN_BUFFER(
- SPTEST.PARTITION_ID( 1 ),
- SPTEST.REGION_GOOD_AREA( 0 )'ADDRESS, -- NOTE: REGION
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ADDRESS,
- "PARTITION_RETURN WITH BUFFER ADDRESS OUT OF PARTITION"
- );
- TEXT_IO.PUT( "TA1 - partition_return_buffer - " );
- TEXT_IO.PUT_LINE( "INVALID_ADDRESS - out of range" );
-
- RTEMS.PARTITION_RETURN_BUFFER(
- SPTEST.PARTITION_ID( 1 ),
- SPTEST.PARTITION_GOOD_AREA( 7 )'ADDRESS,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ADDRESS,
- "PARTITION_RETURN WITH BUFFER ADDRESS NOT ON BOUNDARY"
- );
- TEXT_IO.PUT( "TA1 - partition_return_buffer - " );
- TEXT_IO.PUT_LINE( "INVALID_ADDRESS - not on boundary" );
-
-
- end SCREEN_11;
-
---PAGE
---
--- SCREEN_12
---
-
- procedure SCREEN_12
- is
- SEGMENT_ADDRESS_1 : RTEMS.ADDRESS;
- SEGMENT_ADDRESS_2 : RTEMS.ADDRESS;
- SEGMENT_ADDRESS_3 : RTEMS.ADDRESS;
- OFFSET : RTEMS.UNSIGNED32;
- GOOD_FRONT_FLAG : RTEMS.UNSIGNED32;
- GOOD_BACK_FLAG : RTEMS.UNSIGNED32;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.REGION_CREATE(
- 0,
- SPTEST.REGION_GOOD_AREA'ADDRESS,
- 16#40#,
- 32,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.JUNK_ID,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_NAME,
- "REGION_CREATE WITH ILLEGAL NAME"
- );
- TEXT_IO.PUT_LINE( "TA1 - region_create - INVALID_NAME" );
-
- RTEMS.REGION_CREATE(
- SPTEST.REGION_NAME( 1 ),
- SPTEST.REGION_BAD_AREA'ADDRESS,
- 16#40#,
- 32,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.JUNK_ID,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ADDRESS,
- "REGION_CREATE WITH ILLEGAL ADDRESS"
- );
- TEXT_IO.PUT_LINE( "TA1 - region_create - INVALID_ADDRESS" );
-
- RTEMS.REGION_CREATE(
- SPTEST.REGION_NAME( 1 ),
- SPTEST.REGION_GOOD_AREA'ADDRESS,
- 16#40#,
- 34,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.JUNK_ID,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_SIZE,
- "REGION_CREATE WITH ILLEGAL SIZE"
- );
- TEXT_IO.PUT_LINE( "TA1 - region_create - INVALID_SIZE" );
-
- RTEMS.REGION_CREATE(
- SPTEST.REGION_NAME( 1 ),
- SPTEST.REGION_GOOD_AREA( SPTEST.REGION_START_OFFSET )'ADDRESS,
- SPTEST.REGION_LENGTH,
- 16#40#,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.REGION_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_CREATE" );
- TEXT_IO.PUT_LINE( "TA1 - region_create - SUCCESSFUL" );
-
- RTEMS.REGION_CREATE(
- SPTEST.REGION_NAME( 1 ),
- SPTEST.REGION_GOOD_AREA'ADDRESS,
- SPTEST.REGION_LENGTH,
- 16#40#,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.JUNK_ID,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.TOO_MANY,
- "REGION_CREATE FOR TOO MANY"
- );
- TEXT_IO.PUT_LINE( "TA1 - region_create - TOO_MANY" );
-
- RTEMS.REGION_DELETE( 100, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ID,
- "REGION_DELETE WITH ILLEGAL ID"
- );
- TEXT_IO.PUT_LINE( "TA1 - region_delete - unknown INVALID_ID" );
-
- RTEMS.REGION_DELETE( 16#10100#, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ID,
- "REGION_DELETE WITH ILLEGAL ID"
- );
- TEXT_IO.PUT_LINE( "TA1 - region_delete - local INVALID_ID" );
-
- RTEMS.REGION_IDENT( 0, SPTEST.JUNK_ID, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_NAME,
- "REGION_IDENT WITH ILLEGAL NAME"
- );
- TEXT_IO.PUT_LINE( "TA1 - region_ident - INVALID_NAME" );
-
- RTEMS.REGION_GET_SEGMENT(
- 100,
- 16#40#,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- SEGMENT_ADDRESS_1,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ID,
- "REGION_GET_SEGMENT WITH ILLEGAL ID"
- );
- TEXT_IO.PUT_LINE( "TA1 - region_get_segment - INVALID_ID" );
-
- RTEMS.REGION_GET_SEGMENT(
- SPTEST.REGION_ID( 1 ),
- (SPTEST.REGION_GOOD_AREA'SIZE / 8) * 2,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- SEGMENT_ADDRESS_1,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_SIZE,
- "REGION_GET_SEGMENT WITH ILLEGAL SIZE"
- );
- TEXT_IO.PUT_LINE( "TA1 - region_get_segment - INVALID_SIZE" );
-
- RTEMS.REGION_GET_SEGMENT(
- SPTEST.REGION_ID( 1 ),
- 384,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- SEGMENT_ADDRESS_1,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_GET_SEGMENT" );
- TEXT_IO.PUT_LINE( "TA1 - region_get_segment - SUCCESSFUL" );
-
- RTEMS.REGION_GET_SEGMENT(
- SPTEST.REGION_ID( 1 ),
- SPTEST.REGION_LENGTH / 2,
- RTEMS.NO_WAIT,
- RTEMS.NO_TIMEOUT,
- SEGMENT_ADDRESS_2,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.UNSATISFIED,
- "REGION_GET_SEGMENT UNSATISFIED"
- );
- TEXT_IO.PUT_LINE( "TA1 - region_get_segment - UNSATISFIED" );
-
- TEXT_IO.PUT_LINE( "TA1 - region_get_segment - timeout in 3 seconds" );
- RTEMS.REGION_GET_SEGMENT(
- SPTEST.REGION_ID( 1 ),
- 128,
- RTEMS.DEFAULT_OPTIONS,
- 3 * TEST_SUPPORT.TICKS_PER_SECOND,
- SEGMENT_ADDRESS_3,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.TIMEOUT,
- "REGION_GET_SEGMENT TIMEOUT"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - region_get_segment - woke up with TIMEOUT"
- );
-
- RTEMS.REGION_DELETE( SPTEST.REGION_ID( 1 ), STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.RESOURCE_IN_USE,
- "REGION_DELETE WITH BUFFERS IN USE"
- );
- TEXT_IO.PUT_LINE( "TA1 - region_delete - RESOURCE_IN_USE" );
-
- RTEMS.REGION_RETURN_SEGMENT(
- 100,
- SEGMENT_ADDRESS_1,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ID,
- "REGION_RETURN_SEGMENT WITH ILLEGAL ID"
- );
- TEXT_IO.PUT_LINE( "TA1 - region_return_segment - INVALID_ID" );
-
- RTEMS.REGION_RETURN_SEGMENT(
- SPTEST.REGION_ID( 1 ),
- SPTEST.REGION_GOOD_AREA'ADDRESS,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ADDRESS,
- "REGION_RETURN_SEGMENT WITH ILLEGAL SEGMENT"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - region_return_segment - INVALID_ADDRESS"
- );
-
- -- internal heap errors, subject to change if heap code changes
-
- TEXT_IO.PUT_LINE( "TA1 - debug_disable - DEBUG_REGION" );
- RTEMS.DEBUG_DISABLE( RTEMS.DEBUG_REGION );
-
- OFFSET := 0;
- GOOD_BACK_FLAG := 0;
- GOOD_FRONT_FLAG := 0;
-
- TEXT_IO.PUT_LINE(
- "TA1 - region_return_segment - INVALID_ADDRESS - SKIPPED"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - region_return_segment - INVALID_ADDRESS - SKIPPED"
- );
-
-
--- OFFSET := RTEMS.SUBTRACT(
--- SEGMENT_ADDRESS_1,
--- SPTEST.REGION_GOOD_AREA'ADDRESS
--- ) / 4;
---
---
--- -- bad FRONT_FLAG error
---
--- GOOD_FRONT_FLAG := SPTEST.REGION_GOOD_AREA( OFFSET - 1 );
--- SPTEST.REGION_GOOD_AREA( OFFSET - 1 ) := GOOD_FRONT_FLAG + 2;
---
--- RTEMS.REGION_RETURN_SEGMENT(
--- SPTEST.REGION_ID( 1 ),
--- SEGMENT_ADDRESS_1,
--- STATUS
--- );
--- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
--- STATUS,
--- RTEMS.INVALID_ADDRESS,
--- "REGION_RETURN_SEGMENT WITH BACK_FLAG /= FRONT_FLAG"
--- );
--- TEXT_IO.PUT_LINE(
--- "TA1 - region_return_segment - INVALID_ADDRESS"
--- );
---
--- SPTEST.REGION_GOOD_AREA( OFFSET - 1 ) := GOOD_FRONT_FLAG;
---
--- -- bad BACK_FLAG error
---
--- GOOD_BACK_FLAG := SPTEST.REGION_GOOD_AREA( OFFSET - 2 );
--- SPTEST.REGION_GOOD_AREA( OFFSET - 2 ) := 1024;
---
--- RTEMS.REGION_RETURN_SEGMENT(
--- SPTEST.REGION_ID( 1 ),
--- SEGMENT_ADDRESS_1,
--- STATUS
--- );
--- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
--- STATUS,
--- RTEMS.INVALID_ADDRESS,
--- "REGION_RETURN_SEGMENT WITH BACK_FLAG /= FRONT_FLAG"
--- );
--- TEXT_IO.PUT_LINE(
--- "TA1 - region_return_segment - INVALID_ADDRESS"
--- );
---
--- SPTEST.REGION_GOOD_AREA( OFFSET - 2 ) := GOOD_BACK_FLAG;
-
- TEXT_IO.PUT_LINE( "TA1 - debug_enable - DEBUG_REGION" );
- RTEMS.DEBUG_ENABLE( RTEMS.DEBUG_REGION );
-
- RTEMS.REGION_EXTEND(
- 100,
- SPTEST.REGION_GOOD_AREA'ADDRESS,
- 128,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ID,
- "REGION_EXTEND WITH INVALID_ID"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - region_extend - INVALID_ID"
- );
-
- RTEMS.REGION_EXTEND(
- SPTEST.REGION_ID( 1 ),
- SPTEST.REGION_GOOD_AREA( SPTEST.REGION_START_OFFSET + 16 )'ADDRESS,
- 128,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ADDRESS,
- "REGION_EXTEND WITH INVALID_ADDRESS"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - region_extend - within heap - INVALID_ADDRESS"
- );
-
- RTEMS.REGION_EXTEND(
- SPTEST.REGION_ID( 1 ),
- SPTEST.REGION_BAD_AREA'ADDRESS,
- 128,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.NOT_IMPLEMENTED,
- "REGION_EXTEND WITH NOT_IMPLEMENTED"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - region_extend - non-contiguous lower - NOT_IMPLEMENTED"
- );
-
- RTEMS.REGION_EXTEND(
- SPTEST.REGION_ID( 1 ),
- SPTEST.REGION_GOOD_AREA(
- SPTEST.REGION_START_OFFSET - SPTEST.REGION_LENGTH )'ADDRESS,
- 128,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.NOT_IMPLEMENTED,
- "REGION_EXTEND WITH NOT_IMPLEMENTED"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - region_extend - contiguous lower - NOT_IMPLEMENTED"
- );
-
- RTEMS.REGION_EXTEND(
- SPTEST.REGION_ID( 1 ),
- SPTEST.REGION_GOOD_AREA(
- SPTEST.REGION_START_OFFSET + SPTEST.REGION_LENGTH + 16 )'ADDRESS,
- 128,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.NOT_IMPLEMENTED,
- "REGION_EXTEND WITH NOT_IMPLEMENTED"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - region_extend - non-contiguous higher - NOT_IMPLEMENTED"
- );
-
- end SCREEN_12;
-
---PAGE
---
--- SCREEN_13
---
-
- procedure SCREEN_13
- is
- RESULT : RTEMS.UNSIGNED32;
- TIME : RTEMS.TIME_OF_DAY;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.IO_CLOSE(
- RTEMS.DEVICE_MAJOR_NUMBER'LAST,
- 0,
- RTEMS.NULL_ADDRESS,
- RESULT,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_NUMBER,
- "IO_CLOSE WITH BAD MAJOR NUMBER"
- );
- TEXT_IO.PUT_LINE("TA1 - io_close - INVALID_NUMBER");
-
- RTEMS.IO_CONTROL(
- RTEMS.DEVICE_MAJOR_NUMBER'LAST,
- 0,
- RTEMS.NULL_ADDRESS,
- RESULT,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_NUMBER,
- "IO_CONTROL WITH BAD MAJOR NUMBER"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - io_control - INVALID_NUMBER"
- );
-
- RTEMS.IO_INITIALIZE(
- RTEMS.DEVICE_MAJOR_NUMBER'LAST,
- 0,
- RTEMS.NULL_ADDRESS,
- RESULT,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_NUMBER,
- "IO_INITIALIZE WITH BAD MAJOR NUMBER"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - io_initialize - INVALID_NUMBER"
- );
-
- RTEMS.IO_OPEN(
- RTEMS.DEVICE_MAJOR_NUMBER'LAST,
- 0,
- RTEMS.NULL_ADDRESS,
- RESULT,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_NUMBER,
- "IO_OPEN WITH BAD MAJOR NUMBER"
- );
- TEXT_IO.PUT_LINE( "TA1 - io_open - INVALID_NUMBER" );
-
- RTEMS.IO_READ(
- RTEMS.DEVICE_MAJOR_NUMBER'LAST,
- 0,
- RTEMS.NULL_ADDRESS,
- RESULT,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_NUMBER,
- "IO_READ WITH BAD MAJOR NUMBER"
- );
- TEXT_IO.PUT_LINE( "TA1 - io_read - INVALID_NUMBER" );
-
- RTEMS.IO_WRITE(
- RTEMS.DEVICE_MAJOR_NUMBER'LAST,
- 0,
- RTEMS.NULL_ADDRESS,
- RESULT,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_NUMBER,
- "IO_WRITE WITH BAD MAJOR NUMBER"
- );
- TEXT_IO.PUT_LINE( "TA1 - io_write - INVALID_NUMBER" );
-
- TIME := ( 2000, 12, 31, 23, 59, 59, 0 );
- RTEMS.CLOCK_SET( TIME, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_SET SUCCESSFUL" );
- TEST_SUPPORT.PRINT_TIME(
- "TA1 - clock_set - ",
- TIME,
- " - SUCCESSFUL"
- );
- TEXT_IO.NEW_LINE;
- RTEMS.TASK_WAKE_AFTER( TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
- RTEMS.CLOCK_GET( RTEMS.CLOCK_GET_TOD, TIME'ADDRESS, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_GET SUCCESSFUL" );
- TEST_SUPPORT.PRINT_TIME(
- "TA1 - clock_get - ",
- TIME,
- " - SUCCESSFUL"
- );
- TEXT_IO.NEW_LINE;
-
- TIME := ( 1999, 12, 31, 23, 59, 59, 0 );
- RTEMS.CLOCK_SET( TIME, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_SET SUCCESSFUL" );
- TEST_SUPPORT.PRINT_TIME(
- "TA1 - clock_set - ",
- TIME,
- " - SUCCESSFUL"
- );
- TEXT_IO.NEW_LINE;
- RTEMS.TASK_WAKE_AFTER( TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
- RTEMS.CLOCK_GET( RTEMS.CLOCK_GET_TOD, TIME'ADDRESS, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_GET SUCCESSFUL" );
- TEST_SUPPORT.PRINT_TIME(
- "TA1 - clock_get - ",
- TIME,
- " - SUCCESSFUL"
- );
- TEXT_IO.NEW_LINE;
-
- TIME := ( 2100, 12, 31, 23, 59, 59, 0 );
- RTEMS.CLOCK_SET( TIME, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_SET SUCCESSFUL" );
- TEST_SUPPORT.PRINT_TIME(
- "TA1 - clock_set - ",
- TIME,
- " - SUCCESSFUL"
- );
- TEXT_IO.NEW_LINE;
- RTEMS.TASK_WAKE_AFTER( TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
- RTEMS.CLOCK_GET( RTEMS.CLOCK_GET_TOD, TIME'ADDRESS, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_GET SUCCESSFUL" );
- TEST_SUPPORT.PRINT_TIME(
- "TA1 - clock_get - ",
- TIME,
- " - SUCCESSFUL"
- );
- TEXT_IO.NEW_LINE;
-
- TIME := ( 2099, 12, 31, 23, 59, 59, 0 );
- RTEMS.CLOCK_SET( TIME, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_SET SUCCESSFUL" );
- TEST_SUPPORT.PRINT_TIME(
- "TA1 - clock_set - ",
- TIME,
- " - SUCCESSFUL"
- );
- TEXT_IO.NEW_LINE;
- RTEMS.TASK_WAKE_AFTER( TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
- RTEMS.CLOCK_GET( RTEMS.CLOCK_GET_TOD, TIME'ADDRESS, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_GET SUCCESSFUL" );
- TEST_SUPPORT.PRINT_TIME(
- "TA1 - clock_get - ",
- TIME,
- " - SUCCESSFUL"
- );
- TEXT_IO.NEW_LINE;
-
- TIME := ( 1991, 12, 31, 23, 59, 59, 0 );
- RTEMS.CLOCK_SET( TIME, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_SET SUCCESSFUL" );
- TEST_SUPPORT.PRINT_TIME(
- "TA1 - clock_set - ",
- TIME,
- " - SUCCESSFUL"
- );
- TEXT_IO.NEW_LINE;
- RTEMS.TASK_WAKE_AFTER( TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
- RTEMS.CLOCK_GET( RTEMS.CLOCK_GET_TOD, TIME'ADDRESS, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_GET SUCCESSFUL" );
- TEST_SUPPORT.PRINT_TIME(
- "TA1 - clock_get - ",
- TIME,
- " - SUCCESSFUL"
- );
- TEXT_IO.NEW_LINE;
-
- end SCREEN_13;
-
---PAGE
---
--- SCREEN_14
---
-
- procedure SCREEN_14
- is
- TIME : RTEMS.TIME_OF_DAY;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.TIMER_CREATE( 0, SPTEST.JUNK_ID, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_NAME,
- "TIMER_CREATE WITH ILLEGAL NAME"
- );
- TEXT_IO.PUT_LINE( "TA1 - timer_create - INVALID_NAME" );
-
- RTEMS.TIMER_CREATE(
- SPTEST.TIMER_NAME( 1 ),
- SPTEST.TIMER_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_CREATE" );
- TEXT_IO.PUT_LINE( "TA1 - timer_create - 1 - SUCCESSFUL" );
-
- RTEMS.TIMER_CREATE(
- SPTEST.TIMER_NAME( 1 ),
- SPTEST.JUNK_ID,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.TOO_MANY,
- "TIMER_CREATE FOR TOO MANY"
- );
- TEXT_IO.PUT_LINE( "TA1 - timer_create - 2 - TOO_MANY" );
-
- RTEMS.TIMER_DELETE( 100, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ID,
- "TIMER_DELETE WITH ILLEGAL ID"
- );
- TEXT_IO.PUT_LINE( "TA1 - timer_delete - local INVALID_ID" );
-
- RTEMS.TIMER_DELETE( 16#10100#, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ID,
- "TIMER_DELETE WITH ILLEGAL ID"
- );
- TEXT_IO.PUT_LINE( "TA1 - timer_delete - global INVALID_ID" );
-
- RTEMS.TIMER_IDENT( 0, SPTEST.JUNK_ID, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_NAME,
- "TIMER_IDENT WITH ILLEGAL NAME"
- );
- TEXT_IO.PUT_LINE( "TA1 - timer_ident - INVALID_NAME" );
-
- RTEMS.TIMER_CANCEL( 16#10100#, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ID,
- "TIMER_CANCEL WITH ILLEGAL ID"
- );
- TEXT_IO.PUT_LINE( "TA1 - timer_cancel - INVALID_ID" );
-
- RTEMS.TIMER_RESET( 16#10100#, STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ID,
- "TIMER_RESET WITH ILLEGAL ID"
- );
- TEXT_IO.PUT_LINE( "TA1 - timer_reset - INVALID_ID" );
-
- RTEMS.TIMER_RESET( SPTEST.TIMER_ID( 1 ), STATUS );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.NOT_DEFINED,
- "TIMER_RESET BEFORE INITIATED"
- );
- TEXT_IO.PUT_LINE( "TA1 - timer_reset - NOT_DEFINED" );
-
- RTEMS.TIMER_FIRE_AFTER(
- 16#10100#,
- 5 * TEST_SUPPORT.TICKS_PER_SECOND,
- SPTEST.DELAYED_SUBPROGRAM'ACCESS,
- RTEMS.NULL_ADDRESS,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ID,
- "TIMER_FIRE_AFTER WITH ILLEGAL ID"
- );
- TEXT_IO.PUT_LINE( "TA1 - timer_fire_after - INVALID_ID" );
-
- TIME := ( 1994, 12, 31, 1, 0, 0, 0 );
- RTEMS.TIMER_FIRE_WHEN(
- 16#10100#,
- TIME,
- SPTEST.DELAYED_SUBPROGRAM'ACCESS,
- RTEMS.NULL_ADDRESS,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_ID,
- "TIMER_FIRE_WHEN WITH ILLEGAL ID"
- );
- TEXT_IO.PUT_LINE( "TA1 - timer_fire_when - INVALID_ID" );
-
- RTEMS.TIMER_FIRE_AFTER(
- SPTEST.TIMER_ID( 1 ),
- 0,
- SPTEST.DELAYED_SUBPROGRAM'ACCESS,
- RTEMS.NULL_ADDRESS,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_NUMBER,
- "TIMER_FIRE_AFTER WITH 0 TICKS"
- );
- TEXT_IO.PUT_LINE( "TA1 - timer_fire_after - INVALID_NUMBER" );
-
- TIME := ( 1987, 2, 5, 8, 30, 45, 0 );
- RTEMS.TIMER_FIRE_WHEN(
- SPTEST.TIMER_ID( 1 ),
- TIME,
- SPTEST.DELAYED_SUBPROGRAM'ACCESS,
- RTEMS.NULL_ADDRESS,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_CLOCK,
- "TIMER_FIRE_WHEN WITH ILLEGAL TIME"
- );
- TEST_SUPPORT.PRINT_TIME(
- "TA1 - timer_fire_when - ",
- TIME,
- " - INVALID_CLOCK"
- );
- TEXT_IO.NEW_LINE;
-
- RTEMS.CLOCK_GET( RTEMS.CLOCK_GET_TOD, TIME'ADDRESS, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_GET SUCCESSFUL" );
- TEST_SUPPORT.PRINT_TIME( "TA1 - clock_get - ", TIME, "" );
- TEXT_IO.NEW_LINE;
-
- TIME := ( 1990, 2, 5, 8, 30, 45, 0 );
- RTEMS.TIMER_FIRE_WHEN(
- SPTEST.TIMER_ID( 1 ),
- TIME,
- SPTEST.DELAYED_SUBPROGRAM'ACCESS,
- RTEMS.NULL_ADDRESS,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_CLOCK,
- "TIMER_FIRE_WHEN BEFORE CURRENT TIME"
- );
- TEST_SUPPORT.PRINT_TIME(
- "TA1 - timer_fire_when - ",
- TIME,
- " - before INVALID_CLOCK"
- );
- TEXT_IO.NEW_LINE;
-
- end SCREEN_14;
-
---PAGE
---
--- TASK_1
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- SPTEST.SCREEN_1;
- TEST_SUPPORT.PAUSE_AND_SCREEN_NUMBER( 2 );
-
- SPTEST.SCREEN_2;
- TEST_SUPPORT.PAUSE_AND_SCREEN_NUMBER( 3 );
-
- SPTEST.SCREEN_3;
- TEST_SUPPORT.PAUSE_AND_SCREEN_NUMBER( 4 );
-
- SPTEST.SCREEN_4;
- TEST_SUPPORT.PAUSE_AND_SCREEN_NUMBER( 5 );
-
- SPTEST.SCREEN_5;
- TEST_SUPPORT.PAUSE_AND_SCREEN_NUMBER( 6 );
-
- SPTEST.SCREEN_6;
- TEST_SUPPORT.PAUSE_AND_SCREEN_NUMBER( 7 );
-
- SPTEST.SCREEN_7;
- TEST_SUPPORT.PAUSE_AND_SCREEN_NUMBER( 8 );
-
- SPTEST.SCREEN_8;
- TEST_SUPPORT.PAUSE_AND_SCREEN_NUMBER( 9 );
-
- SPTEST.SCREEN_9;
- TEST_SUPPORT.PAUSE_AND_SCREEN_NUMBER( 10 );
-
- SPTEST.SCREEN_10;
- TEST_SUPPORT.PAUSE_AND_SCREEN_NUMBER( 11 );
-
- SPTEST.SCREEN_11;
- TEST_SUPPORT.PAUSE_AND_SCREEN_NUMBER( 12 );
-
- SPTEST.SCREEN_12;
- TEST_SUPPORT.PAUSE_AND_SCREEN_NUMBER( 13 );
-
- SPTEST.SCREEN_13;
- TEST_SUPPORT.PAUSE_AND_SCREEN_NUMBER( 14 );
-
- SPTEST.SCREEN_14;
-
- TEXT_IO.PUT_LINE( "*** END OF TEST 9 ***" );
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end TASK_1;
-
---PAGE
---
--- TASK_2
---
-
- procedure TASK_2 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.PUT_LINE( "TA2 - semaphore_obtain - sem 1 - WAIT FOREVER" );
- RTEMS.SEMAPHORE_OBTAIN(
- SPTEST.SEMAPHORE_ID( 1 ),
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.OBJECT_WAS_DELETED,
- "SEMAPHORE_OBTAIN WAITING TO BE DELETED"
- );
- TEXT_IO.PUT_LINE(
- "TA2 - semaphore_obtain - woke up with OBJECT_WAS_DELETED"
- );
-
- TEXT_IO.PUT_LINE(
- "TA2 - task_delete - delete self - SUCCESSFUL"
- );
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF TA2" );
-
- end TASK_2;
-
---PAGE
---
--- TASK_3
---
-
- procedure TASK_3 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- BUFFER : SPTEST.BUFFER;
- BUFFER_POINTER : RTEMS.ADDRESS;
- MESSAGE_SIZE : RTEMS.UNSIGNED32;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- BUFFER_POINTER := BUFFER'ADDRESS;
-
- TEXT_IO.PUT_LINE(
- "TA3 - message_queue_receive - Q 1 - WAIT FOREVER"
- );
- RTEMS.MESSAGE_QUEUE_RECEIVE(
- SPTEST.QUEUE_ID( 1 ),
- BUFFER_POINTER,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- MESSAGE_SIZE,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.OBJECT_WAS_DELETED,
- "MESSAGE_QUEUE_RECEIVE WAITING TO BE DELETED"
- );
- TEXT_IO.PUT( "TA3 - message_queue_receive - woke up " );
- TEXT_IO.PUT_LINE( "with OBJECT_WAS_DELETED" );
-
- TEXT_IO.PUT_LINE(
- "TA3 - task_delete - delete self - SUCCESSFUL"
- );
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF TA3" );
-
- end TASK_3;
-
---PAGE
---
--- TASK_4
---
-
- procedure TASK_4 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.RATE_MONOTONIC_CANCEL(
- SPTEST.PERIOD_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.NOT_OWNER_OF_RESOURCE,
- "RATE_MONOTONIC_CANCEL NOT THE OWNER"
- );
- TEXT_IO.PUT_LINE(
- "TA4 - rate_monotonic_cancel - NOT_OWNER_OF_RESOURCE"
- );
-
- RTEMS.RATE_MONOTONIC_PERIOD(
- SPTEST.PERIOD_ID( 1 ),
- 5,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.NOT_OWNER_OF_RESOURCE,
- "RATE_MONOTONIC_PERIOD NOT THE OWNER"
- );
- TEXT_IO.PUT_LINE(
- "TA4 - rate_monotonic_period - NOT_OWNER_OF_RESOURCE"
- );
-
- TEXT_IO.PUT_LINE(
- "TA4 - task_delete - delete self - SUCCESSFUL"
- );
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF TA4" );
-
-
- end TASK_4;
-
-end SPTEST;
diff --git a/c/src/ada-tests/sptests/sp09/sptest.ads b/c/src/ada-tests/sptests/sp09/sptest.ads
deleted file mode 100644
index 526b30be67..0000000000
--- a/c/src/ada-tests/sptests/sp09/sptest.ads
+++ /dev/null
@@ -1,402 +0,0 @@
---
--- SPTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 9 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with SYSTEM;
-with System.Storage_Elements;
-
-package SPTEST is
-
---
--- Buffer Record similar to that used by RTEMS 3.2.1. Using this
--- avoids changes to the test.
---
-
- type BUFFER is
- record
- FIELD1 : RTEMS.UNSIGNED32; -- TEMPORARY UNTIL VARIABLE LENGTH
- FIELD2 : RTEMS.UNSIGNED32;
- FIELD3 : RTEMS.UNSIGNED32;
- FIELD4 : RTEMS.UNSIGNED32;
- end record;
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 11 ) of RTEMS.ID;
- TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 11 ) of RTEMS.NAME;
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS timers created
--- by this test.
---
-
- TIMER_ID : array ( RTEMS.UNSIGNED32 range 1 .. 1 ) of RTEMS.ID;
- TIMER_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 1 ) of RTEMS.NAME;
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS semaphores created
--- by this test.
---
-
- SEMAPHORE_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
- SEMAPHORE_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS message queues
--- created by this test.
---
-
- QUEUE_ID : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.ID;
- QUEUE_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.NAME;
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS partitions created
--- by this test.
---
-
- PARTITION_ID : array ( RTEMS.UNSIGNED32 range 1 .. 1 ) of RTEMS.ID;
- PARTITION_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 1 ) of RTEMS.NAME;
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS regions created
--- by this test.
---
-
- REGION_ID : array ( RTEMS.UNSIGNED32 range 1 .. 1 ) of RTEMS.ID;
- REGION_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 1 ) of RTEMS.NAME;
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS ports created
--- by this test.
---
-
- PORT_ID : array ( RTEMS.UNSIGNED32 range 1 .. 1 ) of RTEMS.ID;
- PORT_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 1 ) of RTEMS.NAME;
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS periods created
--- by this test.
---
-
- PERIOD_ID : array ( RTEMS.UNSIGNED32 range 1 .. 1 ) of RTEMS.ID;
- PERIOD_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 1 ) of RTEMS.NAME;
-
---
--- This variable is used as the output ID on directives which return
--- an ID but are invoked in a manner which returns a non-SUCCESSFUL
--- status code.
---
-
- JUNK_ID : RTEMS.ID;
-
---
--- The following area defines a memory area to be used as the
--- internal address space of the port.
---
-
- INTERNAL_PORT_AREA_ADDRESS : constant System.Address :=
- System.Storage_Elements.To_Address(16#00001000#);
-
- INTERNAL_PORT_AREA : array ( RTEMS.UNSIGNED32 range 0 .. 255 )
- of RTEMS.UNSIGNED8;
- for INTERNAL_PORT_AREA use at INTERNAL_PORT_AREA_ADDRESS;
-
---
--- The following area defines a memory area to be used as the
--- external address space of the port.
---
-
- EXTERNAL_PORT_AREA_ADDRESS : constant System.Address :=
- System.Storage_Elements.To_Address(16#00002000#);
-
- EXTERNAL_PORT_AREA : array ( RTEMS.UNSIGNED32 range 0 .. 255 )
- of RTEMS.UNSIGNED8;
- for EXTERNAL_PORT_AREA use at EXTERNAL_PORT_AREA_ADDRESS;
-
---
--- The following area defines a memory area to be used as the
--- memory space for a partition.
---
-
- PARTITION_GOOD_AREA : array ( RTEMS.UNSIGNED32 range 0 .. 255 )
- of RTEMS.UNSIGNED8;
- for PARTITION_GOOD_AREA'ALIGNMENT use RTEMS.STRUCTURE_ALIGNMENT;
-
---
--- The following area defines a memory area to be used as the
--- memory space for a partition which starts at an invalid address.
---
-
- PARTITION_BAD_AREA_ADDRESS : constant System.Address :=
- System.Storage_Elements.To_Address(16#00000006#);
-
- PARTITION_BAD_AREA : array ( RTEMS.UNSIGNED32 range 0 .. 255 )
- of RTEMS.UNSIGNED8;
- for PARTITION_BAD_AREA use at PARTITION_BAD_AREA_ADDRESS;
-
---
--- The following area defines a memory area to be used as the
--- memory space for a region and constants used to define the regions
--- starting area and length.
---
-
- REGION_GOOD_AREA : array ( RTEMS.UNSIGNED32 range 0 .. 4095 )
- of RTEMS.UNSIGNED32;
- for REGION_GOOD_AREA'ALIGNMENT use RTEMS.STRUCTURE_ALIGNMENT;
-
- REGION_START_OFFSET : constant RTEMS.UNSIGNED32 := 1024;
- REGION_LENGTH : constant RTEMS.UNSIGNED32 := 512;
-
---
--- The following area defines a memory area to be used as the
--- memory space for a region which starts at an invalid address.
---
-
- REGION_BAD_AREA_ADDRESS : constant System.Address :=
- System.Storage_Elements.To_Address(16#00000006#);
-
- REGION_BAD_AREA : array ( RTEMS.UNSIGNED32 range 0 .. 255 )
- of RTEMS.UNSIGNED8;
- for REGION_BAD_AREA use at REGION_BAD_AREA_ADDRESS;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- DELAYED_SUBPROGRAM
---
--- DESCRIPTION:
---
--- This subprogram is scheduled as a timer service routine.
--- It performs no actions if it fires.
---
-
- procedure DELAYED_SUBPROGRAM (
- IGNORED_ID : in RTEMS.ID;
- IGNORED_ADDRESS : in RTEMS.ADDRESS
- );
-
---
--- TASK_1
---
--- DESCRIPTION:
---
--- This RTEMS task tests numerous error conditions.
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_2
---
--- DESCRIPTION:
---
--- This RTEMS task tests numerous error conditions.
---
-
- procedure TASK_2 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_3
---
--- DESCRIPTION:
---
--- This RTEMS task tests numerous error conditions.
---
-
- procedure TASK_3 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_4
---
--- DESCRIPTION:
---
--- This RTEMS task tests numerous error conditions.
---
-
- procedure TASK_4 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- SERVICE_ROUTINE
---
--- DESCRIPTION:
---
--- This subprogram serves as a dummy ISR which is installed at an
--- illegal vector number.
---
-
- procedure SERVICE_ROUTINE (
- IGNORED : in RTEMS.VECTOR_NUMBER
- );
-
---
--- SCREEN_1
---
--- DESCRIPTION:
---
--- This subprogram processes the a single output screen of this test.
---
-
- procedure SCREEN_1;
-
---
--- SCREEN_2
---
--- DESCRIPTION:
---
--- This subprogram processes the a single output screen of this test.
---
-
- procedure SCREEN_2;
-
---
--- SCREEN_3
---
--- DESCRIPTION:
---
--- This subprogram processes the a single output screen of this test.
---
-
- procedure SCREEN_3;
-
---
--- SCREEN_4
---
--- DESCRIPTION:
---
--- This subprogram processes the a single output screen of this test.
---
-
- procedure SCREEN_4;
-
---
--- SCREEN_5
---
--- DESCRIPTION:
---
--- This subprogram processes the a single output screen of this test.
---
-
- procedure SCREEN_5;
-
---
--- SCREEN_6
---
--- DESCRIPTION:
---
--- This subprogram processes the a single output screen of this test.
---
-
- procedure SCREEN_6;
-
---
--- SCREEN_7
---
--- DESCRIPTION:
---
--- This subprogram processes the a single output screen of this test.
---
-
- procedure SCREEN_7;
-
---
--- SCREEN_8
---
--- DESCRIPTION:
---
--- This subprogram processes the a single output screen of this test.
---
-
- procedure SCREEN_8;
-
---
--- SCREEN_9
---
--- DESCRIPTION:
---
--- This subprogram processes the a single output screen of this test.
---
-
- procedure SCREEN_9;
-
---
--- SCREEN_10
---
--- DESCRIPTION:
---
--- This subprogram processes the a single output screen of this test.
---
-
- procedure SCREEN_10;
-
---
--- SCREEN_11
---
--- DESCRIPTION:
---
--- This subprogram processes the a single output screen of this test.
---
-
- procedure SCREEN_11;
-
---
--- SCREEN_12
---
--- DESCRIPTION:
---
--- This subprogram processes the a single output screen of this test.
---
-
- procedure SCREEN_12;
-
---
--- SCREEN_13
---
--- DESCRIPTION:
---
--- This subprogram processes the a single output screen of this test.
---
-
- procedure SCREEN_13;
-
-end SPTEST;
diff --git a/c/src/ada-tests/sptests/sp11/config.h b/c/src/ada-tests/sptests/sp11/config.h
deleted file mode 100644
index 89529d5b9f..0000000000
--- a/c/src/ada-tests/sptests/sp11/config.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MAXIMUM_TIMERS 6
-#define CONFIGURE_TICKS_PER_TIMESLICE 100
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/sptests/sp11/sp11.adb b/c/src/ada-tests/sptests/sp11/sp11.adb
deleted file mode 100644
index 1720830ded..0000000000
--- a/c/src/ada-tests/sptests/sp11/sp11.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test SP11 of the Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with SPTEST;
-with TEST_SUPPORT;
-
-procedure SP11 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- SPTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end SP11;
-
diff --git a/c/src/ada-tests/sptests/sp11/sp11.scn b/c/src/ada-tests/sptests/sp11/sp11.scn
deleted file mode 100644
index a23db839bc..0000000000
--- a/c/src/ada-tests/sptests/sp11/sp11.scn
+++ /dev/null
@@ -1,74 +0,0 @@
-*** TEST 11 ***
-TA1 - event_send - send EVENT_16 to TA2
-TA1 - event_receive - waiting forever on EVENT_14 and EVENT_15
-TA2 - event_receive - waiting forever on EVENT_16
-TA2 - EVENT_16 received - eventout => 16#10000#
-TA2 - event_send - send EVENT_14 and EVENT_15 to TA1
-TA2 - event_receive - waiting forever on EVENT_17 or EVENT_18 - EVENT_ANY
-TA1 - EVENT_14 and EVENT_15 received - eventout => 16#C000#
-TA1 - event_send - send EVENT_18 to TA2
-TA1 - event_receive - waiting with 10 second timeout on EVENT_14
-TA2 - EVENT_17 or EVENT_18 received - eventout => 16#40000#
-TA2 - event_send - send EVENT_14 to TA1
-TA2 - clock_set - 8:15: 0 2/12/1988
-TA2 - event_send - sending EVENT_10 to self after 5 seconds
-TA2 - event_receive - waiting forever on EVENT_10
-TA1 - EVENT_14 received - eventout => 16#4000#
-TA1 - event_send - send EVENT_19 to TA2
-TA1 - clock_get - 8:15: 0 2/12/1988
-<pause>
-TA1 - event_send - send EVENT_18 to self after 5 seconds
-TA1 - event_receive - waiting forever on EVENT_18
-TA2 - EVENT_10 received - eventout => 16#400#
-TA2 - clock_get - 8:15: 5 02/12/1988
-TA2 - event_receive - PENDING_EVENTS
-TA2 - eventout => 16#80000#
-TA2 - event_receive - EVENT_19 - NO_WAIT
-TA2 - EVENT_19 received - eventout => 16#80000#
-TA2 - task_delete - deletes self
-TA1 - EVENT_18 received - eventout => 16#40000#
-TA1 - clock_get - 8:15: 5 2/12/1988
-TA1 - event_send - send EVENT_3 to self
-TA1 - event_receive - EVENT_3 or EVENT_22 - NO_WAIT and EVENT_ANY
-TA1 - EVENT_3 received - eventout => 16#8#
-TA1 - event_send - send EVENT_4 to self
-TA1 - event_receive - waiting forever on EVENT_4 or EVENT_5 - EVENT_ANY
-TA1 - EVENT_4 received - eventout => 16#10#
-<pause>
-TA1 - event_send - send EVENT_18 to self after 5 seconds
-TA1 - timer_cancel - cancelling timer for event EVENT_18
-TA1 - event_send - send EVENT_8 to self after 60 seconds
-TA1 - event_send - send EVENT_9 to self after 60 seconds
-TA1 - event_send - send EVENT_10 to self after 60 seconds
-TA1 - timer_cancel - cancelling timer for event EVENT_8
-TA1 - clock_set - 8:15: 0 2/12/1988
-TA1 - event_send - send EVENT_1 every second
-TA1 - EVENT_1 received - eventout => 16#2# - at 8:15: 1 2/12/1988
-TA1 - EVENT_1 received - eventout => 16#2# - at 8:15: 2 2/12/1988
-TA1 - EVENT_1 received - eventout => 16#2# - at 8:15: 3 2/12/1988
-TA1 - timer_cancel - cancelling timer for event EVENT_1
-<pause>
-TA1 - event_send - send EVENT_11 to self in 1 day
-TA1 - event_send - send EVENT_11 to self in 1 day
-TA1 - event_send - send EVENT_11 to self in 2 days
-TA1 - timer_cancel - cancelling EVENT_11 to self in 1 day
-TA1 - timer_cancel - cancelling EVENT_11 to self in 2 days
-TA1 - event_send - resending EVENT_11 to self in 2 days
-TA1 - clock_set - 8:15: 3 2/15/1988
-TA1 - event_receive - waiting forever on EVENT_11
-TA1 - EVENT_11 received - eventout => 16#800#
-<pause>
-TA1 - event_send/event_receive combination
-TA1 - clock_set - 8:15: 0 2/12/1988
-TA1 - event_receive all outstanding events
-TA1 - event_send - send EVENT_10 to self in 1 day
-TA1 - event_send - send EVENT_11 to self in 2 days
-TA1 - clock_set - 7:15: 0 2/12/1988
-TA1 - set time backwards
-TA1 - no events received
-TA1 - clock_set - 7:15: 0 2/14/1988
-TA1 - set time forwards (leave a timer)
-TA1 - EVENT_10 received
-TA1 - event_send - send EVENT_11 to self in 100 ticks
-TA1 - event_send - send EVENT_11 to self in 200 ticks
-*** END OF TEST 11 ***
diff --git a/c/src/ada-tests/sptests/sp11/sptest.adb b/c/src/ada-tests/sptests/sp11/sptest.adb
deleted file mode 100644
index 8ec174abe2..0000000000
--- a/c/src/ada-tests/sptests/sp11/sptest.adb
+++ /dev/null
@@ -1,900 +0,0 @@
---
--- SPTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 11 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with TEST_SUPPORT;
-with TEXT_IO;
-with UNSIGNED32_IO;
-
-package body SPTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TEST 11 ***" );
-
- SPTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME( 'T', 'A', '1', ' ' );
- SPTEST.TASK_NAME( 2 ) := RTEMS.BUILD_NAME( 'T', 'A', '2', ' ' );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 1 ),
- 4,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA1" );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 2 ),
- 4,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 2 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA2" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 1 ),
- SPTEST.TASK_1'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA1" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 2 ),
- SPTEST.TASK_2'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA2" );
-
- SPTEST.TIMER_NAME( 1 ) := RTEMS.BUILD_NAME( 'T', 'M', '1', ' ' );
- SPTEST.TIMER_NAME( 2 ) := RTEMS.BUILD_NAME( 'T', 'M', '2', ' ' );
- SPTEST.TIMER_NAME( 3 ) := RTEMS.BUILD_NAME( 'T', 'M', '3', ' ' );
- SPTEST.TIMER_NAME( 4 ) := RTEMS.BUILD_NAME( 'T', 'M', '4', ' ' );
- SPTEST.TIMER_NAME( 5 ) := RTEMS.BUILD_NAME( 'T', 'M', '5', ' ' );
- SPTEST.TIMER_NAME( 6 ) := RTEMS.BUILD_NAME( 'T', 'M', '6', ' ' );
-
- RTEMS.TIMER_CREATE(
- SPTEST.TIMER_NAME( 1 ),
- SPTEST.TIMER_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_CREATE OF TM1" );
-
- RTEMS.TIMER_CREATE(
- SPTEST.TIMER_NAME( 2 ),
- SPTEST.TIMER_ID( 2 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_CREATE OF TM2" );
-
- RTEMS.TIMER_CREATE(
- SPTEST.TIMER_NAME( 3 ),
- SPTEST.TIMER_ID( 3 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_CREATE OF TM3" );
-
- RTEMS.TIMER_CREATE(
- SPTEST.TIMER_NAME( 4 ),
- SPTEST.TIMER_ID( 4 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_CREATE OF TM4" );
-
- RTEMS.TIMER_CREATE(
- SPTEST.TIMER_NAME( 5 ),
- SPTEST.TIMER_ID( 5 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_CREATE OF TM5" );
-
- RTEMS.TIMER_CREATE(
- SPTEST.TIMER_NAME( 6 ),
- SPTEST.TIMER_ID( 6 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_CREATE OF TM6" );
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- TASK_1
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- EVENTOUT : RTEMS.EVENT_SET;
- TIME : RTEMS.TIME_OF_DAY;
- STATUS : RTEMS.STATUS_CODES;
- INDEX : RTEMS.UNSIGNED32;
- begin
-
- TEXT_IO.PUT_LINE( "TA1 - event_send - send EVENT_16 to TA2" );
- RTEMS.EVENT_SEND( SPTEST.TASK_ID( 2 ), RTEMS.EVENT_16, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "EVENT_SEND of 16" );
-
- TEXT_IO.PUT_LINE(
- "TA1 - event_receive - waiting forever on EVENT_14 and EVENT_15"
- );
- RTEMS.EVENT_RECEIVE(
- RTEMS.EVENT_14 + RTEMS.EVENT_15,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- EVENTOUT,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "EVENT_RECEIVE of 14 and 15" );
- TEXT_IO.PUT( "TA1 - EVENT_14 and EVENT_15 received - eventout => ");
- UNSIGNED32_IO.PUT( EVENTOUT, BASE => 16, WIDTH => 8 );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT_LINE( "TA1 - event_send - send EVENT_18 to TA2" );
- RTEMS.EVENT_SEND( SPTEST.TASK_ID( 2 ), RTEMS.EVENT_18, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "EVENT_SEND of 18" );
-
- TEXT_IO.PUT_LINE(
- "TA1 - event_receive - waiting with 10 second timeout on EVENT_14"
- );
- RTEMS.EVENT_RECEIVE(
- RTEMS.EVENT_14,
- RTEMS.DEFAULT_OPTIONS,
- 10 * TEST_SUPPORT.TICKS_PER_SECOND,
- EVENTOUT,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "EVENT_RECEIVE of 14" );
- TEXT_IO.PUT( "TA1 - EVENT_14 received - eventout => ");
- UNSIGNED32_IO.PUT( EVENTOUT, BASE => 16, WIDTH => 8 );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT_LINE( "TA1 - event_send - send EVENT_19 to TA2" );
- RTEMS.EVENT_SEND( SPTEST.TASK_ID( 2 ), RTEMS.EVENT_19, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "EVENT_SEND of 19" );
-
- RTEMS.CLOCK_GET( RTEMS.CLOCK_GET_TOD, TIME'ADDRESS, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TA1 CLOCK_GET" );
- TEST_SUPPORT.PRINT_TIME( "TA1 - clock_get - ", TIME, "" );
- TEXT_IO.NEW_LINE;
-
- TEST_SUPPORT.PAUSE;
-
- TEXT_IO.PUT_LINE(
- "TA1 - event_send - send EVENT_18 to self after 5 seconds"
- );
- RTEMS.TIMER_FIRE_AFTER(
- SPTEST.TIMER_ID( 1 ),
- 5 * TEST_SUPPORT.TICKS_PER_SECOND,
- SPTEST.TA1_SEND_18_TO_SELF_5_SECONDS'ACCESS,
- RTEMS.NULL_ADDRESS,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_FIRE_AFTER 5 seconds" );
-
- TEXT_IO.PUT_LINE(
- "TA1 - event_receive - waiting forever on EVENT_18"
- );
- RTEMS.EVENT_RECEIVE(
- RTEMS.EVENT_18,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- EVENTOUT,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "EVENT_RECEIVE of 18" );
-
- RTEMS.CLOCK_GET( RTEMS.CLOCK_GET_TOD, TIME'ADDRESS, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TA1 CLOCK_GET" );
-
- TEXT_IO.PUT( "TA1 - EVENT_18 received - eventout => ");
- UNSIGNED32_IO.PUT( EVENTOUT, BASE => 16, WIDTH => 8 );
- TEXT_IO.NEW_LINE;
-
- TEST_SUPPORT.PRINT_TIME( "TA1 - clock_get - ", TIME, "" );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT_LINE( "TA1 - event_send - send EVENT_3 to self" );
- RTEMS.EVENT_SEND( RTEMS.SELF, RTEMS.EVENT_3, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "EVENT_SEND of 3" );
-
- TEXT_IO.PUT_LINE(
- "TA1 - event_receive - EVENT_3 or EVENT_22 - NO_WAIT and EVENT_ANY"
- );
- RTEMS.EVENT_RECEIVE(
- RTEMS.EVENT_3 + RTEMS.EVENT_22,
- RTEMS.NO_WAIT + RTEMS.EVENT_ANY,
- RTEMS.NO_TIMEOUT,
- EVENTOUT,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "EVENT_RECEIVE of 3 and 22" );
- TEXT_IO.PUT( "TA1 - EVENT_3 received - eventout => ");
- UNSIGNED32_IO.PUT( EVENTOUT, BASE => 16, WIDTH => 8 );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT_LINE( "TA1 - event_send - send EVENT_4 to self" );
- RTEMS.EVENT_SEND( RTEMS.SELF, RTEMS.EVENT_4, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "EVENT_SEND of 4" );
-
- TEXT_IO.PUT_LINE(
-"TA1 - event_receive - waiting forever on EVENT_4 or EVENT_5 - EVENT_ANY"
- );
- RTEMS.EVENT_RECEIVE(
- RTEMS.EVENT_4 + RTEMS.EVENT_5,
- RTEMS.EVENT_ANY,
- RTEMS.NO_TIMEOUT,
- EVENTOUT,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "EVENT_RECEIVE of 4 and 5" );
- TEXT_IO.PUT( "TA1 - EVENT_4 received - eventout => ");
- UNSIGNED32_IO.PUT( EVENTOUT, BASE => 16, WIDTH => 8 );
- TEXT_IO.NEW_LINE;
-
- TEST_SUPPORT.PAUSE;
-
- TEXT_IO.PUT_LINE(
- "TA1 - event_send - send EVENT_18 to self after 5 seconds"
- );
- RTEMS.TIMER_FIRE_AFTER(
- SPTEST.TIMER_ID( 1 ),
- 5 * TEST_SUPPORT.TICKS_PER_SECOND,
- SPTEST.TA1_SEND_18_TO_SELF_5_SECONDS'ACCESS,
- RTEMS.NULL_ADDRESS,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_FIRE_AFTER 5 seconds" );
-
- TEXT_IO.PUT_LINE(
- "TA1 - timer_cancel - cancelling timer for event EVENT_18"
- );
- RTEMS.TIMER_CANCEL( SPTEST.TIMER_ID( 1 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_CANCEL" );
-
- TEXT_IO.PUT_LINE(
- "TA1 - event_send - send EVENT_8 to self after 60 seconds"
- );
- RTEMS.TIMER_FIRE_AFTER(
- SPTEST.TIMER_ID( 1 ),
- 60 * TEST_SUPPORT.TICKS_PER_SECOND,
- SPTEST.TA1_SEND_8_TO_SELF_60_SECONDS'ACCESS,
- RTEMS.NULL_ADDRESS,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_FIRE_AFTER 60 secs" );
-
- TEXT_IO.PUT_LINE(
- "TA1 - event_send - send EVENT_9 to self after 60 seconds"
- );
- RTEMS.TIMER_FIRE_AFTER(
- SPTEST.TIMER_ID( 2 ),
- 60 * TEST_SUPPORT.TICKS_PER_SECOND,
- SPTEST.TA1_SEND_9_TO_SELF_60_SECONDS'ACCESS,
- RTEMS.NULL_ADDRESS,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_FIRE_AFTER 60 secs" );
-
- TEXT_IO.PUT_LINE(
- "TA1 - event_send - send EVENT_10 to self after 60 seconds"
- );
- RTEMS.TIMER_FIRE_AFTER(
- SPTEST.TIMER_ID( 3 ),
- 60 * TEST_SUPPORT.TICKS_PER_SECOND,
- SPTEST.TA1_SEND_10_TO_SELF'ACCESS,
- RTEMS.NULL_ADDRESS,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_FIRE_AFTER 60 secs" );
-
- TEXT_IO.PUT_LINE(
- "TA1 - timer_cancel - cancelling timer for event EVENT_8"
- );
- RTEMS.TIMER_CANCEL( SPTEST.TIMER_ID( 1 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_CANCEL" );
-
- TIME := ( 1988, 2, 12, 8, 15, 0, 0 );
-
- TEST_SUPPORT.PRINT_TIME( "TA1 - clock_set - ", TIME, "" );
- TEXT_IO.NEW_LINE;
- RTEMS.CLOCK_SET( TIME, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TA1 CLOCK_SET" );
-
- TEXT_IO.PUT_LINE(
- "TA1 - event_send - send EVENT_1 every second"
- );
- RTEMS.TIMER_FIRE_AFTER(
- SPTEST.TIMER_ID( 1 ),
- TEST_SUPPORT.TICKS_PER_SECOND,
- SPTEST.TA1_SEND_1_TO_SELF_EVERY_SECOND'ACCESS,
- RTEMS.NULL_ADDRESS,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_FIRE_AFTER 1 SECOND" );
-
- INDEX := 0;
-
- loop
-
- exit when INDEX = 3;
-
- RTEMS.EVENT_RECEIVE(
- RTEMS.EVENT_1,
- RTEMS.EVENT_ANY,
- RTEMS.NO_TIMEOUT,
- EVENTOUT,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "EVENT_RECEIVE of 1" );
-
- RTEMS.CLOCK_GET( RTEMS.CLOCK_GET_TOD, TIME'ADDRESS, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TA1 CLOCK_GET" );
-
- TEXT_IO.PUT( "TA1 - EVENT_1 received - eventout => ");
- UNSIGNED32_IO.PUT( EVENTOUT, BASE => 16, WIDTH => 8 );
- TEST_SUPPORT.PRINT_TIME( " - at ", TIME, "" );
- TEXT_IO.NEW_LINE;
-
- if INDEX < 2 then
- RTEMS.TIMER_RESET( SPTEST.TIMER_ID( 1 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TA1 TIMER RESET" );
- end if;
-
- INDEX := INDEX + 1;
- end loop;
-
- TEXT_IO.PUT_LINE(
- "TA1 - timer_cancel - cancelling timer for event EVENT_1"
- );
- RTEMS.TIMER_CANCEL( SPTEST.TIMER_ID( 1 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_CANCEL" );
-
- TEST_SUPPORT.PAUSE;
-
- TIME.DAY := 13;
- TEXT_IO.PUT_LINE(
- "TA1 - event_send - send EVENT_11 to self in 1 day"
- );
- RTEMS.TIMER_FIRE_WHEN(
- SPTEST.TIMER_ID( 1 ),
- TIME,
- SPTEST.TA1_SEND_11_TO_SELF'ACCESS,
- RTEMS.NULL_ADDRESS,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_FIRE_WHEN 1 day" );
-
- TIME.HOUR := 7;
- TEXT_IO.PUT_LINE(
- "TA1 - event_send - send EVENT_11 to self in 1 day"
- );
- RTEMS.TIMER_FIRE_WHEN(
- SPTEST.TIMER_ID( 2 ),
- TIME,
- SPTEST.TA1_SEND_11_TO_SELF'ACCESS,
- RTEMS.NULL_ADDRESS,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_FIRE_WHEN 1 day" );
- TIME.HOUR := 8;
-
- TIME.DAY := 14;
- TEXT_IO.PUT_LINE(
- "TA1 - event_send - send EVENT_11 to self in 2 days"
- );
- RTEMS.TIMER_FIRE_WHEN(
- SPTEST.TIMER_ID( 3 ),
- TIME,
- SPTEST.TA1_SEND_11_TO_SELF'ACCESS,
- RTEMS.NULL_ADDRESS,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_FIRE_WHEN 2 days" );
-
- TEXT_IO.PUT_LINE(
- "TA1 - timer_cancel - cancelling EVENT_11 to self in 1 day"
- );
- RTEMS.TIMER_CANCEL( SPTEST.TIMER_ID( 1 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_CANCEL" );
-
- TEXT_IO.PUT_LINE(
- "TA1 - timer_cancel - cancelling EVENT_11 to self in 2 days"
- );
- RTEMS.TIMER_CANCEL( SPTEST.TIMER_ID( 3 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_CANCEL" );
-
- TEXT_IO.PUT_LINE(
- "TA1 - event_send - resending EVENT_11 to self in 2 days"
- );
- RTEMS.TIMER_FIRE_WHEN(
- SPTEST.TIMER_ID( 3 ),
- TIME,
- SPTEST.TA1_SEND_11_TO_SELF'ACCESS,
- RTEMS.NULL_ADDRESS,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_FIRE_WHEN 2 days" );
-
- TIME.DAY := 15;
- TEST_SUPPORT.PRINT_TIME( "TA1 - clock_set - ", TIME, "" );
- TEXT_IO.NEW_LINE;
- RTEMS.CLOCK_SET( TIME, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TA1 CLOCK_SET" );
- TEXT_IO.PUT_LINE(
- "TA1 - event_receive - waiting forever on EVENT_11"
- );
- RTEMS.EVENT_RECEIVE(
- RTEMS.EVENT_11,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- EVENTOUT,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "EVENT_RECEIVE of 11" );
- TEXT_IO.PUT( "TA1 - EVENT_11 received - eventout => ");
- UNSIGNED32_IO.PUT( EVENTOUT, BASE => 16, WIDTH => 8 );
- TEXT_IO.NEW_LINE;
-
- TEST_SUPPORT.PAUSE;
-
--- The following code tests the case of deleting a timer ???
-
- TEXT_IO.PUT_LINE( "TA1 - event_send/event_receive combination" );
- RTEMS.TIMER_FIRE_AFTER(
- SPTEST.TIMER_ID( 1 ),
- 10,
- SPTEST.TA1_SEND_11_TO_SELF'ACCESS,
- RTEMS.NULL_ADDRESS,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_FIRE_AFTER 10 ticks" );
- RTEMS.EVENT_RECEIVE(
- RTEMS.EVENT_11,
- RTEMS.DEFAULT_OPTIONS,
- 11,
- EVENTOUT,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "EVENT_RECEIVE" );
-
- TIME := ( 1988, 2, 12, 8, 15, 0, 0 );
-
- TEST_SUPPORT.PRINT_TIME( "TA1 - clock_set - ", TIME, "" );
- TEXT_IO.NEW_LINE;
- RTEMS.CLOCK_SET( TIME, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TA1 CLOCK_SET" );
-
- TIME.DAY := 13;
- TEXT_IO.PUT_LINE(
- "TA1 - event_receive all outstanding events"
- );
- RTEMS.EVENT_RECEIVE(
- RTEMS.ALL_EVENTS,
- RTEMS.NO_WAIT + RTEMS.EVENT_ANY,
- RTEMS.NO_TIMEOUT,
- EVENTOUT,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.UNSATISFIED,
- "EVENT_RECEIVE all events"
- );
-
- TEXT_IO.PUT_LINE(
- "TA1 - event_send - send EVENT_10 to self in 1 day"
- );
- RTEMS.TIMER_FIRE_WHEN(
- SPTEST.TIMER_ID( 1 ),
- TIME,
- SPTEST.TA1_SEND_10_TO_SELF'ACCESS,
- RTEMS.NULL_ADDRESS,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_FIRE_WHEN 1 day" );
-
- TIME.DAY := 14;
- TEXT_IO.PUT_LINE(
- "TA1 - event_send - send EVENT_11 to self in 2 days"
- );
- RTEMS.TIMER_FIRE_WHEN(
- SPTEST.TIMER_ID( 2 ),
- TIME,
- SPTEST.TA1_SEND_11_TO_SELF'ACCESS,
- RTEMS.NULL_ADDRESS,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_FIRE_WHEN 2 days" );
-
- TIME := ( 1988, 2, 12, 7, 15, 0, 0 );
-
- TEST_SUPPORT.PRINT_TIME( "TA1 - clock_set - ", TIME, "" );
- TEXT_IO.NEW_LINE;
- TEXT_IO.PUT_LINE( "TA1 - set time backwards" );
- RTEMS.CLOCK_SET( TIME, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TA1 CLOCK_SET" );
-
- RTEMS.EVENT_RECEIVE(
- RTEMS.ALL_EVENTS,
- RTEMS.NO_WAIT + RTEMS.EVENT_ANY,
- RTEMS.NO_TIMEOUT,
- EVENTOUT,
- STATUS
- );
- if EVENTOUT >= RTEMS.EVENT_0 then
- TEXT_IO.PUT( "ERROR - " );
- UNSIGNED32_IO.PUT( EVENTOUT, BASE => 16, WIDTH => 8 );
- TEXT_IO.PUT_LINE( " events received" );
- else
- TEXT_IO.PUT_LINE( "TA1 - no events received" );
- end if;
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.UNSATISFIED,
- "EVENT_RECEIVE all events"
- );
-
- TIME := ( 1988, 2, 14, 7, 15, 0, 0 );
-
- TEST_SUPPORT.PRINT_TIME( "TA1 - clock_set - ", TIME, "" );
- TEXT_IO.NEW_LINE;
- TEXT_IO.PUT_LINE( "TA1 - set time forwards (leave a timer)" );
- RTEMS.CLOCK_SET( TIME, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TA1 CLOCK_SET" );
-
- RTEMS.EVENT_RECEIVE(
- RTEMS.ALL_EVENTS,
- RTEMS.NO_WAIT + RTEMS.EVENT_ANY,
- RTEMS.NO_TIMEOUT,
- EVENTOUT,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "EVENT_RECEIVE all events" );
- if EVENTOUT = RTEMS.EVENT_10 then
- TEXT_IO.PUT_LINE( "TA1 - EVENT_10 received" );
- else
- TEXT_IO.PUT( "ERROR - " );
- UNSIGNED32_IO.PUT( EVENTOUT, BASE => 16, WIDTH => 8 );
- TEXT_IO.PUT_LINE( " events received" );
- end if;
-
- TEXT_IO.PUT_LINE(
- "TA1 - event_send - send EVENT_11 to self in 100 ticks"
- );
- RTEMS.TIMER_FIRE_AFTER(
- SPTEST.TIMER_ID( 1 ),
- 100,
- SPTEST.TA1_SEND_11_TO_SELF'ACCESS,
- RTEMS.NULL_ADDRESS,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_FIRE_AFTER 100 ticks" );
-
- TEXT_IO.PUT_LINE(
- "TA1 - event_send - send EVENT_11 to self in 200 ticks"
- );
- RTEMS.TIMER_FIRE_AFTER(
- SPTEST.TIMER_ID( 2 ),
- 100,
- SPTEST.TA1_SEND_11_TO_SELF'ACCESS,
- RTEMS.NULL_ADDRESS,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_FIRE_AFTER 200 ticks" );
-
- TEXT_IO.PUT_LINE( "*** END OF TEST 11 ***" );
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end TASK_1;
-
---PAGE
---
--- TASK_2
---
-
- procedure TASK_2 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- EVENTOUT : RTEMS.EVENT_SET;
- TIME : RTEMS.TIME_OF_DAY;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.TASK_WAKE_AFTER( 1 * TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- TEXT_IO.PUT_LINE(
- "TA2 - event_receive - waiting forever on EVENT_16"
- );
- RTEMS.EVENT_RECEIVE(
- RTEMS.EVENT_16,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- EVENTOUT,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "EVENT_RECEIVE of 16" );
- TEXT_IO.PUT( "TA2 - EVENT_16 received - eventout => ");
- UNSIGNED32_IO.PUT( EVENTOUT, BASE => 16, WIDTH => 8 );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT_LINE(
- "TA2 - event_send - send EVENT_14 and EVENT_15 to TA1"
- );
- RTEMS.EVENT_SEND(
- SPTEST.TASK_ID( 1 ),
- RTEMS.EVENT_14 + RTEMS.EVENT_15,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "EVENT_SEND of 14 and 15" );
-
- TEXT_IO.PUT_LINE(
- "TA2 - event_receive - waiting forever on EVENT_17 or EVENT_18 - EVENT_ANY"
- );
- RTEMS.EVENT_RECEIVE(
- RTEMS.EVENT_17 + RTEMS.EVENT_18,
- RTEMS.EVENT_ANY,
- RTEMS.NO_TIMEOUT,
- EVENTOUT,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "EVENT_RECEIVE of 17 and 18" );
- TEXT_IO.PUT( "TA2 - EVENT_17 or EVENT_18 received - eventout => ");
- UNSIGNED32_IO.PUT( EVENTOUT, BASE => 16, WIDTH => 8 );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT_LINE(
- "TA2 - event_send - send EVENT_14 to TA1"
- );
- RTEMS.EVENT_SEND(
- SPTEST.TASK_ID( 1 ),
- RTEMS.EVENT_14,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "EVENT_SEND of 14" );
-
- TIME := ( 1988, 2, 12, 8, 15, 0, 0 );
-
- TEST_SUPPORT.PRINT_TIME( "TA2 - clock_set - ", TIME, "" );
- TEXT_IO.NEW_LINE;
- RTEMS.CLOCK_SET( TIME, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TA2 CLOCK_SET" );
-
- TIME.SECOND := TIME.SECOND + 5;
- TEXT_IO.PUT_LINE(
- "TA2 - event_send - sending EVENT_10 to self after 5 seconds"
- );
- RTEMS.TIMER_FIRE_WHEN(
- SPTEST.TIMER_ID( 5 ),
- TIME,
- SPTEST.TA2_SEND_10_TO_SELF'ACCESS,
- RTEMS.NULL_ADDRESS,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_FIRE_WHEN 5 SECONDS" );
-
- TEXT_IO.PUT_LINE(
- "TA2 - event_receive - waiting forever on EVENT_10"
- );
- RTEMS.EVENT_RECEIVE(
- RTEMS.EVENT_10,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- EVENTOUT,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "EVENT_RECEIVE of 10" );
-
- RTEMS.CLOCK_GET( RTEMS.CLOCK_GET_TOD, TIME'ADDRESS, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TA1 CLOCK_GET" );
-
- TEXT_IO.PUT( "TA2 - EVENT_10 received - eventout => ");
- UNSIGNED32_IO.PUT( EVENTOUT, BASE => 16, WIDTH => 8 );
- TEXT_IO.NEW_LINE;
-
- TEST_SUPPORT.PRINT_TIME( "TA1 - clock_get - ", TIME, "" );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT_LINE( "TA2 - event_receive - PENDING_EVENTS" );
- RTEMS.EVENT_RECEIVE(
- RTEMS.PENDING_EVENTS,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- EVENTOUT,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "EVENT_RECEIVE of 10" );
- TEXT_IO.PUT( "TA2 - eventout => ");
- UNSIGNED32_IO.PUT( EVENTOUT, BASE => 16, WIDTH => 8 );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT_LINE(
- "TA2 - event_receive - EVENT_19 - NO_WAIT"
- );
- RTEMS.EVENT_RECEIVE(
- RTEMS.EVENT_19,
- RTEMS.NO_WAIT,
- RTEMS.NO_TIMEOUT,
- EVENTOUT,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "EVENT_RECEIVE of 10" );
- TEXT_IO.PUT( "TA2 - EVENT_19 received - eventout => ");
- UNSIGNED32_IO.PUT( EVENTOUT, BASE => 16, WIDTH => 8 );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT_LINE( "TA2 - task_delete - deletes self" );
- RTEMS.TASK_DELETE( SPTEST.TASK_ID( 2 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE of TA2" );
-
- end TASK_2;
-
---PAGE
---
--- TA1_SEND_18_TO_SELF_5_SECONDS
---
-
- procedure TA1_SEND_18_TO_SELF_5_SECONDS (
- IGNORED_ID : in RTEMS.ID;
- IGNORED_ADDRESS : in RTEMS.ADDRESS
- )
- is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.EVENT_SEND( SPTEST.TASK_ID( 1 ), RTEMS.EVENT_18, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "EVENT_SEND of 18" );
-
- end TA1_SEND_18_TO_SELF_5_SECONDS;
-
---PAGE
---
--- TA1_SEND_8_TO_SELF_60_SECONDS
---
-
- procedure TA1_SEND_8_TO_SELF_60_SECONDS (
- IGNORED_ID : in RTEMS.ID;
- IGNORED_ADDRESS : in RTEMS.ADDRESS
- )
- is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.EVENT_SEND( SPTEST.TASK_ID( 1 ), RTEMS.EVENT_8, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "EVENT_SEND of 8" );
-
- end TA1_SEND_8_TO_SELF_60_SECONDS;
-
---PAGE
---
--- TA1_SEND_9_TO_SELF_60_SECONDS
---
-
- procedure TA1_SEND_9_TO_SELF_60_SECONDS (
- IGNORED_ID : in RTEMS.ID;
- IGNORED_ADDRESS : in RTEMS.ADDRESS
- )
- is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.EVENT_SEND( SPTEST.TASK_ID( 1 ), RTEMS.EVENT_9, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "EVENT_SEND of 9" );
-
- end TA1_SEND_9_TO_SELF_60_SECONDS;
-
---PAGE
---
--- TA1_SEND_10_TO_SELF
---
-
- procedure TA1_SEND_10_TO_SELF (
- IGNORED_ID : in RTEMS.ID;
- IGNORED_ADDRESS : in RTEMS.ADDRESS
- )
- is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.EVENT_SEND( SPTEST.TASK_ID( 1 ), RTEMS.EVENT_10, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "EVENT_SEND of 10" );
-
- end TA1_SEND_10_TO_SELF;
-
---PAGE
---
--- TA1_SEND_1_TO_SELF_EVERY_SECOND
---
-
- procedure TA1_SEND_1_TO_SELF_EVERY_SECOND (
- IGNORED_ID : in RTEMS.ID;
- IGNORED_ADDRESS : in RTEMS.ADDRESS
- )
- is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.EVENT_SEND( SPTEST.TASK_ID( 1 ), RTEMS.EVENT_1, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "EVENT_SEND of 1" );
-
- end TA1_SEND_1_TO_SELF_EVERY_SECOND;
-
---PAGE
---
--- TA1_SEND_11_TO_SELF
---
-
- procedure TA1_SEND_11_TO_SELF (
- IGNORED_ID : in RTEMS.ID;
- IGNORED_ADDRESS : in RTEMS.ADDRESS
- )
- is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.EVENT_SEND( SPTEST.TASK_ID( 1 ), RTEMS.EVENT_11, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "EVENT_SEND of 11" );
-
- end TA1_SEND_11_TO_SELF;
-
---PAGE
---
--- TA2_SEND_10_TO_SELF
---
-
- procedure TA2_SEND_10_TO_SELF (
- IGNORED_ID : in RTEMS.ID;
- IGNORED_ADDRESS : in RTEMS.ADDRESS
- )
- is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.EVENT_SEND( SPTEST.TASK_ID( 2 ), RTEMS.EVENT_10, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "EVENT_SEND of 10" );
-
- end TA2_SEND_10_TO_SELF;
-
-end SPTEST;
diff --git a/c/src/ada-tests/sptests/sp11/sptest.ads b/c/src/ada-tests/sptests/sp11/sptest.ads
deleted file mode 100644
index c5527218f0..0000000000
--- a/c/src/ada-tests/sptests/sp11/sptest.ads
+++ /dev/null
@@ -1,178 +0,0 @@
---
--- SPTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 11 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-package SPTEST is
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
- TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS timers created
--- by this test.
---
-
- TIMER_ID : array ( RTEMS.UNSIGNED32 range 1 .. 6 ) of RTEMS.ID;
- TIMER_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 6 ) of RTEMS.NAME;
-
---
--- TA1_SEND_18_TO_SELF_5_SECONDS
---
--- DESCRIPTION:
---
--- This subprogram is scheduled to be fired by a timer after 5 seconds
--- and to send EVENT_18 to TASK_1.
---
-
- procedure TA1_SEND_18_TO_SELF_5_SECONDS (
- IGNORED_ID : in RTEMS.ID;
- IGNORED_ADDRESS : in RTEMS.ADDRESS
- );
-
---
--- TA1_SEND_8_TO_SELF_60_SECONDS
---
--- DESCRIPTION:
---
--- This subprogram is scheduled to be fired by a timer after 60 seconds
--- and to send EVENT_8 to TASK_1.
---
-
- procedure TA1_SEND_8_TO_SELF_60_SECONDS (
- IGNORED_ID : in RTEMS.ID;
- IGNORED_ADDRESS : in RTEMS.ADDRESS
- );
-
---
--- TA1_SEND_9_TO_SELF_5_SECONDS
---
--- DESCRIPTION:
---
--- This subprogram is scheduled to be fired by a timer after 60 seconds
--- and to send EVENT_9 to TASK_1.
---
-
- procedure TA1_SEND_9_TO_SELF_60_SECONDS (
- IGNORED_ID : in RTEMS.ID;
- IGNORED_ADDRESS : in RTEMS.ADDRESS
- );
-
---
--- TA1_SEND_10_TO_SELF
---
--- DESCRIPTION:
---
--- This subprogram is scheduled to be fired by a timer after 60 seconds
--- and to send EVENT_10 to TASK_1.
---
-
- procedure TA1_SEND_10_TO_SELF (
- IGNORED_ID : in RTEMS.ID;
- IGNORED_ADDRESS : in RTEMS.ADDRESS
- );
-
---
--- TA1_SEND_1_TO_SELF_EVERY_SECOND
---
--- DESCRIPTION:
---
--- This subprogram is scheduled to be fired by a timer every second
--- and to send EVENT_1 to TASK_1 until the timer is cancelled.
---
-
- procedure TA1_SEND_1_TO_SELF_EVERY_SECOND (
- IGNORED_ID : in RTEMS.ID;
- IGNORED_ADDRESS : in RTEMS.ADDRESS
- );
-
---
--- TA1_SEND_11_TO_SELF
---
--- DESCRIPTION:
---
--- This subprogram is scheduled to be fired by a timer at a
--- specific time of day and to send EVENT_11 to TASK_1.
---
-
- procedure TA1_SEND_11_TO_SELF (
- IGNORED_ID : in RTEMS.ID;
- IGNORED_ADDRESS : in RTEMS.ADDRESS
- );
-
---
--- TA2_SEND_10_TO_SELF
---
--- DESCRIPTION:
---
--- This subprogram is scheduled to be fired by a timer after 5 seconds
--- and to send EVENT_10 to TASK_2.
---
-
- procedure TA2_SEND_10_TO_SELF (
- IGNORED_ID : in RTEMS.ID;
- IGNORED_ADDRESS : in RTEMS.ADDRESS
- );
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_1
---
--- DESCRIPTION:
---
--- This RTEMS task tests the Event and Timer Managers.
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_2
---
--- DESCRIPTION:
---
--- This RTEMS task tests the Event and Timer Managers.
---
-
- procedure TASK_2 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end SPTEST;
diff --git a/c/src/ada-tests/sptests/sp12/config.h b/c/src/ada-tests/sptests/sp12/config.h
deleted file mode 100644
index 7feac09c9b..0000000000
--- a/c/src/ada-tests/sptests/sp12/config.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MAXIMUM_SEMAPHORES 10
-#define CONFIGURE_TICKS_PER_TIMESLICE 100
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/sptests/sp12/sp12.adb b/c/src/ada-tests/sptests/sp12/sp12.adb
deleted file mode 100644
index a2edd48d5d..0000000000
--- a/c/src/ada-tests/sptests/sp12/sp12.adb
+++ /dev/null
@@ -1,58 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test SP12 of the Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with Interfaces; use Interfaces;
-with RTEMS;
-with SPTEST;
-with TEST_SUPPORT;
-
-procedure SP12 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE * 2,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- SPTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end SP12;
-
diff --git a/c/src/ada-tests/sptests/sp12/sp12.scn b/c/src/ada-tests/sptests/sp12/sp12.scn
deleted file mode 100644
index eb0c71f372..0000000000
--- a/c/src/ada-tests/sptests/sp12/sp12.scn
+++ /dev/null
@@ -1,78 +0,0 @@
-*** TEST 12 ***
-INIT - Forward priority queue test
-PRI1 - semaphore_obtain - wait forever on SM2
-PRI2 - semaphore_obtain - wait forever on SM2
-PRI3 - semaphore_obtain - wait forever on SM2
-PRI4 - semaphore_obtain - wait forever on SM2
-PRI5 - semaphore_obtain - wait forever on SM2
-INIT - Backward priority queue test
-PRI5 - semaphore_obtain - wait forever on SM2
-PRI4 - semaphore_obtain - wait forever on SM2
-PRI3 - semaphore_obtain - wait forever on SM2
-PRI2 - semaphore_obtain - wait forever on SM2
-PRI1 - semaphore_obtain - wait forever on SM2
-<pause>
-INIT - Binary Semaphore and Priority Inheritance Test
-INIT - semaphore_create - allocated binary semaphore
-INIT - semaphore_release - allocated binary semaphore
-INIT - semaphore_delete - allocated binary semaphore
-PRI5 - semaphore_obtain - wait forever on SM2
-PRI5 - task_suspend - until all priority tasks blocked
-PDRV - priority of PRI5 is 67
-PRI4 - semaphore_obtain - wait forever on SM2
-PDRV - change priority of PRI5 from 67 to 68
-PDRV - priority of PRI5 is 67
-PRI3 - semaphore_obtain - wait forever on SM2
-PDRV - priority of PRI5 is 67
-PRI2 - semaphore_obtain - wait forever on SM2
-PDRV - priority of PRI5 is 66
-PRI1 - semaphore_obtain - wait forever on SM2
-PDRV - priority of PRI5 is 65
-PDRV - task_resume - PRI5
-PRI5 - task_delete - all tasks waiting on SM2
-PRI5 - semaphore_obtain - nested
-PRI5 - semaphore_release - nested
-PRI5 - semaphore_release - restore priority
-PRI5 - priority of PRI5 is 68
-<pause>
-TA1 - semaphore_ident - smid => 16#10001#
-TA1 - semaphore_obtain - wait forever on SM2
-TA1 - got SM2
-TA1 - semaphore_obtain - wait forever on SM3
-TA1 - got SM3
-TA1 - semaphore_obtain - get SM1 - NO_WAIT
-TA1 - got SM1
-TA1 - task_wake_after - sleep 5 seconds
-TA2 - semaphore_obtain - wait forever on SM1
-TA3 - semaphore_obtain - wait forever on SM2
-<pause>
-TA1 - semaphore_release - release SM1
-TA1 - semaphore_obtain - waiting for SM1 with 10 second timeout
-TA2 - got SM1
-TA2 - semaphore_release - release SM1
-TA2 - task_set_priority - make self highest priority task
-TA2 - semaphore_obtain - wait forever on SM2
-TA1 - got SM1
-TA1 - semaphore_release - release SM2
-TA2 - got SM2
-TA2 - semaphore_release - release SM2
-TA2 - task_delete - delete self
-TA1 - task_wake_after - sleep 5 seconds
-TA3 - got SM2
-TA3 - semaphore_release - release SM2
-TA3 - semaphore_obtain - wait forever on SM3
-<pause>
-TA1 - task_delete - delete TA3
-TA1 - task_wake_after - sleep 5 seconds
-TA4 - semaphore_obtain - wait forever on SM1
-TA5 - semaphore_obtain - wait forever on SM1
-TA1 - task_delete - delete TA4
-TA1 - semaphore_release - release SM1
-TA1 - task_wake_after - sleep 5 seconds
-TA5 - got SM1
-TA5 - semaphore_obtain - wait forever on SM1
-TA1 - semaphore_delete - delete SM1
-TA1 - semaphore_delete - delete SM3
-TA1 - task_delete - delete self
-TA5 - SM1 deleted by TA1
-*** END OF TEST 12 ***
diff --git a/c/src/ada-tests/sptests/sp12/sptest.adb b/c/src/ada-tests/sptests/sp12/sptest.adb
deleted file mode 100644
index e302dacc76..0000000000
--- a/c/src/ada-tests/sptests/sp12/sptest.adb
+++ /dev/null
@@ -1,812 +0,0 @@
---
--- SPTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 12 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with TEST_SUPPORT;
-with TEXT_IO;
-with UNSIGNED32_IO;
-
-package body SPTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TEST 12 ***" );
-
- SPTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME( 'T', 'A', '1', ' ' );
- SPTEST.TASK_NAME( 2 ) := RTEMS.BUILD_NAME( 'T', 'A', '2', ' ' );
- SPTEST.TASK_NAME( 3 ) := RTEMS.BUILD_NAME( 'T', 'A', '3', ' ' );
- SPTEST.TASK_NAME( 4 ) := RTEMS.BUILD_NAME( 'T', 'A', '4', ' ' );
- SPTEST.TASK_NAME( 5 ) := RTEMS.BUILD_NAME( 'T', 'A', '5', ' ' );
-
- SPTEST.PRIORITY_TASK_NAME( 1 ) :=
- RTEMS.BUILD_NAME( 'P', 'R', 'I', '1' );
- SPTEST.PRIORITY_TASK_NAME( 2 ) :=
- RTEMS.BUILD_NAME( 'P', 'R', 'I', '2' );
- SPTEST.PRIORITY_TASK_NAME( 3 ) :=
- RTEMS.BUILD_NAME( 'P', 'R', 'I', '3' );
- SPTEST.PRIORITY_TASK_NAME( 4 ) :=
- RTEMS.BUILD_NAME( 'P', 'R', 'I', '4' );
- SPTEST.PRIORITY_TASK_NAME( 5 ) :=
- RTEMS.BUILD_NAME( 'P', 'R', 'I', '5' );
-
- SPTEST.SEMAPHORE_NAME( 1 ) := RTEMS.BUILD_NAME( 'S', 'M', '1', ' ' );
- SPTEST.SEMAPHORE_NAME( 2 ) := RTEMS.BUILD_NAME( 'S', 'M', '2', ' ' );
- SPTEST.SEMAPHORE_NAME( 3 ) := RTEMS.BUILD_NAME( 'S', 'M', '3', ' ' );
-
- RTEMS.SEMAPHORE_CREATE(
- SPTEST.SEMAPHORE_NAME( 1 ),
- 1,
- RTEMS.DEFAULT_ATTRIBUTES,
- RTEMS.NO_PRIORITY,
- SPTEST.SEMAPHORE_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_CREATE OF SM1" );
-
- RTEMS.SEMAPHORE_CREATE(
- SPTEST.SEMAPHORE_NAME( 2 ),
- 0,
- RTEMS.PRIORITY,
- RTEMS.NO_PRIORITY,
- SPTEST.SEMAPHORE_ID( 2 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_CREATE OF SM2" );
-
- RTEMS.SEMAPHORE_CREATE(
- SPTEST.SEMAPHORE_NAME( 3 ),
- 1,
- RTEMS.DEFAULT_ATTRIBUTES,
- RTEMS.NO_PRIORITY,
- SPTEST.SEMAPHORE_ID( 3 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_CREATE OF SM3" );
-
- TEXT_IO.PUT_LINE( "INIT - Forward priority queue test" );
- SPTEST.PRIORITY_TEST_DRIVER( 0 );
-
- TEXT_IO.PUT_LINE( "INIT - Backward priority queue test" );
- SPTEST.PRIORITY_TEST_DRIVER( 32 );
-
-TEST_SUPPORT.PAUSE;
-
- TEXT_IO.PUT_LINE(
- "INIT - Binary Semaphore and Priority Inheritance Test"
- );
-
- RTEMS.SEMAPHORE_DELETE( SPTEST.SEMAPHORE_ID( 2 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_DELETE OF SM2" );
-
- TEXT_IO.PUT_LINE(
- "INIT - semaphore_create - allocated binary semaphore"
- );
- RTEMS.SEMAPHORE_CREATE(
- SPTEST.SEMAPHORE_NAME( 2 ),
- 0,
- RTEMS.BINARY_SEMAPHORE + RTEMS.PRIORITY + RTEMS.INHERIT_PRIORITY,
- RTEMS.NO_PRIORITY,
- SPTEST.SEMAPHORE_ID( 2 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_CREATE OF SM2" );
-
- TEXT_IO.PUT_LINE(
- "INIT - semaphore_release - allocated binary semaphore"
- );
- RTEMS.SEMAPHORE_RELEASE( SPTEST.SEMAPHORE_ID( 2 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_RELEASE OF SM2" );
-
- TEXT_IO.PUT_LINE(
- "INIT - semaphore_delete - allocated binary semaphore"
- );
- RTEMS.SEMAPHORE_DELETE( SPTEST.SEMAPHORE_ID( 2 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_DELETE OF SM2" );
-
- RTEMS.SEMAPHORE_CREATE(
- SPTEST.SEMAPHORE_NAME( 2 ),
- 1,
- RTEMS.BINARY_SEMAPHORE + RTEMS.PRIORITY + RTEMS.INHERIT_PRIORITY,
- RTEMS.NO_PRIORITY,
- SPTEST.SEMAPHORE_ID( 2 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_CREATE OF SM2" );
-
- SPTEST.PRIORITY_TEST_DRIVER( 64 );
-
-TEST_SUPPORT.PAUSE;
-
- RTEMS.SEMAPHORE_DELETE( SPTEST.SEMAPHORE_ID( 2 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_DELETE OF SM2" );
-
- RTEMS.SEMAPHORE_CREATE(
- SPTEST.SEMAPHORE_NAME( 2 ),
- 0,
- RTEMS.PRIORITY,
- RTEMS.NO_PRIORITY,
- SPTEST.SEMAPHORE_ID( 2 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_CREATE OF SM2" );
-
- RTEMS.SEMAPHORE_RELEASE( SPTEST.SEMAPHORE_ID( 2 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_RELEASE OF SM2" );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 1 ),
- 4,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA1" );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 2 ),
- 4,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 2 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA2" );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 3 ),
- 4,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 3 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA3" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 1 ),
- SPTEST.TASK_1'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA1" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 2 ),
- SPTEST.TASK_2'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA2" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 3 ),
- SPTEST.TASK_3'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA3" );
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- PRIORITY_TEST_DRIVER
---
-
- procedure PRIORITY_TEST_DRIVER (
- PRIORITY_BASE : in RTEMS.UNSIGNED32
- ) is
- PREVIOUS_PRIORITY : RTEMS.TASK_PRIORITY;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- for INDEX in 1 .. 5
- loop
-
- case INDEX is
- when 1 | 2 | 3 =>
- SPTEST.TASK_PRIORITY( INDEX ) :=
- PRIORITY_BASE + RTEMS.TASK_PRIORITY( INDEX );
- when others =>
- SPTEST.TASK_PRIORITY( INDEX ) := PRIORITY_BASE + 3;
- end case;
-
- RTEMS.TASK_CREATE(
- SPTEST.PRIORITY_TASK_NAME( INDEX ),
- SPTEST.TASK_PRIORITY( INDEX ),
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.PRIORITY_TASK_ID( INDEX ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE LOOP" );
-
- end loop;
-
- if PRIORITY_BASE = 0 then
-
- for INDEX in 1 .. 5
- loop
-
- RTEMS.TASK_START(
- SPTEST.PRIORITY_TASK_ID( INDEX ),
- SPTEST.PRIORITY_TASK'ACCESS,
- RTEMS.TASK_ARGUMENT( INDEX ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START LOOP" );
-
- end loop;
-
- else
-
- for INDEX in reverse 1 .. 5
- loop
-
- RTEMS.TASK_START(
- SPTEST.PRIORITY_TASK_ID( INDEX ),
- SPTEST.PRIORITY_TASK'ACCESS,
- RTEMS.TASK_ARGUMENT( INDEX ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START LOOP" );
-
- RTEMS.TASK_WAKE_AFTER( TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER LOOP" );
-
- if PRIORITY_BASE = 64 then
- if INDEX = 4 then
- RTEMS.TASK_SET_PRIORITY(
- SPTEST.PRIORITY_TASK_ID( 5 ),
- PRIORITY_BASE + 4,
- PREVIOUS_PRIORITY,
- STATUS
- );
- TEXT_IO.PUT( "PDRV - change priority of PRI5 from " );
- UNSIGNED32_IO.PUT( PREVIOUS_PRIORITY );
- TEXT_IO.PUT( " to " );
- UNSIGNED32_IO.PUT( PRIORITY_BASE + 4 );
- TEXT_IO.NEW_LINE;
- TEST_SUPPORT.DIRECTIVE_FAILED(
- STATUS,
- "PDRV TASK_SET_PRIORITY"
- );
- end if;
-
- RTEMS.TASK_SET_PRIORITY(
- SPTEST.PRIORITY_TASK_ID( 5 ),
- RTEMS.CURRENT_PRIORITY,
- PREVIOUS_PRIORITY,
- STATUS
- );
- TEXT_IO.PUT( "PDRV - priority of PRI5 is " );
- UNSIGNED32_IO.PUT( PREVIOUS_PRIORITY );
- TEXT_IO.NEW_LINE;
- TEST_SUPPORT.DIRECTIVE_FAILED(
- STATUS,
- "PDRV TASK_SET_PRIORITY"
- );
- end if;
-
- end loop;
-
- end if;
-
- RTEMS.TASK_WAKE_AFTER( TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER AFTER LOOP" );
-
- if PRIORITY_BASE = 0 then
- for INDEX in 1 .. 5
- loop
-
- RTEMS.SEMAPHORE_RELEASE(
- SPTEST.SEMAPHORE_ID( 2 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED(
- STATUS,
- "SEMAPHORE_RELEASE LOOP"
- );
-
- end loop;
- end if;
-
- if PRIORITY_BASE = 64 then
-
- TEXT_IO.PUT_LINE( "PDRV - task_resume - PRI5" );
- RTEMS.TASK_RESUME( SPTEST.PRIORITY_TASK_ID( 5 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_RESUME" );
-
- RTEMS.TASK_WAKE_AFTER( TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED(
- STATUS,
- "TASK_WAKE_AFTER SO PRI5 can run"
- );
-
- RTEMS.TASK_DELETE( SPTEST.PRIORITY_TASK_ID( 5 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF PRI5" );
- else
-
- for INDEX in 1 .. 5
- loop
-
- RTEMS.TASK_DELETE(
- SPTEST.PRIORITY_TASK_ID( INDEX ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE LOOP" );
-
- end loop;
- end if;
-
-
- end PRIORITY_TEST_DRIVER;
-
---PAGE
---
--- PRIORITY_TASK
---
-
- procedure PRIORITY_TASK (
- ITS_INDEX : in RTEMS.TASK_ARGUMENT
- ) is
- TIMEOUT : RTEMS.INTERVAL;
- ITS_PRIORITY : RTEMS.TASK_PRIORITY;
- CURRENT_PRIORITY : RTEMS.TASK_PRIORITY;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- ITS_PRIORITY := SPTEST.TASK_PRIORITY( INTEGER( ITS_INDEX ) );
-
- if ITS_PRIORITY < 3 then
- TIMEOUT := 5 * TEST_SUPPORT.TICKS_PER_SECOND;
- else
- TIMEOUT := RTEMS.NO_TIMEOUT;
- end if;
-
- TEST_SUPPORT.PUT_NAME( PRIORITY_TASK_NAME( INTEGER(ITS_INDEX) ), FALSE );
- TEXT_IO.PUT_LINE( " - semaphore_obtain - wait forever on SM2" );
-
- RTEMS.SEMAPHORE_OBTAIN(
- SPTEST.SEMAPHORE_ID( 2 ),
- RTEMS.DEFAULT_OPTIONS,
- TIMEOUT,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_OBTAIN OF SM2" );
-
- if ITS_PRIORITY < 64 then
- TEXT_IO.PUT( "PRI" );
- UNSIGNED32_IO.PUT( ITS_INDEX );
- TEXT_IO.PUT( " - WHY AM I HERE? (priority = " );
- UNSIGNED32_IO.PUT( ITS_PRIORITY );
- TEXT_IO.PUT_LINE( " )" );
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
- end if;
-
- if ITS_INDEX = 5 then
- TEXT_IO.PUT_LINE(
- "PRI5 - task_suspend - until all priority tasks blocked"
- );
- end if;
-
- RTEMS.TASK_SUSPEND( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SUSPEND" );
-
- TEXT_IO.PUT_LINE( "PRI5 - task_delete - all tasks waiting on SM2" );
- for INDEX in 1 .. 4
- loop
-
- RTEMS.TASK_DELETE( SPTEST.PRIORITY_TASK_ID( INDEX ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE LOOP" );
-
- end loop;
-
- TEXT_IO.PUT_LINE( "PRI5 - semaphore_obtain - nested" );
- RTEMS.SEMAPHORE_OBTAIN(
- SPTEST.SEMAPHORE_ID( 2 ),
- RTEMS.DEFAULT_OPTIONS,
- TIMEOUT,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_OBTAIN NESTED" );
-
- TEXT_IO.PUT_LINE( "PRI5 - semaphore_release - nested" );
- RTEMS.SEMAPHORE_RELEASE( SPTEST.SEMAPHORE_ID( 2 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_RELEASE NESTED" );
-
- TEXT_IO.PUT_LINE( "PRI5 - semaphore_release - restore priority" );
- RTEMS.SEMAPHORE_RELEASE( SPTEST.SEMAPHORE_ID( 2 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_RELEASE" );
-
- RTEMS.TASK_SET_PRIORITY(
- SPTEST.PRIORITY_TASK_ID( 5 ),
- RTEMS.CURRENT_PRIORITY,
- CURRENT_PRIORITY,
- STATUS
- );
- TEXT_IO.PUT( "PRI5 - priority of PRI5 is " );
- UNSIGNED32_IO.PUT( CURRENT_PRIORITY );
- TEXT_IO.NEW_LINE;
- TEST_SUPPORT.DIRECTIVE_FAILED(
- STATUS,
- "PRI5 TASK_SET_PRIORITY CURRENT"
- );
- RTEMS.TASK_SUSPEND( RTEMS.SELF, STATUS );
-
- end PRIORITY_TASK;
-
---PAGE
---
--- TASK_1
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- SMID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.SEMAPHORE_IDENT(
- SPTEST.SEMAPHORE_NAME( 1 ),
- RTEMS.SEARCH_ALL_NODES,
- SMID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_IDENT OF SM1" );
- TEXT_IO.PUT( "TA1 - semaphore_ident - smid => " );
- UNSIGNED32_IO.PUT( SMID, WIDTH => 8, BASE => 16 );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT_LINE( "TA1 - semaphore_obtain - wait forever on SM2" );
- RTEMS.SEMAPHORE_OBTAIN(
- SPTEST.SEMAPHORE_ID( 2 ),
- RTEMS.DEFAULT_MODES,
- RTEMS.NO_TIMEOUT,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_OBTAIN ON SM2" );
-
- TEXT_IO.PUT_LINE( "TA1 - got SM2" );
-
- TEXT_IO.PUT_LINE( "TA1 - semaphore_obtain - wait forever on SM3" );
- RTEMS.SEMAPHORE_OBTAIN(
- SPTEST.SEMAPHORE_ID( 3 ),
- RTEMS.DEFAULT_MODES,
- RTEMS.NO_TIMEOUT,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_OBTAIN ON SM3" );
-
- TEXT_IO.PUT_LINE( "TA1 - got SM3" );
-
- TEXT_IO.PUT_LINE( "TA1 - semaphore_obtain - get SM1 - NO_WAIT" );
- RTEMS.SEMAPHORE_OBTAIN(
- SPTEST.SEMAPHORE_ID( 1 ),
- RTEMS.NO_WAIT,
- RTEMS.NO_TIMEOUT,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_OBTAIN ON SM1" );
-
- TEXT_IO.PUT_LINE( "TA1 - got SM1" );
-
- TEXT_IO.PUT_LINE( "TA1 - task_wake_after - sleep 5 seconds" );
- RTEMS.TASK_WAKE_AFTER( 5 * TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
-TEST_SUPPORT.PAUSE;
-
- TEXT_IO.PUT_LINE( "TA1 - semaphore_release - release SM1" );
- RTEMS.SEMAPHORE_RELEASE( SPTEST.SEMAPHORE_ID( 1 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_RELEASE ON SM1" );
-
- TEXT_IO.PUT_LINE(
- "TA1 - semaphore_obtain - waiting for SM1 with 10 second timeout"
- );
- RTEMS.SEMAPHORE_OBTAIN(
- SPTEST.SEMAPHORE_ID( 1 ),
- RTEMS.DEFAULT_MODES,
- 10 * TEST_SUPPORT.TICKS_PER_SECOND,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_OBTAIN ON SM3" );
-
- TEXT_IO.PUT_LINE( "TA1 - got SM1" );
-
- TEXT_IO.PUT_LINE( "TA1 - semaphore_release - release SM2" );
- RTEMS.SEMAPHORE_RELEASE(
- SPTEST.SEMAPHORE_ID( 2 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_RELEASE ON SM2" );
-
- TEXT_IO.PUT_LINE( "TA1 - task_wake_after - sleep 5 seconds" );
- RTEMS.TASK_WAKE_AFTER( 5 * TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
-TEST_SUPPORT.PAUSE;
-
- TEXT_IO.PUT_LINE( "TA1 - task_delete - delete TA3" );
- RTEMS.TASK_DELETE( SPTEST.TASK_ID( 3 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF TA3" );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 4 ),
- 4,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 4 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA4" );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 5 ),
- 4,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 5 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA5" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 4 ),
- SPTEST.TASK_4'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA4" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 5 ),
- SPTEST.TASK_5'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA5" );
-
- TEXT_IO.PUT_LINE( "TA1 - task_wake_after - sleep 5 seconds" );
- RTEMS.TASK_WAKE_AFTER( 5 * TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- TEXT_IO.PUT_LINE( "TA1 - task_delete - delete TA4" );
- RTEMS.TASK_DELETE( SPTEST.TASK_ID( 4 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF TA4" );
-
- TEXT_IO.PUT_LINE( "TA1 - semaphore_release - release SM1" );
- RTEMS.SEMAPHORE_RELEASE(
- SPTEST.SEMAPHORE_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_RELEASE ON SM1" );
-
- TEXT_IO.PUT_LINE( "TA1 - task_wake_after - sleep 5 seconds" );
- RTEMS.TASK_WAKE_AFTER( 5 * TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- TEXT_IO.PUT_LINE( "TA1 - semaphore_delete - delete SM1" );
- RTEMS.SEMAPHORE_DELETE( SPTEST.SEMAPHORE_ID( 1 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_DELETE OF SM1" );
-
- TEXT_IO.PUT_LINE( "TA1 - semaphore_delete - delete SM3" );
- RTEMS.SEMAPHORE_DELETE( SPTEST.SEMAPHORE_ID( 3 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_DELETE OF SM3" );
-
- TEXT_IO.PUT_LINE( "TA1 - task_delete - delete self" );
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF TA1" );
-
- end TASK_1;
-
---PAGE
---
--- TASK_2
---
-
- procedure TASK_2 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- PREVIOUS_PRIORITY : RTEMS.TASK_PRIORITY;
- begin
-
- TEXT_IO.PUT_LINE( "TA2 - semaphore_obtain - wait forever on SM1" );
- RTEMS.SEMAPHORE_OBTAIN(
- SPTEST.SEMAPHORE_ID( 1 ),
- RTEMS.DEFAULT_MODES,
- RTEMS.NO_TIMEOUT,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_OBTAIN ON SM1" );
-
- TEXT_IO.PUT_LINE( "TA2 - got SM1" );
-
- TEXT_IO.PUT_LINE( "TA2 - semaphore_release - release SM1" );
- RTEMS.SEMAPHORE_RELEASE(
- SPTEST.SEMAPHORE_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_RELEASE ON SM1" );
-
- TEXT_IO.PUT_LINE(
- "TA2 - task_set_priority - make self highest priority task"
- );
- RTEMS.TASK_SET_PRIORITY(
- RTEMS.SELF,
- 3,
- PREVIOUS_PRIORITY,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SET_PRIORITY ON TA2" );
-
- TEXT_IO.PUT_LINE( "TA2 - semaphore_obtain - wait forever on SM2" );
- RTEMS.SEMAPHORE_OBTAIN(
- SPTEST.SEMAPHORE_ID( 2 ),
- RTEMS.DEFAULT_MODES,
- RTEMS.NO_TIMEOUT,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_OBTAIN ON SM2" );
-
- TEXT_IO.PUT_LINE( "TA2 - got SM2" );
-
- TEXT_IO.PUT_LINE( "TA2 - semaphore_release - release SM2" );
- RTEMS.SEMAPHORE_RELEASE(
- SPTEST.SEMAPHORE_ID( 2 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_RELEASE ON SM2" );
-
- TEXT_IO.PUT_LINE( "TA2 - task_delete - delete self" );
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF TA2" );
-
- end TASK_2;
-
---PAGE
---
--- TASK_3
---
-
- procedure TASK_3 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.PUT_LINE( "TA3 - semaphore_obtain - wait forever on SM2" );
- RTEMS.SEMAPHORE_OBTAIN(
- SPTEST.SEMAPHORE_ID( 2 ),
- RTEMS.DEFAULT_MODES,
- RTEMS.NO_TIMEOUT,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_OBTAIN ON SM2" );
- TEXT_IO.PUT_LINE( "TA3 - got SM2" );
-
- TEXT_IO.PUT_LINE( "TA3 - semaphore_release - release SM2" );
- RTEMS.SEMAPHORE_RELEASE(
- SPTEST.SEMAPHORE_ID( 2 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_RELEASE ON SM2" );
-
- TEXT_IO.PUT_LINE( "TA3 - semaphore_obtain - wait forever on SM3" );
- RTEMS.SEMAPHORE_OBTAIN(
- SPTEST.SEMAPHORE_ID( 3 ),
- RTEMS.DEFAULT_MODES,
- RTEMS.NO_TIMEOUT,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_OBTAIN ON SM3" );
-
- end TASK_3;
-
---PAGE
---
--- TASK_4
---
-
- procedure TASK_4 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.PUT_LINE( "TA4 - semaphore_obtain - wait forever on SM1" );
- RTEMS.SEMAPHORE_OBTAIN(
- SPTEST.SEMAPHORE_ID( 1 ),
- RTEMS.DEFAULT_MODES,
- RTEMS.NO_TIMEOUT,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_OBTAIN ON SM1" );
-
- end TASK_4;
-
---PAGE
---
--- TASK_5
---
-
- procedure TASK_5 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.PUT_LINE( "TA5 - semaphore_obtain - wait forever on SM1" );
- RTEMS.SEMAPHORE_OBTAIN(
- SPTEST.SEMAPHORE_ID( 1 ),
- RTEMS.DEFAULT_MODES,
- RTEMS.NO_TIMEOUT,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_OBTAIN ON SM1" );
-
- TEXT_IO.PUT_LINE( "TA5 - got SM1" );
-
- TEXT_IO.PUT_LINE( "TA5 - semaphore_obtain - wait forever on SM1" );
- RTEMS.SEMAPHORE_OBTAIN(
- SPTEST.SEMAPHORE_ID( 1 ),
- RTEMS.DEFAULT_MODES,
- RTEMS.NO_TIMEOUT,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.OBJECT_WAS_DELETED,
- "SEMAPHORE_OBTAIN ON SM1"
- );
- TEXT_IO.PUT_LINE( "TA5 - SM1 deleted by TA1" );
-
- TEXT_IO.PUT_LINE( "*** END OF TEST 12 ***" );
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end TASK_5;
-
-end SPTEST;
diff --git a/c/src/ada-tests/sptests/sp12/sptest.ads b/c/src/ada-tests/sptests/sp12/sptest.ads
deleted file mode 100644
index 8d75953069..0000000000
--- a/c/src/ada-tests/sptests/sp12/sptest.ads
+++ /dev/null
@@ -1,142 +0,0 @@
---
--- SPTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 12 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-package SPTEST is
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 5 ) of RTEMS.ID;
- TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 5 ) of RTEMS.NAME;
-
- PRIORITY_TASK_ID : array ( 1 .. 5 ) of RTEMS.ID;
- PRIORITY_TASK_NAME : array ( 1 .. 5 ) of RTEMS.NAME;
- TASK_PRIORITY : array ( 1 .. 5 ) of RTEMS.TASK_PRIORITY;
-
- SEMAPHORE_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
- SEMAPHORE_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- PRIORITY_TEST_DRIVER
---
--- DESCRIPTION:
---
--- This subprogram creates and starts RTEMS tasks of different priority
--- so that those tasks may exercise the priority blocking algorithm.
---
-
- procedure PRIORITY_TEST_DRIVER (
- PRIORITY_BASE : in RTEMS.UNSIGNED32
- );
-
---
--- PRIORITY_TASK
---
--- DESCRIPTION:
---
--- Copies of this RTEMS are executed at different priorities and each
--- instantiation blocks on a semaphore with priority blocking. This
--- is done to exercise the priority blocking algorithms.
---
-
- procedure PRIORITY_TASK (
- ITS_INDEX : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_1
---
--- DESCRIPTION:
---
--- This RTEMS task tests the Semaphore Manager.
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_2
---
--- DESCRIPTION:
---
--- This RTEMS task tests the Semaphore Manager.
---
-
- procedure TASK_2 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_3
---
--- DESCRIPTION:
---
--- This RTEMS task tests the Semaphore Manager.
---
-
- procedure TASK_3 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_4
---
--- DESCRIPTION:
---
--- This RTEMS task tests the Semaphore Manager.
---
-
- procedure TASK_4 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_5
---
--- DESCRIPTION:
---
--- This RTEMS task tests the Semaphore Manager.
---
-
- procedure TASK_5 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end SPTEST;
diff --git a/c/src/ada-tests/sptests/sp13/config.h b/c/src/ada-tests/sptests/sp13/config.h
deleted file mode 100644
index 7a1e3fa026..0000000000
--- a/c/src/ada-tests/sptests/sp13/config.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 10
-#define CONFIGURE_TICKS_PER_TIMESLICE 100
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/sptests/sp13/sp13.adb b/c/src/ada-tests/sptests/sp13/sp13.adb
deleted file mode 100644
index 3d19379ccd..0000000000
--- a/c/src/ada-tests/sptests/sp13/sp13.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test SP13 of the Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with SPTEST;
-with TEST_SUPPORT;
-
-procedure SP13 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- SPTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end SP13;
-
diff --git a/c/src/ada-tests/sptests/sp13/sp13.scn b/c/src/ada-tests/sptests/sp13/sp13.scn
deleted file mode 100644
index ced19af55b..0000000000
--- a/c/src/ada-tests/sptests/sp13/sp13.scn
+++ /dev/null
@@ -1,66 +0,0 @@
-*** TEST 13 ***
-TA1 - message_queue_ident - qid => 16#10001#
-TA1 - message_queue_send - BUFFER 1 TO Q 1
-TA1 - message_queue_send - BUFFER 2 TO Q 1
-TA1 - task_wake_after - sleep 5 seconds
-TA2 - message_queue_receive - receive from queue 1 - NO_WAIT
-TA2 - buffer received: BUFFER 1 TO Q 1
-TA2 - message_queue_receive - receive from queue 1 - WAIT FOREVER
-TA2 - buffer received: BUFFER 2 TO Q 1
-TA2 - message_queue_receive - receive from queue 1 - WAIT FOREVER
-TA3 - message_queue_receive - receive from queue 2 - WAIT FOREVER
-TA1 - message_queue_send - BUFFER 3 TO Q 1
-TA1 - task_wake_after - sleep 5 seconds
-TA2 - buffer received: BUFFER 3 TO Q 1
-TA2 - task_set_priority - make self highest priority task
-TA2 - message_queue_receive - receive from queue 2 - WAIT FOREVER
-<pause>
-TA1 - message_queue_send - BUFFER 1 TO Q 2
-TA2 - buffer received: BUFFER 1 TO Q 2
-TA2 - message_queue_send - BUFFER 2 TO Q 2
-TA2 - message_queue_receive - receive from queue 1 - 10 second timeout
-TA1 - message_queue_receive - receive from queue 1 - 10 second timeout
-TA3 - buffer received: BUFFER 2 TO Q 2
-TA3 - message_queue_broadcast - BUFFER 3 TO Q 1
-TA2 - buffer received: BUFFER 3 TO Q 1
-TA2 - message_queue_receive - receive from queue 3 - WAIT FOREVER
-TA3 - number of tasks awakened = 2
-TA3 - message_queue_receive - receive from queue 3 - WAIT FOREVER
-TA1 - buffer received: BUFFER 3 TO Q 1
-TA1 - task_delete - delete TA2
-TA1 - message_queue_send - BUFFER 1 TO Q 3
-TA1 - task_wake_after - sleep 5 seconds
-TA3 - buffer received: BUFFER 1 TO Q 3
-TA3 - task_delete - delete self
-<pause>
-TA1 - message_queue_send - BUFFER 2 TO Q 3
-TA1 - message_queue_send - BUFFER 3 TO Q 3
-TA1 - message_queue_send - BUFFER 4 TO Q 3
-TA1 - message_queue_urgent - BUFFER 5 TO Q 3
-TA1 - message_queue_receive - receive from queue 3 - WAIT FOREVER
-TA1 - buffer received: BUFFER 5 TO Q 3
-TA1 - message_queue_receive - receive from queue 3 - WAIT FOREVER
-TA1 - buffer received: BUFFER 2 TO Q 3
-TA1 - message_queue_receive - receive from queue 3 - WAIT FOREVER
-TA1 - buffer received: BUFFER 3 TO Q 3
-TA1 - message_queue_receive - receive from queue 3 - WAIT FOREVER
-TA1 - buffer received: BUFFER 4 TO Q 3
-TA1 - message_queue_urgent - BUFFER 3 TO Q 2
-TA1 - message_queue_receive - receive from queue 2 - WAIT FOREVER
-TA1 - buffer received: BUFFER 3 TO Q 2
-<pause>
-TA1 - message_queue_delete - delete queue 1
-TA1 - message_queue_urgent - BUFFER 3 TO Q 2
-TA1 - message_queue_delete - delete queue 2
-TA1 - message_queue_flush - empty Q 3
-TA1 - 0 messages were flushed from Q 3
-TA1 - message_queue_send - BUFFER 1 TO Q 3
-TA1 - message_queue_send - BUFFER 2 TO Q 3
-TA1 - message_queue_send - BUFFER 3 TO Q 3
-TA1 - message_queue_flush - Q 3
-TA1 - 3 messages were flushed from Q 3
-TA1 - message_queue_send - until all message buffers consumed
-TA1 - message_queue_send - all message buffers consumed
-TA1 - message_queue_flush - Q 3
-TA1 - 100 messages were flushed from Q 3
-*** END OF TEST 13 ***
diff --git a/c/src/ada-tests/sptests/sp13/sptest.adb b/c/src/ada-tests/sptests/sp13/sptest.adb
deleted file mode 100644
index 9190f77e83..0000000000
--- a/c/src/ada-tests/sptests/sp13/sptest.adb
+++ /dev/null
@@ -1,723 +0,0 @@
---
--- SPTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 13 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with TEST_SUPPORT;
-with TEXT_IO;
-with UNSIGNED32_IO;
-
-package body SPTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TEST 13 ***" );
-
- SPTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME( 'T', 'A', '1', ' ' );
- SPTEST.TASK_NAME( 2 ) := RTEMS.BUILD_NAME( 'T', 'A', '2', ' ' );
- SPTEST.TASK_NAME( 3 ) := RTEMS.BUILD_NAME( 'T', 'A', '3', ' ' );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 1 ),
- 4,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA1" );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 2 ),
- 4,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 2 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA2" );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 3 ),
- 4,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 3 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA3" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 1 ),
- SPTEST.TASK_1'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA1" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 2 ),
- SPTEST.TASK_2'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA2" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 3 ),
- SPTEST.TASK_3'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA3" );
-
- SPTEST.QUEUE_NAME( 1 ) := RTEMS.BUILD_NAME( 'Q', '1', ' ', ' ' );
- SPTEST.QUEUE_NAME( 2 ) := RTEMS.BUILD_NAME( 'Q', '2', ' ', ' ' );
- SPTEST.QUEUE_NAME( 3 ) := RTEMS.BUILD_NAME( 'Q', '3', ' ', ' ' );
-
- RTEMS.MESSAGE_QUEUE_CREATE(
- SPTEST.QUEUE_NAME( 1 ),
- 100,
- 16,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.QUEUE_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "QUEUE_CREATE OF Q1" );
-
- RTEMS.MESSAGE_QUEUE_CREATE(
- SPTEST.QUEUE_NAME( 2 ),
- 10,
- 16,
- RTEMS.PRIORITY,
- SPTEST.QUEUE_ID( 2 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "QUEUE_CREATE OF Q2" );
-
- RTEMS.MESSAGE_QUEUE_CREATE(
- SPTEST.QUEUE_NAME( 3 ),
- 100,
- 16,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.QUEUE_ID( 3 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "QUEUE_CREATE OF Q3" );
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- FILL_BUFFER
---
-
---
--- Depends on tricks to make the copy work.
---
-
- procedure FILL_BUFFER (
- SOURCE : in STRING;
- BUFFER : out SPTEST.BUFFER
- ) is
- begin
-
- BUFFER.FIELD1 := RTEMS.BUILD_NAME(
- SOURCE( SOURCE'FIRST ),
- SOURCE( SOURCE'FIRST + 1 ),
- SOURCE( SOURCE'FIRST + 2 ),
- SOURCE( SOURCE'FIRST + 3 )
- );
-
- BUFFER.FIELD2 := RTEMS.BUILD_NAME(
- SOURCE( SOURCE'FIRST + 4 ),
- SOURCE( SOURCE'FIRST + 5 ),
- SOURCE( SOURCE'FIRST + 6 ),
- SOURCE( SOURCE'FIRST + 7 )
- );
-
- BUFFER.FIELD3 := RTEMS.BUILD_NAME(
- SOURCE( SOURCE'FIRST + 8 ),
- SOURCE( SOURCE'FIRST + 9 ),
- SOURCE( SOURCE'FIRST + 10 ),
- SOURCE( SOURCE'FIRST + 11 )
- );
-
- BUFFER.FIELD4 := RTEMS.BUILD_NAME(
- SOURCE( SOURCE'FIRST + 12 ),
- SOURCE( SOURCE'FIRST + 13 ),
- SOURCE( SOURCE'FIRST + 14 ),
- SOURCE( SOURCE'FIRST + 15 )
- );
-
- end FILL_BUFFER;
-
---PAGE
---
--- PUT_BUFFER
---
-
---
--- Depends on tricks to make the output work.
---
-
- procedure PUT_BUFFER (
- BUFFER : in SPTEST.BUFFER
- ) is
- begin
-
- TEST_SUPPORT.PUT_NAME( BUFFER.FIELD1, FALSE );
- TEST_SUPPORT.PUT_NAME( BUFFER.FIELD2, FALSE );
- TEST_SUPPORT.PUT_NAME( BUFFER.FIELD3, FALSE );
- TEST_SUPPORT.PUT_NAME( BUFFER.FIELD4, FALSE );
-
- end PUT_BUFFER;
-
---PAGE
---
--- TASK_1
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- QID : RTEMS.ID;
- BUFFER : SPTEST.BUFFER;
- BUFFER_POINTER : RTEMS.ADDRESS;
- TIMES : RTEMS.UNSIGNED32;
- COUNT : RTEMS.UNSIGNED32;
- MESSAGE_SIZE : RTEMS.UNSIGNED32;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- BUFFER_POINTER := BUFFER'ADDRESS;
-
- RTEMS.MESSAGE_QUEUE_IDENT(
- SPTEST.QUEUE_NAME( 1 ),
- RTEMS.SEARCH_ALL_NODES,
- QID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_IDENT" );
- TEXT_IO.PUT( "TA1 - message_queue_ident - qid => " );
- UNSIGNED32_IO.PUT( QID, WIDTH => 8, BASE => 16 );
- TEXT_IO.NEW_LINE;
-
- SPTEST.FILL_BUFFER( "BUFFER 1 TO Q 1 ", BUFFER );
- TEXT_IO.PUT_LINE( "TA1 - message_queue_send - BUFFER 1 TO Q 1" );
- RTEMS.MESSAGE_QUEUE_SEND(
- SPTEST.QUEUE_ID( 1 ),
- BUFFER_POINTER,
- 16,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_SEND" );
-
- SPTEST.FILL_BUFFER( "BUFFER 2 TO Q 1 ", BUFFER );
- TEXT_IO.PUT_LINE( "TA1 - message_queue_send - BUFFER 2 TO Q 1" );
- RTEMS.MESSAGE_QUEUE_SEND(
- SPTEST.QUEUE_ID( 1 ),
- BUFFER_POINTER,
- 16,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_SEND" );
-
- TEXT_IO.PUT_LINE( "TA1 - task_wake_after - sleep 5 seconds" );
- RTEMS.TASK_WAKE_AFTER( 5 * TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- SPTEST.FILL_BUFFER( "BUFFER 3 TO Q 1 ", BUFFER );
- TEXT_IO.PUT_LINE( "TA1 - message_queue_send - BUFFER 3 TO Q 1" );
- RTEMS.MESSAGE_QUEUE_SEND(
- SPTEST.QUEUE_ID( 1 ),
- BUFFER_POINTER,
- 16,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_SEND" );
-
- TEXT_IO.PUT_LINE( "TA1 - task_wake_after - sleep 5 seconds" );
- RTEMS.TASK_WAKE_AFTER( 5 * TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
-TEST_SUPPORT.PAUSE;
-
- SPTEST.FILL_BUFFER( "BUFFER 1 TO Q 2 ", BUFFER );
- TEXT_IO.PUT_LINE( "TA1 - message_queue_send - BUFFER 1 TO Q 2" );
- RTEMS.MESSAGE_QUEUE_SEND(
- SPTEST.QUEUE_ID( 2 ),
- BUFFER_POINTER,
- 16,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_SEND" );
-
- TEXT_IO.PUT(
- "TA1 - message_queue_receive - receive from queue 1 - "
- );
- TEXT_IO.PUT_LINE( "10 second timeout" );
- RTEMS.MESSAGE_QUEUE_RECEIVE(
- SPTEST.QUEUE_ID( 1 ),
- BUFFER_POINTER,
- RTEMS.DEFAULT_OPTIONS,
- 10 * TEST_SUPPORT.TICKS_PER_SECOND,
- MESSAGE_SIZE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_RECEIVE" );
- TEXT_IO.PUT( "TA1 - buffer received: " );
- SPTEST.PUT_BUFFER( BUFFER );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT_LINE( "TA1 - task_delete - delete TA2" );
- RTEMS.TASK_DELETE( SPTEST.TASK_ID( 2 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE" );
-
- SPTEST.FILL_BUFFER( "BUFFER 1 TO Q 3 ", BUFFER );
- TEXT_IO.PUT_LINE( "TA1 - message_queue_send - BUFFER 1 TO Q 3" );
- RTEMS.MESSAGE_QUEUE_SEND(
- SPTEST.QUEUE_ID( 3 ),
- BUFFER_POINTER,
- 16,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_SEND" );
-
- TEXT_IO.PUT_LINE( "TA1 - task_wake_after - sleep 5 seconds" );
- RTEMS.TASK_WAKE_AFTER( 5 * TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
-TEST_SUPPORT.PAUSE;
-
- SPTEST.FILL_BUFFER( "BUFFER 2 TO Q 3 ", BUFFER );
- TEXT_IO.PUT_LINE( "TA1 - message_queue_send - BUFFER 2 TO Q 3" );
- RTEMS.MESSAGE_QUEUE_SEND(
- SPTEST.QUEUE_ID( 3 ),
- BUFFER_POINTER,
- 16,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_SEND" );
-
- SPTEST.FILL_BUFFER( "BUFFER 3 TO Q 3 ", BUFFER );
- TEXT_IO.PUT_LINE( "TA1 - message_queue_send - BUFFER 3 TO Q 3" );
- RTEMS.MESSAGE_QUEUE_SEND(
- SPTEST.QUEUE_ID( 3 ),
- BUFFER_POINTER,
- 16,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_SEND" );
-
- SPTEST.FILL_BUFFER( "BUFFER 4 TO Q 3 ", BUFFER );
- TEXT_IO.PUT_LINE( "TA1 - message_queue_send - BUFFER 4 TO Q 3" );
- RTEMS.MESSAGE_QUEUE_SEND(
- SPTEST.QUEUE_ID( 3 ),
- BUFFER_POINTER,
- 16,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_SEND" );
-
- SPTEST.FILL_BUFFER( "BUFFER 5 TO Q 3 ", BUFFER );
- TEXT_IO.PUT_LINE( "TA1 - message_queue_urgent - BUFFER 5 TO Q 3" );
- RTEMS.MESSAGE_QUEUE_URGENT(
- SPTEST.QUEUE_ID( 3 ),
- BUFFER_POINTER,
- 16,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_URGENT" );
-
- for TIMES in 1 .. 4
- loop
- TEXT_IO.PUT(
- "TA1 - message_queue_receive - receive from queue 3 - "
- );
- TEXT_IO.PUT_LINE( "WAIT FOREVER" );
- RTEMS.MESSAGE_QUEUE_RECEIVE(
- SPTEST.QUEUE_ID( 3 ),
- BUFFER_POINTER,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- MESSAGE_SIZE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_RECEIVE" );
- TEXT_IO.PUT( "TA1 - buffer received: " );
- SPTEST.PUT_BUFFER( BUFFER );
- TEXT_IO.NEW_LINE;
- end loop;
-
- SPTEST.FILL_BUFFER( "BUFFER 3 TO Q 2 ", BUFFER );
- TEXT_IO.PUT_LINE( "TA1 - message_queue_urgent - BUFFER 3 TO Q 2" );
- RTEMS.MESSAGE_QUEUE_URGENT(
- SPTEST.QUEUE_ID( 2 ),
- BUFFER_POINTER,
- 16,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_URGENT" );
-
- TEXT_IO.PUT(
- "TA1 - message_queue_receive - receive from queue 2 - "
- );
- TEXT_IO.PUT_LINE( "WAIT FOREVER" );
- RTEMS.MESSAGE_QUEUE_RECEIVE(
- SPTEST.QUEUE_ID( 2 ),
- BUFFER_POINTER,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- MESSAGE_SIZE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_RECEIVE" );
- TEXT_IO.PUT( "TA1 - buffer received: " );
- SPTEST.PUT_BUFFER( BUFFER );
- TEXT_IO.NEW_LINE;
-
-TEST_SUPPORT.PAUSE;
-
- TEXT_IO.PUT_LINE( "TA1 - message_queue_delete - delete queue 1" );
- RTEMS.MESSAGE_QUEUE_DELETE( SPTEST.QUEUE_ID( 1 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_DELETE" );
-
- SPTEST.FILL_BUFFER( "BUFFER 3 TO Q 2 ", BUFFER );
- TEXT_IO.PUT_LINE( "TA1 - message_queue_urgent - BUFFER 3 TO Q 2" );
- RTEMS.MESSAGE_QUEUE_URGENT(
- SPTEST.QUEUE_ID( 2 ),
- BUFFER_POINTER,
- 16,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_URGENT" );
-
- TEXT_IO.PUT_LINE( "TA1 - message_queue_delete - delete queue 2" );
- RTEMS.MESSAGE_QUEUE_DELETE( SPTEST.QUEUE_ID( 2 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_DELETE" );
-
- TEXT_IO.PUT_LINE( "TA1 - message_queue_flush - empty Q 3" );
- RTEMS.MESSAGE_QUEUE_FLUSH( SPTEST.QUEUE_ID( 3 ), COUNT, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_FLUSH" );
- TEXT_IO.PUT( "TA1 - " );
- UNSIGNED32_IO.PUT( COUNT, WIDTH => 3, BASE => 10 );
- TEXT_IO.PUT_LINE( " messages were flushed from Q 3" );
-
- SPTEST.FILL_BUFFER( "BUFFER 1 TO Q 3 ", BUFFER );
- TEXT_IO.PUT_LINE( "TA1 - message_queue_send - BUFFER 1 TO Q 3" );
- RTEMS.MESSAGE_QUEUE_SEND(
- SPTEST.QUEUE_ID( 3 ),
- BUFFER_POINTER,
- 16,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_SEND" );
-
- SPTEST.FILL_BUFFER( "BUFFER 2 TO Q 3 ", BUFFER );
- TEXT_IO.PUT_LINE( "TA1 - message_queue_send - BUFFER 2 TO Q 3" );
- RTEMS.MESSAGE_QUEUE_SEND(
- SPTEST.QUEUE_ID( 3 ),
- BUFFER_POINTER,
- 16,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_SEND" );
-
- SPTEST.FILL_BUFFER( "BUFFER 3 TO Q 3 ", BUFFER );
- TEXT_IO.PUT_LINE( "TA1 - message_queue_send - BUFFER 3 TO Q 3" );
- RTEMS.MESSAGE_QUEUE_SEND(
- SPTEST.QUEUE_ID( 3 ),
- BUFFER_POINTER,
- 16,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_SEND" );
-
- TEXT_IO.PUT_LINE( "TA1 - message_queue_flush - Q 3" );
- RTEMS.MESSAGE_QUEUE_FLUSH( SPTEST.QUEUE_ID( 3 ), COUNT, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_FLUSH" );
- TEXT_IO.PUT( "TA1 - " );
- UNSIGNED32_IO.PUT( COUNT, WIDTH => 3, BASE => 10 );
- TEXT_IO.PUT_LINE( " messages were flushed from Q 3" );
-
- TEXT_IO.PUT_LINE(
- "TA1 - message_queue_send - until all message buffers consumed"
- );
- loop
-
- RTEMS.MESSAGE_QUEUE_SEND(
- SPTEST.QUEUE_ID( 3 ),
- BUFFER_POINTER,
- 16,
- STATUS
- );
-
- exit when RTEMS.ARE_STATUSES_EQUAL( STATUS, RTEMS.TOO_MANY );
-
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_SEND" );
-
- end loop;
-
- TEXT_IO.PUT_LINE(
- "TA1 - message_queue_send - all message buffers consumed"
- );
-
- TEXT_IO.PUT_LINE( "TA1 - message_queue_flush - Q 3" );
- RTEMS.MESSAGE_QUEUE_FLUSH( SPTEST.QUEUE_ID( 3 ), COUNT, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_FLUSH" );
- TEXT_IO.PUT( "TA1 - " );
- UNSIGNED32_IO.PUT( COUNT, WIDTH => 3, BASE => 10 );
- TEXT_IO.PUT_LINE( " messages were flushed from Q 3" );
-
- TEXT_IO.PUT( "TA1 - ERROR - " );
- UNSIGNED32_IO.PUT( COUNT, WIDTH => 3, BASE => 10 );
- TEXT_IO.PUT_LINE( " messages flushed" );
-
- TEXT_IO.PUT_LINE( "*** END OF TEST 13 ***" );
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end TASK_1;
-
---PAGE
---
--- TASK_2
---
-
- procedure TASK_2 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- BUFFER : SPTEST.BUFFER;
- BUFFER_POINTER : RTEMS.ADDRESS;
- PREVIOUS_PRIORITY : RTEMS.TASK_PRIORITY;
- MESSAGE_SIZE : RTEMS.UNSIGNED32;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- BUFFER_POINTER := BUFFER'ADDRESS;
-
- TEXT_IO.PUT_LINE(
- "TA2 - message_queue_receive - receive from queue 1 - NO_WAIT"
- );
- RTEMS.MESSAGE_QUEUE_RECEIVE(
- SPTEST.QUEUE_ID( 1 ),
- BUFFER_POINTER,
- RTEMS.NO_WAIT,
- RTEMS.NO_TIMEOUT,
- MESSAGE_SIZE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_RECEIVE" );
- TEXT_IO.PUT( "TA2 - buffer received: " );
- SPTEST.PUT_BUFFER( BUFFER );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT_LINE(
- "TA2 - message_queue_receive - receive from queue 1 - WAIT FOREVER"
- );
- RTEMS.MESSAGE_QUEUE_RECEIVE(
- SPTEST.QUEUE_ID( 1 ),
- BUFFER_POINTER,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- MESSAGE_SIZE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_RECEIVE" );
- TEXT_IO.PUT( "TA2 - buffer received: " );
- SPTEST.PUT_BUFFER( BUFFER );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT_LINE(
- "TA2 - message_queue_receive - receive from queue 1 - WAIT FOREVER"
- );
- RTEMS.MESSAGE_QUEUE_RECEIVE(
- SPTEST.QUEUE_ID( 1 ),
- BUFFER_POINTER,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- MESSAGE_SIZE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_RECEIVE" );
- TEXT_IO.PUT( "TA2 - buffer received: " );
- SPTEST.PUT_BUFFER( BUFFER );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT_LINE(
- "TA2 - task_set_priority - make self highest priority task"
- );
- RTEMS.TASK_SET_PRIORITY(
- RTEMS.SELF,
- 3,
- PREVIOUS_PRIORITY,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SET_PRIORITY" );
-
- TEXT_IO.PUT_LINE(
- "TA2 - message_queue_receive - receive from queue 2 - WAIT FOREVER"
- );
- RTEMS.MESSAGE_QUEUE_RECEIVE(
- SPTEST.QUEUE_ID( 2 ),
- BUFFER_POINTER,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- MESSAGE_SIZE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_RECEIVE" );
- TEXT_IO.PUT( "TA2 - buffer received: " );
- SPTEST.PUT_BUFFER( BUFFER );
- TEXT_IO.NEW_LINE;
-
- SPTEST.FILL_BUFFER( "BUFFER 2 TO Q 2 ", BUFFER );
- TEXT_IO.PUT_LINE( "TA2 - message_queue_send - BUFFER 2 TO Q 2" );
- RTEMS.MESSAGE_QUEUE_SEND(
- SPTEST.QUEUE_ID( 2 ),
- BUFFER_POINTER,
- 16,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_SEND" );
-
- TEXT_IO.PUT_LINE(
- "TA2 - message_queue_receive - receive from queue 1 - 10 second timeout"
- );
- RTEMS.MESSAGE_QUEUE_RECEIVE(
- SPTEST.QUEUE_ID( 1 ),
- BUFFER_POINTER,
- RTEMS.DEFAULT_OPTIONS,
- 10 * TEST_SUPPORT.TICKS_PER_SECOND,
- MESSAGE_SIZE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_RECEIVE" );
- TEXT_IO.PUT( "TA2 - buffer received: " );
- SPTEST.PUT_BUFFER( BUFFER );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT_LINE(
- "TA2 - message_queue_receive - receive from queue 3 - WAIT FOREVER"
- );
- RTEMS.MESSAGE_QUEUE_RECEIVE(
- SPTEST.QUEUE_ID( 3 ),
- BUFFER_POINTER,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- MESSAGE_SIZE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_RECEIVE" );
- TEXT_IO.PUT( "TA2 - buffer received: " );
- SPTEST.PUT_BUFFER( BUFFER );
- TEXT_IO.NEW_LINE;
-
- end TASK_2;
-
---PAGE
---
--- TASK_3
---
-
- procedure TASK_3 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- BUFFER : SPTEST.BUFFER;
- BUFFER_POINTER : RTEMS.ADDRESS;
- COUNT : RTEMS.UNSIGNED32;
- MESSAGE_SIZE : RTEMS.UNSIGNED32;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- BUFFER_POINTER := BUFFER'ADDRESS;
-
- TEXT_IO.PUT_LINE(
- "TA3 - message_queue_receive - receive from queue 2 - WAIT FOREVER"
- );
- RTEMS.MESSAGE_QUEUE_RECEIVE(
- SPTEST.QUEUE_ID( 2 ),
- BUFFER_POINTER,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- MESSAGE_SIZE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_RECEIVE" );
- TEXT_IO.PUT( "TA3 - buffer received: " );
- SPTEST.PUT_BUFFER( BUFFER );
- TEXT_IO.NEW_LINE;
-
- SPTEST.FILL_BUFFER( "BUFFER 3 TO Q 1 ", BUFFER );
- TEXT_IO.PUT_LINE( "TA3 - message_queue_broadcast - BUFFER 3 TO Q 1" );
- RTEMS.MESSAGE_QUEUE_BROADCAST(
- SPTEST.QUEUE_ID( 1 ),
- BUFFER_POINTER,
- 16,
- COUNT,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_BROADCAST" );
- TEXT_IO.PUT( "TA3 - number of tasks awakened = " );
- UNSIGNED32_IO.PUT( COUNT, WIDTH => 3, BASE => 10 );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT_LINE(
- "TA3 - message_queue_receive - receive from queue 3 - WAIT FOREVER"
- );
- RTEMS.MESSAGE_QUEUE_RECEIVE(
- SPTEST.QUEUE_ID( 3 ),
- BUFFER_POINTER,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- MESSAGE_SIZE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_RECEIVE" );
- TEXT_IO.PUT( "TA3 - buffer received: " );
- SPTEST.PUT_BUFFER( BUFFER );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT_LINE( "TA3 - task_delete - delete self" );
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end TASK_3;
-
-end SPTEST;
diff --git a/c/src/ada-tests/sptests/sp13/sptest.ads b/c/src/ada-tests/sptests/sp13/sptest.ads
deleted file mode 100644
index cf53004c3d..0000000000
--- a/c/src/ada-tests/sptests/sp13/sptest.ads
+++ /dev/null
@@ -1,132 +0,0 @@
---
--- SPTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 13 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-package SPTEST is
-
---
--- Buffer Record similar to that used by RTEMS 3.2.1. Using this
--- avoids changes to the test.
---
-
- type BUFFER is
- record
- FIELD1 : RTEMS.NAME; -- TEMPORARY UNTIL VARIABLE LENGTH
- FIELD2 : RTEMS.NAME;
- FIELD3 : RTEMS.NAME;
- FIELD4 : RTEMS.NAME;
- end record;
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
- TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS message
--- queues created by this test.
---
-
- QUEUE_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
- QUEUE_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- FILL_BUFFER
---
--- DESCRIPTION:
---
--- This subprogram takes the SOURCE input string and places
--- up to the first sixteen characters of that string into
--- the message BUFFER.
---
-
- procedure FILL_BUFFER (
- SOURCE : in STRING;
- BUFFER : out SPTEST.BUFFER
- );
-
---
--- PUT_BUFFER
---
--- DESCRIPTION:
---
--- This subprogram prints the specified message BUFFER.
---
-
- procedure PUT_BUFFER (
- BUFFER : in SPTEST.BUFFER
- );
-
---
--- TASK_1
---
--- DESCRIPTION:
---
--- This RTEMS task tests the Message Queue Manager.
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_2
---
--- DESCRIPTION:
---
--- This RTEMS task tests the Message Queue Manager.
---
-
- procedure TASK_2 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_3
---
--- DESCRIPTION:
---
--- This RTEMS task tests the Message Queue Manager.
---
-
- procedure TASK_3 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end SPTEST;
diff --git a/c/src/ada-tests/sptests/sp14/config.h b/c/src/ada-tests/sptests/sp14/config.h
deleted file mode 100644
index ed43b85e09..0000000000
--- a/c/src/ada-tests/sptests/sp14/config.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MAXIMUM_TIMERS 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 100
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/sptests/sp14/sp14.adb b/c/src/ada-tests/sptests/sp14/sp14.adb
deleted file mode 100644
index 5f6d0819c0..0000000000
--- a/c/src/ada-tests/sptests/sp14/sp14.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test SP14 of the Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with SPTEST;
-with TEST_SUPPORT;
-
-procedure SP14 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- SPTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end SP14;
-
diff --git a/c/src/ada-tests/sptests/sp14/sp14.scn b/c/src/ada-tests/sptests/sp14/sp14.scn
deleted file mode 100644
index 5f2cfd70c7..0000000000
--- a/c/src/ada-tests/sptests/sp14/sp14.scn
+++ /dev/null
@@ -1,33 +0,0 @@
-*** TEST 14 ***
-TA1 - signal_catch - INTERRUPT_LEVEL( 3 )
-TA1 - signal_send - SIGNAL_16 to self
-ASR - ENTRY - signal => 16#10000#
-ASR - EXIT - signal => 16#10000#
-TA1 - signal_send - SIGNAL_0 to self
-ASR - ENTRY - signal => 16#1#
-ASR - task_wake_after - yield processor
-TA2 - signal_send - SIGNAL_17 to TA1
-TA2 - task_wake_after - yield processor
-ASR - ENTRY - signal => 16#20000#
-ASR - EXIT - signal => 16#20000#
-ASR - EXIT - signal => 16#1#
-TA1 - signal_catch - NO_ASR
-<pause>
-TA1 - signal_send - SIGNAL_1 to self
-ASR - ENTRY - signal => 16#2#
-ASR - task_wake_after - yield processor
-TA2 - signal_send - SIGNAL_18 and SIGNAL_19 to TA1
-TA2 - task_wake_after - yield processor
-ASR - EXIT - signal => 16#2#
-ASR - ENTRY - signal => 16#C0000#
-ASR - EXIT - signal => 16#C0000#
-TA1 - task_mode - disable ASRs
-TA1 - sending signal to SELF from timer
-TA1 - waiting for signal to arrive
-TA1 - timer routine got the correct arguments
-TA1 - task_mode - enable ASRs
-ASR - ENTRY - signal => 16#8#
-ASR - EXIT - signal => 16#8#
-TA1 - signal_catch - ASR ADDRESS of NULL
-TA1 - task_delete - delete self
-*** END OF TEST 14 ***
diff --git a/c/src/ada-tests/sptests/sp14/sptest.adb b/c/src/ada-tests/sptests/sp14/sptest.adb
deleted file mode 100644
index d52d0dff15..0000000000
--- a/c/src/ada-tests/sptests/sp14/sptest.adb
+++ /dev/null
@@ -1,330 +0,0 @@
---
--- SPTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 14 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with ADDRESS_IO;
-with RTEMS;
-with TEST_SUPPORT;
-with TEXT_IO;
-with UNSIGNED32_IO;
-with INTERFACES; use INTERFACES;
-
-package body SPTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- TIME : RTEMS.TIME_OF_DAY;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TEST 14 ***" );
-
- SPTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME( 'T', 'A', '1', ' ' );
- SPTEST.TASK_NAME( 2 ) := RTEMS.BUILD_NAME( 'T', 'A', '2', ' ' );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 1 ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE * 2,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA1" );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 2 ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE * 2,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 2 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA2" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 1 ),
- SPTEST.TASK_1'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA1" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 2 ),
- SPTEST.TASK_2'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA2" );
-
- SPTEST.TIMER_NAME( 1 ) := RTEMS.BUILD_NAME( 'T', 'M', '1', ' ' );
-
- RTEMS.TIMER_CREATE(
- SPTEST.TIMER_NAME( 1 ),
- SPTEST.TIMER_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_CREATE OF TM1" );
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- SIGNAL_3_TO_TASK_1
---
-
- procedure SIGNAL_3_TO_TASK_1 (
- ID : in RTEMS.ID;
- POINTER : in RTEMS.ADDRESS
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.SIGNAL_SEND( SPTEST.TASK_ID( 1 ), RTEMS.SIGNAL_3, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SIGNAL_SEND of 3" );
-
- SPTEST.TIMER_GOT_THIS_ID := ID;
- SPTEST.TIMER_GOT_THIS_POINTER := POINTER;
-
- SPTEST.SIGNAL_SENT := TRUE;
-
- end SIGNAL_3_TO_TASK_1;
-
---PAGE
---
--- TASK_1
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- PREVIOUS_MODE : RTEMS.MODE;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.PUT_LINE( "TA1 - signal_catch - INTERRUPT_LEVEL( 3 )" );
- RTEMS.SIGNAL_CATCH(
- SPTEST.PROCESS_ASR'ACCESS,
- RTEMS.INTERRUPT_LEVEL( 3 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SIGNAL_CATCH INTERRUPT(3)" );
-
- TEXT_IO.PUT_LINE( "TA1 - signal_send - SIGNAL_16 to self" );
- RTEMS.SIGNAL_SEND( RTEMS.SELF, RTEMS.SIGNAL_16, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED(
- STATUS,
- "SIGNAL_SEND - SIGNAL_16 to SELF"
- );
-
- TEXT_IO.PUT_LINE( "TA1 - signal_send - SIGNAL_0 to self" );
- RTEMS.SIGNAL_SEND( RTEMS.SELF, RTEMS.SIGNAL_0, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED(
- STATUS,
- "SIGNAL_SEND - SIGNAL_0 to SELF"
- );
-
- TEXT_IO.PUT_LINE( "TA1 - signal_catch - NO_ASR" );
- RTEMS.SIGNAL_CATCH(SPTEST.PROCESS_ASR'ACCESS, RTEMS.NO_ASR, STATUS);
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SIGNAL_CATCH - NO_ASR" );
-
- TEST_SUPPORT.PAUSE;
-
- TEXT_IO.PUT_LINE( "TA1 - signal_send - SIGNAL_1 to self" );
- RTEMS.SIGNAL_SEND( RTEMS.SELF, RTEMS.SIGNAL_1, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED(
- STATUS,
- "SIGNAL_SEND - SIGNAL_1 to SELF"
- );
-
- TEXT_IO.PUT_LINE( "TA1 - task_mode - disable ASRs" );
- RTEMS.TASK_MODE(
- RTEMS.NO_ASR,
- RTEMS.ASR_MASK,
- PREVIOUS_MODE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_MODE" );
-
- SPTEST.TIMER_GOT_THIS_ID := 0;
- SPTEST.TIMER_GOT_THIS_POINTER := RTEMS.NULL_ADDRESS;
-
- TEXT_IO.PUT_LINE( "TA1 - sending signal to SELF from timer" );
- RTEMS.TIMER_FIRE_AFTER(
- SPTEST.TIMER_ID( 1 ),
- TEST_SUPPORT.TICKS_PER_SECOND / 2,
- SPTEST.SIGNAL_3_TO_TASK_1'ACCESS,
- SPTEST.TASK_1'ADDRESS,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_FIRE_AFTER" );
-
- TEXT_IO.PUT_LINE( "TA1 - waiting for signal to arrive" );
-
- SPTEST.SIGNAL_SENT := FALSE;
- SPTEST.ASR_FIRED := FALSE;
-
- loop
- exit when SPTEST.SIGNAL_SENT = TRUE;
- end loop;
-
- if SPTEST.TIMER_GOT_THIS_ID = SPTEST.TIMER_ID( 1 ) and then
- RTEMS.ARE_EQUAL(SPTEST.TIMER_GOT_THIS_POINTER,
- SPTEST.TASK_1'ADDRESS) then
-
- TEXT_IO.PUT_LINE( "TA1 - timer routine got the correct arguments" );
-
- else
-
- TEXT_IO.PUT( "TA1 - timer got (" );
- UNSIGNED32_IO.PUT( SPTEST.TIMER_GOT_THIS_ID );
- TEXT_IO.PUT( "," );
- ADDRESS_IO.PUT( SPTEST.TIMER_GOT_THIS_POINTER );
- TEXT_IO.PUT( ") instead of (" );
- UNSIGNED32_IO.PUT( SPTEST.TIMER_ID( 1 ) );
- TEXT_IO.PUT( "," );
- ADDRESS_IO.PUT( SPTEST.TASK_1'ADDRESS );
- TEXT_IO.PUT_LINE( ")!!!!" );
-
- end if;
-
- TEXT_IO.PUT_LINE( "TA1 - task_mode - enable ASRs" );
- RTEMS.TASK_MODE(
- RTEMS.ASR,
- RTEMS.ASR_MASK,
- PREVIOUS_MODE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_MODE" );
-
- TEXT_IO.PUT_LINE( "TA1 - signal_catch - ASR ADDRESS of NULL" );
- RTEMS.SIGNAL_CATCH( NULL, RTEMS.DEFAULT_MODES, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED(
- STATUS,
- "SIGNAL_CATCH - NULL ADDRESS"
- );
-
- TEXT_IO.PUT_LINE( "TA1 - task_delete - delete self" );
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end TASK_1;
-
---PAGE
---
--- TASK_2
---
-
- procedure TASK_2 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.PUT_LINE( "TA2 - signal_send - SIGNAL_17 to TA1" );
- RTEMS.SIGNAL_SEND( SPTEST.TASK_ID( 1 ), RTEMS.SIGNAL_17, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED(
- STATUS,
- "SIGNAL_SEND - SIGNAL_17 to TA1"
- );
-
- TEXT_IO.PUT_LINE( "TA2 - task_wake_after - yield processor" );
- RTEMS.TASK_WAKE_AFTER( RTEMS.YIELD_PROCESSOR, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER YIELD" );
-
- TEXT_IO.PUT_LINE(
- "TA2 - signal_send - SIGNAL_18 and SIGNAL_19 to TA1"
- );
- RTEMS.SIGNAL_SEND(
- SPTEST.TASK_ID( 1 ),
- RTEMS.SIGNAL_18 + RTEMS.SIGNAL_19,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED(
- STATUS,
- "SIGNAL_SEND - SIGNAL_18 and SIGNAL_19 to TA1"
- );
-
- TEXT_IO.PUT_LINE( "TA2 - task_wake_after - yield processor" );
- RTEMS.TASK_WAKE_AFTER( RTEMS.YIELD_PROCESSOR, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER YIELD" );
-
- TEXT_IO.PUT_LINE( "*** END OF TEST 14 ***" );
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end TASK_2;
-
---PAGE
---
--- PROCESS_ASR
---
-
- procedure PROCESS_ASR (
- THE_SIGNAL_SET : in RTEMS.SIGNAL_SET
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.PUT( "ASR - ENTRY - signal => " );
- UNSIGNED32_IO.PUT( THE_SIGNAL_SET, BASE => 16, WIDTH => 8 );
- TEXT_IO.NEW_LINE;
-
- if THE_SIGNAL_SET = RTEMS.SIGNAL_16 or else
- THE_SIGNAL_SET = RTEMS.SIGNAL_17 or else
- THE_SIGNAL_SET = RTEMS.SIGNAL_18 + RTEMS.SIGNAL_19 then
- NULL;
-
- elsif THE_SIGNAL_SET = RTEMS.SIGNAL_0 or else
- THE_SIGNAL_SET = RTEMS.SIGNAL_1 then
- TEXT_IO.PUT_LINE( "ASR - task_wake_after - yield processor" );
- RTEMS.TASK_WAKE_AFTER( RTEMS.YIELD_PROCESSOR, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED(
- STATUS,
- "TASK_WAKE_AFTER YIELD"
- );
-
- elsif THE_SIGNAL_SET = RTEMS.SIGNAL_3 then
-
- SPTEST.ASR_FIRED := TRUE;
-
- end if;
-
- TEXT_IO.PUT( "ASR - EXIT - signal => " );
- UNSIGNED32_IO.PUT( THE_SIGNAL_SET, BASE => 16, WIDTH => 8 );
- TEXT_IO.NEW_LINE;
-
- end PROCESS_ASR;
-
-end SPTEST;
diff --git a/c/src/ada-tests/sptests/sp14/sptest.ads b/c/src/ada-tests/sptests/sp14/sptest.ads
deleted file mode 100644
index d44d9d1b9b..0000000000
--- a/c/src/ada-tests/sptests/sp14/sptest.ads
+++ /dev/null
@@ -1,131 +0,0 @@
---
--- SPTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 14 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-package SPTEST is
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.ID;
- TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.NAME;
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS timers created
--- by this test.
---
-
- TIMER_ID : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.ID;
- TIMER_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.NAME;
-
---
--- SIGNAL_SENT is set to TRUE to indicate that a signal set has
--- been sent from an ISR to the executing task.
---
-
- SIGNAL_SENT : BOOLEAN;
- pragma volatile( SIGNAL_SENT );
-
---
--- These hold the arguments passed to the timer service routine.
---
-
- TIMER_GOT_THIS_ID : RTEMS.ID;
- pragma volatile( TIMER_GOT_THIS_ID );
-
- TIMER_GOT_THIS_POINTER : RTEMS.ADDRESS;
- pragma volatile( TIMER_GOT_THIS_POINTER );
-
---
--- ASR_FIRED is set to TRUE to indicate that the ASR has executed
--- and was passed the correct signal set.
---
-
- ASR_FIRED : BOOLEAN;
- pragma volatile( ASR_FIRED );
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- SIGNAL_3_TO_TASK_1
---
--- DESCRIPTION:
---
--- This subprogram sends signal 3 to TASK_1.
---
-
- procedure SIGNAL_3_TO_TASK_1 (
- ID : in RTEMS.ID;
- POINTER : in RTEMS.ADDRESS
- );
-
---
--- PROCESS_ASR
---
--- DESCRIPTION:
---
--- This subprogram is an ASR for TASK_1.
---
-
- procedure PROCESS_ASR (
- THE_SIGNAL_SET : in RTEMS.SIGNAL_SET
- );
-
---
--- TASK_1
---
--- DESCRIPTION:
---
--- This RTEMS task tests the Signal Manager.
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_2
---
--- DESCRIPTION:
---
--- This RTEMS task tests the Signal Manager.
---
-
- procedure TASK_2 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end SPTEST;
diff --git a/c/src/ada-tests/sptests/sp15/config.h b/c/src/ada-tests/sptests/sp15/config.h
deleted file mode 100644
index 8325035a0e..0000000000
--- a/c/src/ada-tests/sptests/sp15/config.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MAXIMUM_PARTITIONS 2
-#define CONFIGURE_TICKS_PER_TIMESLICE 100
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/sptests/sp15/sp15.adb b/c/src/ada-tests/sptests/sp15/sp15.adb
deleted file mode 100644
index a848d60d0b..0000000000
--- a/c/src/ada-tests/sptests/sp15/sp15.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test SP15 of the Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with SPTEST;
-with TEST_SUPPORT;
-
-procedure SP15 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- SPTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end SP15;
-
diff --git a/c/src/ada-tests/sptests/sp15/sp15.scn b/c/src/ada-tests/sptests/sp15/sp15.scn
deleted file mode 100644
index a0aa0e8149..0000000000
--- a/c/src/ada-tests/sptests/sp15/sp15.scn
+++ /dev/null
@@ -1,16 +0,0 @@
-*** TEST 15 ***
-INIT - partition_create - partition 1
-INIT - partition_create - partition 2
-TA1 - partition_ident - partition 1 id = 16#10001#
-TA1 - partition_ident - partition 2 id = 16#10002#
-TA1 - partition_get_buffer - get buffer 1 from partition 1 - 16#0#
-TA1 - partition_get_buffer - get buffer 2 from partition 1 - 16#200#
-TA1 - partition_get_buffer - get buffer 1 from partition 2 - 16#0#
-TA1 - partition_get_buffer - get buffer 2 from partition 2 - 16#80#
-TA1 - partition_return_buffer - return buffer 1 to partition 1 - 16#0#
-TA1 - partition_return_buffer - return buffer 2 to partition 1 - 16#200#
-TA1 - partition_return_buffer - return buffer 1 to partition 2 - 16#0#
-TA1 - partition_return_buffer - return buffer 2 to partition 2 - 16#80#
-TA1 - partition_delete - delete partition 1
-TA1 - partition_delete - delete partition 2
-*** END OF TEST 15 ***
diff --git a/c/src/ada-tests/sptests/sp15/sptest.adb b/c/src/ada-tests/sptests/sp15/sptest.adb
deleted file mode 100644
index b4835c5210..0000000000
--- a/c/src/ada-tests/sptests/sp15/sptest.adb
+++ /dev/null
@@ -1,284 +0,0 @@
---
--- SPTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 15 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with TEST_SUPPORT;
-with TEXT_IO;
-with UNSIGNED32_IO;
-
-package body SPTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TEST 15 ***" );
-
- SPTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME( 'T', 'A', '1', ' ' );
-
- SPTEST.PARTITION_NAME( 1 ) := RTEMS.BUILD_NAME( 'P', 'T', '1', ' ' );
- SPTEST.PARTITION_NAME( 2 ) := RTEMS.BUILD_NAME( 'P', 'T', '2', ' ' );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 1 ),
- 4,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA1" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 1 ),
- SPTEST.TASK_1'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA1" );
-
- TEXT_IO.PUT_LINE( "INIT - partition_create - partition 1" );
- RTEMS.PARTITION_CREATE(
- SPTEST.PARTITION_NAME( 1 ),
- AREA_1'ADDRESS,
- 4096,
- 512,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.PARTITION_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "PARTITION_CREATE OF PT1" );
-
- TEXT_IO.PUT_LINE( "INIT - partition_create - partition 2" );
- RTEMS.PARTITION_CREATE(
- SPTEST.PARTITION_NAME( 2 ),
- AREA_2'ADDRESS,
- 274,
- 128,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.PARTITION_ID( 2 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "PARTITION_CREATE OF PT2" );
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- PUT_ADDRESS_FROM_AREA_1
---
-
- procedure PUT_ADDRESS_FROM_AREA_1 (
- TO_BE_PRINTED : in RTEMS.ADDRESS
- ) is
-
- begin
-
- UNSIGNED32_IO.PUT(
- RTEMS.SUBTRACT( TO_BE_PRINTED, SPTEST.AREA_1'ADDRESS ),
- WIDTH => 8,
- BASE => 16
- );
-
- end PUT_ADDRESS_FROM_AREA_1;
-
---PAGE
---
--- PUT_ADDRESS_FROM_AREA_2
---
-
- procedure PUT_ADDRESS_FROM_AREA_2 (
- TO_BE_PRINTED : in RTEMS.ADDRESS
- ) is
- begin
-
- UNSIGNED32_IO.PUT(
- RTEMS.SUBTRACT( TO_BE_PRINTED, SPTEST.AREA_2'ADDRESS ),
- WIDTH => 8,
- BASE => 16
- );
-
- end PUT_ADDRESS_FROM_AREA_2;
-
---PAGE
---
--- TASK_1
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- PTID_1 : RTEMS.ID;
- PTID_2 : RTEMS.ID;
- BUFFER_ADDRESS_1 : RTEMS.ADDRESS;
- BUFFER_ADDRESS_2 : RTEMS.ADDRESS;
- BUFFER_ADDRESS_3 : RTEMS.ADDRESS;
- BUFFER_ADDRESS_4 : RTEMS.ADDRESS;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.PUT( "TA1 - partition_ident - partition 1 id = " );
- RTEMS.PARTITION_IDENT(
- SPTEST.PARTITION_NAME( 1 ),
- RTEMS.SEARCH_ALL_NODES,
- PTID_1,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "PARTITION_IDENT OF PT1" );
- UNSIGNED32_IO.PUT( PTID_1, WIDTH => 8, BASE => 16 );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT( "TA1 - partition_ident - partition 2 id = " );
- RTEMS.PARTITION_IDENT(
- SPTEST.PARTITION_NAME( 2 ),
- RTEMS.SEARCH_ALL_NODES,
- PTID_2,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "PARTITION_IDENT OF PT2" );
- UNSIGNED32_IO.PUT( PTID_2, WIDTH => 8, BASE => 16 );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT(
- "TA1 - partition_get_buffer - get buffer 1 from partition 1 - "
- );
- RTEMS.PARTITION_GET_BUFFER(
- SPTEST.PARTITION_ID( 1 ),
- BUFFER_ADDRESS_1,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "PARTITION_GET_BUFFER" );
- SPTEST.PUT_ADDRESS_FROM_AREA_1( BUFFER_ADDRESS_1 );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT(
- "TA1 - partition_get_buffer - get buffer 2 from partition 1 - "
- );
- RTEMS.PARTITION_GET_BUFFER(
- SPTEST.PARTITION_ID( 1 ),
- BUFFER_ADDRESS_2,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "PARTITION_GET_BUFFER" );
- SPTEST.PUT_ADDRESS_FROM_AREA_1( BUFFER_ADDRESS_2 );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT(
- "TA1 - partition_get_buffer - get buffer 1 from partition 2 - "
- );
- RTEMS.PARTITION_GET_BUFFER(
- SPTEST.PARTITION_ID( 2 ),
- BUFFER_ADDRESS_3,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "PARTITION_GET_BUFFER" );
- SPTEST.PUT_ADDRESS_FROM_AREA_2( BUFFER_ADDRESS_3 );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT(
- "TA1 - partition_get_buffer - get buffer 2 from partition 2 - "
- );
- RTEMS.PARTITION_GET_BUFFER(
- SPTEST.PARTITION_ID( 2 ),
- BUFFER_ADDRESS_4,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "PARTITION_GET_BUFFER" );
- SPTEST.PUT_ADDRESS_FROM_AREA_2( BUFFER_ADDRESS_4 );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT(
- "TA1 - partition_return_buffer - return buffer 1 to partition 1 - "
- );
- SPTEST.PUT_ADDRESS_FROM_AREA_1( BUFFER_ADDRESS_1 );
- TEXT_IO.NEW_LINE;
- RTEMS.PARTITION_RETURN_BUFFER(
- SPTEST.PARTITION_ID( 1 ),
- BUFFER_ADDRESS_1,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "PARTITION_RETURN_BUFFER" );
-
- TEXT_IO.PUT(
- "TA1 - partition_return_buffer - return buffer 2 to partition 1 - "
- );
- SPTEST.PUT_ADDRESS_FROM_AREA_1( BUFFER_ADDRESS_2 );
- TEXT_IO.NEW_LINE;
- RTEMS.PARTITION_RETURN_BUFFER(
- SPTEST.PARTITION_ID( 1 ),
- BUFFER_ADDRESS_2,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "PARTITION_RETURN_BUFFER" );
-
- TEXT_IO.PUT(
- "TA1 - partition_return_buffer - return buffer 1 to partition 2 - "
- );
- SPTEST.PUT_ADDRESS_FROM_AREA_2( BUFFER_ADDRESS_3 );
- TEXT_IO.NEW_LINE;
- RTEMS.PARTITION_RETURN_BUFFER(
- SPTEST.PARTITION_ID( 2 ),
- BUFFER_ADDRESS_3,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "PARTITION_RETURN_BUFFER" );
-
- TEXT_IO.PUT(
- "TA1 - partition_return_buffer - return buffer 2 to partition 2 - "
- );
- SPTEST.PUT_ADDRESS_FROM_AREA_2( BUFFER_ADDRESS_4 );
- TEXT_IO.NEW_LINE;
- RTEMS.PARTITION_RETURN_BUFFER(
- SPTEST.PARTITION_ID( 2 ),
- BUFFER_ADDRESS_4,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "PARTITION_RETURN_BUFFER" );
-
- TEXT_IO.PUT_LINE( "TA1 - partition_delete - delete partition 1" );
- RTEMS.PARTITION_DELETE( SPTEST.PARTITION_ID( 1 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "PARTITION_DELETE OF SELF" );
-
- TEXT_IO.PUT_LINE( "TA1 - partition_delete - delete partition 2" );
- RTEMS.PARTITION_DELETE( SPTEST.PARTITION_ID( 2 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "PARTITION_DELETE OF SELF" );
-
- TEXT_IO.PUT_LINE( "*** END OF TEST 15 ***" );
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end TASK_1;
-
-end SPTEST;
diff --git a/c/src/ada-tests/sptests/sp15/sptest.ads b/c/src/ada-tests/sptests/sp15/sptest.ads
deleted file mode 100644
index ea22067451..0000000000
--- a/c/src/ada-tests/sptests/sp15/sptest.ads
+++ /dev/null
@@ -1,118 +0,0 @@
---
--- SPTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 15 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-package SPTEST is
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
- TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS partitions created
--- by this test.
---
-
- PARTITION_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
- PARTITION_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
-
---
--- These arrays define the memory areas used for the partitions in
--- this test.
---
-
- AREA_1 : array ( RTEMS.UNSIGNED32 range 0 .. 4095 ) of RTEMS.UNSIGNED8;
- for AREA_1'ALIGNMENT use RTEMS.STRUCTURE_ALIGNMENT;
-
- AREA_2 : array ( RTEMS.UNSIGNED32 range 0 .. 273 ) of RTEMS.UNSIGNED8;
- for AREA_2'ALIGNMENT use RTEMS.STRUCTURE_ALIGNMENT;
-
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- PUT_ADDRESS_FROM_AREA_1
---
--- DESCRIPTION:
---
--- This subpgram prints the offset of the address TO_BE_PRINTED
--- from the first byte of AREA_1.
---
--- NOTE:
---
--- This subprogram is used because the actual address of AREA_1
--- varies based upon the size of the executable, the target board,
--- and the target processor.
---
-
- procedure PUT_ADDRESS_FROM_AREA_1 (
- TO_BE_PRINTED : in RTEMS.ADDRESS
- );
-
---
--- PUT_ADDRESS_FROM_AREA_2
---
--- DESCRIPTION:
---
--- This subprogram prints the offset of the address TO_BE_PRINTED
--- from the first byte of AREA_2.
---
--- NOTE:
---
--- This subprogram is used because the actual address of AREA_1
--- varies based upon the size of the executable, the target board,
--- and the target processor.
---
-
- procedure PUT_ADDRESS_FROM_AREA_2 (
- TO_BE_PRINTED : in RTEMS.ADDRESS
- );
-
---
--- TASK_1
---
--- DESCRIPTION:
---
--- This RTEMS task tests the Partition Manager.
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end SPTEST;
diff --git a/c/src/ada-tests/sptests/sp16/config.h b/c/src/ada-tests/sptests/sp16/config.h
deleted file mode 100644
index af594bd808..0000000000
--- a/c/src/ada-tests/sptests/sp16/config.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MAXIMUM_REGIONS 4
-#define CONFIGURE_TICKS_PER_TIMESLICE 100
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/sptests/sp16/sp16.adb b/c/src/ada-tests/sptests/sp16/sp16.adb
deleted file mode 100644
index cbdc6008ac..0000000000
--- a/c/src/ada-tests/sptests/sp16/sp16.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test SP16 of the Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with SPTEST;
-with TEST_SUPPORT;
-
-procedure SP16 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- SPTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end SP16;
-
diff --git a/c/src/ada-tests/sptests/sp16/sp16.scn b/c/src/ada-tests/sptests/sp16/sp16.scn
deleted file mode 100644
index 4706729d3d..0000000000
--- a/c/src/ada-tests/sptests/sp16/sp16.scn
+++ /dev/null
@@ -1,48 +0,0 @@
-*** TEST 16 ***
-TA1 - region_ident - rnid => 16#10001#
-TA1 - region_get_segment - wait on 100 byte segment from region 2
-TA1 - got segment from region 2 - 16#F78#
-TA1 - region_get_segment - wait on 3K segment from region 3
-TA1 - got segment from region 3 - 16#3F8#
-TA1 - region_get_segment - get 3080 byte segment from region 1 - NO_WAIT
-TA1 - got segment from region 1 - 16#378#
-TA1 - task_wake_after - yield processor
-TA2 - region_get_segment - wait on 2K segment from region 1
-TA3 - region_get_segment - wait on 3968 byte segment from region 2
-<pause>
-TA1 - region_return_segment - return segment to region 1 - 16#378#
-TA1 - region_get_segment - wait 10 seconds for 3K segment from region 1
-TA2 - got segment from region 1 - 16#7F8#
-TA2 - region_return_segment - return segment to region 1 - 16#7F8#
-TA2 - task_set_priority - make self highest priority task
-TA2 - region_get_segment - wait on 3968 byte segment from region 2
-TA1 - got segment from region 1 - 16#3F8#
-TA1 - region_return_segment - return segment to region 2 - 16#F78#
-TA2 - got segment from region 2 - 16#8#
-TA2 - region_return_segment - return segment to region 2 - 16#8#
-TA2 - task_delete - delete self
-TA1 - task_wake_after - yield processor
-TA3 - got segment from region 2 - 16#8#
-TA3 - region_get_segment - wait on 2K segment from region 3
-TA1 - task_delete - delete TA3
-<pause>
-TA1 - task_wake_after - yield processor
-TA4 - region_get_segment - wait on 1.5K segment from region 1
-TA5 - region_get_segment - wait on 1.5K segment from region 1
-TA1 - region_return_segment - return segment to region 1 - 16#3F8#
-TA1 - task_wake_after - yield processor
-TA4 - got and returned 16#9F8#
-TA5 - got and returned 16#3F0#
-TA1 - region_get_segment - wait 10 seconds for 3K segment from region 1
-TA1 - got segment from region 1 - 16#3F8#
-TA1 - task_wake_after - sleep 1 second
-TA4 - region_get_segment - wait on 3K segment from region 1
-TA5 - region_get_segment - wait on 3K segment from region 1
-TA1 - task_delete - delete TA4
-TA1 - region_return_segment - return segment to region 1 - 16#3F8#
-TA1 - task_wake_after - yield processor
-TA5 - got segment from region 1 - 16#3F8#
-TA5 - region_return_segment - return segment to region 1 - 16#3F8#
-TA5 - task_delete - delete self
-TA1 - region_delete - delete region 1
-*** END OF TEST 16 ***
diff --git a/c/src/ada-tests/sptests/sp16/sptest.adb b/c/src/ada-tests/sptests/sp16/sptest.adb
deleted file mode 100644
index cfec98d82c..0000000000
--- a/c/src/ada-tests/sptests/sp16/sptest.adb
+++ /dev/null
@@ -1,686 +0,0 @@
---
--- SPTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 16 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with TEST_SUPPORT;
-with TEXT_IO;
-with UNSIGNED32_IO;
-
-package body SPTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TEST 16 ***" );
-
- SPTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME( 'T', 'A', '1', ' ' );
- SPTEST.TASK_NAME( 2 ) := RTEMS.BUILD_NAME( 'T', 'A', '2', ' ' );
- SPTEST.TASK_NAME( 3 ) := RTEMS.BUILD_NAME( 'T', 'A', '3', ' ' );
- SPTEST.TASK_NAME( 4 ) := RTEMS.BUILD_NAME( 'T', 'A', '4', ' ' );
- SPTEST.TASK_NAME( 5 ) := RTEMS.BUILD_NAME( 'T', 'A', '5', ' ' );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 1 ),
- SPTEST.BASE_PRIORITY,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA1" );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 2 ),
- SPTEST.BASE_PRIORITY,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 2 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA2" );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 3 ),
- SPTEST.BASE_PRIORITY,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 3 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA3" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 1 ),
- SPTEST.TASK_1'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA1" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 2 ),
- SPTEST.TASK_2'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA2" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 3 ),
- SPTEST.TASK_3'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA3" );
-
- SPTEST.REGION_NAME( 1 ) := RTEMS.BUILD_NAME( 'R', 'N', '1', ' ' );
- SPTEST.REGION_NAME( 2 ) := RTEMS.BUILD_NAME( 'R', 'N', '1', ' ' );
- SPTEST.REGION_NAME( 3 ) := RTEMS.BUILD_NAME( 'R', 'N', '1', ' ' );
-
- RTEMS.REGION_CREATE(
- SPTEST.REGION_NAME( 1 ),
- SPTEST.AREA_1'ADDRESS,
- 4096,
- 128,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.REGION_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_CREATE OF RN1" );
-
- RTEMS.REGION_CREATE(
- SPTEST.REGION_NAME( 2 ),
- SPTEST.AREA_2'ADDRESS,
- 4096,
- 128,
- RTEMS.PRIORITY,
- SPTEST.REGION_ID( 2 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_CREATE OF RN2" );
-
- RTEMS.REGION_CREATE(
- SPTEST.REGION_NAME( 3 ),
- SPTEST.AREA_3'ADDRESS,
- 4096,
- 128,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.REGION_ID( 3 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_CREATE OF RN3" );
-
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- PUT_ADDRESS_FROM_AREA_1
---
-
- procedure PUT_ADDRESS_FROM_AREA_1 (
- TO_BE_PRINTED : in RTEMS.ADDRESS
- ) is
-
- begin
-
- UNSIGNED32_IO.PUT(
- RTEMS.SUBTRACT( TO_BE_PRINTED, SPTEST.AREA_1'ADDRESS ),
- WIDTH => 8,
- BASE => 16
- );
-
- end PUT_ADDRESS_FROM_AREA_1;
-
---PAGE
---
--- PUT_ADDRESS_FROM_AREA_2
---
-
- procedure PUT_ADDRESS_FROM_AREA_2 (
- TO_BE_PRINTED : in RTEMS.ADDRESS
- ) is
- begin
-
- UNSIGNED32_IO.PUT(
- RTEMS.SUBTRACT( TO_BE_PRINTED, SPTEST.AREA_2'ADDRESS ),
- WIDTH => 8,
- BASE => 16
- );
-
- end PUT_ADDRESS_FROM_AREA_2;
-
---PAGE
---
--- PUT_ADDRESS_FROM_AREA_3
---
-
- procedure PUT_ADDRESS_FROM_AREA_3 (
- TO_BE_PRINTED : in RTEMS.ADDRESS
- ) is
- begin
-
- UNSIGNED32_IO.PUT(
- RTEMS.SUBTRACT( TO_BE_PRINTED, SPTEST.AREA_3'ADDRESS ),
- WIDTH => 8,
- BASE => 16
- );
-
- end PUT_ADDRESS_FROM_AREA_3;
-
---PAGE
---
--- TASK_1
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- RNID : RTEMS.ID;
- SEGMENT_ADDRESS_1 : RTEMS.ADDRESS;
- SEGMENT_ADDRESS_2 : RTEMS.ADDRESS;
- SEGMENT_ADDRESS_3 : RTEMS.ADDRESS;
- SEGMENT_ADDRESS_4 : RTEMS.ADDRESS;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.REGION_IDENT( SPTEST.REGION_NAME( 1 ), RNID, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_IDENT OF RN1" );
- TEXT_IO.PUT( "TA1 - region_ident - rnid => " );
- UNSIGNED32_IO.PUT( RNID, WIDTH => 8, BASE => 16 );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT( "TA1 - region_get_segment - wait on " );
- TEXT_IO.PUT_LINE( "100 byte segment from region 2" );
- RTEMS.REGION_GET_SEGMENT(
- SPTEST.REGION_ID( 2 ),
- 100,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- SEGMENT_ADDRESS_1,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_GET_SEGMENT" );
- TEXT_IO.PUT( "TA1 - got segment from region 2 - " );
- SPTEST.PUT_ADDRESS_FROM_AREA_2( SEGMENT_ADDRESS_1 );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT( "TA1 - region_get_segment - wait on " );
- TEXT_IO.PUT_LINE( "3K segment from region 3" );
- RTEMS.REGION_GET_SEGMENT(
- SPTEST.REGION_ID( 3 ),
- 3072,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- SEGMENT_ADDRESS_2,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_GET_SEGMENT" );
- TEXT_IO.PUT( "TA1 - got segment from region 3 - " );
- SPTEST.PUT_ADDRESS_FROM_AREA_3( SEGMENT_ADDRESS_2 );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT( "TA1 - region_get_segment - get 3080 byte segment " );
- TEXT_IO.PUT_LINE( "from region 1 - NO_WAIT" );
- RTEMS.REGION_GET_SEGMENT(
- SPTEST.REGION_ID( 1 ),
- 3080,
- RTEMS.NO_WAIT,
- RTEMS.NO_TIMEOUT,
- SEGMENT_ADDRESS_3,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_GET_SEGMENT" );
- TEXT_IO.PUT( "TA1 - got segment from region 1 - " );
- SPTEST.PUT_ADDRESS_FROM_AREA_1( SEGMENT_ADDRESS_3 );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT_LINE( "TA1 - task_wake_after - yield processor" );
- RTEMS.TASK_WAKE_AFTER( RTEMS.YIELD_PROCESSOR, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
-TEST_SUPPORT.PAUSE;
-
- TEXT_IO.PUT(
- "TA1 - region_return_segment - return segment to region 1 - "
- );
- SPTEST.PUT_ADDRESS_FROM_AREA_1( SEGMENT_ADDRESS_3 );
- RTEMS.REGION_RETURN_SEGMENT(
- SPTEST.REGION_ID( 1 ),
- SEGMENT_ADDRESS_3,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_RETURN_SEGMENT" );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT( "TA1 - region_get_segment - wait 10 seconds for 3K " );
- TEXT_IO.PUT_LINE( "segment from region 1" );
- RTEMS.REGION_GET_SEGMENT(
- SPTEST.REGION_ID( 1 ),
- 3072,
- RTEMS.DEFAULT_OPTIONS,
- 10 * TEST_SUPPORT.TICKS_PER_SECOND,
- SEGMENT_ADDRESS_4,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_GET_SEGMENT" );
- TEXT_IO.PUT( "TA1 - got segment from region 1 - " );
- SPTEST.PUT_ADDRESS_FROM_AREA_1( SEGMENT_ADDRESS_4 );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT(
- "TA1 - region_return_segment - return segment to region 2 - "
- );
- SPTEST.PUT_ADDRESS_FROM_AREA_2( SEGMENT_ADDRESS_1 );
- TEXT_IO.NEW_LINE;
- RTEMS.REGION_RETURN_SEGMENT(
- SPTEST.REGION_ID( 2 ),
- SEGMENT_ADDRESS_1,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_RETURN_SEGMENT" );
-
- TEXT_IO.PUT_LINE( "TA1 - task_wake_after - yield processor" );
- RTEMS.TASK_WAKE_AFTER( RTEMS.YIELD_PROCESSOR, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- TEXT_IO.PUT_LINE( "TA1 - task_delete - delete TA3" );
- RTEMS.TASK_DELETE( SPTEST.TASK_ID( 3 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF TA3" );
-
-TEST_SUPPORT.PAUSE;
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 4 ),
- SPTEST.BASE_PRIORITY,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 4 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA4" );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 5 ),
- SPTEST.BASE_PRIORITY,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 5 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA5" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 4 ),
- SPTEST.TASK_4'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA4" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 5 ),
- SPTEST.TASK_5'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA5" );
-
- TEXT_IO.PUT_LINE( "TA1 - task_wake_after - yield processor" );
- RTEMS.TASK_WAKE_AFTER( TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- TEXT_IO.PUT(
- "TA1 - region_return_segment - return segment to region 1 - "
- );
- SPTEST.PUT_ADDRESS_FROM_AREA_1( SEGMENT_ADDRESS_4 );
- RTEMS.REGION_RETURN_SEGMENT(
- SPTEST.REGION_ID( 1 ),
- SEGMENT_ADDRESS_4,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_RETURN_SEGMENT" );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT_LINE( "TA1 - task_wake_after - yield processor" );
- RTEMS.TASK_WAKE_AFTER( TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- TEXT_IO.PUT( "TA1 - region_get_segment - wait 10 seconds for 3K " );
- TEXT_IO.PUT_LINE( "segment from region 1" );
- RTEMS.REGION_GET_SEGMENT(
- SPTEST.REGION_ID( 1 ),
- 3072,
- RTEMS.DEFAULT_OPTIONS,
- 10 * TEST_SUPPORT.TICKS_PER_SECOND,
- SEGMENT_ADDRESS_4,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_GET_SEGMENT" );
- TEXT_IO.PUT( "TA1 - got segment from region 1 - " );
- SPTEST.PUT_ADDRESS_FROM_AREA_1( SEGMENT_ADDRESS_4 );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT_LINE( "TA1 - task_wake_after - sleep 1 second" );
- RTEMS.TASK_WAKE_AFTER( TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- TEXT_IO.PUT_LINE( "TA1 - task_delete - delete TA4" );
- RTEMS.TASK_DELETE( SPTEST.TASK_ID( 4 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF TA4" );
-
- TEXT_IO.PUT(
- "TA1 - region_return_segment - return segment to region 1 - "
- );
- SPTEST.PUT_ADDRESS_FROM_AREA_1( SEGMENT_ADDRESS_4 );
- RTEMS.REGION_RETURN_SEGMENT(
- SPTEST.REGION_ID( 1 ),
- SEGMENT_ADDRESS_4,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_RETURN_SEGMENT" );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT_LINE( "TA1 - task_wake_after - yield processor" );
- RTEMS.TASK_WAKE_AFTER( RTEMS.YIELD_PROCESSOR, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- TEXT_IO.PUT_LINE( "TA1 - region_delete - delete region 1" );
- RTEMS.REGION_DELETE( SPTEST.REGION_ID( 1 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_DELETE OF RN1" );
-
- TEXT_IO.PUT_LINE( "*** END OF TEST 16 ***" );
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end TASK_1;
-
---PAGE
---
--- TASK_2
---
-
- procedure TASK_2 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- PREVIOUS_PRIORITY : RTEMS.TASK_PRIORITY;
- SEGMENT_ADDRESS_1 : RTEMS.ADDRESS;
- SEGMENT_ADDRESS_2 : RTEMS.ADDRESS;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.PUT( "TA2 - region_get_segment - wait on 2K segment " );
- TEXT_IO.PUT_LINE( "from region 1" );
- RTEMS.REGION_GET_SEGMENT(
- SPTEST.REGION_ID( 1 ),
- 2048,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- SEGMENT_ADDRESS_1,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_GET_SEGMENT" );
- TEXT_IO.PUT( "TA2 - got segment from region 1 - " );
- SPTEST.PUT_ADDRESS_FROM_AREA_1( SEGMENT_ADDRESS_1 );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT(
- "TA2 - region_return_segment - return segment to region 1 - "
- );
- SPTEST.PUT_ADDRESS_FROM_AREA_1( SEGMENT_ADDRESS_1 );
- RTEMS.REGION_RETURN_SEGMENT(
- SPTEST.REGION_ID( 1 ),
- SEGMENT_ADDRESS_1,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_RETURN_SEGMENT" );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT( "TA2 - task_set_priority - make self " );
- TEXT_IO.PUT_LINE( "highest priority task" );
- RTEMS.TASK_SET_PRIORITY(
- RTEMS.SELF,
- SPTEST.BASE_PRIORITY - 1,
- PREVIOUS_PRIORITY,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SET_PRIORITY" );
-
- TEXT_IO.PUT(
- "TA2 - region_get_segment - wait on 3968 byte segment "
- );
- TEXT_IO.PUT_LINE( "from region 2" );
- RTEMS.REGION_GET_SEGMENT(
- SPTEST.REGION_ID( 2 ),
- 3968,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- SEGMENT_ADDRESS_2,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_GET_SEGMENT" );
- TEXT_IO.PUT( "TA2 - got segment from region 2 - " );
- SPTEST.PUT_ADDRESS_FROM_AREA_2( SEGMENT_ADDRESS_2 );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT(
- "TA2 - region_return_segment - return segment to region 2 - "
- );
- SPTEST.PUT_ADDRESS_FROM_AREA_2( SEGMENT_ADDRESS_2 );
- RTEMS.REGION_RETURN_SEGMENT(
- SPTEST.REGION_ID( 2 ),
- SEGMENT_ADDRESS_2,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_RETURN_SEGMENT" );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT_LINE( "TA2 - task_delete - delete self" );
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF TA2" );
-
- end TASK_2;
-
---PAGE
---
--- TASK_3
---
-
- procedure TASK_3 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- SEGMENT_ADDRESS_1 : RTEMS.ADDRESS;
- SEGMENT_ADDRESS_2 : RTEMS.ADDRESS;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.PUT( "TA3 - region_get_segment - wait on 3968 byte segment " );
- TEXT_IO.PUT_LINE( "from region 2" );
- RTEMS.REGION_GET_SEGMENT(
- SPTEST.REGION_ID( 2 ),
- 3968,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- SEGMENT_ADDRESS_1,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_GET_SEGMENT" );
- TEXT_IO.PUT( "TA3 - got segment from region 2 - " );
- SPTEST.PUT_ADDRESS_FROM_AREA_2( SEGMENT_ADDRESS_1 );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT( "TA3 - region_get_segment - wait on 2K segment " );
- TEXT_IO.PUT_LINE( "from region 3" );
- RTEMS.REGION_GET_SEGMENT(
- SPTEST.REGION_ID( 3 ),
- 2048,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- SEGMENT_ADDRESS_2,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_GET_SEGMENT" );
-
- end TASK_3;
-
---PAGE
---
--- TASK_4
---
-
- procedure TASK_4 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- SEGMENT_ADDRESS_1 : RTEMS.ADDRESS;
- SEGMENT_ADDRESS_2 : RTEMS.ADDRESS;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.PUT( "TA4 - region_get_segment - wait on 1.5K segment " );
- TEXT_IO.PUT_LINE( "from region 1" );
- RTEMS.REGION_GET_SEGMENT(
- SPTEST.REGION_ID( 1 ),
- 1536,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- SEGMENT_ADDRESS_1,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_GET_SEGMENT" );
-
- RTEMS.REGION_RETURN_SEGMENT(
- SPTEST.REGION_ID( 1 ),
- SEGMENT_ADDRESS_1,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_RETURN_SEGMENT" );
- TEXT_IO.PUT( "TA4 - got and returned " );
- SPTEST.PUT_ADDRESS_FROM_AREA_1( SEGMENT_ADDRESS_1 );
- TEXT_IO.NEW_LINE;
-
- RTEMS.TASK_WAKE_AFTER( TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- TEXT_IO.PUT( "TA4 - region_get_segment - wait on 3K segment " );
- TEXT_IO.PUT_LINE( "from region 1" );
- RTEMS.REGION_GET_SEGMENT(
- SPTEST.REGION_ID( 1 ),
- 3072,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- SEGMENT_ADDRESS_2,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_GET_SEGMENT" );
-
- end TASK_4;
-
---PAGE
---
--- TASK_5
---
-
- procedure TASK_5 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- SEGMENT_ADDRESS_1 : RTEMS.ADDRESS;
- SEGMENT_ADDRESS_2 : RTEMS.ADDRESS;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.PUT( "TA5 - region_get_segment - wait on 1.5K segment " );
- TEXT_IO.PUT_LINE( "from region 1" );
- RTEMS.REGION_GET_SEGMENT(
- SPTEST.REGION_ID( 1 ),
- 1536,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- SEGMENT_ADDRESS_1,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_GET_SEGMENT" );
-
- RTEMS.REGION_RETURN_SEGMENT(
- SPTEST.REGION_ID( 1 ),
- SEGMENT_ADDRESS_1,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_RETURN_SEGMENT" );
- TEXT_IO.PUT( "TA5 - got and returned " );
- SPTEST.PUT_ADDRESS_FROM_AREA_1( SEGMENT_ADDRESS_1 );
- TEXT_IO.NEW_LINE;
-
- RTEMS.TASK_WAKE_AFTER( TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- TEXT_IO.PUT( "TA5 - region_get_segment - wait on 3K segment " );
- TEXT_IO.PUT_LINE( "from region 1" );
- RTEMS.REGION_GET_SEGMENT(
- SPTEST.REGION_ID( 1 ),
- 3072,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- SEGMENT_ADDRESS_2,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_GET_SEGMENT" );
- TEXT_IO.PUT( "TA5 - got segment from region 1 - " );
- SPTEST.PUT_ADDRESS_FROM_AREA_1( SEGMENT_ADDRESS_2 );
- TEXT_IO.NEW_LINE;
-
- RTEMS.REGION_RETURN_SEGMENT(
- SPTEST.REGION_ID( 1 ),
- SEGMENT_ADDRESS_2,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_RETURN_SEGMENT" );
- TEXT_IO.PUT(
- "TA5 - region_return_segment - return segment to region 1 - "
- );
- SPTEST.PUT_ADDRESS_FROM_AREA_1( SEGMENT_ADDRESS_2 );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT_LINE( "TA5 - task_delete - delete self" );
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF TA5" );
-
- end TASK_5;
-
-end SPTEST;
diff --git a/c/src/ada-tests/sptests/sp16/sptest.ads b/c/src/ada-tests/sptests/sp16/sptest.ads
deleted file mode 100644
index a9a8df0881..0000000000
--- a/c/src/ada-tests/sptests/sp16/sptest.ads
+++ /dev/null
@@ -1,195 +0,0 @@
---
--- SPTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 16 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-package SPTEST is
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 5 ) of RTEMS.ID;
- TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 5 ) of RTEMS.NAME;
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS regions created
--- by this test.
---
-
- REGION_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
- REGION_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
-
---
--- The following constant defines the priority of most of the
--- RTEMS tasks in this test. This allows one of the tasks to
--- easily set itself to a higher priority than the rest.
---
-
- BASE_PRIORITY : constant RTEMS.TASK_PRIORITY := 140;
-
---
--- These arrays define the memory areas used for the regions in
--- this test.
---
-
- AREA_1 : array ( RTEMS.UNSIGNED32 range 0 .. 4095 ) of RTEMS.UNSIGNED8;
- for AREA_1'ALIGNMENT use RTEMS.STRUCTURE_ALIGNMENT;
-
- AREA_2 : array ( RTEMS.UNSIGNED32 range 0 .. 4095 ) of RTEMS.UNSIGNED8;
- for AREA_2'ALIGNMENT use RTEMS.STRUCTURE_ALIGNMENT;
-
- AREA_3 : array ( RTEMS.UNSIGNED32 range 0 .. 4095 ) of RTEMS.UNSIGNED8;
- for AREA_3'ALIGNMENT use RTEMS.STRUCTURE_ALIGNMENT;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- PUT_ADDRESS_FROM_AREA_1
---
--- DESCRIPTION:
---
--- This subprogram prints the offset of the address TO_BE_PRINTED
--- from the first byte of AREA_1.
---
--- NOTE:
---
--- This subprogram is used because the actual address of AREA_1
--- varies based upon the size of the executable, the target board,
--- and the target processor.
---
-
- procedure PUT_ADDRESS_FROM_AREA_1 (
- TO_BE_PRINTED : in RTEMS.ADDRESS
- );
-
---
--- PUT_ADDRESS_FROM_AREA_2
---
--- DESCRIPTION:
---
--- This subprogram prints the offset of the address TO_BE_PRINTED
--- from the first byte of AREA_2.
---
--- NOTE:
---
--- This subprogram is used because the actual address of AREA_2
--- varies based upon the size of the executable, the target board,
--- and the target processor.
---
-
- procedure PUT_ADDRESS_FROM_AREA_2 (
- TO_BE_PRINTED : in RTEMS.ADDRESS
- );
-
---
--- PUT_ADDRESS_FROM_AREA_3
---
--- DESCRIPTION:
---
--- This subprogram prints the offset of the address TO_BE_PRINTED
--- from the first byte of AREA_3.
---
--- NOTE:
---
--- This subprogram is used because the actual address of AREA_3
--- varies based upon the size of the executable, the target board,
--- and the target processor.
---
-
- procedure PUT_ADDRESS_FROM_AREA_3 (
- TO_BE_PRINTED : in RTEMS.ADDRESS
- );
-
---
--- TASK_1
---
--- DESCRIPTION:
---
--- This RTEMS task tests the Region Manager.
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_2
---
--- DESCRIPTION:
---
--- This RTEMS task tests the Region Manager.
---
-
- procedure TASK_2 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_3
---
--- DESCRIPTION:
---
--- This RTEMS task tests the Region Manager.
---
-
- procedure TASK_3 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_4
---
--- DESCRIPTION:
---
--- This RTEMS task tests the Region Manager.
---
-
- procedure TASK_4 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_5
---
--- DESCRIPTION:
---
--- This RTEMS task tests the Region Manager.
---
-
- procedure TASK_5 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end SPTEST;
diff --git a/c/src/ada-tests/sptests/sp17/config.h b/c/src/ada-tests/sptests/sp17/config.h
deleted file mode 100644
index 1e70e8d7b2..0000000000
--- a/c/src/ada-tests/sptests/sp17/config.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MICROSECONDS_PER_TICK RTEMS_MILLISECONDS_TO_MICROSECONDS(25)
-#define CONFIGURE_TICKS_PER_TIMESLICE 1000
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/sptests/sp17/sp17.adb b/c/src/ada-tests/sptests/sp17/sp17.adb
deleted file mode 100644
index 1a0a317af7..0000000000
--- a/c/src/ada-tests/sptests/sp17/sp17.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test SP17 of the Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with SPTEST;
-with TEST_SUPPORT;
-
-procedure SP17 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- SPTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end SP17;
-
diff --git a/c/src/ada-tests/sptests/sp17/sp17.scn b/c/src/ada-tests/sptests/sp17/sp17.scn
deleted file mode 100644
index 887284d877..0000000000
--- a/c/src/ada-tests/sptests/sp17/sp17.scn
+++ /dev/null
@@ -1,8 +0,0 @@
-*** TEST 17 ***
-TA2 - Suspending self
-TA1 - signal_catch: initializing signal catcher
-TA1 - Sending signal to self
-TA2 - signal_return preempted correctly
-TA1 - TA2 correctly preempted me
-TA1 - Got Back!!!
-*** END OF TEST 17 ***
diff --git a/c/src/ada-tests/sptests/sp17/sptest.adb b/c/src/ada-tests/sptests/sp17/sptest.adb
deleted file mode 100644
index b1bbc26b3d..0000000000
--- a/c/src/ada-tests/sptests/sp17/sptest.adb
+++ /dev/null
@@ -1,173 +0,0 @@
---
--- SPTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 17 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with TEST_SUPPORT;
-with TEXT_IO;
-
-package body SPTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TEST 17 ***" );
-
- SPTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME( 'T', 'A', '1', ' ' );
- SPTEST.TASK_NAME( 2 ) := RTEMS.BUILD_NAME( 'T', 'A', '2', ' ' );
-
- SPTEST.TASK_2_PREEMPTED := FALSE;
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 1 ),
- 2,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA1" );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 2 ),
- 1,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 2 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA2" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 1 ),
- SPTEST.TASK_1'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA1" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 2 ),
- SPTEST.TASK_2'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA2" );
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- PROCESS_ASR
---
-
- procedure PROCESS_ASR (
- SIGNALS : in RTEMS.SIGNAL_SET
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.TASK_RESUME( SPTEST.TASK_ID( 2 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "ASR - TASK_RESUME OF TA2" );
-
- end PROCESS_ASR;
-
---PAGE
---
--- TASK_1
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.PUT_LINE( "TA1 - signal_catch: initializing signal catcher" );
- RTEMS.SIGNAL_CATCH(
- SPTEST.PROCESS_ASR'ACCESS,
- RTEMS.NO_ASR + RTEMS.NO_PREEMPT,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SIGNAL_CATCH" );
-
- TEXT_IO.PUT_LINE( "TA1 - Sending signal to self" );
- RTEMS.SIGNAL_SEND(
- SPTEST.TASK_ID( 1 ),
- RTEMS.SIGNAL_16,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SIGNAL_SEND" );
-
- if SPTEST.TASK_2_PREEMPTED = TRUE then
- TEXT_IO.PUT_LINE( "TA1 - TA2 correctly preempted me" );
- end if;
-
- TEXT_IO.PUT_LINE( "TA1 - Got Back!!!" );
-
- TEXT_IO.PUT_LINE( "*** END OF TEST 17 ***" );
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end TASK_1;
-
---PAGE
---
--- TASK_2
---
-
- procedure TASK_2 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- SPTEST.TASK_2_PREEMPTED := FALSE;
-
- TEXT_IO.PUT_LINE( "TA2 - Suspending self" );
- RTEMS.TASK_SUSPEND( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SUSPEND OF TA2" );
-
- TEXT_IO.PUT_LINE( "TA2 - signal_return preempted correctly" );
-
- SPTEST.TASK_2_PREEMPTED := TRUE;
-
- RTEMS.TASK_SUSPEND( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SUSPEND OF TA2" );
-
- end TASK_2;
-
-end SPTEST;
diff --git a/c/src/ada-tests/sptests/sp17/sptest.ads b/c/src/ada-tests/sptests/sp17/sptest.ads
deleted file mode 100644
index e6dc2040d5..0000000000
--- a/c/src/ada-tests/sptests/sp17/sptest.ads
+++ /dev/null
@@ -1,93 +0,0 @@
---
--- SPTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 17 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-package SPTEST is
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
- TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
-
---
--- The following is set to TRUE by TASK_2 when it preempts TASK_1.
---
-
- TASK_2_PREEMPTED : STANDARD.BOOLEAN;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- PROCESS_ASR
---
--- DESCRIPTION:
---
--- This subprogram is the ASR for TASK_1.
---
-
- procedure PROCESS_ASR (
- SIGNALS : in RTEMS.SIGNAL_SET
- );
-
---
--- TASK_1
---
--- DESCRIPTION:
---
--- This RTEMS task tests that when the transfer from the task
--- to the ASR (and vice-versa) is performed, that the new mode
--- is taken into account. If this occurs, then TASK_2 will be
--- able to preempt upon completion of the ASR of TASK_1.
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_2
---
--- DESCRIPTION:
---
--- This RTEMS task is designed to preempt TASK_1.
---
-
- procedure TASK_2 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end SPTEST;
diff --git a/c/src/ada-tests/sptests/sp19/README b/c/src/ada-tests/sptests/sp19/README
deleted file mode 100644
index 07d60c5bc4..0000000000
--- a/c/src/ada-tests/sptests/sp19/README
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-# $Id$
-#
-
-This is a "problem" test in Ada versus the C equivalent. In C,
-we used macros to :
-
- + declare a LOT of local integer and floating point variables
- + load them with values
- + check them at certain times
- + to avoid floating point operations on CPUs w/o hardware support
-
-The macros are not equivalent to subprograms doing the same thing.
-We are trying to insure that the register set is fully utilized and
-checking that it survives context switches. If the routines are
-subprograms, then calling conventions and scoping rules apply. Thus
-the variables do not exist throughout the entire life of the task
-as in the C test.
-
-It seems to point out that although the conditional compilation
-and macro capabilities of C are often abused, they do provide
-capabilities which are difficult if not impossible to mimic entirely
-with subprograms.
diff --git a/c/src/ada-tests/sptests/sp19/config.h b/c/src/ada-tests/sptests/sp19/config.h
deleted file mode 100644
index bfb614cd4e..0000000000
--- a/c/src/ada-tests/sptests/sp19/config.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/sptests/sp19/sp19.adb b/c/src/ada-tests/sptests/sp19/sp19.adb
deleted file mode 100644
index 61a5107332..0000000000
--- a/c/src/ada-tests/sptests/sp19/sp19.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test SP19 of the Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with SPTEST;
-with TEST_SUPPORT;
-
-procedure SP19 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.FLOATING_POINT,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- SPTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end SP19;
-
diff --git a/c/src/ada-tests/sptests/sp19/sp19.scn b/c/src/ada-tests/sptests/sp19/sp19.scn
deleted file mode 100644
index 8b7feadb37..0000000000
--- a/c/src/ada-tests/sptests/sp19/sp19.scn
+++ /dev/null
@@ -1,56 +0,0 @@
-*** TEST 19 ***
-FP1 - integer base = ( 16#6000#)
-FP1 - float base = ( 6.00060E+03)
-FP1 - integer base = ( 16#6000#)
-FP1 - float base = ( 6.00060E+03)
-TA1 - integer base = ( 16#1000#)
-TA1 - clock_get - 9: 0: 0 12/31/1988
-TA2 - integer base = ( 16#2000#)
-TA2 - clock_get - 9: 0: 0 12/31/1988
-TA3 - integer base = ( 16#3000#)
-TA3 - clock_get - 9: 0: 0 12/31/1988
-TA4 - integer base = ( 16#4000#)
-TA4 - float base = ( 4.00040E+03)
-TA4 - clock_get - 9: 0: 0 12/31/1988
-TA5 - integer base = ( 16#5000#)
-TA5 - float base = ( 5.00050E+03)
-TA5 - clock_get - 9: 0: 0 12/31/1988
-TA4 - clock_get - 9: 0: 1 12/31/1988
-TA5 - clock_get - 9: 0: 1 12/31/1988
-TA4 - clock_get - 9: 0: 2 12/31/1988
-TA5 - clock_get - 9: 0: 2 12/31/1988
-TA4 - clock_get - 9: 0: 3 12/31/1988
-TA5 - clock_get - 9: 0: 3 12/31/1988
-TA4 - clock_get - 9: 0: 4 12/31/1988
-TA5 - clock_get - 9: 0: 4 12/31/1988
-TA1 - clock_get - 9: 0: 5 12/31/1988
-TA4 - clock_get - 9: 0: 5 12/31/1988
-TA5 - clock_get - 9: 0: 5 12/31/1988
-TA4 - clock_get - 9: 0: 6 12/31/1988
-TA5 - clock_get - 9: 0: 6 12/31/1988
-TA4 - clock_get - 9: 0: 7 12/31/1988
-TA5 - clock_get - 9: 0: 7 12/31/1988
-TA4 - clock_get - 9: 0: 8 12/31/1988
-TA5 - clock_get - 9: 0: 8 12/31/1988
-TA4 - clock_get - 9: 0: 9 12/31/1988
-TA5 - clock_get - 9: 0: 9 12/31/1988
-TA2 - clock_get - 9: 0:10 12/31/1988
-TA1 - clock_get - 9: 0:10 12/31/1988
-TA4 - clock_get - 9: 0:10 12/31/1988
-TA5 - clock_get - 9: 0:10 12/31/1988
-TA4 - clock_get - 9: 0:11 12/31/1988
-TA5 - clock_get - 9: 0:11 12/31/1988
-TA4 - clock_get - 9: 0:12 12/31/1988
-TA5 - clock_get - 9: 0:12 12/31/1988
-TA4 - clock_get - 9: 0:13 12/31/1988
-TA5 - clock_get - 9: 0:13 12/31/1988
-TA4 - clock_get - 9: 0:14 12/31/1988
-TA5 - clock_get - 9: 0:14 12/31/1988
-TA1 - clock_get - 9: 0:15 12/31/1988
-TA3 - clock_get - 9: 0:15 12/31/1988
-TA5 - clock_get - 9: 0:15 12/31/1988
-TA4 - clock_get - 9: 0:15 12/31/1988
-TA4 - task_delete - self
-TA5 - task_delete - TA3
-*** END OF TEST 19 ***
-
diff --git a/c/src/ada-tests/sptests/sp19/sptest.ads b/c/src/ada-tests/sptests/sp19/sptest.ads
deleted file mode 100644
index 92d65ffc3d..0000000000
--- a/c/src/ada-tests/sptests/sp19/sptest.ads
+++ /dev/null
@@ -1,102 +0,0 @@
---
--- SPTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 19 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-package SPTEST is
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 6 ) of RTEMS.ID;
- TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 6 ) of RTEMS.NAME;
-
---
--- This array contains the floating point factors used by the
--- floating point tasks in this test.
---
-
- FP_FACTORS : array ( RTEMS.UNSIGNED32 range 0 .. 9 ) of FLOAT;
-
---
--- This array contains the integer factors used by the
--- integer tasks in this test.
---
-
- INTEGER_FACTORS : array ( RTEMS.UNSIGNED32 range 0 .. 9 ) of
- RTEMS.UNSIGNED32;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- FIRST_FP_TASK
---
--- DESCRIPTION:
---
--- This RTEMS task tests the restart and deletion of floating point tasks.
---
-
- procedure FIRST_FP_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- FP_TASK
---
--- DESCRIPTION:
---
--- This RTEMS task tests the basic capabilities of a floating point
--- task.
---
-
- procedure FP_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_1
---
--- DESCRIPTION:
---
--- This RTEMS task provides a non-floating point task to test
--- that an application can utilize a mixture of floating point
--- and non-floating point tasks.
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end SPTEST;
diff --git a/c/src/ada-tests/sptests/sp20/config.h b/c/src/ada-tests/sptests/sp20/config.h
deleted file mode 100644
index d8e351ae1f..0000000000
--- a/c/src/ada-tests/sptests/sp20/config.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MAXIMUM_PERIODS 10
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/sptests/sp20/sp20.adb b/c/src/ada-tests/sptests/sp20/sp20.adb
deleted file mode 100644
index 0bb685dc1d..0000000000
--- a/c/src/ada-tests/sptests/sp20/sp20.adb
+++ /dev/null
@@ -1,56 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test SP20 of the Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with SPTEST;
-with TEST_SUPPORT;
-
-procedure SP20 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 10,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
- RTEMS.TASK_START(
- INIT_ID,
- SPTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end SP20;
-
diff --git a/c/src/ada-tests/sptests/sp20/sp20.scn b/c/src/ada-tests/sptests/sp20/sp20.scn
deleted file mode 100644
index ec21e4bdf2..0000000000
--- a/c/src/ada-tests/sptests/sp20/sp20.scn
+++ /dev/null
@@ -1,27 +0,0 @@
-*** TEST 20 ***
-TA1 - rate_monotonic_create id = 16#10001#
-TA1 - rate_monotonic_ident id = 16#10001#
-TA1 - (16#10001#) period 2
-TA2 - rate_monotonic_create id = 16#10002#
-TA2 - rate_monotonic_ident id = 16#10002#
-TA2 - (16#10002#) period 2
-TA3 - rate_monotonic_create id = 16#10003#
-TA3 - rate_monotonic_ident id = 16#10003#
-TA3 - (16#10003#) period 2
-TA4 - rate_monotonic_create id = 16#10004#
-TA4 - rate_monotonic_ident id = 16#10004#
-TA4 - (16#10004#) period 2
-TA5 - rate_monotonic_create id = 16#10005#
-TA5 - rate_monotonic_ident id = 16#10005#
-TA5 - (16#10005#) period 100
-TA5 - PERIODS CHECK OK (1)
-TA5 - PERIODS CHECK OK (2)
-TA5 - PERIODS CHECK OK (3)
-TA5 - PERIODS CHECK OK (4)
-TA5 - PERIODS CHECK OK (5)
-TA5 - PERIODS CHECK OK (6)
-TA5 - PERIODS CHECK OK (7)
-TA5 - PERIODS CHECK OK (8)
-TA5 - PERIODS CHECK OK (9)
-TA5 - PERIODS CHECK OK (10)
-*** END OF TEST 20 ***
diff --git a/c/src/ada-tests/sptests/sp20/sptest.adb b/c/src/ada-tests/sptests/sp20/sptest.adb
deleted file mode 100644
index c12bef23c0..0000000000
--- a/c/src/ada-tests/sptests/sp20/sptest.adb
+++ /dev/null
@@ -1,280 +0,0 @@
---
--- SPTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 20 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with TEST_SUPPORT;
-with TEXT_IO;
-with UNSIGNED32_IO;
-
-package body SPTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TEST 20 ***" );
-
- SPTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME( 'T', 'A', '1', ' ' );
- SPTEST.TASK_NAME( 2 ) := RTEMS.BUILD_NAME( 'T', 'A', '2', ' ' );
- SPTEST.TASK_NAME( 3 ) := RTEMS.BUILD_NAME( 'T', 'A', '3', ' ' );
- SPTEST.TASK_NAME( 4 ) := RTEMS.BUILD_NAME( 'T', 'A', '4', ' ' );
- SPTEST.TASK_NAME( 5 ) := RTEMS.BUILD_NAME( 'T', 'A', '5', ' ' );
-
- for INDEX in 1 .. 5
- loop
-
- SPTEST.COUNT( INDEX ) := 0;
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( INDEX ),
- SPTEST.PRIORITIES( INDEX ),
- 4096,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( INDEX ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE LOOP" );
-
- end loop;
-
- for INDEX in 1 .. 5
- loop
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( INDEX ),
- SPTEST.TASK_1_THROUGH_5'ACCESS,
- RTEMS.TASK_ARGUMENT( INDEX ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START LOOP" );
-
- end loop;
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- TASK_1_THROUGH_5
---
-
- procedure TASK_1_THROUGH_5 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- RMID : RTEMS.ID;
- TEST_RMID : RTEMS.ID;
- INDEX : RTEMS.UNSIGNED32;
- PASS : RTEMS.UNSIGNED32;
- FAILED : RTEMS.UNSIGNED32;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.RATE_MONOTONIC_CREATE( ARGUMENT, RMID, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "RATE_MONOTONIC_CREATE" );
- TEST_SUPPORT.PUT_NAME( SPTEST.TASK_NAME( INTEGER( ARGUMENT ) ), FALSE );
- TEXT_IO.PUT( "- rate_monotonic_create id = " );
- UNSIGNED32_IO.PUT( RMID, WIDTH => 8, BASE => 16 );
- TEXT_IO.NEW_LINE;
-
- RTEMS.RATE_MONOTONIC_IDENT( ARGUMENT, TEST_RMID, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "RATE_MONOTONIC_IDENT" );
- TEST_SUPPORT.PUT_NAME( SPTEST.TASK_NAME( INTEGER( ARGUMENT ) ), FALSE );
- TEXT_IO.PUT( "- rate_monotonic_ident id = " );
- UNSIGNED32_IO.PUT( RMID, WIDTH => 8, BASE => 16 );
- TEXT_IO.NEW_LINE;
- if TEST_RMID /= RMID then
- TEXT_IO.PUT_LINE( "RMID's DO NOT MATCH!!!" );
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
- end if;
-
- TEST_SUPPORT.PUT_NAME( SPTEST.TASK_NAME( INTEGER( ARGUMENT ) ), FALSE );
- TEXT_IO.PUT( " - (" );
- UNSIGNED32_IO.PUT( RMID, WIDTH => 1, BASE => 16 );
- TEXT_IO.PUT( ") period " );
- UNSIGNED32_IO.PUT(
- SPTEST.PERIODS( INTEGER( ARGUMENT ) ),
- WIDTH => 1,
- BASE => 10
- );
- TEXT_IO.NEW_LINE;
-
- RTEMS.TASK_WAKE_AFTER( 2, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- case ARGUMENT is
- when 1 .. 4 =>
- loop
- RTEMS.RATE_MONOTONIC_PERIOD(
- RMID,
- SPTEST.PERIODS( INTEGER( ARGUMENT ) ),
- STATUS
- );
-
- TEST_SUPPORT.DIRECTIVE_FAILED(
- STATUS,
- "RATE_MONOTONIC_PERIOD"
- );
-
- SPTEST.COUNT( INTEGER( ARGUMENT ) ) :=
- SPTEST.COUNT( INTEGER( ARGUMENT ) ) + 1;
-
- end loop;
-
- when 5 =>
-
- PASS := 0;
- FAILED := 0;
-
- RTEMS.RATE_MONOTONIC_PERIOD(
- RMID,
- SPTEST.PERIODS( INTEGER( ARGUMENT ) ),
- STATUS
- );
-
- TEST_SUPPORT.DIRECTIVE_FAILED(
- STATUS,
- "RATE_MONOTONIC_PERIOD 1 OF TA5"
- );
-
- SPTEST.GET_ALL_COUNTERS;
-
- loop
-
- RTEMS.RATE_MONOTONIC_PERIOD(
- RMID,
- SPTEST.PERIODS( INTEGER( ARGUMENT ) ),
- STATUS
- );
-
- TEST_SUPPORT.DIRECTIVE_FAILED(
- STATUS,
- "RATE_MONOTONIC_PERIOD 2 OF TA5"
- );
-
- SPTEST.GET_ALL_COUNTERS;
-
- for INDEX in 1 .. 4
- loop
-
- if SPTEST.TEMPORARY_COUNT( INDEX ) /=
- SPTEST.ITERATIONS( INDEX ) then
-
- TEXT_IO.PUT( "FAIL -- " );
- TEST_SUPPORT.PUT_NAME(
- SPTEST.TASK_NAME( INDEX ),
- FALSE
- );
- TEXT_IO.PUT( "ACTUAL=" );
- UNSIGNED32_IO.PUT(
- SPTEST.TEMPORARY_COUNT( INDEX ),
- WIDTH => 3,
- BASE => 10
- );
- TEXT_IO.PUT( " EXPECTED=" );
- UNSIGNED32_IO.PUT(
- SPTEST.ITERATIONS( INDEX ),
- WIDTH => 3,
- BASE => 10
- );
- TEXT_IO.NEW_LINE;
-
- FAILED := FAILED + 1;
-
- end if;
-
- end loop;
-
- if FAILED = 5 then
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
- end if;
-
- PASS := PASS + 1;
- TEXT_IO.PUT( "TA5 - PERIODS CHECK OK (" );
- UNSIGNED32_IO.PUT( PASS, WIDTH => 1, BASE => 10 );
- TEXT_IO.PUT_LINE( ")" );
-
- if PASS = 10 then
- TEXT_IO.PUT_LINE( "*** END OF TEST 20 ***" );
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
- end if;
-
- end loop;
-
- when others =>
- NULL;
-
- end case;
-
- end TASK_1_THROUGH_5;
-
---PAGE
---
--- GET_ALL_COUNTERS
---
-
- procedure GET_ALL_COUNTERS
- is
- PREVIOUS_MODE : RTEMS.MODE;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.TASK_MODE(
- RTEMS.NO_PREEMPT,
- RTEMS.PREEMPT_MASK,
- PREVIOUS_MODE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_MODE TO NO_PREEMPT" );
-
- SPTEST.TEMPORARY_COUNT := SPTEST.COUNT;
-
- for INDEX in 1 .. 5
- loop
-
- SPTEST.COUNT( INDEX ) := 0;
-
- end loop;
-
- RTEMS.TASK_MODE(
- RTEMS.PREEMPT,
- RTEMS.PREEMPT_MASK,
- PREVIOUS_MODE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_MODE TO PREEMPT" );
-
- end GET_ALL_COUNTERS;
-
-end SPTEST;
diff --git a/c/src/ada-tests/sptests/sp20/sptest.ads b/c/src/ada-tests/sptests/sp20/sptest.ads
deleted file mode 100644
index bfc62ad772..0000000000
--- a/c/src/ada-tests/sptests/sp20/sptest.ads
+++ /dev/null
@@ -1,105 +0,0 @@
---
--- SPTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 20 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-package SPTEST is
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test.
---
-
- TASK_ID : array ( 1 .. 5 ) of RTEMS.ID;
- TASK_NAME : array ( 1 .. 5 ) of RTEMS.NAME;
-
---
--- These arrays contain the parameters which define the execution
--- characteristics and periods of each instantiation of the
--- copies of the RTEMS task TASKS_1_THROUGH_5.
---
-
- PERIODS : constant array ( 1 .. 5 )
- of RTEMS.UNSIGNED32 := ( 2, 2, 2, 2, 100 );
-
- ITERATIONS : constant array ( 1 .. 5 )
- of RTEMS.UNSIGNED32 := ( 50, 50, 50, 50, 1 );
-
- PRIORITIES : constant array ( 1 .. 5 )
- of RTEMS.UNSIGNED32 := ( 1, 1, 3, 4, 5 );
-
---
--- The following type defines the array used to manage the
--- execution counts of each task's period.
---
-
- type COUNT_ARRAY is array ( 1 .. 5 ) of RTEMS.UNSIGNED32;
-
---
--- These arrays contains the number of periods successfully completed
--- by each of the tasks. At each of its periods, the fifth task
--- will copy the contents of the COUNT array to TEMPORARY_COUNT,
--- and clear the COUNT array. The copy is performed to insure
--- that no periods fire while it is verifying the correctness
--- of the test's execution.
---
-
- COUNT : SPTEST.COUNT_ARRAY;
- TEMPORARY_COUNT : SPTEST.COUNT_ARRAY;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_1_THROUGH_5
---
--- DESCRIPTION:
---
--- These RTEMS tasks test the Rate Monotonic Manager.
---
-
- procedure TASK_1_THROUGH_5 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- GET_ALL_COUNTERS
---
--- DESCRIPTION:
---
--- This subprogram atomically copies the contents of COUNTER to
--- TEMPORARY_COUNTER.
---
-
- procedure GET_ALL_COUNTERS;
-
-end SPTEST;
diff --git a/c/src/ada-tests/sptests/sp21/config.h b/c/src/ada-tests/sptests/sp21/config.h
deleted file mode 100644
index 94ca99691d..0000000000
--- a/c/src/ada-tests/sptests/sp21/config.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-#define CONFIGURE_TEST_NEEDS_STUB_DRIVER
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/sptests/sp21/sp21.adb b/c/src/ada-tests/sptests/sp21/sp21.adb
deleted file mode 100644
index 6084211195..0000000000
--- a/c/src/ada-tests/sptests/sp21/sp21.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test SP21 of the Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with SPTEST;
-with TEST_SUPPORT;
-
-procedure SP21 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- SPTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end SP21;
-
diff --git a/c/src/ada-tests/sptests/sp21/sp21.scn b/c/src/ada-tests/sptests/sp21/sp21.scn
deleted file mode 100644
index 86dd4922b4..0000000000
--- a/c/src/ada-tests/sptests/sp21/sp21.scn
+++ /dev/null
@@ -1,19 +0,0 @@
-*** TEST 21 ***
------ TESTING THE NULL DRIVER CHECKS -----
-TA1 - io_initialize - NULL DRIVER SUCCESSFUL
-TA1 - io_open - NULL DRIVER SUCCESSFUL
-TA1 - io_close - NULL DRIVER SUCCESSFUL
-TA1 - io_read - NULL DRIVER SUCCESSFUL
-TA1 - io_write - NULL DRIVER SUCCESSFUL
-TA1 - io_control - NULL DRIVER SUCCESSFUL
------ TESTING THE I/O MANAGER DIRECTIVES -----
-TA1 - io_initialize - STUB DRIVER SUCCESSFUL
-TA1 - io_open - STUB DRIVER SUCCESSFUL
-TA1 - io_close - STUB DRIVER SUCCESSFUL
-TA1 - io_read - STUB DRIVER SUCCESSFUL
-TA1 - io_write - STUB DRIVER SUCCESSFUL
-TA1 - io_control - STUB DRIVER SUCCESSFUL
------ RETURNING INVALID MAJOR NUMBER -----
-TA1 - io_initialize - INVALID_NUMBER
-TA1 - io_open - INVALID_NUMBER
-*** END OF TEST 21 ***
diff --git a/c/src/ada-tests/sptests/sp21/sptest.adb b/c/src/ada-tests/sptests/sp21/sptest.adb
deleted file mode 100644
index 8ec76a7cf0..0000000000
--- a/c/src/ada-tests/sptests/sp21/sptest.adb
+++ /dev/null
@@ -1,270 +0,0 @@
---
--- SPTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 21 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with TEST_SUPPORT;
-with TEXT_IO;
-
-package body SPTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TEST 21 ***" );
-
- SPTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME( 'T', 'A', '1', ' ' );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 1 ),
- 1,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA1" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 1 ),
- SPTEST.TASK_1'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA1" );
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- TASK_1
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- RETURN_VALUE : RTEMS.UNSIGNED32;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.PUT_LINE( "----- TESTING THE NULL DRIVER CHECKS -----" );
-
- RTEMS.IO_INITIALIZE(
- SPTEST.NO_DRIVER_MAJOR,
- 0,
- RTEMS.NULL_ADDRESS,
- RETURN_VALUE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "IO_INITIALIZE" );
- TEXT_IO.PUT_LINE(
- "TA1 - io_initialize - NULL DRIVER SUCCESSFUL"
- );
-
- RTEMS.IO_OPEN(
- SPTEST.NO_DRIVER_MAJOR,
- 0,
- RTEMS.NULL_ADDRESS,
- RETURN_VALUE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "IO_OPEN" );
- TEXT_IO.PUT_LINE(
- "TA1 - io_open - NULL DRIVER SUCCESSFUL"
- );
-
- RTEMS.IO_CLOSE(
- SPTEST.NO_DRIVER_MAJOR,
- 0,
- RTEMS.NULL_ADDRESS,
- RETURN_VALUE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "IO_CLOSE" );
- TEXT_IO.PUT_LINE(
- "TA1 - io_close - NULL DRIVER SUCCESSFUL"
- );
-
- RTEMS.IO_READ(
- SPTEST.NO_DRIVER_MAJOR,
- 0,
- RTEMS.NULL_ADDRESS,
- RETURN_VALUE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "IO_READ" );
- TEXT_IO.PUT_LINE(
- "TA1 - io_read - NULL DRIVER SUCCESSFUL"
- );
-
- RTEMS.IO_WRITE(
- SPTEST.NO_DRIVER_MAJOR,
- 0,
- RTEMS.NULL_ADDRESS,
- RETURN_VALUE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "IO_WRITE" );
- TEXT_IO.PUT_LINE(
- "TA1 - io_write - NULL DRIVER SUCCESSFUL"
- );
-
- RTEMS.IO_CONTROL(
- SPTEST.NO_DRIVER_MAJOR,
- 0,
- RTEMS.NULL_ADDRESS,
- RETURN_VALUE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "IO_CONTROL" );
- TEXT_IO.PUT_LINE(
- "TA1 - io_control - NULL DRIVER SUCCESSFUL"
- );
-
- TEXT_IO.PUT_LINE( "----- TESTING THE I/O MANAGER DIRECTIVES -----" );
-
- RTEMS.IO_INITIALIZE(
- SPTEST.STUB_DRIVER_MAJOR,
- 0,
- RTEMS.NULL_ADDRESS,
- RETURN_VALUE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "IO_INITIALIZE" );
- TEXT_IO.PUT_LINE(
- "TA1 - io_initialize - STUB DRIVER SUCCESSFUL"
- );
-
- RTEMS.IO_OPEN(
- SPTEST.STUB_DRIVER_MAJOR,
- 0,
- RTEMS.NULL_ADDRESS,
- RETURN_VALUE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "IO_OPEN" );
- TEXT_IO.PUT_LINE(
- "TA1 - io_open - STUB DRIVER SUCCESSFUL"
- );
-
- RTEMS.IO_CLOSE(
- SPTEST.STUB_DRIVER_MAJOR,
- 0,
- RTEMS.NULL_ADDRESS,
- RETURN_VALUE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "IO_CLOSE" );
- TEXT_IO.PUT_LINE(
- "TA1 - io_close - STUB DRIVER SUCCESSFUL"
- );
-
- RTEMS.IO_READ(
- SPTEST.STUB_DRIVER_MAJOR,
- 0,
- RTEMS.NULL_ADDRESS,
- RETURN_VALUE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "IO_READ" );
- TEXT_IO.PUT_LINE(
- "TA1 - io_read - STUB DRIVER SUCCESSFUL"
- );
-
- RTEMS.IO_WRITE(
- SPTEST.STUB_DRIVER_MAJOR,
- 0,
- RTEMS.NULL_ADDRESS,
- RETURN_VALUE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "IO_WRITE" );
- TEXT_IO.PUT_LINE(
- "TA1 - io_write - STUB DRIVER SUCCESSFUL"
- );
-
- RTEMS.IO_CONTROL(
- SPTEST.STUB_DRIVER_MAJOR,
- 0,
- RTEMS.NULL_ADDRESS,
- RETURN_VALUE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "IO_CONTROL" );
- TEXT_IO.PUT_LINE(
- "TA1 - io_control - STUB DRIVER SUCCESSFUL"
- );
-
- TEXT_IO.PUT_LINE( "----- RETURNING INVALID MAJOR NUMBER -----" );
-
- RTEMS.IO_INITIALIZE(
- SPTEST.INVALID_DRIVER_MAJOR,
- 0,
- RTEMS.NULL_ADDRESS,
- RETURN_VALUE,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_NUMBER,
- "IO_INITIALIZE"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - io_initialize - INVALID_NUMBER"
- );
-
- RTEMS.IO_OPEN(
- SPTEST.INVALID_DRIVER_MAJOR,
- 0,
- RTEMS.NULL_ADDRESS,
- RETURN_VALUE,
- STATUS
- );
- TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
- STATUS,
- RTEMS.INVALID_NUMBER,
- "IO_OPEN"
- );
- TEXT_IO.PUT_LINE(
- "TA1 - io_open - INVALID_NUMBER"
- );
-
- TEXT_IO.PUT_LINE( "*** END OF TEST 21 ***" );
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end TASK_1;
-
-end SPTEST;
diff --git a/c/src/ada-tests/sptests/sp21/sptest.ads b/c/src/ada-tests/sptests/sp21/sptest.ads
deleted file mode 100644
index 04a8ad9c4f..0000000000
--- a/c/src/ada-tests/sptests/sp21/sptest.ads
+++ /dev/null
@@ -1,69 +0,0 @@
---
--- SPTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 21 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-package SPTEST is
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
- TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
-
---
--- The following constants define the device major numbers
--- utilized by this test.
---
-
- NO_DRIVER_MAJOR : constant RTEMS.DEVICE_MAJOR_NUMBER := 3;
- INVALID_DRIVER_MAJOR : constant RTEMS.DEVICE_MAJOR_NUMBER := 5;
- STUB_DRIVER_MAJOR : constant RTEMS.DEVICE_MAJOR_NUMBER := 2;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_1
---
--- DESCRIPTION:
---
--- This RTEMS task tests the Input Output Manager.
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end SPTEST;
diff --git a/c/src/ada-tests/sptests/sp22/config.h b/c/src/ada-tests/sptests/sp22/config.h
deleted file mode 100644
index 09a09692a8..0000000000
--- a/c/src/ada-tests/sptests/sp22/config.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MAXIMUM_TIMERS 2
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/sptests/sp22/sp22.adb b/c/src/ada-tests/sptests/sp22/sp22.adb
deleted file mode 100644
index 06cb14a01f..0000000000
--- a/c/src/ada-tests/sptests/sp22/sp22.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test SP22 of the Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with SPTEST;
-with TEST_SUPPORT;
-
-procedure SP22 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- SPTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end SP22;
-
diff --git a/c/src/ada-tests/sptests/sp22/sp22.scn b/c/src/ada-tests/sptests/sp22/sp22.scn
deleted file mode 100644
index 8422e73141..0000000000
--- a/c/src/ada-tests/sptests/sp22/sp22.scn
+++ /dev/null
@@ -1,29 +0,0 @@
-*** TEST 22 ***
-INIT - timer_create - creating timer 1
-INIT - timer 1 has id (16#10001#)
-TA1 - timer_ident - identing timer 1
-TA1 - timer 1 has id (16#10001#)
-TA1 - clock_get - 9: 0: 0 12/31/1988
-TA1 - timer_after - timer 1 in 3 seconds
-TA1 - task_suspend( SELF )
-TA1 - clock_get - 9: 0: 3 12/31/1988
-TA1 - timer_after - timer 1 in 3 seconds
-TA1 - task_wake_after - 1 second
-TA1 - clock_get - 9: 0: 4 12/31/1988
-TA1 - timer_reset - timer 1
-TA1 - task_suspend( SELF )
-TA1 - clock_get - 9: 0: 7 12/31/1988
-<pause>
-TA1 - timer_after - timer 1 in 3 seconds
-TA1 - timer_cancel - timer 1
-TA1 - clock_get - 9: 0: 7 12/31/1988
-TA1 - timer_when - timer 1 in 3 seconds
-TA1 - task_suspend( SELF )
-TA1 - clock_get - 9: 0:10 12/31/1988
-TA1 - timer_when - timer 1 in 3 seconds
-TA1 - task_wake_after - 1 second
-TA1 - clock_get - 9: 0:11 12/31/1988
-TA1 - timer_cancel - timer 1
-TA1 - task_wake_after - YIELD (only task at priority)
-TA1 - timer_delete - timer 1
-*** END OF TEST 22 ***
diff --git a/c/src/ada-tests/sptests/sp22/sptest.adb b/c/src/ada-tests/sptests/sp22/sptest.adb
deleted file mode 100644
index 830dbf9693..0000000000
--- a/c/src/ada-tests/sptests/sp22/sptest.adb
+++ /dev/null
@@ -1,299 +0,0 @@
---
--- SPTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 22 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with TEST_SUPPORT;
-with TEXT_IO;
-with UNSIGNED32_IO;
-
-package body SPTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- TIME : RTEMS.TIME_OF_DAY;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TEST 22 ***" );
-
- TIME := ( 1988, 12, 31, 9, 0, 0, 0 );
-
- RTEMS.CLOCK_SET( TIME, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_SET" );
-
- SPTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME( 'T', 'A', '1', ' ' );
- SPTEST.TIMER_NAME( 1 ) := RTEMS.BUILD_NAME( 'T', 'M', '1', ' ' );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 1 ),
- 1,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA1" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 1 ),
- SPTEST.TASK_1'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA1" );
-
- TEXT_IO.PUT_LINE( "INIT - timer_create - creating timer 1" );
- RTEMS.TIMER_CREATE(
- SPTEST.TIMER_NAME( 1 ),
- SPTEST.TIMER_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_CREATE OF TM1" );
- TEXT_IO.PUT( "INIT - timer 1 has id (" );
- UNSIGNED32_IO.PUT( SPTEST.TIMER_ID( 1 ), WIDTH => 8, BASE => 16 );
- TEXT_IO.PUT_LINE( ")" );
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- DELAYED_RESUME
---
-
- procedure DELAYED_RESUME (
- IGNORED_ID : in RTEMS.ID;
- IGNORED_ADDRESS : in RTEMS.ADDRESS
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.TASK_RESUME( SPTEST.TASK_ID( 1 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_RESUME OF SELF" );
-
- end DELAYED_RESUME;
-
---PAGE
---
--- PRINT_TIME
---
-
- procedure PRINT_TIME
- is
- TIME : RTEMS.TIME_OF_DAY;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.CLOCK_GET( RTEMS.CLOCK_GET_TOD, TIME'ADDRESS, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_GET" );
-
- TEST_SUPPORT.PUT_NAME(
- SPTEST.TASK_NAME( 1 ),
- FALSE
- );
-
- TEST_SUPPORT.PRINT_TIME( "- clock_get - ", TIME, "" );
- TEXT_IO.NEW_LINE;
-
- end PRINT_TIME;
-
---PAGE
---
--- TASK_1
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- TMID : RTEMS.ID;
- TIME : RTEMS.TIME_OF_DAY;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
--- GET ID
-
- TEXT_IO.PUT_LINE( "TA1 - timer_ident - identing timer 1" );
- RTEMS.TIMER_IDENT( SPTEST.TIMER_NAME( 1 ), TMID, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_IDENT OF TM1" );
- TEXT_IO.PUT( "TA1 - timer 1 has id (" );
- UNSIGNED32_IO.PUT( SPTEST.TIMER_ID( 1 ), WIDTH => 8, BASE => 16 );
- TEXT_IO.PUT_LINE( ")" );
-
--- AFTER WHICH IS ALLOWED TO FIRE
-
- SPTEST.PRINT_TIME;
-
- TEXT_IO.PUT_LINE( "TA1 - timer_after - timer 1 in 3 seconds" );
- RTEMS.TIMER_FIRE_AFTER(
- TMID,
- 3 * TEST_SUPPORT.TICKS_PER_SECOND,
- SPTEST.DELAYED_RESUME'ACCESS,
- RTEMS.NULL_ADDRESS,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_FIRE_AFTER" );
-
- TEXT_IO.PUT_LINE( "TA1 - task_suspend( SELF )" );
- RTEMS.TASK_SUSPEND( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SUSPEND" );
-
- SPTEST.PRINT_TIME;
-
--- AFTER WHICH IS RESET AND ALLOWED TO FIRE
-
- TEXT_IO.PUT_LINE( "TA1 - timer_after - timer 1 in 3 seconds" );
- RTEMS.TIMER_FIRE_AFTER(
- TMID,
- 3 * TEST_SUPPORT.TICKS_PER_SECOND,
- SPTEST.DELAYED_RESUME'ACCESS,
- RTEMS.NULL_ADDRESS,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_FIRE_AFTER" );
-
- TEXT_IO.PUT_LINE( "TA1 - task_wake_after - 1 second" );
- RTEMS.TASK_WAKE_AFTER( TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- SPTEST.PRINT_TIME;
-
- TEXT_IO.PUT_LINE( "TA1 - timer_reset - timer 1" );
- RTEMS.TIMER_RESET( TMID, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_RESET" );
-
- TEXT_IO.PUT_LINE( "TA1 - task_suspend( SELF )" );
- RTEMS.TASK_SUSPEND( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SUSPEND" );
-
- SPTEST.PRINT_TIME;
-
-TEST_SUPPORT.PAUSE;
-
---
--- Reset the time since we do not know how long the user waited
--- before pressing <cr> at the pause. This insures that the
--- actual output matches the screen.
---
-
- TIME := ( 1988, 12, 31, 9, 0, 7, 0 );
-
- RTEMS.CLOCK_SET( TIME, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_SET" );
-
--- after which is canceled
-
- TEXT_IO.PUT_LINE( "TA1 - timer_after - timer 1 in 3 seconds" );
- RTEMS.TIMER_FIRE_AFTER(
- TMID,
- 3 * TEST_SUPPORT.TICKS_PER_SECOND,
- SPTEST.DELAYED_RESUME'ACCESS,
- RTEMS.NULL_ADDRESS,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_FIRE_AFTER" );
-
- TEXT_IO.PUT_LINE( "TA1 - timer_cancel - timer 1" );
- RTEMS.TIMER_CANCEL( TMID, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_CANCEL" );
-
--- when which is allowed to fire
-
- SPTEST.PRINT_TIME;
-
- RTEMS.CLOCK_GET( RTEMS.CLOCK_GET_TOD, TIME'ADDRESS, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_GET" );
-
- TIME.SECOND := TIME.SECOND + 3;
-
- TEXT_IO.PUT_LINE( "TA1 - timer_when - timer 1 in 3 seconds" );
- RTEMS.TIMER_FIRE_WHEN(
- TMID,
- TIME,
- SPTEST.DELAYED_RESUME'ACCESS,
- RTEMS.NULL_ADDRESS,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_FIRE_WHEN" );
-
- TEXT_IO.PUT_LINE( "TA1 - task_suspend( SELF )" );
- RTEMS.TASK_SUSPEND( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SUSPEND" );
-
- SPTEST.PRINT_TIME;
-
--- when which is canceled
-
- RTEMS.CLOCK_GET( RTEMS.CLOCK_GET_TOD, TIME'ADDRESS, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_GET" );
-
- TIME.SECOND := TIME.SECOND + 3;
-
- TEXT_IO.PUT_LINE( "TA1 - timer_when - timer 1 in 3 seconds" );
- RTEMS.TIMER_FIRE_WHEN(
- TMID,
- TIME,
- SPTEST.DELAYED_RESUME'ACCESS,
- RTEMS.NULL_ADDRESS,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_FIRE_WHEN" );
-
- TEXT_IO.PUT_LINE( "TA1 - task_wake_after - 1 second" );
- RTEMS.TASK_WAKE_AFTER( TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- SPTEST.PRINT_TIME;
-
- TEXT_IO.PUT_LINE( "TA1 - timer_cancel - timer 1" );
- RTEMS.TIMER_CANCEL( TMID, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_CANCEL" );
-
--- delete
-
- TEXT_IO.PUT_LINE(
- "TA1 - task_wake_after - YIELD (only task at priority)"
- );
- RTEMS.TASK_WAKE_AFTER( RTEMS.YIELD_PROCESSOR, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER YIELD" );
-
- TEXT_IO.PUT_LINE( "TA1 - timer_delete - timer 1" );
- RTEMS.TIMER_DELETE( TMID, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_DELETE" );
-
- TEXT_IO.PUT_LINE( "*** END OF TEST 22 ***" );
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end TASK_1;
-
-end SPTEST;
diff --git a/c/src/ada-tests/sptests/sp22/sptest.ads b/c/src/ada-tests/sptests/sp22/sptest.ads
deleted file mode 100644
index 9401ce1cc0..0000000000
--- a/c/src/ada-tests/sptests/sp22/sptest.ads
+++ /dev/null
@@ -1,92 +0,0 @@
---
--- SPTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 22 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-package SPTEST is
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 1 ) of RTEMS.ID;
- TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 1 ) of RTEMS.NAME;
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS timers created
--- by this test.
---
-
- TIMER_ID : array ( RTEMS.UNSIGNED32 range 1 .. 1 ) of RTEMS.ID;
- TIMER_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 1 ) of RTEMS.NAME;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- DELAYED_RESUME
---
--- DESCRIPTION:
---
--- This subprogram is scheduled to be fired as a timer service
--- routine. When fired this subprogram resumes TASK_1.
---
-
- procedure DELAYED_RESUME (
- IGNORED_ID : in RTEMS.ID;
- IGNORED_ADDRESS : in RTEMS.ADDRESS
- );
-
---
--- PRINT_TIME
---
--- DESCRIPTION:
---
--- This subprogram prints the name of TASK_1 and the current TIME of day.
---
-
- procedure PRINT_TIME;
-
---
--- TASK_1
---
--- DESCRIPTION:
---
--- This RTEMS task tests the Timer Manager.
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end SPTEST;
diff --git a/c/src/ada-tests/sptests/sp23/config.h b/c/src/ada-tests/sptests/sp23/config.h
deleted file mode 100644
index 5e60e5c235..0000000000
--- a/c/src/ada-tests/sptests/sp23/config.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MAXIMUM_PORTS 1
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/sptests/sp23/sp23.adb b/c/src/ada-tests/sptests/sp23/sp23.adb
deleted file mode 100644
index ff3d5c0c4c..0000000000
--- a/c/src/ada-tests/sptests/sp23/sp23.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test SP23 of the Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with SPTEST;
-with TEST_SUPPORT;
-
-procedure SP23 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- SPTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end SP23;
-
diff --git a/c/src/ada-tests/sptests/sp23/sp23.scn b/c/src/ada-tests/sptests/sp23/sp23.scn
deleted file mode 100644
index 1a3af24ac7..0000000000
--- a/c/src/ada-tests/sptests/sp23/sp23.scn
+++ /dev/null
@@ -1,9 +0,0 @@
-*** TEST 23 ***
-INIT - port_create - DP1 - internal = 16#1000# external = 16#2000#
-TA1 - port_ident - 16#10001#
-TA1 - port_external_to_internal - external: 16#200E# => internal: 16#100E#
-TA1 - port_internal_to_external - internal: 16#100E# => external: 16#200E#
-TA1 - port_external_to_internal - external: 16#300E# => internal: 16#300E#
-TA1 - port_internal_to_external - internal: 16#50E# => external: 16#50E#
-TA1 - port_delete - DP1
-*** END OF TEST 23 ***
diff --git a/c/src/ada-tests/sptests/sp23/sptest.adb b/c/src/ada-tests/sptests/sp23/sptest.adb
deleted file mode 100644
index 0ff783a197..0000000000
--- a/c/src/ada-tests/sptests/sp23/sptest.adb
+++ /dev/null
@@ -1,179 +0,0 @@
---
--- SPTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 23 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with ADDRESS_IO;
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with TEST_SUPPORT;
-with TEXT_IO;
-with UNSIGNED32_IO;
-
-package body SPTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- INTERNAL_AREA : RTEMS.ADDRESS;
- EXTERNAL_AREA : RTEMS.ADDRESS;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TEST 23 ***" );
-
- SPTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME( 'T', 'A', '1', ' ' );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 1 ),
- 1,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA1" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 1 ),
- SPTEST.TASK_1'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA1" );
-
- SPTEST.PORT_NAME( 1 ) := RTEMS.BUILD_NAME( 'D', 'P', '1', ' ' );
-
- INTERNAL_AREA := SPTEST.INTERNAL_PORT_AREA( 0 )'ADDRESS;
- EXTERNAL_AREA := SPTEST.EXTERNAL_PORT_AREA( 0 )'ADDRESS;
- RTEMS.PORT_CREATE(
- SPTEST.PORT_NAME( 1 ),
- INTERNAL_AREA,
- EXTERNAL_AREA,
- SPTEST.INTERNAL_PORT_AREA'LENGTH,
- SPTEST.PORT_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "PORT_CREATE OF DP1" );
- TEXT_IO.PUT( "INIT - port_create - DP1 - internal = " );
- ADDRESS_IO.PUT( INTERNAL_AREA, WIDTH => 8, BASE => 16 );
- TEXT_IO.PUT( " external = " );
- ADDRESS_IO.PUT( EXTERNAL_AREA, WIDTH => 8, BASE => 16 );
- TEXT_IO.NEW_LINE;
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- TASK_1
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- DPID : RTEMS.ID;
- TO_BE_CONVERTED : RTEMS.ADDRESS;
- CONVERTED : RTEMS.ADDRESS;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.PORT_IDENT( SPTEST.PORT_NAME( 1 ), DPID, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "PORT_IDENT" );
- TEXT_IO.PUT( "TA1 - port_ident - " );
- UNSIGNED32_IO.PUT( DPID, WIDTH => 8, BASE => 16 );
- TEXT_IO.NEW_LINE;
-
- TO_BE_CONVERTED := SPTEST.EXTERNAL_PORT_AREA( 16#E# )'ADDRESS;
- RTEMS.PORT_EXTERNAL_TO_INTERNAL(
- SPTEST.PORT_ID( 1 ),
- TO_BE_CONVERTED,
- CONVERTED,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "PORT_EXTERNAL_TO_INTERNAL" );
- TEXT_IO.PUT( "TA1 - port_external_to_internal - external: " );
- ADDRESS_IO.PUT( TO_BE_CONVERTED, WIDTH => 8, BASE => 16 );
- TEXT_IO.PUT( " => internal: " );
- ADDRESS_IO.PUT( CONVERTED, WIDTH => 8, BASE => 16 );
- TEXT_IO.NEW_LINE;
-
- TO_BE_CONVERTED := SPTEST.INTERNAL_PORT_AREA( 16#E# )'ADDRESS;
- RTEMS.PORT_INTERNAL_TO_EXTERNAL(
- SPTEST.PORT_ID( 1 ),
- TO_BE_CONVERTED,
- CONVERTED,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "PORT_INTERNAL_TO_EXTERNAL" );
- TEXT_IO.PUT( "TA1 - port_internal_to_external - internal: " );
- ADDRESS_IO.PUT( TO_BE_CONVERTED, WIDTH => 8, BASE => 16 );
- TEXT_IO.PUT( " => external: " );
- ADDRESS_IO.PUT( CONVERTED, WIDTH => 8, BASE => 16 );
- TEXT_IO.NEW_LINE;
-
- TO_BE_CONVERTED := SPTEST.ABOVE_PORT_AREA( 16#E# )'ADDRESS;
- RTEMS.PORT_EXTERNAL_TO_INTERNAL(
- SPTEST.PORT_ID( 1 ),
- TO_BE_CONVERTED,
- CONVERTED,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "PORT_EXTERNAL_TO_INTERNAL" );
- TEXT_IO.PUT( "TA1 - port_external_to_internal - external: " );
- ADDRESS_IO.PUT( TO_BE_CONVERTED, WIDTH => 8, BASE => 16 );
- TEXT_IO.PUT( " => internal: " );
- ADDRESS_IO.PUT( CONVERTED, WIDTH => 8, BASE => 16 );
- TEXT_IO.NEW_LINE;
-
- TO_BE_CONVERTED := SPTEST.BELOW_PORT_AREA( 16#E# )'ADDRESS;
- RTEMS.PORT_INTERNAL_TO_EXTERNAL(
- SPTEST.PORT_ID( 1 ),
- TO_BE_CONVERTED,
- CONVERTED,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "PORT_INTERNAL_TO_EXTERNAL" );
- TEXT_IO.PUT( "TA1 - port_internal_to_external - internal: " );
- ADDRESS_IO.PUT( TO_BE_CONVERTED, WIDTH => 8, BASE => 16 );
- TEXT_IO.PUT( " => external: " );
- ADDRESS_IO.PUT( CONVERTED, WIDTH => 8, BASE => 16 );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT_LINE( "TA1 - port_delete - DP1" );
- RTEMS.PORT_DELETE( SPTEST.PORT_ID( 1 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "PORT_DELETE" );
-
- TEXT_IO.PUT_LINE( "*** END OF TEST 23 ***" );
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end TASK_1;
-
-end SPTEST;
diff --git a/c/src/ada-tests/sptests/sp23/sptest.ads b/c/src/ada-tests/sptests/sp23/sptest.ads
deleted file mode 100644
index 9c72b05568..0000000000
--- a/c/src/ada-tests/sptests/sp23/sptest.ads
+++ /dev/null
@@ -1,118 +0,0 @@
---
--- SPTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 23 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with SYSTEM;
-with System.Storage_Elements;
-
-package SPTEST is
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 1 ) of RTEMS.ID;
- TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 1 ) of RTEMS.NAME;
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS ports created
--- by this test.
---
-
- PORT_ID : array ( RTEMS.UNSIGNED32 range 1 .. 1 ) of RTEMS.ID;
- PORT_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 1 ) of RTEMS.NAME;
-
---
--- The following area defines a memory area to be used as the
--- internal address space of the port.
---
-
- INTERNAL_PORT_AREA_ADDRESS : constant System.Address :=
- System.Storage_Elements.To_Address(16#00001000#);
-
- INTERNAL_PORT_AREA : array ( RTEMS.UNSIGNED32 range 0 .. 255 )
- of RTEMS.UNSIGNED8;
- for INTERNAL_PORT_AREA use at INTERNAL_PORT_AREA_ADDRESS;
-
---
--- The following area defines a memory area to be used as the
--- external address space of the port.
---
-
- EXTERNAL_PORT_AREA_ADDRESS : constant System.Address :=
- System.Storage_Elements.To_Address(16#00002000#);
-
- EXTERNAL_PORT_AREA : array ( RTEMS.UNSIGNED32 range 0 .. 255 )
- of RTEMS.UNSIGNED8;
- for EXTERNAL_PORT_AREA use at EXTERNAL_PORT_AREA_ADDRESS;
-
---
--- The following area defines a memory area to be used for
--- addresses which are below the address space of the port.
---
-
- BELOW_PORT_AREA_ADDRESS : constant System.Address :=
- System.Storage_Elements.To_Address(16#00000500#);
-
- BELOW_PORT_AREA : array ( RTEMS.UNSIGNED32 range 0 .. 255 )
- of RTEMS.UNSIGNED8;
- for BELOW_PORT_AREA use at BELOW_PORT_AREA_ADDRESS;
-
---
--- The following area defines a memory area to be used for
--- addresses which are above the address space of the port.
---
-
- ABOVE_PORT_AREA_ADDRESS : constant System.Address :=
- System.Storage_Elements.To_Address(16#00003000#);
-
- ABOVE_PORT_AREA : array ( RTEMS.UNSIGNED32 range 0 .. 255 )
- of RTEMS.UNSIGNED8;
- for ABOVE_PORT_AREA use at ABOVE_PORT_AREA_ADDRESS;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_1
---
--- DESCRIPTION:
---
--- This RTEMS task tests the Dual Ported Memory Manager.
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end SPTEST;
diff --git a/c/src/ada-tests/sptests/sp24/config.h b/c/src/ada-tests/sptests/sp24/config.h
deleted file mode 100644
index ae1c63c601..0000000000
--- a/c/src/ada-tests/sptests/sp24/config.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MAXIMUM_TIMERS 3
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/sptests/sp24/sp24.adb b/c/src/ada-tests/sptests/sp24/sp24.adb
deleted file mode 100644
index d060a5308e..0000000000
--- a/c/src/ada-tests/sptests/sp24/sp24.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test SP24 of the Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with SPTEST;
-with TEST_SUPPORT;
-
-procedure SP24 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- SPTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end SP24;
-
diff --git a/c/src/ada-tests/sptests/sp24/sp24.scn b/c/src/ada-tests/sptests/sp24/sp24.scn
deleted file mode 100644
index 374ef9540b..0000000000
--- a/c/src/ada-tests/sptests/sp24/sp24.scn
+++ /dev/null
@@ -1,17 +0,0 @@
-*** TEST 24 ***
-TA1 - clock_get - 9: 0: 0 12/31/1988
-TA2 - clock_get - 9: 0: 0 12/31/1988
-TA3 - clock_get - 9: 0: 0 12/31/1988
-TA1 - clock_get - 9: 0: 5 12/31/1988
-TA2 - clock_get - 9: 0:10 12/31/1988
-TA1 - clock_get - 9: 0:10 12/31/1988
-TA3 - clock_get - 9: 0:15 12/31/1988
-TA1 - clock_get - 9: 0:15 12/31/1988
-TA2 - clock_get - 9: 0:20 12/31/1988
-TA1 - clock_get - 9: 0:20 12/31/1988
-TA1 - clock_get - 9: 0:25 12/31/1988
-TA3 - clock_get - 9: 0:30 12/31/1988
-TA1 - clock_get - 9: 0:30 12/31/1988
-TA2 - clock_get - 9: 0:30 12/31/1988
-*** END OF TEST 24 ***
-
diff --git a/c/src/ada-tests/sptests/sp24/sptest.adb b/c/src/ada-tests/sptests/sp24/sptest.adb
deleted file mode 100644
index b94a27eadb..0000000000
--- a/c/src/ada-tests/sptests/sp24/sptest.adb
+++ /dev/null
@@ -1,171 +0,0 @@
---
--- SPTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 24 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with TEST_SUPPORT;
-with TEXT_IO;
-
-package body SPTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- TIME : RTEMS.TIME_OF_DAY;
- INDEX : RTEMS.UNSIGNED32;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TEST 24 ***" );
-
- TIME := ( 1988, 12, 31, 9, 0, 0, 0 );
-
- RTEMS.CLOCK_SET( TIME, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_SET" );
-
- SPTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME( 'T', 'A', '1', ' ' );
- SPTEST.TASK_NAME( 2 ) := RTEMS.BUILD_NAME( 'T', 'A', '2', ' ' );
- SPTEST.TASK_NAME( 3 ) := RTEMS.BUILD_NAME( 'T', 'A', '3', ' ' );
-
- SPTEST.TIMER_NAME( 1 ) := RTEMS.BUILD_NAME( 'T', 'M', '1', ' ' );
- SPTEST.TIMER_NAME( 2 ) := RTEMS.BUILD_NAME( 'T', 'M', '2', ' ' );
- SPTEST.TIMER_NAME( 3 ) := RTEMS.BUILD_NAME( 'T', 'M', '3', ' ' );
-
- for INDEX in 1 .. 3
- loop
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( INDEX ),
- 1,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( INDEX ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE LOOP" );
-
- RTEMS.TIMER_CREATE(
- SPTEST.TIMER_NAME( INDEX ),
- SPTEST.TIMER_ID( INDEX ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_CREATE LOOP" );
-
- end loop;
-
- for INDEX in 1 .. 3
- loop
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( INDEX ),
- SPTEST.TASK_1_THROUGH_3'ACCESS,
- RTEMS.TASK_ARGUMENT( INDEX ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START LOOP" );
-
- end loop;
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- RESUME_TASK
---
-
- procedure RESUME_TASK (
- TIMER_ID : in RTEMS.ID;
- IGNORED_ADDRESS : in RTEMS.ADDRESS
- ) is
- TASK_TO_RESUME : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TASK_TO_RESUME := SPTEST.TASK_ID(INTEGER( RTEMS.GET_INDEX( TIMER_ID ) ));
- RTEMS.TASK_RESUME( TASK_TO_RESUME, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_RESUME" );
-
- end RESUME_TASK;
-
---PAGE
---
--- TASK_1_THROUGH_3
---
-
- procedure TASK_1_THROUGH_3 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- TID : RTEMS.ID;
- TIME : RTEMS.TIME_OF_DAY;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.TASK_IDENT( RTEMS.SELF, RTEMS.SEARCH_ALL_NODES, TID, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_IDENT OF SELF" );
-
- loop
-
- RTEMS.TIMER_FIRE_AFTER(
- SPTEST.TIMER_ID( INTEGER( ARGUMENT ) ),
- TEST_SUPPORT.TASK_NUMBER( TID ) * 5 *
- TEST_SUPPORT.TICKS_PER_SECOND,
- SPTEST.RESUME_TASK'ACCESS,
- RTEMS.NULL_ADDRESS,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_FIRE_AFTER" );
-
- RTEMS.CLOCK_GET( RTEMS.CLOCK_GET_TOD, TIME'ADDRESS, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_GET" );
-
- if TIME.SECOND >= 35 then
- TEXT_IO.PUT_LINE( "*** END OF TEST 24 ***" );
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
- end if;
-
- TEST_SUPPORT.PUT_NAME(
- SPTEST.TASK_NAME( INTEGER( TEST_SUPPORT.TASK_NUMBER( TID ) ) ),
- FALSE
- );
-
- TEST_SUPPORT.PRINT_TIME( " - clock_get - ", TIME, "" );
- TEXT_IO.NEW_LINE;
-
- RTEMS.TASK_SUSPEND( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SUSPEND" );
-
- end loop;
-
- end TASK_1_THROUGH_3;
-
-end SPTEST;
diff --git a/c/src/ada-tests/sptests/sp24/sptest.ads b/c/src/ada-tests/sptests/sp24/sptest.ads
deleted file mode 100644
index f664be5bd8..0000000000
--- a/c/src/ada-tests/sptests/sp24/sptest.ads
+++ /dev/null
@@ -1,82 +0,0 @@
---
--- SPTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 24 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-package SPTEST is
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test.
---
-
- TASK_ID : array ( 1 .. 3 ) of RTEMS.ID;
- TASK_NAME : array ( 1 .. 3 ) of RTEMS.NAME;
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS timers created
--- by this test.
---
-
- TIMER_ID : array ( 1 .. 3 ) of RTEMS.ID;
- TIMER_NAME : array ( 1 .. 3 ) of RTEMS.NAME;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- RESUME_TASK
---
--- DESCRIPTION:
---
--- This subprogram is scheduled as a timer service routine. When
--- it fires it resumes the task which is mapped to this timer.
---
-
- procedure RESUME_TASK (
- TIMER_ID : in RTEMS.ID;
- IGNORED_ADDRESS : in RTEMS.ADDRESS
- );
-
---
--- TASK_1_THROUGH_3
---
--- DESCRIPTION:
---
--- This RTEMS task tests the Timer Manager.
---
-
- procedure TASK_1_THROUGH_3 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end SPTEST;
diff --git a/c/src/ada-tests/sptests/sp25/config.h b/c/src/ada-tests/sptests/sp25/config.h
deleted file mode 100644
index 5d162bd899..0000000000
--- a/c/src/ada-tests/sptests/sp25/config.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MAXIMUM_REGIONS 1
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/sptests/sp25/sp25.adb b/c/src/ada-tests/sptests/sp25/sp25.adb
deleted file mode 100644
index 58e45b339d..0000000000
--- a/c/src/ada-tests/sptests/sp25/sp25.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test SP25 of the Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with SPTEST;
-with TEST_SUPPORT;
-
-procedure SP25 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- SPTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end SP25;
-
diff --git a/c/src/ada-tests/sptests/sp25/sp25.scn b/c/src/ada-tests/sptests/sp25/sp25.scn
deleted file mode 100644
index 0b0fbcf102..0000000000
--- a/c/src/ada-tests/sptests/sp25/sp25.scn
+++ /dev/null
@@ -1,29 +0,0 @@
-*** TEST 25 ***
-TA1 - region_ident - rnid => 16#10001#
-TA1 - region_get_segment - wait on 64 byte segment from region 1
-TA1 - got segment from region 1 - 16#F9B8#
-TA1 - region_get_segment - wait on 128 byte segment from region 1
-TA1 - got segment from region 1 - 16#F930#
-TA1 - region_get_segment - wait on 256 byte segment from region 1
-TA1 - got segment from region 1 - 16#F828#
-TA1 - region_get_segment - wait on 512 byte segment from region 1
-TA1 - got segment from region 1 - 16#F620#
-TA1 - region_get_segment - wait on 1024 byte segment from region 1
-TA1 - got segment from region 1 - 16#F218#
-TA1 - region_get_segment - wait on 2048 byte segment from region 1
-TA1 - got segment from region 1 - 16#EA10#
-TA1 - region_get_segment - wait on 4096 byte segment from region 1
-TA1 - got segment from region 1 - 16#DA08#
-TA1 - region_get_segment - wait on 8192 byte segment from region 1
-TA1 - got segment from region 1 - 16#BA00#
-<pause>
-TA1 - region_return_segment - return segment to region 1 - 16#F828#
-TA1 - region_return_segment - return segment to region 1 - 16#F620#
-TA1 - region_return_segment - return segment to region 1 - 16#F9B8#
-TA1 - region_return_segment - return segment to region 1 - 16#F930#
-TA1 - region_return_segment - return segment to region 1 - 16#DA08#
-TA1 - region_return_segment - return segment to region 1 - 16#EA10#
-TA1 - region_return_segment - return segment to region 1 - 16#BA00#
-TA1 - region_return_segment - return segment to region 1 - 16#F218#
-TA1 - region_delete - walks heap if debug enabled
-*** END OF TEST 25 ***
diff --git a/c/src/ada-tests/sptests/sp25/sptest.adb b/c/src/ada-tests/sptests/sp25/sptest.adb
deleted file mode 100644
index a9aace5212..0000000000
--- a/c/src/ada-tests/sptests/sp25/sptest.adb
+++ /dev/null
@@ -1,367 +0,0 @@
---
--- SPTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 25 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with TEST_SUPPORT;
-with TEXT_IO;
-with UNSIGNED32_IO;
-
-package body SPTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TEST 25 ***" );
-
- SPTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME( 'T', 'A', '1', ' ' );
-
- RTEMS.TASK_CREATE(
- SPTEST.TASK_NAME( 1 ),
- SPTEST.BASE_PRIORITY,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA1" );
-
- RTEMS.TASK_START(
- SPTEST.TASK_ID( 1 ),
- SPTEST.TASK_1'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA1" );
-
- SPTEST.REGION_NAME( 1 ) := RTEMS.BUILD_NAME( 'R', 'N', '1', ' ' );
-
- RTEMS.REGION_CREATE(
- SPTEST.REGION_NAME( 1 ),
- SPTEST.AREA_1'ADDRESS,
- 64000,
- 32,
- RTEMS.DEFAULT_ATTRIBUTES,
- SPTEST.REGION_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_CREATE OF RN1" );
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- PUT_ADDRESS_FROM_AREA_1
---
-
- procedure PUT_ADDRESS_FROM_AREA_1 (
- TO_BE_PRINTED : in RTEMS.ADDRESS
- ) is
-
- begin
-
- UNSIGNED32_IO.PUT(
- RTEMS.SUBTRACT( TO_BE_PRINTED, SPTEST.AREA_1'ADDRESS ),
- WIDTH => 8,
- BASE => 16
- );
-
- end PUT_ADDRESS_FROM_AREA_1;
-
---PAGE
---
--- TASK_1
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- RNID : RTEMS.ID;
- SEGMENT_ADDRESS_1 : RTEMS.ADDRESS;
- SEGMENT_ADDRESS_2 : RTEMS.ADDRESS;
- SEGMENT_ADDRESS_3 : RTEMS.ADDRESS;
- SEGMENT_ADDRESS_4 : RTEMS.ADDRESS;
- SEGMENT_ADDRESS_5 : RTEMS.ADDRESS;
- SEGMENT_ADDRESS_6 : RTEMS.ADDRESS;
- SEGMENT_ADDRESS_7 : RTEMS.ADDRESS;
- SEGMENT_ADDRESS_8 : RTEMS.ADDRESS;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.REGION_IDENT( SPTEST.REGION_NAME( 1 ), RNID, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_IDENT OF RN1" );
- TEXT_IO.PUT( "TA1 - region_ident - rnid => " );
- UNSIGNED32_IO.PUT( RNID, WIDTH => 8, BASE => 16 );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT( "TA1 - region_get_segment - wait on " );
- TEXT_IO.PUT_LINE( "64 byte segment from region 1" );
- RTEMS.REGION_GET_SEGMENT(
- SPTEST.REGION_ID( 1 ),
- 64,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- SEGMENT_ADDRESS_1,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_GET_SEGMENT" );
- TEXT_IO.PUT( "TA1 - got segment from region 1 - " );
- SPTEST.PUT_ADDRESS_FROM_AREA_1( SEGMENT_ADDRESS_1 );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT( "TA1 - region_get_segment - wait on " );
- TEXT_IO.PUT_LINE( "128 byte segment from region 1" );
- RTEMS.REGION_GET_SEGMENT(
- SPTEST.REGION_ID( 1 ),
- 128,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- SEGMENT_ADDRESS_2,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_GET_SEGMENT" );
- TEXT_IO.PUT( "TA1 - got segment from region 1 - " );
- SPTEST.PUT_ADDRESS_FROM_AREA_1( SEGMENT_ADDRESS_2 );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT( "TA1 - region_get_segment - wait on " );
- TEXT_IO.PUT_LINE( "256 byte segment from region 1" );
- RTEMS.REGION_GET_SEGMENT(
- SPTEST.REGION_ID( 1 ),
- 256,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- SEGMENT_ADDRESS_3,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_GET_SEGMENT" );
- TEXT_IO.PUT( "TA1 - got segment from region 1 - " );
- SPTEST.PUT_ADDRESS_FROM_AREA_1( SEGMENT_ADDRESS_3 );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT( "TA1 - region_get_segment - wait on " );
- TEXT_IO.PUT_LINE( "512 byte segment from region 1" );
- RTEMS.REGION_GET_SEGMENT(
- SPTEST.REGION_ID( 1 ),
- 512,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- SEGMENT_ADDRESS_4,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_GET_SEGMENT" );
- TEXT_IO.PUT( "TA1 - got segment from region 1 - " );
- SPTEST.PUT_ADDRESS_FROM_AREA_1( SEGMENT_ADDRESS_4 );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT( "TA1 - region_get_segment - wait on " );
- TEXT_IO.PUT_LINE( "1024 byte segment from region 1" );
- RTEMS.REGION_GET_SEGMENT(
- SPTEST.REGION_ID( 1 ),
- 1024,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- SEGMENT_ADDRESS_5,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_GET_SEGMENT" );
- TEXT_IO.PUT( "TA1 - got segment from region 1 - " );
- SPTEST.PUT_ADDRESS_FROM_AREA_1( SEGMENT_ADDRESS_5 );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT( "TA1 - region_get_segment - wait on " );
- TEXT_IO.PUT_LINE( "2048 byte segment from region 1" );
- RTEMS.REGION_GET_SEGMENT(
- SPTEST.REGION_ID( 1 ),
- 2048,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- SEGMENT_ADDRESS_6,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_GET_SEGMENT" );
- TEXT_IO.PUT( "TA1 - got segment from region 1 - " );
- SPTEST.PUT_ADDRESS_FROM_AREA_1( SEGMENT_ADDRESS_6 );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT( "TA1 - region_get_segment - wait on " );
- TEXT_IO.PUT_LINE( "4096 byte segment from region 1" );
- RTEMS.REGION_GET_SEGMENT(
- SPTEST.REGION_ID( 1 ),
- 4096,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- SEGMENT_ADDRESS_7,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_GET_SEGMENT" );
- TEXT_IO.PUT( "TA1 - got segment from region 1 - " );
- SPTEST.PUT_ADDRESS_FROM_AREA_1( SEGMENT_ADDRESS_7 );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT( "TA1 - region_get_segment - wait on " );
- TEXT_IO.PUT_LINE( "8192 byte segment from region 1" );
- RTEMS.REGION_GET_SEGMENT(
- SPTEST.REGION_ID( 1 ),
- 8192,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- SEGMENT_ADDRESS_8,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_GET_SEGMENT" );
- TEXT_IO.PUT( "TA1 - got segment from region 1 - " );
- SPTEST.PUT_ADDRESS_FROM_AREA_1( SEGMENT_ADDRESS_8 );
- TEXT_IO.NEW_LINE;
-
-TEST_SUPPORT.PAUSE;
-
- TEXT_IO.PUT(
- "TA1 - region_return_segment - return segment to region 1 - "
- );
- SPTEST.PUT_ADDRESS_FROM_AREA_1( SEGMENT_ADDRESS_3 );
- RTEMS.REGION_RETURN_SEGMENT(
- SPTEST.REGION_ID( 1 ),
- SEGMENT_ADDRESS_3,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_RETURN_SEGMENT" );
- TEXT_IO.NEW_LINE;
- SEGMENT_ADDRESS_3 := RTEMS.NULL_ADDRESS;
-
- TEXT_IO.PUT(
- "TA1 - region_return_segment - return segment to region 1 - "
- );
- SPTEST.PUT_ADDRESS_FROM_AREA_1( SEGMENT_ADDRESS_4 );
- RTEMS.REGION_RETURN_SEGMENT(
- SPTEST.REGION_ID( 1 ),
- SEGMENT_ADDRESS_4,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_RETURN_SEGMENT" );
- TEXT_IO.NEW_LINE;
- SEGMENT_ADDRESS_4 := RTEMS.NULL_ADDRESS;
-
- TEXT_IO.PUT(
- "TA1 - region_return_segment - return segment to region 1 - "
- );
- SPTEST.PUT_ADDRESS_FROM_AREA_1( SEGMENT_ADDRESS_1 );
- RTEMS.REGION_RETURN_SEGMENT(
- SPTEST.REGION_ID( 1 ),
- SEGMENT_ADDRESS_1,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_RETURN_SEGMENT" );
- TEXT_IO.NEW_LINE;
- SEGMENT_ADDRESS_1 := RTEMS.NULL_ADDRESS;
-
- TEXT_IO.PUT(
- "TA1 - region_return_segment - return segment to region 1 - "
- );
- SPTEST.PUT_ADDRESS_FROM_AREA_1( SEGMENT_ADDRESS_2 );
- RTEMS.REGION_RETURN_SEGMENT(
- SPTEST.REGION_ID( 1 ),
- SEGMENT_ADDRESS_2,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_RETURN_SEGMENT" );
- TEXT_IO.NEW_LINE;
- SEGMENT_ADDRESS_2 := RTEMS.NULL_ADDRESS;
-
- TEXT_IO.PUT(
- "TA1 - region_return_segment - return segment to region 1 - "
- );
- SPTEST.PUT_ADDRESS_FROM_AREA_1( SEGMENT_ADDRESS_7 );
- RTEMS.REGION_RETURN_SEGMENT(
- SPTEST.REGION_ID( 1 ),
- SEGMENT_ADDRESS_7,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_RETURN_SEGMENT" );
- TEXT_IO.NEW_LINE;
- SEGMENT_ADDRESS_7 := RTEMS.NULL_ADDRESS;
-
- TEXT_IO.PUT(
- "TA1 - region_return_segment - return segment to region 1 - "
- );
- SPTEST.PUT_ADDRESS_FROM_AREA_1( SEGMENT_ADDRESS_6 );
- RTEMS.REGION_RETURN_SEGMENT(
- SPTEST.REGION_ID( 1 ),
- SEGMENT_ADDRESS_6,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_RETURN_SEGMENT" );
- TEXT_IO.NEW_LINE;
- SEGMENT_ADDRESS_6 := RTEMS.NULL_ADDRESS;
-
- TEXT_IO.PUT(
- "TA1 - region_return_segment - return segment to region 1 - "
- );
- SPTEST.PUT_ADDRESS_FROM_AREA_1( SEGMENT_ADDRESS_8 );
- RTEMS.REGION_RETURN_SEGMENT(
- SPTEST.REGION_ID( 1 ),
- SEGMENT_ADDRESS_8,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_RETURN_SEGMENT" );
- TEXT_IO.NEW_LINE;
- SEGMENT_ADDRESS_8 := RTEMS.NULL_ADDRESS;
-
- TEXT_IO.PUT(
- "TA1 - region_return_segment - return segment to region 1 - "
- );
- SPTEST.PUT_ADDRESS_FROM_AREA_1( SEGMENT_ADDRESS_5 );
- RTEMS.REGION_RETURN_SEGMENT(
- SPTEST.REGION_ID( 1 ),
- SEGMENT_ADDRESS_5,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_RETURN_SEGMENT" );
- TEXT_IO.NEW_LINE;
- SEGMENT_ADDRESS_5 := RTEMS.NULL_ADDRESS;
-
- TEXT_IO.PUT_LINE(
- "TA1 - region_delete - walks heap if debug enabled"
- );
- RTEMS.REGION_DELETE( SPTEST.REGION_ID( 1 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_DELETE OF RN1" );
-
- TEXT_IO.PUT_LINE( "*** END OF TEST 25 ***" );
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end TASK_1;
-
-end SPTEST;
diff --git a/c/src/ada-tests/sptests/sp25/sptest.ads b/c/src/ada-tests/sptests/sp25/sptest.ads
deleted file mode 100644
index 516421526f..0000000000
--- a/c/src/ada-tests/sptests/sp25/sptest.ads
+++ /dev/null
@@ -1,103 +0,0 @@
---
--- SPTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 25 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-package SPTEST is
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.ID;
- TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.NAME;
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS regions created
--- by this test.
---
-
- REGION_ID : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.ID;
- REGION_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.NAME;
-
---
--- The following constant defines the priority of most of the
--- RTEMS tasks in this test. This allows one of the tasks to
--- easily set itself to a higher priority than the rest.
---
-
- BASE_PRIORITY : constant RTEMS.TASK_PRIORITY := 140;
-
---
--- These arrays define the memory areas used for the regions in
--- this test.
---
-
- AREA_1 : array ( RTEMS.UNSIGNED32 range 0 .. 64000 ) of RTEMS.UNSIGNED8;
- for AREA_1'ALIGNMENT use RTEMS.STRUCTURE_ALIGNMENT;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- PUT_ADDRESS_FROM_AREA_1
---
--- DESCRIPTION:
---
--- This subprogram prints the offset of the address TO_BE_PRINTED
--- from the first byte of AREA_1.
---
--- NOTE:
---
--- This subprogram is used because the actual address of AREA_1
--- varies based upon the size of the executable, the target board,
--- and the target processor.
---
-
- procedure PUT_ADDRESS_FROM_AREA_1 (
- TO_BE_PRINTED : in RTEMS.ADDRESS
- );
-
---
--- TASK_1
---
--- DESCRIPTION:
---
--- This RTEMS task tests the Region Manager.
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end SPTEST;
diff --git a/c/src/ada-tests/sptests/spsize/spsize.adb b/c/src/ada-tests/sptests/spsize/spsize.adb
deleted file mode 100644
index e6da47f2ba..0000000000
--- a/c/src/ada-tests/sptests/spsize/spsize.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test SPsize of the Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with SPTEST;
-with TEST_SUPPORT;
-
-procedure SPsize is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- SPTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end SPsize;
-
diff --git a/c/src/ada-tests/sptests/spsize/sptest.adb b/c/src/ada-tests/sptests/spsize/sptest.adb
deleted file mode 100644
index 1080728f8f..0000000000
--- a/c/src/ada-tests/sptests/spsize/sptest.adb
+++ /dev/null
@@ -1,199 +0,0 @@
---
--- SPTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 1 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with RTEMS_TEST_SUPPORT;
-with TEST_SUPPORT;
-with TEXT_IO;
-with UNSIGNED32_IO;
-
-package body SPTEST is
-
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TEST SIZE ***" );
-
- SPTEST.PUT_SIZE(
- "Tasks",
- TRUE,
- "maximum_tasks",
- RTEMS_TEST_SUPPORT.PER_TASK
- );
-
- SPTEST.PUT_SIZE(
- "Timers",
- TRUE,
- "maximum_timers",
- RTEMS_TEST_SUPPORT.PER_TIMER
- );
-
- SPTEST.PUT_SIZE(
- "Semaphores",
- TRUE,
- "maximum_semaphores",
- RTEMS_TEST_SUPPORT.PER_SEMAPHORE
- );
-
- SPTEST.PUT_SIZE(
- "Message Queues",
- TRUE,
- "maximum_message_queues",
- RTEMS_TEST_SUPPORT.PER_MESSAGE_QUEUE
- );
-
- SPTEST.PUT_SIZE(
- "Messages",
- TRUE,
- "maximum_messages",
- RTEMS_TEST_SUPPORT.PER_MESSAGE
- );
-
- SPTEST.PUT_SIZE(
- "Regions",
- TRUE,
- "maximum_regions",
- RTEMS_TEST_SUPPORT.PER_REGION
- );
-
- SPTEST.PUT_SIZE(
- "Partitions",
- TRUE,
- "maximum_paritions",
- RTEMS_TEST_SUPPORT.PER_PARTITION
- );
-
- SPTEST.PUT_SIZE(
- "Ports",
- TRUE,
- "maximum_ports",
- RTEMS_TEST_SUPPORT.PER_PORT
- );
-
- SPTEST.PUT_SIZE(
- "Periods",
- TRUE,
- "maximum_periods",
- RTEMS_TEST_SUPPORT.PER_PERIOD
- );
-
- SPTEST.PUT_SIZE(
- "Extensions",
- TRUE,
- "maximum_extensions",
- RTEMS_TEST_SUPPORT.PER_EXTENSION
- );
-
- SPTEST.PUT_SIZE(
- "Device Drivers",
- TRUE,
- "number_of_device_drivers",
- RTEMS_TEST_SUPPORT.PER_DRIVER
- );
-
- SPTEST.PUT_SIZE(
- "System Requirements",
- FALSE,
- REQUIREMENT => RTEMS_TEST_SUPPORT.SYSTEM_REQUIREMENTS
- );
-
- SPTEST.PUT_SIZE(
- "Floating Point Tasks",
- TRUE,
- "FP attributes",
- RTEMS_TEST_SUPPORT.PER_FP_TASK
- );
-
- TEXT_IO.PUT_LINE( "User's Tasks' Stacks - " );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT_LINE( "Interrupt Stacks - " );
- TEXT_IO.NEW_LINE;
-
- SPTEST.PUT_SIZE(
- "Global object tables",
- TRUE,
- "maximum_nodes",
- RTEMS_TEST_SUPPORT.PER_NODE
- );
-
- SPTEST.PUT_SIZE(
- "Global objects",
- TRUE,
- "maximum_global_objects",
- RTEMS_TEST_SUPPORT.PER_GLOBAL_OBJECT
- );
-
- SPTEST.PUT_SIZE(
- "Proxies",
- TRUE,
- "maximum_proxies",
- RTEMS_TEST_SUPPORT.PER_PROXY
- );
-
- TEXT_IO.PUT_LINE( "*** END OF TEST SIZE ***" );
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end INIT;
-
---PAGE
---
--- PUT_SIZE
---
-
- procedure PUT_SIZE (
- DESCRIPTION : in STRING;
- HAS_FIELD_NAME : in BOOLEAN;
- FIELD_NAME : in STRING := "";
- REQUIREMENT : in RTEMS.UNSIGNED32 := 0
- ) is
- SPACES : constant STRING := " ";
- begin
-
- -- 21 is length of longest description (task's stacks)
-
- TEXT_IO.PUT( DESCRIPTION );
- TEXT_IO.PUT( SPACES( 1 .. 21 - DESCRIPTION'LENGTH ) );
- TEXT_IO.PUT( " - " );
- if HAS_FIELD_NAME = TRUE then
- TEXT_IO.PUT( FIELD_NAME );
- TEXT_IO.PUT( " * " );
- end if;
- UNSIGNED32_IO.PUT( REQUIREMENT );
- TEXT_IO.NEW_LINE;
-
- end PUT_SIZE;
-
-
-end SPTEST;
diff --git a/c/src/ada-tests/sptests/spsize/sptest.ads b/c/src/ada-tests/sptests/spsize/sptest.ads
deleted file mode 100644
index 312c7e9ead..0000000000
--- a/c/src/ada-tests/sptests/spsize/sptest.ads
+++ /dev/null
@@ -1,56 +0,0 @@
---
--- SPTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 1 of the RTEMS
--- Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-package SPTEST is
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- PUT_SIZE
---
--- DESCRIPTION:
---
--- This procedure outputs the size information about the specified
--- object in a standard format.
---
-
- procedure PUT_SIZE (
- DESCRIPTION : in STRING;
- HAS_FIELD_NAME : in BOOLEAN;
- FIELD_NAME : in STRING := "";
- REQUIREMENT : in RTEMS.UNSIGNED32 := 0
- );
-
-end SPTEST;
diff --git a/c/src/ada-tests/support/address_io.adb b/c/src/ada-tests/support/address_io.adb
deleted file mode 100644
index 9e87ef3ed9..0000000000
--- a/c/src/ada-tests/support/address_io.adb
+++ /dev/null
@@ -1,47 +0,0 @@
---
--- Address_IO / Specification
---
--- DESCRIPTION:
---
--- This package instantiates the IO routines necessary to
--- perform IO on data of the type System.Address.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with System;
-with System.Storage_Elements;
-with Text_IO;
-
-package body Address_IO is
-
- procedure Put (
- Item : in System.Address;
- Width : in Natural := 8;
- Base : in Natural := 16
- ) is
- package Integer_IO is new TEXT_IO.Integer_IO( Integer );
- begin
-
- Integer_IO.Put(
- Integer( System.Storage_Elements.To_Integer( Item ) ),
- Width,
- Base
- );
-
- end Put;
-
-end Address_IO;
-
diff --git a/c/src/ada-tests/support/address_io.ads b/c/src/ada-tests/support/address_io.ads
deleted file mode 100644
index 3f832b70e0..0000000000
--- a/c/src/ada-tests/support/address_io.ads
+++ /dev/null
@@ -1,35 +0,0 @@
---
--- ADDRESS_IO / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package instantiates the IO routines necessary to
--- perform IO on data of the type System.Address.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with System;
-
-package Address_IO is
-
- procedure Put (
- Item : in System.Address;
- Width : in Natural := 8;
- Base : in Natural := 16
- );
-
-end Address_IO;
-
diff --git a/c/src/ada-tests/support/float_io.ads b/c/src/ada-tests/support/float_io.ads
deleted file mode 100644
index 532dc6c447..0000000000
--- a/c/src/ada-tests/support/float_io.ads
+++ /dev/null
@@ -1,27 +0,0 @@
---
--- Float_IO / Specification
---
--- Description:
---
--- This package instantiates the IO routines necessary to
--- perform IO on data of the type Float.
---
--- Dependencies:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with Text_IO;
-
-package Float_IO is new Text_IO.Float_IO( Float );
-
diff --git a/c/src/ada-tests/support/fp.inc b/c/src/ada-tests/support/fp.inc
deleted file mode 100644
index 4fde6b16c1..0000000000
--- a/c/src/ada-tests/support/fp.inc
+++ /dev/null
@@ -1,154 +0,0 @@
---
--- fp.inc
---
--- Macros to produce a large number of LOCAL floating point variables. This
--- preprocessing is necessary to insure that the variables are
--- scoped properly and to avoid duplicating hundreds of lines
--- of code.
---
---
--- DEFICIENCIES:
---
--- 1. This currently does not address whether or not the CPU
--- actually has hardware floating point. It just does the work.
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
-
---
--- private definitions for macro use
---
-
--- macro usage EPSILON()
-define(`EPSILON',`0.0005')
-
--- macro usage FP_CHECK_ONE( value, base, factor )
-define(`FP_CHECK_ONE',`
- if ( $1 - ( $2 + $3 ) ) > EPSILON or else ( $1 - ( $2 + $3 ) ) < - EPSILON then
- UNSIGNED32_IO.PUT( TASK_INDEX );
- TEXT_IO.PUT( ": $1 wrong -- (" );
- FLOAT_IO.PUT( $1 );
- TEXT_IO.PUT( " not " );
- FLOAT_IO.PUT( $2 + $3 );
- TEXT_IO.PUT_LINE( ")" );
- end if
-'
-)
-
--- macro usage FP_DECLARE
-define(`FP_DECLARE', `
- FP01 : FLOAT := 1.0;
- FP02 : FLOAT := 2.0;
- FP03 : FLOAT := 3.0;
- FP04 : FLOAT := 4.0;
- FP05 : FLOAT := 5.0;
- FP06 : FLOAT := 6.0;
- FP07 : FLOAT := 7.0;
- FP08 : FLOAT := 8.0;
- FP09 : FLOAT := 9.0;
- FP10 : FLOAT := 10.0;
- FP11 : FLOAT := 11.0;
- FP12 : FLOAT := 12.0;
- FP13 : FLOAT := 13.0;
- FP14 : FLOAT := 14.0;
- FP15 : FLOAT := 15.0;
- FP16 : FLOAT := 16.0;
- FP17 : FLOAT := 17.0;
- FP18 : FLOAT := 18.0;
- FP19 : FLOAT := 19.0;
- FP20 : FLOAT := 20.0;
- FP21 : FLOAT := 21.0;
- FP22 : FLOAT := 22.0;
- FP23 : FLOAT := 23.0;
- FP24 : FLOAT := 24.0;
- FP25 : FLOAT := 25.0;
- FP26 : FLOAT := 26.0;
- FP27 : FLOAT := 27.0;
- FP28 : FLOAT := 28.0;
- FP29 : FLOAT := 29.0;
- FP30 : FLOAT := 30.0;
- FP31 : FLOAT := 31.0;
- FP32 : FLOAT := 32.0
-'
-)
-
-
--- macro usage FP_LOAD( factor )
-define(`FP_LOAD',`
- FP01 := FP01 + $1;
- FP02 := FP02 + $1;
- FP03 := FP03 + $1;
- FP04 := FP04 + $1;
- FP05 := FP05 + $1;
- FP06 := FP06 + $1;
- FP07 := FP07 + $1;
- FP08 := FP08 + $1;
- FP09 := FP09 + $1;
- FP10 := FP10 + $1;
- FP11 := FP11 + $1;
- FP12 := FP12 + $1;
- FP13 := FP13 + $1;
- FP14 := FP14 + $1;
- FP15 := FP15 + $1;
- FP16 := FP16 + $1;
- FP17 := FP17 + $1;
- FP18 := FP18 + $1;
- FP19 := FP19 + $1;
- FP20 := FP20 + $1;
- FP21 := FP21 + $1;
- FP22 := FP22 + $1;
- FP23 := FP23 + $1;
- FP24 := FP24 + $1;
- FP25 := FP25 + $1;
- FP26 := FP26 + $1;
- FP27 := FP27 + $1;
- FP28 := FP28 + $1;
- FP29 := FP29 + $1;
- FP30 := FP30 + $1;
- FP31 := FP31 + $1;
- FP32 := FP32 + $1
-')
-
--- macro usage FP_CHECK( factor )
-define(`FP_CHECK',`
- FP_CHECK_ONE( FP01, 1.0, $1 );
- FP_CHECK_ONE( FP02, 2.0, $1 );
- FP_CHECK_ONE( FP03, 3.0, $1 );
- FP_CHECK_ONE( FP04, 4.0, $1 );
- FP_CHECK_ONE( FP05, 5.0, $1 );
- FP_CHECK_ONE( FP06, 6.0, $1 );
- FP_CHECK_ONE( FP07, 7.0, $1 );
- FP_CHECK_ONE( FP08, 8.0, $1 );
- FP_CHECK_ONE( FP09, 9.0, $1 );
- FP_CHECK_ONE( FP10, 10.0, $1 );
- FP_CHECK_ONE( FP11, 11.0, $1 );
- FP_CHECK_ONE( FP12, 12.0, $1 );
- FP_CHECK_ONE( FP13, 13.0, $1 );
- FP_CHECK_ONE( FP14, 14.0, $1 );
- FP_CHECK_ONE( FP15, 15.0, $1 );
- FP_CHECK_ONE( FP16, 16.0, $1 );
- FP_CHECK_ONE( FP17, 17.0, $1 );
- FP_CHECK_ONE( FP18, 18.0, $1 );
- FP_CHECK_ONE( FP19, 19.0, $1 );
- FP_CHECK_ONE( FP20, 20.0, $1 );
- FP_CHECK_ONE( FP21, 21.0, $1 );
- FP_CHECK_ONE( FP22, 22.0, $1 );
- FP_CHECK_ONE( FP23, 23.0, $1 );
- FP_CHECK_ONE( FP24, 24.0, $1 );
- FP_CHECK_ONE( FP25, 25.0, $1 );
- FP_CHECK_ONE( FP26, 26.0, $1 );
- FP_CHECK_ONE( FP27, 27.0, $1 );
- FP_CHECK_ONE( FP28, 28.0, $1 );
- FP_CHECK_ONE( FP29, 29.0, $1 );
- FP_CHECK_ONE( FP30, 30.0, $1 );
- FP_CHECK_ONE( FP31, 31.0, $1 );
- FP_CHECK_ONE( FP32, 32.0, $1 )
-'
-)
diff --git a/c/src/ada-tests/support/init.c b/c/src/ada-tests/support/init.c
deleted file mode 100644
index 697c91dc0c..0000000000
--- a/c/src/ada-tests/support/init.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
- * On-Line Applications Research Corporation (OAR).
- * All rights assigned to U.S. Government, 1994.
- *
- * This material may be reproduced by or for the U.S. Government pursuant
- * to the copyright license under the clause at DFARS 252.227-7013. This
- * notice must appear in all copies of this file and its derivatives.
- *
- * $Id$
- */
-
-#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
-#include <bsp.h>
-
-void *POSIX_Init(
- void *argument
-)
-{
- extern int gnat_main ( int argc, char **argv, char **envp );
-
- (void) gnat_main ( 0, 0, 0 );
-
- exit( 0 );
-}
-
-/*
- * Only for sp04
- */
-
-rtems_id tcb_to_id(
- Thread_Control *tcb
-)
-{
- return tcb->Object.id;
-}
-
-/*
- * By putting this in brackets rather than quotes, we get the search
- * path and can get this file from ".." in the mptests.
- */
-
-#define CONFIGURE_INIT
-#include <config.h>
diff --git a/c/src/ada-tests/support/integer.inc b/c/src/ada-tests/support/integer.inc
deleted file mode 100644
index b7be26e8b6..0000000000
--- a/c/src/ada-tests/support/integer.inc
+++ /dev/null
@@ -1,145 +0,0 @@
---
--- integer.inc
---
--- Macros to produce a large number of LOCAL integer variables. This
--- preprocessing is necessary to insure that the variables are
--- scoped properly and to avoid duplicating hundreds of lines
--- of code.
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
-
---
--- private definitions for macro use
---
-
--- macro usage INTEGER_CHECK_ONE( value, base, factor )
-define(`INTEGER_CHECK_ONE',`
- if $1 /= ($2 + $3) then
- UNSIGNED32_IO.PUT( TASK_INDEX );
- TEXT_IO.PUT( ": $1 wrong -- (" );
- UNSIGNED32_IO.PUT( $1, BASE => 16);
- TEXT_IO.PUT( " not " );
- UNSIGNED32_IO.PUT( $2, BASE => 16 );
- TEXT_IO.PUT_LINE( ")" );
- end if
-'
-)
-
--- macro usage INTEGER_DECLARE
-define(`INTEGER_DECLARE', `
- INT01 : RTEMS.UNSIGNED32 := 1;
- INT02 : RTEMS.UNSIGNED32 := 2;
- INT03 : RTEMS.UNSIGNED32 := 3;
- INT04 : RTEMS.UNSIGNED32 := 4;
- INT05 : RTEMS.UNSIGNED32 := 5;
- INT06 : RTEMS.UNSIGNED32 := 6;
- INT07 : RTEMS.UNSIGNED32 := 7;
- INT08 : RTEMS.UNSIGNED32 := 8;
- INT09 : RTEMS.UNSIGNED32 := 9;
- INT10 : RTEMS.UNSIGNED32 := 10;
- INT11 : RTEMS.UNSIGNED32 := 11;
- INT12 : RTEMS.UNSIGNED32 := 12;
- INT13 : RTEMS.UNSIGNED32 := 13;
- INT14 : RTEMS.UNSIGNED32 := 14;
- INT15 : RTEMS.UNSIGNED32 := 15;
- INT16 : RTEMS.UNSIGNED32 := 16;
- INT17 : RTEMS.UNSIGNED32 := 17;
- INT18 : RTEMS.UNSIGNED32 := 18;
- INT19 : RTEMS.UNSIGNED32 := 19;
- INT20 : RTEMS.UNSIGNED32 := 20;
- INT21 : RTEMS.UNSIGNED32 := 21;
- INT22 : RTEMS.UNSIGNED32 := 22;
- INT23 : RTEMS.UNSIGNED32 := 23;
- INT24 : RTEMS.UNSIGNED32 := 24;
- INT25 : RTEMS.UNSIGNED32 := 25;
- INT26 : RTEMS.UNSIGNED32 := 26;
- INT27 : RTEMS.UNSIGNED32 := 27;
- INT28 : RTEMS.UNSIGNED32 := 28;
- INT29 : RTEMS.UNSIGNED32 := 29;
- INT30 : RTEMS.UNSIGNED32 := 30;
- INT31 : RTEMS.UNSIGNED32 := 31;
- INT32 : RTEMS.UNSIGNED32 := 32
-'
-)
-
-
--- macro usage INTEGER_LOAD( factor )
-define(`INTEGER_LOAD',`
- INT01 := INT01 + $1;
- INT02 := INT02 + $1;
- INT03 := INT03 + $1;
- INT04 := INT04 + $1;
- INT05 := INT05 + $1;
- INT06 := INT06 + $1;
- INT07 := INT07 + $1;
- INT08 := INT08 + $1;
- INT09 := INT09 + $1;
- INT10 := INT10 + $1;
- INT11 := INT11 + $1;
- INT12 := INT12 + $1;
- INT13 := INT13 + $1;
- INT14 := INT14 + $1;
- INT15 := INT15 + $1;
- INT16 := INT16 + $1;
- INT17 := INT17 + $1;
- INT18 := INT18 + $1;
- INT19 := INT19 + $1;
- INT20 := INT20 + $1;
- INT21 := INT21 + $1;
- INT22 := INT22 + $1;
- INT23 := INT23 + $1;
- INT24 := INT24 + $1;
- INT25 := INT25 + $1;
- INT26 := INT26 + $1;
- INT27 := INT27 + $1;
- INT28 := INT28 + $1;
- INT29 := INT29 + $1;
- INT30 := INT30 + $1;
- INT31 := INT31 + $1;
- INT32 := INT32 + $1
-')
-
--- macro usage INTEGER_CHECK( factor )
-define(`INTEGER_CHECK',`
- INTEGER_CHECK_ONE( INT01, 1, $1 );
- INTEGER_CHECK_ONE( INT02, 2, $1 );
- INTEGER_CHECK_ONE( INT03, 3, $1 );
- INTEGER_CHECK_ONE( INT04, 4, $1 );
- INTEGER_CHECK_ONE( INT05, 5, $1 );
- INTEGER_CHECK_ONE( INT06, 6, $1 );
- INTEGER_CHECK_ONE( INT07, 7, $1 );
- INTEGER_CHECK_ONE( INT08, 8, $1 );
- INTEGER_CHECK_ONE( INT09, 9, $1 );
- INTEGER_CHECK_ONE( INT10, 10, $1 );
- INTEGER_CHECK_ONE( INT11, 11, $1 );
- INTEGER_CHECK_ONE( INT12, 12, $1 );
- INTEGER_CHECK_ONE( INT13, 13, $1 );
- INTEGER_CHECK_ONE( INT14, 14, $1 );
- INTEGER_CHECK_ONE( INT15, 15, $1 );
- INTEGER_CHECK_ONE( INT16, 16, $1 );
- INTEGER_CHECK_ONE( INT17, 17, $1 );
- INTEGER_CHECK_ONE( INT18, 18, $1 );
- INTEGER_CHECK_ONE( INT19, 19, $1 );
- INTEGER_CHECK_ONE( INT20, 20, $1 );
- INTEGER_CHECK_ONE( INT21, 21, $1 );
- INTEGER_CHECK_ONE( INT22, 22, $1 );
- INTEGER_CHECK_ONE( INT23, 23, $1 );
- INTEGER_CHECK_ONE( INT24, 24, $1 );
- INTEGER_CHECK_ONE( INT25, 25, $1 );
- INTEGER_CHECK_ONE( INT26, 26, $1 );
- INTEGER_CHECK_ONE( INT27, 27, $1 );
- INTEGER_CHECK_ONE( INT28, 28, $1 );
- INTEGER_CHECK_ONE( INT29, 29, $1 );
- INTEGER_CHECK_ONE( INT30, 30, $1 );
- INTEGER_CHECK_ONE( INT31, 31, $1 );
- INTEGER_CHECK_ONE( INT32, 32, $1 )
-'
-)
diff --git a/c/src/ada-tests/support/rtems_calling_overhead.ads b/c/src/ada-tests/support/rtems_calling_overhead.ads
deleted file mode 100644
index 31bea79ef0..0000000000
--- a/c/src/ada-tests/support/rtems_calling_overhead.ads
+++ /dev/null
@@ -1,105 +0,0 @@
---
--- RTEMS_CALLING_OVERHEAD / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package contains the invocation overhead for each
--- of the RTEMS directives on the MC68020 Timing Platform.
--- This time is then subtracted from the execution time
--- of each directive as measured by the Timing Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-package RTEMS_CALLING_OVERHEAD is
-
- INITIALIZE_EXECUTIVE : constant RTEMS.UNSIGNED32 := 0;
- SHUTDOWN_EXECUTIVE : constant RTEMS.UNSIGNED32 := 0;
- TASK_CREATE : constant RTEMS.UNSIGNED32 := 0;
- TASK_IDENT : constant RTEMS.UNSIGNED32 := 0;
- TASK_START : constant RTEMS.UNSIGNED32 := 0;
- TASK_RESTART : constant RTEMS.UNSIGNED32 := 0;
- TASK_DELETE : constant RTEMS.UNSIGNED32 := 0;
- TASK_SUSPEND : constant RTEMS.UNSIGNED32 := 0;
- TASK_RESUME : constant RTEMS.UNSIGNED32 := 0;
- TASK_SET_PRIORITY : constant RTEMS.UNSIGNED32 := 0;
- TASK_MODE : constant RTEMS.UNSIGNED32 := 0;
- TASK_GET_NOTE : constant RTEMS.UNSIGNED32 := 0;
- TASK_SET_NOTE : constant RTEMS.UNSIGNED32 := 0;
- TASK_WAKE_WHEN : constant RTEMS.UNSIGNED32 := 0;
- TASK_WAKE_AFTER : constant RTEMS.UNSIGNED32 := 0;
- INTERRUPT_CATCH : constant RTEMS.UNSIGNED32 := 0;
- CLOCK_GET : constant RTEMS.UNSIGNED32 := 0;
- CLOCK_SET : constant RTEMS.UNSIGNED32 := 0;
- CLOCK_TICK : constant RTEMS.UNSIGNED32 := 0;
-
- TIMER_CREATE : constant RTEMS.UNSIGNED32 := 0;
- TIMER_DELETE : constant RTEMS.UNSIGNED32 := 0;
- TIMER_IDENT : constant RTEMS.UNSIGNED32 := 0;
- TIMER_FIRE_AFTER : constant RTEMS.UNSIGNED32 := 0;
- TIMER_FIRE_WHEN : constant RTEMS.UNSIGNED32 := 0;
- TIMER_RESET : constant RTEMS.UNSIGNED32 := 0;
- TIMER_CANCEL : constant RTEMS.UNSIGNED32 := 0;
- SEMAPHORE_CREATE : constant RTEMS.UNSIGNED32 := 0;
- SEMAPHORE_DELETE : constant RTEMS.UNSIGNED32 := 0;
- SEMAPHORE_IDENT : constant RTEMS.UNSIGNED32 := 0;
- SEMAPHORE_OBTAIN : constant RTEMS.UNSIGNED32 := 0;
- SEMAPHORE_RELEASE : constant RTEMS.UNSIGNED32 := 0;
- MESSAGE_QUEUE_CREATE : constant RTEMS.UNSIGNED32 := 0;
- MESSAGE_QUEUE_IDENT : constant RTEMS.UNSIGNED32 := 0;
- MESSAGE_QUEUE_DELETE : constant RTEMS.UNSIGNED32 := 0;
- MESSAGE_QUEUE_SEND : constant RTEMS.UNSIGNED32 := 0;
- MESSAGE_QUEUE_URGENT : constant RTEMS.UNSIGNED32 := 0;
- MESSAGE_QUEUE_BROADCAST : constant RTEMS.UNSIGNED32 := 0;
- MESSAGE_QUEUE_RECEIVE : constant RTEMS.UNSIGNED32 := 0;
- MESSAGE_QUEUE_FLUSH : constant RTEMS.UNSIGNED32 := 0;
-
- EVENT_SEND : constant RTEMS.UNSIGNED32 := 0;
- EVENT_RECEIVE : constant RTEMS.UNSIGNED32 := 0;
- SIGNAL_CATCH : constant RTEMS.UNSIGNED32 := 0;
- SIGNAL_SEND : constant RTEMS.UNSIGNED32 := 0;
- PARTITION_CREATE : constant RTEMS.UNSIGNED32 := 0;
- PARTITION_IDENT : constant RTEMS.UNSIGNED32 := 0;
- PARTITION_DELETE : constant RTEMS.UNSIGNED32 := 0;
- PARTITION_GET_BUFFER : constant RTEMS.UNSIGNED32 := 0;
- PARTITION_RETURN_BUFFER : constant RTEMS.UNSIGNED32 := 0;
- REGION_CREATE : constant RTEMS.UNSIGNED32 := 0;
- REGION_IDENT : constant RTEMS.UNSIGNED32 := 0;
- REGION_DELETE : constant RTEMS.UNSIGNED32 := 0;
- REGION_GET_SEGMENT : constant RTEMS.UNSIGNED32 := 0;
- REGION_RETURN_SEGMENT : constant RTEMS.UNSIGNED32 := 0;
- PORT_CREATE : constant RTEMS.UNSIGNED32 := 0;
- PORT_IDENT : constant RTEMS.UNSIGNED32 := 0;
- PORT_DELETE : constant RTEMS.UNSIGNED32 := 0;
- PORT_EXTERNAL_TO_INTERNAL : constant RTEMS.UNSIGNED32 := 0;
- PORT_INTERNAL_TO_EXTERNAL : constant RTEMS.UNSIGNED32 := 0;
-
- IO_INITIALIZE : constant RTEMS.UNSIGNED32 := 0;
- IO_OPEN : constant RTEMS.UNSIGNED32 := 0;
- IO_CLOSE : constant RTEMS.UNSIGNED32 := 0;
- IO_READ : constant RTEMS.UNSIGNED32 := 0;
- IO_WRITE : constant RTEMS.UNSIGNED32 := 0;
- IO_CONTROL : constant RTEMS.UNSIGNED32 := 0;
- FATAL_ERROR_OCCURRED : constant RTEMS.UNSIGNED32 := 0;
- RATE_MONOTONIC_CREATE : constant RTEMS.UNSIGNED32 := 0;
- RATE_MONOTONIC_IDENT : constant RTEMS.UNSIGNED32 := 0;
- RATE_MONOTONIC_DELETE : constant RTEMS.UNSIGNED32 := 0;
- RATE_MONOTONIC_CANCEL : constant RTEMS.UNSIGNED32 := 0;
- RATE_MONOTONIC_PERIOD : constant RTEMS.UNSIGNED32 := 0;
- MULTIPROCESSING_ANNOUNCE : constant RTEMS.UNSIGNED32 := 0;
-
-end RTEMS_CALLING_OVERHEAD;
diff --git a/c/src/ada-tests/support/status_io.ads b/c/src/ada-tests/support/status_io.ads
deleted file mode 100644
index af56ff1a6a..0000000000
--- a/c/src/ada-tests/support/status_io.ads
+++ /dev/null
@@ -1,28 +0,0 @@
---
--- Status_IO / Specification
---
--- DESCRIPTION:
---
--- This package instantiates the IO routines necessary to
--- perform IO on data of the type Status.CODES.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with Text_IO;
-
-package Status_IO is new Text_IO.Enumeration_IO( RTEMS.Status_Codes );
-
diff --git a/c/src/ada-tests/support/test_support.adb b/c/src/ada-tests/support/test_support.adb
deleted file mode 100644
index 379f0dfdae..0000000000
--- a/c/src/ada-tests/support/test_support.adb
+++ /dev/null
@@ -1,236 +0,0 @@
---
--- Test_Support / Specification
---
--- DESCRIPTION:
---
--- This package provides routines which aid the Test Suites
--- and simplify their design and operation.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with Interfaces; use Interfaces;
-with RTEMS;
-with Unsigned32_IO;
-with Status_IO;
-with Text_IO;
-
-package body Test_Support is
-
---PAGE
---
--- Fatal_Directive_Status
---
-
- procedure Fatal_Directive_Status (
- Status : in RTEMS.Status_Codes;
- Desired : in RTEMS.Status_Codes;
- Message : in String
- ) is
- begin
-
- if not RTEMS.Are_Statuses_Equal( Status, Desired ) then
-
- Text_IO.Put( Message );
- Text_IO.Put( " FAILED -- expected " );
- Status_IO.Put( Desired );
- Text_IO.Put( " got " );
- Status_IO.Put( Status );
- Text_IO.New_Line;
-
- RTEMS.Fatal_Error_Occurred( RTEMS.Status_Codes'Pos( Status ) );
-
- end if;
-
- end Fatal_Directive_Status;
-
---PAGE
---
--- Directive_Failed
---
-
- procedure Directive_Failed (
- Status : in RTEMS.Status_Codes;
- Message : in String
- ) is
- begin
-
- Test_Support.Fatal_Directive_Status(
- Status,
- RTEMS.Successful,
- Message
- );
-
- end Directive_Failed;
-
---PAGE
---
--- Print_Time
---
-
- procedure Print_Time (
- Prefix : in String;
- Time_Buffer : in RTEMS.Time_Of_Day;
- Suffix : in String
- ) is
- begin
-
- Text_IO.Put( Prefix );
- Unsigned32_IO.Put( Time_Buffer.Hour, Width=>2 );
- Text_IO.Put( ":" );
- Unsigned32_IO.Put( Time_Buffer.Minute, Width=>2 );
- Text_IO.Put( ":" );
- Unsigned32_IO.Put( Time_Buffer.Second, Width=>2 );
- Text_IO.Put( " " );
- Unsigned32_IO.Put( Time_Buffer.Month, Width=>2 );
- Text_IO.Put( "/" );
- Unsigned32_IO.Put( Time_Buffer.Day, Width=>2 );
- Text_IO.Put( "/" );
- Unsigned32_IO.Put( Time_Buffer.Year, Width=>2 );
- Text_IO.Put( Suffix );
-
- end Print_Time;
-
---PAGE
---
--- Put_Dot
---
-
- procedure Put_Dot (
- Buffer : in String
- ) is
- begin
- Text_IO.Put( Buffer );
- Text_IO.FLUSH;
- end Put_Dot;
-
---PAGE
---
--- Pause
---
-
- procedure Pause is
- Ignored_String : String( 1 .. 80 );
- Ignored_Last : Natural;
-
- begin
-
- --
- -- Really should be a "put" followed by a "flush."
- --
- Text_IO.Put_Line( "<pause> " );
- -- Text_IO.Get_Line( Ignored_String, Ignored_Last );
-
- -- exception
-
- -- when Text_IO.End_Error =>
- -- -- ignore this error. It happens when redirecting input from /dev/null
- -- return;
-
- end Pause;
-
---PAGE
---
--- Pause_And_Screen_Number
---
-
- procedure Pause_And_Screen_Number (
- SCREEN : in RTEMS.Unsigned32
- ) is
- Ignored_String : String( 1 .. 80 );
- Ignored_Last : Natural;
- begin
-
- --
- -- Really should be a "put" followed by a "flush."
- --
- Text_IO.Put( "<pause - screen " );
- Unsigned32_IO.Put( SCREEN, Width=>2 );
- Text_IO.Put_Line( "> " );
- -- Text_IO.Get_Line( Ignored_String, Ignored_Last );
-
- -- exception
-
- -- when Text_IO.End_Error =>
- -- -- ignore this error. It happens when redirecting input from /dev/null
- -- return;
-
- end Pause_And_Screen_Number;
-
---PAGE
---
--- Put_Name
---
-
- procedure Put_Name (
- Name : in RTEMS.Name;
- New_Line : in Boolean
- ) is
- C1 : Character;
- C2 : Character;
- C3 : Character;
- C4 : Character;
- begin
-
- RTEMS.Name_To_Characters( Name, C1, C2, C3, C4 );
-
- Text_IO.Put( C1 );
- Text_IO.Put( C2 );
- Text_IO.Put( C3 );
- Text_IO.Put( C4 );
-
- if New_Line = True then
- Text_IO.New_Line;
- end if;
-
- end Put_Name;
-
---PAGE
---
--- Task_Number
---
-
- function Task_Number (
- TID : in RTEMS.ID
- ) return RTEMS.Unsigned32 is
- begin
-
- return RTEMS.Get_Index( TID ) - 1 -
- RTEMS.Configuration.RTEMS_API_Configuration.Number_Of_Initialization_Tasks;
-
- end Task_Number;
-
---PAGE
---
--- Do_Nothing
---
-
- procedure Do_Nothing is
- begin
- NULL;
- end Do_Nothing;
-
-
---PAGE
---
--- Milliseconds_Per_Tick
---
-
- function Milliseconds_Per_Tick
- return RTEMS.Unsigned32 is
- begin
- return RTEMS.Configuration.Microseconds_Per_Tick / 1000;
- end Milliseconds_Per_Tick;
-end Test_Support;
diff --git a/c/src/ada-tests/support/test_support.ads b/c/src/ada-tests/support/test_support.ads
deleted file mode 100644
index 4a40da4322..0000000000
--- a/c/src/ada-tests/support/test_support.ads
+++ /dev/null
@@ -1,173 +0,0 @@
---
--- Test_Support / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package provides routines which aid the Test Suites
--- and simplify their design and operation.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with Interfaces; use Interfaces;
-with RTEMS;
-with Text_IO;
-
-package Test_Support is
-
---
--- Fatal_Directive_Status
---
--- DESCRIPTION:
---
--- This subprogram checks if Status is equal to Desired. If so, it
--- returns immediately. Otherwise, it prints the Message along with
--- the Status and Desired status and invokes the Fatal_Error_Occurred
--- directive.
---
-
- procedure Fatal_Directive_Status (
- Status : in RTEMS.Status_Codes;
- Desired : in RTEMS.Status_Codes;
- Message : in STRING
- );
- pragma Inline ( Fatal_Directive_Status );
-
--- Directive_Failed
---
--- DESCRIPTION:
---
--- This subprogram checks if Status is equal to Successful. If so, it
--- returns immediately. Otherwise, it prints the Message along with
--- the Status and Desired status and invokes the Fatal_Error_Occurred
---
-
- procedure Directive_Failed (
- Status : in RTEMS.Status_Codes;
- Message : in STRING
- );
- pragma Inline ( Directive_Failed );
-
---
--- Print_Time
---
--- DESCRIPTION:
---
--- This subprogram prints the Prefix string, following by the
--- time of day in Time_Buffer, followed by the Suffix.
---
-
- procedure Print_Time (
- Prefix : in STRING;
- Time_Buffer : in RTEMS.Time_Of_Day;
- Suffix : in STRING
- );
- pragma Inline ( Print_Time );
-
---
--- Put_Dot
---
--- DESCRIPTION:
---
--- This subprogram prints a single character without a carriage return.
---
-
- procedure Put_Dot (
- Buffer : in STRING
- );
- pragma Inline ( Put_Dot );
-
---
--- Pause
---
--- DESCRIPTION:
---
--- This subprogram is used to pause screen output in the Test Suites
--- until the user presses carriage return.
---
-
- procedure Pause;
-
---
--- Pause_And_Screen_Number
---
--- DESCRIPTION:
---
--- This subprogram is used to pause screen output and print the current
--- number in the Test Suites until the user presses carriage return.
---
-
- procedure Pause_And_Screen_Number (
- SCREEN : in RTEMS.Unsigned32
- );
-
---
--- Put_Name
---
--- DESCRIPTION:
---
--- This subprogram prints the RTEMS object Name. If New_Line is TRUE,
--- then a carriage return is printed after the Name.
---
-
- procedure Put_Name (
- Name : in RTEMS.Name;
- New_Line : in Boolean
- );
-
---
--- Task_Number
---
--- DESCRIPTION:
---
--- This function returns the task index which the test should use
--- for TID.
---
-
- function Task_Number (
- TID : in RTEMS.ID
- ) return RTEMS.Unsigned32;
- pragma Inline ( Task_Number );
-
---
--- Do_Nothing
---
--- DESCRIPTION:
---
--- This procedure is called when a test wishes to use a delay
--- loop and insure that the compiler does not optimize it away.
---
-
- procedure Do_Nothing;
-
---
--- Ticks_Per_Second is the number of RTEMS clock ticks which
--- occur each second.
---
-
- Ticks_Per_Second : RTEMS.Interval;
- pragma Import (C, Ticks_Per_Second, "_TOD_Ticks_per_second");
-
---
--- Milliseconds_Per_Tick is the number of milliseconds which
--- occur between each RTEMS clock tick.
---
-
- function Milliseconds_Per_Tick
- return RTEMS.Unsigned32;
-
-private
-
-end Test_Support;
diff --git a/c/src/ada-tests/support/time_test_support.adb b/c/src/ada-tests/support/time_test_support.adb
deleted file mode 100644
index 5eba15fa58..0000000000
--- a/c/src/ada-tests/support/time_test_support.adb
+++ /dev/null
@@ -1,77 +0,0 @@
---
--- TIME_TEST_SUPPORT / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package provides routines which aid the individual tests in
--- the Timing Test Suite and simplify their design and operation.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with TEXT_IO;
-with UNSIGNED32_IO;
-
-package body TIME_TEST_SUPPORT is
-
---PAGE
---
--- PUT_TIME
---
-
- procedure PUT_TIME (
- MESSAGE : in STRING;
- TOTAL_TIME : in RTEMS.UNSIGNED32;
- ITERATIONS : in RTEMS.UNSIGNED32;
- LOOP_OVERHEAD : in RTEMS.UNSIGNED32;
- CALLING_OVERHEAD : in RTEMS.UNSIGNED32
- ) is
- PER_ITERATION : RTEMS.UNSIGNED32;
- begin
-
- PER_ITERATION := (TOTAL_TIME - LOOP_OVERHEAD) / ITERATIONS;
- PER_ITERATION := PER_ITERATION - CALLING_OVERHEAD;
-
- if PER_ITERATION = 0 then
-
- TEXT_IO.PUT( "TOTAL_TIME " );
- UNSIGNED32_IO.PUT( TOTAL_TIME );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT( "ITERATIONS " );
- UNSIGNED32_IO.PUT( ITERATIONS );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT( "LOOP_OVERHEAD " );
- UNSIGNED32_IO.PUT( LOOP_OVERHEAD );
- TEXT_IO.NEW_LINE;
-
- TEXT_IO.PUT( "CALLING_OVERHEAD " );
- UNSIGNED32_IO.PUT( CALLING_OVERHEAD );
- TEXT_IO.NEW_LINE;
-
- end if;
-
- TEXT_IO.PUT( MESSAGE );
- TEXT_IO.PUT( " " );
- UNSIGNED32_IO.PUT( PER_ITERATION );
- TEXT_IO.NEW_LINE;
- TEXT_IO.FLUSH;
-
- end PUT_TIME;
-
-end TIME_TEST_SUPPORT;
diff --git a/c/src/ada-tests/support/time_test_support.ads b/c/src/ada-tests/support/time_test_support.ads
deleted file mode 100644
index 6dbacaf69d..0000000000
--- a/c/src/ada-tests/support/time_test_support.ads
+++ /dev/null
@@ -1,54 +0,0 @@
---
--- TIME_TEST_SUPPORT / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package provides routines which aid the individual tests in
--- the Timing Test Suite and simplify their design and operation.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-package TIME_TEST_SUPPORT is
-
---
--- The following constants define the number of times a directive
--- will be performed in the Timing Suite.
---
-
- OPERATION_COUNT : constant RTEMS.UNSIGNED32 := 100;
- ITERATION_COUNT : constant RTEMS.UNSIGNED32 := 100;
-
---
--- PUT_TIME
---
--- DESCRIPTION:
---
--- This subprogram prints the MESSAGE followed by the length of
--- time which each individual operation took. All times are
--- in microseconds.
---
-
- procedure PUT_TIME (
- MESSAGE : in STRING;
- TOTAL_TIME : in RTEMS.UNSIGNED32;
- ITERATIONS : in RTEMS.UNSIGNED32;
- LOOP_OVERHEAD : in RTEMS.UNSIGNED32;
- CALLING_OVERHEAD : in RTEMS.UNSIGNED32
- );
-
-end TIME_TEST_SUPPORT;
diff --git a/c/src/ada-tests/support/timer_driver.adb b/c/src/ada-tests/support/timer_driver.adb
deleted file mode 100644
index caa2374759..0000000000
--- a/c/src/ada-tests/support/timer_driver.adb
+++ /dev/null
@@ -1,45 +0,0 @@
---
--- Timer_Driver / Body
---
--- Description:
---
--- This package is the body for the Timer Driver.
---
--- Dependencies:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-package body Timer_Driver is
-
---PAGE
---
--- Set_Find_Average_Overhead
---
---
-
- procedure Set_Find_Average_Overhead (
- Find_Flag : in Standard.Boolean
- ) is
- procedure Set_Find_Average_Overhead_base (
- Find_Flag : in RTEMS.Boolean
- );
- pragma Import (C, Set_Find_Average_Overhead_base,
- "Set_find_average_overhead");
- begin
- Set_Find_Average_Overhead_base (RTEMS.From_Ada_Boolean (Find_Flag));
- end Set_Find_Average_Overhead;
-
-end Timer_Driver;
diff --git a/c/src/ada-tests/support/timer_driver.ads b/c/src/ada-tests/support/timer_driver.ads
deleted file mode 100644
index bd7c4891b7..0000000000
--- a/c/src/ada-tests/support/timer_driver.ads
+++ /dev/null
@@ -1,81 +0,0 @@
---
--- Timer_Driver / Specification
---
--- Description:
---
--- This package is the specification for the Timer Driver.
---
--- Dependencies:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-package Timer_Driver is
-
---
--- Initialize
---
--- Description:
---
--- This subprogram initializes the hardware timer to start it.
---
-
- procedure Initialize;
- pragma Import (C, Initialize, "Timer_initialize");
-
---
--- Read_Timer
---
--- Description:
---
--- This subprogram stops the timer, calculates the length of time
--- in microseconds since the timer was started, and returns that
--- value.
---
-
- function Read_Timer
- return RTEMS.Unsigned32;
- pragma Import (C, Read_Timer, "Read_timer");
-
---
--- Empty_Function
---
--- Description:
---
--- This subprogram is an empty subprogram. It is used to
--- insure that a loop will be included in the final executable
--- so that loop overhead can be subtracted from the directive
--- times reported.
---
-
- procedure Empty_Function;
- pragma Import (C, Empty_Function, "Empty_function");
-
---
--- Set_Find_Average_Overhead
---
--- Description:
---
--- This subprogram sets the Find_Average_Overhead flag to the
--- the value passed.
---
-
- procedure Set_Find_Average_Overhead (
- Find_Flag : in Standard.Boolean
- );
-
-private
-
-end Timer_Driver;
diff --git a/c/src/ada-tests/support/unsigned32_io.ads b/c/src/ada-tests/support/unsigned32_io.ads
deleted file mode 100644
index 4e207461c4..0000000000
--- a/c/src/ada-tests/support/unsigned32_io.ads
+++ /dev/null
@@ -1,28 +0,0 @@
---
--- Unsigned32_IO / Specification
---
--- DESCRIPTION:
---
--- This package instantiates the IO routines necessary to
--- perform IO on data of the type RTEMS.Unsigned32.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with Text_IO;
-
-package Unsigned32_IO is new Text_IO.Modular_IO( RTEMS.Unsigned32 );
-
diff --git a/c/src/ada-tests/tmtests/tm01/config.h b/c/src/ada-tests/tmtests/tm01/config.h
deleted file mode 100644
index be54f54955..0000000000
--- a/c/src/ada-tests/tmtests/tm01/config.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 2
-#define CONFIGURE_MAXIMUM_SEMAPHORES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/tmtests/tm01/tm01.adb b/c/src/ada-tests/tmtests/tm01/tm01.adb
deleted file mode 100644
index 34671d1495..0000000000
--- a/c/src/ada-tests/tmtests/tm01/tm01.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test TM01 of the Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with TMTEST;
-with TEST_SUPPORT;
-
-procedure TM01 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- TMTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end TM01;
-
diff --git a/c/src/ada-tests/tmtests/tm01/tmtest.adb b/c/src/ada-tests/tmtests/tm01/tmtest.adb
deleted file mode 100644
index ba9ab5dee1..0000000000
--- a/c/src/ada-tests/tmtests/tm01/tmtest.adb
+++ /dev/null
@@ -1,276 +0,0 @@
---
--- TMTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 1 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with RTEMS_CALLING_OVERHEAD;
-with TEST_SUPPORT;
-with TEXT_IO;
-with TIME_TEST_SUPPORT;
-with UNSIGNED32_IO;
-
-package body TMTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TIME TEST 1 ***" );
-
- TMTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME( 'T', 'A', '1', ' ' );
- TMTEST.TASK_NAME( 2 ) := RTEMS.BUILD_NAME( 'T', 'A', '2', ' ' );
- TMTEST.TASK_NAME( 3 ) := RTEMS.BUILD_NAME( 'T', 'A', '3', ' ' );
-
- RTEMS.TASK_CREATE(
- TMTEST.TASK_NAME( 1 ),
- 1,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- TMTEST.TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA1" );
-
- RTEMS.TASK_START(
- TMTEST.TASK_ID( 1 ),
- TMTEST.TASK_1'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA1" );
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- TASK_1
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- SEMAPHORE_OBTAIN_TIME : RTEMS.UNSIGNED32;
- SEMAPHORE_RELEASE_TIME : RTEMS.UNSIGNED32;
- SEMAPHORE_OBTAIN_NO_WAIT_TIME : RTEMS.UNSIGNED32;
- SEMAPHORE_OBTAIN_LOOP_TIME : RTEMS.UNSIGNED32;
- SEMAPHORE_RELEASE_LOOP_TIME : RTEMS.UNSIGNED32;
- INDEX : RTEMS.UNSIGNED32;
- ITERATIONS : RTEMS.UNSIGNED32;
- NAME : RTEMS.NAME;
- SMID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- NAME := RTEMS.BUILD_NAME( 'S', 'M', '1', ' ' );
-
- SEMAPHORE_OBTAIN_TIME := 0;
- SEMAPHORE_RELEASE_TIME := 0;
- SEMAPHORE_OBTAIN_NO_WAIT_TIME := 0;
- SEMAPHORE_OBTAIN_LOOP_TIME := 0;
- SEMAPHORE_RELEASE_LOOP_TIME := 0;
-
--- Time one invocation of SEMAPHORE_CREATE
-
- TIMER_DRIVER.INITIALIZE;
-
- RTEMS.SEMAPHORE_CREATE(
- NAME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- RTEMS.DEFAULT_ATTRIBUTES,
- RTEMS.NO_PRIORITY,
- SMID,
- STATUS
- );
-
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "SEMAPHORE_CREATE",
- TMTEST.END_TIME,
- 1,
- 0,
- RTEMS_CALLING_OVERHEAD.SEMAPHORE_CREATE
- );
-
--- Time one invocation of SEMAPHORE_DELETE
-
- TIMER_DRIVER.INITIALIZE;
-
- RTEMS.SEMAPHORE_DELETE( SMID, STATUS );
-
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "SEMAPHORE_DELETE",
- TMTEST.END_TIME,
- 1,
- 0,
- RTEMS_CALLING_OVERHEAD.SEMAPHORE_DELETE
- );
-
--- Create semaphore for repeated operations.
-
- RTEMS.SEMAPHORE_CREATE(
- NAME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- RTEMS.DEFAULT_ATTRIBUTES,
- RTEMS.NO_PRIORITY,
- SMID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_CREATE" );
-
--- Perform repeated SEMAPHORE OBTAIN's and RELEASE's
-
- for ITERATIONS in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- TIMER_DRIVER.EMPTY_FUNCTION;
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- SEMAPHORE_OBTAIN_LOOP_TIME := SEMAPHORE_OBTAIN_LOOP_TIME +
- TMTEST.END_TIME;
- SEMAPHORE_RELEASE_LOOP_TIME := SEMAPHORE_RELEASE_LOOP_TIME +
- TMTEST.END_TIME;
-
- -- Semaphore_obtain (available loop)
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
-
- RTEMS.SEMAPHORE_OBTAIN(
- SMID,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- STATUS
- );
-
- end loop;
-
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- SEMAPHORE_OBTAIN_TIME := SEMAPHORE_OBTAIN_TIME + TMTEST.END_TIME;
-
- -- Semaphore_release
-
- TIMER_DRIVER.INITIALIZE;
-
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
-
- RTEMS.SEMAPHORE_RELEASE( SMID, STATUS );
-
- end loop;
-
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- SEMAPHORE_RELEASE_TIME := SEMAPHORE_RELEASE_TIME +
- TMTEST.END_TIME;
-
- -- Semaphore_p (NO_WAIT)
-
- TIMER_DRIVER.INITIALIZE;
-
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
-
- RTEMS.SEMAPHORE_OBTAIN(
- SMID,
- RTEMS.NO_WAIT,
- RTEMS.NO_TIMEOUT,
- STATUS
- );
-
- end loop;
-
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- SEMAPHORE_OBTAIN_NO_WAIT_TIME :=
- SEMAPHORE_OBTAIN_NO_WAIT_TIME + TMTEST.END_TIME;
-
- -- Semaphore_v
-
- TIMER_DRIVER.INITIALIZE;
-
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
-
- RTEMS.SEMAPHORE_RELEASE( SMID, STATUS );
-
- end loop;
-
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- SEMAPHORE_RELEASE_TIME := SEMAPHORE_RELEASE_TIME +
- TMTEST.END_TIME;
-
- end loop;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "SEMAPHORE_OBTAIN (semaphore available)",
- SEMAPHORE_OBTAIN_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT *
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- SEMAPHORE_OBTAIN_LOOP_TIME,
- RTEMS_CALLING_OVERHEAD.SEMAPHORE_OBTAIN
- );
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "SEMAPHORE_OBTAIN (NO_WAIT)",
- SEMAPHORE_OBTAIN_NO_WAIT_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT *
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- SEMAPHORE_OBTAIN_LOOP_TIME,
- RTEMS_CALLING_OVERHEAD.SEMAPHORE_OBTAIN
- );
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "SEMAPHORE_RELEASE (no task waiting)",
- SEMAPHORE_RELEASE_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT *
- TIME_TEST_SUPPORT.OPERATION_COUNT * 2,
- SEMAPHORE_RELEASE_LOOP_TIME * 2,
- RTEMS_CALLING_OVERHEAD.SEMAPHORE_RELEASE
- );
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end TASK_1;
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm01/tmtest.ads b/c/src/ada-tests/tmtests/tm01/tmtest.ads
deleted file mode 100644
index 3c8b449675..0000000000
--- a/c/src/ada-tests/tmtests/tm01/tmtest.ads
+++ /dev/null
@@ -1,68 +0,0 @@
---
--- TMTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 1 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with TIMER_DRIVER;
-with RTEMS;
-
-package TMTEST is
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
- TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
-
---
--- The following variable is set to the execution time returned
--- by the timer.
---
-
- END_TIME : RTEMS.UNSIGNED32;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_1
---
--- DESCRIPTION:
---
--- This RTEMS task performs the all of the timing operations in this test.
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm02/config.h b/c/src/ada-tests/tmtests/tm02/config.h
deleted file mode 100644
index 588ff58466..0000000000
--- a/c/src/ada-tests/tmtests/tm02/config.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 111
-#define CONFIGURE_MAXIMUM_TIMERS 110
-#define CONFIGURE_MAXIMUM_SEMAPHORES 101
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/tmtests/tm02/tm02.adb b/c/src/ada-tests/tmtests/tm02/tm02.adb
deleted file mode 100644
index ee13a6ddf7..0000000000
--- a/c/src/ada-tests/tmtests/tm02/tm02.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test TM02 of the Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with TMTEST;
-with TEST_SUPPORT;
-
-procedure TM02 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- TMTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end TM02;
-
diff --git a/c/src/ada-tests/tmtests/tm02/tmtest.adb b/c/src/ada-tests/tmtests/tm02/tmtest.adb
deleted file mode 100644
index 606661c956..0000000000
--- a/c/src/ada-tests/tmtests/tm02/tmtest.adb
+++ /dev/null
@@ -1,209 +0,0 @@
---
--- TMTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 2 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with RTEMS_CALLING_OVERHEAD;
-with TEST_SUPPORT;
-with TEXT_IO;
-with TIME_TEST_SUPPORT;
-with UNSIGNED32_IO;
-
-package body TMTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TIME TEST 2 ***" );
-
- TMTEST.TEST_INIT;
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- TEST_INIT
---
-
- procedure TEST_INIT is
- PRIORITY : RTEMS.TASK_PRIORITY;
- INDEX : RTEMS.UNSIGNED32;
- HIGH_ID : RTEMS.ID;
- LOW_ID : RTEMS.ID;
- TASK_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- PRIORITY := 5;
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'H', 'I', 'G', 'H' ),
- PRIORITY,
- 1024,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- HIGH_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF HIGH TASK" );
-
- PRIORITY := PRIORITY + 1;
-
- RTEMS.TASK_START(
- HIGH_ID,
- TMTEST.HIGH_TASK'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF HIGH TASK" );
-
- for INDEX in 2 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'M', 'I', 'D', ' ' ),
- PRIORITY,
- 1024,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- TASK_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE MIDDLE" );
-
- PRIORITY := PRIORITY + 1;
-
- RTEMS.TASK_START(
- TASK_ID,
- TMTEST.MIDDLE_TASKS'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START MIDDLE" );
-
- end loop;
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'L', 'O', 'W', ' ' ),
- PRIORITY,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- LOW_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF LOW TASK" );
-
- RTEMS.TASK_START( LOW_ID, TMTEST.LOW_TASK'ACCESS, 0, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF LOW TASK" );
-
- RTEMS.SEMAPHORE_CREATE(
- RTEMS.BUILD_NAME( 'S', 'M', '1', ' ' ),
- 0,
- RTEMS.DEFAULT_ATTRIBUTES,
- RTEMS.NO_PRIORITY,
- TMTEST.SEMAPHORE_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_CREATE OF SM1" );
-
- end TEST_INIT;
-
---PAGE
---
--- HIGH_TASK
---
-
- procedure HIGH_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TIMER_DRIVER.INITIALIZE;
- RTEMS.SEMAPHORE_OBTAIN(
- TMTEST.SEMAPHORE_ID,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- STATUS
- );
-
- end HIGH_TASK;
-
---PAGE
---
--- MIDDLE_TASKS
---
-
- procedure MIDDLE_TASKS (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.SEMAPHORE_OBTAIN(
- TMTEST.SEMAPHORE_ID,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- STATUS
- );
-
- end MIDDLE_TASKS;
-
---PAGE
---
--- LOW_TASK
---
-
- procedure LOW_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
- TIME_TEST_SUPPORT.PUT_TIME(
- "SEMAPHORE_OBTAIN (blocking)",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- 0,
- RTEMS_CALLING_OVERHEAD.SEMAPHORE_OBTAIN
- );
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end LOW_TASK;
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm02/tmtest.ads b/c/src/ada-tests/tmtests/tm02/tmtest.ads
deleted file mode 100644
index 49e5df7c16..0000000000
--- a/c/src/ada-tests/tmtests/tm02/tmtest.ads
+++ /dev/null
@@ -1,103 +0,0 @@
---
--- TMTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 2 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with TIMER_DRIVER;
-with RTEMS;
-
-package TMTEST is
-
---
--- The following is the ID of the semaphore used for timing operations.
---
-
- SEMAPHORE_ID : RTEMS.ID;
-
---
--- The following variable is set to the execution time returned
--- by the timer.
---
-
- END_TIME : RTEMS.UNSIGNED32;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TEST_INIT
---
--- DESCRIPTION:
---
--- This subprogram performs test initialization.
---
-
- procedure TEST_INIT;
-
---
--- HIGH_TASK
---
--- DESCRIPTION:
---
--- This RTEMS task starts the timer and performs a blocking
--- SEMAPHORE_OBTAIN.
---
-
- procedure HIGH_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- MIDDLE_TASKS
---
--- DESCRIPTION:
---
--- These RTEMS task start the timer and performs a blocking
--- SEMAPHORE_OBTAIN.
---
-
- procedure MIDDLE_TASKS (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- LOW_TASK
---
--- DESCRIPTION:
---
--- This RTEMS task stops the timer and reports the execution time for
--- a blocking SEMAPHORE_OBTAIN.
---
-
- procedure LOW_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm03/config.h b/c/src/ada-tests/tmtests/tm03/config.h
deleted file mode 100644
index 588ff58466..0000000000
--- a/c/src/ada-tests/tmtests/tm03/config.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 111
-#define CONFIGURE_MAXIMUM_TIMERS 110
-#define CONFIGURE_MAXIMUM_SEMAPHORES 101
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/tmtests/tm03/tm03.adb b/c/src/ada-tests/tmtests/tm03/tm03.adb
deleted file mode 100644
index 13787b3d97..0000000000
--- a/c/src/ada-tests/tmtests/tm03/tm03.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test TM03 of the Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with TMTEST;
-with TEST_SUPPORT;
-
-procedure TM03 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- TMTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end TM03;
-
diff --git a/c/src/ada-tests/tmtests/tm03/tmtest.adb b/c/src/ada-tests/tmtests/tm03/tmtest.adb
deleted file mode 100644
index 192248bbcc..0000000000
--- a/c/src/ada-tests/tmtests/tm03/tmtest.adb
+++ /dev/null
@@ -1,194 +0,0 @@
---
--- TMTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 3 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with RTEMS_CALLING_OVERHEAD;
-with TEST_SUPPORT;
-with TEXT_IO;
-with TIME_TEST_SUPPORT;
-with UNSIGNED32_IO;
-
-package body TMTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- TASK_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TIME TEST 3 ***" );
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'T', 'A', '1', ' ' ),
- 252,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- TASK_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TEST_INIT" );
-
- RTEMS.TASK_START( TASK_ID, TMTEST.TEST_INIT'ACCESS, 0, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TEST_INIT" );
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- TEST_INIT
---
-
- procedure TEST_INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- INDEX : RTEMS.UNSIGNED32;
- PRIORITY : RTEMS.TASK_PRIORITY;
- TASK_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- PRIORITY := 250;
-
- RTEMS.SEMAPHORE_CREATE(
- RTEMS.BUILD_NAME( 'S', 'M', '1', ' ' ),
- 0,
- RTEMS.DEFAULT_ATTRIBUTES,
- RTEMS.NO_PRIORITY,
- TMTEST.SEMAPHORE_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_CREATE OF SM1" );
-
- for INDEX in 2 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'M', 'I', 'D', ' ' ),
- PRIORITY,
- 1024,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- TASK_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE MIDDLE" );
-
- PRIORITY := PRIORITY - 1;
-
- RTEMS.TASK_START( TASK_ID, TMTEST.MIDDLE_TASKS'ACCESS, 0, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START MIDDLE" );
-
- end loop;
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'H', 'I', 'G', 'H' ),
- PRIORITY,
- 1024,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- TASK_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF HIGH TASK" );
-
- RTEMS.TASK_START( TASK_ID, TMTEST.HIGH_TASK'ACCESS, 0, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF HIGH TASK" );
-
- TIMER_DRIVER.INITIALIZE;
- RTEMS.SEMAPHORE_RELEASE( TMTEST.SEMAPHORE_ID, STATUS );
-
- end TEST_INIT;
-
---PAGE
---
--- MIDDLE_TASKS
---
-
- procedure MIDDLE_TASKS (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- INDEX : RTEMS.UNSIGNED32;
- PRIORITY : RTEMS.TASK_PRIORITY;
- ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.SEMAPHORE_OBTAIN(
- TMTEST.SEMAPHORE_ID,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- STATUS
- );
-
- RTEMS.SEMAPHORE_RELEASE( TMTEST.SEMAPHORE_ID, STATUS );
-
- end MIDDLE_TASKS;
-
---PAGE
---
--- HIGH_TASK
---
-
- procedure HIGH_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- INDEX : RTEMS.UNSIGNED32;
- PRIORITY : RTEMS.TASK_PRIORITY;
- ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.SEMAPHORE_OBTAIN(
- TMTEST.SEMAPHORE_ID,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- STATUS
- );
-
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "SEMAPHORE_RELEASE (preemptive)",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- 0,
- RTEMS_CALLING_OVERHEAD.SEMAPHORE_RELEASE
- );
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end HIGH_TASK;
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm03/tmtest.ads b/c/src/ada-tests/tmtests/tm03/tmtest.ads
deleted file mode 100644
index 0090300559..0000000000
--- a/c/src/ada-tests/tmtests/tm03/tmtest.ads
+++ /dev/null
@@ -1,95 +0,0 @@
---
--- TMTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 3 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with TIMER_DRIVER;
-with RTEMS;
-
-package TMTEST is
-
---
--- The following is the ID of the semaphore used for timing operations.
---
-
- SEMAPHORE_ID : RTEMS.ID;
-
---
--- The following variable is set to the execution time returned
--- by the timer.
---
-
- END_TIME : RTEMS.UNSIGNED32;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TEST_INIT
---
--- DESCRIPTION:
---
--- This subprogram performs test initialization. After completion
--- of test initialization, the timer is started and a preemptive
--- SEMAPHORE_RELEASE is performed.
---
-
- procedure TEST_INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- MIDDLE_TASKS
---
--- DESCRIPTION:
---
--- This RTEMS task performs a blocking SEMAPHORE_OBTAIN. Once
--- is obtains the semaphore unit and executes again, it performs
--- a preemptive SEMAPHORE_RELEASE.
---
-
- procedure MIDDLE_TASKS (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- HIGH_TASK
---
--- DESCRIPTION:
---
--- This RTEMS task stops the timer and reports the execution
--- timer for a preemptive SEMAPHORE_RELEASE.
---
-
- procedure HIGH_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm04/config.h b/c/src/ada-tests/tmtests/tm04/config.h
deleted file mode 100644
index e58f7c9923..0000000000
--- a/c/src/ada-tests/tmtests/tm04/config.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 111
-#define CONFIGURE_MAXIMUM_SEMAPHORES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/tmtests/tm04/tm04.adb b/c/src/ada-tests/tmtests/tm04/tm04.adb
deleted file mode 100644
index 2207f55dc1..0000000000
--- a/c/src/ada-tests/tmtests/tm04/tm04.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test TM04 of the Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with TMTEST;
-with TEST_SUPPORT;
-
-procedure TM04 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- TMTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end TM04;
-
diff --git a/c/src/ada-tests/tmtests/tm04/tmtest.adb b/c/src/ada-tests/tmtests/tm04/tmtest.adb
deleted file mode 100644
index bef30afc6f..0000000000
--- a/c/src/ada-tests/tmtests/tm04/tmtest.adb
+++ /dev/null
@@ -1,501 +0,0 @@
---
--- TMTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 4 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with RTEMS_CALLING_OVERHEAD;
-with TEST_SUPPORT;
-with TEXT_IO;
-with TIME_TEST_SUPPORT;
-with UNSIGNED32_IO;
-
-package body TMTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TIME TEST 4 ***" );
-
- TMTEST.TEST_INIT;
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- TEST_INIT
---
-
- procedure TEST_INIT
- is
- INDEX : RTEMS.UNSIGNED32;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TMTEST.TASK_COUNT := TIME_TEST_SUPPORT.OPERATION_COUNT;
-
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'T', 'I', 'M', 'E' ),
- 10,
- 1024,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- TMTEST.TASK_ID( INDEX ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE LOOP" );
-
- RTEMS.TASK_START(
- TMTEST.TASK_ID( INDEX ),
- TMTEST.LOW_TASKS'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START LOOP" );
-
- end loop;
-
- RTEMS.SEMAPHORE_CREATE(
- RTEMS.BUILD_NAME( 'S', 'M', '1', ' ' ),
- 0,
- RTEMS.DEFAULT_ATTRIBUTES,
- RTEMS.NO_PRIORITY,
- TMTEST.SEMAPHORE_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_CREATE OF SM1" );
-
- end TEST_INIT;
-
---PAGE
---
--- HIGHEST_TASK
---
-
- procedure HIGHEST_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- OLD_PRIORITY : RTEMS.TASK_PRIORITY;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- if ARGUMENT = 1 then
-
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "TASK_RESTART (blocked, preempt)",
- TMTEST.END_TIME,
- 1,
- 0,
- RTEMS_CALLING_OVERHEAD.TASK_RESTART
- );
-
- RTEMS.TASK_SET_PRIORITY( RTEMS.SELF, 254, OLD_PRIORITY, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SET_PRIORITY" );
-
- elsif ARGUMENT = 2 then
-
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "TASK_RESTART (ready, preempt)",
- TMTEST.END_TIME,
- 1,
- 0,
- RTEMS_CALLING_OVERHEAD.TASK_RESTART
- );
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE" );
-
- else
-
- RTEMS.SEMAPHORE_OBTAIN(
- TMTEST.SEMAPHORE_ID,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- STATUS
- );
-
- end if;
-
- end HIGHEST_TASK;
-
---PAGE
---
--- HIGH_TASK
---
-
- procedure HIGH_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- OLD_PRIORITY : RTEMS.TASK_PRIORITY;
- INDEX : RTEMS.UNSIGNED32;
- OVERHEAD : RTEMS.UNSIGNED32;
- NAME : RTEMS.NAME;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TIMER_DRIVER.INITIALIZE;
- RTEMS.TASK_RESTART( TMTEST.HIGHEST_ID, 1, STATUS );
- -- preempted by Higher_task
-
- TIMER_DRIVER.INITIALIZE;
- RTEMS.TASK_RESTART( TMTEST.HIGHEST_ID, 2, STATUS );
- -- preempted by Higher_task
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- TIMER_DRIVER.EMPTY_FUNCTION;
- end loop;
- OVERHEAD := TIMER_DRIVER.READ_TIMER;
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.SEMAPHORE_RELEASE( TMTEST.SEMAPHORE_ID, STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "SEMAPHORE_RELEASE (readying)",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- RTEMS_CALLING_OVERHEAD.SEMAPHORE_RELEASE
- );
-
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.TASK_DELETE( TMTEST.TASK_ID( INDEX ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE" );
- end loop;
-
- NAME := RTEMS.BUILD_NAME( 'T', 'I', 'M', 'E' );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.TASK_CREATE(
- NAME,
- 10,
- 1024,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- TMTEST.TASK_ID( INDEX ),
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "TASK_CREATE",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- RTEMS_CALLING_OVERHEAD.TASK_CREATE
- );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.TASK_START(
- TMTEST.TASK_ID( INDEX ),
- TMTEST.LOW_TASKS'ACCESS,
- 0,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "TASK_START",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- RTEMS_CALLING_OVERHEAD.TASK_START
- );
-
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.TASK_DELETE( TMTEST.TASK_ID( INDEX ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE LOOP" );
- end loop;
-
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.TASK_CREATE(
- NAME,
- 250,
- 1024,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- TMTEST.TASK_ID( INDEX ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE LOOP" );
- RTEMS.TASK_START(
- TMTEST.TASK_ID( INDEX ),
- TMTEST.RESTART_TASK'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START LOOP" );
- RTEMS.TASK_SUSPEND( TMTEST.TASK_ID( INDEX ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SUSPEND LOOP" );
- end loop;
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.TASK_RESTART( TMTEST.TASK_ID( INDEX ), 0, STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "TASK_RESTART (suspended)",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- RTEMS_CALLING_OVERHEAD.TASK_RESTART
- );
-
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.TASK_SUSPEND( TMTEST.TASK_ID( INDEX ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SUSPEND LOOP" );
- end loop;
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.TASK_DELETE( TMTEST.TASK_ID( INDEX ), STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "TASK_DELETE (suspended)",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- RTEMS_CALLING_OVERHEAD.TASK_DELETE
- );
-
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.TASK_CREATE(
- NAME,
- 250,
- 1024,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.DEFAULT_ATTRIBUTES,
- TMTEST.TASK_ID( INDEX ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE LOOP" );
- RTEMS.TASK_START(
- TMTEST.TASK_ID( INDEX ),
- TMTEST.RESTART_TASK'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START LOOP" );
- end loop;
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.TASK_RESTART( TMTEST.TASK_ID( INDEX ), 1, STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "TASK_RESTART (ready)",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- RTEMS_CALLING_OVERHEAD.TASK_RESTART
- );
-
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.TASK_SET_PRIORITY(
- TMTEST.TASK_ID( INDEX ),
- 5,
- OLD_PRIORITY,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SET_PRIORITY LOOP" );
- end loop;
-
- -- yield processor -- tasks block
- RTEMS.TASK_WAKE_AFTER( RTEMS.YIELD_PROCESSOR, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.TASK_RESTART( TMTEST.TASK_ID( INDEX ), 1, STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "TASK_RESTART (blocked, no preempt)",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- RTEMS_CALLING_OVERHEAD.TASK_RESTART
- );
-
- -- yield processor -- tasks block
- RTEMS.TASK_WAKE_AFTER( RTEMS.YIELD_PROCESSOR, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.TASK_DELETE( TMTEST.TASK_ID( INDEX ), STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "TASK_DELETE (blocked)",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- RTEMS_CALLING_OVERHEAD.TASK_DELETE
- );
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end HIGH_TASK;
-
---PAGE
---
--- LOW_TASKS
---
-
- procedure LOW_TASKS (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TMTEST.TASK_COUNT := TMTEST.TASK_COUNT - 1;
-
- if TMTEST.TASK_COUNT = 0 then
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'H', 'I', ' ', ' ' ),
- 5,
- 2048,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.DEFAULT_ATTRIBUTES,
- ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE HI" );
-
- RTEMS.TASK_START(
- ID,
- TMTEST.HIGH_TASK'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START HI" );
-
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'H', 'I', 'G', 'H' ),
- 3,
- 2048,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.DEFAULT_ATTRIBUTES,
- TMTEST.HIGHEST_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE HIGH" );
-
- RTEMS.TASK_START(
- TMTEST.HIGHEST_ID,
- TMTEST.HIGHEST_TASK'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START HIGH" );
-
-
- end if;
-
- RTEMS.SEMAPHORE_OBTAIN(
- TMTEST.SEMAPHORE_ID,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- STATUS
- );
-
- end LOW_TASKS;
-
---PAGE
---
--- RESTART_TASK
---
-
- procedure RESTART_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- INDEX : RTEMS.UNSIGNED32;
- PRIORITY : RTEMS.TASK_PRIORITY;
- ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- if ARGUMENT = 1 then
- RTEMS.SEMAPHORE_OBTAIN(
- TMTEST.SEMAPHORE_ID,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- STATUS
- );
- end if;
-
- end RESTART_TASK;
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm04/tmtest.ads b/c/src/ada-tests/tmtests/tm04/tmtest.ads
deleted file mode 100644
index b4b29555df..0000000000
--- a/c/src/ada-tests/tmtests/tm04/tmtest.ads
+++ /dev/null
@@ -1,161 +0,0 @@
---
--- TMTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 4 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with TIME_TEST_SUPPORT;
-with TIMER_DRIVER;
-with RTEMS;
-
-package TMTEST is
-
---
--- This array contains the IDs of all RTEMS tasks created by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32
- range 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT ) of RTEMS.ID;
-
---
--- This variable contains the id of the highest priority task
--- in the system.
---
-
- HIGHEST_ID : RTEMS.ID;
-
---
--- The following is the ID of the semaphore used for timing operations.
---
-
- SEMAPHORE_ID : RTEMS.ID;
-
---
--- The following is used to perform the same operation
--- on a group of tasks.
---
-
- TASK_COUNT : RTEMS.UNSIGNED32;
-
---
--- The following variable is set to the execution time returned
--- by the timer.
---
-
- END_TIME : RTEMS.UNSIGNED32;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TEST_INIT
---
--- DESCRIPTION:
---
--- This subprogram performs test initialization.
---
-
- procedure TEST_INIT;
-
---
--- HIGHEST_TASK
---
--- DESCRIPTION:
---
--- This RTEMS task is created by one of the LOW_TASKS. The
--- first time it executes, it performs a blocking SEMAPHORE_OBTAIN
--- which transfers control of the processor to HIGH_TASK.
--- The first time HIGHEST_TASK is restarted, it stops the
--- timer and reports the execution time for a TASK_RESTART
--- for a blocked task which preempts the caller. The second
--- time HIGHEST_TASK is restarted, it stops the timer and reports
--- the execution time for a TASK_RESTART for a ready task which
--- has its original priority restored and preempts the caller.
---
-
- procedure HIGHEST_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- HIGH_TASK
---
--- DESCRIPTION:
---
--- This RTEMS task is created by one of the LOW_TASKS. This
--- task restarts HIGHEST_TASK twice. HIGHEST_TASK is blocked the
--- first time and preempts this task when restarted. HIGHEST_TASK
--- is ready the second time but has lowered its priority. When
--- restarted for the second time, HIGHEST_TASK will have its
--- original priority restored and preempt this task.
--- Once control of the processor is returned to this task after
--- HIGHEST_TASK deletes itself, the following execution times
--- are measured and reported.
---
--- + readying SEMAPHORE_RELEASE
--- + TASK_CREATE
--- + TASK_START
--- + TASK_RESTART of a suspended task
--- + TASK_DELETE of a suspended task
--- + TASK_RESTART of a ready task
--- + TASK_RESTART of a blocked task which does not cause a preempt
--- + TASK_DELETE of a blocked task
---
-
- procedure HIGH_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- LOW_TASKS
---
--- DESCRIPTION:
---
--- The last of these RTEMS tasks to execute creates HIGH_TASK
--- and HIGHEST_TASK. All of these tasks perform a blocking
--- SEMAPHORE_OBTAIN.
---
-
- procedure LOW_TASKS (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- RESTART_TASK
---
--- DESCRIPTION:
---
--- This RTEMS task
---
-
- procedure RESTART_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm05/config.h b/c/src/ada-tests/tmtests/tm05/config.h
deleted file mode 100644
index 588ff58466..0000000000
--- a/c/src/ada-tests/tmtests/tm05/config.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 111
-#define CONFIGURE_MAXIMUM_TIMERS 110
-#define CONFIGURE_MAXIMUM_SEMAPHORES 101
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/tmtests/tm05/tm05.adb b/c/src/ada-tests/tmtests/tm05/tm05.adb
deleted file mode 100644
index 535717a052..0000000000
--- a/c/src/ada-tests/tmtests/tm05/tm05.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test TM05 of the Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with TMTEST;
-with TEST_SUPPORT;
-
-procedure TM05 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- TMTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end TM05;
-
diff --git a/c/src/ada-tests/tmtests/tm05/tmtest.adb b/c/src/ada-tests/tmtests/tm05/tmtest.adb
deleted file mode 100644
index 438988615a..0000000000
--- a/c/src/ada-tests/tmtests/tm05/tmtest.adb
+++ /dev/null
@@ -1,174 +0,0 @@
---
--- TMTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 5 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with RTEMS_CALLING_OVERHEAD;
-with TEST_SUPPORT;
-with TEXT_IO;
-with TIME_TEST_SUPPORT;
-with UNSIGNED32_IO;
-
-package body TMTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- TASK_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TIME TEST 5 ***" );
-
- TMTEST.TEST_INIT;
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- TEST_INIT
---
-
- procedure TEST_INIT
- is
- INDEX : RTEMS.UNSIGNED32;
- TASK_ENTRY : RTEMS.TASK_ENTRY;
- PRIORITY : RTEMS.TASK_PRIORITY;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- PRIORITY := 250;
-
- for INDEX in 0 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'T', 'I', 'M', 'E' ),
- PRIORITY,
- 1024,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- TMTEST.TASK_ID( INDEX ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE LOOP" );
-
- PRIORITY := PRIORITY - 1;
-
- if INDEX = 0 then
- TASK_ENTRY := TMTEST.LOW_TASK'ACCESS;
- elsif INDEX = TIME_TEST_SUPPORT.OPERATION_COUNT then
- TASK_ENTRY := TMTEST.HIGH_TASK'ACCESS;
- else
- TASK_ENTRY := TMTEST.MIDDLE_TASKS'ACCESS;
- end if;
-
- RTEMS.TASK_START( TMTEST.TASK_ID( INDEX ), TASK_ENTRY, 0, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START LOOP" );
-
- end loop;
-
- end TEST_INIT;
-
---PAGE
---
--- HIGH_TASK
---
-
- procedure HIGH_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TIMER_DRIVER.INITIALIZE;
- RTEMS.TASK_SUSPEND( RTEMS.SELF, STATUS );
-
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
- TIME_TEST_SUPPORT.PUT_TIME(
- "TASK_RESUME causing preempt",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- 0,
- RTEMS_CALLING_OVERHEAD.TASK_RESUME
- );
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end HIGH_TASK;
-
---PAGE
---
--- MIDDLE_TASKS
---
-
- procedure MIDDLE_TASKS (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.TASK_SUSPEND( RTEMS.SELF, STATUS );
-
- TMTEST.TASK_INDEX := TMTEST.TASK_INDEX + 1;
- RTEMS.TASK_RESUME( TMTEST.TASK_ID( TMTEST.TASK_INDEX ), STATUS );
-
- end MIDDLE_TASKS;
-
---PAGE
---
--- LOW_TASK
---
-
- procedure LOW_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
- TIME_TEST_SUPPORT.PUT_TIME(
- "TASK_SUSPEND self",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- 0,
- RTEMS_CALLING_OVERHEAD.TASK_SUSPEND
- );
-
- TMTEST.TASK_INDEX := 1;
- TIMER_DRIVER.INITIALIZE;
- RTEMS.TASK_RESUME( TMTEST.TASK_ID( TMTEST.TASK_INDEX ), STATUS );
-
- end LOW_TASK;
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm05/tmtest.ads b/c/src/ada-tests/tmtests/tm05/tmtest.ads
deleted file mode 100644
index 2bb9b28c8d..0000000000
--- a/c/src/ada-tests/tmtests/tm05/tmtest.ads
+++ /dev/null
@@ -1,113 +0,0 @@
---
--- TMTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 5 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with TIME_TEST_SUPPORT;
-with TIMER_DRIVER;
-with RTEMS;
-
-package TMTEST is
-
---
--- This array contains the IDs of all RTEMS tasks created by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32
- range 0 .. TIME_TEST_SUPPORT.OPERATION_COUNT ) of RTEMS.ID;
-
- TASK_INDEX : RTEMS.UNSIGNED32;
-
---
--- The following variable is set to the execution time returned
--- by the timer.
---
-
- END_TIME : RTEMS.UNSIGNED32;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TEST_INIT
---
--- DESCRIPTION:
---
--- This subprogram performs test initialization.
---
-
- procedure TEST_INIT;
-
---
--- HIGH_TASK
---
--- DESCRIPTION:
---
--- This RTEMS task is the highest priority task in the system.
--- It starts the timer and performs a TASK_SUSPEND on SELF.
--- When this task executes again, it stops the timer and
--- reports the execution time for a preemptive TASK_RESUME.
---
-
- procedure HIGH_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- MIDDLE_TASKS
---
--- DESCRIPTION:
---
--- These RTEMS tasks perform a TASK_SUSPEND on SELF. When each
--- task executes again, it performs preemptive TASK_RESUME on
--- a higher priority task.
---
-
- procedure MIDDLE_TASKS (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- LOW_TASK
---
--- DESCRIPTION:
---
--- This RTEMS task is the lowest priority task in the system.
--- When this task executes, it stops the timer and reports the
--- execution time for a blocking TASK_SUSPEND. After this,
--- it starts the timer and performs a TASK_RESUME on a
--- higher priority task.
---
-
- procedure LOW_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm06/config.h b/c/src/ada-tests/tmtests/tm06/config.h
deleted file mode 100644
index 588ff58466..0000000000
--- a/c/src/ada-tests/tmtests/tm06/config.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 111
-#define CONFIGURE_MAXIMUM_TIMERS 110
-#define CONFIGURE_MAXIMUM_SEMAPHORES 101
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/tmtests/tm06/tm06.adb b/c/src/ada-tests/tmtests/tm06/tm06.adb
deleted file mode 100644
index c3f0e3ea1b..0000000000
--- a/c/src/ada-tests/tmtests/tm06/tm06.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test TM06 of the Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with TMTEST;
-with TEST_SUPPORT;
-
-procedure TM06 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- TMTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end TM06;
-
diff --git a/c/src/ada-tests/tmtests/tm06/tmtest.adb b/c/src/ada-tests/tmtests/tm06/tmtest.adb
deleted file mode 100644
index e8d471cd87..0000000000
--- a/c/src/ada-tests/tmtests/tm06/tmtest.adb
+++ /dev/null
@@ -1,210 +0,0 @@
---
--- TMTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 6 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with RTEMS_CALLING_OVERHEAD;
-with TEST_SUPPORT;
-with TEXT_IO;
-with TIME_TEST_SUPPORT;
-with UNSIGNED32_IO;
-
-package body TMTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- TASK_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TIME TEST 6 ***" );
-
- TMTEST.TEST_INIT;
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- TEST_INIT
---
-
- procedure TEST_INIT
- is
- INDEX : RTEMS.UNSIGNED32;
- ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TMTEST.TASK_RESTARTED := TIME_TEST_SUPPORT.OPERATION_COUNT;
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'T', 'I', 'M', 'E' ),
- 128,
- 1024,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE" );
-
- RTEMS.TASK_START( ID, TMTEST.TASK_1'ACCESS, 0, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START" );
-
- end TEST_INIT;
-
---PAGE
---
--- TASK_1
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- INDEX : RTEMS.UNSIGNED32;
- OVERHEAD : RTEMS.UNSIGNED32;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- if TMTEST.TASK_RESTARTED = TIME_TEST_SUPPORT.OPERATION_COUNT then
- TIMER_DRIVER.INITIALIZE;
- end if;
-
- TMTEST.TASK_RESTARTED := TMTEST.TASK_RESTARTED - 1;
-
- if TMTEST.TASK_RESTARTED /= 0 then
- RTEMS.TASK_RESTART( RTEMS.SELF, 0, STATUS );
- end if;
-
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- TIMER_DRIVER.EMPTY_FUNCTION;
- end loop;
- OVERHEAD := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "TASK_RESTART self",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- 0,
- RTEMS_CALLING_OVERHEAD.TASK_RESTART
- );
-
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'T', 'I', 'M', 'E' ),
- 254,
- 1024,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- TMTEST.TASK_ID( INDEX ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE LOOP" );
-
- RTEMS.TASK_START(
- TMTEST.TASK_ID( INDEX ),
- TMTEST.NULL_TASK'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START LOOP" );
-
- end loop;
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.TASK_SUSPEND( TMTEST.TASK_ID( INDEX ), STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
- TIME_TEST_SUPPORT.PUT_TIME(
- "TASK_SUSPEND no preempt",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- RTEMS_CALLING_OVERHEAD.TASK_SUSPEND
- );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.TASK_RESUME( TMTEST.TASK_ID( INDEX ), STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
- TIME_TEST_SUPPORT.PUT_TIME(
- "TASK_RESUME no preempt",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- RTEMS_CALLING_OVERHEAD.TASK_RESUME
- );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.TASK_DELETE( TMTEST.TASK_ID( INDEX ), STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
- TIME_TEST_SUPPORT.PUT_TIME(
- "TASK_DELETE others",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- RTEMS_CALLING_OVERHEAD.TASK_DELETE
- );
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end TASK_1;
-
---PAGE
---
--- NULL_TASK
---
-
- procedure NULL_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- begin
-
- NULL;
-
- end NULL_TASK;
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm06/tmtest.ads b/c/src/ada-tests/tmtests/tm06/tmtest.ads
deleted file mode 100644
index bbeed402cf..0000000000
--- a/c/src/ada-tests/tmtests/tm06/tmtest.ads
+++ /dev/null
@@ -1,104 +0,0 @@
---
--- TMTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 6 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with TIME_TEST_SUPPORT;
-with TIMER_DRIVER;
-with RTEMS;
-
-package TMTEST is
-
---
--- This array contains the IDs of all RTEMS tasks created by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32
- range 0 .. TIME_TEST_SUPPORT.OPERATION_COUNT ) of RTEMS.ID;
-
---
--- This variable is used to determine which restart of TASK_1 will start
--- timer and which will stop the timer and report the execution time.
---
-
- TASK_RESTARTED : RTEMS.UNSIGNED32;
-
---
--- The following variable is set to the execution time returned
--- by the timer.
---
-
- END_TIME : RTEMS.UNSIGNED32;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TEST_INIT
---
--- DESCRIPTION:
---
--- This subprogram performs test initialization.
---
-
- procedure TEST_INIT;
-
---
--- TASK_1
---
--- DESCRIPTION:
---
--- This RTEMS task is responsible for measuring and reporting the
--- following directive execution times:
---
--- + TASK_RESTART of SELF
--- + TASK_SUSPEND of another task with no context switch
--- + TASK_RESUME with no preemption
--- + TASK_DELETE of another task
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- NULL_TASK
---
--- DESCRIPTION:
---
--- This RTEMS task has no operations. It is used to have
--- tasks to perform directives upon.
---
-
- procedure NULL_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm07/config.h b/c/src/ada-tests/tmtests/tm07/config.h
deleted file mode 100644
index 588ff58466..0000000000
--- a/c/src/ada-tests/tmtests/tm07/config.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 111
-#define CONFIGURE_MAXIMUM_TIMERS 110
-#define CONFIGURE_MAXIMUM_SEMAPHORES 101
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/tmtests/tm07/tm07.adb b/c/src/ada-tests/tmtests/tm07/tm07.adb
deleted file mode 100644
index dc39b07f1e..0000000000
--- a/c/src/ada-tests/tmtests/tm07/tm07.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test TM07 of the Single Processor Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with TMTEST;
-with TEST_SUPPORT;
-
-procedure TM07 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- TMTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end TM07;
-
diff --git a/c/src/ada-tests/tmtests/tm07/tmtest.adb b/c/src/ada-tests/tmtests/tm07/tmtest.adb
deleted file mode 100644
index 12a2402626..0000000000
--- a/c/src/ada-tests/tmtests/tm07/tmtest.adb
+++ /dev/null
@@ -1,179 +0,0 @@
---
--- TMTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 7 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with RTEMS_CALLING_OVERHEAD;
-with TEST_SUPPORT;
-with TEXT_IO;
-with TIME_TEST_SUPPORT;
-with UNSIGNED32_IO;
-
-package body TMTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- TASK_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TIME TEST 7 ***" );
-
- TMTEST.TEST_INIT;
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- TEST_INIT
---
-
- procedure TEST_INIT
- is
- INDEX : RTEMS.UNSIGNED32;
- TASK_ENTRY : RTEMS.TASK_ENTRY;
- PRIORITY : RTEMS.TASK_PRIORITY;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- PRIORITY := 250;
-
- for INDEX in 0 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'T', 'I', 'M', 'E' ),
- PRIORITY,
- 1024,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- TMTEST.TASK_ID( INDEX ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE LOOP" );
-
- PRIORITY := PRIORITY - 1;
-
- if INDEX = 0 then
- TASK_ENTRY := TMTEST.LOW_TASK'ACCESS;
- elsif INDEX = TIME_TEST_SUPPORT.OPERATION_COUNT then
- TASK_ENTRY := TMTEST.HIGH_TASK'ACCESS;
- else
- TASK_ENTRY := TMTEST.MIDDLE_TASKS'ACCESS;
- end if;
-
- RTEMS.TASK_START( TMTEST.TASK_ID( INDEX ), TASK_ENTRY, 0, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START LOOP" );
-
- end loop;
-
- end TEST_INIT;
-
---PAGE
---
--- HIGH_TASK
---
-
- procedure HIGH_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- OLD_PRIORITY : RTEMS.TASK_PRIORITY;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- if ARGUMENT > 0 then
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
- TIME_TEST_SUPPORT.PUT_TIME(
- "TASK_RESTART suspended/preempt",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- 0,
- RTEMS_CALLING_OVERHEAD.TASK_RESTART
- );
- else
- RTEMS.TASK_SUSPEND( RTEMS.SELF, STATUS );
- end if;
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end HIGH_TASK;
-
---PAGE
---
--- MIDDLE_TASKS
---
-
- procedure MIDDLE_TASKS (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TMTEST.TASK_INDEX := TMTEST.TASK_INDEX + 1;
-
- if ARGUMENT > 0 then
- RTEMS.TASK_RESTART(
- TMTEST.TASK_ID( TMTEST.TASK_INDEX ),
- 16#7FFFFFFF#,
- STATUS
- );
- else
- RTEMS.TASK_SUSPEND( RTEMS.SELF, STATUS );
- end if;
-
-
- end MIDDLE_TASKS;
-
---PAGE
---
--- LOW_TASK
---
-
- procedure LOW_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TMTEST.TASK_INDEX := 1;
- TIMER_DRIVER.INITIALIZE;
-
- RTEMS.TASK_RESTART(
- TMTEST.TASK_ID( TMTEST.TASK_INDEX ),
- 16#7FFFFFFF#,
- STATUS
- );
-
- end LOW_TASK;
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm07/tmtest.ads b/c/src/ada-tests/tmtests/tm07/tmtest.ads
deleted file mode 100644
index 1e97840005..0000000000
--- a/c/src/ada-tests/tmtests/tm07/tmtest.ads
+++ /dev/null
@@ -1,111 +0,0 @@
---
--- TMTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 7 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with TIMER_DRIVER;
-with TIME_TEST_SUPPORT;
-with RTEMS;
-
-package TMTEST is
-
---
--- This array contains the IDs of all RTEMS tasks created by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32
- range 0 .. TIME_TEST_SUPPORT.OPERATION_COUNT ) of RTEMS.ID;
-
- TASK_INDEX : RTEMS.UNSIGNED32;
-
---
--- The following variable is set to the execution time returned
--- by the timer.
---
-
- END_TIME : RTEMS.UNSIGNED32;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TEST_INIT
---
--- DESCRIPTION:
---
--- This subprogram performs test initialization.
---
-
- procedure TEST_INIT;
-
---
--- HIGH_TASK
---
--- DESCRIPTION:
---
--- This RTEMS task is the highest priority task in the system.
--- The first time it executes it suspends itself. When restarted
--- it stops the timer and reports the time for a TASK_RESTART
--- of a suspended task which results in a preemption.
---
-
- procedure HIGH_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- MIDDLE_TASKS
---
--- DESCRIPTION:
---
--- These RTEMS tasks suspend themselves the first time they execute.
--- When restarted they perform a TASK_RESTART of a suspended
--- higher priority task which results in a preemption.
---
-
- procedure MIDDLE_TASKS (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- LOW_TASK
---
--- DESCRIPTION:
---
--- This RTEMS task is the lowest priority task in the system.
--- When it executes it starts the timer and restarts a higher
--- priority task which immediately preempts this task.
---
-
- procedure LOW_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm08/config.h b/c/src/ada-tests/tmtests/tm08/config.h
deleted file mode 100644
index 588ff58466..0000000000
--- a/c/src/ada-tests/tmtests/tm08/config.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 111
-#define CONFIGURE_MAXIMUM_TIMERS 110
-#define CONFIGURE_MAXIMUM_SEMAPHORES 101
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/tmtests/tm08/tm08.adb b/c/src/ada-tests/tmtests/tm08/tm08.adb
deleted file mode 100644
index 03b6a77bb8..0000000000
--- a/c/src/ada-tests/tmtests/tm08/tm08.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test TM08 of the Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with TMTEST;
-with TEST_SUPPORT;
-
-procedure TM08 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- TMTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end TM08;
-
diff --git a/c/src/ada-tests/tmtests/tm08/tmtest.adb b/c/src/ada-tests/tmtests/tm08/tmtest.adb
deleted file mode 100644
index 971c7be472..0000000000
--- a/c/src/ada-tests/tmtests/tm08/tmtest.adb
+++ /dev/null
@@ -1,341 +0,0 @@
---
--- TMTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 8 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with RTEMS_CALLING_OVERHEAD;
-with TEST_SUPPORT;
-with TEXT_IO;
-with TIME_TEST_SUPPORT;
-with UNSIGNED32_IO;
-
-package body TMTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- TASK_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TIME TEST 8 ***" );
-
- TMTEST.TEST_INIT;
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- TEST_INIT
---
-
- procedure TEST_INIT
- is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.TASK_CREATE(
- 1,
- 128,
- 1024,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.DEFAULT_ATTRIBUTES,
- TASK_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE" );
-
- RTEMS.TASK_START( TASK_ID, TMTEST.TEST_TASK'ACCESS, 0, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START" );
-
- RTEMS.TASK_CREATE(
- 1,
- 254,
- 1024,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.DEFAULT_ATTRIBUTES,
- TASK_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE" );
-
- RTEMS.TASK_START( TASK_ID, TMTEST.TEST_TASK1'ACCESS, 0, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START" );
-
- end TEST_INIT;
-
---PAGE
---
--- TEST_TASK
---
-
- procedure TEST_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- INDEX : RTEMS.UNSIGNED32;
- OVERHEAD : RTEMS.UNSIGNED32;
- OLD_PRIORITY : RTEMS.TASK_PRIORITY;
- OLD_MODE : RTEMS.MODE;
- OLD_NOTE : RTEMS.NOTEPAD_INDEX;
- TIME : RTEMS.TIME_OF_DAY;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- TIMER_DRIVER.EMPTY_FUNCTION;
- end loop;
- OVERHEAD := TIMER_DRIVER.READ_TIMER;
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.TASK_SET_PRIORITY(
- TMTEST.TASK_ID,
- RTEMS.CURRENT_PRIORITY,
- OLD_PRIORITY,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
- TIME_TEST_SUPPORT.PUT_TIME(
- "TASK_SET_PRIORITY current priority",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- RTEMS_CALLING_OVERHEAD.TASK_SET_PRIORITY
- );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.TASK_SET_PRIORITY(
- TMTEST.TASK_ID,
- 253,
- OLD_PRIORITY,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
- TIME_TEST_SUPPORT.PUT_TIME(
- "TASK_SET_PRIORITY no preempt",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- RTEMS_CALLING_OVERHEAD.TASK_SET_PRIORITY
- );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.TASK_MODE(
- RTEMS.CURRENT_MODE,
- RTEMS.CURRENT_MODE,
- OLD_MODE,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
- TIME_TEST_SUPPORT.PUT_TIME(
- "TASK_MODE (current)",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- RTEMS_CALLING_OVERHEAD.TASK_MODE
- );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.TASK_MODE(
- RTEMS.INTERRUPT_LEVEL( 1 ),
- RTEMS.INTERRUPT_MASK,
- OLD_MODE,
- STATUS
- );
- RTEMS.TASK_MODE(
- RTEMS.INTERRUPT_LEVEL( 0 ),
- RTEMS.INTERRUPT_MASK,
- OLD_MODE,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
- TIME_TEST_SUPPORT.PUT_TIME(
- "TASK_MODE (no reschedule)",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT * 2,
- OVERHEAD,
- RTEMS_CALLING_OVERHEAD.TASK_MODE
- );
-
- TIMER_DRIVER.INITIALIZE;
- RTEMS.TASK_MODE(
- RTEMS.NO_ASR,
- RTEMS.ASR_MASK,
- OLD_MODE,
- STATUS
- );
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
- TIME_TEST_SUPPORT.PUT_TIME(
- "TASK_MODE (reschedule)",
- TMTEST.END_TIME,
- 1,
- 0,
- RTEMS_CALLING_OVERHEAD.TASK_MODE
- );
-
- RTEMS.TASK_MODE(
- RTEMS.NO_PREEMPT,
- RTEMS.PREEMPT_MASK,
- OLD_MODE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_MODE" );
-
- RTEMS.TASK_SET_PRIORITY(
- TMTEST.TASK_ID,
- 1,
- OLD_PRIORITY,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SET_PRIORITY" );
-
- TIMER_DRIVER.INITIALIZE;
- RTEMS.TASK_MODE( -- preempted by TEST_TASK1
- RTEMS.PREEMPT,
- RTEMS.PREEMPT_MASK,
- OLD_MODE,
- STATUS
- );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.TASK_SET_NOTE(
- TMTEST.TASK_ID,
- 8,
- 10,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
- TIME_TEST_SUPPORT.PUT_TIME(
- "TASK_SET_NOTE ",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- RTEMS_CALLING_OVERHEAD.TASK_SET_NOTE
- );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.TASK_GET_NOTE(
- TMTEST.TASK_ID,
- 8,
- OLD_NOTE,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
- TIME_TEST_SUPPORT.PUT_TIME(
- "TASK_GET_NOTE ",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- RTEMS_CALLING_OVERHEAD.TASK_GET_NOTE
- );
-
- TIME := (1988, 1, 1, 0, 0, 0, 0 );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.CLOCK_SET(
- TIME,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
- TIME_TEST_SUPPORT.PUT_TIME(
- "CLOCK_SET",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- RTEMS_CALLING_OVERHEAD.CLOCK_SET
- );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.CLOCK_GET( RTEMS.CLOCK_GET_TOD, TIME'ADDRESS, STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
- TIME_TEST_SUPPORT.PUT_TIME(
- "CLOCK_GET",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- RTEMS_CALLING_OVERHEAD.CLOCK_GET
- );
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end TEST_TASK;
-
---PAGE
---
--- TEST_TASK1
---
-
- procedure TEST_TASK1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
- TIME_TEST_SUPPORT.PUT_TIME(
- "TASK_MODE (preemptive) ",
- TMTEST.END_TIME,
- 1,
- 0,
- RTEMS_CALLING_OVERHEAD.TASK_MODE
- );
-
- RTEMS.TASK_SUSPEND( RTEMS.SELF, STATUS );
-
- end TEST_TASK1;
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm08/tmtest.ads b/c/src/ada-tests/tmtests/tm08/tmtest.ads
deleted file mode 100644
index 0eccb2a452..0000000000
--- a/c/src/ada-tests/tmtests/tm08/tmtest.ads
+++ /dev/null
@@ -1,99 +0,0 @@
---
--- TMTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 8 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with TIMER_DRIVER;
-with RTEMS;
-
-package TMTEST is
-
- TASK_ID : RTEMS.ID;
-
---
--- The following variable is set to the execution time returned
--- by the timer.
---
-
- END_TIME : RTEMS.UNSIGNED32;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TEST_INIT
---
--- DESCRIPTION:
---
--- This subprogram performs test initialization.
---
-
- procedure TEST_INIT;
-
---
--- TEST_TASK
---
--- DESCRIPTION:
---
--- This RTEMS task is responsible for measuring and reporting the
--- following directive execution times:
---
--- + TASK_SET_PRIORITY to obtain the current priority
--- + TASK_SET_PRIORITY which does not require a context switch
--- + TASK_MODE to obtain the current mode
--- + TASK_MODE which does not require a reschedule
--- + TASK_MODE which does require a reschedule
--- + TASK_MODE which causes a preemption *** TEST_TASK1 executes
--- + TASK_SET_NOTE
--- + TASK_GET_NOTE
--- + CLOCK_SET
--- + CLOCK_GET
---
-
- procedure TEST_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TEST_TASK2
---
--- DESCRIPTION:
---
--- This RTEMS task is responsible for measuring and reporting the
--- following directive execution times:
---
--- + TASK_MODE which results in a preemption
---
-
- procedure TEST_TASK1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm09/config.h b/c/src/ada-tests/tmtests/tm09/config.h
deleted file mode 100644
index b0a10b776c..0000000000
--- a/c/src/ada-tests/tmtests/tm09/config.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/tmtests/tm09/tm09.adb b/c/src/ada-tests/tmtests/tm09/tm09.adb
deleted file mode 100644
index add60e1e84..0000000000
--- a/c/src/ada-tests/tmtests/tm09/tm09.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test TM09 of the Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with TMTEST;
-with TEST_SUPPORT;
-
-procedure TM09 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- TMTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end TM09;
-
diff --git a/c/src/ada-tests/tmtests/tm09/tmtest.adb b/c/src/ada-tests/tmtests/tm09/tmtest.adb
deleted file mode 100644
index 0dd7d9d798..0000000000
--- a/c/src/ada-tests/tmtests/tm09/tmtest.adb
+++ /dev/null
@@ -1,302 +0,0 @@
---
--- TMTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 9 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with RTEMS_CALLING_OVERHEAD;
-with TEST_SUPPORT;
-with TEXT_IO;
-with TIME_TEST_SUPPORT;
-with UNSIGNED32_IO;
-
-package body TMTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- TASK_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TIME TEST 9 ***" );
-
- RTEMS.TASK_CREATE(
- 1,
- 128,
- 4096,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.DEFAULT_ATTRIBUTES,
- TASK_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE" );
-
- RTEMS.TASK_START( TASK_ID, TMTEST.TEST_TASK'ACCESS, 0, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START" );
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- TEST_TASK
---
-
- procedure TEST_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TIMER_DRIVER.INITIALIZE;
- RTEMS.MESSAGE_QUEUE_CREATE(
- 1,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- 16,
- RTEMS.DEFAULT_OPTIONS,
- TMTEST.QUEUE_ID,
- STATUS
- );
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
- TIME_TEST_SUPPORT.PUT_TIME(
- "MESSAGE_QUEUE_CREATE",
- TMTEST.END_TIME,
- 1,
- 0,
- RTEMS_CALLING_OVERHEAD.MESSAGE_QUEUE_CREATE
- );
-
- TMTEST.QUEUE_TEST;
-
- TIMER_DRIVER.INITIALIZE;
- RTEMS.MESSAGE_QUEUE_DELETE(
- TMTEST.QUEUE_ID,
- STATUS
- );
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
- TIME_TEST_SUPPORT.PUT_TIME(
- "MESSAGE_QUEUE_DELETE",
- TMTEST.END_TIME,
- 1,
- 0,
- RTEMS_CALLING_OVERHEAD.MESSAGE_QUEUE_DELETE
- );
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end TEST_TASK;
-
---PAGE
---
--- QUEUE_TEST
---
-
- procedure QUEUE_TEST
- is
- SEND_LOOP_TIME : RTEMS.UNSIGNED32;
- URGENT_LOOP_TIME : RTEMS.UNSIGNED32;
- RECEIVE_LOOP_TIME : RTEMS.UNSIGNED32;
- SEND_TIME : RTEMS.UNSIGNED32;
- URGENT_TIME : RTEMS.UNSIGNED32;
- RECEIVE_TIME : RTEMS.UNSIGNED32;
- EMPTY_FLUSH_TIME : RTEMS.UNSIGNED32;
- FLUSH_TIME : RTEMS.UNSIGNED32;
- FLUSH_COUNT : RTEMS.UNSIGNED32;
- EMPTY_FLUSH_COUNT : RTEMS.UNSIGNED32;
- INDEX : RTEMS.UNSIGNED32;
- ITERATIONS : RTEMS.UNSIGNED32;
- LOOP_COUNT : RTEMS.UNSIGNED32;
- BUFFER : TMTEST.BUFFER;
- BUFFER_POINTER : RTEMS.ADDRESS;
- MESSAGE_SIZE : RTEMS.UNSIGNED32;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- SEND_LOOP_TIME := 0;
- URGENT_LOOP_TIME := 0;
- RECEIVE_LOOP_TIME := 0;
- SEND_TIME := 0;
- URGENT_TIME := 0;
- RECEIVE_TIME := 0;
- EMPTY_FLUSH_TIME := 0;
- FLUSH_TIME := 0;
- FLUSH_COUNT := 0;
- EMPTY_FLUSH_COUNT := 0;
-
- BUFFER_POINTER := BUFFER'ADDRESS;
-
- for ITERATIONS in 1 .. TIME_TEST_SUPPORT.ITERATION_COUNT
- loop
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- TIMER_DRIVER.EMPTY_FUNCTION;
- end loop;
- SEND_LOOP_TIME := SEND_LOOP_TIME + TIMER_DRIVER.READ_TIMER;
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- TIMER_DRIVER.EMPTY_FUNCTION;
- end loop;
- URGENT_LOOP_TIME := URGENT_LOOP_TIME + TIMER_DRIVER.READ_TIMER;
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- TIMER_DRIVER.EMPTY_FUNCTION;
- end loop;
- RECEIVE_LOOP_TIME := RECEIVE_LOOP_TIME + TIMER_DRIVER.READ_TIMER;
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.MESSAGE_QUEUE_SEND(
- TMTEST.QUEUE_ID,
- BUFFER_POINTER,
- 16,
- STATUS
- );
- end loop;
- SEND_TIME := SEND_TIME + TIMER_DRIVER.READ_TIMER;
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.MESSAGE_QUEUE_RECEIVE(
- TMTEST.QUEUE_ID,
- BUFFER_POINTER,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- MESSAGE_SIZE,
- STATUS
- );
- end loop;
- RECEIVE_TIME := RECEIVE_TIME + TIMER_DRIVER.READ_TIMER;
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.MESSAGE_QUEUE_URGENT(
- TMTEST.QUEUE_ID,
- BUFFER_POINTER,
- 16,
- STATUS
- );
- end loop;
- URGENT_TIME := URGENT_TIME + TIMER_DRIVER.READ_TIMER;
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.MESSAGE_QUEUE_RECEIVE(
- TMTEST.QUEUE_ID,
- BUFFER_POINTER,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- MESSAGE_SIZE,
- STATUS
- );
- end loop;
- RECEIVE_TIME := RECEIVE_TIME + TIMER_DRIVER.READ_TIMER;
-
- TIMER_DRIVER.INITIALIZE;
- RTEMS.MESSAGE_QUEUE_FLUSH(
- TMTEST.QUEUE_ID,
- EMPTY_FLUSH_COUNT,
- STATUS
- );
- EMPTY_FLUSH_TIME := EMPTY_FLUSH_TIME + TIMER_DRIVER.READ_TIMER;
-
- -- send one message to flush
- RTEMS.MESSAGE_QUEUE_SEND(
- TMTEST.QUEUE_ID,
- BUFFER_POINTER,
- 16,
- STATUS
- );
- TIMER_DRIVER.INITIALIZE;
- RTEMS.MESSAGE_QUEUE_FLUSH(
- TMTEST.QUEUE_ID,
- FLUSH_COUNT,
- STATUS
- );
- FLUSH_TIME := FLUSH_TIME + TIMER_DRIVER.READ_TIMER;
-
- end loop;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "MESSAGE_QUEUE_SEND (no tasks waiting)",
- SEND_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT *
- TIME_TEST_SUPPORT.ITERATION_COUNT,
- SEND_LOOP_TIME,
- RTEMS_CALLING_OVERHEAD.MESSAGE_QUEUE_SEND
- );
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "MESSAGE_QUEUE_URGENT (no tasks waiting)",
- URGENT_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT *
- TIME_TEST_SUPPORT.ITERATION_COUNT,
- URGENT_LOOP_TIME,
- RTEMS_CALLING_OVERHEAD.MESSAGE_QUEUE_URGENT
- );
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "MESSAGE_QUEUE_RECEIVE (messages available)",
- RECEIVE_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT *
- TIME_TEST_SUPPORT.ITERATION_COUNT * 2,
- RECEIVE_LOOP_TIME * 2,
- RTEMS_CALLING_OVERHEAD.MESSAGE_QUEUE_RECEIVE
- );
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "MESSAGE_QUEUE_FLUSH (empty queue)",
- EMPTY_FLUSH_TIME,
- TIME_TEST_SUPPORT.ITERATION_COUNT,
- 0,
- RTEMS_CALLING_OVERHEAD.MESSAGE_QUEUE_FLUSH
- );
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "MESSAGE_QUEUE_FLUSH (messages flushed)",
- FLUSH_TIME,
- TIME_TEST_SUPPORT.ITERATION_COUNT,
- 0,
- RTEMS_CALLING_OVERHEAD.MESSAGE_QUEUE_FLUSH
- );
-
- end QUEUE_TEST;
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm09/tmtest.ads b/c/src/ada-tests/tmtests/tm09/tmtest.ads
deleted file mode 100644
index d1a4f3eac1..0000000000
--- a/c/src/ada-tests/tmtests/tm09/tmtest.ads
+++ /dev/null
@@ -1,100 +0,0 @@
---
--- TMTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 9 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with TIMER_DRIVER;
-with RTEMS;
-
-package TMTEST is
-
---
--- Buffer Record similar to that used by RTEMS 3.2.1. Using this
--- avoids changes to the test.
---
-
- type BUFFER is
- record
- FIELD1 : RTEMS.UNSIGNED32; -- TEMPORARY UNTIL VARIABLE LENGTH
- FIELD2 : RTEMS.UNSIGNED32;
- FIELD3 : RTEMS.UNSIGNED32;
- FIELD4 : RTEMS.UNSIGNED32;
- end record;
-
---
--- The following is the ID of the message queue used for timing operations.
---
-
- QUEUE_ID : RTEMS.ID;
-
---
--- The following variable is set to the execution time returned
--- by the timer.
---
-
- END_TIME : RTEMS.UNSIGNED32;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TEST_TASK
---
--- DESCRIPTION:
---
--- This RTEMS task is responsible for measuring and reporting the
--- following directive execution times:
---
--- + MESSAGE_QUEUE_CREATE
--- + MESSAGE_QUEUE_DELETE
---
-
- procedure TEST_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- QUEUE_TEST
---
--- DESCRIPTION:
---
--- This subprogram is responsible for measuring and reporting the
--- following directive execution times:
---
--- + MESSAGE_QUEUE_SEND with no tasks waiting
--- + MESSAGE_QUEUE_URGENT with no tasks waiting
--- + MESSAGE_QUEUE_RECEIVE with messages available
--- + MESSAGE_QUEUE_FLUSH with an empty message queue
--- + MESSAGE_QUEUE_FLUSH with messages flushed
---
-
- procedure QUEUE_TEST;
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm10/config.h b/c/src/ada-tests/tmtests/tm10/config.h
deleted file mode 100644
index a3748d64ce..0000000000
--- a/c/src/ada-tests/tmtests/tm10/config.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 110
-#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/tmtests/tm10/tm10.adb b/c/src/ada-tests/tmtests/tm10/tm10.adb
deleted file mode 100644
index 79f725dc0b..0000000000
--- a/c/src/ada-tests/tmtests/tm10/tm10.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test TM10 of the Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with TMTEST;
-with TEST_SUPPORT;
-
-procedure TM10 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- TMTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end TM10;
-
diff --git a/c/src/ada-tests/tmtests/tm10/tmtest.adb b/c/src/ada-tests/tmtests/tm10/tmtest.adb
deleted file mode 100644
index 99e776f311..0000000000
--- a/c/src/ada-tests/tmtests/tm10/tmtest.adb
+++ /dev/null
@@ -1,225 +0,0 @@
---
--- TMTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 10 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with RTEMS_CALLING_OVERHEAD;
-with TEST_SUPPORT;
-with TEXT_IO;
-with TIME_TEST_SUPPORT;
-with UNSIGNED32_IO;
-
-package body TMTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TIME TEST 10 ***" );
-
- TMTEST.TEST_INIT;
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- TEST_INIT
---
-
- procedure TEST_INIT
- is
- INDEX : RTEMS.UNSIGNED32;
- TASK_ENTRY : RTEMS.TASK_ENTRY;
- PRIORITY : RTEMS.TASK_PRIORITY;
- OVERHEAD : RTEMS.UNSIGNED32;
- TASK_ID : RTEMS.ID;
- BUFFER : TMTEST.BUFFER;
- BUFFER_POINTER : RTEMS.ADDRESS;
- MESSAGE_SIZE : RTEMS.UNSIGNED32;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- BUFFER_POINTER := BUFFER'ADDRESS;
-
- PRIORITY := 5;
-
- for INDEX in 0 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'T', 'I', 'M', 'E' ),
- PRIORITY,
- 1024,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- TASK_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE LOOP" );
-
- PRIORITY := PRIORITY + 1;
-
- if INDEX = 0 then
- TASK_ENTRY := TMTEST.HIGH_TASK'ACCESS;
- elsif INDEX = TIME_TEST_SUPPORT.OPERATION_COUNT then
- TASK_ENTRY := TMTEST.LOW_TASK'ACCESS;
- else
- TASK_ENTRY := TMTEST.MIDDLE_TASKS'ACCESS;
- end if;
-
- RTEMS.TASK_START( TASK_ID, TASK_ENTRY, 0, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START LOOP" );
-
- end loop;
-
- RTEMS.MESSAGE_QUEUE_CREATE(
- 1,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- 16,
- RTEMS.DEFAULT_OPTIONS,
- TMTEST.QUEUE_ID,
- STATUS
- );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- TIMER_DRIVER.EMPTY_FUNCTION;
- end loop;
- OVERHEAD := TIMER_DRIVER.READ_TIMER;
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.MESSAGE_QUEUE_RECEIVE(
- TMTEST.QUEUE_ID,
- BUFFER_POINTER,
- RTEMS.NO_WAIT,
- RTEMS.NO_TIMEOUT,
- MESSAGE_SIZE,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
- TIME_TEST_SUPPORT.PUT_TIME(
- "MESSAGE_QUEUE_RECEIVE (NO_WAIT)",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- RTEMS_CALLING_OVERHEAD.MESSAGE_QUEUE_RECEIVE
- );
-
- end TEST_INIT;
-
---PAGE
---
--- HIGH_TASK
---
-
- procedure HIGH_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- BUFFER : TMTEST.BUFFER;
- BUFFER_POINTER : RTEMS.ADDRESS;
- MESSAGE_SIZE : RTEMS.UNSIGNED32;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- BUFFER_POINTER := BUFFER'ADDRESS;
-
- TIMER_DRIVER.INITIALIZE;
-
- RTEMS.MESSAGE_QUEUE_RECEIVE(
- TMTEST.QUEUE_ID,
- BUFFER_POINTER,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- MESSAGE_SIZE,
- STATUS
- );
-
- end HIGH_TASK;
-
---PAGE
---
--- MIDDLE_TASKS
---
-
- procedure MIDDLE_TASKS (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- BUFFER : TMTEST.BUFFER;
- BUFFER_POINTER : RTEMS.ADDRESS;
- MESSAGE_SIZE : RTEMS.UNSIGNED32;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- BUFFER_POINTER := BUFFER'ADDRESS;
-
- RTEMS.MESSAGE_QUEUE_RECEIVE(
- TMTEST.QUEUE_ID,
- BUFFER_POINTER,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- MESSAGE_SIZE,
- STATUS
- );
-
- end MIDDLE_TASKS;
-
---PAGE
---
--- LOW_TASK
---
-
- procedure LOW_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
- TIME_TEST_SUPPORT.PUT_TIME(
- "MESSAGE_QUEUE_RECEIVE (blocking)",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- 0,
- RTEMS_CALLING_OVERHEAD.MESSAGE_QUEUE_RECEIVE
- );
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end LOW_TASK;
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm10/tmtest.ads b/c/src/ada-tests/tmtests/tm10/tmtest.ads
deleted file mode 100644
index 9268fa8bac..0000000000
--- a/c/src/ada-tests/tmtests/tm10/tmtest.ads
+++ /dev/null
@@ -1,117 +0,0 @@
---
--- TMTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 10 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with TIMER_DRIVER;
-with RTEMS;
-
-package TMTEST is
-
---
--- Buffer Record similar to that used by RTEMS 3.2.1. Using this
--- avoids changes to the test.
---
-
- type BUFFER is
- record
- FIELD1 : RTEMS.UNSIGNED32; -- TEMPORARY UNTIL VARIABLE LENGTH
- FIELD2 : RTEMS.UNSIGNED32;
- FIELD3 : RTEMS.UNSIGNED32;
- FIELD4 : RTEMS.UNSIGNED32;
- end record;
-
---
--- The following is the ID of the message queue used for timing operations.
---
-
- QUEUE_ID : RTEMS.ID;
-
---
--- The following variable is set to the execution time returned
--- by the timer.
---
-
- END_TIME : RTEMS.UNSIGNED32;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TEST_INIT
---
--- DESCRIPTION:
---
--- This subprogram performs test initialization. After initialization
--- has been completed, the NO_WAIT case for MESSAGE_QUEUE_RECEIVE
--- is timed and reported.
---
-
- procedure TEST_INIT;
-
---
--- HIGH_TASK
---
--- DESCRIPTION:
---
--- This RTEMS task is the highest priority task in the system.
--- It starts the timer and performs a blocking MESSAGE_QUEUE_RECEIVE.
---
-
- procedure HIGH_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- MIDDLE_TASKS
---
--- DESCRIPTION:
---
--- These RTEMS tasks perform a blocking MESSAGE_QUEUE_RECEIVE.
---
-
- procedure MIDDLE_TASKS (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- LOW_TASK
---
--- DESCRIPTION:
---
--- This RTEMS task stops the timer and reports the execution time
--- of a blocking MESSAGE_QUEUE_RECEIVE.
---
-
- procedure LOW_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm11/config.h b/c/src/ada-tests/tmtests/tm11/config.h
deleted file mode 100644
index b82372ca0f..0000000000
--- a/c/src/ada-tests/tmtests/tm11/config.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 111
-#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/tmtests/tm11/tm11.adb b/c/src/ada-tests/tmtests/tm11/tm11.adb
deleted file mode 100644
index d88dae9fa4..0000000000
--- a/c/src/ada-tests/tmtests/tm11/tm11.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test TM11 of the Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with TMTEST;
-with TEST_SUPPORT;
-
-procedure TM11 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- TMTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end TM11;
-
diff --git a/c/src/ada-tests/tmtests/tm11/tmtest.adb b/c/src/ada-tests/tmtests/tm11/tmtest.adb
deleted file mode 100644
index 5cba54d365..0000000000
--- a/c/src/ada-tests/tmtests/tm11/tmtest.adb
+++ /dev/null
@@ -1,219 +0,0 @@
---
--- TMTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 11 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with RTEMS_CALLING_OVERHEAD;
-with TEST_SUPPORT;
-with TEXT_IO;
-with TIME_TEST_SUPPORT;
-with UNSIGNED32_IO;
-
-package body TMTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- TASK_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TIME TEST 11 ***" );
-
- RTEMS.TASK_CREATE(
- 1,
- 251,
- 1024,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- TASK_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE" );
-
- RTEMS.TASK_START(
- TASK_ID,
- TMTEST.TEST_INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START" );
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- TEST_INIT
---
-
- procedure TEST_INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- INDEX : RTEMS.UNSIGNED32;
- TASK_ENTRY : RTEMS.TASK_ENTRY;
- PRIORITY : RTEMS.TASK_PRIORITY;
- TASK_ID : RTEMS.ID;
- BUFFER : TMTEST.BUFFER;
- BUFFER_POINTER : RTEMS.ADDRESS;
- MESSAGE_SIZE : RTEMS.UNSIGNED32;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- BUFFER_POINTER := BUFFER'ADDRESS;
-
--- As each task is started, it preempts this task and performs a blocking
--- MESSAGE_QUEUE_RECEIVE. Upon completion of this loop all created tasks
--- are blocked.
-
- RTEMS.MESSAGE_QUEUE_CREATE(
- RTEMS.BUILD_NAME( 'M', 'Q', '1', ' ' ),
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- 16,
- RTEMS.DEFAULT_OPTIONS,
- TMTEST.QUEUE_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_CREATE" );
-
- PRIORITY := 250;
-
- for INDEX in 0 .. TIME_TEST_SUPPORT.OPERATION_COUNT - 1
- loop
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'T', 'I', 'M', 'E' ),
- PRIORITY,
- 1024,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- TASK_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE LOOP" );
-
- PRIORITY := PRIORITY - 1;
-
- if INDEX = TIME_TEST_SUPPORT.OPERATION_COUNT - 1 then
- TASK_ENTRY := TMTEST.HIGH_TASK'ACCESS;
- else
- TASK_ENTRY := TMTEST.MIDDLE_TASKS'ACCESS;
- end if;
-
- RTEMS.TASK_START( TASK_ID, TASK_ENTRY, 0, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START LOOP" );
-
- end loop;
-
- TIMER_DRIVER.INITIALIZE;
- RTEMS.MESSAGE_QUEUE_SEND(
- TMTEST.QUEUE_ID,
- BUFFER_POINTER,
- 16,
- STATUS
- );
-
- end TEST_INIT;
-
---PAGE
---
--- HIGH_TASK
---
-
- procedure HIGH_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- BUFFER : TMTEST.BUFFER;
- BUFFER_POINTER : RTEMS.ADDRESS;
- MESSAGE_SIZE : RTEMS.UNSIGNED32;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- BUFFER_POINTER := BUFFER'ADDRESS;
-
- RTEMS.MESSAGE_QUEUE_RECEIVE(
- TMTEST.QUEUE_ID,
- BUFFER_POINTER,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- MESSAGE_SIZE,
- STATUS
- );
-
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "MESSAGE_QUEUE_SEND (preemptive)",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- 0,
- RTEMS_CALLING_OVERHEAD.MESSAGE_QUEUE_SEND
- );
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end HIGH_TASK;
-
---PAGE
---
--- MIDDLE_TASKS
---
-
- procedure MIDDLE_TASKS (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- BUFFER : TMTEST.BUFFER;
- BUFFER_POINTER : RTEMS.ADDRESS;
- MESSAGE_SIZE : RTEMS.UNSIGNED32;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- BUFFER_POINTER := BUFFER'ADDRESS;
-
- RTEMS.MESSAGE_QUEUE_RECEIVE(
- TMTEST.QUEUE_ID,
- BUFFER_POINTER,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- MESSAGE_SIZE,
- STATUS
- );
-
- RTEMS.MESSAGE_QUEUE_SEND(
- TMTEST.QUEUE_ID,
- BUFFER_POINTER,
- 16,
- STATUS
- );
-
- end MIDDLE_TASKS;
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm11/tmtest.ads b/c/src/ada-tests/tmtests/tm11/tmtest.ads
deleted file mode 100644
index 82b9ba2fbe..0000000000
--- a/c/src/ada-tests/tmtests/tm11/tmtest.ads
+++ /dev/null
@@ -1,114 +0,0 @@
---
--- TMTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 11 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with TIMER_DRIVER;
-with RTEMS;
-
-package TMTEST is
-
---
--- Buffer Record similar to that used by RTEMS 3.2.1. Using this
--- avoids changes to the test.
---
-
- type BUFFER is
- record
- FIELD1 : RTEMS.UNSIGNED32; -- TEMPORARY UNTIL VARIABLE LENGTH
- FIELD2 : RTEMS.UNSIGNED32;
- FIELD3 : RTEMS.UNSIGNED32;
- FIELD4 : RTEMS.UNSIGNED32;
- end record;
-
---
--- The following is the ID of the message queue used for timing operations.
---
-
- QUEUE_ID : RTEMS.ID;
-
---
--- The following variable is set to the execution time returned
--- by the timer.
---
-
- END_TIME : RTEMS.UNSIGNED32;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TEST_INIT
---
--- DESCRIPTION:
---
--- This subprogram performs test initialization. As each application
--- task is created and started, it will preempt this task and
--- perform a blocking MESSAGE_QUEUE_RECEIVE. Once all of the
--- initialization is completed, the timer is started and the first
--- preemptive MESSAGE_QUEUE_SEND is executed.
---
-
- procedure TEST_INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- HIGH_TASK
---
--- DESCRIPTION:
---
--- This RTEMS task is the highest priority task in the system.
--- It performs a blocking blocking MESSAGE_QUEUE_RECEIVE. It is
--- the last test task created and started. Thus it is the last
--- task to be enqueued waiting for a message and the last task
--- to receive the message. Once it receives the message, it
--- stops the timer and reports the execution time for a
--- preemptive MESSAGE_QUEUE_SEND.
---
-
- procedure HIGH_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- MIDDLE_TASKS
---
--- DESCRIPTION:
---
--- As each of these RTEMS tasks is created and started, it preempts
--- the initialization task and perform a blocking MESSAGE_QUEUE_RECEIVE.
---
-
- procedure MIDDLE_TASKS (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm12/config.h b/c/src/ada-tests/tmtests/tm12/config.h
deleted file mode 100644
index b82372ca0f..0000000000
--- a/c/src/ada-tests/tmtests/tm12/config.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 111
-#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/tmtests/tm12/tm12.adb b/c/src/ada-tests/tmtests/tm12/tm12.adb
deleted file mode 100644
index aa19b74a5c..0000000000
--- a/c/src/ada-tests/tmtests/tm12/tm12.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test TM12 of the Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with TMTEST;
-with TEST_SUPPORT;
-
-procedure TM12 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- TMTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end TM12;
-
diff --git a/c/src/ada-tests/tmtests/tm12/tmtest.adb b/c/src/ada-tests/tmtests/tm12/tmtest.adb
deleted file mode 100644
index eb25d84829..0000000000
--- a/c/src/ada-tests/tmtests/tm12/tmtest.adb
+++ /dev/null
@@ -1,212 +0,0 @@
---
--- TMTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 12 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with RTEMS_CALLING_OVERHEAD;
-with TEST_SUPPORT;
-with TEXT_IO;
-with TIME_TEST_SUPPORT;
-with UNSIGNED32_IO;
-
-package body TMTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- TASK_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TIME TEST 12 ***" );
-
- RTEMS.TASK_CREATE(
- 1,
- 251,
- 1024,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- TASK_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE" );
-
- RTEMS.TASK_START(
- TASK_ID,
- TMTEST.TEST_INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START" );
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- TEST_INIT
---
-
- procedure TEST_INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- INDEX : RTEMS.UNSIGNED32;
- TASK_ENTRY : RTEMS.TASK_ENTRY;
- PRIORITY : RTEMS.TASK_PRIORITY;
- TASK_ID : RTEMS.ID;
- BUFFER : TMTEST.BUFFER;
- BUFFER_POINTER : RTEMS.ADDRESS;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- BUFFER_POINTER := BUFFER'ADDRESS;
-
- RTEMS.MESSAGE_QUEUE_CREATE(
- RTEMS.BUILD_NAME( 'M', 'Q', '1', ' ' ),
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- 16,
- RTEMS.DEFAULT_OPTIONS,
- TMTEST.QUEUE_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_CREATE" );
-
- PRIORITY := 250;
-
- for INDEX in 0 .. TIME_TEST_SUPPORT.OPERATION_COUNT - 1
- loop
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'T', 'I', 'M', 'E' ),
- PRIORITY,
- 1024,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- TASK_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE LOOP" );
-
- PRIORITY := PRIORITY - 1;
-
- if INDEX = TIME_TEST_SUPPORT.OPERATION_COUNT - 1 then
- TASK_ENTRY := TMTEST.HIGH_TASK'ACCESS;
- else
- TASK_ENTRY := TMTEST.LOW_TASKS'ACCESS;
- end if;
-
- RTEMS.TASK_START( TASK_ID, TASK_ENTRY, 0, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START LOOP" );
-
- end loop;
-
- end TEST_INIT;
-
---PAGE
---
--- HIGH_TASK
---
-
- procedure HIGH_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- BUFFER : TMTEST.BUFFER;
- BUFFER_POINTER : RTEMS.ADDRESS;
- INDEX : RTEMS.UNSIGNED32;
- OVERHEAD : RTEMS.UNSIGNED32;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- BUFFER_POINTER := BUFFER'ADDRESS;
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- TIMER_DRIVER.EMPTY_FUNCTION;
- end loop;
- OVERHEAD := TIMER_DRIVER.READ_TIMER;
-
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
-
- RTEMS.MESSAGE_QUEUE_SEND(
- TMTEST.QUEUE_ID,
- BUFFER_POINTER,
- 16,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_SEND" ); --XXX
-
- end loop;
-
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "MESSAGE_QUEUE_SEND (readying)",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- RTEMS_CALLING_OVERHEAD.MESSAGE_QUEUE_SEND
- );
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end HIGH_TASK;
-
---PAGE
---
--- LOW_TASK
---
-
- procedure LOW_TASKS (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- BUFFER : TMTEST.BUFFER;
- BUFFER_POINTER : RTEMS.ADDRESS;
- MESSAGE_SIZE : RTEMS.UNSIGNED32;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- BUFFER_POINTER := BUFFER'ADDRESS;
-
- RTEMS.MESSAGE_QUEUE_RECEIVE(
- TMTEST.QUEUE_ID,
- BUFFER_POINTER,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- MESSAGE_SIZE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_RECEIVE" ); --XXX
-
- end LOW_TASKS;
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm12/tmtest.ads b/c/src/ada-tests/tmtests/tm12/tmtest.ads
deleted file mode 100644
index b18df42719..0000000000
--- a/c/src/ada-tests/tmtests/tm12/tmtest.ads
+++ /dev/null
@@ -1,105 +0,0 @@
---
--- TMTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 12 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with TIMER_DRIVER;
-with RTEMS;
-
-package TMTEST is
-
---
--- Buffer Record similar to that used by RTEMS 3.2.1. Using this
--- avoids changes to the test.
---
-
- type BUFFER is
- record
- FIELD1 : RTEMS.UNSIGNED32; -- TEMPORARY UNTIL VARIABLE LENGTH
- FIELD2 : RTEMS.UNSIGNED32;
- FIELD3 : RTEMS.UNSIGNED32;
- FIELD4 : RTEMS.UNSIGNED32;
- end record;
-
---
--- The following is the ID of the message queue used for timing operations.
---
-
- QUEUE_ID : RTEMS.ID;
-
---
--- The following variable is set to the execution time returned
--- by the timer.
---
-
- END_TIME : RTEMS.UNSIGNED32;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TEST_INIT
---
--- DESCRIPTION:
---
--- This subprogram performs test initialization.
---
-
- procedure TEST_INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- HIGH_TASK
---
--- DESCRIPTION:
---
--- This RTEMS task is the lowest priority task in the system. It
--- only executes after all of the LOW_TASKS have blocked. It then
--- times a readying MESSAGE_QUEUE_SEND.
---
-
- procedure HIGH_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- LOW_TASKS
---
--- DESCRIPTION:
---
--- These RTEMS tasks perform a blocking MESSAGE_QUEUE_RECEIVE.
---
-
- procedure LOW_TASKS (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm13/config.h b/c/src/ada-tests/tmtests/tm13/config.h
deleted file mode 100644
index b82372ca0f..0000000000
--- a/c/src/ada-tests/tmtests/tm13/config.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 111
-#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/tmtests/tm13/tm13.adb b/c/src/ada-tests/tmtests/tm13/tm13.adb
deleted file mode 100644
index 79f3aabf2b..0000000000
--- a/c/src/ada-tests/tmtests/tm13/tm13.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test TM13 of the Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with TMTEST;
-with TEST_SUPPORT;
-
-procedure TM13 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- TMTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end TM13;
-
diff --git a/c/src/ada-tests/tmtests/tm13/tmtest.adb b/c/src/ada-tests/tmtests/tm13/tmtest.adb
deleted file mode 100644
index 2a657d9515..0000000000
--- a/c/src/ada-tests/tmtests/tm13/tmtest.adb
+++ /dev/null
@@ -1,217 +0,0 @@
---
--- TMTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 13 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with RTEMS_CALLING_OVERHEAD;
-with TEST_SUPPORT;
-with TEXT_IO;
-with TIME_TEST_SUPPORT;
-with UNSIGNED32_IO;
-
-package body TMTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- TASK_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TIME TEST 13 ***" );
-
- RTEMS.TASK_CREATE(
- 1,
- 251,
- 1024,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- TASK_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE" );
-
- RTEMS.TASK_START(
- TASK_ID,
- TMTEST.TEST_INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START" );
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- TEST_INIT
---
-
- procedure TEST_INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- INDEX : RTEMS.UNSIGNED32;
- TASK_ENTRY : RTEMS.TASK_ENTRY;
- PRIORITY : RTEMS.TASK_PRIORITY;
- TASK_ID : RTEMS.ID;
- BUFFER : TMTEST.BUFFER;
- BUFFER_POINTER : RTEMS.ADDRESS;
- MESSAGE_SIZE : RTEMS.UNSIGNED32;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- BUFFER_POINTER := BUFFER'ADDRESS;
-
--- As each task is started, it preempts this task and performs a blocking
--- MESSAGE_QUEUE_RECEIVE. Upon completion of this loop all created tasks
--- are blocked.
-
- RTEMS.MESSAGE_QUEUE_CREATE(
- RTEMS.BUILD_NAME( 'M', 'Q', '1', ' ' ),
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- 16,
- RTEMS.DEFAULT_OPTIONS,
- TMTEST.QUEUE_ID,
- STATUS
- );
-
- PRIORITY := 250;
-
- for INDEX in 0 .. TIME_TEST_SUPPORT.OPERATION_COUNT - 1
- loop
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'T', 'I', 'M', 'E' ),
- PRIORITY,
- 1024,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- TASK_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE LOOP" );
-
- PRIORITY := PRIORITY - 1;
-
- if INDEX = TIME_TEST_SUPPORT.OPERATION_COUNT - 1 then
- TASK_ENTRY := TMTEST.HIGH_TASK'ACCESS;
- else
- TASK_ENTRY := TMTEST.MIDDLE_TASKS'ACCESS;
- end if;
-
- RTEMS.TASK_START( TASK_ID, TASK_ENTRY, 0, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START LOOP" );
-
- end loop;
-
- TIMER_DRIVER.INITIALIZE;
- RTEMS.MESSAGE_QUEUE_URGENT(
- TMTEST.QUEUE_ID,
- BUFFER_POINTER,
- 16,
- STATUS
- );
-
- end TEST_INIT;
-
---PAGE
---
--- HIGH_TASK
---
-
- procedure HIGH_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- BUFFER : TMTEST.BUFFER;
- BUFFER_POINTER : RTEMS.ADDRESS;
- MESSAGE_SIZE : RTEMS.UNSIGNED32;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- BUFFER_POINTER := BUFFER'ADDRESS;
-
- RTEMS.MESSAGE_QUEUE_RECEIVE(
- TMTEST.QUEUE_ID,
- BUFFER_POINTER,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- MESSAGE_SIZE,
- STATUS
- );
-
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
- TIME_TEST_SUPPORT.PUT_TIME(
- "MESSAGE_QUEUE_URGENT (preemptive)",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- 0,
- RTEMS_CALLING_OVERHEAD.MESSAGE_QUEUE_URGENT
- );
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end HIGH_TASK;
-
---PAGE
---
--- MIDDLE_TASKS
---
-
- procedure MIDDLE_TASKS (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- BUFFER : TMTEST.BUFFER;
- BUFFER_POINTER : RTEMS.ADDRESS;
- MESSAGE_SIZE : RTEMS.UNSIGNED32;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- BUFFER_POINTER := BUFFER'ADDRESS;
-
- RTEMS.MESSAGE_QUEUE_RECEIVE(
- TMTEST.QUEUE_ID,
- BUFFER_POINTER,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- MESSAGE_SIZE,
- STATUS
- );
-
- RTEMS.MESSAGE_QUEUE_URGENT(
- TMTEST.QUEUE_ID,
- BUFFER_POINTER,
- 16,
- STATUS
- );
-
- end MIDDLE_TASKS;
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm13/tmtest.ads b/c/src/ada-tests/tmtests/tm13/tmtest.ads
deleted file mode 100644
index 2ecf4a3a96..0000000000
--- a/c/src/ada-tests/tmtests/tm13/tmtest.ads
+++ /dev/null
@@ -1,114 +0,0 @@
---
--- TMTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 13 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with TIMER_DRIVER;
-with RTEMS;
-
-package TMTEST is
-
---
--- Buffer Record similar to that used by RTEMS 3.2.1. Using this
--- avoids changes to the test.
---
-
- type BUFFER is
- record
- FIELD1 : RTEMS.UNSIGNED32; -- TEMPORARY UNTIL VARIABLE LENGTH
- FIELD2 : RTEMS.UNSIGNED32;
- FIELD3 : RTEMS.UNSIGNED32;
- FIELD4 : RTEMS.UNSIGNED32;
- end record;
-
---
--- The following is the ID of the message queue used for timing operations.
---
-
- QUEUE_ID : RTEMS.ID;
-
---
--- The following variable is set to the execution time returned
--- by the timer.
---
-
- END_TIME : RTEMS.UNSIGNED32;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TEST_INIT
---
--- DESCRIPTION:
---
--- This subprogram performs test initialization. As each application
--- task is created and started, it will preempt this task and
--- perform a blocking MESSAGE_QUEUE_RECEIVE. Once all of the
--- initialization is completed, the timer is started and the first
--- preemptive MESSAGE_QUEUE_URGENT is executed.
---
-
- procedure TEST_INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- HIGH_TASK
---
--- DESCRIPTION:
---
--- This RTEMS task is the highest priority task in the system.
--- It performs a blocking blocking MESSAGE_QUEUE_RECEIVE. It is
--- the last test task created and started. Thus it is the last
--- task to be enqueued waiting for a message and the last task
--- to receive the message. Once it receives the message, it
--- stops the timer and reports the execution time for a
--- preemptive MESSAGE_QUEUE_URGENT.
---
-
- procedure HIGH_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- MIDDLE_TASKS
---
--- DESCRIPTION:
---
--- As each of these RTEMS tasks is created and started, it preempts
--- the initialization task and perform a blocking MESSAGE_QUEUE_RECEIVE.
---
-
- procedure MIDDLE_TASKS (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm14/config.h b/c/src/ada-tests/tmtests/tm14/config.h
deleted file mode 100644
index b82372ca0f..0000000000
--- a/c/src/ada-tests/tmtests/tm14/config.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 111
-#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/tmtests/tm14/tm14.adb b/c/src/ada-tests/tmtests/tm14/tm14.adb
deleted file mode 100644
index c155fcd29d..0000000000
--- a/c/src/ada-tests/tmtests/tm14/tm14.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test TM14 of the Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with TMTEST;
-with TEST_SUPPORT;
-
-procedure TM14 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- TMTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end TM14;
-
diff --git a/c/src/ada-tests/tmtests/tm14/tmtest.adb b/c/src/ada-tests/tmtests/tm14/tmtest.adb
deleted file mode 100644
index 69eeb368eb..0000000000
--- a/c/src/ada-tests/tmtests/tm14/tmtest.adb
+++ /dev/null
@@ -1,216 +0,0 @@
---
--- TMTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 14 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with RTEMS_CALLING_OVERHEAD;
-with TEST_SUPPORT;
-with TEXT_IO;
-with TIME_TEST_SUPPORT;
-with UNSIGNED32_IO;
-
-package body TMTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- TASK_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TIME TEST 14 ***" );
-
- RTEMS.TASK_CREATE(
- 1,
- 251,
- 1024,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- TASK_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE" );
-
- RTEMS.TASK_START(
- TASK_ID,
- TMTEST.TEST_INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START" );
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- TEST_INIT
---
-
- procedure TEST_INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- INDEX : RTEMS.UNSIGNED32;
- TASK_ENTRY : RTEMS.TASK_ENTRY;
- PRIORITY : RTEMS.TASK_PRIORITY;
- TASK_ID : RTEMS.ID;
- BUFFER : TMTEST.BUFFER;
- BUFFER_POINTER : RTEMS.ADDRESS;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- BUFFER_POINTER := BUFFER'ADDRESS;
-
- RTEMS.MESSAGE_QUEUE_CREATE(
- RTEMS.BUILD_NAME( 'M', 'Q', '1', ' ' ),
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- 16,
- RTEMS.DEFAULT_OPTIONS,
- TMTEST.QUEUE_ID,
- STATUS
- );
-
- PRIORITY := 250;
-
- for INDEX in 0 .. TIME_TEST_SUPPORT.OPERATION_COUNT - 1
- loop
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'T', 'I', 'M', 'E' ),
- PRIORITY,
- 1024,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- TASK_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE LOOP" );
-
- PRIORITY := PRIORITY - 1;
-
- if INDEX = TIME_TEST_SUPPORT.OPERATION_COUNT - 1 then
- TASK_ENTRY := TMTEST.HIGH_TASK'ACCESS;
- else
- TASK_ENTRY := TMTEST.LOW_TASKS'ACCESS;
- end if;
-
- RTEMS.TASK_START( TASK_ID, TASK_ENTRY, 0, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START LOOP" );
-
- end loop;
-
- TIMER_DRIVER.INITIALIZE;
- RTEMS.MESSAGE_QUEUE_URGENT(
- TMTEST.QUEUE_ID,
- BUFFER_POINTER,
- 16,
- STATUS
- );
-
- end TEST_INIT;
-
---PAGE
---
--- HIGH_TASK
---
-
- procedure HIGH_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- BUFFER : TMTEST.BUFFER;
- BUFFER_POINTER : RTEMS.ADDRESS;
- OVERHEAD : RTEMS.UNSIGNED32;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- BUFFER_POINTER := BUFFER'ADDRESS;
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- TIMER_DRIVER.EMPTY_FUNCTION;
- end loop;
- OVERHEAD := TIMER_DRIVER.READ_TIMER;
-
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
-
- RTEMS.MESSAGE_QUEUE_URGENT(
- TMTEST.QUEUE_ID,
- BUFFER_POINTER,
- 16,
- STATUS
- );
-
- end loop;
-
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "MESSAGE_QUEUE_URGENT (readying)",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- RTEMS_CALLING_OVERHEAD.MESSAGE_QUEUE_URGENT
- );
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end HIGH_TASK;
-
---PAGE
---
--- LOW_TASKS
---
-
- procedure LOW_TASKS (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- BUFFER : TMTEST.BUFFER;
- BUFFER_POINTER : RTEMS.ADDRESS;
- MESSAGE_SIZE : RTEMS.UNSIGNED32;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- BUFFER_POINTER := BUFFER'ADDRESS;
-
- RTEMS.MESSAGE_QUEUE_RECEIVE(
- TMTEST.QUEUE_ID,
- BUFFER_POINTER,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- MESSAGE_SIZE,
- STATUS
- );
-
- end LOW_TASKS;
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm14/tmtest.ads b/c/src/ada-tests/tmtests/tm14/tmtest.ads
deleted file mode 100644
index e08a167fcb..0000000000
--- a/c/src/ada-tests/tmtests/tm14/tmtest.ads
+++ /dev/null
@@ -1,105 +0,0 @@
---
--- TMTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 14 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with TIMER_DRIVER;
-with RTEMS;
-
-package TMTEST is
-
---
--- Buffer Record similar to that used by RTEMS 3.2.1. Using this
--- avoids changes to the test.
---
-
- type BUFFER is
- record
- FIELD1 : RTEMS.UNSIGNED32; -- TEMPORARY UNTIL VARIABLE LENGTH
- FIELD2 : RTEMS.UNSIGNED32;
- FIELD3 : RTEMS.UNSIGNED32;
- FIELD4 : RTEMS.UNSIGNED32;
- end record;
-
---
--- The following is the ID of the message queue used for timing operations.
---
-
- QUEUE_ID : RTEMS.ID;
-
---
--- The following variable is set to the execution time returned
--- by the timer.
---
-
- END_TIME : RTEMS.UNSIGNED32;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TEST_INIT
---
--- DESCRIPTION:
---
--- This subprogram performs test initialization.
---
-
- procedure TEST_INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- HIGH_TASK
---
--- DESCRIPTION:
---
--- This RTEMS task is the lowest priority task in the system. It
--- only executes after all of the LOW_TASKS have blocked. It then
--- times a readying MESSAGE_QUEUE_SEND.
---
-
- procedure HIGH_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- LOW_TASKS
---
--- DESCRIPTION:
---
--- These RTEMS tasks perform a blocking MESSAGE_QUEUE_RECEIVE.
---
-
- procedure LOW_TASKS (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm15/config.h b/c/src/ada-tests/tmtests/tm15/config.h
deleted file mode 100644
index b82372ca0f..0000000000
--- a/c/src/ada-tests/tmtests/tm15/config.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 111
-#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/tmtests/tm15/tm15.adb b/c/src/ada-tests/tmtests/tm15/tm15.adb
deleted file mode 100644
index ede6d05307..0000000000
--- a/c/src/ada-tests/tmtests/tm15/tm15.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test TM15 of the Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with TMTEST;
-with TEST_SUPPORT;
-
-procedure TM15 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- TMTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end TM15;
-
diff --git a/c/src/ada-tests/tmtests/tm15/tmtest.adb b/c/src/ada-tests/tmtests/tm15/tmtest.adb
deleted file mode 100644
index c1ed0dc9c2..0000000000
--- a/c/src/ada-tests/tmtests/tm15/tmtest.adb
+++ /dev/null
@@ -1,276 +0,0 @@
---
--- TMTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 15 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with RTEMS_CALLING_OVERHEAD;
-with TEST_SUPPORT;
-with TEXT_IO;
-with TIME_TEST_SUPPORT;
-with UNSIGNED32_IO;
-
-package body TMTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- TASK_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TIME TEST 15 ***" );
-
- TMTEST.TEST_INIT;
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- TEST_INIT
---
-
- procedure TEST_INIT
- is
- ID : RTEMS.ID;
- INDEX : RTEMS.UNSIGNED32;
- OVERHEAD : RTEMS.UNSIGNED32;
- EVENT_OUT : RTEMS.EVENT_SET;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TMTEST.TIME_SET := FALSE;
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'L', 'O', 'W', ' ' ),
- 10,
- 1024,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE LOW" );
-
- RTEMS.TASK_START( ID, TMTEST.LOW_TASK'ACCESS, 0, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START LOW" );
-
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'H', 'I', 'G', 'H' ),
- 5,
- 1024,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- TMTEST.TASK_ID( INDEX ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE LOOP" );
-
- RTEMS.TASK_START(
- TMTEST.TASK_ID( INDEX ),
- TMTEST.HIGH_TASKS'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START LOOP" );
-
- end loop;
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- TIMER_DRIVER.EMPTY_FUNCTION;
- end loop;
- OVERHEAD := TIMER_DRIVER.READ_TIMER;
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.EVENT_RECEIVE(
- RTEMS.PENDING_EVENTS,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- EVENT_OUT,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "EVENT_RECEIVE (current)",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- RTEMS_CALLING_OVERHEAD.EVENT_RECEIVE
- );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.EVENT_RECEIVE(
- RTEMS.ALL_EVENTS,
- RTEMS.NO_WAIT,
- RTEMS.NO_TIMEOUT,
- EVENT_OUT,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "EVENT_RECEIVE (NO_WAIT)",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- RTEMS_CALLING_OVERHEAD.EVENT_RECEIVE
- );
-
- end TEST_INIT;
-
---PAGE
---
--- LOW_TASK
---
-
- procedure LOW_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- ID : RTEMS.ID;
- INDEX : RTEMS.UNSIGNED32;
- EVENT_OUT : RTEMS.EVENT_SET;
- OVERHEAD : RTEMS.UNSIGNED32;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "EVENT_RECEIVE (blocking)",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- 0,
- RTEMS_CALLING_OVERHEAD.EVENT_RECEIVE
- );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- TIMER_DRIVER.EMPTY_FUNCTION;
- end loop;
- OVERHEAD := TIMER_DRIVER.READ_TIMER;
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.EVENT_SEND( RTEMS.SELF, RTEMS.EVENT_16, STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "EVENT_SEND (returns to caller)",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- RTEMS_CALLING_OVERHEAD.EVENT_SEND
- );
-
- TIMER_DRIVER.INITIALIZE;
- RTEMS.EVENT_RECEIVE(
- RTEMS.EVENT_16,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- EVENT_OUT,
- STATUS
- );
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "EVENT_RECEIVE (available)",
- TMTEST.END_TIME,
- 1,
- 0,
- RTEMS_CALLING_OVERHEAD.EVENT_RECEIVE
- );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.EVENT_SEND(
- TMTEST.TASK_ID( INDEX ),
- RTEMS.EVENT_16,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "EVENT_SEND (readying)",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- RTEMS_CALLING_OVERHEAD.EVENT_SEND
- );
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end LOW_TASK;
-
---PAGE
---
--- HIGH_TASKS
---
-
- procedure HIGH_TASKS (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- EVENT_OUT : RTEMS.EVENT_SET;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- if TMTEST.TIME_SET = FALSE then
- TMTEST.TIME_SET := TRUE;
- TIMER_DRIVER.INITIALIZE;
- end if;
-
- RTEMS.EVENT_RECEIVE(
- 16#7FFFFFFF#,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- EVENT_OUT,
- STATUS
- );
-
- end HIGH_TASKS;
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm15/tmtest.ads b/c/src/ada-tests/tmtests/tm15/tmtest.ads
deleted file mode 100644
index 9ccc3d6558..0000000000
--- a/c/src/ada-tests/tmtests/tm15/tmtest.ads
+++ /dev/null
@@ -1,109 +0,0 @@
---
--- TMTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 15 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with TIME_TEST_SUPPORT;
-with TIMER_DRIVER;
-with RTEMS;
-
-package TMTEST is
-
---
--- This array contains the IDs of all RTEMS tasks created by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 ..
- TIME_TEST_SUPPORT.OPERATION_COUNT ) of RTEMS.ID;
-
---
--- This variable is set to TRUE if the timer has been initialized
--- and is currently timing an operation.
---
-
- TIME_SET : Standard.BOOLEAN;
-
---
--- The following variable is set to the execution time returned
--- by the timer.
---
-
- END_TIME : RTEMS.UNSIGNED32;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TEST_INIT
---
--- DESCRIPTION:
---
--- This subprogram performs test initialization. Once initialization
--- has been completed, the following operations are timed and reported:
---
--- + event_receive of currently PENDING_EVENTS
--- + event_receive NO_WAIT case
---
-
- procedure TEST_INIT;
-
---
--- LOW_TASK
---
--- DESCRIPTION:
---
--- This RTEMS task stops the timer and reports the execution time
--- of a blocking EVENT_RECEIVE. After this the following
--- operations are timed and the execution time is reported:
---
--- + EVENT_SEND which does not ready a task
--- + EVENT_RECEIVE with the event condition available
--- + EVENT_SEND which readies a task
---
-
- procedure LOW_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- HIGH_TASKS
---
--- DESCRIPTION:
---
--- These RTEMS tasks executive a blocking EVENT_RECEIVE after
--- initialization is complete. The first of these tasks to
--- execute starts the timer.
---
-
- procedure HIGH_TASKS (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm16/config.h b/c/src/ada-tests/tmtests/tm16/config.h
deleted file mode 100644
index b82372ca0f..0000000000
--- a/c/src/ada-tests/tmtests/tm16/config.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 111
-#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/tmtests/tm16/tm16.adb b/c/src/ada-tests/tmtests/tm16/tm16.adb
deleted file mode 100644
index 91acf3fe15..0000000000
--- a/c/src/ada-tests/tmtests/tm16/tm16.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test TM16 of the Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with TMTEST;
-with TEST_SUPPORT;
-
-procedure TM16 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- TMTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end TM16;
-
diff --git a/c/src/ada-tests/tmtests/tm16/tmtest.adb b/c/src/ada-tests/tmtests/tm16/tmtest.adb
deleted file mode 100644
index 57dcdd482d..0000000000
--- a/c/src/ada-tests/tmtests/tm16/tmtest.adb
+++ /dev/null
@@ -1,197 +0,0 @@
---
--- TMTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 16 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with RTEMS_CALLING_OVERHEAD;
-with TEST_SUPPORT;
-with TEXT_IO;
-with TIME_TEST_SUPPORT;
-with UNSIGNED32_IO;
-
-package body TMTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TIME TEST 16 ***" );
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'T', 'E', 'S', 'T' ),
- 251,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TEST INIT" );
-
- RTEMS.TASK_START(
- ID,
- TMTEST.TEST_INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TEST INIT" );
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- TEST_INIT
---
-
- procedure TEST_INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- PRIORITY : RTEMS.TASK_PRIORITY;
- INDEX : RTEMS.UNSIGNED32;
- TASK_ENTRY : RTEMS.TASK_ENTRY;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- PRIORITY := 250;
-
- for INDEX in 0 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'M', 'I', 'D', ' ' ),
- PRIORITY,
- 1024,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- TMTEST.TASK_ID( INDEX ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE LOOP" );
-
- if INDEX = TIME_TEST_SUPPORT.OPERATION_COUNT then
- TASK_ENTRY := TMTEST.HIGH_TASK'ACCESS;
- else
- TASK_ENTRY := TMTEST.MIDDLE_TASKS'ACCESS;
- end if;
-
- RTEMS.TASK_START(
- TMTEST.TASK_ID( INDEX ),
- TASK_ENTRY,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START LOOP" );
-
- PRIORITY := PRIORITY - 1;
-
- end loop;
-
- TMTEST.TASK_COUNT := 0;
-
- TIMER_DRIVER.INITIALIZE; -- starts the timer
-
- RTEMS.EVENT_SEND( -- preempts task
- TMTEST.TASK_ID( TMTEST.TASK_COUNT ),
- RTEMS.EVENT_16,
- STATUS
- );
-
- end TEST_INIT;
-
---PAGE
---
--- MIDDLE_TASKS
---
-
- procedure MIDDLE_TASKS (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- EVENT_OUT : RTEMS.EVENT_SET;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.EVENT_RECEIVE( -- task blocks
- RTEMS.EVENT_16,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- EVENT_OUT,
- STATUS
- );
-
- TMTEST.TASK_COUNT := TMTEST.TASK_COUNT + 1;
-
- RTEMS.EVENT_SEND( -- preempts task
- TMTEST.TASK_ID( TMTEST.TASK_COUNT ),
- RTEMS.EVENT_16,
- STATUS
- );
-
- end MIDDLE_TASKS;
-
---PAGE
---
--- HIGH_TASK
---
-
- procedure HIGH_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- EVENT_OUT : RTEMS.EVENT_SET;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.EVENT_RECEIVE( -- task blocks
- RTEMS.EVENT_16,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- EVENT_OUT,
- STATUS
- );
-
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "EVENT_SEND (preemptive)",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- 0,
- RTEMS_CALLING_OVERHEAD.EVENT_SEND
- );
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end HIGH_TASK;
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm16/tmtest.ads b/c/src/ada-tests/tmtests/tm16/tmtest.ads
deleted file mode 100644
index 44b7feabd2..0000000000
--- a/c/src/ada-tests/tmtests/tm16/tmtest.ads
+++ /dev/null
@@ -1,111 +0,0 @@
---
--- TMTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 16 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with TIME_TEST_SUPPORT;
-with TIMER_DRIVER;
-
-package TMTEST is
-
---
--- This array contains the IDs of all RTEMS tasks created by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32
- range 0 .. TIME_TEST_SUPPORT.OPERATION_COUNT ) of RTEMS.ID;
-
---
--- This variable is used to index through the TASK_ID array
--- so that events can be send to the next task.
---
-
- TASK_COUNT : RTEMS.UNSIGNED32;
-
---
--- The following variable is set to the execution time returned
--- by the timer.
---
-
- END_TIME : RTEMS.UNSIGNED32;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TEST_INIT
---
--- DESCRIPTION:
---
--- This subprogram performs test initialization. Once initialization
--- has been completed, this task sets the TASK_COUNT to 0 and
--- starts the timer before performing a preemptive EVENT_SEND.
---
-
- procedure TEST_INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- HIGH_TASK
---
--- DESCRIPTION:
---
--- This RTEMS task is highest priority task in the system.
--- Its first action is to perform a blocking EVENT_RECEIVE.
--- It is the last task to have its event set sent to it. Thus it
--- is the last task to be awakened by a preemptive EVENT_SEND.
--- After it preempts the last MIDDLE_TASKS, it stops the timer
--- and reports the execution time of preemptive EVENT_SEND.
---
-
- procedure HIGH_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- MIDDLE_TASKS
---
--- DESCRIPTION:
---
--- These RTEMS tasks perform a blocking EVENT_RECEIVE. When
--- readied, each task will increment the TASK_COUNT and
--- perform a preemptive EVENT_SEND. TASK_COUNT is used to
--- index the TASK_ID array in such a way that incrementing
--- TASK_COUNT makes it index the ID of the next task to
--- send events to.
---
-
- procedure MIDDLE_TASKS (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm17/config.h b/c/src/ada-tests/tmtests/tm17/config.h
deleted file mode 100644
index b82372ca0f..0000000000
--- a/c/src/ada-tests/tmtests/tm17/config.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 111
-#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/tmtests/tm17/tm17.adb b/c/src/ada-tests/tmtests/tm17/tm17.adb
deleted file mode 100644
index 263352447b..0000000000
--- a/c/src/ada-tests/tmtests/tm17/tm17.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test TM17 of the Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with TMTEST;
-with TEST_SUPPORT;
-
-procedure TM17 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- TMTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end TM17;
-
diff --git a/c/src/ada-tests/tmtests/tm17/tmtest.adb b/c/src/ada-tests/tmtests/tm17/tmtest.adb
deleted file mode 100644
index 1b36ab0cbf..0000000000
--- a/c/src/ada-tests/tmtests/tm17/tmtest.adb
+++ /dev/null
@@ -1,160 +0,0 @@
---
--- TMTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 17 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with RTEMS_CALLING_OVERHEAD;
-with TEST_SUPPORT;
-with TEXT_IO;
-with TIME_TEST_SUPPORT;
-with UNSIGNED32_IO;
-
-package body TMTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- TASK_ENTRY : RTEMS.TASK_ENTRY;
- INDEX : RTEMS.UNSIGNED32;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TIME TEST 17 ***" );
-
- TMTEST.TASK_PRIORITY := 254;
-
- for INDEX in 0 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'T', 'I', 'M', 'E' ),
- TMTEST.TASK_PRIORITY,
- 1024,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- TMTEST.TASK_ID( INDEX ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE LOOP" );
-
- if INDEX = TIME_TEST_SUPPORT.OPERATION_COUNT then
- TASK_ENTRY := TMTEST.LAST_TASK'ACCESS;
- elsif INDEX = 0 then
- TASK_ENTRY := TMTEST.FIRST_TASK'ACCESS;
- else
- TASK_ENTRY := TMTEST.MIDDLE_TASKS'ACCESS;
- end if;
-
- RTEMS.TASK_START( TMTEST.TASK_ID( INDEX ), TASK_ENTRY, 0, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START LOOP" );
-
- end loop;
-
- TMTEST.TASK_COUNT := 1;
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- FIRST_TASK
---
-
- procedure FIRST_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- PREVIOUS_PRIORITY : RTEMS.TASK_PRIORITY;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TIMER_DRIVER.INITIALIZE;
-
- TMTEST.TASK_PRIORITY := TMTEST.TASK_PRIORITY - 1;
- TMTEST.TASK_COUNT := TMTEST.TASK_COUNT + 1;
-
- RTEMS.TASK_SET_PRIORITY(
- TMTEST.TASK_ID( TMTEST.TASK_COUNT ),
- TMTEST.TASK_PRIORITY,
- PREVIOUS_PRIORITY,
- STATUS
- );
-
- end FIRST_TASK;
-
---PAGE
---
--- MIDDLE_TASKS
---
-
- procedure MIDDLE_TASKS (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- PREVIOUS_PRIORITY : RTEMS.TASK_PRIORITY;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TMTEST.TASK_PRIORITY := TMTEST.TASK_PRIORITY - 1;
- TMTEST.TASK_COUNT := TMTEST.TASK_COUNT + 1;
-
- RTEMS.TASK_SET_PRIORITY(
- TMTEST.TASK_ID( TMTEST.TASK_COUNT ),
- TMTEST.TASK_PRIORITY,
- PREVIOUS_PRIORITY,
- STATUS
- );
-
- end MIDDLE_TASKS;
-
---PAGE
---
--- LAST_TASK
---
-
- procedure LAST_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- begin
-
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "TASK_SET_PRIORITY (preemptive)",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- 0,
- RTEMS_CALLING_OVERHEAD.TASK_SET_PRIORITY
- );
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end LAST_TASK;
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm17/tmtest.ads b/c/src/ada-tests/tmtests/tm17/tmtest.ads
deleted file mode 100644
index e63a76fc62..0000000000
--- a/c/src/ada-tests/tmtests/tm17/tmtest.ads
+++ /dev/null
@@ -1,109 +0,0 @@
---
--- TMTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 17 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with TIME_TEST_SUPPORT;
-with TIMER_DRIVER;
-
-package TMTEST is
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32
- range 0 .. TIME_TEST_SUPPORT.OPERATION_COUNT ) of RTEMS.ID;
- TASK_NAME : array ( RTEMS.UNSIGNED32
- range 0 .. TIME_TEST_SUPPORT.OPERATION_COUNT ) of RTEMS.NAME;
-
---
--- These variables are used to index the TASK_ID array and change
--- the priority of each successive task such that the TASK_SET_PRIORITY
--- results in a preemption.
---
-
- TASK_COUNT : RTEMS.UNSIGNED32;
- TASK_PRIORITY : RTEMS.TASK_PRIORITY;
-
---
--- The following variable is set to the execution time returned
--- by the timer.
---
-
- END_TIME : RTEMS.UNSIGNED32;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- FIRST_TASK
---
--- DESCRIPTION:
---
--- This RTEMS task is the first task to execute in the system. It
--- starts the timer and updates the TASK_COUNT and TASK_PRIORITY
--- variables so that a preemptive TASK_SET_PRIORITY can be performed.
---
-
- procedure FIRST_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- MIDDLE_TASK
---
--- DESCRIPTION:
---
--- These RTEMS tasks update the TASK_COUNT and TASK_PRIORITY variables
--- so that a preemptive TASK_SET_PRIORITY can be performed.
---
-
- procedure MIDDLE_TASKS (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- LAST_TASK
---
--- DESCRIPTION:
---
--- This RTEMS task is the last task to execute in the system. It
--- stops the timer and reports the execution time of a preemptive
--- TASK_SET_PRIORITY.
---
-
- procedure LAST_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm18/config.h b/c/src/ada-tests/tmtests/tm18/config.h
deleted file mode 100644
index b82372ca0f..0000000000
--- a/c/src/ada-tests/tmtests/tm18/config.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 111
-#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/tmtests/tm18/tm18.adb b/c/src/ada-tests/tmtests/tm18/tm18.adb
deleted file mode 100644
index 207c78261e..0000000000
--- a/c/src/ada-tests/tmtests/tm18/tm18.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test TM18 of the Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with TMTEST;
-with TEST_SUPPORT;
-
-procedure TM18 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- TMTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end TM18;
-
diff --git a/c/src/ada-tests/tmtests/tm18/tmtest.adb b/c/src/ada-tests/tmtests/tm18/tmtest.adb
deleted file mode 100644
index 2603ed0c77..0000000000
--- a/c/src/ada-tests/tmtests/tm18/tmtest.adb
+++ /dev/null
@@ -1,154 +0,0 @@
---
--- TMTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 18 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with RTEMS_CALLING_OVERHEAD;
-with TEST_SUPPORT;
-with TEXT_IO;
-with TIME_TEST_SUPPORT;
-with UNSIGNED32_IO;
-
-package body TMTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TIME TEST 18 ***" );
-
- TMTEST.TEST_INIT;
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- TEST_INIT
---
-
- procedure TEST_INIT
- is
- ID : RTEMS.ID;
- TASK_ENTRY : RTEMS.TASK_ENTRY;
- INDEX : RTEMS.UNSIGNED32;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- for INDEX in 0 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'T', 'I', 'M', 'E' ),
- 128,
- 1024,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE LOOP" );
-
-
- if INDEX = TIME_TEST_SUPPORT.OPERATION_COUNT then
- TASK_ENTRY := TMTEST.LAST_TASK'ACCESS;
- elsif INDEX = 0 then
- TASK_ENTRY := TMTEST.FIRST_TASK'ACCESS;
- else
- TASK_ENTRY := TMTEST.MIDDLE_TASKS'ACCESS;
- end if;
-
- RTEMS.TASK_START( ID, TASK_ENTRY, 0, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START LOOP" );
-
- end loop;
-
- end TEST_INIT;
-
---PAGE
---
--- FIRST_TASK
---
-
- procedure FIRST_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TIMER_DRIVER.INITIALIZE;
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
-
- end FIRST_TASK;
-
---PAGE
---
--- MIDDLE_TASKS
---
-
- procedure MIDDLE_TASKS (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
-
- end MIDDLE_TASKS;
-
---PAGE
---
--- LAST_TASK
---
-
- procedure LAST_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- begin
-
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "TASK_DELETE (self)",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- 0,
- RTEMS_CALLING_OVERHEAD.TASK_DELETE
- );
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end LAST_TASK;
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm18/tmtest.ads b/c/src/ada-tests/tmtests/tm18/tmtest.ads
deleted file mode 100644
index 4fe81c9fcb..0000000000
--- a/c/src/ada-tests/tmtests/tm18/tmtest.ads
+++ /dev/null
@@ -1,97 +0,0 @@
---
--- TMTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 18 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with TIME_TEST_SUPPORT;
-with TIMER_DRIVER;
-
-package TMTEST is
-
---
--- The following variable is set to the execution time returned
--- by the timer.
---
-
- END_TIME : RTEMS.UNSIGNED32;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TEST_INIT
---
--- DESCRIPTION:
---
--- This subprogram performs test initialization.
---
-
- procedure TEST_INIT;
-
---
--- FIRST_TASK
---
--- DESCRIPTION:
---
--- This RTEMS task is the first task to execute. It starts the
--- timer and performs a TASK_DELETE on itself.
---
-
- procedure FIRST_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- MIDDLE_TASK
---
--- DESCRIPTION:
---
--- These RTEMS tasks perform a TASK_DELETE on themselves.
---
-
- procedure MIDDLE_TASKS (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- LAST_TASK
---
--- DESCRIPTION:
---
--- This RTEMS task is the last task to execute. It stops the
--- timer and reports the execution time of a TASK_DELETE SELF.
---
-
- procedure LAST_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm19/config.h b/c/src/ada-tests/tmtests/tm19/config.h
deleted file mode 100644
index b82372ca0f..0000000000
--- a/c/src/ada-tests/tmtests/tm19/config.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 111
-#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/tmtests/tm19/tm19.adb b/c/src/ada-tests/tmtests/tm19/tm19.adb
deleted file mode 100644
index 6e62411a10..0000000000
--- a/c/src/ada-tests/tmtests/tm19/tm19.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test TM19 of the Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with TMTEST;
-with TEST_SUPPORT;
-
-procedure TM19 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- TMTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end TM19;
-
diff --git a/c/src/ada-tests/tmtests/tm19/tmtest.adb b/c/src/ada-tests/tmtests/tm19/tmtest.adb
deleted file mode 100644
index 1beb25e26b..0000000000
--- a/c/src/ada-tests/tmtests/tm19/tmtest.adb
+++ /dev/null
@@ -1,287 +0,0 @@
---
--- TMTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 19 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with RTEMS_CALLING_OVERHEAD;
-with TEST_SUPPORT;
-with TEXT_IO;
-with TIME_TEST_SUPPORT;
-with UNSIGNED32_IO;
-
-package body TMTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TIME TEST 19 ***" );
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'T', 'I', 'M', 'E' ),
- 128,
- 1024,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- TMTEST.TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TASK1" );
-
- RTEMS.TASK_START(
- TMTEST.TASK_ID( 1 ),
- TMTEST.TASK_1'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TASK1" );
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'T', 'I', 'M', 'E' ),
- 127,
- 1024,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- TMTEST.TASK_ID( 2 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TASK2" );
-
- RTEMS.TASK_START(
- TMTEST.TASK_ID( 2 ),
- TMTEST.TASK_2'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TASK2" );
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'T', 'I', 'M', 'E' ),
- 126,
- 1024,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- TMTEST.TASK_ID( 3 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TASK3" );
-
- RTEMS.TASK_START(
- TMTEST.TASK_ID( 3 ),
- TMTEST.TASK_3'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TASK3" );
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- PROCESS_ASR_FOR_PASS_1
---
-
- procedure PROCESS_ASR_FOR_PASS_1 (
- SIGNALS : in RTEMS.SIGNAL_SET
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "SIGNAL_SEND (self)",
- TMTEST.END_TIME,
- 1,
- 0,
- RTEMS_CALLING_OVERHEAD.SIGNAL_SEND
- );
-
- TEXT_IO.PUT_LINE( "SIGNAL_ENTER (preemptive) na" );
-
- TIMER_DRIVER.INITIALIZE;
-
- end PROCESS_ASR_FOR_PASS_1;
-
---PAGE
---
--- PROCESS_ASR_FOR_PASS_2
---
-
- procedure PROCESS_ASR_FOR_PASS_2 (
- SIGNALS : in RTEMS.SIGNAL_SET
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.PUT_LINE( "SIGNAL_ENTER (preemptive) na" );
-
- RTEMS.TASK_RESUME( TMTEST.TASK_ID( 3 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_RESUME" );
-
- TIMER_DRIVER.INITIALIZE;
-
- end PROCESS_ASR_FOR_PASS_2;
-
---PAGE
---
--- TASK_1
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TIMER_DRIVER.INITIALIZE;
- RTEMS.SIGNAL_CATCH(
- TMTEST.PROCESS_ASR_FOR_PASS_1'ACCESS,
- RTEMS.DEFAULT_MODES,
- STATUS
- );
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "SIGNAL_CATCH",
- TMTEST.END_TIME,
- 1,
- 0,
- RTEMS_CALLING_OVERHEAD.SIGNAL_CATCH
- );
-
- TIMER_DRIVER.INITIALIZE;
- RTEMS.SIGNAL_SEND( TMTEST.TASK_ID( 2 ), RTEMS.SIGNAL_1, STATUS );
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "SIGNAL_SEND (non-preemptive)",
- TMTEST.END_TIME,
- 1,
- 0,
- RTEMS_CALLING_OVERHEAD.SIGNAL_SEND
- );
-
- TIMER_DRIVER.INITIALIZE;
- RTEMS.SIGNAL_SEND( RTEMS.SELF, RTEMS.SIGNAL_1, STATUS );
-
- -- end time is done in ASR
-
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "SIGNAL_RETURN (non-preemptive)",
- TMTEST.END_TIME,
- 1,
- 0,
- 0
- );
-
- RTEMS.SIGNAL_CATCH(
- TMTEST.PROCESS_ASR_FOR_PASS_2'ACCESS,
- RTEMS.NO_PREEMPT,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SIGNAL_CATCH" );
-
- TIMER_DRIVER.INITIALIZE;
- RTEMS.SIGNAL_SEND( RTEMS.SELF, RTEMS.SIGNAL_1, STATUS );
-
- end TASK_1;
-
---PAGE
---
--- PROCESS_ASR_FOR_TASK_2
---
-
- procedure PROCESS_ASR_FOR_TASK_2 (
- SIGNALS : in RTEMS.SIGNAL_SET
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- NULL;
-
- end PROCESS_ASR_FOR_TASK_2;
-
---PAGE
---
--- TASK_2
---
-
- procedure TASK_2 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.SIGNAL_CATCH(
- TMTEST.PROCESS_ASR_FOR_TASK_2'ACCESS,
- RTEMS.DEFAULT_MODES,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SIGNAL_CATCH" );
-
- RTEMS.TASK_SUSPEND( RTEMS.SELF, STATUS );
-
- end TASK_2;
-
---PAGE
---
--- TASK_3
---
-
- procedure TASK_3 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.TASK_SUSPEND( RTEMS.SELF, STATUS );
-
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "SIGNAL_RETURN (preemptive)",
- TMTEST.END_TIME,
- 1,
- 0,
- 0
- );
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end TASK_3;
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm19/tmtest.ads b/c/src/ada-tests/tmtests/tm19/tmtest.ads
deleted file mode 100644
index 2ac34a75fb..0000000000
--- a/c/src/ada-tests/tmtests/tm19/tmtest.ads
+++ /dev/null
@@ -1,144 +0,0 @@
---
--- TMTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 19 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with TIME_TEST_SUPPORT;
-with TIMER_DRIVER;
-
-package TMTEST is
-
---
--- This array contains the IDs of all RTEMS tasks created by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
-
---
--- The following variable is set to the execution time returned
--- by the timer.
---
-
- END_TIME : RTEMS.UNSIGNED32;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- PROCESS_ASR_FOR_PASS_1
---
--- DESCRIPTION:
---
--- This subprogram is the ASR used to measure and report the
--- execution time of a SIGNAL_SEND to SELF. Before it exits
--- it starts the timer so that the execution time required to
--- exit from an ASR back to the same task can be measured.
---
-
- procedure PROCESS_ASR_FOR_PASS_1 (
- SIGNALS : in RTEMS.SIGNAL_SET
- );
-
---
--- PROCESS_ASR_FOR_PASS_2
---
--- DESCRIPTION:
---
--- This subprogram is the ASR which sets up for a preemptive
--- return from an ASR. Before it exits it starts the timer
--- so that the execution time required to exit from an ASR
--- and transfer control to the another task can be measured.
---
-
- procedure PROCESS_ASR_FOR_PASS_2 (
- SIGNALS : in RTEMS.SIGNAL_SET
- );
-
---
--- TASK_1
---
--- DESCRIPTION:
---
--- This RTEMS task is responsible for measuring and reporting
--- the following execution times:
---
--- + SIGNAL_CATCH
--- + non-preemptive SIGNAL_SEND
--- + non-preemptive return from an ASR
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- PROCESS_ASR_FOR_TASK_2
---
--- DESCRIPTION:
---
--- This subprogram is the ASR for TASK_2. It performs no actions.
---
-
- procedure PROCESS_ASR_FOR_TASK_2 (
- SIGNALS : in RTEMS.SIGNAL_SET
- );
-
---
--- TASK_2
---
--- DESCRIPTION:
---
--- This RTEMS task is used as the recipient of a SIGNAL_SEND.
--- After establishing an ASR, it suspends itself to insure
--- that it does not execute again.
---
-
- procedure TASK_2 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_3
---
--- DESCRIPTION:
---
--- This RTEMS task is used as the recipient of a preemptive
--- SIGNAL_SEND. This task suspends itself and is resumed by
--- an ASR for TASK_1. Once the task executes, it stops the
--- timer and reports the execution time for a preemptive
--- return from an ASR.
---
-
- procedure TASK_3 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm20/config.h b/c/src/ada-tests/tmtests/tm20/config.h
deleted file mode 100644
index 83d86e9b8c..0000000000
--- a/c/src/ada-tests/tmtests/tm20/config.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_PARTITIONS 1
-#define CONFIGURE_MAXIMUM_REGIONS 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/tmtests/tm20/tm20.adb b/c/src/ada-tests/tmtests/tm20/tm20.adb
deleted file mode 100644
index 4462a79bb9..0000000000
--- a/c/src/ada-tests/tmtests/tm20/tm20.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test TM20 of the Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with TMTEST;
-with TEST_SUPPORT;
-
-procedure TM20 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- TMTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end TM20;
-
diff --git a/c/src/ada-tests/tmtests/tm20/tmtest.adb b/c/src/ada-tests/tmtests/tm20/tmtest.adb
deleted file mode 100644
index 6b17059e35..0000000000
--- a/c/src/ada-tests/tmtests/tm20/tmtest.adb
+++ /dev/null
@@ -1,588 +0,0 @@
---
--- TMTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 20 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with RTEMS_CALLING_OVERHEAD;
-with TEST_SUPPORT;
-with TEXT_IO;
-with TIME_TEST_SUPPORT;
-with UNSIGNED32_IO;
-
-package body TMTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TIME TEST 20 ***" );
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'T', 'I', 'M', '1' ),
- 128,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- TMTEST.TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TASK1" );
-
- RTEMS.TASK_START(
- TMTEST.TASK_ID( 1 ),
- TMTEST.TASK_1'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TASK1" );
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'T', 'I', 'M', '2' ),
- 129,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- TMTEST.TASK_ID( 2 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TASK2" );
-
- RTEMS.TASK_START(
- TMTEST.TASK_ID( 2 ),
- TMTEST.TASK_2'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TASK2" );
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- TASK_1
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- BUFFER_COUNT : RTEMS.UNSIGNED32;
- INDEX : RTEMS.UNSIGNED32;
- PREVIOUS_MODE : RTEMS.MODE;
- PREVIOUS_PRIORITY : RTEMS.TASK_PRIORITY;
- RETURN_VALUE : RTEMS.UNSIGNED32;
- OVERHEAD : RTEMS.UNSIGNED32;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TMTEST.PARTITION_NAME := RTEMS.BUILD_NAME( 'P', 'A', 'R', 'T' );
-
- TIMER_DRIVER.INITIALIZE;
-
- RTEMS.PARTITION_CREATE(
- TMTEST.PARTITION_NAME,
- TMTEST.PARTITION_AREA'ADDRESS,
- 2048,
- 128,
- RTEMS.DEFAULT_ATTRIBUTES,
- TMTEST.PARTITION_ID,
- STATUS
- );
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "PARTITION_CREATE",
- TMTEST.END_TIME,
- 1,
- 0,
- RTEMS_CALLING_OVERHEAD.PARTITION_CREATE
- );
-
- TMTEST.REGION_NAME := RTEMS.BUILD_NAME( 'R', 'E', 'G', 'N' );
-
- TIMER_DRIVER.INITIALIZE;
-
- RTEMS.REGION_CREATE(
- TMTEST.REGION_NAME,
- TMTEST.REGION_AREA'ADDRESS,
- 2048,
- 16,
- RTEMS.DEFAULT_ATTRIBUTES,
- TMTEST.REGION_ID,
- STATUS
- );
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "REGION_CREATE",
- TMTEST.END_TIME,
- 1,
- 0,
- RTEMS_CALLING_OVERHEAD.REGION_CREATE
- );
-
- TIMER_DRIVER.INITIALIZE;
- RTEMS.PARTITION_GET_BUFFER(
- TMTEST.PARTITION_ID,
- TMTEST.BUFFER_ADDRESS_1,
- STATUS
- );
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "PARTITION_GET_BUFFER (available)",
- TMTEST.END_TIME,
- 1,
- 0,
- RTEMS_CALLING_OVERHEAD.PARTITION_GET_BUFFER
- );
-
- BUFFER_COUNT := 0;
- loop
-
- RTEMS.PARTITION_GET_BUFFER(
- TMTEST.PARTITION_ID,
- TMTEST.BUFFER_ADDRESSES( BUFFER_COUNT ),
- STATUS
- );
-
- exit when RTEMS.ARE_STATUSES_EQUAL( STATUS, RTEMS.UNSATISFIED );
-
- BUFFER_COUNT := BUFFER_COUNT + 1;
-
- end loop;
-
- TIMER_DRIVER.INITIALIZE;
- RTEMS.PARTITION_GET_BUFFER(
- TMTEST.PARTITION_ID,
- TMTEST.BUFFER_ADDRESS_2,
- STATUS
- );
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "PARTITION_GET_BUFFER (not available)",
- TMTEST.END_TIME,
- 1,
- 0,
- RTEMS_CALLING_OVERHEAD.PARTITION_GET_BUFFER
- );
-
- TIMER_DRIVER.INITIALIZE;
- RTEMS.PARTITION_RETURN_BUFFER(
- TMTEST.PARTITION_ID,
- TMTEST.BUFFER_ADDRESS_1,
- STATUS
- );
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "PARTITION_RETURN_BUFFER",
- TMTEST.END_TIME,
- 1,
- 0,
- RTEMS_CALLING_OVERHEAD.PARTITION_RETURN_BUFFER
- );
-
- for INDEX in 0 .. BUFFER_COUNT - 1
- loop
-
- RTEMS.PARTITION_RETURN_BUFFER(
- TMTEST.PARTITION_ID,
- TMTEST.BUFFER_ADDRESSES( INDEX ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "PARTITION_RETURN_BUFFER" );
-
- end loop;
-
- TIMER_DRIVER.INITIALIZE;
- RTEMS.PARTITION_DELETE( TMTEST.PARTITION_ID, STATUS );
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "PARTITION_DELETE",
- TMTEST.END_TIME,
- 1,
- 0,
- RTEMS_CALLING_OVERHEAD.PARTITION_DELETE
- );
-
- RTEMS.REGION_GET_SEGMENT(
- TMTEST.REGION_ID,
- 400,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- TMTEST.BUFFER_ADDRESS_2,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_GET_SEGMENT" );
-
- TIMER_DRIVER.INITIALIZE;
- RTEMS.REGION_GET_SEGMENT(
- TMTEST.REGION_ID,
- 400,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- TMTEST.BUFFER_ADDRESS_3,
- STATUS
- );
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "REGION_GET_SEGMENT (available)",
- TMTEST.END_TIME,
- 1,
- 0,
- RTEMS_CALLING_OVERHEAD.REGION_GET_SEGMENT
- );
-
- TIMER_DRIVER.INITIALIZE;
- RTEMS.REGION_GET_SEGMENT(
- TMTEST.REGION_ID,
- 1998,
- RTEMS.NO_WAIT,
- RTEMS.NO_TIMEOUT,
- TMTEST.BUFFER_ADDRESS_4,
- STATUS
- );
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "REGION_GET_SEGMENT (NO_WAIT)",
- TMTEST.END_TIME,
- 1,
- 0,
- RTEMS_CALLING_OVERHEAD.REGION_GET_SEGMENT
- );
-
- RTEMS.REGION_RETURN_SEGMENT(
- TMTEST.REGION_ID,
- TMTEST.BUFFER_ADDRESS_3,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_RETURN_SEGMENT" );
-
- TIMER_DRIVER.INITIALIZE;
- RTEMS.REGION_RETURN_SEGMENT(
- TMTEST.REGION_ID,
- TMTEST.BUFFER_ADDRESS_2,
- STATUS
- );
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "REGION_RETURN_SEGMENT (no tasks waiting)",
- TMTEST.END_TIME,
- 1,
- 0,
- RTEMS_CALLING_OVERHEAD.REGION_RETURN_SEGMENT
- );
-
- RTEMS.REGION_GET_SEGMENT(
- TMTEST.REGION_ID,
- 400,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- TMTEST.BUFFER_ADDRESS_1,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_GET_SEGMENT" );
-
- TIMER_DRIVER.INITIALIZE;
- RTEMS.REGION_GET_SEGMENT(
- TMTEST.REGION_ID,
- 1998,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- TMTEST.BUFFER_ADDRESS_2,
- STATUS
- );
-
- -- execute TASK_2
-
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "REGION_RETURN_SEGMENT (preempt)",
- TMTEST.END_TIME,
- 1,
- 0,
- RTEMS_CALLING_OVERHEAD.REGION_RETURN_SEGMENT
- );
-
- RTEMS.REGION_RETURN_SEGMENT(
- TMTEST.REGION_ID,
- TMTEST.BUFFER_ADDRESS_2,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_RETURN_SEGMENT" );
-
- RTEMS.TASK_MODE(
- RTEMS.NO_PREEMPT,
- RTEMS.PREEMPT_MASK,
- PREVIOUS_MODE,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_MODE" );
-
- RTEMS.TASK_SET_PRIORITY( RTEMS.SELF, 254, PREVIOUS_PRIORITY, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SET_PRIORITY" );
-
- RTEMS.REGION_GET_SEGMENT(
- TMTEST.REGION_ID,
- 400,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- TMTEST.BUFFER_ADDRESS_1,
- STATUS
- );
-
- RTEMS.REGION_GET_SEGMENT(
- TMTEST.REGION_ID,
- 1998,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.NO_TIMEOUT,
- TMTEST.BUFFER_ADDRESS_2,
- STATUS
- );
-
- -- execute TASK_2
-
- RTEMS.REGION_RETURN_SEGMENT(
- TMTEST.REGION_ID,
- TMTEST.BUFFER_ADDRESS_2,
- STATUS
- );
-
- TIMER_DRIVER.INITIALIZE;
- RTEMS.REGION_DELETE( TMTEST.REGION_ID, STATUS );
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "REGION_DELETE",
- TMTEST.END_TIME,
- 1,
- 0,
- RTEMS_CALLING_OVERHEAD.REGION_DELETE
- );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- TIMER_DRIVER.EMPTY_FUNCTION;
- end loop;
- OVERHEAD := TIMER_DRIVER.READ_TIMER;
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.IO_INITIALIZE(
- 1,
- 0,
- RTEMS.NULL_ADDRESS,
- RETURN_VALUE,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "IO_INITIALIZE",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- 0,
- RTEMS_CALLING_OVERHEAD.IO_INITIALIZE
- );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.IO_OPEN(
- 1,
- 0,
- RTEMS.NULL_ADDRESS,
- RETURN_VALUE,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "IO_OPEN",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- 0,
- RTEMS_CALLING_OVERHEAD.IO_OPEN
- );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.IO_CLOSE(
- 1,
- 0,
- RTEMS.NULL_ADDRESS,
- RETURN_VALUE,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "IO_CLOSE",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- 0,
- RTEMS_CALLING_OVERHEAD.IO_CLOSE
- );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.IO_READ(
- 1,
- 0,
- RTEMS.NULL_ADDRESS,
- RETURN_VALUE,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "IO_READ",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- 0,
- RTEMS_CALLING_OVERHEAD.IO_READ
- );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.IO_WRITE(
- 1,
- 0,
- RTEMS.NULL_ADDRESS,
- RETURN_VALUE,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "IO_WRITE",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- 0,
- RTEMS_CALLING_OVERHEAD.IO_WRITE
- );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.IO_CONTROL(
- 1,
- 0,
- RTEMS.NULL_ADDRESS,
- RETURN_VALUE,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "IO_CONTROL",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- 0,
- RTEMS_CALLING_OVERHEAD.IO_CONTROL
- );
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end TASK_1;
-
---PAGE
---
--- TASK_2
---
-
- procedure TASK_2 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "REGION_GET_SEGMENT (blocking)",
- TMTEST.END_TIME,
- 1,
- 0,
- RTEMS_CALLING_OVERHEAD.REGION_GET_SEGMENT
- );
-
- TIMER_DRIVER.INITIALIZE;
- RTEMS.REGION_RETURN_SEGMENT(
- TMTEST.REGION_ID,
- TMTEST.BUFFER_ADDRESS_1,
- STATUS
- );
-
- -- preempt back to TASK_1
-
- TIMER_DRIVER.INITIALIZE;
- RTEMS.REGION_RETURN_SEGMENT(
- TMTEST.REGION_ID,
- TMTEST.BUFFER_ADDRESS_1,
- STATUS
- );
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "REGION_RETURN_SEGMENT (ready -- return)",
- TMTEST.END_TIME,
- 1,
- 0,
- RTEMS_CALLING_OVERHEAD.REGION_RETURN_SEGMENT
- );
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end TASK_2;
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm20/tmtest.ads b/c/src/ada-tests/tmtests/tm20/tmtest.ads
deleted file mode 100644
index cf1dfeaaa1..0000000000
--- a/c/src/ada-tests/tmtests/tm20/tmtest.ads
+++ /dev/null
@@ -1,151 +0,0 @@
---
--- TMTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 20 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with TIME_TEST_SUPPORT;
-with TIMER_DRIVER;
-with RTEMS;
-
-package TMTEST is
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
- TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
-
---
--- These following are the ID and NAME of the RTEMS partition created
--- by this test.
---
-
- PARTITION_ID : RTEMS.ID;
- PARTITION_NAME : RTEMS.NAME;
-
---
--- These following are the ID and NAME of the RTEMS region created
--- by this test.
---
-
- REGION_ID : RTEMS.ID;
- REGION_NAME : RTEMS.NAME;
-
---
--- The following area defines a memory area to be used as the
--- memory space for a partition.
---
-
- PARTITION_AREA : array ( RTEMS.UNSIGNED32 range 0 .. 2047 )
- of RTEMS.UNSIGNED8;
- for PARTITION_AREA'ALIGNMENT use RTEMS.STRUCTURE_ALIGNMENT;
-
---
--- The following area defines a memory area to be used as the
--- memory space for a region.
---
-
- REGION_AREA : array ( RTEMS.UNSIGNED32 range 0 .. 2047 )
- of RTEMS.UNSIGNED8;
-
- for REGION_AREA'ALIGNMENT use RTEMS.STRUCTURE_ALIGNMENT;
-
---
--- The following are the buffers allocated from the region.
---
-
- BUFFER_ADDRESS_1 : RTEMS.ADDRESS;
- BUFFER_ADDRESS_2 : RTEMS.ADDRESS;
- BUFFER_ADDRESS_3 : RTEMS.ADDRESS;
- BUFFER_ADDRESS_4 : RTEMS.ADDRESS;
-
- BUFFER_ADDRESSES : array ( RTEMS.UNSIGNED32
- range 0 .. TIME_TEST_SUPPORT.OPERATION_COUNT ) of RTEMS.ADDRESS;
-
---
--- The following variable is set to the execution time returned
--- by the timer.
---
-
- END_TIME : RTEMS.UNSIGNED32;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_1
---
--- DESCRIPTION:
---
--- This RTEMS task is responsible for measuring and reporting
--- the following execution times:
---
--- + PARTITION_CREATE
--- + REGION_CREATE
--- + PARTITION_GET_BUFFER with a buffer available
--- + PARTITION_GET_BUFFER with no buffers available
--- + PARTITION_RETURN_BUFFER
--- + PARTITION_DELETE
--- + REGION_GET_SEGMENT with a segment available
--- + REGION_GET_SEGMENT with the NO_WAIT option
--- + REGION_RETURN_SEGMENT with no tasks waiting for memory
--- + REGION_RETURN_SEGMENT preemptive
--- + REGION_DELETE
--- + IO_INITIALIZE
--- + IO_OPEN
--- + IO_CLOSE
--- + IO_READ
--- + IO_WRITE
--- + IO_CONTROL
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_2
---
--- DESCRIPTION:
---
--- This RTEMS task is responsible for measuring and reporting
--- the following execution times:
---
--- + blocking REGION_GET_SEGMENT
--- + REGION_RETURN_SEGMENT which readies a task
---
-
- procedure TASK_2 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm21/config.h b/c/src/ada-tests/tmtests/tm21/config.h
deleted file mode 100644
index 43d589d0f0..0000000000
--- a/c/src/ada-tests/tmtests/tm21/config.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 102
-#define CONFIGURE_MAXIMUM_TIMERS 100
-#define CONFIGURE_MAXIMUM_SEMAPHORES 100
-#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 100
-#define CONFIGURE_MAXIMUM_PARTITIONS 100
-#define CONFIGURE_MAXIMUM_REGIONS 100
-#define CONFIGURE_MAXIMUM_PORTS 100
-#define CONFIGURE_MAXIMUM_PERIODS 100
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/tmtests/tm21/tm21.adb b/c/src/ada-tests/tmtests/tm21/tm21.adb
deleted file mode 100644
index 05958d5ad5..0000000000
--- a/c/src/ada-tests/tmtests/tm21/tm21.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test TM21 of the Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with TMTEST;
-with TEST_SUPPORT;
-
-procedure TM21 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- TMTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end TM21;
-
diff --git a/c/src/ada-tests/tmtests/tm21/tmtest.adb b/c/src/ada-tests/tmtests/tm21/tmtest.adb
deleted file mode 100644
index 51ea93cc8b..0000000000
--- a/c/src/ada-tests/tmtests/tm21/tmtest.adb
+++ /dev/null
@@ -1,302 +0,0 @@
---
--- TMTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 21 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with RTEMS_CALLING_OVERHEAD;
-with TEST_SUPPORT;
-with TEXT_IO;
-with TIME_TEST_SUPPORT;
-with UNSIGNED32_IO;
-
-package body TMTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TIME TEST 21 ***" );
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'T', 'I', 'M', 'E' ),
- 250,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE TASK_1" );
-
- RTEMS.TASK_START( ID, TMTEST.TASK_1'ACCESS, 0, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START TASK1" );
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- TASK_1
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- INDEX : RTEMS.UNSIGNED32;
- ID : RTEMS.ID;
- OVERHEAD : RTEMS.UNSIGNED32;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
-
- RTEMS.TASK_CREATE(
- INDEX,
- 254,
- 1024,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE" );
-
- RTEMS.MESSAGE_QUEUE_CREATE(
- INDEX,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- 16,
- RTEMS.DEFAULT_ATTRIBUTES,
- ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_CREATE" );
-
- RTEMS.SEMAPHORE_CREATE(
- INDEX,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- RTEMS.DEFAULT_ATTRIBUTES,
- RTEMS.NO_PRIORITY,
- ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_CREATE" );
-
- RTEMS.REGION_CREATE(
- INDEX,
- TMTEST.REGION_AREA'ADDRESS,
- 2048,
- 16,
- RTEMS.DEFAULT_ATTRIBUTES,
- ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_CREATE" );
-
- RTEMS.PARTITION_CREATE(
- INDEX,
- TMTEST.PARTITION_AREA'ADDRESS,
- 2048,
- 128,
- RTEMS.DEFAULT_ATTRIBUTES,
- ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "PARTITION_CREATE" );
-
- RTEMS.PORT_CREATE(
- INDEX,
- TMTEST.INTERNAL_PORT_AREA'ADDRESS,
- TMTEST.EXTERNAL_PORT_AREA'ADDRESS,
- 16#FF#,
- ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "PORT_CREATE" );
-
- RTEMS.TIMER_CREATE( INDEX, ID, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_CREATE" );
-
- RTEMS.RATE_MONOTONIC_CREATE( INDEX, ID, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "RATE_MONOTONIC_CREATE" );
-
- end loop;
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- TIMER_DRIVER.EMPTY_FUNCTION;
- end loop;
- OVERHEAD := TIMER_DRIVER.READ_TIMER;
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.TASK_IDENT( INDEX, RTEMS.SEARCH_ALL_NODES, ID, STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "TASK_IDENT",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- RTEMS_CALLING_OVERHEAD.TASK_IDENT
- );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.MESSAGE_QUEUE_IDENT(
- INDEX,
- RTEMS.SEARCH_ALL_NODES,
- ID,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "MESSAGE_QUEUE_IDENT",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- RTEMS_CALLING_OVERHEAD.MESSAGE_QUEUE_IDENT
- );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.SEMAPHORE_IDENT(
- INDEX,
- RTEMS.SEARCH_ALL_NODES,
- ID,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "SEMAPHORE_IDENT",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- RTEMS_CALLING_OVERHEAD.SEMAPHORE_IDENT
- );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.PARTITION_IDENT(
- INDEX,
- RTEMS.SEARCH_ALL_NODES,
- ID,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "PARTITION_IDENT",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- RTEMS_CALLING_OVERHEAD.PARTITION_IDENT
- );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.REGION_IDENT( INDEX, ID, STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "REGION_IDENT",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- RTEMS_CALLING_OVERHEAD.REGION_IDENT
- );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.PORT_IDENT( INDEX, ID, STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "PORT_IDENT",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- RTEMS_CALLING_OVERHEAD.PORT_IDENT
- );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.TIMER_IDENT( INDEX, ID, STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "TIMER_IDENT",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- RTEMS_CALLING_OVERHEAD.TIMER_IDENT
- );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.RATE_MONOTONIC_IDENT( INDEX, ID, STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "RATE_MONOTONIC_IDENT",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- RTEMS_CALLING_OVERHEAD.RATE_MONOTONIC_IDENT
- );
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end TASK_1;
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm21/tmtest.ads b/c/src/ada-tests/tmtests/tm21/tmtest.ads
deleted file mode 100644
index 36d687256f..0000000000
--- a/c/src/ada-tests/tmtests/tm21/tmtest.ads
+++ /dev/null
@@ -1,122 +0,0 @@
---
--- TMTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 21 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with SYSTEM;
-with TIMER_DRIVER;
-with System.Storage_Elements;
-
-package TMTEST is
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
- TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
-
---
--- The following variable is set to the execution time returned
--- by the timer.
---
-
- END_TIME : RTEMS.UNSIGNED32;
-
---
--- The following area defines a memory area to be used as the
--- internal address space of the port.
---
-
- INTERNAL_PORT_AREA_ADDRESS : constant System.Address :=
- System.Storage_Elements.To_Address(16#00001000#);
-
- INTERNAL_PORT_AREA : array ( RTEMS.UNSIGNED32 range 0 .. 255 )
- of RTEMS.UNSIGNED8;
- for INTERNAL_PORT_AREA use at INTERNAL_PORT_AREA_ADDRESS;
-
---
--- The following area defines a memory area to be used as the
--- external address space of the port.
---
-
- EXTERNAL_PORT_AREA_ADDRESS : constant System.Address :=
- System.Storage_Elements.To_Address(16#00002000#);
-
- EXTERNAL_PORT_AREA : array ( RTEMS.UNSIGNED32 range 0 .. 255 )
- of RTEMS.UNSIGNED8;
- for EXTERNAL_PORT_AREA use at EXTERNAL_PORT_AREA_ADDRESS;
-
---
--- The following area defines a memory area to be used as the
--- memory space for a partition.
---
-
- PARTITION_AREA : array ( RTEMS.UNSIGNED32 range 0 .. 2047 )
- of RTEMS.UNSIGNED8;
- for PARTITION_AREA'ALIGNMENT use RTEMS.STRUCTURE_ALIGNMENT;
-
---
--- These following are the ID and NAME of the RTEMS region created
--- by this test.
---
-
- REGION_AREA : array ( RTEMS.UNSIGNED32 range 0 .. 2047 )
- of RTEMS.UNSIGNED8;
- for REGION_AREA'ALIGNMENT use RTEMS.STRUCTURE_ALIGNMENT;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_1
---
--- DESCRIPTION:
---
--- This RTEMS task is responsible for measuring and reporting the
--- following directive execution times:
---
--- + TASK_IDENT
--- + MESSAGE_QUEUE_IDENT
--- + SEMAPHORE_IDENT
--- + PARTITION_IDENT
--- + REGION_IDENT
--- + PORT_IDENT
--- + TIMER_IDENT
--- + RATE_MONOTONIC_IDENT
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm22/config.h b/c/src/ada-tests/tmtests/tm22/config.h
deleted file mode 100644
index a9d518d83e..0000000000
--- a/c/src/ada-tests/tmtests/tm22/config.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 103
-#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/tmtests/tm22/tm22.adb b/c/src/ada-tests/tmtests/tm22/tm22.adb
deleted file mode 100644
index 037168ddcf..0000000000
--- a/c/src/ada-tests/tmtests/tm22/tm22.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test TM22 of the Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with TMTEST;
-with TEST_SUPPORT;
-
-procedure TM22 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- TMTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end TM22;
-
diff --git a/c/src/ada-tests/tmtests/tm22/tmtest.adb b/c/src/ada-tests/tmtests/tm22/tmtest.adb
deleted file mode 100644
index d1a2c3cf29..0000000000
--- a/c/src/ada-tests/tmtests/tm22/tmtest.adb
+++ /dev/null
@@ -1,256 +0,0 @@
---
--- TMTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 22 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with RTEMS_CALLING_OVERHEAD;
-with TEST_SUPPORT;
-with TEXT_IO;
-with TIME_TEST_SUPPORT;
-with UNSIGNED32_IO;
-
-package body TMTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TIME TEST 22 ***" );
-
- RTEMS.MESSAGE_QUEUE_CREATE(
- RTEMS.BUILD_NAME( 'M', 'Q', '1', ' ' ),
- 100,
- 16,
- RTEMS.DEFAULT_ATTRIBUTES,
- TMTEST.MESSAGE_QUEUE_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_CREATE" );
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'L', 'O', 'W', ' ' ),
- 10,
- 2048,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE LOW" );
-
- RTEMS.TASK_START( ID, TMTEST.LOW_TASK'ACCESS, 0, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START LOW" );
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'P', 'R', 'M', 'T' ),
- 11,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE PREEMPT" );
-
- RTEMS.TASK_START( ID, TMTEST.PREEMPT_TASK'ACCESS, 0, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START PREEMPT" );
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- HIGH_TASK
---
-
- procedure HIGH_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- BUFFER : TMTEST.BUFFER;
- BUFFER_POINTER : RTEMS.ADDRESS;
- COUNT : RTEMS.UNSIGNED32;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- BUFFER_POINTER := BUFFER'ADDRESS;
-
- TIMER_DRIVER.INITIALIZE;
- RTEMS.MESSAGE_QUEUE_BROADCAST(
- TMTEST.MESSAGE_QUEUE_ID,
- BUFFER_POINTER,
- 16,
- COUNT,
- STATUS
- );
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "MESSAGE_QUEUE_BROADCAST (readying)",
- TMTEST.END_TIME,
- 1,
- 0,
- RTEMS_CALLING_OVERHEAD.MESSAGE_QUEUE_BROADCAST
- );
-
- RTEMS.TASK_SUSPEND( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SUSPEND" );
-
- end HIGH_TASK;
-
---PAGE
---
--- LOW_TASK
---
-
- procedure LOW_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- ID : RTEMS.ID;
- BUFFER : TMTEST.BUFFER;
- BUFFER_POINTER : RTEMS.ADDRESS;
- INDEX : RTEMS.UNSIGNED32;
- OVERHEAD : RTEMS.UNSIGNED32;
- COUNT : RTEMS.UNSIGNED32;
- MESSAGE_SIZE : RTEMS.UNSIGNED32;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- BUFFER_POINTER := BUFFER'ADDRESS;
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'H', 'I', 'G', 'H' ),
- 5,
- 2048,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE HIGH" );
-
- RTEMS.TASK_START( ID, TMTEST.HIGH_TASK'ACCESS, 0, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START HIGH" );
-
- RTEMS.MESSAGE_QUEUE_RECEIVE(
- TMTEST.MESSAGE_QUEUE_ID,
- BUFFER_POINTER,
- RTEMS.DEFAULT_MODES,
- RTEMS.NO_TIMEOUT,
- MESSAGE_SIZE,
- STATUS
- );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- TIMER_DRIVER.EMPTY_FUNCTION;
- end loop;
- OVERHEAD := TIMER_DRIVER.READ_TIMER;
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.MESSAGE_QUEUE_BROADCAST(
- TMTEST.MESSAGE_QUEUE_ID,
- BUFFER_POINTER,
- 16,
- COUNT,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "MESSAGE_QUEUE_BROADCAST (no waiting tasks)",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- RTEMS_CALLING_OVERHEAD.MESSAGE_QUEUE_BROADCAST
- );
-
- RTEMS.MESSAGE_QUEUE_RECEIVE(
- TMTEST.MESSAGE_QUEUE_ID,
- BUFFER_POINTER,
- RTEMS.DEFAULT_MODES,
- RTEMS.NO_TIMEOUT,
- MESSAGE_SIZE,
- STATUS
- );
-
- -- should go to PREEMPT_TASK here
-
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "MESSAGE_QUEUE_BROADCAST (preempt)",
- TMTEST.END_TIME,
- 1,
- 0,
- RTEMS_CALLING_OVERHEAD.MESSAGE_QUEUE_BROADCAST
- );
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end LOW_TASK;
-
---PAGE
---
--- LOW_TASK
---
-
- procedure PREEMPT_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- BUFFER : TMTEST.BUFFER;
- BUFFER_POINTER : RTEMS.ADDRESS;
- COUNT : RTEMS.UNSIGNED32;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- BUFFER_POINTER := BUFFER'ADDRESS;
-
- TIMER_DRIVER.INITIALIZE;
- RTEMS.MESSAGE_QUEUE_BROADCAST(
- TMTEST.MESSAGE_QUEUE_ID,
- BUFFER_POINTER,
- 16,
- COUNT,
- STATUS
- );
-
- -- should be preempted by LOW_TASK
-
- end PREEMPT_TASK;
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm22/tmtest.ads b/c/src/ada-tests/tmtests/tm22/tmtest.ads
deleted file mode 100644
index 43270fcf65..0000000000
--- a/c/src/ada-tests/tmtests/tm22/tmtest.ads
+++ /dev/null
@@ -1,119 +0,0 @@
---
--- TMTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 22 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with TIMER_DRIVER;
-with RTEMS;
-
-package TMTEST is
-
---
--- Buffer Record similar to that used by RTEMS 3.2.1. Using this
--- avoids changes to the test.
---
-
- type BUFFER is
- record
- FIELD1 : RTEMS.UNSIGNED32; -- TEMPORARY UNTIL VARIABLE LENGTH
- FIELD2 : RTEMS.UNSIGNED32;
- FIELD3 : RTEMS.UNSIGNED32;
- FIELD4 : RTEMS.UNSIGNED32;
- end record;
-
---
--- The following is the ID of the message queue used for timing operations.
---
-
- MESSAGE_QUEUE_ID : RTEMS.ID;
-
---
--- The following variable is set to the execution time returned
--- by the timer.
---
-
- END_TIME : RTEMS.UNSIGNED32;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- HIGH_TASK
---
--- DESCRIPTION:
---
--- This RTEMS task is created by LOW_TASK and executes after
--- LOW_TASK has performed a blocking MESSAGE_QUEUE_RECEIVE.
--- This task then executes and performs a readying
--- MESSAGE_QUEUE_BROADCAST and reports its execution time.
--- Finally, the task suspends itself so LOW_TASK can continue
--- execution.
---
-
- procedure HIGH_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- LOW_TASK
---
--- DESCRIPTION:
---
--- This RTEMS task performs a blocking MESSAGE_QUEUE_RECEIVE
--- so that when HIGH_TASK performs a MESSAGE_QUEUE_BROADCAST,
--- there will be a task to be readied. Following this, the
--- execution time for a MESSAGE_QUEUE_BROADCAST to a message
--- queue with no waiting tasks is measured and reported.
--- Then this task performs another blocking MESSAGE_QUEUE_RECEIVE
--- so that when PREEMPT_TASK performs a MESSAGE_QUEUE_BROADCAST,
--- PREEMPT_TASK will be preempted by this task. After control
--- of the processor is transferred back to this task by the
--- preemption, the timer is stopped and the execution time of
--- a preemptive MESSAGE_QUEUE_BROADCAST is reported.
---
-
- procedure LOW_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- PREEMPT_TASK
---
--- DESCRIPTION:
---
--- This RTEMS task starts the timer and performs a preemptive
--- MESSAGE_QUEUE_BROADCAST.
---
-
- procedure PREEMPT_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm23/config.h b/c/src/ada-tests/tmtests/tm23/config.h
deleted file mode 100644
index 5e53478121..0000000000
--- a/c/src/ada-tests/tmtests/tm23/config.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 111
-#define CONFIGURE_MAXIMUM_TIMERS 110
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/tmtests/tm23/tm23.adb b/c/src/ada-tests/tmtests/tm23/tm23.adb
deleted file mode 100644
index b6855a86e1..0000000000
--- a/c/src/ada-tests/tmtests/tm23/tm23.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test TM23 of the Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with TMTEST;
-with TEST_SUPPORT;
-
-procedure TM23 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- TMTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end TM23;
-
diff --git a/c/src/ada-tests/tmtests/tm23/tmtest.adb b/c/src/ada-tests/tmtests/tm23/tmtest.adb
deleted file mode 100644
index bb9dabe3be..0000000000
--- a/c/src/ada-tests/tmtests/tm23/tmtest.adb
+++ /dev/null
@@ -1,399 +0,0 @@
---
--- TMTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 23 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with RTEMS_CALLING_OVERHEAD;
-with TEST_SUPPORT;
-with TEXT_IO;
-with TIME_TEST_SUPPORT;
-with UNSIGNED32_IO;
-
-package body TMTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- OVERHEAD : RTEMS.UNSIGNED32;
- TASK_PRIORITY : RTEMS.TASK_PRIORITY;
- INDEX : RTEMS.UNSIGNED32;
- ID : RTEMS.ID;
- TASK_ENTRY : RTEMS.TASK_ENTRY;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TIME TEST 23 ***" );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- TIMER_DRIVER.EMPTY_FUNCTION;
- end loop;
- OVERHEAD := TIMER_DRIVER.READ_TIMER;
-
- TASK_PRIORITY := 5;
-
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'T', 'I', 'M', 'E' ),
- TASK_PRIORITY,
- 1024,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE LOOP" );
-
- if INDEX = 1 then
- TASK_ENTRY := TMTEST.HIGH_TASK'ACCESS;
- elsif INDEX = TIME_TEST_SUPPORT.OPERATION_COUNT then
- TASK_ENTRY := TMTEST.LOW_TASK'ACCESS;
- else
- TASK_ENTRY := TMTEST.MIDDLE_TASKS'ACCESS;
- end if;
-
- RTEMS.TASK_START( ID, TASK_ENTRY, 0, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START LOOP" );
-
- TASK_PRIORITY := TASK_PRIORITY + 1;
-
- end loop;
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- NULL_DELAY
---
-
- procedure NULL_DELAY (
- IGNORED_ID : in RTEMS.ID;
- IGNORED_ADDRESS : in RTEMS.ADDRESS
- ) is
- begin
-
- NULL;
-
- end NULL_DELAY;
-
---PAGE
---
--- HIGH_TASK
---
-
- procedure HIGH_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- INDEX : RTEMS.TASK_PRIORITY;
- OVERHEAD : RTEMS.UNSIGNED32;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- TIMER_DRIVER.EMPTY_FUNCTION;
- end loop;
- OVERHEAD := TIMER_DRIVER.READ_TIMER;
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.TIMER_CREATE(
- INDEX,
- TMTEST.TIMER_ID( INDEX ),
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "TIMER_CREATE",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- 0,
- RTEMS_CALLING_OVERHEAD.TIMER_CREATE
- );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.TIMER_FIRE_AFTER(
- TMTEST.TIMER_ID( INDEX ),
- 500,
- TMTEST.NULL_DELAY'ACCESS,
- RTEMS.NULL_ADDRESS,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "TIMER_FIRE_AFTER (inactive)",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- 0,
- RTEMS_CALLING_OVERHEAD.TIMER_FIRE_AFTER
- );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.TIMER_FIRE_AFTER(
- TMTEST.TIMER_ID( INDEX ),
- 500,
- TMTEST.NULL_DELAY'ACCESS,
- RTEMS.NULL_ADDRESS,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "TIMER_FIRE_AFTER (active)",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- 0,
- RTEMS_CALLING_OVERHEAD.TIMER_FIRE_AFTER
- );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.TIMER_CANCEL( TMTEST.TIMER_ID( INDEX ), STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "TIMER_CANCEL (active)",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- 0,
- RTEMS_CALLING_OVERHEAD.TIMER_CANCEL
- );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.TIMER_CANCEL( TMTEST.TIMER_ID( INDEX ), STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "TIMER_CANCEL (inactive)",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- 0,
- RTEMS_CALLING_OVERHEAD.TIMER_CANCEL
- );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.TIMER_RESET( TMTEST.TIMER_ID( INDEX ), STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "TIMER_RESET (inactive)",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- 0,
- RTEMS_CALLING_OVERHEAD.TIMER_RESET
- );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.TIMER_RESET( TMTEST.TIMER_ID( INDEX ), STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "TIMER_RESET (active)",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- 0,
- RTEMS_CALLING_OVERHEAD.TIMER_RESET
- );
-
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.TIMER_CANCEL( TMTEST.TIMER_ID( INDEX ), STATUS );
- end loop;
-
- TMTEST.TIME_OF_DAY := ( 1988, 12, 31, 9, 0, 0, 0 );
-
- RTEMS.CLOCK_SET( TMTEST.TIME_OF_DAY, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_SET" );
-
- TMTEST.TIME_OF_DAY.YEAR := 1989;
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.TIMER_FIRE_WHEN(
- TMTEST.TIMER_ID( INDEX ),
- TMTEST.TIME_OF_DAY,
- TMTEST.NULL_DELAY'ACCESS,
- RTEMS.NULL_ADDRESS,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "TIMER_FIRE_WHEN (inactive)",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- 0,
- RTEMS_CALLING_OVERHEAD.TIMER_FIRE_WHEN
- );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.TIMER_FIRE_WHEN(
- TMTEST.TIMER_ID( INDEX ),
- TMTEST.TIME_OF_DAY,
- TMTEST.NULL_DELAY'ACCESS,
- RTEMS.NULL_ADDRESS,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "TIMER_FIRE_WHEN (active)",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- 0,
- RTEMS_CALLING_OVERHEAD.TIMER_FIRE_WHEN
- );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.TIMER_DELETE( TMTEST.TIMER_ID( INDEX ), STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "TIMER_DELETE (active)",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- 0,
- RTEMS_CALLING_OVERHEAD.TIMER_DELETE
- );
-
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.TIMER_CREATE( INDEX, TMTEST.TIMER_ID( INDEX ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_CREATE" );
-
- RTEMS.TIMER_FIRE_AFTER(
- TMTEST.TIMER_ID( INDEX ),
- 500,
- TMTEST.NULL_DELAY'ACCESS,
- RTEMS.NULL_ADDRESS,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_FIRE_AFTER" );
-
- RTEMS.TIMER_CANCEL( TMTEST.TIMER_ID( INDEX ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_CANCEL" );
-
- end loop;
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.TIMER_DELETE( TMTEST.TIMER_ID( INDEX ), STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "TIMER_DELETE (inactive)",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- 0,
- RTEMS_CALLING_OVERHEAD.TIMER_DELETE
- );
-
- TIMER_DRIVER.INITIALIZE;
- RTEMS.TASK_WAKE_WHEN( TMTEST.TIME_OF_DAY, STATUS );
-
- end HIGH_TASK;
-
---PAGE
---
--- MIDDLE_TASKS
---
-
- procedure MIDDLE_TASKS (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.TASK_WAKE_WHEN( TMTEST.TIME_OF_DAY, STATUS );
-
- end MIDDLE_TASKS;
-
---PAGE
---
--- LOW_TASK
---
-
- procedure LOW_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- begin
-
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "TASK_WAKE_WHEN",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- 0,
- RTEMS_CALLING_OVERHEAD.TASK_WAKE_WHEN
- );
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end LOW_TASK;
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm23/tmtest.ads b/c/src/ada-tests/tmtests/tm23/tmtest.ads
deleted file mode 100644
index 9f713ae073..0000000000
--- a/c/src/ada-tests/tmtests/tm23/tmtest.ads
+++ /dev/null
@@ -1,130 +0,0 @@
---
--- TMTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 23 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with TIMER_DRIVER;
-with TIME_TEST_SUPPORT;
-with RTEMS;
-
-package TMTEST is
-
---
--- This array contains the IDs of all RTEMS timers created by this test.
---
-
- TIMER_ID : array ( RTEMS.UNSIGNED32
- range 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT ) of RTEMS.ID;
-
---
--- This data item contains a time of day used by all of the
--- "WHEN" directives timed in this test.
---
-
- TIME_OF_DAY : RTEMS.TIME_OF_DAY;
-
---
--- The following variable is set to the execution time returned
--- by the timer.
---
-
- END_TIME : RTEMS.UNSIGNED32;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- NULL_DELAY
---
--- DESCRIPTION:
---
--- This subprogram is a timer service routine. It performs
--- no actions.
---
-
- procedure NULL_DELAY (
- IGNORED_ID : in RTEMS.ID;
- IGNORED_ADDRESS : in RTEMS.ADDRESS
- );
-
---
--- HIGH_TASK
---
--- DESCRIPTION:
---
--- This RTEMS task is responsible for measuring and reporting
--- the following directive execution times:
---
--- + TIMER_CREATE
--- + TIMER_FIRE_AFTER with an inactive timer
--- + TIMER_FIRE_AFTER with an active timer
--- + TIMER_CANCEL of an active timer
--- + TIMER_CANCEL of an inactive timer
--- + TIMER_RESET of an active timer
--- + TIMER_RESET of an inactive timer
--- + TIMER_FIRE_WHEN of an inactive timer
--- + TIMER_FIRE_WHEN of an active timer
--- + TIMER_DELETE of an active timer
--- + TIMER_DELETE of an inactive timer
---
--- After measuring and reporting the above times, this task starts
--- the timer and executes the TASK_WAKE_WHEN directive.
---
-
- procedure HIGH_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- MIDDLE_TASKS
---
--- DESCRIPTION:
---
--- These RTEMS tasks executes the TASK_WAKE_WHEN directive.
---
-
- procedure MIDDLE_TASKS (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- MIDDLE_TASKS
---
--- DESCRIPTION:
---
--- This RTEMS task stops the timer and reports the execution time for
--- the TASK_WAKE_WHEN directive.
---
-
- procedure LOW_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm24/config.h b/c/src/ada-tests/tmtests/tm24/config.h
deleted file mode 100644
index 7e7793cf15..0000000000
--- a/c/src/ada-tests/tmtests/tm24/config.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 111
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/tmtests/tm24/tm24.adb b/c/src/ada-tests/tmtests/tm24/tm24.adb
deleted file mode 100644
index 03873ba82c..0000000000
--- a/c/src/ada-tests/tmtests/tm24/tm24.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test TM24 of the Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with TMTEST;
-with TEST_SUPPORT;
-
-procedure TM24 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- TMTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end TM24;
-
diff --git a/c/src/ada-tests/tmtests/tm24/tmtest.adb b/c/src/ada-tests/tmtests/tm24/tmtest.adb
deleted file mode 100644
index e8af0ca6ea..0000000000
--- a/c/src/ada-tests/tmtests/tm24/tmtest.adb
+++ /dev/null
@@ -1,165 +0,0 @@
---
--- TMTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 24 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with RTEMS_CALLING_OVERHEAD;
-with TEST_SUPPORT;
-with TEXT_IO;
-with TIME_TEST_SUPPORT;
-with UNSIGNED32_IO;
-
-package body TMTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- ID : RTEMS.ID;
- INDEX : RTEMS.UNSIGNED32;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TIME TEST 24 ***" );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- TIMER_DRIVER.EMPTY_FUNCTION;
- end loop;
- TMTEST.OVERHEAD := TIMER_DRIVER.READ_TIMER;
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'H', 'I', 'G', 'H' ),
- 10,
- 1024,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE HIGH" );
-
- RTEMS.TASK_START( ID, TMTEST.HIGH_TASK'ACCESS, 0, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START HIGH" );
-
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'R', 'E', 'S', 'T' ),
- 128,
- 1024,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE LOOP" );
-
- RTEMS.TASK_START( ID, TMTEST.TASKS'ACCESS, 0, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START LOOP" );
-
- end loop;
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- HIGH_TASK
---
-
- procedure HIGH_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- INDEX : RTEMS.UNSIGNED32;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.TASK_WAKE_AFTER( RTEMS.YIELD_PROCESSOR, STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "TASK_WAKE_AFTER (no context switch)",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- TMTEST.OVERHEAD,
- RTEMS_CALLING_OVERHEAD.TASK_WAKE_AFTER
- );
-
- TMTEST.TASK_COUNT := 0;
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end HIGH_TASK;
-
---PAGE
---
--- TASKS
---
-
- procedure TASKS (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TMTEST.TASK_COUNT := TMTEST.TASK_COUNT + 1;
-
- if TMTEST.TASK_COUNT = 1 then
-
- TIMER_DRIVER.INITIALIZE;
-
- elsif TMTEST.TASK_COUNT = TIME_TEST_SUPPORT.OPERATION_COUNT then
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "TASK_WAKE_AFTER (context switch)",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- TMTEST.OVERHEAD,
- RTEMS_CALLING_OVERHEAD.TASK_WAKE_AFTER
- );
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end if;
-
- RTEMS.TASK_WAKE_AFTER( RTEMS.YIELD_PROCESSOR, STATUS );
-
- end TASKS;
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm24/tmtest.ads b/c/src/ada-tests/tmtests/tm24/tmtest.ads
deleted file mode 100644
index df90eddb91..0000000000
--- a/c/src/ada-tests/tmtests/tm24/tmtest.ads
+++ /dev/null
@@ -1,99 +0,0 @@
---
--- TMTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 24 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with TIMER_DRIVER;
-with RTEMS;
-
-package TMTEST is
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
- TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
-
---
--- This variable is used to determine which task should
--- start the timer and which task should stop the timer
--- and report the execution time.
---
-
- TASK_COUNT : RTEMS.UNSIGNED32;
-
---
--- This variable contains the execution time required of the
--- loop used to execute the directive.
---
-
- OVERHEAD : RTEMS.UNSIGNED32;
-
---
--- The following variable is set to the execution time returned
--- by the timer.
---
-
- END_TIME : RTEMS.UNSIGNED32;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- HIGH_TASK
---
--- DESCRIPTION:
---
--- This RTEMS task is responsible for measuring and reporting the
--- execution time for an invocation of TASK_WAKE_AFTER which
--- attempts to yield but does not result in a context switch.
---
-
- procedure HIGH_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASKS
---
--- DESCRIPTION:
---
--- These RTEMS tasks are responsible for measuring and reporting the
--- execution time for an invocation of TASK_WAKE_AFTER which
--- attempts to yield but does result in a context switch.
---
-
- procedure TASKS (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm25/config.h b/c/src/ada-tests/tmtests/tm25/config.h
deleted file mode 100644
index e58f7c9923..0000000000
--- a/c/src/ada-tests/tmtests/tm25/config.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 111
-#define CONFIGURE_MAXIMUM_SEMAPHORES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/tmtests/tm25/tm25.adb b/c/src/ada-tests/tmtests/tm25/tm25.adb
deleted file mode 100644
index c3099ab193..0000000000
--- a/c/src/ada-tests/tmtests/tm25/tm25.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test TM25 of the Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with TMTEST;
-with TEST_SUPPORT;
-
-procedure TM25 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- TMTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end TM25;
-
diff --git a/c/src/ada-tests/tmtests/tm25/tmtest.adb b/c/src/ada-tests/tmtests/tm25/tmtest.adb
deleted file mode 100644
index 080129028e..0000000000
--- a/c/src/ada-tests/tmtests/tm25/tmtest.adb
+++ /dev/null
@@ -1,157 +0,0 @@
---
--- TMTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 25 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with RTEMS_CALLING_OVERHEAD;
-with TEST_SUPPORT;
-with TEXT_IO;
-with TIME_TEST_SUPPORT;
-with UNSIGNED32_IO;
-
-package body TMTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- INDEX : RTEMS.UNSIGNED32;
- TASK_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TIME TEST 25 ***" );
-
- RTEMS.SEMAPHORE_CREATE(
- RTEMS.BUILD_NAME( 'S', 'M', '1', ' ' ),
- 0,
- RTEMS.DEFAULT_ATTRIBUTES,
- RTEMS.NO_PRIORITY,
- TMTEST.SEMAPHORE_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_CREATE OF SM1" );
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'L', 'O', 'W', ' ' ),
- 254,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- TASK_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE LOW" );
-
- RTEMS.TASK_START(
- TASK_ID,
- TMTEST.LOW_TASK'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START LOW" );
-
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'T', 'I', 'M', 'E' ),
- 128,
- 1024,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- TASK_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE LOOP" );
-
- RTEMS.TASK_START(
- TASK_ID,
- TMTEST.HIGH_TASKS'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START LOOP" );
-
- end loop;
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- HIGH_TASKS
---
-
- procedure HIGH_TASKS (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.SEMAPHORE_OBTAIN(
- TMTEST.SEMAPHORE_ID,
- RTEMS.DEFAULT_OPTIONS,
- RTEMS.INTERVAL'LAST,
- STATUS
- );
-
- end HIGH_TASKS;
-
---PAGE
---
--- LOW_TASK
---
-
- procedure LOW_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.CLOCK_TICK( STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "CLOCK_TICK",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- 0,
- RTEMS_CALLING_OVERHEAD.CLOCK_TICK
- );
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end LOW_TASK;
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm25/tmtest.ads b/c/src/ada-tests/tmtests/tm25/tmtest.ads
deleted file mode 100644
index 069e7e17ee..0000000000
--- a/c/src/ada-tests/tmtests/tm25/tmtest.ads
+++ /dev/null
@@ -1,80 +0,0 @@
---
--- TMTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 25 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with TIMER_DRIVER;
-with RTEMS;
-
-package TMTEST is
-
---
--- The following is the ID of the semaphore used for timing operations.
---
-
- SEMAPHORE_ID : RTEMS.ID;
-
---
--- The following variable is set to the execution time returned
--- by the timer.
---
-
- END_TIME : RTEMS.UNSIGNED32;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- HIGH_TASKS
---
--- DESCRIPTION:
---
--- These RTEMS tasks perform a blocking SEMAPHORE_OBTAIN which
--- has an optional timeout.
---
-
- procedure HIGH_TASKS (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- LOW_TASK
---
--- DESCRIPTION:
---
--- This RTEMS task is responsible for measuring and reporting
--- the execution time for the CLOCK_TICK directive.
---
-
- procedure LOW_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm26/README b/c/src/ada-tests/tmtests/tm26/README
deleted file mode 100644
index c54eb82024..0000000000
--- a/c/src/ada-tests/tmtests/tm26/README
+++ /dev/null
@@ -1,6 +0,0 @@
-#
-# $Id$
-#
-
-This test requires interfacing to internal RTEMS routines and
-is probably not worth the effort to convert.
diff --git a/c/src/ada-tests/tmtests/tm26/config.h b/c/src/ada-tests/tmtests/tm26/config.h
deleted file mode 100644
index e58f7c9923..0000000000
--- a/c/src/ada-tests/tmtests/tm26/config.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 111
-#define CONFIGURE_MAXIMUM_SEMAPHORES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/tmtests/tm26/tm26.adb b/c/src/ada-tests/tmtests/tm26/tm26.adb
deleted file mode 100644
index 8d4db0a3ed..0000000000
--- a/c/src/ada-tests/tmtests/tm26/tm26.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test TM26 of the Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with TMTEST;
-with TEST_SUPPORT;
-
-procedure TM26 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- TMTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end TM26;
-
diff --git a/c/src/ada-tests/tmtests/tm26/tmtest.adp b/c/src/ada-tests/tmtests/tm26/tmtest.adp
deleted file mode 100644
index ddf0c39f7a..0000000000
--- a/c/src/ada-tests/tmtests/tm26/tmtest.adp
+++ /dev/null
@@ -1,650 +0,0 @@
---
--- TMTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 26 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS_CALLING_OVERHEAD;
-with RTEMS;
-with RTEMS_TEST_SUPPORT;
-with TEST_SUPPORT;
-with TEXT_IO;
-with TIME_TEST_SUPPORT;
-with UNSIGNED32_IO;
-
-include(../../support/fp.inc)
-
-package body TMTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- INDEX : RTEMS.UNSIGNED32;
- TASK_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TIME TEST 26 ***" );
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'F', 'P', '1', ' ' ),
- 201,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.FLOATING_POINT,
- TASK_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF FP1" );
-
- RTEMS.TASK_START(
- TASK_ID,
- TMTEST.FLOATING_POINT_TASK_1'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF FP1" );
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'F', 'P', '2', ' ' ),
- 202,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.FLOATING_POINT,
- TASK_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF FP2" );
-
- RTEMS.TASK_START(
- TASK_ID,
- TMTEST.FLOATING_POINT_TASK_2'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF FP2" );
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'L', 'O', 'W', ' ' ),
- 200,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- TASK_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF LOW" );
-
- RTEMS.TASK_START(
- TASK_ID,
- TMTEST.LOW_TASK'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF LOW" );
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'M', 'I', 'D', ' ' ),
- 128,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- TASK_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF MIDDLE" );
-
- RTEMS.TASK_START(
- TASK_ID,
- TMTEST.MIDDLE_TASK'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF MIDDLE" );
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'H', 'I', 'G', 'H' ),
- 5,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- TASK_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF HIGH" );
-
- RTEMS.TASK_START(
- TASK_ID,
- TMTEST.HIGH_TASK'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF HIGH" );
-
- RTEMS.SEMAPHORE_CREATE(
- RTEMS.BUILD_NAME( 'S', 'E', 'M', '1' ),
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- RTEMS.DEFAULT_ATTRIBUTES,
- TMTEST.SEMAPHORE_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_CREATE" );
-
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'N', 'U', 'L', 'L' ),
- 254,
- 512,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- TASK_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE LOOP" );
-
- RTEMS.TASK_START(
- TASK_ID,
- TMTEST.NULL_TASK'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START LOOP" );
-
- end loop;
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- NULL_TASK
---
-
- procedure NULL_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- begin
-
- NULL;
-
- end NULL_TASK;
-
---PAGE
---
--- HIGH_TASK
---
-
- procedure HIGH_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- begin
-
- TIMER_DRIVER.INITIALIZE;
- RTEMS_TEST_SUPPORT.THREAD_ENABLE_DISPATCH;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "THREAD_ENABLE_DISPATCH",
- TMTEST.END_TIME,
- 1,
- 0,
- 0
- );
-
- TIMER_DRIVER.INITIALIZE;
- RTEMS_TEST_SUPPORT.THREAD_SET_STATE(
- RTEMS_TEST_SUPPORT.THREAD_EXECUTING,
- RTEMS.SUSPENDED
- );
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "THREAD_SET_STATE",
- TMTEST.END_TIME,
- 1,
- 0,
- 0
- );
-
- -- FORCE CONTEXT SWITCH
-
- RTEMS_TEST_SUPPORT.CONTEXT_SWITCH_NECESSARY := TRUE;
-
- TIMER_DRIVER.INITIALIZE;
- RTEMS_TEST_SUPPORT.THREAD_DISPATCH; -- dispatches MIDDLE_TASK
-
- end HIGH_TASK;
-
---PAGE
---
--- MIDDLE_TASK
---
-
- procedure MIDDLE_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- begin
-
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "THREAD_DISPATCH (NO FP)",
- TMTEST.END_TIME,
- 1,
- 0,
- 0
- );
-
- RTEMS_TEST_SUPPORT.THREAD_SET_STATE(
- RTEMS_TEST_SUPPORT.THREAD_EXECUTING,
- RTEMS.SUSPENDED
- );
-
- TMTEST.MIDDLE_TCB := RTEMS_TEST_SUPPORT.THREAD_EXECUTING;
-
- RTEMS_TEST_SUPPORT.THREAD_EXECUTING :=
- RTEMS_TEST_SUPPORT.THREAD_TO_CONTROL_POINTER(
- RTEMS_TEST_SUPPORT.CHAIN_NODE_POINTER_TO_ADDRESS(
- RTEMS_TEST_SUPPORT.THREAD_READY_CHAIN( 200 ).FIRST
- )
- );
-
- -- do NOT force context switch
-
- RTEMS_TEST_SUPPORT.CONTEXT_SWITCH_NECESSARY := FALSE;
-
- RTEMS_TEST_SUPPORT.THREAD_DISABLE_DISPATCH;
-
- TIMER_DRIVER.INITIALIZE;
- RTEMS_TEST_SUPPORT.CONTEXT_SWITCH(
- RTEMS_TEST_SUPPORT.CONTEXT_TO_CONTROL_POINTER(
- TMTEST.MIDDLE_TCB.REGISTERS'ADDRESS
- ),
- RTEMS_TEST_SUPPORT.CONTEXT_TO_CONTROL_POINTER(
- RTEMS_TEST_SUPPORT.THREAD_EXECUTING.REGISTERS'ADDRESS
- )
- );
-
- end MIDDLE_TASK;
-
---PAGE
---
--- LOW_TASK
---
-
- procedure LOW_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- EXECUTING : RTEMS.TCB_POINTER;
- begin
-
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "CONTEXT_SWITCH (NO FP)",
- TMTEST.END_TIME,
- 1,
- 0,
- 0
- );
-
- EXECUTING := RTEMS_TEST_SUPPORT.THREAD_EXECUTING;
-
- RTEMS_TEST_SUPPORT.THREAD_EXECUTING :=
- RTEMS_TEST_SUPPORT.THREAD_TO_CONTROL_POINTER(
- RTEMS_TEST_SUPPORT.CHAIN_NODE_POINTER_TO_ADDRESS(
- RTEMS_TEST_SUPPORT.THREAD_READY_CHAIN( 201 ).FIRST
- )
- );
-
- -- do NOT force context switch
-
- RTEMS_TEST_SUPPORT.CONTEXT_SWITCH_NECESSARY := FALSE;
-
- RTEMS_TEST_SUPPORT.THREAD_DISABLE_DISPATCH;
-
- TIMER_DRIVER.INITIALIZE;
-
- RTEMS_TEST_SUPPORT.CONTEXT_RESTORE_FP(
- RTEMS_TEST_SUPPORT.THREAD_EXECUTING.FP_CONTEXT'ADDRESS
- );
- RTEMS_TEST_SUPPORT.CONTEXT_SWITCH(
- RTEMS_TEST_SUPPORT.CONTEXT_TO_CONTROL_POINTER(
- EXECUTING.REGISTERS'ADDRESS
- ),
- RTEMS_TEST_SUPPORT.CONTEXT_TO_CONTROL_POINTER(
- RTEMS_TEST_SUPPORT.THREAD_EXECUTING.REGISTERS'ADDRESS
- )
- );
-
- end LOW_TASK;
-
---PAGE
---
--- FLOATING_POINT_TASK_1
---
-
- procedure FLOATING_POINT_TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- EXECUTING : RTEMS.TCB_POINTER;
- FP_DECLARE;
- begin
-
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "CONTEXT_SWITCH (restore 1st FP)",
- TMTEST.END_TIME,
- 1,
- 0,
- 0
- );
-
- EXECUTING := RTEMS_TEST_SUPPORT.THREAD_EXECUTING;
-
- RTEMS_TEST_SUPPORT.THREAD_EXECUTING :=
- RTEMS_TEST_SUPPORT.THREAD_TO_CONTROL_POINTER(
- RTEMS_TEST_SUPPORT.CHAIN_NODE_POINTER_TO_ADDRESS(
- RTEMS_TEST_SUPPORT.THREAD_READY_CHAIN( 202 ).FIRST
- )
- );
-
- -- do NOT force context switch
-
- RTEMS_TEST_SUPPORT.CONTEXT_SWITCH_NECESSARY := FALSE;
-
- RTEMS_TEST_SUPPORT.THREAD_DISABLE_DISPATCH;
-
- TIMER_DRIVER.INITIALIZE;
-
- RTEMS_TEST_SUPPORT.CONTEXT_SAVE_FP( EXECUTING.FP_CONTEXT'ADDRESS );
- RTEMS_TEST_SUPPORT.CONTEXT_RESTORE_FP(
- RTEMS_TEST_SUPPORT.THREAD_EXECUTING.FP_CONTEXT'ADDRESS
- );
- RTEMS_TEST_SUPPORT.CONTEXT_SWITCH(
- RTEMS_TEST_SUPPORT.CONTEXT_TO_CONTROL_POINTER(
- EXECUTING.REGISTERS'ADDRESS
- ),
- RTEMS_TEST_SUPPORT.CONTEXT_TO_CONTROL_POINTER(
- RTEMS_TEST_SUPPORT.THREAD_EXECUTING.REGISTERS'ADDRESS
- )
- );
-
- -- switch to FLOATING_POINT_TASK_2
-
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "CONTEXT_SWITCH (used->init FP)",
- TMTEST.END_TIME,
- 1,
- 0,
- 0
- );
-
- FP_LOAD( 1.0 );
-
- EXECUTING := RTEMS_TEST_SUPPORT.THREAD_EXECUTING;
-
- RTEMS_TEST_SUPPORT.THREAD_EXECUTING :=
- RTEMS_TEST_SUPPORT.THREAD_TO_CONTROL_POINTER(
- RTEMS_TEST_SUPPORT.CHAIN_NODE_POINTER_TO_ADDRESS(
- RTEMS_TEST_SUPPORT.THREAD_READY_CHAIN( 202 ).FIRST
- )
- );
-
- -- do NOT force context switch
-
- RTEMS_TEST_SUPPORT.CONTEXT_SWITCH_NECESSARY := FALSE;
-
- RTEMS_TEST_SUPPORT.THREAD_DISABLE_DISPATCH;
-
- TIMER_DRIVER.INITIALIZE;
-
- RTEMS_TEST_SUPPORT.CONTEXT_SAVE_FP( EXECUTING.FP_CONTEXT'ADDRESS );
- RTEMS_TEST_SUPPORT.CONTEXT_RESTORE_FP(
- RTEMS_TEST_SUPPORT.THREAD_EXECUTING.FP_CONTEXT'ADDRESS
- );
- RTEMS_TEST_SUPPORT.CONTEXT_SWITCH(
- RTEMS_TEST_SUPPORT.CONTEXT_TO_CONTROL_POINTER(
- EXECUTING.REGISTERS'ADDRESS
- ),
- RTEMS_TEST_SUPPORT.CONTEXT_TO_CONTROL_POINTER(
- RTEMS_TEST_SUPPORT.THREAD_EXECUTING.REGISTERS'ADDRESS
- )
- );
-
- -- switch to FLOATING_POINT_TASK_2
-
- end FLOATING_POINT_TASK_1;
-
---PAGE
---
--- FLOATING_POINT_TASK_2
---
-
- procedure FLOATING_POINT_TASK_2 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- EXECUTING : RTEMS.TCB_POINTER;
- FP_DECLARE;
- begin
-
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "CONTEXT_SWITCH (init->init FP)",
- TMTEST.END_TIME,
- 1,
- 0,
- 0
- );
-
- EXECUTING := RTEMS_TEST_SUPPORT.THREAD_EXECUTING;
-
- RTEMS_TEST_SUPPORT.THREAD_EXECUTING :=
- RTEMS_TEST_SUPPORT.THREAD_TO_CONTROL_POINTER(
- RTEMS_TEST_SUPPORT.CHAIN_NODE_POINTER_TO_ADDRESS(
- RTEMS_TEST_SUPPORT.THREAD_READY_CHAIN( 201 ).FIRST
- )
- );
-
- FP_LOAD( 1.0 );
-
- -- do NOT force context switch
-
- RTEMS_TEST_SUPPORT.CONTEXT_SWITCH_NECESSARY := FALSE;
-
- RTEMS_TEST_SUPPORT.THREAD_DISABLE_DISPATCH;
-
- TIMER_DRIVER.INITIALIZE;
-
- RTEMS_TEST_SUPPORT.CONTEXT_SAVE_FP( EXECUTING.FP_CONTEXT'ADDRESS );
- RTEMS_TEST_SUPPORT.CONTEXT_RESTORE_FP(
- RTEMS_TEST_SUPPORT.THREAD_EXECUTING.FP_CONTEXT'ADDRESS
- );
- RTEMS_TEST_SUPPORT.CONTEXT_SWITCH(
- RTEMS_TEST_SUPPORT.CONTEXT_TO_CONTROL_POINTER(
- EXECUTING.REGISTERS'ADDRESS
- ),
- RTEMS_TEST_SUPPORT.CONTEXT_TO_CONTROL_POINTER(
- RTEMS_TEST_SUPPORT.THREAD_EXECUTING.REGISTERS'ADDRESS
- )
- );
-
- -- switch to FLOATING_POINT_TASK_1
-
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "CONTEXT_SWITCH (used->used FP)",
- TMTEST.END_TIME,
- 1,
- 0,
- 0
- );
-
- TMTEST.COMPLETE_TEST;
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end FLOATING_POINT_TASK_2;
-
---PAGE
---
--- COMPLETE_TEST
---
-
- procedure COMPLETE_TEST
- is
- INDEX : RTEMS.UNSIGNED32;
- OVERHEAD : RTEMS.UNSIGNED32;
- TASK_ID : RTEMS.ID;
- LOCATION : RTEMS_TEST_SUPPORT.OBJECTS_LOCATIONS;
- THE_SEMAPHORE : RTEMS.TCB_POINTER;
- THE_THREAD : RTEMS.TCB_POINTER;
- begin
-
- TIMER_DRIVER.INITIALIZE;
- RTEMS_TEST_SUPPORT.THREAD_RESUME( TMTEST.MIDDLE_TCB );
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "THREAD_RESUME",
- TMTEST.END_TIME,
- 1,
- 0,
- 0
- );
-
- RTEMS_TEST_SUPPORT.THREAD_SET_STATE(
- TMTEST.MIDDLE_TCB,
- RTEMS.WAITING_FOR_MESSAGE
- );
-
- TIMER_DRIVER.INITIALIZE;
- RTEMS_TEST_SUPPORT.THREAD_UNBLOCK( TMTEST.MIDDLE_TCB );
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "THREAD_UNBLOCK",
- TMTEST.END_TIME,
- 1,
- 0,
- 0
- );
-
- RTEMS_TEST_SUPPORT.THREAD_SET_STATE(
- TMTEST.MIDDLE_TCB,
- RTEMS.WAITING_FOR_MESSAGE
- );
-
- TIMER_DRIVER.INITIALIZE;
- RTEMS_TEST_SUPPORT.THREAD_READY( TMTEST.MIDDLE_TCB );
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "THREAD_READY",
- TMTEST.END_TIME,
- 1,
- 0,
- 0
- );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- TIMER_DRIVER.EMPTY_FUNCTION;
- end loop;
- OVERHEAD := TIMER_DRIVER.READ_TIMER;
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS_TEST_SUPPORT.THREAD_GET(
- TASK_ID,
- LOCATION,
- THE_THREAD
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "THREAD_GET",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- 0,
- 0
- );
-
--- TIMER_DRIVER.INITIALIZE;
--- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
--- loop
--- RTEMS_TEST_SUPPORT.SEMAPHORE_GET(
--- TMTEST.SEMAPHORE_ID,
--- LOCATION,
--- THE_SEMAPHORE
--- );
--- end loop;
--- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
--- TIME_TEST_SUPPORT.PUT_TIME(
--- "SEMAPHORE_GET",
--- TMTEST.END_TIME,
--- TIME_TEST_SUPPORT.OPERATION_COUNT,
--- 0,
--- 0
--- );
- TEXT_IO.PUT_LINE( "SEMAPHORE_GET NOT IN ADA" );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS_TEST_SUPPORT.THREAD_GET(
- 16#3#,
- LOCATION,
- THE_THREAD
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "THREAD_GET (invalid id)",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- 0,
- 0
- );
-
- end COMPLETE_TEST;
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm26/tmtest.ads b/c/src/ada-tests/tmtests/tm26/tmtest.ads
deleted file mode 100644
index 3f56e24010..0000000000
--- a/c/src/ada-tests/tmtests/tm26/tmtest.ads
+++ /dev/null
@@ -1,189 +0,0 @@
---
--- TMTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 26 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with TIMER_DRIVER;
-with RTEMS;
-
-package TMTEST is
-
---
--- This points to the RTEMS task control block for the MIDDLE_TASK.
---
-
- MIDDLE_TCB : RTEMS.TCB_POINTER;
-
---
--- The following is the ID of the semaphore used for timing operations.
---
-
- SEMAPHORE_ID : RTEMS.ID;
-
---
--- The following variable is set to the execution time returned
--- by the timer.
---
-
- END_TIME : RTEMS.UNSIGNED32;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- NULL_TASK
---
--- DESCRIPTION:
---
--- This RTEMS task has a NULL body and is only included to
--- allow TASK_START to be invoked without impacting another
--- task.
---
-
- procedure NULL_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- HIGH_TASK
---
--- DESCRIPTION:
---
--- This RTEMS task is the highest priority test task and
--- thus executes first. It is responsible for measuring
--- and reporting the following times:
---
--- + THREAD_DISABLE_DISPATCH
--- + THREAD_ENABLE_DISPATCH
--- + THREAD_SET_STATE
---
--- After measuring and reporting the above times, this task
--- starts the timer and forces dispatch to the MIDDLE_TASK.
---
-
- procedure HIGH_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- MIDDLE_TASK
---
--- DESCRIPTION:
---
--- This RTEMS task stops the timer and reports the execution
--- time for THREAD_DISPATCH without any floating point context
--- save and restore involved. Following this, it starts the
--- timer and forces a CONTEXT_SWITCH to the LOW_TASK.
---
-
- procedure MIDDLE_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- LOW_TASK
---
--- DESCRIPTION:
---
--- This RTEMS task stops the timer and reports the execution
--- time for a raw CONTEXT_SWITCH without any floating point context
--- save and restore involved. Following this, it starts the
--- timer and performs a CONTEXT_RESTORE_FP for the FLOATING_POINT_TASK_1
--- and a CONTEXT_SWITCH to FLOATING_POINT_TASK_1.
---
-
- procedure LOW_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- FLOATING_POINT_TASK_1
---
--- DESCRIPTION:
---
--- This RTEMS task stops the timer and reports the execution
--- time for a CONTEXT_SWITCH which restores the first floating
--- point context. Following this, it starts the
--- timer and performs a CONTEXT_SAVE_FP and CONTEXT_RESTORE_FP
--- and a CONTEXT_SWITCH to FLOATING_POINT_TASK_2. Once
--- control is returned to this task FLOATING_POINT_TASK_2, the
--- timer is stopped and the execution time for CONTEXT_SWITCH
--- from a used to an initialized floating point context is reported.
--- Following this, it starts the timer and performs a
--- CONTEXT_SAVE_FP and CONTEXT_RESTORE_FP and a CONTEXT_SWITCH
--- to FLOATING_POINT_TASK_2.
---
-
- procedure FLOATING_POINT_TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- FLOATING_POINT_TASK_2
---
--- DESCRIPTION:
---
--- This RTEMS task stops the timer and reports the execution
--- time for a CONTEXT_SWITCH which switches from one freshly
--- initialized floating point context to another freshly
--- initialized floating point context. Following this, it
--- "dirties" its floating point context and starts the
--- timer. After this it performs a CONTEXT_SAVE_FP and
--- CONTEXT_RESTORE_FP and a CONTEXT_SWITCH to FLOATING_POINT_TASK_1.
--- Once control is returned to this task FLOATING_POINT_TASK_2, the
--- timer is stopped and the execution time for CONTEXT_SWITCH
--- from one used floating point context to another used floating
--- point context is reported. After this, this task invokes
--- the COMPLETE_TEST subprogram to measure and report
--- the remaining execution times measured by this test.
---
-
- procedure FLOATING_POINT_TASK_2 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- COMPLETE_TEST
---
--- DESCRIPTION:
---
--- This subprogram is responsible for measuring and reporting the
--- following execution times:
---
--- + THREAD_RESUME
--- + THREAD_UNBLOCK
--- + THREAD_READY
--- + THREAD_GET with a valid id
--- + THREAD_GET with an invalid id
---
-
- procedure COMPLETE_TEST;
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm27/README b/c/src/ada-tests/tmtests/tm27/README
deleted file mode 100644
index 7fa8ba0b23..0000000000
--- a/c/src/ada-tests/tmtests/tm27/README
+++ /dev/null
@@ -1,8 +0,0 @@
-#
-# $Id$
-#
-
-This test requires interfacing to BSP provided macros which aid in
-installing an ISR. It may or may not be worth the effort to convert.
-Primarily this would require a C file which provided real bodies
-to invoke for these macros.
diff --git a/c/src/ada-tests/tmtests/tm27/config.h b/c/src/ada-tests/tmtests/tm27/config.h
deleted file mode 100644
index 7e7793cf15..0000000000
--- a/c/src/ada-tests/tmtests/tm27/config.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 111
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/tmtests/tm27/tm27.adb b/c/src/ada-tests/tmtests/tm27/tm27.adb
deleted file mode 100644
index 7a8e1ca9f3..0000000000
--- a/c/src/ada-tests/tmtests/tm27/tm27.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test TM27 of the Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with TMTEST;
-with TEST_SUPPORT;
-
-procedure TM27 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- TMTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end TM27;
-
diff --git a/c/src/ada-tests/tmtests/tm27/tmtest.adb b/c/src/ada-tests/tmtests/tm27/tmtest.adb
deleted file mode 100644
index 12761659be..0000000000
--- a/c/src/ada-tests/tmtests/tm27/tmtest.adb
+++ /dev/null
@@ -1,268 +0,0 @@
---
--- TMTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 27 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERRUPT_TIME_TEST_SUPPORT;
-with INTERFACES; use INTERFACES;
-with RTEMS_CALLING_OVERHEAD;
-with RTEMS;
-with RTEMS_TEST_SUPPORT;
-with TEST_SUPPORT;
-with TEXT_IO;
-with TIME_TEST_SUPPORT;
-with UNSIGNED32_IO;
-
-package body TMTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TIME TEST 27 ***" );
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'T', 'A', '1', ' ' ),
- 254,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- TMTEST.TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE TASK_1" );
-
- RTEMS.TASK_START(
- TMTEST.TASK_ID( 1 ),
- TMTEST.TASK_1'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START TASK_1" );
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'T', 'A', '2', ' ' ),
- 254,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- TMTEST.TASK_ID( 2 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE TASK_2" );
-
- RTEMS.TASK_START(
- TMTEST.TASK_ID( 2 ),
- TMTEST.TASK_2'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START TASK_2" );
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- TASK_1
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- begin
-
- RTEMS_TEST_SUPPORT.THREAD_DISPATCH_DISABLE_LEVEL := 1;
-
- TMTEST.INTERRUPT_NEST := 1;
-
- INTERRUPT_TIME_TEST_SUPPORT.INSTALL_HANDLER(
- TMTEST.ISR_HANDLER'ADDRESS
- );
-
- TIMER_DRIVER.INITIALIZE;
- INTERRUPT_TIME_TEST_SUPPORT.CAUSE_INTERRUPT;
- -- goes to ISR_HANDLER
-
- TMTEST.INTERRUPT_RETURN_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "INTERRUPT_ENTER (nested interrupt)",
- TMTEST.INTERRUPT_ENTER_NESTED_TIME,
- 1,
- 0,
- 0
- );
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "INTERRUPT_RETURN (nested interrupt)",
- TMTEST.INTERRUPT_RETURN_NESTED_TIME,
- 1,
- 0,
- 0
- );
-
- TMTEST.INTERRUPT_NEST := 0;
-
- RTEMS_TEST_SUPPORT.THREAD_DISPATCH_DISABLE_LEVEL := 0;
-
- TIMER_DRIVER.INITIALIZE;
- INTERRUPT_TIME_TEST_SUPPORT.CAUSE_INTERRUPT;
- -- goes to ISR_HANDLER
-
- TMTEST.INTERRUPT_RETURN_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "INTERRUPT_ENTER (no preempt)",
- TMTEST.INTERRUPT_ENTER_TIME,
- 1,
- 0,
- 0
- );
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "INTERRUPT_RETURN (no preempt)",
- TMTEST.INTERRUPT_RETURN_TIME,
- 1,
- 0,
- 0
- );
-
- RTEMS_TEST_SUPPORT.THREAD_DISPATCH_DISABLE_LEVEL := 0;
-
- RTEMS_TEST_SUPPORT.THREAD_HEIR :=
- RTEMS_TEST_SUPPORT.THREAD_TO_CONTROL_POINTER(
- RTEMS_TEST_SUPPORT.CHAIN_NODE_POINTER_TO_ADDRESS(
- RTEMS_TEST_SUPPORT.THREAD_READY_CHAIN( 254 ).LAST
- )
- );
-
- RTEMS_TEST_SUPPORT.CONTEXT_SWITCH_NECESSARY := TRUE;
-
- TIMER_DRIVER.INITIALIZE;
- INTERRUPT_TIME_TEST_SUPPORT.CAUSE_INTERRUPT;
- -- goes to ISR_HANDLER
-
- end TASK_1;
-
---PAGE
---
--- TASK_2
---
-
- procedure TASK_2 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- begin
-
- TMTEST.INTERRUPT_RETURN_TIME := TIMER_DRIVER.READ_TIMER;
- TIME_TEST_SUPPORT.PUT_TIME(
- "INTERRUPT_ENTER (preempt)",
- TMTEST.INTERRUPT_ENTER_TIME,
- 1,
- 0,
- 0
- );
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "INTERRUPT_RETURN (preempt)",
- TMTEST.INTERRUPT_RETURN_TIME,
- 1,
- 0,
- 0
- );
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end TASK_2;
-
---PAGE
---
--- ISR_HANDLER
---
-
---
--- The ISR_HANDLER and ISR_HANDLER_INNER subprograms are structured
--- so that there will be as little entry overhead as possible included
--- in the interrupt entry time.
---
-
- procedure ISR_HANDLER (
- VECTOR : in RTEMS.VECTOR_NUMBER
- ) is
- begin
-
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TMTEST.ISR_HANDLER_INNER;
-
- end ISR_HANDLER;
-
---
--- ISR_HANDLER_INNER
---
-
- procedure ISR_HANDLER_INNER
- is
- begin
-
- -- enable tracing here is necessary
-
- INTERRUPT_TIME_TEST_SUPPORT.CLEAR_INTERRUPT;
-
- case TMTEST.INTERRUPT_NEST is
- when 0 =>
- TMTEST.INTERRUPT_ENTER_TIME := TMTEST.END_TIME;
-
- when 1 =>
- TMTEST.INTERRUPT_ENTER_TIME := TMTEST.END_TIME;
- TMTEST.INTERRUPT_NEST := 2;
- TIMER_DRIVER.INITIALIZE;
- INTERRUPT_TIME_TEST_SUPPORT.CAUSE_INTERRUPT;
- -- goes to a nested copy of ISR_HANDLER
-
- TMTEST.INTERRUPT_RETURN_NESTED_TIME := TIMER_DRIVER.READ_TIMER;
-
- when 2 =>
- TMTEST.INTERRUPT_ENTER_NESTED_TIME := TMTEST.END_TIME;
-
- when others =>
- NULL;
-
- end case;
-
- -- Start the timer so interrupt return times can be measured
-
- TIMER_DRIVER.INITIALIZE;
-
- end ISR_HANDLER_INNER;
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm27/tmtest.ads b/c/src/ada-tests/tmtests/tm27/tmtest.ads
deleted file mode 100644
index ef7848c822..0000000000
--- a/c/src/ada-tests/tmtests/tm27/tmtest.ads
+++ /dev/null
@@ -1,131 +0,0 @@
---
--- TMTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 27 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with TIMER_DRIVER;
-with RTEMS;
-
-package TMTEST is
-
---
--- This array contains the IDs of all RTEMS tasks created by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.ID;
-
---
--- The following variable is set to the execution time returned
--- by the timer.
---
-
- END_TIME : RTEMS.UNSIGNED32;
-
---
--- The following variable indicates which interrupt case is
--- currently being timed.
---
-
- INTERRUPT_NEST : RTEMS.UNSIGNED32;
-
---
--- The following variables are set to the appropriate execution
--- times by the ISR. This is done so the times will be available
--- to be printed by a task.
---
-
- INTERRUPT_ENTER_TIME : RTEMS.UNSIGNED32;
- INTERRUPT_RETURN_TIME : RTEMS.UNSIGNED32;
-
- INTERRUPT_ENTER_NESTED_TIME : RTEMS.UNSIGNED32;
- INTERRUPT_RETURN_NESTED_TIME : RTEMS.UNSIGNED32;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_1
---
--- DESCRIPTION:
---
--- This RTEMS task reports the following execution times:
---
--- + interrupt entry overhead for a nested interrupt
--- + interrupt exit overhead for a nested interrupt
--- + interrupt entry overhead when no preemption occurs
--- + interrupt exit overhead when no preemption occurs
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_2
---
--- DESCRIPTION:
---
--- This RTEMS task reports the following execution times:
---
--- + interrupt entry overhead when preemption occurs
--- + interrupt exit overhead when preemption occurs
---
-
- procedure TASK_2 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- ISR_HANDLER
---
--- DESCRIPTION:
---
--- This subprogram is the test ISR. It simply stops the
--- timer and save the execution time for ISR_HANDLER_INNER.
--- This is done to minimize the subroutine linkage overhead
--- for this routine.
---
-
- procedure ISR_HANDLER (
- VECTOR : in RTEMS.VECTOR_NUMBER
- );
-
---
--- ISR_HANDLER_INNER
---
--- DESCRIPTION:
---
--- This subprogram is responsible for storing the execution
--- time for the case currently being timed.
---
-
- procedure ISR_HANDLER_INNER;
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm28/config.h b/c/src/ada-tests/tmtests/tm28/config.h
deleted file mode 100644
index 0c238dfbaf..0000000000
--- a/c/src/ada-tests/tmtests/tm28/config.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 2
-#define CONFIGURE_MAXIMUM_PORTS 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/tmtests/tm28/tm28.adb b/c/src/ada-tests/tmtests/tm28/tm28.adb
deleted file mode 100644
index e76d166e7a..0000000000
--- a/c/src/ada-tests/tmtests/tm28/tm28.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test TM28 of the Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with TMTEST;
-with TEST_SUPPORT;
-
-procedure TM28 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- TMTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end TM28;
-
diff --git a/c/src/ada-tests/tmtests/tm28/tmtest.adb b/c/src/ada-tests/tmtests/tm28/tmtest.adb
deleted file mode 100644
index 7505635c06..0000000000
--- a/c/src/ada-tests/tmtests/tm28/tmtest.adb
+++ /dev/null
@@ -1,176 +0,0 @@
---
--- TMTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 28 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with RTEMS_CALLING_OVERHEAD;
-with TEST_SUPPORT;
-with TEXT_IO;
-with TIME_TEST_SUPPORT;
-with UNSIGNED32_IO;
-
-package body TMTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- TASK_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TIME TEST 28 ***" );
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'T', 'E', 'S', 'T' ),
- 128,
- 1024,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- TMTEST.TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE" );
-
- RTEMS.TASK_START(
- TMTEST.TASK_ID( 1 ),
- TMTEST.TEST_TASK'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START" );
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- TEST_TASK
---
-
- procedure TEST_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- NAME : RTEMS.NAME;
- OVERHEAD : RTEMS.UNSIGNED32;
- CONVERTED : RTEMS.ADDRESS;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- TIMER_DRIVER.EMPTY_FUNCTION;
- end loop;
- OVERHEAD := TIMER_DRIVER.READ_TIMER;
-
- NAME := RTEMS.BUILD_NAME( 'P', 'O', 'R', 'T' );
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.PORT_CREATE(
- NAME,
- TMTEST.INTERNAL_PORT_AREA'ADDRESS,
- TMTEST.EXTERNAL_PORT_AREA'ADDRESS,
- 16#FF#,
- TMTEST.PORT_ID( INDEX ),
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "PORT_CREATE",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- RTEMS_CALLING_OVERHEAD.PORT_CREATE
- );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.PORT_EXTERNAL_TO_INTERNAL(
- TMTEST.PORT_ID( 1 ),
- TMTEST.EXTERNAL_PORT_AREA( 16#F# )'ADDRESS,
- CONVERTED,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "PORT_EXTERNAL_TO_INTERNAL",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- RTEMS_CALLING_OVERHEAD.PORT_EXTERNAL_TO_INTERNAL
- );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.PORT_INTERNAL_TO_EXTERNAL(
- TMTEST.PORT_ID( 1 ),
- TMTEST.INTERNAL_PORT_AREA( 16#F# )'ADDRESS,
- CONVERTED,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "PORT_INTERNAL_TO_EXTERNAL",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- RTEMS_CALLING_OVERHEAD.PORT_INTERNAL_TO_EXTERNAL
- );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- RTEMS.PORT_DELETE( TMTEST.PORT_ID( INDEX ), STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "PORT_DELETE",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- RTEMS_CALLING_OVERHEAD.PORT_DELETE
- );
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end TEST_TASK;
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm28/tmtest.ads b/c/src/ada-tests/tmtests/tm28/tmtest.ads
deleted file mode 100644
index 5bf220d453..0000000000
--- a/c/src/ada-tests/tmtests/tm28/tmtest.ads
+++ /dev/null
@@ -1,106 +0,0 @@
---
--- TMTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 28 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with SYSTEM;
-with TIME_TEST_SUPPORT;
-with TIMER_DRIVER;
-with RTEMS;
-with System.Storage_Elements;
-
-package TMTEST is
-
---
--- This array contains the IDs of all RTEMS tasks created by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
-
---
--- This array contains the IDs of all RTEMS ports created by this test.
---
-
- PORT_ID : array ( RTEMS.UNSIGNED32
- range 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT ) of RTEMS.ID;
-
---
--- The following area defines a memory area to be used as the
--- internal address space of the port.
---
-
- INTERNAL_PORT_AREA_ADDRESS : constant System.Address :=
- System.Storage_Elements.To_Address(16#00001000#);
-
- INTERNAL_PORT_AREA : array ( RTEMS.UNSIGNED32 range 0 .. 255 )
- of RTEMS.UNSIGNED8;
- for INTERNAL_PORT_AREA use at INTERNAL_PORT_AREA_ADDRESS;
-
---
--- The following area defines a memory area to be used as the
--- external address space of the port.
---
-
- EXTERNAL_PORT_AREA_ADDRESS : constant System.Address :=
- System.Storage_Elements.To_Address(16#00002000#);
-
- EXTERNAL_PORT_AREA : array ( RTEMS.UNSIGNED32 range 0 .. 255 )
- of RTEMS.UNSIGNED8;
- for EXTERNAL_PORT_AREA use at EXTERNAL_PORT_AREA_ADDRESS;
-
---
--- The following variable is set to the execution time returned
--- by the timer.
---
-
- END_TIME : RTEMS.UNSIGNED32;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TEST_TASK
---
--- DESCRIPTION:
---
--- This RTEMS task is responsible for measuring and reporting the
--- following directive execution times:
---
--- + PORT_CREATE
--- + PORT_EXTERNAL_TO_INTERNAL
--- + PORT_INTERNAL_TO_EXTERNAL
--- + PORT_DELETE
---
-
- procedure TEST_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm29/config.h b/c/src/ada-tests/tmtests/tm29/config.h
deleted file mode 100644
index d22b4a61cb..0000000000
--- a/c/src/ada-tests/tmtests/tm29/config.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 111
-#define CONFIGURE_MAXIMUM_PERIODS 111
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/tmtests/tm29/tm29.adb b/c/src/ada-tests/tmtests/tm29/tm29.adb
deleted file mode 100644
index 7834403d2b..0000000000
--- a/c/src/ada-tests/tmtests/tm29/tm29.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test TM29 of the Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with TMTEST;
-with TEST_SUPPORT;
-
-procedure TM29 is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- TMTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end TM29;
-
diff --git a/c/src/ada-tests/tmtests/tm29/tmtest.adb b/c/src/ada-tests/tmtests/tm29/tmtest.adb
deleted file mode 100644
index e1f1af77dd..0000000000
--- a/c/src/ada-tests/tmtests/tm29/tmtest.adb
+++ /dev/null
@@ -1,234 +0,0 @@
---
--- TMTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 29 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with RTEMS_CALLING_OVERHEAD;
-with TEST_SUPPORT;
-with TEXT_IO;
-with TIME_TEST_SUPPORT;
-with UNSIGNED32_IO;
-
-package body TMTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TIME TEST 29 ***" );
-
- TMTEST.PERIOD_NAME := RTEMS.BUILD_NAME( 'P', 'R', 'D', ' ' );
-
- TIMER_DRIVER.INITIALIZE;
- RTEMS.RATE_MONOTONIC_CREATE( TMTEST.PERIOD_NAME, ID, STATUS );
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "RATE_MONOTONIC_CREATE",
- TMTEST.END_TIME,
- 1,
- 0,
- RTEMS_CALLING_OVERHEAD.RATE_MONOTONIC_CREATE
- );
-
- TIMER_DRIVER.INITIALIZE;
- RTEMS.RATE_MONOTONIC_PERIOD( ID, 10, STATUS );
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "RATE_MONOTONIC_PERIOD (initial)",
- TMTEST.END_TIME,
- 1,
- 0,
- RTEMS_CALLING_OVERHEAD.RATE_MONOTONIC_PERIOD
- );
-
- TIMER_DRIVER.INITIALIZE;
- RTEMS.RATE_MONOTONIC_PERIOD( ID, RTEMS.PERIOD_STATUS, STATUS );
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "RATE_MONOTONIC_PERIOD (STATUS)",
- TMTEST.END_TIME,
- 1,
- 0,
- RTEMS_CALLING_OVERHEAD.RATE_MONOTONIC_PERIOD
- );
-
- TIMER_DRIVER.INITIALIZE;
- RTEMS.RATE_MONOTONIC_CANCEL( ID, STATUS );
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "RATE_MONOTONIC_CANCEL",
- TMTEST.END_TIME,
- 1,
- 0,
- RTEMS_CALLING_OVERHEAD.RATE_MONOTONIC_CANCEL
- );
-
- TIMER_DRIVER.INITIALIZE;
- RTEMS.RATE_MONOTONIC_DELETE( ID, STATUS );
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "RATE_MONOTONIC_DELETE (cancelled)",
- TMTEST.END_TIME,
- 1,
- 0,
- RTEMS_CALLING_OVERHEAD.RATE_MONOTONIC_DELETE
- );
-
- RTEMS.RATE_MONOTONIC_CREATE( TMTEST.PERIOD_NAME, ID, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "RATE_MONOTONIC_CREATE" );
-
- RTEMS.RATE_MONOTONIC_PERIOD( ID, 10, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "RATE_MONOTONIC_PERIOD" );
-
- TIMER_DRIVER.INITIALIZE;
- RTEMS.RATE_MONOTONIC_DELETE( ID, STATUS );
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "RATE_MONOTONIC_DELETE (active)",
- TMTEST.END_TIME,
- 1,
- 0,
- RTEMS_CALLING_OVERHEAD.RATE_MONOTONIC_DELETE
- );
-
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'T', 'E', 'S', 'T' ),
- 128,
- 1024,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE LOOP" );
-
- RTEMS.TASK_START( ID, TMTEST.TASKS'ACCESS, 0, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START LOOP" );
-
- end loop;
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'L', 'O', 'W', ' ' ),
- 200,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE LOOP" );
-
- RTEMS.TASK_START( ID, TMTEST.LOW_TASK'ACCESS, 0, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START LOOP" );
-
- TMTEST.TASK_COUNT := 0;
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- TASKS
---
-
- procedure TASKS (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- ID : RTEMS.NAME;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.RATE_MONOTONIC_CREATE( TMTEST.PERIOD_NAME, ID, STATUS );
- RTEMS.RATE_MONOTONIC_PERIOD( ID, 10, STATUS );
-
- -- Give up the processor to allow all tasks to actually
- -- create and start their period timer before the benchmark
- -- timer driver is initialized.
-
- RTEMS.TASK_WAKE_AFTER( RTEMS.YIELD_PROCESSOR, STATUS );
-
- TMTEST.TASK_COUNT := TMTEST.TASK_COUNT + 1;
-
- if TMTEST.TASK_COUNT = 1 then
- TIMER_DRIVER.INITIALIZE;
- end if;
-
- RTEMS.RATE_MONOTONIC_PERIOD( ID, 100, STATUS );
-
- end TASKS;
-
---PAGE
---
--- LOW_TASK
---
-
- procedure LOW_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- INDEX : RTEMS.UNSIGNED32;
- OVERHEAD : RTEMS.UNSIGNED32;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- TIMER_DRIVER.EMPTY_FUNCTION;
- end loop;
- OVERHEAD := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "RATE_MONOTONIC_PERIOD (blocking)",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- RTEMS_CALLING_OVERHEAD.RATE_MONOTONIC_PERIOD
- );
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end LOW_TASK;
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tm29/tmtest.ads b/c/src/ada-tests/tmtests/tm29/tmtest.ads
deleted file mode 100644
index e60ded1e11..0000000000
--- a/c/src/ada-tests/tmtests/tm29/tmtest.ads
+++ /dev/null
@@ -1,96 +0,0 @@
---
--- TMTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 29 of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with TIMER_DRIVER;
-with RTEMS;
-
-package TMTEST is
-
---
--- The following is the name used for all periods created by this test.
---
-
- PERIOD_NAME : RTEMS.NAME;
-
---
--- The following is used to allow all tasks to create and start
--- their period timers before the timer is started for timing
--- the blocking case of RATE_MONOTONIC_PERIOD.
---
-
- TASK_COUNT : RTEMS.UNSIGNED32;
-
---
--- The following variable is set to the execution time returned
--- by the timer.
---
-
- END_TIME : RTEMS.UNSIGNED32;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application. It also measures and
--- reports the following directive execution times:
---
--- + RATE_MONOTONIC_CREATE
--- + RATE_MONOTONIC_PERIOD the initial time
--- + RATE_MONOTONIC_PERIOD for a period's status
--- + RATE_MONOTONIC_CANCEL
--- + RATE_MONOTONIC_DELETE of a cancelled period
--- + RATE_MONOTONIC_DELETE of an active period
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TEST_TASK
---
--- DESCRIPTION:
---
--- The first of these RTEMS tasks starts the timer. All of these
--- tasks execute a blocking RATE_MONOTONIC_PERIOD.
---
-
- procedure TASKS (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TEST_TASK
---
--- DESCRIPTION:
---
--- This RTEMS task stops the timer and reports the execution
--- time for a blocking RATE_MONOTONIC_PERIOD.
---
-
- procedure LOW_TASK (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tmck/config.h b/c/src/ada-tests/tmtests/tmck/config.h
deleted file mode 100644
index be54f54955..0000000000
--- a/c/src/ada-tests/tmtests/tmck/config.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 2
-#define CONFIGURE_MAXIMUM_SEMAPHORES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/tmtests/tmck/tmck.adb b/c/src/ada-tests/tmtests/tmck/tmck.adb
deleted file mode 100644
index 4f05735bca..0000000000
--- a/c/src/ada-tests/tmtests/tmck/tmck.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test TMCK of the Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with TMTEST;
-with TEST_SUPPORT;
-
-procedure TMCK is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- TMTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end TMCK;
-
diff --git a/c/src/ada-tests/tmtests/tmck/tmtest.adb b/c/src/ada-tests/tmtests/tmck/tmtest.adb
deleted file mode 100644
index 254a462bcc..0000000000
--- a/c/src/ada-tests/tmtests/tmck/tmtest.adb
+++ /dev/null
@@ -1,220 +0,0 @@
---
--- TMTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Timer Check Test of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with TIMER_DRIVER;
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with TEST_SUPPORT;
-with TEXT_IO;
-with TIME_TEST_SUPPORT;
-with UNSIGNED32_IO;
-
-package body TMTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TIME TEST CHECK ***" );
-
- TIMER_DRIVER.SET_FIND_AVERAGE_OVERHEAD( TRUE );
-
- TMTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME( 'T', 'A', '1', ' ' );
-
- RTEMS.TASK_CREATE(
- TMTEST.TASK_NAME( 1 ),
- 1,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- TMTEST.TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA1" );
-
- RTEMS.TASK_START(
- TMTEST.TASK_ID( 1 ),
- TMTEST.TASK_1'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA1" );
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- TASK_1
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- INDEX : RTEMS.UNSIGNED32;
- begin
-
- TMTEST.CHECK_READ_TIMER;
-
-TEST_SUPPORT.PAUSE;
-
- TIMER_DRIVER.INITIALIZE;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
- TIME_TEST_SUPPORT.PUT_TIME(
- "NULL timer stopped at",
- TMTEST.END_TIME,
- 1,
- 0,
- 0
- );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 0 .. 1000
- loop
- TIMER_DRIVER.EMPTY_FUNCTION;
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
- TIME_TEST_SUPPORT.PUT_TIME(
- "LOOP (1000) timer stopped at",
- TMTEST.END_TIME,
- 1,
- 0,
- 0
- );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 0 .. 10000
- loop
- TIMER_DRIVER.EMPTY_FUNCTION;
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
- TIME_TEST_SUPPORT.PUT_TIME(
- "LOOP (10000) timer stopped at",
- TMTEST.END_TIME,
- 1,
- 0,
- 0
- );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 0 .. 50000
- loop
- TIMER_DRIVER.EMPTY_FUNCTION;
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
- TIME_TEST_SUPPORT.PUT_TIME(
- "LOOP (50000) timer stopped at",
- TMTEST.END_TIME,
- 1,
- 0,
- 0
- );
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 0 .. 100000
- loop
- TIMER_DRIVER.EMPTY_FUNCTION;
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
- TIME_TEST_SUPPORT.PUT_TIME(
- "LOOP (100000) timer stopped at",
- TMTEST.END_TIME,
- 1,
- 0,
- 0
- );
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end TASK_1;
-
---PAGE
---
--- CHECK_READ_TIMER
---
-
- procedure CHECK_READ_TIMER
- is
- INDEX : RTEMS.UNSIGNED32;
- TIME : RTEMS.UNSIGNED32;
- begin
-
- for INDEX in TMTEST.DISTRIBUTION'FIRST .. TMTEST.DISTRIBUTION'LAST
- loop
- TMTEST.DISTRIBUTION( INDEX ) := 0;
- end loop;
-
- for INDEX in 1 .. TMTEST.OPERATION_COUNT
- loop
-
- loop
- TIMER_DRIVER.INITIALIZE;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- exit when
- TMTEST.END_TIME <= RTEMS.UNSIGNED32( TMTEST.DISTRIBUTION'LAST );
-
- TEXT_IO.PUT( "TOO LONG (" );
- UNSIGNED32_IO.PUT( TMTEST.END_TIME );
- TEXT_IO.PUT_LINE( ")!!!" );
- end loop;
-
- TMTEST.DISTRIBUTION( TMTEST.END_TIME ) :=
- TMTEST.DISTRIBUTION( TMTEST.END_TIME ) + 1;
-
- end loop;
-
- TEXT_IO.PUT_LINE(
- "Units may not be in microseconds for this test!!!"
- );
-
- TIME := 0;
-
- for INDEX in TMTEST.DISTRIBUTION'FIRST .. TMTEST.DISTRIBUTION'LAST
- loop
- if TMTEST.DISTRIBUTION( INDEX ) /= 0 then
- TIME := TIME + (TMTEST.DISTRIBUTION( INDEX ) * INDEX);
- UNSIGNED32_IO.PUT( INDEX );
- TEXT_IO.PUT( " " );
- UNSIGNED32_IO.PUT( TMTEST.DISTRIBUTION( INDEX ) );
- TEXT_IO.NEW_LINE;
- end if;
- end loop;
-
- TEXT_IO.PUT( "Total time = " );
- UNSIGNED32_IO.PUT( TIME );
- TEXT_IO.NEW_LINE;
-
- end CHECK_READ_TIMER;
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tmck/tmtest.ads b/c/src/ada-tests/tmtests/tmck/tmtest.ads
deleted file mode 100644
index 8f82d786a2..0000000000
--- a/c/src/ada-tests/tmtests/tmck/tmtest.ads
+++ /dev/null
@@ -1,97 +0,0 @@
---
--- TMTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Timer Check Test of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with TIMER_DRIVER;
-with RTEMS;
-
-package TMTEST is
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
- TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
-
---
--- The following variable is set to the execution time returned
--- by the timer.
---
-
- END_TIME : RTEMS.UNSIGNED32;
-
---
--- The following defines the number of iterations of each timed
--- operation to perform.
---
-
- OPERATION_COUNT : constant RTEMS.UNSIGNED32 := 100000;
-
---
--- The following array is used to determine how many times
--- each time between 0 and 1000 microseconds was returned
--- when simply starting and stopping the timer.
-
- DISTRIBUTION : array ( RTEMS.UNSIGNED32 range 0 .. 10000 ) of RTEMS.UNSIGNED32;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TASK_1
---
--- DESCRIPTION:
---
--- This RTEMS task invokes CHECK_READ_TIMER before demonstrating
--- that increasing the order of magnitude of the number of loop
--- iterations performed has a corresponding impact on the time
--- reported by the timer driver.
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- CHECK_READ_TIMER
---
--- DESCRIPTION:
---
--- This subprogram is used to determine the overhead associated
--- with starting and stopping the timer. It is also useful
--- for determining if unexpected times will be reported.
---
-
- procedure CHECK_READ_TIMER;
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tmoverhd/README b/c/src/ada-tests/tmtests/tmoverhd/README
deleted file mode 100644
index d5624c4270..0000000000
--- a/c/src/ada-tests/tmtests/tmoverhd/README
+++ /dev/null
@@ -1,9 +0,0 @@
-#
-# $Id$
-#
-
-This test is of marginal usefulness in testing the bindings. It
-shows how much overhead is required to call the Ada binding
-routine but does not give any indication of how much overhead the
-binding itself adds. This information can be inferred by subtracting
-the C times from Ada times on the same target processor.
diff --git a/c/src/ada-tests/tmtests/tmoverhd/config.h b/c/src/ada-tests/tmtests/tmoverhd/config.h
deleted file mode 100644
index be54f54955..0000000000
--- a/c/src/ada-tests/tmtests/tmoverhd/config.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* config.h
- *
- * This include file defines the Configuration Table for this test.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 2
-#define CONFIGURE_MAXIMUM_SEMAPHORES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/c/src/ada-tests/tmtests/tmoverhd/dummy_rtems.adb b/c/src/ada-tests/tmtests/tmoverhd/dummy_rtems.adb
deleted file mode 100644
index e6a3519e99..0000000000
--- a/c/src/ada-tests/tmtests/tmoverhd/dummy_rtems.adb
+++ /dev/null
@@ -1,877 +0,0 @@
---
--- DUMMY_RTEMS / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package contains implementation of stub routines
--- which are used to time the invocation overhead incurred
--- with an Ada application program invokes each RTEMS directive.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-package body DUMMY_RTEMS is
-
--- Initialization Manager
-
- procedure INITIALIZE_EXECUTIVE (
- CONFIGURATION_TABLE : in RTEMS.CONFIGURATION_TABLE_POINTER;
- CPU_TABLE : in RTEMS.CPU_TABLE_POINTER
- ) is
- begin
-
- NULL;
-
- end INITIALIZE_EXECUTIVE;
-
- procedure SHUTDOWN_EXECUTIVE (
- RESULT : in RTEMS.UNSIGNED32
- ) is
- begin
-
- NULL;
-
- end SHUTDOWN_EXECUTIVE;
-
--- Task Manager
-
- procedure TASK_CREATE (
- NAME : in RTEMS.NAME;
- INITIAL_PRIORITY : in RTEMS.TASK_PRIORITY;
- STACK_SIZE : in RTEMS.UNSIGNED32;
- INITIAL_MODES : in RTEMS.MODE;
- ATTRIBUTE_SET : in RTEMS.ATTRIBUTE;
- ID : out RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end TASK_CREATE;
-
- procedure TASK_IDENT (
- NAME : in RTEMS.NAME;
- NODE : in RTEMS.UNSIGNED32;
- ID : out RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end TASK_IDENT;
-
- procedure TASK_START (
- ID : in RTEMS.ID;
- ENTRY_POINT : in RTEMS.TASK_ENTRY;
- ARGUMENT : in RTEMS.UNSIGNED32;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end TASK_START;
-
- procedure TASK_RESTART (
- ID : in RTEMS.ID;
- ARGUMENT : in RTEMS.UNSIGNED32;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end TASK_RESTART;
-
- procedure TASK_DELETE (
- ID : in RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end TASK_DELETE;
-
- procedure TASK_SUSPEND (
- ID : in RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end TASK_SUSPEND;
-
- procedure TASK_RESUME (
- ID : in RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end TASK_RESUME;
-
- procedure TASK_SET_PRIORITY (
- ID : in RTEMS.ID;
- NEW_PRIORITY : in RTEMS.TASK_PRIORITY;
- OLD_PRIORITY : out RTEMS.TASK_PRIORITY;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end TASK_SET_PRIORITY;
-
- procedure TASK_MODE (
- MODE_SET : in RTEMS.MODE;
- MASK : in RTEMS.MODE;
- PREVIOUS_MODE_SET : out RTEMS.MODE;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end TASK_MODE;
-
- procedure TASK_GET_NOTE (
- ID : in RTEMS.ID;
- NOTEPAD : in RTEMS.NOTEPAD_INDEX;
- NOTE : out RTEMS.UNSIGNED32;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end TASK_GET_NOTE;
-
- procedure TASK_SET_NOTE (
- ID : in RTEMS.ID;
- NOTEPAD : in RTEMS.NOTEPAD_INDEX;
- NOTE : in RTEMS.UNSIGNED32;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end TASK_SET_NOTE;
-
- procedure TASK_WAKE_WHEN (
- TIME_BUFFER : in RTEMS.TIME_OF_DAY;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end TASK_WAKE_WHEN;
-
- procedure TASK_WAKE_AFTER (
- TICKS : in RTEMS.INTERVAL;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end TASK_WAKE_AFTER;
-
--- Interrupt Manager
-
- procedure INTERRUPT_CATCH (
- NEW_ISR_HANDLER : in RTEMS.ADDRESS;
- VECTOR : in RTEMS.VECTOR_NUMBER;
- OLD_ISR_HANDLER : out RTEMS.ADDRESS;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end INTERRUPT_CATCH;
-
--- Clock Manager
-
- procedure CLOCK_GET (
- OPTION : in RTEMS.CLOCK_GET_OPTIONS;
- TIME_BUFFER : in RTEMS.ADDRESS;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end CLOCK_GET;
-
- procedure CLOCK_SET (
- TIME_BUFFER : in RTEMS.TIME_OF_DAY;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end CLOCK_SET;
-
- procedure CLOCK_TICK (
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end CLOCK_TICK;
-
--- Timer Manager
-
- procedure TIMER_CREATE (
- NAME : in RTEMS.NAME;
- ID : out RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end TIMER_CREATE;
-
- procedure TIMER_DELETE (
- ID : in RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end TIMER_DELETE;
-
- procedure TIMER_IDENT (
- NAME : in RTEMS.NAME;
- ID : out RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end TIMER_IDENT;
-
- procedure TIMER_FIRE_AFTER (
- ID : in RTEMS.ID;
- TICKS : in RTEMS.INTERVAL;
- ROUTINE : in RTEMS.TIMER_SERVICE_ROUTINE;
- USER_DATA : in RTEMS.ADDRESS;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end TIMER_FIRE_AFTER;
-
- procedure TIMER_FIRE_WHEN (
- ID : in RTEMS.ID;
- WALL_TIME : in RTEMS.TIME_OF_DAY;
- ROUTINE : in RTEMS.TIMER_SERVICE_ROUTINE;
- USER_DATA : in RTEMS.ADDRESS;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end TIMER_FIRE_WHEN;
-
- procedure TIMER_RESET (
- ID : in RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end TIMER_RESET;
-
- procedure TIMER_CANCEL (
- ID : in RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end TIMER_CANCEL;
-
--- Semaphore Manager
-
- procedure SEMAPHORE_CREATE (
- NAME : in RTEMS.NAME;
- COUNT : in RTEMS.UNSIGNED32;
- ATTRIBUTE_SET : in RTEMS.ATTRIBUTE;
- PRIORITY_CEILING : in RTEMS.TASK_PRIORITY;
- ID : out RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end SEMAPHORE_CREATE;
-
- procedure SEMAPHORE_DELETE (
- ID : in RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end SEMAPHORE_DELETE;
-
- procedure SEMAPHORE_IDENT (
- NAME : in RTEMS.NAME;
- NODE : in RTEMS.UNSIGNED32;
- ID : out RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end SEMAPHORE_IDENT;
-
- procedure SEMAPHORE_OBTAIN (
- ID : in RTEMS.ID;
- OPTION_SET : in RTEMS.OPTION;
- TIMEOUT : in RTEMS.INTERVAL;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end SEMAPHORE_OBTAIN;
-
- procedure SEMAPHORE_RELEASE (
- ID : in RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end SEMAPHORE_RELEASE;
-
--- Message Queue Manager
-
- procedure MESSAGE_QUEUE_CREATE (
- Name : in RTEMS.Name;
- Count : in RTEMS.Unsigned32;
- Max_Message_Size : in RTEMS.Unsigned32;
- Attribute_Set : in RTEMS.Attribute;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end MESSAGE_QUEUE_CREATE;
-
- procedure MESSAGE_QUEUE_IDENT (
- NAME : in RTEMS.NAME;
- NODE : in RTEMS.UNSIGNED32;
- ID : out RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end MESSAGE_QUEUE_IDENT;
-
- procedure MESSAGE_QUEUE_DELETE (
- ID : in RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end MESSAGE_QUEUE_DELETE;
-
- procedure MESSAGE_QUEUE_SEND (
- ID : in RTEMS.ID;
- BUFFER : in RTEMS.ADDRESS;
- Size : in RTEMS.Unsigned32;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end MESSAGE_QUEUE_SEND;
-
- procedure MESSAGE_QUEUE_URGENT (
- ID : in RTEMS.ID;
- BUFFER : in RTEMS.ADDRESS;
- Size : in RTEMS.Unsigned32;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end MESSAGE_QUEUE_URGENT;
-
- procedure MESSAGE_QUEUE_BROADCAST (
- ID : in RTEMS.ID;
- BUFFER : in RTEMS.ADDRESS;
- Size : in RTEMS.Unsigned32;
- COUNT : out RTEMS.UNSIGNED32;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end MESSAGE_QUEUE_BROADCAST;
-
- procedure MESSAGE_QUEUE_RECEIVE (
- ID : in RTEMS.ID;
- BUFFER : in RTEMS.ADDRESS;
- OPTION_SET : in RTEMS.OPTION;
- TIMEOUT : in RTEMS.INTERVAL;
- Size : out RTEMS.Unsigned32;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end MESSAGE_QUEUE_RECEIVE;
-
- procedure MESSAGE_QUEUE_FLUSH (
- ID : in RTEMS.ID;
- COUNT : out RTEMS.UNSIGNED32;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end MESSAGE_QUEUE_FLUSH;
-
--- Event Manager
-
- procedure EVENT_SEND (
- ID : in RTEMS.ID;
- EVENT_IN : in RTEMS.EVENT_SET;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end EVENT_SEND;
-
- procedure EVENT_RECEIVE (
- EVENT_IN : in RTEMS.EVENT_SET;
- OPTION_SET : in RTEMS.OPTION;
- TICKS : in RTEMS.INTERVAL;
- EVENT_OUT : out RTEMS.EVENT_SET;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end EVENT_RECEIVE;
-
--- Signal Manager
-
- procedure SIGNAL_CATCH (
- ASR_HANDLER : in RTEMS.ASR_HANDLER;
- MODE_SET : in RTEMS.MODE;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end SIGNAL_CATCH;
-
- procedure SIGNAL_SEND (
- ID : in RTEMS.ID;
- SIGNAL_SET : in RTEMS.SIGNAL_SET;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end SIGNAL_SEND;
-
--- Partition Manager
-
- procedure PARTITION_CREATE (
- NAME : in RTEMS.NAME;
- STARTING_ADDRESS : in RTEMS.ADDRESS;
- LENGTH : in RTEMS.UNSIGNED32;
- BUFFER_SIZE : in RTEMS.UNSIGNED32;
- ATTRIBUTE_SET : in RTEMS.ATTRIBUTE;
- ID : out RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end PARTITION_CREATE;
-
- procedure PARTITION_IDENT (
- NAME : in RTEMS.NAME;
- NODE : in RTEMS.UNSIGNED32;
- ID : out RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end PARTITION_IDENT;
-
- procedure PARTITION_DELETE (
- ID : in RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end PARTITION_DELETE;
-
- procedure PARTITION_GET_BUFFER (
- ID : in RTEMS.ID;
- BUFFER : out RTEMS.ADDRESS;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end PARTITION_GET_BUFFER;
-
- procedure PARTITION_RETURN_BUFFER (
- ID : in RTEMS.ID;
- BUFFER : in RTEMS.ADDRESS;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end PARTITION_RETURN_BUFFER;
-
--- Region Manager
-
- procedure REGION_CREATE (
- NAME : in RTEMS.NAME;
- STARTING_ADDRESS : in RTEMS.ADDRESS;
- LENGTH : in RTEMS.UNSIGNED32;
- PAGE_SIZE : in RTEMS.UNSIGNED32;
- ATTRIBUTE_SET : in RTEMS.ATTRIBUTE;
- ID : out RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end REGION_CREATE;
-
- procedure REGION_IDENT (
- NAME : in RTEMS.NAME;
- ID : out RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end REGION_IDENT;
-
- procedure REGION_DELETE (
- ID : in RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end REGION_DELETE;
-
- procedure REGION_GET_SEGMENT (
- ID : in RTEMS.ID;
- SIZE : in RTEMS.UNSIGNED32;
- OPTION_SET : in RTEMS.OPTION;
- TIMEOUT : in RTEMS.INTERVAL;
- SEGMENT : out RTEMS.ADDRESS;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end REGION_GET_SEGMENT;
-
- procedure REGION_RETURN_SEGMENT (
- ID : in RTEMS.ID;
- SEGMENT : in RTEMS.ADDRESS;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end REGION_RETURN_SEGMENT;
-
--- Dual Ported Memory Manager
-
- procedure PORT_CREATE (
- NAME : in RTEMS.NAME;
- INTERNAL_START : in RTEMS.ADDRESS;
- EXTERNAL_START : in RTEMS.ADDRESS;
- LENGTH : in RTEMS.UNSIGNED32;
- ID : out RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end PORT_CREATE;
-
- procedure PORT_IDENT (
- NAME : in RTEMS.NAME;
- ID : out RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end PORT_IDENT;
-
- procedure PORT_DELETE (
- ID : in RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end PORT_DELETE;
-
- procedure PORT_EXTERNAL_TO_INTERNAL (
- ID : in RTEMS.ID;
- EXTERNAL : in RTEMS.ADDRESS;
- INTERNAL : out RTEMS.ADDRESS;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end PORT_EXTERNAL_TO_INTERNAL;
-
- procedure PORT_INTERNAL_TO_EXTERNAL (
- ID : in RTEMS.ID;
- INTERNAL : in RTEMS.ADDRESS;
- EXTERNAL : out RTEMS.ADDRESS;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end PORT_INTERNAL_TO_EXTERNAL;
-
--- Input/Output Manager
-
- procedure IO_INITIALIZE (
- MAJOR : in RTEMS.DEVICE_MAJOR_NUMBER;
- MINOR : in RTEMS.DEVICE_MINOR_NUMBER;
- ARGUMENT : in RTEMS.ADDRESS;
- RETURN_VALUE : out RTEMS.UNSIGNED32;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end IO_INITIALIZE;
-
- procedure IO_OPEN (
- MAJOR : in RTEMS.DEVICE_MAJOR_NUMBER;
- MINOR : in RTEMS.DEVICE_MINOR_NUMBER;
- ARGUMENT : in RTEMS.ADDRESS;
- RETURN_VALUE : out RTEMS.UNSIGNED32;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end IO_OPEN;
-
- procedure IO_CLOSE (
- MAJOR : in RTEMS.DEVICE_MAJOR_NUMBER;
- MINOR : in RTEMS.DEVICE_MINOR_NUMBER;
- ARGUMENT : in RTEMS.ADDRESS;
- RETURN_VALUE : out RTEMS.UNSIGNED32;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end IO_CLOSE;
-
- procedure IO_READ (
- MAJOR : in RTEMS.DEVICE_MAJOR_NUMBER;
- MINOR : in RTEMS.DEVICE_MINOR_NUMBER;
- ARGUMENT : in RTEMS.ADDRESS;
- RETURN_VALUE : out RTEMS.UNSIGNED32;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end IO_READ;
-
- procedure IO_WRITE (
- MAJOR : in RTEMS.DEVICE_MAJOR_NUMBER;
- MINOR : in RTEMS.DEVICE_MINOR_NUMBER;
- ARGUMENT : in RTEMS.ADDRESS;
- RETURN_VALUE : out RTEMS.UNSIGNED32;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end IO_WRITE;
-
- procedure IO_CONTROL (
- MAJOR : in RTEMS.DEVICE_MAJOR_NUMBER;
- MINOR : in RTEMS.DEVICE_MINOR_NUMBER;
- ARGUMENT : in RTEMS.ADDRESS;
- RETURN_VALUE : out RTEMS.UNSIGNED32;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end IO_CONTROL;
-
--- Fatal Error Manager
-
- procedure FATAL_ERROR_OCCURRED (
- THE_ERROR : in RTEMS.UNSIGNED32
- ) is
- begin
-
- NULL;
-
- end FATAL_ERROR_OCCURRED;
-
--- Rate Monotonic Manager
-
- procedure RATE_MONOTONIC_CREATE (
- NAME : in RTEMS.NAME;
- ID : out RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end RATE_MONOTONIC_CREATE;
-
- procedure RATE_MONOTONIC_IDENT (
- NAME : in RTEMS.NAME;
- ID : out RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end RATE_MONOTONIC_IDENT;
-
- procedure RATE_MONOTONIC_DELETE (
- ID : in RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end RATE_MONOTONIC_DELETE;
-
- procedure RATE_MONOTONIC_CANCEL (
- ID : in RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end RATE_MONOTONIC_CANCEL;
-
- procedure RATE_MONOTONIC_PERIOD (
- ID : in RTEMS.ID;
- LENGTH : in RTEMS.INTERVAL;
- RESULT : out RTEMS.STATUS_CODES
- ) is
- begin
-
- RESULT := RTEMS.SUCCESSFUL;
-
- end RATE_MONOTONIC_PERIOD;
-
--- Multiprocessing Manager
-
- procedure MULTIPROCESSING_ANNOUNCE
- is
- begin
-
- NULL;
-
- end MULTIPROCESSING_ANNOUNCE;
-
-end DUMMY_RTEMS;
diff --git a/c/src/ada-tests/tmtests/tmoverhd/dummy_rtems.ads b/c/src/ada-tests/tmtests/tmoverhd/dummy_rtems.ads
deleted file mode 100644
index ccad73c0ef..0000000000
--- a/c/src/ada-tests/tmtests/tmoverhd/dummy_rtems.ads
+++ /dev/null
@@ -1,521 +0,0 @@
---
--- DUMMY_RTEMS / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package contains specifications for stub routines
--- which are used to time the invocation overhead incurred
--- with an Ada application program invokes each RTEMS directive.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-
-package DUMMY_RTEMS is
-
--- Initialization Manager
-
- procedure INITIALIZE_EXECUTIVE (
- CONFIGURATION_TABLE : in RTEMS.CONFIGURATION_TABLE_POINTER;
- CPU_TABLE : in RTEMS.CPU_TABLE_POINTER
- );
-
- procedure SHUTDOWN_EXECUTIVE (
- RESULT : in RTEMS.UNSIGNED32
- );
-
--- Task Manager
-
- procedure TASK_CREATE (
- NAME : in RTEMS.NAME;
- INITIAL_PRIORITY : in RTEMS.TASK_PRIORITY;
- STACK_SIZE : in RTEMS.UNSIGNED32;
- INITIAL_MODES : in RTEMS.MODE;
- ATTRIBUTE_SET : in RTEMS.ATTRIBUTE;
- ID : out RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure TASK_IDENT (
- NAME : in RTEMS.NAME;
- NODE : in RTEMS.UNSIGNED32;
- ID : out RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure TASK_START (
- ID : in RTEMS.ID;
- ENTRY_POINT : in RTEMS.TASK_ENTRY;
- ARGUMENT : in RTEMS.UNSIGNED32;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure TASK_RESTART (
- ID : in RTEMS.ID;
- ARGUMENT : in RTEMS.UNSIGNED32;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure TASK_DELETE (
- ID : in RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure TASK_SUSPEND (
- ID : in RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure TASK_RESUME (
- ID : in RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure TASK_SET_PRIORITY (
- ID : in RTEMS.ID;
- NEW_PRIORITY : in RTEMS.TASK_PRIORITY;
- OLD_PRIORITY : out RTEMS.TASK_PRIORITY;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure TASK_MODE (
- MODE_SET : in RTEMS.MODE;
- MASK : in RTEMS.MODE;
- PREVIOUS_MODE_SET : out RTEMS.MODE;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure TASK_GET_NOTE (
- ID : in RTEMS.ID;
- NOTEPAD : in RTEMS.NOTEPAD_INDEX;
- NOTE : out RTEMS.UNSIGNED32;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure TASK_SET_NOTE (
- ID : in RTEMS.ID;
- NOTEPAD : in RTEMS.NOTEPAD_INDEX;
- NOTE : in RTEMS.UNSIGNED32;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure TASK_WAKE_WHEN (
- TIME_BUFFER : in RTEMS.TIME_OF_DAY;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure TASK_WAKE_AFTER (
- TICKS : in RTEMS.INTERVAL;
- RESULT : out RTEMS.STATUS_CODES
- );
-
--- Interrupt Manager
-
- procedure INTERRUPT_CATCH (
- NEW_ISR_HANDLER : in RTEMS.ADDRESS;
- VECTOR : in RTEMS.VECTOR_NUMBER;
- OLD_ISR_HANDLER : out RTEMS.ADDRESS;
- RESULT : out RTEMS.STATUS_CODES
- );
-
--- Clock Manager
-
- procedure CLOCK_GET (
- OPTION : in RTEMS.CLOCK_GET_OPTIONS;
- TIME_BUFFER : in RTEMS.ADDRESS;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure CLOCK_SET (
- TIME_BUFFER : in RTEMS.TIME_OF_DAY;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure CLOCK_TICK (
- RESULT : out RTEMS.STATUS_CODES
- );
-
--- Timer Manager
-
- procedure TIMER_CREATE (
- NAME : in RTEMS.NAME;
- ID : out RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure TIMER_DELETE (
- ID : in RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure TIMER_IDENT (
- NAME : in RTEMS.NAME;
- ID : out RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure TIMER_FIRE_AFTER (
- ID : in RTEMS.ID;
- TICKS : in RTEMS.INTERVAL;
- ROUTINE : in RTEMS.TIMER_SERVICE_ROUTINE;
- USER_DATA : in RTEMS.ADDRESS;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure TIMER_FIRE_WHEN (
- ID : in RTEMS.ID;
- WALL_TIME : in RTEMS.TIME_OF_DAY;
- ROUTINE : in RTEMS.TIMER_SERVICE_ROUTINE;
- USER_DATA : in RTEMS.ADDRESS;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure TIMER_RESET (
- ID : in RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure TIMER_CANCEL (
- ID : in RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- );
-
--- Semaphore Manager
-
- procedure SEMAPHORE_CREATE (
- NAME : in RTEMS.NAME;
- COUNT : in RTEMS.UNSIGNED32;
- ATTRIBUTE_SET : in RTEMS.ATTRIBUTE;
- PRIORITY_CEILING : in RTEMS.TASK_PRIORITY;
- ID : out RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure SEMAPHORE_DELETE (
- ID : in RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure SEMAPHORE_IDENT (
- NAME : in RTEMS.NAME;
- NODE : in RTEMS.UNSIGNED32;
- ID : out RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure SEMAPHORE_OBTAIN (
- ID : in RTEMS.ID;
- OPTION_SET : in RTEMS.OPTION;
- TIMEOUT : in RTEMS.INTERVAL;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure SEMAPHORE_RELEASE (
- ID : in RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- );
-
--- Message Queue Manager
-
- procedure MESSAGE_QUEUE_CREATE (
- Name : in RTEMS.Name;
- Count : in RTEMS.Unsigned32;
- Max_Message_Size : in RTEMS.Unsigned32;
- Attribute_Set : in RTEMS.Attribute;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure MESSAGE_QUEUE_IDENT (
- NAME : in RTEMS.NAME;
- NODE : in RTEMS.UNSIGNED32;
- ID : out RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure MESSAGE_QUEUE_DELETE (
- ID : in RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure MESSAGE_QUEUE_SEND (
- ID : in RTEMS.ID;
- BUFFER : in RTEMS.ADDRESS;
- SIZE : in RTEMS.UNSIGNED32;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure MESSAGE_QUEUE_URGENT (
- ID : in RTEMS.ID;
- BUFFER : in RTEMS.ADDRESS;
- SIZE : in RTEMS.UNSIGNED32;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure MESSAGE_QUEUE_BROADCAST (
- ID : in RTEMS.ID;
- BUFFER : in RTEMS.ADDRESS;
- SIZE : in RTEMS.UNSIGNED32;
- COUNT : out RTEMS.UNSIGNED32;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure MESSAGE_QUEUE_RECEIVE (
- ID : in RTEMS.ID;
- BUFFER : in RTEMS.ADDRESS;
- OPTION_SET : in RTEMS.OPTION;
- TIMEOUT : in RTEMS.INTERVAL;
- SIZE : out RTEMS.UNSIGNED32;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure MESSAGE_QUEUE_FLUSH (
- ID : in RTEMS.ID;
- COUNT : out RTEMS.UNSIGNED32;
- RESULT : out RTEMS.STATUS_CODES
- );
-
--- Event Manager
-
- procedure EVENT_SEND (
- ID : in RTEMS.ID;
- EVENT_IN : in RTEMS.EVENT_SET;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure EVENT_RECEIVE (
- EVENT_IN : in RTEMS.EVENT_SET;
- OPTION_SET : in RTEMS.OPTION;
- TICKS : in RTEMS.INTERVAL;
- EVENT_OUT : out RTEMS.EVENT_SET;
- RESULT : out RTEMS.STATUS_CODES
- );
-
--- Signal Manager
-
- procedure SIGNAL_CATCH (
- ASR_HANDLER : in RTEMS.ASR_HANDLER;
- MODE_SET : in RTEMS.MODE;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure SIGNAL_SEND (
- ID : in RTEMS.ID;
- SIGNAL_SET : in RTEMS.SIGNAL_SET;
- RESULT : out RTEMS.STATUS_CODES
- );
-
--- Partition Manager
-
- procedure PARTITION_CREATE (
- NAME : in RTEMS.NAME;
- STARTING_ADDRESS : in RTEMS.ADDRESS;
- LENGTH : in RTEMS.UNSIGNED32;
- BUFFER_SIZE : in RTEMS.UNSIGNED32;
- ATTRIBUTE_SET : in RTEMS.ATTRIBUTE;
- ID : out RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure PARTITION_IDENT (
- NAME : in RTEMS.NAME;
- NODE : in RTEMS.UNSIGNED32;
- ID : out RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure PARTITION_DELETE (
- ID : in RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure PARTITION_GET_BUFFER (
- ID : in RTEMS.ID;
- BUFFER : out RTEMS.ADDRESS;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure PARTITION_RETURN_BUFFER (
- ID : in RTEMS.ID;
- BUFFER : in RTEMS.ADDRESS;
- RESULT : out RTEMS.STATUS_CODES
- );
-
--- Region Manager
-
- procedure REGION_CREATE (
- NAME : in RTEMS.NAME;
- STARTING_ADDRESS : in RTEMS.ADDRESS;
- LENGTH : in RTEMS.UNSIGNED32;
- PAGE_SIZE : in RTEMS.UNSIGNED32;
- ATTRIBUTE_SET : in RTEMS.ATTRIBUTE;
- ID : out RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure REGION_IDENT (
- NAME : in RTEMS.NAME;
- ID : out RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure REGION_DELETE (
- ID : in RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure REGION_GET_SEGMENT (
- ID : in RTEMS.ID;
- SIZE : in RTEMS.UNSIGNED32;
- OPTION_SET : in RTEMS.OPTION;
- TIMEOUT : in RTEMS.INTERVAL;
- SEGMENT : out RTEMS.ADDRESS;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure REGION_RETURN_SEGMENT (
- ID : in RTEMS.ID;
- SEGMENT : in RTEMS.ADDRESS;
- RESULT : out RTEMS.STATUS_CODES
- );
-
--- Dual Ported Memory Manager
-
- procedure PORT_CREATE (
- NAME : in RTEMS.NAME;
- INTERNAL_START : in RTEMS.ADDRESS;
- EXTERNAL_START : in RTEMS.ADDRESS;
- LENGTH : in RTEMS.UNSIGNED32;
- ID : out RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure PORT_IDENT (
- NAME : in RTEMS.NAME;
- ID : out RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure PORT_DELETE (
- ID : in RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure PORT_EXTERNAL_TO_INTERNAL (
- ID : in RTEMS.ID;
- EXTERNAL : in RTEMS.ADDRESS;
- INTERNAL : out RTEMS.ADDRESS;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure PORT_INTERNAL_TO_EXTERNAL (
- ID : in RTEMS.ID;
- INTERNAL : in RTEMS.ADDRESS;
- EXTERNAL : out RTEMS.ADDRESS;
- RESULT : out RTEMS.STATUS_CODES
- );
-
--- Input/Output Manager
-
- procedure IO_INITIALIZE (
- MAJOR : in RTEMS.DEVICE_MAJOR_NUMBER;
- MINOR : in RTEMS.DEVICE_MINOR_NUMBER;
- ARGUMENT : in RTEMS.ADDRESS;
- RETURN_VALUE : out RTEMS.UNSIGNED32;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure IO_OPEN (
- MAJOR : in RTEMS.DEVICE_MAJOR_NUMBER;
- MINOR : in RTEMS.DEVICE_MINOR_NUMBER;
- ARGUMENT : in RTEMS.ADDRESS;
- RETURN_VALUE : out RTEMS.UNSIGNED32;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure IO_CLOSE (
- MAJOR : in RTEMS.DEVICE_MAJOR_NUMBER;
- MINOR : in RTEMS.DEVICE_MINOR_NUMBER;
- ARGUMENT : in RTEMS.ADDRESS;
- RETURN_VALUE : out RTEMS.UNSIGNED32;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure IO_READ (
- MAJOR : in RTEMS.DEVICE_MAJOR_NUMBER;
- MINOR : in RTEMS.DEVICE_MINOR_NUMBER;
- ARGUMENT : in RTEMS.ADDRESS;
- RETURN_VALUE : out RTEMS.UNSIGNED32;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure IO_WRITE (
- MAJOR : in RTEMS.DEVICE_MAJOR_NUMBER;
- MINOR : in RTEMS.DEVICE_MINOR_NUMBER;
- ARGUMENT : in RTEMS.ADDRESS;
- RETURN_VALUE : out RTEMS.UNSIGNED32;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure IO_CONTROL (
- MAJOR : in RTEMS.DEVICE_MAJOR_NUMBER;
- MINOR : in RTEMS.DEVICE_MINOR_NUMBER;
- ARGUMENT : in RTEMS.ADDRESS;
- RETURN_VALUE : out RTEMS.UNSIGNED32;
- RESULT : out RTEMS.STATUS_CODES
- );
-
--- Fatal Error Manager
-
- procedure FATAL_ERROR_OCCURRED (
- THE_ERROR : in RTEMS.UNSIGNED32
- );
-
--- Rate Monotonic Manager
-
- procedure RATE_MONOTONIC_CREATE (
- NAME : in RTEMS.NAME;
- ID : out RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure RATE_MONOTONIC_IDENT (
- NAME : in RTEMS.NAME;
- ID : out RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure RATE_MONOTONIC_DELETE (
- ID : in RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure RATE_MONOTONIC_CANCEL (
- ID : in RTEMS.ID;
- RESULT : out RTEMS.STATUS_CODES
- );
-
- procedure RATE_MONOTONIC_PERIOD (
- ID : in RTEMS.ID;
- LENGTH : in RTEMS.INTERVAL;
- RESULT : out RTEMS.STATUS_CODES
- );
-
--- Multiprocessing Manager
-
- procedure MULTIPROCESSING_ANNOUNCE;
-
-end DUMMY_RTEMS;
diff --git a/c/src/ada-tests/tmtests/tmoverhd/tmoverhd.adb b/c/src/ada-tests/tmtests/tmoverhd/tmoverhd.adb
deleted file mode 100644
index 50066a949c..0000000000
--- a/c/src/ada-tests/tmtests/tmoverhd/tmoverhd.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test TMOVERHD of the Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with TMTEST;
-with TEST_SUPPORT;
-
-procedure TMOVERHD is
- INIT_ID : RTEMS.ID;
- STATUS : RTEMS.STATUS_CODES;
-begin
-
- RTEMS.TASK_CREATE(
- RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
- 1,
- RTEMS.MINIMUM_STACK_SIZE,
- RTEMS.NO_PREEMPT,
- RTEMS.DEFAULT_ATTRIBUTES,
- INIT_ID,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
-
-
- RTEMS.TASK_START(
- INIT_ID,
- TMTEST.INIT'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
-
- loop
- delay 120.0;
- end loop;
-
-end TMOVERHD;
-
diff --git a/c/src/ada-tests/tmtests/tmoverhd/tmtest.adb b/c/src/ada-tests/tmtests/tmoverhd/tmtest.adb
deleted file mode 100644
index 2faf4bb226..0000000000
--- a/c/src/ada-tests/tmtests/tmoverhd/tmtest.adb
+++ /dev/null
@@ -1,1564 +0,0 @@
---
--- TMTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Calling Overhead Test of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with DUMMY_RTEMS;
-with INTERFACES; use INTERFACES;
-with RTEMS;
-with TEST_SUPPORT;
-with TEXT_IO;
-with TIME_TEST_SUPPORT;
-with UNSIGNED32_IO;
-
-package body TMTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TIME TEST OVERHEAD ***" );
-
- TIMER_DRIVER.SET_FIND_AVERAGE_OVERHEAD( TRUE );
-
- TMTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME( 'T', 'A', '1', ' ' );
-
- RTEMS.TASK_CREATE(
- TMTEST.TASK_NAME( 1 ),
- 254,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- TMTEST.TASK_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA1" );
-
- RTEMS.TASK_START(
- TMTEST.TASK_ID( 1 ),
- TMTEST.TASK_1'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA1" );
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- TIMER_HANDLER
---
-
- procedure TIMER_HANDLER (
- IGNORED_ID : in RTEMS.ID;
- IGNORED_ADDRESS : in RTEMS.ADDRESS
- ) is
- begin
-
- NULL;
-
- end TIMER_HANDLER;
-
---PAGE
---
--- ISR_HANDLER
---
-
- procedure ISR_HANDLER (
- VECTOR : in RTEMS.VECTOR_NUMBER
- ) is
- begin
-
- NULL;
-
- end ISR_HANDLER;
-
---PAGE
---
--- ASR_HANDLER
---
-
- procedure ASR_HANDLER (
- SIGNALS : in RTEMS.SIGNAL_SET
- ) is
- begin
-
- NULL;
-
- end ASR_HANDLER;
-
---PAGE
---
--- TASK_1
---
-
- CPU_TABLE : aliased RTEMS.CPU_TABLE;
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- NAME : RTEMS.NAME;
- INDEX : RTEMS.UNSIGNED32;
- OVERHEAD : RTEMS.UNSIGNED32;
- ID : RTEMS.ID;
- IN_PRIORITY : RTEMS.TASK_PRIORITY;
- OUT_PRIORITY : RTEMS.TASK_PRIORITY;
- IN_MODE : RTEMS.MODE;
- MASK : RTEMS.MODE;
- OUT_MODE : RTEMS.MODE;
- NOTE : RTEMS.UNSIGNED32;
- TIME : RTEMS.TIME_OF_DAY;
- TIMEOUT : RTEMS.INTERVAL;
- SIGNALS : RTEMS.SIGNAL_SET;
- ADDRESS_1 : RTEMS.ADDRESS;
- EVENTS : RTEMS.SIGNAL_SET;
- BUFFER : TMTEST.BUFFER;
- BUFFER_POINTER : RTEMS.ADDRESS;
- MESSAGE_SIZE : RTEMS.UNSIGNED32;
- COUNT : RTEMS.UNSIGNED32;
- MAJOR : RTEMS.DEVICE_MAJOR_NUMBER;
- MINOR : RTEMS.DEVICE_MINOR_NUMBER;
- IO_RESULT : RTEMS.UNSIGNED32;
- ERROR : RTEMS.UNSIGNED32;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- NAME := RTEMS.BUILD_NAME( 'N', 'A', 'M', 'E' );
-
- BUFFER_POINTER := BUFFER'ADDRESS;
-
--- INITIALIZE_EXECUTIVE
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.INITIALIZE_EXECUTIVE(
- RTEMS.CONFIGURATION,
- CPU_TABLE'ACCESS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "INITIALIZE_EXECUTIVE",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- SHUTDOWN_EXECUTIVE
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.SHUTDOWN_EXECUTIVE( ERROR );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "SHUTDOWN_EXECUTIVE",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- TASK_CREATE
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.TASK_CREATE(
- NAME,
- IN_PRIORITY,
- 2048,
- RTEMS.DEFAULT_MODES,
- RTEMS.DEFAULT_ATTRIBUTES,
- ID,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "TASK_CREATE",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- TASK_IDENT
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.TASK_IDENT(
- NAME,
- RTEMS.SEARCH_ALL_NODES,
- ID,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "TASK_IDENT",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- TASK_START
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.TASK_START( ID, TMTEST.TASK_1'ACCESS, 0, STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "TASK_START",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- TASK_RESTART
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.TASK_RESTART( ID, 0, STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "TASK_RESTART",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- TASK_DELETE
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.TASK_DELETE( ID, STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "TASK_DELETE",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- TASK_SUSPEND
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.TASK_SUSPEND( ID, STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "TASK_SUSPEND",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- TASK_RESUME
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.TASK_RESUME( ID, STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "TASK_RESUME",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- TASK_SET_PRIORITY
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.TASK_SET_PRIORITY(
- ID,
- IN_PRIORITY,
- OUT_PRIORITY,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "TASK_SET_PRIORITY",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- TASK_MODE
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.TASK_MODE(
- IN_MODE,
- MASK,
- OUT_MODE,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "TASK_MODE",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- TASK_GET_NOTE
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.TASK_GET_NOTE( ID, 1, NOTE, STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "TASK_GET_NOTE",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- TASK_SET_NOTE
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.TASK_SET_NOTE( ID, 1, NOTE, STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "TASK_SET_NOTE",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- TASK_WAKE_WHEN
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.TASK_WAKE_WHEN( TIME, STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "TASK_WAKE_WHEN",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- TASK_WAKE_AFTER
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.TASK_WAKE_AFTER( TIMEOUT, STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "TASK_WAKE_AFTER",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- INTERRUPT_CATCH
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.INTERRUPT_CATCH(
- TMTEST.ISR_HANDLER'ADDRESS,
- RTEMS.VECTOR_NUMBER'FIRST,
- ADDRESS_1,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "INTERRUPT_CATCH",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- CLOCK_GET
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.CLOCK_GET( RTEMS.CLOCK_GET_TOD, TIME'ADDRESS, STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "CLOCK_GET",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- CLOCK_SET
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.CLOCK_SET( TIME, STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "CLOCK_SET",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- CLOCK_TICK
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.CLOCK_TICK( STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "CLOCK_TICK",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
-TEST_SUPPORT.PAUSE;
-
--- TIMER_CREATE
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.TIMER_CREATE( NAME, ID, STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "TIMER_CREATE",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- TIMER_DELETE
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.TIMER_DELETE( ID, STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "TIMER_DELETE",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- TIMER_IDENT
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.TIMER_IDENT(
- NAME,
- ID,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "TIMER_IDENT",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- TIMER_FIRE_AFTER
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.TIMER_FIRE_AFTER(
- ID,
- TIMEOUT,
- TMTEST.TIMER_HANDLER'ACCESS,
- RTEMS.NULL_ADDRESS,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "TIMER_FIRE_AFTER",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- TIMER_FIRE_WHEN
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.TIMER_FIRE_WHEN(
- ID,
- TIME,
- TMTEST.TIMER_HANDLER'ACCESS,
- RTEMS.NULL_ADDRESS,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "TIMER_FIRE_WHEN",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- TIMER_RESET
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.TIMER_RESET( ID, STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "TIMER_RESET",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- TIMER_CANCEL
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.TIMER_CANCEL( ID, STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "TIMER_CANCEL",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- SEMAPHORE_CREATE
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.SEMAPHORE_CREATE(
- NAME,
- 128,
- RTEMS.DEFAULT_ATTRIBUTES,
- RTEMS.NO_PRIORITY,
- ID,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "SEMAPHORE_CREATE",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- SEMAPHORE_DELETE
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.SEMAPHORE_DELETE( ID, STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "SEMAPHORE_DELETE",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- SEMAPHORE_IDENT
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.SEMAPHORE_IDENT(
- NAME,
- RTEMS.SEARCH_ALL_NODES,
- ID,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "SEMAPHORE_IDENT",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- SEMAPHORE_OBTAIN
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.SEMAPHORE_OBTAIN(
- ID,
- RTEMS.DEFAULT_OPTIONS,
- TIMEOUT,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "SEMAPHORE_OBTAIN",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- SEMAPHORE_RELEASE
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.SEMAPHORE_RELEASE( ID, STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "SEMAPHORE_RELEASE",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- MESSAGE_QUEUE_CREATE
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.MESSAGE_QUEUE_CREATE(
- NAME,
- 128,
- 16,
- RTEMS.DEFAULT_ATTRIBUTES,
- ID,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "MESSAGE_QUEUE_CREATE",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- MESSAGE_QUEUE_IDENT
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.MESSAGE_QUEUE_IDENT(
- NAME,
- RTEMS.SEARCH_ALL_NODES,
- ID,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "MESSAGE_QUEUE_IDENT",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- MESSAGE_QUEUE_DELETE
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.MESSAGE_QUEUE_DELETE( ID, STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "MESSAGE_QUEUE_DELETE",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- MESSAGE_QUEUE_SEND
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.MESSAGE_QUEUE_SEND( ID, BUFFER_POINTER, 16, STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "MESSAGE_QUEUE_SEND",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- MESSAGE_QUEUE_URGENT
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.MESSAGE_QUEUE_URGENT( ID, BUFFER_POINTER, 16, STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "MESSAGE_QUEUE_URGENT",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- MESSAGE_QUEUE_BROADCAST
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.MESSAGE_QUEUE_BROADCAST(
- ID,
- BUFFER_POINTER,
- 16,
- COUNT,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "MESSAGE_QUEUE_BROADCAST",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- MESSAGE_QUEUE_RECEIVE
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.MESSAGE_QUEUE_RECEIVE(
- ID,
- BUFFER_POINTER,
- RTEMS.DEFAULT_OPTIONS,
- TIMEOUT,
- MESSAGE_SIZE,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "MESSAGE_QUEUE_RECEIVE",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- MESSAGE_QUEUE_FLUSH
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.MESSAGE_QUEUE_FLUSH( ID, COUNT, STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "MESSAGE_QUEUE_FLUSH",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
-TEST_SUPPORT.PAUSE;
-
--- EVENT_SEND
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.EVENT_SEND( ID, EVENTS, STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "EVENT_SEND",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- EVENT_RECEIVE
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.EVENT_RECEIVE(
- RTEMS.EVENT_16,
- EVENTS,
- RTEMS.DEFAULT_OPTIONS,
- TIMEOUT,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "EVENT_RECEIVE",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- SIGNAL_CATCH
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.SIGNAL_CATCH(
- TMTEST.ASR_HANDLER'ACCESS,
- RTEMS.DEFAULT_MODES,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "SIGNAL_CATCH",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- SIGNAL_SEND
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.SIGNAL_SEND( ID, SIGNALS, STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "SIGNAL_SEND",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- PARTITION_CREATE
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.PARTITION_CREATE(
- NAME,
- TMTEST.MEMORY_AREA'ADDRESS,
- 2048,
- 128,
- RTEMS.DEFAULT_ATTRIBUTES,
- ID,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "PARTITION_CREATE",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- PARTITION_IDENT
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.PARTITION_IDENT(
- NAME,
- RTEMS.SEARCH_ALL_NODES,
- ID,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "PARTITION_IDENT",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- PARTITION_DELETE
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.PARTITION_DELETE( ID, STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "PARTITION_DELETE",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- PARTITION_GET_BUFFER
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.PARTITION_GET_BUFFER( ID, ADDRESS_1, STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "PARTITION_GET_BUFFER",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- PARTITION_RETURN_BUFFER
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.PARTITION_RETURN_BUFFER( ID, ADDRESS_1, STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "PARTITION_RETURN_BUFFER",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- REGION_CREATE
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.REGION_CREATE(
- NAME,
- TMTEST.MEMORY_AREA'ADDRESS,
- 2048,
- 128,
- RTEMS.DEFAULT_ATTRIBUTES,
- ID,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "REGION_CREATE",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- REGION_IDENT
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.REGION_IDENT(
- NAME,
- ID,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "REGION_IDENT",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- REGION_DELETE
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.REGION_DELETE( ID, STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "REGION_DELETE",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- REGION_GET_SEGMENT
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.REGION_GET_SEGMENT(
- ID,
- 243,
- RTEMS.DEFAULT_OPTIONS,
- TIMEOUT,
- ADDRESS_1,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "REGION_GET_SEGMENT",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- REGION_RETURN_SEGMENT
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.REGION_RETURN_SEGMENT( ID, ADDRESS_1, STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "REGION_RETURN_SEGMENT",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- PORT_CREATE
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.PORT_CREATE(
- NAME,
- TMTEST.INTERNAL_PORT_AREA'ADDRESS,
- TMTEST.EXTERNAL_PORT_AREA'ADDRESS,
- TMTEST.INTERNAL_PORT_AREA'LENGTH,
- ID,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "PORT_CREATE",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- PORT_IDENT
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.PORT_IDENT( NAME, ID, STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "PORT_IDENT",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- PORT_DELETE
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.PORT_DELETE( ID, STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "PORT_DELETE",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- PORT_EXTERNAL_TO_INTERNAL
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.PORT_EXTERNAL_TO_INTERNAL(
- ID,
- TMTEST.EXTERNAL_PORT_AREA( 7 )'ADDRESS,
- ADDRESS_1,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "PORT_EXTERNAL_TO_INTERNAL",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- PORT_INTERNAL_TO_EXTERNAL
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.PORT_INTERNAL_TO_EXTERNAL(
- ID,
- TMTEST.INTERNAL_PORT_AREA( 7 )'ADDRESS,
- ADDRESS_1,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "PORT_INTERNAL_TO_EXTERNAL",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
-TEST_SUPPORT.PAUSE;
-
--- IO_INITIALIZE
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.IO_INITIALIZE(
- MAJOR,
- MINOR,
- ADDRESS_1,
- IO_RESULT,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "IO_INITIALIZE",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- IO_OPEN
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.IO_OPEN(
- MAJOR,
- MINOR,
- ADDRESS_1,
- IO_RESULT,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "IO_OPEN",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- IO_CLOSE
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.IO_CLOSE(
- MAJOR,
- MINOR,
- ADDRESS_1,
- IO_RESULT,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "IO_CLOSE",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- IO_READ
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.IO_READ(
- MAJOR,
- MINOR,
- ADDRESS_1,
- IO_RESULT,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "IO_READ",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- IO_WRITE
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.IO_WRITE(
- MAJOR,
- MINOR,
- ADDRESS_1,
- IO_RESULT,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "IO_WRITE",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- IO_CONTROL
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.IO_CONTROL(
- MAJOR,
- MINOR,
- ADDRESS_1,
- IO_RESULT,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "IO_CONTROL",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- FATAL_ERROR_OCCURRED
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.FATAL_ERROR_OCCURRED( ERROR );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "FATAL_ERROR_OCCURRED",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- RATE_MONOTONIC_CREATE
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.RATE_MONOTONIC_CREATE( NAME, ID, STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "RATE_MONOTONIC_CREATE",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- RATE_MONOTONIC_IDENT
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.RATE_MONOTONIC_IDENT(
- NAME,
- ID,
- STATUS
- );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "RATE_MONOTONIC_IDENT",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- RATE_MONOTONIC_DELETE
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.RATE_MONOTONIC_DELETE( ID, STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "RATE_MONOTONIC_DELETE",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- RATE_MONOTONIC_CANCEL
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.RATE_MONOTONIC_CANCEL( ID, STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "RATE_MONOTONIC_CANCEL",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- RATE_MONOTONIC_PERIOD
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.RATE_MONOTONIC_PERIOD( ID, TIMEOUT, STATUS );
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "RATE_MONOTONIC_PERIOD",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
--- MULTIPROCESSING_ANNOUNCE
-
- TIMER_DRIVER.INITIALIZE;
- for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
- loop
- DUMMY_RTEMS.MULTIPROCESSING_ANNOUNCE;
- end loop;
- TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
-
- TIME_TEST_SUPPORT.PUT_TIME(
- "MULTIPROCESSING_ANNOUNCE",
- TMTEST.END_TIME,
- TIME_TEST_SUPPORT.OPERATION_COUNT,
- OVERHEAD,
- 0
- );
-
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end TASK_1;
-
-end TMTEST;
diff --git a/c/src/ada-tests/tmtests/tmoverhd/tmtest.ads b/c/src/ada-tests/tmtests/tmoverhd/tmtest.ads
deleted file mode 100644
index 52b4da559d..0000000000
--- a/c/src/ada-tests/tmtests/tmoverhd/tmtest.ads
+++ /dev/null
@@ -1,155 +0,0 @@
---
--- TMTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Calling Overhead Test of the RTEMS
--- Timing Test Suite.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1989-1997.
--- On-Line Applications Research Corporation (OAR).
--- Copyright assigned to U.S. Government, 1994.
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with RTEMS;
-with SYSTEM;
-with TIMER_DRIVER;
-with System.Storage_Elements;
-
-package TMTEST is
-
---
--- Buffer Record similar to that used by RTEMS 3.2.1. Using this
--- avoids changes to the test.
---
-
- type BUFFER is
- record
- FIELD1 : RTEMS.UNSIGNED32; -- TEMPORARY UNTIL VARIABLE LENGTH
- FIELD2 : RTEMS.UNSIGNED32;
- FIELD3 : RTEMS.UNSIGNED32;
- FIELD4 : RTEMS.UNSIGNED32;
- end record;
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS tasks created
--- by this test.
---
-
- TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
- TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
-
---
--- The following variable is set to the execution time returned
--- by the timer.
---
-
- END_TIME : RTEMS.UNSIGNED32;
-
---
--- The following area defines a memory area to be used as the
--- internal address space of the port.
---
-
- INTERNAL_PORT_AREA_ADDRESS : constant System.Address :=
- System.Storage_Elements.To_Address(16#00001000#);
-
- INTERNAL_PORT_AREA : array ( RTEMS.UNSIGNED32 range 0 .. 255 )
- of RTEMS.UNSIGNED8;
- for INTERNAL_PORT_AREA use at INTERNAL_PORT_AREA_ADDRESS;
-
---
--- The following area defines a memory area to be used as the
--- external address space of the port.
---
-
- EXTERNAL_PORT_AREA_ADDRESS : constant System.Address :=
- System.Storage_Elements.To_Address(16#00002000#);
-
- EXTERNAL_PORT_AREA : array ( RTEMS.UNSIGNED32 range 0 .. 255 )
- of RTEMS.UNSIGNED8;
- for EXTERNAL_PORT_AREA use at EXTERNAL_PORT_AREA_ADDRESS;
-
-
---
--- The following area defines a memory area to be used as the
--- memory space for a partition and later for a region.
---
-
- MEMORY_AREA : array ( RTEMS.UNSIGNED32 range 0 .. 255 ) of RTEMS.UNSIGNED8;
- for MEMORY_AREA'ALIGNMENT use RTEMS.STRUCTURE_ALIGNMENT;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- TIMER_HANDLER
---
--- DESCRIPTION:
---
--- This subprogram is a timer service routine.
---
-
- procedure TIMER_HANDLER (
- IGNORED_ID : in RTEMS.ID;
- IGNORED_ADDRESS : in RTEMS.ADDRESS
- );
-
---
--- ISR_HANDLER
---
--- DESCRIPTION:
---
--- This subprogram is an interrupt service routine.
---
-
- procedure ISR_HANDLER (
- VECTOR : in RTEMS.VECTOR_NUMBER
- );
-
---
--- ASR_HANDLER
---
--- DESCRIPTION:
---
--- This subprogram is an asynchronous signal routine.
---
-
- procedure ASR_HANDLER (
- SIGNALS : in RTEMS.SIGNAL_SET
- );
-
---
--- TASK_1
---
--- DESCRIPTION:
---
--- This RTEMS task is responsible for measuring and
--- reporting the calling overhead for all RTEMS
--- directives.
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end TMTEST;
diff --git a/c/src/ada/rtems.adb b/c/src/ada/rtems.adb
deleted file mode 100644
index 44cd0838a3..0000000000
--- a/c/src/ada/rtems.adb
+++ /dev/null
@@ -1,2064 +0,0 @@
---
--- RTEMS / Body
--- DESCRIPTION:
---
--- This package provides the interface to the RTEMS API.
---
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1997.
--- On-Line Applications Research Corporation (OAR).
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with Ada;
-with Ada.Unchecked_Conversion;
-with System;
-with Interfaces; use Interfaces;
-with Interfaces.C;
-
-package body RTEMS is
-
- --
- -- Utility Functions
- --
-
- function From_Ada_Boolean (
- Ada_Boolean : Standard.Boolean
- ) return RTEMS.Boolean is
- begin
-
- if Ada_Boolean = Standard.True then
- return RTEMS.True;
- end if;
-
- return RTEMS.False;
-
- end From_Ada_Boolean;
-
- function To_Ada_Boolean (
- RTEMS_Boolean : RTEMS.Boolean
- ) return Standard.Boolean is
- begin
-
- if RTEMS_Boolean = RTEMS.True then
- return Standard.True;
- end if;
-
- return Standard.False;
-
- end To_Ada_Boolean;
-
- function Milliseconds_To_Microseconds (
- Milliseconds : RTEMS.Unsigned32
- ) return RTEMS.Unsigned32 is
- begin
-
- return Milliseconds * 1000;
-
- end Milliseconds_To_Microseconds;
-
- function Microseconds_To_Ticks (
- Microseconds : RTEMS.Unsigned32
- ) return RTEMS.Interval is
- Microseconds_Per_Tick : RTEMS.Interval;
- pragma Import (C, Microseconds_Per_Tick, "_TOD_Microseconds_per_tick");
- begin
-
- return Microseconds / Microseconds_Per_Tick;
-
- end Microseconds_To_Ticks;
-
- function Milliseconds_To_Ticks (
- Milliseconds : RTEMS.Unsigned32
- ) return RTEMS.Interval is
- begin
-
- return Microseconds_To_Ticks(Milliseconds_To_Microseconds(Milliseconds));
-
- end Milliseconds_To_Ticks;
-
- function Build_Name (
- C1 : in Character;
- C2 : in Character;
- C3 : in Character;
- C4 : in Character
- ) return RTEMS.Name is
- C1_Value : RTEMS.Unsigned32;
- C2_Value : RTEMS.Unsigned32;
- C3_Value : RTEMS.Unsigned32;
- C4_Value : RTEMS.Unsigned32;
- begin
-
- C1_Value := Character'Pos( C1 );
- C2_Value := Character'Pos( C2 );
- C3_Value := Character'Pos( C3 );
- C4_Value := Character'Pos( C4 );
-
- return Interfaces.Shift_Left( C1_Value, 24 ) or
- Interfaces.Shift_Left( C2_Value, 16 ) or
- Interfaces.Shift_Left( C3_Value, 8 ) or
- C4_Value;
-
- end Build_Name;
-
- procedure Name_To_Characters (
- Name : in RTEMS.Name;
- C1 : out Character;
- C2 : out Character;
- C3 : out Character;
- C4 : out Character
- ) is
- C1_Value : RTEMS.Unsigned32;
- C2_Value : RTEMS.Unsigned32;
- C3_Value : RTEMS.Unsigned32;
- C4_Value : RTEMS.Unsigned32;
- begin
-
- C1_Value := Interfaces.Shift_Right( Name, 24 );
- C2_Value := Interfaces.Shift_Right( Name, 16 );
- C3_Value := Interfaces.Shift_Right( Name, 8 );
- C4_Value := Name;
-
- C1_Value := C1_Value and 16#00FF#;
- C2_Value := C2_Value and 16#00FF#;
- C3_Value := C3_Value and 16#00FF#;
- C4_Value := C4_Value and 16#00FF#;
-
- C1 := Character'Val( C1_Value );
- C2 := Character'Val( C2_Value );
- C3 := Character'Val( C3_Value );
- C4 := Character'Val( C4_Value );
-
- end Name_To_Characters;
-
- function Get_Node (
- ID : in RTEMS.ID
- ) return RTEMS.Unsigned32 is
- begin
-
- -- May not be right
- return Interfaces.Shift_Right( ID, 16 );
-
- end Get_Node;
-
- function Get_Index (
- ID : in RTEMS.ID
- ) return RTEMS.Unsigned32 is
- begin
-
- -- May not be right
- return ID and 16#FFFF#;
-
- end Get_Index;
-
-
- function Are_Statuses_Equal (
- Status : in RTEMS.Status_Codes;
- Desired : in RTEMS.Status_Codes
- ) return Standard.Boolean is
- begin
-
- if Status = Desired then
- return Standard.True;
- end if;
-
- return Standard.False;
-
- end Are_Statuses_Equal;
-
- function Is_Status_Successful (
- Status : in RTEMS.Status_Codes
- ) return Standard.Boolean is
- begin
-
- if Status = RTEMS.Successful then
- return Standard.True;
- end if;
-
- return Standard.False;
-
- end Is_Status_Successful;
-
- function Subtract (
- Left : in RTEMS.Address;
- Right : in RTEMS.Address
- ) return RTEMS.Unsigned32 is
- function To_Unsigned32 is
- new Ada.Unchecked_Conversion (System.Address, RTEMS.Unsigned32);
-
- begin
- return To_Unsigned32(Left) - To_Unsigned32(Right);
- end Subtract;
-
- function Are_Equal (
- Left : in RTEMS.Address;
- Right : in RTEMS.Address
- ) return Standard.Boolean is
- function To_Unsigned32 is
- new Ada.Unchecked_Conversion (System.Address, RTEMS.Unsigned32);
-
- begin
- return (To_Unsigned32(Left) = To_Unsigned32(Right));
- end Are_Equal;
-
-
- --
- --
- -- RTEMS API
- --
-
- --
- -- Initialization Manager
- --
-
- procedure Initialize_Executive (
- Configuration_Table : in RTEMS.Configuration_Table_Pointer;
- CPU_Table : in RTEMS.CPU_Table_Pointer
- ) is
- procedure Initialize_Executive_Base (
- Configuration_Table : in RTEMS.Configuration_Table_Pointer;
- CPU_Table : in RTEMS.CPU_Table_Pointer
- );
- pragma Import (C, Initialize_Executive_Base,
- "rtems_initialize_executive");
-
- begin
-
- Initialize_Executive_Base (Configuration_Table, CPU_Table);
-
- end Initialize_Executive;
-
- procedure Initialize_Executive_Early (
- Configuration_Table : in RTEMS.Configuration_Table_Pointer;
- CPU_Table : in RTEMS.CPU_Table_Pointer;
- Level : out RTEMS.ISR_Level
- ) is
- function Initialize_Executive_Early_Base (
- Configuration_Table : in RTEMS.Configuration_Table_Pointer;
- CPU_Table : in RTEMS.CPU_Table_Pointer
- ) return RTEMS.ISR_Level;
- pragma Import (C, Initialize_Executive_Early_Base,
- "rtems_initialize_executive_early");
-
- begin
-
- Level := Initialize_Executive_Early_Base (Configuration_Table, CPU_Table);
-
- end Initialize_Executive_Early;
-
- procedure Initialize_Executive_Late (
- BSP_Level : in RTEMS.ISR_Level
- ) is
- procedure Initialize_Executive_Late_Base (
- Level : in RTEMS.ISR_Level
- );
- pragma Import (C, Initialize_Executive_Late_Base,
- "rtems_initialize_executive_late");
-
- begin
-
- Initialize_Executive_Late_Base (BSP_Level);
-
- end Initialize_Executive_Late;
-
- procedure Shutdown_Executive (
- Result : in RTEMS.Unsigned32
- ) is
- procedure Shutdown_Executive_Base;
- pragma Import (C,Shutdown_Executive_Base,"rtems_shutdown_executive");
- begin
-
- Shutdown_Executive_Base;
-
- end Shutdown_Executive;
-
-
- --
- -- Task Manager
- --
-
- procedure Task_Create (
- Name : in RTEMS.Name;
- Initial_Priority : in RTEMS.Task_Priority;
- Stack_Size : in RTEMS.Unsigned32;
- Initial_Modes : in RTEMS.Mode;
- Attribute_Set : in RTEMS.Attribute;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Task_Create_Base (
- Name : RTEMS.Name;
- Initial_Priority : RTEMS.Task_Priority;
- Stack_Size : RTEMS.Unsigned32;
- Initial_Modes : RTEMS.Mode;
- Attribute_Set : RTEMS.Attribute;
- ID : access RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Task_Create_Base, "rtems_task_create");
- ID_Base : aliased RTEMS.ID := ID;
- begin
- Result := Task_Create_Base (
- Name,
- Initial_Priority,
- Stack_Size,
- Initial_Modes,
- Attribute_Set,
- ID_Base'Unchecked_Access
- );
- ID := ID_Base;
- end Task_Create;
-
-
- procedure Task_Ident (
- Name : in RTEMS.Name;
- Node : in RTEMS.Node;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
-
- function Task_Ident_Base (
- Name : RTEMS.Name;
- Node : RTEMS.Node;
- ID : access RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Task_Ident_Base, "rtems_task_ident");
- ID_Base : aliased RTEMS.ID := ID;
-
- begin
-
- Result := Task_Ident_Base (
- Name,
- Node,
- ID_Base'Unchecked_Access
- );
-
- ID := ID_Base;
-
- end Task_Ident;
-
- procedure Task_Start (
- ID : in RTEMS.ID;
- Entry_Point : in RTEMS.Task_Entry;
- Argument : in RTEMS.Task_Argument;
- Result : out RTEMS.Status_Codes
- ) is
-
- function Task_Start_Base (
- ID : RTEMS.ID;
- Entry_Point : RTEMS.Task_Entry;
- Argument : RTEMS.Task_Argument
- ) return RTEMS.Status_Codes;
- pragma Import (C, Task_Start_Base, "rtems_task_start");
-
- begin
-
- Result := Task_Start_Base (
- ID,
- Entry_Point,
- Argument
- );
-
- end Task_Start;
-
- procedure Task_Restart (
- ID : in RTEMS.ID;
- Argument : in RTEMS.Task_Argument;
- Result : out RTEMS.Status_Codes
- ) is
- function Task_Restart_Base (
- ID : RTEMS.ID;
- Argument : RTEMS.Task_Argument
- ) return RTEMS.Status_Codes;
- pragma Import (C, Task_Restart_Base, "rtems_task_restart");
- begin
-
- Result := Task_Restart_Base (
- ID,
- Argument
- );
-
- end Task_Restart;
-
- procedure Task_Delete (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Task_Delete_Base (
- ID : RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Task_Delete_Base, "rtems_task_delete");
- begin
-
- Result := Task_Delete_Base ( ID );
-
- end Task_Delete;
-
- procedure Task_Suspend (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Task_Suspend_Base (
- ID : RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Task_Suspend_Base, "rtems_task_suspend");
- begin
-
- Result := Task_Suspend_Base ( ID );
-
- end Task_Suspend;
-
- procedure Task_Resume (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Task_Resume_Base (
- ID : RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Task_Resume_Base, "rtems_task_resume");
- begin
-
- Result := Task_Resume_Base ( ID );
-
- end Task_Resume;
-
- procedure Task_Is_Suspended (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Task_Is_Suspended (
- ID : RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Task_Is_Suspended_Base, "rtems_task_is_suspended");
- begin
-
- Result := Task_Is_Suspended_Base ( ID );
-
- end Task_Is_Suspended;
-
-
- procedure Task_Set_Priority (
- ID : in RTEMS.ID;
- New_Priority : in RTEMS.Task_Priority;
- Old_Priority : out RTEMS.Task_Priority;
- Result : out RTEMS.Status_Codes
- ) is
- function Task_Set_Priority_Base (
- ID : RTEMS.ID;
- New_Priority : RTEMS.Task_Priority;
- Old_Priority : access RTEMS.Task_Priority
- ) return RTEMS.Status_Codes;
- pragma Import (C, Task_Set_Priority_Base, "rtems_task_set_priority");
- Old_Priority_Base : aliased RTEMS.Task_Priority := Old_Priority;
-
- begin
-
- Result := Task_Set_Priority_Base (
- ID,
- New_Priority,
- Old_Priority_Base'Unchecked_Access
- );
-
- Old_Priority := Old_Priority_Base;
-
- end Task_Set_Priority;
-
- procedure Task_Mode (
- Mode_Set : in RTEMS.Mode;
- Mask : in RTEMS.Mode;
- Previous_Mode_Set : out RTEMS.Mode;
- Result : out RTEMS.Status_Codes
- ) is
- function Task_Mode_Base (
- Mode_Set : RTEMS.Mode;
- Mask : RTEMS.Mode;
- Previous_Mode_Set : access RTEMS.Mode
- ) return RTEMS.Status_Codes;
- pragma Import (C, Task_Mode_Base, "rtems_task_mode");
- Previous_Mode_Set_Base : aliased RTEMS.Mode := Previous_Mode_Set;
- begin
-
- Result := Task_Mode_Base (
- Mode_Set,
- Mask,
- Previous_Mode_Set_Base'Unchecked_Access
- );
-
- Previous_Mode_Set := Previous_Mode_Set_Base;
-
- end Task_Mode;
-
- procedure Task_Get_Note (
- ID : in RTEMS.ID;
- Notepad : in RTEMS.Notepad_Index;
- Note : out RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
- ) is
- function Task_Get_Note_Base (
- ID : RTEMS.ID;
- Notepad : RTEMS.Notepad_Index;
- Note : access RTEMS.Unsigned32
- ) return RTEMS.Status_Codes;
- pragma Import (C, Task_Get_Note_Base, "rtems_task_get_note");
- Note_Base : aliased RTEMS.Unsigned32 := Note;
- begin
-
- Result := Task_Get_Note_Base (
- ID,
- Notepad,
- Note_Base'Unchecked_Access
- );
-
- Note := NOTE_Base;
-
- end Task_Get_Note;
-
- procedure Task_Set_Note (
- ID : in RTEMS.ID;
- Notepad : in RTEMS.Notepad_Index;
- Note : in RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
- ) is
- function Task_Set_Note_Base (
- ID : RTEMS.ID;
- Notepad : RTEMS.Notepad_Index;
- Note : RTEMS.Unsigned32
- ) return RTEMS.Status_Codes;
- pragma Import (C, Task_Set_Note_Base, "rtems_task_set_note");
- begin
-
- Result := Task_Set_Note_Base ( ID, Notepad, Note );
-
- end Task_Set_Note;
-
- procedure Task_Wake_When (
- Time_Buffer : in RTEMS.Time_Of_Day;
- Result : out RTEMS.Status_Codes
- ) is
- function Task_Wake_When_Base (
- Time_Buffer : RTEMS.Time_Of_Day
- ) return RTEMS.Status_Codes;
- pragma Import (C, Task_Wake_When_Base, "rtems_task_wake_when");
- begin
-
- Result := Task_Wake_When_Base ( Time_Buffer );
-
- end Task_Wake_When;
-
- procedure Task_Wake_After (
- Ticks : in RTEMS.Interval;
- Result : out RTEMS.Status_Codes
- ) is
- function Task_Wake_After_Base (
- Ticks : RTEMS.Interval
- ) return RTEMS.Status_Codes;
- pragma Import (C, Task_Wake_After_Base, "rtems_task_wake_after");
- begin
-
- Result := Task_Wake_After_Base ( Ticks );
-
- end Task_Wake_After;
-
- --
- -- Interrupt Manager
- --
-
- procedure Interrupt_Catch (
- New_ISR_Handler : in RTEMS.Address;
- Vector : in RTEMS.Vector_Number;
- Old_ISR_Handler : out RTEMS.Address;
- Result : out RTEMS.Status_Codes
- ) is
- function Interrupt_Catch_Base (
- New_ISR_Handler : RTEMS.Address;
- Vector : RTEMS.Vector_Number;
- Old_ISR_Handler : access RTEMS.Address
- ) return RTEMS.Status_Codes;
- pragma Import (C, Interrupt_Catch_Base, "rtems_interrupt_catch");
- Old_ISR_Handler_Base : aliased RTEMS.Address := Old_ISR_Handler;
- begin
-
- Result := Interrupt_Catch_Base (
- New_ISR_Handler,
- Vector,
- OLD_ISR_HANDLER_Base'Unchecked_Access
- );
-
- Old_ISR_Handler := OLD_ISR_HANDLER_Base;
-
- end Interrupt_Catch;
-
- -- XXX
- function Interrupt_Disable
- return RTEMS.ISR_Level is
- begin
- return 0;
- end Interrupt_Disable;
-
- procedure Interrupt_Enable (
- Level : in RTEMS.ISR_Level
- ) is
- begin
- Null;
- end Interrupt_Enable;
-
- procedure Interrupt_Flash (
- Level : in RTEMS.ISR_Level
- ) is
- begin
- Null;
- end Interrupt_Flash;
-
- function Interrupt_Is_In_Progress
- return RTEMS.Boolean is
- begin
- return RTEMS.From_Ada_Boolean (Standard.True);
- end Interrupt_Is_In_Progress;
-
- --
- -- Clock Manager
- --
-
- procedure Clock_Get (
- Option : in RTEMS.Clock_Get_Options;
- Time_Buffer : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
- ) is
- function Clock_Get_base (
- Option : RTEMS.Clock_Get_Options;
- Time_Buffer : RTEMS.Address
- ) return RTEMS.Status_Codes;
- pragma Import (C, Clock_Get_base, "rtems_clock_get");
- begin
-
- Result := Clock_Get_base ( Option, Time_Buffer );
-
- end Clock_Get;
-
- procedure Clock_Set (
- Time_Buffer : in RTEMS.Time_Of_Day;
- Result : out RTEMS.Status_Codes
- ) is
- function Clock_Set_base (
- Time_Buffer : RTEMS.Time_Of_Day
- ) return RTEMS.Status_Codes;
- pragma Import (C, Clock_Set_base, "rtems_clock_set");
- begin
-
- Result := Clock_Set_base ( Time_Buffer );
-
- end Clock_Set;
-
- procedure Clock_Tick (
- Result : out RTEMS.Status_Codes
- ) is
- function Clock_Tick_Base return RTEMS.Status_Codes;
- pragma Import (C, Clock_Tick_Base, "rtems_clock_tick");
- begin
-
- Result := Clock_Tick_Base;
-
- end Clock_Tick;
-
- --
- -- Extension Manager
- --
-
- procedure Extension_Create (
- Name : in RTEMS.Name;
- Table : in RTEMS.Extensions_Table_Pointer;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Extension_Create_Base (
- Name : RTEMS.Name;
- Table : RTEMS.Extensions_Table_Pointer;
- ID : access RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Extension_Create_Base, "rtems_extension_create");
- ID_Base : aliased RTEMS.ID := ID;
- begin
-
- Result := Extension_Create_Base (
- Name,
- Table,
- ID_Base'Unchecked_Access
- );
-
- ID := ID_Base;
-
- end Extension_Create;
-
- procedure Extension_Ident (
- Name : in RTEMS.Name;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Extension_Ident_Base (
- Name : RTEMS.Name;
- ID : access RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Extension_Ident_Base, "rtems_extension_ident");
- ID_Base : aliased RTEMS.ID := ID;
- begin
-
- Result := Extension_Ident_Base (
- Name,
- ID_Base'Unchecked_Access
- );
-
- ID := ID_Base;
-
- end Extension_Ident;
-
- procedure Extension_Delete (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Extension_Delete_Base (
- ID : RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Extension_Delete_Base, "rtems_extension_delete");
- begin
-
- Result := Extension_Delete_Base ( ID );
-
- end Extension_Delete;
-
- --
- -- Timer Manager
- --
-
- procedure Timer_Create (
- Name : in RTEMS.Name;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Timer_Create_Base (
- Name : RTEMS.Name;
- ID : access RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Timer_Create_Base, "rtems_timer_create");
- ID_Base : aliased RTEMS.ID := ID;
- begin
-
- Result := Timer_Create_Base (
- Name,
- ID_Base'Unchecked_Access
- );
-
- ID := ID_Base;
-
- end Timer_Create;
-
- procedure Timer_Ident (
- Name : in RTEMS.Name;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Timer_Ident_Base (
- Name : RTEMS.Name;
- ID : access RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Timer_Ident_Base, "rtems_timer_ident");
- ID_Base : aliased RTEMS.ID := ID;
- begin
-
- Result := Timer_Ident_Base (
- Name,
- ID_Base'Unchecked_Access
- );
-
- ID := ID_Base;
-
- end Timer_Ident;
-
- procedure Timer_Delete (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Timer_Delete_Base (
- ID : RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Timer_Delete_Base, "rtems_timer_delete");
- begin
-
- Result := Timer_Delete_Base ( ID );
-
- end Timer_Delete;
-
- procedure Timer_Fire_After (
- ID : in RTEMS.ID;
- Ticks : in RTEMS.Interval;
- Routine : in RTEMS.Timer_Service_Routine;
- User_Data : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
- ) is
- function Timer_Fire_After_Base (
- ID : RTEMS.ID;
- Ticks : RTEMS.Interval;
- Routine : RTEMS.Timer_Service_Routine;
- User_Data : RTEMS.Address
- ) return RTEMS.Status_Codes;
- pragma Import (C, Timer_Fire_After_Base, "rtems_timer_fire_after");
- begin
-
- Result := Timer_Fire_After_Base (
- ID,
- Ticks,
- Routine,
- User_Data
- );
-
- end Timer_Fire_After;
-
- procedure Timer_Fire_When (
- ID : in RTEMS.ID;
- Wall_Time : in RTEMS.Time_Of_Day;
- Routine : in RTEMS.Timer_Service_Routine;
- User_Data : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
- ) is
- function Timer_Fire_When (
- ID : RTEMS.ID;
- Wall_Time : in RTEMS.Time_Of_Day;
- Routine : RTEMS.Timer_Service_Routine;
- User_Data : RTEMS.Address
- ) return RTEMS.Status_Codes;
- pragma Import (C, Timer_Fire_When, "rtems_timer_fire_when");
- begin
-
- Result := Timer_Fire_When (
- ID,
- Wall_Time,
- Routine,
- User_Data
- );
-
- end Timer_Fire_When;
-
- procedure Timer_Reset (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Timer_Reset_Base (
- ID : RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Timer_Reset_Base, "rtems_timer_reset");
- begin
-
- Result := Timer_Reset_Base ( ID );
-
- end Timer_Reset;
-
- procedure Timer_Cancel (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Timer_Cancel_Base (
- ID : RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Timer_Cancel_Base, "rtems_timer_cancel");
- begin
-
- Result := Timer_Cancel_Base ( ID );
-
- end Timer_Cancel;
-
- --
- -- Semaphore Manager
- --
-
- procedure Semaphore_Create (
- Name : in RTEMS.Name;
- Count : in RTEMS.Unsigned32;
- Attribute_Set : in RTEMS.Attribute;
- Priority_Ceiling : in RTEMS.Task_Priority;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Semaphore_Create_Base (
- Name : RTEMS.Name;
- Count : RTEMS.Unsigned32;
- Attribute_Set : RTEMS.Attribute;
- Priority_Ceiling : RTEMS.Task_Priority;
- ID : access RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Semaphore_Create_Base, "rtems_semaphore_create");
- ID_Base : aliased RTEMS.ID := ID;
- begin
-
- Result := Semaphore_Create_Base (
- Name,
- Count,
- Attribute_Set,
- Priority_Ceiling,
- ID_Base'Unchecked_Access
- );
-
- ID := ID_Base;
-
- end Semaphore_Create;
-
- procedure Semaphore_Delete (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Semaphore_Delete_Base (
- ID : RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Semaphore_Delete_Base, "rtems_semaphore_delete");
- begin
-
- Result := Semaphore_Delete_Base ( ID );
-
- end Semaphore_Delete;
-
- procedure Semaphore_Ident (
- Name : in RTEMS.Name;
- Node : in RTEMS.Unsigned32;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Semaphore_Ident_Base (
- Name : RTEMS.Name;
- Node : RTEMS.Unsigned32;
- ID : access RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Semaphore_Ident_Base, "rtems_semaphore_ident");
- ID_Base : aliased RTEMS.ID := ID;
- begin
-
- Result := Semaphore_Ident_Base (
- Name,
- Node,
- ID_Base'Unchecked_Access
- );
-
- ID := ID_Base;
-
- end Semaphore_Ident;
-
- procedure Semaphore_Obtain (
- ID : in RTEMS.ID;
- Option_Set : in RTEMS.Option;
- Timeout : in RTEMS.Interval;
- Result : out RTEMS.Status_Codes
- ) is
- function Semaphore_Obtain_Base (
- ID : RTEMS.ID;
- Option_Set : RTEMS.Option;
- Timeout : RTEMS.Interval
- ) return RTEMS.Status_Codes;
- pragma Import (C, Semaphore_Obtain_Base, "rtems_semaphore_obtain");
- begin
-
- Result := Semaphore_Obtain_Base ( ID, Option_Set, Timeout );
-
- end Semaphore_Obtain;
-
- procedure Semaphore_Release (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Semaphore_Release_Base (
- ID : RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Semaphore_Release_Base, "rtems_semaphore_release");
- begin
-
- Result := Semaphore_Release_Base ( ID );
-
- end Semaphore_Release;
-
- procedure Semaphore_Flush (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Semaphore_Flush_Base (
- ID : RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Semaphore_Flush_Base, "rtems_semaphore_flush");
- begin
-
- Result := Semaphore_Flush_Base ( ID );
-
- end Semaphore_Release;
-
- --
- -- Message Queue Manager
- --
-
- procedure Message_Queue_Create (
- Name : in RTEMS.Name;
- Count : in RTEMS.Unsigned32;
- Max_Message_Size : in RTEMS.Unsigned32;
- Attribute_Set : in RTEMS.Attribute;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- -- XXX broken
- function Message_Queue_Create_Base (
- Name : RTEMS.Name;
- Count : RTEMS.Unsigned32;
- Max_Message_Size : RTEMS.Unsigned32;
- Attribute_Set : RTEMS.Attribute;
- ID : access RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C,
- Message_Queue_Create_Base, "rtems_message_queue_create");
- ID_Base : aliased RTEMS.ID := ID;
- begin
-
- Result := Message_Queue_Create_Base (
- Name,
- Count,
- Max_Message_Size,
- Attribute_Set,
- ID_Base'Unchecked_Access
- );
-
- ID := ID_Base;
-
- end Message_Queue_Create;
-
- procedure Message_Queue_Ident (
- Name : in RTEMS.Name;
- Node : in RTEMS.Unsigned32;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Message_Queue_Ident_Base (
- Name : RTEMS.Name;
- Node : RTEMS.Unsigned32;
- ID : access RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Message_Queue_Ident_Base, "rtems_message_queue_ident");
- ID_Base : aliased RTEMS.ID := ID;
- begin
-
- Result := Message_Queue_Ident_Base (
- Name,
- Node,
- ID_Base'Unchecked_Access
- );
-
- ID := ID_Base;
-
- end Message_Queue_Ident;
-
- procedure Message_Queue_Delete (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Message_Queue_Delete_Base (
- ID : RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Message_Queue_Delete_Base,
- "rtems_message_queue_delete");
- begin
-
- Result := Message_Queue_Delete_Base ( ID );
-
- end Message_Queue_Delete;
-
- procedure Message_Queue_Send (
- ID : in RTEMS.ID;
- Buffer : in RTEMS.Address;
- Size : in RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
- ) is
- function Message_Queue_Send_Base (
- ID : RTEMS.ID;
- Buffer : RTEMS.Address;
- Size : RTEMS.Unsigned32
- ) return RTEMS.Status_Codes;
- pragma Import (C, Message_Queue_Send_Base, "rtems_message_queue_send");
- begin
-
- Result := Message_Queue_Send_Base ( ID, Buffer, Size );
-
- end Message_Queue_Send;
-
- procedure Message_Queue_Urgent (
- ID : in RTEMS.ID;
- Buffer : in RTEMS.Address;
- Size : in RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
- ) is
- function Message_Queue_Urgent_Base (
- ID : RTEMS.ID;
- Buffer : RTEMS.Address;
- Size : RTEMS.Unsigned32
- ) return RTEMS.Status_Codes;
- pragma Import (C, Message_Queue_Urgent_Base,
- "rtems_message_queue_urgent");
- begin
-
- Result := Message_Queue_Urgent_Base ( ID, Buffer, Size );
-
- end Message_Queue_Urgent;
-
- procedure Message_Queue_Broadcast (
- ID : in RTEMS.ID;
- Buffer : in RTEMS.Address;
- Size : in RTEMS.Unsigned32;
- Count : out RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
- ) is
- function Message_Queue_Broadcast_Base (
- ID : RTEMS.ID;
- Buffer : RTEMS.Address;
- Size : RTEMS.Unsigned32;
- Count : access RTEMS.Unsigned32
- ) return RTEMS.Status_Codes;
- pragma Import (C, Message_Queue_Broadcast_Base,
- "rtems_message_queue_broadcast");
- Count_Base : aliased RTEMS.Unsigned32 := Count;
- begin
-
- Result := Message_Queue_Broadcast_Base (
- ID,
- Buffer,
- Size,
- Count_Base'Unchecked_Access
- );
-
- Count := Count_Base;
-
- end Message_Queue_Broadcast;
-
- procedure Message_Queue_Receive (
- ID : in RTEMS.ID;
- Buffer : in RTEMS.Address;
- Option_Set : in RTEMS.Option;
- Timeout : in RTEMS.Interval;
- Size : out RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
- ) is
- function Message_Queue_Receive_Base (
- ID : RTEMS.ID;
- Buffer : RTEMS.Address;
- Size : access RTEMS.Unsigned32;
- Option_Set : RTEMS.Option;
- Timeout : RTEMS.Interval
- ) return RTEMS.Status_Codes;
- pragma Import (C, Message_Queue_Receive_Base,
- "rtems_message_queue_receive");
- Size_Base : aliased RTEMS.Unsigned32;
- begin
-
- Result := Message_Queue_Receive_Base (
- ID,
- Buffer,
- Size_Base'Unchecked_Access,
- Option_Set,
- Timeout
- );
-
- Size := Size_Base;
-
- end Message_Queue_Receive;
-
- procedure Message_Queue_Flush (
- ID : in RTEMS.ID;
- Count : out RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
- ) is
- function Message_Queue_Flush_Base (
- ID : RTEMS.ID;
- Count : access RTEMS.Unsigned32
- ) return RTEMS.Status_Codes;
- pragma Import (C, Message_Queue_Flush_Base, "rtems_message_queue_flush");
- COUNT_Base : aliased RTEMS.Unsigned32 := Count;
- begin
-
- Result := Message_Queue_Flush_Base (
- ID,
- COUNT_Base'Unchecked_Access
- );
-
- Count := COUNT_Base;
-
- end Message_Queue_Flush;
-
-
- --
- -- Event Manager
- --
-
- procedure Event_Send (
- ID : in RTEMS.ID;
- Event_In : in RTEMS.Event_Set;
- Result : out RTEMS.Status_Codes
- ) is
- function Event_Send_Base (
- ID : RTEMS.ID;
- Event_In : RTEMS.Event_Set
- ) return RTEMS.Status_Codes;
- pragma Import (C, Event_Send_Base, "rtems_event_send");
- begin
-
- Result := Event_Send_Base (
- ID,
- Event_In
- );
-
- end Event_Send;
-
- procedure Event_Receive (
- Event_In : in RTEMS.Event_Set;
- Option_Set : in RTEMS.Option;
- Ticks : in RTEMS.Interval;
- Event_Out : out RTEMS.Event_Set;
- Result : out RTEMS.Status_Codes
- ) is
- function Event_Receive_Base (
- Event_In : RTEMS.Event_Set;
- Option_Set : RTEMS.Option;
- Ticks : RTEMS.Interval;
- Event_Out : access RTEMS.Event_Set
- ) return RTEMS.Status_Codes;
- pragma Import (C, Event_Receive_Base, "rtems_event_receive");
- Event_Out_Base : aliased RTEMS.Event_Set; -- := Event_Out;
- begin
-
- Result := Event_Receive_Base (
- Event_In,
- Option_Set,
- Ticks,
- Event_Out_Base'Access
- );
-
- Event_Out := Event_Out_Base;
-
- end Event_Receive;
-
- --
- -- Signal Manager
- --
-
- procedure Signal_Catch (
- ASR_Handler : in RTEMS.ASR_Handler;
- Mode_Set : in RTEMS.Mode;
- Result : out RTEMS.Status_Codes
- ) is
- function Signal_Catch_Base (
- ASR_Handler : RTEMS.ASR_Handler;
- Mode_Set : RTEMS.Mode
- ) return RTEMS.Status_Codes;
- pragma Import (C, Signal_Catch_Base, "rtems_signal_catch");
- begin
-
- Result := Signal_Catch_Base ( ASR_Handler, Mode_Set );
-
- end Signal_Catch;
-
- procedure Signal_Send (
- ID : in RTEMS.ID;
- Signal_Set : in RTEMS.Signal_Set;
- Result : out RTEMS.Status_Codes
- ) is
- function Signal_Send_Base (
- ID : RTEMS.ID;
- Signal_Set : RTEMS.Signal_Set
- ) return RTEMS.Status_Codes;
- pragma Import (C, Signal_Send_Base, "rtems_signal_send");
- begin
-
- Result := Signal_Send_Base ( ID, Signal_Set );
-
- end Signal_Send;
-
-
- --
- -- Partition Manager
- --
-
- procedure Partition_Create (
- Name : in RTEMS.Name;
- Starting_Address : in RTEMS.Address;
- Length : in RTEMS.Unsigned32;
- Buffer_Size : in RTEMS.Unsigned32;
- Attribute_Set : in RTEMS.Attribute;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Partition_Create_Base (
- Name : RTEMS.Name;
- Starting_Address : RTEMS.Address;
- Length : RTEMS.Unsigned32;
- Buffer_Size : RTEMS.Unsigned32;
- Attribute_Set : RTEMS.Attribute;
- ID : access RTEMS.Event_Set
- ) return RTEMS.Status_Codes;
- pragma Import (C, Partition_Create_Base, "rtems_partition_create");
- ID_Base : aliased RTEMS.ID := ID;
- begin
-
- Result := Partition_Create_Base (
- Name,
- Starting_Address,
- Length,
- Buffer_Size,
- Attribute_Set,
- ID_Base'Unchecked_Access
- );
-
- ID := ID_Base;
-
- end Partition_Create;
-
- procedure Partition_Ident (
- Name : in RTEMS.Name;
- Node : in RTEMS.Unsigned32;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Partition_Ident_Base (
- Name : RTEMS.Name;
- Node : RTEMS.Unsigned32;
- ID : access RTEMS.Event_Set
- ) return RTEMS.Status_Codes;
- pragma Import (C, Partition_Ident_Base, "rtems_partition_ident");
- ID_Base : aliased RTEMS.ID := ID;
- begin
-
- Result := Partition_Ident_Base (
- Name,
- Node,
- ID_Base'Unchecked_Access
- );
-
- ID := ID_Base;
-
- end Partition_Ident;
-
- procedure Partition_Delete (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Partition_Delete_Base (
- ID : RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Partition_Delete_Base, "rtems_partition_delete");
- begin
-
- Result := Partition_Delete_Base ( ID );
-
- end Partition_Delete;
-
- procedure Partition_Get_Buffer (
- ID : in RTEMS.ID;
- Buffer : out RTEMS.Address;
- Result : out RTEMS.Status_Codes
- ) is
- function Partition_Get_Buffer_Base (
- ID : RTEMS.ID;
- Buffer : access RTEMS.Address
- ) return RTEMS.Status_Codes;
- pragma Import (C, Partition_Get_Buffer_Base,
- "rtems_partition_get_buffer");
- Buffer_Base : aliased RTEMS.Address := Buffer;
- begin
-
- Result := Partition_Get_Buffer_Base (
- ID,
- Buffer_Base'Unchecked_Access
- );
-
- Buffer := Buffer_Base;
-
- end Partition_Get_Buffer;
-
- procedure Partition_Return_Buffer (
- ID : in RTEMS.ID;
- Buffer : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
- ) is
- function Partition_Return_Buffer_Base (
- ID : RTEMS.Name;
- Buffer : RTEMS.Address
- ) return RTEMS.Status_Codes;
- pragma Import (C, Partition_Return_Buffer_Base,
- "rtems_partition_return_buffer");
- begin
-
- Result := Partition_Return_Buffer_Base ( ID, Buffer );
-
- end Partition_Return_Buffer;
-
- --
- -- Region Manager
- --
-
- procedure Region_Create (
- Name : in RTEMS.Name;
- Starting_Address : in RTEMS.Address;
- Length : in RTEMS.Unsigned32;
- Page_Size : in RTEMS.Unsigned32;
- Attribute_Set : in RTEMS.Attribute;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Region_Create_Base (
- Name : RTEMS.Name;
- Starting_Address : RTEMS.Address;
- Length : RTEMS.Unsigned32;
- Page_Size : RTEMS.Unsigned32;
- Attribute_Set : RTEMS.Attribute;
- ID : access RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Region_Create_Base, "rtems_region_create");
- ID_Base : aliased RTEMS.ID := ID;
-
- begin
-
- Result := Region_Create_Base (
- Name,
- Starting_Address,
- Length,
- Page_Size,
- Attribute_Set,
- ID_Base'Unchecked_Access
- );
-
- ID := ID_Base;
-
- end Region_Create;
-
- procedure Region_Ident (
- Name : in RTEMS.Name;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Region_Ident_Base (
- Name : RTEMS.Name;
- ID : access RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Region_Ident_Base, "rtems_region_ident");
- ID_Base : aliased RTEMS.ID := ID;
- begin
-
- Result := Region_Ident_Base (
- Name,
- ID_Base'Unchecked_Access
- );
-
- ID := ID_Base;
-
- end Region_Ident;
-
- procedure Region_Delete (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Region_Delete_Base (
- ID : RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Region_Delete_Base, "rtems_region_delete");
- begin
-
- Result := Region_Delete_Base ( ID );
-
- end Region_Delete;
-
- procedure Region_Extend (
- ID : in RTEMS.ID;
- Starting_Address : in RTEMS.Address;
- Length : in RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
- ) is
- function Region_Extend_Base (
- ID : RTEMS.ID;
- Starting_Address : RTEMS.Address;
- Length : RTEMS.Unsigned32
- ) return RTEMS.Status_Codes;
- pragma Import (C, Region_Extend_Base, "rtems_region_extend");
- begin
-
- Result := Region_Extend_Base ( ID, Starting_Address, Length );
-
- end Region_Extend;
-
- procedure Region_Get_Segment (
- ID : in RTEMS.ID;
- Size : in RTEMS.Unsigned32;
- Option_Set : in RTEMS.Option;
- Timeout : in RTEMS.Interval;
- Segment : out RTEMS.Address;
- Result : out RTEMS.Status_Codes
- ) is
- function Region_Get_Segment_Base (
- ID : RTEMS.ID;
- Size : RTEMS.Unsigned32;
- Option_Set : RTEMS.Option;
- Timeout : RTEMS.Interval;
- Segment : access RTEMS.Address
- ) return RTEMS.Status_Codes;
- pragma Import (C, Region_Get_Segment_Base, "rtems_region_get_segment");
- Segment_Base : aliased RTEMS.Address := Segment;
- begin
-
- Result := Region_Get_Segment_Base (
- ID,
- Size,
- Option_Set,
- Timeout,
- Segment_Base'Unchecked_Access
- );
-
- Segment := SEGMENT_Base;
-
- end Region_Get_Segment;
-
- procedure Region_Get_Segment_Size (
- ID : in RTEMS.ID;
- Segment : in RTEMS.Address;
- Size : out RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
- ) is
- function Region_Get_Segment_Size_Base (
- ID : RTEMS.ID;
- Segment : RTEMS.Address;
- Size : access RTEMS.Unsigned32
- ) return RTEMS.Status_Codes;
- pragma Import (C, Region_Get_Segment_Size_Base,
- "rtems_region_get_segment_size");
- Size_Base : aliased RTEMS.Unsigned32 := Size;
- begin
-
- Result := Region_Get_Segment_Size_Base (
- ID,
- Segment,
- Size_Base'Unchecked_Access
- );
-
- Size := SIZE_Base;
-
- end Region_Get_Segment_Size;
-
- procedure Region_Return_Segment (
- ID : in RTEMS.ID;
- Segment : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
- ) is
- function Region_Return_Segment_Base (
- ID : RTEMS.ID;
- Segment : RTEMS.Address
- ) return RTEMS.Status_Codes;
- pragma Import (C, Region_Return_Segment_Base,
- "rtems_region_return_segment");
- begin
-
- Result := Region_Return_Segment_Base ( ID, Segment );
-
- end Region_Return_Segment;
-
-
- --
- -- Dual Ported Memory Manager
- --
-
- procedure Port_Create (
- Name : in RTEMS.Name;
- Internal_Start : in RTEMS.Address;
- External_Start : in RTEMS.Address;
- Length : in RTEMS.Unsigned32;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Port_Create_Base (
- Name : RTEMS.Name;
- Internal_Start : RTEMS.Address;
- External_Start : RTEMS.Address;
- Length : RTEMS.Unsigned32;
- ID : access RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Port_Create_Base, "rtems_port_create");
- ID_Base : aliased RTEMS.ID := ID;
-
- begin
-
- Result := Port_Create_Base (
- Name,
- Internal_Start,
- External_Start,
- Length,
- ID_Base'Unchecked_Access
- );
-
- ID := ID_Base;
-
- end Port_Create;
-
- procedure Port_Ident (
- Name : in RTEMS.Name;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Port_Ident_Base (
- Name : RTEMS.Name;
- ID : access RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Port_Ident_Base, "rtems_port_ident");
- ID_Base : aliased RTEMS.ID := ID;
- begin
-
- Result := Port_Ident_Base (
- Name,
- ID_Base'Unchecked_Access
- );
-
- ID := ID_Base;
-
- end Port_Ident;
-
- procedure Port_Delete (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Port_Delete_Base (
- ID : RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Port_Delete_Base, "rtems_port_delete");
- begin
-
- Result := Port_Delete_Base ( ID );
-
- end Port_Delete;
-
- procedure Port_External_To_Internal (
- ID : in RTEMS.ID;
- External : in RTEMS.Address;
- Internal : out RTEMS.Address;
- Result : out RTEMS.Status_Codes
- ) is
- function Port_External_To_Internal_Base (
- ID : RTEMS.ID;
- External : RTEMS.Address;
- Internal : access RTEMS.Address
- ) return RTEMS.Status_Codes;
- pragma Import (C, Port_External_To_Internal_Base,
- "rtems_port_external_to_internal");
- Internal_Base : aliased RTEMS.Address := Internal;
- begin
-
- Result := Port_External_To_Internal_Base (
- ID,
- External,
- Internal_Base'Unchecked_Access
- );
-
- Internal := INTERNAL_Base;
-
- end Port_External_To_Internal;
-
- procedure Port_Internal_To_External (
- ID : in RTEMS.ID;
- Internal : in RTEMS.Address;
- External : out RTEMS.Address;
- Result : out RTEMS.Status_Codes
- ) is
- function Port_Internal_To_External_Base (
- ID : RTEMS.ID;
- Internal : RTEMS.Address;
- External : access RTEMS.Address
- ) return RTEMS.Status_Codes;
- pragma Import (C, Port_Internal_To_External_Base,
- "rtems_port_internal_to_external");
- External_Base : aliased RTEMS.Address := External;
- begin
-
- Result := Port_Internal_To_External_Base (
- ID,
- Internal,
- External_Base'Unchecked_Access
- );
-
- External := EXTERNAL_Base;
-
- end Port_Internal_To_External;
-
- --
- -- Input/Output Manager
- --
-
- procedure IO_Initialize (
- Major : in RTEMS.Device_Major_Number;
- Minor : in RTEMS.Device_Minor_Number;
- Argument : in RTEMS.Address;
- Return_Value : out RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
- ) is
- function IO_Initialize_Base (
- Major : RTEMS.Device_Major_Number;
- Minor : RTEMS.Device_Minor_Number;
- Argument : RTEMS.Address;
- Return_Value : access RTEMS.Unsigned32
- ) return RTEMS.Status_Codes;
- pragma Import (C, IO_Initialize_Base, "rtems_io_initialize");
- Return_Value_Base : aliased RTEMS.Unsigned32 := Return_Value;
- begin
-
- Result := IO_Initialize_Base (
- Major,
- Minor,
- Argument,
- Return_Value_Base'Unchecked_Access
- );
-
- Return_Value := Return_Value_Base;
-
- end IO_Initialize;
-
- procedure IO_Register_Name (
- Name : in String;
- Major : in RTEMS.Device_Major_Number;
- Minor : in RTEMS.Device_Minor_Number;
- Result : out RTEMS.Status_Codes
- ) is
- function IO_Register_Name_Base (
- Name : Interfaces.C.Char_Array;
- Major : RTEMS.Device_Major_Number;
- Minor : RTEMS.Device_Minor_Number
- ) return RTEMS.Status_Codes;
- pragma Import (C, IO_Register_Name_Base, "rtems_io_register_name");
- begin
-
- Result := IO_Register_Name_Base (
- Interfaces.C.To_C (Name),
- Major,
- Minor
- );
-
- end IO_Register_Name;
-
- procedure IO_Lookup_Name (
- Name : in String;
- Device_Info : out RTEMS.Driver_Name_t;
- Result : out RTEMS.Status_Codes
- ) is
- function IO_Lookup_Name_Base (
- Name : Interfaces.C.Char_Array;
- Device_Info : access RTEMS.Driver_Name_t
- ) return RTEMS.Status_Codes;
- pragma Import (C, IO_Lookup_Name_Base, "rtems_io_lookup_name");
-
- Device_Info_Base : aliased RTEMS.Driver_Name_t;
- begin
-
- Result := IO_Lookup_Name_Base (
- Interfaces.C.To_C (Name),
- Device_Info_Base'Unchecked_Access
- );
-
- Device_Info := Device_Info_Base;
-
- end IO_Lookup_Name;
-
- procedure IO_Open (
- Major : in RTEMS.Device_Major_Number;
- Minor : in RTEMS.Device_Minor_Number;
- Argument : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
- ) is
- function IO_Open_Base (
- Major : RTEMS.Device_Major_Number;
- Minor : RTEMS.Device_Minor_Number;
- Argument : RTEMS.Address
- ) return RTEMS.Status_Codes;
- pragma Import (C, IO_Open_Base, "rtems_io_open");
- begin
-
- Result := IO_Open_Base (Major, Minor, Argument);
-
- end IO_Open;
-
- procedure IO_Close (
- Major : in RTEMS.Device_Major_Number;
- Minor : in RTEMS.Device_Minor_Number;
- Argument : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
- ) is
- function IO_Close_Base (
- Major : RTEMS.Device_Major_Number;
- Minor : RTEMS.Device_Minor_Number;
- Argument : RTEMS.Address
- ) return RTEMS.Status_Codes;
- pragma Import (C, IO_Close_Base, "rtems_io_close");
- begin
-
- Result := IO_Close_Base (Major, Minor, Argument);
-
- end IO_Close;
-
- procedure IO_Read (
- Major : in RTEMS.Device_Major_Number;
- Minor : in RTEMS.Device_Minor_Number;
- Argument : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
- ) is
- function IO_Read_Base (
- Major : RTEMS.Device_Major_Number;
- Minor : RTEMS.Device_Minor_Number;
- Argument : RTEMS.Address
- ) return RTEMS.Status_Codes;
- pragma Import (C, IO_Read_Base, "rtems_io_read");
- begin
-
- Result := IO_Read_Base (Major, Minor, Argument);
-
- end IO_Read;
-
- procedure IO_Write (
- Major : in RTEMS.Device_Major_Number;
- Minor : in RTEMS.Device_Minor_Number;
- Argument : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
- ) is
- function IO_Write_Base (
- Major : RTEMS.Device_Major_Number;
- Minor : RTEMS.Device_Minor_Number;
- Argument : RTEMS.Address
- ) return RTEMS.Status_Codes;
- pragma Import (C, IO_Write_Base, "rtems_io_write");
- begin
-
- Result := IO_Write_Base (Major, Minor, Argument);
-
- end IO_Write;
-
- procedure IO_Control (
- Major : in RTEMS.Device_Major_Number;
- Minor : in RTEMS.Device_Minor_Number;
- Argument : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
- ) is
- function IO_Control_Base (
- Major : RTEMS.Device_Major_Number;
- Minor : RTEMS.Device_Minor_Number;
- Argument : RTEMS.Address
- ) return RTEMS.Status_Codes;
- pragma Import (C, IO_Control_Base, "rtems_io_control");
- begin
-
- Result := IO_Control_Base (Major, Minor, Argument);
-
- end IO_Control;
-
-
- --
- -- Fatal Error Manager
- --
-
- procedure Fatal_Error_Occurred (
- The_Error : in RTEMS.Unsigned32
- ) is
- procedure Fatal_Error_Occurred_base (
- The_Error : RTEMS.Unsigned32
- );
- pragma Import (C, Fatal_Error_Occurred_Base, "rtems_fatal_error_occurred");
- begin
-
- Fatal_Error_Occurred_Base ( The_Error );
-
- end Fatal_Error_Occurred;
- --
- -- Rate Monotonic Manager
- --
-
- procedure Rate_Monotonic_Create (
- Name : in RTEMS.Name;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Rate_Monotonic_Create_base (
- Name : RTEMS.Name;
- ID : access RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Rate_Monotonic_Create_base, "rtems_rate_monotonic_create");
- ID_Base : aliased RTEMS.ID := ID;
- begin
-
- Result := Rate_Monotonic_Create_base (
- Name,
- ID_Base'Unchecked_Access
- );
-
- ID := ID_Base;
-
- end Rate_Monotonic_Create;
-
- procedure Rate_Monotonic_Ident (
- Name : in RTEMS.Name;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Rate_Monotonic_Ident_Base (
- Name : RTEMS.Name;
- ID : access RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Rate_Monotonic_Ident_Base, "rtems_rate_monotonic_ident");
- ID_Base : aliased RTEMS.ID := ID;
- begin
-
- Result := Rate_Monotonic_Ident_Base (
- Name,
- ID_Base'Unchecked_Access
- );
-
- ID := ID_Base;
-
- end Rate_Monotonic_Ident;
-
- procedure Rate_Monotonic_Delete (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Rate_Monotonic_Delete_Base (
- ID : RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Rate_Monotonic_Delete_Base,
- "rtems_rate_monotonic_delete");
- begin
-
- Result := Rate_Monotonic_Delete_base ( ID );
-
- end Rate_Monotonic_Delete;
-
- procedure Rate_Monotonic_Cancel (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Rate_Monotonic_Cancel_Base (
- ID : RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Rate_Monotonic_Cancel_Base,
- "rtems_rate_monotonic_cancel");
- begin
-
- Result := Rate_Monotonic_Cancel_Base ( ID );
-
- end Rate_Monotonic_Cancel;
-
- procedure Rate_Monotonic_Period (
- ID : in RTEMS.ID;
- Length : in RTEMS.Interval;
- Result : out RTEMS.Status_Codes
- ) is
- function Rate_Monotonic_Period_Base (
- ID : RTEMS.ID;
- Length : RTEMS.Interval
- ) return RTEMS.Status_Codes;
- pragma Import (C, Rate_Monotonic_Period_Base,
- "rtems_rate_monotonic_period");
- begin
-
- Result := Rate_Monotonic_Period_base ( ID, Length );
-
- end Rate_Monotonic_Period;
-
-
- procedure Rate_Monotonic_Get_Status (
- ID : in RTEMS.ID;
- Status : out RTEMS.Rate_Monotonic_Period_Status;
- Result : out RTEMS.Status_Codes
- ) is
- function Rate_Monotonic_Get_Status_Base (
- ID : RTEMS.ID;
- Status : access RTEMS.Rate_Monotonic_Period_Status
- ) return RTEMS.Status_Codes;
- pragma Import (C, Rate_Monotonic_Get_Status_Base,
- "rtems_rate_monotonic_get_status");
-
- Status_Base : aliased RTEMS.Rate_Monotonic_Period_Status;
- begin
-
- Result := Rate_Monotonic_Get_Status_Base (
- ID,
- Status_Base'Unchecked_Access
- );
-
- Status := Status_Base;
-
-
- end Rate_Monotonic_Get_Status;
-
- --
- -- Multiprocessing Manager
- --
-
- procedure Multiprocessing_Announce is
- procedure Multiprocessing_Announce_Base;
- pragma Import (C, Multiprocessing_Announce_Base,
- "rtems_multiprocessing_announce");
- begin
-
- Multiprocessing_Announce_Base;
-
- end Multiprocessing_Announce;
-
-
- --
- -- Debug Manager
- --
-
- procedure Debug_Enable (
- To_Be_Enabled : in RTEMS.Debug_Set
- ) is
- procedure Debug_Enable_Base (
- To_Be_Enabled : RTEMS.Debug_Set
- );
- pragma Import (C, Debug_Enable_Base, "rtems_debug_enable");
- begin
-
- Debug_Enable_Base ( To_Be_Enabled );
-
- end Debug_Enable;
-
- procedure Debug_Disable (
- To_Be_Disabled : in RTEMS.Debug_Set
- ) is
- procedure Debug_Disable_Base (
- To_Be_Disabled : RTEMS.Debug_Set
- );
- pragma Import (C, Debug_Disable_Base, "rtems_debug_disable");
- begin
-
- Debug_Disable_Base ( To_Be_Disabled );
-
- end Debug_Disable;
-
- function Debug_Is_Enabled (
- Level : in RTEMS.Debug_Set
- ) return RTEMS.Boolean is
- function Debug_Is_Enabled_Base (
- Level : RTEMS.Debug_Set
- ) return RTEMS.Boolean;
- pragma Import (C, Debug_Is_Enabled_Base, "_Debug_Is_enabled");
- begin
-
- return Debug_Is_Enabled_Base ( Level );
-
- end Debug_Is_Enabled;
-
- -- HACK
- -- function Configuration
- -- return RTEMS.Configuration_Table_Pointer is
- -- Configuration_base : RTEMS.Configuration_Table_Pointer;
- -- pragma Import (C, Configuration_base, "_Configuration_Table");
- -- begin
- -- return Configuration_Base;
- -- end Configuration;
-
-end RTEMS;
-
diff --git a/c/src/ada/rtems.ads b/c/src/ada/rtems.ads
deleted file mode 100644
index 08d8f2a894..0000000000
--- a/c/src/ada/rtems.ads
+++ /dev/null
@@ -1,1439 +0,0 @@
---
--- RTEMS / Specification
---
--- DESCRIPTION:
---
--- This package provides the interface to the RTEMS API.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1997.
--- On-Line Applications Research Corporation (OAR).
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with System;
-with System.Storage_Elements; use System.Storage_Elements;
-with Interfaces;
-with Interfaces.C;
-
-package RTEMS is
-
- Structure_Alignment : constant := 8;
-
- --
- -- RTEMS Base Types
- --
-
- subtype Unsigned8 is Interfaces.Unsigned_8;
- subtype Unsigned16 is Interfaces.Unsigned_16;
- subtype Unsigned32 is Interfaces.Unsigned_32;
-
- type Unsigned32_Pointer is access all RTEMS.Unsigned32;
- type Unsigned16_Pointer is access all RTEMS.Unsigned16;
- type Unsigned8_Pointer is access all RTEMS.Unsigned8;
-
- subtype Boolean is RTEMS.Unsigned32;
- subtype Address is System.Address;
- subtype Single is Interfaces.C.C_float;
- subtype Double is Interfaces.C.Double;
-
- --
- -- The following define the size of each of the base types in
- -- both bits and system units.
- --
-
- Unsigned8_Bits : constant := 7;
- Unsigned16_Bits : constant := 15;
- Unsigned32_Bits : constant := 31;
- Boolean_Bits : constant := 31;
- Address_Bits : constant := 31;
- Single_Bits : constant := 31;
- Double_Bits : constant := 63;
-
- Unsigned8_Units : constant := 1;
- Unsigned16_Units : constant := 2;
- Unsigned32_Units : constant := 4;
- Boolean_Units : constant := 4;
- Address_Units : constant := 4;
- Single_Units : constant := 4;
- Double_Units : constant := 8;
-
- Null_Address : constant RTEMS.Address :=
- System.Storage_Elements.To_Address(0);
-
- True : constant RTEMS.Boolean := 1;
- False : constant RTEMS.Boolean := 0;
-
- -- More Types
- --
-
- subtype Name is RTEMS.Unsigned32;
- subtype ID is RTEMS.Unsigned32;
- subtype Interval is RTEMS.Unsigned32;
- subtype Attribute is RTEMS.Unsigned32;
- subtype Mode is RTEMS.Unsigned32;
- subtype Option is RTEMS.Unsigned32;
- subtype Task_Priority is RTEMS.Unsigned32;
- subtype Notepad_Index is RTEMS.Unsigned32 range 0 .. 15;
-
- subtype Event_Set is RTEMS.Unsigned32;
- subtype Signal_Set is RTEMS.Unsigned32;
- subtype Debug_Set is RTEMS.Unsigned32;
- subtype Device_Major_Number is RTEMS.Unsigned32;
- subtype Device_Minor_Number is RTEMS.Unsigned32;
- subtype Vector_Number is RTEMS.Unsigned32;
- subtype ISR_Level is RTEMS.Unsigned32;
-
- subtype Node is RTEMS.Unsigned32;
-
- --
- -- Task Related Types
- -- XXXX fix this
- subtype Task_Argument is RTEMS.Unsigned32;
- type Task_Argument_PTR is access all Task_Argument;
-
- -- XXXX fix this
- subtype TCB is RTEMS.Unsigned32;
- type TCB_Pointer is access all RTEMS.TCB;
-
- subtype Task_States is RTEMS.Unsigned32;
-
- type Task_Entry is access procedure (
- Argument : RTEMS.Unsigned32
- );
-
- --
- -- Clock and Time of Day Types
- --
-
- type Time_Of_Day is
- record
- Year : RTEMS.Unsigned32; -- year, A.D.
- Month : RTEMS.Unsigned32; -- month, 1 .. 12
- Day : RTEMS.Unsigned32; -- day, 1 .. 31
- Hour : RTEMS.Unsigned32; -- hour, 0 .. 23
- Minute : RTEMS.Unsigned32; -- minute, 0 .. 59
- Second : RTEMS.Unsigned32; -- second, 0 .. 59
- Ticks : RTEMS.Unsigned32; -- elapsed ticks between seconds
- end record;
-
- type Clock_Time_Value is
- record
- Seconds : RTEMS.Unsigned32;
- Microseconds : RTEMS.Unsigned32;
- end record;
-
- type Clock_Get_Options is (
- Clock_Get_TOD,
- Clock_Get_Seconds_Since_Epoch,
- Clock_Get_Ticks_Since_Boot,
- Clock_Get_Ticks_Per_Seconds,
- Clock_Get_Time_Value
- );
-
- --
- -- Device Driver Entry Prototype
- --
-
- type Device_Driver_Entry is access function (
- Major : in RTEMS.Device_Major_Number;
- Minor : in RTEMS.Device_Major_Number;
- Argument : in RTEMS.Unsigned32;
- ID : in RTEMS.Unsigned32
- ) return RTEMS.Unsigned32;
-
- type Driver_Address_Table_Entry is
- record
- Initialization : RTEMS.Device_Driver_Entry;
- Open : RTEMS.Device_Driver_Entry;
- Close : RTEMS.Device_Driver_Entry;
- Read : RTEMS.Device_Driver_Entry;
- Write : RTEMS.Device_Driver_Entry;
- Control : RTEMS.Device_Driver_Entry;
- end record;
-
- type Driver_Address_Table is array ( RTEMS.Unsigned32
- range 1 .. RTEMS.Unsigned32'Last ) of RTEMS.Driver_Address_Table_Entry;
-
- type Driver_Address_Table_Pointer is access all Driver_Address_Table;
-
- type Driver_Name_t is
- record
- Device_Name : RTEMS.Address;
- Device_Name_Length : RTEMS.Unsigned32;
- Major : RTEMS.Device_Major_Number;
- Minor : RTEMS.Device_Minor_Number;
-
- end record;
-
- --
- -- Ident Options
- --
-
- Search_All_Nodes : constant RTEMS.Node := 0;
-
- --
- -- Options
- --
-
- Default_Options : constant RTEMS.Option := 16#0000#;
-
- Wait : constant RTEMS.Option := 16#0000#;
- No_Wait : constant RTEMS.Option := 16#0001#;
-
- Event_All : constant RTEMS.Option := 16#0000#;
- Event_Any : constant RTEMS.Option := 16#0002#;
-
- --
- -- Mode constants
- --
-
- Default_Modes : constant RTEMS.Mode := 16#0000#;
-
- All_Mode_Masks : constant RTEMS.Mode := 16#0000_ffff#;
- Current_Mode : constant RTEMS.Mode := 16#0000_0000#;
- Preempt_Mask : constant RTEMS.Mode := 16#0000_0100#;
- Timeslice_Mask : constant RTEMS.Mode := 16#0000_0200#;
- ASR_Mask : constant RTEMS.Mode := 16#0000_0400#;
- Interrupt_Mask : RTEMS.Mode;
- Preempt : constant RTEMS.Mode := 16#0000_0000#;
- No_Preempt : constant RTEMS.Mode := 16#0000_0100#;
- No_Timeslice : constant RTEMS.Mode := 16#0000_0000#;
- Timeslice : constant RTEMS.Mode := 16#0000_0200#;
- ASR : constant RTEMS.Mode := 16#0000_0000#;
- No_ASR : constant RTEMS.Mode := 16#0000_0400#;
-
- pragma Import (C, Interrupt_Mask, "rtems_interrupt_mask");
-
- --
- -- Attribute constants
- --
-
- Default_Attributes : constant RTEMS.Attribute := 16#00000000#;
- No_Floating_Point : constant RTEMS.Attribute := 16#00000000#;
- Floating_Point : constant RTEMS.Attribute := 16#00000001#;
- Local : constant RTEMS.Attribute := 16#00000000#;
- Global : constant RTEMS.Attribute := 16#00000002#;
- FIFO : constant RTEMS.Attribute := 16#00000000#;
- Priority : constant RTEMS.Attribute := 16#00000004#;
- Counting_Semaphore : constant RTEMS.Attribute := 16#00000000#;
- Binary_Semaphore : constant RTEMS.Attribute := 16#00000010#;
- No_Inherit_Priority : constant RTEMS.Attribute := 16#00000000#;
- Inherit_Priority : constant RTEMS.Attribute := 16#00000020#;
- No_Priority_Ceiling : constant RTEMS.Attribute := 16#00000000#;
- Priority_Ceiling : constant RTEMS.Attribute := 16#00000040#;
-
- function Interrupt_Level (
- Level : in RTEMS.Unsigned32
- ) return RTEMS.Attribute;
- pragma Import (C, Interrupt_Level, "rtems_interrupt_level_attribute");
-
-
- Minimum_Stack_Size : RTEMS.Unsigned32;
- pragma Import (C, Minimum_Stack_Size, "rtems_minimum_stack_size");
-
-
- --
- -- Notepad index constants
- --
-
- Notepad_0 : constant RTEMS.Unsigned32 := 0;
- Notepad_1 : constant RTEMS.Unsigned32 := 1;
- Notepad_2 : constant RTEMS.Unsigned32 := 2;
- Notepad_3 : constant RTEMS.Unsigned32 := 3;
- Notepad_4 : constant RTEMS.Unsigned32 := 4;
- Notepad_5 : constant RTEMS.Unsigned32 := 5;
- Notepad_6 : constant RTEMS.Unsigned32 := 6;
- Notepad_7 : constant RTEMS.Unsigned32 := 7;
- Notepad_8 : constant RTEMS.Unsigned32 := 8;
- Notepad_9 : constant RTEMS.Unsigned32 := 9;
- Notepad_10 : constant RTEMS.Unsigned32 := 10;
- Notepad_11 : constant RTEMS.Unsigned32 := 11;
- Notepad_12 : constant RTEMS.Unsigned32 := 12;
- Notepad_13 : constant RTEMS.Unsigned32 := 13;
- Notepad_14 : constant RTEMS.Unsigned32 := 14;
- Notepad_15 : constant RTEMS.Unsigned32 := 15;
-
- --
- -- Miscellaneous
- --
-
- No_Timeout : constant RTEMS.Interval := 0;
- Self : constant RTEMS.ID := 0;
- Period_Status : constant RTEMS.Interval := 0;
- Yield_Processor : constant RTEMS.Interval := 0;
- Current_Priority : constant RTEMS.Task_Priority := 0;
- No_Priority : constant RTEMS.Task_Priority := 0;
-
-
- --
- -- Extension Callouts and Table
- --
-
- type Thread_Create_Extension is access procedure (
- Current_Task : in RTEMS.TCB_Pointer;
- New_Task : in RTEMS.TCB_Pointer
- );
-
- type Thread_Start_Extension is access procedure (
- Current_Task : in RTEMS.TCB_Pointer;
- Started_Task : in RTEMS.TCB_Pointer
- );
-
- type Thread_Restart_Extension is access procedure (
- Current_Task : in RTEMS.TCB_Pointer;
- Restarted_Task : in RTEMS.TCB_Pointer
- );
-
- type Thread_Delete_Extension is access procedure (
- Current_Task : in RTEMS.TCB_Pointer;
- Deleted_Task : in RTEMS.TCB_Pointer
- );
-
- type Thread_Switch_Extension is access procedure (
- Current_Task : in RTEMS.TCB_Pointer;
- Heir_Task : in RTEMS.TCB_Pointer
- );
-
- type Thread_Post_Switch_Extension is access procedure (
- Current_Task : in RTEMS.TCB_Pointer
- );
-
- type Thread_Begin_Extension is access procedure (
- Current_Task : in RTEMS.TCB_Pointer
- );
-
- type Thread_Exitted_Extension is access procedure (
- Current_Task : in RTEMS.TCB_Pointer
- );
-
- type Fatal_Error_Extension is access procedure (
- Error : in RTEMS.Unsigned32
- );
-
- type Extensions_Table is
- record
- Thread_Create : RTEMS.Thread_Create_Extension;
- Thread_Start : RTEMS.Thread_Start_Extension;
- Thread_Restart : RTEMS.Thread_Restart_Extension;
- Thread_Delete : RTEMS.Thread_Delete_Extension;
- Thread_Switch : RTEMS.Thread_Switch_Extension;
- Thread_Post_Switch : RTEMS.Thread_Post_Switch_Extension;
- Thread_Begin : RTEMS.Thread_Begin_Extension;
- Thread_Exitted : RTEMS.Thread_Exitted_Extension;
- Fatal : RTEMS.Fatal_Error_Extension;
- end record;
-
- type Extensions_Table_Pointer is access all Extensions_Table;
-
- --
- -- The following type define a pointer to a watchdog/timer service routine.
- --
-
- type Timer_Service_Routine is access procedure (
- ID : in RTEMS.ID;
- User_Data : in RTEMS.Address
- );
-
- --
- -- The following type define a pointer to a signal service routine.
- --
-
- type ASR_Handler is access procedure (
- Signals : in RTEMS.Signal_Set
- );
-
- --
- -- The following type defines the status information returned
- -- about a period.
- --
-
- type Rate_Monotonic_Period_States is (
- Inactive, -- off chain, never initialized
- Owner_Is_Blocking, -- on chain, owner is blocking on it
- Active, -- on chain, running continuously
- Expired_While_Blocking, -- on chain, expired while owner was was blocking
- Expired -- off chain, will be reset by next
- -- rtems_rate_monotonic_period
- );
-
- for Rate_Monotonic_Period_States'Size use 32;
-
- for Rate_Monotonic_Period_States use (
- Inactive => 0,
- Owner_Is_Blocking => 1,
- Active => 2,
- Expired_While_Blocking => 3,
- Expired => 4
- );
-
- type Rate_Monotonic_Period_Status is
- record
- State : RTEMS.Rate_Monotonic_Period_States;
- Ticks_Since_Last_Period : RTEMS.Unsigned32;
- Ticks_Executed_Since_Last_Period : RTEMS.Unsigned32;
- end record;
-
- --
- -- Method Completions Status Codes
- --
-
- type Status_Codes is (
- Successful, -- successful completion
- Task_Exitted, -- returned from a task
- MP_Not_Configured, -- multiprocessing not configured
- Invalid_Name, -- invalid object name
- Invalid_ID, -- invalid object id
- Too_Many, -- too many
- Timeout, -- timed out waiting
- Object_Was_Deleted, -- object deleted while waiting
- Invalid_Size, -- specified size was invalid
- Invalid_Address, -- address specified is invalid
- Invalid_Number, -- number was invalid
- Not_Defined, -- item has not been initialized
- Resource_In_Use, -- resources still outstanding
- Unsatisfied, -- request not satisfied
- Incorrect_State, -- task is in wrong state
- Already_Suspended, -- task already in state
- Illegal_On_Self, -- illegal on calling task
- Illegal_On_Remote_Object, -- illegal for remote object
- Called_From_ISR, -- called from wrong environment
- Invalid_Priority, -- invalid task priority
- Invalid_Clock, -- invalid date/time
- Invalid_Node, -- invalid node id
- Not_Configured, -- directive not configured
- Not_Owner_Of_Resource, -- not owner of resource
- Not_Implemented, -- directive not implemented
- Internal_Error, -- RTEMS inconsistency detected
- No_Memory, -- no memory left in heap
- IO_Error, -- driver IO error
- Proxy_Blocking -- internal multiprocessing only
- );
-
- for Status_Codes'Size use 32;
-
- for Status_Codes use (
- Successful => 0,
- Task_Exitted => 1,
- MP_Not_Configured => 2,
- Invalid_Name => 3,
- Invalid_ID => 4,
- Too_Many => 5,
- Timeout => 6,
- Object_Was_Deleted => 7,
- Invalid_Size => 8,
- Invalid_Address => 9,
- Invalid_NumbeR => 10,
- Not_Defined => 11,
- Resource_In_Use => 12,
- Unsatisfied => 13,
- Incorrect_State => 14,
- Already_Suspended => 15,
- Illegal_On_Self => 16,
- Illegal_On_Remote_Object => 17,
- Called_From_ISR => 18,
- Invalid_Priority => 19,
- Invalid_Clock => 20,
- Invalid_Node => 21,
- Not_Configured => 22,
- Not_Owner_Of_Resource => 23,
- Not_ImplementeD => 24,
- Internal_Error => 25,
- No_Memory => 26,
- IO_Error => 27,
- Proxy_Blocking => 28
- );
-
- --
- -- RTEMS Events
- --
-
- Pending_Events : constant RTEMS.Event_Set := 16#0000_0000#;
- All_Events : constant RTEMS.Event_Set := 16#FFFF_FFFF#;
- Event_0 : constant RTEMS.Event_Set := 16#0000_0001#;
- Event_1 : constant RTEMS.Event_Set := 16#0000_0002#;
- Event_2 : constant RTEMS.Event_Set := 16#0000_0004#;
- Event_3 : constant RTEMS.Event_Set := 16#0000_0008#;
- Event_4 : constant RTEMS.Event_Set := 16#0000_0010#;
- Event_5 : constant RTEMS.Event_Set := 16#0000_0020#;
- Event_6 : constant RTEMS.Event_Set := 16#0000_0040#;
- Event_7 : constant RTEMS.Event_Set := 16#0000_0080#;
- Event_8 : constant RTEMS.Event_Set := 16#0000_0100#;
- Event_9 : constant RTEMS.Event_Set := 16#0000_0200#;
- Event_10 : constant RTEMS.Event_Set := 16#0000_0400#;
- Event_11 : constant RTEMS.Event_Set := 16#0000_0800#;
- Event_12 : constant RTEMS.Event_Set := 16#0000_1000#;
- Event_13 : constant RTEMS.Event_Set := 16#0000_2000#;
- Event_14 : constant RTEMS.Event_Set := 16#0000_4000#;
- Event_15 : constant RTEMS.Event_Set := 16#0000_8000#;
- Event_16 : constant RTEMS.Event_Set := 16#0001_0000#;
- Event_17 : constant RTEMS.Event_Set := 16#0002_0000#;
- Event_18 : constant RTEMS.Event_Set := 16#0004_0000#;
- Event_19 : constant RTEMS.Event_Set := 16#0008_0000#;
- Event_20 : constant RTEMS.Event_Set := 16#0010_0000#;
- Event_21 : constant RTEMS.Event_Set := 16#0020_0000#;
- Event_22 : constant RTEMS.Event_Set := 16#0040_0000#;
- Event_23 : constant RTEMS.Event_Set := 16#0080_0000#;
- Event_24 : constant RTEMS.Event_Set := 16#0100_0000#;
- Event_25 : constant RTEMS.Event_Set := 16#0200_0000#;
- Event_26 : constant RTEMS.Event_Set := 16#0400_0000#;
- Event_27 : constant RTEMS.Event_Set := 16#0800_0000#;
- Event_28 : constant RTEMS.Event_Set := 16#1000_0000#;
- Event_29 : constant RTEMS.Event_Set := 16#2000_0000#;
- Event_30 : constant RTEMS.Event_Set := 16#4000_0000#;
- Event_31 : constant RTEMS.Event_Set := 16#8000_0000#;
-
- --
- -- RTEMS Signals
- --
-
- All_Signals : constant RTEMS.Signal_Set := 16#7FFFFFFF#;
- Signal_0 : constant RTEMS.Signal_Set := 16#00000001#;
- Signal_1 : constant RTEMS.Signal_Set := 16#00000002#;
- Signal_2 : constant RTEMS.Signal_Set := 16#00000004#;
- Signal_3 : constant RTEMS.Signal_Set := 16#00000008#;
- Signal_4 : constant RTEMS.Signal_Set := 16#00000010#;
- Signal_5 : constant RTEMS.Signal_Set := 16#00000020#;
- Signal_6 : constant RTEMS.Signal_Set := 16#00000040#;
- Signal_7 : constant RTEMS.Signal_Set := 16#00000080#;
- Signal_8 : constant RTEMS.Signal_Set := 16#00000100#;
- Signal_9 : constant RTEMS.Signal_Set := 16#00000200#;
- Signal_10 : constant RTEMS.Signal_Set := 16#00000400#;
- Signal_11 : constant RTEMS.Signal_Set := 16#00000800#;
- Signal_12 : constant RTEMS.Signal_Set := 16#00001000#;
- Signal_13 : constant RTEMS.Signal_Set := 16#00002000#;
- Signal_14 : constant RTEMS.Signal_Set := 16#00004000#;
- Signal_15 : constant RTEMS.Signal_Set := 16#00008000#;
- Signal_16 : constant RTEMS.Signal_Set := 16#00010000#;
- Signal_17 : constant RTEMS.Signal_Set := 16#00020000#;
- Signal_18 : constant RTEMS.Signal_Set := 16#00040000#;
- Signal_19 : constant RTEMS.Signal_Set := 16#00080000#;
- Signal_20 : constant RTEMS.Signal_Set := 16#00100000#;
- Signal_21 : constant RTEMS.Signal_Set := 16#00200000#;
- Signal_22 : constant RTEMS.Signal_Set := 16#00400000#;
- Signal_23 : constant RTEMS.Signal_Set := 16#00800000#;
- Signal_24 : constant RTEMS.Signal_Set := 16#01000000#;
- Signal_25 : constant RTEMS.Signal_Set := 16#02000000#;
- Signal_26 : constant RTEMS.Signal_Set := 16#04000000#;
- Signal_27 : constant RTEMS.Signal_Set := 16#08000000#;
- Signal_28 : constant RTEMS.Signal_Set := 16#10000000#;
- Signal_29 : constant RTEMS.Signal_Set := 16#20000000#;
- Signal_30 : constant RTEMS.Signal_Set := 16#40000000#;
- Signal_31 : constant RTEMS.Signal_Set := 16#80000000#;
-
- --
- -- RTEMS API Configuration Information
- --
-
- type Initialization_Tasks_Table_Entry is
- record
- Name : RTEMS.Name; -- task name
- Stack_Size : RTEMS.Unsigned32; -- task stack size
- Initial_Priority : RTEMS.Task_priority; -- task priority
- Attribute_Set : RTEMS.Attribute; -- task attributes
- Entry_Point : RTEMS.Task_Entry; -- task entry point
- Mode_Set : RTEMS.Mode; -- task initial mode
- Argument : RTEMS.Unsigned32; -- task argument
- end record;
-
- type Initialization_Tasks_Table is array ( RTEMS.Unsigned32 range <> ) of
- RTEMS.Initialization_Tasks_Table_Entry;
-
- type Initialization_Tasks_Table_Pointer is access all
- Initialization_Tasks_Table;
-
- type API_Configuration_Table is
- record
- Maximum_Tasks : RTEMS.Unsigned32;
- Maximum_Timers : RTEMS.Unsigned32;
- Maximum_Semaphores : RTEMS.Unsigned32;
- Maximum_Message_queues : RTEMS.Unsigned32;
- Maximum_Partitions : RTEMS.Unsigned32;
- Maximum_Regions : RTEMS.Unsigned32;
- Maximum_Ports : RTEMS.Unsigned32;
- Maximum_Periods : RTEMS.Unsigned32;
- Number_Of_Initialization_Tasks : RTEMS.Unsigned32;
- User_Initialization_Tasks_Table :
- RTEMS.Initialization_Tasks_Table_Pointer;
- end record;
-
- type API_Configuration_Table_Pointer is access all API_Configuration_Table;
-
- --
- -- RTEMS POSIX API Configuration Information
- --
-
- type POSIX_Thread_Entry is access procedure (
- Argument : in RTEMS.Address
- );
-
- type POSIX_Initialization_Threads_Table_Entry is
- record
- Thread_Entry : RTEMS.POSIX_Thread_Entry;
- end record;
-
- type POSIX_Initialization_Threads_Table is array
- ( RTEMS.Unsigned32 range <> ) of
- RTEMS.POSIX_Initialization_Threads_Table_Entry;
-
- type POSIX_Initialization_Threads_Table_Pointer is access all
- POSIX_Initialization_Threads_Table;
-
- type POSIX_API_Configuration_Table_Entry is
- record
- Maximum_Threads : Interfaces.C.Int;
- Maximum_Mutexes : Interfaces.C.Int;
- Maximum_Condition_Variables : Interfaces.C.Int;
- Maximum_Keys : Interfaces.C.Int;
- Maximum_Queued_Signals : Interfaces.C.Int;
- Number_Of_Initialization_Tasks : Interfaces.C.Int;
- User_Initialization_Tasks_Table :
- RTEMS.POSIX_Initialization_Threads_Table_Pointer;
- end record;
-
- type POSIX_API_Configuration_Table is array ( RTEMS.Unsigned32 range <> ) of
- RTEMS.POSIX_API_Configuration_Table_Entry;
-
- type POSIX_API_Configuration_Table_Pointer is access all
- RTEMS.POSIX_API_Configuration_Table;
-
- --
- -- MPCI Information include MPCI Configuration
- --
-
- type Configuration_Table_Pointer;
-
- type MP_Packet_Classes is (
- MP_PACKET_MPCI_INTERNAL,
- MP_PACKET_TASKS,
- MP_PACKET_MESSAGE_QUEUE,
- MP_PACKET_SEMAPHORE,
- MP_PACKET_PARTITION,
- MP_PACKET_REGION,
- MP_PACKET_EVENT,
- MP_PACKET_SIGNAL
- );
-
- for MP_Packet_Classes use (
- MP_PACKET_MPCI_INTERNAL => 0,
- MP_PACKET_TASKS => 1,
- MP_PACKET_MESSAGE_QUEUE => 2,
- MP_PACKET_SEMAPHORE => 3,
- MP_PACKET_PARTITION => 4,
- MP_PACKET_REGION => 5,
- MP_PACKET_EVENT => 6,
- MP_PACKET_SIGNAL => 7
- );
-
- type Packet_Prefix is
- record
- The_Class : RTEMS.MP_Packet_Classes;
- ID : RTEMS.ID;
- Source_TID : RTEMS.ID;
- Source_Priority : RTEMS.Task_Priority;
- Return_Code : RTEMS.Unsigned32;
- Length : RTEMS.Unsigned32;
- To_Convert : RTEMS.Unsigned32;
- Timeout : RTEMS.Interval;
- end record;
-
- type Packet_Prefix_Pointer is access all Packet_Prefix;
-
- type MPCI_Initialization_Entry is access procedure (
- Configuration : in RTEMS.Configuration_Table_Pointer
- );
-
- type MPCI_Get_Packet_Entry is access procedure (
- Packet : access RTEMS.Packet_Prefix_Pointer
- );
-
- type MPCI_Return_Packet_Entry is access procedure (
- Packet : in RTEMS.Packet_Prefix_Pointer
- );
-
- type MPCI_Send_Entry is access procedure (
- Packet : in RTEMS.Packet_Prefix_Pointer
- );
-
- type MPCI_Receive_Entry is access procedure (
- Packet : access RTEMS.Packet_Prefix_Pointer
- );
-
- type MPCI_Table is
- record
- Default_Timeout : RTEMS.Unsigned32; -- in ticks
- Maximum_Packet_Size : RTEMS.Unsigned32;
- Initialization : RTEMS.MPCI_Initialization_Entry;
- Get_Packet : RTEMS.MPCI_Get_Packet_Entry;
- Return_Packet : RTEMS.MPCI_Return_Packet_Entry;
- Send : RTEMS.MPCI_Send_Entry;
- Receive : RTEMS.MPCI_Receive_Entry;
- end record;
-
- type MPCI_Table_Pointer is access all MPCI_Table;
-
- --
- -- Configuration Information
- --
-
- type Multiprocessing_Table is
- record
- Node : RTEMS.Unsigned32;
- Maximum_Nodes : RTEMS.Unsigned32;
- Maximum_Global_Objects : RTEMS.Unsigned32;
- Maximum_Proxies : RTEMS.Unsigned32;
- User_MPCI_Table : RTEMS.MPCI_Table_Pointer;
- end record;
-
- type Multiprocessing_Table_Pointer is access all Multiprocessing_Table;
-
- type Configuration_Table is
- record
- Work_Space_Start : RTEMS.Address;
- Work_Space_Size : RTEMS.Unsigned32;
- Maximum_Extensions : RTEMS.Unsigned32;
- Microseconds_Per_Tick : RTEMS.Unsigned32;
- Ticks_Per_Timeslice : RTEMS.Unsigned32;
- Maximum_Devices : RTEMS.Unsigned32;
- Number_Of_Device_Drivers : RTEMS.Unsigned32;
- Device_Driver_Table : RTEMS.Driver_Address_Table_Pointer;
- Number_Of_Initial_Extensions : RTEMS.Unsigned32;
- User_Extension_Table : RTEMS.Extensions_Table_Pointer;
- User_Multiprocessing_Table : RTEMS.Multiprocessing_Table_Pointer;
- RTEMS_API_Configuration : RTEMS.API_Configuration_Table_Pointer;
- POSIX_API_Configuration : RTEMS.POSIX_API_Configuration_Table_Pointer;
- end record;
-
- type Configuration_Table_Pointer is access all Configuration_Table;
-
- --
- -- For now, do not provide access to the CPU Table from Ada.
- -- When this type is provided, a CPU dependent file must
- -- define it.
- --
-
- subtype CPU_Table is RTEMS.Address;
- type CPU_Table_Pointer is access all CPU_Table;
-
- --
- -- Utility Functions
- --
-
- function From_Ada_Boolean (
- Ada_Boolean : Standard.Boolean
- ) return RTEMS.Boolean;
-
- function To_Ada_Boolean (
- RTEMS_Boolean : RTEMS.Boolean
- ) return Standard.Boolean;
-
- function Milliseconds_To_Microseconds (
- Milliseconds : RTEMS.Unsigned32
- ) return RTEMS.Unsigned32;
-
- function Microseconds_To_Ticks (
- Microseconds : RTEMS.Unsigned32
- ) return RTEMS.Interval;
-
- function Milliseconds_To_Ticks (
- Milliseconds : RTEMS.Unsigned32
- ) return RTEMS.Interval;
-
- function Build_Name (
- C1 : in Character;
- C2 : in Character;
- C3 : in Character;
- C4 : in Character
- ) return RTEMS.Name;
-
- procedure Name_To_Characters (
- Name : in RTEMS.Name;
- C1 : out Character;
- C2 : out Character;
- C3 : out Character;
- C4 : out Character
- );
-
- function Get_Node (
- ID : in RTEMS.ID
- ) return RTEMS.Unsigned32;
-
- function Get_Index (
- ID : in RTEMS.ID
- ) return RTEMS.Unsigned32;
-
- function Are_Statuses_Equal (
- Status : in RTEMS.Status_Codes;
- Desired : in RTEMS.Status_Codes
- ) return Standard.Boolean;
-
- function Is_Status_Successful (
- Status : in RTEMS.Status_Codes
- ) return Standard.Boolean;
-
- function Subtract (
- Left : in RTEMS.Address;
- Right : in RTEMS.Address
- ) return RTEMS.Unsigned32;
-
- function Are_Equal (
- Left : in RTEMS.Address;
- Right : in RTEMS.Address
- ) return Standard.Boolean;
- --
- -- RTEMS API
- --
-
- --
- -- Initialization Manager
- --
-
- procedure Initialize_Executive (
- Configuration_Table : in RTEMS.Configuration_Table_Pointer;
- CPU_Table : in RTEMS.CPU_Table_Pointer
- );
-
- procedure Initialize_Executive_Early (
- Configuration_Table : in RTEMS.Configuration_Table_Pointer;
- CPU_Table : in RTEMS.CPU_Table_Pointer;
- Level : out RTEMS.ISR_Level
- );
-
- procedure Initialize_Executive_Late (
- BSP_Level : in RTEMS.ISR_Level
- );
-
- procedure Shutdown_Executive (
- Result : in RTEMS.Unsigned32
- );
-
- --
- -- Task Manager
- --
-
- procedure Task_Create (
- Name : in RTEMS.Name;
- Initial_Priority : in RTEMS.Task_Priority;
- Stack_Size : in Unsigned32;
- Initial_Modes : in RTEMS.Mode;
- Attribute_Set : in RTEMS.Attribute;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Task_Ident (
- Name : in RTEMS.Name;
- Node : in RTEMS.Node;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Task_Start (
- ID : in RTEMS.ID;
- Entry_Point : in RTEMS.Task_Entry;
- Argument : in RTEMS.Task_Argument;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Task_Restart (
- ID : in RTEMS.ID;
- Argument : in RTEMS.Task_Argument;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Task_Delete (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Task_Suspend (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Task_Resume (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Task_Is_Suspended (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Task_Set_Priority (
- ID : in RTEMS.ID;
- New_Priority : in RTEMS.Task_Priority;
- Old_Priority : out RTEMS.Task_Priority;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Task_Mode (
- Mode_Set : in RTEMS.Mode;
- Mask : in RTEMS.Mode;
- Previous_Mode_Set : out RTEMS.Mode;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Task_Get_Note (
- ID : in RTEMS.ID;
- Notepad : in RTEMS.Notepad_Index;
- Note : out RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Task_Set_Note (
- ID : in RTEMS.ID;
- Notepad : in RTEMS.Notepad_Index;
- Note : in RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Task_Wake_When (
- Time_Buffer : in RTEMS.Time_Of_Day;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Task_Wake_After (
- Ticks : in RTEMS.Interval;
- Result : out RTEMS.Status_Codes
- );
-
- --
- -- Interrupt Manager
- --
-
- procedure Interrupt_Catch (
- New_ISR_Handler : in RTEMS.Address;
- Vector : in RTEMS.Vector_Number;
- Old_ISR_Handler : out RTEMS.Address;
- Result : out RTEMS.Status_Codes
- );
-
- function Interrupt_Disable
- return RTEMS.ISR_Level;
-
- procedure Interrupt_Enable (
- Level : in RTEMS.ISR_Level
- );
-
- procedure Interrupt_Flash (
- Level : in RTEMS.ISR_Level
- );
-
- function Interrupt_Is_In_Progress
- return RTEMS.Boolean;
-
- --
- -- Clock Manager
- --
-
- procedure Clock_Get (
- Option : in RTEMS.Clock_Get_Options;
- Time_Buffer : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Clock_Set (
- Time_Buffer : in RTEMS.Time_Of_Day;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Clock_Tick (
- Result : out RTEMS.Status_Codes
- );
-
- --
- -- Extension Manager
- --
-
- procedure Extension_Create (
- Name : in RTEMS.Name;
- Table : in RTEMS.Extensions_Table_Pointer;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Extension_Ident (
- Name : in RTEMS.Name;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Extension_Delete (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
-
- --
- -- Timer Manager
- --
-
- procedure Timer_Create (
- Name : in RTEMS.Name;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Timer_Ident (
- Name : in RTEMS.Name;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Timer_Delete (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Timer_Fire_After (
- ID : in RTEMS.ID;
- Ticks : in RTEMS.Interval;
- Routine : in RTEMS.Timer_Service_Routine;
- User_Data : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Timer_Fire_When (
- ID : in RTEMS.ID;
- Wall_Time : in RTEMS.Time_Of_Day;
- Routine : in RTEMS.Timer_Service_Routine;
- User_Data : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Timer_Reset (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Timer_Cancel (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- --
- -- Semaphore Manager
- --
-
- procedure Semaphore_Create (
- Name : in RTEMS.Name;
- Count : in RTEMS.Unsigned32;
- Attribute_Set : in RTEMS.Attribute;
- Priority_Ceiling : in RTEMS.Task_Priority;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Semaphore_Delete (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Semaphore_Ident (
- Name : in RTEMS.Name;
- Node : in RTEMS.Unsigned32;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Semaphore_Obtain (
- ID : in RTEMS.ID;
- Option_Set : in RTEMS.Option;
- Timeout : in RTEMS.Interval;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Semaphore_Release (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Semaphore_Flush (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- --
- -- Message Queue Manager
- --
-
- procedure Message_Queue_Create (
- Name : in RTEMS.Name;
- Count : in RTEMS.Unsigned32;
- Max_Message_Size : in RTEMS.Unsigned32;
- Attribute_Set : in RTEMS.Attribute;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Message_Queue_Ident (
- Name : in RTEMS.Name;
- Node : in RTEMS.Unsigned32;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Message_Queue_Delete (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Message_Queue_Send (
- ID : in RTEMS.ID;
- Buffer : in RTEMS.Address;
- Size : in RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Message_Queue_Urgent (
- ID : in RTEMS.ID;
- Buffer : in RTEMS.Address;
- Size : in RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Message_Queue_Broadcast (
- ID : in RTEMS.ID;
- Buffer : in RTEMS.Address;
- Size : in RTEMS.Unsigned32;
- Count : out RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Message_Queue_Receive (
- ID : in RTEMS.ID;
- Buffer : in RTEMS.Address;
- Option_Set : in RTEMS.Option;
- Timeout : in RTEMS.Interval;
- Size : out RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Message_Queue_Flush (
- ID : in RTEMS.ID;
- Count : out RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
- );
-
-
- --
- -- Event Manager
- --
-
- procedure Event_Send (
- ID : in RTEMS.ID;
- Event_In : in RTEMS.Event_Set;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Event_Receive (
- Event_In : in RTEMS.Event_Set;
- Option_Set : in RTEMS.Option;
- Ticks : in RTEMS.Interval;
- Event_Out : out RTEMS.Event_Set;
- Result : out RTEMS.Status_Codes
- );
-
- --
- -- Signal Manager
- --
-
- procedure Signal_Catch (
- ASR_Handler : in RTEMS.ASR_Handler;
- Mode_Set : in RTEMS.Mode;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Signal_Send (
- ID : in RTEMS.ID;
- Signal_Set : in RTEMS.Signal_Set;
- Result : out RTEMS.Status_Codes
- );
-
-
- --
- -- Partition Manager
- --
-
- procedure Partition_Create (
- Name : in RTEMS.Name;
- Starting_Address : in RTEMS.Address;
- Length : in RTEMS.Unsigned32;
- Buffer_Size : in RTEMS.Unsigned32;
- Attribute_Set : in RTEMS.Attribute;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Partition_Ident (
- Name : in RTEMS.Name;
- Node : in RTEMS.Unsigned32;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Partition_Delete (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Partition_Get_Buffer (
- ID : in RTEMS.ID;
- Buffer : out RTEMS.Address;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Partition_Return_Buffer (
- ID : in RTEMS.ID;
- Buffer : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
- );
-
-
- --
- -- Region Manager
- --
-
- procedure Region_Create (
- Name : in RTEMS.Name;
- Starting_Address : in RTEMS.Address;
- Length : in RTEMS.Unsigned32;
- Page_Size : in RTEMS.Unsigned32;
- Attribute_Set : in RTEMS.Attribute;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Region_Ident (
- Name : in RTEMS.Name;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Region_Delete (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Region_Extend (
- ID : in RTEMS.ID;
- Starting_Address : in RTEMS.Address;
- Length : in RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Region_Get_Segment (
- ID : in RTEMS.ID;
- Size : in RTEMS.Unsigned32;
- Option_Set : in RTEMS.Option;
- Timeout : in RTEMS.Interval;
- Segment : out RTEMS.Address;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Region_Get_Segment_Size (
- ID : in RTEMS.ID;
- Segment : in RTEMS.Address;
- Size : out RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Region_Return_Segment (
- ID : in RTEMS.ID;
- Segment : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
- );
-
-
- --
- -- Dual Ported Memory Manager
- --
-
- procedure Port_Create (
- Name : in RTEMS.Name;
- Internal_Start : in RTEMS.Address;
- External_Start : in RTEMS.Address;
- Length : in RTEMS.Unsigned32;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Port_Ident (
- Name : in RTEMS.Name;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Port_Delete (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Port_External_To_Internal (
- ID : in RTEMS.ID;
- External : in RTEMS.Address;
- Internal : out RTEMS.Address;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Port_Internal_To_External (
- ID : in RTEMS.ID;
- Internal : in RTEMS.Address;
- External : out RTEMS.Address;
- Result : out RTEMS.Status_Codes
- );
-
- --
- -- Input/Output Manager
- --
-
- procedure IO_Initialize (
- Major : in RTEMS.Device_Major_Number;
- Minor : in RTEMS.Device_Minor_Number;
- Argument : in RTEMS.Address;
- Return_Value : out RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
- );
-
- procedure IO_Register_Name (
- Name : in String;
- Major : in RTEMS.Device_Major_Number;
- Minor : in RTEMS.Device_Minor_Number;
- Result : out RTEMS.Status_Codes
- );
-
- procedure IO_Lookup_Name (
- Name : in String;
- Device_Info : out RTEMS.Driver_Name_t;
- Result : out RTEMS.Status_Codes
- );
-
- procedure IO_Open (
- Major : in RTEMS.Device_Major_Number;
- Minor : in RTEMS.Device_Minor_Number;
- Argument : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
- );
-
- procedure IO_Close (
- Major : in RTEMS.Device_Major_Number;
- Minor : in RTEMS.Device_Minor_Number;
- Argument : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
- );
-
- procedure IO_Read (
- Major : in RTEMS.Device_Major_Number;
- Minor : in RTEMS.Device_Minor_Number;
- Argument : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
- );
-
- procedure IO_Write (
- Major : in RTEMS.Device_Major_Number;
- Minor : in RTEMS.Device_Minor_Number;
- Argument : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
- );
-
- procedure IO_Control (
- Major : in RTEMS.Device_Major_Number;
- Minor : in RTEMS.Device_Minor_Number;
- Argument : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
- );
-
-
- --
- -- Fatal Error Manager
- --
-
- procedure Fatal_Error_Occurred (
- The_Error : in RTEMS.Unsigned32
- );
-
-
- --
- -- Rate Monotonic Manager
- --
-
- procedure Rate_Monotonic_Create (
- Name : in RTEMS.Name;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Rate_Monotonic_Ident (
- Name : in RTEMS.Name;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Rate_Monotonic_Delete (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Rate_Monotonic_Cancel (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Rate_Monotonic_Period (
- ID : in RTEMS.ID;
- Length : in RTEMS.Interval;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Rate_Monotonic_Get_Status (
- ID : in RTEMS.ID;
- Status : out RTEMS.Rate_Monotonic_Period_Status;
- Result : out RTEMS.Status_Codes
- );
-
- --
- -- Multiprocessing Manager
- --
-
- procedure Multiprocessing_Announce;
-
-
- --
- -- Debug Manager
- --
-
- Debug_All_Mask : constant RTEMS.Debug_Set := 16#ffffffff#;
- Debug_Region : constant RTEMS.Debug_Set := 16#00000001#;
-
- procedure Debug_Enable (
- To_Be_Enabled : in RTEMS.Debug_Set
- );
-
- procedure Debug_Disable (
- To_Be_Disabled : in RTEMS.Debug_Set
- );
-
- function Debug_Is_Enabled (
- Level : in RTEMS.Debug_Set
- ) return RTEMS.Boolean;
-
- --
- -- Some Useful Data Items
- --
-
- Configuration : RTEMS.Configuration_Table_Pointer;
- pragma Import (C, Configuration, "_Configuration_Table");
-
-
-private
-end RTEMS;
diff --git a/c/src/exec/include/rtems/libio_.h b/c/src/exec/include/rtems/libio_.h
deleted file mode 100644
index 8e74b34edb..0000000000
--- a/c/src/exec/include/rtems/libio_.h
+++ /dev/null
@@ -1,272 +0,0 @@
-/*
- * Libio Internal Information
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __LIBIO__h
-#define __LIBIO__h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems.h>
-#include <rtems/libio.h> /* include before standard IO */
-#include <rtems/assoc.h> /* assoc.h not included by rtems.h */
-
-#include <stdio.h> /* O_RDONLY, et.al. */
-#include <fcntl.h> /* O_RDONLY, et.al. */
-#include <assert.h>
-#include <stdarg.h>
-#include <errno.h>
-
-#if ! defined(O_NDELAY)
-# if defined(solaris2)
-# define O_NDELAY O_NONBLOCK
-# elif defined(RTEMS_NEWLIB)
-# define O_NDELAY _FNBIO
-# endif
-#endif
-
-#if !defined(ENOTSUP)
-#define ENOTSUP EOPNOTSUPP
-#endif
-
-#include <errno.h>
-#include <string.h> /* strcmp */
-#include <unistd.h>
-#include <stdlib.h> /* calloc() */
-
-/*
- * Semaphore to protect the io table
- */
-
-#define RTEMS_LIBIO_SEM rtems_build_name('L', 'B', 'I', 'O')
-#define RTEMS_LIBIO_IOP_SEM(n) rtems_build_name('L', 'B', 'I', n)
-
-extern rtems_id rtems_libio_semaphore;
-extern rtems_filesystem_file_handlers_r rtems_filesystem_null_handlers;
-
-/*
- * File descriptor Table Information
- */
-
-extern unsigned32 rtems_libio_number_iops;
-extern rtems_libio_t *rtems_libio_iops;
-extern rtems_libio_t *rtems_libio_last_iop;
-extern rtems_libio_t *rtems_libio_iop_freelist;
-
-/*
- * Default mode for all files.
- */
-
-extern mode_t rtems_filesystem_umask;
-
-/*
- * set_errno_and_return_minus_one
- *
- * Macro to ease common way to return an error.
- */
-
-#ifndef set_errno_and_return_minus_one
-#define set_errno_and_return_minus_one( _error ) \
- do { errno = (_error); return -1; } while(0)
-#endif
-
-/*
- * rtems_libio_iop
- *
- * Macro to return the file descriptor pointer.
- */
-
-#define rtems_libio_iop(_fd) \
- ((((unsigned32)(_fd)) < rtems_libio_number_iops) ? \
- &rtems_libio_iops[_fd] : 0)
-
-/*
- * rtems_libio_check_is_open
- *
- * Macro to check if a file descriptor is actually open.
- */
-
-#define rtems_libio_check_is_open(_iop) \
- do { \
- if (((_iop)->flags & LIBIO_FLAGS_OPEN) == 0) { \
- errno = EBADF; \
- return -1; \
- } \
- } while (0)
-
-/*
- * rtems_libio_check_fd
- *
- * Macro to check if a file descriptor number is valid.
- */
-
-#define rtems_libio_check_fd(_fd) \
- do { \
- if ((unsigned32) (_fd) >= rtems_libio_number_iops) { \
- errno = EBADF; \
- return -1; \
- } \
- } while (0)
-
-/*
- * rtems_libio_check_buffer
- *
- * Macro to check if a buffer pointer is valid.
- */
-
-#define rtems_libio_check_buffer(_buffer) \
- do { \
- if ((_buffer) == 0) { \
- errno = EINVAL; \
- return -1; \
- } \
- } while (0)
-
-/*
- * rtems_libio_check_count
- *
- * Macro to check if a count or length is valid.
- */
-
-#define rtems_libio_check_count(_count) \
- do { \
- if ((_count) == 0) { \
- return 0; \
- } \
- } while (0)
-
-/*
- * rtems_libio_check_permissions
- *
- * Macro to check if a file descriptor is open for this operation.
- */
-
-#define rtems_libio_check_permissions(_iop, _flag) \
- do { \
- if (((_iop)->flags & (_flag)) == 0) { \
- set_errno_and_return_minus_one( EINVAL ); \
- return -1; \
- } \
- } while (0)
-
-/*
- * rtems_filesystem_freenode
- *
- * Macro to free a node.
- */
-
-#define rtems_filesystem_freenode( _node ) \
- do { \
- if ( (_node)->ops->freenod ) \
- (*(_node)->ops->freenod)( (_node) ); \
- } while (0)
-
-/*
- * rtems_filesystem_is_separator
- *
- * Macro to determine if a character is a path name separator.
- *
- * NOTE: This macro handles MS-DOS and UNIX style names.
- */
-
-#define rtems_filesystem_is_separator( _ch ) \
- ( ((_ch) == '/') || ((_ch) == '\\') || ((_ch) == '\0'))
-
-/*
- * rtems_filesystem_get_start_loc
- *
- * Macro to determine if path is absolute or relative.
- */
-
-#define rtems_filesystem_get_start_loc( _path, _index, _loc ) \
- do { \
- if ( rtems_filesystem_is_separator( (_path)[ 0 ] ) ) { \
- *(_loc) = rtems_filesystem_root; \
- *(_index) = 1; \
- } else { \
- *(_loc) = rtems_filesystem_current; \
- *(_index) = 0; \
- } \
- } while (0)
-
-#define rtems_filesystem_get_sym_start_loc( _path, _index, _loc ) \
- do { \
- if ( rtems_filesystem_is_separator( (_path)[ 0 ] ) ) { \
- *(_loc) = rtems_filesystem_root; \
- *(_index) = 1; \
- } else { \
- *(_index) = 0; \
- } \
- } while (0)
-
-
-/*
- * External structures
- */
-
-extern rtems_filesystem_location_info_t rtems_filesystem_current;
-extern rtems_filesystem_location_info_t rtems_filesystem_root;
-extern nlink_t rtems_filesystem_link_counts;
-
-
-/*
- * File Descriptor Routine Prototypes
- */
-
-rtems_libio_t *rtems_libio_allocate(void);
-
-unsigned32 rtems_libio_fcntl_flags(
- unsigned32 fcntl_flags
-);
-
-unsigned32 rtems_libio_to_fcntl_flags(
- unsigned32 flags
-);
-
-void rtems_libio_free(
- rtems_libio_t *iop
-);
-
-int rtems_libio_is_open_files_in_fs(
- rtems_filesystem_mount_table_entry_t *mt_entry
-);
-
-int rtems_libio_is_file_open(
- void *node_access
-);
-
-/*
- * File System Routine Prototypes
- */
-
-int rtems_filesystem_evaluate_path(
- const char *pathname,
- int flags,
- rtems_filesystem_location_info_t *pathloc,
- int follow_link
-);
-
-void rtems_filesystem_initialize();
-
-int init_fs_mount_table();
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
-
-
diff --git a/c/src/exec/libcsupport/Makefile.am b/c/src/exec/libcsupport/Makefile.am
deleted file mode 100644
index f65729290b..0000000000
--- a/c/src/exec/libcsupport/Makefile.am
+++ /dev/null
@@ -1,12 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-
-SUBDIRS = include libc libcpu libbsp \
- $(LIBHWAPI)
-
-include $(top_srcdir)/../../../automake/subdirs.am
-include $(top_srcdir)/../../../automake/local.am
diff --git a/c/src/exec/libcsupport/include/chain.h b/c/src/exec/libcsupport/include/chain.h
deleted file mode 100644
index 98cf2b1a86..0000000000
--- a/c/src/exec/libcsupport/include/chain.h
+++ /dev/null
@@ -1,362 +0,0 @@
-/* chain.h
- *
- * This include file contains all the constants and structures associated
- * with doubly linked chains. This file actually just provides an
- * interface to the chain object in rtems.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $ld:
- */
-
-#ifndef __CHAIN_h
-#define __CHAIN_h
-
-#include <rtems.h>
-
-/*
- * Chain_Initialize
- *
- * This routine initializes the_chain structure to manage the
- * contiguous array of number_nodes nodes which starts at
- * starting_address. Each node is of node_size bytes.
- *
- * Chain_Control *the_chain, * IN *
- * void *starting_address, * IN *
- * rtems_unsigned32 number_nodes, * IN *
- * rtems_unsigned32 node_size * IN *
- */
-
-#define Chain_Initialize( the_chain, starting_address, \
- number_nodes, node_size ) \
- _Chain_Initialize( the_chain, starting_address, \
- number_nodes, node_size ) \
-
-
-/*
- * Chain_Initialize_empty
- *
- * This routine initializes the specified chain to contain zero nodes.
- *
- * Chain_Control *the_chain * IN *
- */
-
-#define Chain_Initialize_empty( the_chain ) \
- _Chain_Initialize_empty( the_chain )
-
-
-/*
- * Chain_Are_nodes_equal
- *
- * This function returns TRUE if LEFT and RIGHT are equal,
- * and FALSE otherwise.
- *
- * Chain_Node *left, * IN *
- * Chain_Node *right * IN *
- */
-
-#define Chain_Are_nodes_equal( left, right ) \
- _Chain_Are_nodes_equal( left, right )
-
-
-/*
- * Chain_Extract_unprotected
- *
- * This routine extracts the_node from the chain on which it resides.
- * It does NOT disable interrupts to insure the atomicity of the
- * extract operation.
- *
- * Chain_Node *the_node * IN *
- */
-
-#define Chain_Extract_unprotected( the_node ) \
- _Chain_Extract_unprotected( the_node )
-
-
-/*
- * Chain_Extract
- *
- * This routine extracts the_node from the chain on which it resides.
- * It disables interrupts to insure the atomicity of the
- * extract operation.
- *
- * Chain_Node *the_node * IN *
- */
-
-#define Chain_Extract( the_node ) \
- _Chain_Extract( the_node )
-
-
-/*
- * Chain_Get_unprotected
- *
- * This function removes the first node from the_chain and returns
- * a pointer to that node. If the_chain is empty, then NULL is returned.
- * It does NOT disable interrupts to insure the atomicity of the
- * get operation.
- *
- * Chain_Control *the_chain * IN *
- */
-
-#define Chain_Get_unprotected( the_chain ) \
- _Chain_Get_unprotected( the_chain )
-
-
-/*
- * Chain_Get
- *
- * This function removes the first node from the_chain and returns
- * a pointer to that node. If the_chain is empty, then NULL is returned.
- * It disables interrupts to insure the atomicity of the
- * get operation.
- *
- * Chain_Control *the_chain * IN *
- */
-
-#define Chain_Get( the_chain ) \
- _Chain_Get( the_chain )
-
-
-/*
- * Chain_Get_first_unprotected
- *
- * This function removes the first node from the_chain and returns
- * a pointer to that node. It does NOT disable interrupts to insure
- * the atomicity of the get operation.
- *
- * Chain_Control *the_chain * IN *
- */
-
-#define Chain_Get_first_unprotected( the_chain ) \
- _Chain_Get_first_unprotected( the_chain )
-
-
-/*
- * Chain_Insert_unprotected
- *
- * This routine inserts the_node on a chain immediately following
- * after_node. It does NOT disable interrupts to insure the atomicity
- * of the extract operation.
- *
- * Chain_Node *after_node, * IN *
- * Chain_Node *the_node * IN *
- */
-
-#define Chain_Insert_unprotected( after_node, the_node ) \
- _Chain_Insert_unprotected( after_node, the_node )
-
-
-/*
- * Chain_Insert
- *
- * This routine inserts the_node on a chain immediately following
- * after_node. It disables interrupts to insure the atomicity
- * of the extract operation.
- *
- * Chain_Node *after_node, * IN *
- * Chain_Node *the_node * IN *
- */
-
-#define Chain_Insert( after_node, the_node ) \
- _Chain_Insert( after_node, the_node )
-
-
-/*
- * Chain_Append_unprotected
- *
- * This routine appends the_node onto the end of the_chain.
- * It does NOT disable interrupts to insure the atomicity of the
- * append operation.
- *
- * Chain_Control *the_chain, * IN *
- * Chain_Node *the_node * IN *
- */
-
-#define Chain_Append_unprotected( the_chain, the_node ) \
- _Chain_Append_unprotected( the_chain, the_node )
-
-
-/*
- * Chain_Append
- *
- * This routine appends the_node onto the end of the_chain.
- * It disables interrupts to insure the atomicity of the
- * append operation.
- *
- * Chain_Control *the_chain, * IN *
- * Chain_Node *the_node * IN *
- */
-
-#define Chain_Append( the_chain, the_node ) \
- _Chain_Append( the_chain, the_node )
-
-
-/*
- * Chain_Prepend_unprotected
- *
- * This routine prepends the_node onto the front of the_chain.
- * It does NOT disable interrupts to insure the atomicity of the
- * prepend operation.
- *
- * Chain_Control *the_chain, * IN *
- * Chain_Node *the_node * IN *
- */
-
-#define Chain_Prepend_unprotected( the_chain, the_node ) \
- _Chain_Prepend_unprotected( the_chain, the_node )
-
-
-/*
- * Chain_Prepend
- *
- * This routine prepends the_node onto the front of the_chain.
- * It disables interrupts to insure the atomicity of the
- * prepend operation.
- *
- * Chain_Control *the_chain, * IN *
- * Chain_Node *the_node * IN *
- */
-
-#define Chain_Prepend( the_chain, the_node ) \
- _Chain_Prepend( the_chain, the_node )
-
-
-/*
- * Chain_Head
- *
- * This function returns a pointer to the first node on the chain.
- *
- * Chain_Control *the_chain * IN *
- */
-
-#define Chain_Head( the_chain ) \
- _Chain_Head( the_chain )
-
-
-/*
- * Chain_Tail
- *
- * This function returns a pointer to the last node on the chain.
- *
- * Chain_Control *the_chain * IN *
- */
-
-#define Chain_Tail( the_chain ) \
- _Chain_Tail( the_chain )
-
-
-/*
- * Chain_Is_head
- *
- * This function returns TRUE if the_node is the head of the_chain and
- * FALSE otherwise.
- *
- * Chain_Control *the_chain, * IN *
- * Chain_Node *the_node * IN *
- */
-
-#define Chain_Is_head( the_chain, the_node ) \
- _Chain_Is_head( the_chain, the_node )
-
-
-/*
- * Chain_Is_tail
- *
- * This function returns TRUE if the_node is the tail of the_chain and
- * FALSE otherwise.
- *
- * Chain_Control *the_chain, * IN *
- * Chain_Node *the_node * IN *
- */
-
-#define Chain_Is_tail( the_chain, the_node ) \
- _Chain_Is_tail( the_chain, the_node )
-
-
-/*
- * Chain_Is_first
- *
- * This function returns TRUE if the_node is the first node on a chain and
- * FALSE otherwise.
- *
- * Chain_Node *the_node * IN *
- */
-
-#define Chain_Is_first( the_node ) \
- _Chain_Is_first( the_node )
-
-
-/*
- * Chain_Is_last
- *
- * This function returns TRUE if the_node is the last node on a chain and
- * FALSE otherwise.
- *
- * Chain_Node *the_node * IN *
- */
-
-#define Chain_Is_last( the_node ) \
- _Chain_Is_last( the_node )
-
-
-/*
- * Chain_Is_empty
- *
- * This function returns TRUE if there are no nodes on the_chain and
- * FALSE otherwise.
- *
- * Chain_Control *the_chain * IN *
- */
-
-#define Chain_Is_empty( the_chain ) \
- _Chain_Is_empty( the_chain )
-
-
-/*
- * Chain_Has_only_one_node
- *
- * This function returns TRUE if there is only one node on the_chain and
- * FALSE otherwise.
- *
- * Chain_Control *the_chain * IN *
- */
-
-#define Chain_Has_only_one_node( the_chain ) \
- _Chain_Has_only_one_node( the_chain )
-
-
-/*
- * Chain_Is_null
- *
- * This function returns TRUE if the_chain is NULL and FALSE otherwise.
- *
- * Chain_Control *the_chain * IN *
- */
-
-#define Chain_Is_null( the_chain ) \
- _Chain_Is_null( the_chain )
-
-
-/*
- * Chain_Is_null_node
- *
- * This function returns TRUE if the_node is NULL and FALSE otherwise.
- *
- * Chain_Node *the_node * IN *
- */
-
-#define Chain_Is_null_node( the_node ) \
- _Chain_Is_null_node( the_node )
-
-
-#undef __RTEMS_APPLICATION__
-#include <rtems/score/chain.inl>
-#define __RTEMS_APPLICATION__
-#endif
-/* end of include file */
diff --git a/c/src/exec/libcsupport/include/clockdrv.h b/c/src/exec/libcsupport/include/clockdrv.h
deleted file mode 100644
index d7b0b4671f..0000000000
--- a/c/src/exec/libcsupport/include/clockdrv.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* clock.h
- *
- * This file describes the Clock Driver for all boards.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __CLOCK_DRIVER_h
-#define __CLOCK_DRIVER_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* variables */
-
-extern volatile rtems_unsigned32 Clock_driver_ticks;
-extern rtems_device_major_number rtems_clock_major;
-extern rtems_device_minor_number rtems_clock_minor;
-
-/* default clock driver entry */
-
-#define CLOCK_DRIVER_TABLE_ENTRY \
- { Clock_initialize, NULL, NULL, NULL, NULL, Clock_control }
-
-rtems_device_driver Clock_initialize(
- rtems_device_major_number,
- rtems_device_minor_number,
- void *
-);
-
-rtems_device_driver Clock_control(
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void *pargp
-);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/c/src/exec/libcsupport/include/console.h b/c/src/exec/libcsupport/include/console.h
deleted file mode 100644
index 7bc6b5e3d4..0000000000
--- a/c/src/exec/libcsupport/include/console.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* console.h
- *
- * This file describes the Console Device Driver for all boards.
- * This driver provides support for the standard C Library.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef _CONSOLE_DRIVER_h
-#define _CONSOLE_DRIVER_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define CONSOLE_DRIVER_TABLE_ENTRY \
- { console_initialize, console_open, console_close, \
- console_read, console_write, console_control }
-
-void console_reserve_resources(
- rtems_configuration_table *configuration
-);
-
-rtems_device_driver console_initialize(
- rtems_device_major_number,
- rtems_device_minor_number,
- void *
-);
-
-rtems_device_driver console_open(
- rtems_device_major_number,
- rtems_device_minor_number,
- void *
-);
-
-rtems_device_driver console_close(
- rtems_device_major_number,
- rtems_device_minor_number,
- void *
-);
-
-rtems_device_driver console_read(
- rtems_device_major_number,
- rtems_device_minor_number,
- void *
-);
-
-rtems_device_driver console_write(
- rtems_device_major_number,
- rtems_device_minor_number,
- void *
-);
-
-rtems_device_driver console_control(
- rtems_device_major_number,
- rtems_device_minor_number,
- void *
-);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/c/src/exec/libcsupport/include/iosupp.h b/c/src/exec/libcsupport/include/iosupp.h
deleted file mode 100644
index ef8e01b76d..0000000000
--- a/c/src/exec/libcsupport/include/iosupp.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* iosupp.h
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __IOSUPP_h
-#define __IOSUPP_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* character constants */
-
-#define BS 0x08 /* backspace */
-#define LF 0x0a /* line feed */
-#define CR 0x0d /* carriage return */
-#define XON 0x11 /* control-Q */
-#define XOFF 0x13 /* control-S */
-
-/* structures */
-
-#ifdef IOSUPP_INIT
-#define IOSUPP_EXTERN
-#else
-#undef IOSUPP_EXTERN
-#define IOSUPP_EXTERN extern
-#endif
-
-/* functions */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/c/src/exec/libcsupport/include/motorola/mc68230.h b/c/src/exec/libcsupport/include/motorola/mc68230.h
deleted file mode 100644
index 22ec49c12b..0000000000
--- a/c/src/exec/libcsupport/include/motorola/mc68230.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * mc68230.h -- Low level support code for the Motorola 68230 Parallel
- * Interface/Timer (PIT)
- *
- * Modified by Doug McBride, Colorado Space Grant College
- *
- * Format taken partly from RTEMS code and mostly from Motorola IDP user's
- * manual. RTEMS copyright information below.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __MC68230_H__
-#define __MC68230_H__
-
-/* Some Motorola IDP User manual defines: */
-#define PIT_ADDR 0x00c01003 /* base address of the PIT */
-#define REGOFF 0x04 /* Difference between addresses */
-#define VECT 64
-#define H1VECT 0x00
-#define H2VECT 0x01
-#define H3VECT 0x02
-#define H4VECT 0x03
-
-/*
- * mc68230 register offsets
- */
-#define PGCR 0x00
-#define PSRR 1*REGOFF
-#define PADDR 2*REGOFF
-#define PBDDR 3*REGOFF
-#define PCDDR 4*REGOFF
-#define PIVR 5*REGOFF
-#define PACR 6*REGOFF
-#define PBCR 7*REGOFF
-#define PADR 8*REGOFF
-#define PBDR 9*REGOFF
-#define PAAR 10*REGOFF
-#define PBAR 11*REGOFF
-#define PCDR 12*REGOFF
-#define PITSR 13*REGOFF
-#define TCR 16*REGOFF
-#define TIVR 17*REGOFF
-#define CPRH 19*REGOFF
-#define CPRM 20*REGOFF
-#define CPRL 21*REGOFF
-#define CNTRH 23*REGOFF
-#define CNTRM 24*REGOFF
-#define CNTRL 25*REGOFF
-#define TSR 26*REGOFF
-
-/* Some RTEMS style defines: */
-#ifndef VOL8
-#define VOL8( ptr ) ((volatile rtems_unsigned8 *)(ptr))
-#endif
-
-#define MC68230_WRITE( reg, data ) \
- *(VOL8(PIT_ADDR+reg)) = (data)
-
-#define MC68230_READ( reg, data ) \
- (data) = *(VOL8(PIT_ADDR+reg))
-
-#endif
diff --git a/c/src/exec/libcsupport/include/motorola/mc68681.h b/c/src/exec/libcsupport/include/motorola/mc68681.h
deleted file mode 100644
index 7602097fd8..0000000000
--- a/c/src/exec/libcsupport/include/motorola/mc68681.h
+++ /dev/null
@@ -1,306 +0,0 @@
-/*
- * mc68681-duart.h -- Low level support code for the Motorola mc68681
- * DUART.
- *
- * Originally written by rob@cygnus.com (Rob Savoye) for the libgloss
- * IDP support.
- *
- * $Id$
- */
-
-#ifndef __MC68681_H__
-#define __MC68681_H__
-
-/*
- * In the dark ages when this controller was designed, it was actually
- * possible to access data on unaligned byte boundaries with no penalty.
- * Now we find this chip in configurations in which the registers are
- * at 16-bit, 32-bit, and 64-bit boundaries at the whim of the board
- * designer. If the registers are not at byte addresses, then
- * set this multiplier before including this file to correct the offsets.
- */
-
-#ifndef MC68681_OFFSET_MULTIPLIER
-#define MC68681_OFFSET_MULTIPLIER 1
-#endif
-
-#define __MC68681_REG(_R) ((_R) * MC68681_OFFSET_MULTIPLIER)
-
-/*
- * mc68681 register offsets Read/Write Addresses
- */
-#define MC68681_MODE_REG_1A __MC68681_REG(0) /* MR1A-MR Prior to Read */
-#define MC68681_MODE_REG_2A __MC68681_REG(0) /* MR2A-MR After Read */
-
-#define MC68681_COUNT_MODE_CURRENT_MSB __MC68681_REG(6) /* CTU */
-#define MC68681_COUNTER_TIMER_UPPER_REG __MC68681_REG(6) /* CTU */
-#define MC68681_COUNT_MODE_CURRENT_LSB __MC68681_REG(7) /* CTL */
-#define MC68681_COUNTER_TIMER_LOWER_REG __MC68681_REG(7) /* CTL */
-#define MC68681_INTERRUPT_VECTOR_REG __MC68681_REG(12) /* IVR */
-
-#define MC68681_MODE_REG_1B __MC68681_REG(8) /* MR1B-MR Prior to Read */
-#define MC68681_MODE_REG_2B __MC68681_REG(8) /* MR2BA-MR After Read */
-
-/*
- * mc68681 register offsets Read Only Addresses
- */
-#define MC68681_STATUS_REG_A __MC68681_REG(1) /* SRA */
-#define MC68681_MASK_ISR_REG __MC68681_REG(2) /* MISR */
-#define MC68681_RECEIVE_BUFFER_A __MC68681_REG(3) /* RHRA */
-#define MC68681_INPUT_PORT_CHANGE_REG __MC68681_REG(4) /* IPCR */
-#define MC68681_INTERRUPT_STATUS_REG __MC68681_REG(5) /* ISR */
-#define MC68681_STATUS_REG_B __MC68681_REG(9) /* SRB */
-#define MC68681_RECEIVE_BUFFER_B __MC68681_REG(11) /* RHRB */
-#define MC68681_INPUT_PORT __MC68681_REG(13) /* IP */
-#define MC68681_START_COUNT_CMD __MC68681_REG(14) /* SCC */
-#define MC68681_STOP_COUNT_CMD __MC68681_REG(15) /* STC */
-
-/*
- * mc68681 register offsets Write Only Addresses
- */
-#define MC68681_CLOCK_SELECT_REG_A __MC68681_REG(1) /* CSRA */
-#define MC68681_COMMAND_REG_A __MC68681_REG(2) /* CRA */
-#define MC68681_TRANSMIT_BUFFER_A __MC68681_REG(3) /* THRA */
-#define MC68681_AUX_CTRL_REG __MC68681_REG(4) /* ACR */
-#define MC68681_INTERRUPT_MASK_REG __MC68681_REG(5) /* IMR */
-#define MC68681_CLOCK_SELECT_REG_B __MC68681_REG(9) /* CSRB */
-#define MC68681_COMMAND_REG_B __MC68681_REG(10) /* CRB */
-#define MC68681_TRANSMIT_BUFFER_B __MC68681_REG(11) /* THRB */
-#define MC68681_OUTPUT_PORT_CONFIG_REG __MC68681_REG(13) /* OPCR */
-#define MC68681_OUTPUT_PORT_SET_REG __MC68681_REG(14) /* SOPBC */
-#define MC68681_OUTPUT_PORT_RESET_BITS __MC68681_REG(15) /* COPBC */
-
-
-#ifndef MC6681_VOL
-#define MC6681_VOL( ptr ) ((volatile unsigned char *)(ptr))
-#endif
-
-#define MC68681_WRITE( _base, _reg, _data ) \
- *((volatile unsigned char *)_base+_reg) = (_data)
-
-#define MC68681_READ( _base, _reg ) \
- *(((volatile unsigned char *)_base+_reg))
-
-
-
-#define MC68681_CLEAR 0x00
-
-#define MC68681_PORT_A 0
-#define MC68681_PORT_B 1
-
-/*
- * DUART Command Register Definitions:
- *
- * MC68681_COMMAND_REG_A,MC68681_COMMAND_REG_B
- */
-#define MC68681_MODE_REG_ENABLE_RX 0x01
-#define MC68681_MODE_REG_DISABLE_RX 0x02
-#define MC68681_MODE_REG_ENABLE_TX 0x04
-#define MC68681_MODE_REG_DISABLE_TX 0x08
-#define MC68681_MODE_REG_RESET_MR_PTR 0x10
-#define MC68681_MODE_REG_RESET_RX 0x20
-#define MC68681_MODE_REG_RESET_TX 0x30
-#define MC68681_MODE_REG_RESET_ERROR 0x40
-#define MC68681_MODE_REG_RESET_BREAK 0x50
-#define MC68681_MODE_REG_START_BREAK 0x60
-#define MC68681_MODE_REG_STOP_BREAK 0x70
-#define MC68681_MODE_REG_SET_RX_BRG 0x80
-#define MC68681_MODE_REG_CLEAR_RX_BRG 0x90
-#define MC68681_MODE_REG_SET_TX_BRG 0xa0
-#define MC68681_MODE_REG_CLEAR_TX_BRG 0xb0
-#define MC68681_MODE_REG_SET_STANDBY 0xc0
-#define MC68681_MODE_REG_SET_ACTIVE 0xd0
-
-/*
- * Mode Register Definitions
- *
- * MC68681_MODE_REG_1A
- * MC68681_MODE_REG_1B
- */
-#define MC68681_5BIT_CHARS 0x00
-#define MC68681_6BIT_CHARS 0x01
-#define MC68681_7BIT_CHARS 0x02
-#define MC68681_8BIT_CHARS 0x03
-
-#define MC68681_ODD_PARITY 0x00
-#define MC68681_EVEN_PARITY 0x04
-
-#define MC68681_WITH_PARITY 0x00
-#define MC68681_FORCE_PARITY 0x08
-#define MC68681_NO_PARITY 0x10
-#define MC68681_MULTI_DROP 0x18
-
-#define MC68681_ERR_MODE_CHAR 0x00
-#define MC68681_ERR_MODE_BLOCK 0x20
-
-#define MC68681_RX_INTR_RX_READY 0x00
-#define MC68681_RX_INTR_FFULL 0x40
-
-#define MC68681_NO_RX_RTS_CTL 0x00
-#define MC68681_RX_RTS_CTRL 0x80
-
-
-/*
- * Mode Register Definitions
- *
- * MC68681_MODE_REG_2A
- * MC68681_MODE_REG_2B
- */
-#define MC68681_STOP_BIT_LENGTH__563 0x00
-#define MC68681_STOP_BIT_LENGTH__625 0x01
-#define MC68681_STOP_BIT_LENGTH__688 0x02
-#define MC68681_STOP_BIT_LENGTH__75 0x03
-#define MC68681_STOP_BIT_LENGTH__813 0x04
-#define MC68681_STOP_BIT_LENGTH__875 0x05
-#define MC68681_STOP_BIT_LENGTH__938 0x06
-#define MC68681_STOP_BIT_LENGTH_1 0x07
-#define MC68681_STOP_BIT_LENGTH_1_563 0x08
-#define MC68681_STOP_BIT_LENGTH_1_625 0x09
-#define MC68681_STOP_BIT_LENGTH_1_688 0x0a
-#define MC68681_STOP_BIT_LENGTH_1_75 0x0b
-#define MC68681_STOP_BIT_LENGTH_1_813 0x0c
-#define MC68681_STOP_BIT_LENGTH_1_875 0x0d
-#define MC68681_STOP_BIT_LENGTH_1_938 0x0e
-#define MC68681_STOP_BIT_LENGTH_2 0x0f
-
-#define MC68681_CTS_ENABLE_TX 0x10
-#define MC68681_TX_RTS_CTRL 0x20
-
-#define MC68681_CHANNEL_MODE_NORMAL 0x00
-#define MC68681_CHANNEL_MODE_ECHO 0x40
-#define MC68681_CHANNEL_MODE_LOCAL_LOOP 0x80
-#define MC68681_CHANNEL_MODE_REMOTE_LOOP 0xc0
-
-/*
- * Status Register Definitions
- *
- * MC68681_STATUS_REG_A, MC68681_STATUS_REG_B
- */
-#define MC68681_RX_READY 0x01
-#define MC68681_FFULL 0x02
-#define MC68681_TX_READY 0x04
-#define MC68681_TX_EMPTY 0x08
-#define MC68681_OVERRUN_ERROR 0x10
-#define MC68681_PARITY_ERROR 0x20
-#define MC68681_FRAMING_ERROR 0x40
-#define MC68681_RECEIVED_BREAK 0x80
-
-
-/*
- * Interupt Status Register Definitions.
- *
- * MC68681_INTERRUPT_STATUS_REG
- */
-
-
-/*
- * Interupt Mask Register Definitions
- *
- * MC68681_INTERRUPT_MASK_REG
- */
-#define MC68681_IR_TX_READY_A 0x01
-#define MC68681_IR_RX_READY_A 0x02
-#define MC68681_IR_BREAK_A 0x04
-#define MC68681_IR_COUNTER_READY 0x08
-#define MC68681_IR_TX_READY_B 0x10
-#define MC68681_IR_RX_READY_B 0x20
-#define MC68681_IR_BREAK_B 0x40
-#define MC68681_IR_INPUT_PORT_CHANGE 0x80
-
-/*
- * Status Register Definitions.
- *
- * MC68681_STATUS_REG_A,MC68681_STATUS_REG_B
- */
-#define MC68681_STATUS_RXRDY 0x01
-#define MC68681_STATUS_FFULL 0x02
-#define MC68681_STATUS_TXRDY 0x04
-#define MC68681_STATUS_TXEMT 0x08
-#define MC68681_STATUS_OVERRUN_ERROR 0x10
-#define MC68681_STATUS_PARITY_ERROR 0x20
-#define MC68681_STATUS_FRAMING_ERROR 0x40
-#define MC68681_STATUS_RECEIVED_BREAK 0x80
-
-/*
- * Definitions for the Interrupt Vector Register:
- *
- * MC68681_INTERRUPT_VECTOR_REG
- */
-#define MC68681_INTERRUPT_VECTOR_INIT 0x0f
-
-/*
- * Definitions for the Auxiliary Control Register
- *
- * MC68681_AUX_CTRL_REG
- */
-#define MC68681_AUX_BRG_SET1 0x00
-#define MC68681_AUX_BRG_SET2 0x80
-
-
-/*
- * The following Baud rates assume the X1 clock pin is driven with a
- * 3.6864 MHz signal. If a different frequency is used the DUART channel
- * is running at the follwoing baud rate:
- * ((Table Baud Rate)*frequency)/3.6864 MHz
- */
-
-/*
- * Definitions for the Clock Select Register:
- *
- * MC68681_CLOCK_SELECT_REG_A,MC68681_CLOCK_SELECT_REG_A
- *
- * Note: ACR[7] is the MSB of the Auxiliary Control register
- * X is the extend bit.
- * CRA - 0x08 Set Rx BRG Select Extend Bit (X=1)
- * CRA - 0x09 Clear Rx BRG Select Extend Bit (X=0)
- * CRB - 0x0a Set Tx BRG Select Extend Bit (X=1)
- * CRB - 0x0b Clear Tx BRG Select Extend Bit (x=1)
- */
-#define MC68681_BAUD_RATE_MASK_50 0x00 /* ACR[7]=0,X=0 */
- /* ARC[7]=1,X=1 */
-#define MC68681_BAUD_RATE_MASK_75 0x00 /* ACR[7]=0,X=0 */
- /* ARC[7]=1,X=1 */
-#define MC68681_BAUD_RATE_MASK_110 0x01
-#define MC68681_BAUD_RATE_MASK_134_5 0x02
-#define MC68681_BAUD_RATE_MASK_150 0x03 /* ACR[7]=0,X=0 */
- /* ARC[7]=1,X=1 */
-#define MC68681_BAUD_RATE_MASK_200 0x03 /* ACR[7]=0,X=0 */
- /* ARC[7]=1,X=1 */
-#define MC68681_BAUD_RATE_MASK_300 0x04 /* ACR[7]=0,X=0 */
- /* ARC[7]=1,X=1 */
-#define MC68681_BAUD_RATE_MASK_600 0x05 /* ACR[7]=0,X=0 */
- /* ARC[7]=1,X=1 */
-#define MC68681_BAUD_RATE_MASK_1050 0x07 /* ACR[7]=0,X=0 */
- /* ARC[7]=1,X=1 */
-#define MC68681_BAUD_RATE_MASK_1200 0x06 /* ACR[7]=0,X=0 */
- /* ARC[7]=1,X=1 */
-#define MC68681_BAUD_RATE_MASK_1800 0x0a /* ACR[7]=0,X=0 */
- /* ARC[7]=1,X=1 */
-#define MC68681_BAUD_RATE_MASK_2400 0x08 /* ACR[7]=0,X=0 */
- /* ARC[7]=1,X=1 */
-#define MC68681_BAUD_RATE_MASK_3600 0x04 /* ACR[7]=0,X=0 */
- /* ARC[7]=1,X=1 */
-#define MC68681_BAUD_RATE_MASK_4800 0x09
-#define MC68681_BAUD_RATE_MASK_7200 0x0a /* ACR[7]=0,X=0 */
- /* ARC[7]=1,X=1 */
-#define MC68681_BAUD_RATE_MASK_9600 0xbb
-
-#define MC68681_BAUD_RATE_MASK_14_4K 0x05 /* ACR[7]=0,X=0 */
- /* ARC[7]=1,X=1 */
-#define MC68681_BAUD_RATE_MASK_19_2K 0xcc /* ACR[7]=1,X=0 */
- /* ARC[7]=0,X=1 */
-#define MC68681_BAUD_RATE_MASK_28_8K 0x06 /* ACR[7]=0,X=0 */
- /* ARC[7]=1,X=1 */
-#define MC68681_BAUD_RATE_MASK_38_4K 0xcc /* ACR[7]=0,X=0 */
- /* ARC[7]=1,X=1 */
-#define MC68681_BAUD_RATE_MASK_57_6K 0x07 /* ACR[7]=0,X=0 */
- /* ARC[7]=1,X=1 */
-#define MC68681_BAUD_RATE_MASK_115_5K 0x08
-#define MC68681_BAUD_RATE_MASK_TIMER 0xdd
-#define MC68681_BAUD_RATE_MASK_TIMER_16X 0xee
-#define MC68681_BAUD_RATE_MASK_TIMER_1X 0xff
-
-#endif
-
-
-
diff --git a/c/src/exec/libcsupport/include/ringbuf.h b/c/src/exec/libcsupport/include/ringbuf.h
deleted file mode 100644
index 8c80aaf9c8..0000000000
--- a/c/src/exec/libcsupport/include/ringbuf.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * ringbuf.h
- *
- * This file provides simple ring buffer functionality.
- *
- * $Id$
- */
-
-#ifndef __RINGBUF_H__
-#define __RINGBUF_H__
-
-#ifndef RINGBUF_QUEUE_LENGTH
-#define RINGBUF_QUEUE_LENGTH 128
-#endif
-
-typedef struct {
- char buffer[RINGBUF_QUEUE_LENGTH];
- volatile int head;
- volatile int tail;
-} Ring_buffer_t;
-
-#define Ring_buffer_Initialize( _buffer ) \
- do { \
- (_buffer)->head = (_buffer)->tail = 0; \
- } while ( 0 )
-
-#define Ring_buffer_Is_empty( _buffer ) \
- ( (_buffer)->head == (_buffer)->tail )
-
-#define Ring_buffer_Is_full( _buffer ) \
- ( (_buffer)->head == ((_buffer)->tail + 1) % RINGBUF_QUEUE_LENGTH )
-
-#define Ring_buffer_Add_character( _buffer, _ch ) \
- do { \
- rtems_unsigned32 isrlevel; \
- \
- rtems_interrupt_disable( isrlevel ); \
- (_buffer)->tail = ((_buffer)->tail+1) % RINGBUF_QUEUE_LENGTH; \
- (_buffer)->buffer[ (_buffer)->tail ] = (_ch); \
- rtems_interrupt_enable( isrlevel ); \
- } while ( 0 )
-
-#define Ring_buffer_Remove_character( _buffer, _ch ) \
- do { \
- rtems_unsigned32 isrlevel; \
- \
- rtems_interrupt_disable( isrlevel ); \
- (_buffer)->head = ((_buffer)->head+1) % RINGBUF_QUEUE_LENGTH; \
- (_ch) = (_buffer)->buffer[ (_buffer)->head ]; \
- rtems_interrupt_enable( isrlevel ); \
- } while ( 0 )
-
-#endif
diff --git a/c/src/exec/libcsupport/include/rtems/assoc.h b/c/src/exec/libcsupport/include/rtems/assoc.h
deleted file mode 100644
index 1982d654ac..0000000000
--- a/c/src/exec/libcsupport/include/rtems/assoc.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- *
- * Rtems associativity routines. Mainly used to convert a value from
- * one space to another (eg: our errno's to host errno's and v.v)
- *
- *
- * $Id$
- */
-
-#ifndef _INCLUDE_ASSOC_H
-#define _INCLUDE_ASSOC_H
-
-typedef struct {
- const char *name;
- unsigned32 local_value;
- unsigned32 remote_value;
-} rtems_assoc_t;
-
-/*
- * Flag/marker for optional default value in each table
- */
-
-#define RTEMS_ASSOC_DEFAULT_NAME "(default)"
-
-const rtems_assoc_t *rtems_assoc_ptr_by_name(const rtems_assoc_t *, const char *);
-const rtems_assoc_t *rtems_assoc_ptr_by_value(const rtems_assoc_t *, unsigned32);
-const rtems_assoc_t *rtems_assoc_ptr_by_remote(const rtems_assoc_t *, unsigned32);
-
-unsigned32 rtems_assoc_remote_by_local(const rtems_assoc_t *, unsigned32);
-unsigned32 rtems_assoc_local_by_remote(const rtems_assoc_t *, unsigned32);
-unsigned32 rtems_assoc_remote_by_name(const rtems_assoc_t *, const char *);
-unsigned32 rtems_assoc_local_by_name(const rtems_assoc_t *, const char *);
-const char *rtems_assoc_name_by_local(const rtems_assoc_t *, unsigned32);
-const char *rtems_assoc_name_by_remote(const rtems_assoc_t *, unsigned32);
-
-unsigned32 rtems_assoc_remote_by_local_bitfield(const rtems_assoc_t *, unsigned32);
-char *rtems_assoc_name_by_local_bitfield(const rtems_assoc_t *, unsigned32, char *);
-char *rtems_assoc_name_by_remote_bitfield(const rtems_assoc_t *, unsigned32, char *);
-unsigned32 rtems_assoc_local_by_remote_bitfield(const rtems_assoc_t *, unsigned32);
-
-
-#endif /* ! _INCLUDE_ASSOC_H */
diff --git a/c/src/exec/libcsupport/include/rtems/error.h b/c/src/exec/libcsupport/include/rtems/error.h
deleted file mode 100644
index a0698afb5d..0000000000
--- a/c/src/exec/libcsupport/include/rtems/error.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Defines and externs for rtems error reporting
- *
- * $Id$
- */
-
-#ifndef __RTEMS_ERROR_h
-#define __RTEMS_ERROR_h
-
-/*
- * rtems_error() and rtems_panic() support
- */
-
-#define RTEMS_ERROR_ERRNO (1<<((sizeof(int) * 8) - 2)) /* hi bit; use 'errno' */
-#define RTEMS_ERROR_PANIC (RTEMS_ERROR_ERRNO / 2) /* err fatal; no return */
-#define RTEMS_ERROR_ABORT (RTEMS_ERROR_ERRNO / 4) /* err is fatal; panic */
-
-#define RTEMS_ERROR_MASK (RTEMS_ERROR_ERRNO | RTEMS_ERROR_ABORT | \
- RTEMS_ERROR_PANIC) /* all */
-
-const char *rtems_status_text(rtems_status_code);
-int rtems_error(int error_code, const char *printf_format, ...);
-#ifdef __GNUC__
-void rtems_panic(const char *printf_format, ...);
-/*
- * We should be able to use this attribute but gcc complains that
- * rtems_panic does in fact return. :(
- *
- * __attribute__ ((__noreturn__));
- */
-#else
-void rtems_panic(const char *printf_format, ...);
-#endif
-
-extern int rtems_panic_in_progress;
-
-#endif
-/* end of include file */
diff --git a/c/src/exec/libcsupport/include/rtems/libcsupport.h b/c/src/exec/libcsupport/include/rtems/libcsupport.h
deleted file mode 100644
index 4c6764c1d4..0000000000
--- a/c/src/exec/libcsupport/include/rtems/libcsupport.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* libcsupport.h
- *
- * This include file contains the information regarding the
- * RTEMS specific support for the standard C library.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __LIBC_SUPPORT_h
-#define __LIBC_SUPPORT_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <sys/types.h>
-
-void RTEMS_Malloc_Initialize(
- void *start,
- size_t length,
- size_t sbrk_amount
-);
-
-extern void malloc_dump(void);
-extern void malloc_walk(size_t source, size_t printf_enabled);
-extern void libc_init(int reentrant);
-extern int host_errno(void);
-extern void fix_syscall_errno(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/c/src/exec/libcsupport/include/rtems/libio.h b/c/src/exec/libcsupport/include/rtems/libio.h
deleted file mode 100644
index 3cc4648863..0000000000
--- a/c/src/exec/libcsupport/include/rtems/libio.h
+++ /dev/null
@@ -1,584 +0,0 @@
-/*
- * System call and file system interface definition
- *
- * General purpose communication channel for RTEMS to allow UNIX/POSIX
- * system call behavior under RTEMS. Initially this supported only
- * IO to devices but has since been enhanced to support networking
- * and support for mounted file systems.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef _RTEMS_LIBIO_H
-#define _RTEMS_LIBIO_H
-
-#include <rtems.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-/*
- * Define data types which must be constructed using forward references.
- */
-
-typedef struct rtems_libio_tt rtems_libio_t;
-
-struct rtems_filesystem_location_info_tt;
-typedef struct rtems_filesystem_location_info_tt
- rtems_filesystem_location_info_t;
-
-struct rtems_filesystem_mount_table_entry_tt;
-typedef struct rtems_filesystem_mount_table_entry_tt
- rtems_filesystem_mount_table_entry_t;
-
-/*
- * Valid RTEMS file types.
- */
-typedef enum {
- RTEMS_FILESYSTEM_DIRECTORY,
- RTEMS_FILESYSTEM_DEVICE,
- RTEMS_FILESYSTEM_HARD_LINK,
- RTEMS_FILESYSTEM_SYM_LINK,
- RTEMS_FILESYSTEM_MEMORY_FILE
-} rtems_filesystem_node_types_t;
-
-/*
- * File Handler Operations Table
- */
-
-typedef int (*rtems_filesystem_open_t)(
- rtems_libio_t *iop,
- const char *pathname,
- unsigned32 flag,
- unsigned32 mode
-);
-
-typedef int (*rtems_filesystem_close_t)(
- rtems_libio_t *iop
-);
-
-typedef int (*rtems_filesystem_read_t)(
- rtems_libio_t *iop,
- void *buffer,
- unsigned32 count
-);
-
-typedef int (*rtems_filesystem_write_t)(
- rtems_libio_t *iop,
- const void *buffer,
- unsigned32 count
-);
-
-typedef int (*rtems_filesystem_ioctl_t)(
- rtems_libio_t *iop,
- unsigned32 command,
- void *buffer
-);
-
-typedef int (*rtems_filesystem_lseek_t)(
- rtems_libio_t *iop,
- off_t length,
- int whence
-);
-
-typedef int (*rtems_filesystem_fstat_t)(
- rtems_filesystem_location_info_t *loc,
- struct stat *buf
-);
-
-typedef int (*rtems_filesystem_fchmod_t)(
- rtems_filesystem_location_info_t *loc,
- mode_t mode
-);
-
-typedef int (*rtems_filesystem_ftruncate_t)(
- rtems_libio_t *iop,
- off_t length
-);
-
-typedef int (*rtems_filesystem_fpathconf_t)(
- rtems_libio_t *iop,
- int name
-);
-
-typedef int (*rtems_filesystem_fsync_t)(
- rtems_libio_t *iop
-);
-
-typedef int (*rtems_filesystem_fdatasync_t)(
- rtems_libio_t *iop
-);
-
-typedef int (*rtems_filesystem_fcntl_t)(
- int cmd,
- rtems_libio_t *iop
-);
-
-typedef int (*rtems_filesystem_rmnod_t)(
- rtems_filesystem_location_info_t *pathloc /* IN */
-);
-
-typedef struct {
- rtems_filesystem_open_t open;
- rtems_filesystem_close_t close;
- rtems_filesystem_read_t read;
- rtems_filesystem_write_t write;
- rtems_filesystem_ioctl_t ioctl;
- rtems_filesystem_lseek_t lseek;
- rtems_filesystem_fstat_t fstat;
- rtems_filesystem_fchmod_t fchmod;
- rtems_filesystem_ftruncate_t ftruncate;
- rtems_filesystem_fpathconf_t fpathconf;
- rtems_filesystem_fsync_t fsync;
- rtems_filesystem_fdatasync_t fdatasync;
- rtems_filesystem_fcntl_t fcntl;
- rtems_filesystem_rmnod_t rmnod;
-} rtems_filesystem_file_handlers_r;
-
-/*
- * File System Operations Table
- */
-
-/*
- * XXX
- * This routine does not allocate any space and rtems_filesystem_freenode_t
- * is not called by the generic after calling this routine.
- * ie. node_access does not have to contain valid data when the
- * routine returns.
- */
-
-typedef int (*rtems_filesystem_mknod_t)(
- const char *path, /* IN */
- mode_t mode, /* IN */
- dev_t dev, /* IN */
- rtems_filesystem_location_info_t *pathloc /* IN/OUT */
-);
-
-/*
- * rtems_filesystem_freenode_t must be called by the generic after
- * calling this routine
- */
-
-typedef int (*rtems_filesystem_evalpath_t)(
- const char *pathname, /* IN */
- int flags, /* IN */
- rtems_filesystem_location_info_t *pathloc /* IN/OUT */
-);
-
-typedef int (*rtems_filesystem_evalmake_t)(
- const char *path, /* IN */
- rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
- const char **name /* OUT */
-);
-
-typedef int (*rtems_filesystem_link_t)(
- rtems_filesystem_location_info_t *to_loc, /* IN */
- rtems_filesystem_location_info_t *parent_loc, /* IN */
- const char *name /* IN */
-);
-
-typedef int (*rtems_filesystem_unlink_t)(
- rtems_filesystem_location_info_t *pathloc /* IN */
-);
-
-typedef int (*rtems_filesystem_chown_t)(
- rtems_filesystem_location_info_t *pathloc, /* IN */
- uid_t owner, /* IN */
- gid_t group /* IN */
-);
-
-typedef int (*rtems_filesystem_freenode_t)(
- rtems_filesystem_location_info_t *pathloc /* IN */
-);
-
-typedef int (* rtems_filesystem_mount_t ) (
- rtems_filesystem_mount_table_entry_t *mt_entry /* in */
-);
-
-typedef int (* rtems_filesystem_fsmount_me_t )(
- rtems_filesystem_mount_table_entry_t *mt_entry
-);
-
-typedef int (* rtems_filesystem_unmount_t ) (
- rtems_filesystem_mount_table_entry_t *mt_entry /* in */
-);
-
-typedef int (* rtems_filesystem_fsunmount_me_t ) (
- rtems_filesystem_mount_table_entry_t *mt_entry /* in */
-);
-
-typedef rtems_filesystem_node_types_t (* rtems_filesystem_node_type_t) (
- rtems_filesystem_location_info_t *pathloc /* in */
-);
-
-typedef int (* rtems_filesystem_utime_t)(
- rtems_filesystem_location_info_t *pathloc, /* IN */
- time_t actime, /* IN */
- time_t modtime /* IN */
-);
-
-typedef int (*rtems_filesystem_evaluate_link_t)(
- rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
- int flags /* IN */
-);
-
-typedef int (*rtems_filesystem_symlink_t)(
- rtems_filesystem_location_info_t *loc, /* IN */
- const char *link_name, /* IN */
- const char *node_name
-);
-
-typedef int (*rtems_filesystem_readlink_t)(
- rtems_filesystem_location_info_t *loc, /* IN */
- char *buf, /* OUT */
- size_t bufsize
-);
-
-/*
- * operations table that must be defined for every file system.
- */
-
-/*
- * File system types
- */
-typedef struct {
- rtems_filesystem_evalpath_t evalpath;
- rtems_filesystem_evalmake_t evalformake;
- rtems_filesystem_link_t link;
- rtems_filesystem_unlink_t unlink;
- rtems_filesystem_node_type_t node_type;
- rtems_filesystem_mknod_t mknod;
- rtems_filesystem_chown_t chown;
- rtems_filesystem_freenode_t freenod;
- rtems_filesystem_mount_t mount;
- rtems_filesystem_fsmount_me_t fsmount_me;
- rtems_filesystem_unmount_t unmount;
- rtems_filesystem_fsunmount_me_t fsunmount_me;
- rtems_filesystem_utime_t utime;
- rtems_filesystem_evaluate_link_t eval_link;
- rtems_filesystem_symlink_t symlink;
- rtems_filesystem_readlink_t readlink;
-} rtems_filesystem_operations_table;
-
-#define IMFS_FILE_SYSTEM IMFS_ops
-extern rtems_filesystem_operations_table IMFS_ops;
-
-
-/*
- * Structure used to determine a location/filesystem in the tree.
- */
-
-struct rtems_filesystem_location_info_tt
-{
- void *node_access;
- rtems_filesystem_file_handlers_r *handlers;
- rtems_filesystem_operations_table *ops;
- rtems_filesystem_mount_table_entry_t *mt_entry;
-};
-
-/*
- * Structure used to contain file system specific information which
- * is required to support fpathconf().
- */
-
-typedef struct {
- int link_max;
- int max_canon;
- int max_input;
- int name_max;
- int path_max;
- int pipe_buf;
- int posix_async_io;
- int posix_chown_restrictions;
- int posix_no_trunc;
- int posix_prio_io;
- int posix_sync_io;
- int posix_vdisable;
-} rtems_filesystem_limits_and_options_t;
-
-/*
- * Structure for a mount table entry.
- */
-
-struct rtems_filesystem_mount_table_entry_tt {
- Chain_Node Node;
- rtems_filesystem_location_info_t mt_point_node;
- rtems_filesystem_location_info_t mt_fs_root;
- int options;
- void *fs_info;
-
- rtems_filesystem_limits_and_options_t pathconf_limits_and_options;
-
- /*
- * When someone adds a mounted filesystem on a real device,
- * this will need to be used.
- *
- * The best option long term for this is probably an open file descriptor.
- */
- char *dev;
-};
-
-/*
- * Valid RTEMS file systems options
- */
-
-typedef enum
-{
- RTEMS_FILESYSTEM_READ_ONLY,
- RTEMS_FILESYSTEM_READ_WRITE,
- RTEMS_FILESYSTEM_BAD_OPTIONS
-} rtems_filesystem_options_t;
-
-
-/*
- * An open file data structure, indexed by 'fd'
- * TODO:
- * should really have a separate per/file data structure that this
- * points to (eg: size, offset, driver, pathname should be in that)
- */
-
-struct rtems_libio_tt {
- rtems_driver_name_t *driver;
- off_t size; /* size of file */
- off_t offset; /* current offset into file */
- unsigned32 flags;
- rtems_filesystem_location_info_t pathinfo;
- Objects_Id sem;
- unsigned32 data0; /* private to "driver" */
- void *data1; /* ... */
- void *file_info; /* used by file handlers */
- rtems_filesystem_file_handlers_r *handlers; /* type specific handlers */
-};
-
-/*
- * param block for read/write
- * Note: it must include 'offset' instead of using iop's offset since
- * we can have multiple outstanding i/o's on a device.
- */
-
-typedef struct {
- rtems_libio_t *iop;
- off_t offset;
- unsigned8 *buffer;
- unsigned32 count;
- unsigned32 flags;
- unsigned32 bytes_moved;
-} rtems_libio_rw_args_t;
-
-/*
- * param block for open/close
- */
-
-typedef struct {
- rtems_libio_t *iop;
- unsigned32 flags;
- unsigned32 mode;
-} rtems_libio_open_close_args_t;
-
-/*
- * param block for ioctl
- */
-
-typedef struct {
- rtems_libio_t *iop;
- unsigned32 command;
- void *buffer;
- unsigned32 ioctl_return;
-} rtems_libio_ioctl_args_t;
-
-/*
- * Values for 'flag'
- */
-
-#define LIBIO_FLAGS_NO_DELAY 0x0001 /* return immediately if no data */
-#define LIBIO_FLAGS_READ 0x0002 /* reading */
-#define LIBIO_FLAGS_WRITE 0x0004 /* writing */
-#define LIBIO_FLAGS_OPEN 0x0100 /* device is open */
-#define LIBIO_FLAGS_APPEND 0x0200 /* all writes append */
-#define LIBIO_FLAGS_CREATE 0x0400 /* create file */
-#define LIBIO_FLAGS_CLOSE_ON_EXEC 0x0800 /* close on process exec() */
-#define LIBIO_FLAGS_READ_WRITE (LIBIO_FLAGS_READ | LIBIO_FLAGS_WRITE)
-
-void rtems_libio_init(void);
-
-/*
- * External I/O handlers
- */
-
-typedef int (*rtems_libio_open_t)(
- const char *pathname,
- unsigned32 flag,
- unsigned32 mode
-);
-
-typedef int (*rtems_libio_close_t)(
- int fd
-);
-
-typedef int (*rtems_libio_read_t)(
- int fd,
- void *buffer,
- unsigned32 count
-);
-
-typedef int (*rtems_libio_write_t)(
- int fd,
- const void *buffer,
- unsigned32 count
-);
-
-typedef int (*rtems_libio_ioctl_t)(
- int fd,
- unsigned32 command,
- void *buffer
-);
-
-typedef int (*rtems_libio_lseek_t)(
- int fd,
- off_t offset,
- int whence
-);
-
-/*
- * IOCTL values
- */
-
-#define RTEMS_IO_GET_ATTRIBUTES 1
-#define RTEMS_IO_SET_ATTRIBUTES 2
-#define RTEMS_IO_TCDRAIN 3
-
-/*
- * The following macros are used to build up the permissions sets
- * used to check permissions. These are similar in style to the
- * mode_t bits and should stay compatible with them.
- */
-
-#define RTEMS_LIBIO_PERMS_READ S_IROTH
-#define RTEMS_LIBIO_PERMS_WRITE S_IWOTH
-#define RTEMS_LIBIO_PERMS_RDWR (S_IROTH|S_IWOTH)
-#define RTEMS_LIBIO_PERMS_EXEC S_IXOTH
-#define RTEMS_LIBIO_PERMS_SEARCH RTEMS_LIBIO_PERMS_EXEC
-#define RTEMS_LIBIO_PERMS_RWX S_IRWXO
-
-/*
- * Macros
- */
-
-#define rtems_filesystem_make_dev_t( _major, _minor ) \
- ((((dev_t)(_major)) << 32) | (dev_t)(_minor))
-
-#define rtems_filesystem_split_dev_t( _dev, _major, _minor ) \
- do { \
- (_major) = (rtems_device_major_number) ((_dev) >> 32); \
- (_minor) = (rtems_device_minor_number) ((_dev) & 0xFFFFFFFF); \
- } while(0)
-
-/*
- * Verifies that the permission flag is valid.
- */
-#define rtems_libio_is_valid_perms( _perm ) \
- (~ ((~RTEMS_LIBIO_PERMS_RWX) & _perm ))
-
-
-/*
- * Prototypes for filesystem
- */
-
-void rtems_filesystem_initialize( void );
-
-
-/*
- * Callbacks from TERMIOS routines to device-dependent code
- */
-
-#include <termios.h>
-
-typedef struct rtems_termios_callbacks {
- int (*firstOpen)(int major, int minor, void *arg);
- int (*lastClose)(int major, int minor, void *arg);
- int (*pollRead)(int minor);
- int (*write)(int minor, const char *buf, int len);
- int (*setAttributes)(int minor, const struct termios *t);
- int (*stopRemoteTx)(int minor);
- int (*startRemoteTx)(int minor);
- int outputUsesInterrupts;
-} rtems_termios_callbacks;
-
-/*
- * Device-independent TERMIOS routines
- */
-
-void rtems_termios_initialize (void);
-
-rtems_status_code rtems_termios_open (
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void *arg,
- const rtems_termios_callbacks *callbacks
-);
-
-rtems_status_code rtems_termios_close(
- void *arg
-);
-
-rtems_status_code rtems_termios_read(
- void *arg
-);
-
-rtems_status_code rtems_termios_write(
- void *arg
-);
-
-rtems_status_code rtems_termios_ioctl(
- void *arg
-);
-
-int rtems_termios_enqueue_raw_characters(
- void *ttyp,
- char *buf,
- int len
-);
-
-int rtems_termios_dequeue_characters(
- void *ttyp,
- int len
-);
-
-void rtems_termios_reserve_resources(
- rtems_configuration_table *configuration,
- rtems_unsigned32 number_of_devices
-);
-
-int unmount(
- const char *mount_path
-);
-
-int mount(
- rtems_filesystem_mount_table_entry_t **mt_entry,
- rtems_filesystem_operations_table *fs_ops,
- rtems_filesystem_options_t fsoptions,
- char *device,
- char *mount_point
-);
-
-/*
- * Boot Time Mount Table Structure
- */
-
-typedef struct {
- rtems_filesystem_operations_table *fs_ops;
- rtems_filesystem_options_t fsoptions;
- char *device;
- char *mount_point;
-} rtems_filesystem_mount_table_t;
-
-extern rtems_filesystem_mount_table_t *rtems_filesystem_mount_table;
-extern int rtems_filesystem_mount_table_size;
-
-#endif /* _RTEMS_LIBIO_H */
diff --git a/c/src/exec/libcsupport/include/rtems/libio_.h b/c/src/exec/libcsupport/include/rtems/libio_.h
deleted file mode 100644
index 8e74b34edb..0000000000
--- a/c/src/exec/libcsupport/include/rtems/libio_.h
+++ /dev/null
@@ -1,272 +0,0 @@
-/*
- * Libio Internal Information
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __LIBIO__h
-#define __LIBIO__h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems.h>
-#include <rtems/libio.h> /* include before standard IO */
-#include <rtems/assoc.h> /* assoc.h not included by rtems.h */
-
-#include <stdio.h> /* O_RDONLY, et.al. */
-#include <fcntl.h> /* O_RDONLY, et.al. */
-#include <assert.h>
-#include <stdarg.h>
-#include <errno.h>
-
-#if ! defined(O_NDELAY)
-# if defined(solaris2)
-# define O_NDELAY O_NONBLOCK
-# elif defined(RTEMS_NEWLIB)
-# define O_NDELAY _FNBIO
-# endif
-#endif
-
-#if !defined(ENOTSUP)
-#define ENOTSUP EOPNOTSUPP
-#endif
-
-#include <errno.h>
-#include <string.h> /* strcmp */
-#include <unistd.h>
-#include <stdlib.h> /* calloc() */
-
-/*
- * Semaphore to protect the io table
- */
-
-#define RTEMS_LIBIO_SEM rtems_build_name('L', 'B', 'I', 'O')
-#define RTEMS_LIBIO_IOP_SEM(n) rtems_build_name('L', 'B', 'I', n)
-
-extern rtems_id rtems_libio_semaphore;
-extern rtems_filesystem_file_handlers_r rtems_filesystem_null_handlers;
-
-/*
- * File descriptor Table Information
- */
-
-extern unsigned32 rtems_libio_number_iops;
-extern rtems_libio_t *rtems_libio_iops;
-extern rtems_libio_t *rtems_libio_last_iop;
-extern rtems_libio_t *rtems_libio_iop_freelist;
-
-/*
- * Default mode for all files.
- */
-
-extern mode_t rtems_filesystem_umask;
-
-/*
- * set_errno_and_return_minus_one
- *
- * Macro to ease common way to return an error.
- */
-
-#ifndef set_errno_and_return_minus_one
-#define set_errno_and_return_minus_one( _error ) \
- do { errno = (_error); return -1; } while(0)
-#endif
-
-/*
- * rtems_libio_iop
- *
- * Macro to return the file descriptor pointer.
- */
-
-#define rtems_libio_iop(_fd) \
- ((((unsigned32)(_fd)) < rtems_libio_number_iops) ? \
- &rtems_libio_iops[_fd] : 0)
-
-/*
- * rtems_libio_check_is_open
- *
- * Macro to check if a file descriptor is actually open.
- */
-
-#define rtems_libio_check_is_open(_iop) \
- do { \
- if (((_iop)->flags & LIBIO_FLAGS_OPEN) == 0) { \
- errno = EBADF; \
- return -1; \
- } \
- } while (0)
-
-/*
- * rtems_libio_check_fd
- *
- * Macro to check if a file descriptor number is valid.
- */
-
-#define rtems_libio_check_fd(_fd) \
- do { \
- if ((unsigned32) (_fd) >= rtems_libio_number_iops) { \
- errno = EBADF; \
- return -1; \
- } \
- } while (0)
-
-/*
- * rtems_libio_check_buffer
- *
- * Macro to check if a buffer pointer is valid.
- */
-
-#define rtems_libio_check_buffer(_buffer) \
- do { \
- if ((_buffer) == 0) { \
- errno = EINVAL; \
- return -1; \
- } \
- } while (0)
-
-/*
- * rtems_libio_check_count
- *
- * Macro to check if a count or length is valid.
- */
-
-#define rtems_libio_check_count(_count) \
- do { \
- if ((_count) == 0) { \
- return 0; \
- } \
- } while (0)
-
-/*
- * rtems_libio_check_permissions
- *
- * Macro to check if a file descriptor is open for this operation.
- */
-
-#define rtems_libio_check_permissions(_iop, _flag) \
- do { \
- if (((_iop)->flags & (_flag)) == 0) { \
- set_errno_and_return_minus_one( EINVAL ); \
- return -1; \
- } \
- } while (0)
-
-/*
- * rtems_filesystem_freenode
- *
- * Macro to free a node.
- */
-
-#define rtems_filesystem_freenode( _node ) \
- do { \
- if ( (_node)->ops->freenod ) \
- (*(_node)->ops->freenod)( (_node) ); \
- } while (0)
-
-/*
- * rtems_filesystem_is_separator
- *
- * Macro to determine if a character is a path name separator.
- *
- * NOTE: This macro handles MS-DOS and UNIX style names.
- */
-
-#define rtems_filesystem_is_separator( _ch ) \
- ( ((_ch) == '/') || ((_ch) == '\\') || ((_ch) == '\0'))
-
-/*
- * rtems_filesystem_get_start_loc
- *
- * Macro to determine if path is absolute or relative.
- */
-
-#define rtems_filesystem_get_start_loc( _path, _index, _loc ) \
- do { \
- if ( rtems_filesystem_is_separator( (_path)[ 0 ] ) ) { \
- *(_loc) = rtems_filesystem_root; \
- *(_index) = 1; \
- } else { \
- *(_loc) = rtems_filesystem_current; \
- *(_index) = 0; \
- } \
- } while (0)
-
-#define rtems_filesystem_get_sym_start_loc( _path, _index, _loc ) \
- do { \
- if ( rtems_filesystem_is_separator( (_path)[ 0 ] ) ) { \
- *(_loc) = rtems_filesystem_root; \
- *(_index) = 1; \
- } else { \
- *(_index) = 0; \
- } \
- } while (0)
-
-
-/*
- * External structures
- */
-
-extern rtems_filesystem_location_info_t rtems_filesystem_current;
-extern rtems_filesystem_location_info_t rtems_filesystem_root;
-extern nlink_t rtems_filesystem_link_counts;
-
-
-/*
- * File Descriptor Routine Prototypes
- */
-
-rtems_libio_t *rtems_libio_allocate(void);
-
-unsigned32 rtems_libio_fcntl_flags(
- unsigned32 fcntl_flags
-);
-
-unsigned32 rtems_libio_to_fcntl_flags(
- unsigned32 flags
-);
-
-void rtems_libio_free(
- rtems_libio_t *iop
-);
-
-int rtems_libio_is_open_files_in_fs(
- rtems_filesystem_mount_table_entry_t *mt_entry
-);
-
-int rtems_libio_is_file_open(
- void *node_access
-);
-
-/*
- * File System Routine Prototypes
- */
-
-int rtems_filesystem_evaluate_path(
- const char *pathname,
- int flags,
- rtems_filesystem_location_info_t *pathloc,
- int follow_link
-);
-
-void rtems_filesystem_initialize();
-
-int init_fs_mount_table();
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
-
-
diff --git a/c/src/exec/libcsupport/include/spurious.h b/c/src/exec/libcsupport/include/spurious.h
deleted file mode 100644
index 36fcaba904..0000000000
--- a/c/src/exec/libcsupport/include/spurious.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* spurious.h
- *
- * This file describes the Spurious Interrupt Driver for all boards.
- *
- * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __SPURIOUS_h
-#define __SPURIOUS_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define SPURIOUS_DRIVER_TABLE_ENTRY \
- { Spurious_Initialize, NULL, NULL, NULL, NULL, NULL }
-
-rtems_device_driver Spurious_Initialize(
- rtems_device_major_number,
- rtems_device_minor_number,
- void *,
- rtems_id,
- rtems_unsigned32 *
-);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/c/src/exec/libcsupport/include/sys/filio.h b/c/src/exec/libcsupport/include/sys/filio.h
deleted file mode 100644
index b82a649c0f..0000000000
--- a/c/src/exec/libcsupport/include/sys/filio.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*-
- * Copyright (c) 1982, 1986, 1990, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- * (c) UNIX System Laboratories, Inc.
- * All or some portions of this file are derived from material licensed
- * to the University of California by American Telephone and Telegraph
- * Co. or Unix System Laboratories, Inc. and are reproduced herein with
- * the permission of UNIX System Laboratories, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)filio.h 8.1 (Berkeley) 3/28/94
- * $Id$
- */
-
-#ifndef _SYS_FILIO_H_
-#define _SYS_FILIO_H_
-
-#include <sys/ioccom.h>
-
-/* Generic file-descriptor ioctl's. */
-#define FIOCLEX _IO('f', 1) /* set close on exec on fd */
-#define FIONCLEX _IO('f', 2) /* remove close on exec */
-#define FIONREAD _IOR('f', 127, int) /* get # bytes to read */
-#define FIONBIO _IOW('f', 126, int) /* set/clear non-blocking i/o */
-#define FIOASYNC _IOW('f', 125, int) /* set/clear async i/o */
-#define FIOSETOWN _IOW('f', 124, int) /* set owner */
-#define FIOGETOWN _IOR('f', 123, int) /* get owner */
-
-#endif /* !_SYS_FILIO_H_ */
diff --git a/c/src/exec/libcsupport/include/sys/ioctl.h b/c/src/exec/libcsupport/include/sys/ioctl.h
deleted file mode 100644
index e3a69a5a7f..0000000000
--- a/c/src/exec/libcsupport/include/sys/ioctl.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*-
- * Copyright (c) 1982, 1986, 1990, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- * (c) UNIX System Laboratories, Inc.
- * All or some portions of this file are derived from material licensed
- * to the University of California by American Telephone and Telegraph
- * Co. or Unix System Laboratories, Inc. and are reproduced herein with
- * the permission of UNIX System Laboratories, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ioctl.h 8.6 (Berkeley) 3/28/94
- * $Id$
- */
-
-#ifndef _SYS_IOCTL_H_
-#define _SYS_IOCTL_H_
-
-#include <sys/ttycom.h>
-
-/*
- * Pun for SunOS prior to 3.2. SunOS 3.2 and later support TIOCGWINSZ
- * and TIOCSWINSZ (yes, even 3.2-3.5, the fact that it wasn't documented
- * notwithstanding).
- */
-struct ttysize {
- unsigned short ts_lines;
- unsigned short ts_cols;
- unsigned short ts_xxx;
- unsigned short ts_yyy;
-};
-#define TIOCGSIZE TIOCGWINSZ
-#define TIOCSSIZE TIOCSWINSZ
-
-#include <sys/ioccom.h>
-
-#include <sys/filio.h>
-#include <sys/sockio.h>
-
-#endif /* !_SYS_IOCTL_H_ */
-
-/*
- * Keep outside _SYS_IOCTL_H_
- * Compatibility with old terminal driver
- *
- * Source level -> #define USE_OLD_TTY
- * Kernel level -> options COMPAT_43 or COMPAT_SUNOS
- */
-#if defined(USE_OLD_TTY) || defined(COMPAT_43) || defined(COMPAT_SUNOS)
-#include <sys/ioctl_compat.h>
-#endif
diff --git a/c/src/exec/libcsupport/include/sys/sockio.h b/c/src/exec/libcsupport/include/sys/sockio.h
deleted file mode 100644
index 5e54baffe8..0000000000
--- a/c/src/exec/libcsupport/include/sys/sockio.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*-
- * Copyright (c) 1982, 1986, 1990, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)sockio.h 8.1 (Berkeley) 3/28/94
- * $Id$
- */
-
-#ifndef _SYS_SOCKIO_H_
-#define _SYS_SOCKIO_H_
-
-#include <sys/ioccom.h>
-
-/* Socket ioctl's. */
-#define SIOCSHIWAT _IOW('s', 0, int) /* set high watermark */
-#define SIOCGHIWAT _IOR('s', 1, int) /* get high watermark */
-#define SIOCSLOWAT _IOW('s', 2, int) /* set low watermark */
-#define SIOCGLOWAT _IOR('s', 3, int) /* get low watermark */
-#define SIOCATMARK _IOR('s', 7, int) /* at oob mark? */
-#define SIOCSPGRP _IOW('s', 8, int) /* set process group */
-#define SIOCGPGRP _IOR('s', 9, int) /* get process group */
-
-#define SIOCADDRT _IOW('r', 10, struct ortentry) /* add route */
-#define SIOCDELRT _IOW('r', 11, struct ortentry) /* delete route */
-#define SIOCGETVIFCNT _IOWR('r', 15, struct sioc_vif_req)/* get vif pkt cnt */
-#define SIOCGETSGCNT _IOWR('r', 16, struct sioc_sg_req) /* get s,g pkt cnt */
-
-#define SIOCSIFADDR _IOW('i', 12, struct ifreq) /* set ifnet address */
-#define OSIOCGIFADDR _IOWR('i', 13, struct ifreq) /* get ifnet address */
-#define SIOCGIFADDR _IOWR('i', 33, struct ifreq) /* get ifnet address */
-#define SIOCSIFDSTADDR _IOW('i', 14, struct ifreq) /* set p-p address */
-#define OSIOCGIFDSTADDR _IOWR('i', 15, struct ifreq) /* get p-p address */
-#define SIOCGIFDSTADDR _IOWR('i', 34, struct ifreq) /* get p-p address */
-#define SIOCSIFFLAGS _IOW('i', 16, struct ifreq) /* set ifnet flags */
-#define SIOCGIFFLAGS _IOWR('i', 17, struct ifreq) /* get ifnet flags */
-#define OSIOCGIFBRDADDR _IOWR('i', 18, struct ifreq) /* get broadcast addr */
-#define SIOCGIFBRDADDR _IOWR('i', 35, struct ifreq) /* get broadcast addr */
-#define SIOCSIFBRDADDR _IOW('i', 19, struct ifreq) /* set broadcast addr */
-#define OSIOCGIFCONF _IOWR('i', 20, struct ifconf) /* get ifnet list */
-#define SIOCGIFCONF _IOWR('i', 36, struct ifconf) /* get ifnet list */
-#define OSIOCGIFNETMASK _IOWR('i', 21, struct ifreq) /* get net addr mask */
-#define SIOCGIFNETMASK _IOWR('i', 37, struct ifreq) /* get net addr mask */
-#define SIOCSIFNETMASK _IOW('i', 22, struct ifreq) /* set net addr mask */
-#define SIOCGIFMETRIC _IOWR('i', 23, struct ifreq) /* get IF metric */
-#define SIOCSIFMETRIC _IOW('i', 24, struct ifreq) /* set IF metric */
-#define SIOCDIFADDR _IOW('i', 25, struct ifreq) /* delete IF addr */
-#define SIOCAIFADDR _IOW('i', 26, struct ifaliasreq)/* add/chg IF alias */
-
-#define SIOCADDMULTI _IOW('i', 49, struct ifreq) /* add m'cast addr */
-#define SIOCDELMULTI _IOW('i', 50, struct ifreq) /* del m'cast addr */
-#define SIOCGIFMTU _IOWR('i', 51, struct ifreq) /* get IF mtu */
-#define SIOCSIFMTU _IOW('i', 52, struct ifreq) /* set IF mtu */
-#define SIOCGIFPHYS _IOWR('i', 53, struct ifreq) /* get IF wire */
-#define SIOCSIFPHYS _IOW('i', 54, struct ifreq) /* set IF wire */
-#define SIOCSIFMEDIA _IOWR('i', 55, struct ifreq) /* set net media */
-#define SIOCGIFMEDIA _IOWR('i', 56, struct ifmediareq) /* get net media */
-
-/*
- * RTEMS additions for setting/getting `tap' function on incoming packets.
- */
-#define SIOCSIFTAP _IOW('i', 80, struct ifreq) /* set tap function */
-#define SIOCGIFTAP _IOW('i', 81, struct ifreq) /* get tap function */
-
-#endif /* !_SYS_SOCKIO_H_ */
diff --git a/c/src/exec/libcsupport/include/sys/termios.h b/c/src/exec/libcsupport/include/sys/termios.h
deleted file mode 100644
index bb64d55433..0000000000
--- a/c/src/exec/libcsupport/include/sys/termios.h
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- * POSIX termios implementation for RTEMS console device driver.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef TERMIOS_H
-#define TERMIOS_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef unsigned char cc_t;
-typedef unsigned int speed_t;
-typedef unsigned int tcflag_t;
-
-#define NCCS 19
-struct termios {
- tcflag_t c_iflag; /* input mode flags */
- tcflag_t c_oflag; /* output mode flags */
- tcflag_t c_cflag; /* control mode flags */
- tcflag_t c_lflag; /* local mode flags */
- cc_t c_line; /* line discipline */
- cc_t c_cc[NCCS]; /* control characters */
-};
-
-/* c_cc characters */
-#define VINTR 0
-#define VQUIT 1
-#define VERASE 2
-#define VKILL 3
-#define VEOF 4
-#define VTIME 5
-#define VMIN 6
-#define VSWTC 7
-#define VSTART 8
-#define VSTOP 9
-#define VSUSP 10
-#define VEOL 11
-#define VREPRINT 12
-#define VDISCARD 13
-#define VWERASE 14
-#define VLNEXT 15
-#define VEOL2 16
-
-/* c_iflag bits */
-#define IGNBRK 0000001
-#define BRKINT 0000002
-#define IGNPAR 0000004
-#define PARMRK 0000010
-#define INPCK 0000020
-#define ISTRIP 0000040
-#define INLCR 0000100
-#define IGNCR 0000200
-#define ICRNL 0000400
-#define IUCLC 0001000
-#define IXON 0002000
-#define IXANY 0004000
-#define IXOFF 0010000
-#define IMAXBEL 0020000
-
-/* c_oflag bits */
-#define OPOST 0000001
-#define OLCUC 0000002
-#define ONLCR 0000004
-#define OCRNL 0000010
-#define ONOCR 0000020
-#define ONLRET 0000040
-#define OFILL 0000100
-#define OFDEL 0000200
-#define NLDLY 0000400
-#define NL0 0000000
-#define NL1 0000400
-#define CRDLY 0003000
-#define CR0 0000000
-#define CR1 0001000
-#define CR2 0002000
-#define CR3 0003000
-#define TABDLY 0014000
-#define TAB0 0000000
-#define TAB1 0004000
-#define TAB2 0010000
-#define TAB3 0014000
-#define XTABS 0014000
-#define BSDLY 0020000
-#define BS0 0000000
-#define BS1 0020000
-#define VTDLY 0040000
-#define VT0 0000000
-#define VT1 0040000
-#define FFDLY 0100000
-#define FF0 0000000
-#define FF1 0100000
-
-/* c_cflag bit meaning */
-#define CBAUD 0010017
-#define B0 0000000 /* hang up */
-#define B50 0000001
-#define B75 0000002
-#define B110 0000003
-#define B134 0000004
-#define B150 0000005
-#define B200 0000006
-#define B300 0000007
-#define B600 0000010
-#define B1200 0000011
-#define B1800 0000012
-#define B2400 0000013
-#define B4800 0000014
-#define B9600 0000015
-#define B19200 0000016
-#define B38400 0000017
-#define EXTA B19200
-#define EXTB B38400
-#define CSIZE 0000060
-#define CS5 0000000
-#define CS6 0000020
-#define CS7 0000040
-#define CS8 0000060
-#define CSTOPB 0000100
-#define CREAD 0000200
-#define PARENB 0000400
-#define PARODD 0001000
-#define HUPCL 0002000
-#define CLOCAL 0004000
-#define CBAUDEX 0010000
-#define B57600 0010001
-#define B115200 0010002
-#define B230400 0010003
-#define B460800 0010004
-#define CIBAUD 002003600000 /* input baud rate (not used) */
-#define CRTSCTS 020000000000 /* flow control */
-
-#define RTEMS_TERMIOS_NUMBER_BAUD_RATES 20
-
-/* c_lflag bits */
-#define ISIG 0000001
-#define ICANON 0000002
-#define XCASE 0000004
-#define ECHO 0000010
-#define ECHOE 0000020
-#define ECHOK 0000040
-#define ECHONL 0000100
-#define NOFLSH 0000200
-#define TOSTOP 0000400
-#define ECHOCTL 0001000
-#define ECHOPRT 0002000
-#define ECHOKE 0004000
-#define FLUSHO 0010000
-#define PENDIN 0040000
-#define IEXTEN 0100000
-
-/* tcflow() and TCXONC use these */
-#define TCOOFF 0
-#define TCOON 1
-#define TCIOFF 2
-#define TCION 3
-
-/* tcflush() and TCFLSH use these */
-#define TCIFLUSH 0
-#define TCOFLUSH 1
-#define TCIOFLUSH 2
-
-/* tcsetattr uses these */
-#define TCSANOW 0
-#define TCSADRAIN 1
-#define TCSAFLUSH 2
-
-int tcgetattr(int, struct termios *);
-int tcsetattr(int, int, struct termios *);
-int tcdrain(int);
-speed_t cfgetospeed(const struct termios *tp);
-int cfsetospeed(struct termios *tp, speed_t speed);
-speed_t cfgetispeed(const struct termios *tp);
-int cfsetispeed(struct termios *tp, speed_t speed);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* TERMIOS_H */
diff --git a/c/src/exec/libcsupport/include/sys/utime.h b/c/src/exec/libcsupport/include/sys/utime.h
deleted file mode 100644
index 3e9955e61f..0000000000
--- a/c/src/exec/libcsupport/include/sys/utime.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * $Id$
- */
-
-#ifndef __UTIME_h__
-#define __UTIME_h__
-
-/*
- * POSIX 1003.1b 5.6.6 Set File Access and Modification Times
- */
-
-struct utimbuf {
- time_t actime; /* Access time */
- time_t modtime; /* Modification time */
-};
-
-/* Functions */
-
-int utime(
- const char *path,
- const struct utimbuf *times
-);
-
-#endif
-/* end of include file */
diff --git a/c/src/exec/libcsupport/include/sys/utsname.h b/c/src/exec/libcsupport/include/sys/utsname.h
deleted file mode 100644
index ca15230d40..0000000000
--- a/c/src/exec/libcsupport/include/sys/utsname.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* sys/utsname.h
- *
- * $Id$
- */
-
-#ifndef __POSIX_SYS_UTSNAME_h
-#define __POSIX_SYS_UTSNAME_h
-
-#include <sys/times.h>
-#include <sys/types.h>
-
-/*
- * 4.4.1 Get System Name (Table 4-1), P1003.1b-1993, p. 90
- *
- * NOTE: The lengths of the strings in this structure are
- * just long enough to reliably contain the RTEMS information.
- * For example, the fields are not long enough to support
- * Internet hostnames.
- */
-
-struct utsname {
- char sysname[ 32 ]; /* Name of this implementation of the operating system */
- char nodename[ 32 ]; /* Name of this node within an implementation */
- /* specified communication network */
- char release[ 32 ]; /* Current release level of this implementation */
- char version[ 32 ]; /* Current version level of this release */
- char machine[ 32 ]; /* Name of the hardware type on which the system */
- /* is running */
-};
-
-/*
- * 4.4.1 Get System Name, P1003.1b-1993, p. 90
- */
-
-int uname(
- struct utsname *name
-);
-
-/*
- * 4.5.2 Get Process Times, P1003.1b-1993, p. 92
- */
-
-clock_t times(
- struct tms *buffer
-);
-
-#endif
-/* end of include file */
-
diff --git a/c/src/exec/libcsupport/include/timerdrv.h b/c/src/exec/libcsupport/include/timerdrv.h
deleted file mode 100644
index 1234f8283a..0000000000
--- a/c/src/exec/libcsupport/include/timerdrv.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* timerdrv.h
- *
- * This file describes the Timer Driver for all boards.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __TIMER_DRIVER_h
-#define __TIMER_DRIVER_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* functions */
-
-void Timer_initialize( void );
-
-rtems_unsigned32 Read_timer( void );
-
-rtems_status_code Empty_function( void );
-
-void Set_find_average_overhead(
- rtems_boolean find_flag
-);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/c/src/exec/libcsupport/include/vmeintr.h b/c/src/exec/libcsupport/include/vmeintr.h
deleted file mode 100644
index 583ccff6cc..0000000000
--- a/c/src/exec/libcsupport/include/vmeintr.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * vmeintr.h
- *
- * This file is the specification for the VMEbus interface library
- * which should be provided by all BSPs for VMEbus Single Board
- * Computers but currently only a few do so.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __VME_INTERRUPT_h
-#define __VME_INTERRUPT_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This defines the mask which is used to determine which
- * interrupt levels are affected by a call to this package.
- * The LSB corresponds to VME interrupt 0 and the MSB
- * to VME interrupt 7.
- *
- */
-
-typedef rtems_unsigned8 VME_interrupt_Mask;
-
-/*
- * VME_interrupt_Disable
- *
- */
-
-void VME_interrupt_Disable (
- VME_interrupt_Mask mask /* IN */
-);
-
-/*
- * VME_interrupt_Disable
- *
- */
-
-void VME_interrupt_Enable (
- VME_interrupt_Mask mask /* IN */
-);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* end of include file */
diff --git a/c/src/exec/libcsupport/include/zilog/z8036.h b/c/src/exec/libcsupport/include/zilog/z8036.h
deleted file mode 100644
index d2f1652bcc..0000000000
--- a/c/src/exec/libcsupport/include/zilog/z8036.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/* z8036.h
- *
- * This include file defines information related to a Zilog Z8036
- * Counter/Timer/IO Chip. It is a memory mapped part.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * NOTE: This file shares as much as possible with the include
- * file for the Z8536 via z8x36.h.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __Z8036_h
-#define __Z8036_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* macros */
-
-#define Z8036( ptr ) ((volatile struct z8036_map *)(ptr))
-
-#define Z8x36_STATE0 ( z8036 ) \
- { /*char *garbage = *(Z8036(z8036))->???; */ }
-
-
-#define Z8x36_WRITE( z8036, reg, data ) \
- (Z8036(z8036))->reg = (data)
-
-
-#define Z8x36_READ( z8036, reg, data ) \
- (Z8036(z8036))->reg = (data)
-
-/* structures */
-
-struct z8036_map {
-/* MAIN CONTROL REGISTERS (0x00-0x07) */
- rtems_unsigned8 MASTER_INTR; /* Master Interrupt Ctl Reg */
- rtems_unsigned8 MASTER_CFG; /* Master Configuration Ctl Reg */
- rtems_unsigned8 PORTA_VECTOR; /* Port A - Interrupt Vector */
- rtems_unsigned8 PORTB_VECTOR; /* Port B - Interrupt Vector */
- rtems_unsigned8 CNT_TMR_VECTOR; /* Counter/Timer Interrupt Vector */
- rtems_unsigned8 PORTC_DATA_POLARITY; /* Port C - Data Path Polarity */
- rtems_unsigned8 PORTC_DIRECTION; /* Port C - Data Direction */
- rtems_unsigned8 PORTC_SPECIAL_IO_CTL; /* Port C - Special IO Control */
-/* MOST OFTEN ACCESSED REGISTERS (0x08 - 0x0f) */
- rtems_unsigned8 PORTA_CMD_STATUS; /* Port A - Command Status Reg */
- rtems_unsigned8 PORTB_CMD_STATUS; /* Port B - Command Status Reg */
- rtems_unsigned8 CT1_CMD_STATUS; /* Ctr/Timer 1 - Command Status Reg */
- rtems_unsigned8 CT2_CMD_STATUS; /* Ctr/Timer 2 - Command Status Reg */
- rtems_unsigned8 CT3_CMD_STATUS; /* Ctr/Timer 3 - Command Status Reg */
- rtems_unsigned8 PORTA_DATA; /* Port A - Data */
- rtems_unsigned8 PORTB_DATA; /* Port B - Data */
- rtems_unsigned8 PORTC_DATA; /* Port C - Data */
-/* COUNTER/TIMER RELATED REGISTERS (0x10-0x1f) */
- rtems_unsigned8 CT1_CUR_CNT_MSB; /* Ctr/Timer 1 - Current Count (MSB) */
- rtems_unsigned8 CT1_CUR_CNT_LSB; /* Ctr/Timer 1 - Current Count (LSB) */
- rtems_unsigned8 CT2_CUR_CNT_MSB; /* Ctr/Timer 2 - Current Count (MSB) */
- rtems_unsigned8 CT2_CUR_CNT_LSB; /* Ctr/Timer 2 - Current Count (LSB) */
- rtems_unsigned8 CT3_CUR_CNT_MSB; /* Ctr/Timer 3 - Current Count (MSB) */
- rtems_unsigned8 CT3_CUR_CNT_LSB; /* Ctr/Timer 3 - Current Count (LSB) */
- rtems_unsigned8 CT1_TIME_CONST_MSB; /* Ctr/Timer 1 - Time Constant (MSB) */
- rtems_unsigned8 CT1_TIME_CONST_LSB; /* Ctr/Timer 1 - Time Constant (LSB) */
- rtems_unsigned8 CT2_TIME_CONST_MSB; /* Ctr/Timer 2 - Time Constant (MSB) */
- rtems_unsigned8 CT2_TIME_CONST_LSB; /* Ctr/Timer 2 - Time Constant (LSB) */
- rtems_unsigned8 CT3_TIME_CONST_MSB; /* Ctr/Timer 3 - Time Constant (MSB) */
- rtems_unsigned8 CT3_TIME_CONST_LSB; /* Ctr/Timer 3 - Time Constant (LSB) */
- rtems_unsigned8 CT1_MODE_SPEC; /* Ctr/Timer 1 - Mode Specification */
- rtems_unsigned8 CT2_MODE_SPEC; /* Ctr/Timer 2 - Mode Specification */
- rtems_unsigned8 CT3_MODE_SPEC; /* Ctr/Timer 3 - Mode Specification */
- rtems_unsigned8 CURRENT_VECTOR; /* Current Vector */
-/* PORT A SPECIFICATION REGISTERS (0x20 -0x27) */
- rtems_unsigned8 PORTA_MODE; /* Port A - Mode Specification */
- rtems_unsigned8 PORTA_HANDSHAKE; /* Port A - Handshake Specification */
- rtems_unsigned8 PORTA_DATA_POLARITY; /* Port A - Data Path Polarity */
- rtems_unsigned8 PORTA_DIRECTION; /* Port A - Data Direction */
- rtems_unsigned8 PORTA_SPECIAL_IO_CTL; /* Port A - Special IO Control */
- rtems_unsigned8 PORTA_PATT_POLARITY; /* Port A - Pattern Polarity */
- rtems_unsigned8 PORTA_PATT_TRANS; /* Port A - Pattern Transition */
- rtems_unsigned8 PORTA_PATT_MASK; /* Port A - Pattern Mask */
-/* PORT B SPECIFICATION REGISTERS (0x28-0x2f) */
- rtems_unsigned8 PORTB_MODE; /* Port B - Mode Specification */
- rtems_unsigned8 PORTB_HANDSHAKE; /* Port B - Handshake Specification */
- rtems_unsigned8 PORTB_DATA_POLARITY; /* Port B - Data Path Polarity */
- rtems_unsigned8 PORTB_DIRECTION; /* Port B - Data Direction */
- rtems_unsigned8 PORTB_SPECIAL_IO_CTL; /* Port B - Special IO Control */
- rtems_unsigned8 PORTB_PATT_POLARITY; /* Port B - Pattern Polarity */
- rtems_unsigned8 PORTB_PATT_TRANS; /* Port B - Pattern Transition */
- rtems_unsigned8 PORTB_PATT_MASK; /* Port B - Pattern Mask */
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
diff --git a/c/src/exec/libcsupport/include/zilog/z8530.h b/c/src/exec/libcsupport/include/zilog/z8530.h
deleted file mode 100644
index aba481ac25..0000000000
--- a/c/src/exec/libcsupport/include/zilog/z8530.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/* z8530.h
- *
- * This include file defines information related to a Zilog Z8530
- * SCC Chip. It is a IO mapped part.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __Z8530_h
-#define __Z8530_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* macros */
-
-#define VOL8( ptr ) ((volatile rtems_unsigned8 *)(ptr))
-
-#define Z8x30_STATE0 ( z8530 ) \
- { char *garbage; \
- (garbage) = *(VOL8(z8530)) \
- }
-
-#define Z8x30_WRITE_CONTROL( z8530, reg, data ) \
- *(VOL8(z8530)) = (reg); \
- *(VOL8(z8530)) = (data)
-
-#define Z8x30_READ_CONTROL( z8530, reg, data ) \
- *(VOL8(z8530)) = (reg); \
- (data) = *(VOL8(z8530))
-
-#define Z8x30_WRITE_DATA( z8530, data ) \
- *(VOL8(z8530)) = (data);
-
-#define Z8x30_READ_DATA( z8530, data ) \
- (data) = *(VOL8(z8530));
-
-
-/* RR_0 Bit Definitions */
-
-#define RR_0_TX_BUFFER_EMPTY 0x04
-#define RR_0_RX_DATA_AVAILABLE 0x01
-
-/* read registers */
-
-#define RR_0 0x00
-#define RR_1 0x01
-#define RR_2 0x02
-#define RR_3 0x03
-#define RR_4 0x04
-#define RR_5 0x05
-#define RR_6 0x06
-#define RR_7 0x07
-#define RR_8 0x08
-#define RR_9 0x09
-#define RR_10 0x0A
-#define RR_11 0x0B
-#define RR_12 0x0C
-#define RR_13 0x0D
-#define RR_14 0x0E
-#define RR_15 0x0F
-
-/* write registers */
-
-#define WR_0 0x00
-#define WR_1 0x01
-#define WR_2 0x02
-#define WR_3 0x03
-#define WR_4 0x04
-#define WR_5 0x05
-#define WR_6 0x06
-#define WR_7 0x07
-#define WR_8 0x08
-#define WR_9 0x09
-#define WR_10 0x0A
-#define WR_11 0x0B
-#define WR_12 0x0C
-#define WR_13 0x0D
-#define WR_14 0x0E
-#define WR_15 0x0F
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/c/src/exec/libcsupport/include/zilog/z8536.h b/c/src/exec/libcsupport/include/zilog/z8536.h
deleted file mode 100644
index 8b8fac4567..0000000000
--- a/c/src/exec/libcsupport/include/zilog/z8536.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/* z8536.h
- *
- * This include file defines information related to a Zilog Z8536
- * Counter/Timer/IO Chip. It is a IO mapped part.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * NOTE: This file shares as much as possible with the include
- * file for the Z8036 via z8x36.h.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __Z8536_h
-#define __Z8536_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* macros */
-
-#define VOL8( ptr ) ((volatile rtems_unsigned8 *)(ptr))
-
-#define Z8x36_STATE0 ( z8536 ) \
- { char *garbage; \
- (garbage) = *(VOL8(z8536+0xC)) \
- }
-
-#define Z8x36_WRITE( z8536, reg, data ) \
- *(VOL8(z8536+0xC)) = (reg); \
- *(VOL8(z8536+0xC)) = (data)
-
-#define Z8x36_READ( z8536, reg, data ) \
- *(VOL8(z8536+0xC)) = (reg); \
- (data) = *(VOL8(z8536+0xC))
-
-/* structures */
-
-/* MAIN CONTROL REGISTERS (0x00-0x07) */
-#define MASTER_INTR 0x00 /* Master Interrupt Ctl Reg */
-#define MASTER_CFG 0x01 /* Master Configuration Ctl Reg */
-#define PORTA_VECTOR 0x02 /* Port A - Interrupt Vector */
-#define PORTB_VECTOR 0x03 /* Port B - Interrupt Vector */
-#define CNT_TMR_VECTOR 0x04 /* Counter/Timer Interrupt Vector */
-#define PORTC_DATA_POLARITY 0x05 /* Port C - Data Path Polarity */
-#define PORTC_DIRECTION 0x06 /* Port C - Data Direction */
-#define PORTC_SPECIAL_IO_CTL 0x07 /* Port C - Special IO Control */
-
-/* MOST OFTEN ACCESSED REGISTERS (0x08 - 0x0f) */
-#define PORTA_CMD_STATUS 0x08 /* Port A - Command Status Reg */
-#define PORTB_CMD_STATUS 0x09 /* Port B - Command Status Reg */
-#define CT1_CMD_STATUS 0x0a /* Ctr/Timer 1 - Command Status Reg */
-#define CT2_CMD_STATUS 0x0b /* Ctr/Timer 2 - Command Status Reg */
-#define CT3_CMD_STATUS 0x0c /* Ctr/Timer 3 - Command Status Reg */
-#define PORTA_DATA 0x0d /* Port A - Data */
-#define PORTB_DATA 0x0e /* Port B - Data */
-#define PORTC_DATA 0x0f /* Port C - Data */
-
-/* COUNTER/TIMER RELATED REGISTERS (0x10-0x1f) */
-#define CT1_CUR_CNT_MSB 0x10 /* Ctr/Timer 1 - Current Count (MSB) */
-#define CT1_CUR_CNT_LSB 0x11 /* Ctr/Timer 1 - Current Count (LSB) */
-#define CT2_CUR_CNT_MSB 0x12 /* Ctr/Timer 2 - Current Count (MSB) */
-#define CT2_CUR_CNT_LSB 0x13 /* Ctr/Timer 2 - Current Count (LSB) */
-#define CT3_CUR_CNT_MSB 0x14 /* Ctr/Timer 3 - Current Count (MSB) */
-#define CT3_CUR_CNT_LSB 0x15 /* Ctr/Timer 3 - Current Count (LSB) */
-#define CT1_TIME_CONST_MSB 0x16 /* Ctr/Timer 1 - Time Constant (MSB) */
-#define CT1_TIME_CONST_LSB 0x17 /* Ctr/Timer 1 - Time Constant (LSB) */
-#define CT2_TIME_CONST_MSB 0x18 /* Ctr/Timer 2 - Time Constant (MSB) */
-#define CT2_TIME_CONST_LSB 0x19 /* Ctr/Timer 2 - Time Constant (LSB) */
-#define CT3_TIME_CONST_MSB 0x1a /* Ctr/Timer 3 - Time Constant (MSB) */
-#define CT3_TIME_CONST_LSB 0x1b /* Ctr/Timer 3 - Time Constant (LSB) */
-#define CT1_MODE_SPEC 0x1c /* Ctr/Timer 1 - Mode Specification */
-#define CT2_MODE_SPEC 0x1d /* Ctr/Timer 2 - Mode Specification */
-#define CT3_MODE_SPEC 0x1e /* Ctr/Timer 3 - Mode Specification */
-#define CURRENT_VECTOR 0x1f /* Current Vector */
-
-/* PORT A SPECIFICATION REGISTERS (0x20 -0x27) */
-#define PORTA_MODE 0x20 /* Port A - Mode Specification */
-#define PORTA_HANDSHAKE 0x21 /* Port A - Handshake Specification */
-#define PORTA_DATA_POLARITY 0x22 /* Port A - Data Path Polarity */
-#define PORTA_DIRECTION 0x23 /* Port A - Data Direction */
-#define PORTA_SPECIAL_IO_CTL 0x24 /* Port A - Special IO Control */
-#define PORTA_PATT_POLARITY 0x25 /* Port A - Pattern Polarity */
-#define PORTA_PATT_TRANS 0x26 /* Port A - Pattern Transition */
-#define PORTA_PATT_MASK 0x27 /* Port A - Pattern Mask */
-
-/* PORT B SPECIFICATION REGISTERS (0x28-0x2f) */
-#define PORTB_MODE 0x28 /* Port B - Mode Specification */
-#define PORTB_HANDSHAKE 0x29 /* Port B - Handshake Specification */
-#define PORTB_DATA_POLARITY 0x2a /* Port B - Data Path Polarity */
-#define PORTB_DIRECTION 0x2b /* Port B - Data Direction */
-#define PORTB_SPECIAL_IO_CTL 0x2c /* Port B - Special IO Control */
-#define PORTB_PATT_POLARITY 0x2d /* Port B - Pattern Polarity */
-#define PORTB_PATT_TRANS 0x2e /* Port B - Pattern Transition */
-#define PORTB_PATT_MASK 0x2f /* Port B - Pattern Mask */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/c/src/exec/libcsupport/src/CASES b/c/src/exec/libcsupport/src/CASES
deleted file mode 100644
index 4578ae5009..0000000000
--- a/c/src/exec/libcsupport/src/CASES
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-# $Id$
-#
-
-This is a list of cases to consider when implementing a file system:
-
-
-+ Given a tree of this form:
-
- a ----- b
- /
- c
-
- Where a and b are directories and c is a link to directory b. Consider
- this sequence:
-
- - rmdir a/b
- - mknod c/b/x
- - unlink c
-
-
-
-
diff --git a/c/src/exec/libcsupport/src/Makefile.am b/c/src/exec/libcsupport/src/Makefile.am
deleted file mode 100644
index 20893f29eb..0000000000
--- a/c/src/exec/libcsupport/src/Makefile.am
+++ /dev/null
@@ -1,124 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-LIBNAME = libcsupport
-LIB = ${ARCH}/${LIBNAME}.a
-
-ERROR_C_FILES = error.c
-
-ASSOCIATION_C_FILES = assoc.c assocnamebad.c
-
-BASE_FS_C_FILES = base_fs.c mount.c unmount.c ioman.c libio.c \
- libio_sockets.c eval.c fs_null_handlers.c
-
-IMFS_C_FILES = imfs_chown.c imfs_creat.c imfs_directory.c imfs_eval.c \
- imfs_free.c imfs_fsunmount.c imfs_gtkn.c imfs_init.c imfs_initsupp.c \
- imfs_link.c imfs_mknod.c imfs_mount.c imfs_fchmod.c imfs_unlink.c \
- imfs_unmount.c imfs_utime.c imfs_ntype.c imfs_stat.c imfs_getchild.c \
- memfile.c deviceio.c imfs_handlers_device.c imfs_handlers_directory.c \
- imfs_handlers_link.c imfs_handlers_memfile.c imfs_debug.c imfs_rmnod.c \
- imfs_symlink.c imfs_readlink.c imfs_fdatasync.c imfs_fcntl.c \
- miniimfs_init.c
-
-TERMIOS_C_FILES = cfgetispeed.c cfgetospeed.c cfsetispeed.c cfsetospeed.c \
- tcgetattr.c tcsetattr.c tcdrain.c tcflow.c tcflush.c tcgetprgrp.c \
- tcsendbreak.c tcsetpgrp.c termios.c termiosinitialize.c \
- termiosreserveresources.c
-
-SYSTEM_CALL_C_FILES = open.c close.c read.c write.c lseek.c ioctl.c mkdir.c \
- mknod.c mkfifo.c rmdir.c chdir.c chmod.c fchmod.c chown.c link.c \
- unlink.c umask.c ftruncate.c utime.c fstat.c fcntl.c fpathconf.c \
- getdents.c fsync.c fdatasync.c pipe.c dup.c dup2.c symlink.c readlink.c \
- creat.c
-
-DIRECTORY_SCAN_C_FILES = opendir.c closedir.c readdir.c rewinddir.c \
- scandir.c seekdir.c telldir.c getcwd.c
-
-MALLOC_C_FILES = malloc.c __brk.c __sbrk.c
-
-PASSWORD_GROUP_C_FILES = getpwent.c getgrent.c
-
-TERMINAL_IDENTIFICATION_C_FILES = ctermid.c isatty.c ttyname.c ttyname_r.c
-
-LIBC_GLUE_C_FILES = __getpid.c __gettod.c __times.c truncate.c access.c \
- stat.c lstat.c pathconf.c newlibc.c no_posix.c no_libc.c
-
-UNIX_LIBC_C_FILES = unixlibc.c hosterr.c
-
-COMMON_C_FILES = $(BASE_FS_C_FILES) $(MALLOC_C_FILES) \
- $(TERMIOS_C_FILES) $(ERROR_C_FILES) $(ASSOCIATION_C_FILES)
-
-UNIX_C_FILES = $(UNIX_LIBC_C_FILES) imfs_unixstub.c
-
-EMBEDDED_C_FILES = $(LIBC_GLUE_C_FILES) \
- $(PASSWORD_GROUP_C_FILES) $(TERMINAL_IDENTIFICATION_C_FILES) \
- $(SYSTEM_CALL_C_FILES) $(DIRECTORY_SCAN_C_FILES) \
- $(IMFS_C_FILES)
-
-if UNIX
-C_FILES = $(COMMON_C_FILES) $(UNIX_C_FILES)
-else
-C_FILES = $(COMMON_C_FILES) $(EMBEDDED_C_FILES)
-endif
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = libcsupport.h imfs.h
-SYS_H_FILES =
-RTEMS_H_FILES = assoc.h error.h libio.h
-noinst_HEADERS = libio_.h
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../automake/lib.am
-
-PREINSTALL_FILES = \
-$(PROJECT_INCLUDE) \
-$(PROJECT_INCLUDE)/rtems \
-$(PROJECT_INCLUDE)/sys \
-$(H_FILES:%=$(PROJECT_INCLUDE)/%) \
-$(RTEMS_H_FILES:%=$(PROJECT_INCLUDE)/rtems/%) \
-$(SYS_H_FILES:%=$(PROJECT_INCLUDE)/sys/%)
-
-$(PROJECT_INCLUDE):
- @$(mkinstalldirs) $@
-$(PROJECT_INCLUDE)/rtems:
- @$(mkinstalldirs) $@
-$(PROJECT_INCLUDE)/sys:
- @$(mkinstalldirs) $@
-
-$(PROJECT_INCLUDE)/%.h: %.h
- $(INSTALL_DATA) $< $@
-$(PROJECT_INCLUDE)/rtems/%.h: %.h
- $(INSTALL_DATA) $< $@
-$(PROJECT_INCLUDE)/sys/%.h: %.h
- $(INSTALL_DATA) $< $@
-
-TMPINSTALL_FILES += \
-$(PROJECT_RELEASE)/lib/$(LIBNAME)$(LIB_VARIANT).a
-
-OBJS = $(C_O_FILES)
-
-#
-# Add local stuff here using +=
-#
-
-AM_CFLAGS += $(LIBC_DEFINES)
-
-all: ${ARCH} $(TMPINSTALL_FILES)
-
-$(LIB): ${OBJS}
- $(make-library)
-
-$(PROJECT_RELEASE)/lib/$(LIBNAME)$(LIB_VARIANT).a: $(LIB)
- $(INSTALL_DATA) $< $@
-
-DOC_FILES = TODO CASES
-
-EXTRA_DIST = \
-$(DOC_FILES) \
-$(COMMON_C_FILES) $(EMBEDDED_C_FILES) $(UNIX_C_FILES) \
-$(H_FILES) $(RTEMS_H_FILES) $(SYS_H_FILES)
-
-include $(top_srcdir)/../../../automake/local.am
diff --git a/c/src/exec/libcsupport/src/README b/c/src/exec/libcsupport/src/README
deleted file mode 100644
index ee7a90501e..0000000000
--- a/c/src/exec/libcsupport/src/README
+++ /dev/null
@@ -1,37 +0,0 @@
---
--- $Id$
---
-
-Overview of newlib support (newlib is from CYGNUS)
- Each task can have its own libc state including:
- open stdio files
- strtok
- multi precision arithmetic state
- etc.
-
- This is implemented by a reentrancy data structure for each task.
-
- When a task is "started" (in RTEMS sense) the reentrancy structure
- is allocated. Its address is stored in notepad[NOTEPAD_LAST].
-
- When task is switched to, the value of global variable _impure_ptr
- is changed to the value of the new tasks reentrancy structure.
-
- When a task is deleted
- atexit() processing (for that task) happens
- task's stdio buffers are flushed
-
- When exit(3) is called
- calling task's atexit processing done
- global libc state atexit processing done
- (this will include any atexit routines installed by drivers)
- executive is shutdown
- causes a context switch back to bsp land
-
-
-NOTE:
- libc extension are installed by bsp_libc_init()
- iff we are using clock interrupts.
- This hack is necessary to allow the tmtests to avoid
- timing the extensions.
-
diff --git a/c/src/exec/libcsupport/src/TODO b/c/src/exec/libcsupport/src/TODO
deleted file mode 100644
index 9d894688d9..0000000000
--- a/c/src/exec/libcsupport/src/TODO
+++ /dev/null
@@ -1,11 +0,0 @@
-#
-# $Id$
-#
-
-+ newlib 1.8.0 has the wrong prototype for at least read() and write().
-
-+ There should be a "eat it" stub for all system calls which are
- available to make filling out an operations table easier.
- See device_lseek() for an example of where this would be nice.
-
-+ Fix strerror() so it prints all error numbers.
diff --git a/c/src/exec/libcsupport/src/__brk.c b/c/src/exec/libcsupport/src/__brk.c
deleted file mode 100644
index 4e5a7fcd22..0000000000
--- a/c/src/exec/libcsupport/src/__brk.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * RTEMS "Broken" __brk Implementation
- *
- * NOTE: sbrk() is provided by each BSP.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#if !defined(RTEMS_UNIX)
-
-#include <errno.h>
-
-int __brk(
- const void *endds
-)
-{
- errno = EINVAL;
- return -1;
-}
-#endif
diff --git a/c/src/exec/libcsupport/src/__getpid.c b/c/src/exec/libcsupport/src/__getpid.c
deleted file mode 100644
index 32353b717d..0000000000
--- a/c/src/exec/libcsupport/src/__getpid.c
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- * Some C Libraries reference this routine since they think getpid is
- * a real system call.
- *
- * $Id$
- */
-
-#include <unistd.h>
-
-pid_t __getpid(void)
-{
- return getpid();
-}
-
diff --git a/c/src/exec/libcsupport/src/__gettod.c b/c/src/exec/libcsupport/src/__gettod.c
deleted file mode 100644
index 6c30e40bfb..0000000000
--- a/c/src/exec/libcsupport/src/__gettod.c
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * gettimeofday() - SVR4 and BSD4.3 extension required by Newlib
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
-
-#include <rtems.h>
-
-#if !defined(RTEMS_UNIX)
-#ifdef RTEMS_NEWLIB
-#include <sys/reent.h>
-#endif
-
-#include <sys/time.h>
-#include <time.h>
-
-#include <errno.h>
-#include <assert.h>
-
-/*
- * Seconds from January 1, 1970 to January 1, 1988. Used to account for
- * differences between POSIX API and RTEMS core.
- */
-
-#define POSIX_TIME_SECONDS_1970_THROUGH_1988 \
- (((1987 - 1970 + 1) * TOD_SECONDS_PER_NON_LEAP_YEAR) + \
- (4 * TOD_SECONDS_PER_DAY))
-
-/*
- * NOTE: The solaris gettimeofday does not have a second parameter.
- */
-
-int gettimeofday(
- struct timeval *tp,
- struct timezone *tzp
-)
-{
- rtems_interrupt_level level;
- rtems_unsigned32 seconds;
- rtems_unsigned32 microseconds;
-
- if ( !tp ) {
- errno = EFAULT;
- return -1;
- }
-
- /*
- * POSIX does not seem to allow for not having a TOD so we just
- * grab the time of day.
- *
- * NOTE: XXX this routine should really be in the executive proper.
- */
-
- rtems_interrupt_disable(level);
- seconds = _TOD_Seconds_since_epoch;
- microseconds = _TOD_Current.ticks;
- rtems_interrupt_enable(level);
-
- tp->tv_sec = seconds + POSIX_TIME_SECONDS_1970_THROUGH_1988;
- tp->tv_usec = microseconds * _TOD_Microseconds_per_tick;
-
- /*
- * newlib does not have timezone and daylight savings time
- * yet. When it does this needs to be fixed.
- */
-
-#if 0
- if ( tzp ) {
- tzp->tz_minuteswest = 0; /* at UTC */
- tzp->tz_dsttime = 0; /* no daylight savings */
- tzp->minuteswest = timezone / 60; /* from seconds to minutes */
- tzp->dsttime = daylight;
- }
-#endif
- return 0;
-}
-
-#if defined(RTEMS_NEWLIB)
-
-/*
- * "Reentrant" version
- */
-
-int _gettimeofday_r(
- struct _reent *ignored_reentrancy_stuff,
- struct timeval *tp,
- struct timezone *tzp
-)
-{
- return gettimeofday( tp, tzp );
-}
-
-/*
- * "System call" version
- */
-
-int _gettimeofday(
- struct timeval *tp,
- struct timezone *tzp
-)
-{
- return gettimeofday( tp, tzp );
-}
-
-#endif /* defined(RTEMS_NEWLIB) */
-
-#endif
diff --git a/c/src/exec/libcsupport/src/__sbrk.c b/c/src/exec/libcsupport/src/__sbrk.c
deleted file mode 100644
index f09188c571..0000000000
--- a/c/src/exec/libcsupport/src/__sbrk.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * RTEMS "Broken" __sbrk Implementation
- *
- * NOTE: sbrk is provided by the BSP.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#if !defined(RTEMS_UNIX)
-
-#include <errno.h>
-
-void * __sbrk(
- int incr
-)
-{
- errno = EINVAL;
- return (void *)0;
-}
-#endif
diff --git a/c/src/exec/libcsupport/src/__times.c b/c/src/exec/libcsupport/src/__times.c
deleted file mode 100644
index 49bd64042b..0000000000
--- a/c/src/exec/libcsupport/src/__times.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * times() - POSIX 1003.1b 4.5.2 - Get Process Times
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-
-#include <sys/times.h>
-#include <time.h>
-#include <sys/time.h>
-#include <errno.h>
-#include <assert.h>
-
-clock_t _times(
- struct tms *ptms
-)
-{
- rtems_status_code status;
- rtems_interval ticks;
-
- if ( !ptms ) {
- errno = EFAULT;
- return -1;
- }
-
- /* "POSIX" does not seem to allow for not having a TOD */
- status = rtems_clock_get( RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &ticks );
- if ( status != RTEMS_SUCCESSFUL ) {
- assert( 0 );
- return -1;
- }
-
- /*
- * RTEMS has no notion of system versus user time and although
- * a way to keep track of per task CPU usage was added since
- * 3.6.0, this routine does not utilize it yet.
- */
-
- ptms->tms_utime = ticks;
- ptms->tms_stime = 0;
- ptms->tms_cutime = 0;
- ptms->tms_cstime = 0;
-
- return 0;
-}
-
-/*
- * times()
- *
- * times() system call wrapper for _times() above.
- */
-
-clock_t times(
- struct tms *ptms
-)
-{
- return _times( ptms );
-}
-
-/*
- * _times_r
- *
- * This is the Newlib dependent reentrant version of times().
- */
-
-#if defined(RTEMS_NEWLIB)
-
-#include <reent.h>
-
-clock_t _times_r(
- struct _reent *ptr,
- struct tms *ptms
-)
-{
- return _times( ptms );
-}
-#endif
diff --git a/c/src/exec/libcsupport/src/access.c b/c/src/exec/libcsupport/src/access.c
deleted file mode 100644
index 7e25fdfc30..0000000000
--- a/c/src/exec/libcsupport/src/access.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * access() - POSIX 1003.1b 5.6.3 - File Accessibility
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-
-int access(
- const char *path,
- int amode
-)
-{
- struct stat statbuf;
-
- if ( stat(path, &statbuf) )
- return -1;
-
- if ( amode & R_OK ) {
- if (!( statbuf.st_mode & S_IREAD ))
- return -1;
- }
-
- if ( amode & W_OK ) {
- if ( !( statbuf.st_mode & S_IWRITE ) )
- return -1;
- }
-
- if ( amode & X_OK ) {
- if ( !( statbuf.st_mode & S_IEXEC ) )
- return -1;
- }
-
- return 0;
-}
-
diff --git a/c/src/exec/libcsupport/src/assoc.c b/c/src/exec/libcsupport/src/assoc.c
deleted file mode 100644
index 5a24bd43a7..0000000000
--- a/c/src/exec/libcsupport/src/assoc.c
+++ /dev/null
@@ -1,250 +0,0 @@
-/*
- * assoc.c
- * rtems assoc routines
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include "assoc.h"
-
-#include <string.h> /* strcat, strcmp */
-
-#define STREQ(a,b) (strcmp((a), (b)) == 0)
-#define rtems_assoc_is_default(ap) ((ap)->name && STREQ(ap->name, RTEMS_ASSOC_DEFAULT_NAME))
-
-const rtems_assoc_t *
-rtems_assoc_ptr_by_name(
- const rtems_assoc_t *ap,
- const char *name
- )
-{
- const rtems_assoc_t *default_ap = 0;
-
- if (rtems_assoc_is_default(ap))
- default_ap = ap++;
-
- for ( ; ap->name; ap++)
- if (strcmp(ap->name, name) == 0)
- return ap;
-
- return default_ap;
-}
-
-const rtems_assoc_t *
-rtems_assoc_ptr_by_local(
- const rtems_assoc_t *ap,
- unsigned32 local_value
- )
-{
- const rtems_assoc_t *default_ap = 0;
-
- if (rtems_assoc_is_default(ap))
- default_ap = ap++;
-
- for ( ; ap->name; ap++)
- if (ap->local_value == local_value)
- return ap;
-
- return default_ap;
-}
-
-
-const rtems_assoc_t *
-rtems_assoc_ptr_by_remote(
- const rtems_assoc_t *ap,
- unsigned32 remote_value
- )
-{
- const rtems_assoc_t *default_ap = 0;
-
- if (rtems_assoc_is_default(ap))
- default_ap = ap++;
-
- for ( ; ap->name; ap++)
- if (ap->remote_value == remote_value)
- return ap;
-
- return default_ap;
-}
-
-
-/*
- * Get values
- */
-
-unsigned32
-rtems_assoc_remote_by_local(
- const rtems_assoc_t *ap,
- unsigned32 local_value
- )
-{
- const rtems_assoc_t *nap;
- nap = rtems_assoc_ptr_by_local(ap, local_value);
- if (nap)
- return nap->remote_value;
-
- return 0;
-}
-
-unsigned32
-rtems_assoc_local_by_remote(
- const rtems_assoc_t *ap,
- unsigned32 remote_value
- )
-{
- const rtems_assoc_t *nap;
- nap = rtems_assoc_ptr_by_remote(ap, remote_value);
- if (nap)
- return nap->local_value;
-
- return 0;
-}
-
-unsigned32
-rtems_assoc_remote_by_name(
- const rtems_assoc_t *ap,
- const char *name
- )
-{
- const rtems_assoc_t *nap;
- nap = rtems_assoc_ptr_by_name(ap, name);
- if (nap)
- return nap->remote_value;
-
- return 0;
-}
-
-unsigned32
-rtems_assoc_local_by_name(
- const rtems_assoc_t *ap,
- const char *name
- )
-{
- const rtems_assoc_t *nap;
- nap = rtems_assoc_ptr_by_name(ap, name);
- if (nap)
- return nap->local_value;
-
- return 0;
-}
-
-/*
- * what to return if a value is not found
- * this is not reentrant, but it really shouldn't be invoked anyway
- */
-
-const char *rtems_assoc_name_bad(
- unsigned32 bad_value
-);
-
-/* body in separate file to reduce dependency on printf */
-
-
-const char *
-rtems_assoc_name_by_local(
- const rtems_assoc_t *ap,
- unsigned32 local_value
- )
-{
- const rtems_assoc_t *nap;
- nap = rtems_assoc_ptr_by_local(ap, local_value);
- if (nap)
- return nap->name;
-
- return rtems_assoc_name_bad(local_value);
-}
-
-const char *
-rtems_assoc_name_by_remote(
- const rtems_assoc_t *ap,
- unsigned32 remote_value
- )
-{
- const rtems_assoc_t *nap;
- nap = rtems_assoc_ptr_by_remote(ap, remote_value);
- if (nap)
- return nap->name;
-
- return rtems_assoc_name_bad(remote_value);
-}
-
-/*
- * Bitfield functions assume just 1 bit set in each of remote and local
- * entries; they do not check for this.
- */
-
-unsigned32 rtems_assoc_remote_by_local_bitfield(
- const rtems_assoc_t *ap,
- unsigned32 local_value
- )
-{
- unsigned32 b;
- unsigned32 remote_value = 0;
-
- for (b = 1; b; b <<= 1)
- if (b & local_value)
- remote_value |= rtems_assoc_remote_by_local(ap, b);
-
- return remote_value;
-}
-
-
-unsigned32 rtems_assoc_local_by_remote_bitfield(
- const rtems_assoc_t *ap,
- unsigned32 remote_value
- )
-{
- unsigned32 b;
- unsigned32 local_value = 0;
-
- for (b = 1; b; b <<= 1)
- if (b & remote_value)
- local_value |= rtems_assoc_local_by_remote(ap, b);
-
- return local_value;
-}
-
-char *
-rtems_assoc_name_by_remote_bitfield(
- const rtems_assoc_t *ap,
- unsigned32 value,
- char *buffer
- )
-{
- unsigned32 b;
-
- *buffer = 0;
-
- for (b = 1; b; b <<= 1)
- if (b & value)
- {
- if (*buffer)
- strcat(buffer, " ");
- strcat(buffer, rtems_assoc_name_by_remote(ap, b));
- }
-
- return buffer;
-}
-
-char *
-rtems_assoc_name_by_local_bitfield(
- const rtems_assoc_t *ap,
- unsigned32 value,
- char *buffer
- )
-{
- unsigned32 b;
-
- *buffer = 0;
-
- for (b = 1; b; b <<= 1)
- if (b & value)
- {
- if (*buffer)
- strcat(buffer, " ");
- strcat(buffer, rtems_assoc_name_by_local(ap, b));
- }
-
- return buffer;
-}
diff --git a/c/src/exec/libcsupport/src/assocnamebad.c b/c/src/exec/libcsupport/src/assocnamebad.c
deleted file mode 100644
index e336c39cc7..0000000000
--- a/c/src/exec/libcsupport/src/assocnamebad.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * assoc.c
- * rtems assoc routines
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include "assoc.h"
-
-#include <stdio.h> /* sprintf */
-#include <string.h> /* strcat, strcmp */
-
-#define STREQ(a,b) (strcmp((a), (b)) == 0)
-#define rtems_assoc_is_default(ap) ((ap)->name && STREQ(ap->name, RTEMS_ASSOC_DEFAULT_NAME))
-
-/*
- * what to return if a value is not found
- * this is not reentrant, but it really shouldn't be invoked anyway
- */
-
-const char *
-rtems_assoc_name_bad(
- unsigned32 bad_value
-)
-{
-#ifdef RTEMS_DEBUG
- static char bad_buffer[32];
-
- sprintf(bad_buffer, "< %d [0x%x] >", bad_value, bad_value);
-#else
- static char bad_buffer[32] = "<assoc.c: BAD NAME>";
-#endif
- return bad_buffer;
-}
-
-
diff --git a/c/src/exec/libcsupport/src/base_fs.c b/c/src/exec/libcsupport/src/base_fs.c
deleted file mode 100644
index 3ea1abd7aa..0000000000
--- a/c/src/exec/libcsupport/src/base_fs.c
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Base file system initialization
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include <rtems/libio.h>
-#include "imfs.h"
-#include "libio_.h"
-
-/*
- * Global information for the base file system.
- */
-
-rtems_filesystem_location_info_t rtems_filesystem_current;
-rtems_filesystem_location_info_t rtems_filesystem_root;
-nlink_t rtems_filesystem_link_counts;
-
-/*
- * Default mode for created files.
- */
-
-mode_t rtems_filesystem_umask;
-
-/*
- * rtems_filesystem_initialize
- *
- * Initialize the foundation of the file system with one instantiation
- * of the IMFS with a single "/dev" directory in it.
- */
-
-void rtems_filesystem_initialize( void )
-{
-#if !defined(RTEMS_UNIX)
-#if 0
- int i;
-#endif
- int status;
- rtems_filesystem_mount_table_entry_t *entry;
- rtems_filesystem_mount_table_t *mt;
-
- /*
- * Set the default umask to "022".
- */
-
- rtems_filesystem_umask = S_IWOTH | S_IROTH;
-
- init_fs_mount_table();
-
- /*
- * mount the first filesystem.
- */
-
- if ( rtems_filesystem_mount_table_size == 0 )
- rtems_fatal_error_occurred( 0xABCD0001 );
-
- mt = &rtems_filesystem_mount_table[0];
-
- status = mount(
- &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point );
-
- if ( status == -1 )
- rtems_fatal_error_occurred( 0xABCD0002 );
-
- rtems_filesystem_link_counts = 0;
- rtems_filesystem_root = entry->mt_fs_root;
- rtems_filesystem_current = rtems_filesystem_root;
-
- /*
- * Traditionally RTEMS devices are under "/dev" so install this directory.
- *
- * If the mkdir() fails, we can't print anything so just fatal error.
- *
- * NOTE: UNIX root is 755 and owned by root/root (0/0).
- */
-
- status = mkdir( "/dev", S_IRWXU | S_IRWXG | S_IRWXO );
- if ( status != 0 )
- rtems_fatal_error_occurred( 0xABCD0003 );
-
- /*
- * This code if if'ed 0 out because you can't mount another
- * filesystem properly until the mount point it will be
- * mounted onto is created. Moreover, if it is going to
- * use a device, then it is REALLY unfair to attempt this
- * before device drivers are initialized.
- */
-
-#if 0
- /*
- * Now if there are other filesystems to mount, go for it.
- */
-
- for ( i=1 ; i < rtems_filesystem_mount_table_size ; i++ ) {
- mt = &rtems_filesystem_mount_table[0];
-
- status = mount(
- &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point );
-
- if ( status == -1 )
- rtems_fatal_error_occurred( 0xABCD0003 );
- }
-#endif
-#endif
-}
diff --git a/c/src/exec/libcsupport/src/cfgetispeed.c b/c/src/exec/libcsupport/src/cfgetispeed.c
deleted file mode 100644
index 43a8c97137..0000000000
--- a/c/src/exec/libcsupport/src/cfgetispeed.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * cfgetispeed() - POSIX 1003.1b 7.1.3 - Baud Rate Functions
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#if defined(RTEMS_NEWLIB)
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <termios.h>
-
-speed_t cfgetispeed(
- const struct termios *tp
-)
-{
- return (tp->c_cflag / (CIBAUD / CBAUD)) & CBAUD;
-}
-#endif
diff --git a/c/src/exec/libcsupport/src/cfgetospeed.c b/c/src/exec/libcsupport/src/cfgetospeed.c
deleted file mode 100644
index 460b47b498..0000000000
--- a/c/src/exec/libcsupport/src/cfgetospeed.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * cfgetospeed() - POSIX 1003.1b 7.1.3 - Baud Rate Functions
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#if defined(RTEMS_NEWLIB)
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <termios.h>
-
-speed_t cfgetospeed(
- const struct termios *tp
-)
-{
- return tp->c_cflag & CBAUD;
-}
-#endif
diff --git a/c/src/exec/libcsupport/src/cfsetispeed.c b/c/src/exec/libcsupport/src/cfsetispeed.c
deleted file mode 100644
index af1a1b840c..0000000000
--- a/c/src/exec/libcsupport/src/cfsetispeed.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * cfsetispeed() - POSIX 1003.1b 7.1.3 - Baud Rate Functions
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#if defined(RTEMS_NEWLIB)
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <termios.h>
-
-#include "libio_.h"
-
-int cfsetispeed(
- struct termios *tp,
- speed_t speed
-)
-{
- if ( speed & ~CBAUD )
- set_errno_and_return_minus_one( EINVAL );
-
- tp->c_cflag = (tp->c_cflag & ~CIBAUD) | (speed * (CIBAUD / CBAUD));
- return 0;
-}
-#endif
diff --git a/c/src/exec/libcsupport/src/cfsetospeed.c b/c/src/exec/libcsupport/src/cfsetospeed.c
deleted file mode 100644
index f6f6c5838c..0000000000
--- a/c/src/exec/libcsupport/src/cfsetospeed.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * cfsetospeed() - POSIX 1003.1b 7.1.3 - Baud Rate Functions
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#if defined(RTEMS_NEWLIB)
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <termios.h>
-
-#include "libio_.h"
-
-int cfsetospeed(
- struct termios *tp,
- speed_t speed
-)
-{
- if ( speed & ~CBAUD )
- set_errno_and_return_minus_one( EINVAL );
-
- tp->c_cflag = (tp->c_cflag & ~CBAUD) | speed;
- return 0;
-}
-#endif
diff --git a/c/src/exec/libcsupport/src/chdir.c b/c/src/exec/libcsupport/src/chdir.c
deleted file mode 100644
index 4ab5c84cb8..0000000000
--- a/c/src/exec/libcsupport/src/chdir.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * chdir() - POSIX 1003.1b - 5.2.1 - Change Current Working Directory
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-
-#include <unistd.h>
-#include <errno.h>
-
-#include "libio_.h"
-
-int chdir(
- const char *pathname
-)
-{
- rtems_filesystem_location_info_t loc;
- int result;
-
- /*
- * Get the node where we wish to go.
- */
-
- result = rtems_filesystem_evaluate_path( pathname, 0, &loc, TRUE );
- if ( result != 0 )
- return -1;
-
- /*
- * Verify you can change directory into this node.
- */
-
- if ( !loc.ops->node_type ) {
- rtems_filesystem_freenode( &loc );
- set_errno_and_return_minus_one( ENOTSUP );
- }
-
- if ( (*loc.ops->node_type)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
- rtems_filesystem_freenode( &loc );
- set_errno_and_return_minus_one( ENOTDIR );
- }
-
- rtems_filesystem_freenode( &rtems_filesystem_current );
-
- rtems_filesystem_current = loc;
-
- return 0;
-}
diff --git a/c/src/exec/libcsupport/src/chmod.c b/c/src/exec/libcsupport/src/chmod.c
deleted file mode 100644
index d88e80eeb7..0000000000
--- a/c/src/exec/libcsupport/src/chmod.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * chmod() - POSIX 1003.1b 5.6.4 - Change File Modes
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include <rtems/libio.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <unistd.h>
-
-#include "libio_.h"
-
-int chmod(
- const char *path,
- mode_t mode
-)
-{
- int status;
- rtems_filesystem_location_info_t loc;
- int result;
-
- status = rtems_filesystem_evaluate_path( path, 0, &loc, TRUE );
- if ( status != 0 )
- return -1;
-
- if ( !loc.handlers->fchmod ){
- rtems_filesystem_freenode( &loc );
- set_errno_and_return_minus_one( ENOTSUP );
- }
-
- result = (*loc.handlers->fchmod)( &loc, mode );
-
- rtems_filesystem_freenode( &loc );
-
- return result;
-}
diff --git a/c/src/exec/libcsupport/src/chown.c b/c/src/exec/libcsupport/src/chown.c
deleted file mode 100644
index 796fa5370c..0000000000
--- a/c/src/exec/libcsupport/src/chown.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * chown() - POSIX 1003.1b 5.6.5 - Change Owner and Group of a File
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/stat.h>
-#include <errno.h>
-
-#include <rtems.h>
-#include <rtems/libio.h>
-
-#include "libio_.h"
-
-int chown(
- const char *path,
- uid_t owner,
- gid_t group
-)
-{
- rtems_filesystem_location_info_t loc;
- int result;
-
- if ( rtems_filesystem_evaluate_path( path, 0x00, &loc, TRUE ) )
- return -1;
-
- if ( !loc.ops->chown ) {
- rtems_filesystem_freenode( &loc );
- set_errno_and_return_minus_one( ENOTSUP );
- }
-
- result = (*loc.ops->chown)( &loc, owner, group );
-
- rtems_filesystem_freenode( &loc );
-
- return result;
-}
diff --git a/c/src/exec/libcsupport/src/close.c b/c/src/exec/libcsupport/src/close.c
deleted file mode 100644
index 0ee9df89ed..0000000000
--- a/c/src/exec/libcsupport/src/close.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * close() - POSIX 1003.1b 6.3.1 - Close a File
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "libio_.h"
-
-int close(
- int fd
-)
-{
- rtems_libio_t *iop;
- rtems_status_code rc;
-
- rtems_libio_check_fd(fd);
- iop = rtems_libio_iop(fd);
- rtems_libio_check_is_open(iop);
-
- rc = RTEMS_SUCCESSFUL;
- if ( iop->handlers->close )
- rc = (*iop->handlers->close)( iop );
-
- rtems_libio_free( iop );
-
- return rc;
-}
-
-/*
- * _close_r
- *
- * This is the Newlib dependent reentrant version of close().
- */
-
-#if defined(RTEMS_NEWLIB)
-
-#include <reent.h>
-
-int _close_r(
- struct _reent *ptr,
- int fd
-)
-{
- return close( fd );
-}
-#endif
diff --git a/c/src/exec/libcsupport/src/closedir.c b/c/src/exec/libcsupport/src/closedir.c
deleted file mode 100644
index 4d948ec95b..0000000000
--- a/c/src/exec/libcsupport/src/closedir.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * closedir() - POSIX 1003.1b - XXX
- *
- * This was copied from Newlib 1.8.0.
- *
- *
- * Copyright (c) 1983 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)closedir.c 5.9 (Berkeley) 2/23/91";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <dirent.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <errno.h>
-
-
-#include "libio_.h"
-
-/*
- * close a directory.
- */
-int
-closedir(dirp)
- register DIR *dirp;
-{
- int fd;
-
- if ( !dirp )
- set_errno_and_return_minus_one( EBADF );
-
- fd = dirp->dd_fd;
- dirp->dd_fd = -1;
- dirp->dd_loc = 0;
- (void)free((void *)dirp->dd_buf);
- (void)free((void *)dirp);
- return(close(fd));
-}
diff --git a/c/src/exec/libcsupport/src/creat.c b/c/src/exec/libcsupport/src/creat.c
deleted file mode 100644
index 6b11162060..0000000000
--- a/c/src/exec/libcsupport/src/creat.c
+++ /dev/null
@@ -1,11 +0,0 @@
-/* creat() "system call" */
-
-/* This is needed by f2c and therefore the SPEC benchmarks. */
-
-#include <fcntl.h>
-
-int
-creat (const char *path, mode_t mode)
-{
- return open (path, O_WRONLY | O_CREAT | O_TRUNC, mode);
-}
diff --git a/c/src/exec/libcsupport/src/ctermid.c b/c/src/exec/libcsupport/src/ctermid.c
deleted file mode 100644
index 63fb610f43..0000000000
--- a/c/src/exec/libcsupport/src/ctermid.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * ctermid() - POSIX 1003.1b 4.7.1 - Generate Terminal Pathname
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#if defined(RTEMS_NEWLIB)
-
-#include <stdio.h>
-
-static char *ctermid_name = "/dev/console";
-
-char *ctermid(
- char *s
-)
-{
- if ( !s )
- return ctermid_name;
-
- strcpy( s, ctermid_name );
- return s;
-}
-
-#endif
diff --git a/c/src/exec/libcsupport/src/dup.c b/c/src/exec/libcsupport/src/dup.c
deleted file mode 100644
index 902c70756a..0000000000
--- a/c/src/exec/libcsupport/src/dup.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * dup() - POSIX 1003.1b 6.2.1 Duplicate an Open File Descriptor
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <unistd.h>
-#include <fcntl.h>
-
-int dup(
- int fildes
-)
-{
- return fcntl( fildes, F_DUPFD, 0 );
-}
diff --git a/c/src/exec/libcsupport/src/dup2.c b/c/src/exec/libcsupport/src/dup2.c
deleted file mode 100644
index 21701bfd0d..0000000000
--- a/c/src/exec/libcsupport/src/dup2.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * dup2() - POSIX 1003.1b 6.2.1 Duplicate an Open File Descriptor
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <unistd.h>
-#include <fcntl.h>
-
-#include "libio_.h"
-
-int dup2(
- int fildes,
- int fildes2
-)
-{
- int status;
- struct stat buf;
-
- /*
- * If fildes is not valid, then fildes2 should not be closed.
- */
-
- status = fstat( fildes, &buf );
- if ( status == -1 )
- return -1;
-
- /*
- * If fildes2 is not valid, then we should not do anything either.
- */
-
- status = fstat( fildes2, &buf );
- if ( status == -1 )
- return -1;
-
- /*
- * This fcntl handles everything else.
- */
-
- return fcntl( fildes, F_DUPFD, fildes2 );
-}
diff --git a/c/src/exec/libcsupport/src/error.c b/c/src/exec/libcsupport/src/error.c
deleted file mode 100644
index 339f8eb374..0000000000
--- a/c/src/exec/libcsupport/src/error.c
+++ /dev/null
@@ -1,210 +0,0 @@
-/*
- * report errors and panics to RTEMS' stderr.
- * Currently just used by RTEMS monitor.
- *
- * $Id$
- */
-
-
-/*
- * These routines provide general purpose error reporting.
- * rtems_error reports an error to stderr and allows use of
- * printf style formatting. A newline is appended to all messages.
- *
- * error_flag can be specified as any of the following:
- *
- * RTEMS_ERROR_ERRNO -- include errno text in output
- * RTEMS_ERROR_PANIC -- halts local system after output
- * RTEMS_ERROR_ABORT -- abort after output
- *
- * It can also include a rtems_status value which can be OR'd
- * with the above flags. *
- *
- * EXAMPLE
- * #include <rtems.h>
- * #include <rtems/error.h>
- * rtems_error(0, "stray interrupt %d", intr);
- *
- * EXAMPLE
- * if ((status = rtems_task_create(...)) != RTEMS_SUCCCESSFUL)
- * {
- * rtems_error(status | RTEMS_ERROR_ABORT,
- * "could not create task");
- * }
- *
- * EXAMPLE
- * if ((fd = open(pathname, O_RDNLY)) < 0)
- * {
- * rtems_error(RTEMS_ERROR_ERRNO, "open of '%s' failed", pathname);
- * goto failed;
- * }
- */
-
-#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
-#include <rtems.h>
-
-#include "error.h"
-#include <rtems/assoc.h>
-
-#include <stdio.h>
-#include <stdarg.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h> /* _exit() */
-
-/* bug in hpux <errno.h>: no prototypes unless you are C++ */
-#ifdef hpux9
-char *strerror(int);
-#endif
-
-extern char *rtems_progname;
-int rtems_panic_in_progress;
-
-rtems_assoc_t rtems_status_assoc[] = {
- { "successful completion", RTEMS_SUCCESSFUL, },
- { "returned from a thread", RTEMS_TASK_EXITTED, },
- { "multiprocessing not configured", RTEMS_MP_NOT_CONFIGURED, },
- { "invalid object name", RTEMS_INVALID_NAME, },
- { "invalid object id", RTEMS_INVALID_ID, },
- { "too many", RTEMS_TOO_MANY, },
- { "timed out waiting", RTEMS_TIMEOUT, },
- { "object deleted while waiting", RTEMS_OBJECT_WAS_DELETED, },
- { "specified size was invalid", RTEMS_INVALID_SIZE, },
- { "address specified is invalid", RTEMS_INVALID_ADDRESS, },
- { "number was invalid", RTEMS_INVALID_NUMBER, },
- { "item has not been initialized", RTEMS_NOT_DEFINED, },
- { "resources still outstanding", RTEMS_RESOURCE_IN_USE, },
- { "request not satisfied", RTEMS_UNSATISFIED, },
- { "thread is in wrong state", RTEMS_INCORRECT_STATE, },
- { "thread already in state", RTEMS_ALREADY_SUSPENDED, },
- { "illegal on calling thread", RTEMS_ILLEGAL_ON_SELF, },
- { "illegal for remote object", RTEMS_ILLEGAL_ON_REMOTE_OBJECT, },
- { "called from wrong environment", RTEMS_CALLED_FROM_ISR, },
- { "invalid thread priority", RTEMS_INVALID_PRIORITY, },
- { "invalid date/time", RTEMS_INVALID_CLOCK, },
- { "invalid node id", RTEMS_INVALID_NODE, },
- { "directive not configured", RTEMS_NOT_CONFIGURED, },
- { "not owner of resource", RTEMS_NOT_OWNER_OF_RESOURCE , },
- { "directive not implemented", RTEMS_NOT_IMPLEMENTED, },
- { "RTEMS inconsistency detected", RTEMS_INTERNAL_ERROR, },
- { "could not get enough memory", RTEMS_NO_MEMORY, },
- { "driver IO error", RTEMS_IO_ERROR, },
- { "internal multiprocessing only", THREAD_STATUS_PROXY_BLOCKING, },
- { 0, 0, 0 },
-};
-
-
-const char *
-rtems_status_text(
- rtems_status_code status
-)
-{
- return rtems_assoc_name_by_local(rtems_status_assoc, status);
-}
-
-
-static int rtems_verror(
- unsigned32 error_flag,
- const char *printf_format,
- va_list arglist
-)
-{
- int local_errno = 0;
- int chars_written = 0;
- rtems_status_code status;
-
- if (error_flag & RTEMS_ERROR_PANIC)
- {
- if (rtems_panic_in_progress++)
- _Thread_Disable_dispatch(); /* disable task switches */
-
- /* don't aggravate things */
- if (rtems_panic_in_progress > 2)
- return 0;
- }
-
- (void) fflush(stdout); /* in case stdout/stderr same */
-
- status = error_flag & ~RTEMS_ERROR_MASK;
- if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
- local_errno = errno;
-
- if (_System_state_Is_multiprocessing)
- fprintf(stderr, "[%d] ", _Configuration_MP_table->node);
-
- if (rtems_progname && *rtems_progname)
- chars_written += fprintf(stderr, "%s: ", rtems_progname);
- chars_written += vfprintf(stderr, printf_format, arglist);
-
- if (status)
- chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
-
- if (local_errno)
- {
- if ((local_errno > 0) && *strerror(local_errno))
- chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
- else
- chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
- }
-
- chars_written += fprintf(stderr, "\n");
-
- (void) fflush(stderr);
-
- if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT))
- {
- if (error_flag & RTEMS_ERROR_PANIC)
- {
- rtems_error(0, "fatal error, exiting");
- _exit(local_errno);
- }
- else
- {
- rtems_error(0, "fatal error, aborting");
- abort();
- }
- }
- return chars_written;
-}
-
-
-/*
- * Report an error.
- * error_flag is as above; printf_format is a normal
- * printf(3) format string, with its concommitant arguments.
- *
- * Returns the number of characters written.
- */
-
-int rtems_error(
- int error_flag,
- const char *printf_format,
- ...
- )
-{
- va_list arglist;
- int chars_written;
-
- va_start(arglist, printf_format);
- chars_written = rtems_verror(error_flag, printf_format, arglist);
- va_end(arglist);
-
- return chars_written;
-}
-
-/*
- * rtems_panic is shorthand for rtems_error(RTEMS_ERROR_PANIC, ...)
- */
-
-void rtems_panic(
- const char *printf_format,
- ...
- )
-{
- va_list arglist;
-
- va_start(arglist, printf_format);
- (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist);
- va_end(arglist);
-}
diff --git a/c/src/exec/libcsupport/src/eval.c b/c/src/exec/libcsupport/src/eval.c
deleted file mode 100644
index 8fc27ca19c..0000000000
--- a/c/src/exec/libcsupport/src/eval.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * rtems_filesystem_evaluate_path()
- *
- * Routine to seed the evaluate path routine.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include "libio_.h"
-
-int rtems_filesystem_evaluate_path(
- const char *pathname,
- int flags,
- rtems_filesystem_location_info_t *pathloc,
- int follow_link
-)
-{
- int i;
- int result;
- rtems_filesystem_node_types_t type;
-
- /*
- * Verify Input parameters.
- */
-
- if ( !pathname )
- set_errno_and_return_minus_one( EFAULT );
-
- if ( !pathloc )
- set_errno_and_return_minus_one( EIO ); /* should never happen */
-
- /*
- * Evaluate the path using the optable evalpath.
- */
-
- rtems_filesystem_get_start_loc( pathname, &i, pathloc );
-
- result = (*pathloc->ops->evalpath)( &pathname[i], flags, pathloc );
-
- /*
- * Get the Node type and determine if you need to follow the link or
- * not.
- */
-
- if ( (result == 0) && follow_link ) {
-
- if ( !pathloc->ops->node_type )
- set_errno_and_return_minus_one( ENOTSUP );
-
- type = (*pathloc->ops->node_type)( pathloc );
-
- if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
- ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) {
-
- if ( !pathloc->ops->eval_link )
- set_errno_and_return_minus_one( ENOTSUP );
-
- result = (*pathloc->ops->eval_link)( pathloc, flags );
-
- }
- }
-
- return result;
-}
-
diff --git a/c/src/exec/libcsupport/src/fchmod.c b/c/src/exec/libcsupport/src/fchmod.c
deleted file mode 100644
index 74d9a30647..0000000000
--- a/c/src/exec/libcsupport/src/fchmod.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * fchmod() - POSIX 1003.1b 5.6.4 - Change File Modes
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <unistd.h>
-#include <sys/stat.h>
-#include <errno.h>
-
-#include <rtems.h>
-#include <rtems/libio.h>
-#include "libio_.h"
-
-int fchmod(
- int fd,
- mode_t mode
-)
-{
- rtems_libio_t *iop;
-
- rtems_libio_check_fd( fd );
- iop = rtems_libio_iop( fd );
- rtems_libio_check_is_open(iop);
-
- /*
- * Now process the fchmod().
- */
-
- rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
-
- if ( !iop->handlers->fchmod )
- set_errno_and_return_minus_one( ENOTSUP );
-
- return (*iop->pathinfo.handlers->fchmod)( &iop->pathinfo, mode );
-}
-
diff --git a/c/src/exec/libcsupport/src/fcntl.c b/c/src/exec/libcsupport/src/fcntl.c
deleted file mode 100644
index 05410eaff6..0000000000
--- a/c/src/exec/libcsupport/src/fcntl.c
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * fcntl() - POSIX 1003.1b 6.5.2 - File Control
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-
-#include <rtems.h>
-#include "libio_.h"
-
-int fcntl(
- int fd,
- int cmd,
- ...
-)
-{
- va_list ap;
- rtems_libio_t *iop;
- rtems_libio_t *diop;
- int fd2;
- int flags;
- int mask;
- int ret = 0;
-
- va_start( ap, cmd );
-
- rtems_libio_check_fd( fd );
- iop = rtems_libio_iop( fd );
- rtems_libio_check_is_open(iop);
-
- /*
- * Now process the fcntl().
- */
-
- /*
- * This switch should contain all the cases from POSIX.
- */
-
- switch ( cmd ) {
- case F_DUPFD: /* dup */
- fd2 = va_arg( ap, int );
- if ( fd2 )
- diop = rtems_libio_iop( fd2 );
- else {
- /* allocate a file control block */
- diop = rtems_libio_allocate();
- if ( diop == 0 ) {
- ret = -1;
- break;
- }
- }
-
- diop->handlers = iop->handlers;
- diop->file_info = iop->file_info;
- diop->flags = iop->flags;
- diop->pathinfo = iop->pathinfo;
- ret = (int) (diop - rtems_libio_iops);
- break;
-
- case F_GETFD: /* get f_flags */
- ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0);
- break;
-
- case F_SETFD: /* set f_flags */
- /*
- * Interpret the third argument as the "close on exec()" flag.
- * If this argument is 1, then the file descriptor is to be closed
- * if a new process is exec()'ed. Since RTEMS does not support
- * processes, then we can ignore this one except to make
- * F_GETFD work.
- */
-
- if ( va_arg( ap, int ) )
- iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
- else
- iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
- break;
-
- case F_GETFL: /* more flags (cloexec) */
- ret = rtems_libio_to_fcntl_flags( iop->flags );
- break;
-
- case F_SETFL:
- flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
- mask = LIBIO_FLAGS_NO_DELAY | LIBIO_FLAGS_APPEND;
-
- /*
- * XXX If we are turning on append, should we seek to the end?
- */
-
- iop->flags = (iop->flags & ~mask) | (flags & mask);
- break;
-
- case F_GETLK:
- errno = ENOTSUP;
- ret = -1;
- break;
-
- case F_SETLK:
- errno = ENOTSUP;
- ret = -1;
- break;
-
- case F_SETLKW:
- errno = ENOTSUP;
- ret = -1;
- break;
-
- case F_SETOWN: /* for sockets. */
- errno = ENOTSUP;
- ret = -1;
- break;
-
- case F_GETOWN: /* for sockets. */
- errno = ENOTSUP;
- ret = -1;
- break;
-
- default:
- errno = EINVAL;
- ret = -1;
- break;
- }
- if ((ret >= 0) && iop->handlers->fcntl) {
- int err = (*iop->handlers->fcntl)( cmd, iop );
- if (err) {
- errno = err;
- ret = -1;
- }
- }
- return ret;
-}
diff --git a/c/src/exec/libcsupport/src/fdatasync.c b/c/src/exec/libcsupport/src/fdatasync.c
deleted file mode 100644
index 7a86dc53c6..0000000000
--- a/c/src/exec/libcsupport/src/fdatasync.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * fdatasync() - POSIX 1003.1b 6.6.2 - Synchronize the Data of a File
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <unistd.h>
-
-#include "libio_.h"
-
-int fdatasync(
- int fd
-)
-{
- rtems_libio_t *iop;
-
- rtems_libio_check_fd( fd );
- iop = rtems_libio_iop( fd );
- rtems_libio_check_is_open(iop);
- rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
-
- /*
- * Now process the fdatasync().
- */
-
- if ( !iop->handlers->fdatasync )
- set_errno_and_return_minus_one( ENOTSUP );
-
- return (*iop->handlers->fdatasync)( iop );
-}
diff --git a/c/src/exec/libcsupport/src/fpathconf.c b/c/src/exec/libcsupport/src/fpathconf.c
deleted file mode 100644
index 744551ec88..0000000000
--- a/c/src/exec/libcsupport/src/fpathconf.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * fpathconf() - POSIX 1003.1b - 5.7.1 - Configurable Pathname Varables
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "libio_.h"
-
-#include <unistd.h>
-#include <errno.h>
-
-long fpathconf(
- int fd,
- int name
-)
-{
- long return_value;
- rtems_libio_t *iop;
- rtems_filesystem_limits_and_options_t *the_limits;
-
- rtems_libio_check_fd(fd);
- iop = rtems_libio_iop(fd);
- rtems_libio_check_is_open(iop);
- rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ);
-
- /*
- * Now process the information request.
- */
-
- the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
-
- switch ( name ) {
- case _PC_LINK_MAX:
- return_value = the_limits->link_max;
- break;
- case _PC_MAX_CANON:
- return_value = the_limits->max_canon;
- break;
- case _PC_MAX_INPUT:
- return_value = the_limits->max_input;
- break;
- case _PC_NAME_MAX:
- return_value = the_limits->name_max;
- break;
- case _PC_PATH_MAX:
- return_value = the_limits->path_max;
- break;
- case _PC_PIPE_BUF:
- return_value = the_limits->pipe_buf;
- break;
- case _PC_CHOWN_RESTRICTED:
- return_value = the_limits->posix_chown_restrictions;
- break;
- case _PC_NO_TRUNC:
- return_value = the_limits->posix_no_trunc;
- break;
- case _PC_VDISABLE:
- return_value = the_limits->posix_vdisable;
- break;
- case _PC_ASYNC_IO:
- return_value = the_limits->posix_async_io;
- break;
- case _PC_PRIO_IO:
- return_value = the_limits->posix_prio_io;
- break;
- case _PC_SYNC_IO:
- return_value = the_limits->posix_sync_io;
- break;
- default:
- set_errno_and_return_minus_one( EINVAL );
- break;
- }
-
- return return_value;
-}
diff --git a/c/src/exec/libcsupport/src/fs_null_handlers.c b/c/src/exec/libcsupport/src/fs_null_handlers.c
deleted file mode 100644
index 3bedb6a512..0000000000
--- a/c/src/exec/libcsupport/src/fs_null_handlers.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Null Filesystem Operations Tables
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-
-#include <rtems/libio.h>
-
-/*
- * Set of null operations handlers.
- */
-
-rtems_filesystem_file_handlers_r rtems_filesystem_null_handlers = {
- NULL, /* open */
- NULL, /* close */
- NULL, /* read */
- NULL, /* write */
- NULL, /* ioctl */
- NULL, /* lseek */
- NULL, /* fstat */
- NULL, /* fchmod */
- NULL, /* ftruncate */
- NULL, /* fpathconf */
- NULL, /* fsync */
- NULL, /* fdatasync */
- NULL /* fcntl */
-};
diff --git a/c/src/exec/libcsupport/src/fstat.c b/c/src/exec/libcsupport/src/fstat.c
deleted file mode 100644
index 8f216e3cfc..0000000000
--- a/c/src/exec/libcsupport/src/fstat.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * fstat() - POSIX 1003.1b 5.6.2 - Get File Status
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/stat.h>
-#include <unistd.h>
-#include <string.h>
-
-#include "libio_.h"
-
-int fstat(
- int fd,
- struct stat *sbuf
-)
-{
- rtems_libio_t *iop;
-
- /*
- * Check to see if we were passed a valid pointer.
- */
-
- if ( !sbuf )
- set_errno_and_return_minus_one( EFAULT );
-
- /*
- * Now process the stat() request.
- */
-
- iop = rtems_libio_iop( fd );
- rtems_libio_check_fd( fd );
- rtems_libio_check_is_open(iop);
-
- if ( !iop->handlers )
- set_errno_and_return_minus_one( EBADF );
-
- if ( !iop->handlers->fstat )
- set_errno_and_return_minus_one( ENOTSUP );
-
- /*
- * Zero out the stat structure so the various support
- * versions of stat don't have to.
- */
- memset( sbuf, 0, sizeof(struct stat) );
-
- return (*iop->handlers->fstat)( &iop->pathinfo, sbuf );
-}
-
-/*
- * _fstat_r
- *
- * This is the Newlib dependent reentrant version of fstat().
- */
-
-#if defined(RTEMS_NEWLIB)
-
-#include <reent.h>
-
-int _fstat_r(
- struct _reent *ptr,
- int fd,
- struct stat *buf
-)
-{
- return fstat( fd, buf );
-}
-#endif
diff --git a/c/src/exec/libcsupport/src/fsync.c b/c/src/exec/libcsupport/src/fsync.c
deleted file mode 100644
index 64f05f341a..0000000000
--- a/c/src/exec/libcsupport/src/fsync.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * fsync() - POSIX 1003.1b 6.6.1 - Synchronize the State of a File
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <unistd.h>
-
-#include "libio_.h"
-
-int fsync(
- int fd
-)
-{
- rtems_libio_t *iop;
-
- rtems_libio_check_fd( fd );
- iop = rtems_libio_iop( fd );
- rtems_libio_check_is_open(iop);
- rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
-
- /*
- * Now process the fsync().
- */
-
- if ( !iop->handlers->fsync )
- set_errno_and_return_minus_one( ENOTSUP );
-
- return (*iop->handlers->fsync)( iop );
-}
diff --git a/c/src/exec/libcsupport/src/ftruncate.c b/c/src/exec/libcsupport/src/ftruncate.c
deleted file mode 100644
index bbf0bc7240..0000000000
--- a/c/src/exec/libcsupport/src/ftruncate.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * ftruncate() - Truncate a File to the Specified Length
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <unistd.h>
-#include <errno.h>
-
-#include "libio_.h"
-
-int ftruncate(
- int fd,
- off_t length
-)
-{
- rtems_libio_t *iop;
- rtems_filesystem_location_info_t loc;
-
- rtems_libio_check_fd( fd );
- iop = rtems_libio_iop( fd );
- rtems_libio_check_is_open(iop);
-
- /*
- * Now process the ftruncate() request.
- */
-
- /*
- * Make sure we are not working on a directory
- */
-
- loc = iop->pathinfo;
- if ( !loc.ops->node_type )
- set_errno_and_return_minus_one( ENOTSUP );
-
- if ( (*loc.ops->node_type)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
- set_errno_and_return_minus_one( EISDIR );
-
- rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
-
- if ( !iop->handlers->ftruncate )
- set_errno_and_return_minus_one( ENOTSUP );
-
- return (*iop->handlers->ftruncate)( iop, length );
-}
-
diff --git a/c/src/exec/libcsupport/src/getcwd.c b/c/src/exec/libcsupport/src/getcwd.c
deleted file mode 100644
index 26b564a760..0000000000
--- a/c/src/exec/libcsupport/src/getcwd.c
+++ /dev/null
@@ -1,280 +0,0 @@
-/*
- * Copyright (c) 1989, 1991 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * Copied from newlib 1.8.1. RTEMS can not build all of the contents
- * of the UNIX directory but we need this routine.
- *
- * $Id$
- */
-
-/*
- * Added these when moved to RTEMS
- */
-
-#define _stat stat
-#define _opendir opendir
-#define _fstat fstat
-#define _readdir readdir
-#define _closedir closedir
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getcwd.c 5.11 (Berkeley) 2/24/91";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/stat.h>
-#include <errno.h>
-#include <dirent.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <reent.h>
-#include <_syslist.h>
-
-#define bcopy(a,b,c) memmove (b,a,c)
-
-#define ISDOT(dp) \
- (dp->d_name[0] == '.' && (dp->d_name[1] == '\0' || \
- (dp->d_name[1] == '.' && dp->d_name[2] == '\0')))
-
-#ifndef _REENT_ONLY
-
-char *
-getcwd (pt, size)
- char *pt;
- size_t size;
-{
- register struct dirent *dp;
- register DIR *dir;
- register dev_t dev;
- register ino_t ino;
- register int first;
- register char *bpt, *bup;
- struct stat s;
- dev_t root_dev;
- ino_t root_ino;
- size_t ptsize, upsize;
- int save_errno;
- char *ept, *eup, *up;
-
- /*
- * If no buffer specified by the user, allocate one as necessary.
- * If a buffer is specified, the size has to be non-zero. The path
- * is built from the end of the buffer backwards.
- */
-
- if (pt)
- {
- ptsize = 0;
- if (!size)
- {
- errno = EINVAL;
- return (char *) NULL;
- }
- ept = pt + size;
- }
- else
- {
- if (!(pt = (char *) malloc (ptsize = 1024 - 4)))
- {
- return (char *) NULL;
- }
- ept = pt + ptsize;
- }
- bpt = ept - 1;
- *bpt = '\0';
-
- /*
- * Allocate bytes (1024 - malloc space) for the string of "../"'s.
- * Should always be enough (it's 340 levels). If it's not, allocate
- * as necessary. Special * case the first stat, it's ".", not "..".
- */
-
- if (!(up = (char *) malloc (upsize = 1024 - 4)))
- {
- goto err;
- }
- eup = up + MAXPATHLEN;
- bup = up;
- up[0] = '.';
- up[1] = '\0';
-
- /* Save root values, so know when to stop. */
- if (stat ("/", &s))
- goto err;
- root_dev = s.st_dev;
- root_ino = s.st_ino;
-
- errno = 0; /* XXX readdir has no error return. */
-
- for (first = 1;; first = 0)
- {
- /* Stat the current level. */
- if (_stat (up, &s))
- goto err;
-
- /* Save current node values. */
- ino = s.st_ino;
- dev = s.st_dev;
-
- /* Check for reaching root. */
- if (root_dev == dev && root_ino == ino)
- {
- *--bpt = '/';
- /*
- * It's unclear that it's a requirement to copy the
- * path to the beginning of the buffer, but it's always
- * been that way and stuff would probably break.
- */
- (void) bcopy (bpt, pt, ept - bpt);
- free (up);
- return pt;
- }
-
- /*
- * Build pointer to the parent directory, allocating memory
- * as necessary. Max length is 3 for "../", the largest
- * possible component name, plus a trailing NULL.
- */
-
- if (bup + 3 + MAXNAMLEN + 1 >= eup)
- {
- if (!(up = (char *) realloc (up, upsize *= 2)))
- {
- goto err;
- }
- bup = up;
- eup = up + upsize;
- }
- *bup++ = '.';
- *bup++ = '.';
- *bup = '\0';
-
- /* Open and stat parent directory. */
- if (!(dir = _opendir (up)) || _fstat (__dirfd (dir), &s))
- goto err;
-
- /* Add trailing slash for next directory. */
- *bup++ = '/';
-
- /*
- * If it's a mount point, have to stat each element because
- * the inode number in the directory is for the entry in the
- * parent directory, not the inode number of the mounted file.
- */
-
- save_errno = 0;
- if (s.st_dev == dev)
- {
- for (;;)
- {
- if (!(dp = _readdir (dir)))
- goto notfound;
- if (dp->d_ino == ino)
- break;
- }
- }
- else
- for (;;)
- {
- if (!(dp = _readdir (dir)))
- goto notfound;
- if (ISDOT (dp))
- continue;
- bcopy (dp->d_name, bup, strlen (dp->d_name) + 1);
-
- /* Save the first error for later. */
- if (stat (up, &s))
- {
- if (!save_errno)
- save_errno = errno;
- errno = 0;
- continue;
- }
- if (s.st_dev == dev && s.st_ino == ino)
- break;
- }
-
- /*
- * Check for length of the current name, preceding slash,
- * leading slash.
- */
-
- if (bpt - pt <= strlen (dp->d_name) + (first ? 1 : 2))
- {
- size_t len, off;
-
- if (!ptsize)
- {
- errno = ERANGE;
- goto err;
- }
- off = bpt - pt;
- len = ept - bpt;
- if (!(pt = (char *) realloc (pt, ptsize *= 2)))
- {
- goto err;
- }
- bpt = pt + off;
- ept = pt + ptsize;
- (void) bcopy (bpt, ept - len, len);
- bpt = ept - len;
- }
- if (!first)
- *--bpt = '/';
- bpt -= strlen (dp->d_name);
- bcopy (dp->d_name, bpt, strlen (dp->d_name));
- (void) _closedir (dir);
-
- /* Truncate any file name. */
- *bup = '\0';
- }
-
-notfound:
- /*
- * If readdir set errno, use it, not any saved error; otherwise,
- * didn't find the current directory in its parent directory, set
- * errno to ENOENT.
- */
-
- if (!errno)
- errno = save_errno ? save_errno : ENOENT;
- /* FALLTHROUGH */
-
-err:
- if (ptsize)
- free (pt);
- free (up);
- return (char *) NULL;
-}
-
-#endif /* _REENT_ONLY */
diff --git a/c/src/exec/libcsupport/src/getdents.c b/c/src/exec/libcsupport/src/getdents.c
deleted file mode 100644
index b1afbb13f7..0000000000
--- a/c/src/exec/libcsupport/src/getdents.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * getdents() - Get Directory Entries
- *
- * SVR4 and SVID extension required by Newlib readdir() family.
- *
- * This routine will dd_len / (sizeof dirent) directory entries relative to
- * the current directory position index. These entries will be placed in
- * character array pointed to by -dd_buf-
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-
-#include "libio_.h"
-
-int getdents(
- int dd_fd,
- char *dd_buf,
- int dd_len
-)
-{
- rtems_libio_t *iop;
- rtems_filesystem_location_info_t loc;
-
- /*
- * Get the file control block structure associated with the file descriptor
- */
-
- iop = rtems_libio_iop( dd_fd );
-
- /*
- * Make sure we are working on a directory
- */
- loc = iop->pathinfo;
- if ( !loc.ops->node_type )
- set_errno_and_return_minus_one( ENOTSUP );
-
- if ( (*loc.ops->node_type)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
- set_errno_and_return_minus_one( ENOTDIR );
-
- /*
- * Return the number of bytes that were actually transfered as a result
- * of the read attempt.
- */
-
- if ( !iop->handlers->read )
- set_errno_and_return_minus_one( ENOTSUP );
-
- return (*iop->handlers->read)( iop, dd_buf, dd_len );
-}
diff --git a/c/src/exec/libcsupport/src/getgrent.c b/c/src/exec/libcsupport/src/getgrent.c
deleted file mode 100644
index da339718a0..0000000000
--- a/c/src/exec/libcsupport/src/getgrent.c
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * POSIX 1003.1b - 9.2.1 - Group Database Access Routines
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <grp.h>
-#include <errno.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <limits.h>
-
-static struct group gr_group; /* password structure */
-static FILE *group_fp;
-
-/*
- * The size of these buffers is arbitrary and there is no provision
- * to protect any of them from overflowing. The scanf patterns
- * need to be changed to prevent overflowing. In addition,
- * the limits on these needs to be examined.
- */
-
-static char groupname[8];
-static char password[1024];
-static char groups[1024];
-static char *gr_mem[16] = { } ;
-
-extern void init_etc_passwd_group(void);
-
-int getgrnam_r(
- const char *name,
- struct group *grp,
- char *buffer,
- size_t bufsize,
- struct group **result
-)
-{
- FILE *fp;
-
- init_etc_passwd_group();
-
- if ((fp = fopen ("/etc/group", "r")) == NULL) {
- errno = EINVAL;
- return -1;
- }
-
- while (fgets (buffer, bufsize, fp)) {
- sscanf (buffer, "%[^:]:%[^:]:%d:%s\n",
- groupname, password, (int *) &grp->gr_gid,
- groups);
- grp->gr_name = groupname;
- grp->gr_passwd = password;
- grp->gr_mem = gr_mem ;
-
- if (!strcmp (groupname, name)) {
- fclose (fp);
- *result = grp;
- return 0;
- }
- }
- fclose (fp);
- errno = EINVAL;
- return -1;
-}
-
-struct group *getgrnam(
- const char *name
-)
-{
- char buf[1024];
- struct group *g;
-
- if ( getgrnam_r( name, &gr_group, buf, 1024, &g ) )
- return NULL;
-
- return g;
-}
-
-int getgrgid_r(
- gid_t gid,
- struct group *grp,
- char *buffer,
- size_t bufsize,
- struct group **result
-)
-{
- FILE *fp;
-
- init_etc_passwd_group();
-
- if ((fp = fopen ("/etc/group", "r")) == NULL) {
- errno = EINVAL;
- return -1;
- }
-
- while (fgets (buffer, bufsize, fp)) {
- sscanf (buffer, "%[^:]:%[^:]:%d:%s\n",
- groupname, password, (int *) &gr_group.gr_gid,
- groups);
- gr_group.gr_name = groupname;
- gr_group.gr_passwd = password;
- gr_group.gr_mem = gr_mem ;
-
-
- if (gid == gr_group.gr_gid) {
- fclose (fp);
- *result = grp;
- return 0;
- }
- }
- fclose (fp);
- errno = EINVAL;
- return -1;
-}
-
-struct group *getgrgid (
- gid_t gid
-)
-{
- char buf[1024];
- struct group *g;
-
- if ( getgrgid_r( gid, &gr_group, buf, 1024, &g ) )
- return NULL;
-
- return g;
-}
-
-struct group *getgrent( void )
-{
- char buf[1024];
-
- if (group_fp == NULL)
- return NULL;
-
- if (fgets (buf, sizeof (buf), group_fp) == NULL)
- return NULL;
-
- sscanf (buf, "%[^:]:%[^:]:%d:%s\n",
- groupname, password, (int *) &gr_group.gr_gid,
- groups);
- gr_group.gr_name = groupname;
- gr_group.gr_passwd = password;
- gr_group.gr_mem = gr_mem ;
-
- return &gr_group;
-}
-
-void
-setgrent ()
-{
- init_etc_passwd_group();
-
- if (group_fp != NULL)
- fclose (group_fp);
-
- group_fp = fopen ("/etc/group", "r");
-}
-
-void
-endgrent ()
-{
- if (group_fp != NULL)
- fclose (group_fp);
-}
diff --git a/c/src/exec/libcsupport/src/getpwent.c b/c/src/exec/libcsupport/src/getpwent.c
deleted file mode 100644
index 06f7318d27..0000000000
--- a/c/src/exec/libcsupport/src/getpwent.c
+++ /dev/null
@@ -1,227 +0,0 @@
-/*
- * POSIX 1003.1b - 9.2.2 - User Database Access Routines
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <pwd.h>
-#include <errno.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <limits.h>
-#include <fcntl.h>
-#include <unistd.h>
-
-static struct passwd pw_passwd; /* password structure */
-static FILE *passwd_fp;
-
-/*
- * The size of these buffers is arbitrary and there is no provision
- * to protect any of them from overflowing. The scanf patterns
- * need to be changed to prevent overflowing. In addition,
- * the limits on these needs to be examined.
- */
-
-static char logname[8];
-static char password[1024];
-static char comment[1024];
-static char gecos[1024];
-static char dir[1024];
-static char shell[1024];
-
-/*
- * Initialize a useable but dummy /etc/passwd
- *
- * NOTE: Ignore all errors.
- *
- */
-
-static char etc_passwd_initted = 0;
-
-void init_etc_passwd_group(void)
-{
- FILE *fp;
-
- if ( etc_passwd_initted )
- return;
- etc_passwd_initted = 1;
-
- (void) mkdir( "/etc", S_IRWXU | S_IRWXG | S_IRWXO );
-
- /*
- * Initialize /etc/passwd
- */
-
- if ((fp = fopen ("/etc/passwd", "w")) == NULL)
- return;
-
- fprintf( fp, "root:*:0:0:root,,,,:/tmp:/bin/false\n"
- "rtems:*:1:1:RTEMS Application,,,,:/tmp:/bin/false\n" );
-
- fclose( fp );
-
- /*
- * Initialize /etc/group
- */
-
- if ((fp = fopen ("/etc/group", "w")) == NULL)
- return;
-
- fprintf( fp, "root::0:root\n"
- "rtems::0:rtems\n" );
-
- fclose( fp );
-}
-
-int getpwnam_r(
- const char *name,
- struct passwd *pwd,
- char *buffer,
- size_t bufsize,
- struct passwd **result
-)
-{
- FILE *fp;
-
- init_etc_passwd_group();
-
- if ((fp = fopen ("/etc/passwd", "r")) == NULL) {
- errno = EINVAL;
- return -1;
- }
-
- while (fgets (buffer, bufsize, fp)) {
- sscanf (buffer, "%[^:]:%[^:]:%d:%d:%[^:]:%[^:]:%[^:]:%s\n",
- logname, password, &pwd->pw_uid,
- &pwd->pw_gid, comment, gecos,
- dir, shell);
- pwd->pw_name = logname;
- pwd->pw_passwd = password;
- pwd->pw_comment = comment;
- pwd->pw_gecos = gecos;
- pwd->pw_dir = dir;
- pwd->pw_shell = shell;
-
- if (!strcmp (logname, name)) {
- fclose (fp);
- *result = pwd;
- return 0;
- }
- }
- fclose (fp);
- errno = EINVAL;
- return -1;
-}
-
-struct passwd *getpwnam(
- const char *name
-)
-{
- char buf[1024];
- struct passwd *p;
-
- if ( getpwnam_r( name, &pw_passwd, buf, 1024, &p ) )
- return NULL;
-
- return p;
-}
-
-int getpwuid_r(
- uid_t uid,
- struct passwd *pwd,
- char *buffer,
- size_t bufsize,
- struct passwd **result
-)
-{
- FILE *fp;
-
- init_etc_passwd_group();
-
- if ((fp = fopen ("/etc/passwd", "r")) == NULL) {
- errno = EINVAL;
- return -1;
- }
-
- while (fgets (buffer, bufsize, fp)) {
- sscanf (buffer, "%[^:]:%[^:]:%d:%d:%[^:]:%[^:]:%[^:]:%s\n",
- logname, password, &pw_passwd.pw_uid,
- &pw_passwd.pw_gid, comment, gecos,
- dir, shell);
- pwd->pw_name = logname;
- pwd->pw_passwd = password;
- pwd->pw_comment = comment;
- pwd->pw_gecos = gecos;
- pwd->pw_dir = dir;
- pwd->pw_shell = shell;
-
- if (uid == pwd->pw_uid) {
- fclose (fp);
- *result = pwd;
- return 0;
- }
- }
- fclose (fp);
- errno = EINVAL;
- return -1;
-}
-
-struct passwd *getpwuid(
- uid_t uid
-)
-{
- char buf[1024];
- struct passwd *p;
-
- if ( getpwuid_r( uid, &pw_passwd, buf, 1024, &p ) )
- return NULL;
-
- return p;
-}
-
-struct passwd *getpwent()
-{
- char buf[1024];
-
- if (passwd_fp == NULL)
- return NULL;
-
- if (fgets (buf, sizeof (buf), passwd_fp) == NULL)
- return NULL;
-
- sscanf (buf, "%[^:]:%[^:]:%d:%d:%[^:]:%[^:]:%[^:]:%s\n",
- logname, password, &pw_passwd.pw_uid,
- &pw_passwd.pw_gid, comment, gecos,
- dir, shell);
- pw_passwd.pw_name = logname;
- pw_passwd.pw_passwd = password;
- pw_passwd.pw_comment = comment;
- pw_passwd.pw_gecos = gecos;
- pw_passwd.pw_dir = dir;
- pw_passwd.pw_shell = shell;
-
- return &pw_passwd;
-}
-
-void setpwent( void )
-{
- init_etc_passwd_group();
-
- if (passwd_fp != NULL)
- fclose (passwd_fp);
-
- passwd_fp = fopen ("/etc/passwd", "r");
-}
-
-void endpwent( void )
-{
- if (passwd_fp != NULL)
- fclose (passwd_fp);
-}
diff --git a/c/src/exec/libcsupport/src/hosterr.c b/c/src/exec/libcsupport/src/hosterr.c
deleted file mode 100644
index addb110dea..0000000000
--- a/c/src/exec/libcsupport/src/hosterr.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Routines to access a host errno
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#if defined(RTEMS_UNIX)
-#include <errno.h>
-
-int host_errno( void );
-
-/*
- * fix_syscall_errno
- *
- * copy host errno, if any to thread aware errno, if any
- */
-
-void fix_syscall_errno( void )
-{
- errno = host_errno();
-}
-
-/*
- * host_errno
- *
- * Get the host system errno, if any
- * When using newlib (or possibly other libc's) on top of UNIX
- * the errno returned by system calls may be unavailable due
- * to trickery of making errno thread aware.
- * This provides a kludge of getting at it.
- */
-
-#undef errno
-extern int errno;
-int host_errno(void)
-{
- return errno;
-}
-#endif
diff --git a/c/src/exec/libcsupport/src/ioctl.c b/c/src/exec/libcsupport/src/ioctl.c
deleted file mode 100644
index af986743dd..0000000000
--- a/c/src/exec/libcsupport/src/ioctl.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * ioctl() system call
- *
- * This routine is not defined in the POSIX 1003.1b standard but is
- * commonly supported on most UNIX and POSIX systems.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "libio_.h"
-
-int ioctl(
- int fd,
- unsigned32 command,
- void * buffer
-)
-{
- rtems_status_code rc;
- rtems_libio_t *iop;
-
- rtems_libio_check_fd( fd );
- iop = rtems_libio_iop( fd );
- rtems_libio_check_is_open(iop);
-
- /*
- * Now process the ioctl().
- */
-
- if ( !iop->handlers->ioctl )
- set_errno_and_return_minus_one( ENOTSUP );
-
- rc = (*iop->handlers->ioctl)( iop, command, buffer );
-
- return rc;
-}
diff --git a/c/src/exec/libcsupport/src/isatty.c b/c/src/exec/libcsupport/src/isatty.c
deleted file mode 100644
index 3c64647a94..0000000000
--- a/c/src/exec/libcsupport/src/isatty.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* isatty.c */
-
-/* Dumb implementation so programs will at least run. */
-
-#include <sys/stat.h>
-
-int
-isatty (int fd)
-{
- struct stat buf;
-
- if (fstat (fd, &buf) < 0)
- return 0;
- if (S_ISCHR (buf.st_mode))
- return 1;
- return 0;
-}
diff --git a/c/src/exec/libcsupport/src/libio.c b/c/src/exec/libcsupport/src/libio.c
deleted file mode 100644
index 9e075c9f0b..0000000000
--- a/c/src/exec/libcsupport/src/libio.c
+++ /dev/null
@@ -1,327 +0,0 @@
-/*
- * This file contains the support infrastructure used to manage the
- * table of integer style file descriptors used by the low level
- * POSIX system calls like open(), read, fstat(), etc.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "libio_.h" /* libio_.h pulls in rtems */
-#include <rtems.h>
-#include <rtems/assoc.h> /* assoc.h not included by rtems.h */
-
-#include <stdio.h> /* O_RDONLY, et.al. */
-#include <fcntl.h> /* O_RDONLY, et.al. */
-#include <assert.h>
-#include <errno.h>
-
-#if ! defined(O_NDELAY)
-# if defined(solaris2)
-# define O_NDELAY O_NONBLOCK
-# elif defined(RTEMS_NEWLIB)
-# define O_NDELAY _FNBIO
-# endif
-#endif
-
-
-#include <errno.h>
-#include <string.h> /* strcmp */
-#include <unistd.h>
-#include <stdlib.h> /* calloc() */
-
-#include <rtems/libio.h> /* libio.h not pulled in by rtems */
-
-/*
- * File descriptor Table Information
- */
-
-extern unsigned32 rtems_libio_number_iops;
-rtems_id rtems_libio_semaphore;
-rtems_libio_t *rtems_libio_iops;
-rtems_libio_t *rtems_libio_iop_freelist;
-
-/*
- * rtems_libio_init
- *
- * Called by BSP startup code to initialize the libio subsystem.
- */
-
-void rtems_libio_init( void )
-{
- rtems_status_code rc;
- int i;
- rtems_libio_t *iop;
-
- if (rtems_libio_number_iops > 0)
- {
- rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
- sizeof(rtems_libio_t));
- if (rtems_libio_iops == NULL)
- rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
-
- iop = rtems_libio_iop_freelist = rtems_libio_iops;
- for (i = 0 ; i < (rtems_libio_number_iops - 1) ; i++, iop++)
- iop->data1 = iop + 1;
- iop->data1 = NULL;
- }
-
- /*
- * Create the binary semaphore used to provide mutual exclusion
- * on the IOP Table.
- */
-
- rc = rtems_semaphore_create(
- RTEMS_LIBIO_SEM,
- 1,
- RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
- RTEMS_NO_PRIORITY,
- &rtems_libio_semaphore
- );
- if ( rc != RTEMS_SUCCESSFUL )
- rtems_fatal_error_occurred( rc );
-
- /*
- * Initialize the base file system infrastructure.
- */
-
- rtems_filesystem_initialize();
-}
-
-/*
- * rtems_libio_fcntl_flags
- *
- * Convert UNIX fnctl(2) flags to ones that RTEMS drivers understand
- */
-
-rtems_assoc_t access_modes_assoc[] = {
- { "READ", LIBIO_FLAGS_READ, O_RDONLY },
- { "WRITE", LIBIO_FLAGS_WRITE, O_WRONLY },
- { "READ/WRITE", LIBIO_FLAGS_READ_WRITE, O_RDWR },
- { 0, 0, 0 },
-};
-
-rtems_assoc_t status_flags_assoc[] = {
- { "NO DELAY", LIBIO_FLAGS_NO_DELAY, O_NDELAY },
- { "APPEND", LIBIO_FLAGS_APPEND, O_APPEND },
- { "CREATE", LIBIO_FLAGS_CREATE, O_CREAT },
- { 0, 0, 0 },
-};
-
-unsigned32 rtems_libio_fcntl_flags(
- unsigned32 fcntl_flags
-)
-{
- unsigned32 flags = 0;
- unsigned32 access_modes;
-
- /*
- * Access mode is a small integer
- */
-
- access_modes = fcntl_flags & O_ACCMODE;
- fcntl_flags &= ~O_ACCMODE;
- flags = rtems_assoc_local_by_remote( access_modes_assoc, access_modes );
-
- /*
- * Everything else is single bits
- */
-
- flags |=
- rtems_assoc_local_by_remote_bitfield(status_flags_assoc, fcntl_flags);
- return flags;
-}
-
-/*
- * rtems_libio_to_fcntl_flags
- *
- * Convert RTEMS internal flags to UNIX fnctl(2) flags
- */
-
-unsigned32 rtems_libio_to_fcntl_flags(
- unsigned32 flags
-)
-{
- unsigned32 fcntl_flags = 0;
-
- if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
- fcntl_flags |= O_RDWR;
- } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
- fcntl_flags |= O_RDONLY;
- } else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) {
- fcntl_flags |= O_WRONLY;
- }
-
- if ( (flags & LIBIO_FLAGS_NO_DELAY) == LIBIO_FLAGS_NO_DELAY ) {
- fcntl_flags |= O_NDELAY;
- }
-
- if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) {
- fcntl_flags |= O_APPEND;
- }
-
- if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) {
- fcntl_flags |= O_CREAT;
- }
-
- return fcntl_flags;
-}
-
-/*
- * rtems_libio_allocate
- *
- * This routine searches the IOP Table for an unused entry. If it
- * finds one, it returns it. Otherwise, it returns NULL.
- */
-
-rtems_libio_t *rtems_libio_allocate( void )
-{
- rtems_libio_t *iop;
- rtems_status_code rc;
-
- rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
-
- if (rtems_libio_iop_freelist) {
- iop = rtems_libio_iop_freelist;
- rc = rtems_semaphore_create(
- RTEMS_LIBIO_IOP_SEM(iop - rtems_libio_iops),
- 1,
- RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
- RTEMS_NO_PRIORITY,
- &iop->sem
- );
- if (rc != RTEMS_SUCCESSFUL)
- goto failed;
- rtems_libio_iop_freelist = iop->data1;
- iop->data1 = 0;
- iop->flags = LIBIO_FLAGS_OPEN;
- goto done;
- }
-
-failed:
- iop = 0;
-
-done:
- rtems_semaphore_release( rtems_libio_semaphore );
- return iop;
-}
-
-/*
- * rtems_libio_free
- *
- * This routine frees the resources associated with an IOP (file descriptor)
- * and clears the slot in the IOP Table.
- */
-
-void rtems_libio_free(
- rtems_libio_t *iop
-)
-{
- rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
-
- if (iop->sem)
- rtems_semaphore_delete(iop->sem);
-
- iop->flags &= ~LIBIO_FLAGS_OPEN;
- iop->data1 = rtems_libio_iop_freelist;
- rtems_libio_iop_freelist = iop;
-
- rtems_semaphore_release(rtems_libio_semaphore);
-}
-
-/*
- * rtems_libio_is_open_files_in_fs
- *
- * This routine scans the entire file descriptor table to determine if the
- * are any active file descriptors that refer to the at least one node in the
- * file system that we are trying to dismount.
- *
- * If there is at least one node in the file system referenced by the mount
- * table entry a 1 is returned, otherwise a 0 is returned.
- */
-
-int rtems_libio_is_open_files_in_fs(
- rtems_filesystem_mount_table_entry_t * fs_mt_entry
-)
-{
- rtems_libio_t *iop;
- int result = 0;
- int i;
-
- rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
-
- /*
- * Look for any active file descriptor entry.
- */
-
- for (iop=rtems_libio_iops,i=0; i <= rtems_libio_number_iops; iop++, i++){
-
- if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
-
- /*
- * Check if this node is under the file system that we
- * are trying to dismount.
- */
-
- if ( iop->pathinfo.mt_entry == fs_mt_entry ) {
- result = 1;
- break;
- }
- }
- }
-
- rtems_semaphore_release( rtems_libio_semaphore );
-
- return result;
-}
-
-/*
- * rtems_libio_is_file_open
- *
- * This routine scans the entire file descriptor table to determine if the
- * given file refers to an active file descriptor.
- *
- * If the given file is open a 1 is returned, otherwise a 0 is returned.
- */
-
-int rtems_libio_is_file_open(
- void *node_access
-)
-{
- rtems_libio_t *iop;
- int result=0;
- int i;
-
- rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
-
- /*
- * Look for any active file descriptor entry.
- */
-
- for (iop=rtems_libio_iops,i=0; i <= rtems_libio_number_iops; iop++, i++){
- if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
-
- /*
- * Check if this node is under the file system that we
- * are trying to dismount.
- */
-
- if ( iop->pathinfo.node_access == node_access ) {
- result = 1;
- break;
- }
- }
- }
-
- rtems_semaphore_release( rtems_libio_semaphore );
-
- return result;
-}
-
-
diff --git a/c/src/exec/libcsupport/src/libio_sockets.c b/c/src/exec/libcsupport/src/libio_sockets.c
deleted file mode 100644
index ac15a2a5c2..0000000000
--- a/c/src/exec/libcsupport/src/libio_sockets.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * This file contains the support infrastructure used to manage the
- * table of integer style file descriptors used by the socket calls.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "libio_.h" /* libio_.h pulls in rtems */
-#include <rtems.h>
-
-#include <errno.h>
-
-/*
- * Convert an RTEMS file descriptor to a BSD socket pointer.
- */
-
-struct socket *rtems_bsdnet_fdToSocket(
- int fd
-)
-{
- rtems_libio_t *iop;
-
- if ((unsigned32)fd >= rtems_libio_number_iops) {
- errno = EBADF;
- return NULL;
- }
- iop = &rtems_libio_iops[fd];
- if (iop->data1 == NULL)
- errno = EBADF;
- return iop->data1;
-}
-
-/*
- * Create an RTEMS file descriptor for a socket
- */
-
-int rtems_bsdnet_makeFdForSocket(
- void *so,
- const rtems_filesystem_file_handlers_r *h
-)
-{
- rtems_libio_t *iop;
- int fd;
-
- iop = rtems_libio_allocate();
- if (iop == 0) {
- errno = ENFILE;
- return -1;
- }
- fd = iop - rtems_libio_iops;
- iop->flags |= LIBIO_FLAGS_WRITE | LIBIO_FLAGS_READ;
- iop->data0 = fd;
- iop->data1 = so;
- iop->handlers = (rtems_filesystem_file_handlers_r *) h;
- return fd;
-}
diff --git a/c/src/exec/libcsupport/src/link.c b/c/src/exec/libcsupport/src/link.c
deleted file mode 100644
index 5bf8f90353..0000000000
--- a/c/src/exec/libcsupport/src/link.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * link() - POSIX 1003.1b - 5.3.4 - Create a new link
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include <rtems/libio.h>
-#include <errno.h>
-
-#include "libio_.h"
-
-int link(
- const char *existing,
- const char *new
-)
-{
- rtems_filesystem_location_info_t existing_loc;
- rtems_filesystem_location_info_t parent_loc;
- int i;
- int result;
- const char *name_start;
-
- /*
- * Get the node we are linking to.
- */
-
- result = rtems_filesystem_evaluate_path( existing, 0, &existing_loc, TRUE );
- if ( result != 0 )
- return -1;
-
- /*
- * Get the parent of the node we are creating.
- */
-
- rtems_filesystem_get_start_loc( new, &i, &parent_loc );
- result = (*parent_loc.ops->evalformake)( &new[i], &parent_loc, &name_start );
- if ( result != 0 ) {
- rtems_filesystem_freenode( &parent_loc );
- set_errno_and_return_minus_one( result );
- }
-
- /*
- * Check to see if the caller is trying to link across file system
- * boundaries.
- */
-
- if ( parent_loc.mt_entry != existing_loc.mt_entry ) {
- rtems_filesystem_freenode( &existing_loc );
- rtems_filesystem_freenode( &parent_loc );
- set_errno_and_return_minus_one( EXDEV );
- }
-
- if ( !parent_loc.ops->link ) {
- rtems_filesystem_freenode( &existing_loc );
- rtems_filesystem_freenode( &parent_loc );
- set_errno_and_return_minus_one( ENOTSUP );
- }
-
- result = (*parent_loc.ops->link)( &existing_loc, &parent_loc, name_start );
-
- rtems_filesystem_freenode( &existing_loc );
- rtems_filesystem_freenode( &parent_loc );
-
- return result;
-}
-
-/*
- * _link_r
- *
- * This is the Newlib dependent reentrant version of link().
- */
-
-#if defined(RTEMS_NEWLIB)
-
-#include <reent.h>
-
-int _link_r(
- struct _reent *ptr,
- const char *existing,
- const char *new
-)
-{
- return link( existing, new );
-}
-#endif
-
diff --git a/c/src/exec/libcsupport/src/lseek.c b/c/src/exec/libcsupport/src/lseek.c
deleted file mode 100644
index 992056482e..0000000000
--- a/c/src/exec/libcsupport/src/lseek.c
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * lseek() - POSIX 1003.1b 6.5.3 - Reposition Read/Write File Offset
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <stdio.h>
-
-#include "libio_.h"
-
-off_t lseek(
- int fd,
- off_t offset,
- int whence
-)
-{
- rtems_libio_t *iop;
-
- rtems_libio_check_fd( fd );
- iop = rtems_libio_iop( fd );
- rtems_libio_check_is_open(iop);
-
- /*
- * Now process the lseek().
- */
-
- switch ( whence ) {
- case SEEK_SET:
- iop->offset = offset;
- break;
-
- case SEEK_CUR:
- iop->offset += offset;
- break;
-
- case SEEK_END:
- iop->offset = iop->size - offset;
- break;
-
- default:
- errno = EINVAL;
- return -1;
- }
-
- if ( !iop->handlers->lseek )
- set_errno_and_return_minus_one( ENOTSUP );
-
- return (*iop->handlers->lseek)( iop, offset, whence );
-}
-
-/*
- * _lseek_r
- *
- * This is the Newlib dependent reentrant version of lseek().
- */
-
-#if defined(RTEMS_NEWLIB)
-
-#include <reent.h>
-
-off_t _lseek_r(
- struct _reent *ptr,
- int fd,
- off_t offset,
- int whence
-)
-{
- return lseek( fd, offset, whence );
-}
-#endif
-
diff --git a/c/src/exec/libcsupport/src/lstat.c b/c/src/exec/libcsupport/src/lstat.c
deleted file mode 100644
index 8a3e38c049..0000000000
--- a/c/src/exec/libcsupport/src/lstat.c
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * lstat() - BSD 4.3 and SVR4 - Get File Status
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define _STAT_NAME lstat
-#define _STAT_R_NAME _lstat_r
-#define _STAT_FOLLOW_LINKS FALSE
-
-#include "stat.c"
diff --git a/c/src/exec/libcsupport/src/malloc.c b/c/src/exec/libcsupport/src/malloc.c
deleted file mode 100644
index cc63b6c7d0..0000000000
--- a/c/src/exec/libcsupport/src/malloc.c
+++ /dev/null
@@ -1,422 +0,0 @@
-/*
- * RTEMS Malloc Family Implementation
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
-#include <rtems.h>
-#include "libcsupport.h"
-#ifdef RTEMS_NEWLIB
-#include <sys/reent.h>
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <assert.h>
-#include <errno.h>
-#include <string.h>
-
-#include <unistd.h> /* sbrk(2) */
-
-rtems_id RTEMS_Malloc_Heap;
-size_t RTEMS_Malloc_Sbrk_amount;
-
-#ifdef RTEMS_DEBUG
-#define MALLOC_STATS
-#define MALLOC_DIRTY
-#endif
-
-#ifdef MALLOC_STATS
-#define MSBUMP(f,n) rtems_malloc_stats.f += (n)
-
-struct {
- unsigned32 space_available; /* current size of malloc area */
- unsigned32 malloc_calls; /* # calls to malloc */
- unsigned32 free_calls;
- unsigned32 realloc_calls;
- unsigned32 calloc_calls;
- unsigned32 max_depth; /* most ever malloc'd at 1 time */
- unsigned64 lifetime_allocated;
- unsigned64 lifetime_freed;
-} rtems_malloc_stats;
-
-#else /* No rtems_malloc_stats */
-#define MSBUMP(f,n)
-#endif
-
-void RTEMS_Malloc_Initialize(
- void *start,
- size_t length,
- size_t sbrk_amount
-)
-{
- rtems_status_code status;
- void *starting_address;
- rtems_unsigned32 old_address;
- rtems_unsigned32 u32_address;
-
- /*
- * If the starting address is 0 then we are to attempt to
- * get length worth of memory using sbrk. Make sure we
- * align the address that we get back.
- */
-
- starting_address = start;
- RTEMS_Malloc_Sbrk_amount = sbrk_amount;
-
- if (!starting_address) {
- u32_address = (unsigned int)sbrk(length);
-
- if (u32_address == (rtems_unsigned32) -1) {
- rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
- /* DOES NOT RETURN!!! */
- }
-
- if (u32_address & (CPU_ALIGNMENT-1)) {
- old_address = u32_address;
- u32_address = (u32_address + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
-
- /*
- * adjust the length by whatever we aligned by
- */
-
- length -= u32_address - old_address;
- }
-
- starting_address = (void *)u32_address;
- }
-
- /*
- * If the BSP is not clearing out the workspace, then it is most likely
- * not clearing out the initial memory for the heap. There is no
- * standard supporting zeroing out the heap memory. But much code
- * with UNIX history seems to assume that memory malloc'ed during
- * initialization (before any free's) is zero'ed. This is true most
- * of the time under UNIX because zero'ing memory when it is first
- * given to a process eliminates the chance of a process seeing data
- * left over from another process. This would be a security violation.
- */
-
- if ( rtems_cpu_configuration_get_do_zero_of_workspace() )
- memset( starting_address, 0, length );
-
- /*
- * Unfortunately we cannot use assert if this fails because if this
- * has failed we do not have a heap and if we do not have a heap
- * STDIO cannot work because there will be no buffers.
- */
-
- status = rtems_region_create(
- rtems_build_name( 'H', 'E', 'A', 'P' ),
- starting_address,
- length,
- CPU_ALIGNMENT,
- RTEMS_DEFAULT_ATTRIBUTES,
- &RTEMS_Malloc_Heap
- );
- if ( status != RTEMS_SUCCESSFUL )
- rtems_fatal_error_occurred( status );
-
-#ifdef MALLOC_STATS
- /* zero all the stats */
- (void) memset( &rtems_malloc_stats, 0, sizeof(rtems_malloc_stats) );
-#endif
-
- MSBUMP(space_available, length);
-}
-
-#ifdef RTEMS_NEWLIB
-void *malloc(
- size_t size
-)
-{
- void *return_this;
- void *starting_address;
- rtems_unsigned32 the_size;
- rtems_unsigned32 sbrk_amount;
- rtems_status_code status;
-
- MSBUMP(malloc_calls, 1);
-
- if ( !size )
- return (void *) 0;
-
- /*
- * Try to give a segment in the current region if there is not
- * enough space then try to grow the region using rtems_region_extend().
- * If this fails then return a NULL pointer.
- */
-
- status = rtems_region_get_segment(
- RTEMS_Malloc_Heap,
- size,
- RTEMS_NO_WAIT,
- RTEMS_NO_TIMEOUT,
- &return_this
- );
-
- if ( status != RTEMS_SUCCESSFUL ) {
- /*
- * Round to the "requested sbrk amount" so hopefully we won't have
- * to grow again for a while. This effectively does sbrk() calls
- * in "page" amounts.
- */
-
- sbrk_amount = RTEMS_Malloc_Sbrk_amount;
-
- if ( sbrk_amount == 0 )
- return (void *) 0;
-
- the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount);
-
- if (((rtems_unsigned32)starting_address = (void *)sbrk(the_size))
- == (rtems_unsigned32) -1)
- return (void *) 0;
-
- status = rtems_region_extend(
- RTEMS_Malloc_Heap,
- starting_address,
- the_size
- );
- if ( status != RTEMS_SUCCESSFUL ) {
- sbrk(-the_size);
- errno = ENOMEM;
- return (void *) 0;
- }
-
- MSBUMP(space_available, the_size);
-
- status = rtems_region_get_segment(
- RTEMS_Malloc_Heap,
- size,
- RTEMS_NO_WAIT,
- RTEMS_NO_TIMEOUT,
- &return_this
- );
- if ( status != RTEMS_SUCCESSFUL ) {
- errno = ENOMEM;
- return (void *) 0;
- }
- }
-
-#ifdef MALLOC_STATS
- if (return_this)
- {
- unsigned32 actual_size;
- unsigned32 current_depth;
- status = rtems_region_get_segment_size(
- RTEMS_Malloc_Heap, return_this, &actual_size);
- MSBUMP(lifetime_allocated, actual_size);
- current_depth = rtems_malloc_stats.lifetime_allocated -
- rtems_malloc_stats.lifetime_freed;
- if (current_depth > rtems_malloc_stats.max_depth)
- rtems_malloc_stats.max_depth = current_depth;
- }
-#endif
-
-#ifdef MALLOC_DIRTY
- (void) memset(return_this, 0xCF, size);
-#endif
-
- return return_this;
-}
-
-void *calloc(
- size_t nelem,
- size_t elsize
-)
-{
- register char *cptr;
- int length;
-
- MSBUMP(calloc_calls, 1);
-
- length = nelem * elsize;
- cptr = malloc( length );
- if ( cptr )
- memset( cptr, '\0', length );
-
- MSBUMP(malloc_calls, -1); /* subtract off the malloc */
-
- return cptr;
-}
-
-void *realloc(
- void *ptr,
- size_t size
-)
-{
- rtems_unsigned32 old_size;
- rtems_status_code status;
- char *new_area;
-
- MSBUMP(realloc_calls, 1);
-
- if ( !ptr )
- return malloc( size );
-
- if ( !size ) {
- free( ptr );
- return (void *) 0;
- }
-
- new_area = malloc( size );
-
- MSBUMP(malloc_calls, -1); /* subtract off the malloc */
-
- if ( !new_area ) {
- free( ptr );
- return (void *) 0;
- }
-
- status = rtems_region_get_segment_size( RTEMS_Malloc_Heap, ptr, &old_size );
- if ( status != RTEMS_SUCCESSFUL ) {
- errno = EINVAL;
- return (void *) 0;
- }
-
- memcpy( new_area, ptr, (size < old_size) ? size : old_size );
- free( ptr );
-
- return new_area;
-
-}
-
-void free(
- void *ptr
-)
-{
- rtems_status_code status;
-
- MSBUMP(free_calls, 1);
-
- if ( !ptr )
- return;
-
-#ifdef MALLOC_STATS
- {
- unsigned32 size;
- status = rtems_region_get_segment_size( RTEMS_Malloc_Heap, ptr, &size );
- if ( status == RTEMS_SUCCESSFUL ) {
- MSBUMP(lifetime_freed, size);
- }
- }
-#endif
-
- status = rtems_region_return_segment( RTEMS_Malloc_Heap, ptr );
- if ( status != RTEMS_SUCCESSFUL ) {
- errno = EINVAL;
- assert( 0 );
- }
-}
-/* end if RTEMS_NEWLIB */
-#endif
-
-#ifdef MALLOC_STATS
-/*
- * Dump the malloc statistics
- * May be called via atexit() (installable by our bsp) or
- * at any time by user
- */
-
-void malloc_dump(void)
-{
- unsigned32 allocated = rtems_malloc_stats.lifetime_allocated -
- rtems_malloc_stats.lifetime_freed;
-
- printf("Malloc stats\n");
- printf(" avail:%uk allocated:%uk (%d%%) "
- "max:%uk (%d%%) lifetime:%Luk freed:%Luk\n",
- (unsigned int) rtems_malloc_stats.space_available / 1024,
- (unsigned int) allocated / 1024,
- /* avoid float! */
- (allocated * 100) / rtems_malloc_stats.space_available,
- (unsigned int) rtems_malloc_stats.max_depth / 1024,
- (rtems_malloc_stats.max_depth * 100) / rtems_malloc_stats.space_available,
- (unsigned64) rtems_malloc_stats.lifetime_allocated / 1024,
- (unsigned64) rtems_malloc_stats.lifetime_freed / 1024);
- printf(" Call counts: malloc:%d free:%d realloc:%d calloc:%d\n",
- rtems_malloc_stats.malloc_calls,
- rtems_malloc_stats.free_calls,
- rtems_malloc_stats.realloc_calls,
- rtems_malloc_stats.calloc_calls);
-}
-
-
-void malloc_walk(size_t source, size_t printf_enabled)
-{
- register Region_Control *the_region;
- Objects_Locations location;
-
- the_region = _Region_Get( RTEMS_Malloc_Heap, &location );
- if ( location == OBJECTS_LOCAL )
- {
- _Heap_Walk( &the_region->Memory, source, printf_enabled );
- _Thread_Enable_dispatch();
- }
-}
-
-#else
-
-void malloc_dump(void)
-{
- return;
-}
-
-void malloc_walk(size_t source, size_t printf_enabled)
-{
- return;
-}
-
-#endif
-
-/*
- * "Reentrant" versions of the above routines implemented above.
- */
-
-#ifdef RTEMS_NEWLIB
-void *_malloc_r(
- struct _reent *ignored,
- size_t size
-)
-{
- return malloc( size );
-}
-
-void *_calloc_r(
- struct _reent *ignored,
- size_t nelem,
- size_t elsize
-)
-{
- return calloc( nelem, elsize );
-}
-
-void *_realloc_r(
- struct _reent *ignored,
- void *ptr,
- size_t size
-)
-{
- return realloc( ptr, size );
-}
-
-void _free_r(
- struct _reent *ignored,
- void *ptr
-)
-{
- free( ptr );
-}
-#endif
-
diff --git a/c/src/exec/libcsupport/src/mkdir.c b/c/src/exec/libcsupport/src/mkdir.c
deleted file mode 100644
index d1cf4c306c..0000000000
--- a/c/src/exec/libcsupport/src/mkdir.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * mkdir() - POSIX 1003.1b 5.4.1 - Make a Directory
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#include <stdlib.h>
-
-int mkdir(
- const char *pathname,
- mode_t mode
-)
-{
- return mknod( pathname, mode | S_IFDIR, 0LL);
-}
-
diff --git a/c/src/exec/libcsupport/src/mkfifo.c b/c/src/exec/libcsupport/src/mkfifo.c
deleted file mode 100644
index 9ea820675b..0000000000
--- a/c/src/exec/libcsupport/src/mkfifo.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * mkfifo() - POSIX 1003.1b 5.4.1 - Make a FIFO Special File
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-
-int mkfifo(
- const char *path,
- mode_t mode
-)
-{
- return mknod( path, mode | S_IFIFO, 0LL );
-}
diff --git a/c/src/exec/libcsupport/src/mknod.c b/c/src/exec/libcsupport/src/mknod.c
deleted file mode 100644
index 0a3a108f9a..0000000000
--- a/c/src/exec/libcsupport/src/mknod.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * mknod()
- *
- * This routine is not defined in the POSIX 1003.1b standard but is
- * commonly supported on most UNIX and POSIX systems. It is the
- * foundation for creating file system objects.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#include <stdlib.h>
-
-#include "libio_.h"
-
-int mknod(
- const char *pathname,
- mode_t mode,
- dev_t dev
-)
-{
- rtems_filesystem_location_info_t temp_loc;
- int i;
- const char *name_start;
- int result;
-
- if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) )
- set_errno_and_return_minus_one( EINVAL );
-
- if ( S_ISFIFO(mode) )
- set_errno_and_return_minus_one( ENOTSUP );
-
- rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
-
- result = (*temp_loc.ops->evalformake)(
- &pathname[i],
- &temp_loc,
- &name_start
- );
- if ( result != 0 )
- return -1;
-
- if ( !temp_loc.ops->mknod ) {
- rtems_filesystem_freenode( &temp_loc );
- set_errno_and_return_minus_one( ENOTSUP );
- }
-
- result = (*temp_loc.ops->mknod)( name_start, mode, dev, &temp_loc );
-
- rtems_filesystem_freenode( &temp_loc );
-
- return result;
-}
diff --git a/c/src/exec/libcsupport/src/mount.c b/c/src/exec/libcsupport/src/mount.c
deleted file mode 100644
index 578404ecdc..0000000000
--- a/c/src/exec/libcsupport/src/mount.c
+++ /dev/null
@@ -1,286 +0,0 @@
-/*
- * mount()
- *
- * XXX
- *
- * XXX make sure no required ops are NULL
- * XXX make sure no optional ops you are using are NULL
- * XXX unmount should be required.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <chain.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-#include "libio_.h"
-
-Chain_Control rtems_filesystem_mount_table_control;
-
-#include "imfs.h"
-
-/* XXX this structure should be in an IMFS specific file */
-/* XXX this structure should use real constants */
-
-rtems_filesystem_limits_and_options_t IMFS_LIMITS_AND_OPTIONS = {
- 5, /* link_max */
- 6, /* max_canon */
- 7, /* max_input */
- IMFS_NAME_MAX, /* name_max */
- 255, /* path_max */
- 2, /* pipe_buf */
- 1, /* posix_async_io */
- 2, /* posix_chown_restrictions */
- 3, /* posix_no_trunc */
- 4, /* posix_prio_io */
- 5, /* posix_sync_io */
- 6 /* posix_vdisable */
-};
-
-/*
- * XXX
- */
-
-int search_mt_for_mount_point(
- rtems_filesystem_location_info_t *location_of_mount_point
-);
-
-int init_fs_mount_table( void );
-
-
-/*
- * XXX
- */
-
-#define FOUND 0
-#define NOT_FOUND -1
-
-/*
- * mount
- *
- * This routine will attempt to mount a new file system at the specified
- * mount point. A series of tests will be run to determine if any of the
- * following reasons exist to prevent the mount operation:
- *
- * 1) The file system type or options are not valid
- * 2) No new file system root node is specified
- * 3) The selected file system has already been mounted
- * 4) The mount point exists with the proper permissions to allow mounting
- * 5) The selected mount point already has a file system mounted to it
- *
- */
-
-int mount(
- rtems_filesystem_mount_table_entry_t **mt_entry,
- rtems_filesystem_operations_table *fs_ops,
- rtems_filesystem_options_t options,
- char *device,
- char *mount_point
-)
-{
- rtems_filesystem_location_info_t loc;
- rtems_filesystem_mount_table_entry_t *temp_mt_entry;
- rtems_filesystem_location_info_t *loc_to_free = NULL;
-
-/* XXX add code to check for required operations */
-
- /*
- * Is there a file system operations table?
- */
-
- if ( fs_ops == NULL ) {
- errno = EINVAL;
- return -1;
- }
-
- /*
- * Are the file system options valid?
- */
-
- if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
- options != RTEMS_FILESYSTEM_READ_WRITE ) {
- errno = EINVAL;
- return -1;
- }
-
- /*
- * Allocate a mount table entry
- */
-
- temp_mt_entry = malloc( sizeof(rtems_filesystem_mount_table_entry_t) );
-
- if ( !temp_mt_entry ) {
- errno = ENOMEM;
- return -1;
- }
-
- temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry;
- temp_mt_entry->options = options;
- if ( device )
- strcpy( temp_mt_entry->dev, device );
- else
- temp_mt_entry->dev = 0;
-
- /*
- * The mount_point should be a directory with read/write/execute
- * permissions in the existing tree.
- */
-
- if ( mount_point ) {
-
- if ( rtems_filesystem_evaluate_path(
- mount_point, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE ) == -1 )
- goto cleanup_and_bail;
-
- /*
- * Test to see if it is a directory
- */
-
- loc_to_free = &loc;
- if ( loc.ops->node_type( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
- errno = ENOTDIR;
- goto cleanup_and_bail;
- }
-
- /*
- * You can only mount one file system onto a single mount point.
- */
-
- if ( search_mt_for_mount_point( &loc ) == FOUND ) {
- errno = EBUSY;
- goto cleanup_and_bail;
- }
-
- /*
- * This must be a good mount point, so move the location information
- * into the allocated mount entry. Note: the information that
- * may have been allocated in loc should not be sent to freenode
- * until the system is unmounted. It may be needed to correctly
- * traverse the tree.
- */
-
- temp_mt_entry->mt_point_node.node_access = loc.node_access;
- temp_mt_entry->mt_point_node.handlers = loc.handlers;
- temp_mt_entry->mt_point_node.ops = loc.ops;
- temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry;
-
- /*
- * This link to the parent is only done when we are dealing with system
- * below the base file system
- */
-
- if ( !loc.ops->mount ){
- errno = ENOTSUP;
- goto cleanup_and_bail;
- }
-
- if ( loc.ops->mount( temp_mt_entry ) ) {
- goto cleanup_and_bail;
- }
- } else {
-
- /*
- * This is a mount of the base file system --> The
- * mt_point_node.node_access will be set to null to indicate that this
- * is the root of the entire file system.
- */
-
- temp_mt_entry->mt_fs_root.node_access = NULL;
- temp_mt_entry->mt_fs_root.handlers = NULL;
- temp_mt_entry->mt_fs_root.ops = NULL;
-
- temp_mt_entry->mt_point_node.node_access = NULL;
- temp_mt_entry->mt_point_node.handlers = NULL;
- temp_mt_entry->mt_point_node.ops = NULL;
- temp_mt_entry->mt_point_node.mt_entry = NULL;
- }
-
- if ( !fs_ops->fsmount_me ) {
- errno = ENOTSUP;
- goto cleanup_and_bail;
- }
-
- if ( fs_ops->fsmount_me( temp_mt_entry ) )
- goto cleanup_and_bail;
-
- /*
- * Add the mount table entry to the mount table chain
- */
-
- Chain_Append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node );
-
- *mt_entry = temp_mt_entry;
-
- return 0;
-
-cleanup_and_bail:
-
- free( temp_mt_entry );
-
- if ( loc_to_free )
- rtems_filesystem_freenode( loc_to_free );
-
- return -1;
-}
-
-
-
-/*
- * init_fs_mount_table
- *
- * This routine will initialize the chain control element that manages the
- * mount table chain.
- */
-
-int init_fs_mount_table()
-{
- Chain_Initialize_empty ( &rtems_filesystem_mount_table_control );
- return 0;
-}
-
-
-/*
- * search_mt_for_mount_point
- *
- * This routine will run through the entries that currently exist in the
- * mount table chain. For each entry in the mount table chain it will
- * compare the mount tables mt_point_node to the node describing the selected
- * mount point.. If any of the mount table file system mount point nodes
- * match the new file system selected mount point node, we are attempting
- * to mount the new file system onto a node that already has a file system
- * mounted to it. This is not a permitted operation.
- */
-
-int search_mt_for_mount_point(
- rtems_filesystem_location_info_t *location_of_mount_point
-)
-{
- Chain_Node *the_node;
- rtems_filesystem_mount_table_entry_t *the_mount_entry;
-
- for ( the_node = rtems_filesystem_mount_table_control.first;
- !Chain_Is_tail( &rtems_filesystem_mount_table_control, the_node );
- the_node = the_node->next ) {
-
- the_mount_entry = (rtems_filesystem_mount_table_entry_t *) the_node;
- if ( the_mount_entry->mt_point_node.node_access ==
- location_of_mount_point->node_access )
- return FOUND;
- }
- return NOT_FOUND;
-}
-
diff --git a/c/src/exec/libcsupport/src/newlibc.c b/c/src/exec/libcsupport/src/newlibc.c
deleted file mode 100644
index cfa9100e96..0000000000
--- a/c/src/exec/libcsupport/src/newlibc.c
+++ /dev/null
@@ -1,359 +0,0 @@
-/*
- * Implementation of hooks for the CYGNUS newlib libc
- * These hooks set things up so that:
- * + '_REENT' is switched at task switch time.
- *
- * COPYRIGHT (c) 1994 by Division Incorporated
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- *
- */
-
-#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
-#include <rtems.h>
-
-#if defined(RTEMS_NEWLIB)
-#include <libcsupport.h>
-#include <stdlib.h> /* for free() */
-#include <string.h> /* for memset() */
-
-#include <sys/reent.h> /* for extern of _REENT (aka _impure_ptr) */
-#include <errno.h>
-
-/*
- * NOTE:
- * There is some problem with doing this on the hpux version
- * of the UNIX simulator (symptom is printf core dumps), so
- * we just don't for now.
- * Not sure if this is a problem with hpux, newlib, or something else.
- */
-
-#if defined(RTEMS_UNIX) && !defined(hpux)
-#define NEED_SETVBUF
-#endif
-
-#ifdef NEED_SETVBUF
-#include <stdio.h>
-#endif
-
-static int extension_index;
-
-/*
- * Private routines
- */
-
-#define set_newlib_extension( _the_thread, _value ) \
- (_the_thread)->extensions[ extension_index ] = (_value);
-
-#define get_newlib_extension( _the_thread ) \
- (_the_thread)->extensions[ extension_index ]
-
-int libc_reentrant; /* do we think we are reentrant? */
-struct _reent libc_global_reent;
-
-/*
- * CYGNUS newlib routine that does atexit() processing and flushes
- * stdio streams
- * undocumented
- */
-
-extern void _wrapup_reent(struct _reent *);
-extern void _reclaim_reent(struct _reent *);
-
-#include <stdio.h>
-
-void libc_wrapup(void)
-{
- /*
- * In case RTEMS is already down, don't do this. It could be
- * dangerous.
- */
-
- if (!_System_state_Is_up(_System_state_Get()))
- return;
-
- /*
- * This was already done if the user called exit() directly .
- _wrapup_reent(0);
- */
-
- if (_REENT != &libc_global_reent) {
- _wrapup_reent(&libc_global_reent);
-#if 0
- /* Don't reclaim this one, just in case we do printfs
- * on the way out to ROM.
- */
- _reclaim_reent(&libc_global_reent);
-#endif
- _REENT = &libc_global_reent;
- }
-
- /*
- * Try to drain output buffers.
- *
- * Should this be changed to do *all* file streams?
- * _fwalk (_REENT, fclose);
- */
-
- fclose (stdin);
- fclose (stdout);
- fclose (stderr);
-}
-
-
-rtems_boolean libc_create_hook(
- rtems_tcb *current_task,
- rtems_tcb *creating_task
-)
-{
- set_newlib_extension( creating_task, NULL );
- return TRUE;
-}
-
-/*
- * Called for all user TASKS (system tasks are MPCI Receive Server and IDLE)
- */
-
-rtems_extension libc_start_hook(
- rtems_tcb *current_task,
- rtems_tcb *starting_task
-)
-{
- struct _reent *ptr;
-
- /* NOTE: The RTEMS malloc is reentrant without a reent ptr since
- * it is based on the Classic API Region Manager.
- */
-
- ptr = (struct _reent *) calloc(1, sizeof(struct _reent));
-
- if (!ptr)
- rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
-
-#ifdef __GNUC__
- /* GCC extension: structure constants */
- *ptr = (struct _reent) _REENT_INIT((*ptr));
-#else
- /*
- * WARNING: THIS IS VERY DEPENDENT ON NEWLIB!!!
- * Last visual check was against newlib 1.8.2 but last known
- * use was against 1.7.0. This is basically an exansion of
- * REENT_INIT() in <sys/reent.h>.
- * NOTE: calloc() takes care of zeroing fields.
- */
- ptr->_stdin = &ptr->__sf[0];
- ptr->_stdout = &ptr->__sf[1];
- ptr->_stderr = &ptr->__sf[2];
- ptr->_current_locale = "C";
- ptr->_new._reent._rand_next = 1;
-#endif
-
- set_newlib_extension( starting_task, ptr );
-}
-
-/*
- * Called for all user TASKS (system tasks are MPCI Receive Server and IDLE)
- */
-
-#ifdef NEED_SETVBUF
-rtems_extension libc_begin_hook(rtems_tcb *current_task)
-{
- setvbuf( stdout, NULL, _IOLBF, BUFSIZ );
-}
-#endif
-
-rtems_extension libc_switch_hook(
- rtems_tcb *current_task,
- rtems_tcb *heir_task
-)
-{
- /*
- * Don't touch the outgoing task if it has been deleted.
- */
-
- if ( !_States_Is_transient( current_task->current_state ) ) {
- set_newlib_extension( current_task, _REENT );
- }
-
- _REENT = (struct _reent *) get_newlib_extension( heir_task );
-}
-
-/*
- * Function: libc_delete_hook
- * Created: 94/12/10
- *
- * Description:
- * Called when a task is deleted.
- * Must restore the new lib reentrancy state for the new current
- * task.
- *
- * Parameters:
- *
- *
- * Returns:
- *
- *
- * Side Effects:
- *
- * Notes:
- *
- *
- * Deficiencies/ToDo:
- *
- *
- */
-
-rtems_extension libc_delete_hook(
- rtems_tcb *current_task,
- rtems_tcb *deleted_task
-)
-{
- struct _reent *ptr;
-
- /*
- * The reentrancy structure was allocated by newlib using malloc()
- */
-
- if (current_task == deleted_task) {
- ptr = _REENT;
- } else {
- ptr = (struct _reent *) get_newlib_extension( deleted_task );
- }
-
- /* if (ptr) */
- if (ptr && ptr != &libc_global_reent) {
- _wrapup_reent(ptr);
- _reclaim_reent(ptr);
- free(ptr);
- }
-
- set_newlib_extension( deleted_task, NULL );
-
- /*
- * Require the switch back to another task to install its own
- */
-
- if ( current_task == deleted_task ) {
- _REENT = 0;
- }
-}
-
-/*
- * Function: libc_init
- * Created: 94/12/10
- *
- * Description:
- * Init libc for CYGNUS newlib
- * Set up _REENT to use our global libc_global_reent.
- * (newlib provides a global of its own, but we prefer our
- * own name for it)
- *
- * If reentrancy is desired (which it should be), then
- * we install the task extension hooks to maintain the
- * newlib reentrancy global variable _REENT on task
- * create, delete, switch, exit, etc.
- *
- * Parameters:
- * reentrant non-zero if reentrant library desired.
- *
- * Returns:
- *
- * Side Effects:
- * installs libc extensions if reentrant.
- *
- * Notes:
- *
- *
- * Deficiencies/ToDo:
- *
- */
-
-void
-libc_init(int reentrant)
-{
- rtems_extensions_table libc_extension;
- rtems_status_code rc;
- rtems_id extension_id;
-
- libc_global_reent = (struct _reent) _REENT_INIT((libc_global_reent));
- _REENT = &libc_global_reent;
-
- if (reentrant) {
- memset(&libc_extension, 0, sizeof(libc_extension));
-
- libc_extension.thread_create = libc_create_hook;
- libc_extension.thread_start = libc_start_hook;
-#ifdef NEED_SETVBUF
- libc_extension.thread_begin = libc_begin_hook;
-#endif
- libc_extension.thread_switch = libc_switch_hook;
- libc_extension.thread_delete = libc_delete_hook;
-
- rc = rtems_extension_create(rtems_build_name('L', 'I', 'B', 'C'),
- &libc_extension, &extension_id);
- if (rc != RTEMS_SUCCESSFUL)
- rtems_fatal_error_occurred( rc );
-
- libc_reentrant = reentrant;
- extension_index = rtems_get_index( extension_id );
- }
-}
-
-/*
- * Function: _exit
- * Created: 94/12/10
- *
- * Description:
- * Called from exit() after it does atexit() processing and stdio fflush's
- *
- * called from bottom of exit() to really delete the task.
- * If we are using reentrant libc, then let the delete extension
- * do all the work, otherwise if a shutdown is in progress,
- * then just do it.
- *
- * Parameters:
- * exit status
- *
- * Returns:
- * does not return
- *
- * Side Effects:
- *
- * Notes:
- *
- *
- * Deficiencies/ToDo:
- *
- *
- */
-
-#include <stdio.h>
-
-#if !defined(RTEMS_UNIX) && !defined(_AM29K)
-void _exit(int status)
-{
- /*
- * We need to do the exit processing on the global reentrancy structure.
- * This has already been done on the per task reentrancy structure
- * associated with this task.
- */
-
- libc_wrapup();
- rtems_shutdown_executive(status);
-}
-
-#else
-
-void exit(int status)
-{
- libc_wrapup();
- rtems_shutdown_executive(status);
-}
-#endif
-
-
-#endif
diff --git a/c/src/exec/libcsupport/src/no_libc.c b/c/src/exec/libcsupport/src/no_libc.c
deleted file mode 100644
index 4a7e5d8c27..0000000000
--- a/c/src/exec/libcsupport/src/no_libc.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * This file contains stubs for the reentrancy hooks when
- * an unknown C library is used.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <rtems.h>
-#if !defined(RTEMS_NEWLIB) && !defined(RTEMS_UNIX)
-
-#include "libcsupport.h"
-
-#include <stdlib.h> /* for free() */
-
-void libc_init(
- int reentrant
-)
-{
-}
-
-void libc_suspend_main(void)
-{
-}
-
-
-void libc_global_exit(
- rtems_unsigned32 code
-)
-{
-}
-
-void _exit(
- int status
-)
-{
-}
-
-#else
-
-/* remove ANSI errors.
- * A program must contain at least one external-declaration
- * (X3.159-1989 p.82,L3).
- */
-void no_libc_dummy_function( void )
-{
-}
-
-#endif
diff --git a/c/src/exec/libcsupport/src/no_posix.c b/c/src/exec/libcsupport/src/no_posix.c
deleted file mode 100644
index 9973230e44..0000000000
--- a/c/src/exec/libcsupport/src/no_posix.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Marginal implementations of some POSIX API routines
- * to be used when POSIX is disabled.
- *
- * + getpid
- * + _getpid_r
- * + kill
- * + _kill_r
- * + __kill
- * + sleep
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-
-#include <unistd.h>
-
-/*
- * These are directly supported (and completely correct) in the posix api.
- */
-
-#if !defined(RTEMS_POSIX_API)
-pid_t getpid(void)
-{
- return 0;
-}
-
-#if defined(RTEMS_NEWLIB)
-#include <sys/reent.h>
-
-pid_t _getpid_r(
- struct _reent *ptr
-)
-{
- return getpid();
-}
-#endif
-
-#endif
-
-#if !defined(RTEMS_POSIX_API)
-int kill( pid_t pid, int sig )
-{
- return 0;
-}
-
-int _kill_r( pid_t pid, int sig )
-{
- return 0;
-}
-#endif
-
-int __kill( pid_t pid, int sig )
-{
- return 0;
-}
-
-
-/*
- * 3.4.3 Delay Process Execution, P1003.1b-1993, p. 81
- *
- * $Id$
- */
-
-#include <time.h>
-#include <unistd.h>
-
-#include <rtems.h>
-
-#if !defined(RTEMS_POSIX_API)
-unsigned int sleep(
- unsigned int seconds
-)
-{
- rtems_status_code status;
- rtems_interval ticks_per_second;
- rtems_interval ticks;
-
- status = rtems_clock_get(
- RTEMS_CLOCK_GET_TICKS_PER_SECOND,
- &ticks_per_second
- );
-
- ticks = seconds * ticks_per_second;
-
- status = rtems_task_wake_after( ticks );
-
- /*
- * Returns the "unslept" amount of time. In RTEMS signals are not
- * interruptable, so tasks really sleep all of the requested time.
- */
-
- return 0;
-}
-#endif
-
diff --git a/c/src/exec/libcsupport/src/open.c b/c/src/exec/libcsupport/src/open.c
deleted file mode 100644
index 1203ca9688..0000000000
--- a/c/src/exec/libcsupport/src/open.c
+++ /dev/null
@@ -1,205 +0,0 @@
-/*
- * open() - POSIX 1003.1 5.3.1 - Open a File
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "libio_.h"
-
-#include <unistd.h>
-
-/*
- * Returns file descriptor on success or -1 and errno set to one of the
- * following:
- *
- * EACCESS - Seach permission is denied on a component of the path prefix,
- * or the file exists and the permissions specified by the
- * flags are denied, or the file does not exist and write
- * permission is denied for the parent directory of the file
- * to be created, or O_TRUNC is specified and write permission
- * is denied.
- * EEXIST - O_CREAT and O_EXCL are set and the named file exists.
- * EINTR - The open( operation was interrupted by a signal.
- * EINVAL - This implementation does not support synchronized IO for this
- * file.
- * EISDIR - The named file is a directory and the flags argument
- * specified write or read/write access.
- * EMFILE - Too many file descriptors are in used by this process.
- * ENAMETOOLONG -
- * The length of the path exceeds PATH_MAX or a pathname
- * component is longer than NAME_MAX while POSIX_NO_TRUNC
- * is in effect.
- * ENFILE - Too many files are open in the system.
- * ENOENT - O_CREAT is not set and and the anmed file does not exist,
- * or O_CREAT is set and eitehr the path prefix does not exist
- * or the path argument points to an empty string.
- * ENOSPC - The directory or file system that would contain the new file
- * cannot be extended.
- * ENOTDIR - A component of the path prefix is not a directory.
- * ENXIO - O_NONBLOCK is set, the named file is a FIFO, O_WRONLY is
- * set, and no process has the file open for reading.
- * EROFS - The named file resides on a read-only file system and either
- * O_WRONLY, O_RDWR, O_CREAT (if the file does not exist), or
- * O_TRUNC is set in the flags argument.
- */
-
-int open(
- const char *pathname,
- int flags,
- ...
-)
-{
- va_list ap;
- int mode;
- int rc;
- rtems_libio_t *iop = 0;
- int status;
- rtems_filesystem_location_info_t loc;
- int eval_flags;
-
-
- /*
- * Set the Evaluation flags
- */
-
- eval_flags = 0;
- status = flags + 1;
- if ( ( status & _FREAD ) == _FREAD )
- eval_flags |= RTEMS_LIBIO_PERMS_READ;
- if ( ( status & _FWRITE ) == _FWRITE )
- eval_flags |= RTEMS_LIBIO_PERMS_WRITE;
-
-
- va_start(ap, flags);
-
- mode = va_arg( ap, int );
-
- /*
- * NOTE: This comment is OBSOLETE. The proper way to do this now
- * would be to support a magic mounted file system.
- *
- * Additional external I/O handlers would be supported by adding
- * code to pick apart the pathname appropriately. The networking
- * code does not require changes here since network file
- * descriptors are obtained using socket(), not open().
- */
-
- /* allocate a file control block */
- iop = rtems_libio_allocate();
- if ( iop == 0 ) {
- rc = ENFILE;
- goto done;
- }
-
- /*
- * See if the file exists.
- */
-
- status = rtems_filesystem_evaluate_path(
- pathname, eval_flags, &loc, TRUE );
-
- if ( status == -1 ) {
- if ( errno != ENOENT ) {
- rc = errno;
- goto done;
- }
-
- /* If the file does not exist and we are not trying to create it--> error */
- if ( !(flags & O_CREAT) ) {
- rc = ENOENT;
- goto done;
- }
-
- /* Create the node for the new regular file */
- rc = mknod( pathname, S_IFREG | mode, 0LL );
- if ( rc ) {
- rc = errno;
- goto done;
- }
-
- /* Sanity check to see if the file name exists after the mknod() */
- status = rtems_filesystem_evaluate_path( pathname, 0x0, &loc, TRUE );
- if ( status != 0 ) { /* The file did not exist */
- rc = EACCES;
- goto done;
- }
-
- } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
- /* We were trying to create a file that already exists */
- rc = EEXIST;
- goto done;
- }
-
- /*
- * Fill in the file control block based on the loc structure
- * returned by successful path evaluation.
- */
-
- iop->offset = 0;
- iop->handlers = loc.handlers;
- iop->file_info = loc.node_access;
- iop->flags |= rtems_libio_fcntl_flags( flags );
- iop->pathinfo = loc;
-
- if ( !iop->handlers->open ) {
- rc = ENOTSUP;
- goto done;
- }
-
- rc = (*iop->handlers->open)( iop, pathname, flags, mode );
- if ( rc )
- goto done;
-
- /*
- * Optionally truncate the file.
- */
-
- if ( (flags & O_TRUNC) == O_TRUNC ) {
- rc = ftruncate( iop - rtems_libio_iops, 0 );
- }
-
- /*
- * Single exit and clean up path.
- */
-
-done:
- va_end(ap);
-
- if ( rc ) {
- if ( iop )
- rtems_libio_free( iop );
- set_errno_and_return_minus_one( rc );
- }
-
- rtems_filesystem_freenode( &loc );
-
- return iop - rtems_libio_iops;
-}
-
-/*
- * _open_r
- *
- * This is the Newlib dependent reentrant version of open().
- */
-
-#if defined(RTEMS_NEWLIB)
-
-#include <reent.h>
-
-int _open_r(
- struct _reent *ptr,
- const char *buf,
- int flags,
- int mode
-)
-{
- return open( buf, flags, mode );
-}
-#endif
diff --git a/c/src/exec/libcsupport/src/opendir.c b/c/src/exec/libcsupport/src/opendir.c
deleted file mode 100644
index f0e9488684..0000000000
--- a/c/src/exec/libcsupport/src/opendir.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * opendir() - POSIX 1003.1b - XXX
- *
- * This was copied from Newlib 1.8.0.
- *
- *
- * Copyright (c) 1983 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)opendir.c 5.11 (Berkeley) 2/23/91";
-#endif /* LIBC_SCCS and not lint */
-
-#include <dirent.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-/*
- * open a directory.
- */
-DIR *
-opendir(name)
- const char *name;
-{
- register DIR *dirp;
- register int fd;
-
- if ((fd = open(name, 0)) == -1)
- return NULL;
- if (fcntl(fd, F_SETFD, 1) == -1 ||
- (dirp = (DIR *)malloc(sizeof(DIR))) == NULL) {
- close (fd);
- return NULL;
- }
- /*
- * If CLSIZE is an exact multiple of DIRBLKSIZ, use a CLSIZE
- * buffer that it cluster boundary aligned.
- * Hopefully this can be a big win someday by allowing page trades
- * to user space to be done by getdirentries()
- */
- dirp->dd_buf = malloc (512);
- dirp->dd_len = 512;
-
- if (dirp->dd_buf == NULL) {
- close (fd);
- return NULL;
- }
- dirp->dd_fd = fd;
- dirp->dd_loc = 0;
- dirp->dd_seek = 0;
- /*
- * Set up seek point for rewinddir.
- */
- return dirp;
-}
diff --git a/c/src/exec/libcsupport/src/pathconf.c b/c/src/exec/libcsupport/src/pathconf.c
deleted file mode 100644
index 7516ffb965..0000000000
--- a/c/src/exec/libcsupport/src/pathconf.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * pathconf() - POSIX 1003.1b - 5.7.1 - Configurable Pathname Varables
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <unistd.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-
-long pathconf(
- const char *path,
- int name
-)
-{
- int status;
- int fd;
-
- fd = open( path, O_RDONLY );
- if ( fd == -1 )
- return -1;
-
- status = fpathconf( fd, name );
-
- (void) close( fd );
-
- return status;
-}
diff --git a/c/src/exec/libcsupport/src/pipe.c b/c/src/exec/libcsupport/src/pipe.c
deleted file mode 100644
index 45ab89ed95..0000000000
--- a/c/src/exec/libcsupport/src/pipe.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * pipe() - POSIX 1003.1b 6.1.1 Create an Inter-Process Channel
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-
-int pipe(
- int filsdes[2]
-)
-{
- errno = ENOSYS;
- return -1;
-}
diff --git a/c/src/exec/libcsupport/src/read.c b/c/src/exec/libcsupport/src/read.c
deleted file mode 100644
index 80ad9abc42..0000000000
--- a/c/src/exec/libcsupport/src/read.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * read() - POSIX 1003.1b 6.4.1 - Read From a File
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "libio_.h"
-
-ssize_t read(
- int fd,
- void *buffer,
- size_t count
-)
-{
- int rc; /* XXX change to a size_t when prototype is fixed */
- rtems_libio_t *iop;
-
- rtems_libio_check_fd( fd );
- iop = rtems_libio_iop( fd );
- rtems_libio_check_is_open(iop);
- rtems_libio_check_buffer( buffer );
- rtems_libio_check_count( count );
- rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
-
- /*
- * Now process the read().
- */
-
- if ( !iop->handlers->read )
- set_errno_and_return_minus_one( ENOTSUP );
-
- rc = (*iop->handlers->read)( iop, buffer, count );
-
- if ( rc > 0 )
- iop->offset += rc;
-
- return rc;
-}
-
-/*
- * _read_r
- *
- * This is the Newlib dependent reentrant version of read().
- */
-
-#if defined(RTEMS_NEWLIB)
-
-#include <reent.h>
-
-_ssize_t _read_r(
- struct _reent *ptr,
- int fd,
- void *buf,
- size_t nbytes
-)
-{
- return read( fd, buf, nbytes );
-}
-#endif
diff --git a/c/src/exec/libcsupport/src/readdir.c b/c/src/exec/libcsupport/src/readdir.c
deleted file mode 100644
index ec41679511..0000000000
--- a/c/src/exec/libcsupport/src/readdir.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * readdir() - POSIX 1003.1b - XXX
- *
- * This was copied from Newlib 1.8.0.
- *
- *
- * Copyright (c) 1983 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)readdir.c 5.7 (Berkeley) 6/1/90";
-#endif /* LIBC_SCCS and not lint */
-
-#include <dirent.h>
-
-int getdents(
- int dd_fd,
- char *dd_buf,
- int dd_len
-);
-
-/*
- * get next entry in a directory.
- */
-struct dirent *
-readdir(dirp)
-register DIR *dirp; {
- register struct dirent *dp;
-
- if ( !dirp )
- return NULL;
-
- for (;;) {
- if (dirp->dd_loc == 0) {
- dirp->dd_size = getdents (dirp->dd_fd,
- dirp->dd_buf,
- dirp->dd_len);
-
- if (dirp->dd_size <= 0)
- return NULL;
- }
- if (dirp->dd_loc >= dirp->dd_size) {
- dirp->dd_loc = 0;
- continue;
- }
- dp = (struct dirent *)(dirp->dd_buf + dirp->dd_loc);
- if ((int)dp & 03) /* bogus pointer check */
- return NULL;
- if (dp->d_reclen <= 0 ||
- dp->d_reclen > dirp->dd_len + 1 - dirp->dd_loc)
- return NULL;
- dirp->dd_loc += dp->d_reclen;
- if (dp->d_ino == 0)
- continue;
- return (dp);
- }
-}
diff --git a/c/src/exec/libcsupport/src/readlink.c b/c/src/exec/libcsupport/src/readlink.c
deleted file mode 100644
index bec00e5c72..0000000000
--- a/c/src/exec/libcsupport/src/readlink.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * readlink() - POSIX 1003.1b - X.X.X - XXX
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "libio_.h"
-
-int readlink(
- const char *pathname,
- char *buf,
- int bufsize
-)
-{
- rtems_filesystem_location_info_t loc;
- int result;
-
- if (!buf)
- set_errno_and_return_minus_one( EFAULT );
-
- result = rtems_filesystem_evaluate_path( pathname, 0, &loc, FALSE );
- if ( result != 0 )
- return -1;
-
- if ( !loc.ops->node_type ){
- rtems_filesystem_freenode( &loc );
- set_errno_and_return_minus_one( ENOTSUP );
- }
-
- if ( (*loc.ops->node_type)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
- rtems_filesystem_freenode( &loc );
- set_errno_and_return_minus_one( EINVAL );
- }
-
- if ( !loc.ops->readlink ){
- rtems_filesystem_freenode( &loc );
- set_errno_and_return_minus_one( ENOTSUP );
- }
-
- result = (*loc.ops->readlink)( &loc, buf, bufsize );
-
- rtems_filesystem_freenode( &loc );
-
- return result;
-}
diff --git a/c/src/exec/libcsupport/src/rewinddir.c b/c/src/exec/libcsupport/src/rewinddir.c
deleted file mode 100644
index e5c753a183..0000000000
--- a/c/src/exec/libcsupport/src/rewinddir.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * rewinddir() - POSIX 1003.1b - XXX
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- */
-
-#include <sys/types.h>
-#include <assert.h>
-#include <dirent.h>
-#include <stdio.h>
-#include <errno.h>
-#include <unistd.h>
-
-void rewinddir(
- DIR *dirp
-)
-{
- off_t status;
-
- if ( !dirp )
- return;
-
- status = lseek( dirp->dd_fd, 0, SEEK_SET );
-
- if( status == -1 )
- return;
-
- dirp->dd_loc = 0;
-}
diff --git a/c/src/exec/libcsupport/src/rmdir.c b/c/src/exec/libcsupport/src/rmdir.c
deleted file mode 100644
index 521a2e6934..0000000000
--- a/c/src/exec/libcsupport/src/rmdir.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * rmdir() - POSIX 1003.1b - 5.2.2 - Remove a Directory
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#include <stdlib.h>
-
-#include "libio_.h"
-
-int rmdir(
- const char *pathname
-)
-{
- rtems_filesystem_location_info_t loc;
- int result;
-
- /*
- * Get the node where we wish to go.
- */
-
- result = rtems_filesystem_evaluate_path( pathname, 0, &loc, FALSE );
- if ( result != 0 )
- return -1;
-
- /*
- * Verify you can remove this node as a directory.
- */
-
- if ( !loc.ops->node_type ){
- rtems_filesystem_freenode( &loc );
- set_errno_and_return_minus_one( ENOTSUP );
- }
-
- if ( (*loc.ops->node_type)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){
- rtems_filesystem_freenode( &loc );
- set_errno_and_return_minus_one( ENOTDIR );
- }
-
- /*
- * Use the filesystems rmnod to remove the node.
- */
-
- if ( !loc.handlers->rmnod ){
- rtems_filesystem_freenode( &loc );
- set_errno_and_return_minus_one( ENOTSUP );
- }
-
- result = (*loc.handlers->rmnod)( &loc );
-
- rtems_filesystem_freenode( &loc );
-
- return result;
-}
diff --git a/c/src/exec/libcsupport/src/scandir.c b/c/src/exec/libcsupport/src/scandir.c
deleted file mode 100644
index 43c7c51747..0000000000
--- a/c/src/exec/libcsupport/src/scandir.c
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * scandir() - POSIX 1003.1b - XXX
- *
- * This was copied from Newlib 1.8.0.
- *
- *
- * Copyright (c) 1983 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)scandir.c 5.10 (Berkeley) 2/23/91";
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * Scan the directory dirname calling select to make a list of selected
- * directory entries then sort using qsort and compare routine dcomp.
- * Returns the number of entries and a pointer to a list of pointers to
- * struct dirent (through namelist). Returns -1 if there were any errors.
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <dirent.h>
-#include <stdlib.h>
-#include <string.h>
-
-/*
- * The DIRSIZ macro gives the minimum record length which will hold
- * the directory entry. This requires the amount of space in struct dirent
- * without the d_name field, plus enough space for the name with a terminating
- * null byte (dp->d_namlen+1), rounded up to a 4 byte boundary.
- */
-#undef DIRSIZ
-/*
-#define DIRSIZ(dp) \
- ((sizeof (struct dirent) - (MAXNAMLEN+1)) + (((dp)->d_namlen+1 + 3) &~ 3))
-*/
-
-#define DIRSIZ(dp) \
- ((sizeof (struct dirent) - (NAME_MAX+1)) + (((dp)->d_namlen+1 + 3) &~ 3))
-
-#ifndef __P
-#define __P(args) ()
-#endif
-
-int
-scandir(dirname, namelist, select, dcomp)
- const char *dirname;
- struct dirent ***namelist;
- int (*select) __P((struct dirent *));
- int (*dcomp) __P((const void *, const void *));
-{
- register struct dirent *d, *p, **names;
- register size_t nitems;
- struct stat stb;
- long arraysz;
- DIR *dirp;
-
- if ((dirp = opendir(dirname)) == NULL)
- return(-1);
- if (fstat(dirp->dd_fd, &stb) < 0)
- return(-1);
-
- /*
- * estimate the array size by taking the size of the directory file
- * and dividing it by a multiple of the minimum size entry.
- */
- arraysz = (stb.st_size / 24);
- names = (struct dirent **)malloc(arraysz * sizeof(struct dirent *));
- if (names == NULL)
- return(-1);
-
- nitems = 0;
- while ((d = readdir(dirp)) != NULL) {
- if (select != NULL && !(*select)(d))
- continue; /* just selected names */
- /*
- * Make a minimum size copy of the data
- */
- p = (struct dirent *)malloc(DIRSIZ(d));
- if (p == NULL)
- return(-1);
- p->d_ino = d->d_ino;
- p->d_reclen = d->d_reclen;
- p->d_namlen = d->d_namlen;
- strncpy(p->d_name, d->d_name, p->d_namlen + 1);
- /*
- * Check to make sure the array has space left and
- * realloc the maximum size.
- */
- if (++nitems >= arraysz) {
- if (fstat(dirp->dd_fd, &stb) < 0)
- return(-1); /* just might have grown */
- arraysz = stb.st_size / 12;
- names = (struct dirent **)realloc((char *)names,
- arraysz * sizeof(struct dirent *));
- if (names == NULL)
- return(-1);
- }
- names[nitems-1] = p;
- }
- closedir(dirp);
- if (nitems && dcomp != NULL){
- qsort(names, nitems, sizeof(struct dirent *), dcomp);
- }
- *namelist = names;
- return(nitems);
-}
-
-/*
- * Alphabetic order comparison routine for those who want it.
- */
-int
-alphasort(d1, d2)
- const void *d1;
- const void *d2;
-{
- return(strcmp((*(struct dirent **)d1)->d_name,
- (*(struct dirent **)d2)->d_name));
-}
diff --git a/c/src/exec/libcsupport/src/seekdir.c b/c/src/exec/libcsupport/src/seekdir.c
deleted file mode 100644
index eeb9c3209f..0000000000
--- a/c/src/exec/libcsupport/src/seekdir.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * seekdir() - POSIX 1003.1b - XXX
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- */
-
-#include <sys/param.h>
-#include <assert.h>
-#include <dirent.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <errno.h>
-
-void seekdir(
- DIR *dirp,
- long loc
-)
-{
- off_t status;
-
- if ( !dirp )
- return;
-
- status = lseek( dirp->dd_fd, loc, SEEK_SET );
-
- /*
- * This is not a nice way to error out, but we have no choice here.
- */
-
- if ( status == -1 )
- return;
-
- dirp->dd_loc = 0;
-}
diff --git a/c/src/exec/libcsupport/src/stat.c b/c/src/exec/libcsupport/src/stat.c
deleted file mode 100644
index 688333ac2e..0000000000
--- a/c/src/exec/libcsupport/src/stat.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * stat() - POSIX 1003.1b 5.6.2 - Get File Status
- *
- * Reused from lstat().
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-/*
- * lstat() and stat() share the same implementation with a minor
- * difference on how links are evaluated.
- */
-
-#ifndef _STAT_NAME
-#define _STAT_NAME stat
-#define _STAT_R_NAME _stat_r
-#define _STAT_FOLLOW_LINKS TRUE
-#endif
-
-
-#include <rtems.h>
-
-#if !defined(RTEMS_UNIX)
-
-#include <rtems/libio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-
-#include "libio_.h"
-
-int _STAT_NAME(
- const char *path,
- struct stat *buf
-)
-{
- int status;
- rtems_filesystem_location_info_t loc;
-
- /*
- * Check to see if we were passed a valid pointer.
- */
-
- if ( !buf )
- set_errno_and_return_minus_one( EFAULT );
-
- status = rtems_filesystem_evaluate_path( path, 0, &loc, _STAT_FOLLOW_LINKS );
- if ( status != 0 )
- return -1;
-
- if ( !loc.handlers->fstat ){
- rtems_filesystem_freenode( &loc );
- set_errno_and_return_minus_one( ENOTSUP );
- }
-
- /*
- * Zero out the stat structure so the various support
- * versions of stat don't have to.
- */
-
- memset( buf, 0, sizeof(struct stat) );
-
- status = (*loc.handlers->fstat)( &loc, buf );
-
- rtems_filesystem_freenode( &loc );
-
- return status;
-}
-#endif
-
-/*
- * _stat_r, _lstat_r
- *
- * This is the Newlib dependent reentrant version of stat() and lstat().
- */
-
-#if defined(RTEMS_NEWLIB)
-
-#include <reent.h>
-
-int _STAT_R_NAME(
- struct _reent *ptr,
- const char *path,
- struct stat *buf
-)
-{
- return _STAT_NAME( path, buf );
-}
-#endif
diff --git a/c/src/exec/libcsupport/src/symlink.c b/c/src/exec/libcsupport/src/symlink.c
deleted file mode 100644
index 6a31a25bad..0000000000
--- a/c/src/exec/libcsupport/src/symlink.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * symlink() - POSIX 1003.1b - X.X.X - XXX
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "libio_.h"
-
-int symlink(
- const char *actualpath,
- const char *sympath
-)
-{
- rtems_filesystem_location_info_t loc;
- int i;
- const char *name_start;
- int result;
-
- rtems_filesystem_get_start_loc( sympath, &i, &loc );
- result = (*loc.ops->evalformake)( &sympath[i], &loc, &name_start );
- if ( result != 0 )
- return -1;
-
- result = (*loc.ops->symlink)( &loc, actualpath, name_start);
-
- rtems_filesystem_freenode( &loc );
-
- return result;
-}
-
diff --git a/c/src/exec/libcsupport/src/tcdrain.c b/c/src/exec/libcsupport/src/tcdrain.c
deleted file mode 100644
index 0c89a58115..0000000000
--- a/c/src/exec/libcsupport/src/tcdrain.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * tcdrain() - POSIX 1003.1b 7.2.2 - Line Control Functions
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#if defined(RTEMS_NEWLIB)
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <termios.h>
-/* #include <sys/ioctl.h> */
-
-int ioctl();
-
-#include <rtems/libio.h>
-
-int tcdrain(
- int fd
-)
-{
- return ioctl( fd, RTEMS_IO_TCDRAIN, 0 );
-}
-
-#endif
diff --git a/c/src/exec/libcsupport/src/tcflow.c b/c/src/exec/libcsupport/src/tcflow.c
deleted file mode 100644
index 723013c898..0000000000
--- a/c/src/exec/libcsupport/src/tcflow.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * tcflow() - POSIX 1003.1b 7.2.2 - Line Control Functions
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#if defined(RTEMS_NEWLIB)
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <termios.h>
-/* #include <sys/ioctl.h> */
-
-int ioctl();
-
-#include <rtems/libio.h>
-
-int tcflow (int fd, int action)
-{
- return 0;
-}
-
-#endif
diff --git a/c/src/exec/libcsupport/src/tcflush.c b/c/src/exec/libcsupport/src/tcflush.c
deleted file mode 100644
index 7d2f119aec..0000000000
--- a/c/src/exec/libcsupport/src/tcflush.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * tcflush() - POSIX 1003.1b 7.2.2 - Line Control Functions
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#if defined(RTEMS_NEWLIB)
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <termios.h>
-/* #include <sys/ioctl.h> */
-
-int ioctl();
-
-#include <rtems/libio.h>
-
-int tcflush (int fd, int queue)
-{
- return 0;
-}
-
-#endif
diff --git a/c/src/exec/libcsupport/src/tcgetattr.c b/c/src/exec/libcsupport/src/tcgetattr.c
deleted file mode 100644
index 388282d37a..0000000000
--- a/c/src/exec/libcsupport/src/tcgetattr.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * tcgetattr() - POSIX 1003.1b 7.2.1 - Get and Set State
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#if defined(RTEMS_NEWLIB)
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <termios.h>
-/* #include <sys/ioctl.h> */
-
-int ioctl();
-
-#include <rtems/libio.h>
-
-int tcgetattr(
- int fd,
- struct termios *tp
-)
-{
- return ioctl( fd, RTEMS_IO_GET_ATTRIBUTES, tp );
-}
-#endif
diff --git a/c/src/exec/libcsupport/src/tcgetprgrp.c b/c/src/exec/libcsupport/src/tcgetprgrp.c
deleted file mode 100644
index 3f34b6ee13..0000000000
--- a/c/src/exec/libcsupport/src/tcgetprgrp.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * tcgetprgrp() - POSIX 1003.1b 7.2.3 - Get Foreground Process Group ID
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#if defined(RTEMS_NEWLIB)
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <termios.h>
-/* #include <sys/ioctl.h> */
-
-int ioctl();
-
-#include <rtems/libio.h>
-
-pid_t tcgetprgrp(int fd)
-{
- return getpid();
-}
-
-#endif
diff --git a/c/src/exec/libcsupport/src/tcsendbreak.c b/c/src/exec/libcsupport/src/tcsendbreak.c
deleted file mode 100644
index b367d26ece..0000000000
--- a/c/src/exec/libcsupport/src/tcsendbreak.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * tcsendbreak() - POSIX 1003.1b 7.2.2 - Line Control Functions
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#if defined(RTEMS_NEWLIB)
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <termios.h>
-/* #include <sys/ioctl.h> */
-
-int ioctl();
-
-#include <rtems/libio.h>
-
-int tcsendbreak ( int fd, int duration )
-{
- return 0;
-}
-
-#endif
diff --git a/c/src/exec/libcsupport/src/tcsetattr.c b/c/src/exec/libcsupport/src/tcsetattr.c
deleted file mode 100644
index 466d2c35fb..0000000000
--- a/c/src/exec/libcsupport/src/tcsetattr.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * tcsetattr() - POSIX 1003.1b 7.2.1 - Get and Set State
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#if defined(RTEMS_NEWLIB)
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <termios.h>
-/* #include <sys/ioctl.h> */
-
-int ioctl();
-
-#include <rtems/libio.h>
-#include "libio_.h"
-
-int tcsetattr(
- int fd,
- int opt,
- struct termios *tp
-)
-{
- switch (opt) {
- default:
- set_errno_and_return_minus_one( ENOTSUP );
-
- case TCSADRAIN:
- if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0)
- return -1;
- /*
- * Fall through to....
- */
- case TCSANOW:
- return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
- }
-}
-#endif
diff --git a/c/src/exec/libcsupport/src/tcsetpgrp.c b/c/src/exec/libcsupport/src/tcsetpgrp.c
deleted file mode 100644
index fa54df3b5f..0000000000
--- a/c/src/exec/libcsupport/src/tcsetpgrp.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * tcsetprgrp() - POSIX 1003.1b 7.2.4 - Set Foreground Process Group ID
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#if defined(RTEMS_NEWLIB)
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <termios.h>
-/* #include <sys/ioctl.h> */
-
-int ioctl();
-
-#include <rtems/libio.h>
-
-int tcsetprgrp(int fd, pid_t pid)
-{
- return 0;
-}
-
-#endif
diff --git a/c/src/exec/libcsupport/src/telldir.c b/c/src/exec/libcsupport/src/telldir.c
deleted file mode 100644
index 521138d648..0000000000
--- a/c/src/exec/libcsupport/src/telldir.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * telldir() - XXX
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- */
-
-#include <sys/param.h>
-#include <assert.h>
-#include <dirent.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <errno.h>
-
-#include "libio_.h"
-
-
-long telldir(
- DIR *dirp
-)
-{
- rtems_libio_t *iop;
-
- if ( !dirp )
- set_errno_and_return_minus_one( EBADF );
-
- /*
- * Get the file control block structure associated with the
- * file descriptor
- */
-
- iop = rtems_libio_iop( dirp->dd_fd );
-
- if (iop == NULL)
- assert(0);
-
- return (long)( iop->offset );
-}
diff --git a/c/src/exec/libcsupport/src/termios.c b/c/src/exec/libcsupport/src/termios.c
deleted file mode 100644
index 6d334ecd23..0000000000
--- a/c/src/exec/libcsupport/src/termios.c
+++ /dev/null
@@ -1,1131 +0,0 @@
-/*
- * TERMIOS serial line support
- *
- * Author:
- * W. Eric Norum
- * Saskatchewan Accelerator Laboratory
- * University of Saskatchewan
- * Saskatoon, Saskatchewan, CANADA
- * eric@skatter.usask.ca
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include <rtems/libio.h>
-#include <ctype.h>
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <termios.h>
-#include <unistd.h>
-
-/*
- * FreeBSD does not support a full POSIX termios so we have to help it out
- */
-
-
-#if defined(__FreeBSD__)
-#define XTABS 0
-#define ONLRET 0
-#define ONOCR 0
-#define TABDLY 0
-#define OLCUC 0
-#define ILCUC 0
-#define OCRNL 0
-#define IUCLC 0
-#endif
-
-/*
- * The size of the cooked buffer
- */
-#define CBUFSIZE 256
-
-/*
- * The sizes of the raw message buffers.
- * On most architectures it is quite a bit more
- * efficient if these are powers of two.
- */
-#define RAW_INPUT_BUFFER_SIZE 128
-#define RAW_OUTPUT_BUFFER_SIZE 64
-
-/*
- * Variables associated with each termios instance.
- * One structure for each hardware I/O device.
- */
-struct rtems_termios_tty {
- /*
- * Linked-list of active TERMIOS devices
- */
- struct rtems_termios_tty *forw;
- struct rtems_termios_tty *back;
-
- /*
- * How many times has this device been opened
- */
- int refcount;
-
- /*
- * This device
- */
- rtems_device_major_number major;
- rtems_device_major_number minor;
-
- /*
- * Mutual-exclusion semaphores
- */
- rtems_id isem;
- rtems_id osem;
-
- /*
- * The canonical (cooked) character buffer
- */
- char cbuf[CBUFSIZE];
- int ccount;
- int cindex;
-
- /*
- * Keep track of cursor (printhead) position
- */
- int column;
- int read_start_column;
-
- /*
- * The ioctl settings
- */
- struct termios termios;
- rtems_interval vtimeTicks;
-
- /*
- * Raw input character buffer
- */
- volatile char rawInBuf[RAW_INPUT_BUFFER_SIZE];
- volatile unsigned int rawInBufHead;
- volatile unsigned int rawInBufTail;
- rtems_id rawInBufSemaphore;
- rtems_unsigned32 rawInBufSemaphoreOptions;
- rtems_interval rawInBufSemaphoreTimeout;
- rtems_interval rawInBufSemaphoreFirstTimeout;
- unsigned int rawInBufDropped; /* Statistics */
-
- /*
- * Raw output character buffer
- */
- volatile char rawOutBuf[RAW_OUTPUT_BUFFER_SIZE];
- volatile unsigned int rawOutBufHead;
- volatile unsigned int rawOutBufTail;
- rtems_id rawOutBufSemaphore;
- enum {rob_idle, rob_busy, rob_wait } rawOutBufState;
-
- /*
- * Callbacks to device-specific routines
- */
- rtems_termios_callbacks device;
- volatile unsigned int flow_ctrl;
- unsigned int lowwater,highwater;
-};
-
-/* fields for "flow_ctrl" status */
-#define FL_IREQXOF 1 /* input queue requests stop of incoming data */
-#define FL_ISNTXOF 2 /* XOFF has been sent to other side of line */
-#define FL_IRTSOFF 4 /* RTS has been turned off for other side.. */
-
-#define FL_ORCVXOF 0x10 /* XOFF has been received */
-#define FL_OSTOP 0x20 /* output has been stopped due to XOFF */
-
-#define FL_MDRTS 0x100 /* input controlled with RTS/CTS handshake */
-#define FL_MDXON 0x200 /* input controlled with XON/XOFF protocol */
-#define FL_MDXOF 0x400 /* output controlled with XON/XOFF protocol */
-
-extern struct rtems_termios_tty *rtems_termios_ttyHead;
-extern struct rtems_termios_tty *rtems_termios_ttyTail;
-extern rtems_id rtems_termios_ttyMutex;
-
-/*
- * Open a termios device
- */
-rtems_status_code
-rtems_termios_open (
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void *arg,
- const rtems_termios_callbacks *callbacks
- )
-{
- rtems_status_code sc;
- rtems_libio_open_close_args_t *args = arg;
- struct rtems_termios_tty *tty;
-
- /*
- * See if the device has already been opened
- */
- sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
- if (sc != RTEMS_SUCCESSFUL)
- return sc;
- for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
- if ((tty->major == major) && (tty->minor == minor))
- break;
- }
- if (tty == NULL) {
- static char c = 'a';
-
- /*
- * Create a new device
- */
- tty = calloc (1, sizeof (struct rtems_termios_tty));
- if (tty == NULL) {
- rtems_semaphore_release (rtems_termios_ttyMutex);
- return RTEMS_NO_MEMORY;
- }
- tty->forw = rtems_termios_ttyHead;
- rtems_termios_ttyHead = tty;
- if (rtems_termios_ttyTail == NULL)
- rtems_termios_ttyTail = tty;
-
- tty->minor = minor;
- tty->major = major;
-
- /*
- * Set up mutex semaphores
- */
- sc = rtems_semaphore_create (
- rtems_build_name ('T', 'R', 'i', c),
- 1,
- RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
- RTEMS_NO_PRIORITY,
- &tty->isem);
- if (sc != RTEMS_SUCCESSFUL)
- rtems_fatal_error_occurred (sc);
- sc = rtems_semaphore_create (
- rtems_build_name ('T', 'R', 'o', c),
- 1,
- RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
- RTEMS_NO_PRIORITY,
- &tty->osem);
- if (sc != RTEMS_SUCCESSFUL)
- rtems_fatal_error_occurred (sc);
- sc = rtems_semaphore_create (
- rtems_build_name ('T', 'R', 'x', c),
- 0,
- RTEMS_COUNTING_SEMAPHORE | RTEMS_PRIORITY,
- RTEMS_NO_PRIORITY,
- &tty->rawOutBufSemaphore);
- if (sc != RTEMS_SUCCESSFUL)
- rtems_fatal_error_occurred (sc);
- tty->rawOutBufState = rob_idle;
-
- /*
- * Set callbacks
- */
- tty->device = *callbacks;
- if (!tty->device.pollRead) {
- sc = rtems_semaphore_create (
- rtems_build_name ('T', 'R', 'r', c),
- 0,
- RTEMS_COUNTING_SEMAPHORE | RTEMS_PRIORITY,
- RTEMS_NO_PRIORITY,
- &tty->rawInBufSemaphore);
- if (sc != RTEMS_SUCCESSFUL)
- rtems_fatal_error_occurred (sc);
- }
-
- /*
- * Set default parameters
- */
- tty->termios.c_iflag = BRKINT | ICRNL | IMAXBEL;
- tty->termios.c_oflag = OPOST | ONLCR | XTABS;
- tty->termios.c_cflag = B9600 | CS8 | CREAD;
- tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
-
- tty->termios.c_cc[VINTR] = '\003';
- tty->termios.c_cc[VQUIT] = '\034';
- tty->termios.c_cc[VERASE] = '\177';
- tty->termios.c_cc[VKILL] = '\025';
- tty->termios.c_cc[VEOF] = '\004';
- tty->termios.c_cc[VEOL] = '\000';
- tty->termios.c_cc[VEOL2] = '\000';
- tty->termios.c_cc[VSTART] = '\021';
- tty->termios.c_cc[VSTOP] = '\023';
- tty->termios.c_cc[VSUSP] = '\032';
- tty->termios.c_cc[VREPRINT] = '\022';
- tty->termios.c_cc[VDISCARD] = '\017';
- tty->termios.c_cc[VWERASE] = '\027';
- tty->termios.c_cc[VLNEXT] = '\026';
-
- /* setup flow control mode, clear flow control flags */
- tty->flow_ctrl = FL_MDXON;
- /*
- * set low/highwater mark for XON/XOFF support
- */
- tty->lowwater = RAW_INPUT_BUFFER_SIZE * 1/2;
- tty->highwater = RAW_INPUT_BUFFER_SIZE * 3/4;
- /*
- * Bump name characer
- */
- if (c++ == 'z')
- c = 'a';
-
- }
- args->iop->data1 = tty;
- if (!tty->refcount++ && tty->device.firstOpen)
- (*tty->device.firstOpen)(major, minor, arg);
- rtems_semaphore_release (rtems_termios_ttyMutex);
- return RTEMS_SUCCESSFUL;
-}
-
-/*
- * Drain output queue
- */
-static void
-drainOutput (struct rtems_termios_tty *tty)
-{
- rtems_interrupt_level level;
- rtems_status_code sc;
-
- if (tty->device.outputUsesInterrupts) {
- rtems_interrupt_disable (level);
- while (tty->rawOutBufTail != tty->rawOutBufHead) {
- tty->rawOutBufState = rob_wait;
- rtems_interrupt_enable (level);
- sc = rtems_semaphore_obtain (tty->rawOutBufSemaphore,
- RTEMS_WAIT,
- RTEMS_NO_TIMEOUT);
- if (sc != RTEMS_SUCCESSFUL)
- rtems_fatal_error_occurred (sc);
- rtems_interrupt_disable (level);
- }
- rtems_interrupt_enable (level);
- }
-}
-
-rtems_status_code
-rtems_termios_close (void *arg)
-{
- rtems_libio_open_close_args_t *args = arg;
- struct rtems_termios_tty *tty = args->iop->data1;
- rtems_status_code sc;
-
- sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
- if (sc != RTEMS_SUCCESSFUL)
- rtems_fatal_error_occurred (sc);
- if (--tty->refcount == 0) {
- drainOutput (tty);
- if (tty->device.lastClose)
- (*tty->device.lastClose)(tty->major, tty->minor, arg);
- if (tty->forw == NULL)
- rtems_termios_ttyTail = tty->back;
- else
- tty->forw->back = tty->back;
- if (tty->back == NULL)
- rtems_termios_ttyHead = tty->forw;
- else
- tty->back->forw = tty->forw;
- rtems_semaphore_delete (tty->isem);
- rtems_semaphore_delete (tty->osem);
- rtems_semaphore_delete (tty->rawOutBufSemaphore);
- if (!tty->device.pollRead)
- rtems_semaphore_delete (tty->rawInBufSemaphore);
- free (tty);
- }
- rtems_semaphore_release (rtems_termios_ttyMutex);
- return RTEMS_SUCCESSFUL;
-}
-
-static void
-termios_set_flowctrl(struct rtems_termios_tty *tty)
-{
- rtems_interrupt_level level;
- /*
- * check for flow control options to be switched off
- */
-
- /* check for outgoing XON/XOFF flow control switched off */
- if (( tty->flow_ctrl & FL_MDXON) &&
- !(tty->termios.c_iflag & IXON)) {
- /* clear related flags in flow_ctrl */
- tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF);
-
- /* has output been stopped due to received XOFF? */
- if (tty->flow_ctrl & FL_OSTOP) {
- /* disable interrupts */
- rtems_interrupt_disable(level);
- tty->flow_ctrl &= ~FL_OSTOP;
- /* check for chars in output buffer (or rob_state?) */
- if (tty->rawOutBufState != rob_idle) {
- /* if chars available, call write function... */
- (*tty->device.write)(tty->minor,
- (char *)&tty->rawOutBuf[tty->rawOutBufTail], 1);
- }
- /* reenable interrupts */
- rtems_interrupt_enable(level);
- }
- }
- /* check for incoming XON/XOFF flow control switched off */
- if (( tty->flow_ctrl & FL_MDXOF) &&
- !(tty->termios.c_iflag & IXOFF)) {
- /* clear related flags in flow_ctrl */
- tty->flow_ctrl &= ~(FL_MDXOF);
- /* FIXME: what happens, if we had sent XOFF but not yet XON? */
- tty->flow_ctrl &= ~(FL_ISNTXOF);
- }
-
- /* check for incoming RTS/CTS flow control switched off */
- if (( tty->flow_ctrl & FL_MDRTS) &&
- !(tty->termios.c_cflag & CRTSCTS)) {
- /* clear related flags in flow_ctrl */
- tty->flow_ctrl &= ~(FL_MDRTS);
-
- /* restart remote Tx, if it was stopped */
- if ((tty->flow_ctrl & FL_IRTSOFF) &&
- (tty->device.startRemoteTx != NULL)) {
- tty->device.startRemoteTx(tty->minor);
- }
- tty->flow_ctrl &= ~(FL_IRTSOFF);
- }
-
- /*
- * check for flow control options to be switched on
- */
- /* check for incoming RTS/CTS flow control switched on */
- if (tty->termios.c_cflag & CRTSCTS) {
- tty->flow_ctrl |= FL_MDRTS;
- }
- /* check for incoming XON/XOF flow control switched on */
- if (tty->termios.c_iflag & IXOFF) {
- tty->flow_ctrl |= FL_MDXOF;
- }
- /* check for outgoing XON/XOF flow control switched on */
- if (tty->termios.c_iflag & IXON) {
- tty->flow_ctrl |= FL_MDXON;
- }
-}
-
-rtems_status_code
-rtems_termios_ioctl (void *arg)
-{
- rtems_libio_ioctl_args_t *args = arg;
- struct rtems_termios_tty *tty = args->iop->data1;
- rtems_status_code sc;
-
- args->ioctl_return = 0;
- sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
- if (sc != RTEMS_SUCCESSFUL) {
- args->ioctl_return = sc;
- return sc;
- }
- switch (args->command) {
- default:
- sc = RTEMS_INVALID_NUMBER;
- break;
-
- case RTEMS_IO_GET_ATTRIBUTES:
- *(struct termios *)args->buffer = tty->termios;
- break;
-
- case RTEMS_IO_SET_ATTRIBUTES:
- tty->termios = *(struct termios *)args->buffer;
-
- /* check for and process change in flow control options */
- termios_set_flowctrl(tty);
-
- if (tty->termios.c_lflag & ICANON) {
- tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
- tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
- tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
- }
- else {
- rtems_interval ticksPerSecond;
- rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticksPerSecond);
- tty->vtimeTicks = tty->termios.c_cc[VTIME] * ticksPerSecond / 10;
- if (tty->termios.c_cc[VTIME]) {
- tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
- tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
- if (tty->termios.c_cc[VMIN])
- tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
- else
- tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
- }
- else {
- if (tty->termios.c_cc[VMIN]) {
- tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
- tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
- tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
- }
- else {
- tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
- }
- }
- }
- if (tty->device.setAttributes)
- (*tty->device.setAttributes)(tty->minor, &tty->termios);
- break;
-
- case RTEMS_IO_TCDRAIN:
- drainOutput (tty);
- break;
- }
- rtems_semaphore_release (tty->osem);
- args->ioctl_return = sc;
- return sc;
-}
-
-/*
- * Send characters to device-specific code
- */
-static void
-osend (const char *buf, int len, struct rtems_termios_tty *tty)
-{
- unsigned int newHead;
- rtems_interrupt_level level;
- rtems_status_code sc;
-
- if (!tty->device.outputUsesInterrupts) {
- (*tty->device.write)(tty->minor, buf, len);
- return;
- }
- newHead = tty->rawOutBufHead;
- while (len) {
- /*
- * Performance improvement could be made here.
- * Copy multiple bytes to raw buffer:
- * if (len > 1) && (space to buffer end, or tail > 1)
- * ncopy = MIN (len, space to buffer end or tail)
- * memcpy (raw buffer, buf, ncopy)
- * buf += ncopy
- * len -= ncopy
- *
- * To minimize latency, the memcpy should be done
- * with interrupts enabled.
- */
- newHead = (newHead + 1) % RAW_OUTPUT_BUFFER_SIZE;
- rtems_interrupt_disable (level);
- while (newHead == tty->rawOutBufTail) {
- tty->rawOutBufState = rob_wait;
- rtems_interrupt_enable (level);
- sc = rtems_semaphore_obtain (tty->rawOutBufSemaphore,
- RTEMS_WAIT,
- RTEMS_NO_TIMEOUT);
- if (sc != RTEMS_SUCCESSFUL)
- rtems_fatal_error_occurred (sc);
- rtems_interrupt_disable (level);
- }
- tty->rawOutBuf[tty->rawOutBufHead] = *buf++;
- tty->rawOutBufHead = newHead;
- if (tty->rawOutBufState == rob_idle) {
- /* check, whether XOFF has been received */
- if (!(tty->flow_ctrl & FL_ORCVXOF)) {
- (*tty->device.write)(tty->minor,
- (char *)&tty->rawOutBuf[tty->rawOutBufTail],1);
- }
- else {
- /* remember that output has been stopped due to flow ctrl*/
- tty->flow_ctrl |= FL_OSTOP;
- }
- tty->rawOutBufState = rob_busy;
- }
- rtems_interrupt_enable (level);
- len--;
- }
-}
-
-/*
- * Handle output processing
- */
-static void
-oproc (unsigned char c, struct rtems_termios_tty *tty)
-{
- int i;
-
- if (tty->termios.c_oflag & OPOST) {
- switch (c) {
- case '\n':
- if (tty->termios.c_oflag & ONLRET)
- tty->column = 0;
- if (tty->termios.c_oflag & ONLCR) {
- osend ("\r", 1, tty);
- tty->column = 0;
- }
- break;
-
- case '\r':
- if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
- return;
- if (tty->termios.c_oflag & OCRNL) {
- c = '\n';
- if (tty->termios.c_oflag & ONLRET)
- tty->column = 0;
- break;
- }
- tty->column = 0;
- break;
-
- case '\t':
- i = 8 - (tty->column & 7);
- if ((tty->termios.c_oflag & TABDLY) == XTABS) {
- tty->column += i;
- osend ( " ", i, tty);
- return;
- }
- tty->column += i;
- break;
-
- case '\b':
- if (tty->column > 0)
- tty->column--;
- break;
-
- default:
- if (tty->termios.c_oflag & OLCUC)
- c = toupper(c);
- if (!iscntrl(c))
- tty->column++;
- break;
- }
- }
- osend (&c, 1, tty);
-}
-
-rtems_status_code
-rtems_termios_write (void *arg)
-{
- rtems_libio_rw_args_t *args = arg;
- struct rtems_termios_tty *tty = args->iop->data1;
- rtems_status_code sc;
-
- sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
- if (sc != RTEMS_SUCCESSFUL)
- return sc;
- if (tty->termios.c_oflag & OPOST) {
- unsigned32 count = args->count;
- unsigned8 *buffer = args->buffer;
- while (count--)
- oproc (*buffer++, tty);
- args->bytes_moved = args->count;
- }
- else {
- osend (args->buffer, args->count, tty);
- args->bytes_moved = args->count;
- }
- rtems_semaphore_release (tty->osem);
- return sc;
-}
-
-/*
- * Echo a typed character
- */
-static void
-echo (unsigned char c, struct rtems_termios_tty *tty)
-{
- if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
- char echobuf[2];
-
- echobuf[0] = '^';
- echobuf[1] = c ^ 0x40;
- osend (echobuf, 2, tty);
- tty->column += 2;
- }
- else {
- oproc (c, tty);
- }
-}
-
-/*
- * Erase a character or line
- * FIXME: Needs support for WERASE and ECHOPRT.
- * FIXME: Some of the tests should check for IEXTEN, too.
- */
-static void
-erase (struct rtems_termios_tty *tty, int lineFlag)
-{
- if (tty->ccount == 0)
- return;
- if (lineFlag) {
- if (!(tty->termios.c_lflag & ECHO)) {
- tty->ccount = 0;
- return;
- }
- if (!(tty->termios.c_lflag & ECHOE)) {
- tty->ccount = 0;
- echo (tty->termios.c_cc[VKILL], tty);
- if (tty->termios.c_lflag & ECHOK)
- echo ('\n', tty);
- return;
- }
- }
- while (tty->ccount) {
- unsigned char c = tty->cbuf[--tty->ccount];
-
- if (tty->termios.c_lflag & ECHO) {
- if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
- echo (tty->termios.c_cc[VERASE], tty);
- }
- else if (c == '\t') {
- int col = tty->read_start_column;
- int i = 0;
-
- /*
- * Find the character before the tab
- */
- while (i != tty->ccount) {
- c = tty->cbuf[i++];
- if (c == '\t') {
- col = (col | 7) + 1;
- }
- else if (iscntrl (c)) {
- if (tty->termios.c_lflag & ECHOCTL)
- col += 2;
- }
- else {
- col++;
- }
- }
-
- /*
- * Back up over the tab
- */
- while (tty->column > col) {
- osend ("\b", 1, tty);
- tty->column--;
- }
- }
- else {
- if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
- osend ("\b \b", 3, tty);
- if (tty->column)
- tty->column--;
- }
- if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
- osend ("\b \b", 3, tty);
- if (tty->column)
- tty->column--;
- }
- }
- }
- if (!lineFlag)
- break;
- }
-}
-
-/*
- * Process a single input character
- */
-static int
-iproc (unsigned char c, struct rtems_termios_tty *tty)
-{
- if (tty->termios.c_iflag & ISTRIP)
- c &= 0x7f;
- if (tty->termios.c_iflag & IUCLC)
- c = tolower (c);
- if (c == '\r') {
- if (tty->termios.c_iflag & IGNCR)
- return 0;
- if (tty->termios.c_iflag & ICRNL)
- c = '\n';
- }
- else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
- c = '\r';
- }
- if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
- if (c == tty->termios.c_cc[VERASE]) {
- erase (tty, 0);
- return 0;
- }
- else if (c == tty->termios.c_cc[VKILL]) {
- erase (tty, 1);
- return 0;
- }
- else if (c == tty->termios.c_cc[VEOF]) {
- return 1;
- }
- else if (c == '\n') {
- if (tty->termios.c_lflag & (ECHO | ECHONL))
- echo (c, tty);
- tty->cbuf[tty->ccount++] = c;
- return 1;
- }
- else if ((c == tty->termios.c_cc[VEOL])
- || (c == tty->termios.c_cc[VEOL2])) {
- if (tty->termios.c_lflag & ECHO)
- echo (c, tty);
- tty->cbuf[tty->ccount++] = c;
- return 1;
- }
- }
-
- /*
- * FIXME: Should do IMAXBEL handling somehow
- */
- if (tty->ccount < (CBUFSIZE-1)) {
- if (tty->termios.c_lflag & ECHO)
- echo (c, tty);
- tty->cbuf[tty->ccount++] = c;
- }
- return 0;
-}
-
-/*
- * Process input character, with semaphore.
- */
-static int
-siproc (unsigned char c, struct rtems_termios_tty *tty)
-{
- int i;
-
- /*
- * Obtain output semaphore if character will be echoed
- */
- if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
- rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
- i = iproc (c, tty);
- rtems_semaphore_release (tty->osem);
- }
- else {
- i = iproc (c, tty);
- }
- return i;
-}
-
-/*
- * Fill the input buffer by polling the device
- */
-static rtems_status_code
-fillBufferPoll (struct rtems_termios_tty *tty)
-{
- int n;
-
- if (tty->termios.c_lflag & ICANON) {
- for (;;) {
- n = (*tty->device.pollRead)(tty->minor);
- if (n < 0) {
- rtems_task_wake_after (1);
- }
- else {
- if (siproc (n, tty))
- break;
- }
- }
- }
- else {
- rtems_interval then, now;
- if (!tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
- rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then);
- for (;;) {
- n = (*tty->device.pollRead)(tty->minor);
- if (n < 0) {
- if (tty->termios.c_cc[VMIN]) {
- if (tty->termios.c_cc[VTIME] && tty->ccount) {
- rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now);
- if ((now - then) > tty->vtimeTicks) {
- break;
- }
- }
- }
- else {
- if (!tty->termios.c_cc[VTIME])
- break;
- rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now);
- if ((now - then) > tty->vtimeTicks) {
- break;
- }
- }
- rtems_task_wake_after (1);
- }
- else {
- siproc (n, tty);
- if (tty->ccount >= tty->termios.c_cc[VMIN])
- break;
- if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
- rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then);
- }
- }
- }
- return RTEMS_SUCCESSFUL;
-}
-
-/*
- * Fill the input buffer from the raw input queue
- */
-static rtems_status_code
-fillBufferQueue (struct rtems_termios_tty *tty)
-{
- rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout;
- rtems_status_code sc;
-
- for (;;) {
- /*
- * Process characters read from raw queue
- */
- while (tty->rawInBufHead != tty->rawInBufTail) {
- unsigned char c;
- unsigned int newHead;
-
- newHead = (tty->rawInBufHead + 1) % RAW_INPUT_BUFFER_SIZE;
- c = tty->rawInBuf[newHead];
- tty->rawInBufHead = newHead;
- if(((tty->rawInBufTail-newHead+RAW_INPUT_BUFFER_SIZE)
- % RAW_INPUT_BUFFER_SIZE)
- < tty->lowwater) {
- tty->flow_ctrl &= ~FL_IREQXOF;
- /* if tx stopped and XON should be sent... */
- if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
- == (FL_MDXON | FL_ISNTXOF))
- && ((tty->rawOutBufState == rob_idle)
- || (tty->flow_ctrl & FL_OSTOP))) {
- /* XON should be sent now... */
- (*tty->device.write)(tty->minor,
- &(tty->termios.c_cc[VSTART]),
- 1);
- }
- else if (tty->flow_ctrl & FL_MDRTS) {
- tty->flow_ctrl &= ~FL_IRTSOFF;
- /* activate RTS line */
- if (tty->device.startRemoteTx != NULL) {
- tty->device.startRemoteTx(tty->minor);
- }
- }
- }
-
- /* continue processing new character */
- if (tty->termios.c_lflag & ICANON) {
- if (siproc (c, tty))
- return RTEMS_SUCCESSFUL;
- }
- else {
- siproc (c, tty);
- if (tty->ccount >= tty->termios.c_cc[VMIN])
- return RTEMS_SUCCESSFUL;
- }
- timeout = tty->rawInBufSemaphoreTimeout;
- }
-
- /*
- * Wait for characters
- */
- sc = rtems_semaphore_obtain (tty->rawInBufSemaphore,
- tty->rawInBufSemaphoreOptions,
- timeout);
- if (sc != RTEMS_SUCCESSFUL)
- break;
- }
- return RTEMS_SUCCESSFUL;
-}
-
-rtems_status_code
-rtems_termios_read (void *arg)
-{
- rtems_libio_rw_args_t *args = arg;
- struct rtems_termios_tty *tty = args->iop->data1;
- unsigned32 count = args->count;
- unsigned8 *buffer = args->buffer;
- rtems_status_code sc;
-
- sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
- if (sc != RTEMS_SUCCESSFUL)
- return sc;
- if (tty->cindex == tty->ccount) {
- tty->cindex = tty->ccount = 0;
- tty->read_start_column = tty->column;
- if (tty->device.pollRead)
- sc = fillBufferPoll (tty);
- else
- sc = fillBufferQueue (tty);
- if (sc != RTEMS_SUCCESSFUL)
- tty->cindex = tty->ccount = 0;
- }
- while (count && (tty->cindex < tty->ccount)) {
- *buffer++ = tty->cbuf[tty->cindex++];
- count--;
- }
- args->bytes_moved = args->count - count;
- rtems_semaphore_release (tty->isem);
- return sc;
-}
-
-/*
- * Place characters on raw queue.
- * NOTE: This routine runs in the context of the
- * device receive interrupt handler.
- * Returns the number of characters dropped because of overflow.
- */
-int
-rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len)
-{
- struct rtems_termios_tty *tty = ttyp;
- unsigned int newTail;
- char c;
- int dropped = 0;
- boolean flow_rcv = FALSE; /* TRUE, if flow control char received */
- rtems_interrupt_level level;
-
- while (len--) {
- c = *buf++;
- /* FIXME: implement IXANY: any character restarts output */
- /* if incoming XON/XOFF controls outgoing stream: */
- if (tty->flow_ctrl & FL_MDXON) {
- /* if received char is V_STOP and V_START (both are equal value) */
- if (c == tty->termios.c_cc[VSTOP]) {
- if (c == tty->termios.c_cc[VSTART]) {
- /* received VSTOP and VSTART==VSTOP? */
- /* then toggle "stop output" status */
- tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
- }
- else {
- /* VSTOP received (other code than VSTART) */
- /* stop output */
- tty->flow_ctrl |= FL_ORCVXOF;
- }
- flow_rcv = TRUE;
- }
- else if (c == tty->termios.c_cc[VSTART]) {
- /* VSTART received */
- /* restart output */
- tty->flow_ctrl &= ~FL_ORCVXOF;
- flow_rcv = TRUE;
- }
- }
- if (flow_rcv) {
- /* restart output according to FL_ORCVXOF flag */
- if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
- /* disable interrupts */
- rtems_interrupt_disable(level);
- tty->flow_ctrl &= ~FL_OSTOP;
- /* check for chars in output buffer (or rob_state?) */
- if (tty->rawOutBufState != rob_idle) {
- /* if chars available, call write function... */
- (*tty->device.write)(tty->minor,
- (char *)&tty->rawOutBuf[tty->rawOutBufTail], 1);
- }
- /* reenable interrupts */
- rtems_interrupt_enable(level);
- }
- }
- else {
- newTail = (tty->rawInBufTail + 1) % RAW_INPUT_BUFFER_SIZE;
- /* if chars_in_buffer > highwater */
- rtems_interrupt_disable(level);
- if ((((newTail - tty->rawInBufHead + RAW_INPUT_BUFFER_SIZE)
- % RAW_INPUT_BUFFER_SIZE)
- > tty->highwater) &&
- !(tty->flow_ctrl & FL_IREQXOF)) {
- /* incoming data stream should be stopped */
- tty->flow_ctrl |= FL_IREQXOF;
- if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
- == (FL_MDXOF ) ){
- if ((tty->flow_ctrl & FL_OSTOP) ||
- (tty->rawOutBufState == rob_idle)) {
- /* if tx is stopped due to XOFF or out of data */
- /* call write function here */
- tty->flow_ctrl |= FL_ISNTXOF;
- (*tty->device.write)(tty->minor,
- &(tty->termios.c_cc[VSTOP]),
- 1);
- }
- }
- else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF))
- == (FL_MDRTS ) ) {
- tty->flow_ctrl |= FL_IRTSOFF;
- /* deactivate RTS line */
- if (tty->device.stopRemoteTx != NULL) {
- tty->device.stopRemoteTx(tty->minor);
- }
- }
- }
- /* reenable interrupts */
- rtems_interrupt_enable(level);
-
- if (newTail == tty->rawInBufHead) {
- dropped++;
- }
- else {
- tty->rawInBuf[newTail] = c;
- tty->rawInBufTail = newTail;
- }
- }
- }
- tty->rawInBufDropped += dropped;
- rtems_semaphore_release (tty->rawInBufSemaphore);
- return dropped;
-}
-
-/*
- * Characters have been transmitted
- * NOTE: This routine runs in the context of the
- * device transmit interrupt handler.
- * The second argument is the number of characters transmitted so far.
- * This value will always be 1 for devices which generate an interrupt
- * for each transmitted character.
- * It returns number of characters left to transmit
- */
-int
-rtems_termios_dequeue_characters (void *ttyp, int len)
-{
- struct rtems_termios_tty *tty = ttyp;
- unsigned int newTail;
- int nToSend;
-
- /* check for XOF/XON to send */
- if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
- == (FL_MDXOF | FL_IREQXOF)) {
- /* XOFF should be sent now... */
- (*tty->device.write)(tty->minor,
- &(tty->termios.c_cc[VSTOP]), 1);
- tty->flow_ctrl |= FL_ISNTXOF;
- nToSend = 1;
- }
- else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF))
- == FL_ISNTXOF) {
- /* NOTE: send XON even, if no longer in XON/XOFF mode... */
- /* XON should be sent now... */
- (*tty->device.write)(tty->minor,
- &(tty->termios.c_cc[VSTART]), 1);
- tty->flow_ctrl &= ~FL_ISNTXOF;
- nToSend = 1;
- }
- else {
- if (tty->rawOutBufState == rob_wait)
- rtems_semaphore_release (tty->rawOutBufSemaphore);
- if ( tty->rawOutBufHead == tty->rawOutBufTail )
- return 0;
- newTail = (tty->rawOutBufTail + len) % RAW_OUTPUT_BUFFER_SIZE;
- if (newTail == tty->rawOutBufHead) {
- /*
- * Buffer empty
- */
- tty->rawOutBufState = rob_idle;
- nToSend = 0;
- }
- /* check, whether output should stop due to received XOFF */
- else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
- == (FL_MDXON | FL_ORCVXOF)) {
- /* Buffer not empty, but output stops due to XOFF */
- /* set flag, that output has been stopped */
- tty->flow_ctrl |= FL_OSTOP;
- nToSend = 0;
- }
- else {
- /*
- * Buffer not empty, start tranmitter
- */
- if (newTail > tty->rawOutBufHead)
- nToSend = RAW_OUTPUT_BUFFER_SIZE - newTail;
- else
- nToSend = tty->rawOutBufHead - newTail;
- /* when flow control XON or XOF, don't send blocks of data */
- /* to allow fast reaction on incoming flow ctrl and low latency*/
- /* for outgoing flow control */
- if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) {
- nToSend = 1;
- }
- (*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf[newTail], nToSend);
- tty->rawOutBufState = rob_busy;
- }
- tty->rawOutBufTail = newTail;
- }
- return nToSend;
-}
-
-
diff --git a/c/src/exec/libcsupport/src/termiosinitialize.c b/c/src/exec/libcsupport/src/termiosinitialize.c
deleted file mode 100644
index f6e73787c9..0000000000
--- a/c/src/exec/libcsupport/src/termiosinitialize.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Termios initialization routine
- *
- * Author:
- * W. Eric Norum
- * Saskatchewan Accelerator Laboratory
- * University of Saskatchewan
- * Saskatoon, Saskatchewan, CANADA
- * eric@skatter.usask.ca
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include <rtems.h>
-#include <rtems/libio.h>
-#include <ctype.h>
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <termios.h>
-#include <unistd.h>
-
-struct rtems_termios_tty *rtems_termios_ttyHead;
-struct rtems_termios_tty *rtems_termios_ttyTail;
-rtems_id rtems_termios_ttyMutex;
-
-void
-rtems_termios_initialize (void)
-{
- rtems_status_code sc;
-
- /*
- * Create the mutex semaphore for the tty list
- */
- if (!rtems_termios_ttyMutex) {
- sc = rtems_semaphore_create (
- rtems_build_name ('T', 'R', 'm', 'i'),
- 1,
- RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
- RTEMS_NO_PRIORITY,
- &rtems_termios_ttyMutex);
- if (sc != RTEMS_SUCCESSFUL)
- rtems_fatal_error_occurred (sc);
- }
-}
diff --git a/c/src/exec/libcsupport/src/termiosreserveresources.c b/c/src/exec/libcsupport/src/termiosreserveresources.c
deleted file mode 100644
index 2d9c05c988..0000000000
--- a/c/src/exec/libcsupport/src/termiosreserveresources.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Reserve enough resources to open every physical device once.
- *
- * $Id$
- */
-
-#include <rtems.h>
-
-static int first_time; /* assumed to be zeroed by BSS initialization */
-
-void rtems_termios_reserve_resources (
- rtems_configuration_table *configuration,
- rtems_unsigned32 number_of_devices
-)
-{
- rtems_api_configuration_table *rtems_config;
-
- if (!configuration)
- rtems_fatal_error_occurred (0xFFF0F001);
- rtems_config = configuration->RTEMS_api_configuration;
- if (!rtems_config)
- rtems_fatal_error_occurred (0xFFF0F002);
- if (!first_time)
- rtems_config->maximum_semaphores += 1;
- first_time = 1;
- rtems_config->maximum_semaphores += (4 * number_of_devices);
-}
-
diff --git a/c/src/exec/libcsupport/src/truncate.c b/c/src/exec/libcsupport/src/truncate.c
deleted file mode 100644
index d551b5be5b..0000000000
--- a/c/src/exec/libcsupport/src/truncate.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * truncate() - Truncate a File to the Specified Length
- *
- * This routine is not defined in the POSIX 1003.1b standard but is
- * commonly supported on most UNIX and POSIX systems. It is provided
- * for compatibility.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <unistd.h>
-#include <errno.h>
-#include <fcntl.h>
-
-int truncate(
- const char *path,
- off_t length
-)
-{
- int status;
- int fd;
-
- fd = open( path, O_WRONLY );
- if ( fd == -1 )
- return -1;
-
- status = ftruncate( fd, length );
-
- (void) close( fd );
-
- return status;
-}
-
diff --git a/c/src/exec/libcsupport/src/ttyname.c b/c/src/exec/libcsupport/src/ttyname.c
deleted file mode 100644
index ceb6ed8121..0000000000
--- a/c/src/exec/libcsupport/src/ttyname.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * ttyname_r() - POSIX 1003.1b 4.7.2 - Demetermine Terminal Device Name
- *
- * $Id$
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <dirent.h>
-#include <termios.h>
-#include <unistd.h>
-#include <paths.h>
-#include <_syslist.h>
-#include <errno.h>
-
-#include "libio_.h"
-
-
-int ttyname_r(
- int fd,
- char *name,
- int namesize
-)
-{
- struct stat sb;
- struct termios tty;
- struct dirent *dirp;
- DIR *dp;
- struct stat dsb;
- char *rval;
-
- /* Must be a terminal. */
- if (tcgetattr (fd, &tty) < 0)
- set_errno_and_return_minus_one(EBADF);
-
- /* Must be a character device. */
- if (_fstat (fd, &sb) || !S_ISCHR (sb.st_mode))
- set_errno_and_return_minus_one(EBADF);
-
- if ((dp = opendir (_PATH_DEV)) == NULL)
- set_errno_and_return_minus_one(EBADF);
-
- for (rval = NULL; (dirp = readdir (dp)) != NULL ;)
- {
- if (dirp->d_ino != sb.st_ino)
- continue;
- strcpy (name + sizeof (_PATH_DEV) - 1, dirp->d_name);
- if (stat (name, &dsb) || sb.st_dev != dsb.st_dev ||
- sb.st_ino != dsb.st_ino)
- continue;
- (void) closedir (dp);
- rval = name;
- break;
- }
- (void) closedir (dp);
- return 0;
-}
-
-static char buf[sizeof (_PATH_DEV) + MAXNAMLEN] = _PATH_DEV;
-
-/*
- * ttyname() - POSIX 1003.1b 4.7.2 - Demetermine Terminal Device Name
- */
-
-char *ttyname(
- int fd
-)
-{
- if ( !ttyname_r( fd, buf, sizeof(buf) ) )
- return buf;
- return NULL;
-}
-
diff --git a/c/src/exec/libcsupport/src/ttyname_r.c b/c/src/exec/libcsupport/src/ttyname_r.c
deleted file mode 100644
index 69ca36cc43..0000000000
--- a/c/src/exec/libcsupport/src/ttyname_r.c
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * This file was copied from newlib-1.8.2/newlib/unix/ttyname.c
- * and transformed into ttyname_r().
- *
- * Copyright (c) 1988 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)ttyname.c 5.10 (Berkeley) 5/6/91";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <dirent.h>
-#include <termios.h>
-#include <unistd.h>
-#include <paths.h>
-#include <_syslist.h>
-#include <errno.h>
-
-#include "libio_.h"
-
-/*
- * ttyname_r() - POSIX 1003.1b 4.7.2 - Demetermine Terminal Device Name
- */
-
-int ttyname_r(
- int fd,
- char *name,
- int namesize
-)
-{
- struct stat sb;
- struct termios tty;
- struct dirent *dirp;
- DIR *dp;
- struct stat dsb;
- char *rval;
-
- /* Must be a terminal. */
- if (tcgetattr (fd, &tty) < 0)
- set_errno_and_return_minus_one(EBADF);
-
- /* Must be a character device. */
- if (_fstat (fd, &sb) || !S_ISCHR (sb.st_mode))
- set_errno_and_return_minus_one(EBADF);
-
- if ((dp = opendir (_PATH_DEV)) == NULL)
- set_errno_and_return_minus_one(EBADF);
-
- for (rval = NULL; (dirp = readdir (dp)) != NULL ;)
- {
- if (dirp->d_ino != sb.st_ino)
- continue;
- strcpy (name + sizeof (_PATH_DEV) - 1, dirp->d_name);
- if (stat (name, &dsb) || sb.st_dev != dsb.st_dev ||
- sb.st_ino != dsb.st_ino)
- continue;
- (void) closedir (dp);
- rval = name;
- break;
- }
- (void) closedir (dp);
- return 0;
-}
-
-static char buf[sizeof (_PATH_DEV) + MAXNAMLEN] = _PATH_DEV;
-
-/*
- * ttyname() - POSIX 1003.1b 4.7.2 - Demetermine Terminal Device Name
- */
-
-char *ttyname(
- int fd
-)
-{
- if ( !ttyname_r( fd, buf, sizeof(buf) ) )
- return buf;
- return NULL;
-}
-
diff --git a/c/src/exec/libcsupport/src/umask.c b/c/src/exec/libcsupport/src/umask.c
deleted file mode 100644
index c9f0b4851b..0000000000
--- a/c/src/exec/libcsupport/src/umask.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * umask() - POSIX 1003.1b 5.3.3 - Set File Creation Mask
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#include "libio_.h"
-
-mode_t umask(
- mode_t cmask
-)
-{
- mode_t old_mask;
-
- old_mask = rtems_filesystem_umask;
- rtems_filesystem_umask = cmask;
-
- return old_mask;
-}
diff --git a/c/src/exec/libcsupport/src/unixlibc.c b/c/src/exec/libcsupport/src/unixlibc.c
deleted file mode 100644
index 494e83b159..0000000000
--- a/c/src/exec/libcsupport/src/unixlibc.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * $Id$
- * UNIX Port C Library Support
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- */
-
-#include <rtems.h>
-
-#if defined(RTEMS_UNIXLIB)
-
-void libc_init(int reentrant)
-{
-}
-
-#else
-
-/* remove ANSI errors.
- * A program must contain at least one external-declaration
- * (X3.159-1989 p.82,L3).
- */
-void unixlibc_dummy_function( void )
-{
-}
-
-#endif
diff --git a/c/src/exec/libcsupport/src/unlink.c b/c/src/exec/libcsupport/src/unlink.c
deleted file mode 100644
index cf11db227c..0000000000
--- a/c/src/exec/libcsupport/src/unlink.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * unlink() - POSIX 1003.1b - 5.5.1 - Remove an existing link
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-
-#include "libio_.h"
-
-int unlink(
- const char *path
-)
-{
- rtems_filesystem_location_info_t loc;
- int result;
-
- /*
- * Get the node to be unlinked.
- */
-
- result = rtems_filesystem_evaluate_path( path, 0, &loc, FALSE );
- if ( result != 0 )
- return -1;
-
- if ( !loc.ops->node_type ) {
- rtems_filesystem_freenode( &loc );
- set_errno_and_return_minus_one( ENOTSUP );
- }
-
- if ( (*loc.ops->node_type)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
- rtems_filesystem_freenode( &loc );
- set_errno_and_return_minus_one( EISDIR );
- }
-
- if ( !loc.ops->unlink ) {
- rtems_filesystem_freenode( &loc );
- set_errno_and_return_minus_one( ENOTSUP );
- }
-
- result = (*loc.ops->unlink)( &loc );
-
- rtems_filesystem_freenode( &loc );
-
- return result;
-}
-
-/*
- * _unlink_r
- *
- * This is the Newlib dependent reentrant version of unlink().
- */
-
-#if defined(RTEMS_NEWLIB)
-
-#include <reent.h>
-
-int _unlink_r(
- struct _reent *ptr,
- const char *path
-)
-{
- return unlink( path );
-}
-#endif
-
diff --git a/c/src/exec/libcsupport/src/unmount.c b/c/src/exec/libcsupport/src/unmount.c
deleted file mode 100644
index c4b6bdae7d..0000000000
--- a/c/src/exec/libcsupport/src/unmount.c
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- * unmount() - Unmount a File System
- *
- * This routine is not defined in the POSIX 1003.1b standard but
- * in some form is supported on most UNIX and POSIX systems. This
- * routine is necessary to mount instantiations of a file system
- * into the file system name space.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <chain.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-#include "imfs.h"
-#include "libio_.h"
-
-/*
- * Data structures and routines private to mount/unmount pair.
- */
-
-extern Chain_Control rtems_filesystem_mount_table_control;
-extern rtems_filesystem_location_info_t rtems_filesystem_current;
-
-int search_mt_for_mount_point(
- rtems_filesystem_location_info_t *location_of_mount_point
-);
-
-
-int file_systems_below_this_mountpoint(
- const char *mount_path,
- rtems_filesystem_location_info_t *temp_loc,
- rtems_filesystem_mount_table_entry_t *temp_mt_entry
-);
-
-/*
- * unmount
- *
- * This routine will attempt to unmount the file system that has been
- * is mounted a mount_path. If the operation is successful, 0 will
- * be returned to the calling routine. Otherwise, 1 will be returned.
- */
-
-int unmount(
- const char *mount_path
-)
-{
- int status;
- rtems_filesystem_location_info_t temp_loc;
- rtems_filesystem_mount_table_entry_t temp_mt_entry;
- int result;
-
- /*
- * Are there any file systems below the mount_path specified
- */
-
- status = file_systems_below_this_mountpoint(
- mount_path,
- &temp_loc,
- &temp_mt_entry
- );
-
- if ( status != 0 )
- return -1;
-
- /*
- * Is the current node reference pointing to a node in the file system
- * we are attempting to unmount ?
- */
-
- if ( rtems_filesystem_current.mt_entry == temp_loc.mt_entry ) {
- rtems_filesystem_freenode( &temp_loc );
- set_errno_and_return_minus_one( EBUSY );
- }
-
- /*
- * Run the file descriptor table to determine if there are any file
- * descriptors that are currently active and reference nodes in the
- * file system that we are trying to unmount
- */
-
- if ( rtems_libio_is_open_files_in_fs( temp_loc.mt_entry ) == 1 ) {
- rtems_filesystem_freenode( &temp_loc );
- set_errno_and_return_minus_one( EBUSY );
- }
-
- /*
- * Allow the file system being mounted on to do its cleanup.
- * XXX - Did I change these correctly ??? It looks like either I did
- * XXX this backwards or the IMFS_unmount and IMFS_fsumount are swaped.
- * XXX Add to the mt_point_node unmount to set the mt_entry back to null
- * XXX I will step off in space when evaluating past the end of the node.
- */
-
- if ((temp_mt_entry.mt_point_node.ops->unmount )( temp_loc.mt_entry ) != 0 ) {
- rtems_filesystem_freenode( &temp_loc );
- return -1;
- }
-
- /*
- * Run the unmount function for the subordinate file system.
- */
-
- if ((temp_mt_entry.mt_fs_root.ops->fsunmount_me )( temp_loc.mt_entry ) != 0){
- rtems_filesystem_freenode( &temp_loc );
- return -1;
- }
-
- /*
- * Allow the file system to clean up.
- */
-
- result = (*temp_loc.ops->fsunmount_me)( temp_loc.mt_entry );
-
- /*
- * Extract the mount table entry from the chain
- */
-
- Chain_Extract( ( Chain_Node * ) temp_loc.mt_entry );
-
- /*
- * Free the memory associated with the extracted mount table entry.
- */
-
- rtems_filesystem_freenode( &temp_loc.mt_entry->mt_point_node );
- free( temp_loc.mt_entry );
- rtems_filesystem_freenode( &temp_loc );
-
- return result;
-
-}
-
-
-/*
- * file_systems_below_this_mountpoint
- *
- * This routine will run through the entries that currently exist in the
- * mount table chain. For each entry in the mount table chain it will
- * compare the mount tables mt_fs_root to the new_fs_root_node. If any of the
- * mount table file system root nodes matches the new file system root node
- * this indicates that we are trying to mount a file system that has already
- * been mounted. This is not a permitted operation. temp_loc is set to
- * the root node of the file system being unmounted.
- */
-
-int file_systems_below_this_mountpoint(
- const char *mount_path,
- rtems_filesystem_location_info_t *temp_loc,
- rtems_filesystem_mount_table_entry_t *temp_mt_entry
-)
-{
- Chain_Node *the_node;
- rtems_filesystem_mount_table_entry_t *the_mount_entry;
- rtems_filesystem_mount_table_entry_t *current_fs_mt_entry;
-
- /*
- * Is the mount_path even a valid node name in the existing tree?
- */
-
- if ( rtems_filesystem_evaluate_path( mount_path, 0x0, temp_loc, TRUE ) )
- return -1;
-
- /*
- * Look for the node defined in temp_loc as a mount point in the
- * mount table chain.
- */
-
- for ( the_node = rtems_filesystem_mount_table_control.first;
- !Chain_Is_tail( &rtems_filesystem_mount_table_control, the_node );
- the_node = the_node->next ) {
-
- the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node;
- if (the_mount_entry->mt_point_node.node_access ==
- temp_loc->node_access ) {
- current_fs_mt_entry = the_mount_entry;
- *temp_loc = current_fs_mt_entry->mt_fs_root;
- goto after_real_mount_point_found;
- }
- }
- set_errno_and_return_minus_one( EACCES );
-
-
-after_real_mount_point_found:
-
- for ( the_node = rtems_filesystem_mount_table_control.first;
- !Chain_Is_tail( &rtems_filesystem_mount_table_control, the_node );
- the_node = the_node->next ) {
-
- the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node;
-
- /*
- * Exclude the current file systems mount table entry from the test
- */
-
- if ( current_fs_mt_entry != the_mount_entry ) {
- if ( the_mount_entry->mt_point_node.mt_entry == current_fs_mt_entry ) {
-
- /*
- * There is at least one fs below the fs on the mount_path.
- */
- set_errno_and_return_minus_one( EBUSY );
- }
- }
- }
-
- *temp_mt_entry = *current_fs_mt_entry;
-
- return 0;
-}
diff --git a/c/src/exec/libcsupport/src/utime.c b/c/src/exec/libcsupport/src/utime.c
deleted file mode 100644
index 50eeece59a..0000000000
--- a/c/src/exec/libcsupport/src/utime.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * utime() - POSIX 1003.1b 5.5.6 - Set File Access and Modification Times
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h>
-#include <utime.h>
-#include <errno.h>
-
-#include "libio_.h"
-
-int utime(
- const char *path,
- const struct utimbuf *times
-)
-{
- rtems_filesystem_location_info_t temp_loc;
- int result;
-
- if ( rtems_filesystem_evaluate_path( path, 0x00, &temp_loc, TRUE ) )
- return -1;
-
- if ( !temp_loc.ops->utime )
- set_errno_and_return_minus_one( ENOTSUP );
-
- result = (*temp_loc.ops->utime)( &temp_loc, times->actime, times->modtime );
-
- rtems_filesystem_freenode( &temp_loc );
-
- return result;
-}
diff --git a/c/src/exec/libcsupport/src/utsname.c b/c/src/exec/libcsupport/src/utsname.c
deleted file mode 100644
index 7da5f9380d..0000000000
--- a/c/src/exec/libcsupport/src/utsname.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * $Id$
- */
-
-#include <stdio.h>
-#include <string.h>
-
-#include <errno.h>
-#include <sys/utsname.h>
-
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/sptables.h>
-
-#include <rtems/posix/seterr.h>
-
-/*PAGE
- *
- * 4.4.1 Get System Name, P1003.1b-1993, p. 90
- */
-
-int uname(
- struct utsname *name
-)
-{
- /* XXX: Here is what Solaris returns...
- sysname = SunOS
- nodename = node_name
- release = 5.3
- version = Generic_101318-12
- machine = sun4m
- */
-
- if ( !name )
- set_errno_and_return_minus_one( EFAULT );
-
- strcpy( name->sysname, "RTEMS" );
-
- sprintf( name->nodename, "Node %d", _Objects_Local_node );
-
- strcpy( name->release, RTEMS_VERSION );
-
- strcpy( name->version, "" );
-
- sprintf( name->machine, "%s/%s", CPU_NAME, CPU_MODEL_NAME );
-
- return 0;
-}
diff --git a/c/src/exec/libcsupport/src/write.c b/c/src/exec/libcsupport/src/write.c
deleted file mode 100644
index a47a4f40a9..0000000000
--- a/c/src/exec/libcsupport/src/write.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * write() - POSIX 1003.1b 6.4.2 - Write to a File
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "libio_.h"
-
-
-/*
- * write
- *
- * This routine writes count bytes from from buffer pointed to by buffer
- * to the file associated with the open file descriptor, fildes.
- */
-
-ssize_t write(
- int fd,
- const void *buffer,
- size_t count
-)
-{
- rtems_status_code rc;
- rtems_libio_t *iop;
-
- rtems_libio_check_fd( fd );
- iop = rtems_libio_iop( fd );
- rtems_libio_check_is_open(iop);
- rtems_libio_check_buffer( buffer );
- rtems_libio_check_count( count );
- rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
-
- /*
- * Now process the write() request.
- */
-
- if ( !iop->handlers->write )
- set_errno_and_return_minus_one( ENOTSUP );
-
- rc = (*iop->handlers->write)( iop, buffer, count );
-
- if ( rc > 0 )
- iop->offset += rc;
-
- return rc;
-}
-
-/*
- * _write_r
- *
- * This is the Newlib dependent reentrant version of write().
- */
-
-#if defined(RTEMS_NEWLIB)
-
-#include <reent.h>
-
-long _write_r(
- struct _reent *ptr,
- int fd,
- const void *buf,
- size_t nbytes
-)
-{
- return write( fd, buf, nbytes );
-}
-#endif
diff --git a/c/src/exec/libfs/src/imfs/deviceio.c b/c/src/exec/libfs/src/imfs/deviceio.c
deleted file mode 100644
index 0cbdd2a456..0000000000
--- a/c/src/exec/libfs/src/imfs/deviceio.c
+++ /dev/null
@@ -1,221 +0,0 @@
-/*
- * IMFS Device Node Handlers
- *
- * This file contains the set of handlers used to map operations on
- * IMFS device nodes onto calls to the RTEMS Classic API IO Manager.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include <rtems/libio.h>
-#include "libio_.h"
-
-#include "imfs.h"
-
-/*
- * device_open
- *
- * This handler maps an open() operation onto rtems_io_open().
- */
-
-int device_open(
- rtems_libio_t *iop,
- const char *pathname,
- unsigned32 flag,
- unsigned32 mode
-)
-{
- rtems_libio_open_close_args_t args;
- rtems_status_code status;
- IMFS_jnode_t *the_jnode;
-
- the_jnode = iop->file_info;
-
- args.iop = iop;
- args.flags = iop->flags;
- args.mode = mode;
-
- status = rtems_io_open(
- the_jnode->info.device.major,
- the_jnode->info.device.minor,
- (void *) &args
- );
- if ( status )
- return RTEMS_UNSATISFIED;
-
- return 0;
-}
-
-/*
- * device_close
- *
- * This handler maps a close() operation onto rtems_io_close().
- */
-
-int device_close(
- rtems_libio_t *iop
-)
-{
- rtems_libio_open_close_args_t args;
- rtems_status_code status;
- IMFS_jnode_t *the_jnode;
-
- the_jnode = iop->file_info;
-
- args.iop = iop;
- args.flags = 0;
- args.mode = 0;
-
- status = rtems_io_close(
- the_jnode->info.device.major,
- the_jnode->info.device.minor,
- (void *) &args
- );
- if ( status )
- return RTEMS_UNSATISFIED;
-
- return 0;
-}
-
-/*
- * device_read
- *
- * This handler maps a read() operation onto rtems_io_read().
- */
-
-int device_read(
- rtems_libio_t *iop,
- void *buffer,
- unsigned32 count
-)
-{
- rtems_libio_rw_args_t args;
- rtems_status_code status;
- IMFS_jnode_t *the_jnode;
-
- the_jnode = iop->file_info;
-
- args.iop = iop;
- args.offset = iop->offset;
- args.buffer = buffer;
- args.count = count;
- args.flags = iop->flags;
- args.bytes_moved = 0;
-
- status = rtems_io_read(
- the_jnode->info.device.major,
- the_jnode->info.device.minor,
- (void *) &args
- );
-
- if ( status )
- return -1;
-
- return args.bytes_moved;
-}
-
-/*
- * device_write
- *
- * This handler maps a write() operation onto rtems_io_write().
- */
-
-int device_write(
- rtems_libio_t *iop,
- const void *buffer,
- unsigned32 count
-)
-{
- rtems_libio_rw_args_t args;
- rtems_status_code status;
- IMFS_jnode_t *the_jnode;
-
- the_jnode = iop->file_info;
-
- args.iop = iop;
- args.offset = iop->offset;
- args.buffer = (void *) buffer;
- args.count = count;
- args.flags = iop->flags;
- args.bytes_moved = 0;
-
- status = rtems_io_write(
- the_jnode->info.device.major,
- the_jnode->info.device.minor,
- (void *) &args
- );
-
- if ( status )
- return -1;
-
- return args.bytes_moved;
-}
-
-/*
- * device_ioctl
- *
- * This handler maps an ioctl() operation onto rtems_io_ioctl().
- */
-
-int device_ioctl(
- rtems_libio_t *iop,
- unsigned32 command,
- void *buffer
-)
-{
- rtems_libio_ioctl_args_t args;
- rtems_status_code status;
- IMFS_jnode_t *the_jnode;
-
- args.iop = iop;
- args.command = command;
- args.buffer = buffer;
-
- the_jnode = iop->file_info;
-
- status = rtems_io_control(
- the_jnode->info.device.major,
- the_jnode->info.device.minor,
- (void *) &args
- );
-
- if ( status )
- return -1;
-
- return args.ioctl_return;
-}
-
-/*
- * device_lseek
- *
- * This handler eats all lseek() operations.
- */
-
-int device_lseek(
- rtems_libio_t *iop,
- off_t offset,
- int whence
-)
-{
- return 0;
-}
-
-/*
- * device_stat
- *
- * The IMFS_stat() is used.
- */
-
-/*
- * device_rmnod
- *
- * The IMFS_rmnod() is used.
- */
diff --git a/c/src/exec/libfs/src/imfs/imfs.h b/c/src/exec/libfs/src/imfs/imfs.h
deleted file mode 100644
index 38c770a325..0000000000
--- a/c/src/exec/libfs/src/imfs/imfs.h
+++ /dev/null
@@ -1,516 +0,0 @@
-/*
- * Header file for the In-Memory File System
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __IMFS_h
-#define __IMFS_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems.h>
-#include <chain.h>
-
-#include <sys/types.h>
-#include <limits.h>
-#include <rtems/libio.h>
-
-/*
- * File name macros
- */
-
-#define IMFS_is_valid_name_char( _ch ) ( 1 )
-
-#define IMFS_is_separator( _ch ) \
- rtems_filesystem_is_separator( _ch )
-
-/*
- * Data types
- */
-
-struct IMFS_jnode_tt;
-typedef struct IMFS_jnode_tt IMFS_jnode_t;
-
-typedef struct {
- Chain_Control Entries;
- rtems_filesystem_mount_table_entry_t *mt_fs;
-} IMFS_directory_t;
-
-typedef struct {
- rtems_device_major_number major;
- rtems_device_minor_number minor;
-} IMFS_device_t;
-
-typedef struct {
- IMFS_jnode_t *link_node;
-} IMFS_link_t;
-
-typedef struct {
- const char *name;
-} IMFS_sym_link_t;
-
-/*
- * IMFS "memfile" information
- *
- * The data structure for the in-memory "memfiles" is based on classic UNIX.
- *
- * block_ptr is a pointer to a block of IMFS_MEMFILE_BYTES_PER_BLOCK in
- * length which could be data or a table of pointers to blocks.
- *
- * Setting IMFS_MEMFILE_BYTES_PER_BLOCK to different values has a significant
- * impact on the maximum file size supported as well as the amount of
- * memory wasted due to internal file fragmentation. The following
- * is a list of maximum file sizes based on various settings
- *
- * max_filesize with blocks of 16 is 1,328
- * max_filesize with blocks of 32 is 18,656
- * max_filesize with blocks of 64 is 279,488
- * max_filesize with blocks of 128 is 4,329,344
- * max_filesize with blocks of 256 is 68,173,568
- * max_filesize with blocks of 512 is 1,082,195,456
- */
-
-#define IMFS_MEMFILE_BYTES_PER_BLOCK 128
-#define IMFS_MEMFILE_BLOCK_SLOTS \
- (IMFS_MEMFILE_BYTES_PER_BLOCK / sizeof(void *))
-
-typedef unsigned char * block_p;
-typedef block_p *block_ptr;
-
-typedef struct {
- off_t size; /* size of file in bytes */
- block_ptr indirect; /* array of 128 data blocks pointers */
- block_ptr doubly_indirect; /* 128 indirect blocks */
- block_ptr triply_indirect; /* 128 doubly indirect blocks */
-} IMFS_memfile_t;
-
-/*
- * Important block numbers for "memfiles"
- */
-
-#define FIRST_INDIRECT (0)
-#define LAST_INDIRECT (IMFS_MEMFILE_BLOCK_SLOTS - 1)
-
-#define FIRST_DOUBLY_INDIRECT (LAST_INDIRECT + 1)
-#define LAST_DOUBLY_INDIRECT \
- (LAST_INDIRECT + \
- (IMFS_MEMFILE_BLOCK_SLOTS * IMFS_MEMFILE_BLOCK_SLOTS))
-
-#define FIRST_TRIPLY_INDIRECT (LAST_DOUBLY_INDIRECT + 1)
-#define LAST_TRIPLY_INDIRECT \
- (LAST_DOUBLY_INDIRECT +\
- (IMFS_MEMFILE_BLOCK_SLOTS * \
- IMFS_MEMFILE_BLOCK_SLOTS * IMFS_MEMFILE_BLOCK_SLOTS))
-
-#define IMFS_MEMFILE_MAXIMUM_SIZE \
- (LAST_TRIPLY_INDIRECT * IMFS_MEMFILE_BYTES_PER_BLOCK)
-
-/*
- * What types of IMFS file systems entities there can be.
- */
-
-#define IMFS_jnode_types_t rtems_filesystem_node_types_t
-#define IMFS_DIRECTORY RTEMS_FILESYSTEM_DIRECTORY
-#define IMFS_DEVICE RTEMS_FILESYSTEM_DEVICE
-#define IMFS_HARD_LINK RTEMS_FILESYSTEM_HARD_LINK
-#define IMFS_SYM_LINK RTEMS_FILESYSTEM_SYM_LINK
-#define IMFS_MEMORY_FILE RTEMS_FILESYSTEM_MEMORY_FILE
-
-#define IMFS_NUMBER_OF_TYPES (IMFS_MEMORY_FILE + 1)
-
-typedef union {
- IMFS_directory_t directory;
- IMFS_device_t device;
- IMFS_link_t hard_link;
- IMFS_sym_link_t sym_link;
- IMFS_memfile_t file;
-} IMFS_types_union;
-
-/*
- * Maximum length of a "basename" of an IMFS file/node.
- */
-
-#define IMFS_NAME_MAX 32
-
-/*
- * The control structure for an IMFS jnode.
- */
-
-struct IMFS_jnode_tt {
- Chain_Node Node; /* for chaining them together */
- IMFS_jnode_t *Parent; /* Parent node */
- char name[IMFS_NAME_MAX+1]; /* "basename" */
- mode_t st_mode; /* File mode */
- nlink_t st_nlink; /* Link count */
- ino_t st_ino; /* inode */
-
- uid_t st_uid; /* User ID of owner */
- gid_t st_gid; /* Group ID of owner */
-
- time_t st_atime; /* Time of last access */
- time_t st_mtime; /* Time of last modification */
- time_t st_ctime; /* Time of last status change */
- IMFS_jnode_types_t type; /* Type of this entry */
- IMFS_types_union info;
-};
-
-#define IMFS_update_atime( _jnode ) \
- do { \
- struct timeval tv; \
- gettimeofday( &tv, 0 ); \
- _jnode->st_atime = (time_t) tv.tv_sec; \
- } while (0)
-
-#define IMFS_update_mtime( _jnode ) \
- do { \
- struct timeval tv; \
- gettimeofday( &tv, 0 ); \
- _jnode->st_mtime = (time_t) tv.tv_sec; \
- } while (0)
-
-#define IMFS_update_ctime( _jnode ) \
- do { \
- struct timeval tv; \
- gettimeofday( &tv, 0 ); \
- _jnode->st_ctime = (time_t) tv.tv_sec; \
- } while (0)
-
-#define IMFS_atime_mtime_update( _jnode ) \
- do { \
- struct timeval tv; \
- gettimeofday( &tv, 0 ); \
- _jnode->st_mtime = (time_t) tv.tv_sec; \
- _jnode->st_atime = (time_t) tv.tv_sec; \
- } while (0)
-
-typedef struct {
- ino_t ino_count;
- rtems_filesystem_file_handlers_r *memfile_handlers;
- rtems_filesystem_file_handlers_r *directory_handlers;
-} IMFS_fs_info_t;
-
-#define increment_and_check_linkcounts( _fs_info ) \
- ((IMFS_fs_info_t * )_fs_info)->link_counts++; \
- if ( ((IMFS_fs_info_t * )_fs_info)->link_counts > MAXSYMLINKS ) \
- set_errno_and_return_minus_one( ELOOP )
-
-#define decrement_linkcounts( _fs_info ) \
- ((IMFS_fs_info_t * )_fs_info)->link_counts--;
-
-/*
- * Type defination for tokens returned from IMFS_get_token
- */
-
-typedef enum {
- IMFS_NO_MORE_PATH,
- IMFS_CURRENT_DIR,
- IMFS_UP_DIR,
- IMFS_NAME,
- IMFS_INVALID_TOKEN
-} IMFS_token_types;
-
-/*
- * Shared Data
- */
-
-extern rtems_filesystem_file_handlers_r IMFS_directory_handlers;
-extern rtems_filesystem_file_handlers_r IMFS_device_handlers;
-extern rtems_filesystem_file_handlers_r IMFS_link_handlers;
-extern rtems_filesystem_file_handlers_r IMFS_memfile_handlers;
-extern rtems_filesystem_operations_table IMFS_ops;
-extern rtems_filesystem_operations_table miniIMFS_ops;
-extern rtems_filesystem_limits_and_options_t IMFS_LIMITS_AND_OPTIONS;
-
-/*
- * Routines
- */
-
-int IMFS_initialize(
- rtems_filesystem_mount_table_entry_t *mt_entry
-);
-
-int miniIMFS_initialize(
- rtems_filesystem_mount_table_entry_t *mt_entry
-);
-
-int IMFS_initialize_support(
- rtems_filesystem_mount_table_entry_t *mt_entry,
- rtems_filesystem_operations_table *op_table,
- rtems_filesystem_file_handlers_r *memfile_handlers,
- rtems_filesystem_file_handlers_r *directory_handlers
-);
-
-int IMFS_fsunmount(
- rtems_filesystem_mount_table_entry_t *mt_entry
-);
-
-
-/*
- * Returns the number of characters copied from path to token.
- */
-IMFS_token_types IMFS_get_token(
- const char *path,
- char *token,
- int *token_len
-);
-
-void IMFS_dump( void );
-
-void IMFS_initialize_jnode(
- IMFS_jnode_t *the_jnode,
- IMFS_jnode_types_t type,
- IMFS_jnode_t *the_parent,
- char *name,
- mode_t mode
-);
-
-IMFS_jnode_t *IMFS_find_match_in_dir(
- IMFS_jnode_t *directory, /* IN */
- char *name /* IN */
-);
-
-rtems_filesystem_node_types_t IMFS_node_type(
- rtems_filesystem_location_info_t *pathloc /* IN */
-);
-
-int IMFS_stat(
- rtems_filesystem_location_info_t *loc, /* IN */
- struct stat *buf /* OUT */
-);
-
-int IMFS_Set_handlers(
- rtems_filesystem_location_info_t *loc
-);
-
-int IMFS_evaluate_link(
- rtems_filesystem_location_info_t *node, /* IN/OUT */
- int flags /* IN */
-);
-
-int IMFS_eval_path(
- const char *pathname, /* IN */
- int flags, /* IN */
- rtems_filesystem_location_info_t *pathloc /* IN/OUT */
-);
-
-
-int IMFS_link(
- rtems_filesystem_location_info_t *to_loc, /* IN */
- rtems_filesystem_location_info_t *parent_loc, /* IN */
- const char *token /* IN */
-);
-
-int IMFS_unlink(
- rtems_filesystem_location_info_t *pathloc /* IN */
-);
-
-int IMFS_chown(
- rtems_filesystem_location_info_t *pathloc, /* IN */
- uid_t owner, /* IN */
- gid_t group /* IN */
-);
-
-int IMFS_freenodinfo(
- rtems_filesystem_location_info_t *pathloc /* IN */
-);
-
-int IMFS_mknod(
- const char *path, /* IN */
- mode_t mode, /* IN */
- dev_t dev, /* IN */
- rtems_filesystem_location_info_t *pathloc /* IN/OUT */
-);
-
-IMFS_jnode_t *IMFS_create_node(
- rtems_filesystem_location_info_t *parent_loc, /* IN */
- IMFS_jnode_types_t type, /* IN */
- char *name, /* IN */
- mode_t mode, /* IN */
- IMFS_types_union *info /* IN */
-);
-
-int IMFS_evaluate_for_make(
- const char *path, /* IN */
- rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
- const char **name /* OUT */
-);
-
-int IMFS_mount(
- rtems_filesystem_mount_table_entry_t *mt_entry /* IN */
-);
-
-int IMFS_unmount(
- rtems_filesystem_mount_table_entry_t *mt_entry /* IN */
-);
-
-int IMFS_freenod(
- rtems_filesystem_location_info_t *node /* IN/OUT */
-);
-
-int IMFS_memfile_remove(
- IMFS_jnode_t *the_jnode /* IN/OUT */
-);
-
-int memfile_ftruncate(
- rtems_libio_t *iop, /* IN */
- off_t length /* IN */
-);
-
-int imfs_dir_open(
- rtems_libio_t *iop, /* IN */
- const char *pathname, /* IN */
- unsigned32 flag, /* IN */
- unsigned32 mode /* IN */
-);
-
-int imfs_dir_close(
- rtems_libio_t *iop /* IN */
-);
-
-int imfs_dir_read(
- rtems_libio_t *iop, /* IN */
- void *buffer, /* IN */
- unsigned32 count /* IN */
-);
-
-int imfs_dir_lseek(
- rtems_libio_t *iop, /* IN */
- off_t offset, /* IN */
- int whence /* IN */
-);
-
-int imfs_dir_fstat(
- rtems_filesystem_location_info_t *loc, /* IN */
- struct stat *buf /* OUT */
-);
-
-int imfs_dir_rmnod(
- rtems_filesystem_location_info_t *pathloc /* IN */
-);
-
-int memfile_open(
- rtems_libio_t *iop, /* IN */
- const char *pathname, /* IN */
- unsigned32 flag, /* IN */
- unsigned32 mode /* IN */
-);
-
-int memfile_close(
- rtems_libio_t *iop /* IN */
-);
-
-int memfile_read(
- rtems_libio_t *iop, /* IN */
- void *buffer, /* IN */
- unsigned32 count /* IN */
-);
-
-int memfile_write(
- rtems_libio_t *iop, /* IN */
- const void *buffer, /* IN */
- unsigned32 count /* IN */
-);
-
-int memfile_ioctl(
- rtems_libio_t *iop, /* IN */
- unsigned32 command, /* IN */
- void *buffer /* IN */
-);
-
-int memfile_lseek(
- rtems_libio_t *iop, /* IN */
- off_t offset, /* IN */
- int whence /* IN */
-);
-
-int memfile_rmnod(
- rtems_filesystem_location_info_t *pathloc /* IN */
-);
-
-int device_open(
- rtems_libio_t *iop, /* IN */
- const char *pathname, /* IN */
- unsigned32 flag, /* IN */
- unsigned32 mode /* IN */
-);
-
-int device_close(
- rtems_libio_t *iop /* IN */
-);
-
-int device_read(
- rtems_libio_t *iop, /* IN */
- void *buffer, /* IN */
- unsigned32 count /* IN */
-);
-
-int device_write(
- rtems_libio_t *iop, /* IN */
- const void *buffer, /* IN */
- unsigned32 count /* IN */
-);
-
-int device_ioctl(
- rtems_libio_t *iop, /* IN */
- unsigned32 command, /* IN */
- void *buffer /* IN */
-);
-
-int device_lseek(
- rtems_libio_t *iop, /* IN */
- off_t offset, /* IN */
- int whence /* IN */
-);
-
-int IMFS_utime(
- rtems_filesystem_location_info_t *pathloc, /* IN */
- time_t actime, /* IN */
- time_t modtime /* IN */
-);
-
-int IMFS_fchmod(
- rtems_filesystem_location_info_t *loc,
- mode_t mode
-);
-
-int IMFS_symlink(
- rtems_filesystem_location_info_t *parent_loc, /* IN */
- const char *link_name,
- const char *node_name
-);
-
-int IMFS_readlink(
- rtems_filesystem_location_info_t *loc, /* IN */
- char *buf, /* OUT */
- size_t bufsize
-);
-
-int IMFS_fdatasync(
- rtems_libio_t *iop
-);
-
-int IMFS_fcntl(
- int cmd,
- rtems_libio_t *iop
-);
-
-int IMFS_rmnod(
- rtems_filesystem_location_info_t *pathloc /* IN */
-);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/c/src/exec/libfs/src/imfs/imfs_chown.c b/c/src/exec/libfs/src/imfs/imfs_chown.c
deleted file mode 100644
index d9e8f40e7f..0000000000
--- a/c/src/exec/libfs/src/imfs/imfs_chown.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * IMFS_chown
- *
- * This routine is the implementation of the chown() system
- * call for the IMFS.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-#include "libio_.h"
-#include "imfs.h"
-
-int IMFS_chown(
- rtems_filesystem_location_info_t *pathloc, /* IN */
- uid_t owner, /* IN */
- gid_t group /* IN */
-)
-{
- IMFS_jnode_t *jnode;
-#if defined(RTEMS_POSIX_API)
- uid_t st_uid;
-#endif
-
- jnode = (IMFS_jnode_t *) pathloc->node_access;
-
- /*
- * Verify I am the owner of the node or the super user.
- */
-
-#if defined(RTEMS_POSIX_API)
- st_uid = geteuid();
-
- if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
- set_errno_and_return_minus_one( EPERM );
-#endif
-
- jnode->st_uid = owner;
- jnode->st_gid = group;
-
- IMFS_update_ctime( jnode );
-
- return 0;
-}
diff --git a/c/src/exec/libfs/src/imfs/imfs_creat.c b/c/src/exec/libfs/src/imfs/imfs_creat.c
deleted file mode 100644
index 227b5f9300..0000000000
--- a/c/src/exec/libfs/src/imfs/imfs_creat.c
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * IMFS_create_node()
- *
- * Routine to create a new in memory file system node.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
-#include "imfs.h"
-#include "libio_.h"
-
-IMFS_jnode_t *IMFS_create_node(
- rtems_filesystem_location_info_t *parent_loc,
- IMFS_jnode_types_t type,
- char *name,
- mode_t mode,
- IMFS_types_union *info
-)
-{
- IMFS_jnode_t *node;
- struct timeval tv;
- IMFS_jnode_t *parent = NULL;
- IMFS_fs_info_t *fs_info;
- char *sym_name;
-
- if ( parent_loc != NULL )
- parent = parent_loc->node_access;
-
- /*
- * Allocate an IMFS jnode
- */
-
- node = calloc( 1, sizeof( IMFS_jnode_t ) );
- if ( !node )
- return NULL;
-
- /*
- * Fill in the basic information
- */
-
- node->st_nlink = 1;
- node->type = type;
- strncpy( node->name, name, IMFS_NAME_MAX );
-
- /*
- * Fill in the mode and permission information for the jnode structure.
- */
-
- node->st_mode = mode & ~rtems_filesystem_umask;
-
-#if defined(RTEMS_POSIX_API)
- node->st_uid = geteuid();
- node->st_gid = getegid();
-#else
- node->st_uid = 0;
- node->st_gid = 0;
-#endif
-
- /*
- * Now set all the times.
- */
-
- gettimeofday( &tv, 0 );
-
- node->st_atime = (time_t) tv.tv_sec;
- node->st_mtime = (time_t) tv.tv_sec;
- node->st_ctime = (time_t) tv.tv_sec;
-
- /*
- * Set the type specific information
- */
-
- switch (type) {
- case IMFS_DIRECTORY:
- Chain_Initialize_empty(&node->info.directory.Entries);
- break;
-
- case IMFS_HARD_LINK:
- node->info.hard_link.link_node = info->hard_link.link_node;
- break;
-
- case IMFS_SYM_LINK:
- sym_name = calloc( 1, strlen( info->sym_link.name ) + 1 );
- strcpy( sym_name, info->sym_link.name );
- node->info.sym_link.name = sym_name;
- break;
-
- case IMFS_DEVICE:
- node->info.device.major = info->device.major;
- node->info.device.minor = info->device.minor;
- break;
-
- case IMFS_MEMORY_FILE:
- node->info.file.size = 0;
- node->info.file.indirect = 0;
- node->info.file.doubly_indirect = 0;
- node->info.file.triply_indirect = 0;
- break;
-
- default:
- assert(0);
- break;
- }
-
- /*
- * If this node has a parent, then put it in that directory list.
- */
-
- if ( parent ) {
- Chain_Append( &parent->info.directory.Entries, &node->Node );
- node->Parent = parent;
-
- fs_info = parent_loc->mt_entry->fs_info;
- node->st_ino = ++fs_info->ino_count;
- }
-
-
- return node;
-}
diff --git a/c/src/exec/libfs/src/imfs/imfs_debug.c b/c/src/exec/libfs/src/imfs/imfs_debug.c
deleted file mode 100644
index f8151c6c0f..0000000000
--- a/c/src/exec/libfs/src/imfs/imfs_debug.c
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * IMFS debug support routines
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <assert.h>
-#include <string.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <unistd.h> /* for close */
-
-#include <stdio.h>
-#include <sys/stat.h>
-
-#include "imfs.h"
-#include "libio_.h"
-
-/*
- * IMFS_types
- *
- * Printable names for each of the IMFS file system types.
- */
-
-char *IMFS_types[ IMFS_NUMBER_OF_TYPES ] = {
- "directory",
- "device",
- "link",
- "memory file"
-};
-
-/*
- * IMFS_print_jnode
- *
- * This routine prints the contents of the specified jnode.
- */
-
-void IMFS_print_jnode(
- IMFS_jnode_t *the_jnode
-)
-{
- assert( the_jnode );
-
- printf( "%s", the_jnode->name );
- switch( the_jnode->type ) {
- case IMFS_DIRECTORY:
- printf( "/" );
- break;
-
- case IMFS_DEVICE:
- printf( " (device %d, %d)",
- the_jnode->info.device.major, the_jnode->info.device.minor );
- break;
-
- case IMFS_MEMORY_FILE:
- printf( " (file %d %p %p %p)",
- (int)the_jnode->info.file.size,
- the_jnode->info.file.indirect,
- the_jnode->info.file.doubly_indirect,
- the_jnode->info.file.triply_indirect
- );
- break;
-
- case IMFS_HARD_LINK:
- printf( " links not printed\n" );
- assert(0);
- break;
-
- case IMFS_SYM_LINK:
- printf( " links not printed\n" );
- assert(0);
- break;
-
- default:
- printf( " bad type %d\n", the_jnode->type );
- assert(0);
- break;
- }
- puts("");
-}
-
-/*
- * IMFS_dump_directory
- *
- * This routine prints the contents of a directory in the IMFS. If a
- * directory is encountered, then this routine will recurse to process
- * the subdirectory.
- */
-
-void IMFS_dump_directory(
- IMFS_jnode_t *the_directory,
- int level
-)
-{
- Chain_Node *the_node;
- Chain_Control *the_chain;
- IMFS_jnode_t *the_jnode;
- int i;
-
- assert( the_directory );
-
- assert( level >= 0 );
-
- assert( the_directory->type == IMFS_DIRECTORY );
-
- the_chain = &the_directory->info.directory.Entries;
-
- for ( the_node = the_chain->first;
- !_Chain_Is_tail( the_chain, the_node );
- the_node = the_node->next ) {
-
- the_jnode = (IMFS_jnode_t *) the_node;
-
- for ( i=0 ; i<=level ; i++ )
- printf( "...." );
- IMFS_print_jnode( the_jnode );
- if ( the_jnode->type == IMFS_DIRECTORY )
- IMFS_dump_directory( the_jnode, level + 1 );
- }
-}
-
-/*
- * IMFS_dump
- *
- * This routine dumps the entire IMFS that is mounted at the root
- * directory.
- *
- * NOTE: Assuming the "/" directory is bad.
- * Not checking that the starting directory is in an IMFS is bad.
- */
-
-void IMFS_dump( void )
-{
- printf( "*************** Dump of Entire IMFS ***************\n" );
- printf( "/\n" );
- IMFS_dump_directory( rtems_filesystem_root.node_access, 0 );
- printf( "*************** End of Dump ***************\n" );
-}
-
-/*
- * IMFS_memfile_maximum_size()
- *
- * This routine returns the size of the largest file which can be created
- * using the IMFS memory file type.
- *
- */
-
-int IMFS_memfile_maximum_size( void )
-{
- return IMFS_MEMFILE_MAXIMUM_SIZE;
-}
diff --git a/c/src/exec/libfs/src/imfs/imfs_directory.c b/c/src/exec/libfs/src/imfs/imfs_directory.c
deleted file mode 100644
index 1f6d9b5ff5..0000000000
--- a/c/src/exec/libfs/src/imfs/imfs_directory.c
+++ /dev/null
@@ -1,347 +0,0 @@
-/*
- * XXX
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <chain.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-#include <dirent.h>
-
-#include "imfs.h"
-#include "libio_.h"
-
-/* -----------------------------------------------------------------------
- * This rountine will verify that the node being opened as a directory is
- * in fact a directory node. If it is then the offset into the directory
- * will be set to 0 to position to the first directory entry.
- */
-
-int imfs_dir_open(
- rtems_libio_t *iop,
- const char *pathname,
- unsigned32 flag,
- unsigned32 mode
-)
-{
- IMFS_jnode_t *the_jnode;
-
- /* Is the node a directory ? */
- the_jnode = (IMFS_jnode_t *) iop->file_info;
-
- if ( the_jnode->type != IMFS_DIRECTORY )
- return -1; /* It wasn't a directory --> return error */
-
- iop->offset = 0;
- return 0;
-}
-
-
-
-/* -----------------------------------------------------------------------
- * This routine will read the next directory entry based on the directory
- * offset. The offset should be equal to -n- time the size of an individual
- * dirent structure. If n is not an integer multiple of the sizeof a
- * dirent structure, an integer division will be performed to determine
- * directory entry that will be returned in the buffer. Count should reflect
- * -m- times the sizeof dirent bytes to be placed in the buffer.
- * If there are not -m- dirent elements from the current directory position
- * to the end of the exisiting file, the remaining entries will be placed in
- * the buffer and the returned value will be equal to -m actual- times the
- * size of a directory entry.
- */
-
-int imfs_dir_read(
- rtems_libio_t *iop,
- void *buffer,
- unsigned32 count
-)
-{
- /*
- * Read up to element iop->offset in the directory chain of the
- * imfs_jnode_t struct for this file descriptor.
- */
- Chain_Node *the_node;
- Chain_Control *the_chain;
- IMFS_jnode_t *the_jnode;
- int bytes_transferred;
- int current_entry;
- int first_entry;
- int last_entry;
- struct dirent tmp_dirent;
-
- the_jnode = (IMFS_jnode_t *)iop->file_info;
- the_chain = &the_jnode->info.directory.Entries;
-
- if ( Chain_Is_empty( the_chain ) )
- return 0;
-
- /* Move to the first of the desired directory entries */
- the_node = the_chain->first;
-
- bytes_transferred = 0;
- first_entry = iop->offset;
- /* protect against using sizes that are not exact multiples of the */
- /* -dirent- size. These could result in unexpected results */
- last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent);
-
- /* The directory was not empty so try to move to the desired entry in chain*/
- for(
- current_entry = 0;
- current_entry < last_entry;
- current_entry = current_entry + sizeof(struct dirent) ){
-
- if ( Chain_Is_tail( the_chain, the_node ) ){
- /* We hit the tail of the chain while trying to move to the first */
- /* entry in the read */
- return bytes_transferred; /* Indicate that there are no more */
- /* entries to return */
- }
-
- if( current_entry >= first_entry ) {
- /* Move the entry to the return buffer */
- tmp_dirent.d_ino = 1;
- tmp_dirent.d_off = current_entry;
- tmp_dirent.d_reclen = sizeof( struct dirent );
- the_jnode = (IMFS_jnode_t *) the_node;
- tmp_dirent.d_namlen = strlen( the_jnode->name );
- strcpy( tmp_dirent.d_name, the_jnode->name );
- memcpy(
- buffer + bytes_transferred,
- (void *)&tmp_dirent,
- sizeof( struct dirent )
- );
- iop->offset = iop->offset + sizeof(struct dirent);
- bytes_transferred = bytes_transferred + sizeof( struct dirent );
- }
-
- the_node = the_node->next;
- }
-
- /* Success */
- return bytes_transferred;
-}
-
-
-
-/* -----------------------------------------------------------------------
- * This routine will be called by the generic close routine to cleanup any
- * resources that have been allocated for the management of the file
- */
-
-int imfs_dir_close(
- rtems_libio_t *iop
-)
-{
- /* The generic close routine handles the deallocation of the file control */
- /* and associated memory. At present the imfs_dir_close simply */
- /* returns a successful completion status */
-
- return 0;
-}
-
-
-
-/* -----------------------------------------------------------------------
- * This routine will behave in one of three ways based on the state of
- * argument whence. Based on the state of its value the offset argument will
- * be interpreted using one of the following methods:
- *
- * SEEK_SET - offset is the absolute byte offset from the start of the
- * logical start of the dirent sequence that represents the
- * directory
- * SEEK_CUR - offset is used as the relative byte offset from the current
- * directory position index held in the iop structure
- * SEEK_END - N/A --> This will cause an assert.
- */
-
-int imfs_dir_lseek(
- rtems_libio_t *iop,
- off_t offset,
- int whence
-)
-{
- off_t normal_offset;
-
- normal_offset = (offset/sizeof(struct dirent)) * sizeof(struct dirent);
-
-
- switch( whence )
- {
- case SEEK_SET: /* absolute move from the start of the file */
- iop->offset = normal_offset;
- break;
-
- case SEEK_CUR: /* relative move */
- iop->offset = iop->offset + normal_offset;
- break;
-
- case SEEK_END: /* Movement past the end of the directory via lseek */
- /* is not a permitted operation */
- default:
- set_errno_and_return_minus_one( EINVAL );
- break;
-
- }
-
- return 0;
-}
-
-
-
-/* -----------------------------------------------------------------------
- * This routine will obtain the following information concerning the current
- * directory:
- * st_dev 0ll
- * st_ino 1
- * st_mode mode extracted from the jnode
- * st_nlink number of links to this node
- * st_uid uid extracted from the jnode
- * st_gid gid extracted from the jnode
- * st_rdev 0ll
- * st_size the number of bytes in the directory
- * This is calculated by taking the number of entries
- * in the directory and multiplying by the size of a
- * dirent structure
- * st_blksize 0
- * st_blocks 0
- * st_atime time of last access
- * st_mtime time of last modification
- * st_ctime time of the last change
- *
- * This information will be returned to the calling function in a -stat- struct
- *
- */
-
-int imfs_dir_fstat(
- rtems_filesystem_location_info_t *loc,
- struct stat *buf
-)
-{
- Chain_Node *the_node;
- Chain_Control *the_chain;
- IMFS_jnode_t *the_jnode;
-
-
- the_jnode = (IMFS_jnode_t *) loc->node_access;
-
- buf->st_dev = 0ll;
- buf->st_ino = the_jnode->st_ino;
- buf->st_mode = the_jnode->st_mode;
- buf->st_nlink = the_jnode->st_nlink;
- buf->st_uid = the_jnode->st_uid;
- buf->st_gid = the_jnode->st_gid;
- buf->st_rdev = 0ll;
- buf->st_blksize = 0;
- buf->st_blocks = 0;
- buf->st_atime = the_jnode->st_atime;
- buf->st_mtime = the_jnode->st_mtime;
- buf->st_ctime = the_jnode->st_ctime;
-
- buf->st_size = 0;
-
- the_chain = &the_jnode->info.directory.Entries;
-
- /* Run through the chain and count the number of directory entries */
- /* that are subordinate to this directory node */
- for ( the_node = the_chain->first ;
- !_Chain_Is_tail( the_chain, the_node ) ;
- the_node = the_node->next ) {
-
- buf->st_size = buf->st_size + sizeof( struct dirent );
- }
-
- return 0;
-}
-
-/*
- * IMFS_dir_rmnod
- *
- * This routine is available from the optable to remove a node
- * from the IMFS file system.
- */
-
-int imfs_dir_rmnod(
- rtems_filesystem_location_info_t *pathloc /* IN */
-)
-{
- IMFS_jnode_t *the_jnode;
-
- the_jnode = (IMFS_jnode_t *) pathloc->node_access;
-
- /*
- * You cannot remove a node that still has children
- */
-
- if ( ! Chain_Is_empty( &the_jnode->info.directory.Entries ) )
- set_errno_and_return_minus_one( ENOTEMPTY );
-
- /*
- * You cannot remove the file system root node.
- */
-
- if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access )
- set_errno_and_return_minus_one( EBUSY );
-
- /*
- * You cannot remove a mountpoint.
- */
-
- if ( the_jnode->info.directory.mt_fs != NULL )
- set_errno_and_return_minus_one( EBUSY );
-
- /*
- * Take the node out of the parent's chain that contains this node
- */
-
- if ( the_jnode->Parent != NULL ) {
- Chain_Extract( (Chain_Node *) the_jnode );
- the_jnode->Parent = NULL;
- }
-
- /*
- * Decrement the link counter and see if we can free the space.
- */
-
- the_jnode->st_nlink--;
- IMFS_update_ctime( the_jnode );
-
- /*
- * The file cannot be open and the link must be less than 1 to free.
- */
-
- if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) {
-
- /*
- * Is the rtems_filesystem_current is this node?
- */
-
- if ( rtems_filesystem_current.node_access == pathloc->node_access )
- rtems_filesystem_current.node_access = NULL;
-
- /*
- * Free memory associated with a memory file.
- */
-
- free( the_jnode );
- }
-
- return 0;
-
-}
-
-
diff --git a/c/src/exec/libfs/src/imfs/imfs_eval.c b/c/src/exec/libfs/src/imfs/imfs_eval.c
deleted file mode 100644
index 1f1e7c6daf..0000000000
--- a/c/src/exec/libfs/src/imfs/imfs_eval.c
+++ /dev/null
@@ -1,639 +0,0 @@
-/*
- * Evaluation IMFS Node Support Routines
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <assert.h>
-
-#include "imfs.h"
-#include "libio_.h"
-
-#define RTEMS_LIBIO_PERMS_RX (RTEMS_LIBIO_PERMS_SEARCH | RTEMS_LIBIO_PERMS_READ)
-#define RTEMS_LIBIO_PERMS_WX (RTEMS_LIBIO_PERMS_SEARCH | RTEMS_LIBIO_PERMS_WRITE)
-
-#define MAXSYMLINK 5
-
-int IMFS_Set_handlers(
- rtems_filesystem_location_info_t *loc
-)
-{
- IMFS_jnode_t *node = loc->node_access;
- IMFS_fs_info_t *fs_info;
-
- fs_info = loc->mt_entry->fs_info;
- switch( node->type ) {
- case IMFS_DIRECTORY:
- loc->handlers = fs_info->directory_handlers;
- break;
- case IMFS_DEVICE:
- loc->handlers = &IMFS_device_handlers;
- break;
- case IMFS_SYM_LINK:
- case IMFS_HARD_LINK:
- loc->handlers = &IMFS_link_handlers;
- break;
- case IMFS_MEMORY_FILE:
- loc->handlers = fs_info->memfile_handlers;
- break;
- }
-
- return 0;
-}
-
-/*
- * IMFS_evaluate_permission
- *
- * The following routine evaluates that we have permission
- * to do flags on the node.
- */
-
-int IMFS_evaluate_permission(
- rtems_filesystem_location_info_t *node,
- int flags
-)
-{
- uid_t st_uid;
- gid_t st_gid;
- IMFS_jnode_t *jnode;
- int flags_to_test;
-
- if ( !rtems_libio_is_valid_perms( flags ) ) {
- assert( 0 );
- set_errno_and_return_minus_one( EIO );
- }
-
- jnode = node->node_access;
-
-#if defined(RTEMS_POSIX_API)
- st_uid = geteuid();
- st_gid = getegid();
-#else
- st_uid = jnode->st_uid;
- st_gid = jnode->st_gid;
-#endif
-
- /*
- * Check if I am owner or a group member or someone else.
- */
-
- flags_to_test = flags;
-
- if ( st_uid == jnode->st_uid )
- flags_to_test <<= 6;
- else if ( st_gid == jnode->st_gid )
- flags_to_test <<= 3;
- else
- /* must be other - do nothing */;
-
- /*
- * If all of the flags are set we have permission
- * to do this.
- */
- if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
- return 1;
-
- return 0;
-}
-
-/*
- * IMFS_evaluate_hard_link
- *
- * The following routine evaluates a hardlink to the actual node.
- */
-
-int IMFS_evaluate_hard_link(
- rtems_filesystem_location_info_t *node, /* IN/OUT */
- int flags /* IN */
-)
-{
- IMFS_jnode_t *jnode = node->node_access;
- int result = 0;
-
- /*
- * Check for things that should never happen.
- */
-
- if ( jnode->type != IMFS_HARD_LINK )
- rtems_fatal_error_occurred (0xABCD0000);
-
- /*
- * Set the hard link value and the handlers.
- */
-
- node->node_access = jnode->info.hard_link.link_node;
-
- IMFS_Set_handlers( node );
-
- /*
- * Verify we have the correct permissions for this node.
- */
-
- if ( !IMFS_evaluate_permission( node, flags ) )
- set_errno_and_return_minus_one( EACCES );
-
- return result;
-}
-
-
-/*
- * IMFS_evaluate_sym_link
- *
- * The following routine evaluates a symbolic link to the actual node.
- */
-
-int IMFS_evaluate_sym_link(
- rtems_filesystem_location_info_t *node, /* IN/OUT */
- int flags /* IN */
-)
-{
- IMFS_jnode_t *jnode = node->node_access;
- int result = 0;
- int i;
-
- /*
- * Check for things that should never happen.
- */
-
- if ( jnode->type != IMFS_SYM_LINK )
- rtems_fatal_error_occurred (0xABCD0000);
-
- if ( !jnode->Parent )
- rtems_fatal_error_occurred( 0xBAD00000 );
-
-
- /*
- * Move the node_access to either the symbolic links parent or
- * root depending on the symbolic links path.
- */
-
- node->node_access = jnode->Parent;
-
- rtems_filesystem_get_sym_start_loc(
- jnode->info.sym_link.name,
- &i,
- node
- );
-
- /*
- * Use eval path to evaluate the path of the symbolic link.
- */
-
- result = IMFS_eval_path(
- &jnode->info.sym_link.name[i],
- flags,
- node
- );
-
- IMFS_Set_handlers( node );
-
- /*
- * Verify we have the correct permissions for this node.
- */
-
- if ( !IMFS_evaluate_permission( node, flags ) )
- set_errno_and_return_minus_one( EACCES );
-
- return result;
-}
-
-/*
- * IMFS_evaluate_link
- *
- * The following routine returns the real node pointed to by a link.
- */
-
-int IMFS_evaluate_link(
- rtems_filesystem_location_info_t *node, /* IN/OUT */
- int flags /* IN */
-)
-{
- IMFS_jnode_t *jnode;
- int result = 0;
-
- do {
- jnode = node->node_access;
-
- /*
- * Increment and check the link counter.
- */
-
- rtems_filesystem_link_counts ++;
- if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
- rtems_filesystem_link_counts = 0;
- set_errno_and_return_minus_one( ELOOP );
- }
-
- /*
- * Follow the Link node.
- */
-
- if ( jnode->type == IMFS_HARD_LINK )
- result = IMFS_evaluate_hard_link( node, flags );
-
- else if (jnode->type == IMFS_SYM_LINK )
- result = IMFS_evaluate_sym_link( node, flags );
-
- } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
- ( jnode->type == IMFS_HARD_LINK ) ) );
-
- /*
- * Clear link counter.
- */
-
- rtems_filesystem_link_counts = 0;
-
- return result;
-}
-
-
-/*
- * IMFS_evaluate_for_make
- *
- * The following routine evaluate path for a new node to be created.
- * pathloc is returned with a pointer to the parent of the new node.
- * name is returned with a pointer to the first character in the
- * new node name. The parent node is verified to be a directory.
- */
-
-int IMFS_evaluate_for_make(
- const char *path, /* IN */
- rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
- const char **name /* OUT */
-)
-{
- int i = 0;
- int len;
- IMFS_token_types type;
- char token[ IMFS_NAME_MAX + 1 ];
- rtems_filesystem_location_info_t newloc;
- IMFS_jnode_t *node;
- int done = 0;
- int result;
-
- /*
- * This was filled in by the caller and is valid in the
- * mount table.
- */
- node = pathloc->node_access;
-
- /*
- * Evaluate all tokens until we are done or an error occurs.
- */
-
- while( !done ) {
-
- type = IMFS_get_token( &path[i], token, &len );
- i += len;
-
- if ( !pathloc->node_access )
- set_errno_and_return_minus_one( ENOENT );
-
- /*
- * I cannot move out of this directory without execute permission.
- */
-
- if ( type != IMFS_NO_MORE_PATH )
- if ( node->type == IMFS_DIRECTORY )
- if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
- set_errno_and_return_minus_one( EACCES );
-
- node = pathloc->node_access;
-
- switch( type ) {
-
- case IMFS_UP_DIR:
-
- /*
- * Am I at the root of this mounted filesystem?
- */
-
- if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){
-
- /*
- * Am I at the root of all filesystems?
- */
-
- if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
- break;
-
- } else {
- newloc = pathloc->mt_entry->mt_point_node;
- *pathloc = newloc;
- return (*pathloc->ops->evalformake)( &path[i-len], pathloc, name );
- }
- } else {
-
- if ( !node->Parent )
- set_errno_and_return_minus_one( ENOENT );
-
- node = node->Parent;
- }
-
- pathloc->node_access = node;
- break;
-
- case IMFS_NAME:
-
- if ( node->type == IMFS_HARD_LINK ) {
-
- result = IMFS_evaluate_link( pathloc, 0 );
- if ( result == -1 )
- return -1;
-
- } else if ( node->type == IMFS_SYM_LINK ) {
-
- result = IMFS_evaluate_link( pathloc, 0 );
-
- if ( result == -1 )
- return -1;
- }
-
- node = pathloc->node_access;
- if ( !node )
- set_errno_and_return_minus_one( ENOTDIR );
-
- /*
- * Only a directory can be decended into.
- */
-
- if ( node->type != IMFS_DIRECTORY )
- set_errno_and_return_minus_one( ENOTDIR );
-
- /*
- * If we are at a node that is a mount point. Set loc to the
- * new fs root node and let them finish evaluating the path.
- */
-
- if ( node->info.directory.mt_fs != NULL ) {
- newloc = node->info.directory.mt_fs->mt_fs_root;
- *pathloc = newloc;
- return (*pathloc->ops->evalformake)( &path[i-len], pathloc, name );
- }
-
- /*
- * Otherwise find the token name in the present location.
- */
-
- node = IMFS_find_match_in_dir( node, token );
-
- /*
- * If there is no node we have found the name of the node we
- * wish to create.
- */
-
- if ( ! node )
- done = TRUE;
- else
- pathloc->node_access = node;
-
- break;
-
- case IMFS_NO_MORE_PATH:
- set_errno_and_return_minus_one( EEXIST );
- break;
-
- case IMFS_INVALID_TOKEN:
- set_errno_and_return_minus_one( ENAMETOOLONG );
- break;
-
- case IMFS_CURRENT_DIR:
- break;
- }
- }
-
- *name = &path[ i - len ];
-
- /*
- * We have evaluated the path as far as we can.
- * Verify there is not any invalid stuff at the end of the name.
- */
-
- for( ; path[i] != '\0'; i++) {
- if ( !IMFS_is_separator( path[ i ] ) )
- set_errno_and_return_minus_one( ENOENT );
- }
-
- /*
- * Verify we can execute and write to this directory.
- */
-
- result = IMFS_Set_handlers( pathloc );
-
- /*
- * The returned node must be a directory
- */
- node = pathloc->node_access;
- if ( node->type != IMFS_DIRECTORY )
- set_errno_and_return_minus_one( ENOTDIR );
-
- /*
- * We must have Write and execute permission on the returned node.
- */
-
- if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
- set_errno_and_return_minus_one( EACCES );
-
- return result;
-}
-
-
-/*
- * IMFS_eval_path
- *
- * The following routine evaluate path for a node that wishes to be
- * accessed with mode. pathloc is returned with a pointer to the
- * node to be accessed.
- */
-
-int IMFS_eval_path(
- const char *pathname, /* IN */
- int flags, /* IN */
- rtems_filesystem_location_info_t *pathloc /* IN/OUT */
-)
-{
- int i = 0;
- int len;
- IMFS_token_types type = IMFS_CURRENT_DIR;
- char token[ IMFS_NAME_MAX + 1 ];
- rtems_filesystem_location_info_t newloc;
- IMFS_jnode_t *node;
- int result;
-
- if ( !rtems_libio_is_valid_perms( flags ) ) {
- assert( 0 );
- set_errno_and_return_minus_one( EIO );
- }
-
- /*
- * This was filled in by the caller and is valid in the
- * mount table.
- */
-
- node = pathloc->node_access;
-
- /*
- * Evaluate all tokens until we are done or an error occurs.
- */
-
- while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
-
- type = IMFS_get_token( &pathname[i], token, &len );
- i += len;
-
- if ( !pathloc->node_access )
- set_errno_and_return_minus_one( ENOENT );
-
- /*
- * I cannot move out of this directory without execute permission.
- */
- if ( type != IMFS_NO_MORE_PATH )
- if ( node->type == IMFS_DIRECTORY )
- if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
- set_errno_and_return_minus_one( EACCES );
-
- node = pathloc->node_access;
-
- switch( type ) {
- case IMFS_UP_DIR:
-
- /*
- * Am I at the root of this mounted filesystem?
- */
-
- if (pathloc->node_access ==
- pathloc->mt_entry->mt_fs_root.node_access) {
-
- /*
- * Am I at the root of all filesystems?
- */
-
- if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
- break; /* Throw out the .. in this case */
- } else {
- newloc = pathloc->mt_entry->mt_point_node;
- *pathloc = newloc;
- return (*pathloc->ops->evalpath)(&(pathname[i-len]),flags,pathloc);
- }
- } else {
-
- if ( !node->Parent )
- set_errno_and_return_minus_one( ENOENT );
-
- node = node->Parent;
- pathloc->node_access = node;
-
- }
-
- pathloc->node_access = node;
- break;
-
- case IMFS_NAME:
- /*
- * If we are at a link follow it.
- */
-
- if ( node->type == IMFS_HARD_LINK ) {
-
- IMFS_evaluate_hard_link( pathloc, 0 );
-
- node = pathloc->node_access;
- if ( !node )
- set_errno_and_return_minus_one( ENOTDIR );
-
- } else if ( node->type == IMFS_SYM_LINK ) {
-
- result = IMFS_evaluate_sym_link( pathloc, 0 );
-
- node = pathloc->node_access;
- if ( result == -1 )
- return -1;
- }
-
- /*
- * Only a directory can be decended into.
- */
-
- if ( node->type != IMFS_DIRECTORY )
- set_errno_and_return_minus_one( ENOTDIR );
-
- /*
- * If we are at a node that is a mount point. Set loc to the
- * new fs root node and let them finish evaluating the path.
- */
-
- if ( node->info.directory.mt_fs != NULL ) {
- newloc = node->info.directory.mt_fs->mt_fs_root;
- *pathloc = newloc;
- return (*pathloc->ops->evalpath)( &pathname[i-len], flags, pathloc );
- }
-
- /*
- * Otherwise find the token name in the present location.
- */
-
- node = IMFS_find_match_in_dir( node, token );
- if ( !node )
- set_errno_and_return_minus_one( ENOENT );
-
- /*
- * Set the node access to the point we have found.
- */
-
- pathloc->node_access = node;
- break;
-
- case IMFS_NO_MORE_PATH:
- case IMFS_CURRENT_DIR:
- break;
-
- case IMFS_INVALID_TOKEN:
- set_errno_and_return_minus_one( ENAMETOOLONG );
- break;
-
- }
- }
-
- /*
- * Only return root node if this is the base file system.
- */
-
- if ((pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) &&
- (pathloc->node_access != rtems_filesystem_root.node_access) ) {
- newloc = pathloc->mt_entry->mt_point_node;
- *pathloc = newloc;
- }
-
- result = IMFS_Set_handlers( pathloc );
-
- /*
- * Verify we have the correct permissions for this node.
- */
-
- if ( !IMFS_evaluate_permission( pathloc, flags ) )
- set_errno_and_return_minus_one( EACCES );
-
- return result;
-}
-
-
-
-
-
-
-
-
-
diff --git a/c/src/exec/libfs/src/imfs/imfs_fchmod.c b/c/src/exec/libfs/src/imfs/imfs_fchmod.c
deleted file mode 100644
index b766ed74dc..0000000000
--- a/c/src/exec/libfs/src/imfs/imfs_fchmod.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * IMFS file change mode routine.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-
-#include "libio_.h"
-#include "imfs.h"
-
-int IMFS_fchmod(
- rtems_filesystem_location_info_t *loc,
- mode_t mode
-)
-{
- IMFS_jnode_t *jnode;
-#if defined(RTEMS_POSIX_API)
- uid_t st_uid;
-#endif
-
- jnode = loc->node_access;
-
- /*
- * Verify I am the owner of the node or the super user.
- */
-#if defined(RTEMS_POSIX_API)
- st_uid = geteuid();
-
- if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
- set_errno_and_return_minus_one( EPERM );
-#endif
-
- /*
- * Change only the RWX permissions on the jnode to mode.
- */
- if ( mode & (~ (S_IRWXU | S_IRWXG | S_IRWXO ) ) )
- set_errno_and_return_minus_one( EPERM );
-
- jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO);
- jnode->st_mode |= mode;
-
- IMFS_update_ctime( jnode );
-
- return 0;
-}
-
diff --git a/c/src/exec/libfs/src/imfs/imfs_fcntl.c b/c/src/exec/libfs/src/imfs/imfs_fcntl.c
deleted file mode 100644
index c1014a8653..0000000000
--- a/c/src/exec/libfs/src/imfs/imfs_fcntl.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * IMFS_fcntl
- *
- * The following routine does a fcntl on an IMFS node.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "imfs.h"
-
-int IMFS_fcntl(
- int cmd,
- rtems_libio_t *iop
-)
-{
- return 0;
-}
diff --git a/c/src/exec/libfs/src/imfs/imfs_fdatasync.c b/c/src/exec/libfs/src/imfs/imfs_fdatasync.c
deleted file mode 100644
index 6142cc7e0f..0000000000
--- a/c/src/exec/libfs/src/imfs/imfs_fdatasync.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * IMFS_fdatasync
- *
- * The following routine does a sync on an IMFS node. The In Memory
- * File System is always in sync, therefore this routine always returns
- * pass.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "imfs.h"
-
-int IMFS_fdatasync(
- rtems_libio_t *iop
-)
-{
- return 0;
-}
diff --git a/c/src/exec/libfs/src/imfs/imfs_free.c b/c/src/exec/libfs/src/imfs/imfs_free.c
deleted file mode 100644
index 2a5065068c..0000000000
--- a/c/src/exec/libfs/src/imfs/imfs_free.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Free IMFS Node Support Routines
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-
-#include "libio_.h"
-#include "imfs.h"
-
-/*
- * IMFS_freenodinfo
- *
- * This routine is the IMFS free node handler for the file system
- * operations table.
- *
- * The In Memory File System keeps its nodes in memory. This routine
- * is for file sytems that do not.
- */
-
-int IMFS_freenodinfo(
- rtems_filesystem_location_info_t *pathloc /* IN */
-)
-{
- return 0;
-}
-
diff --git a/c/src/exec/libfs/src/imfs/imfs_fsunmount.c b/c/src/exec/libfs/src/imfs/imfs_fsunmount.c
deleted file mode 100644
index 1ae71ee075..0000000000
--- a/c/src/exec/libfs/src/imfs/imfs_fsunmount.c
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * IMFS Initialization
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h> /* for mkdir */
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdlib.h>
-
-#include <assert.h>
-
-#include "imfs.h"
-#include "libio_.h"
-
-#if defined(IMFS_DEBUG)
-#include <stdio.h>
-#endif
-
-/*
- * IMFS_fsunmount
- */
-
-#define jnode_get_control( jnode ) \
- (&jnode->info.directory.Entries)
-
-#define jnode_has_no_children( jnode ) \
- Chain_Is_empty( jnode_get_control( jnode ) )
-
-#define jnode_has_children( jnode ) \
- ( ! jnode_has_no_children( jnode ) )
-
-#define jnode_get_first_child( jnode ) \
- ((IMFS_jnode_t *)( Chain_Head( jnode_get_control( jnode ) )->next))
-
-int IMFS_fsunmount(
- rtems_filesystem_mount_table_entry_t *temp_mt_entry
-)
-{
- IMFS_jnode_t *jnode;
- IMFS_jnode_t *next;
- rtems_filesystem_location_info_t loc;
- int result = 0;
-
- /*
- * Traverse tree that starts at the mt_fs_root and deallocate memory
- * associated memory space
- */
-
- jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access;
- loc = temp_mt_entry->mt_fs_root;
-
- /*
- * Set this to null to indicate that it is being unmounted.
- */
-
- temp_mt_entry->mt_fs_root.node_access = NULL;
-
- do {
- next = jnode->Parent;
- loc.node_access = (void *)jnode;
- IMFS_Set_handlers( &loc );
-
- if ( jnode->type != IMFS_DIRECTORY ) {
- result = IMFS_unlink( &loc );
- if (result != 0)
- return -1;
- jnode = next;
- } else if ( jnode_has_no_children( jnode ) ) {
- result = IMFS_unlink( &loc );
- if (result != 0)
- return -1;
- jnode = next;
- }
- if ( jnode != NULL ) {
- if ( jnode->type == IMFS_DIRECTORY ) {
- if ( jnode_has_children( jnode ) )
- jnode = jnode_get_first_child( jnode );
- }
- }
- } while (jnode != NULL);
-
- return 0;
-}
-
-
-
-
diff --git a/c/src/exec/libfs/src/imfs/imfs_getchild.c b/c/src/exec/libfs/src/imfs/imfs_getchild.c
deleted file mode 100644
index f70a8f292c..0000000000
--- a/c/src/exec/libfs/src/imfs/imfs_getchild.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * IMFS_find_match_in_dir()
- *
- * This routine returns the child name in the given directory.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-#include <assert.h>
-#include "imfs.h"
-
-static char dotname[2] = ".";
-static char dotdotname[2] = "..";
-
-IMFS_jnode_t *IMFS_find_match_in_dir(
- IMFS_jnode_t *directory,
- char *name
-)
-{
- Chain_Node *the_node;
- Chain_Control *the_chain;
- IMFS_jnode_t *the_jnode;
-
- /*
- * Check for fatal errors. A NULL directory show a problem in the
- * the IMFS code.
- */
-
- assert( directory );
- if ( !name )
- return 0;
-
- assert( name );
- if ( !directory )
- return 0;
-
- /*
- * Check for "." and ".."
- */
-
- if ( !strcmp( name, dotname ) )
- return directory;
-
- if ( !strcmp( name, dotdotname ) )
- return directory->Parent;
-
- the_chain = &directory->info.directory.Entries;
-
- for ( the_node = the_chain->first;
- !_Chain_Is_tail( the_chain, the_node );
- the_node = the_node->next ) {
-
- the_jnode = (IMFS_jnode_t *) the_node;
-
- if ( !strcmp( name, the_jnode->name ) )
- return the_jnode;
- }
-
- return 0;
-}
diff --git a/c/src/exec/libfs/src/imfs/imfs_gtkn.c b/c/src/exec/libfs/src/imfs/imfs_gtkn.c
deleted file mode 100644
index 3fd6f8deae..0000000000
--- a/c/src/exec/libfs/src/imfs/imfs_gtkn.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * IMFS_get_token
- *
- * Routine to get a token (name or separator) from the path
- * the length of the token is returned in token_len.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <stdlib.h>
-#include "imfs.h"
-#include "libio_.h"
-
-IMFS_token_types IMFS_get_token(
- const char *path,
- char *token,
- int *token_len
-)
-{
- register int i = 0;
- IMFS_token_types type = IMFS_NAME;
- register char c;
-
- /*
- * Copy a name into token. (Remember NULL is a token.)
- */
- c = path[i];
- while ( (!IMFS_is_separator(c)) && (i <= IMFS_NAME_MAX) ) {
-
- token[i] = c;
-
- if ( i == IMFS_NAME_MAX )
- return IMFS_INVALID_TOKEN;
-
- if ( !IMFS_is_valid_name_char(c) )
- type = IMFS_INVALID_TOKEN;
-
- c = path [++i];
- }
-
- /*
- * Copy a seperator into token.
- */
-
- if ( i == 0 ) {
- token[i] = c;
-
- if ( token[i] != '\0' ) {
- i++;
- type = IMFS_CURRENT_DIR;
- } else {
- type = IMFS_NO_MORE_PATH;
- }
- } else if (token[ i-1 ] != '\0') {
- token[i] = '\0';
- }
-
- /*
- * Set token_len to the number of characters copied.
- */
-
- *token_len = i;
-
- /*
- * If we copied something that was not a seperator see if
- * it was a special name.
- */
-
- if ( type == IMFS_NAME ) {
- if ( strcmp( token, "..") == 0 )
- type = IMFS_UP_DIR;
- else if ( strcmp( token, "." ) == 0 )
- type = IMFS_CURRENT_DIR;
- }
-
- return type;
-}
diff --git a/c/src/exec/libfs/src/imfs/imfs_handlers_device.c b/c/src/exec/libfs/src/imfs/imfs_handlers_device.c
deleted file mode 100644
index 4431819a94..0000000000
--- a/c/src/exec/libfs/src/imfs/imfs_handlers_device.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Device Operations Table for the IMFS
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-
-#include "imfs.h"
-
-/*
- * Handler table for IMFS device nodes
- */
-
-rtems_filesystem_file_handlers_r IMFS_device_handlers = {
- device_open,
- device_close,
- device_read,
- device_write,
- device_ioctl,
- device_lseek,
- IMFS_stat,
- IMFS_fchmod,
- NULL, /* ftruncate */
- NULL, /* fpathconf */
- NULL, /* fsync */
- NULL, /* fdatasync */
- NULL, /* fcntl */
- IMFS_rmnod
-};
diff --git a/c/src/exec/libfs/src/imfs/imfs_handlers_directory.c b/c/src/exec/libfs/src/imfs/imfs_handlers_directory.c
deleted file mode 100644
index 21370c194d..0000000000
--- a/c/src/exec/libfs/src/imfs/imfs_handlers_directory.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Operations Table for Directories for the IMFS
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-
-#include "imfs.h"
-
-/*
- * Set of operations handlers for operations on directories.
- */
-
-rtems_filesystem_file_handlers_r IMFS_directory_handlers = {
- imfs_dir_open,
- imfs_dir_close,
- imfs_dir_read,
- NULL, /* write */
- NULL, /* ioctl */
- imfs_dir_lseek,
- imfs_dir_fstat,
- IMFS_fchmod,
- NULL, /* ftruncate */
- NULL, /* fpathconf */
- NULL, /* fsync */
- IMFS_fdatasync,
- IMFS_fcntl,
- imfs_dir_rmnod
-};
-
-
-
-
-
-
-
-
diff --git a/c/src/exec/libfs/src/imfs/imfs_handlers_link.c b/c/src/exec/libfs/src/imfs/imfs_handlers_link.c
deleted file mode 100644
index b0a057c068..0000000000
--- a/c/src/exec/libfs/src/imfs/imfs_handlers_link.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Link Operations Table for the IMFS
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-
-#include "imfs.h"
-
-/*
- * Handler table for IMFS device nodes
- */
-
-rtems_filesystem_file_handlers_r IMFS_link_handlers = {
- NULL, /* open */
- NULL, /* close */
- NULL, /* read */
- NULL, /* write */
- NULL, /* ioctl */
- NULL, /* lseek */
- NULL, /* stat */
- NULL, /* fchmod */
- NULL, /* ftruncate */
- NULL, /* fpathconf */
- NULL, /* fsync */
- NULL, /* fdatasync */
- NULL, /* fcntl */
- IMFS_rmnod
-};
diff --git a/c/src/exec/libfs/src/imfs/imfs_handlers_memfile.c b/c/src/exec/libfs/src/imfs/imfs_handlers_memfile.c
deleted file mode 100644
index 5133b87198..0000000000
--- a/c/src/exec/libfs/src/imfs/imfs_handlers_memfile.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Memfile Operations Tables for the IMFS
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-
-#include "imfs.h"
-
-/*
- * Set of operations handlers for operations on memfile entities.
- */
-
-rtems_filesystem_file_handlers_r IMFS_memfile_handlers = {
- memfile_open,
- memfile_close,
- memfile_read,
- memfile_write,
- memfile_ioctl,
- memfile_lseek,
- IMFS_stat,
- IMFS_fchmod,
- memfile_ftruncate,
- NULL, /* fpathconf */
- IMFS_fdatasync, /* fsync */
- IMFS_fdatasync,
- IMFS_fcntl,
- memfile_rmnod
-};
diff --git a/c/src/exec/libfs/src/imfs/imfs_init.c b/c/src/exec/libfs/src/imfs/imfs_init.c
deleted file mode 100644
index c2630af78e..0000000000
--- a/c/src/exec/libfs/src/imfs/imfs_init.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * IMFS Initialization
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h> /* for mkdir */
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdlib.h>
-
-#include <assert.h>
-
-#include "imfs.h"
-#include "libio_.h"
-
-#if defined(IMFS_DEBUG)
-#include <stdio.h>
-#endif
-
-/*
- * IMFS file system operations table
- */
-
-rtems_filesystem_operations_table IMFS_ops = {
- IMFS_eval_path,
- IMFS_evaluate_for_make,
- IMFS_link,
- IMFS_unlink,
- IMFS_node_type,
- IMFS_mknod,
- IMFS_chown,
- IMFS_freenodinfo,
- IMFS_mount,
- IMFS_initialize,
- IMFS_unmount,
- IMFS_fsunmount,
- IMFS_utime,
- IMFS_evaluate_link,
- IMFS_symlink,
- IMFS_readlink
-};
-
-/*
- * IMFS_initialize
- */
-
-int IMFS_initialize(
- rtems_filesystem_mount_table_entry_t *temp_mt_entry
-)
-{
- IMFS_initialize_support(
- temp_mt_entry,
- &IMFS_ops,
- &IMFS_memfile_handlers,
- &IMFS_directory_handlers
- );
- return 0;
-}
diff --git a/c/src/exec/libfs/src/imfs/imfs_initsupp.c b/c/src/exec/libfs/src/imfs/imfs_initsupp.c
deleted file mode 100644
index 408789760e..0000000000
--- a/c/src/exec/libfs/src/imfs/imfs_initsupp.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * IMFS Initialization
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h> /* for mkdir */
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdlib.h>
-
-#include <assert.h>
-
-#include "imfs.h"
-#include "libio_.h"
-
-#if defined(IMFS_DEBUG)
-#include <stdio.h>
-#endif
-
-/*
- * IMFS_initialize
- */
-
-int IMFS_initialize_support(
- rtems_filesystem_mount_table_entry_t *temp_mt_entry,
- rtems_filesystem_operations_table *op_table,
- rtems_filesystem_file_handlers_r *memfile_handlers,
- rtems_filesystem_file_handlers_r *directory_handlers
-)
-{
- IMFS_fs_info_t *fs_info;
- IMFS_jnode_t *jnode;
-
- /*
- * Create the root node
- */
-
- temp_mt_entry->mt_fs_root.node_access = IMFS_create_node(
- NULL,
- IMFS_DIRECTORY,
- "",
- ( S_IRWXO | S_IRWXG| S_IRWXU ),
- NULL
- );
-
- temp_mt_entry->mt_fs_root.handlers = directory_handlers;
- temp_mt_entry->mt_fs_root.ops = op_table;
- temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
-
- /*
- * Create custom file system data.
- */
- fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
- if ( !fs_info ){
- free(temp_mt_entry->mt_fs_root.node_access);
- return 1;
- }
- temp_mt_entry->fs_info = fs_info;
-
- /*
- * Set st_ino for the root to 1.
- */
-
- fs_info->ino_count = 1;
- fs_info->memfile_handlers = memfile_handlers;
- fs_info->directory_handlers = directory_handlers;
-
- jnode = temp_mt_entry->mt_fs_root.node_access;
- jnode->st_ino = fs_info->ino_count;
-
- return 0;
-}
diff --git a/c/src/exec/libfs/src/imfs/imfs_link.c b/c/src/exec/libfs/src/imfs/imfs_link.c
deleted file mode 100644
index 6a8fa3c3ef..0000000000
--- a/c/src/exec/libfs/src/imfs/imfs_link.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * IMFS_link
- *
- * The following rouine creates a new link node under parent with the
- * name given in name. The link node is set to point to the node at
- * to_loc.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-#include "imfs.h"
-#include "libio_.h"
-
-int IMFS_link(
- rtems_filesystem_location_info_t *to_loc, /* IN */
- rtems_filesystem_location_info_t *parent_loc, /* IN */
- const char *token /* IN */
-)
-{
- IMFS_types_union info;
- IMFS_jnode_t *new_node;
- char new_name[ IMFS_NAME_MAX + 1 ];
- int i;
-
- /*
- * Verify this node can be linked to.
- */
-
- info.hard_link.link_node = to_loc->node_access;
- if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
- set_errno_and_return_minus_one( EMLINK );
-
- /*
- * Remove any separators at the end of the string.
- */
-
- IMFS_get_token( token, new_name, &i );
-
- /*
- * Create a new link node.
- */
-
- new_node = IMFS_create_node(
- parent_loc,
- IMFS_HARD_LINK,
- new_name,
- ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
- &info
- );
-
- if ( !new_node )
- set_errno_and_return_minus_one( ENOMEM );
-
- /*
- * Increment the link count of the node being pointed to.
- */
-
- info.hard_link.link_node->st_nlink++;
- IMFS_update_ctime( info.hard_link.link_node );
-
- return 0;
-}
-
diff --git a/c/src/exec/libfs/src/imfs/imfs_mknod.c b/c/src/exec/libfs/src/imfs/imfs_mknod.c
deleted file mode 100644
index 05b7ca9a5f..0000000000
--- a/c/src/exec/libfs/src/imfs/imfs_mknod.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * IMFS_mknod
- *
- * Routine to create a node in the IMFS file system.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#include <stdlib.h>
-
-#include "imfs.h"
-#include "libio_.h"
-
-int IMFS_mknod(
- const char *token, /* IN */
- mode_t mode, /* IN */
- dev_t dev, /* IN */
- rtems_filesystem_location_info_t *pathloc /* IN/OUT */
-)
-{
- IMFS_token_types type = 0;
- IMFS_jnode_t *new_node;
- int result;
- char new_name[ IMFS_NAME_MAX + 1 ];
- IMFS_types_union info;
-
- IMFS_get_token( token, new_name, &result );
-
- /*
- * Figure out what type of IMFS node this is.
- */
-
- if ( S_ISDIR(mode) )
- type = IMFS_DIRECTORY;
- else if ( S_ISREG(mode) )
- type = IMFS_MEMORY_FILE;
- else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
- type = IMFS_DEVICE;
- rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
- } else {
- set_errno_and_return_minus_one( EINVAL );
- }
-
- /*
- * Allocate and fill in an IMFS jnode
- */
-
- new_node = IMFS_create_node(
- pathloc,
- type,
- new_name,
- mode,
- &info
- );
-
- if ( !new_node )
- set_errno_and_return_minus_one( ENOMEM );
-
- return 0;
-}
-
diff --git a/c/src/exec/libfs/src/imfs/imfs_mount.c b/c/src/exec/libfs/src/imfs/imfs_mount.c
deleted file mode 100644
index 7b159f476c..0000000000
--- a/c/src/exec/libfs/src/imfs/imfs_mount.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * IMFS_mount
- *
- * This routine will look at a mount table entry that we are going to
- * add to the mount table. If the mount point rtems_filesystem
- * location_info_t struct refers to a node that is a directory,
- * the node will be marked as a mount point by setting its directory.mt_fs
- * pointer to point to the mount table entry that we are about to add
- * to the mount table chain.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-
-#include "imfs.h"
-#include "libio_.h"
-
-int IMFS_mount(
- rtems_filesystem_mount_table_entry_t *mt_entry
-)
-{
- IMFS_jnode_t *node;
-
- node = mt_entry->mt_point_node.node_access;
-
- /*
- * Is the node that we are mounting onto a directory node ?
- */
-
- if ( node->type != IMFS_DIRECTORY )
- set_errno_and_return_minus_one( ENOTDIR );
-
- /*
- * Set mt_fs pointer to point to the mount table entry for
- * the mounted file system.
- */
-
- node->info.directory.mt_fs = mt_entry;
- return 0;
-}
diff --git a/c/src/exec/libfs/src/imfs/imfs_ntype.c b/c/src/exec/libfs/src/imfs/imfs_ntype.c
deleted file mode 100644
index 33beda1bab..0000000000
--- a/c/src/exec/libfs/src/imfs/imfs_ntype.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * IMFS_node_type
- *
- * The following verifies that returns the type of node that the
- * loc refers to.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-#include "imfs.h"
-
-rtems_filesystem_node_types_t IMFS_node_type(
- rtems_filesystem_location_info_t *pathloc /* IN */
-)
-{
- IMFS_jnode_t *node;
-
- node = pathloc->node_access;
- return node->type;
-}
diff --git a/c/src/exec/libfs/src/imfs/imfs_readlink.c b/c/src/exec/libfs/src/imfs/imfs_readlink.c
deleted file mode 100644
index 36bb17815a..0000000000
--- a/c/src/exec/libfs/src/imfs/imfs_readlink.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * IMFS_readlink
- *
- * The following rouine puts the symblic links destination name into
- * buff.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-#include "imfs.h"
-#include "libio_.h"
-
-int IMFS_readlink(
- rtems_filesystem_location_info_t *loc,
- char *buf, /* OUT */
- size_t bufsize
-)
-{
- IMFS_jnode_t *node;
- int i;
-
- node = loc->node_access;
-
- if ( node->type != IMFS_SYM_LINK )
- set_errno_and_return_minus_one( EINVAL );
-
- for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
- buf[i] = node->info.sym_link.name[i];
-
- return i;
-}
diff --git a/c/src/exec/libfs/src/imfs/imfs_rmnod.c b/c/src/exec/libfs/src/imfs/imfs_rmnod.c
deleted file mode 100644
index 3b875145da..0000000000
--- a/c/src/exec/libfs/src/imfs/imfs_rmnod.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * IMFS Node Removal Handler
- *
- * This file contains the handler used to remove a node when a file type
- * does not require special actions.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include <rtems/libio.h>
-#include "libio_.h"
-
-#include "imfs.h"
-
-/*
- * IMFS_rmnod
- */
-
-int IMFS_rmnod(
- rtems_filesystem_location_info_t *pathloc /* IN */
-)
-{
- IMFS_jnode_t *the_jnode;
-
- the_jnode = (IMFS_jnode_t *) pathloc->node_access;
-
- /*
- * Take the node out of the parent's chain that contains this node
- */
-
- if ( the_jnode->Parent != NULL ) {
- Chain_Extract( (Chain_Node *) the_jnode );
- the_jnode->Parent = NULL;
- }
-
- /*
- * Decrement the link counter and see if we can free the space.
- */
-
- the_jnode->st_nlink--;
- IMFS_update_ctime( the_jnode );
-
- /*
- * The file cannot be open and the link must be less than 1 to free.
- */
-
- if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) {
-
- /*
- * Is rtems_filesystem_current this node?
- */
-
- if ( rtems_filesystem_current.node_access == pathloc->node_access )
- rtems_filesystem_current.node_access = NULL;
-
- /*
- * Free memory associated with a memory file.
- */
-
- free( the_jnode );
- }
-
- return 0;
-
-}
-
-
-
diff --git a/c/src/exec/libfs/src/imfs/imfs_stat.c b/c/src/exec/libfs/src/imfs/imfs_stat.c
deleted file mode 100644
index 2edc1a9e9b..0000000000
--- a/c/src/exec/libfs/src/imfs/imfs_stat.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * IMFS_stat
- *
- * This routine provides a stat for the IMFS file system.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-#include "imfs.h"
-#include "libio_.h"
-
-int IMFS_stat(
- rtems_filesystem_location_info_t *loc,
- struct stat *buf
-)
-{
- IMFS_jnode_t *the_jnode;
- IMFS_device_t *io;
-
- the_jnode = loc->node_access;
-
-
- switch ( the_jnode->type ) {
-
- case IMFS_DEVICE:
- io = &the_jnode->info.device;
- buf->st_dev = rtems_filesystem_make_dev_t( io->major, io->minor );
- break;
-
- case IMFS_MEMORY_FILE:
- buf->st_size = the_jnode->info.file.size;
- break;
-
- default:
- set_errno_and_return_minus_one( ENOTSUP );
- break;
- }
-
- buf->st_mode = the_jnode->st_mode;
- buf->st_nlink = the_jnode->st_nlink;
- buf->st_ino = the_jnode->st_ino;
- buf->st_uid = the_jnode->st_uid;
- buf->st_gid = the_jnode->st_gid;
-
- buf->st_atime = the_jnode->st_atime;
- buf->st_mtime = the_jnode->st_mtime;
- buf->st_ctime = the_jnode->st_ctime;
-
- return 0;
-}
diff --git a/c/src/exec/libfs/src/imfs/imfs_symlink.c b/c/src/exec/libfs/src/imfs/imfs_symlink.c
deleted file mode 100644
index 8e795463e3..0000000000
--- a/c/src/exec/libfs/src/imfs/imfs_symlink.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * IMFS_symlink
- *
- * The following rouine creates a new symbolic link node under parent
- * with the name given in name. The node is set to point to the node at
- * to_loc.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-#include "imfs.h"
-#include "libio_.h"
-
-int IMFS_symlink(
- rtems_filesystem_location_info_t *parent_loc,
- const char *link_name,
- const char *node_name
-)
-{
- IMFS_types_union info;
- IMFS_jnode_t *new_node;
- char new_name[ IMFS_NAME_MAX + 1 ];
- int i;
-
- /*
- * Remove any separators at the end of the string.
- */
-
- IMFS_get_token( node_name, new_name, &i );
-
- info.sym_link.name = link_name;
-
- /*
- * Create a new link node.
- */
-
- new_node = IMFS_create_node(
- parent_loc,
- IMFS_SYM_LINK,
- new_name,
- ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
- &info
- );
-
- if ( !new_node )
- set_errno_and_return_minus_one( ENOMEM );
-
- return 0;
-}
-
-
diff --git a/c/src/exec/libfs/src/imfs/imfs_unixstub.c b/c/src/exec/libfs/src/imfs/imfs_unixstub.c
deleted file mode 100644
index 8ee429383c..0000000000
--- a/c/src/exec/libfs/src/imfs/imfs_unixstub.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * IMFS Stub for UNIX configuration
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h> /* for mkdir */
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdlib.h>
-
-#include <assert.h>
-
-#include "imfs.h"
-#include "libio_.h"
-
-#include <stdio.h>
-
-/*
- * IMFS file system operations table
- */
-
-rtems_filesystem_operations_table IMFS_ops = {
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL
-};
-
-/*
- * IMFS file system operations table
- */
-
-rtems_filesystem_operations_table miniIMFS_ops = {
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL
-};
diff --git a/c/src/exec/libfs/src/imfs/imfs_unlink.c b/c/src/exec/libfs/src/imfs/imfs_unlink.c
deleted file mode 100644
index f001c6450d..0000000000
--- a/c/src/exec/libfs/src/imfs/imfs_unlink.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * IMFS_unlink
- *
- * Routine to remove a link node from the tree.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-#include <stdlib.h>
-
-#include "imfs.h"
-#include "libio_.h"
-
-int IMFS_unlink(
- rtems_filesystem_location_info_t *loc /* IN */
-)
-{
- IMFS_jnode_t *node;
- rtems_filesystem_location_info_t the_link;
- int result;
-
- node = loc->node_access;
-
- /*
- * Decrement the link counter of node pointed to and free the
- * space.
- */
-
- /*
- * If this is the last last pointer to the node
- * free the node.
- */
-
- if ( node->type == IMFS_HARD_LINK ) {
-
- if ( !node->info.hard_link.link_node )
- set_errno_and_return_minus_one( EINVAL );
-
- the_link = *loc;
- the_link.node_access = node->info.hard_link.link_node;
- IMFS_Set_handlers( &the_link );
-
- /*
- * If removing the last hard link to a node, then we need
- * to remove the node that is a link and the node itself.
- */
-
- node->info.hard_link.link_node->st_nlink --;
- IMFS_update_ctime( node->info.hard_link.link_node );
- if ( node->info.hard_link.link_node->st_nlink < 1) {
- result = (*the_link.handlers->rmnod)( &the_link );
- if ( result != 0 )
- return -1;
- }
- }
-
- /*
- * Now actually free the node we were asked to free.
- */
-
- result = (*loc->handlers->rmnod)( loc );
-
- return result;
-}
-
diff --git a/c/src/exec/libfs/src/imfs/imfs_unmount.c b/c/src/exec/libfs/src/imfs/imfs_unmount.c
deleted file mode 100644
index 9e07fe0c5e..0000000000
--- a/c/src/exec/libfs/src/imfs/imfs_unmount.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * IMFS_unmount
- *
- * This routine will look at a mount table entry that we are going to
- * add to the mount table. If the mount point
- * rtems_filesystem_location_info_t struct refers to a node that is a
- * directory that has a file system mounted on it, the node will be
- * marked as a mount point by * setting its directory.mt_fs pointer
- * to NULL. This indicates that a directory is no longer mounted on
- * this node.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-
-#include "imfs.h"
-#include "libio_.h"
-
-int IMFS_unmount(
- rtems_filesystem_mount_table_entry_t *mt_entry
-)
-{
- IMFS_jnode_t *node;
-
- node = mt_entry->mt_point_node.node_access;
-
- /*
- * Is the node that we are mounting onto a directory node ?
- */
-
- if ( node->type != IMFS_DIRECTORY )
- set_errno_and_return_minus_one( ENOTDIR );
-
- /*
- * Did the node indicate that there was a directory mounted here?
- */
-
- if ( node->info.directory.mt_fs == NULL )
- set_errno_and_return_minus_one( EINVAL ); /* XXX */
-
- /*
- * Set the mt_fs pointer to indicate that there is no longer
- * a file system mounted to this point.
- */
-
- node->info.directory.mt_fs = NULL;
-
- return 0;
-}
diff --git a/c/src/exec/libfs/src/imfs/imfs_utime.c b/c/src/exec/libfs/src/imfs/imfs_utime.c
deleted file mode 100644
index e20d352c50..0000000000
--- a/c/src/exec/libfs/src/imfs/imfs_utime.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * IMFS_utime
- *
- * This routine is the implementation of the utime() system
- * call for the IMFS.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-#include <sys/time.h>
-
-#include "libio_.h"
-#include "imfs.h"
-
-int IMFS_utime(
- rtems_filesystem_location_info_t *pathloc, /* IN */
- time_t actime, /* IN */
- time_t modtime /* IN */
-)
-{
- IMFS_jnode_t *the_jnode;
-
- the_jnode = (IMFS_jnode_t *) pathloc->node_access;
-
- the_jnode->st_atime = actime;
- the_jnode->st_mtime = modtime;
-
- return 0;
-}
diff --git a/c/src/exec/libfs/src/imfs/ioman.c b/c/src/exec/libfs/src/imfs/ioman.c
deleted file mode 100644
index ee22791657..0000000000
--- a/c/src/exec/libfs/src/imfs/ioman.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * This file emulates the old Classic RTEMS IO manager directives
- * which register and lookup names using the in-memory filesystem.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-
-#include <assert.h>
-
-#include <rtems.h>
-#include "libio_.h"
-#include "imfs.h"
-
-#if defined(__linux__)
-#define S_IFCHR __S_IFCHR
-#endif
-
-/*
- * rtems_io_register_name
- *
- * This assumes that all registered devices are character devices.
- */
-
-rtems_status_code rtems_io_register_name(
- char *device_name,
- rtems_device_major_number major,
- rtems_device_minor_number minor
-)
-{
-#if !defined(RTEMS_UNIX)
- int status;
- dev_t dev;
-
- dev = rtems_filesystem_make_dev_t( major, minor );
- status = mknod( device_name, 0777 | S_IFCHR, dev );
-
- /* this is the only error returned by the old version */
- if ( status )
- return RTEMS_TOO_MANY;
-
-#endif
- return RTEMS_SUCCESSFUL;
-}
-
-/*
- * rtems_io_lookup_name
- *
- * This version is not reentrant.
- *
- * XXX - This is dependent upon IMFS and should not be.
- * Suggest adding a filesystem routine to fill in the device_info.
- */
-
-rtems_status_code rtems_io_lookup_name(
- const char *name,
- rtems_driver_name_t **device_info
-)
-{
-#if !defined(RTEMS_UNIX)
- IMFS_jnode_t *the_jnode;
- rtems_filesystem_location_info_t loc;
- static rtems_driver_name_t device;
- int result;
- rtems_filesystem_node_types_t node_type;
-
- result = rtems_filesystem_evaluate_path( name, 0x00, &loc, TRUE );
- the_jnode = loc.node_access;
-
- node_type = (*loc.ops->node_type)( &loc );
-
- if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
- *device_info = 0;
- rtems_filesystem_freenode( &loc );
- return RTEMS_UNSATISFIED;
- }
-
- device.device_name = (char *) name;
- device.device_name_length = strlen( name );
- device.major = the_jnode->info.device.major;
- device.minor = the_jnode->info.device.minor;
- *device_info = &device;
-
- rtems_filesystem_freenode( &loc );
-
-#endif
- return RTEMS_SUCCESSFUL;
-}
diff --git a/c/src/exec/libfs/src/imfs/memfile.c b/c/src/exec/libfs/src/imfs/memfile.c
deleted file mode 100644
index dad120a0a7..0000000000
--- a/c/src/exec/libfs/src/imfs/memfile.c
+++ /dev/null
@@ -1,1096 +0,0 @@
-/*
- * IMFS Device Node Handlers
- *
- * This file contains the set of handlers used to process operations on
- * IMFS memory file nodes. The memory files are created in memory using
- * malloc'ed memory. Thus any data stored in one of these files is lost
- * at system shutdown unless special arrangements to copy the data to
- * some type of non-volailte storage are made by the application.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <stdlib.h>
-#include <assert.h>
-#include <errno.h>
-
-#include <rtems.h>
-#include <rtems/libio.h>
-#include "imfs.h"
-#include "libio_.h"
-
-#define MEMFILE_STATIC
-
-/*
- * Prototypes of private routines
- */
-
-MEMFILE_STATIC int IMFS_memfile_extend(
- IMFS_jnode_t *the_jnode,
- off_t new_length
-);
-
-MEMFILE_STATIC int IMFS_memfile_addblock(
- IMFS_jnode_t *the_jnode,
- unsigned int block
-);
-
-MEMFILE_STATIC int IMFS_memfile_remove_block(
- IMFS_jnode_t *the_jnode,
- unsigned int block
-);
-
-MEMFILE_STATIC block_p *IMFS_memfile_get_block_pointer(
- IMFS_jnode_t *the_jnode,
- unsigned int block,
- int malloc_it
-);
-
-MEMFILE_STATIC int IMFS_memfile_read(
- IMFS_jnode_t *the_jnode,
- off_t start,
- unsigned char *destination,
- unsigned int length
-);
-
-MEMFILE_STATIC int IMFS_memfile_write(
- IMFS_jnode_t *the_jnode,
- off_t start,
- const unsigned char *source,
- unsigned int length
-);
-
-void *memfile_alloc_block(void);
-
-void memfile_free_block(
- void *memory
-);
-
-/*
- * memfile_open
- *
- * This routine processes the open() system call. Note that there is
- * nothing special to be done at open() time.
- */
-
-int memfile_open(
- rtems_libio_t *iop,
- const char *pathname,
- unsigned32 flag,
- unsigned32 mode
-)
-{
- IMFS_jnode_t *the_jnode;
-
- the_jnode = iop->file_info;
-
- return 0;
-}
-
-/*
- * memfile_close
- *
- * This routine processes the close() system call. Note that there is
- * nothing to flush or memory to free at this point.
- */
-
-int memfile_close(
- rtems_libio_t *iop
-)
-{
- IMFS_jnode_t *the_jnode;
-
- the_jnode = iop->file_info;
-
- return 0;
-}
-
-/*
- * memfile_read
- *
- * This routine processes the read() system call.
- */
-
-int memfile_read(
- rtems_libio_t *iop,
- void *buffer,
- unsigned32 count
-)
-{
- IMFS_jnode_t *the_jnode;
-
- the_jnode = iop->file_info;
-
- return IMFS_memfile_read( the_jnode, iop->offset, buffer, count );
-}
-
-/*
- * memfile_write
- *
- * This routine processes the write() system call.
- */
-
-int memfile_write(
- rtems_libio_t *iop,
- const void *buffer,
- unsigned32 count
-)
-{
- IMFS_jnode_t *the_jnode;
- int status;
-
- the_jnode = iop->file_info;
-
- status = IMFS_memfile_write( the_jnode, iop->offset, buffer, count );
- iop->size = the_jnode->info.file.size;
-
- return status;
-}
-
-/*
- * memfile_ioctl
- *
- * This routine processes the ioctl() system call.
- *
- * NOTE: No ioctl()'s are supported for in-memory files.
- */
-
-int memfile_ioctl(
- rtems_libio_t *iop,
- unsigned32 command,
- void *buffer
-)
-{
- IMFS_jnode_t *the_jnode;
-
- the_jnode = iop->file_info;
-
- return 0;
-}
-
-/*
- * memfile_lseek
- *
- * This routine processes the lseek() system call.
- */
-
-int memfile_lseek(
- rtems_libio_t *iop,
- off_t offset,
- int whence
-)
-{
- IMFS_jnode_t *the_jnode;
-
- the_jnode = iop->file_info;
-
- if (IMFS_memfile_extend( the_jnode, iop->offset ))
- set_errno_and_return_minus_one( ENOSPC );
-
- iop->size = the_jnode->info.file.size;
- return iop->offset;
-}
-
-/*
- * memfile_stat
- *
- * This IMFS_stat() can be used.
- */
-
-/*
- * memfile_ftruncate
- *
- * This routine processes the ftruncate() system call.
- */
-
-int memfile_ftruncate(
- rtems_libio_t *iop,
- off_t length
-)
-{
- IMFS_jnode_t *the_jnode;
-
- the_jnode = iop->file_info;
-
- /*
- * POSIX 1003.1b does not specify what happens if you truncate a file
- * and the new length is greater than the current size. We treat this
- * as an extend operation.
- */
-
- if ( length > the_jnode->info.file.size )
- return IMFS_memfile_extend( the_jnode, length );
-
- /*
- * The in-memory files do not currently reclaim memory until the file is
- * deleted. So we leave the previously allocated blocks in place for
- * future use and just set the length.
- */
-
- the_jnode->info.file.size = length;
- iop->size = the_jnode->info.file.size;
-
- IMFS_update_atime( the_jnode );
-
- return 0;
-}
-
-/*
- * IMFS_memfile_extend
- *
- * This routine insures that the in-memory file is of the length
- * specified. If necessary, it will allocate memory blocks to
- * extend the file.
- */
-
-MEMFILE_STATIC int IMFS_memfile_extend(
- IMFS_jnode_t *the_jnode,
- off_t new_length
-)
-{
- unsigned int block;
- unsigned int new_blocks;
- unsigned int old_blocks;
-
- /*
- * Perform internal consistency checks
- */
-
- assert( the_jnode );
- if ( !the_jnode )
- set_errno_and_return_minus_one( EIO );
-
- assert( the_jnode->type == IMFS_MEMORY_FILE );
- if ( the_jnode->type != IMFS_MEMORY_FILE )
- set_errno_and_return_minus_one( EIO );
-
- if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
- set_errno_and_return_minus_one( EINVAL );
-
- if ( new_length <= the_jnode->info.file.size )
- return 0;
-
- /*
- * Calculate the number of range of blocks to allocate
- */
-
- new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
- old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
-
- /*
- * Now allocate each of those blocks.
- */
-
- for ( block=old_blocks ; block<=new_blocks ; block++ ) {
- if ( IMFS_memfile_addblock( the_jnode, block ) ) {
- for ( ; block>=old_blocks ; block-- ) {
- IMFS_memfile_remove_block( the_jnode, block );
- }
- set_errno_and_return_minus_one( ENOSPC );
- }
- }
-
- /*
- * Set the new length of the file.
- */
-
- the_jnode->info.file.size = new_length;
- return 0;
-}
-
-/*
- * IMFS_memfile_addblock
- *
- * This routine adds a single block to the specified in-memory file.
- */
-
-MEMFILE_STATIC int IMFS_memfile_addblock(
- IMFS_jnode_t *the_jnode,
- unsigned int block
-)
-{
- block_p memory;
- block_p *block_entry_ptr;
-
- assert( the_jnode );
- if ( !the_jnode )
- set_errno_and_return_minus_one( EIO );
-
- assert( the_jnode->type == IMFS_MEMORY_FILE );
- if ( the_jnode->type != IMFS_MEMORY_FILE )
- set_errno_and_return_minus_one( EIO );
-
- block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 );
- if ( *block_entry_ptr )
- return 0;
-
-#if 0
- printf( "%d %p", block, block_entry_ptr );
- fflush(stdout);
-#endif
-
- memory = memfile_alloc_block();
- assert( memory );
- if ( !memory )
- return 1;
- *block_entry_ptr = memory;
-
- return 0;
-}
-
-/*
- * IMFS_memfile_remove_block
- *
- * This routine removes the specified block from the in-memory file.
- *
- * NOTE: This is a support routine and is called only to remove
- * the last block or set of blocks in a file. Removing a
- * block from the middle of a file would be exceptionally
- * dangerous and the results unpredictable.
- */
-
-MEMFILE_STATIC int IMFS_memfile_remove_block(
- IMFS_jnode_t *the_jnode,
- unsigned int block
-)
-{
- block_p *block_entry_ptr;
- block_p ptr;
-
- block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
- ptr = *block_entry_ptr;
- *block_entry_ptr = 0;
-
- memfile_free_block( ptr );
-
- return 1;
-}
-
-/*
- * memfile_free_blocks_in_table
- *
- * This is a support routine for IMFS_memfile_remove. It frees all the
- * blocks in one of the indirection tables.
- */
-
-void memfile_free_blocks_in_table(
- block_p **block_table,
- int entries
-)
-{
- int i;
- block_p *b;
-
- /*
- * Perform internal consistency checks
- */
-
- assert( block_table );
- if ( !block_table )
- return;
-
- /*
- * Now go through all the slots in the table and free the memory.
- */
-
- b = *block_table;
-
- for ( i=0 ; i<entries ; i++ ) {
- if ( b[i] ) {
- memfile_free_block( b[i] );
- b[i] = 0;
- }
- }
-
- /*
- * Now that all the blocks in the block table are free, we can
- * free the block table itself.
- */
-
- memfile_free_block( *block_table );
- *block_table = 0;
-}
-
-/*
- * IMFS_memfile_remove
- *
- * This routine frees all memory associated with an in memory file.
- *
- * NOTE: This is an exceptionally conservative implementation.
- * It will check EVERY pointer which is non-NULL and insure
- * any child non-NULL pointers are freed. Optimistically, all that
- * is necessary is to scan until a NULL pointer is found. There
- * should be no allocated data past that point.
- *
- * In experimentation on the powerpc simulator, it was noted
- * that using blocks which held 128 slots versus 16 slots made
- * a significant difference in the performance of this routine.
- *
- * Regardless until the IMFS implementation is proven, it
- * is better to stick to simple, easy to understand algorithms.
- */
-
-int IMFS_memfile_remove(
- IMFS_jnode_t *the_jnode
-)
-{
- IMFS_memfile_t *info;
- int i;
- int j;
- unsigned int to_free;
- block_p *p;
-
- /*
- * Perform internal consistency checks
- */
-
- assert( the_jnode );
- if ( !the_jnode )
- set_errno_and_return_minus_one( EIO );
-
- assert( the_jnode->type == IMFS_MEMORY_FILE );
- if ( the_jnode->type != IMFS_MEMORY_FILE )
- set_errno_and_return_minus_one( EIO );
-
- /*
- * Eventually this could be set smarter at each call to
- * memfile_free_blocks_in_table to greatly speed this up.
- */
-
- to_free = IMFS_MEMFILE_BLOCK_SLOTS;
-
- /*
- * Now start freeing blocks in this order:
- * + indirect
- * + doubly indirect
- * + triply indirect
- */
-
- info = &the_jnode->info.file;
-
- if ( info->indirect ) {
- memfile_free_blocks_in_table( &info->indirect, to_free );
- }
-
- if ( info->doubly_indirect ) {
-
- for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
- if ( info->doubly_indirect[i] ) {
- memfile_free_blocks_in_table(
- (block_p **)&info->doubly_indirect[i], to_free );
- }
- }
- memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
-
- }
-
- if ( info->triply_indirect ) {
- for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
- p = (block_p *) info->triply_indirect[i];
- for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
- if ( p[j] ) {
- memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
- }
- }
- memfile_free_blocks_in_table(
- (block_p **)&info->triply_indirect[i], to_free );
- }
- memfile_free_blocks_in_table(
- (block_p **)&info->triply_indirect, to_free );
- }
-
- return 0;
-}
-
-/*
- * IMFS_memfile_read
- *
- * This routine read from memory file pointed to by the_jnode into
- * the specified data buffer specified by destination. The file
- * is NOT extended. An offset greater than the length of the file
- * is considered an error. Read from an offset for more bytes than
- * are between the offset and the end of the file will result in
- * reading the data between offset and the end of the file (truncated
- * read).
- */
-
-MEMFILE_STATIC int IMFS_memfile_read(
- IMFS_jnode_t *the_jnode,
- off_t start,
- unsigned char *destination,
- unsigned int length
-)
-{
- block_p *block_ptr;
- unsigned int block;
- unsigned int my_length;
- unsigned int to_copy = 0;
- unsigned int last_byte;
- unsigned int copied;
- unsigned int start_offset;
- unsigned char *dest;
-
- dest = destination;
-
- /*
- * Perform internal consistency checks
- */
-
- assert( the_jnode );
- if ( !the_jnode )
- set_errno_and_return_minus_one( EIO );
-
- assert( the_jnode->type == IMFS_MEMORY_FILE );
- if ( the_jnode->type != IMFS_MEMORY_FILE )
- set_errno_and_return_minus_one( EIO );
-
- /*
- * Error checks on arguments
- */
-
- assert( dest );
- if ( !dest )
- set_errno_and_return_minus_one( EINVAL );
-
- /*
- * If there is nothing to read, then quick exit.
- */
-
- my_length = length;
- if ( !my_length )
- set_errno_and_return_minus_one( EINVAL );
-
- /*
- * If the last byte we are supposed to read is past the end of this
- * in memory file, then shorten the length to read.
- */
-
- last_byte = start + length;
- if ( last_byte > the_jnode->info.file.size )
- my_length = the_jnode->info.file.size - start;
-
- copied = 0;
-
- /*
- * Three phases to the read:
- * + possibly the last part of one block
- * + all of zero of more blocks
- * + possibly the first part of one block
- */
-
- /*
- * Phase 1: possibly the last part of one block
- */
-
- start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
- block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
- if ( start_offset ) {
- to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
- if ( to_copy > my_length )
- to_copy = my_length;
- block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
- assert( block_ptr );
- if ( !block_ptr )
- return copied;
- memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
- dest += to_copy;
- block++;
- my_length -= to_copy;
- copied += to_copy;
- }
-
- /*
- * Phase 2: all of zero of more blocks
- */
-
- to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
- while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
- block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
- assert( block_ptr );
- if ( !block_ptr )
- return copied;
- memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
- dest += to_copy;
- block++;
- my_length -= to_copy;
- copied += to_copy;
- }
-
- /*
- * Phase 3: possibly the first part of one block
- */
-
- assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
-
- if ( my_length ) {
- block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
- assert( block_ptr );
- if ( !block_ptr )
- return copied;
- memcpy( dest, &(*block_ptr)[ 0 ], my_length );
- copied += my_length;
- }
-
- IMFS_update_atime( the_jnode );
-
- return copied;
-}
-
-/*
- * IMFS_memfile_write
- *
- * This routine writes the specified data buffer into the in memory
- * file pointed to by the_jnode. The file is extended as needed.
- */
-
-MEMFILE_STATIC int IMFS_memfile_write(
- IMFS_jnode_t *the_jnode,
- off_t start,
- const unsigned char *source,
- unsigned int length
-)
-{
- block_p *block_ptr;
- unsigned int block;
- int status;
- unsigned int my_length;
- unsigned int to_copy = 0;
- unsigned int last_byte;
- unsigned int start_offset;
- int copied;
- const unsigned char *src;
-
- src = source;
-
- /*
- * Perform internal consistency checks
- */
-
- assert( the_jnode );
- if ( !the_jnode )
- set_errno_and_return_minus_one( EIO );
-
- assert( the_jnode->type == IMFS_MEMORY_FILE );
- if ( the_jnode->type != IMFS_MEMORY_FILE )
- set_errno_and_return_minus_one( EIO );
-
- /*
- * Error check arguments
- */
-
- assert( source );
- if ( !source )
- set_errno_and_return_minus_one( EINVAL );
-
-
- /*
- * If there is nothing to write, then quick exit.
- */
-
- my_length = length;
- if ( !my_length )
- set_errno_and_return_minus_one( EINVAL );
-
- /*
- * If the last byte we are supposed to write is past the end of this
- * in memory file, then extend the length.
- */
-
- last_byte = start + length;
- if ( last_byte > the_jnode->info.file.size ) {
- status = IMFS_memfile_extend( the_jnode, last_byte );
- if ( status )
- set_errno_and_return_minus_one( ENOSPC );
- }
-
- copied = 0;
-
- /*
- * Three phases to the write:
- * + possibly the last part of one block
- * + all of zero of more blocks
- * + possibly the first part of one block
- */
-
- /*
- * Phase 1: possibly the last part of one block
- */
-
- start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
- block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
- if ( start_offset ) {
- to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
- if ( to_copy > my_length )
- to_copy = my_length;
- block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
- assert( block_ptr );
- if ( !block_ptr )
- return copied;
-#if 0
-printf( "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src );
-#endif
- memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
- src += to_copy;
- block++;
- my_length -= to_copy;
- copied += to_copy;
- }
-
- /*
- * Phase 2: all of zero of more blocks
- */
-
- to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
- while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
- block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
- assert( block_ptr );
- if ( !block_ptr )
- return copied;
-#if 0
-printf( "write %d in %d: %*s\n", to_copy, block, to_copy, src );
-#endif
- memcpy( &(*block_ptr)[ 0 ], src, to_copy );
- src += to_copy;
- block++;
- my_length -= to_copy;
- copied += to_copy;
- }
-
- /*
- * Phase 3: possibly the first part of one block
- */
-
- assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
-
- to_copy = my_length;
- if ( my_length ) {
- block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
- assert( block_ptr );
- if ( !block_ptr )
- return copied;
-#if 0
-printf( "write %d in %d: %*s\n", to_copy, block, to_copy, src );
-#endif
- memcpy( &(*block_ptr)[ 0 ], src, my_length );
- my_length = 0;
- copied += to_copy;
- }
-
- IMFS_atime_mtime_update( the_jnode );
-
- return copied;
-}
-
-/*
- * IMFS_memfile_get_block_pointer
- *
- * This routine looks up the block pointer associated with the given block
- * number. If that block has not been allocated and "malloc_it" is
- * TRUE, then the block is allocated. Otherwise, it is an error.
- */
-
-#if 0
-block_p *IMFS_memfile_get_block_pointer_DEBUG(
- IMFS_jnode_t *the_jnode,
- unsigned int block,
- int malloc_it
-);
-
-block_p *IMFS_memfile_get_block_pointer(
- IMFS_jnode_t *the_jnode,
- unsigned int block,
- int malloc_it
-)
-{
- block_p *p;
-
- p = IMFS_memfile_get_block_pointer_DEBUG( the_jnode, block, malloc_it );
- printf( "(%d -> %p) ", block, p );
- return p;
-}
-
-block_p *IMFS_memfile_get_block_pointer_DEBUG(
-#else
-block_p *IMFS_memfile_get_block_pointer(
-#endif
- IMFS_jnode_t *the_jnode,
- unsigned int block,
- int malloc_it
-)
-{
- unsigned int my_block;
- IMFS_memfile_t *info;
- unsigned int singly;
- unsigned int doubly;
- unsigned int triply;
- block_p *p;
- block_p *p1;
- block_p *p2;
-
- /*
- * Perform internal consistency checks
- */
-
- assert( the_jnode );
- if ( !the_jnode )
- return NULL;
-
- assert( the_jnode->type == IMFS_MEMORY_FILE );
- if ( the_jnode->type != IMFS_MEMORY_FILE )
- return NULL;
-
- info = &the_jnode->info.file;
-
- my_block = block;
-
- /*
- * Is the block number in the simple indirect portion?
- */
-
- if ( my_block <= LAST_INDIRECT ) {
-#if 0
-printf( "(s %d) ", block );
-fflush(stdout);
-#endif
- p = info->indirect;
-
- if ( malloc_it ) {
-
- if ( !p ) {
- p = memfile_alloc_block();
- if ( !p )
- return 0;
- info->indirect = p;
- }
- return &info->indirect[ my_block ];
- }
-
- if ( !p )
- return 0;
-
- return &info->indirect[ my_block ];
- }
-
- /*
- * Is the block number in the doubly indirect portion?
- */
-
- if ( my_block <= LAST_DOUBLY_INDIRECT ) {
-#if 0
-printf( "(d %d) ", block );
-fflush(stdout);
-#endif
-
- my_block -= FIRST_DOUBLY_INDIRECT;
-
- singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
- doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
-
- p = info->doubly_indirect;
- if ( malloc_it ) {
-
- if ( !p ) {
- p = memfile_alloc_block();
- if ( !p )
- return 0;
- info->doubly_indirect = p;
- }
-
- p1 = (block_p *)p[ doubly ];
- if ( !p1 ) {
- p1 = memfile_alloc_block();
- if ( !p1 )
- return 0;
- p[ doubly ] = (block_p) p1;
- }
-
- return (block_p *)&p1[ singly ];
- }
-
- if ( !p )
- return 0;
-
- p = (block_p *)p[ doubly ];
- if ( !p )
- return 0;
-
-#if 0
-printf( "(d %d %d %d %d %p %p) ", block, my_block, doubly,
- singly, p, &p[singly] );
-fflush(stdout);
-#endif
- return (block_p *)&p[ singly ];
- }
-
-#if 0
-printf( "(t %d) ", block );
-fflush(stdout);
-#endif
- /*
- * Is the block number in the triply indirect portion?
- */
-
- if ( my_block <= LAST_TRIPLY_INDIRECT ) {
- my_block -= FIRST_TRIPLY_INDIRECT;
-
- singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
- doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
- triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
- doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
-
- p = info->triply_indirect;
-
- if ( malloc_it ) {
- if ( !p ) {
- p = memfile_alloc_block();
- if ( !p )
- return 0;
- info->triply_indirect = p;
- }
-
- p1 = (block_p *) p[ triply ];
- if ( !p1 ) {
- p1 = memfile_alloc_block();
- if ( !p1 )
- return 0;
- p[ triply ] = (block_p) p1;
- }
-
- p2 = (block_p *)p1[ doubly ];
- if ( !p2 ) {
- p2 = memfile_alloc_block();
- if ( !p2 )
- return 0;
- p1[ doubly ] = (block_p) p2;
- }
- return (block_p *)&p2[ singly ];
- }
-
- if ( !p )
- return 0;
-
-#if 0
-printf( "(t %d %d %d %d %d) ", block, my_block, triply, doubly, singly );
-fflush(stdout);
-#endif
- p1 = (block_p *) p[ triply ];
- if ( !p1 )
- return 0;
-
- p2 = (block_p *)p1[ doubly ];
- if ( !p )
- return 0;
-
- return (block_p *)&p2[ singly ];
- }
-
- /*
- * This means the requested block number is out of range.
- */
-
- return 0;
-}
-
-/*
- * memfile_alloc_block
- *
- * Allocate a block for an in-memory file.
- */
-
-int memfile_blocks_allocated = 0;
-
-void *memfile_alloc_block(void)
-{
- void *memory;
-
- memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK);
- if ( memory )
- memfile_blocks_allocated++;
-
- return memory;
-}
-
-/*
- * memfile_free_block
- *
- * Free a block from an in-memory file.
- */
-
-void memfile_free_block(
- void *memory
-)
-{
-#if 0
-printf( "(d %p) ", memory );
-fflush(stdout);
-#endif
- free(memory);
- memfile_blocks_allocated--;
-}
-
-
-/*
- * memfile_rmnod
- *
- * This routine is available from the optable to remove a node
- * from the IMFS file system.
- */
-
-int memfile_rmnod(
- rtems_filesystem_location_info_t *pathloc /* IN */
-)
-{
- IMFS_jnode_t *the_jnode;
-
- the_jnode = (IMFS_jnode_t *) pathloc->node_access;
-
- /*
- * Take the node out of the parent's chain that contains this node
- */
-
- if ( the_jnode->Parent != NULL ) {
- Chain_Extract( (Chain_Node *) the_jnode );
- the_jnode->Parent = NULL;
- }
-
- /*
- * Decrement the link counter and see if we can free the space.
- */
-
- the_jnode->st_nlink--;
- IMFS_update_ctime( the_jnode );
-
- /*
- * The file cannot be open and the link must be less than 1 to free.
- */
-
- if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) {
-
- /*
- * Is the rtems_filesystem_current is this node?
- */
-
- if ( rtems_filesystem_current.node_access == pathloc->node_access )
- rtems_filesystem_current.node_access = NULL;
-
- /*
- * Free memory associated with a memory file.
- */
-
- IMFS_memfile_remove( the_jnode );
-
- free( the_jnode );
- }
-
- return 0;
-
-}
-
-
diff --git a/c/src/exec/libfs/src/imfs/miniimfs_init.c b/c/src/exec/libfs/src/imfs/miniimfs_init.c
deleted file mode 100644
index b2e4fa936e..0000000000
--- a/c/src/exec/libfs/src/imfs/miniimfs_init.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Mini-IMFS Initialization
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h> /* for mkdir */
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdlib.h>
-
-#include <assert.h>
-
-#include "imfs.h"
-#include "libio_.h"
-
-#if defined(IMFS_DEBUG)
-#include <stdio.h>
-#endif
-
-/*
- * miniIMFS file system operations table
- */
-
-rtems_filesystem_operations_table miniIMFS_ops = {
- IMFS_eval_path,
- IMFS_evaluate_for_make,
- NULL, /* XXX IMFS_link, */
- NULL, /* XXX IMFS_unlink, */
- IMFS_node_type,
- IMFS_mknod,
- NULL, /* XXX IMFS_chown, */
- NULL, /* XXX IMFS_freenodinfo, */
- NULL, /* XXX IMFS_mount, */
- miniIMFS_initialize,
- NULL, /* XXX IMFS_unmount, */
- NULL, /* XXX IMFS_fsunmount, */
- NULL, /* XXX IMFS_utime, */
- NULL, /* XXX IMFS_evaluate_link, */
- NULL, /* XXX IMFS_symlink, */
- NULL /* XXX IMFS_readlink */
-};
-
-/*
- * miniIMFS_initialize
- */
-
-int miniIMFS_initialize(
- rtems_filesystem_mount_table_entry_t *temp_mt_entry
-)
-{
- IMFS_initialize_support(
- temp_mt_entry,
- &miniIMFS_ops,
- &rtems_filesystem_null_handlers, /* for memfiles */
- &rtems_filesystem_null_handlers /* for directories */
- );
- return 0;
-}
-
-
-
diff --git a/c/src/exec/libnetworking/Makefile.am b/c/src/exec/libnetworking/Makefile.am
deleted file mode 100644
index ce9cf6c399..0000000000
--- a/c/src/exec/libnetworking/Makefile.am
+++ /dev/null
@@ -1,15 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-
-SUBDIRS = include arpa kern machine sys vm lib libc net netinet nfs rtems \
- rtems_servers pppd rtems_webserver wrapup
-
-EXTRA_DIST = CHANGELOG bpfilter.h loop.h netdb.h opt_ipfw.h opt_mrouting.h \
- opt_tcpdebug.h poll.h resolv.h syslog.h
-
-include $(top_srcdir)/../../../automake/subdirs.am
-include $(top_srcdir)/../../../automake/local.am
diff --git a/c/src/exec/libnetworking/README b/c/src/exec/libnetworking/README
deleted file mode 100644
index d0c22ec688..0000000000
--- a/c/src/exec/libnetworking/README
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# $Id$
-#
-
-This is a snapshot of my attempt to fit the FreeBSD networking code into
-RTEMS. Things seem to be working!
-
-Things that need to be done:
- 1) More documentation!
- 2) Figure out what's still not working :-)
- 3) Rationalize the include files. Right now I have a special
- hack in the Makefile to ensure that I pick up the FreeBSD versions
- of the include files that are duplicated between RTEMS
- and FreeBSD.
- The network device driver source should move to the BSP source tree.
- 4) Have a look at all the FIXME comments.
- 5) Go through and make sure that all the source files are
- free of undesired copyright restrictions.
diff --git a/c/src/exec/libnetworking/arpa/Makefile.am b/c/src/exec/libnetworking/arpa/Makefile.am
deleted file mode 100644
index dba97b83d5..0000000000
--- a/c/src/exec/libnetworking/arpa/Makefile.am
+++ /dev/null
@@ -1,9 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-EXTRA_DIST = ftp.h inet.h nameser.h nameser_compat.h telnet.h
-
-include $(top_srcdir)/../../../automake/local.am
diff --git a/c/src/exec/libnetworking/arpa/ftp.h b/c/src/exec/libnetworking/arpa/ftp.h
deleted file mode 100644
index 584d290bc9..0000000000
--- a/c/src/exec/libnetworking/arpa/ftp.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright (c) 1983, 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ftp.h 8.1 (Berkeley) 6/2/93
- *
- * $Id$
- */
-
-#ifndef _ARPA_FTP_H_
-#define _ARPA_FTP_H_
-
-/* Definitions for FTP; see RFC-765. */
-
-/*
- * Reply codes.
- */
-#define PRELIM 1 /* positive preliminary */
-#define COMPLETE 2 /* positive completion */
-#define CONTINUE 3 /* positive intermediate */
-#define TRANSIENT 4 /* transient negative completion */
-#define ERROR 5 /* permanent negative completion */
-
-/*
- * Type codes
- */
-#define TYPE_A 1 /* ASCII */
-#define TYPE_E 2 /* EBCDIC */
-#define TYPE_I 3 /* image */
-#define TYPE_L 4 /* local byte size */
-
-#ifdef FTP_NAMES
-char *typenames[] = {"0", "ASCII", "EBCDIC", "Image", "Local" };
-#endif
-
-/*
- * Form codes
- */
-#define FORM_N 1 /* non-print */
-#define FORM_T 2 /* telnet format effectors */
-#define FORM_C 3 /* carriage control (ASA) */
-#ifdef FTP_NAMES
-char *formnames[] = {"0", "Nonprint", "Telnet", "Carriage-control" };
-#endif
-
-/*
- * Structure codes
- */
-#define STRU_F 1 /* file (no record structure) */
-#define STRU_R 2 /* record structure */
-#define STRU_P 3 /* page structure */
-#ifdef FTP_NAMES
-char *strunames[] = {"0", "File", "Record", "Page" };
-#endif
-
-/*
- * Mode types
- */
-#define MODE_S 1 /* stream */
-#define MODE_B 2 /* block */
-#define MODE_C 3 /* compressed */
-#ifdef FTP_NAMES
-char *modenames[] = {"0", "Stream", "Block", "Compressed" };
-#endif
-
-/*
- * Record Tokens
- */
-#define REC_ESC '\377' /* Record-mode Escape */
-#define REC_EOR '\001' /* Record-mode End-of-Record */
-#define REC_EOF '\002' /* Record-mode End-of-File */
-
-/*
- * Block Header
- */
-#define BLK_EOR 0x80 /* Block is End-of-Record */
-#define BLK_EOF 0x40 /* Block is End-of-File */
-#define BLK_ERRORS 0x20 /* Block is suspected of containing errors */
-#define BLK_RESTART 0x10 /* Block is Restart Marker */
-
-#define BLK_BYTECOUNT 2 /* Bytes in this block */
-
-#endif /* !_FTP_H_ */
diff --git a/c/src/exec/libnetworking/arpa/inet.h b/c/src/exec/libnetworking/arpa/inet.h
deleted file mode 100644
index ad5332e7ab..0000000000
--- a/c/src/exec/libnetworking/arpa/inet.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * -
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-/*
- * @(#)inet.h 8.1 (Berkeley) 6/2/93
- * From: Id: inet.h,v 8.5 1997/01/29 08:48:09 vixie Exp $
- * $Id$
- */
-
-#ifndef _ARPA_INET_H_
-#define _ARPA_INET_H_
-
-/* External definitions for functions in inet(3), addr2ascii(3) */
-
-#include <sys/types.h>
-#include <sys/cdefs.h>
-
-struct in_addr;
-
-#if 0 /* RTEMS -- Why rename these? */
-/* XXX all new diversions!! argh!! */
-#define inet_addr __inet_addr
-#define inet_aton __inet_aton
-#define inet_lnaof __inet_lnaof
-#define inet_makeaddr __inet_makeaddr
-#define inet_neta __inet_neta
-#define inet_netof __inet_netof
-#define inet_network __inet_network
-#define inet_net_ntop __inet_net_ntop
-#define inet_net_pton __inet_net_pton
-#define inet_ntoa __inet_ntoa
-#define inet_pton __inet_pton
-#define inet_ntop __inet_ntop
-#define inet_nsap_addr __inet_nsap_addr
-#define inet_nsap_ntoa __inet_nsap_ntoa
-#endif
-
-__BEGIN_DECLS
-int ascii2addr __P((int, const char *, void *));
-char *addr2ascii __P((int, const void *, int, char *));
-unsigned long inet_addr __P((const char *));
-int inet_aton __P((const char *, struct in_addr *));
-unsigned long inet_lnaof __P((struct in_addr));
-struct in_addr inet_makeaddr __P((u_long , u_long));
-char * inet_neta __P((u_long, char *, size_t));
-unsigned long inet_netof __P((struct in_addr));
-unsigned long inet_network __P((const char *));
-char *inet_net_ntop __P((int, const void *, int, char *, size_t));
-int inet_net_pton __P((int, const char *, void *, size_t));
-char *inet_ntoa __P((struct in_addr));
-int inet_pton __P((int, const char *, void *));
-const char *inet_ntop __P((int, const void *, char *, size_t));
-u_int inet_nsap_addr __P((const char *, u_char *, int));
-char *inet_nsap_ntoa __P((int, const u_char *, char *));
-__END_DECLS
-
-#endif /* !_INET_H_ */
diff --git a/c/src/exec/libnetworking/arpa/nameser.h b/c/src/exec/libnetworking/arpa/nameser.h
deleted file mode 100644
index 634dece37b..0000000000
--- a/c/src/exec/libnetworking/arpa/nameser.h
+++ /dev/null
@@ -1,448 +0,0 @@
-/*
- * Copyright (c) 1983, 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-/*
- * From: Id: nameser.h,v 8.16 1998/02/06 00:35:58 halley Exp
- * $Id$
- */
-
-#ifndef _ARPA_NAMESER_H_
-#define _ARPA_NAMESER_H_
-
-#define BIND_4_COMPAT
-
-#include <sys/types.h>
-#include <sys/cdefs.h>
-
-/*
- * revision information. this is the release date in YYYYMMDD format.
- * it can change every day so the right thing to do with it is use it
- * in preprocessor commands such as "#if (__NAMESER > 19931104)". do not
- * compare for equality; rather, use it to determine whether your libnameser.a
- * is new enough to contain a certain feature.
- */
-
-/* XXXRTH I made this bigger than __BIND in 4.9.5 T6B */
-#define __NAMESER 19961001 /* New interface version stamp. */
-
-/*
- * Define constants based on RFC 883, RFC 1034, RFC 1035
- */
-#define NS_PACKETSZ 512 /* maximum packet size */
-#define NS_MAXDNAME 1025 /* maximum domain name */
-#define NS_MAXCDNAME 255 /* maximum compressed domain name */
-#define NS_MAXLABEL 63 /* maximum length of domain label */
-#define NS_HFIXEDSZ 12 /* #/bytes of fixed data in header */
-#define NS_QFIXEDSZ 4 /* #/bytes of fixed data in query */
-#define NS_RRFIXEDSZ 10 /* #/bytes of fixed data in r record */
-#define NS_INT32SZ 4 /* #/bytes of data in a u_int32_t */
-#define NS_INT16SZ 2 /* #/bytes of data in a u_int16_t */
-#define NS_INT8SZ 1 /* #/bytes of data in a u_int8_t */
-#define NS_INADDRSZ 4 /* IPv4 T_A */
-#define NS_IN6ADDRSZ 16 /* IPv6 T_AAAA */
-#define NS_CMPRSFLGS 0xc0 /* Flag bits indicating name compression. */
-#define NS_DEFAULTPORT 53 /* For both TCP and UDP. */
-
-/*
- * These can be expanded with synonyms, just keep ns_parse.c:ns_parserecord()
- * in synch with it.
- */
-typedef enum __ns_sect {
- ns_s_qd = 0, /* Query: Question. */
- ns_s_zn = 0, /* Update: Zone. */
- ns_s_an = 1, /* Query: Answer. */
- ns_s_pr = 1, /* Update: Prerequisites. */
- ns_s_ns = 2, /* Query: Name servers. */
- ns_s_ud = 2, /* Update: Update. */
- ns_s_ar = 3, /* Query|Update: Additional records. */
- ns_s_max = 4
-} ns_sect;
-
-/*
- * This is a message handle. It is caller allocated and has no dynamic data.
- * This structure is intended to be opaque to all but ns_parse.c, thus the
- * leading _'s on the member names. Use the accessor functions, not the _'s.
- */
-typedef struct __ns_msg {
- const u_char *_msg, *_eom;
- u_int16_t _id, _flags, _counts[ns_s_max];
- const u_char *_sections[ns_s_max];
- ns_sect _sect;
- int _rrnum;
- const u_char *_ptr;
-} ns_msg;
-
-/* Private data structure - do not use from outside library. */
-struct _ns_flagdata { int mask, shift; };
-extern struct _ns_flagdata _ns_flagdata[];
-
-/* Accessor macros - this is part of the public interface. */
-#define ns_msg_getflag(handle, flag) ( \
- ((handle)._flags & _ns_flagdata[flag].mask) \
- >> _ns_flagdata[flag].shift \
- )
-#define ns_msg_id(handle) ((handle)._id + 0)
-#define ns_msg_base(handle) ((handle)._msg + 0)
-#define ns_msg_end(handle) ((handle)._eom + 0)
-#define ns_msg_size(handle) ((handle)._eom - (handle)._msg)
-#define ns_msg_count(handle, section) ((handle)._counts[section] + 0)
-
-/*
- * This is a parsed record. It is caller allocated and has no dynamic data.
- */
-typedef struct __ns_rr {
- char name[NS_MAXDNAME]; /* XXX need to malloc */
- u_int16_t type;
- u_int16_t class;
- u_int32_t ttl;
- u_int16_t rdlength;
- const u_char *rdata;
-} ns_rr;
-
-/* Accessor macros - this is part of the public interface. */
-#define ns_rr_name(rr) (((rr).name[0] != '\0') ? (rr).name : ".")
-#define ns_rr_type(rr) ((rr).type + 0)
-#define ns_rr_class(rr) ((rr).class + 0)
-#define ns_rr_ttl(rr) ((rr).ttl + 0)
-#define ns_rr_rdlen(rr) ((rr).rdlength + 0)
-#define ns_rr_rdata(rr) ((rr).rdata + 0)
-
-/*
- * These don't have to be in the same order as in the packet flags word,
- * and they can even overlap in some cases, but they will need to be kept
- * in synch with ns_parse.c:ns_flagdata[].
- */
-typedef enum __ns_flag {
- ns_f_qr, /* Question/Response. */
- ns_f_opcode, /* Operation code. */
- ns_f_aa, /* Authoritative Answer. */
- ns_f_tc, /* Truncation occurred. */
- ns_f_rd, /* Recursion Desired. */
- ns_f_ra, /* Recursion Available. */
- ns_f_z, /* MBZ. */
- ns_f_ad, /* Authentic Data (DNSSEC). */
- ns_f_cd, /* Checking Disabled (DNSSEC). */
- ns_f_rcode, /* Response code. */
- ns_f_max
-} ns_flag;
-
-/*
- * Currently defined opcodes.
- */
-typedef enum __ns_opcode {
- ns_o_query = 0, /* Standard query. */
- ns_o_iquery = 1, /* Inverse query (deprecated/unsupported). */
- ns_o_status = 2, /* Name server status query (unsupported). */
- /* Opcode 3 is undefined/reserved. */
- ns_o_notify = 4, /* Zone change notification. */
- ns_o_update = 5, /* Zone update message. */
- ns_o_max = 6
-} ns_opcode;
-
-/*
- * Currently defined response codes.
- */
-typedef enum __ns_rcode {
- ns_r_noerror = 0, /* No error occurred. */
- ns_r_formerr = 1, /* Format error. */
- ns_r_servfail = 2, /* Server failure. */
- ns_r_nxdomain = 3, /* Name error. */
- ns_r_notimpl = 4, /* Unimplemented. */
- ns_r_refused = 5, /* Operation refused. */
- /* these are for BIND_UPDATE */
- ns_r_yxdomain = 6, /* Name exists */
- ns_r_yxrrset = 7, /* RRset exists */
- ns_r_nxrrset = 8, /* RRset does not exist */
- ns_r_notauth = 9, /* Not authoritative for zone */
- ns_r_notzone = 10, /* Zone of record different from zone section */
- ns_r_max = 11
-} ns_rcode;
-
-/* BIND_UPDATE */
-typedef enum __ns_update_operation {
- ns_uop_delete = 0,
- ns_uop_add = 1,
- ns_uop_max = 2
-} ns_update_operation;
-
-/*
- * This RR-like structure is particular to UPDATE.
- */
-struct ns_updrec {
- struct ns_updrec *r_prev; /* prev record */
- struct ns_updrec *r_next; /* next record */
- u_int8_t r_section; /* ZONE/PREREQUISITE/UPDATE */
- char * r_dname; /* owner of the RR */
- u_int16_t r_class; /* class number */
- u_int16_t r_type; /* type number */
- u_int32_t r_ttl; /* time to live */
- u_char * r_data; /* rdata fields as text string */
- u_int16_t r_size; /* size of r_data field */
- int r_opcode; /* type of operation */
- /* following fields for private use by the resolver/server routines */
- struct ns_updrec *r_grpnext; /* next record when grouped */
- struct databuf *r_dp; /* databuf to process */
- struct databuf *r_deldp; /* databuf's deleted/overwritten */
- u_int16_t r_zone; /* zone number on server */
-};
-typedef struct ns_updrec ns_updrec;
-
-/*
- * Currently defined type values for resources and queries.
- */
-typedef enum __ns_type {
- ns_t_a = 1, /* Host address. */
- ns_t_ns = 2, /* Authoritative server. */
- ns_t_md = 3, /* Mail destination. */
- ns_t_mf = 4, /* Mail forwarder. */
- ns_t_cname = 5, /* Canonical name. */
- ns_t_soa = 6, /* Start of authority zone. */
- ns_t_mb = 7, /* Mailbox domain name. */
- ns_t_mg = 8, /* Mail group member. */
- ns_t_mr = 9, /* Mail rename name. */
- ns_t_null = 10, /* Null resource record. */
- ns_t_wks = 11, /* Well known service. */
- ns_t_ptr = 12, /* Domain name pointer. */
- ns_t_hinfo = 13, /* Host information. */
- ns_t_minfo = 14, /* Mailbox information. */
- ns_t_mx = 15, /* Mail routing information. */
- ns_t_txt = 16, /* Text strings. */
- ns_t_rp = 17, /* Responsible person. */
- ns_t_afsdb = 18, /* AFS cell database. */
- ns_t_x25 = 19, /* X_25 calling address. */
- ns_t_isdn = 20, /* ISDN calling address. */
- ns_t_rt = 21, /* Router. */
- ns_t_nsap = 22, /* NSAP address. */
- ns_t_nsap_ptr = 23, /* Reverse NSAP lookup (deprecated). */
- ns_t_sig = 24, /* Security signature. */
- ns_t_key = 25, /* Security key. */
- ns_t_px = 26, /* X.400 mail mapping. */
- ns_t_gpos = 27, /* Geographical position (withdrawn). */
- ns_t_aaaa = 28, /* Ip6 Address. */
- ns_t_loc = 29, /* Location Information. */
- ns_t_nxt = 30, /* Next domain (security). */
- ns_t_eid = 31, /* Endpoint identifier. */
- ns_t_nimloc = 32, /* Nimrod Locator. */
- ns_t_srv = 33, /* Server Selection. */
- ns_t_atma = 34, /* ATM Address */
- ns_t_naptr = 35, /* Naming Authority PoinTeR */
- /* Query type values which do not appear in resource records. */
- ns_t_ixfr = 251, /* Incremental zone transfer. */
- ns_t_axfr = 252, /* Transfer zone of authority. */
- ns_t_mailb = 253, /* Transfer mailbox records. */
- ns_t_maila = 254, /* Transfer mail agent records. */
- ns_t_any = 255, /* Wildcard match. */
- ns_t_max = 65536
-} ns_type;
-
-/*
- * Values for class field
- */
-typedef enum __ns_class {
- ns_c_in = 1, /* Internet. */
- /* Class 2 unallocated/unsupported. */
- ns_c_chaos = 3, /* MIT Chaos-net. */
- ns_c_hs = 4, /* MIT Hesiod. */
- /* Query class values which do not appear in resource records */
- ns_c_none = 254, /* for prereq. sections in update requests */
- ns_c_any = 255, /* Wildcard match. */
- ns_c_max = 65536
-} ns_class;
-
-/*
- * Flags field of the KEY RR rdata
- */
-#define NS_KEY_TYPEMASK 0xC000 /* Mask for "type" bits */
-#define NS_KEY_TYPE_AUTH_CONF 0x0000 /* Key usable for both */
-#define NS_KEY_TYPE_CONF_ONLY 0x8000 /* Key usable for confidentiality */
-#define NS_KEY_TYPE_AUTH_ONLY 0x4000 /* Key usable for authentication */
-#define NS_KEY_TYPE_NO_KEY 0xC000 /* No key usable for either; no key */
-/* The type bits can also be interpreted independently, as single bits: */
-#define NS_KEY_NO_AUTH 0x8000 /* Key unusable for authentication */
-#define NS_KEY_NO_CONF 0x4000 /* Key unusable for confidentiality */
-#define NS_KEY_EXPERIMENTAL 0x2000 /* Security is *mandatory* if bit=0 */
-#define NS_KEY_RESERVED3 0x1000 /* reserved - must be zero */
-#define NS_KEY_RESERVED4 0x0800 /* reserved - must be zero */
-#define NS_KEY_USERACCOUNT 0x0400 /* key is assoc. with a user acct */
-#define NS_KEY_ENTITY 0x0200 /* key is assoc. with entity eg host */
-#define NS_KEY_ZONEKEY 0x0100 /* key is zone key */
-#define NS_KEY_IPSEC 0x0080 /* key is for IPSEC (host or user)*/
-#define NS_KEY_EMAIL 0x0040 /* key is for email (MIME security) */
-#define NS_KEY_RESERVED10 0x0020 /* reserved - must be zero */
-#define NS_KEY_RESERVED11 0x0010 /* reserved - must be zero */
-#define NS_KEY_SIGNATORYMASK 0x000F /* key can sign RR's of same name */
-
-#define NS_KEY_RESERVED_BITMASK ( NS_KEY_RESERVED3 | \
- NS_KEY_RESERVED4 | \
- NS_KEY_RESERVED10 | \
- NS_KEY_RESERVED11 )
-
-/* The Algorithm field of the KEY and SIG RR's is an integer, {1..254} */
-#define NS_ALG_MD5RSA 1 /* MD5 with RSA */
-#define NS_ALG_EXPIRE_ONLY 253 /* No alg, no security */
-#define NS_ALG_PRIVATE_OID 254 /* Key begins with OID giving alg */
-
-/* Signatures */
-#define NS_MD5RSA_MIN_BITS 512 /* Size of a mod or exp in bits */
-#define NS_MD5RSA_MAX_BITS 2552
- /* Total of binary mod and exp */
-#define NS_MD5RSA_MAX_BYTES ((NS_MD5RSA_MAX_BITS+7/8)*2+3)
- /* Max length of text sig block */
-#define NS_MD5RSA_MAX_BASE64 (((NS_MD5RSA_MAX_BYTES+2)/3)*4)
-
-/* Offsets into SIG record rdata to find various values */
-#define NS_SIG_TYPE 0 /* Type flags */
-#define NS_SIG_ALG 2 /* Algorithm */
-#define NS_SIG_LABELS 3 /* How many labels in name */
-#define NS_SIG_OTTL 4 /* Original TTL */
-#define NS_SIG_EXPIR 8 /* Expiration time */
-#define NS_SIG_SIGNED 12 /* Signature time */
-#define NS_SIG_FOOT 16 /* Key footprint */
-#define NS_SIG_SIGNER 18 /* Domain name of who signed it */
-
-/* How RR types are represented as bit-flags in NXT records */
-#define NS_NXT_BITS 8
-#define NS_NXT_BIT_SET( n,p) (p[(n)/NS_NXT_BITS] |= (0x80>>((n)%NS_NXT_BITS)))
-#define NS_NXT_BIT_CLEAR(n,p) (p[(n)/NS_NXT_BITS] &= ~(0x80>>((n)%NS_NXT_BITS)))
-#define NS_NXT_BIT_ISSET(n,p) (p[(n)/NS_NXT_BITS] & (0x80>>((n)%NS_NXT_BITS)))
-
-
-/*
- * Inline versions of get/put short/long. Pointer is advanced.
- */
-#define NS_GET16(s, cp) { \
- register u_char *t_cp = (u_char *)(cp); \
- (s) = ((u_int16_t)t_cp[0] << 8) \
- | ((u_int16_t)t_cp[1]) \
- ; \
- (cp) += NS_INT16SZ; \
-}
-
-#define NS_GET32(l, cp) { \
- register u_char *t_cp = (u_char *)(cp); \
- (l) = ((u_int32_t)t_cp[0] << 24) \
- | ((u_int32_t)t_cp[1] << 16) \
- | ((u_int32_t)t_cp[2] << 8) \
- | ((u_int32_t)t_cp[3]) \
- ; \
- (cp) += NS_INT32SZ; \
-}
-
-#define NS_PUT16(s, cp) { \
- register u_int16_t t_s = (u_int16_t)(s); \
- register u_char *t_cp = (u_char *)(cp); \
- *t_cp++ = t_s >> 8; \
- *t_cp = t_s; \
- (cp) += NS_INT16SZ; \
-}
-
-#define NS_PUT32(l, cp) { \
- register u_int32_t t_l = (u_int32_t)(l); \
- register u_char *t_cp = (u_char *)(cp); \
- *t_cp++ = t_l >> 24; \
- *t_cp++ = t_l >> 16; \
- *t_cp++ = t_l >> 8; \
- *t_cp = t_l; \
- (cp) += NS_INT32SZ; \
-}
-
-/*
- * ANSI C identifier hiding.
- */
-#define ns_get16 __ns_get16
-#define ns_get32 __ns_get32
-#define ns_put16 __ns_put16
-#define ns_put32 __ns_put32
-#define ns_initparse __ns_initparse
-#define ns_parserr __ns_parserr
-#define ns_sprintrr __ns_sprintrr
-#define ns_sprintrrf __ns_sprintrrf
-#define ns_format_ttl __ns_format_ttl
-#define ns_parse_ttl __ns_parse_ttl
-#define ns_name_ntop __ns_name_ntop
-#define ns_name_pton __ns_name_pton
-#define ns_name_unpack __ns_name_unpack
-#define ns_name_pack __ns_name_pack
-#define ns_name_compress __ns_name_compress
-#define ns_name_uncompress __ns_name_uncompress
-
-__BEGIN_DECLS
-u_int ns_get16 __P((const u_char *));
-u_long ns_get32 __P((const u_char *));
-void ns_put16 __P((u_int, u_char *));
-void ns_put32 __P((u_long, u_char *));
-int ns_initparse __P((const u_char *, int, ns_msg *));
-int ns_parserr __P((ns_msg *, ns_sect, int, ns_rr *));
-int ns_sprintrr __P((const ns_msg *, const ns_rr *,
- const char *, const char *, char *, size_t));
-int ns_sprintrrf __P((const u_char *, size_t, const char *,
- ns_class, ns_type, u_long, const u_char *,
- size_t, const char *, const char *,
- char *, size_t));
-int ns_format_ttl __P((u_long, char *, size_t));
-int ns_parse_ttl __P((const char *, u_long *));
-int ns_name_ntop __P((const u_char *, char *, size_t));
-int ns_name_pton __P((const char *, u_char *, size_t));
-int ns_name_unpack __P((const u_char *, const u_char *,
- const u_char *, u_char *, size_t));
-int ns_name_pack __P((const u_char *, u_char *, int,
- const u_char **, const u_char **));
-int ns_name_uncompress __P((const u_char *, const u_char *,
- const u_char *, char *, size_t));
-int ns_name_compress __P((const char *, u_char *, size_t,
- const u_char **, const u_char **));
-int ns_name_skip __P((const u_char **, const u_char *));
-__END_DECLS
-
-#ifdef BIND_4_COMPAT
-#include <arpa/nameser_compat.h>
-#endif
-
-#endif /* !_ARPA_NAMESER_H_ */
diff --git a/c/src/exec/libnetworking/arpa/nameser_compat.h b/c/src/exec/libnetworking/arpa/nameser_compat.h
deleted file mode 100644
index 2ab5b47386..0000000000
--- a/c/src/exec/libnetworking/arpa/nameser_compat.h
+++ /dev/null
@@ -1,194 +0,0 @@
-/* Copyright (c) 1983, 1989
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * from nameser.h 8.1 (Berkeley) 6/2/93
- * From: Id: nameser_compat.h,v 8.9 1998/03/20 23:25:10 halley Exp
- * $Id$
- */
-
-#ifndef _ARPA_NAMESER_COMPAT_
-#define _ARPA_NAMESER_COMPAT_
-
-#define __BIND 19950621 /* (DEAD) interface version stamp. */
-
-#include <machine/endian.h>
-
-#if !defined(BYTE_ORDER) || \
- (BYTE_ORDER != BIG_ENDIAN && BYTE_ORDER != LITTLE_ENDIAN && \
- BYTE_ORDER != PDP_ENDIAN)
- /* you must determine what the correct bit order is for
- * your compiler - the next line is an intentional error
- * which will force your compiles to bomb until you fix
- * the above macros.
- */
- error "Undefined or invalid BYTE_ORDER";
-#endif
-
-/*
- * Structure for query header. The order of the fields is machine- and
- * compiler-dependent, depending on the byte/bit order and the layout
- * of bit fields. We use bit fields only in int variables, as this
- * is all ANSI requires. This requires a somewhat confusing rearrangement.
- */
-
-typedef struct {
- unsigned id :16; /* query identification number */
-#if BYTE_ORDER == BIG_ENDIAN
- /* fields in third byte */
- unsigned qr: 1; /* response flag */
- unsigned opcode: 4; /* purpose of message */
- unsigned aa: 1; /* authoritive answer */
- unsigned tc: 1; /* truncated message */
- unsigned rd: 1; /* recursion desired */
- /* fields in fourth byte */
- unsigned ra: 1; /* recursion available */
- unsigned unused :1; /* unused bits (MBZ as of 4.9.3a3) */
- unsigned ad: 1; /* authentic data from named */
- unsigned cd: 1; /* checking disabled by resolver */
- unsigned rcode :4; /* response code */
-#endif
-#if BYTE_ORDER == LITTLE_ENDIAN || BYTE_ORDER == PDP_ENDIAN
- /* fields in third byte */
- unsigned rd :1; /* recursion desired */
- unsigned tc :1; /* truncated message */
- unsigned aa :1; /* authoritive answer */
- unsigned opcode :4; /* purpose of message */
- unsigned qr :1; /* response flag */
- /* fields in fourth byte */
- unsigned rcode :4; /* response code */
- unsigned cd: 1; /* checking disabled by resolver */
- unsigned ad: 1; /* authentic data from named */
- unsigned unused :1; /* unused bits (MBZ as of 4.9.3a3) */
- unsigned ra :1; /* recursion available */
-#endif
- /* remaining bytes */
- unsigned qdcount :16; /* number of question entries */
- unsigned ancount :16; /* number of answer entries */
- unsigned nscount :16; /* number of authority entries */
- unsigned arcount :16; /* number of resource entries */
-} HEADER;
-
-#define PACKETSZ NS_PACKETSZ
-#define MAXDNAME NS_MAXDNAME
-#define MAXCDNAME NS_MAXCDNAME
-#define MAXLABEL NS_MAXLABEL
-#define HFIXEDSZ NS_HFIXEDSZ
-#define QFIXEDSZ NS_QFIXEDSZ
-#define RRFIXEDSZ NS_RRFIXEDSZ
-#define INT32SZ NS_INT32SZ
-#define INT16SZ NS_INT16SZ
-#define INADDRSZ NS_INADDRSZ
-#define IN6ADDRSZ NS_IN6ADDRSZ
-#define INDIR_MASK NS_CMPRSFLGS
-#define NAMESERVER_PORT NS_DEFAULTPORT
-
-#define S_ZONE ns_s_zn
-#define S_PREREQ ns_s_pr
-#define S_UPDATE ns_s_ud
-#define S_ADDT ns_s_ar
-
-#define QUERY ns_o_query
-#define IQUERY ns_o_iquery
-#define STATUS ns_o_status
-#define NS_NOTIFY_OP ns_o_notify
-#define NS_UPDATE_OP ns_o_update
-
-#define NOERROR ns_r_noerror
-#define FORMERR ns_r_formerr
-#define SERVFAIL ns_r_servfail
-#define NXDOMAIN ns_r_nxdomain
-#define NOTIMP ns_r_notimpl
-#define REFUSED ns_r_refused
-#define YXDOMAIN ns_r_yxdomain
-#define YXRRSET ns_r_yxrrset
-#define NXRRSET ns_r_nxrrset
-#define NOTAUTH ns_r_notauth
-#define NOTZONE ns_r_notzone
-
-#define DELETE ns_uop_delete
-#define ADD ns_uop_add
-
-#define T_A ns_t_a
-#define T_NS ns_t_ns
-#define T_MD ns_t_md
-#define T_MF ns_t_mf
-#define T_CNAME ns_t_cname
-#define T_SOA ns_t_soa
-#define T_MB ns_t_mb
-#define T_MG ns_t_mg
-#define T_MR ns_t_mr
-#define T_NULL ns_t_null
-#define T_WKS ns_t_wks
-#define T_PTR ns_t_ptr
-#define T_HINFO ns_t_hinfo
-#define T_MINFO ns_t_minfo
-#define T_MX ns_t_mx
-#define T_TXT ns_t_txt
-#define T_RP ns_t_rp
-#define T_AFSDB ns_t_afsdb
-#define T_X25 ns_t_x25
-#define T_ISDN ns_t_isdn
-#define T_RT ns_t_rt
-#define T_NSAP ns_t_nsap
-#define T_NSAP_PTR ns_t_nsap_ptr
-#define T_SIG ns_t_sig
-#define T_KEY ns_t_key
-#define T_PX ns_t_px
-#define T_GPOS ns_t_gpos
-#define T_AAAA ns_t_aaaa
-#define T_LOC ns_t_loc
-#define T_NXT ns_t_nxt
-#define T_EID ns_t_eid
-#define T_NIMLOC ns_t_nimloc
-#define T_SRV ns_t_srv
-#define T_ATMA ns_t_atma
-#define T_NAPTR ns_t_naptr
-#define T_IXFR ns_t_ixfr
-#define T_AXFR ns_t_axfr
-#define T_MAILB ns_t_mailb
-#define T_MAILA ns_t_maila
-#define T_ANY ns_t_any
-
-#define C_IN ns_c_in
-#define C_CHAOS ns_c_chaos
-#define C_HS ns_c_hs
-/* BIND_UPDATE */
-#define C_NONE ns_c_none
-#define C_ANY ns_c_any
-
-#define GETSHORT NS_GET16
-#define GETLONG NS_GET32
-#define PUTSHORT NS_PUT16
-#define PUTLONG NS_PUT32
-
-#endif /* _ARPA_NAMESER_COMPAT_ */
diff --git a/c/src/exec/libnetworking/arpa/telnet.h b/c/src/exec/libnetworking/arpa/telnet.h
deleted file mode 100644
index 09b85692da..0000000000
--- a/c/src/exec/libnetworking/arpa/telnet.h
+++ /dev/null
@@ -1,342 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)telnet.h 8.2 (Berkeley) 12/15/93
- *
- * $Id$
- */
-
-#ifndef _ARPA_TELNET_H_
-#define _ARPA_TELNET_H_
-
-/*
- * Definitions for the TELNET protocol.
- */
-#define IAC 255 /* interpret as command: */
-#define DONT 254 /* you are not to use option */
-#define DO 253 /* please, you use option */
-#define WONT 252 /* I won't use option */
-#define WILL 251 /* I will use option */
-#define SB 250 /* interpret as subnegotiation */
-#define GA 249 /* you may reverse the line */
-#define EL 248 /* erase the current line */
-#define EC 247 /* erase the current character */
-#define AYT 246 /* are you there */
-#define AO 245 /* abort output--but let prog finish */
-#define IP 244 /* interrupt process--permanently */
-#define BREAK 243 /* break */
-#define DM 242 /* data mark--for connect. cleaning */
-#define NOP 241 /* nop */
-#define SE 240 /* end sub negotiation */
-#define EOR 239 /* end of record (transparent mode) */
-#define ABORT 238 /* Abort process */
-#define SUSP 237 /* Suspend process */
-#define xEOF 236 /* End of file: EOF is already used... */
-
-#define SYNCH 242 /* for telfunc calls */
-
-#ifdef TELCMDS
-char *telcmds[] = {
- "EOF", "SUSP", "ABORT", "EOR",
- "SE", "NOP", "DMARK", "BRK", "IP", "AO", "AYT", "EC",
- "EL", "GA", "SB", "WILL", "WONT", "DO", "DONT", "IAC",
- 0
-};
-#else
-extern char *telcmds[];
-#endif
-
-#define TELCMD_FIRST xEOF
-#define TELCMD_LAST IAC
-#define TELCMD_OK(x) ((unsigned int)(x) <= TELCMD_LAST && \
- (unsigned int)(x) >= TELCMD_FIRST)
-#define TELCMD(x) telcmds[(x)-TELCMD_FIRST]
-
-/* telnet options */
-#define TELOPT_BINARY 0 /* 8-bit data path */
-#define TELOPT_ECHO 1 /* echo */
-#define TELOPT_RCP 2 /* prepare to reconnect */
-#define TELOPT_SGA 3 /* suppress go ahead */
-#define TELOPT_NAMS 4 /* approximate message size */
-#define TELOPT_STATUS 5 /* give status */
-#define TELOPT_TM 6 /* timing mark */
-#define TELOPT_RCTE 7 /* remote controlled transmission and echo */
-#define TELOPT_NAOL 8 /* negotiate about output line width */
-#define TELOPT_NAOP 9 /* negotiate about output page size */
-#define TELOPT_NAOCRD 10 /* negotiate about CR disposition */
-#define TELOPT_NAOHTS 11 /* negotiate about horizontal tabstops */
-#define TELOPT_NAOHTD 12 /* negotiate about horizontal tab disposition */
-#define TELOPT_NAOFFD 13 /* negotiate about formfeed disposition */
-#define TELOPT_NAOVTS 14 /* negotiate about vertical tab stops */
-#define TELOPT_NAOVTD 15 /* negotiate about vertical tab disposition */
-#define TELOPT_NAOLFD 16 /* negotiate about output LF disposition */
-#define TELOPT_XASCII 17 /* extended ascic character set */
-#define TELOPT_LOGOUT 18 /* force logout */
-#define TELOPT_BM 19 /* byte macro */
-#define TELOPT_DET 20 /* data entry terminal */
-#define TELOPT_SUPDUP 21 /* supdup protocol */
-#define TELOPT_SUPDUPOUTPUT 22 /* supdup output */
-#define TELOPT_SNDLOC 23 /* send location */
-#define TELOPT_TTYPE 24 /* terminal type */
-#define TELOPT_EOR 25 /* end or record */
-#define TELOPT_TUID 26 /* TACACS user identification */
-#define TELOPT_OUTMRK 27 /* output marking */
-#define TELOPT_TTYLOC 28 /* terminal location number */
-#define TELOPT_3270REGIME 29 /* 3270 regime */
-#define TELOPT_X3PAD 30 /* X.3 PAD */
-#define TELOPT_NAWS 31 /* window size */
-#define TELOPT_TSPEED 32 /* terminal speed */
-#define TELOPT_LFLOW 33 /* remote flow control */
-#define TELOPT_LINEMODE 34 /* Linemode option */
-#define TELOPT_XDISPLOC 35 /* X Display Location */
-#define TELOPT_OLD_ENVIRON 36 /* Old - Environment variables */
-#define TELOPT_AUTHENTICATION 37/* Authenticate */
-#define TELOPT_ENCRYPT 38 /* Encryption option */
-#define TELOPT_NEW_ENVIRON 39 /* New - Environment variables */
-#define TELOPT_EXOPL 255 /* extended-options-list */
-
-
-#define NTELOPTS (1+TELOPT_NEW_ENVIRON)
-#ifdef TELOPTS
-char *telopts[NTELOPTS+1] = {
- "BINARY", "ECHO", "RCP", "SUPPRESS GO AHEAD", "NAME",
- "STATUS", "TIMING MARK", "RCTE", "NAOL", "NAOP",
- "NAOCRD", "NAOHTS", "NAOHTD", "NAOFFD", "NAOVTS",
- "NAOVTD", "NAOLFD", "EXTEND ASCII", "LOGOUT", "BYTE MACRO",
- "DATA ENTRY TERMINAL", "SUPDUP", "SUPDUP OUTPUT",
- "SEND LOCATION", "TERMINAL TYPE", "END OF RECORD",
- "TACACS UID", "OUTPUT MARKING", "TTYLOC",
- "3270 REGIME", "X.3 PAD", "NAWS", "TSPEED", "LFLOW",
- "LINEMODE", "XDISPLOC", "OLD-ENVIRON", "AUTHENTICATION",
- "ENCRYPT", "NEW-ENVIRON",
- 0
-};
-#define TELOPT_FIRST TELOPT_BINARY
-#define TELOPT_LAST TELOPT_NEW_ENVIRON
-#define TELOPT_OK(x) ((unsigned int)(x) <= TELOPT_LAST)
-#define TELOPT(x) telopts[(x)-TELOPT_FIRST]
-#endif
-
-/* sub-option qualifiers */
-#define TELQUAL_IS 0 /* option is... */
-#define TELQUAL_SEND 1 /* send option */
-#define TELQUAL_INFO 2 /* ENVIRON: informational version of IS */
-#define TELQUAL_REPLY 2 /* AUTHENTICATION: client version of IS */
-#define TELQUAL_NAME 3 /* AUTHENTICATION: client version of IS */
-
-#define LFLOW_OFF 0 /* Disable remote flow control */
-#define LFLOW_ON 1 /* Enable remote flow control */
-#define LFLOW_RESTART_ANY 2 /* Restart output on any char */
-#define LFLOW_RESTART_XON 3 /* Restart output only on XON */
-
-/*
- * LINEMODE suboptions
- */
-
-#define LM_MODE 1
-#define LM_FORWARDMASK 2
-#define LM_SLC 3
-
-#define MODE_EDIT 0x01
-#define MODE_TRAPSIG 0x02
-#define MODE_ACK 0x04
-#define MODE_SOFT_TAB 0x08
-#define MODE_LIT_ECHO 0x10
-
-#define MODE_MASK 0x1f
-
-/* Not part of protocol, but needed to simplify things... */
-#define MODE_FLOW 0x0100
-#define MODE_ECHO 0x0200
-#define MODE_INBIN 0x0400
-#define MODE_OUTBIN 0x0800
-#define MODE_FORCE 0x1000
-
-#define SLC_SYNCH 1
-#define SLC_BRK 2
-#define SLC_IP 3
-#define SLC_AO 4
-#define SLC_AYT 5
-#define SLC_EOR 6
-#define SLC_ABORT 7
-#define SLC_EOF 8
-#define SLC_SUSP 9
-#define SLC_EC 10
-#define SLC_EL 11
-#define SLC_EW 12
-#define SLC_RP 13
-#define SLC_LNEXT 14
-#define SLC_XON 15
-#define SLC_XOFF 16
-#define SLC_FORW1 17
-#define SLC_FORW2 18
-#define SLC_MCL 19
-#define SLC_MCR 20
-#define SLC_MCWL 21
-#define SLC_MCWR 22
-#define SLC_MCBOL 23
-#define SLC_MCEOL 24
-#define SLC_INSRT 25
-#define SLC_OVER 26
-#define SLC_ECR 27
-#define SLC_EWR 28
-#define SLC_EBOL 29
-#define SLC_EEOL 30
-
-#define NSLC 30
-
-/*
- * For backwards compatability, we define SLC_NAMES to be the
- * list of names if SLC_NAMES is not defined.
- */
-#define SLC_NAMELIST "0", "SYNCH", "BRK", "IP", "AO", "AYT", "EOR", \
- "ABORT", "EOF", "SUSP", "EC", "EL", "EW", "RP", \
- "LNEXT", "XON", "XOFF", "FORW1", "FORW2", \
- "MCL", "MCR", "MCWL", "MCWR", "MCBOL", \
- "MCEOL", "INSRT", "OVER", "ECR", "EWR", \
- "EBOL", "EEOL", \
- 0
-
-#ifdef SLC_NAMES
-char *slc_names[] = {
- SLC_NAMELIST
-};
-#else
-extern char *slc_names[];
-#define SLC_NAMES SLC_NAMELIST
-#endif
-
-#define SLC_NAME_OK(x) ((unsigned int)(x) <= NSLC)
-#define SLC_NAME(x) slc_names[x]
-
-#define SLC_NOSUPPORT 0
-#define SLC_CANTCHANGE 1
-#define SLC_VARIABLE 2
-#define SLC_DEFAULT 3
-#define SLC_LEVELBITS 0x03
-
-#define SLC_FUNC 0
-#define SLC_FLAGS 1
-#define SLC_VALUE 2
-
-#define SLC_ACK 0x80
-#define SLC_FLUSHIN 0x40
-#define SLC_FLUSHOUT 0x20
-
-#define OLD_ENV_VAR 1
-#define OLD_ENV_VALUE 0
-#define NEW_ENV_VAR 0
-#define NEW_ENV_VALUE 1
-#define ENV_ESC 2
-#define ENV_USERVAR 3
-
-/*
- * AUTHENTICATION suboptions
- */
-
-/*
- * Who is authenticating who ...
- */
-#define AUTH_WHO_CLIENT 0 /* Client authenticating server */
-#define AUTH_WHO_SERVER 1 /* Server authenticating client */
-#define AUTH_WHO_MASK 1
-
-/*
- * amount of authentication done
- */
-#define AUTH_HOW_ONE_WAY 0
-#define AUTH_HOW_MUTUAL 2
-#define AUTH_HOW_MASK 2
-
-#define AUTHTYPE_NULL 0
-#define AUTHTYPE_KERBEROS_V4 1
-#define AUTHTYPE_KERBEROS_V5 2
-#define AUTHTYPE_SPX 3
-#define AUTHTYPE_MINK 4
-#define AUTHTYPE_CNT 5
-
-#define AUTHTYPE_TEST 99
-
-#ifdef AUTH_NAMES
-char *authtype_names[] = {
- "NULL", "KERBEROS_V4", "KERBEROS_V5", "SPX", "MINK",
- 0
-};
-#else
-extern char *authtype_names[];
-#endif
-
-#define AUTHTYPE_NAME_OK(x) ((unsigned int)(x) < AUTHTYPE_CNT)
-#define AUTHTYPE_NAME(x) authtype_names[x]
-
-/*
- * ENCRYPTion suboptions
- */
-#define ENCRYPT_IS 0 /* I pick encryption type ... */
-#define ENCRYPT_SUPPORT 1 /* I support encryption types ... */
-#define ENCRYPT_REPLY 2 /* Initial setup response */
-#define ENCRYPT_START 3 /* Am starting to send encrypted */
-#define ENCRYPT_END 4 /* Am ending encrypted */
-#define ENCRYPT_REQSTART 5 /* Request you start encrypting */
-#define ENCRYPT_REQEND 6 /* Request you end encrypting */
-#define ENCRYPT_ENC_KEYID 7
-#define ENCRYPT_DEC_KEYID 8
-#define ENCRYPT_CNT 9
-
-#define ENCTYPE_ANY 0
-#define ENCTYPE_DES_CFB64 1
-#define ENCTYPE_DES_OFB64 2
-#define ENCTYPE_CNT 3
-
-#ifdef ENCRYPT_NAMES
-char *encrypt_names[] = {
- "IS", "SUPPORT", "REPLY", "START", "END",
- "REQUEST-START", "REQUEST-END", "ENC-KEYID", "DEC-KEYID",
- 0
-};
-char *enctype_names[] = {
- "ANY", "DES_CFB64", "DES_OFB64",
- 0
-};
-#else
-extern char *encrypt_names[];
-extern char *enctype_names[];
-#endif
-
-
-#define ENCRYPT_NAME_OK(x) ((unsigned int)(x) < ENCRYPT_CNT)
-#define ENCRYPT_NAME(x) encrypt_names[x]
-
-#define ENCTYPE_NAME_OK(x) ((unsigned int)(x) < ENCTYPE_CNT)
-#define ENCTYPE_NAME(x) enctype_names[x]
-
-#endif /* !_TELNET_H_ */
diff --git a/c/src/exec/libnetworking/bpfilter.h b/c/src/exec/libnetworking/bpfilter.h
deleted file mode 100644
index 5a6ee0337b..0000000000
--- a/c/src/exec/libnetworking/bpfilter.h
+++ /dev/null
@@ -1,6 +0,0 @@
-/*
- * $Id$
- */
-
-/* intentionally empty file */
-
diff --git a/c/src/exec/libnetworking/kern/Makefile.am b/c/src/exec/libnetworking/kern/Makefile.am
deleted file mode 100644
index aedc2bbadf..0000000000
--- a/c/src/exec/libnetworking/kern/Makefile.am
+++ /dev/null
@@ -1,35 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-LIBNAME = lib.a
-LIB = $(ARCH)/$(LIBNAME)
-
-C_FILES = kern_subr.c uipc_domain.c uipc_mbuf.c uipc_socket.c uipc_socket2.c
-C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
-
-OBJS = $(C_O_FILES)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../automake/lib.am
-
-#
-# Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -D_COMPILING_BSD_KERNEL_ -DKERNEL -DINET -DNFS -DDIAGNOSTIC \
- -DBOOTP_COMPAT
-
-$(LIB): $(OBJS)
- $(make-library)
-
-all-local: $(ARCH) $(OBJS) $(LIB)
-
-.PRECIOUS: $(LIB)
-
-EXTRA_DIST = kern_subr.c uipc_domain.c uipc_mbuf.c uipc_socket.c \
- uipc_socket2.c
-
-include $(top_srcdir)/../../../automake/local.am
diff --git a/c/src/exec/libnetworking/kern/kern_subr.c b/c/src/exec/libnetworking/kern/kern_subr.c
deleted file mode 100644
index 71e51fc442..0000000000
--- a/c/src/exec/libnetworking/kern/kern_subr.c
+++ /dev/null
@@ -1,206 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1991, 1993
- * The Regents of the University of California. All rights reserved.
- * (c) UNIX System Laboratories, Inc.
- * All or some portions of this file are derived from material licensed
- * to the University of California by American Telephone and Telegraph
- * Co. or Unix System Laboratories, Inc. and are reproduced herein with
- * the permission of UNIX System Laboratories, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)kern_subr.c 8.3 (Berkeley) 1/21/94
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/proc.h>
-#include <sys/malloc.h>
-#include <sys/queue.h>
-
-int
-uiomove(cp, n, uio)
- register caddr_t cp;
- register int n;
- register struct uio *uio;
-{
- register struct iovec *iov;
- u_int cnt;
- int error;
-
-#ifdef DIAGNOSTIC
- if (uio->uio_rw != UIO_READ && uio->uio_rw != UIO_WRITE)
- panic("uiomove: mode");
-#endif
- while (n > 0 && uio->uio_resid) {
- iov = uio->uio_iov;
- cnt = iov->iov_len;
- if (cnt == 0) {
- uio->uio_iov++;
- uio->uio_iovcnt--;
- continue;
- }
- if (cnt > n)
- cnt = n;
-
- switch (uio->uio_segflg) {
-
- case UIO_USERSPACE:
- case UIO_USERISPACE:
- if (uio->uio_rw == UIO_READ)
- error = copyout(cp, iov->iov_base, cnt);
- else
- error = copyin(iov->iov_base, cp, cnt);
- if (error)
- return (error);
- break;
-
- case UIO_SYSSPACE:
- if (uio->uio_rw == UIO_READ)
- bcopy((caddr_t)cp, iov->iov_base, cnt);
- else
- bcopy(iov->iov_base, (caddr_t)cp, cnt);
- break;
- case UIO_NOCOPY:
- break;
- }
- iov->iov_base += cnt;
- iov->iov_len -= cnt;
- uio->uio_resid -= cnt;
- uio->uio_offset += cnt;
- cp += cnt;
- n -= cnt;
- }
- return (0);
-}
-
-#ifdef vax /* unused except by ct.c, other oddities XXX */
-/*
- * Get next character written in by user from uio.
- */
-int
-uwritec(uio)
- struct uio *uio;
-{
- register struct iovec *iov;
- register int c;
-
- if (uio->uio_resid <= 0)
- return (-1);
-again:
- if (uio->uio_iovcnt <= 0)
- panic("uwritec");
- iov = uio->uio_iov;
- if (iov->iov_len == 0) {
- uio->uio_iov++;
- if (--uio->uio_iovcnt == 0)
- return (-1);
- goto again;
- }
- switch (uio->uio_segflg) {
-
- case UIO_USERSPACE:
- c = fubyte(iov->iov_base);
- break;
-
- case UIO_SYSSPACE:
- c = *(u_char *) iov->iov_base;
- break;
-
- case UIO_USERISPACE:
- c = fuibyte(iov->iov_base);
- break;
- }
- if (c < 0)
- return (-1);
- iov->iov_base++;
- iov->iov_len--;
- uio->uio_resid--;
- uio->uio_offset++;
- return (c);
-}
-#endif /* vax */
-
-/*
- * General routine to allocate a hash table.
- */
-void *
-hashinit(elements, type, hashmask)
- int elements, type;
- u_long *hashmask;
-{
- long hashsize;
- LIST_HEAD(generic, generic) *hashtbl;
- int i;
-
- if (elements <= 0)
- panic("hashinit: bad elements");
- for (hashsize = 1; hashsize <= elements; hashsize <<= 1)
- continue;
- hashsize >>= 1;
- hashtbl = malloc((u_long)hashsize * sizeof(*hashtbl), type, M_WAITOK);
- for (i = 0; i < hashsize; i++)
- LIST_INIT(&hashtbl[i]);
- *hashmask = hashsize - 1;
- return (hashtbl);
-}
-
-#define NPRIMES 27
-static int primes[] = { 1, 13, 31, 61, 127, 251, 509, 761, 1021, 1531, 2039,
- 2557, 3067, 3583, 4093, 4603, 5119, 5623, 6143, 6653,
- 7159, 7673, 8191, 12281, 16381, 24571, 32749 };
-
-/*
- * General routine to allocate a prime number sized hash table.
- */
-void *
-phashinit(elements, type, nentries)
- int elements, type;
- u_long *nentries;
-{
- long hashsize;
- LIST_HEAD(generic, generic) *hashtbl;
- int i;
-
- if (elements <= 0)
- panic("phashinit: bad elements");
- for (i = 1, hashsize = primes[1]; hashsize <= elements;) {
- i++;
- if (i == NPRIMES)
- break;
- hashsize = primes[i];
- }
- hashsize = primes[i - 1];
- hashtbl = malloc((u_long)hashsize * sizeof(*hashtbl), type, M_WAITOK);
- for (i = 0; i < hashsize; i++)
- LIST_INIT(&hashtbl[i]);
- *nentries = hashsize;
- return (hashtbl);
-}
diff --git a/c/src/exec/libnetworking/kern/uipc_domain.c b/c/src/exec/libnetworking/kern/uipc_domain.c
deleted file mode 100644
index 81d741fe37..0000000000
--- a/c/src/exec/libnetworking/kern/uipc_domain.c
+++ /dev/null
@@ -1,228 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)uipc_domain.c 8.2 (Berkeley) 10/18/93
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <sys/protosw.h>
-#include <sys/domain.h>
-#include <sys/mbuf.h>
-#include <sys/kernel.h>
-#include <sys/systm.h>
-
-/*
- * System initialization
- *
- * Note: domain initialization wants to take place on a per domain basis
- * as a result of traversing a linker set. Most likely, each domain
- * want to call a registration function rather than being handled here
- * in domaininit(). Probably this will look like:
- *
- * SYSINIT(unique, SI_SUB_PROTO_DOMAI, SI_ORDER_ANY, domain_add, xxx)
- *
- * Where 'xxx' is replaced by the address of a parameter struct to be
- * passed to the doamin_add() function.
- */
-
-#if !defined(__rtems__)
-static int x_save_spl; /* used by kludge*/
-static void kludge_splimp __P((void *));
-static void kludge_splx __P((void *));
- void domaininit __P((void *));
-SYSINIT(splimp, SI_SUB_PROTO_BEGIN, SI_ORDER_FIRST, kludge_splimp, &x_save_spl)
-SYSINIT(domain, SI_SUB_PROTO_DOMAIN, SI_ORDER_FIRST, domaininit, NULL)
-SYSINIT(splx, SI_SUB_PROTO_END, SI_ORDER_FIRST, kludge_splx, &x_save_spl)
-#endif
-
-static void pffasttimo __P((void *));
-static void pfslowtimo __P((void *));
-
-struct domain *domains;
-
-#define ADDDOMAIN(x) { \
- __CONCAT(x,domain.dom_next) = domains; \
- domains = &__CONCAT(x,domain); \
-}
-
-extern struct linker_set domain_set;
-
-/* ARGSUSED*/
-void
-domaininit(dummy)
- void *dummy;
-{
- register struct domain *dp;
- register struct protosw *pr;
-
-/* - not in our sources
-#ifdef ISDN
- ADDDOMAIN(isdn);
-#endif
-*/
-
- for (dp = domains; dp; dp = dp->dom_next) {
- if (dp->dom_init)
- (*dp->dom_init)();
- for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++){
-#ifdef PRU_OLDSTYLE
- /* See comments in uipc_socket2.c. */
- if (pr->pr_usrreqs == 0 && pr->pr_ousrreq)
- pr->pr_usrreqs = &pru_oldstyle;
-#endif
- if (pr->pr_init)
- (*pr->pr_init)();
- }
- }
-
- if (max_linkhdr < 16) /* XXX */
- max_linkhdr = 16;
- max_hdr = max_linkhdr + max_protohdr;
- max_datalen = MHLEN - max_hdr;
- timeout(pffasttimo, (void *)0, 1);
- timeout(pfslowtimo, (void *)0, 1);
-}
-
-
-#if !defined(__rtems__)
-/*
- * The following two operations are kludge code. Most likely, they should
- * be done as a "domainpreinit()" for the first function and then rolled
- * in as the last act of "domaininit()" for the second.
- *
- * In point of fact, it is questionable why other initialization prior
- * to this does not also take place at splimp by default.
- */
-static void
-kludge_splimp(udata)
- void *udata;
-{
- int *savesplp = udata;
-
- *savesplp = splimp();
-}
-
-static void
-kludge_splx(udata)
- void *udata;
-{
- int *savesplp = udata;
-
- splx( *savesplp);
-}
-#endif /* !defined(__rtems__) */
-
-struct protosw *
-pffindtype(int family, int type)
-{
- register struct domain *dp;
- register struct protosw *pr;
-
- for (dp = domains; dp; dp = dp->dom_next)
- if (dp->dom_family == family)
- goto found;
- return (0);
-found:
- for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++)
- if (pr->pr_type && pr->pr_type == type)
- return (pr);
- return (0);
-}
-
-struct protosw *
-pffindproto(int family, int protocol, int type)
-{
- register struct domain *dp;
- register struct protosw *pr;
- struct protosw *maybe = 0;
-
- if (family == 0)
- return (0);
- for (dp = domains; dp; dp = dp->dom_next)
- if (dp->dom_family == family)
- goto found;
- return (0);
-found:
- for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++) {
- if ((pr->pr_protocol == protocol) && (pr->pr_type == type))
- return (pr);
-
- if (type == SOCK_RAW && pr->pr_type == SOCK_RAW &&
- pr->pr_protocol == 0 && maybe == (struct protosw *)0)
- maybe = pr;
- }
- return (maybe);
-}
-
-void
-pfctlinput(cmd, sa)
- int cmd;
- struct sockaddr *sa;
-{
- register struct domain *dp;
- register struct protosw *pr;
-
- for (dp = domains; dp; dp = dp->dom_next)
- for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++)
- if (pr->pr_ctlinput)
- (*pr->pr_ctlinput)(cmd, sa, (void *)0);
-}
-
-static void
-pfslowtimo(arg)
- void *arg;
-{
- register struct domain *dp;
- register struct protosw *pr;
-
- for (dp = domains; dp; dp = dp->dom_next)
- for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++)
- if (pr->pr_slowtimo)
- (*pr->pr_slowtimo)();
- timeout(pfslowtimo, (void *)0, hz/2);
-}
-
-static void
-pffasttimo(arg)
- void *arg;
-{
- register struct domain *dp;
- register struct protosw *pr;
-
- for (dp = domains; dp; dp = dp->dom_next)
- for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++)
- if (pr->pr_fasttimo)
- (*pr->pr_fasttimo)();
- timeout(pffasttimo, (void *)0, hz/5);
-}
diff --git a/c/src/exec/libnetworking/kern/uipc_mbuf.c b/c/src/exec/libnetworking/kern/uipc_mbuf.c
deleted file mode 100644
index 17d2be6b26..0000000000
--- a/c/src/exec/libnetworking/kern/uipc_mbuf.c
+++ /dev/null
@@ -1,748 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1988, 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)uipc_mbuf.c 8.2 (Berkeley) 1/4/94
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/proc.h>
-#include <sys/malloc.h>
-#define MBTYPES
-#include <sys/mbuf.h>
-#include <sys/kernel.h>
-#include <sys/syslog.h>
-#include <sys/domain.h>
-#include <sys/protosw.h>
-
-#include <vm/vm.h>
-#include <vm/vm_param.h>
-#include <vm/vm_kern.h>
-#include <vm/vm_extern.h>
-
-static void mbinit __P((void *)) __attribute__ ((unused));
-SYSINIT(mbuf, SI_SUB_MBUF, SI_ORDER_FIRST, mbinit, NULL)
-
-struct mbuf *mbutl;
-char *mclrefcnt;
-struct mbstat mbstat;
-struct mbuf *mmbfree;
-union mcluster *mclfree;
-int max_linkhdr;
-int max_protohdr;
-int max_hdr;
-int max_datalen;
-
-/* "number of clusters of pages" */
-#define NCL_INIT 1
-
-#define NMB_INIT 16
-
-/*
- * When MGET failes, ask protocols to free space when short of memory,
- * then re-attempt to allocate an mbuf.
- */
-struct mbuf *
-m_retry(i, t)
- int i, t;
-{
- register struct mbuf *m;
-
- m_reclaim();
-#define m_retry(i, t) (struct mbuf *)0
- MGET(m, i, t);
-#undef m_retry
- if (m != NULL)
- mbstat.m_wait++;
- else
- mbstat.m_drops++;
- return (m);
-}
-
-/*
- * As above; retry an MGETHDR.
- */
-struct mbuf *
-m_retryhdr(i, t)
- int i, t;
-{
- register struct mbuf *m;
-
- m_reclaim();
-#define m_retryhdr(i, t) (struct mbuf *)0
- MGETHDR(m, i, t);
-#undef m_retryhdr
- if (m != NULL)
- mbstat.m_wait++;
- else
- mbstat.m_drops++;
- return (m);
-}
-
-void
-m_reclaim(void)
-{
- register struct domain *dp;
- register struct protosw *pr;
- int s = splimp();
-
- for (dp = domains; dp; dp = dp->dom_next)
- for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++)
- if (pr->pr_drain)
- (*pr->pr_drain)();
- splx(s);
- mbstat.m_drain++;
-}
-
-/*
- * Space allocation routines.
- * These are also available as macros
- * for critical paths.
- */
-struct mbuf *
-m_get(nowait, type)
- int nowait, type;
-{
- register struct mbuf *m;
-
- MGET(m, nowait, type);
- return (m);
-}
-
-struct mbuf *
-m_gethdr(nowait, type)
- int nowait, type;
-{
- register struct mbuf *m;
-
- MGETHDR(m, nowait, type);
- return (m);
-}
-
-struct mbuf *
-m_getclr(nowait, type)
- int nowait, type;
-{
- register struct mbuf *m;
-
- MGET(m, nowait, type);
- if (m == 0)
- return (0);
- bzero(mtod(m, caddr_t), MLEN);
- return (m);
-}
-
-struct mbuf *
-m_free(m)
- struct mbuf *m;
-{
- register struct mbuf *n;
-
- MFREE(m, n);
- return (n);
-}
-
-void
-m_freem(m)
- register struct mbuf *m;
-{
- register struct mbuf *n;
-
- if (m == NULL)
- return;
- do {
- MFREE(m, n);
- m = n;
- } while (m);
-}
-
-/*
- * Mbuffer utility routines.
- */
-
-/*
- * Lesser-used path for M_PREPEND:
- * allocate new mbuf to prepend to chain,
- * copy junk along.
- */
-struct mbuf *
-m_prepend(m, len, how)
- register struct mbuf *m;
- int len, how;
-{
- struct mbuf *mn;
-
- MGET(mn, how, m->m_type);
- if (mn == (struct mbuf *)NULL) {
- m_freem(m);
- return ((struct mbuf *)NULL);
- }
- if (m->m_flags & M_PKTHDR) {
- M_COPY_PKTHDR(mn, m);
- m->m_flags &= ~M_PKTHDR;
- }
- mn->m_next = m;
- m = mn;
- if (len < MHLEN)
- MH_ALIGN(m, len);
- m->m_len = len;
- return (m);
-}
-
-/*
- * Make a copy of an mbuf chain starting "off0" bytes from the beginning,
- * continuing for "len" bytes. If len is M_COPYALL, copy to end of mbuf.
- * The wait parameter is a choice of M_WAIT/M_DONTWAIT from caller.
- */
-static int MCFail;
-
-struct mbuf *
-m_copym(m, off0, len, wait)
- register struct mbuf *m;
- int off0, wait;
- register int len;
-{
- register struct mbuf *n, **np;
- register int off = off0;
- struct mbuf *top;
- int copyhdr = 0;
-
- if (off < 0 || len < 0)
- panic("m_copym");
- if (off == 0 && m->m_flags & M_PKTHDR)
- copyhdr = 1;
- while (off > 0) {
- if (m == 0)
- panic("m_copym");
- if (off < m->m_len)
- break;
- off -= m->m_len;
- m = m->m_next;
- }
- np = &top;
- top = 0;
- while (len > 0) {
- if (m == 0) {
- if (len != M_COPYALL)
- panic("m_copym");
- break;
- }
- MGET(n, wait, m->m_type);
- *np = n;
- if (n == 0)
- goto nospace;
- if (copyhdr) {
- M_COPY_PKTHDR(n, m);
- if (len == M_COPYALL)
- n->m_pkthdr.len -= off0;
- else
- n->m_pkthdr.len = len;
- copyhdr = 0;
- }
- n->m_len = min(len, m->m_len - off);
- if (m->m_flags & M_EXT) {
- n->m_data = m->m_data + off;
- if(!m->m_ext.ext_ref)
- mclrefcnt[mtocl(m->m_ext.ext_buf)]++;
- else
- (*(m->m_ext.ext_ref))(m->m_ext.ext_buf,
- m->m_ext.ext_size);
- n->m_ext = m->m_ext;
- n->m_flags |= M_EXT;
- } else
- bcopy(mtod(m, caddr_t)+off, mtod(n, caddr_t),
- (unsigned)n->m_len);
- if (len != M_COPYALL)
- len -= n->m_len;
- off = 0;
- m = m->m_next;
- np = &n->m_next;
- }
- if (top == 0)
- MCFail++;
- return (top);
-nospace:
- m_freem(top);
- MCFail++;
- return (0);
-}
-
-/*
- * Copy an entire packet, including header (which must be present).
- * An optimization of the common case `m_copym(m, 0, M_COPYALL, how)'.
- */
-struct mbuf *
-m_copypacket(m, how)
- struct mbuf *m;
- int how;
-{
- struct mbuf *top, *n, *o;
-
- MGET(n, how, m->m_type);
- top = n;
- if (!n)
- goto nospace;
-
- M_COPY_PKTHDR(n, m);
- n->m_len = m->m_len;
- if (m->m_flags & M_EXT) {
- n->m_data = m->m_data;
- mclrefcnt[mtocl(m->m_ext.ext_buf)]++;
- n->m_ext = m->m_ext;
- n->m_flags |= M_EXT;
- } else {
- bcopy(mtod(m, char *), mtod(n, char *), n->m_len);
- }
-
- m = m->m_next;
- while (m) {
- MGET(o, how, m->m_type);
- if (!o)
- goto nospace;
-
- n->m_next = o;
- n = n->m_next;
-
- n->m_len = m->m_len;
- if (m->m_flags & M_EXT) {
- n->m_data = m->m_data;
- mclrefcnt[mtocl(m->m_ext.ext_buf)]++;
- n->m_ext = m->m_ext;
- n->m_flags |= M_EXT;
- } else {
- bcopy(mtod(m, char *), mtod(n, char *), n->m_len);
- }
-
- m = m->m_next;
- }
- return top;
-nospace:
- m_freem(top);
- MCFail++;
- return 0;
-}
-
-/*
- * Copy data from an mbuf chain starting "off" bytes from the beginning,
- * continuing for "len" bytes, into the indicated buffer.
- */
-void
-m_copydata(m, off, len, cp)
- register struct mbuf *m;
- register int off;
- register int len;
- caddr_t cp;
-{
- register unsigned count;
-
- if (off < 0 || len < 0)
- panic("m_copydata");
- while (off > 0) {
- if (m == 0)
- panic("m_copydata");
- if (off < m->m_len)
- break;
- off -= m->m_len;
- m = m->m_next;
- }
- while (len > 0) {
- if (m == 0)
- panic("m_copydata");
- count = min(m->m_len - off, len);
- bcopy(mtod(m, caddr_t) + off, cp, count);
- len -= count;
- cp += count;
- off = 0;
- m = m->m_next;
- }
-}
-
-/*
- * Concatenate mbuf chain n to m.
- * Both chains must be of the same type (e.g. MT_DATA).
- * Any m_pkthdr is not updated.
- */
-void
-m_cat(m, n)
- register struct mbuf *m, *n;
-{
- while (m->m_next)
- m = m->m_next;
- while (n) {
- if (m->m_flags & M_EXT ||
- m->m_data + m->m_len + n->m_len >= &m->m_dat[MLEN]) {
- /* just join the two chains */
- m->m_next = n;
- return;
- }
- /* splat the data from one into the other */
- bcopy(mtod(n, caddr_t), mtod(m, caddr_t) + m->m_len,
- (u_int)n->m_len);
- m->m_len += n->m_len;
- n = m_free(n);
- }
-}
-
-void
-m_adj(mp, req_len)
- struct mbuf *mp;
- int req_len;
-{
- register int len = req_len;
- register struct mbuf *m;
- register int count;
-
- if ((m = mp) == NULL)
- return;
- if (len >= 0) {
- /*
- * Trim from head.
- */
- while (m != NULL && len > 0) {
- if (m->m_len <= len) {
- len -= m->m_len;
- m->m_len = 0;
- m = m->m_next;
- } else {
- m->m_len -= len;
- m->m_data += len;
- len = 0;
- }
- }
- m = mp;
- if (mp->m_flags & M_PKTHDR)
- m->m_pkthdr.len -= (req_len - len);
- } else {
- /*
- * Trim from tail. Scan the mbuf chain,
- * calculating its length and finding the last mbuf.
- * If the adjustment only affects this mbuf, then just
- * adjust and return. Otherwise, rescan and truncate
- * after the remaining size.
- */
- len = -len;
- count = 0;
- for (;;) {
- count += m->m_len;
- if (m->m_next == (struct mbuf *)0)
- break;
- m = m->m_next;
- }
- if (m->m_len >= len) {
- m->m_len -= len;
- if (mp->m_flags & M_PKTHDR)
- mp->m_pkthdr.len -= len;
- return;
- }
- count -= len;
- if (count < 0)
- count = 0;
- /*
- * Correct length for chain is "count".
- * Find the mbuf with last data, adjust its length,
- * and toss data from remaining mbufs on chain.
- */
- m = mp;
- if (m->m_flags & M_PKTHDR)
- m->m_pkthdr.len = count;
- for (; m; m = m->m_next) {
- if (m->m_len >= count) {
- m->m_len = count;
- break;
- }
- count -= m->m_len;
- }
- while (m->m_next)
- (m = m->m_next) ->m_len = 0;
- }
-}
-
-/*
- * Rearange an mbuf chain so that len bytes are contiguous
- * and in the data area of an mbuf (so that mtod and dtom
- * will work for a structure of size len). Returns the resulting
- * mbuf chain on success, frees it and returns null on failure.
- * If there is room, it will add up to max_protohdr-len extra bytes to the
- * contiguous region in an attempt to avoid being called next time.
- */
-static int MPFail;
-
-struct mbuf *
-m_pullup(n, len)
- register struct mbuf *n;
- int len;
-{
- register struct mbuf *m;
- register int count;
- int space;
-
- /*
- * If first mbuf has no cluster, and has room for len bytes
- * without shifting current data, pullup into it,
- * otherwise allocate a new mbuf to prepend to the chain.
- */
- if ((n->m_flags & M_EXT) == 0 &&
- n->m_data + len < &n->m_dat[MLEN] && n->m_next) {
- if (n->m_len >= len)
- return (n);
- m = n;
- n = n->m_next;
- len -= m->m_len;
- } else {
- if (len > MHLEN)
- goto bad;
- MGET(m, M_DONTWAIT, n->m_type);
- if (m == 0)
- goto bad;
- m->m_len = 0;
- if (n->m_flags & M_PKTHDR) {
- M_COPY_PKTHDR(m, n);
- n->m_flags &= ~M_PKTHDR;
- }
- }
- space = &m->m_dat[MLEN] - (m->m_data + m->m_len);
- do {
- count = min(min(max(len, max_protohdr), space), n->m_len);
- bcopy(mtod(n, caddr_t), mtod(m, caddr_t) + m->m_len,
- (unsigned)count);
- len -= count;
- m->m_len += count;
- n->m_len -= count;
- space -= count;
- if (n->m_len)
- n->m_data += count;
- else
- n = m_free(n);
- } while (len > 0 && n);
- if (len > 0) {
- (void) m_free(m);
- goto bad;
- }
- m->m_next = n;
- return (m);
-bad:
- m_freem(n);
- MPFail++;
- return (0);
-}
-
-/*
- * Partition an mbuf chain in two pieces, returning the tail --
- * all but the first len0 bytes. In case of failure, it returns NULL and
- * attempts to restore the chain to its original state.
- */
-struct mbuf *
-m_split(m0, len0, wait)
- register struct mbuf *m0;
- int len0, wait;
-{
- register struct mbuf *m, *n;
- unsigned len = len0, remain;
-
- for (m = m0; m && len > m->m_len; m = m->m_next)
- len -= m->m_len;
- if (m == 0)
- return (0);
- remain = m->m_len - len;
- if (m0->m_flags & M_PKTHDR) {
- MGETHDR(n, wait, m0->m_type);
- if (n == 0)
- return (0);
- n->m_pkthdr.rcvif = m0->m_pkthdr.rcvif;
- n->m_pkthdr.len = m0->m_pkthdr.len - len0;
- m0->m_pkthdr.len = len0;
- if (m->m_flags & M_EXT)
- goto extpacket;
- if (remain > MHLEN) {
- /* m can't be the lead packet */
- MH_ALIGN(n, 0);
- n->m_next = m_split(m, len, wait);
- if (n->m_next == 0) {
- (void) m_free(n);
- return (0);
- } else
- return (n);
- } else
- MH_ALIGN(n, remain);
- } else if (remain == 0) {
- n = m->m_next;
- m->m_next = 0;
- return (n);
- } else {
- MGET(n, wait, m->m_type);
- if (n == 0)
- return (0);
- M_ALIGN(n, remain);
- }
-extpacket:
- if (m->m_flags & M_EXT) {
- n->m_flags |= M_EXT;
- n->m_ext = m->m_ext;
- if(!m->m_ext.ext_ref)
- mclrefcnt[mtocl(m->m_ext.ext_buf)]++;
- else
- (*(m->m_ext.ext_ref))(m->m_ext.ext_buf,
- m->m_ext.ext_size);
- m->m_ext.ext_size = 0; /* For Accounting XXXXXX danger */
- n->m_data = m->m_data + len;
- } else {
- bcopy(mtod(m, caddr_t) + len, mtod(n, caddr_t), remain);
- }
- n->m_len = remain;
- m->m_len = len;
- n->m_next = m->m_next;
- m->m_next = 0;
- return (n);
-}
-/*
- * Routine to copy from device local memory into mbufs.
- */
-struct mbuf *
-m_devget(buf, totlen, off0, ifp, copy)
- char *buf;
- int totlen, off0;
- struct ifnet *ifp;
- void (*copy) __P((char *from, caddr_t to, u_int len));
-{
- register struct mbuf *m;
- struct mbuf *top = 0, **mp = &top;
- register int off = off0, len;
- register char *cp;
- char *epkt;
-
- cp = buf;
- epkt = cp + totlen;
- if (off) {
- cp += off + 2 * sizeof(u_short);
- totlen -= 2 * sizeof(u_short);
- }
- MGETHDR(m, M_DONTWAIT, MT_DATA);
- if (m == 0)
- return (0);
- m->m_pkthdr.rcvif = ifp;
- m->m_pkthdr.len = totlen;
- m->m_len = MHLEN;
-
- while (totlen > 0) {
- if (top) {
- MGET(m, M_DONTWAIT, MT_DATA);
- if (m == 0) {
- m_freem(top);
- return (0);
- }
- m->m_len = MLEN;
- }
- len = min(totlen, epkt - cp);
- if (len >= MINCLSIZE) {
- MCLGET(m, M_DONTWAIT);
- if (m->m_flags & M_EXT)
- m->m_len = len = min(len, MCLBYTES);
- else
- len = m->m_len;
- } else {
- /*
- * Place initial small packet/header at end of mbuf.
- */
- if (len < m->m_len) {
- if (top == 0 && len + max_linkhdr <= m->m_len)
- m->m_data += max_linkhdr;
- m->m_len = len;
- } else
- len = m->m_len;
- }
- if (copy)
- copy(cp, mtod(m, caddr_t), (unsigned)len);
- else
- bcopy(cp, mtod(m, caddr_t), (unsigned)len);
- cp += len;
- *mp = m;
- mp = &m->m_next;
- totlen -= len;
- if (cp == epkt)
- cp = buf;
- }
- return (top);
-}
-
-/*
- * Copy data from a buffer back into the indicated mbuf chain,
- * starting "off" bytes from the beginning, extending the mbuf
- * chain if necessary.
- */
-void
-m_copyback(m0, off, len, cp)
- struct mbuf *m0;
- register int off;
- register int len;
- caddr_t cp;
-{
- register int mlen;
- register struct mbuf *m = m0, *n;
- int totlen = 0;
-
- if (m0 == 0)
- return;
- while (off > (mlen = m->m_len)) {
- off -= mlen;
- totlen += mlen;
- if (m->m_next == 0) {
- n = m_getclr(M_DONTWAIT, m->m_type);
- if (n == 0)
- goto out;
- n->m_len = min(MLEN, len + off);
- m->m_next = n;
- }
- m = m->m_next;
- }
- while (len > 0) {
- mlen = min (m->m_len - off, len);
- bcopy(cp, off + mtod(m, caddr_t), (unsigned)mlen);
- cp += mlen;
- len -= mlen;
- mlen += off;
- off = 0;
- totlen += mlen;
- if (len == 0)
- break;
- if (m->m_next == 0) {
- n = m_get(M_DONTWAIT, m->m_type);
- if (n == 0)
- break;
- n->m_len = min(MLEN, len);
- m->m_next = n;
- }
- m = m->m_next;
- }
-out: if (((m = m0)->m_flags & M_PKTHDR) && (m->m_pkthdr.len < totlen))
- m->m_pkthdr.len = totlen;
-}
diff --git a/c/src/exec/libnetworking/kern/uipc_socket.c b/c/src/exec/libnetworking/kern/uipc_socket.c
deleted file mode 100644
index 49a5a65653..0000000000
--- a/c/src/exec/libnetworking/kern/uipc_socket.c
+++ /dev/null
@@ -1,1143 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1988, 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)uipc_socket.c 8.3 (Berkeley) 4/15/94
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/systm.h>
-#include <sys/proc.h>
-#include <sys/file.h>
-#include <sys/malloc.h>
-#include <sys/mbuf.h>
-#include <sys/domain.h>
-#include <sys/kernel.h>
-#include <sys/protosw.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/resourcevar.h>
-#include <sys/signalvar.h>
-#include <sys/sysctl.h>
-#include <limits.h>
-
-static int somaxconn = SOMAXCONN;
-SYSCTL_INT(_kern, KERN_SOMAXCONN, somaxconn, CTLFLAG_RW, &somaxconn, 0, "");
-
-/*
- * Socket operation routines.
- * These routines are called by the routines in
- * sys_socket.c or from a system process, and
- * implement the semantics of socket operations by
- * switching out to the protocol specific routines.
- */
-/*ARGSUSED*/
-int
-socreate(dom, aso, type, proto, p)
- int dom;
- struct socket **aso;
- register int type;
- int proto;
- struct proc *p;
-{
- register struct protosw *prp;
- register struct socket *so;
- register int error;
-
- if (proto)
- prp = pffindproto(dom, proto, type);
- else
- prp = pffindtype(dom, type);
- if (prp == 0 || prp->pr_usrreqs == 0)
- return (EPROTONOSUPPORT);
- if (prp->pr_type != type)
- return (EPROTOTYPE);
- MALLOC(so, struct socket *, sizeof(*so), M_SOCKET, M_WAIT);
- bzero((caddr_t)so, sizeof(*so));
- TAILQ_INIT(&so->so_incomp);
- TAILQ_INIT(&so->so_comp);
- so->so_type = type;
- so->so_state = SS_PRIV;
- so->so_uid = 0;
- so->so_proto = prp;
- error = (*prp->pr_usrreqs->pru_attach)(so, proto);
- if (error) {
- so->so_state |= SS_NOFDREF;
- sofree(so);
- return (error);
- }
- *aso = so;
- return (0);
-}
-
-int
-sobind(so, nam)
- struct socket *so;
- struct mbuf *nam;
-{
- int s = splnet();
- int error;
-
- error = (*so->so_proto->pr_usrreqs->pru_bind)(so, nam);
- splx(s);
- return (error);
-}
-
-int
-solisten(so, backlog)
- register struct socket *so;
- int backlog;
-{
- int s = splnet(), error;
-
- error = (*so->so_proto->pr_usrreqs->pru_listen)(so);
- if (error) {
- splx(s);
- return (error);
- }
- if (so->so_comp.tqh_first == NULL)
- so->so_options |= SO_ACCEPTCONN;
- if (backlog < 0 || backlog > somaxconn)
- backlog = somaxconn;
- so->so_qlimit = backlog;
- splx(s);
- return (0);
-}
-
-void
-sofree(so)
- register struct socket *so;
-{
- struct socket *head = so->so_head;
-
- if (so->so_pcb || (so->so_state & SS_NOFDREF) == 0)
- return;
- if (head != NULL) {
- if (so->so_state & SS_INCOMP) {
- TAILQ_REMOVE(&head->so_incomp, so, so_list);
- head->so_incqlen--;
- } else if (so->so_state & SS_COMP) {
- TAILQ_REMOVE(&head->so_comp, so, so_list);
- } else {
- panic("sofree: not queued");
- }
- head->so_qlen--;
- so->so_state &= ~(SS_INCOMP|SS_COMP);
- so->so_head = NULL;
- }
- sbrelease(&so->so_snd);
- sorflush(so);
- FREE(so, M_SOCKET);
-}
-
-/*
- * Close a socket on last file table reference removal.
- * Initiate disconnect if connected.
- * Free socket when disconnect complete.
- */
-int
-soclose(so)
- register struct socket *so;
-{
- int s = splnet(); /* conservative */
- int error = 0;
-
- if (so->so_options & SO_ACCEPTCONN) {
- struct socket *sp, *sonext;
-
- for (sp = so->so_incomp.tqh_first; sp != NULL; sp = sonext) {
- sonext = sp->so_list.tqe_next;
- (void) soabort(sp);
- }
- for (sp = so->so_comp.tqh_first; sp != NULL; sp = sonext) {
- sonext = sp->so_list.tqe_next;
- (void) soabort(sp);
- }
- }
- if (so->so_pcb == 0)
- goto discard;
- if (so->so_state & SS_ISCONNECTED) {
- if ((so->so_state & SS_ISDISCONNECTING) == 0) {
- error = sodisconnect(so);
- if (error)
- goto drop;
- }
- if (so->so_options & SO_LINGER) {
- if ((so->so_state & SS_ISDISCONNECTING) &&
- (so->so_state & SS_NBIO))
- goto drop;
- while (so->so_state & SS_ISCONNECTED) {
- soconnsleep (so);
- }
- }
- }
-drop:
- if (so->so_pcb) {
- int error2 = (*so->so_proto->pr_usrreqs->pru_detach)(so);
- if (error == 0)
- error = error2;
- }
-discard:
- if (so->so_state & SS_NOFDREF)
- panic("soclose: NOFDREF");
- so->so_state |= SS_NOFDREF;
- sofree(so);
- splx(s);
- return (error);
-}
-
-/*
- * Must be called at splnet...
- */
-int
-soabort(so)
- struct socket *so;
-{
-
- return (*so->so_proto->pr_usrreqs->pru_abort)(so);
-}
-
-int
-soaccept(so, nam)
- register struct socket *so;
- struct mbuf *nam;
-{
- int s = splnet();
- int error;
-
- if ((so->so_state & SS_NOFDREF) == 0)
- panic("soaccept: !NOFDREF");
- so->so_state &= ~SS_NOFDREF;
- error = (*so->so_proto->pr_usrreqs->pru_accept)(so, nam);
- splx(s);
- return (error);
-}
-
-int
-soconnect(so, nam)
- register struct socket *so;
- struct mbuf *nam;
-{
- int s;
- int error;
-
- if (so->so_options & SO_ACCEPTCONN)
- return (EOPNOTSUPP);
- s = splnet();
- /*
- * If protocol is connection-based, can only connect once.
- * Otherwise, if connected, try to disconnect first.
- * This allows user to disconnect by connecting to, e.g.,
- * a null address.
- */
- if (so->so_state & (SS_ISCONNECTED|SS_ISCONNECTING) &&
- ((so->so_proto->pr_flags & PR_CONNREQUIRED) ||
- (error = sodisconnect(so))))
- error = EISCONN;
- else
- error = (*so->so_proto->pr_usrreqs->pru_connect)(so, nam);
- splx(s);
- return (error);
-}
-
-int
-soconnect2(so1, so2)
- register struct socket *so1;
- struct socket *so2;
-{
- int s = splnet();
- int error;
-
- error = (*so1->so_proto->pr_usrreqs->pru_connect2)(so1, so2);
- splx(s);
- return (error);
-}
-
-int
-sodisconnect(so)
- register struct socket *so;
-{
- int s = splnet();
- int error;
-
- if ((so->so_state & SS_ISCONNECTED) == 0) {
- error = ENOTCONN;
- goto bad;
- }
- if (so->so_state & SS_ISDISCONNECTING) {
- error = EALREADY;
- goto bad;
- }
- error = (*so->so_proto->pr_usrreqs->pru_disconnect)(so);
-bad:
- splx(s);
- return (error);
-}
-
-#define SBLOCKWAIT(f) (((f) & MSG_DONTWAIT) ? M_NOWAIT : M_WAITOK)
-/*
- * Send on a socket.
- * If send must go all at once and message is larger than
- * send buffering, then hard error.
- * Lock against other senders.
- * If must go all at once and not enough room now, then
- * inform user that this would block and do nothing.
- * Otherwise, if nonblocking, send as much as possible.
- * The data to be sent is described by "uio" if nonzero,
- * otherwise by the mbuf chain "top" (which must be null
- * if uio is not). Data provided in mbuf chain must be small
- * enough to send all at once.
- *
- * Returns nonzero on error, timeout or signal; callers
- * must check for short counts if EINTR/ERESTART are returned.
- * Data and control buffers are freed on return.
- */
-int
-sosend(so, addr, uio, top, control, flags)
- register struct socket *so;
- struct mbuf *addr;
- struct uio *uio;
- struct mbuf *top;
- struct mbuf *control;
- int flags;
-{
- struct mbuf **mp;
- register struct mbuf *m;
- register long space, len, resid;
- int clen = 0, error, s, dontroute, mlen;
- int atomic = sosendallatonce(so) || top;
-
- if (uio)
- resid = uio->uio_resid;
- else
- resid = top->m_pkthdr.len;
- /*
- * In theory resid should be unsigned.
- * However, space must be signed, as it might be less than 0
- * if we over-committed, and we must use a signed comparison
- * of space and resid. On the other hand, a negative resid
- * causes us to loop sending 0-length segments to the protocol.
- *
- * Also check to make sure that MSG_EOR isn't used on SOCK_STREAM
- * type sockets since that's an error.
- */
- if ((resid < 0) || (so->so_type == SOCK_STREAM && (flags & MSG_EOR))) {
- error = EINVAL;
- goto out;
- }
-
- dontroute =
- (flags & MSG_DONTROUTE) && (so->so_options & SO_DONTROUTE) == 0 &&
- (so->so_proto->pr_flags & PR_ATOMIC);
- if (control)
- clen = control->m_len;
-#define snderr(errno) { error = errno; splx(s); goto release; }
-
-restart:
- error = sblock(&so->so_snd, SBLOCKWAIT(flags));
- if (error)
- goto out;
- do {
- s = splnet();
- if (so->so_state & SS_CANTSENDMORE)
- snderr(EPIPE);
- if (so->so_error) {
- error = so->so_error;
- so->so_error = 0;
- splx(s);
- goto release;
- }
- if ((so->so_state & SS_ISCONNECTED) == 0) {
- /*
- * `sendto' and `sendmsg' is allowed on a connection-
- * based socket if it supports implied connect.
- * Return ENOTCONN if not connected and no address is
- * supplied.
- */
- if ((so->so_proto->pr_flags & PR_CONNREQUIRED) &&
- (so->so_proto->pr_flags & PR_IMPLOPCL) == 0) {
- if ((so->so_state & SS_ISCONFIRMING) == 0 &&
- !(resid == 0 && clen != 0))
- snderr(ENOTCONN);
- } else if (addr == 0)
- snderr(so->so_proto->pr_flags & PR_CONNREQUIRED ?
- ENOTCONN : EDESTADDRREQ);
- }
- space = sbspace(&so->so_snd);
- if (flags & MSG_OOB)
- space += 1024;
- if ((atomic && resid > so->so_snd.sb_hiwat) ||
- clen > so->so_snd.sb_hiwat)
- snderr(EMSGSIZE);
- if (space < resid + clen && uio &&
- (atomic || space < so->so_snd.sb_lowat || space < clen)) {
- if (so->so_state & SS_NBIO)
- snderr(EWOULDBLOCK);
- sbunlock(&so->so_snd);
- error = sbwait(&so->so_snd);
- splx(s);
- if (error)
- goto out;
- goto restart;
- }
- splx(s);
- mp = &top;
- space -= clen;
- do {
- if (uio == NULL) {
- /*
- * Data is prepackaged in "top".
- */
- resid = 0;
- if (flags & MSG_EOR)
- top->m_flags |= M_EOR;
- } else do {
- if (top == 0) {
- MGETHDR(m, M_WAIT, MT_DATA);
- mlen = MHLEN;
- m->m_pkthdr.len = 0;
- m->m_pkthdr.rcvif = (struct ifnet *)0;
- } else {
- MGET(m, M_WAIT, MT_DATA);
- mlen = MLEN;
- }
- if (resid >= MINCLSIZE) {
- MCLGET(m, M_WAIT);
- if ((m->m_flags & M_EXT) == 0)
- goto nopages;
- mlen = MCLBYTES;
- len = min(min(mlen, resid), space);
- } else {
-nopages:
- len = min(min(mlen, resid), space);
- /*
- * For datagram protocols, leave room
- * for protocol headers in first mbuf.
- */
- if (atomic && top == 0 && len < mlen)
- MH_ALIGN(m, len);
- }
- space -= len;
- error = uiomove(mtod(m, caddr_t), (int)len, uio);
- resid = uio->uio_resid;
- m->m_len = len;
- *mp = m;
- top->m_pkthdr.len += len;
- if (error)
- goto release;
- mp = &m->m_next;
- if (resid <= 0) {
- if (flags & MSG_EOR)
- top->m_flags |= M_EOR;
- break;
- }
- } while (space > 0 && atomic);
- if (dontroute)
- so->so_options |= SO_DONTROUTE;
- s = splnet(); /* XXX */
- error = (*so->so_proto->pr_usrreqs->pru_send)(so,
- (flags & MSG_OOB) ? PRUS_OOB :
- /*
- * If the user set MSG_EOF, the protocol
- * understands this flag and nothing left to
- * send then use PRU_SEND_EOF instead of PRU_SEND.
- */
- ((flags & MSG_EOF) &&
- (so->so_proto->pr_flags & PR_IMPLOPCL) &&
- (resid <= 0)) ?
- PRUS_EOF : 0,
- top, addr, control);
- splx(s);
- if (dontroute)
- so->so_options &= ~SO_DONTROUTE;
- clen = 0;
- control = 0;
- top = 0;
- mp = &top;
- if (error)
- goto release;
- } while (resid && space > 0);
- } while (resid);
-
-release:
- sbunlock(&so->so_snd);
-out:
- if (top)
- m_freem(top);
- if (control)
- m_freem(control);
- return (error);
-}
-
-/*
- * Implement receive operations on a socket.
- * We depend on the way that records are added to the sockbuf
- * by sbappend*. In particular, each record (mbufs linked through m_next)
- * must begin with an address if the protocol so specifies,
- * followed by an optional mbuf or mbufs containing ancillary data,
- * and then zero or more mbufs of data.
- * In order to avoid blocking network interrupts for the entire time here,
- * we splx() while doing the actual copy to user space.
- * Although the sockbuf is locked, new data may still be appended,
- * and thus we must maintain consistency of the sockbuf during that time.
- *
- * The caller may receive the data as a single mbuf chain by supplying
- * an mbuf **mp0 for use in returning the chain. The uio is then used
- * only for the count in uio_resid.
- */
-int
-soreceive(so, paddr, uio, mp0, controlp, flagsp)
- register struct socket *so;
- struct mbuf **paddr;
- struct uio *uio;
- struct mbuf **mp0;
- struct mbuf **controlp;
- int *flagsp;
-{
- register struct mbuf *m, **mp;
- register int flags, len, error, s, offset;
- struct protosw *pr = so->so_proto;
- struct mbuf *nextrecord;
- int moff, type = 0;
- int orig_resid = uio->uio_resid;
-
- mp = mp0;
- if (paddr)
- *paddr = 0;
- if (controlp)
- *controlp = 0;
- if (flagsp)
- flags = *flagsp &~ MSG_EOR;
- else
- flags = 0;
- if (flags & MSG_OOB) {
- m = m_get(M_WAIT, MT_DATA);
- error = (*pr->pr_usrreqs->pru_rcvoob)(so, m, flags & MSG_PEEK);
- if (error)
- goto bad;
- do {
- error = uiomove(mtod(m, caddr_t),
- (int) min(uio->uio_resid, m->m_len), uio);
- m = m_free(m);
- } while (uio->uio_resid && error == 0 && m);
-bad:
- if (m)
- m_freem(m);
- return (error);
- }
- if (mp)
- *mp = (struct mbuf *)0;
- if (so->so_state & SS_ISCONFIRMING && uio->uio_resid)
- (*pr->pr_usrreqs->pru_rcvd)(so, 0);
-
-restart:
- error = sblock(&so->so_rcv, SBLOCKWAIT(flags));
- if (error)
- return (error);
- s = splnet();
-
- m = so->so_rcv.sb_mb;
- /*
- * If we have less data than requested, block awaiting more
- * (subject to any timeout) if:
- * 1. the current count is less than the low water mark, or
- * 2. MSG_WAITALL is set, and it is possible to do the entire
- * receive operation at once if we block (resid <= hiwat).
- * 3. MSG_DONTWAIT is not set
- * If MSG_WAITALL is set but resid is larger than the receive buffer,
- * we have to do the receive in sections, and thus risk returning
- * a short count if a timeout or signal occurs after we start.
- */
- if (m == 0 || (((flags & MSG_DONTWAIT) == 0 &&
- so->so_rcv.sb_cc < uio->uio_resid) &&
- (so->so_rcv.sb_cc < so->so_rcv.sb_lowat ||
- ((flags & MSG_WAITALL) && uio->uio_resid <= so->so_rcv.sb_hiwat)) &&
- m->m_nextpkt == 0 && (pr->pr_flags & PR_ATOMIC) == 0)) {
-#ifdef DIAGNOSTIC
- if (m == 0 && so->so_rcv.sb_cc)
- panic("receive 1");
-#endif
- if (so->so_error) {
- if (m)
- goto dontblock;
- error = so->so_error;
- if ((flags & MSG_PEEK) == 0)
- so->so_error = 0;
- goto release;
- }
- if (so->so_state & SS_CANTRCVMORE) {
- if (m)
- goto dontblock;
- else
- goto release;
- }
- for (; m; m = m->m_next)
- if (m->m_type == MT_OOBDATA || (m->m_flags & M_EOR)) {
- m = so->so_rcv.sb_mb;
- goto dontblock;
- }
- if ((so->so_state & (SS_ISCONNECTED|SS_ISCONNECTING)) == 0 &&
- (so->so_proto->pr_flags & PR_CONNREQUIRED)) {
- error = ENOTCONN;
- goto release;
- }
- if (uio->uio_resid == 0)
- goto release;
- if ((so->so_state & SS_NBIO) || (flags & MSG_DONTWAIT)) {
- error = EWOULDBLOCK;
- goto release;
- }
- sbunlock(&so->so_rcv);
- error = sbwait(&so->so_rcv);
- splx(s);
- if (error)
- return (error);
- goto restart;
- }
-dontblock:
- nextrecord = m->m_nextpkt;
- if (pr->pr_flags & PR_ADDR) {
-#ifdef DIAGNOSTIC
- if (m->m_type != MT_SONAME)
- panic("receive 1a");
-#endif
- orig_resid = 0;
- if (flags & MSG_PEEK) {
- if (paddr)
- *paddr = m_copy(m, 0, m->m_len);
- m = m->m_next;
- } else {
- sbfree(&so->so_rcv, m);
- if (paddr) {
- *paddr = m;
- so->so_rcv.sb_mb = m->m_next;
- m->m_next = 0;
- m = so->so_rcv.sb_mb;
- } else {
- MFREE(m, so->so_rcv.sb_mb);
- m = so->so_rcv.sb_mb;
- }
- }
- }
- while (m && m->m_type == MT_CONTROL && error == 0) {
- if (flags & MSG_PEEK) {
- if (controlp)
- *controlp = m_copy(m, 0, m->m_len);
- m = m->m_next;
- } else {
- sbfree(&so->so_rcv, m);
- if (controlp) {
- if (pr->pr_domain->dom_externalize &&
- mtod(m, struct cmsghdr *)->cmsg_type ==
- SCM_RIGHTS)
- error = (*pr->pr_domain->dom_externalize)(m);
- *controlp = m;
- so->so_rcv.sb_mb = m->m_next;
- m->m_next = 0;
- m = so->so_rcv.sb_mb;
- } else {
- MFREE(m, so->so_rcv.sb_mb);
- m = so->so_rcv.sb_mb;
- }
- }
- if (controlp) {
- orig_resid = 0;
- controlp = &(*controlp)->m_next;
- }
- }
- if (m) {
- if ((flags & MSG_PEEK) == 0)
- m->m_nextpkt = nextrecord;
- type = m->m_type;
- if (type == MT_OOBDATA)
- flags |= MSG_OOB;
- }
- moff = 0;
- offset = 0;
- while (m && uio->uio_resid > 0 && error == 0) {
- if (m->m_type == MT_OOBDATA) {
- if (type != MT_OOBDATA)
- break;
- } else if (type == MT_OOBDATA)
- break;
-#ifdef DIAGNOSTIC
- else if (m->m_type != MT_DATA && m->m_type != MT_HEADER)
- panic("receive 3");
-#endif
- so->so_state &= ~SS_RCVATMARK;
- len = uio->uio_resid;
- if (so->so_oobmark && len > so->so_oobmark - offset)
- len = so->so_oobmark - offset;
- if (len > m->m_len - moff)
- len = m->m_len - moff;
- /*
- * If mp is set, just pass back the mbufs.
- * Otherwise copy them out via the uio, then free.
- * Sockbuf must be consistent here (points to current mbuf,
- * it points to next record) when we drop priority;
- * we must note any additions to the sockbuf when we
- * block interrupts again.
- */
- if (mp == 0) {
- splx(s);
- error = uiomove(mtod(m, caddr_t) + moff, (int)len, uio);
- s = splnet();
- if (error)
- goto release;
- } else
- uio->uio_resid -= len;
- if (len == m->m_len - moff) {
- if (m->m_flags & M_EOR)
- flags |= MSG_EOR;
- if (flags & MSG_PEEK) {
- m = m->m_next;
- moff = 0;
- } else {
- nextrecord = m->m_nextpkt;
- sbfree(&so->so_rcv, m);
- if (mp) {
- *mp = m;
- mp = &m->m_next;
- so->so_rcv.sb_mb = m = m->m_next;
- *mp = (struct mbuf *)0;
- } else {
- MFREE(m, so->so_rcv.sb_mb);
- m = so->so_rcv.sb_mb;
- }
- if (m)
- m->m_nextpkt = nextrecord;
- }
- } else {
- if (flags & MSG_PEEK)
- moff += len;
- else {
- if (mp)
- *mp = m_copym(m, 0, len, M_WAIT);
- m->m_data += len;
- m->m_len -= len;
- so->so_rcv.sb_cc -= len;
- }
- }
- if (so->so_oobmark) {
- if ((flags & MSG_PEEK) == 0) {
- so->so_oobmark -= len;
- if (so->so_oobmark == 0) {
- so->so_state |= SS_RCVATMARK;
- break;
- }
- } else {
- offset += len;
- if (offset == so->so_oobmark)
- break;
- }
- }
- if (flags & MSG_EOR)
- break;
- /*
- * If the MSG_WAITALL flag is set (for non-atomic socket),
- * we must not quit until "uio->uio_resid == 0" or an error
- * termination. If a signal/timeout occurs, return
- * with a short count but without error.
- * Keep sockbuf locked against other readers.
- */
- while (flags & MSG_WAITALL && m == 0 && uio->uio_resid > 0 &&
- !sosendallatonce(so) && !nextrecord) {
- if (so->so_error || so->so_state & SS_CANTRCVMORE)
- break;
- error = sbwait(&so->so_rcv);
- if (error) {
- sbunlock(&so->so_rcv);
- splx(s);
- return (0);
- }
- m = so->so_rcv.sb_mb;
- if (m)
- nextrecord = m->m_nextpkt;
- }
- }
-
- if (m && pr->pr_flags & PR_ATOMIC) {
- flags |= MSG_TRUNC;
- if ((flags & MSG_PEEK) == 0)
- (void) sbdroprecord(&so->so_rcv);
- }
- if ((flags & MSG_PEEK) == 0) {
- if (m == 0)
- so->so_rcv.sb_mb = nextrecord;
- if (pr->pr_flags & PR_WANTRCVD && so->so_pcb)
- (*pr->pr_usrreqs->pru_rcvd)(so, flags);
- }
- if (orig_resid == uio->uio_resid && orig_resid &&
- (flags & MSG_EOR) == 0 && (so->so_state & SS_CANTRCVMORE) == 0) {
- sbunlock(&so->so_rcv);
- splx(s);
- goto restart;
- }
-
- if (flagsp)
- *flagsp |= flags;
-release:
- sbunlock(&so->so_rcv);
- splx(s);
- return (error);
-}
-
-int
-soshutdown(so, how)
- register struct socket *so;
- register int how;
-{
- register struct protosw *pr = so->so_proto;
-
- how++;
- if (how & FREAD)
- sorflush(so);
- if (how & FWRITE)
- return ((*pr->pr_usrreqs->pru_shutdown)(so));
- return (0);
-}
-
-void
-sorflush(so)
- register struct socket *so;
-{
- register struct sockbuf *sb = &so->so_rcv;
- register struct protosw *pr = so->so_proto;
- register int s;
- struct sockbuf asb;
-
- sb->sb_flags |= SB_NOINTR;
- (void) sblock(sb, M_WAITOK);
- s = splimp();
- socantrcvmore(so);
- sbunlock(sb);
- asb = *sb;
- bzero((caddr_t)sb, sizeof (*sb));
- splx(s);
- if (pr->pr_flags & PR_RIGHTS && pr->pr_domain->dom_dispose)
- (*pr->pr_domain->dom_dispose)(asb.sb_mb);
- sbrelease(&asb);
-}
-
-int
-sosetopt(so, level, optname, m0)
- register struct socket *so;
- int level, optname;
- struct mbuf *m0;
-{
- int error = 0;
- register struct mbuf *m = m0;
-
- if (level != SOL_SOCKET) {
- if (so->so_proto && so->so_proto->pr_ctloutput)
- return ((*so->so_proto->pr_ctloutput)
- (PRCO_SETOPT, so, level, optname, &m0));
- error = ENOPROTOOPT;
- } else {
- switch (optname) {
-
- case SO_LINGER:
- if (m == NULL || m->m_len != sizeof (struct linger)) {
- error = EINVAL;
- goto bad;
- }
- so->so_linger = mtod(m, struct linger *)->l_linger;
- /* fall thru... */
-
- case SO_DEBUG:
- case SO_KEEPALIVE:
- case SO_DONTROUTE:
- case SO_USELOOPBACK:
- case SO_BROADCAST:
- case SO_REUSEADDR:
- case SO_REUSEPORT:
- case SO_OOBINLINE:
- case SO_TIMESTAMP:
- if (m == NULL || m->m_len < sizeof (int)) {
- error = EINVAL;
- goto bad;
- }
- if (*mtod(m, int *))
- so->so_options |= optname;
- else
- so->so_options &= ~optname;
- break;
-
- case SO_SNDBUF:
- case SO_RCVBUF:
- case SO_SNDLOWAT:
- case SO_RCVLOWAT:
- {
- int optval;
-
- if (m == NULL || m->m_len < sizeof (int)) {
- error = EINVAL;
- goto bad;
- }
-
- /*
- * Values < 1 make no sense for any of these
- * options, so disallow them.
- */
- optval = *mtod(m, int *);
- if (optval < 1) {
- error = EINVAL;
- goto bad;
- }
-
- switch (optname) {
-
- case SO_SNDBUF:
- case SO_RCVBUF:
- if (sbreserve(optname == SO_SNDBUF ?
- &so->so_snd : &so->so_rcv,
- (u_long) optval) == 0) {
- error = ENOBUFS;
- goto bad;
- }
- break;
-
- /*
- * Make sure the low-water is never greater than
- * the high-water.
- */
- case SO_SNDLOWAT:
- so->so_snd.sb_lowat =
- (optval > so->so_snd.sb_hiwat) ?
- so->so_snd.sb_hiwat : optval;
- break;
- case SO_RCVLOWAT:
- so->so_rcv.sb_lowat =
- (optval > so->so_rcv.sb_hiwat) ?
- so->so_rcv.sb_hiwat : optval;
- break;
- }
- break;
- }
-
- case SO_SNDTIMEO:
- case SO_RCVTIMEO:
- {
- struct timeval *tv;
- unsigned long val;
-
- if (m == NULL || m->m_len < sizeof (*tv)) {
- error = EINVAL;
- goto bad;
- }
- tv = mtod(m, struct timeval *);
- if (tv->tv_sec >= (ULONG_MAX - hz) / hz) {
- error = EDOM;
- goto bad;
- }
- val = tv->tv_sec * hz + tv->tv_usec / tick;
-
- switch (optname) {
-
- case SO_SNDTIMEO:
- so->so_snd.sb_timeo = val;
- break;
- case SO_RCVTIMEO:
- so->so_rcv.sb_timeo = val;
- break;
- }
- break;
- }
-
- case SO_PRIVSTATE:
- /* we don't care what the parameter is... */
- so->so_state &= ~SS_PRIV;
- break;
-
- case SO_SNDWAKEUP:
- case SO_RCVWAKEUP:
- {
- /* RTEMS addition. */
- struct sockwakeup *sw;
- struct sockbuf *sb;
-
- if (m == NULL
- || m->m_len != sizeof (struct sockwakeup)) {
- error = EINVAL;
- goto bad;
- }
- sw = mtod(m, struct sockwakeup *);
- sb = (optname == SO_SNDWAKEUP
- ? &so->so_snd
- : &so->so_rcv);
- sb->sb_wakeup = sw->sw_pfn;
- sb->sb_wakeuparg = sw->sw_arg;
- if (sw->sw_pfn)
- sb->sb_flags |= SB_ASYNC;
- else
- sb->sb_flags &=~ SB_ASYNC;
- break;
- }
-
- default:
- error = ENOPROTOOPT;
- break;
- }
- if (error == 0 && so->so_proto && so->so_proto->pr_ctloutput) {
- (void) ((*so->so_proto->pr_ctloutput)
- (PRCO_SETOPT, so, level, optname, &m0));
- m = NULL; /* freed by protocol */
- }
- }
-bad:
- if (m)
- (void) m_free(m);
- return (error);
-}
-
-int
-sogetopt(so, level, optname, mp)
- register struct socket *so;
- int level, optname;
- struct mbuf **mp;
-{
- register struct mbuf *m;
-
- if (level != SOL_SOCKET) {
- if (so->so_proto && so->so_proto->pr_ctloutput) {
- return ((*so->so_proto->pr_ctloutput)
- (PRCO_GETOPT, so, level, optname, mp));
- } else
- return (ENOPROTOOPT);
- } else {
- m = m_get(M_WAIT, MT_SOOPTS);
- m->m_len = sizeof (int);
-
- switch (optname) {
-
- case SO_LINGER:
- m->m_len = sizeof (struct linger);
- mtod(m, struct linger *)->l_onoff =
- so->so_options & SO_LINGER;
- mtod(m, struct linger *)->l_linger = so->so_linger;
- break;
-
- case SO_USELOOPBACK:
- case SO_DONTROUTE:
- case SO_DEBUG:
- case SO_KEEPALIVE:
- case SO_REUSEADDR:
- case SO_REUSEPORT:
- case SO_BROADCAST:
- case SO_OOBINLINE:
- case SO_TIMESTAMP:
- *mtod(m, int *) = so->so_options & optname;
- break;
-
- case SO_PRIVSTATE:
- *mtod(m, int *) = so->so_state & SS_PRIV;
- break;
-
- case SO_TYPE:
- *mtod(m, int *) = so->so_type;
- break;
-
- case SO_ERROR:
- *mtod(m, int *) = so->so_error;
- so->so_error = 0;
- break;
-
- case SO_SNDBUF:
- *mtod(m, int *) = so->so_snd.sb_hiwat;
- break;
-
- case SO_RCVBUF:
- *mtod(m, int *) = so->so_rcv.sb_hiwat;
- break;
-
- case SO_SNDLOWAT:
- *mtod(m, int *) = so->so_snd.sb_lowat;
- break;
-
- case SO_RCVLOWAT:
- *mtod(m, int *) = so->so_rcv.sb_lowat;
- break;
-
- case SO_SNDTIMEO:
- case SO_RCVTIMEO:
- {
- unsigned long val = (optname == SO_SNDTIMEO ?
- so->so_snd.sb_timeo : so->so_rcv.sb_timeo);
-
- m->m_len = sizeof(struct timeval);
- mtod(m, struct timeval *)->tv_sec = val / hz;
- mtod(m, struct timeval *)->tv_usec =
- (val % hz) * tick;
- break;
- }
-
- case SO_SNDWAKEUP:
- case SO_RCVWAKEUP:
- {
- struct sockbuf *sb;
- struct sockwakeup *sw;
-
- /* RTEMS additions. */
- sb = (optname == SO_SNDWAKEUP
- ? &so->so_snd
- : &so->so_rcv);
- m->m_len = sizeof (struct sockwakeup);
- sw = mtod(m, struct sockwakeup *);
- sw->sw_pfn = sb->sb_wakeup;
- sw->sw_arg = sb->sb_wakeuparg;
- break;
- }
-
- default:
- (void)m_free(m);
- return (ENOPROTOOPT);
- }
- *mp = m;
- return (0);
- }
-}
-
-void
-sohasoutofband(so)
- register struct socket *so;
-{
-#if 0 /* FIXME: For now we just ignore out of band data */
- struct proc *p;
-
- if (so->so_pgid < 0)
- gsignal(-so->so_pgid, SIGURG);
- else if (so->so_pgid > 0 && (p = pfind(so->so_pgid)) != 0)
- psignal(p, SIGURG);
- selwakeup(&so->so_rcv.sb_sel);
-#endif
-}
diff --git a/c/src/exec/libnetworking/kern/uipc_socket2.c b/c/src/exec/libnetworking/kern/uipc_socket2.c
deleted file mode 100644
index 0539d2c5f3..0000000000
--- a/c/src/exec/libnetworking/kern/uipc_socket2.c
+++ /dev/null
@@ -1,965 +0,0 @@
-/*
- * This file has undergone several changes to reflect the
- * differences between the RTEMS and FreeBSD kernels.
- */
-
-/*
- * Copyright (c) 1982, 1986, 1988, 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)uipc_socket2.c 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/proc.h>
-#include <sys/file.h>
-#include <sys/buf.h>
-#include <sys/malloc.h>
-#include <sys/mbuf.h>
-#include <sys/protosw.h>
-#include <sys/stat.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/signalvar.h>
-#include <sys/sysctl.h>
-
-/*
- * Primitive routines for operating on sockets and socket buffers
- */
-
-u_long sb_max = SB_MAX; /* XXX should be static */
-SYSCTL_INT(_kern, KERN_MAXSOCKBUF, maxsockbuf, CTLFLAG_RW, &sb_max, 0, "")
-
-static u_long sb_efficiency = 8; /* parameter for sbreserve() */
-SYSCTL_INT(_kern, OID_AUTO, sockbuf_waste_factor, CTLFLAG_RW, &sb_efficiency,
- 0, "");
-
-/*
- * Procedures to manipulate state flags of socket
- * and do appropriate wakeups. Normal sequence from the
- * active (originating) side is that soisconnecting() is
- * called during processing of connect() call,
- * resulting in an eventual call to soisconnected() if/when the
- * connection is established. When the connection is torn down
- * soisdisconnecting() is called during processing of disconnect() call,
- * and soisdisconnected() is called when the connection to the peer
- * is totally severed. The semantics of these routines are such that
- * connectionless protocols can call soisconnected() and soisdisconnected()
- * only, bypassing the in-progress calls when setting up a ``connection''
- * takes no time.
- *
- * From the passive side, a socket is created with
- * two queues of sockets: so_q0 for connections in progress
- * and so_q for connections already made and awaiting user acceptance.
- * As a protocol is preparing incoming connections, it creates a socket
- * structure queued on so_q0 by calling sonewconn(). When the connection
- * is established, soisconnected() is called, and transfers the
- * socket structure to so_q, making it available to accept().
- *
- * If a socket is closed with sockets on either
- * so_q0 or so_q, these sockets are dropped.
- *
- * If higher level protocols are implemented in
- * the kernel, the wakeups done here will sometimes
- * cause software-interrupt process scheduling.
- */
-
-void
-soisconnecting(so)
- register struct socket *so;
-{
-
- so->so_state &= ~(SS_ISCONNECTED|SS_ISDISCONNECTING);
- so->so_state |= SS_ISCONNECTING;
-}
-
-void
-soisconnected(so)
- register struct socket *so;
-{
- register struct socket *head = so->so_head;
-
- so->so_state &= ~(SS_ISCONNECTING|SS_ISDISCONNECTING|SS_ISCONFIRMING);
- so->so_state |= SS_ISCONNECTED;
- if (head && (so->so_state & SS_INCOMP)) {
- TAILQ_REMOVE(&head->so_incomp, so, so_list);
- head->so_incqlen--;
- so->so_state &= ~SS_INCOMP;
- TAILQ_INSERT_TAIL(&head->so_comp, so, so_list);
- so->so_state |= SS_COMP;
- sorwakeup(head);
- soconnwakeup(head);
- } else {
- soconnwakeup(so);
- sorwakeup(so);
- sowwakeup(so);
- }
-}
-
-void
-soisdisconnecting(so)
- register struct socket *so;
-{
-
- so->so_state &= ~SS_ISCONNECTING;
- so->so_state |= (SS_ISDISCONNECTING|SS_CANTRCVMORE|SS_CANTSENDMORE);
- soconnwakeup(so);
- sowwakeup(so);
- sorwakeup(so);
-}
-
-void
-soisdisconnected(so)
- register struct socket *so;
-{
-
- so->so_state &= ~(SS_ISCONNECTING|SS_ISCONNECTED|SS_ISDISCONNECTING);
- so->so_state |= (SS_CANTRCVMORE|SS_CANTSENDMORE);
- soconnwakeup(so);
- sowwakeup(so);
- sorwakeup(so);
-}
-
-/*
- * Return a random connection that hasn't been serviced yet and
- * is eligible for discard. There is a one in qlen chance that
- * we will return a null, saying that there are no dropable
- * requests. In this case, the protocol specific code should drop
- * the new request. This insures fairness.
- *
- * This may be used in conjunction with protocol specific queue
- * congestion routines.
- */
-struct socket *
-sodropablereq(head)
- register struct socket *head;
-{
- register struct socket *so;
- unsigned int i, j, qlen, m;
-
- static int rnd;
- static long old_mono_secs;
- static unsigned int cur_cnt, old_cnt;
-
- if ((i = (m = rtems_bsdnet_seconds_since_boot()) - old_mono_secs) != 0) {
- old_mono_secs = m;
- old_cnt = cur_cnt / i;
- cur_cnt = 0;
- }
-
- so = TAILQ_FIRST(&head->so_incomp);
- if (!so)
- return (so);
-
- qlen = head->so_incqlen;
- if (++cur_cnt > qlen || old_cnt > qlen) {
- rnd = (314159 * rnd + 66329) & 0xffff;
- j = ((qlen + 1) * rnd) >> 16;
-
- while (j-- && so)
- so = TAILQ_NEXT(so, so_list);
- }
-
- return (so);
-}
-
-/*
- * When an attempt at a new connection is noted on a socket
- * which accepts connections, sonewconn is called. If the
- * connection is possible (subject to space constraints, etc.)
- * then we allocate a new structure, propoerly linked into the
- * data structure of the original socket, and return this.
- * Connstatus may be 0, or SO_ISCONFIRMING, or SO_ISCONNECTED.
- *
- * Currently, sonewconn() is defined as sonewconn1() in socketvar.h
- * to catch calls that are missing the (new) second parameter.
- */
-struct socket *
-sonewconn1(head, connstatus)
- register struct socket *head;
- int connstatus;
-{
- register struct socket *so;
-
- if (head->so_qlen > 3 * head->so_qlimit / 2)
- return ((struct socket *)0);
- MALLOC(so, struct socket *, sizeof(*so), M_SOCKET, M_DONTWAIT);
- if (so == NULL)
- return ((struct socket *)0);
- bzero((caddr_t)so, sizeof(*so));
- so->so_head = head;
- so->so_type = head->so_type;
- so->so_options = head->so_options &~ SO_ACCEPTCONN;
- so->so_linger = head->so_linger;
- so->so_state = head->so_state | SS_NOFDREF;
- so->so_proto = head->so_proto;
- so->so_timeo = head->so_timeo;
- so->so_pgid = head->so_pgid;
- so->so_uid = head->so_uid;
- (void) soreserve(so, head->so_snd.sb_hiwat, head->so_rcv.sb_hiwat);
- if (connstatus) {
- TAILQ_INSERT_TAIL(&head->so_comp, so, so_list);
- so->so_state |= SS_COMP;
- } else {
- TAILQ_INSERT_TAIL(&head->so_incomp, so, so_list);
- so->so_state |= SS_INCOMP;
- head->so_incqlen++;
- }
- head->so_qlen++;
- if ((*so->so_proto->pr_usrreqs->pru_attach)(so, 0)) {
- if (so->so_state & SS_COMP) {
- TAILQ_REMOVE(&head->so_comp, so, so_list);
- } else {
- TAILQ_REMOVE(&head->so_incomp, so, so_list);
- head->so_incqlen--;
- }
- head->so_qlen--;
- (void) free((caddr_t)so, M_SOCKET);
- return ((struct socket *)0);
- }
- if (connstatus) {
- sorwakeup(head);
- soconnwakeup(head);
- so->so_state |= connstatus;
- }
- return (so);
-}
-
-/*
- * Socantsendmore indicates that no more data will be sent on the
- * socket; it would normally be applied to a socket when the user
- * informs the system that no more data is to be sent, by the protocol
- * code (in case PRU_SHUTDOWN). Socantrcvmore indicates that no more data
- * will be received, and will normally be applied to the socket by a
- * protocol when it detects that the peer will send no more data.
- * Data queued for reading in the socket may yet be read.
- */
-
-void
-socantsendmore(so)
- struct socket *so;
-{
-
- so->so_state |= SS_CANTSENDMORE;
- sowwakeup(so);
-}
-
-void
-socantrcvmore(so)
- struct socket *so;
-{
-
- so->so_state |= SS_CANTRCVMORE;
- sorwakeup(so);
-}
-
-/*
- * Socket buffer (struct sockbuf) utility routines.
- *
- * Each socket contains two socket buffers: one for sending data and
- * one for receiving data. Each buffer contains a queue of mbufs,
- * information about the number of mbufs and amount of data in the
- * queue, and other fields allowing select() statements and notification
- * on data availability to be implemented.
- *
- * Data stored in a socket buffer is maintained as a list of records.
- * Each record is a list of mbufs chained together with the m_next
- * field. Records are chained together with the m_nextpkt field. The upper
- * level routine soreceive() expects the following conventions to be
- * observed when placing information in the receive buffer:
- *
- * 1. If the protocol requires each message be preceded by the sender's
- * name, then a record containing that name must be present before
- * any associated data (mbuf's must be of type MT_SONAME).
- * 2. If the protocol supports the exchange of ``access rights'' (really
- * just additional data associated with the message), and there are
- * ``rights'' to be received, then a record containing this data
- * should be present (mbuf's must be of type MT_RIGHTS).
- * 3. If a name or rights record exists, then it must be followed by
- * a data record, perhaps of zero length.
- *
- * Before using a new socket structure it is first necessary to reserve
- * buffer space to the socket, by calling sbreserve(). This should commit
- * some of the available buffer space in the system buffer pool for the
- * socket (currently, it does nothing but enforce limits). The space
- * should be released by calling sbrelease() when the socket is destroyed.
- */
-
-int
-soreserve(so, sndcc, rcvcc)
- register struct socket *so;
- u_long sndcc, rcvcc;
-{
-
- if (sbreserve(&so->so_snd, sndcc) == 0)
- goto bad;
- if (sbreserve(&so->so_rcv, rcvcc) == 0)
- goto bad2;
- if (so->so_rcv.sb_lowat == 0)
- so->so_rcv.sb_lowat = 1;
- if (so->so_snd.sb_lowat == 0)
- so->so_snd.sb_lowat = MCLBYTES;
- if (so->so_snd.sb_lowat > so->so_snd.sb_hiwat)
- so->so_snd.sb_lowat = so->so_snd.sb_hiwat;
- return (0);
-bad2:
- sbrelease(&so->so_snd);
-bad:
- return (ENOBUFS);
-}
-
-/*
- * Allot mbufs to a sockbuf.
- * Attempt to scale mbmax so that mbcnt doesn't become limiting
- * if buffering efficiency is near the normal case.
- */
-int
-sbreserve(sb, cc)
- struct sockbuf *sb;
- u_long cc;
-{
-
- if (cc > sb_max * MCLBYTES / (MSIZE + MCLBYTES))
- return (0);
- sb->sb_hiwat = cc;
- sb->sb_mbmax = min(cc * sb_efficiency, sb_max);
- if (sb->sb_lowat > sb->sb_hiwat)
- sb->sb_lowat = sb->sb_hiwat;
- return (1);
-}
-
-/*
- * Free mbufs held by a socket, and reserved mbuf space.
- */
-void
-sbrelease(sb)
- struct sockbuf *sb;
-{
-
- sbflush(sb);
- sb->sb_hiwat = sb->sb_mbmax = 0;
-}
-
-/*
- * Routines to add and remove
- * data from an mbuf queue.
- *
- * The routines sbappend() or sbappendrecord() are normally called to
- * append new mbufs to a socket buffer, after checking that adequate
- * space is available, comparing the function sbspace() with the amount
- * of data to be added. sbappendrecord() differs from sbappend() in
- * that data supplied is treated as the beginning of a new record.
- * To place a sender's address, optional access rights, and data in a
- * socket receive buffer, sbappendaddr() should be used. To place
- * access rights and data in a socket receive buffer, sbappendrights()
- * should be used. In either case, the new data begins a new record.
- * Note that unlike sbappend() and sbappendrecord(), these routines check
- * for the caller that there will be enough space to store the data.
- * Each fails if there is not enough space, or if it cannot find mbufs
- * to store additional information in.
- *
- * Reliable protocols may use the socket send buffer to hold data
- * awaiting acknowledgement. Data is normally copied from a socket
- * send buffer in a protocol with m_copy for output to a peer,
- * and then removing the data from the socket buffer with sbdrop()
- * or sbdroprecord() when the data is acknowledged by the peer.
- */
-
-/*
- * Append mbuf chain m to the last record in the
- * socket buffer sb. The additional space associated
- * the mbuf chain is recorded in sb. Empty mbufs are
- * discarded and mbufs are compacted where possible.
- */
-void
-sbappend(sb, m)
- struct sockbuf *sb;
- struct mbuf *m;
-{
- register struct mbuf *n;
-
- if (m == 0)
- return;
- n = sb->sb_mb;
- if (n) {
- while (n->m_nextpkt)
- n = n->m_nextpkt;
- do {
- if (n->m_flags & M_EOR) {
- sbappendrecord(sb, m); /* XXXXXX!!!! */
- return;
- }
- } while (n->m_next && (n = n->m_next));
- }
- sbcompress(sb, m, n);
-}
-
-#ifdef SOCKBUF_DEBUG
-void
-sbcheck(sb)
- register struct sockbuf *sb;
-{
- register struct mbuf *m;
- register int len = 0, mbcnt = 0;
-
- for (m = sb->sb_mb; m; m = m->m_next) {
- len += m->m_len;
- mbcnt += MSIZE;
- if (m->m_flags & M_EXT) /*XXX*/ /* pretty sure this is bogus */
- mbcnt += m->m_ext.ext_size;
- if (m->m_nextpkt)
- panic("sbcheck nextpkt");
- }
- if (len != sb->sb_cc || mbcnt != sb->sb_mbcnt) {
- printf("cc %d != %d || mbcnt %d != %d\n", len, sb->sb_cc,
- mbcnt, sb->sb_mbcnt);
- panic("sbcheck");
- }
-}
-#endif
-
-/*
- * As above, except the mbuf chain
- * begins a new record.
- */
-void
-sbappendrecord(sb, m0)
- register struct sockbuf *sb;
- register struct mbuf *m0;
-{
- register struct mbuf *m;
-
- if (m0 == 0)
- return;
- m = sb->sb_mb;
- if (m)
- while (m->m_nextpkt)
- m = m->m_nextpkt;
- /*
- * Put the first mbuf on the queue.
- * Note this permits zero length records.
- */
- sballoc(sb, m0);
- if (m)
- m->m_nextpkt = m0;
- else
- sb->sb_mb = m0;
- m = m0->m_next;
- m0->m_next = 0;
- if (m && (m0->m_flags & M_EOR)) {
- m0->m_flags &= ~M_EOR;
- m->m_flags |= M_EOR;
- }
- sbcompress(sb, m, m0);
-}
-
-/*
- * As above except that OOB data
- * is inserted at the beginning of the sockbuf,
- * but after any other OOB data.
- */
-void
-sbinsertoob(sb, m0)
- register struct sockbuf *sb;
- register struct mbuf *m0;
-{
- register struct mbuf *m;
- register struct mbuf **mp;
-
- if (m0 == 0)
- return;
- for (mp = &sb->sb_mb; *mp ; mp = &((*mp)->m_nextpkt)) {
- m = *mp;
- again:
- switch (m->m_type) {
-
- case MT_OOBDATA:
- continue; /* WANT next train */
-
- case MT_CONTROL:
- m = m->m_next;
- if (m)
- goto again; /* inspect THIS train further */
- }
- break;
- }
- /*
- * Put the first mbuf on the queue.
- * Note this permits zero length records.
- */
- sballoc(sb, m0);
- m0->m_nextpkt = *mp;
- *mp = m0;
- m = m0->m_next;
- m0->m_next = 0;
- if (m && (m0->m_flags & M_EOR)) {
- m0->m_flags &= ~M_EOR;
- m->m_flags |= M_EOR;
- }
- sbcompress(sb, m, m0);
-}
-
-/*
- * Append address and data, and optionally, control (ancillary) data
- * to the receive queue of a socket. If present,
- * m0 must include a packet header with total length.
- * Returns 0 if no space in sockbuf or insufficient mbufs.
- */
-int
-sbappendaddr(sb, asa, m0, control)
- register struct sockbuf *sb;
- struct sockaddr *asa;
- struct mbuf *m0, *control;
-{
- register struct mbuf *m, *n;
- int space = asa->sa_len;
-
-if (m0 && (m0->m_flags & M_PKTHDR) == 0)
-panic("sbappendaddr");
- if (m0)
- space += m0->m_pkthdr.len;
- for (n = control; n; n = n->m_next) {
- space += n->m_len;
- if (n->m_next == 0) /* keep pointer to last control buf */
- break;
- }
- if (space > sbspace(sb))
- return (0);
- if (asa->sa_len > MLEN)
- return (0);
- MGET(m, M_DONTWAIT, MT_SONAME);
- if (m == 0)
- return (0);
- m->m_len = asa->sa_len;
- bcopy((caddr_t)asa, mtod(m, caddr_t), asa->sa_len);
- if (n)
- n->m_next = m0; /* concatenate data to control */
- else
- control = m0;
- m->m_next = control;
- for (n = m; n; n = n->m_next)
- sballoc(sb, n);
- n = sb->sb_mb;
- if (n) {
- while (n->m_nextpkt)
- n = n->m_nextpkt;
- n->m_nextpkt = m;
- } else
- sb->sb_mb = m;
- return (1);
-}
-
-int
-sbappendcontrol(sb, m0, control)
- struct sockbuf *sb;
- struct mbuf *control, *m0;
-{
- register struct mbuf *m, *n;
- int space = 0;
-
- if (control == 0)
- panic("sbappendcontrol");
- for (m = control; ; m = m->m_next) {
- space += m->m_len;
- if (m->m_next == 0)
- break;
- }
- n = m; /* save pointer to last control buffer */
- for (m = m0; m; m = m->m_next)
- space += m->m_len;
- if (space > sbspace(sb))
- return (0);
- n->m_next = m0; /* concatenate data to control */
- for (m = control; m; m = m->m_next)
- sballoc(sb, m);
- n = sb->sb_mb;
- if (n) {
- while (n->m_nextpkt)
- n = n->m_nextpkt;
- n->m_nextpkt = control;
- } else
- sb->sb_mb = control;
- return (1);
-}
-
-/*
- * Compress mbuf chain m into the socket
- * buffer sb following mbuf n. If n
- * is null, the buffer is presumed empty.
- */
-void
-sbcompress(sb, m, n)
- register struct sockbuf *sb;
- register struct mbuf *m, *n;
-{
- register int eor = 0;
- register struct mbuf *o;
-
- while (m) {
- eor |= m->m_flags & M_EOR;
- if (m->m_len == 0 &&
- (eor == 0 ||
- (((o = m->m_next) || (o = n)) &&
- o->m_type == m->m_type))) {
- m = m_free(m);
- continue;
- }
- if (n && (n->m_flags & (M_EXT | M_EOR)) == 0 &&
- (n->m_data + n->m_len + m->m_len) < &n->m_dat[MLEN] &&
- n->m_type == m->m_type) {
- bcopy(mtod(m, caddr_t), mtod(n, caddr_t) + n->m_len,
- (unsigned)m->m_len);
- n->m_len += m->m_len;
- sb->sb_cc += m->m_len;
- m = m_free(m);
- continue;
- }
- if (n)
- n->m_next = m;
- else
- sb->sb_mb = m;
- sballoc(sb, m);
- n = m;
- m->m_flags &= ~M_EOR;
- m = m->m_next;
- n->m_next = 0;
- }
- if (eor) {
- if (n)
- n->m_flags |= eor;
- else
- printf("semi-panic: sbcompress\n");
- }
-}
-
-/*
- * Free all mbufs in a sockbuf.
- * Check that all resources are reclaimed.
- */
-void
-sbflush(sb)
- register struct sockbuf *sb;
-{
-
- if (sb->sb_flags & SB_LOCK)
- panic("sbflush");
- while (sb->sb_mbcnt)
- sbdrop(sb, (int)sb->sb_cc);
- if (sb->sb_cc || sb->sb_mb)
- panic("sbflush 2");
-}
-
-/*
- * Drop data from (the front of) a sockbuf.
- */
-void
-sbdrop(sb, len)
- register struct sockbuf *sb;
- register int len;
-{
- register struct mbuf *m, *mn;
- struct mbuf *next;
-
- next = (m = sb->sb_mb) ? m->m_nextpkt : 0;
- while (len > 0) {
- if (m == 0) {
- if (next == 0)
- panic("sbdrop");
- m = next;
- next = m->m_nextpkt;
- continue;
- }
- if (m->m_len > len) {
- m->m_len -= len;
- m->m_data += len;
- sb->sb_cc -= len;
- break;
- }
- len -= m->m_len;
- sbfree(sb, m);
- MFREE(m, mn);
- m = mn;
- }
- while (m && m->m_len == 0) {
- sbfree(sb, m);
- MFREE(m, mn);
- m = mn;
- }
- if (m) {
- sb->sb_mb = m;
- m->m_nextpkt = next;
- } else
- sb->sb_mb = next;
-}
-
-/*
- * Drop a record off the front of a sockbuf
- * and move the next record to the front.
- */
-void
-sbdroprecord(sb)
- register struct sockbuf *sb;
-{
- register struct mbuf *m, *mn;
-
- m = sb->sb_mb;
- if (m) {
- sb->sb_mb = m->m_nextpkt;
- do {
- sbfree(sb, m);
- MFREE(m, mn);
- m = mn;
- } while (m);
- }
-}
-
-/*
- * Create a "control" mbuf containing the specified data
- * with the specified type for presentation on a socket buffer.
- */
-struct mbuf *
-sbcreatecontrol(p, size, type, level)
- caddr_t p;
- register int size;
- int type, level;
-{
- register struct cmsghdr *cp;
- struct mbuf *m;
-
- if ((m = m_get(M_DONTWAIT, MT_CONTROL)) == NULL)
- return ((struct mbuf *) NULL);
- cp = mtod(m, struct cmsghdr *);
- /* XXX check size? */
- (void)memcpy(CMSG_DATA(cp), p, size);
- size += sizeof(*cp);
- m->m_len = size;
- cp->cmsg_len = size;
- cp->cmsg_level = level;
- cp->cmsg_type = type;
- return (m);
-}
-
-#ifdef PRU_OLDSTYLE
-/*
- * The following routines mediate between the old-style `pr_usrreq'
- * protocol implementations and the new-style `struct pr_usrreqs'
- * calling convention.
- */
-
-/* syntactic sugar */
-#define nomb (struct mbuf *)0
-
-static int
-old_abort(struct socket *so)
-{
- return so->so_proto->pr_ousrreq(so, PRU_ABORT, nomb, nomb, nomb);
-}
-
-static int
-old_accept(struct socket *so, struct mbuf *nam)
-{
- return so->so_proto->pr_ousrreq(so, PRU_ACCEPT, nomb, nam, nomb);
-}
-
-static int
-old_attach(struct socket *so, int proto)
-{
- return so->so_proto->pr_ousrreq(so, PRU_ATTACH, nomb,
- (struct mbuf *)proto, /* XXX */
- nomb);
-}
-
-static int
-old_bind(struct socket *so, struct mbuf *nam)
-{
- return so->so_proto->pr_ousrreq(so, PRU_BIND, nomb, nam, nomb);
-}
-
-static int
-old_connect(struct socket *so, struct mbuf *nam)
-{
- return so->so_proto->pr_ousrreq(so, PRU_CONNECT, nomb, nam, nomb);
-}
-
-static int
-old_connect2(struct socket *so1, struct socket *so2)
-{
- return so1->so_proto->pr_ousrreq(so1, PRU_CONNECT2, nomb,
- (struct mbuf *)so2, nomb);
-}
-
-static int
-old_control(struct socket *so, int cmd, caddr_t data, struct ifnet *ifp)
-{
- return so->so_proto->pr_ousrreq(so, PRU_CONTROL, (struct mbuf *)cmd,
- (struct mbuf *)data,
- (struct mbuf *)ifp);
-}
-
-static int
-old_detach(struct socket *so)
-{
- return so->so_proto->pr_ousrreq(so, PRU_DETACH, nomb, nomb, nomb);
-}
-
-static int
-old_disconnect(struct socket *so)
-{
- return so->so_proto->pr_ousrreq(so, PRU_DISCONNECT, nomb, nomb, nomb);
-}
-
-static int
-old_listen(struct socket *so)
-{
- return so->so_proto->pr_ousrreq(so, PRU_LISTEN, nomb, nomb, nomb);
-}
-
-static int
-old_peeraddr(struct socket *so, struct mbuf *nam)
-{
- return so->so_proto->pr_ousrreq(so, PRU_PEERADDR, nomb, nam, nomb);
-}
-
-static int
-old_rcvd(struct socket *so, int flags)
-{
- return so->so_proto->pr_ousrreq(so, PRU_RCVD, nomb,
- (struct mbuf *)flags, /* XXX */
- nomb);
-}
-
-static int
-old_rcvoob(struct socket *so, struct mbuf *m, int flags)
-{
- return so->so_proto->pr_ousrreq(so, PRU_RCVOOB, m,
- (struct mbuf *)flags, /* XXX */
- nomb);
-}
-
-static int
-old_send(struct socket *so, int flags, struct mbuf *m, struct mbuf *addr,
- struct mbuf *control)
-{
- int req;
-
- if (flags & PRUS_OOB) {
- req = PRU_SENDOOB;
- } else if(flags & PRUS_EOF) {
- req = PRU_SEND_EOF;
- } else {
- req = PRU_SEND;
- }
- return so->so_proto->pr_ousrreq(so, req, m, addr, control);
-}
-
-static int
-old_sense(struct socket *so, struct stat *sb)
-{
- return so->so_proto->pr_ousrreq(so, PRU_SENSE, (struct mbuf *)sb,
- nomb, nomb);
-}
-
-static int
-old_shutdown(struct socket *so)
-{
- return so->so_proto->pr_ousrreq(so, PRU_SHUTDOWN, nomb, nomb, nomb);
-}
-
-static int
-old_sockaddr(struct socket *so, struct mbuf *nam)
-{
- return so->so_proto->pr_ousrreq(so, PRU_SOCKADDR, nomb, nam, nomb);
-}
-
-struct pr_usrreqs pru_oldstyle = {
- old_abort, old_accept, old_attach, old_bind, old_connect,
- old_connect2, old_control, old_detach, old_disconnect,
- old_listen, old_peeraddr, old_rcvd, old_rcvoob, old_send,
- old_sense, old_shutdown, old_sockaddr
-};
-
-#endif /* PRU_OLDSTYLE */
-
-/*
- * Some routines that return EOPNOTSUPP for entry points that are not
- * supported by a protocol. Fill in as needed.
- */
-int
-pru_accept_notsupp(struct socket *so, struct mbuf *nam)
-{
- return EOPNOTSUPP;
-}
-
-int
-pru_connect2_notsupp(struct socket *so1, struct socket *so2)
-{
- return EOPNOTSUPP;
-}
-
-int
-pru_control_notsupp(struct socket *so, int cmd, caddr_t data,
- struct ifnet *ifp)
-{
- return EOPNOTSUPP;
-}
-
-int
-pru_listen_notsupp(struct socket *so)
-{
- return EOPNOTSUPP;
-}
-
-int
-pru_rcvd_notsupp(struct socket *so, int flags)
-{
- return EOPNOTSUPP;
-}
-
-int
-pru_rcvoob_notsupp(struct socket *so, struct mbuf *m, int flags)
-{
- return EOPNOTSUPP;
-}
-
-/*
- * This isn't really a ``null'' operation, but it's the default one
- * and doesn't do anything destructive.
- */
-int
-pru_sense_null(struct socket *so, struct stat *sb)
-{
- sb->st_blksize = so->so_snd.sb_hiwat;
- return 0;
-}
-
diff --git a/c/src/exec/libnetworking/lib/Makefile.am b/c/src/exec/libnetworking/lib/Makefile.am
deleted file mode 100644
index 5f8d151e13..0000000000
--- a/c/src/exec/libnetworking/lib/Makefile.am
+++ /dev/null
@@ -1,33 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-LIBNAME = lib.a
-LIB = $(ARCH)/$(LIBNAME)
-
-C_FILES = getprotoby.c rtems_bsdnet_ntp.c syslog.c tftpDriver.c
-C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
-
-OBJS = $(C_O_FILES)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../automake/lib.am
-
-#
-# Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -DNOPOLL -DNOSELECT
-
-$(LIB): $(OBJS)
- $(make-library)
-
-all-local: $(ARCH) $(OBJS) $(LIB)
-
-.PRECIOUS: $(LIB)
-
-EXTRA_DIST = README getprotoby.c rtems_bsdnet_ntp.c syslog.c tftpDriver.c
-
-include $(top_srcdir)/../../../automake/local.am
diff --git a/c/src/exec/libnetworking/lib/README b/c/src/exec/libnetworking/lib/README
deleted file mode 100644
index 998bd5e708..0000000000
--- a/c/src/exec/libnetworking/lib/README
+++ /dev/null
@@ -1,5 +0,0 @@
-#
-# $Id$
-#
-
-Sources from application-level (as opposed to kernel-level) libraries.
diff --git a/c/src/exec/libnetworking/lib/getprotoby.c b/c/src/exec/libnetworking/lib/getprotoby.c
deleted file mode 100644
index fc8de6e402..0000000000
--- a/c/src/exec/libnetworking/lib/getprotoby.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * $Id$
- */
-
-#include <netdb.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-
-static const struct protoent prototab[] = {
- { "ip", NULL, IPPROTO_IP },
- { "icmp", NULL, IPPROTO_ICMP },
- { "tcp", NULL, IPPROTO_TCP },
- { "udp", NULL, IPPROTO_UDP },
- };
-
-/*
- * Dummy version of BSD getprotobyname()
- */
-struct protoent *
-getprotobyname (const char *name)
-{
- int i;
-
- for (i = 0 ; i < (sizeof prototab / sizeof prototab[0]) ; i++) {
- if (strcmp (name, prototab[i].p_name) == 0)
- return (struct protoent *) &prototab[i];
- }
- return NULL;
-}
-
-/*
- * Dummy version of BSD getprotobynumber()
- */
-struct protoent *
-getprotobynumber (int proto)
-{
- int i;
-
- for (i = 0 ; i < (sizeof prototab / sizeof prototab[0]) ; i++) {
- if (proto == prototab[i].p_proto)
- return (struct protoent *) &prototab[i];
- }
- return NULL;
-}
diff --git a/c/src/exec/libnetworking/lib/rtems_bsdnet_ntp.c b/c/src/exec/libnetworking/lib/rtems_bsdnet_ntp.c
deleted file mode 100644
index 11b0cef63a..0000000000
--- a/c/src/exec/libnetworking/lib/rtems_bsdnet_ntp.c
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Synchronize with an NTP server
- *
- * This program may be distributed and used for any purpose.
- * I ask only that you:
- * 1. Leave this author information intact.
- * 2. Document any changes you make.
- *
- * W. Eric Norum
- * Canadian Light Source
- * University of Saskatchewan
- * Saskatoon, Saskatchewan, CANADA
- * eric@cls.usask.ca
- *
- * $Id$
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <time.h>
-#include <limits.h>
-#include <rtems.h>
-#include <rtems/rtems_bsdnet.h>
-#include <rtems/error.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-
-/*
- * RTEMS base: 1988, January 1
- * UNIX base: 1970, January 1
- * NTP base: 1900, January 1
- */
-#define UNIX_BASE_TO_NTP_BASE (((70UL*365UL)+17UL) * (24*60*60))
-
-struct timestamp {
- rtems_unsigned32 integer;
- rtems_unsigned32 fraction;
-};
-
-struct ntpPacketSmall {
- rtems_unsigned8 li_vn_mode;
- rtems_unsigned8 stratum;
- rtems_signed8 poll_interval;
- rtems_signed8 precision;
- rtems_signed32 root_delay;
- rtems_signed32 root_dispersion;
- char reference_identifier[4];
- struct timestamp reference_timestamp;
- struct timestamp originate_timestamp;
- struct timestamp receive_timestamp;
- struct timestamp transmit_timestamp;
-};
-
-struct ntpPacket {
- struct ntpPacketSmall ntp;
- char authenticator[96];
-};
-
-static int
-processPacket (struct ntpPacketSmall *p)
-{
- time_t tbuf;
- struct tm *lt;
- rtems_time_of_day rt;
- rtems_interval ticks_per_second;
-
- if (((p->li_vn_mode & (0x7 << 3)) != (3 << 3))
- || ((p->transmit_timestamp.integer == 0) && (p->transmit_timestamp.fraction == 0)))
- return 0;
- rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticks_per_second);
- tbuf = ntohl (p->transmit_timestamp.integer) - UNIX_BASE_TO_NTP_BASE - rtems_bsdnet_timeoffset;
- lt = gmtime (&tbuf);
- rt.year = lt->tm_year + 1900;
- rt.month = lt->tm_mon + 1;
- rt.day = lt->tm_mday;
- rt.hour = lt->tm_hour;
- rt.minute = lt->tm_min;
- rt.second = lt->tm_sec;
- rt.ticks = ntohl (p->transmit_timestamp.fraction) / (ULONG_MAX / ticks_per_second);
- if (rt.ticks >= ticks_per_second)
- rt.ticks = ticks_per_second - 1;
- rtems_clock_set (&rt);
- return 1;
-}
-
-int
-rtems_bsdnet_synchronize_ntp (int interval, rtems_task_priority priority)
-{
- int s;
- int i;
- static struct sockaddr_in myAddr, farAddr;
- int fromlen;
- struct ntpPacketSmall packet;
- struct timeval tv;
-
- if (interval != 0) {
- printf ("Daemon-mode note yet supported.\n");
- errno = EINVAL;
- return -1;
- }
- s = socket (AF_INET, SOCK_DGRAM, 0);
- if (s < 0) {
- printf ("Can't create socket: %s\n", strerror (errno));
- return -1;
- }
- tv.tv_sec = 5;
- tv.tv_usec = 0;
- if (setsockopt (s, SOL_SOCKET, SO_RCVTIMEO, (char *)&tv, sizeof tv) < 0) {
- printf ("Can't set socket receive timeout: %s", strerror (errno));
- return -1;
- }
- memset (&myAddr, sizeof myAddr, 0);
- myAddr.sin_family = AF_INET;
- myAddr.sin_port = htons (123);
- myAddr.sin_addr.s_addr = htonl (INADDR_ANY);
- if (bind (s, (struct sockaddr *)&myAddr, sizeof myAddr) < 0) {
- printf ("Can't bind socket: %s\n", strerror (errno));
- return -1;
- }
- for (;;) {
- /*
- * If there's no server we just have to wait
- * and hope that there's an NTP broadcast
- * server out there somewhere.
- */
- if (rtems_bsdnet_ntpserver_count > 0) {
- memset (&farAddr, sizeof farAddr, 0);
- farAddr.sin_family = AF_INET;
- farAddr.sin_port = htons (123);
- /*
- * For now, try only the first server.
- */
- farAddr.sin_addr = rtems_bsdnet_ntpserver[0];
- memset (&packet, sizeof packet, 0);
- packet.li_vn_mode = (3 << 3) | 3; /* NTP version 3, client */
- i = sendto (s, &packet, sizeof packet, 0, (struct sockaddr *)&farAddr, sizeof farAddr);
- if (i != sizeof packet) {
- printf ("Can't send: %s\n", strerror (errno));
- return -1;
- }
- }
- fromlen = sizeof farAddr;
- i = recvfrom (s, &packet, sizeof packet, 0, (struct sockaddr *)&farAddr, &fromlen);
- if (i == 0)
- rtems_panic ("EOF");
- if (i < 0) {
- if ((errno == EWOULDBLOCK) || (errno == EAGAIN))
- continue;
- rtems_panic ("Can't receive: %s", strerror (errno));
- }
- if (i >= sizeof packet) {
- if (processPacket (&packet))
- return 0;
- }
- }
-}
diff --git a/c/src/exec/libnetworking/lib/syslog.c b/c/src/exec/libnetworking/lib/syslog.c
deleted file mode 100644
index 0bb15bc78e..0000000000
--- a/c/src/exec/libnetworking/lib/syslog.c
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- * RTEMS version of syslog and associated routines
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include <stdio.h>
-#include <stdarg.h>
-#include <errno.h>
-#include <syslog.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-
-#include <unistd.h>
-
-static int LogStatus = LOG_CONS;
-static const char *LogTag = "syslog";
-static int LogFacility = LOG_USER;
-static int LogMask = 0xff;
-
-static int LogFd = -1;
-static rtems_id LogSemaphore;
-extern struct in_addr rtems_bsdnet_log_host_address;
-
-#define SYSLOG_PORT 514
-
-void
-syslog (int pri, const char *fmt, ...)
-{
- va_list ap;
-
- va_start (ap, fmt);
- vsyslog (pri, fmt, ap);
- va_end (ap);
-}
-
-/*
- * FIXME: Should cbuf be static? It could be if we put the mutex
- * around the entire body of this routine. Then we wouldn't
- * have to worry about blowing stacks with a local variable
- * that large. Could make cbuf bigger, too.
- */
-void
-vsyslog (int pri, const char *fmt, va_list ap)
-{
- int cnt;
- char *cp;
- char *msgp, cbuf[200];
- int sent;
-
- if (pri & ~(LOG_PRIMASK|LOG_FACMASK)) {
- syslog (LOG_ERR|LOG_CONS|LOG_PERROR|LOG_PID,
- "syslog: unknown facility/priority: %#x", pri);
- pri &= LOG_PRIMASK|LOG_FACMASK;
- }
-
- if (!LOG_MASK(LOG_PRI(pri)) & LogMask)
- return;
-
- if ((pri & LOG_FACMASK) == 0)
- pri |= LogFacility;
-
- cnt = sprintf (cbuf, "<%d>", pri);
- cp = msgp = cbuf + cnt;
- if (LogTag) {
- const char *lp = LogTag;
- while ((*cp = *lp++) != '\0')
- cp++;
- }
- if (LogStatus & LOG_PID) {
- rtems_id tid;
- rtems_task_ident (RTEMS_SELF, 0, &tid);
- cnt = sprintf (cp, "[%#lx]", (unsigned long)tid);
- cp += cnt;
- }
- if (LogTag) {
- *cp++ = ':';
- *cp++ = ' ';
- }
- cnt = vsprintf (cp, fmt, ap);
- cnt += cp - cbuf;
- if (cbuf[cnt-1] == '\n')
- cbuf[--cnt] = '\0';
-
- if (LogStatus & LOG_PERROR)
- printf ("%s\n", cbuf);
-
- /*
- * Grab the mutex
- */
- sent = 0;
- if ((rtems_bsdnet_log_host_address.s_addr != INADDR_ANY)
- && (LogFd >= 0)
- && (rtems_semaphore_obtain (LogSemaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT) == RTEMS_SUCCESSFUL)) {
- /*
- * Set the destination address/port
- */
- struct sockaddr_in farAddress;
- farAddress.sin_family = AF_INET;
- farAddress.sin_port = htons (SYSLOG_PORT);
- farAddress.sin_addr = rtems_bsdnet_log_host_address;
- memset (farAddress.sin_zero, '\0', sizeof farAddress.sin_zero);
-
- /*
- * Send the message
- */
- if (sendto (LogFd, cbuf, cnt, 0, (struct sockaddr *)&farAddress, sizeof farAddress) >= 0)
- sent = 1;
- rtems_semaphore_release (LogSemaphore);
- }
- if (!sent && (LogStatus & LOG_CONS) && !(LogStatus & LOG_PERROR))
- printf ("%s\n", msgp);
-}
-
-void
-openlog (const char *ident, int logstat, int logfac)
-{
- rtems_status_code sc;
- struct sockaddr_in myAddress;
-
- if (ident != NULL)
- LogTag = ident;
- LogStatus = logstat;
- if (logfac != 0 && (logfac & ~LOG_FACMASK) == 0)
- LogFacility = logfac;
-
- /*
- * Create the socket
- */
- if ((LogFd = socket (AF_INET, SOCK_DGRAM, 0)) < 0) {
- printf ("Can't create syslog socket: %d\n", errno);
- return;
- }
-
- /*
- * Bind socket to name
- */
- myAddress.sin_family = AF_INET;
- myAddress.sin_addr.s_addr = INADDR_ANY;
- myAddress.sin_port = 0;
- memset (myAddress.sin_zero, '\0', sizeof myAddress.sin_zero);
- if (bind (LogFd, (struct sockaddr *)&myAddress, sizeof (myAddress)) < 0) {
- close (LogFd);
- LogFd = -1;
- printf ("Can't bind syslog socket: %d\n", errno);
- return;
- }
-
- /*
- * Create the mutex
- */
- sc = rtems_semaphore_create (rtems_build_name('s', 'L', 'o', 'g'),
- 1,
- RTEMS_PRIORITY |
- RTEMS_BINARY_SEMAPHORE |
- RTEMS_INHERIT_PRIORITY |
- RTEMS_NO_PRIORITY_CEILING |
- RTEMS_LOCAL,
- 0,
- &LogSemaphore);
- if (sc != RTEMS_SUCCESSFUL) {
- printf ("Can't create syslog seamphore: %d\n", sc);
- close (LogFd);
- LogFd = -1;
- }
-}
-
-void
-closelog(void)
-{
- if (LogFd >= 0) {
- close (LogFd);
- LogFd = -1;
- rtems_semaphore_delete (LogSemaphore);
- }
-}
-
-int
-setlogmask (int pmask)
-{
- int omask;
-
- omask = LogMask;
- if (pmask != 0)
- LogMask = pmask;
- return (omask);
-}
diff --git a/c/src/exec/libnetworking/lib/tftpDriver.c b/c/src/exec/libnetworking/lib/tftpDriver.c
deleted file mode 100644
index ea3de5a901..0000000000
--- a/c/src/exec/libnetworking/lib/tftpDriver.c
+++ /dev/null
@@ -1,775 +0,0 @@
-/*
- * Trivial File Transfer Protocol (RFC 1350)
- *
- * Transfer file to/from remote host
- *
- * W. Eric Norum
- * Saskatchewan Accelerator Laboratory
- * University of Saskatchewan
- * Saskatoon, Saskatchewan, CANADA
- * eric@skatter.usask.ca
- *
- * $Id$
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <malloc.h>
-#include <string.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <rtems.h>
-#include <rtems/libio.h>
-#include <rtems/rtems_bsdnet.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-#ifndef set_errno_and_return_minus_one
-#define set_errno_and_return_minus_one( _error ) \
- do { errno = (_error); return -1; } while(0)
-#endif
-
-
-/*
- * Range of UDP ports to try
- */
-#define UDP_PORT_BASE 3180
-
-/*
- * Pathname prefix
- */
-#define TFTP_PATHNAME_PREFIX "/TFTP/"
-
-/*
- * Default limits
- */
-#define PACKET_REPLY_MILLISECONDS 6000
-#define OPEN_RETRY_LIMIT 10
-#define IO_RETRY_LIMIT 10
-
-/*
- * TFTP opcodes
- */
-#define TFTP_OPCODE_RRQ 1
-#define TFTP_OPCODE_WRQ 2
-#define TFTP_OPCODE_DATA 3
-#define TFTP_OPCODE_ACK 4
-#define TFTP_OPCODE_ERROR 5
-
-/*
- * Largest data transfer
- */
-#define TFTP_BUFSIZE 512
-
-/*
- * Packets transferred between machines
- */
-union tftpPacket {
- /*
- * RRQ/WRQ packet
- */
- struct tftpRWRQ {
- rtems_unsigned16 opcode;
- char filename_mode[TFTP_BUFSIZE];
- } tftpRWRQ;
-
- /*
- * DATA packet
- */
- struct tftpDATA {
- rtems_unsigned16 opcode;
- rtems_unsigned16 blocknum;
- rtems_unsigned8 data[TFTP_BUFSIZE];
- } tftpDATA;
-
- /*
- * ACK packet
- */
- struct tftpACK {
- rtems_unsigned16 opcode;
- rtems_unsigned16 blocknum;
- } tftpACK;
-
- /*
- * ERROR packet
- */
- struct tftpERROR {
- rtems_unsigned16 opcode;
- rtems_unsigned16 errorCode;
- char errorMessage[TFTP_BUFSIZE];
- } tftpERROR;
-};
-
-/*
- * State of each TFTP stream
- */
-struct tftpStream {
- /*
- * Buffer for storing most recently-received packet
- */
- union tftpPacket pkbuf;
-
- /*
- * Last block number received
- */
- rtems_unsigned16 blocknum;
-
- /*
- * Data transfer socket
- */
- int socket;
- struct sockaddr_in myAddress;
- struct sockaddr_in farAddress;
-
- /*
- * Indices into buffer
- */
- int nleft;
- int nused;
-
- /*
- * Flags
- */
- int firstReply;
- int eof;
-};
-
-/*
- * Number of streams open at the same time
- */
-
-static rtems_id tftp_mutex;
-static int nStreams;
-static struct tftpStream ** volatile tftpStreams;
-
-typedef const char *tftp_node;
-extern rtems_filesystem_operations_table rtems_tftp_ops;
-extern rtems_filesystem_file_handlers_r rtems_tftp_handlers;
-
-/*
- * Direct copy from the IMFS. Look at this.
- */
-
-rtems_filesystem_limits_and_options_t rtems_tftp_limits_and_options = {
- 5, /* link_max */
- 6, /* max_canon */
- 7, /* max_input */
- 255, /* name_max */
- 255, /* path_max */
- 2, /* pipe_buf */
- 1, /* posix_async_io */
- 2, /* posix_chown_restrictions */
- 3, /* posix_no_trunc */
- 4, /* posix_prio_io */
- 5, /* posix_sync_io */
- 6 /* posix_vdisable */
-};
-
-int rtems_tftp_mount_me(
- rtems_filesystem_mount_table_entry_t *temp_mt_entry
-)
-{
- rtems_status_code sc;
-
- temp_mt_entry->mt_fs_root.handlers = &rtems_tftp_handlers;
- temp_mt_entry->mt_fs_root.ops = &rtems_tftp_ops;
-
- /*
- * We have no tftp filesystem specific data to maintain. This
- * filesystem may only be mounted ONCE.
- *
- * And we maintain no real filesystem nodes, so there is no real root.
- */
-
- temp_mt_entry->fs_info = NULL;
- temp_mt_entry->mt_fs_root.node_access = NULL;
-
- /*
- * These need to be looked at for full POSIX semantics.
- */
-
- temp_mt_entry->pathconf_limits_and_options = rtems_tftp_limits_and_options;
-
-
- /*
- * Now allocate a semaphore for mutual exclusion.
- *
- * NOTE: This could be in an fsinfo for this filesystem type.
- */
-
- sc = rtems_semaphore_create (
- rtems_build_name('T', 'F', 'T', 'P'),
- 1,
- RTEMS_FIFO |
- RTEMS_BINARY_SEMAPHORE |
- RTEMS_NO_INHERIT_PRIORITY |
- RTEMS_NO_PRIORITY_CEILING |
- RTEMS_LOCAL,
- 0,
- &tftp_mutex
- );
-
- if (sc != RTEMS_SUCCESSFUL)
- set_errno_and_return_minus_one( ENOMEM );
-
- return 0;
-}
-
-/*
- * Initialize the TFTP driver
- */
-
-int rtems_bsdnet_initialize_tftp_filesystem ()
-{
- int status;
- rtems_filesystem_mount_table_entry_t *entry;
-
- status = mkdir( TFTP_PATHNAME_PREFIX, S_IRWXU | S_IRWXG | S_IRWXO );
- if ( status == -1 )
- return status;
-
- status = mount(
- &entry,
- &rtems_tftp_ops,
- RTEMS_FILESYSTEM_READ_ONLY,
- NULL,
- TFTP_PATHNAME_PREFIX
- );
-
- if ( status )
- perror( "TFTP mount failed" );
-
- return status;
-}
-
-/*
- * Set error message
- * This RTEMS/UNIX error mapping needs to be fixed!
- */
-static void
-tftpSetErrno (struct tftpStream *tp)
-{
- unsigned int tftpError;
- static const int errorMap[] = {
- 0,
- ENOENT,
- EPERM,
- ENOSPC,
- EINVAL,
- ENXIO,
- EEXIST,
- ESRCH,
- 0,
- };
-
- tftpError = ntohs (tp->pkbuf.tftpERROR.errorCode);
- if (tftpError < (sizeof errorMap / sizeof errorMap[0]))
- errno = errorMap[tftpError];
- else
- errno = 1000 + tftpError;
-}
-
-/*
- * Send a message to make the other end shut up
- */
-static void
-sendStifle (struct tftpStream *tp, struct sockaddr_in *to)
-{
- int len;
-
- /*
- * Create the error packet (Unknown transfer ID).
- */
- tp->pkbuf.tftpERROR.opcode = htons (TFTP_OPCODE_ERROR);
- tp->pkbuf.tftpERROR.errorCode = htons (5);
- len = sizeof tp->pkbuf.tftpERROR.opcode +
- sizeof tp->pkbuf.tftpERROR.errorCode + 1;
- len += sprintf (tp->pkbuf.tftpERROR.errorMessage, "GO AWAY");
-
- /*
- * Send it
- */
- sendto (tp->socket, (char *)&tp->pkbuf, len, 0,
- (struct sockaddr *)to, sizeof *to);
-}
-
-/*
- * Wait for a data packet
- */
-static int
-getPacket (struct tftpStream *tp)
-{
- int len;
- struct timeval tv;
-
- tv.tv_sec = PACKET_REPLY_MILLISECONDS / 1000;
- tv.tv_usec = (PACKET_REPLY_MILLISECONDS % 1000) * 1000;
- setsockopt (tp->socket, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof tv);
- for (;;) {
- union {
- struct sockaddr s;
- struct sockaddr_in i;
- } from;
- int fromlen = sizeof from;
- len = recvfrom (tp->socket, (char *)&tp->pkbuf,
- sizeof tp->pkbuf, 0,
- &from.s, &fromlen);
- if (len < 0)
- break;
- if (from.i.sin_addr.s_addr == tp->farAddress.sin_addr.s_addr) {
- if (tp->firstReply) {
- tp->firstReply = 0;
- tp->farAddress.sin_port = from.i.sin_port;
- }
- if (tp->farAddress.sin_port == from.i.sin_port)
- break;
- }
-
- /*
- * Packet is from someone with whom we are
- * not interested. Tell them to go away.
- */
- sendStifle (tp, &from.i);
- }
- tv.tv_sec = 0;
- tv.tv_usec = 0;
- setsockopt (tp->socket, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof tv);
- return len;
-}
-
-/*
- * Send an acknowledgement
- */
-static int
-sendAck (struct tftpStream *tp)
-{
- /*
- * Create the acknowledgement
- */
- tp->pkbuf.tftpACK.opcode = htons (TFTP_OPCODE_ACK);
- tp->pkbuf.tftpACK.blocknum = htons (tp->blocknum);
-
- /*
- * Send it
- */
- if (sendto (tp->socket, (char *)&tp->pkbuf, sizeof tp->pkbuf.tftpACK, 0,
- (struct sockaddr *)&tp->farAddress,
- sizeof tp->farAddress) < 0)
- return errno;
- return 0;
-}
-
-/*
- * Release a stream and clear the pointer to it
- */
-static void
-releaseStream (int s)
-{
- rtems_semaphore_obtain (tftp_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
- free (tftpStreams[s]);
- tftpStreams[s] = NULL;
- rtems_semaphore_release (tftp_mutex);
-}
-
-int rtems_tftp_evaluate_for_make(
- const char *path, /* IN */
- rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
- const char **name /* OUT */
-)
-{
- set_errno_and_return_minus_one( EIO );
-}
-
-/*
- * XXX - Fix return values.
- */
-
-int rtems_tftp_eval_path(
- const char *pathname, /* IN */
- int flags, /* IN */
- rtems_filesystem_location_info_t *pathloc /* IN/OUT */
-)
-{
-
- /*
- * Read-only for now
- */
-
- if ( (flags & O_WRONLY) == O_WRONLY )
- set_errno_and_return_minus_one( ENOENT );
-
- /*
- * The File system is mounted at TFTP_PATHNAME_PREFIX
- * the caller of this routine has striped off this part of the
- * name. Save the remainder of the name for use by the open routine.
- */
-
- pathloc->node_access = (void * ) pathname;
- pathloc->handlers = &rtems_tftp_handlers;
-
- return 0;
-}
-
-
-int rtems_tftp_open(
- rtems_libio_t *iop,
- const char *new_name,
- unsigned32 flag,
- unsigned32 mode
-)
-{
- struct tftpStream *tp;
- int retryCount;
- rtems_unsigned32 farAddress;
- int s;
- int len;
- char *cp1;
- char *cp2;
- char *remoteFilename;
- rtems_interval now;
- rtems_status_code sc;
- char *hostname;
-
- /*
- * This came from the evaluate path.
- */
-
- cp2 = iop->file_info;
-
- cp1 = cp2;
- while (*cp2 != '/') {
- if (*cp2 == '\0')
- return ENOENT;
- cp2++;
- }
-
- len = cp2 - cp1;
- hostname = malloc (len + 1);
- if (hostname == NULL)
- return ENOMEM;
-
- strncpy (hostname, cp1, len);
- hostname[len] = '\0';
- farAddress = inet_addr (hostname);
- free (hostname);
-
- if ((farAddress == 0) || (farAddress == ~0))
- return ENOENT;
-
- if (*++cp2 == '\0')
- return ENOENT;
-
- remoteFilename = cp2;
- if (strlen (remoteFilename) > (TFTP_BUFSIZE - 10))
- return ENOENT;
-
- /*
- * Find a free stream
- */
-
- sc = rtems_semaphore_obtain (tftp_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
- if (sc != RTEMS_SUCCESSFUL)
- return EBUSY;
-
- for (s = 0 ; s < nStreams ; s++) {
- if (tftpStreams[s] == NULL)
- break;
- }
-
- if (s == nStreams) {
- /*
- * Reallocate stream pointers
- * Guard against the case where realloc() returns NULL.
- */
- struct tftpStream **np;
-
- np = realloc (tftpStreams, ++nStreams * sizeof *tftpStreams);
- if (np == NULL) {
- rtems_semaphore_release (tftp_mutex);
- return ENOMEM;
- }
- tftpStreams = np;
- }
-
- tp = tftpStreams[s] = malloc (sizeof (struct tftpStream));
- rtems_semaphore_release (tftp_mutex);
- if (tp == NULL)
- return ENOMEM;
- iop->data0 = s;
- iop->data1 = tp;
-
- /*
- * Create the socket
- */
-
- if ((tp->socket = socket (AF_INET, SOCK_DGRAM, 0)) < 0) {
- releaseStream (s);
- return ENOMEM;
- }
-
- /*
- * Bind the socket to a local address
- */
-
- retryCount = 0;
- rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now);
- for (;;) {
- int try = (now + retryCount) % 10;
-
- tp->myAddress.sin_family = AF_INET;
- tp->myAddress.sin_port = htons (UDP_PORT_BASE + nStreams * try + s);
- tp->myAddress.sin_addr.s_addr = htonl (INADDR_ANY);
- if (bind (tp->socket, (struct sockaddr *)&tp->myAddress, sizeof tp->myAddress) >= 0)
- break;
- if (++retryCount == 10) {
- close (tp->socket);
- releaseStream (s);
- return EBUSY;
- }
- }
-
- /*
- * Set the UDP destination to the TFTP server
- * port on the remote machine.
- */
- tp->farAddress.sin_family = AF_INET;
- tp->farAddress.sin_addr.s_addr = farAddress;
- tp->farAddress.sin_port = htons (69);
-
- /*
- * Start the transfer
- */
- tp->firstReply = 1;
- for (;;) {
- /*
- * Create the request
- */
- tp->pkbuf.tftpRWRQ.opcode = htons (TFTP_OPCODE_RRQ);
- cp1 = (char *) tp->pkbuf.tftpRWRQ.filename_mode;
- cp2 = (char *) remoteFilename;
- while ((*cp1++ = *cp2++) != '\0')
- continue;
- cp2 = "octet";
- while ((*cp1++ = *cp2++) != '\0')
- continue;
- len = cp1 - (char *)&tp->pkbuf.tftpRWRQ;
-
- /*
- * Send the request
- */
- if (sendto (tp->socket, (char *)&tp->pkbuf, len, 0,
- (struct sockaddr *)&tp->farAddress,
- sizeof tp->farAddress) < 0) {
- close (tp->socket);
- releaseStream (s);
- return EIO;
- }
-
- /*
- * Get reply
- */
- len = getPacket (tp);
- if (len >= (int) sizeof tp->pkbuf.tftpACK) {
- int opcode = ntohs (tp->pkbuf.tftpDATA.opcode);
- if ((opcode == TFTP_OPCODE_DATA)
- && (ntohs (tp->pkbuf.tftpDATA.blocknum) == 1)) {
- tp->nused = 0;
- tp->blocknum = 1;
- tp->nleft = len - 2 * sizeof (rtems_unsigned16);
- tp->eof = (tp->nleft < TFTP_BUFSIZE);
- if (sendAck (tp) != 0) {
- close (tp->socket);
- releaseStream (s);
- return EIO;
- }
- break;
- }
- if (opcode == TFTP_OPCODE_ERROR) {
- tftpSetErrno (tp);
- close (tp->socket);
- releaseStream (s);
- return EIO;
- }
- }
-
- /*
- * Keep trying
- */
- if (++retryCount >= OPEN_RETRY_LIMIT) {
- close (tp->socket);
- releaseStream (s);
- return EIO;
- }
- }
-
- return 0;
-}
-
-/*
- * Read from a TFTP stream
- */
-
-int rtems_tftp_read(
- rtems_libio_t *iop,
- void *buffer,
- unsigned32 count
-)
-{
- char *bp;
- struct tftpStream *tp;
- int retryCount;
- int nwant;
-
- tp = iop->data1;
-
- /*
- * Read till user request is satisfied or EOF is reached
- */
-
- bp = buffer;
- nwant = count;
- while (nwant) {
- if (tp->nleft) {
- int count;
- if (nwant < tp->nleft)
- count = nwant;
- else
- count = tp->nleft;
- memcpy (bp, &tp->pkbuf.tftpDATA.data[tp->nused], count);
- tp->nused += count;
- tp->nleft -= count;
- bp += count;
- nwant -= count;
- if (nwant == 0)
- break;
- }
- if (tp->eof)
- break;
-
- /*
- * Wait for the next packet
- */
- retryCount = 0;
- for (;;) {
- int len = getPacket (tp);
- if (len >= (int)sizeof tp->pkbuf.tftpACK) {
- int opcode = ntohs (tp->pkbuf.tftpDATA.opcode);
- rtems_unsigned16 nextBlock = tp->blocknum + 1;
- if ((opcode == TFTP_OPCODE_DATA)
- && (ntohs (tp->pkbuf.tftpDATA.blocknum) == nextBlock)) {
- tp->nused = 0;
- tp->nleft = len - 2 * sizeof (rtems_unsigned16);
- tp->eof = (tp->nleft < TFTP_BUFSIZE);
- tp->blocknum++;
- if (sendAck (tp) != 0)
- set_errno_and_return_minus_one( EIO );
- break;
- }
- if (opcode == TFTP_OPCODE_ERROR) {
- tftpSetErrno (tp);
- return RTEMS_INTERNAL_ERROR;
- }
- }
-
- /*
- * Keep trying?
- */
- if (++retryCount == IO_RETRY_LIMIT)
- set_errno_and_return_minus_one( EIO );
- if (sendAck (tp) != 0)
- set_errno_and_return_minus_one( EIO );
- }
- }
-
- /*
- * XXX - Eric is this right?
- *
- */
- return count - nwant;
-}
-
-/*
- * Close a TFTP stream
- */
-int rtems_tftp_close(
- rtems_libio_t *iop
-)
-{
- struct tftpStream *tp = iop->data1;;
-
- if (!tp->eof && !tp->firstReply) {
- /*
- * Tell the other end to stop
- */
- rtems_interval ticksPerSecond;
- sendStifle (tp, &tp->farAddress);
- rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticksPerSecond);
- rtems_task_wake_after (1 + ticksPerSecond / 10);
- }
- close (tp->socket);
- releaseStream (iop->data0);
- return RTEMS_SUCCESSFUL;
-}
-
-int rtems_tftp_write(
- rtems_libio_t *iop,
- const void *buffer,
- unsigned32 count
-)
-{
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_device_driver rtems_tftp_control(
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void *pargp
-)
-{
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_filesystem_node_types_t rtems_tftp_node_type(
- rtems_filesystem_location_info_t *pathloc /* IN */
-)
-{
- return RTEMS_FILESYSTEM_MEMORY_FILE;
-}
-
-
-rtems_filesystem_operations_table rtems_tftp_ops = {
- rtems_tftp_eval_path, /* eval_path */
- rtems_tftp_evaluate_for_make, /* evaluate_for_make */
- NULL, /* link */
- NULL, /* unlink */
- rtems_tftp_node_type, /* node_type */
- NULL, /* mknod */
- NULL, /* chown */
- NULL, /* freenodinfo */
- NULL, /* mount */
- rtems_tftp_mount_me, /* initialize */
- NULL, /* unmount */
- NULL, /* fsunmount */
- NULL, /* utime, */
- NULL, /* evaluate_link */
- NULL, /* symlink */
- NULL, /* readlin */
-};
-
-rtems_filesystem_file_handlers_r rtems_tftp_handlers = {
- rtems_tftp_open,
- rtems_tftp_close,
- rtems_tftp_read,
- rtems_tftp_write,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
-};
diff --git a/c/src/exec/libnetworking/libc/Makefile.am b/c/src/exec/libnetworking/libc/Makefile.am
deleted file mode 100644
index 57b2b412f2..0000000000
--- a/c/src/exec/libnetworking/libc/Makefile.am
+++ /dev/null
@@ -1,57 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4 no-installman
-
-LIBNAME = lib.a
-LIB = $(ARCH)/$(LIBNAME)
-
-C_FILES = base64.c gethostbydns.c gethostbyht.c gethostbynis.c \
- gethostnamadr.c getnetbydns.c getnetbyht.c getnetbynis.c getnetnamadr.c \
- getproto.c getprotoent.c getprotoname.c getservbyname.c getservbyport.c \
- getservent.c herror.c inet_addr.c inet_lnaof.c inet_makeaddr.c \
- inet_network.c inet_ntoa.c inet_ntop.c inet_pton.c map_v4v6.c \
- nsap_addr.c ns_name.c ns_netint.c ns_parse.c ns_print.c ns_ttl.c \
- res_comp.c res_data.c res_debug.c res_init.c res_mkquery.c \
- res_mkupdate.c res_query.c res_send.c res_stubs.c res_update.c strsep.c
-C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
-
-OBJS = $(C_O_FILES)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../automake/lib.am
-
-man_MANS = addr2ascii.3 byteorder.3 ethers.3 gethostbyname.3 getnetent.3 \
- getprotoent.3 getservent.3 inet.3 iso_addr.3 linkaddr.3 ns.3 rcmd.3 \
- resolver.3
-
-#
-# Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -DNOPOLL -DNOSELECT
-AM_CPPFLAGS += -U__STRICT_ANSI__
-
-$(LIB): $(OBJS)
- $(make-library)
-
-all-local: $(ARCH) $(OBJS) $(LIB)
-
-.PRECIOUS: $(LIB)
-
-EXTRA_DIST = addr2ascii.3 addr2ascii.c ascii2addr.c base64.c byteorder.3 \
- ether_addr.c ethers.3 gethostbydns.c gethostbyht.c gethostbyname.3 \
- gethostbynis.c gethostnamadr.c gethostname.c getnetbydns.c getnetbyht.c \
- getnetbynis.c getnetent.3 getnetnamadr.c getproto.c getprotoent.3 \
- getprotoent.c getprotoname.c getservbyname.c getservbyport.c \
- getservent.3 getservent.c herror.c inet.3 inet_addr.c inet_lnaof.c \
- inet_makeaddr.c inet_net_ntop.c inet_net_pton.c inet_neta.c inet_netof.c \
- inet_network.c inet_ntoa.c inet_ntop.c inet_pton.c iso_addr.3 iso_addr.c \
- linkaddr.3 linkaddr.c map_v4v6.c ns.3 ns_addr.c ns_name.c ns_netint.c \
- ns_ntoa.c ns_parse.c ns_print.c ns_ttl.c nsap_addr.c rcmd.3 rcmd.c \
- recv.c res_comp.c res_config.h res_data.c res_debug.c res_init.c \
- res_mkquery.c res_mkupdate.c res_query.c res_send.c res_stubs.c \
- res_update.c resolver.3 send.c strsep.c
-
-include $(top_srcdir)/../../../automake/local.am
diff --git a/c/src/exec/libnetworking/libc/addr2ascii.3 b/c/src/exec/libnetworking/libc/addr2ascii.3
deleted file mode 100644
index 10c839ea74..0000000000
--- a/c/src/exec/libnetworking/libc/addr2ascii.3
+++ /dev/null
@@ -1,217 +0,0 @@
-.\"
-.\" Copyright 1996 Massachusetts Institute of Technology
-.\"
-.\" Permission to use, copy, modify, and distribute this software and
-.\" its documentation for any purpose and without fee is hereby
-.\" granted, provided that both the above copyright notice and this
-.\" permission notice appear in all copies, that both the above
-.\" copyright notice and this permission notice appear in all
-.\" supporting documentation, and that the name of M.I.T. not be used
-.\" in advertising or publicity pertaining to distribution of the
-.\" software without specific, written prior permission. M.I.T. makes
-.\" no representations about the suitability of this software for any
-.\" purpose. It is provided "as is" without express or implied
-.\" warranty.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''. M.I.T. DISCLAIMS
-.\" ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE,
-.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
-.\" SHALL M.I.T. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-.\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-.\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" $ANA: addr2ascii.3,v 1.1 1996/06/13 18:41:46 wollman Exp $
-.\" $Id$
-.\"
-.Dd June 13, 1996
-.Dt ADDR2ASCII 3
-.Os
-.Sh NAME
-.Nm addr2ascii ,
-.Nm ascii2addr
-.Nd Generic address formatting routines
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <netinet/in.h>
-.Fd #include <arpa/inet.h>
-.Ft "char *"
-.Fn addr2ascii "int af" "const void *addrp" "int len" "char *buf"
-.Ft int
-.Fn ascii2addr "int af" "const char *ascii" "void *result"
-.Sh DESCRIPTION
-The routines
-.Fn addr2ascii
-and
-.Fn ascii2addr
-are used to convert network addresses between binary form and a
-printable form appropriate to the address family. Both functions take
-an
-.Fa af
-argument, specifying the address family to be used in the conversion
-process.
-(Currently, only the
-.Dv AF_INET
-and
-.Dv AF_LINK
-address families are supported.)
-.Pp
-The
-.Fn addr2ascii
-function
-is used to convert binary, network-format addresses into printable
-form. In addition to
-.Fa af ,
-there are three other arguments. The
-.Fa addrp
-argument is a pointer to the network address to be converted.
-The
-.Fa len
-argument is the length of the address. The
-.Fa buf
-argument is an optional pointer to a caller-allocated buffer to hold
-the result; if a null pointer is passed,
-.Fn addr2ascii
-uses a statically-allocated buffer.
-.Pp
-The
-.Fn ascii2addr
-function performs the inverse operation to
-.Fn addr2ascii .
-In addition to
-.Fa af ,
-it takes two parameters,
-.Fa ascii
-and
-.Fa result .
-The
-.Fa ascii
-parameter is a pointer to the string which is to be converted into
-binary. The
-.Fa result
-parameter is a pointer to an appropriate network address structure for
-the specified family.
-.Pp
-The following gives the appropriate structure to use for binary
-addresses in the specified family:
-.Pp
-.Bl -tag -width AF_INETxxxx -compact
-.It Dv AF_INET
-.Li struct in_addr
-.Pq in Aq Pa netinet/in.h
-.It Dv AF_LINK
-.Li struct sockaddr_dl
-.Pq in Aq Pa net/if_dl.h
-.\" .It Dv AF_INET6
-.\" .Li struct in6_addr
-.\" .Pq in Aq Pa netinet6/in6.h
-.El
-.Sh RETURN VALUES
-The
-.Fn addr2ascii
-function returns the address of the buffer it was passed, or a static
-buffer if the a null pointer was passed; on failure, it returns a null
-pointer.
-The
-.Fn ascii2addr
-function returns the length of the binary address in bytes, or -1 on
-failure.
-.Sh EXAMPLES
-The
-.Xr inet 3
-functions
-.Fn inet_ntoa
-and
-.Fn inet_aton
-could be implemented thusly:
-.Bd -literal -offset indent
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-char *
-inet_ntoa(struct in_addr addr)
-{
- return addr2ascii(AF_INET, &addr, sizeof addr, 0);
-}
-
-int
-inet_aton(const char *ascii, struct in_addr *addr)
-{
- return (ascii2addr(AF_INET, ascii, addr)
- == sizeof(*addr));
-}
-.Ed
-.Pp
-In actuality, this cannot be done because
-.Fn addr2ascii
-and
-.Fn ascii2addr
-are implemented in terms of the
-.Xr inet 3
-functions, rather than the other way around.
-.Sh ERRORS
-When a failure is returned,
-.Li errno
-is set to one of the following values:
-.Bl -tag -width [EPROTONOSUPPORT]
-.It Bq Er ENAMETOOLONG
-The
-.Fn addr2ascii
-routine was passed a
-.Fa len
-parameter which was inappropriate for the address family given by
-.Fa af .
-.It Bq Er EPROTONOSUPPORT
-Either routine was passed an
-.Fa af
-parameter other than
-.Dv AF_INET
-or
-.Dv AF_LINK .
-.It Bq Er EINVAL
-The string passed to
-.Fn ascii2addr
-was improperly formatted for address family
-.Fa af .
-.El
-.Sh SEE ALSO
-.Xr inet 3 ,
-.Xr linkaddr 3 ,
-.Xr inet 4
-.Sh HISTORY
-An interface close to this one was originally suggested by Craig
-Partridge. This particular interface originally appeared in the
-.Tn INRIA
-.Tn IPv6
-implementation.
-.Sh AUTHORS
-Code and documentation by
-.An Garrett A. Wollman ,
-MIT Laboratory for Computer Science.
-.Sh BUGS
-The original implementations supported IPv6. This support should
-eventually be resurrected. The
-.Tn NRL
-implementation also included support for the
-.Dv AF_ISO
-and
-.Dv AF_NS
-address families.
-.Pp
-The genericity of this interface is somewhat questionable. A truly
-generic interface would provide a means for determining the length of
-the buffer to be used so that it could be dynamically allocated, and
-would always require a
-.Dq Li "struct sockaddr"
-to hold the binary address. Unfortunately, this is incompatible with existing
-practice. This limitation means that a routine for printing network
-addresses from arbitrary address families must still have internal
-knowledge of the maximum buffer length needed and the appropriate part
-of the address to use as the binary address.
diff --git a/c/src/exec/libnetworking/libc/addr2ascii.c b/c/src/exec/libnetworking/libc/addr2ascii.c
deleted file mode 100644
index dc651743b6..0000000000
--- a/c/src/exec/libnetworking/libc/addr2ascii.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright 1996 Massachusetts Institute of Technology
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby
- * granted, provided that both the above copyright notice and this
- * permission notice appear in all copies, that both the above
- * copyright notice and this permission notice appear in all
- * supporting documentation, and that the name of M.I.T. not be used
- * in advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission. M.I.T. makes
- * no representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied
- * warranty.
- *
- * THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''. M.I.T. DISCLAIMS
- * ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
- * SHALL M.I.T. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $ANA: addr2ascii.c,v 1.1 1996/06/13 18:41:46 wollman Exp $
- *
- * $Id$
- */
-
-#include <sys/types.h>
-#include <sys/socket.h>
-
-#include <errno.h>
-#include <string.h>
-
-#include <net/if_dl.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-/*-
- * Convert a network address from binary to printable numeric format.
- * This API is copied from INRIA's IPv6 implementation, but it is a
- * bit bogus in two ways:
- *
- * 1) There is no value in passing both an address family and
- * an address length; either one should imply the other,
- * or we should be passing sockaddrs instead.
- * 2) There should by contrast be /added/ a length for the buffer
- * that we pass in, so that programmers are spared the need to
- * manually calculate (read: ``guess'') the maximum length.
- *
- * Flash: the API is also the same in the NRL implementation, and seems to
- * be some sort of standard, so we appear to be stuck with both the bad
- * naming and the poor choice of arguments.
- */
-char *
-addr2ascii(af, addrp, len, buf)
- int af;
- const void *addrp;
- int len; /* should be size_t XXX */
- char *buf; /* XXX should pass length of buffer */
-{
- static char staticbuf[64]; /* 64 for AF_LINK > 16 for AF_INET */
-
- if (!buf)
- buf = staticbuf;
-
- switch(af) {
- case AF_INET:
- if (len != sizeof(struct in_addr)) {
- errno = ENAMETOOLONG;
- return 0;
- }
- strcpy(buf, inet_ntoa(*(const struct in_addr *)addrp));
- break;
-
- case AF_LINK:
- if (len != sizeof(struct sockaddr_dl)) {
- errno = ENAMETOOLONG;
- return 0;
- }
- strcpy(buf, link_ntoa((const struct sockaddr_dl *)addrp));
- break;
-
- default:
- errno = EPROTONOSUPPORT;
- return 0;
- }
- return buf;
-}
diff --git a/c/src/exec/libnetworking/libc/ascii2addr.c b/c/src/exec/libnetworking/libc/ascii2addr.c
deleted file mode 100644
index e140244737..0000000000
--- a/c/src/exec/libnetworking/libc/ascii2addr.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright 1996 Massachusetts Institute of Technology
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby
- * granted, provided that both the above copyright notice and this
- * permission notice appear in all copies, that both the above
- * copyright notice and this permission notice appear in all
- * supporting documentation, and that the name of M.I.T. not be used
- * in advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission. M.I.T. makes
- * no representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied
- * warranty.
- *
- * THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''. M.I.T. DISCLAIMS
- * ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
- * SHALL M.I.T. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $ANA: ascii2addr.c,v 1.2 1996/06/13 18:46:02 wollman Exp $
- *
- * $Id$
- */
-
-#include <sys/types.h>
-#include <sys/socket.h>
-
-#include <errno.h>
-#include <string.h>
-
-#include <net/if_dl.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-int
-ascii2addr(af, ascii, result)
- int af;
- const char *ascii;
- void *result;
-{
- struct in_addr *ina;
- char strbuf[4*sizeof("123")]; /* long enough for V4 only */
-
- switch(af) {
- case AF_INET:
- ina = result;
- strbuf[0] = '\0';
- strncat(strbuf, ascii, (sizeof strbuf)-1);
- if (inet_aton(strbuf, ina))
- return sizeof(struct in_addr);
- errno = EINVAL;
- break;
-
- case AF_LINK:
- link_addr(ascii, result);
- /* oops... no way to detect failure */
- return sizeof(struct sockaddr_dl);
-
- default:
- errno = EPROTONOSUPPORT;
- break;
- }
-
- return -1;
-}
diff --git a/c/src/exec/libnetworking/libc/base64.c b/c/src/exec/libnetworking/libc/base64.c
deleted file mode 100644
index 3017ccc01c..0000000000
--- a/c/src/exec/libnetworking/libc/base64.c
+++ /dev/null
@@ -1,318 +0,0 @@
-/*
- * Copyright (c) 1996, 1998 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-/*
- * Portions Copyright (c) 1995 by International Business Machines, Inc.
- *
- * International Business Machines, Inc. (hereinafter called IBM) grants
- * permission under its copyrights to use, copy, modify, and distribute this
- * Software with or without fee, provided that the above copyright notice and
- * all paragraphs of this notice appear in all copies, and that the name of IBM
- * not be used in connection with the marketing of any product incorporating
- * the Software or modifications thereof, without specific, written prior
- * permission.
- *
- * To the extent it has a right to do so, IBM grants an immunity from suit
- * under its patents, if any, for the use, sale or manufacture of products to
- * the extent that such products are used for performing Domain Name System
- * dynamic updates in TCP/IP networks by means of the Software. No immunity is
- * granted for any product per se or for any other function of any product.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- * PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL,
- * DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING
- * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN
- * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES.
- */
-
-#if !defined(__rtems__)
-#if !defined(LINT) && !defined(CODECENTER)
-static char rcsid[] = "$Id$";
-#endif /* not lint */
-#endif /* not rtems */
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/socket.h>
-
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-
-#include <ctype.h>
-#include <resolv.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#define Assert(Cond) if (!(Cond)) abort()
-
-static const char Base64[] =
- "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
-static const char Pad64 = '=';
-
-/* (From RFC1521 and draft-ietf-dnssec-secext-03.txt)
- The following encoding technique is taken from RFC 1521 by Borenstein
- and Freed. It is reproduced here in a slightly edited form for
- convenience.
-
- A 65-character subset of US-ASCII is used, enabling 6 bits to be
- represented per printable character. (The extra 65th character, "=",
- is used to signify a special processing function.)
-
- The encoding process represents 24-bit groups of input bits as output
- strings of 4 encoded characters. Proceeding from left to right, a
- 24-bit input group is formed by concatenating 3 8-bit input groups.
- These 24 bits are then treated as 4 concatenated 6-bit groups, each
- of which is translated into a single digit in the base64 alphabet.
-
- Each 6-bit group is used as an index into an array of 64 printable
- characters. The character referenced by the index is placed in the
- output string.
-
- Table 1: The Base64 Alphabet
-
- Value Encoding Value Encoding Value Encoding Value Encoding
- 0 A 17 R 34 i 51 z
- 1 B 18 S 35 j 52 0
- 2 C 19 T 36 k 53 1
- 3 D 20 U 37 l 54 2
- 4 E 21 V 38 m 55 3
- 5 F 22 W 39 n 56 4
- 6 G 23 X 40 o 57 5
- 7 H 24 Y 41 p 58 6
- 8 I 25 Z 42 q 59 7
- 9 J 26 a 43 r 60 8
- 10 K 27 b 44 s 61 9
- 11 L 28 c 45 t 62 +
- 12 M 29 d 46 u 63 /
- 13 N 30 e 47 v
- 14 O 31 f 48 w (pad) =
- 15 P 32 g 49 x
- 16 Q 33 h 50 y
-
- Special processing is performed if fewer than 24 bits are available
- at the end of the data being encoded. A full encoding quantum is
- always completed at the end of a quantity. When fewer than 24 input
- bits are available in an input group, zero bits are added (on the
- right) to form an integral number of 6-bit groups. Padding at the
- end of the data is performed using the '=' character.
-
- Since all base64 input is an integral number of octets, only the
- -------------------------------------------------
- following cases can arise:
-
- (1) the final quantum of encoding input is an integral
- multiple of 24 bits; here, the final unit of encoded
- output will be an integral multiple of 4 characters
- with no "=" padding,
- (2) the final quantum of encoding input is exactly 8 bits;
- here, the final unit of encoded output will be two
- characters followed by two "=" padding characters, or
- (3) the final quantum of encoding input is exactly 16 bits;
- here, the final unit of encoded output will be three
- characters followed by one "=" padding character.
- */
-
-int
-b64_ntop(u_char const *src, size_t srclength, char *target, size_t targsize) {
- size_t datalength = 0;
- u_char input[3];
- u_char output[4];
- size_t i;
-
- while (2 < srclength) {
- input[0] = *src++;
- input[1] = *src++;
- input[2] = *src++;
- srclength -= 3;
-
- output[0] = input[0] >> 2;
- output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4);
- output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6);
- output[3] = input[2] & 0x3f;
- Assert(output[0] < 64);
- Assert(output[1] < 64);
- Assert(output[2] < 64);
- Assert(output[3] < 64);
-
- if (datalength + 4 > targsize)
- return (-1);
- target[datalength++] = Base64[output[0]];
- target[datalength++] = Base64[output[1]];
- target[datalength++] = Base64[output[2]];
- target[datalength++] = Base64[output[3]];
- }
-
- /* Now we worry about padding. */
- if (0 != srclength) {
- /* Get what's left. */
- input[0] = input[1] = input[2] = '\0';
- for (i = 0; i < srclength; i++)
- input[i] = *src++;
-
- output[0] = input[0] >> 2;
- output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4);
- output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6);
- Assert(output[0] < 64);
- Assert(output[1] < 64);
- Assert(output[2] < 64);
-
- if (datalength + 4 > targsize)
- return (-1);
- target[datalength++] = Base64[output[0]];
- target[datalength++] = Base64[output[1]];
- if (srclength == 1)
- target[datalength++] = Pad64;
- else
- target[datalength++] = Base64[output[2]];
- target[datalength++] = Pad64;
- }
- if (datalength >= targsize)
- return (-1);
- target[datalength] = '\0'; /* Returned value doesn't count \0. */
- return (datalength);
-}
-
-/* skips all whitespace anywhere.
- converts characters, four at a time, starting at (or after)
- src from base - 64 numbers into three 8 bit bytes in the target area.
- it returns the number of data bytes stored at the target, or -1 on error.
- */
-
-int
-b64_pton(src, target, targsize)
- char const *src;
- u_char *target;
- size_t targsize;
-{
- int tarindex, state, ch;
- char *pos;
-
- state = 0;
- tarindex = 0;
-
- while ((ch = *src++) != '\0') {
- if (isspace(ch)) /* Skip whitespace anywhere. */
- continue;
-
- if (ch == Pad64)
- break;
-
- pos = strchr(Base64, ch);
- if (pos == 0) /* A non-base64 character. */
- return (-1);
-
- switch (state) {
- case 0:
- if (target) {
- if ((size_t)tarindex >= targsize)
- return (-1);
- target[tarindex] = (pos - Base64) << 2;
- }
- state = 1;
- break;
- case 1:
- if (target) {
- if ((size_t)tarindex + 1 >= targsize)
- return (-1);
- target[tarindex] |= (pos - Base64) >> 4;
- target[tarindex+1] = ((pos - Base64) & 0x0f)
- << 4 ;
- }
- tarindex++;
- state = 2;
- break;
- case 2:
- if (target) {
- if ((size_t)tarindex + 1 >= targsize)
- return (-1);
- target[tarindex] |= (pos - Base64) >> 2;
- target[tarindex+1] = ((pos - Base64) & 0x03)
- << 6;
- }
- tarindex++;
- state = 3;
- break;
- case 3:
- if (target) {
- if ((size_t)tarindex >= targsize)
- return (-1);
- target[tarindex] |= (pos - Base64);
- }
- tarindex++;
- state = 0;
- break;
- default:
- abort();
- }
- }
-
- /*
- * We are done decoding Base-64 chars. Let's see if we ended
- * on a byte boundary, and/or with erroneous trailing characters.
- */
-
- if (ch == Pad64) { /* We got a pad char. */
- ch = *src++; /* Skip it, get next. */
- switch (state) {
- case 0: /* Invalid = in first position */
- case 1: /* Invalid = in second position */
- return (-1);
-
- case 2: /* Valid, means one byte of info */
- /* Skip any number of spaces. */
- for ((void)NULL; ch != '\0'; ch = *src++)
- if (!isspace(ch))
- break;
- /* Make sure there is another trailing = sign. */
- if (ch != Pad64)
- return (-1);
- ch = *src++; /* Skip the = */
- /* Fall through to "single trailing =" case. */
- /* FALLTHROUGH */
-
- case 3: /* Valid, means two bytes of info */
- /*
- * We know this char is an =. Is there anything but
- * whitespace after it?
- */
- for ((void)NULL; ch != '\0'; ch = *src++)
- if (!isspace(ch))
- return (-1);
-
- /*
- * Now make sure for cases 2 and 3 that the "extra"
- * bits that slopped past the last full byte were
- * zeros. If we don't check them, they become a
- * subliminal channel.
- */
- if (target && target[tarindex] != 0)
- return (-1);
- }
- } else {
- /*
- * We ended by seeing the end of the string. Make sure we
- * have no partial bytes lying around.
- */
- if (state != 0)
- return (-1);
- }
-
- return (tarindex);
-}
diff --git a/c/src/exec/libnetworking/libc/byteorder.3 b/c/src/exec/libnetworking/libc/byteorder.3
deleted file mode 100644
index 81bf604867..0000000000
--- a/c/src/exec/libnetworking/libc/byteorder.3
+++ /dev/null
@@ -1,77 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)byteorder.3 8.1 (Berkeley) 6/4/93
-.\" $Id$
-.\"
-.Dd June 4, 1993
-.Dt BYTEORDER 3
-.Os BSD 4.2
-.Sh NAME
-.Nm htonl ,
-.Nm htons ,
-.Nm ntohl ,
-.Nm ntohs
-.Nd convert values between host and network byte order
-.Sh SYNOPSIS
-.Fd #include <sys/param.h>
-.Ft u_long
-.Fn htonl "u_long hostlong"
-.Ft u_short
-.Fn htons "u_short hostshort"
-.Ft u_long
-.Fn ntohl "u_long netlong"
-.Ft u_short
-.Fn ntohs "u_short netshort"
-.Sh DESCRIPTION
-These routines convert 16 and 32 bit quantities between network
-byte order and host byte order.
-On machines which have a byte order which is the same as the network
-order, routines are defined as null macros.
-.Pp
-These routines are most often used in conjunction with Internet
-addresses and ports as returned by
-.Xr gethostbyname 3
-and
-.Xr getservent 3 .
-.Sh SEE ALSO
-.Xr gethostbyname 3 ,
-.Xr getservent 3
-.Sh HISTORY
-The
-.Nm byteorder
-functions appeared in
-.Bx 4.2 .
-.Sh BUGS
-On the
-.Tn VAX
-bytes are handled backwards from most everyone else in
-the world. This is not expected to be fixed in the near future.
diff --git a/c/src/exec/libnetworking/libc/ether_addr.c b/c/src/exec/libnetworking/libc/ether_addr.c
deleted file mode 100644
index 9b7a9abf44..0000000000
--- a/c/src/exec/libnetworking/libc/ether_addr.c
+++ /dev/null
@@ -1,226 +0,0 @@
-/*
- * Copyright (c) 1995
- * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Bill Paul.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * ethernet address conversion and lookup routines
- *
- * Written by Bill Paul <wpaul@ctr.columbia.edu>
- * Center for Telecommunications Research
- * Columbia University, New York City
- *
- * $Id$
- */
-
-
-#include <stdio.h>
-#include <paths.h>
-#include <sys/types.h>
-#include <string.h>
-#include <stdlib.h>
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <net/ethernet.h>
-#ifdef YP
-#include <rpc/rpc.h>
-#include <rpcsvc/yp_prot.h>
-#include <rpcsvc/ypclnt.h>
-#endif
-
-#ifndef _PATH_ETHERS
-#define _PATH_ETHERS "/etc/ethers"
-#endif
-
-/*
- * Parse a string of text containing an ethernet address and hostname
- * and separate it into its component parts.
- */
-int ether_line(l, e, hostname)
- char *l;
- struct ether_addr *e;
- char *hostname;
-{
- int i, o[6];
-
- i = sscanf(l, "%x:%x:%x:%x:%x:%x %s", &o[0], &o[1], &o[2],
- &o[3], &o[4], &o[5],
- hostname);
- if (i != 7)
- return (i);
-
- for (i=0; i<6; i++)
- e->octet[i] = o[i];
- return (0);
-}
-
-/*
- * Convert an ASCII representation of an ethernet address to
- * binary form.
- */
-struct ether_addr *ether_aton(a)
- char *a;
-{
- int i;
- static struct ether_addr o;
- unsigned int o0, o1, o2, o3, o4, o5;
-
- i = sscanf(a, "%x:%x:%x:%x:%x:%x", &o0, &o1, &o2, &o3, &o4, &o5);
-
- if (i != 6)
- return (NULL);
-
- o.octet[0]=o0;
- o.octet[1]=o1;
- o.octet[2]=o2;
- o.octet[3]=o3;
- o.octet[4]=o4;
- o.octet[5]=o5;
-
- return ((struct ether_addr *)&o);
-}
-
-/*
- * Convert a binary representation of an ethernet address to
- * an ASCII string.
- */
-char *ether_ntoa(n)
- struct ether_addr *n;
-{
- int i;
- static char a[18];
-
- i = sprintf(a,"%x:%x:%x:%x:%x:%x",n->octet[0],n->octet[1],n->octet[2],
- n->octet[3],n->octet[4],n->octet[5]);
- if (i < 11)
- return (NULL);
- return ((char *)&a);
-}
-
-/*
- * Map an ethernet address to a hostname. Use either /etc/ethers or
- * NIS/YP.
- */
-
-int ether_ntohost(hostname, e)
- char *hostname;
- struct ether_addr *e;
-{
- FILE *fp;
- char buf[BUFSIZ + 2];
- struct ether_addr local_ether;
- char local_host[MAXHOSTNAMELEN];
-#ifdef YP
- char *result;
- int resultlen;
- char *ether_a;
- char *yp_domain;
-#endif
- if ((fp = fopen(_PATH_ETHERS, "r")) == NULL)
- return (1);
-
- while (fgets(buf,BUFSIZ,fp)) {
- if (buf[0] == '#')
- continue;
-#ifdef YP
- if (buf[0] == '+') {
- if (yp_get_default_domain(&yp_domain))
- continue;
- ether_a = ether_ntoa(e);
- if (yp_match(yp_domain, "ethers.byaddr", ether_a,
- strlen(ether_a), &result, &resultlen)) {
- continue;
- }
- strncpy(buf, result, resultlen);
- buf[resultlen] = '\0';
- free(result);
- }
-#endif
- if (!ether_line(buf, &local_ether, local_host)) {
- if (!bcmp((char *)&local_ether.octet[0],
- (char *)&e->octet[0], 6)) {
- /* We have a match */
- strcpy(hostname, local_host);
- fclose(fp);
- return(0);
- }
- }
- }
- fclose(fp);
- return (1);
-}
-
-/*
- * Map a hostname to an ethernet address using /etc/ethers or
- * NIS/YP.
- */
-int ether_hostton(hostname, e)
- char *hostname;
- struct ether_addr *e;
-{
- FILE *fp;
- char buf[BUFSIZ + 2];
- struct ether_addr local_ether;
- char local_host[MAXHOSTNAMELEN];
-#ifdef YP
- char *result;
- int resultlen;
- char *yp_domain;
-#endif
- if ((fp = fopen(_PATH_ETHERS, "r")) == NULL)
- return (1);
-
- while (fgets(buf,BUFSIZ,fp)) {
- if (buf[0] == '#')
- continue;
-#ifdef YP
- if (buf[0] == '+') {
- if (yp_get_default_domain(&yp_domain))
- continue;
- if (yp_match(yp_domain, "ethers.byname", hostname,
- strlen(hostname), &result, &resultlen)) {
- continue;
- }
- strncpy(buf, result, resultlen);
- buf[resultlen] = '\0';
- free(result);
- }
-#endif
- if (!ether_line(buf, &local_ether, local_host)) {
- if (!strcmp(hostname, local_host)) {
- /* We have a match */
- bcopy((char *)&local_ether.octet[0],
- (char *)&e->octet[0], 6);
- fclose(fp);
- return(0);
- }
- }
- }
- fclose(fp);
- return (1);
-}
diff --git a/c/src/exec/libnetworking/libc/ethers.3 b/c/src/exec/libnetworking/libc/ethers.3
deleted file mode 100644
index afea48320a..0000000000
--- a/c/src/exec/libnetworking/libc/ethers.3
+++ /dev/null
@@ -1,193 +0,0 @@
-.\" Copyright (c) 1995
-.\" Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by Bill Paul.
-.\" 4. Neither the name of the author nor the names of any co-contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" $Id$
-.\"
-.Dd April 12, 1995
-.Dt ETHERS 3
-.Os FreeBSD 2.1
-.Sh NAME
-.Nm ethers ,
-.Nm ether_line ,
-.Nm ether_aton ,
-.Nm ether_ntoa ,
-.Nm ether_ntohost ,
-.Nm ether_hostton
-.Nd Ethernet address conversion and lookup routines
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/socket.h>
-.Fd #include <net/ethernet.h>
-.Ft int
-.Fn ether_line "char *l" "struct ether_addr *e" "char *hostname"
-.Ft struct ether_addr *
-.Fn ether_aton "char *a"
-.Ft char *
-.Fn ether_ntoa "struct ether_addr *n"
-.Ft int
-.Fn ether_ntohost "char *hostname" "struct ether_addr *e"
-.Ft int
-.Fn ether_hostton "char *hostname" "struct ether_addr *e"
-.Sh DESCRIPTION
-These functions operate on ethernet addresses using an
-.Ar ether_addr
-structure, which is defined in the header file
-.Aq Pa netinet/if_ether.h :
-.Bd -literal -offset indent
-/*
- * The number of bytes in an ethernet (MAC) address.
- */
-#define ETHER_ADDR_LEN 6
-
-/*
- * Structure of a 48-bit Ethernet address.
- */
-struct ether_addr {
- u_char octet[ETHER_ADDR_LEN];
-};
-.Ed
-.Pp
-The function
-.Fn ether_line
-scans
-.Ar l ,
-an
-.Tn ASCII
-string in
-.Xr ethers 5
-format and sets
-.Ar e
-to the ethernet address specified in the string and
-.Ar h
-to the hostname. This function is used to parse lines from
-.Pa /etc/ethers
-into their component parts.
-.Pp
-The
-.Fn ether_aton
-function converts an
-.Tn ASCII
-representation of an ethernet address into an
-.Ar ether_addr
-structure. Likewise,
-.Fn ether_ntoa
-converts an ethernet address specified as an
-.Ar ether_addr
-structure into an
-.Tn ASCII
-string.
-.Pp
-The
-.Fn ether_ntohost
-and
-.Fn ether_hostton
-functions map ethernet addresses to their corresponding hostnames
-as specified in the
-.Pa /etc/ethers
-database.
-.Fn ether_ntohost
-converts from ethernet address to hostname, and
-.Fn ether_hostton
-converts from hostname to ethernet address.
-.Sh RETURN VALUES
-.Fn ether_line
-returns zero on success and non-zero if it was unable to parse
-any part of the supplied line
-.Ar l .
-It returns the extracted ethernet address in the supplied
-.Ar ether_addr
-structure
-.Ar e
-and the hostname in the supplied string
-.Ar h .
-.Pp
-On success,
-.Fn ether_ntoa
-returns a pointer to a string containing an
-.Tn ASCII
-representation of an ethernet address. If it is unable to convert
-the supplied
-.Ar ether_addr
-structure, it returns a
-.Dv NULL
-pointer. Likewise,
-.Fn ether_aton
-returns a pointer to an
-.Ar ether_addr
-structure on success and a
-.Dv NULL
-pointer on failure.
-.Pp
-The
-.Fn ether_ntohost
-and
-.Fn ether_hostton
-functions both return zero on success or non-zero if they were
-unable to find a match in the
-.Pa /etc/ethers
-database.
-.Sh NOTES
-The user must insure that the hostname strings passed to the
-the
-.Fn ether_line ,
-.Fn ether_ntohost
-and
-.Fn ether_hostton
-functions are large enough to contain the returned hostnames.
-.Sh NIS INTERACTION
-If the
-.Pa /etc/ethers
-contains a line with a single + in it, the
-.Fn ether_ntohost
-and
-.Fn ether_hostton
-functions will attempt to consult the NIS
-.Pa ethers.byname
-and
-.Pa ethers.byaddr
-maps in addition to the data in the
-.Pa /etc/ethers
-file.
-.Sh SEE ALSO
-.Xr yp 4 ,
-.Xr ethers 5
-.Sh BUGS
-.Pp
-The
-.Fn ether_aton
-and
-.Fn ether_ntoa
-functions returns values that are stored in static memory areas
-which may be overwritten the next time they are called.
-.Sh HISTORY
-This particular implementation of the
-.Nm ethers
-library functions were written for and first appeared in
-.Fx 2.1 .
diff --git a/c/src/exec/libnetworking/libc/gethostbydns.c b/c/src/exec/libnetworking/libc/gethostbydns.c
deleted file mode 100644
index 3d80ffde7a..0000000000
--- a/c/src/exec/libnetworking/libc/gethostbydns.c
+++ /dev/null
@@ -1,773 +0,0 @@
-/*
- * ++Copyright++ 1985, 1988, 1993
- * -
- * Copyright (c) 1985, 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * -
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- * -
- * --Copyright--
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)gethostnamadr.c 8.1 (Berkeley) 6/4/93";
-static char fromrcsid[] = "From: Id: gethnamaddr.c,v 8.23 1998/04/07 04:59:46 vixie Exp $";
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-
-#include <stdio.h>
-#include <unistd.h>
-#include <string.h>
-#include <netdb.h>
-#include <resolv.h>
-#include <ctype.h>
-#include <errno.h>
-#include <syslog.h>
-
-#include "res_config.h"
-
-#define SPRINTF(x) ((size_t)sprintf x)
-
-#define MAXALIASES 35
-#define MAXADDRS 35
-
-static const char AskedForGot[] =
- "gethostby*.gethostanswer: asked for \"%s\", got \"%s\"";
-
-static char *h_addr_ptrs[MAXADDRS + 1];
-
-static struct hostent host;
-static char *host_aliases[MAXALIASES];
-static char hostbuf[8*1024];
-static u_char host_addr[16]; /* IPv4 or IPv6 */
-
-#ifdef RESOLVSORT
-static void addrsort __P((char **, int));
-#endif
-
-#if PACKETSZ > 1024
-#define MAXPACKET PACKETSZ
-#else
-#define MAXPACKET 1024
-#endif
-
-typedef union {
- HEADER hdr;
- u_char buf[MAXPACKET];
-} querybuf;
-
-typedef union {
- int32_t al;
- char ac;
-} align;
-
-extern int h_errno;
-int _dns_ttl_;
-
-#ifdef DEBUG
-static void
-dprintf(msg, num)
- char *msg;
- int num;
-{
- if (_res.options & RES_DEBUG) {
- int save = errno;
-
- printf(msg, num);
- errno = save;
- }
-}
-#else
-# define dprintf(msg, num) /*nada*/
-#endif
-
-#define BOUNDED_INCR(x) \
- do { \
- cp += x; \
- if (cp > eom) { \
- h_errno = NO_RECOVERY; \
- return (NULL); \
- } \
- } while (0)
-
-#define BOUNDS_CHECK(ptr, count) \
- do { \
- if ((ptr) + (count) > eom) { \
- h_errno = NO_RECOVERY; \
- return (NULL); \
- } \
- } while (0)
-
-static struct hostent *
-gethostanswer(answer, anslen, qname, qtype)
- const querybuf *answer;
- int anslen;
- const char *qname;
- int qtype;
-{
- register const HEADER *hp;
- register const u_char *cp;
- register int n;
- const u_char *eom, *erdata;
- char *bp, **ap, **hap;
- int type, class, buflen, ancount, qdcount;
- int haveanswer, had_error;
- int toobig = 0;
- char tbuf[MAXDNAME];
- const char *tname;
- int (*name_ok) __P((const char *));
-
- tname = qname;
- host.h_name = NULL;
- eom = answer->buf + anslen;
- switch (qtype) {
- case T_A:
- case T_AAAA:
- name_ok = res_hnok;
- break;
- case T_PTR:
- name_ok = res_dnok;
- break;
- default:
- h_errno = NO_RECOVERY;
- return (NULL); /* XXX should be abort(); */
- }
- /*
- * find first satisfactory answer
- */
- hp = &answer->hdr;
- ancount = ntohs(hp->ancount);
- qdcount = ntohs(hp->qdcount);
- bp = hostbuf;
- buflen = sizeof hostbuf;
- cp = answer->buf;
- BOUNDED_INCR(HFIXEDSZ);
- if (qdcount != 1) {
- h_errno = NO_RECOVERY;
- return (NULL);
- }
- n = dn_expand(answer->buf, eom, cp, bp, buflen);
- if ((n < 0) || !(*name_ok)(bp)) {
- h_errno = NO_RECOVERY;
- return (NULL);
- }
- BOUNDED_INCR(n + QFIXEDSZ);
- if (qtype == T_A || qtype == T_AAAA) {
- /* res_send() has already verified that the query name is the
- * same as the one we sent; this just gets the expanded name
- * (i.e., with the succeeding search-domain tacked on).
- */
- n = strlen(bp) + 1; /* for the \0 */
- if (n >= MAXHOSTNAMELEN) {
- h_errno = NO_RECOVERY;
- return (NULL);
- }
- host.h_name = bp;
- bp += n;
- buflen -= n;
- /* The qname can be abbreviated, but h_name is now absolute. */
- qname = host.h_name;
- }
- ap = host_aliases;
- *ap = NULL;
- host.h_aliases = host_aliases;
- hap = h_addr_ptrs;
- *hap = NULL;
- host.h_addr_list = h_addr_ptrs;
- haveanswer = 0;
- had_error = 0;
- _dns_ttl_ = -1;
- while (ancount-- > 0 && cp < eom && !had_error) {
- n = dn_expand(answer->buf, eom, cp, bp, buflen);
- if ((n < 0) || !(*name_ok)(bp)) {
- had_error++;
- continue;
- }
- cp += n; /* name */
- BOUNDS_CHECK(cp, 3 * INT16SZ + INT32SZ);
- type = _getshort(cp);
- cp += INT16SZ; /* type */
- class = _getshort(cp);
- cp += INT16SZ; /* class */
- if (qtype == T_A && type == T_A)
- _dns_ttl_ = _getlong(cp);
- cp += INT32SZ; /* TTL */
- n = _getshort(cp);
- cp += INT16SZ; /* len */
- BOUNDS_CHECK(cp, n);
- erdata = cp + n;
- if (class != C_IN) {
- /* XXX - debug? syslog? */
- cp += n;
- continue; /* XXX - had_error++ ? */
- }
- if ((qtype == T_A || qtype == T_AAAA) && type == T_CNAME) {
- if (ap >= &host_aliases[MAXALIASES-1])
- continue;
- n = dn_expand(answer->buf, eom, cp, tbuf, sizeof tbuf);
- if ((n < 0) || !(*name_ok)(tbuf)) {
- had_error++;
- continue;
- }
- cp += n;
- if (cp != erdata) {
- h_errno = NO_RECOVERY;
- return (NULL);
- }
- /* Store alias. */
- *ap++ = bp;
- n = strlen(bp) + 1; /* for the \0 */
- if (n >= MAXHOSTNAMELEN) {
- had_error++;
- continue;
- }
- bp += n;
- buflen -= n;
- /* Get canonical name. */
- n = strlen(tbuf) + 1; /* for the \0 */
- if (n > buflen || n >= MAXHOSTNAMELEN) {
- had_error++;
- continue;
- }
- strcpy(bp, tbuf);
- host.h_name = bp;
- bp += n;
- buflen -= n;
- continue;
- }
- if (qtype == T_PTR && type == T_CNAME) {
- n = dn_expand(answer->buf, eom, cp, tbuf, sizeof tbuf);
- if (n < 0 || !res_dnok(tbuf)) {
- had_error++;
- continue;
- }
- cp += n;
- if (cp != erdata) {
- h_errno = NO_RECOVERY;
- return (NULL);
- }
- /* Get canonical name. */
- n = strlen(tbuf) + 1; /* for the \0 */
- if (n > buflen || n >= MAXHOSTNAMELEN) {
- had_error++;
- continue;
- }
- strcpy(bp, tbuf);
- tname = bp;
- bp += n;
- buflen -= n;
- continue;
- }
- if (type != qtype) {
- syslog(LOG_NOTICE|LOG_AUTH,
- "gethostby*.gethostanswer: asked for \"%s %s %s\", got type \"%s\"",
- qname, p_class(C_IN), p_type(qtype),
- p_type(type));
- cp += n;
- continue; /* XXX - had_error++ ? */
- }
- switch (type) {
- case T_PTR:
- if (strcasecmp(tname, bp) != 0) {
- syslog(LOG_NOTICE|LOG_AUTH,
- AskedForGot, qname, bp);
- cp += n;
- continue; /* XXX - had_error++ ? */
- }
- n = dn_expand(answer->buf, eom, cp, bp, buflen);
- if ((n < 0) || !res_hnok(bp)) {
- had_error++;
- break;
- }
-#if MULTI_PTRS_ARE_ALIASES
- cp += n;
- if (cp != erdata) {
- h_errno = NO_RECOVERY;
- return (NULL);
- }
- if (!haveanswer)
- host.h_name = bp;
- else if (ap < &host_aliases[MAXALIASES-1])
- *ap++ = bp;
- else
- n = -1;
- if (n != -1) {
- n = strlen(bp) + 1; /* for the \0 */
- if (n >= MAXHOSTNAMELEN) {
- had_error++;
- break;
- }
- bp += n;
- buflen -= n;
- }
- break;
-#else
- host.h_name = bp;
- if (_res.options & RES_USE_INET6) {
- n = strlen(bp) + 1; /* for the \0 */
- if (n >= MAXHOSTNAMELEN) {
- had_error++;
- break;
- }
- bp += n;
- buflen -= n;
- _map_v4v6_hostent(&host, &bp, &buflen);
- }
- h_errno = NETDB_SUCCESS;
- return (&host);
-#endif
- case T_A:
- case T_AAAA:
- if (strcasecmp(host.h_name, bp) != 0) {
- syslog(LOG_NOTICE|LOG_AUTH,
- AskedForGot, host.h_name, bp);
- cp += n;
- continue; /* XXX - had_error++ ? */
- }
- if (n != host.h_length) {
- cp += n;
- continue;
- }
- if (!haveanswer) {
- register int nn;
-
- host.h_name = bp;
- nn = strlen(bp) + 1; /* for the \0 */
- bp += nn;
- buflen -= nn;
- }
-
- bp += sizeof(align) - ((u_long)bp % sizeof(align));
-
- if (bp + n >= &hostbuf[sizeof hostbuf]) {
- dprintf("size (%d) too big\n", n);
- had_error++;
- continue;
- }
- if (hap >= &h_addr_ptrs[MAXADDRS-1]) {
- if (!toobig++)
- dprintf("Too many addresses (%d)\n",
- MAXADDRS);
- cp += n;
- continue;
- }
- bcopy(cp, *hap++ = bp, n);
- bp += n;
- buflen -= n;
- cp += n;
- if (cp != erdata) {
- h_errno = NO_RECOVERY;
- return (NULL);
- }
- break;
- default:
- dprintf("Impossible condition (type=%d)\n", type);
- h_errno = NO_RECOVERY;
- return (NULL);
- /* BIND has abort() here, too risky on bad data */
- }
- if (!had_error)
- haveanswer++;
- }
- if (haveanswer) {
- *ap = NULL;
- *hap = NULL;
-# if defined(RESOLVSORT)
- /*
- * Note: we sort even if host can take only one address
- * in its return structures - should give it the "best"
- * address in that case, not some random one
- */
- if (_res.nsort && haveanswer > 1 && qtype == T_A)
- addrsort(h_addr_ptrs, haveanswer);
-# endif /*RESOLVSORT*/
- if (!host.h_name) {
- n = strlen(qname) + 1; /* for the \0 */
- if (n > buflen || n >= MAXHOSTNAMELEN)
- goto no_recovery;
- strcpy(bp, qname);
- host.h_name = bp;
- bp += n;
- buflen -= n;
- }
- if (_res.options & RES_USE_INET6)
- _map_v4v6_hostent(&host, &bp, &buflen);
- h_errno = NETDB_SUCCESS;
- return (&host);
- }
- no_recovery:
- h_errno = NO_RECOVERY;
- return (NULL);
-}
-
-struct hostent *
-__dns_getanswer(answer, anslen, qname, qtype)
- const char *answer;
- int anslen;
- const char *qname;
- int qtype;
-{
- switch(qtype) {
- case T_AAAA:
- host.h_addrtype = AF_INET6;
- host.h_length = IN6ADDRSZ;
- break;
- case T_A:
- default:
- host.h_addrtype = AF_INET;
- host.h_length = INADDRSZ;
- break;
- }
-
- return(gethostanswer((const querybuf *)answer, anslen, qname, qtype));
-}
-
-struct hostent *
-_gethostbydnsname(name, af)
- const char *name;
- int af;
-{
- querybuf buf;
- register const char *cp;
- char *bp;
- int n, size, type, len;
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
- h_errno = NETDB_INTERNAL;
- return (NULL);
- }
-
- switch (af) {
- case AF_INET:
- size = INADDRSZ;
- type = T_A;
- break;
- case AF_INET6:
- size = IN6ADDRSZ;
- type = T_AAAA;
- break;
- default:
- h_errno = NETDB_INTERNAL;
- errno = EAFNOSUPPORT;
- return (NULL);
- }
-
- host.h_addrtype = af;
- host.h_length = size;
-
- /*
- * if there aren't any dots, it could be a user-level alias.
- * this is also done in res_query() since we are not the only
- * function that looks up host names.
- */
- if (!strchr(name, '.') && (cp = __hostalias(name)))
- name = cp;
-
- /*
- * disallow names consisting only of digits/dots, unless
- * they end in a dot.
- */
- if (isdigit((int)name[0]))
- for (cp = name;; ++cp) {
- if (!*cp) {
- if (*--cp == '.')
- break;
- /*
- * All-numeric, no dot at the end.
- * Fake up a hostent as if we'd actually
- * done a lookup.
- */
- if (inet_pton(af, name, host_addr) <= 0) {
- h_errno = HOST_NOT_FOUND;
- return (NULL);
- }
- strncpy(hostbuf, name, MAXDNAME);
- hostbuf[MAXDNAME] = '\0';
- bp = hostbuf + MAXDNAME;
- len = sizeof hostbuf - MAXDNAME;
- host.h_name = hostbuf;
- host.h_aliases = host_aliases;
- host_aliases[0] = NULL;
- h_addr_ptrs[0] = (char *)host_addr;
- h_addr_ptrs[1] = NULL;
- host.h_addr_list = h_addr_ptrs;
- if (_res.options & RES_USE_INET6)
- _map_v4v6_hostent(&host, &bp, &len);
- h_errno = NETDB_SUCCESS;
- return (&host);
- }
- if (!isdigit((int)*cp) && *cp != '.')
- break;
- }
- if ((isxdigit((int)name[0]) && strchr(name, ':') != NULL) ||
- name[0] == ':')
- for (cp = name;; ++cp) {
- if (!*cp) {
- if (*--cp == '.')
- break;
- /*
- * All-IPv6-legal, no dot at the end.
- * Fake up a hostent as if we'd actually
- * done a lookup.
- */
- if (inet_pton(af, name, host_addr) <= 0) {
- h_errno = HOST_NOT_FOUND;
- return (NULL);
- }
- strncpy(hostbuf, name, MAXDNAME);
- hostbuf[MAXDNAME] = '\0';
- bp = hostbuf + MAXDNAME;
- len = sizeof hostbuf - MAXDNAME;
- host.h_name = hostbuf;
- host.h_aliases = host_aliases;
- host_aliases[0] = NULL;
- h_addr_ptrs[0] = (char *)host_addr;
- h_addr_ptrs[1] = NULL;
- host.h_addr_list = h_addr_ptrs;
- h_errno = NETDB_SUCCESS;
- return (&host);
- }
- if (!isxdigit((int)*cp) && *cp != ':' && *cp != '.')
- break;
- }
-
- if ((n = res_search(name, C_IN, type, buf.buf, sizeof(buf))) < 0) {
- dprintf("res_search failed (%d)\n", n);
- return (NULL);
- }
- return (gethostanswer(&buf, n, name, type));
-}
-
-struct hostent *
-_gethostbydnsaddr(addr, len, af)
- const char *addr; /* XXX should have been def'd as u_char! */
- int len, af;
-{
- const u_char *uaddr = (const u_char *)addr;
- static const u_char mapped[] = { 0,0, 0,0, 0,0, 0,0, 0,0, 0xff,0xff };
- static const u_char tunnelled[] = { 0,0, 0,0, 0,0, 0,0, 0,0, 0,0 };
- int n, size;
- querybuf buf;
- register struct hostent *hp;
- char qbuf[MAXDNAME+1], *qp;
-#ifdef SUNSECURITY
- register struct hostent *rhp;
- char **haddr;
- u_long old_options;
- char hname2[MAXDNAME+1];
-#endif /*SUNSECURITY*/
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
- h_errno = NETDB_INTERNAL;
- return (NULL);
- }
- if (af == AF_INET6 && len == IN6ADDRSZ &&
- (!bcmp(uaddr, mapped, sizeof mapped) ||
- !bcmp(uaddr, tunnelled, sizeof tunnelled))) {
- /* Unmap. */
- addr += sizeof mapped;
- uaddr += sizeof mapped;
- af = AF_INET;
- len = INADDRSZ;
- }
- switch (af) {
- case AF_INET:
- size = INADDRSZ;
- break;
- case AF_INET6:
- size = IN6ADDRSZ;
- break;
- default:
- errno = EAFNOSUPPORT;
- h_errno = NETDB_INTERNAL;
- return (NULL);
- }
- if (size != len) {
- errno = EINVAL;
- h_errno = NETDB_INTERNAL;
- return (NULL);
- }
- switch (af) {
- case AF_INET:
- (void) sprintf(qbuf, "%u.%u.%u.%u.in-addr.arpa",
- (uaddr[3] & 0xff),
- (uaddr[2] & 0xff),
- (uaddr[1] & 0xff),
- (uaddr[0] & 0xff));
- break;
- case AF_INET6:
- qp = qbuf;
- for (n = IN6ADDRSZ - 1; n >= 0; n--) {
- qp += SPRINTF((qp, "%x.%x.",
- uaddr[n] & 0xf,
- (uaddr[n] >> 4) & 0xf));
- }
- strcpy(qp, "ip6.int");
- break;
- default:
- abort();
- }
- n = res_query(qbuf, C_IN, T_PTR, (u_char *)buf.buf, sizeof buf.buf);
- if (n < 0) {
- dprintf("res_query failed (%d)\n", n);
- return (NULL);
- }
- if (!(hp = gethostanswer(&buf, n, qbuf, T_PTR)))
- return (NULL); /* h_errno was set by gethostanswer() */
-#ifdef SUNSECURITY
- if (af == AF_INET) {
- /*
- * turn off search as the name should be absolute,
- * 'localhost' should be matched by defnames
- */
- strncpy(hname2, hp->h_name, MAXDNAME);
- hname2[MAXDNAME] = '\0';
- old_options = _res.options;
- _res.options &= ~RES_DNSRCH;
- _res.options |= RES_DEFNAMES;
- if (!(rhp = gethostbyname(hname2))) {
- syslog(LOG_NOTICE|LOG_AUTH,
- "gethostbyaddr: No A record for %s (verifying [%s])",
- hname2, inet_ntoa(*((struct in_addr *)addr)));
- _res.options = old_options;
- h_errno = HOST_NOT_FOUND;
- return (NULL);
- }
- _res.options = old_options;
- for (haddr = rhp->h_addr_list; *haddr; haddr++)
- if (!memcmp(*haddr, addr, INADDRSZ))
- break;
- if (!*haddr) {
- syslog(LOG_NOTICE|LOG_AUTH,
- "gethostbyaddr: A record of %s != PTR record [%s]",
- hname2, inet_ntoa(*((struct in_addr *)addr)));
- h_errno = HOST_NOT_FOUND;
- return (NULL);
- }
- }
-#endif /*SUNSECURITY*/
- hp->h_addrtype = af;
- hp->h_length = len;
- bcopy(addr, host_addr, len);
- h_addr_ptrs[0] = (char *)host_addr;
- h_addr_ptrs[1] = NULL;
- if (af == AF_INET && (_res.options & RES_USE_INET6)) {
- _map_v4v6_address((char*)host_addr, (char*)host_addr);
- hp->h_addrtype = AF_INET6;
- hp->h_length = IN6ADDRSZ;
- }
- h_errno = NETDB_SUCCESS;
- return (hp);
-}
-
-#ifdef RESOLVSORT
-static void
-addrsort(ap, num)
- char **ap;
- int num;
-{
- int i, j;
- char **p;
- short aval[MAXADDRS];
- int needsort = 0;
-
- p = ap;
- for (i = 0; i < num; i++, p++) {
- for (j = 0 ; (unsigned)j < _res.nsort; j++)
- if (_res.sort_list[j].addr.s_addr ==
- (((struct in_addr *)(*p))->s_addr & _res.sort_list[j].mask))
- break;
- aval[i] = j;
- if (needsort == 0 && i > 0 && j < aval[i-1])
- needsort = i;
- }
- if (!needsort)
- return;
-
- while (needsort < num) {
- for (j = needsort - 1; j >= 0; j--) {
- if (aval[j] > aval[j+1]) {
- char *hp;
-
- i = aval[j];
- aval[j] = aval[j+1];
- aval[j+1] = i;
-
- hp = ap[j];
- ap[j] = ap[j+1];
- ap[j+1] = hp;
-
- } else
- break;
- }
- needsort++;
- }
-}
-#endif
-void
-_sethostdnsent(stayopen)
- int stayopen;
-{
- if ((_res.options & RES_INIT) == 0 && res_init() == -1)
- return;
- if (stayopen)
- _res.options |= RES_STAYOPEN | RES_USEVC;
-}
-
-void
-_endhostdnsent()
-{
- _res.options &= ~(RES_STAYOPEN | RES_USEVC);
- res_close();
-}
diff --git a/c/src/exec/libnetworking/libc/gethostbyht.c b/c/src/exec/libnetworking/libc/gethostbyht.c
deleted file mode 100644
index 29f2805367..0000000000
--- a/c/src/exec/libnetworking/libc/gethostbyht.c
+++ /dev/null
@@ -1,202 +0,0 @@
-/*-
- * Copyright (c) 1985, 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * -
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- * -
- * --Copyright--
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)gethostnamadr.c 8.1 (Berkeley) 6/4/93";
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <errno.h>
-#include <string.h>
-#include <arpa/nameser.h> /* XXX */
-#include <resolv.h> /* XXX */
-
-#define MAXALIASES 35
-
-static struct hostent host;
-static char *host_aliases[MAXALIASES];
-static char hostbuf[BUFSIZ+1];
-static FILE *hostf = NULL;
-static u_char host_addr[16]; /* IPv4 or IPv6 */
-static char *h_addr_ptrs[2];
-static int stayopen = 0;
-
-void
-_sethosthtent(f)
- int f;
-{
- if (!hostf)
- hostf = fopen(_PATH_HOSTS, "r" );
- else
- rewind(hostf);
- stayopen = f;
-}
-
-void
-_endhosthtent()
-{
- if (hostf && !stayopen) {
- (void) fclose(hostf);
- hostf = NULL;
- }
-}
-
-struct hostent *
-gethostent()
-{
- char *p;
- register char *cp, **q;
- int af, len;
-
- if (!hostf && !(hostf = fopen(_PATH_HOSTS, "r" ))) {
- h_errno = NETDB_INTERNAL;
- return (NULL);
- }
- again:
- if (!(p = fgets(hostbuf, sizeof hostbuf, hostf))) {
- h_errno = HOST_NOT_FOUND;
- return (NULL);
- }
- if (*p == '#')
- goto again;
- if (!(cp = strpbrk(p, "#\n")))
- goto again;
- *cp = '\0';
- if (!(cp = strpbrk(p, " \t")))
- goto again;
- *cp++ = '\0';
- if (inet_pton(AF_INET6, p, host_addr) > 0) {
- af = AF_INET6;
- len = IN6ADDRSZ;
- } else if (inet_pton(AF_INET, p, host_addr) > 0) {
- if (_res.options & RES_USE_INET6) {
- _map_v4v6_address((char*)host_addr, (char*)host_addr);
- af = AF_INET6;
- len = IN6ADDRSZ;
- } else {
- af = AF_INET;
- len = INADDRSZ;
- }
- } else {
- goto again;
- }
- h_addr_ptrs[0] = (char *)host_addr;
- h_addr_ptrs[1] = NULL;
- host.h_addr_list = h_addr_ptrs;
- host.h_length = len;
- host.h_addrtype = af;
- while (*cp == ' ' || *cp == '\t')
- cp++;
- host.h_name = cp;
- q = host.h_aliases = host_aliases;
- if ((cp = strpbrk(cp, " \t")) != NULL)
- *cp++ = '\0';
- while (cp && *cp) {
- if (*cp == ' ' || *cp == '\t') {
- cp++;
- continue;
- }
- if (q < &host_aliases[MAXALIASES - 1])
- *q++ = cp;
- if ((cp = strpbrk(cp, " \t")) != NULL)
- *cp++ = '\0';
- }
- *q = NULL;
- h_errno = NETDB_SUCCESS;
- return (&host);
-}
-
-struct hostent *
-_gethostbyhtname(name, af)
- const char *name;
- int af;
-{
- register struct hostent *p;
- register char **cp;
-
- sethostent(0);
- while ((p = gethostent()) != NULL) {
- if (p->h_addrtype != af)
- continue;
- if (strcasecmp(p->h_name, name) == 0)
- break;
- for (cp = p->h_aliases; *cp != 0; cp++)
- if (strcasecmp(*cp, name) == 0)
- goto found;
- }
-found:
- endhostent();
- return (p);
-}
-
-struct hostent *
-_gethostbyhtaddr(addr, len, af)
- const char *addr;
- int len, af;
-{
- register struct hostent *p;
-
- sethostent(0);
- while ((p = gethostent()) != NULL)
- if (p->h_addrtype == af && !bcmp(p->h_addr, addr, len))
- break;
- endhostent();
- return (p);
-}
diff --git a/c/src/exec/libnetworking/libc/gethostbyname.3 b/c/src/exec/libnetworking/libc/gethostbyname.3
deleted file mode 100644
index e21dc79f1d..0000000000
--- a/c/src/exec/libnetworking/libc/gethostbyname.3
+++ /dev/null
@@ -1,305 +0,0 @@
-.\" Copyright (c) 1983, 1987, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" From: @(#)gethostbyname.3 8.4 (Berkeley) 5/25/95
-.\" $Id$
-.\"
-.Dd May 25, 1995
-.Dt GETHOSTBYNAME 3
-.Os BSD 4.2
-.Sh NAME
-.Nm gethostbyname ,
-.Nm gethostbyname2 ,
-.Nm gethostbyaddr ,
-.Nm gethostent ,
-.Nm sethostent ,
-.Nm endhostent ,
-.Nm herror ,
-.Nm hstrerror
-.Nd get network host entry
-.Sh SYNOPSIS
-.Fd #include <netdb.h>
-.Vt extern int h_errno;
-.Ft struct hostent *
-.Fn gethostbyname "const char *name"
-.Ft struct hostent *
-.Fn gethostbyname2 "const char *name" "int af"
-.Ft struct hostent *
-.Fn gethostbyaddr "const char *addr" "int len" "int type"
-.Ft struct hostent *
-.Fn gethostent void
-.Ft void
-.Fn sethostent "int stayopen"
-.Ft void
-.Fn endhostent void
-.Ft void
-.Fn herror "const char *string"
-.Ft const char *
-.Fn hstrerror "int err"
-.Sh DESCRIPTION
-The
-.Fn gethostbyname ,
-.Fn gethostbyname2
-and
-.Fn gethostbyaddr
-functions
-each return a pointer to an object with the
-following structure describing an internet host
-referenced by name or by address, respectively.
-This structure contains either the information obtained from the name server,
-.Xr named 8 ,
-or broken-out fields from a line in
-.Pa /etc/hosts .
-If the local name server is not running these routines do a lookup in
-.Pa /etc/hosts .
-.Bd -literal
-struct hostent {
- char *h_name; /* official name of host */
- char **h_aliases; /* alias list */
- int h_addrtype; /* host address type */
- int h_length; /* length of address */
- char **h_addr_list; /* list of addresses from name server */
-};
-#define h_addr h_addr_list[0] /* address, for backward compatibility */
-.Ed
-.Pp
-The members of this structure are:
-.Bl -tag -width h_addr_list
-.It Fa h_name
-Official name of the host.
-.It Fa h_aliases
-A NULL-terminated array of alternate names for the host.
-.It Fa h_addrtype
-The type of address being returned; usually
-.Dv AF_INET .
-.It Fa h_length
-The length, in bytes, of the address.
-.It Fa h_addr_list
-A NULL-terminated array of network addresses for the host.
-Host addresses are returned in network byte order.
-.It Fa h_addr
-The first address in
-.Fa h_addr_list ;
-this is for backward compatibility.
-.El
-.Pp
-When using the nameserver,
-.Fn gethostbyname
-and
-.Fn gethostbyname
-will search for the named host in the current domain and its parents
-unless the name ends in a dot.
-If the name contains no dot, and if the environment variable
-.Dq Ev HOSTALIASES
-contains the name of an alias file, the alias file will first be searched
-for an alias matching the input name.
-See
-.Xr hostname 7
-for the domain search procedure and the alias file format.
-.Pp
-The
-.Fn gethostbyname2
-function is an evolution of
-.Fn gethostbyname
-which is intended to allow lookups in address families other than
-.Dv AF_INET ,
-for example
-.Dv AF_INET6 .
-Currently the
-.Fa af
-argument must be specified as
-.Dv AF_INET
-else the function will return
-.Dv NULL
-after having set
-.Va h_errno
-to
-.Dv NETDB_INTERNAL
-.Pp
-The
-.Fn sethostent
-function
-may be used to request the use of a connected
-.Tn TCP
-socket for queries.
-If the
-.Fa stayopen
-flag is non-zero,
-this sets the option to send all queries to the name server using
-.Tn TCP
-and to retain the connection after each call to
-.Fn gethostbyname ,
-.Fn gethostbyname2
-or
-.Fn gethostbyaddr .
-Otherwise, queries are performed using
-.Tn UDP
-datagrams.
-.Pp
-The
-.Fn endhostent
-function
-closes the
-.Tn TCP
-connection.
-.Pp
-The
-.Fn herror
-function writes a message to the diagnostic output consisting of the
-string parameter
-.Fa s ,
-the constant string ": ", and a message corresponding to the value of
-.Va h_errno .
-.Pp
-The
-.Fn hstrerror
-function returns a string which is the message text corresponding to the
-value of the
-.Fa err
-parameter.
-.Sh FILES
-.Bl -tag -width /etc/resolv.conf -compact
-.It Pa /etc/hosts
-.It Pa /etc/host.conf
-.It Pa /etc/resolv.conf
-.El
-.Sh DIAGNOSTICS
-Error return status from
-.Fn gethostbyname ,
-.Fn gethostbyname2
-and
-.Fn gethostbyaddr
-is indicated by return of a null pointer.
-The external integer
-.Va h_errno
-may then be checked to see whether this is a temporary failure
-or an invalid or unknown host.
-The routine
-.Fn herror
-can be used to print an error message describing the failure.
-If its argument
-.Fa string
-is
-.Pf non Dv -NULL ,
-it is printed, followed by a colon and a space.
-The error message is printed with a trailing newline.
-.Pp
-The variable
-.Va h_errno
-can have the following values:
-.Bl -tag -width HOST_NOT_FOUND
-.It Dv HOST_NOT_FOUND
-No such host is known.
-.It Dv TRY_AGAIN
-This is usually a temporary error
-and means that the local server did not receive
-a response from an authoritative server.
-A retry at some later time may succeed.
-.It Dv NO_RECOVERY
-Some unexpected server failure was encountered.
-This is a non-recoverable error.
-.It Dv NO_DATA
-The requested name is valid but does not have an IP address;
-this is not a temporary error.
-This means that the name is known to the name server but there is no address
-associated with this name.
-Another type of request to the name server using this domain name
-will result in an answer;
-for example, a mail-forwarder may be registered for this domain.
-.El
-.Sh SEE ALSO
-.Xr resolver 3 ,
-.Xr hosts 5 ,
-.Xr hostname 7 ,
-.Xr named 8
-.Sh CAVEAT
-The
-.Fn gethostent
-function
-is defined, and
-.Fn sethostent
-and
-.Fn endhostent
-are redefined,
-when
-.Xr libc 3
-is built to use only the routines to lookup in
-.Pa /etc/hosts
-and not the name server.
-.Pp
-The
-.Fn gethostent
-function
-reads the next line of
-.Pa /etc/hosts ,
-opening the file if necessary.
-.Pp
-The
-.Fn sethostent
-function
-opens and/or rewinds the file
-.Pa /etc/hosts .
-If the
-.Fa stayopen
-argument is non-zero,
-the file will not be closed after each call to
-.Fn gethostbyname ,
-.Fn gethostbyname2
-or
-.Fn gethostbyaddr .
-.Pp
-The
-.Fn endhostent
-function
-closes the file.
-.Sh HISTORY
-The
-.Fn herror
-function appeared in
-.Bx 4.3 .
-The
-.Fn endhostent ,
-.Fn gethostbyaddr ,
-.Fn gethostbyname ,
-.Fn gethostent ,
-and
-.Fn sethostent
-functions appeared in
-.Bx 4.2 .
-The
-.Fn gethostbyname2
-function first appeared in bind-4.9.4.
-.Sh BUGS
-These functions use static data storage;
-if the data is needed for future use, it should be
-copied before any subsequent calls overwrite it.
-Only the Internet
-address format is currently understood.
diff --git a/c/src/exec/libnetworking/libc/gethostbynis.c b/c/src/exec/libnetworking/libc/gethostbynis.c
deleted file mode 100644
index 45dbe5a85d..0000000000
--- a/c/src/exec/libnetworking/libc/gethostbynis.c
+++ /dev/null
@@ -1,142 +0,0 @@
-/*-
- * Copyright (c) 1994, Garrett Wollman
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)$Id$";
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <errno.h>
-#include <string.h>
-#ifdef YP
-#include <rpc/rpc.h>
-#include <rpcsvc/yp_prot.h>
-#include <rpcsvc/ypclnt.h>
-#endif
-
-#define MAXALIASES 35
-#define MAXADDRS 35
-
-#ifdef YP
-static char *host_aliases[MAXALIASES];
-static char hostaddr[MAXADDRS];
-static char *host_addrs[2];
-#endif /* YP */
-
-static struct hostent *
-_gethostbynis(name, map, af)
- const char *name;
- char *map;
- int af;
-{
-#ifdef YP
- register char *cp, **q;
- char *result;
- int resultlen;
- static struct hostent h;
- static char *domain = (char *)NULL;
- static char ypbuf[YPMAXRECORD + 2];
-
- switch(af) {
- case AF_INET:
- break;
- default:
- case AF_INET6:
- errno = EAFNOSUPPORT;
- return NULL;
- }
-
- if (domain == (char *)NULL)
- if (yp_get_default_domain (&domain))
- return ((struct hostent *)NULL);
-
- if (yp_match(domain, map, name, strlen(name), &result, &resultlen))
- return ((struct hostent *)NULL);
-
- /* avoid potential memory leak */
- bcopy((char *)result, (char *)&ypbuf, resultlen);
- ypbuf[resultlen] = '\0';
- free(result);
- result = (char *)&ypbuf;
-
- if ((cp = index(result, '\n')))
- *cp = '\0';
-
- cp = strpbrk(result, " \t");
- *cp++ = '\0';
- h.h_addr_list = host_addrs;
- h.h_addr = hostaddr;
- *((u_long *)h.h_addr) = inet_addr(result);
- h.h_length = sizeof(u_long);
- h.h_addrtype = AF_INET;
- while (*cp == ' ' || *cp == '\t')
- cp++;
- h.h_name = cp;
- q = h.h_aliases = host_aliases;
- cp = strpbrk(cp, " \t");
- if (cp != NULL)
- *cp++ = '\0';
- while (cp && *cp) {
- if (*cp == ' ' || *cp == '\t') {
- cp++;
- continue;
- }
- if (q < &host_aliases[MAXALIASES - 1])
- *q++ = cp;
- cp = strpbrk(cp, " \t");
- if (cp != NULL)
- *cp++ = '\0';
- }
- *q = NULL;
- return (&h);
-#else
- return (NULL);
-#endif /* YP */
-}
-
-struct hostent *
-_gethostbynisname(name, af)
- const char *name;
- int af;
-{
- return _gethostbynis(name, "hosts.byname", af);
-}
-
-struct hostent *
-_gethostbynisaddr(addr, len, af)
- const char *addr;
- int len;
- int af;
-{
- return _gethostbynis(inet_ntoa(*(struct in_addr *)addr),"hosts.byaddr", af);
-}
diff --git a/c/src/exec/libnetworking/libc/gethostnamadr.c b/c/src/exec/libnetworking/libc/gethostnamadr.c
deleted file mode 100644
index 92f7a21014..0000000000
--- a/c/src/exec/libnetworking/libc/gethostnamadr.c
+++ /dev/null
@@ -1,224 +0,0 @@
-/*-
- * Copyright (c) 1994, Garrett Wollman
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)$Id$";
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <errno.h>
-#include <string.h>
-#include <arpa/nameser.h> /* XXX hack for _res */
-#include <resolv.h> /* XXX hack for _res */
-
-#define _PATH_HOSTCONF "/etc/host.conf"
-
-enum service_type {
- SERVICE_NONE = 0,
- SERVICE_BIND,
- SERVICE_HOSTS,
- SERVICE_NIS };
-#define SERVICE_MAX SERVICE_NIS
-
-static struct {
- const char *name;
- enum service_type type;
-} service_names[] = {
- { "hosts", SERVICE_HOSTS },
- { "/etc/hosts", SERVICE_HOSTS },
- { "hosttable", SERVICE_HOSTS },
- { "htable", SERVICE_HOSTS },
- { "bind", SERVICE_BIND },
- { "dns", SERVICE_BIND },
- { "domain", SERVICE_BIND },
- { "yp", SERVICE_NIS },
- { "yellowpages", SERVICE_NIS },
- { "nis", SERVICE_NIS },
- { 0, SERVICE_NONE }
-};
-
-static enum service_type service_order[SERVICE_MAX + 1];
-static int service_done = 0;
-
-static enum service_type
-get_service_name(const char *name) {
- int i;
- for(i = 0; service_names[i].type != SERVICE_NONE; i++) {
- if(!strcasecmp(name, service_names[i].name)) {
- return service_names[i].type;
- }
- }
- return SERVICE_NONE;
-}
-
-static void
-init_services()
-{
- char *cp, *p, buf[BUFSIZ];
- register int cc = 0;
- FILE *fd;
-
- if ((fd = (FILE *)fopen(_PATH_HOSTCONF, "r")) == NULL) {
- /* make some assumptions */
- service_order[0] = SERVICE_BIND;
- service_order[1] = SERVICE_HOSTS;
- service_order[2] = SERVICE_NONE;
- } else {
- while (fgets(buf, BUFSIZ, fd) != NULL && cc < SERVICE_MAX) {
- if(buf[0] == '#')
- continue;
-
- p = buf;
- while ((cp = strsep(&p, "\n \t,:;")) != NULL && *cp == '\0')
- ;
- if (cp == NULL)
- continue;
- do {
- if (isalpha((int)cp[0])) {
- service_order[cc] = get_service_name(cp);
- if(service_order[cc] != SERVICE_NONE)
- cc++;
- }
- while ((cp = strsep(&p, "\n \t,:;")) != NULL && *cp == '\0')
- ;
- } while(cp != NULL && cc < SERVICE_MAX);
- }
- service_order[cc] = SERVICE_NONE;
- fclose(fd);
- }
- service_done = 1;
-}
-
-struct hostent *
-gethostbyname(const char *name)
-{
- struct hostent *hp;
-
- if (_res.options & RES_USE_INET6) { /* XXX */
- hp = gethostbyname2(name, AF_INET6); /* XXX */
- if (hp) /* XXX */
- return (hp); /* XXX */
- } /* XXX */
- return (gethostbyname2(name, AF_INET));
-}
-
-struct hostent *
-gethostbyname2(const char *name, int type)
-{
- struct hostent *hp = 0;
- int nserv = 0;
-
- if (!service_done)
- init_services();
-
- while (!hp) {
- switch (service_order[nserv]) {
- case SERVICE_NONE:
- return NULL;
- case SERVICE_HOSTS:
- hp = _gethostbyhtname(name, type);
- break;
- case SERVICE_BIND:
- hp = _gethostbydnsname(name, type);
- break;
- case SERVICE_NIS:
- hp = _gethostbynisname(name, type);
- break;
- }
- nserv++;
- }
- return hp;
-}
-
-struct hostent *
-gethostbyaddr(const char *addr, int len, int type)
-{
- struct hostent *hp = 0;
- int nserv = 0;
-
- if (!service_done)
- init_services();
-
- while (!hp) {
- switch (service_order[nserv]) {
- case SERVICE_NONE:
- return 0;
- case SERVICE_HOSTS:
- hp = _gethostbyhtaddr(addr, len, type);
- break;
- case SERVICE_BIND:
- hp = _gethostbydnsaddr(addr, len, type);
- break;
- case SERVICE_NIS:
- hp = _gethostbynisaddr(addr, len, type);
- break;
- }
- nserv++;
- }
- return hp;
-}
-
-#ifdef _THREAD_SAFE
-struct hostent_data;
-
-/*
- * Temporary function (not thread safe)
- */
-int gethostbyaddr_r(const char *addr, int len, int type,
- struct hostent *result, struct hostent_data *buffer)
-{
- struct hostent *hp;
- int ret;
- if ((hp = gethostbyaddr(addr, len, type)) == NULL) {
- ret = -1;
- } else {
- memcpy(result, hp, sizeof(struct hostent));
- ret = 0;
- }
- return(ret);
-}
-#endif
-
-void
-sethostent(stayopen)
- int stayopen;
-{
- _sethosthtent(stayopen);
- _sethostdnsent(stayopen);
-}
-
-void
-endhostent()
-{
- _endhosthtent();
- _endhostdnsent();
-}
diff --git a/c/src/exec/libnetworking/libc/gethostname.c b/c/src/exec/libnetworking/libc/gethostname.c
deleted file mode 100644
index 81dc2267c2..0000000000
--- a/c/src/exec/libnetworking/libc/gethostname.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * $Id$
- */
-
-#include "config.h"
-
-/*
- * Solaris doesn't include the gethostname call by default.
- */
-#include <sys/utsname.h>
-#include <sys/systeminfo.h>
-
-#include <netdb.h>
-
-/*
- * PUBLIC: #ifndef HAVE_GETHOSTNAME
- * PUBLIC: int gethostname __P((char *, int));
- * PUBLIC: #endif
- */
-int
-gethostname(host, len)
- char *host;
- int len;
-{
- return (sysinfo(SI_HOSTNAME, host, len) == -1 ? -1 : 0);
-}
diff --git a/c/src/exec/libnetworking/libc/getnetbydns.c b/c/src/exec/libnetworking/libc/getnetbydns.c
deleted file mode 100644
index 8f8c576332..0000000000
--- a/c/src/exec/libnetworking/libc/getnetbydns.c
+++ /dev/null
@@ -1,313 +0,0 @@
-/*-
- * Copyright (c) 1985, 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * -
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- * -
- * --Copyright--
- */
-/* Portions Copyright (c) 1993 Carlos Leandro and Rui Salgueiro
- * Dep. Matematica Universidade de Coimbra, Portugal, Europe
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)gethostnamadr.c 8.1 (Berkeley) 6/4/93";
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-
-#include <stdio.h>
-#include <netdb.h>
-#include <resolv.h>
-#include <ctype.h>
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-#include <syslog.h>
-
-#include "res_config.h"
-
-extern int h_errno;
-
-#define BYADDR 0
-#define BYNAME 1
-#define MAXALIASES 35
-
-#if PACKETSZ > 1024
-#define MAXPACKET PACKETSZ
-#else
-#define MAXPACKET 1024
-#endif
-
-typedef union {
- HEADER hdr;
- u_char buf[MAXPACKET];
-} querybuf;
-
-typedef union {
- long al;
- char ac;
-} align;
-
-static struct netent *
-getnetanswer(answer, anslen, net_i)
- querybuf *answer;
- int anslen;
- int net_i;
-{
-
- register HEADER *hp;
- register u_char *cp;
- register int n;
- u_char *eom;
- int type, class, buflen, ancount, qdcount, haveanswer, i, nchar;
- char aux1[MAXHOSTNAMELEN], aux2[MAXHOSTNAMELEN], ans[MAXHOSTNAMELEN];
- char *in, *st, *pauxt, *bp, **ap;
- char *paux1 = &aux1[0], *paux2 = &aux2[0], flag = 0;
-static struct netent net_entry;
-static char *net_aliases[MAXALIASES], netbuf[PACKETSZ];
-
- /*
- * find first satisfactory answer
- *
- * answer --> +------------+ ( MESSAGE )
- * | Header |
- * +------------+
- * | Question | the question for the name server
- * +------------+
- * | Answer | RRs answering the question
- * +------------+
- * | Authority | RRs pointing toward an authority
- * | Additional | RRs holding additional information
- * +------------+
- */
- eom = answer->buf + anslen;
- hp = &answer->hdr;
- ancount = ntohs(hp->ancount); /* #/records in the answer section */
- qdcount = ntohs(hp->qdcount); /* #/entries in the question section */
- bp = netbuf;
- buflen = sizeof(netbuf);
- cp = answer->buf + HFIXEDSZ;
- if (!qdcount) {
- if (hp->aa)
- h_errno = HOST_NOT_FOUND;
- else
- h_errno = TRY_AGAIN;
- return (NULL);
- }
- while (qdcount-- > 0)
- cp += __dn_skipname(cp, eom) + QFIXEDSZ;
- ap = net_aliases;
- *ap = NULL;
- net_entry.n_aliases = net_aliases;
- haveanswer = 0;
- while (--ancount >= 0 && cp < eom) {
- n = dn_expand(answer->buf, eom, cp, bp, buflen);
- if ((n < 0) || !res_dnok(bp))
- break;
- cp += n;
- ans[0] = '\0';
- (void)strncpy(&ans[0], bp, sizeof(ans) - 1);
- ans[sizeof(ans) - 1] = '\0';
- GETSHORT(type, cp);
- GETSHORT(class, cp);
- cp += INT32SZ; /* TTL */
- GETSHORT(n, cp);
- if (class == C_IN && type == T_PTR) {
- n = dn_expand(answer->buf, eom, cp, bp, buflen);
- if ((n < 0) || !res_hnok(bp)) {
- cp += n;
- return (NULL);
- }
- cp += n;
- *ap++ = bp;
- bp += strlen(bp) + 1;
- net_entry.n_addrtype =
- (class == C_IN) ? AF_INET : AF_UNSPEC;
- haveanswer++;
- }
- }
- if (haveanswer) {
- *ap = NULL;
- switch (net_i) {
- case BYADDR:
- net_entry.n_name = *net_entry.n_aliases;
- net_entry.n_net = 0L;
- break;
- case BYNAME:
- in = *net_entry.n_aliases;
- net_entry.n_name = &ans[0];
- aux2[0] = '\0';
- for (i = 0; i < 4; i++) {
- for (st = in, nchar = 0;
- *st != '.';
- st++, nchar++)
- ;
- if (nchar != 1 || *in != '0' || flag) {
- flag = 1;
- (void)strncpy(paux1,
- (i==0) ? in : in-1,
- (i==0) ?nchar : nchar+1);
- paux1[(i==0) ? nchar : nchar+1] = '\0';
- pauxt = paux2;
- paux2 = strcat(paux1, paux2);
- paux1 = pauxt;
- }
- in = ++st;
- }
- net_entry.n_net = inet_network(paux2);
- break;
- }
- net_entry.n_aliases++;
- return (&net_entry);
- }
- h_errno = TRY_AGAIN;
- return (NULL);
-}
-
-struct netent *
-_getnetbydnsaddr(net, net_type)
- register unsigned long net;
- register int net_type;
-{
- unsigned int netbr[4];
- int nn, anslen;
- querybuf buf;
- char qbuf[MAXDNAME];
- unsigned long net2;
- struct netent *net_entry;
-
- if (net_type != AF_INET)
- return (NULL);
-
- for (nn = 4, net2 = net; net2; net2 >>= 8)
- netbr[--nn] = net2 & 0xff;
- switch (nn) {
- case 3: /* Class A */
- sprintf(qbuf, "0.0.0.%u.in-addr.arpa", netbr[3]);
- break;
- case 2: /* Class B */
- sprintf(qbuf, "0.0.%u.%u.in-addr.arpa", netbr[3], netbr[2]);
- break;
- case 1: /* Class C */
- sprintf(qbuf, "0.%u.%u.%u.in-addr.arpa", netbr[3], netbr[2],
- netbr[1]);
- break;
- case 0: /* Class D - E */
- sprintf(qbuf, "%u.%u.%u.%u.in-addr.arpa", netbr[3], netbr[2],
- netbr[1], netbr[0]);
- break;
- }
- anslen = res_query(qbuf, C_IN, T_PTR, (u_char *)&buf, sizeof(buf));
- if (anslen < 0) {
-#ifdef DEBUG
- if (_res.options & RES_DEBUG)
- printf("res_query failed\n");
-#endif
- return (NULL);
- }
- net_entry = getnetanswer(&buf, anslen, BYADDR);
- if (net_entry) {
- unsigned u_net = net; /* maybe net should be unsigned ? */
-
- /* Strip trailing zeros */
- while ((u_net & 0xff) == 0 && u_net != 0)
- u_net >>= 8;
- net_entry->n_net = u_net;
- return (net_entry);
- }
- return (NULL);
-}
-
-struct netent *
-_getnetbydnsname(net)
- register const char *net;
-{
- int anslen;
- querybuf buf;
- char qbuf[MAXDNAME];
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
- h_errno = NETDB_INTERNAL;
- return (NULL);
- }
- strncpy(qbuf, net, sizeof(qbuf) - 1);
- qbuf[sizeof(qbuf) - 1] = '\0';
- anslen = res_search(qbuf, C_IN, T_PTR, (u_char *)&buf, sizeof(buf));
- if (anslen < 0) {
-#ifdef DEBUG
- if (_res.options & RES_DEBUG)
- printf("res_query failed\n");
-#endif
- return (NULL);
- }
- return getnetanswer(&buf, anslen, BYNAME);
-}
-
-void
-_setnetdnsent(stayopen)
- int stayopen;
-{
- if (stayopen)
- _res.options |= RES_STAYOPEN | RES_USEVC;
-}
-
-void
-_endnetdnsent()
-{
- _res.options &= ~(RES_STAYOPEN | RES_USEVC);
- res_close();
-}
diff --git a/c/src/exec/libnetworking/libc/getnetbyht.c b/c/src/exec/libnetworking/libc/getnetbyht.c
deleted file mode 100644
index f7b7b1091d..0000000000
--- a/c/src/exec/libnetworking/libc/getnetbyht.c
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/* Portions Copyright (c) 1993 Carlos Leandro and Rui Salgueiro
- * Dep. Matematica Universidade de Coimbra, Portugal, Europe
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * from getnetent.c 1.1 (Coimbra) 93/06/02
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getnetent.c 8.1 (Berkeley) 6/4/93";
-static char orig_rcsid[] = "From: Id: getnetent.c,v 8.4 1997/06/01 20:34:37 vixie Exp";
-static chat rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-#include <netdb.h>
-#include <stdio.h>
-#include <string.h>
-
-#define MAXALIASES 35
-
-static FILE *netf;
-static char line[BUFSIZ+1];
-static struct netent net;
-static char *net_aliases[MAXALIASES];
-static int _net_stayopen;
-
-void
-_setnethtent(f)
- int f;
-{
-
- if (netf == NULL)
- netf = fopen(_PATH_NETWORKS, "r" );
- else
- rewind(netf);
- _net_stayopen |= f;
-}
-
-void
-_endnethtent()
-{
-
- if (netf) {
- fclose(netf);
- netf = NULL;
- }
- _net_stayopen = 0;
-}
-
-struct netent *
-getnetent()
-{
- char *p;
- register char *cp, **q;
-
- if (netf == NULL && (netf = fopen(_PATH_NETWORKS, "r" )) == NULL)
- return (NULL);
-again:
- p = fgets(line, sizeof line, netf);
- if (p == NULL)
- return (NULL);
- if (*p == '#')
- goto again;
- cp = strpbrk(p, "#\n");
- if (cp == NULL)
- goto again;
- *cp = '\0';
- net.n_name = p;
- cp = strpbrk(p, " \t");
- if (cp == NULL)
- goto again;
- *cp++ = '\0';
- while (*cp == ' ' || *cp == '\t')
- cp++;
- p = strpbrk(cp, " \t");
- if (p != NULL)
- *p++ = '\0';
- net.n_net = inet_network(cp);
- net.n_addrtype = AF_INET;
- q = net.n_aliases = net_aliases;
- if (p != NULL)
- cp = p;
- while (cp && *cp) {
- if (*cp == ' ' || *cp == '\t') {
- cp++;
- continue;
- }
- if (q < &net_aliases[MAXALIASES - 1])
- *q++ = cp;
- cp = strpbrk(cp, " \t");
- if (cp != NULL)
- *cp++ = '\0';
- }
- *q = NULL;
- return (&net);
-}
-
-struct netent *
-_getnetbyhtname(name)
- register const char *name;
-{
- register struct netent *p;
- register char **cp;
-
- setnetent(_net_stayopen);
- while ( (p = getnetent()) ) {
- if (strcasecmp(p->n_name, name) == 0)
- break;
- for (cp = p->n_aliases; *cp != 0; cp++)
- if (strcasecmp(*cp, name) == 0)
- goto found;
- }
-found:
- if (!_net_stayopen)
- endnetent();
- return (p);
-}
-
-struct netent *
-_getnetbyhtaddr(net, type)
- register unsigned long net;
- register int type;
-{
- register struct netent *p;
-
- setnetent(_net_stayopen);
- while ( (p = getnetent()) )
- if (p->n_addrtype == type && p->n_net == net)
- break;
- if (!_net_stayopen)
- endnetent();
- return (p);
-}
diff --git a/c/src/exec/libnetworking/libc/getnetbynis.c b/c/src/exec/libnetworking/libc/getnetbynis.c
deleted file mode 100644
index 0549016ba2..0000000000
--- a/c/src/exec/libnetworking/libc/getnetbynis.c
+++ /dev/null
@@ -1,177 +0,0 @@
-/*-
- * Copyright (c) 1994, Garrett Wollman
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)$Id$";
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <errno.h>
-#include <string.h>
-#include <arpa/nameser.h>
-#ifdef YP
-#include <rpc/rpc.h>
-#include <rpcsvc/yp_prot.h>
-#include <rpcsvc/ypclnt.h>
-#endif
-
-#define MAXALIASES 35
-#define MAXADDRS 35
-
-#ifdef YP
-static char *host_aliases[MAXALIASES];
-#endif /* YP */
-
-static struct netent *
-_getnetbynis(name, map, af)
- const char *name;
- char *map;
- int af;
-{
-#ifdef YP
- register char *cp, **q;
- static char *result;
- int resultlen;
- static struct netent h;
- static char *domain = (char *)NULL;
- static char ypbuf[YPMAXRECORD + 2];
-
- switch(af) {
- case AF_INET:
- break;
- default:
- case AF_INET6:
- errno = EAFNOSUPPORT;
- return NULL;
- }
-
- if (domain == (char *)NULL)
- if (yp_get_default_domain (&domain))
- return (NULL);
-
- if (yp_match(domain, map, name, strlen(name), &result, &resultlen))
- return (NULL);
-
- bcopy((char *)result, (char *)&ypbuf, resultlen);
- ypbuf[resultlen] = '\0';
- free(result);
- result = (char *)&ypbuf;
-
- if ((cp = index(result, '\n')))
- *cp = '\0';
-
- cp = strpbrk(result, " \t");
- *cp++ = '\0';
- h.n_name = result;
-
- while (*cp == ' ' || *cp == '\t')
- cp++;
-
- h.n_net = inet_network(cp);
- h.n_addrtype = AF_INET;
-
- q = h.n_aliases = host_aliases;
- cp = strpbrk(cp, " \t");
- if (cp != NULL)
- *cp++ = '\0';
- while (cp && *cp) {
- if (*cp == ' ' || *cp == '\t') {
- cp++;
- continue;
- }
- if (q < &host_aliases[MAXALIASES - 1])
- *q++ = cp;
- cp = strpbrk(cp, " \t");
- if (cp != NULL)
- *cp++ = '\0';
- }
- *q = NULL;
- return (&h);
-#else
- return (NULL);
-#endif
-}
-
-struct netent *
-_getnetbynisname(name)
- const char *name;
-{
- return _getnetbynis(name, "networks.byname", AF_INET);
-}
-
-struct netent *
-_getnetbynisaddr(addr, af)
- unsigned long addr;
- int af;
-{
- char *str, *cp;
- unsigned long net2;
- int nn;
- unsigned int netbr[4];
- char buf[MAXDNAME];
-
- if (af != AF_INET) {
- errno = EAFNOSUPPORT;
- return (NULL);
- }
-
- for (nn = 4, net2 = addr; net2; net2 >>= 8) {
- netbr[--nn] = net2 & 0xff;
- }
-
- switch (nn) {
- case 3: /* Class A */
- sprintf(buf, "%u", netbr[3]);
- break;
- case 2: /* Class B */
- sprintf(buf, "%u.%u", netbr[2], netbr[3]);
- break;
- case 1: /* Class C */
- sprintf(buf, "%u.%u.%u", netbr[1], netbr[2], netbr[3]);
- break;
- case 0: /* Class D - E */
- sprintf(buf, "%u.%u.%u.%u", netbr[0], netbr[1],
- netbr[2], netbr[3]);
- break;
- }
-
- str = (char *)&buf;
- cp = str + (strlen(str) - 2);
-
- while(!strcmp(cp, ".0")) {
- *cp = '\0';
- cp = str + (strlen(str) - 2);
- }
-
- return _getnetbynis(str, "networks.byaddr", af);
-}
diff --git a/c/src/exec/libnetworking/libc/getnetent.3 b/c/src/exec/libnetworking/libc/getnetent.3
deleted file mode 100644
index aec93b5876..0000000000
--- a/c/src/exec/libnetworking/libc/getnetent.3
+++ /dev/null
@@ -1,159 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)getnetent.3 8.1 (Berkeley) 6/4/93
-.\" $Id$
-.\"
-.Dd June 4, 1993
-.Dt GETNETENT 3
-.Os BSD 4.2
-.Sh NAME
-.Nm getnetent ,
-.Nm getnetbyaddr ,
-.Nm getnetbyname ,
-.Nm setnetent ,
-.Nm endnetent
-.Nd get network entry
-.Sh SYNOPSIS
-.Fd #include <netdb.h>
-.Ft struct netent *
-.Fn getnetent void
-.Ft struct netent *
-.Fn getnetbyname "const char *name"
-.Ft struct netent *
-.Fn getnetbyaddr "unsigned long net" "int type"
-.Ft void
-.Fn setnetent "int stayopen"
-.Ft void
-.Fn endnetent void
-.Sh DESCRIPTION
-The
-.Fn getnetent ,
-.Fn getnetbyname ,
-and
-.Fn getnetbyaddr
-functions
-each return a pointer to an object with the
-following structure
-containing the broken-out
-fields of a line in the network data base,
-.Pa /etc/networks .
-.Bd -literal -offset indent
-struct netent {
- char *n_name; /* official name of net */
- char **n_aliases; /* alias list */
- int n_addrtype; /* net number type */
- unsigned long n_net; /* net number */
-};
-.Ed
-.Pp
-The members of this structure are:
-.Bl -tag -width n_addrtype
-.It Fa n_name
-The official name of the network.
-.It Fa n_aliases
-A zero terminated list of alternate names for the network.
-.It Fa n_addrtype
-The type of the network number returned; currently only AF_INET.
-.It Fa n_net
-The network number. Network numbers are returned in machine byte
-order.
-.El
-.Pp
-The
-.Fn getnetent
-function
-reads the next line of the file, opening the file if necessary.
-.Pp
-The
-.Fn setnetent
-function
-opens and rewinds the file. If the
-.Fa stayopen
-flag is non-zero,
-the net data base will not be closed after each call to
-.Fn getnetbyname
-or
-.Fn getnetbyaddr .
-.Pp
-The
-.Fn endnetent
-function
-closes the file.
-.Pp
-The
-.Fn getnetbyname
-function
-and
-.Fn getnetbyaddr
-sequentially search from the beginning
-of the file until a matching
-net name or
-net address and type is found,
-or until
-.Dv EOF
-is encountered. The
-.Fa type
-must be
-.Dv AF_INET .
-Network numbers are supplied in host order.
-.Sh FILES
-.Bl -tag -width /etc/networks -compact
-.It Pa /etc/networks
-.El
-.Sh DIAGNOSTICS
-Null pointer
-(0) returned on
-.Dv EOF
-or error.
-.Sh SEE ALSO
-.Xr networks 5
-.Pp
-.%T RFC 1101
-.Sh HISTORY
-The
-.Fn getnetent ,
-.Fn getnetbyaddr ,
-.Fn getnetbyname ,
-.Fn setnetent ,
-and
-.Fn endnetent
-functions appeared in
-.Bx 4.2 .
-.Sh BUGS
-The data space used by
-these functions is static; if future use requires the data, it should be
-copied before any subsequent calls to these functions overwrite it.
-Only Internet network
-numbers are currently understood.
-Expecting network numbers to fit
-in no more than 32 bits is probably
-naive.
diff --git a/c/src/exec/libnetworking/libc/getnetnamadr.c b/c/src/exec/libnetworking/libc/getnetnamadr.c
deleted file mode 100644
index 4d6597f98c..0000000000
--- a/c/src/exec/libnetworking/libc/getnetnamadr.c
+++ /dev/null
@@ -1,190 +0,0 @@
-/*-
- * Copyright (c) 1994, Garrett Wollman
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <errno.h>
-#include <string.h>
-
-#ifndef _PATH_NETCONF
-#define _PATH_NETCONF "/etc/host.conf"
-#endif
-
-enum service_type {
- SERVICE_NONE = 0,
- SERVICE_BIND,
- SERVICE_TABLE,
- SERVICE_NIS };
-#define SERVICE_MAX SERVICE_NIS
-
-static struct {
- const char *name;
- enum service_type type;
-} service_names[] = {
- { "hosts", SERVICE_TABLE },
- { "/etc/hosts", SERVICE_TABLE },
- { "hosttable", SERVICE_TABLE },
- { "htable", SERVICE_TABLE },
- { "bind", SERVICE_BIND },
- { "dns", SERVICE_BIND },
- { "domain", SERVICE_BIND },
- { "yp", SERVICE_NIS },
- { "yellowpages", SERVICE_NIS },
- { "nis", SERVICE_NIS },
- { 0, SERVICE_NONE }
-};
-
-static enum service_type service_order[SERVICE_MAX + 1];
-static int service_done = 0;
-
-static enum service_type
-get_service_name(const char *name) {
- int i;
- for(i = 0; service_names[i].type != SERVICE_NONE; i++) {
- if(!strcasecmp(name, service_names[i].name)) {
- return service_names[i].type;
- }
- }
- return SERVICE_NONE;
-}
-
-static void
-init_services()
-{
- char *cp, *p, buf[BUFSIZ];
- register int cc = 0;
- FILE *fd;
-
- if ((fd = (FILE *)fopen(_PATH_NETCONF, "r")) == NULL) {
- /* make some assumptions */
- service_order[0] = SERVICE_TABLE;
- service_order[1] = SERVICE_NONE;
- } else {
- while (fgets(buf, BUFSIZ, fd) != NULL && cc < SERVICE_MAX) {
- if(buf[0] == '#')
- continue;
-
- p = buf;
- while ((cp = strsep(&p, "\n \t,:;")) != NULL && *cp == '\0')
- ;
- if (cp == NULL)
- continue;
- do {
- if (isalpha(cp[0])) {
- service_order[cc] = get_service_name(cp);
- if(service_order[cc] != SERVICE_NONE)
- cc++;
- }
- while ((cp = strsep(&p, "\n \t,:;")) != NULL && *cp == '\0')
- ;
- } while(cp != NULL && cc < SERVICE_MAX);
- }
- service_order[cc] = SERVICE_NONE;
- fclose(fd);
- }
- service_done = 1;
-}
-
-struct netent *
-getnetbyname(const char *name)
-{
- struct netent *hp = 0;
- int nserv = 0;
-
- if (!service_done)
- init_services();
-
- while (!hp) {
- switch (service_order[nserv]) {
- case SERVICE_NONE:
- return NULL;
- case SERVICE_TABLE:
- hp = _getnetbyhtname(name);
- break;
- case SERVICE_BIND:
- hp = _getnetbydnsname(name);
- break;
- case SERVICE_NIS:
- hp = _getnetbynisname(name);
- break;
- }
- nserv++;
- }
- return hp;
-}
-
-struct netent *
-getnetbyaddr(addr, af)
- u_long addr;
- int af;
-{
- struct netent *hp = 0;
- int nserv = 0;
-
- if (!service_done)
- init_services();
-
- while (!hp) {
- switch (service_order[nserv]) {
- case SERVICE_NONE:
- return 0;
- case SERVICE_TABLE:
- hp = _getnetbyhtaddr(addr, af);
- break;
- case SERVICE_BIND:
- hp = _getnetbydnsaddr(addr, af);
- break;
- case SERVICE_NIS:
- hp = _getnetbynisaddr(addr, af);
- break;
- }
- nserv++;
- }
- return hp;
-}
-
-void
-setnetent(stayopen)
- int stayopen;
-{
- _setnethtent(stayopen);
- _setnetdnsent(stayopen);
-}
-
-void
-endnetent()
-{
- _endnethtent();
- _endnetdnsent();
-}
diff --git a/c/src/exec/libnetworking/libc/getproto.c b/c/src/exec/libnetworking/libc/getproto.c
deleted file mode 100644
index c2a653f4b4..0000000000
--- a/c/src/exec/libnetworking/libc/getproto.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getproto.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <netdb.h>
-
-extern int _proto_stayopen;
-
-struct protoent *
-getprotobynumber(proto)
- register int proto;
-{
- register struct protoent *p;
-
- setprotoent(_proto_stayopen);
- while ( (p = getprotoent()) )
- if (p->p_proto == proto)
- break;
- if (!_proto_stayopen)
- endprotoent();
- return (p);
-}
diff --git a/c/src/exec/libnetworking/libc/getprotoent.3 b/c/src/exec/libnetworking/libc/getprotoent.3
deleted file mode 100644
index 784461d7e3..0000000000
--- a/c/src/exec/libnetworking/libc/getprotoent.3
+++ /dev/null
@@ -1,147 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)getprotoent.3 8.1 (Berkeley) 6/4/93
-.\" $Id$
-.\"
-.Dd June 4, 1993
-.Dt GETPROTOENT 3
-.Os BSD 4.2
-.Sh NAME
-.Nm getprotoent ,
-.Nm getprotobynumber ,
-.Nm getprotobyname ,
-.Nm setprotoent ,
-.Nm endprotoent
-.Nd get protocol entry
-.Sh SYNOPSIS
-.Fd #include <netdb.h>
-.Ft struct protoent *
-.Fn getprotoent void
-.Ft struct protoent *
-.Fn getprotobyname "const char *name"
-.Ft struct protoent *
-.Fn getprotobynumber "int proto"
-.Ft void
-.Fn setprotoent "int stayopen"
-.Ft void
-.Fn endprotoent void
-.Sh DESCRIPTION
-The
-.Fn getprotoent ,
-.Fn getprotobyname ,
-and
-.Fn getprotobynumber
-functions
-each return a pointer to an object with the
-following structure
-containing the broken-out
-fields of a line in the network protocol data base,
-.Pa /etc/protocols .
-.Bd -literal -offset indent
-.Pp
-struct protoent {
- char *p_name; /* official name of protocol */
- char **p_aliases; /* alias list */
- int p_proto; /* protocol number */
-};
-.Ed
-.Pp
-The members of this structure are:
-.Bl -tag -width p_aliases
-.It Fa p_name
-The official name of the protocol.
-.It Fa p_aliases
-A zero terminated list of alternate names for the protocol.
-.It Fa p_proto
-The protocol number.
-.El
-.Pp
-The
-.Fn getprotoent
-function
-reads the next line of the file, opening the file if necessary.
-.Pp
-The
-.Fn setprotoent
-function
-opens and rewinds the file. If the
-.Fa stayopen
-flag is non-zero,
-the net data base will not be closed after each call to
-.Fn getprotobyname
-or
-.Fn getprotobynumber .
-.Pp
-The
-.Fn endprotoent
-function
-closes the file.
-.Pp
-The
-.Fn getprotobyname
-function
-and
-.Fn getprotobynumber
-sequentially search from the beginning
-of the file until a matching
-protocol name or
-protocol number is found,
-or until
-.Dv EOF
-is encountered.
-.Sh RETURN VALUES
-Null pointer
-(0) returned on
-.Dv EOF
-or error.
-.Sh FILES
-.Bl -tag -width /etc/protocols -compact
-.It Pa /etc/protocols
-.El
-.Sh SEE ALSO
-.Xr protocols 5
-.Sh HISTORY
-The
-.Fn getprotoent ,
-.Fn getprotobynumber ,
-.Fn getprotobyname ,
-.Fn setprotoent ,
-and
-.Fn endprotoent
-functions appeared in
-.Bx 4.2 .
-.Sh BUGS
-These functions use a static data space;
-if the data is needed for future use, it should be
-copied before any subsequent calls overwrite it.
-Only the Internet
-protocols are currently understood.
diff --git a/c/src/exec/libnetworking/libc/getprotoent.c b/c/src/exec/libnetworking/libc/getprotoent.c
deleted file mode 100644
index 0b9cefec68..0000000000
--- a/c/src/exec/libnetworking/libc/getprotoent.c
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getprotoent.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netdb.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#define MAXALIASES 35
-
-static FILE *protof = NULL;
-static char line[BUFSIZ+1];
-static struct protoent proto;
-static char *proto_aliases[MAXALIASES];
-int _proto_stayopen;
-
-void
-setprotoent(f)
- int f;
-{
- if (protof == NULL)
- protof = fopen(_PATH_PROTOCOLS, "r" );
- else
- rewind(protof);
- _proto_stayopen |= f;
-}
-
-void
-endprotoent()
-{
- if (protof) {
- fclose(protof);
- protof = NULL;
- }
- _proto_stayopen = 0;
-}
-
-struct protoent *
-getprotoent()
-{
- char *p;
- register char *cp, **q;
-
- if (protof == NULL && (protof = fopen(_PATH_PROTOCOLS, "r" )) == NULL)
- return (NULL);
-again:
- if ((p = fgets(line, BUFSIZ, protof)) == NULL)
- return (NULL);
- if (*p == '#')
- goto again;
- cp = strpbrk(p, "#\n");
- if (cp == NULL)
- goto again;
- *cp = '\0';
- proto.p_name = p;
- cp = strpbrk(p, " \t");
- if (cp == NULL)
- goto again;
- *cp++ = '\0';
- while (*cp == ' ' || *cp == '\t')
- cp++;
- p = strpbrk(cp, " \t");
- if (p != NULL)
- *p++ = '\0';
- proto.p_proto = atoi(cp);
- q = proto.p_aliases = proto_aliases;
- if (p != NULL) {
- cp = p;
- while (cp && *cp) {
- if (*cp == ' ' || *cp == '\t') {
- cp++;
- continue;
- }
- if (q < &proto_aliases[MAXALIASES - 1])
- *q++ = cp;
- cp = strpbrk(cp, " \t");
- if (cp != NULL)
- *cp++ = '\0';
- }
- }
- *q = NULL;
- return (&proto);
-}
diff --git a/c/src/exec/libnetworking/libc/getprotoname.c b/c/src/exec/libnetworking/libc/getprotoname.c
deleted file mode 100644
index 46880eb005..0000000000
--- a/c/src/exec/libnetworking/libc/getprotoname.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getprotoname.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <netdb.h>
-#include <string.h>
-
-extern int _proto_stayopen;
-
-struct protoent *
-getprotobyname(name)
- register const char *name;
-{
- register struct protoent *p;
- register char **cp;
-
- setprotoent(_proto_stayopen);
- while ( (p = getprotoent()) ) {
- if (strcmp(p->p_name, name) == 0)
- break;
- for (cp = p->p_aliases; *cp != 0; cp++)
- if (strcmp(*cp, name) == 0)
- goto found;
- }
-found:
- if (!_proto_stayopen)
- endprotoent();
- return (p);
-}
diff --git a/c/src/exec/libnetworking/libc/getservbyname.c b/c/src/exec/libnetworking/libc/getservbyname.c
deleted file mode 100644
index 19936907d3..0000000000
--- a/c/src/exec/libnetworking/libc/getservbyname.c
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getservbyname.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <netdb.h>
-#include <string.h>
-
-extern int _serv_stayopen;
-
-struct servent *
-getservbyname(name, proto)
- const char *name, *proto;
-{
- register struct servent *p;
- register char **cp;
-
-#ifdef YP
- extern char *___getservbyname_yp;
- extern char *___getservbyproto_yp;
-
- ___getservbyname_yp = (char *)name;
- ___getservbyproto_yp = (char *)proto;
-#endif
-
- setservent(_serv_stayopen);
- while ( (p = getservent()) ) {
- if (strcmp(name, p->s_name) == 0)
- goto gotname;
- for (cp = p->s_aliases; *cp; cp++)
- if (strcmp(name, *cp) == 0)
- goto gotname;
- continue;
-gotname:
- if (proto == 0 || strcmp(p->s_proto, proto) == 0)
- break;
- }
- if (!_serv_stayopen)
- endservent();
-
-#ifdef YP
- ___getservbyname_yp = NULL;
- ___getservbyproto_yp = NULL;
-#endif
-
- return (p);
-}
diff --git a/c/src/exec/libnetworking/libc/getservbyport.c b/c/src/exec/libnetworking/libc/getservbyport.c
deleted file mode 100644
index c8433954e1..0000000000
--- a/c/src/exec/libnetworking/libc/getservbyport.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getservbyport.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <netdb.h>
-#include <string.h>
-
-extern int _serv_stayopen;
-
-struct servent *
-getservbyport(port, proto)
- int port;
- const char *proto;
-{
- register struct servent *p;
-
-#ifdef YP
- extern int ___getservbyport_yp;
- extern char *___getservbyproto_yp;
-
- ___getservbyport_yp = port;
- ___getservbyproto_yp = (char *)proto;
-#endif
-
- setservent(_serv_stayopen);
- while ( (p = getservent()) ) {
- if (p->s_port != port)
- continue;
- if (proto == 0 || strcmp(p->s_proto, proto) == 0)
- break;
- }
- if (!_serv_stayopen)
- endservent();
-
-#ifdef YP
- ___getservbyport_yp = 0;
- ___getservbyproto_yp = NULL;
-#endif
-
- return (p);
-}
diff --git a/c/src/exec/libnetworking/libc/getservent.3 b/c/src/exec/libnetworking/libc/getservent.3
deleted file mode 100644
index 79c18a3beb..0000000000
--- a/c/src/exec/libnetworking/libc/getservent.3
+++ /dev/null
@@ -1,156 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" From: @(#)getservent.3 8.3 (Berkeley) 1/12/94
-.\" $Id$
-.\"
-.Dd July 9, 1995
-.Dt GETSERVENT 3
-.Os BSD 4.2
-.Sh NAME
-.Nm getservent ,
-.Nm getservbyport ,
-.Nm getservbyname ,
-.Nm setservent ,
-.Nm endservent
-.Nd get service entry
-.Sh SYNOPSIS
-.Fd #include <netdb.h>
-.Ft struct servent *
-.Fn getservent
-.Ft struct servent *
-.Fn getservbyname "const char *name" "const char *proto"
-.Ft struct servent *
-.Fn getservbyport "int port" "const char *proto"
-.Ft void
-.Fn setservent "int stayopen"
-.Ft void
-.Fn endservent void
-.Sh DESCRIPTION
-The
-.Fn getservent ,
-.Fn getservbyname ,
-and
-.Fn getservbyport
-functions
-each return a pointer to an object with the
-following structure
-containing the broken-out
-fields of a line in the network services data base,
-.Pa /etc/services .
-.Bd -literal -offset indent
-struct servent {
- char *s_name; /* official name of service */
- char **s_aliases; /* alias list */
- int s_port; /* port service resides at */
- char *s_proto; /* protocol to use */
-};
-.Ed
-.Pp
-The members of this structure are:
-.Bl -tag -width s_aliases
-.It Fa s_name
-The official name of the service.
-.It Fa s_aliases
-A zero terminated list of alternate names for the service.
-.It Fa s_port
-The port number at which the service resides.
-Port numbers are returned in network byte order.
-.It Fa s_proto
-The name of the protocol to use when contacting the
-service.
-.El
-.Pp
-The
-.Fn getservent
-function
-reads the next line of the file, opening the file if necessary.
-.Pp
-The
-.Fn setservent
-function
-opens and rewinds the file. If the
-.Fa stayopen
-flag is non-zero,
-the net data base will not be closed after each call to
-.Fn getservbyname
-or
-.Fn getservbyport .
-.Pp
-The
-.Fn endservent
-function
-closes the file.
-.Pp
-The
-.Fn getservbyname
-and
-.Fn getservbyport
-functions
-sequentially search from the beginning
-of the file until a matching
-protocol name or
-port number is found,
-or until
-.Dv EOF
-is encountered.
-If a protocol name is also supplied (non-
-.Dv NULL ) ,
-searches must also match the protocol.
-.ne 1i
-.Sh FILES
-.Bl -tag -width /etc/services -compact
-.It Pa /etc/services
-.El
-.Sh DIAGNOSTICS
-Null pointer
-(0) returned on
-.Dv EOF
-or error.
-.Sh SEE ALSO
-.Xr getprotoent 3 ,
-.Xr services 5
-.Sh HISTORY
-The
-.Fn getservent ,
-.Fn getservbyport ,
-.Fn getservbyname ,
-.Fn setservent ,
-and
-.Fn endservent
-functions appeared in
-.Bx 4.2 .
-.Sh BUGS
-These functions use static data storage;
-if the data is needed for future use, it should be
-copied before any subsequent calls overwrite it.
-Expecting port numbers to fit in a 32 bit
-quantity is probably naive.
diff --git a/c/src/exec/libnetworking/libc/getservent.c b/c/src/exec/libnetworking/libc/getservent.c
deleted file mode 100644
index 08a05c0975..0000000000
--- a/c/src/exec/libnetworking/libc/getservent.c
+++ /dev/null
@@ -1,280 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getservent.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netdb.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#ifdef YP
-#include <rpc/rpc.h>
-#include <rpcsvc/yp_prot.h>
-#include <rpcsvc/ypclnt.h>
-static int serv_stepping_yp = 0;
-extern int _yp_check __P(( char ** ));
-#endif
-
-
-#define MAXALIASES 35
-
-static FILE *servf = NULL;
-static char line[BUFSIZ+1];
-static struct servent serv;
-static char *serv_aliases[MAXALIASES];
-int _serv_stayopen;
-
-#ifdef YP
-char *___getservbyname_yp = NULL;
-char *___getservbyproto_yp = NULL;
-int ___getservbyport_yp = 0;
-static char *yp_domain = NULL;
-
-static int
-_getservbyport_yp(line)
- char *line;
-{
- char *result;
- int resultlen;
- char buf[YPMAXRECORD + 2];
- int rv;
-
- snprintf(buf, sizeof(buf), "%d/%s", ntohs(___getservbyport_yp),
- ___getservbyproto_yp);
-
- ___getservbyport_yp = 0;
- ___getservbyproto_yp = NULL;
-
- if(!yp_domain) {
- if(yp_get_default_domain(&yp_domain))
- return (0);
- }
-
- /*
- * We have to be a little flexible here. Ideally you're supposed
- * to have both a services.byname and a services.byport map, but
- * some systems have only services.byname. FreeBSD cheats a little
- * by putting the services.byport information in the same map as
- * services.byname so that either case will work. We allow for both
- * possibilities here: if there is no services.byport map, we try
- * services.byname instead.
- */
- if ((rv = yp_match(yp_domain, "services.byport", buf, strlen(buf),
- &result, &resultlen))) {
- if (rv == YPERR_MAP) {
- if (yp_match(yp_domain, "services.byname", buf,
- strlen(buf), &result, &resultlen))
- return(0);
- } else
- return(0);
- }
-
- /* getservent() expects lines terminated with \n -- make it happy */
- snprintf(line, BUFSIZ, "%.*s\n", resultlen, result);
-
- free(result);
- return(1);
-}
-
-static int
-_getservbyname_yp(line)
- char *line;
-{
- char *result;
- int resultlen;
- char buf[YPMAXRECORD + 2];
-
- if(!yp_domain) {
- if(yp_get_default_domain(&yp_domain))
- return (0);
- }
-
- snprintf(buf, sizeof(buf), "%s/%s", ___getservbyname_yp,
- ___getservbyproto_yp);
-
- ___getservbyname_yp = 0;
- ___getservbyproto_yp = NULL;
-
- if (yp_match(yp_domain, "services.byname", buf, strlen(buf),
- &result, &resultlen)) {
- return(0);
- }
-
- /* getservent() expects lines terminated with \n -- make it happy */
- snprintf(line, BUFSIZ, "%.*s\n", resultlen, result);
-
- free(result);
- return(1);
-}
-
-static int
-_getservent_yp(line)
- char *line;
-{
- static char *key = NULL;
- static int keylen;
- char *lastkey, *result;
- int resultlen;
- int rv;
-
- if(!yp_domain) {
- if(yp_get_default_domain(&yp_domain))
- return (0);
- }
-
- if (!serv_stepping_yp) {
- if (key)
- free(key);
- if ((rv = yp_first(yp_domain, "services.byname", &key, &keylen,
- &result, &resultlen))) {
- serv_stepping_yp = 0;
- return(0);
- }
- serv_stepping_yp = 1;
- } else {
- lastkey = key;
- rv = yp_next(yp_domain, "services.byname", key, keylen, &key,
- &keylen, &result, &resultlen);
- free(lastkey);
- if (rv) {
- serv_stepping_yp = 0;
- return (0);
- }
- }
-
- /* getservent() expects lines terminated with \n -- make it happy */
- snprintf(line, BUFSIZ, "%.*s\n", resultlen, result);
-
- free(result);
-
- return(1);
-}
-#endif
-
-void
-setservent(f)
- int f;
-{
- if (servf == NULL)
- servf = fopen(_PATH_SERVICES, "r" );
- else
- rewind(servf);
- _serv_stayopen |= f;
-}
-
-void
-endservent()
-{
- if (servf) {
- fclose(servf);
- servf = NULL;
- }
- _serv_stayopen = 0;
-}
-
-struct servent *
-getservent()
-{
- char *p;
- register char *cp, **q;
-
-#ifdef YP
- if (serv_stepping_yp && _getservent_yp(line)) {
- p = (char *)&line;
- goto unpack;
- }
-tryagain:
-#endif
- if (servf == NULL && (servf = fopen(_PATH_SERVICES, "r" )) == NULL)
- return (NULL);
-again:
- if ((p = fgets(line, BUFSIZ, servf)) == NULL)
- return (NULL);
-#ifdef YP
- if (*p == '+' && _yp_check(NULL)) {
- if (___getservbyname_yp != NULL) {
- if (!_getservbyname_yp(line))
- goto tryagain;
- }
- else if (___getservbyport_yp != 0) {
- if (!_getservbyport_yp(line))
- goto tryagain;
- }
- else if (!_getservent_yp(line))
- goto tryagain;
- }
-unpack:
-#endif
- if (*p == '#')
- goto again;
- cp = strpbrk(p, "#\n");
- if (cp == NULL)
- goto again;
- *cp = '\0';
- serv.s_name = p;
- p = strpbrk(p, " \t");
- if (p == NULL)
- goto again;
- *p++ = '\0';
- while (*p == ' ' || *p == '\t')
- p++;
- cp = strpbrk(p, ",/");
- if (cp == NULL)
- goto again;
- *cp++ = '\0';
- serv.s_port = htons((u_short)atoi(p));
- serv.s_proto = cp;
- q = serv.s_aliases = serv_aliases;
- cp = strpbrk(cp, " \t");
- if (cp != NULL)
- *cp++ = '\0';
- while (cp && *cp) {
- if (*cp == ' ' || *cp == '\t') {
- cp++;
- continue;
- }
- if (q < &serv_aliases[MAXALIASES - 1])
- *q++ = cp;
- cp = strpbrk(cp, " \t");
- if (cp != NULL)
- *cp++ = '\0';
- }
- *q = NULL;
- return (&serv);
-}
diff --git a/c/src/exec/libnetworking/libc/herror.c b/c/src/exec/libnetworking/libc/herror.c
deleted file mode 100644
index ba1dae934d..0000000000
--- a/c/src/exec/libnetworking/libc/herror.c
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Copyright (c) 1987, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Portions Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)herror.c 8.1 (Berkeley) 6/4/93";
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/uio.h>
-#include <netdb.h>
-#include <string.h>
-#include <unistd.h>
-
-const char *h_errlist[] = {
- "Resolver Error 0 (no error)",
- "Unknown host", /* 1 HOST_NOT_FOUND */
- "Host name lookup failure", /* 2 TRY_AGAIN */
- "Unknown server error", /* 3 NO_RECOVERY */
- "No address associated with name", /* 4 NO_ADDRESS */
-};
-int h_nerr = { sizeof h_errlist / sizeof h_errlist[0] };
-
-int h_errno;
-
-/*
- * herror --
- * print the error indicated by the h_errno value.
- */
-void
-herror(s)
- const char *s;
-{
-#if 0
- struct iovec iov[4];
- register struct iovec *v = iov;
-
- if (s && *s) {
- v->iov_base = (char *)s;
- v->iov_len = strlen(s);
- v++;
- v->iov_base = ": ";
- v->iov_len = 2;
- v++;
- }
- v->iov_base = (char *)hstrerror(h_errno);
- v->iov_len = strlen(v->iov_base);
- v++;
- v->iov_base = "\n";
- v->iov_len = 1;
- writev(STDERR_FILENO, iov, (v - iov) + 1);
-#else
- /*
- * RTEMS: no writev yet
- */
- if (s && *s) {
- write (2, s, strlen (s));
- write (2, ": ", 2);
- }
- s = (char *)hstrerror(h_errno);
- write (2, s, strlen (s));
- write (2, "\n", 1);
-#endif
-}
-
-const char *
-hstrerror(err)
- int err;
-{
- if (err < 0)
- return ("Resolver internal error");
- else if (err < h_nerr)
- return (h_errlist[err]);
- return ("Unknown resolver error");
-}
diff --git a/c/src/exec/libnetworking/libc/inet.3 b/c/src/exec/libnetworking/libc/inet.3
deleted file mode 100644
index 1052f538f2..0000000000
--- a/c/src/exec/libnetworking/libc/inet.3
+++ /dev/null
@@ -1,210 +0,0 @@
-.\" Copyright (c) 1983, 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" From: @(#)inet.3 8.1 (Berkeley) 6/4/93
-.\" $Id$
-.\"
-.Dd June 17, 1996
-.Dt INET 3
-.Os BSD 4.2
-.Sh NAME
-.Nm inet_aton ,
-.Nm inet_addr ,
-.Nm inet_network ,
-.Nm inet_ntoa ,
-.Nm inet_makeaddr ,
-.Nm inet_lnaof ,
-.Nm inet_netof
-.Nd Internet address manipulation routines
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/socket.h>
-.Fd #include <netinet/in.h>
-.Fd #include <arpa/inet.h>
-.Ft int
-.Fn inet_aton "const char *cp" "struct in_addr *pin"
-.Ft unsigned long
-.Fn inet_addr "const char *cp"
-.Ft unsigned long
-.Fn inet_network "const char *cp"
-.Ft char *
-.Fn inet_ntoa "struct in_addr in"
-.Ft struct in_addr
-.Fn inet_makeaddr "unsigned long net" "unsigned long lna"
-.Ft unsigned long
-.Fn inet_lnaof "struct in_addr in"
-.Ft unsigned long
-.Fn inet_netof "struct in_addr in"
-.Sh DESCRIPTION
-The routines
-.Fn inet_aton ,
-.Fn inet_addr
-and
-.Fn inet_network
-interpret character strings representing
-numbers expressed in the Internet standard
-.Ql \&.
-notation.
-The
-.Fn inet_aton
-routine interprets the specified character string as an Internet address,
-placing the address into the structure provided.
-It returns 1 if the string was successfully interpreted,
-or 0 if the string is invalid.
-The
-.Fn inet_addr
-and
-.Fn inet_network
-functions return numbers suitable for use
-as Internet addresses and Internet network
-numbers, respectively.
-The routine
-.Fn inet_ntoa
-takes an Internet address and returns an
-.Tn ASCII
-string representing the address in
-.Ql \&.
-notation. The routine
-.Fn inet_makeaddr
-takes an Internet network number and a local
-network address and constructs an Internet address
-from it. The routines
-.Fn inet_netof
-and
-.Fn inet_lnaof
-break apart Internet host addresses, returning
-the network number and local network address part,
-respectively.
-.Pp
-All Internet addresses are returned in network
-order (bytes ordered from left to right).
-All network numbers and local address parts are
-returned as machine format integer values.
-.Sh INTERNET ADDRESSES
-Values specified using the
-.Ql \&.
-notation take one
-of the following forms:
-.Bd -literal -offset indent
-a.b.c.d
-a.b.c
-a.b
-a
-.Ed
-.Pp
-When four parts are specified, each is interpreted
-as a byte of data and assigned, from left to right,
-to the four bytes of an Internet address. Note
-that when an Internet address is viewed as a 32-bit
-integer quantity on the
-.Tn VAX
-the bytes referred to
-above appear as
-.Dq Li d.c.b.a .
-That is,
-.Tn VAX
-bytes are
-ordered from right to left.
-.Pp
-When a three part address is specified, the last
-part is interpreted as a 16-bit quantity and placed
-in the right-most two bytes of the network address.
-This makes the three part address format convenient
-for specifying Class B network addresses as
-.Dq Li 128.net.host .
-.Pp
-When a two part address is supplied, the last part
-is interpreted as a 24-bit quantity and placed in
-the right most three bytes of the network address.
-This makes the two part address format convenient
-for specifying Class A network addresses as
-.Dq Li net.host .
-.Pp
-When only one part is given, the value is stored
-directly in the network address without any byte
-rearrangement.
-.Pp
-All numbers supplied as
-.Dq parts
-in a
-.Ql \&.
-notation
-may be decimal, octal, or hexadecimal, as specified
-in the C language (i.e., a leading 0x or 0X implies
-hexadecimal; otherwise, a leading 0 implies octal;
-otherwise, the number is interpreted as decimal).
-.Pp
-The
-.Fn inet_aton
-and
-.Fn inet_ntoa
-functions are semi-deprecated in favor of the
-.Xr addr2ascii 3
-family. However, since those functions are not yet widely implemented,
-portable programs cannot rely on their presence and will continue
-to use the
-.Xr inet 3
-functions for some time.
-.Sh DIAGNOSTICS
-The constant
-.Dv INADDR_NONE
-is returned by
-.Fn inet_addr
-and
-.Fn inet_network
-for malformed requests.
-.Sh SEE ALSO
-.Xr addr2ascii 3 ,
-.Xr gethostbyname 3 ,
-.Xr getnetent 3 ,
-.Xr hosts 5 ,
-.Xr networks 5
-.Sh HISTORY
-These
-functions appeared in
-.Bx 4.2 .
-.Sh BUGS
-The value
-.Dv INADDR_NONE
-(0xffffffff) is a valid broadcast address, but
-.Fn inet_addr
-cannot return that value without indicating failure.
-The newer
-.Fn inet_aton
-function does not share this problem.
-The problem of host byte ordering versus network byte ordering is
-confusing.
-The string returned by
-.Fn inet_ntoa
-resides in a static memory area.
-.Pp
-Inet_addr should return a
-.Fa struct in_addr .
diff --git a/c/src/exec/libnetworking/libc/inet_addr.c b/c/src/exec/libnetworking/libc/inet_addr.c
deleted file mode 100644
index 225ccc1269..0000000000
--- a/c/src/exec/libnetworking/libc/inet_addr.c
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * ++Copyright++ 1983, 1990, 1993
- * -
- * Copyright (c) 1983, 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * -
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- * -
- * --Copyright--
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)inet_addr.c 8.1 (Berkeley) 6/17/93";
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <ctype.h>
-
-/*
- * Ascii internet address interpretation routine.
- * The value returned is in network order.
- */
-u_long
-inet_addr(cp)
- register const char *cp;
-{
- struct in_addr val;
-
- if (inet_aton(cp, &val))
- return (val.s_addr);
- return (INADDR_NONE);
-}
-
-/*
- * Check whether "cp" is a valid ascii representation
- * of an Internet address and convert to a binary address.
- * Returns 1 if the address is valid, 0 if not.
- * This replaces inet_addr, the return value from which
- * cannot distinguish between failure and a local broadcast address.
- */
-int
-inet_aton(cp, addr)
- register const char *cp;
- struct in_addr *addr;
-{
- register u_long val;
- register int base, n;
- register char c;
- u_int parts[4];
- register u_int *pp = parts;
-
- c = *cp;
- for (;;) {
- /*
- * Collect number up to ``.''.
- * Values are specified as for C:
- * 0x=hex, 0=octal, isdigit=decimal.
- */
- if (!isdigit((int)c))
- return (0);
- val = 0; base = 10;
- if (c == '0') {
- c = *++cp;
- if (c == 'x' || c == 'X')
- base = 16, c = *++cp;
- else
- base = 8;
- }
- for (;;) {
- if (isascii((int)c) && isdigit((int)c)) {
- val = (val * base) + (c - '0');
- c = *++cp;
- } else if (base == 16 && isascii((int)c) && isxdigit((int)c)) {
- val = (val << 4) |
- (c + 10 - (islower((int)c) ? 'a' : 'A'));
- c = *++cp;
- } else
- break;
- }
- if (c == '.') {
- /*
- * Internet format:
- * a.b.c.d
- * a.b.c (with c treated as 16 bits)
- * a.b (with b treated as 24 bits)
- */
- if (pp >= parts + 3)
- return (0);
- *pp++ = val;
- c = *++cp;
- } else
- break;
- }
- /*
- * Check for trailing characters.
- */
- if (c != '\0' && (!isascii((int)c) || !isspace((int)c)))
- return (0);
- /*
- * Concoct the address according to
- * the number of parts specified.
- */
- n = pp - parts + 1;
- switch (n) {
-
- case 0:
- return (0); /* initial nondigit */
-
- case 1: /* a -- 32 bits */
- break;
-
- case 2: /* a.b -- 8.24 bits */
- if (val > 0xffffff)
- return (0);
- val |= parts[0] << 24;
- break;
-
- case 3: /* a.b.c -- 8.8.16 bits */
- if (val > 0xffff)
- return (0);
- val |= (parts[0] << 24) | (parts[1] << 16);
- break;
-
- case 4: /* a.b.c.d -- 8.8.8.8 bits */
- if (val > 0xff)
- return (0);
- val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8);
- break;
- }
- if (addr)
- addr->s_addr = htonl(val);
- return (1);
-}
diff --git a/c/src/exec/libnetworking/libc/inet_lnaof.c b/c/src/exec/libnetworking/libc/inet_lnaof.c
deleted file mode 100644
index 6ec6a9aef1..0000000000
--- a/c/src/exec/libnetworking/libc/inet_lnaof.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)inet_lnaof.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-/*
- * Return the local network address portion of an
- * internet address; handles class a/b/c network
- * number formats.
- */
-u_long
-inet_lnaof(in)
- struct in_addr in;
-{
- register u_long i = ntohl(in.s_addr);
-
- if (IN_CLASSA(i))
- return ((i)&IN_CLASSA_HOST);
- else if (IN_CLASSB(i))
- return ((i)&IN_CLASSB_HOST);
- else
- return ((i)&IN_CLASSC_HOST);
-}
diff --git a/c/src/exec/libnetworking/libc/inet_makeaddr.c b/c/src/exec/libnetworking/libc/inet_makeaddr.c
deleted file mode 100644
index ce84170ed9..0000000000
--- a/c/src/exec/libnetworking/libc/inet_makeaddr.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)inet_makeaddr.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-/*
- * Formulate an Internet address from network + host. Used in
- * building addresses stored in the ifnet structure.
- */
-struct in_addr
-inet_makeaddr(net, host)
- u_long net, host;
-{
- u_long addr;
-
- if (net < 128)
- addr = (net << IN_CLASSA_NSHIFT) | (host & IN_CLASSA_HOST);
- else if (net < 65536)
- addr = (net << IN_CLASSB_NSHIFT) | (host & IN_CLASSB_HOST);
- else if (net < 16777216L)
- addr = (net << IN_CLASSC_NSHIFT) | (host & IN_CLASSC_HOST);
- else
- addr = net | host;
- addr = htonl(addr);
- return (*(struct in_addr *)&addr);
-}
diff --git a/c/src/exec/libnetworking/libc/inet_net_ntop.c b/c/src/exec/libnetworking/libc/inet_net_ntop.c
deleted file mode 100644
index 4c7893d417..0000000000
--- a/c/src/exec/libnetworking/libc/inet_net_ntop.c
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static const char orig_rcsid[] = "From Id: inet_net_ntop.c,v 8.2 1996/08/08 06:54:44 vixie Exp";
-static const char rcsid[] = "$Id$";
-#endif
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-#ifdef SPRINTF_CHAR
-# define SPRINTF(x) strlen(sprintf/**/x)
-#else
-# define SPRINTF(x) ((size_t)sprintf x)
-#endif
-
-static char * inet_net_ntop_ipv4 __P((const u_char *src, int bits,
- char *dst, size_t size));
-
-/*
- * char *
- * inet_net_ntop(af, src, bits, dst, size)
- * convert network number from network to presentation format.
- * generates CIDR style result always.
- * return:
- * pointer to dst, or NULL if an error occurred (check errno).
- * author:
- * Paul Vixie (ISC), July 1996
- */
-char *
-inet_net_ntop(af, src, bits, dst, size)
- int af;
- const void *src;
- int bits;
- char *dst;
- size_t size;
-{
- switch (af) {
- case AF_INET:
- return (inet_net_ntop_ipv4(src, bits, dst, size));
- default:
- errno = EAFNOSUPPORT;
- return (NULL);
- }
-}
-
-/*
- * static char *
- * inet_net_ntop_ipv4(src, bits, dst, size)
- * convert IPv4 network number from network to presentation format.
- * generates CIDR style result always.
- * return:
- * pointer to dst, or NULL if an error occurred (check errno).
- * note:
- * network byte order assumed. this means 192.5.5.240/28 has
- * 0x11110000 in its fourth octet.
- * author:
- * Paul Vixie (ISC), July 1996
- */
-static char *
-inet_net_ntop_ipv4(src, bits, dst, size)
- const u_char *src;
- int bits;
- char *dst;
- size_t size;
-{
- char *odst = dst;
- char *t;
- u_int m;
- int b;
-
- if (bits < 0 || bits > 32) {
- errno = EINVAL;
- return (NULL);
- }
- if (bits == 0) {
- if (size < sizeof "0")
- goto emsgsize;
- *dst++ = '0';
- *dst = '\0';
- }
-
- /* Format whole octets. */
- for (b = bits / 8; b > 0; b--) {
- if (size < sizeof "255.")
- goto emsgsize;
- t = dst;
- dst += SPRINTF((dst, "%u", *src++));
- if (b > 1) {
- *dst++ = '.';
- *dst = '\0';
- }
- size -= (size_t)(dst - t);
- }
-
- /* Format partial octet. */
- b = bits % 8;
- if (b > 0) {
- if (size < sizeof ".255")
- goto emsgsize;
- t = dst;
- if (dst != odst)
- *dst++ = '.';
- m = ((1 << b) - 1) << (8 - b);
- dst += SPRINTF((dst, "%u", *src & m));
- size -= (size_t)(dst - t);
- }
-
- /* Format CIDR /width. */
- if (size < sizeof "/32")
- goto emsgsize;
- dst += SPRINTF((dst, "/%u", bits));
- return (odst);
-
- emsgsize:
- errno = EMSGSIZE;
- return (NULL);
-}
diff --git a/c/src/exec/libnetworking/libc/inet_net_pton.c b/c/src/exec/libnetworking/libc/inet_net_pton.c
deleted file mode 100644
index 8915c2a5be..0000000000
--- a/c/src/exec/libnetworking/libc/inet_net_pton.c
+++ /dev/null
@@ -1,207 +0,0 @@
-/*
- * Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static const char orig_rcsid[] = "From Id: inet_net_pton.c,v 1.8 1996/11/21 10:28:12 vixie Exp $";
-static const char rcsid[] = "$Id$";
-#endif
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-#include <assert.h>
-#include <ctype.h>
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-#ifdef SPRINTF_CHAR
-# define SPRINTF(x) strlen(sprintf/**/x)
-#else
-# define SPRINTF(x) ((size_t)sprintf x)
-#endif
-
-static int inet_net_pton_ipv4 __P((const char *src, u_char *dst,
- size_t size));
-
-/*
- * static int
- * inet_net_pton(af, src, dst, size)
- * convert network number from presentation to network format.
- * accepts hex octets, hex strings, decimal octets, and /CIDR.
- * "size" is in bytes and describes "dst".
- * return:
- * number of bits, either imputed classfully or specified with /CIDR,
- * or -1 if some failure occurred (check errno). ENOENT means it was
- * not a valid network specification.
- * author:
- * Paul Vixie (ISC), June 1996
- */
-int
-inet_net_pton(af, src, dst, size)
- int af;
- const char *src;
- void *dst;
- size_t size;
-{
- switch (af) {
- case AF_INET:
- return (inet_net_pton_ipv4(src, dst, size));
- default:
- errno = EAFNOSUPPORT;
- return (-1);
- }
-}
-
-/*
- * static int
- * inet_net_pton_ipv4(src, dst, size)
- * convert IPv4 network number from presentation to network format.
- * accepts hex octets, hex strings, decimal octets, and /CIDR.
- * "size" is in bytes and describes "dst".
- * return:
- * number of bits, either imputed classfully or specified with /CIDR,
- * or -1 if some failure occurred (check errno). ENOENT means it was
- * not an IPv4 network specification.
- * note:
- * network byte order assumed. this means 192.5.5.240/28 has
- * 0x11110000 in its fourth octet.
- * author:
- * Paul Vixie (ISC), June 1996
- */
-static int
-inet_net_pton_ipv4(src, dst, size)
- const char *src;
- u_char *dst;
- size_t size;
-{
- static const char
- xdigits[] = "0123456789abcdef",
- digits[] = "0123456789";
- int n, ch, tmp, dirty, bits;
- const u_char *odst = dst;
-
- ch = *src++;
- if (ch == '0' && (src[0] == 'x' || src[0] == 'X')
- && isascii(src[1]) && isxdigit(src[1])) {
- /* Hexadecimal: Eat nybble string. */
- if (size <= 0)
- goto emsgsize;
- *dst = 0, dirty = 0;
- src++; /* skip x or X. */
- while ((ch = *src++) != '\0' &&
- isascii(ch) && isxdigit(ch)) {
- if (isupper(ch))
- ch = tolower(ch);
- n = strchr(xdigits, ch) - xdigits;
- assert(n >= 0 && n <= 15);
- *dst |= n;
- if (!dirty++)
- *dst <<= 4;
- else if (size-- > 0)
- *++dst = 0, dirty = 0;
- else
- goto emsgsize;
- }
- if (dirty)
- size--;
- } else if (isascii(ch) && isdigit(ch)) {
- /* Decimal: eat dotted digit string. */
- for (;;) {
- tmp = 0;
- do {
- n = strchr(digits, ch) - digits;
- assert(n >= 0 && n <= 9);
- tmp *= 10;
- tmp += n;
- if (tmp > 255)
- goto enoent;
- } while ((ch = *src++) != '\0' &&
- isascii(ch) && isdigit(ch));
- if (size-- <= 0)
- goto emsgsize;
- *dst++ = (u_char) tmp;
- if (ch == '\0' || ch == '/')
- break;
- if (ch != '.')
- goto enoent;
- ch = *src++;
- if (!isascii(ch) || !isdigit(ch))
- goto enoent;
- }
- } else
- goto enoent;
-
- bits = -1;
- if (ch == '/' && isascii(src[0]) && isdigit(src[0]) && dst > odst) {
- /* CIDR width specifier. Nothing can follow it. */
- ch = *src++; /* Skip over the /. */
- bits = 0;
- do {
- n = strchr(digits, ch) - digits;
- assert(n >= 0 && n <= 9);
- bits *= 10;
- bits += n;
- } while ((ch = *src++) != '\0' && isascii(ch) && isdigit(ch));
- if (ch != '\0')
- goto enoent;
- if (bits > 32)
- goto emsgsize;
- }
-
- /* Firey death and destruction unless we prefetched EOS. */
- if (ch != '\0')
- goto enoent;
-
- /* If nothing was written to the destination, we found no address. */
- if (dst == odst)
- goto enoent;
- /* If no CIDR spec was given, infer width from net class. */
- if (bits == -1) {
- if (*odst >= 240) /* Class E */
- bits = 32;
- else if (*odst >= 224) /* Class D */
- bits = 4;
- else if (*odst >= 192) /* Class C */
- bits = 24;
- else if (*odst >= 128) /* Class B */
- bits = 16;
- else /* Class A */
- bits = 8;
- /* If imputed mask is narrower than specified octets, widen. */
- if (bits >= 8 && bits < ((dst - odst) * 8))
- bits = (dst - odst) * 8;
- }
- /* Extend network to cover the actual mask. */
- while (bits > ((dst - odst) * 8)) {
- if (size-- <= 0)
- goto emsgsize;
- *dst++ = '\0';
- }
- return (bits);
-
- enoent:
- errno = ENOENT;
- return (-1);
-
- emsgsize:
- errno = EMSGSIZE;
- return (-1);
-}
diff --git a/c/src/exec/libnetworking/libc/inet_neta.c b/c/src/exec/libnetworking/libc/inet_neta.c
deleted file mode 100644
index 59b156f7f6..0000000000
--- a/c/src/exec/libnetworking/libc/inet_neta.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static const char orig_rcsid[] = "From Id: inet_neta.c,v 8.2 1996/08/08 06:54:44 vixie Exp";
-static const char rcsid[] = "$Id$";
-#endif
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-
-#ifdef SPRINTF_CHAR
-# define SPRINTF(x) strlen(sprintf/**/x)
-#else
-# define SPRINTF(x) ((size_t)sprintf x)
-#endif
-
-/*
- * char *
- * inet_neta(src, dst, size)
- * format a u_long network number into presentation format.
- * return:
- * pointer to dst, or NULL if an error occurred (check errno).
- * note:
- * format of ``src'' is as for inet_network().
- * author:
- * Paul Vixie (ISC), July 1996
- */
-char *
-inet_neta(src, dst, size)
- u_long src;
- char *dst;
- size_t size;
-{
- char *odst = dst;
- char *tp;
-
- while (src & 0xffffffff) {
- u_char b = (src & 0xff000000) >> 24;
-
- src <<= 8;
- if (b) {
- if (size < sizeof "255.")
- goto emsgsize;
- tp = dst;
- dst += SPRINTF((dst, "%u", b));
- if (src != 0L) {
- *dst++ = '.';
- *dst = '\0';
- }
- size -= (size_t)(dst - tp);
- }
- }
- if (dst == odst) {
- if (size < sizeof "0.0.0.0")
- goto emsgsize;
- strcpy(dst, "0.0.0.0");
- }
- return (odst);
-
- emsgsize:
- errno = EMSGSIZE;
- return (NULL);
-}
diff --git a/c/src/exec/libnetworking/libc/inet_netof.c b/c/src/exec/libnetworking/libc/inet_netof.c
deleted file mode 100644
index 179731efc3..0000000000
--- a/c/src/exec/libnetworking/libc/inet_netof.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)inet_netof.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-/*
- * Return the network number from an internet
- * address; handles class a/b/c network #'s.
- */
-u_long
-inet_netof(in)
- struct in_addr in;
-{
- register u_long i = ntohl(in.s_addr);
-
- if (IN_CLASSA(i))
- return (((i)&IN_CLASSA_NET) >> IN_CLASSA_NSHIFT);
- else if (IN_CLASSB(i))
- return (((i)&IN_CLASSB_NET) >> IN_CLASSB_NSHIFT);
- else
- return (((i)&IN_CLASSC_NET) >> IN_CLASSC_NSHIFT);
-}
diff --git a/c/src/exec/libnetworking/libc/inet_network.c b/c/src/exec/libnetworking/libc/inet_network.c
deleted file mode 100644
index ac0073bf0a..0000000000
--- a/c/src/exec/libnetworking/libc/inet_network.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)inet_network.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <ctype.h>
-
-/*
- * Internet network address interpretation routine.
- * The library routines call this routine to interpret
- * network numbers.
- */
-u_long
-inet_network(cp)
- register const char *cp;
-{
- register u_long val, base, n, i;
- register char c;
- u_long parts[4], *pp = parts;
-
-again:
- val = 0; base = 10;
- if (*cp == '0')
- base = 8, cp++;
- if (*cp == 'x' || *cp == 'X')
- base = 16, cp++;
- while ((c = *cp) != 0) {
- if (isdigit(c)) {
- val = (val * base) + (c - '0');
- cp++;
- continue;
- }
- if (base == 16 && isxdigit(c)) {
- val = (val << 4) + (c + 10 - (islower(c) ? 'a' : 'A'));
- cp++;
- continue;
- }
- break;
- }
- if (*cp == '.') {
- if (pp >= parts + 3)
- return (INADDR_NONE);
- *pp++ = val, cp++;
- goto again;
- }
- if (*cp && !isspace(*cp))
- return (INADDR_NONE);
- *pp++ = val;
- n = pp - parts;
- for (val = 0, i = 0; i < n; i++) {
- val <<= 8;
- val |= parts[i] & 0xff;
- }
- return (val);
-}
diff --git a/c/src/exec/libnetworking/libc/inet_ntoa.c b/c/src/exec/libnetworking/libc/inet_ntoa.c
deleted file mode 100644
index 44b686f0b3..0000000000
--- a/c/src/exec/libnetworking/libc/inet_ntoa.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)inet_ntoa.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <stdio.h>
-
-/*
- * Convert network-format internet address
- * to base 256 d.d.d.d representation.
- */
-char *
-inet_ntoa(in)
- struct in_addr in;
-{
- static char ret[18];
-
- strcpy(ret, "[inet_ntoa error]");
- (void) inet_ntop(AF_INET, &in, ret, sizeof ret);
- return (ret);
-}
diff --git a/c/src/exec/libnetworking/libc/inet_ntop.c b/c/src/exec/libnetworking/libc/inet_ntop.c
deleted file mode 100644
index 76a538755a..0000000000
--- a/c/src/exec/libnetworking/libc/inet_ntop.c
+++ /dev/null
@@ -1,191 +0,0 @@
-/* Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-
-#define SPRINTF(x) ((size_t)sprintf x)
-
-/*
- * WARNING: Don't even consider trying to compile this on a system where
- * sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX.
- */
-
-static const char *inet_ntop4 __P((const u_char *src, char *dst, size_t size));
-static const char *inet_ntop6 __P((const u_char *src, char *dst, size_t size));
-
-/* char *
- * inet_ntop(af, src, dst, size)
- * convert a network format address to presentation format.
- * return:
- * pointer to presentation format address (`dst'), or NULL (see errno).
- * author:
- * Paul Vixie, 1996.
- */
-const char *
-inet_ntop(af, src, dst, size)
- int af;
- const void *src;
- char *dst;
- size_t size;
-{
- switch (af) {
- case AF_INET:
- return (inet_ntop4(src, dst, size));
- case AF_INET6:
- return (inet_ntop6(src, dst, size));
- default:
- errno = EAFNOSUPPORT;
- return (NULL);
- }
- /* NOTREACHED */
-}
-
-/* const char *
- * inet_ntop4(src, dst, size)
- * format an IPv4 address, more or less like inet_ntoa()
- * return:
- * `dst' (as a const)
- * notes:
- * (1) uses no statics
- * (2) takes a u_char* not an in_addr as input
- * author:
- * Paul Vixie, 1996.
- */
-static const char *
-inet_ntop4(src, dst, size)
- const u_char *src;
- char *dst;
- size_t size;
-{
- static const char fmt[] = "%u.%u.%u.%u";
- char tmp[sizeof "255.255.255.255"];
-
- if (SPRINTF((tmp, fmt, src[0], src[1], src[2], src[3])) > size) {
- errno = ENOSPC;
- return (NULL);
- }
- strcpy(dst, tmp);
- return (dst);
-}
-
-/* const char *
- * inet_ntop6(src, dst, size)
- * convert IPv6 binary address into presentation (printable) format
- * author:
- * Paul Vixie, 1996.
- */
-static const char *
-inet_ntop6(src, dst, size)
- const u_char *src;
- char *dst;
- size_t size;
-{
- /*
- * Note that int32_t and int16_t need only be "at least" large enough
- * to contain a value of the specified size. On some systems, like
- * Crays, there is no such thing as an integer variable with 16 bits.
- * Keep this in mind if you think this function should have been coded
- * to use pointer overlays. All the world's not a VAX.
- */
- char tmp[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"], *tp;
- struct { int base, len; } best, cur;
- u_int words[NS_IN6ADDRSZ / NS_INT16SZ];
- int i;
-
- /*
- * Preprocess:
- * Copy the input (bytewise) array into a wordwise array.
- * Find the longest run of 0x00's in src[] for :: shorthanding.
- */
- memset(words, '\0', sizeof words);
- for (i = 0; i < NS_IN6ADDRSZ; i++)
- words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3));
- best.base = -1;
- cur.base = -1;
- for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++) {
- if (words[i] == 0) {
- if (cur.base == -1)
- cur.base = i, cur.len = 1;
- else
- cur.len++;
- } else {
- if (cur.base != -1) {
- if (best.base == -1 || cur.len > best.len)
- best = cur;
- cur.base = -1;
- }
- }
- }
- if (cur.base != -1) {
- if (best.base == -1 || cur.len > best.len)
- best = cur;
- }
- if (best.base != -1 && best.len < 2)
- best.base = -1;
-
- /*
- * Format the result.
- */
- tp = tmp;
- for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++) {
- /* Are we inside the best run of 0x00's? */
- if (best.base != -1 && i >= best.base &&
- i < (best.base + best.len)) {
- if (i == best.base)
- *tp++ = ':';
- continue;
- }
- /* Are we following an initial run of 0x00s or any real hex? */
- if (i != 0)
- *tp++ = ':';
- /* Is this address an encapsulated IPv4? */
- if (i == 6 && best.base == 0 &&
- (best.len == 6 || (best.len == 5 && words[5] == 0xffff))) {
- if (!inet_ntop4(src+12, tp, sizeof tmp - (tp - tmp)))
- return (NULL);
- tp += strlen(tp);
- break;
- }
- tp += SPRINTF((tp, "%x", words[i]));
- }
- /* Was it a trailing run of 0x00's? */
- if (best.base != -1 && (best.base + best.len) ==
- (NS_IN6ADDRSZ / NS_INT16SZ))
- *tp++ = ':';
- *tp++ = '\0';
-
- /*
- * Check for overflow, copy, and we're done.
- */
- if ((size_t)(tp - tmp) > size) {
- errno = ENOSPC;
- return (NULL);
- }
- strcpy(dst, tmp);
- return (dst);
-}
diff --git a/c/src/exec/libnetworking/libc/inet_pton.c b/c/src/exec/libnetworking/libc/inet_pton.c
deleted file mode 100644
index 8d21111cfa..0000000000
--- a/c/src/exec/libnetworking/libc/inet_pton.c
+++ /dev/null
@@ -1,214 +0,0 @@
-/* Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-#include <string.h>
-#include <errno.h>
-
-/*
- * WARNING: Don't even consider trying to compile this on a system where
- * sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX.
- */
-
-static int inet_pton4 __P((const char *src, u_char *dst));
-static int inet_pton6 __P((const char *src, u_char *dst));
-
-/* int
- * inet_pton(af, src, dst)
- * convert from presentation format (which usually means ASCII printable)
- * to network format (which is usually some kind of binary format).
- * return:
- * 1 if the address was valid for the specified address family
- * 0 if the address wasn't valid (`dst' is untouched in this case)
- * -1 if some other error occurred (`dst' is untouched in this case, too)
- * author:
- * Paul Vixie, 1996.
- */
-int
-inet_pton(af, src, dst)
- int af;
- const char *src;
- void *dst;
-{
- switch (af) {
- case AF_INET:
- return (inet_pton4(src, dst));
- case AF_INET6:
- return (inet_pton6(src, dst));
- default:
- errno = EAFNOSUPPORT;
- return (-1);
- }
- /* NOTREACHED */
-}
-
-/* int
- * inet_pton4(src, dst)
- * like inet_aton() but without all the hexadecimal and shorthand.
- * return:
- * 1 if `src' is a valid dotted quad, else 0.
- * notice:
- * does not touch `dst' unless it's returning 1.
- * author:
- * Paul Vixie, 1996.
- */
-static int
-inet_pton4(src, dst)
- const char *src;
- u_char *dst;
-{
- static const char digits[] = "0123456789";
- int saw_digit, octets, ch;
- u_char tmp[NS_INADDRSZ], *tp;
-
- saw_digit = 0;
- octets = 0;
- *(tp = tmp) = 0;
- while ((ch = *src++) != '\0') {
- const char *pch;
-
- if ((pch = strchr(digits, ch)) != NULL) {
- u_int new = *tp * 10 + (pch - digits);
-
- if (new > 255)
- return (0);
- *tp = new;
- if (! saw_digit) {
- if (++octets > 4)
- return (0);
- saw_digit = 1;
- }
- } else if (ch == '.' && saw_digit) {
- if (octets == 4)
- return (0);
- *++tp = 0;
- saw_digit = 0;
- } else
- return (0);
- }
- if (octets < 4)
- return (0);
-
- memcpy(dst, tmp, NS_INADDRSZ);
- return (1);
-}
-
-/* int
- * inet_pton6(src, dst)
- * convert presentation level address to network order binary form.
- * return:
- * 1 if `src' is a valid [RFC1884 2.2] address, else 0.
- * notice:
- * (1) does not touch `dst' unless it's returning 1.
- * (2) :: in a full address is silently ignored.
- * credit:
- * inspired by Mark Andrews.
- * author:
- * Paul Vixie, 1996.
- */
-static int
-inet_pton6(src, dst)
- const char *src;
- u_char *dst;
-{
- static const char xdigits_l[] = "0123456789abcdef",
- xdigits_u[] = "0123456789ABCDEF";
- u_char tmp[NS_IN6ADDRSZ], *tp, *endp, *colonp;
- const char *xdigits, *curtok;
- int ch, saw_xdigit;
- u_int val;
-
- memset((tp = tmp), '\0', NS_IN6ADDRSZ);
- endp = tp + NS_IN6ADDRSZ;
- colonp = NULL;
- /* Leading :: requires some special handling. */
- if (*src == ':')
- if (*++src != ':')
- return (0);
- curtok = src;
- saw_xdigit = 0;
- val = 0;
- while ((ch = *src++) != '\0') {
- const char *pch;
-
- if ((pch = strchr((xdigits = xdigits_l), ch)) == NULL)
- pch = strchr((xdigits = xdigits_u), ch);
- if (pch != NULL) {
- val <<= 4;
- val |= (pch - xdigits);
- if (val > 0xffff)
- return (0);
- saw_xdigit = 1;
- continue;
- }
- if (ch == ':') {
- curtok = src;
- if (!saw_xdigit) {
- if (colonp)
- return (0);
- colonp = tp;
- continue;
- }
- if (tp + NS_INT16SZ > endp)
- return (0);
- *tp++ = (u_char) (val >> 8) & 0xff;
- *tp++ = (u_char) val & 0xff;
- saw_xdigit = 0;
- val = 0;
- continue;
- }
- if (ch == '.' && ((tp + NS_INADDRSZ) <= endp) &&
- inet_pton4(curtok, tp) > 0) {
- tp += NS_INADDRSZ;
- saw_xdigit = 0;
- break; /* '\0' was seen by inet_pton4(). */
- }
- return (0);
- }
- if (saw_xdigit) {
- if (tp + NS_INT16SZ > endp)
- return (0);
- *tp++ = (u_char) (val >> 8) & 0xff;
- *tp++ = (u_char) val & 0xff;
- }
- if (colonp != NULL) {
- /*
- * Since some memmove()'s erroneously fail to handle
- * overlapping regions, we'll do the shift by hand.
- */
- const int n = tp - colonp;
- int i;
-
- for (i = 1; i <= n; i++) {
- endp[- i] = colonp[n - i];
- colonp[n - i] = 0;
- }
- tp = endp;
- }
- if (tp != endp)
- return (0);
- memcpy(dst, tmp, NS_IN6ADDRSZ);
- return (1);
-}
diff --git a/c/src/exec/libnetworking/libc/iso_addr.3 b/c/src/exec/libnetworking/libc/iso_addr.3
deleted file mode 100644
index 0c9973bef4..0000000000
--- a/c/src/exec/libnetworking/libc/iso_addr.3
+++ /dev/null
@@ -1,111 +0,0 @@
-.\" Copyright (c) 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)iso_addr.3 8.1 (Berkeley) 6/4/93
-.\" $Id$
-.\"
-.Dd June 4, 1993
-.Dt ISO_ADDR 3
-.Os
-.Sh NAME
-.Nm iso_addr ,
-.Nm iso_ntoa
-.Nd "elementary network address conversion routines for Open System Interconnection
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <netiso/iso.h>
-.Ft struct iso_addr *
-.Fn iso_addr "char *cp"
-.Ft char *
-.Fn iso_ntoa "struct iso_addr *isoa"
-.Sh DESCRIPTION
-The routine
-.Fn iso_addr
-interprets character strings representing
-.Tn OSI
-addresses, returning binary information suitable
-for use in system calls.
-The routine
-.Fn iso_ntoa
-takes
-.Tn OSI
-addresses and returns
-.Tn ASCII
-strings representing NSAPs (network service
-access points) in a
-notation inverse to that accepted by
-.Fn iso_addr .
-.Pp
-Unfortunately, no universal standard exists for representing
-.Tn OSI
-network addresses.
-.Pp
-The format employed by
-.Fn iso_addr
-is a sequence of hexadecimal
-.Dq digits
-(optionally separated by periods),
-of the form:
-.Bd -filled -offset indent
-<hex digits>.<hex digits>.<hex digits>
-.Ed
-.Pp
-Each pair of hexadecimal digits represents a byte
-with the leading digit indicating the higher-ordered bits.
-A period following an even number of bytes has no
-effect (but may be used to increase legibility).
-A period following an odd number of bytes has the
-effect of causing the byte of address being translated
-to have its higher order bits filled with zeros.
-.Sh RETURN VALUES
-.Fn iso_ntoa
-always returns a null terminated string.
-.Fn iso_addr
-always returns a pointer to a struct iso_addr.
-(See
-.Sx BUGS . )
-.Sh SEE ALSO
-.Xr iso 4
-.Sh HISTORY
-The
-.Fn iso_addr
-and
-.Fn iso_ntoa
-functions appeared in
-.Bx 4.3 Reno .
-.Sh BUGS
-The returned values
-reside in a static memory area.
-.Pp
-The function
-.Fn iso_addr
-should diagnose improperly formed input, and there should be an unambiguous
-way to recognize this.
diff --git a/c/src/exec/libnetworking/libc/iso_addr.c b/c/src/exec/libnetworking/libc/iso_addr.c
deleted file mode 100644
index eb14e8a72b..0000000000
--- a/c/src/exec/libnetworking/libc/iso_addr.c
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)iso_addr.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <netiso/iso.h>
-#include <string.h>
-
-/* States*/
-#define VIRGIN 0
-#define GOTONE 1
-#define GOTTWO 2
-/* Inputs */
-#define DIGIT (4*0)
-#define END (4*1)
-#define DELIM (4*2)
-
-struct iso_addr *
-iso_addr(addr)
- register const char *addr;
-{
- static struct iso_addr out_addr;
- register char *cp = out_addr.isoa_genaddr;
- char *cplim = cp + sizeof(out_addr.isoa_genaddr);
- register int byte = 0, state = VIRGIN, new;
-
- bzero((char *)&out_addr, sizeof(out_addr));
- do {
- if ((*addr >= '0') && (*addr <= '9')) {
- new = *addr - '0';
- } else if ((*addr >= 'a') && (*addr <= 'f')) {
- new = *addr - 'a' + 10;
- } else if ((*addr >= 'A') && (*addr <= 'F')) {
- new = *addr - 'A' + 10;
- } else if (*addr == 0)
- state |= END;
- else
- state |= DELIM;
- addr++;
- switch (state /* | INPUT */) {
- case GOTTWO | DIGIT:
- *cp++ = byte; /*FALLTHROUGH*/
- case VIRGIN | DIGIT:
- state = GOTONE; byte = new; continue;
- case GOTONE | DIGIT:
- state = GOTTWO; byte = new + (byte << 4); continue;
- default: /* | DELIM */
- state = VIRGIN; *cp++ = byte; byte = 0; continue;
- case GOTONE | END:
- case GOTTWO | END:
- *cp++ = byte; /* FALLTHROUGH */
- case VIRGIN | END:
- break;
- }
- break;
- } while (cp < cplim);
- out_addr.isoa_len = cp - out_addr.isoa_genaddr;
- return (&out_addr);
-}
-
-static char hexlist[] = "0123456789abcdef";
-
-char *
-iso_ntoa(isoa)
- const struct iso_addr *isoa;
-{
- static char tmpbuf[sizeof(isoa->isoa_genaddr)*3];
- const u_char *binary;
- char *cp;
- int i;
-
- binary = isoa->isoa_genaddr;
- cp = tmpbuf;
-
- for (i = 0; i < isoa->isoa_len; i++) {
- *cp++ = hexlist[*binary >> 4];
- *cp++ = hexlist[*binary++ & 0xf];
-
- if ((((i % 2) == 0) && ((i + 1) < isoa->isoa_len)))
- *cp++ = '.';
- }
- *cp = '\0';
- return tmpbuf;
-}
diff --git a/c/src/exec/libnetworking/libc/linkaddr.3 b/c/src/exec/libnetworking/libc/linkaddr.3
deleted file mode 100644
index 6999add0e8..0000000000
--- a/c/src/exec/libnetworking/libc/linkaddr.3
+++ /dev/null
@@ -1,138 +0,0 @@
-.\" Copyright (c) 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Donn Seeley at BSDI.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" From: @(#)linkaddr.3 8.1 (Berkeley) 7/28/93
-.\" $Id$
-.\"
-.Dd June 17, 1996
-.Dt LINK_ADDR 3
-.Os BSD 4.4
-.Sh NAME
-.Nm link_addr ,
-.Nm link_ntoa
-.Nd elementary address specification routines for link level access
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/socket.h>
-.Fd #include <net/if_dl.h>
-.Ft void
-.Fn link_addr "const char *addr" "struct sockaddr_dl *sdl"
-.Ft char *
-.Fn link_ntoa "const struct sockaddr_dl *sdl"
-.Sh DESCRIPTION
-The routine
-.Fn link_addr
-interprets character strings representing
-link-level addresses, returning binary information suitable
-for use in system calls.
-The routine
-.Fn link_ntoa
-takes
-a link-level
-address and returns an
-.Tn ASCII
-string representing some of the information present,
-including the link level address itself, and the interface name
-or number, if present.
-This facility is experimental and is
-still subject to change.
-.Pp
-For
-.Fn link_addr ,
-the string
-.Fa addr
-may contain
-an optional network interface identifier of the form
-.Dq "name unit-number" ,
-suitable for the first argument to
-.Xr ifconfig 8 ,
-followed in all cases by a colon and
-an interface address in the form of
-groups of hexadecimal digits
-separated by periods.
-Each group represents a byte of address;
-address bytes are filled left to right from
-low order bytes through high order bytes.
-.Pp
-.\" A regular expression may make this format clearer:
-.\" .Bd -literal -offset indent
-.\" ([a-z]+[0-9]+:)?[0-9a-f]+(\e.[0-9a-f]+)*
-.\" .Ed
-.\" .Pp
-Thus
-.Li le0:8.0.9.13.d.30
-represents an ethernet address
-to be transmitted on the first Lance ethernet interface.
-.Pp
-The direct use of these functions is deprecated in favor of the
-.Xr addr2ascii 3
-interface; however, portable programs cannot rely on the latter as it is
-not yet widely implemented.
-.Sh RETURN VALUES
-.Fn link_ntoa
-always returns a null terminated string.
-.Fn link_addr
-has no return value.
-(See
-.Sx BUGS . )
-.Sh SEE ALSO
-.Xr addr2ascii 3
-.\" .Xr iso 4
-.Sh HISTORY
-The
-.Fn link_addr
-and
-.Fn link_ntoa
-functions appeared in
-.Bx 4.3 Reno .
-.Sh BUGS
-The returned values for link_ntoa
-reside in a static memory area.
-.Pp
-The function
-.Fn link_addr
-should diagnose improperly formed input, and there should be an unambiguous
-way to recognize this.
-.Pp
-If the
-.Va sdl_len
-field of the link socket address
-.Fa sdl
-is 0,
-.Fn link_ntoa
-will not insert a colon before the interface address bytes.
-If this translated address is given to
-.Fn link_addr
-without inserting an initial colon,
-the latter will not interpret it correctly.
diff --git a/c/src/exec/libnetworking/libc/linkaddr.c b/c/src/exec/libnetworking/libc/linkaddr.c
deleted file mode 100644
index 28c16cff05..0000000000
--- a/c/src/exec/libnetworking/libc/linkaddr.c
+++ /dev/null
@@ -1,160 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)linkaddr.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <net/if_dl.h>
-#include <string.h>
-
-/* States*/
-#define NAMING 0
-#define GOTONE 1
-#define GOTTWO 2
-#define RESET 3
-/* Inputs */
-#define DIGIT (4*0)
-#define END (4*1)
-#define DELIM (4*2)
-#define LETTER (4*3)
-
-void
-link_addr(addr, sdl)
- register const char *addr;
- register struct sockaddr_dl *sdl;
-{
- register char *cp = sdl->sdl_data;
- char *cplim = sdl->sdl_len + (char *)sdl;
- register int byte = 0, state = NAMING, new;
-
- bzero((char *)&sdl->sdl_family, sdl->sdl_len - 1);
- sdl->sdl_family = AF_LINK;
- do {
- state &= ~LETTER;
- if ((*addr >= '0') && (*addr <= '9')) {
- new = *addr - '0';
- } else if ((*addr >= 'a') && (*addr <= 'f')) {
- new = *addr - 'a' + 10;
- } else if ((*addr >= 'A') && (*addr <= 'F')) {
- new = *addr - 'A' + 10;
- } else if (*addr == 0) {
- state |= END;
- } else if (state == NAMING &&
- (((*addr >= 'A') && (*addr <= 'Z')) ||
- ((*addr >= 'a') && (*addr <= 'z'))))
- state |= LETTER;
- else
- state |= DELIM;
- addr++;
- switch (state /* | INPUT */) {
- case NAMING | DIGIT:
- case NAMING | LETTER:
- *cp++ = addr[-1];
- continue;
- case NAMING | DELIM:
- state = RESET;
- sdl->sdl_nlen = cp - sdl->sdl_data;
- continue;
- case GOTTWO | DIGIT:
- *cp++ = byte;
- /* FALLTHROUGH */
- case RESET | DIGIT:
- state = GOTONE;
- byte = new;
- continue;
- case GOTONE | DIGIT:
- state = GOTTWO;
- byte = new + (byte << 4);
- continue;
- default: /* | DELIM */
- state = RESET;
- *cp++ = byte;
- byte = 0;
- continue;
- case GOTONE | END:
- case GOTTWO | END:
- *cp++ = byte;
- /* FALLTHROUGH */
- case RESET | END:
- break;
- }
- break;
- } while (cp < cplim);
- sdl->sdl_alen = cp - LLADDR(sdl);
- new = cp - (char *)sdl;
- if (new > sizeof(*sdl))
- sdl->sdl_len = new;
- return;
-}
-
-static char hexlist[] = "0123456789abcdef";
-
-char *
-link_ntoa(sdl)
- register const struct sockaddr_dl *sdl;
-{
- static char obuf[64];
- register char *out = obuf;
- register int i;
- register u_char *in = (u_char *)LLADDR(sdl);
- u_char *inlim = in + sdl->sdl_alen;
- int firsttime = 1;
-
- if (sdl->sdl_nlen) {
- bcopy(sdl->sdl_data, obuf, sdl->sdl_nlen);
- out += sdl->sdl_nlen;
- if (sdl->sdl_alen)
- *out++ = ':';
- }
- while (in < inlim) {
- if (firsttime)
- firsttime = 0;
- else
- *out++ = '.';
- i = *in++;
- if (i > 0xf) {
- out[1] = hexlist[i & 0xf];
- i >>= 4;
- out[0] = hexlist[i];
- out += 2;
- } else
- *out++ = hexlist[i];
- }
- *out = 0;
- return (obuf);
-}
diff --git a/c/src/exec/libnetworking/libc/map_v4v6.c b/c/src/exec/libnetworking/libc/map_v4v6.c
deleted file mode 100644
index 0f8658e117..0000000000
--- a/c/src/exec/libnetworking/libc/map_v4v6.c
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * ++Copyright++ 1985, 1988, 1993
- * -
- * Copyright (c) 1985, 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * -
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- * -
- * --Copyright--
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)gethostnamadr.c 8.1 (Berkeley) 6/4/93";
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-
-#include <stdio.h>
-#include <string.h>
-#include <netdb.h>
-#include <resolv.h>
-#include <ctype.h>
-#include <errno.h>
-#include <syslog.h>
-
-typedef union {
- int32_t al;
- char ac;
-} align;
-
-void
-_map_v4v6_address(src, dst)
- const char *src;
- char *dst;
-{
- u_char *p = (u_char *)dst;
- char tmp[INADDRSZ];
- int i;
-
- /* Stash a temporary copy so our caller can update in place. */
- bcopy(src, tmp, INADDRSZ);
- /* Mark this ipv6 addr as a mapped ipv4. */
- for (i = 0; i < 10; i++)
- *p++ = 0x00;
- *p++ = 0xff;
- *p++ = 0xff;
- /* Retrieve the saved copy and we're done. */
- bcopy(tmp, (void*)p, INADDRSZ);
-}
-
-void
-_map_v4v6_hostent(hp, bpp, lenp)
- struct hostent *hp;
- char **bpp;
- int *lenp;
-{
- char **ap;
-
- if (hp->h_addrtype != AF_INET || hp->h_length != INADDRSZ)
- return;
- hp->h_addrtype = AF_INET6;
- hp->h_length = IN6ADDRSZ;
- for (ap = hp->h_addr_list; *ap; ap++) {
- int i = sizeof(align) - ((u_long)*bpp % sizeof(align));
-
- if (*lenp < (i + IN6ADDRSZ)) {
- /* Out of memory. Truncate address list here. XXX */
- *ap = NULL;
- return;
- }
- *bpp += i;
- *lenp -= i;
- _map_v4v6_address(*ap, *bpp);
- *ap = *bpp;
- *bpp += IN6ADDRSZ;
- *lenp -= IN6ADDRSZ;
- }
-}
diff --git a/c/src/exec/libnetworking/libc/ns.3 b/c/src/exec/libnetworking/libc/ns.3
deleted file mode 100644
index e621ad2d90..0000000000
--- a/c/src/exec/libnetworking/libc/ns.3
+++ /dev/null
@@ -1,131 +0,0 @@
-.\" Copyright (c) 1986, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)ns.3 8.1 (Berkeley) 6/4/93
-.\" $Id$
-.\"
-.Dd June 4, 1993
-.Dt NS 3
-.Os BSD 4.3
-.Sh NAME
-.Nm ns_addr ,
-.Nm ns_ntoa
-.Nd Xerox
-.Tn NS Ns (tm)
-address conversion routines
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <netns/ns.h>
-.Ft struct ns_addr
-.Fn ns_addr "char *cp"
-.Ft char *
-.Fn ns_ntoa "struct ns_addr ns"
-.Sh DESCRIPTION
-The routine
-.Fn ns_addr
-interprets character strings representing
-.Tn XNS
-addresses, returning binary information suitable
-for use in system calls.
-The routine
-.Fn ns_ntoa
-takes
-.Tn XNS
-addresses and returns
-.Tn ASCII
-strings representing the address in a
-notation in common use in the Xerox Development Environment:
-.Bd -filled -offset indent
-<network number>.<host number>.<port number>
-.Ed
-.Pp
-Trailing zero fields are suppressed, and each number is printed in hexadecimal,
-in a format suitable for input to
-.Fn ns_addr .
-Any fields lacking super-decimal digits will have a
-trailing
-.Ql H
-appended.
-.Pp
-Unfortunately, no universal standard exists for representing
-.Tn XNS
-addresses.
-An effort has been made to insure that
-.Fn ns_addr
-be compatible with most formats in common use.
-It will first separate an address into 1 to 3 fields using a single delimiter
-chosen from
-period
-.Ql \&. ,
-colon
-.Ql \&:
-or pound-sign
-.Ql \&# .
-Each field is then examined for byte separators (colon or period).
-If there are byte separators, each subfield separated is taken to be
-a small hexadecimal number, and the entirety is taken as a network-byte-ordered
-quantity to be zero extended in the high-network-order bytes.
-Next, the field is inspected for hyphens, in which case
-the field is assumed to be a number in decimal notation
-with hyphens separating the millenia.
-Next, the field is assumed to be a number:
-It is interpreted
-as hexadecimal if there is a leading
-.Ql 0x
-(as in C),
-a trailing
-.Ql H
-(as in Mesa), or there are any super-decimal digits present.
-It is interpreted as octal is there is a leading
-.Ql 0
-and there are no super-octal digits.
-Otherwise, it is converted as a decimal number.
-.Sh RETURN VALUES
-None. (See
-.Sx BUGS . )
-.Sh SEE ALSO
-.Xr hosts 5 ,
-.Xr networks 5
-.Sh HISTORY
-The
-.Fn ns_addr
-and
-.Fn ns_toa
-functions appeared in
-.Bx 4.3 .
-.Sh BUGS
-The string returned by
-.Fn ns_ntoa
-resides in a static memory area.
-The function
-.Fn ns_addr
-should diagnose improperly formed input, and there should be an unambiguous
-way to recognize this.
diff --git a/c/src/exec/libnetworking/libc/ns_addr.c b/c/src/exec/libnetworking/libc/ns_addr.c
deleted file mode 100644
index 18fabe91f1..0000000000
--- a/c/src/exec/libnetworking/libc/ns_addr.c
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
- * Copyright (c) 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * J.Q. Johnson.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)ns_addr.c 8.1 (Berkeley) 6/7/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <netns/ns.h>
-#include <stdio.h>
-#include <string.h>
-
-static struct ns_addr addr, zero_addr;
-
-static void Field(), cvtbase();
-
-struct ns_addr
-ns_addr(name)
- const char *name;
-{
- char separator;
- char *hostname, *socketname, *cp;
- char buf[50];
-
- (void)strncpy(buf, name, sizeof(buf) - 1);
- buf[sizeof(buf) - 1] = '\0';
-
- /*
- * First, figure out what he intends as a field separtor.
- * Despite the way this routine is written, the prefered
- * form 2-272.AA001234H.01777, i.e. XDE standard.
- * Great efforts are made to insure backward compatability.
- */
- if ((hostname = strchr(buf, '#')) != NULL)
- separator = '#';
- else {
- hostname = strchr(buf, '.');
- if ((cp = strchr(buf, ':')) &&
- ((hostname && cp < hostname) || (hostname == 0))) {
- hostname = cp;
- separator = ':';
- } else
- separator = '.';
- }
- if (hostname)
- *hostname++ = 0;
-
- addr = zero_addr;
- Field(buf, addr.x_net.c_net, 4);
- if (hostname == 0)
- return (addr); /* No separator means net only */
-
- socketname = strchr(hostname, separator);
- if (socketname) {
- *socketname++ = 0;
- Field(socketname, (u_char *)&addr.x_port, 2);
- }
-
- Field(hostname, addr.x_host.c_host, 6);
-
- return (addr);
-}
-
-static void
-Field(buf, out, len)
- char *buf;
- u_char *out;
- int len;
-{
- register char *bp = buf;
- int i, ibase, base16 = 0, base10 = 0, clen = 0;
- int hb[6], *hp;
- char *fmt;
-
- /*
- * first try 2-273#2-852-151-014#socket
- */
- if ((*buf != '-') &&
- (1 < (i = sscanf(buf, "%d-%d-%d-%d-%d",
- &hb[0], &hb[1], &hb[2], &hb[3], &hb[4])))) {
- cvtbase(1000L, 256, hb, i, out, len);
- return;
- }
- /*
- * try form 8E1#0.0.AA.0.5E.E6#socket
- */
- if (1 < (i = sscanf(buf,"%x.%x.%x.%x.%x.%x",
- &hb[0], &hb[1], &hb[2], &hb[3], &hb[4], &hb[5]))) {
- cvtbase(256L, 256, hb, i, out, len);
- return;
- }
- /*
- * try form 8E1#0:0:AA:0:5E:E6#socket
- */
- if (1 < (i = sscanf(buf,"%x:%x:%x:%x:%x:%x",
- &hb[0], &hb[1], &hb[2], &hb[3], &hb[4], &hb[5]))) {
- cvtbase(256L, 256, hb, i, out, len);
- return;
- }
- /*
- * This is REALLY stretching it but there was a
- * comma notation separting shorts -- definitely non standard
- */
- if (1 < (i = sscanf(buf,"%x,%x,%x",
- &hb[0], &hb[1], &hb[2]))) {
- hb[0] = htons(hb[0]); hb[1] = htons(hb[1]);
- hb[2] = htons(hb[2]);
- cvtbase(65536L, 256, hb, i, out, len);
- return;
- }
-
- /* Need to decide if base 10, 16 or 8 */
- while (*bp) switch (*bp++) {
-
- case '0': case '1': case '2': case '3': case '4': case '5':
- case '6': case '7': case '-':
- break;
-
- case '8': case '9':
- base10 = 1;
- break;
-
- case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
- case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
- base16 = 1;
- break;
-
- case 'x': case 'X':
- *--bp = '0';
- base16 = 1;
- break;
-
- case 'h': case 'H':
- base16 = 1;
- /* fall into */
-
- default:
- *--bp = 0; /* Ends Loop */
- }
- if (base16) {
- fmt = "%3x";
- ibase = 4096;
- } else if (base10 == 0 && *buf == '0') {
- fmt = "%3o";
- ibase = 512;
- } else {
- fmt = "%3d";
- ibase = 1000;
- }
-
- for (bp = buf; *bp++; ) clen++;
- if (clen == 0) clen++;
- if (clen > 18) clen = 18;
- i = ((clen - 1) / 3) + 1;
- bp = clen + buf - 3;
- hp = hb + i - 1;
-
- while (hp > hb) {
- (void)sscanf(bp, fmt, hp);
- bp[0] = 0;
- hp--;
- bp -= 3;
- }
- (void)sscanf(buf, fmt, hp);
- cvtbase((long)ibase, 256, hb, i, out, len);
-}
-
-static void
-cvtbase(oldbase,newbase,input,inlen,result,reslen)
- long oldbase;
- int newbase;
- int input[];
- int inlen;
- unsigned char result[];
- int reslen;
-{
- int d, e;
- long sum;
-
- e = 1;
- while (e > 0 && reslen > 0) {
- d = 0; e = 0; sum = 0;
- /* long division: input=input/newbase */
- while (d < inlen) {
- sum = sum*oldbase + (long) input[d];
- e += (sum > 0);
- input[d++] = sum / newbase;
- sum %= newbase;
- }
- result[--reslen] = sum; /* accumulate remainder */
- }
- for (d=0; d < reslen; d++)
- result[d] = 0;
-}
diff --git a/c/src/exec/libnetworking/libc/ns_name.c b/c/src/exec/libnetworking/libc/ns_name.c
deleted file mode 100644
index af10d2f062..0000000000
--- a/c/src/exec/libnetworking/libc/ns_name.c
+++ /dev/null
@@ -1,595 +0,0 @@
-/*
- * Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if !defined(__rtems__)
-#if !defined(LINT) && !defined(CODECENTER)
-static char rcsid[] = "$Id$";
-#endif /* not lint */
-#endif /* not rtems */
-
-#include <sys/types.h>
-
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-
-#include <errno.h>
-#include <resolv.h>
-#include <string.h>
-
-/* Data. */
-
-static char digits[] = "0123456789";
-
-/* Forward. */
-
-static int special(int);
-static int printable(int);
-static int dn_find(const u_char *, const u_char *,
- const u_char * const *,
- const u_char * const *);
-
-/* Public. */
-
-/*
- * ns_name_ntop(src, dst, dstsiz)
- * Convert an encoded domain name to printable ascii as per RFC1035.
- * return:
- * Number of bytes written to buffer, or -1 (with errno set)
- * notes:
- * The root is returned as "."
- * All other domains are returned in non absolute form
- */
-int
-ns_name_ntop(const u_char *src, char *dst, size_t dstsiz) {
- const u_char *cp;
- char *dn, *eom;
- u_char c;
- u_int n;
-
- cp = src;
- dn = dst;
- eom = dst + dstsiz;
-
- while ((n = *cp++) != 0) {
- if ((n & NS_CMPRSFLGS) != 0) {
- /* Some kind of compression pointer. */
- errno = EMSGSIZE;
- return (-1);
- }
- if (dn != dst) {
- if (dn >= eom) {
- errno = EMSGSIZE;
- return (-1);
- }
- *dn++ = '.';
- }
- if (dn + n >= eom) {
- errno = EMSGSIZE;
- return (-1);
- }
- for ((void)NULL; n > 0; n--) {
- c = *cp++;
- if (special(c)) {
- if (dn + 1 >= eom) {
- errno = EMSGSIZE;
- return (-1);
- }
- *dn++ = '\\';
- *dn++ = (char)c;
- } else if (!printable(c)) {
- if (dn + 3 >= eom) {
- errno = EMSGSIZE;
- return (-1);
- }
- *dn++ = '\\';
- *dn++ = digits[c / 100];
- *dn++ = digits[(c % 100) / 10];
- *dn++ = digits[c % 10];
- } else {
- if (dn >= eom) {
- errno = EMSGSIZE;
- return (-1);
- }
- *dn++ = (char)c;
- }
- }
- }
- if (dn == dst) {
- if (dn >= eom) {
- errno = EMSGSIZE;
- return (-1);
- }
- *dn++ = '.';
- }
- if (dn >= eom) {
- errno = EMSGSIZE;
- return (-1);
- }
- *dn++ = '\0';
- return (dn - dst);
-}
-
-/*
- * ns_name_pton(src, dst, dstsiz)
- * Convert a ascii string into an encoded domain name as per RFC1035.
- * return:
- * -1 if it fails
- * 1 if string was fully qualified
- * 0 is string was not fully qualified
- * notes:
- * Enforces label and domain length limits.
- */
-
-int
-ns_name_pton(const char *src, u_char *dst, size_t dstsiz) {
- u_char *label, *bp, *eom;
- int c, n, escaped;
- char *cp;
-
- escaped = 0;
- bp = dst;
- eom = dst + dstsiz;
- label = bp++;
-
- while ((c = *src++) != 0) {
- if (escaped) {
- if ((cp = strchr(digits, c)) != NULL) {
- n = (cp - digits) * 100;
- if ((c = *src++) == 0 ||
- (cp = strchr(digits, c)) == NULL) {
- errno = EMSGSIZE;
- return (-1);
- }
- n += (cp - digits) * 10;
- if ((c = *src++) == 0 ||
- (cp = strchr(digits, c)) == NULL) {
- errno = EMSGSIZE;
- return (-1);
- }
- n += (cp - digits);
- if (n > 255) {
- errno = EMSGSIZE;
- return (-1);
- }
- c = n;
- }
- escaped = 0;
- } else if (c == '\\') {
- escaped = 1;
- continue;
- } else if (c == '.') {
- c = (bp - label - 1);
- if ((c & NS_CMPRSFLGS) != 0) { /* Label too big. */
- errno = EMSGSIZE;
- return (-1);
- }
- if (label >= eom) {
- errno = EMSGSIZE;
- return (-1);
- }
- *label = c;
- /* Fully qualified ? */
- if (*src == '\0') {
- if (c != 0) {
- if (bp >= eom) {
- errno = EMSGSIZE;
- return (-1);
- }
- *bp++ = '\0';
- }
- if ((bp - dst) > MAXCDNAME) {
- errno = EMSGSIZE;
- return (-1);
- }
- return (1);
- }
- if (c == 0) {
- errno = EMSGSIZE;
- return (-1);
- }
- label = bp++;
- continue;
- }
- if (bp >= eom) {
- errno = EMSGSIZE;
- return (-1);
- }
- *bp++ = (u_char)c;
- }
- c = (bp - label - 1);
- if ((c & NS_CMPRSFLGS) != 0) { /* Label too big. */
- errno = EMSGSIZE;
- return (-1);
- }
- if (label >= eom) {
- errno = EMSGSIZE;
- return (-1);
- }
- *label = c;
- if (c != 0) {
- if (bp >= eom) {
- errno = EMSGSIZE;
- return (-1);
- }
- *bp++ = 0;
- }
- if ((bp - dst) > MAXCDNAME) { /* src too big */
- errno = EMSGSIZE;
- return (-1);
- }
- return (0);
-}
-
-/*
- * ns_name_unpack(msg, eom, src, dst, dstsiz)
- * Unpack a domain name from a message, source may be compressed.
- * return:
- * -1 if it fails, or consumed octets if it succeeds.
- */
-int
-ns_name_unpack(const u_char *msg, const u_char *eom, const u_char *src,
- u_char *dst, size_t dstsiz)
-{
- const u_char *srcp, *dstlim;
- u_char *dstp;
- int n, len, checked;
-
- len = -1;
- checked = 0;
- dstp = dst;
- srcp = src;
- dstlim = dst + dstsiz;
- if (srcp < msg || srcp >= eom) {
- errno = EMSGSIZE;
- return (-1);
- }
- /* Fetch next label in domain name. */
- while ((n = *srcp++) != 0) {
- /* Check for indirection. */
- switch (n & NS_CMPRSFLGS) {
- case 0:
- /* Limit checks. */
- if (dstp + n + 1 >= dstlim || srcp + n >= eom) {
- errno = EMSGSIZE;
- return (-1);
- }
- checked += n + 1;
- *dstp++ = n;
- memcpy(dstp, srcp, n);
- dstp += n;
- srcp += n;
- break;
-
- case NS_CMPRSFLGS:
- if (srcp >= eom) {
- errno = EMSGSIZE;
- return (-1);
- }
- if (len < 0)
- len = srcp - src + 1;
- srcp = msg + (((n & 0x3f) << 8) | (*srcp & 0xff));
- if (srcp < msg || srcp >= eom) { /* Out of range. */
- errno = EMSGSIZE;
- return (-1);
- }
- checked += 2;
- /*
- * Check for loops in the compressed name;
- * if we've looked at the whole message,
- * there must be a loop.
- */
- if (checked >= eom - msg) {
- errno = EMSGSIZE;
- return (-1);
- }
- break;
-
- default:
- errno = EMSGSIZE;
- return (-1); /* flag error */
- }
- }
- *dstp = '\0';
- if (len < 0)
- len = srcp - src;
- return (len);
-}
-
-/*
- * ns_name_pack(src, dst, dstsiz, dnptrs, lastdnptr)
- * Pack domain name 'domain' into 'comp_dn'.
- * return:
- * Size of the compressed name, or -1.
- * notes:
- * 'dnptrs' is an array of pointers to previous compressed names.
- * dnptrs[0] is a pointer to the beginning of the message. The array
- * ends with NULL.
- * 'lastdnptr' is a pointer to the end of the array pointed to
- * by 'dnptrs'.
- * Side effects:
- * The list of pointers in dnptrs is updated for labels inserted into
- * the message as we compress the name. If 'dnptr' is NULL, we don't
- * try to compress names. If 'lastdnptr' is NULL, we don't update the
- * list.
- */
-int
-ns_name_pack(const u_char *src, u_char *dst, int dstsiz,
- const u_char **dnptrs, const u_char **lastdnptr)
-{
- u_char *dstp;
- const u_char **cpp, **lpp, *eob, *msg;
- const u_char *srcp;
- int n, l;
-
- srcp = src;
- dstp = dst;
- eob = dstp + dstsiz;
- lpp = cpp = NULL;
- if (dnptrs != NULL) {
- if ((msg = *dnptrs++) != NULL) {
- for (cpp = dnptrs; *cpp != NULL; cpp++)
- (void)NULL;
- lpp = cpp; /* end of list to search */
- }
- } else
- msg = NULL;
-
- /* make sure the domain we are about to add is legal */
- l = 0;
- do {
- n = *srcp;
- if ((n & NS_CMPRSFLGS) != 0) {
- errno = EMSGSIZE;
- return (-1);
- }
- l += n + 1;
- if (l > MAXCDNAME) {
- errno = EMSGSIZE;
- return (-1);
- }
- srcp += n + 1;
- } while (n != 0);
-
- srcp = src;
- do {
- /* Look to see if we can use pointers. */
- n = *srcp;
- if (n != 0 && msg != NULL) {
- l = dn_find(srcp, msg, (const u_char * const *)dnptrs,
- (const u_char * const *)lpp);
- if (l >= 0) {
- if (dstp + 1 >= eob) {
- errno = EMSGSIZE;
- return (-1);
- }
- *dstp++ = (l >> 8) | NS_CMPRSFLGS;
- *dstp++ = l % 256;
- return (dstp - dst);
- }
- /* Not found, save it. */
- if (lastdnptr != NULL && cpp < lastdnptr - 1 &&
- (dstp - msg) < 0x4000) {
- *cpp++ = dstp;
- *cpp = NULL;
- }
- }
- /* copy label to buffer */
- if (n & NS_CMPRSFLGS) { /* Should not happen. */
- errno = EMSGSIZE;
- return (-1);
- }
- if (dstp + 1 + n >= eob) {
- errno = EMSGSIZE;
- return (-1);
- }
- memcpy(dstp, srcp, n + 1);
- srcp += n + 1;
- dstp += n + 1;
- } while (n != 0);
-
- if (dstp > eob) {
- if (msg != NULL)
- *lpp = NULL;
- errno = EMSGSIZE;
- return (-1);
- }
- return (dstp - dst);
-}
-
-/*
- * ns_name_uncompress(msg, eom, src, dst, dstsiz)
- * Expand compressed domain name to presentation format.
- * return:
- * Number of bytes read out of `src', or -1 (with errno set).
- * note:
- * Root domain returns as "." not "".
- */
-int
-ns_name_uncompress(const u_char *msg, const u_char *eom, const u_char *src,
- char *dst, size_t dstsiz)
-{
- u_char tmp[NS_MAXCDNAME];
- int n;
-
- if ((n = ns_name_unpack(msg, eom, src, tmp, sizeof tmp)) == -1)
- return (-1);
- if (ns_name_ntop(tmp, dst, dstsiz) == -1)
- return (-1);
- return (n);
-}
-
-/*
- * ns_name_compress(src, dst, dstsiz, dnptrs, lastdnptr)
- * Compress a domain name into wire format, using compression pointers.
- * return:
- * Number of bytes consumed in `dst' or -1 (with errno set).
- * notes:
- * 'dnptrs' is an array of pointers to previous compressed names.
- * dnptrs[0] is a pointer to the beginning of the message.
- * The list ends with NULL. 'lastdnptr' is a pointer to the end of the
- * array pointed to by 'dnptrs'. Side effect is to update the list of
- * pointers for labels inserted into the message as we compress the name.
- * If 'dnptr' is NULL, we don't try to compress names. If 'lastdnptr'
- * is NULL, we don't update the list.
- */
-int
-ns_name_compress(const char *src, u_char *dst, size_t dstsiz,
- const u_char **dnptrs, const u_char **lastdnptr)
-{
- u_char tmp[NS_MAXCDNAME];
-
- if (ns_name_pton(src, tmp, sizeof tmp) == -1)
- return (-1);
- return (ns_name_pack(tmp, dst, dstsiz, dnptrs, lastdnptr));
-}
-
-/*
- * ns_name_skip(ptrptr, eom)
- * Advance *ptrptr to skip over the compressed name it points at.
- * return:
- * 0 on success, -1 (with errno set) on failure.
- */
-int
-ns_name_skip(const u_char **ptrptr, const u_char *eom) {
- const u_char *cp;
- u_int n;
-
- cp = *ptrptr;
- while (cp < eom && (n = *cp++) != 0) {
- /* Check for indirection. */
- switch (n & NS_CMPRSFLGS) {
- case 0: /* normal case, n == len */
- cp += n;
- continue;
- case NS_CMPRSFLGS: /* indirection */
- cp++;
- break;
- default: /* illegal type */
- errno = EMSGSIZE;
- return (-1);
- }
- break;
- }
- if (cp > eom) {
- errno = EMSGSIZE;
- return (-1);
- }
- *ptrptr = cp;
- return (0);
-}
-
-/* Private. */
-
-/*
- * special(ch)
- * Thinking in noninternationalized USASCII (per the DNS spec),
- * is this characted special ("in need of quoting") ?
- * return:
- * boolean.
- */
-static int
-special(int ch) {
- switch (ch) {
- case 0x22: /* '"' */
- case 0x2E: /* '.' */
- case 0x3B: /* ';' */
- case 0x5C: /* '\\' */
- /* Special modifiers in zone files. */
- case 0x40: /* '@' */
- case 0x24: /* '$' */
- return (1);
- default:
- return (0);
- }
-}
-
-/*
- * printable(ch)
- * Thinking in noninternationalized USASCII (per the DNS spec),
- * is this character visible and not a space when printed ?
- * return:
- * boolean.
- */
-static int
-printable(int ch) {
- return (ch > 0x20 && ch < 0x7f);
-}
-
-/*
- * Thinking in noninternationalized USASCII (per the DNS spec),
- * convert this character to lower case if it's upper case.
- */
-static int
-mklower(int ch) {
- if (ch >= 0x41 && ch <= 0x5A)
- return (ch + 0x20);
- return (ch);
-}
-
-/*
- * dn_find(domain, msg, dnptrs, lastdnptr)
- * Search for the counted-label name in an array of compressed names.
- * return:
- * offset from msg if found, or -1.
- * notes:
- * dnptrs is the pointer to the first name on the list,
- * not the pointer to the start of the message.
- */
-static int
-dn_find(const u_char *domain, const u_char *msg,
- const u_char * const *dnptrs,
- const u_char * const *lastdnptr)
-{
- const u_char *dn, *cp, *sp;
- const u_char * const *cpp;
- u_int n;
-
- for (cpp = dnptrs; cpp < lastdnptr; cpp++) {
- dn = domain;
- sp = cp = *cpp;
- while ((n = *cp++) != 0) {
- /*
- * check for indirection
- */
- switch (n & NS_CMPRSFLGS) {
- case 0: /* normal case, n == len */
- if (n != *dn++)
- goto next;
- for ((void)NULL; n > 0; n--)
- if (mklower(*dn++) != mklower(*cp++))
- goto next;
- /* Is next root for both ? */
- if (*dn == '\0' && *cp == '\0')
- return (sp - msg);
- if (*dn)
- continue;
- goto next;
-
- case NS_CMPRSFLGS: /* indirection */
- cp = msg + (((n & 0x3f) << 8) | *cp);
- break;
-
- default: /* illegal type */
- errno = EMSGSIZE;
- return (-1);
- }
- }
- next: ;
- }
- errno = ENOENT;
- return (-1);
-}
diff --git a/c/src/exec/libnetworking/libc/ns_netint.c b/c/src/exec/libnetworking/libc/ns_netint.c
deleted file mode 100644
index 3c09da8f8c..0000000000
--- a/c/src/exec/libnetworking/libc/ns_netint.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if !defined(__rtems__)
-#if !defined(LINT) && !defined(CODECENTER)
-static char rcsid[] = "$Id$";
-#endif /* not lint */
-#endif /* not rtems */
-
-/* Import. */
-
-#include <sys/types.h>
-#include <sys/socket.h>
-
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-
-u_int
-ns_get16(const u_char *src) {
- u_int dst;
-
- NS_GET16(dst, src);
- return (dst);
-}
-
-u_long
-ns_get32(const u_char *src) {
- u_long dst;
-
- NS_GET32(dst, src);
- return (dst);
-}
-
-void
-ns_put16(u_int src, u_char *dst) {
- NS_PUT16(src, dst);
-}
-
-void
-ns_put32(u_long src, u_char *dst) {
- NS_PUT32(src, dst);
-}
diff --git a/c/src/exec/libnetworking/libc/ns_ntoa.c b/c/src/exec/libnetworking/libc/ns_ntoa.c
deleted file mode 100644
index 9d0be2e1dc..0000000000
--- a/c/src/exec/libnetworking/libc/ns_ntoa.c
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (c) 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)ns_ntoa.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <netns/ns.h>
-#include <stdio.h>
-
-char *
-ns_ntoa(addr)
- struct ns_addr addr;
-{
- static char obuf[40];
- union { union ns_net net_e; u_long long_e; } net;
- u_short port = htons(addr.x_port);
- register char *cp;
- char *cp2;
- register u_char *up = addr.x_host.c_host;
- u_char *uplim = up + 6;
- static char *spectHex();
-
- net.net_e = addr.x_net;
- sprintf(obuf, "%lx", (u_long)ntohl(net.long_e));
- cp = spectHex(obuf);
- cp2 = cp + 1;
- while (*up==0 && up < uplim) up++;
- if (up == uplim) {
- if (port) {
- sprintf(cp, ".0");
- cp += 2;
- }
- } else {
- sprintf(cp, ".%x", *up++);
- while (up < uplim) {
- while (*cp) cp++;
- sprintf(cp, "%02x", *up++);
- }
- cp = spectHex(cp2);
- }
- if (port) {
- sprintf(cp, ".%x", port);
- spectHex(cp + 1);
- }
- return (obuf);
-}
-
-static char *
-spectHex(p0)
- char *p0;
-{
- int ok = 0;
- int nonzero = 0;
- register char *p = p0;
- for (; *p; p++) switch (*p) {
-
- case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
- *p += ('A' - 'a');
- /* fall into . . . */
- case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
- ok = 1;
- case '1': case '2': case '3': case '4': case '5':
- case '6': case '7': case '8': case '9':
- nonzero = 1;
- }
- if (nonzero && !ok) { *p++ = 'H'; *p = 0; }
- return (p);
-}
diff --git a/c/src/exec/libnetworking/libc/ns_parse.c b/c/src/exec/libnetworking/libc/ns_parse.c
deleted file mode 100644
index cc1f070156..0000000000
--- a/c/src/exec/libnetworking/libc/ns_parse.c
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if !defined(__rtems__)
-#if !defined(LINT) && !defined(CODECENTER)
-static char rcsid[] = "$Id$";
-#endif /* not lint */
-#endif /* not rtems */
-
-#include <sys/types.h>
-
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-
-#include <errno.h>
-#include <resolv.h>
-#include <string.h>
-
-/* These need to be in the same order as the nres.h:ns_flag enum. */
-struct _ns_flagdata _ns_flagdata[16] = {
- { 0x8000, 15 }, /* qr. */
- { 0x7800, 11 }, /* opcode. */
- { 0x0400, 10 }, /* aa. */
- { 0x0200, 9 }, /* tc. */
- { 0x0100, 8 }, /* rd. */
- { 0x0080, 7 }, /* ra. */
- { 0x0040, 6 }, /* z. */
- { 0x0020, 5 }, /* ad. */
- { 0x0010, 4 }, /* cd. */
- { 0x000f, 0 }, /* rcode. */
- { 0x0000, 0 }, /* expansion (1/6). */
- { 0x0000, 0 }, /* expansion (2/6). */
- { 0x0000, 0 }, /* expansion (3/6). */
- { 0x0000, 0 }, /* expansion (4/6). */
- { 0x0000, 0 }, /* expansion (5/6). */
- { 0x0000, 0 }, /* expansion (6/6). */
-};
-
-static int
-skiprr(const u_char *ptr, const u_char *eom, ns_sect section, int count) {
- const u_char *optr = ptr;
-
- for ((void)NULL; count > 0; count--) {
- int b, rdlength;
-
- b = dn_skipname(ptr, eom);
- if (b < 0)
- goto emsgsize;
- ptr += b/*Name*/ + NS_INT16SZ/*Type*/ + NS_INT16SZ/*Class*/;
- if (section != ns_s_qd) {
- if (ptr + NS_INT32SZ > eom)
- goto emsgsize;
- ptr += NS_INT32SZ/*TTL*/;
- if (ptr + NS_INT16SZ > eom)
- goto emsgsize;
- NS_GET16(rdlength, ptr);
- ptr += rdlength/*RData*/;
- }
- }
- if (ptr > eom)
- goto emsgsize;
- return (ptr - optr);
- emsgsize:
- errno = EMSGSIZE;
- return (-1);
-}
-
-int
-ns_initparse(const u_char *msg, int msglen, ns_msg *handle) {
- const u_char *eom = msg + msglen;
- int i;
-
- memset(handle, 0x5e, sizeof *handle);
- handle->_msg = msg;
- handle->_eom = eom;
- if (msg + NS_INT16SZ > eom)
- goto emsgsize;
- NS_GET16(handle->_id, msg);
- if (msg + NS_INT16SZ > eom)
- goto emsgsize;
- NS_GET16(handle->_flags, msg);
- for (i = 0; i < ns_s_max; i++) {
- if (msg + NS_INT16SZ > eom)
- goto emsgsize;
- NS_GET16(handle->_counts[i], msg);
- }
- for (i = 0; i < ns_s_max; i++)
- if (handle->_counts[i] == 0)
- handle->_sections[i] = NULL;
- else {
- int b = skiprr(msg, eom, (ns_sect)i,
- handle->_counts[i]);
-
- if (b < 0)
- return (-1);
- handle->_sections[i] = msg;
- msg += b;
- }
- if (msg != eom)
- goto emsgsize;
- handle->_sect = ns_s_max;
- handle->_rrnum = -1;
- handle->_ptr = NULL;
- return (0);
- emsgsize:
- errno = EMSGSIZE;
- return (-1);
-}
-
-int
-ns_parserr(ns_msg *handle, ns_sect section, int rrnum, ns_rr *rr) {
- int b;
-
- /* Make section right. */
- if (section < 0 || section >= ns_s_max)
- goto enodev;
- if ((int)section != (int)handle->_sect) {
- handle->_sect = section;
- handle->_rrnum = 0;
- handle->_ptr = handle->_sections[(int)section];
- }
-
- /* Make rrnum right. */
- if (rrnum == -1)
- rrnum = handle->_rrnum;
- if (rrnum < 0 || rrnum >= handle->_counts[(int)section])
- goto enodev;
- if (rrnum < handle->_rrnum) {
- handle->_rrnum = 0;
- handle->_ptr = handle->_sections[(int)section];
- }
-
- b = skiprr(handle->_msg, handle->_eom, section,
- rrnum - handle->_rrnum);
- if (b < 0)
- return (-1);
- handle->_ptr += b;
- handle->_rrnum = rrnum;
-
- /* Do the parse. */
- b = dn_expand(handle->_msg, handle->_eom,
- handle->_ptr, rr->name, NS_MAXDNAME);
- if (b < 0)
- return (-1);
- handle->_ptr += b;
- if (handle->_ptr + NS_INT16SZ > handle->_eom)
- goto emsgsize;
- NS_GET16(rr->type, handle->_ptr);
- if (handle->_ptr + NS_INT16SZ > handle->_eom)
- goto emsgsize;
- NS_GET16(rr->class, handle->_ptr);
- if (section == ns_s_qd) {
- rr->ttl = 0;
- rr->rdlength = 0;
- rr->rdata = NULL;
- } else {
- if (handle->_ptr + NS_INT32SZ > handle->_eom)
- goto emsgsize;
- NS_GET32(rr->ttl, handle->_ptr);
- if (handle->_ptr + NS_INT16SZ > handle->_eom)
- goto emsgsize;
- NS_GET16(rr->rdlength, handle->_ptr);
- if (handle->_ptr + rr->rdlength > handle->_eom)
- goto emsgsize;
- rr->rdata = handle->_ptr;
- handle->_ptr += rr->rdlength;
- }
- handle->_rrnum++;
-
- /* All done. */
- return (0);
- enodev:
- errno = ENODEV;
- return (-1);
- emsgsize:
- errno = EMSGSIZE;
- return (-1);
-}
diff --git a/c/src/exec/libnetworking/libc/ns_print.c b/c/src/exec/libnetworking/libc/ns_print.c
deleted file mode 100644
index f7d7d16c64..0000000000
--- a/c/src/exec/libnetworking/libc/ns_print.c
+++ /dev/null
@@ -1,745 +0,0 @@
-/*
- * Copyright (c) 1996, 1998 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if !defined(__rtems__)
-#if !defined(LINT) && !defined(CODECENTER)
-static char rcsid[] = "$Id$";
-#endif /* not lint */
-#endif /* not rtems */
-
-/* Import. */
-
-#include <sys/types.h>
-#include <sys/socket.h>
-
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-#include <arpa/inet.h>
-
-#include <assert.h>
-#include <errno.h>
-#include <resolv.h>
-#include <string.h>
-#include <ctype.h>
-
-#define SPRINTF(x) ((size_t)sprintf x)
-
-/* Forward. */
-
-static size_t prune_origin(const char *name, const char *origin);
-static int charstr(const u_char *rdata, const u_char *edata,
- char **buf, size_t *buflen);
-static int addname(const u_char *msg, size_t msglen,
- const u_char **p, const char *origin,
- char **buf, size_t *buflen);
-static void addlen(size_t len, char **buf, size_t *buflen);
-static int addstr(const char *src, size_t len,
- char **buf, size_t *buflen);
-static int addtab(size_t len, size_t target, int spaced,
- char **buf, size_t *buflen);
-
-/* Macros. */
-
-#define T(x) \
- do { \
- if ((x) < 0) \
- return (-1); \
- } while (0)
-
-/* Public. */
-
-/*
- * int
- * ns_sprintrr(handle, rr, name_ctx, origin, buf, buflen)
- * Convert an RR to presentation format.
- * return:
- * Number of characters written to buf, or -1 (check errno).
- */
-int
-ns_sprintrr(const ns_msg *handle, const ns_rr *rr,
- const char *name_ctx, const char *origin,
- char *buf, size_t buflen)
-{
- int n;
-
- n = ns_sprintrrf(ns_msg_base(*handle), ns_msg_size(*handle),
- ns_rr_name(*rr), ns_rr_class(*rr), ns_rr_type(*rr),
- ns_rr_ttl(*rr), ns_rr_rdata(*rr), ns_rr_rdlen(*rr),
- name_ctx, origin, buf, buflen);
- return (n);
-}
-
-/*
- * int
- * ns_sprintrrf(msg, msglen, name, class, type, ttl, rdata, rdlen,
- * name_ctx, origin, buf, buflen)
- * Convert the fields of an RR into presentation format.
- * return:
- * Number of characters written to buf, or -1 (check errno).
- */
-int
-ns_sprintrrf(const u_char *msg, size_t msglen,
- const char *name, ns_class class, ns_type type,
- u_long ttl, const u_char *rdata, size_t rdlen,
- const char *name_ctx, const char *origin,
- char *buf, size_t buflen)
-{
- const char *obuf = buf;
- const u_char *edata = rdata + rdlen;
- int spaced = 0;
-
- const char *comment;
- char tmp[100];
- int len, x;
-
- /*
- * Owner.
- */
- if (name_ctx != NULL && strcasecmp(name_ctx, name) == 0) {
- T(addstr("\t\t\t", 3, &buf, &buflen));
- } else {
- len = prune_origin(name, origin);
- if (len == 0) {
- T(addstr("@\t\t\t", 4, &buf, &buflen));
- } else {
- T(addstr(name, len, &buf, &buflen));
- /* Origin not used and no trailing dot? */
- if ((!origin || !origin[0] || name[len] == '\0') &&
- name[len - 1] != '.') {
- T(addstr(".", 1, &buf, &buflen));
- len++;
- }
- T(spaced = addtab(len, 24, spaced, &buf, &buflen));
- }
- }
-
- /*
- * TTL, Class, Type.
- */
- T(x = ns_format_ttl(ttl, buf, buflen));
- addlen(x, &buf, &buflen);
- len = SPRINTF((tmp, " %s %s", p_class(class), p_type(type)));
- T(addstr(tmp, len, &buf, &buflen));
- T(spaced = addtab(x + len, 16, spaced, &buf, &buflen));
-
- /*
- * RData.
- */
- switch (type) {
- case ns_t_a:
- if (rdlen != NS_INADDRSZ)
- goto formerr;
- (void) inet_ntop(AF_INET, rdata, buf, buflen);
- addlen(strlen(buf), &buf, &buflen);
- break;
-
- case ns_t_cname:
- case ns_t_mb:
- case ns_t_mg:
- case ns_t_mr:
- case ns_t_ns:
- case ns_t_ptr:
- T(addname(msg, msglen, &rdata, origin, &buf, &buflen));
- break;
-
- case ns_t_hinfo:
- case ns_t_isdn:
- /* First word. */
- T(len = charstr(rdata, edata, &buf, &buflen));
- if (len == 0)
- goto formerr;
- rdata += len;
- T(addstr(" ", 1, &buf, &buflen));
-
- /* Second word. */
- T(len = charstr(rdata, edata, &buf, &buflen));
- if (len == 0)
- goto formerr;
- rdata += len;
- break;
-
- case ns_t_soa: {
- u_long t;
-
- /* Server name. */
- T(addname(msg, msglen, &rdata, origin, &buf, &buflen));
- T(addstr(" ", 1, &buf, &buflen));
-
- /* Administrator name. */
- T(addname(msg, msglen, &rdata, origin, &buf, &buflen));
- T(addstr(" (\n", 3, &buf, &buflen));
- spaced = 0;
-
- if ((edata - rdata) != 5*NS_INT32SZ)
- goto formerr;
-
- /* Serial number. */
- t = ns_get32(rdata); rdata += NS_INT32SZ;
- T(addstr("\t\t\t\t\t", 5, &buf, &buflen));
- len = SPRINTF((tmp, "%lu", t));
- T(addstr(tmp, len, &buf, &buflen));
- T(spaced = addtab(len, 16, spaced, &buf, &buflen));
- T(addstr("; serial\n", 9, &buf, &buflen));
- spaced = 0;
-
- /* Refresh interval. */
- t = ns_get32(rdata); rdata += NS_INT32SZ;
- T(addstr("\t\t\t\t\t", 5, &buf, &buflen));
- T(len = ns_format_ttl(t, buf, buflen));
- addlen(len, &buf, &buflen);
- T(spaced = addtab(len, 16, spaced, &buf, &buflen));
- T(addstr("; refresh\n", 10, &buf, &buflen));
- spaced = 0;
-
- /* Retry interval. */
- t = ns_get32(rdata); rdata += NS_INT32SZ;
- T(addstr("\t\t\t\t\t", 5, &buf, &buflen));
- T(len = ns_format_ttl(t, buf, buflen));
- addlen(len, &buf, &buflen);
- T(spaced = addtab(len, 16, spaced, &buf, &buflen));
- T(addstr("; retry\n", 8, &buf, &buflen));
- spaced = 0;
-
- /* Expiry. */
- t = ns_get32(rdata); rdata += NS_INT32SZ;
- T(addstr("\t\t\t\t\t", 5, &buf, &buflen));
- T(len = ns_format_ttl(t, buf, buflen));
- addlen(len, &buf, &buflen);
- T(spaced = addtab(len, 16, spaced, &buf, &buflen));
- T(addstr("; expiry\n", 9, &buf, &buflen));
- spaced = 0;
-
- /* Minimum TTL. */
- t = ns_get32(rdata); rdata += NS_INT32SZ;
- T(addstr("\t\t\t\t\t", 5, &buf, &buflen));
- T(len = ns_format_ttl(t, buf, buflen));
- addlen(len, &buf, &buflen);
- T(addstr(" )", 2, &buf, &buflen));
- T(spaced = addtab(len, 16, spaced, &buf, &buflen));
- T(addstr("; minimum\n", 10, &buf, &buflen));
-
- break;
- }
-
- case ns_t_mx:
- case ns_t_afsdb:
- case ns_t_rt: {
- u_int t;
-
- if (rdlen < NS_INT16SZ)
- goto formerr;
-
- /* Priority. */
- t = ns_get16(rdata);
- rdata += NS_INT16SZ;
- len = SPRINTF((tmp, "%u ", t));
- T(addstr(tmp, len, &buf, &buflen));
-
- /* Target. */
- T(addname(msg, msglen, &rdata, origin, &buf, &buflen));
-
- break;
- }
-
- case ns_t_px: {
- u_int t;
-
- if (rdlen < NS_INT16SZ)
- goto formerr;
-
- /* Priority. */
- t = ns_get16(rdata);
- rdata += NS_INT16SZ;
- len = SPRINTF((tmp, "%u ", t));
- T(addstr(tmp, len, &buf, &buflen));
-
- /* Name1. */
- T(addname(msg, msglen, &rdata, origin, &buf, &buflen));
- T(addstr(" ", 1, &buf, &buflen));
-
- /* Name2. */
- T(addname(msg, msglen, &rdata, origin, &buf, &buflen));
-
- break;
- }
-
- case ns_t_x25:
- T(len = charstr(rdata, edata, &buf, &buflen));
- if (len == 0)
- goto formerr;
- rdata += len;
- break;
-
- case ns_t_txt:
- while (rdata < edata) {
- T(len = charstr(rdata, edata, &buf, &buflen));
- if (len == 0)
- goto formerr;
- rdata += len;
- if (rdata < edata)
- T(addstr(" ", 1, &buf, &buflen));
- }
- break;
-
- case ns_t_nsap: {
- char t[255*3];
-
- (void) inet_nsap_ntoa(rdlen, rdata, t);
- T(addstr(t, strlen(t), &buf, &buflen));
- break;
- }
-
- case ns_t_aaaa:
- if (rdlen != NS_IN6ADDRSZ)
- goto formerr;
- (void) inet_ntop(AF_INET6, rdata, buf, buflen);
- addlen(strlen(buf), &buf, &buflen);
- break;
-
- case ns_t_loc: {
- char t[255];
-
- /* XXX protocol format checking? */
- (void) loc_ntoa(rdata, t);
- T(addstr(t, strlen(t), &buf, &buflen));
- break;
- }
-
- case ns_t_naptr: {
- u_int order, preference;
- char t[50];
-
- if (rdlen < 2*NS_INT16SZ)
- goto formerr;
-
- /* Order, Precedence. */
- order = ns_get16(rdata); rdata += NS_INT16SZ;
- preference = ns_get16(rdata); rdata += NS_INT16SZ;
- len = SPRINTF((t, "%u %u ", order, preference));
- T(addstr(t, len, &buf, &buflen));
-
- /* Flags. */
- T(len = charstr(rdata, edata, &buf, &buflen));
- if (len == 0)
- goto formerr;
- rdata += len;
- T(addstr(" ", 1, &buf, &buflen));
-
- /* Service. */
- T(len = charstr(rdata, edata, &buf, &buflen));
- if (len == 0)
- goto formerr;
- rdata += len;
- T(addstr(" ", 1, &buf, &buflen));
-
- /* Regexp. */
- T(len = charstr(rdata, edata, &buf, &buflen));
- if (len < 0)
- return (-1);
- if (len == 0)
- goto formerr;
- rdata += len;
- T(addstr(" ", 1, &buf, &buflen));
-
- /* Server. */
- T(addname(msg, msglen, &rdata, origin, &buf, &buflen));
- break;
- }
-
- case ns_t_srv: {
- u_int priority, weight, port;
- char t[50];
-
- if (rdlen < NS_INT16SZ*3)
- goto formerr;
-
- /* Priority, Weight, Port. */
- priority = ns_get16(rdata); rdata += NS_INT16SZ;
- weight = ns_get16(rdata); rdata += NS_INT16SZ;
- port = ns_get16(rdata); rdata += NS_INT16SZ;
- len = SPRINTF((t, "%u %u %u ", priority, weight, port));
- T(addstr(t, len, &buf, &buflen));
-
- /* Server. */
- T(addname(msg, msglen, &rdata, origin, &buf, &buflen));
- break;
- }
-
- case ns_t_minfo:
- case ns_t_rp:
- /* Name1. */
- T(addname(msg, msglen, &rdata, origin, &buf, &buflen));
- T(addstr(" ", 1, &buf, &buflen));
-
- /* Name2. */
- T(addname(msg, msglen, &rdata, origin, &buf, &buflen));
-
- break;
-
- case ns_t_wks: {
- int n, lcnt;
-
- if (rdlen < NS_INT32SZ + 1)
- goto formerr;
-
- /* Address. */
- (void) inet_ntop(AF_INET, rdata, buf, buflen);
- addlen(strlen(buf), &buf, &buflen);
- rdata += NS_INADDRSZ;
-
- /* Protocol. */
- len = SPRINTF((tmp, " %u ( ", *rdata));
- T(addstr(tmp, len, &buf, &buflen));
- rdata += NS_INT8SZ;
-
- /* Bit map. */
- n = 0;
- lcnt = 0;
- while (rdata < edata) {
- u_int c = *rdata++;
- do {
- if (c & 0200) {
- if (lcnt == 0) {
- T(addstr("\n\t\t\t\t", 5,
- &buf, &buflen));
- lcnt = 10;
- spaced = 0;
- }
- len = SPRINTF((tmp, "%d ", n));
- T(addstr(tmp, len, &buf, &buflen));
- lcnt--;
- }
- c <<= 1;
- } while (++n & 07);
- }
- T(addstr(")", 1, &buf, &buflen));
-
- break;
- }
-
- case ns_t_key: {
- char base64_key[NS_MD5RSA_MAX_BASE64];
- u_int keyflags, protocol, algorithm;
- const char *leader;
- int n;
-
- if (rdlen < NS_INT16SZ + NS_INT8SZ + NS_INT8SZ)
- goto formerr;
-
- /* Key flags, Protocol, Algorithm. */
- keyflags = ns_get16(rdata); rdata += NS_INT16SZ;
- protocol = *rdata++;
- algorithm = *rdata++;
- len = SPRINTF((tmp, "0x%04x %u %u",
- keyflags, protocol, algorithm));
- T(addstr(tmp, len, &buf, &buflen));
-
- /* Public key data. */
- len = b64_ntop(rdata, edata - rdata,
- base64_key, sizeof base64_key);
- if (len < 0)
- goto formerr;
- if (len > 15) {
- T(addstr(" (", 2, &buf, &buflen));
- leader = "\n\t\t";
- spaced = 0;
- } else
- leader = " ";
- for (n = 0; n < len; n += 48) {
- T(addstr(leader, strlen(leader), &buf, &buflen));
- T(addstr(base64_key + n, MIN(len - n, 48),
- &buf, &buflen));
- }
- if (len > 15)
- T(addstr(" )", 2, &buf, &buflen));
-
- break;
- }
-
- case ns_t_sig: {
- char base64_key[NS_MD5RSA_MAX_BASE64];
- u_int type, algorithm, labels, footprint;
- const char *leader;
- u_long t;
- int n;
-
- if (rdlen < 22)
- goto formerr;
-
- /* Type covered, Algorithm, Label count, Original TTL. */
- type = ns_get16(rdata); rdata += NS_INT16SZ;
- algorithm = *rdata++;
- labels = *rdata++;
- t = ns_get32(rdata); rdata += NS_INT32SZ;
- len = SPRINTF((tmp, " %s %d %lu ",
- p_type(type), algorithm, t));
- T(addstr(tmp, len, &buf, &buflen));
- if (labels != (u_int)dn_count_labels(name))
- goto formerr;
-
- /* Signature expiry. */
- t = ns_get32(rdata); rdata += NS_INT32SZ;
- len = SPRINTF((tmp, "%s ", p_secstodate(t)));
- T(addstr(tmp, len, &buf, &buflen));
-
- /* Time signed. */
- t = ns_get32(rdata); rdata += NS_INT32SZ;
- len = SPRINTF((tmp, "%s ", p_secstodate(t)));
- T(addstr(tmp, len, &buf, &buflen));
-
- /* Signature Footprint. */
- footprint = ns_get16(rdata); rdata += NS_INT16SZ;
- len = SPRINTF((tmp, "%u ", footprint));
- T(addstr(tmp, len, &buf, &buflen));
-
- /* Signer's name. */
- T(addname(msg, msglen, &rdata, origin, &buf, &buflen));
-
- /* Signature. */
- len = b64_ntop(rdata, edata - rdata,
- base64_key, sizeof base64_key);
- if (len > 15) {
- T(addstr(" (", 2, &buf, &buflen));
- leader = "\n\t\t";
- spaced = 0;
- } else
- leader = " ";
- if (len < 0)
- goto formerr;
- for (n = 0; n < len; n += 48) {
- T(addstr(leader, strlen(leader), &buf, &buflen));
- T(addstr(base64_key + n, MIN(len - n, 48),
- &buf, &buflen));
- }
- if (len > 15)
- T(addstr(" )", 2, &buf, &buflen));
-
- break;
- }
-
- case ns_t_nxt: {
- int n, c;
-
- /* Next domain name. */
- T(addname(msg, msglen, &rdata, origin, &buf, &buflen));
-
- /* Type bit map. */
- n = edata - rdata;
- for (c = 0; c < n*8; c++)
- if (NS_NXT_BIT_ISSET(c, rdata)) {
- len = SPRINTF((tmp, " %s", p_type(c)));
- T(addstr(tmp, len, &buf, &buflen));
- }
- break;
- }
-
- default:
- comment = "unknown RR type";
- goto hexify;
- }
- return (buf - obuf);
- formerr:
- comment = "RR format error";
- hexify: {
- int n, m;
- char *p;
-
- len = SPRINTF((tmp, "\\#(\t\t; %s", comment));
- T(addstr(tmp, len, &buf, &buflen));
- while (rdata < edata) {
- p = tmp;
- p += SPRINTF((p, "\n\t"));
- spaced = 0;
- n = MIN(16, edata - rdata);
- for (m = 0; m < n; m++)
- p += SPRINTF((p, "%02x ", rdata[m]));
- T(addstr(tmp, p - tmp, &buf, &buflen));
- if (n < 16) {
- T(addstr(")", 1, &buf, &buflen));
- T(addtab(p - tmp + 1, 48, spaced, &buf, &buflen));
- }
- p = tmp;
- p += SPRINTF((p, "; "));
- for (m = 0; m < n; m++)
- *p++ = (isascii(rdata[m]) && isprint(rdata[m]))
- ? rdata[m]
- : '.';
- T(addstr(tmp, p - tmp, &buf, &buflen));
- rdata += n;
- }
- return (buf - obuf);
- }
-}
-
-/* Private. */
-
-/*
- * size_t
- * prune_origin(name, origin)
- * Find out if the name is at or under the current origin.
- * return:
- * Number of characters in name before start of origin,
- * or length of name if origin does not match.
- * notes:
- * This function should share code with samedomain().
- */
-static size_t
-prune_origin(const char *name, const char *origin) {
- const char *oname = name;
-
- while (*name != '\0') {
- if (origin != NULL && strcasecmp(name, origin) == 0)
- return (name - oname - (name > oname));
- while (*name != '\0') {
- if (*name == '\\') {
- name++;
- /* XXX need to handle \nnn form. */
- if (*name == '\0')
- break;
- } else if (*name == '.') {
- name++;
- break;
- }
- name++;
- }
- }
- return (name - oname);
-}
-
-/*
- * int
- * charstr(rdata, edata, buf, buflen)
- * Format a <character-string> into the presentation buffer.
- * return:
- * Number of rdata octets consumed
- * 0 for protocol format error
- * -1 for output buffer error
- * side effects:
- * buffer is advanced on success.
- */
-static int
-charstr(const u_char *rdata, const u_char *edata, char **buf, size_t *buflen) {
- const u_char *odata = rdata;
- size_t save_buflen = *buflen;
- char *save_buf = *buf;
-
- if (addstr("\"", 1, buf, buflen) < 0)
- goto enospc;
- if (rdata < edata) {
- int n = *rdata;
-
- if (rdata + 1 + n <= edata) {
- rdata++;
- while (n-- > 0) {
- if (strchr("\n\"\\", *rdata) != NULL)
- if (addstr("\\", 1, buf, buflen) < 0)
- goto enospc;
- if (addstr((const char *)rdata, 1,
- buf, buflen) < 0)
- goto enospc;
- rdata++;
- }
- }
- }
- if (addstr("\"", 1, buf, buflen) < 0)
- goto enospc;
- return (rdata - odata);
- enospc:
- errno = ENOSPC;
- *buf = save_buf;
- *buflen = save_buflen;
- return (-1);
-}
-
-static int
-addname(const u_char *msg, size_t msglen,
- const u_char **pp, const char *origin,
- char **buf, size_t *buflen)
-{
- size_t newlen, save_buflen = *buflen;
- char *save_buf = *buf;
- int n;
-
- n = dn_expand(msg, msg + msglen, *pp, *buf, *buflen);
- if (n < 0)
- goto enospc; /* Guess. */
- newlen = prune_origin(*buf, origin);
- if ((origin == NULL || origin[0] == '\0' || (*buf)[newlen] == '\0') &&
- (newlen == 0 || (*buf)[newlen - 1] != '.')) {
- /* No trailing dot. */
- if (newlen + 2 > *buflen)
- goto enospc; /* No room for ".\0". */
- (*buf)[newlen++] = '.';
- (*buf)[newlen] = '\0';
- }
- if (newlen == 0) {
- /* Use "@" instead of name. */
- if (newlen + 2 > *buflen)
- goto enospc; /* No room for "@\0". */
- (*buf)[newlen++] = '@';
- (*buf)[newlen] = '\0';
- }
- *pp += n;
- addlen(newlen, buf, buflen);
- **buf = '\0';
- return (newlen);
- enospc:
- errno = ENOSPC;
- *buf = save_buf;
- *buflen = save_buflen;
- return (-1);
-}
-
-static void
-addlen(size_t len, char **buf, size_t *buflen) {
- assert(len <= *buflen);
- *buf += len;
- *buflen -= len;
-}
-
-static int
-addstr(const char *src, size_t len, char **buf, size_t *buflen) {
- if (len > *buflen) {
- errno = ENOSPC;
- return (-1);
- }
- memcpy(*buf, src, len);
- addlen(len, buf, buflen);
- **buf = '\0';
- return (0);
-}
-
-static int
-addtab(size_t len, size_t target, int spaced, char **buf, size_t *buflen) {
- size_t save_buflen = *buflen;
- char *save_buf = *buf;
- int t;
-
- if (spaced || len >= target - 1) {
- T(addstr(" ", 2, buf, buflen));
- spaced = 1;
- } else {
- for (t = (target - len - 1) / 8; t >= 0; t--)
- if (addstr("\t", 1, buf, buflen) < 0) {
- *buflen = save_buflen;
- *buf = save_buf;
- return (-1);
- }
- spaced = 0;
- }
- return (spaced);
-}
diff --git a/c/src/exec/libnetworking/libc/ns_ttl.c b/c/src/exec/libnetworking/libc/ns_ttl.c
deleted file mode 100644
index 75093c1dbc..0000000000
--- a/c/src/exec/libnetworking/libc/ns_ttl.c
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if !defined(__rtems__)
-#if !defined(LINT) && !defined(CODECENTER)
-static char rcsid[] = "$Id$";
-#endif /* not lint */
-#endif /* not rtems */
-
-/* Import. */
-
-#include <arpa/nameser.h>
-
-#include <ctype.h>
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-
-#define SPRINTF(x) ((size_t)sprintf x)
-
-/* Forward. */
-
-static int fmt1(int t, char s, char **buf, size_t *buflen);
-
-/* Macros. */
-
-#define T(x) if ((x) < 0) return (-1); else (void)NULL
-
-/* Public. */
-
-int
-ns_format_ttl(u_long src, char *dst, size_t dstlen) {
- char *odst = dst;
- int secs, mins, hours, days, weeks, x;
- char *p;
-
- secs = src % 60; src /= 60;
- mins = src % 60; src /= 60;
- hours = src % 24; src /= 24;
- days = src % 7; src /= 7;
- weeks = src; src = 0;
-
- x = 0;
- if (weeks) {
- T(fmt1(weeks, 'W', &dst, &dstlen));
- x++;
- }
- if (days) {
- T(fmt1(days, 'D', &dst, &dstlen));
- x++;
- }
- if (hours) {
- T(fmt1(hours, 'H', &dst, &dstlen));
- x++;
- }
- if (mins) {
- T(fmt1(mins, 'M', &dst, &dstlen));
- x++;
- }
- if (secs || !(weeks || days || hours || mins)) {
- T(fmt1(secs, 'S', &dst, &dstlen));
- x++;
- }
-
- if (x > 1) {
- int ch;
-
- for (p = odst; (ch = *p) != '\0'; p++)
- if (isascii(ch) && isupper(ch))
- *p = tolower(ch);
- }
-
- return (dst - odst);
-}
-
-int
-ns_parse_ttl(const char *src, u_long *dst) {
- u_long ttl, tmp;
- int ch, digits, dirty;
-
- ttl = 0;
- tmp = 0;
- digits = 0;
- dirty = 0;
- while ((ch = *src++) != '\0') {
- if (!isascii(ch) || !isprint(ch))
- goto einval;
- if (isdigit(ch)) {
- tmp *= 10;
- tmp += (ch - '0');
- digits++;
- continue;
- }
- if (digits == 0)
- goto einval;
- if (islower(ch))
- ch = toupper(ch);
- switch (ch) {
- case 'W': tmp *= 7;
- case 'D': tmp *= 24;
- case 'H': tmp *= 60;
- case 'M': tmp *= 60;
- case 'S': break;
- default: goto einval;
- }
- ttl += tmp;
- tmp = 0;
- digits = 0;
- dirty = 1;
- }
- if (digits > 0) {
- if (dirty)
- goto einval;
- else
- ttl += tmp;
- }
- *dst = ttl;
- return (0);
-
- einval:
- errno = EINVAL;
- return (-1);
-}
-
-/* Private. */
-
-static int
-fmt1(int t, char s, char **buf, size_t *buflen) {
- char tmp[50];
- size_t len;
-
- len = SPRINTF((tmp, "%d%c", t, s));
- if (len + 1 > *buflen)
- return (-1);
- strcpy(*buf, tmp);
- *buf += len;
- *buflen -= len;
- return (0);
-}
diff --git a/c/src/exec/libnetworking/libc/nsap_addr.c b/c/src/exec/libnetworking/libc/nsap_addr.c
deleted file mode 100644
index a7af57a266..0000000000
--- a/c/src/exec/libnetworking/libc/nsap_addr.c
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright (c) 1996, 1998 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-#include <ctype.h>
-#include <resolv.h>
-
-static char
-xtob(c)
- register int c;
-{
- return (c - (((c >= '0') && (c <= '9')) ? '0' : '7'));
-}
-
-u_int
-inet_nsap_addr(ascii, binary, maxlen)
- const char *ascii;
- u_char *binary;
- int maxlen;
-{
- u_char c, nib;
- u_int len = 0;
-
- while ((c = *ascii++) != '\0' && len < (u_int)maxlen) {
- if (c == '.' || c == '+' || c == '/')
- continue;
- if (!isascii(c))
- return (0);
- if (islower(c))
- c = toupper(c);
- if (isxdigit(c)) {
- nib = xtob(c);
- c = *ascii++;
- if (c != '\0') {
- c = toupper(c);
- if (isxdigit(c)) {
- *binary++ = (nib << 4) | xtob(c);
- len++;
- } else
- return (0);
- }
- else
- return (0);
- }
- else
- return (0);
- }
- return (len);
-}
-
-char *
-inet_nsap_ntoa(binlen, binary, ascii)
- int binlen;
- register const u_char *binary;
- register char *ascii;
-{
- register int nib;
- int i;
- static char tmpbuf[255*3];
- char *start;
-
- if (ascii)
- start = ascii;
- else {
- ascii = tmpbuf;
- start = tmpbuf;
- }
-
- if (binlen > 255)
- binlen = 255;
-
- for (i = 0; i < binlen; i++) {
- nib = *binary >> 4;
- *ascii++ = nib + (nib < 10 ? '0' : '7');
- nib = *binary++ & 0x0f;
- *ascii++ = nib + (nib < 10 ? '0' : '7');
- if (((i % 2) == 0 && (i + 1) < binlen))
- *ascii++ = '.';
- }
- *ascii = '\0';
- return (start);
-}
diff --git a/c/src/exec/libnetworking/libc/rcmd.3 b/c/src/exec/libnetworking/libc/rcmd.3
deleted file mode 100644
index e25057fa4e..0000000000
--- a/c/src/exec/libnetworking/libc/rcmd.3
+++ /dev/null
@@ -1,204 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" From: @(#)rcmd.3 8.1 (Berkeley) 6/4/93
-.\" $Id$
-.\"
-.Dd February 15, 1996
-.Dt RCMD 3
-.Os BSD 4.2
-.Sh NAME
-.Nm rcmd ,
-.Nm rresvport ,
-.Nm iruserok ,
-.Nm ruserok
-.Nd routines for returning a stream to a remote command
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft int
-.Fn rcmd "char **ahost" "int inport" "const char *locuser" "const char *remuser" "const char *cmd" "int *fd2p"
-.Ft int
-.Fn rresvport "int *port"
-.Ft int
-.Fn iruserok "u_long raddr" "int superuser" "const char *ruser" "const char *luser"
-.Ft int
-.Fn ruserok "const char *rhost" "int superuser" "const char *ruser" "const char *luser"
-.Sh DESCRIPTION
-The
-.Fn rcmd
-function
-is used by the super-user to execute a command on
-a remote machine using an authentication scheme based
-on reserved port numbers.
-The
-.Fn rresvport
-function
-returns a descriptor to a socket
-with an address in the privileged port space.
-The
-.Fn ruserok
-function
-is used by servers
-to authenticate clients requesting service with
-.Fn rcmd .
-All three functions are present in the same file and are used
-by the
-.Xr rshd 8
-server (among others).
-.Pp
-The
-.Fn rcmd
-function
-looks up the host
-.Fa *ahost
-using
-.Xr gethostbyname 3 ,
-returning \-1 if the host does not exist.
-Otherwise
-.Fa *ahost
-is set to the standard name of the host
-and a connection is established to a server
-residing at the well-known Internet port
-.Fa inport .
-.Pp
-If the connection succeeds,
-a socket in the Internet domain of type
-.Dv SOCK_STREAM
-is returned to the caller, and given to the remote
-command as
-.Em stdin
-and
-.Em stdout .
-If
-.Fa fd2p
-is non-zero, then an auxiliary channel to a control
-process will be set up, and a descriptor for it will be placed
-in
-.Fa *fd2p .
-The control process will return diagnostic
-output from the command (unit 2) on this channel, and will also
-accept bytes on this channel as being
-.Tn UNIX
-signal numbers, to be
-forwarded to the process group of the command.
-If
-.Fa fd2p
-is 0, then the
-.Em stderr
-(unit 2 of the remote
-command) will be made the same as the
-.Em stdout
-and no
-provision is made for sending arbitrary signals to the remote process,
-although you may be able to get its attention by using out-of-band data.
-.Pp
-The protocol is described in detail in
-.Xr rshd 8 .
-.Pp
-The
-.Fn rresvport
-function is used to obtain a socket with a privileged
-address bound to it. This socket is suitable for use
-by
-.Fn rcmd
-and several other functions. Privileged Internet ports are those
-in the range 0 to 1023. Only the super-user
-is allowed to bind an address of this sort to a socket.
-.Pp
-The
-.Fn iruserok
-and
-.Fn ruserok
-functions take a remote host's IP address or name, as returned by the
-.Xr gethostbyname 3
-routines, two user names and a flag indicating whether the local user's
-name is that of the super-user.
-Then, if the user is
-.Em NOT
-the super-user, it checks the
-.Pa /etc/hosts.equiv
-file.
-If that lookup is not done, or is unsuccessful, the
-.Pa .rhosts
-in the local user's home directory is checked to see if the request for
-service is allowed.
-.Pp
-If this file does not exist, is not a regular file, is owned by anyone
-other than the user or the super-user, or is writable by anyone other
-than the owner, the check automatically fails.
-Zero is returned if the machine name is listed in the
-.Dq Pa hosts.equiv
-file, or the host and remote user name are found in the
-.Dq Pa .rhosts
-file; otherwise
-.Fn iruserok
-and
-.Fn ruserok
-return \-1.
-If the local domain (as obtained from
-.Xr gethostname 3 )
-is the same as the remote domain, only the machine name need be specified.
-.Pp
-The
-.Fn iruserok
-function is strongly preferred for security reasons.
-It requires trusting the local DNS at most, while the
-.Fn ruserok
-function requires trusting the entire DNS, which can be spoofed.
-.Sh DIAGNOSTICS
-The
-.Fn rcmd
-function
-returns a valid socket descriptor on success.
-It returns \-1 on error and prints a diagnostic message on the standard error.
-.Pp
-The
-.Fn rresvport
-function
-returns a valid, bound socket descriptor on success.
-It returns \-1 on error with the global value
-.Va errno
-set according to the reason for failure.
-The error code
-.Dv EAGAIN
-is overloaded to mean ``All network ports in use.''
-.Sh SEE ALSO
-.Xr rlogin 1 ,
-.Xr rsh 1 ,
-.Xr intro 2 ,
-.Xr rexec 3 ,
-.Xr rexecd 8 ,
-.Xr rlogind 8 ,
-.Xr rshd 8
-.Sh HISTORY
-These
-functions appeared in
-.Bx 4.2 .
diff --git a/c/src/exec/libnetworking/libc/rcmd.c b/c/src/exec/libnetworking/libc/rcmd.c
deleted file mode 100644
index 32e4953e9b..0000000000
--- a/c/src/exec/libnetworking/libc/rcmd.c
+++ /dev/null
@@ -1,520 +0,0 @@
-/*
- * Copyright (c) 1983, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)rcmd.c 8.3 (Berkeley) 3/26/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-#include <signal.h>
-#include <fcntl.h>
-#include <netdb.h>
-#include <unistd.h>
-#include <pwd.h>
-#include <errno.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <string.h>
-#ifdef YP
-#include <rpc/rpc.h>
-#include <rpcsvc/yp_prot.h>
-#include <rpcsvc/ypclnt.h>
-#endif
-
-extern int innetgr __P(( const char *, const char *, const char *, const char * ));
-
-#define max(a, b) ((a > b) ? a : b)
-
-int __ivaliduser __P((FILE *, u_long, const char *, const char *));
-static int __icheckhost __P((u_long, char *));
-
-int
-rcmd(ahost, rport, locuser, remuser, cmd, fd2p)
- char **ahost;
- u_short rport;
- const char *locuser, *remuser, *cmd;
- int *fd2p;
-{
- struct hostent *hp;
- struct sockaddr_in sin, from;
- fd_set reads;
- long oldmask;
- pid_t pid;
- int s, lport, timo;
- char c;
-
- pid = getpid();
- hp = gethostbyname(*ahost);
- if (hp == NULL) {
- herror(*ahost);
- return (-1);
- }
- *ahost = hp->h_name;
- oldmask = sigblock(sigmask(SIGURG));
- for (timo = 1, lport = IPPORT_RESERVED - 1;;) {
- s = rresvport(&lport);
- if (s < 0) {
- if (errno == EAGAIN)
- (void)fprintf(stderr,
- "rcmd: socket: All ports in use\n");
- else
- (void)fprintf(stderr, "rcmd: socket: %s\n",
- strerror(errno));
- sigsetmask(oldmask);
- return (-1);
- }
- fcntl(s, F_SETOWN, pid);
- bzero(&sin, sizeof sin);
- sin.sin_len = sizeof(struct sockaddr_in);
- sin.sin_family = hp->h_addrtype;
- sin.sin_port = rport;
- bcopy(hp->h_addr_list[0], &sin.sin_addr, MIN(hp->h_length, sizeof sin.sin_addr));
- if (connect(s, (struct sockaddr *)&sin, sizeof(sin)) >= 0)
- break;
- (void)close(s);
- if (errno == EADDRINUSE) {
- lport--;
- continue;
- }
- if (errno == ECONNREFUSED && timo <= 16) {
- (void)sleep(timo);
- timo *= 2;
- continue;
- }
- if (hp->h_addr_list[1] != NULL) {
- int oerrno = errno;
-
- (void)fprintf(stderr, "connect to address %s: ",
- inet_ntoa(sin.sin_addr));
- errno = oerrno;
- perror(0);
- hp->h_addr_list++;
- bcopy(hp->h_addr_list[0], &sin.sin_addr, MIN(hp->h_length, sizeof sin.sin_addr));
- (void)fprintf(stderr, "Trying %s...\n",
- inet_ntoa(sin.sin_addr));
- continue;
- }
- (void)fprintf(stderr, "%s: %s\n", hp->h_name, strerror(errno));
- sigsetmask(oldmask);
- return (-1);
- }
- lport--;
- if (fd2p == 0) {
- write(s, "", 1);
- lport = 0;
- } else {
- char num[8];
- int s2 = rresvport(&lport), s3;
- int len = sizeof(from);
- int nfds;
-
- if (s2 < 0)
- goto bad;
- listen(s2, 1);
- (void)snprintf(num, sizeof(num), "%d", lport);
- if (write(s, num, strlen(num)+1) != strlen(num)+1) {
- (void)fprintf(stderr,
- "rcmd: write (setting up stderr): %s\n",
- strerror(errno));
- (void)close(s2);
- goto bad;
- }
- nfds = max(s, s2)+1;
- if(nfds > FD_SETSIZE) {
- fprintf(stderr, "rcmd: too many files\n");
- (void)close(s2);
- goto bad;
- }
-again:
- FD_ZERO(&reads);
- FD_SET(s, &reads);
- FD_SET(s2, &reads);
- errno = 0;
- if (select(nfds, &reads, 0, 0, 0) < 1 || !FD_ISSET(s2, &reads)){
- if (errno != 0)
- (void)fprintf(stderr,
- "rcmd: select (setting up stderr): %s\n",
- strerror(errno));
- else
- (void)fprintf(stderr,
- "select: protocol failure in circuit setup\n");
- (void)close(s2);
- goto bad;
- }
- s3 = accept(s2, (struct sockaddr *)&from, &len);
- /*
- * XXX careful for ftp bounce attacks. If discovered, shut them
- * down and check for the real auxiliary channel to connect.
- */
- if (from.sin_family == AF_INET && from.sin_port == htons(20)) {
- close(s3);
- goto again;
- }
- (void)close(s2);
- if (s3 < 0) {
- (void)fprintf(stderr,
- "rcmd: accept: %s\n", strerror(errno));
- lport = 0;
- goto bad;
- }
- *fd2p = s3;
- from.sin_port = ntohs((u_short)from.sin_port);
- if (from.sin_family != AF_INET ||
- from.sin_port >= IPPORT_RESERVED ||
- from.sin_port < IPPORT_RESERVED / 2) {
- (void)fprintf(stderr,
- "socket: protocol failure in circuit setup.\n");
- goto bad2;
- }
- }
- (void)write(s, locuser, strlen(locuser)+1);
- (void)write(s, remuser, strlen(remuser)+1);
- (void)write(s, cmd, strlen(cmd)+1);
- if (read(s, &c, 1) != 1) {
- (void)fprintf(stderr,
- "rcmd: %s: %s\n", *ahost, strerror(errno));
- goto bad2;
- }
- if (c != 0) {
- while (read(s, &c, 1) == 1) {
- (void)write(STDERR_FILENO, &c, 1);
- if (c == '\n')
- break;
- }
- goto bad2;
- }
- sigsetmask(oldmask);
- return (s);
-bad2:
- if (lport)
- (void)close(*fd2p);
-bad:
- (void)close(s);
- sigsetmask(oldmask);
- return (-1);
-}
-
-int
-rresvport(alport)
- int *alport;
-{
- struct sockaddr_in sin;
- int s;
-
- bzero(&sin, sizeof sin);
- sin.sin_len = sizeof(struct sockaddr_in);
- sin.sin_family = AF_INET;
- sin.sin_addr.s_addr = INADDR_ANY;
- s = socket(AF_INET, SOCK_STREAM, 0);
- if (s < 0)
- return (-1);
-#if 0 /* compat_exact_traditional_rresvport_semantics */
- sin.sin_port = htons((u_short)*alport);
- if (bind(s, (struct sockaddr *)&sin, sizeof(sin)) >= 0)
- return (s);
- if (errno != EADDRINUSE) {
- (void)close(s);
- return (-1);
- }
-#endif
- sin.sin_port = 0;
- if (bindresvport(s, &sin) == -1) {
- (void)close(s);
- return (-1);
- }
- *alport = (int)ntohs(sin.sin_port);
- return (s);
-}
-
-int __check_rhosts_file = 1;
-char *__rcmd_errstr;
-
-int
-ruserok(rhost, superuser, ruser, luser)
- const char *rhost, *ruser, *luser;
- int superuser;
-{
- struct hostent *hp;
- u_long addr;
- char **ap;
-
- if ((hp = gethostbyname(rhost)) == NULL)
- return (-1);
- for (ap = hp->h_addr_list; *ap; ++ap) {
- bcopy(*ap, &addr, sizeof(addr));
- if (iruserok(addr, superuser, ruser, luser) == 0)
- return (0);
- }
- return (-1);
-}
-
-/*
- * New .rhosts strategy: We are passed an ip address. We spin through
- * hosts.equiv and .rhosts looking for a match. When the .rhosts only
- * has ip addresses, we don't have to trust a nameserver. When it
- * contains hostnames, we spin through the list of addresses the nameserver
- * gives us and look for a match.
- *
- * Returns 0 if ok, -1 if not ok.
- */
-int
-iruserok(raddr, superuser, ruser, luser)
- u_long raddr;
- int superuser;
- const char *ruser, *luser;
-{
- register char *cp;
- struct stat sbuf;
- struct passwd *pwd;
- FILE *hostf;
- uid_t uid;
- int first;
- char pbuf[MAXPATHLEN];
-
- first = 1;
- hostf = superuser ? NULL : fopen(_PATH_HEQUIV, "r");
-again:
- if (hostf) {
- if (__ivaliduser(hostf, raddr, luser, ruser) == 0) {
- (void)fclose(hostf);
- return (0);
- }
- (void)fclose(hostf);
- }
- if (first == 1 && (__check_rhosts_file || superuser)) {
- first = 0;
- if ((pwd = getpwnam(luser)) == NULL)
- return (-1);
- (void)strcpy(pbuf, pwd->pw_dir);
- (void)strcat(pbuf, "/.rhosts");
-
- /*
- * Change effective uid while opening .rhosts. If root and
- * reading an NFS mounted file system, can't read files that
- * are protected read/write owner only.
- */
- uid = geteuid();
- (void)seteuid(pwd->pw_uid);
- hostf = fopen(pbuf, "r");
- (void)seteuid(uid);
-
- if (hostf == NULL)
- return (-1);
- /*
- * If not a regular file, or is owned by someone other than
- * user or root or if writeable by anyone but the owner, quit.
- */
- cp = NULL;
- if (lstat(pbuf, &sbuf) < 0)
- cp = ".rhosts lstat failed";
- else if (!S_ISREG(sbuf.st_mode))
- cp = ".rhosts not regular file";
- else if (fstat(fileno(hostf), &sbuf) < 0)
- cp = ".rhosts fstat failed";
- else if (sbuf.st_uid && sbuf.st_uid != pwd->pw_uid)
- cp = "bad .rhosts owner";
- else if (sbuf.st_mode & (S_IWGRP|S_IWOTH))
- cp = ".rhosts writeable by other than owner";
- /* If there were any problems, quit. */
- if (cp) {
- __rcmd_errstr = cp;
- (void)fclose(hostf);
- return (-1);
- }
- goto again;
- }
- return (-1);
-}
-
-/*
- * XXX
- * Don't make static, used by lpd(8).
- *
- * Returns 0 if ok, -1 if not ok.
- */
-int
-__ivaliduser(hostf, raddr, luser, ruser)
- FILE *hostf;
- u_long raddr;
- const char *luser, *ruser;
-{
- register char *user, *p;
- int ch;
- char buf[MAXHOSTNAMELEN + 128]; /* host + login */
- char hname[MAXHOSTNAMELEN];
- struct hostent *hp;
- /* Presumed guilty until proven innocent. */
- int userok = 0, hostok = 0;
-#ifdef YP
- char *ypdomain;
-
- if (yp_get_default_domain(&ypdomain))
- ypdomain = NULL;
-#else
-#define ypdomain NULL
-#endif
- /* We need to get the damn hostname back for netgroup matching. */
- if ((hp = gethostbyaddr((char *)&raddr, sizeof(u_long),
- AF_INET)) == NULL)
- return (-1);
- strncpy(hname, hp->h_name, sizeof(hname));
- hname[sizeof(hname) - 1] = '\0';
-
- while (fgets(buf, sizeof(buf), hostf)) {
- p = buf;
- /* Skip lines that are too long. */
- if (strchr(p, '\n') == NULL) {
- while ((ch = getc(hostf)) != '\n' && ch != EOF);
- continue;
- }
- if (*p == '\n' || *p == '#') {
- /* comment... */
- continue;
- }
- while (*p != '\n' && *p != ' ' && *p != '\t' && *p != '\0') {
- *p = isupper(*p) ? tolower(*p) : *p;
- p++;
- }
- if (*p == ' ' || *p == '\t') {
- *p++ = '\0';
- while (*p == ' ' || *p == '\t')
- p++;
- user = p;
- while (*p != '\n' && *p != ' ' &&
- *p != '\t' && *p != '\0')
- p++;
- } else
- user = p;
- *p = '\0';
- /*
- * Do +/- and +@/-@ checking. This looks really nasty,
- * but it matches SunOS's behavior so far as I can tell.
- */
- switch(buf[0]) {
- case '+':
- if (!buf[1]) { /* '+' matches all hosts */
- hostok = 1;
- break;
- }
- if (buf[1] == '@') /* match a host by netgroup */
- hostok = innetgr((char *)&buf[2],
- (char *)&hname, NULL, ypdomain);
- else /* match a host by addr */
- hostok = __icheckhost(raddr,(char *)&buf[1]);
- break;
- case '-': /* reject '-' hosts and all their users */
- if (buf[1] == '@') {
- if (innetgr((char *)&buf[2],
- (char *)&hname, NULL, ypdomain))
- return(-1);
- } else {
- if (__icheckhost(raddr,(char *)&buf[1]))
- return(-1);
- }
- break;
- default: /* if no '+' or '-', do a simple match */
- hostok = __icheckhost(raddr, buf);
- break;
- }
- switch(*user) {
- case '+':
- if (!*(user+1)) { /* '+' matches all users */
- userok = 1;
- break;
- }
- if (*(user+1) == '@') /* match a user by netgroup */
- userok = innetgr(user+2, NULL, ruser, ypdomain);
- else /* match a user by direct specification */
- userok = !(strcmp(ruser, user+1));
- break;
- case '-': /* if we matched a hostname, */
- if (hostok) { /* check for user field rejections */
- if (!*(user+1))
- return(-1);
- if (*(user+1) == '@') {
- if (innetgr(user+2, NULL,
- ruser, ypdomain))
- return(-1);
- } else {
- if (!strcmp(ruser, user+1))
- return(-1);
- }
- }
- break;
- default: /* no rejections: try to match the user */
- if (hostok)
- userok = !(strcmp(ruser,*user ? user : luser));
- break;
- }
- if (hostok && userok)
- return(0);
- }
- return (-1);
-}
-
-/*
- * Returns "true" if match, 0 if no match.
- */
-static int
-__icheckhost(raddr, lhost)
- u_long raddr;
- register char *lhost;
-{
- register struct hostent *hp;
- register u_long laddr;
- register char **pp;
-
- /* Try for raw ip address first. */
- if (isdigit(*lhost) && (long)(laddr = inet_addr(lhost)) != -1)
- return (raddr == laddr);
-
- /* Better be a hostname. */
- if ((hp = gethostbyname(lhost)) == NULL)
- return (0);
-
- /* Spin through ip addresses. */
- for (pp = hp->h_addr_list; *pp; ++pp)
- if (!bcmp(&raddr, *pp, sizeof(u_long)))
- return (1);
-
- /* No match. */
- return (0);
-}
diff --git a/c/src/exec/libnetworking/libc/recv.c b/c/src/exec/libnetworking/libc/recv.c
deleted file mode 100644
index a842244caf..0000000000
--- a/c/src/exec/libnetworking/libc/recv.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)recv.c 8.2 (Berkeley) 2/21/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/socket.h>
-
-#include <stddef.h>
-
-ssize_t
-recv(s, buf, len, flags)
- int s, flags;
- size_t len;
- void *buf;
-{
- return (recvfrom(s, buf, len, flags, NULL, 0));
-}
diff --git a/c/src/exec/libnetworking/libc/res_comp.c b/c/src/exec/libnetworking/libc/res_comp.c
deleted file mode 100644
index 93043276f2..0000000000
--- a/c/src/exec/libnetworking/libc/res_comp.c
+++ /dev/null
@@ -1,258 +0,0 @@
-/*
- * Copyright (c) 1985, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-/*
- * Portions Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)res_comp.c 8.1 (Berkeley) 6/4/93";
-static char orig_rcsid[] = "From: Id: res_comp.c,v 8.11 1997/05/21 19:31:04 halley Exp $";
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-#include <ctype.h>
-#include <resolv.h>
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-
-#define BIND_4_COMPAT
-
-/*
- * Expand compressed domain name 'comp_dn' to full domain name.
- * 'msg' is a pointer to the begining of the message,
- * 'eomorig' points to the first location after the message,
- * 'exp_dn' is a pointer to a buffer of size 'length' for the result.
- * Return size of compressed name or -1 if there was an error.
- */
-int
-dn_expand(const u_char *msg, const u_char *eom, const u_char *src,
- char *dst, int dstsiz)
-{
- int n = ns_name_uncompress(msg, eom, src, dst, (size_t)dstsiz);
-
- if (n > 0 && dst[0] == '.')
- dst[0] = '\0';
- return (n);
-}
-
-/*
- * Pack domain name 'exp_dn' in presentation form into 'comp_dn'.
- * Return the size of the compressed name or -1.
- * 'length' is the size of the array pointed to by 'comp_dn'.
- */
-int
-dn_comp(const char *src, u_char *dst, int dstsiz,
- u_char **dnptrs, u_char **lastdnptr)
-{
- return (ns_name_compress(src, dst, (size_t)dstsiz,
- (const u_char **)dnptrs,
- (const u_char **)lastdnptr));
-}
-
-/*
- * Skip over a compressed domain name. Return the size or -1.
- */
-int
-dn_skipname(const u_char *ptr, const u_char *eom) {
- const u_char *saveptr = ptr;
-
- if (ns_name_skip(&ptr, eom) == -1)
- return (-1);
- return (ptr - saveptr);
-}
-
-/*
- * Verify that a domain name uses an acceptable character set.
- */
-
-/*
- * Note the conspicuous absence of ctype macros in these definitions. On
- * non-ASCII hosts, we can't depend on string literals or ctype macros to
- * tell us anything about network-format data. The rest of the BIND system
- * is not careful about this, but for some reason, we're doing it right here.
- */
-#define PERIOD 0x2e
-#define hyphenchar(c) ((c) == 0x2d)
-#define bslashchar(c) ((c) == 0x5c)
-#define periodchar(c) ((c) == PERIOD)
-#define asterchar(c) ((c) == 0x2a)
-#define alphachar(c) (((c) >= 0x41 && (c) <= 0x5a) \
- || ((c) >= 0x61 && (c) <= 0x7a))
-#define digitchar(c) ((c) >= 0x30 && (c) <= 0x39)
-
-#define borderchar(c) (alphachar(c) || digitchar(c))
-#define middlechar(c) (borderchar(c) || hyphenchar(c))
-#define domainchar(c) ((c) > 0x20 && (c) < 0x7f)
-
-int
-res_hnok(dn)
- const char *dn;
-{
- int ppch = '\0', pch = PERIOD, ch = *dn++;
-
- while (ch != '\0') {
- int nch = *dn++;
-
- if (periodchar(ch)) {
- (void)NULL;
- } else if (periodchar(pch)) {
- if (!borderchar(ch))
- return (0);
- } else if (periodchar(nch) || nch == '\0') {
- if (!borderchar(ch))
- return (0);
- } else {
- if (!middlechar(ch))
- return (0);
- }
- ppch = pch, pch = ch, ch = nch;
- }
- return (1);
-}
-
-/*
- * hostname-like (A, MX, WKS) owners can have "*" as their first label
- * but must otherwise be as a host name.
- */
-int
-res_ownok(dn)
- const char *dn;
-{
- if (asterchar(dn[0])) {
- if (periodchar(dn[1]))
- return (res_hnok(dn+2));
- if (dn[1] == '\0')
- return (1);
- }
- return (res_hnok(dn));
-}
-
-/*
- * SOA RNAMEs and RP RNAMEs can have any printable character in their first
- * label, but the rest of the name has to look like a host name.
- */
-int
-res_mailok(dn)
- const char *dn;
-{
- int ch, escaped = 0;
-
- /* "." is a valid missing representation */
- if (*dn == '\0')
- return (1);
-
- /* otherwise <label>.<hostname> */
- while ((ch = *dn++) != '\0') {
- if (!domainchar(ch))
- return (0);
- if (!escaped && periodchar(ch))
- break;
- if (escaped)
- escaped = 0;
- else if (bslashchar(ch))
- escaped = 1;
- }
- if (periodchar(ch))
- return (res_hnok(dn));
- return (0);
-}
-
-/*
- * This function is quite liberal, since RFC 1034's character sets are only
- * recommendations.
- */
-int
-res_dnok(dn)
- const char *dn;
-{
- int ch;
-
- while ((ch = *dn++) != '\0')
- if (!domainchar(ch))
- return (0);
- return (1);
-}
-
-#ifdef BIND_4_COMPAT
-/*
- * This module must export the following externally-visible symbols:
- * ___putlong
- * ___putshort
- * __getlong
- * __getshort
- * Note that one _ comes from C and the others come from us.
- */
-void __putlong(u_int32_t src, u_char *dst) { ns_put32(src, dst); }
-void __putshort(u_int16_t src, u_char *dst) { ns_put16(src, dst); }
-u_int32_t _getlong(const u_char *src) { return (ns_get32(src)); }
-u_int16_t _getshort(const u_char *src) { return (ns_get16(src)); }
-#endif /*BIND_4_COMPAT*/
diff --git a/c/src/exec/libnetworking/libc/res_config.h b/c/src/exec/libnetworking/libc/res_config.h
deleted file mode 100644
index fbd1d694f7..0000000000
--- a/c/src/exec/libnetworking/libc/res_config.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * $Id$
- */
-
-#define DEBUG 1 /* enable debugging code (needed for dig) */
-#define RESOLVSORT /* allow sorting of addresses in gethostbyname */
-#define RFC1535 /* comply with RFC1535 (STRONGLY reccomended by vixie)*/
-#undef USELOOPBACK /* res_init() bind to localhost */
-#undef SUNSECURITY /* verify gethostbyaddr() calls - WE DONT NEED IT */
-#define MULTI_PTRS_ARE_ALIASES 1 /* fold multiple PTR records into aliases */
-#define CHECK_SRVR_ADDR 1 /* confirm that the server requested sent the reply */
-#define BIND_UPDATE 1 /* update support */
-
-#if defined(__rtems__)
-u_int16_t _getshort(const u_char *src);
-u_int32_t _getlong(const u_char *src);
-int gethostname (char *name, size_t namelen);
-int sethostname (char *name, size_t namelen);
-int issetugid (void);
-#endif
diff --git a/c/src/exec/libnetworking/libc/res_data.c b/c/src/exec/libnetworking/libc/res_data.c
deleted file mode 100644
index fb7d2c66eb..0000000000
--- a/c/src/exec/libnetworking/libc/res_data.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 1995,1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <sys/time.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-#include <ctype.h>
-#include <resolv.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include "res_config.h"
-
-const char *_res_opcodes[] = {
- "QUERY",
- "IQUERY",
- "CQUERYM",
- "CQUERYU", /* experimental */
- "NOTIFY", /* experimental */
- "UPDATE",
- "6",
- "7",
- "8",
- "9",
- "10",
- "11",
- "12",
- "13",
- "ZONEINIT",
- "ZONEREF",
-};
-
-const char *_res_resultcodes[] = {
- "NOERROR",
- "FORMERR",
- "SERVFAIL",
- "NXDOMAIN",
- "NOTIMP",
- "REFUSED",
- "YXDOMAIN",
- "YXRRSET",
- "NXRRSET",
- "NOTAUTH",
- "ZONEERR",
- "11",
- "12",
- "13",
- "14",
- "NOCHANGE",
-};
-
-#ifdef BIND_UPDATE
-const char *_res_sectioncodes[] = {
- "ZONE",
- "PREREQUISITES",
- "UPDATE",
- "ADDITIONAL",
-};
-#endif
diff --git a/c/src/exec/libnetworking/libc/res_debug.c b/c/src/exec/libnetworking/libc/res_debug.c
deleted file mode 100644
index b747b6e6d2..0000000000
--- a/c/src/exec/libnetworking/libc/res_debug.c
+++ /dev/null
@@ -1,966 +0,0 @@
-/*
- * Copyright (c) 1985
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-/*
- * Portions Copyright (c) 1995 by International Business Machines, Inc.
- *
- * International Business Machines, Inc. (hereinafter called IBM) grants
- * permission under its copyrights to use, copy, modify, and distribute this
- * Software with or without fee, provided that the above copyright notice and
- * all paragraphs of this notice appear in all copies, and that the name of IBM
- * not be used in connection with the marketing of any product incorporating
- * the Software or modifications thereof, without specific, written prior
- * permission.
- *
- * To the extent it has a right to do so, IBM grants an immunity from suit
- * under its patents, if any, for the use, sale or manufacture of products to
- * the extent that such products are used for performing Domain Name System
- * dynamic updates in TCP/IP networks by means of the Software. No immunity is
- * granted for any product per se or for any other function of any product.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- * PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL,
- * DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING
- * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN
- * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES.
- */
-
-/*
- * Portions Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)res_debug.c 8.1 (Berkeley) 6/4/93";
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/socket.h>
-
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-
-#include <ctype.h>
-#include <errno.h>
-#include <math.h>
-#include <netdb.h>
-#include <resolv.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#define SPRINTF(x) sprintf x
-
-extern const char *_res_opcodes[];
-extern const char *_res_resultcodes[];
-extern const char *_res_sectioncodes[];
-
-/*
- * Print the current options.
- */
-void
-fp_resstat(struct __res_state *statp, FILE *file) {
- u_long mask;
-
- fprintf(file, ";; res options:");
- if (!statp)
- statp = &_res;
- for (mask = 1; mask != 0; mask <<= 1)
- if (statp->options & mask)
- fprintf(file, " %s", p_option(mask));
- putc('\n', file);
-}
-
-static void
-do_section(ns_msg *handle, ns_sect section, int pflag, FILE *file) {
- int n, sflag, rrnum;
- char buf[2048]; /* XXX need to malloc */
- ns_opcode opcode;
- ns_rr rr;
-
- /*
- * Print answer records.
- */
- sflag = (_res.pfcode & pflag);
- if (_res.pfcode && !sflag)
- return;
-
- opcode = ns_msg_getflag(*handle, ns_f_opcode);
- rrnum = 0;
- for (;;) {
- if (ns_parserr(handle, section, rrnum, &rr)) {
- if (errno != ENODEV)
- fprintf(file, ";; ns_parserr: %s\n",
- strerror(errno));
- else if (rrnum > 0 && sflag != 0 &&
- (_res.pfcode & RES_PRF_HEAD1))
- putc('\n', file);
- return;
- }
- if (rrnum == 0 && sflag != 0 && (_res.pfcode & RES_PRF_HEAD1))
- fprintf(file, ";; %s SECTION:\n",
- p_section(section, opcode));
- if (section == ns_s_qd)
- fprintf(file, ";;\t%s, type = %s, class = %s\n",
- ns_rr_name(rr),
- p_type(ns_rr_type(rr)),
- p_class(ns_rr_class(rr)));
- else {
- n = ns_sprintrr(handle, &rr, NULL, NULL,
- buf, sizeof buf);
- if (n < 0) {
- fprintf(file, ";; ns_sprintrr: %s\n",
- strerror(errno));
- return;
- }
- fputs(buf, file);
- fputc('\n', file);
- }
- rrnum++;
- }
-}
-
-void
-p_query(const u_char *msg) {
- fp_query(msg, stdout);
-}
-
-void
-fp_query(const u_char *msg, FILE *file) {
- fp_nquery(msg, PACKETSZ, file);
-}
-
-/*
- * Print the contents of a query.
- * This is intended to be primarily a debugging routine.
- */
-void
-fp_nquery(const u_char *msg, int len, FILE *file) {
- ns_msg handle;
- int qdcount, ancount, nscount, arcount;
- u_int opcode, rcode, id;
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1)
- return;
-
- if (ns_initparse(msg, len, &handle) < 0) {
- fprintf(file, ";; ns_initparse: %s\n", strerror(errno));
- return;
- }
- opcode = ns_msg_getflag(handle, ns_f_opcode);
- rcode = ns_msg_getflag(handle, ns_f_rcode);
- id = ns_msg_id(handle);
- qdcount = ns_msg_count(handle, ns_s_qd);
- ancount = ns_msg_count(handle, ns_s_an);
- nscount = ns_msg_count(handle, ns_s_ns);
- arcount = ns_msg_count(handle, ns_s_ar);
-
- /*
- * Print header fields.
- */
- if ((!_res.pfcode) || (_res.pfcode & RES_PRF_HEADX) || rcode)
- fprintf(file,
- ";; ->>HEADER<<- opcode: %s, status: %s, id: %d\n",
- _res_opcodes[opcode], _res_resultcodes[rcode], id);
- if ((!_res.pfcode) || (_res.pfcode & RES_PRF_HEADX))
- putc(';', file);
- if ((!_res.pfcode) || (_res.pfcode & RES_PRF_HEAD2)) {
- fprintf(file, "; flags:");
- if (ns_msg_getflag(handle, ns_f_qr))
- fprintf(file, " qr");
- if (ns_msg_getflag(handle, ns_f_aa))
- fprintf(file, " aa");
- if (ns_msg_getflag(handle, ns_f_tc))
- fprintf(file, " tc");
- if (ns_msg_getflag(handle, ns_f_rd))
- fprintf(file, " rd");
- if (ns_msg_getflag(handle, ns_f_ra))
- fprintf(file, " ra");
- if (ns_msg_getflag(handle, ns_f_z))
- fprintf(file, " ??");
- if (ns_msg_getflag(handle, ns_f_ad))
- fprintf(file, " ad");
- if (ns_msg_getflag(handle, ns_f_cd))
- fprintf(file, " cd");
- }
- if ((!_res.pfcode) || (_res.pfcode & RES_PRF_HEAD1)) {
- fprintf(file, "; %s: %d",
- p_section(ns_s_qd, opcode), qdcount);
- fprintf(file, ", %s: %d",
- p_section(ns_s_an, opcode), ancount);
- fprintf(file, ", %s: %d",
- p_section(ns_s_ns, opcode), nscount);
- fprintf(file, ", %s: %d",
- p_section(ns_s_ar, opcode), arcount);
- }
- if ((!_res.pfcode) || (_res.pfcode &
- (RES_PRF_HEADX | RES_PRF_HEAD2 | RES_PRF_HEAD1))) {
- putc('\n',file);
- }
- /*
- * Print the various sections.
- */
- do_section(&handle, ns_s_qd, RES_PRF_QUES, file);
- do_section(&handle, ns_s_an, RES_PRF_ANS, file);
- do_section(&handle, ns_s_ns, RES_PRF_AUTH, file);
- do_section(&handle, ns_s_ar, RES_PRF_ADD, file);
- if (qdcount == 0 && ancount == 0 &&
- nscount == 0 && arcount == 0)
- putc('\n', file);
-}
-
-const u_char *
-p_cdnname(const u_char *cp, const u_char *msg, int len, FILE *file) {
- char name[MAXDNAME];
- int n;
-
- if ((n = dn_expand(msg, msg + len, cp, name, sizeof name)) < 0)
- return (NULL);
- if (name[0] == '\0')
- putc('.', file);
- else
- fputs(name, file);
- return (cp + n);
-}
-
-const u_char *
-p_cdname(const u_char *cp, const u_char *msg, FILE *file) {
- return (p_cdnname(cp, msg, PACKETSZ, file));
-}
-
-/* Return a fully-qualified domain name from a compressed name (with
- length supplied). */
-
-const u_char *
-p_fqnname(cp, msg, msglen, name, namelen)
- const u_char *cp, *msg;
- int msglen;
- char *name;
- int namelen;
-{
- int n, newlen;
-
- if ((n = dn_expand(msg, cp + msglen, cp, name, namelen)) < 0)
- return (NULL);
- newlen = strlen(name);
- if (newlen == 0 || name[newlen - 1] != '.') {
- if (newlen + 1 >= namelen) /* Lack space for final dot */
- return (NULL);
- else
- strcpy(name + newlen, ".");
- }
- return (cp + n);
-}
-
-/* XXX: the rest of these functions need to become length-limited, too. */
-
-const u_char *
-p_fqname(const u_char *cp, const u_char *msg, FILE *file) {
- char name[MAXDNAME];
- const u_char *n;
-
- n = p_fqnname(cp, msg, MAXCDNAME, name, sizeof name);
- if (n == NULL)
- return (NULL);
- fputs(name, file);
- return (n);
-}
-
-/*
- * Names of RR classes and qclasses. Classes and qclasses are the same, except
- * that C_ANY is a qclass but not a class. (You can ask for records of class
- * C_ANY, but you can't have any records of that class in the database.)
- */
-const struct res_sym __p_class_syms[] = {
- {C_IN, "IN"},
- {C_CHAOS, "CHAOS"},
- {C_HS, "HS"},
- {C_HS, "HESIOD"},
- {C_ANY, "ANY"},
- {C_NONE, "NONE"},
- {C_IN, (char *)0}
-};
-
-/*
- * Names of message sections.
- */
-const struct res_sym __p_default_section_syms[] = {
- {ns_s_qd, "QUERY"},
- {ns_s_an, "ANSWER"},
- {ns_s_ns, "AUTHORITY"},
- {ns_s_ar, "ADDITIONAL"},
- {0, (char *)0}
-};
-
-const struct res_sym __p_update_section_syms[] = {
- {S_ZONE, "ZONE"},
- {S_PREREQ, "PREREQUISITE"},
- {S_UPDATE, "UPDATE"},
- {S_ADDT, "ADDITIONAL"},
- {0, (char *)0}
-};
-
-/*
- * Names of RR types and qtypes. Types and qtypes are the same, except
- * that T_ANY is a qtype but not a type. (You can ask for records of type
- * T_ANY, but you can't have any records of that type in the database.)
- */
-const struct res_sym __p_type_syms[] = {
- {T_A, "A", "address"},
- {T_NS, "NS", "name server"},
- {T_MD, "MD", "mail destination (deprecated)"},
- {T_MF, "MF", "mail forwarder (deprecated)"},
- {T_CNAME, "CNAME", "canonical name"},
- {T_SOA, "SOA", "start of authority"},
- {T_MB, "MB", "mailbox"},
- {T_MG, "MG", "mail group member"},
- {T_MR, "MR", "mail rename"},
- {T_NULL, "NULL", "null"},
- {T_WKS, "WKS", "well-known service (deprecated)"},
- {T_PTR, "PTR", "domain name pointer"},
- {T_HINFO, "HINFO", "host information"},
- {T_MINFO, "MINFO", "mailbox information"},
- {T_MX, "MX", "mail exchanger"},
- {T_TXT, "TXT", "text"},
- {T_RP, "RP", "responsible person"},
- {T_AFSDB, "AFSDB", "DCE or AFS server"},
- {T_X25, "X25", "X25 address"},
- {T_ISDN, "ISDN", "ISDN address"},
- {T_RT, "RT", "router"},
- {T_NSAP, "NSAP", "nsap address"},
- {T_NSAP_PTR, "NSAP_PTR", "domain name pointer"},
- {T_SIG, "SIG", "signature"},
- {T_KEY, "KEY", "key"},
- {T_PX, "PX", "mapping information"},
- {T_GPOS, "GPOS", "geographical position (withdrawn)"},
- {T_AAAA, "AAAA", "IPv6 address"},
- {T_LOC, "LOC", "location"},
- {T_NXT, "NXT", "next valid name (unimplemented)"},
- {T_EID, "EID", "endpoint identifier (unimplemented)"},
- {T_NIMLOC, "NIMLOC", "NIMROD locator (unimplemented)"},
- {T_SRV, "SRV", "server selection"},
- {T_ATMA, "ATMA", "ATM address (unimplemented)"},
- {T_IXFR, "IXFR", "incremental zone transfer"},
- {T_AXFR, "AXFR", "zone transfer"},
- {T_MAILB, "MAILB", "mailbox-related data (deprecated)"},
- {T_MAILA, "MAILA", "mail agent (deprecated)"},
- {T_NAPTR, "NAPTR", "URN Naming Authority"},
- {T_ANY, "ANY", "\"any\""},
- {0, NULL, NULL}
-};
-
-int
-sym_ston(const struct res_sym *syms, const char *name, int *success) {
- for ((void)NULL; syms->name != 0; syms++) {
- if (strcasecmp (name, syms->name) == 0) {
- if (success)
- *success = 1;
- return (syms->number);
- }
- }
- if (success)
- *success = 0;
- return (syms->number); /* The default value. */
-}
-
-const char *
-sym_ntos(const struct res_sym *syms, int number, int *success) {
- static char unname[20];
-
- for ((void)NULL; syms->name != 0; syms++) {
- if (number == syms->number) {
- if (success)
- *success = 1;
- return (syms->name);
- }
- }
-
- sprintf(unname, "%d", number);
- if (success)
- *success = 0;
- return (unname);
-}
-
-const char *
-sym_ntop(const struct res_sym *syms, int number, int *success) {
- static char unname[20];
-
- for ((void)NULL; syms->name != 0; syms++) {
- if (number == syms->number) {
- if (success)
- *success = 1;
- return (syms->humanname);
- }
- }
- sprintf(unname, "%d", number);
- if (success)
- *success = 0;
- return (unname);
-}
-
-/*
- * Return a string for the type.
- */
-const char *
-p_type(int type) {
- return (sym_ntos(__p_type_syms, type, (int *)0));
-}
-
-/*
- * Return a string for the type.
- */
-const char *
-p_section(int section, int opcode) {
- const struct res_sym *symbols;
-
- switch (opcode) {
- case ns_o_update:
- symbols = __p_update_section_syms;
- break;
- default:
- symbols = __p_default_section_syms;
- break;
- }
- return (sym_ntos(symbols, section, (int *)0));
-}
-
-/*
- * Return a mnemonic for class.
- */
-const char *
-p_class(int class) {
- return (sym_ntos(__p_class_syms, class, (int *)0));
-}
-
-/*
- * Return a mnemonic for an option
- */
-const char *
-p_option(u_long option) {
- static char nbuf[40];
-
- switch (option) {
- case RES_INIT: return "init";
- case RES_DEBUG: return "debug";
- case RES_AAONLY: return "aaonly(unimpl)";
- case RES_USEVC: return "usevc";
- case RES_PRIMARY: return "primry(unimpl)";
- case RES_IGNTC: return "igntc";
- case RES_RECURSE: return "recurs";
- case RES_DEFNAMES: return "defnam";
- case RES_STAYOPEN: return "styopn";
- case RES_DNSRCH: return "dnsrch";
- case RES_INSECURE1: return "insecure1";
- case RES_INSECURE2: return "insecure2";
- default: sprintf(nbuf, "?0x%lx?", (u_long)option);
- return (nbuf);
- }
-}
-
-/*
- * Return a mnemonic for a time to live.
- */
-const char *
-p_time(u_int32_t value) {
- static char nbuf[40];
-
- if (ns_format_ttl(value, nbuf, sizeof nbuf) < 0)
- sprintf(nbuf, "%u", value);
- return (nbuf);
-}
-
-
-/*
- * routines to convert between on-the-wire RR format and zone file format.
- * Does not contain conversion to/from decimal degrees; divide or multiply
- * by 60*60*1000 for that.
- */
-
-static unsigned int poweroften[10] = {1, 10, 100, 1000, 10000, 100000,
- 1000000,10000000,100000000,1000000000};
-
-/* takes an XeY precision/size value, returns a string representation. */
-static const char *
-precsize_ntoa(prec)
- u_int8_t prec;
-{
- static char retbuf[sizeof "90000000.00"];
- unsigned long val;
- int mantissa, exponent;
-
- mantissa = (int)((prec >> 4) & 0x0f) % 10;
- exponent = (int)((prec >> 0) & 0x0f) % 10;
-
- val = mantissa * poweroften[exponent];
-
- (void) sprintf(retbuf, "%ld.%.2ld", val/100, val%100);
- return (retbuf);
-}
-
-/* converts ascii size/precision X * 10**Y(cm) to 0xXY. moves pointer. */
-static u_int8_t
-precsize_aton(strptr)
- char **strptr;
-{
- unsigned int mval = 0, cmval = 0;
- u_int8_t retval = 0;
- char *cp;
- int exponent;
- int mantissa;
-
- cp = *strptr;
-
- while (isdigit((int)*cp))
- mval = mval * 10 + (*cp++ - '0');
-
- if (*cp == '.') { /* centimeters */
- cp++;
- if (isdigit((int)*cp)) {
- cmval = (*cp++ - '0') * 10;
- if (isdigit((int)*cp)) {
- cmval += (*cp++ - '0');
- }
- }
- }
- cmval = (mval * 100) + cmval;
-
- for (exponent = 0; exponent < 9; exponent++)
- if (cmval < poweroften[exponent+1])
- break;
-
- mantissa = cmval / poweroften[exponent];
- if (mantissa > 9)
- mantissa = 9;
-
- retval = (mantissa << 4) | exponent;
-
- *strptr = cp;
-
- return (retval);
-}
-
-/* converts ascii lat/lon to unsigned encoded 32-bit number. moves pointer. */
-static u_int32_t
-latlon2ul(latlonstrptr,which)
- char **latlonstrptr;
- int *which;
-{
- char *cp;
- u_int32_t retval;
- int deg = 0, min = 0, secs = 0, secsfrac = 0;
-
- cp = *latlonstrptr;
-
- while (isdigit((int)*cp))
- deg = deg * 10 + (*cp++ - '0');
-
- while (isspace((int)*cp))
- cp++;
-
- if (!(isdigit((int)*cp)))
- goto fndhemi;
-
- while (isdigit((int)*cp))
- min = min * 10 + (*cp++ - '0');
-
- while (isspace((int)*cp))
- cp++;
-
- if (!(isdigit((int)*cp)))
- goto fndhemi;
-
- while (isdigit((int)*cp))
- secs = secs * 10 + (*cp++ - '0');
-
- if (*cp == '.') { /* decimal seconds */
- cp++;
- if (isdigit((int)*cp)) {
- secsfrac = (*cp++ - '0') * 100;
- if (isdigit((int)*cp)) {
- secsfrac += (*cp++ - '0') * 10;
- if (isdigit((int)*cp)) {
- secsfrac += (*cp++ - '0');
- }
- }
- }
- }
-
- while (!isspace((int)*cp)) /* if any trailing garbage */
- cp++;
-
- while (isspace((int)*cp))
- cp++;
-
- fndhemi:
- switch (*cp) {
- case 'N': case 'n':
- case 'E': case 'e':
- retval = ((unsigned)1<<31)
- + (((((deg * 60) + min) * 60) + secs) * 1000)
- + secsfrac;
- break;
- case 'S': case 's':
- case 'W': case 'w':
- retval = ((unsigned)1<<31)
- - (((((deg * 60) + min) * 60) + secs) * 1000)
- - secsfrac;
- break;
- default:
- retval = 0; /* invalid value -- indicates error */
- break;
- }
-
- switch (*cp) {
- case 'N': case 'n':
- case 'S': case 's':
- *which = 1; /* latitude */
- break;
- case 'E': case 'e':
- case 'W': case 'w':
- *which = 2; /* longitude */
- break;
- default:
- *which = 0; /* error */
- break;
- }
-
- cp++; /* skip the hemisphere */
-
- while (!isspace((int)*cp)) /* if any trailing garbage */
- cp++;
-
- while (isspace((int)*cp)) /* move to next field */
- cp++;
-
- *latlonstrptr = cp;
-
- return (retval);
-}
-
-/* converts a zone file representation in a string to an RDATA on-the-wire
- * representation. */
-int
-loc_aton(ascii, binary)
- const char *ascii;
- u_char *binary;
-{
- const char *cp, *maxcp;
- u_char *bcp;
-
- u_int32_t latit = 0, longit = 0, alt = 0;
- u_int32_t lltemp1 = 0, lltemp2 = 0;
- int altmeters = 0, altfrac = 0, altsign = 1;
- u_int8_t hp = 0x16; /* default = 1e6 cm = 10000.00m = 10km */
- u_int8_t vp = 0x13; /* default = 1e3 cm = 10.00m */
- u_int8_t siz = 0x12; /* default = 1e2 cm = 1.00m */
- int which1 = 0, which2 = 0;
-
- cp = ascii;
- maxcp = cp + strlen(ascii);
-
- lltemp1 = latlon2ul(&cp, &which1);
-
- lltemp2 = latlon2ul(&cp, &which2);
-
- switch (which1 + which2) {
- case 3: /* 1 + 2, the only valid combination */
- if ((which1 == 1) && (which2 == 2)) { /* normal case */
- latit = lltemp1;
- longit = lltemp2;
- } else if ((which1 == 2) && (which2 == 1)) { /* reversed */
- longit = lltemp1;
- latit = lltemp2;
- } else { /* some kind of brokenness */
- return (0);
- }
- break;
- default: /* we didn't get one of each */
- return (0);
- }
-
- /* altitude */
- if (*cp == '-') {
- altsign = -1;
- cp++;
- }
-
- if (*cp == '+')
- cp++;
-
- while (isdigit((int)*cp))
- altmeters = altmeters * 10 + (*cp++ - '0');
-
- if (*cp == '.') { /* decimal meters */
- cp++;
- if (isdigit((int)*cp)) {
- altfrac = (*cp++ - '0') * 10;
- if (isdigit((int)*cp)) {
- altfrac += (*cp++ - '0');
- }
- }
- }
-
- alt = (10000000 + (altsign * (altmeters * 100 + altfrac)));
-
- while (!isspace((int)*cp) && (cp < maxcp)) /* if trailing garbage or m */
- cp++;
-
- while (isspace((int)*cp) && (cp < maxcp))
- cp++;
-
- if (cp >= maxcp)
- goto defaults;
-
- siz = precsize_aton(&cp);
-
- while (!isspace((int)*cp) && (cp < maxcp)) /* if trailing garbage or m */
- cp++;
-
- while (isspace((int)*cp) && (cp < maxcp))
- cp++;
-
- if (cp >= maxcp)
- goto defaults;
-
- hp = precsize_aton(&cp);
-
- while (!isspace((int)*cp) && (cp < maxcp)) /* if trailing garbage or m */
- cp++;
-
- while (isspace((int)*cp) && (cp < maxcp))
- cp++;
-
- if (cp >= maxcp)
- goto defaults;
-
- vp = precsize_aton(&cp);
-
- defaults:
-
- bcp = binary;
- *bcp++ = (u_int8_t) 0; /* version byte */
- *bcp++ = siz;
- *bcp++ = hp;
- *bcp++ = vp;
- PUTLONG(latit,bcp);
- PUTLONG(longit,bcp);
- PUTLONG(alt,bcp);
-
- return (16); /* size of RR in octets */
-}
-
-/* takes an on-the-wire LOC RR and formats it in a human readable format. */
-const char *
-loc_ntoa(binary, ascii)
- const u_char *binary;
- char *ascii;
-{
- static char *error = "?";
- const u_char *cp = binary;
-
- int latdeg, latmin, latsec, latsecfrac;
- int longdeg, longmin, longsec, longsecfrac;
- char northsouth, eastwest;
- int altmeters, altfrac, altsign;
-
- const u_int32_t referencealt = 100000 * 100;
-
- int32_t latval, longval, altval;
- u_int32_t templ;
- u_int8_t sizeval, hpval, vpval, versionval;
-
- char *sizestr, *hpstr, *vpstr;
-
- versionval = *cp++;
-
- if (versionval) {
- (void) sprintf(ascii, "; error: unknown LOC RR version");
- return (ascii);
- }
-
- sizeval = *cp++;
-
- hpval = *cp++;
- vpval = *cp++;
-
- GETLONG(templ, cp);
- latval = (templ - ((unsigned)1<<31));
-
- GETLONG(templ, cp);
- longval = (templ - ((unsigned)1<<31));
-
- GETLONG(templ, cp);
- if (templ < referencealt) { /* below WGS 84 spheroid */
- altval = referencealt - templ;
- altsign = -1;
- } else {
- altval = templ - referencealt;
- altsign = 1;
- }
-
- if (latval < 0) {
- northsouth = 'S';
- latval = -latval;
- } else
- northsouth = 'N';
-
- latsecfrac = latval % 1000;
- latval = latval / 1000;
- latsec = latval % 60;
- latval = latval / 60;
- latmin = latval % 60;
- latval = latval / 60;
- latdeg = latval;
-
- if (longval < 0) {
- eastwest = 'W';
- longval = -longval;
- } else
- eastwest = 'E';
-
- longsecfrac = longval % 1000;
- longval = longval / 1000;
- longsec = longval % 60;
- longval = longval / 60;
- longmin = longval % 60;
- longval = longval / 60;
- longdeg = longval;
-
- altfrac = altval % 100;
- altmeters = (altval / 100) * altsign;
-
- if ((sizestr = strdup(precsize_ntoa(sizeval))) == NULL)
- sizestr = error;
- if ((hpstr = strdup(precsize_ntoa(hpval))) == NULL)
- hpstr = error;
- if ((vpstr = strdup(precsize_ntoa(vpval))) == NULL)
- vpstr = error;
-
- sprintf(ascii,
- "%d %.2d %.2d.%.3d %c %d %.2d %.2d.%.3d %c %d.%.2dm %sm %sm %sm",
- latdeg, latmin, latsec, latsecfrac, northsouth,
- longdeg, longmin, longsec, longsecfrac, eastwest,
- altmeters, altfrac, sizestr, hpstr, vpstr);
-
- if (sizestr != error)
- free(sizestr);
- if (hpstr != error)
- free(hpstr);
- if (vpstr != error)
- free(vpstr);
-
- return (ascii);
-}
-
-
-/* Return the number of DNS hierarchy levels in the name. */
-int
-dn_count_labels(const char *name) {
- int i, len, count;
-
- len = strlen(name);
- for (i = 0, count = 0; i < len; i++) {
- /* XXX need to check for \. or use named's nlabels(). */
- if (name[i] == '.')
- count++;
- }
-
- /* don't count initial wildcard */
- if (name[0] == '*')
- if (count)
- count--;
-
- /* don't count the null label for root. */
- /* if terminating '.' not found, must adjust */
- /* count to include last label */
- if (len > 0 && name[len-1] != '.')
- count++;
- return (count);
-}
-
-
-/*
- * Make dates expressed in seconds-since-Jan-1-1970 easy to read.
- * SIG records are required to be printed like this, by the Secure DNS RFC.
- */
-char *
-p_secstodate (u_long secs) {
- static char output[15]; /* YYYYMMDDHHMMSS and null */
- time_t clock = secs;
- struct tm *time;
-
- time = gmtime(&clock);
- time->tm_year += 1900;
- time->tm_mon += 1;
- sprintf(output, "%04d%02d%02d%02d%02d%02d",
- time->tm_year, time->tm_mon, time->tm_mday,
- time->tm_hour, time->tm_min, time->tm_sec);
- return (output);
-}
diff --git a/c/src/exec/libnetworking/libc/res_init.c b/c/src/exec/libnetworking/libc/res_init.c
deleted file mode 100644
index 9371e9fa82..0000000000
--- a/c/src/exec/libnetworking/libc/res_init.c
+++ /dev/null
@@ -1,497 +0,0 @@
-/*
- * Copyright (c) 1985, 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-/*
- * Portions Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)res_init.c 8.1 (Berkeley) 6/7/93";
-static char orig_rcsid[] = "From: Id: res_init.c,v 8.7 1996/11/18 09:10:04 vixie Exp $";
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <sys/time.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-#include <ctype.h>
-#include <resolv.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include "res_config.h"
-
-static void res_setoptions __P((char *, char *));
-
-#ifdef RESOLVSORT
-static const char sort_mask[] = "/&";
-#define ISSORTMASK(ch) (strchr(sort_mask, ch) != NULL)
-static u_int32_t net_mask __P((struct in_addr));
-#endif
-
-#if !defined(isascii) /* XXX - could be a function */
-# define isascii(c) (!(c & 0200))
-#endif
-
-/*
- * Resolver state default settings.
- */
-
-struct __res_state _res
-# if defined(__BIND_RES_TEXT)
- = { RES_TIMEOUT, } /* Motorola, et al. */
-# endif
- ;
-
-
-/*
- * Set up default settings. If the configuration file exist, the values
- * there will have precedence. Otherwise, the server address is set to
- * INADDR_ANY and the default domain name comes from the gethostname().
- *
- * An interrim version of this code (BIND 4.9, pre-4.4BSD) used 127.0.0.1
- * rather than INADDR_ANY ("0.0.0.0") as the default name server address
- * since it was noted that INADDR_ANY actually meant ``the first interface
- * you "ifconfig"'d at boot time'' and if this was a SLIP or PPP interface,
- * it had to be "up" in order for you to reach your own name server. It
- * was later decided that since the recommended practice is to always
- * install local static routes through 127.0.0.1 for all your network
- * interfaces, that we could solve this problem without a code change.
- *
- * The configuration file should always be used, since it is the only way
- * to specify a default domain. If you are running a server on your local
- * machine, you should say "nameserver 0.0.0.0" or "nameserver 127.0.0.1"
- * in the configuration file.
- *
- * Return 0 if completes successfully, -1 on error
- */
-int
-res_init()
-{
- register FILE *fp;
- register char *cp, **pp;
- register int n;
- char buf[MAXDNAME];
- int nserv = 0; /* number of nameserver records read from file */
- int haveenv = 0;
- int havesearch = 0;
-#ifdef RESOLVSORT
- int nsort = 0;
- char *net;
-#endif
-#ifndef RFC1535
- int dots;
-#endif
-
- /*
- * These three fields used to be statically initialized. This made
- * it hard to use this code in a shared library. It is necessary,
- * now that we're doing dynamic initialization here, that we preserve
- * the old semantics: if an application modifies one of these three
- * fields of _res before res_init() is called, res_init() will not
- * alter them. Of course, if an application is setting them to
- * _zero_ before calling res_init(), hoping to override what used
- * to be the static default, we can't detect it and unexpected results
- * will follow. Zero for any of these fields would make no sense,
- * so one can safely assume that the applications were already getting
- * unexpected results.
- *
- * _res.options is tricky since some apps were known to diddle the bits
- * before res_init() was first called. We can't replicate that semantic
- * with dynamic initialization (they may have turned bits off that are
- * set in RES_DEFAULT). Our solution is to declare such applications
- * "broken". They could fool us by setting RES_INIT but none do (yet).
- */
- if (!_res.retrans)
- _res.retrans = RES_TIMEOUT;
- if (!_res.retry)
- _res.retry = 4;
- if (!(_res.options & RES_INIT))
- _res.options = RES_DEFAULT;
-
- /*
- * This one used to initialize implicitly to zero, so unless the app
- * has set it to something in particular, we can randomize it now.
- */
- if (!_res.id)
- _res.id = res_randomid();
-
-#ifdef USELOOPBACK
- _res.nsaddr.sin_addr = inet_makeaddr(IN_LOOPBACKNET, 1);
-#else
- _res.nsaddr.sin_addr.s_addr = INADDR_ANY;
-#endif
- _res.nsaddr.sin_family = AF_INET;
- _res.nsaddr.sin_port = htons(NAMESERVER_PORT);
- _res.nscount = 1;
- _res.ndots = 1;
- _res.pfcode = 0;
-
- /*
- * RTEMS -- Set up name servers
- */
- {
-#include <rtems/rtems_bsdnet_internal.h>
- int n = 0;
- while ((n < rtems_bsdnet_nameserver_count) && (nserv < MAXNS)) {
- _res.nsaddr_list[nserv].sin_addr = rtems_bsdnet_nameserver[n];
- _res.nsaddr_list[nserv].sin_family = AF_INET;
- _res.nsaddr_list[nserv].sin_port = htons(NAMESERVER_PORT);
- nserv++;
- n++;
- }
- if (rtems_bsdnet_domain_name)
- (void)strncpy(_res.defdname, rtems_bsdnet_domain_name, sizeof(_res.defdname) - 1);
- }
-
- /* Allow user to override the local domain definition */
- if ((cp = getenv("LOCALDOMAIN")) != NULL) {
- (void)strncpy(_res.defdname, cp, sizeof(_res.defdname) - 1);
- haveenv++;
-
- /*
- * Set search list to be blank-separated strings
- * from rest of env value. Permits users of LOCALDOMAIN
- * to still have a search list, and anyone to set the
- * one that they want to use as an individual (even more
- * important now that the rfc1535 stuff restricts searches)
- */
- cp = _res.defdname;
- pp = _res.dnsrch;
- *pp++ = cp;
- for (n = 0; *cp && pp < _res.dnsrch + MAXDNSRCH; cp++) {
- if (*cp == '\n') /* silly backwards compat */
- break;
- else if (*cp == ' ' || *cp == '\t') {
- *cp = 0;
- n = 1;
- } else if (n) {
- *pp++ = cp;
- n = 0;
- havesearch = 1;
- }
- }
- /* null terminate last domain if there are excess */
- while (*cp != '\0' && *cp != ' ' && *cp != '\t' && *cp != '\n')
- cp++;
- *cp = '\0';
- *pp++ = 0;
- }
-
-#define MATCH(line, name) \
- (!strncmp(line, name, sizeof(name) - 1) && \
- (line[sizeof(name) - 1] == ' ' || \
- line[sizeof(name) - 1] == '\t'))
-
- if ((fp = fopen(_PATH_RESCONF, "r")) != NULL) {
- /* read the config file */
- while (fgets(buf, sizeof(buf), fp) != NULL) {
- /* skip comments */
- if (*buf == ';' || *buf == '#')
- continue;
- /* read default domain name */
- if (MATCH(buf, "domain")) {
- if (haveenv) /* skip if have from environ */
- continue;
- cp = buf + sizeof("domain") - 1;
- while (*cp == ' ' || *cp == '\t')
- cp++;
- if ((*cp == '\0') || (*cp == '\n'))
- continue;
- strncpy(_res.defdname, cp, sizeof(_res.defdname) - 1);
- if ((cp = strpbrk(_res.defdname, " \t\n")) != NULL)
- *cp = '\0';
- havesearch = 0;
- continue;
- }
- /* set search list */
- if (MATCH(buf, "search")) {
- if (haveenv) /* skip if have from environ */
- continue;
- cp = buf + sizeof("search") - 1;
- while (*cp == ' ' || *cp == '\t')
- cp++;
- if ((*cp == '\0') || (*cp == '\n'))
- continue;
- strncpy(_res.defdname, cp, sizeof(_res.defdname) - 1);
- if ((cp = strchr(_res.defdname, '\n')) != NULL)
- *cp = '\0';
- /*
- * Set search list to be blank-separated strings
- * on rest of line.
- */
- cp = _res.defdname;
- pp = _res.dnsrch;
- *pp++ = cp;
- for (n = 0; *cp && pp < _res.dnsrch + MAXDNSRCH; cp++) {
- if (*cp == ' ' || *cp == '\t') {
- *cp = 0;
- n = 1;
- } else if (n) {
- *pp++ = cp;
- n = 0;
- }
- }
- /* null terminate last domain if there are excess */
- while (*cp != '\0' && *cp != ' ' && *cp != '\t')
- cp++;
- *cp = '\0';
- *pp++ = 0;
- havesearch = 1;
- continue;
- }
- /* read nameservers to query */
- if (MATCH(buf, "nameserver") && nserv < MAXNS) {
- struct in_addr a;
-
- cp = buf + sizeof("nameserver") - 1;
- while (*cp == ' ' || *cp == '\t')
- cp++;
- if ((*cp != '\0') && (*cp != '\n') && inet_aton(cp, &a)) {
- _res.nsaddr_list[nserv].sin_addr = a;
- _res.nsaddr_list[nserv].sin_family = AF_INET;
- _res.nsaddr_list[nserv].sin_port =
- htons(NAMESERVER_PORT);
- nserv++;
- }
- continue;
- }
-#ifdef RESOLVSORT
- if (MATCH(buf, "sortlist")) {
- struct in_addr a;
-
- cp = buf + sizeof("sortlist") - 1;
- while (nsort < MAXRESOLVSORT) {
- while (*cp == ' ' || *cp == '\t')
- cp++;
- if (*cp == '\0' || *cp == '\n' || *cp == ';')
- break;
- net = cp;
- while (*cp && !ISSORTMASK(*cp) && *cp != ';' &&
- isascii((int)*cp) && !isspace((int)*cp))
- cp++;
- n = *cp;
- *cp = 0;
- if (inet_aton(net, &a)) {
- _res.sort_list[nsort].addr = a;
- if (ISSORTMASK(n)) {
- *cp++ = n;
- net = cp;
- while (*cp && *cp != ';' &&
- isascii((int)*cp) && !isspace((int)*cp))
- cp++;
- n = *cp;
- *cp = 0;
- if (inet_aton(net, &a)) {
- _res.sort_list[nsort].mask = a.s_addr;
- } else {
- _res.sort_list[nsort].mask =
- net_mask(_res.sort_list[nsort].addr);
- }
- } else {
- _res.sort_list[nsort].mask =
- net_mask(_res.sort_list[nsort].addr);
- }
- nsort++;
- }
- *cp = n;
- }
- continue;
- }
-#endif
- if (MATCH(buf, "options")) {
- res_setoptions(buf + sizeof("options") - 1, "conf");
- continue;
- }
- }
- if (nserv > 1)
- _res.nscount = nserv;
-#ifdef RESOLVSORT
- _res.nsort = nsort;
-#endif
- (void) fclose(fp);
- }
- if (_res.defdname[0] == 0 &&
- gethostname(buf, sizeof(_res.defdname) - 1) == 0 &&
- (cp = strchr(buf, '.')) != NULL)
- strcpy(_res.defdname, cp + 1);
-
- /* find components of local domain that might be searched */
- if (havesearch == 0) {
- pp = _res.dnsrch;
- *pp++ = _res.defdname;
- *pp = NULL;
-
-#ifndef RFC1535
- dots = 0;
- for (cp = _res.defdname; *cp; cp++)
- dots += (*cp == '.');
-
- cp = _res.defdname;
- while (pp < _res.dnsrch + MAXDFLSRCH) {
- if (dots < LOCALDOMAINPARTS)
- break;
- cp = strchr(cp, '.') + 1; /* we know there is one */
- *pp++ = cp;
- dots--;
- }
- *pp = NULL;
-#ifdef DEBUG
- if (_res.options & RES_DEBUG) {
- printf(";; res_init()... default dnsrch list:\n");
- for (pp = _res.dnsrch; *pp; pp++)
- printf(";;\t%s\n", *pp);
- printf(";;\t..END..\n");
- }
-#endif
-#endif /* !RFC1535 */
- }
-
- if ((cp = getenv("RES_OPTIONS")) != NULL)
- res_setoptions(cp, "env");
- _res.options |= RES_INIT;
- return (0);
-}
-
-static void
-res_setoptions(options, source)
- char *options, *source;
-{
- char *cp = options;
- int i;
-
-#ifdef DEBUG
- if (_res.options & RES_DEBUG)
- printf(";; res_setoptions(\"%s\", \"%s\")...\n",
- options, source);
-#endif
- while (*cp) {
- /* skip leading and inner runs of spaces */
- while (*cp == ' ' || *cp == '\t')
- cp++;
- /* search for and process individual options */
- if (!strncmp(cp, "ndots:", sizeof("ndots:") - 1)) {
- i = atoi(cp + sizeof("ndots:") - 1);
- if (i <= RES_MAXNDOTS)
- _res.ndots = i;
- else
- _res.ndots = RES_MAXNDOTS;
-#ifdef DEBUG
- if (_res.options & RES_DEBUG)
- printf(";;\tndots=%d\n", _res.ndots);
-#endif
- } else if (!strncmp(cp, "debug", sizeof("debug") - 1)) {
-#ifdef DEBUG
- if (!(_res.options & RES_DEBUG)) {
- printf(";; res_setoptions(\"%s\", \"%s\")..\n",
- options, source);
- _res.options |= RES_DEBUG;
- }
- printf(";;\tdebug\n");
-#endif
- } else if (!strncmp(cp, "inet6", sizeof("inet6") - 1)) {
- _res.options |= RES_USE_INET6;
- } else if (!strncmp(cp, "no_tld_query", sizeof("no_tld_query") - 1)) {
- _res.options |= RES_NOTLDQUERY;
- } else {
- /* XXX - print a warning here? */
- }
- /* skip to next run of spaces */
- while (*cp && *cp != ' ' && *cp != '\t')
- cp++;
- }
-}
-
-#ifdef RESOLVSORT
-/* XXX - should really support CIDR which means explicit masks always. */
-static u_int32_t
-net_mask(in) /* XXX - should really use system's version of this */
- struct in_addr in;
-{
- register u_int32_t i = ntohl(in.s_addr);
-
- if (IN_CLASSA(i))
- return (htonl(IN_CLASSA_NET));
- else if (IN_CLASSB(i))
- return (htonl(IN_CLASSB_NET));
- return (htonl(IN_CLASSC_NET));
-}
-#endif
-
-u_int
-res_randomid()
-{
- struct timeval now;
-
- gettimeofday(&now, NULL);
- return (0xffff & (now.tv_sec ^ now.tv_usec ^ getpid()));
-}
diff --git a/c/src/exec/libnetworking/libc/res_mkquery.c b/c/src/exec/libnetworking/libc/res_mkquery.c
deleted file mode 100644
index d3fabfa5ab..0000000000
--- a/c/src/exec/libnetworking/libc/res_mkquery.c
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- * Copyright (c) 1985, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-/*
- * Portions Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)res_mkquery.c 8.1 (Berkeley) 6/4/93";
-static char orig_rcsid[] = "From: Id: res_mkquery.c,v 8.9 1997/04/24 22:22:36 vixie Exp $";
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-#include <netdb.h>
-#include <resolv.h>
-#include <stdio.h>
-#include <string.h>
-
-#include "res_config.h"
-
-/*
- * Form all types of queries.
- * Returns the size of the result or -1.
- */
-int
-res_mkquery(op, dname, class, type, data, datalen, newrr_in, buf, buflen)
- int op; /* opcode of query */
- const char *dname; /* domain name */
- int class, type; /* class and type of query */
- const u_char *data; /* resource record data */
- int datalen; /* length of data */
- const u_char *newrr_in; /* new rr for modify or append */
- u_char *buf; /* buffer to put query */
- int buflen; /* size of buffer */
-{
- register HEADER *hp;
- register u_char *cp;
- register int n;
- u_char *dnptrs[20], **dpp, **lastdnptr;
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
- h_errno = NETDB_INTERNAL;
- return (-1);
- }
-#ifdef DEBUG
- if (_res.options & RES_DEBUG)
- printf(";; res_mkquery(%d, %s, %d, %d)\n",
- op, dname, class, type);
-#endif
- /*
- * Initialize header fields.
- */
- if ((buf == NULL) || (buflen < HFIXEDSZ))
- return (-1);
- memset(buf, 0, HFIXEDSZ);
- hp = (HEADER *) buf;
- hp->id = htons(++_res.id);
- hp->opcode = op;
- hp->rd = (_res.options & RES_RECURSE) != 0;
- hp->rcode = NOERROR;
- cp = buf + HFIXEDSZ;
- buflen -= HFIXEDSZ;
- dpp = dnptrs;
- *dpp++ = buf;
- *dpp++ = NULL;
- lastdnptr = dnptrs + sizeof dnptrs / sizeof dnptrs[0];
- /*
- * perform opcode specific processing
- */
- switch (op) {
- case QUERY: /*FALLTHROUGH*/
- case NS_NOTIFY_OP:
- if ((buflen -= QFIXEDSZ) < 0)
- return (-1);
- if ((n = dn_comp(dname, cp, buflen, dnptrs, lastdnptr)) < 0)
- return (-1);
- cp += n;
- buflen -= n;
- __putshort(type, cp);
- cp += INT16SZ;
- __putshort(class, cp);
- cp += INT16SZ;
- hp->qdcount = htons(1);
- if (op == QUERY || data == NULL)
- break;
- /*
- * Make an additional record for completion domain.
- */
- buflen -= RRFIXEDSZ;
- n = dn_comp((char *)data, cp, buflen, dnptrs, lastdnptr);
- if (n < 0)
- return (-1);
- cp += n;
- buflen -= n;
- __putshort(T_NULL, cp);
- cp += INT16SZ;
- __putshort(class, cp);
- cp += INT16SZ;
- __putlong(0, cp);
- cp += INT32SZ;
- __putshort(0, cp);
- cp += INT16SZ;
- hp->arcount = htons(1);
- break;
-
- case IQUERY:
- /*
- * Initialize answer section
- */
- if (buflen < 1 + RRFIXEDSZ + datalen)
- return (-1);
- *cp++ = '\0'; /* no domain name */
- __putshort(type, cp);
- cp += INT16SZ;
- __putshort(class, cp);
- cp += INT16SZ;
- __putlong(0, cp);
- cp += INT32SZ;
- __putshort(datalen, cp);
- cp += INT16SZ;
- if (datalen) {
- memcpy(cp, data, datalen);
- cp += datalen;
- }
- hp->ancount = htons(1);
- break;
-
- default:
- return (-1);
- }
- return (cp - buf);
-}
diff --git a/c/src/exec/libnetworking/libc/res_mkupdate.c b/c/src/exec/libnetworking/libc/res_mkupdate.c
deleted file mode 100644
index 56362f650b..0000000000
--- a/c/src/exec/libnetworking/libc/res_mkupdate.c
+++ /dev/null
@@ -1,415 +0,0 @@
-/*
- * Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-/*
- * Based on the Dynamic DNS reference implementation by Viraj Bais
- * <viraj_bais@ccm.fm.intel.com>
- */
-
-#if !defined(__rtems__)
-#if !defined(lint) && !defined(SABER)
-static char rcsid[] = "$Id$";
-#endif /* not lint */
-#endif /* not rtems */
-
-#include <sys/types.h>
-#include <sys/param.h>
-
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-#include <arpa/inet.h>
-
-#include <errno.h>
-#include <limits.h>
-#include <netdb.h>
-#include <resolv.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <ctype.h>
-
-#include "res_config.h"
-
-static int getnum_str(u_char **, u_char *);
-static int getword_str(char *, int, u_char **, u_char *);
-
-#define ShrinkBuffer(x) if ((buflen -= x) < 0) return (-2);
-
-/*
- * Form update packets.
- * Returns the size of the resulting packet if no error
- * On error,
- * returns -1 if error in reading a word/number in rdata
- * portion for update packets
- * -2 if length of buffer passed is insufficient
- * -3 if zone section is not the first section in
- * the linked list, or section order has a problem
- * -4 on a number overflow
- * -5 unknown operation or no records
- */
-int
-res_mkupdate(ns_updrec *rrecp_in, u_char *buf, int buflen) {
- ns_updrec *rrecp_start = rrecp_in;
- HEADER *hp;
- u_char *cp, *sp1, *sp2, *startp, *endp;
- int n, i, soanum, multiline;
- ns_updrec *rrecp;
- struct in_addr ina;
- char buf2[MAXDNAME];
- int section, numrrs = 0, counts[ns_s_max];
- u_int16_t rtype, rclass;
- u_int32_t n1, rttl;
- u_char *dnptrs[20], **dpp, **lastdnptr;
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
- h_errno = NETDB_INTERNAL;
- return (-1);
- }
-
- /*
- * Initialize header fields.
- */
- if ((buf == NULL) || (buflen < HFIXEDSZ))
- return (-1);
- memset(buf, 0, HFIXEDSZ);
- hp = (HEADER *) buf;
- hp->id = htons(++_res.id);
- hp->opcode = ns_o_update;
- hp->rcode = NOERROR;
- sp1 = buf + 2*INT16SZ; /* save pointer to zocount */
- cp = buf + HFIXEDSZ;
- buflen -= HFIXEDSZ;
- dpp = dnptrs;
- *dpp++ = buf;
- *dpp++ = NULL;
- lastdnptr = dnptrs + sizeof dnptrs / sizeof dnptrs[0];
-
- if (rrecp_start == NULL)
- return (-5);
- else if (rrecp_start->r_section != S_ZONE)
- return (-3);
-
- memset(counts, 0, sizeof counts);
- for (rrecp = rrecp_start; rrecp; rrecp = rrecp->r_grpnext) {
- numrrs++;
- section = rrecp->r_section;
- if (section < 0 || section >= ns_s_max)
- return (-1);
- counts[section]++;
- for (i = section + 1; i < ns_s_max; i++)
- if (counts[i])
- return (-3);
- rtype = rrecp->r_type;
- rclass = rrecp->r_class;
- rttl = rrecp->r_ttl;
- /* overload class and type */
- if (section == S_PREREQ) {
- rttl = 0;
- switch (rrecp->r_opcode) {
- case YXDOMAIN:
- rclass = C_ANY;
- rtype = T_ANY;
- rrecp->r_size = 0;
- break;
- case NXDOMAIN:
- rclass = C_NONE;
- rtype = T_ANY;
- rrecp->r_size = 0;
- break;
- case NXRRSET:
- rclass = C_NONE;
- rrecp->r_size = 0;
- break;
- case YXRRSET:
- if (rrecp->r_size == 0)
- rclass = C_ANY;
- break;
- default:
- fprintf(stderr,
- "res_mkupdate: incorrect opcode: %d\n",
- rrecp->r_opcode);
- fflush(stderr);
- return (-1);
- }
- } else if (section == S_UPDATE) {
- switch (rrecp->r_opcode) {
- case DELETE:
- rclass = rrecp->r_size == 0 ? C_ANY : C_NONE;
- break;
- case ADD:
- break;
- default:
- fprintf(stderr,
- "res_mkupdate: incorrect opcode: %d\n",
- rrecp->r_opcode);
- fflush(stderr);
- return (-1);
- }
- }
-
- /*
- * XXX appending default domain to owner name is omitted,
- * fqdn must be provided
- */
- if ((n = dn_comp(rrecp->r_dname, cp, buflen, dnptrs,
- lastdnptr)) < 0)
- return (-1);
- cp += n;
- ShrinkBuffer(n + 2*INT16SZ);
- PUTSHORT(rtype, cp);
- PUTSHORT(rclass, cp);
- if (section == S_ZONE) {
- if (numrrs != 1 || rrecp->r_type != T_SOA)
- return (-3);
- continue;
- }
- ShrinkBuffer(INT32SZ + INT16SZ);
- PUTLONG(rttl, cp);
- sp2 = cp; /* save pointer to length byte */
- cp += INT16SZ;
- if (rrecp->r_size == 0) {
- if (section == S_UPDATE && rclass != C_ANY)
- return (-1);
- else {
- PUTSHORT(0, sp2);
- continue;
- }
- }
- startp = rrecp->r_data;
- endp = startp + rrecp->r_size - 1;
- /* XXX this should be done centrally. */
- switch (rrecp->r_type) {
- case T_A:
- if (!getword_str(buf2, sizeof buf2, &startp, endp))
- return (-1);
- if (!inet_aton(buf2, &ina))
- return (-1);
- n1 = ntohl(ina.s_addr);
- ShrinkBuffer(INT32SZ);
- PUTLONG(n1, cp);
- break;
- case T_CNAME:
- case T_MB:
- case T_MG:
- case T_MR:
- case T_NS:
- case T_PTR:
- if (!getword_str(buf2, sizeof buf2, &startp, endp))
- return (-1);
- n = dn_comp(buf2, cp, buflen, dnptrs, lastdnptr);
- if (n < 0)
- return (-1);
- cp += n;
- ShrinkBuffer(n);
- break;
- case T_MINFO:
- case T_SOA:
- case T_RP:
- for (i = 0; i < 2; i++) {
- if (!getword_str(buf2, sizeof buf2, &startp,
- endp))
- return (-1);
- n = dn_comp(buf2, cp, buflen,
- dnptrs, lastdnptr);
- if (n < 0)
- return (-1);
- cp += n;
- ShrinkBuffer(n);
- }
- if (rrecp->r_type == T_SOA) {
- ShrinkBuffer(5 * INT32SZ);
- while (isspace(*startp) || !*startp)
- startp++;
- if (*startp == '(') {
- multiline = 1;
- startp++;
- } else
- multiline = 0;
- /* serial, refresh, retry, expire, minimum */
- for (i = 0; i < 5; i++) {
- soanum = getnum_str(&startp, endp);
- if (soanum < 0)
- return (-1);
- PUTLONG(soanum, cp);
- }
- if (multiline) {
- while (isspace(*startp) || !*startp)
- startp++;
- if (*startp != ')')
- return (-1);
- }
- }
- break;
- case T_MX:
- case T_AFSDB:
- case T_RT:
- n = getnum_str(&startp, endp);
- if (n < 0)
- return (-1);
- PUTSHORT(n, cp);
- ShrinkBuffer(INT16SZ);
- if (!getword_str(buf2, sizeof buf2, &startp, endp))
- return (-1);
- n = dn_comp(buf2, cp, buflen, dnptrs, lastdnptr);
- if (n < 0)
- return (-1);
- cp += n;
- ShrinkBuffer(n);
- break;
- case T_PX:
- n = getnum_str(&startp, endp);
- if (n < 0)
- return (-1);
- PUTSHORT(n, cp);
- ShrinkBuffer(INT16SZ);
- for (i = 0; i < 2; i++) {
- if (!getword_str(buf2, sizeof buf2, &startp,
- endp))
- return (-1);
- n = dn_comp(buf2, cp, buflen, dnptrs,
- lastdnptr);
- if (n < 0)
- return (-1);
- cp += n;
- ShrinkBuffer(n);
- }
- break;
- case T_WKS:
- case T_HINFO:
- case T_TXT:
- case T_X25:
- case T_ISDN:
- case T_NSAP:
- case T_LOC:
- /* XXX - more fine tuning needed here */
- ShrinkBuffer(rrecp->r_size);
- memcpy(cp, rrecp->r_data, rrecp->r_size);
- cp += rrecp->r_size;
- break;
- default:
- return (-1);
- } /*switch*/
- n = (u_int16_t)((cp - sp2) - INT16SZ);
- PUTSHORT(n, sp2);
- } /*for*/
-
- hp->qdcount = htons(counts[0]);
- hp->ancount = htons(counts[1]);
- hp->nscount = htons(counts[2]);
- hp->arcount = htons(counts[3]);
- return (cp - buf);
-}
-
-/*
- * Get a whitespace delimited word from a string (not file)
- * into buf. modify the start pointer to point after the
- * word in the string.
- */
-static int
-getword_str(char *buf, int size, u_char **startpp, u_char *endp) {
- char *cp;
- int c;
-
- for (cp = buf; *startpp <= endp; ) {
- c = **startpp;
- if (isspace(c) || c == '\0') {
- if (cp != buf) /* trailing whitespace */
- break;
- else { /* leading whitespace */
- (*startpp)++;
- continue;
- }
- }
- (*startpp)++;
- if (cp >= buf+size-1)
- break;
- *cp++ = (u_char)c;
- }
- *cp = '\0';
- return (cp != buf);
-}
-
-/*
- * Get a whitespace delimited number from a string (not file) into buf
- * update the start pointer to point after the number in the string.
- */
-static int
-getnum_str(u_char **startpp, u_char *endp) {
- int c, n;
- int seendigit = 0;
- int m = 0;
-
- for (n = 0; *startpp <= endp; ) {
- c = **startpp;
- if (isspace(c) || c == '\0') {
- if (seendigit) /* trailing whitespace */
- break;
- else { /* leading whitespace */
- (*startpp)++;
- continue;
- }
- }
- if (c == ';') {
- while ((*startpp <= endp) &&
- ((c = **startpp) != '\n'))
- (*startpp)++;
- if (seendigit)
- break;
- continue;
- }
- if (!isdigit(c)) {
- if (c == ')' && seendigit) {
- (*startpp)--;
- break;
- }
- return (-1);
- }
- (*startpp)++;
- n = n * 10 + (c - '0');
- seendigit = 1;
- }
- return (n + m);
-}
-
-/*
- * Allocate a resource record buffer & save rr info.
- */
-ns_updrec *
-res_mkupdrec(int section, const char *dname,
- u_int class, u_int type, u_long ttl) {
- ns_updrec *rrecp = (ns_updrec *)calloc(1, sizeof(ns_updrec));
-
- if (!rrecp || !(rrecp->r_dname = strdup(dname)))
- return (NULL);
- rrecp->r_class = class;
- rrecp->r_type = type;
- rrecp->r_ttl = ttl;
- rrecp->r_section = section;
- return (rrecp);
-}
-
-/*
- * Free a resource record buffer created by res_mkupdrec.
- */
-void
-res_freeupdrec(ns_updrec *rrecp) {
- /* Note: freeing r_dp is the caller's responsibility. */
- if (rrecp->r_dname != NULL)
- free(rrecp->r_dname);
- free(rrecp);
-}
diff --git a/c/src/exec/libnetworking/libc/res_query.c b/c/src/exec/libnetworking/libc/res_query.c
deleted file mode 100644
index 784fa433bc..0000000000
--- a/c/src/exec/libnetworking/libc/res_query.c
+++ /dev/null
@@ -1,410 +0,0 @@
-/*
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-/*
- * Portions Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)res_query.c 8.1 (Berkeley) 6/4/93";
-static char orig_rcsid = "From: Id: res_query.c,v 8.14 1997/06/09 17:47:05 halley Exp $";
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-#include <ctype.h>
-#include <errno.h>
-#include <netdb.h>
-#include <resolv.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "res_config.h"
-
-#if PACKETSZ > 1024
-#define MAXPACKET PACKETSZ
-#else
-#define MAXPACKET 1024
-#endif
-
-/*
- * Formulate a normal query, send, and await answer.
- * Returned answer is placed in supplied buffer "answer".
- * Perform preliminary check of answer, returning success only
- * if no error is indicated and the answer count is nonzero.
- * Return the size of the response on success, -1 on error.
- * Error number is left in h_errno.
- *
- * Caller must parse answer and determine whether it answers the question.
- */
-int
-res_query(name, class, type, answer, anslen)
- const char *name; /* domain name */
- int class, type; /* class and type of query */
- u_char *answer; /* buffer to put answer */
- int anslen; /* size of answer buffer */
-{
- u_char buf[MAXPACKET];
- HEADER *hp = (HEADER *) answer;
- int n;
-
- hp->rcode = NOERROR; /* default */
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
- h_errno = NETDB_INTERNAL;
- return (-1);
- }
-#ifdef DEBUG
- if (_res.options & RES_DEBUG)
- printf(";; res_query(%s, %d, %d)\n", name, class, type);
-#endif
-
- n = res_mkquery(QUERY, name, class, type, NULL, 0, NULL,
- buf, sizeof(buf));
- if (n <= 0) {
-#ifdef DEBUG
- if (_res.options & RES_DEBUG)
- printf(";; res_query: mkquery failed\n");
-#endif
- h_errno = NO_RECOVERY;
- return (n);
- }
- n = res_send(buf, n, answer, anslen);
- if (n < 0) {
-#ifdef DEBUG
- if (_res.options & RES_DEBUG)
- printf(";; res_query: send error\n");
-#endif
- h_errno = TRY_AGAIN;
- return (n);
- }
-
- if (hp->rcode != NOERROR || ntohs(hp->ancount) == 0) {
-#ifdef DEBUG
- if (_res.options & RES_DEBUG)
- printf(";; rcode = %d, ancount=%d\n", hp->rcode,
- ntohs(hp->ancount));
-#endif
- switch (hp->rcode) {
- case NXDOMAIN:
- h_errno = HOST_NOT_FOUND;
- break;
- case SERVFAIL:
- h_errno = TRY_AGAIN;
- break;
- case NOERROR:
- h_errno = NO_DATA;
- break;
- case FORMERR:
- case NOTIMP:
- case REFUSED:
- default:
- h_errno = NO_RECOVERY;
- break;
- }
- return (-1);
- }
- return (n);
-}
-
-/*
- * Formulate a normal query, send, and retrieve answer in supplied buffer.
- * Return the size of the response on success, -1 on error.
- * If enabled, implement search rules until answer or unrecoverable failure
- * is detected. Error code, if any, is left in h_errno.
- */
-int
-res_search(name, class, type, answer, anslen)
- const char *name; /* domain name */
- int class, type; /* class and type of query */
- u_char *answer; /* buffer to put answer */
- int anslen; /* size of answer */
-{
- const char *cp, * const *domain;
- HEADER *hp = (HEADER *) answer;
- u_int dots;
- int trailing_dot, ret, saved_herrno;
- int got_nodata = 0, got_servfail = 0, tried_as_is = 0;
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
- h_errno = NETDB_INTERNAL;
- return (-1);
- }
- errno = 0;
- h_errno = HOST_NOT_FOUND; /* default, if we never query */
- dots = 0;
- for (cp = name; *cp; cp++)
- dots += (*cp == '.');
- trailing_dot = 0;
- if (cp > name && *--cp == '.')
- trailing_dot++;
-
- /* If there aren't any dots, it could be a user-level alias */
- if (!dots && (cp = hostalias(name)) != NULL)
- return (res_query(cp, class, type, answer, anslen));
-
- /*
- * If there are dots in the name already, let's just give it a try
- * 'as is'. The threshold can be set with the "ndots" option.
- */
- saved_herrno = -1;
- if (dots >= _res.ndots) {
- ret = res_querydomain(name, NULL, class, type, answer, anslen);
- if (ret > 0)
- return (ret);
- saved_herrno = h_errno;
- tried_as_is++;
- }
-
- /*
- * We do at least one level of search if
- * - there is no dot and RES_DEFNAME is set, or
- * - there is at least one dot, there is no trailing dot,
- * and RES_DNSRCH is set.
- */
- if ((!dots && (_res.options & RES_DEFNAMES)) ||
- (dots && !trailing_dot && (_res.options & RES_DNSRCH))) {
- int done = 0;
-
- for (domain = (const char * const *)_res.dnsrch;
- *domain && !done;
- domain++) {
-
- ret = res_querydomain(name, *domain, class, type,
- answer, anslen);
- if (ret > 0)
- return (ret);
-
- /*
- * If no server present, give up.
- * If name isn't found in this domain,
- * keep trying higher domains in the search list
- * (if that's enabled).
- * On a NO_DATA error, keep trying, otherwise
- * a wildcard entry of another type could keep us
- * from finding this entry higher in the domain.
- * If we get some other error (negative answer or
- * server failure), then stop searching up,
- * but try the input name below in case it's
- * fully-qualified.
- */
- if (errno == ECONNREFUSED) {
- h_errno = TRY_AGAIN;
- return (-1);
- }
-
- switch (h_errno) {
- case NO_DATA:
- got_nodata++;
- /* FALLTHROUGH */
- case HOST_NOT_FOUND:
- /* keep trying */
- break;
- case TRY_AGAIN:
- if (hp->rcode == SERVFAIL) {
- /* try next search element, if any */
- got_servfail++;
- break;
- }
- /* FALLTHROUGH */
- default:
- /* anything else implies that we're done */
- done++;
- }
-
- /* if we got here for some reason other than DNSRCH,
- * we only wanted one iteration of the loop, so stop.
- */
- if (!(_res.options & RES_DNSRCH))
- done++;
- }
- }
-
- /*
- * If we have not already tried the name "as is", do that now.
- * note that we do this regardless of how many dots were in the
- * name or whether it ends with a dot unless NOTLDQUERY is set.
- */
- if (!tried_as_is && (dots || !(_res.options & RES_NOTLDQUERY))) {
- ret = res_querydomain(name, NULL, class, type, answer, anslen);
- if (ret > 0)
- return (ret);
- }
-
- /* if we got here, we didn't satisfy the search.
- * if we did an initial full query, return that query's h_errno
- * (note that we wouldn't be here if that query had succeeded).
- * else if we ever got a nodata, send that back as the reason.
- * else send back meaningless h_errno, that being the one from
- * the last DNSRCH we did.
- */
- if (saved_herrno != -1)
- h_errno = saved_herrno;
- else if (got_nodata)
- h_errno = NO_DATA;
- else if (got_servfail)
- h_errno = TRY_AGAIN;
- return (-1);
-}
-
-/*
- * Perform a call on res_query on the concatenation of name and domain,
- * removing a trailing dot from name if domain is NULL.
- */
-int
-res_querydomain(name, domain, class, type, answer, anslen)
- const char *name, *domain;
- int class, type; /* class and type of query */
- u_char *answer; /* buffer to put answer */
- int anslen; /* size of answer */
-{
- char nbuf[MAXDNAME];
- const char *longname = nbuf;
- int n, d;
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
- h_errno = NETDB_INTERNAL;
- return (-1);
- }
-#ifdef DEBUG
- if (_res.options & RES_DEBUG)
- printf(";; res_querydomain(%s, %s, %d, %d)\n",
- name, domain?domain:"<Nil>", class, type);
-#endif
- if (domain == NULL) {
- /*
- * Check for trailing '.';
- * copy without '.' if present.
- */
- n = strlen(name);
- if (n >= MAXDNAME) {
- h_errno = NO_RECOVERY;
- return (-1);
- }
- n--;
- if (n >= 0 && name[n] == '.') {
- strncpy(nbuf, name, n);
- nbuf[n] = '\0';
- } else
- longname = name;
- } else {
- n = strlen(name);
- d = strlen(domain);
- if (n + d + 1 >= MAXDNAME) {
- h_errno = NO_RECOVERY;
- return (-1);
- }
- sprintf(nbuf, "%s.%s", name, domain);
- }
- return (res_query(longname, class, type, answer, anslen));
-}
-
-const char *
-hostalias(name)
- const char *name;
-{
- register char *cp1, *cp2;
- FILE *fp;
- char *file;
- char buf[BUFSIZ];
- static char abuf[MAXDNAME];
-
- if (_res.options & RES_NOALIASES)
- return (NULL);
- if (issetugid())
- return (NULL);
- file = getenv("HOSTALIASES");
- if (file == NULL || (fp = fopen(file, "r")) == NULL)
- return (NULL);
- setbuf(fp, NULL);
- buf[sizeof(buf) - 1] = '\0';
- while (fgets(buf, sizeof(buf), fp)) {
- for (cp1 = buf; *cp1 && !isspace((int)*cp1); ++cp1)
- ;
- if (!*cp1)
- break;
- *cp1 = '\0';
- if (!strcasecmp(buf, name)) {
- while (isspace((int)*++cp1))
- ;
- if (!*cp1)
- break;
- for (cp2 = cp1 + 1; *cp2 && !isspace((int)*cp2); ++cp2)
- ;
- abuf[sizeof(abuf) - 1] = *cp2 = '\0';
- strncpy(abuf, cp1, sizeof(abuf) - 1);
- fclose(fp);
- return (abuf);
- }
- }
- fclose(fp);
- return (NULL);
-}
diff --git a/c/src/exec/libnetworking/libc/res_send.c b/c/src/exec/libnetworking/libc/res_send.c
deleted file mode 100644
index 08cb78490f..0000000000
--- a/c/src/exec/libnetworking/libc/res_send.c
+++ /dev/null
@@ -1,929 +0,0 @@
-/*
- * Copyright (c) 1985, 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-/*
- * Portions Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)res_send.c 8.1 (Berkeley) 6/4/93";
-static char orig_rcsid[] = "From: Id: res_send.c,v 8.20 1998/04/06 23:27:51 halley Exp $";
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * Send query to name server and wait for reply.
- */
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/time.h>
-#include <sys/socket.h>
-#include <sys/uio.h>
-
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-#include <arpa/inet.h>
-
-#include <errno.h>
-#include <netdb.h>
-#include <resolv.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <poll.h>
-
-#include "res_config.h"
-
-#if !defined(__rtems__)
-#ifdef NOPOLL /* libc_r doesn't wrap poll yet() */
-static int use_poll = 0;
-#else
-static int use_poll = 1; /* adapt to poll() syscall availability */
- /* 0 = not present, 1 = try it, 2 = exists */
-#endif
-#endif
-
-static int s = -1; /* socket used for communications */
-static int connected = 0; /* is the socket connected */
-static int vc = 0; /* is the socket a virtual circuit? */
-static res_send_qhook Qhook = NULL;
-static res_send_rhook Rhook = NULL;
-
-
-#define CAN_RECONNECT 1
-
-#ifndef DEBUG
-# define Dprint(cond, args) /*empty*/
-# define DprintQ(cond, args, query, size) /*empty*/
-# define Aerror(file, string, error, address) /*empty*/
-# define Perror(file, string, error) /*empty*/
-#else
-# define Dprint(cond, args) if (cond) {fprintf args;} else {}
-# define DprintQ(cond, args, query, size) if (cond) {\
- fprintf args;\
- __fp_nquery(query, size, stdout);\
- } else {}
- static void
- Aerror(file, string, error, address)
- FILE *file;
- char *string;
- int error;
- struct sockaddr_in address;
- {
- int save = errno;
-
- if (_res.options & RES_DEBUG) {
- fprintf(file, "res_send: %s ([%s].%u): %s\n",
- string,
- inet_ntoa(address.sin_addr),
- ntohs(address.sin_port),
- strerror(error));
- }
- errno = save;
- }
- static void
- Perror(file, string, error)
- FILE *file;
- char *string;
- int error;
- {
- int save = errno;
-
- if (_res.options & RES_DEBUG) {
- fprintf(file, "res_send: %s: %s\n",
- string, strerror(error));
- }
- errno = save;
- }
-#endif
-
-void
-res_send_setqhook(hook)
- res_send_qhook hook;
-{
-
- Qhook = hook;
-}
-
-void
-res_send_setrhook(hook)
- res_send_rhook hook;
-{
-
- Rhook = hook;
-}
-
-/* int
- * res_isourserver(ina)
- * looks up "ina" in _res.ns_addr_list[]
- * returns:
- * 0 : not found
- * >0 : found
- * author:
- * paul vixie, 29may94
- */
-int
-res_isourserver(inp)
- const struct sockaddr_in *inp;
-{
- struct sockaddr_in ina;
- int ns, ret;
-
- ina = *inp;
- ret = 0;
- for (ns = 0; ns < _res.nscount; ns++) {
- const struct sockaddr_in *srv = &_res.nsaddr_list[ns];
-
- if (srv->sin_family == ina.sin_family &&
- srv->sin_port == ina.sin_port &&
- (srv->sin_addr.s_addr == INADDR_ANY ||
- srv->sin_addr.s_addr == ina.sin_addr.s_addr)) {
- ret++;
- break;
- }
- }
- return (ret);
-}
-
-/* int
- * res_nameinquery(name, type, class, buf, eom)
- * look for (name,type,class) in the query section of packet (buf,eom)
- * requires:
- * buf + HFIXEDSZ <= eom
- * returns:
- * -1 : format error
- * 0 : not found
- * >0 : found
- * author:
- * paul vixie, 29may94
- */
-int
-res_nameinquery(name, type, class, buf, eom)
- const char *name;
- int type, class;
- const u_char *buf, *eom;
-{
- const u_char *cp = buf + HFIXEDSZ;
- int qdcount = ntohs(((HEADER*)buf)->qdcount);
-
- while (qdcount-- > 0) {
- char tname[MAXDNAME+1];
- int n, ttype, tclass;
-
- n = dn_expand(buf, eom, cp, tname, sizeof tname);
- if (n < 0)
- return (-1);
- cp += n;
- if (cp + 2 * INT16SZ > eom)
- return (-1);
- ttype = ns_get16(cp); cp += INT16SZ;
- tclass = ns_get16(cp); cp += INT16SZ;
- if (ttype == type &&
- tclass == class &&
- strcasecmp(tname, name) == 0)
- return (1);
- }
- return (0);
-}
-
-/* int
- * res_queriesmatch(buf1, eom1, buf2, eom2)
- * is there a 1:1 mapping of (name,type,class)
- * in (buf1,eom1) and (buf2,eom2)?
- * returns:
- * -1 : format error
- * 0 : not a 1:1 mapping
- * >0 : is a 1:1 mapping
- * author:
- * paul vixie, 29may94
- */
-int
-res_queriesmatch(buf1, eom1, buf2, eom2)
- const u_char *buf1, *eom1;
- const u_char *buf2, *eom2;
-{
- const u_char *cp = buf1 + HFIXEDSZ;
- int qdcount = ntohs(((HEADER*)buf1)->qdcount);
-
- if (buf1 + HFIXEDSZ > eom1 || buf2 + HFIXEDSZ > eom2)
- return (-1);
-
- /*
- * Only header section present in replies to
- * dynamic update packets.
- */
- if ( (((HEADER *)buf1)->opcode == ns_o_update) &&
- (((HEADER *)buf2)->opcode == ns_o_update) )
- return (1);
-
- if (qdcount != ntohs(((HEADER*)buf2)->qdcount))
- return (0);
- while (qdcount-- > 0) {
- char tname[MAXDNAME+1];
- int n, ttype, tclass;
-
- n = dn_expand(buf1, eom1, cp, tname, sizeof tname);
- if (n < 0)
- return (-1);
- cp += n;
- if (cp + 2 * INT16SZ > eom1)
- return (-1);
- ttype = ns_get16(cp); cp += INT16SZ;
- tclass = ns_get16(cp); cp += INT16SZ;
- if (!res_nameinquery(tname, ttype, tclass, buf2, eom2))
- return (0);
- }
- return (1);
-}
-
-int
-res_send(buf, buflen, ans, anssiz)
- const u_char *buf;
- int buflen;
- u_char *ans;
- int anssiz;
-{
- HEADER *hp = (HEADER *) buf;
- HEADER *anhp = (HEADER *) ans;
- int gotsomewhere, connreset, terrno, try, v_circuit, resplen, ns, n;
- u_int badns; /* XXX NSMAX can't exceed #/bits in this variable */
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
- /* errno should have been set by res_init() in this case. */
- return (-1);
- }
- if (anssiz < HFIXEDSZ) {
- errno = EINVAL;
- return (-1);
- }
- DprintQ((_res.options & RES_DEBUG) || (_res.pfcode & RES_PRF_QUERY),
- (stdout, ";; res_send()\n"), buf, buflen);
- v_circuit = (_res.options & RES_USEVC) || buflen > PACKETSZ;
- gotsomewhere = 0;
- connreset = 0;
- terrno = ETIMEDOUT;
- badns = 0;
-
- /*
- * Send request, RETRY times, or until successful
- */
- for (try = 0; try < _res.retry; try++) {
- for (ns = 0; ns < _res.nscount; ns++) {
- struct sockaddr_in *nsap = &_res.nsaddr_list[ns];
- same_ns:
- if (badns & (1 << ns)) {
- res_close();
- goto next_ns;
- }
-
- if (Qhook) {
- int done = 0, loops = 0;
-
- do {
- res_sendhookact act;
-
- act = (*Qhook)(&nsap, &buf, &buflen,
- ans, anssiz, &resplen);
- switch (act) {
- case res_goahead:
- done = 1;
- break;
- case res_nextns:
- res_close();
- goto next_ns;
- case res_done:
- return (resplen);
- case res_modified:
- /* give the hook another try */
- if (++loops < 42) /*doug adams*/
- break;
- /*FALLTHROUGH*/
- case res_error:
- /*FALLTHROUGH*/
- default:
- return (-1);
- }
- } while (!done);
- }
-
- Dprint(_res.options & RES_DEBUG,
- (stdout, ";; Querying server (# %d) address = %s\n",
- ns + 1, inet_ntoa(nsap->sin_addr)));
-
- if (v_circuit) {
- int truncated;
-#if !defined(__rtems__)
- struct iovec iov[2];
-#endif
- u_short len;
- u_char *cp;
-
- /*
- * Use virtual circuit;
- * at most one attempt per server.
- */
- try = _res.retry;
- truncated = 0;
- if (s < 0 || !vc || hp->opcode == ns_o_update) {
- if (s >= 0)
- res_close();
-
- s = socket(PF_INET, SOCK_STREAM, 0);
- if (s < 0) {
- terrno = errno;
- Perror(stderr, "socket(vc)", errno);
- return (-1);
- }
- errno = 0;
- if (connect(s, (struct sockaddr *)nsap,
- sizeof *nsap) < 0) {
- terrno = errno;
- Aerror(stderr, "connect/vc",
- errno, *nsap);
- badns |= (1 << ns);
- res_close();
- goto next_ns;
- }
- vc = 1;
- }
- /*
- * Send length & message
- */
- putshort((u_short)buflen, (u_char*)&len);
-#if !defined(__rtems__)
- iov[0].iov_base = (caddr_t)&len;
- iov[0].iov_len = INT16SZ;
- iov[1].iov_base = (caddr_t)buf;
- iov[1].iov_len = buflen;
- if (writev(s, iov, 2) != (INT16SZ + buflen)) {
-#else
- /*
- * RTEMS doesn't have writev (yet)
- */
- if ((write (s, &len, INT16SZ) != INT16SZ)
- || (write (s, buf, buflen) != buflen)) {
-#endif
- terrno = errno;
- Perror(stderr, "write failed", errno);
- badns |= (1 << ns);
- res_close();
- goto next_ns;
- }
- /*
- * Receive length & response
- */
-read_len:
- cp = ans;
- len = INT16SZ;
- while ((n = read(s, (char *)cp, (int)len)) > 0) {
- cp += n;
- if ((len -= n) <= 0)
- break;
- }
- if (n <= 0) {
- terrno = errno;
- Perror(stderr, "read failed", errno);
- res_close();
- /*
- * A long running process might get its TCP
- * connection reset if the remote server was
- * restarted. Requery the server instead of
- * trying a new one. When there is only one
- * server, this means that a query might work
- * instead of failing. We only allow one reset
- * per query to prevent looping.
- */
- if (terrno == ECONNRESET && !connreset) {
- connreset = 1;
- res_close();
- goto same_ns;
- }
- res_close();
- goto next_ns;
- }
- resplen = ns_get16(ans);
- if (resplen > anssiz) {
- Dprint(_res.options & RES_DEBUG,
- (stdout, ";; response truncated\n")
- );
- truncated = 1;
- len = anssiz;
- } else
- len = resplen;
- if (len < HFIXEDSZ) {
- /*
- * Undersized message.
- */
- Dprint(_res.options & RES_DEBUG,
- (stdout, ";; undersized: %d\n", len));
- terrno = EMSGSIZE;
- badns |= (1 << ns);
- res_close();
- goto next_ns;
- }
- cp = ans;
- while (len != 0 &&
- (n = read(s, (char *)cp, (int)len)) > 0) {
- cp += n;
- len -= n;
- }
- if (n <= 0) {
- terrno = errno;
- Perror(stderr, "read(vc)", errno);
- res_close();
- goto next_ns;
- }
- if (truncated) {
- /*
- * Flush rest of answer
- * so connection stays in synch.
- */
- anhp->tc = 1;
- len = resplen - anssiz;
- while (len != 0) {
- char junk[PACKETSZ];
-
- n = (len > sizeof(junk)
- ? sizeof(junk)
- : len);
- if ((n = read(s, junk, n)) > 0)
- len -= n;
- else
- break;
- }
- }
- /*
- * The calling applicating has bailed out of
- * a previous call and failed to arrange to have
- * the circuit closed or the server has got
- * itself confused. Anyway drop the packet and
- * wait for the correct one.
- */
- if (hp->id != anhp->id) {
- DprintQ((_res.options & RES_DEBUG) ||
- (_res.pfcode & RES_PRF_REPLY),
- (stdout, ";; old answer (unexpected):\n"),
- ans, (resplen>anssiz)?anssiz:resplen);
- goto read_len;
- }
- } else {
- /*
- * Use datagrams.
- */
-#ifndef NOPOLL
- struct pollfd pfd;
- int msec;
-#endif
- struct timeval timeout;
-#ifndef NOSELECT
- fd_set dsmask, *dsmaskp;
- int dsmasklen;
-#endif
- struct sockaddr_in from;
- int fromlen;
-
- if ((s < 0) || vc) {
- if (vc)
- res_close();
- s = socket(PF_INET, SOCK_DGRAM, 0);
- if (s < 0) {
-#ifndef CAN_RECONNECT
- bad_dg_sock:
-#endif
- terrno = errno;
- Perror(stderr, "socket(dg)", errno);
- return (-1);
- }
- connected = 0;
- }
-#ifndef CANNOT_CONNECT_DGRAM
- /*
- * On a 4.3BSD+ machine (client and server,
- * actually), sending to a nameserver datagram
- * port with no nameserver will cause an
- * ICMP port unreachable message to be returned.
- * If our datagram socket is "connected" to the
- * server, we get an ECONNREFUSED error on the next
- * socket operation, and select returns if the
- * error message is received. We can thus detect
- * the absence of a nameserver without timing out.
- * If we have sent queries to at least two servers,
- * however, we don't want to remain connected,
- * as we wish to receive answers from the first
- * server to respond.
- */
- if (_res.nscount == 1 || (try == 0 && ns == 0)) {
- /*
- * Connect only if we are sure we won't
- * receive a response from another server.
- */
- if (!connected) {
- if (connect(s, (struct sockaddr *)nsap,
- sizeof *nsap
- ) < 0) {
- Aerror(stderr,
- "connect(dg)",
- errno, *nsap);
- badns |= (1 << ns);
- res_close();
- goto next_ns;
- }
- connected = 1;
- }
- if (send(s, (char*)buf, buflen, 0) != buflen) {
- Perror(stderr, "send", errno);
- badns |= (1 << ns);
- res_close();
- goto next_ns;
- }
- } else {
- /*
- * Disconnect if we want to listen
- * for responses from more than one server.
- */
- if (connected) {
-#ifdef CAN_RECONNECT
- struct sockaddr_in no_addr;
-
- no_addr.sin_family = AF_INET;
- no_addr.sin_addr.s_addr = INADDR_ANY;
- no_addr.sin_port = 0;
- (void) connect(s,
- (struct sockaddr *)
- &no_addr,
- sizeof no_addr);
-#else
- int s1 = socket(PF_INET, SOCK_DGRAM,0);
- if (s1 < 0)
- goto bad_dg_sock;
- (void) dup2(s1, s);
- (void) close(s1);
- Dprint(_res.options & RES_DEBUG,
- (stdout, ";; new DG socket\n"))
-#endif /* CAN_RECONNECT */
- connected = 0;
- errno = 0;
- }
-#endif /* !CANNOT_CONNECT_DGRAM */
- if (sendto(s, (char*)buf, buflen, 0,
- (struct sockaddr *)nsap,
- sizeof *nsap)
- != buflen) {
- Aerror(stderr, "sendto", errno, *nsap);
- badns |= (1 << ns);
- res_close();
- goto next_ns;
- }
-#ifndef CANNOT_CONNECT_DGRAM
- }
-#endif /* !CANNOT_CONNECT_DGRAM */
-
- /*
- * Wait for reply
- */
-#ifndef NOPOLL
- othersyscall:
- if (use_poll) {
- msec = (_res.retrans << try) * 1000;
- if (try > 0)
- msec /= _res.nscount;
- if (msec <= 0)
- msec = 1000;
- } else {
-#endif
- timeout.tv_sec = (_res.retrans << try);
- if (try > 0)
- timeout.tv_sec /= _res.nscount;
- if ((long) timeout.tv_sec <= 0)
- timeout.tv_sec = 1;
- timeout.tv_usec = 0;
-#ifndef NOPOLL
- }
-#endif
- wait:
- if (s < 0) {
- Perror(stderr, "s out-of-bounds", EMFILE);
- res_close();
- goto next_ns;
- }
-#ifndef NOPOLL
- if (use_poll) {
- struct sigaction sa, osa;
- int sigsys_installed = 0;
-
- pfd.fd = s;
- pfd.events = POLLIN;
- if (use_poll == 1) {
- bzero(&sa, sizeof(sa));
- sa.sa_handler = SIG_IGN;
- if (sigaction(SIGSYS, &sa, &osa) >= 0)
- sigsys_installed = 1;
- }
- n = poll(&pfd, 1, msec);
- if (sigsys_installed == 1) {
- int oerrno = errno;
- sigaction(SIGSYS, &osa, NULL);
- errno = oerrno;
- }
- /* XXX why does nosys() return EINVAL? */
- if (n < 0 && (errno == ENOSYS ||
- errno == EINVAL)) {
- use_poll = 0;
- goto othersyscall;
- } else if (use_poll == 1)
- use_poll = 2;
- if (n < 0) {
- if (errno == EINTR)
- goto wait;
- Perror(stderr, "poll", errno);
- res_close();
- goto next_ns;
- }
- } else {
-#endif
-#ifndef NOSELECT
- dsmasklen = howmany(s + 1, NFDBITS) *
- sizeof(fd_mask);
- if (dsmasklen > sizeof(fd_set)) {
- dsmaskp = (fd_set *)malloc(dsmasklen);
- if (dsmaskp == NULL) {
- res_close();
- goto next_ns;
- }
- } else
- dsmaskp = &dsmask;
- /* only zero what we need */
- bzero((char *)dsmaskp, dsmasklen);
- FD_SET(s, dsmaskp);
- n = select(s + 1, dsmaskp, (fd_set *)NULL,
- (fd_set *)NULL, &timeout);
- if (dsmaskp != &dsmask)
- free(dsmaskp);
- if (n < 0) {
- if (errno == EINTR)
- goto wait;
- Perror(stderr, "select", errno);
- res_close();
- goto next_ns;
- }
-#endif
-#ifndef NOPOLL
- }
-#endif
-
-#ifdef NOSELECT
- setsockopt (s, SOL_SOCKET, SO_RCVTIMEO, &timeout, sizeof timeout);
-#else
- if (n == 0) {
- /*
- * timeout
- */
- Dprint(_res.options & RES_DEBUG,
- (stdout, ";; timeout\n"));
- gotsomewhere = 1;
- res_close();
- goto next_ns;
- }
-#endif
- errno = 0;
- fromlen = sizeof(struct sockaddr_in);
- resplen = recvfrom(s, (char*)ans, anssiz, 0,
- (struct sockaddr *)&from, &fromlen);
- if (resplen <= 0) {
-#ifdef NOSELECT
- if (errno == ETIMEDOUT) {
- Dprint(_res.options & RES_DEBUG,
- (stdout, ";; timeout\n"));
- gotsomewhere = 1;
- res_close();
- goto next_ns;
- }
-#endif
- Perror(stderr, "recvfrom", errno);
- res_close();
- goto next_ns;
- }
- gotsomewhere = 1;
- if (resplen < HFIXEDSZ) {
- /*
- * Undersized message.
- */
- Dprint(_res.options & RES_DEBUG,
- (stdout, ";; undersized: %d\n",
- resplen));
- terrno = EMSGSIZE;
- badns |= (1 << ns);
- res_close();
- goto next_ns;
- }
- if (hp->id != anhp->id) {
- /*
- * response from old query, ignore it.
- * XXX - potential security hazard could
- * be detected here.
- */
- DprintQ((_res.options & RES_DEBUG) ||
- (_res.pfcode & RES_PRF_REPLY),
- (stdout, ";; old answer:\n"),
- ans, (resplen>anssiz)?anssiz:resplen);
- goto wait;
- }
-#ifdef CHECK_SRVR_ADDR
- if (!(_res.options & RES_INSECURE1) &&
- !res_isourserver(&from)) {
- /*
- * response from wrong server? ignore it.
- * XXX - potential security hazard could
- * be detected here.
- */
- DprintQ((_res.options & RES_DEBUG) ||
- (_res.pfcode & RES_PRF_REPLY),
- (stdout, ";; not our server:\n"),
- ans, (resplen>anssiz)?anssiz:resplen);
- goto wait;
- }
-#endif
- if (!(_res.options & RES_INSECURE2) &&
- !res_queriesmatch(buf, buf + buflen,
- ans, ans + anssiz)) {
- /*
- * response contains wrong query? ignore it.
- * XXX - potential security hazard could
- * be detected here.
- */
- DprintQ((_res.options & RES_DEBUG) ||
- (_res.pfcode & RES_PRF_REPLY),
- (stdout, ";; wrong query name:\n"),
- ans, (resplen>anssiz)?anssiz:resplen);
- goto wait;
- }
- if (anhp->rcode == SERVFAIL ||
- anhp->rcode == NOTIMP ||
- anhp->rcode == REFUSED) {
- DprintQ(_res.options & RES_DEBUG,
- (stdout, "server rejected query:\n"),
- ans, (resplen>anssiz)?anssiz:resplen);
- badns |= (1 << ns);
- res_close();
- /* don't retry if called from dig */
- if (!_res.pfcode)
- goto next_ns;
- }
- if (!(_res.options & RES_IGNTC) && anhp->tc) {
- /*
- * get rest of answer;
- * use TCP with same server.
- */
- Dprint(_res.options & RES_DEBUG,
- (stdout, ";; truncated answer\n"));
- v_circuit = 1;
- res_close();
- goto same_ns;
- }
- } /*if vc/dg*/
- Dprint((_res.options & RES_DEBUG) ||
- ((_res.pfcode & RES_PRF_REPLY) &&
- (_res.pfcode & RES_PRF_HEAD1)),
- (stdout, ";; got answer:\n"));
- DprintQ((_res.options & RES_DEBUG) ||
- (_res.pfcode & RES_PRF_REPLY),
- (stdout, "%s", ""),
- ans, (resplen>anssiz)?anssiz:resplen);
- /*
- * If using virtual circuits, we assume that the first server
- * is preferred over the rest (i.e. it is on the local
- * machine) and only keep that one open.
- * If we have temporarily opened a virtual circuit,
- * or if we haven't been asked to keep a socket open,
- * close the socket.
- */
- if ((v_circuit && (!(_res.options & RES_USEVC) || ns != 0)) ||
- !(_res.options & RES_STAYOPEN)) {
- res_close();
- }
- if (Rhook) {
- int done = 0, loops = 0;
-
- do {
- res_sendhookact act;
-
- act = (*Rhook)(nsap, buf, buflen,
- ans, anssiz, &resplen);
- switch (act) {
- case res_goahead:
- case res_done:
- done = 1;
- break;
- case res_nextns:
- res_close();
- goto next_ns;
- case res_modified:
- /* give the hook another try */
- if (++loops < 42) /*doug adams*/
- break;
- /*FALLTHROUGH*/
- case res_error:
- /*FALLTHROUGH*/
- default:
- return (-1);
- }
- } while (!done);
-
- }
- return (resplen);
- next_ns: ;
- } /*foreach ns*/
- } /*foreach retry*/
- res_close();
- if (!v_circuit) {
- if (!gotsomewhere)
- errno = ECONNREFUSED; /* no nameservers found */
- else
- errno = ETIMEDOUT; /* no answer obtained */
- } else
- errno = terrno;
- return (-1);
-}
-
-/*
- * This routine is for closing the socket if a virtual circuit is used and
- * the program wants to close it. This provides support for endhostent()
- * which expects to close the socket.
- *
- * This routine is not expected to be user visible.
- */
-void
-res_close()
-{
- if (s >= 0) {
- (void) close(s);
- s = -1;
- connected = 0;
- vc = 0;
- }
-}
diff --git a/c/src/exec/libnetworking/libc/res_stubs.c b/c/src/exec/libnetworking/libc/res_stubs.c
deleted file mode 100644
index 92cf0fac54..0000000000
--- a/c/src/exec/libnetworking/libc/res_stubs.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (C) 1996 Peter Wemm <peter@freebsd.org>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-/*
- * This file is for FreeBSD-3.0 that has a bind-4.9.5-P1 derived
- * resolver in the libc. It provides aliases for functions that
- * have moved since 4.9.4-P1.
- *
- * I'll save everybody the trouble and say it now: *THIS IS A HACK*!
- *
- * Yes, many of these are private functions to the resolver, but some are
- * needed as there is no other way to provide the functionality and they've
- * turned up all over the place. :-(
- */
-
-#include <sys/types.h>
-#include <sys/cdefs.h>
-
-__weak_reference(__inet_addr, inet_addr);
-__weak_reference(__inet_aton, inet_aton);
-__weak_reference(__inet_lnaof, inet_lnaof);
-__weak_reference(__inet_makeaddr, inet_makeaddr);
-__weak_reference(__inet_neta, inet_neta);
-__weak_reference(__inet_netof, inet_netof);
-__weak_reference(__inet_network, inet_network);
-__weak_reference(__inet_net_ntop, inet_net_ntop);
-__weak_reference(__inet_net_pton, inet_net_pton);
-__weak_reference(__inet_ntoa, inet_ntoa);
-__weak_reference(__inet_pton, inet_pton);
-__weak_reference(__inet_ntop, inet_ntop);
-__weak_reference(__inet_nsap_addr, inet_nsap_addr);
-__weak_reference(__inet_nsap_ntoa, inet_nsap_ntoa);
-
-__weak_reference(__sym_ston, sym_ston);
-__weak_reference(__sym_ntos, sym_ntos);
-__weak_reference(__sym_ntop, sym_ntop);
-__weak_reference(__fp_resstat, fp_resstat);
-__weak_reference(__p_query, p_query);
-__weak_reference(__p_fqnname, p_fqnname);
-__weak_reference(__p_secstodate, p_secstodate);
-__weak_reference(__dn_count_labels, dn_count_labels);
-__weak_reference(__dn_comp, dn_comp);
-__weak_reference(__res_close, _res_close);
-__weak_reference(__dn_expand, dn_expand);
-__weak_reference(__res_init, res_init);
-__weak_reference(__res_query, res_query);
-__weak_reference(__res_search, res_search);
-__weak_reference(__res_querydomain, res_querydomain);
-__weak_reference(__res_mkquery, res_mkquery);
-__weak_reference(__res_send, res_send);
diff --git a/c/src/exec/libnetworking/libc/res_update.c b/c/src/exec/libnetworking/libc/res_update.c
deleted file mode 100644
index ef591e0674..0000000000
--- a/c/src/exec/libnetworking/libc/res_update.c
+++ /dev/null
@@ -1,518 +0,0 @@
-#if !defined(__rtems__)
-#if !defined(lint) && !defined(SABER)
-static char rcsid[] = "$Id$";
-#endif /* not lint */
-#endif /* not rtems */
-
-/*
- * Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-/*
- * Based on the Dynamic DNS reference implementation by Viraj Bais
- * <viraj_bais@ccm.fm.intel.com>
- */
-
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <sys/time.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-#include <errno.h>
-#include <limits.h>
-#include <netdb.h>
-#include <resolv.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-/*
- * Separate a linked list of records into groups so that all records
- * in a group will belong to a single zone on the nameserver.
- * Create a dynamic update packet for each zone and send it to the
- * nameservers for that zone, and await answer.
- * Abort if error occurs in updating any zone.
- * Return the number of zones updated on success, < 0 on error.
- *
- * On error, caller must deal with the unsynchronized zones
- * eg. an A record might have been successfully added to the forward
- * zone but the corresponding PTR record would be missing if error
- * was encountered while updating the reverse zone.
- */
-
-#define NSMAX 16
-
-struct ns1 {
- char nsname[MAXDNAME];
- struct in_addr nsaddr1;
-};
-
-struct zonegrp {
- char z_origin[MAXDNAME];
- int16_t z_class;
- char z_soardata[MAXDNAME + 5 * INT32SZ];
- struct ns1 z_ns[NSMAX];
- int z_nscount;
- ns_updrec * z_rr;
- struct zonegrp *z_next;
-};
-
-
-int
-res_update(ns_updrec *rrecp_in) {
- ns_updrec *rrecp, *tmprrecp;
- u_char buf[PACKETSZ], answer[PACKETSZ], packet[2*PACKETSZ];
- char name[MAXDNAME], zname[MAXDNAME], primary[MAXDNAME],
- mailaddr[MAXDNAME];
- u_char soardata[2*MAXCDNAME+5*INT32SZ];
- char *dname, *svdname, *cp1, *target;
- u_char *cp, *eom;
- HEADER *hp = (HEADER *) answer;
- struct zonegrp *zptr = NULL, *tmpzptr, *prevzptr, *zgrp_start = NULL;
- int i, j, k = 0, n, ancount, nscount, arcount, rcode, rdatasize,
- newgroup, done, myzone, seen_before, numzones = 0;
- u_int16_t dlen, class, qclass, type, qtype;
- u_int32_t ttl;
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
- h_errno = NETDB_INTERNAL;
- return (-1);
- }
-
- for (rrecp = rrecp_in; rrecp; rrecp = rrecp->r_next) {
- dname = rrecp->r_dname;
- n = strlen(dname);
- if (dname[n-1] == '.')
- dname[n-1] = '\0';
- qtype = T_SOA;
- qclass = rrecp->r_class;
- done = 0;
- seen_before = 0;
-
- while (!done && dname) {
- if (qtype == T_SOA) {
- for (tmpzptr = zgrp_start;
- tmpzptr && !seen_before;
- tmpzptr = tmpzptr->z_next) {
- if (strcasecmp(dname,
- tmpzptr->z_origin) == 0 &&
- tmpzptr->z_class == qclass)
- seen_before++;
- for (tmprrecp = tmpzptr->z_rr;
- tmprrecp && !seen_before;
- tmprrecp = tmprrecp->r_grpnext)
- if (strcasecmp(dname, tmprrecp->r_dname) == 0
- && tmprrecp->r_class == qclass) {
- seen_before++;
- break;
- }
- if (seen_before) {
- /*
- * Append to the end of
- * current group.
- */
- for (tmprrecp = tmpzptr->z_rr;
- tmprrecp->r_grpnext;
- tmprrecp = tmprrecp->r_grpnext)
- (void)NULL;
- tmprrecp->r_grpnext = rrecp;
- rrecp->r_grpnext = NULL;
- done = 1;
- break;
- }
- }
- } else if (qtype == T_A) {
- for (tmpzptr = zgrp_start;
- tmpzptr && !done;
- tmpzptr = tmpzptr->z_next)
- for (i = 0; i < tmpzptr->z_nscount; i++)
- if (tmpzptr->z_class == qclass &&
- strcasecmp(tmpzptr->z_ns[i].nsname,
- dname) == 0 &&
- tmpzptr->z_ns[i].nsaddr1.s_addr != 0) {
- zptr->z_ns[k].nsaddr1.s_addr =
- tmpzptr->z_ns[i].nsaddr1.s_addr;
- done = 1;
- break;
- }
- }
- if (done)
- break;
- n = res_mkquery(QUERY, dname, qclass, qtype, NULL,
- 0, NULL, buf, sizeof buf);
- if (n <= 0) {
- fprintf(stderr, "res_update: mkquery failed\n");
- return (n);
- }
- n = res_send(buf, n, answer, sizeof answer);
- if (n < 0) {
- fprintf(stderr, "res_update: send error for %s\n",
- rrecp->r_dname);
- return (n);
- }
- if (n < HFIXEDSZ)
- return (-1);
- ancount = ntohs(hp->ancount);
- nscount = ntohs(hp->nscount);
- arcount = ntohs(hp->arcount);
- rcode = hp->rcode;
- cp = answer + HFIXEDSZ;
- eom = answer + n;
- /* skip the question section */
- n = dn_skipname(cp, eom);
- if (n < 0 || cp + n + 2 * INT16SZ > eom)
- return (-1);
- cp += n + 2 * INT16SZ;
-
- if (qtype == T_SOA) {
- if (ancount == 0 && nscount == 0 && arcount == 0) {
- /*
- * if (rcode == NOERROR) then the dname exists but
- * has no soa record associated with it.
- * if (rcode == NXDOMAIN) then the dname does not
- * exist and the server is replying out of NCACHE.
- * in either case, proceed with the next try
- */
- dname = strchr(dname, '.');
- if (dname != NULL)
- dname++;
- continue;
- } else if ((rcode == NOERROR || rcode == NXDOMAIN) &&
- ancount == 0 &&
- nscount == 1 && arcount == 0) {
- /*
- * name/data does not exist, soa record supplied in the
- * authority section
- */
- /* authority section must contain the soa record */
- if ((n = dn_expand(answer, eom, cp, zname,
- sizeof zname)) < 0)
- return (n);
- cp += n;
- if (cp + 2 * INT16SZ > eom)
- return (-1);
- GETSHORT(type, cp);
- GETSHORT(class, cp);
- if (type != T_SOA || class != qclass) {
- fprintf(stderr, "unknown answer\n");
- return (-1);
- }
- myzone = 0;
- svdname = dname;
- while (dname)
- if (strcasecmp(dname, zname) == 0) {
- myzone = 1;
- break;
- } else if ((dname = strchr(dname, '.')) != NULL)
- dname++;
- if (!myzone) {
- dname = strchr(svdname, '.');
- if (dname != NULL)
- dname++;
- continue;
- }
- nscount = 0;
- /* fallthrough */
- } else if (rcode == NOERROR && ancount == 1) {
- /*
- * found the zone name
- * new servers will supply NS records for the zone
- * in authority section and A records for those
- * nameservers in the additional section
- * older servers have to be explicitly queried for
- * NS records for the zone
- */
- /* answer section must contain the soa record */
- if ((n = dn_expand(answer, eom, cp, zname,
- sizeof zname)) < 0)
- return (n);
- else
- cp += n;
- if (cp + 2 * INT16SZ > eom)
- return (-1);
- GETSHORT(type, cp);
- GETSHORT(class, cp);
- if (type == T_CNAME) {
- dname = strchr(dname, '.');
- if (dname != NULL)
- dname++;
- continue;
- }
- if (strcasecmp(dname, zname) != 0 ||
- type != T_SOA ||
- class != rrecp->r_class) {
- fprintf(stderr, "unknown answer\n");
- return (-1);
- }
- /* FALLTHROUGH */
- } else {
- fprintf(stderr,
- "unknown response: ans=%d, auth=%d, add=%d, rcode=%d\n",
- ancount, nscount, arcount, hp->rcode);
- return (-1);
- }
- if (cp + INT32SZ + INT16SZ > eom)
- return (-1);
- /* continue processing the soa record */
- GETLONG(ttl, cp);
- GETSHORT(dlen, cp);
- if (cp + dlen > eom)
- return (-1);
- newgroup = 1;
- zptr = zgrp_start;
- prevzptr = NULL;
- while (zptr) {
- if (strcasecmp(zname, zptr->z_origin) == 0 &&
- type == T_SOA && class == qclass) {
- newgroup = 0;
- break;
- }
- prevzptr = zptr;
- zptr = zptr->z_next;
- }
- if (!newgroup) {
- for (tmprrecp = zptr->z_rr;
- tmprrecp->r_grpnext;
- tmprrecp = tmprrecp->r_grpnext)
- ;
- tmprrecp->r_grpnext = rrecp;
- rrecp->r_grpnext = NULL;
- done = 1;
- cp += dlen;
- break;
- } else {
- if ((n = dn_expand(answer, eom, cp, primary,
- sizeof primary)) < 0)
- return (n);
- cp += n;
- /*
- * We don't have to bounds check here because the
- * next use of 'cp' is in dn_expand().
- */
- cp1 = (char *)soardata;
- strcpy(cp1, primary);
- cp1 += strlen(cp1) + 1;
- if ((n = dn_expand(answer, eom, cp, mailaddr,
- sizeof mailaddr)) < 0)
- return (n);
- cp += n;
- strcpy(cp1, mailaddr);
- cp1 += strlen(cp1) + 1;
- if (cp + 5*INT32SZ > eom)
- return (-1);
- memcpy(cp1, cp, 5*INT32SZ);
- cp += 5*INT32SZ;
- cp1 += 5*INT32SZ;
- rdatasize = (u_char *)cp1 - soardata;
- zptr = calloc(1, sizeof(struct zonegrp));
- if (zptr == NULL)
- return (-1);
- if (zgrp_start == NULL)
- zgrp_start = zptr;
- else
- prevzptr->z_next = zptr;
- zptr->z_rr = rrecp;
- rrecp->r_grpnext = NULL;
- strcpy(zptr->z_origin, zname);
- zptr->z_class = class;
- memcpy(zptr->z_soardata, soardata, rdatasize);
- /* fallthrough to process NS and A records */
- }
- } else if (qtype == T_NS) {
- if (rcode == NOERROR && ancount > 0) {
- strcpy(zname, dname);
- for (zptr = zgrp_start; zptr; zptr = zptr->z_next) {
- if (strcasecmp(zname, zptr->z_origin) == 0)
- break;
- }
- if (zptr == NULL)
- /* should not happen */
- return (-1);
- if (nscount > 0) {
- /*
- * answer and authority sections contain
- * the same information, skip answer section
- */
- for (j = 0; j < ancount; j++) {
- n = dn_skipname(cp, eom);
- if (n < 0)
- return (-1);
- n += 2*INT16SZ + INT32SZ;
- if (cp + n + INT16SZ > eom)
- return (-1);
- cp += n;
- GETSHORT(dlen, cp);
- cp += dlen;
- }
- } else
- nscount = ancount;
- /* fallthrough to process NS and A records */
- } else {
- fprintf(stderr, "cannot determine nameservers for %s:\
-ans=%d, auth=%d, add=%d, rcode=%d\n",
- dname, ancount, nscount, arcount, hp->rcode);
- return (-1);
- }
- } else if (qtype == T_A) {
- if (rcode == NOERROR && ancount > 0) {
- arcount = ancount;
- ancount = nscount = 0;
- /* fallthrough to process A records */
- } else {
- fprintf(stderr, "cannot determine address for %s:\
-ans=%d, auth=%d, add=%d, rcode=%d\n",
- dname, ancount, nscount, arcount, hp->rcode);
- return (-1);
- }
- }
- /* process NS records for the zone */
- j = 0;
- for (i = 0; i < nscount; i++) {
- if ((n = dn_expand(answer, eom, cp, name,
- sizeof name)) < 0)
- return (n);
- cp += n;
- if (cp + 3 * INT16SZ + INT32SZ > eom)
- return (-1);
- GETSHORT(type, cp);
- GETSHORT(class, cp);
- GETLONG(ttl, cp);
- GETSHORT(dlen, cp);
- if (cp + dlen > eom)
- return (-1);
- if (strcasecmp(name, zname) == 0 &&
- type == T_NS && class == qclass) {
- if ((n = dn_expand(answer, eom, cp,
- name, sizeof name)) < 0)
- return (n);
- target = zptr->z_ns[j++].nsname;
- strcpy(target, name);
- }
- cp += dlen;
- }
- if (zptr->z_nscount == 0)
- zptr->z_nscount = j;
- /* get addresses for the nameservers */
- for (i = 0; i < arcount; i++) {
- if ((n = dn_expand(answer, eom, cp, name,
- sizeof name)) < 0)
- return (n);
- cp += n;
- if (cp + 3 * INT16SZ + INT32SZ > eom)
- return (-1);
- GETSHORT(type, cp);
- GETSHORT(class, cp);
- GETLONG(ttl, cp);
- GETSHORT(dlen, cp);
- if (cp + dlen > eom)
- return (-1);
- if (type == T_A && dlen == INT32SZ && class == qclass) {
- for (j = 0; j < zptr->z_nscount; j++)
- if (strcasecmp(name, zptr->z_ns[j].nsname) == 0) {
- memcpy(&zptr->z_ns[j].nsaddr1.s_addr, cp,
- INT32SZ);
- break;
- }
- }
- cp += dlen;
- }
- if (zptr->z_nscount == 0) {
- dname = zname;
- qtype = T_NS;
- continue;
- }
- done = 1;
- for (k = 0; k < zptr->z_nscount; k++)
- if (zptr->z_ns[k].nsaddr1.s_addr == 0) {
- done = 0;
- dname = zptr->z_ns[k].nsname;
- qtype = T_A;
- }
-
- } /* while */
- }
-
- _res.options |= RES_DEBUG;
- for (zptr = zgrp_start; zptr; zptr = zptr->z_next) {
-
- /* append zone section */
- rrecp = res_mkupdrec(ns_s_zn, zptr->z_origin,
- zptr->z_class, ns_t_soa, 0);
- if (rrecp == NULL) {
- fprintf(stderr, "saverrec error\n");
- fflush(stderr);
- return (-1);
- }
- rrecp->r_grpnext = zptr->z_rr;
- zptr->z_rr = rrecp;
-
- n = res_mkupdate(zptr->z_rr, packet, sizeof packet);
- if (n < 0) {
- fprintf(stderr, "res_mkupdate error\n");
- fflush(stderr);
- return (-1);
- } else
- fprintf(stdout, "res_mkupdate: packet size = %d\n", n);
-
- /*
- * Override the list of NS records from res_init() with
- * the authoritative nameservers for the zone being updated.
- * Sort primary to be the first in the list of nameservers.
- */
- for (i = 0; i < zptr->z_nscount; i++) {
- if (strcasecmp(zptr->z_ns[i].nsname,
- zptr->z_soardata) == 0) {
- struct in_addr tmpaddr;
-
- if (i != 0) {
- strcpy(zptr->z_ns[i].nsname,
- zptr->z_ns[0].nsname);
- strcpy(zptr->z_ns[0].nsname,
- zptr->z_soardata);
- tmpaddr = zptr->z_ns[i].nsaddr1;
- zptr->z_ns[i].nsaddr1 =
- zptr->z_ns[0].nsaddr1;
- zptr->z_ns[0].nsaddr1 = tmpaddr;
- }
- break;
- }
- }
- for (i = 0; i < MAXNS; i++) {
- _res.nsaddr_list[i].sin_addr = zptr->z_ns[i].nsaddr1;
- _res.nsaddr_list[i].sin_family = AF_INET;
- _res.nsaddr_list[i].sin_port = htons(NAMESERVER_PORT);
- }
- _res.nscount = (zptr->z_nscount < MAXNS) ?
- zptr->z_nscount : MAXNS;
- n = res_send(packet, n, answer, sizeof(answer));
- if (n < 0) {
- fprintf(stderr, "res_send: send error, n=%d\n", n);
- break;
- } else
- numzones++;
- }
-
- /* free malloc'ed memory */
- while(zgrp_start) {
- zptr = zgrp_start;
- zgrp_start = zgrp_start->z_next;
- res_freeupdrec(zptr->z_rr); /* Zone section we allocated. */
- free((char *)zptr);
- }
-
- return (numzones);
-}
diff --git a/c/src/exec/libnetworking/libc/resolver.3 b/c/src/exec/libnetworking/libc/resolver.3
deleted file mode 100644
index 8c6f18334f..0000000000
--- a/c/src/exec/libnetworking/libc/resolver.3
+++ /dev/null
@@ -1,352 +0,0 @@
-.\" Copyright (c) 1985, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)resolver.3 8.1 (Berkeley) 6/4/93
-.\" $Id$
-.\"
-.Dd June 4, 1993
-.Dt RESOLVER 3
-.Os BSD 4.3
-.Sh NAME
-.Nm res_query ,
-.Nm res_search ,
-.Nm res_mkquery ,
-.Nm res_send ,
-.Nm res_init ,
-.Nm dn_comp ,
-.Nm dn_expand
-.Nd resolver routines
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <netinet/in.h>
-.Fd #include <arpa/nameser.h>
-.Fd #include <resolv.h>
-.Ft int
-.Fo res_query
-.Fa "const char *dname"
-.Fa "int class"
-.Fa "int type"
-.Fa "u_char *answer"
-.Fa "int anslen"
-.Fc
-.Ft int
-.Fo res_search
-.Fa "const char *dname"
-.Fa "int class"
-.Fa "int type"
-.Fa "u_char *answer"
-.Fa "int anslen"
-.Fc
-.Ft int
-.Fo res_mkquery
-.Fa "int op"
-.Fa "const char *dname"
-.Fa "int class"
-.Fa "int type"
-.Fa "const u_char *data"
-.Fa "int datalen"
-.Fa "const u_char *newrr_in"
-.Fa "u_char *buf"
-.Fa "int buflen"
-.Fc
-.Ft int
-.Fo res_send
-.Fa "const u_char *msg"
-.Fa "int msglen"
-.Fa "u_char *answer"
-.Fa "int anslen"
-.Fc
-.Ft int
-.Fn res_init
-.Fo dn_comp
-.Fa "const char *exp_dn"
-.Fa "u_char *comp_dn"
-.Fa "int length"
-.Fa "u_char **dnptrs"
-.Fa "u_char **lastdnptr"
-.Fc
-.Ft int
-.Fo dn_expand
-.Fa "const u_char *msg"
-.Fa "const u_char *eomorig"
-.Fa "const u_char *comp_dn"
-.Fa "char *exp_dn"
-.Fa "int length"
-.Fc
-.Sh DESCRIPTION
-These routines are used for making, sending and interpreting
-query and reply messages with Internet domain name servers.
-.Pp
-Global configuration and state information that is used by the
-resolver routines is kept in the structure
-.Em _res .
-Most of the values have reasonable defaults and can be ignored.
-Options
-stored in
-.Em _res.options
-are defined in
-.Pa resolv.h
-and are as follows.
-Options are stored as a simple bit mask containing the bitwise ``or''
-of the options enabled.
-.Bl -tag -width RES_DEFNAMES
-.It Dv RES_INIT
-True if the initial name server address and default domain name are
-initialized (i.e.,
-.Fn res_init
-has been called).
-.It Dv RES_DEBUG
-Print debugging messages.
-.It Dv RES_AAONLY
-Accept authoritative answers only.
-With this option,
-.Fn res_send
-should continue until it finds an authoritative answer or finds an error.
-Currently this is not implemented.
-.It Dv RES_USEVC
-Use
-.Tn TCP
-connections for queries instead of
-.Tn UDP
-datagrams.
-.It Dv RES_STAYOPEN
-Used with
-.Dv RES_USEVC
-to keep the
-.Tn TCP
-connection open between
-queries.
-This is useful only in programs that regularly do many queries.
-.Tn UDP
-should be the normal mode used.
-.It Dv RES_IGNTC
-Unused currently (ignore truncation errors, i.e., don't retry with
-.Tn TCP ) .
-.It Dv RES_RECURSE
-Set the recursion-desired bit in queries.
-This is the default.
-.Pf ( Fn res_send
-does not do iterative queries and expects the name server
-to handle recursion.)
-.It Dv RES_DEFNAMES
-If set,
-.Fn res_search
-will append the default domain name to single-component names
-(those that do not contain a dot).
-This option is enabled by default.
-.It Dv RES_DNSRCH
-If this option is set,
-.Fn res_search
-will search for host names in the current domain and in parent domains; see
-.Xr hostname 7 .
-This is used by the standard host lookup routine
-.Xr gethostbyname 3 .
-This option is enabled by default.
-.It Dv RES_NOALIASES
-This option turns off the user level aliasing feature controlled by the
-.Dq Ev HOSTALIASES
-environment variable. Network daemons should set this option.
-.El
-.Pp
-The
-.Fn res_init
-routine
-reads the configuration file (if any; see
-.Xr resolver 5 )
-to get the default domain name,
-search list and
-the Internet address of the local name server(s).
-If no server is configured, the host running
-the resolver is tried.
-The current domain name is defined by the hostname
-if not specified in the configuration file;
-it can be overridden by the environment variable
-.Ev LOCALDOMAIN .
-This environment variable may contain several blank-separated
-tokens if you wish to override the
-.Em "search list"
-on a per-process basis. This is similar to the
-.Em search
-command in the configuration file.
-Another environment variable (
-.Dq Ev RES_OPTIONS
-can be set to
-override certain internal resolver options which are otherwise
-set by changing fields in the
-.Em _res
-structure or are inherited from the configuration file's
-.Em options
-command. The syntax of the
-.Dq Ev RES_OPTIONS
-environment variable is explained in
-.Xr resolver 5 .
-Initialization normally occurs on the first call
-to one of the following routines.
-.Pp
-The
-.Fn res_query
-function provides an interface to the server query mechanism.
-It constructs a query, sends it to the local server,
-awaits a response, and makes preliminary checks on the reply.
-The query requests information of the specified
-.Fa type
-and
-.Fa class
-for the specified fully-qualified domain name
-.Fa dname .
-The reply message is left in the
-.Fa answer
-buffer with length
-.Fa anslen
-supplied by the caller.
-.Pp
-The
-.Fn res_search
-routine makes a query and awaits a response like
-.Fn res_query ,
-but in addition, it implements the default and search rules
-controlled by the
-.Dv RES_DEFNAMES
-and
-.Dv RES_DNSRCH
-options.
-It returns the first successful reply.
-.Pp
-The remaining routines are lower-level routines used by
-.Fn res_query .
-The
-.Fn res_mkquery
-function
-constructs a standard query message and places it in
-.Fa buf .
-It returns the size of the query, or \-1 if the query is
-larger than
-.Fa buflen .
-The query type
-.Fa op
-is usually
-.Dv QUERY ,
-but can be any of the query types defined in
-.Aq Pa arpa/nameser.h .
-The domain name for the query is given by
-.Fa dname .
-.Fa Newrr
-is currently unused but is intended for making update messages.
-.Pp
-The
-.Fn res_send
-routine
-sends a pre-formatted query and returns an answer.
-It will call
-.Fn res_init
-if
-.Dv RES_INIT
-is not set, send the query to the local name server, and
-handle timeouts and retries.
-The length of the reply message is returned, or
-\-1 if there were errors.
-.Pp
-The
-.Fn dn_comp
-function
-compresses the domain name
-.Fa exp_dn
-and stores it in
-.Fa comp_dn .
-The size of the compressed name is returned or \-1 if there were errors.
-The size of the array pointed to by
-.Fa comp_dn
-is given by
-.Fa length .
-The compression uses
-an array of pointers
-.Fa dnptrs
-to previously-compressed names in the current message.
-The first pointer points to
-to the beginning of the message and the list ends with
-.Dv NULL .
-The limit to the array is specified by
-.Fa lastdnptr .
-A side effect of
-.Fn dn_comp
-is to update the list of pointers for
-labels inserted into the message
-as the name is compressed.
-If
-.Em dnptr
-is
-.Dv NULL, names are not compressed.
-If
-.Fa lastdnptr
-is
-.Dv NULL ,
-the list of labels is not updated.
-.Pp
-The
-.Fn dn_expand
-entry
-expands the compressed domain name
-.Fa comp_dn
-to a full domain name
-The compressed name is contained in a query or reply message;
-.Fa msg
-is a pointer to the beginning of the message.
-The uncompressed name is placed in the buffer indicated by
-.Fa exp_dn
-which is of size
-.Fa length .
-The size of compressed name is returned or \-1 if there was an error.
-.Sh FILES
-.Bl -tag -width Pa
-/etc/resolv.conf
-The configuration file
-see
-.Xr resolver 5 .
-.El
-.Sh SEE ALSO
-.Xr gethostbyname 3 ,
-.Xr resolver 5 ,
-.Xr hostname 7 ,
-.Xr named 8
-.Pp
-.%T RFC1032 ,
-.%T RFC1033 ,
-.%T RFC1034 ,
-.%T RFC1035 ,
-.%T RFC974
-.Rs
-.%T "Name Server Operations Guide for BIND"
-.Re
-.Sh HISTORY
-The
-.Nm
-function appeared in
-.Bx 4.3 .
diff --git a/c/src/exec/libnetworking/libc/send.c b/c/src/exec/libnetworking/libc/send.c
deleted file mode 100644
index ad14bd3cd2..0000000000
--- a/c/src/exec/libnetworking/libc/send.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)send.c 8.2 (Berkeley) 2/21/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/socket.h>
-
-#include <stddef.h>
-
-ssize_t
-send(s, msg, len, flags)
- int s, flags;
- size_t len;
- const void *msg;
-{
- return (sendto(s, msg, len, flags, NULL, 0));
-}
diff --git a/c/src/exec/libnetworking/libc/strsep.c b/c/src/exec/libnetworking/libc/strsep.c
deleted file mode 100644
index 182319493d..0000000000
--- a/c/src/exec/libnetworking/libc/strsep.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static const char sccsid[] = "@(#)strsep.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <string.h>
-#include <stdio.h>
-
-/*
- * Get next token from string *stringp, where tokens are possibly-empty
- * strings separated by characters from delim.
- *
- * Writes NULs into the string at *stringp to end tokens.
- * delim need not remain constant from call to call.
- * On return, *stringp points past the last NUL written (if there might
- * be further tokens), or is NULL (if there are definitely no more tokens).
- *
- * If *stringp is NULL, strsep returns NULL.
- *
- * PUBLIC: #ifndef HAVE_STRSEP
- * PUBLIC: char *strsep __P((char **, const char *));
- * PUBLIC: #endif
- */
-char *
-strsep(stringp, delim)
- register char **stringp;
- register const char *delim;
-{
- register char *s;
- register const char *spanp;
- register int c, sc;
- char *tok;
-
- if ((s = *stringp) == NULL)
- return (NULL);
- for (tok = s;;) {
- c = *s++;
- spanp = delim;
- do {
- if ((sc = *spanp++) == c) {
- if (c == 0)
- s = NULL;
- else
- s[-1] = 0;
- *stringp = s;
- return (tok);
- }
- } while (sc != 0);
- }
- /* NOTREACHED */
-}
diff --git a/c/src/exec/libnetworking/loop.h b/c/src/exec/libnetworking/loop.h
deleted file mode 100644
index 34e0b828e4..0000000000
--- a/c/src/exec/libnetworking/loop.h
+++ /dev/null
@@ -1,5 +0,0 @@
-/*
- * $Id$
- */
-
-#define NLOOP 1
diff --git a/c/src/exec/libnetworking/machine/Makefile.am b/c/src/exec/libnetworking/machine/Makefile.am
deleted file mode 100644
index 11e23bf86c..0000000000
--- a/c/src/exec/libnetworking/machine/Makefile.am
+++ /dev/null
@@ -1,10 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-EXTRA_DIST = conf.h cpu.h cpufunc.h endian.h in_cksum.h limits.h param.h \
- types.h vmparam.h
-
-include $(top_srcdir)/../../../automake/local.am
diff --git a/c/src/exec/libnetworking/machine/conf.h b/c/src/exec/libnetworking/machine/conf.h
deleted file mode 100644
index 5a6ee0337b..0000000000
--- a/c/src/exec/libnetworking/machine/conf.h
+++ /dev/null
@@ -1,6 +0,0 @@
-/*
- * $Id$
- */
-
-/* intentionally empty file */
-
diff --git a/c/src/exec/libnetworking/machine/cpu.h b/c/src/exec/libnetworking/machine/cpu.h
deleted file mode 100644
index 5a6ee0337b..0000000000
--- a/c/src/exec/libnetworking/machine/cpu.h
+++ /dev/null
@@ -1,6 +0,0 @@
-/*
- * $Id$
- */
-
-/* intentionally empty file */
-
diff --git a/c/src/exec/libnetworking/machine/cpufunc.h b/c/src/exec/libnetworking/machine/cpufunc.h
deleted file mode 100644
index 2b4c47e48f..0000000000
--- a/c/src/exec/libnetworking/machine/cpufunc.h
+++ /dev/null
@@ -1,5 +0,0 @@
-/*
- * $Id$
- */
-
-/* intentionally empty file */
diff --git a/c/src/exec/libnetworking/machine/endian.h b/c/src/exec/libnetworking/machine/endian.h
deleted file mode 100644
index 6b17da58d3..0000000000
--- a/c/src/exec/libnetworking/machine/endian.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * $Id$
- */
-
-#ifndef _MACHINE_ENDIAN_H_
-#define _MACHINE_ENDIAN_H_
-
-#include <rtems/score/cpu.h>
-
-/*
- * BSD-style endian declaration
- */
-#define BIG_ENDIAN 4321
-#define LITTLE_ENDIAN 1234
-
-#if CPU_BIG_ENDIAN
-# define BYTE_ORDER BIG_ENDIAN
-#elif CPU_LITTLE_ENDIAN
-# define BYTE_ORDER LITTLE_ENDIAN
-#else
-# error "Can't decide which end is which!"
-#endif
-
-#if ( CPU_HAS_OWN_HOST_TO_NETWORK_ROUTINES == FALSE )
-
-#if ( CPU_BIG_ENDIAN == TRUE )
-
-/*
- * Very simply on big endian CPUs
- */
-
-#define ntohl(_x) (_x)
-#define ntohs(_x) (_x)
-#define htonl(_x) (_x)
-#define htons(_x) (_x)
-
-#define NTOHS(x)
-#define HTONS(x)
-#define NTOHL(x)
-#define HTONL(x)
-
-#elif ( CPU_LITTLE_ENDIAN == TRUE )
-
-/*
- * A little more complicated on little endian CPUs
- */
-
-#define ntohl(_x) ((long) CPU_swap_u32((unsigned32)_x))
-#define ntohs(_x) ((short) CPU_swap_u16((unsigned16)_x))
-#define htonl(_x) ((long) CPU_swap_u32((unsigned32)_x))
-#define htons(_x) ((short) CPU_swap_u16((unsigned16)_x))
-
-#define NTOHS(x) (x) = ntohs(x)
-#define HTONS(x) (x) = htons(x)
-#define NTOHL(x) (x) = ntohl(x)
-#define HTONL(x) (x) = htonl(x)
-
-#else
-#error "Unknown endian-ness for this cpu"
-#endif
-
-#endif /* CPU_HAS_OWN_HOST_TO_NETWORK_ROUTINES */
-
-#endif /* _MACHINE_ENDIAN_H_ */
diff --git a/c/src/exec/libnetworking/machine/in_cksum.h b/c/src/exec/libnetworking/machine/in_cksum.h
deleted file mode 100644
index dd2e01d4de..0000000000
--- a/c/src/exec/libnetworking/machine/in_cksum.h
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * from tahoe: in_cksum.c 1.2 86/01/05
- * from: @(#)in_cksum.c 1.3 (Berkeley) 1/19/91
- * from: Id: in_cksum.c,v 1.8 1995/12/03 18:35:19 bde Exp
- * $Id$
- */
-
-#ifndef _MACHINE_IN_CKSUM_H_
-#define _MACHINE_IN_CKSUM_H_ 1
-
-#include <sys/cdefs.h>
-
-/*
- * It it useful to have an Internet checksum routine which is inlineable
- * and optimized specifically for the task of computing IP header checksums
- * in the normal case (where there are no options and the header length is
- * therefore always exactly five 32-bit words.
- */
-
-/*
- * Optimized version for the i386 family
- */
-
-#if (defined(__GNUC__) && defined(__i386__))
-
-static __inline u_int
-in_cksum_hdr(const struct ip *ip)
-{
- register u_int sum = 0;
-
-#define ADD(n) \
- __asm__ volatile ("addl " #n "(%2), %0" : "=r" (sum) : "0" (sum), "r" (ip))
-#define ADDC(n) \
- __asm__ volatile ("adcl " #n "(%2), %0" : "=r" (sum) : "0" (sum), "r" (ip))
-#define MOP \
- __asm__ volatile ("adcl $0, %0" : "=r" (sum) : "0" (sum))
-
- ADD(0);
- ADDC(4);
- ADDC(8);
- ADDC(12);
- ADDC(16);
- MOP;
- sum = (sum & 0xffff) + (sum >> 16);
- if (sum > 0xffff)
- sum -= 0xffff;
-
- return ~sum & 0xffff;
-}
-
-static __inline void
-in_cksum_update(struct ip *ip)
-{
- int __tmpsum;
- __tmpsum = (int)ntohs(ip->ip_sum) + 256;
- ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16));
-}
-
-/*
- * Optimized version for the MC68xxx and Coldfire families
- */
-
-#elif (defined(__GNUC__) && (defined(__mc68000__) || defined(__m68k__)))
-
-static __inline__ u_int
-in_cksum_hdr(const struct ip *ip)
-{
- register u_int *ap = (u_int *)ip;
- register u_int sum = *ap++;
- register u_int tmp;
-
- __asm__("addl %2@+,%0\n\t"
- "movel %2@+,%1\n\t"
- "addxl %1,%0\n\t"
- "movel %2@+,%1\n\t"
- "addxl %1,%0\n\t"
- "movel %2@,%1\n\t"
- "addxl %1,%0\n\t"
- "moveq #0,%1\n\t"
- "addxl %1,%0\n" :
- "=d" (sum), "=d" (tmp), "=a" (ap) :
- "0" (sum), "2" (ap));
- sum = (sum & 0xffff) + (sum >> 16);
- if (sum > 0xffff)
- sum -= 0xffff;
- return ~sum & 0xffff;
-}
-
-/*
- * Optimized version for the PowerPC family
- */
-
-#elif (defined(__GNUC__) && (defined(__PPC__) || defined(__ppc__)))
-
-static __inline u_int
-in_cksum_hdr(const struct ip *ip)
-{
- register u_int sum = 0;
- register u_int tmp;
-
-#define ADD(n) \
- __asm__ volatile ("addc %0,%0,%2" : "=r" (sum) : "0" (sum), "r" (n))
-#define ADDC(n) \
- __asm__ volatile ("adde %0,%0,%2" : "=r" (sum) : "0" (sum), "r" (n))
-#define MOP \
- __asm__ volatile ("addic %0,%0,0" : "=r" (sum) : "0" (sum))
-
- tmp = *(((u_int *) ip)); ADD(tmp);
- tmp = *(((u_int *) ip) + 1); ADDC(tmp);
- tmp = *(((u_int *) ip) + 2); ADDC(tmp);
- tmp = *(((u_int *) ip) + 3); ADDC(tmp);
- tmp = *(((u_int *) ip) + 4); ADDC(tmp);
- tmp = 0; ADDC(tmp);
- sum = (sum & 0xffff) + (sum >> 16);
- if (sum > 0xffff)
- sum -= 0xffff;
-
- return ~sum & 0xffff;
-}
-
-static __inline void
-in_cksum_update(struct ip *ip)
-{
- int __tmpsum;
- __tmpsum = (int)ntohs(ip->ip_sum) + 256;
- ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16));
-}
-
-/*
- * SPARC Version
- */
-
-#elif (defined(__GNUC__) && defined(sparc))
-
-static __inline u_int
-in_cksum_hdr(const struct ip *ip)
-{
- register u_int sum = 0;
- register u_int tmp_o2;
- register u_int tmp_o3;
-
- __asm__ volatile ("
- ld [%0], %1 ; \
- ld [%0+4], %2 ; \
- addcc %1, %2, %1 ; \
- ld [%0+8], %2 ; \
- addxcc %1, %2, %1 ; \
- ld [%0+12], %2 ; \
- addxcc %1, %2, %1 ; \
- ld [%0+16], %2 ; \
- addxcc %1, %2, %1 ; \
- set 0x0ffff, %3 ; \
- srl %1, 16, %2 ; \
- and %1, %3, %1 ; \
- addx %1, %2, %1 ; \
- srl %1, 16, %1 ; \
- add %1, %%g0, %1 ; \
- neg %1 ; \
- and %1, %3, %1 ; \
- " : "=r" (ip), "=r" (sum), "=r" (tmp_o2), "=r" (tmp_o3)
- : "0" (ip), "1" (sum)
- );
- return sum;
-}
-
-#define in_cksum_update(ip) \
- do { \
- int __tmpsum; \
- __tmpsum = (int)ntohs(ip->ip_sum) + 256; \
- ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16)); \
- } while(0)
-/*
- * Here is the generic, portable, inefficient algorithm.
- */
-
-#else
-u_int in_cksum_hdr __P((const struct ip *));
-#define in_cksum_update(ip) \
- do { \
- int __tmpsum; \
- __tmpsum = (int)ntohs(ip->ip_sum) + 256; \
- ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16)); \
- } while(0)
-
-#endif
-
-#endif /* _MACHINE_IN_CKSUM_H_ */
diff --git a/c/src/exec/libnetworking/machine/limits.h b/c/src/exec/libnetworking/machine/limits.h
deleted file mode 100644
index 5a6ee0337b..0000000000
--- a/c/src/exec/libnetworking/machine/limits.h
+++ /dev/null
@@ -1,6 +0,0 @@
-/*
- * $Id$
- */
-
-/* intentionally empty file */
-
diff --git a/c/src/exec/libnetworking/machine/param.h b/c/src/exec/libnetworking/machine/param.h
deleted file mode 100644
index 4168f1f6cf..0000000000
--- a/c/src/exec/libnetworking/machine/param.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * $Id$
- */
-
-#ifndef _MACHINE_PARAM_H_
-#define _MACHINE_PARAM_H_
-
-/*
- * These aren't really machine-dependent for RTEMS.....
- */
-
-/*
-#define MACHINE "i386"
-#define MID_MACHINE MID_I386
-*/
-
-/*
- * Round p (pointer or byte index) up to a correctly-aligned value
- * for all data types (int, long, ...). The result is unsigned int
- * and must be cast to any desired pointer type.
- */
-#define ALIGNBYTES (sizeof(int) - 1)
-#define ALIGN(p) (((unsigned)(p) + ALIGNBYTES) & ~ALIGNBYTES)
-
-#define PAGE_SHIFT 12 /* LOG2(PAGE_SIZE) */
-#define PAGE_SIZE (1<<PAGE_SHIFT) /* bytes/page */
-#define PAGE_MASK (PAGE_SIZE-1)
-#define NPTEPG (PAGE_SIZE/(sizeof (pt_entry_t)))
-
-#define NPDEPG (PAGE_SIZE/(sizeof (pd_entry_t)))
-#define PDRSHIFT 22 /* LOG2(NBPDR) */
-#define NBPDR (1<<PDRSHIFT) /* bytes/page dir */
-
-#define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */
-#define DEV_BSIZE (1<<DEV_BSHIFT)
-
-#define BLKDEV_IOSIZE 2048
-#define MAXPHYS (64 * 1024) /* max raw I/O transfer size */
-
-#define UPAGES 2 /* pages of u-area */
-
-/*
- * Constants related to network buffer management.
- * MCLBYTES must be no larger than CLBYTES (the software page size), and,
- * on machines that exchange pages of input or output buffers with mbuf
- * clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple
- * of the hardware page size.
- */
-#ifndef MSIZE
-#define MSIZE 128 /* size of an mbuf */
-#endif /* MSIZE */
-
-#ifndef MCLSHIFT
-#define MCLSHIFT 11 /* convert bytes to m_buf clusters */
-#endif /* MCLSHIFT */
-#define MCLBYTES (1 << MCLSHIFT) /* size of an m_buf cluster */
-#define MCLOFSET (MCLBYTES - 1) /* offset within an m_buf cluster */
-
-/*
- * Some macros for units conversion
- */
-
-/* clicks to bytes */
-#define ctob(x) ((x)<<PAGE_SHIFT)
-
-/* bytes to clicks */
-#define btoc(x) (((unsigned)(x)+PAGE_MASK)>>PAGE_SHIFT)
-
-/*
- * btodb() is messy and perhaps slow because `bytes' may be an off_t. We
- * want to shift an unsigned type to avoid sign extension and we don't
- * want to widen `bytes' unnecessarily. Assume that the result fits in
- * a daddr_t.
- */
-#define btodb(bytes) /* calculates (bytes / DEV_BSIZE) */ \
- (sizeof (bytes) > sizeof(long) \
- ? (daddr_t)((unsigned long long)(bytes) >> DEV_BSHIFT) \
- : (daddr_t)((unsigned long)(bytes) >> DEV_BSHIFT))
-
-#define dbtob(db) /* calculates (db * DEV_BSIZE) */ \
- ((off_t)(db) << DEV_BSHIFT)
-
-/*
- * Mach derived conversion macros
- */
-#define trunc_page(x) ((unsigned)(x) & ~PAGE_MASK)
-#define round_page(x) ((((unsigned)(x)) + PAGE_MASK) & ~PAGE_MASK)
-
-#define atop(x) ((unsigned)(x) >> PAGE_SHIFT)
-#define ptoa(x) ((unsigned)(x) << PAGE_SHIFT)
-
-#endif /* !_MACHINE_PARAM_H_ */
diff --git a/c/src/exec/libnetworking/machine/types.h b/c/src/exec/libnetworking/machine/types.h
deleted file mode 100644
index 730a6dec1d..0000000000
--- a/c/src/exec/libnetworking/machine/types.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * This file will have to be incorparated into the RTEMS source
- * tree (probably in the existing <machine/types.h> so that these
- * contents are included when an application source file includes
- * <sys/types.h>.
- *
- * $Id$
- */
-
-#ifndef _MACHINE_TYPES_H_
-#define _MACHINE_TYPES_H_
-
-#include <rtems.h>
-#include <machine/endian.h>
-
-typedef rtems_signed64 int64_t;
-typedef rtems_signed32 int32_t;
-typedef rtems_signed16 int16_t;
-typedef rtems_signed8 int8_t;
-
-typedef rtems_unsigned64 u_int64_t;
-typedef rtems_unsigned32 u_int32_t;
-typedef rtems_unsigned16 u_int16_t;
-typedef rtems_unsigned8 u_int8_t;
-
-#define _CLOCK_T_ unsigned long
-#define _TIME_T_ long
-
-#ifdef _COMPILING_BSD_KERNEL_
-#include <rtems/rtems_bsdnet_internal.h>
-#include <rtems/rtems_bsdnet.h>
-#endif
-
-#endif /* _MACHINE_TYPES_H_ */
diff --git a/c/src/exec/libnetworking/machine/vmparam.h b/c/src/exec/libnetworking/machine/vmparam.h
deleted file mode 100644
index 5a6ee0337b..0000000000
--- a/c/src/exec/libnetworking/machine/vmparam.h
+++ /dev/null
@@ -1,6 +0,0 @@
-/*
- * $Id$
- */
-
-/* intentionally empty file */
-
diff --git a/c/src/exec/libnetworking/net/Makefile.am b/c/src/exec/libnetworking/net/Makefile.am
deleted file mode 100644
index d965963974..0000000000
--- a/c/src/exec/libnetworking/net/Makefile.am
+++ /dev/null
@@ -1,37 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-LIBNAME = lib.a
-LIB = $(ARCH)/$(LIBNAME)
-
-C_FILES = if.c if_ethersubr.c if_loop.c radix.c route.c rtsock.c raw_cb.c \
- raw_usrreq.c
-C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
-
-OBJS = $(C_O_FILES)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../automake/lib.am
-
-#
-# Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -D_COMPILING_BSD_KERNEL_ -DKERNEL -DINET -DNFS -DDIAGNOSTIC \
- -DBOOTP_COMPAT
-
-$(LIB): $(OBJS)
- $(make-library)
-
-all-local: $(ARCH) $(OBJS) $(LIB)
-
-.PRECIOUS: $(LIB)
-
-EXTRA_DIST = bpf.h ethernet.h if.c if.h if_arp.h if_dl.h if_ethersubr.c \
- if_llc.h if_loop.c if_ppp.h if_types.h netisr.h ppp-comp.h ppp_defs.h \
- radix.c radix.h raw_cb.c raw_cb.h raw_usrreq.c route.c route.h rtsock.c
-
-include $(top_srcdir)/../../../automake/local.am
diff --git a/c/src/exec/libnetworking/net/bpf.h b/c/src/exec/libnetworking/net/bpf.h
deleted file mode 100644
index 7847d72470..0000000000
--- a/c/src/exec/libnetworking/net/bpf.h
+++ /dev/null
@@ -1,236 +0,0 @@
-/*
- * Copyright (c) 1990, 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from the Stanford/CMU enet packet filter,
- * (net/enet.c) distributed as part of 4.3BSD, and code contributed
- * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence
- * Berkeley Laboratory.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)bpf.h 8.1 (Berkeley) 6/10/93
- * @(#)bpf.h 1.34 (LBL) 6/16/96
- *
- * $Id$
- */
-
-#ifndef _NET_BPF_H_
-#define _NET_BPF_H_
-
-/* BSD style release date */
-#define BPF_RELEASE 199606
-
-typedef int32_t bpf_int32;
-typedef u_int32_t bpf_u_int32;
-
-/*
- * Alignment macros. BPF_WORDALIGN rounds up to the next
- * even multiple of BPF_ALIGNMENT.
- */
-#define BPF_ALIGNMENT sizeof(bpf_int32)
-#define BPF_WORDALIGN(x) (((x)+(BPF_ALIGNMENT-1))&~(BPF_ALIGNMENT-1))
-
-#define BPF_MAXINSNS 512
-#define BPF_MAXBUFSIZE 0x8000
-#define BPF_MINBUFSIZE 32
-
-/*
- * Structure for BIOCSETF.
- */
-struct bpf_program {
- u_int bf_len;
- struct bpf_insn *bf_insns;
-};
-
-/*
- * Struct returned by BIOCGSTATS.
- */
-struct bpf_stat {
- u_int bs_recv; /* number of packets received */
- u_int bs_drop; /* number of packets dropped */
-};
-
-/*
- * Struct return by BIOCVERSION. This represents the version number of
- * the filter language described by the instruction encodings below.
- * bpf understands a program iff kernel_major == filter_major &&
- * kernel_minor >= filter_minor, that is, if the value returned by the
- * running kernel has the same major number and a minor number equal
- * equal to or less than the filter being downloaded. Otherwise, the
- * results are undefined, meaning an error may be returned or packets
- * may be accepted haphazardly.
- * It has nothing to do with the source code version.
- */
-struct bpf_version {
- u_short bv_major;
- u_short bv_minor;
-};
-/* Current version number of filter architecture. */
-#define BPF_MAJOR_VERSION 1
-#define BPF_MINOR_VERSION 1
-
-#define BIOCGBLEN _IOR('B',102, u_int)
-#define BIOCSBLEN _IOWR('B',102, u_int)
-#define BIOCSETF _IOW('B',103, struct bpf_program)
-#define BIOCFLUSH _IO('B',104)
-#define BIOCPROMISC _IO('B',105)
-#define BIOCGDLT _IOR('B',106, u_int)
-#define BIOCGETIF _IOR('B',107, struct ifreq)
-#define BIOCSETIF _IOW('B',108, struct ifreq)
-#define BIOCSRTIMEOUT _IOW('B',109, struct timeval)
-#define BIOCGRTIMEOUT _IOR('B',110, struct timeval)
-#define BIOCGSTATS _IOR('B',111, struct bpf_stat)
-#define BIOCIMMEDIATE _IOW('B',112, u_int)
-#define BIOCVERSION _IOR('B',113, struct bpf_version)
-#define BIOCGRSIG _IOR('B',114, u_int)
-#define BIOCSRSIG _IOW('B',115, u_int)
-
-/*
- * Structure prepended to each packet.
- */
-struct bpf_hdr {
- struct timeval bh_tstamp; /* time stamp */
- bpf_u_int32 bh_caplen; /* length of captured portion */
- bpf_u_int32 bh_datalen; /* original length of packet */
- u_short bh_hdrlen; /* length of bpf header (this struct
- plus alignment padding) */
-};
-/*
- * Because the structure above is not a multiple of 4 bytes, some compilers
- * will insist on inserting padding; hence, sizeof(struct bpf_hdr) won't work.
- * Only the kernel needs to know about it; applications use bh_hdrlen.
- */
-#ifdef KERNEL
-#define SIZEOF_BPF_HDR 18
-#endif
-
-/*
- * Data-link level type codes.
- */
-#define DLT_NULL 0 /* no link-layer encapsulation */
-#define DLT_EN10MB 1 /* Ethernet (10Mb) */
-#define DLT_EN3MB 2 /* Experimental Ethernet (3Mb) */
-#define DLT_AX25 3 /* Amateur Radio AX.25 */
-#define DLT_PRONET 4 /* Proteon ProNET Token Ring */
-#define DLT_CHAOS 5 /* Chaos */
-#define DLT_IEEE802 6 /* IEEE 802 Networks */
-#define DLT_ARCNET 7 /* ARCNET */
-#define DLT_SLIP 8 /* Serial Line IP */
-#define DLT_PPP 9 /* Point-to-point Protocol */
-#define DLT_FDDI 10 /* FDDI */
-#define DLT_ATM_RFC1483 11 /* LLC/SNAP encapsulated atm */
-
-/*
- * The instruction encodings.
- */
-/* instruction classes */
-#define BPF_CLASS(code) ((code) & 0x07)
-#define BPF_LD 0x00
-#define BPF_LDX 0x01
-#define BPF_ST 0x02
-#define BPF_STX 0x03
-#define BPF_ALU 0x04
-#define BPF_JMP 0x05
-#define BPF_RET 0x06
-#define BPF_MISC 0x07
-
-/* ld/ldx fields */
-#define BPF_SIZE(code) ((code) & 0x18)
-#define BPF_W 0x00
-#define BPF_H 0x08
-#define BPF_B 0x10
-#define BPF_MODE(code) ((code) & 0xe0)
-#define BPF_IMM 0x00
-#define BPF_ABS 0x20
-#define BPF_IND 0x40
-#define BPF_MEM 0x60
-#define BPF_LEN 0x80
-#define BPF_MSH 0xa0
-
-/* alu/jmp fields */
-#define BPF_OP(code) ((code) & 0xf0)
-#define BPF_ADD 0x00
-#define BPF_SUB 0x10
-#define BPF_MUL 0x20
-#define BPF_DIV 0x30
-#define BPF_OR 0x40
-#define BPF_AND 0x50
-#define BPF_LSH 0x60
-#define BPF_RSH 0x70
-#define BPF_NEG 0x80
-#define BPF_JA 0x00
-#define BPF_JEQ 0x10
-#define BPF_JGT 0x20
-#define BPF_JGE 0x30
-#define BPF_JSET 0x40
-#define BPF_SRC(code) ((code) & 0x08)
-#define BPF_K 0x00
-#define BPF_X 0x08
-
-/* ret - BPF_K and BPF_X also apply */
-#define BPF_RVAL(code) ((code) & 0x18)
-#define BPF_A 0x10
-
-/* misc */
-#define BPF_MISCOP(code) ((code) & 0xf8)
-#define BPF_TAX 0x00
-#define BPF_TXA 0x80
-
-/*
- * The instruction data structure.
- */
-struct bpf_insn {
- u_short code;
- u_char jt;
- u_char jf;
- bpf_u_int32 k;
-};
-
-/*
- * Macros for insn array initializers.
- */
-#define BPF_STMT(code, k) { (u_short)(code), 0, 0, k }
-#define BPF_JUMP(code, k, jt, jf) { (u_short)(code), jt, jf, k }
-
-#ifdef KERNEL
-int bpf_validate __P((struct bpf_insn *, int));
-void bpf_tap __P((struct ifnet *, u_char *, u_int));
-void bpf_mtap __P((struct ifnet *, struct mbuf *));
-void bpfattach __P((struct ifnet *, u_int, u_int));
-void bpfilterattach __P((int));
-u_int bpf_filter __P((struct bpf_insn *, u_char *, u_int, u_int));
-#endif
-
-/*
- * Number of scratch memory words (for BPF_LD|BPF_MEM and BPF_ST).
- */
-#define BPF_MEMWORDS 16
-
-#endif
diff --git a/c/src/exec/libnetworking/net/ethernet.h b/c/src/exec/libnetworking/net/ethernet.h
deleted file mode 100644
index c6c07189ec..0000000000
--- a/c/src/exec/libnetworking/net/ethernet.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Fundamental constants relating to ethernet.
- *
- * $Id$
- *
- */
-
-#ifndef _NET_ETHERNET_H_
-#define _NET_ETHERNET_H_
-
-/*
- * The number of bytes in an ethernet (MAC) address.
- */
-#define ETHER_ADDR_LEN 6
-
-/*
- * The number of bytes in the type field.
- */
-#define ETHER_TYPE_LEN 2
-
-/*
- * The number of bytes in the trailing CRC field.
- */
-#define ETHER_CRC_LEN 4
-
-/*
- * The length of the combined header.
- */
-#define ETHER_HDR_LEN (ETHER_ADDR_LEN*2+ETHER_TYPE_LEN)
-
-/*
- * The minimum packet length.
- */
-#define ETHER_MIN_LEN 64
-
-/*
- * The maximum packet length.
- */
-#define ETHER_MAX_LEN 1518
-
-/*
- * A macro to validate a length with
- */
-#define ETHER_IS_VALID_LEN(foo) \
- ((foo) >= ETHER_MIN_LEN && (foo) <= ETHER_MAX_LEN)
-
-/*
- * Structure of a 10Mb/s Ethernet header.
- */
-struct ether_header {
- u_char ether_dhost[ETHER_ADDR_LEN];
- u_char ether_shost[ETHER_ADDR_LEN];
- u_short ether_type;
-};
-
-/*
- * Structure of a 48-bit Ethernet address.
- */
-struct ether_addr {
- u_char octet[ETHER_ADDR_LEN];
-};
-
-#endif
diff --git a/c/src/exec/libnetworking/net/if.c b/c/src/exec/libnetworking/net/if.c
deleted file mode 100644
index 6f42b29903..0000000000
--- a/c/src/exec/libnetworking/net/if.c
+++ /dev/null
@@ -1,794 +0,0 @@
-/*
- * Copyright (c) 1980, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)if.c 8.3 (Berkeley) 1/4/94
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/mbuf.h>
-#include <sys/systm.h>
-#include <sys/proc.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/protosw.h>
-#include <sys/kernel.h>
-#include <sys/ioctl.h>
-#include <sys/errno.h>
-#include <sys/syslog.h>
-#include <sys/sysctl.h>
-
-#include <net/if.h>
-#include <net/if_dl.h>
-#include <net/if_types.h>
-#include <net/radix.h>
-
-/*
- * System initialization
- */
-
-static int ifconf __P((int, caddr_t));
- void ifinit __P((void *));
-static void if_qflush __P((struct ifqueue *));
-static void if_slowtimo __P((void *));
-static void link_rtrequest __P((int, struct rtentry *, struct sockaddr *));
-
-SYSINIT(interfaces, SI_SUB_PROTO_IF, SI_ORDER_FIRST, ifinit, NULL)
-
-
-int ifqmaxlen = IFQ_MAXLEN;
-struct ifnet *ifnet;
-
-/*
- * Network interface utility routines.
- *
- * Routines with ifa_ifwith* names take sockaddr *'s as
- * parameters.
- *
- * This routine assumes that it will be called at splimp() or higher.
- */
-/* ARGSUSED*/
-void
-ifinit(dummy)
- void *dummy;
-{
- register struct ifnet *ifp;
-
- for (ifp = ifnet; ifp; ifp = ifp->if_next)
- if (ifp->if_snd.ifq_maxlen == 0)
- ifp->if_snd.ifq_maxlen = ifqmaxlen;
- if_slowtimo(0);
-}
-
-int if_index = 0;
-struct ifaddr **ifnet_addrs;
-
-
-/*
- * Attach an interface to the
- * list of "active" interfaces.
- */
-void
-if_attach(ifp)
- struct ifnet *ifp;
-{
- unsigned socksize, ifasize;
- int namelen, masklen;
- char workbuf[64];
- register struct ifnet **p = &ifnet;
- register struct sockaddr_dl *sdl;
- register struct ifaddr *ifa;
- static int if_indexlim = 8;
-
-
- while (*p)
- p = &((*p)->if_next);
- *p = ifp;
- ifp->if_index = ++if_index;
- microtime(&ifp->if_lastchange);
- if (ifnet_addrs == 0 || if_index >= if_indexlim) {
- unsigned n = (if_indexlim <<= 1) * sizeof(ifa);
- struct ifaddr **q = (struct ifaddr **)
- malloc(n, M_IFADDR, M_WAITOK);
- bzero((caddr_t)q, n);
- if (ifnet_addrs) {
- bcopy((caddr_t)ifnet_addrs, (caddr_t)q, n/2);
- free((caddr_t)ifnet_addrs, M_IFADDR);
- }
- ifnet_addrs = q;
- }
- /*
- * create a Link Level name for this device
- */
- namelen = sprintf(workbuf, "%s%d", ifp->if_name, ifp->if_unit);
-#define _offsetof(t, m) ((int)((caddr_t)&((t *)0)->m))
- masklen = _offsetof(struct sockaddr_dl, sdl_data[0]) + namelen;
- socksize = masklen + ifp->if_addrlen;
-#define ROUNDUP(a) (1 + (((a) - 1) | (sizeof(long) - 1)))
- socksize = ROUNDUP(socksize);
- if (socksize < sizeof(*sdl))
- socksize = sizeof(*sdl);
- ifasize = sizeof(*ifa) + 2 * socksize;
- ifa = (struct ifaddr *)malloc(ifasize, M_IFADDR, M_WAITOK);
- if (ifa) {
- bzero((caddr_t)ifa, ifasize);
- sdl = (struct sockaddr_dl *)(ifa + 1);
- sdl->sdl_len = socksize;
- sdl->sdl_family = AF_LINK;
- bcopy(workbuf, sdl->sdl_data, namelen);
- sdl->sdl_nlen = namelen;
- sdl->sdl_index = ifp->if_index;
- sdl->sdl_type = ifp->if_type;
- ifnet_addrs[if_index - 1] = ifa;
- ifa->ifa_ifp = ifp;
- ifa->ifa_next = ifp->if_addrlist;
- ifa->ifa_rtrequest = link_rtrequest;
- ifp->if_addrlist = ifa;
- ifa->ifa_addr = (struct sockaddr *)sdl;
-
- sdl = (struct sockaddr_dl *)(socksize + (caddr_t)sdl);
- ifa->ifa_netmask = (struct sockaddr *)sdl;
- sdl->sdl_len = masklen;
- while (namelen != 0)
- sdl->sdl_data[--namelen] = 0xff;
- }
-}
-/*
- * Locate an interface based on a complete address.
- */
-/*ARGSUSED*/
-struct ifaddr *
-ifa_ifwithaddr(addr)
- register struct sockaddr *addr;
-{
- register struct ifnet *ifp;
- register struct ifaddr *ifa;
-
-#define equal(a1, a2) \
- (bcmp((caddr_t)(a1), (caddr_t)(a2), ((struct sockaddr *)(a1))->sa_len) == 0)
- for (ifp = ifnet; ifp; ifp = ifp->if_next)
- for (ifa = ifp->if_addrlist; ifa; ifa = ifa->ifa_next) {
- if (ifa->ifa_addr->sa_family != addr->sa_family)
- continue;
- if (equal(addr, ifa->ifa_addr))
- return (ifa);
- if ((ifp->if_flags & IFF_BROADCAST) && ifa->ifa_broadaddr &&
- equal(ifa->ifa_broadaddr, addr))
- return (ifa);
- }
- return ((struct ifaddr *)0);
-}
-/*
- * Locate the point to point interface with a given destination address.
- */
-/*ARGSUSED*/
-struct ifaddr *
-ifa_ifwithdstaddr(addr)
- register struct sockaddr *addr;
-{
- register struct ifnet *ifp;
- register struct ifaddr *ifa;
-
- for (ifp = ifnet; ifp; ifp = ifp->if_next)
- if (ifp->if_flags & IFF_POINTOPOINT)
- for (ifa = ifp->if_addrlist; ifa; ifa = ifa->ifa_next) {
- if (ifa->ifa_addr->sa_family != addr->sa_family)
- continue;
- if (ifa->ifa_dstaddr && equal(addr, ifa->ifa_dstaddr))
- return (ifa);
- }
- return ((struct ifaddr *)0);
-}
-
-/*
- * Find an interface on a specific network. If many, choice
- * is most specific found.
- */
-struct ifaddr *
-ifa_ifwithnet(addr)
- struct sockaddr *addr;
-{
- register struct ifnet *ifp;
- register struct ifaddr *ifa;
- struct ifaddr *ifa_maybe = (struct ifaddr *) 0;
- u_int af = addr->sa_family;
- char *addr_data = addr->sa_data, *cplim;
-
- if (af == AF_LINK) {
- register struct sockaddr_dl *sdl = (struct sockaddr_dl *)addr;
- if (sdl->sdl_index && sdl->sdl_index <= if_index)
- return (ifnet_addrs[sdl->sdl_index - 1]);
- }
- for (ifp = ifnet; ifp; ifp = ifp->if_next) {
- for (ifa = ifp->if_addrlist; ifa; ifa = ifa->ifa_next) {
- register char *cp, *cp2, *cp3;
-
- if (ifa->ifa_addr->sa_family != af)
- next: continue;
- if (ifp->if_flags & IFF_POINTOPOINT) {
- if (ifa->ifa_dstaddr != 0
- && equal(addr, ifa->ifa_dstaddr))
- return (ifa);
- } else {
- /*
- * if we have a special address handler,
- * then use it instead of the generic one.
- */
- if (ifa->ifa_claim_addr) {
- if ((*ifa->ifa_claim_addr)(ifa, addr)) {
- return (ifa);
- } else {
- continue;
- }
- }
-
- /*
- * Scan all the bits in the ifa's address.
- * If a bit dissagrees with what we are
- * looking for, mask it with the netmask
- * to see if it really matters.
- * (A byte at a time)
- */
- if (ifa->ifa_netmask == 0)
- continue;
- cp = addr_data;
- cp2 = ifa->ifa_addr->sa_data;
- cp3 = ifa->ifa_netmask->sa_data;
- cplim = ifa->ifa_netmask->sa_len + (char *)ifa->ifa_netmask;
- while (cp3 < cplim)
- if ((*cp++ ^ *cp2++) & *cp3++)
- goto next;
- if (ifa_maybe == 0 ||
- rn_refines((caddr_t)ifa->ifa_netmask,
- (caddr_t)ifa_maybe->ifa_netmask))
- ifa_maybe = ifa;
- }
- }
- }
- return (ifa_maybe);
-}
-
-/*
- * Find an interface address specific to an interface best matching
- * a given address.
- */
-struct ifaddr *
-ifaof_ifpforaddr(addr, ifp)
- struct sockaddr *addr;
- register struct ifnet *ifp;
-{
- register struct ifaddr *ifa;
- register char *cp, *cp2, *cp3;
- register char *cplim;
- struct ifaddr *ifa_maybe = 0;
- u_int af = addr->sa_family;
-
- if (af >= AF_MAX)
- return (0);
- for (ifa = ifp->if_addrlist; ifa; ifa = ifa->ifa_next) {
- if (ifa->ifa_addr->sa_family != af)
- continue;
- if (ifa_maybe == 0)
- ifa_maybe = ifa;
- if (ifa->ifa_netmask == 0) {
- if (equal(addr, ifa->ifa_addr) ||
- (ifa->ifa_dstaddr && equal(addr, ifa->ifa_dstaddr)))
- return (ifa);
- continue;
- }
- if (ifp->if_flags & IFF_POINTOPOINT) {
- if (equal(addr, ifa->ifa_dstaddr))
- return (ifa);
- } else {
- cp = addr->sa_data;
- cp2 = ifa->ifa_addr->sa_data;
- cp3 = ifa->ifa_netmask->sa_data;
- cplim = ifa->ifa_netmask->sa_len + (char *)ifa->ifa_netmask;
- for (; cp3 < cplim; cp3++)
- if ((*cp++ ^ *cp2++) & *cp3)
- break;
- if (cp3 == cplim)
- return (ifa);
- }
- }
- return (ifa_maybe);
-}
-
-#include <net/route.h>
-
-/*
- * Default action when installing a route with a Link Level gateway.
- * Lookup an appropriate real ifa to point to.
- * This should be moved to /sys/net/link.c eventually.
- */
-static void
-link_rtrequest(cmd, rt, sa)
- int cmd;
- register struct rtentry *rt;
- struct sockaddr *sa;
-{
- register struct ifaddr *ifa;
- struct sockaddr *dst;
- struct ifnet *ifp;
-
- if (cmd != RTM_ADD || ((ifa = rt->rt_ifa) == 0) ||
- ((ifp = ifa->ifa_ifp) == 0) || ((dst = rt_key(rt)) == 0))
- return;
- ifa = ifaof_ifpforaddr(dst, ifp);
- if (ifa) {
- IFAFREE(rt->rt_ifa);
- rt->rt_ifa = ifa;
- ifa->ifa_refcnt++;
- if (ifa->ifa_rtrequest && ifa->ifa_rtrequest != link_rtrequest)
- ifa->ifa_rtrequest(cmd, rt, sa);
- }
-}
-
-/*
- * Mark an interface down and notify protocols of
- * the transition.
- * NOTE: must be called at splnet or eqivalent.
- */
-void
-if_down(ifp)
- register struct ifnet *ifp;
-{
- register struct ifaddr *ifa;
-
- ifp->if_flags &= ~IFF_UP;
- microtime(&ifp->if_lastchange);
- for (ifa = ifp->if_addrlist; ifa; ifa = ifa->ifa_next)
- pfctlinput(PRC_IFDOWN, ifa->ifa_addr);
- if_qflush(&ifp->if_snd);
- rt_ifmsg(ifp);
-}
-
-/*
- * Mark an interface up and notify protocols of
- * the transition.
- * NOTE: must be called at splnet or eqivalent.
- */
-void
-if_up(ifp)
- register struct ifnet *ifp;
-{
-
- ifp->if_flags |= IFF_UP;
- microtime(&ifp->if_lastchange);
-#ifdef notyet
- register struct ifaddr *ifa;
- /* this has no effect on IP, and will kill all iso connections XXX */
- for (ifa = ifp->if_addrlist; ifa; ifa = ifa->ifa_next)
- pfctlinput(PRC_IFUP, ifa->ifa_addr);
-#endif
- rt_ifmsg(ifp);
-}
-
-/*
- * Flush an interface queue.
- */
-static void
-if_qflush(ifq)
- register struct ifqueue *ifq;
-{
- register struct mbuf *m, *n;
-
- n = ifq->ifq_head;
- while ((m = n) != 0) {
- n = m->m_act;
- m_freem(m);
- }
- ifq->ifq_head = 0;
- ifq->ifq_tail = 0;
- ifq->ifq_len = 0;
-}
-
-/*
- * Handle interface watchdog timer routines. Called
- * from softclock, we decrement timers (if set) and
- * call the appropriate interface routine on expiration.
- */
-static void
-if_slowtimo(arg)
- void *arg;
-{
- register struct ifnet *ifp;
- int s = splimp();
-
- for (ifp = ifnet; ifp; ifp = ifp->if_next) {
- if (ifp->if_timer == 0 || --ifp->if_timer)
- continue;
- if (ifp->if_watchdog)
- (*ifp->if_watchdog)(ifp);
- }
- splx(s);
- timeout(if_slowtimo, (void *)0, hz / IFNET_SLOWHZ);
-}
-
-/*
- * Map interface name to
- * interface structure pointer.
- */
-struct ifnet *
-ifunit(name)
- register char *name;
-{
- register char *cp;
- register struct ifnet *ifp;
- int unit;
- unsigned len;
- char *ep, c;
-
- for (cp = name; cp < name + IFNAMSIZ && *cp; cp++)
- if (*cp >= '0' && *cp <= '9')
- break;
- if (*cp == '\0' || cp == name + IFNAMSIZ)
- return ((struct ifnet *)0);
- /*
- * Save first char of unit, and pointer to it,
- * so we can put a null there to avoid matching
- * initial substrings of interface names.
- */
- len = cp - name + 1;
- c = *cp;
- ep = cp;
- for (unit = 0; *cp >= '0' && *cp <= '9'; )
- unit = unit * 10 + *cp++ - '0';
- if (*cp != '\0')
- return 0; /* no trailing garbage allowed */
- *ep = 0;
- for (ifp = ifnet; ifp; ifp = ifp->if_next) {
- if (bcmp(ifp->if_name, name, len))
- continue;
- if (unit == ifp->if_unit)
- break;
- }
- *ep = c;
- return (ifp);
-}
-
-/*
- * Interface ioctls.
- */
-int
-ifioctl(so, cmd, data, p)
- struct socket *so;
- int cmd;
- caddr_t data;
- struct proc *p;
-{
- register struct ifnet *ifp;
- register struct ifreq *ifr;
- int error;
-
- switch (cmd) {
-
- case SIOCGIFCONF:
- case OSIOCGIFCONF:
- return (ifconf(cmd, data));
- }
- ifr = (struct ifreq *)data;
- ifp = ifunit(ifr->ifr_name);
- if (ifp == 0)
- return (ENXIO);
- switch (cmd) {
-
- case SIOCGIFFLAGS:
- ifr->ifr_flags = ifp->if_flags;
- break;
-
- case SIOCGIFMETRIC:
- ifr->ifr_metric = ifp->if_metric;
- break;
-
- case SIOCGIFMTU:
- ifr->ifr_mtu = ifp->if_mtu;
- break;
-
- case SIOCGIFPHYS:
- ifr->ifr_phys = ifp->if_physical;
- break;
-
- case SIOCSIFFLAGS:
- error = suser(p->p_ucred, &p->p_acflag);
- if (error)
- return (error);
- if (ifp->if_flags & IFF_UP && (ifr->ifr_flags & IFF_UP) == 0) {
- int s = splimp();
- if_down(ifp);
- splx(s);
- }
- if (ifr->ifr_flags & IFF_UP && (ifp->if_flags & IFF_UP) == 0) {
- int s = splimp();
- if_up(ifp);
- splx(s);
- }
- ifp->if_flags = (ifp->if_flags & IFF_CANTCHANGE) |
- (ifr->ifr_flags &~ IFF_CANTCHANGE);
- if (ifp->if_ioctl)
- (void) (*ifp->if_ioctl)(ifp, cmd, data);
- microtime(&ifp->if_lastchange);
- break;
-
- case SIOCSIFMETRIC:
- error = suser(p->p_ucred, &p->p_acflag);
- if (error)
- return (error);
- ifp->if_metric = ifr->ifr_metric;
- microtime(&ifp->if_lastchange);
- break;
-
- case SIOCSIFPHYS:
- error = suser(p->p_ucred, &p->p_acflag);
- if (error)
- return error;
- if (!ifp->if_ioctl)
- return EOPNOTSUPP;
- error = (*ifp->if_ioctl)(ifp, cmd, data);
- if (error == 0)
- microtime(&ifp->if_lastchange);
- return(error);
-
- case SIOCSIFMTU:
- error = suser(p->p_ucred, &p->p_acflag);
- if (error)
- return (error);
- if (ifp->if_ioctl == NULL)
- return (EOPNOTSUPP);
- /*
- * 72 was chosen below because it is the size of a TCP/IP
- * header (40) + the minimum mss (32).
- */
- if (ifr->ifr_mtu < 72 || ifr->ifr_mtu > 65535)
- return (EINVAL);
- error = (*ifp->if_ioctl)(ifp, cmd, data);
- if (error == 0)
- microtime(&ifp->if_lastchange);
- return(error);
-
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = suser(p->p_ucred, &p->p_acflag);
- if (error)
- return (error);
- if (ifp->if_ioctl == NULL)
- return (EOPNOTSUPP);
- error = (*ifp->if_ioctl)(ifp, cmd, data);
- if (error == 0 )
- microtime(&ifp->if_lastchange);
- return(error);
-
- case SIOCSIFMEDIA:
- error = suser(p->p_ucred, &p->p_acflag);
- if (error)
- return (error);
- if (ifp->if_ioctl == 0)
- return (EOPNOTSUPP);
- error = (*ifp->if_ioctl)(ifp, cmd, data);
- if (error == 0)
- microtime(&ifp->if_lastchange);
- return error;
-
- case SIOCGIFMEDIA:
- if (ifp->if_ioctl == 0)
- return (EOPNOTSUPP);
- return ((*ifp->if_ioctl)(ifp, cmd, data));
-
- default:
- if (so->so_proto == 0)
- return (EOPNOTSUPP);
-#ifndef COMPAT_43
- return ((*so->so_proto->pr_usrreqs->pru_control)(so, cmd,
- data,
- ifp));
-#else
- {
- int ocmd = cmd;
-
- switch (cmd) {
-
- case SIOCSIFDSTADDR:
- case SIOCSIFADDR:
- case SIOCSIFBRDADDR:
- case SIOCSIFNETMASK:
-#if BYTE_ORDER != BIG_ENDIAN
- if (ifr->ifr_addr.sa_family == 0 &&
- ifr->ifr_addr.sa_len < 16) {
- ifr->ifr_addr.sa_family = ifr->ifr_addr.sa_len;
- ifr->ifr_addr.sa_len = 16;
- }
-#else
- if (ifr->ifr_addr.sa_len == 0)
- ifr->ifr_addr.sa_len = 16;
-#endif
- break;
-
- case OSIOCGIFADDR:
- cmd = SIOCGIFADDR;
- break;
-
- case OSIOCGIFDSTADDR:
- cmd = SIOCGIFDSTADDR;
- break;
-
- case OSIOCGIFBRDADDR:
- cmd = SIOCGIFBRDADDR;
- break;
-
- case OSIOCGIFNETMASK:
- cmd = SIOCGIFNETMASK;
- }
- error = ((*so->so_proto->pr_usrreqs->pru_control)(so,
- cmd,
- data,
- ifp));
- switch (ocmd) {
-
- case OSIOCGIFADDR:
- case OSIOCGIFDSTADDR:
- case OSIOCGIFBRDADDR:
- case OSIOCGIFNETMASK:
- *(u_short *)&ifr->ifr_addr = ifr->ifr_addr.sa_family;
- }
- return (error);
-
- }
-#endif
-
- /*
- * RTEMS additions for setting/getting `tap' function
- */
- case SIOCSIFTAP:
- ifp->if_tap = ifr->ifr_tap;
- return 0;
-
- case SIOCGIFTAP:
- ifr->ifr_tap = ifp->if_tap;
- return 0;
- }
- return (0);
-}
-
-/*
- * Set/clear promiscuous mode on interface ifp based on the truth value
- * of pswitch. The calls are reference counted so that only the first
- * "on" request actually has an effect, as does the final "off" request.
- * Results are undefined if the "off" and "on" requests are not matched.
- */
-int
-ifpromisc(ifp, pswitch)
- struct ifnet *ifp;
- int pswitch;
-{
- struct ifreq ifr;
-
- if (pswitch) {
- /*
- * If the device is not configured up, we cannot put it in
- * promiscuous mode.
- */
- if ((ifp->if_flags & IFF_UP) == 0)
- return (ENETDOWN);
- if (ifp->if_pcount++ != 0)
- return (0);
- ifp->if_flags |= IFF_PROMISC;
- log(LOG_INFO, "%s%d: promiscuous mode enabled\n",
- ifp->if_name, ifp->if_unit);
- } else {
- if (--ifp->if_pcount > 0)
- return (0);
- ifp->if_flags &= ~IFF_PROMISC;
- }
- ifr.ifr_flags = ifp->if_flags;
- return ((*ifp->if_ioctl)(ifp, SIOCSIFFLAGS, (caddr_t)&ifr));
-}
-
-/*
- * Return interface configuration
- * of system. List may be used
- * in later ioctl's (above) to get
- * other information.
- */
-/*ARGSUSED*/
-static int
-ifconf(cmd, data)
- int cmd;
- caddr_t data;
-{
- register struct ifconf *ifc = (struct ifconf *)data;
- register struct ifnet *ifp = ifnet;
- register struct ifaddr *ifa;
- struct ifreq ifr, *ifrp;
- int space = ifc->ifc_len, error = 0;
-
- ifrp = ifc->ifc_req;
- for (; space > sizeof (ifr) && ifp; ifp = ifp->if_next) {
- char workbuf[64];
- int ifnlen;
-
- ifnlen = sprintf(workbuf, "%s%d", ifp->if_name, ifp->if_unit);
- if(ifnlen + 1 > sizeof ifr.ifr_name) {
- error = ENAMETOOLONG;
- } else {
- strcpy(ifr.ifr_name, workbuf);
- }
-
- if ((ifa = ifp->if_addrlist) == 0) {
- bzero((caddr_t)&ifr.ifr_addr, sizeof(ifr.ifr_addr));
- error = copyout((caddr_t)&ifr, (caddr_t)ifrp,
- sizeof (ifr));
- if (error)
- break;
- space -= sizeof (ifr), ifrp++;
- } else
- for ( ; space > sizeof (ifr) && ifa; ifa = ifa->ifa_next) {
- register struct sockaddr *sa = ifa->ifa_addr;
-#ifdef COMPAT_43
- if (cmd == OSIOCGIFCONF) {
- struct osockaddr *osa =
- (struct osockaddr *)&ifr.ifr_addr;
- ifr.ifr_addr = *sa;
- osa->sa_family = sa->sa_family;
- error = copyout((caddr_t)&ifr, (caddr_t)ifrp,
- sizeof (ifr));
- ifrp++;
- } else
-#endif
- if (sa->sa_len <= sizeof(*sa)) {
- ifr.ifr_addr = *sa;
- error = copyout((caddr_t)&ifr, (caddr_t)ifrp,
- sizeof (ifr));
- ifrp++;
- } else {
- space -= sa->sa_len - sizeof(*sa);
- if (space < sizeof (ifr))
- break;
- error = copyout((caddr_t)&ifr, (caddr_t)ifrp,
- sizeof (ifr.ifr_name));
- if (error == 0)
- error = copyout((caddr_t)sa,
- (caddr_t)&ifrp->ifr_addr, sa->sa_len);
- ifrp = (struct ifreq *)
- (sa->sa_len + (caddr_t)&ifrp->ifr_addr);
- }
- if (error)
- break;
- space -= sizeof (ifr);
- }
- }
- ifc->ifc_len -= space;
- return (error);
-}
-
-SYSCTL_NODE(_net, PF_LINK, link, CTLFLAG_RW, 0, "Link layers");
-SYSCTL_NODE(_net_link, 0, generic, CTLFLAG_RW, 0, "Generic link-management");
diff --git a/c/src/exec/libnetworking/net/if.h b/c/src/exec/libnetworking/net/if.h
deleted file mode 100644
index 39b6cc0d39..0000000000
--- a/c/src/exec/libnetworking/net/if.h
+++ /dev/null
@@ -1,474 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)if.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _NET_IF_H_
-#define _NET_IF_H_
-
-/*
- * Structures defining a network interface, providing a packet
- * transport mechanism (ala level 0 of the PUP protocols).
- *
- * Each interface accepts output datagrams of a specified maximum
- * length, and provides higher level routines with input datagrams
- * received from its medium.
- *
- * Output occurs when the routine if_output is called, with three parameters:
- * (*ifp->if_output)(ifp, m, dst, rt)
- * Here m is the mbuf chain to be sent and dst is the destination address.
- * The output routine encapsulates the supplied datagram if necessary,
- * and then transmits it on its medium.
- *
- * On input, each interface unwraps the data received by it, and either
- * places it on the input queue of a internetwork datagram routine
- * and posts the associated software interrupt, or passes the datagram to a raw
- * packet input routine.
- *
- * Routines exist for locating interfaces by their addresses
- * or for locating a interface on a certain network, as well as more general
- * routing and gateway routines maintaining information used to locate
- * interfaces. These routines live in the files if.c and route.c
- */
-
-#ifndef _TIME_ /* XXX fast fix for SNMP, going away soon */
-#include <sys/time.h>
-#endif
-
-#ifdef __STDC__
-/*
- * Forward structure declarations for function prototypes [sic].
- */
-struct mbuf;
-struct proc;
-struct rtentry;
-struct socket;
-struct ether_header;
-#endif
-
-/*
- * Structure describing information about an interface
- * which may be of interest to management entities.
- */
-struct if_data {
- /* generic interface information */
- u_char ifi_type; /* ethernet, tokenring, etc */
- u_char ifi_physical; /* e.g., AUI, Thinnet, 10base-T, etc */
- u_char ifi_addrlen; /* media address length */
- u_char ifi_hdrlen; /* media header length */
- u_char ifi_recvquota; /* polling quota for receive intrs */
- u_char ifi_xmitquota; /* polling quota for xmit intrs */
- u_long ifi_mtu; /* maximum transmission unit */
- u_long ifi_metric; /* routing metric (external only) */
- u_long ifi_baudrate; /* linespeed */
- /* volatile statistics */
- u_long ifi_ipackets; /* packets received on interface */
- u_long ifi_ierrors; /* input errors on interface */
- u_long ifi_opackets; /* packets sent on interface */
- u_long ifi_oerrors; /* output errors on interface */
- u_long ifi_collisions; /* collisions on csma interfaces */
- u_long ifi_ibytes; /* total number of octets received */
- u_long ifi_obytes; /* total number of octets sent */
- u_long ifi_imcasts; /* packets received via multicast */
- u_long ifi_omcasts; /* packets sent via multicast */
- u_long ifi_iqdrops; /* dropped on input, this interface */
- u_long ifi_noproto; /* destined for unsupported protocol */
- u_long ifi_recvtiming; /* usec spent receiving when timing */
- u_long ifi_xmittiming; /* usec spent xmitting when timing */
- struct timeval ifi_lastchange; /* time of last administrative change */
-};
-
-/*
- * Structure defining a queue for a network interface.
- */
-struct ifqueue {
- struct mbuf *ifq_head;
- struct mbuf *ifq_tail;
- int ifq_len;
- int ifq_maxlen;
- int ifq_drops;
-};
-
-/*
- * Structure defining a network interface.
- *
- * (Would like to call this struct ``if'', but C isn't PL/1.)
- */
-struct ifnet {
- void *if_softc; /* pointer to driver state */
- char *if_name; /* name, e.g. ``en'' or ``lo'' */
- struct ifnet *if_next; /* all struct ifnets are chained */
- struct ifaddr *if_addrlist; /* linked list of addresses per if */
- int if_pcount; /* number of promiscuous listeners */
- struct bpf_if *if_bpf; /* packet filter structure */
- u_short if_index; /* numeric abbreviation for this if */
- short if_unit; /* sub-unit for lower level driver */
- short if_timer; /* time 'til if_watchdog called */
- short if_flags; /* up/down, broadcast, etc. */
- int if_ipending; /* interrupts pending */
- void *if_linkmib; /* link-type-specific MIB data */
- size_t if_linkmiblen; /* length of above data */
- struct if_data if_data;
-/* procedure handles */
- int (*if_output) /* output routine (enqueue) */
- __P((struct ifnet *, struct mbuf *, struct sockaddr *,
- struct rtentry *));
- void (*if_start) /* initiate output routine */
- __P((struct ifnet *));
- int (*if_done) /* output complete routine */
- __P((struct ifnet *)); /* (XXX not used; fake prototype) */
- int (*if_ioctl) /* ioctl routine */
- __P((struct ifnet *, int, caddr_t));
- void (*if_watchdog) /* timer routine */
- __P((struct ifnet *));
- int (*if_poll_recv) /* polled receive routine */
- __P((struct ifnet *, int *));
- int (*if_poll_xmit) /* polled transmit routine */
- __P((struct ifnet *, int *));
- void (*if_poll_intren) /* polled interrupt reenable routine */
- __P((struct ifnet *));
- void (*if_poll_slowinput) /* input routine for slow devices */
- __P((struct ifnet *, struct mbuf *));
- void (*if_init) /* Init routine */
- __P((void *));
- int (*if_tap) /* Packet filter routine */
- (struct ifnet *, struct ether_header *, struct mbuf *);
- struct ifqueue if_snd; /* output queue */
- struct ifqueue *if_poll_slowq; /* input queue for slow devices */
-};
-typedef void if_init_f_t __P((void *));
-
-#define if_mtu if_data.ifi_mtu
-#define if_type if_data.ifi_type
-#define if_physical if_data.ifi_physical
-#define if_addrlen if_data.ifi_addrlen
-#define if_hdrlen if_data.ifi_hdrlen
-#define if_metric if_data.ifi_metric
-#define if_baudrate if_data.ifi_baudrate
-#define if_ipackets if_data.ifi_ipackets
-#define if_ierrors if_data.ifi_ierrors
-#define if_opackets if_data.ifi_opackets
-#define if_oerrors if_data.ifi_oerrors
-#define if_collisions if_data.ifi_collisions
-#define if_ibytes if_data.ifi_ibytes
-#define if_obytes if_data.ifi_obytes
-#define if_imcasts if_data.ifi_imcasts
-#define if_omcasts if_data.ifi_omcasts
-#define if_iqdrops if_data.ifi_iqdrops
-#define if_noproto if_data.ifi_noproto
-#define if_lastchange if_data.ifi_lastchange
-#define if_recvquota if_data.ifi_recvquota
-#define if_xmitquota if_data.ifi_xmitquota
-#define if_rawoutput(if, m, sa) if_output(if, m, sa, (struct rtentry *)0)
-
-#define IFF_UP 0x1 /* interface is up */
-#define IFF_BROADCAST 0x2 /* broadcast address valid */
-#define IFF_DEBUG 0x4 /* turn on debugging */
-#define IFF_LOOPBACK 0x8 /* is a loopback net */
-#define IFF_POINTOPOINT 0x10 /* interface is point-to-point link */
-/*#define IFF_NOTRAILERS 0x20 * obsolete: avoid use of trailers */
-#define IFF_RUNNING 0x40 /* resources allocated */
-#define IFF_NOARP 0x80 /* no address resolution protocol */
-#define IFF_PROMISC 0x100 /* receive all packets */
-#define IFF_ALLMULTI 0x200 /* receive all multicast packets */
-#define IFF_OACTIVE 0x400 /* transmission in progress */
-#define IFF_SIMPLEX 0x800 /* can't hear own transmissions */
-#define IFF_LINK0 0x1000 /* per link layer defined bit */
-#define IFF_LINK1 0x2000 /* per link layer defined bit */
-#define IFF_LINK2 0x4000 /* per link layer defined bit */
-#define IFF_ALTPHYS IFF_LINK2 /* use alternate physical connection */
-#define IFF_MULTICAST 0x8000 /* supports multicast */
-
-/* flags set internally only: */
-#define IFF_CANTCHANGE \
- (IFF_BROADCAST|IFF_POINTOPOINT|IFF_RUNNING|IFF_OACTIVE|\
- IFF_SIMPLEX|IFF_MULTICAST|IFF_ALLMULTI)
-
-
-/*
- * These really don't belong here, but there's no other obviously appropriate
- * location.
- */
-#define IFP_AUI 0
-#define IFP_10BASE2 1
-#define IFP_10BASET 2
-/* etc. */
-
-/*
- * Bit values in if_ipending
- */
-#define IFI_RECV 1 /* I want to receive */
-#define IFI_XMIT 2 /* I want to transmit */
-
-/*
- * Output queues (ifp->if_snd) and slow device input queues (*ifp->if_slowq)
- * are queues of messages stored on ifqueue structures
- * (defined above). Entries are added to and deleted from these structures
- * by these macros, which should be called with ipl raised to splimp().
- */
-#define IF_QFULL(ifq) ((ifq)->ifq_len >= (ifq)->ifq_maxlen)
-#define IF_DROP(ifq) ((ifq)->ifq_drops++)
-#define IF_ENQUEUE(ifq, m) { \
-/* printf(" IF_ENQUEUE: %p %p\n", ifq, m ); */ \
- (m)->m_nextpkt = 0; \
- if ((ifq)->ifq_tail == 0) \
- (ifq)->ifq_head = m; \
- else \
- (ifq)->ifq_tail->m_nextpkt = m; \
- (ifq)->ifq_tail = m; \
- (ifq)->ifq_len++; \
-}
-#define IF_PREPEND(ifq, m) { \
-/* printf(" IF_PREPEND: %p %p\n", ifq, m ); */ \
- (m)->m_nextpkt = (ifq)->ifq_head; \
- if ((ifq)->ifq_tail == 0) \
- (ifq)->ifq_tail = (m); \
- (ifq)->ifq_head = (m); \
- (ifq)->ifq_len++; \
-}
-#define IF_DEQUEUE(ifq, m) { \
- (m) = (ifq)->ifq_head; \
- if (m) { \
-/* printf(" IF_DEQUEUE: %p %p\n", ifq, m ); */ \
- if (((ifq)->ifq_head = (m)->m_nextpkt) == 0) \
- (ifq)->ifq_tail = 0; \
- (m)->m_nextpkt = 0; \
- (ifq)->ifq_len--; \
- } \
-}
-
-#ifdef KERNEL
-#define IF_ENQ_DROP(ifq, m) if_enq_drop(ifq, m)
-
-#if defined(__GNUC__) && defined(MT_HEADER)
-static inline int
-if_queue_drop(struct ifqueue *ifq, struct mbuf *m)
-{
- IF_DROP(ifq);
- return 0;
-}
-
-static inline int
-if_enq_drop(struct ifqueue *ifq, struct mbuf *m)
-{
- if (IF_QFULL(ifq) &&
- !if_queue_drop(ifq, m))
- return 0;
- IF_ENQUEUE(ifq, m);
- return 1;
-}
-#else
-
-#ifdef MT_HEADER
-int if_enq_drop __P((struct ifqueue *, struct mbuf *));
-#endif
-
-#endif
-#endif /* KERNEL */
-
-#define IFQ_MAXLEN 50
-#define IFNET_SLOWHZ 1 /* granularity is 1 second */
-
-/*
- * The ifaddr structure contains information about one address
- * of an interface. They are maintained by the different address families,
- * are allocated and attached when an address is set, and are linked
- * together so all addresses for an interface can be located.
- */
-struct ifaddr {
- struct sockaddr *ifa_addr; /* address of interface */
- struct sockaddr *ifa_dstaddr; /* other end of p-to-p link */
-#define ifa_broadaddr ifa_dstaddr /* broadcast address interface */
- struct sockaddr *ifa_netmask; /* used to determine subnet */
- struct ifnet *ifa_ifp; /* back-pointer to interface */
- struct ifaddr *ifa_next; /* next address for interface */
- void (*ifa_rtrequest) /* check or clean routes (+ or -)'d */
- __P((int, struct rtentry *, struct sockaddr *));
- u_short ifa_flags; /* mostly rt_flags for cloning */
- short ifa_refcnt; /* references to this structure */
- int ifa_metric; /* cost of going out this interface */
-#ifdef notdef
- struct rtentry *ifa_rt; /* XXXX for ROUTETOIF ????? */
-#endif
- int (*ifa_claim_addr) /* check if an addr goes to this if */
- __P((struct ifaddr *, struct sockaddr *));
-
-};
-#define IFA_ROUTE RTF_UP /* route installed */
-
-/*
- * Message format for use in obtaining information about interfaces
- * from getkerninfo and the routing socket
- */
-struct if_msghdr {
- u_short ifm_msglen; /* to skip over non-understood messages */
- u_char ifm_version; /* future binary compatability */
- u_char ifm_type; /* message type */
- int ifm_addrs; /* like rtm_addrs */
- int ifm_flags; /* value of if_flags */
- u_short ifm_index; /* index for associated ifp */
- struct if_data ifm_data;/* statistics and other data about if */
-};
-
-/*
- * Message format for use in obtaining information about interface addresses
- * from getkerninfo and the routing socket
- */
-struct ifa_msghdr {
- u_short ifam_msglen; /* to skip over non-understood messages */
- u_char ifam_version; /* future binary compatability */
- u_char ifam_type; /* message type */
- int ifam_addrs; /* like rtm_addrs */
- int ifam_flags; /* value of ifa_flags */
- u_short ifam_index; /* index for associated ifp */
- int ifam_metric; /* value of ifa_metric */
-};
-
-/*
- * Interface request structure used for socket
- * ioctl's. All interface ioctl's must have parameter
- * definitions which begin with ifr_name. The
- * remainder may be interface specific.
- */
-struct ifreq {
-#define IFNAMSIZ 16
- char ifr_name[IFNAMSIZ]; /* if name, e.g. "en0" */
- union {
- struct sockaddr ifru_addr;
- struct sockaddr ifru_dstaddr;
- struct sockaddr ifru_broadaddr;
- short ifru_flags;
- int ifru_metric;
- int ifru_mtu;
- int ifru_phys;
- int ifru_media;
- caddr_t ifru_data;
- int (*ifru_tap)(struct ifnet *, struct ether_header *, struct mbuf *);
- } ifr_ifru;
-#define ifr_addr ifr_ifru.ifru_addr /* address */
-#define ifr_dstaddr ifr_ifru.ifru_dstaddr /* other end of p-to-p link */
-#define ifr_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */
-#define ifr_flags ifr_ifru.ifru_flags /* flags */
-#define ifr_metric ifr_ifru.ifru_metric /* metric */
-#define ifr_mtu ifr_ifru.ifru_mtu /* mtu */
-#define ifr_phys ifr_ifru.ifru_phys /* physical wire */
-#define ifr_media ifr_ifru.ifru_media /* physical media */
-#define ifr_data ifr_ifru.ifru_data /* for use by interface */
-#define ifr_tap ifr_ifru.ifru_tap /* tap function */
-};
-
-struct ifaliasreq {
- char ifra_name[IFNAMSIZ]; /* if name, e.g. "en0" */
- struct sockaddr ifra_addr;
- struct sockaddr ifra_broadaddr;
- struct sockaddr ifra_mask;
-};
-
-struct ifmediareq {
- char ifm_name[IFNAMSIZ]; /* if name, e.g. "en0" */
- int ifm_current; /* current media options */
- int ifm_mask; /* don't care mask */
- int ifm_status; /* media status */
- int ifm_active; /* active options */
- int ifm_count; /* # entries in ifm_ulist array */
- int *ifm_ulist; /* media words */
-};
-/*
- * Structure used in SIOCGIFCONF request.
- * Used to retrieve interface configuration
- * for machine (useful for programs which
- * must know all networks accessible).
- */
-struct ifconf {
- int ifc_len; /* size of associated buffer */
- union {
- caddr_t ifcu_buf;
- struct ifreq *ifcu_req;
- } ifc_ifcu;
-#define ifc_buf ifc_ifcu.ifcu_buf /* buffer address */
-#define ifc_req ifc_ifcu.ifcu_req /* array of structures returned */
-};
-
-#include <net/if_arp.h>
-
-#ifdef KERNEL
-#define IFAFREE(ifa) \
- if ((ifa)->ifa_refcnt <= 0) \
- ifafree(ifa); \
- else \
- (ifa)->ifa_refcnt--;
-
-extern struct ifnet *ifnet;
-extern int ifqmaxlen;
-extern struct ifnet loif[];
-extern int if_index;
-extern struct ifaddr **ifnet_addrs;
-
-void ether_ifattach __P((struct ifnet *));
-void ether_input __P((struct ifnet *, struct ether_header *, struct mbuf *));
-int ether_output __P((struct ifnet *,
- struct mbuf *, struct sockaddr *, struct rtentry *));
-int ether_ioctl __P((struct ifnet *, int , caddr_t ));
-
-void if_attach __P((struct ifnet *));
-void if_down __P((struct ifnet *));
-void if_up __P((struct ifnet *));
-#ifdef vax
-void ifubareset __P((int));
-#endif
-/*void ifinit __P((void));*/ /* declared in systm.h for main() */
-int ifioctl __P((struct socket *, int, caddr_t, struct proc *));
-int ifpromisc __P((struct ifnet *, int));
-struct ifnet *ifunit __P((char *));
-
-int if_poll_recv_slow __P((struct ifnet *ifp, int *quotap));
-void if_poll_xmit_slow __P((struct ifnet *ifp, int *quotap));
-void if_poll_throttle __P((void));
-void if_poll_unthrottle __P((void *));
-void if_poll_init __P((void));
-void if_poll __P((void));
-
-struct ifaddr *ifa_ifwithaddr __P((struct sockaddr *));
-struct ifaddr *ifa_ifwithdstaddr __P((struct sockaddr *));
-struct ifaddr *ifa_ifwithnet __P((struct sockaddr *));
-struct ifaddr *ifa_ifwithroute __P((int, struct sockaddr *,
- struct sockaddr *));
-struct ifaddr *ifaof_ifpforaddr __P((struct sockaddr *, struct ifnet *));
-void ifafree __P((struct ifaddr *));
-
-int looutput __P((struct ifnet *,
- struct mbuf *, struct sockaddr *, struct rtentry *));
-#endif /* KERNEL */
-
-#endif /* !_NET_IF_H_ */
diff --git a/c/src/exec/libnetworking/net/if_arp.h b/c/src/exec/libnetworking/net/if_arp.h
deleted file mode 100644
index dd726bf856..0000000000
--- a/c/src/exec/libnetworking/net/if_arp.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright (c) 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)if_arp.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _NET_IF_ARP_H_
-#define _NET_IF_ARP_H_
-
-/*
- * Address Resolution Protocol.
- *
- * See RFC 826 for protocol description. ARP packets are variable
- * in size; the arphdr structure defines the fixed-length portion.
- * Protocol type values are the same as those for 10 Mb/s Ethernet.
- * It is followed by the variable-sized fields ar_sha, arp_spa,
- * arp_tha and arp_tpa in that order, according to the lengths
- * specified. Field names used correspond to RFC 826.
- */
-struct arphdr {
- u_short ar_hrd; /* format of hardware address */
-#define ARPHRD_ETHER 1 /* ethernet hardware format */
-#define ARPHRD_FRELAY 15 /* frame relay hardware format */
- u_short ar_pro; /* format of protocol address */
- u_char ar_hln; /* length of hardware address */
- u_char ar_pln; /* length of protocol address */
- u_short ar_op; /* one of: */
-#define ARPOP_REQUEST 1 /* request to resolve address */
-#define ARPOP_REPLY 2 /* response to previous request */
-#define ARPOP_REVREQUEST 3 /* request protocol address given hardware */
-#define ARPOP_REVREPLY 4 /* response giving protocol address */
-#define ARPOP_INVREQUEST 8 /* request to identify peer */
-#define ARPOP_INVREPLY 9 /* response identifying peer */
-/*
- * The remaining fields are variable in size,
- * according to the sizes above.
- */
-#ifdef COMMENT_ONLY
- u_char ar_sha[]; /* sender hardware address */
- u_char ar_spa[]; /* sender protocol address */
- u_char ar_tha[]; /* target hardware address */
- u_char ar_tpa[]; /* target protocol address */
-#endif
-};
-
-/*
- * ARP ioctl request
- */
-struct arpreq {
- struct sockaddr arp_pa; /* protocol address */
- struct sockaddr arp_ha; /* hardware address */
- int arp_flags; /* flags */
-};
-/* arp_flags and at_flags field values */
-#define ATF_INUSE 0x01 /* entry in use */
-#define ATF_COM 0x02 /* completed entry (enaddr valid) */
-#define ATF_PERM 0x04 /* permanent entry */
-#define ATF_PUBL 0x08 /* publish entry (respond for other host) */
-#define ATF_USETRAILERS 0x10 /* has requested trailers */
-
-#endif /* !_NET_IF_ARP_H_ */
diff --git a/c/src/exec/libnetworking/net/if_dl.h b/c/src/exec/libnetworking/net/if_dl.h
deleted file mode 100644
index 053ae3e92f..0000000000
--- a/c/src/exec/libnetworking/net/if_dl.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)if_dl.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _NET_IF_DL_H_
-#define _NET_IF_DL_H_
-
-/*
- * A Link-Level Sockaddr may specify the interface in one of two
- * ways: either by means of a system-provided index number (computed
- * anew and possibly differently on every reboot), or by a human-readable
- * string such as "il0" (for managerial convenience).
- *
- * Census taking actions, such as something akin to SIOCGCONF would return
- * both the index and the human name.
- *
- * High volume transactions (such as giving a link-level ``from'' address
- * in a recvfrom or recvmsg call) may be likely only to provide the indexed
- * form, (which requires fewer copy operations and less space).
- *
- * The form and interpretation of the link-level address is purely a matter
- * of convention between the device driver and its consumers; however, it is
- * expected that all drivers for an interface of a given if_type will agree.
- */
-
-/*
- * Structure of a Link-Level sockaddr:
- */
-struct sockaddr_dl {
- u_char sdl_len; /* Total length of sockaddr */
- u_char sdl_family; /* AF_DLI */
- u_short sdl_index; /* if != 0, system given index for interface */
- u_char sdl_type; /* interface type */
- u_char sdl_nlen; /* interface name length, no trailing 0 reqd. */
- u_char sdl_alen; /* link level address length */
- u_char sdl_slen; /* link layer selector length */
- char sdl_data[12]; /* minimum work area, can be larger;
- contains both if name and ll address */
-};
-
-#define LLADDR(s) ((caddr_t)((s)->sdl_data + (s)->sdl_nlen))
-
-#ifndef KERNEL
-
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-void link_addr __P((const char *, struct sockaddr_dl *));
-char *link_ntoa __P((const struct sockaddr_dl *));
-__END_DECLS
-
-#endif /* !KERNEL */
-
-#endif
diff --git a/c/src/exec/libnetworking/net/if_ethersubr.c b/c/src/exec/libnetworking/net/if_ethersubr.c
deleted file mode 100644
index 2a6446ebb6..0000000000
--- a/c/src/exec/libnetworking/net/if_ethersubr.c
+++ /dev/null
@@ -1,997 +0,0 @@
-/*
- * Copyright (c) 1982, 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)if_ethersubr.c 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/malloc.h>
-#include <sys/mbuf.h>
-#include <sys/protosw.h>
-#include <sys/socket.h>
-#include <sys/ioctl.h>
-#include <sys/errno.h>
-#include <sys/syslog.h>
-#include <sys/sysctl.h>
-
-#include <net/if.h>
-#include <net/netisr.h>
-#include <net/route.h>
-#include <net/if_llc.h>
-#include <net/if_dl.h>
-#include <net/if_types.h>
-#include <net/ethernet.h>
-
-#ifdef INET
-#include <netinet/in.h>
-#include <netinet/in_var.h>
-#endif
-#include <netinet/if_ether.h>
-
-#ifdef IPX
-#include <netipx/ipx.h>
-#include <netipx/ipx_if.h>
-#endif
-
-#ifdef NS
-#include <netns/ns.h>
-#include <netns/ns_if.h>
-ushort ns_nettype;
-int ether_outputdebug = 0;
-int ether_inputdebug = 0;
-#endif
-
-#ifdef ISO
-#include <netiso/argo_debug.h>
-#include <netiso/iso.h>
-#include <netiso/iso_var.h>
-#include <netiso/iso_snpac.h>
-#endif
-
-/*#ifdef LLC
-#include <netccitt/dll.h>
-#include <netccitt/llc_var.h>
-#endif*/
-
-#if defined(LLC) && defined(CCITT)
-extern struct ifqueue pkintrq;
-#endif
-
-#ifdef NETATALK
-#include <netatalk/at.h>
-#include <netatalk/at_var.h>
-#include <netatalk/at_extern.h>
-
-#define llc_snap_org_code llc_un.type_snap.org_code
-#define llc_snap_ether_type llc_un.type_snap.ether_type
-
-extern u_char at_org_code[ 3 ];
-extern u_char aarp_org_code[ 3 ];
-#endif NETATALK
-
-u_char etherbroadcastaddr[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
-#define senderr(e) { error = (e); goto bad;}
-
-/*
- * Ethernet output routine.
- * Encapsulate a packet of type family for the local net.
- * Use trailer local net encapsulation if enough data in first
- * packet leaves a multiple of 512 bytes of data in remainder.
- * Assumes that ifp is actually pointer to arpcom structure.
- */
-int
-ether_output(ifp, m0, dst, rt0)
- register struct ifnet *ifp;
- struct mbuf *m0;
- struct sockaddr *dst;
- struct rtentry *rt0;
-{
- short type;
- int s, error = 0;
-#ifdef NS
- u_char *cp
- register struct ifqueue *inq;
- register struct mbuf *m2;
-#endif
- u_char edst[6];
- register struct mbuf *m = m0;
- register struct rtentry *rt;
- struct mbuf *mcopy = (struct mbuf *)0;
- register struct ether_header *eh;
- int off, len = m->m_pkthdr.len;
- struct arpcom *ac = (struct arpcom *)ifp;
-#ifdef NETATALK
- struct at_ifaddr *aa;
-#endif NETATALK
-
- if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING))
- senderr(ENETDOWN);
- rt = rt0;
- if (rt) {
- if ((rt->rt_flags & RTF_UP) == 0) {
- rt0 = rt = rtalloc1(dst, 1, 0UL);
- if (rt0)
- rt->rt_refcnt--;
- else
- senderr(EHOSTUNREACH);
- }
- if (rt->rt_flags & RTF_GATEWAY) {
- if (rt->rt_gwroute == 0)
- goto lookup;
- if (((rt = rt->rt_gwroute)->rt_flags & RTF_UP) == 0) {
- rtfree(rt); rt = rt0;
- lookup: rt->rt_gwroute = rtalloc1(rt->rt_gateway, 1,
- 0UL);
- if ((rt = rt->rt_gwroute) == 0)
- senderr(EHOSTUNREACH);
- }
- }
- if (rt->rt_flags & RTF_REJECT)
- if (rt->rt_rmx.rmx_expire == 0 ||
- rtems_bsdnet_seconds_since_boot() < rt->rt_rmx.rmx_expire)
- senderr(rt == rt0 ? EHOSTDOWN : EHOSTUNREACH);
- }
- switch (dst->sa_family) {
-
-#ifdef INET
- case AF_INET:
- if (!arpresolve(ac, rt, m, dst, edst, rt0))
- return (0); /* if not yet resolved */
- /* If broadcasting on a simplex interface, loopback a copy */
- if ((m->m_flags & M_BCAST) && (ifp->if_flags & IFF_SIMPLEX))
- mcopy = m_copy(m, 0, (int)M_COPYALL);
- off = m->m_pkthdr.len - m->m_len;
- type = htons(ETHERTYPE_IP);
- break;
-#endif
-#ifdef IPX
- case AF_IPX:
- {
- struct ifaddr *ia;
-
- type = htons(ETHERTYPE_IPX);
- bcopy((caddr_t)&(((struct sockaddr_ipx *)dst)->sipx_addr.x_host),
- (caddr_t)edst, sizeof (edst));
- for (ia = ifp->if_addrlist; ia != NULL; ia = ia->ifa_next)
- if(ia->ifa_addr->sa_family == AF_IPX &&
- !bcmp((caddr_t)edst,
- (caddr_t)&((struct ipx_ifaddr *)ia)->ia_addr.sipx_addr.x_host,
- sizeof(edst)))
- return (looutput(ifp, m, dst, rt));
- /* If broadcasting on a simplex interface, loopback a copy */
- if ((m->m_flags & M_BCAST) && (ifp->if_flags & IFF_SIMPLEX))
- mcopy = m_copy(m, 0, (int)M_COPYALL);
- break;
- }
-#endif
-#ifdef NETATALK
- case AF_APPLETALK:
- {
- struct sockaddr_at *sat = (struct sockaddr_at *)dst;
-
- /*
- * super hack..
- * Most of this loopback code should move into the appletalk
- * code, but it's here for now.. remember to move it! [JRE]
- * This may not get the same interface we started with
- * fix asap. XXX
- */
- aa = at_ifawithnet( sat );
- if (aa == NULL) {
- goto bad;
- }
- if( aa->aa_ifa.ifa_ifp != ifp ) {
- (*aa->aa_ifa.ifa_ifp->if_output)(aa->aa_ifa.ifa_ifp,
- m,dst,rt);
- }
- if (((sat->sat_addr.s_net == ATADDR_ANYNET)
- && (sat->sat_addr.s_node == ATADDR_ANYNODE))
- || ((sat->sat_addr.s_net == aa->aa_addr.sat_addr.s_net )
- && (sat->sat_addr.s_node == aa->aa_addr.sat_addr.s_node))) {
- (void) looutput(ifp, m, dst, rt);
- return(0);
- }
-
- if (!aarpresolve(ac, m, (struct sockaddr_at *)dst, edst)) {
-#ifdef NETATALKDEBUG
- extern char *prsockaddr(struct sockaddr *);
- printf("aarpresolv: failed for %s\n", prsockaddr(dst));
-#endif NETATALKDEBUG
- return (0);
- }
-
- /*
- * If broadcasting on a simplex interface, loopback a copy
- */
- if ((m->m_flags & M_BCAST) && (ifp->if_flags & IFF_SIMPLEX))
- mcopy = m_copy(m, 0, (int)M_COPYALL);
- }
- /*
- * In the phase 2 case, we need to prepend an mbuf for the llc header.
- * Since we must preserve the value of m, which is passed to us by
- * value, we m_copy() the first mbuf, and use it for our llc header.
- */
- if ( aa->aa_flags & AFA_PHASE2 ) {
- struct llc llc;
-
- M_PREPEND(m, sizeof(struct llc), M_WAIT);
- len += sizeof(struct llc);
- llc.llc_dsap = llc.llc_ssap = LLC_SNAP_LSAP;
- llc.llc_control = LLC_UI;
- bcopy(at_org_code, llc.llc_snap_org_code, sizeof(at_org_code));
- llc.llc_snap_ether_type = htons( ETHERTYPE_AT );
- bcopy(&llc, mtod(m, caddr_t), sizeof(struct llc));
- type = htons(m->m_pkthdr.len);
- } else {
- type = htons(ETHERTYPE_AT);
- }
- break;
-#endif NETATALK
-#ifdef NS
- case AF_NS:
- switch(ns_nettype){
- default:
- case 0x8137: /* Novell Ethernet_II Ethernet TYPE II */
- type = 0x8137;
- break;
- case 0x0: /* Novell 802.3 */
- type = htons( m->m_pkthdr.len);
- break;
- case 0xe0e0: /* Novell 802.2 and Token-Ring */
- M_PREPEND(m, 3, M_WAIT);
- type = htons( m->m_pkthdr.len);
- cp = mtod(m, u_char *);
- *cp++ = 0xE0;
- *cp++ = 0xE0;
- *cp++ = 0x03;
- break;
- }
- bcopy((caddr_t)&(((struct sockaddr_ns *)dst)->sns_addr.x_host),
- (caddr_t)edst, sizeof (edst));
- if (!bcmp((caddr_t)edst, (caddr_t)&ns_thishost, sizeof(edst))){
- m->m_pkthdr.rcvif = ifp;
- schednetisr(NETISR_NS);
- inq = &nsintrq;
- s = splimp();
- if (IF_QFULL(inq)) {
- IF_DROP(inq);
- m_freem(m);
- } else
- IF_ENQUEUE(inq, m);
- splx(s);
- return (error);
- }
- if (!bcmp((caddr_t)edst, (caddr_t)&ns_broadhost, sizeof(edst))){
- m2 = m_copy(m, 0, (int)M_COPYALL);
- m2->m_pkthdr.rcvif = ifp;
- schednetisr(NETISR_NS);
- inq = &nsintrq;
- s = splimp();
- if (IF_QFULL(inq)) {
- IF_DROP(inq);
- m_freem(m2);
- } else
- IF_ENQUEUE(inq, m2);
- splx(s);
- }
- /* If broadcasting on a simplex interface, loopback a copy */
- if ((m->m_flags & M_BCAST) && (ifp->if_flags & IFF_SIMPLEX)){
- mcopy = m_copy(m, 0, (int)M_COPYALL);
- }
- break;
-#endif /* NS */
-#ifdef ISO
- case AF_ISO: {
- int snpalen;
- struct llc *l;
- register struct sockaddr_dl *sdl;
-
- if (rt && (sdl = (struct sockaddr_dl *)rt->rt_gateway) &&
- sdl->sdl_family == AF_LINK && sdl->sdl_alen > 0) {
- bcopy(LLADDR(sdl), (caddr_t)edst, sizeof(edst));
- } else if (error =
- iso_snparesolve(ifp, (struct sockaddr_iso *)dst,
- (char *)edst, &snpalen))
- goto bad; /* Not Resolved */
- /* If broadcasting on a simplex interface, loopback a copy */
- if (*edst & 1)
- m->m_flags |= (M_BCAST|M_MCAST);
- if ((m->m_flags & M_BCAST) && (ifp->if_flags & IFF_SIMPLEX) &&
- (mcopy = m_copy(m, 0, (int)M_COPYALL))) {
- M_PREPEND(mcopy, sizeof (*eh), M_DONTWAIT);
- if (mcopy) {
- eh = mtod(mcopy, struct ether_header *);
- bcopy((caddr_t)edst,
- (caddr_t)eh->ether_dhost, sizeof (edst));
- bcopy((caddr_t)ac->ac_enaddr,
- (caddr_t)eh->ether_shost, sizeof (edst));
- }
- }
- M_PREPEND(m, 3, M_DONTWAIT);
- if (m == NULL)
- return (0);
- type = htons(m->m_pkthdr.len);
- l = mtod(m, struct llc *);
- l->llc_dsap = l->llc_ssap = LLC_ISO_LSAP;
- l->llc_control = LLC_UI;
- len += 3;
- IFDEBUG(D_ETHER)
- int i;
- printf("unoutput: sending pkt to: ");
- for (i=0; i<6; i++)
- printf("%x ", edst[i] & 0xff);
- printf("\n");
- ENDDEBUG
- } break;
-#endif /* ISO */
-#ifdef LLC
-/* case AF_NSAP: */
- case AF_CCITT: {
- register struct sockaddr_dl *sdl =
- (struct sockaddr_dl *) rt -> rt_gateway;
-
- if (sdl && sdl->sdl_family == AF_LINK
- && sdl->sdl_alen > 0) {
- bcopy(LLADDR(sdl), (char *)edst,
- sizeof(edst));
- } else goto bad; /* Not a link interface ? Funny ... */
- if ((ifp->if_flags & IFF_SIMPLEX) && (*edst & 1) &&
- (mcopy = m_copy(m, 0, (int)M_COPYALL))) {
- M_PREPEND(mcopy, sizeof (*eh), M_DONTWAIT);
- if (mcopy) {
- eh = mtod(mcopy, struct ether_header *);
- bcopy((caddr_t)edst,
- (caddr_t)eh->ether_dhost, sizeof (edst));
- bcopy((caddr_t)ac->ac_enaddr,
- (caddr_t)eh->ether_shost, sizeof (edst));
- }
- }
- type = htons(m->m_pkthdr.len);
-#ifdef LLC_DEBUG
- {
- int i;
- register struct llc *l = mtod(m, struct llc *);
-
- printf("ether_output: sending LLC2 pkt to: ");
- for (i=0; i<6; i++)
- printf("%x ", edst[i] & 0xff);
- printf(" len 0x%x dsap 0x%x ssap 0x%x control 0x%x\n",
- type & 0xff, l->llc_dsap & 0xff, l->llc_ssap &0xff,
- l->llc_control & 0xff);
-
- }
-#endif /* LLC_DEBUG */
- } break;
-#endif /* LLC */
-
- case AF_UNSPEC:
- eh = (struct ether_header *)dst->sa_data;
- (void)memcpy(edst, eh->ether_dhost, sizeof (edst));
- type = eh->ether_type;
- break;
-
- default:
- printf("%s%d: can't handle af%d\n", ifp->if_name, ifp->if_unit,
- dst->sa_family);
- senderr(EAFNOSUPPORT);
- }
-
-
- if (mcopy)
- (void) looutput(ifp, mcopy, dst, rt);
- /*
- * Add local net header. If no space in first mbuf,
- * allocate another.
- */
- M_PREPEND(m, sizeof (struct ether_header), M_DONTWAIT);
- if (m == 0)
- senderr(ENOBUFS);
- eh = mtod(m, struct ether_header *);
- (void)memcpy(&eh->ether_type, &type,
- sizeof(eh->ether_type));
- (void)memcpy(eh->ether_dhost, edst, sizeof (edst));
- (void)memcpy(eh->ether_shost, ac->ac_enaddr,
- sizeof(eh->ether_shost));
- s = splimp();
- /*
- * Queue message on interface, and start output if interface
- * not yet active.
- */
- if (IF_QFULL(&ifp->if_snd)) {
- IF_DROP(&ifp->if_snd);
- splx(s);
- senderr(ENOBUFS);
- }
- IF_ENQUEUE(&ifp->if_snd, m);
- if ((ifp->if_flags & IFF_OACTIVE) == 0)
- (*ifp->if_start)(ifp);
- splx(s);
- ifp->if_obytes += len + sizeof (struct ether_header);
- if (m->m_flags & M_MCAST)
- ifp->if_omcasts++;
- return (error);
-
-bad:
- if (m)
- m_freem(m);
- return (error);
-}
-
-/*
- * Process a received Ethernet packet;
- * the packet is in the mbuf chain m without
- * the ether header, which is provided separately.
- */
-void
-ether_input(ifp, eh, m)
- struct ifnet *ifp;
- register struct ether_header *eh;
- struct mbuf *m;
-{
- register struct ifqueue *inq;
- u_short ether_type;
-#ifdef NS
- u_short *checksum;
-#endif
- int s;
-#if defined (ISO) || defined (LLC) || defined(NETATALK)
- register struct llc *l;
-#endif
-
- if ((ifp->if_flags & IFF_UP) == 0) {
- m_freem(m);
- return;
- }
- ifp->if_ibytes += m->m_pkthdr.len + sizeof (*eh);
- if (bcmp((caddr_t)etherbroadcastaddr, (caddr_t)eh->ether_dhost,
- sizeof(etherbroadcastaddr)) == 0)
- m->m_flags |= M_BCAST;
- else if (eh->ether_dhost[0] & 1)
- m->m_flags |= M_MCAST;
- if (m->m_flags & (M_BCAST|M_MCAST))
- ifp->if_imcasts++;
-
- /*
- * RTEMS addition -- allow application to `tap into'
- * the incoming packet stream.
- */
- if (ifp->if_tap && (*ifp->if_tap)(ifp, eh, m)) {
- m_freem(m);
- return;
- }
-
- ether_type = ntohs(eh->ether_type);
-
- switch (ether_type) {
-#ifdef INET
- case ETHERTYPE_IP:
- schednetisr(NETISR_IP);
- inq = &ipintrq;
- break;
-
- case ETHERTYPE_ARP:
- schednetisr(NETISR_ARP);
- inq = &arpintrq;
- break;
-#endif
-#ifdef IPX
- case ETHERTYPE_IPX:
- schednetisr(NETISR_IPX);
- inq = &ipxintrq;
- break;
-#endif
-#ifdef NS
- case 0x8137: /* Novell Ethernet_II Ethernet TYPE II */
- schednetisr(NETISR_NS);
- inq = &nsintrq;
- break;
-
-#endif /* NS */
-#ifdef NETATALK
- case ETHERTYPE_AT:
- schednetisr(NETISR_ATALK);
- inq = &atintrq1;
- break;
- case ETHERTYPE_AARP:
- /* probably this should be done with a NETISR as well */
- aarpinput((struct arpcom *)ifp, m); /* XXX */
- return;
-#endif NETATALK
- default:
-#ifdef NS
- checksum = mtod(m, ushort *);
- /* Novell 802.3 */
- if ((ether_type <= ETHERMTU) &&
- ((*checksum == 0xffff) || (*checksum == 0xE0E0))){
- if(*checksum == 0xE0E0) {
- m->m_pkthdr.len -= 3;
- m->m_len -= 3;
- m->m_data += 3;
- }
- schednetisr(NETISR_NS);
- inq = &nsintrq;
- break;
- }
-#endif /* NS */
-#if defined (ISO) || defined (LLC) || defined(NETATALK)
- if (ether_type > ETHERMTU)
- goto dropanyway;
- l = mtod(m, struct llc *);
- switch (l->llc_dsap) {
-#ifdef NETATALK
- case LLC_SNAP_LSAP:
- switch (l->llc_control) {
- case LLC_UI:
- if (l->llc_ssap != LLC_SNAP_LSAP)
- goto dropanyway;
-
- if (Bcmp(&(l->llc_snap_org_code)[0], at_org_code,
- sizeof(at_org_code)) == 0 &&
- ntohs(l->llc_snap_ether_type) == ETHERTYPE_AT) {
- inq = &atintrq2;
- m_adj( m, sizeof( struct llc ));
- schednetisr(NETISR_ATALK);
- break;
- }
-
- if (Bcmp(&(l->llc_snap_org_code)[0], aarp_org_code,
- sizeof(aarp_org_code)) == 0 &&
- ntohs(l->llc_snap_ether_type) == ETHERTYPE_AARP) {
- m_adj( m, sizeof( struct llc ));
- aarpinput((struct arpcom *)ifp, m); /* XXX */
- return;
- }
-
- default:
- goto dropanyway;
- }
- break;
-#endif NETATALK
-#ifdef ISO
- case LLC_ISO_LSAP:
- switch (l->llc_control) {
- case LLC_UI:
- /* LLC_UI_P forbidden in class 1 service */
- if ((l->llc_dsap == LLC_ISO_LSAP) &&
- (l->llc_ssap == LLC_ISO_LSAP)) {
- /* LSAP for ISO */
- if (m->m_pkthdr.len > ether_type)
- m_adj(m, ether_type - m->m_pkthdr.len);
- m->m_data += 3; /* XXX */
- m->m_len -= 3; /* XXX */
- m->m_pkthdr.len -= 3; /* XXX */
- M_PREPEND(m, sizeof *eh, M_DONTWAIT);
- if (m == 0)
- return;
- *mtod(m, struct ether_header *) = *eh;
- IFDEBUG(D_ETHER)
- printf("clnp packet");
- ENDDEBUG
- schednetisr(NETISR_ISO);
- inq = &clnlintrq;
- break;
- }
- goto dropanyway;
-
- case LLC_XID:
- case LLC_XID_P:
- if(m->m_len < 6)
- goto dropanyway;
- l->llc_window = 0;
- l->llc_fid = 9;
- l->llc_class = 1;
- l->llc_dsap = l->llc_ssap = 0;
- /* Fall through to */
- case LLC_TEST:
- case LLC_TEST_P:
- {
- struct sockaddr sa;
- register struct ether_header *eh2;
- int i;
- u_char c = l->llc_dsap;
-
- l->llc_dsap = l->llc_ssap;
- l->llc_ssap = c;
- if (m->m_flags & (M_BCAST | M_MCAST))
- bcopy((caddr_t)ac->ac_enaddr,
- (caddr_t)eh->ether_dhost, 6);
- sa.sa_family = AF_UNSPEC;
- sa.sa_len = sizeof(sa);
- eh2 = (struct ether_header *)sa.sa_data;
- for (i = 0; i < 6; i++) {
- eh2->ether_shost[i] = c = eh->ether_dhost[i];
- eh2->ether_dhost[i] =
- eh->ether_dhost[i] = eh->ether_shost[i];
- eh->ether_shost[i] = c;
- }
- ifp->if_output(ifp, m, &sa, NULL);
- return;
- }
- default:
- m_freem(m);
- return;
- }
- break;
-#endif /* ISO */
-#ifdef LLC
- case LLC_X25_LSAP:
- {
- if (m->m_pkthdr.len > ether_type)
- m_adj(m, ether_type - m->m_pkthdr.len);
- M_PREPEND(m, sizeof(struct sdl_hdr) , M_DONTWAIT);
- if (m == 0)
- return;
- if ( !sdl_sethdrif(ifp, eh->ether_shost, LLC_X25_LSAP,
- eh->ether_dhost, LLC_X25_LSAP, 6,
- mtod(m, struct sdl_hdr *)))
- panic("ETHER cons addr failure");
- mtod(m, struct sdl_hdr *)->sdlhdr_len = ether_type;
-#ifdef LLC_DEBUG
- printf("llc packet\n");
-#endif /* LLC_DEBUG */
- schednetisr(NETISR_CCITT);
- inq = &llcintrq;
- break;
- }
-#endif /* LLC */
- dropanyway:
- default:
- m_freem(m);
- return;
- }
-#else /* ISO || LLC || NETATALK */
- m_freem(m);
- return;
-#endif /* ISO || LLC || NETATALK */
- }
-
- s = splimp();
- if (IF_QFULL(inq)) {
- IF_DROP(inq);
- m_freem(m);
- } else
- IF_ENQUEUE(inq, m);
- splx(s);
-}
-
-/*
- * Perform common duties while attaching to interface list
- */
-void
-ether_ifattach(ifp)
- register struct ifnet *ifp;
-{
- register struct ifaddr *ifa;
- register struct sockaddr_dl *sdl;
-
- ifp->if_type = IFT_ETHER;
- ifp->if_addrlen = 6;
- ifp->if_hdrlen = 14;
- ifp->if_mtu = ETHERMTU;
- if (ifp->if_baudrate == 0)
- ifp->if_baudrate = 10000000;
- for (ifa = ifp->if_addrlist; ifa; ifa = ifa->ifa_next)
- if ((sdl = (struct sockaddr_dl *)ifa->ifa_addr) &&
- sdl->sdl_family == AF_LINK) {
- sdl->sdl_type = IFT_ETHER;
- sdl->sdl_alen = ifp->if_addrlen;
- bcopy((caddr_t)((struct arpcom *)ifp)->ac_enaddr,
- LLADDR(sdl), ifp->if_addrlen);
- break;
- }
-}
-
-static u_char ether_ipmulticast_min[6] =
- { 0x01, 0x00, 0x5e, 0x00, 0x00, 0x00 };
-static u_char ether_ipmulticast_max[6] =
- { 0x01, 0x00, 0x5e, 0x7f, 0xff, 0xff };
-/*
- * Add an Ethernet multicast address or range of addresses to the list for a
- * given interface.
- */
-int
-ether_addmulti(ifr, ac)
- struct ifreq *ifr;
- register struct arpcom *ac;
-{
- register struct ether_multi *enm;
- struct sockaddr_in *sin;
- u_char addrlo[6];
- u_char addrhi[6];
- int set_allmulti = 0;
- int s = splimp();
-
- switch (ifr->ifr_addr.sa_family) {
-
- case AF_UNSPEC:
- bcopy(ifr->ifr_addr.sa_data, addrlo, 6);
- bcopy(addrlo, addrhi, 6);
- break;
-
-#ifdef INET
- case AF_INET:
- sin = (struct sockaddr_in *)&(ifr->ifr_addr);
- if (sin->sin_addr.s_addr == INADDR_ANY) {
- /*
- * An IP address of INADDR_ANY means listen to all
- * of the Ethernet multicast addresses used for IP.
- * (This is for the sake of IP multicast routers.)
- */
- bcopy(ether_ipmulticast_min, addrlo, 6);
- bcopy(ether_ipmulticast_max, addrhi, 6);
- set_allmulti = 1;
- }
- else {
- ETHER_MAP_IP_MULTICAST(&sin->sin_addr, addrlo);
- bcopy(addrlo, addrhi, 6);
- }
- break;
-#endif
-
- default:
- splx(s);
- return (EAFNOSUPPORT);
- }
-
- /*
- * Verify that we have valid Ethernet multicast addresses.
- */
- if ((addrlo[0] & 0x01) != 1 || (addrhi[0] & 0x01) != 1) {
- splx(s);
- return (EINVAL);
- }
- /*
- * See if the address range is already in the list.
- */
- ETHER_LOOKUP_MULTI(addrlo, addrhi, ac, enm);
- if (enm != NULL) {
- /*
- * Found it; just increment the reference count.
- */
- ++enm->enm_refcount;
- splx(s);
- return (0);
- }
- /*
- * New address or range; malloc a new multicast record
- * and link it into the interface's multicast list.
- */
- enm = (struct ether_multi *)malloc(sizeof(*enm), M_IFMADDR, M_NOWAIT);
- if (enm == NULL) {
- splx(s);
- return (ENOBUFS);
- }
- bcopy(addrlo, enm->enm_addrlo, 6);
- bcopy(addrhi, enm->enm_addrhi, 6);
- enm->enm_ac = ac;
- enm->enm_refcount = 1;
- enm->enm_next = ac->ac_multiaddrs;
- ac->ac_multiaddrs = enm;
- ac->ac_multicnt++;
- splx(s);
- if (set_allmulti)
- ac->ac_if.if_flags |= IFF_ALLMULTI;
-
- /*
- * Return ENETRESET to inform the driver that the list has changed
- * and its reception filter should be adjusted accordingly.
- */
- return (ENETRESET);
-}
-
-/*
- * Delete a multicast address record.
- */
-int
-ether_delmulti(ifr, ac)
- struct ifreq *ifr;
- register struct arpcom *ac;
-{
- register struct ether_multi *enm;
- register struct ether_multi **p;
- struct sockaddr_in *sin;
- u_char addrlo[6];
- u_char addrhi[6];
- int unset_allmulti = 0;
- int s = splimp();
-
- switch (ifr->ifr_addr.sa_family) {
-
- case AF_UNSPEC:
- bcopy(ifr->ifr_addr.sa_data, addrlo, 6);
- bcopy(addrlo, addrhi, 6);
- break;
-
-#ifdef INET
- case AF_INET:
- sin = (struct sockaddr_in *)&(ifr->ifr_addr);
- if (sin->sin_addr.s_addr == INADDR_ANY) {
- /*
- * An IP address of INADDR_ANY means stop listening
- * to the range of Ethernet multicast addresses used
- * for IP.
- */
- bcopy(ether_ipmulticast_min, addrlo, 6);
- bcopy(ether_ipmulticast_max, addrhi, 6);
- unset_allmulti = 1;
- }
- else {
- ETHER_MAP_IP_MULTICAST(&sin->sin_addr, addrlo);
- bcopy(addrlo, addrhi, 6);
- }
- break;
-#endif
-
- default:
- splx(s);
- return (EAFNOSUPPORT);
- }
-
- /*
- * Look up the address in our list.
- */
- ETHER_LOOKUP_MULTI(addrlo, addrhi, ac, enm);
- if (enm == NULL) {
- splx(s);
- return (ENXIO);
- }
- if (--enm->enm_refcount != 0) {
- /*
- * Still some claims to this record.
- */
- splx(s);
- return (0);
- }
- /*
- * No remaining claims to this record; unlink and free it.
- */
- for (p = &enm->enm_ac->ac_multiaddrs;
- *p != enm;
- p = &(*p)->enm_next)
- continue;
- *p = (*p)->enm_next;
- free(enm, M_IFMADDR);
- ac->ac_multicnt--;
- splx(s);
- if (unset_allmulti)
- ac->ac_if.if_flags &= ~IFF_ALLMULTI;
-
- /*
- * Return ENETRESET to inform the driver that the list has changed
- * and its reception filter should be adjusted accordingly.
- */
- return (ENETRESET);
-}
-
-SYSCTL_NODE(_net_link, IFT_ETHER, ether, CTLFLAG_RW, 0, "Ethernet");
-
-int
-ether_ioctl(struct ifnet *ifp, int command, caddr_t data)
-{
- struct ifaddr *ifa = (struct ifaddr *) data;
- struct ifreq *ifr = (struct ifreq *) data;
- int error = 0;
-
- switch (command) {
- case SIOCSIFADDR:
- ifp->if_flags |= IFF_UP;
-
- switch (ifa->ifa_addr->sa_family) {
-#ifdef INET
- case AF_INET:
- ifp->if_init(ifp->if_softc); /* before arpwhohas */
- arp_ifinit((struct arpcom *)ifp, ifa);
- break;
-#endif
-#ifdef IPX
- /*
- * XXX - This code is probably wrong
- */
- case AF_IPX:
- {
- register struct ipx_addr *ina = &(IA_SIPX(ifa)->sipx_addr);
- struct arpcom *ac = (struct arpcom *) (ifp->if_softc);
-
- if (ipx_nullhost(*ina))
- ina->x_host =
- *(union ipx_host *)
- ac->ac_enaddr;
- else {
- bcopy((caddr_t) ina->x_host.c_host,
- (caddr_t) ac->ac_enaddr,
- sizeof(ac->ac_enaddr));
- }
-
- /*
- * Set new address
- */
- ifp->if_init(ifp->if_softc);
- break;
- }
-#endif
-#ifdef NS
- /*
- * XXX - This code is probably wrong
- */
- case AF_NS:
- {
- register struct ns_addr *ina = &(IA_SNS(ifa)->sns_addr);
- struct arpcom *ac = (struct arpcom *) (ifp->if_softc);
-
- if (ns_nullhost(*ina))
- ina->x_host =
- *(union ns_host *) (ac->ac_enaddr);
- else {
- bcopy((caddr_t) ina->x_host.c_host,
- (caddr_t) ac->ac_enaddr,
- sizeof(ac->ac_enaddr));
- }
-
- /*
- * Set new address
- */
- ifp->if_init(ifp->if_softc);
- break;
- }
-#endif
- default:
- ifp->if_init(ifp->if_softc);
- break;
- }
- break;
-
- case SIOCGIFADDR:
- {
- struct sockaddr *sa;
-
- sa = (struct sockaddr *) & ifr->ifr_data;
- bcopy(((struct arpcom *)ifp->if_softc)->ac_enaddr,
- (caddr_t) sa->sa_data, ETHER_ADDR_LEN);
- }
- break;
-
- case SIOCSIFMTU:
- /*
- * Set the interface MTU.
- */
- if (ifr->ifr_mtu > ETHERMTU) {
- error = EINVAL;
- } else {
- ifp->if_mtu = ifr->ifr_mtu;
- }
- break;
- }
- return (error);
-}
diff --git a/c/src/exec/libnetworking/net/if_llc.h b/c/src/exec/libnetworking/net/if_llc.h
deleted file mode 100644
index 3cdf652167..0000000000
--- a/c/src/exec/libnetworking/net/if_llc.h
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)if_llc.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _NET_IF_LLC_H_
-#define _NET_IF_LLC_H_
-
-/*
- * IEEE 802.2 Link Level Control headers, for use in conjunction with
- * 802.{3,4,5} media access control methods.
- *
- * Headers here do not use bit fields due to shortcomings in many
- * compilers.
- */
-
-struct llc {
- u_char llc_dsap;
- u_char llc_ssap;
- union {
- struct {
- u_char control;
- u_char format_id;
- u_char class;
- u_char window_x2;
- } type_u;
- struct {
- u_char num_snd_x2;
- u_char num_rcv_x2;
- } type_i;
- struct {
- u_char control;
- u_char num_rcv_x2;
- } type_s;
- struct {
- u_char control;
- struct frmrinfo {
- u_char rej_pdu_0;
- u_char rej_pdu_1;
- u_char frmr_control;
- u_char frmr_control_ext;
- u_char frmr_cause;
- } frmrinfo;
- } type_frmr;
- struct {
- u_char control;
- u_char org_code[3];
- u_short ether_type;
- } type_snap;
- struct {
- u_char control;
- u_char control_ext;
- } type_raw;
- } llc_un;
-};
-#define llc_control llc_un.type_u.control
-#define llc_control_ext llc_un.type_raw.control_ext
-#define llc_fid llc_un.type_u.format_id
-#define llc_class llc_un.type_u.class
-#define llc_window llc_un.type_u.window_x2
-#define llc_frmrinfo llc_un.type_frmr.frmrinfo
-#define llc_frmr_pdu0 llc_un.type_frmr.frmrinfo.rej_pdu0
-#define llc_frmr_pdu1 llc_un.type_frmr.frmrinfo.rej_pdu1
-#define llc_frmr_control llc_un.type_frmr.frmrinfo.frmr_control
-#define llc_frmr_control_ext llc_un.type_frmr.frmrinfo.frmr_control_ext
-#define llc_frmr_cause llc_un.type_frmr.frmrinfo.frmr_control_ext
-
-/*
- * Don't use sizeof(struct llc_un) for LLC header sizes
- */
-#define LLC_ISFRAMELEN 4
-#define LLC_UFRAMELEN 3
-#define LLC_FRMRLEN 7
-
-/*
- * Unnumbered LLC format commands
- */
-#define LLC_UI 0x3
-#define LLC_UI_P 0x13
-#define LLC_DISC 0x43
-#define LLC_DISC_P 0x53
-#define LLC_UA 0x63
-#define LLC_UA_P 0x73
-#define LLC_TEST 0xe3
-#define LLC_TEST_P 0xf3
-#define LLC_FRMR 0x87
-#define LLC_FRMR_P 0x97
-#define LLC_DM 0x0f
-#define LLC_DM_P 0x1f
-#define LLC_XID 0xaf
-#define LLC_XID_P 0xbf
-#define LLC_SABME 0x6f
-#define LLC_SABME_P 0x7f
-
-/*
- * Supervisory LLC commands
- */
-#define LLC_RR 0x01
-#define LLC_RNR 0x05
-#define LLC_REJ 0x09
-
-/*
- * Info format - dummy only
- */
-#define LLC_INFO 0x00
-
-/*
- * ISO PDTR 10178 contains among others
- */
-#define LLC_X25_LSAP 0x7e
-#define LLC_SNAP_LSAP 0xaa
-#define LLC_ISO_LSAP 0xfe
-
-#endif
diff --git a/c/src/exec/libnetworking/net/if_loop.c b/c/src/exec/libnetworking/net/if_loop.c
deleted file mode 100644
index 3823c28744..0000000000
--- a/c/src/exec/libnetworking/net/if_loop.c
+++ /dev/null
@@ -1,301 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)if_loop.c 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-/*
- * Loopback interface driver for protocol testing and timing.
- */
-#include "loop.h"
-#if NLOOP > 0
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-#include <sys/errno.h>
-#include <sys/ioctl.h>
-#include <sys/time.h>
-
-#include <net/if.h>
-#include <net/if_types.h>
-#include <net/netisr.h>
-#include <net/route.h>
-#include <net/bpf.h>
-
-#ifdef INET
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/in_var.h>
-#include <netinet/ip.h>
-#endif
-
-#ifdef IPX
-#include <netipx/ipx.h>
-#include <netipx/ipx_if.h>
-#endif
-
-#ifdef NS
-#include <netns/ns.h>
-#include <netns/ns_if.h>
-#endif
-
-#ifdef ISO
-#include <netiso/iso.h>
-#include <netiso/iso_var.h>
-#endif
-
-#ifdef NETATALK
-#include <netinet/if_ether.h>
-#include <netatalk/at.h>
-#include <netatalk/at_var.h>
-#endif NETATALK
-
-#include "bpfilter.h"
-
-static int loioctl __P((struct ifnet *, int, caddr_t));
-static void lortrequest __P((int, struct rtentry *, struct sockaddr *));
-
- void rtems_bsdnet_loopattach __P((void *));
-PSEUDO_SET(loopattach, if_loop);
-
-#ifdef TINY_LOMTU
-#define LOMTU (1024+512)
-#else
-#define LOMTU 16384
-#endif
-
-struct ifnet loif[NLOOP];
-
-/* ARGSUSED */
-void
-rtems_bsdnet_loopattach(dummy)
- void *dummy;
-{
- register struct ifnet *ifp;
- register int i = 0;
-
- for (ifp = loif; i < NLOOP; ifp++) {
- ifp->if_name = "lo";
- ifp->if_next = NULL;
- ifp->if_unit = i++;
- ifp->if_mtu = LOMTU;
- ifp->if_flags = IFF_LOOPBACK | IFF_MULTICAST;
- ifp->if_ioctl = loioctl;
- ifp->if_output = looutput;
- ifp->if_type = IFT_LOOP;
- ifp->if_hdrlen = 0;
- ifp->if_addrlen = 0;
- if_attach(ifp);
-#if NBPFILTER > 0
- bpfattach(ifp, DLT_NULL, sizeof(u_int));
-#endif
- }
-}
-
-int
-looutput(ifp, m, dst, rt)
- struct ifnet *ifp;
- register struct mbuf *m;
- struct sockaddr *dst;
- register struct rtentry *rt;
-{
- int s, isr;
- register struct ifqueue *ifq = 0;
-
- if ((m->m_flags & M_PKTHDR) == 0)
- panic("looutput no HDR");
-#if NBPFILTER > 0
- /* BPF write needs to be handled specially */
- if (dst->sa_family == AF_UNSPEC) {
- dst->sa_family = *(mtod(m, int *));
- m->m_len -= sizeof(int);
- m->m_pkthdr.len -= sizeof(int);
- m->m_data += sizeof(int);
- }
-
- if (ifp->if_bpf) {
- /*
- * We need to prepend the address family as
- * a four byte field. Cons up a dummy header
- * to pacify bpf. This is safe because bpf
- * will only read from the mbuf (i.e., it won't
- * try to free it or keep a pointer a to it).
- */
- struct mbuf m0;
- u_int af = dst->sa_family;
-
- m0.m_next = m;
- m0.m_len = 4;
- m0.m_data = (char *)&af;
-
- bpf_mtap(ifp, &m0);
- }
-#endif
- m->m_pkthdr.rcvif = ifp;
-
- if (rt && rt->rt_flags & (RTF_REJECT|RTF_BLACKHOLE)) {
- m_freem(m);
- return (rt->rt_flags & RTF_BLACKHOLE ? 0 :
- rt->rt_flags & RTF_HOST ? EHOSTUNREACH : ENETUNREACH);
- }
- ifp->if_opackets++;
- ifp->if_obytes += m->m_pkthdr.len;
- switch (dst->sa_family) {
-
-#ifdef INET
- case AF_INET:
- ifq = &ipintrq;
- isr = NETISR_IP;
- break;
-#endif
-#ifdef IPX
- case AF_IPX:
- ifq = &ipxintrq;
- isr = NETISR_IPX;
- break;
-#endif
-#ifdef NS
- case AF_NS:
- ifq = &nsintrq;
- isr = NETISR_NS;
- break;
-#endif
-#ifdef ISO
- case AF_ISO:
- ifq = &clnlintrq;
- isr = NETISR_ISO;
- break;
-#endif
-#ifdef NETATALK
- case AF_APPLETALK:
- ifq = &atintrq2;
- isr = NETISR_ATALK;
- break;
-#endif NETATALK
- default:
- printf("lo%d: can't handle af%d\n", ifp->if_unit,
- dst->sa_family);
- m_freem(m);
- return (EAFNOSUPPORT);
- }
- s = splimp();
- if (IF_QFULL(ifq)) {
- IF_DROP(ifq);
- m_freem(m);
- splx(s);
- return (ENOBUFS);
- }
- IF_ENQUEUE(ifq, m);
- schednetisr(isr);
- ifp->if_ipackets++;
- ifp->if_ibytes += m->m_pkthdr.len;
- splx(s);
- return (0);
-}
-
-/* ARGSUSED */
-static void
-lortrequest(cmd, rt, sa)
- int cmd;
- struct rtentry *rt;
- struct sockaddr *sa;
-{
- if (rt) {
- rt->rt_rmx.rmx_mtu = rt->rt_ifp->if_mtu; /* for ISO */
- /*
- * For optimal performance, the send and receive buffers
- * should be at least twice the MTU plus a little more for
- * overhead.
- */
- rt->rt_rmx.rmx_recvpipe =
- rt->rt_rmx.rmx_sendpipe = 3 * LOMTU;
- }
-}
-
-/*
- * Process an ioctl request.
- */
-/* ARGSUSED */
-static int
-loioctl(ifp, cmd, data)
- register struct ifnet *ifp;
- int cmd;
- caddr_t data;
-{
- register struct ifaddr *ifa;
- register struct ifreq *ifr = (struct ifreq *)data;
- register int error = 0;
-
- switch (cmd) {
-
- case SIOCSIFADDR:
- ifp->if_flags |= IFF_UP | IFF_RUNNING;
- ifa = (struct ifaddr *)data;
- ifa->ifa_rtrequest = lortrequest;
- /*
- * Everything else is done at a higher level.
- */
- break;
-
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- if (ifr == 0) {
- error = EAFNOSUPPORT; /* XXX */
- break;
- }
- switch (ifr->ifr_addr.sa_family) {
-
-#ifdef INET
- case AF_INET:
- break;
-#endif
-
- default:
- error = EAFNOSUPPORT;
- break;
- }
- break;
-
- case SIOCSIFMTU:
- ifp->if_mtu = ifr->ifr_mtu;
- break;
-
- default:
- error = EINVAL;
- }
- return (error);
-}
-#endif /* NLOOP > 0 */
diff --git a/c/src/exec/libnetworking/net/if_ppp.h b/c/src/exec/libnetworking/net/if_ppp.h
deleted file mode 100644
index 9322f2e13b..0000000000
--- a/c/src/exec/libnetworking/net/if_ppp.h
+++ /dev/null
@@ -1,132 +0,0 @@
-/* $Id$ */
-
-/*
- * if_ppp.h - Point-to-Point Protocol definitions.
- *
- * Copyright (c) 1989 Carnegie Mellon University.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by Carnegie Mellon University. The name of the
- * University may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#ifndef _IF_PPP_H_
-#define _IF_PPP_H_
-
-/*
- * Bit definitions for flags.
- */
-#define SC_COMP_PROT 0x00000001 /* protocol compression (output) */
-#define SC_COMP_AC 0x00000002 /* header compression (output) */
-#define SC_COMP_TCP 0x00000004 /* TCP (VJ) compression (output) */
-#define SC_NO_TCP_CCID 0x00000008 /* disable VJ connection-id comp. */
-#define SC_REJ_COMP_AC 0x00000010 /* reject adrs/ctrl comp. on input */
-#define SC_REJ_COMP_TCP 0x00000020 /* reject TCP (VJ) comp. on input */
-#define SC_CCP_OPEN 0x00000040 /* Look at CCP packets */
-#define SC_CCP_UP 0x00000080 /* May send/recv compressed packets */
-#define SC_DEBUG 0x00010000 /* enable debug messages */
-#define SC_LOG_INPKT 0x00020000 /* log contents of good pkts recvd */
-#define SC_LOG_OUTPKT 0x00040000 /* log contents of pkts sent */
-#define SC_LOG_RAWIN 0x00080000 /* log all chars received */
-#define SC_LOG_FLUSH 0x00100000 /* log all chars flushed */
-#define SC_RCV_B7_0 0x01000000 /* have rcvd char with bit 7 = 0 */
-#define SC_RCV_B7_1 0x02000000 /* have rcvd char with bit 7 = 1 */
-#define SC_RCV_EVNP 0x04000000 /* have rcvd char with even parity */
-#define SC_RCV_ODDP 0x08000000 /* have rcvd char with odd parity */
-#define SC_MASK 0x0fff00ff /* bits that user can change */
-
-/*
- * State bits in sc_flags, not changeable by user.
- */
-#define SC_TIMEOUT 0x00000400 /* timeout is currently pending */
-#define SC_VJ_RESET 0x00000800 /* need to reset VJ decomp */
-#define SC_COMP_RUN 0x00001000 /* compressor has been inited */
-#define SC_DECOMP_RUN 0x00002000 /* decompressor has been inited */
-#define SC_DC_ERROR 0x00004000 /* non-fatal decomp error detected */
-#define SC_DC_FERROR 0x00008000 /* fatal decomp error detected */
-#define SC_TBUSY 0x10000000 /* xmitter doesn't need a packet yet */
-#define SC_PKTLOST 0x20000000 /* have lost or dropped a packet */
-#define SC_FLUSH 0x40000000 /* flush input until next PPP_FLAG */
-#define SC_ESCAPED 0x80000000 /* saw a PPP_ESCAPE */
-
-/*
- * Ioctl definitions.
- */
-
-struct npioctl {
- int protocol; /* PPP procotol, e.g. PPP_IP */
- enum NPmode mode;
-};
-
-/* Structure describing a CCP configuration option, for PPPIOCSCOMPRESS */
-struct ppp_option_data {
- u_char *ptr;
- u_int length;
- int transmit;
-};
-
-struct ifpppstatsreq {
- char ifr_name[IFNAMSIZ];
- struct ppp_stats stats;
-};
-
-struct ifpppcstatsreq {
- char ifr_name[IFNAMSIZ];
- struct ppp_comp_stats stats;
-};
-
-/*
- * Ioctl definitions.
- */
-
-#define PPPIOCGFLAGS _IOR('t', 90, int) /* get configuration flags */
-#define PPPIOCSFLAGS _IOW('t', 89, int) /* set configuration flags */
-#define PPPIOCGASYNCMAP _IOR('t', 88, int) /* get async map */
-#define PPPIOCSASYNCMAP _IOW('t', 87, int) /* set async map */
-#define PPPIOCGUNIT _IOR('t', 86, int) /* get ppp unit number */
-#define PPPIOCGRASYNCMAP _IOR('t', 85, int) /* get receive async map */
-#define PPPIOCSRASYNCMAP _IOW('t', 84, int) /* set receive async map */
-#define PPPIOCGMRU _IOR('t', 83, int) /* get max receive unit */
-#define PPPIOCSMRU _IOW('t', 82, int) /* set max receive unit */
-#define PPPIOCSMAXCID _IOW('t', 81, int) /* set VJ max slot ID */
-#define PPPIOCGXASYNCMAP _IOR('t', 80, ext_accm) /* get extended ACCM */
-#define PPPIOCSXASYNCMAP _IOW('t', 79, ext_accm) /* set extended ACCM */
-#define PPPIOCXFERUNIT _IO('t', 78) /* transfer PPP unit */
-#define PPPIOCSCOMPRESS _IOW('t', 77, struct ppp_option_data)
-#define PPPIOCGNPMODE _IOWR('t', 76, struct npioctl) /* get NP mode */
-#define PPPIOCSNPMODE _IOW('t', 75, struct npioctl) /* set NP mode */
-#define PPPIOCGIDLE _IOR('t', 74, struct ppp_idle) /* get idle time */
-#ifdef PPP_FILTER
-#define PPPIOCSPASS _IOW('t', 71, struct bpf_program) /* set pass filter */
-#define PPPIOCSACTIVE _IOW('t', 70, struct bpf_program) /* set active filt */
-#endif /* PPP_FILTER */
-
-/* PPPIOC[GS]MTU are alternatives to SIOC[GS]IFMTU, used under Ultrix */
-#define PPPIOCGMTU _IOR('t', 73, int) /* get interface MTU */
-#define PPPIOCSMTU _IOW('t', 72, int) /* set interface MTU */
-
-/*
- * These two are interface ioctls so that pppstats can do them on
- * a socket without having to open the serial device.
- */
-#define SIOCGPPPSTATS _IOWR('i', 123, struct ifpppstatsreq)
-#define SIOCGPPPCSTATS _IOWR('i', 122, struct ifpppcstatsreq)
-
-#if !defined(ifr_mtu)
-#define ifr_mtu ifr_ifru.ifru_metric
-#endif
-
-#if (defined(_KERNEL) || defined(KERNEL)) && !defined(NeXT)
-void pppattach __P((void));
-void pppintr __P((void));
-#endif
-#endif /* _IF_PPP_H_ */
diff --git a/c/src/exec/libnetworking/net/if_types.h b/c/src/exec/libnetworking/net/if_types.h
deleted file mode 100644
index 833ba471c3..0000000000
--- a/c/src/exec/libnetworking/net/if_types.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright (c) 1989, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)if_types.h 8.2 (Berkeley) 4/20/94
- * $Id$
- */
-
-#ifndef _NET_IF_TYPES_H_
-#define _NET_IF_TYPES_H_
-
-/*
- * Interface types for benefit of parsing media address headers.
- * This list is derived from the SNMP list of ifTypes, currently
- * documented in RFC1573.
- */
-
-#define IFT_OTHER 0x1 /* none of the following */
-#define IFT_1822 0x2 /* old-style arpanet imp */
-#define IFT_HDH1822 0x3 /* HDH arpanet imp */
-#define IFT_X25DDN 0x4 /* x25 to imp */
-#define IFT_X25 0x5 /* PDN X25 interface (RFC877) */
-#define IFT_ETHER 0x6 /* Ethernet CSMACD */
-#define IFT_ISO88023 0x7 /* CMSA CD */
-#define IFT_ISO88024 0x8 /* Token Bus */
-#define IFT_ISO88025 0x9 /* Token Ring */
-#define IFT_ISO88026 0xa /* MAN */
-#define IFT_STARLAN 0xb
-#define IFT_P10 0xc /* Proteon 10MBit ring */
-#define IFT_P80 0xd /* Proteon 80MBit ring */
-#define IFT_HY 0xe /* Hyperchannel */
-#define IFT_FDDI 0xf
-#define IFT_LAPB 0x10
-#define IFT_SDLC 0x11
-#define IFT_T1 0x12
-#define IFT_CEPT 0x13 /* E1 - european T1 */
-#define IFT_ISDNBASIC 0x14
-#define IFT_ISDNPRIMARY 0x15
-#define IFT_PTPSERIAL 0x16 /* Proprietary PTP serial */
-#define IFT_PPP 0x17 /* RFC 1331 */
-#define IFT_LOOP 0x18 /* loopback */
-#define IFT_EON 0x19 /* ISO over IP */
-#define IFT_XETHER 0x1a /* obsolete 3MB experimental ethernet */
-#define IFT_NSIP 0x1b /* XNS over IP */
-#define IFT_SLIP 0x1c /* IP over generic TTY */
-#define IFT_ULTRA 0x1d /* Ultra Technologies */
-#define IFT_DS3 0x1e /* Generic T3 */
-#define IFT_SIP 0x1f /* SMDS */
-#define IFT_FRELAY 0x20 /* Frame Relay DTE only */
-#define IFT_RS232 0x21
-#define IFT_PARA 0x22 /* parallel-port */
-#define IFT_ARCNET 0x23
-#define IFT_ARCNETPLUS 0x24
-#define IFT_ATM 0x25 /* ATM cells */
-#define IFT_MIOX25 0x26
-#define IFT_SONET 0x27 /* SONET or SDH */
-#define IFT_X25PLE 0x28
-#define IFT_ISO88022LLC 0x29
-#define IFT_LOCALTALK 0x2a
-#define IFT_SMDSDXI 0x2b
-#define IFT_FRELAYDCE 0x2c /* Frame Relay DCE */
-#define IFT_V35 0x2d
-#define IFT_HSSI 0x2e
-#define IFT_HIPPI 0x2f
-#define IFT_MODEM 0x30 /* Generic Modem */
-#define IFT_AAL5 0x31 /* AAL5 over ATM */
-#define IFT_SONETPATH 0x32
-#define IFT_SONETVT 0x33
-#define IFT_SMDSICIP 0x34 /* SMDS InterCarrier Interface */
-#define IFT_PROPVIRTUAL 0x35 /* Proprietary Virtual/internal */
-#define IFT_PROPMUX 0x36 /* Proprietary Multiplexing */
-
-#endif
diff --git a/c/src/exec/libnetworking/net/netisr.h b/c/src/exec/libnetworking/net/netisr.h
deleted file mode 100644
index 73269a4442..0000000000
--- a/c/src/exec/libnetworking/net/netisr.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 1980, 1986, 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)netisr.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _NET_NETISR_H_
-#define _NET_NETISR_H_
-
-/*
- * The networking code runs off software interrupts.
- *
- * You can switch into the network by doing splnet() and return by splx().
- * The software interrupt level for the network is higher than the software
- * level for the clock (so you can enter the network in routines called
- * at timeout time).
- */
-#if defined(vax) || defined(tahoe)
-#define setsoftnet() mtpr(SIRR, 12)
-#endif
-
-/*
- * Each ``pup-level-1'' input queue has a bit in a ``netisr'' status
- * word which is used to de-multiplex a single software
- * interrupt used for scheduling the network code to calls
- * on the lowest level routine of each protocol.
- */
-#define NETISR_RAW 0 /* same as AF_UNSPEC */
-#define NETISR_IP 2 /* same as AF_INET */
-#define NETISR_IMP 3 /* same as AF_IMPLINK */
-#define NETISR_NS 6 /* same as AF_NS */
-#define NETISR_ISO 7 /* same as AF_ISO */
-#define NETISR_CCITT 10 /* same as AF_CCITT */
-#define NETISR_ATALK 16 /* same as AF_APPLETALK */
-#define NETISR_ARP 18 /* same as AF_LINK */
-#define NETISR_IPX 23 /* same as AF_IPX */
-#define NETISR_ISDN 26 /* same as AF_E164 */
-#define NETISR_PPP 27 /* PPP soft interrupt */
-
-#define schednetisr(anisr) rtems_bsdnet_schednetisr(anisr)
-
-#ifndef LOCORE
-#ifdef KERNEL
-extern volatile unsigned int netisr; /* scheduling bits for network */
-
-typedef void netisr_t(void);
-
-struct netisrtab {
- int nit_num;
- netisr_t *nit_isr;
-};
-
-#define NETISR_SET(num, isr)
-
-int register_netisr __P((int, netisr_t *));
-
-#endif
-#endif
-
-#endif
diff --git a/c/src/exec/libnetworking/net/ppp-comp.h b/c/src/exec/libnetworking/net/ppp-comp.h
deleted file mode 100644
index 0e6a9c672f..0000000000
--- a/c/src/exec/libnetworking/net/ppp-comp.h
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * ppp-comp.h - Definitions for doing PPP packet compression.
- *
- * Copyright (c) 1994 The Australian National University.
- * All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation is hereby granted, provided that the above copyright
- * notice appears in all copies. This software is provided without any
- * warranty, express or implied. The Australian National University
- * makes no representations about the suitability of this software for
- * any purpose.
- *
- * IN NO EVENT SHALL THE AUSTRALIAN NATIONAL UNIVERSITY BE LIABLE TO ANY
- * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
- * THE AUSTRALIAN NATIONAL UNIVERSITY HAVE BEEN ADVISED OF THE POSSIBILITY
- * OF SUCH DAMAGE.
- *
- * THE AUSTRALIAN NATIONAL UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE AUSTRALIAN NATIONAL UNIVERSITY HAS NO
- * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,
- * OR MODIFICATIONS.
- *
- * $Id$
- */
-
-#ifndef _NET_PPP_COMP_H
-#define _NET_PPP_COMP_H
-
-/*
- * The following symbols control whether we include code for
- * various compression methods.
- */
-#ifndef DO_BSD_COMPRESS
-#define DO_BSD_COMPRESS 1 /* by default, include BSD-Compress */
-#endif
-#ifndef DO_DEFLATE
-#define DO_DEFLATE 1 /* by default, include Deflate */
-#endif
-#define DO_PREDICTOR_1 0
-#define DO_PREDICTOR_2 0
-
-/*
- * Structure giving methods for compression/decompression.
- */
-#ifdef PACKETPTR
-struct compressor {
- int compress_proto; /* CCP compression protocol number */
-
- /* Allocate space for a compressor (transmit side) */
- void *(*comp_alloc) __P((u_char *options, int opt_len));
- /* Free space used by a compressor */
- void (*comp_free) __P((void *state));
- /* Initialize a compressor */
- int (*comp_init) __P((void *state, u_char *options, int opt_len,
- int unit, int hdrlen, int debug));
- /* Reset a compressor */
- void (*comp_reset) __P((void *state));
- /* Compress a packet */
- int (*compress) __P((void *state, PACKETPTR *mret,
- PACKETPTR mp, int orig_len, int max_len));
- /* Return compression statistics */
- void (*comp_stat) __P((void *state, struct compstat *stats));
-
- /* Allocate space for a decompressor (receive side) */
- void *(*decomp_alloc) __P((u_char *options, int opt_len));
- /* Free space used by a decompressor */
- void (*decomp_free) __P((void *state));
- /* Initialize a decompressor */
- int (*decomp_init) __P((void *state, u_char *options, int opt_len,
- int unit, int hdrlen, int mru, int debug));
- /* Reset a decompressor */
- void (*decomp_reset) __P((void *state));
- /* Decompress a packet. */
- int (*decompress) __P((void *state, PACKETPTR mp,
- PACKETPTR *dmpp));
- /* Update state for an incompressible packet received */
- void (*incomp) __P((void *state, PACKETPTR mp));
- /* Return decompression statistics */
- void (*decomp_stat) __P((void *state, struct compstat *stats));
-};
-#endif /* PACKETPTR */
-
-/*
- * Return values for decompress routine.
- * We need to make these distinctions so that we can disable certain
- * useful functionality, namely sending a CCP reset-request as a result
- * of an error detected after decompression. This is to avoid infringing
- * a patent held by Motorola.
- * Don't you just lurve software patents.
- */
-#define DECOMP_OK 0 /* everything went OK */
-#define DECOMP_ERROR 1 /* error detected before decomp. */
-#define DECOMP_FATALERROR 2 /* error detected after decomp. */
-
-/*
- * CCP codes.
- */
-#define CCP_CONFREQ 1
-#define CCP_CONFACK 2
-#define CCP_TERMREQ 5
-#define CCP_TERMACK 6
-#define CCP_RESETREQ 14
-#define CCP_RESETACK 15
-
-/*
- * Max # bytes for a CCP option
- */
-#define CCP_MAX_OPTION_LENGTH 32
-
-/*
- * Parts of a CCP packet.
- */
-#define CCP_CODE(dp) ((dp)[0])
-#define CCP_ID(dp) ((dp)[1])
-#define CCP_LENGTH(dp) (((dp)[2] << 8) + (dp)[3])
-#define CCP_HDRLEN 4
-
-#define CCP_OPT_CODE(dp) ((dp)[0])
-#define CCP_OPT_LENGTH(dp) ((dp)[1])
-#define CCP_OPT_MINLEN 2
-
-/*
- * Definitions for BSD-Compress.
- */
-#define CI_BSD_COMPRESS 21 /* config. option for BSD-Compress */
-#define CILEN_BSD_COMPRESS 3 /* length of config. option */
-
-/* Macros for handling the 3rd byte of the BSD-Compress config option. */
-#define BSD_NBITS(x) ((x) & 0x1F) /* number of bits requested */
-#define BSD_VERSION(x) ((x) >> 5) /* version of option format */
-#define BSD_CURRENT_VERSION 1 /* current version number */
-#define BSD_MAKE_OPT(v, n) (((v) << 5) | (n))
-
-#define BSD_MIN_BITS 9 /* smallest code size supported */
-#define BSD_MAX_BITS 15 /* largest code size supported */
-
-/*
- * Definitions for Deflate.
- */
-#define CI_DEFLATE 26 /* config option for Deflate */
-#define CI_DEFLATE_DRAFT 24 /* value used in original draft RFC */
-#define CILEN_DEFLATE 4 /* length of its config option */
-
-#define DEFLATE_MIN_SIZE 8
-#define DEFLATE_MAX_SIZE 15
-#define DEFLATE_METHOD_VAL 8
-#define DEFLATE_SIZE(x) (((x) >> 4) + DEFLATE_MIN_SIZE)
-#define DEFLATE_METHOD(x) ((x) & 0x0F)
-#define DEFLATE_MAKE_OPT(w) ((((w) - DEFLATE_MIN_SIZE) << 4) \
- + DEFLATE_METHOD_VAL)
-#define DEFLATE_CHK_SEQUENCE 0
-
-/*
- * Definitions for other, as yet unsupported, compression methods.
- */
-#define CI_PREDICTOR_1 1 /* config option for Predictor-1 */
-#define CILEN_PREDICTOR_1 2 /* length of its config option */
-#define CI_PREDICTOR_2 2 /* config option for Predictor-2 */
-#define CILEN_PREDICTOR_2 2 /* length of its config option */
-
-#endif /* _NET_PPP_COMP_H */
diff --git a/c/src/exec/libnetworking/net/ppp_defs.h b/c/src/exec/libnetworking/net/ppp_defs.h
deleted file mode 100644
index 89c62af6cb..0000000000
--- a/c/src/exec/libnetworking/net/ppp_defs.h
+++ /dev/null
@@ -1,183 +0,0 @@
-/* $Id$ */
-
-/*
- * ppp_defs.h - PPP definitions.
- *
- * Copyright (c) 1994 The Australian National University.
- * All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation is hereby granted, provided that the above copyright
- * notice appears in all copies. This software is provided without any
- * warranty, express or implied. The Australian National University
- * makes no representations about the suitability of this software for
- * any purpose.
- *
- * IN NO EVENT SHALL THE AUSTRALIAN NATIONAL UNIVERSITY BE LIABLE TO ANY
- * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
- * THE AUSTRALIAN NATIONAL UNIVERSITY HAVE BEEN ADVISED OF THE POSSIBILITY
- * OF SUCH DAMAGE.
- *
- * THE AUSTRALIAN NATIONAL UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE AUSTRALIAN NATIONAL UNIVERSITY HAS NO
- * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,
- * OR MODIFICATIONS.
- */
-
-#ifndef _PPP_DEFS_H_
-#define _PPP_DEFS_H_
-
-/*
- * The basic PPP frame.
- */
-#define PPP_HDRLEN 4 /* octets for standard ppp header */
-#define PPP_FCSLEN 2 /* octets for FCS */
-
-/*
- * Packet sizes
- *
- * Note - lcp shouldn't be allowed to negotiate stuff outside these
- * limits. See lcp.h in the pppd directory.
- * (XXX - these constants should simply be shared by lcp.c instead
- * of living in lcp.h)
- */
-#define PPP_MTU 1500 /* Default MTU (size of Info field) */
-#define PPP_MAXMTU 65535 - (PPP_HDRLEN + PPP_FCSLEN)
-#define PPP_MINMTU 64
-#define PPP_MRU 1500 /* default MRU = max length of info field */
-#define PPP_MAXMRU 65000 /* Largest MRU we allow */
-#define PPP_MINMRU 128
-
-#define PPP_ADDRESS(p) (((u_char *)(p))[0])
-#define PPP_CONTROL(p) (((u_char *)(p))[1])
-#define PPP_PROTOCOL(p) ((((u_char *)(p))[2] << 8) + ((u_char *)(p))[3])
-
-/*
- * Significant octet values.
- */
-#define PPP_ALLSTATIONS 0xff /* All-Stations broadcast address */
-#define PPP_UI 0x03 /* Unnumbered Information */
-#define PPP_FLAG 0x7e /* Flag Sequence */
-#define PPP_ESCAPE 0x7d /* Asynchronous Control Escape */
-#define PPP_TRANS 0x20 /* Asynchronous transparency modifier */
-
-/*
- * Protocol field values.
- */
-#define PPP_IP 0x21 /* Internet Protocol */
-#define PPP_AT 0x29 /* AppleTalk Protocol */
-#define PPP_IPX 0x2b /* IPX protocol */
-#define PPP_VJC_COMP 0x2d /* VJ compressed TCP */
-#define PPP_VJC_UNCOMP 0x2f /* VJ uncompressed TCP */
-#define PPP_IPV6 0x57 /* Internet Protocol Version 6 */
-#define PPP_COMP 0xfd /* compressed packet */
-#define PPP_IPCP 0x8021 /* IP Control Protocol */
-#define PPP_ATCP 0x8029 /* AppleTalk Control Protocol */
-#define PPP_IPXCP 0x802b /* IPX Control Protocol */
-#define PPP_CCP 0x80fd /* Compression Control Protocol */
-#define PPP_LCP 0xc021 /* Link Control Protocol */
-#define PPP_PAP 0xc023 /* Password Authentication Protocol */
-#define PPP_LQR 0xc025 /* Link Quality Report protocol */
-#define PPP_CHAP 0xc223 /* Cryptographic Handshake Auth. Protocol */
-#define PPP_CBCP 0xc029 /* Callback Control Protocol */
-
-/*
- * Values for FCS calculations.
- */
-#define PPP_INITFCS 0xffff /* Initial FCS value */
-#define PPP_GOODFCS 0xf0b8 /* Good final FCS value */
-#define PPP_FCS(fcs, c) (((fcs) >> 8) ^ fcstab[((fcs) ^ (c)) & 0xff])
-
-/*
- * A 32-bit unsigned integral type.
- */
-
-#if !defined(__BIT_TYPES_DEFINED__) && !defined(_BITYPES) \
- && !defined(__FreeBSD__) && (NS_TARGET < 40) && !defined(__rtems__)
-#ifdef UINT32_T
-typedef UINT32_T u_int32_t;
-#else
-typedef unsigned int u_int32_t;
-typedef unsigned short u_int16_t;
-#endif
-#endif
-
-/*
- * Extended asyncmap - allows any character to be escaped.
- */
-typedef u_int32_t ext_accm[8];
-
-/*
- * What to do with network protocol (NP) packets.
- */
-enum NPmode {
- NPMODE_PASS, /* pass the packet through */
- NPMODE_DROP, /* silently drop the packet */
- NPMODE_ERROR, /* return an error */
- NPMODE_QUEUE /* save it up for later. */
-};
-
-/*
- * Statistics.
- */
-struct pppstat {
- unsigned int ppp_ibytes; /* bytes received */
- unsigned int ppp_ipackets; /* packets received */
- unsigned int ppp_ierrors; /* receive errors */
- unsigned int ppp_obytes; /* bytes sent */
- unsigned int ppp_opackets; /* packets sent */
- unsigned int ppp_oerrors; /* transmit errors */
-};
-
-struct vjstat {
- unsigned int vjs_packets; /* outbound packets */
- unsigned int vjs_compressed; /* outbound compressed packets */
- unsigned int vjs_searches; /* searches for connection state */
- unsigned int vjs_misses; /* times couldn't find conn. state */
- unsigned int vjs_uncompressedin; /* inbound uncompressed packets */
- unsigned int vjs_compressedin; /* inbound compressed packets */
- unsigned int vjs_errorin; /* inbound unknown type packets */
- unsigned int vjs_tossed; /* inbound packets tossed because of error */
-};
-
-struct ppp_stats {
- struct pppstat p; /* basic PPP statistics */
- struct vjstat vj; /* VJ header compression statistics */
-};
-
-struct compstat {
- unsigned int unc_bytes; /* total uncompressed bytes */
- unsigned int unc_packets; /* total uncompressed packets */
- unsigned int comp_bytes; /* compressed bytes */
- unsigned int comp_packets; /* compressed packets */
- unsigned int inc_bytes; /* incompressible bytes */
- unsigned int inc_packets; /* incompressible packets */
- unsigned int ratio; /* recent compression ratio << 8 */
-};
-
-struct ppp_comp_stats {
- struct compstat c; /* packet compression statistics */
- struct compstat d; /* packet decompression statistics */
-};
-
-/*
- * The following structure records the time in seconds since
- * the last NP packet was sent or received.
- */
-struct ppp_idle {
- time_t xmit_idle; /* time since last NP packet sent */
- time_t recv_idle; /* time since last NP packet received */
-};
-
-#ifndef __P
-#ifdef __STDC__
-#define __P(x) x
-#else
-#define __P(x) ()
-#endif
-#endif
-
-#endif /* _PPP_DEFS_H_ */
diff --git a/c/src/exec/libnetworking/net/radix.c b/c/src/exec/libnetworking/net/radix.c
deleted file mode 100644
index bc1b7ee1d1..0000000000
--- a/c/src/exec/libnetworking/net/radix.c
+++ /dev/null
@@ -1,1028 +0,0 @@
-/*
- * Copyright (c) 1988, 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)radix.c 8.4 (Berkeley) 11/2/94
- * $Id$
- */
-
-/*
- * Routines to build and maintain radix trees for routing lookups.
- */
-#ifndef _RADIX_H_
-#include <sys/param.h>
-#ifdef KERNEL
-#include <sys/systm.h>
-#include <sys/malloc.h>
-#define M_DONTWAIT M_NOWAIT
-#include <sys/domain.h>
-#else
-#include <stdlib.h>
-#endif
-#include <sys/syslog.h>
-#include <net/radix.h>
-#endif
-
-static struct radix_node *
- rn_lookup __P((void *v_arg, void *m_arg,
- struct radix_node_head *head));
-static int rn_walktree_from __P((struct radix_node_head *h, void *a,
- void *m, walktree_f_t *f, void *w));
-static int rn_walktree __P((struct radix_node_head *, walktree_f_t *, void *));
-static struct radix_node
- *rn_delete __P((void *, void *, struct radix_node_head *)),
- *rn_insert __P((void *, struct radix_node_head *, int *,
- struct radix_node [2])),
- *rn_newpair __P((void *, int, struct radix_node[2])),
- *rn_search __P((void *, struct radix_node *)),
- *rn_search_m __P((void *, struct radix_node *, void *));
-
-static int max_keylen;
-static struct radix_mask *rn_mkfreelist;
-static struct radix_node_head *mask_rnhead;
-static char *addmask_key;
-static char normal_chars[] = {0, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, -1};
-static char *rn_zeros, *rn_ones;
-
-#define rn_masktop (mask_rnhead->rnh_treetop)
-#undef Bcmp
-#define Bcmp(a, b, l) (l == 0 ? 0 : bcmp((caddr_t)(a), (caddr_t)(b), (u_long)l))
-
-static int rn_lexobetter __P((void *m_arg, void *n_arg));
-static struct radix_mask *
- rn_new_radix_mask __P((struct radix_node *tt,
- struct radix_mask *next));
-static int rn_satsifies_leaf __P((char *trial, struct radix_node *leaf,
- int skip));
-
-/*
- * The data structure for the keys is a radix tree with one way
- * branching removed. The index rn_b at an internal node n represents a bit
- * position to be tested. The tree is arranged so that all descendants
- * of a node n have keys whose bits all agree up to position rn_b - 1.
- * (We say the index of n is rn_b.)
- *
- * There is at least one descendant which has a one bit at position rn_b,
- * and at least one with a zero there.
- *
- * A route is determined by a pair of key and mask. We require that the
- * bit-wise logical and of the key and mask to be the key.
- * We define the index of a route to associated with the mask to be
- * the first bit number in the mask where 0 occurs (with bit number 0
- * representing the highest order bit).
- *
- * We say a mask is normal if every bit is 0, past the index of the mask.
- * If a node n has a descendant (k, m) with index(m) == index(n) == rn_b,
- * and m is a normal mask, then the route applies to every descendant of n.
- * If the index(m) < rn_b, this implies the trailing last few bits of k
- * before bit b are all 0, (and hence consequently true of every descendant
- * of n), so the route applies to all descendants of the node as well.
- *
- * Similar logic shows that a non-normal mask m such that
- * index(m) <= index(n) could potentially apply to many children of n.
- * Thus, for each non-host route, we attach its mask to a list at an internal
- * node as high in the tree as we can go.
- *
- * The present version of the code makes use of normal routes in short-
- * circuiting an explict mask and compare operation when testing whether
- * a key satisfies a normal route, and also in remembering the unique leaf
- * that governs a subtree.
- */
-
-static struct radix_node *
-rn_search(v_arg, head)
- void *v_arg;
- struct radix_node *head;
-{
- register struct radix_node *x;
- register caddr_t v;
-
- for (x = head, v = v_arg; x->rn_b >= 0;) {
- if (x->rn_bmask & v[x->rn_off])
- x = x->rn_r;
- else
- x = x->rn_l;
- }
- return (x);
-};
-
-static struct radix_node *
-rn_search_m(v_arg, head, m_arg)
- struct radix_node *head;
- void *v_arg, *m_arg;
-{
- register struct radix_node *x;
- register caddr_t v = v_arg, m = m_arg;
-
- for (x = head; x->rn_b >= 0;) {
- if ((x->rn_bmask & m[x->rn_off]) &&
- (x->rn_bmask & v[x->rn_off]))
- x = x->rn_r;
- else
- x = x->rn_l;
- }
- return x;
-};
-
-int
-rn_refines(m_arg, n_arg)
- void *m_arg, *n_arg;
-{
- register caddr_t m = m_arg, n = n_arg;
- register caddr_t lim, lim2 = lim = n + *(u_char *)n;
- int longer = (*(u_char *)n++) - (int)(*(u_char *)m++);
- int masks_are_equal = 1;
-
- if (longer > 0)
- lim -= longer;
- while (n < lim) {
- if (*n & ~(*m))
- return 0;
- if (*n++ != *m++)
- masks_are_equal = 0;
- }
- while (n < lim2)
- if (*n++)
- return 0;
- if (masks_are_equal && (longer < 0))
- for (lim2 = m - longer; m < lim2; )
- if (*m++)
- return 1;
- return (!masks_are_equal);
-}
-
-struct radix_node *
-rn_lookup(v_arg, m_arg, head)
- void *v_arg, *m_arg;
- struct radix_node_head *head;
-{
- register struct radix_node *x;
- caddr_t netmask = 0;
-
- if (m_arg) {
- if ((x = rn_addmask(m_arg, 1, head->rnh_treetop->rn_off)) == 0)
- return (0);
- netmask = x->rn_key;
- }
- x = rn_match(v_arg, head);
- if (x && netmask) {
- while (x && x->rn_mask != netmask)
- x = x->rn_dupedkey;
- }
- return x;
-}
-
-static int
-rn_satsifies_leaf(trial, leaf, skip)
- char *trial;
- register struct radix_node *leaf;
- int skip;
-{
- register char *cp = trial, *cp2 = leaf->rn_key, *cp3 = leaf->rn_mask;
- char *cplim;
- int length = min(*(u_char *)cp, *(u_char *)cp2);
-
- if (cp3 == 0)
- cp3 = rn_ones;
- else
- length = min(length, *(u_char *)cp3);
- cplim = cp + length; cp3 += skip; cp2 += skip;
- for (cp += skip; cp < cplim; cp++, cp2++, cp3++)
- if ((*cp ^ *cp2) & *cp3)
- return 0;
- return 1;
-}
-
-struct radix_node *
-rn_match(v_arg, head)
- void *v_arg;
- struct radix_node_head *head;
-{
- caddr_t v = v_arg;
- register struct radix_node *t = head->rnh_treetop, *x;
- register caddr_t cp = v, cp2;
- caddr_t cplim;
- struct radix_node *saved_t, *top = t;
- int off = t->rn_off, vlen = *(u_char *)cp, matched_off;
- register int test, b, rn_b;
-
- /*
- * Open code rn_search(v, top) to avoid overhead of extra
- * subroutine call.
- */
- for (; t->rn_b >= 0; ) {
- if (t->rn_bmask & cp[t->rn_off])
- t = t->rn_r;
- else
- t = t->rn_l;
- }
- /*
- * See if we match exactly as a host destination
- * or at least learn how many bits match, for normal mask finesse.
- *
- * It doesn't hurt us to limit how many bytes to check
- * to the length of the mask, since if it matches we had a genuine
- * match and the leaf we have is the most specific one anyway;
- * if it didn't match with a shorter length it would fail
- * with a long one. This wins big for class B&C netmasks which
- * are probably the most common case...
- */
- if (t->rn_mask)
- vlen = *(u_char *)t->rn_mask;
- cp += off; cp2 = t->rn_key + off; cplim = v + vlen;
- for (; cp < cplim; cp++, cp2++)
- if (*cp != *cp2)
- goto on1;
- /*
- * This extra grot is in case we are explicitly asked
- * to look up the default. Ugh!
- */
- if ((t->rn_flags & RNF_ROOT) && t->rn_dupedkey)
- t = t->rn_dupedkey;
- return t;
-on1:
- test = (*cp ^ *cp2) & 0xff; /* find first bit that differs */
- for (b = 7; (test >>= 1) > 0;)
- b--;
- matched_off = cp - v;
- b += matched_off << 3;
- rn_b = -1 - b;
- /*
- * If there is a host route in a duped-key chain, it will be first.
- */
- if ((saved_t = t)->rn_mask == 0)
- t = t->rn_dupedkey;
- for (; t; t = t->rn_dupedkey)
- /*
- * Even if we don't match exactly as a host,
- * we may match if the leaf we wound up at is
- * a route to a net.
- */
- if (t->rn_flags & RNF_NORMAL) {
- if (rn_b <= t->rn_b)
- return t;
- } else if (rn_satsifies_leaf(v, t, matched_off))
- return t;
- t = saved_t;
- /* start searching up the tree */
- do {
- register struct radix_mask *m;
- t = t->rn_p;
- m = t->rn_mklist;
- if (m) {
- /*
- * If non-contiguous masks ever become important
- * we can restore the masking and open coding of
- * the search and satisfaction test and put the
- * calculation of "off" back before the "do".
- */
- do {
- if (m->rm_flags & RNF_NORMAL) {
- if (rn_b <= m->rm_b)
- return (m->rm_leaf);
- } else {
- off = min(t->rn_off, matched_off);
- x = rn_search_m(v, t, m->rm_mask);
- while (x && x->rn_mask != m->rm_mask)
- x = x->rn_dupedkey;
- if (x && rn_satsifies_leaf(v, x, off))
- return x;
- }
- m = m->rm_mklist;
- } while (m);
- }
- } while (t != top);
- return 0;
-};
-
-#ifdef RN_DEBUG
-int rn_nodenum;
-struct radix_node *rn_clist;
-int rn_saveinfo;
-int rn_debug = 1;
-#endif
-
-static struct radix_node *
-rn_newpair(v, b, nodes)
- void *v;
- int b;
- struct radix_node nodes[2];
-{
- register struct radix_node *tt = nodes, *t = tt + 1;
- t->rn_b = b; t->rn_bmask = 0x80 >> (b & 7);
- t->rn_l = tt; t->rn_off = b >> 3;
- tt->rn_b = -1; tt->rn_key = (caddr_t)v; tt->rn_p = t;
- tt->rn_flags = t->rn_flags = RNF_ACTIVE;
-#ifdef RN_DEBUG
- tt->rn_info = rn_nodenum++; t->rn_info = rn_nodenum++;
- tt->rn_twin = t; tt->rn_ybro = rn_clist; rn_clist = tt;
-#endif
- return t;
-}
-
-static struct radix_node *
-rn_insert(v_arg, head, dupentry, nodes)
- void *v_arg;
- struct radix_node_head *head;
- int *dupentry;
- struct radix_node nodes[2];
-{
- caddr_t v = v_arg;
- struct radix_node *top = head->rnh_treetop;
- int head_off = top->rn_off, vlen = (int)*((u_char *)v);
- register struct radix_node *t = rn_search(v_arg, top);
- register caddr_t cp = v + head_off;
- register int b;
- struct radix_node *tt;
- /*
- * Find first bit at which v and t->rn_key differ
- */
- {
- register caddr_t cp2 = t->rn_key + head_off;
- register int cmp_res;
- caddr_t cplim = v + vlen;
-
- while (cp < cplim)
- if (*cp2++ != *cp++)
- goto on1;
- *dupentry = 1;
- return t;
-on1:
- *dupentry = 0;
- cmp_res = (cp[-1] ^ cp2[-1]) & 0xff;
- for (b = (cp - v) << 3; cmp_res; b--)
- cmp_res >>= 1;
- }
- {
- register struct radix_node *p, *x = top;
- cp = v;
- do {
- p = x;
- if (cp[x->rn_off] & x->rn_bmask)
- x = x->rn_r;
- else x = x->rn_l;
- } while (b > (unsigned) x->rn_b); /* x->rn_b < b && x->rn_b >= 0 */
-#ifdef RN_DEBUG
- if (rn_debug)
- log(LOG_DEBUG, "rn_insert: Going In:\n"), traverse(p);
-#endif
- t = rn_newpair(v_arg, b, nodes); tt = t->rn_l;
- if ((cp[p->rn_off] & p->rn_bmask) == 0)
- p->rn_l = t;
- else
- p->rn_r = t;
- x->rn_p = t; t->rn_p = p; /* frees x, p as temp vars below */
- if ((cp[t->rn_off] & t->rn_bmask) == 0) {
- t->rn_r = x;
- } else {
- t->rn_r = tt; t->rn_l = x;
- }
-#ifdef RN_DEBUG
- if (rn_debug)
- log(LOG_DEBUG, "rn_insert: Coming Out:\n"), traverse(p);
-#endif
- }
- return (tt);
-}
-
-struct radix_node *
-rn_addmask(n_arg, search, skip)
- int search, skip;
- void *n_arg;
-{
- caddr_t netmask = (caddr_t)n_arg;
- register struct radix_node *x;
- register caddr_t cp, cplim;
- register int b = 0, mlen, j;
- int maskduplicated, m0, isnormal;
- struct radix_node *saved_x;
- static int last_zeroed = 0;
-
- if ((mlen = *(u_char *)netmask) > max_keylen)
- mlen = max_keylen;
- if (skip == 0)
- skip = 1;
- if (mlen <= skip)
- return (mask_rnhead->rnh_nodes);
- if (skip > 1)
- Bcopy(rn_ones + 1, addmask_key + 1, skip - 1);
- if ((m0 = mlen) > skip)
- Bcopy(netmask + skip, addmask_key + skip, mlen - skip);
- /*
- * Trim trailing zeroes.
- */
- for (cp = addmask_key + mlen; (cp > addmask_key) && cp[-1] == 0;)
- cp--;
- mlen = cp - addmask_key;
- if (mlen <= skip) {
- if (m0 >= last_zeroed)
- last_zeroed = mlen;
- return (mask_rnhead->rnh_nodes);
- }
- if (m0 < last_zeroed)
- Bzero(addmask_key + m0, last_zeroed - m0);
- *addmask_key = last_zeroed = mlen;
- x = rn_search(addmask_key, rn_masktop);
- if (Bcmp(addmask_key, x->rn_key, mlen) != 0)
- x = 0;
- if (x || search)
- return (x);
- R_Malloc(x, struct radix_node *, max_keylen + 2 * sizeof (*x));
- if ((saved_x = x) == 0)
- return (0);
- Bzero(x, max_keylen + 2 * sizeof (*x));
- netmask = cp = (caddr_t)(x + 2);
- Bcopy(addmask_key, cp, mlen);
- x = rn_insert(cp, mask_rnhead, &maskduplicated, x);
- if (maskduplicated) {
- log(LOG_ERR, "rn_addmask: mask impossibly already in tree");
- Free(saved_x);
- return (x);
- }
- /*
- * Calculate index of mask, and check for normalcy.
- */
- cplim = netmask + mlen; isnormal = 1;
- for (cp = netmask + skip; (cp < cplim) && *(u_char *)cp == 0xff;)
- cp++;
- if (cp != cplim) {
- for (j = 0x80; (j & *cp) != 0; j >>= 1)
- b++;
- if (*cp != normal_chars[b] || cp != (cplim - 1))
- isnormal = 0;
- }
- b += (cp - netmask) << 3;
- x->rn_b = -1 - b;
- if (isnormal)
- x->rn_flags |= RNF_NORMAL;
- return (x);
-}
-
-static int /* XXX: arbitrary ordering for non-contiguous masks */
-rn_lexobetter(m_arg, n_arg)
- void *m_arg, *n_arg;
-{
- register u_char *mp = m_arg, *np = n_arg, *lim;
-
- if (*mp > *np)
- return 1; /* not really, but need to check longer one first */
- if (*mp == *np)
- for (lim = mp + *mp; mp < lim;)
- if (*mp++ > *np++)
- return 1;
- return 0;
-}
-
-static struct radix_mask *
-rn_new_radix_mask(tt, next)
- register struct radix_node *tt;
- register struct radix_mask *next;
-{
- register struct radix_mask *m;
-
- MKGet(m);
- if (m == 0) {
- log(LOG_ERR, "Mask for route not entered\n");
- return (0);
- }
- Bzero(m, sizeof *m);
- m->rm_b = tt->rn_b;
- m->rm_flags = tt->rn_flags;
- if (tt->rn_flags & RNF_NORMAL)
- m->rm_leaf = tt;
- else
- m->rm_mask = tt->rn_mask;
- m->rm_mklist = next;
- tt->rn_mklist = m;
- return m;
-}
-
-struct radix_node *
-rn_addroute(v_arg, n_arg, head, treenodes)
- void *v_arg, *n_arg;
- struct radix_node_head *head;
- struct radix_node treenodes[2];
-{
- caddr_t v = (caddr_t)v_arg, netmask = (caddr_t)n_arg;
- register struct radix_node *t, *x = 0, *tt;
- struct radix_node *saved_tt, *top = head->rnh_treetop;
- short b = 0, b_leaf = 0;
- int keyduplicated;
- caddr_t mmask;
- struct radix_mask *m, **mp;
-
- /*
- * In dealing with non-contiguous masks, there may be
- * many different routes which have the same mask.
- * We will find it useful to have a unique pointer to
- * the mask to speed avoiding duplicate references at
- * nodes and possibly save time in calculating indices.
- */
- if (netmask) {
- if ((x = rn_addmask(netmask, 0, top->rn_off)) == 0)
- return (0);
- b_leaf = x->rn_b;
- b = -1 - x->rn_b;
- netmask = x->rn_key;
- }
- /*
- * Deal with duplicated keys: attach node to previous instance
- */
- saved_tt = tt = rn_insert(v, head, &keyduplicated, treenodes);
- if (keyduplicated) {
- for (t = tt; tt; t = tt, tt = tt->rn_dupedkey) {
- if (tt->rn_mask == netmask)
- return (0);
- if (netmask == 0 ||
- (tt->rn_mask &&
- ((b_leaf < tt->rn_b) || /* index(netmask) > node */
- rn_refines(netmask, tt->rn_mask) ||
- rn_lexobetter(netmask, tt->rn_mask))))
- break;
- }
- /*
- * If the mask is not duplicated, we wouldn't
- * find it among possible duplicate key entries
- * anyway, so the above test doesn't hurt.
- *
- * We sort the masks for a duplicated key the same way as
- * in a masklist -- most specific to least specific.
- * This may require the unfortunate nuisance of relocating
- * the head of the list.
- */
- if (tt == saved_tt) {
- struct radix_node *xx = x;
- /* link in at head of list */
- (tt = treenodes)->rn_dupedkey = t;
- tt->rn_flags = t->rn_flags;
- tt->rn_p = x = t->rn_p;
- t->rn_p = tt; /* parent */
- if (x->rn_l == t) x->rn_l = tt; else x->rn_r = tt;
- saved_tt = tt; x = xx;
- } else {
- (tt = treenodes)->rn_dupedkey = t->rn_dupedkey;
- t->rn_dupedkey = tt;
- tt->rn_p = t; /* parent */
- if (tt->rn_dupedkey) /* parent */
- tt->rn_dupedkey->rn_p = tt; /* parent */
- }
-#ifdef RN_DEBUG
- t=tt+1; tt->rn_info = rn_nodenum++; t->rn_info = rn_nodenum++;
- tt->rn_twin = t; tt->rn_ybro = rn_clist; rn_clist = tt;
-#endif
- tt->rn_key = (caddr_t) v;
- tt->rn_b = -1;
- tt->rn_flags = RNF_ACTIVE;
- }
- /*
- * Put mask in tree.
- */
- if (netmask) {
- tt->rn_mask = netmask;
- tt->rn_b = x->rn_b;
- tt->rn_flags |= x->rn_flags & RNF_NORMAL;
- }
- t = saved_tt->rn_p;
- if (keyduplicated)
- goto on2;
- b_leaf = -1 - t->rn_b;
- if (t->rn_r == saved_tt) x = t->rn_l; else x = t->rn_r;
- /* Promote general routes from below */
- if (x->rn_b < 0) {
- for (mp = &t->rn_mklist; x; x = x->rn_dupedkey)
- if (x->rn_mask && (x->rn_b >= b_leaf) && x->rn_mklist == 0) {
- *mp = m = rn_new_radix_mask(x, 0);
- if (m)
- mp = &m->rm_mklist;
- }
- } else if (x->rn_mklist) {
- /*
- * Skip over masks whose index is > that of new node
- */
- for (mp = &x->rn_mklist; (m = *mp); mp = &m->rm_mklist)
- if (m->rm_b >= b_leaf)
- break;
- t->rn_mklist = m; *mp = 0;
- }
-on2:
- /* Add new route to highest possible ancestor's list */
- if ((netmask == 0) || (b > t->rn_b ))
- return tt; /* can't lift at all */
- b_leaf = tt->rn_b;
- do {
- x = t;
- t = t->rn_p;
- } while (b <= t->rn_b && x != top);
- /*
- * Search through routes associated with node to
- * insert new route according to index.
- * Need same criteria as when sorting dupedkeys to avoid
- * double loop on deletion.
- */
- for (mp = &x->rn_mklist; (m = *mp); mp = &m->rm_mklist) {
- if (m->rm_b < b_leaf)
- continue;
- if (m->rm_b > b_leaf)
- break;
- if (m->rm_flags & RNF_NORMAL) {
- mmask = m->rm_leaf->rn_mask;
- if (tt->rn_flags & RNF_NORMAL) {
- log(LOG_ERR,
- "Non-unique normal route, mask not entered");
- return tt;
- }
- } else
- mmask = m->rm_mask;
- if (mmask == netmask) {
- m->rm_refs++;
- tt->rn_mklist = m;
- return tt;
- }
- if (rn_refines(netmask, mmask) || rn_lexobetter(netmask, mmask))
- break;
- }
- *mp = rn_new_radix_mask(tt, *mp);
- return tt;
-}
-
-static struct radix_node *
-rn_delete(v_arg, netmask_arg, head)
- void *v_arg, *netmask_arg;
- struct radix_node_head *head;
-{
- register struct radix_node *t, *p, *x, *tt;
- struct radix_mask *m, *saved_m, **mp;
- struct radix_node *dupedkey, *saved_tt, *top;
- caddr_t v, netmask;
- int b, head_off, vlen;
-
- v = v_arg;
- netmask = netmask_arg;
- x = head->rnh_treetop;
- tt = rn_search(v, x);
- head_off = x->rn_off;
- vlen = *(u_char *)v;
- saved_tt = tt;
- top = x;
- if (tt == 0 ||
- Bcmp(v + head_off, tt->rn_key + head_off, vlen - head_off))
- return (0);
- /*
- * Delete our route from mask lists.
- */
- if (netmask) {
- if ((x = rn_addmask(netmask, 1, head_off)) == 0)
- return (0);
- netmask = x->rn_key;
- while (tt->rn_mask != netmask)
- if ((tt = tt->rn_dupedkey) == 0)
- return (0);
- }
- if (tt->rn_mask == 0 || (saved_m = m = tt->rn_mklist) == 0)
- goto on1;
- if (tt->rn_flags & RNF_NORMAL) {
- if (m->rm_leaf != tt || m->rm_refs > 0) {
- log(LOG_ERR, "rn_delete: inconsistent annotation\n");
- return 0; /* dangling ref could cause disaster */
- }
- } else {
- if (m->rm_mask != tt->rn_mask) {
- log(LOG_ERR, "rn_delete: inconsistent annotation\n");
- goto on1;
- }
- if (--m->rm_refs >= 0)
- goto on1;
- }
- b = -1 - tt->rn_b;
- t = saved_tt->rn_p;
- if (b > t->rn_b)
- goto on1; /* Wasn't lifted at all */
- do {
- x = t;
- t = t->rn_p;
- } while (b <= t->rn_b && x != top);
- for (mp = &x->rn_mklist; (m = *mp); mp = &m->rm_mklist)
- if (m == saved_m) {
- *mp = m->rm_mklist;
- MKFree(m);
- break;
- }
- if (m == 0) {
- log(LOG_ERR, "rn_delete: couldn't find our annotation\n");
- if (tt->rn_flags & RNF_NORMAL)
- return (0); /* Dangling ref to us */
- }
-on1:
- /*
- * Eliminate us from tree
- */
- if (tt->rn_flags & RNF_ROOT)
- return (0);
-#ifdef RN_DEBUG
- /* Get us out of the creation list */
- for (t = rn_clist; t && t->rn_ybro != tt; t = t->rn_ybro) {}
- if (t) t->rn_ybro = tt->rn_ybro;
-#endif
- t = tt->rn_p;
- dupedkey = saved_tt->rn_dupedkey;
- if (dupedkey) {
- /*
- * at this point, tt is the deletion target and saved_tt
- * is the head of the dupekey chain
- */
- if (tt == saved_tt) {
- /* remove from head of chain */
- x = dupedkey; x->rn_p = t;
- if (t->rn_l == tt) t->rn_l = x; else t->rn_r = x;
- } else {
- /* find node in front of tt on the chain */
- for (x = p = saved_tt; p && p->rn_dupedkey != tt;)
- p = p->rn_dupedkey;
- if (p) {
- p->rn_dupedkey = tt->rn_dupedkey;
- if (tt->rn_dupedkey) /* parent */
- tt->rn_dupedkey->rn_p = p; /* parent */
- } else log(LOG_ERR, "rn_delete: couldn't find us\n");
- }
- t = tt + 1;
- if (t->rn_flags & RNF_ACTIVE) {
-#ifndef RN_DEBUG
- *++x = *t; p = t->rn_p;
-#else
- b = t->rn_info; *++x = *t; t->rn_info = b; p = t->rn_p;
-#endif
- if (p->rn_l == t) p->rn_l = x; else p->rn_r = x;
- x->rn_l->rn_p = x; x->rn_r->rn_p = x;
- }
- goto out;
- }
- if (t->rn_l == tt) x = t->rn_r; else x = t->rn_l;
- p = t->rn_p;
- if (p->rn_r == t) p->rn_r = x; else p->rn_l = x;
- x->rn_p = p;
- /*
- * Demote routes attached to us.
- */
- if (t->rn_mklist) {
- if (x->rn_b >= 0) {
- for (mp = &x->rn_mklist; (m = *mp);)
- mp = &m->rm_mklist;
- *mp = t->rn_mklist;
- } else {
- /* If there are any key,mask pairs in a sibling
- duped-key chain, some subset will appear sorted
- in the same order attached to our mklist */
- for (m = t->rn_mklist; m && x; x = x->rn_dupedkey)
- if (m == x->rn_mklist) {
- struct radix_mask *mm = m->rm_mklist;
- x->rn_mklist = 0;
- if (--(m->rm_refs) < 0)
- MKFree(m);
- m = mm;
- }
- if (m)
- log(LOG_ERR, "%s %p at %x\n",
- "rn_delete: Orphaned Mask", m, x);
- }
- }
- /*
- * We may be holding an active internal node in the tree.
- */
- x = tt + 1;
- if (t != x) {
-#ifndef RN_DEBUG
- *t = *x;
-#else
- b = t->rn_info; *t = *x; t->rn_info = b;
-#endif
- t->rn_l->rn_p = t; t->rn_r->rn_p = t;
- p = x->rn_p;
- if (p->rn_l == x) p->rn_l = t; else p->rn_r = t;
- }
-out:
- tt->rn_flags &= ~RNF_ACTIVE;
- tt[1].rn_flags &= ~RNF_ACTIVE;
- return (tt);
-}
-
-/*
- * This is the same as rn_walktree() except for the parameters and the
- * exit.
- */
-static int
-rn_walktree_from(h, a, m, f, w)
- struct radix_node_head *h;
- void *a, *m;
- walktree_f_t *f;
- void *w;
-{
- int error;
- struct radix_node *base, *next;
- u_char *xa = (u_char *)a;
- u_char *xm = (u_char *)m;
- register struct radix_node *rn, *last = 0 /* shut up gcc */;
- int stopping = 0;
- int lastb;
-
- /*
- * rn_search_m is sort-of-open-coded here.
- */
- /* printf("about to search\n"); */
- for (rn = h->rnh_treetop; rn->rn_b >= 0; ) {
- last = rn;
- /* printf("rn_b %d, rn_bmask %x, xm[rn_off] %x\n",
- rn->rn_b, rn->rn_bmask, xm[rn->rn_off]); */
- if (!(rn->rn_bmask & xm[rn->rn_off])) {
- break;
- }
- if (rn->rn_bmask & xa[rn->rn_off]) {
- rn = rn->rn_r;
- } else {
- rn = rn->rn_l;
- }
- }
- /* printf("done searching\n"); */
-
- /*
- * Two cases: either we stepped off the end of our mask,
- * in which case last == rn, or we reached a leaf, in which
- * case we want to start from the last node we looked at.
- * Either way, last is the node we want to start from.
- */
- rn = last;
- lastb = rn->rn_b;
-
- /* printf("rn %p, lastb %d\n", rn, lastb);*/
-
- /*
- * This gets complicated because we may delete the node
- * while applying the function f to it, so we need to calculate
- * the successor node in advance.
- */
- while (rn->rn_b >= 0)
- rn = rn->rn_l;
-
- while (!stopping) {
- /* printf("node %p (%d)\n", rn, rn->rn_b); */
- base = rn;
- /* If at right child go back up, otherwise, go right */
- while (rn->rn_p->rn_r == rn && !(rn->rn_flags & RNF_ROOT)) {
- rn = rn->rn_p;
-
- /* if went up beyond last, stop */
- if (rn->rn_b < lastb) {
- stopping = 1;
- /* printf("up too far\n"); */
- }
- }
-
- /* Find the next *leaf* since next node might vanish, too */
- for (rn = rn->rn_p->rn_r; rn->rn_b >= 0;)
- rn = rn->rn_l;
- next = rn;
- /* Process leaves */
- while ((rn = base) != 0) {
- base = rn->rn_dupedkey;
- /* printf("leaf %p\n", rn); */
- if (!(rn->rn_flags & RNF_ROOT)
- && (error = (*f)(rn, w)))
- return (error);
- }
- rn = next;
-
- if (rn->rn_flags & RNF_ROOT) {
- /* printf("root, stopping"); */
- stopping = 1;
- }
-
- }
- return 0;
-}
-
-static int
-rn_walktree(h, f, w)
- struct radix_node_head *h;
- walktree_f_t *f;
- void *w;
-{
- int error;
- struct radix_node *base, *next;
- register struct radix_node *rn = h->rnh_treetop;
- /*
- * This gets complicated because we may delete the node
- * while applying the function f to it, so we need to calculate
- * the successor node in advance.
- */
- /* First time through node, go left */
- while (rn->rn_b >= 0)
- rn = rn->rn_l;
- for (;;) {
- base = rn;
- /* If at right child go back up, otherwise, go right */
- while (rn->rn_p->rn_r == rn && (rn->rn_flags & RNF_ROOT) == 0)
- rn = rn->rn_p;
- /* Find the next *leaf* since next node might vanish, too */
- for (rn = rn->rn_p->rn_r; rn->rn_b >= 0;)
- rn = rn->rn_l;
- next = rn;
- /* Process leaves */
- while ((rn = base)) {
- base = rn->rn_dupedkey;
- if (!(rn->rn_flags & RNF_ROOT) && (error = (*f)(rn, w)))
- return (error);
- }
- rn = next;
- if (rn->rn_flags & RNF_ROOT)
- return (0);
- }
- /* NOTREACHED */
-}
-
-int
-rn_inithead(head, off)
- void **head;
- int off;
-{
- register struct radix_node_head *rnh;
- register struct radix_node *t, *tt, *ttt;
- if (*head)
- return (1);
- R_Malloc(rnh, struct radix_node_head *, sizeof (*rnh));
- if (rnh == 0)
- return (0);
- Bzero(rnh, sizeof (*rnh));
- *head = rnh;
- t = rn_newpair(rn_zeros, off, rnh->rnh_nodes);
- ttt = rnh->rnh_nodes + 2;
- t->rn_r = ttt;
- t->rn_p = t;
- tt = t->rn_l;
- tt->rn_flags = t->rn_flags = RNF_ROOT | RNF_ACTIVE;
- tt->rn_b = -1 - off;
- *ttt = *tt;
- ttt->rn_key = rn_ones;
- rnh->rnh_addaddr = rn_addroute;
- rnh->rnh_deladdr = rn_delete;
- rnh->rnh_matchaddr = rn_match;
- rnh->rnh_lookup = rn_lookup;
- rnh->rnh_walktree = rn_walktree;
- rnh->rnh_walktree_from = rn_walktree_from;
- rnh->rnh_treetop = t;
- return (1);
-}
-
-void
-rn_init()
-{
- char *cp, *cplim;
-#ifdef KERNEL
- struct domain *dom;
-
- for (dom = domains; dom; dom = dom->dom_next)
- if (dom->dom_maxrtkey > max_keylen)
- max_keylen = dom->dom_maxrtkey;
-#endif
- if (max_keylen == 0) {
- log(LOG_ERR,
- "rn_init: radix functions require max_keylen be set\n");
- return;
- }
- R_Malloc(rn_zeros, char *, 3 * max_keylen);
- if (rn_zeros == NULL)
- panic("rn_init");
- Bzero(rn_zeros, 3 * max_keylen);
- rn_ones = cp = rn_zeros + max_keylen;
- addmask_key = cplim = rn_ones + max_keylen;
- while (cp < cplim)
- *cp++ = -1;
- if (rn_inithead((void **)&mask_rnhead, 0) == 0)
- panic("rn_init 2");
-}
diff --git a/c/src/exec/libnetworking/net/radix.h b/c/src/exec/libnetworking/net/radix.h
deleted file mode 100644
index 6ef9aafbac..0000000000
--- a/c/src/exec/libnetworking/net/radix.h
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * Copyright (c) 1988, 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)radix.h 8.2 (Berkeley) 10/31/94
- * $Id$
- */
-
-#ifndef _RADIX_H_
-#define _RADIX_H_
-
-/*
- * Radix search tree node layout.
- */
-
-struct radix_node {
- struct radix_mask *rn_mklist; /* list of masks contained in subtree */
- struct radix_node *rn_p; /* parent */
- short rn_b; /* bit offset; -1-index(netmask) */
- char rn_bmask; /* node: mask for bit test*/
- u_char rn_flags; /* enumerated next */
-#define RNF_NORMAL 1 /* leaf contains normal route */
-#define RNF_ROOT 2 /* leaf is root leaf for tree */
-#define RNF_ACTIVE 4 /* This node is alive (for rtfree) */
- union {
- struct { /* leaf only data: */
- caddr_t rn_Key; /* object of search */
- caddr_t rn_Mask; /* netmask, if present */
- struct radix_node *rn_Dupedkey;
- } rn_leaf;
- struct { /* node only data: */
- int rn_Off; /* where to start compare */
- struct radix_node *rn_L;/* progeny */
- struct radix_node *rn_R;/* progeny */
- } rn_node;
- } rn_u;
-#ifdef RN_DEBUG
- int rn_info;
- struct radix_node *rn_twin;
- struct radix_node *rn_ybro;
-#endif
-};
-
-#define rn_dupedkey rn_u.rn_leaf.rn_Dupedkey
-#define rn_key rn_u.rn_leaf.rn_Key
-#define rn_mask rn_u.rn_leaf.rn_Mask
-#define rn_off rn_u.rn_node.rn_Off
-#define rn_l rn_u.rn_node.rn_L
-#define rn_r rn_u.rn_node.rn_R
-
-/*
- * Annotations to tree concerning potential routes applying to subtrees.
- */
-
-extern struct radix_mask {
- short rm_b; /* bit offset; -1-index(netmask) */
- char rm_unused; /* cf. rn_bmask */
- u_char rm_flags; /* cf. rn_flags */
- struct radix_mask *rm_mklist; /* more masks to try */
- union {
- caddr_t rmu_mask; /* the mask */
- struct radix_node *rmu_leaf; /* for normal routes */
- } rm_rmu;
- int rm_refs; /* # of references to this struct */
-} *rn_mkfreelist;
-
-#define rm_mask rm_rmu.rmu_mask
-#define rm_leaf rm_rmu.rmu_leaf /* extra field would make 32 bytes */
-
-#define MKGet(m) {\
- if (rn_mkfreelist) {\
- m = rn_mkfreelist; \
- rn_mkfreelist = (m)->rm_mklist; \
- } else \
- R_Malloc(m, struct radix_mask *, sizeof (*(m))); }\
-
-#define MKFree(m) { (m)->rm_mklist = rn_mkfreelist; rn_mkfreelist = (m);}
-
-typedef int walktree_f_t __P((struct radix_node *, void *));
-
-struct radix_node_head {
- struct radix_node *rnh_treetop;
- int rnh_addrsize; /* permit, but not require fixed keys */
- int rnh_pktsize; /* permit, but not require fixed keys */
- struct radix_node *(*rnh_addaddr) /* add based on sockaddr */
- __P((void *v, void *mask,
- struct radix_node_head *head, struct radix_node nodes[]));
- struct radix_node *(*rnh_addpkt) /* add based on packet hdr */
- __P((void *v, void *mask,
- struct radix_node_head *head, struct radix_node nodes[]));
- struct radix_node *(*rnh_deladdr) /* remove based on sockaddr */
- __P((void *v, void *mask, struct radix_node_head *head));
- struct radix_node *(*rnh_delpkt) /* remove based on packet hdr */
- __P((void *v, void *mask, struct radix_node_head *head));
- struct radix_node *(*rnh_matchaddr) /* locate based on sockaddr */
- __P((void *v, struct radix_node_head *head));
- struct radix_node *(*rnh_lookup) /* locate based on sockaddr */
- __P((void *v, void *mask, struct radix_node_head *head));
- struct radix_node *(*rnh_matchpkt) /* locate based on packet hdr */
- __P((void *v, struct radix_node_head *head));
- int (*rnh_walktree) /* traverse tree */
- __P((struct radix_node_head *head, walktree_f_t *f, void *w));
- int (*rnh_walktree_from) /* traverse tree below a */
- __P((struct radix_node_head *head, void *a, void *m,
- walktree_f_t *f, void *w));
- void (*rnh_close) /* do something when the last ref drops */
- __P((struct radix_node *rn, struct radix_node_head *head));
- struct radix_node rnh_nodes[3]; /* empty tree for common case */
-};
-
-#ifndef KERNEL
-#define Bcmp(a, b, n) bcmp(((char *)(a)), ((char *)(b)), (n))
-#define Bcopy(a, b, n) bcopy(((char *)(a)), ((char *)(b)), (unsigned)(n))
-#define Bzero(p, n) bzero((char *)(p), (int)(n));
-#define R_Malloc(p, t, n) (p = (t) malloc((unsigned int)(n)))
-#define Free(p) free((char *)p);
-#else
-#define Bcmp(a, b, n) bcmp(((caddr_t)(a)), ((caddr_t)(b)), (unsigned)(n))
-#define Bcopy(a, b, n) bcopy(((caddr_t)(a)), ((caddr_t)(b)), (unsigned)(n))
-#define Bzero(p, n) bzero((caddr_t)(p), (unsigned)(n));
-#define R_Malloc(p, t, n) (p = (t) malloc((unsigned long)(n), M_RTABLE, M_DONTWAIT))
-#define Free(p) free((caddr_t)p, M_RTABLE);
-#endif /*KERNEL*/
-
-extern struct radix_node_head *mask_rnhead;
-
-void rn_init __P((void));
-int rn_inithead __P((void **, int));
-int rn_refines __P((void *, void *));
-struct radix_node
- *rn_addmask __P((void *, int, int)),
- *rn_addroute __P((void *, void *, struct radix_node_head *,
- struct radix_node [2])),
- *rn_match __P((void *, struct radix_node_head *));
-
-
-#endif /* _RADIX_H_ */
diff --git a/c/src/exec/libnetworking/net/raw_cb.c b/c/src/exec/libnetworking/net/raw_cb.c
deleted file mode 100644
index 0676931cdc..0000000000
--- a/c/src/exec/libnetworking/net/raw_cb.c
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Copyright (c) 1980, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)raw_cb.c 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/systm.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/domain.h>
-#include <sys/protosw.h>
-#include <sys/errno.h>
-
-#include <net/if.h>
-#include <net/route.h>
-#include <net/raw_cb.h>
-#include <netinet/in.h>
-
-/*
- * Routines to manage the raw protocol control blocks.
- *
- * TODO:
- * hash lookups by protocol family/protocol + address family
- * take care of unique address problems per AF?
- * redo address binding to allow wildcards
- */
-
-struct rawcb rawcb;
-static u_long raw_sendspace = RAWSNDQ;
-static u_long raw_recvspace = RAWRCVQ;
-
-/*
- * Allocate a control block and a nominal amount
- * of buffer space for the socket.
- */
-int
-raw_attach(so, proto)
- register struct socket *so;
- int proto;
-{
- register struct rawcb *rp = sotorawcb(so);
- int error;
-
- /*
- * It is assumed that raw_attach is called
- * after space has been allocated for the
- * rawcb.
- */
- if (rp == 0)
- return (ENOBUFS);
- error = soreserve(so, raw_sendspace, raw_recvspace);
- if (error)
- return (error);
- rp->rcb_socket = so;
- rp->rcb_proto.sp_family = so->so_proto->pr_domain->dom_family;
- rp->rcb_proto.sp_protocol = proto;
- insque(rp, &rawcb);
- return (0);
-}
-
-/*
- * Detach the raw connection block and discard
- * socket resources.
- */
-void
-raw_detach(rp)
- register struct rawcb *rp;
-{
- struct socket *so = rp->rcb_socket;
-
- so->so_pcb = 0;
- sofree(so);
- remque(rp);
-#ifdef notdef
- if (rp->rcb_laddr)
- m_freem(dtom(rp->rcb_laddr));
- rp->rcb_laddr = 0;
-#endif
- free((caddr_t)(rp), M_PCB);
-}
-
-/*
- * Disconnect and possibly release resources.
- */
-void
-raw_disconnect(rp)
- struct rawcb *rp;
-{
-
-#ifdef notdef
- if (rp->rcb_faddr)
- m_freem(dtom(rp->rcb_faddr));
- rp->rcb_faddr = 0;
-#endif
- if (rp->rcb_socket->so_state & SS_NOFDREF)
- raw_detach(rp);
-}
-
-#ifdef notdef
-int
-raw_bind(so, nam)
- register struct socket *so;
- struct mbuf *nam;
-{
- struct sockaddr *addr = mtod(nam, struct sockaddr *);
- register struct rawcb *rp;
-
- if (ifnet == 0)
- return (EADDRNOTAVAIL);
- rp = sotorawcb(so);
- nam = m_copym(nam, 0, M_COPYALL, M_WAITOK);
- rp->rcb_laddr = mtod(nam, struct sockaddr *);
- return (0);
-}
-#endif
diff --git a/c/src/exec/libnetworking/net/raw_cb.h b/c/src/exec/libnetworking/net/raw_cb.h
deleted file mode 100644
index c1ed5e5e0a..0000000000
--- a/c/src/exec/libnetworking/net/raw_cb.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 1980, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)raw_cb.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _NET_RAW_CB_H_
-#define _NET_RAW_CB_H_
-
-/*
- * Raw protocol interface control block. Used
- * to tie a socket to the generic raw interface.
- */
-struct rawcb {
- struct rawcb *rcb_next; /* doubly linked list */
- struct rawcb *rcb_prev;
- struct socket *rcb_socket; /* back pointer to socket */
- struct sockaddr *rcb_faddr; /* destination address */
- struct sockaddr *rcb_laddr; /* socket's address */
- struct sockproto rcb_proto; /* protocol family, protocol */
-};
-
-#define sotorawcb(so) ((struct rawcb *)(so)->so_pcb)
-
-/*
- * Nominal space allocated to a raw socket.
- */
-#define RAWSNDQ 8192
-#define RAWRCVQ 8192
-
-#ifdef KERNEL
-extern struct rawcb rawcb; /* head of list */
-
-int raw_attach __P((struct socket *, int));
-void raw_ctlinput __P((int, struct sockaddr *, void *));
-void raw_detach __P((struct rawcb *));
-void raw_disconnect __P((struct rawcb *));
-void raw_init __P((void));
-void raw_input __P((struct mbuf *,
- struct sockproto *, struct sockaddr *, struct sockaddr *));
-int raw_usrreq __P((struct socket *,
- int, struct mbuf *, struct mbuf *, struct mbuf *));
-#endif
-
-#endif
diff --git a/c/src/exec/libnetworking/net/raw_usrreq.c b/c/src/exec/libnetworking/net/raw_usrreq.c
deleted file mode 100644
index fb4faf4d6d..0000000000
--- a/c/src/exec/libnetworking/net/raw_usrreq.c
+++ /dev/null
@@ -1,315 +0,0 @@
-/*
- * Copyright (c) 1980, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)raw_usrreq.c 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/systm.h>
-#include <sys/mbuf.h>
-#include <sys/domain.h>
-#include <sys/protosw.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/errno.h>
-
-#include <net/if.h>
-#include <net/route.h>
-#include <net/netisr.h>
-#include <net/raw_cb.h>
-
-/*
- * Initialize raw connection block q.
- */
-void
-raw_init()
-{
-
- rawcb.rcb_next = rawcb.rcb_prev = &rawcb;
-}
-
-
-/*
- * Raw protocol input routine. Find the socket
- * associated with the packet(s) and move them over. If
- * nothing exists for this packet, drop it.
- */
-/*
- * Raw protocol interface.
- */
-void
-raw_input(m0, proto, src, dst)
- struct mbuf *m0;
- register struct sockproto *proto;
- struct sockaddr *src, *dst;
-{
- register struct rawcb *rp;
- register struct mbuf *m = m0;
- register int sockets = 0;
- struct socket *last;
-
- last = 0;
- for (rp = rawcb.rcb_next; rp != &rawcb; rp = rp->rcb_next) {
- if (rp->rcb_proto.sp_family != proto->sp_family)
- continue;
- if (rp->rcb_proto.sp_protocol &&
- rp->rcb_proto.sp_protocol != proto->sp_protocol)
- continue;
- /*
- * We assume the lower level routines have
- * placed the address in a canonical format
- * suitable for a structure comparison.
- *
- * Note that if the lengths are not the same
- * the comparison will fail at the first byte.
- */
-#define equal(a1, a2) \
- (bcmp((caddr_t)(a1), (caddr_t)(a2), a1->sa_len) == 0)
- if (rp->rcb_laddr && !equal(rp->rcb_laddr, dst))
- continue;
- if (rp->rcb_faddr && !equal(rp->rcb_faddr, src))
- continue;
- if (last) {
- struct mbuf *n;
- n = m_copy(m, 0, (int)M_COPYALL);
- if (n) {
- if (sbappendaddr(&last->so_rcv, src,
- n, (struct mbuf *)0) == 0)
- /* should notify about lost packet */
- m_freem(n);
- else {
- sorwakeup(last);
- sockets++;
- }
- }
- }
- last = rp->rcb_socket;
- }
- if (last) {
- if (sbappendaddr(&last->so_rcv, src,
- m, (struct mbuf *)0) == 0)
- m_freem(m);
- else {
- sorwakeup(last);
- sockets++;
- }
- } else
- m_freem(m);
-}
-
-/*ARGSUSED*/
-void
-raw_ctlinput(cmd, arg, dummy)
- int cmd;
- struct sockaddr *arg;
- void *dummy;
-{
-
- if (cmd < 0 || cmd > PRC_NCMDS)
- return;
- /* INCOMPLETE */
-}
-
-/*ARGSUSED*/
-int
-raw_usrreq(so, req, m, nam, control)
- struct socket *so;
- int req;
- struct mbuf *m, *nam, *control;
-{
- register struct rawcb *rp = sotorawcb(so);
- register int error = 0;
- int len;
-
- if (req == PRU_CONTROL)
- return (EOPNOTSUPP);
- if (control && control->m_len) {
- error = EOPNOTSUPP;
- goto release;
- }
- if (rp == 0) {
- error = EINVAL;
- goto release;
- }
- switch (req) {
-
- /*
- * Allocate a raw control block and fill in the
- * necessary info to allow packets to be routed to
- * the appropriate raw interface routine.
- */
- case PRU_ATTACH:
- if ((so->so_state & SS_PRIV) == 0) {
- error = EACCES;
- break;
- }
- error = raw_attach(so, (int)nam);
- break;
-
- /*
- * Destroy state just before socket deallocation.
- * Flush data or not depending on the options.
- */
- case PRU_DETACH:
- if (rp == 0) {
- error = ENOTCONN;
- break;
- }
- raw_detach(rp);
- break;
-
- /*
- * If a socket isn't bound to a single address,
- * the raw input routine will hand it anything
- * within that protocol family (assuming there's
- * nothing else around it should go to).
- */
- case PRU_CONNECT:
- error = EINVAL;
-#if 0
- if (rp->rcb_faddr) {
- error = EISCONN;
- break;
- }
- nam = m_copym(nam, 0, M_COPYALL, M_WAIT);
- rp->rcb_faddr = mtod(nam, struct sockaddr *);
- soisconnected(so);
-#endif
- break;
-
- case PRU_BIND:
- error = EINVAL;
-#if 0
- if (rp->rcb_laddr) {
- error = EINVAL; /* XXX */
- break;
- }
- error = raw_bind(so, nam);
-#endif
- break;
-
- case PRU_CONNECT2:
- error = EOPNOTSUPP;
- goto release;
-
- case PRU_DISCONNECT:
- if (rp->rcb_faddr == 0) {
- error = ENOTCONN;
- break;
- }
- raw_disconnect(rp);
- soisdisconnected(so);
- break;
-
- /*
- * Mark the connection as being incapable of further input.
- */
- case PRU_SHUTDOWN:
- socantsendmore(so);
- break;
-
- /*
- * Ship a packet out. The appropriate raw output
- * routine handles any massaging necessary.
- */
- case PRU_SEND:
- if (nam) {
- if (rp->rcb_faddr) {
- error = EISCONN;
- break;
- }
- rp->rcb_faddr = mtod(nam, struct sockaddr *);
- } else if (rp->rcb_faddr == 0) {
- error = ENOTCONN;
- break;
- }
- error = (*so->so_proto->pr_output)(m, so);
- m = NULL;
- if (nam)
- rp->rcb_faddr = 0;
- break;
-
- case PRU_ABORT:
- raw_disconnect(rp);
- sofree(so);
- soisdisconnected(so);
- break;
-
- case PRU_SENSE:
- /*
- * stat: don't bother with a blocksize.
- */
- return (0);
-
- /*
- * Not supported.
- */
- case PRU_RCVOOB:
- case PRU_RCVD:
- return(EOPNOTSUPP);
-
- case PRU_LISTEN:
- case PRU_ACCEPT:
- case PRU_SENDOOB:
- error = EOPNOTSUPP;
- break;
-
- case PRU_SOCKADDR:
- if (rp->rcb_laddr == 0) {
- error = EINVAL;
- break;
- }
- len = rp->rcb_laddr->sa_len;
- bcopy((caddr_t)rp->rcb_laddr, mtod(nam, caddr_t), (unsigned)len);
- nam->m_len = len;
- break;
-
- case PRU_PEERADDR:
- if (rp->rcb_faddr == 0) {
- error = ENOTCONN;
- break;
- }
- len = rp->rcb_faddr->sa_len;
- bcopy((caddr_t)rp->rcb_faddr, mtod(nam, caddr_t), (unsigned)len);
- nam->m_len = len;
- break;
-
- default:
- panic("raw_usrreq");
- }
-release:
- if (m != NULL)
- m_freem(m);
- return (error);
-}
diff --git a/c/src/exec/libnetworking/net/route.c b/c/src/exec/libnetworking/net/route.c
deleted file mode 100644
index 683ddafee9..0000000000
--- a/c/src/exec/libnetworking/net/route.c
+++ /dev/null
@@ -1,959 +0,0 @@
-/*
- * Copyright (c) 1980, 1986, 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)route.c 8.2 (Berkeley) 11/15/93
- * $Id$
- */
-
-#include "opt_mrouting.h"
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/proc.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/domain.h>
-#include <sys/protosw.h>
-#include <sys/ioctl.h>
-
-#include <net/if.h>
-#include <net/route.h>
-#include <net/raw_cb.h>
-
-#include <netinet/in.h>
-#include <netinet/in_var.h>
-#include <netinet/ip_mroute.h>
-
-#define SA(p) ((struct sockaddr *)(p))
-
-struct route_cb route_cb;
-static struct rtstat rtstat;
-struct radix_node_head *rt_tables[AF_MAX+1];
-
-static int rttrash; /* routes not in table but not freed */
-
-static void rt_maskedcopy __P((struct sockaddr *,
- struct sockaddr *, struct sockaddr *));
-static void rtable_init __P((void **));
-
-static void
-rtable_init(table)
- void **table;
-{
- struct domain *dom;
- for (dom = domains; dom; dom = dom->dom_next)
- if (dom->dom_rtattach)
- dom->dom_rtattach(&table[dom->dom_family],
- dom->dom_rtoffset);
-}
-
-void
-route_init()
-{
- rn_init(); /* initialize all zeroes, all ones, mask table */
- rtable_init((void **)rt_tables);
-}
-
-/*
- * Packet routing routines.
- */
-void
-rtalloc(ro)
- register struct route *ro;
-{
- if (ro->ro_rt && ro->ro_rt->rt_ifp && (ro->ro_rt->rt_flags & RTF_UP))
- return; /* XXX */
- ro->ro_rt = rtalloc1(&ro->ro_dst, 1, 0UL);
-}
-
-void
-rtalloc_ign(ro, ignore)
- register struct route *ro;
- u_long ignore;
-{
- if (ro->ro_rt && ro->ro_rt->rt_ifp && (ro->ro_rt->rt_flags & RTF_UP))
- return; /* XXX */
- ro->ro_rt = rtalloc1(&ro->ro_dst, 1, ignore);
-}
-
-/*
- * Look up the route that matches the address given
- * Or, at least try.. Create a cloned route if needed.
- */
-struct rtentry *
-rtalloc1(dst, report, ignflags)
- register struct sockaddr *dst;
- int report;
- u_long ignflags;
-{
- register struct radix_node_head *rnh = rt_tables[dst->sa_family];
- register struct rtentry *rt;
- register struct radix_node *rn;
- struct rtentry *newrt = 0;
- struct rt_addrinfo info;
- u_long nflags;
- int s = splnet(), err = 0, msgtype = RTM_MISS;
-
- /*
- * Look up the address in the table for that Address Family
- */
- if (rnh && (rn = rnh->rnh_matchaddr((caddr_t)dst, rnh)) &&
- ((rn->rn_flags & RNF_ROOT) == 0)) {
- /*
- * If we find it and it's not the root node, then
- * get a refernce on the rtentry associated.
- */
- newrt = rt = (struct rtentry *)rn;
- nflags = rt->rt_flags & ~ignflags;
- if (report && (nflags & (RTF_CLONING | RTF_PRCLONING))) {
- /*
- * We are apparently adding (report = 0 in delete).
- * If it requires that it be cloned, do so.
- * (This implies it wasn't a HOST route.)
- */
- err = rtrequest(RTM_RESOLVE, dst, SA(0),
- SA(0), 0, &newrt);
- if (err) {
- /*
- * If the cloning didn't succeed, maybe
- * what we have will do. Return that.
- */
- newrt = rt;
- rt->rt_refcnt++;
- goto miss;
- }
- if ((rt = newrt) && (rt->rt_flags & RTF_XRESOLVE)) {
- /*
- * If the new route specifies it be
- * externally resolved, then go do that.
- */
- msgtype = RTM_RESOLVE;
- goto miss;
- }
- } else
- rt->rt_refcnt++;
- } else {
- /*
- * Either we hit the root or couldn't find any match,
- * Which basically means
- * "caint get there frm here"
- */
- rtstat.rts_unreach++;
- miss: if (report) {
- /*
- * If required, report the failure to the supervising
- * Authorities.
- * For a delete, this is not an error. (report == 0)
- */
- bzero((caddr_t)&info, sizeof(info));
- info.rti_info[RTAX_DST] = dst;
- rt_missmsg(msgtype, &info, 0, err);
- }
- }
- splx(s);
- return (newrt);
-}
-
-void
-rtfree(rt)
- register struct rtentry *rt;
-{
- register struct radix_node_head *rnh =
- rt_tables[rt_key(rt)->sa_family];
- register struct ifaddr *ifa;
-
- if (rt == 0 || rnh == 0)
- panic("rtfree");
- rt->rt_refcnt--;
- if(rnh->rnh_close && rt->rt_refcnt == 0) {
- rnh->rnh_close((struct radix_node *)rt, rnh);
- }
- if (rt->rt_refcnt <= 0 && (rt->rt_flags & RTF_UP) == 0) {
- if (rt->rt_nodes->rn_flags & (RNF_ACTIVE | RNF_ROOT))
- panic ("rtfree 2");
- rttrash--;
- if (rt->rt_refcnt < 0) {
- printf("rtfree: %p not freed (neg refs)\n", rt);
- return;
- }
- ifa = rt->rt_ifa;
- IFAFREE(ifa);
- if (rt->rt_parent) {
- RTFREE(rt->rt_parent);
- }
- Free(rt_key(rt));
- Free(rt);
- }
-}
-
-void
-ifafree(ifa)
- register struct ifaddr *ifa;
-{
- if (ifa == NULL)
- panic("ifafree");
- if (ifa->ifa_refcnt == 0)
- free(ifa, M_IFADDR);
- else
- ifa->ifa_refcnt--;
-}
-
-/*
- * Force a routing table entry to the specified
- * destination to go through the given gateway.
- * Normally called as a result of a routing redirect
- * message from the network layer.
- *
- * N.B.: must be called at splnet
- *
- */
-void
-rtredirect(dst, gateway, netmask, flags, src, rtp)
- struct sockaddr *dst, *gateway, *netmask, *src;
- int flags;
- struct rtentry **rtp;
-{
- register struct rtentry *rt;
- int error = 0;
- short *stat = 0;
- struct rt_addrinfo info;
- struct ifaddr *ifa;
-
- /* verify the gateway is directly reachable */
- if ((ifa = ifa_ifwithnet(gateway)) == 0) {
- error = ENETUNREACH;
- goto out;
- }
- rt = rtalloc1(dst, 0, 0UL);
- /*
- * If the redirect isn't from our current router for this dst,
- * it's either old or wrong. If it redirects us to ourselves,
- * we have a routing loop, perhaps as a result of an interface
- * going down recently.
- */
-#define equal(a1, a2) (bcmp((caddr_t)(a1), (caddr_t)(a2), (a1)->sa_len) == 0)
- if (!(flags & RTF_DONE) && rt &&
- (!equal(src, rt->rt_gateway) || rt->rt_ifa != ifa))
- error = EINVAL;
- else if (ifa_ifwithaddr(gateway))
- error = EHOSTUNREACH;
- if (error)
- goto done;
- /*
- * Create a new entry if we just got back a wildcard entry
- * or the the lookup failed. This is necessary for hosts
- * which use routing redirects generated by smart gateways
- * to dynamically build the routing tables.
- */
- if ((rt == 0) || (rt_mask(rt) && rt_mask(rt)->sa_len < 2))
- goto create;
- /*
- * Don't listen to the redirect if it's
- * for a route to an interface.
- */
- if (rt->rt_flags & RTF_GATEWAY) {
- if (((rt->rt_flags & RTF_HOST) == 0) && (flags & RTF_HOST)) {
- /*
- * Changing from route to net => route to host.
- * Create new route, rather than smashing route to net.
- */
- create:
- flags |= RTF_GATEWAY | RTF_DYNAMIC;
- error = rtrequest((int)RTM_ADD, dst, gateway,
- netmask, flags,
- (struct rtentry **)0);
- stat = &rtstat.rts_dynamic;
- } else {
- /*
- * Smash the current notion of the gateway to
- * this destination. Should check about netmask!!!
- */
- rt->rt_flags |= RTF_MODIFIED;
- flags |= RTF_MODIFIED;
- stat = &rtstat.rts_newgateway;
- rt_setgate(rt, rt_key(rt), gateway);
- }
- } else
- error = EHOSTUNREACH;
-done:
- if (rt) {
- if (rtp && !error)
- *rtp = rt;
- else
- rtfree(rt);
- }
-out:
- if (error)
- rtstat.rts_badredirect++;
- else if (stat != NULL)
- (*stat)++;
- bzero((caddr_t)&info, sizeof(info));
- info.rti_info[RTAX_DST] = dst;
- info.rti_info[RTAX_GATEWAY] = gateway;
- info.rti_info[RTAX_NETMASK] = netmask;
- info.rti_info[RTAX_AUTHOR] = src;
- rt_missmsg(RTM_REDIRECT, &info, flags, error);
-}
-
-/*
-* Routing table ioctl interface.
-*/
-int
-rtioctl(req, data, p)
- int req;
- caddr_t data;
- struct proc *p;
-{
-#ifdef INET
- /* Multicast goop, grrr... */
-#ifdef MROUTING
- return mrt_ioctl(req, data);
-#else
- return mrt_ioctl(req, data, p);
-#endif
-#else /* INET */
- return ENXIO;
-#endif /* INET */
-}
-
-struct ifaddr *
-ifa_ifwithroute(flags, dst, gateway)
- int flags;
- struct sockaddr *dst, *gateway;
-{
- register struct ifaddr *ifa;
- if ((flags & RTF_GATEWAY) == 0) {
- /*
- * If we are adding a route to an interface,
- * and the interface is a pt to pt link
- * we should search for the destination
- * as our clue to the interface. Otherwise
- * we can use the local address.
- */
- ifa = 0;
- if (flags & RTF_HOST) {
- ifa = ifa_ifwithdstaddr(dst);
- }
- if (ifa == 0)
- ifa = ifa_ifwithaddr(gateway);
- } else {
- /*
- * If we are adding a route to a remote net
- * or host, the gateway may still be on the
- * other end of a pt to pt link.
- */
- ifa = ifa_ifwithdstaddr(gateway);
- }
- if (ifa == 0)
- ifa = ifa_ifwithnet(gateway);
- if (ifa == 0) {
- struct rtentry *rt = rtalloc1(dst, 0, 0UL);
- if (rt == 0)
- return (0);
- rt->rt_refcnt--;
- if ((ifa = rt->rt_ifa) == 0)
- return (0);
- }
- if (ifa->ifa_addr->sa_family != dst->sa_family) {
- struct ifaddr *oifa = ifa;
- ifa = ifaof_ifpforaddr(dst, ifa->ifa_ifp);
- if (ifa == 0)
- ifa = oifa;
- }
- return (ifa);
-}
-
-#define ROUNDUP(a) (a>0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long))
-
-static int rt_fixdelete(struct radix_node *, void *);
-static int rt_fixchange(struct radix_node *, void *);
-
-struct rtfc_arg {
- struct rtentry *rt0;
- struct radix_node_head *rnh;
-};
-
-/*
- * Do appropriate manipulations of a routing tree given
- * all the bits of info needed
- */
-int
-rtrequest(req, dst, gateway, netmask, flags, ret_nrt)
- int req, flags;
- struct sockaddr *dst, *gateway, *netmask;
- struct rtentry **ret_nrt;
-{
- int s = splnet(); int error = 0;
- register struct rtentry *rt;
- register struct radix_node *rn;
- register struct radix_node_head *rnh;
- struct ifaddr *ifa;
- struct sockaddr *ndst;
-#define senderr(x) { error = x ; goto bad; }
-
- /*
- * Find the correct routing tree to use for this Address Family
- */
- if ((rnh = rt_tables[dst->sa_family]) == 0)
- senderr(ESRCH);
- /*
- * If we are adding a host route then we don't want to put
- * a netmask in the tree
- */
- if (flags & RTF_HOST)
- netmask = 0;
- switch (req) {
- case RTM_DELETE:
- /*
- * Remove the item from the tree and return it.
- * Complain if it is not there and do no more processing.
- */
- if ((rn = rnh->rnh_deladdr(dst, netmask, rnh)) == 0)
- senderr(ESRCH);
- if (rn->rn_flags & (RNF_ACTIVE | RNF_ROOT))
- panic ("rtrequest delete");
- rt = (struct rtentry *)rn;
-
- /*
- * Now search what's left of the subtree for any cloned
- * routes which might have been formed from this node.
- */
- if ((rt->rt_flags & RTF_PRCLONING) && netmask) {
- rnh->rnh_walktree_from(rnh, dst, netmask,
- rt_fixdelete, rt);
- }
-
- /*
- * Remove any external references we may have.
- * This might result in another rtentry being freed if
- * we held it's last reference.
- */
- if (rt->rt_gwroute) {
- rt = rt->rt_gwroute;
- RTFREE(rt);
- (rt = (struct rtentry *)rn)->rt_gwroute = 0;
- }
-
- /*
- * NB: RTF_UP must be set during the search above,
- * because we might delete the last ref, causing
- * rt to get freed prematurely.
- */
- rt->rt_flags &= ~RTF_UP;
-
- /*
- * If there is llinfo or similar associated with the
- * route, give the interface a chance to deal with it..
- */
- if ((ifa = rt->rt_ifa) && ifa->ifa_rtrequest)
- ifa->ifa_rtrequest(RTM_DELETE, rt, SA(0));
- rttrash++;
- /*
- * If the caller wants it, then it can have it, but it's up to it
- * to free the rtentry as we won't be doing it.
- */
- if (ret_nrt)
- *ret_nrt = rt;
- else if (rt->rt_refcnt <= 0) {
- rt->rt_refcnt++; /* make a 1->0 transition */
- rtfree(rt);
- }
- break;
-
- case RTM_RESOLVE:
- if (ret_nrt == 0 || (rt = *ret_nrt) == 0)
- senderr(EINVAL);
- ifa = rt->rt_ifa;
- flags = rt->rt_flags &
- ~(RTF_CLONING | RTF_PRCLONING | RTF_STATIC);
- flags |= RTF_WASCLONED;
- gateway = rt->rt_gateway;
- if ((netmask = rt->rt_genmask) == 0)
- flags |= RTF_HOST;
- goto makeroute;
-
- case RTM_ADD:
- if ((flags & RTF_GATEWAY) && !gateway)
- panic("rtrequest: GATEWAY but no gateway");
-
- if ((ifa = ifa_ifwithroute(flags, dst, gateway)) == 0)
- senderr(ENETUNREACH);
-
- makeroute:
- R_Malloc(rt, struct rtentry *, sizeof(*rt));
- if (rt == 0)
- senderr(ENOBUFS);
- Bzero(rt, sizeof(*rt));
- rt->rt_flags = RTF_UP | flags;
- if ((error = rt_setgate(rt, dst, gateway))) {
- Free(rt);
- senderr(error);
- }
- ndst = rt_key(rt);
- if (netmask) {
- rt_maskedcopy(dst, ndst, netmask);
- } else
- Bcopy(dst, ndst, dst->sa_len);
-
- /*
- * This moved from below so that rnh->rnh_addaddr() can
- * examine the ifa and ifp if it so desires.
- */
- ifa->ifa_refcnt++;
- rt->rt_ifa = ifa;
- rt->rt_ifp = ifa->ifa_ifp;
-
- rn = rnh->rnh_addaddr((caddr_t)ndst, (caddr_t)netmask,
- rnh, rt->rt_nodes);
- if (rn == 0) {
- struct rtentry *rt2;
- /*
- * Uh-oh, we already have one of these in the tree.
- * We do a special hack: if the route that's already
- * there was generated by the protocol-cloning
- * mechanism, then we just blow it away and retry
- * the insertion of the new one.
- */
- rt2 = rtalloc1(dst, 0, RTF_PRCLONING);
- if (rt2 && rt2->rt_parent) {
- rtrequest(RTM_DELETE,
- (struct sockaddr *)rt_key(rt2),
- rt2->rt_gateway,
- rt_mask(rt2), rt2->rt_flags, 0);
- RTFREE(rt2);
- rn = rnh->rnh_addaddr((caddr_t)ndst,
- (caddr_t)netmask,
- rnh, rt->rt_nodes);
- } else if (rt2) {
- RTFREE(rt2);
- }
- }
-
- if (rn == 0) {
- if (rt->rt_gwroute)
- rtfree(rt->rt_gwroute);
- if (rt->rt_ifa) {
- IFAFREE(rt->rt_ifa);
- }
- Free(rt_key(rt));
- Free(rt);
- senderr(EEXIST);
- }
- rt->rt_parent = 0;
-
- if (req == RTM_RESOLVE) {
- rt->rt_rmx = (*ret_nrt)->rt_rmx; /* copy metrics */
- if ((*ret_nrt)->rt_flags & RTF_PRCLONING) {
- rt->rt_parent = (*ret_nrt);
- (*ret_nrt)->rt_refcnt++;
- }
- }
- if (ifa->ifa_rtrequest)
- ifa->ifa_rtrequest(req, rt, SA(ret_nrt ? *ret_nrt : 0));
- /*
- * We repeat the same procedure from rt_setgate() here because
- * it doesn't fire when we call it there because the node
- * hasn't been added to the tree yet.
- */
- if (!(rt->rt_flags & RTF_HOST) && rt_mask(rt) != 0) {
- struct rtfc_arg arg;
- arg.rnh = rnh;
- arg.rt0 = rt;
- rnh->rnh_walktree_from(rnh, rt_key(rt), rt_mask(rt),
- rt_fixchange, &arg);
- }
-
- if (ret_nrt) {
- *ret_nrt = rt;
- rt->rt_refcnt++;
- }
- break;
- }
-bad:
- splx(s);
- return (error);
-}
-
-/*
- * Called from rtrequest(RTM_DELETE, ...) to fix up the route's ``family''
- * (i.e., the routes related to it by the operation of cloning). This
- * routine is iterated over all potential former-child-routes by way of
- * rnh->rnh_walktree_from() above, and those that actually are children of
- * the late parent (passed in as VP here) are themselves deleted.
- */
-static int
-rt_fixdelete(struct radix_node *rn, void *vp)
-{
- struct rtentry *rt = (struct rtentry *)rn;
- struct rtentry *rt0 = vp;
-
- if (rt->rt_parent == rt0 && !(rt->rt_flags & RTF_PINNED)) {
- return rtrequest(RTM_DELETE, rt_key(rt),
- (struct sockaddr *)0, rt_mask(rt),
- rt->rt_flags, (struct rtentry **)0);
- }
- return 0;
-}
-
-/*
- * This routine is called from rt_setgate() to do the analogous thing for
- * adds and changes. There is the added complication in this case of a
- * middle insert; i.e., insertion of a new network route between an older
- * network route and (cloned) host routes. For this reason, a simple check
- * of rt->rt_parent is insufficient; each candidate route must be tested
- * against the (mask, value) of the new route (passed as before in vp)
- * to see if the new route matches it. Unfortunately, this has the obnoxious
- * property of also triggering for insertion /above/ a pre-existing network
- * route and clones. Sigh. This may be fixed some day.
- *
- * XXX - it may be possible to do fixdelete() for changes and reserve this
- * routine just for adds. I'm not sure why I thought it was necessary to do
- * changes this way.
- */
-#ifdef DEBUG
-int rtfcdebug = 0;
-#endif
-
-static int
-rt_fixchange(struct radix_node *rn, void *vp)
-{
- struct rtentry *rt = (struct rtentry *)rn;
- struct rtfc_arg *ap = vp;
- struct rtentry *rt0 = ap->rt0;
- struct radix_node_head *rnh = ap->rnh;
- u_char *xk1, *xm1, *xk2;
- int i, len;
-
-#ifdef DEBUG
- if (rtfcdebug)
- printf("rt_fixchange: rt %p, rt0 %p\n", rt, rt0);
-#endif
-
- if (!rt->rt_parent || (rt->rt_flags & RTF_PINNED)) {
-#ifdef DEBUG
- if(rtfcdebug) printf("no parent or pinned\n");
-#endif
- return 0;
- }
-
- if (rt->rt_parent == rt0) {
-#ifdef DEBUG
- if(rtfcdebug) printf("parent match\n");
-#endif
- return rtrequest(RTM_DELETE, rt_key(rt),
- (struct sockaddr *)0, rt_mask(rt),
- rt->rt_flags, (struct rtentry **)0);
- }
-
- /*
- * There probably is a function somewhere which does this...
- * if not, there should be.
- */
- len = imin(((struct sockaddr *)rt_key(rt0))->sa_len,
- ((struct sockaddr *)rt_key(rt))->sa_len);
-
- xk1 = (u_char *)rt_key(rt0);
- xm1 = (u_char *)rt_mask(rt0);
- xk2 = (u_char *)rt_key(rt);
-
- for (i = rnh->rnh_treetop->rn_off; i < len; i++) {
- if ((xk2[i] & xm1[i]) != xk1[i]) {
-#ifdef DEBUG
- if(rtfcdebug) printf("no match\n");
-#endif
- return 0;
- }
- }
-
- /*
- * OK, this node is a clone, and matches the node currently being
- * changed/added under the node's mask. So, get rid of it.
- */
-#ifdef DEBUG
- if(rtfcdebug) printf("deleting\n");
-#endif
- return rtrequest(RTM_DELETE, rt_key(rt), (struct sockaddr *)0,
- rt_mask(rt), rt->rt_flags, (struct rtentry **)0);
-}
-
-int
-rt_setgate(rt0, dst, gate)
- struct rtentry *rt0;
- struct sockaddr *dst, *gate;
-{
- caddr_t new, old;
- int dlen = ROUNDUP(dst->sa_len), glen = ROUNDUP(gate->sa_len);
- register struct rtentry *rt = rt0;
- struct radix_node_head *rnh = rt_tables[dst->sa_family];
-
- /*
- * A host route with the destination equal to the gateway
- * will interfere with keeping LLINFO in the routing
- * table, so disallow it.
- */
- if (((rt0->rt_flags & (RTF_HOST|RTF_GATEWAY|RTF_LLINFO)) ==
- (RTF_HOST|RTF_GATEWAY)) &&
- (dst->sa_len == gate->sa_len) &&
- (bcmp(dst, gate, dst->sa_len) == 0)) {
- /*
- * The route might already exist if this is an RTM_CHANGE
- * or a routing redirect, so try to delete it.
- */
- if (rt_key(rt0))
- rtrequest(RTM_DELETE, (struct sockaddr *)rt_key(rt0),
- rt0->rt_gateway, rt_mask(rt0), rt0->rt_flags, 0);
- return EADDRNOTAVAIL;
- }
-
- if (rt->rt_gateway == 0 || glen > ROUNDUP(rt->rt_gateway->sa_len)) {
- old = (caddr_t)rt_key(rt);
- R_Malloc(new, caddr_t, dlen + glen);
- if (new == 0)
- return ENOBUFS;
- rt->rt_nodes->rn_key = new;
- } else {
- new = rt->rt_nodes->rn_key;
- old = 0;
- }
- Bcopy(gate, (rt->rt_gateway = (struct sockaddr *)(new + dlen)), glen);
- if (old) {
- Bcopy(dst, new, dlen);
- Free(old);
- }
- if (rt->rt_gwroute) {
- rt = rt->rt_gwroute; RTFREE(rt);
- rt = rt0; rt->rt_gwroute = 0;
- }
- /*
- * Cloning loop avoidance:
- * In the presence of protocol-cloning and bad configuration,
- * it is possible to get stuck in bottomless mutual recursion
- * (rtrequest rt_setgate rtalloc1). We avoid this by not allowing
- * protocol-cloning to operate for gateways (which is probably the
- * correct choice anyway), and avoid the resulting reference loops
- * by disallowing any route to run through itself as a gateway.
- * This is obviuosly mandatory when we get rt->rt_output().
- */
- if (rt->rt_flags & RTF_GATEWAY) {
- rt->rt_gwroute = rtalloc1(gate, 1, RTF_PRCLONING);
- if (rt->rt_gwroute == rt) {
- RTFREE(rt->rt_gwroute);
- rt->rt_gwroute = 0;
- return EDQUOT; /* failure */
- }
- }
-
- /*
- * This isn't going to do anything useful for host routes, so
- * don't bother. Also make sure we have a reasonable mask
- * (we don't yet have one during adds).
- */
- if (!(rt->rt_flags & RTF_HOST) && rt_mask(rt) != 0) {
- struct rtfc_arg arg;
- arg.rnh = rnh;
- arg.rt0 = rt;
- rnh->rnh_walktree_from(rnh, rt_key(rt), rt_mask(rt),
- rt_fixchange, &arg);
- }
-
- return 0;
-}
-
-static void
-rt_maskedcopy(src, dst, netmask)
- struct sockaddr *src, *dst, *netmask;
-{
- register u_char *cp1 = (u_char *)src;
- register u_char *cp2 = (u_char *)dst;
- register u_char *cp3 = (u_char *)netmask;
- u_char *cplim = cp2 + *cp3;
- u_char *cplim2 = cp2 + *cp1;
-
- *cp2++ = *cp1++; *cp2++ = *cp1++; /* copies sa_len & sa_family */
- cp3 += 2;
- if (cplim > cplim2)
- cplim = cplim2;
- while (cp2 < cplim)
- *cp2++ = *cp1++ & *cp3++;
- if (cp2 < cplim2)
- bzero((caddr_t)cp2, (unsigned)(cplim2 - cp2));
-}
-
-/*
- * Set up a routing table entry, normally
- * for an interface.
- */
-int
-rtinit(ifa, cmd, flags)
- register struct ifaddr *ifa;
- int cmd, flags;
-{
- register struct rtentry *rt;
- register struct sockaddr *dst;
- register struct sockaddr *deldst;
- struct mbuf *m = 0;
- struct rtentry *nrt = 0;
- int error;
-
- dst = flags & RTF_HOST ? ifa->ifa_dstaddr : ifa->ifa_addr;
- /*
- * If it's a delete, check that if it exists, it's on the correct
- * interface or we might scrub a route to another ifa which would
- * be confusing at best and possibly worse.
- */
- if (cmd == RTM_DELETE) {
- /*
- * It's a delete, so it should already exist..
- * If it's a net, mask off the host bits
- * (Assuming we have a mask)
- */
- if ((flags & RTF_HOST) == 0 && ifa->ifa_netmask) {
- m = m_get(M_WAIT, MT_SONAME);
- deldst = mtod(m, struct sockaddr *);
- rt_maskedcopy(dst, deldst, ifa->ifa_netmask);
- dst = deldst;
- }
- /*
- * Get an rtentry that is in the routing tree and
- * contains the correct info. (if this fails we can't get there).
- * We set "report" to FALSE so that if it doesn't exist,
- * it doesn't report an error or clone a route, etc. etc.
- */
- rt = rtalloc1(dst, 0, 0UL);
- if (rt) {
- /*
- * Ok so we found the rtentry. it has an extra reference
- * for us at this stage. we won't need that so
- * lop that off now.
- */
- rt->rt_refcnt--;
- if (rt->rt_ifa != ifa) {
- /*
- * If the interface in the rtentry doesn't match
- * the interface we are using, then we don't
- * want to delete it, so return an error.
- * This seems to be the only point of
- * this whole RTM_DELETE clause.
- */
- if (m)
- (void) m_free(m);
- return (flags & RTF_HOST ? EHOSTUNREACH
- : ENETUNREACH);
- }
- }
- /* XXX */
-#if 0
- else {
- /*
- * One would think that as we are deleting, and we know
- * it doesn't exist, we could just return at this point
- * with an "ELSE" clause, but apparently not..
- */
- return (flags & RTF_HOST ? EHOSTUNREACH
- : ENETUNREACH);
- }
-#endif
- }
- /*
- * Do the actual request
- */
- error = rtrequest(cmd, dst, ifa->ifa_addr, ifa->ifa_netmask,
- flags | ifa->ifa_flags, &nrt);
- if (m)
- (void) m_free(m);
- /*
- * If we are deleting, and we found an entry, then
- * it's been removed from the tree.. now throw it away.
- */
- if (cmd == RTM_DELETE && error == 0 && (rt = nrt)) {
- /*
- * notify any listenning routing agents of the change
- */
- rt_newaddrmsg(cmd, ifa, error, nrt);
- if (rt->rt_refcnt <= 0) {
- rt->rt_refcnt++; /* need a 1->0 transition to free */
- rtfree(rt);
- }
- }
-
- /*
- * We are adding, and we have a returned routing entry.
- * We need to sanity check the result.
- */
- if (cmd == RTM_ADD && error == 0 && (rt = nrt)) {
- /*
- * We just wanted to add it.. we don't actually need a reference
- */
- rt->rt_refcnt--;
- /*
- * If it came back with an unexpected interface, then it must
- * have already existed or something. (XXX)
- */
- if (rt->rt_ifa != ifa) {
- printf("rtinit: wrong ifa (%p) was (%p)\n", ifa,
- rt->rt_ifa);
- /*
- * Ask that the route we got back be removed
- * from the routing tables as we are trying
- * to supersede it.
- */
- if (rt->rt_ifa->ifa_rtrequest)
- rt->rt_ifa->ifa_rtrequest(RTM_DELETE, rt, SA(0));
- /*
- * Remove the referenve to the it's ifaddr.
- */
- IFAFREE(rt->rt_ifa);
- /*
- * And substitute in references to the ifaddr
- * we are adding.
- */
- rt->rt_ifa = ifa;
- rt->rt_ifp = ifa->ifa_ifp;
- ifa->ifa_refcnt++;
- /*
- * Now add it to the routing table
- * XXX could we have just left it?
- * as it might have been in the right place..
- */
- if (ifa->ifa_rtrequest)
- ifa->ifa_rtrequest(RTM_ADD, rt, SA(0));
- }
- /*
- * notify any listenning routing agents of the change
- */
- rt_newaddrmsg(cmd, ifa, error, nrt);
- }
- return (error);
-}
diff --git a/c/src/exec/libnetworking/net/route.h b/c/src/exec/libnetworking/net/route.h
deleted file mode 100644
index 6099b424c3..0000000000
--- a/c/src/exec/libnetworking/net/route.h
+++ /dev/null
@@ -1,286 +0,0 @@
-/*
- * Copyright (c) 1980, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)route.h 8.3 (Berkeley) 4/19/94
- * $Id$
- */
-
-#ifndef _NET_ROUTE_H_
-#define _NET_ROUTE_H_
-
-/*
- * Kernel resident routing tables.
- *
- * The routing tables are initialized when interface addresses
- * are set by making entries for all directly connected interfaces.
- */
-
-/*
- * A route consists of a destination address and a reference
- * to a routing entry. These are often held by protocols
- * in their control blocks, e.g. inpcb.
- */
-struct route {
- struct rtentry *ro_rt;
- struct sockaddr ro_dst;
-};
-
-/*
- * These numbers are used by reliable protocols for determining
- * retransmission behavior and are included in the routing structure.
- */
-struct rt_metrics {
- u_long rmx_locks; /* Kernel must leave these values alone */
- u_long rmx_mtu; /* MTU for this path */
- u_long rmx_hopcount; /* max hops expected */
- u_long rmx_expire; /* lifetime for route, e.g. redirect */
- u_long rmx_recvpipe; /* inbound delay-bandwidth product */
- u_long rmx_sendpipe; /* outbound delay-bandwidth product */
- u_long rmx_ssthresh; /* outbound gateway buffer limit */
- u_long rmx_rtt; /* estimated round trip time */
- u_long rmx_rttvar; /* estimated rtt variance */
- u_long rmx_pksent; /* packets sent using this route */
- u_long rmx_filler[4]; /* will be used for T/TCP later */
-};
-
-/*
- * rmx_rtt and rmx_rttvar are stored as microseconds;
- * RTTTOPRHZ(rtt) converts to a value suitable for use
- * by a protocol slowtimo counter.
- */
-#define RTM_RTTUNIT 1000000 /* units for rtt, rttvar, as units per sec */
-#define RTTTOPRHZ(r) ((r) / (RTM_RTTUNIT / PR_SLOWHZ))
-
-/*
- * XXX kernel function pointer `rt_output' is visible to applications.
- */
-struct mbuf;
-
-/*
- * We distinguish between routes to hosts and routes to networks,
- * preferring the former if available. For each route we infer
- * the interface to use from the gateway address supplied when
- * the route was entered. Routes that forward packets through
- * gateways are marked so that the output routines know to address the
- * gateway rather than the ultimate destination.
- */
-#ifndef RNF_NORMAL
-#include <net/radix.h>
-#endif
-struct rtentry {
- struct radix_node rt_nodes[2]; /* tree glue, and other values */
-#define rt_key(r) ((struct sockaddr *)((r)->rt_nodes->rn_key))
-#define rt_mask(r) ((struct sockaddr *)((r)->rt_nodes->rn_mask))
- struct sockaddr *rt_gateway; /* value */
- short rt_filler; /* was short flags field */
- short rt_refcnt; /* # held references */
- u_long rt_flags; /* up/down?, host/net */
- struct ifnet *rt_ifp; /* the answer: interface to use */
- struct ifaddr *rt_ifa; /* the answer: interface to use */
- struct sockaddr *rt_genmask; /* for generation of cloned routes */
- caddr_t rt_llinfo; /* pointer to link level info cache */
- struct rt_metrics rt_rmx; /* metrics used by rx'ing protocols */
- struct rtentry *rt_gwroute; /* implied entry for gatewayed routes */
- int (*rt_output) __P((struct ifnet *, struct mbuf *,
- struct sockaddr *, struct rtentry *));
- /* output routine for this (rt,if) */
- struct rtentry *rt_parent; /* cloning parent of this route */
- void *rt_filler2; /* more filler */
-};
-
-/*
- * Following structure necessary for 4.3 compatibility;
- * We should eventually move it to a compat file.
- */
-struct ortentry {
- u_long rt_hash; /* to speed lookups */
- struct sockaddr rt_dst; /* key */
- struct sockaddr rt_gateway; /* value */
- short rt_flags; /* up/down?, host/net */
- short rt_refcnt; /* # held references */
- u_long rt_use; /* raw # packets forwarded */
- struct ifnet *rt_ifp; /* the answer: interface to use */
-};
-
-#define rt_use rt_rmx.rmx_pksent
-
-#define RTF_UP 0x1 /* route usable */
-#define RTF_GATEWAY 0x2 /* destination is a gateway */
-#define RTF_HOST 0x4 /* host entry (net otherwise) */
-#define RTF_REJECT 0x8 /* host or net unreachable */
-#define RTF_DYNAMIC 0x10 /* created dynamically (by redirect) */
-#define RTF_MODIFIED 0x20 /* modified dynamically (by redirect) */
-#define RTF_DONE 0x40 /* message confirmed */
-/* 0x80 unused */
-#define RTF_CLONING 0x100 /* generate new routes on use */
-#define RTF_XRESOLVE 0x200 /* external daemon resolves name */
-#define RTF_LLINFO 0x400 /* generated by link layer (e.g. ARP) */
-#define RTF_STATIC 0x800 /* manually added */
-#define RTF_BLACKHOLE 0x1000 /* just discard pkts (during updates) */
-#define RTF_PROTO2 0x4000 /* protocol specific routing flag */
-#define RTF_PROTO1 0x8000 /* protocol specific routing flag */
-
-#define RTF_PRCLONING 0x10000 /* protocol requires cloning */
-#define RTF_WASCLONED 0x20000 /* route generated through cloning */
-#define RTF_PROTO3 0x40000 /* protocol specific routing flag */
-/* 0x80000 unused */
-#define RTF_PINNED 0x100000 /* future use */
-#define RTF_LOCAL 0x200000 /* route represents a local address */
-#define RTF_BROADCAST 0x400000 /* route represents a bcast address */
-#define RTF_MULTICAST 0x800000 /* route represents a mcast address */
- /* 0x1000000 and up unassigned */
-
-/*
- * Routing statistics.
- */
-struct rtstat {
- short rts_badredirect; /* bogus redirect calls */
- short rts_dynamic; /* routes created by redirects */
- short rts_newgateway; /* routes modified by redirects */
- short rts_unreach; /* lookups which failed */
- short rts_wildcard; /* lookups satisfied by a wildcard */
-};
-/*
- * Structures for routing messages.
- */
-struct rt_msghdr {
- u_short rtm_msglen; /* to skip over non-understood messages */
- u_char rtm_version; /* future binary compatibility */
- u_char rtm_type; /* message type */
- u_short rtm_index; /* index for associated ifp */
- int rtm_flags; /* flags, incl. kern & message, e.g. DONE */
- int rtm_addrs; /* bitmask identifying sockaddrs in msg */
- pid_t rtm_pid; /* identify sender */
- int rtm_seq; /* for sender to identify action */
- int rtm_errno; /* why failed */
- int rtm_use; /* from rtentry */
- u_long rtm_inits; /* which metrics we are initializing */
- struct rt_metrics rtm_rmx; /* metrics themselves */
-};
-
-#define RTM_VERSION 5 /* Up the ante and ignore older versions */
-
-#define RTM_ADD 0x1 /* Add Route */
-#define RTM_DELETE 0x2 /* Delete Route */
-#define RTM_CHANGE 0x3 /* Change Metrics or flags */
-#define RTM_GET 0x4 /* Report Metrics */
-#define RTM_LOSING 0x5 /* Kernel Suspects Partitioning */
-#define RTM_REDIRECT 0x6 /* Told to use different route */
-#define RTM_MISS 0x7 /* Lookup failed on this address */
-#define RTM_LOCK 0x8 /* fix specified metrics */
-#define RTM_OLDADD 0x9 /* caused by SIOCADDRT */
-#define RTM_OLDDEL 0xa /* caused by SIOCDELRT */
-#define RTM_RESOLVE 0xb /* req to resolve dst to LL addr */
-#define RTM_NEWADDR 0xc /* address being added to iface */
-#define RTM_DELADDR 0xd /* address being removed from iface */
-#define RTM_IFINFO 0xe /* iface going up/down etc. */
-
-#define RTV_MTU 0x1 /* init or lock _mtu */
-#define RTV_HOPCOUNT 0x2 /* init or lock _hopcount */
-#define RTV_EXPIRE 0x4 /* init or lock _hopcount */
-#define RTV_RPIPE 0x8 /* init or lock _recvpipe */
-#define RTV_SPIPE 0x10 /* init or lock _sendpipe */
-#define RTV_SSTHRESH 0x20 /* init or lock _ssthresh */
-#define RTV_RTT 0x40 /* init or lock _rtt */
-#define RTV_RTTVAR 0x80 /* init or lock _rttvar */
-
-/*
- * Bitmask values for rtm_addr.
- */
-#define RTA_DST 0x1 /* destination sockaddr present */
-#define RTA_GATEWAY 0x2 /* gateway sockaddr present */
-#define RTA_NETMASK 0x4 /* netmask sockaddr present */
-#define RTA_GENMASK 0x8 /* cloning mask sockaddr present */
-#define RTA_IFP 0x10 /* interface name sockaddr present */
-#define RTA_IFA 0x20 /* interface addr sockaddr present */
-#define RTA_AUTHOR 0x40 /* sockaddr for author of redirect */
-#define RTA_BRD 0x80 /* for NEWADDR, broadcast or p-p dest addr */
-
-/*
- * Index offsets for sockaddr array for alternate internal encoding.
- */
-#define RTAX_DST 0 /* destination sockaddr present */
-#define RTAX_GATEWAY 1 /* gateway sockaddr present */
-#define RTAX_NETMASK 2 /* netmask sockaddr present */
-#define RTAX_GENMASK 3 /* cloning mask sockaddr present */
-#define RTAX_IFP 4 /* interface name sockaddr present */
-#define RTAX_IFA 5 /* interface addr sockaddr present */
-#define RTAX_AUTHOR 6 /* sockaddr for author of redirect */
-#define RTAX_BRD 7 /* for NEWADDR, broadcast or p-p dest addr */
-#define RTAX_MAX 8 /* size of array to allocate */
-
-struct rt_addrinfo {
- int rti_addrs;
- struct sockaddr *rti_info[RTAX_MAX];
-};
-
-struct route_cb {
- int ip_count;
- int ipx_count;
- int ns_count;
- int iso_count;
- int any_count;
-};
-
-#ifdef KERNEL
-#define RTFREE(rt) \
- do { \
- if ((rt)->rt_refcnt <= 1) \
- rtfree(rt); \
- else \
- (rt)->rt_refcnt--; \
- } while (0)
-
-extern struct route_cb route_cb;
-extern struct rtstat rtstat;
-extern struct radix_node_head *rt_tables[AF_MAX+1];
-
-void route_init __P((void));
-void rt_ifmsg __P((struct ifnet *));
-void rt_missmsg __P((int, struct rt_addrinfo *, int, int));
-void rt_newaddrmsg __P((int, struct ifaddr *, int, struct rtentry *));
-int rt_setgate __P((struct rtentry *,
- struct sockaddr *, struct sockaddr *));
-void rtalloc __P((struct route *));
-void rtalloc_ign __P((struct route *, unsigned long));
-struct rtentry *
- rtalloc1 __P((struct sockaddr *, int, unsigned long));
-void rtfree __P((struct rtentry *));
-int rtinit __P((struct ifaddr *, int, int));
-int rtioctl __P((int, caddr_t, struct proc *));
-void rtredirect __P((struct sockaddr *, struct sockaddr *,
- struct sockaddr *, int, struct sockaddr *, struct rtentry **));
-int rtrequest __P((int, struct sockaddr *,
- struct sockaddr *, struct sockaddr *, int, struct rtentry **));
-#endif
-
-#endif
diff --git a/c/src/exec/libnetworking/net/rtsock.c b/c/src/exec/libnetworking/net/rtsock.c
deleted file mode 100644
index 57e777906a..0000000000
--- a/c/src/exec/libnetworking/net/rtsock.c
+++ /dev/null
@@ -1,829 +0,0 @@
-/*
- * Copyright (c) 1988, 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)rtsock.c 8.5 (Berkeley) 11/2/94
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/sysctl.h>
-#include <sys/proc.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/domain.h>
-#include <sys/protosw.h>
-
-#include <net/if.h>
-#include <net/route.h>
-#include <net/raw_cb.h>
-
-static struct sockaddr route_dst = { 2, PF_ROUTE, };
-static struct sockaddr route_src = { 2, PF_ROUTE, };
-static struct sockaddr sa_zero = { sizeof(sa_zero), AF_INET, };
-static struct sockproto route_proto = { PF_ROUTE, };
-
-struct walkarg {
- int w_tmemsize;
- int w_op, w_arg;
- caddr_t w_tmem;
- struct sysctl_req *w_req;
-};
-
-static struct mbuf *
- rt_msg1 __P((int, struct rt_addrinfo *));
-static int rt_msg2 __P((int,
- struct rt_addrinfo *, caddr_t, struct walkarg *));
-static int rt_xaddrs __P((caddr_t, caddr_t, struct rt_addrinfo *));
-static int sysctl_dumpentry __P((struct radix_node *rn, void *vw));
-static int sysctl_iflist __P((int af, struct walkarg *w));
-static int route_output __P((struct mbuf *, struct socket *));
-static int route_usrreq __P((struct socket *,
- int, struct mbuf *, struct mbuf *, struct mbuf *));
-static void rt_setmetrics __P((u_long, struct rt_metrics *, struct rt_metrics *));
-
-/* Sleazy use of local variables throughout file, warning!!!! */
-#define dst info.rti_info[RTAX_DST]
-#define gate info.rti_info[RTAX_GATEWAY]
-#define netmask info.rti_info[RTAX_NETMASK]
-#define genmask info.rti_info[RTAX_GENMASK]
-#define ifpaddr info.rti_info[RTAX_IFP]
-#define ifaaddr info.rti_info[RTAX_IFA]
-#define brdaddr info.rti_info[RTAX_BRD]
-
-/*ARGSUSED*/
-static int
-route_usrreq(so, req, m, nam, control)
- register struct socket *so;
- int req;
- struct mbuf *m, *nam, *control;
-{
- register int error = 0;
- register struct rawcb *rp = sotorawcb(so);
- int s;
-
- if (req == PRU_ATTACH) {
- MALLOC(rp, struct rawcb *, sizeof(*rp), M_PCB, M_WAITOK);
- so->so_pcb = (caddr_t)rp;
- if (so->so_pcb)
- bzero(so->so_pcb, sizeof(*rp));
- }
- if (req == PRU_DETACH && rp) {
- int af = rp->rcb_proto.sp_protocol;
- if (af == AF_INET)
- route_cb.ip_count--;
- else if (af == AF_IPX)
- route_cb.ipx_count--;
- else if (af == AF_NS)
- route_cb.ns_count--;
- else if (af == AF_ISO)
- route_cb.iso_count--;
- route_cb.any_count--;
- }
- s = splnet();
- error = raw_usrreq(so, req, m, nam, control);
- rp = sotorawcb(so);
- if (req == PRU_ATTACH && rp) {
- int af = rp->rcb_proto.sp_protocol;
- if (error) {
- free((caddr_t)rp, M_PCB);
- splx(s);
- return (error);
- }
- if (af == AF_INET)
- route_cb.ip_count++;
- else if (af == AF_IPX)
- route_cb.ipx_count++;
- else if (af == AF_NS)
- route_cb.ns_count++;
- else if (af == AF_ISO)
- route_cb.iso_count++;
- rp->rcb_faddr = &route_src;
- route_cb.any_count++;
- soisconnected(so);
- so->so_options |= SO_USELOOPBACK;
- }
- splx(s);
- return (error);
-}
-
-/*ARGSUSED*/
-static int
-route_output(m, so)
- register struct mbuf *m;
- struct socket *so;
-{
- register struct rt_msghdr *rtm = 0;
- register struct rtentry *rt = 0;
- struct rtentry *saved_nrt = 0;
- struct radix_node_head *rnh;
- struct rt_addrinfo info;
- int len, error = 0;
- struct ifnet *ifp = 0;
- struct ifaddr *ifa = 0;
-
-#define senderr(e) { error = e; goto flush;}
- if (m == 0 || ((m->m_len < sizeof(long)) &&
- (m = m_pullup(m, sizeof(long))) == 0))
- return (ENOBUFS);
- if ((m->m_flags & M_PKTHDR) == 0)
- panic("route_output");
- len = m->m_pkthdr.len;
- if (len < sizeof(*rtm) ||
- len != mtod(m, struct rt_msghdr *)->rtm_msglen) {
- dst = 0;
- senderr(EINVAL);
- }
- R_Malloc(rtm, struct rt_msghdr *, len);
- if (rtm == 0) {
- dst = 0;
- senderr(ENOBUFS);
- }
- m_copydata(m, 0, len, (caddr_t)rtm);
- if (rtm->rtm_version != RTM_VERSION) {
- dst = 0;
- senderr(EPROTONOSUPPORT);
- }
- info.rti_addrs = rtm->rtm_addrs;
- if (rt_xaddrs((caddr_t)(rtm + 1), len + (caddr_t)rtm, &info)) {
- dst = 0;
- senderr(EINVAL);
- }
- if (dst == 0 || (dst->sa_family >= AF_MAX)
- || (gate != 0 && (gate->sa_family >= AF_MAX)))
- senderr(EINVAL);
- if (genmask) {
- struct radix_node *t;
- t = rn_addmask((caddr_t)genmask, 0, 1);
- if (t && Bcmp(genmask, t->rn_key, *(u_char *)genmask) == 0)
- genmask = (struct sockaddr *)(t->rn_key);
- else
- senderr(ENOBUFS);
- }
- switch (rtm->rtm_type) {
-
- case RTM_ADD:
- if (gate == 0)
- senderr(EINVAL);
- error = rtrequest(RTM_ADD, dst, gate, netmask,
- rtm->rtm_flags, &saved_nrt);
- if (error == 0 && saved_nrt) {
- rt_setmetrics(rtm->rtm_inits,
- &rtm->rtm_rmx, &saved_nrt->rt_rmx);
- saved_nrt->rt_rmx.rmx_locks &= ~(rtm->rtm_inits);
- saved_nrt->rt_rmx.rmx_locks |=
- (rtm->rtm_inits & rtm->rtm_rmx.rmx_locks);
- saved_nrt->rt_refcnt--;
- saved_nrt->rt_genmask = genmask;
- }
- break;
-
- case RTM_DELETE:
- error = rtrequest(RTM_DELETE, dst, gate, netmask,
- rtm->rtm_flags, &saved_nrt);
- if (error == 0) {
- if ((rt = saved_nrt))
- rt->rt_refcnt++;
- goto report;
- }
- break;
-
- case RTM_GET:
- case RTM_CHANGE:
- case RTM_LOCK:
- if ((rnh = rt_tables[dst->sa_family]) == 0) {
- senderr(EAFNOSUPPORT);
- } else if ((rt = (struct rtentry *)
- rnh->rnh_lookup(dst, netmask, rnh)))
- rt->rt_refcnt++;
- else
- senderr(ESRCH);
- switch(rtm->rtm_type) {
-
- case RTM_GET:
- report:
- dst = rt_key(rt);
- gate = rt->rt_gateway;
- netmask = rt_mask(rt);
- genmask = rt->rt_genmask;
- if (rtm->rtm_addrs & (RTA_IFP | RTA_IFA)) {
- ifp = rt->rt_ifp;
- if (ifp) {
- ifpaddr = ifp->if_addrlist->ifa_addr;
- ifaaddr = rt->rt_ifa->ifa_addr;
- rtm->rtm_index = ifp->if_index;
- } else {
- ifpaddr = 0;
- ifaaddr = 0;
- }
- }
- len = rt_msg2(rtm->rtm_type, &info, (caddr_t)0,
- (struct walkarg *)0);
- if (len > rtm->rtm_msglen) {
- struct rt_msghdr *new_rtm;
- R_Malloc(new_rtm, struct rt_msghdr *, len);
- if (new_rtm == 0)
- senderr(ENOBUFS);
- Bcopy(rtm, new_rtm, rtm->rtm_msglen);
- Free(rtm); rtm = new_rtm;
- }
- (void)rt_msg2(rtm->rtm_type, &info, (caddr_t)rtm,
- (struct walkarg *)0);
- rtm->rtm_flags = rt->rt_flags;
- rtm->rtm_rmx = rt->rt_rmx;
- rtm->rtm_addrs = info.rti_addrs;
- break;
-
- case RTM_CHANGE:
- if (gate && (error = rt_setgate(rt, rt_key(rt), gate)))
- senderr(error);
-
- /*
- * If they tried to change things but didn't specify
- * the required gateway, then just use the old one.
- * This can happen if the user tries to change the
- * flags on the default route without changing the
- * default gateway. Changing flags still doesn't work.
- */
- if ((rt->rt_flags & RTF_GATEWAY) && !gate)
- gate = rt->rt_gateway;
-
- /* new gateway could require new ifaddr, ifp;
- flags may also be different; ifp may be specified
- by ll sockaddr when protocol address is ambiguous */
- if (ifpaddr && (ifa = ifa_ifwithnet(ifpaddr)) &&
- (ifp = ifa->ifa_ifp) && (ifaaddr || gate))
- ifa = ifaof_ifpforaddr(ifaaddr ? ifaaddr : gate,
- ifp);
- else if ((ifaaddr && (ifa = ifa_ifwithaddr(ifaaddr))) ||
- (gate && (ifa = ifa_ifwithroute(rt->rt_flags,
- rt_key(rt), gate))))
- ifp = ifa->ifa_ifp;
- if (ifa) {
- register struct ifaddr *oifa = rt->rt_ifa;
- if (oifa != ifa) {
- if (oifa && oifa->ifa_rtrequest)
- oifa->ifa_rtrequest(RTM_DELETE,
- rt, gate);
- IFAFREE(rt->rt_ifa);
- rt->rt_ifa = ifa;
- ifa->ifa_refcnt++;
- rt->rt_ifp = ifp;
- }
- }
- rt_setmetrics(rtm->rtm_inits, &rtm->rtm_rmx,
- &rt->rt_rmx);
- if (rt->rt_ifa && rt->rt_ifa->ifa_rtrequest)
- rt->rt_ifa->ifa_rtrequest(RTM_ADD, rt, gate);
- if (genmask)
- rt->rt_genmask = genmask;
- /*
- * Fall into
- */
- case RTM_LOCK:
- rt->rt_rmx.rmx_locks &= ~(rtm->rtm_inits);
- rt->rt_rmx.rmx_locks |=
- (rtm->rtm_inits & rtm->rtm_rmx.rmx_locks);
- break;
- }
- break;
-
- default:
- senderr(EOPNOTSUPP);
- }
-
-flush:
- if (rtm) {
- if (error)
- rtm->rtm_errno = error;
- else
- rtm->rtm_flags |= RTF_DONE;
- }
- if (rt)
- rtfree(rt);
- {
- register struct rawcb *rp = 0;
- /*
- * Check to see if we don't want our own messages.
- */
- if ((so->so_options & SO_USELOOPBACK) == 0) {
- if (route_cb.any_count <= 1) {
- if (rtm)
- Free(rtm);
- m_freem(m);
- return (error);
- }
- /* There is another listener, so construct message */
- rp = sotorawcb(so);
- }
- if (rtm) {
- m_copyback(m, 0, rtm->rtm_msglen, (caddr_t)rtm);
- Free(rtm);
- }
- if (rp)
- rp->rcb_proto.sp_family = 0; /* Avoid us */
- if (dst)
- route_proto.sp_protocol = dst->sa_family;
- raw_input(m, &route_proto, &route_src, &route_dst);
- if (rp)
- rp->rcb_proto.sp_family = PF_ROUTE;
- }
- return (error);
-}
-
-static void
-rt_setmetrics(which, in, out)
- u_long which;
- register struct rt_metrics *in, *out;
-{
-#define metric(f, e) if (which & (f)) out->e = in->e;
- metric(RTV_RPIPE, rmx_recvpipe);
- metric(RTV_SPIPE, rmx_sendpipe);
- metric(RTV_SSTHRESH, rmx_ssthresh);
- metric(RTV_RTT, rmx_rtt);
- metric(RTV_RTTVAR, rmx_rttvar);
- metric(RTV_HOPCOUNT, rmx_hopcount);
- metric(RTV_MTU, rmx_mtu);
- metric(RTV_EXPIRE, rmx_expire);
-#undef metric
-}
-
-#define ROUNDUP(a) \
- ((a) > 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long))
-#define ADVANCE(x, n) (x += ROUNDUP((n)->sa_len))
-
-
-/*
- * Extract the addresses of the passed sockaddrs.
- * Do a little sanity checking so as to avoid bad memory references.
- * This data is derived straight from userland.
- */
-static int
-rt_xaddrs(cp, cplim, rtinfo)
- register caddr_t cp, cplim;
- register struct rt_addrinfo *rtinfo;
-{
- register struct sockaddr *sa;
- register int i;
-
- bzero(rtinfo->rti_info, sizeof(rtinfo->rti_info));
- for (i = 0; (i < RTAX_MAX) && (cp < cplim); i++) {
- if ((rtinfo->rti_addrs & (1 << i)) == 0)
- continue;
- sa = (struct sockaddr *)cp;
- /*
- * It won't fit.
- */
- if ( (cp + sa->sa_len) > cplim ) {
- return (EINVAL);
- }
-
- /*
- * there are no more.. quit now
- * If there are more bits, they are in error.
- * I've seen this. route(1) can evidently generate these.
- * This causes kernel to core dump.
- * for compatibility, If we see this, point to a safe address.
- */
- if (sa->sa_len == 0) {
- rtinfo->rti_info[i] = &sa_zero;
- return (0); /* should be EINVAL but for compat */
- }
-
- /* accept it */
- rtinfo->rti_info[i] = sa;
- ADVANCE(cp, sa);
- }
- return (0);
-}
-
-static struct mbuf *
-rt_msg1(type, rtinfo)
- int type;
- register struct rt_addrinfo *rtinfo;
-{
- register struct rt_msghdr *rtm;
- register struct mbuf *m;
- register int i;
- register struct sockaddr *sa;
- int len, dlen;
-
- m = m_gethdr(M_DONTWAIT, MT_DATA);
- if (m == 0)
- return (m);
- switch (type) {
-
- case RTM_DELADDR:
- case RTM_NEWADDR:
- len = sizeof(struct ifa_msghdr);
- break;
-
- case RTM_IFINFO:
- len = sizeof(struct if_msghdr);
- break;
-
- default:
- len = sizeof(struct rt_msghdr);
- }
- if (len > MHLEN)
- panic("rt_msg1");
- m->m_pkthdr.len = m->m_len = len;
- m->m_pkthdr.rcvif = 0;
- rtm = mtod(m, struct rt_msghdr *);
- bzero((caddr_t)rtm, len);
- for (i = 0; i < RTAX_MAX; i++) {
- if ((sa = rtinfo->rti_info[i]) == NULL)
- continue;
- rtinfo->rti_addrs |= (1 << i);
- dlen = ROUNDUP(sa->sa_len);
- m_copyback(m, len, dlen, (caddr_t)sa);
- len += dlen;
- }
- if (m->m_pkthdr.len != len) {
- m_freem(m);
- return (NULL);
- }
- rtm->rtm_msglen = len;
- rtm->rtm_version = RTM_VERSION;
- rtm->rtm_type = type;
- return (m);
-}
-
-static int
-rt_msg2(type, rtinfo, cp, w)
- int type;
- register struct rt_addrinfo *rtinfo;
- caddr_t cp;
- struct walkarg *w;
-{
- register int i;
- int len, dlen, second_time = 0;
- caddr_t cp0;
-
- rtinfo->rti_addrs = 0;
-again:
- switch (type) {
-
- case RTM_DELADDR:
- case RTM_NEWADDR:
- len = sizeof(struct ifa_msghdr);
- break;
-
- case RTM_IFINFO:
- len = sizeof(struct if_msghdr);
- break;
-
- default:
- len = sizeof(struct rt_msghdr);
- }
- cp0 = cp;
- if (cp0)
- cp += len;
- for (i = 0; i < RTAX_MAX; i++) {
- register struct sockaddr *sa;
-
- if ((sa = rtinfo->rti_info[i]) == 0)
- continue;
- rtinfo->rti_addrs |= (1 << i);
- dlen = ROUNDUP(sa->sa_len);
- if (cp) {
- bcopy((caddr_t)sa, cp, (unsigned)dlen);
- cp += dlen;
- }
- len += dlen;
- }
- if (cp == 0 && w != NULL && !second_time) {
- register struct walkarg *rw = w;
-
- if (rw->w_req) {
- if (rw->w_tmemsize < len) {
- if (rw->w_tmem)
- free(rw->w_tmem, M_RTABLE);
- rw->w_tmem = (caddr_t)
- malloc(len, M_RTABLE, M_NOWAIT);
- if (rw->w_tmem)
- rw->w_tmemsize = len;
- }
- if (rw->w_tmem) {
- cp = rw->w_tmem;
- second_time = 1;
- goto again;
- }
- }
- }
- if (cp) {
- register struct rt_msghdr *rtm = (struct rt_msghdr *)cp0;
-
- rtm->rtm_version = RTM_VERSION;
- rtm->rtm_type = type;
- rtm->rtm_msglen = len;
- }
- return (len);
-}
-
-/*
- * This routine is called to generate a message from the routing
- * socket indicating that a redirect has occured, a routing lookup
- * has failed, or that a protocol has detected timeouts to a particular
- * destination.
- */
-void
-rt_missmsg(type, rtinfo, flags, error)
- int type, flags, error;
- register struct rt_addrinfo *rtinfo;
-{
- register struct rt_msghdr *rtm;
- register struct mbuf *m;
- struct sockaddr *sa = rtinfo->rti_info[RTAX_DST];
-
- if (route_cb.any_count == 0)
- return;
- m = rt_msg1(type, rtinfo);
- if (m == 0)
- return;
- rtm = mtod(m, struct rt_msghdr *);
- rtm->rtm_flags = RTF_DONE | flags;
- rtm->rtm_errno = error;
- rtm->rtm_addrs = rtinfo->rti_addrs;
- route_proto.sp_protocol = sa ? sa->sa_family : 0;
- raw_input(m, &route_proto, &route_src, &route_dst);
-}
-
-/*
- * This routine is called to generate a message from the routing
- * socket indicating that the status of a network interface has changed.
- */
-void
-rt_ifmsg(ifp)
- register struct ifnet *ifp;
-{
- register struct if_msghdr *ifm;
- struct mbuf *m;
- struct rt_addrinfo info;
-
- if (route_cb.any_count == 0)
- return;
- bzero((caddr_t)&info, sizeof(info));
- m = rt_msg1(RTM_IFINFO, &info);
- if (m == 0)
- return;
- ifm = mtod(m, struct if_msghdr *);
- ifm->ifm_index = ifp->if_index;
- ifm->ifm_flags = (u_short)ifp->if_flags;
- ifm->ifm_data = ifp->if_data;
- ifm->ifm_addrs = 0;
- route_proto.sp_protocol = 0;
- raw_input(m, &route_proto, &route_src, &route_dst);
-}
-
-/*
- * This is called to generate messages from the routing socket
- * indicating a network interface has had addresses associated with it.
- * if we ever reverse the logic and replace messages TO the routing
- * socket indicate a request to configure interfaces, then it will
- * be unnecessary as the routing socket will automatically generate
- * copies of it.
- */
-void
-rt_newaddrmsg(cmd, ifa, error, rt)
- int cmd, error;
- register struct ifaddr *ifa;
- register struct rtentry *rt;
-{
- struct rt_addrinfo info;
- struct sockaddr *sa = 0;
- int pass;
- struct mbuf *m = 0;
- struct ifnet *ifp = ifa->ifa_ifp;
-
- if (route_cb.any_count == 0)
- return;
- for (pass = 1; pass < 3; pass++) {
- bzero((caddr_t)&info, sizeof(info));
- if ((cmd == RTM_ADD && pass == 1) ||
- (cmd == RTM_DELETE && pass == 2)) {
- register struct ifa_msghdr *ifam;
- int ncmd = cmd == RTM_ADD ? RTM_NEWADDR : RTM_DELADDR;
-
- ifaaddr = sa = ifa->ifa_addr;
- ifpaddr = ifp->if_addrlist->ifa_addr;
- netmask = ifa->ifa_netmask;
- brdaddr = ifa->ifa_dstaddr;
- if ((m = rt_msg1(ncmd, &info)) == NULL)
- continue;
- ifam = mtod(m, struct ifa_msghdr *);
- ifam->ifam_index = ifp->if_index;
- ifam->ifam_metric = ifa->ifa_metric;
- ifam->ifam_flags = ifa->ifa_flags;
- ifam->ifam_addrs = info.rti_addrs;
- }
- if ((cmd == RTM_ADD && pass == 2) ||
- (cmd == RTM_DELETE && pass == 1)) {
- register struct rt_msghdr *rtm;
-
- if (rt == 0)
- continue;
- netmask = rt_mask(rt);
- dst = sa = rt_key(rt);
- gate = rt->rt_gateway;
- if ((m = rt_msg1(cmd, &info)) == NULL)
- continue;
- rtm = mtod(m, struct rt_msghdr *);
- rtm->rtm_index = ifp->if_index;
- rtm->rtm_flags |= rt->rt_flags;
- rtm->rtm_errno = error;
- rtm->rtm_addrs = info.rti_addrs;
- }
- route_proto.sp_protocol = sa ? sa->sa_family : 0;
- raw_input(m, &route_proto, &route_src, &route_dst);
- }
-}
-
-
-/*
- * This is used in dumping the kernel table via sysctl().
- */
-int
-sysctl_dumpentry(rn, vw)
- struct radix_node *rn;
- void *vw;
-{
- register struct walkarg *w = vw;
- register struct rtentry *rt = (struct rtentry *)rn;
- int error = 0, size;
- struct rt_addrinfo info;
-
- if (w->w_op == NET_RT_FLAGS && !(rt->rt_flags & w->w_arg))
- return 0;
- bzero((caddr_t)&info, sizeof(info));
- dst = rt_key(rt);
- gate = rt->rt_gateway;
- netmask = rt_mask(rt);
- genmask = rt->rt_genmask;
- size = rt_msg2(RTM_GET, &info, 0, w);
- if (w->w_req && w->w_tmem) {
- register struct rt_msghdr *rtm = (struct rt_msghdr *)w->w_tmem;
-
- rtm->rtm_flags = rt->rt_flags;
- rtm->rtm_use = rt->rt_use;
- rtm->rtm_rmx = rt->rt_rmx;
- rtm->rtm_index = rt->rt_ifp->if_index;
- rtm->rtm_errno = rtm->rtm_pid = rtm->rtm_seq = 0;
- rtm->rtm_addrs = info.rti_addrs;
- error = 0;
- return (error);
- }
- return (error);
-}
-
-int
-sysctl_iflist(af, w)
- int af;
- register struct walkarg *w;
-{
- register struct ifnet *ifp;
- register struct ifaddr *ifa;
- struct rt_addrinfo info;
- int len, error = 0;
-
- bzero((caddr_t)&info, sizeof(info));
- for (ifp = ifnet; ifp; ifp = ifp->if_next) {
- if (w->w_arg && w->w_arg != ifp->if_index)
- continue;
- ifa = ifp->if_addrlist;
- ifpaddr = ifa->ifa_addr;
- len = rt_msg2(RTM_IFINFO, &info, (caddr_t)0, w);
- ifpaddr = 0;
- if (w->w_req && w->w_tmem) {
- register struct if_msghdr *ifm;
-
- ifm = (struct if_msghdr *)w->w_tmem;
- ifm->ifm_index = ifp->if_index;
- ifm->ifm_flags = (u_short)ifp->if_flags;
- ifm->ifm_data = ifp->if_data;
- ifm->ifm_addrs = info.rti_addrs;
- error =0;
- if (error)
- return (error);
- }
- while ((ifa = ifa->ifa_next) != 0) {
- if (af && af != ifa->ifa_addr->sa_family)
- continue;
- ifaaddr = ifa->ifa_addr;
- netmask = ifa->ifa_netmask;
- brdaddr = ifa->ifa_dstaddr;
- len = rt_msg2(RTM_NEWADDR, &info, 0, w);
- if (w->w_req && w->w_tmem) {
- register struct ifa_msghdr *ifam;
-
- ifam = (struct ifa_msghdr *)w->w_tmem;
- ifam->ifam_index = ifa->ifa_ifp->if_index;
- ifam->ifam_flags = ifa->ifa_flags;
- ifam->ifam_metric = ifa->ifa_metric;
- ifam->ifam_addrs = info.rti_addrs;
- error = 0;
- if (error)
- return (error);
- }
- }
- ifaaddr = netmask = brdaddr = 0;
- }
- return (0);
-}
-
-static int
-sysctl_rtsock SYSCTL_HANDLER_ARGS
-{
- int *name = (int *)arg1;
- u_int namelen = arg2;
- register struct radix_node_head *rnh;
- int i, s, error = EINVAL;
- u_char af;
- struct walkarg w;
-
- name ++;
- namelen--;
- if (req->newptr)
- return (EPERM);
- if (namelen != 3)
- return (EINVAL);
- af = name[0];
- Bzero(&w, sizeof(w));
- w.w_op = name[1];
- w.w_arg = name[2];
- w.w_req = req;
-
- s = splnet();
- switch (w.w_op) {
-
- case NET_RT_DUMP:
- case NET_RT_FLAGS:
- for (i = 1; i <= AF_MAX; i++)
- if ((rnh = rt_tables[i]) && (af == 0 || af == i) &&
- (error = rnh->rnh_walktree(rnh,
- sysctl_dumpentry, &w)))
- break;
- break;
-
- case NET_RT_IFLIST:
- error = sysctl_iflist(af, &w);
- }
- splx(s);
- if (w.w_tmem)
- free(w.w_tmem, M_RTABLE);
- return (error);
-}
-
-SYSCTL_NODE(_net, PF_ROUTE, routetable, CTLFLAG_RD, sysctl_rtsock,"");
-
-/*
- * Definitions of protocols supported in the ROUTE domain.
- */
-
-extern struct domain routedomain; /* or at least forward */
-
-static struct protosw routesw[] = {
-{ SOCK_RAW, &routedomain, 0, PR_ATOMIC|PR_ADDR,
- 0, route_output, raw_ctlinput, 0,
- route_usrreq,
- raw_init
-}
-};
-
-struct domain routedomain =
- { PF_ROUTE, "route", route_init, 0, 0,
- routesw, &routesw[sizeof(routesw)/sizeof(routesw[0])] };
-
-DOMAIN_SET(route);
diff --git a/c/src/exec/libnetworking/netdb.h b/c/src/exec/libnetworking/netdb.h
deleted file mode 100644
index ec274f851f..0000000000
--- a/c/src/exec/libnetworking/netdb.h
+++ /dev/null
@@ -1,182 +0,0 @@
-/*-
- * Copyright (c) 1980, 1983, 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * -
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- * -
- * --Copyright--
- */
-
-/*
- * @(#)netdb.h 8.1 (Berkeley) 6/2/93
- * From: Id: netdb.h,v 8.9 1996/11/19 08:39:29 vixie Exp $
- * $Id$
- */
-
-#ifndef _NETDB_H_
-#define _NETDB_H_
-
-#include <sys/cdefs.h>
-
-#ifndef _PATH_HEQUIV
-# define _PATH_HEQUIV "/etc/hosts.equiv"
-#endif
-#define _PATH_HOSTS "/etc/hosts"
-#define _PATH_NETWORKS "/etc/networks"
-#define _PATH_PROTOCOLS "/etc/protocols"
-#define _PATH_SERVICES "/etc/services"
-
-extern int h_errno;
-
-/*
- * Structures returned by network data base library. All addresses are
- * supplied in host order, and returned in network order (suitable for
- * use in system calls).
- */
-struct hostent {
- char *h_name; /* official name of host */
- char **h_aliases; /* alias list */
- int h_addrtype; /* host address type */
- int h_length; /* length of address */
- char **h_addr_list; /* list of addresses from name server */
-#define h_addr h_addr_list[0] /* address, for backward compatibility */
-};
-
-/*
- * Assumption here is that a network number
- * fits in an unsigned long -- probably a poor one.
- */
-struct netent {
- char *n_name; /* official name of net */
- char **n_aliases; /* alias list */
- int n_addrtype; /* net address type */
- unsigned long n_net; /* network # */
-};
-
-struct servent {
- char *s_name; /* official service name */
- char **s_aliases; /* alias list */
- int s_port; /* port # */
- char *s_proto; /* protocol to use */
-};
-
-struct protoent {
- char *p_name; /* official protocol name */
- char **p_aliases; /* alias list */
- int p_proto; /* protocol # */
-};
-
-/*
- * Error return codes from gethostbyname() and gethostbyaddr()
- * (left in extern int h_errno).
- */
-
-#define NETDB_INTERNAL -1 /* see errno */
-#define NETDB_SUCCESS 0 /* no problem */
-#define HOST_NOT_FOUND 1 /* Authoritative Answer Host not found */
-#define TRY_AGAIN 2 /* Non-Authoritative Host not found, or SERVERFAIL */
-#define NO_RECOVERY 3 /* Non recoverable errors, FORMERR, REFUSED, NOTIMP */
-#define NO_DATA 4 /* Valid name, no data record of requested type */
-#define NO_ADDRESS NO_DATA /* no address, look for MX record */
-
-__BEGIN_DECLS
-void endhostent __P((void));
-void endnetent __P((void));
-void endprotoent __P((void));
-void endservent __P((void));
-struct hostent *gethostbyaddr __P((const char *, int, int));
-struct hostent *gethostbyname __P((const char *));
-struct hostent *gethostbyname2 __P((const char *, int));
-struct hostent *gethostent __P((void));
-struct netent *getnetbyaddr __P((unsigned long, int));
-struct netent *getnetbyname __P((const char *));
-struct netent *getnetent __P((void));
-struct protoent *getprotobyname __P((const char *));
-struct protoent *getprotobynumber __P((int));
-struct protoent *getprotoent __P((void));
-struct servent *getservbyname __P((const char *, const char *));
-struct servent *getservbyport __P((int, const char *));
-struct servent *getservent __P((void));
-void herror __P((const char *));
-__const char *hstrerror __P((int));
-void sethostent __P((int));
-/* void sethostfile __P((const char *)); */
-void setnetent __P((int));
-void setprotoent __P((int));
-void setservent __P((int));
-
-/*
- * PRIVATE functions specific to the FreeBSD implementation
- */
-
-/* DO NOT USE THESE, THEY ARE SUBJECT TO CHANGE AND ARE NOT PORTABLE!!! */
-void _sethosthtent __P((int));
-void _endhosthtent __P((void));
-void _sethostdnsent __P((int));
-void _endhostdnsent __P((void));
-void _setnethtent __P((int));
-void _endnethtent __P((void));
-void _setnetdnsent __P((int));
-void _endnetdnsent __P((void));
-struct hostent * _gethostbyhtname __P((const char *, int));
-struct hostent * _gethostbydnsname __P((const char *, int));
-struct hostent * _gethostbynisname __P((const char *, int));
-struct hostent * _gethostbyhtaddr __P((const char *, int, int));
-struct hostent * _gethostbydnsaddr __P((const char *, int, int));
-struct hostent * _gethostbynisaddr __P((const char *, int, int));
-struct netent * _getnetbyhtname __P((const char *));
-struct netent * _getnetbydnsname __P((const char *));
-struct netent * _getnetbynisname __P((const char *));
-struct netent * _getnetbyhtaddr __P((unsigned long, int));
-struct netent * _getnetbydnsaddr __P((unsigned long, int));
-struct netent * _getnetbynisaddr __P((unsigned long, int));
-void _map_v4v6_address __P((const char *src, char *dst));
-void _map_v4v6_hostent __P((struct hostent *hp, char **bp, int *len));
-__END_DECLS
-
-#endif /* !_NETDB_H_ */
diff --git a/c/src/exec/libnetworking/netinet/Makefile.am b/c/src/exec/libnetworking/netinet/Makefile.am
deleted file mode 100644
index f967b65cd7..0000000000
--- a/c/src/exec/libnetworking/netinet/Makefile.am
+++ /dev/null
@@ -1,43 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-LIBNAME = lib.a
-LIB = $(ARCH)/$(LIBNAME)
-
-C_FILES = if_ether.c igmp.c in.c in_cksum.c in_pcb.c in_proto.c in_rmx.c \
- ip_divert.c ip_fw.c ip_icmp.c ip_input.c ip_mroute.c ip_output.c \
- raw_ip.c tcp_debug.c tcp_input.c tcp_output.c tcp_subr.c tcp_timer.c \
- tcp_usrreq.c udp_usrreq.c
-C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
-
-OBJS = $(C_O_FILES)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../automake/lib.am
-
-#
-# Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -D_COMPILING_BSD_KERNEL_ -DKERNEL -DINET -DNFS -DDIAGNOSTIC \
- -DBOOTP_COMPAT
-
-$(LIB): $(OBJS)
- $(make-library)
-
-all-local: $(ARCH) $(OBJS) $(LIB)
-
-.PRECIOUS: $(LIB)
-
-EXTRA_DIST = icmp_var.h if_ether.c if_ether.h igmp.c igmp.h igmp_var.h in.c \
- in.h in_cksum.c in_cksum_i386.c in_cksum_m68k.c in_cksum_powerpc.c \
- in_pcb.c in_pcb.h in_proto.c in_rmx.c in_systm.h in_var.h ip.h \
- ip_divert.c ip_fw.c ip_fw.h ip_icmp.c ip_icmp.h ip_input.c ip_mroute.c \
- ip_mroute.h ip_output.c ip_var.h raw_ip.c tcp.h tcp_debug.c tcp_debug.h \
- tcp_fsm.h tcp_input.c tcp_output.c tcp_seq.h tcp_subr.c tcp_timer.c \
- tcp_timer.h tcp_usrreq.c tcp_var.h tcpip.h udp.h udp_usrreq.c udp_var.h
-
-include $(top_srcdir)/../../../automake/local.am
diff --git a/c/src/exec/libnetworking/netinet/icmp_var.h b/c/src/exec/libnetworking/netinet/icmp_var.h
deleted file mode 100644
index 7657f31acf..0000000000
--- a/c/src/exec/libnetworking/netinet/icmp_var.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)icmp_var.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _NETINET_ICMP_VAR_H_
-#define _NETINET_ICMP_VAR_H_
-
-/*
- * Variables related to this implementation
- * of the internet control message protocol.
- */
-struct icmpstat {
-/* statistics related to icmp packets generated */
- u_long icps_error; /* # of calls to icmp_error */
- u_long icps_oldshort; /* no error 'cuz old ip too short */
- u_long icps_oldicmp; /* no error 'cuz old was icmp */
- u_long icps_outhist[ICMP_MAXTYPE + 1];
-/* statistics related to input messages processed */
- u_long icps_badcode; /* icmp_code out of range */
- u_long icps_tooshort; /* packet < ICMP_MINLEN */
- u_long icps_checksum; /* bad checksum */
- u_long icps_badlen; /* calculated bound mismatch */
- u_long icps_reflect; /* number of responses */
- u_long icps_inhist[ICMP_MAXTYPE + 1];
- u_long icps_bmcastecho; /* b/mcast echo requests dropped */
- u_long icps_bmcasttstamp; /* b/mcast tstamp requests dropped */
-};
-
-/*
- * Names for ICMP sysctl objects
- */
-#define ICMPCTL_MASKREPL 1 /* allow replies to netmask requests */
-#define ICMPCTL_STATS 2 /* statistics (read-only) */
-#define ICMPCTL_MAXID 3
-
-#define ICMPCTL_NAMES { \
- { 0, 0 }, \
- { "maskrepl", CTLTYPE_INT }, \
- { "stats", CTLTYPE_STRUCT }, \
-}
-
-#ifdef KERNEL
-extern struct icmpstat icmpstat;
-#endif
-
-#endif
diff --git a/c/src/exec/libnetworking/netinet/if_ether.c b/c/src/exec/libnetworking/netinet/if_ether.c
deleted file mode 100644
index 985ce6e7d9..0000000000
--- a/c/src/exec/libnetworking/netinet/if_ether.c
+++ /dev/null
@@ -1,638 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)if_ether.c 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-/*
- * Ethernet address resolution protocol.
- * TODO:
- * add "inuse/lock" bit (or ref. count) along with valid bit
- */
-
-#include <sys/param.h>
-#include <sys/kernel.h>
-#include <sys/sysctl.h>
-#include <sys/queue.h>
-#include <sys/systm.h>
-#include <sys/mbuf.h>
-#include <sys/malloc.h>
-#include <sys/socket.h>
-#include <sys/syslog.h>
-
-#include <net/if.h>
-#include <net/if_dl.h>
-#include <net/route.h>
-#include <net/netisr.h>
-
-#include <netinet/in.h>
-#include <netinet/in_var.h>
-#include <netinet/if_ether.h>
-
-#define SIN(s) ((struct sockaddr_in *)s)
-#define SDL(s) ((struct sockaddr_dl *)s)
-
-SYSCTL_NODE(_net_link_ether, PF_INET, inet, CTLFLAG_RW, 0, "");
-
-/* timer values */
-static int arpt_prune = (5*60*1); /* walk list every 5 minutes */
-static int arpt_keep = (20*60); /* once resolved, good for 20 more minutes */
-static int arpt_down = 20; /* once declared down, don't send for 20 sec */
-
-SYSCTL_INT(_net_link_ether_inet, OID_AUTO, prune_intvl, CTLFLAG_RW,
- &arpt_prune, 0, "");
-SYSCTL_INT(_net_link_ether_inet, OID_AUTO, max_age, CTLFLAG_RW,
- &arpt_keep, 0, "");
-SYSCTL_INT(_net_link_ether_inet, OID_AUTO, host_down_time, CTLFLAG_RW,
- &arpt_down, 0, "");
-
-#define rt_expire rt_rmx.rmx_expire
-
-struct llinfo_arp {
- LIST_ENTRY(llinfo_arp) la_le;
- struct rtentry *la_rt;
- struct mbuf *la_hold; /* last packet until resolved/timeout */
- long la_asked; /* last time we QUERIED for this addr */
-#define la_timer la_rt->rt_rmx.rmx_expire /* deletion time in seconds */
-};
-
-static LIST_HEAD(, llinfo_arp) llinfo_arp;
-
-struct ifqueue arpintrq = {0, 0, 0, 50};
-static int arp_inuse, arp_allocated;
-
-static int arp_maxtries = 5;
-static int useloopback = 1; /* use loopback interface for local traffic */
-static int arp_proxyall = 0;
-
-SYSCTL_INT(_net_link_ether_inet, OID_AUTO, maxtries, CTLFLAG_RW,
- &arp_maxtries, 0, "");
-SYSCTL_INT(_net_link_ether_inet, OID_AUTO, useloopback, CTLFLAG_RW,
- &useloopback, 0, "");
-SYSCTL_INT(_net_link_ether_inet, OID_AUTO, proxyall, CTLFLAG_RW,
- &arp_proxyall, 0, "");
-
-static void arp_rtrequest __P((int, struct rtentry *, struct sockaddr *));
-static void arprequest __P((struct arpcom *, u_long *, u_long *, u_char *));
-void arpintr __P((void));
-static void arptfree __P((struct llinfo_arp *));
-static void arptimer __P((void *));
-static struct llinfo_arp
- *arplookup __P((u_long, int, int));
-static void in_arpinput __P((struct mbuf *));
-
-/*
- * Timeout routine. Age arp_tab entries periodically.
- */
-/* ARGSUSED */
-static void
-arptimer(ignored_arg)
- void *ignored_arg;
-{
- int s = splnet();
- register struct llinfo_arp *la = llinfo_arp.lh_first;
- struct llinfo_arp *ola;
-
- timeout(arptimer, (caddr_t)0, arpt_prune * hz);
- while ((ola = la) != 0) {
- register struct rtentry *rt = la->la_rt;
- la = la->la_le.le_next;
- if (rt->rt_expire && rt->rt_expire <= rtems_bsdnet_seconds_since_boot())
- arptfree(ola); /* timer has expired, clear */
- }
- splx(s);
-}
-
-/*
- * Parallel to llc_rtrequest.
- */
-static void
-arp_rtrequest(req, rt, sa)
- int req;
- register struct rtentry *rt;
- struct sockaddr *sa;
-{
- register struct sockaddr *gate = rt->rt_gateway;
- register struct llinfo_arp *la = (struct llinfo_arp *)rt->rt_llinfo;
- static struct sockaddr_dl null_sdl = {sizeof(null_sdl), AF_LINK};
- static int arpinit_done;
-
- if (!arpinit_done) {
- arpinit_done = 1;
- LIST_INIT(&llinfo_arp);
- timeout(arptimer, (caddr_t)0, hz);
- }
- if (rt->rt_flags & RTF_GATEWAY)
- return;
- switch (req) {
-
- case RTM_ADD:
- /*
- * XXX: If this is a manually added route to interface
- * such as older version of routed or gated might provide,
- * restore cloning bit.
- */
- if ((rt->rt_flags & RTF_HOST) == 0 &&
- SIN(rt_mask(rt))->sin_addr.s_addr != 0xffffffff)
- rt->rt_flags |= RTF_CLONING;
- if (rt->rt_flags & RTF_CLONING) {
- /*
- * Case 1: This route should come from a route to iface.
- */
- rt_setgate(rt, rt_key(rt),
- (struct sockaddr *)&null_sdl);
- gate = rt->rt_gateway;
- SDL(gate)->sdl_type = rt->rt_ifp->if_type;
- SDL(gate)->sdl_index = rt->rt_ifp->if_index;
- rt->rt_expire = rtems_bsdnet_seconds_since_boot();
- break;
- }
- /* Announce a new entry if requested. */
- if (rt->rt_flags & RTF_ANNOUNCE)
- arprequest((struct arpcom *)rt->rt_ifp,
- &SIN(rt_key(rt))->sin_addr.s_addr,
- &SIN(rt_key(rt))->sin_addr.s_addr,
- (u_char *)LLADDR(SDL(gate)));
- /*FALLTHROUGH*/
- case RTM_RESOLVE:
- if (gate->sa_family != AF_LINK ||
- gate->sa_len < sizeof(null_sdl)) {
- log(LOG_DEBUG, "arp_rtrequest: bad gateway value\n");
- break;
- }
- SDL(gate)->sdl_type = rt->rt_ifp->if_type;
- SDL(gate)->sdl_index = rt->rt_ifp->if_index;
- if (la != 0)
- break; /* This happens on a route change */
- /*
- * Case 2: This route may come from cloning, or a manual route
- * add with a LL address.
- */
- R_Malloc(la, struct llinfo_arp *, sizeof(*la));
- rt->rt_llinfo = (caddr_t)la;
- if (la == 0) {
- log(LOG_DEBUG, "arp_rtrequest: malloc failed\n");
- break;
- }
- arp_inuse++, arp_allocated++;
- Bzero(la, sizeof(*la));
- la->la_rt = rt;
- rt->rt_flags |= RTF_LLINFO;
- LIST_INSERT_HEAD(&llinfo_arp, la, la_le);
-
- /*
- * This keeps the multicast addresses from showing up
- * in `arp -a' listings as unresolved. It's not actually
- * functional. Then the same for broadcast.
- */
- if (IN_MULTICAST(ntohl(SIN(rt_key(rt))->sin_addr.s_addr))) {
- ETHER_MAP_IP_MULTICAST(&SIN(rt_key(rt))->sin_addr,
- LLADDR(SDL(gate)));
- SDL(gate)->sdl_alen = 6;
- rt->rt_expire = 0;
- }
- if (in_broadcast(SIN(rt_key(rt))->sin_addr, rt->rt_ifp)) {
- memcpy(LLADDR(SDL(gate)), etherbroadcastaddr, 6);
- SDL(gate)->sdl_alen = 6;
- rt->rt_expire = 0;
- }
-
- if (SIN(rt_key(rt))->sin_addr.s_addr ==
- (IA_SIN(rt->rt_ifa))->sin_addr.s_addr) {
- /*
- * This test used to be
- * if (loif.if_flags & IFF_UP)
- * It allowed local traffic to be forced
- * through the hardware by configuring the loopback down.
- * However, it causes problems during network configuration
- * for boards that can't receive packets they send.
- * It is now necessary to clear "useloopback" and remove
- * the route to force traffic out to the hardware.
- */
- rt->rt_expire = 0;
- Bcopy(((struct arpcom *)rt->rt_ifp)->ac_enaddr,
- LLADDR(SDL(gate)), SDL(gate)->sdl_alen = 6);
- if (useloopback)
- rt->rt_ifp = loif;
-
- }
- break;
-
- case RTM_DELETE:
- if (la == 0)
- break;
- arp_inuse--;
- LIST_REMOVE(la, la_le);
- rt->rt_llinfo = 0;
- rt->rt_flags &= ~RTF_LLINFO;
- if (la->la_hold)
- m_freem(la->la_hold);
- Free((caddr_t)la);
- }
-}
-
-/*
- * Broadcast an ARP request. Caller specifies:
- * - arp header source ip address
- * - arp header target ip address
- * - arp header source ethernet address
- */
-static void
-arprequest(ac, sip, tip, enaddr)
- register struct arpcom *ac;
- register u_long *sip, *tip;
- register u_char *enaddr;
-{
- register struct mbuf *m;
- register struct ether_header *eh;
- register struct ether_arp *ea;
- struct sockaddr sa;
-
- if ((m = m_gethdr(M_DONTWAIT, MT_DATA)) == NULL)
- return;
- m->m_len = sizeof(*ea);
- m->m_pkthdr.len = sizeof(*ea);
- MH_ALIGN(m, sizeof(*ea));
- ea = mtod(m, struct ether_arp *);
- eh = (struct ether_header *)sa.sa_data;
- bzero((caddr_t)ea, sizeof (*ea));
- (void)memcpy(eh->ether_dhost, etherbroadcastaddr, sizeof(eh->ether_dhost));
- eh->ether_type = htons(ETHERTYPE_ARP); /* if_output will not swap */
- ea->arp_hrd = htons(ARPHRD_ETHER);
- ea->arp_pro = htons(ETHERTYPE_IP);
- ea->arp_hln = sizeof(ea->arp_sha); /* hardware address length */
- ea->arp_pln = sizeof(ea->arp_spa); /* protocol address length */
- ea->arp_op = htons(ARPOP_REQUEST);
- (void)memcpy(ea->arp_sha, enaddr, sizeof(ea->arp_sha));
- (void)memcpy(ea->arp_spa, sip, sizeof(ea->arp_spa));
- (void)memcpy(ea->arp_tpa, tip, sizeof(ea->arp_tpa));
- sa.sa_family = AF_UNSPEC;
- sa.sa_len = sizeof(sa);
- (*ac->ac_if.if_output)(&ac->ac_if, m, &sa, (struct rtentry *)0);
-}
-
-/*
- * Resolve an IP address into an ethernet address. If success,
- * desten is filled in. If there is no entry in arptab,
- * set one up and broadcast a request for the IP address.
- * Hold onto this mbuf and resend it once the address
- * is finally resolved. A return value of 1 indicates
- * that desten has been filled in and the packet should be sent
- * normally; a 0 return indicates that the packet has been
- * taken over here, either now or for later transmission.
- */
-int
-arpresolve(ac, rt, m, dst, desten, rt0)
- register struct arpcom *ac;
- register struct rtentry *rt;
- struct mbuf *m;
- register struct sockaddr *dst;
- register u_char *desten;
- struct rtentry *rt0;
-{
- register struct llinfo_arp *la;
- struct sockaddr_dl *sdl;
-
- if (m->m_flags & M_BCAST) { /* broadcast */
- (void)memcpy(desten, etherbroadcastaddr, sizeof(etherbroadcastaddr));
- return (1);
- }
- if (m->m_flags & M_MCAST) { /* multicast */
- ETHER_MAP_IP_MULTICAST(&SIN(dst)->sin_addr, desten);
- return(1);
- }
- if (rt)
- la = (struct llinfo_arp *)rt->rt_llinfo;
- else {
- la = arplookup(SIN(dst)->sin_addr.s_addr, 1, 0);
- if (la)
- rt = la->la_rt;
- }
- if (la == 0 || rt == 0) {
- log(LOG_DEBUG, "arpresolve: can't allocate llinfo for %s\n",
- inet_ntoa(SIN(dst)->sin_addr));
- m_freem(m);
- return (0);
- }
- sdl = SDL(rt->rt_gateway);
- /*
- * Check the address family and length is valid, the address
- * is resolved; otherwise, try to resolve.
- */
- if ((rt->rt_expire == 0 || rt->rt_expire > rtems_bsdnet_seconds_since_boot()) &&
- sdl->sdl_family == AF_LINK && sdl->sdl_alen != 0) {
- bcopy(LLADDR(sdl), desten, sdl->sdl_alen);
- return 1;
- }
- /*
- * There is an arptab entry, but no ethernet address
- * response yet. Replace the held mbuf with this
- * latest one.
- */
- if (la->la_hold)
- m_freem(la->la_hold);
- la->la_hold = m;
- if (rt->rt_expire) {
- rt->rt_flags &= ~RTF_REJECT;
- if (la->la_asked == 0 || rt->rt_expire != rtems_bsdnet_seconds_since_boot()) {
- rt->rt_expire = rtems_bsdnet_seconds_since_boot();
- if (la->la_asked++ < arp_maxtries)
- arprequest(ac,
- &(SIN(rt->rt_ifa->ifa_addr)->sin_addr.s_addr),
- &(SIN(dst)->sin_addr.s_addr),
- ac->ac_enaddr);
- else {
- rt->rt_flags |= RTF_REJECT;
- rt->rt_expire += arpt_down;
- la->la_asked = 0;
- }
-
- }
- }
- return (0);
-}
-
-/*
- * Common length and type checks are done here,
- * then the protocol-specific routine is called.
- */
-void
-arpintr(void)
-{
- register struct mbuf *m;
- register struct arphdr *ar;
- int s;
-
- while (arpintrq.ifq_head) {
- s = splimp();
- IF_DEQUEUE(&arpintrq, m);
- splx(s);
- if (m == 0 || (m->m_flags & M_PKTHDR) == 0)
- panic("arpintr");
- if (m->m_len >= sizeof(struct arphdr) &&
- (ar = mtod(m, struct arphdr *)) &&
- ntohs(ar->ar_hrd) == ARPHRD_ETHER &&
- m->m_len >=
- sizeof(struct arphdr) + 2 * ar->ar_hln + 2 * ar->ar_pln)
-
- switch (ntohs(ar->ar_pro)) {
-
- case ETHERTYPE_IP:
- in_arpinput(m);
- continue;
- }
- m_freem(m);
- }
-}
-
-NETISR_SET(NETISR_ARP, arpintr);
-
-/*
- * ARP for Internet protocols on 10 Mb/s Ethernet.
- * Algorithm is that given in RFC 826.
- * In addition, a sanity check is performed on the sender
- * protocol address, to catch impersonators.
- * We no longer handle negotiations for use of trailer protocol:
- * Formerly, ARP replied for protocol type ETHERTYPE_TRAIL sent
- * along with IP replies if we wanted trailers sent to us,
- * and also sent them in response to IP replies.
- * This allowed either end to announce the desire to receive
- * trailer packets.
- * We no longer reply to requests for ETHERTYPE_TRAIL protocol either,
- * but formerly didn't normally send requests.
- */
-static void
-in_arpinput(m)
- struct mbuf *m;
-{
- register struct ether_arp *ea;
- register struct arpcom *ac = (struct arpcom *)m->m_pkthdr.rcvif;
- struct ether_header *eh;
- register struct llinfo_arp *la = 0;
- register struct rtentry *rt;
- struct in_ifaddr *ia, *maybe_ia = 0;
- struct sockaddr_dl *sdl;
- struct sockaddr sa;
- struct in_addr isaddr, itaddr, myaddr;
- int op;
-
- ea = mtod(m, struct ether_arp *);
- op = ntohs(ea->arp_op);
- (void)memcpy(&isaddr, ea->arp_spa, sizeof (isaddr));
- (void)memcpy(&itaddr, ea->arp_tpa, sizeof (itaddr));
- for (ia = in_ifaddr; ia; ia = ia->ia_next)
- if (ia->ia_ifp == &ac->ac_if) {
- maybe_ia = ia;
- if ((itaddr.s_addr == ia->ia_addr.sin_addr.s_addr) ||
- (isaddr.s_addr == ia->ia_addr.sin_addr.s_addr))
- break;
- }
- if (maybe_ia == 0) {
- m_freem(m);
- return;
- }
- myaddr = ia ? ia->ia_addr.sin_addr : maybe_ia->ia_addr.sin_addr;
- if (!bcmp((caddr_t)ea->arp_sha, (caddr_t)ac->ac_enaddr,
- sizeof (ea->arp_sha))) {
- m_freem(m); /* it's from me, ignore it. */
- return;
- }
- if (!bcmp((caddr_t)ea->arp_sha, (caddr_t)etherbroadcastaddr,
- sizeof (ea->arp_sha))) {
- log(LOG_ERR,
- "arp: ether address is broadcast for IP address %s!\n",
- inet_ntoa(isaddr));
- m_freem(m);
- return;
- }
- if (isaddr.s_addr == myaddr.s_addr) {
- log(LOG_ERR,
- "arp: %6D is using my IP address %s!\n",
- ea->arp_sha, ":", inet_ntoa(isaddr));
- itaddr = myaddr;
- goto reply;
- }
- la = arplookup(isaddr.s_addr, itaddr.s_addr == myaddr.s_addr, 0);
- if (la && (rt = la->la_rt) && (sdl = SDL(rt->rt_gateway))) {
- if (sdl->sdl_alen &&
- bcmp((caddr_t)ea->arp_sha, LLADDR(sdl), sdl->sdl_alen))
- log(LOG_INFO, "arp: %s moved from %6D to %6D\n",
- inet_ntoa(isaddr), (u_char *)LLADDR(sdl), ":",
- ea->arp_sha, ":");
- (void)memcpy(LLADDR(sdl), ea->arp_sha, sizeof(ea->arp_sha));
- sdl->sdl_alen = sizeof(ea->arp_sha);
- if (rt->rt_expire)
- rt->rt_expire = rtems_bsdnet_seconds_since_boot() + arpt_keep;
- rt->rt_flags &= ~RTF_REJECT;
- la->la_asked = 0;
- if (la->la_hold) {
- (*ac->ac_if.if_output)(&ac->ac_if, la->la_hold,
- rt_key(rt), rt);
- la->la_hold = 0;
- }
- }
-reply:
- if (op != ARPOP_REQUEST) {
- m_freem(m);
- return;
- }
- if (itaddr.s_addr == myaddr.s_addr) {
- /* I am the target */
- (void)memcpy(ea->arp_tha, ea->arp_sha, sizeof(ea->arp_sha));
- (void)memcpy(ea->arp_sha, ac->ac_enaddr, sizeof(ea->arp_sha));
- } else {
- la = arplookup(itaddr.s_addr, 0, SIN_PROXY);
- if (la == NULL) {
- struct sockaddr_in sin;
-
- if (!arp_proxyall) {
- m_freem(m);
- return;
- }
-
- bzero(&sin, sizeof sin);
- sin.sin_family = AF_INET;
- sin.sin_len = sizeof sin;
- sin.sin_addr = itaddr;
-
- rt = rtalloc1((struct sockaddr *)&sin, 0, 0UL);
- if (!rt) {
- m_freem(m);
- return;
- }
- /*
- * Don't send proxies for nodes on the same interface
- * as this one came out of, or we'll get into a fight
- * over who claims what Ether address.
- */
- if (rt->rt_ifp == &ac->ac_if) {
- rtfree(rt);
- m_freem(m);
- return;
- }
- (void)memcpy(ea->arp_tha, ea->arp_sha, sizeof(ea->arp_sha));
- (void)memcpy(ea->arp_sha, ac->ac_enaddr, sizeof(ea->arp_sha));
- rtfree(rt);
-#ifdef DEBUG_PROXY
- printf("arp: proxying for %s\n",
- inet_ntoa(itaddr));
-#endif
- } else {
- rt = la->la_rt;
- (void)memcpy(ea->arp_tha, ea->arp_sha, sizeof(ea->arp_sha));
- sdl = SDL(rt->rt_gateway);
- (void)memcpy(ea->arp_sha, LLADDR(sdl), sizeof(ea->arp_sha));
- }
- }
-
- (void)memcpy(ea->arp_tpa, ea->arp_spa, sizeof(ea->arp_spa));
- (void)memcpy(ea->arp_spa, &itaddr, sizeof(ea->arp_spa));
- ea->arp_op = htons(ARPOP_REPLY);
- ea->arp_pro = htons(ETHERTYPE_IP); /* let's be sure! */
- eh = (struct ether_header *)sa.sa_data;
- (void)memcpy(eh->ether_dhost, ea->arp_tha, sizeof(eh->ether_dhost));
- eh->ether_type = htons(ETHERTYPE_ARP);
- sa.sa_family = AF_UNSPEC;
- sa.sa_len = sizeof(sa);
- (*ac->ac_if.if_output)(&ac->ac_if, m, &sa, (struct rtentry *)0);
- return;
-}
-
-/*
- * Free an arp entry.
- */
-static void
-arptfree(la)
- register struct llinfo_arp *la;
-{
- register struct rtentry *rt = la->la_rt;
- register struct sockaddr_dl *sdl;
- if (rt == 0)
- panic("arptfree");
- if (rt->rt_refcnt > 0 && (sdl = SDL(rt->rt_gateway)) &&
- sdl->sdl_family == AF_LINK) {
- sdl->sdl_alen = 0;
- la->la_asked = 0;
- rt->rt_flags &= ~RTF_REJECT;
- return;
- }
- rtrequest(RTM_DELETE, rt_key(rt), (struct sockaddr *)0, rt_mask(rt),
- 0, (struct rtentry **)0);
-}
-/*
- * Lookup or enter a new address in arptab.
- */
-static struct llinfo_arp *
-arplookup(addr, create, proxy)
- u_long addr;
- int create, proxy;
-{
- register struct rtentry *rt;
- static struct sockaddr_inarp sin = {sizeof(sin), AF_INET };
- const char *why = 0;
-
- sin.sin_addr.s_addr = addr;
- sin.sin_other = proxy ? SIN_PROXY : 0;
- rt = rtalloc1((struct sockaddr *)&sin, create, 0UL);
- if (rt == 0)
- return (0);
- rt->rt_refcnt--;
-
- if (rt->rt_flags & RTF_GATEWAY)
- why = "host is not on local network";
- else if ((rt->rt_flags & RTF_LLINFO) == 0)
- why = "could not allocate llinfo";
- else if (rt->rt_gateway->sa_family != AF_LINK)
- why = "gateway route is not ours";
-
- if (why && create) {
- log(LOG_DEBUG, "arplookup %s failed: %s\n",
- inet_ntoa(sin.sin_addr), why);
- return 0;
- } else if (why) {
- return 0;
- }
- return ((struct llinfo_arp *)rt->rt_llinfo);
-}
-
-void
-arp_ifinit(ac, ifa)
- struct arpcom *ac;
- struct ifaddr *ifa;
-{
- if (ntohl(IA_SIN(ifa)->sin_addr.s_addr) != INADDR_ANY)
- arprequest(ac, &(IA_SIN(ifa)->sin_addr.s_addr),
- &(IA_SIN(ifa)->sin_addr.s_addr), ac->ac_enaddr);
- ifa->ifa_rtrequest = arp_rtrequest;
- ifa->ifa_flags |= RTF_CLONING;
-}
diff --git a/c/src/exec/libnetworking/netinet/if_ether.h b/c/src/exec/libnetworking/netinet/if_ether.h
deleted file mode 100644
index 22c8e97187..0000000000
--- a/c/src/exec/libnetworking/netinet/if_ether.h
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)if_ether.h 8.3 (Berkeley) 5/2/95
- * $Id$
- */
-
-#ifndef _NETINET_IF_ETHER_H_
-#define _NETINET_IF_ETHER_H_
-
-#include <net/ethernet.h>
-
-#define ETHERTYPE_PUP 0x0200 /* PUP protocol */
-#define ETHERTYPE_IP 0x0800 /* IP protocol */
-#define ETHERTYPE_ARP 0x0806 /* Addr. resolution protocol */
-#define ETHERTYPE_REVARP 0x8035 /* reverse Addr. resolution protocol */
-
-/*
- * The ETHERTYPE_NTRAILER packet types starting at ETHERTYPE_TRAIL have
- * (type-ETHERTYPE_TRAIL)*512 bytes of data followed
- * by an ETHER type (as given above) and then the (variable-length) header.
- */
-#define ETHERTYPE_TRAIL 0x1000 /* Trailer packet */
-#define ETHERTYPE_NTRAILER 16
-
-#define ETHERMTU (ETHER_MAX_LEN-ETHER_HDR_LEN-ETHER_CRC_LEN)
-#define ETHERMIN (ETHER_MIN_LEN-ETHER_HDR_LEN-ETHER_CRC_LEN)
-
-#ifdef KERNEL
-/*
- * Macro to map an IP multicast address to an Ethernet multicast address.
- * The high-order 25 bits of the Ethernet address are statically assigned,
- * and the low-order 23 bits are taken from the low end of the IP address.
- */
-#define ETHER_MAP_IP_MULTICAST(ipaddr, enaddr) \
- /* struct in_addr *ipaddr; */ \
- /* u_char enaddr[ETHER_ADDR_LEN]; */ \
-{ \
- (enaddr)[0] = 0x01; \
- (enaddr)[1] = 0x00; \
- (enaddr)[2] = 0x5e; \
- (enaddr)[3] = ((u_char *)ipaddr)[1] & 0x7f; \
- (enaddr)[4] = ((u_char *)ipaddr)[2]; \
- (enaddr)[5] = ((u_char *)ipaddr)[3]; \
-}
-#endif
-
-/*
- * Ethernet Address Resolution Protocol.
- *
- * See RFC 826 for protocol description. Structure below is adapted
- * to resolving internet addresses. Field names used correspond to
- * RFC 826.
- */
-struct ether_arp {
- struct arphdr ea_hdr; /* fixed-size header */
- u_char arp_sha[ETHER_ADDR_LEN]; /* sender hardware address */
- u_char arp_spa[4]; /* sender protocol address */
- u_char arp_tha[ETHER_ADDR_LEN]; /* target hardware address */
- u_char arp_tpa[4]; /* target protocol address */
-};
-#define arp_hrd ea_hdr.ar_hrd
-#define arp_pro ea_hdr.ar_pro
-#define arp_hln ea_hdr.ar_hln
-#define arp_pln ea_hdr.ar_pln
-#define arp_op ea_hdr.ar_op
-
-
-/*
- * Structure shared between the ethernet driver modules and
- * the address resolution code. For example, each ec_softc or il_softc
- * begins with this structure.
- */
-struct arpcom {
- /*
- * The ifnet struct _must_ be at the head of this structure.
- */
- struct ifnet ac_if; /* network-visible interface */
- u_char ac_enaddr[ETHER_ADDR_LEN]; /* ethernet hardware address */
- struct ether_multi *ac_multiaddrs; /* list of ether multicast addrs */
- int ac_multicnt; /* length of ac_multiaddrs list */
-};
-
-struct sockaddr_inarp {
- u_char sin_len;
- u_char sin_family;
- u_short sin_port;
- struct in_addr sin_addr;
- struct in_addr sin_srcaddr;
- u_short sin_tos;
- u_short sin_other;
-#define SIN_PROXY 1
-};
-/*
- * IP and ethernet specific routing flags
- */
-#define RTF_USETRAILERS RTF_PROTO1 /* use trailers */
-#define RTF_ANNOUNCE RTF_PROTO2 /* announce new arp entry */
-
-#ifdef KERNEL
-extern u_char etherbroadcastaddr[ETHER_ADDR_LEN];
-extern u_char ether_ipmulticast_min[ETHER_ADDR_LEN];
-extern u_char ether_ipmulticast_max[ETHER_ADDR_LEN];
-extern struct ifqueue arpintrq;
-
-int arpresolve __P((struct arpcom *, struct rtentry *, struct mbuf *,
- struct sockaddr *, u_char *, struct rtentry *));
-void arp_ifinit __P((struct arpcom *, struct ifaddr *));
-int ether_addmulti __P((struct ifreq *, struct arpcom *));
-int ether_delmulti __P((struct ifreq *, struct arpcom *));
-
-/*
- * Ethernet multicast address structure. There is one of these for each
- * multicast address or range of multicast addresses that we are supposed
- * to listen to on a particular interface. They are kept in a linked list,
- * rooted in the interface's arpcom structure. (This really has nothing to
- * do with ARP, or with the Internet address family, but this appears to be
- * the minimally-disrupting place to put it.)
- */
-struct ether_multi {
- u_char enm_addrlo[ETHER_ADDR_LEN]; /* low or only address of range */
- u_char enm_addrhi[ETHER_ADDR_LEN]; /* high or only address of range */
- struct arpcom *enm_ac; /* back pointer to arpcom */
- u_int enm_refcount; /* no. claims to this addr/range */
- struct ether_multi *enm_next; /* ptr to next ether_multi */
-};
-
-/*
- * Structure used by macros below to remember position when stepping through
- * all of the ether_multi records.
- */
-struct ether_multistep {
- struct ether_multi *e_enm;
-};
-
-/*
- * Macro for looking up the ether_multi record for a given range of Ethernet
- * multicast addresses connected to a given arpcom structure. If no matching
- * record is found, "enm" returns NULL.
- */
-#define ETHER_LOOKUP_MULTI(addrlo, addrhi, ac, enm) \
- /* u_char addrlo[ETHER_ADDR_LEN]; */ \
- /* u_char addrhi[ETHER_ADDR_LEN]; */ \
- /* struct arpcom *ac; */ \
- /* struct ether_multi *enm; */ \
-{ \
- for ((enm) = (ac)->ac_multiaddrs; \
- (enm) != NULL && \
- (bcmp((enm)->enm_addrlo, (addrlo), ETHER_ADDR_LEN) != 0 || \
- bcmp((enm)->enm_addrhi, (addrhi), ETHER_ADDR_LEN) != 0); \
- (enm) = (enm)->enm_next); \
-}
-
-/*
- * Macro to step through all of the ether_multi records, one at a time.
- * The current position is remembered in "step", which the caller must
- * provide. ETHER_FIRST_MULTI(), below, must be called to initialize "step"
- * and get the first record. Both macros return a NULL "enm" when there
- * are no remaining records.
- */
-#define ETHER_NEXT_MULTI(step, enm) \
- /* struct ether_multistep step; */ \
- /* struct ether_multi *enm; */ \
-{ \
- if (((enm) = (step).e_enm) != NULL) \
- (step).e_enm = (enm)->enm_next; \
-}
-
-#define ETHER_FIRST_MULTI(step, ac, enm) \
- /* struct ether_multistep step; */ \
- /* struct arpcom *ac; */ \
- /* struct ether_multi *enm; */ \
-{ \
- (step).e_enm = (ac)->ac_multiaddrs; \
- ETHER_NEXT_MULTI((step), (enm)); \
-}
-
-#endif
-
-#endif
diff --git a/c/src/exec/libnetworking/netinet/igmp.c b/c/src/exec/libnetworking/netinet/igmp.c
deleted file mode 100644
index 2af8b7038e..0000000000
--- a/c/src/exec/libnetworking/netinet/igmp.c
+++ /dev/null
@@ -1,479 +0,0 @@
-/*
- * Copyright (c) 1988 Stephen Deering.
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Stephen Deering of Stanford University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)igmp.c 8.1 (Berkeley) 7/19/93
- * $Id$
- */
-
-/*
- * Internet Group Management Protocol (IGMP) routines.
- *
- * Written by Steve Deering, Stanford, May 1988.
- * Modified by Rosen Sharma, Stanford, Aug 1994.
- * Modified by Bill Fenner, Xerox PARC, Feb 1995.
- * Modified to fully comply to IGMPv2 by Bill Fenner, Oct 1995.
- *
- * MULTICAST Revision: 3.5.1.4
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-#include <sys/protosw.h>
-#include <sys/kernel.h>
-#include <sys/sysctl.h>
-
-#include <net/if.h>
-#include <net/route.h>
-
-#include <netinet/in.h>
-#include <netinet/in_var.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/ip_var.h>
-#include <netinet/igmp.h>
-#include <netinet/igmp_var.h>
-
-static struct router_info *
- find_rti __P((struct ifnet *ifp));
-
-static struct igmpstat igmpstat;
-
-SYSCTL_STRUCT(_net_inet_igmp, IGMPCTL_STATS, stats, CTLFLAG_RD,
- &igmpstat, igmpstat, "");
-
-static int igmp_timers_are_running;
-static u_long igmp_all_hosts_group;
-static u_long igmp_all_rtrs_group;
-static struct mbuf *router_alert;
-static struct router_info *Head;
-
-static void igmp_sendpkt(struct in_multi *, int, unsigned long);
-
-void
-igmp_init()
-{
- struct ipoption *ra;
-
- /*
- * To avoid byte-swapping the same value over and over again.
- */
- igmp_all_hosts_group = htonl(INADDR_ALLHOSTS_GROUP);
- igmp_all_rtrs_group = htonl(INADDR_ALLRTRS_GROUP);
-
- igmp_timers_are_running = 0;
-
- /*
- * Construct a Router Alert option to use in outgoing packets
- */
- MGET(router_alert, M_DONTWAIT, MT_DATA);
- ra = mtod(router_alert, struct ipoption *);
- ra->ipopt_dst.s_addr = 0;
- ra->ipopt_list[0] = IPOPT_RA; /* Router Alert Option */
- ra->ipopt_list[1] = 0x04; /* 4 bytes long */
- ra->ipopt_list[2] = 0x00;
- ra->ipopt_list[3] = 0x00;
- router_alert->m_len = sizeof(ra->ipopt_dst) + ra->ipopt_list[1];
-
- Head = (struct router_info *) 0;
-}
-
-static struct router_info *
-find_rti(ifp)
- struct ifnet *ifp;
-{
- register struct router_info *rti = Head;
-
-#ifdef IGMP_DEBUG
- printf("[igmp.c, _find_rti] --> entering \n");
-#endif
- while (rti) {
- if (rti->rti_ifp == ifp) {
-#ifdef IGMP_DEBUG
- printf("[igmp.c, _find_rti] --> found old entry \n");
-#endif
- return rti;
- }
- rti = rti->rti_next;
- }
- MALLOC(rti, struct router_info *, sizeof *rti, M_MRTABLE, M_NOWAIT);
- rti->rti_ifp = ifp;
- rti->rti_type = IGMP_V2_ROUTER;
- rti->rti_time = 0;
- rti->rti_next = Head;
- Head = rti;
-#ifdef IGMP_DEBUG
- printf("[igmp.c, _find_rti] --> created an entry \n");
-#endif
- return rti;
-}
-
-void
-igmp_input(m, iphlen)
- register struct mbuf *m;
- register int iphlen;
-{
- register struct igmp *igmp;
- register struct ip *ip;
- register int igmplen;
- register struct ifnet *ifp = m->m_pkthdr.rcvif;
- register int minlen;
- register struct in_multi *inm;
- register struct in_ifaddr *ia;
- struct in_multistep step;
- struct router_info *rti;
-
- int timer; /** timer value in the igmp query header **/
-
- ++igmpstat.igps_rcv_total;
-
- ip = mtod(m, struct ip *);
- igmplen = ip->ip_len;
-
- /*
- * Validate lengths
- */
- if (igmplen < IGMP_MINLEN) {
- ++igmpstat.igps_rcv_tooshort;
- m_freem(m);
- return;
- }
- minlen = iphlen + IGMP_MINLEN;
- if ((m->m_flags & M_EXT || m->m_len < minlen) &&
- (m = m_pullup(m, minlen)) == 0) {
- ++igmpstat.igps_rcv_tooshort;
- return;
- }
-
- /*
- * Validate checksum
- */
- m->m_data += iphlen;
- m->m_len -= iphlen;
- igmp = mtod(m, struct igmp *);
- if (in_cksum(m, igmplen)) {
- ++igmpstat.igps_rcv_badsum;
- m_freem(m);
- return;
- }
- m->m_data -= iphlen;
- m->m_len += iphlen;
-
- ip = mtod(m, struct ip *);
- timer = igmp->igmp_code * PR_FASTHZ / IGMP_TIMER_SCALE;
- rti = find_rti(ifp);
-
- /*
- * In the IGMPv2 specification, there are 3 states and a flag.
- *
- * In Non-Member state, we simply don't have a membership record.
- * In Delaying Member state, our timer is running (inm->inm_timer)
- * In Idle Member state, our timer is not running (inm->inm_timer==0)
- *
- * The flag is inm->inm_state, it is set to IGMP_OTHERMEMBER if
- * we have heard a report from another member, or IGMP_IREPORTEDLAST
- * if I sent the last report.
- */
- switch (igmp->igmp_type) {
-
- case IGMP_MEMBERSHIP_QUERY:
- ++igmpstat.igps_rcv_queries;
-
- if (ifp->if_flags & IFF_LOOPBACK)
- break;
-
- if (igmp->igmp_code == 0) {
- /*
- * Old router. Remember that the querier on this
- * interface is old, and set the timer to the
- * value in RFC 1112.
- */
-
- rti->rti_type = IGMP_V1_ROUTER;
- rti->rti_time = 0;
-
- timer = IGMP_MAX_HOST_REPORT_DELAY * PR_FASTHZ;
-
- if (ip->ip_dst.s_addr != igmp_all_hosts_group ||
- igmp->igmp_group.s_addr != 0) {
- ++igmpstat.igps_rcv_badqueries;
- m_freem(m);
- return;
- }
- } else {
- /*
- * New router. Simply do the new validity check.
- */
-
- if (igmp->igmp_group.s_addr != 0 &&
- !IN_MULTICAST(ntohl(igmp->igmp_group.s_addr))) {
- ++igmpstat.igps_rcv_badqueries;
- m_freem(m);
- return;
- }
- }
-
- /*
- * - Start the timers in all of our membership records
- * that the query applies to for the interface on
- * which the query arrived excl. those that belong
- * to the "all-hosts" group (224.0.0.1).
- * - Restart any timer that is already running but has
- * a value longer than the requested timeout.
- * - Use the value specified in the query message as
- * the maximum timeout.
- */
- IN_FIRST_MULTI(step, inm);
- while (inm != NULL) {
- if (inm->inm_ifp == ifp &&
- inm->inm_addr.s_addr != igmp_all_hosts_group &&
- (igmp->igmp_group.s_addr == 0 ||
- igmp->igmp_group.s_addr == inm->inm_addr.s_addr)) {
- if (inm->inm_timer == 0 ||
- inm->inm_timer > timer) {
- inm->inm_timer =
- IGMP_RANDOM_DELAY(timer);
- igmp_timers_are_running = 1;
- }
- }
- IN_NEXT_MULTI(step, inm);
- }
-
- break;
-
- case IGMP_V1_MEMBERSHIP_REPORT:
- case IGMP_V2_MEMBERSHIP_REPORT:
- /*
- * For fast leave to work, we have to know that we are the
- * last person to send a report for this group. Reports
- * can potentially get looped back if we are a multicast
- * router, so discard reports sourced by me.
- */
- IFP_TO_IA(ifp, ia);
- if (ia && ip->ip_src.s_addr == IA_SIN(ia)->sin_addr.s_addr)
- break;
-
- ++igmpstat.igps_rcv_reports;
-
- if (ifp->if_flags & IFF_LOOPBACK)
- break;
-
- if (!IN_MULTICAST(ntohl(igmp->igmp_group.s_addr))) {
- ++igmpstat.igps_rcv_badreports;
- m_freem(m);
- return;
- }
-
- /*
- * KLUDGE: if the IP source address of the report has an
- * unspecified (i.e., zero) subnet number, as is allowed for
- * a booting host, replace it with the correct subnet number
- * so that a process-level multicast routing demon can
- * determine which subnet it arrived from. This is necessary
- * to compensate for the lack of any way for a process to
- * determine the arrival interface of an incoming packet.
- */
- if ((ntohl(ip->ip_src.s_addr) & IN_CLASSA_NET) == 0)
- if (ia) ip->ip_src.s_addr = htonl(ia->ia_subnet);
-
- /*
- * If we belong to the group being reported, stop
- * our timer for that group.
- */
- IN_LOOKUP_MULTI(igmp->igmp_group, ifp, inm);
-
- if (inm != NULL) {
- inm->inm_timer = 0;
- ++igmpstat.igps_rcv_ourreports;
-
- inm->inm_state = IGMP_OTHERMEMBER;
- }
-
- break;
- }
-
- /*
- * Pass all valid IGMP packets up to any process(es) listening
- * on a raw IGMP socket.
- */
- rip_input(m, iphlen);
-}
-
-void
-igmp_joingroup(inm)
- struct in_multi *inm;
-{
- int s = splnet();
-
- if (inm->inm_addr.s_addr == igmp_all_hosts_group
- || inm->inm_ifp->if_flags & IFF_LOOPBACK) {
- inm->inm_timer = 0;
- inm->inm_state = IGMP_OTHERMEMBER;
- } else {
- inm->inm_rti = find_rti(inm->inm_ifp);
- igmp_sendpkt(inm, inm->inm_rti->rti_type, 0);
- inm->inm_timer = IGMP_RANDOM_DELAY(
- IGMP_MAX_HOST_REPORT_DELAY*PR_FASTHZ);
- inm->inm_state = IGMP_IREPORTEDLAST;
- igmp_timers_are_running = 1;
- }
- splx(s);
-}
-
-void
-igmp_leavegroup(inm)
- struct in_multi *inm;
-{
- if (inm->inm_state == IGMP_IREPORTEDLAST &&
- inm->inm_addr.s_addr != igmp_all_hosts_group &&
- !(inm->inm_ifp->if_flags & IFF_LOOPBACK) &&
- inm->inm_rti->rti_type != IGMP_V1_ROUTER)
- igmp_sendpkt(inm, IGMP_V2_LEAVE_GROUP, igmp_all_rtrs_group);
-}
-
-void
-igmp_fasttimo()
-{
- register struct in_multi *inm;
- struct in_multistep step;
- int s;
-
- /*
- * Quick check to see if any work needs to be done, in order
- * to minimize the overhead of fasttimo processing.
- */
-
- if (!igmp_timers_are_running)
- return;
-
- s = splnet();
- igmp_timers_are_running = 0;
- IN_FIRST_MULTI(step, inm);
- while (inm != NULL) {
- if (inm->inm_timer == 0) {
- /* do nothing */
- } else if (--inm->inm_timer == 0) {
- igmp_sendpkt(inm, inm->inm_rti->rti_type, 0);
- inm->inm_state = IGMP_IREPORTEDLAST;
- } else {
- igmp_timers_are_running = 1;
- }
- IN_NEXT_MULTI(step, inm);
- }
- splx(s);
-}
-
-void
-igmp_slowtimo()
-{
- int s = splnet();
- register struct router_info *rti = Head;
-
-#ifdef IGMP_DEBUG
- printf("[igmp.c,_slowtimo] -- > entering \n");
-#endif
- while (rti) {
- if (rti->rti_type == IGMP_V1_ROUTER) {
- rti->rti_time++;
- if (rti->rti_time >= IGMP_AGE_THRESHOLD) {
- rti->rti_type = IGMP_V2_ROUTER;
- }
- }
- rti = rti->rti_next;
- }
-#ifdef IGMP_DEBUG
- printf("[igmp.c,_slowtimo] -- > exiting \n");
-#endif
- splx(s);
-}
-
-static struct route igmprt;
-
-static void
-igmp_sendpkt(inm, type, addr)
- struct in_multi *inm;
- int type;
- unsigned long addr;
-{
- struct mbuf *m;
- struct igmp *igmp;
- struct ip *ip;
- struct ip_moptions imo;
-
- MGETHDR(m, M_DONTWAIT, MT_HEADER);
- if (m == NULL)
- return;
-
- m->m_pkthdr.rcvif = loif;
- m->m_pkthdr.len = sizeof(struct ip) + IGMP_MINLEN;
- MH_ALIGN(m, IGMP_MINLEN + sizeof(struct ip));
- m->m_data += sizeof(struct ip);
- m->m_len = IGMP_MINLEN;
- igmp = mtod(m, struct igmp *);
- igmp->igmp_type = type;
- igmp->igmp_code = 0;
- igmp->igmp_group = inm->inm_addr;
- igmp->igmp_cksum = 0;
- igmp->igmp_cksum = in_cksum(m, IGMP_MINLEN);
-
- m->m_data -= sizeof(struct ip);
- m->m_len += sizeof(struct ip);
- ip = mtod(m, struct ip *);
- ip->ip_tos = 0;
- ip->ip_len = sizeof(struct ip) + IGMP_MINLEN;
- ip->ip_off = 0;
- ip->ip_p = IPPROTO_IGMP;
- ip->ip_src.s_addr = INADDR_ANY;
- ip->ip_dst.s_addr = addr ? addr : igmp->igmp_group.s_addr;
-
- imo.imo_multicast_ifp = inm->inm_ifp;
- imo.imo_multicast_ttl = 1;
- imo.imo_multicast_vif = -1;
- /*
- * Request loopback of the report if we are acting as a multicast
- * router, so that the process-level routing demon can hear it.
- */
- imo.imo_multicast_loop = (ip_mrouter != NULL);
-
- /*
- * XXX
- * Do we have to worry about reentrancy here? Don't think so.
- */
- ip_output(m, router_alert, &igmprt, 0, &imo);
-
- ++igmpstat.igps_snd_reports;
-}
diff --git a/c/src/exec/libnetworking/netinet/igmp.h b/c/src/exec/libnetworking/netinet/igmp.h
deleted file mode 100644
index 01d6d09179..0000000000
--- a/c/src/exec/libnetworking/netinet/igmp.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (c) 1988 Stephen Deering.
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Stephen Deering of Stanford University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)igmp.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _NETINET_IGMP_H_
-#define _NETINET_IGMP_H_
-
-/*
- * Internet Group Management Protocol (IGMP) definitions.
- *
- * Written by Steve Deering, Stanford, May 1988.
- *
- * MULTICAST Revision: 3.5.1.2
- */
-
-/*
- * IGMP packet format.
- */
-struct igmp {
- u_char igmp_type; /* version & type of IGMP message */
- u_char igmp_code; /* subtype for routing msgs */
- u_short igmp_cksum; /* IP-style checksum */
- struct in_addr igmp_group; /* group address being reported */
-}; /* (zero for queries) */
-
-#define IGMP_MINLEN 8
-
-/*
- * Message types, including version number.
- */
-#define IGMP_MEMBERSHIP_QUERY 0x11 /* membership query */
-#define IGMP_V1_MEMBERSHIP_REPORT 0x12 /* Ver. 1 membership report */
-#define IGMP_V2_MEMBERSHIP_REPORT 0x16 /* Ver. 2 membership report */
-#define IGMP_V2_LEAVE_GROUP 0x17 /* Leave-group message */
-
-#define IGMP_DVMRP 0x13 /* DVMRP routing message */
-#define IGMP_PIM 0x14 /* PIM routing message */
-
-#define IGMP_MTRACE_RESP 0x1e /* traceroute resp.(to sender)*/
-#define IGMP_MTRACE 0x1f /* mcast traceroute messages */
-
-#define IGMP_MAX_HOST_REPORT_DELAY 10 /* max delay for response to */
- /* query (in seconds) according */
- /* to RFC1112 */
-
-
-#define IGMP_TIMER_SCALE 10 /* denotes that the igmp code field */
- /* specifies time in 10th of seconds*/
-
-/*
- * The following four defininitions are for backwards compatibility.
- * They should be removed as soon as all applications are updated to
- * use the new constant names.
- */
-#define IGMP_HOST_MEMBERSHIP_QUERY IGMP_MEMBERSHIP_QUERY
-#define IGMP_HOST_MEMBERSHIP_REPORT IGMP_V1_MEMBERSHIP_REPORT
-#define IGMP_HOST_NEW_MEMBERSHIP_REPORT IGMP_V2_MEMBERSHIP_REPORT
-#define IGMP_HOST_LEAVE_MESSAGE IGMP_V2_LEAVE_GROUP
-
-#endif /* _NETINET_IGMP_H_ */
diff --git a/c/src/exec/libnetworking/netinet/igmp_var.h b/c/src/exec/libnetworking/netinet/igmp_var.h
deleted file mode 100644
index f408bf2bc1..0000000000
--- a/c/src/exec/libnetworking/netinet/igmp_var.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright (c) 1988 Stephen Deering.
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Stephen Deering of Stanford University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)igmp_var.h 8.1 (Berkeley) 7/19/93
- * $Id$
- */
-
-#ifndef _NETINET_IGMP_VAR_H_
-#define _NETINET_IGMP_VAR_H_
-
-/*
- * Internet Group Management Protocol (IGMP),
- * implementation-specific definitions.
- *
- * Written by Steve Deering, Stanford, May 1988.
- *
- * MULTICAST Revision: 3.5.1.3
- */
-
-struct igmpstat {
- u_int igps_rcv_total; /* total IGMP messages received */
- u_int igps_rcv_tooshort; /* received with too few bytes */
- u_int igps_rcv_badsum; /* received with bad checksum */
- u_int igps_rcv_queries; /* received membership queries */
- u_int igps_rcv_badqueries; /* received invalid queries */
- u_int igps_rcv_reports; /* received membership reports */
- u_int igps_rcv_badreports; /* received invalid reports */
- u_int igps_rcv_ourreports; /* received reports for our groups */
- u_int igps_snd_reports; /* sent membership reports */
-};
-
-#ifdef KERNEL
-extern struct igmpstat igmpstat;
-
-#define IGMP_RANDOM_DELAY(X) (random() % (X) + 1)
-
-/*
- * States for IGMPv2's leave processing
- */
-#define IGMP_OTHERMEMBER 0
-#define IGMP_IREPORTEDLAST 1
-
-/*
- * We must remember what version the subnet's querier is.
- * We conveniently use the IGMP message type for the proper
- * membership report to keep this state.
- */
-#define IGMP_V1_ROUTER IGMP_V1_MEMBERSHIP_REPORT
-#define IGMP_V2_ROUTER IGMP_V2_MEMBERSHIP_REPORT
-
-/*
- * Revert to new router if we haven't heard from an old router in
- * this amount of time.
- */
-#define IGMP_AGE_THRESHOLD 540
-
-void igmp_init __P((void));
-void igmp_input __P((struct mbuf *, int));
-void igmp_joingroup __P((struct in_multi *));
-void igmp_leavegroup __P((struct in_multi *));
-void igmp_fasttimo __P((void));
-void igmp_slowtimo __P((void));
-#endif
-
-/*
- * Names for IGMP sysctl objects
- */
-#define IGMPCTL_STATS 1 /* statistics (read-only) */
-#define IGMPCTL_MAXID 2
-
-#define IGMPCTL_NAMES { \
- { 0, 0 }, \
- { "stats", CTLTYPE_STRUCT }, \
-}
-
-#endif
-
-
diff --git a/c/src/exec/libnetworking/netinet/in.c b/c/src/exec/libnetworking/netinet/in.c
deleted file mode 100644
index 701406f207..0000000000
--- a/c/src/exec/libnetworking/netinet/in.c
+++ /dev/null
@@ -1,728 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)in.c 8.4 (Berkeley) 1/9/95
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/systm.h>
-#include <sys/ioctl.h>
-#include <sys/errno.h>
-#include <sys/malloc.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/kernel.h>
-#include <sys/sysctl.h>
-
-#include <net/if.h>
-#include <net/route.h>
-
-#include <netinet/in_systm.h>
-#include <netinet/in.h>
-#include <netinet/in_var.h>
-#include <netinet/if_ether.h>
-
-#include <netinet/igmp_var.h>
-
-/*
- * This structure is used to keep track of in_multi chains which belong to
- * deleted interface addresses.
- */
-static LIST_HEAD(, multi_kludge) in_mk; /* XXX BSS initialization */
-
-struct multi_kludge {
- LIST_ENTRY(multi_kludge) mk_entry;
- struct ifnet *mk_ifp;
- struct in_multihead mk_head;
-};
-
-static void in_socktrim __P((struct sockaddr_in *));
-static int in_ifinit __P((struct ifnet *,
- struct in_ifaddr *, struct sockaddr_in *, int));
-static void in_ifscrub __P((struct ifnet *, struct in_ifaddr *));
-
-static int subnetsarelocal = 0;
-SYSCTL_INT(_net_inet_ip, OID_AUTO, subnets_are_local, CTLFLAG_RW,
- &subnetsarelocal, 0, "");
-/*
- * Return 1 if an internet address is for a ``local'' host
- * (one to which we have a connection). If subnetsarelocal
- * is true, this includes other subnets of the local net.
- * Otherwise, it includes only the directly-connected (sub)nets.
- */
-int
-in_localaddr(in)
- struct in_addr in;
-{
- register u_long i = ntohl(in.s_addr);
- register struct in_ifaddr *ia;
-
- if (subnetsarelocal) {
- for (ia = in_ifaddr; ia; ia = ia->ia_next)
- if ((i & ia->ia_netmask) == ia->ia_net)
- return (1);
- } else {
- for (ia = in_ifaddr; ia; ia = ia->ia_next)
- if ((i & ia->ia_subnetmask) == ia->ia_subnet)
- return (1);
- }
- return (0);
-}
-
-/*
- * Determine whether an IP address is in a reserved set of addresses
- * that may not be forwarded, or whether datagrams to that destination
- * may be forwarded.
- */
-int
-in_canforward(in)
- struct in_addr in;
-{
- register u_long i = ntohl(in.s_addr);
- register u_long net;
-
- if (IN_EXPERIMENTAL(i) || IN_MULTICAST(i))
- return (0);
- if (IN_CLASSA(i)) {
- net = i & IN_CLASSA_NET;
- if (net == 0 || net == (IN_LOOPBACKNET << IN_CLASSA_NSHIFT))
- return (0);
- }
- return (1);
-}
-
-/*
- * Trim a mask in a sockaddr
- */
-static void
-in_socktrim(ap)
-struct sockaddr_in *ap;
-{
- register char *cplim = (char *) &ap->sin_addr;
- register char *cp = (char *) (&ap->sin_addr + 1);
-
- ap->sin_len = 0;
- while (--cp >= cplim)
- if (*cp) {
- (ap)->sin_len = cp - (char *) (ap) + 1;
- break;
- }
-}
-
-static int in_interfaces; /* number of external internet interfaces */
-
-/*
- * Generic internet control operations (ioctl's).
- * Ifp is 0 if not an interface-specific ioctl.
- */
-/* ARGSUSED */
-int
-in_control(so, cmd, data, ifp)
- struct socket *so;
- u_long cmd;
- caddr_t data;
- register struct ifnet *ifp;
-{
- register struct ifreq *ifr = (struct ifreq *)data;
- register struct in_ifaddr *ia = 0, *iap;
- register struct ifaddr *ifa;
- struct in_ifaddr *oia;
- struct in_aliasreq *ifra = (struct in_aliasreq *)data;
- struct sockaddr_in oldaddr;
- int error, hostIsNew, maskIsNew, s;
- u_long i;
- struct multi_kludge *mk;
-
- /*
- * Find address for this interface, if it exists.
- *
- * If an alias address was specified, find that one instead of
- * the first one on the interface.
- */
- if (ifp)
- for (iap = in_ifaddr; iap; iap = iap->ia_next)
- if (iap->ia_ifp == ifp) {
- if (((struct sockaddr_in *)&ifr->ifr_addr)->sin_addr.s_addr ==
- iap->ia_addr.sin_addr.s_addr) {
- ia = iap;
- break;
- } else if (ia == NULL) {
- ia = iap;
- if (ifr->ifr_addr.sa_family != AF_INET)
- break;
- }
- }
-
- switch (cmd) {
-
- case SIOCAIFADDR:
- case SIOCDIFADDR:
- if (ifra->ifra_addr.sin_family == AF_INET) {
- for (oia = ia; ia; ia = ia->ia_next) {
- if (ia->ia_ifp == ifp &&
- ia->ia_addr.sin_addr.s_addr ==
- ifra->ifra_addr.sin_addr.s_addr)
- break;
- }
- if ((ifp->if_flags & IFF_POINTOPOINT)
- && (cmd == SIOCAIFADDR)
- && (ifra->ifra_dstaddr.sin_addr.s_addr
- == INADDR_ANY)) {
- return EDESTADDRREQ;
- }
- }
- if (cmd == SIOCDIFADDR && ia == 0)
- return (EADDRNOTAVAIL);
- /* FALLTHROUGH */
- case SIOCSIFADDR:
- case SIOCSIFNETMASK:
- case SIOCSIFDSTADDR:
- if ((so->so_state & SS_PRIV) == 0)
- return (EPERM);
-
- if (ifp == 0)
- panic("in_control");
- if (ia == (struct in_ifaddr *)0) {
- oia = (struct in_ifaddr *)
- malloc(sizeof *oia, M_IFADDR, M_WAITOK);
- if (oia == (struct in_ifaddr *)NULL)
- return (ENOBUFS);
- bzero((caddr_t)oia, sizeof *oia);
- ia = in_ifaddr;
- /*
- * Protect from ipintr() traversing address list
- * while we're modifying it.
- */
- s = splnet();
-
- if (ia) {
- for ( ; ia->ia_next; ia = ia->ia_next)
- continue;
- ia->ia_next = oia;
- } else
- in_ifaddr = oia;
- ia = oia;
- ifa = ifp->if_addrlist;
- if (ifa) {
- for ( ; ifa->ifa_next; ifa = ifa->ifa_next)
- continue;
- ifa->ifa_next = (struct ifaddr *) ia;
- } else
- ifp->if_addrlist = (struct ifaddr *) ia;
- ia->ia_ifa.ifa_addr = (struct sockaddr *)&ia->ia_addr;
- ia->ia_ifa.ifa_dstaddr
- = (struct sockaddr *)&ia->ia_dstaddr;
- ia->ia_ifa.ifa_netmask
- = (struct sockaddr *)&ia->ia_sockmask;
- ia->ia_sockmask.sin_len = 8;
- if (ifp->if_flags & IFF_BROADCAST) {
- ia->ia_broadaddr.sin_len = sizeof(ia->ia_addr);
- ia->ia_broadaddr.sin_family = AF_INET;
- }
- ia->ia_ifp = ifp;
- if (!(ifp->if_flags & IFF_LOOPBACK))
- in_interfaces++;
- splx(s);
- }
- break;
-
- case SIOCSIFBRDADDR:
- if ((so->so_state & SS_PRIV) == 0)
- return (EPERM);
- /* FALLTHROUGH */
-
- case SIOCGIFADDR:
- case SIOCGIFNETMASK:
- case SIOCGIFDSTADDR:
- case SIOCGIFBRDADDR:
- if (ia == (struct in_ifaddr *)0)
- return (EADDRNOTAVAIL);
- break;
- }
- switch (cmd) {
-
- case SIOCGIFADDR:
- *((struct sockaddr_in *)&ifr->ifr_addr) = ia->ia_addr;
- break;
-
- case SIOCGIFBRDADDR:
- if ((ifp->if_flags & IFF_BROADCAST) == 0)
- return (EINVAL);
- *((struct sockaddr_in *)&ifr->ifr_dstaddr) = ia->ia_broadaddr;
- break;
-
- case SIOCGIFDSTADDR:
- if ((ifp->if_flags & IFF_POINTOPOINT) == 0)
- return (EINVAL);
- *((struct sockaddr_in *)&ifr->ifr_dstaddr) = ia->ia_dstaddr;
- break;
-
- case SIOCGIFNETMASK:
- *((struct sockaddr_in *)&ifr->ifr_addr) = ia->ia_sockmask;
- break;
-
- case SIOCSIFDSTADDR:
- if ((ifp->if_flags & IFF_POINTOPOINT) == 0)
- return (EINVAL);
- oldaddr = ia->ia_dstaddr;
- ia->ia_dstaddr = *(struct sockaddr_in *)&ifr->ifr_dstaddr;
- if (ifp->if_ioctl && (error = (*ifp->if_ioctl)
- (ifp, SIOCSIFDSTADDR, (caddr_t)ia))) {
- ia->ia_dstaddr = oldaddr;
- return (error);
- }
- if (ia->ia_flags & IFA_ROUTE) {
- ia->ia_ifa.ifa_dstaddr = (struct sockaddr *)&oldaddr;
- rtinit(&(ia->ia_ifa), (int)RTM_DELETE, RTF_HOST);
- ia->ia_ifa.ifa_dstaddr =
- (struct sockaddr *)&ia->ia_dstaddr;
- rtinit(&(ia->ia_ifa), (int)RTM_ADD, RTF_HOST|RTF_UP);
- }
- break;
-
- case SIOCSIFBRDADDR:
- if ((ifp->if_flags & IFF_BROADCAST) == 0)
- return (EINVAL);
- ia->ia_broadaddr = *(struct sockaddr_in *)&ifr->ifr_broadaddr;
- break;
-
- case SIOCSIFADDR:
- return (in_ifinit(ifp, ia,
- (struct sockaddr_in *) &ifr->ifr_addr, 1));
-
- case SIOCSIFNETMASK:
- i = ifra->ifra_addr.sin_addr.s_addr;
- ia->ia_subnetmask = ntohl(ia->ia_sockmask.sin_addr.s_addr = i);
- break;
-
- case SIOCAIFADDR:
- maskIsNew = 0;
- hostIsNew = 1;
- error = 0;
- if (ia->ia_addr.sin_family == AF_INET) {
- if (ifra->ifra_addr.sin_len == 0) {
- ifra->ifra_addr = ia->ia_addr;
- hostIsNew = 0;
- } else if (ifra->ifra_addr.sin_addr.s_addr ==
- ia->ia_addr.sin_addr.s_addr)
- hostIsNew = 0;
- }
- if (ifra->ifra_mask.sin_len) {
- in_ifscrub(ifp, ia);
- ia->ia_sockmask = ifra->ifra_mask;
- ia->ia_subnetmask =
- ntohl(ia->ia_sockmask.sin_addr.s_addr);
- maskIsNew = 1;
- }
- if ((ifp->if_flags & IFF_POINTOPOINT) &&
- (ifra->ifra_dstaddr.sin_family == AF_INET)) {
- in_ifscrub(ifp, ia);
- ia->ia_dstaddr = ifra->ifra_dstaddr;
- maskIsNew = 1; /* We lie; but the effect's the same */
- }
- if (ifra->ifra_addr.sin_family == AF_INET &&
- (hostIsNew || maskIsNew))
- error = in_ifinit(ifp, ia, &ifra->ifra_addr, 0);
- if ((ifp->if_flags & IFF_BROADCAST) &&
- (ifra->ifra_broadaddr.sin_family == AF_INET))
- ia->ia_broadaddr = ifra->ifra_broadaddr;
- return (error);
-
- case SIOCDIFADDR:
- mk = malloc(sizeof *mk, M_IPMADDR, M_WAITOK);
- if (!mk)
- return ENOBUFS;
-
- in_ifscrub(ifp, ia);
- /*
- * Protect from ipintr() traversing address list
- * while we're modifying it.
- */
- s = splnet();
-
- if ((ifa = ifp->if_addrlist) == (struct ifaddr *)ia)
- ifp->if_addrlist = ifa->ifa_next;
- else {
- while (ifa->ifa_next &&
- (ifa->ifa_next != (struct ifaddr *)ia))
- ifa = ifa->ifa_next;
- if (ifa->ifa_next)
- ifa->ifa_next = ((struct ifaddr *)ia)->ifa_next;
- else
- printf("Couldn't unlink inifaddr from ifp\n");
- }
- oia = ia;
- if (oia == (ia = in_ifaddr))
- in_ifaddr = ia->ia_next;
- else {
- while (ia->ia_next && (ia->ia_next != oia))
- ia = ia->ia_next;
- if (ia->ia_next)
- ia->ia_next = oia->ia_next;
- else
- printf("Didn't unlink inifadr from list\n");
- }
-
- if (!oia->ia_multiaddrs.lh_first) {
- IFAFREE(&oia->ia_ifa);
- FREE(mk, M_IPMADDR);
- splx(s);
- break;
- }
-
- /*
- * Multicast address kludge:
- * If there were any multicast addresses attached to this
- * interface address, either move them to another address
- * on this interface, or save them until such time as this
- * interface is reconfigured for IP.
- */
- IFP_TO_IA(oia->ia_ifp, ia);
- if (ia) { /* there is another address */
- struct in_multi *inm;
- for(inm = oia->ia_multiaddrs.lh_first; inm;
- inm = inm->inm_entry.le_next) {
- IFAFREE(&inm->inm_ia->ia_ifa);
- ia->ia_ifa.ifa_refcnt++;
- inm->inm_ia = ia;
- LIST_INSERT_HEAD(&ia->ia_multiaddrs, inm,
- inm_entry);
- }
- FREE(mk, M_IPMADDR);
- } else { /* last address on this if deleted, save */
- struct in_multi *inm;
-
- LIST_INIT(&mk->mk_head);
- mk->mk_ifp = ifp;
-
- for(inm = oia->ia_multiaddrs.lh_first; inm;
- inm = inm->inm_entry.le_next) {
- LIST_INSERT_HEAD(&mk->mk_head, inm, inm_entry);
- }
-
- if (mk->mk_head.lh_first) {
- LIST_INSERT_HEAD(&in_mk, mk, mk_entry);
- } else {
- FREE(mk, M_IPMADDR);
- }
- }
-
- IFAFREE((&oia->ia_ifa));
- splx(s);
- break;
-
- default:
- if (ifp == 0 || ifp->if_ioctl == 0)
- return (EOPNOTSUPP);
- return ((*ifp->if_ioctl)(ifp, cmd, data));
- }
- return (0);
-}
-
-/*
- * Delete any existing route for an interface.
- */
-static void
-in_ifscrub(ifp, ia)
- register struct ifnet *ifp;
- register struct in_ifaddr *ia;
-{
-
- if ((ia->ia_flags & IFA_ROUTE) == 0)
- return;
- if (ifp->if_flags & (IFF_LOOPBACK|IFF_POINTOPOINT))
- rtinit(&(ia->ia_ifa), (int)RTM_DELETE, RTF_HOST);
- else
- rtinit(&(ia->ia_ifa), (int)RTM_DELETE, 0);
- ia->ia_flags &= ~IFA_ROUTE;
-}
-
-/*
- * Initialize an interface's internet address
- * and routing table entry.
- */
-static int
-in_ifinit(ifp, ia, sin, scrub)
- register struct ifnet *ifp;
- register struct in_ifaddr *ia;
- struct sockaddr_in *sin;
- int scrub;
-{
- register u_long i = ntohl(sin->sin_addr.s_addr);
- struct sockaddr_in oldaddr;
- int s = splimp(), flags = RTF_UP, error;
- struct multi_kludge *mk;
-
- oldaddr = ia->ia_addr;
- ia->ia_addr = *sin;
- /*
- * Give the interface a chance to initialize
- * if this is its first address,
- * and to validate the address if necessary.
- */
- if (ifp->if_ioctl &&
- (error = (*ifp->if_ioctl)(ifp, SIOCSIFADDR, (caddr_t)ia))) {
- splx(s);
- ia->ia_addr = oldaddr;
- return (error);
- }
- splx(s);
- if (scrub) {
- ia->ia_ifa.ifa_addr = (struct sockaddr *)&oldaddr;
- in_ifscrub(ifp, ia);
- ia->ia_ifa.ifa_addr = (struct sockaddr *)&ia->ia_addr;
- }
- if (IN_CLASSA(i))
- ia->ia_netmask = IN_CLASSA_NET;
- else if (IN_CLASSB(i))
- ia->ia_netmask = IN_CLASSB_NET;
- else
- ia->ia_netmask = IN_CLASSC_NET;
- /*
- * The subnet mask usually includes at least the standard network part,
- * but may may be smaller in the case of supernetting.
- * If it is set, we believe it.
- */
- if (ia->ia_subnetmask == 0) {
- ia->ia_subnetmask = ia->ia_netmask;
- ia->ia_sockmask.sin_addr.s_addr = htonl(ia->ia_subnetmask);
- } else
- ia->ia_netmask &= ia->ia_subnetmask;
- ia->ia_net = i & ia->ia_netmask;
- ia->ia_subnet = i & ia->ia_subnetmask;
- in_socktrim(&ia->ia_sockmask);
- /*
- * Add route for the network.
- */
- ia->ia_ifa.ifa_metric = ifp->if_metric;
- if (ifp->if_flags & IFF_BROADCAST) {
- ia->ia_broadaddr.sin_addr.s_addr =
- htonl(ia->ia_subnet | ~ia->ia_subnetmask);
- ia->ia_netbroadcast.s_addr =
- htonl(ia->ia_net | ~ ia->ia_netmask);
- } else if (ifp->if_flags & IFF_LOOPBACK) {
- ia->ia_ifa.ifa_dstaddr = ia->ia_ifa.ifa_addr;
- flags |= RTF_HOST;
- } else if (ifp->if_flags & IFF_POINTOPOINT) {
- if (ia->ia_dstaddr.sin_family != AF_INET)
- return (0);
- flags |= RTF_HOST;
- }
- if ((error = rtinit(&(ia->ia_ifa), (int)RTM_ADD, flags)) == 0)
- ia->ia_flags |= IFA_ROUTE;
-
- LIST_INIT(&ia->ia_multiaddrs);
- /*
- * If the interface supports multicast, join the "all hosts"
- * multicast group on that interface.
- */
- if (ifp->if_flags & IFF_MULTICAST) {
- struct in_addr addr;
-
- /*
- * Continuation of multicast address hack:
- * If there was a multicast group list previously saved
- * for this interface, then we re-attach it to the first
- * address configured on the i/f.
- */
- for(mk = in_mk.lh_first; mk; mk = mk->mk_entry.le_next) {
- if(mk->mk_ifp == ifp) {
- struct in_multi *inm;
-
- for(inm = mk->mk_head.lh_first; inm;
- inm = inm->inm_entry.le_next) {
- IFAFREE(&inm->inm_ia->ia_ifa);
- ia->ia_ifa.ifa_refcnt++;
- inm->inm_ia = ia;
- LIST_INSERT_HEAD(&ia->ia_multiaddrs,
- inm, inm_entry);
- }
- LIST_REMOVE(mk, mk_entry);
- free(mk, M_IPMADDR);
- break;
- }
- }
-
- addr.s_addr = htonl(INADDR_ALLHOSTS_GROUP);
- in_addmulti(&addr, ifp);
- }
- return (error);
-}
-
-
-/*
- * Return 1 if the address might be a local broadcast address.
- */
-int
-in_broadcast(in, ifp)
- struct in_addr in;
- struct ifnet *ifp;
-{
- register struct ifaddr *ifa;
- u_long t;
-
- if (in.s_addr == INADDR_BROADCAST ||
- in.s_addr == INADDR_ANY)
- return 1;
- if ((ifp->if_flags & IFF_BROADCAST) == 0)
- return 0;
- t = ntohl(in.s_addr);
- /*
- * Look through the list of addresses for a match
- * with a broadcast address.
- */
-#define ia ((struct in_ifaddr *)ifa)
- for (ifa = ifp->if_addrlist; ifa; ifa = ifa->ifa_next)
- if (ifa->ifa_addr->sa_family == AF_INET &&
- (in.s_addr == ia->ia_broadaddr.sin_addr.s_addr ||
- in.s_addr == ia->ia_netbroadcast.s_addr ||
- /*
- * Check for old-style (host 0) broadcast.
- */
- t == ia->ia_subnet || t == ia->ia_net) &&
- /*
- * Check for an all one subnetmask. These
- * only exist when an interface gets a secondary
- * address.
- */
- ia->ia_subnetmask != (u_long)0xffffffff)
- return 1;
- return (0);
-#undef ia
-}
-/*
- * Add an address to the list of IP multicast addresses for a given interface.
- */
-struct in_multi *
-in_addmulti(ap, ifp)
- register struct in_addr *ap;
- register struct ifnet *ifp;
-{
- register struct in_multi *inm;
- struct ifreq ifr;
- struct in_ifaddr *ia;
- int s = splnet();
-
- /*
- * See if address already in list.
- */
- IN_LOOKUP_MULTI(*ap, ifp, inm);
- if (inm != NULL) {
- /*
- * Found it; just increment the reference count.
- */
- ++inm->inm_refcount;
- }
- else {
- /*
- * New address; allocate a new multicast record
- * and link it into the interface's multicast list.
- */
- inm = (struct in_multi *)malloc(sizeof(*inm),
- M_IPMADDR, M_NOWAIT);
- if (inm == NULL) {
- splx(s);
- return (NULL);
- }
- inm->inm_addr = *ap;
- inm->inm_ifp = ifp;
- inm->inm_refcount = 1;
- IFP_TO_IA(ifp, ia);
- if (ia == NULL) {
- free(inm, M_IPMADDR);
- splx(s);
- return (NULL);
- }
- inm->inm_ia = ia;
- ia->ia_ifa.ifa_refcnt++; /* gain a reference */
- LIST_INSERT_HEAD(&ia->ia_multiaddrs, inm, inm_entry);
-
- /*
- * Ask the network driver to update its multicast reception
- * filter appropriately for the new address.
- */
- ((struct sockaddr_in *)&ifr.ifr_addr)->sin_family = AF_INET;
- ((struct sockaddr_in *)&ifr.ifr_addr)->sin_addr = *ap;
- if ((ifp->if_ioctl == NULL) ||
- (*ifp->if_ioctl)(ifp, SIOCADDMULTI,(caddr_t)&ifr) != 0) {
- LIST_REMOVE(inm, inm_entry);
- IFAFREE(&ia->ia_ifa); /* release reference */
- free(inm, M_IPMADDR);
- splx(s);
- return (NULL);
- }
- /*
- * Let IGMP know that we have joined a new IP multicast group.
- */
- igmp_joingroup(inm);
- }
- splx(s);
- return (inm);
-}
-
-/*
- * Delete a multicast address record.
- */
-void
-in_delmulti(inm)
- register struct in_multi *inm;
-{
- struct ifreq ifr;
- int s = splnet();
-
- if (--inm->inm_refcount == 0) {
- /*
- * No remaining claims to this record; let IGMP know that
- * we are leaving the multicast group.
- */
- igmp_leavegroup(inm);
- /*
- * Unlink from list.
- */
- LIST_REMOVE(inm, inm_entry);
- IFAFREE(&inm->inm_ia->ia_ifa); /* release reference */
-
- /*
- * Notify the network driver to update its multicast reception
- * filter.
- */
- ((struct sockaddr_in *)&(ifr.ifr_addr))->sin_family = AF_INET;
- ((struct sockaddr_in *)&(ifr.ifr_addr))->sin_addr =
- inm->inm_addr;
- (*inm->inm_ifp->if_ioctl)(inm->inm_ifp, SIOCDELMULTI,
- (caddr_t)&ifr);
- free(inm, M_IPMADDR);
- }
- splx(s);
-}
diff --git a/c/src/exec/libnetworking/netinet/in.h b/c/src/exec/libnetworking/netinet/in.h
deleted file mode 100644
index ba3cbb21cc..0000000000
--- a/c/src/exec/libnetworking/netinet/in.h
+++ /dev/null
@@ -1,433 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)in.h 8.3 (Berkeley) 1/3/94
- * $Id$
- */
-
-#ifndef _NETINET_IN_H_
-#define _NETINET_IN_H_
-
-/*
- * Constants and structures defined by the internet system,
- * Per RFC 790, September 1981, and numerous additions.
- */
-
-/*
- * Protocols (RFC 1700)
- */
-#define IPPROTO_IP 0 /* dummy for IP */
-#define IPPROTO_ICMP 1 /* control message protocol */
-#define IPPROTO_IGMP 2 /* group mgmt protocol */
-#define IPPROTO_GGP 3 /* gateway^2 (deprecated) */
-#define IPPROTO_IPIP 4 /* IP encapsulation in IP */
-#define IPPROTO_TCP 6 /* tcp */
-#define IPPROTO_ST 7 /* Stream protocol II */
-#define IPPROTO_EGP 8 /* exterior gateway protocol */
-#define IPPROTO_PIGP 9 /* private interior gateway */
-#define IPPROTO_RCCMON 10 /* BBN RCC Monitoring */
-#define IPPROTO_NVPII 11 /* network voice protocol*/
-#define IPPROTO_PUP 12 /* pup */
-#define IPPROTO_ARGUS 13 /* Argus */
-#define IPPROTO_EMCON 14 /* EMCON */
-#define IPPROTO_XNET 15 /* Cross Net Debugger */
-#define IPPROTO_CHAOS 16 /* Chaos*/
-#define IPPROTO_UDP 17 /* user datagram protocol */
-#define IPPROTO_MUX 18 /* Multiplexing */
-#define IPPROTO_MEAS 19 /* DCN Measurement Subsystems */
-#define IPPROTO_HMP 20 /* Host Monitoring */
-#define IPPROTO_PRM 21 /* Packet Radio Measurement */
-#define IPPROTO_IDP 22 /* xns idp */
-#define IPPROTO_TRUNK1 23 /* Trunk-1 */
-#define IPPROTO_TRUNK2 24 /* Trunk-2 */
-#define IPPROTO_LEAF1 25 /* Leaf-1 */
-#define IPPROTO_LEAF2 26 /* Leaf-2 */
-#define IPPROTO_RDP 27 /* Reliable Data */
-#define IPPROTO_IRTP 28 /* Reliable Transaction */
-#define IPPROTO_TP 29 /* tp-4 w/ class negotiation */
-#define IPPROTO_BLT 30 /* Bulk Data Transfer */
-#define IPPROTO_NSP 31 /* Network Services */
-#define IPPROTO_INP 32 /* Merit Internodal */
-#define IPPROTO_SEP 33 /* Sequential Exchange */
-#define IPPROTO_3PC 34 /* Third Party Connect */
-#define IPPROTO_IDPR 35 /* InterDomain Policy Routing */
-#define IPPROTO_XTP 36 /* XTP */
-#define IPPROTO_DDP 37 /* Datagram Delivery */
-#define IPPROTO_CMTP 38 /* Control Message Transport */
-#define IPPROTO_TPXX 39 /* TP++ Transport */
-#define IPPROTO_IL 40 /* IL transport protocol */
-#define IPPROTO_SIP 41 /* Simple Internet Protocol */
-#define IPPROTO_SDRP 42 /* Source Demand Routing */
-#define IPPROTO_SIPSR 43 /* SIP Source Route */
-#define IPPROTO_SIPFRAG 44 /* SIP Fragment */
-#define IPPROTO_IDRP 45 /* InterDomain Routing*/
-#define IPPROTO_RSVP 46 /* resource reservation */
-#define IPPROTO_GRE 47 /* General Routing Encap. */
-#define IPPROTO_MHRP 48 /* Mobile Host Routing */
-#define IPPROTO_BHA 49 /* BHA */
-#define IPPROTO_ESP 50 /* SIPP Encap Sec. Payload */
-#define IPPROTO_AH 51 /* SIPP Auth Header */
-#define IPPROTO_INLSP 52 /* Integ. Net Layer Security */
-#define IPPROTO_SWIPE 53 /* IP with encryption */
-#define IPPROTO_NHRP 54 /* Next Hop Resolution */
-/* 55-60: Unassigned */
-#define IPPROTO_AHIP 61 /* any host internal protocol */
-#define IPPROTO_CFTP 62 /* CFTP */
-#define IPPROTO_HELLO 63 /* "hello" routing protocol */
-#define IPPROTO_SATEXPAK 64 /* SATNET/Backroom EXPAK */
-#define IPPROTO_KRYPTOLAN 65 /* Kryptolan */
-#define IPPROTO_RVD 66 /* Remote Virtual Disk */
-#define IPPROTO_IPPC 67 /* Pluribus Packet Core */
-#define IPPROTO_ADFS 68 /* Any distributed FS */
-#define IPPROTO_SATMON 69 /* Satnet Monitoring */
-#define IPPROTO_VISA 70 /* VISA Protocol */
-#define IPPROTO_IPCV 71 /* Packet Core Utility */
-#define IPPROTO_CPNX 72 /* Comp. Prot. Net. Executive */
-#define IPPROTO_CPHB 73 /* Comp. Prot. HeartBeat */
-#define IPPROTO_WSN 74 /* Wang Span Network */
-#define IPPROTO_PVP 75 /* Packet Video Protocol */
-#define IPPROTO_BRSATMON 76 /* BackRoom SATNET Monitoring */
-#define IPPROTO_ND 77 /* Sun net disk proto (temp.) */
-#define IPPROTO_WBMON 78 /* WIDEBAND Monitoring */
-#define IPPROTO_WBEXPAK 79 /* WIDEBAND EXPAK */
-#define IPPROTO_EON 80 /* ISO cnlp */
-#define IPPROTO_VMTP 81 /* VMTP */
-#define IPPROTO_SVMTP 82 /* Secure VMTP */
-#define IPPROTO_VINES 83 /* Banyon VINES */
-#define IPPROTO_TTP 84 /* TTP */
-#define IPPROTO_IGP 85 /* NSFNET-IGP */
-#define IPPROTO_DGP 86 /* dissimilar gateway prot. */
-#define IPPROTO_TCF 87 /* TCF */
-#define IPPROTO_IGRP 88 /* Cisco/GXS IGRP */
-#define IPPROTO_OSPFIGP 89 /* OSPFIGP */
-#define IPPROTO_SRPC 90 /* Strite RPC protocol */
-#define IPPROTO_LARP 91 /* Locus Address Resoloution */
-#define IPPROTO_MTP 92 /* Multicast Transport */
-#define IPPROTO_AX25 93 /* AX.25 Frames */
-#define IPPROTO_IPEIP 94 /* IP encapsulated in IP */
-#define IPPROTO_MICP 95 /* Mobile Int.ing control */
-#define IPPROTO_SCCSP 96 /* Semaphore Comm. security */
-#define IPPROTO_ETHERIP 97 /* Ethernet IP encapsulation */
-#define IPPROTO_ENCAP 98 /* encapsulation header */
-#define IPPROTO_APES 99 /* any private encr. scheme */
-#define IPPROTO_GMTP 100 /* GMTP*/
-/* 101-254: Unassigned */
-/* 255: Reserved */
-/* BSD Private, local use, namespace incursion */
-#define IPPROTO_DIVERT 254 /* divert pseudo-protocol */
-#define IPPROTO_RAW 255 /* raw IP packet */
-#define IPPROTO_MAX 256
-
-
-/*
- * Local port number conventions:
- *
- * When a user does a bind(2) or connect(2) with a port number of zero,
- * a non-conflicting local port address is chosen.
- * The default range is IPPORT_RESERVED through
- * IPPORT_USERRESERVED, although that is settable by sysctl.
- *
- * A user may set the IPPROTO_IP option IP_PORTRANGE to change this
- * default assignment range.
- *
- * The value IP_PORTRANGE_DEFAULT causes the default behavior.
- *
- * The value IP_PORTRANGE_HIGH changes the range of candidate port numbers
- * into the "high" range. These are reserved for client outbound connections
- * which do not want to be filtered by any firewalls.
- *
- * The value IP_PORTRANGE_LOW changes the range to the "low" are
- * that is (by convention) restricted to privileged processes. This
- * convention is based on "vouchsafe" principles only. It is only secure
- * if you trust the remote host to restrict these ports.
- *
- * The default range of ports and the high range can be changed by
- * sysctl(3). (net.inet.ip.port{hi,low}{first,last}_auto)
- *
- * Changing those values has bad security implications if you are
- * using a a stateless firewall that is allowing packets outside of that
- * range in order to allow transparent outgoing connections.
- *
- * Such a firewall configuration will generally depend on the use of these
- * default values. If you change them, you may find your Security
- * Administrator looking for you with a heavy object.
- */
-
-/*
- * Ports < IPPORT_RESERVED are reserved for
- * privileged processes (e.g. root). (IP_PORTRANGE_LOW)
- * Ports > IPPORT_USERRESERVED are reserved
- * for servers, not necessarily privileged. (IP_PORTRANGE_DEFAULT)
- */
-#define IPPORT_RESERVED 1024
-#define IPPORT_USERRESERVED 5000
-
-/*
- * Default local port range to use by setting IP_PORTRANGE_HIGH
- */
-#define IPPORT_HIFIRSTAUTO 40000
-#define IPPORT_HILASTAUTO 44999
-
-/*
- * Scanning for a free reserved port return a value below IPPORT_RESERVED,
- * but higher than IPPORT_RESERVEDSTART. Traditionally the start value was
- * 512, but that conflicts with some well-known-services that firewalls may
- * have a fit if we use.
- */
-#define IPPORT_RESERVEDSTART 600
-
-/*
- * Internet address (a structure for historical reasons)
- */
-struct in_addr {
- u_long s_addr;
-};
-
-/*
- * Definitions of bits in internet address integers.
- * On subnets, the decomposition of addresses to host and net parts
- * is done according to subnet mask, not the masks here.
- */
-#define IN_CLASSA(i) (((long)(i) & 0x80000000) == 0)
-#define IN_CLASSA_NET 0xff000000
-#define IN_CLASSA_NSHIFT 24
-#define IN_CLASSA_HOST 0x00ffffff
-#define IN_CLASSA_MAX 128
-
-#define IN_CLASSB(i) (((long)(i) & 0xc0000000) == 0x80000000)
-#define IN_CLASSB_NET 0xffff0000
-#define IN_CLASSB_NSHIFT 16
-#define IN_CLASSB_HOST 0x0000ffff
-#define IN_CLASSB_MAX 65536
-
-#define IN_CLASSC(i) (((long)(i) & 0xe0000000) == 0xc0000000)
-#define IN_CLASSC_NET 0xffffff00
-#define IN_CLASSC_NSHIFT 8
-#define IN_CLASSC_HOST 0x000000ff
-
-#define IN_CLASSD(i) (((long)(i) & 0xf0000000) == 0xe0000000)
-#define IN_CLASSD_NET 0xf0000000 /* These ones aren't really */
-#define IN_CLASSD_NSHIFT 28 /* net and host fields, but */
-#define IN_CLASSD_HOST 0x0fffffff /* routing needn't know. */
-#define IN_MULTICAST(i) IN_CLASSD(i)
-
-#define IN_EXPERIMENTAL(i) (((long)(i) & 0xf0000000) == 0xf0000000)
-#define IN_BADCLASS(i) (((long)(i) & 0xf0000000) == 0xf0000000)
-
-#define INADDR_ANY (u_long)0x00000000
-#define INADDR_BROADCAST (u_long)0xffffffff /* must be masked */
-#ifndef KERNEL
-#define INADDR_NONE 0xffffffff /* -1 return */
-#endif
-
-#define INADDR_UNSPEC_GROUP (u_long)0xe0000000 /* 224.0.0.0 */
-#define INADDR_ALLHOSTS_GROUP (u_long)0xe0000001 /* 224.0.0.1 */
-#define INADDR_ALLRTRS_GROUP (u_long)0xe0000002 /* 224.0.0.2 */
-#define INADDR_MAX_LOCAL_GROUP (u_long)0xe00000ff /* 224.0.0.255 */
-
-#define IN_LOOPBACKNET 127 /* official! */
-
-/*
- * Socket address, internet style.
- */
-struct sockaddr_in {
- u_char sin_len;
- u_char sin_family;
- u_short sin_port;
- struct in_addr sin_addr;
- char sin_zero[8];
-};
-
-/*
- * Structure used to describe IP options.
- * Used to store options internally, to pass them to a process,
- * or to restore options retrieved earlier.
- * The ip_dst is used for the first-hop gateway when using a source route
- * (this gets put into the header proper).
- */
-struct ip_opts {
- struct in_addr ip_dst; /* first hop, 0 w/o src rt */
- char ip_opts[40]; /* actually variable in size */
-};
-
-/*
- * Options for use with [gs]etsockopt at the IP level.
- * First word of comment is data type; bool is stored in int.
- */
-#define IP_OPTIONS 1 /* buf/ip_opts; set/get IP options */
-#define IP_HDRINCL 2 /* int; header is included with data */
-#define IP_TOS 3 /* int; IP type of service and preced. */
-#define IP_TTL 4 /* int; IP time to live */
-#define IP_RECVOPTS 5 /* bool; receive all IP opts w/dgram */
-#define IP_RECVRETOPTS 6 /* bool; receive IP opts for response */
-#define IP_RECVDSTADDR 7 /* bool; receive IP dst addr w/dgram */
-#define IP_RETOPTS 8 /* ip_opts; set/get IP options */
-#define IP_MULTICAST_IF 9 /* u_char; set/get IP multicast i/f */
-#define IP_MULTICAST_TTL 10 /* u_char; set/get IP multicast ttl */
-#define IP_MULTICAST_LOOP 11 /* u_char; set/get IP multicast loopback */
-#define IP_ADD_MEMBERSHIP 12 /* ip_mreq; add an IP group membership */
-#define IP_DROP_MEMBERSHIP 13 /* ip_mreq; drop an IP group membership */
-#define IP_MULTICAST_VIF 14 /* set/get IP mcast virt. iface */
-#define IP_RSVP_ON 15 /* enable RSVP in kernel */
-#define IP_RSVP_OFF 16 /* disable RSVP in kernel */
-#define IP_RSVP_VIF_ON 17 /* set RSVP per-vif socket */
-#define IP_RSVP_VIF_OFF 18 /* unset RSVP per-vif socket */
-#define IP_PORTRANGE 19 /* int; range to choose for unspec port */
-#define IP_RECVIF 20 /* bool; receive reception if w/dgram */
-
-#define IP_FW_ADD 50 /* add a firewall rule to chain */
-#define IP_FW_DEL 51 /* delete a firewall rule from chain */
-#define IP_FW_FLUSH 52 /* flush firewall rule chain */
-#define IP_FW_ZERO 53 /* clear single/all firewall counter(s) */
-#define IP_FW_GET 54 /* get entire firewall rule chain */
-#define IP_NAT 55 /* set/get NAT opts */
-
-/*
- * Defaults and limits for options
- */
-#define IP_DEFAULT_MULTICAST_TTL 1 /* normally limit m'casts to 1 hop */
-#define IP_DEFAULT_MULTICAST_LOOP 1 /* normally hear sends if a member */
-#define IP_MAX_MEMBERSHIPS 20 /* per socket */
-
-/*
- * Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP.
- */
-struct ip_mreq {
- struct in_addr imr_multiaddr; /* IP multicast address of group */
- struct in_addr imr_interface; /* local IP address of interface */
-};
-
-/*
- * Argument for IP_PORTRANGE:
- * - which range to search when port is unspecified at bind() or connect()
- */
-#define IP_PORTRANGE_DEFAULT 0 /* default range */
-#define IP_PORTRANGE_HIGH 1 /* "high" - request firewall bypass */
-#define IP_PORTRANGE_LOW 2 /* "low" - vouchsafe security */
-
-/*
- * Definitions for inet sysctl operations.
- *
- * Third level is protocol number.
- * Fourth level is desired variable within that protocol.
- */
-#define IPPROTO_MAXID (IPPROTO_IDP + 1) /* don't list to IPPROTO_MAX */
-
-#define CTL_IPPROTO_NAMES { \
- { "ip", CTLTYPE_NODE }, \
- { "icmp", CTLTYPE_NODE }, \
- { "igmp", CTLTYPE_NODE }, \
- { "ggp", CTLTYPE_NODE }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { "tcp", CTLTYPE_NODE }, \
- { 0, 0 }, \
- { "egp", CTLTYPE_NODE }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { "pup", CTLTYPE_NODE }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { "udp", CTLTYPE_NODE }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { "idp", CTLTYPE_NODE }, \
-}
-
-/*
- * Names for IP sysctl objects
- */
-#define IPCTL_FORWARDING 1 /* act as router */
-#define IPCTL_SENDREDIRECTS 2 /* may send redirects when forwarding */
-#define IPCTL_DEFTTL 3 /* default TTL */
-#ifdef notyet
-#define IPCTL_DEFMTU 4 /* default MTU */
-#endif
-#define IPCTL_RTEXPIRE 5 /* cloned route expiration time */
-#define IPCTL_RTMINEXPIRE 6 /* min value for expiration time */
-#define IPCTL_RTMAXCACHE 7 /* trigger level for dynamic expire */
-#define IPCTL_SOURCEROUTE 8 /* may perform source routes */
-#define IPCTL_DIRECTEDBROADCAST 9 /* may re-broadcast received packets */
-#define IPCTL_INTRQMAXLEN 10 /* max length of netisr queue */
-#define IPCTL_INTRQDROPS 11 /* number of netisr q drops */
-#define IPCTL_ACCEPTSOURCEROUTE 13 /* may accept source routed packets */
-#define IPCTL_MAXID 13
-
-#define IPCTL_NAMES { \
- { 0, 0 }, \
- { "forwarding", CTLTYPE_INT }, \
- { "redirect", CTLTYPE_INT }, \
- { "ttl", CTLTYPE_INT }, \
- { "mtu", CTLTYPE_INT }, \
- { "rtexpire", CTLTYPE_INT }, \
- { "rtminexpire", CTLTYPE_INT }, \
- { "rtmaxcache", CTLTYPE_INT }, \
- { "sourceroute", CTLTYPE_INT }, \
- { "directed-broadcast", CTLTYPE_INT }, \
- { "intr-queue-maxlen", CTLTYPE_INT }, \
- { "intr-queue-drops", CTLTYPE_INT }, \
- { "accept_sourceroute", CTLTYPE_INT }, \
-}
-
-
-#ifdef KERNEL
-struct ifnet; struct mbuf; /* forward declarations for Standard C */
-
-int in_broadcast __P((struct in_addr, struct ifnet *));
-int in_canforward __P((struct in_addr));
-int in_cksum __P((struct mbuf *, int));
-int in_localaddr __P((struct in_addr));
-char *inet_ntoa __P((struct in_addr)); /* in libkern */
-
-/* Firewall hooks */
-struct ip;
-typedef int ip_fw_chk_t __P((struct ip**, int, struct ifnet*, int, struct mbuf**));
-typedef int ip_fw_ctl_t __P((int, struct mbuf**));
-extern ip_fw_chk_t *ip_fw_chk_ptr;
-extern ip_fw_ctl_t *ip_fw_ctl_ptr;
-
-/* IP NAT hooks */
-typedef int ip_nat_t __P((struct ip**, struct mbuf**, struct ifnet*, int));
-typedef int ip_nat_ctl_t __P((int, struct mbuf**));
-extern ip_nat_t *ip_nat_ptr;
-extern ip_nat_ctl_t *ip_nat_ctl_ptr;
-#define IP_NAT_IN 0x00000001
-#define IP_NAT_OUT 0x00000002
-
-#endif /* KERNEL */
-
-#endif
diff --git a/c/src/exec/libnetworking/netinet/in_cksum.c b/c/src/exec/libnetworking/netinet/in_cksum.c
deleted file mode 100644
index c7792e0e87..0000000000
--- a/c/src/exec/libnetworking/netinet/in_cksum.c
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * Copyright (c) 1988, 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)in_cksum.c 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/mbuf.h>
-
-/*
- * Try to use a CPU specific version, then punt to the portable C one.
- */
-
-#if (defined(__GNUC__) && (defined(__mc68000__) || defined(__m68k__)))
-
-#include "in_cksum_m68k.c"
-
-#elif (defined(__GNUC__) && defined(__i386__))
-
-#include "in_cksum_i386.c"
-
-#elif (defined(__GNUC__) && defined(__PPC__))
-
-#include "in_cksum_powerpc.c"
-
-#else
-
-/*
- * Checksum routine for Internet Protocol family headers (Portable Version).
- *
- * This routine is very heavily used in the network
- * code and should be modified for each CPU to be as fast as possible.
- */
-
-#define ADDCARRY(x) (x > 65535 ? x -= 65535 : x)
-#define REDUCE \
- {l_util.l = sum; sum = l_util.s[0] + l_util.s[1]; ADDCARRY(sum);}
-
-int
-in_cksum(m, len)
- register struct mbuf *m;
- register int len;
-{
- register u_short *w;
- register int sum = 0;
- register int mlen = 0;
- int byte_swapped = 0;
-
- union {
- char c[2];
- u_short s;
- } s_util;
- union {
- u_short s[2];
- long l;
- } l_util;
-
- for (;m && len; m = m->m_next) {
- if (m->m_len == 0)
- continue;
- w = mtod(m, u_short *);
- if (mlen == -1) {
- /*
- * The first byte of this mbuf is the continuation
- * of a word spanning between this mbuf and the
- * last mbuf.
- *
- * s_util.c[0] is already saved when scanning previous
- * mbuf.
- */
- s_util.c[1] = *(char *)w;
- sum += s_util.s;
- w = (u_short *)((char *)w + 1);
- mlen = m->m_len - 1;
- len--;
- } else
- mlen = m->m_len;
- if (len < mlen)
- mlen = len;
- len -= mlen;
- /*
- * Force to even boundary.
- */
- if ((1 & (int) w) && (mlen > 0)) {
- REDUCE;
- sum <<= 8;
- s_util.c[0] = *(u_char *)w;
- w = (u_short *)((char *)w + 1);
- mlen--;
- byte_swapped = 1;
- }
- /*
- * Unroll the loop to make overhead from
- * branches &c small.
- */
- while ((mlen -= 32) >= 0) {
- sum += w[0]; sum += w[1]; sum += w[2]; sum += w[3];
- sum += w[4]; sum += w[5]; sum += w[6]; sum += w[7];
- sum += w[8]; sum += w[9]; sum += w[10]; sum += w[11];
- sum += w[12]; sum += w[13]; sum += w[14]; sum += w[15];
- w += 16;
- }
- mlen += 32;
- while ((mlen -= 8) >= 0) {
- sum += w[0]; sum += w[1]; sum += w[2]; sum += w[3];
- w += 4;
- }
- mlen += 8;
- if (mlen == 0 && byte_swapped == 0)
- continue;
- REDUCE;
- while ((mlen -= 2) >= 0) {
- sum += *w++;
- }
- if (byte_swapped) {
- REDUCE;
- sum <<= 8;
- byte_swapped = 0;
- if (mlen == -1) {
- s_util.c[1] = *(char *)w;
- sum += s_util.s;
- mlen = 0;
- } else
- mlen = -1;
- } else if (mlen == -1)
- s_util.c[0] = *(char *)w;
- }
- if (len)
- puts("cksum: out of data");
- if (mlen == -1) {
- /* The last mbuf has odd # of bytes. Follow the
- standard (the odd byte may be shifted left by 8 bits
- or not as determined by endian-ness of the machine) */
- s_util.c[1] = 0;
- sum += s_util.s;
- }
- REDUCE;
- return (~sum & 0xffff);
-}
-#endif
diff --git a/c/src/exec/libnetworking/netinet/in_cksum_i386.c b/c/src/exec/libnetworking/netinet/in_cksum_i386.c
deleted file mode 100644
index 0612c5a7c4..0000000000
--- a/c/src/exec/libnetworking/netinet/in_cksum_i386.c
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- * Checksum routine for Internet Protocol family headers.
- *
- * This routine is very heavily used in the network
- * code and should be modified for each CPU to be as fast as possible.
- *
- * This implementation is 386 version.
- *
- * $Id$
- */
-
-#include <stdio.h> /* for puts */
-
-#undef ADDCARRY
-#define ADDCARRY(x) if ((x) > 0xffff) (x) -= 0xffff
-#define REDUCE {sum = (sum & 0xffff) + (sum >> 16); ADDCARRY(sum);}
-
-/*
- * Thanks to gcc we don't have to guess
- * which registers contain sum & w.
- */
-#define ADD(n) asm("addl " #n "(%2), %0" : "=r" (sum) : "0" (sum), "r" (w))
-#define ADDC(n) asm("adcl " #n "(%2), %0" : "=r" (sum) : "0" (sum), "r" (w))
-#define LOAD(n) asm volatile("movb " #n "(%1), %0" : "=r" (junk) : "r" (w))
-#define MOP asm("adcl $0, %0" : "=r" (sum) : "0" (sum))
-
-int
-in_cksum(m, len)
- register struct mbuf *m;
- register int len;
-{
- register u_short *w;
- register unsigned sum = 0;
- register int mlen = 0;
- int byte_swapped = 0;
- union { char c[2]; u_short s; } su;
-
- for (;m && len; m = m->m_next) {
- if (m->m_len == 0)
- continue;
- w = mtod(m, u_short *);
- if (mlen == -1) {
- /*
- * The first byte of this mbuf is the continuation
- * of a word spanning between this mbuf and the
- * last mbuf.
- */
-
- /* su.c[0] is already saved when scanning previous
- * mbuf. sum was REDUCEd when we found mlen == -1
- */
- su.c[1] = *(u_char *)w;
- sum += su.s;
- w = (u_short *)((char *)w + 1);
- mlen = m->m_len - 1;
- len--;
- } else
- mlen = m->m_len;
- if (len < mlen)
- mlen = len;
- len -= mlen;
- /*
- * Force to long boundary so we do longword aligned
- * memory operations
- */
- if (3 & (int) w) {
- REDUCE;
- if ((1 & (int) w) && (mlen > 0)) {
- sum <<= 8;
- su.c[0] = *(char *)w;
- w = (u_short *)((char *)w + 1);
- mlen--;
- byte_swapped = 1;
- }
- if ((2 & (int) w) && (mlen >= 2)) {
- sum += *w++;
- mlen -= 2;
- }
- }
- /*
- * Advance to a 486 cache line boundary.
- */
- if (4 & (int) w && mlen >= 4) {
- ADD(0);
- MOP;
- w += 2;
- mlen -= 4;
- }
- if (8 & (int) w && mlen >= 8) {
- ADD(0);
- ADDC(4);
- MOP;
- w += 4;
- mlen -= 8;
- }
- /*
- * Do as much of the checksum as possible 32 bits at at time.
- * In fact, this loop is unrolled to make overhead from
- * branches &c small.
- */
- mlen -= 1;
- while ((mlen -= 32) >= 0) {
- u_char junk;
- /*
- * Add with carry 16 words and fold in the last
- * carry by adding a 0 with carry.
- *
- * The early ADD(16) and the LOAD(32) are to load
- * the next 2 cache lines in advance on 486's. The
- * 486 has a penalty of 2 clock cycles for loading
- * a cache line, plus whatever time the external
- * memory takes to load the first word(s) addressed.
- * These penalties are unavoidable. Subsequent
- * accesses to a cache line being loaded (and to
- * other external memory?) are delayed until the
- * whole load finishes. These penalties are mostly
- * avoided by not accessing external memory for
- * 8 cycles after the ADD(16) and 12 cycles after
- * the LOAD(32). The loop terminates when mlen
- * is initially 33 (not 32) to guaranteed that
- * the LOAD(32) is within bounds.
- */
- ADD(16);
- ADDC(0);
- ADDC(4);
- ADDC(8);
- ADDC(12);
- LOAD(32);
- ADDC(20);
- ADDC(24);
- ADDC(28);
- MOP;
- w += 16;
- }
- mlen += 32 + 1;
- if (mlen >= 32) {
- ADD(16);
- ADDC(0);
- ADDC(4);
- ADDC(8);
- ADDC(12);
- ADDC(20);
- ADDC(24);
- ADDC(28);
- MOP;
- w += 16;
- mlen -= 32;
- }
- if (mlen >= 16) {
- ADD(0);
- ADDC(4);
- ADDC(8);
- ADDC(12);
- MOP;
- w += 8;
- mlen -= 16;
- }
- if (mlen >= 8) {
- ADD(0);
- ADDC(4);
- MOP;
- w += 4;
- mlen -= 8;
- }
- if (mlen == 0 && byte_swapped == 0)
- continue; /* worth 1% maybe ?? */
- REDUCE;
- while ((mlen -= 2) >= 0) {
- sum += *w++;
- }
- if (byte_swapped) {
- sum <<= 8;
- byte_swapped = 0;
- if (mlen == -1) {
- su.c[1] = *(char *)w;
- sum += su.s;
- mlen = 0;
- } else
- mlen = -1;
- } else if (mlen == -1)
- /*
- * This mbuf has odd number of bytes.
- * There could be a word split betwen
- * this mbuf and the next mbuf.
- * Save the last byte (to prepend to next mbuf).
- */
- su.c[0] = *(char *)w;
- }
-
- if (len)
- puts("cksum: out of data");
- if (mlen == -1) {
- /* The last mbuf has odd # of bytes. Follow the
- standard (the odd byte is shifted left by 8 bits) */
- su.c[1] = 0;
- sum += su.s;
- }
- REDUCE;
- return (~sum & 0xffff);
-}
diff --git a/c/src/exec/libnetworking/netinet/in_cksum_m68k.c b/c/src/exec/libnetworking/netinet/in_cksum_m68k.c
deleted file mode 100644
index 58199c3adf..0000000000
--- a/c/src/exec/libnetworking/netinet/in_cksum_m68k.c
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- * Copyright (c) 1988, 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)in_cksum.c 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/mbuf.h>
-
-#if (defined (__mcf5200__))
-# define IS_COLDFIRE 1
-#else
-# define IS_COLDFIRE 0
-#endif
-
-#define REDUCE { sum = (sum & 0xFFFF) + (sum >> 16); if (sum > 0xFFFF) sum -= 0xFFFF; }
-
-/*
- * Motorola 68k version of Internet Protocol Checksum routine
- * W. Eric Norum
- * Saskatchewan Accelerator Laboratory
- * August, 1998
- */
-int
-in_cksum(m, len)
- struct mbuf *m;
- int len;
-{
- unsigned short *w;
- unsigned long sum = 0;
- int mlen = 0;
- int byte_swapped = 0;
- union {
- char c[2];
- u_short s;
- } s_util;
-
- for ( ; m && len ; m = m->m_next) {
- if (m->m_len == 0)
- continue;
- w = mtod(m, u_short *);
- if (mlen == -1) {
- /*
- * The first byte of this mbuf is the continuation
- * of a word spanning between this mbuf and the
- * last mbuf.
- *
- * s_util.c[0] is already saved when scanning previous
- * mbuf.
- */
- s_util.c[1] = *(char *)w;
- sum += s_util.s;
- w = (u_short *)((char *)w + 1);
- mlen = m->m_len - 1;
- len--;
- } else
- mlen = m->m_len;
- if (len < mlen)
- mlen = len;
- len -= mlen;
-
- /*
- * Force to longword boundary.
- */
- if (3 & (int)w) {
- REDUCE;
- if ((1 & (int) w) && (mlen > 0)) {
- sum <<= 8;
- s_util.c[0] = *(u_char *)w;
- w = (u_short *)((char *)w + 1);
- mlen--;
- byte_swapped = 1;
- }
- if ((2 & (int) w) && (mlen >= 2)) {
- sum += *w++;
- mlen -= 2;
- }
- }
-
- /*
- * Sum all the longwords in the buffer.
- * See RFC 1071 -- Computing the Internet Checksum.
- * It should work for all 68k family members.
- */
- {
- unsigned long tcnt = mlen, t1;
- __asm__ volatile (
- "movel %2,%3\n\t"
- "lsrl #6,%2 | count/64 = # loop traversals\n\t"
- "andl #0x3c,%3 | Then find fractions of a chunk\n\t"
- "negl %3\n\t | Each long uses 4 instruction bytes\n\t"
-#if IS_COLDFIRE
- "addql #1,%2 | Clear X (extended carry flag)\n\t"
- "subql #1,%2 | \n\t"
-#else
- "andi #0xf,%%cc | Clear X (extended carry flag)\n\t"
-#endif
- "jmp %%pc@(lcsum2_lbl-.-2:b,%3) | Jump into loop\n"
- "lcsum1_lbl: | Begin inner loop...\n\t"
- "movel %1@+,%3 | 0: Fetch 32-bit word\n\t"
- "addxl %3,%0 | Add word + previous carry\n\t"
- "movel %1@+,%3 | 1: Fetch 32-bit word\n\t"
- "addxl %3,%0 | Add word + previous carry\n\t"
- "movel %1@+,%3 | 2: Fetch 32-bit word\n\t"
- "addxl %3,%0 | Add word + previous carry\n\t"
- "movel %1@+,%3 | 3: Fetch 32-bit word\n\t"
- "addxl %3,%0 | Add word + previous carry\n\t"
- "movel %1@+,%3 | 4: Fetch 32-bit word\n\t"
- "addxl %3,%0 | Add word + previous carry\n\t"
- "movel %1@+,%3 | 5: Fetch 32-bit word\n\t"
- "addxl %3,%0 | Add word + previous carry\n\t"
- "movel %1@+,%3 | 6: Fetch 32-bit word\n\t"
- "addxl %3,%0 | Add word + previous carry\n\t"
- "movel %1@+,%3 | 7: Fetch 32-bit word\n\t"
- "addxl %3,%0 | Add word + previous carry\n\t"
- "movel %1@+,%3 | 8: Fetch 32-bit word\n\t"
- "addxl %3,%0 | Add word + previous carry\n\t"
- "movel %1@+,%3 | 9: Fetch 32-bit word\n\t"
- "addxl %3,%0 | Add word + previous carry\n\t"
- "movel %1@+,%3 | A: Fetch 32-bit word\n\t"
- "addxl %3,%0 | Add word + previous carry\n\t"
- "movel %1@+,%3 | B: Fetch 32-bit word\n\t"
- "addxl %3,%0 | Add word + previous carry\n\t"
- "movel %1@+,%3 | C: Fetch 32-bit word\n\t"
- "addxl %3,%0 | Add word + previous carry\n\t"
- "movel %1@+,%3 | D: Fetch 32-bit word\n\t"
- "addxl %3,%0 | Add word + previous carry\n\t"
- "movel %1@+,%3 | E: Fetch 32-bit word\n\t"
- "addxl %3,%0 | Add word + previous carry\n\t"
- "movel %1@+,%3 | F: Fetch 32-bit word\n\t"
- "addxl %3,%0 | Add word + previous carry\n"
- "lcsum2_lbl: | End of unrolled loop\n\t"
-#if IS_COLDFIRE
- "moveq #0,%3 | Add in last carry\n\t"
- "addxl %3,%0 |\n\t"
- "subql #1,%2 | Update loop count\n\t"
- "bplb lcsum1_lbl | Loop (with X clear) if not done\n\t"
- "movel #0xffff,%2 | Get word mask\n\t"
- "movel %0,%3 | Fold 32 bit sum to 16 bits\n\t"
- "swap %3 |\n\t"
- "andl %2,%0 | Mask to 16-bit sum\n\t"
- "andl %2,%3 | Mask to 16-bit sum\n\t"
- "addl %3,%0 |\n\t"
- "movel %0,%3 | Add in last carry\n\t"
- "swap %3 |\n\t"
- "addl %3,%0 |\n\t"
- "andl %2,%0 | Mask to 16-bit sum\n\t"
-#else
- "dbf %2,lcsum1_lbl | (NB- dbf doesn't affect X)\n\t"
- "movel %0,%3 | Fold 32 bit sum to 16 bits\n\t"
- "swap %3 | (NB- swap doesn't affect X)\n\t"
- "addxw %3,%0 |\n\t"
- "moveq #0,%3 | Add in last carry\n\t"
- "addxw %3,%0 |\n\t"
- "andl #0xffff,%0 | Mask to 16-bit sum\n"
-#endif
- :
- "=d" (sum), "=a" (w), "=d" (tcnt) , "=d" (t1) :
- "0" (sum), "1" (w), "2" (tcnt) :
- "cc", "memory");
- }
- mlen &= 3;
-
- /*
- * Soak up the last 1, 2 or 3 bytes
- */
- while ((mlen -= 2) >= 0)
- sum += *w++;
- if (byte_swapped) {
- REDUCE;
- sum <<= 8;
- byte_swapped = 0;
- if (mlen == -1) {
- s_util.c[1] = *(char *)w;
- sum += s_util.s;
- mlen = 0;
- } else
- mlen = -1;
- } else if (mlen == -1)
- s_util.c[0] = *(char *)w;
- }
- if (len)
- sum = 0xDEAD;
- if (mlen == -1) {
- /* The last mbuf has odd # of bytes. Follow the
- standard (the odd byte may be shifted left by 8 bits
- or not as determined by endian-ness of the machine) */
- s_util.c[1] = 0;
- sum += s_util.s;
- }
- REDUCE;
- return (~sum & 0xffff);
-}
diff --git a/c/src/exec/libnetworking/netinet/in_cksum_powerpc.c b/c/src/exec/libnetworking/netinet/in_cksum_powerpc.c
deleted file mode 100644
index fe2f04e246..0000000000
--- a/c/src/exec/libnetworking/netinet/in_cksum_powerpc.c
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * Checksum routine for Internet Protocol family headers.
- *
- * This routine is very heavily used in the network
- * code and should be modified for each CPU to be as fast as possible.
- *
- * This implementation is the PowerPC version.
- *
- * $Id$
- */
-
-#include <stdio.h> /* for puts */
-
-#undef ADDCARRY
-#define ADDCARRY(x) if ((x) > 0xffff) (x) -= 0xffff
-#define REDUCE {sum = (sum & 0xffff) + (sum >> 16); ADDCARRY(sum);}
-
-/*
- * Thanks to gcc we don't have to guess
- * which registers contain sum & w.
- */
-
-#define LDTMP(n) tmp = *((u_int *)((u_char *)w + n))
-
-#define ADD(n) \
- LDTMP(n); \
- __asm__ volatile("addc %0,%0,%2" : "=r" (sum) : "0" (sum), "r" (tmp))
-
-#define ADDC(n) \
- LDTMP(n); \
- __asm__ volatile("adde %0,%0,%2" : "=r" (sum) : "0" (sum), "r" (tmp))
-
-#define MOP \
- tmp = 0; \
- __asm__ volatile("adde %0,%0,%2" : "=r" (sum) : "0" (sum), "r" (tmp))
-
-#define LOAD(n) junk = (u_char) *((volatile u_char *) w + n)
-
-
-int
-in_cksum(m, len)
- register struct mbuf *m;
- register int len;
-{
- u_char junk;
- register u_short *w;
- register unsigned sum = 0;
- register unsigned tmp;
- register int mlen = 0;
- int byte_swapped = 0;
- union { char c[2]; u_short s; } su;
-
- for (;m && len; m = m->m_next) {
- if (m->m_len == 0)
- continue;
- w = mtod(m, u_short *);
- if (mlen == -1) {
- /*
- * The first byte of this mbuf is the continuation
- * of a word spanning between this mbuf and the
- * last mbuf.
- */
-
- /* su.c[0] is already saved when scanning previous
- * mbuf. sum was REDUCEd when we found mlen == -1
- */
- su.c[1] = *(u_char *)w;
- sum += su.s;
- w = (u_short *)((char *)w + 1);
- mlen = m->m_len - 1;
- len--;
- } else
- mlen = m->m_len;
- if (len < mlen)
- mlen = len;
- len -= mlen;
- /*
- * Force to long boundary so we do longword aligned
- * memory operations
- */
- if (3 & (int) w) {
- REDUCE;
- if ((1 & (int) w) && (mlen > 0)) {
- sum <<= 8;
- su.c[0] = *(char *)w;
- w = (u_short *)((char *)w + 1);
- mlen--;
- byte_swapped = 1;
- }
- if ((2 & (int) w) && (mlen >= 2)) {
- sum += *w++;
- mlen -= 2;
- }
- }
-
- /*
- * Do as much of the checksum as possible 32 bits at at time.
- * In fact, this loop is unrolled to keep overhead from
- * branches small.
- */
- while (mlen >= 32) {
- /*
- * Add with carry 16 words and fold in the last
- * carry by adding a 0 with carry.
- *
- * The early ADD(16) and the LOAD(32) are intended
- * to help get the data into the cache.
- */
- ADD(16);
- ADDC(0);
- ADDC(4);
- ADDC(8);
- ADDC(12);
- LOAD(32);
- ADDC(20);
- ADDC(24);
- ADDC(28);
- MOP;
- w += 16;
- mlen -= 32;
- }
- if (mlen >= 16) {
- ADD(0);
- ADDC(4);
- ADDC(8);
- ADDC(12);
- MOP;
- w += 8;
- mlen -= 16;
- }
- if (mlen >= 8) {
- ADD(0);
- ADDC(4);
- MOP;
- w += 4;
- mlen -= 8;
- }
- if (mlen == 0 && byte_swapped == 0)
- continue; /* worth 1% maybe ?? */
- REDUCE;
- while ((mlen -= 2) >= 0) {
- sum += *w++;
- }
- if (byte_swapped) {
- sum <<= 8;
- byte_swapped = 0;
- if (mlen == -1) {
- su.c[1] = *(char *)w;
- sum += su.s;
- mlen = 0;
- } else
- mlen = -1;
- } else if (mlen == -1)
- /*
- * This mbuf has odd number of bytes.
- * There could be a word split betwen
- * this mbuf and the next mbuf.
- * Save the last byte (to prepend to next mbuf).
- */
- su.c[0] = *(char *)w;
- }
-
- if (len)
- puts("cksum: out of data");
- if (mlen == -1) {
- /* The last mbuf has odd # of bytes. Follow the
- standard (the odd byte is shifted left by 8 bits) */
- su.c[1] = 0;
- sum += su.s;
- }
- REDUCE;
- return (~sum & 0xffff);
-}
diff --git a/c/src/exec/libnetworking/netinet/in_pcb.c b/c/src/exec/libnetworking/netinet/in_pcb.c
deleted file mode 100644
index 116f70eebf..0000000000
--- a/c/src/exec/libnetworking/netinet/in_pcb.c
+++ /dev/null
@@ -1,757 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1991, 1993, 1995
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)in_pcb.c 8.4 (Berkeley) 5/24/95
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/systm.h>
-#include <sys/malloc.h>
-#include <sys/mbuf.h>
-#include <sys/protosw.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/ioctl.h>
-#include <sys/errno.h>
-#include <sys/time.h>
-#include <sys/proc.h>
-#include <sys/kernel.h>
-#include <sys/sysctl.h>
-
-#include <net/if.h>
-#include <net/route.h>
-
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/in_pcb.h>
-#include <netinet/in_var.h>
-#include <netinet/ip_var.h>
-
-struct in_addr zeroin_addr;
-
-static void in_pcbinshash __P((struct inpcb *));
-static void in_rtchange __P((struct inpcb *, int));
-
-/*
- * These configure the range of local port addresses assigned to
- * "unspecified" outgoing connections/packets/whatever.
- */
-static int ipport_lowfirstauto = IPPORT_RESERVED - 1; /* 1023 */
-static int ipport_lowlastauto = IPPORT_RESERVEDSTART; /* 600 */
-static int ipport_firstauto = IPPORT_RESERVED; /* 1024 */
-static int ipport_lastauto = IPPORT_USERRESERVED; /* 5000 */
-static int ipport_hifirstauto = IPPORT_HIFIRSTAUTO; /* 40000 */
-static int ipport_hilastauto = IPPORT_HILASTAUTO; /* 44999 */
-
-#define RANGECHK(var, min, max) \
- if ((var) < (min)) { (var) = (min); } \
- else if ((var) > (max)) { (var) = (max); }
-
-#if 0
-static int
-sysctl_net_ipport_check SYSCTL_HANDLER_ARGS
-{
- int error = sysctl_handle_int(oidp,
- oidp->oid_arg1, oidp->oid_arg2, req);
- if (!error) {
- RANGECHK(ipport_lowfirstauto, 1, IPPORT_RESERVED - 1);
- RANGECHK(ipport_lowlastauto, 1, IPPORT_RESERVED - 1);
- RANGECHK(ipport_firstauto, IPPORT_RESERVED, USHRT_MAX);
- RANGECHK(ipport_lastauto, IPPORT_RESERVED, USHRT_MAX);
- RANGECHK(ipport_hifirstauto, IPPORT_RESERVED, USHRT_MAX);
- RANGECHK(ipport_hilastauto, IPPORT_RESERVED, USHRT_MAX);
- }
- return error;
-}
-#endif
-
-#undef RANGECHK
-
-SYSCTL_NODE(_net_inet_ip, IPPROTO_IP, portrange, CTLFLAG_RW, 0, "IP Ports");
-
-SYSCTL_PROC(_net_inet_ip_portrange, OID_AUTO, lowfirst, CTLTYPE_INT|CTLFLAG_RW,
- &ipport_lowfirstauto, 0, &sysctl_net_ipport_check, "I", "");
-SYSCTL_PROC(_net_inet_ip_portrange, OID_AUTO, lowlast, CTLTYPE_INT|CTLFLAG_RW,
- &ipport_lowlastauto, 0, &sysctl_net_ipport_check, "I", "");
-SYSCTL_PROC(_net_inet_ip_portrange, OID_AUTO, first, CTLTYPE_INT|CTLFLAG_RW,
- &ipport_firstauto, 0, &sysctl_net_ipport_check, "I", "");
-SYSCTL_PROC(_net_inet_ip_portrange, OID_AUTO, last, CTLTYPE_INT|CTLFLAG_RW,
- &ipport_lastauto, 0, &sysctl_net_ipport_check, "I", "");
-SYSCTL_PROC(_net_inet_ip_portrange, OID_AUTO, hifirst, CTLTYPE_INT|CTLFLAG_RW,
- &ipport_hifirstauto, 0, &sysctl_net_ipport_check, "I", "");
-SYSCTL_PROC(_net_inet_ip_portrange, OID_AUTO, hilast, CTLTYPE_INT|CTLFLAG_RW,
- &ipport_hilastauto, 0, &sysctl_net_ipport_check, "I", "");
-
-int
-in_pcballoc(so, pcbinfo)
- struct socket *so;
- struct inpcbinfo *pcbinfo;
-{
- register struct inpcb *inp;
- int s;
-
- MALLOC(inp, struct inpcb *, sizeof(*inp), M_PCB, M_NOWAIT);
- if (inp == NULL)
- return (ENOBUFS);
- bzero((caddr_t)inp, sizeof(*inp));
- inp->inp_pcbinfo = pcbinfo;
- inp->inp_socket = so;
- s = splnet();
- LIST_INSERT_HEAD(pcbinfo->listhead, inp, inp_list);
- in_pcbinshash(inp);
- splx(s);
- so->so_pcb = (caddr_t)inp;
- return (0);
-}
-
-int
-in_pcbbind(inp, nam)
- register struct inpcb *inp;
- struct mbuf *nam;
-{
- register struct socket *so = inp->inp_socket;
- unsigned short *lastport;
- struct sockaddr_in *sin;
- u_short lport = 0;
- int wild = 0, reuseport = (so->so_options & SO_REUSEPORT);
- int error;
-
- if (in_ifaddr == 0)
- return (EADDRNOTAVAIL);
- if (inp->inp_lport || inp->inp_laddr.s_addr != INADDR_ANY)
- return (EINVAL);
- if ((so->so_options & (SO_REUSEADDR|SO_REUSEPORT)) == 0 &&
- ((so->so_proto->pr_flags & PR_CONNREQUIRED) == 0 ||
- (so->so_options & SO_ACCEPTCONN) == 0))
- wild = 1;
- if (nam) {
- sin = mtod(nam, struct sockaddr_in *);
- if (nam->m_len != sizeof (*sin))
- return (EINVAL);
-#ifdef notdef
- /*
- * We should check the family, but old programs
- * incorrectly fail to initialize it.
- */
- if (sin->sin_family != AF_INET)
- return (EAFNOSUPPORT);
-#endif
- lport = sin->sin_port;
- if (IN_MULTICAST(ntohl(sin->sin_addr.s_addr))) {
- /*
- * Treat SO_REUSEADDR as SO_REUSEPORT for multicast;
- * allow complete duplication of binding if
- * SO_REUSEPORT is set, or if SO_REUSEADDR is set
- * and a multicast address is bound on both
- * new and duplicated sockets.
- */
- if (so->so_options & SO_REUSEADDR)
- reuseport = SO_REUSEADDR|SO_REUSEPORT;
- } else if (sin->sin_addr.s_addr != INADDR_ANY) {
- sin->sin_port = 0; /* yech... */
- if (ifa_ifwithaddr((struct sockaddr *)sin) == 0)
- return (EADDRNOTAVAIL);
- }
- if (lport) {
- struct inpcb *t;
-
- /* GROSS */
- if (ntohs(lport) < IPPORT_RESERVED &&
- (error = suser(p->p_ucred, &p->p_acflag)))
- return (EACCES);
- if (so->so_uid) {
- t = in_pcblookup(inp->inp_pcbinfo, zeroin_addr,
- 0, sin->sin_addr, lport,
- INPLOOKUP_WILDCARD);
- if (t && (so->so_uid != t->inp_socket->so_uid))
- return (EADDRINUSE);
- }
- t = in_pcblookup(inp->inp_pcbinfo, zeroin_addr, 0,
- sin->sin_addr, lport, wild);
- if (t && (reuseport & t->inp_socket->so_options) == 0)
- return (EADDRINUSE);
- }
- inp->inp_laddr = sin->sin_addr;
- }
- if (lport == 0) {
- ushort first, last;
- int count;
-
- inp->inp_flags |= INP_ANONPORT;
-
- if (inp->inp_flags & INP_HIGHPORT) {
- first = ipport_hifirstauto; /* sysctl */
- last = ipport_hilastauto;
- lastport = &inp->inp_pcbinfo->lasthi;
- } else if (inp->inp_flags & INP_LOWPORT) {
- if ((error = suser(p->p_ucred, &p->p_acflag)))
- return (EACCES);
- first = ipport_lowfirstauto; /* 1023 */
- last = ipport_lowlastauto; /* 600 */
- lastport = &inp->inp_pcbinfo->lastlow;
- } else {
- first = ipport_firstauto; /* sysctl */
- last = ipport_lastauto;
- lastport = &inp->inp_pcbinfo->lastport;
- }
- /*
- * Simple check to ensure all ports are not used up causing
- * a deadlock here.
- *
- * We split the two cases (up and down) so that the direction
- * is not being tested on each round of the loop.
- */
- if (first > last) {
- /*
- * counting down
- */
- count = first - last;
-
- do {
- if (count-- <= 0) /* completely used? */
- return (EADDRNOTAVAIL);
- --*lastport;
- if (*lastport > first || *lastport < last)
- *lastport = first;
- lport = htons(*lastport);
- } while (in_pcblookup(inp->inp_pcbinfo,
- zeroin_addr, 0, inp->inp_laddr, lport, wild));
- } else {
- /*
- * counting up
- */
- count = last - first;
-
- do {
- if (count-- <= 0) /* completely used? */
- return (EADDRNOTAVAIL);
- ++*lastport;
- if (*lastport < first || *lastport > last)
- *lastport = first;
- lport = htons(*lastport);
- } while (in_pcblookup(inp->inp_pcbinfo,
- zeroin_addr, 0, inp->inp_laddr, lport, wild));
- }
- }
- inp->inp_lport = lport;
- in_pcbrehash(inp);
- return (0);
-}
-
-/*
- * Transform old in_pcbconnect() into an inner subroutine for new
- * in_pcbconnect(): Do some validity-checking on the remote
- * address (in mbuf 'nam') and then determine local host address
- * (i.e., which interface) to use to access that remote host.
- *
- * This preserves definition of in_pcbconnect(), while supporting a
- * slightly different version for T/TCP. (This is more than
- * a bit of a kludge, but cleaning up the internal interfaces would
- * have forced minor changes in every protocol).
- */
-
-int
-in_pcbladdr(inp, nam, plocal_sin)
- register struct inpcb *inp;
- struct mbuf *nam;
- struct sockaddr_in **plocal_sin;
-{
- struct in_ifaddr *ia;
- register struct sockaddr_in *sin = mtod(nam, struct sockaddr_in *);
-
- if (nam->m_len != sizeof (*sin))
- return (EINVAL);
- if (sin->sin_family != AF_INET)
- return (EAFNOSUPPORT);
- if (sin->sin_port == 0)
- return (EADDRNOTAVAIL);
- if (in_ifaddr) {
- /*
- * If the destination address is INADDR_ANY,
- * use the primary local address.
- * If the supplied address is INADDR_BROADCAST,
- * and the primary interface supports broadcast,
- * choose the broadcast address for that interface.
- */
-#define satosin(sa) ((struct sockaddr_in *)(sa))
-#define sintosa(sin) ((struct sockaddr *)(sin))
-#define ifatoia(ifa) ((struct in_ifaddr *)(ifa))
- if (sin->sin_addr.s_addr == INADDR_ANY)
- sin->sin_addr = IA_SIN(in_ifaddr)->sin_addr;
- else if (sin->sin_addr.s_addr == (u_long)INADDR_BROADCAST &&
- (in_ifaddr->ia_ifp->if_flags & IFF_BROADCAST))
- sin->sin_addr = satosin(&in_ifaddr->ia_broadaddr)->sin_addr;
- }
- if (inp->inp_laddr.s_addr == INADDR_ANY) {
- register struct route *ro;
-
- ia = (struct in_ifaddr *)0;
- /*
- * If route is known or can be allocated now,
- * our src addr is taken from the i/f, else punt.
- */
- ro = &inp->inp_route;
- if (ro->ro_rt &&
- (satosin(&ro->ro_dst)->sin_addr.s_addr !=
- sin->sin_addr.s_addr ||
- inp->inp_socket->so_options & SO_DONTROUTE)) {
- RTFREE(ro->ro_rt);
- ro->ro_rt = (struct rtentry *)0;
- }
- if ((inp->inp_socket->so_options & SO_DONTROUTE) == 0 && /*XXX*/
- (ro->ro_rt == (struct rtentry *)0 ||
- ro->ro_rt->rt_ifp == (struct ifnet *)0)) {
- /* No route yet, so try to acquire one */
- ro->ro_dst.sa_family = AF_INET;
- ro->ro_dst.sa_len = sizeof(struct sockaddr_in);
- ((struct sockaddr_in *) &ro->ro_dst)->sin_addr =
- sin->sin_addr;
- rtalloc(ro);
- }
- /*
- * If we found a route, use the address
- * corresponding to the outgoing interface
- * unless it is the loopback (in case a route
- * to our address on another net goes to loopback).
- */
- if (ro->ro_rt && !(ro->ro_rt->rt_ifp->if_flags & IFF_LOOPBACK))
- ia = ifatoia(ro->ro_rt->rt_ifa);
- if (ia == 0) {
- u_short fport = sin->sin_port;
-
- sin->sin_port = 0;
- ia = ifatoia(ifa_ifwithdstaddr(sintosa(sin)));
- if (ia == 0)
- ia = ifatoia(ifa_ifwithnet(sintosa(sin)));
- sin->sin_port = fport;
- if (ia == 0)
- ia = in_ifaddr;
- if (ia == 0)
- return (EADDRNOTAVAIL);
- }
- /*
- * If the destination address is multicast and an outgoing
- * interface has been set as a multicast option, use the
- * address of that interface as our source address.
- */
- if (IN_MULTICAST(ntohl(sin->sin_addr.s_addr)) &&
- inp->inp_moptions != NULL) {
- struct ip_moptions *imo;
- struct ifnet *ifp;
-
- imo = inp->inp_moptions;
- if (imo->imo_multicast_ifp != NULL) {
- ifp = imo->imo_multicast_ifp;
- for (ia = in_ifaddr; ia; ia = ia->ia_next)
- if (ia->ia_ifp == ifp)
- break;
- if (ia == 0)
- return (EADDRNOTAVAIL);
- }
- }
- /*
- * Don't do pcblookup call here; return interface in plocal_sin
- * and exit to caller, that will do the lookup.
- */
- *plocal_sin = &ia->ia_addr;
-
- }
- return(0);
-}
-
-/*
- * Outer subroutine:
- * Connect from a socket to a specified address.
- * Both address and port must be specified in argument sin.
- * If don't have a local address for this socket yet,
- * then pick one.
- */
-int
-in_pcbconnect(inp, nam)
- register struct inpcb *inp;
- struct mbuf *nam;
-{
- struct sockaddr_in *ifaddr;
- register struct sockaddr_in *sin = mtod(nam, struct sockaddr_in *);
- int error;
-
- /*
- * Call inner routine, to assign local interface address.
- */
- if ((error = in_pcbladdr(inp, nam, &ifaddr)))
- return(error);
-
- if (in_pcblookuphash(inp->inp_pcbinfo, sin->sin_addr, sin->sin_port,
- inp->inp_laddr.s_addr ? inp->inp_laddr : ifaddr->sin_addr,
- inp->inp_lport, 0) != NULL)
- return (EADDRINUSE);
- if (inp->inp_laddr.s_addr == INADDR_ANY) {
- if (inp->inp_lport == 0)
- (void)in_pcbbind(inp, (struct mbuf *)0);
- inp->inp_laddr = ifaddr->sin_addr;
- }
- inp->inp_faddr = sin->sin_addr;
- inp->inp_fport = sin->sin_port;
- in_pcbrehash(inp);
- return (0);
-}
-
-void
-in_pcbdisconnect(inp)
- struct inpcb *inp;
-{
-
- inp->inp_faddr.s_addr = INADDR_ANY;
- inp->inp_fport = 0;
- in_pcbrehash(inp);
- if (inp->inp_socket->so_state & SS_NOFDREF)
- in_pcbdetach(inp);
-}
-
-void
-in_pcbdetach(inp)
- struct inpcb *inp;
-{
- struct socket *so = inp->inp_socket;
- int s;
-
- so->so_pcb = 0;
- sofree(so);
- if (inp->inp_options)
- (void)m_free(inp->inp_options);
- if (inp->inp_route.ro_rt)
- rtfree(inp->inp_route.ro_rt);
- ip_freemoptions(inp->inp_moptions);
- s = splnet();
- LIST_REMOVE(inp, inp_hash);
- LIST_REMOVE(inp, inp_list);
- splx(s);
- FREE(inp, M_PCB);
-}
-
-void
-in_setsockaddr(inp, nam)
- register struct inpcb *inp;
- struct mbuf *nam;
-{
- register struct sockaddr_in *sin;
-
- nam->m_len = sizeof (*sin);
- sin = mtod(nam, struct sockaddr_in *);
- bzero((caddr_t)sin, sizeof (*sin));
- sin->sin_family = AF_INET;
- sin->sin_len = sizeof(*sin);
- sin->sin_port = inp->inp_lport;
- sin->sin_addr = inp->inp_laddr;
-}
-
-void
-in_setpeeraddr(inp, nam)
- struct inpcb *inp;
- struct mbuf *nam;
-{
- register struct sockaddr_in *sin;
-
- nam->m_len = sizeof (*sin);
- sin = mtod(nam, struct sockaddr_in *);
- bzero((caddr_t)sin, sizeof (*sin));
- sin->sin_family = AF_INET;
- sin->sin_len = sizeof(*sin);
- sin->sin_port = inp->inp_fport;
- sin->sin_addr = inp->inp_faddr;
-}
-
-/*
- * Pass some notification to all connections of a protocol
- * associated with address dst. The local address and/or port numbers
- * may be specified to limit the search. The "usual action" will be
- * taken, depending on the ctlinput cmd. The caller must filter any
- * cmds that are uninteresting (e.g., no error in the map).
- * Call the protocol specific routine (if any) to report
- * any errors for each matching socket.
- *
- * Must be called at splnet.
- */
-void
-in_pcbnotify(head, dst, fport_arg, laddr, lport_arg, cmd, notify)
- struct inpcbhead *head;
- struct sockaddr *dst;
- u_int fport_arg, lport_arg;
- struct in_addr laddr;
- int cmd;
- void (*notify) __P((struct inpcb *, int));
-{
- register struct inpcb *inp, *oinp;
- struct in_addr faddr;
- u_short fport = fport_arg, lport = lport_arg;
- int errnum, s;
-
- if ((unsigned)cmd > PRC_NCMDS || dst->sa_family != AF_INET)
- return;
- faddr = ((struct sockaddr_in *)dst)->sin_addr;
- if (faddr.s_addr == INADDR_ANY)
- return;
-
- /*
- * Redirects go to all references to the destination,
- * and use in_rtchange to invalidate the route cache.
- * Dead host indications: notify all references to the destination.
- * Otherwise, if we have knowledge of the local port and address,
- * deliver only to that socket.
- */
- if (PRC_IS_REDIRECT(cmd) || cmd == PRC_HOSTDEAD) {
- fport = 0;
- lport = 0;
- laddr.s_addr = 0;
- if (cmd != PRC_HOSTDEAD)
- notify = in_rtchange;
- }
- errnum = inetctlerrmap[cmd];
- s = splnet();
- for (inp = head->lh_first; inp != NULL;) {
- if (inp->inp_faddr.s_addr != faddr.s_addr ||
- inp->inp_socket == 0 ||
- (lport && inp->inp_lport != lport) ||
- (laddr.s_addr && inp->inp_laddr.s_addr != laddr.s_addr) ||
- (fport && inp->inp_fport != fport)) {
- inp = inp->inp_list.le_next;
- continue;
- }
- oinp = inp;
- inp = inp->inp_list.le_next;
- if (notify)
- (*notify)(oinp, errnum);
- }
- splx(s);
-}
-
-/*
- * Check for alternatives when higher level complains
- * about service problems. For now, invalidate cached
- * routing information. If the route was created dynamically
- * (by a redirect), time to try a default gateway again.
- */
-void
-in_losing(inp)
- struct inpcb *inp;
-{
- register struct rtentry *rt;
- struct rt_addrinfo info;
-
- if ((rt = inp->inp_route.ro_rt)) {
- inp->inp_route.ro_rt = 0;
- bzero((caddr_t)&info, sizeof(info));
- info.rti_info[RTAX_DST] =
- (struct sockaddr *)&inp->inp_route.ro_dst;
- info.rti_info[RTAX_GATEWAY] = rt->rt_gateway;
- info.rti_info[RTAX_NETMASK] = rt_mask(rt);
- rt_missmsg(RTM_LOSING, &info, rt->rt_flags, 0);
- if (rt->rt_flags & RTF_DYNAMIC)
- (void) rtrequest(RTM_DELETE, rt_key(rt),
- rt->rt_gateway, rt_mask(rt), rt->rt_flags,
- (struct rtentry **)0);
- else
- /*
- * A new route can be allocated
- * the next time output is attempted.
- */
- rtfree(rt);
- }
-}
-
-/*
- * After a routing change, flush old routing
- * and allocate a (hopefully) better one.
- */
-static void
-in_rtchange(inp, errnum)
- register struct inpcb *inp;
- int errnum;
-{
- if (inp->inp_route.ro_rt) {
- rtfree(inp->inp_route.ro_rt);
- inp->inp_route.ro_rt = 0;
- /*
- * A new route can be allocated the next time
- * output is attempted.
- */
- }
-}
-
-struct inpcb *
-in_pcblookup(pcbinfo, faddr, fport_arg, laddr, lport_arg, wild_okay)
- struct inpcbinfo *pcbinfo;
- struct in_addr faddr, laddr;
- u_int fport_arg, lport_arg;
- int wild_okay;
-{
- register struct inpcb *inp, *match = NULL;
- int matchwild = 3, wildcard;
- u_short fport = fport_arg, lport = lport_arg;
- int s;
-
- s = splnet();
-
- for (inp = pcbinfo->listhead->lh_first; inp != NULL; inp = inp->inp_list.le_next) {
- if (inp->inp_lport != lport)
- continue;
- wildcard = 0;
- if (inp->inp_faddr.s_addr != INADDR_ANY) {
- if (faddr.s_addr == INADDR_ANY)
- wildcard++;
- else if (inp->inp_faddr.s_addr != faddr.s_addr ||
- inp->inp_fport != fport)
- continue;
- } else {
- if (faddr.s_addr != INADDR_ANY)
- wildcard++;
- }
- if (inp->inp_laddr.s_addr != INADDR_ANY) {
- if (laddr.s_addr == INADDR_ANY)
- wildcard++;
- else if (inp->inp_laddr.s_addr != laddr.s_addr)
- continue;
- } else {
- if (laddr.s_addr != INADDR_ANY)
- wildcard++;
- }
- if (wildcard && wild_okay == 0)
- continue;
- if (wildcard < matchwild) {
- match = inp;
- matchwild = wildcard;
- if (matchwild == 0) {
- break;
- }
- }
- }
- splx(s);
- return (match);
-}
-
-/*
- * Lookup PCB in hash list.
- */
-struct inpcb *
-in_pcblookuphash(pcbinfo, faddr, fport_arg, laddr, lport_arg, wildcard)
- struct inpcbinfo *pcbinfo;
- struct in_addr faddr, laddr;
- u_int fport_arg, lport_arg;
- int wildcard;
-{
- struct inpcbhead *head;
- register struct inpcb *inp;
- u_short fport = fport_arg, lport = lport_arg;
- int s;
-
- s = splnet();
- /*
- * First look for an exact match.
- */
- head = &pcbinfo->hashbase[INP_PCBHASH(faddr.s_addr, lport, fport, pcbinfo->hashmask)];
- for (inp = head->lh_first; inp != NULL; inp = inp->inp_hash.le_next) {
- if (inp->inp_faddr.s_addr == faddr.s_addr &&
- inp->inp_laddr.s_addr == laddr.s_addr &&
- inp->inp_fport == fport &&
- inp->inp_lport == lport)
- goto found;
- }
- if (wildcard) {
- struct inpcb *local_wild = NULL;
-
- head = &pcbinfo->hashbase[INP_PCBHASH(INADDR_ANY, lport, 0, pcbinfo->hashmask)];
- for (inp = head->lh_first; inp != NULL; inp = inp->inp_hash.le_next) {
- if (inp->inp_faddr.s_addr == INADDR_ANY &&
- inp->inp_fport == 0 && inp->inp_lport == lport) {
- if (inp->inp_laddr.s_addr == laddr.s_addr)
- goto found;
- else if (inp->inp_laddr.s_addr == INADDR_ANY)
- local_wild = inp;
- }
- }
- if (local_wild != NULL) {
- inp = local_wild;
- goto found;
- }
- }
- splx(s);
- return (NULL);
-
-found:
- /*
- * Move PCB to head of this hash chain so that it can be
- * found more quickly in the future.
- * XXX - this is a pessimization on machines with few
- * concurrent connections.
- */
- if (inp != head->lh_first) {
- LIST_REMOVE(inp, inp_hash);
- LIST_INSERT_HEAD(head, inp, inp_hash);
- }
- splx(s);
- return (inp);
-}
-
-/*
- * Insert PCB into hash chain. Must be called at splnet.
- */
-static void
-in_pcbinshash(inp)
- struct inpcb *inp;
-{
- struct inpcbhead *head;
-
- head = &inp->inp_pcbinfo->hashbase[INP_PCBHASH(inp->inp_faddr.s_addr,
- inp->inp_lport, inp->inp_fport, inp->inp_pcbinfo->hashmask)];
-
- LIST_INSERT_HEAD(head, inp, inp_hash);
-}
-
-void
-in_pcbrehash(inp)
- struct inpcb *inp;
-{
- struct inpcbhead *head;
- int s;
-
- s = splnet();
- LIST_REMOVE(inp, inp_hash);
-
- head = &inp->inp_pcbinfo->hashbase[INP_PCBHASH(inp->inp_faddr.s_addr,
- inp->inp_lport, inp->inp_fport, inp->inp_pcbinfo->hashmask)];
-
- LIST_INSERT_HEAD(head, inp, inp_hash);
- splx(s);
-}
diff --git a/c/src/exec/libnetworking/netinet/in_pcb.h b/c/src/exec/libnetworking/netinet/in_pcb.h
deleted file mode 100644
index 9390cfda6c..0000000000
--- a/c/src/exec/libnetworking/netinet/in_pcb.h
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)in_pcb.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _NETINET_IN_PCB_H_
-#define _NETINET_IN_PCB_H_
-
-#include <sys/queue.h>
-
-/*
- * Common structure pcb for internet protocol implementation.
- * Here are stored pointers to local and foreign host table
- * entries, local and foreign socket numbers, and pointers
- * up (to a socket structure) and down (to a protocol-specific)
- * control block.
- */
-LIST_HEAD(inpcbhead, inpcb);
-
-struct inpcb {
- LIST_ENTRY(inpcb) inp_list; /* list for all PCBs of this proto */
- LIST_ENTRY(inpcb) inp_hash; /* hash list */
- struct inpcbinfo *inp_pcbinfo; /* PCB list info */
- struct in_addr inp_faddr; /* foreign host table entry */
- struct in_addr inp_laddr; /* local host table entry */
- u_short inp_fport; /* foreign port */
- u_short inp_lport; /* local port */
- caddr_t inp_ppcb; /* pointer to per-protocol pcb */
- struct socket *inp_socket; /* back pointer to socket */
- struct mbuf *inp_options; /* IP options */
- struct route inp_route; /* placeholder for routing entry */
- int inp_flags; /* generic IP/datagram flags */
- u_char inp_ip_tos; /* type of service proto */
- u_char inp_ip_ttl; /* time to live proto */
- u_char inp_ip_p; /* protocol proto */
- u_char pad[1]; /* alignment */
- struct ip_moptions *inp_moptions; /* IP multicast options */
-#if 0 /* Someday, perhaps... */
- struct ip inp_ip; /* header prototype; should have more */
-#endif
-};
-
-struct inpcbinfo {
- struct inpcbhead *listhead;
- struct inpcbhead *hashbase;
- unsigned long hashmask;
- unsigned short lastport;
- unsigned short lastlow;
- unsigned short lasthi;
-};
-
-#define INP_PCBHASH(faddr, lport, fport, mask) \
- (((faddr) ^ ((faddr) >> 16) ^ (lport) ^ (fport)) & (mask))
-
-/* flags in inp_flags: */
-#define INP_RECVOPTS 0x01 /* receive incoming IP options */
-#define INP_RECVRETOPTS 0x02 /* receive IP options for reply */
-#define INP_RECVDSTADDR 0x04 /* receive IP dst address */
-#define INP_HDRINCL 0x08 /* user supplies entire IP header */
-#define INP_HIGHPORT 0x10 /* user wants "high" port binding */
-#define INP_LOWPORT 0x20 /* user wants "low" port binding */
-#define INP_ANONPORT 0x40 /* port chosen for user */
-#define INP_RECVIF 0x80 /* receive incoming interface */
-#define INP_CONTROLOPTS (INP_RECVOPTS|INP_RECVRETOPTS|INP_RECVDSTADDR|\
- INP_RECVIF)
-
-#define INPLOOKUP_WILDCARD 1
-
-#define sotoinpcb(so) ((struct inpcb *)(so)->so_pcb)
-
-#ifdef KERNEL
-void in_losing __P((struct inpcb *));
-int in_pcballoc __P((struct socket *, struct inpcbinfo *));
-int in_pcbbind __P((struct inpcb *, struct mbuf *));
-int in_pcbconnect __P((struct inpcb *, struct mbuf *));
-void in_pcbdetach __P((struct inpcb *));
-void in_pcbdisconnect __P((struct inpcb *));
-int in_pcbladdr __P((struct inpcb *, struct mbuf *,
- struct sockaddr_in **));
-struct inpcb *
- in_pcblookup __P((struct inpcbinfo *,
- struct in_addr, u_int, struct in_addr, u_int, int));
-struct inpcb *
- in_pcblookuphash __P((struct inpcbinfo *,
- struct in_addr, u_int, struct in_addr, u_int, int));
-void in_pcbnotify __P((struct inpcbhead *, struct sockaddr *,
- u_int, struct in_addr, u_int, int, void (*)(struct inpcb *, int)));
-void in_pcbrehash __P((struct inpcb *));
-void in_setpeeraddr __P((struct inpcb *, struct mbuf *));
-void in_setsockaddr __P((struct inpcb *, struct mbuf *));
-#endif
-
-#endif
diff --git a/c/src/exec/libnetworking/netinet/in_proto.c b/c/src/exec/libnetworking/netinet/in_proto.c
deleted file mode 100644
index 3fa845955e..0000000000
--- a/c/src/exec/libnetworking/netinet/in_proto.c
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)in_proto.c 8.2 (Berkeley) 2/9/95
- * $Id$
- */
-
-#include "opt_tcpdebug.h"
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/kernel.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/domain.h>
-#include <sys/mbuf.h>
-#include <sys/protosw.h>
-#include <sys/sysctl.h>
-
-#include <net/if.h>
-#include <net/radix.h>
-#include <net/route.h>
-
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/ip_var.h>
-#include <netinet/ip_icmp.h>
-#include <netinet/in_pcb.h>
-#include <netinet/igmp_var.h>
-#include <netinet/tcp.h>
-#include <netinet/tcp_fsm.h>
-#include <netinet/tcp_seq.h>
-#include <netinet/tcp_timer.h>
-#include <netinet/tcp_var.h>
-#include <netinet/tcpip.h>
-#ifdef TCPDEBUG
-#include <netinet/tcp_debug.h>
-#endif
-#include <netinet/udp.h>
-#include <netinet/udp_var.h>
-/*
- * TCP/IP protocol family: IP, ICMP, UDP, TCP.
- */
-
-#ifdef IPXIP
-#include <netipx/ipx.h>
-#include <netipx/ipx_ip.h>
-#endif
-
-#ifdef NSIP
-#include <netns/ns.h>
-#include <netns/ns_if.h>
-#endif
-
-#ifdef TPIP
-void tpip_input(), tpip_ctlinput(), tp_init(), tp_slowtimo(), tp_drain();
-int tp_ctloutput(), tp_usrreq();
-#endif
-
-#ifdef EON
-void eoninput(), eonctlinput(), eonprotoinit();
-#endif /* EON */
-
-extern struct domain inetdomain;
-
-struct protosw inetsw[] = {
-{ 0, &inetdomain, 0, 0,
- 0, 0, 0, 0,
- 0,
- ip_init, 0, ip_slowtimo, ip_drain
-},
-{ SOCK_DGRAM, &inetdomain, IPPROTO_UDP, PR_ATOMIC|PR_ADDR,
- udp_input, 0, udp_ctlinput, ip_ctloutput,
- udp_usrreq,
- udp_init
-},
-{ SOCK_STREAM, &inetdomain, IPPROTO_TCP,
- PR_CONNREQUIRED|PR_IMPLOPCL|PR_WANTRCVD,
- tcp_input, 0, tcp_ctlinput, tcp_ctloutput,
- 0,
- tcp_init, tcp_fasttimo, tcp_slowtimo, tcp_drain,
- &tcp_usrreqs
-},
-{ SOCK_RAW, &inetdomain, IPPROTO_RAW, PR_ATOMIC|PR_ADDR,
- rip_input, 0, 0, rip_ctloutput,
- rip_usrreq,
- 0, 0, 0, 0,
-},
-{ SOCK_RAW, &inetdomain, IPPROTO_ICMP, PR_ATOMIC|PR_ADDR,
- icmp_input, 0, 0, rip_ctloutput,
- rip_usrreq
-},
-{ SOCK_RAW, &inetdomain, IPPROTO_IGMP, PR_ATOMIC|PR_ADDR,
- igmp_input, 0, 0, rip_ctloutput,
- rip_usrreq,
- igmp_init, igmp_fasttimo, igmp_slowtimo
-},
-{ SOCK_RAW, &inetdomain, IPPROTO_RSVP, PR_ATOMIC|PR_ADDR,
- rsvp_input, 0, 0, rip_ctloutput,
- rip_usrreq,
- 0, 0, 0, 0,
-},
-{ SOCK_RAW, &inetdomain, IPPROTO_IPIP, PR_ATOMIC|PR_ADDR,
- ipip_input, 0, 0, rip_ctloutput,
- rip_usrreq,
- 0, 0, 0, 0,
-},
-#ifdef IPDIVERT
-{ SOCK_RAW, &inetdomain, IPPROTO_DIVERT, PR_ATOMIC|PR_ADDR,
- div_input, 0, 0, ip_ctloutput,
- div_usrreq,
- div_init, 0, 0, 0,
-},
-#endif
-#ifdef TPIP
-{ SOCK_SEQPACKET,&inetdomain, IPPROTO_TP, PR_CONNREQUIRED|PR_WANTRCVD,
- tpip_input, 0, tpip_ctlinput, tp_ctloutput,
- tp_usrreq,
- tp_init, 0, tp_slowtimo, tp_drain,
-},
-#endif
-/* EON (ISO CLNL over IP) */
-#ifdef EON
-{ SOCK_RAW, &inetdomain, IPPROTO_EON, 0,
- eoninput, 0, eonctlinput, 0,
- 0,
- eonprotoinit, 0, 0, 0,
-},
-#endif
-#ifdef IPXIP
-{ SOCK_RAW, &inetdomain, IPPROTO_IDP, PR_ATOMIC|PR_ADDR,
- ipxip_input, 0, ipxip_ctlinput, 0,
- rip_usrreq,
- 0, 0, 0, 0,
-},
-#endif
-#ifdef NSIP
-{ SOCK_RAW, &inetdomain, IPPROTO_IDP, PR_ATOMIC|PR_ADDR,
- idpip_input, 0, nsip_ctlinput, 0,
- rip_usrreq,
- 0, 0, 0, 0,
-},
-#endif
- /* raw wildcard */
-{ SOCK_RAW, &inetdomain, 0, PR_ATOMIC|PR_ADDR,
- rip_input, 0, 0, rip_ctloutput,
- rip_usrreq,
- rip_init, 0, 0, 0,
-},
-};
-
-extern int in_inithead(void **, int);
-
-struct domain inetdomain =
- { AF_INET, "internet", 0, 0, 0,
- inetsw, &inetsw[sizeof(inetsw)/sizeof(inetsw[0])], 0,
- in_inithead, 32, sizeof(struct sockaddr_in)
- };
-
-DOMAIN_SET(inet);
-
-SYSCTL_NODE(_net, PF_INET, inet, CTLFLAG_RW, 0,
- "Internet Family");
-
-SYSCTL_NODE(_net_inet, IPPROTO_IP, ip, CTLFLAG_RW, 0, "IP");
-SYSCTL_NODE(_net_inet, IPPROTO_ICMP, icmp, CTLFLAG_RW, 0, "ICMP");
-SYSCTL_NODE(_net_inet, IPPROTO_UDP, udp, CTLFLAG_RW, 0, "UDP");
-SYSCTL_NODE(_net_inet, IPPROTO_TCP, tcp, CTLFLAG_RW, 0, "TCP");
-SYSCTL_NODE(_net_inet, IPPROTO_IGMP, igmp, CTLFLAG_RW, 0, "IGMP");
-#ifdef IPDIVERT
-SYSCTL_NODE(_net_inet, IPPROTO_DIVERT, div, CTLFLAG_RW, 0, "DIVERT");
-#endif
-
diff --git a/c/src/exec/libnetworking/netinet/in_rmx.c b/c/src/exec/libnetworking/netinet/in_rmx.c
deleted file mode 100644
index ba1793b3b4..0000000000
--- a/c/src/exec/libnetworking/netinet/in_rmx.c
+++ /dev/null
@@ -1,384 +0,0 @@
-/*
- * Copyright 1994, 1995 Massachusetts Institute of Technology
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby
- * granted, provided that both the above copyright notice and this
- * permission notice appear in all copies, that both the above
- * copyright notice and this permission notice appear in all
- * supporting documentation, and that the name of M.I.T. not be used
- * in advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission. M.I.T. makes
- * no representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied
- * warranty.
- *
- * THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''. M.I.T. DISCLAIMS
- * ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
- * SHALL M.I.T. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-/*
- * This code does two things necessary for the enhanced TCP metrics to
- * function in a useful manner:
- * 1) It marks all non-host routes as `cloning', thus ensuring that
- * every actual reference to such a route actually gets turned
- * into a reference to a host route to the specific destination
- * requested.
- * 2) When such routes lose all their references, it arranges for them
- * to be deleted in some random collection of circumstances, so that
- * a large quantity of stale routing data is not kept in kernel memory
- * indefinitely. See in_rtqtimo() below for the exact mechanism.
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/sysctl.h>
-#include <sys/queue.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/mbuf.h>
-#include <sys/syslog.h>
-
-#include <net/if.h>
-#include <net/route.h>
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/in_var.h>
-
-#include <netinet/ip.h>
-#include <netinet/ip_var.h>
-
-#include <netinet/tcp.h>
-#include <netinet/tcp_seq.h>
-#include <netinet/tcp_timer.h>
-#include <netinet/tcp_var.h>
-
-extern int in_inithead __P((void **head, int off));
-
-#define RTPRF_OURS RTF_PROTO3 /* set on routes we manage */
-
-/*
- * Do what we need to do when inserting a route.
- */
-static struct radix_node *
-in_addroute(void *v_arg, void *n_arg, struct radix_node_head *head,
- struct radix_node *treenodes)
-{
- struct rtentry *rt = (struct rtentry *)treenodes;
- struct sockaddr_in *sin = (struct sockaddr_in *)rt_key(rt);
- struct radix_node *ret;
-
- /*
- * For IP, all unicast non-host routes are automatically cloning.
- */
- if(IN_MULTICAST(ntohl(sin->sin_addr.s_addr)))
- rt->rt_flags |= RTF_MULTICAST;
-
- if(!(rt->rt_flags & (RTF_HOST | RTF_CLONING | RTF_MULTICAST))) {
- rt->rt_flags |= RTF_PRCLONING;
- }
-
- /*
- * A little bit of help for both IP output and input:
- * For host routes, we make sure that RTF_BROADCAST
- * is set for anything that looks like a broadcast address.
- * This way, we can avoid an expensive call to in_broadcast()
- * in ip_output() most of the time (because the route passed
- * to ip_output() is almost always a host route).
- *
- * We also do the same for local addresses, with the thought
- * that this might one day be used to speed up ip_input().
- *
- * We also mark routes to multicast addresses as such, because
- * it's easy to do and might be useful (but this is much more
- * dubious since it's so easy to inspect the address). (This
- * is done above.)
- */
- if (rt->rt_flags & RTF_HOST) {
- if (in_broadcast(sin->sin_addr, rt->rt_ifp)) {
- rt->rt_flags |= RTF_BROADCAST;
- } else {
-#define satosin(sa) ((struct sockaddr_in *)sa)
- if (satosin(rt->rt_ifa->ifa_addr)->sin_addr.s_addr
- == sin->sin_addr.s_addr)
- rt->rt_flags |= RTF_LOCAL;
-#undef satosin
- }
- }
-
- /*
- * We also specify a send and receive pipe size for every
- * route added, to help TCP a bit. TCP doesn't actually
- * want a true pipe size, which would be prohibitive in memory
- * costs and is hard to compute anyway; it simply uses these
- * values to size its buffers. So, we fill them in with the
- * same values that TCP would have used anyway, and allow the
- * installing program or the link layer to override these values
- * as it sees fit. This will hopefully allow TCP more
- * opportunities to save its ssthresh value.
- */
- if (!rt->rt_rmx.rmx_sendpipe && !(rt->rt_rmx.rmx_locks & RTV_SPIPE))
- rt->rt_rmx.rmx_sendpipe = tcp_sendspace;
-
- if (!rt->rt_rmx.rmx_recvpipe && !(rt->rt_rmx.rmx_locks & RTV_RPIPE))
- rt->rt_rmx.rmx_recvpipe = tcp_recvspace;
-
- if (!rt->rt_rmx.rmx_mtu && !(rt->rt_rmx.rmx_locks & RTV_MTU)
- && rt->rt_ifp)
- rt->rt_rmx.rmx_mtu = rt->rt_ifp->if_mtu;
-
- ret = rn_addroute(v_arg, n_arg, head, treenodes);
- if (ret == NULL && rt->rt_flags & RTF_HOST) {
- struct rtentry *rt2;
- /*
- * We are trying to add a host route, but can't.
- * Find out if it is because of an
- * ARP entry and delete it if so.
- */
- rt2 = rtalloc1((struct sockaddr *)sin, 0,
- RTF_CLONING | RTF_PRCLONING);
- if (rt2) {
- if (rt2->rt_flags & RTF_LLINFO &&
- rt2->rt_flags & RTF_HOST &&
- rt2->rt_gateway &&
- rt2->rt_gateway->sa_family == AF_LINK) {
- rtrequest(RTM_DELETE,
- (struct sockaddr *)rt_key(rt2),
- rt2->rt_gateway,
- rt_mask(rt2), rt2->rt_flags, 0);
- ret = rn_addroute(v_arg, n_arg, head,
- treenodes);
- }
- RTFREE(rt2);
- }
- }
- return ret;
-}
-
-/*
- * This code is the inverse of in_clsroute: on first reference, if we
- * were managing the route, stop doing so and set the expiration timer
- * back off again.
- */
-static struct radix_node *
-in_matroute(void *v_arg, struct radix_node_head *head)
-{
- struct radix_node *rn = rn_match(v_arg, head);
- struct rtentry *rt = (struct rtentry *)rn;
-
- if(rt && rt->rt_refcnt == 0) { /* this is first reference */
- if(rt->rt_flags & RTPRF_OURS) {
- rt->rt_flags &= ~RTPRF_OURS;
- rt->rt_rmx.rmx_expire = 0;
- }
- }
- return rn;
-}
-
-static int rtq_reallyold = 60*60;
- /* one hour is ``really old'' */
-SYSCTL_INT(_net_inet_ip, IPCTL_RTEXPIRE, rtexpire,
- CTLFLAG_RW, &rtq_reallyold , 0, "");
-
-static int rtq_minreallyold = 10;
- /* never automatically crank down to less */
-SYSCTL_INT(_net_inet_ip, IPCTL_RTMINEXPIRE, rtminexpire,
- CTLFLAG_RW, &rtq_minreallyold , 0, "");
-
-static int rtq_toomany = 128;
- /* 128 cached routes is ``too many'' */
-SYSCTL_INT(_net_inet_ip, IPCTL_RTMAXCACHE, rtmaxcache,
- CTLFLAG_RW, &rtq_toomany , 0, "");
-
-
-/*
- * On last reference drop, mark the route as belong to us so that it can be
- * timed out.
- */
-static void
-in_clsroute(struct radix_node *rn, struct radix_node_head *head)
-{
- struct rtentry *rt = (struct rtentry *)rn;
-
- if(!(rt->rt_flags & RTF_UP))
- return; /* prophylactic measures */
-
- if((rt->rt_flags & (RTF_LLINFO | RTF_HOST)) != RTF_HOST)
- return;
-
- if((rt->rt_flags & (RTF_WASCLONED | RTPRF_OURS))
- != RTF_WASCLONED)
- return;
-
- /*
- * As requested by David Greenman:
- * If rtq_reallyold is 0, just delete the route without
- * waiting for a timeout cycle to kill it.
- */
- if(rtq_reallyold != 0) {
- rt->rt_flags |= RTPRF_OURS;
- rt->rt_rmx.rmx_expire = rtems_bsdnet_seconds_since_boot() + rtq_reallyold;
- } else {
- rtrequest(RTM_DELETE,
- (struct sockaddr *)rt_key(rt),
- rt->rt_gateway, rt_mask(rt),
- rt->rt_flags, 0);
- }
-}
-
-struct rtqk_arg {
- struct radix_node_head *rnh;
- int draining;
- int killed;
- int found;
- int updating;
- time_t nextstop;
-};
-
-/*
- * Get rid of old routes. When draining, this deletes everything, even when
- * the timeout is not expired yet. When updating, this makes sure that
- * nothing has a timeout longer than the current value of rtq_reallyold.
- */
-static int
-in_rtqkill(struct radix_node *rn, void *rock)
-{
- struct rtqk_arg *ap = rock;
- struct rtentry *rt = (struct rtentry *)rn;
- int err;
-
- if(rt->rt_flags & RTPRF_OURS) {
- ap->found++;
-
- if(ap->draining || rt->rt_rmx.rmx_expire <= rtems_bsdnet_seconds_since_boot()) {
- if(rt->rt_refcnt > 0)
- panic("rtqkill route really not free");
-
- err = rtrequest(RTM_DELETE,
- (struct sockaddr *)rt_key(rt),
- rt->rt_gateway, rt_mask(rt),
- rt->rt_flags, 0);
- if(err) {
- log(LOG_WARNING, "in_rtqkill: error %d\n", err);
- } else {
- ap->killed++;
- }
- } else {
- if(ap->updating
- && (rt->rt_rmx.rmx_expire - rtems_bsdnet_seconds_since_boot()
- > rtq_reallyold)) {
- rt->rt_rmx.rmx_expire = rtems_bsdnet_seconds_since_boot()
- + rtq_reallyold;
- }
- ap->nextstop = lmin(ap->nextstop,
- rt->rt_rmx.rmx_expire);
- }
- }
-
- return 0;
-}
-
-#define RTQ_TIMEOUT 60*10 /* run no less than once every ten minutes */
-static int rtq_timeout = RTQ_TIMEOUT;
-
-static void
-in_rtqtimo(void *rock)
-{
- struct radix_node_head *rnh = rock;
- struct rtqk_arg arg;
- struct timeval atv;
- static time_t last_adjusted_timeout = 0;
- int s;
-
- arg.found = arg.killed = 0;
- arg.rnh = rnh;
- arg.nextstop = rtems_bsdnet_seconds_since_boot() + rtq_timeout;
- arg.draining = arg.updating = 0;
- s = splnet();
- rnh->rnh_walktree(rnh, in_rtqkill, &arg);
- splx(s);
-
- /*
- * Attempt to be somewhat dynamic about this:
- * If there are ``too many'' routes sitting around taking up space,
- * then crank down the timeout, and see if we can't make some more
- * go away. However, we make sure that we will never adjust more
- * than once in rtq_timeout seconds, to keep from cranking down too
- * hard.
- */
- if((arg.found - arg.killed > rtq_toomany)
- && (rtems_bsdnet_seconds_since_boot() - last_adjusted_timeout >= rtq_timeout)
- && rtq_reallyold > rtq_minreallyold) {
- rtq_reallyold = 2*rtq_reallyold / 3;
- if(rtq_reallyold < rtq_minreallyold) {
- rtq_reallyold = rtq_minreallyold;
- }
-
- last_adjusted_timeout = rtems_bsdnet_seconds_since_boot();
-#ifdef DIAGNOSTIC
- log(LOG_DEBUG, "in_rtqtimo: adjusted rtq_reallyold to %d\n",
- rtq_reallyold);
-#endif
- arg.found = arg.killed = 0;
- arg.updating = 1;
- s = splnet();
- rnh->rnh_walktree(rnh, in_rtqkill, &arg);
- splx(s);
- }
-
- atv.tv_usec = 0;
- atv.tv_sec = arg.nextstop;
- timeout(in_rtqtimo, rock, hzto(&atv));
-}
-
-void
-in_rtqdrain(void)
-{
- struct radix_node_head *rnh = rt_tables[AF_INET];
- struct rtqk_arg arg;
- int s;
- arg.found = arg.killed = 0;
- arg.rnh = rnh;
- arg.nextstop = 0;
- arg.draining = 1;
- arg.updating = 0;
- s = splnet();
- rnh->rnh_walktree(rnh, in_rtqkill, &arg);
- splx(s);
-}
-
-/*
- * Initialize our routing tree.
- */
-int
-in_inithead(void **head, int off)
-{
- struct radix_node_head *rnh;
-
- if(!rn_inithead(head, off))
- return 0;
-
- if(head != (void **)&rt_tables[AF_INET]) /* BOGUS! */
- return 1; /* only do this for the real routing table */
-
- rnh = *head;
- rnh->rnh_addaddr = in_addroute;
- rnh->rnh_matchaddr = in_matroute;
- rnh->rnh_close = in_clsroute;
- in_rtqtimo(rnh); /* kick off timeout first time */
- return 1;
-}
-
diff --git a/c/src/exec/libnetworking/netinet/in_systm.h b/c/src/exec/libnetworking/netinet/in_systm.h
deleted file mode 100644
index d72e9b4665..0000000000
--- a/c/src/exec/libnetworking/netinet/in_systm.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)in_systm.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _NETINET_IN_SYSTM_H_
-#define _NETINET_IN_SYSTM_H_
-
-/*
- * Miscellaneous internetwork
- * definitions for kernel.
- */
-
-/*
- * Network types.
- *
- * Internally the system keeps counters in the headers with the bytes
- * swapped so that VAX instructions will work on them. It reverses
- * the bytes before transmission at each protocol level. The n_ types
- * represent the types with the bytes in ``high-ender'' order.
- */
-typedef u_short n_short; /* short as received from the net */
-typedef u_long n_long; /* long as received from the net */
-
-typedef u_long n_time; /* ms since 00:00 GMT, byte rev */
-
-#ifdef KERNEL
-n_time iptime __P((void));
-#endif
-
-#endif
diff --git a/c/src/exec/libnetworking/netinet/in_var.h b/c/src/exec/libnetworking/netinet/in_var.h
deleted file mode 100644
index e7a54d5e85..0000000000
--- a/c/src/exec/libnetworking/netinet/in_var.h
+++ /dev/null
@@ -1,235 +0,0 @@
-/*
- * Copyright (c) 1985, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)in_var.h 8.2 (Berkeley) 1/9/95
- * $Id$
- */
-
-#ifndef _NETINET_IN_VAR_H_
-#define _NETINET_IN_VAR_H_
-
-#include <sys/queue.h>
-
-/*
- * Interface address, Internet version. One of these structures
- * is allocated for each interface with an Internet address.
- * The ifaddr structure contains the protocol-independent part
- * of the structure and is assumed to be first.
- */
-struct in_ifaddr {
- struct ifaddr ia_ifa; /* protocol-independent info */
-#define ia_ifp ia_ifa.ifa_ifp
-#define ia_flags ia_ifa.ifa_flags
- /* ia_{,sub}net{,mask} in host order */
- u_long ia_net; /* network number of interface */
- u_long ia_netmask; /* mask of net part */
- u_long ia_subnet; /* subnet number, including net */
- u_long ia_subnetmask; /* mask of subnet part */
- struct in_addr ia_netbroadcast; /* to recognize net broadcasts */
- struct in_ifaddr *ia_next; /* next in list of internet addresses */
- struct sockaddr_in ia_addr; /* reserve space for interface name */
- struct sockaddr_in ia_dstaddr; /* reserve space for broadcast addr */
-#define ia_broadaddr ia_dstaddr
- struct sockaddr_in ia_sockmask; /* reserve space for general netmask */
- LIST_HEAD(in_multihead, in_multi) ia_multiaddrs;
- /* list of multicast addresses */
-};
-
-struct in_aliasreq {
- char ifra_name[IFNAMSIZ]; /* if name, e.g. "en0" */
- struct sockaddr_in ifra_addr;
- struct sockaddr_in ifra_broadaddr;
-#define ifra_dstaddr ifra_broadaddr
- struct sockaddr_in ifra_mask;
-};
-/*
- * Given a pointer to an in_ifaddr (ifaddr),
- * return a pointer to the addr as a sockaddr_in.
- */
-#define IA_SIN(ia) (&(((struct in_ifaddr *)(ia))->ia_addr))
-#define IA_DSTSIN(ia) (&(((struct in_ifaddr *)(ia))->ia_dstaddr))
-
-#define IN_LNAOF(in, ifa) \
- ((ntohl((in).s_addr) & ~((struct in_ifaddr *)(ifa)->ia_subnetmask))
-
-
-#ifdef KERNEL
-extern struct in_ifaddr *in_ifaddr;
-extern struct ifqueue ipintrq; /* ip packet input queue */
-extern struct in_addr zeroin_addr;
-extern u_char inetctlerrmap[];
-extern int rtq_reallyold; /* XXX */
-extern int rtq_minreallyold; /* XXX */
-extern int rtq_toomany; /* XXX */
-
-/*
- * Macro for finding the interface (ifnet structure) corresponding to one
- * of our IP addresses.
- */
-#define INADDR_TO_IFP(addr, ifp) \
- /* struct in_addr addr; */ \
- /* struct ifnet *ifp; */ \
-{ \
- register struct in_ifaddr *ia; \
-\
- for (ia = in_ifaddr; \
- ia != NULL && ((ia->ia_ifp->if_flags & IFF_POINTOPOINT)? \
- IA_DSTSIN(ia):IA_SIN(ia))->sin_addr.s_addr != (addr).s_addr; \
- ia = ia->ia_next) \
- continue; \
- if (ia == NULL) \
- for (ia = in_ifaddr; \
- ia != NULL; \
- ia = ia->ia_next) \
- if (ia->ia_ifp->if_flags & IFF_POINTOPOINT && \
- IA_SIN(ia)->sin_addr.s_addr == (addr).s_addr) \
- break; \
- (ifp) = (ia == NULL) ? NULL : ia->ia_ifp; \
-}
-
-/*
- * Macro for finding the internet address structure (in_ifaddr) corresponding
- * to a given interface (ifnet structure).
- */
-#define IFP_TO_IA(ifp, ia) \
- /* struct ifnet *ifp; */ \
- /* struct in_ifaddr *ia; */ \
-{ \
- for ((ia) = in_ifaddr; \
- (ia) != NULL && (ia)->ia_ifp != (ifp); \
- (ia) = (ia)->ia_next) \
- continue; \
-}
-#endif
-
-/*
- * This information should be part of the ifnet structure but we don't wish
- * to change that - as it might break a number of things
- */
-
-struct router_info {
- struct ifnet *rti_ifp;
- int rti_type; /* type of router which is querier on this interface */
- int rti_time; /* # of slow timeouts since last old query */
- struct router_info *rti_next;
-};
-
-/*
- * Internet multicast address structure. There is one of these for each IP
- * multicast group to which this host belongs on a given network interface.
- * They are kept in a linked list, rooted in the interface's in_ifaddr
- * structure.
- */
-struct in_multi {
- LIST_ENTRY(in_multi) inm_entry; /* list glue */
- struct in_addr inm_addr; /* IP multicast address */
- struct ifnet *inm_ifp; /* back pointer to ifnet */
- struct in_ifaddr *inm_ia; /* back pointer to in_ifaddr */
- u_int inm_refcount; /* no. membership claims by sockets */
- u_int inm_timer; /* IGMP membership report timer */
- u_int inm_state; /* state of the membership */
- struct router_info *inm_rti; /* router info*/
-};
-
-#ifdef KERNEL
-/*
- * Structure used by macros below to remember position when stepping through
- * all of the in_multi records.
- */
-struct in_multistep {
- struct in_ifaddr *i_ia;
- struct in_multi *i_inm;
-};
-
-/*
- * Macro for looking up the in_multi record for a given IP multicast address
- * on a given interface. If no matching record is found, "inm" returns NULL.
- */
-#define IN_LOOKUP_MULTI(addr, ifp, inm) \
- /* struct in_addr addr; */ \
- /* struct ifnet *ifp; */ \
- /* struct in_multi *inm; */ \
-{ \
- register struct in_ifaddr *ia; \
-\
- IFP_TO_IA((ifp), ia); \
- if (ia == NULL) \
- (inm) = NULL; \
- else \
- for ((inm) = ia->ia_multiaddrs.lh_first; \
- (inm) != NULL && (inm)->inm_addr.s_addr != (addr).s_addr; \
- (inm) = inm->inm_entry.le_next) \
- continue; \
-}
-
-/*
- * Macro to step through all of the in_multi records, one at a time.
- * The current position is remembered in "step", which the caller must
- * provide. IN_FIRST_MULTI(), below, must be called to initialize "step"
- * and get the first record. Both macros return a NULL "inm" when there
- * are no remaining records.
- */
-#define IN_NEXT_MULTI(step, inm) \
- /* struct in_multistep step; */ \
- /* struct in_multi *inm; */ \
-{ \
- if (((inm) = (step).i_inm) != NULL) \
- (step).i_inm = (inm)->inm_entry.le_next; \
- else \
- while ((step).i_ia != NULL) { \
- (inm) = (step).i_ia->ia_multiaddrs.lh_first; \
- (step).i_ia = (step).i_ia->ia_next; \
- if ((inm) != NULL) { \
- (step).i_inm = (inm)->inm_entry.le_next; \
- break; \
- } \
- } \
-}
-
-#define IN_FIRST_MULTI(step, inm) \
- /* struct in_multistep step; */ \
- /* struct in_multi *inm; */ \
-{ \
- (step).i_ia = in_ifaddr; \
- (step).i_inm = NULL; \
- IN_NEXT_MULTI((step), (inm)); \
-}
-
-struct in_multi *in_addmulti __P((struct in_addr *, struct ifnet *));
-void in_delmulti __P((struct in_multi *));
-int in_control __P((struct socket *, u_long, caddr_t, struct ifnet *));
-void in_rtqdrain __P((void));
-void ip_input __P((struct mbuf *));
-
-#endif /* KERNEL */
-
-#endif /* _NETINET_IN_VAR_H_ */
diff --git a/c/src/exec/libnetworking/netinet/ip.h b/c/src/exec/libnetworking/netinet/ip.h
deleted file mode 100644
index e7f824ca6f..0000000000
--- a/c/src/exec/libnetworking/netinet/ip.h
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ip.h 8.2 (Berkeley) 6/1/94
- * $Id$
- */
-
-#ifndef _NETINET_IP_H_
-#define _NETINET_IP_H_
-
-/*
- * Definitions for internet protocol version 4.
- * Per RFC 791, September 1981.
- */
-#define IPVERSION 4
-
-/*
- * Structure of an internet header, naked of options.
- *
- * We declare ip_len and ip_off to be short, rather than u_short
- * pragmatically since otherwise unsigned comparisons can result
- * against negative integers quite easily, and fail in subtle ways.
- */
-struct ip {
-#ifdef _IP_VHL
- u_char ip_vhl; /* version << 4 | header length >> 2 */
-#else
-#if BYTE_ORDER == LITTLE_ENDIAN
- u_char ip_hl:4, /* header length */
- ip_v:4; /* version */
-#endif
-#if BYTE_ORDER == BIG_ENDIAN
- u_char ip_v:4, /* version */
- ip_hl:4; /* header length */
-#endif
-#endif /* not _IP_VHL */
- u_char ip_tos; /* type of service */
- u_short ip_len; /* total length */
- u_short ip_id; /* identification */
- u_short ip_off; /* fragment offset field */
-#define IP_RF 0x8000 /* reserved fragment flag */
-#define IP_DF 0x4000 /* dont fragment flag */
-#define IP_MF 0x2000 /* more fragments flag */
-#define IP_OFFMASK 0x1fff /* mask for fragmenting bits */
- u_char ip_ttl; /* time to live */
- u_char ip_p; /* protocol */
- u_short ip_sum; /* checksum */
- struct in_addr ip_src,ip_dst; /* source and dest address */
-};
-
-#ifdef _IP_VHL
-#define IP_MAKE_VHL(v, hl) ((v) << 4 | (hl))
-#define IP_VHL_HL(vhl) ((vhl) & 0x0f)
-#define IP_VHL_V(vhl) ((vhl) >> 4)
-#define IP_VHL_BORING 0x45
-#endif
-
-#define IP_MAXPACKET 65535 /* maximum packet size */
-
-/*
- * Definitions for IP type of service (ip_tos)
- */
-#define IPTOS_LOWDELAY 0x10
-#define IPTOS_THROUGHPUT 0x08
-#define IPTOS_RELIABILITY 0x04
-#define IPTOS_MINCOST 0x02
-
-/*
- * Definitions for IP precedence (also in ip_tos) (hopefully unused)
- */
-#define IPTOS_PREC_NETCONTROL 0xe0
-#define IPTOS_PREC_INTERNETCONTROL 0xc0
-#define IPTOS_PREC_CRITIC_ECP 0xa0
-#define IPTOS_PREC_FLASHOVERRIDE 0x80
-#define IPTOS_PREC_FLASH 0x60
-#define IPTOS_PREC_IMMEDIATE 0x40
-#define IPTOS_PREC_PRIORITY 0x20
-#define IPTOS_PREC_ROUTINE 0x00
-
-/*
- * Definitions for options.
- */
-#define IPOPT_COPIED(o) ((o)&0x80)
-#define IPOPT_CLASS(o) ((o)&0x60)
-#define IPOPT_NUMBER(o) ((o)&0x1f)
-
-#define IPOPT_CONTROL 0x00
-#define IPOPT_RESERVED1 0x20
-#define IPOPT_DEBMEAS 0x40
-#define IPOPT_RESERVED2 0x60
-
-#define IPOPT_EOL 0 /* end of option list */
-#define IPOPT_NOP 1 /* no operation */
-
-#define IPOPT_RR 7 /* record packet route */
-#define IPOPT_TS 68 /* timestamp */
-#define IPOPT_SECURITY 130 /* provide s,c,h,tcc */
-#define IPOPT_LSRR 131 /* loose source route */
-#define IPOPT_SATID 136 /* satnet id */
-#define IPOPT_SSRR 137 /* strict source route */
-#define IPOPT_RA 148 /* router alert */
-
-/*
- * Offsets to fields in options other than EOL and NOP.
- */
-#define IPOPT_OPTVAL 0 /* option ID */
-#define IPOPT_OLEN 1 /* option length */
-#define IPOPT_OFFSET 2 /* offset within option */
-#define IPOPT_MINOFF 4 /* min value of above */
-
-/*
- * Time stamp option structure.
- */
-struct ip_timestamp {
- u_char ipt_code; /* IPOPT_TS */
- u_char ipt_len; /* size of structure (variable) */
- u_char ipt_ptr; /* index of current entry */
-#if BYTE_ORDER == LITTLE_ENDIAN
- u_char ipt_flg:4, /* flags, see below */
- ipt_oflw:4; /* overflow counter */
-#endif
-#if BYTE_ORDER == BIG_ENDIAN
- u_char ipt_oflw:4, /* overflow counter */
- ipt_flg:4; /* flags, see below */
-#endif
- union ipt_timestamp {
- n_long ipt_time[1];
- struct ipt_ta {
- struct in_addr ipt_addr;
- n_long ipt_time;
- } ipt_ta[1];
- } ipt_timestamp;
-};
-
-#include <machine/in_cksum.h>
-
-/* flag bits for ipt_flg */
-#define IPOPT_TS_TSONLY 0 /* timestamps only */
-#define IPOPT_TS_TSANDADDR 1 /* timestamps and addresses */
-#define IPOPT_TS_PRESPEC 3 /* specified modules only */
-
-/* bits for security (not byte swapped) */
-#define IPOPT_SECUR_UNCLASS 0x0000
-#define IPOPT_SECUR_CONFID 0xf135
-#define IPOPT_SECUR_EFTO 0x789a
-#define IPOPT_SECUR_MMMM 0xbc4d
-#define IPOPT_SECUR_RESTR 0xaf13
-#define IPOPT_SECUR_SECRET 0xd788
-#define IPOPT_SECUR_TOPSECRET 0x6bc5
-
-/*
- * Internet implementation parameters.
- */
-#define MAXTTL 255 /* maximum time to live (seconds) */
-#define IPDEFTTL 64 /* default ttl, from RFC 1340 */
-#define IPFRAGTTL 60 /* time to live for frags, slowhz */
-#define IPTTLDEC 1 /* subtracted when forwarding */
-
-#define IP_MSS 576 /* default maximum segment size */
-
-#endif
diff --git a/c/src/exec/libnetworking/netinet/ip_divert.c b/c/src/exec/libnetworking/netinet/ip_divert.c
deleted file mode 100644
index 2955e811ad..0000000000
--- a/c/src/exec/libnetworking/netinet/ip_divert.c
+++ /dev/null
@@ -1,382 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/malloc.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-#include <sys/protosw.h>
-#include <sys/socketvar.h>
-#include <sys/errno.h>
-#include <sys/systm.h>
-
-#include <net/if.h>
-#include <net/route.h>
-
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/in_pcb.h>
-#include <netinet/in_var.h>
-#include <netinet/ip_var.h>
-
-/*
- * Divert sockets
- */
-
-/*
- * Allocate enough space to hold a full IP packet
- */
-#define DIVSNDQ (65536 + 100)
-#define DIVRCVQ (65536 + 100)
-
-/* Global variables */
-
-/*
- * ip_input() and ip_output() set this secret value before calling us to
- * let us know which divert port to divert a packet to; this is done so
- * we can use the existing prototype for struct protosw's pr_input().
- * This is stored in host order.
- */
-u_short ip_divert_port;
-
-/*
- * We set this value to a non-zero port number when we want the call to
- * ip_fw_chk() in ip_input() or ip_output() to ignore ``divert <port>''
- * chain entries. This is stored in host order.
- */
-u_short ip_divert_ignore;
-
-/* Internal variables */
-
-static struct inpcbhead divcb;
-static struct inpcbinfo divcbinfo;
-
-static u_long div_sendspace = DIVSNDQ; /* XXX sysctl ? */
-static u_long div_recvspace = DIVRCVQ; /* XXX sysctl ? */
-
-/* Optimization: have this preinitialized */
-static struct sockaddr_in divsrc = { sizeof(divsrc), AF_INET };
-
-/* Internal functions */
-
-static int div_output(struct socket *so,
- struct mbuf *m, struct mbuf *addr, struct mbuf *control);
-
-/*
- * Initialize divert connection block queue.
- */
-void
-div_init(void)
-{
- LIST_INIT(&divcb);
- divcbinfo.listhead = &divcb;
- /*
- * XXX We don't use the hash list for divert IP, but it's easier
- * to allocate a one entry hash list than it is to check all
- * over the place for hashbase == NULL.
- */
- divcbinfo.hashbase = hashinit(1, M_PCB, &divcbinfo.hashmask);
-}
-
-/*
- * Setup generic address and protocol structures
- * for div_input routine, then pass them along with
- * mbuf chain. ip->ip_len is assumed to have had
- * the header length (hlen) subtracted out already.
- * We tell whether the packet was incoming or outgoing
- * by seeing if hlen == 0, which is a hack.
- */
-void
-div_input(struct mbuf *m, int hlen)
-{
- struct ip *ip;
- struct inpcb *inp;
- struct socket *sa;
-
- /* Sanity check */
- if (ip_divert_port == 0)
- panic("div_input: port is 0");
-
- /* Assure header */
- if (m->m_len < sizeof(struct ip) &&
- (m = m_pullup(m, sizeof(struct ip))) == 0) {
- return;
- }
- ip = mtod(m, struct ip *);
-
- /* Record divert port */
- divsrc.sin_port = htons(ip_divert_port);
-
- /* Restore packet header fields */
- ip->ip_len += hlen;
- HTONS(ip->ip_len);
- HTONS(ip->ip_off);
-
- /* Record receive interface address, if any */
- divsrc.sin_addr.s_addr = 0;
- if (hlen) {
- struct ifaddr *ifa;
-
-#ifdef DIAGNOSTIC
- /* Sanity check */
- if (!(m->m_flags & M_PKTHDR))
- panic("div_input: no pkt hdr");
-#endif
-
- /* More fields affected by ip_input() */
- HTONS(ip->ip_id);
-
- /* Find IP address for recieve interface */
- for (ifa = m->m_pkthdr.rcvif->if_addrlist;
- ifa != NULL; ifa = ifa->ifa_next) {
- if (ifa->ifa_addr == NULL)
- continue;
- if (ifa->ifa_addr->sa_family != AF_INET)
- continue;
- divsrc.sin_addr =
- ((struct sockaddr_in *) ifa->ifa_addr)->sin_addr;
- break;
- }
- }
-
- /* Put packet on socket queue, if any */
- sa = NULL;
- for (inp = divcb.lh_first; inp != NULL; inp = inp->inp_list.le_next) {
- if (inp->inp_lport == htons(ip_divert_port))
- sa = inp->inp_socket;
- }
- if (sa) {
- if (sbappendaddr(&sa->so_rcv, (struct sockaddr *)&divsrc,
- m, (struct mbuf *)0) == 0)
- m_freem(m);
- else
- sorwakeup(sa);
- } else {
- m_freem(m);
- ipstat.ips_noproto++;
- ipstat.ips_delivered--;
- }
-}
-
-/*
- * Deliver packet back into the IP processing machinery.
- *
- * If no address specified, or address is 0.0.0.0, send to ip_output();
- * otherwise, send to ip_input() and mark as having been received on
- * the interface with that address.
- *
- * If no address specified, or dest port is 0, allow packet to divert
- * back to this socket; otherwise, don't.
- */
-static int
-div_output(so, m, addr, control)
- struct socket *so;
- register struct mbuf *m;
- struct mbuf *addr, *control;
-{
- register struct inpcb *const inp = sotoinpcb(so);
- register struct ip *const ip = mtod(m, struct ip *);
- struct sockaddr_in *sin = NULL;
- int error = 0;
-
- if (control)
- m_freem(control); /* XXX */
- if (addr)
- sin = mtod(addr, struct sockaddr_in *);
-
- /* Loopback avoidance option */
- ip_divert_ignore = ntohs(inp->inp_lport);
-
- /* Reinject packet into the system as incoming or outgoing */
- if (!sin || sin->sin_addr.s_addr == 0) {
- /* Don't allow both user specified and setsockopt options,
- and don't allow packet length sizes that will crash */
- if (((ip->ip_hl != (sizeof (*ip) >> 2)) && inp->inp_options) ||
- ((u_short)ntohs(ip->ip_len) > m->m_pkthdr.len)) {
- error = EINVAL;
- goto cantsend;
- }
-
- /* Convert fields to host order for ip_output() */
- NTOHS(ip->ip_len);
- NTOHS(ip->ip_off);
-
- /* Send packet to output processing */
- ipstat.ips_rawout++; /* XXX */
- error = ip_output(m, inp->inp_options, &inp->inp_route,
- (so->so_options & SO_DONTROUTE) |
- IP_ALLOWBROADCAST | IP_RAWOUTPUT, inp->inp_moptions);
- } else {
- struct ifaddr *ifa;
-
- /* Find receive interface with the given IP address */
- sin->sin_port = 0;
- if ((ifa = ifa_ifwithaddr((struct sockaddr *) sin)) == 0) {
- error = EADDRNOTAVAIL;
- goto cantsend;
- }
- m->m_pkthdr.rcvif = ifa->ifa_ifp;
-
- /* Send packet to input processing */
- ip_input(m);
- }
-
- /* Reset for next time (and other packets) */
- ip_divert_ignore = 0;
- return error;
-
-cantsend:
- ip_divert_ignore = 0;
- m_freem(m);
- return error;
-}
-
-/*ARGSUSED*/
-int
-div_usrreq(so, req, m, nam, control)
- register struct socket *so;
- int req;
- struct mbuf *m, *nam, *control;
-{
- register int error = 0;
- register struct inpcb *inp = sotoinpcb(so);
- int s;
-
- if (inp == NULL && req != PRU_ATTACH) {
- error = EINVAL;
- goto release;
- }
- switch (req) {
-
- case PRU_ATTACH:
- if (inp)
- panic("div_attach");
- if ((so->so_state & SS_PRIV) == 0) {
- error = EACCES;
- break;
- }
- s = splnet();
- error = in_pcballoc(so, &divcbinfo);
- splx(s);
- if (error)
- break;
- error = soreserve(so, div_sendspace, div_recvspace);
- if (error)
- break;
- inp = (struct inpcb *)so->so_pcb;
- inp->inp_ip_p = (int)nam; /* XXX */
- inp->inp_flags |= INP_HDRINCL;
- /* The socket is always "connected" because
- we always know "where" to send the packet */
- so->so_state |= SS_ISCONNECTED;
- break;
-
- case PRU_DISCONNECT:
- if ((so->so_state & SS_ISCONNECTED) == 0) {
- error = ENOTCONN;
- break;
- }
- /* FALLTHROUGH */
- case PRU_ABORT:
- soisdisconnected(so);
- /* FALLTHROUGH */
- case PRU_DETACH:
- if (inp == 0)
- panic("div_detach");
- in_pcbdetach(inp);
- break;
-
- case PRU_BIND:
- s = splnet();
- error = in_pcbbind(inp, nam);
- splx(s);
- break;
-
- /*
- * Mark the connection as being incapable of further input.
- */
- case PRU_SHUTDOWN:
- socantsendmore(so);
- break;
-
- case PRU_SEND:
- /* Packet must have a header (but that's about it) */
- if (m->m_len < sizeof (struct ip) ||
- (m = m_pullup(m, sizeof (struct ip))) == 0) {
- ipstat.ips_toosmall++;
- error = EINVAL;
- break;
- }
-
- /* Send packet */
- error = div_output(so, m, nam, control);
- m = NULL;
- break;
-
- case PRU_SOCKADDR:
- in_setsockaddr(inp, nam);
- break;
-
- case PRU_SENSE:
- /*
- * stat: don't bother with a blocksize.
- */
- return (0);
-
- /*
- * Not supported.
- */
- case PRU_CONNECT:
- case PRU_CONNECT2:
- case PRU_CONTROL:
- case PRU_RCVOOB:
- case PRU_RCVD:
- case PRU_LISTEN:
- case PRU_ACCEPT:
- case PRU_SENDOOB:
- case PRU_PEERADDR:
- error = EOPNOTSUPP;
- break;
-
- default:
- panic("div_usrreq");
- }
-release:
- if (m)
- m_freem(m);
- return (error);
-}
diff --git a/c/src/exec/libnetworking/netinet/ip_fw.c b/c/src/exec/libnetworking/netinet/ip_fw.c
deleted file mode 100644
index aeb09b0bbe..0000000000
--- a/c/src/exec/libnetworking/netinet/ip_fw.c
+++ /dev/null
@@ -1,1069 +0,0 @@
-/*
- * Copyright (c) 1996 Alex Nash
- * Copyright (c) 1993 Daniel Boulet
- * Copyright (c) 1994 Ugen J.S.Antsilevich
- *
- * Redistribution and use in source forms, with and without modification,
- * are permitted provided that this entire comment appears intact.
- *
- * Redistribution in binary form may occur without any restrictions.
- * Obviously, it would be nice if you gave credit where credit is due
- * but requiring it would be too onerous.
- *
- * This software is provided ``AS IS'' without any warranties of any kind.
- *
- * $Id$
- */
-
-/*
- * Implement IP packet firewall
- */
-
-#ifndef IPFIREWALL_MODULE
-#include "opt_ipfw.h"
-#endif
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/malloc.h>
-#include <sys/mbuf.h>
-#include <sys/queue.h>
-#include <sys/kernel.h>
-#include <sys/socket.h>
-#include <sys/time.h>
-#include <sys/sysctl.h>
-#include <net/if.h>
-#include <net/route.h>
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/ip_var.h>
-#include <netinet/ip_icmp.h>
-#include <netinet/ip_fw.h>
-#include <netinet/tcp.h>
-#include <netinet/tcp_timer.h>
-#include <netinet/tcp_var.h>
-#include <netinet/tcpip.h>
-#include <netinet/udp.h>
-
-static int fw_debug = 1;
-#ifdef IPFIREWALL_VERBOSE
-static int fw_verbose = 1;
-#else
-static int fw_verbose = 0;
-#endif
-#ifdef IPFIREWALL_VERBOSE_LIMIT
-static int fw_verbose_limit = IPFIREWALL_VERBOSE_LIMIT;
-#else
-static int fw_verbose_limit = 0;
-#endif
-
-LIST_HEAD (ip_fw_head, ip_fw_chain) ip_fw_chain;
-
-#ifdef SYSCTL_NODE
-SYSCTL_NODE(_net_inet_ip, OID_AUTO, fw, CTLFLAG_RW, 0, "Firewall");
-SYSCTL_INT(_net_inet_ip_fw, OID_AUTO, debug, CTLFLAG_RW, &fw_debug, 0, "");
-SYSCTL_INT(_net_inet_ip_fw, OID_AUTO, verbose, CTLFLAG_RW, &fw_verbose, 0, "");
-SYSCTL_INT(_net_inet_ip_fw, OID_AUTO, verbose_limit, CTLFLAG_RW, &fw_verbose_limit, 0, "");
-#endif
-
-#define dprintf(a) if (!fw_debug); else printf a
-
-#define print_ip(a) printf("%ld.%ld.%ld.%ld",(ntohl(a.s_addr)>>24)&0xFF,\
- (ntohl(a.s_addr)>>16)&0xFF,\
- (ntohl(a.s_addr)>>8)&0xFF,\
- (ntohl(a.s_addr))&0xFF);
-
-#define dprint_ip(a) if (!fw_debug); else print_ip(a)
-
-static int add_entry __P((struct ip_fw_head *chainptr, struct ip_fw *frwl));
-static int del_entry __P((struct ip_fw_head *chainptr, u_short number));
-static int zero_entry __P((struct mbuf *m));
-static struct ip_fw *check_ipfw_struct __P((struct ip_fw *m));
-static struct ip_fw *check_ipfw_mbuf __P((struct mbuf *fw));
-static int ipopts_match __P((struct ip *ip, struct ip_fw *f));
-static int port_match __P((u_short *portptr, int nports, u_short port,
- int range_flag));
-static int tcpflg_match __P((struct tcphdr *tcp, struct ip_fw *f));
-static int icmptype_match __P((struct icmp * icmp, struct ip_fw * f));
-static void ipfw_report __P((struct ip_fw *f, struct ip *ip,
- struct ifnet *rif, struct ifnet *oif));
-
-#ifdef IPFIREWALL_MODULE
-static ip_fw_chk_t *old_chk_ptr;
-static ip_fw_ctl_t *old_ctl_ptr;
-#endif
-
-static int ip_fw_chk __P((struct ip **pip, int hlen,
- struct ifnet *oif, int ignport, struct mbuf **m));
-static int ip_fw_ctl __P((int stage, struct mbuf **mm));
-
-static char err_prefix[] = "ip_fw_ctl:";
-
-/*
- * Returns 1 if the port is matched by the vector, 0 otherwise
- */
-static inline int
-port_match(u_short *portptr, int nports, u_short port, int range_flag)
-{
- if (!nports)
- return 1;
- if (range_flag) {
- if (portptr[0] <= port && port <= portptr[1]) {
- return 1;
- }
- nports -= 2;
- portptr += 2;
- }
- while (nports-- > 0) {
- if (*portptr++ == port) {
- return 1;
- }
- }
- return 0;
-}
-
-static int
-tcpflg_match(struct tcphdr *tcp, struct ip_fw *f)
-{
- u_char flg_set, flg_clr;
-
- if ((f->fw_tcpf & IP_FW_TCPF_ESTAB) &&
- (tcp->th_flags & (IP_FW_TCPF_RST | IP_FW_TCPF_ACK)))
- return 1;
-
- flg_set = tcp->th_flags & f->fw_tcpf;
- flg_clr = tcp->th_flags & f->fw_tcpnf;
-
- if (flg_set != f->fw_tcpf)
- return 0;
- if (flg_clr)
- return 0;
-
- return 1;
-}
-
-static int
-icmptype_match(struct icmp *icmp, struct ip_fw *f)
-{
- int type;
-
- if (!(f->fw_flg & IP_FW_F_ICMPBIT))
- return(1);
-
- type = icmp->icmp_type;
-
- /* check for matching type in the bitmap */
- if (type < IP_FW_ICMPTYPES_DIM * sizeof(unsigned) * 8 &&
- (f->fw_icmptypes[type / (sizeof(unsigned) * 8)] &
- (1U << (type % (8 * sizeof(unsigned))))))
- return(1);
-
- return(0); /* no match */
-}
-
-static int
-ipopts_match(struct ip *ip, struct ip_fw *f)
-{
- register u_char *cp;
- int opt, optlen, cnt;
- u_char opts, nopts, nopts_sve;
-
- cp = (u_char *)(ip + 1);
- cnt = (ip->ip_hl << 2) - sizeof (struct ip);
- opts = f->fw_ipopt;
- nopts = nopts_sve = f->fw_ipnopt;
-
- for (; cnt > 0; cnt -= optlen, cp += optlen) {
- opt = cp[IPOPT_OPTVAL];
- if (opt == IPOPT_EOL)
- break;
- if (opt == IPOPT_NOP)
- optlen = 1;
- else {
- optlen = cp[IPOPT_OLEN];
- if (optlen <= 0 || optlen > cnt) {
- return 0; /*XXX*/
- }
- }
- switch (opt) {
-
- default:
- break;
-
- case IPOPT_LSRR:
- opts &= ~IP_FW_IPOPT_LSRR;
- nopts &= ~IP_FW_IPOPT_LSRR;
- break;
-
- case IPOPT_SSRR:
- opts &= ~IP_FW_IPOPT_SSRR;
- nopts &= ~IP_FW_IPOPT_SSRR;
- break;
-
- case IPOPT_RR:
- opts &= ~IP_FW_IPOPT_RR;
- nopts &= ~IP_FW_IPOPT_RR;
- break;
- case IPOPT_TS:
- opts &= ~IP_FW_IPOPT_TS;
- nopts &= ~IP_FW_IPOPT_TS;
- break;
- }
- if (opts == nopts)
- break;
- }
- if (opts == 0 && nopts == nopts_sve)
- return 1;
- else
- return 0;
-}
-
-static inline int
-iface_match(struct ifnet *ifp, union ip_fw_if *ifu, int byname)
-{
- /* Check by name or by IP address */
- if (byname) {
- /* Check unit number (-1 is wildcard) */
- if (ifu->fu_via_if.unit != -1
- && ifp->if_unit != ifu->fu_via_if.unit)
- return(0);
- /* Check name */
- if (strncmp(ifp->if_name, ifu->fu_via_if.name, FW_IFNLEN))
- return(0);
- return(1);
- } else if (ifu->fu_via_ip.s_addr != 0) { /* Zero == wildcard */
- struct ifaddr *ia;
-
- for (ia = ifp->if_addrlist; ia; ia = ia->ifa_next) {
- if (ia->ifa_addr == NULL)
- continue;
- if (ia->ifa_addr->sa_family != AF_INET)
- continue;
- if (ifu->fu_via_ip.s_addr != ((struct sockaddr_in *)
- (ia->ifa_addr))->sin_addr.s_addr)
- continue;
- return(1);
- }
- return(0);
- }
- return(1);
-}
-
-static void
-ipfw_report(struct ip_fw *f, struct ip *ip,
- struct ifnet *rif, struct ifnet *oif)
-{
- static int counter;
- struct tcphdr *const tcp = (struct tcphdr *) ((u_long *) ip+ ip->ip_hl);
- struct udphdr *const udp = (struct udphdr *) ((u_long *) ip+ ip->ip_hl);
- struct icmp *const icmp = (struct icmp *) ((u_long *) ip + ip->ip_hl);
- int count;
-
- count = f ? f->fw_pcnt : ++counter;
- if (fw_verbose_limit != 0 && count > fw_verbose_limit)
- return;
-
- /* Print command name */
- printf("ipfw: %d ", f ? f->fw_number : -1);
- if (!f)
- printf("Refuse");
- else
- switch (f->fw_flg & IP_FW_F_COMMAND) {
- case IP_FW_F_DENY:
- printf("Deny");
- break;
- case IP_FW_F_REJECT:
- if (f->fw_reject_code == IP_FW_REJECT_RST)
- printf("Reset");
- else
- printf("Unreach");
- break;
- case IP_FW_F_ACCEPT:
- printf("Accept");
- break;
- case IP_FW_F_COUNT:
- printf("Count");
- break;
- case IP_FW_F_DIVERT:
- printf("Divert %d", f->fw_divert_port);
- break;
- case IP_FW_F_TEE:
- printf("Tee %d", f->fw_divert_port);
- break;
- case IP_FW_F_SKIPTO:
- printf("SkipTo %d", f->fw_skipto_rule);
- break;
- default:
- printf("UNKNOWN");
- break;
- }
- printf(" ");
-
- switch (ip->ip_p) {
- case IPPROTO_TCP:
- printf("TCP ");
- print_ip(ip->ip_src);
- if ((ip->ip_off & IP_OFFMASK) == 0)
- printf(":%d ", ntohs(tcp->th_sport));
- else
- printf(" ");
- print_ip(ip->ip_dst);
- if ((ip->ip_off & IP_OFFMASK) == 0)
- printf(":%d", ntohs(tcp->th_dport));
- break;
- case IPPROTO_UDP:
- printf("UDP ");
- print_ip(ip->ip_src);
- if ((ip->ip_off & IP_OFFMASK) == 0)
- printf(":%d ", ntohs(udp->uh_sport));
- else
- printf(" ");
- print_ip(ip->ip_dst);
- if ((ip->ip_off & IP_OFFMASK) == 0)
- printf(":%d", ntohs(udp->uh_dport));
- break;
- case IPPROTO_ICMP:
- printf("ICMP:%u.%u ", icmp->icmp_type, icmp->icmp_code);
- print_ip(ip->ip_src);
- printf(" ");
- print_ip(ip->ip_dst);
- break;
- default:
- printf("P:%d ", ip->ip_p);
- print_ip(ip->ip_src);
- printf(" ");
- print_ip(ip->ip_dst);
- break;
- }
- if (oif)
- printf(" out via %s%d", oif->if_name, oif->if_unit);
- else if (rif)
- printf(" in via %s%d", rif->if_name, rif->if_unit);
- if ((ip->ip_off & IP_OFFMASK))
- printf(" Fragment = %d",ip->ip_off & IP_OFFMASK);
- printf("\n");
- if (fw_verbose_limit != 0 && count == fw_verbose_limit)
- printf("ipfw: limit reached on rule #%d\n",
- f ? f->fw_number : -1);
-}
-
-/*
- * Parameters:
- *
- * ip Pointer to packet header (struct ip *)
- * hlen Packet header length
- * oif Outgoing interface, or NULL if packet is incoming
- * ignport Ignore all divert/tee rules to this port (if non-zero)
- * *m The packet; we set to NULL when/if we nuke it.
- *
- * Return value:
- *
- * 0 The packet is to be accepted and routed normally OR
- * the packet was denied/rejected and has been dropped;
- * in the latter case, *m is equal to NULL upon return.
- * port Divert the packet to port.
- */
-
-static int
-ip_fw_chk(struct ip **pip, int hlen,
- struct ifnet *oif, int ignport, struct mbuf **m)
-{
- struct ip_fw_chain *chain;
- struct ip_fw *rule = NULL;
- struct ip *ip = *pip;
- struct ifnet *const rif = (*m)->m_pkthdr.rcvif;
- u_short offset = (ip->ip_off & IP_OFFMASK);
- u_short src_port, dst_port;
-
- /*
- * Go down the chain, looking for enlightment
- */
- for (chain=ip_fw_chain.lh_first; chain; chain = chain->chain.le_next) {
- register struct ip_fw *const f = chain->rule;
-
- /* Check direction inbound */
- if (!oif && !(f->fw_flg & IP_FW_F_IN))
- continue;
-
- /* Check direction outbound */
- if (oif && !(f->fw_flg & IP_FW_F_OUT))
- continue;
-
- /* Fragments */
- if ((f->fw_flg & IP_FW_F_FRAG) && !(ip->ip_off & IP_OFFMASK))
- continue;
-
- /* If src-addr doesn't match, not this rule. */
- if (((f->fw_flg & IP_FW_F_INVSRC) != 0) ^ ((ip->ip_src.s_addr
- & f->fw_smsk.s_addr) != f->fw_src.s_addr))
- continue;
-
- /* If dest-addr doesn't match, not this rule. */
- if (((f->fw_flg & IP_FW_F_INVDST) != 0) ^ ((ip->ip_dst.s_addr
- & f->fw_dmsk.s_addr) != f->fw_dst.s_addr))
- continue;
-
- /* Interface check */
- if ((f->fw_flg & IF_FW_F_VIAHACK) == IF_FW_F_VIAHACK) {
- struct ifnet *const iface = oif ? oif : rif;
-
- /* Backwards compatibility hack for "via" */
- if (!iface || !iface_match(iface,
- &f->fw_in_if, f->fw_flg & IP_FW_F_OIFNAME))
- continue;
- } else {
- /* Check receive interface */
- if ((f->fw_flg & IP_FW_F_IIFACE)
- && (!rif || !iface_match(rif,
- &f->fw_in_if, f->fw_flg & IP_FW_F_IIFNAME)))
- continue;
- /* Check outgoing interface */
- if ((f->fw_flg & IP_FW_F_OIFACE)
- && (!oif || !iface_match(oif,
- &f->fw_out_if, f->fw_flg & IP_FW_F_OIFNAME)))
- continue;
- }
-
- /* Check IP options */
- if (f->fw_ipopt != f->fw_ipnopt && !ipopts_match(ip, f))
- continue;
-
- /* Check protocol; if wildcard, match */
- if (f->fw_prot == IPPROTO_IP)
- goto got_match;
-
- /* If different, don't match */
- if (ip->ip_p != f->fw_prot)
- continue;
-
-#define PULLUP_TO(len) do { \
- if ((*m)->m_len < (len) \
- && (*m = m_pullup(*m, (len))) == 0) { \
- goto bogusfrag; \
- } \
- *pip = ip = mtod(*m, struct ip *); \
- offset = (ip->ip_off & IP_OFFMASK); \
- } while (0)
-
- /* Protocol specific checks */
- switch (ip->ip_p) {
- case IPPROTO_TCP:
- {
- struct tcphdr *tcp;
-
- if (offset == 1) /* cf. RFC 1858 */
- goto bogusfrag;
- if (offset != 0) {
- /*
- * TCP flags and ports aren't available in this
- * packet -- if this rule specified either one,
- * we consider the rule a non-match.
- */
- if (f->fw_nports != 0 ||
- f->fw_tcpf != f->fw_tcpnf)
- continue;
-
- break;
- }
- PULLUP_TO(hlen + 14);
- tcp = (struct tcphdr *) ((u_long *)ip + ip->ip_hl);
- if (f->fw_tcpf != f->fw_tcpnf && !tcpflg_match(tcp, f))
- continue;
- src_port = ntohs(tcp->th_sport);
- dst_port = ntohs(tcp->th_dport);
- goto check_ports;
- }
-
- case IPPROTO_UDP:
- {
- struct udphdr *udp;
-
- if (offset != 0) {
- /*
- * Port specification is unavailable -- if this
- * rule specifies a port, we consider the rule
- * a non-match.
- */
- if (f->fw_nports != 0)
- continue;
-
- break;
- }
- PULLUP_TO(hlen + 4);
- udp = (struct udphdr *) ((u_long *)ip + ip->ip_hl);
- src_port = ntohs(udp->uh_sport);
- dst_port = ntohs(udp->uh_dport);
-check_ports:
- if (!port_match(&f->fw_pts[0],
- IP_FW_GETNSRCP(f), src_port,
- f->fw_flg & IP_FW_F_SRNG))
- continue;
- if (!port_match(&f->fw_pts[IP_FW_GETNSRCP(f)],
- IP_FW_GETNDSTP(f), dst_port,
- f->fw_flg & IP_FW_F_DRNG))
- continue;
- break;
- }
-
- case IPPROTO_ICMP:
- {
- struct icmp *icmp;
-
- if (offset != 0) /* Type isn't valid */
- break;
- PULLUP_TO(hlen + 2);
- icmp = (struct icmp *) ((u_long *)ip + ip->ip_hl);
- if (!icmptype_match(icmp, f))
- continue;
- break;
- }
-#undef PULLUP_TO
-
-bogusfrag:
- if (fw_verbose)
- ipfw_report(NULL, ip, rif, oif);
- goto dropit;
- }
-
-got_match:
- /* Ignore divert/tee rule if socket port is "ignport" */
- switch (f->fw_flg & IP_FW_F_COMMAND) {
- case IP_FW_F_DIVERT:
- case IP_FW_F_TEE:
- if (f->fw_divert_port == ignport)
- continue; /* ignore this rule */
- break;
- }
-
- /* Update statistics */
- f->fw_pcnt += 1;
- f->fw_bcnt += ip->ip_len;
- f->timestamp = rtems_bsdnet_seconds_since_boot();
-
- /* Log to console if desired */
- if ((f->fw_flg & IP_FW_F_PRN) && fw_verbose)
- ipfw_report(f, ip, rif, oif);
-
- /* Take appropriate action */
- switch (f->fw_flg & IP_FW_F_COMMAND) {
- case IP_FW_F_ACCEPT:
- return(0);
- case IP_FW_F_COUNT:
- continue;
- case IP_FW_F_DIVERT:
- return(f->fw_divert_port);
- case IP_FW_F_TEE:
- /*
- * XXX someday tee packet here, but beware that you
- * can't use m_copym() or m_copypacket() because
- * the divert input routine modifies the mbuf
- * (and these routines only increment reference
- * counts in the case of mbuf clusters), so need
- * to write custom routine.
- */
- continue;
- case IP_FW_F_SKIPTO:
-#ifdef DIAGNOSTIC
- while (chain->chain.le_next
- && chain->chain.le_next->rule->fw_number
- < f->fw_skipto_rule)
-#else
- while (chain->chain.le_next->rule->fw_number
- < f->fw_skipto_rule)
-#endif
- chain = chain->chain.le_next;
- continue;
- }
-
- /* Deny/reject this packet using this rule */
- rule = f;
- break;
- }
-
-#ifdef DIAGNOSTIC
- /* Rule 65535 should always be there and should always match */
- if (!chain)
- panic("ip_fw: chain");
-#endif
-
- /*
- * At this point, we're going to drop the packet.
- * Send a reject notice if all of the following are true:
- *
- * - The packet matched a reject rule
- * - The packet is not an ICMP packet
- * - The packet is not a multicast or broadcast packet
- */
- if ((rule->fw_flg & IP_FW_F_COMMAND) == IP_FW_F_REJECT
- && ip->ip_p != IPPROTO_ICMP
- && !((*m)->m_flags & (M_BCAST|M_MCAST))
- && !IN_MULTICAST(ntohl(ip->ip_dst.s_addr))) {
- switch (rule->fw_reject_code) {
- case IP_FW_REJECT_RST:
- {
- struct tcphdr *const tcp =
- (struct tcphdr *) ((u_long *)ip + ip->ip_hl);
- struct tcpiphdr ti, *const tip = (struct tcpiphdr *) ip;
-
- if (offset != 0 || (tcp->th_flags & TH_RST))
- break;
- ti.ti_i = *((struct ipovly *) ip);
- ti.ti_t = *tcp;
- bcopy(&ti, ip, sizeof(ti));
- NTOHL(tip->ti_seq);
- NTOHL(tip->ti_ack);
- tip->ti_len = ip->ip_len - hlen - (tip->ti_off << 2);
- if (tcp->th_flags & TH_ACK) {
- tcp_respond(NULL, tip, *m,
- (tcp_seq)0, ntohl(tcp->th_ack), TH_RST);
- } else {
- if (tcp->th_flags & TH_SYN)
- tip->ti_len++;
- tcp_respond(NULL, tip, *m, tip->ti_seq
- + tip->ti_len, (tcp_seq)0, TH_RST|TH_ACK);
- }
- *m = NULL;
- break;
- }
- default: /* Send an ICMP unreachable using code */
- icmp_error(*m, ICMP_UNREACH,
- rule->fw_reject_code, 0L, 0);
- *m = NULL;
- break;
- }
- }
-
-dropit:
- /*
- * Finally, drop the packet.
- */
- if (*m) {
- m_freem(*m);
- *m = NULL;
- }
- return(0);
-}
-
-static int
-add_entry(struct ip_fw_head *chainptr, struct ip_fw *frwl)
-{
- struct ip_fw *ftmp = 0;
- struct ip_fw_chain *fwc = 0, *fcp, *fcpl = 0;
- u_short nbr = 0;
- int s;
-
- fwc = malloc(sizeof *fwc, M_IPFW, M_DONTWAIT);
- ftmp = malloc(sizeof *ftmp, M_IPFW, M_DONTWAIT);
- if (!fwc || !ftmp) {
- dprintf(("%s malloc said no\n", err_prefix));
- if (fwc) free(fwc, M_IPFW);
- if (ftmp) free(ftmp, M_IPFW);
- return (ENOSPC);
- }
-
- bcopy(frwl, ftmp, sizeof(struct ip_fw));
- ftmp->fw_in_if.fu_via_if.name[FW_IFNLEN - 1] = '\0';
- ftmp->fw_pcnt = 0L;
- ftmp->fw_bcnt = 0L;
- fwc->rule = ftmp;
-
- s = splnet();
-
- if (!chainptr->lh_first) {
- LIST_INSERT_HEAD(chainptr, fwc, chain);
- splx(s);
- return(0);
- } else if (ftmp->fw_number == (u_short)-1) {
- if (fwc) free(fwc, M_IPFW);
- if (ftmp) free(ftmp, M_IPFW);
- splx(s);
- dprintf(("%s bad rule number\n", err_prefix));
- return (EINVAL);
- }
-
- /* If entry number is 0, find highest numbered rule and add 100 */
- if (ftmp->fw_number == 0) {
- for (fcp = chainptr->lh_first; fcp; fcp = fcp->chain.le_next) {
- if (fcp->rule->fw_number != (u_short)-1)
- nbr = fcp->rule->fw_number;
- else
- break;
- }
- if (nbr < (u_short)-1 - 100)
- nbr += 100;
- ftmp->fw_number = nbr;
- }
-
- /* Got a valid number; now insert it, keeping the list ordered */
- for (fcp = chainptr->lh_first; fcp; fcp = fcp->chain.le_next) {
- if (fcp->rule->fw_number > ftmp->fw_number) {
- if (fcpl) {
- LIST_INSERT_AFTER(fcpl, fwc, chain);
- } else {
- LIST_INSERT_HEAD(chainptr, fwc, chain);
- }
- break;
- } else {
- fcpl = fcp;
- }
- }
-
- splx(s);
- return (0);
-}
-
-static int
-del_entry(struct ip_fw_head *chainptr, u_short number)
-{
- struct ip_fw_chain *fcp;
- int s;
-
- s = splnet();
-
- fcp = chainptr->lh_first;
- if (number != (u_short)-1) {
- for (; fcp; fcp = fcp->chain.le_next) {
- if (fcp->rule->fw_number == number) {
- LIST_REMOVE(fcp, chain);
- splx(s);
- free(fcp->rule, M_IPFW);
- free(fcp, M_IPFW);
- return 0;
- }
- }
- }
-
- splx(s);
- return (EINVAL);
-}
-
-static int
-zero_entry(struct mbuf *m)
-{
- struct ip_fw *frwl;
- struct ip_fw_chain *fcp;
- int s;
-
- if (m) {
- if (m->m_len != sizeof(struct ip_fw))
- return(EINVAL);
- frwl = mtod(m, struct ip_fw *);
- }
- else
- frwl = NULL;
-
- /*
- * It's possible to insert multiple chain entries with the
- * same number, so we don't stop after finding the first
- * match if zeroing a specific entry.
- */
- s = splnet();
- for (fcp = ip_fw_chain.lh_first; fcp; fcp = fcp->chain.le_next)
- if (!frwl || frwl->fw_number == fcp->rule->fw_number) {
- fcp->rule->fw_bcnt = fcp->rule->fw_pcnt = 0;
- fcp->rule->timestamp = 0;
- }
- splx(s);
-
- if (fw_verbose) {
- if (frwl)
- printf("ipfw: Entry %d cleared.\n", frwl->fw_number);
- else
- printf("ipfw: Accounting cleared.\n");
- }
-
- return(0);
-}
-
-static struct ip_fw *
-check_ipfw_mbuf(struct mbuf *m)
-{
- /* Check length */
- if (m->m_len != sizeof(struct ip_fw)) {
- dprintf(("%s len=%d, want %d\n", err_prefix, m->m_len,
- (int)sizeof(struct ip_fw)));
- return (NULL);
- }
- return(check_ipfw_struct(mtod(m, struct ip_fw *)));
-}
-
-static struct ip_fw *
-check_ipfw_struct(struct ip_fw *frwl)
-{
- /* Check for invalid flag bits */
- if ((frwl->fw_flg & ~IP_FW_F_MASK) != 0) {
- dprintf(("%s undefined flag bits set (flags=%x)\n",
- err_prefix, frwl->fw_flg));
- return (NULL);
- }
- /* Must apply to incoming or outgoing (or both) */
- if (!(frwl->fw_flg & (IP_FW_F_IN | IP_FW_F_OUT))) {
- dprintf(("%s neither in nor out\n", err_prefix));
- return (NULL);
- }
- /* Empty interface name is no good */
- if (((frwl->fw_flg & IP_FW_F_IIFNAME)
- && !*frwl->fw_in_if.fu_via_if.name)
- || ((frwl->fw_flg & IP_FW_F_OIFNAME)
- && !*frwl->fw_out_if.fu_via_if.name)) {
- dprintf(("%s empty interface name\n", err_prefix));
- return (NULL);
- }
- /* Sanity check interface matching */
- if ((frwl->fw_flg & IF_FW_F_VIAHACK) == IF_FW_F_VIAHACK) {
- ; /* allow "via" backwards compatibility */
- } else if ((frwl->fw_flg & IP_FW_F_IN)
- && (frwl->fw_flg & IP_FW_F_OIFACE)) {
- dprintf(("%s outgoing interface check on incoming\n",
- err_prefix));
- return (NULL);
- }
- /* Sanity check port ranges */
- if ((frwl->fw_flg & IP_FW_F_SRNG) && IP_FW_GETNSRCP(frwl) < 2) {
- dprintf(("%s src range set but n_src_p=%d\n",
- err_prefix, IP_FW_GETNSRCP(frwl)));
- return (NULL);
- }
- if ((frwl->fw_flg & IP_FW_F_DRNG) && IP_FW_GETNDSTP(frwl) < 2) {
- dprintf(("%s dst range set but n_dst_p=%d\n",
- err_prefix, IP_FW_GETNDSTP(frwl)));
- return (NULL);
- }
- if (IP_FW_GETNSRCP(frwl) + IP_FW_GETNDSTP(frwl) > IP_FW_MAX_PORTS) {
- dprintf(("%s too many ports (%d+%d)\n",
- err_prefix, IP_FW_GETNSRCP(frwl), IP_FW_GETNDSTP(frwl)));
- return (NULL);
- }
- /*
- * Protocols other than TCP/UDP don't use port range
- */
- if ((frwl->fw_prot != IPPROTO_TCP) &&
- (frwl->fw_prot != IPPROTO_UDP) &&
- (IP_FW_GETNSRCP(frwl) || IP_FW_GETNDSTP(frwl))) {
- dprintf(("%s port(s) specified for non TCP/UDP rule\n",
- err_prefix));
- return(NULL);
- }
-
- /*
- * Rather than modify the entry to make such entries work,
- * we reject this rule and require user level utilities
- * to enforce whatever policy they deem appropriate.
- */
- if ((frwl->fw_src.s_addr & (~frwl->fw_smsk.s_addr)) ||
- (frwl->fw_dst.s_addr & (~frwl->fw_dmsk.s_addr))) {
- dprintf(("%s rule never matches\n", err_prefix));
- return(NULL);
- }
-
- if ((frwl->fw_flg & IP_FW_F_FRAG) &&
- (frwl->fw_prot == IPPROTO_UDP || frwl->fw_prot == IPPROTO_TCP)) {
- if (frwl->fw_nports) {
- dprintf(("%s cannot mix 'frag' and ports\n", err_prefix));
- return(NULL);
- }
- if (frwl->fw_prot == IPPROTO_TCP &&
- frwl->fw_tcpf != frwl->fw_tcpnf) {
- dprintf(("%s cannot mix 'frag' with TCP flags\n", err_prefix));
- return(NULL);
- }
- }
-
- /* Check command specific stuff */
- switch (frwl->fw_flg & IP_FW_F_COMMAND)
- {
- case IP_FW_F_REJECT:
- if (frwl->fw_reject_code >= 0x100
- && !(frwl->fw_prot == IPPROTO_TCP
- && frwl->fw_reject_code == IP_FW_REJECT_RST)) {
- dprintf(("%s unknown reject code\n", err_prefix));
- return(NULL);
- }
- break;
- case IP_FW_F_DIVERT: /* Diverting to port zero is invalid */
- case IP_FW_F_TEE:
- if (frwl->fw_divert_port == 0) {
- dprintf(("%s can't divert to port 0\n", err_prefix));
- return (NULL);
- }
- break;
- case IP_FW_F_DENY:
- case IP_FW_F_ACCEPT:
- case IP_FW_F_COUNT:
- case IP_FW_F_SKIPTO:
- break;
- default:
- dprintf(("%s invalid command\n", err_prefix));
- return(NULL);
- }
-
- return frwl;
-}
-
-static int
-ip_fw_ctl(int stage, struct mbuf **mm)
-{
- int error;
- struct mbuf *m;
-
- if (stage == IP_FW_GET) {
- struct ip_fw_chain *fcp = ip_fw_chain.lh_first;
- *mm = m = m_get(M_WAIT, MT_SOOPTS);
- for (; fcp; fcp = fcp->chain.le_next) {
- memcpy(m->m_data, fcp->rule, sizeof *(fcp->rule));
- m->m_len = sizeof *(fcp->rule);
- m->m_next = m_get(M_WAIT, MT_SOOPTS);
- m = m->m_next;
- m->m_len = 0;
- }
- return (0);
- }
- m = *mm;
- /* only allow get calls if secure mode > 2 */
- if (securelevel > 2) {
- if (m) (void)m_free(m);
- return(EPERM);
- }
- if (stage == IP_FW_FLUSH) {
- while (ip_fw_chain.lh_first != NULL &&
- ip_fw_chain.lh_first->rule->fw_number != (u_short)-1) {
- struct ip_fw_chain *fcp = ip_fw_chain.lh_first;
- int s = splnet();
- LIST_REMOVE(ip_fw_chain.lh_first, chain);
- splx(s);
- free(fcp->rule, M_IPFW);
- free(fcp, M_IPFW);
- }
- if (m) (void)m_free(m);
- return (0);
- }
- if (stage == IP_FW_ZERO) {
- error = zero_entry(m);
- if (m) (void)m_free(m);
- return (error);
- }
- if (m == NULL) {
- printf("%s NULL mbuf ptr\n", err_prefix);
- return (EINVAL);
- }
-
- if (stage == IP_FW_ADD) {
- struct ip_fw *frwl = check_ipfw_mbuf(m);
-
- if (!frwl)
- error = EINVAL;
- else
- error = add_entry(&ip_fw_chain, frwl);
- if (m) (void)m_free(m);
- return error;
- }
- if (stage == IP_FW_DEL) {
- if (m->m_len != sizeof(struct ip_fw)) {
- dprintf(("%s len=%d, want %d\n", err_prefix, m->m_len,
- (int)sizeof(struct ip_fw)));
- error = EINVAL;
- } else if (mtod(m, struct ip_fw *)->fw_number == (u_short)-1) {
- dprintf(("%s can't delete rule 65535\n", err_prefix));
- error = EINVAL;
- } else
- error = del_entry(&ip_fw_chain,
- mtod(m, struct ip_fw *)->fw_number);
- if (m) (void)m_free(m);
- return error;
- }
-
- dprintf(("%s unknown request %d\n", err_prefix, stage));
- if (m) (void)m_free(m);
- return (EINVAL);
-}
-
-void
-ip_fw_init(void)
-{
- struct ip_fw default_rule;
-
- ip_fw_chk_ptr = ip_fw_chk;
- ip_fw_ctl_ptr = ip_fw_ctl;
- LIST_INIT(&ip_fw_chain);
-
- bzero(&default_rule, sizeof default_rule);
- default_rule.fw_prot = IPPROTO_IP;
- default_rule.fw_number = (u_short)-1;
-#ifdef IPFIREWALL_DEFAULT_TO_ACCEPT
- default_rule.fw_flg |= IP_FW_F_ACCEPT;
-#else
- default_rule.fw_flg |= IP_FW_F_DENY;
-#endif
- default_rule.fw_flg |= IP_FW_F_IN | IP_FW_F_OUT;
- if (check_ipfw_struct(&default_rule) == NULL ||
- add_entry(&ip_fw_chain, &default_rule))
- panic(__FUNCTION__);
-
- printf("IP packet filtering initialized, "
-#ifdef IPDIVERT
- "divert enabled, ");
-#else
- "divert disabled, ");
-#endif
-#ifdef IPFIREWALL_DEFAULT_TO_ACCEPT
- printf("default to accept, ");
-#endif
-#ifndef IPFIREWALL_VERBOSE
- printf("logging disabled\n");
-#else
- if (fw_verbose_limit == 0)
- printf("unlimited logging\n");
- else
- printf("logging limited to %d packets/entry\n",
- fw_verbose_limit);
-#endif
-}
-
-#ifdef IPFIREWALL_MODULE
-
-#include <sys/exec.h>
-#include <sys/sysent.h>
-#include <sys/lkm.h>
-
-MOD_MISC(ipfw);
-
-static int
-ipfw_load(struct lkm_table *lkmtp, int cmd)
-{
- int s=splnet();
-
- old_chk_ptr = ip_fw_chk_ptr;
- old_ctl_ptr = ip_fw_ctl_ptr;
-
- ip_fw_init();
- splx(s);
- return 0;
-}
-
-static int
-ipfw_unload(struct lkm_table *lkmtp, int cmd)
-{
- int s=splnet();
-
- ip_fw_chk_ptr = old_chk_ptr;
- ip_fw_ctl_ptr = old_ctl_ptr;
-
- while (ip_fw_chain.lh_first != NULL) {
- struct ip_fw_chain *fcp = ip_fw_chain.lh_first;
- LIST_REMOVE(ip_fw_chain.lh_first, chain);
- free(fcp->rule, M_IPFW);
- free(fcp, M_IPFW);
- }
-
- splx(s);
- printf("IP firewall unloaded\n");
- return 0;
-}
-
-int
-ipfw_mod(struct lkm_table *lkmtp, int cmd, int ver)
-{
- DISPATCH(lkmtp, cmd, ver, ipfw_load, ipfw_unload, lkm_nullcmd);
-}
-#endif
diff --git a/c/src/exec/libnetworking/netinet/ip_fw.h b/c/src/exec/libnetworking/netinet/ip_fw.h
deleted file mode 100644
index cab7f4ac93..0000000000
--- a/c/src/exec/libnetworking/netinet/ip_fw.h
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * Copyright (c) 1993 Daniel Boulet
- * Copyright (c) 1994 Ugen J.S.Antsilevich
- *
- * Redistribution and use in source forms, with and without modification,
- * are permitted provided that this entire comment appears intact.
- *
- * Redistribution in binary form may occur without any restrictions.
- * Obviously, it would be nice if you gave credit where credit is due
- * but requiring it would be too onerous.
- *
- * This software is provided ``AS IS'' without any warranties of any kind.
- *
- * $Id$
- */
-
-#ifndef _IP_FW_H
-#define _IP_FW_H
-
-#include <net/if.h>
-
-/*
- * This union structure identifies an interface, either explicitly
- * by name or implicitly by IP address. The flags IP_FW_F_IIFNAME
- * and IP_FW_F_OIFNAME say how to interpret this structure. An
- * interface unit number of -1 matches any unit number, while an
- * IP address of 0.0.0.0 indicates matches any interface.
- *
- * The receive and transmit interfaces are only compared against the
- * the packet if the corresponding bit (IP_FW_F_IIFACE or IP_FW_F_OIFACE)
- * is set. Note some packets lack a receive or transmit interface
- * (in which case the missing "interface" never matches).
- */
-
-union ip_fw_if {
- struct in_addr fu_via_ip; /* Specified by IP address */
- struct { /* Specified by interface name */
-#define FW_IFNLEN IFNAMSIZ
- char name[FW_IFNLEN];
- short unit; /* -1 means match any unit */
- } fu_via_if;
-};
-
-/*
- * Format of an IP firewall descriptor
- *
- * fw_src, fw_dst, fw_smsk, fw_dmsk are always stored in network byte order.
- * fw_flg and fw_n*p are stored in host byte order (of course).
- * Port numbers are stored in HOST byte order.
- * Warning: setsockopt() will fail if sizeof(struct ip_fw) > MLEN (108)
- */
-
-struct ip_fw {
- u_long fw_pcnt,fw_bcnt; /* Packet and byte counters */
- struct in_addr fw_src, fw_dst; /* Source and destination IP addr */
- struct in_addr fw_smsk, fw_dmsk; /* Mask for src and dest IP addr */
- u_short fw_number; /* Rule number */
- u_short fw_flg; /* Flags word */
-#define IP_FW_MAX_PORTS 10 /* A reasonable maximum */
- u_short fw_pts[IP_FW_MAX_PORTS]; /* Array of port numbers to match */
- u_char fw_ipopt,fw_ipnopt; /* IP options set/unset */
- u_char fw_tcpf,fw_tcpnf; /* TCP flags set/unset */
-#define IP_FW_ICMPTYPES_DIM (32 / (sizeof(unsigned) * 8))
- unsigned fw_icmptypes[IP_FW_ICMPTYPES_DIM]; /* ICMP types bitmap */
- long timestamp; /* timestamp (tv_sec) of last match */
- union ip_fw_if fw_in_if, fw_out_if; /* Incoming and outgoing interfaces */
- union {
- u_short fu_divert_port; /* Divert/tee port (options IPDIVERT) */
- u_short fu_skipto_rule; /* SKIPTO command rule number */
- u_short fu_reject_code; /* REJECT response code */
- } fw_un;
- u_char fw_prot; /* IP protocol */
- u_char fw_nports; /* N'of src ports and # of dst ports */
- /* in ports array (dst ports follow */
- /* src ports; max of 10 ports in all; */
- /* count of 0 means match all ports) */
-};
-
-#define IP_FW_GETNSRCP(rule) ((rule)->fw_nports & 0x0f)
-#define IP_FW_SETNSRCP(rule, n) do { \
- (rule)->fw_nports &= ~0x0f; \
- (rule)->fw_nports |= (n); \
- } while (0)
-#define IP_FW_GETNDSTP(rule) ((rule)->fw_nports >> 4)
-#define IP_FW_SETNDSTP(rule, n) do { \
- (rule)->fw_nports &= ~0xf0; \
- (rule)->fw_nports |= (n) << 4;\
- } while (0)
-
-#define fw_divert_port fw_un.fu_divert_port
-#define fw_skipto_rule fw_un.fu_skipto_rule
-#define fw_reject_code fw_un.fu_reject_code
-
-struct ip_fw_chain {
- LIST_ENTRY(ip_fw_chain) chain;
- struct ip_fw *rule;
-};
-
-/*
- * Values for "flags" field .
- */
-#define IP_FW_F_IN 0x0001 /* Check inbound packets */
-#define IP_FW_F_OUT 0x0002 /* Check outbound packets */
-#define IP_FW_F_IIFACE 0x0004 /* Apply inbound interface test */
-#define IP_FW_F_OIFACE 0x0008 /* Apply outbound interface test */
-
-#define IP_FW_F_COMMAND 0x0070 /* Mask for type of chain entry: */
-#define IP_FW_F_DENY 0x0000 /* This is a deny rule */
-#define IP_FW_F_REJECT 0x0010 /* Deny and send a response packet */
-#define IP_FW_F_ACCEPT 0x0020 /* This is an accept rule */
-#define IP_FW_F_COUNT 0x0030 /* This is a count rule */
-#define IP_FW_F_DIVERT 0x0040 /* This is a divert rule */
-#define IP_FW_F_TEE 0x0050 /* This is a tee rule */
-#define IP_FW_F_SKIPTO 0x0060 /* This is a skipto rule */
-
-#define IP_FW_F_PRN 0x0080 /* Print if this rule matches */
-
-#define IP_FW_F_SRNG 0x0100 /* The first two src ports are a min *
- * and max range (stored in host byte *
- * order). */
-
-#define IP_FW_F_DRNG 0x0200 /* The first two dst ports are a min *
- * and max range (stored in host byte *
- * order). */
-
-#define IP_FW_F_IIFNAME 0x0400 /* In interface by name/unit (not IP) */
-#define IP_FW_F_OIFNAME 0x0800 /* Out interface by name/unit (not IP) */
-
-#define IP_FW_F_INVSRC 0x1000 /* Invert sense of src check */
-#define IP_FW_F_INVDST 0x2000 /* Invert sense of dst check */
-
-#define IP_FW_F_FRAG 0x4000 /* Fragment */
-
-#define IP_FW_F_ICMPBIT 0x8000 /* ICMP type bitmap is valid */
-
-#define IP_FW_F_MASK 0xFFFF /* All possible flag bits mask */
-
-/*
- * For backwards compatibility with rules specifying "via iface" but
- * not restricted to only "in" or "out" packets, we define this combination
- * of bits to represent this configuration.
- */
-
-#define IF_FW_F_VIAHACK (IP_FW_F_IN|IP_FW_F_OUT|IP_FW_F_IIFACE|IP_FW_F_OIFACE)
-
-/*
- * Definitions for REJECT response codes.
- * Values less than 256 correspond to ICMP unreachable codes.
- */
-#define IP_FW_REJECT_RST 0x0100 /* TCP packets: send RST */
-
-/*
- * Definitions for IP option names.
- */
-#define IP_FW_IPOPT_LSRR 0x01
-#define IP_FW_IPOPT_SSRR 0x02
-#define IP_FW_IPOPT_RR 0x04
-#define IP_FW_IPOPT_TS 0x08
-
-/*
- * Definitions for TCP flags.
- */
-#define IP_FW_TCPF_FIN TH_FIN
-#define IP_FW_TCPF_SYN TH_SYN
-#define IP_FW_TCPF_RST TH_RST
-#define IP_FW_TCPF_PSH TH_PUSH
-#define IP_FW_TCPF_ACK TH_ACK
-#define IP_FW_TCPF_URG TH_URG
-#define IP_FW_TCPF_ESTAB 0x40
-
-/*
- * Main firewall chains definitions and global var's definitions.
- */
-#ifdef KERNEL
-
-/*
- * Function definitions.
- */
-void ip_fw_init(void);
-
-#endif /* KERNEL */
-
-#endif /* _IP_FW_H */
diff --git a/c/src/exec/libnetworking/netinet/ip_icmp.c b/c/src/exec/libnetworking/netinet/ip_icmp.c
deleted file mode 100644
index 44088ab713..0000000000
--- a/c/src/exec/libnetworking/netinet/ip_icmp.c
+++ /dev/null
@@ -1,711 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ip_icmp.c 8.2 (Berkeley) 1/4/94
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/malloc.h>
-#include <sys/mbuf.h>
-#include <sys/protosw.h>
-#include <sys/socket.h>
-#include <sys/time.h>
-#include <sys/kernel.h>
-#include <sys/socket.h>
-#include <sys/sysctl.h>
-
-#include <net/if.h>
-#include <net/route.h>
-
-#define _IP_VHL
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/in_var.h>
-#include <netinet/ip.h>
-#include <netinet/ip_icmp.h>
-#include <netinet/ip_var.h>
-#include <netinet/icmp_var.h>
-
-/*
- * ICMP routines: error generation, receive packet processing, and
- * routines to turnaround packets back to the originator, and
- * host table maintenance routines.
- */
-
- struct icmpstat icmpstat;
-SYSCTL_STRUCT(_net_inet_icmp, ICMPCTL_STATS, stats, CTLFLAG_RD,
- &icmpstat, icmpstat, "");
-
-static int icmpmaskrepl = 0;
-SYSCTL_INT(_net_inet_icmp, ICMPCTL_MASKREPL, maskrepl, CTLFLAG_RW,
- &icmpmaskrepl, 0, "");
-
-static int icmpbmcastecho = 1;
-SYSCTL_INT(_net_inet_icmp, OID_AUTO, bmcastecho, CTLFLAG_RW, &icmpbmcastecho,
- 0, "");
-
-/* #define ICMPPRINTFS 1 */
-#ifdef ICMPPRINTFS
-int icmpprintfs = 0;
-#endif
-
-static void icmp_reflect __P((struct mbuf *));
-static void icmp_send __P((struct mbuf *, struct mbuf *));
-static int ip_next_mtu __P((int, int));
-
-extern struct protosw inetsw[];
-
-/*
- * Generate an error packet of type error
- * in response to bad packet ip.
- */
-void
-icmp_error(n, type, code, dest, destifp)
- struct mbuf *n;
- int type, code;
- n_long dest;
- struct ifnet *destifp;
-{
- register struct ip *oip = mtod(n, struct ip *), *nip;
- register unsigned oiplen = IP_VHL_HL(oip->ip_vhl) << 2;
- register struct icmp *icp;
- register struct mbuf *m;
- unsigned icmplen;
-
-#ifdef ICMPPRINTFS
- if (icmpprintfs)
- printf("icmp_error(%p, %x, %d)\n", oip, type, code);
-#endif
- if (type != ICMP_REDIRECT)
- icmpstat.icps_error++;
- /*
- * Don't send error if not the first fragment of message.
- * Don't error if the old packet protocol was ICMP
- * error message, only known informational types.
- */
- if (oip->ip_off &~ (IP_MF|IP_DF))
- goto freeit;
- if (oip->ip_p == IPPROTO_ICMP && type != ICMP_REDIRECT &&
- n->m_len >= oiplen + ICMP_MINLEN &&
- !ICMP_INFOTYPE(((struct icmp *)((caddr_t)oip + oiplen))->icmp_type)) {
- icmpstat.icps_oldicmp++;
- goto freeit;
- }
- /* Don't send error in response to a multicast or broadcast packet */
- if (n->m_flags & (M_BCAST|M_MCAST))
- goto freeit;
- /*
- * First, formulate icmp message
- */
- m = m_gethdr(M_DONTWAIT, MT_HEADER);
- if (m == NULL)
- goto freeit;
- icmplen = oiplen + min(8, oip->ip_len);
- m->m_len = icmplen + ICMP_MINLEN;
- MH_ALIGN(m, m->m_len);
- icp = mtod(m, struct icmp *);
- if ((u_int)type > ICMP_MAXTYPE)
- panic("icmp_error");
- icmpstat.icps_outhist[type]++;
- icp->icmp_type = type;
- if (type == ICMP_REDIRECT)
- icp->icmp_gwaddr.s_addr = dest;
- else {
- icp->icmp_void = 0;
- /*
- * The following assignments assume an overlay with the
- * zeroed icmp_void field.
- */
- if (type == ICMP_PARAMPROB) {
- icp->icmp_pptr = code;
- code = 0;
- } else if (type == ICMP_UNREACH &&
- code == ICMP_UNREACH_NEEDFRAG && destifp) {
- icp->icmp_nextmtu = htons(destifp->if_mtu);
- }
- }
-
- icp->icmp_code = code;
- bcopy((caddr_t)oip, (caddr_t)&icp->icmp_ip, icmplen);
- nip = &icp->icmp_ip;
- nip->ip_len = htons((u_short)(nip->ip_len + oiplen));
-
- /*
- * Now, copy old ip header (without options)
- * in front of icmp message.
- */
- if (m->m_data - sizeof(struct ip) < m->m_pktdat)
- panic("icmp len");
- m->m_data -= sizeof(struct ip);
- m->m_len += sizeof(struct ip);
- m->m_pkthdr.len = m->m_len;
- m->m_pkthdr.rcvif = n->m_pkthdr.rcvif;
- nip = mtod(m, struct ip *);
- bcopy((caddr_t)oip, (caddr_t)nip, sizeof(struct ip));
- nip->ip_len = m->m_len;
- nip->ip_vhl = IP_VHL_BORING;
- nip->ip_p = IPPROTO_ICMP;
- nip->ip_tos = 0;
- icmp_reflect(m);
-
-freeit:
- m_freem(n);
-}
-
-static struct sockaddr_in icmpsrc = { sizeof (struct sockaddr_in), AF_INET };
-static struct sockaddr_in icmpdst = { sizeof (struct sockaddr_in), AF_INET };
-static struct sockaddr_in icmpgw = { sizeof (struct sockaddr_in), AF_INET };
-
-/*
- * Process a received ICMP message.
- */
-void
-icmp_input(m, hlen)
- register struct mbuf *m;
- int hlen;
-{
- register struct icmp *icp;
- register struct ip *ip = mtod(m, struct ip *);
- int icmplen = ip->ip_len;
- register int i;
- struct in_ifaddr *ia;
- void (*ctlfunc) __P((int, struct sockaddr *, void *));
- int code;
-
- /*
- * Locate icmp structure in mbuf, and check
- * that not corrupted and of at least minimum length.
- */
-#ifdef ICMPPRINTFS
- if (icmpprintfs) {
- char buf[4 * sizeof "123"];
- strcpy(buf, inet_ntoa(ip->ip_src));
- printf("icmp_input from %s to %s, len %d\n",
- buf, inet_ntoa(ip->ip_dst), icmplen);
- }
-#endif
- if (icmplen < ICMP_MINLEN) {
- icmpstat.icps_tooshort++;
- goto freeit;
- }
- i = hlen + min(icmplen, ICMP_ADVLENMIN);
- if (m->m_len < i && (m = m_pullup(m, i)) == 0) {
- icmpstat.icps_tooshort++;
- return;
- }
- ip = mtod(m, struct ip *);
- m->m_len -= hlen;
- m->m_data += hlen;
- icp = mtod(m, struct icmp *);
- if (in_cksum(m, icmplen)) {
- icmpstat.icps_checksum++;
- goto freeit;
- }
- m->m_len += hlen;
- m->m_data -= hlen;
-
-#ifdef ICMPPRINTFS
- if (icmpprintfs)
- printf("icmp_input, type %d code %d\n", icp->icmp_type,
- icp->icmp_code);
-#endif
-
- /*
- * Message type specific processing.
- */
- if (icp->icmp_type > ICMP_MAXTYPE)
- goto raw;
- icmpstat.icps_inhist[icp->icmp_type]++;
- code = icp->icmp_code;
- switch (icp->icmp_type) {
-
- case ICMP_UNREACH:
- switch (code) {
- case ICMP_UNREACH_NET:
- case ICMP_UNREACH_HOST:
- case ICMP_UNREACH_PROTOCOL:
- case ICMP_UNREACH_PORT:
- case ICMP_UNREACH_SRCFAIL:
- code += PRC_UNREACH_NET;
- break;
-
- case ICMP_UNREACH_NEEDFRAG:
- code = PRC_MSGSIZE;
- break;
-
- case ICMP_UNREACH_NET_UNKNOWN:
- case ICMP_UNREACH_NET_PROHIB:
- case ICMP_UNREACH_TOSNET:
- code = PRC_UNREACH_NET;
- break;
-
- case ICMP_UNREACH_HOST_UNKNOWN:
- case ICMP_UNREACH_ISOLATED:
- case ICMP_UNREACH_HOST_PROHIB:
- case ICMP_UNREACH_TOSHOST:
- code = PRC_UNREACH_HOST;
- break;
-
- case ICMP_UNREACH_FILTER_PROHIB:
- case ICMP_UNREACH_HOST_PRECEDENCE:
- case ICMP_UNREACH_PRECEDENCE_CUTOFF:
- code = PRC_UNREACH_PORT;
- break;
-
- default:
- goto badcode;
- }
- goto deliver;
-
- case ICMP_TIMXCEED:
- if (code > 1)
- goto badcode;
- code += PRC_TIMXCEED_INTRANS;
- goto deliver;
-
- case ICMP_PARAMPROB:
- if (code > 1)
- goto badcode;
- code = PRC_PARAMPROB;
- goto deliver;
-
- case ICMP_SOURCEQUENCH:
- if (code)
- goto badcode;
- code = PRC_QUENCH;
- deliver:
- /*
- * Problem with datagram; advise higher level routines.
- */
- if (icmplen < ICMP_ADVLENMIN || icmplen < ICMP_ADVLEN(icp) ||
- IP_VHL_HL(icp->icmp_ip.ip_vhl) < (sizeof(struct ip) >> 2)) {
- icmpstat.icps_badlen++;
- goto freeit;
- }
- NTOHS(icp->icmp_ip.ip_len);
- /* Discard ICMP's in response to multicast packets */
- if (IN_MULTICAST(ntohl(icp->icmp_ip.ip_dst.s_addr)))
- goto badcode;
-#ifdef ICMPPRINTFS
- if (icmpprintfs)
- printf("deliver to protocol %d\n", icp->icmp_ip.ip_p);
-#endif
- icmpsrc.sin_addr = icp->icmp_ip.ip_dst;
-#if 1
- /*
- * MTU discovery:
- * If we got a needfrag and there is a host route to the
- * original destination, and the MTU is not locked, then
- * set the MTU in the route to the suggested new value
- * (if given) and then notify as usual. The ULPs will
- * notice that the MTU has changed and adapt accordingly.
- * If no new MTU was suggested, then we guess a new one
- * less than the current value. If the new MTU is
- * unreasonably small (arbitrarily set at 296), then
- * we reset the MTU to the interface value and enable the
- * lock bit, indicating that we are no longer doing MTU
- * discovery.
- */
- if (code == PRC_MSGSIZE) {
- struct rtentry *rt;
- int mtu;
-
- rt = rtalloc1((struct sockaddr *)&icmpsrc, 0,
- RTF_CLONING | RTF_PRCLONING);
- if (rt && (rt->rt_flags & RTF_HOST)
- && !(rt->rt_rmx.rmx_locks & RTV_MTU)) {
- mtu = ntohs(icp->icmp_nextmtu);
- if (!mtu)
- mtu = ip_next_mtu(rt->rt_rmx.rmx_mtu,
- 1);
-#ifdef DEBUG_MTUDISC
- printf("MTU for %s reduced to %d\n",
- inet_ntoa(icmpsrc.sin_addr), mtu);
-#endif
- if (mtu < 296) {
- /* rt->rt_rmx.rmx_mtu =
- rt->rt_ifp->if_mtu; */
- rt->rt_rmx.rmx_locks |= RTV_MTU;
- } else if (rt->rt_rmx.rmx_mtu > mtu) {
- rt->rt_rmx.rmx_mtu = mtu;
- }
- }
- if (rt)
- RTFREE(rt);
- }
-
-#endif
- ctlfunc = inetsw[ip_protox[icp->icmp_ip.ip_p]].pr_ctlinput;
- if (ctlfunc)
- (*ctlfunc)(code, (struct sockaddr *)&icmpsrc,
- (void *)&icp->icmp_ip);
- break;
-
- badcode:
- icmpstat.icps_badcode++;
- break;
-
- case ICMP_ECHO:
- if (!icmpbmcastecho
- && (m->m_flags & (M_MCAST | M_BCAST)) != 0
- && IN_MULTICAST(ntohl(ip->ip_dst.s_addr))) {
- icmpstat.icps_bmcastecho++;
- break;
- }
- icp->icmp_type = ICMP_ECHOREPLY;
- goto reflect;
-
- case ICMP_TSTAMP:
- if (!icmpbmcastecho
- && (m->m_flags & (M_MCAST | M_BCAST)) != 0
- && IN_MULTICAST(ntohl(ip->ip_dst.s_addr))) {
- icmpstat.icps_bmcasttstamp++;
- break;
- }
- if (icmplen < ICMP_TSLEN) {
- icmpstat.icps_badlen++;
- break;
- }
- icp->icmp_type = ICMP_TSTAMPREPLY;
- icp->icmp_rtime = iptime();
- icp->icmp_ttime = icp->icmp_rtime; /* bogus, do later! */
- goto reflect;
-
- case ICMP_MASKREQ:
-#define satosin(sa) ((struct sockaddr_in *)(sa))
- if (icmpmaskrepl == 0)
- break;
- /*
- * We are not able to respond with all ones broadcast
- * unless we receive it over a point-to-point interface.
- */
- if (icmplen < ICMP_MASKLEN)
- break;
- switch (ip->ip_dst.s_addr) {
-
- case INADDR_BROADCAST:
- case INADDR_ANY:
- icmpdst.sin_addr = ip->ip_src;
- break;
-
- default:
- icmpdst.sin_addr = ip->ip_dst;
- }
- ia = (struct in_ifaddr *)ifaof_ifpforaddr(
- (struct sockaddr *)&icmpdst, m->m_pkthdr.rcvif);
- if (ia == 0)
- break;
- if (ia->ia_ifp == 0)
- break;
- icp->icmp_type = ICMP_MASKREPLY;
- icp->icmp_mask = ia->ia_sockmask.sin_addr.s_addr;
- if (ip->ip_src.s_addr == 0) {
- if (ia->ia_ifp->if_flags & IFF_BROADCAST)
- ip->ip_src = satosin(&ia->ia_broadaddr)->sin_addr;
- else if (ia->ia_ifp->if_flags & IFF_POINTOPOINT)
- ip->ip_src = satosin(&ia->ia_dstaddr)->sin_addr;
- }
-reflect:
- ip->ip_len += hlen; /* since ip_input deducts this */
- icmpstat.icps_reflect++;
- icmpstat.icps_outhist[icp->icmp_type]++;
- icmp_reflect(m);
- return;
-
- case ICMP_REDIRECT:
- if (code > 3)
- goto badcode;
- if (icmplen < ICMP_ADVLENMIN || icmplen < ICMP_ADVLEN(icp) ||
- IP_VHL_HL(icp->icmp_ip.ip_vhl) < (sizeof(struct ip) >> 2)) {
- icmpstat.icps_badlen++;
- break;
- }
- /*
- * Short circuit routing redirects to force
- * immediate change in the kernel's routing
- * tables. The message is also handed to anyone
- * listening on a raw socket (e.g. the routing
- * daemon for use in updating its tables).
- */
- icmpgw.sin_addr = ip->ip_src;
- icmpdst.sin_addr = icp->icmp_gwaddr;
-#ifdef ICMPPRINTFS
- if (icmpprintfs) {
- char buf[4 * sizeof "123"];
- strcpy(buf, inet_ntoa(icp->icmp_ip.ip_dst));
-
- printf("redirect dst %s to %s\n",
- buf, inet_ntoa(icp->icmp_gwaddr));
- }
-#endif
- icmpsrc.sin_addr = icp->icmp_ip.ip_dst;
- rtredirect((struct sockaddr *)&icmpsrc,
- (struct sockaddr *)&icmpdst,
- (struct sockaddr *)0, RTF_GATEWAY | RTF_HOST,
- (struct sockaddr *)&icmpgw, (struct rtentry **)0);
- pfctlinput(PRC_REDIRECT_HOST, (struct sockaddr *)&icmpsrc);
- break;
-
- /*
- * No kernel processing for the following;
- * just fall through to send to raw listener.
- */
- case ICMP_ECHOREPLY:
- case ICMP_ROUTERADVERT:
- case ICMP_ROUTERSOLICIT:
- case ICMP_TSTAMPREPLY:
- case ICMP_IREQREPLY:
- case ICMP_MASKREPLY:
- default:
- break;
- }
-
-raw:
- rip_input(m, hlen);
- return;
-
-freeit:
- m_freem(m);
-}
-
-/*
- * Reflect the ip packet back to the source
- */
-static void
-icmp_reflect(m)
- struct mbuf *m;
-{
- register struct ip *ip = mtod(m, struct ip *);
- register struct in_ifaddr *ia;
- struct in_addr t;
- struct mbuf *opts = 0;
- int optlen = (IP_VHL_HL(ip->ip_vhl) << 2) - sizeof(struct ip);
-
- if (!in_canforward(ip->ip_src) &&
- ((ntohl(ip->ip_src.s_addr) & IN_CLASSA_NET) !=
- (IN_LOOPBACKNET << IN_CLASSA_NSHIFT))) {
- m_freem(m); /* Bad return address */
- goto done; /* Ip_output() will check for broadcast */
- }
- t = ip->ip_dst;
- ip->ip_dst = ip->ip_src;
- /*
- * If the incoming packet was addressed directly to us,
- * use dst as the src for the reply. Otherwise (broadcast
- * or anonymous), use the address which corresponds
- * to the incoming interface.
- */
- for (ia = in_ifaddr; ia; ia = ia->ia_next) {
- if (t.s_addr == IA_SIN(ia)->sin_addr.s_addr)
- break;
- if (ia->ia_ifp && (ia->ia_ifp->if_flags & IFF_BROADCAST) &&
- t.s_addr == satosin(&ia->ia_broadaddr)->sin_addr.s_addr)
- break;
- }
- icmpdst.sin_addr = t;
- if ((ia == (struct in_ifaddr *)0) && m->m_pkthdr.rcvif)
- ia = (struct in_ifaddr *)ifaof_ifpforaddr(
- (struct sockaddr *)&icmpdst, m->m_pkthdr.rcvif);
- /*
- * The following happens if the packet was not addressed to us,
- * and was received on an interface with no IP address.
- */
- if (ia == (struct in_ifaddr *)0)
- ia = in_ifaddr;
- t = IA_SIN(ia)->sin_addr;
- ip->ip_src = t;
- ip->ip_ttl = MAXTTL;
-
- if (optlen > 0) {
- register u_char *cp;
- int opt, cnt;
- u_int len;
-
- /*
- * Retrieve any source routing from the incoming packet;
- * add on any record-route or timestamp options.
- */
- cp = (u_char *) (ip + 1);
- if ((opts = ip_srcroute()) == 0 &&
- (opts = m_gethdr(M_DONTWAIT, MT_HEADER))) {
- opts->m_len = sizeof(struct in_addr);
- mtod(opts, struct in_addr *)->s_addr = 0;
- }
- if (opts) {
-#ifdef ICMPPRINTFS
- if (icmpprintfs)
- printf("icmp_reflect optlen %d rt %d => ",
- optlen, opts->m_len);
-#endif
- for (cnt = optlen; cnt > 0; cnt -= len, cp += len) {
- opt = cp[IPOPT_OPTVAL];
- if (opt == IPOPT_EOL)
- break;
- if (opt == IPOPT_NOP)
- len = 1;
- else {
- len = cp[IPOPT_OLEN];
- if (len <= 0 || len > cnt)
- break;
- }
- /*
- * Should check for overflow, but it "can't happen"
- */
- if (opt == IPOPT_RR || opt == IPOPT_TS ||
- opt == IPOPT_SECURITY) {
- bcopy((caddr_t)cp,
- mtod(opts, caddr_t) + opts->m_len, len);
- opts->m_len += len;
- }
- }
- /* Terminate & pad, if necessary */
- cnt = opts->m_len % 4;
- if (cnt) {
- for (; cnt < 4; cnt++) {
- *(mtod(opts, caddr_t) + opts->m_len) =
- IPOPT_EOL;
- opts->m_len++;
- }
- }
-#ifdef ICMPPRINTFS
- if (icmpprintfs)
- printf("%d\n", opts->m_len);
-#endif
- }
- /*
- * Now strip out original options by copying rest of first
- * mbuf's data back, and adjust the IP length.
- */
- ip->ip_len -= optlen;
- ip->ip_vhl = IP_VHL_BORING;
- m->m_len -= optlen;
- if (m->m_flags & M_PKTHDR)
- m->m_pkthdr.len -= optlen;
- optlen += sizeof(struct ip);
- bcopy((caddr_t)ip + optlen, (caddr_t)(ip + 1),
- (unsigned)(m->m_len - sizeof(struct ip)));
- }
- m->m_flags &= ~(M_BCAST|M_MCAST);
- icmp_send(m, opts);
-done:
- if (opts)
- (void)m_free(opts);
-}
-
-/*
- * Send an icmp packet back to the ip level,
- * after supplying a checksum.
- */
-static void
-icmp_send(m, opts)
- register struct mbuf *m;
- struct mbuf *opts;
-{
- register struct ip *ip = mtod(m, struct ip *);
- register int hlen;
- register struct icmp *icp;
- struct route ro;
-
- hlen = IP_VHL_HL(ip->ip_vhl) << 2;
- m->m_data += hlen;
- m->m_len -= hlen;
- icp = mtod(m, struct icmp *);
- icp->icmp_cksum = 0;
- icp->icmp_cksum = in_cksum(m, ip->ip_len - hlen);
- m->m_data -= hlen;
- m->m_len += hlen;
-#ifdef ICMPPRINTFS
- if (icmpprintfs) {
- char buf[4 * sizeof "123"];
- strcpy(buf, inet_ntoa(ip->ip_dst));
- printf("icmp_send dst %s src %s\n",
- buf, inet_ntoa(ip->ip_src));
- }
-#endif
- bzero(&ro, sizeof ro);
- (void) ip_output(m, opts, &ro, 0, NULL);
- if (ro.ro_rt)
- RTFREE(ro.ro_rt);
-}
-
-n_time
-iptime()
-{
- struct timeval atv;
- u_long t;
-
- microtime(&atv);
- t = (atv.tv_sec % (24*60*60)) * 1000 + atv.tv_usec / 1000;
- return (htonl(t));
-}
-
-#if 1
-/*
- * Return the next larger or smaller MTU plateau (table from RFC 1191)
- * given current value MTU. If DIR is less than zero, a larger plateau
- * is returned; otherwise, a smaller value is returned.
- */
-static int
-ip_next_mtu(mtu, dir)
- int mtu;
- int dir;
-{
- static int mtutab[] = {
- 65535, 32000, 17914, 8166, 4352, 2002, 1492, 1006, 508, 296,
- 68, 0
- };
- int i;
-
- for (i = 0; i < (sizeof mtutab) / (sizeof mtutab[0]); i++) {
- if (mtu >= mtutab[i])
- break;
- }
-
- if (dir < 0) {
- if (i == 0) {
- return 0;
- } else {
- return mtutab[i - 1];
- }
- } else {
- if (mtutab[i] == 0) {
- return 0;
- } else if(mtu > mtutab[i]) {
- return mtutab[i];
- } else {
- return mtutab[i + 1];
- }
- }
-}
-#endif
diff --git a/c/src/exec/libnetworking/netinet/ip_icmp.h b/c/src/exec/libnetworking/netinet/ip_icmp.h
deleted file mode 100644
index 9d07a682de..0000000000
--- a/c/src/exec/libnetworking/netinet/ip_icmp.h
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ip_icmp.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _NETINET_IP_ICMP_H_
-#define _NETINET_IP_ICMP_H_
-
-/*
- * Interface Control Message Protocol Definitions.
- * Per RFC 792, September 1981.
- */
-
-/*
- * Internal of an ICMP Router Advertisement
- */
-struct icmp_ra_addr {
- u_int32_t ira_addr;
- u_int32_t ira_preference;
-};
-
-/*
- * Structure of an icmp header.
- */
-struct icmp {
- u_char icmp_type; /* type of message, see below */
- u_char icmp_code; /* type sub code */
- u_short icmp_cksum; /* ones complement cksum of struct */
- union {
- u_char ih_pptr; /* ICMP_PARAMPROB */
- struct in_addr ih_gwaddr; /* ICMP_REDIRECT */
- struct ih_idseq {
- n_short icd_id;
- n_short icd_seq;
- } ih_idseq;
- int ih_void;
-
- /* ICMP_UNREACH_NEEDFRAG -- Path MTU Discovery (RFC1191) */
- struct ih_pmtu {
- n_short ipm_void;
- n_short ipm_nextmtu;
- } ih_pmtu;
-
- struct ih_rtradv {
- u_char irt_num_addrs;
- u_char irt_wpa;
- u_int16_t irt_lifetime;
- } ih_rtradv;
- } icmp_hun;
-#define icmp_pptr icmp_hun.ih_pptr
-#define icmp_gwaddr icmp_hun.ih_gwaddr
-#define icmp_id icmp_hun.ih_idseq.icd_id
-#define icmp_seq icmp_hun.ih_idseq.icd_seq
-#define icmp_void icmp_hun.ih_void
-#define icmp_pmvoid icmp_hun.ih_pmtu.ipm_void
-#define icmp_nextmtu icmp_hun.ih_pmtu.ipm_nextmtu
-#define icmp_num_addrs icmp_hun.ih_rtradv.irt_num_addrs
-#define icmp_wpa icmp_hun.ih_rtradv.irt_wpa
-#define icmp_lifetime icmp_hun.ih_rtradv.irt_lifetime
- union {
- struct id_ts {
- n_time its_otime;
- n_time its_rtime;
- n_time its_ttime;
- } id_ts;
- struct id_ip {
- struct ip idi_ip;
- /* options and then 64 bits of data */
- } id_ip;
- struct icmp_ra_addr id_radv;
- u_long id_mask;
- char id_data[1];
- } icmp_dun;
-#define icmp_otime icmp_dun.id_ts.its_otime
-#define icmp_rtime icmp_dun.id_ts.its_rtime
-#define icmp_ttime icmp_dun.id_ts.its_ttime
-#define icmp_ip icmp_dun.id_ip.idi_ip
-#define icmp_radv icmp_dun.id_radv
-#define icmp_mask icmp_dun.id_mask
-#define icmp_data icmp_dun.id_data
-};
-
-/*
- * Lower bounds on packet lengths for various types.
- * For the error advice packets must first insure that the
- * packet is large enough to contain the returned ip header.
- * Only then can we do the check to see if 64 bits of packet
- * data have been returned, since we need to check the returned
- * ip header length.
- */
-#define ICMP_MINLEN 8 /* abs minimum */
-#define ICMP_TSLEN (8 + 3 * sizeof (n_time)) /* timestamp */
-#define ICMP_MASKLEN 12 /* address mask */
-#define ICMP_ADVLENMIN (8 + sizeof (struct ip) + 8) /* min */
-#ifndef _IP_VHL
-#define ICMP_ADVLEN(p) (8 + ((p)->icmp_ip.ip_hl << 2) + 8)
- /* N.B.: must separately check that ip_hl >= 5 */
-#else
-#define ICMP_ADVLEN(p) (8 + (IP_VHL_HL((p)->icmp_ip.ip_vhl) << 2) + 8)
- /* N.B.: must separately check that header length >= 5 */
-#endif
-
-/*
- * Definition of type and code field values.
- */
-#define ICMP_ECHOREPLY 0 /* echo reply */
-#define ICMP_UNREACH 3 /* dest unreachable, codes: */
-#define ICMP_UNREACH_NET 0 /* bad net */
-#define ICMP_UNREACH_HOST 1 /* bad host */
-#define ICMP_UNREACH_PROTOCOL 2 /* bad protocol */
-#define ICMP_UNREACH_PORT 3 /* bad port */
-#define ICMP_UNREACH_NEEDFRAG 4 /* IP_DF caused drop */
-#define ICMP_UNREACH_SRCFAIL 5 /* src route failed */
-#define ICMP_UNREACH_NET_UNKNOWN 6 /* unknown net */
-#define ICMP_UNREACH_HOST_UNKNOWN 7 /* unknown host */
-#define ICMP_UNREACH_ISOLATED 8 /* src host isolated */
-#define ICMP_UNREACH_NET_PROHIB 9 /* prohibited access */
-#define ICMP_UNREACH_HOST_PROHIB 10 /* ditto */
-#define ICMP_UNREACH_TOSNET 11 /* bad tos for net */
-#define ICMP_UNREACH_TOSHOST 12 /* bad tos for host */
-#define ICMP_UNREACH_FILTER_PROHIB 13 /* admin prohib */
-#define ICMP_UNREACH_HOST_PRECEDENCE 14 /* host prec vio. */
-#define ICMP_UNREACH_PRECEDENCE_CUTOFF 15 /* prec cutoff */
-#define ICMP_SOURCEQUENCH 4 /* packet lost, slow down */
-#define ICMP_REDIRECT 5 /* shorter route, codes: */
-#define ICMP_REDIRECT_NET 0 /* for network */
-#define ICMP_REDIRECT_HOST 1 /* for host */
-#define ICMP_REDIRECT_TOSNET 2 /* for tos and net */
-#define ICMP_REDIRECT_TOSHOST 3 /* for tos and host */
-#define ICMP_ECHO 8 /* echo service */
-#define ICMP_ROUTERADVERT 9 /* router advertisement */
-#define ICMP_ROUTERSOLICIT 10 /* router solicitation */
-#define ICMP_TIMXCEED 11 /* time exceeded, code: */
-#define ICMP_TIMXCEED_INTRANS 0 /* ttl==0 in transit */
-#define ICMP_TIMXCEED_REASS 1 /* ttl==0 in reass */
-#define ICMP_PARAMPROB 12 /* ip header bad */
-#define ICMP_PARAMPROB_OPTABSENT 1 /* req. opt. absent */
-#define ICMP_TSTAMP 13 /* timestamp request */
-#define ICMP_TSTAMPREPLY 14 /* timestamp reply */
-#define ICMP_IREQ 15 /* information request */
-#define ICMP_IREQREPLY 16 /* information reply */
-#define ICMP_MASKREQ 17 /* address mask request */
-#define ICMP_MASKREPLY 18 /* address mask reply */
-
-#define ICMP_MAXTYPE 18
-
-#define ICMP_INFOTYPE(type) \
- ((type) == ICMP_ECHOREPLY || (type) == ICMP_ECHO || \
- (type) == ICMP_ROUTERADVERT || (type) == ICMP_ROUTERSOLICIT || \
- (type) == ICMP_TSTAMP || (type) == ICMP_TSTAMPREPLY || \
- (type) == ICMP_IREQ || (type) == ICMP_IREQREPLY || \
- (type) == ICMP_MASKREQ || (type) == ICMP_MASKREPLY)
-
-#ifdef KERNEL
-void icmp_error __P((struct mbuf *, int, int, n_long, struct ifnet *));
-void icmp_input __P((struct mbuf *, int));
-#endif
-
-#endif
diff --git a/c/src/exec/libnetworking/netinet/ip_input.c b/c/src/exec/libnetworking/netinet/ip_input.c
deleted file mode 100644
index 238e10cf6b..0000000000
--- a/c/src/exec/libnetworking/netinet/ip_input.c
+++ /dev/null
@@ -1,1488 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ip_input.c 8.2 (Berkeley) 1/4/94
- * $Id$
- * $ANA: ip_input.c,v 1.5 1996/09/18 14:34:59 wollman Exp $
- */
-
-#define _IP_VHL
-
-#include "opt_ipfw.h"
-
-#include <stddef.h>
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/malloc.h>
-#include <sys/mbuf.h>
-#include <sys/domain.h>
-#include <sys/protosw.h>
-#include <sys/socket.h>
-#include <sys/errno.h>
-#include <sys/time.h>
-#include <sys/kernel.h>
-#include <sys/syslog.h>
-#include <sys/sysctl.h>
-
-#include <net/if.h>
-#include <net/if_dl.h>
-#include <net/route.h>
-#include <net/netisr.h>
-
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/in_var.h>
-#include <netinet/ip.h>
-#include <netinet/in_pcb.h>
-#include <netinet/in_var.h>
-#include <netinet/ip_var.h>
-#include <netinet/ip_icmp.h>
-#include <machine/in_cksum.h>
-
-#include <sys/socketvar.h>
-
-#ifdef IPFIREWALL
-#include <netinet/ip_fw.h>
-#endif
-
-int rsvp_on = 0;
-static int ip_rsvp_on;
-struct socket *ip_rsvpd;
-
-static int ipforwarding = 0;
-SYSCTL_INT(_net_inet_ip, IPCTL_FORWARDING, forwarding, CTLFLAG_RW,
- &ipforwarding, 0, "");
-
-static int ipsendredirects = 1; /* XXX */
-SYSCTL_INT(_net_inet_ip, IPCTL_SENDREDIRECTS, redirect, CTLFLAG_RW,
- &ipsendredirects, 0, "");
-
-int ip_defttl = IPDEFTTL;
-SYSCTL_INT(_net_inet_ip, IPCTL_DEFTTL, ttl, CTLFLAG_RW,
- &ip_defttl, 0, "");
-
-static int ip_dosourceroute = 0;
-SYSCTL_INT(_net_inet_ip, IPCTL_SOURCEROUTE, sourceroute, CTLFLAG_RW,
- &ip_dosourceroute, 0, "");
-
-static int ip_acceptsourceroute = 0;
-SYSCTL_INT(_net_inet_ip, IPCTL_ACCEPTSOURCEROUTE, accept_sourceroute,
- CTLFLAG_RW, &ip_acceptsourceroute, 0, "");
-#ifdef DIAGNOSTIC
-static int ipprintfs = 0;
-#endif
-
-extern struct domain inetdomain;
-extern struct protosw inetsw[];
-u_char ip_protox[IPPROTO_MAX];
-static int ipqmaxlen = IFQ_MAXLEN;
-struct in_ifaddr *in_ifaddr; /* first inet address */
-struct ifqueue ipintrq;
-SYSCTL_INT(_net_inet_ip, IPCTL_INTRQMAXLEN, intr_queue_maxlen, CTLFLAG_RD,
- &ipintrq.ifq_maxlen, 0, "");
-SYSCTL_INT(_net_inet_ip, IPCTL_INTRQDROPS, intr_queue_drops, CTLFLAG_RD,
- &ipintrq.ifq_drops, 0, "");
-
-struct ipstat ipstat;
-
-/* Packet reassembly stuff */
-#define IPREASS_NHASH_LOG2 6
-#define IPREASS_NHASH (1 << IPREASS_NHASH_LOG2)
-#define IPREASS_HMASK (IPREASS_NHASH - 1)
-#define IPREASS_HASH(x,y) \
- (((((x) & 0xF) | ((((x) >> 8) & 0xF) << 4)) ^ (y)) & IPREASS_HMASK)
-
-static struct ipq ipq[IPREASS_NHASH];
-static int nipq = 0; /* total # of reass queues */
-static int maxnipq;
-
-#ifdef IPCTL_DEFMTU
-SYSCTL_INT(_net_inet_ip, IPCTL_DEFMTU, mtu, CTLFLAG_RW,
- &ip_mtu, 0, "");
-#endif
-
-#if !defined(COMPAT_IPFW) || COMPAT_IPFW == 1
-#undef COMPAT_IPFW
-#define COMPAT_IPFW 1
-#else
-#undef COMPAT_IPFW
-#endif
-
-#ifdef COMPAT_IPFW
-/* Firewall hooks */
-ip_fw_chk_t *ip_fw_chk_ptr;
-ip_fw_ctl_t *ip_fw_ctl_ptr;
-
-/* IP Network Address Translation (NAT) hooks */
-ip_nat_t *ip_nat_ptr;
-ip_nat_ctl_t *ip_nat_ctl_ptr;
-#endif
-
-/*
- * We need to save the IP options in case a protocol wants to respond
- * to an incoming packet over the same route if the packet got here
- * using IP source routing. This allows connection establishment and
- * maintenance when the remote end is on a network that is not known
- * to us.
- */
-static int ip_nhops = 0;
-static struct ip_srcrt {
- struct in_addr dst; /* final destination */
- char nop; /* one NOP to align */
- char srcopt[IPOPT_OFFSET + 1]; /* OPTVAL, OLEN and OFFSET */
- struct in_addr route[MAX_IPOPTLEN/sizeof(struct in_addr)];
-} ip_srcrt;
-
-#ifdef IPDIVERT
-/*
- * Shared variable between ip_input() and ip_reass() to communicate
- * about which packets, once assembled from fragments, get diverted,
- * and to which port.
- */
-static u_short frag_divert_port;
-#endif
-
-static void save_rte __P((u_char *, struct in_addr));
-static void ip_deq __P((struct ipasfrag *));
-static int ip_dooptions __P((struct mbuf *));
-static void ip_enq __P((struct ipasfrag *, struct ipasfrag *));
-static void ip_forward __P((struct mbuf *, int));
-static void ip_freef __P((struct ipq *));
-static struct ip *
- ip_reass __P((struct ipasfrag *, struct ipq *, struct ipq *));
-static struct in_ifaddr *
- ip_rtaddr __P((struct in_addr));
-void ipintr __P((void));
-/*
- * IP initialization: fill in IP protocol switch table.
- * All protocols not implemented in kernel go to raw IP protocol handler.
- */
-void
-ip_init()
-{
- register struct protosw *pr;
- register int i;
-
- pr = pffindproto(PF_INET, IPPROTO_RAW, SOCK_RAW);
- if (pr == 0)
- panic("ip_init");
- for (i = 0; i < IPPROTO_MAX; i++)
- ip_protox[i] = pr - inetsw;
- for (pr = inetdomain.dom_protosw;
- pr < inetdomain.dom_protoswNPROTOSW; pr++)
- if (pr->pr_domain->dom_family == PF_INET &&
- pr->pr_protocol && pr->pr_protocol != IPPROTO_RAW)
- ip_protox[pr->pr_protocol] = pr - inetsw;
-
- for (i = 0; i < IPREASS_NHASH; i++)
- ipq[i].next = ipq[i].prev = &ipq[i];
-
- maxnipq = nmbclusters/4;
-
- ip_id = rtems_bsdnet_seconds_since_boot() & 0xffff;
- ipintrq.ifq_maxlen = ipqmaxlen;
-#ifdef IPFIREWALL
- ip_fw_init();
-#endif
-#ifdef IPNAT
- ip_nat_init();
-#endif
-
-}
-
-static struct sockaddr_in ipaddr = { sizeof(ipaddr), AF_INET };
-static struct route ipforward_rt;
-
-/*
- * Ip input routine. Checksum and byte swap header. If fragmented
- * try to reassemble. Process options. Pass to next level.
- */
-void
-ip_input(struct mbuf *m)
-{
- struct ip *ip;
- struct ipq *fp;
- struct in_ifaddr *ia;
- int i, hlen;
- u_short sum;
-
-#ifdef DIAGNOSTIC
- if ((m->m_flags & M_PKTHDR) == 0)
- panic("ip_input no HDR");
-#endif
- /*
- * If no IP addresses have been set yet but the interfaces
- * are receiving, can't do anything with incoming packets yet.
- */
- if (in_ifaddr == NULL)
- goto bad;
- ipstat.ips_total++;
-
- if (m->m_pkthdr.len < sizeof(struct ip))
- goto tooshort;
-
-#if defined(DIAGNOSTIC) && defined(ORIGINAL_FREEBSD_CODE)
- if (m->m_len < sizeof(struct ip))
- panic("ipintr mbuf too short");
-#endif
-
- if (m->m_len < sizeof (struct ip) &&
- (m = m_pullup(m, sizeof (struct ip))) == 0) {
- ipstat.ips_toosmall++;
- return;
- }
- ip = mtod(m, struct ip *);
-
- if (IP_VHL_V(ip->ip_vhl) != IPVERSION) {
- ipstat.ips_badvers++;
- goto bad;
- }
-
- hlen = IP_VHL_HL(ip->ip_vhl) << 2;
- if (hlen < sizeof(struct ip)) { /* minimum header length */
- ipstat.ips_badhlen++;
- goto bad;
- }
- if (hlen > m->m_len) {
- if ((m = m_pullup(m, hlen)) == 0) {
- ipstat.ips_badhlen++;
- return;
- }
- ip = mtod(m, struct ip *);
- }
- if (hlen == sizeof(struct ip)) {
- sum = in_cksum_hdr(ip);
- } else {
- sum = in_cksum(m, hlen);
- }
- if (sum) {
- ipstat.ips_badsum++;
- goto bad;
- }
-
- /*
- * Convert fields to host representation.
- */
- NTOHS(ip->ip_len);
- if (ip->ip_len < hlen) {
- ipstat.ips_badlen++;
- goto bad;
- }
- NTOHS(ip->ip_id);
- NTOHS(ip->ip_off);
-
- /*
- * Check that the amount of data in the buffers
- * is as at least much as the IP header would have us expect.
- * Trim mbufs if longer than we expect.
- * Drop packet if shorter than we expect.
- */
- if (m->m_pkthdr.len < ip->ip_len) {
-tooshort:
- ipstat.ips_tooshort++;
- goto bad;
- }
- if (m->m_pkthdr.len > ip->ip_len) {
- if (m->m_len == m->m_pkthdr.len) {
- m->m_len = ip->ip_len;
- m->m_pkthdr.len = ip->ip_len;
- } else
- m_adj(m, ip->ip_len - m->m_pkthdr.len);
- }
- /*
- * IpHack's section.
- * Right now when no processing on packet has done
- * and it is still fresh out of network we do our black
- * deals with it.
- * - Firewall: deny/allow/divert
- * - Xlate: translate packet's addr/port (NAT).
- * - Wrap: fake packet's addr/port <unimpl.>
- * - Encapsulate: put it in another IP and send out. <unimp.>
- */
-
-#ifdef COMPAT_IPFW
- if (ip_fw_chk_ptr) {
-#ifdef IPDIVERT
- u_short port;
-
- port = (*ip_fw_chk_ptr)(&ip, hlen, NULL, ip_divert_ignore, &m);
- ip_divert_ignore = 0;
- if (port) { /* Divert packet */
- frag_divert_port = port;
- goto ours;
- }
-#else
- /* If ipfw says divert, we have to just drop packet */
- if ((*ip_fw_chk_ptr)(&ip, hlen, NULL, 0, &m)) {
- m_freem(m);
- m = NULL;
- }
-#endif
- if (!m)
- return;
- }
-
- if (ip_nat_ptr && !(*ip_nat_ptr)(&ip, &m, m->m_pkthdr.rcvif, IP_NAT_IN))
- return;
-#endif
-
- /*
- * Process options and, if not destined for us,
- * ship it on. ip_dooptions returns 1 when an
- * error was detected (causing an icmp message
- * to be sent and the original packet to be freed).
- */
- ip_nhops = 0; /* for source routed packets */
- if (hlen > sizeof (struct ip) && ip_dooptions(m))
- return;
-
- /* greedy RSVP, snatches any PATH packet of the RSVP protocol and no
- * matter if it is destined to another node, or whether it is
- * a multicast one, RSVP wants it! and prevents it from being forwarded
- * anywhere else. Also checks if the rsvp daemon is running before
- * grabbing the packet.
- */
- if (rsvp_on && ip->ip_p==IPPROTO_RSVP)
- goto ours;
-
- /*
- * Check our list of addresses, to see if the packet is for us.
- */
- for (ia = in_ifaddr; ia; ia = ia->ia_next) {
-#define satosin(sa) ((struct sockaddr_in *)(sa))
-
- if (IA_SIN(ia)->sin_addr.s_addr == ip->ip_dst.s_addr)
- goto ours;
-#ifdef BOOTP_COMPAT
- if (IA_SIN(ia)->sin_addr.s_addr == INADDR_ANY)
- goto ours;
-#endif
- if (ia->ia_ifp && ia->ia_ifp->if_flags & IFF_BROADCAST) {
- if (satosin(&ia->ia_broadaddr)->sin_addr.s_addr ==
- ip->ip_dst.s_addr)
- goto ours;
- if (ip->ip_dst.s_addr == ia->ia_netbroadcast.s_addr)
- goto ours;
- }
- }
- if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr))) {
- struct in_multi *inm;
- if (ip_mrouter) {
- /*
- * If we are acting as a multicast router, all
- * incoming multicast packets are passed to the
- * kernel-level multicast forwarding function.
- * The packet is returned (relatively) intact; if
- * ip_mforward() returns a non-zero value, the packet
- * must be discarded, else it may be accepted below.
- *
- * (The IP ident field is put in the same byte order
- * as expected when ip_mforward() is called from
- * ip_output().)
- */
- ip->ip_id = htons(ip->ip_id);
- if (ip_mforward(ip, m->m_pkthdr.rcvif, m, 0) != 0) {
- ipstat.ips_cantforward++;
- m_freem(m);
- return;
- }
- ip->ip_id = ntohs(ip->ip_id);
-
- /*
- * The process-level routing demon needs to receive
- * all multicast IGMP packets, whether or not this
- * host belongs to their destination groups.
- */
- if (ip->ip_p == IPPROTO_IGMP)
- goto ours;
- ipstat.ips_forward++;
- }
- /*
- * See if we belong to the destination multicast group on the
- * arrival interface.
- */
- IN_LOOKUP_MULTI(ip->ip_dst, m->m_pkthdr.rcvif, inm);
- if (inm == NULL) {
- ipstat.ips_cantforward++;
- m_freem(m);
- return;
- }
- goto ours;
- }
- if (ip->ip_dst.s_addr == (u_long)INADDR_BROADCAST)
- goto ours;
- if (ip->ip_dst.s_addr == INADDR_ANY)
- goto ours;
-
- /*
- * Not for us; forward if possible and desirable.
- */
- if (ipforwarding == 0) {
- ipstat.ips_cantforward++;
- m_freem(m);
- } else
- ip_forward(m, 0);
- return;
-
-ours:
-
- /*
- * If offset or IP_MF are set, must reassemble.
- * Otherwise, nothing need be done.
- * (We could look in the reassembly queue to see
- * if the packet was previously fragmented,
- * but it's not worth the time; just let them time out.)
- */
- if (ip->ip_off &~ (IP_DF | IP_RF)) {
- if (m->m_flags & M_EXT) { /* XXX */
- if ((m = m_pullup(m, sizeof (struct ip))) == 0) {
- ipstat.ips_toosmall++;
-#ifdef IPDIVERT
- frag_divert_port = 0;
-#endif
- return;
- }
- ip = mtod(m, struct ip *);
- }
- sum = IPREASS_HASH(ip->ip_src.s_addr, ip->ip_id);
- /*
- * Look for queue of fragments
- * of this datagram.
- */
- for (fp = ipq[sum].next; fp != &ipq[sum]; fp = fp->next)
- if (ip->ip_id == fp->ipq_id &&
- ip->ip_src.s_addr == fp->ipq_src.s_addr &&
- ip->ip_dst.s_addr == fp->ipq_dst.s_addr &&
- ip->ip_p == fp->ipq_p)
- goto found;
-
- fp = 0;
-
- /* check if there's a place for the new queue */
- if (nipq > maxnipq) {
- /*
- * drop something from the tail of the current queue
- * before proceeding further
- */
- if (ipq[sum].prev == &ipq[sum]) { /* gak */
- for (i = 0; i < IPREASS_NHASH; i++) {
- if (ipq[i].prev != &ipq[i]) {
- ip_freef(ipq[i].prev);
- break;
- }
- }
- } else
- ip_freef(ipq[sum].prev);
- }
-found:
- /*
- * Adjust ip_len to not reflect header,
- * set ip_mff if more fragments are expected,
- * convert offset of this to bytes.
- */
- ip->ip_len -= hlen;
- ((struct ipasfrag *)ip)->ipf_mff &= ~1;
- if (ip->ip_off & IP_MF)
- ((struct ipasfrag *)ip)->ipf_mff |= 1;
- ip->ip_off <<= 3;
-
- /*
- * If datagram marked as having more fragments
- * or if this is not the first fragment,
- * attempt reassembly; if it succeeds, proceed.
- */
- if (((struct ipasfrag *)ip)->ipf_mff & 1 || ip->ip_off) {
- ipstat.ips_fragments++;
- ip = ip_reass((struct ipasfrag *)ip, fp, &ipq[sum]);
- if (ip == 0)
- return;
- ipstat.ips_reassembled++;
- m = dtom(ip);
-#ifdef IPDIVERT
- if (frag_divert_port) {
- ip->ip_len += hlen;
- HTONS(ip->ip_len);
- HTONS(ip->ip_off);
- HTONS(ip->ip_id);
- ip->ip_sum = 0;
- ip->ip_sum = in_cksum_hdr(ip);
- NTOHS(ip->ip_id);
- NTOHS(ip->ip_off);
- NTOHS(ip->ip_len);
- ip->ip_len -= hlen;
- }
-#endif
- } else
- if (fp)
- ip_freef(fp);
- } else
- ip->ip_len -= hlen;
-
-#ifdef IPDIVERT
- /*
- * Divert reassembled packets to the divert protocol if required
- */
- if (frag_divert_port) {
- ipstat.ips_delivered++;
- ip_divert_port = frag_divert_port;
- frag_divert_port = 0;
- (*inetsw[ip_protox[IPPROTO_DIVERT]].pr_input)(m, hlen);
- return;
- }
-
- /* Don't let packets divert themselves */
- if (ip->ip_p == IPPROTO_DIVERT) {
- ipstat.ips_noproto++;
- goto bad;
- }
-#endif
-
- /*
- * Switch out to protocol's input routine.
- */
- ipstat.ips_delivered++;
- (*inetsw[ip_protox[ip->ip_p]].pr_input)(m, hlen);
- return;
-bad:
- m_freem(m);
-}
-
-/*
- * IP software interrupt routine - to go away sometime soon
- */
-void
-ipintr(void)
-{
- int s;
- struct mbuf *m;
-
- while(1) {
- s = splimp();
- IF_DEQUEUE(&ipintrq, m);
- splx(s);
- if (m == 0)
- return;
- ip_input(m);
- }
-}
-
-NETISR_SET(NETISR_IP, ipintr);
-
-/*
- * Take incoming datagram fragment and try to
- * reassemble it into whole datagram. If a chain for
- * reassembly of this datagram already exists, then it
- * is given as fp; otherwise have to make a chain.
- */
-static struct ip *
-ip_reass(ip, fp, where)
- register struct ipasfrag *ip;
- register struct ipq *fp;
- struct ipq *where;
-{
- register struct mbuf *m = dtom(ip);
- register struct ipasfrag *q;
- struct mbuf *t;
- int hlen = ip->ip_hl << 2;
- int i, next;
-
- /*
- * Presence of header sizes in mbufs
- * would confuse code below.
- */
- m->m_data += hlen;
- m->m_len -= hlen;
-
- /*
- * If first fragment to arrive, create a reassembly queue.
- */
- if (fp == 0) {
- if ((t = m_get(M_DONTWAIT, MT_FTABLE)) == NULL)
- goto dropfrag;
- fp = mtod(t, struct ipq *);
- insque(fp, where);
- nipq++;
- fp->ipq_ttl = IPFRAGTTL;
- fp->ipq_p = ip->ip_p;
- fp->ipq_id = ip->ip_id;
- fp->ipq_next = fp->ipq_prev = (struct ipasfrag *)fp;
- fp->ipq_src = ((struct ip *)ip)->ip_src;
- fp->ipq_dst = ((struct ip *)ip)->ip_dst;
-#ifdef IPDIVERT
- fp->ipq_divert = 0;
-#endif
- q = (struct ipasfrag *)fp;
- goto insert;
- }
-
- /*
- * Find a segment which begins after this one does.
- */
- for (q = fp->ipq_next; q != (struct ipasfrag *)fp; q = q->ipf_next)
- if (q->ip_off > ip->ip_off)
- break;
-
- /*
- * If there is a preceding segment, it may provide some of
- * our data already. If so, drop the data from the incoming
- * segment. If it provides all of our data, drop us.
- */
- if (q->ipf_prev != (struct ipasfrag *)fp) {
- i = q->ipf_prev->ip_off + q->ipf_prev->ip_len - ip->ip_off;
- if (i > 0) {
- if (i >= ip->ip_len)
- goto dropfrag;
- m_adj(dtom(ip), i);
- ip->ip_off += i;
- ip->ip_len -= i;
- }
- }
-
- /*
- * While we overlap succeeding segments trim them or,
- * if they are completely covered, dequeue them.
- */
- while (q != (struct ipasfrag *)fp && ip->ip_off + ip->ip_len > q->ip_off) {
- struct mbuf *m0;
-
- i = (ip->ip_off + ip->ip_len) - q->ip_off;
- if (i < q->ip_len) {
- q->ip_len -= i;
- q->ip_off += i;
- m_adj(dtom(q), i);
- break;
- }
- m0 = dtom(q);
- q = q->ipf_next;
- ip_deq(q->ipf_prev);
- m_freem(m0);
- }
-
-insert:
-
-#ifdef IPDIVERT
- /*
- * Any fragment diverting causes the whole packet to divert
- */
- if (frag_divert_port != 0)
- fp->ipq_divert = frag_divert_port;
- frag_divert_port = 0;
-#endif
-
- /*
- * Stick new segment in its place;
- * check for complete reassembly.
- */
- ip_enq(ip, q->ipf_prev);
- next = 0;
- for (q = fp->ipq_next; q != (struct ipasfrag *)fp; q = q->ipf_next) {
- if (q->ip_off != next)
- return (0);
- next += q->ip_len;
- }
- if (q->ipf_prev->ipf_mff & 1)
- return (0);
-
- /*
- * Reassembly is complete. Make sure the packet is a sane size.
- */
- if (next + (IP_VHL_HL(((struct ip *)fp->ipq_next)->ip_vhl) << 2)
- > IP_MAXPACKET) {
- ipstat.ips_toolong++;
- ip_freef(fp);
- return (0);
- }
-
- /*
- * Concatenate fragments.
- */
- q = fp->ipq_next;
- m = dtom(q);
- t = m->m_next;
- m->m_next = 0;
- m_cat(m, t);
- q = q->ipf_next;
- while (q != (struct ipasfrag *)fp) {
- t = dtom(q);
- q = q->ipf_next;
- m_cat(m, t);
- }
-
-#ifdef IPDIVERT
- /*
- * Record divert port for packet, if any
- */
- frag_divert_port = fp->ipq_divert;
-#endif
-
- /*
- * Create header for new ip packet by
- * modifying header of first packet;
- * dequeue and discard fragment reassembly header.
- * Make header visible.
- */
- ip = fp->ipq_next;
- ip->ip_len = next;
- ip->ipf_mff &= ~1;
- ((struct ip *)ip)->ip_src = fp->ipq_src;
- ((struct ip *)ip)->ip_dst = fp->ipq_dst;
- remque(fp);
- nipq--;
- (void) m_free(dtom(fp));
- m = dtom(ip);
- m->m_len += (ip->ip_hl << 2);
- m->m_data -= (ip->ip_hl << 2);
- /* some debugging cruft by sklower, below, will go away soon */
- if (m->m_flags & M_PKTHDR) { /* XXX this should be done elsewhere */
- register int plen = 0;
- for (t = m; m; m = m->m_next)
- plen += m->m_len;
- t->m_pkthdr.len = plen;
- }
- return ((struct ip *)ip);
-
-dropfrag:
- ipstat.ips_fragdropped++;
- m_freem(m);
- return (0);
-}
-
-/*
- * Free a fragment reassembly header and all
- * associated datagrams.
- */
-static void
-ip_freef(fp)
- struct ipq *fp;
-{
- register struct ipasfrag *q, *p;
-
- for (q = fp->ipq_next; q != (struct ipasfrag *)fp; q = p) {
- p = q->ipf_next;
- ip_deq(q);
- m_freem(dtom(q));
- }
- remque(fp);
- (void) m_free(dtom(fp));
- nipq--;
-}
-
-/*
- * Put an ip fragment on a reassembly chain.
- * Like insque, but pointers in middle of structure.
- */
-static void
-ip_enq(p, prev)
- register struct ipasfrag *p, *prev;
-{
-
- p->ipf_prev = prev;
- p->ipf_next = prev->ipf_next;
- prev->ipf_next->ipf_prev = p;
- prev->ipf_next = p;
-}
-
-/*
- * To ip_enq as remque is to insque.
- */
-static void
-ip_deq(p)
- register struct ipasfrag *p;
-{
-
- p->ipf_prev->ipf_next = p->ipf_next;
- p->ipf_next->ipf_prev = p->ipf_prev;
-}
-
-/*
- * IP timer processing;
- * if a timer expires on a reassembly
- * queue, discard it.
- */
-void
-ip_slowtimo()
-{
- register struct ipq *fp;
- int s = splnet();
- int i;
-
- for (i = 0; i < IPREASS_NHASH; i++) {
- fp = ipq[i].next;
- if (fp == 0)
- continue;
- while (fp != &ipq[i]) {
- --fp->ipq_ttl;
- fp = fp->next;
- if (fp->prev->ipq_ttl == 0) {
- ipstat.ips_fragtimeout++;
- ip_freef(fp->prev);
- }
- }
- }
- splx(s);
-}
-
-/*
- * Drain off all datagram fragments.
- */
-void
-ip_drain()
-{
- int i;
-
- for (i = 0; i < IPREASS_NHASH; i++) {
- while (ipq[i].next != &ipq[i]) {
- ipstat.ips_fragdropped++;
- ip_freef(ipq[i].next);
- }
- }
- in_rtqdrain();
-}
-
-/*
- * Do option processing on a datagram,
- * possibly discarding it if bad options are encountered,
- * or forwarding it if source-routed.
- * Returns 1 if packet has been forwarded/freed,
- * 0 if the packet should be processed further.
- */
-static int
-ip_dooptions(m)
- struct mbuf *m;
-{
- register struct ip *ip = mtod(m, struct ip *);
- register u_char *cp;
- register struct ip_timestamp *ipt;
- register struct in_ifaddr *ia;
- int opt, optlen, cnt, off, code, type = ICMP_PARAMPROB, forward = 0;
- struct in_addr *sin, dst;
- n_time ntime;
-
- dst = ip->ip_dst;
- cp = (u_char *)(ip + 1);
- cnt = (IP_VHL_HL(ip->ip_vhl) << 2) - sizeof (struct ip);
- for (; cnt > 0; cnt -= optlen, cp += optlen) {
- opt = cp[IPOPT_OPTVAL];
- if (opt == IPOPT_EOL)
- break;
- if (opt == IPOPT_NOP)
- optlen = 1;
- else {
- optlen = cp[IPOPT_OLEN];
- if (optlen <= 0 || optlen > cnt) {
- code = &cp[IPOPT_OLEN] - (u_char *)ip;
- goto bad;
- }
- }
- switch (opt) {
-
- default:
- break;
-
- /*
- * Source routing with record.
- * Find interface with current destination address.
- * If none on this machine then drop if strictly routed,
- * or do nothing if loosely routed.
- * Record interface address and bring up next address
- * component. If strictly routed make sure next
- * address is on directly accessible net.
- */
- case IPOPT_LSRR:
- case IPOPT_SSRR:
- if ((off = cp[IPOPT_OFFSET]) < IPOPT_MINOFF) {
- code = &cp[IPOPT_OFFSET] - (u_char *)ip;
- goto bad;
- }
- ipaddr.sin_addr = ip->ip_dst;
- ia = (struct in_ifaddr *)
- ifa_ifwithaddr((struct sockaddr *)&ipaddr);
- if (ia == 0) {
- if (opt == IPOPT_SSRR) {
- type = ICMP_UNREACH;
- code = ICMP_UNREACH_SRCFAIL;
- goto bad;
- }
- if (!ip_dosourceroute)
- goto nosourcerouting;
- /*
- * Loose routing, and not at next destination
- * yet; nothing to do except forward.
- */
- break;
- }
- off--; /* 0 origin */
- if (off > optlen - sizeof(struct in_addr)) {
- /*
- * End of source route. Should be for us.
- */
- if (!ip_acceptsourceroute)
- goto nosourcerouting;
- save_rte(cp, ip->ip_src);
- break;
- }
-
- if (!ip_dosourceroute) {
- char buf[4*sizeof "123"];
-
-nosourcerouting:
- strcpy(buf, inet_ntoa(ip->ip_dst));
- log(LOG_WARNING,
- "attempted source route from %s to %s\n",
- inet_ntoa(ip->ip_src), buf);
- type = ICMP_UNREACH;
- code = ICMP_UNREACH_SRCFAIL;
- goto bad;
- }
-
- /*
- * locate outgoing interface
- */
- (void)memcpy(&ipaddr.sin_addr, cp + off,
- sizeof(ipaddr.sin_addr));
-
- if (opt == IPOPT_SSRR) {
-#define INA struct in_ifaddr *
-#define SA struct sockaddr *
- if ((ia = (INA)ifa_ifwithdstaddr((SA)&ipaddr)) == 0)
- ia = (INA)ifa_ifwithnet((SA)&ipaddr);
- } else
- ia = ip_rtaddr(ipaddr.sin_addr);
- if (ia == 0) {
- type = ICMP_UNREACH;
- code = ICMP_UNREACH_SRCFAIL;
- goto bad;
- }
- ip->ip_dst = ipaddr.sin_addr;
- (void)memcpy(cp + off, &(IA_SIN(ia)->sin_addr),
- sizeof(struct in_addr));
- cp[IPOPT_OFFSET] += sizeof(struct in_addr);
- /*
- * Let ip_intr's mcast routing check handle mcast pkts
- */
- forward = !IN_MULTICAST(ntohl(ip->ip_dst.s_addr));
- break;
-
- case IPOPT_RR:
- if ((off = cp[IPOPT_OFFSET]) < IPOPT_MINOFF) {
- code = &cp[IPOPT_OFFSET] - (u_char *)ip;
- goto bad;
- }
- /*
- * If no space remains, ignore.
- */
- off--; /* 0 origin */
- if (off > optlen - sizeof(struct in_addr))
- break;
- (void)memcpy(&ipaddr.sin_addr, &ip->ip_dst,
- sizeof(ipaddr.sin_addr));
- /*
- * locate outgoing interface; if we're the destination,
- * use the incoming interface (should be same).
- */
- if ((ia = (INA)ifa_ifwithaddr((SA)&ipaddr)) == 0 &&
- (ia = ip_rtaddr(ipaddr.sin_addr)) == 0) {
- type = ICMP_UNREACH;
- code = ICMP_UNREACH_HOST;
- goto bad;
- }
- (void)memcpy(cp + off, &(IA_SIN(ia)->sin_addr),
- sizeof(struct in_addr));
- cp[IPOPT_OFFSET] += sizeof(struct in_addr);
- break;
-
- case IPOPT_TS:
- code = cp - (u_char *)ip;
- ipt = (struct ip_timestamp *)cp;
- if (ipt->ipt_len < 5)
- goto bad;
- if (ipt->ipt_ptr > ipt->ipt_len - sizeof (long)) {
- if (++ipt->ipt_oflw == 0)
- goto bad;
- break;
- }
- sin = (struct in_addr *)(cp + ipt->ipt_ptr - 1);
- switch (ipt->ipt_flg) {
-
- case IPOPT_TS_TSONLY:
- break;
-
- case IPOPT_TS_TSANDADDR:
- if (ipt->ipt_ptr + sizeof(n_time) +
- sizeof(struct in_addr) > ipt->ipt_len)
- goto bad;
- ipaddr.sin_addr = dst;
- ia = (INA)ifaof_ifpforaddr((SA)&ipaddr,
- m->m_pkthdr.rcvif);
- if (ia == 0)
- continue;
- (void)memcpy(sin, &IA_SIN(ia)->sin_addr,
- sizeof(struct in_addr));
- ipt->ipt_ptr += sizeof(struct in_addr);
- break;
-
- case IPOPT_TS_PRESPEC:
- if (ipt->ipt_ptr + sizeof(n_time) +
- sizeof(struct in_addr) > ipt->ipt_len)
- goto bad;
- (void)memcpy(&ipaddr.sin_addr, sin,
- sizeof(struct in_addr));
- if (ifa_ifwithaddr((SA)&ipaddr) == 0)
- continue;
- ipt->ipt_ptr += sizeof(struct in_addr);
- break;
-
- default:
- goto bad;
- }
- ntime = iptime();
- (void)memcpy(cp + ipt->ipt_ptr - 1, &ntime,
- sizeof(n_time));
- ipt->ipt_ptr += sizeof(n_time);
- }
- }
- if (forward && ipforwarding) {
- ip_forward(m, 1);
- return (1);
- }
- return (0);
-bad:
- ip->ip_len -= IP_VHL_HL(ip->ip_vhl) << 2; /* XXX icmp_error adds in hdr length */
- icmp_error(m, type, code, 0, 0);
- ipstat.ips_badoptions++;
- return (1);
-}
-
-/*
- * Given address of next destination (final or next hop),
- * return internet address info of interface to be used to get there.
- */
-static struct in_ifaddr *
-ip_rtaddr(dst)
- struct in_addr dst;
-{
- register struct sockaddr_in *sin;
-
- sin = (struct sockaddr_in *) &ipforward_rt.ro_dst;
-
- if (ipforward_rt.ro_rt == 0 || dst.s_addr != sin->sin_addr.s_addr) {
- if (ipforward_rt.ro_rt) {
- RTFREE(ipforward_rt.ro_rt);
- ipforward_rt.ro_rt = 0;
- }
- sin->sin_family = AF_INET;
- sin->sin_len = sizeof(*sin);
- sin->sin_addr = dst;
-
- rtalloc_ign(&ipforward_rt, RTF_PRCLONING);
- }
- if (ipforward_rt.ro_rt == 0)
- return ((struct in_ifaddr *)0);
- return ((struct in_ifaddr *) ipforward_rt.ro_rt->rt_ifa);
-}
-
-/*
- * Save incoming source route for use in replies,
- * to be picked up later by ip_srcroute if the receiver is interested.
- */
-void
-save_rte(option, dst)
- u_char *option;
- struct in_addr dst;
-{
- unsigned olen;
-
- olen = option[IPOPT_OLEN];
-#ifdef DIAGNOSTIC
- if (ipprintfs)
- printf("save_rte: olen %d\n", olen);
-#endif
- if (olen > sizeof(ip_srcrt) - (1 + sizeof(dst)))
- return;
- bcopy(option, ip_srcrt.srcopt, olen);
- ip_nhops = (olen - IPOPT_OFFSET - 1) / sizeof(struct in_addr);
- ip_srcrt.dst = dst;
-}
-
-/*
- * Retrieve incoming source route for use in replies,
- * in the same form used by setsockopt.
- * The first hop is placed before the options, will be removed later.
- */
-struct mbuf *
-ip_srcroute()
-{
- register struct in_addr *p, *q;
- register struct mbuf *m;
-
- if (ip_nhops == 0)
- return ((struct mbuf *)0);
- m = m_get(M_DONTWAIT, MT_SOOPTS);
- if (m == 0)
- return ((struct mbuf *)0);
-
-#define OPTSIZ (sizeof(ip_srcrt.nop) + sizeof(ip_srcrt.srcopt))
-
- /* length is (nhops+1)*sizeof(addr) + sizeof(nop + srcrt header) */
- m->m_len = ip_nhops * sizeof(struct in_addr) + sizeof(struct in_addr) +
- OPTSIZ;
-#ifdef DIAGNOSTIC
- if (ipprintfs)
- printf("ip_srcroute: nhops %d mlen %d", ip_nhops, m->m_len);
-#endif
-
- /*
- * First save first hop for return route
- */
- p = &ip_srcrt.route[ip_nhops - 1];
- *(mtod(m, struct in_addr *)) = *p--;
-#ifdef DIAGNOSTIC
- if (ipprintfs)
- printf(" hops %lx", ntohl(mtod(m, struct in_addr *)->s_addr));
-#endif
-
- /*
- * Copy option fields and padding (nop) to mbuf.
- */
- ip_srcrt.nop = IPOPT_NOP;
- ip_srcrt.srcopt[IPOPT_OFFSET] = IPOPT_MINOFF;
- (void)memcpy(mtod(m, caddr_t) + sizeof(struct in_addr),
- &ip_srcrt.nop, OPTSIZ);
- q = (struct in_addr *)(mtod(m, caddr_t) +
- sizeof(struct in_addr) + OPTSIZ);
-#undef OPTSIZ
- /*
- * Record return path as an IP source route,
- * reversing the path (pointers are now aligned).
- */
- while (p >= ip_srcrt.route) {
-#ifdef DIAGNOSTIC
- if (ipprintfs)
- printf(" %lx", ntohl(q->s_addr));
-#endif
- *q++ = *p--;
- }
- /*
- * Last hop goes to final destination.
- */
- *q = ip_srcrt.dst;
-#ifdef DIAGNOSTIC
- if (ipprintfs)
- printf(" %lx\n", ntohl(q->s_addr));
-#endif
- return (m);
-}
-
-/*
- * Strip out IP options, at higher
- * level protocol in the kernel.
- * Second argument is buffer to which options
- * will be moved, and return value is their length.
- * XXX should be deleted; last arg currently ignored.
- */
-void
-ip_stripoptions(m, mopt)
- register struct mbuf *m;
- struct mbuf *mopt;
-{
- register int i;
- struct ip *ip = mtod(m, struct ip *);
- register caddr_t opts;
- int olen;
-
- olen = (IP_VHL_HL(ip->ip_vhl) << 2) - sizeof (struct ip);
- opts = (caddr_t)(ip + 1);
- i = m->m_len - (sizeof (struct ip) + olen);
- bcopy(opts + olen, opts, (unsigned)i);
- m->m_len -= olen;
- if (m->m_flags & M_PKTHDR)
- m->m_pkthdr.len -= olen;
- ip->ip_vhl = IP_MAKE_VHL(IPVERSION, sizeof(struct ip) >> 2);
-}
-
-u_char inetctlerrmap[PRC_NCMDS] = {
- 0, 0, 0, 0,
- 0, EMSGSIZE, EHOSTDOWN, EHOSTUNREACH,
- EHOSTUNREACH, EHOSTUNREACH, ECONNREFUSED, ECONNREFUSED,
- EMSGSIZE, EHOSTUNREACH, 0, 0,
- 0, 0, 0, 0,
- ENOPROTOOPT
-};
-
-/*
- * Forward a packet. If some error occurs return the sender
- * an icmp packet. Note we can't always generate a meaningful
- * icmp message because icmp doesn't have a large enough repertoire
- * of codes and types.
- *
- * If not forwarding, just drop the packet. This could be confusing
- * if ipforwarding was zero but some routing protocol was advancing
- * us as a gateway to somewhere. However, we must let the routing
- * protocol deal with that.
- *
- * The srcrt parameter indicates whether the packet is being forwarded
- * via a source route.
- */
-static void
-ip_forward(m, srcrt)
- struct mbuf *m;
- int srcrt;
-{
- register struct ip *ip = mtod(m, struct ip *);
- register struct sockaddr_in *sin;
- register struct rtentry *rt;
- int error, type = 0, code = 0;
- struct mbuf *mcopy;
- n_long dest;
- struct ifnet *destifp;
-
- dest = 0;
-#ifdef DIAGNOSTIC
- if (ipprintfs)
- printf("forward: src %lx dst %lx ttl %x\n",
- ip->ip_src.s_addr, ip->ip_dst.s_addr, ip->ip_ttl);
-#endif
-
-
- if (m->m_flags & M_BCAST || in_canforward(ip->ip_dst) == 0) {
- ipstat.ips_cantforward++;
- m_freem(m);
- return;
- }
- HTONS(ip->ip_id);
- if (ip->ip_ttl <= IPTTLDEC) {
- icmp_error(m, ICMP_TIMXCEED, ICMP_TIMXCEED_INTRANS, dest, 0);
- return;
- }
- ip->ip_ttl -= IPTTLDEC;
-
- sin = (struct sockaddr_in *)&ipforward_rt.ro_dst;
- if ((rt = ipforward_rt.ro_rt) == 0 ||
- ip->ip_dst.s_addr != sin->sin_addr.s_addr) {
- if (ipforward_rt.ro_rt) {
- RTFREE(ipforward_rt.ro_rt);
- ipforward_rt.ro_rt = 0;
- }
- sin->sin_family = AF_INET;
- sin->sin_len = sizeof(*sin);
- sin->sin_addr = ip->ip_dst;
-
- rtalloc_ign(&ipforward_rt, RTF_PRCLONING);
- if (ipforward_rt.ro_rt == 0) {
- icmp_error(m, ICMP_UNREACH, ICMP_UNREACH_HOST, dest, 0);
- return;
- }
- rt = ipforward_rt.ro_rt;
- }
-
- /*
- * Save at most 64 bytes of the packet in case
- * we need to generate an ICMP message to the src.
- */
- mcopy = m_copy(m, 0, imin((int)ip->ip_len, 64));
-
- /*
- * If forwarding packet using same interface that it came in on,
- * perhaps should send a redirect to sender to shortcut a hop.
- * Only send redirect if source is sending directly to us,
- * and if packet was not source routed (or has any options).
- * Also, don't send redirect if forwarding using a default route
- * or a route modified by a redirect.
- */
-#define satosin(sa) ((struct sockaddr_in *)(sa))
- if (rt->rt_ifp == m->m_pkthdr.rcvif &&
- (rt->rt_flags & (RTF_DYNAMIC|RTF_MODIFIED)) == 0 &&
- satosin(rt_key(rt))->sin_addr.s_addr != 0 &&
- ipsendredirects && !srcrt) {
-#define RTA(rt) ((struct in_ifaddr *)(rt->rt_ifa))
- u_long src = ntohl(ip->ip_src.s_addr);
-
- if (RTA(rt) &&
- (src & RTA(rt)->ia_subnetmask) == RTA(rt)->ia_subnet) {
- if (rt->rt_flags & RTF_GATEWAY)
- dest = satosin(rt->rt_gateway)->sin_addr.s_addr;
- else
- dest = ip->ip_dst.s_addr;
- /* Router requirements says to only send host redirects */
- type = ICMP_REDIRECT;
- code = ICMP_REDIRECT_HOST;
-#ifdef DIAGNOSTIC
- if (ipprintfs)
- printf("redirect (%d) to %lx\n", code, (u_long)dest);
-#endif
- }
- }
-
- error = ip_output(m, (struct mbuf *)0, &ipforward_rt,
- IP_FORWARDING, 0);
- if (error)
- ipstat.ips_cantforward++;
- else {
- ipstat.ips_forward++;
- if (type)
- ipstat.ips_redirectsent++;
- else {
- if (mcopy)
- m_freem(mcopy);
- return;
- }
- }
- if (mcopy == NULL)
- return;
- destifp = NULL;
-
- switch (error) {
-
- case 0: /* forwarded, but need redirect */
- /* type, code set above */
- break;
-
- case ENETUNREACH: /* shouldn't happen, checked above */
- case EHOSTUNREACH:
- case ENETDOWN:
- case EHOSTDOWN:
- default:
- type = ICMP_UNREACH;
- code = ICMP_UNREACH_HOST;
- break;
-
- case EMSGSIZE:
- type = ICMP_UNREACH;
- code = ICMP_UNREACH_NEEDFRAG;
- if (ipforward_rt.ro_rt)
- destifp = ipforward_rt.ro_rt->rt_ifp;
- ipstat.ips_cantfrag++;
- break;
-
- case ENOBUFS:
- type = ICMP_SOURCEQUENCH;
- code = 0;
- break;
- }
- icmp_error(mcopy, type, code, dest, destifp);
-}
-
-void
-ip_savecontrol(inp, mp, ip, m)
- register struct inpcb *inp;
- register struct mbuf **mp;
- register struct ip *ip;
- register struct mbuf *m;
-{
- if (inp->inp_socket->so_options & SO_TIMESTAMP) {
- struct timeval tv;
-
- microtime(&tv);
- *mp = sbcreatecontrol((caddr_t) &tv, sizeof(tv),
- SCM_TIMESTAMP, SOL_SOCKET);
- if (*mp)
- mp = &(*mp)->m_next;
- }
- if (inp->inp_flags & INP_RECVDSTADDR) {
- *mp = sbcreatecontrol((caddr_t) &ip->ip_dst,
- sizeof(struct in_addr), IP_RECVDSTADDR, IPPROTO_IP);
- if (*mp)
- mp = &(*mp)->m_next;
- }
-#ifdef notyet
- /* XXX
- * Moving these out of udp_input() made them even more broken
- * than they already were.
- */
- /* options were tossed already */
- if (inp->inp_flags & INP_RECVOPTS) {
- *mp = sbcreatecontrol((caddr_t) opts_deleted_above,
- sizeof(struct in_addr), IP_RECVOPTS, IPPROTO_IP);
- if (*mp)
- mp = &(*mp)->m_next;
- }
- /* ip_srcroute doesn't do what we want here, need to fix */
- if (inp->inp_flags & INP_RECVRETOPTS) {
- *mp = sbcreatecontrol((caddr_t) ip_srcroute(),
- sizeof(struct in_addr), IP_RECVRETOPTS, IPPROTO_IP);
- if (*mp)
- mp = &(*mp)->m_next;
- }
-#endif
- if (inp->inp_flags & INP_RECVIF) {
- struct sockaddr_dl sdl;
-
- sdl.sdl_len = offsetof(struct sockaddr_dl, sdl_data[0]);
- sdl.sdl_family = AF_LINK;
- sdl.sdl_index = m->m_pkthdr.rcvif ?
- m->m_pkthdr.rcvif->if_index : 0;
- sdl.sdl_nlen = sdl.sdl_alen = sdl.sdl_slen = 0;
- *mp = sbcreatecontrol((caddr_t) &sdl, sdl.sdl_len,
- IP_RECVIF, IPPROTO_IP);
- if (*mp)
- mp = &(*mp)->m_next;
- }
-}
-
-int
-ip_rsvp_init(struct socket *so)
-{
- if (so->so_type != SOCK_RAW ||
- so->so_proto->pr_protocol != IPPROTO_RSVP)
- return EOPNOTSUPP;
-
- if (ip_rsvpd != NULL)
- return EADDRINUSE;
-
- ip_rsvpd = so;
- /*
- * This may seem silly, but we need to be sure we don't over-increment
- * the RSVP counter, in case something slips up.
- */
- if (!ip_rsvp_on) {
- ip_rsvp_on = 1;
- rsvp_on++;
- }
-
- return 0;
-}
-
-int
-ip_rsvp_done(void)
-{
- ip_rsvpd = NULL;
- /*
- * This may seem silly, but we need to be sure we don't over-decrement
- * the RSVP counter, in case something slips up.
- */
- if (ip_rsvp_on) {
- ip_rsvp_on = 0;
- rsvp_on--;
- }
- return 0;
-}
diff --git a/c/src/exec/libnetworking/netinet/ip_mroute.c b/c/src/exec/libnetworking/netinet/ip_mroute.c
deleted file mode 100644
index 662d695dfe..0000000000
--- a/c/src/exec/libnetworking/netinet/ip_mroute.c
+++ /dev/null
@@ -1,2302 +0,0 @@
-/*
- * IP multicast forwarding procedures
- *
- * Written by David Waitzman, BBN Labs, August 1988.
- * Modified by Steve Deering, Stanford, February 1989.
- * Modified by Mark J. Steiglitz, Stanford, May, 1991
- * Modified by Van Jacobson, LBL, January 1993
- * Modified by Ajit Thyagarajan, PARC, August 1993
- * Modified by Bill Fenner, PARC, April 1995
- *
- * MROUTING Revision: 3.5
- * $Id$
- */
-
-#include "opt_mrouting.h"
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/systm.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/protosw.h>
-#include <sys/errno.h>
-#include <sys/time.h>
-#include <sys/kernel.h>
-#include <sys/ioctl.h>
-#include <sys/syslog.h>
-#include <net/if.h>
-#include <net/route.h>
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/ip_var.h>
-#include <netinet/in_pcb.h>
-#include <netinet/in_var.h>
-#include <netinet/igmp.h>
-#include <netinet/igmp_var.h>
-#include <netinet/ip_mroute.h>
-#include <netinet/udp.h>
-
-#ifndef NTOHL
-#if BYTE_ORDER != BIG_ENDIAN
-#define NTOHL(d) ((d) = ntohl((d)))
-#define NTOHS(d) ((d) = ntohs((u_short)(d)))
-#define HTONL(d) ((d) = htonl((d)))
-#define HTONS(d) ((d) = htons((u_short)(d)))
-#else
-#define NTOHL(d)
-#define NTOHS(d)
-#define HTONL(d)
-#define HTONS(d)
-#endif
-#endif
-
-#ifndef MROUTING
-extern u_long _ip_mcast_src __P((int vifi));
-extern int _ip_mforward __P((struct ip *ip, struct ifnet *ifp,
- struct mbuf *m, struct ip_moptions *imo));
-extern int _ip_mrouter_done __P((void));
-extern int _ip_mrouter_get __P((int cmd, struct socket *so,
- struct mbuf **m));
-extern int _ip_mrouter_set __P((int cmd, struct socket *so,
- struct mbuf *m));
-extern int _mrt_ioctl __P((int req, caddr_t data, struct proc *p));
-
-/*
- * Dummy routines and globals used when multicast routing is not compiled in.
- */
-
-struct socket *ip_mrouter = NULL;
-/* static u_int ip_mrtproto = 0; */
-/* static struct mrtstat mrtstat; */
-u_int rsvpdebug = 0;
-
-int
-_ip_mrouter_set(cmd, so, m)
- int cmd;
- struct socket *so;
- struct mbuf *m;
-{
- return(EOPNOTSUPP);
-}
-
-int (*ip_mrouter_set)(int, struct socket *, struct mbuf *) = _ip_mrouter_set;
-
-
-int
-_ip_mrouter_get(cmd, so, m)
- int cmd;
- struct socket *so;
- struct mbuf **m;
-{
- return(EOPNOTSUPP);
-}
-
-int (*ip_mrouter_get)(int, struct socket *, struct mbuf **) = _ip_mrouter_get;
-
-int
-_ip_mrouter_done()
-{
- return(0);
-}
-
-int (*ip_mrouter_done)(void) = _ip_mrouter_done;
-
-int
-_ip_mforward(ip, ifp, m, imo)
- struct ip *ip;
- struct ifnet *ifp;
- struct mbuf *m;
- struct ip_moptions *imo;
-{
- return(0);
-}
-
-int (*ip_mforward)(struct ip *, struct ifnet *, struct mbuf *,
- struct ip_moptions *) = _ip_mforward;
-
-int
-_mrt_ioctl(int req, caddr_t data, struct proc *p)
-{
- return EOPNOTSUPP;
-}
-
-int (*mrt_ioctl)(int, caddr_t, struct proc *) = _mrt_ioctl;
-
-void
-rsvp_input(m, iphlen) /* XXX must fixup manually */
- struct mbuf *m;
- int iphlen;
-{
- /* Can still get packets with rsvp_on = 0 if there is a local member
- * of the group to which the RSVP packet is addressed. But in this
- * case we want to throw the packet away.
- */
- if (!rsvp_on) {
- m_freem(m);
- return;
- }
-
- if (ip_rsvpd != NULL) {
- if (rsvpdebug)
- printf("rsvp_input: Sending packet up old-style socket\n");
- rip_input(m, iphlen);
- return;
- }
- /* Drop the packet */
- m_freem(m);
-}
-
-void ipip_input(struct mbuf *m, int iphlen) { /* XXX must fixup manually */
- rip_input(m, iphlen);
-}
-
-int (*legal_vif_num)(int) = 0;
-
-/*
- * This should never be called, since IP_MULTICAST_VIF should fail, but
- * just in case it does get called, the code a little lower in ip_output
- * will assign the packet a local address.
- */
-u_long
-_ip_mcast_src(int vifi) { return INADDR_ANY; }
-u_long (*ip_mcast_src)(int) = _ip_mcast_src;
-
-int
-ip_rsvp_vif_init(so, m)
- struct socket *so;
- struct mbuf *m;
-{
- return(EINVAL);
-}
-
-int
-ip_rsvp_vif_done(so, m)
- struct socket *so;
- struct mbuf *m;
-{
- return(EINVAL);
-}
-
-void
-ip_rsvp_force_done(so)
- struct socket *so;
-{
- return;
-}
-
-#else /* MROUTING */
-
-#define M_HASCL(m) ((m)->m_flags & M_EXT)
-
-#define INSIZ sizeof(struct in_addr)
-#define same(a1, a2) \
- (bcmp((caddr_t)(a1), (caddr_t)(a2), INSIZ) == 0)
-
-#define MT_MRTABLE MT_RTABLE /* since nothing else uses it */
-
-/*
- * Globals. All but ip_mrouter and ip_mrtproto could be static,
- * except for netstat or debugging purposes.
- */
-#ifndef MROUTE_LKM
-struct socket *ip_mrouter = NULL;
-struct mrtstat mrtstat;
-
-int ip_mrtproto = IGMP_DVMRP; /* for netstat only */
-#else /* MROUTE_LKM */
-extern void X_ipip_input __P((struct mbuf *m, int iphlen));
-extern struct mrtstat mrtstat;
-static int ip_mrtproto;
-#endif
-
-#define NO_RTE_FOUND 0x1
-#define RTE_FOUND 0x2
-
-static struct mbuf *mfctable[MFCTBLSIZ];
-static u_char nexpire[MFCTBLSIZ];
-static struct vif viftable[MAXVIFS];
-static u_int mrtdebug = 0; /* debug level */
-#define DEBUG_MFC 0x02
-#define DEBUG_FORWARD 0x04
-#define DEBUG_EXPIRE 0x08
-#define DEBUG_XMIT 0x10
-static u_int tbfdebug = 0; /* tbf debug level */
-static u_int rsvpdebug = 0; /* rsvp debug level */
-
-#define EXPIRE_TIMEOUT (hz / 4) /* 4x / second */
-#define UPCALL_EXPIRE 6 /* number of timeouts */
-
-/*
- * Define the token bucket filter structures
- * tbftable -> each vif has one of these for storing info
- */
-
-static struct tbf tbftable[MAXVIFS];
-#define TBF_REPROCESS (hz / 100) /* 100x / second */
-
-/*
- * 'Interfaces' associated with decapsulator (so we can tell
- * packets that went through it from ones that get reflected
- * by a broken gateway). These interfaces are never linked into
- * the system ifnet list & no routes point to them. I.e., packets
- * can't be sent this way. They only exist as a placeholder for
- * multicast source verification.
- */
-static struct ifnet multicast_decap_if[MAXVIFS];
-
-#define ENCAP_TTL 64
-#define ENCAP_PROTO IPPROTO_IPIP /* 4 */
-
-/* prototype IP hdr for encapsulated packets */
-static struct ip multicast_encap_iphdr = {
-#if BYTE_ORDER == LITTLE_ENDIAN
- sizeof(struct ip) >> 2, IPVERSION,
-#else
- IPVERSION, sizeof(struct ip) >> 2,
-#endif
- 0, /* tos */
- sizeof(struct ip), /* total length */
- 0, /* id */
- 0, /* frag offset */
- ENCAP_TTL, ENCAP_PROTO,
- 0, /* checksum */
-};
-
-/*
- * Private variables.
- */
-static vifi_t numvifs = 0;
-static int have_encap_tunnel = 0;
-
-/*
- * one-back cache used by ipip_input to locate a tunnel's vif
- * given a datagram's src ip address.
- */
-static u_long last_encap_src;
-static struct vif *last_encap_vif;
-
-static u_long X_ip_mcast_src __P((int vifi));
-static int X_ip_mforward __P((struct ip *ip, struct ifnet *ifp, struct mbuf *m, struct ip_moptions *imo));
-static int X_ip_mrouter_done __P((void));
-static int X_ip_mrouter_get __P((int cmd, struct socket *so, struct mbuf **m));
-static int X_ip_mrouter_set __P((int cmd, struct socket *so, struct mbuf *m));
-static int X_legal_vif_num __P((int vif));
-static int X_mrt_ioctl __P((int cmd, caddr_t data));
-
-static int get_sg_cnt(struct sioc_sg_req *);
-static int get_vif_cnt(struct sioc_vif_req *);
-static int ip_mrouter_init(struct socket *, struct mbuf *);
-static int add_vif(struct vifctl *);
-static int del_vif(vifi_t *);
-static int add_mfc(struct mfcctl *);
-static int del_mfc(struct mfcctl *);
-static int socket_send(struct socket *, struct mbuf *, struct sockaddr_in *);
-static int get_version(struct mbuf *);
-static int get_assert(struct mbuf *);
-static int set_assert(int *);
-static void expire_upcalls(void *);
-static int ip_mdq(struct mbuf *, struct ifnet *, struct mfc *,
- vifi_t);
-static void phyint_send(struct ip *, struct vif *, struct mbuf *);
-static void encap_send(struct ip *, struct vif *, struct mbuf *);
-static void tbf_control(struct vif *, struct mbuf *, struct ip *, u_long);
-static void tbf_queue(struct vif *, struct mbuf *);
-static void tbf_process_q(struct vif *);
-static void tbf_reprocess_q(void *);
-static int tbf_dq_sel(struct vif *, struct ip *);
-static void tbf_send_packet(struct vif *, struct mbuf *);
-static void tbf_update_tokens(struct vif *);
-static int priority(struct vif *, struct ip *);
-void multiencap_decap(struct mbuf *);
-
-/*
- * whether or not special PIM assert processing is enabled.
- */
-static int pim_assert;
-/*
- * Rate limit for assert notification messages, in usec
- */
-#define ASSERT_MSG_TIME 3000000
-
-/*
- * Hash function for a source, group entry
- */
-#define MFCHASH(a, g) MFCHASHMOD(((a) >> 20) ^ ((a) >> 10) ^ (a) ^ \
- ((g) >> 20) ^ ((g) >> 10) ^ (g))
-
-/*
- * Find a route for a given origin IP address and Multicast group address
- * Type of service parameter to be added in the future!!!
- */
-
-#define MFCFIND(o, g, rt) { \
- register struct mbuf *_mb_rt = mfctable[MFCHASH(o,g)]; \
- register struct mfc *_rt = NULL; \
- rt = NULL; \
- ++mrtstat.mrts_mfc_lookups; \
- while (_mb_rt) { \
- _rt = mtod(_mb_rt, struct mfc *); \
- if ((_rt->mfc_origin.s_addr == o) && \
- (_rt->mfc_mcastgrp.s_addr == g) && \
- (_mb_rt->m_act == NULL)) { \
- rt = _rt; \
- break; \
- } \
- _mb_rt = _mb_rt->m_next; \
- } \
- if (rt == NULL) { \
- ++mrtstat.mrts_mfc_misses; \
- } \
-}
-
-
-/*
- * Macros to compute elapsed time efficiently
- * Borrowed from Van Jacobson's scheduling code
- */
-#define TV_DELTA(a, b, delta) { \
- register int xxs; \
- \
- delta = (a).tv_usec - (b).tv_usec; \
- if ((xxs = (a).tv_sec - (b).tv_sec)) { \
- switch (xxs) { \
- case 2: \
- delta += 1000000; \
- /* fall through */ \
- case 1: \
- delta += 1000000; \
- break; \
- default: \
- delta += (1000000 * xxs); \
- } \
- } \
-}
-
-#define TV_LT(a, b) (((a).tv_usec < (b).tv_usec && \
- (a).tv_sec <= (b).tv_sec) || (a).tv_sec < (b).tv_sec)
-
-#ifdef UPCALL_TIMING
-u_long upcall_data[51];
-static void collate(struct timeval *);
-#endif /* UPCALL_TIMING */
-
-
-/*
- * Handle MRT setsockopt commands to modify the multicast routing tables.
- */
-static int
-X_ip_mrouter_set(cmd, so, m)
- int cmd;
- struct socket *so;
- struct mbuf *m;
-{
- if (cmd != MRT_INIT && so != ip_mrouter) return EACCES;
-
- switch (cmd) {
- case MRT_INIT: return ip_mrouter_init(so, m);
- case MRT_DONE: return ip_mrouter_done();
- case MRT_ADD_VIF: return add_vif (mtod(m, struct vifctl *));
- case MRT_DEL_VIF: return del_vif (mtod(m, vifi_t *));
- case MRT_ADD_MFC: return add_mfc (mtod(m, struct mfcctl *));
- case MRT_DEL_MFC: return del_mfc (mtod(m, struct mfcctl *));
- case MRT_ASSERT: return set_assert(mtod(m, int *));
- default: return EOPNOTSUPP;
- }
-}
-
-#ifndef MROUTE_LKM
-int (*ip_mrouter_set)(int, struct socket *, struct mbuf *) = X_ip_mrouter_set;
-#endif
-
-/*
- * Handle MRT getsockopt commands
- */
-static int
-X_ip_mrouter_get(cmd, so, m)
- int cmd;
- struct socket *so;
- struct mbuf **m;
-{
- struct mbuf *mb;
-
- if (so != ip_mrouter) return EACCES;
-
- *m = mb = m_get(M_WAIT, MT_SOOPTS);
-
- switch (cmd) {
- case MRT_VERSION: return get_version(mb);
- case MRT_ASSERT: return get_assert(mb);
- default: return EOPNOTSUPP;
- }
-}
-
-#ifndef MROUTE_LKM
-int (*ip_mrouter_get)(int, struct socket *, struct mbuf **) = X_ip_mrouter_get;
-#endif
-
-/*
- * Handle ioctl commands to obtain information from the cache
- */
-static int
-X_mrt_ioctl(cmd, data)
- int cmd;
- caddr_t data;
-{
- int error = 0;
-
- switch (cmd) {
- case (SIOCGETVIFCNT):
- return (get_vif_cnt((struct sioc_vif_req *)data));
- break;
- case (SIOCGETSGCNT):
- return (get_sg_cnt((struct sioc_sg_req *)data));
- break;
- default:
- return (EINVAL);
- break;
- }
- return error;
-}
-
-#ifndef MROUTE_LKM
-int (*mrt_ioctl)(int, caddr_t) = X_mrt_ioctl;
-#endif
-
-/*
- * returns the packet, byte, rpf-failure count for the source group provided
- */
-static int
-get_sg_cnt(req)
- register struct sioc_sg_req *req;
-{
- register struct mfc *rt;
- int s;
-
- s = splnet();
- MFCFIND(req->src.s_addr, req->grp.s_addr, rt);
- splx(s);
- if (rt != NULL) {
- req->pktcnt = rt->mfc_pkt_cnt;
- req->bytecnt = rt->mfc_byte_cnt;
- req->wrong_if = rt->mfc_wrong_if;
- } else
- req->pktcnt = req->bytecnt = req->wrong_if = 0xffffffff;
-
- return 0;
-}
-
-/*
- * returns the input and output packet and byte counts on the vif provided
- */
-static int
-get_vif_cnt(req)
- register struct sioc_vif_req *req;
-{
- register vifi_t vifi = req->vifi;
-
- if (vifi >= numvifs) return EINVAL;
-
- req->icount = viftable[vifi].v_pkt_in;
- req->ocount = viftable[vifi].v_pkt_out;
- req->ibytes = viftable[vifi].v_bytes_in;
- req->obytes = viftable[vifi].v_bytes_out;
-
- return 0;
-}
-
-/*
- * Enable multicast routing
- */
-static int
-ip_mrouter_init(so, m)
- struct socket *so;
- struct mbuf *m;
-{
- int *v;
-
- if (mrtdebug)
- log(LOG_DEBUG,"ip_mrouter_init: so_type = %d, pr_protocol = %d\n",
- so->so_type, so->so_proto->pr_protocol);
-
- if (so->so_type != SOCK_RAW ||
- so->so_proto->pr_protocol != IPPROTO_IGMP) return EOPNOTSUPP;
-
- if (!m || (m->m_len != sizeof(int *)))
- return ENOPROTOOPT;
-
- v = mtod(m, int *);
- if (*v != 1)
- return ENOPROTOOPT;
-
- if (ip_mrouter != NULL) return EADDRINUSE;
-
- ip_mrouter = so;
-
- bzero((caddr_t)mfctable, sizeof(mfctable));
- bzero((caddr_t)nexpire, sizeof(nexpire));
-
- pim_assert = 0;
-
- timeout(expire_upcalls, (caddr_t)NULL, EXPIRE_TIMEOUT);
-
- if (mrtdebug)
- log(LOG_DEBUG, "ip_mrouter_init\n");
-
- return 0;
-}
-
-/*
- * Disable multicast routing
- */
-static int
-X_ip_mrouter_done()
-{
- vifi_t vifi;
- int i;
- struct ifnet *ifp;
- struct ifreq ifr;
- struct mbuf *mb_rt;
- struct mbuf *m;
- struct rtdetq *rte;
- int s;
-
- s = splnet();
-
- /*
- * For each phyint in use, disable promiscuous reception of all IP
- * multicasts.
- */
- for (vifi = 0; vifi < numvifs; vifi++) {
- if (viftable[vifi].v_lcl_addr.s_addr != 0 &&
- !(viftable[vifi].v_flags & VIFF_TUNNEL)) {
- ((struct sockaddr_in *)&(ifr.ifr_addr))->sin_family = AF_INET;
- ((struct sockaddr_in *)&(ifr.ifr_addr))->sin_addr.s_addr
- = INADDR_ANY;
- ifp = viftable[vifi].v_ifp;
- (*ifp->if_ioctl)(ifp, SIOCDELMULTI, (caddr_t)&ifr);
- }
- }
- bzero((caddr_t)tbftable, sizeof(tbftable));
- bzero((caddr_t)viftable, sizeof(viftable));
- numvifs = 0;
- pim_assert = 0;
-
- untimeout(expire_upcalls, (caddr_t)NULL);
-
- /*
- * Free all multicast forwarding cache entries.
- */
- for (i = 0; i < MFCTBLSIZ; i++) {
- mb_rt = mfctable[i];
- while (mb_rt) {
- if (mb_rt->m_act != NULL) {
- while (mb_rt->m_act) {
- m = mb_rt->m_act;
- mb_rt->m_act = m->m_act;
- rte = mtod(m, struct rtdetq *);
- m_freem(rte->m);
- m_free(m);
- }
- }
- mb_rt = m_free(mb_rt);
- }
- }
-
- bzero((caddr_t)mfctable, sizeof(mfctable));
-
- /*
- * Reset de-encapsulation cache
- */
- last_encap_src = 0;
- last_encap_vif = NULL;
- have_encap_tunnel = 0;
-
- ip_mrouter = NULL;
-
- splx(s);
-
- if (mrtdebug)
- log(LOG_DEBUG, "ip_mrouter_done\n");
-
- return 0;
-}
-
-#ifndef MROUTE_LKM
-int (*ip_mrouter_done)(void) = X_ip_mrouter_done;
-#endif
-
-static int
-get_version(mb)
- struct mbuf *mb;
-{
- int *v;
-
- v = mtod(mb, int *);
-
- *v = 0x0305; /* XXX !!!! */
- mb->m_len = sizeof(int);
-
- return 0;
-}
-
-/*
- * Set PIM assert processing global
- */
-static int
-set_assert(i)
- int *i;
-{
- if ((*i != 1) && (*i != 0))
- return EINVAL;
-
- pim_assert = *i;
-
- return 0;
-}
-
-/*
- * Get PIM assert processing global
- */
-static int
-get_assert(m)
- struct mbuf *m;
-{
- int *i;
-
- i = mtod(m, int *);
-
- *i = pim_assert;
-
- return 0;
-}
-
-/*
- * Add a vif to the vif table
- */
-static int
-add_vif(vifcp)
- register struct vifctl *vifcp;
-{
- register struct vif *vifp = viftable + vifcp->vifc_vifi;
- static struct sockaddr_in sin = {sizeof sin, AF_INET};
- struct ifaddr *ifa;
- struct ifnet *ifp;
- struct ifreq ifr;
- int error, s;
- struct tbf *v_tbf = tbftable + vifcp->vifc_vifi;
-
- if (vifcp->vifc_vifi >= MAXVIFS) return EINVAL;
- if (vifp->v_lcl_addr.s_addr != 0) return EADDRINUSE;
-
- /* Find the interface with an address in AF_INET family */
- sin.sin_addr = vifcp->vifc_lcl_addr;
- ifa = ifa_ifwithaddr((struct sockaddr *)&sin);
- if (ifa == 0) return EADDRNOTAVAIL;
- ifp = ifa->ifa_ifp;
-
- if (vifcp->vifc_flags & VIFF_TUNNEL) {
- if ((vifcp->vifc_flags & VIFF_SRCRT) == 0) {
- /*
- * An encapsulating tunnel is wanted. Tell ipip_input() to
- * start paying attention to encapsulated packets.
- */
- if (have_encap_tunnel == 0) {
- have_encap_tunnel = 1;
- for (s = 0; s < MAXVIFS; ++s) {
- multicast_decap_if[s].if_name = "mdecap";
- multicast_decap_if[s].if_unit = s;
- }
- }
- /*
- * Set interface to fake encapsulator interface
- */
- ifp = &multicast_decap_if[vifcp->vifc_vifi];
- /*
- * Prepare cached route entry
- */
- bzero(&vifp->v_route, sizeof(vifp->v_route));
- } else {
- log(LOG_ERR, "source routed tunnels not supported\n");
- return EOPNOTSUPP;
- }
- } else {
- /* Make sure the interface supports multicast */
- if ((ifp->if_flags & IFF_MULTICAST) == 0)
- return EOPNOTSUPP;
-
- /* Enable promiscuous reception of all IP multicasts from the if */
- ((struct sockaddr_in *)&(ifr.ifr_addr))->sin_family = AF_INET;
- ((struct sockaddr_in *)&(ifr.ifr_addr))->sin_addr.s_addr = INADDR_ANY;
- s = splnet();
- error = (*ifp->if_ioctl)(ifp, SIOCADDMULTI, (caddr_t)&ifr);
- splx(s);
- if (error)
- return error;
- }
-
- s = splnet();
- /* define parameters for the tbf structure */
- vifp->v_tbf = v_tbf;
- GET_TIME(vifp->v_tbf->tbf_last_pkt_t);
- vifp->v_tbf->tbf_n_tok = 0;
- vifp->v_tbf->tbf_q_len = 0;
- vifp->v_tbf->tbf_max_q_len = MAXQSIZE;
- vifp->v_tbf->tbf_q = vifp->v_tbf->tbf_t = NULL;
-
- vifp->v_flags = vifcp->vifc_flags;
- vifp->v_threshold = vifcp->vifc_threshold;
- vifp->v_lcl_addr = vifcp->vifc_lcl_addr;
- vifp->v_rmt_addr = vifcp->vifc_rmt_addr;
- vifp->v_ifp = ifp;
- /* scaling up here allows division by 1024 in critical code */
- vifp->v_rate_limit= vifcp->vifc_rate_limit * 1024 / 1000;
- vifp->v_rsvp_on = 0;
- vifp->v_rsvpd = NULL;
- /* initialize per vif pkt counters */
- vifp->v_pkt_in = 0;
- vifp->v_pkt_out = 0;
- vifp->v_bytes_in = 0;
- vifp->v_bytes_out = 0;
- splx(s);
-
- /* Adjust numvifs up if the vifi is higher than numvifs */
- if (numvifs <= vifcp->vifc_vifi) numvifs = vifcp->vifc_vifi + 1;
-
- if (mrtdebug)
- log(LOG_DEBUG, "add_vif #%d, lcladdr %x, %s %x, thresh %x, rate %d\n",
- vifcp->vifc_vifi,
- ntohl(vifcp->vifc_lcl_addr.s_addr),
- (vifcp->vifc_flags & VIFF_TUNNEL) ? "rmtaddr" : "mask",
- ntohl(vifcp->vifc_rmt_addr.s_addr),
- vifcp->vifc_threshold,
- vifcp->vifc_rate_limit);
-
- return 0;
-}
-
-/*
- * Delete a vif from the vif table
- */
-static int
-del_vif(vifip)
- vifi_t *vifip;
-{
- register struct vif *vifp = viftable + *vifip;
- register vifi_t vifi;
- register struct mbuf *m;
- struct ifnet *ifp;
- struct ifreq ifr;
- int s;
-
- if (*vifip >= numvifs) return EINVAL;
- if (vifp->v_lcl_addr.s_addr == 0) return EADDRNOTAVAIL;
-
- s = splnet();
-
- if (!(vifp->v_flags & VIFF_TUNNEL)) {
- ((struct sockaddr_in *)&(ifr.ifr_addr))->sin_family = AF_INET;
- ((struct sockaddr_in *)&(ifr.ifr_addr))->sin_addr.s_addr = INADDR_ANY;
- ifp = vifp->v_ifp;
- (*ifp->if_ioctl)(ifp, SIOCDELMULTI, (caddr_t)&ifr);
- }
-
- if (vifp == last_encap_vif) {
- last_encap_vif = 0;
- last_encap_src = 0;
- }
-
- /*
- * Free packets queued at the interface
- */
- while (vifp->v_tbf->tbf_q) {
- m = vifp->v_tbf->tbf_q;
- vifp->v_tbf->tbf_q = m->m_act;
- m_freem(m);
- }
-
- bzero((caddr_t)vifp->v_tbf, sizeof(*(vifp->v_tbf)));
- bzero((caddr_t)vifp, sizeof (*vifp));
-
- /* Adjust numvifs down */
- for (vifi = numvifs; vifi > 0; vifi--)
- if (viftable[vifi-1].v_lcl_addr.s_addr != 0) break;
- numvifs = vifi;
-
- splx(s);
-
- if (mrtdebug)
- log(LOG_DEBUG, "del_vif %d, numvifs %d\n", *vifip, numvifs);
-
- return 0;
-}
-
-/*
- * Add an mfc entry
- */
-static int
-add_mfc(mfccp)
- struct mfcctl *mfccp;
-{
- struct mfc *rt;
- register struct mbuf *mb_rt;
- u_long hash;
- struct mbuf *mb_ntry;
- struct rtdetq *rte;
- register u_short nstl;
- int s;
- int i;
-
- MFCFIND(mfccp->mfcc_origin.s_addr, mfccp->mfcc_mcastgrp.s_addr, rt);
-
- /* If an entry already exists, just update the fields */
- if (rt) {
- if (mrtdebug & DEBUG_MFC)
- log(LOG_DEBUG,"add_mfc update o %x g %x p %x\n",
- ntohl(mfccp->mfcc_origin.s_addr),
- ntohl(mfccp->mfcc_mcastgrp.s_addr),
- mfccp->mfcc_parent);
-
- s = splnet();
- rt->mfc_parent = mfccp->mfcc_parent;
- for (i = 0; i < numvifs; i++)
- rt->mfc_ttls[i] = mfccp->mfcc_ttls[i];
- splx(s);
- return 0;
- }
-
- /*
- * Find the entry for which the upcall was made and update
- */
- s = splnet();
- hash = MFCHASH(mfccp->mfcc_origin.s_addr, mfccp->mfcc_mcastgrp.s_addr);
- for (mb_rt = mfctable[hash], nstl = 0; mb_rt; mb_rt = mb_rt->m_next) {
-
- rt = mtod(mb_rt, struct mfc *);
- if ((rt->mfc_origin.s_addr == mfccp->mfcc_origin.s_addr) &&
- (rt->mfc_mcastgrp.s_addr == mfccp->mfcc_mcastgrp.s_addr) &&
- (mb_rt->m_act != NULL)) {
-
- if (nstl++)
- log(LOG_ERR, "add_mfc %s o %x g %x p %x dbx %x\n",
- "multiple kernel entries",
- ntohl(mfccp->mfcc_origin.s_addr),
- ntohl(mfccp->mfcc_mcastgrp.s_addr),
- mfccp->mfcc_parent, mb_rt->m_act);
-
- if (mrtdebug & DEBUG_MFC)
- log(LOG_DEBUG,"add_mfc o %x g %x p %x dbg %x\n",
- ntohl(mfccp->mfcc_origin.s_addr),
- ntohl(mfccp->mfcc_mcastgrp.s_addr),
- mfccp->mfcc_parent, mb_rt->m_act);
-
- rt->mfc_origin = mfccp->mfcc_origin;
- rt->mfc_mcastgrp = mfccp->mfcc_mcastgrp;
- rt->mfc_parent = mfccp->mfcc_parent;
- for (i = 0; i < numvifs; i++)
- rt->mfc_ttls[i] = mfccp->mfcc_ttls[i];
- /* initialize pkt counters per src-grp */
- rt->mfc_pkt_cnt = 0;
- rt->mfc_byte_cnt = 0;
- rt->mfc_wrong_if = 0;
- rt->mfc_last_assert.tv_sec = rt->mfc_last_assert.tv_usec = 0;
-
- rt->mfc_expire = 0; /* Don't clean this guy up */
- nexpire[hash]--;
-
- /* free packets Qed at the end of this entry */
- while (mb_rt->m_act) {
- mb_ntry = mb_rt->m_act;
- rte = mtod(mb_ntry, struct rtdetq *);
-/* #ifdef RSVP_ISI */
- ip_mdq(rte->m, rte->ifp, rt, -1);
-/* #endif */
- mb_rt->m_act = mb_ntry->m_act;
- m_freem(rte->m);
-#ifdef UPCALL_TIMING
- collate(&(rte->t));
-#endif /* UPCALL_TIMING */
- m_free(mb_ntry);
- }
- }
- }
-
- /*
- * It is possible that an entry is being inserted without an upcall
- */
- if (nstl == 0) {
- if (mrtdebug & DEBUG_MFC)
- log(LOG_DEBUG,"add_mfc no upcall h %d o %x g %x p %x\n",
- hash, ntohl(mfccp->mfcc_origin.s_addr),
- ntohl(mfccp->mfcc_mcastgrp.s_addr),
- mfccp->mfcc_parent);
-
- for (mb_rt = mfctable[hash]; mb_rt; mb_rt = mb_rt->m_next) {
-
- rt = mtod(mb_rt, struct mfc *);
- if ((rt->mfc_origin.s_addr == mfccp->mfcc_origin.s_addr) &&
- (rt->mfc_mcastgrp.s_addr == mfccp->mfcc_mcastgrp.s_addr)) {
-
- rt->mfc_origin = mfccp->mfcc_origin;
- rt->mfc_mcastgrp = mfccp->mfcc_mcastgrp;
- rt->mfc_parent = mfccp->mfcc_parent;
- for (i = 0; i < numvifs; i++)
- rt->mfc_ttls[i] = mfccp->mfcc_ttls[i];
- /* initialize pkt counters per src-grp */
- rt->mfc_pkt_cnt = 0;
- rt->mfc_byte_cnt = 0;
- rt->mfc_wrong_if = 0;
- rt->mfc_last_assert.tv_sec = rt->mfc_last_assert.tv_usec = 0;
- if (rt->mfc_expire)
- nexpire[hash]--;
- rt->mfc_expire = 0;
- }
- }
- if (mb_rt == NULL) {
- /* no upcall, so make a new entry */
- MGET(mb_rt, M_DONTWAIT, MT_MRTABLE);
- if (mb_rt == NULL) {
- splx(s);
- return ENOBUFS;
- }
-
- rt = mtod(mb_rt, struct mfc *);
-
- /* insert new entry at head of hash chain */
- rt->mfc_origin = mfccp->mfcc_origin;
- rt->mfc_mcastgrp = mfccp->mfcc_mcastgrp;
- rt->mfc_parent = mfccp->mfcc_parent;
- for (i = 0; i < numvifs; i++)
- rt->mfc_ttls[i] = mfccp->mfcc_ttls[i];
- /* initialize pkt counters per src-grp */
- rt->mfc_pkt_cnt = 0;
- rt->mfc_byte_cnt = 0;
- rt->mfc_wrong_if = 0;
- rt->mfc_last_assert.tv_sec = rt->mfc_last_assert.tv_usec = 0;
- rt->mfc_expire = 0;
-
- /* link into table */
- mb_rt->m_next = mfctable[hash];
- mfctable[hash] = mb_rt;
- mb_rt->m_act = NULL;
- }
- }
- splx(s);
- return 0;
-}
-
-#ifdef UPCALL_TIMING
-/*
- * collect delay statistics on the upcalls
- */
-static void collate(t)
-register struct timeval *t;
-{
- register u_long d;
- register struct timeval tp;
- register u_long delta;
-
- GET_TIME(tp);
-
- if (TV_LT(*t, tp))
- {
- TV_DELTA(tp, *t, delta);
-
- d = delta >> 10;
- if (d > 50)
- d = 50;
-
- ++upcall_data[d];
- }
-}
-#endif /* UPCALL_TIMING */
-
-/*
- * Delete an mfc entry
- */
-static int
-del_mfc(mfccp)
- struct mfcctl *mfccp;
-{
- struct in_addr origin;
- struct in_addr mcastgrp;
- struct mfc *rt;
- struct mbuf *mb_rt;
- struct mbuf **nptr;
- u_long hash;
- int s;
-
- origin = mfccp->mfcc_origin;
- mcastgrp = mfccp->mfcc_mcastgrp;
- hash = MFCHASH(origin.s_addr, mcastgrp.s_addr);
-
- if (mrtdebug & DEBUG_MFC)
- log(LOG_DEBUG,"del_mfc orig %x mcastgrp %x\n",
- ntohl(origin.s_addr), ntohl(mcastgrp.s_addr));
-
- s = splnet();
-
- nptr = &mfctable[hash];
- while ((mb_rt = *nptr) != NULL) {
- rt = mtod(mb_rt, struct mfc *);
- if (origin.s_addr == rt->mfc_origin.s_addr &&
- mcastgrp.s_addr == rt->mfc_mcastgrp.s_addr &&
- mb_rt->m_act == NULL)
- break;
-
- nptr = &mb_rt->m_next;
- }
- if (mb_rt == NULL) {
- splx(s);
- return EADDRNOTAVAIL;
- }
-
- MFREE(mb_rt, *nptr);
-
- splx(s);
-
- return 0;
-}
-
-/*
- * Send a message to mrouted on the multicast routing socket
- */
-static int
-socket_send(s, mm, src)
- struct socket *s;
- struct mbuf *mm;
- struct sockaddr_in *src;
-{
- if (s) {
- if (sbappendaddr(&s->so_rcv,
- (struct sockaddr *)src,
- mm, (struct mbuf *)0) != 0) {
- sorwakeup(s);
- return 0;
- }
- }
- m_freem(mm);
- return -1;
-}
-
-/*
- * IP multicast forwarding function. This function assumes that the packet
- * pointed to by "ip" has arrived on (or is about to be sent to) the interface
- * pointed to by "ifp", and the packet is to be relayed to other networks
- * that have members of the packet's destination IP multicast group.
- *
- * The packet is returned unscathed to the caller, unless it is
- * erroneous, in which case a non-zero return value tells the caller to
- * discard it.
- */
-
-#define IP_HDR_LEN 20 /* # bytes of fixed IP header (excluding options) */
-#define TUNNEL_LEN 12 /* # bytes of IP option for tunnel encapsulation */
-
-static int
-X_ip_mforward(ip, ifp, m, imo)
- register struct ip *ip;
- struct ifnet *ifp;
- struct mbuf *m;
- struct ip_moptions *imo;
-{
- register struct mfc *rt;
- register u_char *ipoptions;
- static struct sockaddr_in k_igmpsrc = { sizeof k_igmpsrc, AF_INET };
- static int srctun = 0;
- register struct mbuf *mm;
- int s;
- vifi_t vifi;
- struct vif *vifp;
-
- if (mrtdebug & DEBUG_FORWARD)
- log(LOG_DEBUG, "ip_mforward: src %x, dst %x, ifp %x\n",
- ntohl(ip->ip_src.s_addr), ntohl(ip->ip_dst.s_addr), ifp);
-
- if (ip->ip_hl < (IP_HDR_LEN + TUNNEL_LEN) >> 2 ||
- (ipoptions = (u_char *)(ip + 1))[1] != IPOPT_LSRR ) {
- /*
- * Packet arrived via a physical interface or
- * an encapsulated tunnel.
- */
- } else {
- /*
- * Packet arrived through a source-route tunnel.
- * Source-route tunnels are no longer supported.
- */
- if ((srctun++ % 1000) == 0)
- log(LOG_ERR, "ip_mforward: received source-routed packet from %x\n",
- ntohl(ip->ip_src.s_addr));
-
- return 1;
- }
-
- if ((imo) && ((vifi = imo->imo_multicast_vif) < numvifs)) {
- if (ip->ip_ttl < 255)
- ip->ip_ttl++; /* compensate for -1 in *_send routines */
- if (rsvpdebug && ip->ip_p == IPPROTO_RSVP) {
- vifp = viftable + vifi;
- printf("Sending IPPROTO_RSVP from %lx to %lx on vif %d (%s%s%d)\n",
- ntohl(ip->ip_src.s_addr), ntohl(ip->ip_dst.s_addr), vifi,
- (vifp->v_flags & VIFF_TUNNEL) ? "tunnel on " : "",
- vifp->v_ifp->if_name, vifp->v_ifp->if_unit);
- }
- return (ip_mdq(m, ifp, NULL, vifi));
- }
- if (rsvpdebug && ip->ip_p == IPPROTO_RSVP) {
- printf("Warning: IPPROTO_RSVP from %lx to %lx without vif option\n",
- ntohl(ip->ip_src.s_addr), ntohl(ip->ip_dst.s_addr));
- if(!imo)
- printf("In fact, no options were specified at all\n");
- }
-
- /*
- * Don't forward a packet with time-to-live of zero or one,
- * or a packet destined to a local-only group.
- */
- if (ip->ip_ttl <= 1 ||
- ntohl(ip->ip_dst.s_addr) <= INADDR_MAX_LOCAL_GROUP)
- return 0;
-
- /*
- * Determine forwarding vifs from the forwarding cache table
- */
- s = splnet();
- MFCFIND(ip->ip_src.s_addr, ip->ip_dst.s_addr, rt);
-
- /* Entry exists, so forward if necessary */
- if (rt != NULL) {
- splx(s);
- return (ip_mdq(m, ifp, rt, -1));
- } else {
- /*
- * If we don't have a route for packet's origin,
- * Make a copy of the packet &
- * send message to routing daemon
- */
-
- register struct mbuf *mb_rt;
- register struct mbuf *mb_ntry;
- register struct mbuf *mb0;
- register struct rtdetq *rte;
- register struct mbuf *rte_m;
- register u_long hash;
- register int npkts;
- int hlen = ip->ip_hl << 2;
-#ifdef UPCALL_TIMING
- struct timeval tp;
-
- GET_TIME(tp);
-#endif
-
- mrtstat.mrts_no_route++;
- if (mrtdebug & (DEBUG_FORWARD | DEBUG_MFC))
- log(LOG_DEBUG, "ip_mforward: no rte s %x g %x\n",
- ntohl(ip->ip_src.s_addr),
- ntohl(ip->ip_dst.s_addr));
-
- /*
- * Allocate mbufs early so that we don't do extra work if we are
- * just going to fail anyway. Make sure to pullup the header so
- * that other people can't step on it.
- */
- MGET(mb_ntry, M_DONTWAIT, MT_DATA);
- if (mb_ntry == NULL) {
- splx(s);
- return ENOBUFS;
- }
- mb0 = m_copy(m, 0, M_COPYALL);
- if (mb0 && (M_HASCL(mb0) || mb0->m_len < hlen))
- mb0 = m_pullup(mb0, hlen);
- if (mb0 == NULL) {
- m_free(mb_ntry);
- splx(s);
- return ENOBUFS;
- }
-
- /* is there an upcall waiting for this packet? */
- hash = MFCHASH(ip->ip_src.s_addr, ip->ip_dst.s_addr);
- for (mb_rt = mfctable[hash]; mb_rt; mb_rt = mb_rt->m_next) {
- rt = mtod(mb_rt, struct mfc *);
- if ((ip->ip_src.s_addr == rt->mfc_origin.s_addr) &&
- (ip->ip_dst.s_addr == rt->mfc_mcastgrp.s_addr) &&
- (mb_rt->m_act != NULL))
- break;
- }
-
- if (mb_rt == NULL) {
- int i;
- struct igmpmsg *im;
-
- /* no upcall, so make a new entry */
- MGET(mb_rt, M_DONTWAIT, MT_MRTABLE);
- if (mb_rt == NULL) {
- m_free(mb_ntry);
- m_freem(mb0);
- splx(s);
- return ENOBUFS;
- }
- /* Make a copy of the header to send to the user level process */
- mm = m_copy(mb0, 0, hlen);
- if (mm == NULL) {
- m_free(mb_ntry);
- m_freem(mb0);
- m_free(mb_rt);
- splx(s);
- return ENOBUFS;
- }
-
- /*
- * Send message to routing daemon to install
- * a route into the kernel table
- */
- k_igmpsrc.sin_addr = ip->ip_src;
-
- im = mtod(mm, struct igmpmsg *);
- im->im_msgtype = IGMPMSG_NOCACHE;
- im->im_mbz = 0;
-
- mrtstat.mrts_upcalls++;
-
- if (socket_send(ip_mrouter, mm, &k_igmpsrc) < 0) {
- log(LOG_WARNING, "ip_mforward: ip_mrouter socket queue full\n");
- ++mrtstat.mrts_upq_sockfull;
- m_free(mb_ntry);
- m_freem(mb0);
- m_free(mb_rt);
- splx(s);
- return ENOBUFS;
- }
-
- rt = mtod(mb_rt, struct mfc *);
-
- /* insert new entry at head of hash chain */
- rt->mfc_origin.s_addr = ip->ip_src.s_addr;
- rt->mfc_mcastgrp.s_addr = ip->ip_dst.s_addr;
- rt->mfc_expire = UPCALL_EXPIRE;
- nexpire[hash]++;
- for (i = 0; i < numvifs; i++)
- rt->mfc_ttls[i] = 0;
- rt->mfc_parent = -1;
-
- /* link into table */
- mb_rt->m_next = mfctable[hash];
- mfctable[hash] = mb_rt;
- mb_rt->m_act = NULL;
-
- rte_m = mb_rt;
- } else {
- /* determine if q has overflowed */
- for (rte_m = mb_rt, npkts = 0; rte_m->m_act; rte_m = rte_m->m_act)
- npkts++;
-
- if (npkts > MAX_UPQ) {
- mrtstat.mrts_upq_ovflw++;
- m_free(mb_ntry);
- m_freem(mb0);
- splx(s);
- return 0;
- }
- }
-
- mb_ntry->m_act = NULL;
- rte = mtod(mb_ntry, struct rtdetq *);
-
- rte->m = mb0;
- rte->ifp = ifp;
-#ifdef UPCALL_TIMING
- rte->t = tp;
-#endif
-
- /* Add this entry to the end of the queue */
- rte_m->m_act = mb_ntry;
-
- splx(s);
-
- return 0;
- }
-}
-
-#ifndef MROUTE_LKM
-int (*ip_mforward)(struct ip *, struct ifnet *, struct mbuf *,
- struct ip_moptions *) = X_ip_mforward;
-#endif
-
-/*
- * Clean up the cache entry if upcall is not serviced
- */
-static void
-expire_upcalls(void *unused)
-{
- struct mbuf *mb_rt, *m, **nptr;
- struct rtdetq *rte;
- struct mfc *mfc;
- int i;
- int s;
-
- s = splnet();
- for (i = 0; i < MFCTBLSIZ; i++) {
- if (nexpire[i] == 0)
- continue;
- nptr = &mfctable[i];
- for (mb_rt = *nptr; mb_rt != NULL; mb_rt = *nptr) {
- mfc = mtod(mb_rt, struct mfc *);
-
- /*
- * Skip real cache entries
- * Make sure it wasn't marked to not expire (shouldn't happen)
- * If it expires now
- */
- if (mb_rt->m_act != NULL &&
- mfc->mfc_expire != 0 &&
- --mfc->mfc_expire == 0) {
- if (mrtdebug & DEBUG_EXPIRE)
- log(LOG_DEBUG, "expire_upcalls: expiring (%x %x)\n",
- ntohl(mfc->mfc_origin.s_addr),
- ntohl(mfc->mfc_mcastgrp.s_addr));
- /*
- * drop all the packets
- * free the mbuf with the pkt, if, timing info
- */
- while (mb_rt->m_act) {
- m = mb_rt->m_act;
- mb_rt->m_act = m->m_act;
-
- rte = mtod(m, struct rtdetq *);
- m_freem(rte->m);
- m_free(m);
- }
- ++mrtstat.mrts_cache_cleanups;
- nexpire[i]--;
-
- MFREE(mb_rt, *nptr);
- } else {
- nptr = &mb_rt->m_next;
- }
- }
- }
- splx(s);
- timeout(expire_upcalls, (caddr_t)NULL, EXPIRE_TIMEOUT);
-}
-
-/*
- * Packet forwarding routine once entry in the cache is made
- */
-static int
-ip_mdq(m, ifp, rt, xmt_vif)
- register struct mbuf *m;
- register struct ifnet *ifp;
- register struct mfc *rt;
- register vifi_t xmt_vif;
-{
- register struct ip *ip = mtod(m, struct ip *);
- register vifi_t vifi;
- register struct vif *vifp;
- register int plen = ntohs(ip->ip_len);
-
-/*
- * Macro to send packet on vif. Since RSVP packets don't get counted on
- * input, they shouldn't get counted on output, so statistics keeping is
- * seperate.
- */
-#define MC_SEND(ip,vifp,m) { \
- if ((vifp)->v_flags & VIFF_TUNNEL) \
- encap_send((ip), (vifp), (m)); \
- else \
- phyint_send((ip), (vifp), (m)); \
-}
-
- /*
- * If xmt_vif is not -1, send on only the requested vif.
- *
- * (since vifi_t is u_short, -1 becomes MAXUSHORT, which > numvifs.)
- */
- if (xmt_vif < numvifs) {
- MC_SEND(ip, viftable + xmt_vif, m);
- return 1;
- }
-
- /*
- * Don't forward if it didn't arrive from the parent vif for its origin.
- */
- vifi = rt->mfc_parent;
- if ((vifi >= numvifs) || (viftable[vifi].v_ifp != ifp)) {
- /* came in the wrong interface */
- if (mrtdebug & DEBUG_FORWARD)
- log(LOG_DEBUG, "wrong if: ifp %x vifi %d vififp %x\n",
- ifp, vifi, viftable[vifi].v_ifp);
- ++mrtstat.mrts_wrong_if;
- ++rt->mfc_wrong_if;
- /*
- * If we are doing PIM assert processing, and we are forwarding
- * packets on this interface, and it is a broadcast medium
- * interface (and not a tunnel), send a message to the routing daemon.
- */
- if (pim_assert && rt->mfc_ttls[vifi] &&
- (ifp->if_flags & IFF_BROADCAST) &&
- !(viftable[vifi].v_flags & VIFF_TUNNEL)) {
- struct sockaddr_in k_igmpsrc;
- struct mbuf *mm;
- struct igmpmsg *im;
- int hlen = ip->ip_hl << 2;
- struct timeval now;
- register u_long delta;
-
- GET_TIME(now);
-
- TV_DELTA(rt->mfc_last_assert, now, delta);
-
- if (delta > ASSERT_MSG_TIME) {
- mm = m_copy(m, 0, hlen);
- if (mm && (M_HASCL(mm) || mm->m_len < hlen))
- mm = m_pullup(mm, hlen);
- if (mm == NULL) {
- return ENOBUFS;
- }
-
- rt->mfc_last_assert = now;
-
- im = mtod(mm, struct igmpmsg *);
- im->im_msgtype = IGMPMSG_WRONGVIF;
- im->im_mbz = 0;
- im->im_vif = vifi;
-
- k_igmpsrc.sin_addr = im->im_src;
-
- socket_send(ip_mrouter, mm, &k_igmpsrc);
- }
- }
- return 0;
- }
-
- /* If I sourced this packet, it counts as output, else it was input. */
- if (ip->ip_src.s_addr == viftable[vifi].v_lcl_addr.s_addr) {
- viftable[vifi].v_pkt_out++;
- viftable[vifi].v_bytes_out += plen;
- } else {
- viftable[vifi].v_pkt_in++;
- viftable[vifi].v_bytes_in += plen;
- }
- rt->mfc_pkt_cnt++;
- rt->mfc_byte_cnt += plen;
-
- /*
- * For each vif, decide if a copy of the packet should be forwarded.
- * Forward if:
- * - the ttl exceeds the vif's threshold
- * - there are group members downstream on interface
- */
- for (vifp = viftable, vifi = 0; vifi < numvifs; vifp++, vifi++)
- if ((rt->mfc_ttls[vifi] > 0) &&
- (ip->ip_ttl > rt->mfc_ttls[vifi])) {
- vifp->v_pkt_out++;
- vifp->v_bytes_out += plen;
- MC_SEND(ip, vifp, m);
- }
-
- return 0;
-}
-
-/*
- * check if a vif number is legal/ok. This is used by ip_output, to export
- * numvifs there,
- */
-static int
-X_legal_vif_num(vif)
- int vif;
-{
- if (vif >= 0 && vif < numvifs)
- return(1);
- else
- return(0);
-}
-
-#ifndef MROUTE_LKM
-int (*legal_vif_num)(int) = X_legal_vif_num;
-#endif
-
-/*
- * Return the local address used by this vif
- */
-static u_long
-X_ip_mcast_src(vifi)
- int vifi;
-{
- if (vifi >= 0 && vifi < numvifs)
- return viftable[vifi].v_lcl_addr.s_addr;
- else
- return INADDR_ANY;
-}
-
-#ifndef MROUTE_LKM
-u_long (*ip_mcast_src)(int) = X_ip_mcast_src;
-#endif
-
-static void
-phyint_send(ip, vifp, m)
- struct ip *ip;
- struct vif *vifp;
- struct mbuf *m;
-{
- register struct mbuf *mb_copy;
- register int hlen = ip->ip_hl << 2;
-
- /*
- * Make a new reference to the packet; make sure that
- * the IP header is actually copied, not just referenced,
- * so that ip_output() only scribbles on the copy.
- */
- mb_copy = m_copy(m, 0, M_COPYALL);
- if (mb_copy && (M_HASCL(mb_copy) || mb_copy->m_len < hlen))
- mb_copy = m_pullup(mb_copy, hlen);
- if (mb_copy == NULL)
- return;
-
- if (vifp->v_rate_limit <= 0)
- tbf_send_packet(vifp, mb_copy);
- else
- tbf_control(vifp, mb_copy, mtod(mb_copy, struct ip *), ip->ip_len);
-}
-
-static void
-encap_send(ip, vifp, m)
- register struct ip *ip;
- register struct vif *vifp;
- register struct mbuf *m;
-{
- register struct mbuf *mb_copy;
- register struct ip *ip_copy;
- register int i, len = ip->ip_len;
-
- /*
- * copy the old packet & pullup it's IP header into the
- * new mbuf so we can modify it. Try to fill the new
- * mbuf since if we don't the ethernet driver will.
- */
- MGETHDR(mb_copy, M_DONTWAIT, MT_HEADER);
- if (mb_copy == NULL)
- return;
- mb_copy->m_data += max_linkhdr;
- mb_copy->m_len = sizeof(multicast_encap_iphdr);
-
- if ((mb_copy->m_next = m_copy(m, 0, M_COPYALL)) == NULL) {
- m_freem(mb_copy);
- return;
- }
- i = MHLEN - M_LEADINGSPACE(mb_copy);
- if (i > len)
- i = len;
- mb_copy = m_pullup(mb_copy, i);
- if (mb_copy == NULL)
- return;
- mb_copy->m_pkthdr.len = len + sizeof(multicast_encap_iphdr);
-
- /*
- * fill in the encapsulating IP header.
- */
- ip_copy = mtod(mb_copy, struct ip *);
- *ip_copy = multicast_encap_iphdr;
- ip_copy->ip_id = htons(ip_id++);
- ip_copy->ip_len += len;
- ip_copy->ip_src = vifp->v_lcl_addr;
- ip_copy->ip_dst = vifp->v_rmt_addr;
-
- /*
- * turn the encapsulated IP header back into a valid one.
- */
- ip = (struct ip *)((caddr_t)ip_copy + sizeof(multicast_encap_iphdr));
- --ip->ip_ttl;
- HTONS(ip->ip_len);
- HTONS(ip->ip_off);
- ip->ip_sum = 0;
- mb_copy->m_data += sizeof(multicast_encap_iphdr);
- ip->ip_sum = in_cksum(mb_copy, ip->ip_hl << 2);
- mb_copy->m_data -= sizeof(multicast_encap_iphdr);
-
- if (vifp->v_rate_limit <= 0)
- tbf_send_packet(vifp, mb_copy);
- else
- tbf_control(vifp, mb_copy, ip, ip_copy->ip_len);
-}
-
-/*
- * De-encapsulate a packet and feed it back through ip input (this
- * routine is called whenever IP gets a packet with proto type
- * ENCAP_PROTO and a local destination address).
- */
-void
-#ifdef MROUTE_LKM
-X_ipip_input(m, iphlen)
-#else
-ipip_input(m, iphlen)
-#endif
- register struct mbuf *m;
- int iphlen;
-{
- struct ifnet *ifp = m->m_pkthdr.rcvif;
- register struct ip *ip = mtod(m, struct ip *);
- register int hlen = ip->ip_hl << 2;
- register int s;
- register struct ifqueue *ifq;
- register struct vif *vifp;
-
- if (!have_encap_tunnel) {
- rip_input(m, iphlen);
- return;
- }
- /*
- * dump the packet if it's not to a multicast destination or if
- * we don't have an encapsulating tunnel with the source.
- * Note: This code assumes that the remote site IP address
- * uniquely identifies the tunnel (i.e., that this site has
- * at most one tunnel with the remote site).
- */
- if (! IN_MULTICAST(ntohl(((struct ip *)((char *)ip + hlen))->ip_dst.s_addr))) {
- ++mrtstat.mrts_bad_tunnel;
- m_freem(m);
- return;
- }
- if (ip->ip_src.s_addr != last_encap_src) {
- register struct vif *vife;
-
- vifp = viftable;
- vife = vifp + numvifs;
- last_encap_src = ip->ip_src.s_addr;
- last_encap_vif = 0;
- for ( ; vifp < vife; ++vifp)
- if (vifp->v_rmt_addr.s_addr == ip->ip_src.s_addr) {
- if ((vifp->v_flags & (VIFF_TUNNEL|VIFF_SRCRT))
- == VIFF_TUNNEL)
- last_encap_vif = vifp;
- break;
- }
- }
- if ((vifp = last_encap_vif) == 0) {
- last_encap_src = 0;
- mrtstat.mrts_cant_tunnel++; /*XXX*/
- m_freem(m);
- if (mrtdebug)
- log(LOG_DEBUG, "ip_mforward: no tunnel with %x\n",
- ntohl(ip->ip_src.s_addr));
- return;
- }
- ifp = vifp->v_ifp;
-
- if (hlen > IP_HDR_LEN)
- ip_stripoptions(m, (struct mbuf *) 0);
- m->m_data += IP_HDR_LEN;
- m->m_len -= IP_HDR_LEN;
- m->m_pkthdr.len -= IP_HDR_LEN;
- m->m_pkthdr.rcvif = ifp;
-
- ifq = &ipintrq;
- s = splimp();
- if (IF_QFULL(ifq)) {
- IF_DROP(ifq);
- m_freem(m);
- } else {
- IF_ENQUEUE(ifq, m);
- /*
- * normally we would need a "schednetisr(NETISR_IP)"
- * here but we were called by ip_input and it is going
- * to loop back & try to dequeue the packet we just
- * queued as soon as we return so we avoid the
- * unnecessary software interrrupt.
- */
- }
- splx(s);
-}
-
-/*
- * Token bucket filter module
- */
-
-static void
-tbf_control(vifp, m, ip, p_len)
- register struct vif *vifp;
- register struct mbuf *m;
- register struct ip *ip;
- register u_long p_len;
-{
- register struct tbf *t = vifp->v_tbf;
-
- if (p_len > MAX_BKT_SIZE) {
- /* drop if packet is too large */
- mrtstat.mrts_pkt2large++;
- m_freem(m);
- return;
- }
-
- tbf_update_tokens(vifp);
-
- /* if there are enough tokens,
- * and the queue is empty,
- * send this packet out
- */
-
- if (t->tbf_q_len == 0) {
- /* queue empty, send packet if enough tokens */
- if (p_len <= t->tbf_n_tok) {
- t->tbf_n_tok -= p_len;
- tbf_send_packet(vifp, m);
- } else {
- /* queue packet and timeout till later */
- tbf_queue(vifp, m);
- timeout(tbf_reprocess_q, (caddr_t)vifp, TBF_REPROCESS);
- }
- } else if (t->tbf_q_len < t->tbf_max_q_len) {
- /* finite queue length, so queue pkts and process queue */
- tbf_queue(vifp, m);
- tbf_process_q(vifp);
- } else {
- /* queue length too much, try to dq and queue and process */
- if (!tbf_dq_sel(vifp, ip)) {
- mrtstat.mrts_q_overflow++;
- m_freem(m);
- return;
- } else {
- tbf_queue(vifp, m);
- tbf_process_q(vifp);
- }
- }
- return;
-}
-
-/*
- * adds a packet to the queue at the interface
- */
-static void
-tbf_queue(vifp, m)
- register struct vif *vifp;
- register struct mbuf *m;
-{
- register int s = splnet();
- register struct tbf *t = vifp->v_tbf;
-
- if (t->tbf_t == NULL) {
- /* Queue was empty */
- t->tbf_q = m;
- } else {
- /* Insert at tail */
- t->tbf_t->m_act = m;
- }
-
- /* Set new tail pointer */
- t->tbf_t = m;
-
-#ifdef DIAGNOSTIC
- /* Make sure we didn't get fed a bogus mbuf */
- if (m->m_act)
- panic("tbf_queue: m_act");
-#endif
- m->m_act = NULL;
-
- t->tbf_q_len++;
-
- splx(s);
-}
-
-
-/*
- * processes the queue at the interface
- */
-static void
-tbf_process_q(vifp)
- register struct vif *vifp;
-{
- register struct mbuf *m;
- register int len;
- register int s = splnet();
- register struct tbf *t = vifp->v_tbf;
-
- /* loop through the queue at the interface and send as many packets
- * as possible
- */
- while (t->tbf_q_len > 0) {
- m = t->tbf_q;
-
- len = mtod(m, struct ip *)->ip_len;
-
- /* determine if the packet can be sent */
- if (len <= t->tbf_n_tok) {
- /* if so,
- * reduce no of tokens, dequeue the packet,
- * send the packet.
- */
- t->tbf_n_tok -= len;
-
- t->tbf_q = m->m_act;
- if (--t->tbf_q_len == 0)
- t->tbf_t = NULL;
-
- m->m_act = NULL;
- tbf_send_packet(vifp, m);
-
- } else break;
- }
- splx(s);
-}
-
-static void
-tbf_reprocess_q(xvifp)
- void *xvifp;
-{
- register struct vif *vifp = xvifp;
- if (ip_mrouter == NULL)
- return;
-
- tbf_update_tokens(vifp);
-
- tbf_process_q(vifp);
-
- if (vifp->v_tbf->tbf_q_len)
- timeout(tbf_reprocess_q, (caddr_t)vifp, TBF_REPROCESS);
-}
-
-/* function that will selectively discard a member of the queue
- * based on the precedence value and the priority
- */
-static int
-tbf_dq_sel(vifp, ip)
- register struct vif *vifp;
- register struct ip *ip;
-{
- register int s = splnet();
- register u_int p;
- register struct mbuf *m, *last;
- register struct mbuf **np;
- register struct tbf *t = vifp->v_tbf;
-
- p = priority(vifp, ip);
-
- np = &t->tbf_q;
- last = NULL;
- while ((m = *np) != NULL) {
- if (p > priority(vifp, mtod(m, struct ip *))) {
- *np = m->m_act;
- /* If we're removing the last packet, fix the tail pointer */
- if (m == t->tbf_t)
- t->tbf_t = last;
- m_freem(m);
- /* it's impossible for the queue to be empty, but
- * we check anyway. */
- if (--t->tbf_q_len == 0)
- t->tbf_t = NULL;
- splx(s);
- mrtstat.mrts_drop_sel++;
- return(1);
- }
- np = &m->m_act;
- last = m;
- }
- splx(s);
- return(0);
-}
-
-static void
-tbf_send_packet(vifp, m)
- register struct vif *vifp;
- register struct mbuf *m;
-{
- struct ip_moptions imo;
- int error;
- static struct route ro;
- int s = splnet();
-
- if (vifp->v_flags & VIFF_TUNNEL) {
- /* If tunnel options */
- ip_output(m, (struct mbuf *)0, &vifp->v_route,
- IP_FORWARDING, (struct ip_moptions *)0);
- } else {
- imo.imo_multicast_ifp = vifp->v_ifp;
- imo.imo_multicast_ttl = mtod(m, struct ip *)->ip_ttl - 1;
- imo.imo_multicast_loop = 1;
- imo.imo_multicast_vif = -1;
-
- /*
- * Re-entrancy should not be a problem here, because
- * the packets that we send out and are looped back at us
- * should get rejected because they appear to come from
- * the loopback interface, thus preventing looping.
- */
- error = ip_output(m, (struct mbuf *)0, &ro,
- IP_FORWARDING, &imo);
-
- if (mrtdebug & DEBUG_XMIT)
- log(LOG_DEBUG, "phyint_send on vif %d err %d\n",
- vifp - viftable, error);
- }
- splx(s);
-}
-
-/* determine the current time and then
- * the elapsed time (between the last time and time now)
- * in milliseconds & update the no. of tokens in the bucket
- */
-static void
-tbf_update_tokens(vifp)
- register struct vif *vifp;
-{
- struct timeval tp;
- register u_long tm;
- register int s = splnet();
- register struct tbf *t = vifp->v_tbf;
-
- GET_TIME(tp);
-
- TV_DELTA(tp, t->tbf_last_pkt_t, tm);
-
- /*
- * This formula is actually
- * "time in seconds" * "bytes/second".
- *
- * (tm / 1000000) * (v_rate_limit * 1000 * (1000/1024) / 8)
- *
- * The (1000/1024) was introduced in add_vif to optimize
- * this divide into a shift.
- */
- t->tbf_n_tok += tm * vifp->v_rate_limit / 1024 / 8;
- t->tbf_last_pkt_t = tp;
-
- if (t->tbf_n_tok > MAX_BKT_SIZE)
- t->tbf_n_tok = MAX_BKT_SIZE;
-
- splx(s);
-}
-
-static int
-priority(vifp, ip)
- register struct vif *vifp;
- register struct ip *ip;
-{
- register int prio;
-
- /* temporary hack; may add general packet classifier some day */
-
- /*
- * The UDP port space is divided up into four priority ranges:
- * [0, 16384) : unclassified - lowest priority
- * [16384, 32768) : audio - highest priority
- * [32768, 49152) : whiteboard - medium priority
- * [49152, 65536) : video - low priority
- */
- if (ip->ip_p == IPPROTO_UDP) {
- struct udphdr *udp = (struct udphdr *)(((char *)ip) + (ip->ip_hl << 2));
- switch (ntohs(udp->uh_dport) & 0xc000) {
- case 0x4000:
- prio = 70;
- break;
- case 0x8000:
- prio = 60;
- break;
- case 0xc000:
- prio = 55;
- break;
- default:
- prio = 50;
- break;
- }
- if (tbfdebug > 1)
- log(LOG_DEBUG, "port %x prio%d\n", ntohs(udp->uh_dport), prio);
- } else {
- prio = 50;
- }
- return prio;
-}
-
-/*
- * End of token bucket filter modifications
- */
-
-int
-ip_rsvp_vif_init(so, m)
- struct socket *so;
- struct mbuf *m;
-{
- int i;
- register int s;
-
- if (rsvpdebug)
- printf("ip_rsvp_vif_init: so_type = %d, pr_protocol = %d\n",
- so->so_type, so->so_proto->pr_protocol);
-
- if (so->so_type != SOCK_RAW || so->so_proto->pr_protocol != IPPROTO_RSVP)
- return EOPNOTSUPP;
-
- /* Check mbuf. */
- if (m == NULL || m->m_len != sizeof(int)) {
- return EINVAL;
- }
- i = *(mtod(m, int *));
-
- if (rsvpdebug)
- printf("ip_rsvp_vif_init: vif = %d rsvp_on = %d\n",i,rsvp_on);
-
- s = splnet();
-
- /* Check vif. */
- if (!legal_vif_num(i)) {
- splx(s);
- return EADDRNOTAVAIL;
- }
-
- /* Check if socket is available. */
- if (viftable[i].v_rsvpd != NULL) {
- splx(s);
- return EADDRINUSE;
- }
-
- viftable[i].v_rsvpd = so;
- /* This may seem silly, but we need to be sure we don't over-increment
- * the RSVP counter, in case something slips up.
- */
- if (!viftable[i].v_rsvp_on) {
- viftable[i].v_rsvp_on = 1;
- rsvp_on++;
- }
-
- splx(s);
- return 0;
-}
-
-int
-ip_rsvp_vif_done(so, m)
- struct socket *so;
- struct mbuf *m;
-{
- int i;
- register int s;
-
- if (rsvpdebug)
- printf("ip_rsvp_vif_done: so_type = %d, pr_protocol = %d\n",
- so->so_type, so->so_proto->pr_protocol);
-
- if (so->so_type != SOCK_RAW || so->so_proto->pr_protocol != IPPROTO_RSVP)
- return EOPNOTSUPP;
-
- /* Check mbuf. */
- if (m == NULL || m->m_len != sizeof(int)) {
- return EINVAL;
- }
- i = *(mtod(m, int *));
-
- s = splnet();
-
- /* Check vif. */
- if (!legal_vif_num(i)) {
- splx(s);
- return EADDRNOTAVAIL;
- }
-
- if (rsvpdebug)
- printf("ip_rsvp_vif_done: v_rsvpd = %p so = %p\n",
- viftable[i].v_rsvpd, so);
-
- viftable[i].v_rsvpd = NULL;
- /* This may seem silly, but we need to be sure we don't over-decrement
- * the RSVP counter, in case something slips up.
- */
- if (viftable[i].v_rsvp_on) {
- viftable[i].v_rsvp_on = 0;
- rsvp_on--;
- }
-
- splx(s);
- return 0;
-}
-
-void
-ip_rsvp_force_done(so)
- struct socket *so;
-{
- int vifi;
- register int s;
-
- /* Don't bother if it is not the right type of socket. */
- if (so->so_type != SOCK_RAW || so->so_proto->pr_protocol != IPPROTO_RSVP)
- return;
-
- s = splnet();
-
- /* The socket may be attached to more than one vif...this
- * is perfectly legal.
- */
- for (vifi = 0; vifi < numvifs; vifi++) {
- if (viftable[vifi].v_rsvpd == so) {
- viftable[vifi].v_rsvpd = NULL;
- /* This may seem silly, but we need to be sure we don't
- * over-decrement the RSVP counter, in case something slips up.
- */
- if (viftable[vifi].v_rsvp_on) {
- viftable[vifi].v_rsvp_on = 0;
- rsvp_on--;
- }
- }
- }
-
- splx(s);
- return;
-}
-
-void
-rsvp_input(m, iphlen)
- struct mbuf *m;
- int iphlen;
-{
- int vifi;
- register struct ip *ip = mtod(m, struct ip *);
- static struct sockaddr_in rsvp_src = { sizeof rsvp_src, AF_INET };
- register int s;
- struct ifnet *ifp;
-
- if (rsvpdebug)
- printf("rsvp_input: rsvp_on %d\n",rsvp_on);
-
- /* Can still get packets with rsvp_on = 0 if there is a local member
- * of the group to which the RSVP packet is addressed. But in this
- * case we want to throw the packet away.
- */
- if (!rsvp_on) {
- m_freem(m);
- return;
- }
-
- /* If the old-style non-vif-associated socket is set, then use
- * it and ignore the new ones.
- */
- if (ip_rsvpd != NULL) {
- if (rsvpdebug)
- printf("rsvp_input: Sending packet up old-style socket\n");
- rip_input(m, iphlen);
- return;
- }
-
- s = splnet();
-
- if (rsvpdebug)
- printf("rsvp_input: check vifs\n");
-
-#ifdef DIAGNOSTIC
- if (!(m->m_flags & M_PKTHDR))
- panic("rsvp_input no hdr");
-#endif
-
- ifp = m->m_pkthdr.rcvif;
- /* Find which vif the packet arrived on. */
- for (vifi = 0; vifi < numvifs; vifi++) {
- if (viftable[vifi].v_ifp == ifp)
- break;
- }
-
- if (vifi == numvifs) {
- /* Can't find vif packet arrived on. Drop packet. */
- if (rsvpdebug)
- printf("rsvp_input: Can't find vif for packet...dropping it.\n");
- m_freem(m);
- splx(s);
- return;
- }
-
- if (rsvpdebug)
- printf("rsvp_input: check socket\n");
-
- if (viftable[vifi].v_rsvpd == NULL) {
- /* drop packet, since there is no specific socket for this
- * interface */
- if (rsvpdebug)
- printf("rsvp_input: No socket defined for vif %d\n",vifi);
- m_freem(m);
- splx(s);
- return;
- }
- rsvp_src.sin_addr = ip->ip_src;
-
- if (rsvpdebug && m)
- printf("rsvp_input: m->m_len = %d, sbspace() = %ld\n",
- m->m_len,sbspace(&(viftable[vifi].v_rsvpd->so_rcv)));
-
- if (socket_send(viftable[vifi].v_rsvpd, m, &rsvp_src) < 0)
- if (rsvpdebug)
- printf("rsvp_input: Failed to append to socket\n");
- else
- if (rsvpdebug)
- printf("rsvp_input: send packet up\n");
-
- splx(s);
-}
-
-#ifdef MROUTE_LKM
-#include <sys/conf.h>
-#include <sys/exec.h>
-#include <sys/sysent.h>
-#include <sys/lkm.h>
-
-MOD_MISC("ip_mroute_mod")
-
-static int
-ip_mroute_mod_handle(struct lkm_table *lkmtp, int cmd)
-{
- int i;
- struct lkm_misc *args = lkmtp->private.lkm_misc;
- int err = 0;
-
- switch(cmd) {
- static int (*old_ip_mrouter_cmd)();
- static int (*old_ip_mrouter_done)();
- static int (*old_ip_mforward)();
- static int (*old_mrt_ioctl)();
- static void (*old_proto4_input)();
- static int (*old_legal_vif_num)();
- extern struct protosw inetsw[];
-
- case LKM_E_LOAD:
- if(lkmexists(lkmtp) || ip_mrtproto)
- return(EEXIST);
- old_ip_mrouter_cmd = ip_mrouter_cmd;
- ip_mrouter_cmd = X_ip_mrouter_cmd;
- old_ip_mrouter_done = ip_mrouter_done;
- ip_mrouter_done = X_ip_mrouter_done;
- old_ip_mforward = ip_mforward;
- ip_mforward = X_ip_mforward;
- old_mrt_ioctl = mrt_ioctl;
- mrt_ioctl = X_mrt_ioctl;
- old_proto4_input = inetsw[ip_protox[ENCAP_PROTO]].pr_input;
- inetsw[ip_protox[ENCAP_PROTO]].pr_input = X_ipip_input;
- old_legal_vif_num = legal_vif_num;
- legal_vif_num = X_legal_vif_num;
- ip_mrtproto = IGMP_DVMRP;
-
- printf("\nIP multicast routing loaded\n");
- break;
-
- case LKM_E_UNLOAD:
- if (ip_mrouter)
- return EINVAL;
-
- ip_mrouter_cmd = old_ip_mrouter_cmd;
- ip_mrouter_done = old_ip_mrouter_done;
- ip_mforward = old_ip_mforward;
- mrt_ioctl = old_mrt_ioctl;
- inetsw[ip_protox[ENCAP_PROTO]].pr_input = old_proto4_input;
- legal_vif_num = old_legal_vif_num;
- ip_mrtproto = 0;
- break;
-
- default:
- err = EINVAL;
- break;
- }
-
- return(err);
-}
-
-int
-ip_mroute_mod(struct lkm_table *lkmtp, int cmd, int ver) {
- DISPATCH(lkmtp, cmd, ver, ip_mroute_mod_handle, ip_mroute_mod_handle,
- nosys);
-}
-
-#endif /* MROUTE_LKM */
-#endif /* MROUTING */
diff --git a/c/src/exec/libnetworking/netinet/ip_mroute.h b/c/src/exec/libnetworking/netinet/ip_mroute.h
deleted file mode 100644
index 5ddd6799d2..0000000000
--- a/c/src/exec/libnetworking/netinet/ip_mroute.h
+++ /dev/null
@@ -1,262 +0,0 @@
-/*
- * Copyright (c) 1989 Stephen Deering.
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Stephen Deering of Stanford University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ip_mroute.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _NETINET_IP_MROUTE_H_
-#define _NETINET_IP_MROUTE_H_
-
-/*
- * Definitions for IP multicast forwarding.
- *
- * Written by David Waitzman, BBN Labs, August 1988.
- * Modified by Steve Deering, Stanford, February 1989.
- * Modified by Ajit Thyagarajan, PARC, August 1993.
- * Modified by Ajit Thyagarajan, PARC, August 1994.
- *
- * MROUTING Revision: 3.3.1.3
- */
-
-
-/*
- * Multicast Routing set/getsockopt commands.
- */
-#define MRT_INIT 100 /* initialize forwarder */
-#define MRT_DONE 101 /* shut down forwarder */
-#define MRT_ADD_VIF 102 /* create virtual interface */
-#define MRT_DEL_VIF 103 /* delete virtual interface */
-#define MRT_ADD_MFC 104 /* insert forwarding cache entry */
-#define MRT_DEL_MFC 105 /* delete forwarding cache entry */
-#define MRT_VERSION 106 /* get kernel version number */
-#define MRT_ASSERT 107 /* enable PIM assert processing */
-
-
-#define GET_TIME(t) microtime(&t)
-
-/*
- * Types and macros for handling bitmaps with one bit per virtual interface.
- */
-#define MAXVIFS 32
-typedef u_long vifbitmap_t;
-typedef u_short vifi_t; /* type of a vif index */
-#define ALL_VIFS (vifi_t)-1
-
-#define VIFM_SET(n, m) ((m) |= (1 << (n)))
-#define VIFM_CLR(n, m) ((m) &= ~(1 << (n)))
-#define VIFM_ISSET(n, m) ((m) & (1 << (n)))
-#define VIFM_CLRALL(m) ((m) = 0x00000000)
-#define VIFM_COPY(mfrom, mto) ((mto) = (mfrom))
-#define VIFM_SAME(m1, m2) ((m1) == (m2))
-
-
-/*
- * Argument structure for MRT_ADD_VIF.
- * (MRT_DEL_VIF takes a single vifi_t argument.)
- */
-struct vifctl {
- vifi_t vifc_vifi; /* the index of the vif to be added */
- u_char vifc_flags; /* VIFF_ flags defined below */
- u_char vifc_threshold; /* min ttl required to forward on vif */
- u_int vifc_rate_limit; /* max rate */
- struct in_addr vifc_lcl_addr; /* local interface address */
- struct in_addr vifc_rmt_addr; /* remote address (tunnels only) */
-};
-
-#define VIFF_TUNNEL 0x1 /* vif represents a tunnel end-point */
-#define VIFF_SRCRT 0x2 /* tunnel uses IP source routing */
-
-/*
- * Argument structure for MRT_ADD_MFC and MRT_DEL_MFC
- * (mfcc_tos to be added at a future point)
- */
-struct mfcctl {
- struct in_addr mfcc_origin; /* ip origin of mcasts */
- struct in_addr mfcc_mcastgrp; /* multicast group associated*/
- vifi_t mfcc_parent; /* incoming vif */
- u_char mfcc_ttls[MAXVIFS]; /* forwarding ttls on vifs */
-};
-
-/*
- * The kernel's multicast routing statistics.
- */
-struct mrtstat {
- u_long mrts_mfc_lookups; /* # forw. cache hash table hits */
- u_long mrts_mfc_misses; /* # forw. cache hash table misses */
- u_long mrts_upcalls; /* # calls to mrouted */
- u_long mrts_no_route; /* no route for packet's origin */
- u_long mrts_bad_tunnel; /* malformed tunnel options */
- u_long mrts_cant_tunnel; /* no room for tunnel options */
- u_long mrts_wrong_if; /* arrived on wrong interface */
- u_long mrts_upq_ovflw; /* upcall Q overflow */
- u_long mrts_cache_cleanups; /* # entries with no upcalls */
- u_long mrts_drop_sel; /* pkts dropped selectively */
- u_long mrts_q_overflow; /* pkts dropped - Q overflow */
- u_long mrts_pkt2large; /* pkts dropped - size > BKT SIZE */
- u_long mrts_upq_sockfull; /* upcalls dropped - socket full */
-};
-
-/*
- * Argument structure used by mrouted to get src-grp pkt counts
- */
-struct sioc_sg_req {
- struct in_addr src;
- struct in_addr grp;
- u_long pktcnt;
- u_long bytecnt;
- u_long wrong_if;
-};
-
-/*
- * Argument structure used by mrouted to get vif pkt counts
- */
-struct sioc_vif_req {
- vifi_t vifi; /* vif number */
- u_long icount; /* Input packet count on vif */
- u_long ocount; /* Output packet count on vif */
- u_long ibytes; /* Input byte count on vif */
- u_long obytes; /* Output byte count on vif */
-};
-
-
-/*
- * The kernel's virtual-interface structure.
- */
-struct vif {
- u_char v_flags; /* VIFF_ flags defined above */
- u_char v_threshold; /* min ttl required to forward on vif*/
- u_int v_rate_limit; /* max rate */
- struct tbf *v_tbf; /* token bucket structure at intf. */
- struct in_addr v_lcl_addr; /* local interface address */
- struct in_addr v_rmt_addr; /* remote address (tunnels only) */
- struct ifnet *v_ifp; /* pointer to interface */
- u_long v_pkt_in; /* # pkts in on interface */
- u_long v_pkt_out; /* # pkts out on interface */
- u_long v_bytes_in; /* # bytes in on interface */
- u_long v_bytes_out; /* # bytes out on interface */
- struct route v_route; /* cached route if this is a tunnel */
- u_int v_rsvp_on; /* RSVP listening on this vif */
- struct socket *v_rsvpd; /* RSVP daemon socket */
-};
-
-/*
- * The kernel's multicast forwarding cache entry structure
- * (A field for the type of service (mfc_tos) is to be added
- * at a future point)
- */
-struct mfc {
- struct in_addr mfc_origin; /* IP origin of mcasts */
- struct in_addr mfc_mcastgrp; /* multicast group associated*/
- vifi_t mfc_parent; /* incoming vif */
- u_char mfc_ttls[MAXVIFS]; /* forwarding ttls on vifs */
- u_long mfc_pkt_cnt; /* pkt count for src-grp */
- u_long mfc_byte_cnt; /* byte count for src-grp */
- u_long mfc_wrong_if; /* wrong if for src-grp */
- int mfc_expire; /* time to clean entry up */
- struct timeval mfc_last_assert; /* last time I sent an assert*/
-};
-
-/*
- * Struct used to communicate from kernel to multicast router
- * note the convenient similarity to an IP packet
- */
-struct igmpmsg {
- u_long unused1;
- u_long unused2;
- u_char im_msgtype; /* what type of message */
-#define IGMPMSG_NOCACHE 1
-#define IGMPMSG_WRONGVIF 2
- u_char im_mbz; /* must be zero */
- u_char im_vif; /* vif rec'd on */
- u_char unused3;
- struct in_addr im_src, im_dst;
-};
-
-/*
- * Argument structure used for pkt info. while upcall is made
- */
-struct rtdetq {
- struct mbuf *m; /* A copy of the packet */
- struct ifnet *ifp; /* Interface pkt came in on */
- vifi_t xmt_vif; /* Saved copy of imo_multicast_vif */
-#ifdef UPCALL_TIMING
- struct timeval t; /* Timestamp */
-#endif /* UPCALL_TIMING */
-};
-
-#define MFCTBLSIZ 256
-#if (MFCTBLSIZ & (MFCTBLSIZ - 1)) == 0 /* from sys:route.h */
-#define MFCHASHMOD(h) ((h) & (MFCTBLSIZ - 1))
-#else
-#define MFCHASHMOD(h) ((h) % MFCTBLSIZ)
-#endif
-
-#define MAX_UPQ 4 /* max. no of pkts in upcall Q */
-
-/*
- * Token Bucket filter code
- */
-#define MAX_BKT_SIZE 10000 /* 10K bytes size */
-#define MAXQSIZE 10 /* max # of pkts in queue */
-
-/*
- * the token bucket filter at each vif
- */
-struct tbf
-{
- struct timeval tbf_last_pkt_t; /* arr. time of last pkt */
- u_long tbf_n_tok; /* no of tokens in bucket */
- u_long tbf_q_len; /* length of queue at this vif */
- u_long tbf_max_q_len; /* max. queue length */
- struct mbuf *tbf_q; /* Packet queue */
- struct mbuf *tbf_t; /* tail-insertion pointer */
-};
-
-#ifdef KERNEL
-
-extern int (*ip_mrouter_set) __P((int, struct socket *, struct mbuf *));
-extern int (*ip_mrouter_get) __P((int, struct socket *, struct mbuf **));
-extern int (*ip_mrouter_done) __P((void));
-#ifdef MROUTING
-extern int (*mrt_ioctl) __P((int, caddr_t));
-#else
-extern int (*mrt_ioctl) __P((int, caddr_t, struct proc *));
-#endif
-
-#endif /* KERNEL */
-
-#endif /* _NETINET_IP_MROUTE_H_ */
diff --git a/c/src/exec/libnetworking/netinet/ip_output.c b/c/src/exec/libnetworking/netinet/ip_output.c
deleted file mode 100644
index 810f6c7479..0000000000
--- a/c/src/exec/libnetworking/netinet/ip_output.c
+++ /dev/null
@@ -1,1307 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1988, 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ip_output.c 8.3 (Berkeley) 1/21/94
- * $Id$
- */
-
-#define _IP_VHL
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/systm.h>
-#include <sys/malloc.h>
-#include <sys/mbuf.h>
-#include <sys/errno.h>
-#include <sys/protosw.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-
-#include <net/if.h>
-#include <net/route.h>
-
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/in_pcb.h>
-#include <netinet/in_var.h>
-#include <netinet/ip_var.h>
-
-#ifdef vax
-#include <machine/mtpr.h>
-#endif
-#include <machine/in_cksum.h>
-
-#if !defined(COMPAT_IPFW) || COMPAT_IPFW == 1
-#undef COMPAT_IPFW
-#define COMPAT_IPFW 1
-#else
-#undef COMPAT_IPFW
-#endif
-
-u_short ip_id;
-
-static struct mbuf *ip_insertoptions __P((struct mbuf *, struct mbuf *, int *));
-static void ip_mloopback
- __P((struct ifnet *, struct mbuf *, struct sockaddr_in *, int));
-static int ip_getmoptions
- __P((int, struct ip_moptions *, struct mbuf **));
-static int ip_optcopy __P((struct ip *, struct ip *));
-static int ip_pcbopts __P((struct mbuf **, struct mbuf *));
-static int ip_setmoptions
- __P((int, struct ip_moptions **, struct mbuf *));
-
-extern struct protosw inetsw[];
-
-/*
- * IP output. The packet in mbuf chain m contains a skeletal IP
- * header (with len, off, ttl, proto, tos, src, dst).
- * The mbuf chain containing the packet will be freed.
- * The mbuf opt, if present, will not be freed.
- */
-int
-ip_output(m0, opt, ro, flags, imo)
- struct mbuf *m0;
- struct mbuf *opt;
- struct route *ro;
- int flags;
- struct ip_moptions *imo;
-{
- struct ip *ip, *mhip;
- struct ifnet *ifp;
- struct mbuf *m = m0;
- int hlen = sizeof (struct ip);
- int len, off, error = 0;
- struct sockaddr_in *dst;
- struct in_ifaddr *ia;
- int isbroadcast;
-
-#ifdef DIAGNOSTIC
- if ((m->m_flags & M_PKTHDR) == 0)
- panic("ip_output no HDR");
- if (!ro)
- panic("ip_output no route, proto = %d",
- mtod(m, struct ip *)->ip_p);
-#endif
- if (opt) {
- m = ip_insertoptions(m, opt, &len);
- hlen = len;
- }
- ip = mtod(m, struct ip *);
- /*
- * Fill in IP header.
- */
- if ((flags & (IP_FORWARDING|IP_RAWOUTPUT)) == 0) {
- ip->ip_vhl = IP_MAKE_VHL(IPVERSION, hlen >> 2);
- ip->ip_off &= IP_DF;
- ip->ip_id = htons(ip_id++);
- ipstat.ips_localout++;
- } else {
- hlen = IP_VHL_HL(ip->ip_vhl) << 2;
- }
-
- dst = (struct sockaddr_in *)&ro->ro_dst;
- /*
- * If there is a cached route,
- * check that it is to the same destination
- * and is still up. If not, free it and try again.
- */
- if (ro->ro_rt && ((ro->ro_rt->rt_flags & RTF_UP) == 0 ||
- dst->sin_addr.s_addr != ip->ip_dst.s_addr)) {
- RTFREE(ro->ro_rt);
- ro->ro_rt = (struct rtentry *)0;
- }
- if (ro->ro_rt == 0) {
- dst->sin_family = AF_INET;
- dst->sin_len = sizeof(*dst);
- dst->sin_addr = ip->ip_dst;
- }
- /*
- * If routing to interface only,
- * short circuit routing lookup.
- */
-#define ifatoia(ifa) ((struct in_ifaddr *)(ifa))
-#define sintosa(sin) ((struct sockaddr *)(sin))
- if (flags & IP_ROUTETOIF) {
- if ((ia = ifatoia(ifa_ifwithdstaddr(sintosa(dst)))) == 0 &&
- (ia = ifatoia(ifa_ifwithnet(sintosa(dst)))) == 0) {
- ipstat.ips_noroute++;
- error = ENETUNREACH;
- goto bad;
- }
- ifp = ia->ia_ifp;
- ip->ip_ttl = 1;
- isbroadcast = in_broadcast(dst->sin_addr, ifp);
- } else {
- /*
- * If this is the case, we probably don't want to allocate
- * a protocol-cloned route since we didn't get one from the
- * ULP. This lets TCP do its thing, while not burdening
- * forwarding or ICMP with the overhead of cloning a route.
- * Of course, we still want to do any cloning requested by
- * the link layer, as this is probably required in all cases
- * for correct operation (as it is for ARP).
- */
- if (ro->ro_rt == 0)
- rtalloc_ign(ro, RTF_PRCLONING);
- if (ro->ro_rt == 0) {
- ipstat.ips_noroute++;
- error = EHOSTUNREACH;
- goto bad;
- }
- ia = ifatoia(ro->ro_rt->rt_ifa);
- ifp = ro->ro_rt->rt_ifp;
- ro->ro_rt->rt_use++;
- if (ro->ro_rt->rt_flags & RTF_GATEWAY)
- dst = (struct sockaddr_in *)ro->ro_rt->rt_gateway;
- if (ro->ro_rt->rt_flags & RTF_HOST)
- isbroadcast = (ro->ro_rt->rt_flags & RTF_BROADCAST);
- else
- isbroadcast = in_broadcast(dst->sin_addr, ifp);
- }
- if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr))) {
- struct in_multi *inm;
-
- m->m_flags |= M_MCAST;
- /*
- * IP destination address is multicast. Make sure "dst"
- * still points to the address in "ro". (It may have been
- * changed to point to a gateway address, above.)
- */
- dst = (struct sockaddr_in *)&ro->ro_dst;
- /*
- * See if the caller provided any multicast options
- */
- if (imo != NULL) {
- ip->ip_ttl = imo->imo_multicast_ttl;
- if (imo->imo_multicast_ifp != NULL)
- ifp = imo->imo_multicast_ifp;
- if (imo->imo_multicast_vif != -1)
- ip->ip_src.s_addr =
- ip_mcast_src(imo->imo_multicast_vif);
- } else
- ip->ip_ttl = IP_DEFAULT_MULTICAST_TTL;
- /*
- * Confirm that the outgoing interface supports multicast.
- */
- if ((imo == NULL) || (imo->imo_multicast_vif == -1)) {
- if ((ifp->if_flags & IFF_MULTICAST) == 0) {
- ipstat.ips_noroute++;
- error = ENETUNREACH;
- goto bad;
- }
- }
- /*
- * If source address not specified yet, use address
- * of outgoing interface.
- */
- if (ip->ip_src.s_addr == INADDR_ANY) {
- register struct in_ifaddr *ia;
-
- for (ia = in_ifaddr; ia; ia = ia->ia_next)
- if (ia->ia_ifp == ifp) {
- ip->ip_src = IA_SIN(ia)->sin_addr;
- break;
- }
- }
-
- IN_LOOKUP_MULTI(ip->ip_dst, ifp, inm);
- if (inm != NULL &&
- (imo == NULL || imo->imo_multicast_loop)) {
- /*
- * If we belong to the destination multicast group
- * on the outgoing interface, and the caller did not
- * forbid loopback, loop back a copy.
- */
- ip_mloopback(ifp, m, dst, hlen);
- }
- else {
- /*
- * If we are acting as a multicast router, perform
- * multicast forwarding as if the packet had just
- * arrived on the interface to which we are about
- * to send. The multicast forwarding function
- * recursively calls this function, using the
- * IP_FORWARDING flag to prevent infinite recursion.
- *
- * Multicasts that are looped back by ip_mloopback(),
- * above, will be forwarded by the ip_input() routine,
- * if necessary.
- */
- if (ip_mrouter && (flags & IP_FORWARDING) == 0) {
- /*
- * Check if rsvp daemon is running. If not, don't
- * set ip_moptions. This ensures that the packet
- * is multicast and not just sent down one link
- * as prescribed by rsvpd.
- */
- if (!rsvp_on)
- imo = NULL;
- if (ip_mforward(ip, ifp, m, imo) != 0) {
- m_freem(m);
- goto done;
- }
- }
- }
-
- /*
- * Multicasts with a time-to-live of zero may be looped-
- * back, above, but must not be transmitted on a network.
- * Also, multicasts addressed to the loopback interface
- * are not sent -- the above call to ip_mloopback() will
- * loop back a copy if this host actually belongs to the
- * destination group on the loopback interface.
- */
- if (ip->ip_ttl == 0 || ifp->if_flags & IFF_LOOPBACK) {
- m_freem(m);
- goto done;
- }
-
- goto sendit;
- }
-#ifndef notdef
- /*
- * If source address not specified yet, use address
- * of outgoing interface.
- */
- if (ip->ip_src.s_addr == INADDR_ANY)
- ip->ip_src = IA_SIN(ia)->sin_addr;
-#endif
- /*
- * Verify that we have any chance at all of being able to queue
- * the packet or packet fragments
- */
- if ((ifp->if_snd.ifq_len + ip->ip_len / ifp->if_mtu + 1) >=
- ifp->if_snd.ifq_maxlen) {
- error = ENOBUFS;
- goto bad;
- }
-
- /*
- * Look for broadcast address and
- * and verify user is allowed to send
- * such a packet.
- */
- if (isbroadcast) {
- if ((ifp->if_flags & IFF_BROADCAST) == 0) {
- error = EADDRNOTAVAIL;
- goto bad;
- }
- if ((flags & IP_ALLOWBROADCAST) == 0) {
- error = EACCES;
- goto bad;
- }
- /* don't allow broadcast messages to be fragmented */
- if ((u_short)ip->ip_len > ifp->if_mtu) {
- error = EMSGSIZE;
- goto bad;
- }
- m->m_flags |= M_BCAST;
- } else {
- m->m_flags &= ~M_BCAST;
- }
-
-sendit:
- /*
- * IpHack's section.
- * - Xlate: translate packet's addr/port (NAT).
- * - Firewall: deny/allow/etc.
- * - Wrap: fake packet's addr/port <unimpl.>
- * - Encapsulate: put it in another IP and send out. <unimp.>
- */
-
-#ifdef COMPAT_IPFW
- if (ip_nat_ptr && !(*ip_nat_ptr)(&ip, &m, ifp, IP_NAT_OUT)) {
- error = EACCES;
- goto done;
- }
-
- /*
- * Check with the firewall...
- */
- if (ip_fw_chk_ptr) {
-#ifdef IPDIVERT
- ip_divert_port = (*ip_fw_chk_ptr)(&ip,
- hlen, ifp, ip_divert_ignore, &m);
- ip_divert_ignore = 0;
- if (ip_divert_port) { /* Divert packet */
- (*inetsw[ip_protox[IPPROTO_DIVERT]].pr_input)(m, 0);
- goto done;
- }
-#else
- /* If ipfw says divert, we have to just drop packet */
- if ((*ip_fw_chk_ptr)(&ip, hlen, ifp, 0, &m)) {
- m_freem(m);
- goto done;
- }
-#endif
- if (!m) {
- error = EACCES;
- goto done;
- }
- }
-#endif /* COMPAT_IPFW */
-
- /*
- * If small enough for interface, can just send directly.
- */
- if ((u_short)ip->ip_len <= ifp->if_mtu) {
- ip->ip_len = htons((u_short)ip->ip_len);
- ip->ip_off = htons((u_short)ip->ip_off);
- ip->ip_sum = 0;
- if (ip->ip_vhl == IP_VHL_BORING) {
- ip->ip_sum = in_cksum_hdr(ip);
- } else {
- ip->ip_sum = in_cksum(m, hlen);
- }
- error = (*ifp->if_output)(ifp, m,
- (struct sockaddr *)dst, ro->ro_rt);
- goto done;
- }
- /*
- * Too large for interface; fragment if possible.
- * Must be able to put at least 8 bytes per fragment.
- */
- if (ip->ip_off & IP_DF) {
- error = EMSGSIZE;
- /*
- * This case can happen if the user changed the MTU
- * of an interface after enabling IP on it. Because
- * most netifs don't keep track of routes pointing to
- * them, there is no way for one to update all its
- * routes when the MTU is changed.
- */
- if ((ro->ro_rt->rt_flags & (RTF_UP | RTF_HOST))
- && !(ro->ro_rt->rt_rmx.rmx_locks & RTV_MTU)
- && (ro->ro_rt->rt_rmx.rmx_mtu > ifp->if_mtu)) {
- ro->ro_rt->rt_rmx.rmx_mtu = ifp->if_mtu;
- }
- ipstat.ips_cantfrag++;
- goto bad;
- }
- len = (ifp->if_mtu - hlen) &~ 7;
- if (len < 8) {
- error = EMSGSIZE;
- goto bad;
- }
-
- {
- int mhlen, firstlen = len;
- struct mbuf **mnext = &m->m_nextpkt;
-
- /*
- * Loop through length of segment after first fragment,
- * make new header and copy data of each part and link onto chain.
- */
- m0 = m;
- mhlen = sizeof (struct ip);
- for (off = hlen + len; off < (u_short)ip->ip_len; off += len) {
- MGETHDR(m, M_DONTWAIT, MT_HEADER);
- if (m == 0) {
- error = ENOBUFS;
- ipstat.ips_odropped++;
- goto sendorfree;
- }
- m->m_data += max_linkhdr;
- mhip = mtod(m, struct ip *);
- *mhip = *ip;
- if (hlen > sizeof (struct ip)) {
- mhlen = ip_optcopy(ip, mhip) + sizeof (struct ip);
- mhip->ip_vhl = IP_MAKE_VHL(IPVERSION, mhlen >> 2);
- }
- m->m_len = mhlen;
- mhip->ip_off = ((off - hlen) >> 3) + (ip->ip_off & ~IP_MF);
- if (ip->ip_off & IP_MF)
- mhip->ip_off |= IP_MF;
- if (off + len >= (u_short)ip->ip_len)
- len = (u_short)ip->ip_len - off;
- else
- mhip->ip_off |= IP_MF;
- mhip->ip_len = htons((u_short)(len + mhlen));
- m->m_next = m_copy(m0, off, len);
- if (m->m_next == 0) {
- (void) m_free(m);
- error = ENOBUFS; /* ??? */
- ipstat.ips_odropped++;
- goto sendorfree;
- }
- m->m_pkthdr.len = mhlen + len;
- m->m_pkthdr.rcvif = (struct ifnet *)0;
- mhip->ip_off = htons((u_short)mhip->ip_off);
- mhip->ip_sum = 0;
- if (mhip->ip_vhl == IP_VHL_BORING) {
- mhip->ip_sum = in_cksum_hdr(mhip);
- } else {
- mhip->ip_sum = in_cksum(m, mhlen);
- }
- *mnext = m;
- mnext = &m->m_nextpkt;
- ipstat.ips_ofragments++;
- }
- /*
- * Update first fragment by trimming what's been copied out
- * and updating header, then send each fragment (in order).
- */
- m = m0;
- m_adj(m, hlen + firstlen - (u_short)ip->ip_len);
- m->m_pkthdr.len = hlen + firstlen;
- ip->ip_len = htons((u_short)m->m_pkthdr.len);
- ip->ip_off = htons((u_short)(ip->ip_off | IP_MF));
- ip->ip_sum = 0;
- if (ip->ip_vhl == IP_VHL_BORING) {
- ip->ip_sum = in_cksum_hdr(ip);
- } else {
- ip->ip_sum = in_cksum(m, hlen);
- }
-sendorfree:
- for (m = m0; m; m = m0) {
- m0 = m->m_nextpkt;
- m->m_nextpkt = 0;
- if (error == 0)
- error = (*ifp->if_output)(ifp, m,
- (struct sockaddr *)dst, ro->ro_rt);
- else
- m_freem(m);
- }
-
- if (error == 0)
- ipstat.ips_fragmented++;
- }
-done:
- return (error);
-bad:
- m_freem(m0);
- goto done;
-}
-
-/*
- * Insert IP options into preformed packet.
- * Adjust IP destination as required for IP source routing,
- * as indicated by a non-zero in_addr at the start of the options.
- *
- * XXX This routine assumes that the packet has no options in place.
- */
-static struct mbuf *
-ip_insertoptions(m, opt, phlen)
- register struct mbuf *m;
- struct mbuf *opt;
- int *phlen;
-{
- register struct ipoption *p = mtod(opt, struct ipoption *);
- struct mbuf *n;
- register struct ip *ip = mtod(m, struct ip *);
- unsigned optlen;
-
- optlen = opt->m_len - sizeof(p->ipopt_dst);
- if (optlen + (u_short)ip->ip_len > IP_MAXPACKET)
- return (m); /* XXX should fail */
- if (p->ipopt_dst.s_addr)
- ip->ip_dst = p->ipopt_dst;
- if (m->m_flags & M_EXT || m->m_data - optlen < m->m_pktdat) {
- MGETHDR(n, M_DONTWAIT, MT_HEADER);
- if (n == 0)
- return (m);
- n->m_pkthdr.len = m->m_pkthdr.len + optlen;
- m->m_len -= sizeof(struct ip);
- m->m_data += sizeof(struct ip);
- n->m_next = m;
- m = n;
- m->m_len = optlen + sizeof(struct ip);
- m->m_data += max_linkhdr;
- (void)memcpy(mtod(m, void *), ip, sizeof(struct ip));
- } else {
- m->m_data -= optlen;
- m->m_len += optlen;
- m->m_pkthdr.len += optlen;
- ovbcopy((caddr_t)ip, mtod(m, caddr_t), sizeof(struct ip));
- }
- ip = mtod(m, struct ip *);
- bcopy(p->ipopt_list, ip + 1, optlen);
- *phlen = sizeof(struct ip) + optlen;
- ip->ip_vhl = IP_MAKE_VHL(IPVERSION, *phlen >> 2);
- ip->ip_len += optlen;
- return (m);
-}
-
-/*
- * Copy options from ip to jp,
- * omitting those not copied during fragmentation.
- */
-static int
-ip_optcopy(ip, jp)
- struct ip *ip, *jp;
-{
- register u_char *cp, *dp;
- int opt, optlen, cnt;
-
- cp = (u_char *)(ip + 1);
- dp = (u_char *)(jp + 1);
- cnt = (IP_VHL_HL(ip->ip_vhl) << 2) - sizeof (struct ip);
- for (; cnt > 0; cnt -= optlen, cp += optlen) {
- opt = cp[0];
- if (opt == IPOPT_EOL)
- break;
- if (opt == IPOPT_NOP) {
- /* Preserve for IP mcast tunnel's LSRR alignment. */
- *dp++ = IPOPT_NOP;
- optlen = 1;
- continue;
- } else
- optlen = cp[IPOPT_OLEN];
- /* bogus lengths should have been caught by ip_dooptions */
- if (optlen > cnt)
- optlen = cnt;
- if (IPOPT_COPIED(opt)) {
- bcopy(cp, dp, optlen);
- dp += optlen;
- }
- }
- for (optlen = dp - (u_char *)(jp+1); optlen & 0x3; optlen++)
- *dp++ = IPOPT_EOL;
- return (optlen);
-}
-
-/*
- * IP socket option processing.
- */
-int
-ip_ctloutput(op, so, level, optname, mp)
- int op;
- struct socket *so;
- int level, optname;
- struct mbuf **mp;
-{
- register struct inpcb *inp = sotoinpcb(so);
- register struct mbuf *m = *mp;
- register int optval = 0;
- int error = 0;
-
- if (level != IPPROTO_IP) {
- error = EINVAL;
- if (op == PRCO_SETOPT && *mp)
- (void) m_free(*mp);
- } else switch (op) {
-
- case PRCO_SETOPT:
- switch (optname) {
- case IP_OPTIONS:
-#ifdef notyet
- case IP_RETOPTS:
- return (ip_pcbopts(optname, &inp->inp_options, m));
-#else
- return (ip_pcbopts(&inp->inp_options, m));
-#endif
-
- case IP_TOS:
- case IP_TTL:
- case IP_RECVOPTS:
- case IP_RECVRETOPTS:
- case IP_RECVDSTADDR:
- case IP_RECVIF:
- if (m == 0 || m->m_len != sizeof(int))
- error = EINVAL;
- else {
- optval = *mtod(m, int *);
- switch (optname) {
-
- case IP_TOS:
- inp->inp_ip_tos = optval;
- break;
-
- case IP_TTL:
- inp->inp_ip_ttl = optval;
- break;
-#define OPTSET(bit) \
- if (optval) \
- inp->inp_flags |= bit; \
- else \
- inp->inp_flags &= ~bit;
-
- case IP_RECVOPTS:
- OPTSET(INP_RECVOPTS);
- break;
-
- case IP_RECVRETOPTS:
- OPTSET(INP_RECVRETOPTS);
- break;
-
- case IP_RECVDSTADDR:
- OPTSET(INP_RECVDSTADDR);
- break;
-
- case IP_RECVIF:
- OPTSET(INP_RECVIF);
- break;
- }
- }
- break;
-#undef OPTSET
-
- case IP_MULTICAST_IF:
- case IP_MULTICAST_VIF:
- case IP_MULTICAST_TTL:
- case IP_MULTICAST_LOOP:
- case IP_ADD_MEMBERSHIP:
- case IP_DROP_MEMBERSHIP:
- error = ip_setmoptions(optname, &inp->inp_moptions, m);
- break;
-
- case IP_PORTRANGE:
- if (m == 0 || m->m_len != sizeof(int))
- error = EINVAL;
- else {
- optval = *mtod(m, int *);
-
- switch (optval) {
-
- case IP_PORTRANGE_DEFAULT:
- inp->inp_flags &= ~(INP_LOWPORT);
- inp->inp_flags &= ~(INP_HIGHPORT);
- break;
-
- case IP_PORTRANGE_HIGH:
- inp->inp_flags &= ~(INP_LOWPORT);
- inp->inp_flags |= INP_HIGHPORT;
- break;
-
- case IP_PORTRANGE_LOW:
- inp->inp_flags &= ~(INP_HIGHPORT);
- inp->inp_flags |= INP_LOWPORT;
- break;
-
- default:
- error = EINVAL;
- break;
- }
- }
- break;
-
- default:
- error = ENOPROTOOPT;
- break;
- }
- if (m)
- (void)m_free(m);
- break;
-
- case PRCO_GETOPT:
- switch (optname) {
- case IP_OPTIONS:
- case IP_RETOPTS:
- *mp = m = m_get(M_WAIT, MT_SOOPTS);
- if (inp->inp_options) {
- m->m_len = inp->inp_options->m_len;
- bcopy(mtod(inp->inp_options, void *),
- mtod(m, void *), m->m_len);
- } else
- m->m_len = 0;
- break;
-
- case IP_TOS:
- case IP_TTL:
- case IP_RECVOPTS:
- case IP_RECVRETOPTS:
- case IP_RECVDSTADDR:
- case IP_RECVIF:
- *mp = m = m_get(M_WAIT, MT_SOOPTS);
- m->m_len = sizeof(int);
- switch (optname) {
-
- case IP_TOS:
- optval = inp->inp_ip_tos;
- break;
-
- case IP_TTL:
- optval = inp->inp_ip_ttl;
- break;
-
-#define OPTBIT(bit) (inp->inp_flags & bit ? 1 : 0)
-
- case IP_RECVOPTS:
- optval = OPTBIT(INP_RECVOPTS);
- break;
-
- case IP_RECVRETOPTS:
- optval = OPTBIT(INP_RECVRETOPTS);
- break;
-
- case IP_RECVDSTADDR:
- optval = OPTBIT(INP_RECVDSTADDR);
- break;
-
- case IP_RECVIF:
- optval = OPTBIT(INP_RECVIF);
- break;
- }
- *mtod(m, int *) = optval;
- break;
-
- case IP_MULTICAST_IF:
- case IP_MULTICAST_VIF:
- case IP_MULTICAST_TTL:
- case IP_MULTICAST_LOOP:
- case IP_ADD_MEMBERSHIP:
- case IP_DROP_MEMBERSHIP:
- error = ip_getmoptions(optname, inp->inp_moptions, mp);
- break;
-
- case IP_PORTRANGE:
- *mp = m = m_get(M_WAIT, MT_SOOPTS);
- m->m_len = sizeof(int);
-
- if (inp->inp_flags & INP_HIGHPORT)
- optval = IP_PORTRANGE_HIGH;
- else if (inp->inp_flags & INP_LOWPORT)
- optval = IP_PORTRANGE_LOW;
- else
- optval = 0;
-
- *mtod(m, int *) = optval;
- break;
-
- default:
- error = ENOPROTOOPT;
- break;
- }
- break;
- }
- return (error);
-}
-
-/*
- * Set up IP options in pcb for insertion in output packets.
- * Store in mbuf with pointer in pcbopt, adding pseudo-option
- * with destination address if source routed.
- */
-static int
-#ifdef notyet
-ip_pcbopts(optname, pcbopt, m)
- int optname;
-#else
-ip_pcbopts(pcbopt, m)
-#endif
- struct mbuf **pcbopt;
- register struct mbuf *m;
-{
- register int cnt, optlen;
- register u_char *cp;
- u_char opt;
-
- /* turn off any old options */
- if (*pcbopt)
- (void)m_free(*pcbopt);
- *pcbopt = 0;
- if (m == (struct mbuf *)0 || m->m_len == 0) {
- /*
- * Only turning off any previous options.
- */
- if (m)
- (void)m_free(m);
- return (0);
- }
-
-#ifndef vax
- if (m->m_len % sizeof(long))
- goto bad;
-#endif
- /*
- * IP first-hop destination address will be stored before
- * actual options; move other options back
- * and clear it when none present.
- */
- if (m->m_data + m->m_len + sizeof(struct in_addr) >= &m->m_dat[MLEN])
- goto bad;
- cnt = m->m_len;
- m->m_len += sizeof(struct in_addr);
- cp = mtod(m, u_char *) + sizeof(struct in_addr);
- ovbcopy(mtod(m, caddr_t), (caddr_t)cp, (unsigned)cnt);
- bzero(mtod(m, caddr_t), sizeof(struct in_addr));
-
- for (; cnt > 0; cnt -= optlen, cp += optlen) {
- opt = cp[IPOPT_OPTVAL];
- if (opt == IPOPT_EOL)
- break;
- if (opt == IPOPT_NOP)
- optlen = 1;
- else {
- optlen = cp[IPOPT_OLEN];
- if (optlen <= IPOPT_OLEN || optlen > cnt)
- goto bad;
- }
- switch (opt) {
-
- default:
- break;
-
- case IPOPT_LSRR:
- case IPOPT_SSRR:
- /*
- * user process specifies route as:
- * ->A->B->C->D
- * D must be our final destination (but we can't
- * check that since we may not have connected yet).
- * A is first hop destination, which doesn't appear in
- * actual IP option, but is stored before the options.
- */
- if (optlen < IPOPT_MINOFF - 1 + sizeof(struct in_addr))
- goto bad;
- m->m_len -= sizeof(struct in_addr);
- cnt -= sizeof(struct in_addr);
- optlen -= sizeof(struct in_addr);
- cp[IPOPT_OLEN] = optlen;
- /*
- * Move first hop before start of options.
- */
- bcopy((caddr_t)&cp[IPOPT_OFFSET+1], mtod(m, caddr_t),
- sizeof(struct in_addr));
- /*
- * Then copy rest of options back
- * to close up the deleted entry.
- */
- ovbcopy((caddr_t)(&cp[IPOPT_OFFSET+1] +
- sizeof(struct in_addr)),
- (caddr_t)&cp[IPOPT_OFFSET+1],
- (unsigned)cnt + sizeof(struct in_addr));
- break;
- }
- }
- if (m->m_len > MAX_IPOPTLEN + sizeof(struct in_addr))
- goto bad;
- *pcbopt = m;
- return (0);
-
-bad:
- (void)m_free(m);
- return (EINVAL);
-}
-
-/*
- * Set the IP multicast options in response to user setsockopt().
- */
-static int
-ip_setmoptions(optname, imop, m)
- int optname;
- struct ip_moptions **imop;
- struct mbuf *m;
-{
- register int error = 0;
- u_char loop;
- register int i;
- struct in_addr addr;
- register struct ip_mreq *mreq;
- register struct ifnet *ifp;
- register struct ip_moptions *imo = *imop;
- struct route ro;
- register struct sockaddr_in *dst;
- int s;
-
- if (imo == NULL) {
- /*
- * No multicast option buffer attached to the pcb;
- * allocate one and initialize to default values.
- */
- imo = (struct ip_moptions*)malloc(sizeof(*imo), M_IPMOPTS,
- M_WAITOK);
-
- if (imo == NULL)
- return (ENOBUFS);
- *imop = imo;
- imo->imo_multicast_ifp = NULL;
- imo->imo_multicast_vif = -1;
- imo->imo_multicast_ttl = IP_DEFAULT_MULTICAST_TTL;
- imo->imo_multicast_loop = IP_DEFAULT_MULTICAST_LOOP;
- imo->imo_num_memberships = 0;
- }
-
- switch (optname) {
- /* store an index number for the vif you wanna use in the send */
- case IP_MULTICAST_VIF:
- if (!legal_vif_num) {
- error = EOPNOTSUPP;
- break;
- }
- if (m == NULL || m->m_len != sizeof(int)) {
- error = EINVAL;
- break;
- }
- i = *(mtod(m, int *));
- if (!legal_vif_num(i) && (i != -1)) {
- error = EINVAL;
- break;
- }
- imo->imo_multicast_vif = i;
- break;
-
- case IP_MULTICAST_IF:
- /*
- * Select the interface for outgoing multicast packets.
- */
- if (m == NULL || m->m_len != sizeof(struct in_addr)) {
- error = EINVAL;
- break;
- }
- addr = *(mtod(m, struct in_addr *));
- /*
- * INADDR_ANY is used to remove a previous selection.
- * When no interface is selected, a default one is
- * chosen every time a multicast packet is sent.
- */
- if (addr.s_addr == INADDR_ANY) {
- imo->imo_multicast_ifp = NULL;
- break;
- }
- /*
- * The selected interface is identified by its local
- * IP address. Find the interface and confirm that
- * it supports multicasting.
- */
- s = splimp();
- INADDR_TO_IFP(addr, ifp);
- if (ifp == NULL || (ifp->if_flags & IFF_MULTICAST) == 0) {
- splx(s);
- error = EADDRNOTAVAIL;
- break;
- }
- imo->imo_multicast_ifp = ifp;
- splx(s);
- break;
-
- case IP_MULTICAST_TTL:
- /*
- * Set the IP time-to-live for outgoing multicast packets.
- */
- if (m == NULL || m->m_len != 1) {
- error = EINVAL;
- break;
- }
- imo->imo_multicast_ttl = *(mtod(m, u_char *));
- break;
-
- case IP_MULTICAST_LOOP:
- /*
- * Set the loopback flag for outgoing multicast packets.
- * Must be zero or one.
- */
- if (m == NULL || m->m_len != 1 ||
- (loop = *(mtod(m, u_char *))) > 1) {
- error = EINVAL;
- break;
- }
- imo->imo_multicast_loop = loop;
- break;
-
- case IP_ADD_MEMBERSHIP:
- /*
- * Add a multicast group membership.
- * Group must be a valid IP multicast address.
- */
- if (m == NULL || m->m_len != sizeof(struct ip_mreq)) {
- error = EINVAL;
- break;
- }
- mreq = mtod(m, struct ip_mreq *);
- if (!IN_MULTICAST(ntohl(mreq->imr_multiaddr.s_addr))) {
- error = EINVAL;
- break;
- }
- s = splimp();
- /*
- * If no interface address was provided, use the interface of
- * the route to the given multicast address.
- */
- if (mreq->imr_interface.s_addr == INADDR_ANY) {
- bzero((caddr_t)&ro, sizeof(ro));
- dst = (struct sockaddr_in *)&ro.ro_dst;
- dst->sin_len = sizeof(*dst);
- dst->sin_family = AF_INET;
- dst->sin_addr = mreq->imr_multiaddr;
- rtalloc(&ro);
- if (ro.ro_rt == NULL) {
- error = EADDRNOTAVAIL;
- splx(s);
- break;
- }
- ifp = ro.ro_rt->rt_ifp;
- rtfree(ro.ro_rt);
- }
- else {
- INADDR_TO_IFP(mreq->imr_interface, ifp);
- }
-
- /*
- * See if we found an interface, and confirm that it
- * supports multicast.
- */
- if (ifp == NULL || (ifp->if_flags & IFF_MULTICAST) == 0) {
- error = EADDRNOTAVAIL;
- splx(s);
- break;
- }
- /*
- * See if the membership already exists or if all the
- * membership slots are full.
- */
- for (i = 0; i < imo->imo_num_memberships; ++i) {
- if (imo->imo_membership[i]->inm_ifp == ifp &&
- imo->imo_membership[i]->inm_addr.s_addr
- == mreq->imr_multiaddr.s_addr)
- break;
- }
- if (i < imo->imo_num_memberships) {
- error = EADDRINUSE;
- splx(s);
- break;
- }
- if (i == IP_MAX_MEMBERSHIPS) {
- error = ETOOMANYREFS;
- splx(s);
- break;
- }
- /*
- * Everything looks good; add a new record to the multicast
- * address list for the given interface.
- */
- if ((imo->imo_membership[i] =
- in_addmulti(&mreq->imr_multiaddr, ifp)) == NULL) {
- error = ENOBUFS;
- splx(s);
- break;
- }
- ++imo->imo_num_memberships;
- splx(s);
- break;
-
- case IP_DROP_MEMBERSHIP:
- /*
- * Drop a multicast group membership.
- * Group must be a valid IP multicast address.
- */
- if (m == NULL || m->m_len != sizeof(struct ip_mreq)) {
- error = EINVAL;
- break;
- }
- mreq = mtod(m, struct ip_mreq *);
- if (!IN_MULTICAST(ntohl(mreq->imr_multiaddr.s_addr))) {
- error = EINVAL;
- break;
- }
-
- s = splimp();
- /*
- * If an interface address was specified, get a pointer
- * to its ifnet structure.
- */
- if (mreq->imr_interface.s_addr == INADDR_ANY)
- ifp = NULL;
- else {
- INADDR_TO_IFP(mreq->imr_interface, ifp);
- if (ifp == NULL) {
- error = EADDRNOTAVAIL;
- splx(s);
- break;
- }
- }
- /*
- * Find the membership in the membership array.
- */
- for (i = 0; i < imo->imo_num_memberships; ++i) {
- if ((ifp == NULL ||
- imo->imo_membership[i]->inm_ifp == ifp) &&
- imo->imo_membership[i]->inm_addr.s_addr ==
- mreq->imr_multiaddr.s_addr)
- break;
- }
- if (i == imo->imo_num_memberships) {
- error = EADDRNOTAVAIL;
- splx(s);
- break;
- }
- /*
- * Give up the multicast address record to which the
- * membership points.
- */
- in_delmulti(imo->imo_membership[i]);
- /*
- * Remove the gap in the membership array.
- */
- for (++i; i < imo->imo_num_memberships; ++i)
- imo->imo_membership[i-1] = imo->imo_membership[i];
- --imo->imo_num_memberships;
- splx(s);
- break;
-
- default:
- error = EOPNOTSUPP;
- break;
- }
-
- /*
- * If all options have default values, no need to keep the mbuf.
- */
- if (imo->imo_multicast_ifp == NULL &&
- imo->imo_multicast_vif == -1 &&
- imo->imo_multicast_ttl == IP_DEFAULT_MULTICAST_TTL &&
- imo->imo_multicast_loop == IP_DEFAULT_MULTICAST_LOOP &&
- imo->imo_num_memberships == 0) {
- free(*imop, M_IPMOPTS);
- *imop = NULL;
- }
-
- return (error);
-}
-
-/*
- * Return the IP multicast options in response to user getsockopt().
- */
-static int
-ip_getmoptions(optname, imo, mp)
- int optname;
- register struct ip_moptions *imo;
- register struct mbuf **mp;
-{
- u_char *ttl;
- u_char *loop;
- struct in_addr *addr;
- struct in_ifaddr *ia;
-
- *mp = m_get(M_WAIT, MT_SOOPTS);
-
- switch (optname) {
-
- case IP_MULTICAST_VIF:
- if (imo != NULL)
- *(mtod(*mp, int *)) = imo->imo_multicast_vif;
- else
- *(mtod(*mp, int *)) = -1;
- (*mp)->m_len = sizeof(int);
- return(0);
-
- case IP_MULTICAST_IF:
- addr = mtod(*mp, struct in_addr *);
- (*mp)->m_len = sizeof(struct in_addr);
- if (imo == NULL || imo->imo_multicast_ifp == NULL)
- addr->s_addr = INADDR_ANY;
- else {
- IFP_TO_IA(imo->imo_multicast_ifp, ia);
- addr->s_addr = (ia == NULL) ? INADDR_ANY
- : IA_SIN(ia)->sin_addr.s_addr;
- }
- return (0);
-
- case IP_MULTICAST_TTL:
- ttl = mtod(*mp, u_char *);
- (*mp)->m_len = 1;
- *ttl = (imo == NULL) ? IP_DEFAULT_MULTICAST_TTL
- : imo->imo_multicast_ttl;
- return (0);
-
- case IP_MULTICAST_LOOP:
- loop = mtod(*mp, u_char *);
- (*mp)->m_len = 1;
- *loop = (imo == NULL) ? IP_DEFAULT_MULTICAST_LOOP
- : imo->imo_multicast_loop;
- return (0);
-
- default:
- return (EOPNOTSUPP);
- }
-}
-
-/*
- * Discard the IP multicast options.
- */
-void
-ip_freemoptions(imo)
- register struct ip_moptions *imo;
-{
- register int i;
-
- if (imo != NULL) {
- for (i = 0; i < imo->imo_num_memberships; ++i)
- in_delmulti(imo->imo_membership[i]);
- free(imo, M_IPMOPTS);
- }
-}
-
-/*
- * Routine called from ip_output() to loop back a copy of an IP multicast
- * packet to the input queue of a specified interface. Note that this
- * calls the output routine of the loopback "driver", but with an interface
- * pointer that might NOT be a loopback interface -- evil, but easier than
- * replicating that code here.
- */
-static void
-ip_mloopback(ifp, m, dst, hlen)
- struct ifnet *ifp;
- register struct mbuf *m;
- register struct sockaddr_in *dst;
- int hlen;
-{
- register struct ip *ip;
- struct mbuf *copym;
-
- copym = m_copy(m, 0, M_COPYALL);
- if (copym != NULL && (copym->m_flags & M_EXT || copym->m_len < hlen))
- copym = m_pullup(copym, hlen);
- if (copym != NULL) {
- /*
- * We don't bother to fragment if the IP length is greater
- * than the interface's MTU. Can this possibly matter?
- */
- ip = mtod(copym, struct ip *);
- ip->ip_len = htons((u_short)ip->ip_len);
- ip->ip_off = htons((u_short)ip->ip_off);
- ip->ip_sum = 0;
- if (ip->ip_vhl == IP_VHL_BORING) {
- ip->ip_sum = in_cksum_hdr(ip);
- } else {
- ip->ip_sum = in_cksum(copym, hlen);
- }
- /*
- * NB:
- * It's not clear whether there are any lingering
- * reentrancy problems in other areas which might
- * be exposed by using ip_input directly (in
- * particular, everything which modifies the packet
- * in-place). Yet another option is using the
- * protosw directly to deliver the looped back
- * packet. For the moment, we'll err on the side
- * of safety by continuing to abuse looutput().
- */
-#ifdef notdef
- copym->m_pkthdr.rcvif = ifp;
- ip_input(copym)
-#else
- (void) looutput(ifp, copym, (struct sockaddr *)dst, NULL);
-#endif
- }
-}
diff --git a/c/src/exec/libnetworking/netinet/ip_var.h b/c/src/exec/libnetworking/netinet/ip_var.h
deleted file mode 100644
index cc7908e9a3..0000000000
--- a/c/src/exec/libnetworking/netinet/ip_var.h
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ip_var.h 8.2 (Berkeley) 1/9/95
- * $Id$
- */
-
-#ifndef _NETINET_IP_VAR_H_
-#define _NETINET_IP_VAR_H_
-
-/*
- * Overlay for ip header used by other protocols (tcp, udp).
- */
-struct ipovly {
- caddr_t ih_next, ih_prev; /* for protocol sequence q's */
- u_char ih_x1; /* (unused) */
- u_char ih_pr; /* protocol */
- u_short ih_len; /* protocol length */
- struct in_addr ih_src; /* source internet address */
- struct in_addr ih_dst; /* destination internet address */
-};
-
-/*
- * Ip reassembly queue structure. Each fragment
- * being reassembled is attached to one of these structures.
- * They are timed out after ipq_ttl drops to 0, and may also
- * be reclaimed if memory becomes tight.
- */
-struct ipq {
- struct ipq *next,*prev; /* to other reass headers */
- u_char ipq_ttl; /* time for reass q to live */
- u_char ipq_p; /* protocol of this fragment */
- u_short ipq_id; /* sequence id for reassembly */
- struct ipasfrag *ipq_next,*ipq_prev;
- /* to ip headers of fragments */
- struct in_addr ipq_src,ipq_dst;
-#ifdef IPDIVERT
- u_short ipq_divert; /* divert protocol port */
-#endif
-};
-
-/*
- * Ip header, when holding a fragment.
- *
- * Note: ipf_next must be at same offset as ipq_next above
- */
-struct ipasfrag {
-#if BYTE_ORDER == LITTLE_ENDIAN
- u_char ip_hl:4,
- ip_v:4;
-#endif
-#if BYTE_ORDER == BIG_ENDIAN
- u_char ip_v:4,
- ip_hl:4;
-#endif
- u_char ipf_mff; /* XXX overlays ip_tos: use low bit
- * to avoid destroying tos;
- * copied from (ip_off&IP_MF) */
- u_short ip_len;
- u_short ip_id;
- u_short ip_off;
- u_char ip_ttl;
- u_char ip_p;
- u_short ip_sum;
- struct ipasfrag *ipf_next; /* next fragment */
- struct ipasfrag *ipf_prev; /* previous fragment */
-};
-
-/*
- * Structure stored in mbuf in inpcb.ip_options
- * and passed to ip_output when ip options are in use.
- * The actual length of the options (including ipopt_dst)
- * is in m_len.
- */
-#define MAX_IPOPTLEN 40
-
-struct ipoption {
- struct in_addr ipopt_dst; /* first-hop dst if source routed */
- char ipopt_list[MAX_IPOPTLEN]; /* options proper */
-};
-
-/*
- * Structure attached to inpcb.ip_moptions and
- * passed to ip_output when IP multicast options are in use.
- */
-struct ip_moptions {
- struct ifnet *imo_multicast_ifp; /* ifp for outgoing multicasts */
- u_char imo_multicast_ttl; /* TTL for outgoing multicasts */
- u_char imo_multicast_loop; /* 1 => hear sends if a member */
- u_short imo_num_memberships; /* no. memberships this socket */
- struct in_multi *imo_membership[IP_MAX_MEMBERSHIPS];
- u_long imo_multicast_vif; /* vif num outgoing multicasts */
-};
-
-struct ipstat {
- u_long ips_total; /* total packets received */
- u_long ips_badsum; /* checksum bad */
- u_long ips_tooshort; /* packet too short */
- u_long ips_toosmall; /* not enough data */
- u_long ips_badhlen; /* ip header length < data size */
- u_long ips_badlen; /* ip length < ip header length */
- u_long ips_fragments; /* fragments received */
- u_long ips_fragdropped; /* frags dropped (dups, out of space) */
- u_long ips_fragtimeout; /* fragments timed out */
- u_long ips_forward; /* packets forwarded */
- u_long ips_cantforward; /* packets rcvd for unreachable dest */
- u_long ips_redirectsent; /* packets forwarded on same net */
- u_long ips_noproto; /* unknown or unsupported protocol */
- u_long ips_delivered; /* datagrams delivered to upper level*/
- u_long ips_localout; /* total ip packets generated here */
- u_long ips_odropped; /* lost packets due to nobufs, etc. */
- u_long ips_reassembled; /* total packets reassembled ok */
- u_long ips_fragmented; /* datagrams successfully fragmented */
- u_long ips_ofragments; /* output fragments created */
- u_long ips_cantfrag; /* don't fragment flag was set, etc. */
- u_long ips_badoptions; /* error in option processing */
- u_long ips_noroute; /* packets discarded due to no route */
- u_long ips_badvers; /* ip version != 4 */
- u_long ips_rawout; /* total raw ip packets generated */
- u_long ips_toolong; /* ip length > max ip packet size */
-};
-
-#ifdef KERNEL
-/* flags passed to ip_output as last parameter */
-#define IP_FORWARDING 0x1 /* most of ip header exists */
-#define IP_RAWOUTPUT 0x2 /* raw ip header exists */
-#define IP_ROUTETOIF SO_DONTROUTE /* bypass routing tables */
-#define IP_ALLOWBROADCAST SO_BROADCAST /* can send broadcast packets */
-
-struct inpcb;
-struct route;
-
-extern struct ipstat ipstat;
-extern u_short ip_id; /* ip packet ctr, for ids */
-extern int ip_defttl; /* default IP ttl */
-extern u_char ip_protox[];
-extern struct socket *ip_rsvpd; /* reservation protocol daemon */
-extern struct socket *ip_mrouter; /* multicast routing daemon */
-extern int (*legal_vif_num) __P((int));
-extern u_long (*ip_mcast_src) __P((int));
-extern int rsvp_on;
-
-int ip_ctloutput __P((int, struct socket *, int, int, struct mbuf **));
-void ip_drain __P((void));
-void ip_freemoptions __P((struct ip_moptions *));
-void ip_init __P((void));
-extern int (*ip_mforward) __P((struct ip *, struct ifnet *, struct mbuf *,
- struct ip_moptions *));
-int ip_output __P((struct mbuf *,
- struct mbuf *, struct route *, int, struct ip_moptions *));
-void ip_savecontrol __P((struct inpcb *, struct mbuf **, struct ip *,
- struct mbuf *));
-void ip_slowtimo __P((void));
-struct mbuf *
- ip_srcroute __P((void));
-void ip_stripoptions __P((struct mbuf *, struct mbuf *));
-int rip_ctloutput __P((int, struct socket *, int, int, struct mbuf **));
-void rip_init __P((void));
-void rip_input __P((struct mbuf *, int));
-int rip_output __P((struct mbuf *, struct socket *, u_long));
-int rip_usrreq __P((struct socket *,
- int, struct mbuf *, struct mbuf *, struct mbuf *));
-void ipip_input __P((struct mbuf *, int));
-void rsvp_input __P((struct mbuf *, int));
-int ip_rsvp_init __P((struct socket *));
-int ip_rsvp_done __P((void));
-int ip_rsvp_vif_init __P((struct socket *, struct mbuf *));
-int ip_rsvp_vif_done __P((struct socket *, struct mbuf *));
-void ip_rsvp_force_done __P((struct socket *));
-
-#ifdef IPDIVERT
-void div_init __P((void));
-void div_input __P((struct mbuf *, int));
-int div_usrreq __P((struct socket *,
- int, struct mbuf *, struct mbuf *, struct mbuf *));
-extern u_short ip_divert_port;
-extern u_short ip_divert_ignore;
-#endif /* IPDIVERT */
-
-#endif /* KERNEL */
-
-#endif /* _NETINET_IP_VAR_H_ */
diff --git a/c/src/exec/libnetworking/netinet/raw_ip.c b/c/src/exec/libnetworking/netinet/raw_ip.c
deleted file mode 100644
index 44d58f1844..0000000000
--- a/c/src/exec/libnetworking/netinet/raw_ip.c
+++ /dev/null
@@ -1,486 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)raw_ip.c 8.7 (Berkeley) 5/15/95
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/malloc.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-#include <sys/protosw.h>
-#include <sys/socketvar.h>
-#include <sys/errno.h>
-#include <sys/systm.h>
-
-#include <net/if.h>
-#include <net/route.h>
-
-#define _IP_VHL
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/in_pcb.h>
-#include <netinet/in_var.h>
-#include <netinet/ip_var.h>
-#include <netinet/ip_mroute.h>
-
-#include <netinet/ip_fw.h>
-
-#if !defined(COMPAT_IPFW) || COMPAT_IPFW == 1
-#undef COMPAT_IPFW
-#define COMPAT_IPFW 1
-#else
-#undef COMPAT_IPFW
-#endif
-
-static struct inpcbhead ripcb;
-static struct inpcbinfo ripcbinfo;
-
-/*
- * Nominal space allocated to a raw ip socket.
- */
-#define RIPSNDQ 8192
-#define RIPRCVQ 8192
-
-/*
- * Raw interface to IP protocol.
- */
-
-/*
- * Initialize raw connection block q.
- */
-void
-rip_init()
-{
- LIST_INIT(&ripcb);
- ripcbinfo.listhead = &ripcb;
- /*
- * XXX We don't use the hash list for raw IP, but it's easier
- * to allocate a one entry hash list than it is to check all
- * over the place for hashbase == NULL.
- */
- ripcbinfo.hashbase = hashinit(1, M_PCB, &ripcbinfo.hashmask);
-}
-
-static struct sockaddr_in ripsrc = { sizeof(ripsrc), AF_INET };
-/*
- * Setup generic address and protocol structures
- * for raw_input routine, then pass them along with
- * mbuf chain.
- */
-void
-rip_input(m, iphlen)
- struct mbuf *m;
- int iphlen;
-{
- register struct ip *ip = mtod(m, struct ip *);
- register struct inpcb *inp;
- struct inpcb *last = 0;
- struct mbuf *opts = 0;
-
- ripsrc.sin_addr = ip->ip_src;
- for (inp = ripcb.lh_first; inp != NULL; inp = inp->inp_list.le_next) {
- if (inp->inp_ip_p && inp->inp_ip_p != ip->ip_p)
- continue;
- if (inp->inp_laddr.s_addr &&
- inp->inp_laddr.s_addr != ip->ip_dst.s_addr)
- continue;
- if (inp->inp_faddr.s_addr &&
- inp->inp_faddr.s_addr != ip->ip_src.s_addr)
- continue;
- if (last) {
- struct mbuf *n = m_copy(m, 0, (int)M_COPYALL);
- if (n) {
- if (last->inp_flags & INP_CONTROLOPTS ||
- last->inp_socket->so_options & SO_TIMESTAMP)
- ip_savecontrol(last, &opts, ip, n);
- if (sbappendaddr(&last->inp_socket->so_rcv,
- (struct sockaddr *)&ripsrc, n,
- opts) == 0) {
- /* should notify about lost packet */
- m_freem(n);
- if (opts)
- m_freem(opts);
- } else
- sorwakeup(last->inp_socket);
- opts = 0;
- }
- }
- last = inp;
- }
- if (last) {
- if (last->inp_flags & INP_CONTROLOPTS ||
- last->inp_socket->so_options & SO_TIMESTAMP)
- ip_savecontrol(last, &opts, ip, m);
- if (sbappendaddr(&last->inp_socket->so_rcv,
- (struct sockaddr *)&ripsrc, m, opts) == 0) {
- m_freem(m);
- if (opts)
- m_freem(opts);
- } else
- sorwakeup(last->inp_socket);
- } else {
- m_freem(m);
- ipstat.ips_noproto++;
- ipstat.ips_delivered--;
- }
-}
-
-/*
- * Generate IP header and pass packet to ip_output.
- * Tack on options user may have setup with control call.
- */
-int
-rip_output(m, so, dst)
- register struct mbuf *m;
- struct socket *so;
- u_long dst;
-{
- register struct ip *ip;
- register struct inpcb *inp = sotoinpcb(so);
- int flags = (so->so_options & SO_DONTROUTE) | IP_ALLOWBROADCAST;
-
- /*
- * If the user handed us a complete IP packet, use it.
- * Otherwise, allocate an mbuf for a header and fill it in.
- */
- if ((inp->inp_flags & INP_HDRINCL) == 0) {
- if (m->m_pkthdr.len + sizeof(struct ip) > IP_MAXPACKET) {
- m_freem(m);
- return(EMSGSIZE);
- }
- M_PREPEND(m, sizeof(struct ip), M_WAIT);
- ip = mtod(m, struct ip *);
- ip->ip_tos = 0;
- ip->ip_off = 0;
- ip->ip_p = inp->inp_ip_p;
- ip->ip_len = m->m_pkthdr.len;
- ip->ip_src = inp->inp_laddr;
- ip->ip_dst.s_addr = dst;
- ip->ip_ttl = MAXTTL;
- } else {
- if (m->m_pkthdr.len > IP_MAXPACKET) {
- m_freem(m);
- return(EMSGSIZE);
- }
- ip = mtod(m, struct ip *);
- /* don't allow both user specified and setsockopt options,
- and don't allow packet length sizes that will crash */
- if (((IP_VHL_HL(ip->ip_vhl) != (sizeof (*ip) >> 2))
- && inp->inp_options)
- || (ip->ip_len > m->m_pkthdr.len)
- || (ip->ip_len < (IP_VHL_HL(ip->ip_vhl) << 2))) {
- m_freem(m);
- return EINVAL;
- }
- if (ip->ip_id == 0)
- ip->ip_id = htons(ip_id++);
- /* XXX prevent ip_output from overwriting header fields */
- flags |= IP_RAWOUTPUT;
- ipstat.ips_rawout++;
- }
- return (ip_output(m, inp->inp_options, &inp->inp_route, flags,
- inp->inp_moptions));
-}
-
-/*
- * Raw IP socket option processing.
- */
-int
-rip_ctloutput(op, so, level, optname, m)
- int op;
- struct socket *so;
- int level, optname;
- struct mbuf **m;
-{
- register struct inpcb *inp = sotoinpcb(so);
- register int error;
-
- if (level != IPPROTO_IP) {
- if (op == PRCO_SETOPT && *m)
- (void)m_free(*m);
- return (EINVAL);
- }
-
- switch (optname) {
-
- case IP_HDRINCL:
- error = 0;
- if (op == PRCO_SETOPT) {
- if (m == 0 || *m == 0 || (*m)->m_len < sizeof (int))
- error = EINVAL;
- else if (*mtod(*m, int *))
- inp->inp_flags |= INP_HDRINCL;
- else
- inp->inp_flags &= ~INP_HDRINCL;
- if (*m)
- (void)m_free(*m);
- } else {
- *m = m_get(M_WAIT, MT_SOOPTS);
- (*m)->m_len = sizeof (int);
- *mtod(*m, int *) = inp->inp_flags & INP_HDRINCL;
- }
- return (error);
-
-#ifdef COMPAT_IPFW
- case IP_FW_GET:
- if (ip_fw_ctl_ptr == NULL || op == PRCO_SETOPT) {
- if (*m) (void)m_free(*m);
- return(EINVAL);
- }
- return (*ip_fw_ctl_ptr)(optname, m);
-
- case IP_FW_ADD:
- case IP_FW_DEL:
- case IP_FW_FLUSH:
- case IP_FW_ZERO:
- if (ip_fw_ctl_ptr == NULL || op != PRCO_SETOPT) {
- if (*m) (void)m_free(*m);
- return(EINVAL);
- }
- return (*ip_fw_ctl_ptr)(optname, m);
-
- case IP_NAT:
- if (ip_nat_ctl_ptr == NULL) {
- if (*m) (void)m_free(*m);
- return(EINVAL);
- }
- return (*ip_nat_ctl_ptr)(op, m);
-
-#endif
- case IP_RSVP_ON:
- return ip_rsvp_init(so);
- break;
-
- case IP_RSVP_OFF:
- return ip_rsvp_done();
- break;
-
- case IP_RSVP_VIF_ON:
- return ip_rsvp_vif_init(so, *m);
-
- case IP_RSVP_VIF_OFF:
- return ip_rsvp_vif_done(so, *m);
-
- case MRT_INIT:
- case MRT_DONE:
- case MRT_ADD_VIF:
- case MRT_DEL_VIF:
- case MRT_ADD_MFC:
- case MRT_DEL_MFC:
- case MRT_VERSION:
- case MRT_ASSERT:
- if (op == PRCO_SETOPT) {
- error = ip_mrouter_set(optname, so, *m);
- if (*m)
- (void)m_free(*m);
- } else if (op == PRCO_GETOPT) {
- error = ip_mrouter_get(optname, so, m);
- } else
- error = EINVAL;
- return (error);
- }
- return (ip_ctloutput(op, so, level, optname, m));
-}
-
-static u_long rip_sendspace = RIPSNDQ; /* XXX sysctl ? */
-static u_long rip_recvspace = RIPRCVQ; /* XXX sysctl ? */
-
-/*ARGSUSED*/
-int
-rip_usrreq(so, req, m, nam, control)
- register struct socket *so;
- int req;
- struct mbuf *m, *nam, *control;
-{
- register int error = 0;
- register struct inpcb *inp = sotoinpcb(so);
- int s;
-
- if (req == PRU_CONTROL)
- return (in_control(so, (u_long)m, (caddr_t)nam,
- (struct ifnet *)control));
-
- switch (req) {
-
- case PRU_ATTACH:
- if (inp)
- panic("rip_attach");
- if ((so->so_state & SS_PRIV) == 0) {
- error = EACCES;
- break;
- }
- s = splnet();
- error = in_pcballoc(so, &ripcbinfo);
- splx(s);
- if (error)
- break;
- error = soreserve(so, rip_sendspace, rip_recvspace);
- if (error)
- break;
- inp = (struct inpcb *)so->so_pcb;
- inp->inp_ip_p = (int)nam;
- break;
-
- case PRU_DISCONNECT:
- if ((so->so_state & SS_ISCONNECTED) == 0) {
- error = ENOTCONN;
- break;
- }
- /* FALLTHROUGH */
- case PRU_ABORT:
- soisdisconnected(so);
- /* FALLTHROUGH */
- case PRU_DETACH:
- if (inp == 0)
- panic("rip_detach");
- if (so == ip_mrouter)
- ip_mrouter_done();
- ip_rsvp_force_done(so);
- if (so == ip_rsvpd)
- ip_rsvp_done();
- in_pcbdetach(inp);
- break;
-
- case PRU_BIND:
- {
- struct sockaddr_in *addr = mtod(nam, struct sockaddr_in *);
-
- if (nam->m_len != sizeof(*addr)) {
- error = EINVAL;
- break;
- }
- if ((ifnet == 0) ||
- ((addr->sin_family != AF_INET) &&
- (addr->sin_family != AF_IMPLINK)) ||
- (addr->sin_addr.s_addr &&
- ifa_ifwithaddr((struct sockaddr *)addr) == 0)) {
- error = EADDRNOTAVAIL;
- break;
- }
- inp->inp_laddr = addr->sin_addr;
- break;
- }
- case PRU_CONNECT:
- {
- struct sockaddr_in *addr = mtod(nam, struct sockaddr_in *);
-
- if (nam->m_len != sizeof(*addr)) {
- error = EINVAL;
- break;
- }
- if (ifnet == 0) {
- error = EADDRNOTAVAIL;
- break;
- }
- if ((addr->sin_family != AF_INET) &&
- (addr->sin_family != AF_IMPLINK)) {
- error = EAFNOSUPPORT;
- break;
- }
- inp->inp_faddr = addr->sin_addr;
- soisconnected(so);
- break;
- }
-
- case PRU_CONNECT2:
- error = EOPNOTSUPP;
- break;
-
- /*
- * Mark the connection as being incapable of further input.
- */
- case PRU_SHUTDOWN:
- socantsendmore(so);
- break;
-
- /*
- * Ship a packet out. The appropriate raw output
- * routine handles any massaging necessary.
- */
- case PRU_SEND:
- {
- register u_long dst;
-
- if (so->so_state & SS_ISCONNECTED) {
- if (nam) {
- error = EISCONN;
- break;
- }
- dst = inp->inp_faddr.s_addr;
- } else {
- if (nam == NULL) {
- error = ENOTCONN;
- break;
- }
- dst = mtod(nam, struct sockaddr_in *)->sin_addr.s_addr;
- }
- error = rip_output(m, so, dst);
- m = NULL;
- break;
- }
-
- case PRU_SENSE:
- /*
- * stat: don't bother with a blocksize.
- */
- return (0);
-
- /*
- * Not supported.
- */
- case PRU_RCVOOB:
- case PRU_RCVD:
- case PRU_LISTEN:
- case PRU_ACCEPT:
- case PRU_SENDOOB:
- error = EOPNOTSUPP;
- break;
-
- case PRU_SOCKADDR:
- in_setsockaddr(inp, nam);
- break;
-
- case PRU_PEERADDR:
- in_setpeeraddr(inp, nam);
- break;
-
- default:
- panic("rip_usrreq");
- }
- if (m != NULL)
- m_freem(m);
- return (error);
-}
diff --git a/c/src/exec/libnetworking/netinet/tcp.h b/c/src/exec/libnetworking/netinet/tcp.h
deleted file mode 100644
index 3585917aa3..0000000000
--- a/c/src/exec/libnetworking/netinet/tcp.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)tcp.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _NETINET_TCP_H_
-#define _NETINET_TCP_H_
-
-typedef u_long tcp_seq;
-typedef u_long tcp_cc; /* connection count per rfc1644 */
-
-/*
- * TCP header.
- * Per RFC 793, September, 1981.
- */
-struct tcphdr {
- u_short th_sport; /* source port */
- u_short th_dport; /* destination port */
- tcp_seq th_seq; /* sequence number */
- tcp_seq th_ack; /* acknowledgement number */
-#if BYTE_ORDER == LITTLE_ENDIAN
- u_char th_x2:4, /* (unused) */
- th_off:4; /* data offset */
-#endif
-#if BYTE_ORDER == BIG_ENDIAN
- u_char th_off:4, /* data offset */
- th_x2:4; /* (unused) */
-#endif
- u_char th_flags;
-#define TH_FIN 0x01
-#define TH_SYN 0x02
-#define TH_RST 0x04
-#define TH_PUSH 0x08
-#define TH_ACK 0x10
-#define TH_URG 0x20
-#define TH_FLAGS (TH_FIN|TH_SYN|TH_RST|TH_ACK|TH_URG)
-
- u_short th_win; /* window */
- u_short th_sum; /* checksum */
- u_short th_urp; /* urgent pointer */
-};
-
-#define TCPOPT_EOL 0
-#define TCPOPT_NOP 1
-#define TCPOPT_MAXSEG 2
-#define TCPOLEN_MAXSEG 4
-#define TCPOPT_WINDOW 3
-#define TCPOLEN_WINDOW 3
-#define TCPOPT_SACK_PERMITTED 4 /* Experimental */
-#define TCPOLEN_SACK_PERMITTED 2
-#define TCPOPT_SACK 5 /* Experimental */
-#define TCPOPT_TIMESTAMP 8
-#define TCPOLEN_TIMESTAMP 10
-#define TCPOLEN_TSTAMP_APPA (TCPOLEN_TIMESTAMP+2) /* appendix A */
-#define TCPOPT_TSTAMP_HDR \
- (TCPOPT_NOP<<24|TCPOPT_NOP<<16|TCPOPT_TIMESTAMP<<8|TCPOLEN_TIMESTAMP)
-
-#define TCPOPT_CC 11 /* CC options: RFC-1644 */
-#define TCPOPT_CCNEW 12
-#define TCPOPT_CCECHO 13
-#define TCPOLEN_CC 6
-#define TCPOLEN_CC_APPA (TCPOLEN_CC+2)
-#define TCPOPT_CC_HDR(ccopt) \
- (TCPOPT_NOP<<24|TCPOPT_NOP<<16|(ccopt)<<8|TCPOLEN_CC)
-
-/*
- * Default maximum segment size for TCP.
- * With an IP MSS of 576, this is 536,
- * but 512 is probably more convenient.
- * This should be defined as MIN(512, IP_MSS - sizeof (struct tcpiphdr)).
- */
-#define TCP_MSS 512
-
-#define TCP_MAXWIN 65535 /* largest value for (unscaled) window */
-#define TTCP_CLIENT_SND_WND 4096 /* dflt send window for T/TCP client */
-
-#define TCP_MAX_WINSHIFT 14 /* maximum window shift */
-
-#define TCP_MAXHLEN (0xf<<2) /* max length of header in bytes */
-#define TCP_MAXOLEN (TCP_MAXHLEN - sizeof(struct tcphdr))
- /* max space left for options */
-
-/*
- * User-settable options (used with setsockopt).
- */
-#define TCP_NODELAY 0x01 /* don't delay send to coalesce packets */
-#define TCP_MAXSEG 0x02 /* set maximum segment size */
-#define TCP_NOPUSH 0x04 /* don't push last block of write */
-#define TCP_NOOPT 0x08 /* don't use TCP options */
-
-#endif
diff --git a/c/src/exec/libnetworking/netinet/tcp_debug.c b/c/src/exec/libnetworking/netinet/tcp_debug.c
deleted file mode 100644
index 2f88ae658e..0000000000
--- a/c/src/exec/libnetworking/netinet/tcp_debug.c
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)tcp_debug.c 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#include "opt_tcpdebug.h"
-
-#ifdef TCPDEBUG
-/* load symbolic names */
-#define PRUREQUESTS
-#define TCPSTATES
-#define TCPTIMERS
-#define TANAMES
-#endif
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/systm.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/protosw.h>
-#include <sys/errno.h>
-
-#include <net/route.h>
-#include <net/if.h>
-
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/in_pcb.h>
-#include <netinet/ip_var.h>
-#include <netinet/tcp.h>
-#include <netinet/tcp_fsm.h>
-#include <netinet/tcp_seq.h>
-#include <netinet/tcp_timer.h>
-#include <netinet/tcp_var.h>
-#include <netinet/tcpip.h>
-#include <netinet/tcp_debug.h>
-
-#ifdef TCPDEBUG
-static int tcpconsdebug = 0; /* set to 1 to enable prints */
-#endif
-
-static struct tcp_debug tcp_debug[TCP_NDEBUG];
-static int tcp_debx;
-
-/*
- * Tcp debug routines
- */
-void
-tcp_trace(act, ostate, tp, ti, req)
- short act, ostate;
- struct tcpcb *tp;
- struct tcpiphdr *ti;
- int req;
-{
-#ifdef TCPDEBUG
- tcp_seq seq, ack;
- int len, flags;
-#endif
- struct tcp_debug *td = &tcp_debug[tcp_debx++];
-
- if (tcp_debx == TCP_NDEBUG)
- tcp_debx = 0;
- td->td_time = iptime();
- td->td_act = act;
- td->td_ostate = ostate;
- td->td_tcb = (caddr_t)tp;
- if (tp)
- td->td_cb = *tp;
- else
- bzero((caddr_t)&td->td_cb, sizeof (*tp));
- if (ti)
- td->td_ti = *ti;
- else
- bzero((caddr_t)&td->td_ti, sizeof (*ti));
- td->td_req = req;
-#ifdef TCPDEBUG
- if (tcpconsdebug == 0)
- return;
- if (tp)
- printf("%p %s:", tp, tcpstates[ostate]);
- else
- printf("???????? ");
- printf("%s ", tanames[act]);
- switch (act) {
-
- case TA_INPUT:
- case TA_OUTPUT:
- case TA_DROP:
- if (ti == 0)
- break;
- seq = ti->ti_seq;
- ack = ti->ti_ack;
- len = ti->ti_len;
- if (act == TA_OUTPUT) {
- seq = ntohl(seq);
- ack = ntohl(ack);
- len = ntohs((u_short)len);
- }
- if (act == TA_OUTPUT)
- len -= sizeof (struct tcphdr);
- if (len)
- printf("[%x..%x)", seq, seq+len);
- else
- printf("%x", seq);
- printf("@%x, urp=%x", ack, ti->ti_urp);
- flags = ti->ti_flags;
- if (flags) {
- char *cp = "<";
-#define pf(f) { \
- if (ti->ti_flags & TH_##f) { \
- printf("%s%s", cp, #f); \
- cp = ","; \
- } \
-}
- pf(SYN); pf(ACK); pf(FIN); pf(RST); pf(PUSH); pf(URG);
- printf(">");
- }
- break;
-
- case TA_USER:
- printf("%s", prurequests[req&0xff]);
- if ((req & 0xff) == PRU_SLOWTIMO)
- printf("<%s>", tcptimers[req>>8]);
- break;
- }
- if (tp)
- printf(" -> %s", tcpstates[tp->t_state]);
- /* print out internal state of tp !?! */
- printf("\n");
- if (tp == 0)
- return;
- printf("\trcv_(nxt,wnd,up) (%x,%x,%x) snd_(una,nxt,max) (%x,%x,%x)\n",
- tp->rcv_nxt, tp->rcv_wnd, tp->rcv_up, tp->snd_una, tp->snd_nxt,
- tp->snd_max);
- printf("\tsnd_(wl1,wl2,wnd) (%x,%x,%x)\n",
- tp->snd_wl1, tp->snd_wl2, tp->snd_wnd);
-#endif /* TCPDEBUG */
-}
diff --git a/c/src/exec/libnetworking/netinet/tcp_debug.h b/c/src/exec/libnetworking/netinet/tcp_debug.h
deleted file mode 100644
index a33743b077..0000000000
--- a/c/src/exec/libnetworking/netinet/tcp_debug.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)tcp_debug.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _NETINET_TCP_DEBUG_H_
-#define _NETINET_TCP_DEBUG_H_
-
-struct tcp_debug {
- n_time td_time;
- short td_act;
- short td_ostate;
- caddr_t td_tcb;
- struct tcpiphdr td_ti;
- short td_req;
- struct tcpcb td_cb;
-};
-
-#define TA_INPUT 0
-#define TA_OUTPUT 1
-#define TA_USER 2
-#define TA_RESPOND 3
-#define TA_DROP 4
-
-#ifdef TANAMES
-static char *tanames[] =
- { "input", "output", "user", "respond", "drop" };
-#endif
-
-#define TCP_NDEBUG 100
-
-#ifndef KERNEL
-/* XXX common variables for broken applications. */
-struct tcp_debug tcp_debug[TCP_NDEBUG];
-int tcp_debx;
-#endif
-
-#endif /* !_NETINET_TCP_DEBUG_H_ */
diff --git a/c/src/exec/libnetworking/netinet/tcp_fsm.h b/c/src/exec/libnetworking/netinet/tcp_fsm.h
deleted file mode 100644
index 3f2c12f54f..0000000000
--- a/c/src/exec/libnetworking/netinet/tcp_fsm.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)tcp_fsm.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _NETINET_TCP_FSM_H_
-#define _NETINET_TCP_FSM_H_
-
-/*
- * TCP FSM state definitions.
- * Per RFC793, September, 1981.
- */
-
-#define TCP_NSTATES 11
-
-#define TCPS_CLOSED 0 /* closed */
-#define TCPS_LISTEN 1 /* listening for connection */
-#define TCPS_SYN_SENT 2 /* active, have sent syn */
-#define TCPS_SYN_RECEIVED 3 /* have send and received syn */
-/* states < TCPS_ESTABLISHED are those where connections not established */
-#define TCPS_ESTABLISHED 4 /* established */
-#define TCPS_CLOSE_WAIT 5 /* rcvd fin, waiting for close */
-/* states > TCPS_CLOSE_WAIT are those where user has closed */
-#define TCPS_FIN_WAIT_1 6 /* have closed, sent fin */
-#define TCPS_CLOSING 7 /* closed xchd FIN; await FIN ACK */
-#define TCPS_LAST_ACK 8 /* had fin and close; await FIN ACK */
-/* states > TCPS_CLOSE_WAIT && < TCPS_FIN_WAIT_2 await ACK of FIN */
-#define TCPS_FIN_WAIT_2 9 /* have closed, fin is acked */
-#define TCPS_TIME_WAIT 10 /* in 2*msl quiet wait after close */
-
-#define TCPS_HAVERCVDSYN(s) ((s) >= TCPS_SYN_RECEIVED)
-#define TCPS_HAVEESTABLISHED(s) ((s) >= TCPS_ESTABLISHED)
-#define TCPS_HAVERCVDFIN(s) ((s) >= TCPS_TIME_WAIT)
-
-#ifdef TCPOUTFLAGS
-/*
- * Flags used when sending segments in tcp_output.
- * Basic flags (TH_RST,TH_ACK,TH_SYN,TH_FIN) are totally
- * determined by state, with the proviso that TH_FIN is sent only
- * if all data queued for output is included in the segment.
- */
-static u_char tcp_outflags[TCP_NSTATES] = {
- TH_RST|TH_ACK, 0, TH_SYN, TH_SYN|TH_ACK,
- TH_ACK, TH_ACK,
- TH_FIN|TH_ACK, TH_FIN|TH_ACK, TH_FIN|TH_ACK, TH_ACK, TH_ACK,
-};
-#endif
-
-#ifdef KPROF
-int tcp_acounts[TCP_NSTATES][PRU_NREQ];
-#endif
-
-#ifdef TCPSTATES
-char *tcpstates[] = {
- "CLOSED", "LISTEN", "SYN_SENT", "SYN_RCVD",
- "ESTABLISHED", "CLOSE_WAIT", "FIN_WAIT_1", "CLOSING",
- "LAST_ACK", "FIN_WAIT_2", "TIME_WAIT",
-};
-#endif
-
-#endif
diff --git a/c/src/exec/libnetworking/netinet/tcp_input.c b/c/src/exec/libnetworking/netinet/tcp_input.c
deleted file mode 100644
index 12e4dad03f..0000000000
--- a/c/src/exec/libnetworking/netinet/tcp_input.c
+++ /dev/null
@@ -1,2150 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1994, 1995
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)tcp_input.c 8.12 (Berkeley) 5/24/95
- * $Id$
- */
-
-#include "opt_tcpdebug.h"
-
-#ifndef TUBA_INCLUDE
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/sysctl.h>
-#include <sys/malloc.h>
-#include <sys/mbuf.h>
-#include <sys/protosw.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/errno.h>
-#include <sys/syslog.h>
-
-#include <machine/cpu.h> /* before tcp_seq.h, for tcp_random18() */
-
-#include <net/if.h>
-#include <net/route.h>
-
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/in_pcb.h>
-#include <netinet/ip_var.h>
-#include <netinet/tcp.h>
-#include <netinet/tcp_fsm.h>
-#include <netinet/tcp_seq.h>
-#include <netinet/tcp_timer.h>
-#include <netinet/tcp_var.h>
-#include <netinet/tcpip.h>
-#ifdef TCPDEBUG
-#include <netinet/tcp_debug.h>
-static struct tcpiphdr tcp_saveti;
-#endif
-
-static int tcprexmtthresh = 3;
-tcp_seq tcp_iss;
-tcp_cc tcp_ccgen;
-
-struct tcpstat tcpstat;
-SYSCTL_STRUCT(_net_inet_tcp, TCPCTL_STATS, stats,
- CTLFLAG_RD, &tcpstat , tcpstat, "");
-
-static int log_in_vain = 0;
-SYSCTL_INT(_net_inet_tcp, OID_AUTO, log_in_vain, CTLFLAG_RW,
- &log_in_vain, 0, "");
-
-u_long tcp_now;
-struct inpcbhead tcb;
-struct inpcbinfo tcbinfo;
-
-static void tcp_dooptions __P((struct tcpcb *,
- u_char *, int, struct tcpiphdr *, struct tcpopt *));
-static void tcp_pulloutofband __P((struct socket *,
- struct tcpiphdr *, struct mbuf *));
-static int tcp_reass __P((struct tcpcb *, struct tcpiphdr *, struct mbuf *));
-static void tcp_xmit_timer __P((struct tcpcb *, int));
-
-#endif /* TUBA_INCLUDE */
-
-/*
- * Insert segment ti into reassembly queue of tcp with
- * control block tp. Return TH_FIN if reassembly now includes
- * a segment with FIN. The macro form does the common case inline
- * (segment is the next to be received on an established connection,
- * and the queue is empty), avoiding linkage into and removal
- * from the queue and repetition of various conversions.
- * Set DELACK for segments received in order, but ack immediately
- * when segments are out of order (so fast retransmit can work).
- */
-#ifdef TCP_ACK_HACK
-#define TCP_REASS(tp, ti, m, so, flags) { \
- if ((ti)->ti_seq == (tp)->rcv_nxt && \
- (tp)->seg_next == (struct tcpiphdr *)(tp) && \
- (tp)->t_state == TCPS_ESTABLISHED) { \
- if (ti->ti_flags & TH_PUSH) \
- tp->t_flags |= TF_ACKNOW; \
- else \
- tp->t_flags |= TF_DELACK; \
- (tp)->rcv_nxt += (ti)->ti_len; \
- flags = (ti)->ti_flags & TH_FIN; \
- tcpstat.tcps_rcvpack++;\
- tcpstat.tcps_rcvbyte += (ti)->ti_len;\
- sbappend(&(so)->so_rcv, (m)); \
- sorwakeup(so); \
- } else { \
- (flags) = tcp_reass((tp), (ti), (m)); \
- tp->t_flags |= TF_ACKNOW; \
- } \
-}
-#else
-#define TCP_REASS(tp, ti, m, so, flags) { \
- if ((ti)->ti_seq == (tp)->rcv_nxt && \
- (tp)->seg_next == (struct tcpiphdr *)(tp) && \
- (tp)->t_state == TCPS_ESTABLISHED) { \
- tp->t_flags |= TF_DELACK; \
- (tp)->rcv_nxt += (ti)->ti_len; \
- flags = (ti)->ti_flags & TH_FIN; \
- tcpstat.tcps_rcvpack++;\
- tcpstat.tcps_rcvbyte += (ti)->ti_len;\
- sbappend(&(so)->so_rcv, (m)); \
- sorwakeup(so); \
- } else { \
- (flags) = tcp_reass((tp), (ti), (m)); \
- tp->t_flags |= TF_ACKNOW; \
- } \
-}
-#endif
-#ifndef TUBA_INCLUDE
-
-static int
-tcp_reass(tp, ti, m)
- register struct tcpcb *tp;
- register struct tcpiphdr *ti;
- struct mbuf *m;
-{
- register struct tcpiphdr *q;
- struct socket *so = tp->t_inpcb->inp_socket;
- int flags;
-
- /*
- * Call with ti==0 after become established to
- * force pre-ESTABLISHED data up to user socket.
- */
- if (ti == 0)
- goto present;
-
- /*
- * Find a segment which begins after this one does.
- */
- for (q = tp->seg_next; q != (struct tcpiphdr *)tp;
- q = (struct tcpiphdr *)q->ti_next)
- if (SEQ_GT(q->ti_seq, ti->ti_seq))
- break;
-
- /*
- * If there is a preceding segment, it may provide some of
- * our data already. If so, drop the data from the incoming
- * segment. If it provides all of our data, drop us.
- */
- if ((struct tcpiphdr *)q->ti_prev != (struct tcpiphdr *)tp) {
- register int i;
- q = (struct tcpiphdr *)q->ti_prev;
- /* conversion to int (in i) handles seq wraparound */
- i = q->ti_seq + q->ti_len - ti->ti_seq;
- if (i > 0) {
- if (i >= ti->ti_len) {
- tcpstat.tcps_rcvduppack++;
- tcpstat.tcps_rcvdupbyte += ti->ti_len;
- m_freem(m);
- /*
- * Try to present any queued data
- * at the left window edge to the user.
- * This is needed after the 3-WHS
- * completes.
- */
- goto present; /* ??? */
- }
- m_adj(m, i);
- ti->ti_len -= i;
- ti->ti_seq += i;
- }
- q = (struct tcpiphdr *)(q->ti_next);
- }
- tcpstat.tcps_rcvoopack++;
- tcpstat.tcps_rcvoobyte += ti->ti_len;
- REASS_MBUF(ti) = m; /* XXX */
-
- /*
- * While we overlap succeeding segments trim them or,
- * if they are completely covered, dequeue them.
- */
- while (q != (struct tcpiphdr *)tp) {
- register int i = (ti->ti_seq + ti->ti_len) - q->ti_seq;
- if (i <= 0)
- break;
- if (i < q->ti_len) {
- q->ti_seq += i;
- q->ti_len -= i;
- m_adj(REASS_MBUF(q), i);
- break;
- }
- q = (struct tcpiphdr *)q->ti_next;
- m = REASS_MBUF((struct tcpiphdr *)q->ti_prev);
- remque(q->ti_prev);
- m_freem(m);
- }
-
- /*
- * Stick new segment in its place.
- */
- insque(ti, q->ti_prev);
-
-present:
- /*
- * Present data to user, advancing rcv_nxt through
- * completed sequence space.
- */
- if (!TCPS_HAVEESTABLISHED(tp->t_state))
- return (0);
- ti = tp->seg_next;
- if (ti == (struct tcpiphdr *)tp || ti->ti_seq != tp->rcv_nxt)
- return (0);
- do {
- tp->rcv_nxt += ti->ti_len;
- flags = ti->ti_flags & TH_FIN;
- remque(ti);
- m = REASS_MBUF(ti);
- ti = (struct tcpiphdr *)ti->ti_next;
- if (so->so_state & SS_CANTRCVMORE)
- m_freem(m);
- else
- sbappend(&so->so_rcv, m);
- } while (ti != (struct tcpiphdr *)tp && ti->ti_seq == tp->rcv_nxt);
- sorwakeup(so);
- return (flags);
-}
-
-/*
- * TCP input routine, follows pages 65-76 of the
- * protocol specification dated September, 1981 very closely.
- */
-void
-tcp_input(m, iphlen)
- register struct mbuf *m;
- int iphlen;
-{
- register struct tcpiphdr *ti;
- register struct inpcb *inp;
- u_char *optp = NULL;
- int optlen = 0;
- int len, tlen, off;
- register struct tcpcb *tp = 0;
- register int tiflags;
- struct socket *so = 0;
- int todrop, acked, ourfinisacked, needoutput = 0;
- struct in_addr laddr;
- int dropsocket = 0;
- int iss = 0;
- u_long tiwin;
- struct tcpopt to; /* options in this segment */
- struct rmxp_tao *taop; /* pointer to our TAO cache entry */
- struct rmxp_tao tao_noncached; /* in case there's no cached entry */
-#ifdef TCPDEBUG
- short ostate = 0;
-#endif
-
- bzero((char *)&to, sizeof(to));
-
- tcpstat.tcps_rcvtotal++;
- /*
- * Get IP and TCP header together in first mbuf.
- * Note: IP leaves IP header in first mbuf.
- */
- ti = mtod(m, struct tcpiphdr *);
- if (iphlen > sizeof (struct ip))
- ip_stripoptions(m, (struct mbuf *)0);
- if (m->m_len < sizeof (struct tcpiphdr)) {
- if ((m = m_pullup(m, sizeof (struct tcpiphdr))) == 0) {
- tcpstat.tcps_rcvshort++;
- return;
- }
- ti = mtod(m, struct tcpiphdr *);
- }
-
- /*
- * Checksum extended TCP header and data.
- */
- tlen = ((struct ip *)ti)->ip_len;
- len = sizeof (struct ip) + tlen;
- ti->ti_next = ti->ti_prev = 0;
- ti->ti_x1 = 0;
- ti->ti_len = (u_short)tlen;
- HTONS(ti->ti_len);
- ti->ti_sum = in_cksum(m, len);
- if (ti->ti_sum) {
- tcpstat.tcps_rcvbadsum++;
- goto drop;
- }
-#endif /* TUBA_INCLUDE */
-
- /*
- * Check that TCP offset makes sense,
- * pull out TCP options and adjust length. XXX
- */
- off = ti->ti_off << 2;
- if (off < sizeof (struct tcphdr) || off > tlen) {
- tcpstat.tcps_rcvbadoff++;
- goto drop;
- }
- tlen -= off;
- ti->ti_len = tlen;
- if (off > sizeof (struct tcphdr)) {
- if (m->m_len < sizeof(struct ip) + off) {
- if ((m = m_pullup(m, sizeof (struct ip) + off)) == 0) {
- tcpstat.tcps_rcvshort++;
- return;
- }
- ti = mtod(m, struct tcpiphdr *);
- }
- optlen = off - sizeof (struct tcphdr);
- optp = mtod(m, u_char *) + sizeof (struct tcpiphdr);
- }
- tiflags = ti->ti_flags;
-
- /*
- * Convert TCP protocol specific fields to host format.
- */
- NTOHL(ti->ti_seq);
- NTOHL(ti->ti_ack);
- NTOHS(ti->ti_win);
- NTOHS(ti->ti_urp);
-
- /*
- * Drop TCP, IP headers and TCP options.
- */
- m->m_data += sizeof(struct tcpiphdr)+off-sizeof(struct tcphdr);
- m->m_len -= sizeof(struct tcpiphdr)+off-sizeof(struct tcphdr);
-
- /*
- * Locate pcb for segment.
- */
-findpcb:
- inp = in_pcblookuphash(&tcbinfo, ti->ti_src, ti->ti_sport,
- ti->ti_dst, ti->ti_dport, 1);
-
- /*
- * If the state is CLOSED (i.e., TCB does not exist) then
- * all data in the incoming segment is discarded.
- * If the TCB exists but is in CLOSED state, it is embryonic,
- * but should either do a listen or a connect soon.
- */
- if (inp == NULL) {
- if (log_in_vain && tiflags & TH_SYN) {
- char buf[4*sizeof "123"];
-
- strcpy(buf, inet_ntoa(ti->ti_dst));
- log(LOG_INFO, "Connection attempt to TCP %s:%d"
- " from %s:%d\n",
- buf, ntohs(ti->ti_dport),
- inet_ntoa(ti->ti_src), ntohs(ti->ti_sport));
- }
- goto dropwithreset;
- }
- tp = intotcpcb(inp);
- if (tp == 0)
- goto dropwithreset;
- if (tp->t_state == TCPS_CLOSED)
- goto drop;
-
- /* Unscale the window into a 32-bit value. */
- if ((tiflags & TH_SYN) == 0)
- tiwin = ti->ti_win << tp->snd_scale;
- else
- tiwin = ti->ti_win;
-
- so = inp->inp_socket;
- if (so->so_options & (SO_DEBUG|SO_ACCEPTCONN)) {
-#ifdef TCPDEBUG
- if (so->so_options & SO_DEBUG) {
- ostate = tp->t_state;
- tcp_saveti = *ti;
- }
-#endif
- if (so->so_options & SO_ACCEPTCONN) {
- register struct tcpcb *tp0 = tp;
- struct socket *so2;
- if ((tiflags & (TH_RST|TH_ACK|TH_SYN)) != TH_SYN) {
- /*
- * Note: dropwithreset makes sure we don't
- * send a RST in response to a RST.
- */
- if (tiflags & TH_ACK) {
- tcpstat.tcps_badsyn++;
- goto dropwithreset;
- }
- goto drop;
- }
- so2 = sonewconn(so, 0);
- if (so2 == 0) {
- tcpstat.tcps_listendrop++;
- so2 = sodropablereq(so);
- if (so2) {
- tcp_drop(sototcpcb(so2), ETIMEDOUT);
- so2 = sonewconn(so, 0);
- }
- if (!so2)
- goto drop;
- }
- so = so2;
- /*
- * This is ugly, but ....
- *
- * Mark socket as temporary until we're
- * committed to keeping it. The code at
- * ``drop'' and ``dropwithreset'' check the
- * flag dropsocket to see if the temporary
- * socket created here should be discarded.
- * We mark the socket as discardable until
- * we're committed to it below in TCPS_LISTEN.
- */
- dropsocket++;
- inp = (struct inpcb *)so->so_pcb;
- inp->inp_laddr = ti->ti_dst;
- inp->inp_lport = ti->ti_dport;
- in_pcbrehash(inp);
-#if BSD>=43
- inp->inp_options = ip_srcroute();
-#endif
- tp = intotcpcb(inp);
- tp->t_state = TCPS_LISTEN;
- tp->t_flags |= tp0->t_flags & (TF_NOPUSH|TF_NOOPT);
-
- /* Compute proper scaling value from buffer space */
- while (tp->request_r_scale < TCP_MAX_WINSHIFT &&
- TCP_MAXWIN << tp->request_r_scale < so->so_rcv.sb_hiwat)
- tp->request_r_scale++;
- }
- }
-
- /*
- * Segment received on connection.
- * Reset idle time and keep-alive timer.
- */
- tp->t_idle = 0;
- if (TCPS_HAVEESTABLISHED(tp->t_state))
- tp->t_timer[TCPT_KEEP] = tcp_keepidle;
-
- /*
- * Process options if not in LISTEN state,
- * else do it below (after getting remote address).
- */
- if (tp->t_state != TCPS_LISTEN)
- tcp_dooptions(tp, optp, optlen, ti, &to);
-
- /*
- * Header prediction: check for the two common cases
- * of a uni-directional data xfer. If the packet has
- * no control flags, is in-sequence, the window didn't
- * change and we're not retransmitting, it's a
- * candidate. If the length is zero and the ack moved
- * forward, we're the sender side of the xfer. Just
- * free the data acked & wake any higher level process
- * that was blocked waiting for space. If the length
- * is non-zero and the ack didn't move, we're the
- * receiver side. If we're getting packets in-order
- * (the reassembly queue is empty), add the data to
- * the socket buffer and note that we need a delayed ack.
- * Make sure that the hidden state-flags are also off.
- * Since we check for TCPS_ESTABLISHED above, it can only
- * be TH_NEEDSYN.
- */
- if (tp->t_state == TCPS_ESTABLISHED &&
- (tiflags & (TH_SYN|TH_FIN|TH_RST|TH_URG|TH_ACK)) == TH_ACK &&
- ((tp->t_flags & (TF_NEEDSYN|TF_NEEDFIN)) == 0) &&
- ((to.to_flag & TOF_TS) == 0 ||
- TSTMP_GEQ(to.to_tsval, tp->ts_recent)) &&
- /*
- * Using the CC option is compulsory if once started:
- * the segment is OK if no T/TCP was negotiated or
- * if the segment has a CC option equal to CCrecv
- */
- ((tp->t_flags & (TF_REQ_CC|TF_RCVD_CC)) != (TF_REQ_CC|TF_RCVD_CC) ||
- ((to.to_flag & TOF_CC) != 0 && to.to_cc == tp->cc_recv)) &&
- ti->ti_seq == tp->rcv_nxt &&
- tiwin && tiwin == tp->snd_wnd &&
- tp->snd_nxt == tp->snd_max) {
-
- /*
- * If last ACK falls within this segment's sequence numbers,
- * record the timestamp.
- * NOTE that the test is modified according to the latest
- * proposal of the tcplw@cray.com list (Braden 1993/04/26).
- */
- if ((to.to_flag & TOF_TS) != 0 &&
- SEQ_LEQ(ti->ti_seq, tp->last_ack_sent)) {
- tp->ts_recent_age = tcp_now;
- tp->ts_recent = to.to_tsval;
- }
-
- if (ti->ti_len == 0) {
- if (SEQ_GT(ti->ti_ack, tp->snd_una) &&
- SEQ_LEQ(ti->ti_ack, tp->snd_max) &&
- tp->snd_cwnd >= tp->snd_wnd &&
- tp->t_dupacks < tcprexmtthresh) {
- /*
- * this is a pure ack for outstanding data.
- */
- ++tcpstat.tcps_predack;
- if ((to.to_flag & TOF_TS) != 0)
- tcp_xmit_timer(tp,
- tcp_now - to.to_tsecr + 1);
- else if (tp->t_rtt &&
- SEQ_GT(ti->ti_ack, tp->t_rtseq))
- tcp_xmit_timer(tp, tp->t_rtt);
- acked = ti->ti_ack - tp->snd_una;
- tcpstat.tcps_rcvackpack++;
- tcpstat.tcps_rcvackbyte += acked;
- sbdrop(&so->so_snd, acked);
- tp->snd_una = ti->ti_ack;
- m_freem(m);
-
- /*
- * If all outstanding data are acked, stop
- * retransmit timer, otherwise restart timer
- * using current (possibly backed-off) value.
- * If process is waiting for space,
- * wakeup/selwakeup/signal. If data
- * are ready to send, let tcp_output
- * decide between more output or persist.
- */
- if (tp->snd_una == tp->snd_max)
- tp->t_timer[TCPT_REXMT] = 0;
- else if (tp->t_timer[TCPT_PERSIST] == 0)
- tp->t_timer[TCPT_REXMT] = tp->t_rxtcur;
-
- if (so->so_snd.sb_flags & SB_NOTIFY)
- sowwakeup(so);
- if (so->so_snd.sb_cc)
- (void) tcp_output(tp);
- return;
- }
- } else if (ti->ti_ack == tp->snd_una &&
- tp->seg_next == (struct tcpiphdr *)tp &&
- ti->ti_len <= sbspace(&so->so_rcv)) {
- /*
- * this is a pure, in-sequence data packet
- * with nothing on the reassembly queue and
- * we have enough buffer space to take it.
- */
- ++tcpstat.tcps_preddat;
- tp->rcv_nxt += ti->ti_len;
- tcpstat.tcps_rcvpack++;
- tcpstat.tcps_rcvbyte += ti->ti_len;
- /*
- * Add data to socket buffer.
- */
- sbappend(&so->so_rcv, m);
- sorwakeup(so);
-#ifdef TCP_ACK_HACK
- /*
- * If this is a short packet, then ACK now - with Nagel
- * congestion avoidance sender won't send more until
- * he gets an ACK.
- */
- if (tiflags & TH_PUSH) {
- tp->t_flags |= TF_ACKNOW;
- tcp_output(tp);
- } else {
- tp->t_flags |= TF_DELACK;
- }
-#else
- tp->t_flags |= TF_DELACK;
-#endif
- return;
- }
- }
-
- /*
- * Calculate amount of space in receive window,
- * and then do TCP input processing.
- * Receive window is amount of space in rcv queue,
- * but not less than advertised window.
- */
- { int win;
-
- win = sbspace(&so->so_rcv);
- if (win < 0)
- win = 0;
- tp->rcv_wnd = imax(win, (int)(tp->rcv_adv - tp->rcv_nxt));
- }
-
- switch (tp->t_state) {
-
- /*
- * If the state is LISTEN then ignore segment if it contains an RST.
- * If the segment contains an ACK then it is bad and send a RST.
- * If it does not contain a SYN then it is not interesting; drop it.
- * If it is from this socket, drop it, it must be forged.
- * Don't bother responding if the destination was a broadcast.
- * Otherwise initialize tp->rcv_nxt, and tp->irs, select an initial
- * tp->iss, and send a segment:
- * <SEQ=ISS><ACK=RCV_NXT><CTL=SYN,ACK>
- * Also initialize tp->snd_nxt to tp->iss+1 and tp->snd_una to tp->iss.
- * Fill in remote peer address fields if not previously specified.
- * Enter SYN_RECEIVED state, and process any other fields of this
- * segment in this state.
- */
- case TCPS_LISTEN: {
- struct mbuf *am;
- register struct sockaddr_in *sin;
-
- if (tiflags & TH_RST)
- goto drop;
- if (tiflags & TH_ACK)
- goto dropwithreset;
- if ((tiflags & TH_SYN) == 0)
- goto drop;
- if ((ti->ti_dport == ti->ti_sport) &&
- (ti->ti_dst.s_addr == ti->ti_src.s_addr))
- goto drop;
- /*
- * RFC1122 4.2.3.10, p. 104: discard bcast/mcast SYN
- * in_broadcast() should never return true on a received
- * packet with M_BCAST not set.
- */
- if (m->m_flags & (M_BCAST|M_MCAST) ||
- IN_MULTICAST(ntohl(ti->ti_dst.s_addr)))
- goto drop;
- am = m_get(M_DONTWAIT, MT_SONAME); /* XXX */
- if (am == NULL)
- goto drop;
- am->m_len = sizeof (struct sockaddr_in);
- sin = mtod(am, struct sockaddr_in *);
- sin->sin_family = AF_INET;
- sin->sin_len = sizeof(*sin);
- sin->sin_addr = ti->ti_src;
- sin->sin_port = ti->ti_sport;
- bzero((caddr_t)sin->sin_zero, sizeof(sin->sin_zero));
- laddr = inp->inp_laddr;
- if (inp->inp_laddr.s_addr == INADDR_ANY)
- inp->inp_laddr = ti->ti_dst;
- if (in_pcbconnect(inp, am)) {
- inp->inp_laddr = laddr;
- (void) m_free(am);
- goto drop;
- }
- (void) m_free(am);
- tp->t_template = tcp_template(tp);
- if (tp->t_template == 0) {
- tp = tcp_drop(tp, ENOBUFS);
- dropsocket = 0; /* socket is already gone */
- goto drop;
- }
- if ((taop = tcp_gettaocache(inp)) == NULL) {
- taop = &tao_noncached;
- bzero(taop, sizeof(*taop));
- }
- tcp_dooptions(tp, optp, optlen, ti, &to);
- if (iss)
- tp->iss = iss;
- else
- tp->iss = tcp_iss;
- tcp_iss += TCP_ISSINCR/4;
- tp->irs = ti->ti_seq;
- tcp_sendseqinit(tp);
- tcp_rcvseqinit(tp);
- /*
- * Initialization of the tcpcb for transaction;
- * set SND.WND = SEG.WND,
- * initialize CCsend and CCrecv.
- */
- tp->snd_wnd = tiwin; /* initial send-window */
- tp->cc_send = CC_INC(tcp_ccgen);
- tp->cc_recv = to.to_cc;
- /*
- * Perform TAO test on incoming CC (SEG.CC) option, if any.
- * - compare SEG.CC against cached CC from the same host,
- * if any.
- * - if SEG.CC > chached value, SYN must be new and is accepted
- * immediately: save new CC in the cache, mark the socket
- * connected, enter ESTABLISHED state, turn on flag to
- * send a SYN in the next segment.
- * A virtual advertised window is set in rcv_adv to
- * initialize SWS prevention. Then enter normal segment
- * processing: drop SYN, process data and FIN.
- * - otherwise do a normal 3-way handshake.
- */
- if ((to.to_flag & TOF_CC) != 0) {
- if (taop->tao_cc != 0 && CC_GT(to.to_cc, taop->tao_cc)) {
- taop->tao_cc = to.to_cc;
- tp->t_state = TCPS_ESTABLISHED;
-
- /*
- * If there is a FIN, or if there is data and the
- * connection is local, then delay SYN,ACK(SYN) in
- * the hope of piggy-backing it on a response
- * segment. Otherwise must send ACK now in case
- * the other side is slow starting.
- */
- if ((tiflags & TH_FIN) || (ti->ti_len != 0 &&
- in_localaddr(inp->inp_faddr)))
- tp->t_flags |= (TF_DELACK | TF_NEEDSYN);
- else
- tp->t_flags |= (TF_ACKNOW | TF_NEEDSYN);
-
- /*
- * Limit the `virtual advertised window' to TCP_MAXWIN
- * here. Even if we requested window scaling, it will
- * become effective only later when our SYN is acked.
- */
- tp->rcv_adv += min(tp->rcv_wnd, TCP_MAXWIN);
- tcpstat.tcps_connects++;
- soisconnected(so);
- tp->t_timer[TCPT_KEEP] = tcp_keepinit;
- dropsocket = 0; /* committed to socket */
- tcpstat.tcps_accepts++;
- goto trimthenstep6;
- }
- /* else do standard 3-way handshake */
- } else {
- /*
- * No CC option, but maybe CC.NEW:
- * invalidate cached value.
- */
- taop->tao_cc = 0;
- }
- /*
- * TAO test failed or there was no CC option,
- * do a standard 3-way handshake.
- */
- tp->t_flags |= TF_ACKNOW;
- tp->t_state = TCPS_SYN_RECEIVED;
- tp->t_timer[TCPT_KEEP] = tcp_keepinit;
- dropsocket = 0; /* committed to socket */
- tcpstat.tcps_accepts++;
- goto trimthenstep6;
- }
-
- /*
- * If the state is SYN_RECEIVED:
- * if seg contains SYN/ACK, send a RST.
- * if seg contains an ACK, but not for our SYN/ACK, send a RST.
- */
- case TCPS_SYN_RECEIVED:
- if (tiflags & TH_ACK) {
- if (tiflags & TH_SYN) {
- tcpstat.tcps_badsyn++;
- goto dropwithreset;
- }
- if (SEQ_LEQ(ti->ti_ack, tp->snd_una) ||
- SEQ_GT(ti->ti_ack, tp->snd_max))
- goto dropwithreset;
- }
- break;
-
- /*
- * If the state is SYN_SENT:
- * if seg contains an ACK, but not for our SYN, drop the input.
- * if seg contains a RST, then drop the connection.
- * if seg does not contain SYN, then drop it.
- * Otherwise this is an acceptable SYN segment
- * initialize tp->rcv_nxt and tp->irs
- * if seg contains ack then advance tp->snd_una
- * if SYN has been acked change to ESTABLISHED else SYN_RCVD state
- * arrange for segment to be acked (eventually)
- * continue processing rest of data/controls, beginning with URG
- */
- case TCPS_SYN_SENT:
- if ((taop = tcp_gettaocache(inp)) == NULL) {
- taop = &tao_noncached;
- bzero(taop, sizeof(*taop));
- }
-
- if ((tiflags & TH_ACK) &&
- (SEQ_LEQ(ti->ti_ack, tp->iss) ||
- SEQ_GT(ti->ti_ack, tp->snd_max))) {
- /*
- * If we have a cached CCsent for the remote host,
- * hence we haven't just crashed and restarted,
- * do not send a RST. This may be a retransmission
- * from the other side after our earlier ACK was lost.
- * Our new SYN, when it arrives, will serve as the
- * needed ACK.
- */
- if (taop->tao_ccsent != 0)
- goto drop;
- else
- goto dropwithreset;
- }
- if (tiflags & TH_RST) {
- if (tiflags & TH_ACK)
- tp = tcp_drop(tp, ECONNREFUSED);
- goto drop;
- }
- if ((tiflags & TH_SYN) == 0)
- goto drop;
- tp->snd_wnd = ti->ti_win; /* initial send window */
- tp->cc_recv = to.to_cc; /* foreign CC */
-
- tp->irs = ti->ti_seq;
- tcp_rcvseqinit(tp);
- if (tiflags & TH_ACK) {
- /*
- * Our SYN was acked. If segment contains CC.ECHO
- * option, check it to make sure this segment really
- * matches our SYN. If not, just drop it as old
- * duplicate, but send an RST if we're still playing
- * by the old rules. If no CC.ECHO option, make sure
- * we don't get fooled into using T/TCP.
- */
- if (to.to_flag & TOF_CCECHO) {
- if (tp->cc_send != to.to_ccecho) {
- if (taop->tao_ccsent != 0)
- goto drop;
- else
- goto dropwithreset;
- }
- } else
- tp->t_flags &= ~TF_RCVD_CC;
- tcpstat.tcps_connects++;
- soisconnected(so);
- /* Do window scaling on this connection? */
- if ((tp->t_flags & (TF_RCVD_SCALE|TF_REQ_SCALE)) ==
- (TF_RCVD_SCALE|TF_REQ_SCALE)) {
- tp->snd_scale = tp->requested_s_scale;
- tp->rcv_scale = tp->request_r_scale;
- }
- /* Segment is acceptable, update cache if undefined. */
- if (taop->tao_ccsent == 0)
- taop->tao_ccsent = to.to_ccecho;
-
- tp->rcv_adv += tp->rcv_wnd;
- tp->snd_una++; /* SYN is acked */
- /*
- * If there's data, delay ACK; if there's also a FIN
- * ACKNOW will be turned on later.
- */
- if (ti->ti_len != 0)
- tp->t_flags |= TF_DELACK;
- else
- tp->t_flags |= TF_ACKNOW;
- /*
- * Received <SYN,ACK> in SYN_SENT[*] state.
- * Transitions:
- * SYN_SENT --> ESTABLISHED
- * SYN_SENT* --> FIN_WAIT_1
- */
- if (tp->t_flags & TF_NEEDFIN) {
- tp->t_state = TCPS_FIN_WAIT_1;
- tp->t_flags &= ~TF_NEEDFIN;
- tiflags &= ~TH_SYN;
- } else {
- tp->t_state = TCPS_ESTABLISHED;
- tp->t_timer[TCPT_KEEP] = tcp_keepidle;
- }
- } else {
- /*
- * Received initial SYN in SYN-SENT[*] state => simul-
- * taneous open. If segment contains CC option and there is
- * a cached CC, apply TAO test; if it succeeds, connection is
- * half-synchronized. Otherwise, do 3-way handshake:
- * SYN-SENT -> SYN-RECEIVED
- * SYN-SENT* -> SYN-RECEIVED*
- * If there was no CC option, clear cached CC value.
- */
- tp->t_flags |= TF_ACKNOW;
- tp->t_timer[TCPT_REXMT] = 0;
- if (to.to_flag & TOF_CC) {
- if (taop->tao_cc != 0 &&
- CC_GT(to.to_cc, taop->tao_cc)) {
- /*
- * update cache and make transition:
- * SYN-SENT -> ESTABLISHED*
- * SYN-SENT* -> FIN-WAIT-1*
- */
- taop->tao_cc = to.to_cc;
- if (tp->t_flags & TF_NEEDFIN) {
- tp->t_state = TCPS_FIN_WAIT_1;
- tp->t_flags &= ~TF_NEEDFIN;
- } else {
- tp->t_state = TCPS_ESTABLISHED;
- tp->t_timer[TCPT_KEEP] = tcp_keepidle;
- }
- tp->t_flags |= TF_NEEDSYN;
- } else
- tp->t_state = TCPS_SYN_RECEIVED;
- } else {
- /* CC.NEW or no option => invalidate cache */
- taop->tao_cc = 0;
- tp->t_state = TCPS_SYN_RECEIVED;
- }
- }
-
-trimthenstep6:
- /*
- * Advance ti->ti_seq to correspond to first data byte.
- * If data, trim to stay within window,
- * dropping FIN if necessary.
- */
- ti->ti_seq++;
- if (ti->ti_len > tp->rcv_wnd) {
- todrop = ti->ti_len - tp->rcv_wnd;
- m_adj(m, -todrop);
- ti->ti_len = tp->rcv_wnd;
- tiflags &= ~TH_FIN;
- tcpstat.tcps_rcvpackafterwin++;
- tcpstat.tcps_rcvbyteafterwin += todrop;
- }
- tp->snd_wl1 = ti->ti_seq - 1;
- tp->rcv_up = ti->ti_seq;
- /*
- * Client side of transaction: already sent SYN and data.
- * If the remote host used T/TCP to validate the SYN,
- * our data will be ACK'd; if so, enter normal data segment
- * processing in the middle of step 5, ack processing.
- * Otherwise, goto step 6.
- */
- if (tiflags & TH_ACK)
- goto process_ACK;
- goto step6;
- /*
- * If the state is LAST_ACK or CLOSING or TIME_WAIT:
- * if segment contains a SYN and CC [not CC.NEW] option:
- * if state == TIME_WAIT and connection duration > MSL,
- * drop packet and send RST;
- *
- * if SEG.CC > CCrecv then is new SYN, and can implicitly
- * ack the FIN (and data) in retransmission queue.
- * Complete close and delete TCPCB. Then reprocess
- * segment, hoping to find new TCPCB in LISTEN state;
- *
- * else must be old SYN; drop it.
- * else do normal processing.
- */
- case TCPS_LAST_ACK:
- case TCPS_CLOSING:
- case TCPS_TIME_WAIT:
- if ((tiflags & TH_SYN) &&
- (to.to_flag & TOF_CC) && tp->cc_recv != 0) {
- if (tp->t_state == TCPS_TIME_WAIT &&
- tp->t_duration > TCPTV_MSL)
- goto dropwithreset;
- if (CC_GT(to.to_cc, tp->cc_recv)) {
- tp = tcp_close(tp);
- goto findpcb;
- }
- else
- goto drop;
- }
- break; /* continue normal processing */
- }
-
- /*
- * States other than LISTEN or SYN_SENT.
- * First check timestamp, if present.
- * Then check the connection count, if present.
- * Then check that at least some bytes of segment are within
- * receive window. If segment begins before rcv_nxt,
- * drop leading data (and SYN); if nothing left, just ack.
- *
- * RFC 1323 PAWS: If we have a timestamp reply on this segment
- * and it's less than ts_recent, drop it.
- */
- if ((to.to_flag & TOF_TS) != 0 && (tiflags & TH_RST) == 0 &&
- tp->ts_recent && TSTMP_LT(to.to_tsval, tp->ts_recent)) {
-
- /* Check to see if ts_recent is over 24 days old. */
- if ((int)(tcp_now - tp->ts_recent_age) > TCP_PAWS_IDLE) {
- /*
- * Invalidate ts_recent. If this segment updates
- * ts_recent, the age will be reset later and ts_recent
- * will get a valid value. If it does not, setting
- * ts_recent to zero will at least satisfy the
- * requirement that zero be placed in the timestamp
- * echo reply when ts_recent isn't valid. The
- * age isn't reset until we get a valid ts_recent
- * because we don't want out-of-order segments to be
- * dropped when ts_recent is old.
- */
- tp->ts_recent = 0;
- } else {
- tcpstat.tcps_rcvduppack++;
- tcpstat.tcps_rcvdupbyte += ti->ti_len;
- tcpstat.tcps_pawsdrop++;
- goto dropafterack;
- }
- }
-
- /*
- * T/TCP mechanism
- * If T/TCP was negotiated and the segment doesn't have CC,
- * or if it's CC is wrong then drop the segment.
- * RST segments do not have to comply with this.
- */
- if ((tp->t_flags & (TF_REQ_CC|TF_RCVD_CC)) == (TF_REQ_CC|TF_RCVD_CC) &&
- ((to.to_flag & TOF_CC) == 0 || tp->cc_recv != to.to_cc) &&
- (tiflags & TH_RST) == 0)
- goto dropafterack;
-
- todrop = tp->rcv_nxt - ti->ti_seq;
- if (todrop > 0) {
- if (tiflags & TH_SYN) {
- tiflags &= ~TH_SYN;
- ti->ti_seq++;
- if (ti->ti_urp > 1)
- ti->ti_urp--;
- else
- tiflags &= ~TH_URG;
- todrop--;
- }
- /*
- * Following if statement from Stevens, vol. 2, p. 960.
- */
- if (todrop > ti->ti_len
- || (todrop == ti->ti_len && (tiflags & TH_FIN) == 0)) {
- /*
- * Any valid FIN must be to the left of the window.
- * At this point the FIN must be a duplicate or out
- * of sequence; drop it.
- */
- tiflags &= ~TH_FIN;
-
- /*
- * Send an ACK to resynchronize and drop any data.
- * But keep on processing for RST or ACK.
- */
- tp->t_flags |= TF_ACKNOW;
- todrop = ti->ti_len;
- tcpstat.tcps_rcvduppack++;
- tcpstat.tcps_rcvdupbyte += todrop;
- } else {
- tcpstat.tcps_rcvpartduppack++;
- tcpstat.tcps_rcvpartdupbyte += todrop;
- }
- m_adj(m, todrop);
- ti->ti_seq += todrop;
- ti->ti_len -= todrop;
- if (ti->ti_urp > todrop)
- ti->ti_urp -= todrop;
- else {
- tiflags &= ~TH_URG;
- ti->ti_urp = 0;
- }
- }
-
- /*
- * If new data are received on a connection after the
- * user processes are gone, then RST the other end.
- */
- if ((so->so_state & SS_NOFDREF) &&
- tp->t_state > TCPS_CLOSE_WAIT && ti->ti_len) {
- tp = tcp_close(tp);
- tcpstat.tcps_rcvafterclose++;
- goto dropwithreset;
- }
-
- /*
- * If segment ends after window, drop trailing data
- * (and PUSH and FIN); if nothing left, just ACK.
- */
- todrop = (ti->ti_seq+ti->ti_len) - (tp->rcv_nxt+tp->rcv_wnd);
- if (todrop > 0) {
- tcpstat.tcps_rcvpackafterwin++;
- if (todrop >= ti->ti_len) {
- tcpstat.tcps_rcvbyteafterwin += ti->ti_len;
- /*
- * If a new connection request is received
- * while in TIME_WAIT, drop the old connection
- * and start over if the sequence numbers
- * are above the previous ones.
- */
- if (tiflags & TH_SYN &&
- tp->t_state == TCPS_TIME_WAIT &&
- SEQ_GT(ti->ti_seq, tp->rcv_nxt)) {
- iss = tp->rcv_nxt + TCP_ISSINCR;
- tp = tcp_close(tp);
- goto findpcb;
- }
- /*
- * If window is closed can only take segments at
- * window edge, and have to drop data and PUSH from
- * incoming segments. Continue processing, but
- * remember to ack. Otherwise, drop segment
- * and ack.
- */
- if (tp->rcv_wnd == 0 && ti->ti_seq == tp->rcv_nxt) {
- tp->t_flags |= TF_ACKNOW;
- tcpstat.tcps_rcvwinprobe++;
- } else
- goto dropafterack;
- } else
- tcpstat.tcps_rcvbyteafterwin += todrop;
- m_adj(m, -todrop);
- ti->ti_len -= todrop;
- tiflags &= ~(TH_PUSH|TH_FIN);
- }
-
- /*
- * If last ACK falls within this segment's sequence numbers,
- * record its timestamp.
- * NOTE that the test is modified according to the latest
- * proposal of the tcplw@cray.com list (Braden 1993/04/26).
- */
- if ((to.to_flag & TOF_TS) != 0 &&
- SEQ_LEQ(ti->ti_seq, tp->last_ack_sent)) {
- tp->ts_recent_age = tcp_now;
- tp->ts_recent = to.to_tsval;
- }
-
- /*
- * If the RST bit is set examine the state:
- * SYN_RECEIVED STATE:
- * If passive open, return to LISTEN state.
- * If active open, inform user that connection was refused.
- * ESTABLISHED, FIN_WAIT_1, FIN_WAIT2, CLOSE_WAIT STATES:
- * Inform user that connection was reset, and close tcb.
- * CLOSING, LAST_ACK, TIME_WAIT STATES
- * Close the tcb.
- */
- if (tiflags&TH_RST) switch (tp->t_state) {
-
- case TCPS_SYN_RECEIVED:
- so->so_error = ECONNREFUSED;
- goto close;
-
- case TCPS_ESTABLISHED:
- case TCPS_FIN_WAIT_1:
- case TCPS_FIN_WAIT_2:
- case TCPS_CLOSE_WAIT:
- so->so_error = ECONNRESET;
- close:
- tp->t_state = TCPS_CLOSED;
- tcpstat.tcps_drops++;
- tp = tcp_close(tp);
- goto drop;
-
- case TCPS_CLOSING:
- case TCPS_LAST_ACK:
- case TCPS_TIME_WAIT:
- tp = tcp_close(tp);
- goto drop;
- }
-
- /*
- * If a SYN is in the window, then this is an
- * error and we send an RST and drop the connection.
- */
- if (tiflags & TH_SYN) {
- tp = tcp_drop(tp, ECONNRESET);
- goto dropwithreset;
- }
-
- /*
- * If the ACK bit is off: if in SYN-RECEIVED state or SENDSYN
- * flag is on (half-synchronized state), then queue data for
- * later processing; else drop segment and return.
- */
- if ((tiflags & TH_ACK) == 0) {
- if (tp->t_state == TCPS_SYN_RECEIVED ||
- (tp->t_flags & TF_NEEDSYN))
- goto step6;
- else
- goto drop;
- }
-
- /*
- * Ack processing.
- */
- switch (tp->t_state) {
-
- /*
- * In SYN_RECEIVED state, the ack ACKs our SYN, so enter
- * ESTABLISHED state and continue processing.
- * The ACK was checked above.
- */
- case TCPS_SYN_RECEIVED:
-
- tcpstat.tcps_connects++;
- soisconnected(so);
- /* Do window scaling? */
- if ((tp->t_flags & (TF_RCVD_SCALE|TF_REQ_SCALE)) ==
- (TF_RCVD_SCALE|TF_REQ_SCALE)) {
- tp->snd_scale = tp->requested_s_scale;
- tp->rcv_scale = tp->request_r_scale;
- }
- /*
- * Upon successful completion of 3-way handshake,
- * update cache.CC if it was undefined, pass any queued
- * data to the user, and advance state appropriately.
- */
- if ((taop = tcp_gettaocache(inp)) != NULL &&
- taop->tao_cc == 0)
- taop->tao_cc = tp->cc_recv;
-
- /*
- * Make transitions:
- * SYN-RECEIVED -> ESTABLISHED
- * SYN-RECEIVED* -> FIN-WAIT-1
- */
- if (tp->t_flags & TF_NEEDFIN) {
- tp->t_state = TCPS_FIN_WAIT_1;
- tp->t_flags &= ~TF_NEEDFIN;
- } else {
- tp->t_state = TCPS_ESTABLISHED;
- tp->t_timer[TCPT_KEEP] = tcp_keepidle;
- }
- /*
- * If segment contains data or ACK, will call tcp_reass()
- * later; if not, do so now to pass queued data to user.
- */
- if (ti->ti_len == 0 && (tiflags & TH_FIN) == 0)
- (void) tcp_reass(tp, (struct tcpiphdr *)0,
- (struct mbuf *)0);
- tp->snd_wl1 = ti->ti_seq - 1;
- /* fall into ... */
-
- /*
- * In ESTABLISHED state: drop duplicate ACKs; ACK out of range
- * ACKs. If the ack is in the range
- * tp->snd_una < ti->ti_ack <= tp->snd_max
- * then advance tp->snd_una to ti->ti_ack and drop
- * data from the retransmission queue. If this ACK reflects
- * more up to date window information we update our window information.
- */
- case TCPS_ESTABLISHED:
- case TCPS_FIN_WAIT_1:
- case TCPS_FIN_WAIT_2:
- case TCPS_CLOSE_WAIT:
- case TCPS_CLOSING:
- case TCPS_LAST_ACK:
- case TCPS_TIME_WAIT:
-
- if (SEQ_LEQ(ti->ti_ack, tp->snd_una)) {
- if (ti->ti_len == 0 && tiwin == tp->snd_wnd) {
- tcpstat.tcps_rcvdupack++;
- /*
- * If we have outstanding data (other than
- * a window probe), this is a completely
- * duplicate ack (ie, window info didn't
- * change), the ack is the biggest we've
- * seen and we've seen exactly our rexmt
- * threshhold of them, assume a packet
- * has been dropped and retransmit it.
- * Kludge snd_nxt & the congestion
- * window so we send only this one
- * packet.
- *
- * We know we're losing at the current
- * window size so do congestion avoidance
- * (set ssthresh to half the current window
- * and pull our congestion window back to
- * the new ssthresh).
- *
- * Dup acks mean that packets have left the
- * network (they're now cached at the receiver)
- * so bump cwnd by the amount in the receiver
- * to keep a constant cwnd packets in the
- * network.
- */
- if (tp->t_timer[TCPT_REXMT] == 0 ||
- ti->ti_ack != tp->snd_una)
- tp->t_dupacks = 0;
- else if (++tp->t_dupacks == tcprexmtthresh) {
- tcp_seq onxt = tp->snd_nxt;
- u_int win =
- min(tp->snd_wnd, tp->snd_cwnd) / 2 /
- tp->t_maxseg;
-
- if (win < 2)
- win = 2;
- tp->snd_ssthresh = win * tp->t_maxseg;
- tp->t_timer[TCPT_REXMT] = 0;
- tp->t_rtt = 0;
- tp->snd_nxt = ti->ti_ack;
- tp->snd_cwnd = tp->t_maxseg;
- (void) tcp_output(tp);
- tp->snd_cwnd = tp->snd_ssthresh +
- tp->t_maxseg * tp->t_dupacks;
- if (SEQ_GT(onxt, tp->snd_nxt))
- tp->snd_nxt = onxt;
- goto drop;
- } else if (tp->t_dupacks > tcprexmtthresh) {
- tp->snd_cwnd += tp->t_maxseg;
- (void) tcp_output(tp);
- goto drop;
- }
- } else
- tp->t_dupacks = 0;
- break;
- }
- /*
- * If the congestion window was inflated to account
- * for the other side's cached packets, retract it.
- */
- if (tp->t_dupacks >= tcprexmtthresh &&
- tp->snd_cwnd > tp->snd_ssthresh)
- tp->snd_cwnd = tp->snd_ssthresh;
- tp->t_dupacks = 0;
- if (SEQ_GT(ti->ti_ack, tp->snd_max)) {
- tcpstat.tcps_rcvacktoomuch++;
- goto dropafterack;
- }
- /*
- * If we reach this point, ACK is not a duplicate,
- * i.e., it ACKs something we sent.
- */
- if (tp->t_flags & TF_NEEDSYN) {
- /*
- * T/TCP: Connection was half-synchronized, and our
- * SYN has been ACK'd (so connection is now fully
- * synchronized). Go to non-starred state,
- * increment snd_una for ACK of SYN, and check if
- * we can do window scaling.
- */
- tp->t_flags &= ~TF_NEEDSYN;
- tp->snd_una++;
- /* Do window scaling? */
- if ((tp->t_flags & (TF_RCVD_SCALE|TF_REQ_SCALE)) ==
- (TF_RCVD_SCALE|TF_REQ_SCALE)) {
- tp->snd_scale = tp->requested_s_scale;
- tp->rcv_scale = tp->request_r_scale;
- }
- }
-
-process_ACK:
- acked = ti->ti_ack - tp->snd_una;
- tcpstat.tcps_rcvackpack++;
- tcpstat.tcps_rcvackbyte += acked;
-
- /*
- * If we have a timestamp reply, update smoothed
- * round trip time. If no timestamp is present but
- * transmit timer is running and timed sequence
- * number was acked, update smoothed round trip time.
- * Since we now have an rtt measurement, cancel the
- * timer backoff (cf., Phil Karn's retransmit alg.).
- * Recompute the initial retransmit timer.
- */
- if (to.to_flag & TOF_TS)
- tcp_xmit_timer(tp, tcp_now - to.to_tsecr + 1);
- else if (tp->t_rtt && SEQ_GT(ti->ti_ack, tp->t_rtseq))
- tcp_xmit_timer(tp,tp->t_rtt);
-
- /*
- * If all outstanding data is acked, stop retransmit
- * timer and remember to restart (more output or persist).
- * If there is more data to be acked, restart retransmit
- * timer, using current (possibly backed-off) value.
- */
- if (ti->ti_ack == tp->snd_max) {
- tp->t_timer[TCPT_REXMT] = 0;
- needoutput = 1;
- } else if (tp->t_timer[TCPT_PERSIST] == 0)
- tp->t_timer[TCPT_REXMT] = tp->t_rxtcur;
-
- /*
- * If no data (only SYN) was ACK'd,
- * skip rest of ACK processing.
- */
- if (acked == 0)
- goto step6;
-
- /*
- * When new data is acked, open the congestion window.
- * If the window gives us less than ssthresh packets
- * in flight, open exponentially (maxseg per packet).
- * Otherwise open linearly: maxseg per window
- * (maxseg^2 / cwnd per packet).
- */
- {
- register u_int cw = tp->snd_cwnd;
- register u_int incr = tp->t_maxseg;
-
- if (cw > tp->snd_ssthresh)
- incr = incr * incr / cw;
- tp->snd_cwnd = min(cw + incr, TCP_MAXWIN<<tp->snd_scale);
- }
- if (acked > so->so_snd.sb_cc) {
- tp->snd_wnd -= so->so_snd.sb_cc;
- sbdrop(&so->so_snd, (int)so->so_snd.sb_cc);
- ourfinisacked = 1;
- } else {
- sbdrop(&so->so_snd, acked);
- tp->snd_wnd -= acked;
- ourfinisacked = 0;
- }
- if (so->so_snd.sb_flags & SB_NOTIFY)
- sowwakeup(so);
- tp->snd_una = ti->ti_ack;
- if (SEQ_LT(tp->snd_nxt, tp->snd_una))
- tp->snd_nxt = tp->snd_una;
-
- switch (tp->t_state) {
-
- /*
- * In FIN_WAIT_1 STATE in addition to the processing
- * for the ESTABLISHED state if our FIN is now acknowledged
- * then enter FIN_WAIT_2.
- */
- case TCPS_FIN_WAIT_1:
- if (ourfinisacked) {
- /*
- * If we can't receive any more
- * data, then closing user can proceed.
- * Starting the timer is contrary to the
- * specification, but if we don't get a FIN
- * we'll hang forever.
- */
- if (so->so_state & SS_CANTRCVMORE) {
- soisdisconnected(so);
- tp->t_timer[TCPT_2MSL] = tcp_maxidle;
- }
- tp->t_state = TCPS_FIN_WAIT_2;
- }
- break;
-
- /*
- * In CLOSING STATE in addition to the processing for
- * the ESTABLISHED state if the ACK acknowledges our FIN
- * then enter the TIME-WAIT state, otherwise ignore
- * the segment.
- */
- case TCPS_CLOSING:
- if (ourfinisacked) {
- tp->t_state = TCPS_TIME_WAIT;
- tcp_canceltimers(tp);
- /* Shorten TIME_WAIT [RFC-1644, p.28] */
- if (tp->cc_recv != 0 &&
- tp->t_duration < TCPTV_MSL)
- tp->t_timer[TCPT_2MSL] =
- tp->t_rxtcur * TCPTV_TWTRUNC;
- else
- tp->t_timer[TCPT_2MSL] = 2 * TCPTV_MSL;
- soisdisconnected(so);
- }
- break;
-
- /*
- * In LAST_ACK, we may still be waiting for data to drain
- * and/or to be acked, as well as for the ack of our FIN.
- * If our FIN is now acknowledged, delete the TCB,
- * enter the closed state and return.
- */
- case TCPS_LAST_ACK:
- if (ourfinisacked) {
- tp = tcp_close(tp);
- goto drop;
- }
- break;
-
- /*
- * In TIME_WAIT state the only thing that should arrive
- * is a retransmission of the remote FIN. Acknowledge
- * it and restart the finack timer.
- */
- case TCPS_TIME_WAIT:
- tp->t_timer[TCPT_2MSL] = 2 * TCPTV_MSL;
- goto dropafterack;
- }
- }
-
-step6:
- /*
- * Update window information.
- * Don't look at window if no ACK: TAC's send garbage on first SYN.
- */
- if ((tiflags & TH_ACK) &&
- (SEQ_LT(tp->snd_wl1, ti->ti_seq) ||
- (tp->snd_wl1 == ti->ti_seq && (SEQ_LT(tp->snd_wl2, ti->ti_ack) ||
- (tp->snd_wl2 == ti->ti_ack && tiwin > tp->snd_wnd))))) {
- /* keep track of pure window updates */
- if (ti->ti_len == 0 &&
- tp->snd_wl2 == ti->ti_ack && tiwin > tp->snd_wnd)
- tcpstat.tcps_rcvwinupd++;
- tp->snd_wnd = tiwin;
- tp->snd_wl1 = ti->ti_seq;
- tp->snd_wl2 = ti->ti_ack;
- if (tp->snd_wnd > tp->max_sndwnd)
- tp->max_sndwnd = tp->snd_wnd;
- needoutput = 1;
- }
-
- /*
- * Process segments with URG.
- */
- if ((tiflags & TH_URG) && ti->ti_urp &&
- TCPS_HAVERCVDFIN(tp->t_state) == 0) {
- /*
- * This is a kludge, but if we receive and accept
- * random urgent pointers, we'll crash in
- * soreceive. It's hard to imagine someone
- * actually wanting to send this much urgent data.
- */
- if (ti->ti_urp + so->so_rcv.sb_cc > sb_max) {
- ti->ti_urp = 0; /* XXX */
- tiflags &= ~TH_URG; /* XXX */
- goto dodata; /* XXX */
- }
- /*
- * If this segment advances the known urgent pointer,
- * then mark the data stream. This should not happen
- * in CLOSE_WAIT, CLOSING, LAST_ACK or TIME_WAIT STATES since
- * a FIN has been received from the remote side.
- * In these states we ignore the URG.
- *
- * According to RFC961 (Assigned Protocols),
- * the urgent pointer points to the last octet
- * of urgent data. We continue, however,
- * to consider it to indicate the first octet
- * of data past the urgent section as the original
- * spec states (in one of two places).
- */
- if (SEQ_GT(ti->ti_seq+ti->ti_urp, tp->rcv_up)) {
- tp->rcv_up = ti->ti_seq + ti->ti_urp;
- so->so_oobmark = so->so_rcv.sb_cc +
- (tp->rcv_up - tp->rcv_nxt) - 1;
- if (so->so_oobmark == 0)
- so->so_state |= SS_RCVATMARK;
- sohasoutofband(so);
- tp->t_oobflags &= ~(TCPOOB_HAVEDATA | TCPOOB_HADDATA);
- }
- /*
- * Remove out of band data so doesn't get presented to user.
- * This can happen independent of advancing the URG pointer,
- * but if two URG's are pending at once, some out-of-band
- * data may creep in... ick.
- */
- if (ti->ti_urp <= (u_long)ti->ti_len
-#ifdef SO_OOBINLINE
- && (so->so_options & SO_OOBINLINE) == 0
-#endif
- )
- tcp_pulloutofband(so, ti, m);
- } else
- /*
- * If no out of band data is expected,
- * pull receive urgent pointer along
- * with the receive window.
- */
- if (SEQ_GT(tp->rcv_nxt, tp->rcv_up))
- tp->rcv_up = tp->rcv_nxt;
-dodata: /* XXX */
-
- /*
- * Process the segment text, merging it into the TCP sequencing queue,
- * and arranging for acknowledgment of receipt if necessary.
- * This process logically involves adjusting tp->rcv_wnd as data
- * is presented to the user (this happens in tcp_usrreq.c,
- * case PRU_RCVD). If a FIN has already been received on this
- * connection then we just ignore the text.
- */
- if ((ti->ti_len || (tiflags&TH_FIN)) &&
- TCPS_HAVERCVDFIN(tp->t_state) == 0) {
- TCP_REASS(tp, ti, m, so, tiflags);
- /*
- * Note the amount of data that peer has sent into
- * our window, in order to estimate the sender's
- * buffer size.
- */
- len = so->so_rcv.sb_hiwat - (tp->rcv_adv - tp->rcv_nxt);
- } else {
- m_freem(m);
- tiflags &= ~TH_FIN;
- }
-
- /*
- * If FIN is received ACK the FIN and let the user know
- * that the connection is closing.
- */
- if (tiflags & TH_FIN) {
- if (TCPS_HAVERCVDFIN(tp->t_state) == 0) {
- socantrcvmore(so);
- /*
- * If connection is half-synchronized
- * (ie NEEDSYN flag on) then delay ACK,
- * so it may be piggybacked when SYN is sent.
- * Otherwise, since we received a FIN then no
- * more input can be expected, send ACK now.
- */
- if (tp->t_flags & TF_NEEDSYN)
- tp->t_flags |= TF_DELACK;
- else
- tp->t_flags |= TF_ACKNOW;
- tp->rcv_nxt++;
- }
- switch (tp->t_state) {
-
- /*
- * In SYN_RECEIVED and ESTABLISHED STATES
- * enter the CLOSE_WAIT state.
- */
- case TCPS_SYN_RECEIVED:
- case TCPS_ESTABLISHED:
- tp->t_state = TCPS_CLOSE_WAIT;
- break;
-
- /*
- * If still in FIN_WAIT_1 STATE FIN has not been acked so
- * enter the CLOSING state.
- */
- case TCPS_FIN_WAIT_1:
- tp->t_state = TCPS_CLOSING;
- break;
-
- /*
- * In FIN_WAIT_2 state enter the TIME_WAIT state,
- * starting the time-wait timer, turning off the other
- * standard timers.
- */
- case TCPS_FIN_WAIT_2:
- tp->t_state = TCPS_TIME_WAIT;
- tcp_canceltimers(tp);
- /* Shorten TIME_WAIT [RFC-1644, p.28] */
- if (tp->cc_recv != 0 &&
- tp->t_duration < TCPTV_MSL) {
- tp->t_timer[TCPT_2MSL] =
- tp->t_rxtcur * TCPTV_TWTRUNC;
- /* For transaction client, force ACK now. */
- tp->t_flags |= TF_ACKNOW;
- }
- else
- tp->t_timer[TCPT_2MSL] = 2 * TCPTV_MSL;
- soisdisconnected(so);
- break;
-
- /*
- * In TIME_WAIT state restart the 2 MSL time_wait timer.
- */
- case TCPS_TIME_WAIT:
- tp->t_timer[TCPT_2MSL] = 2 * TCPTV_MSL;
- break;
- }
- }
-#ifdef TCPDEBUG
- if (so->so_options & SO_DEBUG)
- tcp_trace(TA_INPUT, ostate, tp, &tcp_saveti, 0);
-#endif
-
- /*
- * Return any desired output.
- */
- if (needoutput || (tp->t_flags & TF_ACKNOW))
- (void) tcp_output(tp);
- return;
-
-dropafterack:
- /*
- * Generate an ACK dropping incoming segment if it occupies
- * sequence space, where the ACK reflects our state.
- */
- if (tiflags & TH_RST)
- goto drop;
-#ifdef TCPDEBUG
- if (so->so_options & SO_DEBUG)
- tcp_trace(TA_DROP, ostate, tp, &tcp_saveti, 0);
-#endif
- m_freem(m);
- tp->t_flags |= TF_ACKNOW;
- (void) tcp_output(tp);
- return;
-
-dropwithreset:
- /*
- * Generate a RST, dropping incoming segment.
- * Make ACK acceptable to originator of segment.
- * Don't bother to respond if destination was broadcast/multicast.
- */
- if ((tiflags & TH_RST) || m->m_flags & (M_BCAST|M_MCAST) ||
- IN_MULTICAST(ntohl(ti->ti_dst.s_addr)))
- goto drop;
-#ifdef TCPDEBUG
- if (tp == 0 || (tp->t_inpcb->inp_socket->so_options & SO_DEBUG))
- tcp_trace(TA_DROP, ostate, tp, &tcp_saveti, 0);
-#endif
- if (tiflags & TH_ACK)
- tcp_respond(tp, ti, m, (tcp_seq)0, ti->ti_ack, TH_RST);
- else {
- if (tiflags & TH_SYN)
- ti->ti_len++;
- tcp_respond(tp, ti, m, ti->ti_seq+ti->ti_len, (tcp_seq)0,
- TH_RST|TH_ACK);
- }
- /* destroy temporarily created socket */
- if (dropsocket)
- (void) soabort(so);
- return;
-
-drop:
- /*
- * Drop space held by incoming segment and return.
- */
-#ifdef TCPDEBUG
- if (tp == 0 || (tp->t_inpcb->inp_socket->so_options & SO_DEBUG))
- tcp_trace(TA_DROP, ostate, tp, &tcp_saveti, 0);
-#endif
- m_freem(m);
- /* destroy temporarily created socket */
- if (dropsocket)
- (void) soabort(so);
- return;
-#ifndef TUBA_INCLUDE
-}
-
-static void
-tcp_dooptions(tp, cp, cnt, ti, to)
- struct tcpcb *tp;
- u_char *cp;
- int cnt;
- struct tcpiphdr *ti;
- struct tcpopt *to;
-{
- u_short mss = 0;
- int opt, optlen;
-
- for (; cnt > 0; cnt -= optlen, cp += optlen) {
- opt = cp[0];
- if (opt == TCPOPT_EOL)
- break;
- if (opt == TCPOPT_NOP)
- optlen = 1;
- else {
- optlen = cp[1];
- if (optlen <= 0)
- break;
- }
- switch (opt) {
-
- default:
- continue;
-
- case TCPOPT_MAXSEG:
- if (optlen != TCPOLEN_MAXSEG)
- continue;
- if (!(ti->ti_flags & TH_SYN))
- continue;
- bcopy((char *) cp + 2, (char *) &mss, sizeof(mss));
- NTOHS(mss);
- break;
-
- case TCPOPT_WINDOW:
- if (optlen != TCPOLEN_WINDOW)
- continue;
- if (!(ti->ti_flags & TH_SYN))
- continue;
- tp->t_flags |= TF_RCVD_SCALE;
- tp->requested_s_scale = min(cp[2], TCP_MAX_WINSHIFT);
- break;
-
- case TCPOPT_TIMESTAMP:
- if (optlen != TCPOLEN_TIMESTAMP)
- continue;
- to->to_flag |= TOF_TS;
- bcopy((char *)cp + 2,
- (char *)&to->to_tsval, sizeof(to->to_tsval));
- NTOHL(to->to_tsval);
- bcopy((char *)cp + 6,
- (char *)&to->to_tsecr, sizeof(to->to_tsecr));
- NTOHL(to->to_tsecr);
-
- /*
- * A timestamp received in a SYN makes
- * it ok to send timestamp requests and replies.
- */
- if (ti->ti_flags & TH_SYN) {
- tp->t_flags |= TF_RCVD_TSTMP;
- tp->ts_recent = to->to_tsval;
- tp->ts_recent_age = tcp_now;
- }
- break;
- case TCPOPT_CC:
- if (optlen != TCPOLEN_CC)
- continue;
- to->to_flag |= TOF_CC;
- bcopy((char *)cp + 2,
- (char *)&to->to_cc, sizeof(to->to_cc));
- NTOHL(to->to_cc);
- /*
- * A CC or CC.new option received in a SYN makes
- * it ok to send CC in subsequent segments.
- */
- if (ti->ti_flags & TH_SYN)
- tp->t_flags |= TF_RCVD_CC;
- break;
- case TCPOPT_CCNEW:
- if (optlen != TCPOLEN_CC)
- continue;
- if (!(ti->ti_flags & TH_SYN))
- continue;
- to->to_flag |= TOF_CCNEW;
- bcopy((char *)cp + 2,
- (char *)&to->to_cc, sizeof(to->to_cc));
- NTOHL(to->to_cc);
- /*
- * A CC or CC.new option received in a SYN makes
- * it ok to send CC in subsequent segments.
- */
- tp->t_flags |= TF_RCVD_CC;
- break;
- case TCPOPT_CCECHO:
- if (optlen != TCPOLEN_CC)
- continue;
- if (!(ti->ti_flags & TH_SYN))
- continue;
- to->to_flag |= TOF_CCECHO;
- bcopy((char *)cp + 2,
- (char *)&to->to_ccecho, sizeof(to->to_ccecho));
- NTOHL(to->to_ccecho);
- break;
- }
- }
- if (ti->ti_flags & TH_SYN)
- tcp_mss(tp, mss); /* sets t_maxseg */
-}
-
-/*
- * Pull out of band byte out of a segment so
- * it doesn't appear in the user's data queue.
- * It is still reflected in the segment length for
- * sequencing purposes.
- */
-static void
-tcp_pulloutofband(so, ti, m)
- struct socket *so;
- struct tcpiphdr *ti;
- register struct mbuf *m;
-{
- int cnt = ti->ti_urp - 1;
-
- while (cnt >= 0) {
- if (m->m_len > cnt) {
- char *cp = mtod(m, caddr_t) + cnt;
- struct tcpcb *tp = sototcpcb(so);
-
- tp->t_iobc = *cp;
- tp->t_oobflags |= TCPOOB_HAVEDATA;
- bcopy(cp+1, cp, (unsigned)(m->m_len - cnt - 1));
- m->m_len--;
- return;
- }
- cnt -= m->m_len;
- m = m->m_next;
- if (m == 0)
- break;
- }
- panic("tcp_pulloutofband");
-}
-
-/*
- * Collect new round-trip time estimate
- * and update averages and current timeout.
- */
-static void
-tcp_xmit_timer(tp, rtt)
- register struct tcpcb *tp;
- short rtt;
-{
- register int delta;
-
- tcpstat.tcps_rttupdated++;
- tp->t_rttupdated++;
- if (tp->t_srtt != 0) {
- /*
- * srtt is stored as fixed point with 5 bits after the
- * binary point (i.e., scaled by 8). The following magic
- * is equivalent to the smoothing algorithm in rfc793 with
- * an alpha of .875 (srtt = rtt/8 + srtt*7/8 in fixed
- * point). Adjust rtt to origin 0.
- */
- delta = ((rtt - 1) << TCP_DELTA_SHIFT)
- - (tp->t_srtt >> (TCP_RTT_SHIFT - TCP_DELTA_SHIFT));
-
- if ((tp->t_srtt += delta) <= 0)
- tp->t_srtt = 1;
-
- /*
- * We accumulate a smoothed rtt variance (actually, a
- * smoothed mean difference), then set the retransmit
- * timer to smoothed rtt + 4 times the smoothed variance.
- * rttvar is stored as fixed point with 4 bits after the
- * binary point (scaled by 16). The following is
- * equivalent to rfc793 smoothing with an alpha of .75
- * (rttvar = rttvar*3/4 + |delta| / 4). This replaces
- * rfc793's wired-in beta.
- */
- if (delta < 0)
- delta = -delta;
- delta -= tp->t_rttvar >> (TCP_RTTVAR_SHIFT - TCP_DELTA_SHIFT);
- if ((tp->t_rttvar += delta) <= 0)
- tp->t_rttvar = 1;
- } else {
- /*
- * No rtt measurement yet - use the unsmoothed rtt.
- * Set the variance to half the rtt (so our first
- * retransmit happens at 3*rtt).
- */
- tp->t_srtt = rtt << TCP_RTT_SHIFT;
- tp->t_rttvar = rtt << (TCP_RTTVAR_SHIFT - 1);
- }
- tp->t_rtt = 0;
- tp->t_rxtshift = 0;
-
- /*
- * the retransmit should happen at rtt + 4 * rttvar.
- * Because of the way we do the smoothing, srtt and rttvar
- * will each average +1/2 tick of bias. When we compute
- * the retransmit timer, we want 1/2 tick of rounding and
- * 1 extra tick because of +-1/2 tick uncertainty in the
- * firing of the timer. The bias will give us exactly the
- * 1.5 tick we need. But, because the bias is
- * statistical, we have to test that we don't drop below
- * the minimum feasible timer (which is 2 ticks).
- */
- TCPT_RANGESET(tp->t_rxtcur, TCP_REXMTVAL(tp),
- max(tp->t_rttmin, rtt + 2), TCPTV_REXMTMAX);
-
- /*
- * We received an ack for a packet that wasn't retransmitted;
- * it is probably safe to discard any error indications we've
- * received recently. This isn't quite right, but close enough
- * for now (a route might have failed after we sent a segment,
- * and the return path might not be symmetrical).
- */
- tp->t_softerror = 0;
-}
-
-/*
- * Determine a reasonable value for maxseg size.
- * If the route is known, check route for mtu.
- * If none, use an mss that can be handled on the outgoing
- * interface without forcing IP to fragment; if bigger than
- * an mbuf cluster (MCLBYTES), round down to nearest multiple of MCLBYTES
- * to utilize large mbufs. If no route is found, route has no mtu,
- * or the destination isn't local, use a default, hopefully conservative
- * size (usually 512 or the default IP max size, but no more than the mtu
- * of the interface), as we can't discover anything about intervening
- * gateways or networks. We also initialize the congestion/slow start
- * window to be a single segment if the destination isn't local.
- * While looking at the routing entry, we also initialize other path-dependent
- * parameters from pre-set or cached values in the routing entry.
- *
- * Also take into account the space needed for options that we
- * send regularly. Make maxseg shorter by that amount to assure
- * that we can send maxseg amount of data even when the options
- * are present. Store the upper limit of the length of options plus
- * data in maxopd.
- *
- * NOTE that this routine is only called when we process an incoming
- * segment, for outgoing segments only tcp_mssopt is called.
- *
- * In case of T/TCP, we call this routine during implicit connection
- * setup as well (offer = -1), to initialize maxseg from the cached
- * MSS of our peer.
- */
-void
-tcp_mss(tp, offer)
- struct tcpcb *tp;
- int offer;
-{
- register struct rtentry *rt;
- struct ifnet *ifp;
- register int rtt, mss;
- u_long bufsize;
- struct inpcb *inp;
- struct socket *so;
- struct rmxp_tao *taop;
- int origoffer = offer;
-
- inp = tp->t_inpcb;
- if ((rt = tcp_rtlookup(inp)) == NULL) {
- tp->t_maxopd = tp->t_maxseg = tcp_mssdflt;
- return;
- }
- ifp = rt->rt_ifp;
- so = inp->inp_socket;
-
- taop = rmx_taop(rt->rt_rmx);
- /*
- * Offer == -1 means that we didn't receive SYN yet,
- * use cached value in that case;
- */
- if (offer == -1)
- offer = taop->tao_mssopt;
- /*
- * Offer == 0 means that there was no MSS on the SYN segment,
- * in this case we use tcp_mssdflt.
- */
- if (offer == 0)
- offer = tcp_mssdflt;
- else
- /*
- * Sanity check: make sure that maxopd will be large
- * enough to allow some data on segments even is the
- * all the option space is used (40bytes). Otherwise
- * funny things may happen in tcp_output.
- */
- offer = max(offer, 64);
- taop->tao_mssopt = offer;
-
- /*
- * While we're here, check if there's an initial rtt
- * or rttvar. Convert from the route-table units
- * to scaled multiples of the slow timeout timer.
- */
- if (tp->t_srtt == 0 && (rtt = rt->rt_rmx.rmx_rtt)) {
- /*
- * XXX the lock bit for RTT indicates that the value
- * is also a minimum value; this is subject to time.
- */
- if (rt->rt_rmx.rmx_locks & RTV_RTT)
- tp->t_rttmin = rtt / (RTM_RTTUNIT / PR_SLOWHZ);
- tp->t_srtt = rtt / (RTM_RTTUNIT / (PR_SLOWHZ * TCP_RTT_SCALE));
- tcpstat.tcps_usedrtt++;
- if (rt->rt_rmx.rmx_rttvar) {
- tp->t_rttvar = rt->rt_rmx.rmx_rttvar /
- (RTM_RTTUNIT / (PR_SLOWHZ * TCP_RTTVAR_SCALE));
- tcpstat.tcps_usedrttvar++;
- } else {
- /* default variation is +- 1 rtt */
- tp->t_rttvar =
- tp->t_srtt * TCP_RTTVAR_SCALE / TCP_RTT_SCALE;
- }
- TCPT_RANGESET(tp->t_rxtcur,
- ((tp->t_srtt >> 2) + tp->t_rttvar) >> 1,
- tp->t_rttmin, TCPTV_REXMTMAX);
- }
- /*
- * if there's an mtu associated with the route, use it
- */
- if (rt->rt_rmx.rmx_mtu)
- mss = rt->rt_rmx.rmx_mtu - sizeof(struct tcpiphdr);
- else
- {
- mss = ifp->if_mtu - sizeof(struct tcpiphdr);
- if (!in_localaddr(inp->inp_faddr))
- mss = min(mss, tcp_mssdflt);
- }
- mss = min(mss, offer);
- /*
- * maxopd stores the maximum length of data AND options
- * in a segment; maxseg is the amount of data in a normal
- * segment. We need to store this value (maxopd) apart
- * from maxseg, because now every segment carries options
- * and thus we normally have somewhat less data in segments.
- */
- tp->t_maxopd = mss;
-
- /*
- * In case of T/TCP, origoffer==-1 indicates, that no segments
- * were received yet. In this case we just guess, otherwise
- * we do the same as before T/TCP.
- */
- if ((tp->t_flags & (TF_REQ_TSTMP|TF_NOOPT)) == TF_REQ_TSTMP &&
- (origoffer == -1 ||
- (tp->t_flags & TF_RCVD_TSTMP) == TF_RCVD_TSTMP))
- mss -= TCPOLEN_TSTAMP_APPA;
- if ((tp->t_flags & (TF_REQ_CC|TF_NOOPT)) == TF_REQ_CC &&
- (origoffer == -1 ||
- (tp->t_flags & TF_RCVD_CC) == TF_RCVD_CC))
- mss -= TCPOLEN_CC_APPA;
-
-#if (MCLBYTES & (MCLBYTES - 1)) == 0
- if (mss > MCLBYTES)
- mss &= ~(MCLBYTES-1);
-#else
- if (mss > MCLBYTES)
- mss = mss / MCLBYTES * MCLBYTES;
-#endif
- /*
- * If there's a pipesize, change the socket buffer
- * to that size. Make the socket buffers an integral
- * number of mss units; if the mss is larger than
- * the socket buffer, decrease the mss.
- */
-#ifdef RTV_SPIPE
- if ((bufsize = rt->rt_rmx.rmx_sendpipe) == 0)
-#endif
- bufsize = so->so_snd.sb_hiwat;
- if (bufsize < mss)
- mss = bufsize;
- else {
- bufsize = roundup(bufsize, mss);
- if (bufsize > sb_max)
- bufsize = sb_max;
- (void)sbreserve(&so->so_snd, bufsize);
- }
- tp->t_maxseg = mss;
-
-#ifdef RTV_RPIPE
- if ((bufsize = rt->rt_rmx.rmx_recvpipe) == 0)
-#endif
- bufsize = so->so_rcv.sb_hiwat;
- if (bufsize > mss) {
- bufsize = roundup(bufsize, mss);
- if (bufsize > sb_max)
- bufsize = sb_max;
- (void)sbreserve(&so->so_rcv, bufsize);
- }
- /*
- * Don't force slow-start on local network.
- */
- if (!in_localaddr(inp->inp_faddr))
- tp->snd_cwnd = mss;
-
- if (rt->rt_rmx.rmx_ssthresh) {
- /*
- * There's some sort of gateway or interface
- * buffer limit on the path. Use this to set
- * the slow start threshhold, but set the
- * threshold to no less than 2*mss.
- */
- tp->snd_ssthresh = max(2 * mss, rt->rt_rmx.rmx_ssthresh);
- tcpstat.tcps_usedssthresh++;
- }
-}
-
-/*
- * Determine the MSS option to send on an outgoing SYN.
- */
-int
-tcp_mssopt(tp)
- struct tcpcb *tp;
-{
- struct rtentry *rt;
-
- rt = tcp_rtlookup(tp->t_inpcb);
- if (rt == NULL)
- return tcp_mssdflt;
-
- return rt->rt_ifp->if_mtu - sizeof(struct tcpiphdr);
-}
-#endif /* TUBA_INCLUDE */
diff --git a/c/src/exec/libnetworking/netinet/tcp_output.c b/c/src/exec/libnetworking/netinet/tcp_output.c
deleted file mode 100644
index cbb5218dce..0000000000
--- a/c/src/exec/libnetworking/netinet/tcp_output.c
+++ /dev/null
@@ -1,755 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1995
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)tcp_output.c 8.4 (Berkeley) 5/24/95
- * $Id$
- */
-
-#include "opt_tcpdebug.h"
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/systm.h>
-#include <sys/malloc.h>
-#include <sys/mbuf.h>
-#include <sys/protosw.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/errno.h>
-
-#include <net/route.h>
-
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/in_pcb.h>
-#include <netinet/ip_var.h>
-#include <netinet/tcp.h>
-#define TCPOUTFLAGS
-#include <netinet/tcp_fsm.h>
-#include <netinet/tcp_seq.h>
-#include <netinet/tcp_timer.h>
-#include <netinet/tcp_var.h>
-#include <netinet/tcpip.h>
-#ifdef TCPDEBUG
-#include <netinet/tcp_debug.h>
-#endif
-
-#ifdef notyet
-extern struct mbuf *m_copypack();
-#endif
-
-
-/*
- * Tcp output routine: figure out what should be sent and send it.
- */
-int
-tcp_output(tp)
- register struct tcpcb *tp;
-{
- register struct socket *so = tp->t_inpcb->inp_socket;
- register long len, win;
- int off, flags, error;
- register struct mbuf *m;
- register struct tcpiphdr *ti;
- u_char opt[TCP_MAXOLEN];
- unsigned optlen, hdrlen;
- int idle, sendalot;
- struct rmxp_tao *taop;
- struct rmxp_tao tao_noncached;
-
- /*
- * Determine length of data that should be transmitted,
- * and flags that will be used.
- * If there is some data or critical controls (SYN, RST)
- * to send, then transmit; otherwise, investigate further.
- */
- idle = (tp->snd_max == tp->snd_una);
- if (idle && tp->t_idle >= tp->t_rxtcur)
- /*
- * We have been idle for "a while" and no acks are
- * expected to clock out any data we send --
- * slow start to get ack "clock" running again.
- */
- tp->snd_cwnd = tp->t_maxseg;
-again:
- sendalot = 0;
- off = tp->snd_nxt - tp->snd_una;
- win = min(tp->snd_wnd, tp->snd_cwnd);
-
- flags = tcp_outflags[tp->t_state];
- /*
- * Get standard flags, and add SYN or FIN if requested by 'hidden'
- * state flags.
- */
- if (tp->t_flags & TF_NEEDFIN)
- flags |= TH_FIN;
- if (tp->t_flags & TF_NEEDSYN)
- flags |= TH_SYN;
-
- /*
- * If in persist timeout with window of 0, send 1 byte.
- * Otherwise, if window is small but nonzero
- * and timer expired, we will send what we can
- * and go to transmit state.
- */
- if (tp->t_force) {
- if (win == 0) {
- /*
- * If we still have some data to send, then
- * clear the FIN bit. Usually this would
- * happen below when it realizes that we
- * aren't sending all the data. However,
- * if we have exactly 1 byte of unset data,
- * then it won't clear the FIN bit below,
- * and if we are in persist state, we wind
- * up sending the packet without recording
- * that we sent the FIN bit.
- *
- * We can't just blindly clear the FIN bit,
- * because if we don't have any more data
- * to send then the probe will be the FIN
- * itself.
- */
- if (off < so->so_snd.sb_cc)
- flags &= ~TH_FIN;
- win = 1;
- } else {
- tp->t_timer[TCPT_PERSIST] = 0;
- tp->t_rxtshift = 0;
- }
- }
-
- len = min(so->so_snd.sb_cc, win) - off;
-
- if ((taop = tcp_gettaocache(tp->t_inpcb)) == NULL) {
- taop = &tao_noncached;
- bzero(taop, sizeof(*taop));
- }
-
- /*
- * Lop off SYN bit if it has already been sent. However, if this
- * is SYN-SENT state and if segment contains data and if we don't
- * know that foreign host supports TAO, suppress sending segment.
- */
- if ((flags & TH_SYN) && SEQ_GT(tp->snd_nxt, tp->snd_una)) {
- flags &= ~TH_SYN;
- off--, len++;
- if (len > 0 && tp->t_state == TCPS_SYN_SENT &&
- taop->tao_ccsent == 0)
- return 0;
- }
-
- /*
- * Be careful not to send data and/or FIN on SYN segments
- * in cases when no CC option will be sent.
- * This measure is needed to prevent interoperability problems
- * with not fully conformant TCP implementations.
- */
- if ((flags & TH_SYN) &&
- ((tp->t_flags & TF_NOOPT) || !(tp->t_flags & TF_REQ_CC) ||
- ((flags & TH_ACK) && !(tp->t_flags & TF_RCVD_CC)))) {
- len = 0;
- flags &= ~TH_FIN;
- }
-
- if (len < 0) {
- /*
- * If FIN has been sent but not acked,
- * but we haven't been called to retransmit,
- * len will be -1. Otherwise, window shrank
- * after we sent into it. If window shrank to 0,
- * cancel pending retransmit, pull snd_nxt back
- * to (closed) window, and set the persist timer
- * if it isn't already going. If the window didn't
- * close completely, just wait for an ACK.
- */
- len = 0;
- if (win == 0) {
- tp->t_timer[TCPT_REXMT] = 0;
- tp->t_rxtshift = 0;
- tp->snd_nxt = tp->snd_una;
- if (tp->t_timer[TCPT_PERSIST] == 0)
- tcp_setpersist(tp);
- }
- }
- if (len > tp->t_maxseg) {
- len = tp->t_maxseg;
- sendalot = 1;
- }
- if (SEQ_LT(tp->snd_nxt + len, tp->snd_una + so->so_snd.sb_cc))
- flags &= ~TH_FIN;
-
- win = sbspace(&so->so_rcv);
-
- /*
- * Sender silly window avoidance. If connection is idle
- * and can send all data, a maximum segment,
- * at least a maximum default-size segment do it,
- * or are forced, do it; otherwise don't bother.
- * If peer's buffer is tiny, then send
- * when window is at least half open.
- * If retransmitting (possibly after persist timer forced us
- * to send into a small window), then must resend.
- */
- if (len) {
- if (len == tp->t_maxseg)
- goto send;
- if ((idle || tp->t_flags & TF_NODELAY) &&
- (tp->t_flags & TF_NOPUSH) == 0 &&
- len + off >= so->so_snd.sb_cc)
- goto send;
- if (tp->t_force)
- goto send;
- if (len >= tp->max_sndwnd / 2 && tp->max_sndwnd > 0)
- goto send;
- if (SEQ_LT(tp->snd_nxt, tp->snd_max))
- goto send;
- }
-
- /*
- * Compare available window to amount of window
- * known to peer (as advertised window less
- * next expected input). If the difference is at least two
- * max size segments, or at least 50% of the maximum possible
- * window, then want to send a window update to peer.
- */
- if (win > 0) {
- /*
- * "adv" is the amount we can increase the window,
- * taking into account that we are limited by
- * TCP_MAXWIN << tp->rcv_scale.
- */
- long adv = min(win, (long)TCP_MAXWIN << tp->rcv_scale) -
- (tp->rcv_adv - tp->rcv_nxt);
-
- if (adv >= (long) (2 * tp->t_maxseg))
- goto send;
- if (2 * adv >= (long) so->so_rcv.sb_hiwat)
- goto send;
- }
-
- /*
- * Send if we owe peer an ACK.
- */
- if (tp->t_flags & TF_ACKNOW)
- goto send;
- if ((flags & TH_RST) ||
- ((flags & TH_SYN) && (tp->t_flags & TF_NEEDSYN) == 0))
- goto send;
- if (SEQ_GT(tp->snd_up, tp->snd_una))
- goto send;
- /*
- * If our state indicates that FIN should be sent
- * and we have not yet done so, or we're retransmitting the FIN,
- * then we need to send.
- */
- if (flags & TH_FIN &&
- ((tp->t_flags & TF_SENTFIN) == 0 || tp->snd_nxt == tp->snd_una))
- goto send;
-
- /*
- * TCP window updates are not reliable, rather a polling protocol
- * using ``persist'' packets is used to insure receipt of window
- * updates. The three ``states'' for the output side are:
- * idle not doing retransmits or persists
- * persisting to move a small or zero window
- * (re)transmitting and thereby not persisting
- *
- * tp->t_timer[TCPT_PERSIST]
- * is set when we are in persist state.
- * tp->t_force
- * is set when we are called to send a persist packet.
- * tp->t_timer[TCPT_REXMT]
- * is set when we are retransmitting
- * The output side is idle when both timers are zero.
- *
- * If send window is too small, there is data to transmit, and no
- * retransmit or persist is pending, then go to persist state.
- * If nothing happens soon, send when timer expires:
- * if window is nonzero, transmit what we can,
- * otherwise force out a byte.
- */
- if (so->so_snd.sb_cc && tp->t_timer[TCPT_REXMT] == 0 &&
- tp->t_timer[TCPT_PERSIST] == 0) {
- tp->t_rxtshift = 0;
- tcp_setpersist(tp);
- }
-
- /*
- * No reason to send a segment, just return.
- */
- return (0);
-
-send:
- /*
- * Before ESTABLISHED, force sending of initial options
- * unless TCP set not to do any options.
- * NOTE: we assume that the IP/TCP header plus TCP options
- * always fit in a single mbuf, leaving room for a maximum
- * link header, i.e.
- * max_linkhdr + sizeof (struct tcpiphdr) + optlen <= MHLEN
- */
- optlen = 0;
- hdrlen = sizeof (struct tcpiphdr);
- if (flags & TH_SYN) {
- tp->snd_nxt = tp->iss;
- if ((tp->t_flags & TF_NOOPT) == 0) {
- u_short mss;
-
- opt[0] = TCPOPT_MAXSEG;
- opt[1] = TCPOLEN_MAXSEG;
- mss = htons((u_short) tcp_mssopt(tp));
- (void)memcpy(opt + 2, &mss, sizeof(mss));
- optlen = TCPOLEN_MAXSEG;
-
- if ((tp->t_flags & TF_REQ_SCALE) &&
- ((flags & TH_ACK) == 0 ||
- (tp->t_flags & TF_RCVD_SCALE))) {
- *((u_long *) (opt + optlen)) = htonl(
- TCPOPT_NOP << 24 |
- TCPOPT_WINDOW << 16 |
- TCPOLEN_WINDOW << 8 |
- tp->request_r_scale);
- optlen += 4;
- }
- }
- }
-
- /*
- * Send a timestamp and echo-reply if this is a SYN and our side
- * wants to use timestamps (TF_REQ_TSTMP is set) or both our side
- * and our peer have sent timestamps in our SYN's.
- */
- if ((tp->t_flags & (TF_REQ_TSTMP|TF_NOOPT)) == TF_REQ_TSTMP &&
- (flags & TH_RST) == 0 &&
- ((flags & TH_ACK) == 0 ||
- (tp->t_flags & TF_RCVD_TSTMP))) {
- u_long *lp = (u_long *)(opt + optlen);
-
- /* Form timestamp option as shown in appendix A of RFC 1323. */
- *lp++ = htonl(TCPOPT_TSTAMP_HDR);
- *lp++ = htonl(tcp_now);
- *lp = htonl(tp->ts_recent);
- optlen += TCPOLEN_TSTAMP_APPA;
- }
-
- /*
- * Send `CC-family' options if our side wants to use them (TF_REQ_CC),
- * options are allowed (!TF_NOOPT) and it's not a RST.
- */
- if ((tp->t_flags & (TF_REQ_CC|TF_NOOPT)) == TF_REQ_CC &&
- (flags & TH_RST) == 0) {
- switch (flags & (TH_SYN|TH_ACK)) {
- /*
- * This is a normal ACK, send CC if we received CC before
- * from our peer.
- */
- case TH_ACK:
- if (!(tp->t_flags & TF_RCVD_CC))
- break;
- /*FALLTHROUGH*/
-
- /*
- * We can only get here in T/TCP's SYN_SENT* state, when
- * we're a sending a non-SYN segment without waiting for
- * the ACK of our SYN. A check above assures that we only
- * do this if our peer understands T/TCP.
- */
- case 0:
- opt[optlen++] = TCPOPT_NOP;
- opt[optlen++] = TCPOPT_NOP;
- opt[optlen++] = TCPOPT_CC;
- opt[optlen++] = TCPOLEN_CC;
- *(u_int32_t *)&opt[optlen] = htonl(tp->cc_send);
-
- optlen += 4;
- break;
-
- /*
- * This is our initial SYN, check whether we have to use
- * CC or CC.new.
- */
- case TH_SYN:
- opt[optlen++] = TCPOPT_NOP;
- opt[optlen++] = TCPOPT_NOP;
- opt[optlen++] = tp->t_flags & TF_SENDCCNEW ?
- TCPOPT_CCNEW : TCPOPT_CC;
- opt[optlen++] = TCPOLEN_CC;
- *(u_int32_t *)&opt[optlen] = htonl(tp->cc_send);
- optlen += 4;
- break;
-
- /*
- * This is a SYN,ACK; send CC and CC.echo if we received
- * CC from our peer.
- */
- case (TH_SYN|TH_ACK):
- if (tp->t_flags & TF_RCVD_CC) {
- opt[optlen++] = TCPOPT_NOP;
- opt[optlen++] = TCPOPT_NOP;
- opt[optlen++] = TCPOPT_CC;
- opt[optlen++] = TCPOLEN_CC;
- *(u_int32_t *)&opt[optlen] =
- htonl(tp->cc_send);
- optlen += 4;
- opt[optlen++] = TCPOPT_NOP;
- opt[optlen++] = TCPOPT_NOP;
- opt[optlen++] = TCPOPT_CCECHO;
- opt[optlen++] = TCPOLEN_CC;
- *(u_int32_t *)&opt[optlen] =
- htonl(tp->cc_recv);
- optlen += 4;
- }
- break;
- }
- }
-
- hdrlen += optlen;
-
- /*
- * Adjust data length if insertion of options will
- * bump the packet length beyond the t_maxopd length.
- * Clear the FIN bit because we cut off the tail of
- * the segment.
- */
- if (len + optlen > tp->t_maxopd) {
- /*
- * If there is still more to send, don't close the connection.
- */
- flags &= ~TH_FIN;
- len = tp->t_maxopd - optlen;
- sendalot = 1;
- }
-
-/*#ifdef DIAGNOSTIC*/
- if (max_linkhdr + hdrlen > MHLEN)
- panic("tcphdr too big");
-/*#endif*/
-
- /*
- * Grab a header mbuf, attaching a copy of data to
- * be transmitted, and initialize the header from
- * the template for sends on this connection.
- */
- if (len) {
- if (tp->t_force && len == 1)
- tcpstat.tcps_sndprobe++;
- else if (SEQ_LT(tp->snd_nxt, tp->snd_max)) {
- tcpstat.tcps_sndrexmitpack++;
- tcpstat.tcps_sndrexmitbyte += len;
- } else {
- tcpstat.tcps_sndpack++;
- tcpstat.tcps_sndbyte += len;
- }
-#ifdef notyet
- if ((m = m_copypack(so->so_snd.sb_mb, off,
- (int)len, max_linkhdr + hdrlen)) == 0) {
- error = ENOBUFS;
- goto out;
- }
- /*
- * m_copypack left space for our hdr; use it.
- */
- m->m_len += hdrlen;
- m->m_data -= hdrlen;
-#else
- MGETHDR(m, M_DONTWAIT, MT_HEADER);
- if (m == NULL) {
- error = ENOBUFS;
- goto out;
- }
- m->m_data += max_linkhdr;
- m->m_len = hdrlen;
- if (len <= MHLEN - hdrlen - max_linkhdr) {
- m_copydata(so->so_snd.sb_mb, off, (int) len,
- mtod(m, caddr_t) + hdrlen);
- m->m_len += len;
- } else {
- m->m_next = m_copy(so->so_snd.sb_mb, off, (int) len);
- if (m->m_next == 0) {
- (void) m_free(m);
- error = ENOBUFS;
- goto out;
- }
- }
-#endif
- /*
- * If we're sending everything we've got, set PUSH.
- * (This will keep happy those implementations which only
- * give data to the user when a buffer fills or
- * a PUSH comes in.)
- */
- if (off + len == so->so_snd.sb_cc)
- flags |= TH_PUSH;
- } else {
- if (tp->t_flags & TF_ACKNOW)
- tcpstat.tcps_sndacks++;
- else if (flags & (TH_SYN|TH_FIN|TH_RST))
- tcpstat.tcps_sndctrl++;
- else if (SEQ_GT(tp->snd_up, tp->snd_una))
- tcpstat.tcps_sndurg++;
- else
- tcpstat.tcps_sndwinup++;
-
- MGETHDR(m, M_DONTWAIT, MT_HEADER);
- if (m == NULL) {
- error = ENOBUFS;
- goto out;
- }
- m->m_data += max_linkhdr;
- m->m_len = hdrlen;
- }
- m->m_pkthdr.rcvif = (struct ifnet *)0;
- ti = mtod(m, struct tcpiphdr *);
- if (tp->t_template == 0)
- panic("tcp_output");
- (void)memcpy(ti, tp->t_template, sizeof (struct tcpiphdr));
-
- /*
- * Fill in fields, remembering maximum advertised
- * window for use in delaying messages about window sizes.
- * If resending a FIN, be sure not to use a new sequence number.
- */
- if (flags & TH_FIN && tp->t_flags & TF_SENTFIN &&
- tp->snd_nxt == tp->snd_max)
- tp->snd_nxt--;
- /*
- * If we are doing retransmissions, then snd_nxt will
- * not reflect the first unsent octet. For ACK only
- * packets, we do not want the sequence number of the
- * retransmitted packet, we want the sequence number
- * of the next unsent octet. So, if there is no data
- * (and no SYN or FIN), use snd_max instead of snd_nxt
- * when filling in ti_seq. But if we are in persist
- * state, snd_max might reflect one byte beyond the
- * right edge of the window, so use snd_nxt in that
- * case, since we know we aren't doing a retransmission.
- * (retransmit and persist are mutually exclusive...)
- */
- if (len || (flags & (TH_SYN|TH_FIN)) || tp->t_timer[TCPT_PERSIST])
- ti->ti_seq = htonl(tp->snd_nxt);
- else
- ti->ti_seq = htonl(tp->snd_max);
- ti->ti_ack = htonl(tp->rcv_nxt);
- if (optlen) {
- bcopy(opt, ti + 1, optlen);
- ti->ti_off = (sizeof (struct tcphdr) + optlen) >> 2;
- }
- ti->ti_flags = flags;
- /*
- * Calculate receive window. Don't shrink window,
- * but avoid silly window syndrome.
- */
- if (win < (long)(so->so_rcv.sb_hiwat / 4) && win < (long)tp->t_maxseg)
- win = 0;
- if (win < (long)(tp->rcv_adv - tp->rcv_nxt))
- win = (long)(tp->rcv_adv - tp->rcv_nxt);
- if (win > (long)TCP_MAXWIN << tp->rcv_scale)
- win = (long)TCP_MAXWIN << tp->rcv_scale;
- ti->ti_win = htons((u_short) (win>>tp->rcv_scale));
- if (SEQ_GT(tp->snd_up, tp->snd_nxt)) {
- ti->ti_urp = htons((u_short)(tp->snd_up - tp->snd_nxt));
- ti->ti_flags |= TH_URG;
- } else
- /*
- * If no urgent pointer to send, then we pull
- * the urgent pointer to the left edge of the send window
- * so that it doesn't drift into the send window on sequence
- * number wraparound.
- */
- tp->snd_up = tp->snd_una; /* drag it along */
-
- /*
- * Put TCP length in extended header, and then
- * checksum extended header and data.
- */
- if (len + optlen)
- ti->ti_len = htons((u_short)(sizeof (struct tcphdr) +
- optlen + len));
- ti->ti_sum = in_cksum(m, (int)(hdrlen + len));
-
- /*
- * In transmit state, time the transmission and arrange for
- * the retransmit. In persist state, just set snd_max.
- */
- if (tp->t_force == 0 || tp->t_timer[TCPT_PERSIST] == 0) {
- tcp_seq startseq = tp->snd_nxt;
-
- /*
- * Advance snd_nxt over sequence space of this segment.
- */
- if (flags & (TH_SYN|TH_FIN)) {
- if (flags & TH_SYN)
- tp->snd_nxt++;
- if (flags & TH_FIN) {
- tp->snd_nxt++;
- tp->t_flags |= TF_SENTFIN;
- }
- }
- tp->snd_nxt += len;
- if (SEQ_GT(tp->snd_nxt, tp->snd_max)) {
- tp->snd_max = tp->snd_nxt;
- /*
- * Time this transmission if not a retransmission and
- * not currently timing anything.
- */
- if (tp->t_rtt == 0) {
- tp->t_rtt = 1;
- tp->t_rtseq = startseq;
- tcpstat.tcps_segstimed++;
- }
- }
-
- /*
- * Set retransmit timer if not currently set,
- * and not doing an ack or a keep-alive probe.
- * Initial value for retransmit timer is smoothed
- * round-trip time + 2 * round-trip time variance.
- * Initialize shift counter which is used for backoff
- * of retransmit time.
- */
- if (tp->t_timer[TCPT_REXMT] == 0 &&
- tp->snd_nxt != tp->snd_una) {
- tp->t_timer[TCPT_REXMT] = tp->t_rxtcur;
- if (tp->t_timer[TCPT_PERSIST]) {
- tp->t_timer[TCPT_PERSIST] = 0;
- tp->t_rxtshift = 0;
- }
- }
- } else
- if (SEQ_GT(tp->snd_nxt + len, tp->snd_max))
- tp->snd_max = tp->snd_nxt + len;
-
-#ifdef TCPDEBUG
- /*
- * Trace.
- */
- if (so->so_options & SO_DEBUG)
- tcp_trace(TA_OUTPUT, tp->t_state, tp, ti, 0);
-#endif
-
- /*
- * Fill in IP length and desired time to live and
- * send to IP level. There should be a better way
- * to handle ttl and tos; we could keep them in
- * the template, but need a way to checksum without them.
- */
- m->m_pkthdr.len = hdrlen + len;
-#ifdef TUBA
- if (tp->t_tuba_pcb)
- error = tuba_output(m, tp);
- else
-#endif
- {
-#if 1
- struct rtentry *rt;
-#endif
- ((struct ip *)ti)->ip_len = m->m_pkthdr.len;
- ((struct ip *)ti)->ip_ttl = tp->t_inpcb->inp_ip_ttl; /* XXX */
- ((struct ip *)ti)->ip_tos = tp->t_inpcb->inp_ip_tos; /* XXX */
-#if 1
- /*
- * See if we should do MTU discovery. We do it only if the following
- * are true:
- * 1) we have a valid route to the destination
- * 2) the MTU is not locked (if it is, then discovery has been
- * disabled)
- */
- if ((rt = tp->t_inpcb->inp_route.ro_rt)
- && rt->rt_flags & RTF_UP
- && !(rt->rt_rmx.rmx_locks & RTV_MTU)) {
- ((struct ip *)ti)->ip_off |= IP_DF;
- }
-#endif
- error = ip_output(m, tp->t_inpcb->inp_options, &tp->t_inpcb->inp_route,
- so->so_options & SO_DONTROUTE, 0);
- }
- if (error) {
-out:
- if (error == ENOBUFS) {
- tcp_quench(tp->t_inpcb, 0);
- return (0);
- }
-#if 1
- if (error == EMSGSIZE) {
- /*
- * ip_output() will have already fixed the route
- * for us. tcp_mtudisc() will, as its last action,
- * initiate retransmission, so it is important to
- * not do so here.
- */
- tcp_mtudisc(tp->t_inpcb, 0);
- return 0;
- }
-#endif
- if ((error == EHOSTUNREACH || error == ENETDOWN)
- && TCPS_HAVERCVDSYN(tp->t_state)) {
- tp->t_softerror = error;
- return (0);
- }
- return (error);
- }
- tcpstat.tcps_sndtotal++;
-
- /*
- * Data sent (as far as we can tell).
- * If this advertises a larger window than any other segment,
- * then remember the size of the advertised window.
- * Any pending ACK has now been sent.
- */
- if (win > 0 && SEQ_GT(tp->rcv_nxt+win, tp->rcv_adv))
- tp->rcv_adv = tp->rcv_nxt + win;
- tp->last_ack_sent = tp->rcv_nxt;
- tp->t_flags &= ~(TF_ACKNOW|TF_DELACK);
- if (sendalot)
- goto again;
- return (0);
-}
-
-void
-tcp_setpersist(tp)
- register struct tcpcb *tp;
-{
- register int t = ((tp->t_srtt >> 2) + tp->t_rttvar) >> 1;
-
- if (tp->t_timer[TCPT_REXMT])
- panic("tcp_output REXMT");
- /*
- * Start/restart persistance timer.
- */
- TCPT_RANGESET(tp->t_timer[TCPT_PERSIST],
- t * tcp_backoff[tp->t_rxtshift],
- TCPTV_PERSMIN, TCPTV_PERSMAX);
- if (tp->t_rxtshift < TCP_MAXRXTSHIFT)
- tp->t_rxtshift++;
-}
diff --git a/c/src/exec/libnetworking/netinet/tcp_seq.h b/c/src/exec/libnetworking/netinet/tcp_seq.h
deleted file mode 100644
index 8cccf199e1..0000000000
--- a/c/src/exec/libnetworking/netinet/tcp_seq.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993, 1995
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)tcp_seq.h 8.3 (Berkeley) 6/21/95
- * $Id$
- */
-
-#ifndef _NETINET_TCP_SEQ_H_
-#define _NETINET_TCP_SEQ_H_
-/*
- * TCP sequence numbers are 32 bit integers operated
- * on with modular arithmetic. These macros can be
- * used to compare such integers.
- */
-#define SEQ_LT(a,b) ((int)((a)-(b)) < 0)
-#define SEQ_LEQ(a,b) ((int)((a)-(b)) <= 0)
-#define SEQ_GT(a,b) ((int)((a)-(b)) > 0)
-#define SEQ_GEQ(a,b) ((int)((a)-(b)) >= 0)
-
-/* for modulo comparisons of timestamps */
-#define TSTMP_LT(a,b) ((int)((a)-(b)) < 0)
-#define TSTMP_GEQ(a,b) ((int)((a)-(b)) >= 0)
-
-/*
- * TCP connection counts are 32 bit integers operated
- * on with modular arithmetic. These macros can be
- * used to compare such integers.
- */
-#define CC_LT(a,b) ((int)((a)-(b)) < 0)
-#define CC_LEQ(a,b) ((int)((a)-(b)) <= 0)
-#define CC_GT(a,b) ((int)((a)-(b)) > 0)
-#define CC_GEQ(a,b) ((int)((a)-(b)) >= 0)
-
-/* Macro to increment a CC: skip 0 which has a special meaning */
-#define CC_INC(c) (++(c) == 0 ? ++(c) : (c))
-
-/*
- * Macros to initialize tcp sequence numbers for
- * send and receive from initial send and receive
- * sequence numbers.
- */
-#define tcp_rcvseqinit(tp) \
- (tp)->rcv_adv = (tp)->rcv_nxt = (tp)->irs + 1
-
-#define tcp_sendseqinit(tp) \
- (tp)->snd_una = (tp)->snd_nxt = (tp)->snd_max = (tp)->snd_up = \
- (tp)->iss
-
-#define TCP_PAWS_IDLE (24 * 24 * 60 * 60 * PR_SLOWHZ)
- /* timestamp wrap-around time */
-
-#ifdef KERNEL
-extern tcp_cc tcp_ccgen; /* global connection count */
-
-/*
- * Increment for tcp_iss each second.
- * This is designed to increment at the standard 250 KB/s,
- * but with a random component averaging 128 KB.
- * We also increment tcp_iss by a quarter of this amount
- * each time we use the value for a new connection.
- * If defined, the tcp_random18() macro should produce a
- * number in the range [0-0x3ffff] that is hard to predict.
- */
-#ifndef tcp_random18
-#define tcp_random18() ((random() >> 14) & 0x3ffff)
-#endif
-#define TCP_ISSINCR (122*1024 + tcp_random18())
-
-extern tcp_seq tcp_iss; /* tcp initial send seq # */
-#else
-#define TCP_ISSINCR (250*1024) /* increment for tcp_iss each second */
-#endif /* KERNEL */
-#endif /* _NETINET_TCP_SEQ_H_ */
diff --git a/c/src/exec/libnetworking/netinet/tcp_subr.c b/c/src/exec/libnetworking/netinet/tcp_subr.c
deleted file mode 100644
index a9cde3fdf0..0000000000
--- a/c/src/exec/libnetworking/netinet/tcp_subr.c
+++ /dev/null
@@ -1,634 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1995
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)tcp_subr.c 8.2 (Berkeley) 5/24/95
- * $Id$
- */
-
-#include "opt_tcpdebug.h"
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/proc.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/sysctl.h>
-#include <sys/malloc.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/protosw.h>
-#include <sys/errno.h>
-
-#include <net/route.h>
-#include <net/if.h>
-
-#define _IP_VHL
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/in_pcb.h>
-#include <netinet/in_var.h>
-#include <netinet/ip_var.h>
-#include <netinet/ip_icmp.h>
-#include <netinet/tcp.h>
-#include <netinet/tcp_fsm.h>
-#include <netinet/tcp_seq.h>
-#include <netinet/tcp_timer.h>
-#include <netinet/tcp_var.h>
-#include <netinet/tcpip.h>
-#ifdef TCPDEBUG
-#include <netinet/tcp_debug.h>
-#endif
-
-int tcp_mssdflt = TCP_MSS;
-SYSCTL_INT(_net_inet_tcp, TCPCTL_MSSDFLT, mssdflt,
- CTLFLAG_RW, &tcp_mssdflt , 0, "");
-
-static int tcp_do_rfc1323 = 1;
-static int tcp_do_rfc1644 = 1;
-#if !defined(__rtems__)
-static int tcp_rttdflt = TCPTV_SRTTDFLT / PR_SLOWHZ;
-SYSCTL_INT(_net_inet_tcp, TCPCTL_RTTDFLT, rttdflt,
- CTLFLAG_RW, &tcp_rttdflt , 0, "");
-
-SYSCTL_INT(_net_inet_tcp, TCPCTL_DO_RFC1323, rfc1323,
- CTLFLAG_RW, &tcp_do_rfc1323 , 0, "");
-
-SYSCTL_INT(_net_inet_tcp, TCPCTL_DO_RFC1644, rfc1644,
- CTLFLAG_RW, &tcp_do_rfc1644 , 0, "");
-#endif
-
-static void tcp_cleartaocache(void);
-static void tcp_notify __P((struct inpcb *, int));
-
-/*
- * Target size of TCP PCB hash table. Will be rounded down to a prime
- * number.
- */
-#ifndef TCBHASHSIZE
-#define TCBHASHSIZE 128
-#endif
-
-/*
- * Tcp initialization
- */
-void
-tcp_init()
-{
-
- tcp_iss = random(); /* wrong, but better than a constant */
- tcp_ccgen = 1;
- tcp_cleartaocache();
- LIST_INIT(&tcb);
- tcbinfo.listhead = &tcb;
- tcbinfo.hashbase = hashinit(TCBHASHSIZE, M_PCB, &tcbinfo.hashmask);
- if (max_protohdr < sizeof(struct tcpiphdr))
- max_protohdr = sizeof(struct tcpiphdr);
- if (max_linkhdr + sizeof(struct tcpiphdr) > MHLEN)
- panic("tcp_init");
-}
-
-/*
- * Create template to be used to send tcp packets on a connection.
- * Call after host entry created, allocates an mbuf and fills
- * in a skeletal tcp/ip header, minimizing the amount of work
- * necessary when the connection is used.
- */
-struct tcpiphdr *
-tcp_template(tp)
- struct tcpcb *tp;
-{
- register struct inpcb *inp = tp->t_inpcb;
- register struct mbuf *m;
- register struct tcpiphdr *n;
-
- if ((n = tp->t_template) == 0) {
- m = m_get(M_DONTWAIT, MT_HEADER);
- if (m == NULL)
- return (0);
- m->m_len = sizeof (struct tcpiphdr);
- n = mtod(m, struct tcpiphdr *);
- }
- n->ti_next = n->ti_prev = 0;
- n->ti_x1 = 0;
- n->ti_pr = IPPROTO_TCP;
- n->ti_len = htons(sizeof (struct tcpiphdr) - sizeof (struct ip));
- n->ti_src = inp->inp_laddr;
- n->ti_dst = inp->inp_faddr;
- n->ti_sport = inp->inp_lport;
- n->ti_dport = inp->inp_fport;
- n->ti_seq = 0;
- n->ti_ack = 0;
- n->ti_x2 = 0;
- n->ti_off = 5;
- n->ti_flags = 0;
- n->ti_win = 0;
- n->ti_sum = 0;
- n->ti_urp = 0;
- return (n);
-}
-
-/*
- * Send a single message to the TCP at address specified by
- * the given TCP/IP header. If m == 0, then we make a copy
- * of the tcpiphdr at ti and send directly to the addressed host.
- * This is used to force keep alive messages out using the TCP
- * template for a connection tp->t_template. If flags are given
- * then we send a message back to the TCP which originated the
- * segment ti, and discard the mbuf containing it and any other
- * attached mbufs.
- *
- * In any case the ack and sequence number of the transmitted
- * segment are as specified by the parameters.
- *
- * NOTE: If m != NULL, then ti must point to *inside* the mbuf.
- */
-void
-tcp_respond(tp, ti, m, ack, seq, flags)
- struct tcpcb *tp;
- register struct tcpiphdr *ti;
- register struct mbuf *m;
- tcp_seq ack, seq;
- int flags;
-{
- register int tlen;
- int win = 0;
- struct route *ro = 0;
- struct route sro;
-
- if (tp) {
- win = sbspace(&tp->t_inpcb->inp_socket->so_rcv);
- ro = &tp->t_inpcb->inp_route;
- } else {
- ro = &sro;
- bzero(ro, sizeof *ro);
- }
- if (m == 0) {
- m = m_gethdr(M_DONTWAIT, MT_HEADER);
- if (m == NULL)
- return;
-#ifdef TCP_COMPAT_42
- tlen = 1;
-#else
- tlen = 0;
-#endif
- m->m_data += max_linkhdr;
- *mtod(m, struct tcpiphdr *) = *ti;
- ti = mtod(m, struct tcpiphdr *);
- flags = TH_ACK;
- } else {
- m_freem(m->m_next);
- m->m_next = 0;
- m->m_data = (caddr_t)ti;
- m->m_len = sizeof (struct tcpiphdr);
- tlen = 0;
-#define xchg(a,b,type) { type t; t=a; a=b; b=t; }
- xchg(ti->ti_dst.s_addr, ti->ti_src.s_addr, u_long);
- xchg(ti->ti_dport, ti->ti_sport, u_short);
-#undef xchg
- }
- ti->ti_len = htons((u_short)(sizeof (struct tcphdr) + tlen));
- tlen += sizeof (struct tcpiphdr);
- m->m_len = tlen;
- m->m_pkthdr.len = tlen;
- m->m_pkthdr.rcvif = (struct ifnet *) 0;
- ti->ti_next = ti->ti_prev = 0;
- ti->ti_x1 = 0;
- ti->ti_seq = htonl(seq);
- ti->ti_ack = htonl(ack);
- ti->ti_x2 = 0;
- ti->ti_off = sizeof (struct tcphdr) >> 2;
- ti->ti_flags = flags;
- if (tp)
- ti->ti_win = htons((u_short) (win >> tp->rcv_scale));
- else
- ti->ti_win = htons((u_short)win);
- ti->ti_urp = 0;
- ti->ti_sum = 0;
- ti->ti_sum = in_cksum(m, tlen);
- ((struct ip *)ti)->ip_len = tlen;
- ((struct ip *)ti)->ip_ttl = ip_defttl;
-#ifdef TCPDEBUG
- if (tp == NULL || (tp->t_inpcb->inp_socket->so_options & SO_DEBUG))
- tcp_trace(TA_OUTPUT, 0, tp, ti, 0);
-#endif
- (void) ip_output(m, NULL, ro, 0, NULL);
- if (ro == &sro && ro->ro_rt) {
- RTFREE(ro->ro_rt);
- }
-}
-
-/*
- * Create a new TCP control block, making an
- * empty reassembly queue and hooking it to the argument
- * protocol control block.
- */
-struct tcpcb *
-tcp_newtcpcb(inp)
- struct inpcb *inp;
-{
- register struct tcpcb *tp;
-
- tp = malloc(sizeof(*tp), M_PCB, M_NOWAIT);
- if (tp == NULL)
- return ((struct tcpcb *)0);
- bzero((char *) tp, sizeof(struct tcpcb));
- tp->seg_next = tp->seg_prev = (struct tcpiphdr *)tp;
- tp->t_maxseg = tp->t_maxopd = tcp_mssdflt;
-
- if (tcp_do_rfc1323)
- tp->t_flags = (TF_REQ_SCALE|TF_REQ_TSTMP);
- if (tcp_do_rfc1644)
- tp->t_flags |= TF_REQ_CC;
- tp->t_inpcb = inp;
- /*
- * Init srtt to TCPTV_SRTTBASE (0), so we can tell that we have no
- * rtt estimate. Set rttvar so that srtt + 4 * rttvar gives
- * reasonable initial retransmit time.
- */
- tp->t_srtt = TCPTV_SRTTBASE;
- tp->t_rttvar = ((TCPTV_RTOBASE - TCPTV_SRTTBASE) << TCP_RTTVAR_SHIFT) / 4;
- tp->t_rttmin = TCPTV_MIN;
- tp->t_rxtcur = TCPTV_RTOBASE;
- tp->snd_cwnd = TCP_MAXWIN << TCP_MAX_WINSHIFT;
- tp->snd_ssthresh = TCP_MAXWIN << TCP_MAX_WINSHIFT;
- inp->inp_ip_ttl = ip_defttl;
- inp->inp_ppcb = (caddr_t)tp;
- return (tp);
-}
-
-/*
- * Drop a TCP connection, reporting
- * the specified error. If connection is synchronized,
- * then send a RST to peer.
- */
-struct tcpcb *
-tcp_drop(tp, errnum)
- register struct tcpcb *tp;
- int errnum;
-{
- struct socket *so = tp->t_inpcb->inp_socket;
-
- if (TCPS_HAVERCVDSYN(tp->t_state)) {
- tp->t_state = TCPS_CLOSED;
- (void) tcp_output(tp);
- tcpstat.tcps_drops++;
- } else
- tcpstat.tcps_conndrops++;
- if (errnum == ETIMEDOUT && tp->t_softerror)
- errnum = tp->t_softerror;
- so->so_error = errnum;
- return (tcp_close(tp));
-}
-
-/*
- * Close a TCP control block:
- * discard all space held by the tcp
- * discard internet protocol block
- * wake up any sleepers
- */
-struct tcpcb *
-tcp_close(tp)
- register struct tcpcb *tp;
-{
- register struct tcpiphdr *t;
- struct inpcb *inp = tp->t_inpcb;
- struct socket *so = inp->inp_socket;
- register struct mbuf *m;
- register struct rtentry *rt;
-
- /*
- * If we got enough samples through the srtt filter,
- * save the rtt and rttvar in the routing entry.
- * 'Enough' is arbitrarily defined as the 16 samples.
- * 16 samples is enough for the srtt filter to converge
- * to within 5% of the correct value; fewer samples and
- * we could save a very bogus rtt.
- *
- * Don't update the default route's characteristics and don't
- * update anything that the user "locked".
- */
- if (tp->t_rttupdated >= 16 &&
- (rt = inp->inp_route.ro_rt) &&
- ((struct sockaddr_in *)rt_key(rt))->sin_addr.s_addr != INADDR_ANY) {
- register u_long i = 0;
-
- if ((rt->rt_rmx.rmx_locks & RTV_RTT) == 0) {
- i = tp->t_srtt *
- (RTM_RTTUNIT / (PR_SLOWHZ * TCP_RTT_SCALE));
- if (rt->rt_rmx.rmx_rtt && i)
- /*
- * filter this update to half the old & half
- * the new values, converting scale.
- * See route.h and tcp_var.h for a
- * description of the scaling constants.
- */
- rt->rt_rmx.rmx_rtt =
- (rt->rt_rmx.rmx_rtt + i) / 2;
- else
- rt->rt_rmx.rmx_rtt = i;
- tcpstat.tcps_cachedrtt++;
- }
- if ((rt->rt_rmx.rmx_locks & RTV_RTTVAR) == 0) {
- i = tp->t_rttvar *
- (RTM_RTTUNIT / (PR_SLOWHZ * TCP_RTTVAR_SCALE));
- if (rt->rt_rmx.rmx_rttvar && i)
- rt->rt_rmx.rmx_rttvar =
- (rt->rt_rmx.rmx_rttvar + i) / 2;
- else
- rt->rt_rmx.rmx_rttvar = i;
- tcpstat.tcps_cachedrttvar++;
- }
- /*
- * update the pipelimit (ssthresh) if it has been updated
- * already or if a pipesize was specified & the threshhold
- * got below half the pipesize. I.e., wait for bad news
- * before we start updating, then update on both good
- * and bad news.
- */
- if (((rt->rt_rmx.rmx_locks & RTV_SSTHRESH) == 0 &&
- ((i = tp->snd_ssthresh) != 0) && rt->rt_rmx.rmx_ssthresh) ||
- i < (rt->rt_rmx.rmx_sendpipe / 2)) {
- /*
- * convert the limit from user data bytes to
- * packets then to packet data bytes.
- */
- i = (i + tp->t_maxseg / 2) / tp->t_maxseg;
- if (i < 2)
- i = 2;
- i *= (u_long)(tp->t_maxseg + sizeof (struct tcpiphdr));
- if (rt->rt_rmx.rmx_ssthresh)
- rt->rt_rmx.rmx_ssthresh =
- (rt->rt_rmx.rmx_ssthresh + i) / 2;
- else
- rt->rt_rmx.rmx_ssthresh = i;
- tcpstat.tcps_cachedssthresh++;
- }
- }
- /* free the reassembly queue, if any */
- t = tp->seg_next;
- while (t != (struct tcpiphdr *)tp) {
- t = (struct tcpiphdr *)t->ti_next;
- m = REASS_MBUF((struct tcpiphdr *)t->ti_prev);
- remque(t->ti_prev);
- m_freem(m);
- }
- if (tp->t_template)
- (void) m_free(dtom(tp->t_template));
- free(tp, M_PCB);
- inp->inp_ppcb = 0;
- soisdisconnected(so);
- in_pcbdetach(inp);
- tcpstat.tcps_closed++;
- return ((struct tcpcb *)0);
-}
-
-void
-tcp_drain()
-{
-
-}
-
-/*
- * Notify a tcp user of an asynchronous error;
- * store error as soft error, but wake up user
- * (for now, won't do anything until can select for soft error).
- */
-static void
-tcp_notify(inp, error)
- struct inpcb *inp;
- int error;
-{
- register struct tcpcb *tp = (struct tcpcb *)inp->inp_ppcb;
- register struct socket *so = inp->inp_socket;
-
- /*
- * Ignore some errors if we are hooked up.
- * If connection hasn't completed, has retransmitted several times,
- * and receives a second error, give up now. This is better
- * than waiting a long time to establish a connection that
- * can never complete.
- */
- if (tp->t_state == TCPS_ESTABLISHED &&
- (error == EHOSTUNREACH || error == ENETUNREACH ||
- error == EHOSTDOWN)) {
- return;
- } else if (tp->t_state < TCPS_ESTABLISHED && tp->t_rxtshift > 3 &&
- tp->t_softerror)
- so->so_error = error;
- else
- tp->t_softerror = error;
- soconnwakeup (so);
- sorwakeup(so);
- sowwakeup(so);
-}
-
-void
-tcp_ctlinput(cmd, sa, vip)
- int cmd;
- struct sockaddr *sa;
- void *vip;
-{
- register struct ip *ip = vip;
- register struct tcphdr *th;
- void (*notify) __P((struct inpcb *, int)) = tcp_notify;
-
- if (cmd == PRC_QUENCH)
- notify = tcp_quench;
-#if 1
- else if (cmd == PRC_MSGSIZE)
- notify = tcp_mtudisc;
-#endif
- else if (!PRC_IS_REDIRECT(cmd) &&
- ((unsigned)cmd > PRC_NCMDS || inetctlerrmap[cmd] == 0))
- return;
- if (ip) {
- th = (struct tcphdr *)((caddr_t)ip
- + (IP_VHL_HL(ip->ip_vhl) << 2));
- in_pcbnotify(&tcb, sa, th->th_dport, ip->ip_src, th->th_sport,
- cmd, notify);
- } else
- in_pcbnotify(&tcb, sa, 0, zeroin_addr, 0, cmd, notify);
-}
-
-/*
- * When a source quench is received, close congestion window
- * to one segment. We will gradually open it again as we proceed.
- */
-void
-tcp_quench(inp, errnum)
- struct inpcb *inp;
- int errnum;
-{
- struct tcpcb *tp = intotcpcb(inp);
-
- if (tp)
- tp->snd_cwnd = tp->t_maxseg;
-}
-
-#if 1
-/*
- * When `need fragmentation' ICMP is received, update our idea of the MSS
- * based on the new value in the route. Also nudge TCP to send something,
- * since we know the packet we just sent was dropped.
- * This duplicates some code in the tcp_mss() function in tcp_input.c.
- */
-void
-tcp_mtudisc(inp, errnum)
- struct inpcb *inp;
- int errnum;
-{
- struct tcpcb *tp = intotcpcb(inp);
- struct rtentry *rt;
- struct rmxp_tao *taop;
- struct socket *so = inp->inp_socket;
- int offered;
- int mss;
-
- if (tp) {
- rt = tcp_rtlookup(inp);
- if (!rt || !rt->rt_rmx.rmx_mtu) {
- tp->t_maxopd = tp->t_maxseg = tcp_mssdflt;
- return;
- }
- taop = rmx_taop(rt->rt_rmx);
- offered = taop->tao_mssopt;
- mss = rt->rt_rmx.rmx_mtu - sizeof(struct tcpiphdr);
- if (offered)
- mss = min(mss, offered);
- /*
- * XXX - The above conditional probably violates the TCP
- * spec. The problem is that, since we don't know the
- * other end's MSS, we are supposed to use a conservative
- * default. But, if we do that, then MTU discovery will
- * never actually take place, because the conservative
- * default is much less than the MTUs typically seen
- * on the Internet today. For the moment, we'll sweep
- * this under the carpet.
- *
- * The conservative default might not actually be a problem
- * if the only case this occurs is when sending an initial
- * SYN with options and data to a host we've never talked
- * to before. Then, they will reply with an MSS value which
- * will get recorded and the new parameters should get
- * recomputed. For Further Study.
- */
- if (tp->t_maxopd <= mss)
- return;
- tp->t_maxopd = mss;
-
- if ((tp->t_flags & (TF_REQ_TSTMP|TF_NOOPT)) == TF_REQ_TSTMP &&
- (tp->t_flags & TF_RCVD_TSTMP) == TF_RCVD_TSTMP)
- mss -= TCPOLEN_TSTAMP_APPA;
- if ((tp->t_flags & (TF_REQ_CC|TF_NOOPT)) == TF_REQ_CC &&
- (tp->t_flags & TF_RCVD_CC) == TF_RCVD_CC)
- mss -= TCPOLEN_CC_APPA;
-#if (MCLBYTES & (MCLBYTES - 1)) == 0
- if (mss > MCLBYTES)
- mss &= ~(MCLBYTES-1);
-#else
- if (mss > MCLBYTES)
- mss = mss / MCLBYTES * MCLBYTES;
-#endif
- if (so->so_snd.sb_hiwat < mss)
- mss = so->so_snd.sb_hiwat;
-
- tp->t_maxseg = mss;
-
- tcpstat.tcps_mturesent++;
- tp->t_rtt = 0;
- tp->snd_nxt = tp->snd_una;
- tcp_output(tp);
- }
-}
-#endif
-
-/*
- * Look-up the routing entry to the peer of this inpcb. If no route
- * is found and it cannot be allocated the return NULL. This routine
- * is called by TCP routines that access the rmx structure and by tcp_mss
- * to get the interface MTU.
- */
-struct rtentry *
-tcp_rtlookup(inp)
- struct inpcb *inp;
-{
- struct route *ro;
- struct rtentry *rt;
-
- ro = &inp->inp_route;
- rt = ro->ro_rt;
- if (rt == NULL || !(rt->rt_flags & RTF_UP)) {
- /* No route yet, so try to acquire one */
- if (inp->inp_faddr.s_addr != INADDR_ANY) {
- ro->ro_dst.sa_family = AF_INET;
- ro->ro_dst.sa_len = sizeof(ro->ro_dst);
- ((struct sockaddr_in *) &ro->ro_dst)->sin_addr =
- inp->inp_faddr;
- rtalloc(ro);
- rt = ro->ro_rt;
- }
- }
- return rt;
-}
-
-/*
- * Return a pointer to the cached information about the remote host.
- * The cached information is stored in the protocol specific part of
- * the route metrics.
- */
-struct rmxp_tao *
-tcp_gettaocache(inp)
- struct inpcb *inp;
-{
- struct rtentry *rt = tcp_rtlookup(inp);
-
- /* Make sure this is a host route and is up. */
- if (rt == NULL ||
- (rt->rt_flags & (RTF_UP|RTF_HOST)) != (RTF_UP|RTF_HOST))
- return NULL;
-
- return rmx_taop(rt->rt_rmx);
-}
-
-/*
- * Clear all the TAO cache entries, called from tcp_init.
- *
- * XXX
- * This routine is just an empty one, because we assume that the routing
- * routing tables are initialized at the same time when TCP, so there is
- * nothing in the cache left over.
- */
-static void
-tcp_cleartaocache(void)
-{ }
diff --git a/c/src/exec/libnetworking/netinet/tcp_timer.c b/c/src/exec/libnetworking/netinet/tcp_timer.c
deleted file mode 100644
index 04d3d604e2..0000000000
--- a/c/src/exec/libnetworking/netinet/tcp_timer.c
+++ /dev/null
@@ -1,387 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1995
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)tcp_timer.c 8.2 (Berkeley) 5/24/95
- * $Id$
- */
-
-#include "opt_tcpdebug.h"
-
-#ifndef TUBA_INCLUDE
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/sysctl.h>
-#include <sys/malloc.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/protosw.h>
-#include <sys/errno.h>
-
-#include <machine/cpu.h> /* before tcp_seq.h, for tcp_random18() */
-
-#include <net/if.h>
-#include <net/route.h>
-
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/in_pcb.h>
-#include <netinet/ip_var.h>
-#include <netinet/tcp.h>
-#include <netinet/tcp_fsm.h>
-#include <netinet/tcp_seq.h>
-#include <netinet/tcp_timer.h>
-#include <netinet/tcp_var.h>
-#include <netinet/tcpip.h>
-#ifdef TCPDEBUG
-#include <netinet/tcp_debug.h>
-#endif
-
-int tcp_keepinit = TCPTV_KEEP_INIT;
-SYSCTL_INT(_net_inet_tcp, TCPCTL_KEEPINIT, keepinit,
- CTLFLAG_RW, &tcp_keepinit , 0, "");
-
-int tcp_keepidle = TCPTV_KEEP_IDLE;
-SYSCTL_INT(_net_inet_tcp, TCPCTL_KEEPIDLE, keepidle,
- CTLFLAG_RW, &tcp_keepidle , 0, "");
-
-static int tcp_keepintvl = TCPTV_KEEPINTVL;
-SYSCTL_INT(_net_inet_tcp, TCPCTL_KEEPINTVL, keepintvl,
- CTLFLAG_RW, &tcp_keepintvl , 0, "");
-
-static int always_keepalive = 0;
-SYSCTL_INT(_net_inet_tcp, OID_AUTO, always_keepalive,
- CTLFLAG_RW, &always_keepalive , 0, "");
-
-static int tcp_keepcnt = TCPTV_KEEPCNT;
- /* max idle probes */
-static int tcp_maxpersistidle = TCPTV_KEEP_IDLE;
- /* max idle time in persist */
-int tcp_maxidle;
-#else /* TUBA_INCLUDE */
-
-static int tcp_maxpersistidle;
-#endif /* TUBA_INCLUDE */
-
-/*
- * Fast timeout routine for processing delayed acks
- */
-void
-tcp_fasttimo()
-{
- register struct inpcb *inp;
- register struct tcpcb *tp;
- int s;
-
- s = splnet();
-
- for (inp = tcb.lh_first; inp != NULL; inp = inp->inp_list.le_next) {
- if ((tp = (struct tcpcb *)inp->inp_ppcb) &&
- (tp->t_flags & TF_DELACK)) {
- tp->t_flags &= ~TF_DELACK;
- tp->t_flags |= TF_ACKNOW;
- tcpstat.tcps_delack++;
- (void) tcp_output(tp);
- }
- }
- splx(s);
-}
-
-/*
- * Tcp protocol timeout routine called every 500 ms.
- * Updates the timers in all active tcb's and
- * causes finite state machine actions if timers expire.
- */
-void
-tcp_slowtimo()
-{
- register struct inpcb *ip, *ipnxt;
- register struct tcpcb *tp;
- register int i;
- int s;
-#ifdef TCPDEBUG
- int ostate;
-#endif
-
- s = splnet();
-
- tcp_maxidle = tcp_keepcnt * tcp_keepintvl;
-
- ip = tcb.lh_first;
- if (ip == NULL) {
- splx(s);
- return;
- }
- /*
- * Search through tcb's and update active timers.
- */
- for (; ip != NULL; ip = ipnxt) {
- ipnxt = ip->inp_list.le_next;
- tp = intotcpcb(ip);
- if (tp == 0 || tp->t_state == TCPS_LISTEN)
- continue;
- for (i = 0; i < TCPT_NTIMERS; i++) {
- if (tp->t_timer[i] && --tp->t_timer[i] == 0) {
-#ifdef TCPDEBUG
- ostate = tp->t_state;
-#endif
- tp = tcp_timers(tp, i);
- if (tp == NULL)
- goto tpgone;
-#ifdef TCPDEBUG
- if (tp->t_inpcb->inp_socket->so_options
- & SO_DEBUG)
- tcp_trace(TA_USER, ostate, tp,
- (struct tcpiphdr *)0,
- PRU_SLOWTIMO);
-#endif
- }
- }
- tp->t_idle++;
- tp->t_duration++;
- if (tp->t_rtt)
- tp->t_rtt++;
-tpgone:
- ;
- }
- tcp_iss += TCP_ISSINCR/PR_SLOWHZ; /* increment iss */
-#ifdef TCP_COMPAT_42
- if ((int)tcp_iss < 0)
- tcp_iss = TCP_ISSINCR; /* XXX */
-#endif
- tcp_now++; /* for timestamps */
- splx(s);
-}
-#ifndef TUBA_INCLUDE
-
-/*
- * Cancel all timers for TCP tp.
- */
-void
-tcp_canceltimers(tp)
- struct tcpcb *tp;
-{
- register int i;
-
- for (i = 0; i < TCPT_NTIMERS; i++)
- tp->t_timer[i] = 0;
-}
-
-int tcp_backoff[TCP_MAXRXTSHIFT + 1] =
- { 1, 2, 4, 8, 16, 32, 64, 64, 64, 64, 64, 64, 64 };
-
-static int tcp_totbackoff = 511; /* sum of tcp_backoff[] */
-
-/*
- * TCP timer processing.
- */
-struct tcpcb *
-tcp_timers(tp, timer)
- register struct tcpcb *tp;
- int timer;
-{
- register int rexmt;
-
- switch (timer) {
-
- /*
- * 2 MSL timeout in shutdown went off. If we're closed but
- * still waiting for peer to close and connection has been idle
- * too long, or if 2MSL time is up from TIME_WAIT, delete connection
- * control block. Otherwise, check again in a bit.
- */
- case TCPT_2MSL:
- if (tp->t_state != TCPS_TIME_WAIT &&
- tp->t_idle <= tcp_maxidle)
- tp->t_timer[TCPT_2MSL] = tcp_keepintvl;
- else
- tp = tcp_close(tp);
- break;
-
- /*
- * Retransmission timer went off. Message has not
- * been acked within retransmit interval. Back off
- * to a longer retransmit interval and retransmit one segment.
- */
- case TCPT_REXMT:
- if (++tp->t_rxtshift > TCP_MAXRXTSHIFT) {
- tp->t_rxtshift = TCP_MAXRXTSHIFT;
- tcpstat.tcps_timeoutdrop++;
- tp = tcp_drop(tp, tp->t_softerror ?
- tp->t_softerror : ETIMEDOUT);
- break;
- }
- tcpstat.tcps_rexmttimeo++;
- rexmt = TCP_REXMTVAL(tp) * tcp_backoff[tp->t_rxtshift];
- TCPT_RANGESET(tp->t_rxtcur, rexmt,
- tp->t_rttmin, TCPTV_REXMTMAX);
- tp->t_timer[TCPT_REXMT] = tp->t_rxtcur;
- /*
- * If losing, let the lower level know and try for
- * a better route. Also, if we backed off this far,
- * our srtt estimate is probably bogus. Clobber it
- * so we'll take the next rtt measurement as our srtt;
- * move the current srtt into rttvar to keep the current
- * retransmit times until then.
- */
- if (tp->t_rxtshift > TCP_MAXRXTSHIFT / 4) {
- in_losing(tp->t_inpcb);
- tp->t_rttvar += (tp->t_srtt >> TCP_RTT_SHIFT);
- tp->t_srtt = 0;
- }
- tp->snd_nxt = tp->snd_una;
- /*
- * Force a segment to be sent.
- */
- tp->t_flags |= TF_ACKNOW;
- /*
- * If timing a segment in this window, stop the timer.
- */
- tp->t_rtt = 0;
- /*
- * Close the congestion window down to one segment
- * (we'll open it by one segment for each ack we get).
- * Since we probably have a window's worth of unacked
- * data accumulated, this "slow start" keeps us from
- * dumping all that data as back-to-back packets (which
- * might overwhelm an intermediate gateway).
- *
- * There are two phases to the opening: Initially we
- * open by one mss on each ack. This makes the window
- * size increase exponentially with time. If the
- * window is larger than the path can handle, this
- * exponential growth results in dropped packet(s)
- * almost immediately. To get more time between
- * drops but still "push" the network to take advantage
- * of improving conditions, we switch from exponential
- * to linear window opening at some threshhold size.
- * For a threshhold, we use half the current window
- * size, truncated to a multiple of the mss.
- *
- * (the minimum cwnd that will give us exponential
- * growth is 2 mss. We don't allow the threshhold
- * to go below this.)
- */
- {
- u_int win = min(tp->snd_wnd, tp->snd_cwnd) / 2 / tp->t_maxseg;
- if (win < 2)
- win = 2;
- tp->snd_cwnd = tp->t_maxseg;
- tp->snd_ssthresh = win * tp->t_maxseg;
- tp->t_dupacks = 0;
- }
- (void) tcp_output(tp);
- break;
-
- /*
- * Persistance timer into zero window.
- * Force a byte to be output, if possible.
- */
- case TCPT_PERSIST:
- tcpstat.tcps_persisttimeo++;
- /*
- * Hack: if the peer is dead/unreachable, we do not
- * time out if the window is closed. After a full
- * backoff, drop the connection if the idle time
- * (no responses to probes) reaches the maximum
- * backoff that we would use if retransmitting.
- */
- if (tp->t_rxtshift == TCP_MAXRXTSHIFT) {
- u_long maxidle = TCP_REXMTVAL(tp);
- if (maxidle < tp->t_rttmin)
- maxidle = tp->t_rttmin;
- maxidle *= tcp_totbackoff;
- if (tp->t_idle >= tcp_maxpersistidle ||
- tp->t_idle >= maxidle) {
- tcpstat.tcps_persistdrop++;
- tp = tcp_drop(tp, ETIMEDOUT);
- break;
- }
- }
- tcp_setpersist(tp);
- tp->t_force = 1;
- (void) tcp_output(tp);
- tp->t_force = 0;
- break;
-
- /*
- * Keep-alive timer went off; send something
- * or drop connection if idle for too long.
- */
- case TCPT_KEEP:
- tcpstat.tcps_keeptimeo++;
- if (tp->t_state < TCPS_ESTABLISHED)
- goto dropit;
- if ((always_keepalive ||
- tp->t_inpcb->inp_socket->so_options & SO_KEEPALIVE) &&
- tp->t_state <= TCPS_CLOSING) {
- if (tp->t_idle >= tcp_keepidle + tcp_maxidle)
- goto dropit;
- /*
- * Send a packet designed to force a response
- * if the peer is up and reachable:
- * either an ACK if the connection is still alive,
- * or an RST if the peer has closed the connection
- * due to timeout or reboot.
- * Using sequence number tp->snd_una-1
- * causes the transmitted zero-length segment
- * to lie outside the receive window;
- * by the protocol spec, this requires the
- * correspondent TCP to respond.
- */
- tcpstat.tcps_keepprobe++;
-#ifdef TCP_COMPAT_42
- /*
- * The keepalive packet must have nonzero length
- * to get a 4.2 host to respond.
- */
- tcp_respond(tp, tp->t_template, (struct mbuf *)NULL,
- tp->rcv_nxt - 1, tp->snd_una - 1, 0);
-#else
- tcp_respond(tp, tp->t_template, (struct mbuf *)NULL,
- tp->rcv_nxt, tp->snd_una - 1, 0);
-#endif
- tp->t_timer[TCPT_KEEP] = tcp_keepintvl;
- } else
- tp->t_timer[TCPT_KEEP] = tcp_keepidle;
- break;
- dropit:
- tcpstat.tcps_keepdrops++;
- tp = tcp_drop(tp, ETIMEDOUT);
- break;
- }
- return (tp);
-}
-#endif /* TUBA_INCLUDE */
diff --git a/c/src/exec/libnetworking/netinet/tcp_timer.h b/c/src/exec/libnetworking/netinet/tcp_timer.h
deleted file mode 100644
index 38ffac4ee7..0000000000
--- a/c/src/exec/libnetworking/netinet/tcp_timer.h
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)tcp_timer.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _NETINET_TCP_TIMER_H_
-#define _NETINET_TCP_TIMER_H_
-
-/*
- * Definitions of the TCP timers. These timers are counted
- * down PR_SLOWHZ times a second.
- */
-#define TCPT_NTIMERS 4
-
-#define TCPT_REXMT 0 /* retransmit */
-#define TCPT_PERSIST 1 /* retransmit persistence */
-#define TCPT_KEEP 2 /* keep alive */
-#define TCPT_2MSL 3 /* 2*msl quiet time timer */
-
-/*
- * The TCPT_REXMT timer is used to force retransmissions.
- * The TCP has the TCPT_REXMT timer set whenever segments
- * have been sent for which ACKs are expected but not yet
- * received. If an ACK is received which advances tp->snd_una,
- * then the retransmit timer is cleared (if there are no more
- * outstanding segments) or reset to the base value (if there
- * are more ACKs expected). Whenever the retransmit timer goes off,
- * we retransmit one unacknowledged segment, and do a backoff
- * on the retransmit timer.
- *
- * The TCPT_PERSIST timer is used to keep window size information
- * flowing even if the window goes shut. If all previous transmissions
- * have been acknowledged (so that there are no retransmissions in progress),
- * and the window is too small to bother sending anything, then we start
- * the TCPT_PERSIST timer. When it expires, if the window is nonzero,
- * we go to transmit state. Otherwise, at intervals send a single byte
- * into the peer's window to force him to update our window information.
- * We do this at most as often as TCPT_PERSMIN time intervals,
- * but no more frequently than the current estimate of round-trip
- * packet time. The TCPT_PERSIST timer is cleared whenever we receive
- * a window update from the peer.
- *
- * The TCPT_KEEP timer is used to keep connections alive. If an
- * connection is idle (no segments received) for TCPTV_KEEP_INIT amount of time,
- * but not yet established, then we drop the connection. Once the connection
- * is established, if the connection is idle for TCPTV_KEEP_IDLE time
- * (and keepalives have been enabled on the socket), we begin to probe
- * the connection. We force the peer to send us a segment by sending:
- * <SEQ=SND.UNA-1><ACK=RCV.NXT><CTL=ACK>
- * This segment is (deliberately) outside the window, and should elicit
- * an ack segment in response from the peer. If, despite the TCPT_KEEP
- * initiated segments we cannot elicit a response from a peer in TCPT_MAXIDLE
- * amount of time probing, then we drop the connection.
- */
-
-/*
- * Time constants.
- */
-#define TCPTV_MSL ( 30*PR_SLOWHZ) /* max seg lifetime (hah!) */
-#define TCPTV_SRTTBASE 0 /* base roundtrip time;
- if 0, no idea yet */
-#define TCPTV_RTOBASE ( 3*PR_SLOWHZ) /* assumed RTO if no info */
-#define TCPTV_SRTTDFLT ( 3*PR_SLOWHZ) /* assumed RTT if no info */
-
-#define TCPTV_PERSMIN ( 5*PR_SLOWHZ) /* retransmit persistence */
-#define TCPTV_PERSMAX ( 60*PR_SLOWHZ) /* maximum persist interval */
-
-#define TCPTV_KEEP_INIT ( 75*PR_SLOWHZ) /* initial connect keep alive */
-#define TCPTV_KEEP_IDLE (120*60*PR_SLOWHZ) /* dflt time before probing */
-#define TCPTV_KEEPINTVL ( 75*PR_SLOWHZ) /* default probe interval */
-#define TCPTV_KEEPCNT 8 /* max probes before drop */
-
-#define TCPTV_MIN ( 1*PR_SLOWHZ) /* minimum allowable value */
-#define TCPTV_REXMTMAX ( 64*PR_SLOWHZ) /* max allowable REXMT value */
-
-#define TCPTV_TWTRUNC 8 /* RTO factor to truncate TW */
-
-#define TCP_LINGERTIME 120 /* linger at most 2 minutes */
-
-#define TCP_MAXRXTSHIFT 12 /* maximum retransmits */
-
-#ifdef TCPTIMERS
-static char *tcptimers[] =
- { "REXMT", "PERSIST", "KEEP", "2MSL" };
-#endif
-
-/*
- * Force a time value to be in a certain range.
- */
-#define TCPT_RANGESET(tv, value, tvmin, tvmax) { \
- (tv) = (value); \
- if ((u_long)(tv) < (u_long)(tvmin)) \
- (tv) = (tvmin); \
- else if ((u_long)(tv) > (u_long)(tvmax)) \
- (tv) = (tvmax); \
-}
-
-#ifdef KERNEL
-extern int tcp_keepinit; /* time to establish connection */
-extern int tcp_keepidle; /* time before keepalive probes begin */
-extern int tcp_keepintvl; /* time between keepalive probes */
-extern int tcp_maxidle; /* time to drop after starting probes */
-extern int tcp_ttl; /* time to live for TCP segs */
-extern int tcp_backoff[];
-#endif
-
-#endif
diff --git a/c/src/exec/libnetworking/netinet/tcp_usrreq.c b/c/src/exec/libnetworking/netinet/tcp_usrreq.c
deleted file mode 100644
index ecd9d95636..0000000000
--- a/c/src/exec/libnetworking/netinet/tcp_usrreq.c
+++ /dev/null
@@ -1,840 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * From: @(#)tcp_usrreq.c 8.2 (Berkeley) 1/3/94
- * $Id$
- */
-
-#include "opt_tcpdebug.h"
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/sysctl.h>
-#include <sys/malloc.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/protosw.h>
-#include <sys/errno.h>
-#include <sys/stat.h>
-
-#include <net/if.h>
-#include <net/route.h>
-
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/in_pcb.h>
-#include <netinet/in_var.h>
-#include <netinet/ip_var.h>
-#include <netinet/tcp.h>
-#include <netinet/tcp_fsm.h>
-#include <netinet/tcp_seq.h>
-#include <netinet/tcp_timer.h>
-#include <netinet/tcp_var.h>
-#include <netinet/tcpip.h>
-#ifdef TCPDEBUG
-#include <netinet/tcp_debug.h>
-#endif
-
-/*
- * TCP protocol interface to socket abstraction.
- */
-extern char *tcpstates[];
-
-static int tcp_attach __P((struct socket *));
-static int tcp_connect __P((struct tcpcb *, struct mbuf *));
-static struct tcpcb *
- tcp_disconnect __P((struct tcpcb *));
-static struct tcpcb *
- tcp_usrclosed __P((struct tcpcb *));
-
-#ifdef TCPDEBUG
-#define TCPDEBUG0 int ostate
-#define TCPDEBUG1() ostate = tp ? tp->t_state : 0
-#define TCPDEBUG2(req) if (tp && (so->so_options & SO_DEBUG)) \
- tcp_trace(TA_USER, ostate, tp, 0, req)
-#else
-#define TCPDEBUG0
-#define TCPDEBUG1()
-#define TCPDEBUG2(req)
-#endif
-
-/*
- * TCP attaches to socket via pru_attach(), reserving space,
- * and an internet control block.
- */
-static int
-tcp_usr_attach(struct socket *so, int proto)
-{
- int s = splnet();
- int error;
- struct inpcb *inp = sotoinpcb(so);
- struct tcpcb *tp = 0;
- TCPDEBUG0;
-
- TCPDEBUG1();
- if (inp) {
- error = EISCONN;
- goto out;
- }
-
- error = tcp_attach(so);
- if (error)
- goto out;
-
- if ((so->so_options & SO_LINGER) && so->so_linger == 0)
- so->so_linger = TCP_LINGERTIME * hz;
- tp = sototcpcb(so);
-out:
- TCPDEBUG2(PRU_ATTACH);
- splx(s);
- return error;
-}
-
-/*
- * pru_detach() detaches the TCP protocol from the socket.
- * If the protocol state is non-embryonic, then can't
- * do this directly: have to initiate a pru_disconnect(),
- * which may finish later; embryonic TCB's can just
- * be discarded here.
- */
-static int
-tcp_usr_detach(struct socket *so)
-{
- int s = splnet();
- int error = 0;
- struct inpcb *inp = sotoinpcb(so);
- struct tcpcb *tp;
- TCPDEBUG0;
-
- if (inp == 0) {
- splx(s);
- return EINVAL; /* XXX */
- }
- tp = intotcpcb(inp);
- TCPDEBUG1();
- if (tp->t_state > TCPS_LISTEN)
- tp = tcp_disconnect(tp);
- else
- tp = tcp_close(tp);
-
- TCPDEBUG2(PRU_DETACH);
- splx(s);
- return error;
-}
-
-#define COMMON_START() TCPDEBUG0; \
- do { \
- if (inp == 0) { \
- splx(s); \
- return EINVAL; \
- } \
- tp = intotcpcb(inp); \
- TCPDEBUG1(); \
- } while(0)
-
-#define COMMON_END(req) out: TCPDEBUG2(req); splx(s); return error; goto out
-
-
-/*
- * Give the socket an address.
- */
-static int
-tcp_usr_bind(struct socket *so, struct mbuf *nam)
-{
- int s = splnet();
- int error = 0;
- struct inpcb *inp = sotoinpcb(so);
- struct tcpcb *tp;
- struct sockaddr_in *sinp;
-
- COMMON_START();
-
- /*
- * Must check for multicast addresses and disallow binding
- * to them.
- */
- sinp = mtod(nam, struct sockaddr_in *);
- if (sinp->sin_family == AF_INET &&
- IN_MULTICAST(ntohl(sinp->sin_addr.s_addr))) {
- error = EAFNOSUPPORT;
- goto out;
- }
- error = in_pcbbind(inp, nam);
- if (error)
- goto out;
- COMMON_END(PRU_BIND);
-
-}
-
-/*
- * Prepare to accept connections.
- */
-static int
-tcp_usr_listen(struct socket *so)
-{
- int s = splnet();
- int error = 0;
- struct inpcb *inp = sotoinpcb(so);
- struct tcpcb *tp;
-
- COMMON_START();
- if (inp->inp_lport == 0)
- error = in_pcbbind(inp, NULL);
- if (error == 0)
- tp->t_state = TCPS_LISTEN;
- COMMON_END(PRU_LISTEN);
-}
-
-/*
- * Initiate connection to peer.
- * Create a template for use in transmissions on this connection.
- * Enter SYN_SENT state, and mark socket as connecting.
- * Start keep-alive timer, and seed output sequence space.
- * Send initial segment on connection.
- */
-static int
-tcp_usr_connect(struct socket *so, struct mbuf *nam)
-{
- int s = splnet();
- int error = 0;
- struct inpcb *inp = sotoinpcb(so);
- struct tcpcb *tp;
- struct sockaddr_in *sinp;
-
- COMMON_START();
-
- /*
- * Must disallow TCP ``connections'' to multicast addresses.
- */
- sinp = mtod(nam, struct sockaddr_in *);
- if (sinp->sin_family == AF_INET
- && IN_MULTICAST(ntohl(sinp->sin_addr.s_addr))) {
- error = EAFNOSUPPORT;
- goto out;
- }
-
- if ((error = tcp_connect(tp, nam)) != 0)
- goto out;
- error = tcp_output(tp);
- COMMON_END(PRU_CONNECT);
-}
-
-/*
- * Initiate disconnect from peer.
- * If connection never passed embryonic stage, just drop;
- * else if don't need to let data drain, then can just drop anyways,
- * else have to begin TCP shutdown process: mark socket disconnecting,
- * drain unread data, state switch to reflect user close, and
- * send segment (e.g. FIN) to peer. Socket will be really disconnected
- * when peer sends FIN and acks ours.
- *
- * SHOULD IMPLEMENT LATER PRU_CONNECT VIA REALLOC TCPCB.
- */
-static int
-tcp_usr_disconnect(struct socket *so)
-{
- int s = splnet();
- int error = 0;
- struct inpcb *inp = sotoinpcb(so);
- struct tcpcb *tp;
-
- COMMON_START();
- tp = tcp_disconnect(tp);
- COMMON_END(PRU_DISCONNECT);
-}
-
-/*
- * Accept a connection. Essentially all the work is
- * done at higher levels; just return the address
- * of the peer, storing through addr.
- */
-static int
-tcp_usr_accept(struct socket *so, struct mbuf *nam)
-{
- int s = splnet();
- int error = 0;
- struct inpcb *inp = sotoinpcb(so);
- struct tcpcb *tp;
-
- COMMON_START();
- in_setpeeraddr(inp, nam);
- COMMON_END(PRU_ACCEPT);
-}
-
-/*
- * Mark the connection as being incapable of further output.
- */
-static int
-tcp_usr_shutdown(struct socket *so)
-{
- int s = splnet();
- int error = 0;
- struct inpcb *inp = sotoinpcb(so);
- struct tcpcb *tp;
-
- COMMON_START();
- socantsendmore(so);
- tp = tcp_usrclosed(tp);
- if (tp)
- error = tcp_output(tp);
- COMMON_END(PRU_SHUTDOWN);
-}
-
-/*
- * After a receive, possibly send window update to peer.
- */
-static int
-tcp_usr_rcvd(struct socket *so, int flags)
-{
- int s = splnet();
- int error = 0;
- struct inpcb *inp = sotoinpcb(so);
- struct tcpcb *tp;
-
- COMMON_START();
- tcp_output(tp);
- COMMON_END(PRU_RCVD);
-}
-
-/*
- * Do a send by putting data in output queue and updating urgent
- * marker if URG set. Possibly send more data.
- */
-static int
-tcp_usr_send(struct socket *so, int flags, struct mbuf *m, struct mbuf *nam,
- struct mbuf *control)
-{
- int s = splnet();
- int error = 0;
- struct inpcb *inp = sotoinpcb(so);
- struct tcpcb *tp;
-
- COMMON_START();
- if (control && control->m_len) {
- m_freem(control); /* XXX shouldn't caller do this??? */
- if (m)
- m_freem(m);
- error = EINVAL;
- goto out;
- }
-
- if(!(flags & PRUS_OOB)) {
- sbappend(&so->so_snd, m);
- if (nam && tp->t_state < TCPS_SYN_SENT) {
- /*
- * Do implied connect if not yet connected,
- * initialize window to default value, and
- * initialize maxseg/maxopd using peer's cached
- * MSS.
- */
- error = tcp_connect(tp, nam);
- if (error)
- goto out;
- tp->snd_wnd = TTCP_CLIENT_SND_WND;
- tcp_mss(tp, -1);
- }
-
- if (flags & PRUS_EOF) {
- /*
- * Close the send side of the connection after
- * the data is sent.
- */
- socantsendmore(so);
- tp = tcp_usrclosed(tp);
- }
- if (tp != NULL)
- error = tcp_output(tp);
- } else {
- if (sbspace(&so->so_snd) < -512) {
- m_freem(m);
- error = ENOBUFS;
- goto out;
- }
- /*
- * According to RFC961 (Assigned Protocols),
- * the urgent pointer points to the last octet
- * of urgent data. We continue, however,
- * to consider it to indicate the first octet
- * of data past the urgent section.
- * Otherwise, snd_up should be one lower.
- */
- sbappend(&so->so_snd, m);
- if (nam && tp->t_state < TCPS_SYN_SENT) {
- /*
- * Do implied connect if not yet connected,
- * initialize window to default value, and
- * initialize maxseg/maxopd using peer's cached
- * MSS.
- */
- error = tcp_connect(tp, nam);
- if (error)
- goto out;
- tp->snd_wnd = TTCP_CLIENT_SND_WND;
- tcp_mss(tp, -1);
- }
- tp->snd_up = tp->snd_una + so->so_snd.sb_cc;
- tp->t_force = 1;
- error = tcp_output(tp);
- tp->t_force = 0;
- }
- COMMON_END((flags & PRUS_OOB) ? PRU_SENDOOB :
- ((flags & PRUS_EOF) ? PRU_SEND_EOF : PRU_SEND));
-}
-
-/*
- * Abort the TCP.
- */
-static int
-tcp_usr_abort(struct socket *so)
-{
- int s = splnet();
- int error = 0;
- struct inpcb *inp = sotoinpcb(so);
- struct tcpcb *tp;
-
- COMMON_START();
- tp = tcp_drop(tp, ECONNABORTED);
- COMMON_END(PRU_ABORT);
-}
-
-/*
- * Fill in st_bklsize for fstat() operations on a socket.
- */
-static int
-tcp_usr_sense(struct socket *so, struct stat *sb)
-{
- int s = splnet();
-
- sb->st_blksize = so->so_snd.sb_hiwat;
- splx(s);
- return 0;
-}
-
-/*
- * Receive out-of-band data.
- */
-static int
-tcp_usr_rcvoob(struct socket *so, struct mbuf *m, int flags)
-{
- int s = splnet();
- int error = 0;
- struct inpcb *inp = sotoinpcb(so);
- struct tcpcb *tp;
-
- COMMON_START();
- if ((so->so_oobmark == 0 &&
- (so->so_state & SS_RCVATMARK) == 0) ||
- so->so_options & SO_OOBINLINE ||
- tp->t_oobflags & TCPOOB_HADDATA) {
- error = EINVAL;
- goto out;
- }
- if ((tp->t_oobflags & TCPOOB_HAVEDATA) == 0) {
- error = EWOULDBLOCK;
- goto out;
- }
- m->m_len = 1;
- *mtod(m, caddr_t) = tp->t_iobc;
- if ((flags & MSG_PEEK) == 0)
- tp->t_oobflags ^= (TCPOOB_HAVEDATA | TCPOOB_HADDATA);
- COMMON_END(PRU_RCVOOB);
-}
-
-static int
-tcp_usr_sockaddr(struct socket *so, struct mbuf *nam)
-{
- int s = splnet();
- int error = 0;
- struct inpcb *inp = sotoinpcb(so);
- struct tcpcb *tp;
-
- COMMON_START();
- in_setsockaddr(inp, nam);
- COMMON_END(PRU_SOCKADDR);
-}
-
-static int
-tcp_usr_peeraddr(struct socket *so, struct mbuf *nam)
-{
- int s = splnet();
- int error = 0;
- struct inpcb *inp = sotoinpcb(so);
- struct tcpcb *tp;
-
- COMMON_START();
- in_setpeeraddr(inp, nam);
- COMMON_END(PRU_PEERADDR);
-}
-
-/*
- * XXX - this should just be a call to in_control, but we need to get
- * the types worked out.
- */
-static int
-tcp_usr_control(struct socket *so, int cmd, caddr_t arg, struct ifnet *ifp)
-{
- return in_control(so, cmd, arg, ifp);
-}
-
-/* xxx - should be const */
-struct pr_usrreqs tcp_usrreqs = {
- tcp_usr_abort, tcp_usr_accept, tcp_usr_attach, tcp_usr_bind,
- tcp_usr_connect, pru_connect2_notsupp, tcp_usr_control, tcp_usr_detach,
- tcp_usr_disconnect, tcp_usr_listen, tcp_usr_peeraddr, tcp_usr_rcvd,
- tcp_usr_rcvoob, tcp_usr_send, tcp_usr_sense, tcp_usr_shutdown,
- tcp_usr_sockaddr
-};
-
-/*
- * Common subroutine to open a TCP connection to remote host specified
- * by struct sockaddr_in in mbuf *nam. Call in_pcbbind to assign a local
- * port number if needed. Call in_pcbladdr to do the routing and to choose
- * a local host address (interface). If there is an existing incarnation
- * of the same connection in TIME-WAIT state and if the remote host was
- * sending CC options and if the connection duration was < MSL, then
- * truncate the previous TIME-WAIT state and proceed.
- * Initialize connection parameters and enter SYN-SENT state.
- */
-static int
-tcp_connect(tp, nam)
- register struct tcpcb *tp;
- struct mbuf *nam;
-{
- struct inpcb *inp = tp->t_inpcb, *oinp;
- struct socket *so = inp->inp_socket;
- struct tcpcb *otp;
- struct sockaddr_in *sin = mtod(nam, struct sockaddr_in *);
- struct sockaddr_in *ifaddr;
- int error;
- struct rmxp_tao *taop;
- struct rmxp_tao tao_noncached;
-
- if (inp->inp_lport == 0) {
- error = in_pcbbind(inp, NULL);
- if (error)
- return error;
- }
-
- /*
- * Cannot simply call in_pcbconnect, because there might be an
- * earlier incarnation of this same connection still in
- * TIME_WAIT state, creating an ADDRINUSE error.
- */
- error = in_pcbladdr(inp, nam, &ifaddr);
- if (error)
- return error;
- oinp = in_pcblookuphash(inp->inp_pcbinfo,
- sin->sin_addr, sin->sin_port,
- inp->inp_laddr.s_addr != INADDR_ANY ? inp->inp_laddr
- : ifaddr->sin_addr,
- inp->inp_lport, 0);
- if (oinp) {
- if (oinp != inp && (otp = intotcpcb(oinp)) != NULL &&
- otp->t_state == TCPS_TIME_WAIT &&
- otp->t_duration < TCPTV_MSL &&
- (otp->t_flags & TF_RCVD_CC))
- otp = tcp_close(otp);
- else
- return EADDRINUSE;
- }
- if (inp->inp_laddr.s_addr == INADDR_ANY)
- inp->inp_laddr = ifaddr->sin_addr;
- inp->inp_faddr = sin->sin_addr;
- inp->inp_fport = sin->sin_port;
- in_pcbrehash(inp);
-
- tp->t_template = tcp_template(tp);
- if (tp->t_template == 0) {
- in_pcbdisconnect(inp);
- return ENOBUFS;
- }
-
- /* Compute window scaling to request. */
- while (tp->request_r_scale < TCP_MAX_WINSHIFT &&
- (TCP_MAXWIN << tp->request_r_scale) < so->so_rcv.sb_hiwat)
- tp->request_r_scale++;
-
- soisconnecting(so);
- tcpstat.tcps_connattempt++;
- tp->t_state = TCPS_SYN_SENT;
- tp->t_timer[TCPT_KEEP] = tcp_keepinit;
- tp->iss = tcp_iss; tcp_iss += TCP_ISSINCR/2;
- tcp_sendseqinit(tp);
-
- /*
- * Generate a CC value for this connection and
- * check whether CC or CCnew should be used.
- */
- if ((taop = tcp_gettaocache(tp->t_inpcb)) == NULL) {
- taop = &tao_noncached;
- bzero(taop, sizeof(*taop));
- }
-
- tp->cc_send = CC_INC(tcp_ccgen);
- if (taop->tao_ccsent != 0 &&
- CC_GEQ(tp->cc_send, taop->tao_ccsent)) {
- taop->tao_ccsent = tp->cc_send;
- } else {
- taop->tao_ccsent = 0;
- tp->t_flags |= TF_SENDCCNEW;
- }
-
- return 0;
-}
-
-int
-tcp_ctloutput(op, so, level, optname, mp)
- int op;
- struct socket *so;
- int level, optname;
- struct mbuf **mp;
-{
- int error = 0, s;
- struct inpcb *inp;
- register struct tcpcb *tp;
- register struct mbuf *m;
- register int i;
-
- s = splnet();
- inp = sotoinpcb(so);
- if (inp == NULL) {
- splx(s);
- if (op == PRCO_SETOPT && *mp)
- (void) m_free(*mp);
- return (ECONNRESET);
- }
- if (level != IPPROTO_TCP) {
- error = ip_ctloutput(op, so, level, optname, mp);
- splx(s);
- return (error);
- }
- tp = intotcpcb(inp);
-
- switch (op) {
-
- case PRCO_SETOPT:
- m = *mp;
- switch (optname) {
-
- case TCP_NODELAY:
- if (m == NULL || m->m_len < sizeof (int))
- error = EINVAL;
- else if (*mtod(m, int *))
- tp->t_flags |= TF_NODELAY;
- else
- tp->t_flags &= ~TF_NODELAY;
- break;
-
- case TCP_MAXSEG:
- if (m && (i = *mtod(m, int *)) > 0 && i <= tp->t_maxseg)
- tp->t_maxseg = i;
- else
- error = EINVAL;
- break;
-
- case TCP_NOOPT:
- if (m == NULL || m->m_len < sizeof (int))
- error = EINVAL;
- else if (*mtod(m, int *))
- tp->t_flags |= TF_NOOPT;
- else
- tp->t_flags &= ~TF_NOOPT;
- break;
-
- case TCP_NOPUSH:
- if (m == NULL || m->m_len < sizeof (int))
- error = EINVAL;
- else if (*mtod(m, int *))
- tp->t_flags |= TF_NOPUSH;
- else
- tp->t_flags &= ~TF_NOPUSH;
- break;
-
- default:
- error = ENOPROTOOPT;
- break;
- }
- if (m)
- (void) m_free(m);
- break;
-
- case PRCO_GETOPT:
- *mp = m = m_get(M_WAIT, MT_SOOPTS);
- m->m_len = sizeof(int);
-
- switch (optname) {
- case TCP_NODELAY:
- *mtod(m, int *) = tp->t_flags & TF_NODELAY;
- break;
- case TCP_MAXSEG:
- *mtod(m, int *) = tp->t_maxseg;
- break;
- case TCP_NOOPT:
- *mtod(m, int *) = tp->t_flags & TF_NOOPT;
- break;
- case TCP_NOPUSH:
- *mtod(m, int *) = tp->t_flags & TF_NOPUSH;
- break;
- default:
- error = ENOPROTOOPT;
- break;
- }
- break;
- }
- splx(s);
- return (error);
-}
-
-/*
- * tcp_sendspace and tcp_recvspace are the default send and receive window
- * sizes, respectively. These are obsolescent (this information should
- * be set by the route).
- */
-u_long tcp_sendspace = 1024*16;
-SYSCTL_INT(_net_inet_tcp, TCPCTL_SENDSPACE, sendspace,
- CTLFLAG_RW, &tcp_sendspace , 0, "");
-u_long tcp_recvspace = 1024*16;
-SYSCTL_INT(_net_inet_tcp, TCPCTL_RECVSPACE, recvspace,
- CTLFLAG_RW, &tcp_recvspace , 0, "");
-
-/*
- * Attach TCP protocol to socket, allocating
- * internet protocol control block, tcp control block,
- * bufer space, and entering LISTEN state if to accept connections.
- */
-static int
-tcp_attach(so)
- struct socket *so;
-{
- register struct tcpcb *tp;
- struct inpcb *inp;
- int error;
-
- if (so->so_snd.sb_hiwat == 0 || so->so_rcv.sb_hiwat == 0) {
- error = soreserve(so, tcp_sendspace, tcp_recvspace);
- if (error)
- return (error);
- }
- error = in_pcballoc(so, &tcbinfo);
- if (error)
- return (error);
- inp = sotoinpcb(so);
- tp = tcp_newtcpcb(inp);
- if (tp == 0) {
- int nofd = so->so_state & SS_NOFDREF; /* XXX */
-
- so->so_state &= ~SS_NOFDREF; /* don't free the socket yet */
- in_pcbdetach(inp);
- so->so_state |= nofd;
- return (ENOBUFS);
- }
- tp->t_state = TCPS_CLOSED;
- return (0);
-}
-
-/*
- * Initiate (or continue) disconnect.
- * If embryonic state, just send reset (once).
- * If in ``let data drain'' option and linger null, just drop.
- * Otherwise (hard), mark socket disconnecting and drop
- * current input data; switch states based on user close, and
- * send segment to peer (with FIN).
- */
-static struct tcpcb *
-tcp_disconnect(tp)
- register struct tcpcb *tp;
-{
- struct socket *so = tp->t_inpcb->inp_socket;
-
- if (tp->t_state < TCPS_ESTABLISHED)
- tp = tcp_close(tp);
- else if ((so->so_options & SO_LINGER) && so->so_linger == 0)
- tp = tcp_drop(tp, 0);
- else {
- soisdisconnecting(so);
- sbflush(&so->so_rcv);
- tp = tcp_usrclosed(tp);
- if (tp)
- (void) tcp_output(tp);
- }
- return (tp);
-}
-
-/*
- * User issued close, and wish to trail through shutdown states:
- * if never received SYN, just forget it. If got a SYN from peer,
- * but haven't sent FIN, then go to FIN_WAIT_1 state to send peer a FIN.
- * If already got a FIN from peer, then almost done; go to LAST_ACK
- * state. In all other cases, have already sent FIN to peer (e.g.
- * after PRU_SHUTDOWN), and just have to play tedious game waiting
- * for peer to send FIN or not respond to keep-alives, etc.
- * We can let the user exit from the close as soon as the FIN is acked.
- */
-static struct tcpcb *
-tcp_usrclosed(tp)
- register struct tcpcb *tp;
-{
-
- switch (tp->t_state) {
-
- case TCPS_CLOSED:
- case TCPS_LISTEN:
- tp->t_state = TCPS_CLOSED;
- tp = tcp_close(tp);
- break;
-
- case TCPS_SYN_SENT:
- case TCPS_SYN_RECEIVED:
- tp->t_flags |= TF_NEEDFIN;
- break;
-
- case TCPS_ESTABLISHED:
- tp->t_state = TCPS_FIN_WAIT_1;
- break;
-
- case TCPS_CLOSE_WAIT:
- tp->t_state = TCPS_LAST_ACK;
- break;
- }
- if (tp && tp->t_state >= TCPS_FIN_WAIT_2) {
- soisdisconnected(tp->t_inpcb->inp_socket);
- /* To prevent the connection hanging in FIN_WAIT_2 forever. */
- if (tp->t_state == TCPS_FIN_WAIT_2)
- tp->t_timer[TCPT_2MSL] = tcp_maxidle;
- }
- return (tp);
-}
-
diff --git a/c/src/exec/libnetworking/netinet/tcp_var.h b/c/src/exec/libnetworking/netinet/tcp_var.h
deleted file mode 100644
index 8e63a2cafe..0000000000
--- a/c/src/exec/libnetworking/netinet/tcp_var.h
+++ /dev/null
@@ -1,374 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993, 1994, 1995
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)tcp_var.h 8.4 (Berkeley) 5/24/95
- * $Id$
- */
-
-#ifndef _NETINET_TCP_VAR_H_
-#define _NETINET_TCP_VAR_H_
-/*
- * Kernel variables for tcp.
- */
-
-/*
- * Tcp control block, one per tcp; fields:
- */
-struct tcpcb {
- struct tcpiphdr *seg_next; /* sequencing queue */
- struct tcpiphdr *seg_prev;
- int t_state; /* state of this connection */
- int t_timer[TCPT_NTIMERS]; /* tcp timers */
- int t_rxtshift; /* log(2) of rexmt exp. backoff */
- int t_rxtcur; /* current retransmit value */
- int t_dupacks; /* consecutive dup acks recd */
- u_int t_maxseg; /* maximum segment size */
- u_int t_maxopd; /* mss plus options */
- int t_force; /* 1 if forcing out a byte */
- u_int t_flags;
-#define TF_ACKNOW 0x0001 /* ack peer immediately */
-#define TF_DELACK 0x0002 /* ack, but try to delay it */
-#define TF_NODELAY 0x0004 /* don't delay packets to coalesce */
-#define TF_NOOPT 0x0008 /* don't use tcp options */
-#define TF_SENTFIN 0x0010 /* have sent FIN */
-#define TF_REQ_SCALE 0x0020 /* have/will request window scaling */
-#define TF_RCVD_SCALE 0x0040 /* other side has requested scaling */
-#define TF_REQ_TSTMP 0x0080 /* have/will request timestamps */
-#define TF_RCVD_TSTMP 0x0100 /* a timestamp was received in SYN */
-#define TF_SACK_PERMIT 0x0200 /* other side said I could SACK */
-#define TF_NEEDSYN 0x0400 /* send SYN (implicit state) */
-#define TF_NEEDFIN 0x0800 /* send FIN (implicit state) */
-#define TF_NOPUSH 0x1000 /* don't push */
-#define TF_REQ_CC 0x2000 /* have/will request CC */
-#define TF_RCVD_CC 0x4000 /* a CC was received in SYN */
-#define TF_SENDCCNEW 0x8000 /* send CCnew instead of CC in SYN */
-
- struct tcpiphdr *t_template; /* skeletal packet for transmit */
- struct inpcb *t_inpcb; /* back pointer to internet pcb */
-/*
- * The following fields are used as in the protocol specification.
- * See RFC783, Dec. 1981, page 21.
- */
-/* send sequence variables */
- tcp_seq snd_una; /* send unacknowledged */
- tcp_seq snd_nxt; /* send next */
- tcp_seq snd_up; /* send urgent pointer */
- tcp_seq snd_wl1; /* window update seg seq number */
- tcp_seq snd_wl2; /* window update seg ack number */
- tcp_seq iss; /* initial send sequence number */
- u_long snd_wnd; /* send window */
-/* receive sequence variables */
- u_long rcv_wnd; /* receive window */
- tcp_seq rcv_nxt; /* receive next */
- tcp_seq rcv_up; /* receive urgent pointer */
- tcp_seq irs; /* initial receive sequence number */
-/*
- * Additional variables for this implementation.
- */
-/* receive variables */
- tcp_seq rcv_adv; /* advertised window */
-/* retransmit variables */
- tcp_seq snd_max; /* highest sequence number sent;
- * used to recognize retransmits
- */
-/* congestion control (for slow start, source quench, retransmit after loss) */
- u_long snd_cwnd; /* congestion-controlled window */
- u_long snd_ssthresh; /* snd_cwnd size threshold for
- * for slow start exponential to
- * linear switch
- */
-/*
- * transmit timing stuff. See below for scale of srtt and rttvar.
- * "Variance" is actually smoothed difference.
- */
- u_int t_idle; /* inactivity time */
- int t_rtt; /* round trip time */
- tcp_seq t_rtseq; /* sequence number being timed */
- int t_srtt; /* smoothed round-trip time */
- int t_rttvar; /* variance in round-trip time */
- u_int t_rttmin; /* minimum rtt allowed */
- u_long max_sndwnd; /* largest window peer has offered */
-
-/* out-of-band data */
- char t_oobflags; /* have some */
- char t_iobc; /* input character */
-#define TCPOOB_HAVEDATA 0x01
-#define TCPOOB_HADDATA 0x02
- int t_softerror; /* possible error not yet reported */
-
-/* RFC 1323 variables */
- u_char snd_scale; /* window scaling for send window */
- u_char rcv_scale; /* window scaling for recv window */
- u_char request_r_scale; /* pending window scaling */
- u_char requested_s_scale;
- u_long ts_recent; /* timestamp echo data */
- u_long ts_recent_age; /* when last updated */
- tcp_seq last_ack_sent;
-/* RFC 1644 variables */
- tcp_cc cc_send; /* send connection count */
- tcp_cc cc_recv; /* receive connection count */
- u_long t_duration; /* connection duration */
-
-/* TUBA stuff */
- caddr_t t_tuba_pcb; /* next level down pcb for TCP over z */
-/* More RTT stuff */
- u_long t_rttupdated; /* number of times rtt sampled */
-};
-
-/*
- * Structure to hold TCP options that are only used during segment
- * processing (in tcp_input), but not held in the tcpcb.
- * It's basically used to reduce the number of parameters
- * to tcp_dooptions.
- */
-struct tcpopt {
- u_long to_flag; /* which options are present */
-#define TOF_TS 0x0001 /* timestamp */
-#define TOF_CC 0x0002 /* CC and CCnew are exclusive */
-#define TOF_CCNEW 0x0004
-#define TOF_CCECHO 0x0008
- u_long to_tsval;
- u_long to_tsecr;
- tcp_cc to_cc; /* holds CC or CCnew */
- tcp_cc to_ccecho;
-};
-
-/*
- * The TAO cache entry which is stored in the protocol family specific
- * portion of the route metrics.
- */
-struct rmxp_tao {
- tcp_cc tao_cc; /* latest CC in valid SYN */
- tcp_cc tao_ccsent; /* latest CC sent to peer */
- u_short tao_mssopt; /* peer's cached MSS */
-#ifdef notyet
- u_short tao_flags; /* cache status flags */
-#define TAOF_DONT 0x0001 /* peer doesn't understand rfc1644 */
-#define TAOF_OK 0x0002 /* peer does understand rfc1644 */
-#define TAOF_UNDEF 0 /* we don't know yet */
-#endif /* notyet */
-};
-#define rmx_taop(r) ((struct rmxp_tao *)(r).rmx_filler)
-
-#define intotcpcb(ip) ((struct tcpcb *)(ip)->inp_ppcb)
-#define sototcpcb(so) (intotcpcb(sotoinpcb(so)))
-
-/*
- * The smoothed round-trip time and estimated variance
- * are stored as fixed point numbers scaled by the values below.
- * For convenience, these scales are also used in smoothing the average
- * (smoothed = (1/scale)sample + ((scale-1)/scale)smoothed).
- * With these scales, srtt has 3 bits to the right of the binary point,
- * and thus an "ALPHA" of 0.875. rttvar has 2 bits to the right of the
- * binary point, and is smoothed with an ALPHA of 0.75.
- */
-#define TCP_RTT_SCALE 32 /* multiplier for srtt; 3 bits frac. */
-#define TCP_RTT_SHIFT 5 /* shift for srtt; 3 bits frac. */
-#define TCP_RTTVAR_SCALE 16 /* multiplier for rttvar; 2 bits */
-#define TCP_RTTVAR_SHIFT 4 /* shift for rttvar; 2 bits */
-#define TCP_DELTA_SHIFT 2 /* see tcp_input.c */
-
-/*
- * The initial retransmission should happen at rtt + 4 * rttvar.
- * Because of the way we do the smoothing, srtt and rttvar
- * will each average +1/2 tick of bias. When we compute
- * the retransmit timer, we want 1/2 tick of rounding and
- * 1 extra tick because of +-1/2 tick uncertainty in the
- * firing of the timer. The bias will give us exactly the
- * 1.5 tick we need. But, because the bias is
- * statistical, we have to test that we don't drop below
- * the minimum feasible timer (which is 2 ticks).
- * This version of the macro adapted from a paper by Lawrence
- * Brakmo and Larry Peterson which outlines a problem caused
- * by insufficient precision in the original implementation,
- * which results in inappropriately large RTO values for very
- * fast networks.
- */
-#define TCP_REXMTVAL(tp) \
- ((((tp)->t_srtt >> (TCP_RTT_SHIFT - TCP_DELTA_SHIFT)) \
- + (tp)->t_rttvar) >> TCP_DELTA_SHIFT)
-
-/* XXX
- * We want to avoid doing m_pullup on incoming packets but that
- * means avoiding dtom on the tcp reassembly code. That in turn means
- * keeping an mbuf pointer in the reassembly queue (since we might
- * have a cluster). As a quick hack, the source & destination
- * port numbers (which are no longer needed once we've located the
- * tcpcb) are overlayed with an mbuf pointer.
- */
-#define REASS_MBUF(ti) (*(struct mbuf **)&((ti)->ti_t))
-
-/*
- * TCP statistics.
- * Many of these should be kept per connection,
- * but that's inconvenient at the moment.
- */
-struct tcpstat {
- u_long tcps_connattempt; /* connections initiated */
- u_long tcps_accepts; /* connections accepted */
- u_long tcps_connects; /* connections established */
- u_long tcps_drops; /* connections dropped */
- u_long tcps_conndrops; /* embryonic connections dropped */
- u_long tcps_closed; /* conn. closed (includes drops) */
- u_long tcps_segstimed; /* segs where we tried to get rtt */
- u_long tcps_rttupdated; /* times we succeeded */
- u_long tcps_delack; /* delayed acks sent */
- u_long tcps_timeoutdrop; /* conn. dropped in rxmt timeout */
- u_long tcps_rexmttimeo; /* retransmit timeouts */
- u_long tcps_persisttimeo; /* persist timeouts */
- u_long tcps_keeptimeo; /* keepalive timeouts */
- u_long tcps_keepprobe; /* keepalive probes sent */
- u_long tcps_keepdrops; /* connections dropped in keepalive */
-
- u_long tcps_sndtotal; /* total packets sent */
- u_long tcps_sndpack; /* data packets sent */
- u_long tcps_sndbyte; /* data bytes sent */
- u_long tcps_sndrexmitpack; /* data packets retransmitted */
- u_long tcps_sndrexmitbyte; /* data bytes retransmitted */
- u_long tcps_sndacks; /* ack-only packets sent */
- u_long tcps_sndprobe; /* window probes sent */
- u_long tcps_sndurg; /* packets sent with URG only */
- u_long tcps_sndwinup; /* window update-only packets sent */
- u_long tcps_sndctrl; /* control (SYN|FIN|RST) packets sent */
-
- u_long tcps_rcvtotal; /* total packets received */
- u_long tcps_rcvpack; /* packets received in sequence */
- u_long tcps_rcvbyte; /* bytes received in sequence */
- u_long tcps_rcvbadsum; /* packets received with ccksum errs */
- u_long tcps_rcvbadoff; /* packets received with bad offset */
- u_long tcps_rcvshort; /* packets received too short */
- u_long tcps_rcvduppack; /* duplicate-only packets received */
- u_long tcps_rcvdupbyte; /* duplicate-only bytes received */
- u_long tcps_rcvpartduppack; /* packets with some duplicate data */
- u_long tcps_rcvpartdupbyte; /* dup. bytes in part-dup. packets */
- u_long tcps_rcvoopack; /* out-of-order packets received */
- u_long tcps_rcvoobyte; /* out-of-order bytes received */
- u_long tcps_rcvpackafterwin; /* packets with data after window */
- u_long tcps_rcvbyteafterwin; /* bytes rcvd after window */
- u_long tcps_rcvafterclose; /* packets rcvd after "close" */
- u_long tcps_rcvwinprobe; /* rcvd window probe packets */
- u_long tcps_rcvdupack; /* rcvd duplicate acks */
- u_long tcps_rcvacktoomuch; /* rcvd acks for unsent data */
- u_long tcps_rcvackpack; /* rcvd ack packets */
- u_long tcps_rcvackbyte; /* bytes acked by rcvd acks */
- u_long tcps_rcvwinupd; /* rcvd window update packets */
- u_long tcps_pawsdrop; /* segments dropped due to PAWS */
- u_long tcps_predack; /* times hdr predict ok for acks */
- u_long tcps_preddat; /* times hdr predict ok for data pkts */
- u_long tcps_pcbcachemiss;
- u_long tcps_cachedrtt; /* times cached RTT in route updated */
- u_long tcps_cachedrttvar; /* times cached rttvar updated */
- u_long tcps_cachedssthresh; /* times cached ssthresh updated */
- u_long tcps_usedrtt; /* times RTT initialized from route */
- u_long tcps_usedrttvar; /* times RTTVAR initialized from rt */
- u_long tcps_usedssthresh; /* times ssthresh initialized from rt*/
- u_long tcps_persistdrop; /* timeout in persist state */
- u_long tcps_badsyn; /* bogus SYN, e.g. premature ACK */
- u_long tcps_mturesent; /* resends due to MTU discovery */
- u_long tcps_listendrop; /* listen queue overflows */
-};
-
-/*
- * Names for TCP sysctl objects
- */
-#define TCPCTL_DO_RFC1323 1 /* use RFC-1323 extensions */
-#define TCPCTL_DO_RFC1644 2 /* use RFC-1644 extensions */
-#define TCPCTL_MSSDFLT 3 /* MSS default */
-#define TCPCTL_STATS 4 /* statistics (read-only) */
-#define TCPCTL_RTTDFLT 5 /* default RTT estimate */
-#define TCPCTL_KEEPIDLE 6 /* keepalive idle timer */
-#define TCPCTL_KEEPINTVL 7 /* interval to send keepalives */
-#define TCPCTL_SENDSPACE 8 /* send buffer space */
-#define TCPCTL_RECVSPACE 9 /* receive buffer space */
-#define TCPCTL_KEEPINIT 10 /* receive buffer space */
-#define TCPCTL_MAXID 11
-
-#define TCPCTL_NAMES { \
- { 0, 0 }, \
- { "rfc1323", CTLTYPE_INT }, \
- { "rfc1644", CTLTYPE_INT }, \
- { "mssdflt", CTLTYPE_INT }, \
- { "stats", CTLTYPE_STRUCT }, \
- { "rttdflt", CTLTYPE_INT }, \
- { "keepidle", CTLTYPE_INT }, \
- { "keepintvl", CTLTYPE_INT }, \
- { "sendspace", CTLTYPE_INT }, \
- { "recvspace", CTLTYPE_INT }, \
- { "keepinit", CTLTYPE_INT }, \
-}
-
-#ifdef KERNEL
-extern struct inpcbhead tcb; /* head of queue of active tcpcb's */
-extern struct inpcbinfo tcbinfo;
-extern struct tcpstat tcpstat; /* tcp statistics */
-extern int tcp_mssdflt; /* XXX */
-extern u_long tcp_now; /* for RFC 1323 timestamps */
-
-void tcp_canceltimers __P((struct tcpcb *));
-struct tcpcb *
- tcp_close __P((struct tcpcb *));
-void tcp_ctlinput __P((int, struct sockaddr *, void *));
-int tcp_ctloutput __P((int, struct socket *, int, int, struct mbuf **));
-struct tcpcb *
- tcp_drop __P((struct tcpcb *, int));
-void tcp_drain __P((void));
-void tcp_fasttimo __P((void));
-struct rmxp_tao *
- tcp_gettaocache __P((struct inpcb *));
-void tcp_init __P((void));
-void tcp_input __P((struct mbuf *, int));
-void tcp_mss __P((struct tcpcb *, int));
-int tcp_mssopt __P((struct tcpcb *));
-void tcp_mtudisc __P((struct inpcb *, int));
-struct tcpcb *
- tcp_newtcpcb __P((struct inpcb *));
-int tcp_output __P((struct tcpcb *));
-void tcp_quench __P((struct inpcb *, int));
-void tcp_respond __P((struct tcpcb *,
- struct tcpiphdr *, struct mbuf *, u_long, u_long, int));
-struct rtentry *
- tcp_rtlookup __P((struct inpcb *));
-void tcp_setpersist __P((struct tcpcb *));
-void tcp_slowtimo __P((void));
-struct tcpiphdr *
- tcp_template __P((struct tcpcb *));
-struct tcpcb *
- tcp_timers __P((struct tcpcb *, int));
-void tcp_trace __P((int, int, struct tcpcb *, struct tcpiphdr *, int));
-
-extern struct pr_usrreqs tcp_usrreqs;
-extern u_long tcp_sendspace;
-extern u_long tcp_recvspace;
-
-#endif /* KERNEL */
-
-#endif /* _NETINET_TCP_VAR_H_ */
diff --git a/c/src/exec/libnetworking/netinet/tcpip.h b/c/src/exec/libnetworking/netinet/tcpip.h
deleted file mode 100644
index b8634bfd15..0000000000
--- a/c/src/exec/libnetworking/netinet/tcpip.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)tcpip.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _NETINET_TCPIP_H_
-#define _NETINET_TCPIP_H_
-
-/*
- * Tcp+ip header, after ip options removed.
- */
-struct tcpiphdr {
- struct ipovly ti_i; /* overlaid ip structure */
- struct tcphdr ti_t; /* tcp header */
-};
-#ifdef notyet
-/*
- * Tcp+ip header, after ip options removed but including TCP options.
- */
-struct full_tcpiphdr {
- struct ipovly ti_i; /* overlaid ip structure */
- struct tcphdr ti_t; /* tcp header */
- char ti_o[TCP_MAXOLEN]; /* space for tcp options */
-};
-#endif /* notyet */
-#define ti_next ti_i.ih_next
-#define ti_prev ti_i.ih_prev
-#define ti_x1 ti_i.ih_x1
-#define ti_pr ti_i.ih_pr
-#define ti_len ti_i.ih_len
-#define ti_src ti_i.ih_src
-#define ti_dst ti_i.ih_dst
-#define ti_sport ti_t.th_sport
-#define ti_dport ti_t.th_dport
-#define ti_seq ti_t.th_seq
-#define ti_ack ti_t.th_ack
-#define ti_x2 ti_t.th_x2
-#define ti_off ti_t.th_off
-#define ti_flags ti_t.th_flags
-#define ti_win ti_t.th_win
-#define ti_sum ti_t.th_sum
-#define ti_urp ti_t.th_urp
-
-#endif
diff --git a/c/src/exec/libnetworking/netinet/udp.h b/c/src/exec/libnetworking/netinet/udp.h
deleted file mode 100644
index e73e1f4ddb..0000000000
--- a/c/src/exec/libnetworking/netinet/udp.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)udp.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _NETINET_UDP_H_
-#define _NETINET_UDP_H_
-
-/*
- * Udp protocol header.
- * Per RFC 768, September, 1981.
- */
-struct udphdr {
- u_short uh_sport; /* source port */
- u_short uh_dport; /* destination port */
- u_short uh_ulen; /* udp length */
- u_short uh_sum; /* udp checksum */
-};
-
-#endif
diff --git a/c/src/exec/libnetworking/netinet/udp_usrreq.c b/c/src/exec/libnetworking/netinet/udp_usrreq.c
deleted file mode 100644
index 16c5fce2df..0000000000
--- a/c/src/exec/libnetworking/netinet/udp_usrreq.c
+++ /dev/null
@@ -1,613 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1995
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)udp_usrreq.c 8.6 (Berkeley) 5/23/95
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/systm.h>
-#include <sys/malloc.h>
-#include <sys/mbuf.h>
-#include <sys/protosw.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/errno.h>
-#include <sys/stat.h>
-#include <sys/kernel.h>
-#include <sys/sysctl.h>
-#include <sys/syslog.h>
-
-#include <net/if.h>
-#include <net/route.h>
-
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/in_pcb.h>
-#include <netinet/in_var.h>
-#include <netinet/ip_var.h>
-#include <netinet/ip_icmp.h>
-#include <netinet/udp.h>
-#include <netinet/udp_var.h>
-
-/*
- * UDP protocol implementation.
- * Per RFC 768, August, 1980.
- */
-#ifndef COMPAT_42
-static int udpcksum = 1;
-#else
-static int udpcksum = 0; /* XXX */
-#endif
-SYSCTL_INT(_net_inet_udp, UDPCTL_CHECKSUM, checksum, CTLFLAG_RW,
- &udpcksum, 0, "");
-
-static int log_in_vain = 0;
-SYSCTL_INT(_net_inet_udp, OID_AUTO, log_in_vain, CTLFLAG_RW,
- &log_in_vain, 0, "");
-
-static struct inpcbhead udb; /* from udp_var.h */
-static struct inpcbinfo udbinfo;
-
-#ifndef UDBHASHSIZE
-#define UDBHASHSIZE 64
-#endif
-
- struct udpstat udpstat; /* from udp_var.h */
-SYSCTL_STRUCT(_net_inet_udp, UDPCTL_STATS, stats, CTLFLAG_RD,
- &udpstat, udpstat, "");
-
-static struct sockaddr_in udp_in = { sizeof(udp_in), AF_INET };
-
-static void udp_detach __P((struct inpcb *));
-static int udp_output __P((struct inpcb *, struct mbuf *, struct mbuf *,
- struct mbuf *));
-static void udp_notify __P((struct inpcb *, int));
-
-void
-udp_init()
-{
- LIST_INIT(&udb);
- udbinfo.listhead = &udb;
- udbinfo.hashbase = hashinit(UDBHASHSIZE, M_PCB, &udbinfo.hashmask);
-}
-
-void
-udp_input(m, iphlen)
- register struct mbuf *m;
- int iphlen;
-{
- register struct ip *ip;
- register struct udphdr *uh;
- register struct inpcb *inp;
- struct mbuf *opts = 0;
- int len;
- struct ip save_ip;
-
- udpstat.udps_ipackets++;
-
- /*
- * Strip IP options, if any; should skip this,
- * make available to user, and use on returned packets,
- * but we don't yet have a way to check the checksum
- * with options still present.
- */
- if (iphlen > sizeof (struct ip)) {
- ip_stripoptions(m, (struct mbuf *)0);
- iphlen = sizeof(struct ip);
- }
-
- /*
- * Get IP and UDP header together in first mbuf.
- */
- ip = mtod(m, struct ip *);
- if (m->m_len < iphlen + sizeof(struct udphdr)) {
- if ((m = m_pullup(m, iphlen + sizeof(struct udphdr))) == 0) {
- udpstat.udps_hdrops++;
- return;
- }
- ip = mtod(m, struct ip *);
- }
- uh = (struct udphdr *)((caddr_t)ip + iphlen);
-
- /*
- * Make mbuf data length reflect UDP length.
- * If not enough data to reflect UDP length, drop.
- */
- len = ntohs((u_short)uh->uh_ulen);
- if (ip->ip_len != len) {
- if (len > ip->ip_len || len < sizeof(struct udphdr)) {
- udpstat.udps_badlen++;
- goto bad;
- }
- m_adj(m, len - ip->ip_len);
- /* ip->ip_len = len; */
- }
- /*
- * Save a copy of the IP header in case we want restore it
- * for sending an ICMP error message in response.
- */
- save_ip = *ip;
-
- /*
- * Checksum extended UDP header and data.
- */
- if (uh->uh_sum) {
- ((struct ipovly *)ip)->ih_next = 0;
- ((struct ipovly *)ip)->ih_prev = 0;
- ((struct ipovly *)ip)->ih_x1 = 0;
- ((struct ipovly *)ip)->ih_len = uh->uh_ulen;
- uh->uh_sum = in_cksum(m, len + sizeof (struct ip));
- if (uh->uh_sum) {
- udpstat.udps_badsum++;
- m_freem(m);
- return;
- }
- }
-
- if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr)) ||
- in_broadcast(ip->ip_dst, m->m_pkthdr.rcvif)) {
- struct inpcb *last;
- /*
- * Deliver a multicast or broadcast datagram to *all* sockets
- * for which the local and remote addresses and ports match
- * those of the incoming datagram. This allows more than
- * one process to receive multi/broadcasts on the same port.
- * (This really ought to be done for unicast datagrams as
- * well, but that would cause problems with existing
- * applications that open both address-specific sockets and
- * a wildcard socket listening to the same port -- they would
- * end up receiving duplicates of every unicast datagram.
- * Those applications open the multiple sockets to overcome an
- * inadequacy of the UDP socket interface, but for backwards
- * compatibility we avoid the problem here rather than
- * fixing the interface. Maybe 4.5BSD will remedy this?)
- */
-
- /*
- * Construct sockaddr format source address.
- */
- udp_in.sin_port = uh->uh_sport;
- udp_in.sin_addr = ip->ip_src;
- m->m_len -= sizeof (struct udpiphdr);
- m->m_data += sizeof (struct udpiphdr);
- /*
- * Locate pcb(s) for datagram.
- * (Algorithm copied from raw_intr().)
- */
- last = NULL;
- for (inp = udb.lh_first; inp != NULL; inp = inp->inp_list.le_next) {
- if (inp->inp_lport != uh->uh_dport)
- continue;
- if (inp->inp_laddr.s_addr != INADDR_ANY) {
- if (inp->inp_laddr.s_addr !=
- ip->ip_dst.s_addr)
- continue;
- }
- if (inp->inp_faddr.s_addr != INADDR_ANY) {
- if (inp->inp_faddr.s_addr !=
- ip->ip_src.s_addr ||
- inp->inp_fport != uh->uh_sport)
- continue;
- }
-
- if (last != NULL) {
- struct mbuf *n;
-
- if ((n = m_copy(m, 0, M_COPYALL)) != NULL) {
- if (last->inp_flags & INP_CONTROLOPTS
- || last->inp_socket->so_options & SO_TIMESTAMP)
- ip_savecontrol(last, &opts, ip, n);
- if (sbappendaddr(&last->inp_socket->so_rcv,
- (struct sockaddr *)&udp_in,
- n, opts) == 0) {
- m_freem(n);
- if (opts)
- m_freem(opts);
- udpstat.udps_fullsock++;
- } else
- sorwakeup(last->inp_socket);
- opts = 0;
- }
- }
- last = inp;
- /*
- * Don't look for additional matches if this one does
- * not have either the SO_REUSEPORT or SO_REUSEADDR
- * socket options set. This heuristic avoids searching
- * through all pcbs in the common case of a non-shared
- * port. It * assumes that an application will never
- * clear these options after setting them.
- */
- if (((last->inp_socket->so_options&(SO_REUSEPORT|SO_REUSEADDR)) == 0))
- break;
- }
-
- if (last == NULL) {
- /*
- * No matching pcb found; discard datagram.
- * (No need to send an ICMP Port Unreachable
- * for a broadcast or multicast datgram.)
- */
- udpstat.udps_noportbcast++;
- goto bad;
- }
- if (last->inp_flags & INP_CONTROLOPTS
- || last->inp_socket->so_options & SO_TIMESTAMP)
- ip_savecontrol(last, &opts, ip, m);
- if (sbappendaddr(&last->inp_socket->so_rcv,
- (struct sockaddr *)&udp_in,
- m, opts) == 0) {
- udpstat.udps_fullsock++;
- goto bad;
- }
- sorwakeup(last->inp_socket);
- return;
- }
- /*
- * Locate pcb for datagram.
- */
- inp = in_pcblookuphash(&udbinfo, ip->ip_src, uh->uh_sport,
- ip->ip_dst, uh->uh_dport, 1);
- if (inp == NULL) {
- if (log_in_vain) {
- char buf[4*sizeof "123"];
-
- strcpy(buf, inet_ntoa(ip->ip_dst));
- log(LOG_INFO, "Connection attempt to UDP %s:%d"
- " from %s:%d\n",
- buf, ntohs(uh->uh_dport),
- inet_ntoa(ip->ip_src), ntohs(uh->uh_sport));
- }
- udpstat.udps_noport++;
- if (m->m_flags & (M_BCAST | M_MCAST)) {
- udpstat.udps_noportbcast++;
- goto bad;
- }
- *ip = save_ip;
- icmp_error(m, ICMP_UNREACH, ICMP_UNREACH_PORT, 0, 0);
- return;
- }
-
- /*
- * Construct sockaddr format source address.
- * Stuff source address and datagram in user buffer.
- */
- udp_in.sin_port = uh->uh_sport;
- udp_in.sin_addr = ip->ip_src;
- if (inp->inp_flags & INP_CONTROLOPTS
- || inp->inp_socket->so_options & SO_TIMESTAMP)
- ip_savecontrol(inp, &opts, ip, m);
- iphlen += sizeof(struct udphdr);
- m->m_len -= iphlen;
- m->m_pkthdr.len -= iphlen;
- m->m_data += iphlen;
- if (sbappendaddr(&inp->inp_socket->so_rcv, (struct sockaddr *)&udp_in,
- m, opts) == 0) {
- udpstat.udps_fullsock++;
- goto bad;
- }
- sorwakeup(inp->inp_socket);
- return;
-bad:
- m_freem(m);
- if (opts)
- m_freem(opts);
-}
-
-/*
- * Notify a udp user of an asynchronous error;
- * just wake up so that he can collect error status.
- */
-static void
-udp_notify(inp, errnum)
- register struct inpcb *inp;
- int errnum;
-{
- inp->inp_socket->so_error = errnum;
- sorwakeup(inp->inp_socket);
- sowwakeup(inp->inp_socket);
-}
-
-void
-udp_ctlinput(cmd, sa, vip)
- int cmd;
- struct sockaddr *sa;
- void *vip;
-{
- register struct ip *ip = vip;
- register struct udphdr *uh;
-
- if (!PRC_IS_REDIRECT(cmd) &&
- ((unsigned)cmd >= PRC_NCMDS || inetctlerrmap[cmd] == 0))
- return;
- if (ip) {
- uh = (struct udphdr *)((caddr_t)ip + (ip->ip_hl << 2));
- in_pcbnotify(&udb, sa, uh->uh_dport, ip->ip_src, uh->uh_sport,
- cmd, udp_notify);
- } else
- in_pcbnotify(&udb, sa, 0, zeroin_addr, 0, cmd, udp_notify);
-}
-
-static int
-udp_output(inp, m, addr, control)
- register struct inpcb *inp;
- register struct mbuf *m;
- struct mbuf *addr, *control;
-{
- register struct udpiphdr *ui;
- register int len = m->m_pkthdr.len;
- struct in_addr laddr;
- int s = 0, error = 0;
-
- if (control)
- m_freem(control); /* XXX */
-
- if (len + sizeof(struct udpiphdr) > IP_MAXPACKET) {
- error = EMSGSIZE;
- goto release;
- }
-
- if (addr) {
- laddr = inp->inp_laddr;
- if (inp->inp_faddr.s_addr != INADDR_ANY) {
- error = EISCONN;
- goto release;
- }
- /*
- * Must block input while temporarily connected.
- */
- s = splnet();
- error = in_pcbconnect(inp, addr);
- if (error) {
- splx(s);
- goto release;
- }
- } else {
- if (inp->inp_faddr.s_addr == INADDR_ANY) {
- error = ENOTCONN;
- goto release;
- }
- }
- /*
- * Calculate data length and get a mbuf
- * for UDP and IP headers.
- */
- M_PREPEND(m, sizeof(struct udpiphdr), M_DONTWAIT);
- if (m == 0) {
- error = ENOBUFS;
- if (addr)
- splx(s);
- goto release;
- }
-
- /*
- * Fill in mbuf with extended UDP header
- * and addresses and length put into network format.
- */
- ui = mtod(m, struct udpiphdr *);
- ui->ui_next = ui->ui_prev = 0;
- ui->ui_x1 = 0;
- ui->ui_pr = IPPROTO_UDP;
- ui->ui_len = htons((u_short)len + sizeof (struct udphdr));
- ui->ui_src = inp->inp_laddr;
- ui->ui_dst = inp->inp_faddr;
- ui->ui_sport = inp->inp_lport;
- ui->ui_dport = inp->inp_fport;
- ui->ui_ulen = ui->ui_len;
-
- /*
- * Stuff checksum and output datagram.
- */
- ui->ui_sum = 0;
- if (udpcksum) {
- if ((ui->ui_sum = in_cksum(m, sizeof (struct udpiphdr) + len)) == 0)
- ui->ui_sum = 0xffff;
- }
- ((struct ip *)ui)->ip_len = sizeof (struct udpiphdr) + len;
- ((struct ip *)ui)->ip_ttl = inp->inp_ip_ttl; /* XXX */
- ((struct ip *)ui)->ip_tos = inp->inp_ip_tos; /* XXX */
- udpstat.udps_opackets++;
- error = ip_output(m, inp->inp_options, &inp->inp_route,
- inp->inp_socket->so_options & (SO_DONTROUTE | SO_BROADCAST),
- inp->inp_moptions);
-
- if (addr) {
- in_pcbdisconnect(inp);
- inp->inp_laddr = laddr;
- splx(s);
- }
- return (error);
-
-release:
- m_freem(m);
- return (error);
-}
-
-static u_long udp_sendspace = 9216; /* really max datagram size */
- /* 40 1K datagrams */
-SYSCTL_INT(_net_inet_udp, UDPCTL_MAXDGRAM, maxdgram, CTLFLAG_RW,
- &udp_sendspace, 0, "");
-
-static u_long udp_recvspace = 40 * (1024 + sizeof(struct sockaddr_in));
-SYSCTL_INT(_net_inet_udp, UDPCTL_RECVSPACE, recvspace, CTLFLAG_RW,
- &udp_recvspace, 0, "");
-
-/*ARGSUSED*/
-int
-udp_usrreq(so, req, m, addr, control)
- struct socket *so;
- int req;
- struct mbuf *m, *addr, *control;
-{
- struct inpcb *inp = sotoinpcb(so);
- int error = 0;
- int s;
-
- if (req == PRU_CONTROL)
- return (in_control(so, (u_long)m, (caddr_t)addr,
- (struct ifnet *)control));
- if (inp == NULL && req != PRU_ATTACH) {
- error = EINVAL;
- goto release;
- }
- /*
- * Note: need to block udp_input while changing
- * the udp pcb queue and/or pcb addresses.
- */
- switch (req) {
-
- case PRU_ATTACH:
- if (inp != NULL) {
- error = EINVAL;
- break;
- }
- s = splnet();
- error = in_pcballoc(so, &udbinfo);
- splx(s);
- if (error)
- break;
- error = soreserve(so, udp_sendspace, udp_recvspace);
- if (error)
- break;
- ((struct inpcb *) so->so_pcb)->inp_ip_ttl = ip_defttl;
- break;
-
- case PRU_DETACH:
- udp_detach(inp);
- break;
-
- case PRU_BIND:
- s = splnet();
- error = in_pcbbind(inp, addr);
- splx(s);
- break;
-
- case PRU_LISTEN:
- error = EOPNOTSUPP;
- break;
-
- case PRU_CONNECT:
- if (inp->inp_faddr.s_addr != INADDR_ANY) {
- error = EISCONN;
- break;
- }
- s = splnet();
- error = in_pcbconnect(inp, addr);
- splx(s);
- if (error == 0)
- soisconnected(so);
- break;
-
- case PRU_CONNECT2:
- error = EOPNOTSUPP;
- break;
-
- case PRU_ACCEPT:
- error = EOPNOTSUPP;
- break;
-
- case PRU_DISCONNECT:
- if (inp->inp_faddr.s_addr == INADDR_ANY) {
- error = ENOTCONN;
- break;
- }
- s = splnet();
- in_pcbdisconnect(inp);
- inp->inp_laddr.s_addr = INADDR_ANY;
- splx(s);
- so->so_state &= ~SS_ISCONNECTED; /* XXX */
- break;
-
- case PRU_SHUTDOWN:
- socantsendmore(so);
- break;
-
- case PRU_SEND:
- return (udp_output(inp, m, addr, control));
-
- case PRU_ABORT:
- soisdisconnected(so);
- udp_detach(inp);
- break;
-
- case PRU_SOCKADDR:
- in_setsockaddr(inp, addr);
- break;
-
- case PRU_PEERADDR:
- in_setpeeraddr(inp, addr);
- break;
-
- case PRU_SENSE:
- /*
- * stat: don't bother with a blocksize.
- */
- return (0);
-
- case PRU_SENDOOB:
- case PRU_FASTTIMO:
- case PRU_SLOWTIMO:
- case PRU_PROTORCV:
- case PRU_PROTOSEND:
- error = EOPNOTSUPP;
- break;
-
- case PRU_RCVD:
- case PRU_RCVOOB:
- return (EOPNOTSUPP); /* do not free mbuf's */
-
- default:
- panic("udp_usrreq");
- }
-
-release:
- if (control) {
- printf("udp control data unexpectedly retained\n");
- m_freem(control);
- }
- if (m)
- m_freem(m);
- return (error);
-}
-
-static void
-udp_detach(inp)
- struct inpcb *inp;
-{
- int s = splnet();
-
- in_pcbdetach(inp);
- splx(s);
-}
diff --git a/c/src/exec/libnetworking/netinet/udp_var.h b/c/src/exec/libnetworking/netinet/udp_var.h
deleted file mode 100644
index 90785b53de..0000000000
--- a/c/src/exec/libnetworking/netinet/udp_var.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)udp_var.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _NETINET_UDP_VAR_H_
-#define _NETINET_UDP_VAR_H_
-
-/*
- * UDP kernel structures and variables.
- */
-struct udpiphdr {
- struct ipovly ui_i; /* overlaid ip structure */
- struct udphdr ui_u; /* udp header */
-};
-#define ui_next ui_i.ih_next
-#define ui_prev ui_i.ih_prev
-#define ui_x1 ui_i.ih_x1
-#define ui_pr ui_i.ih_pr
-#define ui_len ui_i.ih_len
-#define ui_src ui_i.ih_src
-#define ui_dst ui_i.ih_dst
-#define ui_sport ui_u.uh_sport
-#define ui_dport ui_u.uh_dport
-#define ui_ulen ui_u.uh_ulen
-#define ui_sum ui_u.uh_sum
-
-struct udpstat {
- /* input statistics: */
- u_long udps_ipackets; /* total input packets */
- u_long udps_hdrops; /* packet shorter than header */
- u_long udps_badsum; /* checksum error */
- u_long udps_badlen; /* data length larger than packet */
- u_long udps_noport; /* no socket on port */
- u_long udps_noportbcast; /* of above, arrived as broadcast */
- u_long udps_fullsock; /* not delivered, input socket full */
- u_long udpps_pcbcachemiss; /* input packets missing pcb cache */
- u_long udpps_pcbhashmiss; /* input packets not for hashed pcb */
- /* output statistics: */
- u_long udps_opackets; /* total output packets */
-};
-
-/*
- * Names for UDP sysctl objects
- */
-#define UDPCTL_CHECKSUM 1 /* checksum UDP packets */
-#define UDPCTL_STATS 2 /* statistics (read-only) */
-#define UDPCTL_MAXDGRAM 3 /* max datagram size */
-#define UDPCTL_RECVSPACE 4 /* default receive buffer space */
-#define UDPCTL_MAXID 5
-
-#define UDPCTL_NAMES { \
- { 0, 0 }, \
- { "checksum", CTLTYPE_INT }, \
- { "stats", CTLTYPE_STRUCT }, \
- { "maxdgram", CTLTYPE_INT }, \
- { "recvspace", CTLTYPE_INT }, \
-}
-
-#ifdef KERNEL
-extern struct inpcbhead udb;
-extern struct inpcbinfo udbinfo;
-extern struct udpstat udpstat;
-
-void udp_ctlinput __P((int, struct sockaddr *, void *));
-void udp_init __P((void));
-void udp_input __P((struct mbuf *, int));
-int udp_usrreq __P((struct socket *,
- int, struct mbuf *, struct mbuf *, struct mbuf *));
-#endif
-
-#endif
diff --git a/c/src/exec/libnetworking/nfs/Makefile.am b/c/src/exec/libnetworking/nfs/Makefile.am
deleted file mode 100644
index 51184e47ae..0000000000
--- a/c/src/exec/libnetworking/nfs/Makefile.am
+++ /dev/null
@@ -1,35 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-LIBNAME = lib.a
-LIB = $(ARCH)/$(LIBNAME)
-
-C_FILES = bootp_subr.c
-C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
-
-OBJS = $(C_O_FILES)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../automake/lib.am
-
-#
-# Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -D_COMPILING_BSD_KERNEL_ -DKERNEL -DINET -DNFS -DDIAGNOSTIC \
- -DBOOTP_COMPAT
-
-$(LIB): $(OBJS)
- $(make-library)
-
-all-local: $(ARCH) $(OBJS) $(LIB)
-
-.PRECIOUS: $(LIB)
-
-EXTRA_DIST = bootp_subr.c krpc.h nfs.h nfsdiskless.h nfsproto.h rpcv2.h \
- xdr_subs.h
-
-include $(top_srcdir)/../../../automake/local.am
diff --git a/c/src/exec/libnetworking/nfs/bootp_subr.c b/c/src/exec/libnetworking/nfs/bootp_subr.c
deleted file mode 100644
index b809143d6d..0000000000
--- a/c/src/exec/libnetworking/nfs/bootp_subr.c
+++ /dev/null
@@ -1,1036 +0,0 @@
-/* $Id$ */
-
-/*
- * Copyright (c) 1995 Gordon Ross, Adam Glass
- * Copyright (c) 1992 Regents of the University of California.
- * All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Lawrence Berkeley Laboratory and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * based on:
- * nfs/krpc_subr.c
- * $NetBSD: krpc_subr.c,v 1.10 1995/08/08 20:43:43 gwr Exp $
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/conf.h>
-#include <sys/sockio.h>
-#include <sys/proc.h>
-#include <sys/mount.h>
-#include <sys/mbuf.h>
-#include <sys/reboot.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-
-#include <net/if.h>
-#include <net/route.h>
-
-#include <netinet/in.h>
-#include <net/if_types.h>
-#include <net/if_dl.h>
-#include <netinet/if_ether.h>
-
-#include <nfs/rpcv2.h>
-#include <nfs/nfsproto.h>
-#include <nfs/nfs.h>
-#include <nfs/nfsdiskless.h>
-#include <nfs/krpc.h>
-#include <nfs/xdr_subs.h>
-
-#define BOOTP_MIN_LEN 300 /* Minimum size of bootp udp packet */
-
-/*
- * What is the longest we will wait before re-sending a request?
- * Note this is also the frequency of "RPC timeout" messages.
- * The re-send loop count sup linearly to this maximum, so the
- * first complaint will happen after (1+2+3+4+5)=15 seconds.
- */
-#define MAX_RESEND_DELAY 5 /* seconds */
-
-/* Definitions from RFC951 */
-struct bootp_packet {
- u_int8_t op;
- u_int8_t htype;
- u_int8_t hlen;
- u_int8_t hops;
- u_int32_t xid;
- u_int16_t secs;
- u_int16_t flags;
- struct in_addr ciaddr;
- struct in_addr yiaddr;
- struct in_addr siaddr;
- struct in_addr giaddr;
- unsigned char chaddr[16];
- char sname[64];
- char file[128];
- unsigned char vend[256];
-};
-
-#define IPPORT_BOOTPC 68
-#define IPPORT_BOOTPS 67
-
-extern int nfs_diskless_valid;
-extern struct nfsv3_diskless nfsv3_diskless;
-
-/* mountd RPC */
-#if !defined(__rtems__)
-static int md_mount __P((struct sockaddr_in *mdsin, char *path,
- u_char *fhp, int *fhsizep, struct nfs_args *args,struct proc *procp));
-static int md_lookup_swap __P((struct sockaddr_in *mdsin,char *path,
- u_char *fhp, int *fhsizep,
- struct nfs_args *args,
- struct proc *procp));
-static int setfs __P((struct sockaddr_in *addr, char *path, char *p));
-static int getdec __P((char **ptr));
-#endif
-static char *substr __P((char *a,char *b));
-#if !defined(__rtems__)
-static void mountopts __P((struct nfs_args *args, char *p));
-static int xdr_opaque_decode __P((struct mbuf **ptr,u_char *buf,
- int len));
-static int xdr_int_decode __P((struct mbuf **ptr,int *iptr));
-#endif
-static void printip __P((char *prefix,struct in_addr addr));
-
-#ifdef BOOTP_DEBUG
-void bootpboot_p_sa(struct sockaddr *sa,struct sockaddr *ma);
-void bootpboot_p_ma(struct sockaddr *ma);
-void bootpboot_p_rtentry(struct rtentry *rt);
-void bootpboot_p_tree(struct radix_node *rn);
-void bootpboot_p_rtlist(void);
-void bootpboot_p_iflist(void);
-#endif
-
-int bootpc_call(struct bootp_packet *call,
- struct bootp_packet *reply,
- struct proc *procp);
-
-int bootpc_fakeup_interface(struct ifreq *ireq,struct socket *so,
- struct proc *procp);
-
-int
-bootpc_adjust_interface(struct ifreq *ireq,struct socket *so,
- struct sockaddr_in *myaddr,
- struct sockaddr_in *netmask,
- struct sockaddr_in *gw,
- struct proc *procp);
-
-void bootpc_init(void);
-
-#ifdef BOOTP_DEBUG
-void bootpboot_p_sa(sa,ma)
- struct sockaddr *sa;
- struct sockaddr *ma;
-{
- if (!sa) {
- printf("(sockaddr *) <null>");
- return;
- }
- switch (sa->sa_family) {
- case AF_INET:
- {
- struct sockaddr_in *sin = (struct sockaddr_in *) sa;
- printf("inet %x",ntohl(sin->sin_addr.s_addr));
- if (ma) {
- struct sockaddr_in *sin = (struct sockaddr_in *) ma;
- printf(" mask %x",ntohl(sin->sin_addr.s_addr));
- }
- }
- break;
- case AF_LINK:
- {
- struct sockaddr_dl *sli = (struct sockaddr_dl *) sa;
- int i;
- printf("link %.*s ",sli->sdl_nlen,sli->sdl_data);
- for (i=0;i<sli->sdl_alen;i++) {
- if (i>0)
- printf(":");
- printf("%x",(unsigned char) sli->sdl_data[i+sli->sdl_nlen]);
- }
- }
- break;
- default:
- printf("af%d",sa->sa_family);
- }
-}
-
-void bootpboot_p_ma(ma)
- struct sockaddr *ma;
-{
- if (!ma) {
- printf("<null>");
- return;
- }
- printf("%x",*(int*)ma);
-}
-
-void bootpboot_p_rtentry(rt)
- struct rtentry *rt;
-{
- bootpboot_p_sa(rt_key(rt),rt_mask(rt));
- printf(" ");
- bootpboot_p_ma(rt->rt_genmask);
- printf(" ");
- bootpboot_p_sa(rt->rt_gateway,NULL);
- printf(" ");
- printf("flags %x",(unsigned short) rt->rt_flags);
- printf(" %d",rt->rt_rmx.rmx_expire);
- printf(" %s%d\n",rt->rt_ifp->if_name,rt->rt_ifp->if_unit);
-}
-void bootpboot_p_tree(rn)
- struct radix_node *rn;
-{
- while (rn) {
- if (rn->rn_b < 0) {
- if (rn->rn_flags & RNF_ROOT) {
- } else {
- bootpboot_p_rtentry((struct rtentry *) rn);
- }
- rn = rn->rn_dupedkey;
- } else {
- bootpboot_p_tree(rn->rn_l);
- bootpboot_p_tree(rn->rn_r);
- return;
- }
-
- }
-}
-
-void bootpboot_p_rtlist(void)
-{
- printf("Routing table:\n");
- bootpboot_p_tree(rt_tables[AF_INET]->rnh_treetop);
-}
-
-void bootpboot_p_iflist(void)
-{
- struct ifnet *ifp;
- struct ifaddr *ifa;
- printf("Interface list:\n");
- for (ifp = TAILQ_FIRST(&ifnet); ifp != 0; ifp = TAILQ_NEXT(ifp,if_link))
- {
- for (ifa = TAILQ_FIRST(&ifp->if_addrhead) ;ifa;
- ifa=TAILQ_NEXT(ifa,ifa_link))
- if (ifa->ifa_addr->sa_family == AF_INET ) {
- printf("%s%d flags %x, addr %x, bcast %x, net %x\n",
- ifp->if_name,ifp->if_unit,
- (unsigned short) ifp->if_flags,
- ntohl(((struct sockaddr_in *) ifa->ifa_addr)->sin_addr.s_addr),
- ntohl(((struct sockaddr_in *) ifa->ifa_dstaddr)->sin_addr.s_addr),
- ntohl(((struct sockaddr_in *) ifa->ifa_netmask)->sin_addr.s_addr)
- );
- }
- }
-}
-#endif
-
-int
-bootpc_call(call,reply,procp)
- struct bootp_packet *call;
- struct bootp_packet *reply; /* output */
- struct proc *procp;
-{
- struct socket *so;
- struct sockaddr_in *sin;
- struct mbuf *m, *nam;
- struct uio auio;
- struct iovec aio;
- int error, rcvflg, timo, secs, len;
-
- /* Free at end if not null. */
- nam = NULL;
-
- /*
- * Create socket and set its recieve timeout.
- */
- if ((error = socreate(AF_INET, &so, SOCK_DGRAM, 0,procp)))
- goto out;
-
- m = m_get(M_WAIT, MT_SOOPTS);
- if (m == NULL) {
- error = ENOBUFS;
- goto out;
- } else {
- struct timeval *tv;
- tv = mtod(m, struct timeval *);
- m->m_len = sizeof(*tv);
- tv->tv_sec = 1;
- tv->tv_usec = 0;
- if ((error = sosetopt(so, SOL_SOCKET, SO_RCVTIMEO, m)))
- goto out;
- }
-
- /*
- * Enable broadcast.
- */
- {
- int *on;
- m = m_get(M_WAIT, MT_SOOPTS);
- if (m == NULL) {
- error = ENOBUFS;
- goto out;
- }
- on = mtod(m, int *);
- m->m_len = sizeof(*on);
- *on = 1;
- if ((error = sosetopt(so, SOL_SOCKET, SO_BROADCAST, m)))
- goto out;
- }
-
- /*
- * Bind the local endpoint to a bootp client port.
- */
- m = m_getclr(M_WAIT, MT_SONAME);
- sin = mtod(m, struct sockaddr_in *);
- sin->sin_len = m->m_len = sizeof(*sin);
- sin->sin_family = AF_INET;
- sin->sin_addr.s_addr = INADDR_ANY;
- sin->sin_port = htons(IPPORT_BOOTPC);
- error = sobind(so, m);
- m_freem(m);
- if (error) {
- printf("bind failed\n");
- goto out;
- }
-
- /*
- * Setup socket address for the server.
- */
- nam = m_get(M_WAIT, MT_SONAME);
- if (nam == NULL) {
- error = ENOBUFS;
- goto out;
- }
- sin = mtod(nam, struct sockaddr_in *);
- sin-> sin_len = sizeof(*sin);
- sin-> sin_family = AF_INET;
- sin->sin_addr.s_addr = INADDR_BROADCAST;
- sin->sin_port = htons(IPPORT_BOOTPS);
-
- nam->m_len = sizeof(*sin);
-
- /*
- * Send it, repeatedly, until a reply is received,
- * but delay each re-send by an increasing amount.
- * If the delay hits the maximum, start complaining.
- */
- timo = 0;
- for (;;) {
- /* Send BOOTP request (or re-send). */
-
- aio.iov_base = (caddr_t) call;
- aio.iov_len = sizeof(*call);
-
- auio.uio_iov = &aio;
- auio.uio_iovcnt = 1;
- auio.uio_segflg = UIO_SYSSPACE;
- auio.uio_rw = UIO_WRITE;
- auio.uio_offset = 0;
- auio.uio_resid = sizeof(*call);
- auio.uio_procp = procp;
-
- error = sosend(so, nam, &auio, NULL, NULL, 0);
- if (error) {
- printf("bootpc_call: sosend: %d\n", error);
- goto out;
- }
-
- /* Determine new timeout. */
- if (timo < MAX_RESEND_DELAY)
- timo++;
- else
- printf("BOOTP timeout for server 0x%x\n",
- (int)ntohl(sin->sin_addr.s_addr));
-
- /*
- * Wait for up to timo seconds for a reply.
- * The socket receive timeout was set to 1 second.
- */
- secs = timo;
- while (secs > 0) {
- aio.iov_base = (caddr_t) reply;
- aio.iov_len = sizeof(*reply);
-
- auio.uio_iov = &aio;
- auio.uio_iovcnt = 1;
- auio.uio_segflg = UIO_SYSSPACE;
- auio.uio_rw = UIO_READ;
- auio.uio_offset = 0;
- auio.uio_resid = sizeof(*reply);
- auio.uio_procp = procp;
-
- rcvflg = 0;
- error = soreceive(so, NULL, &auio, NULL, NULL, &rcvflg);
- if (error == EWOULDBLOCK) {
- secs--;
- call->secs=htons(ntohs(call->secs)+1);
- continue;
- }
- if (error)
- goto out;
- len = sizeof(*reply) - auio.uio_resid;
-
- /* Do we have the required number of bytes ? */
- if (len < BOOTP_MIN_LEN)
- continue;
-
- /* Is it the right reply? */
- if (reply->op != 2)
- continue;
-
- if (reply->xid != call->xid)
- continue;
-
- if (reply->hlen != call->hlen)
- continue;
-
- if (bcmp(reply->chaddr,call->chaddr,call->hlen))
- continue;
-
- goto gotreply; /* break two levels */
-
- } /* while secs */
- } /* forever send/receive */
-
- error = ETIMEDOUT;
- goto out;
-
- gotreply:
- out:
- if (nam) m_freem(nam);
- soclose(so);
- return error;
-}
-
-int
-bootpc_fakeup_interface(struct ifreq *ireq,struct socket *so,
- struct proc *procp)
-{
- struct sockaddr_in *sin;
- int error;
- struct sockaddr_in dst;
- struct sockaddr_in gw;
- struct sockaddr_in mask;
-
- /*
- * Bring up the interface.
- *
- * Get the old interface flags and or IFF_UP into them; if
- * IFF_UP set blindly, interface selection can be clobbered.
- */
- error = ifioctl(so, SIOCGIFFLAGS, (caddr_t)ireq, procp);
- if (error)
- panic("bootpc_fakeup_interface: GIFFLAGS, error=%d", error);
- ireq->ifr_flags |= IFF_UP;
- error = ifioctl(so, SIOCSIFFLAGS, (caddr_t)ireq, procp);
- if (error)
- panic("bootpc_fakeup_interface: SIFFLAGS, error=%d", error);
-
- /*
- * Do enough of ifconfig(8) so that the chosen interface
- * can talk to the servers. (just set the address)
- */
-
- /* addr is 0.0.0.0 */
-
- sin = (struct sockaddr_in *)&ireq->ifr_addr;
- bzero((caddr_t)sin, sizeof(*sin));
- sin->sin_len = sizeof(*sin);
- sin->sin_family = AF_INET;
- sin->sin_addr.s_addr = INADDR_ANY;
- error = ifioctl(so, SIOCSIFADDR, (caddr_t)ireq, procp);
- if (error)
- panic("bootpc_fakeup_interface: set if addr, error=%d", error);
-
- /* netmask is 0.0.0.0 */
-
- sin = (struct sockaddr_in *)&ireq->ifr_addr;
- bzero((caddr_t)sin, sizeof(*sin));
- sin->sin_len = sizeof(*sin);
- sin->sin_family = AF_INET;
- sin->sin_addr.s_addr = INADDR_ANY;
- error = ifioctl(so, SIOCSIFNETMASK, (caddr_t)ireq, procp);
- if (error)
- panic("bootpc_fakeup_interface: set if net addr, error=%d", error);
-
- /* Broadcast is 255.255.255.255 */
-
- sin = (struct sockaddr_in *)&ireq->ifr_addr;
- bzero((caddr_t)sin, sizeof(*sin));
- sin->sin_len = sizeof(*sin);
- sin->sin_family = AF_INET;
- sin->sin_addr.s_addr = INADDR_BROADCAST;
- error = ifioctl(so, SIOCSIFBRDADDR, (caddr_t)ireq, procp);
- if (error)
- panic("bootpc_fakeup_interface: set if broadcast addr, error=%d", error);
-
- /* Add default route to 0.0.0.0 so we can send data */
-
- bzero((caddr_t) &dst, sizeof(dst));
- dst.sin_len=sizeof(dst);
- dst.sin_family=AF_INET;
- dst.sin_addr.s_addr = htonl(0);
-
- bzero((caddr_t) &gw, sizeof(gw));
- gw.sin_len=sizeof(gw);
- gw.sin_family=AF_INET;
- gw.sin_addr.s_addr = htonl(0x0);
-
- bzero((caddr_t) &mask, sizeof(mask));
- mask.sin_len=sizeof(mask);
- mask.sin_family=AF_INET;
- mask.sin_addr.s_addr = htonl(0);
-
- error = rtrequest(RTM_ADD,
- (struct sockaddr *) &dst,
- (struct sockaddr *) &gw,
- (struct sockaddr *) &mask,
- RTF_UP | RTF_STATIC
- , NULL);
- if (error)
- printf("bootpc_fakeup_interface: add default route, error=%d\n", error);
- return error;
-}
-
-int
-bootpc_adjust_interface(struct ifreq *ireq,struct socket *so,
- struct sockaddr_in *myaddr,
- struct sockaddr_in *netmask,
- struct sockaddr_in *gw,
- struct proc *procp)
-{
- int error;
- struct sockaddr_in oldgw;
- struct sockaddr_in olddst;
- struct sockaddr_in oldmask;
- struct sockaddr_in *sin;
-
- /* Remove old default route to 0.0.0.0 */
-
- bzero((caddr_t) &olddst, sizeof(olddst));
- olddst.sin_len=sizeof(olddst);
- olddst.sin_family=AF_INET;
- olddst.sin_addr.s_addr = INADDR_ANY;
-
- bzero((caddr_t) &oldgw, sizeof(oldgw));
- oldgw.sin_len=sizeof(oldgw);
- oldgw.sin_family=AF_INET;
- oldgw.sin_addr.s_addr = INADDR_ANY;
-
- bzero((caddr_t) &oldmask, sizeof(oldmask));
- oldmask.sin_len=sizeof(oldmask);
- oldmask.sin_family=AF_INET;
- oldmask.sin_addr.s_addr = INADDR_ANY;
-
- error = rtrequest(RTM_DELETE,
- (struct sockaddr *) &olddst,
- (struct sockaddr *) &oldgw,
- (struct sockaddr *) &oldmask,
- (RTF_UP | RTF_STATIC), NULL);
- if (error) {
- printf("nfs_boot: del default route, error=%d\n", error);
- return error;
- }
-
- /*
- * Do enough of ifconfig(8) so that the chosen interface
- * can talk to the servers. (just set the address)
- */
- bcopy(netmask,&ireq->ifr_addr,sizeof(*netmask));
- error = ifioctl(so, SIOCSIFNETMASK, (caddr_t)ireq, procp);
- if (error)
- panic("nfs_boot: set if netmask, error=%d", error);
-
- /* Broadcast is with host part of IP address all 1's */
-
- sin = (struct sockaddr_in *)&ireq->ifr_addr;
- bzero((caddr_t)sin, sizeof(*sin));
- sin->sin_len = sizeof(*sin);
- sin->sin_family = AF_INET;
- sin->sin_addr.s_addr = myaddr->sin_addr.s_addr | ~ netmask->sin_addr.s_addr;
- error = ifioctl(so, SIOCSIFBRDADDR, (caddr_t)ireq, procp);
- if (error)
- panic("bootpc_call: set if broadcast addr, error=%d", error);
-
- bcopy(myaddr,&ireq->ifr_addr,sizeof(*myaddr));
- error = ifioctl(so, SIOCSIFADDR, (caddr_t)ireq, procp);
- if (error)
- panic("nfs_boot: set if addr, error=%d", error);
-
- /* Add new default route */
-
- error = rtrequest(RTM_ADD,
- (struct sockaddr *) &olddst,
- (struct sockaddr *) gw,
- (struct sockaddr *) &oldmask,
- (RTF_UP | RTF_GATEWAY | RTF_STATIC), NULL);
- if (error) {
- printf("nfs_boot: add net route, error=%d\n", error);
- return error;
- }
-
- return 0;
-}
-
-#if !defined(__rtems__)
-static int setfs(addr, path, p)
- struct sockaddr_in *addr;
- char *path;
- char *p;
-{
- unsigned ip = 0;
- int val;
-
- if (((val = getdec(&p)) < 0) || (val > 255)) return(0);
- ip = val << 24;
- if (*p != '.') return(0);
- p++;
- if (((val = getdec(&p)) < 0) || (val > 255)) return(0);
- ip |= (val << 16);
- if (*p != '.') return(0);
- p++;
- if (((val = getdec(&p)) < 0) || (val > 255)) return(0);
- ip |= (val << 8);
- if (*p != '.') return(0);
- p++;
- if (((val = getdec(&p)) < 0) || (val > 255)) return(0);
- ip |= val;
- if (*p != ':') return(0);
- p++;
-
- addr->sin_addr.s_addr = htonl(ip);
- addr->sin_len = sizeof(struct sockaddr_in);
- addr->sin_family = AF_INET;
-
- strncpy(path,p,MNAMELEN-1);
- return(1);
-}
-#endif
-
-static int getdec(ptr)
- char **ptr;
-{
- char *p = *ptr;
- int ret=0;
- if ((*p < '0') || (*p > '9')) return(-1);
- while ((*p >= '0') && (*p <= '9')) {
- ret = ret*10 + (*p - '0');
- p++;
- }
- *ptr = p;
- return(ret);
-}
-
-static char *substr(a,b)
- char *a,*b;
-{
- char *loc1;
- char *loc2;
-
- while (*a != '\0') {
- loc1 = a;
- loc2 = b;
- while (*loc1 == *loc2++) {
- if (*loc1 == '\0') return (0);
- loc1++;
- if (*loc2 == '\0') return (loc1);
- }
- a++;
- }
- return (0);
-}
-
-static void printip(char *prefix,struct in_addr addr)
-{
- unsigned int ip;
-
- ip = ntohl(addr.s_addr);
-
- printf("%s is %d.%d.%d.%d\n",prefix,
- ip >> 24, (ip >> 16) & 255 ,(ip >> 8) & 255 ,ip & 255 );
-}
-
-static int dhcpOptionOverload = 0;
-static char dhcp_gotgw = 0;
-static char dhcp_gotnetmask = 0;
-static char dhcp_gotserver = 0;
-static char dhcp_gotlogserver = 0;
-static struct sockaddr_in dhcp_netmask;
-static struct sockaddr_in dhcp_gw;
-
-static void
-processOptions (unsigned char *optbuf, int optbufSize)
-{
- int j = 0;
- int len;
- int code, ncode;
- char *p;
-
- ncode = optbuf[0];
- while (j < optbufSize) {
- code = optbuf[j] = ncode;
- if (code == 255)
- return;
- if (code == 0) {
- j++;
- continue;
- }
- len = optbuf[j+1];
- j += 2;
- if ((len + j) >= optbufSize) {
- printf ("Truncated field for code %d", code);
- return;
- }
- ncode = optbuf[j+len];
- optbuf[j+len] = '\0';
- p = &optbuf[j];
- j += len;
-
- /*
- * Process the option
- */
- switch (code) {
- case 1:
- /* Subnet mask */
- if (len!=4)
- panic("bootpc: subnet mask len is %d",len);
- bcopy (p, &dhcp_netmask.sin_addr, 4);
- dhcp_gotnetmask = 1;
- break;
-
- case 2:
- /* Time offset */
- if (len!=4)
- panic("bootpc: time offset len is %d",len);
- bcopy (p, &rtems_bsdnet_timeoffset, 4);
- rtems_bsdnet_timeoffset = ntohl (rtems_bsdnet_timeoffset);
- break;
-
- case 3:
- /* Routers */
- if (len % 4)
- panic ("bootpc: Router Len is %d", len);
- if (len > 0) {
- bcopy(p, &dhcp_gw.sin_addr, 4);
- dhcp_gotgw = 1;
- }
- break;
-
- case 42:
- /* NTP servers */
- if (len % 4)
- panic ("bootpc: time server Len is %d", len);
- {
- int tlen = 0;
- while ((tlen < len) &&
- (rtems_bsdnet_ntpserver_count < sizeof rtems_bsdnet_config.ntp_server /
- sizeof rtems_bsdnet_config.ntp_server[0])) {
- bcopy (p+tlen,
- &rtems_bsdnet_ntpserver[rtems_bsdnet_ntpserver_count],
- 4);
- printip("Time Server",
- rtems_bsdnet_ntpserver[rtems_bsdnet_ntpserver_count]);
- rtems_bsdnet_ntpserver_count++;
- tlen += 4;
- }
- }
- break;
-
- case 6:
- /* Domain Name servers */
- if (len % 4)
- panic ("bootpc: DNS Len is %d", len);
- {
- int dlen = 0;
- while ((dlen < len) &&
- (rtems_bsdnet_nameserver_count < sizeof rtems_bsdnet_config.name_server /
- sizeof rtems_bsdnet_config.name_server[0])) {
- bcopy (p+dlen,
- &rtems_bsdnet_nameserver[rtems_bsdnet_nameserver_count],
- 4);
- printip("Domain Name Server",
- rtems_bsdnet_nameserver[rtems_bsdnet_nameserver_count]);
- rtems_bsdnet_nameserver_count++;
- dlen += 4;
- }
- }
- break;
-
- case 12:
- /* Host name */
- if (len>=MAXHOSTNAMELEN)
- panic ("bootpc: hostname >=%d bytes", MAXHOSTNAMELEN);
- if (sethostname (p, len) < 0)
- panic("Can't set host name");
- printf("Hostname is %s\n", p);
- break;
-
- case 7:
- /* Log servers */
- if (len % 4)
- panic ("bootpc: Log server Len is %d", len);
- if (len > 0) {
- bcopy(p, &rtems_bsdnet_log_host_address, 4);
- dhcp_gotlogserver = 1;
- }
- break;
-
- case 15:
- /* Domain name */
- if (p[0]) {
- rtems_bsdnet_domain_name = strdup (p);
- printf("Domain name is %s\n", rtems_bsdnet_domain_name);
- }
- break;
-
- case 16: /* Swap server IP address. unused */
- break;
-
- case 52:
- /* DHCP option override */
- if (len != 1)
- panic ("bootpc: DHCP option overload len is %d", len);
- dhcpOptionOverload = p[0];
- break;
-
- case 128: /* Site-specific option for DHCP servers that
- * a) don't supply tag 54
- * and
- * b) don't supply the server address in siaddr
- * For example, on Solaris 2.6 in.dhcpd, include in the dhcptab:
- * Bootsrv s Site,128,IP,1,1
- * and use that symbol in the macro that defines the client:
- * Bootsrv=<tftp-server-ip-address>
- */
- case 54:
- /* DHCP server */
- if (len != 4)
- panic ("bootpc: DHCP server len is %d", len);
- bcopy(p, &rtems_bsdnet_bootp_server_address, 4);
- dhcp_gotserver = 1;
- break;
-
- case 66:
- /* DHCP server name option */
- if (p[0])
- rtems_bsdnet_bootp_server_name = strdup (p);
- break;
-
- case 67:
- /* DHCP bootfile option */
- if (p[0])
- rtems_bsdnet_bootp_boot_file_name = strdup (p);
- break;
-
- default:
- printf ("Ignoring BOOTP/DHCP option code %d\n", code);
- break;
- }
- }
-}
-
-#define EALEN 6
-
-void
-bootpc_init(void)
-{
- struct bootp_packet call;
- struct bootp_packet reply;
- static u_int32_t xid = ~0xFF;
-
- struct ifreq ireq;
- struct ifnet *ifp;
- struct socket *so;
- int j;
- int error;
- struct sockaddr_in myaddr;
- struct ifaddr *ifa;
- struct sockaddr_dl *sdl = NULL;
- char *delim;
- struct proc *procp = NULL;
-
- /*
- * If already filled in, don't touch it here
- */
- if (nfs_diskless_valid)
- return;
-
- /*
- * Find a network interface.
- */
- for (ifp = ifnet; ifp != 0; ifp = ifp->if_next)
- if ((ifp->if_flags &
- (IFF_LOOPBACK|IFF_POINTOPOINT)) == 0)
- break;
- if (ifp == NULL)
- panic("bootpc_init: no suitable interface");
- bzero(&ireq,sizeof(ireq));
- sprintf(ireq.ifr_name, "%s%d", ifp->if_name,ifp->if_unit);
- printf("bootpc_init: using network interface '%s'\n",
- ireq.ifr_name);
-
- if ((error = socreate(AF_INET, &so, SOCK_DGRAM, 0,procp)) != 0)
- panic("nfs_boot: socreate, error=%d", error);
-
- bootpc_fakeup_interface(&ireq,so,procp);
-
- printf("Bootpc testing starting\n");
-
- /* Get HW address */
-
- for (ifa = ifp->if_addrlist;ifa; ifa = ifa->ifa_next)
- if (ifa->ifa_addr->sa_family == AF_LINK &&
- (sdl = ((struct sockaddr_dl *) ifa->ifa_addr)) &&
- sdl->sdl_type == IFT_ETHER)
- break;
-
- if (!sdl)
- panic("bootpc: Unable to find HW address");
- if (sdl->sdl_alen != EALEN )
- panic("bootpc: HW address len is %d, expected value is %d",
- sdl->sdl_alen,EALEN);
-
- printf("bootpc hw address is ");
- delim="";
- for (j=0;j<sdl->sdl_alen;j++) {
- printf("%s%x",delim,((unsigned char *)LLADDR(sdl))[j]);
- delim=":";
- }
- printf("\n");
-
-#if 0
- bootpboot_p_iflist();
- bootpboot_p_rtlist();
-#endif
-
- bzero((caddr_t) &call, sizeof(call));
-
- /* bootpc part */
- call.op = 1; /* BOOTREQUEST */
- call.htype= 1; /* 10mb ethernet */
- call.hlen=sdl->sdl_alen; /* Hardware address length */
- call.hops=0;
- xid++;
- call.xid = txdr_unsigned(xid);
- bcopy(LLADDR(sdl),&call.chaddr,sdl->sdl_alen);
-
- call.vend[0]=99;
- call.vend[1]=130;
- call.vend[2]=83;
- call.vend[3]=99;
- call.vend[4]=255;
-
- call.secs = 0;
- call.flags = htons(0x8000); /* We need an broadcast answer */
-
- error = bootpc_call(&call,&reply,procp);
-
- if (error)
- panic("BOOTP call failed -- error %d", error);
-
- /*
- * Initialize network address structures
- */
- bzero(&myaddr,sizeof(myaddr));
- bzero(&dhcp_netmask,sizeof(dhcp_netmask));
- bzero(&dhcp_gw,sizeof(dhcp_gw));
- myaddr.sin_len = sizeof(myaddr);
- myaddr.sin_family = AF_INET;
- dhcp_netmask.sin_len = sizeof(dhcp_netmask);
- dhcp_netmask.sin_family = AF_INET;
- dhcp_gw.sin_len = sizeof(dhcp_gw);
- dhcp_gw.sin_family= AF_INET;
-
- /*
- * Set our address
- */
- myaddr.sin_addr = reply.yiaddr;
- printip("My ip address",myaddr.sin_addr);
-
- /*
- * Process BOOTP/DHCP options
- */
- if (reply.vend[0]==99 && reply.vend[1]==130 &&
- reply.vend[2]==83 && reply.vend[3]==99) {
- processOptions (&reply.vend[4], sizeof(reply.vend) - 4);
- }
- if (dhcpOptionOverload & 1) {
- processOptions (reply.file, sizeof reply.file);
- }
- else {
- if (reply.file[0])
- rtems_bsdnet_bootp_boot_file_name = strdup (reply.file);
- }
- if (dhcpOptionOverload & 2) {
- processOptions (reply.sname, sizeof reply.sname);
- }
- else {
- if (reply.sname[0])
- rtems_bsdnet_bootp_server_name = strdup (reply.sname);
- }
- if (rtems_bsdnet_bootp_server_name)
- printf ("Server name is %s\n", rtems_bsdnet_bootp_server_name);
- if (rtems_bsdnet_bootp_boot_file_name)
- printf ("Boot file is %s\n", rtems_bsdnet_bootp_boot_file_name);
-
- /*
- * Use defaults if values were not supplied by BOOTP/DHCP options
- */
- if (!dhcp_gotnetmask) {
- if (IN_CLASSA(ntohl(myaddr.sin_addr.s_addr)))
- dhcp_netmask.sin_addr.s_addr = htonl(IN_CLASSA_NET);
- else if (IN_CLASSB(ntohl(myaddr.sin_addr.s_addr)))
- dhcp_netmask.sin_addr.s_addr = htonl(IN_CLASSB_NET);
- else
- dhcp_netmask.sin_addr.s_addr = htonl(IN_CLASSC_NET);
- }
- printip ("Subnet mask", dhcp_netmask.sin_addr);
- if (!dhcp_gotserver)
- rtems_bsdnet_bootp_server_address = reply.siaddr;
- printip ("Server ip address" ,rtems_bsdnet_bootp_server_address);
- if (!dhcp_gotgw)
- dhcp_gw.sin_addr = reply.giaddr;
- printip ("Gateway ip address", dhcp_gw.sin_addr);
- if (!dhcp_gotlogserver)
- rtems_bsdnet_log_host_address = rtems_bsdnet_bootp_server_address;
- printip ("Log server ip address", rtems_bsdnet_log_host_address);
-
- /*
- * Configure the interface with the new settings
- */
- error = bootpc_adjust_interface(&ireq,so,
- &myaddr,&dhcp_netmask,&dhcp_gw,procp);
- soclose(so);
-}
diff --git a/c/src/exec/libnetworking/nfs/krpc.h b/c/src/exec/libnetworking/nfs/krpc.h
deleted file mode 100644
index 8a21392657..0000000000
--- a/c/src/exec/libnetworking/nfs/krpc.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* $NetBSD: krpc.h,v 1.4 1995/12/19 23:07:11 cgd Exp $ */
-/* $Id$ */
-
-#include <sys/cdefs.h>
-
-int krpc_call __P((struct sockaddr_in *sin,
- u_int prog, u_int vers, u_int func,
- struct mbuf **data, struct mbuf **from, struct proc *procp));
-
-int krpc_portmap __P((struct sockaddr_in *sin,
- u_int prog, u_int vers, u_int16_t *portp, struct proc *procp));
-
-struct mbuf *xdr_string_encode __P((char *str, int len));
-
-/*
- * RPC definitions for the portmapper
- */
-#define PMAPPORT 111
-#define PMAPPROG 100000
-#define PMAPVERS 2
-#define PMAPPROC_NULL 0
-#define PMAPPROC_SET 1
-#define PMAPPROC_UNSET 2
-#define PMAPPROC_GETPORT 3
-#define PMAPPROC_DUMP 4
-#define PMAPPROC_CALLIT 5
diff --git a/c/src/exec/libnetworking/nfs/nfs.h b/c/src/exec/libnetworking/nfs/nfs.h
deleted file mode 100644
index 68f206e213..0000000000
--- a/c/src/exec/libnetworking/nfs/nfs.h
+++ /dev/null
@@ -1,620 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Rick Macklem at The University of Guelph.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)nfs.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _NFS_NFS_H_
-#define _NFS_NFS_H_
-
-#include <nfs/rpcv2.h>
-
-/*
- * Tunable constants for nfs
- */
-
-#define NFS_MAXIOVEC 34
-#define NFS_TICKINTVL 5 /* Desired time for a tick (msec) */
-#define NFS_HZ (hz / nfs_ticks) /* Ticks/sec */
-#define NFS_TIMEO (1 * NFS_HZ) /* Default timeout = 1 second */
-#define NFS_MINTIMEO (1 * NFS_HZ) /* Min timeout to use */
-#define NFS_MAXTIMEO (60 * NFS_HZ) /* Max timeout to backoff to */
-#define NFS_MINIDEMTIMEO (5 * NFS_HZ) /* Min timeout for non-idempotent ops*/
-#define NFS_MAXREXMIT 100 /* Stop counting after this many */
-#define NFS_MAXWINDOW 1024 /* Max number of outstanding requests */
-#define NFS_RETRANS 10 /* Num of retrans for soft mounts */
-#define NFS_MAXGRPS 16 /* Max. size of groups list */
-#ifndef NFS_MINATTRTIMO
-#define NFS_MINATTRTIMO 5 /* Attribute cache timeout in sec */
-#endif
-#ifndef NFS_MAXATTRTIMO
-#define NFS_MAXATTRTIMO 60
-#endif
-#define NFS_WSIZE 8192 /* Def. write data size <= 8192 */
-#define NFS_RSIZE 8192 /* Def. read data size <= 8192 */
-#define NFS_READDIRSIZE 8192 /* Def. readdir size */
-#define NFS_DEFRAHEAD 1 /* Def. read ahead # blocks */
-#define NFS_MAXRAHEAD 4 /* Max. read ahead # blocks */
-#define NFS_MAXUIDHASH 64 /* Max. # of hashed uid entries/mp */
-#define NFS_MAXASYNCDAEMON 20 /* Max. number async_daemons runnable */
-#define NFS_MAXGATHERDELAY 100 /* Max. write gather delay (msec) */
-#ifndef NFS_GATHERDELAY
-#define NFS_GATHERDELAY 10 /* Default write gather delay (msec) */
-#endif
-#define NFS_DIRBLKSIZ 4096 /* Must be a multiple of DIRBLKSIZ */
-
-/*
- * Oddballs
- */
-#define NMOD(a) ((a) % nfs_asyncdaemons)
-#define NFS_CMPFH(n, f, s) \
- ((n)->n_fhsize == (s) && !bcmp((caddr_t)(n)->n_fhp, (caddr_t)(f), (s)))
-#define NFS_ISV3(v) (VFSTONFS((v)->v_mount)->nm_flag & NFSMNT_NFSV3)
-#define NFS_SRVMAXDATA(n) \
- (((n)->nd_flag & ND_NFSV3) ? (((n)->nd_nam2) ? \
- NFS_MAXDGRAMDATA : NFS_MAXDATA) : NFS_V2MAXDATA)
-
-/*
- * XXX
- * sys/buf.h should be edited to change B_APPENDWRITE --> B_NEEDCOMMIT, but
- * until then...
- * Same goes for sys/malloc.h, which needs M_NFSDIROFF,
- * M_NFSRVDESC and M_NFSBIGFH added.
- * The VA_EXCLUSIVE flag should be added for va_vaflags and set for an
- * exclusive create.
- * The B_INVAFTERWRITE flag should be set to whatever is required by the
- * buffer cache code to say "Invalidate the block after it is written back".
- */
-#ifndef B_NEEDCOMMIT
-#define B_NEEDCOMMIT B_APPENDWRITE
-#endif
-#ifndef M_NFSRVDESC
-#define M_NFSRVDESC M_TEMP
-#endif
-#ifndef M_NFSDIROFF
-#define M_NFSDIROFF M_TEMP
-#endif
-#ifndef M_NFSBIGFH
-#define M_NFSBIGFH M_TEMP
-#endif
-#ifndef VA_EXCLUSIVE
-#define VA_EXCLUSIVE 0
-#endif
-#ifdef __FreeBSD__
-#define B_INVAFTERWRITE B_NOCACHE
-#else
-#define B_INVAFTERWRITE B_INVAL
-#endif
-
-/*
- * These ifdefs try to handle the differences between the various 4.4BSD-Lite
- * based vfs interfaces.
- * btw: NetBSD-current does have a VOP_LEASDE(), but I don't know how to
- * differentiate between NetBSD-1.0 and NetBSD-current, so..
- * I also don't know about BSDi's 2.0 release.
- */
-#if !defined(HAS_VOPLEASE) && !defined(__FreeBSD__) && !defined(__NetBSD__)
-#define HAS_VOPLEASE 1
-#endif
-#if !defined(HAS_VOPREVOKE) && !defined(__FreeBSD__) && !defined(__NetBSD__)
-#define HAS_VOPREVOKE 1
-#endif
-
-/*
- * The IO_METASYNC flag should be implemented for local file systems.
- * (Until then, it is nothin at all.)
- */
-#ifndef IO_METASYNC
-#define IO_METASYNC 0
-#endif
-
-/*
- * Set the attribute timeout based on how recently the file has been modified.
- */
-#define NFS_ATTRTIMEO(np) \
- ((((np)->n_flag & NMODIFIED) || \
- (time.tv_sec - (np)->n_mtime) / 10 < NFS_MINATTRTIMO) ? NFS_MINATTRTIMO : \
- ((time.tv_sec - (np)->n_mtime) / 10 > NFS_MAXATTRTIMO ? NFS_MAXATTRTIMO : \
- (time.tv_sec - (np)->n_mtime) / 10))
-
-/*
- * Expected allocation sizes for major data structures. If the actual size
- * of the structure exceeds these sizes, then malloc() will be allocating
- * almost twice the memory required. This is used in nfs_init() to warn
- * the sysadmin that the size of a structure should be reduced.
- * (These sizes are always a power of 2. If the kernel malloc() changes
- * to one that does not allocate space in powers of 2 size, then this all
- * becomes bunk!)
- */
-#define NFS_NODEALLOC 256
-#define NFS_MNTALLOC 512
-#define NFS_SVCALLOC 256
-#define NFS_UIDALLOC 128
-
-/*
- * Structures for the nfssvc(2) syscall. Not that anyone but nfsd and mount_nfs
- * should ever try and use it.
- */
-struct nfsd_args {
- int sock; /* Socket to serve */
- caddr_t name; /* Client address for connection based sockets */
- int namelen; /* Length of name */
-};
-
-struct nfsd_srvargs {
- struct nfsd *nsd_nfsd; /* Pointer to in kernel nfsd struct */
- uid_t nsd_uid; /* Effective uid mapped to cred */
- u_long nsd_haddr; /* Ip address of client */
- struct ucred nsd_cr; /* Cred. uid maps to */
- int nsd_authlen; /* Length of auth string (ret) */
- u_char *nsd_authstr; /* Auth string (ret) */
- int nsd_verflen; /* and the verfier */
- u_char *nsd_verfstr;
- struct timeval nsd_timestamp; /* timestamp from verifier */
- u_long nsd_ttl; /* credential ttl (sec) */
- NFSKERBKEY_T nsd_key; /* Session key */
-};
-
-struct nfsd_cargs {
- char *ncd_dirp; /* Mount dir path */
- uid_t ncd_authuid; /* Effective uid */
- int ncd_authtype; /* Type of authenticator */
- int ncd_authlen; /* Length of authenticator string */
- u_char *ncd_authstr; /* Authenticator string */
- int ncd_verflen; /* and the verifier */
- u_char *ncd_verfstr;
- NFSKERBKEY_T ncd_key; /* Session key */
-};
-
-/*
- * Stats structure
- */
-struct nfsstats {
- int attrcache_hits;
- int attrcache_misses;
- int lookupcache_hits;
- int lookupcache_misses;
- int direofcache_hits;
- int direofcache_misses;
- int biocache_reads;
- int read_bios;
- int read_physios;
- int biocache_writes;
- int write_bios;
- int write_physios;
- int biocache_readlinks;
- int readlink_bios;
- int biocache_readdirs;
- int readdir_bios;
- int rpccnt[NFS_NPROCS];
- int rpcretries;
- int srvrpccnt[NFS_NPROCS];
- int srvrpc_errs;
- int srv_errs;
- int rpcrequests;
- int rpctimeouts;
- int rpcunexpected;
- int rpcinvalid;
- int srvcache_inproghits;
- int srvcache_idemdonehits;
- int srvcache_nonidemdonehits;
- int srvcache_misses;
- int srvnqnfs_leases;
- int srvnqnfs_maxleases;
- int srvnqnfs_getleases;
- int srvvop_writes;
-};
-
-/*
- * Flags for nfssvc() system call.
- */
-#define NFSSVC_BIOD 0x002
-#define NFSSVC_NFSD 0x004
-#define NFSSVC_ADDSOCK 0x008
-#define NFSSVC_AUTHIN 0x010
-#define NFSSVC_GOTAUTH 0x040
-#define NFSSVC_AUTHINFAIL 0x080
-#define NFSSVC_MNTD 0x100
-
-/*
- * fs.nfs sysctl(3) identifiers
- */
-#define NFS_NFSSTATS 1 /* struct: struct nfsstats */
-#define NFS_NFSPRIVPORT 2 /* int: prohibit nfs to resvports */
-
-#define FS_NFS_NAMES { \
- { 0, 0 }, \
- { "nfsstats", CTLTYPE_STRUCT }, \
- { "nfsprivport", CTLTYPE_INT }, \
-}
-
-/*
- * The set of signals the interrupt an I/O in progress for NFSMNT_INT mounts.
- * What should be in this set is open to debate, but I believe that since
- * I/O system calls on ufs are never interrupted by signals the set should
- * be minimal. My reasoning is that many current programs that use signals
- * such as SIGALRM will not expect file I/O system calls to be interrupted
- * by them and break.
- */
-#if defined(KERNEL) || defined(_KERNEL)
-
-struct uio; struct buf; struct vattr; struct nameidata; /* XXX */
-
-#define NFSINT_SIGMASK (sigmask(SIGINT)|sigmask(SIGTERM)|sigmask(SIGKILL)| \
- sigmask(SIGHUP)|sigmask(SIGQUIT))
-
-/*
- * Socket errors ignored for connectionless sockets??
- * For now, ignore them all
- */
-#define NFSIGNORE_SOERROR(s, e) \
- ((e) != EINTR && (e) != ERESTART && (e) != EWOULDBLOCK && \
- ((s) & PR_CONNREQUIRED) == 0)
-
-/*
- * Nfs outstanding request list element
- */
-struct nfsreq {
- TAILQ_ENTRY(nfsreq) r_chain;
- struct mbuf *r_mreq;
- struct mbuf *r_mrep;
- struct mbuf *r_md;
- caddr_t r_dpos;
- struct nfsmount *r_nmp;
- struct vnode *r_vp;
- u_long r_xid;
- int r_flags; /* flags on request, see below */
- int r_retry; /* max retransmission count */
- int r_rexmit; /* current retrans count */
- int r_timer; /* tick counter on reply */
- int r_procnum; /* NFS procedure number */
- int r_rtt; /* RTT for rpc */
- struct proc *r_procp; /* Proc that did I/O system call */
-};
-
-/*
- * Queue head for nfsreq's
- */
-extern TAILQ_HEAD(nfs_reqq, nfsreq) nfs_reqq;
-
-/* Flag values for r_flags */
-#define R_TIMING 0x01 /* timing request (in mntp) */
-#define R_SENT 0x02 /* request has been sent */
-#define R_SOFTTERM 0x04 /* soft mnt, too many retries */
-#define R_INTR 0x08 /* intr mnt, signal pending */
-#define R_SOCKERR 0x10 /* Fatal error on socket */
-#define R_TPRINTFMSG 0x20 /* Did a tprintf msg. */
-#define R_MUSTRESEND 0x40 /* Must resend request */
-#define R_GETONEREP 0x80 /* Probe for one reply only */
-
-/*
- * A list of nfssvc_sock structures is maintained with all the sockets
- * that require service by the nfsd.
- * The nfsuid structs hang off of the nfssvc_sock structs in both lru
- * and uid hash lists.
- */
-#ifndef NFS_UIDHASHSIZ
-#define NFS_UIDHASHSIZ 29 /* Tune the size of nfssvc_sock with this */
-#endif
-#define NUIDHASH(sock, uid) \
- (&(sock)->ns_uidhashtbl[(uid) % NFS_UIDHASHSIZ])
-#ifndef NFS_WDELAYHASHSIZ
-#define NFS_WDELAYHASHSIZ 16 /* and with this */
-#endif
-#define NWDELAYHASH(sock, f) \
- (&(sock)->ns_wdelayhashtbl[(*((u_long *)(f))) % NFS_WDELAYHASHSIZ])
-#ifndef NFS_MUIDHASHSIZ
-#define NFS_MUIDHASHSIZ 63 /* Tune the size of nfsmount with this */
-#endif
-#define NMUIDHASH(nmp, uid) \
- (&(nmp)->nm_uidhashtbl[(uid) % NFS_MUIDHASHSIZ])
-#define NFSNOHASH(fhsum) \
- (&nfsnodehashtbl[(fhsum) & nfsnodehash])
-
-/*
- * Network address hash list element
- */
-union nethostaddr {
- u_long had_inetaddr;
- struct mbuf *had_nam;
-};
-
-struct nfsuid {
- TAILQ_ENTRY(nfsuid) nu_lru; /* LRU chain */
- LIST_ENTRY(nfsuid) nu_hash; /* Hash list */
- int nu_flag; /* Flags */
- union nethostaddr nu_haddr; /* Host addr. for dgram sockets */
- struct ucred nu_cr; /* Cred uid mapped to */
- int nu_expire; /* Expiry time (sec) */
- struct timeval nu_timestamp; /* Kerb. timestamp */
- u_long nu_nickname; /* Nickname on server */
- NFSKERBKEY_T nu_key; /* and session key */
-};
-
-#define nu_inetaddr nu_haddr.had_inetaddr
-#define nu_nam nu_haddr.had_nam
-/* Bits for nu_flag */
-#define NU_INETADDR 0x1
-#define NU_NAM 0x2
-#define NU_NETFAM(u) (((u)->nu_flag & NU_INETADDR) ? AF_INET : AF_ISO)
-
-struct nfssvc_sock {
- TAILQ_ENTRY(nfssvc_sock) ns_chain; /* List of all nfssvc_sock's */
- TAILQ_HEAD(, nfsuid) ns_uidlruhead;
- struct file *ns_fp;
- struct socket *ns_so;
- struct mbuf *ns_nam;
- struct mbuf *ns_raw;
- struct mbuf *ns_rawend;
- struct mbuf *ns_rec;
- struct mbuf *ns_recend;
- struct mbuf *ns_frag;
- int ns_flag;
- int ns_solock;
- int ns_cc;
- int ns_reclen;
- int ns_numuids;
- u_long ns_sref;
- LIST_HEAD(, nfsrv_descript) ns_tq; /* Write gather lists */
- LIST_HEAD(, nfsuid) ns_uidhashtbl[NFS_UIDHASHSIZ];
- LIST_HEAD(nfsrvw_delayhash, nfsrv_descript) ns_wdelayhashtbl[NFS_WDELAYHASHSIZ];
-};
-
-/* Bits for "ns_flag" */
-#define SLP_VALID 0x01
-#define SLP_DOREC 0x02
-#define SLP_NEEDQ 0x04
-#define SLP_DISCONN 0x08
-#define SLP_GETSTREAM 0x10
-#define SLP_LASTFRAG 0x20
-#define SLP_ALLFLAGS 0xff
-
-extern TAILQ_HEAD(nfssvc_sockhead, nfssvc_sock) nfssvc_sockhead;
-extern int nfssvc_sockhead_flag;
-#define SLP_INIT 0x01
-#define SLP_WANTINIT 0x02
-
-/*
- * One of these structures is allocated for each nfsd.
- */
-struct nfsd {
- TAILQ_ENTRY(nfsd) nfsd_chain; /* List of all nfsd's */
- int nfsd_flag; /* NFSD_ flags */
- struct nfssvc_sock *nfsd_slp; /* Current socket */
- int nfsd_authlen; /* Authenticator len */
- u_char nfsd_authstr[RPCAUTH_MAXSIZ]; /* Authenticator data */
- int nfsd_verflen; /* and the Verifier */
- u_char nfsd_verfstr[RPCVERF_MAXSIZ];
- struct proc *nfsd_procp; /* Proc ptr */
- struct nfsrv_descript *nfsd_nd; /* Associated nfsrv_descript */
-};
-
-/* Bits for "nfsd_flag" */
-#define NFSD_WAITING 0x01
-#define NFSD_REQINPROG 0x02
-#define NFSD_NEEDAUTH 0x04
-#define NFSD_AUTHFAIL 0x08
-
-/*
- * This structure is used by the server for describing each request.
- * Some fields are used only when write request gathering is performed.
- */
-struct nfsrv_descript {
- u_quad_t nd_time; /* Write deadline (usec) */
- off_t nd_off; /* Start byte offset */
- off_t nd_eoff; /* and end byte offset */
- LIST_ENTRY(nfsrv_descript) nd_hash; /* Hash list */
- LIST_ENTRY(nfsrv_descript) nd_tq; /* and timer list */
- LIST_HEAD(,nfsrv_descript) nd_coalesce; /* coalesced writes */
- struct mbuf *nd_mrep; /* Request mbuf list */
- struct mbuf *nd_md; /* Current dissect mbuf */
- struct mbuf *nd_mreq; /* Reply mbuf list */
- struct mbuf *nd_nam; /* and socket addr */
- struct mbuf *nd_nam2; /* return socket addr */
- caddr_t nd_dpos; /* Current dissect pos */
- int nd_procnum; /* RPC # */
- int nd_stable; /* storage type */
- int nd_flag; /* nd_flag */
- int nd_len; /* Length of this write */
- int nd_repstat; /* Reply status */
- u_long nd_retxid; /* Reply xid */
- u_long nd_duration; /* Lease duration */
- struct timeval nd_starttime; /* Time RPC initiated */
- fhandle_t nd_fh; /* File handle */
- struct ucred nd_cr; /* Credentials */
-};
-
-/* Bits for "nd_flag" */
-#define ND_READ LEASE_READ
-#define ND_WRITE LEASE_WRITE
-#define ND_CHECK 0x04
-#define ND_LEASE (ND_READ | ND_WRITE | ND_CHECK)
-#define ND_NFSV3 0x08
-#define ND_NQNFS 0x10
-#define ND_KERBNICK 0x20
-#define ND_KERBFULL 0x40
-#define ND_KERBAUTH (ND_KERBNICK | ND_KERBFULL)
-
-extern TAILQ_HEAD(nfsd_head, nfsd) nfsd_head;
-extern int nfsd_head_flag;
-#define NFSD_CHECKSLP 0x01
-
-/*
- * These macros compare nfsrv_descript structures.
- */
-#define NFSW_CONTIG(o, n) \
- ((o)->nd_eoff >= (n)->nd_off && \
- !bcmp((caddr_t)&(o)->nd_fh, (caddr_t)&(n)->nd_fh, NFSX_V3FH))
-
-#define NFSW_SAMECRED(o, n) \
- (((o)->nd_flag & ND_KERBAUTH) == ((n)->nd_flag & ND_KERBAUTH) && \
- !bcmp((caddr_t)&(o)->nd_cr, (caddr_t)&(n)->nd_cr, \
- sizeof (struct ucred)))
-
-int nfs_reply __P((struct nfsreq *));
-int nfs_getreq __P((struct nfsrv_descript *,struct nfsd *,int));
-int nfs_send __P((struct socket *,struct mbuf *,struct mbuf *,struct nfsreq *));
-int nfs_rephead __P((int,struct nfsrv_descript *,struct nfssvc_sock *,int,int,u_quad_t *,struct mbuf **,struct mbuf **,caddr_t *));
-int nfs_sndlock __P((int *,struct nfsreq *));
-void nfs_sndunlock __P((int *flagp));
-int nfs_disct __P((struct mbuf **,caddr_t *,int,int,caddr_t *));
-int nfs_vinvalbuf __P((struct vnode *,int,struct ucred *,struct proc *,int));
-int nfs_readrpc __P((struct vnode *,struct uio *,struct ucred *));
-int nfs_writerpc __P((struct vnode *,struct uio *,struct ucred *,int *,int *));
-int nfs_readdirrpc __P((register struct vnode *,struct uio *,struct ucred *));
-int nfs_asyncio __P((struct buf *,struct ucred *));
-int nfs_doio __P((struct buf *,struct ucred *,struct proc *));
-int nfs_readlinkrpc __P((struct vnode *,struct uio *,struct ucred *));
-int nfs_sigintr __P((struct nfsmount *,struct nfsreq *r,struct proc *));
-int nfs_readdirplusrpc __P((struct vnode *,register struct uio *,struct ucred *));
-int nfsm_disct __P((struct mbuf **,caddr_t *,int,int,caddr_t *));
-void nfsm_srvfattr __P((struct nfsrv_descript *,struct vattr *,struct nfs_fattr *));
-void nfsm_srvwcc __P((struct nfsrv_descript *,int,struct vattr *,int,struct vattr *,struct mbuf **,char **));
-void nfsm_srvpostopattr __P((struct nfsrv_descript *,int,struct vattr *,struct mbuf **,char **));
-int netaddr_match __P((int,union nethostaddr *,struct mbuf *));
-int nfs_request __P((struct vnode *,struct mbuf *,int,struct proc *,struct ucred *,struct mbuf **,struct mbuf **,caddr_t *));
-int nfs_loadattrcache __P((struct vnode **,struct mbuf **,caddr_t *,struct vattr *));
-int nfs_namei __P((struct nameidata *,fhandle_t *,int,struct nfssvc_sock *,struct mbuf *,struct mbuf **,caddr_t *,struct vnode **,struct proc *,int));
-void nfsm_adj __P((struct mbuf *,int,int));
-int nfsm_mbuftouio __P((struct mbuf **,struct uio *,int,caddr_t *));
-void nfsrv_initcache __P((void));
-int nfs_getauth __P((struct nfsmount *,struct nfsreq *,struct ucred *,char **,int *,char *,int *,NFSKERBKEY_T));
-int nfs_getnickauth __P((struct nfsmount *,struct ucred *,char **,int *,char *,int));
-int nfs_savenickauth __P((struct nfsmount *,struct ucred *,int,NFSKERBKEY_T,struct mbuf **,char **,struct mbuf *));
-int nfs_adv __P((struct mbuf **,caddr_t *,int,int));
-void nfs_nhinit __P((void));
-void nfs_timer __P((void*));
-u_long nfs_hash __P((nfsfh_t *,int));
-void nfsrv_slpderef __P((struct nfssvc_sock *slp));
-int nfsrv_dorec __P((struct nfssvc_sock *,struct nfsd *,struct nfsrv_descript **));
-void nfsrv_cleancache __P((void));
-int nfsrv_getcache __P((struct nfsrv_descript *,struct nfssvc_sock *,struct mbuf **));
-int nfs_init __P((void));
-void nfsrv_updatecache __P((struct nfsrv_descript *,int,struct mbuf *));
-int nfs_connect __P((struct nfsmount *,struct nfsreq *));
-void nfs_disconnect __P((struct nfsmount *nmp));
-int nfs_getattrcache __P((struct vnode *,struct vattr *));
-int nfsm_strtmbuf __P((struct mbuf **,char **,char *,long));
-int nfs_bioread __P((struct vnode *,struct uio *,int,struct ucred *, int getpages));
-int nfsm_uiotombuf __P((struct uio *,struct mbuf **,int,caddr_t *));
-void nfsrv_init __P((int));
-void nfs_clearcommit __P((struct mount *));
-int nfsrv_errmap __P((struct nfsrv_descript *, int));
-void nfsrv_rcv __P((struct socket *so, caddr_t arg, int waitflag));
-void nfsrvw_sort __P((gid_t [],int));
-void nfsrv_setcred __P((struct ucred *,struct ucred *));
-int nfs_writebp __P((struct buf *,int));
-int nfsrv_object_create __P(( struct vnode * ));
-void nfsrv_wakenfsd __P((struct nfssvc_sock *slp));
-int nfsrv_writegather __P((struct nfsrv_descript **, struct nfssvc_sock *,
- struct proc *, struct mbuf **));
-int nfs_fsinfo __P((struct nfsmount *, struct vnode *, struct ucred *,
- struct proc *p));
-
-int nfsrv3_access __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
- struct proc *procp, struct mbuf **mrq));
-int nfsrv_commit __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
- struct proc *procp, struct mbuf **mrq));
-int nfsrv_create __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
- struct proc *procp, struct mbuf **mrq));
-int nfsrv_fhtovp __P((fhandle_t *,int,struct vnode **,
- struct ucred *,struct nfssvc_sock *,struct mbuf *,
- int *,int));
-int nfsrv_fsinfo __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
- struct proc *procp, struct mbuf **mrq));
-int nfsrv_getattr __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
- struct proc *procp, struct mbuf **mrq));
-int nfsrv_link __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
- struct proc *procp, struct mbuf **mrq));
-int nfsrv_lookup __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
- struct proc *procp, struct mbuf **mrq));
-int nfsrv_mkdir __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
- struct proc *procp, struct mbuf **mrq));
-int nfsrv_mknod __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
- struct proc *procp, struct mbuf **mrq));
-int nfsrv_noop __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
- struct proc *procp, struct mbuf **mrq));
-int nfsrv_null __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
- struct proc *procp, struct mbuf **mrq));
-int nfsrv_pathconf __P((struct nfsrv_descript *nfsd,
- struct nfssvc_sock *slp, struct proc *procp,
- struct mbuf **mrq));
-int nfsrv_read __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
- struct proc *procp, struct mbuf **mrq));
-int nfsrv_readdir __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
- struct proc *procp, struct mbuf **mrq));
-int nfsrv_readdirplus __P((struct nfsrv_descript *nfsd,
- struct nfssvc_sock *slp, struct proc *procp,
- struct mbuf **mrq));
-int nfsrv_readlink __P((struct nfsrv_descript *nfsd,
- struct nfssvc_sock *slp, struct proc *procp,
- struct mbuf **mrq));
-int nfsrv_remove __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
- struct proc *procp, struct mbuf **mrq));
-int nfsrv_rename __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
- struct proc *procp, struct mbuf **mrq));
-int nfsrv_rmdir __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
- struct proc *procp, struct mbuf **mrq));
-int nfsrv_setattr __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
- struct proc *procp, struct mbuf **mrq));
-int nfsrv_statfs __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
- struct proc *procp, struct mbuf **mrq));
-int nfsrv_symlink __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
- struct proc *procp, struct mbuf **mrq));
-int nfsrv_write __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
- struct proc *procp, struct mbuf **mrq));
-
-#ifdef NFS_DEBUG
-
-extern int nfs_debug;
-#define NFS_DEBUG_ASYNCIO 1 /* asynchronous i/o */
-#define NFS_DEBUG_WG 2 /* server write gathering */
-#define NFS_DEBUG_RC 4 /* server request caching */
-
-#define NFS_DPF(cat, args) \
- do { \
- if (nfs_debug & NFS_DEBUG_##cat) printf args; \
- } while (0)
-
-#else
-
-#define NFS_DPF(cat, args)
-
-#endif
-
-#endif /* KERNEL */
-
-#endif
diff --git a/c/src/exec/libnetworking/nfs/nfsdiskless.h b/c/src/exec/libnetworking/nfs/nfsdiskless.h
deleted file mode 100644
index 0ed5c8f6f7..0000000000
--- a/c/src/exec/libnetworking/nfs/nfsdiskless.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Rick Macklem at The University of Guelph.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)nfsdiskless.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _NFS_NFSDISKLESS_H_
-#define _NFS_NFSDISKLESS_H_
-
-/*
- * Structure that must be initialized for a diskless nfs client.
- * This structure is used by nfs_mountroot() to set up the root and swap
- * vnodes plus do a partial ifconfig(8) and route(8) so that the critical net
- * interface can communicate with the server.
- * The primary bootstrap is expected to fill in the appropriate fields before
- * starting the kernel. Whether or not the swap area is nfs mounted is determined
- * by the value in swdevt[0]. (equal to NODEV --> swap over nfs)
- * Currently only works for AF_INET protocols.
- * NB: All fields are stored in net byte order to avoid hassles with
- * client/server byte ordering differences.
- */
-
-/*
- * I have defined a new structure that can handle an NFS Version 3 file handle
- * but the kernel still expects the old Version 2 one to be provided. The
- * changes required in nfs_vfsops.c for using the new are documented there in
- * comments. (I felt that breaking network booting code by changing this
- * structure would not be prudent at this time, since almost all servers are
- * still Version 2 anyhow.)
- */
-struct nfsv3_diskless {
- struct ifaliasreq myif; /* Default interface */
- struct sockaddr_in mygateway; /* Default gateway */
- struct nfs_args swap_args; /* Mount args for swap file */
- int swap_fhsize; /* Size of file handle */
- u_char swap_fh[NFSX_V3FHMAX]; /* Swap file's file handle */
- struct sockaddr_in swap_saddr; /* Address of swap server */
- char swap_hostnam[MNAMELEN]; /* Host name for mount pt */
- int swap_nblks; /* Size of server swap file */
- struct ucred swap_ucred; /* Swap credentials */
- struct nfs_args root_args; /* Mount args for root fs */
- int root_fhsize; /* Size of root file handle */
- u_char root_fh[NFSX_V3FHMAX]; /* File handle of root dir */
- struct sockaddr_in root_saddr; /* Address of root server */
- char root_hostnam[MNAMELEN]; /* Host name for mount pt */
- long root_time; /* Timestamp of root fs */
- char my_hostnam[MAXHOSTNAMELEN]; /* Client host name */
-};
-
-struct nfs_diskless {
- struct ifaliasreq myif; /* Default interface */
- struct sockaddr_in mygateway; /* Default gateway */
- struct nfs_args swap_args; /* Mount args for swap file */
- u_char swap_fh[NFSX_V2FH]; /* Swap file's file handle */
- struct sockaddr_in swap_saddr; /* Address of swap server */
- char swap_hostnam[MNAMELEN]; /* Host name for mount pt */
- int swap_nblks; /* Size of server swap file */
- struct ucred swap_ucred; /* Swap credentials */
- struct nfs_args root_args; /* Mount args for root fs */
- u_char root_fh[NFSX_V2FH]; /* File handle of root dir */
- struct sockaddr_in root_saddr; /* Address of root server */
- char root_hostnam[MNAMELEN]; /* Host name for mount pt */
- long root_time; /* Timestamp of root fs */
- char my_hostnam[MAXHOSTNAMELEN]; /* Client host name */
-};
-
-#endif
diff --git a/c/src/exec/libnetworking/nfs/nfsproto.h b/c/src/exec/libnetworking/nfs/nfsproto.h
deleted file mode 100644
index 6ce7c5b960..0000000000
--- a/c/src/exec/libnetworking/nfs/nfsproto.h
+++ /dev/null
@@ -1,441 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Rick Macklem at The University of Guelph.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)nfsproto.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _NFS_NFSPROTO_H_
-#define _NFS_NFSPROTO_H_
-
-/*
- * nfs definitions as per the Version 2 and 3 specs
- */
-
-/*
- * Constants as defined in the Sun NFS Version 2 and 3 specs.
- * "NFS: Network File System Protocol Specification" RFC1094
- * and in the "NFS: Network File System Version 3 Protocol
- * Specification"
- */
-
-#define NFS_PORT 2049
-#define NFS_PROG 100003
-#define NFS_VER2 2
-#define NFS_VER3 3
-#define NFS_V2MAXDATA 8192
-#define NFS_MAXDGRAMDATA 16384
-#define NFS_MAXDATA 32768
-#define NFS_MAXPATHLEN 1024
-#define NFS_MAXNAMLEN 255
-#define NFS_MAXPKTHDR 404
-#define NFS_MAXPACKET (NFS_MAXPKTHDR + NFS_MAXDATA)
-#define NFS_MINPACKET 20
-#define NFS_FABLKSIZE 512 /* Size in bytes of a block wrt fa_blocks */
-
-/* Stat numbers for rpc returns (version 2 and 3) */
-#define NFS_OK 0
-#define NFSERR_PERM 1
-#define NFSERR_NOENT 2
-#define NFSERR_IO 5
-#define NFSERR_NXIO 6
-#define NFSERR_ACCES 13
-#define NFSERR_EXIST 17
-#define NFSERR_XDEV 18 /* Version 3 only */
-#define NFSERR_NODEV 19
-#define NFSERR_NOTDIR 20
-#define NFSERR_ISDIR 21
-#define NFSERR_INVAL 22 /* Version 3 only */
-#define NFSERR_FBIG 27
-#define NFSERR_NOSPC 28
-#define NFSERR_ROFS 30
-#define NFSERR_MLINK 31 /* Version 3 only */
-#define NFSERR_NAMETOL 63
-#define NFSERR_NOTEMPTY 66
-#define NFSERR_DQUOT 69
-#define NFSERR_STALE 70
-#define NFSERR_REMOTE 71 /* Version 3 only */
-#define NFSERR_WFLUSH 99 /* Version 2 only */
-#define NFSERR_BADHANDLE 10001 /* The rest Version 3 only */
-#define NFSERR_NOT_SYNC 10002
-#define NFSERR_BAD_COOKIE 10003
-#define NFSERR_NOTSUPP 10004
-#define NFSERR_TOOSMALL 10005
-#define NFSERR_SERVERFAULT 10006
-#define NFSERR_BADTYPE 10007
-#define NFSERR_JUKEBOX 10008
-#define NFSERR_TRYLATER NFSERR_JUKEBOX
-#define NFSERR_STALEWRITEVERF 30001 /* Fake return for nfs_commit() */
-
-#define NFSERR_RETVOID 0x20000000 /* Return void, not error */
-#define NFSERR_AUTHERR 0x40000000 /* Mark an authentication error */
-#define NFSERR_RETERR 0x80000000 /* Mark an error return for V3 */
-
-/* Sizes in bytes of various nfs rpc components */
-#define NFSX_UNSIGNED 4
-
-/* specific to NFS Version 2 */
-#define NFSX_V2FH 32
-#define NFSX_V2FATTR 68
-#define NFSX_V2SATTR 32
-#define NFSX_V2COOKIE 4
-#define NFSX_V2STATFS 20
-
-/* specific to NFS Version 3 */
-#define NFSX_V3FH (sizeof (fhandle_t)) /* size this server uses */
-#define NFSX_V3FHMAX 64 /* max. allowed by protocol */
-#define NFSX_V3FATTR 84
-#define NFSX_V3SATTR 60 /* max. all fields filled in */
-#define NFSX_V3SRVSATTR (sizeof (struct nfsv3_sattr))
-#define NFSX_V3POSTOPATTR (NFSX_V3FATTR + NFSX_UNSIGNED)
-#define NFSX_V3WCCDATA (NFSX_V3POSTOPATTR + 8 * NFSX_UNSIGNED)
-#define NFSX_V3COOKIEVERF 8
-#define NFSX_V3WRITEVERF 8
-#define NFSX_V3CREATEVERF 8
-#define NFSX_V3STATFS 52
-#define NFSX_V3FSINFO 48
-#define NFSX_V3PATHCONF 24
-
-/* variants for both versions */
-#define NFSX_FH(v3) ((v3) ? (NFSX_V3FHMAX + NFSX_UNSIGNED) : \
- NFSX_V2FH)
-#define NFSX_SRVFH(v3) ((v3) ? NFSX_V3FH : NFSX_V2FH)
-#define NFSX_FATTR(v3) ((v3) ? NFSX_V3FATTR : NFSX_V2FATTR)
-#define NFSX_PREOPATTR(v3) ((v3) ? (7 * NFSX_UNSIGNED) : 0)
-#define NFSX_POSTOPATTR(v3) ((v3) ? (NFSX_V3FATTR + NFSX_UNSIGNED) : 0)
-#define NFSX_POSTOPORFATTR(v3) ((v3) ? (NFSX_V3FATTR + NFSX_UNSIGNED) : \
- NFSX_V2FATTR)
-#define NFSX_WCCDATA(v3) ((v3) ? NFSX_V3WCCDATA : 0)
-#define NFSX_WCCORFATTR(v3) ((v3) ? NFSX_V3WCCDATA : NFSX_V2FATTR)
-#define NFSX_SATTR(v3) ((v3) ? NFSX_V3SATTR : NFSX_V2SATTR)
-#define NFSX_COOKIEVERF(v3) ((v3) ? NFSX_V3COOKIEVERF : 0)
-#define NFSX_WRITEVERF(v3) ((v3) ? NFSX_V3WRITEVERF : 0)
-#define NFSX_READDIR(v3) ((v3) ? (5 * NFSX_UNSIGNED) : \
- (2 * NFSX_UNSIGNED))
-#define NFSX_STATFS(v3) ((v3) ? NFSX_V3STATFS : NFSX_V2STATFS)
-
-/* nfs rpc procedure numbers (before version mapping) */
-#define NFSPROC_NULL 0
-#define NFSPROC_GETATTR 1
-#define NFSPROC_SETATTR 2
-#define NFSPROC_LOOKUP 3
-#define NFSPROC_ACCESS 4
-#define NFSPROC_READLINK 5
-#define NFSPROC_READ 6
-#define NFSPROC_WRITE 7
-#define NFSPROC_CREATE 8
-#define NFSPROC_MKDIR 9
-#define NFSPROC_SYMLINK 10
-#define NFSPROC_MKNOD 11
-#define NFSPROC_REMOVE 12
-#define NFSPROC_RMDIR 13
-#define NFSPROC_RENAME 14
-#define NFSPROC_LINK 15
-#define NFSPROC_READDIR 16
-#define NFSPROC_READDIRPLUS 17
-#define NFSPROC_FSSTAT 18
-#define NFSPROC_FSINFO 19
-#define NFSPROC_PATHCONF 20
-#define NFSPROC_COMMIT 21
-
-/* And leasing (nqnfs) procedure numbers (must be last) */
-#define NQNFSPROC_GETLEASE 22
-#define NQNFSPROC_VACATED 23
-#define NQNFSPROC_EVICTED 24
-
-#define NFSPROC_NOOP 25
-#define NFS_NPROCS 26
-
-/* Actual Version 2 procedure numbers */
-#define NFSV2PROC_NULL 0
-#define NFSV2PROC_GETATTR 1
-#define NFSV2PROC_SETATTR 2
-#define NFSV2PROC_NOOP 3
-#define NFSV2PROC_ROOT NFSV2PROC_NOOP /* Obsolete */
-#define NFSV2PROC_LOOKUP 4
-#define NFSV2PROC_READLINK 5
-#define NFSV2PROC_READ 6
-#define NFSV2PROC_WRITECACHE NFSV2PROC_NOOP /* Obsolete */
-#define NFSV2PROC_WRITE 8
-#define NFSV2PROC_CREATE 9
-#define NFSV2PROC_REMOVE 10
-#define NFSV2PROC_RENAME 11
-#define NFSV2PROC_LINK 12
-#define NFSV2PROC_SYMLINK 13
-#define NFSV2PROC_MKDIR 14
-#define NFSV2PROC_RMDIR 15
-#define NFSV2PROC_READDIR 16
-#define NFSV2PROC_STATFS 17
-
-/*
- * Constants used by the Version 3 protocol for various RPCs
- */
-#define NFSV3SATTRTIME_DONTCHANGE 0
-#define NFSV3SATTRTIME_TOSERVER 1
-#define NFSV3SATTRTIME_TOCLIENT 2
-
-#define NFSV3ACCESS_READ 0x01
-#define NFSV3ACCESS_LOOKUP 0x02
-#define NFSV3ACCESS_MODIFY 0x04
-#define NFSV3ACCESS_EXTEND 0x08
-#define NFSV3ACCESS_DELETE 0x10
-#define NFSV3ACCESS_EXECUTE 0x20
-
-#define NFSV3WRITE_UNSTABLE 0
-#define NFSV3WRITE_DATASYNC 1
-#define NFSV3WRITE_FILESYNC 2
-
-#define NFSV3CREATE_UNCHECKED 0
-#define NFSV3CREATE_GUARDED 1
-#define NFSV3CREATE_EXCLUSIVE 2
-
-#define NFSV3FSINFO_LINK 0x01
-#define NFSV3FSINFO_SYMLINK 0x02
-#define NFSV3FSINFO_HOMOGENEOUS 0x08
-#define NFSV3FSINFO_CANSETTIME 0x10
-
-/* Conversion macros */
-#define vtonfsv2_mode(t,m) \
- txdr_unsigned(((t) == VFIFO) ? MAKEIMODE(VCHR, (m)) : \
- MAKEIMODE((t), (m)))
-#define vtonfsv3_mode(m) txdr_unsigned((m) & 07777)
-#define nfstov_mode(a) (fxdr_unsigned(u_short, (a))&07777)
-#define vtonfsv2_type(a) txdr_unsigned(nfsv2_type[((long)(a))])
-#define vtonfsv3_type(a) txdr_unsigned(nfsv3_type[((long)(a))])
-#define nfsv2tov_type(a) nv2tov_type[fxdr_unsigned(u_long,(a))&0x7]
-#define nfsv3tov_type(a) nv3tov_type[fxdr_unsigned(u_long,(a))&0x7]
-
-/* File types */
-typedef enum { NFNON=0, NFREG=1, NFDIR=2, NFBLK=3, NFCHR=4, NFLNK=5,
- NFSOCK=6, NFFIFO=7 } nfstype;
-
-/* Structs for common parts of the rpc's */
-/*
- * File Handle (32 bytes for version 2), variable up to 64 for version 3.
- * File Handles of up to NFS_SMALLFH in size are stored directly in the
- * nfs node, whereas larger ones are malloc'd. (This never happens when
- * NFS_SMALLFH is set to 64.)
- * NFS_SMALLFH should be in the range of 32 to 64 and be divisible by 4.
- */
-#ifndef NFS_SMALLFH
-#define NFS_SMALLFH 64
-#endif
-union nfsfh {
- fhandle_t fh_generic;
- u_char fh_bytes[NFS_SMALLFH];
-};
-typedef union nfsfh nfsfh_t;
-
-struct nfsv2_time {
- u_long nfsv2_sec;
- u_long nfsv2_usec;
-};
-typedef struct nfsv2_time nfstime2;
-
-struct nfsv3_time {
- u_long nfsv3_sec;
- u_long nfsv3_nsec;
-};
-typedef struct nfsv3_time nfstime3;
-
-/*
- * Quads are defined as arrays of 2 longs to ensure dense packing for the
- * protocol and to facilitate xdr conversion.
- */
-struct nfs_uquad {
- u_long nfsuquad[2];
-};
-typedef struct nfs_uquad nfsuint64;
-
-/*
- * Used to convert between two u_longs and a u_quad_t.
- */
-union nfs_quadconvert {
- u_long lval[2];
- u_quad_t qval;
-};
-typedef union nfs_quadconvert nfsquad_t;
-
-/*
- * NFS Version 3 special file number.
- */
-struct nfsv3_spec {
- u_long specdata1;
- u_long specdata2;
-};
-typedef struct nfsv3_spec nfsv3spec;
-
-/*
- * File attributes and setable attributes. These structures cover both
- * NFS version 2 and the version 3 protocol. Note that the union is only
- * used so that one pointer can refer to both variants. These structures
- * go out on the wire and must be densely packed, so no quad data types
- * are used. (all fields are longs or u_longs or structures of same)
- * NB: You can't do sizeof(struct nfs_fattr), you must use the
- * NFSX_FATTR(v3) macro.
- */
-struct nfs_fattr {
- u_long fa_type;
- u_long fa_mode;
- u_long fa_nlink;
- u_long fa_uid;
- u_long fa_gid;
- union {
- struct {
- u_long nfsv2fa_size;
- u_long nfsv2fa_blocksize;
- u_long nfsv2fa_rdev;
- u_long nfsv2fa_blocks;
- u_long nfsv2fa_fsid;
- u_long nfsv2fa_fileid;
- nfstime2 nfsv2fa_atime;
- nfstime2 nfsv2fa_mtime;
- nfstime2 nfsv2fa_ctime;
- } fa_nfsv2;
- struct {
- nfsuint64 nfsv3fa_size;
- nfsuint64 nfsv3fa_used;
- nfsv3spec nfsv3fa_rdev;
- nfsuint64 nfsv3fa_fsid;
- nfsuint64 nfsv3fa_fileid;
- nfstime3 nfsv3fa_atime;
- nfstime3 nfsv3fa_mtime;
- nfstime3 nfsv3fa_ctime;
- } fa_nfsv3;
- } fa_un;
-};
-
-/* and some ugly defines for accessing union components */
-#define fa2_size fa_un.fa_nfsv2.nfsv2fa_size
-#define fa2_blocksize fa_un.fa_nfsv2.nfsv2fa_blocksize
-#define fa2_rdev fa_un.fa_nfsv2.nfsv2fa_rdev
-#define fa2_blocks fa_un.fa_nfsv2.nfsv2fa_blocks
-#define fa2_fsid fa_un.fa_nfsv2.nfsv2fa_fsid
-#define fa2_fileid fa_un.fa_nfsv2.nfsv2fa_fileid
-#define fa2_atime fa_un.fa_nfsv2.nfsv2fa_atime
-#define fa2_mtime fa_un.fa_nfsv2.nfsv2fa_mtime
-#define fa2_ctime fa_un.fa_nfsv2.nfsv2fa_ctime
-#define fa3_size fa_un.fa_nfsv3.nfsv3fa_size
-#define fa3_used fa_un.fa_nfsv3.nfsv3fa_used
-#define fa3_rdev fa_un.fa_nfsv3.nfsv3fa_rdev
-#define fa3_fsid fa_un.fa_nfsv3.nfsv3fa_fsid
-#define fa3_fileid fa_un.fa_nfsv3.nfsv3fa_fileid
-#define fa3_atime fa_un.fa_nfsv3.nfsv3fa_atime
-#define fa3_mtime fa_un.fa_nfsv3.nfsv3fa_mtime
-#define fa3_ctime fa_un.fa_nfsv3.nfsv3fa_ctime
-
-struct nfsv2_sattr {
- u_long sa_mode;
- u_long sa_uid;
- u_long sa_gid;
- u_long sa_size;
- nfstime2 sa_atime;
- nfstime2 sa_mtime;
-};
-
-/*
- * NFS Version 3 sattr structure for the new node creation case.
- */
-struct nfsv3_sattr {
- u_long sa_modetrue;
- u_long sa_mode;
- u_long sa_uidtrue;
- u_long sa_uid;
- u_long sa_gidtrue;
- u_long sa_gid;
- u_long sa_sizefalse;
- u_long sa_atimetype;
- nfstime3 sa_atime;
- u_long sa_mtimetype;
- nfstime3 sa_mtime;
-};
-
-struct nfs_statfs {
- union {
- struct {
- u_long nfsv2sf_tsize;
- u_long nfsv2sf_bsize;
- u_long nfsv2sf_blocks;
- u_long nfsv2sf_bfree;
- u_long nfsv2sf_bavail;
- } sf_nfsv2;
- struct {
- nfsuint64 nfsv3sf_tbytes;
- nfsuint64 nfsv3sf_fbytes;
- nfsuint64 nfsv3sf_abytes;
- nfsuint64 nfsv3sf_tfiles;
- nfsuint64 nfsv3sf_ffiles;
- nfsuint64 nfsv3sf_afiles;
- u_long nfsv3sf_invarsec;
- } sf_nfsv3;
- } sf_un;
-};
-
-#define sf_tsize sf_un.sf_nfsv2.nfsv2sf_tsize
-#define sf_bsize sf_un.sf_nfsv2.nfsv2sf_bsize
-#define sf_blocks sf_un.sf_nfsv2.nfsv2sf_blocks
-#define sf_bfree sf_un.sf_nfsv2.nfsv2sf_bfree
-#define sf_bavail sf_un.sf_nfsv2.nfsv2sf_bavail
-#define sf_tbytes sf_un.sf_nfsv3.nfsv3sf_tbytes
-#define sf_fbytes sf_un.sf_nfsv3.nfsv3sf_fbytes
-#define sf_abytes sf_un.sf_nfsv3.nfsv3sf_abytes
-#define sf_tfiles sf_un.sf_nfsv3.nfsv3sf_tfiles
-#define sf_ffiles sf_un.sf_nfsv3.nfsv3sf_ffiles
-#define sf_afiles sf_un.sf_nfsv3.nfsv3sf_afiles
-#define sf_invarsec sf_un.sf_nfsv3.nfsv3sf_invarsec
-
-struct nfsv3_fsinfo {
- u_long fs_rtmax;
- u_long fs_rtpref;
- u_long fs_rtmult;
- u_long fs_wtmax;
- u_long fs_wtpref;
- u_long fs_wtmult;
- u_long fs_dtpref;
- nfsuint64 fs_maxfilesize;
- nfstime3 fs_timedelta;
- u_long fs_properties;
-};
-
-struct nfsv3_pathconf {
- u_long pc_linkmax;
- u_long pc_namemax;
- u_long pc_notrunc;
- u_long pc_chownrestricted;
- u_long pc_caseinsensitive;
- u_long pc_casepreserving;
-};
-
-#endif
diff --git a/c/src/exec/libnetworking/nfs/rpcv2.h b/c/src/exec/libnetworking/nfs/rpcv2.h
deleted file mode 100644
index 5fd6e7febf..0000000000
--- a/c/src/exec/libnetworking/nfs/rpcv2.h
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Rick Macklem at The University of Guelph.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)rpcv2.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _NFS_RPCV2_H_
-#define _NFS_RPCV2_H_
-
-/*
- * Definitions for Sun RPC Version 2, from
- * "RPC: Remote Procedure Call Protocol Specification" RFC1057
- */
-
-/* Version # */
-#define RPC_VER2 2
-
-/* Authentication */
-#define RPCAUTH_NULL 0
-#define RPCAUTH_UNIX 1
-#define RPCAUTH_SHORT 2
-#define RPCAUTH_KERB4 4
-#define RPCAUTH_NQNFS 300000
-#define RPCAUTH_MAXSIZ 400
-#define RPCVERF_MAXSIZ 12 /* For Kerb, can actually be 400 */
-#define RPCAUTH_UNIXGIDS 16
-
-/*
- * Constants associated with authentication flavours.
- */
-#define RPCAKN_FULLNAME 0
-#define RPCAKN_NICKNAME 1
-
-/* Rpc Constants */
-#define RPC_CALL 0
-#define RPC_REPLY 1
-#define RPC_MSGACCEPTED 0
-#define RPC_MSGDENIED 1
-#define RPC_PROGUNAVAIL 1
-#define RPC_PROGMISMATCH 2
-#define RPC_PROCUNAVAIL 3
-#define RPC_GARBAGE 4 /* I like this one */
-#define RPC_MISMATCH 0
-#define RPC_AUTHERR 1
-
-/* Authentication failures */
-#define AUTH_BADCRED 1
-#define AUTH_REJECTCRED 2
-#define AUTH_BADVERF 3
-#define AUTH_REJECTVERF 4
-#define AUTH_TOOWEAK 5 /* Give em wheaties */
-
-/* Sizes of rpc header parts */
-#define RPC_SIZ 24
-#define RPC_REPLYSIZ 28
-
-/* RPC Prog definitions */
-#define RPCPROG_MNT 100005
-#define RPCMNT_VER1 1
-#define RPCMNT_VER3 3
-#define RPCMNT_MOUNT 1
-#define RPCMNT_DUMP 2
-#define RPCMNT_UMOUNT 3
-#define RPCMNT_UMNTALL 4
-#define RPCMNT_EXPORT 5
-#define RPCMNT_NAMELEN 255
-#define RPCMNT_PATHLEN 1024
-#define RPCPROG_NFS 100003
-
-/*
- * Structures used for RPCAUTH_KERB4.
- */
-struct nfsrpc_fullverf {
- u_long t1;
- u_long t2;
- u_long w2;
-};
-
-struct nfsrpc_fullblock {
- u_long t1;
- u_long t2;
- u_long w1;
- u_long w2;
-};
-
-struct nfsrpc_nickverf {
- u_long kind;
- struct nfsrpc_fullverf verf;
-};
-
-/*
- * and their sizes in bytes.. If sizeof (struct nfsrpc_xx) != these
- * constants, well then things will break in mount_nfs and nfsd.
- */
-#define RPCX_FULLVERF 12
-#define RPCX_FULLBLOCK 16
-#define RPCX_NICKVERF 16
-
-#ifdef NFSKERB
-XXX
-#else
-typedef u_char NFSKERBKEY_T[2];
-typedef u_char NFSKERBKEYSCHED_T[2];
-#endif
-#define NFS_KERBSRV "rcmd" /* Kerberos Service for NFS */
-#define NFS_KERBTTL (30 * 60) /* Credential ttl (sec) */
-#define NFS_KERBCLOCKSKEW (5 * 60) /* Clock skew (sec) */
-#define NFS_KERBW1(t) (*((u_long *)(&((t).dat[((t).length + 3) & ~0x3]))))
-#endif
diff --git a/c/src/exec/libnetworking/nfs/xdr_subs.h b/c/src/exec/libnetworking/nfs/xdr_subs.h
deleted file mode 100644
index 874730378f..0000000000
--- a/c/src/exec/libnetworking/nfs/xdr_subs.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Rick Macklem at The University of Guelph.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)xdr_subs.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _NFS_XDR_SUBS_H_
-#define _NFS_XDR_SUBS_H_
-
-/*
- * Macros used for conversion to/from xdr representation by nfs...
- * These use the MACHINE DEPENDENT routines ntohl, htonl
- * As defined by "XDR: External Data Representation Standard" RFC1014
- *
- * To simplify the implementation, we use ntohl/htonl even on big-endian
- * machines, and count on them being `#define'd away. Some of these
- * might be slightly more efficient as quad_t copies on a big-endian,
- * but we cannot count on their alignment anyway.
- */
-
-#define fxdr_unsigned(t, v) ((t)ntohl((long)(v)))
-#define txdr_unsigned(v) (htonl((long)(v)))
-
-#define fxdr_nfsv2time(f, t) { \
- (t)->tv_sec = ntohl(((struct nfsv2_time *)(f))->nfsv2_sec); \
- if (((struct nfsv2_time *)(f))->nfsv2_usec != 0xffffffff) \
- (t)->tv_nsec = 1000 * ntohl(((struct nfsv2_time *)(f))->nfsv2_usec); \
- else \
- (t)->tv_nsec = 0; \
-}
-#define txdr_nfsv2time(f, t) { \
- ((struct nfsv2_time *)(t))->nfsv2_sec = htonl((f)->tv_sec); \
- if ((f)->tv_nsec != -1) \
- ((struct nfsv2_time *)(t))->nfsv2_usec = htonl((f)->tv_nsec / 1000); \
- else \
- ((struct nfsv2_time *)(t))->nfsv2_usec = 0xffffffff; \
-}
-
-#define fxdr_nfsv3time(f, t) { \
- (t)->tv_sec = ntohl(((struct nfsv3_time *)(f))->nfsv3_sec); \
- (t)->tv_nsec = ntohl(((struct nfsv3_time *)(f))->nfsv3_nsec); \
-}
-#define txdr_nfsv3time(f, t) { \
- ((struct nfsv3_time *)(t))->nfsv3_sec = htonl((f)->tv_sec); \
- ((struct nfsv3_time *)(t))->nfsv3_nsec = htonl((f)->tv_nsec); \
-}
-
-#define fxdr_hyper(f, t) { \
- ((long *)(t))[_QUAD_HIGHWORD] = ntohl(((long *)(f))[0]); \
- ((long *)(t))[_QUAD_LOWWORD] = ntohl(((long *)(f))[1]); \
-}
-#define txdr_hyper(f, t) { \
- ((long *)(t))[0] = htonl(((long *)(f))[_QUAD_HIGHWORD]); \
- ((long *)(t))[1] = htonl(((long *)(f))[_QUAD_LOWWORD]); \
-}
-
-#endif
diff --git a/c/src/exec/libnetworking/opt_ipfw.h b/c/src/exec/libnetworking/opt_ipfw.h
deleted file mode 100644
index 5a6ee0337b..0000000000
--- a/c/src/exec/libnetworking/opt_ipfw.h
+++ /dev/null
@@ -1,6 +0,0 @@
-/*
- * $Id$
- */
-
-/* intentionally empty file */
-
diff --git a/c/src/exec/libnetworking/opt_mrouting.h b/c/src/exec/libnetworking/opt_mrouting.h
deleted file mode 100644
index 5a6ee0337b..0000000000
--- a/c/src/exec/libnetworking/opt_mrouting.h
+++ /dev/null
@@ -1,6 +0,0 @@
-/*
- * $Id$
- */
-
-/* intentionally empty file */
-
diff --git a/c/src/exec/libnetworking/opt_tcpdebug.h b/c/src/exec/libnetworking/opt_tcpdebug.h
deleted file mode 100644
index 4c10d1bac2..0000000000
--- a/c/src/exec/libnetworking/opt_tcpdebug.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * $Id$
- */
-
-/* intentionally empty file */
-
-/*
- * Uncomment the following line to turn on debug code. When you define
- * this symbol, tcp_trace() is called. If you want tcp_trace() to
- * print, then you need to edit netinet/tcp_debug to set the variable
- * "tcpconsdebug" to 1.
- */
-
-/*
-#define TCPDEBUG
-*/
diff --git a/c/src/exec/libnetworking/poll.h b/c/src/exec/libnetworking/poll.h
deleted file mode 100644
index 74dfca76c1..0000000000
--- a/c/src/exec/libnetworking/poll.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/*-
- * Copyright (c) 1997 Peter Wemm <peter@freebsd.org>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#ifndef _SYS_POLL_H_
-#define _SYS_POLL_H_
-
-/*
- * This file is intended to be compatable with the traditional poll.h.
- */
-
-/*
- * This structure is passed as an array to poll(2).
- */
-struct pollfd {
- int fd; /* which file descriptor to poll */
- short events; /* events we are interested in */
- short revents; /* events found on return */
-};
-
-/*
- * Requestable events. If poll(2) finds any of these set, they are
- * copied to revents on return.
- * XXX Note that FreeBSD doesn't make much distinction between POLLPRI
- * and POLLRDBAND since none of the file types have distinct priority
- * bands - and only some have an urgent "mode".
- * XXX Note POLLIN isn't really supported in true SVSV terms. Under SYSV
- * POLLIN includes all of normal, band and urgent data. Most poll handlers
- * on FreeBSD only treat it as "normal" data.
- */
-#define POLLIN 0x0001 /* any readable data available */
-#define POLLPRI 0x0002 /* OOB/Urgent readable data */
-#define POLLOUT 0x0004 /* file descriptor is writeable */
-#define POLLRDNORM 0x0040 /* non-OOB/URG data available */
-#define POLLWRNORM POLLOUT /* no write type differentiation */
-#define POLLRDBAND 0x0080 /* OOB/Urgent readable data */
-#define POLLWRBAND 0x0100 /* OOB/Urgent data can be written */
-
-/*
- * FreeBSD extensions: polling on a regular file might return one
- * of these events (currently only supported on UFS).
- */
-#define POLLEXTEND 0x0200 /* file may have been extended */
-#define POLLATTRIB 0x0400 /* file attributes may have changed */
-#define POLLNLINK 0x0800 /* (un)link/rename may have happened */
-#define POLLWRITE 0x1000 /* file's contents may have changed */
-
-/*
- * These events are set if they occur regardless of whether they were
- * requested.
- */
-#define POLLERR 0x0008 /* some poll error occurred */
-#define POLLHUP 0x0010 /* file descriptor was "hung up" */
-#define POLLNVAL 0x0020 /* requested events "invalid" */
-
-#define POLLSTANDARD (POLLIN|POLLPRI|POLLOUT|POLLRDNORM|POLLRDBAND|\
- POLLWRBAND|POLLERR|POLLHUP|POLLNVAL)
-
-/*
- * Request that poll() wait forever.
- * XXX in SYSV, this is defined in stropts.h, which is not included
- * by poll.h.
- */
-#define INFTIM (-1)
-
-#ifndef KERNEL
-
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-/*
- * XXX logically, poll() should be declared in <poll.h>, but SVR4 at
- * least has it here in <sys/poll.h>.
- * XXX poll() has "unsigned long" nfds on SVR4, not unsigned as on the
- * other BSDs.
- */
-int poll __P((struct pollfd *_pfd, unsigned _nfds, int _timeout));
-__END_DECLS
-
-#endif /* !KERNEL */
-
-#endif /* !_SYS_POLL_H_ */
diff --git a/c/src/exec/libnetworking/resolv.h b/c/src/exec/libnetworking/resolv.h
deleted file mode 100644
index 614f204706..0000000000
--- a/c/src/exec/libnetworking/resolv.h
+++ /dev/null
@@ -1,306 +0,0 @@
-/*-
- * Copyright (c) 1983, 1987, 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Portions Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-/*
- * @(#)resolv.h 8.1 (Berkeley) 6/2/93
- * From Id: resolv.h,v 8.12 1998/04/28 19:36:46 halley Exp $
- * $Id$
- */
-
-#ifndef _RESOLV_H_
-#define _RESOLV_H_
-
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/cdefs.h>
-#include <stdio.h>
-
-/*
- * Revision information. This is the release date in YYYYMMDD format.
- * It can change every day so the right thing to do with it is use it
- * in preprocessor commands such as "#if (__RES > 19931104)". Do not
- * compare for equality; rather, use it to determine whether your resolver
- * is new enough to contain a certain feature.
- */
-
-#define __RES 19960801
-
-/*
- * This used to be defined in res_query.c, now it's in herror.c. It was
- * never extern'd by any *.h file before it was placed here. herror.c is
- * part of libresolv.a even though it might make more sense in libnetdb.a
- * or even libnet.a.
- */
-
-extern int h_errno;
-
-/*
- * Resolver configuration file.
- * Normally not present, but may contain the address of the
- * inital name server(s) to query and the domain search list.
- */
-
-#ifndef _PATH_RESCONF
-#define _PATH_RESCONF "/etc/resolv.conf"
-#endif
-
-/*
- * Global defines and variables for resolver stub.
- */
-#define MAXNS 3 /* max # name servers we'll track */
-#define MAXDFLSRCH 3 /* # default domain levels to try */
-#define MAXDNSRCH 6 /* max # domains in search path */
-#define LOCALDOMAINPARTS 2 /* min levels in name that is "local" */
-
-#define RES_TIMEOUT 5 /* min. seconds between retries */
-#define MAXRESOLVSORT 10 /* number of net to sort on */
-#define RES_MAXNDOTS 15 /* should reflect bit field size */
-
-struct __res_state {
- int retrans; /* retransmition time interval */
- int retry; /* number of times to retransmit */
- u_long options; /* option flags - see below. */
- int nscount; /* number of name servers */
- struct sockaddr_in
- nsaddr_list[MAXNS]; /* address of name server */
-#define nsaddr nsaddr_list[0] /* for backward compatibility */
- u_short id; /* current message id */
- char *dnsrch[MAXDNSRCH+1]; /* components of domain to search */
- char defdname[256]; /* default domain (deprecated) */
- u_long pfcode; /* RES_PRF_ flags - see below. */
- unsigned ndots:4; /* threshold for initial abs. query */
- unsigned nsort:4; /* number of elements in sort_list[] */
- char unused[3];
- struct {
- struct in_addr addr;
- u_int32_t mask;
- } sort_list[MAXRESOLVSORT];
- char pad[72]; /* on an i386 this means 512b total */
-};
-
-/*
- * Resolver options (keep these in synch with res_debug.c, please)
- */
-#define RES_INIT 0x00000001 /* address initialized */
-#define RES_DEBUG 0x00000002 /* print debug messages */
-#define RES_AAONLY 0x00000004 /* authoritative answers only (!IMPL)*/
-#define RES_USEVC 0x00000008 /* use virtual circuit */
-#define RES_PRIMARY 0x00000010 /* query primary server only (!IMPL) */
-#define RES_IGNTC 0x00000020 /* ignore truncation errors */
-#define RES_RECURSE 0x00000040 /* recursion desired */
-#define RES_DEFNAMES 0x00000080 /* use default domain name */
-#define RES_STAYOPEN 0x00000100 /* Keep TCP socket open */
-#define RES_DNSRCH 0x00000200 /* search up local domain tree */
-#define RES_INSECURE1 0x00000400 /* type 1 security disabled */
-#define RES_INSECURE2 0x00000800 /* type 2 security disabled */
-#define RES_NOALIASES 0x00001000 /* shuts off HOSTALIASES feature */
-#define RES_USE_INET6 0x00002000 /* use/map IPv6 in gethostbyname() */
-#define RES_NOTLDQUERY 0x00004000 /* Don't query TLD names */
-
-#define RES_DEFAULT (RES_RECURSE | RES_DEFNAMES | RES_DNSRCH)
-
-/*
- * Resolver "pfcode" values. Used by dig.
- */
-#define RES_PRF_STATS 0x00000001
-#define RES_PRF_UPDATE 0x00000002
-#define RES_PRF_CLASS 0x00000004
-#define RES_PRF_CMD 0x00000008
-#define RES_PRF_QUES 0x00000010
-#define RES_PRF_ANS 0x00000020
-#define RES_PRF_AUTH 0x00000040
-#define RES_PRF_ADD 0x00000080
-#define RES_PRF_HEAD1 0x00000100
-#define RES_PRF_HEAD2 0x00000200
-#define RES_PRF_TTLID 0x00000400
-#define RES_PRF_HEADX 0x00000800
-#define RES_PRF_QUERY 0x00001000
-#define RES_PRF_REPLY 0x00002000
-#define RES_PRF_INIT 0x00004000
-/* 0x00008000 */
-
-typedef enum { res_goahead, res_nextns, res_modified, res_done, res_error }
- res_sendhookact;
-
-typedef res_sendhookact (*res_send_qhook)__P((struct sockaddr_in * const *ns,
- const u_char **query,
- int *querylen,
- u_char *ans,
- int anssiz,
- int *resplen));
-
-typedef res_sendhookact (*res_send_rhook)__P((const struct sockaddr_in *ns,
- const u_char *query,
- int querylen,
- u_char *ans,
- int anssiz,
- int *resplen));
-
-struct res_sym {
- int number; /* Identifying number, like T_MX */
- char * name; /* Its symbolic name, like "MX" */
- char * humanname; /* Its fun name, like "mail exchanger" */
-};
-
-extern struct __res_state _res;
-extern const struct res_sym __p_class_syms[];
-extern const struct res_sym __p_type_syms[];
-
-/* Private routines shared between libc/net, named, nslookup and others. */
-#define res_hnok __res_hnok
-#define res_ownok __res_ownok
-#define res_mailok __res_mailok
-#define res_dnok __res_dnok
-#define sym_ston __sym_ston
-#define sym_ntos __sym_ntos
-#define sym_ntop __sym_ntop
-#define b64_ntop __b64_ntop
-#define b64_pton __b64_pton
-#define loc_ntoa __loc_ntoa
-#define loc_aton __loc_aton
-#define fp_resstat __fp_resstat
-#define p_query __p_query
-#define dn_skipname __dn_skipname
-#define fp_resstat __fp_resstat
-#define fp_query __fp_query
-#define fp_nquery __fp_nquery
-#define hostalias __hostalias
-#define putlong __putlong
-#define putshort __putshort
-#define p_class __p_class
-#define p_time __p_time
-#define p_type __p_type
-#define p_query __p_query
-#define p_cdnname __p_cdnname
-#define p_section __p_section
-#define p_cdname __p_cdname
-#define p_fqnname __p_fqnname
-#define p_fqname __p_fqname
-#define p_option __p_option
-#define p_secstodate __p_secstodate
-#define dn_count_labels __dn_count_labels
-#define dn_comp __dn_comp
-#define dn_expand __dn_expand
-#define res_init __res_init
-#define res_randomid __res_randomid
-#define res_query __res_query
-#define res_search __res_search
-#define res_querydomain __res_querydomain
-#define res_mkquery __res_mkquery
-#define res_send __res_send
-#define res_isourserver __res_isourserver
-#define res_nameinquery __res_nameinquery
-#define res_queriesmatch __res_queriesmatch
-#define res_close __res_close
-#define res_mkupdate __res_mkupdate
-#define res_mkupdrec __res_mkupdrec
-#define res_freeupdrec __res_freeupdrec
-
-__BEGIN_DECLS
-int res_hnok __P((const char *));
-int res_ownok __P((const char *));
-int res_mailok __P((const char *));
-int res_dnok __P((const char *));
-int sym_ston __P((const struct res_sym *, const char *, int *));
-const char * sym_ntos __P((const struct res_sym *, int, int *));
-const char * sym_ntop __P((const struct res_sym *, int, int *));
-int b64_ntop __P((u_char const *, size_t, char *, size_t));
-int b64_pton __P((char const *, u_char *, size_t));
-int loc_aton __P((const char *, u_char *));
-const char * loc_ntoa __P((const u_char *, char *));
-int dn_skipname __P((const u_char *, const u_char *));
-void fp_resstat __P((struct __res_state *, FILE *));
-void fp_query __P((const u_char *, FILE *));
-void fp_nquery __P((const u_char *, int, FILE *));
-const char * hostalias __P((const char *));
-void putlong __P((u_int32_t, u_char *));
-void putshort __P((u_int16_t, u_char *));
-const char * p_class __P((int));
-const char * p_time __P((u_int32_t));
-const char * p_type __P((int));
-void p_query __P((const u_char *));
-const u_char * p_cdnname __P((const u_char *, const u_char *, int, FILE *));
-const u_char * p_cdname __P((const u_char *, const u_char *, FILE *));
-const u_char * p_fqnname __P((const u_char *, const u_char *,
- int, char *, int));
-const u_char * p_fqname __P((const u_char *, const u_char *, FILE *));
-const char * p_option __P((u_long));
-char * p_secstodate __P((u_long));
-int dn_count_labels __P((const char *));
-int dn_comp __P((const char *, u_char *, int,
- u_char **, u_char **));
-int dn_expand __P((const u_char *, const u_char *, const u_char *,
- char *, int));
-int res_init __P((void));
-u_int res_randomid __P((void));
-int res_query __P((const char *, int, int, u_char *, int));
-int res_search __P((const char *, int, int, u_char *, int));
-int res_querydomain __P((const char *, const char *, int, int,
- u_char *, int));
-int res_mkquery __P((int, const char *, int, int, const u_char *,
- int, const u_char *, u_char *, int));
-int res_send __P((const u_char *, int, u_char *, int));
-int res_isourserver __P((const struct sockaddr_in *));
-int res_nameinquery __P((const char *, int, int,
- const u_char *, const u_char *));
-int res_queriesmatch __P((const u_char *, const u_char *,
- const u_char *, const u_char *));
-void res_close __P((void));
-const char * p_section __P((int, int));
-/* XXX The following depend on the ns_updrec typedef in arpa/nameser.h */
-#ifdef _ARPA_NAMESER_H_
-int res_update __P((ns_updrec *));
-int res_mkupdate __P((ns_updrec *, u_char *, int));
-ns_updrec * res_mkupdrec __P((int, const char *, u_int, u_int, u_long));
-void res_freeupdrec __P((ns_updrec *));
-#endif
-__END_DECLS
-
-#endif /* !_RESOLV_H_ */
diff --git a/c/src/exec/libnetworking/rtems/Makefile.am b/c/src/exec/libnetworking/rtems/Makefile.am
deleted file mode 100644
index 28df4629c4..0000000000
--- a/c/src/exec/libnetworking/rtems/Makefile.am
+++ /dev/null
@@ -1,41 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-LIBNAME = lib.a
-LIB = $(ARCH)/$(LIBNAME)
-
-C_FILES = sghostname.c issetugid.c rtems_glue.c rtems_syscall.c \
- rtems_bootp.c rtems_showmbuf.c rtems_showroute.c rtems_showifstat.c \
- rtems_showipstat.c rtems_showicmpstat.c rtems_showtcpstat.c \
- rtems_showudpstat.c rtems_select.c
-C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
-
-OBJS = $(C_O_FILES)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../automake/lib.am
-
-#
-# Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -D_COMPILING_BSD_KERNEL_ -DKERNEL -DINET -DNFS -DDIAGNOSTIC \
- -DBOOTP_COMPAT
-
-$(LIB): $(OBJS)
- $(make-library)
-
-all-local: $(ARCH) $(OBJS) $(LIB)
-
-.PRECIOUS: $(LIB)
-
-EXTRA_DIST = issetugid.c rtems_bootp.c rtems_bsdnet.h \
- rtems_bsdnet_internal.h rtems_glue.c rtems_select.c rtems_showicmpstat.c \
- rtems_showifstat.c rtems_showipstat.c rtems_showmbuf.c rtems_showroute.c \
- rtems_showtcpstat.c rtems_showudpstat.c rtems_syscall.c sghostname.c \
- tftp.h
-
-include $(top_srcdir)/../../../automake/local.am
diff --git a/c/src/exec/libnetworking/rtems/issetugid.c b/c/src/exec/libnetworking/rtems/issetugid.c
deleted file mode 100644
index 3baf0ec88b..0000000000
--- a/c/src/exec/libnetworking/rtems/issetugid.c
+++ /dev/null
@@ -1,11 +0,0 @@
-/*
- * Dummy version of BSD routine
- *
- * $Id$
- */
-
-int
-issetugid (void)
-{
- return 0;
-}
diff --git a/c/src/exec/libnetworking/rtems/rtems_bootp.c b/c/src/exec/libnetworking/rtems/rtems_bootp.c
deleted file mode 100644
index 47e3db758f..0000000000
--- a/c/src/exec/libnetworking/rtems/rtems_bootp.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * $Id$
- */
-
-#include <rtems.h>
-#include <rtems/error.h>
-#include <sys/types.h>
-#include <rtems/rtems_bsdnet.h>
-
-/*
- * Perform a BOOTP request
- */
-void
-rtems_bsdnet_do_bootp (void)
-{
- rtems_bsdnet_semaphore_obtain ();
- bootpc_init ();
- rtems_bsdnet_semaphore_release ();
-}
diff --git a/c/src/exec/libnetworking/rtems/rtems_bsdnet.h b/c/src/exec/libnetworking/rtems/rtems_bsdnet.h
deleted file mode 100644
index 5be2e932f9..0000000000
--- a/c/src/exec/libnetworking/rtems/rtems_bsdnet.h
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * $Id$
- */
-
-#ifndef _RTEMS_BSDNET_
-#define _RTEMS_BSDNET_
-
-#include <rtems.h>
-
-/*
- * If this file is included from inside the Network Stack proper or
- * a device driver, then __INSIDE_RTEMS_BSD_TCPIP_STACK__ should be
- * defined. This triggers a number of internally used definitions.
- */
-
-#if defined(__INSIDE_RTEMS_BSD_TCPIP_STACK__)
-#undef _COMPILING_BSD_KERNEL_
-#undef KERNEL
-#undef INET
-#undef NFS
-#undef DIAGNOSTIC
-#undef BOOTP_COMPAT
-
-#define _COMPILING_BSD_KERNEL_
-#define KERNEL
-#define INET
-#define NFS
-#define DIAGNOSTIC
-#define BOOTP_COMPAT
-#endif
-
-/*
- * Values that may be obtained by BOOTP
- */
-extern struct in_addr rtems_bsdnet_bootp_server_address;
-extern char *rtems_bsdnet_bootp_server_name;
-extern char *rtems_bsdnet_bootp_boot_file_name;
-extern struct in_addr rtems_bsdnet_ntpserver[];
-extern int rtems_bsdnet_ntpserver_count;
-extern long rtems_bsdnet_timeoffset;
-
-/*
- * Manipulate routing tables
- */
-struct sockaddr;
-struct rtentry;
-int rtems_bsdnet_rtrequest (
- int req,
- struct sockaddr *dst,
- struct sockaddr *gateway,
- struct sockaddr *netmask,
- int flags,
- struct rtentry **net_nrt);
-
-/*
- * Diagnostics
- */
-void rtems_bsdnet_show_inet_routes (void);
-void rtems_bsdnet_show_mbuf_stats (void);
-void rtems_bsdnet_show_if_stats (void);
-void rtems_bsdnet_show_ip_stats (void);
-void rtems_bsdnet_show_icmp_stats (void);
-void rtems_bsdnet_show_udp_stats (void);
-void rtems_bsdnet_show_tcp_stats (void);
-
-/*
- * Network configuration
- */
-struct rtems_bsdnet_ifconfig {
- /*
- * These two entries must be supplied for each interface.
- */
- char *name;
- int (*attach)(struct rtems_bsdnet_ifconfig *conf);
-
- /*
- * Link to next interface
- */
- struct rtems_bsdnet_ifconfig *next;
-
- /*
- * The following entries may be obtained
- * from BOOTP or explicitily supplied.
- */
- char *ip_address;
- char *ip_netmask;
- void *hardware_address;
-
- /*
- * The driver assigns defaults values to the following
- * entries if they are not explicitly supplied.
- */
- int ignore_broadcast;
- int mtu;
- int rbuf_count;
- int xbuf_count;
-
- /*
- * For external ethernet controller board the following
- * parameters are needed
- */
- unsigned int port; /* port of the board */
- unsigned int irno; /* irq of the board */
- unsigned int bpar; /* memory of the board */
-
-};
-
-struct rtems_bsdnet_config {
- /*
- * This entry points to the head of the ifconfig chain.
- */
- struct rtems_bsdnet_ifconfig *ifconfig;
-
- /*
- * This entry should be rtems_bsdnet_do_bootp if BOOTP
- * is being used to configure the network, and NULL
- * if BOOTP is not being used.
- */
- void (*bootp)(void);
-
- /*
- * The remaining items can be initialized to 0, in
- * which case the default value will be used.
- */
- rtems_task_priority network_task_priority; /* 100 */
- unsigned long mbuf_bytecount; /* 64 kbytes */
- unsigned long mbuf_cluster_bytecount; /* 128 kbytes */
- char *hostname; /* BOOTP */
- char *domainname; /* BOOTP */
- char *gateway; /* BOOTP */
- char *log_host; /* BOOTP */
- char *name_server[3]; /* BOOTP */
- char *ntp_server[3]; /* BOOTP */
-};
-extern struct rtems_bsdnet_config rtems_bsdnet_config;
-int rtems_bsdnet_initialize_network (void);
-void rtems_bsdnet_do_bootp (void);
-int rtems_bsdnet_synchronize_ntp (int interval, rtems_task_priority priority);
-
-#endif /* _RTEMS_BSDNET_ */
diff --git a/c/src/exec/libnetworking/rtems/rtems_bsdnet_internal.h b/c/src/exec/libnetworking/rtems/rtems_bsdnet_internal.h
deleted file mode 100644
index 51b7b919eb..0000000000
--- a/c/src/exec/libnetworking/rtems/rtems_bsdnet_internal.h
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * Declarations to fit FreeBSD to RTEMS.
- *
- *******************************************************************
- * WARNING *
- * This file should *never* be included by any application program *
- *******************************************************************
- *
- * $Id$
- */
-
-#ifndef _RTEMS_BSDNET_INTERNAL_H_
-#define _RTEMS_BSDNET_INTERNAL_H_
-
-typedef unsigned int vm_offset_t;
-typedef long long vm_ooffset_t;
-typedef unsigned int vm_pindex_t;
-typedef unsigned int vm_size_t;
-
-#define _BSD_OFF_T_ rtems_signed32
-#define _BSD_PID_T_ rtems_id
-#define _BSD_VA_LIST_ char *
-
-/* make sure we get the network versions of these */
-#include "../machine/types.h"
-#include "../machine/param.h"
-
-#include <sys/time.h>
-struct itimerval {
- struct timeval it_interval;
- struct timeval it_value;
-};
-struct mdproc {
- int md_flags;
- int *md_regs;
-};
-
-#define USHRT_MAX 65535
-
-/*
- * Other RTEMS/BSD glue
- */
-struct socket;
-extern int soconnsleep (struct socket *so);
-extern void soconnwakeup (struct socket *so);
-#define splnet() 0
-#define splimp() 0
-#define splx(_s) do { (_s) = 0; } while(0)
-
-#define ovbcopy(f,t,n) bcopy(f,t,n)
-#define copyout(f,t,n) (memcpy(t,f,n),0)
-#define copyin(f,t,n) (memcpy(t,f,n),0)
-
-#define random() rtems_bsdnet_random()
-#define panic rtems_panic
-#define suser(a,b) 0
-
-void microtime (struct timeval *tv);
-#define hz rtems_bsdnet_ticks_per_second
-#define tick rtems_bsdnet_microseconds_per_tick
-
-#define log rtems_bsdnet_log
-
-/*
- * Since we can't have two sys/types.h files, we'll hack around
- * and copy the contents of the BSD sys/types.h to here....
- */
-#include <sys/cdefs.h>
-
-typedef u_int64_t u_quad_t; /* quads */
-typedef int64_t quad_t;
-typedef quad_t * qaddr_t;
-
-typedef void __sighandler_t __P((int));
-typedef __sighandler_t *sig_t; /* type of pointer to a signal function */
-#define NSIG 32
-struct sigaltstack {
- char *ss_sp; /* signal stack base */
- int ss_size; /* signal stack length */
- int ss_flags; /* SS_DISABLE and/or SS_ONSTACK */
-};
-
-#ifdef KERNEL
-typedef int boolean_t;
-typedef struct vm_page *vm_page_t;
-#endif
-
-#ifndef _POSIX_SOURCE
-/*
- * minor() gives a cookie instead of an index since we don't want to
- * change the meanings of bits 0-15 or waste time and space shifting
- * bits 16-31 for devices that don't use them.
- */
-#define major(x) ((int)(((u_int)(x) >> 8)&0xff)) /* major number */
-#define minor(x) ((int)((x)&0xffff00ff)) /* minor number */
-#define makedev(x,y) ((dev_t)(((x) << 8) | (y))) /* create dev_t */
-#endif
-
-#include <machine/endian.h>
-
-typedef quad_t rlim_t; /* resource limit */
-typedef u_int32_t fixpt_t; /* fixed point number */
-
-/*
- * Forward structure declarations for function prototypes. We include the
- * common structures that cross subsystem boundaries here; others are mostly
- * used in the same place that the structure is defined.
- */
-struct proc;
-struct pgrp;
-struct ucred;
-struct rusage;
-struct file;
-struct buf;
-struct tty;
-struct uio;
-struct rtems_bsdnet_ifconfig;
-
-/*
- * Redo kernel memory allocation
- */
-#define malloc rtems_bsdnet_malloc
-#define free rtems_bsdnet_free
-
-#define M_NOWAIT 0x0001
-void *rtems_bsdnet_malloc (unsigned long size, int type, int flags);
-void rtems_bsdnet_free (void *addr, int type);
-
-void rtems_bsdnet_semaphore_obtain (void);
-void rtems_bsdnet_semaphore_release (void);
-void rtems_bsdnet_schednetisr (int n);
-int rtems_bsdnet_parse_driver_name (const struct rtems_bsdnet_ifconfig *config, char **namep);
-
-unsigned long rtems_bsdnet_seconds_since_boot (void);
-unsigned long rtems_bsdnet_random (void);
-
-rtems_id rtems_bsdnet_newproc (
- char *name,
- int stacksize,
- void (*entry)(void *),
- void *arg
-);
-
-rtems_status_code rtems_bsdnet_event_receive (
- rtems_event_set event_in,
- rtems_option option_set,
- rtems_interval ticks,
- rtems_event_set *event_out
-);
-
-/*
- * Network configuration
- */
-extern int rtems_bsdnet_ticks_per_second;
-extern int rtems_bsdnet_microseconds_per_tick;
-extern struct in_addr rtems_bsdnet_log_host_address;
-extern char *rtems_bsdnet_domain_name;
-extern struct in_addr rtems_bsdnet_nameserver[];
-extern int rtems_bsdnet_nameserver_count;
-
-/*
- * Internal IOCTL command
- */
-#define SIO_RTEMS_SHOW_STATS _IO('i', 250)
-
-/*
- * Some extra prototypes
- */
-int sethostname (char *name, size_t namelen);
-void domaininit (void *);
-void ifinit (void *);
-void ipintr (void);
-void arpintr (void);
-void bootpc_init(void);
-int socket (int, int, int);
-int ioctl (int, int, ...);
-
-/*
- * Events used by networking routines.
- * Everything will break if the application
- * tries to use these events or if the `sleep'
- * events are equal to any of the NETISR * events.
- */
-#define SBWAIT_EVENT RTEMS_EVENT_24
-#define SOSLEEP_EVENT RTEMS_EVENT_25
-#define NETISR_IP_EVENT (1 << NETISR_IP)
-#define NETISR_ARP_EVENT (1 << NETISR_ARP)
-#define NETISR_EVENTS (NETISR_IP_EVENT|NETISR_ARP_EVENT)
-#if (SBWAIT_EVENT & SOSLEEP_EVENT & NETISR_EVENTS)
-# error "Network event conflict"
-#endif
-
-#endif /* _RTEMS_BSDNET_INTERNAL_H_ */
diff --git a/c/src/exec/libnetworking/rtems/rtems_glue.c b/c/src/exec/libnetworking/rtems/rtems_glue.c
deleted file mode 100644
index 4213b91a2c..0000000000
--- a/c/src/exec/libnetworking/rtems/rtems_glue.c
+++ /dev/null
@@ -1,1020 +0,0 @@
-/*
- * $Id$
- */
-
-#include <string.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <errno.h>
-
-#include <rtems.h>
-#include <rtems/libio.h>
-#include <rtems/error.h>
-#include <rtems/rtems_bsdnet.h>
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/domain.h>
-#include <sys/mbuf.h>
-#include <sys/socketvar.h>
-#include <sys/socket.h>
-#include <sys/sockio.h>
-#include <sys/callout.h>
-#include <sys/proc.h>
-#include <sys/ioctl.h>
-#include <net/if.h>
-#include <net/route.h>
-#include <netinet/in.h>
-#include <vm/vm.h>
-#include <arpa/inet.h>
-
-#include <net/netisr.h>
-#include <net/route.h>
-
-/*
- * Memory allocation
- */
-static int nmbuf = (64 * 1024) / MSIZE;
- int nmbclusters = (128 * 1024) / MCLBYTES;
-
-/*
- * Socket buffering parameters
- */
-unsigned long sb_efficiency = 8;
-
-/*
- * Network task synchronization
- */
-static rtems_id networkSemaphore;
-static rtems_id networkDaemonTid;
-static rtems_unsigned32 networkDaemonPriority;
-static void networkDaemon (void *task_argument);
-
-/*
- * Network timing
- */
-int rtems_bsdnet_ticks_per_second;
-int rtems_bsdnet_microseconds_per_tick;
-
-/*
- * Callout processing
- */
-static rtems_interval ticksWhenCalloutsLastChecked;
-static struct callout *callfree, calltodo;
-
-/*
- * FreeBSD variables
- */
-int nfs_diskless_valid;
-
-/*
- * BOOTP values
- */
-struct in_addr rtems_bsdnet_log_host_address;
-struct in_addr rtems_bsdnet_bootp_server_address;
-char *rtems_bsdnet_bootp_boot_file_name;
-char *rtems_bsdnet_bootp_server_name;
-char *rtems_bsdnet_domain_name;
-struct in_addr rtems_bsdnet_nameserver[sizeof rtems_bsdnet_config.name_server /
- sizeof rtems_bsdnet_config.name_server[0]];
-int rtems_bsdnet_nameserver_count;
-struct in_addr rtems_bsdnet_ntpserver[sizeof rtems_bsdnet_config.ntp_server /
- sizeof rtems_bsdnet_config.ntp_server[0]];
-int rtems_bsdnet_ntpserver_count;
-long rtems_bsdnet_timeoffset;
-
-/*
- * Perform FreeBSD memory allocation.
- * FIXME: This should be modified to keep memory allocation statistics.
- */
-#undef malloc
-#undef free
-extern void *malloc (size_t);
-extern void free (void *);
-void *
-rtems_bsdnet_malloc (unsigned long size, int type, int flags)
-{
- void *p;
- int try = 0;
-
- for (;;) {
- p = malloc (size);
- if (p || (flags & M_NOWAIT))
- return p;
- rtems_bsdnet_semaphore_release ();
- if (++try >= 30) {
- printf ("rtems_bsdnet_malloc still waiting.\n");
- try = 0;
- }
- rtems_task_wake_after (rtems_bsdnet_ticks_per_second);
- rtems_bsdnet_semaphore_obtain ();
- }
-}
-
-/*
- * Free FreeBSD memory
- * FIXME: This should be modified to keep memory allocation statistics.
- */
-void
-rtems_bsdnet_free (void *addr, int type)
-{
- free (addr);
-}
-
-/*
- * Do the initializations required by the BSD code
- */
-static int
-bsd_init (void)
-{
- int i;
- char *p;
-
- /*
- * Set up mbuf cluster data strutures
- */
- p = malloc ((nmbclusters*MCLBYTES)+MCLBYTES-1);
- p = (char *)(((unsigned long)p + (MCLBYTES-1)) & ~(MCLBYTES-1));
- if (p == NULL) {
- printf ("Can't get network cluster memory.\n");
- return -1;
- }
- mbutl = (struct mbuf *)p;
- for (i = 0; i < nmbclusters; i++) {
- ((union mcluster *)p)->mcl_next = mclfree;
- mclfree = (union mcluster *)p;
- p += MCLBYTES;
- mbstat.m_clfree++;
- }
- mbstat.m_clusters = nmbclusters;
- mclrefcnt = malloc (nmbclusters);
- if (mclrefcnt == NULL) {
- printf ("Can't get mbuf cluster reference counts memory.\n");
- return -1;
- }
- memset (mclrefcnt, '\0', nmbclusters);
-
- /*
- * Set up mbuf data structures
- */
-
- p = malloc(nmbuf * MSIZE + MSIZE - 1);
- p = (char *)(((unsigned int)p + MSIZE - 1) & ~(MSIZE - 1));
- if (p == NULL) {
- printf ("Can't get network memory.\n");
- return -1;
- }
- for (i = 0; i < nmbuf; i++) {
- ((struct mbuf *)p)->m_next = mmbfree;
- mmbfree = (struct mbuf *)p;
- p += MSIZE;
- }
- mbstat.m_mbufs = nmbuf;
- mbstat.m_mtypes[MT_FREE] = nmbuf;
-
- /*
- * Set up domains
- */
- {
- extern struct domain routedomain;
- extern struct domain inetdomain;
-
- routedomain.dom_next = domains;
- domains = &routedomain;
- inetdomain.dom_next = domains;
- domains = &inetdomain;
- domaininit (NULL);
- }
-
- /*
- * Set up interfaces
- */
- ifinit (NULL);
- return 0;
-}
-
-/*
- * Initialize and start network operations
- */
-static int
-rtems_bsdnet_initialize (void)
-{
- rtems_status_code sc;
-
- /*
- * Set the priority of all network tasks
- */
- if (rtems_bsdnet_config.network_task_priority == 0)
- networkDaemonPriority = 100;
- else
- networkDaemonPriority = rtems_bsdnet_config.network_task_priority;
-
- /*
- * Set the memory allocation limits
- */
- if (rtems_bsdnet_config.mbuf_bytecount)
- nmbuf = rtems_bsdnet_config.mbuf_bytecount / MSIZE;
- if (rtems_bsdnet_config.mbuf_cluster_bytecount)
- nmbclusters = rtems_bsdnet_config.mbuf_cluster_bytecount / MCLBYTES;
-
- /*
- * Create the task-synchronization semaphore
- */
- sc = rtems_semaphore_create (rtems_build_name('B', 'S', 'D', 'n'),
- 0,
- RTEMS_FIFO |
- RTEMS_BINARY_SEMAPHORE |
- RTEMS_NO_INHERIT_PRIORITY |
- RTEMS_NO_PRIORITY_CEILING |
- RTEMS_LOCAL,
- 0,
- &networkSemaphore);
- if (sc != RTEMS_SUCCESSFUL) {
- printf ("Can't create network seamphore: `%s'\n", rtems_status_text (sc));
- return -1;
- }
-
- /*
- * Compute clock tick conversion factors
- */
- rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &rtems_bsdnet_ticks_per_second);
- if (rtems_bsdnet_ticks_per_second <= 0)
- rtems_bsdnet_ticks_per_second = 1;
- rtems_bsdnet_microseconds_per_tick = 1000000 / rtems_bsdnet_ticks_per_second;
-
- /*
- * Ensure that `seconds' is greater than 0
- */
- rtems_task_wake_after (rtems_bsdnet_ticks_per_second);
-
- /*
- * Set up BSD-style sockets
- */
- if (bsd_init () < 0)
- return -1;
-
- /*
- * Start network daemon
- */
- networkDaemonTid = rtems_bsdnet_newproc ("ntwk", 4096, networkDaemon, NULL);
-
- /*
- * Let other network tasks begin
- */
- rtems_bsdnet_semaphore_release ();
- return 0;
-}
-
-/*
- * Obtain network mutex
- */
-void
-rtems_bsdnet_semaphore_obtain (void)
-{
- rtems_status_code sc;
-
- sc = rtems_semaphore_obtain (networkSemaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
- if (sc != RTEMS_SUCCESSFUL)
- rtems_panic ("Can't obtain network semaphore: `%s'\n", rtems_status_text (sc));
-}
-
-/*
- * Release network mutex
- */
-void
-rtems_bsdnet_semaphore_release (void)
-{
- rtems_status_code sc;
-
- sc = rtems_semaphore_release (networkSemaphore);
- if (sc != RTEMS_SUCCESSFUL)
- rtems_panic ("Can't release network semaphore: `%s'\n", rtems_status_text (sc));
- }
-
-/*
- * Wait for something to happen to a socket buffer
- */
-int
-sbwait(sb)
- struct sockbuf *sb;
-{
- rtems_event_set events;
- rtems_id tid;
- rtems_status_code sc;
-
- /*
- * Soak up any pending events.
- * The sleep/wakeup synchronization in the FreeBSD
- * kernel has no memory.
- */
- rtems_event_receive (SBWAIT_EVENT, RTEMS_EVENT_ANY | RTEMS_NO_WAIT, RTEMS_NO_TIMEOUT, &events);
-
- /*
- * Set this task as the target of the wakeup operation.
- */
- rtems_task_ident (RTEMS_SELF, 0, &tid);
- sb->sb_sel.si_pid = tid;
-
- /*
- * Show that socket is waiting
- */
- sb->sb_flags |= SB_WAIT;
-
- /*
- * Release the network semaphore.
- */
- rtems_bsdnet_semaphore_release ();
-
- /*
- * Wait for the wakeup event.
- */
- sc = rtems_event_receive (SBWAIT_EVENT, RTEMS_EVENT_ANY | RTEMS_WAIT, sb->sb_timeo, &events);
-
- /*
- * Reobtain the network semaphore.
- */
- rtems_bsdnet_semaphore_obtain ();
-
- /*
- * Return the status of the wait.
- */
- switch (sc) {
- case RTEMS_SUCCESSFUL: return 0;
- case RTEMS_TIMEOUT: return EWOULDBLOCK;
- default: return ENXIO;
- }
-}
-
-
-/*
- * Wake up the task waiting on a socket buffer.
- */
-void
-sowakeup(so, sb)
- register struct socket *so;
- register struct sockbuf *sb;
-{
- if (sb->sb_flags & SB_WAIT) {
- sb->sb_flags &= ~SB_WAIT;
- rtems_event_send (sb->sb_sel.si_pid, SBWAIT_EVENT);
- }
- if (sb->sb_wakeup) {
- (*sb->sb_wakeup) (so, sb->sb_wakeuparg);
- }
-}
-
-/*
- * For now, a socket can be used by only one task at a time.
- */
-int
-sb_lock(sb)
- register struct sockbuf *sb;
-{
- rtems_panic ("Socket buffer is already in use.");
- return 0;
-}
-void
-wakeup (void *p)
-{
- rtems_panic ("Wakeup called");
-}
-
-/*
- * Wait for a connection/disconnection event.
- */
-int
-soconnsleep (struct socket *so)
-{
- rtems_event_set events;
- rtems_id tid;
- rtems_status_code sc;
-
- /*
- * Soak up any pending events.
- * The sleep/wakeup synchronization in the FreeBSD
- * kernel has no memory.
- */
- rtems_event_receive (SOSLEEP_EVENT, RTEMS_EVENT_ANY | RTEMS_NO_WAIT, RTEMS_NO_TIMEOUT, &events);
-
- /*
- * Set this task as the target of the wakeup operation.
- */
- if (so->so_pgid)
- rtems_panic ("Another task is already sleeping on that socket");
- rtems_task_ident (RTEMS_SELF, 0, &tid);
- so->so_pgid = tid;
-
- /*
- * Wait for the wakeup event.
- */
- sc = rtems_bsdnet_event_receive (SOSLEEP_EVENT, RTEMS_EVENT_ANY | RTEMS_WAIT, so->so_rcv.sb_timeo, &events);
-
- /*
- * Relinquish ownership of the socket.
- */
- so->so_pgid = 0;
-
- switch (sc) {
- case RTEMS_SUCCESSFUL: return 0;
- case RTEMS_TIMEOUT: return EWOULDBLOCK;
- default: return ENXIO;
- }
-}
-
-/*
- * Wake up a task waiting for a connection/disconnection to complete.
- */
-void
-soconnwakeup (struct socket *so)
-{
- if (so->so_pgid)
- rtems_event_send (so->so_pgid, SOSLEEP_EVENT);
-}
-
-/*
- * Send an event to the network daemon.
- * This corresponds to sending a software interrupt in the BSD kernel.
- */
-void
-rtems_bsdnet_schednetisr (int n)
-{
- rtems_event_send (networkDaemonTid, 1 << n);
-}
-
-/*
- * The network daemon
- * This provides a context to run BSD software interrupts
- */
-static void
-networkDaemon (void *task_argument)
-{
- rtems_event_set events;
- rtems_interval now;
- int ticksPassed;
- unsigned32 timeout;
- struct callout *c;
-
- for (;;) {
- c = calltodo.c_next;
- if (c)
- timeout = c->c_time;
- else
- timeout = RTEMS_NO_TIMEOUT;
- rtems_bsdnet_event_receive (NETISR_EVENTS,
- RTEMS_EVENT_ANY | RTEMS_WAIT,
- timeout,
- &events);
- if (events & NETISR_IP_EVENT)
- ipintr ();
- if (events & NETISR_ARP_EVENT)
- arpintr ();
- rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now);
- ticksPassed = now - ticksWhenCalloutsLastChecked;
- if (ticksPassed != 0) {
- ticksWhenCalloutsLastChecked = now;
-
- c = calltodo.c_next;
- if (c) {
- c->c_time -= ticksPassed;
- while ((c = calltodo.c_next) != NULL && c->c_time <= 0) {
- void *arg;
- void (*func) (void *);
-
- func = c->c_func;
- arg = c->c_arg;
- calltodo.c_next = c->c_next;
- c->c_next = callfree;
- callfree = c;
- (*func)(arg);
- }
- }
- }
- }
-}
-
-/*
- * Structure passed to task-start stub
- */
-struct newtask {
- void (*entry)(void *);
- void *arg;
-};
-
-/*
- * Task-start stub
- */
-static void
-taskEntry (rtems_task_argument arg)
-{
- struct newtask t;
-
- /*
- * Pick up task information and free
- * the memory allocated to pass the
- * information to this task.
- */
- t = *(struct newtask *)arg;
- free ((struct newtask *)arg);
-
- /*
- * Enter the competition for the network semaphore
- */
- rtems_bsdnet_semaphore_obtain ();
-
- /*
- * Enter the task
- */
- (*t.entry)(t.arg);
- rtems_panic ("Network task returned!\n");
-}
-
-/*
- * Start a network task
- */
-rtems_id
-rtems_bsdnet_newproc (char *name, int stacksize, void(*entry)(void *), void *arg)
-{
- struct newtask *t;
- char nm[4];
- rtems_id tid;
- rtems_status_code sc;
-
- strncpy (nm, name, 4);
- sc = rtems_task_create (rtems_build_name(nm[0], nm[1], nm[2], nm[3]),
- networkDaemonPriority,
- stacksize,
- RTEMS_PREEMPT|RTEMS_NO_TIMESLICE|RTEMS_NO_ASR|RTEMS_INTERRUPT_LEVEL(0),
- RTEMS_NO_FLOATING_POINT|RTEMS_LOCAL,
- &tid);
- if (sc != RTEMS_SUCCESSFUL)
- rtems_panic ("Can't create network daemon `%s': `%s'\n", name, rtems_status_text (sc));
-
- /*
- * Set up task arguments
- */
- t = malloc (sizeof *t);
- t->entry = entry;
- t->arg = arg;
-
- /*
- * Start the task
- */
- sc = rtems_task_start (tid, taskEntry, (rtems_task_argument)t);
- if (sc != RTEMS_SUCCESSFUL)
- rtems_panic ("Can't start network daemon `%s': `%s'\n", name, rtems_status_text (sc));
-
- /*
- * Let our caller know the i.d. of the new task
- */
- return tid;
-}
-
-rtems_status_code rtems_bsdnet_event_receive (
- rtems_event_set event_in,
- rtems_option option_set,
- rtems_interval ticks,
- rtems_event_set *event_out)
-{
- rtems_status_code sc;
-
- rtems_bsdnet_semaphore_release ();
- sc = rtems_event_receive (event_in, option_set, ticks, event_out);
- rtems_bsdnet_semaphore_obtain ();
- return sc;
-}
-
-/*
- * Return time since startup
- */
-void
-microtime (struct timeval *t)
-{
- rtems_interval now;
-
- rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now);
- t->tv_sec = now / rtems_bsdnet_ticks_per_second;
- t->tv_usec = (now % rtems_bsdnet_ticks_per_second) * rtems_bsdnet_microseconds_per_tick;
-}
-
-unsigned long
-rtems_bsdnet_seconds_since_boot (void)
-{
- rtems_interval now;
-
- rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now);
- return now / rtems_bsdnet_ticks_per_second;
-}
-
-/*
- * Fake random number generator
- */
-unsigned long
-rtems_bsdnet_random (void)
-{
- rtems_interval now;
-
- rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now);
- return (now * 99991);
-}
-
-/*
- * Callout list processing
- */
-void
-timeout(void (*ftn)(void *), void *arg, int ticks)
-{
- register struct callout *new, *p, *t;
-
- if (ticks <= 0)
- ticks = 1;
-
- /* Fill in the next free callout structure. */
- if (callfree == NULL) {
- callfree = malloc (sizeof *callfree);
- if (callfree == NULL)
- rtems_panic ("No memory for timeout table entry");
- callfree->c_next = NULL;
- }
-
- new = callfree;
- callfree = new->c_next;
- new->c_arg = arg;
- new->c_func = ftn;
-
- /*
- * The time for each event is stored as a difference from the time
- * of the previous event on the queue. Walk the queue, correcting
- * the ticks argument for queue entries passed. Correct the ticks
- * value for the queue entry immediately after the insertion point
- * as well. Watch out for negative c_time values; these represent
- * overdue events.
- */
- for (p = &calltodo;
- (t = p->c_next) != NULL && ticks > t->c_time; p = t)
- if (t->c_time > 0)
- ticks -= t->c_time;
- new->c_time = ticks;
- if (t != NULL)
- t->c_time -= ticks;
-
- /* Insert the new entry into the queue. */
- p->c_next = new;
- new->c_next = t;
-}
-
-/*
- * Ticks till specified time
- * XXX: This version worries only about seconds, but that's good
- * enough for the way the network code uses this routine.
- */
-int
-hzto(struct timeval *tv)
-{
- long diff = tv->tv_sec - rtems_bsdnet_seconds_since_boot();
-
- if (diff <= 0)
- return 1;
- return diff * rtems_bsdnet_ticks_per_second;
-}
-
-/*
- * Kernel debugging
- */
-int rtems_bsdnet_log_priority;
-void
-rtems_bsdnet_log (int priority, const char *fmt, ...)
-{
- va_list args;
-
- if (priority & rtems_bsdnet_log_priority) {
- va_start (args, fmt);
- vprintf (fmt, args);
- va_end (args);
- }
-}
-
-/*
- * IP header checksum routine for processors which don't have an inline version
- */
-u_int
-in_cksum_hdr (const void *ip)
-{
- rtems_unsigned32 sum;
- const rtems_unsigned16 *sp;
- int i;
-
- sum = 0;
- sp = (rtems_unsigned16 *)ip;
- for (i = 0 ; i < 10 ; i++)
- sum += *sp++;
- while (sum > 0xFFFF)
- sum = (sum & 0xffff) + (sum >> 16);
- return ~sum & 0xFFFF;
-}
-
-/*
- * Manipulate routing tables
- */
-int rtems_bsdnet_rtrequest (
- int req,
- struct sockaddr *dst,
- struct sockaddr *gateway,
- struct sockaddr *netmask,
- int flags,
- struct rtentry **net_nrt)
-{
- int error;
-
- rtems_bsdnet_semaphore_obtain ();
- error = rtrequest (req, dst, gateway, netmask, flags, net_nrt);
- rtems_bsdnet_semaphore_release ();
- if (error) {
- errno = error;
- return -1;
- }
- return 0;
-}
-
-static int
-rtems_bsdnet_setup (void)
-{
- struct rtems_bsdnet_ifconfig *ifp;
- int s;
- struct ifreq ifreq;
- struct sockaddr_in address;
- struct sockaddr_in netmask;
- struct sockaddr_in broadcast;
- struct sockaddr_in gateway;
- int i;
- extern char *strdup (const char *cp);
-
- /*
- * Set local parameters
- */
- if (rtems_bsdnet_config.hostname)
- sethostname (rtems_bsdnet_config.hostname,
- strlen (rtems_bsdnet_config.hostname));
- if (rtems_bsdnet_config.domainname)
- rtems_bsdnet_domain_name =
- strdup (rtems_bsdnet_config.domainname);
- if (rtems_bsdnet_config.log_host)
- rtems_bsdnet_log_host_address.s_addr =
- inet_addr (rtems_bsdnet_config.log_host);
- for (i = 0 ; i < sizeof rtems_bsdnet_config.name_server /
- sizeof rtems_bsdnet_config.name_server[0] ; i++) {
- if (!rtems_bsdnet_config.name_server[i])
- break;
- rtems_bsdnet_nameserver[rtems_bsdnet_nameserver_count++].s_addr
- = inet_addr (rtems_bsdnet_config.name_server[i]);
- }
- for (i = 0 ; i < sizeof rtems_bsdnet_config.ntp_server /
- sizeof rtems_bsdnet_config.ntp_server[0] ; i++) {
- if (!rtems_bsdnet_config.ntp_server[i])
- break;
- rtems_bsdnet_ntpserver[rtems_bsdnet_ntpserver_count++].s_addr
- = inet_addr (rtems_bsdnet_config.ntp_server[i]);
- }
-
- /*
- * Configure interfaces
- */
- s = socket (AF_INET, SOCK_DGRAM, 0);
- if (s < 0) {
- printf ("Can't create initial socket: %s\n", strerror (errno));
- return -1;
- }
- for (ifp = rtems_bsdnet_config.ifconfig ; ifp ; ifp = ifp->next) {
- if (ifp->ip_address == NULL)
- continue;
-
- /*
- * Get the interface flags
- */
- strcpy (ifreq.ifr_name, ifp->name);
- if (ioctl (s, SIOCGIFFLAGS, &ifreq) < 0) {
- printf ("Can't get %s flags: %s\n", ifp->name, strerror (errno));
- return -1;
- }
-
- /*
- * Bring interface up
- */
- ifreq.ifr_flags |= IFF_UP;
- if (ioctl (s, SIOCSIFFLAGS, &ifreq) < 0) {
- printf ("Can't bring %s up: %s\n", ifp->name, strerror (errno));
- return -1;
- }
-
- /*
- * Set interface netmask
- */
- memset (&netmask, '\0', sizeof netmask);
- netmask.sin_len = sizeof netmask;
- netmask.sin_family = AF_INET;
- netmask.sin_addr.s_addr = inet_addr (ifp->ip_netmask);
- memcpy (&ifreq.ifr_addr, &netmask, sizeof netmask);
- if (ioctl (s, SIOCSIFNETMASK, &ifreq) < 0) {
- printf ("Can't set %s netmask: %s\n", ifp->name, strerror (errno));
- return -1;
- }
-
- /*
- * Set interface address
- */
- memset (&address, '\0', sizeof address);
- address.sin_len = sizeof address;
- address.sin_family = AF_INET;
- address.sin_addr.s_addr = inet_addr (ifp->ip_address);
- memcpy (&ifreq.ifr_addr, &address, sizeof address);
- if (ioctl (s, SIOCSIFADDR, &ifreq) < 0) {
- printf ("Can't set %s address: %s\n", ifp->name, strerror (errno));
- return -1;
- }
-
- /*
- * Set interface broadcast address
- */
- memset (&broadcast, '\0', sizeof broadcast);
- broadcast.sin_len = sizeof broadcast;
- broadcast.sin_family = AF_INET;
- broadcast.sin_addr.s_addr = address.sin_addr.s_addr | ~netmask.sin_addr.s_addr;
- memcpy (&ifreq.ifr_broadaddr, &broadcast, sizeof broadcast);
- if (ioctl (s, SIOCSIFBRDADDR, &ifreq) < 0)
- printf ("Can't set %s broadcast address: %s\n", ifp->name, strerror (errno));
- }
-
- /*
- * We're done with the dummy socket
- */
- close (s);
-
- /*
- * Set default route
- */
- if (rtems_bsdnet_config.gateway) {
- address.sin_addr.s_addr = INADDR_ANY;
- netmask.sin_addr.s_addr = INADDR_ANY;
- memset (&gateway, '\0', sizeof gateway);
- gateway.sin_len = sizeof gateway;
- gateway.sin_family = AF_INET;
- gateway.sin_addr.s_addr = inet_addr (rtems_bsdnet_config.gateway);
- if (rtems_bsdnet_rtrequest (
- RTM_ADD,
- (struct sockaddr *)&address,
- (struct sockaddr *)&gateway,
- (struct sockaddr *)&netmask,
- (RTF_UP | RTF_GATEWAY | RTF_STATIC), NULL) < 0) {
- printf ("Can't set default route: %s\n", strerror (errno));
- return -1;
- }
- }
- return 0;
-}
-
-/*
- * Initialize the network
- */
-int
-rtems_bsdnet_initialize_network (void)
-{
- struct rtems_bsdnet_ifconfig *ifp;
-
- /*
- * Start network tasks.
- * Initialize BSD network data structures.
- */
- if (rtems_bsdnet_initialize () < 0)
- return -1;
-
- /*
- * Attach interfaces
- */
- for (ifp = rtems_bsdnet_config.ifconfig ; ifp ; ifp = ifp->next) {
- rtems_bsdnet_semaphore_obtain ();
- (ifp->attach)(ifp);
- rtems_bsdnet_semaphore_release ();
- }
-
- /*
- * Bring up the network
- */
- if (rtems_bsdnet_setup () < 0)
- return -1;
- if (rtems_bsdnet_config.bootp)
- (*rtems_bsdnet_config.bootp)();
- return 0;
-}
-
-/*
- * Parse a network driver name into a name and a unit number
- */
-int
-rtems_bsdnet_parse_driver_name (const struct rtems_bsdnet_ifconfig *config, char **namep)
-{
- const char *cp = config->name;
- char c;
- int unitNumber = 0;
-
- if (cp == NULL) {
- printf ("No network driver name.\n");
- return -1;
- }
- while ((c = *cp++) != '\0') {
- if ((c >= '0') && (c <= '9')) {
- int len = cp - config->name;
- if ((len < 2) || (len > 50))
- break;
- for (;;) {
- unitNumber = (unitNumber * 10) + (c - '0');
- c = *cp++;
- if (c == '\0') {
- char *unitName = malloc (len);
- if (unitName == NULL) {
- printf ("No memory.\n");
- return -1;
- }
- strncpy (unitName, config->name, len - 1);
- unitName[len-1] = '\0';
- *namep = unitName;
- return unitNumber;
- }
- if ((c < '0') || (c > '9'))
- break;
- }
- break;
- }
- }
- printf ("Bad network driver name `%s'.\n", config->name);
- return -1;
-}
-
-/*
- * Handle requests for more network memory
- * XXX: Another possibility would be to use a semaphore here with
- * a release in the mbuf free macro. I have chosen this `polling'
- * approach because:
- * 1) It is simpler.
- * 2) It adds no complexity to the free macro.
- * 3) Running out of mbufs should be a rare
- * condition -- predeployment testing of
- * an application should indicate the
- * required mbuf pool size.
- * XXX: Should there be a panic if a task is stuck in the loop for
- * more than a minute or so?
- */
-int
-m_mballoc (int nmb, int nowait)
-{
- if (nowait)
- return 0;
- m_reclaim ();
- if (mmbfree == NULL) {
- int try = 0;
- int print_limit = 30 * rtems_bsdnet_ticks_per_second;
-
- mbstat.m_wait++;
- for (;;) {
- rtems_bsdnet_semaphore_release ();
- rtems_task_wake_after (1);
- rtems_bsdnet_semaphore_obtain ();
- if (mmbfree)
- break;
- if (++try >= print_limit) {
- printf ("Still waiting for mbuf.\n");
- try = 0;
- }
- }
- }
- else {
- mbstat.m_drops++;
- }
- return 1;
-}
-
-int
-m_clalloc(ncl, nowait)
-{
- if (nowait)
- return 0;
- m_reclaim ();
- if (mclfree == NULL) {
- int try = 0;
- int print_limit = 30 * rtems_bsdnet_ticks_per_second;
-
- mbstat.m_wait++;
- for (;;) {
- rtems_bsdnet_semaphore_release ();
- rtems_task_wake_after (1);
- rtems_bsdnet_semaphore_obtain ();
- if (mclfree)
- break;
- if (++try >= print_limit) {
- printf ("Still waiting for mbuf cluster.\n");
- try = 0;
- }
- }
- }
- else {
- mbstat.m_drops++;
- }
- return 1;
-}
diff --git a/c/src/exec/libnetworking/rtems/rtems_select.c b/c/src/exec/libnetworking/rtems/rtems_select.c
deleted file mode 100644
index 9a58456e00..0000000000
--- a/c/src/exec/libnetworking/rtems/rtems_select.c
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- * $Id$
- */
-
-#include <string.h>
-#include <stdarg.h>
-/* #include <stdlib.h> */
-#include <stdio.h>
-
-#include <rtems.h>
-#include <rtems/libio.h>
-#include <rtems/error.h>
-#include <rtems/rtems_bsdnet.h>
-
-#include <sys/errno.h>
-#include <sys/fcntl.h>
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/protosw.h>
-#include <sys/proc.h>
-#include <sys/filio.h>
-
-#include <net/if.h>
-#include <net/route.h>
-
-/*
- *********************************************************************
- * RTEMS implementation of select() system call *
- *********************************************************************
- */
-
-/*
- * This implementation is quite restricted:
- * Works on sockets only -- no support for other devices!
- * A given socket can be in a read-select or a read/recv* by only
- * one task at a time.
- * A given socket can be in a write-select or a write/send* by only
- * one task at a time.
- *
- * NOTE - select() is a very expensive system call. It should be avoided
- * if at all possible. In many cases, rewriting the application
- * to use multiple tasks (one per socket) is a better solution.
- */
-
-static __inline int imin(int a, int b) { return (a < b ? a : b); }
-struct socket *rtems_bsdnet_fdToSocket(int fd);
-
-static int
-socket_select (struct socket *so, int which, rtems_id tid)
-{
- switch (which) {
-
- case FREAD:
- if (soreadable(so))
- return (1);
- so->so_rcv.sb_flags |= SB_WAIT;
- so->so_rcv.sb_sel.si_pid = tid;
- break;
-
- case FWRITE:
- if (sowriteable(so))
- return (1);
- so->so_rcv.sb_flags |= SB_WAIT;
- so->so_snd.sb_sel.si_pid = tid;
- break;
-
- case 0:
- if (so->so_oobmark || (so->so_state & SS_RCVATMARK))
- return (1);
- so->so_rcv.sb_sel.si_pid = tid;
- break;
- }
- return (0);
-}
-
-static int
-selscan (rtems_id tid, fd_mask **ibits, fd_mask **obits, int nfd, int *retval)
-{
- struct socket *so;
- int msk, i, fd;
- fd_mask bits, bit;
- int n = 0;
- static int flag[3] = { FREAD, FWRITE, 0 };
-
- for (msk = 0; msk < 3; msk++) {
- if (ibits[msk] == NULL)
- continue;
- for (i = 0; i < nfd; i += NFDBITS) {
- bits = ibits[msk][i/NFDBITS];
- for (fd = i, bit = 1 ; bits && (fd < nfd) ; fd++, bit <<= 1) {
- if ((bits & bit) == 0)
- continue;
- bits &= ~bit;
- so = rtems_bsdnet_fdToSocket (fd);
- if (so == NULL)
- return (EBADF);
- if (socket_select (so, flag[msk], tid)) {
- obits[msk][fd/NFDBITS] |=
- (1 << (fd % NFDBITS));
- n++;
- }
- }
- }
- }
- *retval = n;
- return (0);
-}
-
-int
-select (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *tv)
-{
- fd_mask *ibits[3], *obits[3];
- fd_set ob[3];
- int error, timo;
- int retval;
- rtems_id tid;
- rtems_interval then, now;
- rtems_event_set events;
-
- if (nfds < 0)
- return (EINVAL);
- if (tv) {
- timo = tv->tv_sec * hz + tv->tv_usec / tick;
- if (timo == 0)
- timo = 1;
- rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then);
- }
- else {
- timo = 0;
- }
-
-#define getbits(name,i) if (name) { \
- ibits[i] = &name->fds_bits[0]; \
- obits[i] = &ob[i].fds_bits[0]; \
- FD_ZERO(&ob[i]); \
- } \
- else ibits[i] = NULL
- getbits (readfds, 0);
- getbits (writefds, 1);
- getbits (exceptfds, 2);
-#undef getbits
-
- rtems_task_ident (RTEMS_SELF, 0, &tid);
- rtems_event_receive (SBWAIT_EVENT, RTEMS_EVENT_ANY | RTEMS_NO_WAIT, RTEMS_NO_TIMEOUT, &events);
- for (;;) {
- rtems_bsdnet_semaphore_obtain ();
- error = selscan(tid, ibits, obits, nfds, &retval);
- rtems_bsdnet_semaphore_release ();
- if (error || retval)
- break;
- if (timo) {
- rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now);
- timo -= now - then;
- if (timo <= 0)
- break;
- then = now;
- }
- rtems_event_receive (SBWAIT_EVENT, RTEMS_EVENT_ANY | RTEMS_WAIT, timo, &events);
- }
-
-#define putbits(name,i) if (name) *name = ob[i]
- putbits (readfds, 0);
- putbits (writefds, 1);
- putbits (exceptfds, 2);
-#undef putbits
- if (error) {
- errno = error;
- retval = -1;
- }
- return (retval);
-}
diff --git a/c/src/exec/libnetworking/rtems/rtems_showicmpstat.c b/c/src/exec/libnetworking/rtems/rtems_showicmpstat.c
deleted file mode 100644
index 1faea2512b..0000000000
--- a/c/src/exec/libnetworking/rtems/rtems_showicmpstat.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/sysctl.h>
-#include <sys/proc.h>
-#include <sys/mbuf.h>
-#include <netinet/in_systm.h>
-#include <netinet/in.h>
-#include <netinet/ip.h>
-#include <netinet/ip_icmp.h>
-#include <netinet/icmp_var.h>
-
-/*
- * Display ICMP statistics
- * Don't lock the rest of the network tasks out while printing.
- * It's no big deal if the values change while being printed.
- */
-static void
-showicmpstat (const char *name, unsigned long n)
-{
- if (n)
- printf ("%35s%12lu\n", name, n);
-}
-
-void
-rtems_bsdnet_show_icmp_stats (void)
-{
- int i;
- char cbuf[20];
-
- printf ("************ ICMP Statistics ************\n");
- showicmpstat ("Calls to icmp_error()", icmpstat.icps_error);
- showicmpstat ("Errors not sent -- old was icmp", icmpstat.icps_oldicmp);
- for (i = 0 ; i <= ICMP_MAXTYPE ; i++) {
- if (icmpstat.icps_outhist[i]) {
- sprintf (cbuf, "Type %d sent", i);
- showicmpstat (cbuf, icmpstat.icps_outhist[i]);
- }
- }
- showicmpstat ("icmp_code out of range", icmpstat.icps_badcode);
- showicmpstat ("packet < ICMP_MINLEN", icmpstat.icps_tooshort);
- showicmpstat ("bad checksum", icmpstat.icps_checksum);
- showicmpstat ("calculated bound mismatch", icmpstat.icps_badlen);
- showicmpstat ("number of responses", icmpstat.icps_reflect);
- showicmpstat ("b/mcast echo requests dropped", icmpstat.icps_bmcastecho);
- showicmpstat ("b/mcast tstamp requests dropped", icmpstat.icps_bmcasttstamp);
- for (i = 0 ; i <= ICMP_MAXTYPE ; i++) {
- if (icmpstat.icps_inhist[i]) {
- sprintf (cbuf, "Type %d received", i);
- showicmpstat (cbuf, icmpstat.icps_inhist[i]);
- }
- }
-
- printf ("\n");
-}
diff --git a/c/src/exec/libnetworking/rtems/rtems_showifstat.c b/c/src/exec/libnetworking/rtems/rtems_showifstat.c
deleted file mode 100644
index 20055517f6..0000000000
--- a/c/src/exec/libnetworking/rtems/rtems_showifstat.c
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/sysctl.h>
-#include <sys/proc.h>
-#include <sys/socket.h>
-#include <sys/ioctl.h>
-#include <net/if.h>
-#include <netinet/in.h>
-
-/*
- * Display an address
- */
-static int
-showaddress (char *name, struct sockaddr *a)
-{
- struct sockaddr_in *sa;
-
- if (!a || (a->sa_family != AF_INET))
- return 0;
- printf ("%s:", name);
- sa = (struct sockaddr_in *)a;
- printf ("%-16s", inet_ntoa (sa->sin_addr));
- return 1;
-}
-
-/*
- * Display interface statistics
- */
-void
-rtems_bsdnet_show_if_stats (void)
-{
- struct ifnet *ifp;
- struct ifaddr *ifa;
- unsigned short bit, flags;
- int printed;
-
- printf ("************ INTERFACE STATISTICS ************\n");
- for (ifp = ifnet; ifp; ifp = ifp->if_next) {
- printf ("***** %s%d *****\n", ifp->if_name, ifp->if_unit);
- for (ifa = ifp->if_addrlist ; ifa ; ifa = ifa->ifa_next) {
- printed = showaddress ("Address", ifa->ifa_addr);
- if (ifp->if_flags & IFF_BROADCAST)
- printed |= showaddress ("Broadcast Address", ifa->ifa_broadaddr);
- if (ifp->if_flags & IFF_POINTOPOINT)
- printed |= showaddress ("Destination Address", ifa->ifa_dstaddr);
- printed |= showaddress ("Net mask", ifa->ifa_netmask);
- if (printed)
- printf ("\n");
- }
-
- printf ("Flags:");
- for (bit = 1, flags = ifp->if_flags ; flags ; bit <<= 1) {
- char *cp;
- char xbuf[20];
- switch (flags & bit) {
- case 0: cp = NULL; break;
- case IFF_UP: cp = "Up"; break;
- case IFF_BROADCAST: cp = "Broadcast"; break;
- case IFF_DEBUG: cp = "Debug"; break;
- case IFF_LOOPBACK: cp = "Loopback"; break;
- case IFF_POINTOPOINT: cp = "Point-to-point"; break;
- case IFF_RUNNING: cp = "Running"; break;
- case IFF_NOARP: cp = "No-ARP"; break;
- case IFF_PROMISC: cp = "Promiscuous"; break;
- case IFF_ALLMULTI: cp = "All-multicast"; break;
- case IFF_OACTIVE: cp = "Active"; break;
- case IFF_SIMPLEX: cp = "Simplex"; break;
- case IFF_LINK0: cp = "Link0"; break;
- case IFF_LINK1: cp = "Link1"; break;
- case IFF_LINK2: cp = "Link2"; break;
- case IFF_MULTICAST: cp = "Multicast"; break;
- default: sprintf (xbuf, "%#x", bit); cp = xbuf; break;
- }
- if (cp) {
- flags &= ~bit;
- printf (" %s", cp);
- }
- }
- printf ("\n");
-
- printf ("Send queue limit:%-4d length:%-4d Dropped:%-8d\n",
- ifp->if_snd.ifq_maxlen,
- ifp->if_snd.ifq_len,
- ifp->if_snd.ifq_drops);
-
- /*
- * FIXME: Could print if_data statistics here,
- * but right now the drivers maintain their
- * own statistics.
- */
-
- /*
- * Grab the network semaphore.
- * In most cases this is not necessary, but it's
- * easier to always call the driver ioctl function
- * while holding the semaphore than to try
- * and explain why some ioctl commands are invoked
- * while holding the semaphore and others are
- * invoked while not holding the semaphore.
- */
- rtems_bsdnet_semaphore_obtain ();
- (*ifp->if_ioctl)(ifp, SIO_RTEMS_SHOW_STATS, NULL);
- rtems_bsdnet_semaphore_release ();
- }
- printf ("\n");
-}
diff --git a/c/src/exec/libnetworking/rtems/rtems_showipstat.c b/c/src/exec/libnetworking/rtems/rtems_showipstat.c
deleted file mode 100644
index 2dd499a8c0..0000000000
--- a/c/src/exec/libnetworking/rtems/rtems_showipstat.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/sysctl.h>
-#include <sys/proc.h>
-#include <sys/mbuf.h>
-#include <netinet/in_systm.h>
-#include <netinet/in.h>
-#include <netinet/ip.h>
-#include <netinet/ip_var.h>
-
-/*
- * Display IP statistics
- * Don't lock the rest of the network tasks out while printing.
- * It's no big deal if the values change while being printed.
- */
-static void
-showipstat (const char *name, unsigned long n)
-{
- if (n)
- printf ("%35s%12lu\n", name, n);
-}
-
-void
-rtems_bsdnet_show_ip_stats (void)
-{
- printf ("************ IP Statistics ************\n");
- showipstat ("total packets received", ipstat.ips_total);
- showipstat ("checksum bad", ipstat.ips_badsum);
- showipstat ("packet too short", ipstat.ips_tooshort);
- showipstat ("not enough data", ipstat.ips_toosmall);
- showipstat ("ip header length < data size", ipstat.ips_badhlen);
- showipstat ("ip length < ip header length", ipstat.ips_badlen);
- showipstat ("fragments received", ipstat.ips_fragments);
- showipstat ("frags dropped (dups, out of space)", ipstat.ips_fragdropped);
- showipstat ("fragments timed out", ipstat.ips_fragtimeout);
- showipstat ("packets forwarded", ipstat.ips_forward);
- showipstat ("packets rcvd for unreachable dest", ipstat.ips_cantforward);
- showipstat ("packets forwarded on same net", ipstat.ips_redirectsent);
- showipstat ("unknown or unsupported protocol", ipstat.ips_noproto);
- showipstat ("datagrams delivered to upper level", ipstat.ips_delivered);
- showipstat ("total ip packets generated here", ipstat.ips_localout);
- showipstat ("lost packets due to nobufs, etc.", ipstat.ips_odropped);
- showipstat ("total packets reassembled ok", ipstat.ips_reassembled);
- showipstat ("datagrams successfully fragmented", ipstat.ips_fragmented);
- showipstat ("output fragments created", ipstat.ips_ofragments);
- showipstat ("don't fragment flag was set, etc.", ipstat.ips_cantfrag);
- showipstat ("error in option processing", ipstat.ips_badoptions);
- showipstat ("packets discarded due to no route", ipstat.ips_noroute);
- showipstat ("ip version != 4", ipstat.ips_badvers);
- showipstat ("total raw ip packets generated", ipstat.ips_rawout);
- showipstat ("ip length > max ip packet size", ipstat.ips_toolong);
- printf ("\n");
-}
diff --git a/c/src/exec/libnetworking/rtems/rtems_showmbuf.c b/c/src/exec/libnetworking/rtems/rtems_showmbuf.c
deleted file mode 100644
index 39523bd00a..0000000000
--- a/c/src/exec/libnetworking/rtems/rtems_showmbuf.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/sysctl.h>
-#include <sys/proc.h>
-#include <sys/mbuf.h>
-
-/*
- * Display MBUF statistics
- * Don't lock the rest of the network tasks out while printing.
- * It's no big deal if the values change while being printed.
- */
-void
-rtems_bsdnet_show_mbuf_stats (void)
-{
- int i;
- int printed = 0;
- char *cp;
-
- printf ("************ MBUF STATISTICS ************\n");
- printf ("mbufs:%4lu clusters:%4lu free:%4lu\n",
- mbstat.m_mbufs, mbstat.m_clusters, mbstat.m_clfree);
- printf ("drops:%4lu waits:%4lu drains:%4lu\n",
- mbstat.m_drops, mbstat.m_wait, mbstat.m_drain);
- for (i = 0 ; i < 20 ; i++) {
- switch (i) {
- case MT_FREE: cp = "free"; break;
- case MT_DATA: cp = "data"; break;
- case MT_HEADER: cp = "header"; break;
- case MT_SOCKET: cp = "socket"; break;
- case MT_PCB: cp = "pcb"; break;
- case MT_RTABLE: cp = "rtable"; break;
- case MT_HTABLE: cp = "htable"; break;
- case MT_ATABLE: cp = "atable"; break;
- case MT_SONAME: cp = "soname"; break;
- case MT_SOOPTS: cp = "soopts"; break;
- case MT_FTABLE: cp = "ftable"; break;
- case MT_RIGHTS: cp = "rights"; break;
- case MT_IFADDR: cp = "ifaddr"; break;
- case MT_CONTROL: cp = "control"; break;
- case MT_OOBDATA: cp = "oobdata"; break;
- default: cp = NULL; break;
- }
- if ((cp != NULL) || (mbstat.m_mtypes[i] != 0)) {
- char cbuf[16];
- if (cp == NULL) {
- sprintf (cbuf, "Type %d", i);
- cp = cbuf;
- }
- printf ("%10s:%-8u", cp, mbstat.m_mtypes[i]);
- if (++printed == 4) {
- printf ("\n");
- printed = 0;
- }
- }
- }
- if (printed)
- printf ("\n");
- printf ("\n");
-}
diff --git a/c/src/exec/libnetworking/rtems/rtems_showroute.c b/c/src/exec/libnetworking/rtems/rtems_showroute.c
deleted file mode 100644
index c0d0b231e8..0000000000
--- a/c/src/exec/libnetworking/rtems/rtems_showroute.c
+++ /dev/null
@@ -1,236 +0,0 @@
-/*
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/sysctl.h>
-#include <sys/proc.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/domain.h>
-
-#include <net/if.h>
-#include <net/if_dl.h>
-#include <net/route.h>
-
-#include <netinet/in.h>
-
-#include <arpa/inet.h>
-
-/*
- * We'll use the application versions of realloc and free.
- */
-#undef free
-#undef malloc
-#include <stdlib.h>
-
-/*
- * Information per route
- */
-struct rinfo {
- struct sockaddr dst;
- union {
- struct sockaddr sa;
- struct sockaddr_in sin;
- struct sockaddr_dl sdl;
- } un;
- unsigned long pksent;
- unsigned long expire;
- int flags;
- char ifname[16];
- short ifunit;
- short refcnt;
-};
-
-/*
- * Information per display
- */
-struct dinfo {
- int capacity;
- int count;
- struct rinfo *routes;
-};
-
-/*
- * Copy address
- */
-static void
-copyAddress (void *to, void *from, int tolen)
-{
- int ncopy;
- struct sockaddr dummy;
-
- if (from == NULL) {
- /*
- * Create a fake address of unspecified type
- */
- from = &dummy;
- dummy.sa_len = 4;
- dummy.sa_family = AF_UNSPEC;
- }
- ncopy = ((struct sockaddr *)from)->sa_len;
- if (ncopy > tolen)
- ncopy = tolen;
- memcpy (to, from, ncopy);
-}
-
-/*
- * Package everything up before printing it.
- * We don't want to block all network operations till
- * the printing completes!
- */
-static int
-show_inet_route (rn, vw)
- struct radix_node *rn;
- void *vw;
-{
- struct rtentry *rt = (struct rtentry *)rn;
- struct ifnet *ifp;
- struct dinfo *dp = (struct dinfo *)vw;
- struct rinfo *r;
-
- /*
- * Get a pointer to a new route info structure
- */
- if (dp->count >= dp->capacity) {
- r = realloc (dp->routes, (sizeof *r) * (dp->capacity + 20));
- if (r == 0)
- return ENOMEM;
- dp->capacity += 20;
- dp->routes = r;
- }
- r = dp->routes + dp->count++;
-
- /*
- * Fill in the route info structure
- */
- copyAddress (&r->dst, rt_key(rt), sizeof r->dst);
- if (rt->rt_flags & (RTF_GATEWAY | RTF_HOST)) {
- copyAddress (&r->un, rt->rt_gateway, sizeof r->un);
- }
- else {
- /*
- * Create a fake address to hold the mask
- */
- struct sockaddr_in dummy;
-
- dummy.sin_family = AF_INET;
- dummy.sin_len = sizeof dummy;
- dummy.sin_addr = ((struct sockaddr_in *)rt_mask(rt))->sin_addr;
- copyAddress (&r->un, &dummy, sizeof r->un);
- }
- r->flags = rt->rt_flags;
- r->refcnt = rt->rt_refcnt;
- r->pksent = rt->rt_rmx.rmx_pksent;
- r->expire = rt->rt_rmx.rmx_expire;
- ifp = rt->rt_ifp;
- strncpy (r->ifname, ifp->if_name, sizeof r->ifname);
- r->ifunit = ifp->if_unit;
- return 0;
-}
-
-/*
- * Convert link address to ASCII
- */
-static char *
-link_ascii (struct sockaddr_dl *sdl, char *buf, int bufsize)
-{
- char *cp;
- int i;
- int first = 1;
- int nleft = sdl->sdl_alen;
- unsigned char *ap = LLADDR (sdl);
- static const char hextab[16] = "0123456789ABCDEF";
-
- cp = buf;
- while (nleft && (bufsize > 4)) {
- if (first) {
- first = 0;
- }
- else {
- *cp++ = ':';
- bufsize--;
- }
- i = *ap++;
- *cp++ = hextab[(i >> 4) & 0xf];
- *cp++ = hextab[i & 0xf];
- nleft--;
- bufsize -= 2;
- }
- *cp = '\0';
- return buf;
-}
-
-void
-rtems_bsdnet_show_inet_routes (void)
-{
- struct radix_node_head *rnh;
- struct dinfo d;
- struct rinfo *r;
- int i, error;
-
- /*
- * For now we'll handle only AF_INET
- */
- rnh = rt_tables[AF_INET];
- if (!rnh)
- return;
- d.count = d.capacity = 0;
- d.routes = NULL;
- rtems_bsdnet_semaphore_obtain ();
- error = rnh->rnh_walktree(rnh, show_inet_route, &d);
- rtems_bsdnet_semaphore_release ();
- if (error) {
- printf ("Can't get route info: %s\n", strerror (error));
- return;
- }
- if (d.count == 0) {
- printf ("No routes!\n");
- return;
- }
- printf ("Destination Gateway/Mask/Hw Flags Refs Use Expire Interface\n");
- for (i = 0, r = d.routes ; i < d.count ; i++, r++) {
- char buf[30];
- char *cp, *fc, flagbuf[10];
- const char *addr;
- unsigned long flagbit;
- struct sockaddr_in *sin;
-
- sin = (struct sockaddr_in *)&r->dst;
- if (sin->sin_addr.s_addr == INADDR_ANY)
- addr = "default";
- else
- addr = inet_ntop (AF_INET, &sin->sin_addr, buf, sizeof buf);
- printf ("%-16s", addr);
- switch (r->un.sa.sa_family) {
- case AF_INET:
- addr = inet_ntop (AF_INET, &r->un.sin.sin_addr, buf, sizeof buf);
- break;
-
- case AF_LINK:
- addr = link_ascii (&r->un.sdl, buf, sizeof buf);
- break;
-
- default:
- addr = "";
- break;
- }
- printf ("%-19s", addr);
- fc = "UGHRDM XLS";
- for (flagbit = 0x1, cp = flagbuf ; *fc ; flagbit <<= 1, fc++) {
- if ((r->flags & flagbit) && (*fc != ' '))
- *cp++ = *fc;
- }
- *cp = '\0';
- printf ("%-10s%3d%9ld%7ld %.*s%d\n", flagbuf,
- r->refcnt, r->pksent,
- r->expire,
- (int)sizeof r->ifname, r->ifname,
- r->ifunit);
- }
- free (d.routes);
-}
diff --git a/c/src/exec/libnetworking/rtems/rtems_showtcpstat.c b/c/src/exec/libnetworking/rtems/rtems_showtcpstat.c
deleted file mode 100644
index b9a0366819..0000000000
--- a/c/src/exec/libnetworking/rtems/rtems_showtcpstat.c
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/sysctl.h>
-#include <sys/proc.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-#include <net/if.h>
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/ip_var.h>
-#include <netinet/tcp.h>
-#include <netinet/tcp_timer.h>
-#include <netinet/tcp_seq.h>
-#include <netinet/tcp_var.h>
-
-/*
- * Display TCP statistics
- * Don't lock the rest of the network tasks out while printing.
- * It's no big deal if the values change while being printed.
- */
-static void
-showtcpstat (const char *name, unsigned long n)
-{
- if (n)
- printf ("%35s%12lu\n", name, n);
-}
-
-void
-rtems_bsdnet_show_tcp_stats (void)
-{
- printf ("************ TCP Statistics ************\n");
- showtcpstat ("connections initiated", tcpstat.tcps_connattempt);
- showtcpstat ("connections accepted", tcpstat.tcps_accepts);
- showtcpstat ("connections established", tcpstat.tcps_connects);
- showtcpstat ("connections dropped", tcpstat.tcps_drops);
- showtcpstat ("embryonic connections dropped", tcpstat.tcps_conndrops);
- showtcpstat ("conn. closed (includes drops)", tcpstat.tcps_closed);
- showtcpstat ("segs where we tried to get rtt", tcpstat.tcps_segstimed);
- showtcpstat ("times we succeeded", tcpstat.tcps_rttupdated);
- showtcpstat ("delayed acks sent", tcpstat.tcps_delack);
- showtcpstat ("conn. dropped in rxmt timeout", tcpstat.tcps_timeoutdrop);
- showtcpstat ("retransmit timeouts", tcpstat.tcps_rexmttimeo);
- showtcpstat ("persist timeouts", tcpstat.tcps_persisttimeo);
- showtcpstat ("keepalive timeouts", tcpstat.tcps_keeptimeo);
- showtcpstat ("keepalive probes sent", tcpstat.tcps_keepprobe);
- showtcpstat ("connections dropped in keepalive", tcpstat.tcps_keepdrops);
-
- showtcpstat ("total packets sent", tcpstat.tcps_sndtotal);
- showtcpstat ("data packets sent", tcpstat.tcps_sndpack);
- showtcpstat ("data bytes sent", tcpstat.tcps_sndbyte);
- showtcpstat ("data packets retransmitted", tcpstat.tcps_sndrexmitpack);
- showtcpstat ("data bytes retransmitted", tcpstat.tcps_sndrexmitbyte);
- showtcpstat ("ack-only packets sent", tcpstat.tcps_sndacks);
- showtcpstat ("window probes sent", tcpstat.tcps_sndprobe);
- showtcpstat ("packets sent with URG only", tcpstat.tcps_sndurg);
- showtcpstat ("window update-only packets sent", tcpstat.tcps_sndwinup);
- showtcpstat ("control (SYN|FIN|RST) packets sent", tcpstat.tcps_sndctrl);
-
- showtcpstat ("total packets received", tcpstat.tcps_rcvtotal);
- showtcpstat ("packets received in sequence", tcpstat.tcps_rcvpack);
- showtcpstat ("bytes received in sequence", tcpstat.tcps_rcvbyte);
- showtcpstat ("packets received with ccksum errs", tcpstat.tcps_rcvbadsum);
- showtcpstat ("packets received with bad offset", tcpstat.tcps_rcvbadoff);
- showtcpstat ("packets received too short", tcpstat.tcps_rcvshort);
- showtcpstat ("duplicate-only packets received", tcpstat.tcps_rcvduppack);
- showtcpstat ("duplicate-only bytes received", tcpstat.tcps_rcvdupbyte);
- showtcpstat ("packets with some duplicate data", tcpstat.tcps_rcvpartduppack);
- showtcpstat ("dup. bytes in part-dup. packets", tcpstat.tcps_rcvpartdupbyte);
- showtcpstat ("out-of-order packets received", tcpstat.tcps_rcvoopack);
- showtcpstat ("out-of-order bytes received", tcpstat.tcps_rcvoobyte);
- showtcpstat ("packets with data after window", tcpstat.tcps_rcvpackafterwin);
- showtcpstat ("bytes rcvd after window", tcpstat.tcps_rcvbyteafterwin);
- showtcpstat ("packets rcvd after \"close\"", tcpstat.tcps_rcvafterclose);
- showtcpstat ("rcvd window probe packets", tcpstat.tcps_rcvwinprobe);
- showtcpstat ("rcvd duplicate acks", tcpstat.tcps_rcvdupack);
- showtcpstat ("rcvd acks for unsent data", tcpstat.tcps_rcvacktoomuch);
- showtcpstat ("rcvd ack packets", tcpstat.tcps_rcvackpack);
- showtcpstat ("bytes acked by rcvd acks", tcpstat.tcps_rcvackbyte);
- showtcpstat ("rcvd window update packets", tcpstat.tcps_rcvwinupd);
- showtcpstat ("segments dropped due to PAWS", tcpstat.tcps_pawsdrop);
- showtcpstat ("times hdr predict ok for acks", tcpstat.tcps_predack);
- showtcpstat ("times hdr predict ok for data pkts", tcpstat.tcps_preddat);
- showtcpstat ("pcb cache misses", tcpstat.tcps_pcbcachemiss);
- showtcpstat ("times cached RTT in route updated", tcpstat.tcps_cachedrtt);
- showtcpstat ("times cached rttvar updated", tcpstat.tcps_cachedrttvar);
- showtcpstat ("times cached ssthresh updated", tcpstat.tcps_cachedssthresh);
- showtcpstat ("times RTT initialized from route", tcpstat.tcps_usedrtt);
- showtcpstat ("times RTTVAR initialized from rt", tcpstat.tcps_usedrttvar);
- showtcpstat ("times ssthresh initialized from rt", tcpstat.tcps_usedssthresh);
- showtcpstat ("timeout in persist state", tcpstat.tcps_persistdrop);
- showtcpstat ("bogus SYN, e.g. premature ACK", tcpstat.tcps_badsyn);
- showtcpstat ("resends due to MTU discovery", tcpstat.tcps_mturesent);
- showtcpstat ("listen queue overflows", tcpstat.tcps_listendrop);
- printf ("\n");
-}
diff --git a/c/src/exec/libnetworking/rtems/rtems_showudpstat.c b/c/src/exec/libnetworking/rtems/rtems_showudpstat.c
deleted file mode 100644
index 1fc2d15a0b..0000000000
--- a/c/src/exec/libnetworking/rtems/rtems_showudpstat.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/sysctl.h>
-#include <sys/proc.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-#include <net/if.h>
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/ip_var.h>
-#include <netinet/udp.h>
-#include <netinet/udp_var.h>
-
-/*
- * Display UDP statistics
- * Don't lock the rest of the network tasks out while printing.
- * It's no big deal if the values change while being printed.
- */
-static void
-showudpstat (const char *name, unsigned long n)
-{
- if (n)
- printf ("%35s%12lu\n", name, n);
-}
-
-void
-rtems_bsdnet_show_udp_stats (void)
-{
- printf ("************ UDP Statistics ************\n");
- showudpstat ("total input packets", udpstat.udps_ipackets);
- showudpstat ("packet shorter than header", udpstat.udps_hdrops);
- showudpstat ("checksum error", udpstat.udps_badsum);
- showudpstat ("data length larger than packet", udpstat.udps_badlen);
- showudpstat ("no socket on port", udpstat.udps_noport);
- showudpstat ("of above, arrived as broadcast", udpstat.udps_noportbcast);
- showudpstat ("not delivered, input socket full", udpstat.udps_fullsock);
- showudpstat ("input packets missing pcb cache", udpstat.udpps_pcbcachemiss);
- showudpstat ("input packets not for hashed pcb", udpstat.udpps_pcbhashmiss);
- showudpstat ("total output packets", udpstat.udps_opackets);
- printf ("\n");
-}
diff --git a/c/src/exec/libnetworking/rtems/rtems_syscall.c b/c/src/exec/libnetworking/rtems/rtems_syscall.c
deleted file mode 100644
index 05217f7212..0000000000
--- a/c/src/exec/libnetworking/rtems/rtems_syscall.c
+++ /dev/null
@@ -1,760 +0,0 @@
-/*
- * $Id$
- */
-
-#include <string.h>
-#include <stdarg.h>
-/* #include <stdlib.h> */
-#include <stdio.h>
-
-#include <rtems.h>
-#include <rtems/libio.h>
-#include <rtems/error.h>
-#include <rtems/rtems_bsdnet.h>
-
-#include <sys/errno.h>
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/protosw.h>
-#include <sys/proc.h>
-#include <sys/fcntl.h>
-#include <sys/filio.h>
-
-#include <net/if.h>
-#include <net/route.h>
-
-/*
- * Hooks to RTEMS I/O system
- */
-static const rtems_filesystem_file_handlers_r socket_handlers;
-int rtems_bsdnet_makeFdForSocket(void *so, const rtems_filesystem_file_handlers_r *h);
-struct socket *rtems_bsdnet_fdToSocket(int fd);
-
-/*
- * Package system call argument into mbuf.
- */
-static int
-sockargstombuf (struct mbuf **mp, const void *buf, int buflen, int type)
-{
- struct mbuf *m;
-
- if ((u_int)buflen > MLEN)
- return (EINVAL);
- m = m_get(M_WAIT, type);
- if (m == NULL)
- return (ENOBUFS);
- m->m_len = buflen;
- memcpy (mtod(m, caddr_t), buf, buflen);
- *mp = m;
- if (type == MT_SONAME) {
- struct sockaddr *sa;
- sa = mtod(m, struct sockaddr *);
- sa->sa_len = buflen;
- }
- return 0;
-}
-
-/*
- *********************************************************************
- * BSD-style entry points *
- *********************************************************************
- */
-int
-socket (int domain, int type, int protocol)
-{
- int fd;
- int error;
- struct socket *so;
-
- rtems_bsdnet_semaphore_obtain ();
- error = socreate(domain, &so, type, protocol, NULL);
- if (error == 0) {
- fd = rtems_bsdnet_makeFdForSocket (so, &socket_handlers);
- if (fd < 0)
- soclose (so);
- }
- else {
- errno = error;
- fd = -1;
- }
- rtems_bsdnet_semaphore_release ();
- return fd;
-}
-
-int
-bind (int s, struct sockaddr *name, int namelen)
-{
- int error;
- int ret = -1;
- struct socket *so;
- struct mbuf *nam;
-
- rtems_bsdnet_semaphore_obtain ();
- if ((so = rtems_bsdnet_fdToSocket (s)) != NULL) {
- error = sockargstombuf (&nam, name, namelen, MT_SONAME);
- if (error == 0) {
- error = sobind (so, nam);
- if (error == 0)
- ret = 0;
- else
- errno = error;
- m_freem (nam);
- }
- else {
- errno = error;
- }
- }
- rtems_bsdnet_semaphore_release ();
- return ret;
-}
-
-int
-connect (int s, struct sockaddr *name, int namelen)
-{
- int error;
- int ret = -1;
- struct socket *so;
- struct mbuf *nam;
-
- rtems_bsdnet_semaphore_obtain ();
- if ((so = rtems_bsdnet_fdToSocket (s)) == NULL) {
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- if ((so->so_state & SS_NBIO) && (so->so_state & SS_ISCONNECTING)) {
- errno = EALREADY;
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- error = sockargstombuf (&nam, name, namelen, MT_SONAME);
- if (error) {
- errno = error;
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- error = soconnect (so, nam);
- if (error) {
- errno = error;
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- if ((so->so_state & SS_NBIO) && (so->so_state & SS_ISCONNECTING)) {
- m_freem(nam);
- errno = EINPROGRESS;
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- while ((so->so_state & SS_ISCONNECTING) && so->so_error == 0) {
- so->so_error = soconnsleep (so);
- }
- if (error == 0) {
- error = so->so_error;
- so->so_error = 0;
- }
- so->so_state &= ~SS_ISCONNECTING;
- m_freem (nam);
- if (error == 0)
- ret = 0;
- rtems_bsdnet_semaphore_release ();
- return ret;
-}
-
-int
-listen (int s, int backlog)
-{
- int error;
- int ret = -1;
- struct socket *so;
-
- rtems_bsdnet_semaphore_obtain ();
- if ((so = rtems_bsdnet_fdToSocket (s)) != NULL) {
- error = solisten (so, backlog);
- if (error == 0)
- ret = 0;
- else
- errno = error;
- }
- rtems_bsdnet_semaphore_release ();
- return ret;
-}
-
-int
-accept (int s, struct sockaddr *name, int *namelen)
-{
- int fd;
- struct socket *head, *so;
- struct mbuf *nam;
-
- rtems_bsdnet_semaphore_obtain ();
- if ((head = rtems_bsdnet_fdToSocket (s)) == NULL) {
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- if ((head->so_options & SO_ACCEPTCONN) == 0) {
- errno = EINVAL;
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- if ((head->so_state & SS_NBIO) && head->so_comp.tqh_first == NULL) {
- errno = EWOULDBLOCK;
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- while (head->so_comp.tqh_first == NULL && head->so_error == 0) {
- if (head->so_state & SS_CANTRCVMORE) {
- head->so_error = ECONNABORTED;
- break;
- }
- head->so_error = soconnsleep (head);
- }
- if (head->so_error) {
- errno = head->so_error;
- head->so_error = 0;
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
-
- so = head->so_comp.tqh_first;
- TAILQ_REMOVE(&head->so_comp, so, so_list);
- head->so_qlen--;
-
- fd = rtems_bsdnet_makeFdForSocket (so, &socket_handlers);
- if (fd < 0) {
- TAILQ_INSERT_HEAD(&head->so_comp, so, so_list);
- head->so_qlen++;
- soconnwakeup (head);
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- so->so_state &= ~SS_COMP;
- so->so_head = NULL;
-
- nam = m_get(M_WAIT, MT_SONAME);
- (void) soaccept(so, nam);
- if (name) {
- /* check length before it is destroyed */
- if (*namelen > nam->m_len)
- *namelen = nam->m_len;
- memcpy (name, mtod(nam, caddr_t), *namelen);
- }
- m_freem(nam);
- rtems_bsdnet_semaphore_release ();
- return (fd);
-
-}
-
-/*
- * Shutdown routine
- */
-
-int
-shutdown (int s, int how)
-{
- struct socket *so;
- int error;
-
- rtems_bsdnet_semaphore_obtain ();
- if ((so = rtems_bsdnet_fdToSocket (s)) == NULL) {
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- error = soshutdown(so, how);
- rtems_bsdnet_semaphore_release ();
- if (error) {
- errno = error;
- return -1;
- }
- return 0;
-}
-
-/*
- * All `transmit' operations end up calling this routine.
- */
-ssize_t
-sendmsg (int s, const struct msghdr *mp, int flags)
-{
- int ret = -1;
- int error;
- struct uio auio;
- struct iovec *iov;
- struct socket *so;
- struct mbuf *to, *control;
- int i;
- int len;
-
- rtems_bsdnet_semaphore_obtain ();
- if ((so = rtems_bsdnet_fdToSocket (s)) == NULL) {
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- auio.uio_iov = mp->msg_iov;
- auio.uio_iovcnt = mp->msg_iovlen;
- auio.uio_segflg = UIO_USERSPACE;
- auio.uio_rw = UIO_WRITE;
- auio.uio_offset = 0;
- auio.uio_resid = 0;
- iov = mp->msg_iov;
- for (i = 0; i < mp->msg_iovlen; i++, iov++) {
- if ((auio.uio_resid += iov->iov_len) < 0) {
- errno = EINVAL;
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- }
- if (mp->msg_name) {
- error = sockargstombuf (&to, mp->msg_name, mp->msg_namelen, MT_SONAME);
- if (error) {
- errno = error;
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- }
- else {
- to = NULL;
- }
- if (mp->msg_control) {
- if (mp->msg_controllen < sizeof (struct cmsghdr)) {
- errno = EINVAL;
- if (to)
- m_freem(to);
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- sockargstombuf (&control, mp->msg_control, mp->msg_controllen, MT_CONTROL);
- }
- else {
- control = NULL;
- }
- len = auio.uio_resid;
- error = sosend (so, to, &auio, (struct mbuf *)0, control, flags);
- if (error) {
- if (auio.uio_resid != len && (error == EINTR || error == EWOULDBLOCK))
- error = 0;
- }
- if (error)
- errno = error;
- else
- ret = len - auio.uio_resid;
- if (to)
- m_freem(to);
- rtems_bsdnet_semaphore_release ();
- return (ret);
-}
-
-/*
- * Send a message to a host
- */
-ssize_t
-sendto (int s, const void *buf, size_t buflen, int flags, const struct sockaddr *to, int tolen)
-{
- struct msghdr msg;
- struct iovec iov;
-
- iov.iov_base = (void *)buf;
- iov.iov_len = buflen;
- msg.msg_name = (caddr_t)to;
- msg.msg_namelen = tolen;
- msg.msg_iov = &iov;
- msg.msg_iovlen = 1;
- msg.msg_control = NULL;
- msg.msg_controllen = 0;
- return sendmsg (s, &msg, flags);
-}
-
-/*
- * Send a message to a connected host
- */
-ssize_t
-send (int s, const void *buf, size_t buflen, int flags)
-{
- return sendto (s, buf, buflen, flags, NULL, 0);
-}
-
-/*
- * All `receive' operations end up calling this routine.
- */
-ssize_t
-recvmsg (int s, struct msghdr *mp, int flags)
-{
- int ret = -1;
- int error;
- struct uio auio;
- struct iovec *iov;
- struct socket *so;
- struct mbuf *from = NULL, *control = NULL;
- int i;
- int len;
-
- rtems_bsdnet_semaphore_obtain ();
- if ((so = rtems_bsdnet_fdToSocket (s)) == NULL) {
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- auio.uio_iov = mp->msg_iov;
- auio.uio_iovcnt = mp->msg_iovlen;
- auio.uio_segflg = UIO_USERSPACE;
- auio.uio_rw = UIO_READ;
- auio.uio_offset = 0;
- auio.uio_resid = 0;
- iov = mp->msg_iov;
- for (i = 0; i < mp->msg_iovlen; i++, iov++) {
- if ((auio.uio_resid += iov->iov_len) < 0) {
- errno = EINVAL;
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- }
- len = auio.uio_resid;
- mp->msg_flags = flags;
- error = soreceive (so, &from, &auio, (struct mbuf **)NULL,
- mp->msg_control ? &control : (struct mbuf **)NULL,
- &mp->msg_flags);
- if (error) {
- if (auio.uio_resid != len && (error == EINTR || error == EWOULDBLOCK))
- error = 0;
- }
- if (error) {
- errno = error;
- }
- else {
- ret = len - auio.uio_resid;
- if (mp->msg_name) {
- len = mp->msg_namelen;
- if ((len <= 0) || (from == NULL)) {
- len = 0;
- }
- else {
- if (len > from->m_len)
- len = from->m_len;
- memcpy (mp->msg_name, mtod(from, caddr_t), len);
- }
- mp->msg_namelen = len;
- }
- if (mp->msg_control) {
- struct mbuf *m;
- caddr_t ctlbuf;
-
- len = mp->msg_controllen;
- m = control;
- mp->msg_controllen = 0;
- ctlbuf = (caddr_t) mp->msg_control;
-
- while (m && (len > 0)) {
- unsigned int tocopy;
-
- if (len >= m->m_len)
- tocopy = m->m_len;
- else {
- mp->msg_flags |= MSG_CTRUNC;
- tocopy = len;
- }
- memcpy(ctlbuf, mtod(m, caddr_t), tocopy);
- ctlbuf += tocopy;
- len -= tocopy;
- m = m->m_next;
- }
- mp->msg_controllen = ctlbuf - mp->msg_control;
- }
- }
- if (from)
- m_freem (from);
- if (control)
- m_freem (control);
- rtems_bsdnet_semaphore_release ();
- return (ret);
-}
-
-/*
- * Receive a message from a host
- */
-ssize_t
-recvfrom (int s, void *buf, size_t buflen, int flags, const struct sockaddr *from, int *fromlen)
-{
- struct msghdr msg;
- struct iovec iov;
- int ret;
-
- iov.iov_base = buf;
- iov.iov_len = buflen;
- msg.msg_name = (caddr_t)from;
- if (fromlen)
- msg.msg_namelen = *fromlen;
- else
- msg.msg_namelen = 0;
- msg.msg_iov = &iov;
- msg.msg_iovlen = 1;
- msg.msg_control = NULL;
- msg.msg_controllen = 0;
- ret = recvmsg (s, &msg, flags);
- if ((from != NULL) && (fromlen != NULL) && (ret >= 0))
- *fromlen = msg.msg_namelen;
- return ret;
-}
-
-/*
- * Receive a message from a connected host
- */
-ssize_t
-recv (int s, void *buf, size_t buflen, int flags)
-{
- return recvfrom (s, buf, buflen, flags, NULL, NULL);
-}
-
-int
-setsockopt (int s, int level, int name, const void *val, int len)
-{
- struct socket *so;
- struct mbuf *m = NULL;
- int error;
-
- rtems_bsdnet_semaphore_obtain ();
- if ((so = rtems_bsdnet_fdToSocket (s)) == NULL) {
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- if (len > MLEN) {
- errno = EINVAL;
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- if (val) {
- error = sockargstombuf (&m, val, len, MT_SOOPTS);
- if (error) {
- errno = error;
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- }
- error = sosetopt(so, level, name, m);
- if (error) {
- errno = error;
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- rtems_bsdnet_semaphore_release ();
- return 0;
-}
-
-int
-getsockopt (int s, int level, int name, void *aval, int *avalsize)
-{
- struct socket *so;
- struct mbuf *m = NULL, *m0;
- char *val = aval;
- int i, op, valsize;
- int error;
-
- rtems_bsdnet_semaphore_obtain ();
- if ((so = rtems_bsdnet_fdToSocket (s)) == NULL) {
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- if (val)
- valsize = *avalsize;
- else
- valsize = 0;
- if (((error = sogetopt(so, level, name, &m)) == 0) && val && valsize && m) {
- op = 0;
- while (m && op < valsize) {
- i = valsize - op;
- if (i > m->m_len)
- i = m->m_len;
- memcpy (val, mtod(m, caddr_t), i);
- op += i;
- val += i;
- m0 = m;
- MFREE (m0, m);
- }
- *avalsize = op;
- }
- if (m != NULL)
- (void) m_free(m);
- if (error) {
- errno = error;
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- rtems_bsdnet_semaphore_release ();
- return 0;
-}
-
-static int
-getpeersockname (int s, struct sockaddr *name, int *namelen, int pflag)
-{
- struct socket *so;
- struct mbuf *m;
- int len = *namelen;
- int error;
-
- rtems_bsdnet_semaphore_obtain ();
- if ((so = rtems_bsdnet_fdToSocket (s)) == NULL) {
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- m = m_getclr(M_WAIT, MT_SONAME);
- if (m == NULL) {
- errno = ENOBUFS;
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- if (pflag)
- error = (*so->so_proto->pr_usrreqs->pru_peeraddr)(so, m);
- else
- error = (*so->so_proto->pr_usrreqs->pru_sockaddr)(so, m);
- if (error) {
- errno = error;
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- if (len > m->m_len) {
- len = m->m_len;
- *namelen = len;
- }
- memcpy (name, mtod(m, caddr_t), len);
- m_freem (m);
- rtems_bsdnet_semaphore_release ();
- return 0;
-}
-
-int
-getpeername (int s, struct sockaddr *name, int *namelen)
-{
- return getpeersockname (s, name, namelen, 1);
-}
-int
-getsockname (int s, struct sockaddr *name, int *namelen)
-{
- return getpeersockname (s, name, namelen, 0);
-}
-
-/*
- ************************************************************************
- * RTEMS I/O HANDLER ROUTINES *
- ************************************************************************
- */
-static int
-rtems_bsdnet_close (rtems_libio_t *iop)
-{
- struct socket *so;
- int error;
-
- rtems_bsdnet_semaphore_obtain ();
- if ((so = iop->data1) == NULL) {
- errno = EBADF;
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- error = soclose (so);
- rtems_bsdnet_semaphore_release ();
- if (error) {
- errno = error;
- return -1;
- }
- return 0;
-}
-
-static int
-rtems_bsdnet_read (rtems_libio_t *iop, void *buffer, unsigned32 count)
-{
- return recv (iop->data0, buffer, count, 0);
-}
-
-static int
-rtems_bsdnet_write (rtems_libio_t *iop, const void *buffer, unsigned32 count)
-{
- return send (iop->data0, buffer, count, 0);
-}
-
-static int
-so_ioctl (rtems_libio_t *iop, struct socket *so, unsigned32 command, void *buffer)
-{
- switch (command) {
- case FIONBIO:
- if (*(int *)buffer) {
- iop->flags |= O_NONBLOCK;
- so->so_state |= SS_NBIO;
- }
- else {
- iop->flags &= ~O_NONBLOCK;
- so->so_state &= ~SS_NBIO;
- }
- return 0;
-
- case FIONREAD:
- *(int *)buffer = so->so_rcv.sb_cc;
- return 0;
- }
-
- if (IOCGROUP(command) == 'i')
- return ifioctl (so, command, buffer, NULL);
- if (IOCGROUP(command) == 'r')
- return rtioctl (command, buffer, NULL);
- return (*so->so_proto->pr_usrreqs->pru_control)(so, command, buffer, 0);
-}
-
-static int
-rtems_bsdnet_ioctl (rtems_libio_t *iop, unsigned32 command, void *buffer)
-{
- struct socket *so;
- int error;
-
- rtems_bsdnet_semaphore_obtain ();
- if ((so = iop->data1) == NULL) {
- errno = EBADF;
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- error = so_ioctl (iop, so, command, buffer);
- rtems_bsdnet_semaphore_release ();
- if (error) {
- errno = error;
- return -1;
- }
- return 0;
-}
-
-static int
-rtems_bsdnet_fcntl (int cmd, rtems_libio_t *iop)
-{
- struct socket *so;
-
- if (cmd == F_SETFL) {
- rtems_bsdnet_semaphore_obtain ();
- if ((so = iop->data1) == NULL) {
- rtems_bsdnet_semaphore_release ();
- return EBADF;
- }
- if (iop->flags & O_NONBLOCK)
- so->so_state |= SS_NBIO;
- else
- so->so_state &= ~SS_NBIO;
- rtems_bsdnet_semaphore_release ();
- }
- return 0;
-}
-
-static int
-rtems_bsdnet_fstat (rtems_filesystem_location_info_t *loc, struct stat *sp)
-{
- sp->st_mode = S_IFSOCK;
- return 0;
-}
-
-static const rtems_filesystem_file_handlers_r socket_handlers = {
- NULL, /* open */
- rtems_bsdnet_close, /* close */
- rtems_bsdnet_read, /* read */
- rtems_bsdnet_write, /* write */
- rtems_bsdnet_ioctl, /* ioctl */
- NULL, /* lseek */
- rtems_bsdnet_fstat, /* fstat */
- NULL, /* fchmod */
- NULL, /* ftruncate */
- NULL, /* fpathconf */
- NULL, /* fsync */
- NULL, /* fdatasync */
- rtems_bsdnet_fcntl, /* fcntl */
-};
diff --git a/c/src/exec/libnetworking/rtems/sghostname.c b/c/src/exec/libnetworking/rtems/sghostname.c
deleted file mode 100644
index 307f045fbd..0000000000
--- a/c/src/exec/libnetworking/rtems/sghostname.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * RTEMS versions of hostname functions
- * FIXME: Not thread-safe
- *
- * $Id$
- */
-
-#include <string.h>
-#include <errno.h>
-#include <rtems/rtems_bsdnet.h>
-#include <sys/param.h>
-#include <sys/malloc.h>
-#include <sys/kernel.h>
-
-static char *rtems_hostname;
-
-int
-gethostname (char *name, size_t namelen)
-{
- char *cp = rtems_hostname;
-
- if (cp == NULL)
- cp = "";
- strncpy (name, cp, namelen);
- return 0;
-}
-
-int
-sethostname (char *name, size_t namelen)
-{
- char *old, *new;
-
- if (namelen >= MAXHOSTNAMELEN) {
- errno = EINVAL;
- return -1;
- }
- new = malloc (namelen + 1, M_HTABLE, M_NOWAIT);
- if (new == NULL) {
- errno = ENOMEM;
- return -1;
- }
- strncpy (new, name, namelen);
- new[namelen] = '\0';
- old = rtems_hostname;
- rtems_hostname = new;
- if (old)
- free (old, M_HTABLE);
- return 0;
-}
diff --git a/c/src/exec/libnetworking/rtems/tftp.h b/c/src/exec/libnetworking/rtems/tftp.h
deleted file mode 100644
index 11882bed1c..0000000000
--- a/c/src/exec/libnetworking/rtems/tftp.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * $Id$
- */
-
-/*
- * Trivial File Transfer Protocol (TFTP)
- *
- * Transfer file to/from remote host
- *
- * W. Eric Norum
- * Saskatchewan Accelerator Laboratory
- * University of Saskatchewan
- * Saskatoon, Saskatchewan, CANADA
- * eric@skatter.usask.ca
- */
-
-/*
- * Usage:
- *
- * To open `/bootfiles/image' on `hostname' for reading:
- * fd = open ("/TFTP/hostname/bootfiles/image", O_RDONLY);
- *
- * The `hostname' must be four dot-separated decimal values.
- */
-
-#ifndef _TFTP_FILESYSTEM_h
-#define _TFTP_FILESYSTEM_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Filesystem initialization routine
- */
-
-int rtems_bsdnet_initialize_tftp_filesystem( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/c/src/exec/libnetworking/sys/Makefile.am b/c/src/exec/libnetworking/sys/Makefile.am
deleted file mode 100644
index 3fe88aff59..0000000000
--- a/c/src/exec/libnetworking/sys/Makefile.am
+++ /dev/null
@@ -1,13 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-EXTRA_DIST = buf.h callout.h cdefs.h conf.h domain.h filio.h ioccom.h \
- ioctl.h kernel.h libkern.h malloc.h mbuf.h mount.h param.h proc.h \
- protosw.h queue.h reboot.h resourcevar.h rtprio.h select.h signalvar.h \
- socket.h socketvar.h sockio.h sysctl.h syslimits.h syslog.h systm.h \
- ttycom.h ttydefaults.h ucred.h uio.h
-
-include $(top_srcdir)/../../../automake/local.am
diff --git a/c/src/exec/libnetworking/sys/buf.h b/c/src/exec/libnetworking/sys/buf.h
deleted file mode 100644
index 6cca571141..0000000000
--- a/c/src/exec/libnetworking/sys/buf.h
+++ /dev/null
@@ -1,248 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1989, 1993
- * The Regents of the University of California. All rights reserved.
- * (c) UNIX System Laboratories, Inc.
- * All or some portions of this file are derived from material licensed
- * to the University of California by American Telephone and Telegraph
- * Co. or Unix System Laboratories, Inc. and are reproduced herein with
- * the permission of UNIX System Laboratories, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)buf.h 8.9 (Berkeley) 3/30/95
- * $Id$
- */
-
-#ifndef _SYS_BUF_H_
-#define _SYS_BUF_H_
-
-#include <sys/queue.h>
-
-#define NOLIST ((struct buf *)0x87654321)
-
-struct buf;
-
-struct iodone_chain {
- long ic_prev_flags;
- void (*ic_prev_iodone) __P((struct buf *));
- void *ic_prev_iodone_chain;
- struct {
- long ia_long;
- void *ia_ptr;
- } ic_args[5];
-};
-
-typedef TAILQ_HEAD(buf_queue_head, buf) buf_queue_head, *buf_queue_head_t;
-
-/*
- * The buffer header describes an I/O operation in the kernel.
- */
-struct buf {
- LIST_ENTRY(buf) b_hash; /* Hash chain. */
- LIST_ENTRY(buf) b_vnbufs; /* Buffer's associated vnode. */
- TAILQ_ENTRY(buf) b_freelist; /* Free list position if not active. */
- TAILQ_ENTRY(buf) b_act; /* Device driver queue when active. *new* */
- struct proc *b_proc; /* Associated proc; NULL if kernel. */
- long b_flags; /* B_* flags. */
- unsigned short b_qindex; /* buffer queue index */
- unsigned char b_usecount; /* buffer use count */
- int b_error; /* Errno value. */
- long b_bufsize; /* Allocated buffer size. */
- long b_bcount; /* Valid bytes in buffer. */
- long b_resid; /* Remaining I/O. */
- dev_t b_dev; /* Device associated with buffer. */
- struct {
- caddr_t b_addr; /* Memory, superblocks, indirect etc. */
- } b_un;
- caddr_t b_kvabase; /* base kva for buffer */
- int b_kvasize; /* size of kva for buffer */
- void *b_saveaddr; /* Original b_addr for physio. */
- daddr_t b_lblkno; /* Logical block number. */
- daddr_t b_blkno; /* Underlying physical block number. */
- /* Function to call upon completion. */
- void (*b_iodone) __P((struct buf *));
- /* For nested b_iodone's. */
- struct iodone_chain *b_iodone_chain;
- struct vnode *b_vp; /* Device vnode. */
- int b_dirtyoff; /* Offset in buffer of dirty region. */
- int b_dirtyend; /* Offset of end of dirty region. */
- struct ucred *b_rcred; /* Read credentials reference. */
- struct ucred *b_wcred; /* Write credentials reference. */
- int b_validoff; /* Offset in buffer of valid region. */
- int b_validend; /* Offset of end of valid region. */
- daddr_t b_pblkno; /* physical block number */
- caddr_t b_savekva; /* saved kva for transfer while bouncing */
- void *b_driver1; /* for private use by the driver */
- void *b_driver2; /* for private use by the driver */
- void *b_spc;
- union cluster_info {
- TAILQ_HEAD(cluster_list_head, buf) cluster_head;
- TAILQ_ENTRY(buf) cluster_entry;
- } b_cluster;
- struct vm_page *b_pages[btoc(MAXPHYS)];
- int b_npages;
-};
-
-/* Device driver compatibility definitions. */
-#define b_data b_un.b_addr /* b_un.b_addr is not changeable. */
-
-/*
- * These flags are kept in b_flags.
- */
-#define B_AGE 0x00000001 /* Move to age queue when I/O done. */
-#define B_NEEDCOMMIT 0x00000002 /* Append-write in progress. */
-#define B_ASYNC 0x00000004 /* Start I/O, do not wait. */
-#define B_BAD 0x00000008 /* Bad block revectoring in progress. */
-#define B_BUSY 0x00000010 /* I/O in progress. */
-#define B_CACHE 0x00000020 /* Bread found us in the cache. */
-#define B_CALL 0x00000040 /* Call b_iodone from biodone. */
-#define B_DELWRI 0x00000080 /* Delay I/O until buffer reused. */
-#define B_DIRTY 0x00000100 /* Dirty page to be pushed out async. */
-#define B_DONE 0x00000200 /* I/O completed. */
-#define B_EINTR 0x00000400 /* I/O was interrupted */
-#define B_ERROR 0x00000800 /* I/O error occurred. */
-#define B_GATHERED 0x00001000 /* LFS: already in a segment. */
-#define B_INVAL 0x00002000 /* Does not contain valid info. */
-#define B_LOCKED 0x00004000 /* Locked in core (not reusable). */
-#define B_NOCACHE 0x00008000 /* Do not cache block after use. */
-#define B_MALLOC 0x00010000 /* malloced b_data */
-#define B_CLUSTEROK 0x00020000 /* Pagein op, so swap() can count it. */
-#define B_PHYS 0x00040000 /* I/O to user memory. */
-#define B_RAW 0x00080000 /* Set by physio for raw transfers. */
-#define B_READ 0x00100000 /* Read buffer. */
-#define B_TAPE 0x00200000 /* Magnetic tape I/O. */
-#define B_RELBUF 0x00400000 /* Release VMIO buffer. */
-#define B_WANTED 0x00800000 /* Process wants this buffer. */
-#define B_WRITE 0x00000000 /* Write buffer (pseudo flag). */
-#define B_WRITEINPROG 0x01000000 /* Write in progress. */
-#define B_XXX 0x02000000 /* Debugging flag. */
-#define B_PAGING 0x04000000 /* volatile paging I/O -- bypass VMIO */
-#define B_ORDERED 0x08000000 /* Must guarantee I/O ordering */
-#define B_VMIO 0x20000000 /* VMIO flag */
-#define B_CLUSTER 0x40000000 /* pagein op, so swap() can count it */
-#define B_BOUNCE 0x80000000 /* bounce buffer flag */
-
-/*
- * number of buffer hash entries
- */
-#define BUFHSZ 512
-
-/*
- * buffer hash table calculation, originally by David Greenman
- */
-#define BUFHASH(vnp, bn) \
- (&bufhashtbl[(((unsigned long)(vnp) >> 7)+(int)(bn)) % BUFHSZ])
-
-/*
- * Definitions for the buffer free lists.
- */
-#define BUFFER_QUEUES 6 /* number of free buffer queues */
-
-extern LIST_HEAD(bufhashhdr, buf) bufhashtbl[BUFHSZ], invalhash;
-extern TAILQ_HEAD(bqueues, buf) bufqueues[BUFFER_QUEUES];
-
-#define QUEUE_NONE 0 /* on no queue */
-#define QUEUE_LOCKED 1 /* locked buffers */
-#define QUEUE_LRU 2 /* useful buffers */
-#define QUEUE_VMIO 3 /* VMIO buffers */
-#define QUEUE_AGE 4 /* not-useful buffers */
-#define QUEUE_EMPTY 5 /* empty buffer headers*/
-
-/*
- * Zero out the buffer's data area.
- */
-#define clrbuf(bp) { \
- bzero((bp)->b_data, (u_int)(bp)->b_bcount); \
- (bp)->b_resid = 0; \
-}
-
-/* Flags to low-level allocation routines. */
-#define B_CLRBUF 0x01 /* Request allocated buffer be cleared. */
-#define B_SYNC 0x02 /* Do all allocations synchronously. */
-
-#ifdef KERNEL
-extern int nbuf; /* The number of buffer headers */
-extern struct buf *buf; /* The buffer headers. */
-extern char *buffers; /* The buffer contents. */
-extern int bufpages; /* Number of memory pages in the buffer pool. */
-extern struct buf *swbuf; /* Swap I/O buffer headers. */
-extern int nswbuf; /* Number of swap I/O buffer headers. */
-extern TAILQ_HEAD(swqueue, buf) bswlist;
-
-void bufinit __P((void));
-void bremfree __P((struct buf *));
-int bread __P((struct vnode *, daddr_t, int,
- struct ucred *, struct buf **));
-int breadn __P((struct vnode *, daddr_t, int, daddr_t *, int *, int,
- struct ucred *, struct buf **));
-int bwrite __P((struct buf *));
-void bdwrite __P((struct buf *));
-void bawrite __P((struct buf *));
-int bowrite __P((struct buf *));
-void brelse __P((struct buf *));
-void bqrelse __P((struct buf *));
-int vfs_bio_awrite __P((struct buf *));
-struct buf * getpbuf __P((void));
-struct buf *incore __P((struct vnode *, daddr_t));
-struct buf *gbincore __P((struct vnode *, daddr_t));
-int inmem __P((struct vnode *, daddr_t));
-struct buf *getblk __P((struct vnode *, daddr_t, int, int, int));
-struct buf *geteblk __P((int));
-int allocbuf __P((struct buf *, int));
-int biowait __P((struct buf *));
-void biodone __P((struct buf *));
-
-void cluster_callback __P((struct buf *));
-int cluster_read __P((struct vnode *, u_quad_t, daddr_t, long,
- struct ucred *, struct buf **));
-int cluster_wbuild __P((struct vnode *, long, daddr_t, int));
-void cluster_write __P((struct buf *, u_quad_t));
-int physio __P((void (*)(struct buf *), struct buf *, dev_t,
- int, u_int (*)(struct buf *), struct uio *));
-u_int minphys __P((struct buf *));
-void vfs_bio_clrbuf __P((struct buf *));
-void vfs_busy_pages __P((struct buf *, int clear_modify));
-void vfs_unbusy_pages(struct buf *);
-void vwakeup __P((struct buf *));
-void vmapbuf __P((struct buf *));
-void vunmapbuf __P((struct buf *));
-void relpbuf __P((struct buf *));
-void brelvp __P((struct buf *));
-void bgetvp __P((struct vnode *, struct buf *));
-void pbgetvp __P((struct vnode *, struct buf *));
-void pbrelvp __P((struct buf *));
-void reassignbuf __P((struct buf *, struct vnode *));
-struct buf *trypbuf __P((void));
-void vm_bounce_alloc __P((struct buf *));
-void vm_bounce_free __P((struct buf *));
-vm_offset_t vm_bounce_kva_alloc __P((int));
-void vm_bounce_kva_alloc_free __P((vm_offset_t, int));
-#endif /* KERNEL */
-
-#endif /* !_SYS_BUF_H_ */
diff --git a/c/src/exec/libnetworking/sys/callout.h b/c/src/exec/libnetworking/sys/callout.h
deleted file mode 100644
index 5fec98f28b..0000000000
--- a/c/src/exec/libnetworking/sys/callout.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- * (c) UNIX System Laboratories, Inc.
- * All or some portions of this file are derived from material licensed
- * to the University of California by American Telephone and Telegraph
- * Co. or Unix System Laboratories, Inc. and are reproduced herein with
- * the permission of UNIX System Laboratories, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)callout.h 8.2 (Berkeley) 1/21/94
- * $Id$
- */
-
-#ifndef _SYS_CALLOUT_H_
-#define _SYS_CALLOUT_H_
-
-struct callout {
- struct callout *c_next; /* next callout in queue */
- void *c_arg; /* function argument */
- void (*c_func) __P((void *)); /* function to call */
- int c_time; /* ticks to the event */
-};
-
-#ifdef KERNEL
-extern struct callout *callfree, *callout, calltodo;
-extern int ncallout;
-#endif
-
-#endif
diff --git a/c/src/exec/libnetworking/sys/conf.h b/c/src/exec/libnetworking/sys/conf.h
deleted file mode 100644
index 92d99d9d07..0000000000
--- a/c/src/exec/libnetworking/sys/conf.h
+++ /dev/null
@@ -1,228 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- * (c) UNIX System Laboratories, Inc.
- * All or some portions of this file are derived from material licensed
- * to the University of California by American Telephone and Telegraph
- * Co. or Unix System Laboratories, Inc. and are reproduced herein with
- * the permission of UNIX System Laboratories, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)conf.h 8.5 (Berkeley) 1/9/95
- * $Id$
- */
-
-#ifndef _SYS_CONF_H_
-#define _SYS_CONF_H_
-
-/*
- * Definitions of device driver entry switches
- */
-
-struct buf;
-struct proc;
-struct tty;
-struct uio;
-struct vnode;
-
-typedef int d_open_t __P((dev_t dev, int oflags, int devtype, struct proc *p));
-typedef int d_close_t __P((dev_t dev, int fflag, int devtype, struct proc *p));
-typedef void d_strategy_t __P((struct buf *bp));
-typedef int d_ioctl_t __P((dev_t dev, int cmd, caddr_t data,
- int fflag, struct proc *p));
-typedef int d_dump_t __P((dev_t dev));
-typedef int d_psize_t __P((dev_t dev));
-
-typedef int d_read_t __P((dev_t dev, struct uio *uio, int ioflag));
-typedef int d_write_t __P((dev_t dev, struct uio *uio, int ioflag));
-typedef void d_stop_t __P((struct tty *tp, int rw));
-typedef int d_reset_t __P((dev_t dev));
-typedef struct tty *d_devtotty_t __P((dev_t dev));
-typedef int d_select_t __P((dev_t dev, int which, struct proc *p));
-typedef int d_mmap_t __P((dev_t dev, int offset, int nprot));
-
-typedef int l_open_t __P((dev_t dev, struct tty *tp));
-typedef int l_close_t __P((struct tty *tp, int flag));
-typedef int l_read_t __P((struct tty *tp, struct uio *uio, int flag));
-typedef int l_write_t __P((struct tty *tp, struct uio *uio, int flag));
-typedef int l_ioctl_t __P((struct tty *tp, int cmd, caddr_t data,
- int flag, struct proc *p));
-typedef int l_rint_t __P((int c, struct tty *tp));
-typedef int l_start_t __P((struct tty *tp));
-typedef int l_modem_t __P((struct tty *tp, int flag));
-
-/*
- * Block device switch table
- */
-struct bdevsw {
- d_open_t *d_open;
- d_close_t *d_close;
- d_strategy_t *d_strategy;
- d_ioctl_t *d_ioctl;
- d_dump_t *d_dump;
- d_psize_t *d_psize;
- int d_flags;
- char *d_name; /* name of the driver e.g. audio */
- struct cdevsw *d_cdev; /* cross pointer to the cdev */
- int d_maj; /* the major number we were assigned */
-};
-
-#ifdef KERNEL
-extern struct bdevsw *bdevsw[];
-#endif
-
-/*
- * Character device switch table
- */
-struct cdevsw {
- d_open_t *d_open;
- d_close_t *d_close;
- d_read_t *d_read;
- d_write_t *d_write;
- d_ioctl_t *d_ioctl;
- d_stop_t *d_stop;
- d_reset_t *d_reset; /* XXX not used */
- d_devtotty_t *d_devtotty;
- d_select_t *d_select;
- d_mmap_t *d_mmap;
- d_strategy_t *d_strategy;
- char *d_name; /* see above */
- struct bdevsw *d_bdev;
- int d_maj;
-};
-
-#ifdef KERNEL
-extern struct cdevsw *cdevsw[];
-#endif
-
-/*
- * Line discipline switch table
- */
-struct linesw {
- l_open_t *l_open;
- l_close_t *l_close;
- l_read_t *l_read;
- l_write_t *l_write;
- l_ioctl_t *l_ioctl;
- l_rint_t *l_rint;
- l_start_t *l_start;
- l_modem_t *l_modem;
-};
-
-#ifdef KERNEL
-extern struct linesw linesw[];
-extern int nlinesw;
-
-int ldisc_register __P((int , struct linesw *));
-void ldisc_deregister __P((int));
-#define LDISC_LOAD -1 /* Loadable line discipline */
-#endif
-
-/*
- * Swap device table
- */
-struct swdevt {
- dev_t sw_dev;
- int sw_flags;
- int sw_nblks;
- struct vnode *sw_vp;
-};
-#define SW_FREED 0x01
-#define SW_SEQUENTIAL 0x02
-#define sw_freed sw_flags /* XXX compat */
-
-#ifdef KERNEL
-d_open_t noopen;
-d_close_t noclose;
-d_read_t noread;
-d_write_t nowrite;
-d_ioctl_t noioctl;
-d_stop_t nostop;
-d_reset_t noreset;
-d_devtotty_t nodevtotty;
-d_select_t noselect;
-d_mmap_t nommap;
-
-/* Bogus defines for compatibility. */
-#define noioc noioctl
-#define nostrat nostrategy
-#define zerosize nopsize
-/*
- * XXX d_strategy seems to be unused for cdevs that aren't associated with
- * bdevs and called without checking for it being non-NULL for bdevs.
- */
-#define nostrategy ((d_strategy_t *)NULL)
-
-d_dump_t nodump;
-
-/*
- * nopsize is little used, so not worth having dummy functions for.
- */
-#define nopsize ((d_psize_t *)NULL)
-
-d_open_t nullopen;
-d_close_t nullclose;
-#define nullstop nostop /* one void return is as good as another */
-#define nullreset noreset /* one unused function is as good as another */
-
-d_open_t nxopen;
-d_close_t nxclose;
-d_read_t nxread;
-d_write_t nxwrite;
-d_ioctl_t nxioctl;
-#define nxstop nostop /* one void return is as good as another */
-#define nxreset noreset /* one unused function is as good as another */
-#define nxdevtotty nodevtotty /* one NULL return is as good as another */
-d_select_t nxselect;
-#define nxmmap nommap /* one -1 return is as good as another */
-#define nxstrategy nostrategy /* one NULL value is as good as another */
-d_dump_t nxdump;
-#define nxpsize nopsize /* one NULL value is as good as another */
-
-d_read_t rawread;
-d_write_t rawwrite;
-
-l_read_t l_noread;
-l_write_t l_nowrite;
-
-int bdevsw_add __P((dev_t *descrip,struct bdevsw *new,struct bdevsw **old));
-int cdevsw_add __P((dev_t *descrip,struct cdevsw *new,struct cdevsw **old));
-void cdevsw_make __P((struct bdevsw *from));
-void bdevsw_add_generic __P((int bdev, int cdev, struct bdevsw *bdevsw));
-dev_t chrtoblk __P((dev_t dev));
-int isdisk __P((dev_t dev, int type));
-int iskmemdev __P((dev_t dev));
-int iszerodev __P((dev_t dev));
-void setconf __P((void));
-#endif /* KERNEL */
-
-#include <machine/conf.h>
-
-#endif /* !_SYS_CONF_H_ */
diff --git a/c/src/exec/libnetworking/sys/domain.h b/c/src/exec/libnetworking/sys/domain.h
deleted file mode 100644
index 2ec8a5fb05..0000000000
--- a/c/src/exec/libnetworking/sys/domain.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)domain.h 8.1 (Berkeley) 6/2/93
- * $Id$
- */
-
-#ifndef _SYS_DOMAIN_H_
-#define _SYS_DOMAIN_H_
-
-/*
- * Structure per communications domain.
- */
-
-/*
- * Forward structure declarations for function prototypes [sic].
- */
-struct mbuf;
-
-struct domain {
- int dom_family; /* AF_xxx */
- char *dom_name;
- void (*dom_init) /* initialize domain data structures */
- __P((void));
- int (*dom_externalize) /* externalize access rights */
- __P((struct mbuf *));
- void (*dom_dispose) /* dispose of internalized rights */
- __P((struct mbuf *));
- struct protosw *dom_protosw, *dom_protoswNPROTOSW;
- struct domain *dom_next;
- int (*dom_rtattach) /* initialize routing table */
- __P((void **, int));
- int dom_rtoffset; /* an arg to rtattach, in bits */
- int dom_maxrtkey; /* for routing layer */
-};
-
-#ifdef KERNEL
-extern struct domain *domains;
-extern struct domain localdomain;
-
-#define DOMAIN_SET(name) \
- DATA_SET(domain_set, name ## domain);
-
-#endif
-
-#endif
diff --git a/c/src/exec/libnetworking/sys/kernel.h b/c/src/exec/libnetworking/sys/kernel.h
deleted file mode 100644
index 35bce70bd6..0000000000
--- a/c/src/exec/libnetworking/sys/kernel.h
+++ /dev/null
@@ -1,251 +0,0 @@
-/*-
- * Copyright (c) 1995 Terrence R. Lambert
- * All rights reserved.
- *
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- * (c) UNIX System Laboratories, Inc.
- * All or some portions of this file are derived from material licensed
- * to the University of California by American Telephone and Telegraph
- * Co. or Unix System Laboratories, Inc. and are reproduced herein with
- * the permission of UNIX System Laboratories, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)kernel.h 8.3 (Berkeley) 1/21/94
- * $Id$
- */
-
-#ifndef _SYS_KERNEL_H_
-#define _SYS_KERNEL_H_
-
-/* Global variables for the kernel. */
-
-/* 1.1 */
-extern long hostid;
-extern char hostname[MAXHOSTNAMELEN];
-extern int hostnamelen;
-extern char domainname[MAXHOSTNAMELEN];
-extern int domainnamelen;
-extern char kernelname[MAXPATHLEN];
-
-/* 1.2 */
-extern volatile struct timeval mono_time;
-extern struct timeval boottime;
-extern struct timeval runtime;
-/* extern volatile struct timeval time; */
-extern struct timezone tz; /* XXX */
-
-extern int tick; /* usec per tick (1000000 / hz) */
-extern int hz; /* system clock's frequency */
-extern int psratio; /* ratio: prof / stat */
-extern int stathz; /* statistics clock's frequency */
-extern int profhz; /* profiling clock's frequency */
-extern int ticks;
-extern int lbolt; /* once a second sleep address */
-extern int tickdelta;
-extern long timedelta;
-
-/*
- * The following macros are used to declare global sets of objects, which
- * are collected by the linker into a `struct linker_set' as defined below.
- *
- * NB: the constants defined below must match those defined in
- * ld/ld.h. Since their calculation requires arithmetic, we
- * can't name them symbolically (e.g., 23 is N_SETT | N_EXT).
- */
-#define MAKE_SET(set, sym, type)
-#define TEXT_SET(set, sym) MAKE_SET(set, sym, 23)
-#define DATA_SET(set, sym) MAKE_SET(set, sym, 25)
-#define BSS_SET(set, sym) MAKE_SET(set, sym, 27)
-#define ABS_SET(set, sym) MAKE_SET(set, sym, 21)
-
-
-/*
- * Enumerated types for known system startup interfaces.
- *
- * Startup occurs in ascending numeric order; the list entries are
- * sorted prior to attempting startup to guarantee order. Items
- * of the same level are arbitrated for order based on the 'order'
- * element.
- *
- * These numbers are arbitrary and are chosen ONLY for ordering; the
- * enumeration values are explicit rather than implicit to provide
- * for binary compatibility with inserted elements.
- *
- * The SI_SUB_RUN_SCHEDULER value must have the highest lexical value.
- *
- * The SI_SUB_CONSOLE and SI_SUB_SWAP values represent values used by
- * the BSD 4.4Lite but not by FreeBSD; they are maintained in dependent
- * order to support porting.
- *
- * The SI_SUB_PROTO_BEGIN and SI_SUB_PROTO_END bracket a range of
- * initializations to take place at splimp(). This is a historical
- * wart that should be removed -- probably running everything at
- * splimp() until the first init that doesn't want it is the correct
- * fix. They are currently present to ensure historical behavior.
- */
-enum sysinit_sub_id {
- SI_SUB_DUMMY = 0x00000000, /* not executed; for linker*/
- SI_SUB_CONSOLE = 0x08000000, /* console*/
- SI_SUB_COPYRIGHT = 0x08000001, /* first use of console*/
- SI_SUB_VM = 0x10000000, /* virtual memory system init*/
- SI_SUB_KMEM = 0x18000000, /* kernel memory*/
- SI_SUB_CPU = 0x20000000, /* CPU resource(s)*/
- SI_SUB_DEVFS = 0x22000000, /* get DEVFS ready */
- SI_SUB_DRIVERS = 0x23000000, /* Let Drivers initialize */
- SI_SUB_CONFIGURE = 0x24000000, /* Configure devices */
- SI_SUB_INTRINSIC = 0x28000000, /* proc 0*/
- SI_SUB_RUN_QUEUE = 0x30000000, /* the run queue*/
- SI_SUB_VM_CONF = 0x38000000, /* config VM, set limits*/
- SI_SUB_VFS = 0x40000000, /* virtual file system*/
- SI_SUB_CLOCKS = 0x48000000, /* real time and stat clocks*/
- SI_SUB_MBUF = 0x50000000, /* mbufs*/
- SI_SUB_CLIST = 0x58000000, /* clists*/
- SI_SUB_SYSV_SHM = 0x64000000, /* System V shared memory*/
- SI_SUB_SYSV_SEM = 0x68000000, /* System V semaphores*/
- SI_SUB_SYSV_MSG = 0x6C000000, /* System V message queues*/
- SI_SUB_PSEUDO = 0x70000000, /* pseudo devices*/
- SI_SUB_PROTO_BEGIN = 0x80000000, /* XXX: set splimp (kludge)*/
- SI_SUB_PROTO_IF = 0x84000000, /* interfaces*/
- SI_SUB_PROTO_DOMAIN = 0x88000000, /* domains (address families?)*/
- SI_SUB_PROTO_END = 0x8fffffff, /* XXX: set splx (kludge)*/
- SI_SUB_KPROF = 0x90000000, /* kernel profiling*/
- SI_SUB_KICK_SCHEDULER = 0xa0000000, /* start the timeout events*/
- SI_SUB_ROOT = 0xb0000000, /* root mount*/
- SI_SUB_ROOT_FDTAB = 0xb8000000, /* root vnode in fd table...*/
- SI_SUB_SWAP = 0xc0000000, /* swap*/
- SI_SUB_INTRINSIC_POST = 0xd0000000, /* proc 0 cleanup*/
- SI_SUB_KTHREAD_INIT = 0xe0000000, /* init process*/
- SI_SUB_KTHREAD_PAGE = 0xe4000000, /* pageout daemon*/
- SI_SUB_KTHREAD_VM = 0xe8000000, /* vm daemon*/
- SI_SUB_KTHREAD_UPDATE = 0xec000000, /* update daemon*/
- SI_SUB_RUN_SCHEDULER = 0xffffffff /* scheduler: no return*/
-};
-
-
-/*
- * Some enumerated orders; "ANY" sorts last.
- */
-enum sysinit_elem_order {
- SI_ORDER_FIRST = 0x00000000, /* first*/
- SI_ORDER_SECOND = 0x00000001, /* second*/
- SI_ORDER_THIRD = 0x00000002, /* third*/
- SI_ORDER_MIDDLE = 0x10000000, /* somewhere in the middle */
- SI_ORDER_ANY = 0xffffffff /* last*/
-};
-
-
-/*
- * System initialization call types; currently two are supported... one
- * to do a simple function call and one to cause a process to be started
- * by the kernel on the callers behalf.
- */
-typedef enum sysinit_elem_type {
- SI_TYPE_DEFAULT = 0x00000000, /* No special processing*/
- SI_TYPE_KTHREAD = 0x00000001 /* start kernel thread*/
-} si_elem_t;
-
-
-/*
- * A system initialization call instance
- *
- * The subsystem
- */
-struct sysinit {
- unsigned int subsystem; /* subsystem identifier*/
- unsigned int order; /* init order within subsystem*/
- void (*func) __P((void *)); /* init function*/
- void *udata; /* multiplexer/argument */
- si_elem_t type; /* sysinit_elem_type*/
-};
-
-
-/*
- * Default: no special processing
- */
-#define SYSINIT(uniquifier, subsystem, order, func, ident)
-
-/*
- * Call 'fork()' before calling '(*func)(ident)';
- * for making a kernel 'thread' (or builtin process.)
- */
-#define SYSINIT_KT(uniquifier, subsystem, order, func, ident)
-
-
-/*
- * A kernel process descriptor; used to start "internal" daemons
- *
- * Note: global_procpp may be NULL for no global save area
- */
-struct kproc_desc {
- char *arg0; /* arg 0 (for 'ps' listing)*/
- void (*func) __P((void)); /* "main" for kernel process*/
- struct proc **global_procpp; /* ptr to proc ptr save area*/
-};
-
-void kproc_start __P((void *udata));
-
-#ifdef PSEUDO_LKM
-#include <sys/conf.h>
-#include <sys/exec.h>
-#include <sys/sysent.h>
-#include <sys/lkm.h>
-
-#define PSEUDO_SET(init, name) \
- extern struct linker_set MODVNOPS; \
- MOD_MISC(name); \
- static int \
- name ## _load(struct lkm_table *lkmtp, int cmd) \
- { init((void *)NULL /* XXX unused (?) */); return 0; } \
- static int \
- name ## _unload(struct lkm_table *lkmtp, int cmd) \
- { return EINVAL; } \
- int \
- name ## _mod(struct lkm_table *lkmtp, int cmd, int ver) { \
- DISPATCH(lkmtp, cmd, ver, name ## _load, name ## _unload, \
- lkm_nullcmd); }
-#else /* PSEUDO_LKM */
-
-/*
- * Compatibility. To be deprecated after LKM is updated.
- */
-#define PSEUDO_SET(sym, name) SYSINIT(ps, SI_SUB_PSEUDO, SI_ORDER_ANY, sym, 0)
-
-#endif /* PSEUDO_LKM */
-
-struct linker_set {
- int ls_length;
- const void *ls_items[1]; /* really ls_length of them,
- * trailing NULL */
-};
-
-extern struct linker_set execsw_set;
-
-#endif /* !_SYS_KERNEL_H_*/
diff --git a/c/src/exec/libnetworking/sys/libkern.h b/c/src/exec/libnetworking/sys/libkern.h
deleted file mode 100644
index c01e35b273..0000000000
--- a/c/src/exec/libnetworking/sys/libkern.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)libkern.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _SYS_LIBKERN_H_
-#define _SYS_LIBKERN_H_
-
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-/* BCD conversions. */
-extern u_char const bcd2bin_data[];
-extern u_char const bin2bcd_data[];
-extern char const hex2ascii_data[];
-
-#define bcd2bin(bcd) (bcd2bin_data[bcd])
-#define bin2bcd(bin) (bin2bcd_data[bin])
-#define hex2ascii(hex) (hex2ascii_data[hex])
-
-static __inline int imax(int a, int b) { return (a > b ? a : b); }
-static __inline int imin(int a, int b) { return (a < b ? a : b); }
-static __inline long lmax(long a, long b) { return (a > b ? a : b); }
-static __inline long lmin(long a, long b) { return (a < b ? a : b); }
-static __inline u_int max(u_int a, u_int b) { return (a > b ? a : b); }
-static __inline u_int min(u_int a, u_int b) { return (a < b ? a : b); }
-static __inline quad_t qmax(quad_t a, quad_t b) { return (a > b ? a : b); }
-static __inline quad_t qmin(quad_t a, quad_t b) { return (a < b ? a : b); }
-static __inline u_long ulmax(u_long a, u_long b) { return (a > b ? a : b); }
-static __inline u_long ulmin(u_long a, u_long b) { return (a < b ? a : b); }
-
-/* Prototypes for non-quad routines. */
-int bcmp __P((const void *, const void *, size_t));
-#ifndef HAVE_INLINE_FFS
-int ffs __P((int));
-#endif
-#ifndef HAVE_INLINE_FLS
-int fls __P((int));
-#endif
-int locc __P((int, char *, u_int));
-void qsort __P((void *base, size_t nmemb, size_t size,
- int (*compar)(const void *, const void *)));
-u_long random __P((void));
-char *index __P((const char *, int));
-char *rindex __P((const char *, int));
-int scanc __P((u_int, const u_char *, const u_char *, int));
-int skpc __P((int, int, char *));
-void srandom __P((u_long));
-char *strcat __P((char *, const char *));
-int strcmp __P((const char *, const char *));
-char *strdup __P((const char *s));
-char *strcpy __P((char *, const char *));
-size_t strlen __P((const char *));
-int strncmp __P((const char *, const char *, size_t));
-char *strncpy __P((char *, const char *, size_t));
-char *strerror __P((int errnum));
-
-#endif /* !_SYS_LIBKERN_H_ */
diff --git a/c/src/exec/libnetworking/sys/malloc.h b/c/src/exec/libnetworking/sys/malloc.h
deleted file mode 100644
index ec85c1814d..0000000000
--- a/c/src/exec/libnetworking/sys/malloc.h
+++ /dev/null
@@ -1,355 +0,0 @@
-/*
- * Copyright (c) 1987, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)malloc.h 8.5 (Berkeley) 5/3/95
- * $Id$
- */
-
-#ifndef _SYS_MALLOC_H_
-#define _SYS_MALLOC_H_
-
-#include <rtems/rtems_bsdnet_internal.h> /* Ensure we get RTEMS malloc hooks */
-#define KMEMSTATS
-
-/*
- * flags to malloc
- */
-#define M_WAITOK 0x0000
-#define M_NOWAIT 0x0001
-#define M_KERNEL 0x0002
-
-/*
- * Types of memory to be allocated
- */
-#define M_FREE 0 /* should be on free list */
-#define M_MBUF 1 /* mbuf */
-#define M_DEVBUF 2 /* device driver memory */
-#define M_SOCKET 3 /* socket structure */
-#define M_PCB 4 /* protocol control block */
-#define M_RTABLE 5 /* routing tables */
-#define M_HTABLE 6 /* IMP host tables */
-#define M_FTABLE 7 /* fragment reassembly header */
-#define M_ZOMBIE 8 /* zombie proc status */
-#define M_IFADDR 9 /* interface address */
-#define M_SOOPTS 10 /* socket options */
-#define M_SONAME 11 /* socket name */
-#define M_NAMEI 12 /* namei path name buffer */
-#define M_GPROF 13 /* kernel profiling buffer */
-#define M_IOCTLOPS 14 /* ioctl data buffer */
-#define M_MAPMEM 15 /* mapped memory descriptors */
-#define M_CRED 16 /* credentials */
-#define M_PGRP 17 /* process group header */
-#define M_SESSION 18 /* session header */
-#define M_IOV 19 /* large iov's */
-#define M_MOUNT 20 /* vfs mount struct */
-#define M_FHANDLE 21 /* network file handle */
-#define M_NFSREQ 22 /* NFS request header */
-#define M_NFSMNT 23 /* NFS mount structure */
-#define M_NFSNODE 24 /* NFS vnode private part */
-#define M_VNODE 25 /* Dynamically allocated vnodes */
-#define M_CACHE 26 /* Dynamically allocated cache entries */
-#define M_DQUOT 27 /* UFS quota entries */
-#define M_UFSMNT 28 /* UFS mount structure */
-#define M_SHM 29 /* SVID compatible shared memory segments */
-#define M_VMMAP 30 /* VM map structures */
-#define M_VMMAPENT 31 /* VM map entry structures */
-#define M_VMOBJ 32 /* VM object structure */
-#define M_VMOBJHASH 33 /* VM object hash structure */
-#define M_VMPMAP 34 /* VM pmap */
-#define M_VMPVENT 35 /* VM phys-virt mapping entry */
-#define M_VMPAGER 36 /* XXX: VM pager struct */
-#define M_VMPGDATA 37 /* XXX: VM pager private data */
-#define M_FILE 38 /* Open file structure */
-#define M_FILEDESC 39 /* Open file descriptor table */
-#define M_LOCKF 40 /* Byte-range locking structures */
-#define M_PROC 41 /* Proc structures */
-#define M_SUBPROC 42 /* Proc sub-structures */
-#define M_SEGMENT 43 /* Segment for LFS */
-#define M_LFSNODE 44 /* LFS vnode private part */
-#define M_FFSNODE 45 /* FFS vnode private part */
-#define M_MFSNODE 46 /* MFS vnode private part */
-#define M_NQLEASE 47 /* Nqnfs lease */
-#define M_NQMHOST 48 /* Nqnfs host address table */
-#define M_NETADDR 49 /* Export host address structure */
-#define M_NFSSVC 50 /* Nfs server structure */
-#define M_NFSUID 51 /* Nfs uid mapping structure */
-#define M_NFSD 52 /* Nfs server daemon structure */
-#define M_IPMOPTS 53 /* internet multicast options */
-#define M_IPMADDR 54 /* internet multicast address */
-#define M_IFMADDR 55 /* link-level multicast address */
-#define M_MRTABLE 56 /* multicast routing tables */
-#define M_ISOFSMNT 57 /* ISOFS mount structure */
-#define M_ISOFSNODE 58 /* ISOFS vnode private part */
-#define M_NFSRVDESC 59 /* NFS server socket descriptor */
-#define M_NFSDIROFF 60 /* NFS directory offset data */
-#define M_NFSBIGFH 61 /* NFS version 3 file handle */
-#define M_MSDOSFSMNT 67 /* MSDOSFS mount structure */
-#define M_MSDOSFSNODE 68 /* MSDOSFS vnode private part */
-#define M_MSDOSFSFAT 69 /* MSDOSFS file allocation table */
-#define M_DEVFSMNT 70 /* DEVFS mount structure */
-#define M_DEVFSBACK 71 /* DEVFS Back node */
-#define M_DEVFSFRONT 72 /* DEVFS Front node */
-#define M_DEVFSNODE 73 /* DEVFS node */
-#define M_TEMP 74 /* misc temporary data buffers */
-#define M_TTYS 75 /* tty data structures */
-#define M_GZIP 76 /* Gzip trees */
-#define M_IPFW 77 /* IpFw/IpAcct chain's */
-#define M_DEVL 78 /* isa_device lists in userconfig() */
-#define M_PKTCLASS 79 /* structures used in packet classifier */
-#define M_SYSCTL 80 /* sysctl internal magic */
-#define M_SECA 81 /* security associations, key management */
-#define M_BIOBUF 82 /* BIO buffer */
-#define M_KTRACE 83 /* KTRACE */
-#define M_SELECT 84 /* select() buffer */
-#define M_CFS 85 /* Coda */
-#define M_LAST 86 /* Must be last type + 1 */
-
-#define INITKMEMNAMES { \
- "free", /* 0 M_FREE */ \
- "mbuf", /* 1 M_MBUF */ \
- "devbuf", /* 2 M_DEVBUF */ \
- "socket", /* 3 M_SOCKET */ \
- "pcb", /* 4 M_PCB */ \
- "routetbl", /* 5 M_RTABLE */ \
- "hosttbl", /* 6 M_HTABLE */ \
- "fragtbl", /* 7 M_FTABLE */ \
- "zombie", /* 8 M_ZOMBIE */ \
- "ifaddr", /* 9 M_IFADDR */ \
- "soopts", /* 10 M_SOOPTS */ \
- "soname", /* 11 M_SONAME */ \
- "namei", /* 12 M_NAMEI */ \
- "gprof", /* 13 M_GPROF */ \
- "ioctlops", /* 14 M_IOCTLOPS */ \
- "mapmem", /* 15 M_MAPMEM */ \
- "cred", /* 16 M_CRED */ \
- "pgrp", /* 17 M_PGRP */ \
- "session", /* 18 M_SESSION */ \
- "iov", /* 19 M_IOV */ \
- "mount", /* 20 M_MOUNT */ \
- "fhandle", /* 21 M_FHANDLE */ \
- "NFS req", /* 22 M_NFSREQ */ \
- "NFS mount", /* 23 M_NFSMNT */ \
- "NFS node", /* 24 M_NFSNODE */ \
- "vnodes", /* 25 M_VNODE */ \
- "namecache", /* 26 M_CACHE */ \
- "UFS quota", /* 27 M_DQUOT */ \
- "UFS mount", /* 28 M_UFSMNT */ \
- "shm", /* 29 M_SHM */ \
- "VM map", /* 30 M_VMMAP */ \
- "VM mapent", /* 31 M_VMMAPENT */ \
- "VM object", /* 32 M_VMOBJ */ \
- "VM objhash", /* 33 M_VMOBJHASH */ \
- "VM pmap", /* 34 M_VMPMAP */ \
- "VM pvmap", /* 35 M_VMPVENT */ \
- "VM pager", /* 36 M_VMPAGER */ \
- "VM pgdata", /* 37 M_VMPGDATA */ \
- "file", /* 38 M_FILE */ \
- "file desc", /* 39 M_FILEDESC */ \
- "lockf", /* 40 M_LOCKF */ \
- "proc", /* 41 M_PROC */ \
- "subproc", /* 42 M_SUBPROC */ \
- "LFS segment", /* 43 M_SEGMENT */ \
- "LFS node", /* 44 M_LFSNODE */ \
- "FFS node", /* 45 M_FFSNODE */ \
- "MFS node", /* 46 M_MFSNODE */ \
- "NQNFS Lease", /* 47 M_NQLEASE */ \
- "NQNFS Host", /* 48 M_NQMHOST */ \
- "Export Host", /* 49 M_NETADDR */ \
- "NFS srvsock", /* 50 M_NFSSVC */ \
- "NFS uid", /* 51 M_NFSUID */ \
- "NFS daemon", /* 52 M_NFSD */ \
- "ip_moptions", /* 53 M_IPMOPTS */ \
- "in_multi", /* 54 M_IPMADDR */ \
- "ether_multi", /* 55 M_IFMADDR */ \
- "mrt", /* 56 M_MRTABLE */ \
- "ISOFS mount", /* 57 M_ISOFSMNT */ \
- "ISOFS node", /* 58 M_ISOFSNODE */ \
- "NFSV3 srvdesc",/* 59 M_NFSRVDESC */ \
- "NFSV3 diroff", /* 60 M_NFSDIROFF */ \
- "NFSV3 bigfh", /* 61 M_NFSBIGFH */ \
- NULL, \
- NULL, NULL, NULL, NULL, \
- "MSDOSFS mount",/* 67 M_MSDOSFSMNT */ \
- "MSDOSFS node", /* 68 M_MSDOSFSNODE */ \
- "MSDOSFS FAT", /* 69 M_MSDOSFSFAR */ \
- "DEVFS mount", /* 70 M_DEVFSMNT */ \
- "DEVFS back", /* 71 M_DEVFSBACK */ \
- "DEVFS front", /* 72 M_DEVFSFRONT */ \
- "DEVFS node", /* 73 M_DEVFSNODE */ \
- "temp", /* 74 M_TEMP */ \
- "ttys", /* 75 M_TTYS */ \
- "Gzip trees", /* 76 M_GZIP */ \
- "IpFw/IpAcct", /* 77 M_IPFW */ \
- "isa_devlist", /* 78 M_DEVL */ \
- "PktClass", /* 79 M_PKTCLASS */ \
- "sysctl", /* 80 M_SYSCTL */ \
- "key mgmt", /* 81 M_SECA */ \
- "BIO buffer", /* 82 M_BIOBUF */ \
- "KTRACE", /* 83 M_KTRACE */ \
- "select", /* 84 M_SELECT */ \
- "Coda", /* 85 M_CFS */ \
-}
-
-struct kmemstats {
- long ks_inuse; /* # of packets of this type currently in use */
- long ks_calls; /* total packets of this type ever allocated */
- long ks_memuse; /* total memory held in bytes */
- u_short ks_limblocks; /* number of times blocked for hitting limit */
- u_short ks_mapblocks; /* number of times blocked for kernel map */
- long ks_maxused; /* maximum number ever used */
- long ks_limit; /* most that are allowed to exist */
- long ks_size; /* sizes of this thing that are allocated */
- long ks_spare;
-};
-
-/*
- * Array of descriptors that describe the contents of each page
- */
-struct kmemusage {
- short ku_indx; /* bucket index */
- union {
- u_short freecnt;/* for small allocations, free pieces in page */
- u_short pagecnt;/* for large allocations, pages alloced */
- } ku_un;
-};
-#define ku_freecnt ku_un.freecnt
-#define ku_pagecnt ku_un.pagecnt
-
-/*
- * Set of buckets for each size of memory block that is retained
- */
-struct kmembuckets {
- caddr_t kb_next; /* list of free blocks */
- caddr_t kb_last; /* last free block */
- long kb_calls; /* total calls to allocate this size */
- long kb_total; /* total number of blocks allocated */
- long kb_totalfree; /* # of free elements in this bucket */
- long kb_elmpercl; /* # of elements in this sized allocation */
- long kb_highwat; /* high water mark */
- long kb_couldfree; /* over high water mark and could free */
-};
-
-#ifdef KERNEL
-#define MINALLOCSIZE (1 << MINBUCKET)
-#define BUCKETINDX(size) \
- ((size) <= (MINALLOCSIZE * 128) \
- ? (size) <= (MINALLOCSIZE * 8) \
- ? (size) <= (MINALLOCSIZE * 2) \
- ? (size) <= (MINALLOCSIZE * 1) \
- ? (MINBUCKET + 0) \
- : (MINBUCKET + 1) \
- : (size) <= (MINALLOCSIZE * 4) \
- ? (MINBUCKET + 2) \
- : (MINBUCKET + 3) \
- : (size) <= (MINALLOCSIZE* 32) \
- ? (size) <= (MINALLOCSIZE * 16) \
- ? (MINBUCKET + 4) \
- : (MINBUCKET + 5) \
- : (size) <= (MINALLOCSIZE * 64) \
- ? (MINBUCKET + 6) \
- : (MINBUCKET + 7) \
- : (size) <= (MINALLOCSIZE * 2048) \
- ? (size) <= (MINALLOCSIZE * 512) \
- ? (size) <= (MINALLOCSIZE * 256) \
- ? (MINBUCKET + 8) \
- : (MINBUCKET + 9) \
- : (size) <= (MINALLOCSIZE * 1024) \
- ? (MINBUCKET + 10) \
- : (MINBUCKET + 11) \
- : (size) <= (MINALLOCSIZE * 8192) \
- ? (size) <= (MINALLOCSIZE * 4096) \
- ? (MINBUCKET + 12) \
- : (MINBUCKET + 13) \
- : (size) <= (MINALLOCSIZE * 16384) \
- ? (MINBUCKET + 14) \
- : (MINBUCKET + 15))
-
-/*
- * Turn virtual addresses into kmem map indices
- */
-#define kmemxtob(alloc) (kmembase + (alloc) * PAGE_SIZE)
-#define btokmemx(addr) (((caddr_t)(addr) - kmembase) / PAGE_SIZE)
-#define btokup(addr) (&kmemusage[(caddr_t)(addr) - kmembase >> PAGE_SHIFT])
-
-/*
- * Macro versions for the usual cases of malloc/free
- */
-#if defined(KMEMSTATS) || defined(DIAGNOSTIC)
-#define MALLOC(space, cast, size, type, flags) \
- (space) = (cast)malloc((u_long)(size), type, flags)
-#define FREE(addr, type) free((addr), type)
-
-#else /* do not collect statistics */
-#define MALLOC(space, cast, size, type, flags) { \
- register struct kmembuckets *kbp = &bucket[BUCKETINDX(size)]; \
- long s = splimp(); \
- if (kbp->kb_next == NULL) { \
- (space) = (cast)malloc((u_long)(size), type, flags); \
- } else { \
- (space) = (cast)kbp->kb_next; \
- kbp->kb_next = *(caddr_t *)(space); \
- } \
- splx(s); \
-}
-
-#define FREE(addr, type) { \
- register struct kmembuckets *kbp; \
- register struct kmemusage *kup = btokup(addr); \
- long s = splimp(); \
- if (1 << kup->ku_indx > MAXALLOCSAVE) { \
- free((addr), type); \
- } else { \
- kbp = &bucket[kup->ku_indx]; \
- if (kbp->kb_next == NULL) \
- kbp->kb_next = (caddr_t)(addr); \
- else \
- *(caddr_t *)(kbp->kb_last) = (caddr_t)(addr); \
- *(caddr_t *)(addr) = NULL; \
- kbp->kb_last = (caddr_t)(addr); \
- } \
- splx(s); \
-}
-#endif /* do not collect statistics */
-
-extern struct kmemstats kmemstats[];
-extern struct kmemusage *kmemusage;
-extern char *kmembase;
-extern struct kmembuckets bucket[];
-
-void *contigmalloc __P((unsigned long size, int type, int flags,
- unsigned long low, unsigned long high,
- unsigned long alignment, unsigned long boundary));
-void free __P((void *addr, int type));
-void *malloc __P((unsigned long size, int type, int flags));
-#endif /* KERNEL */
-
-#endif /* !_SYS_MALLOC_H_ */
diff --git a/c/src/exec/libnetworking/sys/mbuf.h b/c/src/exec/libnetworking/sys/mbuf.h
deleted file mode 100644
index 00f8a13a5c..0000000000
--- a/c/src/exec/libnetworking/sys/mbuf.h
+++ /dev/null
@@ -1,440 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)mbuf.h 8.5 (Berkeley) 2/19/95
- * $Id$
- */
-
-#ifndef _SYS_MBUF_H_
-#define _SYS_MBUF_H_
-
-#ifndef M_WAITOK
-#include <sys/malloc.h>
-#endif
-
-/*
- * Mbufs are of a single size, MSIZE (machine/machparam.h), which
- * includes overhead. An mbuf may add a single "mbuf cluster" of size
- * MCLBYTES (also in machine/machparam.h), which has no additional overhead
- * and is used instead of the internal data area; this is done when
- * at least MINCLSIZE of data must be stored.
- */
-
-#define MLEN (MSIZE - sizeof(struct m_hdr)) /* normal data len */
-#define MHLEN (MLEN - sizeof(struct pkthdr)) /* data len w/pkthdr */
-
-#define MINCLSIZE (MHLEN + MLEN) /* smallest amount to put in cluster */
-#define M_MAXCOMPRESS (MHLEN / 2) /* max amount to copy for compression */
-
-/*
- * Macros for type conversion
- * mtod(m,t) - convert mbuf pointer to data pointer of correct type
- * dtom(x) - convert data pointer within mbuf to mbuf pointer (XXX)
- * mtocl(x) - convert pointer within cluster to cluster index #
- * cltom(x) - convert cluster # to ptr to beginning of cluster
- */
-#define mtod(m,t) ((t)((m)->m_data))
-#define dtom(x) ((struct mbuf *)((long)(x) & ~(MSIZE-1)))
-#define mtocl(x) (((u_long)(x) - (u_long)mbutl) >> MCLSHIFT)
-#define cltom(x) ((caddr_t)((u_long)mbutl + ((u_long)(x) << MCLSHIFT)))
-
-/* header at beginning of each mbuf: */
-struct m_hdr {
- struct mbuf *mh_next; /* next buffer in chain */
- struct mbuf *mh_nextpkt; /* next chain in queue/record */
- caddr_t mh_data; /* location of data */
- int mh_len; /* amount of data in this mbuf */
- short mh_type; /* type of data in this mbuf */
- short mh_flags; /* flags; see below */
-};
-
-/* record/packet header in first mbuf of chain; valid if M_PKTHDR set */
-struct pkthdr {
- struct ifnet *rcvif; /* rcv interface */
- int len; /* total packet length */
-};
-
-/* description of external storage mapped into mbuf, valid if M_EXT set */
-struct m_ext {
- caddr_t ext_buf; /* start of buffer */
- void (*ext_free) /* free routine if not the usual */
- __P((caddr_t, u_int));
- u_int ext_size; /* size of buffer, for ext_free */
- void (*ext_ref) /* add a reference to the ext object */
- __P((caddr_t, u_int));
-};
-
-struct mbuf {
- struct m_hdr m_hdr;
- union {
- struct {
- struct pkthdr MH_pkthdr; /* M_PKTHDR set */
- union {
- struct m_ext MH_ext; /* M_EXT set */
- char MH_databuf[MHLEN];
- } MH_dat;
- } MH;
- char M_databuf[MLEN]; /* !M_PKTHDR, !M_EXT */
- } M_dat;
-};
-#define m_next m_hdr.mh_next
-#define m_len m_hdr.mh_len
-#define m_data m_hdr.mh_data
-#define m_type m_hdr.mh_type
-#define m_flags m_hdr.mh_flags
-#define m_nextpkt m_hdr.mh_nextpkt
-#define m_act m_nextpkt
-#define m_pkthdr M_dat.MH.MH_pkthdr
-#define m_ext M_dat.MH.MH_dat.MH_ext
-#define m_pktdat M_dat.MH.MH_dat.MH_databuf
-#define m_dat M_dat.M_databuf
-
-/* mbuf flags */
-#define M_EXT 0x0001 /* has associated external storage */
-#define M_PKTHDR 0x0002 /* start of record */
-#define M_EOR 0x0004 /* end of record */
-#define M_PROTO1 0x0008 /* protocol-specific */
-
-/* mbuf pkthdr flags, also in m_flags */
-#define M_BCAST 0x0100 /* send/received as link-level broadcast */
-#define M_MCAST 0x0200 /* send/received as link-level multicast */
-
-/* flags copied when copying m_pkthdr */
-#define M_COPYFLAGS (M_PKTHDR|M_EOR|M_PROTO1|M_BCAST|M_MCAST)
-
-/* mbuf types */
-#define MT_FREE 0 /* should be on free list */
-#define MT_DATA 1 /* dynamic (data) allocation */
-#define MT_HEADER 2 /* packet header */
-#define MT_SOCKET 3 /* socket structure */
-#define MT_PCB 4 /* protocol control block */
-#define MT_RTABLE 5 /* routing tables */
-#define MT_HTABLE 6 /* IMP host tables */
-#define MT_ATABLE 7 /* address resolution tables */
-#define MT_SONAME 8 /* socket name */
-#define MT_SOOPTS 10 /* socket options */
-#define MT_FTABLE 11 /* fragment reassembly header */
-#define MT_RIGHTS 12 /* access rights */
-#define MT_IFADDR 13 /* interface address */
-#define MT_CONTROL 14 /* extra-data protocol message */
-#define MT_OOBDATA 15 /* expedited data */
-
-/* flags to m_get/MGET */
-#define M_DONTWAIT M_NOWAIT
-#define M_WAIT M_WAITOK
-
-/* Freelists:
- *
- * Normal mbuf clusters are normally treated as character arrays
- * after allocation, but use the first word of the buffer as a free list
- * pointer while on the free list.
- */
-union mcluster {
- union mcluster *mcl_next;
- char mcl_buf[MCLBYTES];
-};
-
-/*
- * mbuf utility macros:
- *
- * MBUFLOCK(code)
- * prevents a section of code from from being interrupted by network
- * drivers.
- */
-#define MBUFLOCK(code) \
- { int ms = splimp(); \
- { code } \
- splx(ms); \
- }
-
-/*
- * mbuf allocation/deallocation macros:
- *
- * MGET(struct mbuf *m, int how, int type)
- * allocates an mbuf and initializes it to contain internal data.
- *
- * MGETHDR(struct mbuf *m, int how, int type)
- * allocates an mbuf and initializes it to contain a packet header
- * and internal data.
- */
-#define MGET(m, how, type) { \
- int _ms = splimp(); \
- if (mmbfree == 0) \
- (void)m_mballoc(1, (how)); \
- if (((m) = mmbfree) != 0) { \
- mmbfree = (m)->m_next; \
- mbstat.m_mtypes[MT_FREE]--; \
- (m)->m_type = (type); \
- mbstat.m_mtypes[type]++; \
- (m)->m_next = (struct mbuf *)NULL; \
- (m)->m_nextpkt = (struct mbuf *)NULL; \
- (m)->m_data = (m)->m_dat; \
- (m)->m_flags = 0; \
- splx(_ms); \
- } else { \
- splx(_ms); \
- (m) = m_retry((how), (type)); \
- } \
-}
-
-#define MGETHDR(m, how, type) { \
- int _ms = splimp(); \
- if (mmbfree == 0) \
- (void)m_mballoc(1, (how)); \
- if (((m) = mmbfree) != 0) { \
- mmbfree = (m)->m_next; \
- mbstat.m_mtypes[MT_FREE]--; \
- (m)->m_type = (type); \
- mbstat.m_mtypes[type]++; \
- (m)->m_next = (struct mbuf *)NULL; \
- (m)->m_nextpkt = (struct mbuf *)NULL; \
- (m)->m_data = (m)->m_pktdat; \
- (m)->m_flags = M_PKTHDR; \
- splx(_ms); \
- } else { \
- splx(_ms); \
- (m) = m_retryhdr((how), (type)); \
- } \
-}
-
-/*
- * Mbuf cluster macros.
- * MCLALLOC(caddr_t p, int how) allocates an mbuf cluster.
- * MCLGET adds such clusters to a normal mbuf;
- * the flag M_EXT is set upon success.
- * MCLFREE releases a reference to a cluster allocated by MCLALLOC,
- * freeing the cluster if the reference count has reached 0.
- */
-#define MCLALLOC(p, how) \
- MBUFLOCK( \
- if (mclfree == 0) \
- (void)m_clalloc(1, (how)); \
- if (((p) = (caddr_t)mclfree) != 0) { \
- ++mclrefcnt[mtocl(p)]; \
- mbstat.m_clfree--; \
- mclfree = ((union mcluster *)(p))->mcl_next; \
- } \
- )
-
-#define MCLGET(m, how) \
- { MCLALLOC((m)->m_ext.ext_buf, (how)); \
- if ((m)->m_ext.ext_buf != NULL) { \
- (m)->m_data = (m)->m_ext.ext_buf; \
- (m)->m_flags |= M_EXT; \
- (m)->m_ext.ext_free = NULL; \
- (m)->m_ext.ext_ref = NULL; \
- (m)->m_ext.ext_size = MCLBYTES; \
- } \
- }
-
-#define MCLFREE(p) \
- MBUFLOCK ( \
- if (--mclrefcnt[mtocl(p)] == 0) { \
- ((union mcluster *)(p))->mcl_next = mclfree; \
- mclfree = (union mcluster *)(p); \
- mbstat.m_clfree++; \
- } \
- )
-
-/*
- * MFREE(struct mbuf *m, struct mbuf *n)
- * Free a single mbuf and associated external storage.
- * Place the successor, if any, in n.
- */
-#define MFREE(m, n) \
- MBUFLOCK( \
- mbstat.m_mtypes[(m)->m_type]--; \
- if ((m)->m_flags & M_EXT) { \
- if ((m)->m_ext.ext_free) \
- (*((m)->m_ext.ext_free))((m)->m_ext.ext_buf, \
- (m)->m_ext.ext_size); \
- else { \
- char *p = (m)->m_ext.ext_buf; \
- if (--mclrefcnt[mtocl(p)] == 0) { \
- ((union mcluster *)(p))->mcl_next = mclfree; \
- mclfree = (union mcluster *)(p); \
- mbstat.m_clfree++; \
- } \
- } \
- } \
- (n) = (m)->m_next; \
- (m)->m_type = MT_FREE; \
- mbstat.m_mtypes[MT_FREE]++; \
- (m)->m_next = mmbfree; \
- mmbfree = (m); \
- )
-
-/*
- * Copy mbuf pkthdr from from to to.
- * from must have M_PKTHDR set, and to must be empty.
- */
-#define M_COPY_PKTHDR(to, from) { \
- (to)->m_pkthdr = (from)->m_pkthdr; \
- (to)->m_flags = (from)->m_flags & M_COPYFLAGS; \
- (to)->m_data = (to)->m_pktdat; \
-}
-
-/*
- * Set the m_data pointer of a newly-allocated mbuf (m_get/MGET) to place
- * an object of the specified size at the end of the mbuf, longword aligned.
- */
-#define M_ALIGN(m, len) \
- { (m)->m_data += (MLEN - (len)) &~ (sizeof(long) - 1); }
-/*
- * As above, for mbufs allocated with m_gethdr/MGETHDR
- * or initialized by M_COPY_PKTHDR.
- */
-#define MH_ALIGN(m, len) \
- { (m)->m_data += (MHLEN - (len)) &~ (sizeof(long) - 1); }
-
-/*
- * Compute the amount of space available
- * before the current start of data in an mbuf.
- */
-#define M_LEADINGSPACE(m) \
- ((m)->m_flags & M_EXT ? /* (m)->m_data - (m)->m_ext.ext_buf */ 0 : \
- (m)->m_flags & M_PKTHDR ? (m)->m_data - (m)->m_pktdat : \
- (m)->m_data - (m)->m_dat)
-
-/*
- * Compute the amount of space available
- * after the end of data in an mbuf.
- */
-#define M_TRAILINGSPACE(m) \
- ((m)->m_flags & M_EXT ? (m)->m_ext.ext_buf + (m)->m_ext.ext_size - \
- ((m)->m_data + (m)->m_len) : \
- &(m)->m_dat[MLEN] - ((m)->m_data + (m)->m_len))
-
-/*
- * Arrange to prepend space of size plen to mbuf m.
- * If a new mbuf must be allocated, how specifies whether to wait.
- * If how is M_DONTWAIT and allocation fails, the original mbuf chain
- * is freed and m is set to NULL.
- */
-#define M_PREPEND(m, plen, how) { \
- if (M_LEADINGSPACE(m) >= (plen)) { \
- (m)->m_data -= (plen); \
- (m)->m_len += (plen); \
- } else \
- (m) = m_prepend((m), (plen), (how)); \
- if ((m) && (m)->m_flags & M_PKTHDR) \
- (m)->m_pkthdr.len += (plen); \
-}
-
-/* change mbuf to new type */
-#define MCHTYPE(m, t) { \
- MBUFLOCK(mbstat.m_mtypes[(m)->m_type]--; mbstat.m_mtypes[t]++;) \
- (m)->m_type = t;\
-}
-
-/* length to m_copy to copy all */
-#define M_COPYALL 1000000000
-
-/* compatibility with 4.3 */
-#define m_copy(m, o, l) m_copym((m), (o), (l), M_DONTWAIT)
-
-/*
- * Mbuf statistics.
- */
-struct mbstat {
- u_long m_mbufs; /* mbufs obtained from page pool */
- u_long m_clusters; /* clusters obtained from page pool */
- u_long m_spare; /* spare field */
- u_long m_clfree; /* free clusters */
- u_long m_drops; /* times failed to find space */
- u_long m_wait; /* times waited for space */
- u_long m_drain; /* times drained protocols for space */
- u_short m_mtypes[256]; /* type specific mbuf allocations */
-};
-
-#ifdef KERNEL
-extern struct mbuf *mbutl; /* virtual address of mclusters */
-extern char *mclrefcnt; /* cluster reference counts */
-extern struct mbstat mbstat;
-extern int nmbclusters;
-extern int nmbufs;
-extern struct mbuf *mmbfree;
-extern union mcluster *mclfree;
-extern int max_linkhdr; /* largest link-level header */
-extern int max_protohdr; /* largest protocol header */
-extern int max_hdr; /* largest link+protocol header */
-extern int max_datalen; /* MHLEN - max_hdr */
-extern int mbtypes[]; /* XXX */
-
-struct mbuf *m_copym __P((struct mbuf *, int, int, int));
-struct mbuf *m_copypacket __P((struct mbuf *, int));
-struct mbuf *m_devget __P((char *, int, int, struct ifnet *,
- void (*copy)(char *, caddr_t, u_int)));
-struct mbuf *m_free __P((struct mbuf *));
-struct mbuf *m_get __P((int, int));
-struct mbuf *m_getclr __P((int, int));
-struct mbuf *m_gethdr __P((int, int));
-struct mbuf *m_prepend __P((struct mbuf *,int,int));
-struct mbuf *m_pullup __P((struct mbuf *, int));
-struct mbuf *m_retry __P((int, int));
-struct mbuf *m_retryhdr __P((int, int));
-struct mbuf *m_split __P((struct mbuf *,int,int));
-void m_adj __P((struct mbuf *, int));
-void m_cat __P((struct mbuf *,struct mbuf *));
-int m_mballoc __P((int, int));
-int m_clalloc __P((int, int));
-void m_copyback __P((struct mbuf *, int, int, caddr_t));
-void m_copydata __P((struct mbuf *,int,int,caddr_t));
-void m_freem __P((struct mbuf *));
-void m_reclaim __P((void));
-
-#ifdef MBTYPES
-int mbtypes[] = { /* XXX */
- M_FREE, /* MT_FREE 0 should be on free list */
- M_MBUF, /* MT_DATA 1 dynamic (data) allocation */
- M_MBUF, /* MT_HEADER 2 packet header */
- M_SOCKET, /* MT_SOCKET 3 socket structure */
- M_PCB, /* MT_PCB 4 protocol control block */
- M_RTABLE, /* MT_RTABLE 5 routing tables */
- M_HTABLE, /* MT_HTABLE 6 IMP host tables */
- 0, /* MT_ATABLE 7 address resolution tables */
- M_MBUF, /* MT_SONAME 8 socket name */
- 0, /* 9 */
- M_SOOPTS, /* MT_SOOPTS 10 socket options */
- M_FTABLE, /* MT_FTABLE 11 fragment reassembly header */
- M_MBUF, /* MT_RIGHTS 12 access rights */
- M_IFADDR, /* MT_IFADDR 13 interface address */
- M_MBUF, /* MT_CONTROL 14 extra-data protocol message */
- M_MBUF, /* MT_OOBDATA 15 expedited data */
-#ifdef DATAKIT
- 25, 26, 27, 28, 29, 30, 31, 32 /* datakit ugliness */
-#endif
-};
-#endif
-#endif
-
-#endif /* !_SYS_MBUF_H_ */
diff --git a/c/src/exec/libnetworking/sys/mount.h b/c/src/exec/libnetworking/sys/mount.h
deleted file mode 100644
index a6254e302d..0000000000
--- a/c/src/exec/libnetworking/sys/mount.h
+++ /dev/null
@@ -1,531 +0,0 @@
-/*
- * Copyright (c) 1989, 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)mount.h 8.13 (Berkeley) 3/27/94
- * $Id$
- */
-
-#ifndef _SYS_MOUNT_H_
-#define _SYS_MOUNT_H_
-
-#ifndef KERNEL
-#include <sys/ucred.h>
-#endif
-#include <sys/queue.h>
-
-typedef struct fsid { long val[2]; } fsid_t; /* file system id type */
-
-/*
- * File identifier.
- * These are unique per filesystem on a single machine.
- */
-#define MAXFIDSZ 16
-
-struct fid {
- u_short fid_len; /* length of data in bytes */
- u_short fid_reserved; /* force longword alignment */
- char fid_data[MAXFIDSZ]; /* data (variable length) */
-};
-
-/*
- * file system statistics
- */
-
-#define MNAMELEN 90 /* length of buffer for returned name */
-
-struct statfs {
- long f_spare2; /* placeholder */
- long f_bsize; /* fundamental file system block size */
- long f_iosize; /* optimal transfer block size */
- long f_blocks; /* total data blocks in file system */
- long f_bfree; /* free blocks in fs */
- long f_bavail; /* free blocks avail to non-superuser */
- long f_files; /* total file nodes in file system */
- long f_ffree; /* free file nodes in fs */
- fsid_t f_fsid; /* file system id */
- uid_t f_owner; /* user that mounted the filesystem */
- int f_type; /* type of filesystem (see below) */
- int f_flags; /* copy of mount flags */
- long f_spare[6]; /* spare for later */
- char f_mntonname[MNAMELEN]; /* directory on which mounted */
- char f_mntfromname[MNAMELEN];/* mounted filesystem */
-};
-
-/*
- * File system types.
- */
-#define MOUNT_NONE 0
-#define MOUNT_UFS 1 /* Fast Filesystem */
-#define MOUNT_NFS 2 /* Sun-compatible Network Filesystem */
-#define MOUNT_MFS 3 /* Memory-based Filesystem */
-#define MOUNT_MSDOS 4 /* MS/DOS Filesystem */
-#define MOUNT_LFS 5 /* Log-based Filesystem */
-#define MOUNT_LOFS 6 /* Loopback Filesystem */
-#define MOUNT_FDESC 7 /* File Descriptor Filesystem */
-#define MOUNT_PORTAL 8 /* Portal Filesystem */
-#define MOUNT_NULL 9 /* Minimal Filesystem Layer */
-#define MOUNT_UMAP 10 /* User/Group Identifier Remapping Filesystem */
-#define MOUNT_KERNFS 11 /* Kernel Information Filesystem */
-#define MOUNT_PROCFS 12 /* /proc Filesystem */
-#define MOUNT_AFS 13 /* Andrew Filesystem */
-#define MOUNT_CD9660 14 /* ISO9660 (aka CDROM) Filesystem */
-#define MOUNT_UNION 15 /* Union (translucent) Filesystem */
-#define MOUNT_DEVFS 16 /* existing device Filesystem */
-#define MOUNT_EXT2FS 17 /* Linux EXT2FS */
-#define MOUNT_TFS 18 /* Netcon Novell filesystem */
-#define MOUNT_CFS 19 /* Coda filesystem */
-#define MOUNT_MAXTYPE 19
-
-#define INITMOUNTNAMES { \
- "none", /* 0 MOUNT_NONE */ \
- "ufs", /* 1 MOUNT_UFS */ \
- "nfs", /* 2 MOUNT_NFS */ \
- "mfs", /* 3 MOUNT_MFS */ \
- "msdos", /* 4 MOUNT_MSDOS */ \
- "lfs", /* 5 MOUNT_LFS */ \
- "lofs", /* 6 MOUNT_LOFS */ \
- "fdesc", /* 7 MOUNT_FDESC */ \
- "portal", /* 8 MOUNT_PORTAL */ \
- "null", /* 9 MOUNT_NULL */ \
- "umap", /* 10 MOUNT_UMAP */ \
- "kernfs", /* 11 MOUNT_KERNFS */ \
- "procfs", /* 12 MOUNT_PROCFS */ \
- "afs", /* 13 MOUNT_AFS */ \
- "cd9660", /* 14 MOUNT_CD9660 */ \
- "union", /* 15 MOUNT_UNION */ \
- "devfs", /* 16 MOUNT_DEVFS */ \
- "ext2fs", /* 17 MOUNT_EXT2FS */ \
- "tfs", /* 18 MOUNT_TFS */ \
- "cfs", /* 19 MOUNT_CFS */ \
- 0, /* 20 MOUNT_SPARE */ \
-}
-
-/*
- * Structure per mounted file system. Each mounted file system has an
- * array of operations and an instance record. The file systems are
- * put on a doubly linked list.
- */
-LIST_HEAD(vnodelst, vnode);
-
-struct mount {
- CIRCLEQ_ENTRY(mount) mnt_list; /* mount list */
- struct vfsops *mnt_op; /* operations on fs */
- struct vfsconf *mnt_vfc; /* configuration info */
- struct vnode *mnt_vnodecovered; /* vnode we mounted on */
- struct vnodelst mnt_vnodelist; /* list of vnodes this mount */
- int mnt_flag; /* flags */
- int mnt_maxsymlinklen; /* max size of short symlink */
- struct statfs mnt_stat; /* cache of filesystem stats */
- qaddr_t mnt_data; /* private data */
-/* struct vfsconf *mnt_vfc; */ /* configuration info */
- time_t mnt_time; /* last time written*/
-};
-
-/*
- * Mount flags.
- *
- * Unmount uses MNT_FORCE flag.
- */
-#define MNT_RDONLY 0x00000001 /* read only filesystem */
-#define MNT_SYNCHRONOUS 0x00000002 /* file system written synchronously */
-#define MNT_NOEXEC 0x00000004 /* can't exec from filesystem */
-#define MNT_NOSUID 0x00000008 /* don't honor setuid bits on fs */
-#define MNT_NODEV 0x00000010 /* don't interpret special files */
-#define MNT_UNION 0x00000020 /* union with underlying filesystem */
-#define MNT_ASYNC 0x00000040 /* file system written asynchronously */
-#define MNT_NOATIME 0x10000000 /* Disable update of file access times */
-
-/*
- * exported mount flags.
- */
-#define MNT_EXRDONLY 0x00000080 /* exported read only */
-#define MNT_EXPORTED 0x00000100 /* file system is exported */
-#define MNT_DEFEXPORTED 0x00000200 /* exported to the world */
-#define MNT_EXPORTANON 0x00000400 /* use anon uid mapping for everyone */
-#define MNT_EXKERB 0x00000800 /* exported with Kerberos uid mapping */
-
-/*
- * Flags set by internal operations.
- */
-#define MNT_LOCAL 0x00001000 /* filesystem is stored locally */
-#define MNT_QUOTA 0x00002000 /* quotas are enabled on filesystem */
-#define MNT_ROOTFS 0x00004000 /* identifies the root filesystem */
-#define MNT_USER 0x00008000 /* mounted by a user */
-
-/*
- * Mask of flags that are visible to statfs()
- */
-#define MNT_VISFLAGMASK (MNT_RDONLY|MNT_SYNCHRONOUS|MNT_NOEXEC|MNT_NOSUID| \
- MNT_NODEV|MNT_UNION|MNT_ASYNC|MNT_EXRDONLY|MNT_EXPORTED| \
- MNT_DEFEXPORTED|MNT_EXPORTANON|MNT_EXKERB|MNT_LOCAL| \
- MNT_QUOTA|MNT_ROOTFS|MNT_USER|MNT_NOATIME)
-
-/*
- * filesystem control flags.
- *
- * MNT_MLOCK lock the mount entry so that name lookup cannot proceed
- * past the mount point. This keeps the subtree stable during mounts
- * and unmounts.
- */
-#define MNT_UPDATE 0x00010000 /* not a real mount, just an update */
-#define MNT_DELEXPORT 0x00020000 /* delete export host lists */
-#define MNT_RELOAD 0x00040000 /* reload filesystem data */
-#define MNT_FORCE 0x00080000 /* force unmount or readonly change */
-#define MNT_MLOCK 0x00100000 /* lock so that subtree is stable */
-#define MNT_MWAIT 0x00200000 /* someone is waiting for lock */
-#define MNT_MPBUSY 0x00400000 /* scan of mount point in progress */
-#define MNT_MPWANT 0x00800000 /* waiting for mount point */
-#define MNT_UNMOUNT 0x01000000 /* unmount in progress */
-#define MNT_WANTRDWR 0x02000000 /* want upgrade to read/write */
-
-/*
- * used to get configured filesystems information
- */
-#define VFS_MAXNAMELEN 32
-struct vfsconf {
- void *vfc_vfsops;
- char vfc_name[VFS_MAXNAMELEN];
- int vfc_index;
- int vfc_refcount;
- int vfc_flags;
-};
-
-/*
- * NB: these flags refer to IMPLEMENTATION properties, not properties of
- * any actual mounts; i.e., it does not make sense to change the flags.
- */
-#define VFCF_STATIC 0x00000001 /* statically compiled into kernel */
-#define VFCF_NETWORK 0x00000002 /* may get data over the network */
-#define VFCF_READONLY 0x00000004 /* writes are not implemented */
-#define VFCF_SYNTHETIC 0x00000008 /* data does not represent real files */
-#define VFCF_LOOPBACK 0x00000010 /* aliases some other mounted FS */
-#define VFCF_UNICODE 0x00000020 /* stores file names as Unicode*/
-
-/*
- * Operations supported on mounted file system.
- */
-#ifdef KERNEL
-
-extern int doforce; /* Flag to permit forcible unmounting. */
-extern struct vfsconf void_vfsconf;
-extern struct vfsconf *vfsconf[];
-
-#ifdef __STDC__
-struct nameidata;
-struct mbuf;
-#endif
-
-struct vfsops {
- int (*vfs_mount) __P((struct mount *mp, char *path, caddr_t data,
- struct nameidata *ndp, struct proc *p));
- int (*vfs_start) __P((struct mount *mp, int flags,
- struct proc *p));
- int (*vfs_unmount) __P((struct mount *mp, int mntflags,
- struct proc *p));
- int (*vfs_root) __P((struct mount *mp, struct vnode **vpp));
- int (*vfs_quotactl) __P((struct mount *mp, int cmds, uid_t uid,
- caddr_t arg, struct proc *p));
- int (*vfs_statfs) __P((struct mount *mp, struct statfs *sbp,
- struct proc *p));
- int (*vfs_sync) __P((struct mount *mp, int waitfor,
- struct ucred *cred, struct proc *p));
- int (*vfs_vget) __P((struct mount *mp, ino_t ino,
- struct vnode **vpp));
- int (*vfs_fhtovp) __P((struct mount *mp, struct fid *fhp,
- struct mbuf *nam, struct vnode **vpp,
- int *exflagsp, struct ucred **credanonp));
- int (*vfs_vptofh) __P((struct vnode *vp, struct fid *fhp));
- int (*vfs_init) __P((void));
-};
-
-#define VFS_MOUNT(MP, PATH, DATA, NDP, P) \
- (*(MP)->mnt_op->vfs_mount)(MP, PATH, DATA, NDP, P)
-#define VFS_START(MP, FLAGS, P) (*(MP)->mnt_op->vfs_start)(MP, FLAGS, P)
-#define VFS_UNMOUNT(MP, FORCE, P) (*(MP)->mnt_op->vfs_unmount)(MP, FORCE, P)
-#define VFS_ROOT(MP, VPP) (*(MP)->mnt_op->vfs_root)(MP, VPP)
-#define VFS_QUOTACTL(MP,C,U,A,P) (*(MP)->mnt_op->vfs_quotactl)(MP, C, U, A, P)
-#define VFS_STATFS(MP, SBP, P) (*(MP)->mnt_op->vfs_statfs)(MP, SBP, P)
-#define VFS_SYNC(MP, WAIT, C, P) (*(MP)->mnt_op->vfs_sync)(MP, WAIT, C, P)
-#define VFS_VGET(MP, INO, VPP) (*(MP)->mnt_op->vfs_vget)(MP, INO, VPP)
-#define VFS_FHTOVP(MP, FIDP, NAM, VPP, EXFLG, CRED) \
- (*(MP)->mnt_op->vfs_fhtovp)(MP, FIDP, NAM, VPP, EXFLG, CRED)
-#define VFS_VPTOFH(VP, FIDP) (*(VP)->v_mount->mnt_op->vfs_vptofh)(VP, FIDP)
-
-#ifdef VFS_LKM
-#include <sys/conf.h>
-#include <sys/exec.h>
-#include <sys/sysent.h>
-#include <sys/lkm.h>
-
-#define VFS_SET(vfsops, fsname, index, flags) \
- static struct vfsconf _fs_vfsconf = { \
- &vfsops, \
- #fsname, \
- index, \
- 0, \
- flags \
- }; \
- extern struct linker_set MODVNOPS; \
- MOD_VFS(#fsname,index,&MODVNOPS,&_fs_vfsconf); \
- int \
- fsname ## _mod(struct lkm_table *lkmtp, int cmd, int ver) { \
- DISPATCH(lkmtp, cmd, ver, lkm_nullcmd, lkm_nullcmd, lkm_nullcmd); }
-#else
-
-#define VFS_SET(vfsops, fsname, index, flags) \
- static struct vfsconf _fs_vfsconf = { \
- &vfsops, \
- #fsname, \
- index, \
- 0, \
- flags | VFCF_STATIC \
- }; \
- DATA_SET(vfs_set,_fs_vfsconf)
-#endif /* VFS_LKM */
-
-#endif /* KERNEL */
-
-/*
- * Flags for various system call interfaces.
- *
- * waitfor flags to vfs_sync() and getfsstat()
- */
-#define MNT_WAIT 1
-#define MNT_NOWAIT 2
-
-/*
- * Generic file handle
- */
-struct fhandle {
- fsid_t fh_fsid; /* File system id of mount point */
- struct fid fh_fid; /* File sys specific id */
-};
-typedef struct fhandle fhandle_t;
-
-#ifdef KERNEL
-#include <net/radix.h>
-#include <sys/socket.h> /* XXX for AF_MAX */
-
-/*
- * Network address lookup element
- */
-struct netcred {
- struct radix_node netc_rnodes[2];
- int netc_exflags;
- struct ucred netc_anon;
-};
-
-/*
- * Network export information
- */
-struct netexport {
- struct netcred ne_defexported; /* Default export */
- struct radix_node_head *ne_rtable[AF_MAX+1]; /* Individual exports */
-};
-#endif /* KERNEL */
-
-/*
- * Export arguments for local filesystem mount calls.
- */
-struct export_args {
- int ex_flags; /* export related flags */
- uid_t ex_root; /* mapping for root uid */
- struct ucred ex_anon; /* mapping for anonymous user */
- struct sockaddr *ex_addr; /* net address to which exported */
- int ex_addrlen; /* and the net address length */
- struct sockaddr *ex_mask; /* mask of valid bits in saddr */
- int ex_masklen; /* and the smask length */
-};
-
-/*
- * Arguments to mount UFS-based filesystems
- */
-struct ufs_args {
- char *fspec; /* block special device to mount */
- struct export_args export; /* network export information */
-};
-
-#ifdef MFS
-/*
- * Arguments to mount MFS
- */
-struct mfs_args {
- char *fspec; /* name to export for statfs */
- struct export_args export; /* if exported MFSes are supported */
- caddr_t base; /* base of file system in memory */
- u_long size; /* size of file system */
-};
-#endif /* MFS */
-
-#ifdef MSDOSFS
-/*
- * Arguments to mount MSDOS filesystems.
- */
-struct msdosfs_args {
- char *fspec; /* blocks special holding the fs to mount */
- struct export_args export; /* network export information */
- uid_t uid; /* uid that owns msdosfs files */
- gid_t gid; /* gid that owns msdosfs files */
- mode_t mask; /* mask to be applied for msdosfs perms */
-};
-#endif
-
-#ifdef CD9660
-/*
- * Arguments to mount ISO 9660 filesystems.
- */
-struct iso_args {
- char *fspec; /* block special device to mount */
- struct export_args export; /* network export info */
- int flags; /* mounting flags, see below */
- int ssector; /* starting sector */
-
-};
-#define ISOFSMNT_NORRIP 0x00000001 /* disable Rock Ridge Ext.*/
-#define ISOFSMNT_GENS 0x00000002 /* enable generation numbers */
-#define ISOFSMNT_EXTATT 0x00000004 /* enable extended attributes */
-#endif /* CD9660 */
-
-#ifdef NFS
-/*
- * Arguments to mount NFS
- */
-struct nfs_args {
- struct sockaddr *addr; /* file server address */
- int addrlen; /* length of address */
- int sotype; /* Socket type */
- int proto; /* and Protocol */
- u_char *fh; /* File handle to be mounted */
- int fhsize; /* Size, in bytes, of fh */
- int flags; /* flags */
- int wsize; /* write size in bytes */
- int rsize; /* read size in bytes */
- int readdirsize; /* readdir size in bytes */
- int timeo; /* initial timeout in .1 secs */
- int retrans; /* times to retry send */
- int maxgrouplist; /* Max. size of group list */
- int readahead; /* # of blocks to readahead */
- int leaseterm; /* Term (sec) of lease */
- int deadthresh; /* Retrans threshold */
- char *hostname; /* server's name */
-};
-
-/*
- * NFS mount option flags
- */
-#define NFSMNT_SOFT 0x00000001 /* soft mount (hard is default) */
-#define NFSMNT_WSIZE 0x00000002 /* set write size */
-#define NFSMNT_RSIZE 0x00000004 /* set read size */
-#define NFSMNT_TIMEO 0x00000008 /* set initial timeout */
-#define NFSMNT_RETRANS 0x00000010 /* set number of request retrys */
-#define NFSMNT_MAXGRPS 0x00000020 /* set maximum grouplist size */
-#define NFSMNT_INT 0x00000040 /* allow interrupts on hard mount */
-#define NFSMNT_NOCONN 0x00000080 /* Don't Connect the socket */
-#define NFSMNT_NQNFS 0x00000100 /* Use Nqnfs protocol */
-#define NFSMNT_NFSV3 0x00000200 /* Use NFS Version 3 protocol */
-#define NFSMNT_KERB 0x00000400 /* Use Kerberos authentication */
-#define NFSMNT_DUMBTIMR 0x00000800 /* Don't estimate rtt dynamically */
-#define NFSMNT_LEASETERM 0x00001000 /* set lease term (nqnfs) */
-#define NFSMNT_READAHEAD 0x00002000 /* set read ahead */
-#define NFSMNT_DEADTHRESH 0x00004000 /* set dead server retry thresh */
-#define NFSMNT_RESVPORT 0x00008000 /* Allocate a reserved port */
-#define NFSMNT_RDIRPLUS 0x00010000 /* Use Readdirplus for V3 */
-#define NFSMNT_READDIRSIZE 0x00020000 /* Set readdir size */
-#define NFSMNT_INTERNAL 0xfffc0000 /* Bits set internally */
-#define NFSMNT_HASWRITEVERF 0x00040000 /* Has write verifier for V3 */
-#define NFSMNT_GOTPATHCONF 0x00080000 /* Got the V3 pathconf info */
-#define NFSMNT_GOTFSINFO 0x00100000 /* Got the V3 fsinfo */
-#define NFSMNT_MNTD 0x00200000 /* Mnt server for mnt point */
-#define NFSMNT_DISMINPROG 0x00400000 /* Dismount in progress */
-#define NFSMNT_DISMNT 0x00800000 /* Dismounted */
-#define NFSMNT_SNDLOCK 0x01000000 /* Send socket lock */
-#define NFSMNT_WANTSND 0x02000000 /* Want above */
-#define NFSMNT_RCVLOCK 0x04000000 /* Rcv socket lock */
-#define NFSMNT_WANTRCV 0x08000000 /* Want above */
-#define NFSMNT_WAITAUTH 0x10000000 /* Wait for authentication */
-#define NFSMNT_HASAUTH 0x20000000 /* Has authenticator */
-#define NFSMNT_WANTAUTH 0x40000000 /* Wants an authenticator */
-#define NFSMNT_AUTHERR 0x80000000 /* Authentication error */
-#endif /* NFS */
-
-#ifdef KERNEL
-extern int (*mountroot) __P((void *));
-extern struct vfsops *mountrootvfsops;
-
-/*
- * exported vnode operations
- */
-int dounmount __P((struct mount *, int, struct proc *));
-struct mount *getvfs __P((fsid_t *)); /* return vfs given fsid */
-void getnewfsid __P((struct mount *, int));
-int vflush __P((struct mount *, struct vnode *, int));
-int vfs_export /* process mount export info */
- __P((struct mount *, struct netexport *, struct export_args *));
-struct netcred *vfs_export_lookup /* lookup host in fs export list */
- __P((struct mount *, struct netexport *, struct mbuf *));
-int vfs_lock __P((struct mount *)); /* lock a vfs */
-int vfs_mountedon __P((struct vnode *)); /* is a vfs mounted on vp */
-int vfs_mountroot __P((void *)); /* XXX goes away? */
-void vfs_msync __P((struct mount *, int));
-void vfs_unlock __P((struct mount *)); /* unlock a vfs */
-void vfs_unmountall __P((void));
-int vfs_busy __P((struct mount *)); /* mark a vfs busy */
-void vfs_unbusy __P((struct mount *)); /* mark a vfs not busy */
-extern CIRCLEQ_HEAD(mntlist, mount) mountlist; /* mounted filesystem list */
-extern struct vfsops *vfssw[]; /* filesystem type table */
-
-#else /* KERNEL */
-
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-int fstatfs __P((int, struct statfs *));
-int getfh __P((const char *, fhandle_t *));
-int getfsstat __P((struct statfs *, long, int));
-int getmntinfo __P((struct statfs **, int));
-int mount __P((int, const char *, int, void *));
-int statfs __P((const char *, struct statfs *));
-int unmount __P((const char *, int));
-
-/* C library stuff */
-struct vfsconf *getvfsbyname __P((const char *));
-struct vfsconf *getvfsbytype __P((int));
-struct vfsconf *getvfsent __P((void));
-void setvfsent __P((int));
-void endvfsent __P((void));
-int vfsisloadable __P((const char *));
-int vfsload __P((const char *));
-__END_DECLS
-
-#endif /* KERNEL */
-
-#endif /* !_SYS_MOUNT_H_ */
diff --git a/c/src/exec/libnetworking/sys/param.h b/c/src/exec/libnetworking/sys/param.h
deleted file mode 100644
index 21a9758520..0000000000
--- a/c/src/exec/libnetworking/sys/param.h
+++ /dev/null
@@ -1,231 +0,0 @@
-/*-
- * Copyright (c) 1982, 1986, 1989, 1993
- * The Regents of the University of California. All rights reserved.
- * (c) UNIX System Laboratories, Inc.
- * All or some portions of this file are derived from material licensed
- * to the University of California by American Telephone and Telegraph
- * Co. or Unix System Laboratories, Inc. and are reproduced herein with
- * the permission of UNIX System Laboratories, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)param.h 8.3 (Berkeley) 4/4/95
- * $Id$
- */
-
-#ifndef _SYS_PARAM_H_
-#define _SYS_PARAM_H_
-
-#include <unistd.h>
-
-#define BSD 199506 /* System version (year & month). */
-#define BSD4_3 1
-#define BSD4_4 1
-
-#ifndef NULL
-#define NULL 0
-#endif
-
-#ifndef LOCORE
-#include <sys/types.h>
-#endif
-
-/*
- * Machine-independent constants (some used in following include files).
- * Redefined constants are from POSIX 1003.1 limits file.
- *
- * MAXCOMLEN should be >= sizeof(ac_comm) (see <acct.h>)
- * MAXLOGNAME should be >= UT_NAMESIZE (see <utmp.h>)
- */
-#include <sys/syslimits.h>
-
-#define MAXCOMLEN 16 /* max command name remembered */
-#define MAXINTERP 32 /* max interpreter file name length */
-#define MAXLOGNAME 12 /* max login name length */
-#define MAXUPRC CHILD_MAX /* max simultaneous processes */
-#define NCARGS ARG_MAX /* max bytes for an exec function */
-#define NGROUPS NGROUPS_MAX /* max number groups */
-#define NOFILE OPEN_MAX /* max open files per process */
-#define NOGROUP 65535 /* marker for empty group set member */
-#define MAXHOSTNAMELEN 256 /* max hostname size */
-
-/* More types and definitions used throughout the kernel. */
-#ifdef KERNEL
-#include <sys/cdefs.h>
-#include <sys/errno.h>
-#include <sys/time.h>
-#include <sys/resource.h>
-#include <sys/ucred.h>
-#include <sys/uio.h>
-#include <sys/rtprio.h>
-
-#ifndef FALSE
-#define FALSE 0
-#endif
-#ifndef TRUE
-#define TRUE 1
-#endif
-#endif
-
-/* Signals. */
-#include <sys/signal.h>
-
-/* Machine type dependent parameters. */
-#include <machine/param.h>
-#include <machine/limits.h>
-
-/*
- * Priorities. Note that with 32 run queues, differences less than 4 are
- * insignificant.
- */
-#define PSWP 0
-#define PVM 4
-#define PINOD 8
-#define PRIBIO 16
-#define PVFS 20
-#define PZERO 22 /* No longer magic, shouldn't be here. XXX */
-#define PSOCK 24
-#define PWAIT 32
-#define PLOCK 36
-#define PPAUSE 40
-#define PUSER 50
-#define MAXPRI 127 /* Priorities range from 0 through MAXPRI. */
-
-#define PRIMASK 0x0ff
-#define PCATCH 0x100 /* OR'd with pri for tsleep to check signals */
-
-#define NZERO 0 /* default "nice" */
-
-#define NBPW sizeof(int) /* number of bytes per word (integer) */
-
-#define CMASK 022 /* default file mask: S_IWGRP|S_IWOTH */
-#define NODEV (dev_t)(-1) /* non-existent device */
-
-/*
- * Clustering of hardware pages on machines with ridiculously small
- * page sizes is done here. The paging subsystem deals with units of
- * CLSIZE pte's describing PAGE_SIZE (from machine/machparam.h) pages each.
- */
-#if 0
-#define CLBYTES (CLSIZE*PAGE_SIZE)
-#endif
-
-#define CBLOCK 128 /* Clist block size, must be a power of 2. */
-#define CBQSIZE (CBLOCK/NBBY) /* Quote bytes/cblock - can do better. */
- /* Data chars/clist. */
-#define CBSIZE (CBLOCK - sizeof(struct cblock *) - CBQSIZE)
-#define CROUND (CBLOCK - 1) /* Clist rounding. */
-
-/*
- * File system parameters and macros.
- *
- * The file system is made out of blocks of at most MAXBSIZE units, with
- * smaller units (fragments) only in the last direct block. MAXBSIZE
- * primarily determines the size of buffers in the buffer pool. It may be
- * made larger without any effect on existing file systems; however making
- * it smaller make make some file systems unmountable. Also, MAXBSIZE
- * must be less than MAXPHYS!!! DFLTBSIZE is the average amount of
- * memory allocated by vfs_bio per nbuf. BKVASIZE is the average amount
- * of kernel virtual space allocated per nbuf. BKVASIZE should be >=
- * DFLTBSIZE. If it is significantly bigger than DFLTBSIZE, then
- * kva fragmentation causes fewer performance problems.
- */
-#define MAXBSIZE 65536
-#define BKVASIZE 8192
-#define DFLTBSIZE 4096
-#define MAXFRAG 8
-
-/*
- * MAXPATHLEN defines the longest permissible path length after expanding
- * symbolic links. It is used to allocate a temporary buffer from the buffer
- * pool in which to do the name expansion, hence should be a power of two,
- * and must be less than or equal to MAXBSIZE. MAXSYMLINKS defines the
- * maximum number of symbolic links that may be expanded in a path name.
- * It should be set high enough to allow all legitimate uses, but halt
- * infinite loops reasonably quickly.
- */
-#if !defined(__rtems__)
-#define MAXPATHLEN PATH_MAX
-#endif
-#define MAXSYMLINKS 32
-
-/* Bit map related macros. */
-#define setbit(a,i) ((a)[(i)/NBBY] |= 1<<((i)%NBBY))
-#define clrbit(a,i) ((a)[(i)/NBBY] &= ~(1<<((i)%NBBY)))
-#define isset(a,i) ((a)[(i)/NBBY] & (1<<((i)%NBBY)))
-#define isclr(a,i) (((a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0)
-
-/* Macros for counting and rounding. */
-#ifndef howmany
-#define howmany(x, y) (((x)+((y)-1))/(y))
-#endif
-#define rounddown(x, y) (((x)/(y))*(y))
-#define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) /* to any y */
-#define roundup2(x, y) (((x)+((y)-1))&(~((y)-1))) /* if y is powers of two */
-#define powerof2(x) ((((x)-1)&(x))==0)
-
-/* Macros for min/max. */
-#ifndef KERNEL
-#define MIN(a,b) (((a)<(b))?(a):(b))
-#define MAX(a,b) (((a)>(b))?(a):(b))
-#endif
-
-/*
- * Constants for setting the parameters of the kernel memory allocator.
- *
- * 2 ** MINBUCKET is the smallest unit of memory that will be
- * allocated. It must be at least large enough to hold a pointer.
- *
- * Units of memory less or equal to MAXALLOCSAVE will permanently
- * allocate physical memory; requests for these size pieces of
- * memory are quite fast. Allocations greater than MAXALLOCSAVE must
- * always allocate and free physical memory; requests for these
- * size allocations should be done infrequently as they will be slow.
- *
- * Constraints: PAGE_SIZE <= MAXALLOCSAVE <= 2 ** (MINBUCKET + 14), and
- * MAXALLOCSIZE must be a power of two.
- */
-#define MINBUCKET 4 /* 4 => min allocation of 16 bytes */
-#define MAXALLOCSAVE (2 * PAGE_SIZE)
-
-/*
- * Scale factor for scaled integers used to count %cpu time and load avgs.
- *
- * The number of CPU `tick's that map to a unique `%age' can be expressed
- * by the formula (1 / (2 ^ (FSHIFT - 11))). The maximum load average that
- * can be calculated (assuming 32 bits) can be closely approximated using
- * the formula (2 ^ (2 * (16 - FSHIFT))) for (FSHIFT < 15).
- *
- * For the scheduler to maintain a 1:1 mapping of CPU `tick' to `%age',
- * FSHIFT must be at least 11; this gives us a maximum load avg of ~1024.
- */
-#define FSHIFT 11 /* bits to right of fixed binary point */
-#define FSCALE (1<<FSHIFT)
-
-#endif /* _SYS_PARAM_H_ */
diff --git a/c/src/exec/libnetworking/sys/proc.h b/c/src/exec/libnetworking/sys/proc.h
deleted file mode 100644
index 2189a33b11..0000000000
--- a/c/src/exec/libnetworking/sys/proc.h
+++ /dev/null
@@ -1,8 +0,0 @@
-/*
- * Dummy structure
- *
- * $Id$
- */
-struct proc {
- int this_should_never_be_referenced;
-};
diff --git a/c/src/exec/libnetworking/sys/protosw.h b/c/src/exec/libnetworking/sys/protosw.h
deleted file mode 100644
index a7aa52feea..0000000000
--- a/c/src/exec/libnetworking/sys/protosw.h
+++ /dev/null
@@ -1,300 +0,0 @@
-/*-
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)protosw.h 8.1 (Berkeley) 6/2/93
- * $Id$
- */
-
-#ifndef _SYS_PROTOSW_H_
-#define _SYS_PROTOSW_H_
-
-struct ifnet;
-struct mbuf;
-struct sockaddr;
-struct socket;
-struct sockproto;
-struct stat;
-
-/*
- * Protocol switch table.
- *
- * Each protocol has a handle initializing one of these structures,
- * which is used for protocol-protocol and system-protocol communication.
- *
- * A protocol is called through the pr_init entry before any other.
- * Thereafter it is called every 200ms through the pr_fasttimo entry and
- * every 500ms through the pr_slowtimo for timer based actions.
- * The system will call the pr_drain entry if it is low on space and
- * this should throw away any non-critical data.
- *
- * Protocols pass data between themselves as chains of mbufs using
- * the pr_input and pr_output hooks. Pr_input passes data up (towards
- * UNIX) and pr_output passes it down (towards the imps); control
- * information passes up and down on pr_ctlinput and pr_ctloutput.
- * The protocol is responsible for the space occupied by any the
- * arguments to these entries and must dispose it.
- *
- * The userreq routine interfaces protocols to the system and is
- * described below.
- */
-struct protosw {
- short pr_type; /* socket type used for */
- struct domain *pr_domain; /* domain protocol a member of */
- short pr_protocol; /* protocol number */
- short pr_flags; /* see below */
-/* protocol-protocol hooks */
- void (*pr_input) __P((struct mbuf *, int len));
- /* input to protocol (from below) */
- int (*pr_output) __P((struct mbuf *m, struct socket *so));
- /* output to protocol (from above) */
- void (*pr_ctlinput)__P((int, struct sockaddr *, void *));
- /* control input (from below) */
- int (*pr_ctloutput)__P((int, struct socket *, int, int,
- struct mbuf **));
- /* control output (from above) */
-/* user-protocol hook */
- int (*pr_ousrreq) __P((struct socket *, int, struct mbuf *,
- struct mbuf *, struct mbuf *));
- /* user request: see list below */
-/* utility hooks */
- void (*pr_init) __P((void)); /* initialization hook */
- void (*pr_fasttimo) __P((void));
- /* fast timeout (200ms) */
- void (*pr_slowtimo) __P((void));
- /* slow timeout (500ms) */
- void (*pr_drain) __P((void));
- /* flush any excess space possible */
- struct pr_usrreqs *pr_usrreqs; /* supersedes pr_usrreq() */
-};
-
-#define PR_SLOWHZ 2 /* 2 slow timeouts per second */
-#define PR_FASTHZ 5 /* 5 fast timeouts per second */
-
-/*
- * Values for pr_flags.
- * PR_ADDR requires PR_ATOMIC;
- * PR_ADDR and PR_CONNREQUIRED are mutually exclusive.
- * PR_IMPLOPCL means that the protocol allows sendto without prior connect,
- * and the protocol understands the MSG_EOF flag. The first property is
- * is only relevant if PR_CONNREQUIRED is set (otherwise sendto is allowed
- * anyhow).
- */
-#define PR_ATOMIC 0x01 /* exchange atomic messages only */
-#define PR_ADDR 0x02 /* addresses given with messages */
-#define PR_CONNREQUIRED 0x04 /* connection required by protocol */
-#define PR_WANTRCVD 0x08 /* want PRU_RCVD calls */
-#define PR_RIGHTS 0x10 /* passes capabilities */
-#define PR_IMPLOPCL 0x20 /* implied open/close */
-
-/*
- * The arguments to usrreq are:
- * (*protosw[].pr_usrreq)(up, req, m, nam, opt);
- * where up is a (struct socket *), req is one of these requests,
- * m is a optional mbuf chain containing a message,
- * nam is an optional mbuf chain containing an address,
- * and opt is a pointer to a socketopt structure or nil.
- * The protocol is responsible for disposal of the mbuf chain m,
- * the caller is responsible for any space held by nam and opt.
- * A non-zero return from usrreq gives an
- * UNIX error number which should be passed to higher level software.
- */
-#define PRU_ATTACH 0 /* attach protocol to up */
-#define PRU_DETACH 1 /* detach protocol from up */
-#define PRU_BIND 2 /* bind socket to address */
-#define PRU_LISTEN 3 /* listen for connection */
-#define PRU_CONNECT 4 /* establish connection to peer */
-#define PRU_ACCEPT 5 /* accept connection from peer */
-#define PRU_DISCONNECT 6 /* disconnect from peer */
-#define PRU_SHUTDOWN 7 /* won't send any more data */
-#define PRU_RCVD 8 /* have taken data; more room now */
-#define PRU_SEND 9 /* send this data */
-#define PRU_ABORT 10 /* abort (fast DISCONNECT, DETATCH) */
-#define PRU_CONTROL 11 /* control operations on protocol */
-#define PRU_SENSE 12 /* return status into m */
-#define PRU_RCVOOB 13 /* retrieve out of band data */
-#define PRU_SENDOOB 14 /* send out of band data */
-#define PRU_SOCKADDR 15 /* fetch socket's address */
-#define PRU_PEERADDR 16 /* fetch peer's address */
-#define PRU_CONNECT2 17 /* connect two sockets */
-/* begin for protocols internal use */
-#define PRU_FASTTIMO 18 /* 200ms timeout */
-#define PRU_SLOWTIMO 19 /* 500ms timeout */
-#define PRU_PROTORCV 20 /* receive from below */
-#define PRU_PROTOSEND 21 /* send to below */
-/* end for protocol's internal use */
-#define PRU_SEND_EOF 22 /* send and close */
-#define PRU_NREQ 22
-
-#ifdef PRUREQUESTS
-char *prurequests[] = {
- "ATTACH", "DETACH", "BIND", "LISTEN",
- "CONNECT", "ACCEPT", "DISCONNECT", "SHUTDOWN",
- "RCVD", "SEND", "ABORT", "CONTROL",
- "SENSE", "RCVOOB", "SENDOOB", "SOCKADDR",
- "PEERADDR", "CONNECT2", "FASTTIMO", "SLOWTIMO",
- "PROTORCV", "PROTOSEND",
- "SEND_EOF",
-};
-#endif
-
-#ifdef KERNEL /* users shouldn't see this decl */
-struct stat;
-struct ifnet;
-
-/*
- * If the ordering here looks odd, that's because it's alphabetical.
- */
-struct pr_usrreqs {
- int (*pru_abort) __P((struct socket *so));
- int (*pru_accept) __P((struct socket *so, struct mbuf *nam));
- int (*pru_attach) __P((struct socket *so, int proto));
- int (*pru_bind) __P((struct socket *so, struct mbuf *nam));
- int (*pru_connect) __P((struct socket *so, struct mbuf *nam));
- int (*pru_connect2) __P((struct socket *so1, struct socket *so2));
- int (*pru_control) __P((struct socket *so, int cmd, caddr_t data,
- struct ifnet *ifp));
- int (*pru_detach) __P((struct socket *so));
- int (*pru_disconnect) __P((struct socket *so));
- int (*pru_listen) __P((struct socket *so));
- int (*pru_peeraddr) __P((struct socket *so, struct mbuf *nam));
- int (*pru_rcvd) __P((struct socket *so, int flags));
- int (*pru_rcvoob) __P((struct socket *so, struct mbuf *m,
- int flags));
- /*
- * The `m' parameter here is almost certainly going to become a
- * `struct uio' at some point in the future. Similar changes
- * will probably happen for the receive entry points.
- */
- int (*pru_send) __P((struct socket *so, int flags, struct mbuf *m,
- struct mbuf *addr, struct mbuf *control));
-#define PRUS_OOB 0x1
-#define PRUS_EOF 0x2
- int (*pru_sense) __P((struct socket *so, struct stat *sb));
- int (*pru_shutdown) __P((struct socket *so));
- int (*pru_sockaddr) __P((struct socket *so, struct mbuf *nam));
-};
-
-int pru_accept_notsupp __P((struct socket *so, struct mbuf *nam));
-int pru_connect2_notsupp __P((struct socket *so1, struct socket *so2));
-int pru_control_notsupp __P((struct socket *so, int cmd, caddr_t data,
- struct ifnet *ifp));
-int pru_listen_notsupp __P((struct socket *so));
-int pru_rcvd_notsupp __P((struct socket *so, int flags));
-int pru_rcvoob_notsupp __P((struct socket *so, struct mbuf *m, int flags));
-int pru_sense_null __P((struct socket *so, struct stat *sb));
-
-#define PRU_OLDSTYLE
-
-#ifdef PRU_OLDSTYLE
-/*
- * Protocols which don't yet implement pr_usrreqs can point it to this
- * structure, which will call the old pr_usrreq() entry point with the
- * appropriate arguments.
- */
-extern struct pr_usrreqs pru_oldstyle;
-#endif /* PRU_OLDSTYLE */
-
-#endif /* KERNEL */
-
-/*
- * The arguments to the ctlinput routine are
- * (*protosw[].pr_ctlinput)(cmd, sa, arg);
- * where cmd is one of the commands below, sa is a pointer to a sockaddr,
- * and arg is a `void *' argument used within a protocol family.
- */
-#define PRC_IFDOWN 0 /* interface transition */
-#define PRC_ROUTEDEAD 1 /* select new route if possible ??? */
-#define PRC_QUENCH2 3 /* DEC congestion bit says slow down */
-#define PRC_QUENCH 4 /* some one said to slow down */
-#define PRC_MSGSIZE 5 /* message size forced drop */
-#define PRC_HOSTDEAD 6 /* host appears to be down */
-#define PRC_HOSTUNREACH 7 /* deprecated (use PRC_UNREACH_HOST) */
-#define PRC_UNREACH_NET 8 /* no route to network */
-#define PRC_UNREACH_HOST 9 /* no route to host */
-#define PRC_UNREACH_PROTOCOL 10 /* dst says bad protocol */
-#define PRC_UNREACH_PORT 11 /* bad port # */
-/* was PRC_UNREACH_NEEDFRAG 12 (use PRC_MSGSIZE) */
-#define PRC_UNREACH_SRCFAIL 13 /* source route failed */
-#define PRC_REDIRECT_NET 14 /* net routing redirect */
-#define PRC_REDIRECT_HOST 15 /* host routing redirect */
-#define PRC_REDIRECT_TOSNET 16 /* redirect for type of service & net */
-#define PRC_REDIRECT_TOSHOST 17 /* redirect for tos & host */
-#define PRC_TIMXCEED_INTRANS 18 /* packet lifetime expired in transit */
-#define PRC_TIMXCEED_REASS 19 /* lifetime expired on reass q */
-#define PRC_PARAMPROB 20 /* header incorrect */
-
-#define PRC_NCMDS 21
-
-#define PRC_IS_REDIRECT(cmd) \
- ((cmd) >= PRC_REDIRECT_NET && (cmd) <= PRC_REDIRECT_TOSHOST)
-
-#ifdef PRCREQUESTS
-char *prcrequests[] = {
- "IFDOWN", "ROUTEDEAD", "#2", "DEC-BIT-QUENCH2",
- "QUENCH", "MSGSIZE", "HOSTDEAD", "#7",
- "NET-UNREACH", "HOST-UNREACH", "PROTO-UNREACH", "PORT-UNREACH",
- "#12", "SRCFAIL-UNREACH", "NET-REDIRECT", "HOST-REDIRECT",
- "TOSNET-REDIRECT", "TOSHOST-REDIRECT", "TX-INTRANS", "TX-REASS",
- "PARAMPROB"
-};
-#endif
-
-/*
- * The arguments to ctloutput are:
- * (*protosw[].pr_ctloutput)(req, so, level, optname, optval);
- * req is one of the actions listed below, so is a (struct socket *),
- * level is an indication of which protocol layer the option is intended.
- * optname is a protocol dependent socket option request,
- * optval is a pointer to a mbuf-chain pointer, for value-return results.
- * The protocol is responsible for disposal of the mbuf chain *optval
- * if supplied,
- * the caller is responsible for any space held by *optval, when returned.
- * A non-zero return from usrreq gives an
- * UNIX error number which should be passed to higher level software.
- */
-#define PRCO_GETOPT 0
-#define PRCO_SETOPT 1
-
-#define PRCO_NCMDS 2
-
-#ifdef PRCOREQUESTS
-char *prcorequests[] = {
- "GETOPT", "SETOPT",
-};
-#endif
-
-#ifdef KERNEL
-struct protosw *pffindproto __P((int family, int protocol, int type));
-struct protosw *pffindtype __P((int family, int type));
-#endif
-
-#endif
diff --git a/c/src/exec/libnetworking/sys/queue.h b/c/src/exec/libnetworking/sys/queue.h
deleted file mode 100644
index e8aa08cf5d..0000000000
--- a/c/src/exec/libnetworking/sys/queue.h
+++ /dev/null
@@ -1,446 +0,0 @@
-/*
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)queue.h 8.5 (Berkeley) 8/20/94
- * $Id$
- */
-
-#ifndef _SYS_QUEUE_H_
-#define _SYS_QUEUE_H_
-
-/*
- * This file defines five types of data structures: singly-linked lists,
- * slingly-linked tail queues, lists, tail queues, and circular queues.
- *
- * A singly-linked list is headed by a single forward pointer. The elements
- * are singly linked for minimum space and pointer manipulation overhead at
- * the expense of O(n) removal for arbitrary elements. New elements can be
- * added to the list after an existing element or at the head of the list.
- * Elements being removed from the head of the list should use the explicit
- * macro for this purpose for optimum efficiency. A singly-linked list may
- * only be traversed in the forward direction. Singly-linked lists are ideal
- * for applications with large datasets and few or no removals or for
- * implementing a LIFO queue.
- *
- * A singly-linked tail queue is headed by a pair of pointers, one to the
- * head of the list and the other to the tail of the list. The elements are
- * singly linked for minimum space and pointer manipulation overhead at the
- * expense of O(n) removal for arbitrary elements. New elements can be added
- * to the list after an existing element, at the head of the list, or at the
- * end of the list. Elements being removed from the head of the tail queue
- * should use the explicit macro for this purpose for optimum efficiency.
- * A singly-linked tail queue may only be traversed in the forward direction.
- * Singly-linked tail queues are ideal for applications with large datasets
- * and few or no removals or for implementing a FIFO queue.
- *
- * A list is headed by a single forward pointer (or an array of forward
- * pointers for a hash table header). The elements are doubly linked
- * so that an arbitrary element can be removed without a need to
- * traverse the list. New elements can be added to the list before
- * or after an existing element or at the head of the list. A list
- * may only be traversed in the forward direction.
- *
- * A tail queue is headed by a pair of pointers, one to the head of the
- * list and the other to the tail of the list. The elements are doubly
- * linked so that an arbitrary element can be removed without a need to
- * traverse the list. New elements can be added to the list before or
- * after an existing element, at the head of the list, or at the end of
- * the list. A tail queue may only be traversed in the forward direction.
- *
- * A circle queue is headed by a pair of pointers, one to the head of the
- * list and the other to the tail of the list. The elements are doubly
- * linked so that an arbitrary element can be removed without a need to
- * traverse the list. New elements can be added to the list before or after
- * an existing element, at the head of the list, or at the end of the list.
- * A circle queue may be traversed in either direction, but has a more
- * complex end of list detection.
- *
- * For details on the use of these macros, see the queue(3) manual page.
- */
-
-/*
- * Singly-linked List definitions.
- */
-#define SLIST_HEAD(name, type) \
-struct name { \
- struct type *slh_first; /* first element */ \
-}
-
-#define SLIST_ENTRY(type) \
-struct { \
- struct type *sle_next; /* next element */ \
-}
-
-/*
- * Singly-linked List functions.
- */
-#define SLIST_INIT(head) { \
- (head)->slh_first = NULL; \
-}
-
-#define SLIST_INSERT_AFTER(slistelm, elm, field) { \
- (elm)->field.sle_next = (slistelm)->field.sle_next; \
- (slistelm)->field.sle_next = (elm); \
-}
-
-#define SLIST_INSERT_HEAD(head, elm, field) { \
- (elm)->field.sle_next = (head)->slh_first; \
- (head)->slh_first = (elm); \
-}
-
-#define SLIST_REMOVE_HEAD(head, field) { \
- (head)->slh_first = (head)->slh_first->field.sle_next; \
-}
-
-#define SLIST_REMOVE(head, elm, type, field) { \
- if ((head)->slh_first == (elm)) { \
- SLIST_REMOVE_HEAD((head), field); \
- } \
- else { \
- struct type *curelm = (head)->slh_first; \
- while( curelm->field.sle_next != (elm) ) \
- curelm = curelm->field.sle_next; \
- curelm->field.sle_next = \
- curelm->field.sle_next->field.sle_next; \
- } \
-}
-
-/*
- * Singly-linked Tail queue definitions.
- */
-#define STAILQ_HEAD(name, type) \
-struct name { \
- struct type *stqh_first;/* first element */ \
- struct type **stqh_last;/* addr of last next element */ \
-}
-
-#define STAILQ_ENTRY(type) \
-struct { \
- struct type *stqe_next; /* next element */ \
-}
-
-/*
- * Singly-linked Tail queue functions.
- */
-#define STAILQ_INIT(head) { \
- (head)->stqh_first = NULL; \
- (head)->stqh_last = &(head)->stqh_first; \
-}
-
-#define STAILQ_INSERT_HEAD(head, elm, field) { \
- if (((elm)->field.stqe_next = (head)->stqh_first) == NULL) \
- (head)->stqh_last = &(elm)->field.stqe_next; \
- (head)->stqh_first = (elm); \
-}
-
-#define STAILQ_INSERT_TAIL(head, elm, field) { \
- (elm)->field.stqe_next = NULL; \
- *(head)->stqh_last = (elm); \
- (head)->stqh_last = &(elm)->field.stqe_next; \
-}
-
-#define STAILQ_INSERT_AFTER(head, tqelm, elm, field) { \
- if (((elm)->field.stqe_next = (tqelm)->field.stqe_next) == NULL)\
- (head)->stqh_last = &(elm)->field.stqe_next; \
- (tqelm)->field.stqe_next = (elm); \
-}
-
-#define STAILQ_REMOVE_HEAD(head, field) { \
- if (((head)->stqh_first = \
- (head)->stqh_first->field.stqe_next) == NULL) \
- (head)->stqh_last = &(head)->stqh_first; \
-}
-
-#define STAILQ_REMOVE(head, elm, type, field) { \
- if ((head)->stqh_first == (elm)) { \
- STAILQ_REMOVE_HEAD(head, field); \
- } \
- else { \
- struct type *curelm = (head)->stqh_first; \
- while( curelm->field.stqe_next != (elm) ) \
- curelm = curelm->field.stqe_next; \
- if((curelm->field.stqe_next = \
- curelm->field.stqe_next->field.stqe_next) == NULL) \
- (head)->stqh_last = &(curelm)->field.stqe_next; \
- } \
-}
-
-/*
- * List definitions.
- */
-#define LIST_HEAD(name, type) \
-struct name { \
- struct type *lh_first; /* first element */ \
-}
-
-#define LIST_ENTRY(type) \
-struct { \
- struct type *le_next; /* next element */ \
- struct type **le_prev; /* address of previous next element */ \
-}
-
-/*
- * List functions.
- */
-#define LIST_INIT(head) { \
- (head)->lh_first = NULL; \
-}
-
-#define LIST_INSERT_AFTER(listelm, elm, field) { \
- if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \
- (listelm)->field.le_next->field.le_prev = \
- &(elm)->field.le_next; \
- (listelm)->field.le_next = (elm); \
- (elm)->field.le_prev = &(listelm)->field.le_next; \
-}
-
-#define LIST_INSERT_BEFORE(listelm, elm, field) { \
- (elm)->field.le_prev = (listelm)->field.le_prev; \
- (elm)->field.le_next = (listelm); \
- *(listelm)->field.le_prev = (elm); \
- (listelm)->field.le_prev = &(elm)->field.le_next; \
-}
-
-#define LIST_INSERT_HEAD(head, elm, field) { \
- if (((elm)->field.le_next = (head)->lh_first) != NULL) \
- (head)->lh_first->field.le_prev = &(elm)->field.le_next;\
- (head)->lh_first = (elm); \
- (elm)->field.le_prev = &(head)->lh_first; \
-}
-
-#define LIST_REMOVE(elm, field) { \
- if ((elm)->field.le_next != NULL) \
- (elm)->field.le_next->field.le_prev = \
- (elm)->field.le_prev; \
- *(elm)->field.le_prev = (elm)->field.le_next; \
-}
-
-/*
- * Tail queue definitions.
- */
-#define TAILQ_HEAD(name, type) \
-struct name { \
- struct type *tqh_first; /* first element */ \
- struct type **tqh_last; /* addr of last next element */ \
-}
-
-#define TAILQ_HEAD_INITIALIZER(head) \
- { NULL, &(head).tqh_first }
-
-#define TAILQ_ENTRY(type) \
-struct { \
- struct type *tqe_next; /* next element */ \
- struct type **tqe_prev; /* address of previous next element */ \
-}
-
-/*
- * Tail queue functions.
- */
-#define TAILQ_EMPTY(head) ((head)->tqh_first == NULL)
-
-#define TAILQ_FIRST(head) ((head)->tqh_first)
-
-#define TAILQ_LAST(head) ((head)->tqh_last)
-
-#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next)
-
-#define TAILQ_PREV(elm, field) ((elm)->field.tqe_prev)
-
-#define TAILQ_INIT(head) { \
- (head)->tqh_first = NULL; \
- (head)->tqh_last = &(head)->tqh_first; \
-}
-
-#define TAILQ_INSERT_HEAD(head, elm, field) { \
- if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \
- (head)->tqh_first->field.tqe_prev = \
- &(elm)->field.tqe_next; \
- else \
- (head)->tqh_last = &(elm)->field.tqe_next; \
- (head)->tqh_first = (elm); \
- (elm)->field.tqe_prev = &(head)->tqh_first; \
-}
-
-#define TAILQ_INSERT_TAIL(head, elm, field) { \
- (elm)->field.tqe_next = NULL; \
- (elm)->field.tqe_prev = (head)->tqh_last; \
- *(head)->tqh_last = (elm); \
- (head)->tqh_last = &(elm)->field.tqe_next; \
-}
-
-#define TAILQ_INSERT_AFTER(head, listelm, elm, field) { \
- if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\
- (elm)->field.tqe_next->field.tqe_prev = \
- &(elm)->field.tqe_next; \
- else \
- (head)->tqh_last = &(elm)->field.tqe_next; \
- (listelm)->field.tqe_next = (elm); \
- (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \
-}
-
-#define TAILQ_INSERT_BEFORE(listelm, elm, field) { \
- (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \
- (elm)->field.tqe_next = (listelm); \
- *(listelm)->field.tqe_prev = (elm); \
- (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \
-}
-
-#define TAILQ_REMOVE(head, elm, field) { \
- if (((elm)->field.tqe_next) != NULL) \
- (elm)->field.tqe_next->field.tqe_prev = \
- (elm)->field.tqe_prev; \
- else \
- (head)->tqh_last = (elm)->field.tqe_prev; \
- *(elm)->field.tqe_prev = (elm)->field.tqe_next; \
-}
-
-/*
- * Circular queue definitions.
- */
-#define CIRCLEQ_HEAD(name, type) \
-struct name { \
- struct type *cqh_first; /* first element */ \
- struct type *cqh_last; /* last element */ \
-}
-
-#define CIRCLEQ_ENTRY(type) \
-struct { \
- struct type *cqe_next; /* next element */ \
- struct type *cqe_prev; /* previous element */ \
-}
-
-/*
- * Circular queue functions.
- */
-#define CIRCLEQ_INIT(head) { \
- (head)->cqh_first = (void *)(head); \
- (head)->cqh_last = (void *)(head); \
-}
-
-#define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) { \
- (elm)->field.cqe_next = (listelm)->field.cqe_next; \
- (elm)->field.cqe_prev = (listelm); \
- if ((listelm)->field.cqe_next == (void *)(head)) \
- (head)->cqh_last = (elm); \
- else \
- (listelm)->field.cqe_next->field.cqe_prev = (elm); \
- (listelm)->field.cqe_next = (elm); \
-}
-
-#define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) { \
- (elm)->field.cqe_next = (listelm); \
- (elm)->field.cqe_prev = (listelm)->field.cqe_prev; \
- if ((listelm)->field.cqe_prev == (void *)(head)) \
- (head)->cqh_first = (elm); \
- else \
- (listelm)->field.cqe_prev->field.cqe_next = (elm); \
- (listelm)->field.cqe_prev = (elm); \
-}
-
-#define CIRCLEQ_INSERT_HEAD(head, elm, field) { \
- (elm)->field.cqe_next = (head)->cqh_first; \
- (elm)->field.cqe_prev = (void *)(head); \
- if ((head)->cqh_last == (void *)(head)) \
- (head)->cqh_last = (elm); \
- else \
- (head)->cqh_first->field.cqe_prev = (elm); \
- (head)->cqh_first = (elm); \
-}
-
-#define CIRCLEQ_INSERT_TAIL(head, elm, field) { \
- (elm)->field.cqe_next = (void *)(head); \
- (elm)->field.cqe_prev = (head)->cqh_last; \
- if ((head)->cqh_first == (void *)(head)) \
- (head)->cqh_first = (elm); \
- else \
- (head)->cqh_last->field.cqe_next = (elm); \
- (head)->cqh_last = (elm); \
-}
-
-#define CIRCLEQ_REMOVE(head, elm, field) { \
- if ((elm)->field.cqe_next == (void *)(head)) \
- (head)->cqh_last = (elm)->field.cqe_prev; \
- else \
- (elm)->field.cqe_next->field.cqe_prev = \
- (elm)->field.cqe_prev; \
- if ((elm)->field.cqe_prev == (void *)(head)) \
- (head)->cqh_first = (elm)->field.cqe_next; \
- else \
- (elm)->field.cqe_prev->field.cqe_next = \
- (elm)->field.cqe_next; \
-}
-
-#ifdef KERNEL
-
-/*
- * XXX insque() and remque() are an old way of handling certain queues.
- * They bogusly assumes that all queue heads look alike.
- */
-
-struct quehead {
- struct quehead *qh_link;
- struct quehead *qh_rlink;
-};
-
-#ifdef __GNUC__
-
-static __inline void
-insque(void *a, void *b)
-{
- struct quehead *element = a, *head = b;
-
- element->qh_link = head->qh_link;
- element->qh_rlink = head;
- head->qh_link = element;
- element->qh_link->qh_rlink = element;
-}
-
-static __inline void
-remque(void *a)
-{
- struct quehead *element = a;
-
- element->qh_link->qh_rlink = element->qh_rlink;
- element->qh_rlink->qh_link = element->qh_link;
- element->qh_rlink = 0;
-}
-
-#else /* !__GNUC__ */
-
-void insque __P((void *a, void *b));
-void remque __P((void *a));
-
-#endif /* __GNUC__ */
-
-#endif /* KERNEL */
-
-#endif /* !_SYS_QUEUE_H_ */
diff --git a/c/src/exec/libnetworking/sys/reboot.h b/c/src/exec/libnetworking/sys/reboot.h
deleted file mode 100644
index 48a7f0f782..0000000000
--- a/c/src/exec/libnetworking/sys/reboot.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1988, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)reboot.h 8.3 (Berkeley) 12/13/94
- * $Id$
- */
-
-#ifndef _SYS_REBOOT_H_
-#define _SYS_REBOOT_H_
-
-/*
- * Arguments to reboot system call. These are passed to
- * the boot program and on to init.
- */
-#define RB_AUTOBOOT 0 /* flags for system auto-booting itself */
-
-#define RB_ASKNAME 0x001 /* ask for file name to reboot from */
-#define RB_SINGLE 0x002 /* reboot to single user only */
-#define RB_NOSYNC 0x004 /* dont sync before reboot */
-#define RB_HALT 0x008 /* don't reboot, just halt */
-#define RB_INITNAME 0x010 /* name given for /etc/init (unused) */
-#define RB_DFLTROOT 0x020 /* use compiled-in rootdev */
-#define RB_KDB 0x040 /* give control to kernel debugger */
-#define RB_RDONLY 0x080 /* mount root fs read-only */
-#define RB_DUMP 0x100 /* dump kernel memory before reboot */
-#define RB_MINIROOT 0x200 /* mini-root present in memory at boot time */
-#define RB_CONFIG 0x400 /* invoke user configuration routing */
-#define RB_VERBOSE 0x800 /* print all potentially useful info */
-#define RB_SERIAL 0x1000 /* user serial port as console */
-#define RB_CDROM 0x2000 /* use cdrom as root */
-#define RB_POWEROFF 0x4000 /* if you can, turn the power off */
-#define RB_GDB 0x8000 /* use GDB remote debugger instead of DDB */
-#define RB_MUTE 0x10000 /* Come up with the console muted */
-#define RB_SELFTEST 0x20000 /* don't boot to normal operation, do selftest */
-
-#define RB_BOOTINFO 0x80000000 /* have `struct bootinfo *' arg */
-
-/*
- * Constants for converting boot-style device number to type,
- * adaptor (uba, mba, etc), unit number and partition number.
- * Type (== major device number) is in the low byte
- * for backward compatibility. Except for that of the "magic
- * number", each mask applies to the shifted value.
- * Format:
- * (4) (4) (4) (4) (8) (8)
- * --------------------------------
- * |MA | AD| CT| UN| PART | TYPE |
- * --------------------------------
- */
-#define B_ADAPTORSHIFT 24
-#define B_ADAPTORMASK 0x0f
-#define B_ADAPTOR(val) (((val) >> B_ADAPTORSHIFT) & B_ADAPTORMASK)
-#define B_CONTROLLERSHIFT 20
-#define B_CONTROLLERMASK 0xf
-#define B_CONTROLLER(val) (((val)>>B_CONTROLLERSHIFT) & B_CONTROLLERMASK)
-#define B_SLICESHIFT 20
-#define B_SLICEMASK 0xff
-#define B_SLICE(val) (((val)>>B_SLICESHIFT) & B_SLICEMASK)
-#define B_UNITSHIFT 16
-#define B_UNITMASK 0xf
-#define B_UNIT(val) (((val) >> B_UNITSHIFT) & B_UNITMASK)
-#define B_PARTITIONSHIFT 8
-#define B_PARTITIONMASK 0xff
-#define B_PARTITION(val) (((val) >> B_PARTITIONSHIFT) & B_PARTITIONMASK)
-#define B_TYPESHIFT 0
-#define B_TYPEMASK 0xff
-#define B_TYPE(val) (((val) >> B_TYPESHIFT) & B_TYPEMASK)
-
-#define B_MAGICMASK 0xf0000000
-#define B_DEVMAGIC 0xa0000000
-
-#define MAKEBOOTDEV(type, adaptor, controller, unit, partition) \
- (((type) << B_TYPESHIFT) | ((adaptor) << B_ADAPTORSHIFT) | \
- ((controller) << B_CONTROLLERSHIFT) | ((unit) << B_UNITSHIFT) | \
- ((partition) << B_PARTITIONSHIFT) | B_DEVMAGIC)
-
-#endif
diff --git a/c/src/exec/libnetworking/sys/resourcevar.h b/c/src/exec/libnetworking/sys/resourcevar.h
deleted file mode 100644
index 2b4c47e48f..0000000000
--- a/c/src/exec/libnetworking/sys/resourcevar.h
+++ /dev/null
@@ -1,5 +0,0 @@
-/*
- * $Id$
- */
-
-/* intentionally empty file */
diff --git a/c/src/exec/libnetworking/sys/rtprio.h b/c/src/exec/libnetworking/sys/rtprio.h
deleted file mode 100644
index dd9521e7c8..0000000000
--- a/c/src/exec/libnetworking/sys/rtprio.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 1994, Henrik Vestergaard Draboel
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by (name).
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#ifndef _SYS_RTPRIO_H_
-#define _SYS_RTPRIO_H_
-
-/*
- * Process realtime-priority specifications to rtprio.
- */
-
-/* priority types */
-#define RTP_PRIO_REALTIME 0
-#define RTP_PRIO_NORMAL 1
-#define RTP_PRIO_IDLE 2
-
-/* priority range */
-#define RTP_PRIO_MIN 0 /* Highest priority */
-#define RTP_PRIO_MAX 31 /* Lowest priority */
-
-/*
- * rtprio() syscall functions
- */
-#define RTP_LOOKUP 0
-#define RTP_SET 1
-
-#ifndef LOCORE
-struct rtprio {
- u_short type;
- u_short prio;
-};
-#endif
-
-#ifndef KERNEL
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-int rtprio __P((int, pid_t, struct rtprio *));
-__END_DECLS
-#endif /* !KERNEL */
-#endif /* !_SYS_RTPRIO_H_ */
diff --git a/c/src/exec/libnetworking/sys/select.h b/c/src/exec/libnetworking/sys/select.h
deleted file mode 100644
index e69971e3b6..0000000000
--- a/c/src/exec/libnetworking/sys/select.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)select.h 8.2 (Berkeley) 1/4/94
- * $Id$
- */
-
-#ifndef _SYS_SELECT_H_
-#define _SYS_SELECT_H_
-
-/*
- * Used to maintain information about processes that wish to be
- * notified when I/O becomes possible.
- */
-struct selinfo {
- pid_t si_pid; /* process to be notified */
- short si_flags; /* see below */
-};
-#define SI_COLL 0x0001 /* collision occurred */
-
-#ifdef KERNEL
-struct proc;
-
-void selrecord __P((struct proc *selector, struct selinfo *));
-void selwakeup __P((struct selinfo *));
-#endif
-
-#endif /* !_SYS_SELECT_H_ */
diff --git a/c/src/exec/libnetworking/sys/signalvar.h b/c/src/exec/libnetworking/sys/signalvar.h
deleted file mode 100644
index 8900458fdb..0000000000
--- a/c/src/exec/libnetworking/sys/signalvar.h
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)signalvar.h 8.6 (Berkeley) 2/19/95
- * $Id$
- */
-
-#ifndef _SYS_SIGNALVAR_H_ /* tmp for user.h */
-#define _SYS_SIGNALVAR_H_
-
-/*
- * Kernel signal definitions and data structures,
- * not exported to user programs.
- */
-
-/*
- * Process signal actions and state, needed only within the process
- * (not necessarily resident).
- */
-struct sigacts {
- sig_t ps_sigact[NSIG]; /* disposition of signals */
- sigset_t ps_catchmask[NSIG]; /* signals to be blocked */
- sigset_t ps_sigonstack; /* signals to take on sigstack */
- sigset_t ps_sigintr; /* signals that interrupt syscalls */
- sigset_t ps_sigreset; /* signals that reset when caught */
- sigset_t ps_signodefer; /* signals not masked while handled */
- sigset_t ps_oldmask; /* saved mask from before sigpause */
- int ps_flags; /* signal flags, below */
- struct sigaltstack ps_sigstk; /* sp & on stack state variable */
- int ps_sig; /* for core dump/debugger XXX */
- u_long ps_code; /* for core dump/debugger XXX */
- sigset_t ps_usertramp; /* SunOS compat; libc sigtramp XXX */
-};
-
-/* signal flags */
-#define SAS_OLDMASK 0x01 /* need to restore mask before pause */
-#define SAS_ALTSTACK 0x02 /* have alternate signal stack */
-
-/* additional signal action values, used only temporarily/internally */
-#define SIG_CATCH ((__sighandler_t *)2)
-#define SIG_HOLD ((__sighandler_t *)3)
-
-/*
- * get signal action for process and signal; currently only for current process
- */
-#define SIGACTION(p, sig) (p->p_sigacts->ps_sigact[(sig)])
-
-/*
- * Determine signal that should be delivered to process p, the current
- * process, 0 if none. If there is a pending stop signal with default
- * action, the process stops in issignal().
- */
-#define CURSIG(p) \
- (((p)->p_siglist == 0 || \
- (((p)->p_flag & P_TRACED) == 0 && \
- ((p)->p_siglist & ~(p)->p_sigmask) == 0)) ? \
- 0 : issignal(p))
-
-/*
- * Clear a pending signal from a process.
- */
-#define CLRSIG(p, sig) { (p)->p_siglist &= ~sigmask(sig); }
-
-/*
- * Signal properties and actions.
- * The array below categorizes the signals and their default actions
- * according to the following properties:
- */
-#define SA_KILL 0x01 /* terminates process by default */
-#define SA_CORE 0x02 /* ditto and coredumps */
-#define SA_STOP 0x04 /* suspend process */
-#define SA_TTYSTOP 0x08 /* ditto, from tty */
-#define SA_IGNORE 0x10 /* ignore by default */
-#define SA_CONT 0x20 /* continue if suspended */
-#define SA_CANTMASK 0x40 /* non-maskable, catchable */
-
-#ifdef SIGPROP
-static int sigprop[NSIG + 1] = {
- 0, /* unused */
- SA_KILL, /* SIGHUP */
- SA_KILL, /* SIGINT */
- SA_KILL|SA_CORE, /* SIGQUIT */
- SA_KILL|SA_CORE, /* SIGILL */
- SA_KILL|SA_CORE, /* SIGTRAP */
- SA_KILL|SA_CORE, /* SIGABRT */
- SA_KILL|SA_CORE, /* SIGEMT */
- SA_KILL|SA_CORE, /* SIGFPE */
- SA_KILL, /* SIGKILL */
- SA_KILL|SA_CORE, /* SIGBUS */
- SA_KILL|SA_CORE, /* SIGSEGV */
- SA_KILL|SA_CORE, /* SIGSYS */
- SA_KILL, /* SIGPIPE */
- SA_KILL, /* SIGALRM */
- SA_KILL, /* SIGTERM */
- SA_IGNORE, /* SIGURG */
- SA_STOP, /* SIGSTOP */
- SA_STOP|SA_TTYSTOP, /* SIGTSTP */
- SA_IGNORE|SA_CONT, /* SIGCONT */
- SA_IGNORE, /* SIGCHLD */
- SA_STOP|SA_TTYSTOP, /* SIGTTIN */
- SA_STOP|SA_TTYSTOP, /* SIGTTOU */
- SA_IGNORE, /* SIGIO */
- SA_KILL, /* SIGXCPU */
- SA_KILL, /* SIGXFSZ */
- SA_KILL, /* SIGVTALRM */
- SA_KILL, /* SIGPROF */
- SA_IGNORE, /* SIGWINCH */
- SA_IGNORE, /* SIGINFO */
- SA_KILL, /* SIGUSR1 */
- SA_KILL, /* SIGUSR2 */
-};
-
-#define contsigmask (sigmask(SIGCONT))
-#define stopsigmask (sigmask(SIGSTOP) | sigmask(SIGTSTP) | \
- sigmask(SIGTTIN) | sigmask(SIGTTOU))
-
-#endif /* SIGPROP */
-
-#define sigcantmask (sigmask(SIGKILL) | sigmask(SIGSTOP))
-
-#ifdef KERNEL
-/*
- * Machine-independent functions:
- */
-void execsigs __P((struct proc *p));
-void gsignal __P((int pgid, int sig));
-int issignal __P((struct proc *p));
-void killproc __P((struct proc *p, char *why));
-void pgsignal __P((struct pgrp *pgrp, int sig, int checkctty));
-void postsig __P((int sig));
-void psignal __P((struct proc *p, int sig));
-void setsigvec __P((struct proc *p, int signum, struct sigaction *sa));
-void sigexit __P((struct proc *p, int signum));
-void siginit __P((struct proc *p));
-void trapsignal __P((struct proc *p, int sig, u_long code));
-
-/*
- * Machine-dependent functions:
- */
-void sendsig __P((sig_t action, int sig, int returnmask, u_long code));
-#endif /* KERNEL */
-#endif /* !_SYS_SIGNALVAR_H_ */
diff --git a/c/src/exec/libnetworking/sys/socket.h b/c/src/exec/libnetworking/sys/socket.h
deleted file mode 100644
index 6442581db6..0000000000
--- a/c/src/exec/libnetworking/sys/socket.h
+++ /dev/null
@@ -1,371 +0,0 @@
-/*
- * Copyright (c) 1982, 1985, 1986, 1988, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)socket.h 8.4 (Berkeley) 2/21/94
- * $Id$
- */
-
-#ifndef _SYS_SOCKET_H_
-#define _SYS_SOCKET_H_
-
-#include <sys/cdefs.h>
-
-/*
- * Definitions related to sockets: types, address families, options.
- */
-
-/*
- * Types
- */
-#define SOCK_STREAM 1 /* stream socket */
-#define SOCK_DGRAM 2 /* datagram socket */
-#define SOCK_RAW 3 /* raw-protocol interface */
-#define SOCK_RDM 4 /* reliably-delivered message */
-#define SOCK_SEQPACKET 5 /* sequenced packet stream */
-
-/*
- * Option flags per-socket.
- */
-#define SO_DEBUG 0x0001 /* turn on debugging info recording */
-#define SO_ACCEPTCONN 0x0002 /* socket has had listen() */
-#define SO_REUSEADDR 0x0004 /* allow local address reuse */
-#define SO_KEEPALIVE 0x0008 /* keep connections alive */
-#define SO_DONTROUTE 0x0010 /* just use interface addresses */
-#define SO_BROADCAST 0x0020 /* permit sending of broadcast msgs */
-#define SO_USELOOPBACK 0x0040 /* bypass hardware when possible */
-#define SO_LINGER 0x0080 /* linger on close if data present */
-#define SO_OOBINLINE 0x0100 /* leave received OOB data in line */
-#define SO_REUSEPORT 0x0200 /* allow local address & port reuse */
-#define SO_TIMESTAMP 0x0400 /* timestamp received dgram traffic */
-
-/*
- * Additional options, not kept in so_options.
- */
-#define SO_SNDBUF 0x1001 /* send buffer size */
-#define SO_RCVBUF 0x1002 /* receive buffer size */
-#define SO_SNDLOWAT 0x1003 /* send low-water mark */
-#define SO_RCVLOWAT 0x1004 /* receive low-water mark */
-#define SO_SNDTIMEO 0x1005 /* send timeout */
-#define SO_RCVTIMEO 0x1006 /* receive timeout */
-#define SO_ERROR 0x1007 /* get error status and clear */
-#define SO_TYPE 0x1008 /* get socket type */
-#define SO_PRIVSTATE 0x1009 /* get/deny privileged state */
-
-/*
- * RTEMS addition: get and set wakeup functions.
- */
-#define SO_SNDWAKEUP 0x1020 /* wakeup when ready to send */
-#define SO_RCVWAKEUP 0x1021 /* wakeup when ready to receive */
-
-/*
- * Structure used for manipulating linger option.
- */
-struct linger {
- int l_onoff; /* option on/off */
- int l_linger; /* linger time */
-};
-
-/*
- * RTEMS addition: structure used to get and set wakeup function.
- */
-struct socket;
-struct sockwakeup {
- void (*sw_pfn) __P((struct socket *, caddr_t));
- caddr_t sw_arg;
-};
-
-/*
- * Level number for (get/set)sockopt() to apply to socket itself.
- */
-#define SOL_SOCKET 0xffff /* options for socket level */
-
-/*
- * Address families.
- */
-#define AF_UNSPEC 0 /* unspecified */
-#define AF_LOCAL 1 /* local to host (pipes, portals) */
-#define AF_UNIX AF_LOCAL /* backward compatibility */
-#define AF_INET 2 /* internetwork: UDP, TCP, etc. */
-#define AF_IMPLINK 3 /* arpanet imp addresses */
-#define AF_PUP 4 /* pup protocols: e.g. BSP */
-#define AF_CHAOS 5 /* mit CHAOS protocols */
-#define AF_NS 6 /* XEROX NS protocols */
-#define AF_ISO 7 /* ISO protocols */
-#define AF_OSI AF_ISO
-#define AF_ECMA 8 /* European computer manufacturers */
-#define AF_DATAKIT 9 /* datakit protocols */
-#define AF_CCITT 10 /* CCITT protocols, X.25 etc */
-#define AF_SNA 11 /* IBM SNA */
-#define AF_DECnet 12 /* DECnet */
-#define AF_DLI 13 /* DEC Direct data link interface */
-#define AF_LAT 14 /* LAT */
-#define AF_HYLINK 15 /* NSC Hyperchannel */
-#define AF_APPLETALK 16 /* Apple Talk */
-#define AF_ROUTE 17 /* Internal Routing Protocol */
-#define AF_LINK 18 /* Link layer interface */
-#define pseudo_AF_XTP 19 /* eXpress Transfer Protocol (no AF) */
-#define AF_COIP 20 /* connection-oriented IP, aka ST II */
-#define AF_CNT 21 /* Computer Network Technology */
-#define pseudo_AF_RTIP 22 /* Help Identify RTIP packets */
-#define AF_IPX 23 /* Novell Internet Protocol */
-#define AF_SIP 24 /* Simple Internet Protocol */
-#define pseudo_AF_PIP 25 /* Help Identify PIP packets */
-#define AF_ISDN 26 /* Integrated Services Digital Network*/
-#define AF_E164 AF_ISDN /* CCITT E.164 recommendation */
-#define pseudo_AF_KEY 27 /* Internal key-management function */
-#define AF_INET6 28 /* IPv6 */
-
-#define AF_MAX 29
-
-/*
- * Structure used by kernel to store most
- * addresses.
- */
-struct sockaddr {
- u_char sa_len; /* total length */
- u_char sa_family; /* address family */
- char sa_data[14]; /* actually longer; address value */
-};
-
-/*
- * Structure used by kernel to pass protocol
- * information in raw sockets.
- */
-struct sockproto {
- u_short sp_family; /* address family */
- u_short sp_protocol; /* protocol */
-};
-
-/*
- * Protocol families, same as address families for now.
- */
-#define PF_UNSPEC AF_UNSPEC
-#define PF_LOCAL AF_LOCAL
-#define PF_UNIX PF_LOCAL /* backward compatibility */
-#define PF_INET AF_INET
-#define PF_IMPLINK AF_IMPLINK
-#define PF_PUP AF_PUP
-#define PF_CHAOS AF_CHAOS
-#define PF_NS AF_NS
-#define PF_ISO AF_ISO
-#define PF_OSI AF_ISO
-#define PF_ECMA AF_ECMA
-#define PF_DATAKIT AF_DATAKIT
-#define PF_CCITT AF_CCITT
-#define PF_SNA AF_SNA
-#define PF_DECnet AF_DECnet
-#define PF_DLI AF_DLI
-#define PF_LAT AF_LAT
-#define PF_HYLINK AF_HYLINK
-#define PF_APPLETALK AF_APPLETALK
-#define PF_ROUTE AF_ROUTE
-#define PF_LINK AF_LINK
-#define PF_XTP pseudo_AF_XTP /* really just proto family, no AF */
-#define PF_COIP AF_COIP
-#define PF_CNT AF_CNT
-#define PF_SIP AF_SIP
-#define PF_IPX AF_IPX /* same format as AF_NS */
-#define PF_RTIP pseudo_AF_RTIP /* same format as AF_INET */
-#define PF_PIP pseudo_AF_PIP
-#define PF_ISDN AF_ISDN
-#define PF_KEY pseudo_AF_KEY
-#define PF_INET6 AF_INET6
-
-#define PF_MAX AF_MAX
-
-/*
- * Definitions for network related sysctl, CTL_NET.
- *
- * Second level is protocol family.
- * Third level is protocol number.
- *
- * Further levels are defined by the individual families below.
- */
-#define NET_MAXID AF_MAX
-
-#define CTL_NET_NAMES { \
- { 0, 0 }, \
- { "unix", CTLTYPE_NODE }, \
- { "inet", CTLTYPE_NODE }, \
- { "implink", CTLTYPE_NODE }, \
- { "pup", CTLTYPE_NODE }, \
- { "chaos", CTLTYPE_NODE }, \
- { "xerox_ns", CTLTYPE_NODE }, \
- { "iso", CTLTYPE_NODE }, \
- { "emca", CTLTYPE_NODE }, \
- { "datakit", CTLTYPE_NODE }, \
- { "ccitt", CTLTYPE_NODE }, \
- { "ibm_sna", CTLTYPE_NODE }, \
- { "decnet", CTLTYPE_NODE }, \
- { "dec_dli", CTLTYPE_NODE }, \
- { "lat", CTLTYPE_NODE }, \
- { "hylink", CTLTYPE_NODE }, \
- { "appletalk", CTLTYPE_NODE }, \
- { "route", CTLTYPE_NODE }, \
- { "link_layer", CTLTYPE_NODE }, \
- { "xtp", CTLTYPE_NODE }, \
- { "coip", CTLTYPE_NODE }, \
- { "cnt", CTLTYPE_NODE }, \
- { "rtip", CTLTYPE_NODE }, \
- { "ipx", CTLTYPE_NODE }, \
- { "sip", CTLTYPE_NODE }, \
- { "pip", CTLTYPE_NODE }, \
- { "isdn", CTLTYPE_NODE }, \
- { "key", CTLTYPE_NODE }, \
-}
-
-/*
- * PF_ROUTE - Routing table
- *
- * Three additional levels are defined:
- * Fourth: address family, 0 is wildcard
- * Fifth: type of info, defined below
- * Sixth: flag(s) to mask with for NET_RT_FLAGS
- */
-#define NET_RT_DUMP 1 /* dump; may limit to a.f. */
-#define NET_RT_FLAGS 2 /* by flags, e.g. RESOLVING */
-#define NET_RT_IFLIST 3 /* survey interface list */
-#define NET_RT_MAXID 4
-
-#define CTL_NET_RT_NAMES { \
- { 0, 0 }, \
- { "dump", CTLTYPE_STRUCT }, \
- { "flags", CTLTYPE_STRUCT }, \
- { "iflist", CTLTYPE_STRUCT }, \
-}
-
-/*
- * Maximum queue length specifiable by listen.
- */
-#define SOMAXCONN 128
-
-/*
- * Message header for recvmsg and sendmsg calls.
- * Used value-result for recvmsg, value only for sendmsg.
- */
-struct msghdr {
- caddr_t msg_name; /* optional address */
- u_int msg_namelen; /* size of address */
- struct iovec *msg_iov; /* scatter/gather array */
- u_int msg_iovlen; /* # elements in msg_iov */
- caddr_t msg_control; /* ancillary data, see below */
- u_int msg_controllen; /* ancillary data buffer len */
- int msg_flags; /* flags on received message */
-};
-
-#define MSG_OOB 0x1 /* process out-of-band data */
-#define MSG_PEEK 0x2 /* peek at incoming message */
-#define MSG_DONTROUTE 0x4 /* send without using routing tables */
-#define MSG_EOR 0x8 /* data completes record */
-#define MSG_TRUNC 0x10 /* data discarded before delivery */
-#define MSG_CTRUNC 0x20 /* control data lost before delivery */
-#define MSG_WAITALL 0x40 /* wait for full request or error */
-#define MSG_DONTWAIT 0x80 /* this message should be nonblocking */
-#define MSG_EOF 0x100 /* data completes connection */
-#define MSG_COMPAT 0x8000 /* used in sendit() */
-
-/*
- * Header for ancillary data objects in msg_control buffer.
- * Used for additional information with/about a datagram
- * not expressible by flags. The format is a sequence
- * of message elements headed by cmsghdr structures.
- */
-struct cmsghdr {
- u_int cmsg_len; /* data byte count, including hdr */
- int cmsg_level; /* originating protocol */
- int cmsg_type; /* protocol-specific type */
-/* followed by u_char cmsg_data[]; */
-};
-
-/* given pointer to struct cmsghdr, return pointer to data */
-#define CMSG_DATA(cmsg) ((u_char *)((cmsg) + 1))
-
-/* given pointer to struct cmsghdr, return pointer to next cmsghdr */
-#define CMSG_NXTHDR(mhdr, cmsg) \
- (((caddr_t)(cmsg) + (cmsg)->cmsg_len + sizeof(struct cmsghdr) > \
- (mhdr)->msg_control + (mhdr)->msg_controllen) ? \
- (struct cmsghdr *)NULL : \
- (struct cmsghdr *)((caddr_t)(cmsg) + ALIGN((cmsg)->cmsg_len)))
-
-#define CMSG_FIRSTHDR(mhdr) ((struct cmsghdr *)(mhdr)->msg_control)
-
-/* "Socket"-level control message types: */
-#define SCM_RIGHTS 0x01 /* access rights (array of int) */
-#define SCM_TIMESTAMP 0x02 /* timestamp (struct timeval) */
-
-/*
- * 4.3 compat sockaddr, move to compat file later
- */
-struct osockaddr {
- u_short sa_family; /* address family */
- char sa_data[14]; /* up to 14 bytes of direct address */
-};
-
-/*
- * 4.3-compat message header (move to compat file later).
- */
-struct omsghdr {
- caddr_t msg_name; /* optional address */
- int msg_namelen; /* size of address */
- struct iovec *msg_iov; /* scatter/gather array */
- int msg_iovlen; /* # elements in msg_iov */
- caddr_t msg_accrights; /* access rights sent/received */
- int msg_accrightslen;
-};
-
-#ifndef KERNEL
-
-__BEGIN_DECLS
-int accept __P((int, struct sockaddr *, int *));
-int bind __P((int, const struct sockaddr *, int));
-int connect __P((int, const struct sockaddr *, int));
-int getpeername __P((int, struct sockaddr *, int *));
-int getsockname __P((int, struct sockaddr *, int *));
-int getsockopt __P((int, int, int, void *, int *));
-int listen __P((int, int));
-ssize_t recv __P((int, void *, size_t, int));
-ssize_t recvfrom __P((int, void *, size_t, int, struct sockaddr *, int *));
-ssize_t recvmsg __P((int, struct msghdr *, int));
-ssize_t send __P((int, const void *, size_t, int));
-ssize_t sendto __P((int, const void *,
- size_t, int, const struct sockaddr *, int));
-ssize_t sendmsg __P((int, const struct msghdr *, int));
-int setsockopt __P((int, int, int, const void *, int));
-int shutdown __P((int, int));
-int socket __P((int, int, int));
-int socketpair __P((int, int, int, int *));
-__END_DECLS
-
-#else /* KERNEL */
-void pfctlinput __P((int, struct sockaddr *));
-#endif /* !KERNEL */
-#endif /* !_SYS_SOCKET_H_ */
diff --git a/c/src/exec/libnetworking/sys/socketvar.h b/c/src/exec/libnetworking/sys/socketvar.h
deleted file mode 100644
index 5690defb43..0000000000
--- a/c/src/exec/libnetworking/sys/socketvar.h
+++ /dev/null
@@ -1,281 +0,0 @@
-/*-
- * Copyright (c) 1982, 1986, 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)socketvar.h 8.3 (Berkeley) 2/19/95
- * $Id$
- */
-
-#ifndef _SYS_SOCKETVAR_H_
-#define _SYS_SOCKETVAR_H_
-
-#include <sys/queue.h> /* for TAILQ macros */
-#include <sys/select.h> /* for struct selinfo */
-
-/*
- * Kernel structure per socket.
- * Contains send and receive buffer queues,
- * handle on protocol and pointer to protocol
- * private data and error information.
- */
-struct socket {
- short so_type; /* generic type, see socket.h */
- short so_options; /* from socket call, see socket.h */
- short so_linger; /* time to linger while closing */
- short so_state; /* internal state flags SS_*, below */
- caddr_t so_pcb; /* protocol control block */
- struct protosw *so_proto; /* protocol handle */
-/*
- * Variables for connection queuing.
- * Socket where accepts occur is so_head in all subsidiary sockets.
- * If so_head is 0, socket is not related to an accept.
- * For head socket so_q0 queues partially completed connections,
- * while so_q is a queue of connections ready to be accepted.
- * If a connection is aborted and it has so_head set, then
- * it has to be pulled out of either so_q0 or so_q.
- * We allow connections to queue up based on current queue lengths
- * and limit on number of queued connections for this socket.
- */
- struct socket *so_head; /* back pointer to accept socket */
- TAILQ_HEAD(, socket) so_incomp; /* queue of partial unaccepted connections */
- TAILQ_HEAD(, socket) so_comp; /* queue of complete unaccepted connections */
- TAILQ_ENTRY(socket) so_list; /* list of unaccepted connections */
- short so_qlen; /* number of unaccepted connections */
- short so_incqlen; /* number of unaccepted incomplete
- connections */
- short so_qlimit; /* max number queued connections */
- u_long so_timeo; /* connection timeout */
- u_short so_error; /* error affecting connection */
- pid_t so_pgid; /* pgid for signals */
- u_long so_oobmark; /* chars to oob mark */
-/*
- * Variables for socket buffering.
- */
- struct sockbuf {
- u_long sb_cc; /* actual chars in buffer */
- u_long sb_hiwat; /* max actual char count */
- u_long sb_mbcnt; /* chars of mbufs used */
- u_long sb_mbmax; /* max chars of mbufs to use */
- long sb_lowat; /* low water mark */
- struct mbuf *sb_mb; /* the mbuf chain */
- struct selinfo sb_sel; /* process selecting read/write */
- short sb_flags; /* flags, see below */
- u_long sb_timeo; /* timeout for read/write */
- void (*sb_wakeup) __P((struct socket *, caddr_t));
- caddr_t sb_wakeuparg; /* arg for above */
- } so_rcv, so_snd;
-#define SB_MAX (256*1024) /* default for max chars in sockbuf */
-#define SB_LOCK 0x01 /* lock on data queue */
-#define SB_WANT 0x02 /* someone is waiting to lock */
-#define SB_WAIT 0x04 /* someone is waiting for data/space */
-#define SB_SEL 0x08 /* someone is selecting */
-#define SB_ASYNC 0x10 /* ASYNC I/O, need signals */
-#define SB_NOTIFY (SB_WAIT|SB_SEL|SB_ASYNC)
-#define SB_NOINTR 0x40 /* operations not interruptible */
-
- caddr_t so_tpcb; /* Wisc. protocol control block XXX */
- void (*so_upcall) __P((struct socket *so, caddr_t arg, int waitf));
- caddr_t so_upcallarg; /* Arg for above */
- uid_t so_uid; /* who opened the socket */
-};
-
-/*
- * Socket state bits.
- */
-#define SS_NOFDREF 0x0001 /* no file table ref any more */
-#define SS_ISCONNECTED 0x0002 /* socket connected to a peer */
-#define SS_ISCONNECTING 0x0004 /* in process of connecting to peer */
-#define SS_ISDISCONNECTING 0x0008 /* in process of disconnecting */
-#define SS_CANTSENDMORE 0x0010 /* can't send more data to peer */
-#define SS_CANTRCVMORE 0x0020 /* can't receive more data from peer */
-#define SS_RCVATMARK 0x0040 /* at mark on input */
-
-#define SS_PRIV 0x0080 /* privileged for broadcast, raw... */
-#define SS_NBIO 0x0100 /* non-blocking ops */
-#define SS_ASYNC 0x0200 /* async i/o notify */
-#define SS_ISCONFIRMING 0x0400 /* deciding to accept connection req */
-
-#define SS_INCOMP 0x0800 /* unaccepted, incomplete connection */
-#define SS_COMP 0x1000 /* unaccepted, complete connection */
-
-
-/*
- * Macros for sockets and socket buffering.
- */
-
-/*
- * How much space is there in a socket buffer (so->so_snd or so->so_rcv)?
- * This is problematical if the fields are unsigned, as the space might
- * still be negative (cc > hiwat or mbcnt > mbmax). Should detect
- * overflow and return 0. Should use "lmin" but it doesn't exist now.
- */
-#define sbspace(sb) \
- ((long) imin((int)((sb)->sb_hiwat - (sb)->sb_cc), \
- (int)((sb)->sb_mbmax - (sb)->sb_mbcnt)))
-
-/* do we have to send all at once on a socket? */
-#define sosendallatonce(so) \
- ((so)->so_proto->pr_flags & PR_ATOMIC)
-
-/* can we read something from so? */
-#define soreadable(so) \
- ((so)->so_rcv.sb_cc >= (so)->so_rcv.sb_lowat || \
- ((so)->so_state & SS_CANTRCVMORE) || \
- (so)->so_comp.tqh_first || (so)->so_error)
-
-/* can we write something to so? */
-#define sowriteable(so) \
- ((sbspace(&(so)->so_snd) >= (so)->so_snd.sb_lowat && \
- (((so)->so_state&SS_ISCONNECTED) || \
- ((so)->so_proto->pr_flags&PR_CONNREQUIRED)==0)) || \
- ((so)->so_state & SS_CANTSENDMORE) || \
- (so)->so_error)
-
-/* adjust counters in sb reflecting allocation of m */
-#define sballoc(sb, m) { \
- (sb)->sb_cc += (m)->m_len; \
- (sb)->sb_mbcnt += MSIZE; \
- if ((m)->m_flags & M_EXT) \
- (sb)->sb_mbcnt += (m)->m_ext.ext_size; \
-}
-
-/* adjust counters in sb reflecting freeing of m */
-#define sbfree(sb, m) { \
- (sb)->sb_cc -= (m)->m_len; \
- (sb)->sb_mbcnt -= MSIZE; \
- if ((m)->m_flags & M_EXT) \
- (sb)->sb_mbcnt -= (m)->m_ext.ext_size; \
-}
-
-/*
- * Set lock on sockbuf sb; sleep if lock is already held.
- * Unless SB_NOINTR is set on sockbuf, sleep is interruptible.
- * Returns error without lock if sleep is interrupted.
- */
-#define sblock(sb, wf) ((sb)->sb_flags & SB_LOCK ? \
- (((wf) == M_WAITOK) ? sb_lock(sb) : EWOULDBLOCK) : \
- ((sb)->sb_flags |= SB_LOCK), 0)
-
-/* release lock on sockbuf sb */
-#define sbunlock(sb) { \
- (sb)->sb_flags &= ~SB_LOCK; \
- if ((sb)->sb_flags & SB_WANT) { \
- (sb)->sb_flags &= ~SB_WANT; \
- wakeup((caddr_t)&(sb)->sb_flags); \
- } \
-}
-
-#define sorwakeup(so) { sowakeup((so), &(so)->so_rcv); \
- if ((so)->so_upcall) \
- (*((so)->so_upcall))((so), (so)->so_upcallarg, M_DONTWAIT); \
- }
-
-#define sowwakeup(so) sowakeup((so), &(so)->so_snd)
-
-#ifdef KERNEL
-extern u_long sb_max;
-
-/* to catch callers missing new second argument to sonewconn: */
-#define sonewconn(head, connstatus) sonewconn1((head), (connstatus))
-
-struct filedesc;
-struct mbuf;
-struct sockaddr;
-struct stat;
-
-/*
- * File operations on sockets.
- */
-int soo_ioctl __P((struct file *fp, int cmd, caddr_t data,
- struct proc *p));
-int soo_select __P((struct file *fp, int which, struct proc *p));
-int soo_stat __P((struct socket *so, struct stat *ub));
-
-/*
- * From uipc_socket and friends
- */
-int getsock __P((struct filedesc *fdp, int fdes, struct file **fpp));
-int sockargs __P((struct mbuf **mp, caddr_t buf, int buflen, int type));
-void sbappend __P((struct sockbuf *sb, struct mbuf *m));
-int sbappendaddr __P((struct sockbuf *sb, struct sockaddr *asa,
- struct mbuf *m0, struct mbuf *control));
-int sbappendcontrol __P((struct sockbuf *sb, struct mbuf *m0,
- struct mbuf *control));
-void sbappendrecord __P((struct sockbuf *sb, struct mbuf *m0));
-void sbcheck __P((struct sockbuf *sb));
-void sbcompress __P((struct sockbuf *sb, struct mbuf *m, struct mbuf *n));
-struct mbuf *
- sbcreatecontrol __P((caddr_t p, int size, int type, int level));
-void sbdrop __P((struct sockbuf *sb, int len));
-void sbdroprecord __P((struct sockbuf *sb));
-void sbflush __P((struct sockbuf *sb));
-void sbinsertoob __P((struct sockbuf *sb, struct mbuf *m0));
-void sbrelease __P((struct sockbuf *sb));
-int sbreserve __P((struct sockbuf *sb, u_long cc));
-int sbwait __P((struct sockbuf *sb));
-int sb_lock __P((struct sockbuf *sb));
-int soabort __P((struct socket *so));
-int soaccept __P((struct socket *so, struct mbuf *nam));
-int sobind __P((struct socket *so, struct mbuf *nam));
-void socantrcvmore __P((struct socket *so));
-void socantsendmore __P((struct socket *so));
-int soclose __P((struct socket *so));
-int soconnect __P((struct socket *so, struct mbuf *nam));
-int soconnect2 __P((struct socket *so1, struct socket *so2));
-int socreate __P((int dom, struct socket **aso, int type, int proto,
- struct proc *p));
-int sodisconnect __P((struct socket *so));
-void sofree __P((struct socket *so));
-int sogetopt __P((struct socket *so, int level, int optname,
- struct mbuf **mp));
-void sohasoutofband __P((struct socket *so));
-void soisconnected __P((struct socket *so));
-void soisconnecting __P((struct socket *so));
-void soisdisconnected __P((struct socket *so));
-void soisdisconnecting __P((struct socket *so));
-int solisten __P((struct socket *so, int backlog));
-struct socket *
- sodropablereq __P((struct socket *head));
-struct socket *
- sonewconn1 __P((struct socket *head, int connstatus));
-int soreceive __P((struct socket *so, struct mbuf **paddr, struct uio *uio,
- struct mbuf **mp0, struct mbuf **controlp, int *flagsp));
-int soreserve __P((struct socket *so, u_long sndcc, u_long rcvcc));
-void sorflush __P((struct socket *so));
-int sosend __P((struct socket *so, struct mbuf *addr, struct uio *uio,
- struct mbuf *top, struct mbuf *control, int flags));
-int sosetopt __P((struct socket *so, int level, int optname,
- struct mbuf *m0));
-int soshutdown __P((struct socket *so, int how));
-void sowakeup __P((struct socket *so, struct sockbuf *sb));
-#endif /* KERNEL */
-
-#endif /* !_SYS_SOCKETVAR_H_ */
diff --git a/c/src/exec/libnetworking/sys/sysctl.h b/c/src/exec/libnetworking/sys/sysctl.h
deleted file mode 100644
index b25ba43c4f..0000000000
--- a/c/src/exec/libnetworking/sys/sysctl.h
+++ /dev/null
@@ -1,379 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Mike Karels at Berkeley Software Design, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)sysctl.h 8.1 (Berkeley) 6/2/93
- * $Id$
- */
-
-#ifndef _SYS_SYSCTL_H_
-#define _SYS_SYSCTL_H_
-
-/*
- * Definitions for sysctl call. The sysctl call uses a hierarchical name
- * for objects that can be examined or modified. The name is expressed as
- * a sequence of integers. Like a file path name, the meaning of each
- * component depends on its place in the hierarchy. The top-level and kern
- * identifiers are defined here, and other identifiers are defined in the
- * respective subsystem header files.
- */
-
-#define CTL_MAXNAME 12 /* largest number of components supported */
-
-/*
- * Each subsystem defined by sysctl defines a list of variables
- * for that subsystem. Each name is either a node with further
- * levels defined below it, or it is a leaf of some particular
- * type given below. Each sysctl level defines a set of name/type
- * pairs to be used by sysctl(1) in manipulating the subsystem.
- */
-struct ctlname {
- char *ctl_name; /* subsystem name */
- int ctl_type; /* type of name */
-};
-
-#define CTLTYPE 0xf /* Mask for the type */
-#define CTLTYPE_NODE 1 /* name is a node */
-#define CTLTYPE_INT 2 /* name describes an integer */
-#define CTLTYPE_STRING 3 /* name describes a string */
-#define CTLTYPE_QUAD 4 /* name describes a 64-bit number */
-#define CTLTYPE_OPAQUE 5 /* name describes a structure */
-#define CTLTYPE_STRUCT CTLTYPE_OPAQUE /* name describes a structure */
-
-#define CTLFLAG_RD 0x80000000 /* Allow reads of variable */
-#define CTLFLAG_WR 0x40000000 /* Allow writes to the variable */
-#define CTLFLAG_RW (CTLFLAG_RD|CTLFLAG_WR)
-#define CTLFLAG_NOLOCK 0x20000000 /* XXX Don't Lock */
-#define CTLFLAG_ANYBODY 0x10000000 /* All users can set this var */
-
-/*
- * USE THIS instead of a hardwired number from the categories below
- * to get dynamically assigned sysctl entries using the linker-set
- * technology. This is the way nearly all new sysctl variables should
- * be implimented.
- * e.g. SYSCTL_INT(_parent, OID_AUTO, name, CTLFLAG_RW, &variable, 0, "");
- */
-#define OID_AUTO (-1)
-
-#ifdef KERNEL
-#define SYSCTL_HANDLER_ARGS (struct sysctl_oid *oidp, void *arg1, int arg2, \
- struct sysctl_req *req)
-
-/*
- * This describes the access space for a sysctl request. This is needed
- * so that we can use the interface from the kernel or from user-space.
- */
-struct sysctl_req {
- struct proc *p;
- int lock;
- void *oldptr;
- int oldlen;
- int oldidx;
- int (*oldfunc)(struct sysctl_req *, const void *, int);
- void *newptr;
- int newlen;
- int newidx;
- int (*newfunc)(struct sysctl_req *, void *, int);
-};
-
-/*
- * This describes one "oid" in the MIB tree. Potentially more nodes can
- * be hidden behind it, expanded by the handler.
- */
-struct sysctl_oid {
- int oid_number;
- int oid_kind;
- void *oid_arg1;
- int oid_arg2;
- const char *oid_name;
- int (*oid_handler) SYSCTL_HANDLER_ARGS;
- const char *oid_fmt;
-};
-
-#define SYSCTL_IN(r, p, l)
-#define SYSCTL_OUT(r, p, l)
-
-int sysctl_handle_int SYSCTL_HANDLER_ARGS;
-int sysctl_handle_string SYSCTL_HANDLER_ARGS;
-int sysctl_handle_opaque SYSCTL_HANDLER_ARGS;
-
-/* This is the "raw" function for a mib-oid */
-#define SYSCTL_OID(parent, nbr, name, kind, a1, a2, handler, fmt, descr)
-
-/* This makes a node from which other oids can hang */
-#define SYSCTL_NODE(parent, nbr, name, access, handler, descr)
-
-/* This is a string len can be 0 to indicate '\0' termination */
-#define SYSCTL_STRING(parent, nbr, name, access, arg, len, descr)
-
-/* This is a integer, if ptr is NULL, val is returned */
-#define SYSCTL_INT(parent, nbr, name, access, ptr, val, descr)
-
-/* This is anything, specified by a pointer and a lenth */
-#define SYSCTL_OPAQUE(parent, nbr, name, access, ptr, len, fmt, descr)
-
-/* This is a struct, specified by a pointer and type */
-#define SYSCTL_STRUCT(parent, nbr, name, access, ptr, type, descr)
-
-/* Needs a proc. Specify by pointer and arg */
-#define SYSCTL_PROC(parent, nbr, name, access, ptr, arg, handler, fmt, descr)
-#endif /* KERNEL */
-
-/*
- * Top-level identifiers
- */
-#define CTL_UNSPEC 0 /* unused */
-#define CTL_KERN 1 /* "high kernel": proc, limits */
-#define CTL_VM 2 /* virtual memory */
-#define CTL_VFS 3 /* file system, mount type is next */
-#define CTL_NET 4 /* network, see socket.h */
-#define CTL_DEBUG 5 /* debugging parameters */
-#define CTL_HW 6 /* generic cpu/io */
-#define CTL_MACHDEP 7 /* machine dependent */
-#define CTL_USER 8 /* user-level */
-#define CTL_MAXID 9 /* number of valid top-level ids */
-
-#define CTL_NAMES { \
- { 0, 0 }, \
- { "kern", CTLTYPE_NODE }, \
- { "vm", CTLTYPE_NODE }, \
- { "vfs", CTLTYPE_NODE }, \
- { "net", CTLTYPE_NODE }, \
- { "debug", CTLTYPE_NODE }, \
- { "hw", CTLTYPE_NODE }, \
- { "machdep", CTLTYPE_NODE }, \
- { "user", CTLTYPE_NODE }, \
-}
-
-/*
- * CTL_KERN identifiers
- */
-#define KERN_OSTYPE 1 /* string: system version */
-#define KERN_OSRELEASE 2 /* string: system release */
-#define KERN_OSREV 3 /* int: system revision */
-#define KERN_VERSION 4 /* string: compile time info */
-#define KERN_MAXVNODES 5 /* int: max vnodes */
-#define KERN_MAXPROC 6 /* int: max processes */
-#define KERN_MAXFILES 7 /* int: max open files */
-#define KERN_ARGMAX 8 /* int: max arguments to exec */
-#define KERN_SECURELVL 9 /* int: system security level */
-#define KERN_HOSTNAME 10 /* string: hostname */
-#define KERN_HOSTID 11 /* int: host identifier */
-#define KERN_CLOCKRATE 12 /* struct: struct clockrate */
-#define KERN_VNODE 13 /* struct: vnode structures */
-#define KERN_PROC 14 /* struct: process entries */
-#define KERN_FILE 15 /* struct: file entries */
-#define KERN_PROF 16 /* node: kernel profiling info */
-#define KERN_POSIX1 17 /* int: POSIX.1 version */
-#define KERN_NGROUPS 18 /* int: # of supplemental group ids */
-#define KERN_JOB_CONTROL 19 /* int: is job control available */
-#define KERN_SAVED_IDS 20 /* int: saved set-user/group-ID */
-#define KERN_BOOTTIME 21 /* struct: time kernel was booted */
-#define KERN_NISDOMAINNAME 22 /* string: YP domain name */
-#define KERN_UPDATEINTERVAL 23 /* int: update process sleep time */
-#define KERN_OSRELDATE 24 /* int: OS release date */
-#define KERN_NTP_PLL 25 /* node: NTP PLL control */
-#define KERN_BOOTFILE 26 /* string: name of booted kernel */
-#define KERN_MAXFILESPERPROC 27 /* int: max open files per proc */
-#define KERN_MAXPROCPERUID 28 /* int: max processes per uid */
-#define KERN_DUMPDEV 29 /* dev_t: device to dump on */
-#define KERN_SOMAXCONN 30 /* int: max connections in listen q */
-#define KERN_MAXSOCKBUF 31 /* int: max size of a socket buffer */
-#define KERN_PS_STRINGS 32 /* int: address of PS_STRINGS */
-#define KERN_USRSTACK 33 /* int: address of USRSTACK */
-#define KERN_MAXID 34 /* number of valid kern ids */
-
-#define CTL_KERN_NAMES { \
- { 0, 0 }, \
- { "ostype", CTLTYPE_STRING }, \
- { "osrelease", CTLTYPE_STRING }, \
- { "osrevision", CTLTYPE_INT }, \
- { "version", CTLTYPE_STRING }, \
- { "maxvnodes", CTLTYPE_INT }, \
- { "maxproc", CTLTYPE_INT }, \
- { "maxfiles", CTLTYPE_INT }, \
- { "argmax", CTLTYPE_INT }, \
- { "securelevel", CTLTYPE_INT }, \
- { "hostname", CTLTYPE_STRING }, \
- { "hostid", CTLTYPE_INT }, \
- { "clockrate", CTLTYPE_STRUCT }, \
- { "vnode", CTLTYPE_STRUCT }, \
- { "proc", CTLTYPE_STRUCT }, \
- { "file", CTLTYPE_STRUCT }, \
- { "profiling", CTLTYPE_NODE }, \
- { "posix1version", CTLTYPE_INT }, \
- { "ngroups", CTLTYPE_INT }, \
- { "job_control", CTLTYPE_INT }, \
- { "saved_ids", CTLTYPE_INT }, \
- { "boottime", CTLTYPE_STRUCT }, \
- { "nisdomainname", CTLTYPE_STRING }, \
- { "update", CTLTYPE_INT }, \
- { "osreldate", CTLTYPE_INT }, \
- { "ntp_pll", CTLTYPE_NODE }, \
- { "bootfile", CTLTYPE_STRING }, \
- { "maxfilesperproc", CTLTYPE_INT }, \
- { "maxprocperuid", CTLTYPE_INT }, \
- { "dumpdev", CTLTYPE_STRUCT }, /* we lie; don't print as int */ \
- { "somaxconn", CTLTYPE_INT }, \
- { "maxsockbuf", CTLTYPE_INT }, \
- { "ps_strings", CTLTYPE_INT }, \
- { "usrstack", CTLTYPE_INT }, \
-}
-
-/*
- * CTL_VFS identifiers
- */
-#define VFS_VFSCONF 0 /* get configured filesystems */
-#define VFS_MAXID 1 /* number of items */
-
-#define CTL_VFS_NAMES { \
- { "vfsconf", CTLTYPE_STRUCT }, \
-}
-
-/*
- * KERN_PROC subtypes
- */
-#define KERN_PROC_ALL 0 /* everything */
-#define KERN_PROC_PID 1 /* by process id */
-#define KERN_PROC_PGRP 2 /* by process group id */
-#define KERN_PROC_SESSION 3 /* by session of pid */
-#define KERN_PROC_TTY 4 /* by controlling tty */
-#define KERN_PROC_UID 5 /* by effective uid */
-#define KERN_PROC_RUID 6 /* by real uid */
-
-/*
- * CTL_HW identifiers
- */
-#define HW_MACHINE 1 /* string: machine class */
-#define HW_MODEL 2 /* string: specific machine model */
-#define HW_NCPU 3 /* int: number of cpus */
-#define HW_BYTEORDER 4 /* int: machine byte order */
-#define HW_PHYSMEM 5 /* int: total memory */
-#define HW_USERMEM 6 /* int: non-kernel memory */
-#define HW_PAGESIZE 7 /* int: software page size */
-#define HW_DISKNAMES 8 /* strings: disk drive names */
-#define HW_DISKSTATS 9 /* struct: diskstats[] */
-#define HW_FLOATINGPT 10 /* int: has HW floating point? */
-#define HW_MACHINE_ARCH 11 /* string: machine architecture */
-#define HW_MAXID 12 /* number of valid hw ids */
-
-#define CTL_HW_NAMES { \
- { 0, 0 }, \
- { "machine", CTLTYPE_STRING }, \
- { "model", CTLTYPE_STRING }, \
- { "ncpu", CTLTYPE_INT }, \
- { "byteorder", CTLTYPE_INT }, \
- { "physmem", CTLTYPE_INT }, \
- { "usermem", CTLTYPE_INT }, \
- { "pagesize", CTLTYPE_INT }, \
- { "disknames", CTLTYPE_STRUCT }, \
- { "diskstats", CTLTYPE_STRUCT }, \
- { "floatingpoint", CTLTYPE_INT }, \
-}
-
-/*
- * CTL_USER definitions
- */
-#define USER_CS_PATH 1 /* string: _CS_PATH */
-#define USER_BC_BASE_MAX 2 /* int: BC_BASE_MAX */
-#define USER_BC_DIM_MAX 3 /* int: BC_DIM_MAX */
-#define USER_BC_SCALE_MAX 4 /* int: BC_SCALE_MAX */
-#define USER_BC_STRING_MAX 5 /* int: BC_STRING_MAX */
-#define USER_COLL_WEIGHTS_MAX 6 /* int: COLL_WEIGHTS_MAX */
-#define USER_EXPR_NEST_MAX 7 /* int: EXPR_NEST_MAX */
-#define USER_LINE_MAX 8 /* int: LINE_MAX */
-#define USER_RE_DUP_MAX 9 /* int: RE_DUP_MAX */
-#define USER_POSIX2_VERSION 10 /* int: POSIX2_VERSION */
-#define USER_POSIX2_C_BIND 11 /* int: POSIX2_C_BIND */
-#define USER_POSIX2_C_DEV 12 /* int: POSIX2_C_DEV */
-#define USER_POSIX2_CHAR_TERM 13 /* int: POSIX2_CHAR_TERM */
-#define USER_POSIX2_FORT_DEV 14 /* int: POSIX2_FORT_DEV */
-#define USER_POSIX2_FORT_RUN 15 /* int: POSIX2_FORT_RUN */
-#define USER_POSIX2_LOCALEDEF 16 /* int: POSIX2_LOCALEDEF */
-#define USER_POSIX2_SW_DEV 17 /* int: POSIX2_SW_DEV */
-#define USER_POSIX2_UPE 18 /* int: POSIX2_UPE */
-#define USER_STREAM_MAX 19 /* int: POSIX2_STREAM_MAX */
-#define USER_TZNAME_MAX 20 /* int: POSIX2_TZNAME_MAX */
-#define USER_MAXID 21 /* number of valid user ids */
-
-#define CTL_USER_NAMES { \
- { 0, 0 }, \
- { "cs_path", CTLTYPE_STRING }, \
- { "bc_base_max", CTLTYPE_INT }, \
- { "bc_dim_max", CTLTYPE_INT }, \
- { "bc_scale_max", CTLTYPE_INT }, \
- { "bc_string_max", CTLTYPE_INT }, \
- { "coll_weights_max", CTLTYPE_INT }, \
- { "expr_nest_max", CTLTYPE_INT }, \
- { "line_max", CTLTYPE_INT }, \
- { "re_dup_max", CTLTYPE_INT }, \
- { "posix2_version", CTLTYPE_INT }, \
- { "posix2_c_bind", CTLTYPE_INT }, \
- { "posix2_c_dev", CTLTYPE_INT }, \
- { "posix2_char_term", CTLTYPE_INT }, \
- { "posix2_fort_dev", CTLTYPE_INT }, \
- { "posix2_fort_run", CTLTYPE_INT }, \
- { "posix2_localedef", CTLTYPE_INT }, \
- { "posix2_sw_dev", CTLTYPE_INT }, \
- { "posix2_upe", CTLTYPE_INT }, \
- { "stream_max", CTLTYPE_INT }, \
- { "tzname_max", CTLTYPE_INT }, \
-}
-
-#ifdef KERNEL
-
-extern char cpu_model[];
-extern char machine[];
-extern char osrelease[];
-extern char ostype[];
-
-int kernel_sysctl(struct proc *p, int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen, int *retval);
-int userland_sysctl(struct proc *p, int *name, u_int namelen, void *old, size_t *oldlenp, int inkernel, void *new, size_t newlen, int *retval);
-/*
-int sysctl_clockrate __P((char *, size_t*));
-int sysctl_file __P((char *, size_t*));
-int sysctl_doproc __P((int *, u_int, char *, size_t*));
-int sysctl_doprof __P((int *, u_int, void *, size_t *, void *, size_t));
-*/
-
-#else /* !KERNEL */
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-int sysctl __P((int *, u_int, void *, size_t *, void *, size_t));
-int sysctlbyname __P((const char *, void *, size_t *, void *, size_t));
-__END_DECLS
-#endif /* KERNEL */
-
-#endif /* !_SYS_SYSCTL_H_ */
diff --git a/c/src/exec/libnetworking/sys/syslimits.h b/c/src/exec/libnetworking/sys/syslimits.h
deleted file mode 100644
index 283a0241e3..0000000000
--- a/c/src/exec/libnetworking/sys/syslimits.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)syslimits.h 8.1 (Berkeley) 6/2/93
- * $Id$
- */
-
-#ifndef _SYS_SYSLIMITS_H_
-#define _SYS_SYSLIMITS_H_
-
-#if !defined(__rtems__)
-#define ARG_MAX 65536 /* max bytes for an exec function */
-#endif
-
-#if !defined(__rtems__)
-#ifndef CHILD_MAX
-#define CHILD_MAX 40 /* max simultaneous processes */
-#endif
-#endif
-
-#if !defined(__rtems__)
-#define LINK_MAX 32767 /* max file link count */
-#endif
-
-#define MAX_CANON 255 /* max bytes in term canon input line */
-
-#define MAX_INPUT 255 /* max bytes in terminal input */
-
-#if !defined(__rtems__)
-#define NAME_MAX 255 /* max bytes in a file name */
-#endif
-
-#define NGROUPS_MAX 16 /* max supplemental group id's */
-
-#if !defined(__rtems__)
-#ifndef OPEN_MAX
-#define OPEN_MAX 64 /* max open files per process */
-#endif
-#endif
-
-#if !defined(__rtems__)
-#define PATH_MAX 1024 /* max bytes in pathname */
-#endif
-
-#define PIPE_BUF 512 /* max bytes for atomic pipe writes */
-
-#define BC_BASE_MAX 99 /* max ibase/obase values in bc(1) */
-#define BC_DIM_MAX 2048 /* max array elements in bc(1) */
-#define BC_SCALE_MAX 99 /* max scale value in bc(1) */
-#define BC_STRING_MAX 1000 /* max const string length in bc(1) */
-#define COLL_WEIGHTS_MAX 0 /* max weights for order keyword */
-#define EXPR_NEST_MAX 32 /* max expressions nested in expr(1) */
-#define LINE_MAX 2048 /* max bytes in an input line */
-#define RE_DUP_MAX 255 /* max RE's in interval notation */
-
-#endif
diff --git a/c/src/exec/libnetworking/sys/syslog.h b/c/src/exec/libnetworking/sys/syslog.h
deleted file mode 100644
index 08a59fa7cc..0000000000
--- a/c/src/exec/libnetworking/sys/syslog.h
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)syslog.h 8.1 (Berkeley) 6/2/93
- * $Id$
- */
-
-#ifndef _SYS_SYSLOG_H_
-#define _SYS_SYSLOG_H_
-
-#define _PATH_LOG "/var/run/log"
-#define _PATH_OLDLOG "/dev/log" /* backward compatibility */
-
-/*
- * priorities/facilities are encoded into a single 32-bit quantity, where the
- * bottom 3 bits are the priority (0-7) and the top 28 bits are the facility
- * (0-big number). Both the priorities and the facilities map roughly
- * one-to-one to strings in the syslogd(8) source code. This mapping is
- * included in this file.
- *
- * priorities (these are ordered)
- */
-#define LOG_EMERG 0 /* system is unusable */
-#define LOG_ALERT 1 /* action must be taken immediately */
-#define LOG_CRIT 2 /* critical conditions */
-#define LOG_ERR 3 /* error conditions */
-#define LOG_WARNING 4 /* warning conditions */
-#define LOG_NOTICE 5 /* normal but significant condition */
-#define LOG_INFO 6 /* informational */
-#define LOG_DEBUG 7 /* debug-level messages */
-
-#define LOG_PRIMASK 0x07 /* mask to extract priority part (internal) */
- /* extract priority */
-#define LOG_PRI(p) ((p) & LOG_PRIMASK)
-#define LOG_MAKEPRI(fac, pri) ((fac) | (pri))
-
-#ifdef SYSLOG_NAMES
-#define INTERNAL_NOPRI 0x10 /* the "no priority" priority */
- /* mark "facility" */
-#define INTERNAL_MARK LOG_MAKEPRI((LOG_NFACILITIES<<3), 0)
-typedef struct _code {
- char *c_name;
- int c_val;
-} CODE;
-
-CODE prioritynames[] = {
- { "alert", LOG_ALERT, },
- { "crit", LOG_CRIT, },
- { "debug", LOG_DEBUG, },
- { "emerg", LOG_EMERG, },
- { "err", LOG_ERR, },
- { "error", LOG_ERR, }, /* DEPRECATED */
- { "info", LOG_INFO, },
- { "none", INTERNAL_NOPRI, }, /* INTERNAL */
- { "notice", LOG_NOTICE, },
- { "panic", LOG_EMERG, }, /* DEPRECATED */
- { "warn", LOG_WARNING, }, /* DEPRECATED */
- { "warning", LOG_WARNING, },
- { NULL, -1, }
-};
-#endif
-
-/* facility codes */
-#define LOG_KERN (0<<3) /* kernel messages */
-#define LOG_USER (1<<3) /* random user-level messages */
-#define LOG_MAIL (2<<3) /* mail system */
-#define LOG_DAEMON (3<<3) /* system daemons */
-#define LOG_AUTH (4<<3) /* security/authorization messages */
-#define LOG_SYSLOG (5<<3) /* messages generated internally by syslogd */
-#define LOG_LPR (6<<3) /* line printer subsystem */
-#define LOG_NEWS (7<<3) /* network news subsystem */
-#define LOG_UUCP (8<<3) /* UUCP subsystem */
-#define LOG_CRON (9<<3) /* clock daemon */
-#define LOG_AUTHPRIV (10<<3) /* security/authorization messages (private) */
- /* Facility #10 clashes in DEC UNIX, where */
- /* it's defined as LOG_MEGASAFE for AdvFS */
- /* event logging. */
-#define LOG_FTP (11<<3) /* ftp daemon */
-#define LOG_NTP (12<<3) /* NTP subsystem */
-
- /* other codes through 15 reserved for system use */
-#define LOG_LOCAL0 (16<<3) /* reserved for local use */
-#define LOG_LOCAL1 (17<<3) /* reserved for local use */
-#define LOG_LOCAL2 (18<<3) /* reserved for local use */
-#define LOG_LOCAL3 (19<<3) /* reserved for local use */
-#define LOG_LOCAL4 (20<<3) /* reserved for local use */
-#define LOG_LOCAL5 (21<<3) /* reserved for local use */
-#define LOG_LOCAL6 (22<<3) /* reserved for local use */
-#define LOG_LOCAL7 (23<<3) /* reserved for local use */
-
-#define LOG_NFACILITIES 24 /* current number of facilities */
-#define LOG_FACMASK 0x03f8 /* mask to extract facility part */
- /* facility of pri */
-#define LOG_FAC(p) (((p) & LOG_FACMASK) >> 3)
-
-#ifdef SYSLOG_NAMES
-CODE facilitynames[] = {
- { "auth", LOG_AUTH, },
- { "authpriv", LOG_AUTHPRIV, },
- { "cron", LOG_CRON, },
- { "daemon", LOG_DAEMON, },
- { "ftp", LOG_FTP, },
- { "kern", LOG_KERN, },
- { "lpr", LOG_LPR, },
- { "mail", LOG_MAIL, },
- { "mark", INTERNAL_MARK, }, /* INTERNAL */
- { "news", LOG_NEWS, },
- { "ntp", LOG_NTP, },
- { "security", LOG_AUTH, }, /* DEPRECATED */
- { "syslog", LOG_SYSLOG, },
- { "user", LOG_USER, },
- { "uucp", LOG_UUCP, },
- { "local0", LOG_LOCAL0, },
- { "local1", LOG_LOCAL1, },
- { "local2", LOG_LOCAL2, },
- { "local3", LOG_LOCAL3, },
- { "local4", LOG_LOCAL4, },
- { "local5", LOG_LOCAL5, },
- { "local6", LOG_LOCAL6, },
- { "local7", LOG_LOCAL7, },
- { NULL, -1, }
-};
-#endif
-
-#ifdef KERNEL
-#define LOG_PRINTF -1 /* pseudo-priority to indicate use of printf */
-#endif
-
-/*
- * arguments to setlogmask.
- */
-#define LOG_MASK(pri) (1 << (pri)) /* mask for one priority */
-#define LOG_UPTO(pri) ((1 << ((pri)+1)) - 1) /* all priorities through pri */
-
-/*
- * Option flags for openlog.
- *
- * LOG_ODELAY no longer does anything.
- * LOG_NDELAY is the inverse of what it used to be.
- */
-#define LOG_PID 0x01 /* log the pid with each message */
-#define LOG_CONS 0x02 /* log on the console if errors in sending */
-#define LOG_ODELAY 0x04 /* delay open until first syslog() (default) */
-#define LOG_NDELAY 0x08 /* don't delay open */
-#define LOG_NOWAIT 0x10 /* don't wait for console forks: DEPRECATED */
-#define LOG_PERROR 0x20 /* log to stderr as well */
-
-/*
-#ifdef KERNEL
-
-#else not KERNEL */
-
-#include <sys/cdefs.h>
-#include <stdarg.h>
-
-__BEGIN_DECLS
-void closelog __P((void));
-void openlog __P((const char *, int, int));
-int setlogmask __P((int));
-void syslog __P((int, const char *, ...));
-void vsyslog __P((int, const char *, va_list));
-__END_DECLS
-
-/* #endif !KERNEL */
-
-#endif
diff --git a/c/src/exec/libnetworking/sys/systm.h b/c/src/exec/libnetworking/sys/systm.h
deleted file mode 100644
index 7e14867e70..0000000000
--- a/c/src/exec/libnetworking/sys/systm.h
+++ /dev/null
@@ -1,198 +0,0 @@
-/*-
- * Copyright (c) 1982, 1988, 1991, 1993
- * The Regents of the University of California. All rights reserved.
- * (c) UNIX System Laboratories, Inc.
- * All or some portions of this file are derived from material licensed
- * to the University of California by American Telephone and Telegraph
- * Co. or Unix System Laboratories, Inc. and are reproduced herein with
- * the permission of UNIX System Laboratories, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)systm.h 8.7 (Berkeley) 3/29/95
- * $Id$
- */
-
-#ifndef _SYS_SYSTM_H_
-#define _SYS_SYSTM_H_
-
-#include <machine/cpufunc.h>
-
-extern int securelevel; /* system security level (see init(8)) */
-
-extern int cold; /* nonzero if we are doing a cold boot */
-extern const char *panicstr; /* panic message */
-extern char version[]; /* system version */
-extern char copyright[]; /* system copyright */
-
-extern int nblkdev; /* number of entries in bdevsw */
-extern int nchrdev; /* number of entries in cdevsw */
-extern struct swdevt *swdevt; /* swap-device information */
-extern int nswdev; /* number of swap devices */
-extern int nswap; /* size of swap space */
-
-extern int selwait; /* select timeout address */
-
-extern u_char curpriority; /* priority of current process */
-
-extern int physmem; /* physical memory */
-
-extern dev_t dumpdev; /* dump device */
-extern long dumplo; /* offset into dumpdev */
-
-extern dev_t rootdev; /* root device */
-extern struct vnode *rootvp; /* vnode equivalent to above */
-
-extern dev_t swapdev; /* swapping device */
-extern struct vnode *swapdev_vp;/* vnode equivalent to above */
-
-extern int boothowto; /* reboot flags, from console subsystem */
-extern int bootverbose; /* nonzero to print verbose messages */
-
-/*
- * General function declarations.
- */
-void Debugger __P((const char *msg));
-int nullop __P((void));
-int eopnotsupp __P((void));
-int einval __P((void));
-int seltrue __P((dev_t dev, int which, struct proc *p));
-int ureadc __P((int, struct uio *));
-void *hashinit __P((int count, int type, u_long *hashmask));
-void *phashinit __P((int count, int type, u_long *nentries));
-
-void panic __P((const char *, ...)) __dead2;
-void boot __P((int)) __dead2;
-void cpu_boot __P((int));
-void tablefull __P((const char *));
-int addlog __P((const char *, ...));
-int kvprintf __P((char const *, void (*)(int, void*), void *, int,
- _BSD_VA_LIST_));
-void log __P((int, const char *, ...));
-int printf __P((const char *, ...));
-int sprintf __P((char *buf, const char *, ...));
-void uprintf __P((const char *, ...));
-void ttyprintf __P((struct tty *, const char *, ...));
-
-#define bcopy(f,t,n) memcpy((t),(f),(n))
-#define bzero(p,n) memset((p),(0),(n))
-
-int copystr __P((const void *kfaddr, void *kdaddr, size_t len,
- size_t *lencopied));
-int copyinstr __P((const void *udaddr, void *kaddr, size_t len,
- size_t *lencopied));
-int copyin __P((const void *udaddr, void *kaddr, size_t len));
-int copyout __P((const void *kaddr, void *udaddr, size_t len));
-
-int fubyte __P((const void *base));
-int fuibyte __P((const void *base));
-int subyte __P((void *base, int byte));
-int suibyte __P((void *base, int byte));
-int fuword __P((const void *base));
-int suword __P((void *base, int word));
-int susword __P((void *base, int word));
-
-int hzto __P((struct timeval *tv));
-void realitexpire __P((void *));
-
-struct clockframe;
-void hardclock __P((struct clockframe *frame));
-void softclock __P((void));
-void statclock __P((struct clockframe *frame));
-
-void startprofclock __P((struct proc *));
-void stopprofclock __P((struct proc *));
-void setstatclockrate __P((int hzrate));
-
-void hardupdate __P((long));
-void hardpps __P((struct timeval *tvp, long usec));
-
-#include <sys/libkern.h>
-
-/* Initialize the world */
-extern void consinit(void);
-extern void usrinfoinit(void);
-extern void cpu_initclocks(void);
-extern void vntblinit(void);
-extern void nchinit(void);
-
-/* Finalize the world. */
-void shutdown_nice __P((void));
-
-/*
- * Kernel to clock driver interface.
- */
-void inittodr __P((time_t base));
-void resettodr __P((void));
-void startrtclock __P((void));
-
-/* Timeouts */
-typedef void (timeout_t)(void *); /* actual timeout function type */
-typedef timeout_t *timeout_func_t; /* a pointer to this type */
-
-void timeout(timeout_func_t, void *, int);
-void untimeout(timeout_func_t, void *);
-void logwakeup __P((void));
-
-/* Various other callout lists that modules might want to know about */
-/* shutdown callout list definitions */
-typedef void (*bootlist_fn)(int,void *);
-int at_shutdown(bootlist_fn function, void *arg, int);
-int rm_at_shutdown(bootlist_fn function, void *arg);
-#define SHUTDOWN_PRE_SYNC 0
-#define SHUTDOWN_POST_SYNC 1
-
-/* forking */ /* XXX not yet */
-typedef void (*forklist_fn)(struct proc *parent,struct proc *child,int flags);
-int at_fork(forklist_fn function);
-int rm_at_fork(forklist_fn function);
-
-/* exiting */
-typedef void (*exitlist_fn)(struct proc *procp);
-int at_exit(exitlist_fn function);
-int rm_at_exit(exitlist_fn function);
-
-/* Not exactly a callout LIST, but a callout entry.. */
-/* Allow an external module to define a hardware watchdog tickler */
-/* Normally a process would do this, but there are times when the */
-/* kernel needs to be able to hold off the watchdog, when the process */
-/* is not active, e.g. when dumping core. Costs us a whole 4 bytes to */
-/* make this generic. the variable is in kern_shutdown.c */
-typedef void (*watchdog_tickle_fn)(void);
-extern watchdog_tickle_fn wdog_tickler;
-
-
-/*
- * Common `proc' functions are declared here so that proc.h can be included
- * less often.
- */
-int tsleep __P((void *chan, int pri, char *wmesg, int timo));
-void wakeup __P((void *chan));
-
-#endif /* !_SYS_SYSTM_H_ */
diff --git a/c/src/exec/libnetworking/sys/ttydefaults.h b/c/src/exec/libnetworking/sys/ttydefaults.h
deleted file mode 100644
index 68f0ddbe77..0000000000
--- a/c/src/exec/libnetworking/sys/ttydefaults.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/*-
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- * (c) UNIX System Laboratories, Inc.
- * All or some portions of this file are derived from material licensed
- * to the University of California by American Telephone and Telegraph
- * Co. or Unix System Laboratories, Inc. and are reproduced herein with
- * the permission of UNIX System Laboratories, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ttydefaults.h 8.4 (Berkeley) 1/21/94
- * $Id$
- */
-
-/*
- * System wide defaults for terminal state.
- */
-#ifndef _SYS_TTYDEFAULTS_H_
-#define _SYS_TTYDEFAULTS_H_
-
-/*
- * Defaults on "first" open.
- */
-#define TTYDEF_IFLAG (BRKINT | ICRNL | IMAXBEL | IXON | IXANY)
-#define TTYDEF_OFLAG (OPOST | ONLCR)
-#define TTYDEF_LFLAG (ECHO | ICANON | ISIG | IEXTEN | ECHOE|ECHOKE|ECHOCTL)
-#define TTYDEF_CFLAG (CREAD | CS8 | HUPCL)
-#define TTYDEF_SPEED (B9600)
-
-/*
- * Control Character Defaults
- */
-#define CTRL(x) (x&037)
-#define CEOF CTRL('d')
-#define CEOL 0xff /* XXX avoid _POSIX_VDISABLE */
-#define CERASE 0177
-#define CINTR CTRL('c')
-#define CSTATUS CTRL('t')
-#define CKILL CTRL('u')
-#define CMIN 1
-#define CQUIT 034 /* FS, ^\ */
-#define CSUSP CTRL('z')
-#define CTIME 0
-#define CDSUSP CTRL('y')
-#define CSTART CTRL('q')
-#define CSTOP CTRL('s')
-#define CLNEXT CTRL('v')
-#define CDISCARD CTRL('o')
-#define CWERASE CTRL('w')
-#define CREPRINT CTRL('r')
-#define CEOT CEOF
-/* compat */
-#define CBRK CEOL
-#define CRPRNT CREPRINT
-#define CFLUSH CDISCARD
-
-/* PROTECTED INCLUSION ENDS HERE */
-#endif /* !_SYS_TTYDEFAULTS_H_ */
-
-/*
- * #define TTYDEFCHARS to include an array of default control characters.
- */
-#ifdef TTYDEFCHARS
-static cc_t ttydefchars[NCCS] = {
- CEOF, CEOL, CEOL, CERASE, CWERASE, CKILL, CREPRINT,
- _POSIX_VDISABLE, CINTR, CQUIT, CSUSP, CDSUSP, CSTART, CSTOP, CLNEXT,
- CDISCARD, CMIN, CTIME, CSTATUS, _POSIX_VDISABLE
-};
-#undef TTYDEFCHARS
-#endif
diff --git a/c/src/exec/libnetworking/sys/ucred.h b/c/src/exec/libnetworking/sys/ucred.h
deleted file mode 100644
index d3899c3b4c..0000000000
--- a/c/src/exec/libnetworking/sys/ucred.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ucred.h 8.4 (Berkeley) 1/9/95
- * $Id$
- */
-
-#ifndef _SYS_UCRED_H_
-#define _SYS_UCRED_H_
-
-/*
- * Credentials.
- */
-struct ucred {
- u_short cr_ref; /* reference count */
- uid_t cr_uid; /* effective user id */
- short cr_ngroups; /* number of groups */
- gid_t cr_groups[NGROUPS]; /* groups */
-};
-#define cr_gid cr_groups[0]
-#define NOCRED ((struct ucred *)0) /* no credential available */
-#define FSCRED ((struct ucred *)-1) /* filesystem credential */
-
-#ifdef KERNEL
-#define crhold(cr) (cr)->cr_ref++
-
-struct ucred *crcopy __P((struct ucred *cr));
-struct ucred *crdup __P((struct ucred *cr));
-void crfree __P((struct ucred *cr));
-struct ucred *crget __P((void));
-int suser __P((struct ucred *cred, u_short *acflag));
-int groupmember __P((gid_t gid, struct ucred *cred));
-#endif /* KERNEL */
-
-#endif /* !_SYS_UCRED_H_ */
diff --git a/c/src/exec/libnetworking/sys/uio.h b/c/src/exec/libnetworking/sys/uio.h
deleted file mode 100644
index 305941500d..0000000000
--- a/c/src/exec/libnetworking/sys/uio.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)uio.h 8.5 (Berkeley) 2/22/94
- * $Id$
- */
-
-#ifndef _SYS_UIO_H_
-#define _SYS_UIO_H_
-
-/*
- * XXX
- * iov_base should be a void *.
- */
-struct iovec {
- char *iov_base; /* Base address. */
- size_t iov_len; /* Length. */
-};
-
-enum uio_rw { UIO_READ, UIO_WRITE };
-
-/* Segment flag values. */
-enum uio_seg {
- UIO_USERSPACE, /* from user data space */
- UIO_SYSSPACE, /* from system space */
- UIO_USERISPACE, /* from user I space */
- UIO_NOCOPY /* don't copy, already in object */
-};
-
-#ifdef KERNEL
-struct uio {
- struct iovec *uio_iov;
- int uio_iovcnt;
- off_t uio_offset;
- int uio_resid;
- enum uio_seg uio_segflg;
- enum uio_rw uio_rw;
- struct proc *uio_procp;
-};
-
-/*
- * Limits
- */
-#define UIO_MAXIOV 1024 /* max 1K of iov's */
-#define UIO_SMALLIOV 8 /* 8 on stack, else malloc */
-#endif /* KERNEL */
-
-#ifdef KERNEL
-
-int uiomove __P((caddr_t, int, struct uio *));
-
-#else /* !KERNEL */
-
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-ssize_t readv __P((int, const struct iovec *, int));
-ssize_t writev __P((int, const struct iovec *, int));
-__END_DECLS
-
-#endif /* KERNEL */
-
-#endif /* !_SYS_UIO_H_ */
diff --git a/c/src/exec/libnetworking/syslog.h b/c/src/exec/libnetworking/syslog.h
deleted file mode 100644
index 6d223d00b7..0000000000
--- a/c/src/exec/libnetworking/syslog.h
+++ /dev/null
@@ -1,5 +0,0 @@
-/*
- * $Id$
- */
-
-#include <sys/syslog.h>
diff --git a/c/src/exec/libnetworking/vm/Makefile.am b/c/src/exec/libnetworking/vm/Makefile.am
deleted file mode 100644
index 3f307c7cfb..0000000000
--- a/c/src/exec/libnetworking/vm/Makefile.am
+++ /dev/null
@@ -1,9 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-EXTRA_DIST = vm.h vm_extern.h vm_kern.h vm_param.h
-
-include $(top_srcdir)/../../../automake/local.am
diff --git a/c/src/exec/libnetworking/vm/vm.h b/c/src/exec/libnetworking/vm/vm.h
deleted file mode 100644
index 19ea10e5eb..0000000000
--- a/c/src/exec/libnetworking/vm/vm.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)vm.h 8.2 (Berkeley) 12/13/93
- * $Id$
- */
-
-#ifndef VM_H
-#define VM_H
-
-typedef char vm_inherit_t; /* XXX: inheritance codes */
-typedef u_char vm_prot_t; /* protection codes */
-
-union vm_map_object;
-typedef union vm_map_object vm_map_object_t;
-
-struct vm_map_entry;
-typedef struct vm_map_entry *vm_map_entry_t;
-
-struct vm_map;
-typedef struct vm_map *vm_map_t;
-
-struct vm_object;
-typedef struct vm_object *vm_object_t;
-
-#ifndef KERNEL
-/*
- * This is defined in <sys/types.h> for the kernel so that non-vm kernel
- * sources (mainly Mach-derived ones such as ddb) don't have to include
- * vm stuff. Defining it there for applications might break things.
- * Define it here for "applications" that include vm headers (e.g.,
- * genassym).
- */
-typedef int boolean_t;
-
-/*
- * This is defined in <sys/types.h> for the kernel so that vnode_if.h
- * doesn't have to include <vm/vm.h>.
- */
-struct vm_page;
-typedef struct vm_page *vm_page_t;
-#endif
-
-#endif /* VM_H */
diff --git a/c/src/exec/libnetworking/vm/vm_extern.h b/c/src/exec/libnetworking/vm/vm_extern.h
deleted file mode 100644
index 720d42dc28..0000000000
--- a/c/src/exec/libnetworking/vm/vm_extern.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)vm_extern.h 8.2 (Berkeley) 1/12/94
- * $Id$
- */
-
-#ifndef _VM_EXTERN_H_
-#define _VM_EXTERN_H_
-
-struct buf;
-struct proc;
-struct vmspace;
-struct vmtotal;
-struct mount;
-struct vnode;
-
-#ifdef KERNEL
-
-#ifdef TYPEDEF_FOR_UAP
-int getpagesize __P((struct proc * p, void *, int *));
-int madvise __P((struct proc *, void *, int *));
-int mincore __P((struct proc *, void *, int *));
-int mprotect __P((struct proc *, void *, int *));
-int msync __P((struct proc *, void *, int *));
-int munmap __P((struct proc *, void *, int *));
-int obreak __P((struct proc *, void *, int *));
-int sbrk __P((struct proc *, void *, int *));
-int smmap __P((struct proc *, void *, int *));
-int sstk __P((struct proc *, void *, int *));
-int swapon __P((struct proc *, void *, int *));
-#endif
-
-void faultin __P((struct proc *p));
-int grow __P((struct proc *, u_int));
-int kernacc __P((caddr_t, int, int));
-vm_offset_t kmem_alloc __P((vm_map_t, vm_size_t));
-vm_offset_t kmem_alloc_pageable __P((vm_map_t, vm_size_t));
-vm_offset_t kmem_alloc_wait __P((vm_map_t, vm_size_t));
-void kmem_free __P((vm_map_t, vm_offset_t, vm_size_t));
-void kmem_free_wakeup __P((vm_map_t, vm_offset_t, vm_size_t));
-void kmem_init __P((vm_offset_t, vm_offset_t));
-vm_offset_t kmem_malloc __P((vm_map_t, vm_size_t, boolean_t));
-vm_map_t kmem_suballoc __P((vm_map_t, vm_offset_t *, vm_offset_t *, vm_size_t, boolean_t));
-void munmapfd __P((struct proc *, int));
-int pager_cache __P((vm_object_t, boolean_t));
-int swaponvp __P((struct proc *, struct vnode *, dev_t , u_long));
-void swapout_procs __P((void));
-int useracc __P((caddr_t, int, int));
-int vm_fault __P((vm_map_t, vm_offset_t, vm_prot_t, boolean_t));
-void vm_fault_copy_entry __P((vm_map_t, vm_map_t, vm_map_entry_t, vm_map_entry_t));
-void vm_fault_unwire __P((vm_map_t, vm_offset_t, vm_offset_t));
-int vm_fault_wire __P((vm_map_t, vm_offset_t, vm_offset_t));
-int vm_fault_user_wire __P((vm_map_t, vm_offset_t, vm_offset_t));
-int vm_fork __P((struct proc *, struct proc *));
-int vm_mmap __P((vm_map_t, vm_offset_t *, vm_size_t, vm_prot_t, vm_prot_t, int, caddr_t, vm_ooffset_t));
-vm_offset_t vm_page_alloc_contig __P((vm_offset_t, vm_offset_t, vm_offset_t, vm_offset_t));
-void vm_set_page_size __P((void));
-void vmmeter __P((void));
-struct vmspace *vmspace_alloc __P((vm_offset_t, vm_offset_t, int));
-struct vmspace *vmspace_fork __P((struct vmspace *));
-void vmspace_free __P((struct vmspace *));
-void vnode_pager_setsize __P((struct vnode *, vm_ooffset_t));
-void vnode_pager_umount __P((struct mount *));
-void vnode_pager_uncache __P((struct vnode *));
-void vslock __P((caddr_t, u_int));
-void vsunlock __P((caddr_t, u_int, int));
-void vm_object_print __P((/* db_expr_t */ int, boolean_t, /* db_expr_t */ int,
- char *));
-void vm_fault_quick __P((caddr_t v, int prot));
-
-#endif /* KERNEL */
-
-#endif /* !_VM_EXTERN_H_ */
diff --git a/c/src/exec/libnetworking/vm/vm_kern.h b/c/src/exec/libnetworking/vm/vm_kern.h
deleted file mode 100644
index b1e073dd3a..0000000000
--- a/c/src/exec/libnetworking/vm/vm_kern.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * The Mach Operating System project at Carnegie-Mellon University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * from: @(#)vm_kern.h 8.1 (Berkeley) 6/11/93
- *
- *
- * Copyright (c) 1987, 1990 Carnegie-Mellon University.
- * All rights reserved.
- *
- * Authors: Avadis Tevanian, Jr., Michael Wayne Young
- *
- * Permission to use, copy, modify and distribute this software and
- * its documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
- * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * Carnegie Mellon requests users of this software to return to
- *
- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
- * School of Computer Science
- * Carnegie Mellon University
- * Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie the
- * rights to redistribute these changes.
- *
- * $Id$
- */
-
-#ifndef _VM_VM_KERN_H_
-#define _VM_VM_KERN_H_ 1
-
-/* Kernel memory management definitions. */
-extern vm_map_t buffer_map;
-extern vm_map_t kernel_map;
-extern vm_map_t kmem_map;
-extern vm_map_t mb_map;
-extern int mb_map_full;
-extern vm_map_t io_map;
-extern vm_map_t clean_map;
-extern vm_map_t phys_map;
-extern vm_map_t exec_map;
-extern vm_map_t u_map;
-
-extern vm_offset_t kernel_vm_end;
-
-#endif /* _VM_VM_KERN_H_ */
diff --git a/c/src/exec/libnetworking/vm/vm_param.h b/c/src/exec/libnetworking/vm/vm_param.h
deleted file mode 100644
index f1cfca98ec..0000000000
--- a/c/src/exec/libnetworking/vm/vm_param.h
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * The Mach Operating System project at Carnegie-Mellon University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * from: @(#)vm_param.h 8.1 (Berkeley) 6/11/93
- *
- *
- * Copyright (c) 1987, 1990 Carnegie-Mellon University.
- * All rights reserved.
- *
- * Authors: Avadis Tevanian, Jr., Michael Wayne Young
- *
- * Permission to use, copy, modify and distribute this software and
- * its documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
- * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * Carnegie Mellon requests users of this software to return to
- *
- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
- * School of Computer Science
- * Carnegie Mellon University
- * Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie the
- * rights to redistribute these changes.
- *
- * $Id$
- */
-
-/*
- * Machine independent virtual memory parameters.
- */
-
-#ifndef _VM_PARAM_
-#define _VM_PARAM_
-
-#include <machine/vmparam.h>
-
-/*
- * The machine independent pages are refered to as PAGES. A page
- * is some number of hardware pages, depending on the target machine.
- */
-#define DEFAULT_PAGE_SIZE 4096
-
-#if 0
-
-/*
- * All references to the size of a page should be done with PAGE_SIZE
- * or PAGE_SHIFT. The fact they are variables is hidden here so that
- * we can easily make them constant if we so desire.
- */
-#ifndef PAGE_SIZE
-#define PAGE_SIZE cnt.v_page_size /* size of page */
-#endif
-#ifndef PAGE_MASK
-#define PAGE_MASK page_mask /* size of page - 1 */
-#endif
-#ifndef PAGE_SHIFT
-#define PAGE_SHIFT page_shift /* bits to shift for pages */
-#endif
-
-#endif
-
-#ifdef KERNEL
-extern vm_size_t page_mask;
-extern int page_shift;
-
-#endif
-
-/*
- * CTL_VM identifiers
- */
-#define VM_METER 1 /* struct vmmeter */
-#define VM_LOADAVG 2 /* struct loadavg */
-#define VM_V_FREE_MIN 3 /* cnt.v_free_min */
-#define VM_V_FREE_TARGET 4 /* cnt.v_free_target */
-#define VM_V_FREE_RESERVED 5 /* cnt.v_free_reserved */
-#define VM_V_INACTIVE_TARGET 6 /* cnt.v_inactive_target */
-#define VM_V_CACHE_MIN 7 /* cnt.v_cache_max */
-#define VM_V_CACHE_MAX 8 /* cnt.v_cache_min */
-#define VM_V_PAGEOUT_FREE_MIN 9 /* cnt.v_pageout_free_min */
-#define VM_PAGEOUT_ALGORITHM 10 /* pageout algorithm */
-#define VM_SWAPPING_ENABLED 11 /* swapping enabled */
-#define VM_MAXID 12 /* number of valid vm ids */
-
-#define CTL_VM_NAMES { \
- { 0, 0 }, \
- { "vmmeter", CTLTYPE_STRUCT }, \
- { "loadavg", CTLTYPE_STRUCT }, \
- { "v_free_min", CTLTYPE_INT }, \
- { "v_free_target", CTLTYPE_INT }, \
- { "v_free_reserved", CTLTYPE_INT }, \
- { "v_inactive_target", CTLTYPE_INT }, \
- { "v_cache_min", CTLTYPE_INT }, \
- { "v_cache_max", CTLTYPE_INT }, \
- { "v_pageout_free_min", CTLTYPE_INT}, \
- { "pageout_algorithm", CTLTYPE_INT}, \
- { "swapping_enabled", CTLTYPE_INT},\
-}
-
-/*
- * Return values from the VM routines.
- */
-#define KERN_SUCCESS 0
-#define KERN_INVALID_ADDRESS 1
-#define KERN_PROTECTION_FAILURE 2
-#define KERN_NO_SPACE 3
-#define KERN_INVALID_ARGUMENT 4
-#define KERN_FAILURE 5
-#define KERN_RESOURCE_SHORTAGE 6
-#define KERN_NOT_RECEIVER 7
-#define KERN_NO_ACCESS 8
-
-#ifndef ASSEMBLER
-/*
- * Convert addresses to pages and vice versa.
- * No rounding is used.
- */
-#ifdef KERNEL
-#define num_pages(x) \
- ((vm_offset_t)((((vm_offset_t)(x)) + PAGE_MASK) >> PAGE_SHIFT))
-
-extern vm_size_t mem_size; /* size of physical memory (bytes) */
-extern vm_offset_t first_addr; /* first physical page */
-extern vm_offset_t last_addr; /* last physical page */
-#endif /* KERNEL */
-#endif /* ASSEMBLER */
-#endif /* _VM_PARAM_ */
diff --git a/c/src/exec/libnetworking/wrapup/Makefile.am b/c/src/exec/libnetworking/wrapup/Makefile.am
deleted file mode 100644
index 5d2a73a05e..0000000000
--- a/c/src/exec/libnetworking/wrapup/Makefile.am
+++ /dev/null
@@ -1,35 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-if HAS_POSIX
-POSIX_PIECES = rtems_webserver
-endif
-
-NET_O_PIECES = kern lib libc net netinet nfs rtems rtems_servers pppd \
- $(POSIX_PIECES)
-OBJS = $(foreach piece, $(NET_O_PIECES), ../$(piece)/$(ARCH)/*.o)
-LIB = $(ARCH)/libnetworking.a
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../automake/lib.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-$(LIB): $(OBJS)
- $(make-library)
-
-$(PROJECT_RELEASE)/lib/libnetworking$(LIB_VARIANT).a: $(LIB)
- $(INSTALL_DATA) $< $@
-
-TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/libnetworking$(LIB_VARIANT).a
-
-all-local: $(ARCH) $(OBJS) $(LIB) $(TMPINSTALL_FILES)
-
-.PRECIOUS: $(LIB)
-
-include $(top_srcdir)/../../../automake/local.am
diff --git a/c/src/exec/librpc/Makefile.am b/c/src/exec/librpc/Makefile.am
deleted file mode 100644
index e74c9e748c..0000000000
--- a/c/src/exec/librpc/Makefile.am
+++ /dev/null
@@ -1,11 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-
-SUBDIRS = include src
-
-include $(top_srcdir)/../../../automake/subdirs.am
-include $(top_srcdir)/../../../automake/local.am
diff --git a/c/src/exec/librpc/include/Makefile.am b/c/src/exec/librpc/include/Makefile.am
deleted file mode 100644
index d5385c1f70..0000000000
--- a/c/src/exec/librpc/include/Makefile.am
+++ /dev/null
@@ -1,10 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-SUBDIRS = rpc
-
-include $(top_srcdir)/../../../automake/subdirs.am
-include $(top_srcdir)/../../../automake/local.am
diff --git a/c/src/exec/librpc/include/rpc/Makefile.am b/c/src/exec/librpc/include/rpc/Makefile.am
deleted file mode 100644
index 5ca801b3c9..0000000000
--- a/c/src/exec/librpc/include/rpc/Makefile.am
+++ /dev/null
@@ -1,26 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-H_FILES = auth.h rpc.h svc.h types.h clnt.h rpc_msg.h svc_auth.h xdr.h
-
-noinst_HEADERS = $(H_FILES)
-
-if HAS_NETWORKING
-PREINSTALL_FILES = \
-$(PROJECT_INCLUDE)/rpc \
-$(H_FILES:%=$(PROJECT_INCLUDE)/rpc/%)
-
-$(PROJECT_INCLUDE)/rpc:
- @$(mkinstalldirs) $@
-$(PROJECT_INCLUDE)/rpc/%.h: %.h
- $(INSTALL_DATA) $< $@
-endif
-
-all-am: $(PREINSTALL_FILES)
-debug-am: $(PREINSTALL_FILES)
-profile-am: $(PREINSTALL_FILES)
-
-include $(top_srcdir)/../../../automake/local.am
diff --git a/c/src/exec/librpc/include/rpc/auth.h b/c/src/exec/librpc/include/rpc/auth.h
deleted file mode 100644
index 8f14d144f6..0000000000
--- a/c/src/exec/librpc/include/rpc/auth.h
+++ /dev/null
@@ -1,167 +0,0 @@
-#ifndef RPC_AUTH_H
-#define RPC_AUTH_H
-
-/* @(#)auth.h 2.3 88/08/07 4.0 RPCSRC; from 1.17 88/02/08 SMI */
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-/*
- * auth.h, Authentication interface.
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- *
- * The data structures are completely opaque to the client. The client
- * is required to pass a AUTH * to routines that create rpc
- * "sessions".
- */
-
-
-#define MAX_AUTH_BYTES 400
-#define MAXNETNAMELEN 255 /* maximum length of network user's name */
-
-/*
- * Status returned from authentication check
- */
-enum auth_stat {
- AUTH_OK=0,
- /*
- * failed at remote end
- */
- AUTH_BADCRED=1, /* bogus credentials (seal broken) */
- AUTH_REJECTEDCRED=2, /* client should begin new session */
- AUTH_BADVERF=3, /* bogus verifier (seal broken) */
- AUTH_REJECTEDVERF=4, /* verifier expired or was replayed */
- AUTH_TOOWEAK=5, /* rejected due to security reasons */
- /*
- * failed locally
- */
- AUTH_INVALIDRESP=6, /* bogus response verifier */
- AUTH_FAILED=7 /* some unknown reason */
-};
-
-union des_block {
- struct {
- u_int32 high;
- u_int32 low;
- } key;
- char c[8];
-};
-typedef union des_block des_block;
-extern bool_t xdr_des_block();
-
-/*
- * Authentication info. Opaque to client.
- */
-struct opaque_auth {
- enum_t oa_flavor; /* flavor of auth */
- caddr_t oa_base; /* address of more auth stuff */
- u_int oa_length; /* not to exceed MAX_AUTH_BYTES */
-};
-
-
-/*
- * Auth handle, interface to client side authenticators.
- */
-typedef struct {
- struct opaque_auth ah_cred;
- struct opaque_auth ah_verf;
- union des_block ah_key;
- struct auth_ops {
- void (*ah_nextverf)();
- int (*ah_marshal)(); /* nextverf & serialize */
- int (*ah_validate)(); /* validate varifier */
- int (*ah_refresh)(); /* refresh credentials */
- void (*ah_destroy)(); /* destroy this structure */
- } *ah_ops;
- caddr_t ah_private;
-} AUTH;
-
-
-/*
- * Authentication ops.
- * The ops and the auth handle provide the interface to the authenticators.
- *
- * AUTH *auth;
- * XDR *xdrs;
- * struct opaque_auth verf;
- */
-#define AUTH_NEXTVERF(auth) \
- ((*((auth)->ah_ops->ah_nextverf))(auth))
-#define auth_nextverf(auth) \
- ((*((auth)->ah_ops->ah_nextverf))(auth))
-
-#define AUTH_MARSHALL(auth, xdrs) \
- ((*((auth)->ah_ops->ah_marshal))(auth, xdrs))
-#define auth_marshall(auth, xdrs) \
- ((*((auth)->ah_ops->ah_marshal))(auth, xdrs))
-
-#define AUTH_VALIDATE(auth, verfp) \
- ((*((auth)->ah_ops->ah_validate))((auth), verfp))
-#define auth_validate(auth, verfp) \
- ((*((auth)->ah_ops->ah_validate))((auth), verfp))
-
-#define AUTH_REFRESH(auth) \
- ((*((auth)->ah_ops->ah_refresh))(auth))
-#define auth_refresh(auth) \
- ((*((auth)->ah_ops->ah_refresh))(auth))
-
-#define AUTH_DESTROY(auth) \
- ((*((auth)->ah_ops->ah_destroy))(auth))
-#define auth_destroy(auth) \
- ((*((auth)->ah_ops->ah_destroy))(auth))
-
-
-extern struct opaque_auth _null_auth;
-
-
-/*
- * These are the various implementations of client side authenticators.
- */
-
-/*
- * Unix style authentication
- * AUTH *authunix_create(machname, uid, gid, len, aup_gids)
- * char *machname;
- * int uid;
- * int gid;
- * int len;
- * int *aup_gids;
- */
-extern AUTH *authunix_create();
-extern AUTH *authunix_create_default(); /* takes no parameters */
-extern AUTH *authnone_create(); /* takes no parameters */
-extern AUTH *authdes_create();
-
-#define AUTH_NONE 0 /* no authentication */
-#define AUTH_NULL 0 /* backward compatibility */
-#define AUTH_UNIX 1 /* unix style (uid, gids) */
-#define AUTH_SHORT 2 /* short hand unix style */
-#define AUTH_DES 3 /* des style (encrypted timestamps) */
-
-#endif /* RPC_AUTH_H */
diff --git a/c/src/exec/librpc/include/rpc/clnt.h b/c/src/exec/librpc/include/rpc/clnt.h
deleted file mode 100644
index faefdb5d50..0000000000
--- a/c/src/exec/librpc/include/rpc/clnt.h
+++ /dev/null
@@ -1,336 +0,0 @@
-#ifndef RPC_CLNT_H
-#define RPC_CLNT_H
-
-/* @(#)clnt.h 2.1 88/07/29 4.0 RPCSRC; from 1.31 88/02/08 SMI*/
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-/*
- * clnt.h - Client side remote procedure call interface.
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-
-#ifndef _CLNT_
-#define _CLNT_
-
-/*
- * Rpc calls return an enum clnt_stat. This should be looked at more,
- * since each implementation is required to live with this (implementation
- * independent) list of errors.
- */
-enum clnt_stat {
- RPC_SUCCESS=0, /* call succeeded */
- /*
- * local errors
- */
- RPC_CANTENCODEARGS=1, /* can't encode arguments */
- RPC_CANTDECODERES=2, /* can't decode results */
- RPC_CANTSEND=3, /* failure in sending call */
- RPC_CANTRECV=4, /* failure in receiving result */
- RPC_TIMEDOUT=5, /* call timed out */
- /*
- * remote errors
- */
- RPC_VERSMISMATCH=6, /* rpc versions not compatible */
- RPC_AUTHERROR=7, /* authentication error */
- RPC_PROGUNAVAIL=8, /* program not available */
- RPC_PROGVERSMISMATCH=9, /* program version mismatched */
- RPC_PROCUNAVAIL=10, /* procedure unavailable */
- RPC_CANTDECODEARGS=11, /* decode arguments error */
- RPC_SYSTEMERROR=12, /* generic "other problem" */
-
- /*
- * callrpc & clnt_create errors
- */
- RPC_UNKNOWNHOST=13, /* unknown host name */
- RPC_UNKNOWNPROTO=17, /* unkown protocol */
-
- /*
- * _ create errors
- */
- RPC_PMAPFAILURE=14, /* the pmapper failed in its call */
- RPC_PROGNOTREGISTERED=15, /* remote program is not registered */
- /*
- * unspecified error
- */
- RPC_FAILED=16
-};
-
-
-/*
- * Error info.
- */
-struct rpc_err {
- enum clnt_stat re_status;
- union {
- int RE_errno; /* realated system error */
- enum auth_stat RE_why; /* why the auth error occurred */
- struct {
- u_long low; /* lowest verion supported */
- u_long high; /* highest verion supported */
- } RE_vers;
- struct { /* maybe meaningful if RPC_FAILED */
- long s1;
- long s2;
- } RE_lb; /* life boot & debugging only */
- } ru;
-#define re_errno ru.RE_errno
-#define re_why ru.RE_why
-#define re_vers ru.RE_vers
-#define re_lb ru.RE_lb
-};
-
-
-/*
- * Client rpc handle.
- * Created by individual implementations, see e.g. rpc_udp.c.
- * Client is responsible for initializing auth, see e.g. auth_none.c.
- */
-typedef struct {
- AUTH *cl_auth; /* authenticator */
- struct clnt_ops {
- enum clnt_stat (*cl_call)(); /* call remote procedure */
- void (*cl_abort)(); /* abort a call */
- void (*cl_geterr)(); /* get specific error code */
- bool_t (*cl_freeres)(); /* frees results */
- void (*cl_destroy)();/* destroy this structure */
- bool_t (*cl_control)();/* the ioctl() of rpc */
- } *cl_ops;
- caddr_t cl_private; /* private stuff */
-} CLIENT;
-
-
-/*
- * client side rpc interface ops
- *
- * Parameter types are:
- *
- */
-
-/*
- * enum clnt_stat
- * CLNT_CALL(rh, proc, xargs, argsp, xres, resp, timeout)
- * CLIENT *rh;
- * u_long proc;
- * xdrproc_t xargs;
- * caddr_t argsp;
- * xdrproc_t xres;
- * caddr_t resp;
- * struct timeval timeout;
- */
-#define CLNT_CALL(rh, proc, xargs, argsp, xres, resp, secs) \
- ((*(rh)->cl_ops->cl_call)(rh, proc, xargs, argsp, xres, resp, secs))
-#define clnt_call(rh, proc, xargs, argsp, xres, resp, secs) \
- ((*(rh)->cl_ops->cl_call)(rh, proc, xargs, argsp, xres, resp, secs))
-
-/*
- * void
- * CLNT_ABORT(rh);
- * CLIENT *rh;
- */
-#define CLNT_ABORT(rh) ((*(rh)->cl_ops->cl_abort)(rh))
-#define clnt_abort(rh) ((*(rh)->cl_ops->cl_abort)(rh))
-
-/*
- * struct rpc_err
- * CLNT_GETERR(rh);
- * CLIENT *rh;
- */
-#define CLNT_GETERR(rh,errp) ((*(rh)->cl_ops->cl_geterr)(rh, errp))
-#define clnt_geterr(rh,errp) ((*(rh)->cl_ops->cl_geterr)(rh, errp))
-
-
-/*
- * bool_t
- * CLNT_FREERES(rh, xres, resp);
- * CLIENT *rh;
- * xdrproc_t xres;
- * caddr_t resp;
- */
-#define CLNT_FREERES(rh,xres,resp) ((*(rh)->cl_ops->cl_freeres)(rh,xres,resp))
-#define clnt_freeres(rh,xres,resp) ((*(rh)->cl_ops->cl_freeres)(rh,xres,resp))
-
-/*
- * bool_t
- * CLNT_CONTROL(cl, request, info)
- * CLIENT *cl;
- * u_int request;
- * char *info;
- */
-#define CLNT_CONTROL(cl,rq,in) ((*(cl)->cl_ops->cl_control)(cl,rq,in))
-#define clnt_control(cl,rq,in) ((*(cl)->cl_ops->cl_control)(cl,rq,in))
-
-/*
- * control operations that apply to both udp and tcp transports
- */
-#define CLSET_TIMEOUT 1 /* set timeout (timeval) */
-#define CLGET_TIMEOUT 2 /* get timeout (timeval) */
-#define CLGET_SERVER_ADDR 3 /* get server's address (sockaddr) */
-/*
- * udp only control operations
- */
-#define CLSET_RETRY_TIMEOUT 4 /* set retry timeout (timeval) */
-#define CLGET_RETRY_TIMEOUT 5 /* get retry timeout (timeval) */
-
-/*
- * void
- * CLNT_DESTROY(rh);
- * CLIENT *rh;
- */
-#define CLNT_DESTROY(rh) ((*(rh)->cl_ops->cl_destroy)(rh))
-#define clnt_destroy(rh) ((*(rh)->cl_ops->cl_destroy)(rh))
-
-
-/*
- * RPCTEST is a test program which is accessable on every rpc
- * transport/port. It is used for testing, performance evaluation,
- * and network administration.
- */
-
-#define RPCTEST_PROGRAM ((u_long)1)
-#define RPCTEST_VERSION ((u_long)1)
-#define RPCTEST_NULL_PROC ((u_long)2)
-#define RPCTEST_NULL_BATCH_PROC ((u_long)3)
-
-/*
- * By convention, procedure 0 takes null arguments and returns them
- */
-
-#define NULLPROC ((u_long)0)
-
-/*
- * Below are the client handle creation routines for the various
- * implementations of client side rpc. They can return NULL if a
- * creation failure occurs.
- */
-
-/*
- * Memory based rpc (for speed check and testing)
- * CLIENT *
- * clntraw_create(prog, vers)
- * u_long prog;
- * u_long vers;
- */
-extern CLIENT *clntraw_create();
-
-
-/*
- * Generic client creation routine. Supported protocols are "udp" and "tcp"
- */
-extern CLIENT *
-clnt_create(/*host, prog, vers, prot*/); /*
- char *host; -- hostname
- u_long prog; -- program number
- u_long vers; -- version number
- char *prot; -- protocol
-*/
-
-
-
-
-/*
- * TCP based rpc
- * CLIENT *
- * clnttcp_create(raddr, prog, vers, sockp, sendsz, recvsz)
- * struct sockaddr_in *raddr;
- * u_long prog;
- * u_long version;
- * register int *sockp;
- * u_int sendsz;
- * u_int recvsz;
- */
-extern CLIENT *clnttcp_create();
-
-/*
- * UDP based rpc.
- * CLIENT *
- * clntudp_create(raddr, program, version, wait, sockp)
- * struct sockaddr_in *raddr;
- * u_long program;
- * u_long version;
- * struct timeval wait;
- * int *sockp;
- *
- * Same as above, but you specify max packet sizes.
- * CLIENT *
- * clntudp_bufcreate(raddr, program, version, wait, sockp, sendsz, recvsz)
- * struct sockaddr_in *raddr;
- * u_long program;
- * u_long version;
- * struct timeval wait;
- * int *sockp;
- * u_int sendsz;
- * u_int recvsz;
- */
-extern CLIENT *clntudp_create();
-extern CLIENT *clntudp_bufcreate();
-
-/*
- * Print why creation failed
- */
-void clnt_pcreateerror(/* char *msg */); /* stderr */
-char *clnt_spcreateerror(/* char *msg */); /* string */
-
-/*
- * Like clnt_perror(), but is more verbose in its output
- */
-void clnt_perrno(/* enum clnt_stat num */); /* stderr */
-
-/*
- * Print an English error message, given the client error code
- */
-void clnt_perror(/* CLIENT *clnt, char *msg */); /* stderr */
-char *clnt_sperror(/* CLIENT *clnt, char *msg */); /* string */
-
-/*
- * If a creation fails, the following allows the user to figure out why.
- */
-struct rpc_createerr {
- enum clnt_stat cf_stat;
- struct rpc_err cf_error; /* useful when cf_stat == RPC_PMAPFAILURE */
-};
-
-extern struct rpc_createerr rpc_createerr;
-
-
-
-/*
- * Copy error message to buffer.
- */
-char *clnt_sperrno(/* enum clnt_stat num */); /* string */
-
-
-
-#define UDPMSGSIZE 8800 /* rpc imposed limit on udp msg size */
-#define RPCSMALLMSGSIZE 400 /* a more reasonable packet size */
-
-#endif /*!_CLNT_*/
-
-#endif /* RPC_CLNT_H */
diff --git a/c/src/exec/librpc/include/rpc/rpc.h b/c/src/exec/librpc/include/rpc/rpc.h
deleted file mode 100644
index 0a0affd82a..0000000000
--- a/c/src/exec/librpc/include/rpc/rpc.h
+++ /dev/null
@@ -1,86 +0,0 @@
-#ifndef RPC_H
-#define RPC_H
-
-/* @(#)rpc.h 2.4 89/07/11 4.0 RPCSRC; from 1.9 88/02/08 SMI */
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-/*
- * rpc.h, Just includes the billions of rpc header files necessary to
- * do remote procedure calling.
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-#ifndef __RPC_HEADER__
-#define __RPC_HEADER__
-
-#include <rpc/types.h> /* some typedefs */
-#include <netinet/in.h>
-#include <sys/socket.h>
-
-/* external data representation interfaces */
-#include <rpc/xdr.h> /* generic (de)serializer */
-
-/* Client side only authentication */
-#include <rpc/auth.h> /* generic authenticator (client side) */
-
-/* Client side (mostly) remote procedure call */
-#include <rpc/clnt.h> /* generic rpc stuff */
-
-/* semi-private protocol headers */
-#include <rpc/rpc_msg.h> /* protocol for rpc messages */
-/*#include "auth_unix.h" * protocol for unix style cred */
-/*
- * Uncomment-out the next line if you are building the rpc library with
- * DES Authentication (see the README file in the secure_rpc/ directory).
- */
-/*#include "auth_des.h" * protocol for des style cred */
-
-/* Server side only remote procedure callee */
-#include <rpc/svc.h> /* service manager and multiplexer */
-#include <rpc/svc_auth.h> /* service side authenticator */
-
-/*
- * COMMENT OUT THE NEXT INCLUDE (or add to the #ifndef) IF RUNNING ON
- * A VERSION OF UNIX THAT USES SUN'S NFS SOURCE. These systems will
- * already have the structures defined by <rpc/netdb.h> included in <netdb.h>.
- */
-/* routines for parsing /etc/rpc */
-
-struct rpcent {
- char *r_name; /* name of server for this rpc program */
- char **r_aliases; /* alias list */
- int r_number; /* rpc program number */
-};
-
-struct rpcent *getrpcbyname(), *getrpcbynumber(), *getrpcent();
-
-#endif /* ndef __RPC_HEADER__ */
-
-#endif /* RPC_H */
diff --git a/c/src/exec/librpc/include/rpc/rpc_msg.h b/c/src/exec/librpc/include/rpc/rpc_msg.h
deleted file mode 100644
index 2f34fb614c..0000000000
--- a/c/src/exec/librpc/include/rpc/rpc_msg.h
+++ /dev/null
@@ -1,192 +0,0 @@
-#ifndef RPC_MSG_H
-#define RPC_MSG_H
-
-/* @(#)rpc_msg.h 2.1 88/07/29 4.0 RPCSRC */
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-/* @(#)rpc_msg.h 1.7 86/07/16 SMI */
-
-/*
- * rpc_msg.h
- * rpc message definition
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-
-#define RPC_MSG_VERSION ((u_long) 2)
-#define RPC_SERVICE_PORT ((u_short) 2048)
-
-/*
- * Bottom up definition of an rpc message.
- * NOTE: call and reply use the same overall stuct but
- * different parts of unions within it.
- */
-
-enum msg_type {
- CALL=0,
- REPLY=1
-};
-
-enum reply_stat {
- MSG_ACCEPTED=0,
- MSG_DENIED=1
-};
-
-enum accept_stat {
- SUCCESS=0,
- PROG_UNAVAIL=1,
- PROG_MISMATCH=2,
- PROC_UNAVAIL=3,
- GARBAGE_ARGS=4,
- SYSTEM_ERR=5
-};
-
-enum reject_stat {
- RPC_MISMATCH=0,
- AUTH_ERROR=1
-};
-
-/*
- * Reply part of an rpc exchange
- */
-
-/*
- * Reply to an rpc request that was accepted by the server.
- * Note: there could be an error even though the request was
- * accepted.
- */
-struct accepted_reply {
- struct opaque_auth ar_verf;
- enum accept_stat ar_stat;
- union {
- struct {
- u_long low;
- u_long high;
- } AR_versions;
- struct {
- caddr_t where;
- xdrproc_t proc;
- } AR_results;
- /* and many other null cases */
- } ru;
-#define ar_results ru.AR_results
-#define ar_vers ru.AR_versions
-};
-
-/*
- * Reply to an rpc request that was rejected by the server.
- */
-struct rejected_reply {
- enum reject_stat rj_stat;
- union {
- struct {
- u_long low;
- u_long high;
- } RJ_versions;
- enum auth_stat RJ_why; /* why authentication did not work */
- } ru;
-#define rj_vers ru.RJ_versions
-#define rj_why ru.RJ_why
-};
-
-/*
- * Body of a reply to an rpc request.
- */
-struct reply_body {
- enum reply_stat rp_stat;
- union {
- struct accepted_reply RP_ar;
- struct rejected_reply RP_dr;
- } ru;
-#define rp_acpt ru.RP_ar
-#define rp_rjct ru.RP_dr
-};
-
-/*
- * Body of an rpc request call.
- */
-struct call_body {
- u_long cb_rpcvers; /* must be equal to two */
- u_long cb_prog;
- u_long cb_vers;
- u_long cb_proc;
- struct opaque_auth cb_cred;
- struct opaque_auth cb_verf; /* protocol specific - provided by client */
-};
-
-/*
- * The rpc message
- */
-struct rpc_msg {
- u_long rm_xid;
- enum msg_type rm_direction;
- union {
- struct call_body RM_cmb;
- struct reply_body RM_rmb;
- } ru;
-#define rm_call ru.RM_cmb
-#define rm_reply ru.RM_rmb
-};
-#define acpted_rply ru.RM_rmb.ru.RP_ar
-#define rjcted_rply ru.RM_rmb.ru.RP_dr
-
-
-/*
- * XDR routine to handle a rpc message.
- * xdr_callmsg(xdrs, cmsg)
- * XDR *xdrs;
- * struct rpc_msg *cmsg;
- */
-extern bool_t xdr_callmsg();
-
-/*
- * XDR routine to pre-serialize the static part of a rpc message.
- * xdr_callhdr(xdrs, cmsg)
- * XDR *xdrs;
- * struct rpc_msg *cmsg;
- */
-extern bool_t xdr_callhdr();
-
-/*
- * XDR routine to handle a rpc reply.
- * xdr_replymsg(xdrs, rmsg)
- * XDR *xdrs;
- * struct rpc_msg *rmsg;
- */
-extern bool_t xdr_replymsg();
-
-/*
- * Fills in the error part of a reply message.
- * _seterr_reply(msg, error)
- * struct rpc_msg *msg;
- * struct rpc_err *error;
- */
-extern void _seterr_reply();
-
-#endif /* RPC_MSG_H */
diff --git a/c/src/exec/librpc/include/rpc/svc.h b/c/src/exec/librpc/include/rpc/svc.h
deleted file mode 100644
index c576b5538b..0000000000
--- a/c/src/exec/librpc/include/rpc/svc.h
+++ /dev/null
@@ -1,291 +0,0 @@
-
-#ifndef RPC_SVC_H
-#define RPC_SVC_H
-
-/* @(#)svc.h 2.2 88/07/29 4.0 RPCSRC; from 1.20 88/02/08 SMI */
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-/*
- * svc.h, Server-side remote procedure call interface.
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-
-#ifndef __SVC_HEADER__
-#define __SVC_HEADER__
-
-/*
- * This interface must manage two items concerning remote procedure calling:
- *
- * 1) An arbitrary number of transport connections upon which rpc requests
- * are received. The two most notable transports are TCP and UDP; they are
- * created and registered by routines in svc_tcp.c and svc_udp.c, respectively;
- * they in turn call xprt_register and xprt_unregister.
- *
- * 2) An arbitrary number of locally registered services. Services are
- * described by the following four data: program number, version number,
- * "service dispatch" function, a transport handle, and a boolean that
- * indicates whether or not the exported program should be registered with a
- * local binder service; if true the program's number and version and the
- * port number from the transport handle are registered with the binder.
- * These data are registered with the rpc svc system via svc_register.
- *
- * A service's dispatch function is called whenever an rpc request comes in
- * on a transport. The request's program and version numbers must match
- * those of the registered service. The dispatch function is passed two
- * parameters, struct svc_req * and SVCXPRT *, defined below.
- */
-
-enum xprt_stat {
- XPRT_DIED,
- XPRT_MOREREQS,
- XPRT_IDLE
-};
-
-/*
- * Server side transport handle
- */
-typedef struct {
- int xp_sock;
- u_short xp_port; /* associated port number */
- struct xp_ops {
- bool_t (*xp_recv)(); /* receive incomming requests */
- enum xprt_stat (*xp_stat)(); /* get transport status */
- bool_t (*xp_getargs)(); /* get arguments */
- bool_t (*xp_reply)(); /* send reply */
- bool_t (*xp_freeargs)();/* free mem allocated for args */
- void (*xp_destroy)(); /* destroy this struct */
- } *xp_ops;
- int xp_addrlen; /* length of remote address */
- struct sockaddr_in xp_raddr; /* remote address */
- struct opaque_auth xp_verf; /* raw response verifier */
- caddr_t xp_p1; /* private */
- caddr_t xp_p2; /* private */
-} SVCXPRT;
-
-/*
- * Approved way of getting address of caller
- */
-#define svc_getcaller(x) (&(x)->xp_raddr)
-
-/*
- * Operations defined on an SVCXPRT handle
- *
- * SVCXPRT *xprt;
- * struct rpc_msg *msg;
- * xdrproc_t xargs;
- * caddr_t argsp;
- */
-#define SVC_RECV(xprt, msg) \
- (*(xprt)->xp_ops->xp_recv)((xprt), (msg))
-#define svc_recv(xprt, msg) \
- (*(xprt)->xp_ops->xp_recv)((xprt), (msg))
-
-#define SVC_STAT(xprt) \
- (*(xprt)->xp_ops->xp_stat)(xprt)
-#define svc_stat(xprt) \
- (*(xprt)->xp_ops->xp_stat)(xprt)
-
-#define SVC_GETARGS(xprt, xargs, argsp) \
- (*(xprt)->xp_ops->xp_getargs)((xprt), (xargs), (argsp))
-#define svc_getargs(xprt, xargs, argsp) \
- (*(xprt)->xp_ops->xp_getargs)((xprt), (xargs), (argsp))
-
-#define SVC_REPLY(xprt, msg) \
- (*(xprt)->xp_ops->xp_reply) ((xprt), (msg))
-#define svc_reply(xprt, msg) \
- (*(xprt)->xp_ops->xp_reply) ((xprt), (msg))
-
-#define SVC_FREEARGS(xprt, xargs, argsp) \
- (*(xprt)->xp_ops->xp_freeargs)((xprt), (xargs), (argsp))
-#define svc_freeargs(xprt, xargs, argsp) \
- (*(xprt)->xp_ops->xp_freeargs)((xprt), (xargs), (argsp))
-
-#define SVC_DESTROY(xprt) \
- (*(xprt)->xp_ops->xp_destroy)(xprt)
-#define svc_destroy(xprt) \
- (*(xprt)->xp_ops->xp_destroy)(xprt)
-
-
-/*
- * Service request
- */
-struct svc_req {
- u_long rq_prog; /* service program number */
- u_long rq_vers; /* service protocol version */
- u_long rq_proc; /* the desired procedure */
- struct opaque_auth rq_cred; /* raw creds from the wire */
- caddr_t rq_clntcred; /* read only cooked cred */
- SVCXPRT *rq_xprt; /* associated transport */
-};
-
-
-/*
- * Service registration
- *
- * svc_register(xprt, prog, vers, dispatch, protocol)
- * SVCXPRT *xprt;
- * u_long prog;
- * u_long vers;
- * void (*dispatch)();
- * int protocol; (like TCP or UDP, zero means do not register)
- */
-extern bool_t svc_register();
-
-/*
- * Service un-registration
- *
- * svc_unregister(prog, vers)
- * u_long prog;
- * u_long vers;
- */
-extern void svc_unregister();
-
-/*
- * Transport registration.
- *
- * xprt_register(xprt)
- * SVCXPRT *xprt;
- */
-extern void xprt_register();
-
-/*
- * Transport un-register
- *
- * xprt_unregister(xprt)
- * SVCXPRT *xprt;
- */
-extern void xprt_unregister();
-
-
-
-
-/*
- * When the service routine is called, it must first check to see if it
- * knows about the procedure; if not, it should call svcerr_noproc
- * and return. If so, it should deserialize its arguments via
- * SVC_GETARGS (defined above). If the deserialization does not work,
- * svcerr_decode should be called followed by a return. Successful
- * decoding of the arguments should be followed the execution of the
- * procedure's code and a call to svc_sendreply.
- *
- * Also, if the service refuses to execute the procedure due to too-
- * weak authentication parameters, svcerr_weakauth should be called.
- * Note: do not confuse access-control failure with weak authentication!
- *
- * NB: In pure implementations of rpc, the caller always waits for a reply
- * msg. This message is sent when svc_sendreply is called.
- * Therefore pure service implementations should always call
- * svc_sendreply even if the function logically returns void; use
- * xdr.h - xdr_void for the xdr routine. HOWEVER, tcp based rpc allows
- * for the abuse of pure rpc via batched calling or pipelining. In the
- * case of a batched call, svc_sendreply should NOT be called since
- * this would send a return message, which is what batching tries to avoid.
- * It is the service/protocol writer's responsibility to know which calls are
- * batched and which are not. Warning: responding to batch calls may
- * deadlock the caller and server processes!
- */
-
-extern bool_t svc_sendreply();
-extern void svcerr_decode();
-extern void svcerr_weakauth();
-extern void svcerr_noproc();
-extern void svcerr_progvers();
-extern void svcerr_auth();
-extern void svcerr_noprog();
-extern void svcerr_systemerr();
-
-/*
- * Lowest level dispatching -OR- who owns this process anyway.
- * Somebody has to wait for incoming requests and then call the correct
- * service routine. The routine svc_run does infinite waiting; i.e.,
- * svc_run never returns.
- * Since another (co-existant) package may wish to selectively wait for
- * incoming calls or other events outside of the rpc architecture, the
- * routine svc_getreq is provided. It must be passed readfds, the
- * "in-place" results of a select system call (see select, section 2).
- */
-
-/*
- * Global keeper of rpc service descriptors in use
- * dynamic; must be inspected before each call to select
- */
-#ifdef FD_SETSIZE
-extern fd_set svc_fdset;
-#define svc_fds svc_fdset.fds_bits[0] /* compatibility */
-#else
-extern int svc_fds;
-#endif /* def FD_SETSIZE */
-
-/*
- * a small program implemented by the svc_rpc implementation itself;
- * also see clnt.h for protocol numbers.
- */
-extern void rpctest_service();
-
-extern void svc_getreq();
-extern void svc_getreqset(); /* takes fdset instead of int */
-extern void svc_run(); /* never returns */
-
-/*
- * Socket to use on svcxxx_create call to get default socket
- */
-#define RPC_ANYSOCK -1
-
-/*
- * These are the existing service side transport implementations
- */
-
-/*
- * Memory based rpc for testing and timing.
- */
-extern SVCXPRT *svcraw_create();
-
-/*
- * Udp based rpc.
- */
-extern SVCXPRT *svcudp_create();
-extern SVCXPRT *svcudp_bufcreate();
-extern int svcudp_enablecache(SVCXPRT *transp, u_long size);
-
-/*
- * Tcp based rpc.
- */
-extern SVCXPRT *svctcp_create();
-
-
-
-#endif /* !__SVC_HEADER__ */
-
-extern int _rpcsvccount;
-extern int _rpcsvcstate;
-extern int _SERVED;
-
-#endif /* RPC_SVC_H */
diff --git a/c/src/exec/librpc/include/rpc/svc_auth.h b/c/src/exec/librpc/include/rpc/svc_auth.h
deleted file mode 100644
index 5c233a6a47..0000000000
--- a/c/src/exec/librpc/include/rpc/svc_auth.h
+++ /dev/null
@@ -1,47 +0,0 @@
-#ifndef RPC_SVC_AUTH_H
-#define RPC_SVC_AUTH_H
-
-/* @(#)svc_auth.h 2.1 88/07/29 4.0 RPCSRC */
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-/* @(#)svc_auth.h 1.6 86/07/16 SMI */
-
-/*
- * svc_auth.h, Service side of rpc authentication.
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-
-
-/*
- * Server side authenticator
- */
-extern enum auth_stat _authenticate();
-
-#endif /* SVC_AUTH_H */
diff --git a/c/src/exec/librpc/include/rpc/types.h b/c/src/exec/librpc/include/rpc/types.h
deleted file mode 100644
index b6d7eb3ccc..0000000000
--- a/c/src/exec/librpc/include/rpc/types.h
+++ /dev/null
@@ -1,75 +0,0 @@
-#ifndef RPC_TYPES_H
-#define RPC_TYPES_H
-
-/* @(#)types.h 2.3 88/08/15 4.0 RPCSRC */
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-/* @(#)types.h 1.18 87/07/24 SMI */
-
-/*
- * Rpc additions to <sys/types.h>
- */
-#ifndef __TYPES_RPC_HEADER__
-#define __TYPES_RPC_HEADER__
-
-/*#include <network/types.h>*/
-typedef unsigned long u_int32; /* 32-bit unsigned integers */
-
-#define bool_t int
-#define enum_t int
-#ifndef FALSE
-# define FALSE (0)
-#endif
-#ifndef TRUE
-# define TRUE (1)
-#endif
-#define __dontcare__ -1
-#ifndef NULL
-# define NULL 0
-#endif
-
-void *malloc();
-#define mem_alloc(bsize) malloc(bsize)
-#define mem_free(ptr, bsize) free(ptr)
-
-#ifndef makedev /* ie, we haven't already included it */
-#include <sys/types.h>
-#endif
-#include <sys/time.h>
-
-#ifndef INADDR_LOOPBACK
-#define INADDR_LOOPBACK (u_long)0x7F000001
-#endif
-#ifndef MAXHOSTNAMELEN
-#define MAXHOSTNAMELEN 64
-#endif
-
-#endif /* ndef __TYPES_RPC_HEADER__ */
-
-#endif /* RPC_TYPES_H */
diff --git a/c/src/exec/librpc/include/rpc/xdr.h b/c/src/exec/librpc/include/rpc/xdr.h
deleted file mode 100644
index ef2df51d93..0000000000
--- a/c/src/exec/librpc/include/rpc/xdr.h
+++ /dev/null
@@ -1,275 +0,0 @@
-#ifndef RPC_XDR_H
-#define RPC_XDR_H
-
-/* @(#)xdr.h 2.2 88/07/29 4.0 RPCSRC */
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-/* @(#)xdr.h 1.19 87/04/22 SMI */
-
-/*
- * xdr.h, External Data Representation Serialization Routines.
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-
-#ifndef __XDR_HEADER__
-#define __XDR_HEADER__
-
-/*
- * XDR provides a conventional way for converting between C data
- * types and an external bit-string representation. Library supplied
- * routines provide for the conversion on built-in C data types. These
- * routines and utility routines defined here are used to help implement
- * a type encode/decode routine for each user-defined type.
- *
- * Each data type provides a single procedure which takes two arguments:
- *
- * bool_t
- * xdrproc(xdrs, argresp)
- * XDR *xdrs;
- * <type> *argresp;
- *
- * xdrs is an instance of a XDR handle, to which or from which the data
- * type is to be converted. argresp is a pointer to the structure to be
- * converted. The XDR handle contains an operation field which indicates
- * which of the operations (ENCODE, DECODE * or FREE) is to be performed.
- *
- * XDR_DECODE may allocate space if the pointer argresp is null. This
- * data can be freed with the XDR_FREE operation.
- *
- * We write only one procedure per data type to make it easy
- * to keep the encode and decode procedures for a data type consistent.
- * In many cases the same code performs all operations on a user defined type,
- * because all the hard work is done in the component type routines.
- * decode as a series of calls on the nested data types.
- */
-
-/*
- * Xdr operations. XDR_ENCODE causes the type to be encoded into the
- * stream. XDR_DECODE causes the type to be extracted from the stream.
- * XDR_FREE can be used to release the space allocated by an XDR_DECODE
- * request.
- */
-enum xdr_op {
- XDR_ENCODE=0,
- XDR_DECODE=1,
- XDR_FREE=2
-};
-
-/*
- * This is the number of bytes per unit of external data.
- */
-#define BYTES_PER_XDR_UNIT (4)
-#define RNDUP(x) ((((x) + BYTES_PER_XDR_UNIT - 1) / BYTES_PER_XDR_UNIT) \
- * BYTES_PER_XDR_UNIT)
-
-/*
- * A xdrproc_t exists for each data type which is to be encoded or decoded.
- *
- * The second argument to the xdrproc_t is a pointer to an opaque pointer.
- * The opaque pointer generally points to a structure of the data type
- * to be decoded. If this pointer is 0, then the type routines should
- * allocate dynamic storage of the appropriate size and return it.
- * bool_t (*xdrproc_t)(XDR *, caddr_t *);
- */
-typedef bool_t (*xdrproc_t)();
-
-/*
- * The XDR handle.
- * Contains operation which is being applied to the stream,
- * an operations vector for the paticular implementation (e.g. see xdr_mem.c),
- * and two private fields for the use of the particular impelementation.
- */
-typedef struct {
- enum xdr_op x_op; /* operation; fast additional param */
- struct xdr_ops {
- bool_t (*x_getlong)(); /* get a long from underlying stream */
- bool_t (*x_putlong)(); /* put a long to " */
- bool_t (*x_getbytes)();/* get some bytes from " */
- bool_t (*x_putbytes)();/* put some bytes to " */
- u_int (*x_getpostn)();/* returns bytes off from beginning */
- bool_t (*x_setpostn)();/* lets you reposition the stream */
- long * (*x_inline)(); /* buf quick ptr to buffered data */
- void (*x_destroy)(); /* free privates of this xdr_stream */
- } *x_ops;
- caddr_t x_public; /* users' data */
- caddr_t x_private; /* pointer to private data */
- caddr_t x_base; /* private used for position info */
- int x_handy; /* extra private word */
-} XDR;
-
-/*
- * Operations defined on a XDR handle
- *
- * XDR *xdrs;
- * long *longp;
- * caddr_t addr;
- * u_int len;
- * u_int pos;
- */
-#define XDR_GETLONG(xdrs, longp) \
- (*(xdrs)->x_ops->x_getlong)(xdrs, longp)
-#define xdr_getlong(xdrs, longp) \
- (*(xdrs)->x_ops->x_getlong)(xdrs, longp)
-
-#define XDR_PUTLONG(xdrs, longp) \
- (*(xdrs)->x_ops->x_putlong)(xdrs, longp)
-#define xdr_putlong(xdrs, longp) \
- (*(xdrs)->x_ops->x_putlong)(xdrs, longp)
-
-#define XDR_GETBYTES(xdrs, addr, len) \
- (*(xdrs)->x_ops->x_getbytes)(xdrs, addr, len)
-#define xdr_getbytes(xdrs, addr, len) \
- (*(xdrs)->x_ops->x_getbytes)(xdrs, addr, len)
-
-#define XDR_PUTBYTES(xdrs, addr, len) \
- (*(xdrs)->x_ops->x_putbytes)(xdrs, addr, len)
-#define xdr_putbytes(xdrs, addr, len) \
- (*(xdrs)->x_ops->x_putbytes)(xdrs, addr, len)
-
-#define XDR_GETPOS(xdrs) \
- (*(xdrs)->x_ops->x_getpostn)(xdrs)
-#define xdr_getpos(xdrs) \
- (*(xdrs)->x_ops->x_getpostn)(xdrs)
-
-#define XDR_SETPOS(xdrs, pos) \
- (*(xdrs)->x_ops->x_setpostn)(xdrs, pos)
-#define xdr_setpos(xdrs, pos) \
- (*(xdrs)->x_ops->x_setpostn)(xdrs, pos)
-
-#define XDR_INLINE(xdrs, len) \
- (*(xdrs)->x_ops->x_inline)(xdrs, len)
-#define xdr_inline(xdrs, len) \
- (*(xdrs)->x_ops->x_inline)(xdrs, len)
-
-#define XDR_DESTROY(xdrs) \
- if ((xdrs)->x_ops->x_destroy) \
- (*(xdrs)->x_ops->x_destroy)(xdrs)
-#define xdr_destroy(xdrs) \
- if ((xdrs)->x_ops->x_destroy) \
- (*(xdrs)->x_ops->x_destroy)(xdrs)
-
-/*
- * Support struct for discriminated unions.
- * You create an array of xdrdiscrim structures, terminated with
- * a entry with a null procedure pointer. The xdr_union routine gets
- * the discriminant value and then searches the array of structures
- * for a matching value. If a match is found the associated xdr routine
- * is called to handle that part of the union. If there is
- * no match, then a default routine may be called.
- * If there is no match and no default routine it is an error.
- */
-#define NULL_xdrproc_t ((xdrproc_t)0)
-struct xdr_discrim {
- int value;
- xdrproc_t proc;
-};
-
-/*
- * In-line routines for fast encode/decode of primitve data types.
- * Caveat emptor: these use single memory cycles to get the
- * data from the underlying buffer, and will fail to operate
- * properly if the data is not aligned. The standard way to use these
- * is to say:
- * if ((buf = XDR_INLINE(xdrs, count)) == NULL)
- * return (FALSE);
- * <<< macro calls >>>
- * where ``count'' is the number of bytes of data occupied
- * by the primitive data types.
- *
- * N.B. and frozen for all time: each data type here uses 4 bytes
- * of external representation.
- */
-#define IXDR_GET_LONG(buf) ((long)ntohl((u_long)*(buf)++))
-#define IXDR_PUT_LONG(buf, v) (*(buf)++ = (long)htonl((u_long)v))
-
-#define IXDR_GET_BOOL(buf) ((bool_t)IXDR_GET_LONG(buf))
-#define IXDR_GET_ENUM(buf, t) ((t)IXDR_GET_LONG(buf))
-#define IXDR_GET_U_LONG(buf) ((u_long)IXDR_GET_LONG(buf))
-#define IXDR_GET_SHORT(buf) ((short)IXDR_GET_LONG(buf))
-#define IXDR_GET_U_SHORT(buf) ((u_short)IXDR_GET_LONG(buf))
-
-#define IXDR_PUT_BOOL(buf, v) IXDR_PUT_LONG((buf), ((long)(v)))
-#define IXDR_PUT_ENUM(buf, v) IXDR_PUT_LONG((buf), ((long)(v)))
-#define IXDR_PUT_U_LONG(buf, v) IXDR_PUT_LONG((buf), ((long)(v)))
-#define IXDR_PUT_SHORT(buf, v) IXDR_PUT_LONG((buf), ((long)(v)))
-#define IXDR_PUT_U_SHORT(buf, v) IXDR_PUT_LONG((buf), ((long)(v)))
-
-/*
- * These are the "generic" xdr routines.
- */
-extern bool_t xdr_void();
-extern bool_t xdr_int();
-extern bool_t xdr_u_int();
-extern bool_t xdr_long();
-extern bool_t xdr_u_long();
-extern bool_t xdr_short();
-extern bool_t xdr_u_short();
-extern bool_t xdr_bool();
-extern bool_t xdr_enum();
-extern bool_t xdr_array();
-extern bool_t xdr_bytes();
-extern bool_t xdr_opaque();
-extern bool_t xdr_string();
-extern bool_t xdr_union();
-extern bool_t xdr_char();
-extern bool_t xdr_u_char();
-extern bool_t xdr_vector();
-extern bool_t xdr_float();
-extern bool_t xdr_double();
-extern bool_t xdr_reference();
-extern bool_t xdr_pointer();
-extern bool_t xdr_wrapstring();
-
-/*
- * Common opaque bytes objects used by many rpc protocols;
- * declared here due to commonality.
- */
-#define MAX_NETOBJ_SZ 1024
-struct netobj {
- u_int n_len;
- char *n_bytes;
-};
-typedef struct netobj netobj;
-extern bool_t xdr_netobj();
-
-/*
- * These are the public routines for the various implementations of
- * xdr streams.
- */
-extern void xdrmem_create(); /* XDR using memory buffers */
-extern void xdrstdio_create(); /* XDR using stdio library */
-extern void xdrrec_create(); /* XDR pseudo records for tcp */
-extern bool_t xdrrec_endofrecord(); /* make end of xdr record */
-extern bool_t xdrrec_skiprecord(); /* move to beginning of next record */
-extern bool_t xdrrec_eof(); /* true if no more input */
-
-#endif /* !__XDR_HEADER__ */
-
-#endif /* RPC_XDR_H */
diff --git a/c/src/exec/librpc/src/Makefile.am b/c/src/exec/librpc/src/Makefile.am
deleted file mode 100644
index efa6a1cadb..0000000000
--- a/c/src/exec/librpc/src/Makefile.am
+++ /dev/null
@@ -1,35 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-LIBNAME = librpc
-LIB = ${ARCH}/${LIBNAME}.a
-
-C_FILES = rpc_callmsg.c rpc_prot.c svc.c svc_auth.c svc_udp.c xdr.c \
- xdr_array.c xdr_mem.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-SRCS = $(C_FILES)
-OBJS = $(C_O_FILES)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../automake/lib.am
-
-AM_CFLAGS += $(LIBC_DEFINES)
-
-TMPINSTALL_FILES += \
-$(PROJECT_RELEASE)/lib/$(LIBNAME)$(LIB_VARIANT).a
-
-$(LIB): ${OBJS}
- $(make-library)
-
-$(PROJECT_RELEASE)/lib/$(LIBNAME)$(LIB_VARIANT).a: $(LIB)
- $(INSTALL_DATA) $< $@
-
-all: ${ARCH} $(PREINSTALL_FILES) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES)
-
-include $(top_srcdir)/../../../automake/local.am
diff --git a/c/src/exec/score/cpu/a29k/rtems/score/types.h b/c/src/exec/score/cpu/a29k/rtems/score/types.h
deleted file mode 100644
index 130fd30dd4..0000000000
--- a/c/src/exec/score/cpu/a29k/rtems/score/types.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* no_cputypes.h
- *
- * This include file contains type definitions pertaining to the Intel
- * no_cpu processor family.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __NO_CPU_TYPES_h
-#define __NO_CPU_TYPES_h
-
-#ifndef ASM
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This section defines the basic types for this processor.
- */
-
-typedef unsigned char unsigned8; /* unsigned 8-bit integer */
-typedef unsigned short unsigned16; /* unsigned 16-bit integer */
-typedef unsigned int unsigned32; /* unsigned 32-bit integer */
-typedef unsigned long unsigned64; /* unsigned 64-bit integer */
-
-typedef unsigned16 Priority_Bit_map_control;
-
-typedef signed char signed8; /* 8-bit signed integer */
-typedef signed short signed16; /* 16-bit signed integer */
-typedef signed int signed32; /* 32-bit signed integer */
-typedef signed long signed64; /* 64 bit signed integer */
-
-typedef unsigned32 boolean; /* Boolean value */
-
-typedef float single_precision; /* single precision float */
-typedef double double_precision; /* double precision float */
-
-typedef void no_cpu_isr;
-typedef void ( *no_cpu_isr_entry )( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !ASM */
-
-#endif
-/* end of include file */
diff --git a/c/src/exec/score/cpu/hppa1.1/rtems/score/types.h b/c/src/exec/score/cpu/hppa1.1/rtems/score/types.h
deleted file mode 100644
index 512323819b..0000000000
--- a/c/src/exec/score/cpu/hppa1.1/rtems/score/types.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* hppatypes.h
- *
- * This include file contains type definitions pertaining to the Hewlett
- * Packard PA-RISC processor family.
- *
- * $Id$
- */
-
-#ifndef _INCLUDE_HPPATYPES_H
-#define _INCLUDE_HPPATYPES_H
-
-#ifndef ASM
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This section defines the basic types for this processor.
- */
-
-typedef unsigned char unsigned8; /* 8-bit unsigned integer */
-typedef unsigned short unsigned16; /* 16-bit unsigned integer */
-typedef unsigned int unsigned32; /* 32-bit unsigned integer */
-typedef unsigned long long unsigned64; /* 64-bit unsigned integer */
-
-typedef unsigned16 Priority_Bit_map_control;
-
-typedef signed char signed8; /* 8-bit signed integer */
-typedef signed short signed16; /* 16-bit signed integer */
-typedef signed int signed32; /* 32-bit signed integer */
-typedef signed long long signed64; /* 64 bit signed integer */
-
-typedef unsigned32 boolean; /* Boolean value */
-
-typedef float single_precision; /* single precision float */
-typedef double double_precision; /* double precision float */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !ASM */
-
-#endif /* _INCLUDE_HPPATYPES_H */
-/* end of include file */
diff --git a/c/src/exec/score/cpu/i386/rtems/score/types.h b/c/src/exec/score/cpu/i386/rtems/score/types.h
deleted file mode 100644
index 1b9091f501..0000000000
--- a/c/src/exec/score/cpu/i386/rtems/score/types.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* i386types.h
- *
- * This include file contains type definitions pertaining to the Intel
- * i386 processor family.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __i386_TYPES_h
-#define __i386_TYPES_h
-
-#ifndef ASM
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This section defines the basic types for this processor.
- */
-
-typedef unsigned char unsigned8; /* unsigned 8-bit integer */
-typedef unsigned short unsigned16; /* unsigned 16-bit integer */
-typedef unsigned int unsigned32; /* unsigned 32-bit integer */
-typedef unsigned long long unsigned64; /* unsigned 64-bit integer */
-
-typedef unsigned16 Priority_Bit_map_control;
-
-typedef signed char signed8; /* 8-bit signed integer */
-typedef signed short signed16; /* 16-bit signed integer */
-typedef signed int signed32; /* 32-bit signed integer */
-typedef signed long long signed64; /* 64 bit signed integer */
-
-typedef unsigned32 boolean; /* Boolean value */
-
-typedef float single_precision; /* single precision float */
-typedef double double_precision; /* double precision float */
-
-typedef void i386_isr;
-
-typedef i386_isr ( *i386_isr_entry )( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !ASM */
-
-#endif
-/* end of include file */
diff --git a/c/src/exec/score/cpu/i960/rtems/score/types.h b/c/src/exec/score/cpu/i960/rtems/score/types.h
deleted file mode 100644
index 81deddaa1f..0000000000
--- a/c/src/exec/score/cpu/i960/rtems/score/types.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* i960types.h
- *
- * This include file contains type definitions pertaining to the Intel
- * i960 processor family.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __i960_TYPES_h
-#define __i960_TYPES_h
-
-#ifndef ASM
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This section defines the basic types for this processor.
- */
-
-typedef unsigned char unsigned8; /* unsigned 8-bit integer */
-typedef unsigned short unsigned16; /* unsigned 16-bit integer */
-typedef unsigned int unsigned32; /* unsigned 32-bit integer */
-typedef unsigned long long unsigned64; /* unsigned 64-bit integer */
-
-typedef unsigned32 Priority_Bit_map_control;
-
-typedef signed char signed8; /* 8-bit signed integer */
-typedef signed short signed16; /* 16-bit signed integer */
-typedef signed int signed32; /* 32-bit signed integer */
-typedef signed long long signed64; /* 64 bit signed integer */
-
-typedef unsigned32 boolean; /* Boolean value */
-
-typedef float single_precision; /* single precision float */
-typedef double double_precision; /* double precision float */
-
-typedef void i960_isr;
-
-typedef void ( *i960_isr_entry )( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !ASM */
-
-#endif
-/* end of include file */
diff --git a/c/src/exec/score/cpu/m68k/rtems/score/types.h b/c/src/exec/score/cpu/m68k/rtems/score/types.h
deleted file mode 100644
index 7b1a1c643e..0000000000
--- a/c/src/exec/score/cpu/m68k/rtems/score/types.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* m68ktypes.h
- *
- * This include file contains type definitions pertaining to the Motorola
- * m68xxx processor family.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __M68k_TYPES_h
-#define __M68k_TYPES_h
-
-#ifndef ASM
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This section defines the basic types for this processor.
- */
-
-typedef unsigned char unsigned8; /* unsigned 8-bit integer */
-typedef unsigned short unsigned16; /* unsigned 16-bit integer */
-typedef unsigned int unsigned32; /* unsigned 32-bit integer */
-typedef unsigned long long unsigned64; /* unsigned 64-bit integer */
-
-typedef unsigned16 Priority_Bit_map_control;
-
-typedef signed char signed8; /* 8-bit signed integer */
-typedef signed short signed16; /* 16-bit signed integer */
-typedef signed int signed32; /* 32-bit signed integer */
-typedef signed long long signed64; /* 64 bit signed integer */
-
-typedef unsigned32 boolean; /* Boolean value */
-
-typedef float single_precision; /* single precision float */
-typedef double double_precision; /* double precision float */
-
-typedef void m68k_isr;
-
-typedef void ( *m68k_isr_entry )( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !ASM */
-
-#endif
-/* end of include file */
diff --git a/c/src/exec/score/cpu/mips/Makefile.am b/c/src/exec/score/cpu/mips/Makefile.am
deleted file mode 100644
index b54cb49ded..0000000000
--- a/c/src/exec/score/cpu/mips/Makefile.am
+++ /dev/null
@@ -1,49 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-
-SUBDIRS = rtems
-
-C_FILES = cpu.c
-C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
-
-H_FILES = asm.h cpu_asm.h idtcpu.h idtmon.h iregdef.h
-
-S_FILES = cpu_asm.S
-S_O_FILES = $(S_FILES:%.S=$(ARCH)/%.o)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../../../../automake/lib.am
-
-$(PROJECT_INCLUDE):
- $(mkinstalldirs) $@
-
-$(PROJECT_INCLUDE)/%.h: %.h
- $(INSTALL_DATA) $< $@
-
-$(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o: $(ARCH)/rtems.o
- $(INSTALL_DATA) $< $@
-
-REL = $(ARCH)/rtems-cpu.rel
-
-rtems_cpu_rel_OBJECTS = $(C_O_FILES) $(S_O_FILES)
-
-$(REL): $(rtems_cpu_rel_OBJECTS)
- $(make-rel)
-
-PREINSTALL_FILES += $(PROJECT_INCLUDE) $(H_FILES:%=$(PROJECT_INCLUDE)/%)
-
-TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o
-
-all-local: $(ARCH) $(PREINSTALL_FILES) $(rtems_cpu_rel_OBJECTS) $(REL) $(TMPINSTALL_FILES)
-
-.PRECIOUS: $(REL)
-
-EXTRA_DIST = asm.h cpu.c cpu_asm.S cpu_asm.h idtcpu.h idtmon.h iregdef.h \
- rtems.c
-
-include $(top_srcdir)/../../../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/c/src/exec/score/cpu/mips/asm.h b/c/src/exec/score/cpu/mips/asm.h
deleted file mode 100644
index 2d322c2339..0000000000
--- a/c/src/exec/score/cpu/mips/asm.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/* asm.h
- *
- * This include file attempts to address the problems
- * caused by incompatible flavors of assemblers and
- * toolsets. It primarily addresses variations in the
- * use of leading underscores on symbols and the requirement
- * that register names be preceded by a %.
- *
- *
- * NOTE: The spacing in the use of these macros
- * is critical to them working as advertised.
- *
- * COPYRIGHT:
- *
- * This file is based on similar code found in newlib available
- * from ftp.cygnus.com. The file which was used had no copyright
- * notice. This file is freely distributable as long as the source
- * of the file is noted. This file is:
- *
- * COPYRIGHT (c) 1994-1997.
- * On-Line Applications Research Corporation (OAR).
- *
- * $Id$
- */
-/* @(#)asm.h 03/15/96 1.1 */
-
-#ifndef __NO_CPU_ASM_h
-#define __NO_CPU_ASM_h
-
-/*
- * Indicate we are in an assembly file and get the basic CPU definitions.
- */
-
-#ifndef ASM
-#define ASM
-#endif
-#include <rtems/score/targopts.h>
-#include <rtems/score/mips64orion.h>
-
-/*
- * Recent versions of GNU cpp define variables which indicate the
- * need for underscores and percents. If not using GNU cpp or
- * the version does not support this, then you will obviously
- * have to define these as appropriate.
- */
-
-#ifndef __USER_LABEL_PREFIX__
-#define __USER_LABEL_PREFIX__ _
-#endif
-
-#ifndef __REGISTER_PREFIX__
-#define __REGISTER_PREFIX__
-#endif
-
-/* ANSI concatenation macros. */
-
-#define CONCAT1(a, b) CONCAT2(a, b)
-#define CONCAT2(a, b) a ## b
-
-/* Use the right prefix for global labels. */
-
-#define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
-
-/* Use the right prefix for registers. */
-
-#define REG(x) CONCAT1 (__REGISTER_PREFIX__, x)
-
-/*
- * define macros for all of the registers on this CPU
- *
- * EXAMPLE: #define d0 REG (d0)
- */
-
-/*
- * Define macros to handle section beginning and ends.
- */
-
-
-#define BEGIN_CODE_DCL .text
-#define END_CODE_DCL
-#define BEGIN_DATA_DCL .data
-#define END_DATA_DCL
-#define BEGIN_CODE .text
-#define END_CODE
-#define BEGIN_DATA
-#define END_DATA
-#define BEGIN_BSS
-#define END_BSS
-#define END
-
-/*
- * Following must be tailor for a particular flavor of the C compiler.
- * They may need to put underscores in front of the symbols.
- */
-
-#define PUBLIC(sym) .globl SYM (sym)
-#define EXTERN(sym) .globl SYM (sym)
-
-#endif
-/* end of include file */
-
-
diff --git a/c/src/exec/score/cpu/mips/configure.in b/c/src/exec/score/cpu/mips/configure.in
deleted file mode 100644
index edf945294b..0000000000
--- a/c/src/exec/score/cpu/mips/configure.in
+++ /dev/null
@@ -1,34 +0,0 @@
-dnl Process this file with autoconf to produce a configure script.
-dnl
-dnl $Id$
-
-AC_PREREQ(2.13)
-AC_INIT(cpu_asm.S)
-RTEMS_TOP(../../../../../..)
-AC_CONFIG_AUX_DIR(../../../../../..)
-
-RTEMS_CANONICAL_TARGET_CPU
-
-AM_INIT_AUTOMAKE(rtems-c-src-exec-score-cpu-mips64orion,$RTEMS_VERSION,no)
-AM_MAINTAINER_MODE
-
-RTEMS_ENV_RTEMSBSP
-
-RTEMS_CHECK_CPU
-RTEMS_CANONICAL_HOST
-
-RTEMS_PROJECT_ROOT
-
-RTEMS_PROG_CC_FOR_TARGET
-RTEMS_CANONICALIZE_TOOLS
-
-RTEMS_CHECK_NEWLIB
-
-# Check if there is custom/*.cfg for this BSP
-RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
-
-# Explicitly list all Makefiles here
-AC_OUTPUT(
-Makefile
-rtems/Makefile
-rtems/score/Makefile)
diff --git a/c/src/exec/score/cpu/mips/cpu.c b/c/src/exec/score/cpu/mips/cpu.c
deleted file mode 100644
index 8d05c336c4..0000000000
--- a/c/src/exec/score/cpu/mips/cpu.c
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- * Mips CPU Dependent Source
- *
- * Author: Craig Lebakken <craigl@transition.com>
- *
- * COPYRIGHT (c) 1996 by Transition Networks Inc.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Transition Networks not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * Transition Networks makes no representations about the suitability
- * of this software for any purpose.
- *
- * Derived from c/src/exec/score/cpu/no_cpu/cpu.c:
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-/*
- * Rather than deleting this, it is commented out to (hopefully) help
- * the submitter send updates.
- *
- * static char _sccsid[] = "@(#)cpu.c 08/20/96 1.5\n";
- */
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/wkspace.h>
-
-
-ISR_Handler_entry _ISR_Vector_table[ ISR_NUMBER_OF_VECTORS ];
-
-/* _CPU_Initialize
- *
- * This routine performs processor dependent initialization.
- *
- * INPUT PARAMETERS:
- * cpu_table - CPU table to initialize
- * thread_dispatch - address of disptaching routine
- */
-
-
-void null_handler( void )
-{
-}
-
-
-void _CPU_Initialize(
- rtems_cpu_table *cpu_table,
- void (*thread_dispatch) /* ignored on this CPU */
-)
-{
- unsigned int i = ISR_NUMBER_OF_VECTORS;
-
- while ( i-- )
- {
- _ISR_Vector_table[i] = (ISR_Handler_entry)null_handler;
- }
-
- /*
- * The thread_dispatch argument is the address of the entry point
- * for the routine called at the end of an ISR once it has been
- * decided a context switch is necessary. On some compilation
- * systems it is difficult to call a high-level language routine
- * from assembly. This allows us to trick these systems.
- *
- * If you encounter this problem save the entry point in a CPU
- * dependent variable.
- */
-
- _CPU_Thread_dispatch_pointer = thread_dispatch;
-
- /*
- * If there is not an easy way to initialize the FP context
- * during Context_Initialize, then it is usually easier to
- * save an "uninitialized" FP context here and copy it to
- * the task's during Context_Initialize.
- */
-
- /* FP context initialization support goes here */
-
- _CPU_Table = *cpu_table;
-
-}
-
-/*PAGE
- *
- * _CPU_ISR_Get_level
- */
-
-#if 0 /* located in cpu_asm.S */
-unsigned32 _CPU_ISR_Get_level( void )
-{
- /*
- * This routine returns the current interrupt level.
- */
-}
-#endif
-
-/*PAGE
- *
- * _CPU_ISR_install_raw_handler
- */
-
-void _CPU_ISR_install_raw_handler(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-)
-{
- /*
- * This is where we install the interrupt handler into the "raw" interrupt
- * table used by the CPU to dispatch interrupt handlers.
- */
-
-#if 0 /* not necessary */
-/* use IDT/Sim to set interrupt vector. Needed to co-exist with debugger. */
- add_ext_int_func( vector, new_handler );
-#endif
-}
-
-/*PAGE
- *
- * _CPU_ISR_install_vector
- *
- * This kernel routine installs the RTEMS handler for the
- * specified vector.
- *
- * Input parameters:
- * vector - interrupt vector number
- * old_handler - former ISR for this vector number
- * new_handler - replacement ISR for this vector number
- *
- * Output parameters: NONE
- *
- */
-
-void _CPU_ISR_install_vector(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-)
-{
- *old_handler = _ISR_Vector_table[ vector ];
-
- /*
- * If the interrupt vector table is a table of pointer to isr entry
- * points, then we need to install the appropriate RTEMS interrupt
- * handler for this vector number.
- */
-
- _CPU_ISR_install_raw_handler( vector, _ISR_Handler, old_handler );
-
- /*
- * We put the actual user ISR address in '_ISR_vector_table'. This will
- * be used by the _ISR_Handler so the user gets control.
- */
-
- _ISR_Vector_table[ vector ] = new_handler;
-}
-
-/*PAGE
- *
- * _CPU_Install_interrupt_stack
- */
-
-void _CPU_Install_interrupt_stack( void )
-{
-/* we don't support this yet */
-}
-
-/*PAGE
- *
- * _CPU_Internal_threads_Idle_thread_body
- *
- * NOTES:
- *
- * 1. This is the same as the regular CPU independent algorithm.
- *
- * 2. If you implement this using a "halt", "idle", or "shutdown"
- * instruction, then don't forget to put it in an infinite loop.
- *
- * 3. Be warned. Some processors with onboard DMA have been known
- * to stop the DMA if the CPU were put in IDLE mode. This might
- * also be a problem with other on-chip peripherals. So use this
- * hook with caution.
- */
-
-#if 0 /* located in cpu_asm.S */
-void _CPU_Thread_Idle_body( void )
-{
-
- for( ; ; )
- /* insert your "halt" instruction here */ ;
-}
-#endif
-
-extern void mips_break( int error );
-
-#include <stdio.h>
-
-void mips_fatal_error( int error )
-{
- printf("fatal error 0x%x %d\n",error,error);
- mips_break( error );
-}
diff --git a/c/src/exec/score/cpu/mips/cpu_asm.S b/c/src/exec/score/cpu/mips/cpu_asm.S
deleted file mode 100644
index 4acebc663e..0000000000
--- a/c/src/exec/score/cpu/mips/cpu_asm.S
+++ /dev/null
@@ -1,971 +0,0 @@
-/* cpu_asm.S
- *
- * This file contains the basic algorithms for all assembly code used
- * in an specific CPU port of RTEMS. These algorithms must be implemented
- * in assembly language
- *
- * Author: Craig Lebakken <craigl@transition.com>
- *
- * COPYRIGHT (c) 1996 by Transition Networks Inc.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Transition Networks not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * Transition Networks makes no representations about the suitability
- * of this software for any purpose.
- *
- * Derived from c/src/exec/score/cpu/no_cpu/cpu_asm.s:
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-/* @(#)cpu_asm.S 08/20/96 1.15 */
-
-#include "cpu_asm.h"
-
-#include "iregdef.h"
-#include "idtcpu.h"
-
-#define FRAME(name,frm_reg,offset,ret_reg) \
- .globl name; \
- .ent name; \
-name:; \
- .frame frm_reg,offset,ret_reg
-#define ENDFRAME(name) \
- .end name
-
-
-#define EXCP_STACK_SIZE (NREGS*R_SZ)
-
-#if __ghs__
-#define sd sw
-#define ld lw
-#define dmtc0 mtc0
-#define dsll sll
-#define dmfc0 mfc0
-#endif
-
-#if 1 /* 32 bit unsigned32 types */
-#define sint sw
-#define lint lw
-#define stackadd addiu
-#define intadd addu
-#define SZ_INT 4
-#define SZ_INT_POW2 2
-#else /* 64 bit unsigned32 types */
-#define sint dw
-#define lint dw
-#define stackadd daddiu
-#define intadd daddu
-#define SZ_INT 8
-#define SZ_INT_POW2 3
-#endif
-
-#ifdef __GNUC__
-#define EXTERN(x,size) .extern x,size
-#else
-#define EXTERN(x,size)
-#endif
-
-/* NOTE: these constants must match the Context_Control structure in cpu.h */
-#define S0_OFFSET 0
-#define S1_OFFSET 1
-#define S2_OFFSET 2
-#define S3_OFFSET 3
-#define S4_OFFSET 4
-#define S5_OFFSET 5
-#define S6_OFFSET 6
-#define S7_OFFSET 7
-#define SP_OFFSET 8
-#define FP_OFFSET 9
-#define RA_OFFSET 10
-#define C0_SR_OFFSET 11
-#define C0_EPC_OFFSET 12
-
-/* NOTE: these constants must match the Context_Control_fp structure in cpu.h */
-#define FP0_OFFSET 0
-#define FP1_OFFSET 1
-#define FP2_OFFSET 2
-#define FP3_OFFSET 3
-#define FP4_OFFSET 4
-#define FP5_OFFSET 5
-#define FP6_OFFSET 6
-#define FP7_OFFSET 7
-#define FP8_OFFSET 8
-#define FP9_OFFSET 9
-#define FP10_OFFSET 10
-#define FP11_OFFSET 11
-#define FP12_OFFSET 12
-#define FP13_OFFSET 13
-#define FP14_OFFSET 14
-#define FP15_OFFSET 15
-#define FP16_OFFSET 16
-#define FP17_OFFSET 17
-#define FP18_OFFSET 18
-#define FP19_OFFSET 19
-#define FP20_OFFSET 20
-#define FP21_OFFSET 21
-#define FP22_OFFSET 22
-#define FP23_OFFSET 23
-#define FP24_OFFSET 24
-#define FP25_OFFSET 25
-#define FP26_OFFSET 26
-#define FP27_OFFSET 27
-#define FP28_OFFSET 28
-#define FP29_OFFSET 29
-#define FP30_OFFSET 30
-#define FP31_OFFSET 31
-
-
-/*PAGE
- *
- * _CPU_ISR_Get_level
- */
-
-#if 0
-unsigned32 _CPU_ISR_Get_level( void )
-{
- /*
- * This routine returns the current interrupt level.
- */
-}
-#endif
-/* return the current exception level for the 4650 */
-FRAME(_CPU_ISR_Get_level,sp,0,ra)
- mfc0 v0,C0_SR
- nop
- andi v0,SR_EXL
- srl v0,1
- j ra
-ENDFRAME(_CPU_ISR_Get_level)
-
-FRAME(_CPU_ISR_Set_level,sp,0,ra)
- nop
- mfc0 v0,C0_SR
- nop
- andi v0,SR_EXL
- beqz v0,_CPU_ISR_Set_1 /* normalize v0 */
- nop
- li v0,1
-_CPU_ISR_Set_1:
- beq v0,a0,_CPU_ISR_Set_exit /* if (current_level != new_level ) */
- nop
- bnez a0,_CPU_ISR_Set_2
- nop
- nop
- mfc0 t0,C0_SR
- nop
- li t1,~SR_EXL
- and t0,t1
- nop
- mtc0 t0,C0_SR /* disable exception level */
- nop
- j ra
- nop
-_CPU_ISR_Set_2:
- nop
- mfc0 t0,C0_SR
- nop
- li t1,~SR_IE
- and t0,t1
- nop
- mtc0 t0,C0_SR /* first disable ie bit (recommended) */
- nop
- ori t0,SR_EXL|SR_IE /* enable exception level */
- nop
- mtc0 t0,C0_SR
- nop
-_CPU_ISR_Set_exit:
- j ra
- nop
-ENDFRAME(_CPU_ISR_Set_level)
-
-/*
- * _CPU_Context_save_fp_context
- *
- * This routine is responsible for saving the FP context
- * at *fp_context_ptr. If the point to load the FP context
- * from is changed then the pointer is modified by this routine.
- *
- * Sometimes a macro implementation of this is in cpu.h which dereferences
- * the ** and a similarly named routine in this file is passed something
- * like a (Context_Control_fp *). The general rule on making this decision
- * is to avoid writing assembly language.
- */
-
-/* void _CPU_Context_save_fp(
- * void **fp_context_ptr
- * )
- * {
- * }
- */
-
-FRAME(_CPU_Context_save_fp,sp,0,ra)
- .set noat
- ld a1,(a0)
- swc1 $f0,FP0_OFFSET*4(a1)
- swc1 $f1,FP1_OFFSET*4(a1)
- swc1 $f2,FP2_OFFSET*4(a1)
- swc1 $f3,FP3_OFFSET*4(a1)
- swc1 $f4,FP4_OFFSET*4(a1)
- swc1 $f5,FP5_OFFSET*4(a1)
- swc1 $f6,FP6_OFFSET*4(a1)
- swc1 $f7,FP7_OFFSET*4(a1)
- swc1 $f8,FP8_OFFSET*4(a1)
- swc1 $f9,FP9_OFFSET*4(a1)
- swc1 $f10,FP10_OFFSET*4(a1)
- swc1 $f11,FP11_OFFSET*4(a1)
- swc1 $f12,FP12_OFFSET*4(a1)
- swc1 $f13,FP13_OFFSET*4(a1)
- swc1 $f14,FP14_OFFSET*4(a1)
- swc1 $f15,FP15_OFFSET*4(a1)
- swc1 $f16,FP16_OFFSET*4(a1)
- swc1 $f17,FP17_OFFSET*4(a1)
- swc1 $f18,FP18_OFFSET*4(a1)
- swc1 $f19,FP19_OFFSET*4(a1)
- swc1 $f20,FP20_OFFSET*4(a1)
- swc1 $f21,FP21_OFFSET*4(a1)
- swc1 $f22,FP22_OFFSET*4(a1)
- swc1 $f23,FP23_OFFSET*4(a1)
- swc1 $f24,FP24_OFFSET*4(a1)
- swc1 $f25,FP25_OFFSET*4(a1)
- swc1 $f26,FP26_OFFSET*4(a1)
- swc1 $f27,FP27_OFFSET*4(a1)
- swc1 $f28,FP28_OFFSET*4(a1)
- swc1 $f29,FP29_OFFSET*4(a1)
- swc1 $f30,FP30_OFFSET*4(a1)
- swc1 $f31,FP31_OFFSET*4(a1)
- j ra
- nop
- .set at
-ENDFRAME(_CPU_Context_save_fp)
-
-/*
- * _CPU_Context_restore_fp_context
- *
- * This routine is responsible for restoring the FP context
- * at *fp_context_ptr. If the point to load the FP context
- * from is changed then the pointer is modified by this routine.
- *
- * Sometimes a macro implementation of this is in cpu.h which dereferences
- * the ** and a similarly named routine in this file is passed something
- * like a (Context_Control_fp *). The general rule on making this decision
- * is to avoid writing assembly language.
- */
-
-/* void _CPU_Context_restore_fp(
- * void **fp_context_ptr
- * )
- * {
- * }
- */
-
-FRAME(_CPU_Context_restore_fp,sp,0,ra)
- .set noat
- ld a1,(a0)
- lwc1 $f0,FP0_OFFSET*4(a1)
- lwc1 $f1,FP1_OFFSET*4(a1)
- lwc1 $f2,FP2_OFFSET*4(a1)
- lwc1 $f3,FP3_OFFSET*4(a1)
- lwc1 $f4,FP4_OFFSET*4(a1)
- lwc1 $f5,FP5_OFFSET*4(a1)
- lwc1 $f6,FP6_OFFSET*4(a1)
- lwc1 $f7,FP7_OFFSET*4(a1)
- lwc1 $f8,FP8_OFFSET*4(a1)
- lwc1 $f9,FP9_OFFSET*4(a1)
- lwc1 $f10,FP10_OFFSET*4(a1)
- lwc1 $f11,FP11_OFFSET*4(a1)
- lwc1 $f12,FP12_OFFSET*4(a1)
- lwc1 $f13,FP13_OFFSET*4(a1)
- lwc1 $f14,FP14_OFFSET*4(a1)
- lwc1 $f15,FP15_OFFSET*4(a1)
- lwc1 $f16,FP16_OFFSET*4(a1)
- lwc1 $f17,FP17_OFFSET*4(a1)
- lwc1 $f18,FP18_OFFSET*4(a1)
- lwc1 $f19,FP19_OFFSET*4(a1)
- lwc1 $f20,FP20_OFFSET*4(a1)
- lwc1 $f21,FP21_OFFSET*4(a1)
- lwc1 $f22,FP22_OFFSET*4(a1)
- lwc1 $f23,FP23_OFFSET*4(a1)
- lwc1 $f24,FP24_OFFSET*4(a1)
- lwc1 $f25,FP25_OFFSET*4(a1)
- lwc1 $f26,FP26_OFFSET*4(a1)
- lwc1 $f27,FP27_OFFSET*4(a1)
- lwc1 $f28,FP28_OFFSET*4(a1)
- lwc1 $f29,FP29_OFFSET*4(a1)
- lwc1 $f30,FP30_OFFSET*4(a1)
- lwc1 $f31,FP31_OFFSET*4(a1)
- j ra
- nop
- .set at
-ENDFRAME(_CPU_Context_restore_fp)
-
-/* _CPU_Context_switch
- *
- * This routine performs a normal non-FP context switch.
- */
-
-/* void _CPU_Context_switch(
- * Context_Control *run,
- * Context_Control *heir
- * )
- * {
- * }
- */
-
-FRAME(_CPU_Context_switch,sp,0,ra)
-
- mfc0 t0,C0_SR
- li t1,~SR_IE
- sd t0,C0_SR_OFFSET*8(a0) /* save status register */
- and t0,t1
- mtc0 t0,C0_SR /* first disable ie bit (recommended) */
- ori t0,SR_EXL|SR_IE /* enable exception level to disable interrupts */
- mtc0 t0,C0_SR
-
- sd ra,RA_OFFSET*8(a0) /* save current context */
- sd sp,SP_OFFSET*8(a0)
- sd fp,FP_OFFSET*8(a0)
- sd s0,S0_OFFSET*8(a0)
- sd s1,S1_OFFSET*8(a0)
- sd s2,S2_OFFSET*8(a0)
- sd s3,S3_OFFSET*8(a0)
- sd s4,S4_OFFSET*8(a0)
- sd s5,S5_OFFSET*8(a0)
- sd s6,S6_OFFSET*8(a0)
- sd s7,S7_OFFSET*8(a0)
- dmfc0 t0,C0_EPC
- sd t0,C0_EPC_OFFSET*8(a0)
-
-_CPU_Context_switch_restore:
- ld s0,S0_OFFSET*8(a1) /* restore context */
- ld s1,S1_OFFSET*8(a1)
- ld s2,S2_OFFSET*8(a1)
- ld s3,S3_OFFSET*8(a1)
- ld s4,S4_OFFSET*8(a1)
- ld s5,S5_OFFSET*8(a1)
- ld s6,S6_OFFSET*8(a1)
- ld s7,S7_OFFSET*8(a1)
- ld fp,FP_OFFSET*8(a1)
- ld sp,SP_OFFSET*8(a1)
- ld ra,RA_OFFSET*8(a1)
- ld t0,C0_EPC_OFFSET*8(a1)
- dmtc0 t0,C0_EPC
- ld t0,C0_SR_OFFSET*8(a1)
- andi t0,SR_EXL
- bnez t0,_CPU_Context_1 /* set exception level from restore context */
- li t0,~SR_EXL
- mfc0 t1,C0_SR
- nop
- and t1,t0
- mtc0 t1,C0_SR
-_CPU_Context_1:
- j ra
- nop
-ENDFRAME(_CPU_Context_switch)
-
-/*
- * _CPU_Context_restore
- *
- * This routine is generally used only to restart self in an
- * efficient manner. It may simply be a label in _CPU_Context_switch.
- *
- * NOTE: May be unnecessary to reload some registers.
- */
-
-#if 0
-void _CPU_Context_restore(
- Context_Control *new_context
-)
-{
-}
-#endif
-
-FRAME(_CPU_Context_restore,sp,0,ra)
- dadd a1,a0,zero
- j _CPU_Context_switch_restore
- nop
-ENDFRAME(_CPU_Context_restore)
-
-EXTERN(_ISR_Nest_level, SZ_INT)
-EXTERN(_Thread_Dispatch_disable_level,SZ_INT)
-EXTERN(_Context_Switch_necessary,SZ_INT)
-EXTERN(_ISR_Signals_to_thread_executing,SZ_INT)
-.extern _Thread_Dispatch
-.extern _ISR_Vector_table
-
-/* void __ISR_Handler()
- *
- * This routine provides the RTEMS interrupt management.
- *
- */
-
-#if 0
-void _ISR_Handler()
-{
- /*
- * This discussion ignores a lot of the ugly details in a real
- * implementation such as saving enough registers/state to be
- * able to do something real. Keep in mind that the goal is
- * to invoke a user's ISR handler which is written in C and
- * uses a certain set of registers.
- *
- * Also note that the exact order is to a large extent flexible.
- * Hardware will dictate a sequence for a certain subset of
- * _ISR_Handler while requirements for setting
- */
-
- /*
- * At entry to "common" _ISR_Handler, the vector number must be
- * available. On some CPUs the hardware puts either the vector
- * number or the offset into the vector table for this ISR in a
- * known place. If the hardware does not give us this information,
- * then the assembly portion of RTEMS for this port will contain
- * a set of distinct interrupt entry points which somehow place
- * the vector number in a known place (which is safe if another
- * interrupt nests this one) and branches to _ISR_Handler.
- *
- */
-#endif
-FRAME(_ISR_Handler,sp,0,ra)
-.set noreorder
-#if USE_IDTKIT
-/* IDT/Kit incorrectly adds 4 to EPC before returning. This compensates */
- lreg k0, R_EPC*R_SZ(sp)
- daddiu k0,k0,-4
- sreg k0, R_EPC*R_SZ(sp)
- lreg k0, R_CAUSE*R_SZ(sp)
- li k1, ~CAUSE_BD
- and k0, k1
- sreg k0, R_CAUSE*R_SZ(sp)
-#endif
-
-/* save registers not already saved by IDT/sim */
- stackadd sp,sp,-EXCP_STACK_SIZE /* store ra on the stack */
-
- sreg ra, R_RA*R_SZ(sp)
- sreg v0, R_V0*R_SZ(sp)
- sreg v1, R_V1*R_SZ(sp)
- sreg a0, R_A0*R_SZ(sp)
- sreg a1, R_A1*R_SZ(sp)
- sreg a2, R_A2*R_SZ(sp)
- sreg a3, R_A3*R_SZ(sp)
- sreg t0, R_T0*R_SZ(sp)
- sreg t1, R_T1*R_SZ(sp)
- sreg t2, R_T2*R_SZ(sp)
- sreg t3, R_T3*R_SZ(sp)
- sreg t4, R_T4*R_SZ(sp)
- sreg t5, R_T5*R_SZ(sp)
- sreg t6, R_T6*R_SZ(sp)
- sreg t7, R_T7*R_SZ(sp)
- mflo k0
- sreg t8, R_T8*R_SZ(sp)
- sreg k0, R_MDLO*R_SZ(sp)
- sreg t9, R_T9*R_SZ(sp)
- mfhi k0
- sreg gp, R_GP*R_SZ(sp)
- sreg fp, R_FP*R_SZ(sp)
- sreg k0, R_MDHI*R_SZ(sp)
- .set noat
- sreg AT, R_AT*R_SZ(sp)
- .set at
-
- stackadd sp,sp,-40 /* store ra on the stack */
- sd ra,32(sp)
-
-/* determine if an interrupt generated this exception */
- mfc0 k0,C0_CAUSE
- and k1,k0,CAUSE_EXCMASK
- bnez k1,_ISR_Handler_prom_exit /* not an external interrupt, pass exception to Monitor */
- mfc0 k1,C0_SR
- and k0,k1
- and k0,CAUSE_IPMASK
- beq k0,zero,_ISR_Handler_quick_exit /* external interrupt not enabled, ignore */
- nop
-
- /*
- * save some or all context on stack
- * may need to save some special interrupt information for exit
- *
- * #if ( CPU_HAS_SOFTWARE_INTERRUPT_STACK == TRUE )
- * if ( _ISR_Nest_level == 0 )
- * switch to software interrupt stack
- * #endif
- */
-#if ( CPU_HAS_SOFTWARE_INTERRUPT_STACK == TRUE )
- lint t0,_ISR_Nest_level
- beq t0, zero, _ISR_Handler_1
- nop
- /* switch stacks */
-_ISR_Handler_1:
-#else
- lint t0,_ISR_Nest_level
-#endif
- /*
- * _ISR_Nest_level++;
- */
- addi t0,t0,1
- sint t0,_ISR_Nest_level
- /*
- * _Thread_Dispatch_disable_level++;
- */
- lint t1,_Thread_Dispatch_disable_level
- addi t1,t1,1
- sint t1,_Thread_Dispatch_disable_level
-#if 0
- nop
- j _ISR_Handler_4
- nop
- /*
- * while ( interrupts_pending(cause_reg) ) {
- * vector = BITFIELD_TO_INDEX(cause_reg);
- * (*_ISR_Vector_table[ vector ])( vector );
- * }
- */
-_ISR_Handler_2:
-/* software interrupt priorities can be applied here */
- li t1,-1
-/* convert bit field into interrupt index */
-_ISR_Handler_3:
- andi t2,t0,1
- addi t1,1
- beql t2,zero,_ISR_Handler_3
- dsrl t0,1
- li t1,7
- dsll t1,3 /* convert index to byte offset (*8) */
- la t3,_ISR_Vector_table
- intadd t1,t3
- lint t1,(t1)
- jalr t1
- nop
- j _ISR_Handler_5
- nop
-_ISR_Handler_4:
- mfc0 t0,C0_CAUSE
- andi t0,CAUSE_IPMASK
- bne t0,zero,_ISR_Handler_2
- dsrl t0,t0,8
-_ISR_Handler_5:
-#else
- nop
- li t1,7
- dsll t1,t1,SZ_INT_POW2
- la t3,_ISR_Vector_table
- intadd t1,t3
- lint t1,(t1)
- jalr t1
- nop
-#endif
- /*
- * --_ISR_Nest_level;
- */
- lint t2,_ISR_Nest_level
- addi t2,t2,-1
- sint t2,_ISR_Nest_level
- /*
- * --_Thread_Dispatch_disable_level;
- */
- lint t1,_Thread_Dispatch_disable_level
- addi t1,t1,-1
- sint t1,_Thread_Dispatch_disable_level
- /*
- * if ( _Thread_Dispatch_disable_level || _ISR_Nest_level )
- * goto the label "exit interrupt (simple case)"
- */
- or t0,t2,t1
- bne t0,zero,_ISR_Handler_exit
- nop
- /*
- * #if ( CPU_HAS_SOFTWARE_INTERRUPT_STACK == TRUE )
- * restore stack
- * #endif
- *
- * if ( !_Context_Switch_necessary && !_ISR_Signals_to_thread_executing )
- * goto the label "exit interrupt (simple case)"
- */
- lint t0,_Context_Switch_necessary
- lint t1,_ISR_Signals_to_thread_executing
- or t0,t0,t1
- beq t0,zero,_ISR_Handler_exit
- nop
-
- /*
- * call _Thread_Dispatch() or prepare to return to _ISR_Dispatch
- */
- jal _Thread_Dispatch
- nop
- /*
- * prepare to get out of interrupt
- * return from interrupt (maybe to _ISR_Dispatch)
- *
- * LABEL "exit interrupt (simple case):
- * prepare to get out of interrupt
- * return from interrupt
- */
-_ISR_Handler_exit:
- ld ra,32(sp)
- stackadd sp,sp,40
-
-/* restore interrupt context from stack */
- lreg k0, R_MDLO*R_SZ(sp)
- mtlo k0
- lreg k0, R_MDHI*R_SZ(sp)
- lreg a2, R_A2*R_SZ(sp)
- mthi k0
- lreg a3, R_A3*R_SZ(sp)
- lreg t0, R_T0*R_SZ(sp)
- lreg t1, R_T1*R_SZ(sp)
- lreg t2, R_T2*R_SZ(sp)
- lreg t3, R_T3*R_SZ(sp)
- lreg t4, R_T4*R_SZ(sp)
- lreg t5, R_T5*R_SZ(sp)
- lreg t6, R_T6*R_SZ(sp)
- lreg t7, R_T7*R_SZ(sp)
- lreg t8, R_T8*R_SZ(sp)
- lreg t9, R_T9*R_SZ(sp)
- lreg gp, R_GP*R_SZ(sp)
- lreg fp, R_FP*R_SZ(sp)
- lreg ra, R_RA*R_SZ(sp)
- lreg a0, R_A0*R_SZ(sp)
- lreg a1, R_A1*R_SZ(sp)
- lreg v1, R_V1*R_SZ(sp)
- lreg v0, R_V0*R_SZ(sp)
- .set noat
- lreg AT, R_AT*R_SZ(sp)
- .set at
-
- stackadd sp,sp,EXCP_STACK_SIZE /* store ra on the stack */
-
-#if USE_IDTKIT
-/* we handled exception, so return non-zero value */
- li v0,1
-#endif
-
-_ISR_Handler_quick_exit:
-#ifdef USE_IDTKIT
- j ra
-#else
- eret
-#endif
- nop
-
-_ISR_Handler_prom_exit:
-#ifdef CPU_R3000
- la k0, (R_VEC+((48)*8))
-#endif
-
-#ifdef CPU_R4000
- la k0, (R_VEC+((112)*8)) /* R4000 Sim's location is different */
-#endif
- j k0
- nop
-
- .set reorder
-
-ENDFRAME(_ISR_Handler)
-
-
-FRAME(mips_enable_interrupts,sp,0,ra)
- mfc0 t0,C0_SR /* get status reg */
- nop
- or t0,t0,a0
- mtc0 t0,C0_SR /* save updated status reg */
- j ra
- nop
-ENDFRAME(mips_enable_interrupts)
-
-FRAME(mips_disable_interrupts,sp,0,ra)
- mfc0 v0,C0_SR /* get status reg */
- li t1,SR_IMASK /* t1 = load interrupt mask word */
- not t0,t1 /* t0 = ~t1 */
- and t0,v0 /* clear imask bits */
- mtc0 t0,C0_SR /* save status reg */
- and v0,t1 /* mask return value (only return imask bits) */
- jr ra
- nop
-ENDFRAME(mips_disable_interrupts)
-
-FRAME(mips_enable_global_interrupts,sp,0,ra)
- mfc0 t0,C0_SR /* get status reg */
- nop
- ori t0,SR_IE
- mtc0 t0,C0_SR /* save updated status reg */
- j ra
- nop
-ENDFRAME(mips_enable_global_interrupts)
-
-FRAME(mips_disable_global_interrupts,sp,0,ra)
- li t1,SR_IE
- mfc0 t0,C0_SR /* get status reg */
- not t1
- and t0,t1
- mtc0 t0,C0_SR /* save updated status reg */
- j ra
- nop
-ENDFRAME(mips_disable_global_interrupts)
-
-/* return the value of the status register in v0. Used for debugging */
-FRAME(mips_get_sr,sp,0,ra)
- mfc0 v0,C0_SR
- j ra
- nop
-ENDFRAME(mips_get_sr)
-
-FRAME(mips_break,sp,0,ra)
-#if 1
- break 0x0
- j mips_break
-#else
- j ra
-#endif
- nop
-ENDFRAME(mips_break)
-
-/*PAGE
- *
- * _CPU_Internal_threads_Idle_thread_body
- *
- * NOTES:
- *
- * 1. This is the same as the regular CPU independent algorithm.
- *
- * 2. If you implement this using a "halt", "idle", or "shutdown"
- * instruction, then don't forget to put it in an infinite loop.
- *
- * 3. Be warned. Some processors with onboard DMA have been known
- * to stop the DMA if the CPU were put in IDLE mode. This might
- * also be a problem with other on-chip peripherals. So use this
- * hook with caution.
- */
-
-FRAME(_CPU_Thread_Idle_body,sp,0,ra)
- wait /* enter low power mode */
- j _CPU_Thread_Idle_body
- nop
-ENDFRAME(_CPU_Thread_Idle_body)
-
-#define VEC_CODE_LENGTH 10*4
-
-/**************************************************************************
-**
-** init_exc_vecs() - moves the exception code into the addresses
-** reserved for exception vectors
-**
-** UTLB Miss exception vector at address 0x80000000
-**
-** General exception vector at address 0x80000080
-**
-** RESET exception vector is at address 0xbfc00000
-**
-***************************************************************************/
-
-#define INITEXCFRM ((2*4)+4) /* ra + 2 arguments */
-FRAME(init_exc_vecs,sp,0,ra)
-/* This code yanked from SIM */
-#if defined(CPU_R3000)
- .set noreorder
- la t1,exc_utlb_code
- la t2,exc_norm_code
- li t3,UT_VEC
- li t4,E_VEC
- li t5,VEC_CODE_LENGTH
-1:
- lw t6,0(t1)
- lw t7,0(t2)
- sw t6,0(t3)
- sw t7,0(t4)
- addiu t1,4
- addiu t3,4
- addiu t4,4
- subu t5,4
- bne t5,zero,1b
- addiu t2,4
- move t5,ra # assumes clear_cache doesnt use t5
- li a0,UT_VEC
- jal clear_cache
- li a1,VEC_CODE_LENGTH
- nop
- li a0,E_VEC
- jal clear_cache
- li a1,VEC_CODE_LENGTH
- move ra,t5 # restore ra
- j ra
- nop
- .set reorder
-#endif
-#if defined(CPU_R4000)
- .set reorder
- move t5,ra # assumes clear_cache doesnt use t5
-
- /* TLB exception vector */
- la t1,exc_tlb_code
- li t2,T_VEC |K1BASE
- li t3,VEC_CODE_LENGTH
-1:
- lw t6,0(t1)
- addiu t1,4
- subu t3,4
- sw t6,0(t2)
- addiu t2,4
- bne t3,zero,1b
-
- li a0,T_VEC
- li a1,VEC_CODE_LENGTH
- jal clear_cache
-
- la t1,exc_xtlb_code
- li t2,X_VEC |K1BASE
- li t3,VEC_CODE_LENGTH
-1:
- lw t6,0(t1)
- addiu t1,4
- subu t3,4
- sw t6,0(t2)
- addiu t2,4
- bne t3,zero,1b
-
- /* extended TLB exception vector */
- li a0,X_VEC
- li a1,VEC_CODE_LENGTH
- jal clear_cache
-
- /* cache error exception vector */
- la t1,exc_cache_code
- li t2,C_VEC |K1BASE
- li t3,VEC_CODE_LENGTH
-1:
- lw t6,0(t1)
- addiu t1,4
- subu t3,4
- sw t6,0(t2)
- addiu t2,4
- bne t3,zero,1b
-
- li a0,C_VEC
- li a1,VEC_CODE_LENGTH
- jal clear_cache
-
- /* normal exception vector */
- la t1,exc_norm_code
- li t2,E_VEC |K1BASE
- li t3,VEC_CODE_LENGTH
-1:
- lw t6,0(t1)
- addiu t1,4
- subu t3,4
- sw t6,0(t2)
- addiu t2,4
- bne t3,zero,1b
-
- li a0,E_VEC
- li a1,VEC_CODE_LENGTH
- jal clear_cache
-
- move ra,t5 # restore ra
- j ra
-#endif
-ENDFRAME(init_exc_vecs)
-
-
-#if defined(CPU_R4000)
-FRAME(exc_tlb_code,sp,0,ra)
-#ifdef CPU_R3000
- la k0, (R_VEC+((48)*8))
-#endif
-
-#ifdef CPU_R4000
- la k0, (R_VEC+((112)*8)) /* R4000 Sim's location is different */
-#endif
- j k0
- nop
-
-ENDFRAME(exc_tlb_code)
-
-
-FRAME(exc_xtlb_code,sp,0,ra)
-#ifdef CPU_R3000
- la k0, (R_VEC+((48)*8))
-#endif
-
-#ifdef CPU_R4000
- la k0, (R_VEC+((112)*8)) /* R4000 Sim's location is different */
-#endif
- j k0
- nop
-
-ENDFRAME(exc_xtlb_code)
-
-
-FRAME(exc_cache_code,sp,0,ra)
-#ifdef CPU_R3000
- la k0, (R_VEC+((48)*8))
-#endif
-
-#ifdef CPU_R4000
- la k0, (R_VEC+((112)*8)) /* R4000 Sim's location is different */
-#endif
- j k0
- nop
-
-ENDFRAME(exc_cache_code)
-
-
-FRAME(exc_norm_code,sp,0,ra)
- la k0, _ISR_Handler /* generic external int hndlr */
- j k0
- nop
- subu sp, EXCP_STACK_SIZE /* set up local stack frame */
-ENDFRAME(exc_norm_code)
-#endif
-
-/**************************************************************************
-**
-** enable_int(mask) - enables interrupts - mask is positioned so it only
-** needs to be or'ed into the status reg. This
-** also does some other things !!!! caution should
-** be used if invoking this while in the middle
-** of a debugging session where the client may have
-** nested interrupts.
-**
-****************************************************************************/
-FRAME(enable_int,sp,0,ra)
- .set noreorder
- mfc0 t0,C0_SR
- or a0,1
- or t0,a0
- mtc0 t0,C0_SR
- j ra
- nop
- .set reorder
-ENDFRAME(enable_int)
-
-
-/***************************************************************************
-**
-** disable_int(mask) - disable the interrupt - mask is the complement
-** of the bits to be cleared - i.e. to clear ext int
-** 5 the mask would be - 0xffff7fff
-**
-****************************************************************************/
-FRAME(disable_int,sp,0,ra)
- .set noreorder
- mfc0 t0,C0_SR
- nop
- and t0,a0
- mtc0 t0,C0_SR
- j ra
- nop
-ENDFRAME(disable_int)
-
-
diff --git a/c/src/exec/score/cpu/mips/cpu_asm.h b/c/src/exec/score/cpu/mips/cpu_asm.h
deleted file mode 100644
index 287b881068..0000000000
--- a/c/src/exec/score/cpu/mips/cpu_asm.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * cpu_asm.h
- *
- * Author: Craig Lebakken <craigl@transition.com>
- *
- * COPYRIGHT (c) 1996 by Transition Networks Inc.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Transition Networks not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * Transition Networks makes no representations about the suitability
- * of this software for any purpose.
- *
- * Derived from c/src/exec/score/cpu/no_cpu/cpu_asm.h:
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- *
- */
-/* @(#)cpu_asm.h 08/20/96 1.2 */
-
-#ifndef __CPU_ASM_h
-#define __CPU_ASM_h
-
-/* pull in the generated offsets */
-
-/* #include <rtems/score/offsets.h> */
-
-/*
- * Hardware General Registers
- */
-
-/* put something here */
-
-/*
- * Hardware Floating Point Registers
- */
-
-#define R_FP0 0
-#define R_FP1 1
-#define R_FP2 2
-#define R_FP3 3
-#define R_FP4 4
-#define R_FP5 5
-#define R_FP6 6
-#define R_FP7 7
-#define R_FP8 8
-#define R_FP9 9
-#define R_FP10 10
-#define R_FP11 11
-#define R_FP12 12
-#define R_FP13 13
-#define R_FP14 14
-#define R_FP15 15
-#define R_FP16 16
-#define R_FP17 17
-#define R_FP18 18
-#define R_FP19 19
-#define R_FP20 20
-#define R_FP21 21
-#define R_FP22 22
-#define R_FP23 23
-#define R_FP24 24
-#define R_FP25 25
-#define R_FP26 26
-#define R_FP27 27
-#define R_FP28 28
-#define R_FP29 29
-#define R_FP30 30
-#define R_FP31 31
-
-/*
- * Hardware Control Registers
- */
-
-/* put something here */
-
-/*
- * Calling Convention
- */
-
-/* put something here */
-
-/*
- * Temporary registers
- */
-
-/* put something here */
-
-/*
- * Floating Point Registers - SW Conventions
- */
-
-/* put something here */
-
-/*
- * Temporary floating point registers
- */
-
-/* put something here */
-
-#endif
-
-/* end of file */
diff --git a/c/src/exec/score/cpu/mips/idtcpu.h b/c/src/exec/score/cpu/mips/idtcpu.h
deleted file mode 100644
index f921e85ef6..0000000000
--- a/c/src/exec/score/cpu/mips/idtcpu.h
+++ /dev/null
@@ -1,440 +0,0 @@
-/*
-
-Based upon IDT provided code with the following release:
-
-This source code has been made available to you by IDT on an AS-IS
-basis. Anyone receiving this source is licensed under IDT copyrights
-to use it in any way he or she deems fit, including copying it,
-modifying it, compiling it, and redistributing it either with or
-without modifications. No license under IDT patents or patent
-applications is to be implied by the copyright license.
-
-Any user of this software should understand that IDT cannot provide
-technical support for this software and will not be responsible for
-any consequences resulting from the use of this software.
-
-Any person who transfers this source code or any derivative work must
-include the IDT copyright notice, this paragraph, and the preceeding
-two paragraphs in the transferred software.
-
-COPYRIGHT IDT CORPORATION 1996
-LICENSED MATERIAL - PROGRAM PROPERTY OF IDT
-
- $Id$
-*/
-
-/*
-** idtcpu.h -- cpu related defines
-*/
-
-#ifndef _IDTCPU_H__
-#define _IDTCPU_H__
-
-/*
- * 950313: Ketan added Register definition for XContext reg.
- * added define for WAIT instruction.
- * 950421: Ketan added Register definition for Config reg (R3081)
- */
-
-/*
-** memory configuration and mapping
-*/
-#define K0BASE 0x80000000
-#define K0SIZE 0x20000000
-#define K1BASE 0xa0000000
-#define K1SIZE 0x20000000
-#define K2BASE 0xc0000000
-#define K2SIZE 0x20000000
-#if defined(CPU_R4000)
-#define KSBASE 0xe0000000
-#define KSSIZE 0x20000000
-#endif
-
-#define KUBASE 0
-#define KUSIZE 0x80000000
-
-/*
-** Exception Vectors
-*/
-#if defined(CPU_R3000)
-#define UT_VEC K0BASE /* utlbmiss vector */
-#define E_VEC (K0BASE+0x80) /* exception vevtor */
-#endif
-#if defined(CPU_R4000)
-#define T_VEC (K0BASE+0x000) /* tlbmiss vector */
-#define X_VEC (K0BASE+0x080) /* xtlbmiss vector */
-#define C_VEC (K0BASE+0x100) /* cache error vector */
-#define E_VEC (K0BASE+0x180) /* exception vector */
-#endif
-#define R_VEC (K1BASE+0x1fc00000) /* reset vector */
-
-/*
-** Address conversion macros
-*/
-#ifdef CLANGUAGE
-#define CAST(as) (as)
-#else
-#define CAST(as)
-#endif
-#define K0_TO_K1(x) (CAST(unsigned)(x)|0xA0000000) /* kseg0 to kseg1 */
-#define K1_TO_K0(x) (CAST(unsigned)(x)&0x9FFFFFFF) /* kseg1 to kseg0 */
-#define K0_TO_PHYS(x) (CAST(unsigned)(x)&0x1FFFFFFF) /* kseg0 to physical */
-#define K1_TO_PHYS(x) (CAST(unsigned)(x)&0x1FFFFFFF) /* kseg1 to physical */
-#define PHYS_TO_K0(x) (CAST(unsigned)(x)|0x80000000) /* physical to kseg0 */
-#define PHYS_TO_K1(x) (CAST(unsigned)(x)|0xA0000000) /* physical to kseg1 */
-
-/*
-** Cache size constants
-*/
-#define MINCACHE 0x200 /* 512 For 3041. */
-#define MAXCACHE 0x40000 /* 256*1024 256k */
-
-#if defined(CPU_R4000)
-/* R4000 configuration register definitions */
-#define CFG_CM 0x80000000 /* Master-Checker mode */
-#define CFG_ECMASK 0x70000000 /* System Clock Ratio */
-#define CFG_ECBY2 0x00000000 /* divide by 2 */
-#define CFG_ECBY3 0x10000000 /* divide by 3 */
-#define CFG_ECBY4 0x20000000 /* divide by 4 */
-#define CFG_EPMASK 0x0f000000 /* Transmit data pattern */
-#define CFG_EPD 0x00000000 /* D */
-#define CFG_EPDDX 0x01000000 /* DDX */
-#define CFG_EPDDXX 0x02000000 /* DDXX */
-#define CFG_EPDXDX 0x03000000 /* DXDX */
-#define CFG_EPDDXXX 0x04000000 /* DDXXX */
-#define CFG_EPDDXXXX 0x05000000 /* DDXXXX */
-#define CFG_EPDXXDXX 0x06000000 /* DXXDXX */
-#define CFG_EPDDXXXXX 0x07000000 /* DDXXXXX */
-#define CFG_EPDXXXDXXX 0x08000000 /* DXXXDXXX */
-#define CFG_SBMASK 0x00c00000 /* Secondary cache block size */
-#define CFG_SBSHIFT 22
-#define CFG_SB4 0x00000000 /* 4 words */
-#define CFG_SB8 0x00400000 /* 8 words */
-#define CFG_SB16 0x00800000 /* 16 words */
-#define CFG_SB32 0x00c00000 /* 32 words */
-#define CFG_SS 0x00200000 /* Split secondary cache */
-#define CFG_SW 0x00100000 /* Secondary cache port width */
-#define CFG_EWMASK 0x000c0000 /* System port width */
-#define CFG_EWSHIFT 18
-#define CFG_EW64 0x00000000 /* 64 bit */
-#define CFG_EW32 0x00010000 /* 32 bit */
-#define CFG_SC 0x00020000 /* Secondary cache absent */
-#define CFG_SM 0x00010000 /* Dirty Shared mode disabled */
-#define CFG_BE 0x00008000 /* Big Endian */
-#define CFG_EM 0x00004000 /* ECC mode enable */
-#define CFG_EB 0x00002000 /* Block ordering */
-#define CFG_ICMASK 0x00000e00 /* Instruction cache size */
-#define CFG_ICSHIFT 9
-#define CFG_DCMASK 0x000001c0 /* Data cache size */
-#define CFG_DCSHIFT 6
-#define CFG_IB 0x00000020 /* Instruction cache block size */
-#define CFG_DB 0x00000010 /* Data cache block size */
-#define CFG_CU 0x00000008 /* Update on Store Conditional */
-#define CFG_K0MASK 0x00000007 /* KSEG0 coherency algorithm */
-
-/*
- * R4000 primary cache mode
- */
-#define CFG_C_UNCACHED 2
-#define CFG_C_NONCOHERENT 3
-#define CFG_C_COHERENTXCL 4
-#define CFG_C_COHERENTXCLW 5
-#define CFG_C_COHERENTUPD 6
-
-/*
- * R4000 cache operations (should be in assembler...?)
- */
-#define Index_Invalidate_I 0x0 /* 0 0 */
-#define Index_Writeback_Inv_D 0x1 /* 0 1 */
-#define Index_Invalidate_SI 0x2 /* 0 2 */
-#define Index_Writeback_Inv_SD 0x3 /* 0 3 */
-#define Index_Load_Tag_I 0x4 /* 1 0 */
-#define Index_Load_Tag_D 0x5 /* 1 1 */
-#define Index_Load_Tag_SI 0x6 /* 1 2 */
-#define Index_Load_Tag_SD 0x7 /* 1 3 */
-#define Index_Store_Tag_I 0x8 /* 2 0 */
-#define Index_Store_Tag_D 0x9 /* 2 1 */
-#define Index_Store_Tag_SI 0xA /* 2 2 */
-#define Index_Store_Tag_SD 0xB /* 2 3 */
-#define Create_Dirty_Exc_D 0xD /* 3 1 */
-#define Create_Dirty_Exc_SD 0xF /* 3 3 */
-#define Hit_Invalidate_I 0x10 /* 4 0 */
-#define Hit_Invalidate_D 0x11 /* 4 1 */
-#define Hit_Invalidate_SI 0x12 /* 4 2 */
-#define Hit_Invalidate_SD 0x13 /* 4 3 */
-#define Hit_Writeback_Inv_D 0x15 /* 5 1 */
-#define Hit_Writeback_Inv_SD 0x17 /* 5 3 */
-#define Fill_I 0x14 /* 5 0 */
-#define Hit_Writeback_D 0x19 /* 6 1 */
-#define Hit_Writeback_SD 0x1B /* 6 3 */
-#define Hit_Writeback_I 0x18 /* 6 0 */
-#define Hit_Set_Virtual_SI 0x1E /* 7 2 */
-#define Hit_Set_Virtual_SD 0x1F /* 7 3 */
-
-#ifndef WAIT
-#define WAIT .word 0x42000020
-#endif WAIT
-
-#ifndef wait
-#define wait .word 0x42000020
-#endif wait
-
-#endif
-
-/*
-** TLB resource defines
-*/
-#if defined(CPU_R3000)
-#define N_TLB_ENTRIES 64
-#define TLB_PGSIZE 0x1000
-#define RANDBASE 8
-#define TLBLO_PFNMASK 0xfffff000
-#define TLBLO_PFNSHIFT 12
-#define TLBLO_N 0x800 /* non-cacheable */
-#define TLBLO_D 0x400 /* writeable */
-#define TLBLO_V 0x200 /* valid bit */
-#define TLBLO_G 0x100 /* global access bit */
-
-#define TLBHI_VPNMASK 0xfffff000
-#define TLBHI_VPNSHIFT 12
-#define TLBHI_PIDMASK 0xfc0
-#define TLBHI_PIDSHIFT 6
-#define TLBHI_NPID 64
-
-#define TLBINX_PROBE 0x80000000
-#define TLBINX_INXMASK 0x00003f00
-#define TLBINX_INXSHIFT 8
-
-#define TLBRAND_RANDMASK 0x00003f00
-#define TLBRAND_RANDSHIFT 8
-
-#define TLBCTXT_BASEMASK 0xffe00000
-#define TLBCTXT_BASESHIFT 21
-
-#define TLBCTXT_VPNMASK 0x001ffffc
-#define TLBCTXT_VPNSHIFT 2
-#endif
-#if defined(CPU_R4000)
-#define N_TLB_ENTRIES 48
-
-#define TLBHI_VPN2MASK 0xffffe000
-#define TLBHI_PIDMASK 0x000000ff
-#define TLBHI_NPID 256
-
-#define TLBLO_PFNMASK 0x3fffffc0
-#define TLBLO_PFNSHIFT 6
-#define TLBLO_D 0x00000004 /* writeable */
-#define TLBLO_V 0x00000002 /* valid bit */
-#define TLBLO_G 0x00000001 /* global access bit */
-#define TLBLO_CMASK 0x00000038 /* cache algorithm mask */
-#define TLBLO_CSHIFT 3
-
-#define TLBLO_UNCACHED (CFG_C_UNCACHED<<TLBLO_CSHIFT)
-#define TLBLO_NONCOHERENT (CFG_C_NONCOHERENT<<TLBLO_CSHIFT)
-#define TLBLO_COHERENTXCL (CFG_C_COHERENTXCL<<TLBLO_CSHIFT)
-#define TLBLO_COHERENTXCLW (CFG_C_COHERENTXCLW<<TLBLO_CSHIFT)
-#define TLBLO_COHERENTUPD (CFG_C_COHERENTUPD<<TLBLO_CSHIFT)
-
-#define TLBINX_PROBE 0x80000000
-#define TLBINX_INXMASK 0x0000003f
-
-#define TLBRAND_RANDMASK 0x0000003f
-
-#define TLBCTXT_BASEMASK 0xff800000
-#define TLBCTXT_BASESHIFT 23
-
-#define TLBCTXT_VPN2MASK 0x007ffff0
-#define TLBCTXT_VPN2SHIFT 4
-
-#define TLBPGMASK_MASK 0x01ffe000
-#endif
-
-#if defined(CPU_R3000)
-#define SR_CUMASK 0xf0000000 /* coproc usable bits */
-#define SR_CU3 0x80000000 /* Coprocessor 3 usable */
-#define SR_CU2 0x40000000 /* Coprocessor 2 usable */
-#define SR_CU1 0x20000000 /* Coprocessor 1 usable */
-#define SR_CU0 0x10000000 /* Coprocessor 0 usable */
-
-#define SR_BEV 0x00400000 /* use boot exception vectors */
-
-/* Cache control bits */
-#define SR_TS 0x00200000 /* TLB shutdown */
-#define SR_PE 0x00100000 /* cache parity error */
-#define SR_CM 0x00080000 /* cache miss */
-#define SR_PZ 0x00040000 /* cache parity zero */
-#define SR_SWC 0x00020000 /* swap cache */
-#define SR_ISC 0x00010000 /* Isolate data cache */
-
-/*
-** status register interrupt masks and bits
-*/
-
-#define SR_IMASK 0x0000ff00 /* Interrupt mask */
-#define SR_IMASK8 0x00000000 /* mask level 8 */
-#define SR_IMASK7 0x00008000 /* mask level 7 */
-#define SR_IMASK6 0x0000c000 /* mask level 6 */
-#define SR_IMASK5 0x0000e000 /* mask level 5 */
-#define SR_IMASK4 0x0000f000 /* mask level 4 */
-#define SR_IMASK3 0x0000f800 /* mask level 3 */
-#define SR_IMASK2 0x0000fc00 /* mask level 2 */
-#define SR_IMASK1 0x0000fe00 /* mask level 1 */
-#define SR_IMASK0 0x0000ff00 /* mask level 0 */
-
-#define SR_IMASKSHIFT 8
-
-#define SR_IBIT8 0x00008000 /* bit level 8 */
-#define SR_IBIT7 0x00004000 /* bit level 7 */
-#define SR_IBIT6 0x00002000 /* bit level 6 */
-#define SR_IBIT5 0x00001000 /* bit level 5 */
-#define SR_IBIT4 0x00000800 /* bit level 4 */
-#define SR_IBIT3 0x00000400 /* bit level 3 */
-#define SR_IBIT2 0x00000200 /* bit level 2 */
-#define SR_IBIT1 0x00000100 /* bit level 1 */
-
-#define SR_KUO 0x00000020 /* old kernel/user, 0 => k, 1 => u */
-#define SR_IEO 0x00000010 /* old interrupt enable, 1 => enable */
-#define SR_KUP 0x00000008 /* prev kernel/user, 0 => k, 1 => u */
-#define SR_IEP 0x00000004 /* prev interrupt enable, 1 => enable */
-#define SR_KUC 0x00000002 /* cur kernel/user, 0 => k, 1 => u */
-#define SR_IEC 0x00000001 /* cur interrupt enable, 1 => enable */
-#endif
-
-#if defined(CPU_R4000)
-#define SR_CUMASK 0xf0000000 /* coproc usable bits */
-#define SR_CU3 0x80000000 /* Coprocessor 3 usable */
-#define SR_CU2 0x40000000 /* Coprocessor 2 usable */
-#define SR_CU1 0x20000000 /* Coprocessor 1 usable */
-#define SR_CU0 0x10000000 /* Coprocessor 0 usable */
-
-#define SR_RP 0x08000000 /* Reduced power operation */
-#define SR_FR 0x04000000 /* Additional floating point registers */
-#define SR_RE 0x02000000 /* Reverse endian in user mode */
-
-#define SR_BEV 0x00400000 /* Use boot exception vectors */
-#define SR_TS 0x00200000 /* TLB shutdown */
-#define SR_SR 0x00100000 /* Soft reset */
-#define SR_CH 0x00040000 /* Cache hit */
-#define SR_CE 0x00020000 /* Use cache ECC */
-#define SR_DE 0x00010000 /* Disable cache exceptions */
-
-/*
-** status register interrupt masks and bits
-*/
-
-#define SR_IMASK 0x0000ff00 /* Interrupt mask */
-#define SR_IMASK8 0x00000000 /* mask level 8 */
-#define SR_IMASK7 0x00008000 /* mask level 7 */
-#define SR_IMASK6 0x0000c000 /* mask level 6 */
-#define SR_IMASK5 0x0000e000 /* mask level 5 */
-#define SR_IMASK4 0x0000f000 /* mask level 4 */
-#define SR_IMASK3 0x0000f800 /* mask level 3 */
-#define SR_IMASK2 0x0000fc00 /* mask level 2 */
-#define SR_IMASK1 0x0000fe00 /* mask level 1 */
-#define SR_IMASK0 0x0000ff00 /* mask level 0 */
-
-#define SR_IMASKSHIFT 8
-
-#define SR_IBIT8 0x00008000 /* bit level 8 */
-#define SR_IBIT7 0x00004000 /* bit level 7 */
-#define SR_IBIT6 0x00002000 /* bit level 6 */
-#define SR_IBIT5 0x00001000 /* bit level 5 */
-#define SR_IBIT4 0x00000800 /* bit level 4 */
-#define SR_IBIT3 0x00000400 /* bit level 3 */
-#define SR_IBIT2 0x00000200 /* bit level 2 */
-#define SR_IBIT1 0x00000100 /* bit level 1 */
-
-#define SR_KSMASK 0x00000018 /* Kernel mode mask */
-#define SR_KSUSER 0x00000010 /* User mode */
-#define SR_KSSUPER 0x00000008 /* Supervisor mode */
-#define SR_KSKERNEL 0x00000000 /* Kernel mode */
-#define SR_ERL 0x00000004 /* Error level */
-#define SR_EXL 0x00000002 /* Exception level */
-#define SR_IE 0x00000001 /* Interrupts enabled */
-#endif
-
-
-
-/*
- * Cause Register
- */
-#define CAUSE_BD 0x80000000 /* Branch delay slot */
-#define CAUSE_CEMASK 0x30000000 /* coprocessor error */
-#define CAUSE_CESHIFT 28
-
-
-#define CAUSE_IPMASK 0x0000FF00 /* Pending interrupt mask */
-#define CAUSE_IPSHIFT 8
-
-#define CAUSE_EXCMASK 0x0000003C /* Cause code bits */
-#define CAUSE_EXCSHIFT 2
-
-#ifndef XDS
-/*
-** Coprocessor 0 registers
-*/
-#define C0_INX $0 /* tlb index */
-#define C0_RAND $1 /* tlb random */
-#if defined(CPU_R3000)
-#define C0_TLBLO $2 /* tlb entry low */
-#endif
-#if defined(CPU_R4000)
-#define C0_TLBLO0 $2 /* tlb entry low 0 */
-#define C0_TLBLO1 $3 /* tlb entry low 1 */
-#endif
-
-#define C0_CTXT $4 /* tlb context */
-
-#if defined(CPU_R4000)
-#define C0_PAGEMASK $5 /* tlb page mask */
-#define C0_WIRED $6 /* number of wired tlb entries */
-#endif
-
-#define C0_BADVADDR $8 /* bad virtual address */
-
-#if defined(CPU_R4000)
-#define C0_COUNT $9 /* cycle count */
-#endif
-
-#define C0_TLBHI $10 /* tlb entry hi */
-
-#if defined(CPU_R4000)
-#define C0_COMPARE $11 /* cyccle count comparator */
-#endif
-
-#define C0_SR $12 /* status register */
-#define C0_CAUSE $13 /* exception cause */
-#define C0_EPC $14 /* exception pc */
-#define C0_PRID $15 /* revision identifier */
-
-#if defined(CPU_R3000)
-#define C0_CONFIG $3 /* configuration register R3081*/
-#endif
-
-#if defined(CPU_R4000)
-#define C0_CONFIG $16 /* configuration register */
-#define C0_LLADDR $17 /* linked load address */
-#define C0_WATCHLO $18 /* watchpoint trap register */
-#define C0_WATCHHI $19 /* watchpoint trap register */
-#define C0_XCTXT $20 /* extended tlb context */
-#define C0_ECC $26 /* secondary cache ECC control */
-#define C0_CACHEERR $27 /* cache error status */
-#define C0_TAGLO $28 /* cache tag lo */
-#define C0_TAGHI $29 /* cache tag hi */
-#define C0_ERRPC $30 /* cache error pc */
-#endif
-
-#endif XDS
-
-#ifdef R4650
-#define IWATCH $18
-#define DWATCH $19
-#define IBASE $0
-#define IBOUND $1
-#define DBASE $2
-#define DBOUND $3
-#define CALG $17
-#endif
-
-#endif /* _IDTCPU_H__ */
-
diff --git a/c/src/exec/score/cpu/mips/idtmon.h b/c/src/exec/score/cpu/mips/idtmon.h
deleted file mode 100644
index 2dacfe052e..0000000000
--- a/c/src/exec/score/cpu/mips/idtmon.h
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
-
-Based upon IDT provided code with the following release:
-
-This source code has been made available to you by IDT on an AS-IS
-basis. Anyone receiving this source is licensed under IDT copyrights
-to use it in any way he or she deems fit, including copying it,
-modifying it, compiling it, and redistributing it either with or
-without modifications. No license under IDT patents or patent
-applications is to be implied by the copyright license.
-
-Any user of this software should understand that IDT cannot provide
-technical support for this software and will not be responsible for
-any consequences resulting from the use of this software.
-
-Any person who transfers this source code or any derivative work must
-include the IDT copyright notice, this paragraph, and the preceeding
-two paragraphs in the transferred software.
-
-COPYRIGHT IDT CORPORATION 1996
-LICENSED MATERIAL - PROGRAM PROPERTY OF IDT
-
- $Id$
-*/
-
-/*
-** idtmon.h - General header file for the IDT Prom Monitor
-**
-** Copyright 1989 Integrated Device Technology, Inc.
-** All Rights Reserved.
-**
-** June 1989 - D.Cahoon
-*/
-#ifndef __IDTMON_H__
-#define __IDTMON_H__
-
-/*
-** P_STACKSIZE is the size of the Prom Stack.
-** the prom stack grows downward
-*/
-#define P_STACKSIZE 0x2000 /* sets stack size to 8k */
-
-/*
-** M_BUSWIDTH
-** Memory bus width (including bank interleaving) in bytes
-** used when doing memory sizing to prevent bus capacitance
-** reporting ghost memory locations
-*/
-#if defined(CPU_R3000)
-#define M_BUSWIDTH 8 /* 32bit memory bank interleaved */
-#endif
-#if defined(CPU_R4000)
-#define M_BUSWIDTH 16 /* 64 bit memory bank interleaved */
-#endif
-
-/*
-** this is the default value for the number of bytes to add in calculating
-** the checksums in the checksum command
-*/
-#define CHK_SUM_CNT 0x20000 /* number of bytes to calc chksum for */
-
-/*
-** Monitor modes
-*/
-#define MODE_MONITOR 5 /* IDT Prom Monitor is executing */
-#define MODE_USER 0xa /* USER is executing */
-
-/*
-** memory reference widths
-*/
-#define SW_BYTE 1
-#define SW_HALFWORD 2
-#define SW_WORD 4
-#define SW_TRIBYTEL 12
-#define SW_TRIBYTER 20
-
-#ifdef CPU_R4000
-/*
-** definitions for select_cache call
-*/
-#define DCACHE 0
-#define ICACHE 1
-#define SCACHE 2
-
-#endif
-
-#ifndef ASM
-typedef struct {
- unsigned int mem_size;
- unsigned int icache_size;
- unsigned int dcache_size;
-#ifdef CPU_R4000
- unsigned int scache_size;
-#endif
-
- } mem_config;
-
-#endif
-
-/*
-** general equates for diagnostics and boolean functions
-*/
-#define PASS 0
-#define FAIL 1
-
-#ifndef TRUE
-#define TRUE 1
-#endif TRUE
-#ifndef NULL
-#define NULL 0
-#endif NULL
-
-#ifndef FALSE
-#define FALSE 0
-#endif FALSE
-
-
-/*
-** portablility equates
-*/
-
-#ifndef BOOL
-#define BOOL unsigned int
-#endif BOOL
-
-#ifndef GLOBAL
-#define GLOBAL /**/
-#endif GLOBAL
-
-#ifndef MLOCAL
-#define MLOCAL static
-#endif MLOCAL
-
-
-#ifdef XDS
-#define CONST const
-#else
-#define CONST
-#endif XDS
-
-#define u_char unsigned char
-#define u_short unsigned short
-#define u_int unsigned int
-/*
-** assembly instructions for compatability between xds and mips
-*/
-#ifndef XDS
-#define sllv sll
-#define srlv srl
-#endif XDS
-/*
-** debugger macros for assembly language routines. Allows the
-** programmer to set up the necessary stack frame info
-** required by debuggers to do stack traces.
-*/
-
-#ifndef XDS
-#define FRAME(name,frm_reg,offset,ret_reg) \
- .globl name; \
- .ent name; \
-name:; \
- .frame frm_reg,offset,ret_reg
-#define ENDFRAME(name) \
- .end name
-#else
-#define FRAME(name,frm_reg,offset,ret_reg) \
- .globl _##name;\
-_##name:
-#define ENDFRAME(name)
-#endif XDS
-#endif /* __IDTMON_H__ */
diff --git a/c/src/exec/score/cpu/mips/iregdef.h b/c/src/exec/score/cpu/mips/iregdef.h
deleted file mode 100644
index f0953da852..0000000000
--- a/c/src/exec/score/cpu/mips/iregdef.h
+++ /dev/null
@@ -1,325 +0,0 @@
-/*
-
-Based upon IDT provided code with the following release:
-
-This source code has been made available to you by IDT on an AS-IS
-basis. Anyone receiving this source is licensed under IDT copyrights
-to use it in any way he or she deems fit, including copying it,
-modifying it, compiling it, and redistributing it either with or
-without modifications. No license under IDT patents or patent
-applications is to be implied by the copyright license.
-
-Any user of this software should understand that IDT cannot provide
-technical support for this software and will not be responsible for
-any consequences resulting from the use of this software.
-
-Any person who transfers this source code or any derivative work must
-include the IDT copyright notice, this paragraph, and the preceeding
-two paragraphs in the transferred software.
-
-COPYRIGHT IDT CORPORATION 1996
-LICENSED MATERIAL - PROGRAM PROPERTY OF IDT
-
- $Id$
-*/
-
-/*
-** iregdef.h - IDT R3000 register structure header file
-**
-** Copyright 1989 Integrated Device Technology, Inc
-** All Rights Reserved
-**
-*/
-#ifndef __IREGDEF_H__
-#define __IREGDEF_H__
-
-/*
- * 950313: Ketan added sreg/lreg and R_SZ for 64-bit saves
- * added Register definition for XContext reg.
- * Look towards end of this file.
- */
-/*
-** register names
-*/
-#define r0 $0
-#define r1 $1
-#define r2 $2
-#define r3 $3
-#define r4 $4
-#define r5 $5
-#define r6 $6
-#define r7 $7
-#define r8 $8
-#define r9 $9
-#define r10 $10
-#define r11 $11
-#define r12 $12
-#define r13 $13
-
-#define r14 $14
-#define r15 $15
-#define r16 $16
-#define r17 $17
-#define r18 $18
-#define r19 $19
-#define r20 $20
-#define r21 $21
-#define r22 $22
-#define r23 $23
-#define r24 $24
-#define r25 $25
-#define r26 $26
-#define r27 $27
-#define r28 $28
-#define r29 $29
-#define r30 $30
-#define r31 $31
-
-#define fp0 $f0
-#define fp1 $f1
-#define fp2 $f2
-#define fp3 $f3
-#define fp4 $f4
-#define fp5 $f5
-#define fp6 $f6
-#define fp7 $f7
-#define fp8 $f8
-#define fp9 $f9
-#define fp10 $f10
-#define fp11 $f11
-#define fp12 $f12
-#define fp13 $f13
-#define fp14 $f14
-#define fp15 $f15
-#define fp16 $f16
-#define fp17 $f17
-#define fp18 $f18
-#define fp19 $f19
-#define fp20 $f20
-#define fp21 $f21
-#define fp22 $f22
-#define fp23 $f23
-#define fp24 $f24
-#define fp25 $f25
-#define fp26 $f26
-#define fp27 $f27
-#define fp28 $f28
-#define fp29 $f29
-#define fp30 $f30
-#define fp31 $f31
-
-#define fcr0 $0
-#define fcr30 $30
-#define fcr31 $31
-
-#define zero $0 /* wired zero */
-#define AT $at /* assembler temp */
-#define v0 $2 /* return value */
-#define v1 $3
-#define a0 $4 /* argument registers a0-a3 */
-#define a1 $5
-#define a2 $6
-#define a3 $7
-#define t0 $8 /* caller saved t0-t9 */
-#define t1 $9
-#define t2 $10
-#define t3 $11
-#define t4 $12
-#define t5 $13
-#define t6 $14
-#define t7 $15
-#define s0 $16 /* callee saved s0-s8 */
-#define s1 $17
-#define s2 $18
-#define s3 $19
-#define s4 $20
-#define s5 $21
-#define s6 $22
-#define s7 $23
-#define t8 $24
-#define t9 $25
-#define k0 $26 /* kernel usage */
-#define k1 $27 /* kernel usage */
-#define gp $28 /* sdata pointer */
-#define sp $29 /* stack pointer */
-#define s8 $30 /* yet another saved reg for the callee */
-#define fp $30 /* frame pointer - this is being phased out by MIPS */
-#define ra $31 /* return address */
-
-
-/*
-** relative position of registers in save reg area
-*/
-#define R_R0 0
-#define R_R1 1
-#define R_R2 2
-#define R_R3 3
-#define R_R4 4
-#define R_R5 5
-#define R_R6 6
-#define R_R7 7
-#define R_R8 8
-#define R_R9 9
-#define R_R10 10
-#define R_R11 11
-#define R_R12 12
-#define R_R13 13
-#define R_R14 14
-#define R_R15 15
-#define R_R16 16
-#define R_R17 17
-#define R_R18 18
-#define R_R19 19
-#define R_R20 20
-#define R_R21 21
-#define R_R22 22
-#define R_R23 23
-#define R_R24 24
-#define R_R25 25
-#define R_R26 26
-#define R_R27 27
-#define R_R28 28
-#define R_R29 29
-#define R_R30 30
-#define R_R31 31
-#define R_F0 32
-#define R_F1 33
-#define R_F2 34
-#define R_F3 35
-#define R_F4 36
-#define R_F5 37
-#define R_F6 38
-#define R_F7 39
-#define R_F8 40
-#define R_F9 41
-#define R_F10 42
-#define R_F11 43
-#define R_F12 44
-#define R_F13 45
-#define R_F14 46
-#define R_F15 47
-#define R_F16 48
-#define R_F17 49
-#define R_F18 50
-#define R_F19 51
-#define R_F20 52
-#define R_F21 53
-#define R_F22 54
-#define R_F23 55
-#define R_F24 56
-#define R_F25 57
-#define R_F26 58
-#define R_F27 59
-#define R_F28 60
-#define R_F29 61
-#define R_F30 62
-#define R_F31 63
-#define NCLIENTREGS 64
-#define R_EPC 64
-#define R_MDHI 65
-#define R_MDLO 66
-#define R_SR 67
-#define R_CAUSE 68
-#define R_TLBHI 69
-#if defined(CPU_R3000)
-#define R_TLBLO 70
-#endif
-#if defined(CPU_R4000)
-#define R_TLBLO0 70
-#endif
-#define R_BADVADDR 71
-#define R_INX 72
-#define R_RAND 73
-#define R_CTXT 74
-#define R_EXCTYPE 75
-#define R_MODE 76
-#define R_PRID 77
-#define R_FCSR 78
-#define R_FEIR 79
-#if defined(CPU_R3000)
-#define NREGS 80
-#endif
-#if defined(CPU_R4000)
-#define R_TLBLO1 80
-#define R_PAGEMASK 81
-#define R_WIRED 82
-#define R_COUNT 83
-#define R_COMPARE 84
-#define R_CONFIG 85
-#define R_LLADDR 86
-#define R_WATCHLO 87
-#define R_WATCHHI 88
-#define R_ECC 89
-#define R_CACHEERR 90
-#define R_TAGLO 91
-#define R_TAGHI 92
-#define R_ERRPC 93
-#define R_XCTXT 94 /* Ketan added from SIM64bit */
-
-#define NREGS 95
-#endif
-
-/*
-** For those who like to think in terms of the compiler names for the regs
-*/
-#define R_ZERO R_R0
-#define R_AT R_R1
-#define R_V0 R_R2
-#define R_V1 R_R3
-#define R_A0 R_R4
-#define R_A1 R_R5
-#define R_A2 R_R6
-#define R_A3 R_R7
-#define R_T0 R_R8
-#define R_T1 R_R9
-#define R_T2 R_R10
-#define R_T3 R_R11
-#define R_T4 R_R12
-#define R_T5 R_R13
-#define R_T6 R_R14
-#define R_T7 R_R15
-#define R_S0 R_R16
-#define R_S1 R_R17
-#define R_S2 R_R18
-#define R_S3 R_R19
-#define R_S4 R_R20
-#define R_S5 R_R21
-#define R_S6 R_R22
-#define R_S7 R_R23
-#define R_T8 R_R24
-#define R_T9 R_R25
-#define R_K0 R_R26
-#define R_K1 R_R27
-#define R_GP R_R28
-#define R_SP R_R29
-#define R_FP R_R30
-#define R_RA R_R31
-
-/* Ketan added the following */
-#ifdef CPU_R3000
-#define sreg sw
-#define lreg lw
-#define rmfc0 mfc0
-#define rmtc0 mtc0
-#define R_SZ 4
-#endif CPU_R3000
-
-#ifdef CPU_R4000
-#if __mips < 3
-#define sreg sw
-#define lreg lw
-#define rmfc0 mfc0
-#define rmtc0 mtc0
-#define R_SZ 4
-#else
-#define sreg sd
-#define lreg ld
-#define rmfc0 dmfc0
-#define rmtc0 dmtc0
-#define R_SZ 8
-#endif
-#endif CPU_R4000
-/* Ketan till here */
-
-#endif /* __IREGDEF_H__ */
-
diff --git a/c/src/exec/score/cpu/mips/rtems.c b/c/src/exec/score/cpu/mips/rtems.c
deleted file mode 100644
index 7120ded725..0000000000
--- a/c/src/exec/score/cpu/mips/rtems.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/* rtems.c ===> rtems.S or rtems.s
- *
- * This file contains the single entry point code for
- * the XXX implementation of RTEMS.
- *
- * NOTE: This is supposed to be a .S or .s file NOT a C file.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-/*
- * Rather than deleting this, it is commented out to (hopefully) help
- * the submitter send updates.
- *
- * static char _sccsid[] = "@(#)rtems.c 03/15/96 1.1\n";
- */
-
-
-/*
- * This is supposed to be an assembly file. This means that system.h
- * and cpu.h should not be included in a "real" rtems file.
- */
-
-#include <rtems/system.h>
-#include <rtems/score/cpu.h>
-/* #include "asm.h> */
-
-/*
- * RTEMS
- *
- * This routine jumps to the directive indicated in the
- * CPU defined register. This routine is used when RTEMS is
- * linked by itself and placed in ROM. This routine is the
- * first address in the ROM space for RTEMS. The user "calls"
- * this address with the directive arguments in the normal place.
- * This routine then jumps indirectly to the correct directive
- * preserving the arguments. The directive should not realize
- * it has been "wrapped" in this way. The table "_Entry_points"
- * is used to look up the directive.
- */
-
-void RTEMS()
-{
-}
-
diff --git a/c/src/exec/score/cpu/mips/rtems/Makefile.am b/c/src/exec/score/cpu/mips/rtems/Makefile.am
deleted file mode 100644
index 900930a502..0000000000
--- a/c/src/exec/score/cpu/mips/rtems/Makefile.am
+++ /dev/null
@@ -1,10 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-SUBDIRS = score
-
-include $(top_srcdir)/../../../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/c/src/exec/score/cpu/mips/rtems/score/Makefile.am b/c/src/exec/score/cpu/mips/rtems/score/Makefile.am
deleted file mode 100644
index 728899f945..0000000000
--- a/c/src/exec/score/cpu/mips/rtems/score/Makefile.am
+++ /dev/null
@@ -1,26 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-H_FILES = cpu.h mips64orion.h mipstypes.h
-noinst_HEADERS = $(H_FILES)
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-PREINSTALL_FILES = \
-$(PROJECT_INCLUDE)/rtems/score \
-$(H_FILES:%.h=$(PROJECT_INCLUDE)/rtems/score/%.h)
-
-$(PROJECT_INCLUDE)/rtems/score:
- $(mkinstalldirs) $@
-
-$(PROJECT_INCLUDE)/rtems/score/%.h: %.h
- $(INSTALL_DATA) $< $@
-
-all-local: $(PREINSTALL_FILES)
-
-include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/c/src/exec/score/cpu/mips/rtems/score/cpu.h b/c/src/exec/score/cpu/mips/rtems/score/cpu.h
deleted file mode 100644
index 96eb34292a..0000000000
--- a/c/src/exec/score/cpu/mips/rtems/score/cpu.h
+++ /dev/null
@@ -1,980 +0,0 @@
-/* cpu.h
- *
- * This include file contains information pertaining to the IDT 4650
- * processor.
- *
- * Author: Craig Lebakken <craigl@transition.com>
- *
- * COPYRIGHT (c) 1996 by Transition Networks Inc.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Transition Networks not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * Transition Networks makes no representations about the suitability
- * of this software for any purpose.
- *
- * Derived from c/src/exec/score/cpu/no_cpu/cpu.h:
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-/* @(#)cpu.h 08/29/96 1.7 */
-
-#ifndef __CPU_h
-#define __CPU_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/mips64orion.h> /* pick up machine definitions */
-#ifndef ASM
-#include <rtems/score/mipstypes.h>
-#endif
-
-extern int mips_disable_interrupts( void );
-extern void mips_enable_interrupts( int _level );
-extern int mips_disable_global_interrupts( void );
-extern void mips_enable_global_interrupts( void );
-extern void mips_fatal_error ( int error );
-
-/* conditional compilation parameters */
-
-/*
- * Should the calls to _Thread_Enable_dispatch be inlined?
- *
- * If TRUE, then they are inlined.
- * If FALSE, then a subroutine call is made.
- *
- * Basically this is an example of the classic trade-off of size
- * versus speed. Inlining the call (TRUE) typically increases the
- * size of RTEMS while speeding up the enabling of dispatching.
- * [NOTE: In general, the _Thread_Dispatch_disable_level will
- * only be 0 or 1 unless you are in an interrupt handler and that
- * interrupt handler invokes the executive.] When not inlined
- * something calls _Thread_Enable_dispatch which in turns calls
- * _Thread_Dispatch. If the enable dispatch is inlined, then
- * one subroutine call is avoided entirely.]
- */
-
-#define CPU_INLINE_ENABLE_DISPATCH TRUE
-
-/*
- * Should the body of the search loops in _Thread_queue_Enqueue_priority
- * be unrolled one time? In unrolled each iteration of the loop examines
- * two "nodes" on the chain being searched. Otherwise, only one node
- * is examined per iteration.
- *
- * If TRUE, then the loops are unrolled.
- * If FALSE, then the loops are not unrolled.
- *
- * The primary factor in making this decision is the cost of disabling
- * and enabling interrupts (_ISR_Flash) versus the cost of rest of the
- * body of the loop. On some CPUs, the flash is more expensive than
- * one iteration of the loop body. In this case, it might be desirable
- * to unroll the loop. It is important to note that on some CPUs, this
- * code is the longest interrupt disable period in RTEMS. So it is
- * necessary to strike a balance when setting this parameter.
- */
-
-#define CPU_UNROLL_ENQUEUE_PRIORITY TRUE
-
-/*
- * Does RTEMS manage a dedicated interrupt stack in software?
- *
- * If TRUE, then a stack is allocated in _Interrupt_Manager_initialization.
- * If FALSE, nothing is done.
- *
- * If the CPU supports a dedicated interrupt stack in hardware,
- * then it is generally the responsibility of the BSP to allocate it
- * and set it up.
- *
- * If the CPU does not support a dedicated interrupt stack, then
- * the porter has two options: (1) execute interrupts on the
- * stack of the interrupted task, and (2) have RTEMS manage a dedicated
- * interrupt stack.
- *
- * If this is TRUE, CPU_ALLOCATE_INTERRUPT_STACK should also be TRUE.
- *
- * Only one of CPU_HAS_SOFTWARE_INTERRUPT_STACK and
- * CPU_HAS_HARDWARE_INTERRUPT_STACK should be set to TRUE. It is
- * possible that both are FALSE for a particular CPU. Although it
- * is unclear what that would imply about the interrupt processing
- * procedure on that CPU.
- */
-
-#define CPU_HAS_SOFTWARE_INTERRUPT_STACK FALSE
-
-/*
- * Does this CPU have hardware support for a dedicated interrupt stack?
- *
- * If TRUE, then it must be installed during initialization.
- * If FALSE, then no installation is performed.
- *
- * If this is TRUE, CPU_ALLOCATE_INTERRUPT_STACK should also be TRUE.
- *
- * Only one of CPU_HAS_SOFTWARE_INTERRUPT_STACK and
- * CPU_HAS_HARDWARE_INTERRUPT_STACK should be set to TRUE. It is
- * possible that both are FALSE for a particular CPU. Although it
- * is unclear what that would imply about the interrupt processing
- * procedure on that CPU.
- */
-
-#define CPU_HAS_HARDWARE_INTERRUPT_STACK FALSE
-
-/*
- * Does RTEMS allocate a dedicated interrupt stack in the Interrupt Manager?
- *
- * If TRUE, then the memory is allocated during initialization.
- * If FALSE, then the memory is allocated during initialization.
- *
- * This should be TRUE is CPU_HAS_SOFTWARE_INTERRUPT_STACK is TRUE
- * or CPU_INSTALL_HARDWARE_INTERRUPT_STACK is TRUE.
- */
-
-#define CPU_ALLOCATE_INTERRUPT_STACK FALSE
-
-/*
- * Does the RTEMS invoke the user's ISR with the vector number and
- * a pointer to the saved interrupt frame (1) or just the vector
- * number (0)?
- */
-
-#define CPU_ISR_PASSES_FRAME_POINTER 0
-
-/*
- * Does the CPU have hardware floating point?
- *
- * If TRUE, then the RTEMS_FLOATING_POINT task attribute is supported.
- * If FALSE, then the RTEMS_FLOATING_POINT task attribute is ignored.
- *
- * If there is a FP coprocessor such as the i387 or mc68881, then
- * the answer is TRUE.
- *
- * The macro name "MIPS64ORION_HAS_FPU" should be made CPU specific.
- * It indicates whether or not this CPU model has FP support. For
- * example, it would be possible to have an i386_nofp CPU model
- * which set this to false to indicate that you have an i386 without
- * an i387 and wish to leave floating point support out of RTEMS.
- */
-
-#if ( MIPS64ORION_HAS_FPU == 1 )
-#define CPU_HARDWARE_FP TRUE
-#else
-#define CPU_HARDWARE_FP FALSE
-#endif
-
-/*
- * Are all tasks RTEMS_FLOATING_POINT tasks implicitly?
- *
- * If TRUE, then the RTEMS_FLOATING_POINT task attribute is assumed.
- * If FALSE, then the RTEMS_FLOATING_POINT task attribute is followed.
- *
- * So far, the only CPU in which this option has been used is the
- * HP PA-RISC. The HP C compiler and gcc both implicitly use the
- * floating point registers to perform integer multiplies. If
- * a function which you would not think utilize the FP unit DOES,
- * then one can not easily predict which tasks will use the FP hardware.
- * In this case, this option should be TRUE.
- *
- * If CPU_HARDWARE_FP is FALSE, then this should be FALSE as well.
- */
-
-#define CPU_ALL_TASKS_ARE_FP FALSE
-
-/*
- * Should the IDLE task have a floating point context?
- *
- * If TRUE, then the IDLE task is created as a RTEMS_FLOATING_POINT task
- * and it has a floating point context which is switched in and out.
- * If FALSE, then the IDLE task does not have a floating point context.
- *
- * Setting this to TRUE negatively impacts the time required to preempt
- * the IDLE task from an interrupt because the floating point context
- * must be saved as part of the preemption.
- */
-
-#define CPU_IDLE_TASK_IS_FP FALSE
-
-/*
- * Should the saving of the floating point registers be deferred
- * until a context switch is made to another different floating point
- * task?
- *
- * If TRUE, then the floating point context will not be stored until
- * necessary. It will remain in the floating point registers and not
- * disturned until another floating point task is switched to.
- *
- * If FALSE, then the floating point context is saved when a floating
- * point task is switched out and restored when the next floating point
- * task is restored. The state of the floating point registers between
- * those two operations is not specified.
- *
- * If the floating point context does NOT have to be saved as part of
- * interrupt dispatching, then it should be safe to set this to TRUE.
- *
- * Setting this flag to TRUE results in using a different algorithm
- * for deciding when to save and restore the floating point context.
- * The deferred FP switch algorithm minimizes the number of times
- * the FP context is saved and restored. The FP context is not saved
- * until a context switch is made to another, different FP task.
- * Thus in a system with only one FP task, the FP context will never
- * be saved or restored.
- */
-
-#define CPU_USE_DEFERRED_FP_SWITCH TRUE
-
-/*
- * Does this port provide a CPU dependent IDLE task implementation?
- *
- * If TRUE, then the routine _CPU_Internal_threads_Idle_thread_body
- * must be provided and is the default IDLE thread body instead of
- * _Internal_threads_Idle_thread_body.
- *
- * If FALSE, then use the generic IDLE thread body if the BSP does
- * not provide one.
- *
- * This is intended to allow for supporting processors which have
- * a low power or idle mode. When the IDLE thread is executed, then
- * the CPU can be powered down.
- *
- * The order of precedence for selecting the IDLE thread body is:
- *
- * 1. BSP provided
- * 2. CPU dependent (if provided)
- * 3. generic (if no BSP and no CPU dependent)
- */
-
-/* we can use the low power wait instruction for the IDLE thread */
-#define CPU_PROVIDES_IDLE_THREAD_BODY TRUE
-
-/*
- * Does the stack grow up (toward higher addresses) or down
- * (toward lower addresses)?
- *
- * If TRUE, then the grows upward.
- * If FALSE, then the grows toward smaller addresses.
- */
-
-/* our stack grows down */
-#define CPU_STACK_GROWS_UP FALSE
-
-/*
- * The following is the variable attribute used to force alignment
- * of critical RTEMS structures. On some processors it may make
- * sense to have these aligned on tighter boundaries than
- * the minimum requirements of the compiler in order to have as
- * much of the critical data area as possible in a cache line.
- *
- * The placement of this macro in the declaration of the variables
- * is based on the syntactically requirements of the GNU C
- * "__attribute__" extension. For example with GNU C, use
- * the following to force a structures to a 32 byte boundary.
- *
- * __attribute__ ((aligned (32)))
- *
- * NOTE: Currently only the Priority Bit Map table uses this feature.
- * To benefit from using this, the data must be heavily
- * used so it will stay in the cache and used frequently enough
- * in the executive to justify turning this on.
- */
-
-/* our cache line size is 16 bytes */
-#if __GNUC__
-#define CPU_STRUCTURE_ALIGNMENT __attribute__ ((aligned (16)))
-#else
-#define CPU_STRUCTURE_ALIGNMENT
-#endif
-
-/*
- * Define what is required to specify how the network to host conversion
- * routines are handled.
- */
-
-#define CPU_HAS_OWN_HOST_TO_NETWORK_ROUTINES FALSE
-#define CPU_BIG_ENDIAN TRUE
-#define CPU_LITTLE_ENDIAN FALSE
-
-/*
- * The following defines the number of bits actually used in the
- * interrupt field of the task mode. How those bits map to the
- * CPU interrupt levels is defined by the routine _CPU_ISR_Set_level().
- */
-
-#define CPU_MODES_INTERRUPT_MASK 0x00000001
-
-/*
- * Processor defined structures
- *
- * Examples structures include the descriptor tables from the i386
- * and the processor control structure on the i960ca.
- */
-
-/* may need to put some structures here. */
-
-/*
- * Contexts
- *
- * Generally there are 2 types of context to save.
- * 1. Interrupt registers to save
- * 2. Task level registers to save
- *
- * This means we have the following 3 context items:
- * 1. task level context stuff:: Context_Control
- * 2. floating point task stuff:: Context_Control_fp
- * 3. special interrupt level context :: Context_Control_interrupt
- *
- * On some processors, it is cost-effective to save only the callee
- * preserved registers during a task context switch. This means
- * that the ISR code needs to save those registers which do not
- * persist across function calls. It is not mandatory to make this
- * distinctions between the caller/callee saves registers for the
- * purpose of minimizing context saved during task switch and on interrupts.
- * If the cost of saving extra registers is minimal, simplicity is the
- * choice. Save the same context on interrupt entry as for tasks in
- * this case.
- *
- * Additionally, if gdb is to be made aware of RTEMS tasks for this CPU, then
- * care should be used in designing the context area.
- *
- * On some CPUs with hardware floating point support, the Context_Control_fp
- * structure will not be used or it simply consist of an array of a
- * fixed number of bytes. This is done when the floating point context
- * is dumped by a "FP save context" type instruction and the format
- * is not really defined by the CPU. In this case, there is no need
- * to figure out the exact format -- only the size. Of course, although
- * this is enough information for RTEMS, it is probably not enough for
- * a debugger such as gdb. But that is another problem.
- */
-
-/* WARNING: If this structure is modified, the constants in cpu.h must be updated. */
-typedef struct {
- unsigned64 s0;
- unsigned64 s1;
- unsigned64 s2;
- unsigned64 s3;
- unsigned64 s4;
- unsigned64 s5;
- unsigned64 s6;
- unsigned64 s7;
- unsigned64 sp;
- unsigned64 fp;
- unsigned64 ra;
- unsigned64 c0_sr;
- unsigned64 c0_epc;
-} Context_Control;
-
-/* WARNING: If this structure is modified, the constants in cpu.h must be updated. */
-typedef struct {
- unsigned32 fp0;
- unsigned32 fp1;
- unsigned32 fp2;
- unsigned32 fp3;
- unsigned32 fp4;
- unsigned32 fp5;
- unsigned32 fp6;
- unsigned32 fp7;
- unsigned32 fp8;
- unsigned32 fp9;
- unsigned32 fp10;
- unsigned32 fp11;
- unsigned32 fp12;
- unsigned32 fp13;
- unsigned32 fp14;
- unsigned32 fp15;
- unsigned32 fp16;
- unsigned32 fp17;
- unsigned32 fp18;
- unsigned32 fp19;
- unsigned32 fp20;
- unsigned32 fp21;
- unsigned32 fp22;
- unsigned32 fp23;
- unsigned32 fp24;
- unsigned32 fp25;
- unsigned32 fp26;
- unsigned32 fp27;
- unsigned32 fp28;
- unsigned32 fp29;
- unsigned32 fp30;
- unsigned32 fp31;
-} Context_Control_fp;
-
-typedef struct {
- unsigned32 special_interrupt_register;
-} CPU_Interrupt_frame;
-
-
-/*
- * The following table contains the information required to configure
- * the mips processor specific parameters.
- */
-
-typedef struct {
- void (*pretasking_hook)( void );
- void (*predriver_hook)( void );
- void (*postdriver_hook)( void );
- void (*idle_task)( void );
- boolean do_zero_of_workspace;
- unsigned32 idle_task_stack_size;
- unsigned32 interrupt_stack_size;
- unsigned32 extra_mpci_receive_server_stack;
- void * (*stack_allocate_hook)( unsigned32 );
- void (*stack_free_hook)( void* );
- /* end of fields required on all CPUs */
-
- unsigned32 clicks_per_microsecond;
-} rtems_cpu_table;
-
-/*
- * Macros to access required entires in the CPU Table are in
- * the file rtems/system.h.
- */
-
-/*
- * Macros to access MIPS64ORION specific additions to the CPU Table
- */
-
-#define rtems_cpu_configuration_get_clicks_per_microsecond() \
- (_CPU_Table.clicks_per_microsecond)
-
-/*
- * This variable is optional. It is used on CPUs on which it is difficult
- * to generate an "uninitialized" FP context. It is filled in by
- * _CPU_Initialize and copied into the task's FP context area during
- * _CPU_Context_Initialize.
- */
-
-SCORE_EXTERN Context_Control_fp _CPU_Null_fp_context;
-
-/*
- * On some CPUs, RTEMS supports a software managed interrupt stack.
- * This stack is allocated by the Interrupt Manager and the switch
- * is performed in _ISR_Handler. These variables contain pointers
- * to the lowest and highest addresses in the chunk of memory allocated
- * for the interrupt stack. Since it is unknown whether the stack
- * grows up or down (in general), this give the CPU dependent
- * code the option of picking the version it wants to use.
- *
- * NOTE: These two variables are required if the macro
- * CPU_HAS_SOFTWARE_INTERRUPT_STACK is defined as TRUE.
- */
-
-SCORE_EXTERN void *_CPU_Interrupt_stack_low;
-SCORE_EXTERN void *_CPU_Interrupt_stack_high;
-
-/*
- * With some compilation systems, it is difficult if not impossible to
- * call a high-level language routine from assembly language. This
- * is especially true of commercial Ada compilers and name mangling
- * C++ ones. This variable can be optionally defined by the CPU porter
- * and contains the address of the routine _Thread_Dispatch. This
- * can make it easier to invoke that routine at the end of the interrupt
- * sequence (if a dispatch is necessary).
- */
-
-SCORE_EXTERN void (*_CPU_Thread_dispatch_pointer)();
-
-/*
- * Nothing prevents the porter from declaring more CPU specific variables.
- */
-
-/* XXX: if needed, put more variables here */
-
-/*
- * The size of the floating point context area. On some CPUs this
- * will not be a "sizeof" because the format of the floating point
- * area is not defined -- only the size is. This is usually on
- * CPUs with a "floating point save context" instruction.
- */
-
-#define CPU_CONTEXT_FP_SIZE sizeof( Context_Control_fp )
-
-/*
- * Amount of extra stack (above minimum stack size) required by
- * system initialization thread. Remember that in a multiprocessor
- * system the system intialization thread becomes the MP server thread.
- */
-
-#define CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK 0
-
-/*
- * This defines the number of entries in the ISR_Vector_table managed
- * by RTEMS.
- */
-
-#define CPU_INTERRUPT_NUMBER_OF_VECTORS 8
-#define CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER (CPU_INTERRUPT_NUMBER_OF_VECTORS - 1)
-
-/*
- * Should be large enough to run all RTEMS tests. This insures
- * that a "reasonable" small application should not have any problems.
- */
-
-#define CPU_STACK_MINIMUM_SIZE (2048*sizeof(unsigned32))
-
-/*
- * CPU's worst alignment requirement for data types on a byte boundary. This
- * alignment does not take into account the requirements for the stack.
- */
-
-#define CPU_ALIGNMENT 8
-
-/*
- * This number corresponds to the byte alignment requirement for the
- * heap handler. This alignment requirement may be stricter than that
- * for the data types alignment specified by CPU_ALIGNMENT. It is
- * common for the heap to follow the same alignment requirement as
- * CPU_ALIGNMENT. If the CPU_ALIGNMENT is strict enough for the heap,
- * then this should be set to CPU_ALIGNMENT.
- *
- * NOTE: This does not have to be a power of 2. It does have to
- * be greater or equal to than CPU_ALIGNMENT.
- */
-
-#define CPU_HEAP_ALIGNMENT CPU_ALIGNMENT
-
-/*
- * This number corresponds to the byte alignment requirement for memory
- * buffers allocated by the partition manager. This alignment requirement
- * may be stricter than that for the data types alignment specified by
- * CPU_ALIGNMENT. It is common for the partition to follow the same
- * alignment requirement as CPU_ALIGNMENT. If the CPU_ALIGNMENT is strict
- * enough for the partition, then this should be set to CPU_ALIGNMENT.
- *
- * NOTE: This does not have to be a power of 2. It does have to
- * be greater or equal to than CPU_ALIGNMENT.
- */
-
-#define CPU_PARTITION_ALIGNMENT CPU_ALIGNMENT
-
-/*
- * This number corresponds to the byte alignment requirement for the
- * stack. This alignment requirement may be stricter than that for the
- * data types alignment specified by CPU_ALIGNMENT. If the CPU_ALIGNMENT
- * is strict enough for the stack, then this should be set to 0.
- *
- * NOTE: This must be a power of 2 either 0 or greater than CPU_ALIGNMENT.
- */
-
-#define CPU_STACK_ALIGNMENT CPU_ALIGNMENT
-
-/* ISR handler macros */
-
-/*
- * Disable all interrupts for an RTEMS critical section. The previous
- * level is returned in _level.
- */
-
-#define _CPU_ISR_Disable( _int_level ) \
- do{ \
- _int_level = mips_disable_interrupts(); \
- }while(0)
-
-/*
- * Enable interrupts to the previous level (returned by _CPU_ISR_Disable).
- * This indicates the end of an RTEMS critical section. The parameter
- * _level is not modified.
- */
-
-#define _CPU_ISR_Enable( _level ) \
- do{ \
- mips_enable_interrupts(_level); \
- }while(0)
-
-/*
- * This temporarily restores the interrupt to _level before immediately
- * disabling them again. This is used to divide long RTEMS critical
- * sections into two or more parts. The parameter _level is not
- * modified.
- */
-
-#define _CPU_ISR_Flash( _xlevel ) \
- do{ \
- int _scratch; \
- _CPU_ISR_Enable( _xlevel ); \
- _CPU_ISR_Disable( _scratch ); \
- }while(0)
-
-/*
- * Map interrupt level in task mode onto the hardware that the CPU
- * actually provides. Currently, interrupt levels which do not
- * map onto the CPU in a generic fashion are undefined. Someday,
- * it would be nice if these were "mapped" by the application
- * via a callout. For example, m68k has 8 levels 0 - 7, levels
- * 8 - 255 would be available for bsp/application specific meaning.
- * This could be used to manage a programmable interrupt controller
- * via the rtems_task_mode directive.
- */
-extern void _CPU_ISR_Set_level( unsigned32 _new_level );
-
-unsigned32 _CPU_ISR_Get_level( void );
-
-/* end of ISR handler macros */
-
-/* Context handler macros */
-
-/*
- * Initialize the context to a state suitable for starting a
- * task after a context restore operation. Generally, this
- * involves:
- *
- * - setting a starting address
- * - preparing the stack
- * - preparing the stack and frame pointers
- * - setting the proper interrupt level in the context
- * - initializing the floating point context
- *
- * This routine generally does not set any unnecessary register
- * in the context. The state of the "general data" registers is
- * undefined at task start time.
- *
- * NOTE: This is_fp parameter is TRUE if the thread is to be a floating
- * point thread. This is typically only used on CPUs where the
- * FPU may be easily disabled by software such as on the SPARC
- * where the PSR contains an enable FPU bit.
- */
-
-#define _CPU_Context_Initialize( _the_context, _stack_base, _size, \
- _isr, _entry_point, _is_fp ) \
- { \
- unsigned32 _stack_tmp = (unsigned32)(_stack_base) + (_size) - CPU_STACK_ALIGNMENT; \
- _stack_tmp &= ~(CPU_STACK_ALIGNMENT - 1); \
- (_the_context)->sp = _stack_tmp; \
- (_the_context)->fp = _stack_tmp; \
- (_the_context)->ra = (unsigned64)_entry_point; \
- (_the_context)->c0_sr = 0; \
- }
-
-/*
- * This routine is responsible for somehow restarting the currently
- * executing task. If you are lucky, then all that is necessary
- * is restoring the context. Otherwise, there will need to be
- * a special assembly routine which does something special in this
- * case. Context_Restore should work most of the time. It will
- * not work if restarting self conflicts with the stack frame
- * assumptions of restoring a context.
- */
-
-#define _CPU_Context_Restart_self( _the_context ) \
- _CPU_Context_restore( (_the_context) );
-
-/*
- * The purpose of this macro is to allow the initial pointer into
- * A floating point context area (used to save the floating point
- * context) to be at an arbitrary place in the floating point
- * context area.
- *
- * This is necessary because some FP units are designed to have
- * their context saved as a stack which grows into lower addresses.
- * Other FP units can be saved by simply moving registers into offsets
- * from the base of the context area. Finally some FP units provide
- * a "dump context" instruction which could fill in from high to low
- * or low to high based on the whim of the CPU designers.
- */
-
-#define _CPU_Context_Fp_start( _base, _offset ) \
- ( (void *) _Addresses_Add_offset( (_base), (_offset) ) )
-
-/*
- * This routine initializes the FP context area passed to it to.
- * There are a few standard ways in which to initialize the
- * floating point context. The code included for this macro assumes
- * that this is a CPU in which a "initial" FP context was saved into
- * _CPU_Null_fp_context and it simply copies it to the destination
- * context passed to it.
- *
- * Other models include (1) not doing anything, and (2) putting
- * a "null FP status word" in the correct place in the FP context.
- */
-
-#define _CPU_Context_Initialize_fp( _destination ) \
- { \
- *((Context_Control_fp *) *((void **) _destination)) = _CPU_Null_fp_context; \
- }
-
-/* end of Context handler macros */
-
-/* Fatal Error manager macros */
-
-/*
- * This routine copies _error into a known place -- typically a stack
- * location or a register, optionally disables interrupts, and
- * halts/stops the CPU.
- */
-
-#define _CPU_Fatal_halt( _error ) \
- { \
- mips_disable_global_interrupts(); \
- mips_fatal_error(_error); \
- }
-
-/* end of Fatal Error manager macros */
-
-/* Bitfield handler macros */
-
-/*
- * This routine sets _output to the bit number of the first bit
- * set in _value. _value is of CPU dependent type Priority_Bit_map_control.
- * This type may be either 16 or 32 bits wide although only the 16
- * least significant bits will be used.
- *
- * There are a number of variables in using a "find first bit" type
- * instruction.
- *
- * (1) What happens when run on a value of zero?
- * (2) Bits may be numbered from MSB to LSB or vice-versa.
- * (3) The numbering may be zero or one based.
- * (4) The "find first bit" instruction may search from MSB or LSB.
- *
- * RTEMS guarantees that (1) will never happen so it is not a concern.
- * (2),(3), (4) are handled by the macros _CPU_Priority_mask() and
- * _CPU_Priority_bits_index(). These three form a set of routines
- * which must logically operate together. Bits in the _value are
- * set and cleared based on masks built by _CPU_Priority_mask().
- * The basic major and minor values calculated by _Priority_Major()
- * and _Priority_Minor() are "massaged" by _CPU_Priority_bits_index()
- * to properly range between the values returned by the "find first bit"
- * instruction. This makes it possible for _Priority_Get_highest() to
- * calculate the major and directly index into the minor table.
- * This mapping is necessary to ensure that 0 (a high priority major/minor)
- * is the first bit found.
- *
- * This entire "find first bit" and mapping process depends heavily
- * on the manner in which a priority is broken into a major and minor
- * components with the major being the 4 MSB of a priority and minor
- * the 4 LSB. Thus (0 << 4) + 0 corresponds to priority 0 -- the highest
- * priority. And (15 << 4) + 14 corresponds to priority 254 -- the next
- * to the lowest priority.
- *
- * If your CPU does not have a "find first bit" instruction, then
- * there are ways to make do without it. Here are a handful of ways
- * to implement this in software:
- *
- * - a series of 16 bit test instructions
- * - a "binary search using if's"
- * - _number = 0
- * if _value > 0x00ff
- * _value >>=8
- * _number = 8;
- *
- * if _value > 0x0000f
- * _value >=8
- * _number += 4
- *
- * _number += bit_set_table[ _value ]
- *
- * where bit_set_table[ 16 ] has values which indicate the first
- * bit set
- */
-
-#define CPU_USE_GENERIC_BITFIELD_CODE TRUE
-#define CPU_USE_GENERIC_BITFIELD_DATA TRUE
-
-#if (CPU_USE_GENERIC_BITFIELD_CODE == FALSE)
-
-#define _CPU_Bitfield_Find_first_bit( _value, _output ) \
- { \
- (_output) = 0; /* do something to prevent warnings */ \
- }
-
-#endif
-
-/* end of Bitfield handler macros */
-
-/*
- * This routine builds the mask which corresponds to the bit fields
- * as searched by _CPU_Bitfield_Find_first_bit(). See the discussion
- * for that routine.
- */
-
-#if (CPU_USE_GENERIC_BITFIELD_CODE == FALSE)
-
-#define _CPU_Priority_Mask( _bit_number ) \
- ( 1 << (_bit_number) )
-
-#endif
-
-/*
- * This routine translates the bit numbers returned by
- * _CPU_Bitfield_Find_first_bit() into something suitable for use as
- * a major or minor component of a priority. See the discussion
- * for that routine.
- */
-
-#if (CPU_USE_GENERIC_BITFIELD_CODE == FALSE)
-
-#define _CPU_Priority_bits_index( _priority ) \
- (_priority)
-
-#endif
-
-/* end of Priority handler macros */
-
-/* functions */
-
-/*
- * _CPU_Initialize
- *
- * This routine performs CPU dependent initialization.
- */
-
-void _CPU_Initialize(
- rtems_cpu_table *cpu_table,
- void (*thread_dispatch)
-);
-
-/*
- * _CPU_ISR_install_raw_handler
- *
- * This routine installs a "raw" interrupt handler directly into the
- * processor's vector table.
- */
-
-void _CPU_ISR_install_raw_handler(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-);
-
-/*
- * _CPU_ISR_install_vector
- *
- * This routine installs an interrupt vector.
- */
-
-void _CPU_ISR_install_vector(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-);
-
-/*
- * _CPU_Install_interrupt_stack
- *
- * This routine installs the hardware interrupt stack pointer.
- *
- * NOTE: It need only be provided if CPU_HAS_HARDWARE_INTERRUPT_STACK
- * is TRUE.
- */
-
-void _CPU_Install_interrupt_stack( void );
-
-/*
- * _CPU_Internal_threads_Idle_thread_body
- *
- * This routine is the CPU dependent IDLE thread body.
- *
- * NOTE: It need only be provided if CPU_PROVIDES_IDLE_THREAD_BODY
- * is TRUE.
- */
-
-void _CPU_Thread_Idle_body( void );
-
-/*
- * _CPU_Context_switch
- *
- * This routine switches from the run context to the heir context.
- */
-
-void _CPU_Context_switch(
- Context_Control *run,
- Context_Control *heir
-);
-
-/*
- * _CPU_Context_restore
- *
- * This routine is generally used only to restart self in an
- * efficient manner. It may simply be a label in _CPU_Context_switch.
- *
- * NOTE: May be unnecessary to reload some registers.
- */
-
-void _CPU_Context_restore(
- Context_Control *new_context
-);
-
-/*
- * _CPU_Context_save_fp
- *
- * This routine saves the floating point context passed to it.
- */
-
-void _CPU_Context_save_fp(
- void **fp_context_ptr
-);
-
-/*
- * _CPU_Context_restore_fp
- *
- * This routine restores the floating point context passed to it.
- */
-
-void _CPU_Context_restore_fp(
- void **fp_context_ptr
-);
-
-/* The following routine swaps the endian format of an unsigned int.
- * It must be static because it is referenced indirectly.
- *
- * This version will work on any processor, but if there is a better
- * way for your CPU PLEASE use it. The most common way to do this is to:
- *
- * swap least significant two bytes with 16-bit rotate
- * swap upper and lower 16-bits
- * swap most significant two bytes with 16-bit rotate
- *
- * Some CPUs have special instructions which swap a 32-bit quantity in
- * a single instruction (e.g. i486). It is probably best to avoid
- * an "endian swapping control bit" in the CPU. One good reason is
- * that interrupts would probably have to be disabled to insure that
- * an interrupt does not try to access the same "chunk" with the wrong
- * endian. Another good reason is that on some CPUs, the endian bit
- * endianness for ALL fetches -- both code and data -- so the code
- * will be fetched incorrectly.
- */
-
-static inline unsigned int CPU_swap_u32(
- unsigned int value
-)
-{
- unsigned32 byte1, byte2, byte3, byte4, swapped;
-
- byte4 = (value >> 24) & 0xff;
- byte3 = (value >> 16) & 0xff;
- byte2 = (value >> 8) & 0xff;
- byte1 = value & 0xff;
-
- swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
- return( swapped );
-}
-
-#define CPU_swap_u16( value ) \
- (((value&0xff) << 8) | ((value >> 8)&0xff))
-
-/*
- * Miscellaneous prototypes
- *
- * NOTE: The names should have mips64orion in them.
- */
-
-void disable_int( unsigned32 mask );
-void enable_int( unsigned32 mask );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/c/src/exec/score/cpu/mips/rtems/score/mips.h b/c/src/exec/score/cpu/mips/rtems/score/mips.h
deleted file mode 100644
index 1ff139f604..0000000000
--- a/c/src/exec/score/cpu/mips/rtems/score/mips.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/* mips64orion.h
- *
- * Author: Craig Lebakken <craigl@transition.com>
- *
- * COPYRIGHT (c) 1996 by Transition Networks Inc.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Transition Networks not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * Transition Networks makes no representations about the suitability
- * of this software for any purpose.
- *
- * Derived from c/src/exec/score/cpu/no_cpu/no_cpu.h:
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-/* @(#)mips64orion.h 08/29/96 1.3 */
-
-#ifndef _INCLUDE_MIPS64ORION_h
-#define _INCLUDE_MIPS64ORION_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This file contains the information required to build
- * RTEMS for a particular member of the "no cpu"
- * family when executing in protected mode. It does
- * this by setting variables to indicate which implementation
- * dependent features are present in a particular member
- * of the family.
- */
-
-#if defined(R4650)
-
-#define CPU_MODEL_NAME "R4650"
-#define MIPS64ORION_HAS_FPU 1
-
-#elif defined(R4600)
-
-#define CPU_MODEL_NAME "R4600"
-#define MIPS64ORION_HAS_FPU 1
-
-#else
-
-#error "Unsupported CPU Model"
-
-#endif
-
-/*
- * Define the name of the CPU family.
- */
-
-#define CPU_NAME "MIPS R46xxx"
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* ! _INCLUDE_MIPS64ORION_h */
-/* end of include file */
diff --git a/c/src/exec/score/cpu/mips/rtems/score/mips64orion.h b/c/src/exec/score/cpu/mips/rtems/score/mips64orion.h
deleted file mode 100644
index 1ff139f604..0000000000
--- a/c/src/exec/score/cpu/mips/rtems/score/mips64orion.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/* mips64orion.h
- *
- * Author: Craig Lebakken <craigl@transition.com>
- *
- * COPYRIGHT (c) 1996 by Transition Networks Inc.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Transition Networks not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * Transition Networks makes no representations about the suitability
- * of this software for any purpose.
- *
- * Derived from c/src/exec/score/cpu/no_cpu/no_cpu.h:
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-/* @(#)mips64orion.h 08/29/96 1.3 */
-
-#ifndef _INCLUDE_MIPS64ORION_h
-#define _INCLUDE_MIPS64ORION_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This file contains the information required to build
- * RTEMS for a particular member of the "no cpu"
- * family when executing in protected mode. It does
- * this by setting variables to indicate which implementation
- * dependent features are present in a particular member
- * of the family.
- */
-
-#if defined(R4650)
-
-#define CPU_MODEL_NAME "R4650"
-#define MIPS64ORION_HAS_FPU 1
-
-#elif defined(R4600)
-
-#define CPU_MODEL_NAME "R4600"
-#define MIPS64ORION_HAS_FPU 1
-
-#else
-
-#error "Unsupported CPU Model"
-
-#endif
-
-/*
- * Define the name of the CPU family.
- */
-
-#define CPU_NAME "MIPS R46xxx"
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* ! _INCLUDE_MIPS64ORION_h */
-/* end of include file */
diff --git a/c/src/exec/score/cpu/mips/rtems/score/mipstypes.h b/c/src/exec/score/cpu/mips/rtems/score/mipstypes.h
deleted file mode 100644
index 9d82f2a5d0..0000000000
--- a/c/src/exec/score/cpu/mips/rtems/score/mipstypes.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* mipstypes.h
- *
- * This include file contains type definitions pertaining to the IDT 4650
- * processor family.
- *
- * Author: Craig Lebakken <craigl@transition.com>
- *
- * COPYRIGHT (c) 1996 by Transition Networks Inc.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Transition Networks not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * Transition Networks makes no representations about the suitability
- * of this software for any purpose.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-/* @(#)mipstypes.h 08/20/96 1.4 */
-
-#ifndef __MIPS_TYPES_h
-#define __MIPS_TYPES_h
-
-#ifndef ASM
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This section defines the basic types for this processor.
- */
-
-typedef unsigned char unsigned8; /* unsigned 8-bit integer */
-typedef unsigned short unsigned16; /* unsigned 16-bit integer */
-typedef unsigned int unsigned32; /* unsigned 32-bit integer */
-typedef unsigned long long unsigned64; /* unsigned 64-bit integer */
-
-typedef unsigned16 Priority_Bit_map_control;
-
-typedef signed char signed8; /* 8-bit signed integer */
-typedef signed short signed16; /* 16-bit signed integer */
-typedef signed int signed32; /* 32-bit signed integer */
-typedef signed long long signed64; /* 64 bit signed integer */
-
-typedef unsigned32 boolean; /* Boolean value */
-
-typedef float single_precision; /* single precision float */
-typedef double double_precision; /* double precision float */
-
-typedef void mips_isr;
-typedef void ( *mips_isr_entry )( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !ASM */
-
-#endif
-/* end of include file */
diff --git a/c/src/exec/score/cpu/mips/rtems/score/types.h b/c/src/exec/score/cpu/mips/rtems/score/types.h
deleted file mode 100644
index 9d82f2a5d0..0000000000
--- a/c/src/exec/score/cpu/mips/rtems/score/types.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* mipstypes.h
- *
- * This include file contains type definitions pertaining to the IDT 4650
- * processor family.
- *
- * Author: Craig Lebakken <craigl@transition.com>
- *
- * COPYRIGHT (c) 1996 by Transition Networks Inc.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Transition Networks not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * Transition Networks makes no representations about the suitability
- * of this software for any purpose.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-/* @(#)mipstypes.h 08/20/96 1.4 */
-
-#ifndef __MIPS_TYPES_h
-#define __MIPS_TYPES_h
-
-#ifndef ASM
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This section defines the basic types for this processor.
- */
-
-typedef unsigned char unsigned8; /* unsigned 8-bit integer */
-typedef unsigned short unsigned16; /* unsigned 16-bit integer */
-typedef unsigned int unsigned32; /* unsigned 32-bit integer */
-typedef unsigned long long unsigned64; /* unsigned 64-bit integer */
-
-typedef unsigned16 Priority_Bit_map_control;
-
-typedef signed char signed8; /* 8-bit signed integer */
-typedef signed short signed16; /* 16-bit signed integer */
-typedef signed int signed32; /* 32-bit signed integer */
-typedef signed long long signed64; /* 64 bit signed integer */
-
-typedef unsigned32 boolean; /* Boolean value */
-
-typedef float single_precision; /* single precision float */
-typedef double double_precision; /* double precision float */
-
-typedef void mips_isr;
-typedef void ( *mips_isr_entry )( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !ASM */
-
-#endif
-/* end of include file */
diff --git a/c/src/exec/score/cpu/mips64orion/rtems/score/types.h b/c/src/exec/score/cpu/mips64orion/rtems/score/types.h
deleted file mode 100644
index 9d82f2a5d0..0000000000
--- a/c/src/exec/score/cpu/mips64orion/rtems/score/types.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* mipstypes.h
- *
- * This include file contains type definitions pertaining to the IDT 4650
- * processor family.
- *
- * Author: Craig Lebakken <craigl@transition.com>
- *
- * COPYRIGHT (c) 1996 by Transition Networks Inc.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Transition Networks not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * Transition Networks makes no representations about the suitability
- * of this software for any purpose.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-/* @(#)mipstypes.h 08/20/96 1.4 */
-
-#ifndef __MIPS_TYPES_h
-#define __MIPS_TYPES_h
-
-#ifndef ASM
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This section defines the basic types for this processor.
- */
-
-typedef unsigned char unsigned8; /* unsigned 8-bit integer */
-typedef unsigned short unsigned16; /* unsigned 16-bit integer */
-typedef unsigned int unsigned32; /* unsigned 32-bit integer */
-typedef unsigned long long unsigned64; /* unsigned 64-bit integer */
-
-typedef unsigned16 Priority_Bit_map_control;
-
-typedef signed char signed8; /* 8-bit signed integer */
-typedef signed short signed16; /* 16-bit signed integer */
-typedef signed int signed32; /* 32-bit signed integer */
-typedef signed long long signed64; /* 64 bit signed integer */
-
-typedef unsigned32 boolean; /* Boolean value */
-
-typedef float single_precision; /* single precision float */
-typedef double double_precision; /* double precision float */
-
-typedef void mips_isr;
-typedef void ( *mips_isr_entry )( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !ASM */
-
-#endif
-/* end of include file */
diff --git a/c/src/exec/score/cpu/no_cpu/rtems/score/types.h b/c/src/exec/score/cpu/no_cpu/rtems/score/types.h
deleted file mode 100644
index 6dea57ebf3..0000000000
--- a/c/src/exec/score/cpu/no_cpu/rtems/score/types.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* no_cputypes.h
- *
- * This include file contains type definitions pertaining to the Intel
- * no_cpu processor family.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __NO_CPU_TYPES_h
-#define __NO_CPU_TYPES_h
-
-#ifndef ASM
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This section defines the basic types for this processor.
- */
-
-typedef unsigned char unsigned8; /* unsigned 8-bit integer */
-typedef unsigned short unsigned16; /* unsigned 16-bit integer */
-typedef unsigned int unsigned32; /* unsigned 32-bit integer */
-typedef unsigned long long unsigned64; /* unsigned 64-bit integer */
-
-typedef unsigned16 Priority_Bit_map_control;
-
-typedef signed char signed8; /* 8-bit signed integer */
-typedef signed short signed16; /* 16-bit signed integer */
-typedef signed int signed32; /* 32-bit signed integer */
-typedef signed long long signed64; /* 64 bit signed integer */
-
-typedef unsigned32 boolean; /* Boolean value */
-
-typedef float single_precision; /* single precision float */
-typedef double double_precision; /* double precision float */
-
-typedef void no_cpu_isr;
-typedef void ( *no_cpu_isr_entry )( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !ASM */
-
-#endif
-/* end of include file */
diff --git a/c/src/exec/score/cpu/powerpc/asm.h b/c/src/exec/score/cpu/powerpc/asm.h
deleted file mode 100644
index af14c95665..0000000000
--- a/c/src/exec/score/cpu/powerpc/asm.h
+++ /dev/null
@@ -1,275 +0,0 @@
-/* asm.h
- *
- * This include file attempts to address the problems
- * caused by incompatible flavors of assemblers and
- * toolsets. It primarily addresses variations in the
- * use of leading underscores on symbols and the requirement
- * that register names be preceded by a %.
- *
- *
- * NOTE: The spacing in the use of these macros
- * is critical to them working as advertised.
- *
- * COPYRIGHT:
- *
- * This file is based on similar code found in newlib available
- * from ftp.cygnus.com. The file which was used had no copyright
- * notice. This file is freely distributable as long as the source
- * of the file is noted. This file is:
- *
- * COPYRIGHT (c) 1995.
- * i-cubed ltd.
- *
- * COPYRIGHT (c) 1994.
- * On-Line Applications Research Corporation (OAR).
- *
- * $Id$
- */
-
-#ifndef __PPC_ASM_h
-#define __PPC_ASM_h
-
-/*
- * Indicate we are in an assembly file and get the basic CPU definitions.
- */
-
-#ifndef ASM
-#define ASM
-#endif
-#include <rtems/score/targopts.h>
-#include <rtems/score/ppc.h>
-
-/*
- * Recent versions of GNU cpp define variables which indicate the
- * need for underscores and percents. If not using GNU cpp or
- * the version does not support this, then you will obviously
- * have to define these as appropriate.
- */
-
-#ifndef __USER_LABEL_PREFIX__
-#define __USER_LABEL_PREFIX__
-#endif
-
-#ifndef __REGISTER_PREFIX__
-#define __REGISTER_PREFIX__
-#endif
-
-#ifndef __FLOAT_REGISTER_PREFIX__
-#define __FLOAT_REGISTER_PREFIX__ __REGISTER_PREFIX__
-#endif
-
-#if (PPC_ABI == PPC_ABI_POWEROPEN)
-#ifndef __PROC_LABEL_PREFIX__
-#define __PROC_LABEL_PREFIX__ .
-#endif
-#endif
-
-#ifndef __PROC_LABEL_PREFIX__
-#define __PROC_LABEL_PREFIX__ __USER_LABEL_PREFIX__
-#endif
-
-/* ANSI concatenation macros. */
-
-#define CONCAT1(a, b) CONCAT2(a, b)
-#define CONCAT2(a, b) a ## b
-
-/* Use the right prefix for global labels. */
-
-#define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
-
-/* Use the right prefix for procedure labels. */
-
-#define PROC(x) CONCAT1 (__PROC_LABEL_PREFIX__, x)
-
-/* Use the right prefix for registers. */
-
-#define REG(x) CONCAT1 (__REGISTER_PREFIX__, x)
-
-/* Use the right prefix for floating point registers. */
-
-#define FREG(x) CONCAT1 (__FLOAT_REGISTER_PREFIX__, x)
-
-/*
- * define macros for all of the registers on this CPU
- *
- * EXAMPLE: #define d0 REG (d0)
- */
-#define r0 REG(0)
-#define r1 REG(1)
-#define r2 REG(2)
-#define r3 REG(3)
-#define r4 REG(4)
-#define r5 REG(5)
-#define r6 REG(6)
-#define r7 REG(7)
-#define r8 REG(8)
-#define r9 REG(9)
-#define r10 REG(10)
-#define r11 REG(11)
-#define r12 REG(12)
-#define r13 REG(13)
-#define r14 REG(14)
-#define r15 REG(15)
-#define r16 REG(16)
-#define r17 REG(17)
-#define r18 REG(18)
-#define r19 REG(19)
-#define r20 REG(20)
-#define r21 REG(21)
-#define r22 REG(22)
-#define r23 REG(23)
-#define r24 REG(24)
-#define r25 REG(25)
-#define r26 REG(26)
-#define r27 REG(27)
-#define r28 REG(28)
-#define r29 REG(29)
-#define r30 REG(30)
-#define r31 REG(31)
-#define f0 FREG(0)
-#define f1 FREG(1)
-#define f2 FREG(2)
-#define f3 FREG(3)
-#define f4 FREG(4)
-#define f5 FREG(5)
-#define f6 FREG(6)
-#define f7 FREG(7)
-#define f8 FREG(8)
-#define f9 FREG(9)
-#define f10 FREG(10)
-#define f11 FREG(11)
-#define f12 FREG(12)
-#define f13 FREG(13)
-#define f14 FREG(14)
-#define f15 FREG(15)
-#define f16 FREG(16)
-#define f17 FREG(17)
-#define f18 FREG(18)
-#define f19 FREG(19)
-#define f20 FREG(20)
-#define f21 FREG(21)
-#define f22 FREG(22)
-#define f23 FREG(23)
-#define f24 FREG(24)
-#define f25 FREG(25)
-#define f26 FREG(26)
-#define f27 FREG(27)
-#define f28 FREG(28)
-#define f29 FREG(29)
-#define f30 FREG(30)
-#define f31 FREG(31)
-
-/*
- * Some special purpose registers (SPRs).
- */
-#define srr0 0x01a
-#define srr1 0x01b
-#define srr2 0x3de /* IBM 400 series only */
-#define srr3 0x3df /* IBM 400 series only */
-#define sprg0 0x110
-#define sprg1 0x111
-#define sprg2 0x112
-#define sprg3 0x113
-
-
-/* the following SPR/DCR registers exist only in IBM 400 series */
-#define dear 0x3d5
-#define evpr 0x3d6 /* SPR: exception vector prefix register */
-#define iccr 0x3fb /* SPR: instruction cache control reg. */
-#define dccr 0x3fa /* SPR: data cache control reg. */
-
-#define exisr 0x040 /* DCR: external interrupt status register */
-#define exier 0x042 /* DCR: external interrupt enable register */
-#define br0 0x080 /* DCR: memory bank register 0 */
-#define br1 0x081 /* DCR: memory bank register 1 */
-#define br2 0x082 /* DCR: memory bank register 2 */
-#define br3 0x083 /* DCR: memory bank register 3 */
-#define br4 0x084 /* DCR: memory bank register 4 */
-#define br5 0x085 /* DCR: memory bank register 5 */
-#define br6 0x086 /* DCR: memory bank register 6 */
-#define br7 0x087 /* DCR: memory bank register 7 */
-/* end of IBM400 series register definitions */
-
-/* The following registers are for the MPC8x0 */
-#define der 0x095 /* Debug Enable Register */
-/* end of MPC8x0 registers */
-
-/*
- * Following must be tailor for a particular flavor of the C compiler.
- * They may need to put underscores in front of the symbols.
- */
-
-#define PUBLIC_VAR(sym) .globl SYM (sym)
-#define EXTERN_VAR(sym) .extern SYM (sym)
-#define PUBLIC_PROC(sym) .globl PROC (sym)
-#define EXTERN_PROC(sym) .extern PROC (sym)
-
-/* Other potentially assembler specific operations */
-#if PPC_ASM == PPC_ASM_ELF
-#define ALIGN(n,p) .align p
-#define DESCRIPTOR(x) \
- .section .descriptors,"aw"; \
- PUBLIC_VAR (x); \
-SYM (x):; \
- .long PROC (x); \
- .long s.got; \
- .long 0
-
-#define EXT_SYM_REF(x) .long x
-#define EXT_PROC_REF(x) .long x
-
-/*
- * Define macros to handle section beginning and ends.
- */
-
-#define BEGIN_CODE_DCL .text
-#define END_CODE_DCL
-#define BEGIN_DATA_DCL .data
-#define END_DATA_DCL
-#define BEGIN_CODE .text
-#define END_CODE
-#define BEGIN_DATA .data
-#define END_DATA
-#define BEGIN_BSS .bss
-#define END_BSS
-#define END
-
-#elif PPC_ASM == PPC_ASM_XCOFF
-#define ALIGN(n,p) .align p
-#define DESCRIPTOR(x) \
- .csect x[DS]; \
- .globl x[DS]; \
- .long PROC (x)[PR]; \
- .long TOC[tc0]
-
-#define EXT_SYM_REF(x) .long x[RW]
-#define EXT_PROC_REF(x) .long x[DS]
-
-/*
- * Define macros to handle section beginning and ends.
- */
-
-#define BEGIN_CODE_DCL .csect .text[PR]
-#define END_CODE_DCL
-#define BEGIN_DATA_DCL .csect .data[RW]
-#define END_DATA_DCL
-#define BEGIN_CODE .csect .text[PR]
-#define END_CODE
-#define BEGIN_DATA .csect .data[RW]
-#define END_DATA
-#define BEGIN_BSS .bss
-#define END_BSS
-#define END
-
-#else
-#error "PPC_ASM_TYPE is not properly defined"
-#endif
-#ifndef PPC_ASM
-#error "PPC_ASM_TYPE is not properly defined"
-#endif
-
-
-#endif
-/* end of include file */
-
-
diff --git a/c/src/exec/score/cpu/powerpc/rtems/score/ppc.h b/c/src/exec/score/cpu/powerpc/rtems/score/ppc.h
deleted file mode 100644
index ff93f9b1b3..0000000000
--- a/c/src/exec/score/cpu/powerpc/rtems/score/ppc.h
+++ /dev/null
@@ -1,632 +0,0 @@
-/* ppc.h
- *
- * This file contains definitions for the IBM/Motorola PowerPC
- * family members.
- *
- * Author: Andrew Bray <andy@i-cubed.co.uk>
- *
- * COPYRIGHT (c) 1995 by i-cubed ltd.
- *
- * MPC860 support code was added by Jay Monkman <jmonkman@frasca.com>
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of i-cubed limited not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * i-cubed limited makes no representations about the suitability
- * of this software for any purpose.
- *
- * Derived from c/src/exec/cpu/no_cpu/no_cpu.h:
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- *
- * Note:
- * This file is included by both C and assembler code ( -DASM )
- *
- * $Id$
- */
-
-
-#ifndef _INCLUDE_PPC_h
-#define _INCLUDE_PPC_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Define the name of the CPU family.
- */
-
-#define CPU_NAME "PowerPC"
-
-/*
- * This file contains the information required to build
- * RTEMS for a particular member of the PowerPC family. It does
- * this by setting variables to indicate which implementation
- * dependent features are present in a particular member
- * of the family.
- *
- * The following architectural feature definitions are defaulted
- * unless specifically set by the model definition:
- *
- * + PPC_DEBUG_MODEL - PPC_DEBUG_MODEL_STANDARD
- * + PPC_INTERRUPT_MAX - 16
- * + PPC_CACHE_ALIGNMENT - 32
- * + PPC_LOW_POWER_MODE - PPC_LOW_POWER_MODE_NONE
- * + PPC_HAS_EXCEPTION_PREFIX - 1
- * + PPC_HAS_FPU - 1
- * + PPC_HAS_DOUBLE - 1 if PPC_HAS_FPU,
- * - 0 otherwise
- * + PPC_USE_MULTIPLE - 0
- */
-
-/*
- * Define the debugging assistance models found in the PPC family.
- *
- * Standard: single step and branch trace
- * Single Step Only: single step only
- * IBM 4xx: debug exception
- */
-
-#define PPC_DEBUG_MODEL_STANDARD 1
-#define PPC_DEBUG_MODEL_SINGLE_STEP_ONLY 2
-#define PPC_DEBUG_MODEL_IBM4xx 3
-
-/*
- * Define the low power mode models
- *
- * Standard: as defined for 603e
- * Nap Mode: nap mode only (604)
- * XXX 403GB, 603, 603e, 604, 821
- */
-
-#define PPC_LOW_POWER_MODE_NONE 0
-#define PPC_LOW_POWER_MODE_STANDARD 1
-
-#if defined(ppc403)
-/*
- * IBM 403
- *
- * Developed for 403GA. Book checked for 403GB.
- *
- * Does not have user mode.
- */
-
-#define CPU_MODEL_NAME "PowerPC 403"
-#define PPC_ALIGNMENT 4
-#define PPC_CACHE_ALIGNMENT 16
-#define PPC_HAS_RFCI 1
-#define PPC_HAS_FPU 0
-#define PPC_USE_MULTIPLE 1
-#define PPC_I_CACHE 2048
-#define PPC_D_CACHE 1024
-
-#define PPC_DEBUG_MODEL PPC_DEBUG_MODEL_IBM4xx
-#define PPC_HAS_EXCEPTION_PREFIX 0
-#define PPC_HAS_EVPR 1
-
-
-#elif defined(mpc505) || defined(mpc509)
-/*
- * Submitted by Sergei Organov <osv@Javad.RU> as a patch against
- * 3.6.0 long after 4.0 was released. This is just an attempt
- * to get the setting correct.
- */
-
-#define CPU_MODEL_NAME "PowerPC 505/509"
-
-#define PPC_ALIGNMENT 4
-#define PPC_CACHE_ALIGNMENT 16
-#define PPC_I_CACHE 4096
-#define PPC_I_CACHE 0
-
-
-#elif defined(ppc601)
-
-/*
- * Submitted with original port -- book checked only.
- */
-
-#define CPU_MODEL_NAME "PowerPC 601"
-
-#define PPC_ALIGNMENT 8
-#define PPC_USE_MULTIPLE 1
-#define PPC_I_CACHE 0
-#define PPC_D_CACHE 32768
-
-#define PPC_DEBUG_MODEL PPC_DEBUG_MODEL_SINGLE_STEP_ONLY
-
-#elif defined(ppc602)
-/*
- * Submitted with original port -- book checked only.
- */
-
-#define CPU_MODEL_NAME "PowerPC 602"
-
-#define PPC_ALIGNMENT 4
-#define PPC_HAS_DOUBLE 0
-#define PPC_I_CACHE 4096
-#define PPC_D_CACHE 4096
-
-#elif defined(ppc603)
-/*
- * Submitted with original port -- book checked only.
- */
-
-#define CPU_MODEL_NAME "PowerPC 603"
-
-#define PPC_ALIGNMENT 8
-#define PPC_I_CACHE 8192
-#define PPC_D_CACHE 8192
-
-#elif defined(ppc603e)
-
-#define CPU_MODEL_NAME "PowerPC 603e"
-/*
- * Submitted with original port.
- *
- * Known to work on real hardware.
- */
-
-#define PPC_ALIGNMENT 8
-#define PPC_I_CACHE 16384
-#define PPC_D_CACHE 16384
-
-#define PPC_LOW_POWER_MODE PPC_LOW_POWER_MODE_STANDARD
-
-#elif defined(mpc604)
-/*
- * Submitted with original port -- book checked only.
- */
-
-#define CPU_MODEL_NAME "PowerPC 604"
-
-#define PPC_ALIGNMENT 8
-#define PPC_I_CACHE 16384
-#define PPC_D_CACHE 16384
-
-#elif defined(mpc860)
-/*
- * Added by Jay Monkman (jmonkman@frasca.com) 6/28/98
- */
-#define CPU_MODEL_NAME "PowerPC MPC860"
-
-#define PPC_ALIGNMENT 4
-#define PPC_I_CACHE 4096
-#define PPC_D_CACHE 4096
-#define PPC_CACHE_ALIGNMENT 16
-#define PPC_INTERRUPT_MAX 71
-#define PPC_HAS_FPU 0
-#define PPC_HAS_DOUBLE 0
-#define PPC_USE_MULTIPLE 1
-#define PPC_USE_SPRG 1
-
-#define PPC_MSR_0 0x00009000
-#define PPC_MSR_1 0x00001000
-#define PPC_MSR_2 0x00001000
-#define PPC_MSR_3 0x00000000
-
-#elif defined(mpc821)
-/*
- * Added by Andrew Bray <andy@chaos.org.uk> 6/April/1999
- */
-#define CPU_MODEL_NAME "PowerPC MPC821"
-
-#define PPC_ALIGNMENT 4
-#define PPC_I_CACHE 4096
-#define PPC_D_CACHE 4096
-#define PPC_CACHE_ALIGNMENT 16
-#define PPC_INTERRUPT_MAX 71
-#define PPC_HAS_FPU 0
-#define PPC_HAS_DOUBLE 0
-
-#define PPC_MSR_0 0x00009000
-#define PPC_MSR_1 0x00001000
-#define PPC_MSR_2 0x00001000
-#define PPC_MSR_3 0x00000000
-
-#elif defined(mpc750)
-
-#define CPU_MODEL_NAME "PowerPC 750"
-
-#define PPC_ALIGNMENT 8
-#define PPC_I_CACHE 16384
-#define PPC_D_CACHE 16384
-
-#else
-
-#error "Unsupported CPU Model"
-
-#endif
-
-/*
- * Application binary interfaces.
- *
- * PPC_ABI MUST be defined as one of these.
- * Only PPC_ABI_POWEROPEN is currently fully supported.
- * Only EABI will be supported in the end when
- * the tools are there.
- * Only big endian is currently supported.
- */
-/*
- * PowerOpen ABI. This is Andy's hack of the
- * PowerOpen ABI to ELF. ELF rather than a
- * XCOFF assembler is used. This may work
- * if PPC_ASM == PPC_ASM_XCOFF is defined.
- */
-#define PPC_ABI_POWEROPEN 0
-/*
- * GCC 2.7.0 munched version of EABI, with
- * PowerOpen calling convention and stack frames,
- * but EABI style indirect function calls.
- */
-#define PPC_ABI_GCC27 1
-/*
- * SVR4 ABI
- */
-#define PPC_ABI_SVR4 2
-/*
- * Embedded ABI
- */
-#define PPC_ABI_EABI 3
-
-#if (PPC_ABI == PPC_ABI_POWEROPEN)
-#define PPC_STACK_ALIGNMENT 8
-#elif (PPC_ABI == PPC_ABI_GCC27)
-#define PPC_STACK_ALIGNMENT 8
-#elif (PPC_ABI == PPC_ABI_SVR4)
-#define PPC_STACK_ALIGNMENT 16
-#elif (PPC_ABI == PPC_ABI_EABI)
-#define PPC_STACK_ALIGNMENT 8
-#else
-#error "PPC_ABI is not properly defined"
-#endif
-#ifndef PPC_ABI
-#error "PPC_ABI is not properly defined"
-#endif
-
-/*
- * Assemblers.
- * PPC_ASM MUST be defined as one of these.
- *
- * PPC_ASM_ELF: ELF assembler. Currently used for all ABIs.
- * PPC_ASM_XCOFF: XCOFF assembler. May be needed for PowerOpen ABI.
- *
- * NOTE: Only PPC_ABI_ELF is currently fully supported.
- */
-
-#define PPC_ASM_ELF 0
-#define PPC_ASM_XCOFF 1
-
-/*
- * Use the default debug scheme defined in the architectural specification
- * if another model has not been specified.
- */
-
-#ifndef PPC_DEBUG_MODEL
-#define PPC_DEBUG_MODEL PPC_DEBUG_MODEL_STANDARD
-#endif
-
-/*
- * If the maximum number of exception sources has not been defined,
- * then default it to 16.
- */
-
-#ifndef PPC_INTERRUPT_MAX
-#define PPC_INTERRUPT_MAX 16
-#endif
-
-/*
- * Unless specified otherwise, the cache line size is defaulted to 32.
- *
- * The derive the power of 2 the cache line is.
- */
-
-#ifndef PPC_CACHE_ALIGNMENT
-#define PPC_CACHE_ALIGNMENT 32
-#endif
-
-#if (PPC_CACHE_ALIGNMENT == 16)
-#define PPC_CACHE_ALIGN_POWER 4
-#elif (PPC_CACHE_ALIGNMENT == 32)
-#define PPC_CACHE_ALIGN_POWER 5
-#else
-#error "Undefined power of 2 for PPC_CACHE_ALIGNMENT"
-#endif
-
-/*
- * Unless otherwise specified, assume the model has an IP/EP bit to
- * set the exception address prefix.
- */
-
-#ifndef PPC_HAS_EXCEPTION_PREFIX
-#define PPC_HAS_EXCEPTION_PREFIX 1
-#endif
-
-/*
- * Unless otherwise specified, assume the model does NOT have
- * 403 style EVPR register to set the exception address prefix.
- */
-
-#ifndef PPC_HAS_EVPR
-#define PPC_HAS_EVPR 0
-#endif
-
-/*
- * If no low power mode model was specified, then assume there is none.
- */
-
-#ifndef PPC_LOW_POWER_MODE
-#define PPC_LOW_POWER_MODE PPC_LOW_POWER_MODE_NONE
-#endif
-
-/*
- * Unless specified above, then assume the model has FP support.
- */
-
-#ifndef PPC_HAS_FPU
-#define PPC_HAS_FPU 1
-#endif
-
-/*
- * Unless specified above, If the model has FP support, it is assumed to
- * support doubles (8-byte floating point numbers).
- *
- * If the model does NOT have FP support, then the model does
- * NOT have double length FP registers.
- */
-
-#ifndef PPC_HAS_DOUBLE
-#if (PPC_HAS_FPU)
-#define PPC_HAS_DOUBLE 1
-#else
-#define PPC_HAS_DOUBLE 0
-#endif
-#endif
-
-/*
- * Unless specified above, then assume the model does NOT have critical
- * interrupt support.
- */
-
-#ifndef PPC_HAS_RFCI
-#define PPC_HAS_RFCI 0
-#endif
-
-/*
- * Unless specified above, do not use the load/store multiple instructions
- * in a context switch.
- */
-
-#ifndef PPC_USE_MULTIPLE
-#define PPC_USE_MULTIPLE 0
-#endif
-
-/*
- * The following exceptions are not maskable, and are not
- * necessarily predictable, so cannot be offered to RTEMS:
- * Alignment exception - handled by the CPU module
- * Data exceptions.
- * Instruction exceptions.
- */
-
-/*
- * Base Interrupt vectors supported on all models.
- */
-#define PPC_IRQ_SYSTEM_RESET 0 /* 0x00100 - System reset. */
-#define PPC_IRQ_MCHECK 1 /* 0x00200 - Machine check */
-#define PPC_IRQ_PROTECT 2 /* 0x00300 - Protection violation */
-#define PPC_IRQ_ISI 3 /* 0x00400 - Instruction Fetch error */
-#define PPC_IRQ_EXTERNAL 4 /* 0x00500 - External interrupt */
-#define PPC_IRQ_ALIGNMENT 5 /* 0X00600 - Alignment exception */
-#define PPC_IRQ_PROGRAM 6 /* 0x00700 - Program exception */
-#define PPC_IRQ_NOFP 7 /* 0x00800 - Floating point unavailable */
-#define PPC_IRQ_DECREMENTER 8 /* 0x00900 - Decrementer interrupt */
-#define PPC_IRQ_RESERVED_A 9 /* 0x00a00 - Implementation Reserved */
-#define PPC_IRQ_RESERVED_B 10 /* 0x00a00 - Implementation Reserved */
-#define PPC_IRQ_SCALL 11 /* 0x00c00 - System call */
-#define PPC_IRQ_TRACE 12 /* 0x00d00 - Trace Exception */
-#define PPC_IRQ_FP_ASST 13 /* ox00e00 - Floating point assist */
-#define PPC_STD_IRQ_LAST PPC_IRQ_FP_ASST
-
-#define PPC_IRQ_FIRST PPC_IRQ_SYSTEM_RESET
-
-#if defined(ppc403)
-
-#define PPC_IRQ_CRIT PPC_IRQ_SYSTEM_RESET /*0x00100- Critical int. pin */
-#define PPC_IRQ_PIT (PPC_STD_IRQ_LAST+1) /*0x01000- Pgm interval timer*/
-#define PPC_IRQ_FIT (PPC_STD_IRQ_LAST+2) /*0x01010- Fixed int. timer */
-#define PPC_IRQ_WATCHDOG (PPC_STD_IRQ_LAST+3) /*0x01020- Watchdog timer */
-#define PPC_IRQ_DEBUG (PPC_STD_IRQ_LAST+4) /*0x02000- Debug exceptions */
-#define PPC_IRQ_LAST PPC_IRQ_DEBUG
-
-#elif defined(ppc601)
-#define PPC_IRQ_TRACE (PPC_STD_IRQ_LAST+1) /*0x02000-Run/Trace Exception*/
-#define PPC_IRQ_LAST PPC_IRQ_TRACE
-
-#elif defined(ppc602)
-#define PPC_IRQ_LAST (PPC_STD_IRQ_LAST)
-
-#elif defined(ppc603)
-#define PPC_IRQ_TRANS_MISS (PPC_STD_IRQ_LAST+1) /*0x1000-Ins Translation Miss*/
-#define PPC_IRQ_DATA_LOAD (PPC_STD_IRQ_LAST+2) /*0x1100-Data Load Trans Miss*/
-#define PPC_IRQ_DATA_STORE (PPC_STD_IRQ_LAST+3) /*0x1200-Data Store Miss */
-#define PPC_IRQ_ADDR_BRK (PPC_STD_IRQ_LAST+4) /*0x1300-Instruction Bkpoint */
-#define PPC_IRQ_SYS_MGT (PPC_STD_IRQ_LAST+5) /*0x1400-System Management */
-#define PPC_IRQ_LAST PPC_IRQ_SYS_MGT
-
-#elif defined(ppc603e)
-#define PPC_TLB_INST_MISS (PPC_STD_IRQ_LAST+1) /*0x1000-Instruction TLB Miss*/
-#define PPC_TLB_LOAD_MISS (PPC_STD_IRQ_LAST+2) /*0x1100-TLB miss on load */
-#define PPC_TLB_STORE_MISS (PPC_STD_IRQ_LAST+3) /*0x1200-TLB Miss on store */
-#define PPC_IRQ_ADDRBRK (PPC_STD_IRQ_LAST+4) /*0x1300-Instruct addr break */
-#define PPC_IRQ_SYS_MGT (PPC_STD_IRQ_LAST+5) /*0x1400-System Management */
-#define PPC_IRQ_LAST PPC_IRQ_SYS_MGT
-
-
-#elif defined(mpc604)
-#define PPC_IRQ_ADDR_BRK (PPC_STD_IRQ_LAST+1) /*0x1300- Inst. addr break */
-#define PPC_IRQ_SYS_MGT (PPC_STD_IRQ_LAST+2) /*0x1400- System Management */
-#define PPC_IRQ_LAST PPC_IRQ_SYS_MGT
-
-#elif defined(mpc860) || defined(mpc821)
-#define PPC_IRQ_EMULATE (PPC_STD_IRQ_LAST+1) /*0x1000-Software emulation */
-#define PPC_IRQ_INST_MISS (PPC_STD_IRQ_LAST+2) /*0x1100-Instruction TLB miss*/
-#define PPC_IRQ_DATA_MISS (PPC_STD_IRQ_LAST+3) /*0x1200-Data TLB miss */
-#define PPC_IRQ_INST_ERR (PPC_STD_IRQ_LAST+4) /*0x1300-Instruction TLB err */
-#define PPC_IRQ_DATA_ERR (PPC_STD_IRQ_LAST+5) /*0x1400-Data TLB error */
-#define PPC_IRQ_DATA_BPNT (PPC_STD_IRQ_LAST+6) /*0x1C00-Data breakpoint */
-#define PPC_IRQ_INST_BPNT (PPC_STD_IRQ_LAST+7) /*0x1D00-Inst breakpoint */
-#define PPC_IRQ_IO_BPNT (PPC_STD_IRQ_LAST+8) /*0x1E00-Peripheral breakpnt */
-#define PPC_IRQ_DEV_PORT (PPC_STD_IRQ_LAST+9) /*0x1F00-Development port */
-#define PPC_IRQ_IRQ0 (PPC_STD_IRQ_LAST + 10)
-#define PPC_IRQ_LVL0 (PPC_STD_IRQ_LAST + 11)
-#define PPC_IRQ_IRQ1 (PPC_STD_IRQ_LAST + 12)
-#define PPC_IRQ_LVL1 (PPC_STD_IRQ_LAST + 13)
-#define PPC_IRQ_IRQ2 (PPC_STD_IRQ_LAST + 14)
-#define PPC_IRQ_LVL2 (PPC_STD_IRQ_LAST + 15)
-#define PPC_IRQ_IRQ3 (PPC_STD_IRQ_LAST + 16)
-#define PPC_IRQ_LVL3 (PPC_STD_IRQ_LAST + 17)
-#define PPC_IRQ_IRQ4 (PPC_STD_IRQ_LAST + 18)
-#define PPC_IRQ_LVL4 (PPC_STD_IRQ_LAST + 19)
-#define PPC_IRQ_IRQ5 (PPC_STD_IRQ_LAST + 20)
-#define PPC_IRQ_LVL5 (PPC_STD_IRQ_LAST + 21)
-#define PPC_IRQ_IRQ6 (PPC_STD_IRQ_LAST + 22)
-#define PPC_IRQ_LVL6 (PPC_STD_IRQ_LAST + 23)
-#define PPC_IRQ_IRQ7 (PPC_STD_IRQ_LAST + 24)
-#define PPC_IRQ_LVL7 (PPC_STD_IRQ_LAST + 25)
-#define PPC_IRQ_CPM_RESERVED_0 (PPC_STD_IRQ_LAST + 26)
-#define PPC_IRQ_CPM_PC4 (PPC_STD_IRQ_LAST + 27)
-#define PPC_IRQ_CPM_PC5 (PPC_STD_IRQ_LAST + 28)
-#define PPC_IRQ_CPM_SMC2 (PPC_STD_IRQ_LAST + 29)
-#define PPC_IRQ_CPM_SMC1 (PPC_STD_IRQ_LAST + 30)
-#define PPC_IRQ_CPM_SPI (PPC_STD_IRQ_LAST + 31)
-#define PPC_IRQ_CPM_PC6 (PPC_STD_IRQ_LAST + 32)
-#define PPC_IRQ_CPM_TIMER4 (PPC_STD_IRQ_LAST + 33)
-#define PPC_IRQ_CPM_RESERVED_8 (PPC_STD_IRQ_LAST + 34)
-#define PPC_IRQ_CPM_PC7 (PPC_STD_IRQ_LAST + 35)
-#define PPC_IRQ_CPM_PC8 (PPC_STD_IRQ_LAST + 36)
-#define PPC_IRQ_CPM_PC9 (PPC_STD_IRQ_LAST + 37)
-#define PPC_IRQ_CPM_TIMER3 (PPC_STD_IRQ_LAST + 38)
-#define PPC_IRQ_CPM_RESERVED_D (PPC_STD_IRQ_LAST + 39)
-#define PPC_IRQ_CPM_PC10 (PPC_STD_IRQ_LAST + 40)
-#define PPC_IRQ_CPM_PC11 (PPC_STD_IRQ_LAST + 41)
-#define PPC_IRQ_CPM_I2C (PPC_STD_IRQ_LAST + 42)
-#define PPC_IRQ_CPM_RISC_TIMER (PPC_STD_IRQ_LAST + 43)
-#define PPC_IRQ_CPM_TIMER2 (PPC_STD_IRQ_LAST + 44)
-#define PPC_IRQ_CPM_RESERVED_13 (PPC_STD_IRQ_LAST + 45)
-#define PPC_IRQ_CPM_IDMA2 (PPC_STD_IRQ_LAST + 46)
-#define PPC_IRQ_CPM_IDMA1 (PPC_STD_IRQ_LAST + 47)
-#define PPC_IRQ_CPM_SDMA_ERROR (PPC_STD_IRQ_LAST + 48)
-#define PPC_IRQ_CPM_PC12 (PPC_STD_IRQ_LAST + 49)
-#define PPC_IRQ_CPM_PC13 (PPC_STD_IRQ_LAST + 50)
-#define PPC_IRQ_CPM_TIMER1 (PPC_STD_IRQ_LAST + 51)
-#define PPC_IRQ_CPM_PC14 (PPC_STD_IRQ_LAST + 52)
-#define PPC_IRQ_CPM_SCC4 (PPC_STD_IRQ_LAST + 53)
-#define PPC_IRQ_CPM_SCC3 (PPC_STD_IRQ_LAST + 54)
-#define PPC_IRQ_CPM_SCC2 (PPC_STD_IRQ_LAST + 55)
-#define PPC_IRQ_CPM_SCC1 (PPC_STD_IRQ_LAST + 56)
-#define PPC_IRQ_CPM_PC15 (PPC_STD_IRQ_LAST + 57)
-
-#define PPC_IRQ_LAST PPC_IRQ_CPM_PC15
-
-#endif
-
-/*
- * If the maximum number of exception sources is too low,
- * then fix it
- */
-
-#if PPC_INTERRUPT_MAX <= PPC_IRQ_LAST
-#undef PPC_INTERRUPT_MAX
-#define PPC_INTERRUPT_MAX ((PPC_IRQ_LAST) + 1)
-#endif
-
-/*
- * Machine Status Register (MSR) Constants Used by RTEMS
- */
-
-/*
- * Some PPC model manuals refer to the Exception Prefix (EP) bit as
- * IP for no apparent reason.
- */
-
-#define PPC_MSR_RI 0x000000002 /* bit 30 - recoverable exception */
-#define PPC_MSR_DR 0x000000010 /* bit 27 - data address translation */
-#define PPC_MSR_IR 0x000000020 /* bit 26 - instruction addr translation*/
-
-#if (PPC_HAS_EXCEPTION_PREFIX)
-#define PPC_MSR_EP 0x000000040 /* bit 25 - exception prefix */
-#else
-#define PPC_MSR_EP 0x000000000 /* bit 25 - exception prefix */
-#endif
-
-#if (PPC_HAS_FPU)
-#define PPC_MSR_FP 0x000002000 /* bit 18 - floating point enable */
-#else
-#define PPC_MSR_FP 0x000000000 /* bit 18 - floating point enable */
-#endif
-
-#if (PPC_LOW_POWER_MODE == PPC_LOW_POWER_MODE_NONE)
-#define PPC_MSR_POW 0x000000000 /* bit 13 - power management enable */
-#else
-#define PPC_MSR_POW 0x000040000 /* bit 13 - power management enable */
-#endif
-
-/*
- * Interrupt/exception MSR bits set as defined on p. 2-20 in "The Programming
- * Environments" and the manuals for various PPC models.
- */
-
-#if (PPC_DEBUG_MODEL == PPC_DEBUG_MODEL_STANDARD)
-#define PPC_MSR_DE 0x000000000 /* bit 22 - debug exception enable */
-#define PPC_MSR_BE 0x000000200 /* bit 22 - branch trace enable */
-#define PPC_MSR_SE 0x000000400 /* bit 21 - single step trace enable */
-#elif (PPC_DEBUG_MODEL == PPC_DEBUG_MODEL_SINGLE_STEP_ONLY)
-#define PPC_MSR_DE 0x000000000 /* bit 22 - debug exception enable */
-#define PPC_MSR_BE 0x000000200 /* bit 22 - branch trace enable */
-#define PPC_MSR_SE 0x000000000 /* bit 21 - single step trace enable */
-#elif (PPC_DEBUG_MODEL == PPC_DEBUG_MODEL_IBM4xx)
-#define PPC_MSR_DE 0x000000200 /* bit 22 - debug exception enable */
-#define PPC_MSR_BE 0x000000000 /* bit 22 - branch trace enable */
-#define PPC_MSR_SE 0x000000000 /* bit 21 - single step trace enable */
-#else
-#error "MSR constants -- unknown PPC_DEBUG_MODEL!!"
-#endif
-
-#define PPC_MSR_ME 0x000001000 /* bit 19 - machine check enable */
-#define PPC_MSR_EE 0x000008000 /* bit 16 - external interrupt enable */
-
-#if (PPC_HAS_RFCI)
-#define PPC_MSR_CE 0x000020000 /* bit 14 - critical interrupt enable */
-#else
-#define PPC_MSR_CE 0x000000000 /* bit 14 - critical interrupt enable */
-#endif
-
-#define PPC_MSR_DISABLE_MASK (PPC_MSR_ME|PPC_MSR_EE|PPC_MSR_CE)
-
-/*
- * Initial value for the FPSCR register
- */
-
-#define PPC_INIT_FPSCR 0x000000f8
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* ! _INCLUDE_PPC_h */
-/* end of include file */
-
-
diff --git a/c/src/exec/score/cpu/powerpc/rtems/score/ppctypes.h b/c/src/exec/score/cpu/powerpc/rtems/score/ppctypes.h
deleted file mode 100644
index 62bdb35d10..0000000000
--- a/c/src/exec/score/cpu/powerpc/rtems/score/ppctypes.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/* ppctypes.h
- *
- * This include file contains type definitions pertaining to the PowerPC
- * processor family.
- *
- * Author: Andrew Bray <andy@i-cubed.co.uk>
- *
- * COPYRIGHT (c) 1995 by i-cubed ltd.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of i-cubed limited not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * i-cubed limited makes no representations about the suitability
- * of this software for any purpose.
- *
- * Derived from c/src/exec/cpu/no_cpu/no_cputypes.h:
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __PPC_TYPES_h
-#define __PPC_TYPES_h
-
-#ifndef ASM
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This section defines the basic types for this processor.
- */
-
-typedef unsigned char unsigned8; /* unsigned 8-bit integer */
-typedef unsigned short unsigned16; /* unsigned 16-bit integer */
-typedef unsigned int unsigned32; /* unsigned 32-bit integer */
-typedef unsigned long long unsigned64; /* unsigned 64-bit integer */
-
-typedef unsigned32 Priority_Bit_map_control;
-
-typedef signed char signed8; /* 8-bit signed integer */
-typedef signed short signed16; /* 16-bit signed integer */
-typedef signed int signed32; /* 32-bit signed integer */
-typedef signed long long signed64; /* 64 bit signed integer */
-
-typedef unsigned32 boolean; /* Boolean value */
-
-typedef float single_precision; /* single precision float */
-typedef double double_precision; /* double precision float */
-
-typedef void ppc_isr;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !ASM */
-
-#endif
-/* end of include file */
diff --git a/c/src/exec/score/cpu/powerpc/rtems/score/types.h b/c/src/exec/score/cpu/powerpc/rtems/score/types.h
deleted file mode 100644
index 62bdb35d10..0000000000
--- a/c/src/exec/score/cpu/powerpc/rtems/score/types.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/* ppctypes.h
- *
- * This include file contains type definitions pertaining to the PowerPC
- * processor family.
- *
- * Author: Andrew Bray <andy@i-cubed.co.uk>
- *
- * COPYRIGHT (c) 1995 by i-cubed ltd.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of i-cubed limited not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * i-cubed limited makes no representations about the suitability
- * of this software for any purpose.
- *
- * Derived from c/src/exec/cpu/no_cpu/no_cputypes.h:
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __PPC_TYPES_h
-#define __PPC_TYPES_h
-
-#ifndef ASM
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This section defines the basic types for this processor.
- */
-
-typedef unsigned char unsigned8; /* unsigned 8-bit integer */
-typedef unsigned short unsigned16; /* unsigned 16-bit integer */
-typedef unsigned int unsigned32; /* unsigned 32-bit integer */
-typedef unsigned long long unsigned64; /* unsigned 64-bit integer */
-
-typedef unsigned32 Priority_Bit_map_control;
-
-typedef signed char signed8; /* 8-bit signed integer */
-typedef signed short signed16; /* 16-bit signed integer */
-typedef signed int signed32; /* 32-bit signed integer */
-typedef signed long long signed64; /* 64 bit signed integer */
-
-typedef unsigned32 boolean; /* Boolean value */
-
-typedef float single_precision; /* single precision float */
-typedef double double_precision; /* double precision float */
-
-typedef void ppc_isr;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !ASM */
-
-#endif
-/* end of include file */
diff --git a/c/src/exec/score/cpu/sh/rtems/score/types.h b/c/src/exec/score/cpu/sh/rtems/score/types.h
deleted file mode 100644
index 853479c13b..0000000000
--- a/c/src/exec/score/cpu/sh/rtems/score/types.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * This include file contains information pertaining to the Hitachi SH
- * processor.
- *
- * Authors: Ralf Corsepius (corsepiu@faw.uni-ulm.de) and
- * Bernd Becker (becker@faw.uni-ulm.de)
- *
- * COPYRIGHT (c) 1997-1998, FAW Ulm, Germany
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- *
- * COPYRIGHT (c) 1998.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __CPU_SH_TYPES_h
-#define __CPU_SH_TYPES_h
-
-#ifndef ASM
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This section defines the basic types for this processor.
- */
-
-typedef unsigned char unsigned8; /* unsigned 8-bit integer */
-typedef unsigned short unsigned16; /* unsigned 16-bit integer */
-typedef unsigned int unsigned32; /* unsigned 32-bit integer */
-typedef unsigned long long unsigned64; /* unsigned 64-bit integer */
-
-typedef unsigned16 Priority_Bit_map_control;
-
-typedef signed char signed8; /* 8-bit signed integer */
-typedef signed short signed16; /* 16-bit signed integer */
-typedef signed int signed32; /* 32-bit signed integer */
-typedef signed long long signed64; /* 64 bit signed integer */
-
-typedef unsigned16 boolean; /* Boolean value, external */
- /* data bus has 16 bits */
-
-typedef float single_precision; /* single precision float */
-typedef double double_precision; /* double precision float */
-
-typedef void sh_isr;
-typedef void ( *sh_isr_entry )( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !ASM */
-
-#endif
-
diff --git a/c/src/exec/score/cpu/sparc/rtems/score/types.h b/c/src/exec/score/cpu/sparc/rtems/score/types.h
deleted file mode 100644
index 1621d6fd5c..0000000000
--- a/c/src/exec/score/cpu/sparc/rtems/score/types.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* sparctypes.h
- *
- * This include file contains type definitions pertaining to the
- * SPARC processor family.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * Ported to ERC32 implementation of the SPARC by On-Line Applications
- * Research Corporation (OAR) under contract to the European Space
- * Agency (ESA).
- *
- * ERC32 modifications of respective RTEMS file: COPYRIGHT (c) 1995.
- * European Space Agency.
- *
- * $Id$
- */
-
-#ifndef __SPARC_TYPES_h
-#define __SPARC_TYPES_h
-
-#ifndef ASM
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This section defines the basic types for this processor.
- */
-
-typedef unsigned char unsigned8; /* unsigned 8-bit integer */
-typedef unsigned short unsigned16; /* unsigned 16-bit integer */
-typedef unsigned int unsigned32; /* unsigned 32-bit integer */
-typedef unsigned long long unsigned64; /* unsigned 64-bit integer */
-
-typedef unsigned16 Priority_Bit_map_control;
-
-typedef signed char signed8; /* 8-bit signed integer */
-typedef signed short signed16; /* 16-bit signed integer */
-typedef signed int signed32; /* 32-bit signed integer */
-typedef signed long long signed64; /* 64 bit signed integer */
-
-typedef unsigned32 boolean; /* Boolean value */
-
-typedef float single_precision; /* single precision float */
-typedef double double_precision; /* double precision float */
-
-typedef void sparc_isr;
-typedef void ( *sparc_isr_entry )( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !ASM */
-
-#endif
-/* end of include file */
diff --git a/c/src/exec/score/cpu/unix/rtems/score/types.h b/c/src/exec/score/cpu/unix/rtems/score/types.h
deleted file mode 100644
index f423564ebc..0000000000
--- a/c/src/exec/score/cpu/unix/rtems/score/types.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* unixtypes.h
- *
- * This include file contains type definitions which are appropriate
- * for a typical modern UNIX box using GNU C for the RTEMS simulator.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __UNIX_TYPES_h
-#define __UNIX_TYPES_h
-
-#ifndef ASM
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * some C++ compilers (eg: HP's) don't do 'signed' or 'volatile'
- */
-#if defined(__cplusplus) && !defined(__GNUC__)
-#define signed
-#define volatile
-#endif
-
-/*
- * This section defines the basic types for this processor.
- */
-
-typedef unsigned char unsigned8; /* unsigned 8-bit integer */
-typedef unsigned short unsigned16; /* unsigned 16-bit integer */
-typedef unsigned int unsigned32; /* unsigned 32-bit integer */
-
-typedef unsigned16 Priority_Bit_map_control;
-
-typedef signed char signed8; /* 8-bit signed integer */
-typedef signed short signed16; /* 16-bit signed integer */
-typedef signed int signed32; /* 32-bit signed integer */
-
-/*
- * some C++ compilers (eg: HP's) don't do 'long long'
- */
-#if defined(__GNUC__)
-typedef unsigned long long unsigned64; /* unsigned 64-bit integer */
-typedef signed long long signed64; /* 64 bit signed integer */
-#endif
-
-typedef unsigned32 boolean; /* Boolean value */
-
-typedef float single_precision; /* single precision float */
-typedef double double_precision; /* double precision float */
-
-typedef void unix_isr;
-
-typedef unix_isr ( *unix_isr_entry )( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !ASM */
-
-#endif
-/* end of include file */
diff --git a/c/src/lib/include/rtems/assoc.h b/c/src/lib/include/rtems/assoc.h
deleted file mode 100644
index 1982d654ac..0000000000
--- a/c/src/lib/include/rtems/assoc.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- *
- * Rtems associativity routines. Mainly used to convert a value from
- * one space to another (eg: our errno's to host errno's and v.v)
- *
- *
- * $Id$
- */
-
-#ifndef _INCLUDE_ASSOC_H
-#define _INCLUDE_ASSOC_H
-
-typedef struct {
- const char *name;
- unsigned32 local_value;
- unsigned32 remote_value;
-} rtems_assoc_t;
-
-/*
- * Flag/marker for optional default value in each table
- */
-
-#define RTEMS_ASSOC_DEFAULT_NAME "(default)"
-
-const rtems_assoc_t *rtems_assoc_ptr_by_name(const rtems_assoc_t *, const char *);
-const rtems_assoc_t *rtems_assoc_ptr_by_value(const rtems_assoc_t *, unsigned32);
-const rtems_assoc_t *rtems_assoc_ptr_by_remote(const rtems_assoc_t *, unsigned32);
-
-unsigned32 rtems_assoc_remote_by_local(const rtems_assoc_t *, unsigned32);
-unsigned32 rtems_assoc_local_by_remote(const rtems_assoc_t *, unsigned32);
-unsigned32 rtems_assoc_remote_by_name(const rtems_assoc_t *, const char *);
-unsigned32 rtems_assoc_local_by_name(const rtems_assoc_t *, const char *);
-const char *rtems_assoc_name_by_local(const rtems_assoc_t *, unsigned32);
-const char *rtems_assoc_name_by_remote(const rtems_assoc_t *, unsigned32);
-
-unsigned32 rtems_assoc_remote_by_local_bitfield(const rtems_assoc_t *, unsigned32);
-char *rtems_assoc_name_by_local_bitfield(const rtems_assoc_t *, unsigned32, char *);
-char *rtems_assoc_name_by_remote_bitfield(const rtems_assoc_t *, unsigned32, char *);
-unsigned32 rtems_assoc_local_by_remote_bitfield(const rtems_assoc_t *, unsigned32);
-
-
-#endif /* ! _INCLUDE_ASSOC_H */
diff --git a/c/src/lib/include/rtems/error.h b/c/src/lib/include/rtems/error.h
deleted file mode 100644
index a0698afb5d..0000000000
--- a/c/src/lib/include/rtems/error.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Defines and externs for rtems error reporting
- *
- * $Id$
- */
-
-#ifndef __RTEMS_ERROR_h
-#define __RTEMS_ERROR_h
-
-/*
- * rtems_error() and rtems_panic() support
- */
-
-#define RTEMS_ERROR_ERRNO (1<<((sizeof(int) * 8) - 2)) /* hi bit; use 'errno' */
-#define RTEMS_ERROR_PANIC (RTEMS_ERROR_ERRNO / 2) /* err fatal; no return */
-#define RTEMS_ERROR_ABORT (RTEMS_ERROR_ERRNO / 4) /* err is fatal; panic */
-
-#define RTEMS_ERROR_MASK (RTEMS_ERROR_ERRNO | RTEMS_ERROR_ABORT | \
- RTEMS_ERROR_PANIC) /* all */
-
-const char *rtems_status_text(rtems_status_code);
-int rtems_error(int error_code, const char *printf_format, ...);
-#ifdef __GNUC__
-void rtems_panic(const char *printf_format, ...);
-/*
- * We should be able to use this attribute but gcc complains that
- * rtems_panic does in fact return. :(
- *
- * __attribute__ ((__noreturn__));
- */
-#else
-void rtems_panic(const char *printf_format, ...);
-#endif
-
-extern int rtems_panic_in_progress;
-
-#endif
-/* end of include file */
diff --git a/c/src/lib/include/rtems/libcsupport.h b/c/src/lib/include/rtems/libcsupport.h
deleted file mode 100644
index 4c6764c1d4..0000000000
--- a/c/src/lib/include/rtems/libcsupport.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* libcsupport.h
- *
- * This include file contains the information regarding the
- * RTEMS specific support for the standard C library.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __LIBC_SUPPORT_h
-#define __LIBC_SUPPORT_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <sys/types.h>
-
-void RTEMS_Malloc_Initialize(
- void *start,
- size_t length,
- size_t sbrk_amount
-);
-
-extern void malloc_dump(void);
-extern void malloc_walk(size_t source, size_t printf_enabled);
-extern void libc_init(int reentrant);
-extern int host_errno(void);
-extern void fix_syscall_errno(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/c/src/lib/include/rtems/libio.h b/c/src/lib/include/rtems/libio.h
deleted file mode 100644
index 3cc4648863..0000000000
--- a/c/src/lib/include/rtems/libio.h
+++ /dev/null
@@ -1,584 +0,0 @@
-/*
- * System call and file system interface definition
- *
- * General purpose communication channel for RTEMS to allow UNIX/POSIX
- * system call behavior under RTEMS. Initially this supported only
- * IO to devices but has since been enhanced to support networking
- * and support for mounted file systems.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef _RTEMS_LIBIO_H
-#define _RTEMS_LIBIO_H
-
-#include <rtems.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-/*
- * Define data types which must be constructed using forward references.
- */
-
-typedef struct rtems_libio_tt rtems_libio_t;
-
-struct rtems_filesystem_location_info_tt;
-typedef struct rtems_filesystem_location_info_tt
- rtems_filesystem_location_info_t;
-
-struct rtems_filesystem_mount_table_entry_tt;
-typedef struct rtems_filesystem_mount_table_entry_tt
- rtems_filesystem_mount_table_entry_t;
-
-/*
- * Valid RTEMS file types.
- */
-typedef enum {
- RTEMS_FILESYSTEM_DIRECTORY,
- RTEMS_FILESYSTEM_DEVICE,
- RTEMS_FILESYSTEM_HARD_LINK,
- RTEMS_FILESYSTEM_SYM_LINK,
- RTEMS_FILESYSTEM_MEMORY_FILE
-} rtems_filesystem_node_types_t;
-
-/*
- * File Handler Operations Table
- */
-
-typedef int (*rtems_filesystem_open_t)(
- rtems_libio_t *iop,
- const char *pathname,
- unsigned32 flag,
- unsigned32 mode
-);
-
-typedef int (*rtems_filesystem_close_t)(
- rtems_libio_t *iop
-);
-
-typedef int (*rtems_filesystem_read_t)(
- rtems_libio_t *iop,
- void *buffer,
- unsigned32 count
-);
-
-typedef int (*rtems_filesystem_write_t)(
- rtems_libio_t *iop,
- const void *buffer,
- unsigned32 count
-);
-
-typedef int (*rtems_filesystem_ioctl_t)(
- rtems_libio_t *iop,
- unsigned32 command,
- void *buffer
-);
-
-typedef int (*rtems_filesystem_lseek_t)(
- rtems_libio_t *iop,
- off_t length,
- int whence
-);
-
-typedef int (*rtems_filesystem_fstat_t)(
- rtems_filesystem_location_info_t *loc,
- struct stat *buf
-);
-
-typedef int (*rtems_filesystem_fchmod_t)(
- rtems_filesystem_location_info_t *loc,
- mode_t mode
-);
-
-typedef int (*rtems_filesystem_ftruncate_t)(
- rtems_libio_t *iop,
- off_t length
-);
-
-typedef int (*rtems_filesystem_fpathconf_t)(
- rtems_libio_t *iop,
- int name
-);
-
-typedef int (*rtems_filesystem_fsync_t)(
- rtems_libio_t *iop
-);
-
-typedef int (*rtems_filesystem_fdatasync_t)(
- rtems_libio_t *iop
-);
-
-typedef int (*rtems_filesystem_fcntl_t)(
- int cmd,
- rtems_libio_t *iop
-);
-
-typedef int (*rtems_filesystem_rmnod_t)(
- rtems_filesystem_location_info_t *pathloc /* IN */
-);
-
-typedef struct {
- rtems_filesystem_open_t open;
- rtems_filesystem_close_t close;
- rtems_filesystem_read_t read;
- rtems_filesystem_write_t write;
- rtems_filesystem_ioctl_t ioctl;
- rtems_filesystem_lseek_t lseek;
- rtems_filesystem_fstat_t fstat;
- rtems_filesystem_fchmod_t fchmod;
- rtems_filesystem_ftruncate_t ftruncate;
- rtems_filesystem_fpathconf_t fpathconf;
- rtems_filesystem_fsync_t fsync;
- rtems_filesystem_fdatasync_t fdatasync;
- rtems_filesystem_fcntl_t fcntl;
- rtems_filesystem_rmnod_t rmnod;
-} rtems_filesystem_file_handlers_r;
-
-/*
- * File System Operations Table
- */
-
-/*
- * XXX
- * This routine does not allocate any space and rtems_filesystem_freenode_t
- * is not called by the generic after calling this routine.
- * ie. node_access does not have to contain valid data when the
- * routine returns.
- */
-
-typedef int (*rtems_filesystem_mknod_t)(
- const char *path, /* IN */
- mode_t mode, /* IN */
- dev_t dev, /* IN */
- rtems_filesystem_location_info_t *pathloc /* IN/OUT */
-);
-
-/*
- * rtems_filesystem_freenode_t must be called by the generic after
- * calling this routine
- */
-
-typedef int (*rtems_filesystem_evalpath_t)(
- const char *pathname, /* IN */
- int flags, /* IN */
- rtems_filesystem_location_info_t *pathloc /* IN/OUT */
-);
-
-typedef int (*rtems_filesystem_evalmake_t)(
- const char *path, /* IN */
- rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
- const char **name /* OUT */
-);
-
-typedef int (*rtems_filesystem_link_t)(
- rtems_filesystem_location_info_t *to_loc, /* IN */
- rtems_filesystem_location_info_t *parent_loc, /* IN */
- const char *name /* IN */
-);
-
-typedef int (*rtems_filesystem_unlink_t)(
- rtems_filesystem_location_info_t *pathloc /* IN */
-);
-
-typedef int (*rtems_filesystem_chown_t)(
- rtems_filesystem_location_info_t *pathloc, /* IN */
- uid_t owner, /* IN */
- gid_t group /* IN */
-);
-
-typedef int (*rtems_filesystem_freenode_t)(
- rtems_filesystem_location_info_t *pathloc /* IN */
-);
-
-typedef int (* rtems_filesystem_mount_t ) (
- rtems_filesystem_mount_table_entry_t *mt_entry /* in */
-);
-
-typedef int (* rtems_filesystem_fsmount_me_t )(
- rtems_filesystem_mount_table_entry_t *mt_entry
-);
-
-typedef int (* rtems_filesystem_unmount_t ) (
- rtems_filesystem_mount_table_entry_t *mt_entry /* in */
-);
-
-typedef int (* rtems_filesystem_fsunmount_me_t ) (
- rtems_filesystem_mount_table_entry_t *mt_entry /* in */
-);
-
-typedef rtems_filesystem_node_types_t (* rtems_filesystem_node_type_t) (
- rtems_filesystem_location_info_t *pathloc /* in */
-);
-
-typedef int (* rtems_filesystem_utime_t)(
- rtems_filesystem_location_info_t *pathloc, /* IN */
- time_t actime, /* IN */
- time_t modtime /* IN */
-);
-
-typedef int (*rtems_filesystem_evaluate_link_t)(
- rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
- int flags /* IN */
-);
-
-typedef int (*rtems_filesystem_symlink_t)(
- rtems_filesystem_location_info_t *loc, /* IN */
- const char *link_name, /* IN */
- const char *node_name
-);
-
-typedef int (*rtems_filesystem_readlink_t)(
- rtems_filesystem_location_info_t *loc, /* IN */
- char *buf, /* OUT */
- size_t bufsize
-);
-
-/*
- * operations table that must be defined for every file system.
- */
-
-/*
- * File system types
- */
-typedef struct {
- rtems_filesystem_evalpath_t evalpath;
- rtems_filesystem_evalmake_t evalformake;
- rtems_filesystem_link_t link;
- rtems_filesystem_unlink_t unlink;
- rtems_filesystem_node_type_t node_type;
- rtems_filesystem_mknod_t mknod;
- rtems_filesystem_chown_t chown;
- rtems_filesystem_freenode_t freenod;
- rtems_filesystem_mount_t mount;
- rtems_filesystem_fsmount_me_t fsmount_me;
- rtems_filesystem_unmount_t unmount;
- rtems_filesystem_fsunmount_me_t fsunmount_me;
- rtems_filesystem_utime_t utime;
- rtems_filesystem_evaluate_link_t eval_link;
- rtems_filesystem_symlink_t symlink;
- rtems_filesystem_readlink_t readlink;
-} rtems_filesystem_operations_table;
-
-#define IMFS_FILE_SYSTEM IMFS_ops
-extern rtems_filesystem_operations_table IMFS_ops;
-
-
-/*
- * Structure used to determine a location/filesystem in the tree.
- */
-
-struct rtems_filesystem_location_info_tt
-{
- void *node_access;
- rtems_filesystem_file_handlers_r *handlers;
- rtems_filesystem_operations_table *ops;
- rtems_filesystem_mount_table_entry_t *mt_entry;
-};
-
-/*
- * Structure used to contain file system specific information which
- * is required to support fpathconf().
- */
-
-typedef struct {
- int link_max;
- int max_canon;
- int max_input;
- int name_max;
- int path_max;
- int pipe_buf;
- int posix_async_io;
- int posix_chown_restrictions;
- int posix_no_trunc;
- int posix_prio_io;
- int posix_sync_io;
- int posix_vdisable;
-} rtems_filesystem_limits_and_options_t;
-
-/*
- * Structure for a mount table entry.
- */
-
-struct rtems_filesystem_mount_table_entry_tt {
- Chain_Node Node;
- rtems_filesystem_location_info_t mt_point_node;
- rtems_filesystem_location_info_t mt_fs_root;
- int options;
- void *fs_info;
-
- rtems_filesystem_limits_and_options_t pathconf_limits_and_options;
-
- /*
- * When someone adds a mounted filesystem on a real device,
- * this will need to be used.
- *
- * The best option long term for this is probably an open file descriptor.
- */
- char *dev;
-};
-
-/*
- * Valid RTEMS file systems options
- */
-
-typedef enum
-{
- RTEMS_FILESYSTEM_READ_ONLY,
- RTEMS_FILESYSTEM_READ_WRITE,
- RTEMS_FILESYSTEM_BAD_OPTIONS
-} rtems_filesystem_options_t;
-
-
-/*
- * An open file data structure, indexed by 'fd'
- * TODO:
- * should really have a separate per/file data structure that this
- * points to (eg: size, offset, driver, pathname should be in that)
- */
-
-struct rtems_libio_tt {
- rtems_driver_name_t *driver;
- off_t size; /* size of file */
- off_t offset; /* current offset into file */
- unsigned32 flags;
- rtems_filesystem_location_info_t pathinfo;
- Objects_Id sem;
- unsigned32 data0; /* private to "driver" */
- void *data1; /* ... */
- void *file_info; /* used by file handlers */
- rtems_filesystem_file_handlers_r *handlers; /* type specific handlers */
-};
-
-/*
- * param block for read/write
- * Note: it must include 'offset' instead of using iop's offset since
- * we can have multiple outstanding i/o's on a device.
- */
-
-typedef struct {
- rtems_libio_t *iop;
- off_t offset;
- unsigned8 *buffer;
- unsigned32 count;
- unsigned32 flags;
- unsigned32 bytes_moved;
-} rtems_libio_rw_args_t;
-
-/*
- * param block for open/close
- */
-
-typedef struct {
- rtems_libio_t *iop;
- unsigned32 flags;
- unsigned32 mode;
-} rtems_libio_open_close_args_t;
-
-/*
- * param block for ioctl
- */
-
-typedef struct {
- rtems_libio_t *iop;
- unsigned32 command;
- void *buffer;
- unsigned32 ioctl_return;
-} rtems_libio_ioctl_args_t;
-
-/*
- * Values for 'flag'
- */
-
-#define LIBIO_FLAGS_NO_DELAY 0x0001 /* return immediately if no data */
-#define LIBIO_FLAGS_READ 0x0002 /* reading */
-#define LIBIO_FLAGS_WRITE 0x0004 /* writing */
-#define LIBIO_FLAGS_OPEN 0x0100 /* device is open */
-#define LIBIO_FLAGS_APPEND 0x0200 /* all writes append */
-#define LIBIO_FLAGS_CREATE 0x0400 /* create file */
-#define LIBIO_FLAGS_CLOSE_ON_EXEC 0x0800 /* close on process exec() */
-#define LIBIO_FLAGS_READ_WRITE (LIBIO_FLAGS_READ | LIBIO_FLAGS_WRITE)
-
-void rtems_libio_init(void);
-
-/*
- * External I/O handlers
- */
-
-typedef int (*rtems_libio_open_t)(
- const char *pathname,
- unsigned32 flag,
- unsigned32 mode
-);
-
-typedef int (*rtems_libio_close_t)(
- int fd
-);
-
-typedef int (*rtems_libio_read_t)(
- int fd,
- void *buffer,
- unsigned32 count
-);
-
-typedef int (*rtems_libio_write_t)(
- int fd,
- const void *buffer,
- unsigned32 count
-);
-
-typedef int (*rtems_libio_ioctl_t)(
- int fd,
- unsigned32 command,
- void *buffer
-);
-
-typedef int (*rtems_libio_lseek_t)(
- int fd,
- off_t offset,
- int whence
-);
-
-/*
- * IOCTL values
- */
-
-#define RTEMS_IO_GET_ATTRIBUTES 1
-#define RTEMS_IO_SET_ATTRIBUTES 2
-#define RTEMS_IO_TCDRAIN 3
-
-/*
- * The following macros are used to build up the permissions sets
- * used to check permissions. These are similar in style to the
- * mode_t bits and should stay compatible with them.
- */
-
-#define RTEMS_LIBIO_PERMS_READ S_IROTH
-#define RTEMS_LIBIO_PERMS_WRITE S_IWOTH
-#define RTEMS_LIBIO_PERMS_RDWR (S_IROTH|S_IWOTH)
-#define RTEMS_LIBIO_PERMS_EXEC S_IXOTH
-#define RTEMS_LIBIO_PERMS_SEARCH RTEMS_LIBIO_PERMS_EXEC
-#define RTEMS_LIBIO_PERMS_RWX S_IRWXO
-
-/*
- * Macros
- */
-
-#define rtems_filesystem_make_dev_t( _major, _minor ) \
- ((((dev_t)(_major)) << 32) | (dev_t)(_minor))
-
-#define rtems_filesystem_split_dev_t( _dev, _major, _minor ) \
- do { \
- (_major) = (rtems_device_major_number) ((_dev) >> 32); \
- (_minor) = (rtems_device_minor_number) ((_dev) & 0xFFFFFFFF); \
- } while(0)
-
-/*
- * Verifies that the permission flag is valid.
- */
-#define rtems_libio_is_valid_perms( _perm ) \
- (~ ((~RTEMS_LIBIO_PERMS_RWX) & _perm ))
-
-
-/*
- * Prototypes for filesystem
- */
-
-void rtems_filesystem_initialize( void );
-
-
-/*
- * Callbacks from TERMIOS routines to device-dependent code
- */
-
-#include <termios.h>
-
-typedef struct rtems_termios_callbacks {
- int (*firstOpen)(int major, int minor, void *arg);
- int (*lastClose)(int major, int minor, void *arg);
- int (*pollRead)(int minor);
- int (*write)(int minor, const char *buf, int len);
- int (*setAttributes)(int minor, const struct termios *t);
- int (*stopRemoteTx)(int minor);
- int (*startRemoteTx)(int minor);
- int outputUsesInterrupts;
-} rtems_termios_callbacks;
-
-/*
- * Device-independent TERMIOS routines
- */
-
-void rtems_termios_initialize (void);
-
-rtems_status_code rtems_termios_open (
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void *arg,
- const rtems_termios_callbacks *callbacks
-);
-
-rtems_status_code rtems_termios_close(
- void *arg
-);
-
-rtems_status_code rtems_termios_read(
- void *arg
-);
-
-rtems_status_code rtems_termios_write(
- void *arg
-);
-
-rtems_status_code rtems_termios_ioctl(
- void *arg
-);
-
-int rtems_termios_enqueue_raw_characters(
- void *ttyp,
- char *buf,
- int len
-);
-
-int rtems_termios_dequeue_characters(
- void *ttyp,
- int len
-);
-
-void rtems_termios_reserve_resources(
- rtems_configuration_table *configuration,
- rtems_unsigned32 number_of_devices
-);
-
-int unmount(
- const char *mount_path
-);
-
-int mount(
- rtems_filesystem_mount_table_entry_t **mt_entry,
- rtems_filesystem_operations_table *fs_ops,
- rtems_filesystem_options_t fsoptions,
- char *device,
- char *mount_point
-);
-
-/*
- * Boot Time Mount Table Structure
- */
-
-typedef struct {
- rtems_filesystem_operations_table *fs_ops;
- rtems_filesystem_options_t fsoptions;
- char *device;
- char *mount_point;
-} rtems_filesystem_mount_table_t;
-
-extern rtems_filesystem_mount_table_t *rtems_filesystem_mount_table;
-extern int rtems_filesystem_mount_table_size;
-
-#endif /* _RTEMS_LIBIO_H */
diff --git a/c/src/lib/include/rtems/libio_.h b/c/src/lib/include/rtems/libio_.h
deleted file mode 100644
index 8e74b34edb..0000000000
--- a/c/src/lib/include/rtems/libio_.h
+++ /dev/null
@@ -1,272 +0,0 @@
-/*
- * Libio Internal Information
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __LIBIO__h
-#define __LIBIO__h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems.h>
-#include <rtems/libio.h> /* include before standard IO */
-#include <rtems/assoc.h> /* assoc.h not included by rtems.h */
-
-#include <stdio.h> /* O_RDONLY, et.al. */
-#include <fcntl.h> /* O_RDONLY, et.al. */
-#include <assert.h>
-#include <stdarg.h>
-#include <errno.h>
-
-#if ! defined(O_NDELAY)
-# if defined(solaris2)
-# define O_NDELAY O_NONBLOCK
-# elif defined(RTEMS_NEWLIB)
-# define O_NDELAY _FNBIO
-# endif
-#endif
-
-#if !defined(ENOTSUP)
-#define ENOTSUP EOPNOTSUPP
-#endif
-
-#include <errno.h>
-#include <string.h> /* strcmp */
-#include <unistd.h>
-#include <stdlib.h> /* calloc() */
-
-/*
- * Semaphore to protect the io table
- */
-
-#define RTEMS_LIBIO_SEM rtems_build_name('L', 'B', 'I', 'O')
-#define RTEMS_LIBIO_IOP_SEM(n) rtems_build_name('L', 'B', 'I', n)
-
-extern rtems_id rtems_libio_semaphore;
-extern rtems_filesystem_file_handlers_r rtems_filesystem_null_handlers;
-
-/*
- * File descriptor Table Information
- */
-
-extern unsigned32 rtems_libio_number_iops;
-extern rtems_libio_t *rtems_libio_iops;
-extern rtems_libio_t *rtems_libio_last_iop;
-extern rtems_libio_t *rtems_libio_iop_freelist;
-
-/*
- * Default mode for all files.
- */
-
-extern mode_t rtems_filesystem_umask;
-
-/*
- * set_errno_and_return_minus_one
- *
- * Macro to ease common way to return an error.
- */
-
-#ifndef set_errno_and_return_minus_one
-#define set_errno_and_return_minus_one( _error ) \
- do { errno = (_error); return -1; } while(0)
-#endif
-
-/*
- * rtems_libio_iop
- *
- * Macro to return the file descriptor pointer.
- */
-
-#define rtems_libio_iop(_fd) \
- ((((unsigned32)(_fd)) < rtems_libio_number_iops) ? \
- &rtems_libio_iops[_fd] : 0)
-
-/*
- * rtems_libio_check_is_open
- *
- * Macro to check if a file descriptor is actually open.
- */
-
-#define rtems_libio_check_is_open(_iop) \
- do { \
- if (((_iop)->flags & LIBIO_FLAGS_OPEN) == 0) { \
- errno = EBADF; \
- return -1; \
- } \
- } while (0)
-
-/*
- * rtems_libio_check_fd
- *
- * Macro to check if a file descriptor number is valid.
- */
-
-#define rtems_libio_check_fd(_fd) \
- do { \
- if ((unsigned32) (_fd) >= rtems_libio_number_iops) { \
- errno = EBADF; \
- return -1; \
- } \
- } while (0)
-
-/*
- * rtems_libio_check_buffer
- *
- * Macro to check if a buffer pointer is valid.
- */
-
-#define rtems_libio_check_buffer(_buffer) \
- do { \
- if ((_buffer) == 0) { \
- errno = EINVAL; \
- return -1; \
- } \
- } while (0)
-
-/*
- * rtems_libio_check_count
- *
- * Macro to check if a count or length is valid.
- */
-
-#define rtems_libio_check_count(_count) \
- do { \
- if ((_count) == 0) { \
- return 0; \
- } \
- } while (0)
-
-/*
- * rtems_libio_check_permissions
- *
- * Macro to check if a file descriptor is open for this operation.
- */
-
-#define rtems_libio_check_permissions(_iop, _flag) \
- do { \
- if (((_iop)->flags & (_flag)) == 0) { \
- set_errno_and_return_minus_one( EINVAL ); \
- return -1; \
- } \
- } while (0)
-
-/*
- * rtems_filesystem_freenode
- *
- * Macro to free a node.
- */
-
-#define rtems_filesystem_freenode( _node ) \
- do { \
- if ( (_node)->ops->freenod ) \
- (*(_node)->ops->freenod)( (_node) ); \
- } while (0)
-
-/*
- * rtems_filesystem_is_separator
- *
- * Macro to determine if a character is a path name separator.
- *
- * NOTE: This macro handles MS-DOS and UNIX style names.
- */
-
-#define rtems_filesystem_is_separator( _ch ) \
- ( ((_ch) == '/') || ((_ch) == '\\') || ((_ch) == '\0'))
-
-/*
- * rtems_filesystem_get_start_loc
- *
- * Macro to determine if path is absolute or relative.
- */
-
-#define rtems_filesystem_get_start_loc( _path, _index, _loc ) \
- do { \
- if ( rtems_filesystem_is_separator( (_path)[ 0 ] ) ) { \
- *(_loc) = rtems_filesystem_root; \
- *(_index) = 1; \
- } else { \
- *(_loc) = rtems_filesystem_current; \
- *(_index) = 0; \
- } \
- } while (0)
-
-#define rtems_filesystem_get_sym_start_loc( _path, _index, _loc ) \
- do { \
- if ( rtems_filesystem_is_separator( (_path)[ 0 ] ) ) { \
- *(_loc) = rtems_filesystem_root; \
- *(_index) = 1; \
- } else { \
- *(_index) = 0; \
- } \
- } while (0)
-
-
-/*
- * External structures
- */
-
-extern rtems_filesystem_location_info_t rtems_filesystem_current;
-extern rtems_filesystem_location_info_t rtems_filesystem_root;
-extern nlink_t rtems_filesystem_link_counts;
-
-
-/*
- * File Descriptor Routine Prototypes
- */
-
-rtems_libio_t *rtems_libio_allocate(void);
-
-unsigned32 rtems_libio_fcntl_flags(
- unsigned32 fcntl_flags
-);
-
-unsigned32 rtems_libio_to_fcntl_flags(
- unsigned32 flags
-);
-
-void rtems_libio_free(
- rtems_libio_t *iop
-);
-
-int rtems_libio_is_open_files_in_fs(
- rtems_filesystem_mount_table_entry_t *mt_entry
-);
-
-int rtems_libio_is_file_open(
- void *node_access
-);
-
-/*
- * File System Routine Prototypes
- */
-
-int rtems_filesystem_evaluate_path(
- const char *pathname,
- int flags,
- rtems_filesystem_location_info_t *pathloc,
- int follow_link
-);
-
-void rtems_filesystem_initialize();
-
-int init_fs_mount_table();
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
-
-
diff --git a/c/src/lib/include/sys/filio.h b/c/src/lib/include/sys/filio.h
deleted file mode 100644
index b82a649c0f..0000000000
--- a/c/src/lib/include/sys/filio.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*-
- * Copyright (c) 1982, 1986, 1990, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- * (c) UNIX System Laboratories, Inc.
- * All or some portions of this file are derived from material licensed
- * to the University of California by American Telephone and Telegraph
- * Co. or Unix System Laboratories, Inc. and are reproduced herein with
- * the permission of UNIX System Laboratories, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)filio.h 8.1 (Berkeley) 3/28/94
- * $Id$
- */
-
-#ifndef _SYS_FILIO_H_
-#define _SYS_FILIO_H_
-
-#include <sys/ioccom.h>
-
-/* Generic file-descriptor ioctl's. */
-#define FIOCLEX _IO('f', 1) /* set close on exec on fd */
-#define FIONCLEX _IO('f', 2) /* remove close on exec */
-#define FIONREAD _IOR('f', 127, int) /* get # bytes to read */
-#define FIONBIO _IOW('f', 126, int) /* set/clear non-blocking i/o */
-#define FIOASYNC _IOW('f', 125, int) /* set/clear async i/o */
-#define FIOSETOWN _IOW('f', 124, int) /* set owner */
-#define FIOGETOWN _IOR('f', 123, int) /* get owner */
-
-#endif /* !_SYS_FILIO_H_ */
diff --git a/c/src/lib/include/sys/ioctl.h b/c/src/lib/include/sys/ioctl.h
deleted file mode 100644
index e3a69a5a7f..0000000000
--- a/c/src/lib/include/sys/ioctl.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*-
- * Copyright (c) 1982, 1986, 1990, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- * (c) UNIX System Laboratories, Inc.
- * All or some portions of this file are derived from material licensed
- * to the University of California by American Telephone and Telegraph
- * Co. or Unix System Laboratories, Inc. and are reproduced herein with
- * the permission of UNIX System Laboratories, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ioctl.h 8.6 (Berkeley) 3/28/94
- * $Id$
- */
-
-#ifndef _SYS_IOCTL_H_
-#define _SYS_IOCTL_H_
-
-#include <sys/ttycom.h>
-
-/*
- * Pun for SunOS prior to 3.2. SunOS 3.2 and later support TIOCGWINSZ
- * and TIOCSWINSZ (yes, even 3.2-3.5, the fact that it wasn't documented
- * notwithstanding).
- */
-struct ttysize {
- unsigned short ts_lines;
- unsigned short ts_cols;
- unsigned short ts_xxx;
- unsigned short ts_yyy;
-};
-#define TIOCGSIZE TIOCGWINSZ
-#define TIOCSSIZE TIOCSWINSZ
-
-#include <sys/ioccom.h>
-
-#include <sys/filio.h>
-#include <sys/sockio.h>
-
-#endif /* !_SYS_IOCTL_H_ */
-
-/*
- * Keep outside _SYS_IOCTL_H_
- * Compatibility with old terminal driver
- *
- * Source level -> #define USE_OLD_TTY
- * Kernel level -> options COMPAT_43 or COMPAT_SUNOS
- */
-#if defined(USE_OLD_TTY) || defined(COMPAT_43) || defined(COMPAT_SUNOS)
-#include <sys/ioctl_compat.h>
-#endif
diff --git a/c/src/lib/include/sys/sockio.h b/c/src/lib/include/sys/sockio.h
deleted file mode 100644
index 5e54baffe8..0000000000
--- a/c/src/lib/include/sys/sockio.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*-
- * Copyright (c) 1982, 1986, 1990, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)sockio.h 8.1 (Berkeley) 3/28/94
- * $Id$
- */
-
-#ifndef _SYS_SOCKIO_H_
-#define _SYS_SOCKIO_H_
-
-#include <sys/ioccom.h>
-
-/* Socket ioctl's. */
-#define SIOCSHIWAT _IOW('s', 0, int) /* set high watermark */
-#define SIOCGHIWAT _IOR('s', 1, int) /* get high watermark */
-#define SIOCSLOWAT _IOW('s', 2, int) /* set low watermark */
-#define SIOCGLOWAT _IOR('s', 3, int) /* get low watermark */
-#define SIOCATMARK _IOR('s', 7, int) /* at oob mark? */
-#define SIOCSPGRP _IOW('s', 8, int) /* set process group */
-#define SIOCGPGRP _IOR('s', 9, int) /* get process group */
-
-#define SIOCADDRT _IOW('r', 10, struct ortentry) /* add route */
-#define SIOCDELRT _IOW('r', 11, struct ortentry) /* delete route */
-#define SIOCGETVIFCNT _IOWR('r', 15, struct sioc_vif_req)/* get vif pkt cnt */
-#define SIOCGETSGCNT _IOWR('r', 16, struct sioc_sg_req) /* get s,g pkt cnt */
-
-#define SIOCSIFADDR _IOW('i', 12, struct ifreq) /* set ifnet address */
-#define OSIOCGIFADDR _IOWR('i', 13, struct ifreq) /* get ifnet address */
-#define SIOCGIFADDR _IOWR('i', 33, struct ifreq) /* get ifnet address */
-#define SIOCSIFDSTADDR _IOW('i', 14, struct ifreq) /* set p-p address */
-#define OSIOCGIFDSTADDR _IOWR('i', 15, struct ifreq) /* get p-p address */
-#define SIOCGIFDSTADDR _IOWR('i', 34, struct ifreq) /* get p-p address */
-#define SIOCSIFFLAGS _IOW('i', 16, struct ifreq) /* set ifnet flags */
-#define SIOCGIFFLAGS _IOWR('i', 17, struct ifreq) /* get ifnet flags */
-#define OSIOCGIFBRDADDR _IOWR('i', 18, struct ifreq) /* get broadcast addr */
-#define SIOCGIFBRDADDR _IOWR('i', 35, struct ifreq) /* get broadcast addr */
-#define SIOCSIFBRDADDR _IOW('i', 19, struct ifreq) /* set broadcast addr */
-#define OSIOCGIFCONF _IOWR('i', 20, struct ifconf) /* get ifnet list */
-#define SIOCGIFCONF _IOWR('i', 36, struct ifconf) /* get ifnet list */
-#define OSIOCGIFNETMASK _IOWR('i', 21, struct ifreq) /* get net addr mask */
-#define SIOCGIFNETMASK _IOWR('i', 37, struct ifreq) /* get net addr mask */
-#define SIOCSIFNETMASK _IOW('i', 22, struct ifreq) /* set net addr mask */
-#define SIOCGIFMETRIC _IOWR('i', 23, struct ifreq) /* get IF metric */
-#define SIOCSIFMETRIC _IOW('i', 24, struct ifreq) /* set IF metric */
-#define SIOCDIFADDR _IOW('i', 25, struct ifreq) /* delete IF addr */
-#define SIOCAIFADDR _IOW('i', 26, struct ifaliasreq)/* add/chg IF alias */
-
-#define SIOCADDMULTI _IOW('i', 49, struct ifreq) /* add m'cast addr */
-#define SIOCDELMULTI _IOW('i', 50, struct ifreq) /* del m'cast addr */
-#define SIOCGIFMTU _IOWR('i', 51, struct ifreq) /* get IF mtu */
-#define SIOCSIFMTU _IOW('i', 52, struct ifreq) /* set IF mtu */
-#define SIOCGIFPHYS _IOWR('i', 53, struct ifreq) /* get IF wire */
-#define SIOCSIFPHYS _IOW('i', 54, struct ifreq) /* set IF wire */
-#define SIOCSIFMEDIA _IOWR('i', 55, struct ifreq) /* set net media */
-#define SIOCGIFMEDIA _IOWR('i', 56, struct ifmediareq) /* get net media */
-
-/*
- * RTEMS additions for setting/getting `tap' function on incoming packets.
- */
-#define SIOCSIFTAP _IOW('i', 80, struct ifreq) /* set tap function */
-#define SIOCGIFTAP _IOW('i', 81, struct ifreq) /* get tap function */
-
-#endif /* !_SYS_SOCKIO_H_ */
diff --git a/c/src/lib/include/sys/utsname.h b/c/src/lib/include/sys/utsname.h
deleted file mode 100644
index ca15230d40..0000000000
--- a/c/src/lib/include/sys/utsname.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* sys/utsname.h
- *
- * $Id$
- */
-
-#ifndef __POSIX_SYS_UTSNAME_h
-#define __POSIX_SYS_UTSNAME_h
-
-#include <sys/times.h>
-#include <sys/types.h>
-
-/*
- * 4.4.1 Get System Name (Table 4-1), P1003.1b-1993, p. 90
- *
- * NOTE: The lengths of the strings in this structure are
- * just long enough to reliably contain the RTEMS information.
- * For example, the fields are not long enough to support
- * Internet hostnames.
- */
-
-struct utsname {
- char sysname[ 32 ]; /* Name of this implementation of the operating system */
- char nodename[ 32 ]; /* Name of this node within an implementation */
- /* specified communication network */
- char release[ 32 ]; /* Current release level of this implementation */
- char version[ 32 ]; /* Current version level of this release */
- char machine[ 32 ]; /* Name of the hardware type on which the system */
- /* is running */
-};
-
-/*
- * 4.4.1 Get System Name, P1003.1b-1993, p. 90
- */
-
-int uname(
- struct utsname *name
-);
-
-/*
- * 4.5.2 Get Process Times, P1003.1b-1993, p. 92
- */
-
-clock_t times(
- struct tms *buffer
-);
-
-#endif
-/* end of include file */
-
diff --git a/c/src/lib/libbsp/i386/shared/irq/idt.c b/c/src/lib/libbsp/i386/shared/irq/idt.c
deleted file mode 100644
index 96eb0ba97f..0000000000
--- a/c/src/lib/libbsp/i386/shared/irq/idt.c
+++ /dev/null
@@ -1,288 +0,0 @@
-/*
- * cpu.c - This file contains implementation of C function to
- * instantiate IDT entries. More detailled information can be found
- * on Intel site and more precisely in the following book :
- *
- * Pentium Processor family
- * Developper's Manual
- *
- * Volume 3 : Architecture and Programming Manual
- *
- * Copyright (C) 1998 Eric Valette (valette@crf.canon.fr)
- * Canon Centre Recherche France.
- *
- * The license and distribution terms for this file may be
- * found in found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <libcpu/cpu.h>
-#include <irq.h>
-
-static rtems_raw_irq_connect_data* raw_irq_table;
-static rtems_raw_irq_connect_data default_raw_irq_entry;
-static interrupt_gate_descriptor default_idt_entry;
-static rtems_raw_irq_global_settings* local_settings;
-
-void create_interrupt_gate_descriptor (interrupt_gate_descriptor* idtEntry,
- rtems_raw_irq_hdl hdl)
-{
- idtEntry->low_offsets_bits = (((unsigned) hdl) & 0xffff);
- idtEntry->segment_selector = i386_get_cs();
- idtEntry->fixed_value_bits = 0;
- idtEntry->gate_type = 0xe;
- idtEntry->privilege = 0;
- idtEntry->present = 1;
- idtEntry->high_offsets_bits = ((((unsigned) hdl) >> 16) & 0xffff);
-}
-
-rtems_raw_irq_hdl get_hdl_from_vector(rtems_vector_offset index)
-{
- rtems_raw_irq_hdl hdl;
- interrupt_gate_descriptor* idt_entry_tbl;
- unsigned limit;
-
- i386_get_info_from_IDTR (&idt_entry_tbl, &limit);
-
- /* Convert limit into number of entries */
- limit = (limit + 1) / sizeof(interrupt_gate_descriptor);
-
- if(index >= limit) {
- return 0;
- }
-
- * ((unsigned int*) &hdl) = (idt_entry_tbl[index].low_offsets_bits |
- (idt_entry_tbl[index].high_offsets_bits << 16));
- return hdl;
-}
-
-int i386_set_idt_entry (const rtems_raw_irq_connect_data* irq)
-{
- interrupt_gate_descriptor* idt_entry_tbl;
- unsigned limit;
- unsigned int level;
-
-
- i386_get_info_from_IDTR (&idt_entry_tbl, &limit);
-
- /* Convert limit into number of entries */
- limit = (limit + 1) / sizeof(interrupt_gate_descriptor);
-
- if (irq->idtIndex >= limit) {
- return 0;
- }
- /*
- * Check if default handler is actually connected. If not issue an error.
- * You must first get the current handler via i386_get_current_idt_entry
- * and then disconnect it using i386_delete_idt_entry.
- * RATIONALE : to always have the same transition by forcing the user
- * to get the previous handler before accepting to disconnect.
- */
- if (get_hdl_from_vector(irq->idtIndex) != default_raw_irq_entry.hdl) {
- return 0;
- }
-
- _CPU_ISR_Disable(level);
-
- raw_irq_table [irq->idtIndex] = *irq;
- create_interrupt_gate_descriptor (&idt_entry_tbl[irq->idtIndex], irq->hdl);
- irq->on(irq);
-
- _CPU_ISR_Enable(level);
- return 1;
-}
-
-void _CPU_ISR_install_vector (unsigned vector,
- void* hdl,
- void** oldHdl)
-{
- interrupt_gate_descriptor* idt_entry_tbl;
- unsigned limit;
- interrupt_gate_descriptor new;
- unsigned int level;
-
- i386_get_info_from_IDTR (&idt_entry_tbl, &limit);
-
- /* Convert limit into number of entries */
- limit = (limit + 1) / sizeof(interrupt_gate_descriptor);
-
- if (vector >= limit) {
- return;
- }
- _CPU_ISR_Disable(level)
- * ((unsigned int *) oldHdl) = idt_entry_tbl[vector].low_offsets_bits |
- (idt_entry_tbl[vector].high_offsets_bits << 16);
-
- create_interrupt_gate_descriptor(&new, hdl);
- idt_entry_tbl[vector] = new;
-
- _CPU_ISR_Enable(level);
-}
-
-int i386_get_current_idt_entry (rtems_raw_irq_connect_data* irq)
-{
- interrupt_gate_descriptor* idt_entry_tbl;
- unsigned limit;
-
- i386_get_info_from_IDTR (&idt_entry_tbl, &limit);
-
- /* Convert limit into number of entries */
- limit = (limit + 1) / sizeof(interrupt_gate_descriptor);
-
- if (irq->idtIndex >= limit) {
- return 0;
- }
- raw_irq_table [irq->idtIndex].hdl = get_hdl_from_vector(irq->idtIndex);
-
- *irq = raw_irq_table [irq->idtIndex];
-
- return 1;
-}
-
-int i386_delete_idt_entry (const rtems_raw_irq_connect_data* irq)
-{
- interrupt_gate_descriptor* idt_entry_tbl;
- unsigned limit;
- unsigned int level;
-
- i386_get_info_from_IDTR (&idt_entry_tbl, &limit);
-
- /* Convert limit into number of entries */
- limit = (limit + 1) / sizeof(interrupt_gate_descriptor);
-
- if (irq->idtIndex >= limit) {
- return 0;
- }
- /*
- * Check if handler passed is actually connected. If not issue an error.
- * You must first get the current handler via i386_get_current_idt_entry
- * and then disconnect it using i386_delete_idt_entry.
- * RATIONALE : to always have the same transition by forcing the user
- * to get the previous handler before accepting to disconnect.
- */
- if (get_hdl_from_vector(irq->idtIndex) != irq->hdl){
- return 0;
- }
- _CPU_ISR_Disable(level);
-
- idt_entry_tbl[irq->idtIndex] = default_idt_entry;
-
- irq->off(irq);
-
- raw_irq_table[irq->idtIndex] = default_raw_irq_entry;
- raw_irq_table[irq->idtIndex].idtIndex = irq->idtIndex;
-
- _CPU_ISR_Enable(level);
-
- return 1;
-}
-
-/*
- * Caution this function assumes the IDTR has been already set.
- */
-int i386_init_idt (rtems_raw_irq_global_settings* config)
-{
- unsigned limit;
- unsigned i;
- unsigned level;
- interrupt_gate_descriptor* idt_entry_tbl;
-
- i386_get_info_from_IDTR (&idt_entry_tbl, &limit);
-
- /* Convert limit into number of entries */
- limit = (limit + 1) / sizeof(interrupt_gate_descriptor);
-
- if (config->idtSize != limit) {
- return 0;
- }
- /*
- * store various accelarators
- */
- raw_irq_table = config->rawIrqHdlTbl;
- local_settings = config;
- default_raw_irq_entry = config->defaultRawEntry;
-
- _CPU_ISR_Disable(level);
-
- create_interrupt_gate_descriptor (&default_idt_entry, default_raw_irq_entry.hdl);
-
- for (i=0; i < limit; i++) {
- interrupt_gate_descriptor new;
- create_interrupt_gate_descriptor (&new, raw_irq_table[i].hdl);
- idt_entry_tbl[i] = new;
- if (raw_irq_table[i].hdl != default_raw_irq_entry.hdl) {
- raw_irq_table[i].on(&raw_irq_table[i]);
- }
- else {
- raw_irq_table[i].off(&raw_irq_table[i]);
- }
- }
- _CPU_ISR_Enable(level);
-
- return 1;
-}
-
-int i386_get_idt_config (rtems_raw_irq_global_settings** config)
-{
- *config = local_settings;
- return 1;
-}
-
-/*
- * Caution this function assumes the GDTR has been already set.
- */
-int i386_set_gdt_entry (unsigned short segment_selector, unsigned base,
- unsigned limit)
-{
- unsigned gdt_limit;
- unsigned short tmp_segment = 0;
- unsigned int limit_adjusted;
- segment_descriptors* gdt_entry_tbl;
-
-
- i386_get_info_from_GDTR (&gdt_entry_tbl, &gdt_limit);
-
- if (segment_selector > limit) {
- return 0;
- }
- /*
- * set up limit first
- */
- limit_adjusted = limit;
- if ( limit > 4095 ) {
- gdt_entry_tbl[segment_selector].granularity = 1;
- limit_adjusted /= 4096;
- }
- gdt_entry_tbl[segment_selector].limit_15_0 = limit_adjusted & 0xffff;
- gdt_entry_tbl[segment_selector].limit_19_16 = (limit_adjusted >> 16) & 0xf;
- /*
- * set up base
- */
- gdt_entry_tbl[segment_selector].base_address_15_0 = base & 0xffff;
- gdt_entry_tbl[segment_selector].base_address_23_16 = (base >> 16) & 0xff;
- gdt_entry_tbl[segment_selector].base_address_31_24 = (base >> 24) & 0xff;
- /*
- * set up descriptor type (this may well becomes a parameter if needed)
- */
- gdt_entry_tbl[segment_selector].type = 2; /* Data R/W */
- gdt_entry_tbl[segment_selector].descriptor_type = 1; /* Code or Data */
- gdt_entry_tbl[segment_selector].privilege = 0; /* ring 0 */
- gdt_entry_tbl[segment_selector].present = 1; /* not present */
-
- /*
- * Now, reload all segment registers so the limit takes effect.
- */
-
- asm volatile( "movw %%ds,%0 ; movw %0,%%ds
- movw %%es,%0 ; movw %0,%%es
- movw %%fs,%0 ; movw %0,%%fs
- movw %%gs,%0 ; movw %0,%%gs
- movw %%ss,%0 ; movw %0,%%ss"
- : "=r" (tmp_segment)
- : "0" (tmp_segment)
- );
-
- return 1;
-}
diff --git a/c/src/lib/libbsp/m68k/ods68302/startup/cpuboot.c b/c/src/lib/libbsp/m68k/ods68302/startup/cpuboot.c
deleted file mode 100644
index fd8a4146de..0000000000
--- a/c/src/lib/libbsp/m68k/ods68302/startup/cpuboot.c
+++ /dev/null
@@ -1,133 +0,0 @@
-/*****************************************************************************/
-/*
- Boot the CPU.
-
- Occurs in 3 phases for a 68302.
-
- Phase 1.
-
- Called as soon as able after reset. The BAR has been programed, and
- a small stack exists in the DPRAM. All interrupts are masked, and
- the processor is running in supervisor mode. No other hardware or
- chip selects are active.
-
- This phase programs the chip select registers, the parallel ports
- are set into default configurations, and basic registers cleared or
- reset. The leds are programmed to show the end of phase 1.
-
- Phase 2.
-
- This is a piece of code which is copied to DPRAM and executed. It
- should not do any more thann is currently present. The return to ROM
- is managed by modifing the return address. Again leds show the status.
-
- Phase 3.
-
- This code executes with a valid C environment. That is the data
- section has been intialised and the bss section set to 0. This phase
- performs any special card initialisation and then calls boot card.
-
- $Id$
-
-*/
-/*****************************************************************************/
-
-#include <bsp.h>
-#include <m68302.h>
-#include <debugport.h>
-#include <crc.h>
-
-/*
- Open the address, reset all registers
- */
-
-void boot_phase_1()
-{
- M302_SCR = SCR_DEFAULT;
-
- WRITE_OR(CSEL_ROM, ROM_SIZE, ROM_WAIT_STATES, OR_MASK_RW, OR_MASK_FC);
- WRITE_BR(CSEL_ROM, RAM_BASE, BR_READ_ONLY, BR_FC_NULL, BR_ENABLED);
- WRITE_OR(CSEL_RAM, RAM_SIZE, RAM_WAIT_STATES, OR_MASK_RW, OR_MASK_FC);
- WRITE_BR(CSEL_RAM, ROM_BASE, BR_READ_WRITE, BR_FC_NULL, BR_ENABLED);
-
-#if defined(CSEL_1)
- WRITE_OR(CSEL_1, CSEL_1_SIZE, CSEL_1_WAIT_STATES, OR_MASK_RW, OR_MASK_FC);
- WRITE_BR(CSEL_1, CSEL_1_BASE, BR_READ_WRITE, BR_FC_NULL, BR_ENABLED);
-#endif
-
-#if defined(CSEL_2)
- WRITE_OR(CSEL_2, CSEL_2_SIZE, CSEL_2_WAIT_STATES, OR_MASK_RW, OR_MASK_FC);
- WRITE_BR(CSEL_2, CSEL_2_BASE, BR_READ_WRITE, BR_FC_NULL, BR_ENABLED);
-#endif
-
- m302.reg.gimr = m302.reg.ipr = m302.reg.imr = m302.reg.isr = 0;
-
- m302.reg.simode = 0;
-
- m302.reg.pacnt = CARD_PA_CONFIGURATION;
- m302.reg.paddr = CARD_PA_DEFAULT_DIRECTIONS;
- m302.reg.padat = CARD_PA_DEFAULT_DATA;
-
- m302.reg.pbcnt = CARD_PB_CONFIGURATION;
- m302.reg.pbddr = CARD_PB_DEFAULT_DIRECTIONS;
- m302.reg.pbdat = CARD_PB_DEFAULT_DATA;
-
- m302.reg.wrr = WATCHDOG_TIMEOUT_PERIOD | WATCHDOG_ENABLE;
-
-#if defined(LED_CONTROL)
- LED_CONTROL(LED_1_RED, LED_2_OFF, LED_3_OFF, LED_4_OFF,
- LED_5_OFF, LED_6_OFF, LED_7_OFF, LED_8_OFF);
-#endif
-}
-
-/*
- Swap the chip select mapping for ROM and RAM
- */
-
-void boot_phase_2(void)
-{
- rtems_unsigned32 stack;
-
-#if defined(LED_CONTROL)
- LED_CONTROL(LED_1_RED, LED_2_RED, LED_3_OFF, LED_4_OFF,
- LED_5_OFF, LED_6_OFF, LED_7_OFF, LED_8_OFF);
-#endif
-
- WRITE_BR(CSEL_ROM, ROM_BASE, BR_READ_ONLY, BR_FC_NULL, BR_ENABLED);
- WRITE_BR(CSEL_RAM, RAM_BASE, BR_READ_WRITE, BR_FC_NULL, BR_ENABLED);
-
-#if defined(LED_CONTROL)
- LED_CONTROL(LED_1_GREEN, LED_2_RED, LED_3_OFF, LED_4_OFF,
- LED_5_OFF, LED_6_OFF, LED_7_OFF, LED_8_OFF);
-#endif
-
- /* seems to want 2, looked at assember code output */
- *(&stack + 2) |= ROM_BASE;
-}
-
-/*
- Any pre-main initialisation, the C environment is setup, how-ever C++
- static constructors have not been called, and RTEMS is not initialised.
- */
-
-void boot_card();
-void set_debug_traps();
-void breakpoint();
-
-void boot_phase_3(void)
-{
- if (GDB_RUN_MONITOR())
- {
- set_debug_traps();
- breakpoint();
- }
-
- debug_port_banner();
-
- /* FIXME : add RAM and ROM checks */
-
- /* boot the bsp, what ever this means */
- boot_card();
-
- WATCHDOG_TRIGGER();
-}
diff --git a/c/src/lib/libbsp/mips/Makefile.am b/c/src/lib/libbsp/mips/Makefile.am
deleted file mode 100644
index c8c799c0b4..0000000000
--- a/c/src/lib/libbsp/mips/Makefile.am
+++ /dev/null
@@ -1,12 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-
-## Descend into the $(RTEMS_BSP_FAMILY) directory
-SUBDIRS = $(RTEMS_BSP_FAMILY)
-
-include $(top_srcdir)/../../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/mips/README b/c/src/lib/libbsp/mips/README
deleted file mode 100644
index 7f16e33d39..0000000000
--- a/c/src/lib/libbsp/mips/README
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# $Id$
-#
-
-The MIPS bsp are now called p4600 and p4650, referring to which cpu they use.
-The same bsp sub-directory can be used, the cpu is selected by the bsp
-specific makefiles (p4600.cfg and p4650.cfg).
diff --git a/c/src/lib/libbsp/mips/configure.in b/c/src/lib/libbsp/mips/configure.in
deleted file mode 100644
index a82ebfd0c7..0000000000
--- a/c/src/lib/libbsp/mips/configure.in
+++ /dev/null
@@ -1,24 +0,0 @@
-dnl Process this file with autoconf to produce a configure script.
-dnl
-dnl $Id$
-
-AC_PREREQ(2.13)
-AC_INIT(p4000)
-RTEMS_TOP(../../../../..)
-AC_CONFIG_AUX_DIR(../../../../..)
-
-RTEMS_CANONICAL_TARGET_CPU
-AM_INIT_AUTOMAKE(rtems-c-src-lib-libbsp-mips64orion,$RTEMS_VERSION,no)
-AM_MAINTAINER_MODE
-
-RTEMS_ENV_RTEMSBSP
-RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
-RTEMS_CHECK_BSP_CACHE(RTEMS_BSP)
-RTEMS_PROJECT_ROOT
-
-RTEMS_BSP_ALIAS(${RTEMS_BSP},bspdir)
-AC_CONFIG_SUBDIRS($bspdir)
-
-# Explicitly list all Makefiles here
-AC_OUTPUT(
-Makefile)
diff --git a/c/src/lib/libbsp/mips/p4000/Makefile.am b/c/src/lib/libbsp/mips/p4000/Makefile.am
deleted file mode 100644
index 9d6732d969..0000000000
--- a/c/src/lib/libbsp/mips/p4000/Makefile.am
+++ /dev/null
@@ -1,17 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-
-# wrapup is the one that actually builds and installs the library
-# from the individual .rel files built in other directories
-SUBDIRS = include start startup console liblnk wrapup
-
-include $(top_srcdir)/../../bsp.am
-
-EXTRA_DIST = bsp_specs times
-
-include $(top_srcdir)/../../../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/mips/p4000/README b/c/src/lib/libbsp/mips/p4000/README
deleted file mode 100644
index 361366d01d..0000000000
--- a/c/src/lib/libbsp/mips/p4000/README
+++ /dev/null
@@ -1,47 +0,0 @@
-#
-# $Id$
-#
-# @(#)README 08/20/96 1.2
-#
-
-BSP NAME: p4000
-BOARD: Algorithmics P4000 SBC
-BUS: N/A
-CPU FAMILY: mips
-CPU: IDT 4650
-COPROCESSORS: N/A
-MODE: 32 bit mode
-
-DEBUG MONITOR: IDT/SIM
-
-PERIPHERALS
-===========
-TIMERS: 4650 internal
- RESOLUTION: half of internal clock frequency
-SERIAL PORTS: IDT/SIM controlled
-REAL-TIME CLOCK: none
-DMA: none
-VIDEO: none
-SCSI: none
-NETWORKING: none
-
-DRIVER INFORMATION
-==================
-CLOCK DRIVER: 4650 internal
-IOSUPP DRIVER: N/A
-SHMSUPP: N/A
-TIMER DRIVER: 4650 internal
-TTY DRIVER: uses IDT/SIM
-
-STDIO
-=====
-PORT: Console port 0
-ELECTRICAL: RS-232
-BAUD: 9600
-BITS PER CHARACTER: 8
-PARITY: None
-STOP BITS: 1
-
-NOTES
-=====
-
diff --git a/c/src/lib/libbsp/mips/p4000/bsp_specs b/c/src/lib/libbsp/mips/p4000/bsp_specs
deleted file mode 100644
index 61dac86b53..0000000000
--- a/c/src/lib/libbsp/mips/p4000/bsp_specs
+++ /dev/null
@@ -1,23 +0,0 @@
-%rename cpp old_cpp
-%rename lib old_lib
-%rename endfile old_endfile
-%rename startfile old_startfile
-%rename link old_link
-
-*cpp:
-%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded)
-
-*lib:
-%{!qrtems: %(old_lib)} %{qrtems: --start-group \
-%{!qrtems_debug: -lrtemsall} %{qrtems_debug: -lrtemsall_g} \
--lc -lgcc --end-group \
-%{!qnolinkcmds: -T linkcmds%s}}
-
-*startfile:
-%{!qrtems: %(old_startfile)} %{qrtems: \
-%{!qrtems_debug: start.o%s} \
-%{qrtems_debug: start_g.o%s}}
-
-*link:
-%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start}
-
diff --git a/c/src/lib/libbsp/mips/p4000/configure.in b/c/src/lib/libbsp/mips/p4000/configure.in
deleted file mode 100644
index d174046a9a..0000000000
--- a/c/src/lib/libbsp/mips/p4000/configure.in
+++ /dev/null
@@ -1,32 +0,0 @@
-dnl Process this file with autoconf to produce a configure script.
-dnl
-dnl $Id$
-
-AC_PREREQ(2.13)
-AC_INIT(bsp_specs)
-RTEMS_TOP(../../../../../..)
-AC_CONFIG_AUX_DIR(../../../../../..)
-
-RTEMS_CANONICAL_TARGET_CPU
-AM_INIT_AUTOMAKE(rtems-c-src-lib-libbsp-mips64orion-p4000,$RTEMS_VERSION,no)
-AM_MAINTAINER_MODE
-
-RTEMS_PROG_CC_FOR_TARGET
-RTEMS_CANONICALIZE_TOOLS
-
-RTEMS_ENV_RTEMSBSP
-RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
-RTEMS_CHECK_BSP_CACHE(RTEMS_BSP)
-RTEMS_CANONICAL_HOST
-
-RTEMS_PROJECT_ROOT
-
-# Explicitly list all Makefiles here
-AC_OUTPUT(
-Makefile
-console/Makefile
-include/Makefile
-liblnk/Makefile
-start/Makefile
-startup/Makefile
-wrapup/Makefile)
diff --git a/c/src/lib/libbsp/mips/p4000/console/Makefile.am b/c/src/lib/libbsp/mips/p4000/console/Makefile.am
deleted file mode 100644
index b767925096..0000000000
--- a/c/src/lib/libbsp/mips/p4000/console/Makefile.am
+++ /dev/null
@@ -1,35 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-PGM = $(ARCH)/console.rel
-
-C_FILES = console.c
-C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
-
-S_FILES = led.S
-S_O_FILES = $(S_FILES:%.S=$(ARCH)/%.o)
-
-OBJS = $(C_O_FILES) $(S_O_FILES)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../../../../automake/lib.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-$(PGM): $(OBJS)
- $(make-rel)
-
-# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile
-
-all-local: $(ARCH) $(OBJS) $(PGM)
-
-.PRECIOUS: $(PGM)
-
-EXTRA_DIST = console.c led.S
-
-include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/mips/p4000/console/console.c b/c/src/lib/libbsp/mips/p4000/console/console.c
deleted file mode 100644
index 763c96ccd5..0000000000
--- a/c/src/lib/libbsp/mips/p4000/console/console.c
+++ /dev/null
@@ -1,274 +0,0 @@
-/*
- * This file contains the IDT 4650 console IO package.
- *
- * Author: Craig Lebakken <craigl@transition.com>
- *
- * COPYRIGHT (c) 1996 by Transition Networks Inc.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Transition Networks not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * Transition Networks makes no representations about the suitability
- * of this software for any purpose.
- *
- * Derived from c/src/lib/libbsp/no_cpu/no_bsp/console/console.c:
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-/*
- * Rather than deleting this, it is commented out to (hopefully) help
- * the submitter send updates.
- *
- * static char _sccsid[] = "@(#)console.c 08/20/96 1.6\n";
- */
-
-
-
-#include <bsp.h>
-#include <rtems/libio.h>
-#include <ctype.h>
-
-char idtsim_getchar( void );
-void idtsim_putchar( char c );
-void mips_leddisplay( char a, char b, char c, char d );
-
-
-/* console_initialize
- *
- * This routine initializes the console IO driver.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * Return values:
- */
-
-rtems_device_driver console_initialize(
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void *arg
-)
-{
- rtems_status_code status;
-
- status = rtems_io_register_name(
- "/dev/console",
- major,
- (rtems_device_minor_number) 0
- );
-
- if (status != RTEMS_SUCCESSFUL)
- rtems_fatal_error_occurred(status);
-
- return RTEMS_SUCCESSFUL;
-}
-
-
-/* is_character_ready
- *
- * This routine returns TRUE if a character is available.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * Return values:
- */
-
-rtems_boolean is_character_ready(
- char *ch
-)
-{
- *ch = '\0'; /* return NULL for no particular reason */
- return(TRUE);
-}
-
-/* inbyte
- *
- * This routine reads a character from the SOURCE.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * Return values:
- * character read from SOURCE
- */
-
-char inbyte( void )
-{
- /*
- * If polling, wait until a character is available.
- */
-
- return idtsim_getchar();
-}
-
-/* outbyte
- *
- * This routine transmits a character out the SOURCE. It may support
- * XON/XOFF flow control.
- *
- * Input parameters:
- * ch - character to be transmitted
- *
- * Output parameters: NONE
- */
-
-void outbyte(
- char ch
-)
-{
-#define NUM_LEDS 4
- static unsigned int cur_led = 0;
- static unsigned char led_chars[NUM_LEDS];
-
- /*
- * If polling, wait for the transmitter to be ready.
- * Check for flow control requests and process.
- * Then output the character.
- */
-
- idtsim_putchar( ch );
-
- /* print out first four alpha numeric characters in a line */
- if ( ch == '\n' )
- {
- mips_leddisplay( led_chars[0], led_chars[1], led_chars[2], led_chars[3] );
- cur_led = 0;
- }
- else if ( isalnum( (unsigned char) ch ) && cur_led < NUM_LEDS )
- {
- led_chars[cur_led++] = ch;
- }
-
-}
-
-
-#if 0
-static int console_fd = -1;
-#endif
-
-/*
- * Open entry point
- */
-
-rtems_device_driver console_open(
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void * arg
-)
-{
-#if 0
- int console_fd = open("tty0", 2); /* open for read/write */
-#endif
- return RTEMS_SUCCESSFUL;
-}
-
-/*
- * Close entry point
- */
-
-rtems_device_driver console_close(
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void * arg
-)
-{
-#if 0
- if ( console_fd )
- close( console_fd );
-#endif
- return RTEMS_SUCCESSFUL;
-}
-
-/*
- * read bytes from the serial port. We only have stdin.
- */
-
-rtems_device_driver console_read(
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void * arg
-)
-{
- rtems_libio_rw_args_t *rw_args;
- char *buffer;
- int maximum;
- int count = 0;
-
- rw_args = (rtems_libio_rw_args_t *) arg;
-
- buffer = rw_args->buffer;
- maximum = rw_args->count;
-
- for (count = 0; count < maximum; count++) {
- buffer[ count ] = inbyte();
- if (buffer[ count ] == '\n' || buffer[ count ] == '\r') {
- buffer[ count++ ] = '\n';
- break;
- }
- }
-
- rw_args->bytes_moved = count;
- return (count >= 0) ? RTEMS_SUCCESSFUL : RTEMS_UNSATISFIED;
-}
-
-/*
- * write bytes to the serial port. Stdout and stderr are the same.
- */
-
-rtems_device_driver console_write(
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void * arg
-)
-{
- int count;
- int maximum;
- rtems_libio_rw_args_t *rw_args;
- char *buffer;
-
- rw_args = (rtems_libio_rw_args_t *) arg;
-
- buffer = rw_args->buffer;
- maximum = rw_args->count;
-
- for (count = 0; count < maximum; count++) {
- if ( buffer[ count ] == '\n') {
- outbyte('\r');
- }
- outbyte( buffer[ count ] );
- }
-
- rw_args->bytes_moved = maximum;
- return 0;
-}
-
-/*
- * IO Control entry point
- */
-
-rtems_device_driver console_control(
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void * arg
-)
-{
- return RTEMS_SUCCESSFUL;
-}
diff --git a/c/src/lib/libbsp/mips/p4000/console/led.S b/c/src/lib/libbsp/mips/p4000/console/led.S
deleted file mode 100644
index 5efd85f81a..0000000000
--- a/c/src/lib/libbsp/mips/p4000/console/led.S
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * $Id$
- */
-
-#include <iregdef.h>
-#include <idtmon.h>
-#include <idtcpu.h>
-
-
-FRAME(mips_leddisplay,sp,0,ra)
- j ra
- nop
-ENDFRAME(mips_leddisplay)
-
-FRAME(sbddisplay,sp,0,ra)
- j ra
-ENDFRAME(sbddisplay)
-
-
-FRAME(sbdblank,sp,0,ra)
- j ra
-ENDFRAME(sbdblank)
-
diff --git a/c/src/lib/libbsp/mips/p4000/include/Makefile.am b/c/src/lib/libbsp/mips/p4000/include/Makefile.am
deleted file mode 100644
index ec59942276..0000000000
--- a/c/src/lib/libbsp/mips/p4000/include/Makefile.am
+++ /dev/null
@@ -1,21 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-H_FILES = bsp.h coverhd.h
-
-$(PROJECT_INCLUDE):
- $(mkinstalldirs) $@
-
-$(PROJECT_INCLUDE)/%.h: %.h
- $(INSTALL_DATA) $< $@
-
-TMPINSTALL_FILES += $(PROJECT_INCLUDE) $(H_FILES:%.h=$(PROJECT_INCLUDE)/%.h)
-
-all-local: $(TMPINSTALL_FILES)
-
-EXTRA_DIST = bsp.h coverhd.h
-
-include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/mips/p4000/include/bsp.h b/c/src/lib/libbsp/mips/p4000/include/bsp.h
deleted file mode 100644
index a2a91bc634..0000000000
--- a/c/src/lib/libbsp/mips/p4000/include/bsp.h
+++ /dev/null
@@ -1,117 +0,0 @@
-/* bsp.h
- *
- * This include file contains all board IO definitions.
- *
- * XXX : put yours in here
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-/* @(#)bsp.h 03/15/96 1.1 */
-
-#ifndef __P4000_BSP_h
-#define __P4000_BSP_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems.h>
-#include <console.h>
-#include <clockdrv.h>
-
-extern void WriteDisplay( char * string );
-
-/*
- * Define the time limits for RTEMS Test Suite test durations.
- * Long test and short test duration limits are provided. These
- * values are in seconds and need to be converted to ticks for the
- * application.
- *
- */
-
-#define MAX_LONG_TEST_DURATION 300 /* 5 minutes = 300 seconds */
-#define MAX_SHORT_TEST_DURATION 3 /* 3 seconds */
-
-/*
- * Stuff for Time Test 27
- */
-
-#define MUST_WAIT_FOR_INTERRUPT 0
-
-#define Install_tm27_vector( handler ) set_vector( (handler), 0, 1 )
-
-#define Cause_tm27_intr()
-
-#define Clear_tm27_intr()
-
-#define Lower_tm27_intr()
-
-extern unsigned32 mips_get_timer( void );
-
-#define CPU_CLOCK_RATE_MHZ (50)
-#define CLOCKS_PER_MICROSECOND ( CPU_CLOCK_RATE_MHZ ) /* equivalent to CPU clock speed in MHz */
-
-/*
- * Simple spin delay in microsecond units for device drivers.
- * This is very dependent on the clock speed of the target.
- *
- * NOTE: This macro generates a warning like "integer constant out
- * of range" which is safe to ignore. In 64 bit mode, unsigned32
- * types are actually 64 bits long so that comparisons between
- * unsigned32 types and pointers are valid. The warning is caused
- * by code in the delay macro that is necessary for 64 bit mode.
- */
-
-#define delay( microseconds ) \
- { \
- unsigned32 _end_clock = mips_get_timer() + microseconds * CLOCKS_PER_MICROSECOND; \
- _end_clock %= 0x100000000; /* make sure result is 32 bits */ \
- \
- /* handle timer overflow, if necessary */ \
- while ( _end_clock < mips_get_timer() ); \
- \
- while ( _end_clock > mips_get_timer() ); \
- }
-
-/* Constants */
-
-#define RAM_START 0
-#define RAM_END 0x100000
-
-/* miscellaneous stuff assumed to exist */
-
-extern rtems_configuration_table BSP_Configuration;
-
-/*
- * Device Driver Table Entries
- */
-
-/*
- * NOTE: Use the standard Console driver entry
- */
-
-/*
- * NOTE: Use the standard Clock driver entry
- */
-
-/* miscellaneous stuff assumed to exist */
-
-mips_isr_entry set_vector( /* returns old vector */
- rtems_isr_entry handler, /* isr routine */
- rtems_vector_number vector, /* vector number */
- int type /* RTEMS or RAW intr */
-);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/c/src/lib/libbsp/mips/p4000/include/coverhd.h b/c/src/lib/libbsp/mips/p4000/include/coverhd.h
deleted file mode 100644
index 65b013bf59..0000000000
--- a/c/src/lib/libbsp/mips/p4000/include/coverhd.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/* coverhd.h
- *
- * This include file has defines to represent the overhead associated
- * with calling a particular directive from C. These are used in the
- * Timing Test Suite to ignore the overhead required to pass arguments
- * to directives. On some CPUs and/or target boards, this overhead
- * is significant and makes it difficult to distinguish internal
- * RTEMS execution time from that used to call the directive.
- * This file should be updated after running the C overhead timing
- * test. Once this update has been performed, the RTEMS Time Test
- * Suite should be rebuilt to account for these overhead times in the
- * timing results.
- *
- * NOTE: If these are all zero, then the times reported include
- * all calling overhead including passing of arguments.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-/* @(#)coverhd.h 04/08/96 1.3 */
-
-#ifndef __COVERHD_h
-#define __COVERHD_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define CALLING_OVERHEAD_INITIALIZE_EXECUTIVE 5
-#define CALLING_OVERHEAD_SHUTDOWN_EXECUTIVE 4
-#define CALLING_OVERHEAD_TASK_CREATE 6
-#define CALLING_OVERHEAD_TASK_IDENT 4
-#define CALLING_OVERHEAD_TASK_START 5
-#define CALLING_OVERHEAD_TASK_RESTART 4
-#define CALLING_OVERHEAD_TASK_DELETE 4
-#define CALLING_OVERHEAD_TASK_SUSPEND 4
-#define CALLING_OVERHEAD_TASK_RESUME 4
-#define CALLING_OVERHEAD_TASK_SET_PRIORITY 5
-#define CALLING_OVERHEAD_TASK_MODE 4
-#define CALLING_OVERHEAD_TASK_GET_NOTE 5
-#define CALLING_OVERHEAD_TASK_SET_NOTE 5
-#define CALLING_OVERHEAD_TASK_WAKE_WHEN 9
-#define CALLING_OVERHEAD_TASK_WAKE_AFTER 4
-#define CALLING_OVERHEAD_INTERRUPT_CATCH 5
-#define CALLING_OVERHEAD_CLOCK_GET 9
-#define CALLING_OVERHEAD_CLOCK_SET 8
-#define CALLING_OVERHEAD_CLOCK_TICK 3
-
-#define CALLING_OVERHEAD_TIMER_CREATE 4
-#define CALLING_OVERHEAD_TIMER_IDENT 4
-#define CALLING_OVERHEAD_TIMER_DELETE 4
-#define CALLING_OVERHEAD_TIMER_FIRE_AFTER 6
-#define CALLING_OVERHEAD_TIMER_FIRE_WHEN 10
-#define CALLING_OVERHEAD_TIMER_RESET 4
-#define CALLING_OVERHEAD_TIMER_CANCEL 4
-#define CALLING_OVERHEAD_SEMAPHORE_CREATE 5
-#define CALLING_OVERHEAD_SEMAPHORE_IDENT 4
-#define CALLING_OVERHEAD_SEMAPHORE_DELETE 4
-#define CALLING_OVERHEAD_SEMAPHORE_OBTAIN 5
-#define CALLING_OVERHEAD_SEMAPHORE_RELEASE 4
-#define CALLING_OVERHEAD_MESSAGE_QUEUE_CREATE 5
-#define CALLING_OVERHEAD_MESSAGE_QUEUE_IDENT 4
-#define CALLING_OVERHEAD_MESSAGE_QUEUE_DELETE 4
-#define CALLING_OVERHEAD_MESSAGE_QUEUE_SEND 4
-#define CALLING_OVERHEAD_MESSAGE_QUEUE_URGENT 4
-#define CALLING_OVERHEAD_MESSAGE_QUEUE_BROADCAST 5
-#define CALLING_OVERHEAD_MESSAGE_QUEUE_RECEIVE 5
-#define CALLING_OVERHEAD_MESSAGE_QUEUE_FLUSH 4
-
-#define CALLING_OVERHEAD_EVENT_SEND 4
-#define CALLING_OVERHEAD_EVENT_RECEIVE 5
-#define CALLING_OVERHEAD_SIGNAL_CATCH 5
-#define CALLING_OVERHEAD_SIGNAL_SEND 4
-#define CALLING_OVERHEAD_PARTITION_CREATE 6
-#define CALLING_OVERHEAD_PARTITION_IDENT 4
-#define CALLING_OVERHEAD_PARTITION_DELETE 4
-#define CALLING_OVERHEAD_PARTITION_GET_BUFFER 4
-#define CALLING_OVERHEAD_PARTITION_RETURN_BUFFER 4
-#define CALLING_OVERHEAD_REGION_CREATE 6
-#define CALLING_OVERHEAD_REGION_IDENT 4
-#define CALLING_OVERHEAD_REGION_DELETE 4
-#define CALLING_OVERHEAD_REGION_GET_SEGMENT 5
-#define CALLING_OVERHEAD_REGION_RETURN_SEGMENT 4
-#define CALLING_OVERHEAD_PORT_CREATE 6
-#define CALLING_OVERHEAD_PORT_IDENT 4
-#define CALLING_OVERHEAD_PORT_DELETE 4
-#define CALLING_OVERHEAD_PORT_EXTERNAL_TO_INTERNAL 4
-#define CALLING_OVERHEAD_PORT_INTERNAL_TO_EXTERNAL 4
-
-#define CALLING_OVERHEAD_IO_INITIALIZE 5
-#define CALLING_OVERHEAD_IO_OPEN 5
-#define CALLING_OVERHEAD_IO_CLOSE 5
-#define CALLING_OVERHEAD_IO_READ 5
-#define CALLING_OVERHEAD_IO_WRITE 5
-#define CALLING_OVERHEAD_IO_CONTROL 5
-#define CALLING_OVERHEAD_FATAL_ERROR_OCCURRED 4
-#define CALLING_OVERHEAD_RATE_MONOTONIC_CREATE 4
-#define CALLING_OVERHEAD_RATE_MONOTONIC_IDENT 4
-#define CALLING_OVERHEAD_RATE_MONOTONIC_DELETE 4
-#define CALLING_OVERHEAD_RATE_MONOTONIC_CANCEL 4
-#define CALLING_OVERHEAD_RATE_MONOTONIC_PERIOD 4
-#define CALLING_OVERHEAD_MULTIPROCESSING_ANNOUNCE 3
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/c/src/lib/libbsp/mips/p4000/liblnk/Makefile.am b/c/src/lib/libbsp/mips/p4000/liblnk/Makefile.am
deleted file mode 100644
index fea6719b3b..0000000000
--- a/c/src/lib/libbsp/mips/p4000/liblnk/Makefile.am
+++ /dev/null
@@ -1,32 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-PGM = $(ARCH)/liblnk.rel
-
-S_FILES = lnklib.S
-S_O_FILES = $(S_FILES:%.S=$(ARCH)/%.o)
-
-OBJS = $(S_O_FILES)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../../../../automake/lib.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-$(PGM): $(OBJS)
- $(make-rel)
-
-# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile
-
-all-local: $(ARCH) $(OBJS) $(PGM)
-
-.PRECIOUS: $(PGM)
-
-EXTRA_DIST = lnklib.S
-
-include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/mips/p4000/liblnk/lnklib.S b/c/src/lib/libbsp/mips/p4000/liblnk/lnklib.S
deleted file mode 100644
index 42da845534..0000000000
--- a/c/src/lib/libbsp/mips/p4000/liblnk/lnklib.S
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * $Id$
- */
-
-#include <iregdef.h>
-#include <idtcpu.h>
-
-#define FRAME(name,frm_reg,offset,ret_reg) \
- .globl name; \
- .ent name; \
-name:; \
- .frame frm_reg,offset,ret_reg
-
-#define ENDFRAME(name) \
- .end name
-
-#define PROM_LINK(name,entry) \
- .globl name; \
- .ent name; \
-name: la $2,+entry; \
- j $2; \
- .end name
-
-#define PROM_ENTRY(x) (0xbfc00000+((x)*8))
-
-#define PROM_RESET PROM_ENTRY(0)
-#define PROM_NOT_IMP PROM_ENTRY(1)
-#define PROM_RESTART PROM_ENTRY(2)
-#define PROM_REINIT PROM_ENTRY(3)
-#define PROM_GETCHAR PROM_ENTRY(11)
-#define PROM_PUTCHAR PROM_ENTRY(12)
-#define PROM_SHOWCHAR PROM_ENTRY(13)
-#define PROM_PRINTF PROM_ENTRY(16)
-#define PROM_RETURN PROM_ENTRY(17)
-
-#define PROM_RGETS PROM_ENTRY(25)
-#define PROM_FLUSHCACHE PROM_ENTRY(28)
-#define PROM_CLEARCACHE PROM_ENTRY(29)
-#define PROM_SETJMP PROM_ENTRY(30)
-#define PROM_LONGJMP PROM_ENTRY(31)
-
- .text
-
-PROM_LINK(idtsim_putchar, PROM_PUTCHAR)
-PROM_LINK(idtsim_getchar, PROM_GETCHAR)
-PROM_LINK(idtsim_showchar, PROM_SHOWCHAR)
-PROM_LINK(idtsim__exit, PROM_RETURN)
-PROM_LINK(idtsim_reinit, PROM_REINIT)
-PROM_LINK(idtsim_restart, PROM_RESTART)
-PROM_LINK(idtsim_reset, PROM_RESET)
-PROM_LINK(idtsim_promexit, PROM_RETURN)
-PROM_LINK(idtsim_setjmp, PROM_SETJMP)
-PROM_LINK(idtsim_longjmp, PROM_LONGJMP)
-
-FRAME(idtsim_init_sbrk,sp,0,ra)
- j ra
-ENDFRAME(idtsim_init_sbrk)
-
-FRAME(idtsim_init_file,sp,0,ra)
- j ra
-ENDFRAME(idtsim_init_file)
-
diff --git a/c/src/lib/libbsp/mips/p4000/start/Makefile.am b/c/src/lib/libbsp/mips/p4000/start/Makefile.am
deleted file mode 100644
index 824d7a22c5..0000000000
--- a/c/src/lib/libbsp/mips/p4000/start/Makefile.am
+++ /dev/null
@@ -1,32 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-PGM = $(ARCH)/start.o
-
-S_FILES = start.S
-S_O_FILES = $(S_FILES:%.S=$(ARCH)/%.o)
-
-OBJS = $(S_O_FILES)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../../../../automake/lib.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-$(PROJECT_RELEASE)/lib/start$(LIB_VARIANT).o: $(PGM)
- $(INSTALL_DATA) $< $@
-
-TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/start$(LIB_VARIANT).o
-
-all-local: $(ARCH) $(OBJS) $(PGM) $(TMPINSTALL_FILES)
-
-.PRECIOUS: $(PGM)
-
-EXTRA_DIST = start.S
-
-include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/mips/p4000/start/start.S b/c/src/lib/libbsp/mips/p4000/start/start.S
deleted file mode 100644
index 88646f520f..0000000000
--- a/c/src/lib/libbsp/mips/p4000/start/start.S
+++ /dev/null
@@ -1,299 +0,0 @@
-/*
-
-Based upon IDT provided code with the following release:
-
-This source code has been made available to you by IDT on an AS-IS
-basis. Anyone receiving this source is licensed under IDT copyrights
-to use it in any way he or she deems fit, including copying it,
-modifying it, compiling it, and redistributing it either with or
-without modifications. No license under IDT patents or patent
-applications is to be implied by the copyright license.
-
-Any user of this software should understand that IDT cannot provide
-technical support for this software and will not be responsible for
-any consequences resulting from the use of this software.
-
-Any person who transfers this source code or any derivative work must
-include the IDT copyright notice, this paragraph, and the preceeding
-two paragraphs in the transferred software.
-
-COPYRIGHT IDT CORPORATION 1996
-LICENSED MATERIAL - PROGRAM PROPERTY OF IDT
-
- $Id$
-*/
-
-/*************************************************************************
-**
-** Copyright 1991-95 Integrated Device Technology, Inc.
-** All Rights Reserved
-**
-** idt_csu.S -- IDT stand alone startup code
-**
-**************************************************************************/
-#include <iregdef.h>
-#include <idtcpu.h>
-#include <idtmon.h>
-
-
-.extern _fbss,4 /* this is defined by the linker */
-.extern end,4 /* this is defined by the linker */
-
-.lcomm sim_mem_cfg_struct,12
-
- .text
-
-
-#define TMP_STKSIZE 1024
-
-/**************************************************************************
-**
-** start - Typicl standalone start up code required for R3000/R4000
-**
-**
-** 1) Initialize the STATUS Register
-** a) Clear parity error bit
-** b) Set co_processor 1 usable bit ON
-** c) Clear all IntMask Enables
-** d) Set kernel/disabled mode
-** 2) Initialize Cause Register
-** a) clear software interrupt bits
-** 3) Determine FPU installed or not
-** if not, clear CoProcessor 1 usable bit
-** 4) Clear bss area
-** 5) MUST allocate temporary stack until memory size determined
-** It MUST be uncached to prevent overwriting when caches are cleared
-** 6) Install exception handlers
-** 7) Determine memory and cache sizes
-** 8) Establish permanent stack (cached or uncached as defined by bss)
-** 9) Flush Instruction and Data caches
-** 10) If there is a Translation Lookaside Buffer, Clear the TLB
-** 11) Execute initialization code if the IDT/c library is to be used
-**
-** 12) Jump to user's "main()"
-** 13) Jump to promexit
-**
-** IDT/C 5.x defines _R3000, IDT/C 6.x defines _R4000 internally.
-** This is used to mark code specific to R3xxx or R4xxx processors.
-** IDT/C 6.x defines __mips to be the ISA level for which we're
-** generating code. This is used to make sure the stack etc. is
-** double word aligned, when using -mips3 (default) or -mips2,
-** when compiling with IDT/C6.x
-**
-***************************************************************************/
-
-FRAME(start,sp,0,ra)
-
- .set noreorder
-#ifdef _R3000
- li v0,SR_PE|SR_CU1 /* reset parity error and set */
- /* cp1 usable */
-#endif
-#ifdef _R4000
-#if __mips==3 || defined(R4650)
- li v0,SR_CU1|SR_DE|SR_FR /* initally clear ERL, enable FPA 64bit regs*/
- /* 4650: Need fr to be set anyway */
-#else
- li v0,SR_CU1|SR_DE /* initally clear ERL, enable FPA 32bit regs*/
-#endif mips3
-#endif
-
- mtc0 v0,C0_SR /* clr IntMsks/ kernel/disabled mode */
- nop
- mtc0 zero,C0_CAUSE /* clear software interrupts */
- nop
-
-#ifdef _R4000
- li v0,CFG_C_NONCOHERENT # initialise default cache mode
- mtc0 v0,C0_CONFIG
-#endif
-
-/*
-** check to see if an fpu is really plugged in
-*/
- li t3,0xaaaa5555 /* put a's and 5's in t3 */
- mtc1 t3,fp0 /* try to write them into fp0 */
- mtc1 zero,fp1 /* try to write zero in fp */
- mfc1 t0,fp0
- mfc1 t1,fp1
- nop
- bne t0,t3,1f /* branch if no match */
- nop
- bne t1,zero,1f /* double check for positive id */
- nop
- /* We have a FPU. clear fcsr */
- ctc1 zero, fcr31
- j 2f /* status register already correct */
- nop
-1:
-#ifdef _R3000
- li v0, SR_PE /* reset parity error/NO cp1 usable */
-#endif
-
-#ifdef _R4000
- li v0,SR_DE /* clear ERL and disable FPA */
-#endif
-
- mtc0 v0, C0_SR /* reset status register */
-2:
- la gp, _gp
-
- la v0,_fbss /* clear bss before using it */
- la v1,end /* end of bss */
-3: sw zero,0(v0)
- bltu v0,v1,3b
- add v0,4
-
-
-/************************************************************************
-**
-** Temporary Stack - needed to handle stack saves until
-** memory size is determined and permanent stack set
-**
-** MUST be uncached to avoid confusion at cache
-** switching during memory sizing
-**
-*************************************************************************/
-#if __mips==3
- /* For MIPS 3, we need to be sure that the stack is aligned on a
- * double word boundary.
- */
- andi t0, v0, 0x7
- beqz t0, 11f /* Last three bits Zero, already aligned */
- nop
- add v0, 4
-11:
-#endif
-
- or v0, K1BASE /* switch to uncached */
- add v1, v0, TMP_STKSIZE /* end of bss + length of tmp stack */
- sub v1, v1, (4*4) /* overhead */
- move sp, v1 /* set sp to top of stack */
-4: sw zero, 0(v0)
- bltu v0, v1, 4b /* clear out temp stack */
- add v0, 4
-
- jal init_exc_vecs /* install exception handlers */
- nop /* MUST do before memory probes */
-
- la v0, 5f
- li v1, K1BASE /* force into uncached space */
- or v0, v1 /* during memory/cache probes */
- j v0
- nop
-5:
- la a0, sim_mem_cfg_struct
- jal sim_mem_cfg /* Make SIM call to get mem size */
- nop
- la a0, sim_mem_cfg_struct
- lw a0, 0(a0) /* Get memory size from struct */
-#ifdef _R3000
- jal config_Icache
- nop
- jal config_Dcache /* determine size of D & I caches */
- nop
-#endif
-#ifdef _R4000
- jal config_cache /* determine size of D & I caches */
- nop
-#endif
-
- move v0, a0 /* mem_size */
-
-#if __mips==3
- /* For MIPS 3, we need to be sure that the stack (and hence v0
- * here) is aligned on a double word boundary.
- */
- andi t0, v0, 0x7
- beqz t0, 12f /* Last three bits Zero, already aligned */
- nop
- subu v0, 4 /* mem_size was not aligned on doubleword bdry????*/
-12:
-#endif
-
-
-
-/**************************************************************************
-**
-** Permanent Stack - now know top of memory, put permanent stack there
-**
-***************************************************************************/
-
- la t2, _fbss /* cache mode as linked */
- and t2, 0xF0000000 /* isolate segment */
- la t1, 6f
- j t1 /* back to original cache mode */
- nop
-6:
- or v0, t2 /* stack back to original cache mode */
- addiu v0,v0,-16 /* overhead */
- move sp, v0 /* now replace count w top of memory */
- move v1, v0
- subu v1, P_STACKSIZE /* clear requested stack size */
-
-7: sw zero, 0(v1) /* clear P_STACKSIZE stack */
- bltu v1,v0,7b
- add v1, 4
- .set reorder
-
-#ifdef _R3000
- jal flush_Icache
- jal flush_Dcache /* flush Data & Instruction caches */
-#endif
-#ifdef _R4000
- jal flush_cache_nowrite /* flush Data & Instruction caches */
-#endif
-
-
-
-/**************************************************************************
-**
-** If this chip supports a Translation Lookaside Buffer, clear it
-**
-***************************************************************************/
-
- .set noreorder
- mfc0 t1, C0_SR /* look at Status Register */
- nop
- .set reorder
-#ifdef _R3000
- li t2, SR_TS /* TLB Shutdown bit */
- and t1,t2 /* TLB Shutdown if 1 */
- bnez t1, 8f /* skip clearing if no TLB */
-#endif
-
-#ifndef R4650
- jal init_tlb /* clear the tlb */
-#endif
-
-
-/************************************************************************
-**
-** Initialization required if using IDT/c or libc.a, standard C Lib
-**
-** can SKIP if not necessary for application
-**
-************************************************************************/
-8:
-
- jal idtsim_init_sbrk
- jal idtsim_init_file
-/*********************** END I/O initialization **********************/
-
-
- jal main
-
- jal idtsim_promexit
-
-ENDFRAME(start)
-
-
- .globl sim_mem_cfg
-sim_mem_cfg:
- .set noat
- .set noreorder
- li AT, (0xbfc00000+((55)*8))
- jr AT
- nop
- .set at
- .set reorder
diff --git a/c/src/lib/libbsp/mips/p4000/startup/Makefile.am b/c/src/lib/libbsp/mips/p4000/startup/Makefile.am
deleted file mode 100644
index 436e868c91..0000000000
--- a/c/src/lib/libbsp/mips/p4000/startup/Makefile.am
+++ /dev/null
@@ -1,47 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-VPATH = @srcdir@:@srcdir@/../../../shared
-
-PGM = $(ARCH)/startup.rel
-
-C_FILES = bspclean.c bsplibc.c bsppost.c bspstart.c bootcard.c main.c sbrk.c \
- setvec.c inittlb.c gnatinstallhandler.c
-C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
-
-S_FILES = idtmem.S idttlb.S
-S_O_FILES = $(S_FILES:%.S=$(ARCH)/%.o)
-
-OBJS = $(C_O_FILES) $(S_O_FILES)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../../../../automake/lib.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-$(PGM): $(OBJS)
- $(make-rel)
-
-$(PROJECT_RELEASE)/lib/ghlinkcmds: ghlinkcmds
- $(INSTALL_DATA) $< $@
-
-$(PROJECT_RELEASE)/lib/linkcmds: linkcmds
- $(INSTALL_DATA) $< $@
-
-# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile
-TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/ghlinkcmds \
- $(PROJECT_RELEASE)/lib/linkcmds
-
-all-local: $(ARCH) $(OBJS) $(PGM) $(TMPINSTALL_FILES)
-
-.PRECIOUS: $(PGM)
-
-EXTRA_DIST = bspclean.c bspstart.c ghlinkcmds idtmem.S idttlb.S inittlb.c \
- linkcmds setvec.c
-
-include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/mips/p4000/startup/bspclean.c b/c/src/lib/libbsp/mips/p4000/startup/bspclean.c
deleted file mode 100644
index 4e02a0ab01..0000000000
--- a/c/src/lib/libbsp/mips/p4000/startup/bspclean.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/* bsp_cleanup()
- *
- * This routine normally is part of start.s and usually returns
- * control to a monitor.
- *
- * INPUT: NONE
- *
- * OUTPUT: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-/*
- * Rather than deleting this, it is commented out to (hopefully) help
- * the submitter send updates.
- *
- * static char _sccsid[] = "@(#)bspclean.c 03/15/96 1.1\n";
- */
-
-
-
-#include <rtems.h>
-#include <bsp.h>
-
-void idtsim__exit();
-
-void bsp_cleanup( void )
-{
- idtsim__exit();
-}
diff --git a/c/src/lib/libbsp/mips/p4000/startup/bspstart.c b/c/src/lib/libbsp/mips/p4000/startup/bspstart.c
deleted file mode 100644
index 5003e3504b..0000000000
--- a/c/src/lib/libbsp/mips/p4000/startup/bspstart.c
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * This routine starts the application. It includes application,
- * board, and monitor specific initialization and configuration.
- * The generic CPU dependent initialization has been performed
- * before this routine is invoked.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-/*
- * Rather than deleting this, it is commented out to (hopefully) help
- * the submitter send updates.
- *
- * static char _sccsid[] = "@(#)bspstart.c 06/11/96 1.2\n";
- */
-
-
-#include <bsp.h>
-#include <rtems/libio.h>
-
-#include <libcsupport.h>
-
-#include <string.h>
-
-/*
- * The original table from the application and our copy of it with
- * some changes.
- */
-
-extern rtems_configuration_table Configuration;
-
-rtems_configuration_table BSP_Configuration;
-
-rtems_cpu_table Cpu_table;
-
-char *rtems_progname;
-
-/*
- * Use the shared implementations of the following routines
- */
-
-void bsp_postdriver_hook(void);
-void bsp_libc_init( void *, unsigned32, int );
-
-/*
- * Function: bsp_pretasking_hook
- * Created: 95/03/10
- *
- * Description:
- * BSP pretasking hook. Called just before drivers are initialized.
- * Used to setup libc and install any BSP extensions.
- *
- * NOTES:
- * Must not use libc (to do io) from here, since drivers are
- * not yet initialized.
- *
- */
-
-#define LIBC_HEAP_SIZE (64 * 1024)
-
-void bsp_pretasking_hook(void)
-{
- extern int end;
- rtems_unsigned32 heap_start;
-
- heap_start = (rtems_unsigned32) &end;
- if (heap_start & (CPU_ALIGNMENT-1))
- heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
-
- bsp_libc_init((void *) heap_start, LIBC_HEAP_SIZE, 0);
-
-#ifdef RTEMS_DEBUG
- rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
-#endif
-}
-
-extern int end; /* defined by linker */
-
-/*
- * bsp_start
- *
- * This routine does the bulk of the system initialization.
- */
-
-void bsp_start( void )
-{
- /*
- * Allocate the memory for the RTEMS Work Space. This can come from
- * a variety of places: hard coded address, malloc'ed from outside
- * RTEMS world (e.g. simulator or primitive memory manager), or (as
- * typically done by stock BSPs) by subtracting the required amount
- * of work space from the last physical address on the CPU board.
- */
-
- /*
- * Need to "allocate" the memory for the RTEMS Workspace and
- * tell the RTEMS configuration where it is. This memory is
- * not malloc'ed. It is just "pulled from the air".
- */
-
- BSP_Configuration.work_space_start =
- (void *)((unsigned64)((&end) + LIBC_HEAP_SIZE + 0x2000) & ~0x7);
-
- /*
- * initialize the CPU table for this BSP
- */
-
- Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */
- Cpu_table.postdriver_hook = bsp_postdriver_hook;
- Cpu_table.interrupt_stack_size = 4096;
- Cpu_table.clicks_per_microsecond = CPU_CLOCK_RATE_MHZ;
-}
diff --git a/c/src/lib/libbsp/mips/p4000/startup/ghlinkcmds b/c/src/lib/libbsp/mips/p4000/startup/ghlinkcmds
deleted file mode 100644
index 34cdbab802..0000000000
--- a/c/src/lib/libbsp/mips/p4000/startup/ghlinkcmds
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# $Id$
-#
-
--map
--sec
-{
- .text 0x80010000 :
- .data align(16) :
- .rodata :
- .fini :
-# .sdata :
- .symtab :
- .strtab :
- .debug :
-# .sbss :
- .bss align(8) :
- .init 0xbfc00000 :
-}
diff --git a/c/src/lib/libbsp/mips/p4000/startup/idtmem.S b/c/src/lib/libbsp/mips/p4000/startup/idtmem.S
deleted file mode 100644
index e562c3b820..0000000000
--- a/c/src/lib/libbsp/mips/p4000/startup/idtmem.S
+++ /dev/null
@@ -1,938 +0,0 @@
-/*
-
-Based upon IDT provided code with the following release:
-
-This source code has been made available to you by IDT on an AS-IS
-basis. Anyone receiving this source is licensed under IDT copyrights
-to use it in any way he or she deems fit, including copying it,
-modifying it, compiling it, and redistributing it either with or
-without modifications. No license under IDT patents or patent
-applications is to be implied by the copyright license.
-
-Any user of this software should understand that IDT cannot provide
-technical support for this software and will not be responsible for
-any consequences resulting from the use of this software.
-
-Any person who transfers this source code or any derivative work must
-include the IDT copyright notice, this paragraph, and the preceeding
-two paragraphs in the transferred software.
-
-COPYRIGHT IDT CORPORATION 1996
-LICENSED MATERIAL - PROGRAM PROPERTY OF IDT
-
- $Id$
-
-*/
-
-/************************************************************************
-**
-** idtmem.s - memory and cache functions
-**
-** Copyright 1991 Integrated Device Technology, Inc.
-** All Rights Reserved
-**
-**************************************************************************/
-
-/*
- * 950313: Ketan fixed bugs in mfc0/mtc0 hazards, and removed hack
- * to set mem_size.
- */
-
-#include <iregdef.h>
-#include <idtcpu.h>
-#include <idtmon.h>
-
- .data
-mem_size:
- .word 0
-dcache_size:
- .word 0
-icache_size:
-#if defined(CPU_R3000)
- .word MINCACHE
-#endif
-#if defined(CPU_R4000)
- .word 0
-#endif
-
-#if defined(CPU_R4000)
- .data
-scache_size:
- .word 0
-icache_linesize:
- .word 0
-dcache_linesize:
- .word 0
-scache_linesize:
- .word 0
-#endif
-
-
- .text
-
-#if defined (CPU_R3000)
-#define CONFIGFRM ((2*4)+4)
-
-/*************************************************************************
-**
-** Config_Dcache() -- determine size of Data cache
-**
-**************************************************************************/
-
-FRAME(config_Dcache,sp, CONFIGFRM, ra)
- .set noreorder
- subu sp,CONFIGFRM
- sw ra,CONFIGFRM-4(sp) /* save return address */
- sw s0,4*4(sp) /* save s0 in first regsave slot */
- mfc0 s0,C0_SR /* save SR */
- nop
- mtc0 zero,C0_SR /* disable interrupts */
- .set reorder
- jal _size_cache /* returns Data cache size in v0 */
- sw v0, dcache_size /* save it */
- and s0, ~SR_PE /* do not clear PE */
- .set noreorder
- mtc0 s0,C0_SR /* restore SR */
- nop
- .set reorder
- lw s0, 4*4(sp) /* restore s0 */
- lw ra,CONFIGFRM-4(sp) /* restore ra */
- addu sp,CONFIGFRM /* pop stack */
- j ra
-ENDFRAME(config_Dcache)
-
-
-/*************************************************************************
-**
-** Config_Icache() -- determine size of Instruction cache
-** MUST be run in uncached mode/handled in idt_csu.s
-**
-**************************************************************************/
-
-FRAME(config_Icache,sp, CONFIGFRM, ra)
- .set noreorder
- subu sp,CONFIGFRM
- sw ra,CONFIGFRM-4(sp) /* save return address */
- sw s0,4*4(sp) /* save s0 in first regsave slot */
- mfc0 s0,C0_SR /* save SR */
- nop
- mtc0 zero, C0_SR /* disable interrupts */
- li v0,SR_SWC /* swap caches/disable ints */
- mtc0 v0,C0_SR
- nop
- .set reorder
- jal _size_cache /* returns instruction cache size */
- .set noreorder
- mtc0 zero,C0_SR /* swap back caches */
- nop
- and s0,~SR_PE /* do not inadvertantly clear PE */
- mtc0 s0,C0_SR /* restore SR */
- nop
- .set reorder
- sw v0, icache_size /* save it AFTER caches back */
- lw s0,4*4(sp) /* restore s0 */
- lw ra,CONFIGFRM-4(sp) /* restore ra */
- addu sp,CONFIGFRM /* pop stack */
- j ra
-ENDFRAME(config_Icache)
-
-/************************************************************************
-**
-** _size_cache()
-** returns cache size in v0
-**
-************************************************************************/
-
-FRAME(_size_cache,sp,0,ra)
- .set noreorder
- mfc0 t0,C0_SR /* save current sr */
- nop
- and t0,~SR_PE /* do not inadvertently clear PE */
- or v0,t0,SR_ISC /* isolate cache */
- mtc0 v0,C0_SR
- /*
- * First check if there is a cache there at all
- */
- move v0,zero
- li v1,0xa5a5a5a5 /* distinctive pattern */
- sw v1,K0BASE /* try to write into cache */
- lw t1,K0BASE /* try to read from cache */
- nop
- mfc0 t2,C0_SR
- nop
- .set reorder
- and t2,SR_CM
- bne t2,zero,3f /* cache miss, must be no cache */
- bne v1,t1,3f /* data not equal -> no cache */
- /*
- * Clear cache size boundries to known state.
- */
- li v0,MINCACHE
-1:
- sw zero,K0BASE(v0)
- sll v0,1
- ble v0,MAXCACHE,1b
-
- li v0,-1
- sw v0,K0BASE(zero) /* store marker in cache */
- li v0,MINCACHE /* MIN cache size */
-
-2: lw v1,K0BASE(v0) /* Look for marker */
- bne v1,zero,3f /* found marker */
- sll v0,1 /* cache size * 2 */
- ble v0,MAXCACHE,2b /* keep looking */
- move v0,zero /* must be no cache */
- .set noreorder
-3: mtc0 t0,C0_SR /* restore sr */
- j ra
- nop
-ENDFRAME(_size_cache)
- .set reorder
-
-
-#define FLUSHFRM (2*4)
-
-/***************************************************************************
-**
-** flush_Dcache() - flush entire Data cache
-**
-****************************************************************************/
-FRAME(flush_Dcache,sp,FLUSHFRM,ra)
- lw t2, dcache_size
- .set noreorder
- mfc0 t3,C0_SR /* save SR */
- nop
- and t3,~SR_PE /* dont inadvertently clear PE */
- beq t2,zero,_Dflush_done /* no D cache, get out! */
- nop
- li v0, SR_ISC /* isolate cache */
- mtc0 v0, C0_SR
- nop
- .set reorder
- li t0,K0BASE /* set loop registers */
- or t1,t0,t2
-
-2: sb zero,0(t0)
- sb zero,4(t0)
- sb zero,8(t0)
- sb zero,12(t0)
- sb zero,16(t0)
- sb zero,20(t0)
- sb zero,24(t0)
- addu t0,32
- sb zero,-4(t0)
- bne t0,t1,2b
-
- .set noreorder
-_Dflush_done:
- mtc0 t3,C0_SR /* restore Status Register */
- .set reorder
- j ra
-ENDFRAME(flush_Dcache)
-
-
-/***************************************************************************
-**
-** flush_Icache() - flush entire Instruction cache
-**
-** NOTE: Icache can only be flushed/cleared when uncached
-** Code forces into uncached memory regardless of calling mode
-**
-****************************************************************************/
-FRAME(flush_Icache,sp,FLUSHFRM,ra)
- lw t1,icache_size
- .set noreorder
- mfc0 t3,C0_SR /* save SR */
- nop
- la v0,1f
- li v1,K1BASE
- or v0,v1
- j v0 /* force into non-cached space */
- nop
-1:
- and t3,~SR_PE /* dont inadvertently clear PE */
- beq t1,zero,_Iflush_done /* no i-cache get out */
- nop
- li v0,SR_ISC|SR_SWC /* disable intr, isolate and swap */
- mtc0 v0,C0_SR
- li t0,K0BASE
- .set reorder
- or t1,t0,t1
-
-1: sb zero,0(t0)
- sb zero,4(t0)
- sb zero,8(t0)
- sb zero,12(t0)
- sb zero,16(t0)
- sb zero,20(t0)
- sb zero,24(t0)
- addu t0,32
- sb zero,-4(t0)
- bne t0,t1,1b
- .set noreorder
-_Iflush_done:
- mtc0 t3,C0_SR /* un-isolate, enable interrupts */
- .set reorder
- j ra
-ENDFRAME(flush_Icache)
-
-/**************************************************************************
-**
-** clear_Dcache(base_addr, byte_count) - flush portion of Data cache
-**
-** a0 = base address of portion to be cleared
-** a1 = byte count of length
-**
-***************************************************************************/
-FRAME(clear_Dcache,sp,0,ra)
-
- lw t2, dcache_size /* Data cache size */
- .set noreorder
- mfc0 t3,C0_SR /* save SR */
- nop
- and t3,~SR_PE /* dont inadvertently clear PE */
- nop
- nop
- .set reorder
- /*
- * flush data cache
- */
-
- .set noreorder
- nop
- li v0,SR_ISC /* isolate data cache */
- mtc0 v0,C0_SR
- .set reorder
- bltu t2,a1,1f /* cache is smaller than region */
- move t2,a1
-1: addu t2,a0 /* ending address + 1 */
- move t0,a0
-
-1: sb zero,0(t0)
- sb zero,4(t0)
- sb zero,8(t0)
- sb zero,12(t0)
- sb zero,16(t0)
- sb zero,20(t0)
- sb zero,24(t0)
- addu t0,32
- sb zero,-4(t0)
- bltu t0,t2,1b
-
- .set noreorder
- mtc0 t3,C0_SR /* un-isolate, enable interrupts */
- nop
- .set reorder
- j ra
-ENDFRAME(clear_Dcache)
-
-
-/**************************************************************************
-**
-** clear_Icache(base_addr, byte_count) - flush portion of Instruction cache
-**
-** a0 = base address of portion to be cleared
-** a1 = byte count of length
-**
-** NOTE: Icache can only be flushed/cleared when uncached
-** Code forces into uncached memory regardless of calling mode
-**
-***************************************************************************/
-FRAME(clear_Icache,sp,0,ra)
-
- lw t1, icache_size /* Instruction cache size */
- /*
- * flush text cache
- */
- .set noreorder
- mfc0 t3,C0_SR /* save SR */
- nop
- la v0,1f
- li v1,K1BASE
- or v0,v1
- j v0 /* force into non-cached space */
- nop
-1:
- and t3,~SR_PE /* dont inadvertently clear PE */
- nop
- nop
- li v0,SR_ISC|SR_SWC /* disable intr, isolate and swap */
- mtc0 v0,C0_SR
- .set reorder
- bltu t1,a1,1f /* cache is smaller than region */
- move t1,a1
-1: addu t1,a0 /* ending address + 1 */
- move t0,a0
-
- sb zero,0(t0)
- sb zero,4(t0)
- sb zero,8(t0)
- sb zero,12(t0)
- sb zero,16(t0)
- sb zero,20(t0)
- sb zero,24(t0)
- addu t0,32
- sb zero,-4(t0)
- bltu t0,t1,1b
- .set noreorder
- mtc0 t3,C0_SR /* un-isolate, enable interrupts */
- nop
- nop
- nop /* allow time for caches to swap */
- .set reorder
- j ra
-ENDFRAME(clear_Icache)
-
-
-/**************************************************************************
-**
-** get_mem_conf - get memory configuration
-**
-***************************************************************************/
-
-
-FRAME(get_mem_conf,sp,0,ra)
-
- lw t6, mem_size
- sw t6, 0(a0)
- lw t7, icache_size
- sw t7, 4(a0)
- lw t8, dcache_size
- sw t8, 8(a0)
- j ra
-
-ENDFRAME(get_mem_conf)
-#endif /* defined CPU_R3000 */
-
-#if defined(CPU_R4000)
-#define LEAF(label) FRAME(label,sp,0,ra)
-#define XLEAF(label) \
- .globl label ; \
-label:
-#define END(label) ENDFRAME(label)
-
-/*
- * cacheop macro to automate cache operations
- * first some helpers...
- */
-#define _mincache(size, maxsize) \
- bltu size,maxsize,8f ; \
- move size,maxsize ; \
-8:
-
-#define _align(tmp, minaddr, maxaddr, linesize) \
- subu tmp,linesize,1 ; \
- not tmp ; \
- and minaddr,tmp ; \
- addu maxaddr,-1 ; \
- and maxaddr,tmp
-
-/* This is a bit of a hack really because it relies on minaddr=a0 */
-#define _doop1(op1) \
- cache op1,0(a0)
-
-#define _doop2(op1, op2) \
- cache op1,0(a0) ; \
- cache op2,0(a0)
-
-/* specials for cache initialisation */
-#define _doop1lw1(op1) \
- cache op1,0(a0) ; \
- lw zero,0(a0) ; \
- cache op1,0(a0)
-
-#define _doop121(op1,op2) \
- cache op1,0(a0) ; \
- nop; \
- cache op2,0(a0) ; \
- nop; \
- cache op1,0(a0)
-
-#define _oploopn(minaddr, maxaddr, linesize, tag, ops) \
- .set noreorder ; \
-7: _doop##tag##ops ; \
- bne minaddr,maxaddr,7b ; \
- addu minaddr,linesize ; \
- .set reorder
-
-/* finally the cache operation macros */
-#define icacheopn(kva, n, cache_size, cache_linesize, tag, ops) \
- _mincache(n, cache_size); \
- blez n,9f ; \
- addu n,kva ; \
- _align(t1, kva, n, cache_linesize) ; \
- _oploopn(kva, n, cache_linesize, tag, ops) ; \
-9:
-
-#define vcacheopn(kva, n, cache_size, cache_linesize, tag, ops) \
- blez n,9f ; \
- addu n,kva ; \
- _align(t1, kva, n, cache_linesize) ; \
- _oploopn(kva, n, cache_linesize, tag, ops) ; \
-9:
-
-#define icacheop(kva, n, cache_size, cache_linesize, op) \
- icacheopn(kva, n, cache_size, cache_linesize, 1, (op))
-
-#define vcacheop(kva, n, cache_size, cache_linesize, op) \
- vcacheopn(kva, n, cache_size, cache_linesize, 1, (op))
-
- .text
-
-/*
- * static void _size_cache() R4000
- *
- * Internal routine to determine cache sizes by looking at R4000 config
- * register. Sizes are returned in registers, as follows:
- * t2 icache size
- * t3 dcache size
- * t6 scache size
- * t4 icache line size
- * t5 dcache line size
- * t7 scache line size
- */
-LEAF(_size_cache)
- mfc0 t0,C0_CONFIG
-
- and t1,t0,CFG_ICMASK
- srl t1,CFG_ICSHIFT
- li t2,0x1000
- sll t2,t1
-
- and t1,t0,CFG_DCMASK
- srl t1,CFG_DCSHIFT
- li t3,0x1000
- sll t3,t1
-
- li t4,32
- and t1,t0,CFG_IB
- bnez t1,1f
- li t4,16
-1:
-
- li t5,32
- and t1,t0,CFG_DB
- bnez t1,1f
- li t5,16
-1:
-
- move t6,zero # default to no scache
- move t7,zero #
-
- and t1,t0,CFG_C_UNCACHED # test config register
- bnez t1,1f # no scache if uncached/non-coherent
-
- li t6,0x100000 # assume 1Mb scache <<-NOTE
- and t1,t0,CFG_SBMASK
- srl t1,CFG_SBSHIFT
- li t7,16
- sll t7,t1
-1: j ra
-END(_size_cache)
-
-
-/*
- * void config_cache() R4000
- *
- * Work out size of I, D & S caches, assuming they are already initialised.
- */
-LEAF(config_cache)
- lw t0,icache_size
- bgtz t0,8f # already known?
- move v0,ra
- bal _size_cache
- move ra,v0
-
- sw t2,icache_size
- sw t3,dcache_size
- sw t6,scache_size
- sw t4,icache_linesize
- sw t5,dcache_linesize
- sw t7,scache_linesize
-8: j ra
-END(config_cache)
-
-
-/*
- * void _init_cache() R4000
- */
-LEAF(_init_cache)
- /*
- * First work out the sizes
- */
- move v0,ra
- bal _size_cache
- move ra,v0
-
- /*
- * The caches may be in an indeterminate state,
- * so we force good parity into them by doing an
- * invalidate, load/fill, invalidate for each line.
- */
-
- /* disable all i/u and cache exceptions */
- mfc0 v0,C0_SR
- and v1,v0,~SR_IE
- or v1,SR_DE
- mtc0 v1,C0_SR
-
- mtc0 zero,C0_TAGLO
- mtc0 zero,C0_TAGHI
-
- /* assume bottom of RAM will generate good parity for the cache */
- li a0,PHYS_TO_K0(0)
- move a2,t2 # icache_size
- move a3,t4 # icache_linesize
- move a1,a2
- icacheopn(a0,a1,a2,a3,121,(Index_Store_Tag_I,Fill_I))
-
- li a0,PHYS_TO_K0(0)
- move a2,t3 # dcache_size
- move a3,t5 # dcache_linesize
- move a1,a2
- icacheopn(a0,a1,a2,a3,1lw1,(Index_Store_Tag_D))
-
- /* assume unified I & D in scache <<-NOTE */
- blez t6,1f
- li a0,PHYS_TO_K0(0)
- move a2,t6
- move a3,t7
- move a1,a2
- icacheopn(a0,a1,a2,a3,1lw1,(Index_Store_Tag_SD))
-
-1: mtc0 v0,C0_SR
- j ra
-END(_init_cache)
-
-
-/*
- * void flush_cache (void) R4000
- *
- * Flush and invalidate all caches
- */
-LEAF(flush_cache)
- /* secondary cacheops do all the work if present */
- lw a2,scache_size
- blez a2,1f
- lw a3,scache_linesize
- li a0,PHYS_TO_K0(0)
- move a1,a2
- icacheop(a0,a1,a2,a3,Index_Writeback_Inv_SD)
- b 2f
-
-1:
- lw a2,icache_size
- blez a2,2f
- lw a3,icache_linesize
- li a0,PHYS_TO_K0(0)
- move a1,a2
- icacheop(a0,a1,a2,a3,Index_Invalidate_I)
-
- lw a2,dcache_size
- lw a3,dcache_linesize
- li a0,PHYS_TO_K0(0)
- move a1,a2
- icacheop(a0,a1,a2,a3,Index_Writeback_Inv_D)
-
-2: j ra
-END(flush_cache)
-
-/*
- * void flush_cache_nowrite (void) R4000
- *
- * Invalidate all caches
- */
-LEAF(flush_cache_nowrite)
- mfc0 v0,C0_SR
- and v1,v0,~SR_IE
- mtc0 v1,C0_SR
-
- mtc0 zero,C0_TAGLO
- mtc0 zero,C0_TAGHI
-
- lw a2,icache_size
- blez a2,2f
- lw a3,icache_linesize
- li a0,PHYS_TO_K0(0)
- move a1,a2
- icacheop(a0,a1,a2,a3,Index_Invalidate_I)
-
- lw a2,dcache_size
- lw a3,dcache_linesize
- li a0,PHYS_TO_K0(0)
- move a1,a2
- icacheop(a0,a1,a2,a3,Index_Store_Tag_D)
-
- lw a2,scache_size
- blez a2,2f
- lw a3,scache_linesize
- li a0,PHYS_TO_K0(0)
- move a1,a2
- icacheop(a0,a1,a2,a3,Index_Store_Tag_SD)
-
-2: mtc0 v0,C0_SR
- j ra
-END(flush_cache_nowrite)
-
-/*
- * void clean_cache (unsigned kva, size_t n) R4000
- *
- * Writeback and invalidate address range in all caches
- */
-LEAF(clean_cache)
-XLEAF(clear_cache)
-
- /* secondary cacheops do all the work (if fitted) */
- lw a2,scache_size
- blez a2,1f
- lw a3,scache_linesize
- vcacheop(a0,a1,a2,a3,Hit_Writeback_Inv_SD)
- b 2f
-
-1: lw a2,icache_size
- blez a2,2f
- lw a3,icache_linesize
- /* save kva & n for subsequent loop */
- move t8,a0
- move t9,a1
- vcacheop(a0,a1,a2,a3,Hit_Invalidate_I)
-
- lw a2,dcache_size
- lw a3,dcache_linesize
- /* restore kva & n */
- move a0,t8
- move a1,t9
- vcacheop(a0,a1,a2,a3,Hit_Writeback_Inv_D)
-
-2: j ra
-END(clean_cache)
-
-/*
- * void clean_dcache (unsigned kva, size_t n) R4000
- *
- * Writeback and invalidate address range in primary data cache
- */
-LEAF(clean_dcache)
- lw a2,dcache_size
- blez a2,2f
- lw a3,dcache_linesize
-
- vcacheop(a0,a1,a2,a3,Hit_Writeback_Inv_D)
-
-2: j ra
-END(clean_dcache)
-
-/*
- * void clean_dcache_indexed (unsigned kva, size_t n) R4000
- *
- * Writeback and invalidate indexed range in primary data cache
- */
-LEAF(clean_dcache_indexed)
- lw a2,dcache_size
- blez a2,2f
- lw a3,dcache_linesize
-
-#ifdef CPU_ORION
- srl a2,1 # do one set (half cache) at a time
- move t8,a0 # save kva & n
- move t9,a1
- icacheop(a0,a1,a2,a3,Index_Writeback_Inv_D)
-
- addu a0,t8,a2 # do next set
- move a1,t9 # restore n
-#endif
- icacheop(a0,a1,a2,a3,Index_Writeback_Inv_D)
-
-2: j ra
-END(clean_dcache_indexed)
-
-/*
- * void clean_dcache_nowrite (unsigned kva, size_t n) R4000
- *
- * Invalidate an address range in primary data cache
- */
-LEAF(clean_dcache_nowrite)
- lw a2,dcache_size
- blez a2,2f
- lw a3,dcache_linesize
-
- vcacheop(a0,a1,a2,a3,Hit_Invalidate_D)
-
-2: j ra
-END(clean_dcache_nowrite)
-
-/*
- * void clean_dcache_nowrite_indexed (unsigned kva, size_t n) R4000
- *
- * Invalidate indexed range in primary data cache
- */
-LEAF(clean_dcache_nowrite_indexed)
- mfc0 v0,C0_SR
- and v1,v0,~SR_IE
- mtc0 v1,C0_SR
-
- mtc0 zero,C0_TAGLO
- mtc0 zero,C0_TAGHI
-
- lw a2,dcache_size
- blez a2,2f
- lw a3,dcache_linesize
-
-#ifdef CPU_ORION
- srl a2,1 # do one set (half cache) at a time
- move t8,a0 # save kva & n
- move t9,a1
- icacheop(a0,a1,a2,a3,Index_Store_Tag_D)
-
- addu a0,t8,a2 # do next set
- move a1,t9 # restore n
-#endif
- icacheop(a0,a1,a2,a3,Index_Store_Tag_D)
-
-2: mtc0 v0,C0_SR
- j ra
-END(clean_dcache_nowrite_indexed)
-
-/*
- * void clean_icache (unsigned kva, size_t n) R4000
- *
- * Invalidate address range in primary instruction cache
- */
-LEAF(clean_icache)
- lw a2,icache_size
- blez a2,2f
- lw a3,icache_linesize
-
- vcacheop(a0,a1,a2,a3,Hit_Invalidate_I)
-
-2: j ra
-END(clean_icache)
-
-/*
- * void clean_icache_indexed (unsigned kva, size_t n) R4000
- *
- * Invalidate indexed range in primary instruction cache
- */
-LEAF(clean_icache_indexed)
- lw a2,icache_size
- blez a2,2f
- lw a3,icache_linesize
-
-#ifdef CPU_ORION
- srl a2,1 # do one set (half cache) at a time
- move t8,a0 # save kva & n
- move t9,a1
- icacheop(a0,a1,a2,a3,Index_Invalidate_I)
-
- addu a0,t8,a2 # do next set
- move a1,t9 # restore n
-#endif
- icacheop(a0,a1,a2,a3,Index_Invalidate_I)
-
-2: j ra
-END(clean_icache_indexed)
-
-
-
-/*
- * void clean_scache (unsigned kva, size_t n) R4000
- *
- * Writeback and invalidate address range in secondary cache
- */
-LEAF(clean_scache)
- lw a2,scache_size
- blez a2,2f
- lw a3,scache_linesize
- vcacheop(a0,a1,a2,a3,Hit_Writeback_Inv_SD)
-
-2: j ra
-END(clean_scache)
-
-/*
- * void clean_scache_indexed (unsigned kva, size_t n) R4000
- *
- * Writeback and invalidate indexed range in secondary cache
- */
-LEAF(clean_scache_indexed)
- lw a2,scache_size
- blez a2,2f
- lw a3,scache_linesize
-
- icacheop(a0,a1,a2,a3,Index_Writeback_Inv_SD)
-
-2: j ra
-END(clean_scache_indexed)
-
-/*
- * void clean_scache_nowrite (unsigned kva, size_t n) R4000
- *
- * Invalidate an address range in secondary cache
- */
-LEAF(clean_scache_nowrite)
- lw a2,scache_size
- blez a2,2f
- lw a3,scache_linesize
-
- vcacheop(a0,a1,a2,a3,Hit_Invalidate_SD)
-
-2: j ra
-END(clean_scache_nowrite)
-
-/*
- * void clean_scache_nowrite_indexed (unsigned kva, size_t n) R4000
- *
- * Invalidate indexed range in secondary cache
- */
-LEAF(clean_scache_nowrite_indexed)
- mfc0 v0,C0_SR
- and v1,v0,~SR_IE
- mtc0 v1,C0_SR
-
- mtc0 zero,C0_TAGLO
- mtc0 zero,C0_TAGHI
-
- lw a2,scache_size
- blez a2,2f
- lw a3,scache_linesize
-
- icacheop(a0,a1,a2,a3,Index_Store_Tag_SD)
-
-2: mtc0 v0,C0_SR
- j ra
-END(clean_scache_nowrite_indexed)
-
-/**************************************************************************
-**
-** get_mem_conf - get memory configuration R4000
-**
-***************************************************************************/
-
-
-FRAME(get_mem_conf,sp,0,ra)
-
- lw t6, mem_size
- sw t6, 0(a0)
- lw t7, icache_size
- sw t7, 4(a0)
- lw t8, dcache_size
- sw t8, 8(a0)
- lw t7, scache_size
- sw t7, 12(a0)
- j ra
-
-ENDFRAME(get_mem_conf)
-
-#endif /* defined(CPU_R4000) */
-
-/*
- * void set_mem_size (mem_size)
- *
- * config_memory()'s memory size gets written into mem_size here.
- * Now we don't need to call config_cache() with memory size - New to IDTC6.0
- */
-FRAME(set_memory_size,sp,0,ra)
- sw a0, mem_size
- j ra
-ENDFRAME(set_memory_size)
-
-
diff --git a/c/src/lib/libbsp/mips/p4000/startup/idttlb.S b/c/src/lib/libbsp/mips/p4000/startup/idttlb.S
deleted file mode 100644
index 6a6a5b79d4..0000000000
--- a/c/src/lib/libbsp/mips/p4000/startup/idttlb.S
+++ /dev/null
@@ -1,390 +0,0 @@
-/*
-
-Based upon IDT provided code with the following release:
-
-This source code has been made available to you by IDT on an AS-IS
-basis. Anyone receiving this source is licensed under IDT copyrights
-to use it in any way he or she deems fit, including copying it,
-modifying it, compiling it, and redistributing it either with or
-without modifications. No license under IDT patents or patent
-applications is to be implied by the copyright license.
-
-Any user of this software should understand that IDT cannot provide
-technical support for this software and will not be responsible for
-any consequences resulting from the use of this software.
-
-Any person who transfers this source code or any derivative work must
-include the IDT copyright notice, this paragraph, and the preceeding
-two paragraphs in the transferred software.
-
-COPYRIGHT IDT CORPORATION 1996
-LICENSED MATERIAL - PROGRAM PROPERTY OF IDT
-
- $Id$
-*/
-
-
-/*
-** idttlb.s - fetch the registers associated with and the contents
-** of the tlb.
-**
-*/
-/* 950308: Ketan patched a few tlb functions that would not have worked.*/
-#include <iregdef.h>
-#include <idtcpu.h>
-#include <idtmon.h>
-
-
- .text
-
-#if defined(CPU_R3000)
-/*
-** ret_tlblo -- returns the 'entrylo' contents for the TLB
-** 'c' callable - as ret_tlblo(index) - where index is the
-** tlb entry to return the lo value for - if called from assembly
-** language then index should be in register a0.
-*/
-FRAME(ret_tlblo,sp,0,ra)
- .set noreorder
- mfc0 t0,C0_SR # save sr
- nop
- and t0,~SR_PE # dont inadvertantly clear PE
- mtc0 zero,C0_SR # clear interrupts
- mfc0 t1,C0_TLBHI # save pid
- sll a0,TLBINX_INXSHIFT # position index
- mtc0 a0,C0_INX # write to index register
- nop
- tlbr # put tlb entry in entrylo and hi
- nop
- mfc0 v0,C0_TLBLO # get the requested entry lo
- mtc0 t1,C0_TLBHI # restore pid
- mtc0 t0,C0_SR # restore status register
- j ra
- nop
- .set reorder
-ENDFRAME(ret_tlblo)
-#endif
-#if defined(CPU_R4000)
-/*
-** ret_tlblo[01] -- returns the 'entrylo' contents for the TLB
-** 'c' callable - as ret_tlblo(index) - where index is the
-** tlb entry to return the lo value for - if called from assembly
-** language then index should be in register a0.
-*/
-FRAME(ret_tlblo0,sp,0,ra)
- mfc0 t0,C0_SR # save sr
- mtc0 zero,C0_SR # clear interrupts
- mfc0 t1,C0_TLBHI # save pid
- mtc0 a0,C0_INX # write to index register
- .set noreorder
- nop; nop; nop; nop; nop; nop; nop; nop
- .set reorder
- tlbr # put tlb entry in entrylo and hi
- .set noreorder
- nop; nop; nop; nop; nop; nop; nop; nop
- .set reorder
- mfc0 v0,C0_TLBLO0 # get the requested entry lo
- mtc0 t1,C0_TLBHI # restore pid
- mtc0 t0,C0_SR # restore status register
- j ra
-ENDFRAME(ret_tlblo0)
-
-FRAME(ret_tlblo1,sp,0,ra)
- mfc0 t0,C0_SR # save sr
- mtc0 zero,C0_SR # clear interrupts
- mfc0 t1,C0_TLBHI # save pid
- mtc0 a0,C0_INX # write to index register
- .set noreorder
- nop; nop; nop; nop; nop; nop; nop; nop
- .set reorder
- tlbr # put tlb entry in entrylo and hi
- .set noreorder
- nop; nop; nop; nop; nop; nop; nop; nop
- .set reorder
- mfc0 v0,C0_TLBLO1 # get the requested entry lo
- mtc0 t1,C0_TLBHI # restore pid
- mtc0 t0,C0_SR # restore status register
- j ra
-ENDFRAME(ret_tlblo1)
-
-/*
-** ret_pagemask(index) -- return pagemask contents of tlb entry "index"
-*/
-FRAME(ret_pagemask,sp,0,ra)
- mfc0 t0,C0_SR # save sr
- mtc0 zero,C0_SR # disable interrupts
- mfc0 t1,C0_TLBHI # save current pid
- mtc0 a0,C0_INX # drop it in C0 register
- .set noreorder
- nop; nop; nop; nop; nop; nop; nop; nop
- .set reorder
- tlbr # read entry to entry hi/lo
- .set noreorder
- nop; nop; nop; nop; nop; nop; nop; nop
- .set reorder
- mfc0 v0,C0_PAGEMASK # to return value
- mtc0 t1,C0_TLBHI # restore current pid
- mtc0 t0,C0_SR # restore sr
- j ra
-ENDFRAME(ret_pagemask)
-
-/*
-** ret_tlbwired(void) -- return wired register
-*/
-FRAME(ret_tlbwired,sp,0,ra)
- mfc0 v0,C0_WIRED
- j ra
-ENDFRAME(ret_tlbwired)
-#endif
-
-/*
-** ret_tlbhi -- return the tlb entry high content for tlb entry
-** index
-*/
-FRAME(ret_tlbhi,sp,0,ra)
-#if defined(CPU_R3000)
- .set noreorder
- mfc0 t0,C0_SR # save sr
- nop
- and t0,~SR_PE
- mtc0 zero,C0_SR # disable interrupts
- mfc0 t1,C0_TLBHI # save current pid
- sll a0,TLBINX_INXSHIFT # position index
- mtc0 a0,C0_INX # drop it in C0 register
- nop
- tlbr # read entry to entry hi/lo
- nop
- mfc0 v0,C0_TLBHI # to return value
- mtc0 t1,C0_TLBHI # restore current pid
- mtc0 t0,C0_SR # restore sr
- j ra
- nop
- .set reorder
-#endif
-#if defined(CPU_R4000)
- mfc0 t0,C0_SR # save sr
- mtc0 zero,C0_SR # disable interrupts
- mfc0 t1,C0_TLBHI # save current pid
- mtc0 a0,C0_INX # drop it in C0 register
- .set noreorder
- nop; nop; nop; nop; nop; nop; nop; nop
- .set reorder
- tlbr # read entry to entry hi/lo0/lo1/mask
- .set noreorder
- nop; nop; nop; nop; nop; nop; nop; nop
- .set reorder
- mfc0 v0,C0_TLBHI # to return value
- mtc0 t1,C0_TLBHI # restore current pid
- mtc0 t0,C0_SR # restore sr
- j ra
-#endif
-ENDFRAME(ret_tlbhi)
-
-/*
-** ret_tlbpid() -- return tlb pid contained in the current entry hi
-*/
-FRAME(ret_tlbpid,sp,0,ra)
-#if defined(CPU_R3000)
- .set noreorder
- mfc0 v0,C0_TLBHI # fetch tlb high
- nop
- and v0,TLBHI_PIDMASK # isolate and position
- srl v0,TLBHI_PIDSHIFT
- j ra
- nop
- .set reorder
-#endif
-#if defined(CPU_R4000)
- mfc0 v0,C0_TLBHI # to return value
- nop
- and v0,TLBHI_PIDMASK
- j ra
-#endif
-ENDFRAME(ret_tlbpid)
-
-/*
-** tlbprobe(address, pid) -- probe the tlb to see if address is currently
-** mapped
-** a0 = vpn - virtual page numbers are 0=0 1=0x1000, 2=0x2000...
-** virtual page numbers for the r3000 are in
-** entry hi bits 31-12
-** a1 = pid - this is a process id ranging from 0 to 63
-** this process id is shifted left 6 bits and or'ed into
-** the entry hi register
-** returns an index value (0-63) if successful -1 -f not
-*/
-FRAME(tlbprobe,sp,0,ra)
-#if defined(CPU_R3000)
- .set noreorder
- mfc0 t0,C0_SR /* fetch status reg */
- and a0,TLBHI_VPNMASK /* isolate just the vpn */
- and t0,~SR_PE /* don't inadvertantly clear pe */
- mtc0 zero,C0_SR
- mfc0 t1,C0_TLBHI
- sll a1,TLBHI_PIDSHIFT /* possition the pid */
- and a1,TLBHI_PIDMASK
- or a0,a1 /* build entry hi value */
- mtc0 a0,C0_TLBHI
- nop
- tlbp /* do the probe */
- nop
- mfc0 v1,C0_INX
- li v0,-1
- bltz v1,1f
- nop
- sra v0,v1,TLBINX_INXSHIFT /* get index positioned for return */
-1:
- mtc0 t1,C0_TLBHI /* restore tlb hi */
- mtc0 t0,C0_SR /* restore the status reg */
- j ra
- nop
- .set reorder
-#endif
-#if defined(CPU_R4000)
- mfc0 t0,C0_SR # save sr
- mtc0 zero,C0_SR # disable interrupts
- mfc0 t1,C0_TLBHI # save current pid
- and a0,TLBHI_VPN2MASK # construct tlbhi for probe
- and a1,TLBHI_PIDMASK
- or a0,a1
- mtc0 a0,C0_TLBHI
- .set noreorder
- nop; nop; nop; nop; nop; nop; nop; nop
- .set reorder
- tlbp # probe entry to entry hi/lo0/lo1/mask
- .set noreorder
- nop; nop; nop; nop; nop; nop; nop; nop
- .set reorder
- mfc0 v1,C0_INX
- li v0,-1
- bltz v1,1f
- move v0,v1
-1: mtc0 t1,C0_TLBHI # restore current pid
- mtc0 t0,C0_SR # restore sr
- j ra
-#endif
-ENDFRAME(tlbprobe)
-
-/*
-** resettlb(index) Invalidate the TLB entry specified by index
-*/
-FRAME(resettlb,sp,0,ra)
-#if defined(CPU_R3000)
- .set noreorder
- mfc0 t0,C0_TLBHI # fetch the current hi
- mfc0 v0,C0_SR # fetch the status reg.
- li t2,K0BASE&TLBHI_VPNMASK
- and v0,~SR_PE # dont inadvertantly clear PE
- mtc0 zero,C0_SR
- mtc0 t2,C0_TLBHI # set up tlbhi
- mtc0 zero,C0_TLBLO
- sll a0,TLBINX_INXSHIFT
- mtc0 a0,C0_INX
- nop
- tlbwi # do actual invalidate
- nop
- mtc0 t0,C0_TLBHI
- mtc0 v0,C0_SR
- j ra
- nop
- .set reorder
-#endif
-#if defined(CPU_R4000)
- li t2,K0BASE&TLBHI_VPN2MASK
- mfc0 t0,C0_TLBHI # save current TLBHI
- mfc0 v0,C0_SR # save SR and disable interrupts
- mtc0 zero,C0_SR
- mtc0 t2,C0_TLBHI # invalidate entry
- mtc0 zero,C0_TLBLO0
- mtc0 zero,C0_TLBLO1
- mtc0 a0,C0_INX
- .set noreorder
- nop; nop; nop; nop; nop; nop; nop; nop
- .set reorder
- tlbwi
- .set noreorder
- nop; nop; nop; nop; nop; nop; nop; nop
- .set reorder
- mtc0 t0,C0_TLBHI
- mtc0 v0,C0_SR
- j ra
-#endif
-ENDFRAME(resettlb)
-
-#if defined(CPU_R3000)
-/*
-** Setup TLB entry
-**
-** map_tlb(index, tlbhi, phypage)
-** a0 = TLB entry index
-** a1 = virtual page number and PID
-** a2 = physical page
-*/
-FRAME(map_tlb,sp,0,ra)
- .set noreorder
- sll a0,TLBINX_INXSHIFT
- mfc0 v0,C0_SR # fetch the current status
- mfc0 a3,C0_TLBHI # save the current hi
- and v0,~SR_PE # dont inadvertantly clear parity
-
- mtc0 zero,C0_SR
- mtc0 a1,C0_TLBHI # set the hi entry
- mtc0 a2,C0_TLBLO # set the lo entry
- mtc0 a0,C0_INX # load the index
- nop
- tlbwi # put the hi/lo in tlb entry indexed
- nop
- mtc0 a3,C0_TLBHI # put back the tlb hi reg
- mtc0 v0,C0_SR # restore the status register
- j ra
- nop
- .set reorder
-ENDFRAME(map_tlb)
- #endif
-#if defined(CPU_R4000)
-/*
-** Setup R4000 TLB entry
-**
-** map_tlb4000(mask_index, tlbhi, pte_even, pte_odd)
-** a0 = TLB entry index and page mask
-** a1 = virtual page number and PID
-** a2 = pte -- contents of even pte
-** a3 = pte -- contents of odd pte
-*/
-FRAME(map_tlb4000,sp,0,ra)
- and t2,a0,TLBPGMASK_MASK
- and a0,TLBINX_INXMASK
- mfc0 t1,C0_TLBHI # save current TLBPID
- mfc0 v0,C0_SR # save SR and disable interrupts
- mtc0 zero,C0_SR
- mtc0 t2,C0_PAGEMASK # set
- mtc0 a1,C0_TLBHI # set VPN and TLBPID
- mtc0 a2,C0_TLBLO0 # set PPN and access bits
- mtc0 a3,C0_TLBLO1 # set PPN and access bits
- mtc0 a0,C0_INX # set INDEX to wired entry
- .set noreorder
- nop; nop; nop; nop; nop; nop; nop; nop
- .set reorder
- tlbwi # drop it in
- .set noreorder
- nop; nop; nop; nop; nop; nop; nop; nop
- .set reorder
- mtc0 t1,C0_TLBHI # restore TLBPID
- mtc0 v0,C0_SR # restore SR
- j ra
-ENDFRAME(map_tlb4000)
-#endif
-
-
-/*
-** Set current TLBPID. This assumes PID is positioned correctly in reg.
-** a0.
-*/
-FRAME(set_tlbpid,sp,0,ra)
- .set noreorder
- mtc0 a0,C0_TLBHI
- j ra
- nop
- .set reorder
-ENDFRAME(set_tlbpid)
-
diff --git a/c/src/lib/libbsp/mips/p4000/startup/inittlb.c b/c/src/lib/libbsp/mips/p4000/startup/inittlb.c
deleted file mode 100644
index 7aa310d791..0000000000
--- a/c/src/lib/libbsp/mips/p4000/startup/inittlb.c
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * $Id$
- */
-
-#include <idtcpu.h>
-
-extern void resettlb( int i );
-
-void init_tlb(void)
-{
- int i;
-
- for (i = 0; i < N_TLB_ENTRIES; i++ )
- resettlb(i);
-}
-
diff --git a/c/src/lib/libbsp/mips/p4000/startup/linkcmds b/c/src/lib/libbsp/mips/p4000/startup/linkcmds
deleted file mode 100644
index 18637fee44..0000000000
--- a/c/src/lib/libbsp/mips/p4000/startup/linkcmds
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * $Id$
- */
-
-OUTPUT_FORMAT("elf32-bigmips")
-OUTPUT_ARCH(mips)
-/* Do we need any of these for elf?
- __DYNAMIC = 0; */
-_DYNAMIC_LINK = 0;
-
-SECTIONS
-{
- /* Read-only sections, merged into text segment: */
- .text 0x80030000 : /* */
-/* .text 0xa0020000 : /* */
-/* .text 0x00020000 : /* */
- {
- _ftext = . ;
- *(.init)
- eprol = .;
- *(.text)
- *(.text.*)
- *(.gnu.linkonce.t*)
- *(.mips16.fn.*)
- *(.mips16.call.*)
- PROVIDE (__runtime_reloc_start = .);
- *(.rel.sdata)
- PROVIDE (__runtime_reloc_stop = .);
- *(.fini)
- /* CREATE_OBJECT_SYMBOLS */
- etext = .;
- _etext = .;
- }
- .ctors :
- {
- ___ctors = .;
-/*
- * This version is preferable but requires a very late
- * model binutils (post 2.9.1).
- KEEP(*crtbegin.o(.ctors));
- KEEP(*(SORT(.ctors.*)));
- KEEP(*(.ctors));
-*/
- *crtbegin.o(.ctors);
- *(.ctors.*);
- *(.ctors);
- ___ctors_end = .;
- }
- .dtors :
- {
- ___dtors = .;
-/*
- * This version is preferable but requires a very late
- * model binutils (post 2.9.1).
- KEEP(*crtbegin.o(.dtors));
- KEEP(*(SORT(.dtors.*)));
- KEEP(*(.dtors));
-*/
- *crtbegin.o(.dtors);
- *(.dtors.*);
- *(.dtors);
- ___dtors_end = .;
- }
- . = .;
-
-
- .rodata ALIGN(8) : { *(.rodata) *(.gnu.linkonce.r*) }
- .rodata1 ALIGN(8) :
- {
- *(.rodata1)
- . = ALIGN(8);
- }
- .reginfo . : { *(.reginfo) }
- /* also: .hash .dynsym .dynstr .plt(if r/o) .rel.got */
- /* Read-write section, merged into data segment: */
- .data ALIGN(16) :
- {
- _fdata = . ;
- *(.data)
- CONSTRUCTORS
- }
- .data1 ALIGN(8) : { *(.data1) }
- _gp = . + 0x8000;
- .lit8 . : { *(.lit8) }
- .lit4 . : { *(.lit4) }
- /* also (before uninitialized portion): .dynamic .got .plt(if r/w)
- (or does .dynamic go into its own segment?) */
- /* We want the small data sections together, so single-instruction offsets
- can access them all, and initialized data all before uninitialized, so
- we can shorten the on-disk segment size. */
- .sdata ALIGN(8) : { *(.sdata) }
- _edata = .;
- __bss_start = ALIGN(8);
- _fbss = .;
- .sbss ALIGN(8) : { *(.sbss) *(.scommon) }
- .bss ALIGN(8) :
- {
- *(.bss)
- *(COMMON)
- _end = . ;
- end = . ;
- }
- /* Debug sections. These should never be loadable, but they must have
- zero addresses for the debuggers to work correctly. */
- .line 0 : { *(.line) }
- .debug 0 : { *(.debug) }
- .debug_sfnames 0 : { *(.debug_sfnames) }
- .debug_srcinfo 0 : { *(.debug_srcinfo) }
- .debug_macinfo 0 : { *(.debug_macinfo) }
- .debug_pubnames 0 : { *(.debug_pubnames) }
- .debug_aranges 0 : { *(.debug_aranges) }
-}
-
diff --git a/c/src/lib/libbsp/mips/p4000/startup/setvec.c b/c/src/lib/libbsp/mips/p4000/startup/setvec.c
deleted file mode 100644
index 3599e8a582..0000000000
--- a/c/src/lib/libbsp/mips/p4000/startup/setvec.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/* set_vector
- *
- * This routine installs an interrupt vector on the target Board/CPU.
- * This routine is allowed to be as board dependent as necessary.
- *
- * INPUT:
- * handler - interrupt handler entry point
- * vector - vector number
- * type - 0 indicates raw hardware connect
- * 1 indicates RTEMS interrupt connect
- *
- * RETURNS:
- * address of previous interrupt handler
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-/*
- * Rather than deleting this, it is commented out to (hopefully) help
- * the submitter send updates.
- *
- * static char _sccsid[] = "@(#)setvec.c 04/25/96 1.2\n";
- */
-
-
-#include <rtems.h>
-#include <bsp.h>
-
-mips_isr_entry set_vector( /* returns old vector */
- rtems_isr_entry handler, /* isr routine */
- rtems_vector_number vector, /* vector number */
- int type /* RTEMS or RAW intr */
-)
-{
- mips_isr_entry previous_isr;
-
- if ( type )
- rtems_interrupt_catch( handler, vector, (rtems_isr_entry *) &previous_isr );
- else {
- /* XXX: install non-RTEMS ISR as "raw" interupt */
- rtems_interrupt_catch( handler, vector, (rtems_isr_entry *) &previous_isr );
- }
- return previous_isr;
-}
-
diff --git a/c/src/lib/libbsp/mips/p4000/times b/c/src/lib/libbsp/mips/p4000/times
deleted file mode 100644
index 58574229e1..0000000000
--- a/c/src/lib/libbsp/mips/p4000/times
+++ /dev/null
@@ -1,200 +0,0 @@
-#
-# Timing Test Suite Results for the NO_BSP
-#
-# NOTE: This is just a template. The times are irrelevant since this BSP
-# can only be compiled -- not executed.
-#
-# $Id$
-#
-# @(#)times 08/01/96 1.4
-
-NOTE: To obtain the execution time in microseconds, divide the number of
- cycles by the clock speed. For example, if rtems_semaphore create
- is reported to be 1164 cycles, then at 66 Mhz it takes 17.64
- microseconds or 8.75 microseconds at 133 Mhz.
-
-Board: Algorithmics P4000i
-CPU: IDT 4650
-Clock Speed: 100MHz
-Memory Configuration: SRAM, DRAM, cache, etc
-Wait States:
-
-Times Reported in: cycles
-Timer Source: on-CPU cycle counter
-
-Column A:RTEMS compiled with 64 bit pointers and 64 bit unsigned32 types
-Column B:RTEMS compiled with 32 bit pointers and 32 bit unsigned32 types
-
-# DESCRIPTION A B
-== ================================================================= ==== ====
- 1 rtems_semaphore_create 788 759
- rtems_semaphore_delete 903 945
- rtems_semaphore_obtain: available 119 119
- rtems_semaphore_obtain: not available -- NO_WAIT 118 118
- rtems_semaphore_release: no waiting tasks 127 127
-
- 2 rtems_semaphore_obtain: not available -- caller blocks 842 840
-
- 3 rtems_semaphore_release: task readied -- preempts caller 777 751
-
- 4 rtems_task_restart: blocked task -- preempts caller 1611 1595
- rtems_task_restart: ready task -- preempts caller 1253 1395
- rtems_semaphore_release: task readied -- returns to caller 365 345
- rtems_task_create 798 797
- rtems_task_start 464 460
- rtems_task_restart: suspended task -- returns to caller 517 517
- rtems_task_delete: suspended task 529 595
- rtems_task_restart: ready task -- returns to caller 527 525
- rtems_task_restart: blocked task -- returns to caller 707 684
- rtems_task_delete: blocked task 609 675
-
- 5 rtems_task_suspend: calling task 549 549
- rtems_task_resume: task readied -- preempts caller 702 699
-
- 6 rtems_task_restart: calling task 291 291
- rtems_task_suspend: returns to caller 195 194
- rtems_task_resume: task readied -- returns to caller 198 198
- rtems_task_delete: ready task 734 736
-
- 7 rtems_task_restart: suspended task -- preempts caller 1049 990
-
- 8 rtems_task_set_priority: obtain current priority 94 94
- rtems_task_set_priority: returns to caller 418 355
- rtems_task_mode: obtain current mode 44 43
- rtems_task_mode: no reschedule 0 49
- rtems_task_mode: reschedule -- returns to caller 0 232
- rtems_task_mode: reschedule -- preempts caller 0 687
- rtems_task_set_note 0 101
- rtems_task_get_note 0 103
- rtems_clock_set 0 237
- rtems_clock_get 0 16
-
- 9 rtems_message_queue_create 3583 3432
- rtems_message_queue_send: no waiting tasks 252 252
- rtems_message_queue_urgent: no waiting tasks 252 252
- rtems_message_queue_receive: available 207 207
- rtems_message_queue_flush: no messages flushed 95 96
- rtems_message_queue_flush: messages flushed 110 110
- rtems_message_queue_delete 1044 1111
-
-10 rtems_message_queue_receive: not available -- NO_WAIT 132 131
- rtems_message_queue_receive: not available -- caller blocks 884 892
-
-11 rtems_message_queue_send: task readied -- preempts caller 397 817
-
-12 rtems_message_queue_send: task readied -- returns to caller 397 397
-
-13 rtems_message_queue_urgent: task readied -- preempts caller 816 817
-
-14 rtems_message_queue_urgent: task readied -- returns to caller 397 398
-
-15 rtems_event_receive: obtain current events 5 5
- rtems_event_receive: not available -- NO_WAIT 99 99
- rtems_event_receive: not available -- caller blocks 689 689
- rtems_event_send: no task readied 123 123
- rtems_event_receive: available 326 349
- rtems_event_send: task readied -- returns to caller 333 429
-
-16 rtems_event_send: task readied -- preempts caller 843 838
-
-17 rtems_task_set_priority: preempts caller 1002 991
-
-18 rtems_task_delete: calling task 1171 1157
-
-19 rtems_signal_catch 0 1306
- rtems_signal_send: returns to caller 0 1019
- rtems_signal_send: signal to self 0 496
- exit ASR overhead: returns to calling task 0 120
- exit ASR overhead: returns to preempting task 0 73
-
-20 rtems_partition_create 1293 1306
- rtems_region_create 1010 1019
- rtems_partition_get_buffer: available 481 496
- rtems_partition_get_buffer: not available 120 120
- rtems_partition_return_buffer 587 460
- rtems_partition_delete 379 320
- rtems_region_get_segment: available 179 179
- rtems_region_get_segment: not available -- NO_WAIT 349 293
- rtems_region_return_segment: no waiting tasks 335 322
- rtems_region_get_segment: not available -- caller blocks 1603 1496
- rtems_region_return_segment: task readied -- preempts caller 1616 1533
- rtems_region_return_segment: task readied -- returns to caller 940 939
- rtems_region_delete 301 348
- rtems_io_initialize 9 10
- rtems_io_open 6 6
- rtems_io_close 6 6
- rtems_io_read 6 6
- rtems_io_write 6 5
- rtems_io_control 6 6
-
-21 rtems_task_ident 1057 1058
- rtems_message_queue_ident 963 963
- rtems_semaphore_ident 1137 1136
- rtems_partition_ident 962 961
- rtems_region_ident 923 924
- rtems_port_ident 918 917
- rtems_timer_ident 942 941
- rtems_rate_monotonic_ident 924 925
-
-22 rtems_message_queue_broadcast: task readied -- returns to caller 1084 1095
- rtems_message_queue_broadcast: no waiting tasks 147 148
- rtems_message_queue_broadcast: task readied -- preempts caller 1305 1268
-
-23 rtems_timer_create 202 201
- rtems_timer_fire_after: inactive 261 261
- rtems_timer_fire_after: active 271 269
- rtems_timer_cancel: active 142 141
- rtems_timer_cancel: inactive 122 124
- rtems_timer_reset: inactive 222 222
- rtems_timer_reset: active 246 245
- rtems_timer_fire_when: inactive 312 311
- rtems_timer_fire_when: active 358 358
- rtems_timer_delete: active 263 263
- rtems_timer_delete: inactive 247 247
- rtems_task_wake_when 833 831
-
-24 rtems_task_wake_after: yield -- returns to caller 99 98
- rtems_task_wake_after: yields -- preempts caller 479 478
-
-25 rtems_clock_tick 313 318
-
-26 _ISR_Disable 64 57
- _ISR_Flash 51 36
- _ISR_Enable 31 18
- _Thread_Disable_dispatch 53 37
- _Thread_Enable_dispatch 260 233
- _Thread_Set_state 446 463
- _Thread_Disptach (NO FP) 839 801
- context switch: no floating point contexts 673 653
- context switch: self 156 162
- context switch: to another task 84 70
- context switch: restore 1st FP task 1030 1013
- fp context switch: save idle, restore idle 969 948
- fp context switch: save idle, restore initialized 275 267
- fp context switch: save initialized, restore initialized 319 292
- _Thread_Resume 512 480
- _Thread_Unblock 121 139
- _Thread_Ready 199 203
- _Thread_Get 27 27
- _Semaphore_Get 20 21
- _Thread_Get: invalid id 5 5
-
-27 interrupt entry overhead: returns to interrupted task 0 0
- interrupt exit overhead: returns to interrupted task 27 41
- interrupt entry overhead: returns to nested interrupt 0 0
- interrupt exit overhead: returns to nested interrupt 0 0
- interrupt entry overhead: returns to preempting task 0 0
- interrupt exit overhead: returns to preempting task 0 0
-
-28 rtems_port_create 574 560
- rtems_port_external_to_internal 87 87
- rtems_port_internal_to_external 86 86
- rtems_port_delete 395 353
-
-29 rtems_rate_monotonic_create 621 633
- rtems_rate_monotonic_period: initiate period -- returns to caller 773 694
- rtems_rate_monotonic_period: obtain status 295 284
- rtems_rate_monotonic_cancel 408 451
- rtems_rate_monotonic_delete: inactive 453 471
- rtems_rate_monotonic_delete: active 332 336
- rtems_rate_monotonic_period: conclude periods -- caller blocks 664 686
diff --git a/c/src/lib/libbsp/mips/p4000/wrapup/Makefile.am b/c/src/lib/libbsp/mips/p4000/wrapup/Makefile.am
deleted file mode 100644
index 70bda608b4..0000000000
--- a/c/src/lib/libbsp/mips/p4000/wrapup/Makefile.am
+++ /dev/null
@@ -1,34 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-BSP_FILES = startup console liblnk
-CPU_FILES = clock timer
-
-# bummer; have to use $foreach since % pattern subst rules only replace 1x
-OBJS = $(foreach piece, $(BSP_FILES), $(wildcard ../$(piece)/$(ARCH)/*.o)) \
- $(foreach piece, $(CPU_FILES), ../../../../libcpu/$(RTEMS_CPU)/$(piece)/$(ARCH)/$(piece).rel)
-LIB = $(ARCH)/libbsp.a
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../../../../automake/lib.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-$(LIB): $(OBJS)
- $(make-library)
-
-$(PROJECT_RELEASE)/lib/libbsp$(LIB_VARIANT).a: $(LIB)
- $(INSTALL_DATA) $< $@
-
-TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/libbsp$(LIB_VARIANT).a
-
-all-local: $(ARCH) $(OBJS) $(LIB) $(TMPINSTALL_FILES)
-
-.PRECIOUS: $(LIB)
-
-include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/powerpc/support/new_exception_processing/Makefile.am b/c/src/lib/libbsp/powerpc/support/new_exception_processing/Makefile.am
deleted file mode 100644
index c3195b159d..0000000000
--- a/c/src/lib/libbsp/powerpc/support/new_exception_processing/Makefile.am
+++ /dev/null
@@ -1,64 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-C_FILES = cpu.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-ROOT_H_FILES =
-RTEMS_SCORE_H_FILES = cpu.h c_isr.inl
-noinst_HEADERS = $(ROOT_H_FILES) $(RTEMS_SCORE_H_FILES)
-
-S_FILES = cpu_asm.S
-S_O_FILES = $(S_FILES:%.S=${ARCH}/%.o)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../../../../automake/lib.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-PREINSTALL_FILES = \
-$(PROJECT_INCLUDE) \
-$(PROJECT_INCLUDE)/rtems/score \
-$(ROOT_H_FILES:%=$(PROJECT_INCLUDE)/%) \
-$(RTEMS_SCORE_H_FILES:%=$(PROJECT_INCLUDE)/rtems/score/%)
-
-##TMPINSTALL_FILES += \
-##$(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o
-
-##$(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o: $(ARCH)/rtems.o
-## $(INSTALL_DATA) $< $@
-
-$(PROJECT_INCLUDE):
- $(mkinstalldirs) $@
-
-$(PROJECT_INCLUDE)/rtems/score:
- $(mkinstalldirs) $@
-
-$(PROJECT_INCLUDE)/rtems/score/%: %
- $(INSTALL_DATA) $< $@
-
-$(PROJECT_INCLUDE)/%: %
- $(INSTALL_DATA) $< $@
-
-REL = ../$(ARCH)/rtems-cpu.rel
-
-$(REL): $(C_O_FILES) $(S_O_FILES)
- test -d ../$(ARCH) || mkdir ../$(ARCH)
- $(make-rel)
-
-all-local: $(ARCH) $(PREINSTALL_FILES) $(REL)
-## all-local: $(ARCH)/rtems.o
-all-local: $(TMPINSTALL_FILES)
-
-clean-local:
- $(RM) -r ../o-optimize ../o-debug ../o-profile
-
-EXTRA_DIST = \
-$(C_FILES) $(S_FILES)
-
-include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/powerpc/support/new_exception_processing/c_isr.inl b/c/src/lib/libbsp/powerpc/support/new_exception_processing/c_isr.inl
deleted file mode 100644
index 68f8116fe9..0000000000
--- a/c/src/lib/libbsp/powerpc/support/new_exception_processing/c_isr.inl
+++ /dev/null
@@ -1,9 +0,0 @@
-RTEMS_INLINE_ROUTINE boolean _ISR_Is_in_progress( void )
-{
- register unsigned int isr_nesting_level;
- /*
- * Move from special purpose register 0 (mfspr SPRG0, r3)
- */
- asm volatile ("mfspr %0, 272" : "=r" (isr_nesting_level));
- return isr_nesting_level;
-}
diff --git a/c/src/lib/libbsp/powerpc/support/new_exception_processing/cpu.c b/c/src/lib/libbsp/powerpc/support/new_exception_processing/cpu.c
deleted file mode 100644
index e1c6eac4fd..0000000000
--- a/c/src/lib/libbsp/powerpc/support/new_exception_processing/cpu.c
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * PowerPC CPU Dependent Source
- *
- * Author: Andrew Bray <andy@i-cubed.co.uk>
- *
- * COPYRIGHT (c) 1995 by i-cubed ltd.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of i-cubed limited not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * i-cubed limited makes no representations about the suitability
- * of this software for any purpose.
- *
- * Derived from c/src/exec/cpu/no_cpu/cpu.c:
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may be found in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/context.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/interr.h>
-
-
-/* _CPU_Initialize
- *
- * This routine performs processor dependent initialization.
- *
- * INPUT PARAMETERS:
- * cpu_table - CPU table to initialize
- * thread_dispatch - address of disptaching routine
- */
-
-void _CPU_Initialize(
- rtems_cpu_table *cpu_table,
- void (*thread_dispatch) /* ignored on this CPU */
-)
-{
- _CPU_Table = *cpu_table;
-}
-
-/*PAGE
- *
- * _CPU_Context_Initialize
- */
-
-void _CPU_Context_Initialize(
- Context_Control *the_context,
- unsigned32 *stack_base,
- unsigned32 size,
- unsigned32 new_level,
- void *entry_point,
- boolean is_fp
-)
-{
- unsigned32 msr_value;
- unsigned32 sp;
-
- sp = (unsigned32)stack_base + size - CPU_MINIMUM_STACK_FRAME_SIZE;
- *((unsigned32 *)sp) = 0;
- the_context->gpr1 = sp;
-
- _CPU_MSR_GET( msr_value );
-
- if (!(new_level & CPU_MODES_INTERRUPT_MASK)) {
- msr_value |= MSR_EE;
- }
- else {
- msr_value &= ~MSR_EE;
- }
-
- the_context->msr = msr_value;
-
- /*
- * The FP bit of the MSR should only be enabled if this is a floating
- * point task. Unfortunately, the vfprintf_r routine in newlib
- * ends up pushing a floating point register regardless of whether or
- * not a floating point number is being printed. Serious restructuring
- * of vfprintf.c will be required to avoid this behavior. At this
- * time (7 July 1997), this restructuring is not being done.
- */
-
- /*if ( is_fp ) */
- the_context->msr |= PPC_MSR_FP;
-
- the_context->pc = (unsigned32)entry_point;
-}
-
-
-
-/*PAGE
- *
- * _CPU_Install_interrupt_stack
- */
-
-void _CPU_Install_interrupt_stack( void )
-{
-}
-
-
-
-
diff --git a/c/src/lib/libbsp/powerpc/support/new_exception_processing/cpu.h b/c/src/lib/libbsp/powerpc/support/new_exception_processing/cpu.h
deleted file mode 100644
index bf2204fd3d..0000000000
--- a/c/src/lib/libbsp/powerpc/support/new_exception_processing/cpu.h
+++ /dev/null
@@ -1,947 +0,0 @@
-/* cpu.h
- *
- * This include file contains information pertaining to the PowerPC
- * processor.
- *
- * Author: Andrew Bray <andy@i-cubed.co.uk>
- *
- * COPYRIGHT (c) 1995 by i-cubed ltd.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of i-cubed limited not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * i-cubed limited makes no representations about the suitability
- * of this software for any purpose.
- *
- * Derived from c/src/exec/cpu/no_cpu/cpu.h:
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may be found in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __CPU_h
-#define __CPU_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/ppc.h> /* pick up machine definitions */
-#include <libcpu/cpu.h>
-
-#ifndef ASM
-#include <rtems/score/ppctypes.h>
-#endif
-
-/* conditional compilation parameters */
-
-/*
- * Should the calls to _Thread_Enable_dispatch be inlined?
- *
- * If TRUE, then they are inlined.
- * If FALSE, then a subroutine call is made.
- *
- * Basically this is an example of the classic trade-off of size
- * versus speed. Inlining the call (TRUE) typically increases the
- * size of RTEMS while speeding up the enabling of dispatching.
- * [NOTE: In general, the _Thread_Dispatch_disable_level will
- * only be 0 or 1 unless you are in an interrupt handler and that
- * interrupt handler invokes the executive.] When not inlined
- * something calls _Thread_Enable_dispatch which in turns calls
- * _Thread_Dispatch. If the enable dispatch is inlined, then
- * one subroutine call is avoided entirely.]
- */
-
-#define CPU_INLINE_ENABLE_DISPATCH FALSE
-
-/*
- * Should the body of the search loops in _Thread_queue_Enqueue_priority
- * be unrolled one time? In unrolled each iteration of the loop examines
- * two "nodes" on the chain being searched. Otherwise, only one node
- * is examined per iteration.
- *
- * If TRUE, then the loops are unrolled.
- * If FALSE, then the loops are not unrolled.
- *
- * The primary factor in making this decision is the cost of disabling
- * and enabling interrupts (_ISR_Flash) versus the cost of rest of the
- * body of the loop. On some CPUs, the flash is more expensive than
- * one iteration of the loop body. In this case, it might be desirable
- * to unroll the loop. It is important to note that on some CPUs, this
- * code is the longest interrupt disable period in RTEMS. So it is
- * necessary to strike a balance when setting this parameter.
- */
-
-#define CPU_UNROLL_ENQUEUE_PRIORITY FALSE
-
-/*
- * Does RTEMS manage a dedicated interrupt stack in software?
- *
- * If TRUE, then a stack is allocated in _Interrupt_Manager_initialization.
- * If FALSE, nothing is done.
- *
- * If the CPU supports a dedicated interrupt stack in hardware,
- * then it is generally the responsibility of the BSP to allocate it
- * and set it up.
- *
- * If the CPU does not support a dedicated interrupt stack, then
- * the porter has two options: (1) execute interrupts on the
- * stack of the interrupted task, and (2) have RTEMS manage a dedicated
- * interrupt stack.
- *
- * If this is TRUE, CPU_ALLOCATE_INTERRUPT_STACK should also be TRUE.
- *
- * Only one of CPU_HAS_SOFTWARE_INTERRUPT_STACK and
- * CPU_HAS_HARDWARE_INTERRUPT_STACK should be set to TRUE. It is
- * possible that both are FALSE for a particular CPU. Although it
- * is unclear what that would imply about the interrupt processing
- * procedure on that CPU.
- */
-
-#define CPU_HAS_SOFTWARE_INTERRUPT_STACK TRUE
-
-/*
- * Does this CPU have hardware support for a dedicated interrupt stack?
- *
- * If TRUE, then it must be installed during initialization.
- * If FALSE, then no installation is performed.
- *
- * If this is TRUE, CPU_ALLOCATE_INTERRUPT_STACK should also be TRUE.
- *
- * Only one of CPU_HAS_SOFTWARE_INTERRUPT_STACK and
- * CPU_HAS_HARDWARE_INTERRUPT_STACK should be set to TRUE. It is
- * possible that both are FALSE for a particular CPU. Although it
- * is unclear what that would imply about the interrupt processing
- * procedure on that CPU.
- */
-
-#define CPU_HAS_HARDWARE_INTERRUPT_STACK FALSE
-
-/*
- * Does RTEMS allocate a dedicated interrupt stack in the Interrupt Manager?
- *
- * If TRUE, then the memory is allocated during initialization.
- * If FALSE, then the memory is allocated during initialization.
- *
- * This should be TRUE is CPU_HAS_SOFTWARE_INTERRUPT_STACK is TRUE
- * or CPU_INSTALL_HARDWARE_INTERRUPT_STACK is TRUE.
- */
-
-#define CPU_ALLOCATE_INTERRUPT_STACK FALSE
-
-/*
- * Does the RTEMS invoke the user's ISR with the vector number and
- * a pointer to the saved interrupt frame (1) or just the vector
- * number (0)?
- */
-
-#define CPU_ISR_PASSES_FRAME_POINTER 0
-
-/*
- * Does the CPU have hardware floating point?
- *
- * If TRUE, then the RTEMS_FLOATING_POINT task attribute is supported.
- * If FALSE, then the RTEMS_FLOATING_POINT task attribute is ignored.
- *
- * If there is a FP coprocessor such as the i387 or mc68881, then
- * the answer is TRUE.
- *
- * The macro name "PPC_HAS_FPU" should be made CPU specific.
- * It indicates whether or not this CPU model has FP support. For
- * example, it would be possible to have an i386_nofp CPU model
- * which set this to false to indicate that you have an i386 without
- * an i387 and wish to leave floating point support out of RTEMS.
- */
-
-#if ( PPC_HAS_FPU == 1 )
-#define CPU_HARDWARE_FP TRUE
-#else
-#define CPU_HARDWARE_FP FALSE
-#endif
-
-/*
- * Are all tasks RTEMS_FLOATING_POINT tasks implicitly?
- *
- * If TRUE, then the RTEMS_FLOATING_POINT task attribute is assumed.
- * If FALSE, then the RTEMS_FLOATING_POINT task attribute is followed.
- *
- * So far, the only CPU in which this option has been used is the
- * HP PA-RISC. The HP C compiler and gcc both implicitly use the
- * floating point registers to perform integer multiplies. If
- * a function which you would not think utilize the FP unit DOES,
- * then one can not easily predict which tasks will use the FP hardware.
- * In this case, this option should be TRUE.
- *
- * If CPU_HARDWARE_FP is FALSE, then this should be FALSE as well.
- */
-
-#define CPU_ALL_TASKS_ARE_FP FALSE
-
-/*
- * Should the IDLE task have a floating point context?
- *
- * If TRUE, then the IDLE task is created as a RTEMS_FLOATING_POINT task
- * and it has a floating point context which is switched in and out.
- * If FALSE, then the IDLE task does not have a floating point context.
- *
- * Setting this to TRUE negatively impacts the time required to preempt
- * the IDLE task from an interrupt because the floating point context
- * must be saved as part of the preemption.
- */
-
-#define CPU_IDLE_TASK_IS_FP FALSE
-
-/*
- * Should the saving of the floating point registers be deferred
- * until a context switch is made to another different floating point
- * task?
- *
- * If TRUE, then the floating point context will not be stored until
- * necessary. It will remain in the floating point registers and not
- * disturned until another floating point task is switched to.
- *
- * If FALSE, then the floating point context is saved when a floating
- * point task is switched out and restored when the next floating point
- * task is restored. The state of the floating point registers between
- * those two operations is not specified.
- *
- * If the floating point context does NOT have to be saved as part of
- * interrupt dispatching, then it should be safe to set this to TRUE.
- *
- * Setting this flag to TRUE results in using a different algorithm
- * for deciding when to save and restore the floating point context.
- * The deferred FP switch algorithm minimizes the number of times
- * the FP context is saved and restored. The FP context is not saved
- * until a context switch is made to another, different FP task.
- * Thus in a system with only one FP task, the FP context will never
- * be saved or restored.
- */
-/*
- * ACB Note: This could make debugging tricky..
- */
-
-#define CPU_USE_DEFERRED_FP_SWITCH TRUE
-
-/*
- * Does this port provide a CPU dependent IDLE task implementation?
- *
- * If TRUE, then the routine _CPU_Thread_Idle_body
- * must be provided and is the default IDLE thread body instead of
- * _CPU_Thread_Idle_body.
- *
- * If FALSE, then use the generic IDLE thread body if the BSP does
- * not provide one.
- *
- * This is intended to allow for supporting processors which have
- * a low power or idle mode. When the IDLE thread is executed, then
- * the CPU can be powered down.
- *
- * The order of precedence for selecting the IDLE thread body is:
- *
- * 1. BSP provided
- * 2. CPU dependent (if provided)
- * 3. generic (if no BSP and no CPU dependent)
- */
-
-#define CPU_PROVIDES_IDLE_THREAD_BODY FALSE
-
-/*
- * Does the stack grow up (toward higher addresses) or down
- * (toward lower addresses)?
- *
- * If TRUE, then the grows upward.
- * If FALSE, then the grows toward smaller addresses.
- */
-
-#define CPU_STACK_GROWS_UP FALSE
-
-/*
- * The following is the variable attribute used to force alignment
- * of critical RTEMS structures. On some processors it may make
- * sense to have these aligned on tighter boundaries than
- * the minimum requirements of the compiler in order to have as
- * much of the critical data area as possible in a cache line.
- *
- * The placement of this macro in the declaration of the variables
- * is based on the syntactically requirements of the GNU C
- * "__attribute__" extension. For example with GNU C, use
- * the following to force a structures to a 32 byte boundary.
- *
- * __attribute__ ((aligned (32)))
- *
- * NOTE: Currently only the Priority Bit Map table uses this feature.
- * To benefit from using this, the data must be heavily
- * used so it will stay in the cache and used frequently enough
- * in the executive to justify turning this on.
- */
-
-#define CPU_STRUCTURE_ALIGNMENT \
- __attribute__ ((aligned (PPC_CACHE_ALIGNMENT)))
-
-/*
- * Define what is required to specify how the network to host conversion
- * routines are handled.
- */
-
-#define CPU_HAS_OWN_HOST_TO_NETWORK_ROUTINES FALSE
-#define CPU_BIG_ENDIAN TRUE
-#define CPU_LITTLE_ENDIAN FALSE
-
-
-/*
- * Processor defined structures
- *
- * Examples structures include the descriptor tables from the i386
- * and the processor control structure on the i960ca.
- */
-
-/* may need to put some structures here. */
-
-/*
- * Contexts
- *
- * Generally there are 2 types of context to save.
- * 1. Interrupt registers to save
- * 2. Task level registers to save
- *
- * This means we have the following 3 context items:
- * 1. task level context stuff:: Context_Control
- * 2. floating point task stuff:: Context_Control_fp
- * 3. special interrupt level context :: Context_Control_interrupt
- *
- * On some processors, it is cost-effective to save only the callee
- * preserved registers during a task context switch. This means
- * that the ISR code needs to save those registers which do not
- * persist across function calls. It is not mandatory to make this
- * distinctions between the caller/callee saves registers for the
- * purpose of minimizing context saved during task switch and on interrupts.
- * If the cost of saving extra registers is minimal, simplicity is the
- * choice. Save the same context on interrupt entry as for tasks in
- * this case.
- *
- * Additionally, if gdb is to be made aware of RTEMS tasks for this CPU, then
- * care should be used in designing the context area.
- *
- * On some CPUs with hardware floating point support, the Context_Control_fp
- * structure will not be used or it simply consist of an array of a
- * fixed number of bytes. This is done when the floating point context
- * is dumped by a "FP save context" type instruction and the format
- * is not really defined by the CPU. In this case, there is no need
- * to figure out the exact format -- only the size. Of course, although
- * this is enough information for RTEMS, it is probably not enough for
- * a debugger such as gdb. But that is another problem.
- */
-
-#ifndef ASM
-
-typedef struct {
- unsigned32 gpr1; /* Stack pointer for all */
- unsigned32 gpr2; /* TOC in PowerOpen, reserved SVR4, section ptr EABI + */
- unsigned32 gpr13; /* First non volatile PowerOpen, section ptr SVR4/EABI */
- unsigned32 gpr14; /* Non volatile for all */
- unsigned32 gpr15; /* Non volatile for all */
- unsigned32 gpr16; /* Non volatile for all */
- unsigned32 gpr17; /* Non volatile for all */
- unsigned32 gpr18; /* Non volatile for all */
- unsigned32 gpr19; /* Non volatile for all */
- unsigned32 gpr20; /* Non volatile for all */
- unsigned32 gpr21; /* Non volatile for all */
- unsigned32 gpr22; /* Non volatile for all */
- unsigned32 gpr23; /* Non volatile for all */
- unsigned32 gpr24; /* Non volatile for all */
- unsigned32 gpr25; /* Non volatile for all */
- unsigned32 gpr26; /* Non volatile for all */
- unsigned32 gpr27; /* Non volatile for all */
- unsigned32 gpr28; /* Non volatile for all */
- unsigned32 gpr29; /* Non volatile for all */
- unsigned32 gpr30; /* Non volatile for all */
- unsigned32 gpr31; /* Non volatile for all */
- unsigned32 cr; /* PART of the CR is non volatile for all */
- unsigned32 pc; /* Program counter/Link register */
- unsigned32 msr; /* Initial interrupt level */
-} Context_Control;
-
-typedef struct {
- /* The ABIs (PowerOpen/SVR4/EABI) only require saving f14-f31 over
- * procedure calls. However, this would mean that the interrupt
- * frame had to hold f0-f13, and the fpscr. And as the majority
- * of tasks will not have an FP context, we will save the whole
- * context here.
- */
-#if (PPC_HAS_DOUBLE == 1)
- double f[32];
- double fpscr;
-#else
- float f[32];
- float fpscr;
-#endif
-} Context_Control_fp;
-
-typedef struct CPU_Interrupt_frame {
- unsigned32 stacklink; /* Ensure this is a real frame (also reg1 save) */
- unsigned32 calleeLr; /* link register used by callees: SVR4/EABI */
- /* This is what is left out of the primary contexts */
- unsigned32 gpr0;
- unsigned32 gpr2; /* play safe */
- unsigned32 gpr3;
- unsigned32 gpr4;
- unsigned32 gpr5;
- unsigned32 gpr6;
- unsigned32 gpr7;
- unsigned32 gpr8;
- unsigned32 gpr9;
- unsigned32 gpr10;
- unsigned32 gpr11;
- unsigned32 gpr12;
- unsigned32 gpr13; /* Play safe */
- unsigned32 gpr28; /* For internal use by the IRQ handler */
- unsigned32 gpr29; /* For internal use by the IRQ handler */
- unsigned32 gpr30; /* For internal use by the IRQ handler */
- unsigned32 gpr31; /* For internal use by the IRQ handler */
- unsigned32 cr; /* Bits of this are volatile, so no-one may save */
- unsigned32 ctr;
- unsigned32 xer;
- unsigned32 lr;
- unsigned32 pc;
- unsigned32 msr;
- unsigned32 pad[3];
-} CPU_Interrupt_frame;
-
-/*
- * The following table contains the information required to configure
- * the PowerPC processor specific parameters.
- */
-
-typedef struct {
- void (*pretasking_hook)( void );
- void (*predriver_hook)( void );
- void (*postdriver_hook)( void );
- void (*idle_task)( void );
- boolean do_zero_of_workspace;
- unsigned32 idle_task_stack_size;
- unsigned32 interrupt_stack_size;
- unsigned32 extra_mpci_receive_server_stack;
- void * (*stack_allocate_hook)( unsigned32 );
- void (*stack_free_hook)( void* );
- /* end of fields required on all CPUs */
-
- unsigned32 clicks_per_usec; /* Timer clicks per microsecond */
- boolean exceptions_in_RAM; /* TRUE if in RAM */
-
-} rtems_cpu_table;
-
-/*
- * Macros to access required entires in the CPU Table are in
- * the file rtems/system.h.
- */
-
-/*
- * Macros to access PowerPC MPC750 specific additions to the CPU Table
- */
-
-#define rtems_cpu_configuration_get_clicks_per_usec() \
- (_CPU_Table.clicks_per_usec)
-
-#define rtems_cpu_configuration_get_exceptions_in_ram() \
- (_CPU_Table.exceptions_in_RAM)
-
-/*
- * This variable is optional. It is used on CPUs on which it is difficult
- * to generate an "uninitialized" FP context. It is filled in by
- * _CPU_Initialize and copied into the task's FP context area during
- * _CPU_Context_Initialize.
- */
-
-/* EXTERN Context_Control_fp _CPU_Null_fp_context; */
-
-/*
- * On some CPUs, RTEMS supports a software managed interrupt stack.
- * This stack is allocated by the Interrupt Manager and the switch
- * is performed in _ISR_Handler. These variables contain pointers
- * to the lowest and highest addresses in the chunk of memory allocated
- * for the interrupt stack. Since it is unknown whether the stack
- * grows up or down (in general), this give the CPU dependent
- * code the option of picking the version it wants to use.
- *
- * NOTE: These two variables are required if the macro
- * CPU_HAS_SOFTWARE_INTERRUPT_STACK is defined as TRUE.
- */
-
-SCORE_EXTERN void *_CPU_Interrupt_stack_low;
-SCORE_EXTERN void *_CPU_Interrupt_stack_high;
-
-#endif /* ndef ASM */
-
-/*
- * This defines the number of levels and the mask used to pick those
- * bits out of a thread mode.
- */
-
-#define CPU_MODES_INTERRUPT_LEVEL 0x00000001 /* interrupt level in mode */
-#define CPU_MODES_INTERRUPT_MASK 0x00000001 /* interrupt level in mode */
-
-/*
- * With some compilation systems, it is difficult if not impossible to
- * call a high-level language routine from assembly language. This
- * is especially true of commercial Ada compilers and name mangling
- * C++ ones. This variable can be optionally defined by the CPU porter
- * and contains the address of the routine _Thread_Dispatch. This
- * can make it easier to invoke that routine at the end of the interrupt
- * sequence (if a dispatch is necessary).
- */
-
-/* EXTERN void (*_CPU_Thread_dispatch_pointer)(); */
-
-/*
- * Nothing prevents the porter from declaring more CPU specific variables.
- */
-
-#ifndef ASM
-
-SCORE_EXTERN struct {
- unsigned32 *Disable_level;
- void *Stack;
- volatile boolean *Switch_necessary;
- boolean *Signal;
-
-} _CPU_IRQ_info CPU_STRUCTURE_ALIGNMENT;
-
-#endif /* ndef ASM */
-
-/*
- * The size of the floating point context area. On some CPUs this
- * will not be a "sizeof" because the format of the floating point
- * area is not defined -- only the size is. This is usually on
- * CPUs with a "floating point save context" instruction.
- */
-
-#define CPU_CONTEXT_FP_SIZE sizeof( Context_Control_fp )
-
-/*
- * (Optional) # of bytes for libmisc/stackchk to check
- * If not specifed, then it defaults to something reasonable
- * for most architectures.
- */
-
-#define CPU_STACK_CHECK_SIZE (128)
-
-/*
- * Amount of extra stack (above minimum stack size) required by
- * MPCI receive server thread. Remember that in a multiprocessor
- * system this thread must exist and be able to process all directives.
- */
-
-#define CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK 0
-
-/*
- * This defines the number of entries in the ISR_Vector_table managed
- * by RTEMS.
- */
-
-#define CPU_INTERRUPT_NUMBER_OF_VECTORS (PPC_INTERRUPT_MAX)
-#define CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER (PPC_INTERRUPT_MAX - 1)
-
-/*
- * Should be large enough to run all RTEMS tests. This insures
- * that a "reasonable" small application should not have any problems.
- */
-
-#define CPU_STACK_MINIMUM_SIZE (1024*8)
-
-/*
- * CPU's worst alignment requirement for data types on a byte boundary. This
- * alignment does not take into account the requirements for the stack.
- */
-
-#define CPU_ALIGNMENT (PPC_ALIGNMENT)
-
-/*
- * This number corresponds to the byte alignment requirement for the
- * heap handler. This alignment requirement may be stricter than that
- * for the data types alignment specified by CPU_ALIGNMENT. It is
- * common for the heap to follow the same alignment requirement as
- * CPU_ALIGNMENT. If the CPU_ALIGNMENT is strict enough for the heap,
- * then this should be set to CPU_ALIGNMENT.
- *
- * NOTE: This does not have to be a power of 2. It does have to
- * be greater or equal to than CPU_ALIGNMENT.
- */
-
-#define CPU_HEAP_ALIGNMENT (PPC_ALIGNMENT)
-
-/*
- * This number corresponds to the byte alignment requirement for memory
- * buffers allocated by the partition manager. This alignment requirement
- * may be stricter than that for the data types alignment specified by
- * CPU_ALIGNMENT. It is common for the partition to follow the same
- * alignment requirement as CPU_ALIGNMENT. If the CPU_ALIGNMENT is strict
- * enough for the partition, then this should be set to CPU_ALIGNMENT.
- *
- * NOTE: This does not have to be a power of 2. It does have to
- * be greater or equal to than CPU_ALIGNMENT.
- */
-
-#define CPU_PARTITION_ALIGNMENT (PPC_ALIGNMENT)
-
-/*
- * This number corresponds to the byte alignment requirement for the
- * stack. This alignment requirement may be stricter than that for the
- * data types alignment specified by CPU_ALIGNMENT. If the CPU_ALIGNMENT
- * is strict enough for the stack, then this should be set to 0.
- *
- * NOTE: This must be a power of 2 either 0 or greater than CPU_ALIGNMENT.
- */
-
-#define CPU_STACK_ALIGNMENT (PPC_STACK_ALIGNMENT)
-
-/*
- * Needed for Interrupt stack
- */
-#define CPU_MINIMUM_STACK_FRAME_SIZE 8
-
-
-/* ISR handler macros */
-
-/*
- * Disable all interrupts for an RTEMS critical section. The previous
- * level is returned in _isr_cookie.
- */
-
-#define loc_string(a,b) a " (" #b ")\n"
-
-#ifndef ASM
-
-static inline unsigned32 _CPU_ISR_Get_level( void )
-{
- register unsigned int msr;
- _CPU_MSR_GET(msr);
- if (msr & MSR_EE) return 0;
- else return 1;
-}
-
-static inline void _CPU_ISR_Set_level( unsigned32 level )
-{
- register unsigned int msr;
- _CPU_MSR_GET(msr);
- if (!(level & CPU_MODES_INTERRUPT_MASK)) {
- msr |= MSR_EE;
- }
- else {
- msr &= ~MSR_EE;
- }
- _CPU_MSR_SET(msr);
-}
-
-#define _CPU_ISR_install_vector(irq, new, old) {BSP_panic("_CPU_ISR_install_vector called\n");}
-
-/* Context handler macros */
-
-/*
- * Initialize the context to a state suitable for starting a
- * task after a context restore operation. Generally, this
- * involves:
- *
- * - setting a starting address
- * - preparing the stack
- * - preparing the stack and frame pointers
- * - setting the proper interrupt level in the context
- * - initializing the floating point context
- *
- * This routine generally does not set any unnecessary register
- * in the context. The state of the "general data" registers is
- * undefined at task start time.
- *
- * NOTE: Implemented as a subroutine for the SPARC port.
- */
-
-void _CPU_Context_Initialize(
- Context_Control *the_context,
- unsigned32 *stack_base,
- unsigned32 size,
- unsigned32 new_level,
- void *entry_point,
- boolean is_fp
-);
-
-/*
- * This routine is responsible for somehow restarting the currently
- * executing task. If you are lucky, then all that is necessary
- * is restoring the context. Otherwise, there will need to be
- * a special assembly routine which does something special in this
- * case. Context_Restore should work most of the time. It will
- * not work if restarting self conflicts with the stack frame
- * assumptions of restoring a context.
- */
-
-#define _CPU_Context_Restart_self( _the_context ) \
- _CPU_Context_restore( (_the_context) );
-
-/*
- * The purpose of this macro is to allow the initial pointer into
- * a floating point context area (used to save the floating point
- * context) to be at an arbitrary place in the floating point
- * context area.
- *
- * This is necessary because some FP units are designed to have
- * their context saved as a stack which grows into lower addresses.
- * Other FP units can be saved by simply moving registers into offsets
- * from the base of the context area. Finally some FP units provide
- * a "dump context" instruction which could fill in from high to low
- * or low to high based on the whim of the CPU designers.
- */
-
-#define _CPU_Context_Fp_start( _base, _offset ) \
- ( (void *) _Addresses_Add_offset( (_base), (_offset) ) )
-
-/*
- * This routine initializes the FP context area passed to it to.
- * There are a few standard ways in which to initialize the
- * floating point context. The code included for this macro assumes
- * that this is a CPU in which a "initial" FP context was saved into
- * _CPU_Null_fp_context and it simply copies it to the destination
- * context passed to it.
- *
- * Other models include (1) not doing anything, and (2) putting
- * a "null FP status word" in the correct place in the FP context.
- */
-
-#define _CPU_Context_Initialize_fp( _destination ) \
- { \
- ((Context_Control_fp *) *((void **) _destination))->fpscr = PPC_INIT_FPSCR; \
- }
-
-/* end of Context handler macros */
-
-/* Fatal Error manager macros */
-
-/*
- * This routine copies _error into a known place -- typically a stack
- * location or a register, optionally disables interrupts, and
- * halts/stops the CPU.
- */
-
-#define _CPU_Fatal_halt( _error ) \
- _BSP_Fatal_error(_error)
-
-/* end of Fatal Error manager macros */
-
-/* Bitfield handler macros */
-
-/*
- * This routine sets _output to the bit number of the first bit
- * set in _value. _value is of CPU dependent type Priority_Bit_map_control.
- * This type may be either 16 or 32 bits wide although only the 16
- * least significant bits will be used.
- *
- * There are a number of variables in using a "find first bit" type
- * instruction.
- *
- * (1) What happens when run on a value of zero?
- * (2) Bits may be numbered from MSB to LSB or vice-versa.
- * (3) The numbering may be zero or one based.
- * (4) The "find first bit" instruction may search from MSB or LSB.
- *
- * RTEMS guarantees that (1) will never happen so it is not a concern.
- * (2),(3), (4) are handled by the macros _CPU_Priority_mask() and
- * _CPU_Priority_Bits_index(). These three form a set of routines
- * which must logically operate together. Bits in the _value are
- * set and cleared based on masks built by _CPU_Priority_mask().
- * The basic major and minor values calculated by _Priority_Major()
- * and _Priority_Minor() are "massaged" by _CPU_Priority_Bits_index()
- * to properly range between the values returned by the "find first bit"
- * instruction. This makes it possible for _Priority_Get_highest() to
- * calculate the major and directly index into the minor table.
- * This mapping is necessary to ensure that 0 (a high priority major/minor)
- * is the first bit found.
- *
- * This entire "find first bit" and mapping process depends heavily
- * on the manner in which a priority is broken into a major and minor
- * components with the major being the 4 MSB of a priority and minor
- * the 4 LSB. Thus (0 << 4) + 0 corresponds to priority 0 -- the highest
- * priority. And (15 << 4) + 14 corresponds to priority 254 -- the next
- * to the lowest priority.
- *
- * If your CPU does not have a "find first bit" instruction, then
- * there are ways to make do without it. Here are a handful of ways
- * to implement this in software:
- *
- * - a series of 16 bit test instructions
- * - a "binary search using if's"
- * - _number = 0
- * if _value > 0x00ff
- * _value >>=8
- * _number = 8;
- *
- * if _value > 0x0000f
- * _value >=8
- * _number += 4
- *
- * _number += bit_set_table[ _value ]
- *
- * where bit_set_table[ 16 ] has values which indicate the first
- * bit set
- */
-
-#define _CPU_Bitfield_Find_first_bit( _value, _output ) \
- { \
- asm volatile ("cntlzw %0, %1" : "=r" ((_output)), "=r" ((_value)) : \
- "1" ((_value))); \
- }
-
-/* end of Bitfield handler macros */
-
-/*
- * This routine builds the mask which corresponds to the bit fields
- * as searched by _CPU_Bitfield_Find_first_bit(). See the discussion
- * for that routine.
- */
-
-#define _CPU_Priority_Mask( _bit_number ) \
- ( 0x80000000 >> (_bit_number) )
-
-/*
- * This routine translates the bit numbers returned by
- * _CPU_Bitfield_Find_first_bit() into something suitable for use as
- * a major or minor component of a priority. See the discussion
- * for that routine.
- */
-
-#define _CPU_Priority_bits_index( _priority ) \
- (_priority)
-
-/* end of Priority handler macros */
-
-/* variables */
-
-extern const unsigned32 _CPU_msrs[4];
-
-/* functions */
-
-/*
- * _CPU_Initialize
- *
- * This routine performs CPU dependent initialization.
- */
-
-void _CPU_Initialize(
- rtems_cpu_table *cpu_table,
- void (*thread_dispatch)
-);
-
-
-/*
- * _CPU_Install_interrupt_stack
- *
- * This routine installs the hardware interrupt stack pointer.
- *
- * NOTE: It need only be provided if CPU_HAS_HARDWARE_INTERRUPT_STACK
- * is TRUE.
- */
-
-void _CPU_Install_interrupt_stack( void );
-
-/*
- * _CPU_Context_switch
- *
- * This routine switches from the run context to the heir context.
- */
-
-void _CPU_Context_switch(
- Context_Control *run,
- Context_Control *heir
-);
-
-/*
- * _CPU_Context_restore
- *
- * This routine is generallu used only to restart self in an
- * efficient manner. It may simply be a label in _CPU_Context_switch.
- *
- * NOTE: May be unnecessary to reload some registers.
- */
-
-void _CPU_Context_restore(
- Context_Control *new_context
-);
-
-/*
- * _CPU_Context_save_fp
- *
- * This routine saves the floating point context passed to it.
- */
-
-void _CPU_Context_save_fp(
- void **fp_context_ptr
-);
-
-/*
- * _CPU_Context_restore_fp
- *
- * This routine restores the floating point context passed to it.
- */
-
-void _CPU_Context_restore_fp(
- void **fp_context_ptr
-);
-
-void _CPU_Fatal_error(
- unsigned32 _error
-);
-
-/* The following routine swaps the endian format of an unsigned int.
- * It must be static because it is referenced indirectly.
- *
- * This version will work on any processor, but if there is a better
- * way for your CPU PLEASE use it. The most common way to do this is to:
- *
- * swap least significant two bytes with 16-bit rotate
- * swap upper and lower 16-bits
- * swap most significant two bytes with 16-bit rotate
- *
- * Some CPUs have special instructions which swap a 32-bit quantity in
- * a single instruction (e.g. i486). It is probably best to avoid
- * an "endian swapping control bit" in the CPU. One good reason is
- * that interrupts would probably have to be disabled to insure that
- * an interrupt does not try to access the same "chunk" with the wrong
- * endian. Another good reason is that on some CPUs, the endian bit
- * endianness for ALL fetches -- both code and data -- so the code
- * will be fetched incorrectly.
- */
-
-static inline unsigned int CPU_swap_u32(
- unsigned int value
-)
-{
- unsigned32 swapped;
-
- asm volatile("rlwimi %0,%1,8,24,31;"
- "rlwimi %0,%1,24,16,23;"
- "rlwimi %0,%1,8,8,15;"
- "rlwimi %0,%1,24,0,7;" :
- "=&r" ((swapped)) : "r" ((value)));
-
- return( swapped );
-}
-
-#define CPU_swap_u16( value ) \
- (((value&0xff) << 8) | ((value >> 8)&0xff))
-
-#endif /* ndef ASM */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/c/src/lib/libbsp/powerpc/support/new_exception_processing/cpu_asm.S b/c/src/lib/libbsp/powerpc/support/new_exception_processing/cpu_asm.S
deleted file mode 100644
index 213e094fa6..0000000000
--- a/c/src/lib/libbsp/powerpc/support/new_exception_processing/cpu_asm.S
+++ /dev/null
@@ -1,396 +0,0 @@
-
-/* cpu_asm.s 1.1 - 95/12/04
- *
- * This file contains the assembly code for the PowerPC implementation
- * of RTEMS.
- *
- * Author: Andrew Bray <andy@i-cubed.co.uk>
- *
- * COPYRIGHT (c) 1995 by i-cubed ltd.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of i-cubed limited not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * i-cubed limited makes no representations about the suitability
- * of this software for any purpose.
- *
- * Derived from c/src/exec/cpu/no_cpu/cpu_asm.c:
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <asm.h>
-
-/*
- * Offsets for various Contexts
- */
- .set GP_1, 0
- .set GP_2, (GP_1 + 4)
- .set GP_13, (GP_2 + 4)
- .set GP_14, (GP_13 + 4)
-
- .set GP_15, (GP_14 + 4)
- .set GP_16, (GP_15 + 4)
- .set GP_17, (GP_16 + 4)
- .set GP_18, (GP_17 + 4)
-
- .set GP_19, (GP_18 + 4)
- .set GP_20, (GP_19 + 4)
- .set GP_21, (GP_20 + 4)
- .set GP_22, (GP_21 + 4)
-
- .set GP_23, (GP_22 + 4)
- .set GP_24, (GP_23 + 4)
- .set GP_25, (GP_24 + 4)
- .set GP_26, (GP_25 + 4)
-
- .set GP_27, (GP_26 + 4)
- .set GP_28, (GP_27 + 4)
- .set GP_29, (GP_28 + 4)
- .set GP_30, (GP_29 + 4)
-
- .set GP_31, (GP_30 + 4)
- .set GP_CR, (GP_31 + 4)
- .set GP_PC, (GP_CR + 4)
- .set GP_MSR, (GP_PC + 4)
-
- .set FP_0, 0
- .set FP_1, (FP_0 + 4)
- .set FP_2, (FP_1 + 4)
- .set FP_3, (FP_2 + 4)
- .set FP_4, (FP_3 + 4)
- .set FP_5, (FP_4 + 4)
- .set FP_6, (FP_5 + 4)
- .set FP_7, (FP_6 + 4)
- .set FP_8, (FP_7 + 4)
- .set FP_9, (FP_8 + 4)
- .set FP_10, (FP_9 + 4)
- .set FP_11, (FP_10 + 4)
- .set FP_12, (FP_11 + 4)
- .set FP_13, (FP_12 + 4)
- .set FP_14, (FP_13 + 4)
- .set FP_15, (FP_14 + 4)
- .set FP_16, (FP_15 + 4)
- .set FP_17, (FP_16 + 4)
- .set FP_18, (FP_17 + 4)
- .set FP_19, (FP_18 + 4)
- .set FP_20, (FP_19 + 4)
- .set FP_21, (FP_20 + 4)
- .set FP_22, (FP_21 + 4)
- .set FP_23, (FP_22 + 4)
- .set FP_24, (FP_23 + 4)
- .set FP_25, (FP_24 + 4)
- .set FP_26, (FP_25 + 4)
- .set FP_27, (FP_26 + 4)
- .set FP_28, (FP_27 + 4)
- .set FP_29, (FP_28 + 4)
- .set FP_30, (FP_29 + 4)
- .set FP_31, (FP_30 + 4)
- .set FP_FPSCR, (FP_31 + 4)
-
- .set IP_LINK, 0
- .set IP_0, (IP_LINK + 8)
- .set IP_2, (IP_0 + 4)
-
- .set IP_3, (IP_2 + 4)
- .set IP_4, (IP_3 + 4)
- .set IP_5, (IP_4 + 4)
- .set IP_6, (IP_5 + 4)
-
- .set IP_7, (IP_6 + 4)
- .set IP_8, (IP_7 + 4)
- .set IP_9, (IP_8 + 4)
- .set IP_10, (IP_9 + 4)
-
- .set IP_11, (IP_10 + 4)
- .set IP_12, (IP_11 + 4)
- .set IP_13, (IP_12 + 4)
- .set IP_28, (IP_13 + 4)
-
- .set IP_29, (IP_28 + 4)
- .set IP_30, (IP_29 + 4)
- .set IP_31, (IP_30 + 4)
- .set IP_CR, (IP_31 + 4)
-
- .set IP_CTR, (IP_CR + 4)
- .set IP_XER, (IP_CTR + 4)
- .set IP_LR, (IP_XER + 4)
- .set IP_PC, (IP_LR + 4)
-
- .set IP_MSR, (IP_PC + 4)
- .set IP_END, (IP_MSR + 16)
-
- BEGIN_CODE
-/*
- * _CPU_Context_save_fp_context
- *
- * This routine is responsible for saving the FP context
- * at *fp_context_ptr. If the point to load the FP context
- * from is changed then the pointer is modified by this routine.
- *
- * Sometimes a macro implementation of this is in cpu.h which dereferences
- * the ** and a similarly named routine in this file is passed something
- * like a (Context_Control_fp *). The general rule on making this decision
- * is to avoid writing assembly language.
- */
-
- ALIGN (PPC_CACHE_ALIGNMENT, PPC_CACHE_ALIGN_POWER)
- PUBLIC_PROC (_CPU_Context_save_fp)
-PROC (_CPU_Context_save_fp):
-#if (PPC_HAS_FPU == 1)
- lwz r3, 0(r3)
- stfs f0, FP_0(r3)
- stfs f1, FP_1(r3)
- stfs f2, FP_2(r3)
- stfs f3, FP_3(r3)
- stfs f4, FP_4(r3)
- stfs f5, FP_5(r3)
- stfs f6, FP_6(r3)
- stfs f7, FP_7(r3)
- stfs f8, FP_8(r3)
- stfs f9, FP_9(r3)
- stfs f10, FP_10(r3)
- stfs f11, FP_11(r3)
- stfs f12, FP_12(r3)
- stfs f13, FP_13(r3)
- stfs f14, FP_14(r3)
- stfs f15, FP_15(r3)
- stfs f16, FP_16(r3)
- stfs f17, FP_17(r3)
- stfs f18, FP_18(r3)
- stfs f19, FP_19(r3)
- stfs f20, FP_20(r3)
- stfs f21, FP_21(r3)
- stfs f22, FP_22(r3)
- stfs f23, FP_23(r3)
- stfs f24, FP_24(r3)
- stfs f25, FP_25(r3)
- stfs f26, FP_26(r3)
- stfs f27, FP_27(r3)
- stfs f28, FP_28(r3)
- stfs f29, FP_29(r3)
- stfs f30, FP_30(r3)
- stfs f31, FP_31(r3)
- mffs f2
- stfs f2, FP_FPSCR(r3)
-#endif
- blr
-
-/*
- * _CPU_Context_restore_fp_context
- *
- * This routine is responsible for restoring the FP context
- * at *fp_context_ptr. If the point to load the FP context
- * from is changed then the pointer is modified by this routine.
- *
- * Sometimes a macro implementation of this is in cpu.h which dereferences
- * the ** and a similarly named routine in this file is passed something
- * like a (Context_Control_fp *). The general rule on making this decision
- * is to avoid writing assembly language.
- */
-
- ALIGN (PPC_CACHE_ALIGNMENT, PPC_CACHE_ALIGN_POWER)
- PUBLIC_PROC (_CPU_Context_restore_fp)
-PROC (_CPU_Context_restore_fp):
-#if (PPC_HAS_FPU == 1)
- lwz r3, 0(r3)
- lfs f2, FP_FPSCR(r3)
- mtfsf 255, f2
- lfs f0, FP_0(r3)
- lfs f1, FP_1(r3)
- lfs f2, FP_2(r3)
- lfs f3, FP_3(r3)
- lfs f4, FP_4(r3)
- lfs f5, FP_5(r3)
- lfs f6, FP_6(r3)
- lfs f7, FP_7(r3)
- lfs f8, FP_8(r3)
- lfs f9, FP_9(r3)
- lfs f10, FP_10(r3)
- lfs f11, FP_11(r3)
- lfs f12, FP_12(r3)
- lfs f13, FP_13(r3)
- lfs f14, FP_14(r3)
- lfs f15, FP_15(r3)
- lfs f16, FP_16(r3)
- lfs f17, FP_17(r3)
- lfs f18, FP_18(r3)
- lfs f19, FP_19(r3)
- lfs f20, FP_20(r3)
- lfs f21, FP_21(r3)
- lfs f22, FP_22(r3)
- lfs f23, FP_23(r3)
- lfs f24, FP_24(r3)
- lfs f25, FP_25(r3)
- lfs f26, FP_26(r3)
- lfs f27, FP_27(r3)
- lfs f28, FP_28(r3)
- lfs f29, FP_29(r3)
- lfs f30, FP_30(r3)
- lfs f31, FP_31(r3)
-#endif
- blr
-
-
-/* _CPU_Context_switch
- *
- * This routine performs a normal non-FP context switch.
- */
- ALIGN (PPC_CACHE_ALIGNMENT, PPC_CACHE_ALIGN_POWER)
- PUBLIC_PROC (_CPU_Context_switch)
-PROC (_CPU_Context_switch):
- sync
- isync
- /* This assumes that all the registers are in the given order */
- li r5, 32
- addi r3,r3,-4
-#if ( PPC_USE_DATA_CACHE )
- dcbz r5, r3
-#endif
- stw r1, GP_1+4(r3)
- stw r2, GP_2+4(r3)
-#if (PPC_USE_MULTIPLE == 1)
- addi r3, r3, GP_18+4
-#if ( PPC_USE_DATA_CACHE )
- dcbz r5, r3
-#endif
- stmw r13, GP_13-GP_18(r3)
-#else
- stw r13, GP_13+4(r3)
- stw r14, GP_14+4(r3)
- stw r15, GP_15+4(r3)
- stw r16, GP_16+4(r3)
- stw r17, GP_17+4(r3)
- stwu r18, GP_18+4(r3)
-#if ( PPC_USE_DATA_CACHE )
- dcbz r5, r3
-#endif
- stw r19, GP_19-GP_18(r3)
- stw r20, GP_20-GP_18(r3)
- stw r21, GP_21-GP_18(r3)
- stw r22, GP_22-GP_18(r3)
- stw r23, GP_23-GP_18(r3)
- stw r24, GP_24-GP_18(r3)
- stw r25, GP_25-GP_18(r3)
- stw r26, GP_26-GP_18(r3)
- stw r27, GP_27-GP_18(r3)
- stw r28, GP_28-GP_18(r3)
- stw r29, GP_29-GP_18(r3)
- stw r30, GP_30-GP_18(r3)
- stw r31, GP_31-GP_18(r3)
-#endif
-#if ( PPC_USE_DATA_CACHE )
- dcbt r0, r4
-#endif
- mfcr r6
- stw r6, GP_CR-GP_18(r3)
- mflr r7
- stw r7, GP_PC-GP_18(r3)
- mfmsr r8
- stw r8, GP_MSR-GP_18(r3)
-
-#if ( PPC_USE_DATA_CACHE )
- dcbt r5, r4
-#endif
- lwz r1, GP_1(r4)
- lwz r2, GP_2(r4)
-#if (PPC_USE_MULTIPLE == 1)
- addi r4, r4, GP_19
-#if ( PPC_USE_DATA_CACHE )
- dcbt r5, r4
-#endif
- lmw r13, GP_13-GP_19(r4)
-#else
- lwz r13, GP_13(r4)
- lwz r14, GP_14(r4)
- lwz r15, GP_15(r4)
- lwz r16, GP_16(r4)
- lwz r17, GP_17(r4)
- lwz r18, GP_18(r4)
- lwzu r19, GP_19(r4)
-#if ( PPC_USE_DATA_CACHE )
- dcbt r5, r4
-#endif
- lwz r20, GP_20-GP_19(r4)
- lwz r21, GP_21-GP_19(r4)
- lwz r22, GP_22-GP_19(r4)
- lwz r23, GP_23-GP_19(r4)
- lwz r24, GP_24-GP_19(r4)
- lwz r25, GP_25-GP_19(r4)
- lwz r26, GP_26-GP_19(r4)
- lwz r27, GP_27-GP_19(r4)
- lwz r28, GP_28-GP_19(r4)
- lwz r29, GP_29-GP_19(r4)
- lwz r30, GP_30-GP_19(r4)
- lwz r31, GP_31-GP_19(r4)
-#endif
- lwz r6, GP_CR-GP_19(r4)
- lwz r7, GP_PC-GP_19(r4)
- lwz r8, GP_MSR-GP_19(r4)
- mtcrf 255, r6
- mtlr r7
- mtmsr r8
-
- blr
-
-/*
- * _CPU_Context_restore
- *
- * This routine is generallu used only to restart self in an
- * efficient manner. It may simply be a label in _CPU_Context_switch.
- *
- * NOTE: May be unnecessary to reload some registers.
- */
-/*
- * ACB: Don't worry about cache optimisation here - this is not THAT critical.
- */
- ALIGN (PPC_CACHE_ALIGNMENT, PPC_CACHE_ALIGN_POWER)
- PUBLIC_PROC (_CPU_Context_restore)
-PROC (_CPU_Context_restore):
- lwz r5, GP_CR(r3)
- lwz r6, GP_PC(r3)
- lwz r7, GP_MSR(r3)
- mtcrf 255, r5
- mtlr r6
- mtmsr r7
- lwz r1, GP_1(r3)
- lwz r2, GP_2(r3)
-#if (PPC_USE_MULTIPLE == 1)
- lmw r13, GP_13(r3)
-#else
- lwz r13, GP_13(r3)
- lwz r14, GP_14(r3)
- lwz r15, GP_15(r3)
- lwz r16, GP_16(r3)
- lwz r17, GP_17(r3)
- lwz r18, GP_18(r3)
- lwz r19, GP_19(r3)
- lwz r20, GP_20(r3)
- lwz r21, GP_21(r3)
- lwz r22, GP_22(r3)
- lwz r23, GP_23(r3)
- lwz r24, GP_24(r3)
- lwz r25, GP_25(r3)
- lwz r26, GP_26(r3)
- lwz r27, GP_27(r3)
- lwz r28, GP_28(r3)
- lwz r29, GP_29(r3)
- lwz r30, GP_30(r3)
- lwz r31, GP_31(r3)
-#endif
-
- blr
-
diff --git a/c/src/lib/libbsp/powerpc/support/old_exception_processing/Makefile.am b/c/src/lib/libbsp/powerpc/support/old_exception_processing/Makefile.am
deleted file mode 100644
index afd66502eb..0000000000
--- a/c/src/lib/libbsp/powerpc/support/old_exception_processing/Makefile.am
+++ /dev/null
@@ -1,66 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-# C source names
-C_FILES = cpu.c ppccache.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-ROOT_H_FILES =
-RTEMS_SCORE_H_FILES = cpu.h c_isr.inl
-noinst_HEADERS = $(ROOT_H_FILES) $(RTEMS_SCORE_H_FILES)
-
-# Assembly source names
-S_FILES = cpu_asm.S
-S_O_FILES = $(S_FILES:%.S=${ARCH}/%.o)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../../../../automake/lib.am
-
-PREINSTALL_FILES = \
-$(PROJECT_INCLUDE) \
-$(PROJECT_INCLUDE)/rtems/score \
-$(ROOT_H_FILES:%=$(PROJECT_INCLUDE)/%) \
-$(RTEMS_SCORE_H_FILES:%=$(PROJECT_INCLUDE)/rtems/score/%)
-
-TMPINSTALL_FILES += \
-$(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o
-
-$(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o: $(ARCH)/rtems.o
- $(INSTALL_DATA) $< $@
-
-$(PROJECT_INCLUDE):
- $(mkinstalldirs) $@
-
-$(PROJECT_INCLUDE)/rtems/score:
- $(mkinstalldirs) $@
-
-$(PROJECT_INCLUDE)/rtems/score/%: %
- $(INSTALL_DATA) $< $@
-
-$(PROJECT_INCLUDE)/%: %
- $(INSTALL_DATA) $< $@
-
-REL = ../$(ARCH)/rtems-cpu.rel
-
-$(REL): $(C_O_FILES) $(S_O_FILES)
- test -d ../$(ARCH) || mkdir ../$(ARCH)
- $(make-rel)
-
-all-local: $(ARCH) $(PREINSTALL_FILES) $(REL)
-all-local: $(ARCH)/rtems.o
-all-local: $(TMPINSTALL_FILES)
-
-clean-local:
- $(RM) -r ../o-optimize ../o-debug ../o-profile
-
-UNUSED_FILES = irq_stub.S
-
-EXTRA_DIST = \
-TODO \
-rtems.S \
-$(C_FILES) $(S_FILES) $(UNUSED_FILES)
-
-include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/powerpc/support/old_exception_processing/README b/c/src/lib/libbsp/powerpc/support/old_exception_processing/README
deleted file mode 100644
index c72bebfe0c..0000000000
--- a/c/src/lib/libbsp/powerpc/support/old_exception_processing/README
+++ /dev/null
@@ -1,80 +0,0 @@
-#
-# $Id$
-#
-
-There are various issues regarding this port:
-
-
-
-1) Legal
-
-This port is written by Andrew Bray <andy@i-cubed.co.uk>, and
-is copyright 1995 i-cubed ltd.
-
-This port was later updated by Joel Sherrill <joel@OARcorp.com>
-to test the support for the PPC603, PPC603e, and MPC604. This
-was tested on the PowerPC simulator PSIM and a VMEbus single board
-computer.
-
-2) CPU support.
-
-This release fully supports the PPC403GA, PPC403GB, PPC603, PPC603e,
-MPC604, MPC750, and numerous MPC8xx processors. A good faith attempt
-has been made to include support other models based upon available
-documentation including the MPC5xx. There are two interrupt structures
-supported by the PowerPC port. The newer structure is supported by
-all the MPC750 and MPC604 BSPs. This structure is required to use
-the RDBG remote debugging support.
-
-This port was originally written and tested on the PPC403GA (using
-software floating point). Current ports are tested primarily on
-60x CPUs using the PowerPC simulator PSIM.
-
-Andrew Bray received assistance during the initial porting effort
-from IBM and Blue Micro and we would like to gratefully acknowledge
-that help.
-
-The support for the PPC602 processor is incomplete as only sketchy
-data is currently available. Perhaps this model has been dropped.
-
-3) Application Binary Interface
-
-In the context of RTEMS, the ABI is of interest for the following
-aspects:
-
-a) Register usage. Which registers are used to provide static variable
- linkage, stack pointer etc.
-
-b) Function calling convention. How parameters are passed, how function
- variables should be invoked, how values are returned, etc.
-
-c) Stack frame layout.
-
-I am aware of a number of ABIs for the PowerPC:
-
-a) The PowerOpen ABI. This is the original Power ABI used on the RS/6000.
- This is the only ABI supported by versions of GCC before 2.7.0.
-
-b) The SVR4 ABI. This is the ABI defined by SunSoft for the Solaris port
- to the PowerPC.
-
-c) The Embedded ABI. This is an embedded ABI for PowerPC use, which has no
- operating system interface defined. It is promoted by SunSoft, Motorola,
- and Cygnus Support. Cygnus are porting the GNU toolchain to this ABI.
-
-d) GCC 2.7.0. This compiler is partway along the road to supporting the EABI,
- but is currently halfway in between.
-
-This port was built and tested using the PowerOpen ABI, with the following
-caveat: we used an ELF assembler and linker. So some attention may be
-required on the assembler files to get them through a traditional (XCOFF)
-PowerOpen assembler.
-
-This port contains support for the other ABIs, but this may prove to be
-incomplete as it is untested.
-
-The RTEMS PowerPC port supports EABI as the primary ABI. The powerpc-rtems
-GNU toolset configuration is EABI.
-
-Andrew Bray, 4 December 1995
-Joel Sherrill, 16 July 1997
diff --git a/c/src/lib/libbsp/powerpc/support/old_exception_processing/TODO b/c/src/lib/libbsp/powerpc/support/old_exception_processing/TODO
deleted file mode 100644
index 64c96cb14c..0000000000
--- a/c/src/lib/libbsp/powerpc/support/old_exception_processing/TODO
+++ /dev/null
@@ -1,8 +0,0 @@
-#
-# $Id$
-#
-
-Todo list:
-
-Maybe decode external interrupts like the HPPA does.
- See c/src/lib/libcpu/powerpc/ppc403/ictrl/* for implementation on ppc403
diff --git a/c/src/lib/libbsp/powerpc/support/old_exception_processing/c_isr.inl b/c/src/lib/libbsp/powerpc/support/old_exception_processing/c_isr.inl
deleted file mode 100644
index 706d4f7e4f..0000000000
--- a/c/src/lib/libbsp/powerpc/support/old_exception_processing/c_isr.inl
+++ /dev/null
@@ -1,4 +0,0 @@
-RTEMS_INLINE_ROUTINE boolean _ISR_Is_in_progress( void )
-{
- return (_ISR_Nest_level != 0);
-}
diff --git a/c/src/lib/libbsp/powerpc/support/old_exception_processing/cpu.c b/c/src/lib/libbsp/powerpc/support/old_exception_processing/cpu.c
deleted file mode 100644
index 7d6824cb26..0000000000
--- a/c/src/lib/libbsp/powerpc/support/old_exception_processing/cpu.c
+++ /dev/null
@@ -1,853 +0,0 @@
-/*
- * PowerPC CPU Dependent Source
- *
- * Author: Andrew Bray <andy@i-cubed.co.uk>
- *
- * COPYRIGHT (c) 1995 by i-cubed ltd.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of i-cubed limited not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * i-cubed limited makes no representations about the suitability
- * of this software for any purpose.
- *
- * Derived from c/src/exec/cpu/no_cpu/cpu.c:
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may be found in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/context.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/interr.h>
-
-/*
- * These are for testing purposes.
- */
-
-/* _CPU_Initialize
- *
- * This routine performs processor dependent initialization.
- *
- * INPUT PARAMETERS:
- * cpu_table - CPU table to initialize
- * thread_dispatch - address of disptaching routine
- */
-
-static void ppc_spurious(int, CPU_Interrupt_frame *);
-
-void _CPU_Initialize(
- rtems_cpu_table *cpu_table,
- void (*thread_dispatch) /* ignored on this CPU */
-)
-{
- proc_ptr handler = (proc_ptr)ppc_spurious;
- int i;
-#if (PPC_ABI != PPC_ABI_POWEROPEN)
- register unsigned32 r2 = 0;
-#if (PPC_ABI != PPC_ABI_GCC27)
- register unsigned32 r13 = 0;
-
- asm ("mr %0,13" : "=r" ((r13)) : "0" ((r13)));
- _CPU_IRQ_info.Default_r13 = r13;
-#endif
-
- asm ("mr %0,2" : "=r" ((r2)) : "0" ((r2)));
- _CPU_IRQ_info.Default_r2 = r2;
-#endif
-
- _CPU_IRQ_info.Nest_level = &_ISR_Nest_level;
- _CPU_IRQ_info.Disable_level = &_Thread_Dispatch_disable_level;
- _CPU_IRQ_info.Vector_table = _ISR_Vector_table;
-#if (PPC_ABI == PPC_ABI_POWEROPEN)
- _CPU_IRQ_info.Dispatch_r2 = ((unsigned32 *)_Thread_Dispatch)[1];
-#endif
- _CPU_IRQ_info.Switch_necessary = &_Context_Switch_necessary;
- _CPU_IRQ_info.Signal = &_ISR_Signals_to_thread_executing;
-
-#if (PPC_USE_SPRG)
- i = (int)&_CPU_IRQ_info;
- asm volatile("mtspr 0x113, %0" : "=r" (i) : "0" (i)); /* SPRG 3 */
-#endif
-
- /*
- * Store Msr Value in the IRQ info structure.
- */
- _CPU_MSR_Value(_CPU_IRQ_info.msr_initial);
-
-#if (PPC_USE_SPRG)
- i = _CPU_IRQ_info.msr_initial;
- asm volatile("mtspr 0x112, %0" : "=r" (i) : "0" (i)); /* SPRG 2 */
-#endif
-
- if ( cpu_table->spurious_handler )
- handler = (proc_ptr)cpu_table->spurious_handler;
-
- for (i = 0; i < PPC_INTERRUPT_MAX; i++)
- _ISR_Vector_table[i] = handler;
-
- _CPU_Table = *cpu_table;
-}
-
-/*PAGE
- *
- * _CPU_ISR_Calculate_level
- *
- * The PowerPC puts its interrupt enable status in the MSR register
- * which also contains things like endianness control. To be more
- * awkward, the layout varies from processor to processor. This
- * is why it was necessary to adopt a scheme which allowed the user
- * to specify specifically which interrupt sources were enabled.
- */
-
-unsigned32 _CPU_ISR_Calculate_level(
- unsigned32 new_level
-)
-{
- register unsigned32 new_msr = 0;
-
- /*
- * Set the critical interrupt enable bit
- */
-
-#if (PPC_HAS_RFCI)
- if ( !(new_level & PPC_INTERRUPT_LEVEL_CE) )
- new_msr |= PPC_MSR_CE;
-#endif
-
- if ( !(new_level & PPC_INTERRUPT_LEVEL_ME) )
- new_msr |= PPC_MSR_ME;
-
- if ( !(new_level & PPC_INTERRUPT_LEVEL_EE) )
- new_msr |= PPC_MSR_EE;
-
- return new_msr;
-}
-
-/*PAGE
- *
- * _CPU_ISR_Set_level
- *
- * This routine sets the requested level in the MSR.
- */
-
-void _CPU_ISR_Set_level(
- unsigned32 new_level
-)
-{
- register unsigned32 tmp = 0;
- register unsigned32 new_msr;
-
- new_msr = _CPU_ISR_Calculate_level( new_level );
-
- asm volatile (
- "mfmsr %0; andc %0,%0,%1; and %2, %2, %1; or %0, %0, %2; mtmsr %0" :
- "=&r" ((tmp)) :
- "r" ((PPC_MSR_DISABLE_MASK)), "r" ((new_msr)), "0" ((tmp))
- );
-}
-
-/*PAGE
- *
- * _CPU_ISR_Get_level
- *
- * This routine gets the current interrupt level from the MSR and
- * converts it to an RTEMS interrupt level.
- */
-
-unsigned32 _CPU_ISR_Get_level( void )
-{
- unsigned32 level = 0;
- unsigned32 msr;
-
- asm volatile("mfmsr %0" : "=r" ((msr)));
-
- msr &= PPC_MSR_DISABLE_MASK;
-
- /*
- * Set the critical interrupt enable bit
- */
-
-#if (PPC_HAS_RFCI)
- if ( !(msr & PPC_MSR_CE) )
- level |= PPC_INTERRUPT_LEVEL_CE;
-#endif
-
- if ( !(msr & PPC_MSR_ME) )
- level |= PPC_INTERRUPT_LEVEL_ME;
-
- if ( !(msr & PPC_MSR_EE) )
- level |= PPC_INTERRUPT_LEVEL_EE;
-
- return level;
-}
-
-/*PAGE
- *
- * _CPU_Context_Initialize
- */
-
-#if (PPC_ABI == PPC_ABI_POWEROPEN)
-#define CPU_MINIMUM_STACK_FRAME_SIZE 56
-#else /* PPC_ABI_SVR4 or PPC_ABI_EABI */
-#define CPU_MINIMUM_STACK_FRAME_SIZE 8
-#endif
-
-void _CPU_Context_Initialize(
- Context_Control *the_context,
- unsigned32 *stack_base,
- unsigned32 size,
- unsigned32 new_level,
- void *entry_point,
- boolean is_fp
-)
-{
- unsigned32 msr_value;
- unsigned32 sp;
-
- sp = (unsigned32)stack_base + size - CPU_MINIMUM_STACK_FRAME_SIZE;
- *((unsigned32 *)sp) = 0;
- the_context->gpr1 = sp;
-
- the_context->msr = _CPU_ISR_Calculate_level( new_level );
-
- /*
- * The FP bit of the MSR should only be enabled if this is a floating
- * point task. Unfortunately, the vfprintf_r routine in newlib
- * ends up pushing a floating point register regardless of whether or
- * not a floating point number is being printed. Serious restructuring
- * of vfprintf.c will be required to avoid this behavior. At this
- * time (7 July 1997), this restructuring is not being done.
- */
-
- /*if ( is_fp ) */
- the_context->msr |= PPC_MSR_FP;
-
- /*
- * Calculate the task's MSR value:
- *
- * + Set the exception prefix bit to point to the exception table
- * + Force the RI bit
- * + Use the DR and IR bits
- */
- _CPU_MSR_Value( msr_value );
- the_context->msr |= (msr_value & PPC_MSR_EP);
- the_context->msr |= PPC_MSR_RI;
- the_context->msr |= msr_value & (PPC_MSR_DR|PPC_MSR_IR);
-
-#if (PPC_ABI == PPC_ABI_POWEROPEN)
- { unsigned32 *desc = (unsigned32 *)entry_point;
-
- the_context->pc = desc[0];
- the_context->gpr2 = desc[1];
- }
-#endif
-
-#if (PPC_ABI == PPC_ABI_SVR4)
- { unsigned r13 = 0;
- asm volatile ("mr %0, 13" : "=r" ((r13)));
-
- the_context->pc = (unsigned32)entry_point;
- the_context->gpr13 = r13;
- }
-#endif
-
-#if (PPC_ABI == PPC_ABI_EABI)
- { unsigned32 r2 = 0;
- unsigned r13 = 0;
- asm volatile ("mr %0,2; mr %1,13" : "=r" ((r2)), "=r" ((r13)));
-
- the_context->pc = (unsigned32)entry_point;
- the_context->gpr2 = r2;
- the_context->gpr13 = r13;
- }
-#endif
-}
-
-
-/* _CPU_ISR_install_vector
- *
- * This kernel routine installs the RTEMS handler for the
- * specified vector.
- *
- * Input parameters:
- * vector - interrupt vector number
- * old_handler - former ISR for this vector number
- * new_handler - replacement ISR for this vector number
- *
- * Output parameters: NONE
- *
- */
-
-void _CPU_ISR_install_vector(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-)
-{
- proc_ptr ignored;
- *old_handler = _ISR_Vector_table[ vector ];
-
- /*
- * If the interrupt vector table is a table of pointer to isr entry
- * points, then we need to install the appropriate RTEMS interrupt
- * handler for this vector number.
- */
-
- /*
- * Install the wrapper so this ISR can be invoked properly.
- */
- if (_CPU_Table.exceptions_in_RAM)
- _CPU_ISR_install_raw_handler( vector, _ISR_Handler, &ignored );
-
- /*
- * We put the actual user ISR address in '_ISR_vector_table'. This will
- * be used by the _ISR_Handler so the user gets control.
- */
-
- _ISR_Vector_table[ vector ] = new_handler ? (ISR_Handler_entry)new_handler :
- _CPU_Table.spurious_handler ?
- (ISR_Handler_entry)_CPU_Table.spurious_handler :
- (ISR_Handler_entry)ppc_spurious;
-}
-
-/*PAGE
- *
- * _CPU_Install_interrupt_stack
- */
-
-void _CPU_Install_interrupt_stack( void )
-{
-#if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27)
- _CPU_IRQ_info.Stack = _CPU_Interrupt_stack_high - 56;
-#else
- _CPU_IRQ_info.Stack = _CPU_Interrupt_stack_high - 8;
-#endif
-}
-
-/* Handle a spurious interrupt */
-static void ppc_spurious(int v, CPU_Interrupt_frame *i)
-{
-#if 0
- printf("Spurious interrupt on vector %d from %08.8x\n",
- v, i->pc);
-#endif
-#ifdef ppc403
- if (v == PPC_IRQ_EXTERNAL)
- {
- register int r = 0;
-
- asm volatile("mtdcr 0x42, %0" :
- "=&r" ((r)) : "0" ((r))); /* EXIER */
- }
- else if (v == PPC_IRQ_PIT)
- {
- register int r = 0x08000000;
-
- asm volatile("mtspr 0x3d8, %0" :
- "=&r" ((r)) : "0" ((r))); /* TSR */
- }
- else if (v == PPC_IRQ_FIT)
- {
- register int r = 0x04000000;
-
- asm volatile("mtspr 0x3d8, %0" :
- "=&r" ((r)) : "0" ((r))); /* TSR */
- }
-#endif
-}
-
-void _CPU_Fatal_error(unsigned32 _error)
-{
- asm volatile ("mr 3, %0" : : "r" ((_error)));
- asm volatile ("tweq 5,5");
- asm volatile ("li 0,0; mtmsr 0");
- while (1) ;
-}
-
-#define PPC_SYNCHRONOUS_TRAP_BIT_MASK 0x100
-#define PPC_ASYNCHRONOUS_TRAP( _trap ) (_trap)
-#define PPC_SYNCHRONOUS_TRAP ( _trap ) ((_trap)+PPC_SYNCHRONOUS_TRAP_BIT_MASK)
-#define PPC_REAL_TRAP_NUMBER ( _trap ) ((_trap)%PPC_SYNCHRONOUS_TRAP_BIT_MASK)
-
-
-const CPU_Trap_table_entry _CPU_Trap_slot_template = {
-
-#if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27)
-#error " Vector install not tested."
-#if (PPC_HAS_FPU)
-#error " Vector install not tested."
- 0x9421feb0, /* stwu r1, -(20*4 + 18*8 + IP_END)(r1) */
-#else
-#error " Vector install not tested."
- 0x9421ff40, /* stwu r1, -(20*4 + IP_END)(r1) */
-#endif
-#else
- 0x9421ff90, /* stwu r1, -(IP_END)(r1) */
-#endif
-
- 0x90010008, /* stw %r0, IP_0(%r1) */
- 0x38000000, /* li %r0, PPC_IRQ */
- 0x48000002 /* ba PROC (_ISR_Handler) */
-};
-
-#if defined(mpc860) || defined(mpc821)
-const CPU_Trap_table_entry _CPU_Trap_slot_template_m860 = {
- 0x7c0803ac, /* mtlr %r0 */
- 0x81210028, /* lwz %r9, IP_9(%r1) */
- 0x38000000, /* li %r0, PPC_IRQ */
- 0x48000002 /* b PROC (_ISR_Handler) */
-};
-#endif /* mpc860 */
-
-unsigned32 ppc_exception_vector_addr(
- unsigned32 vector
-);
-
-
-/*PAGE
- *
- * _CPU_ISR_install_raw_handler
- *
- * This routine installs the specified handler as a "raw" non-executive
- * supported trap handler (a.k.a. interrupt service routine).
- *
- * Input Parameters:
- * vector - trap table entry number plus synchronous
- * vs. asynchronous information
- * new_handler - address of the handler to be installed
- * old_handler - pointer to an address of the handler previously installed
- *
- * Output Parameters: NONE
- * *new_handler - address of the handler previously installed
- *
- * NOTE:
- *
- * This routine is based on the SPARC routine _CPU_ISR_install_raw_handler.
- * Install a software trap handler as an executive interrupt handler
- * (which is desirable since RTEMS takes care of window and register issues),
- * then the executive needs to know that the return address is to the trap
- * rather than the instruction following the trap.
- *
- */
-
-void _CPU_ISR_install_raw_handler(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-)
-{
- unsigned32 real_vector;
- CPU_Trap_table_entry *slot;
- unsigned32 u32_handler=0;
-
- /*
- * Get the "real" trap number for this vector ignoring the synchronous
- * versus asynchronous indicator included with our vector numbers.
- */
-
- real_vector = vector;
-
- /*
- * Get the current base address of the trap table and calculate a pointer
- * to the slot we are interested in.
- */
- slot = (CPU_Trap_table_entry *)ppc_exception_vector_addr( real_vector );
-
- /*
- * Get the address of the old_handler from the trap table.
- *
- * NOTE: The old_handler returned will be bogus if it does not follow
- * the RTEMS model.
- */
-
-#define HIGH_BITS_MASK 0xFFFFFC00
-#define HIGH_BITS_SHIFT 10
-#define LOW_BITS_MASK 0x000003FF
-
- if (slot->stwu_r1 == _CPU_Trap_slot_template.stwu_r1) {
- /*
- * Set u32_handler = to target address
- */
- u32_handler = slot->b_Handler & 0x03fffffc;
-
- /* IMD FIX: sign extend address fragment... */
- if (u32_handler & 0x02000000) {
- u32_handler |= 0xfc000000;
- }
-
- *old_handler = (proc_ptr) u32_handler;
- } else
-/* There are two kinds of handlers for the MPC860. One is the 'standard'
- * one like above. The other is for the cascaded interrupts from the SIU
- * and CPM. Therefore we must check for the alternate one if the standard
- * one is not present
- */
-#if defined(mpc860) || defined(mpc821)
- if (slot->stwu_r1 == _CPU_Trap_slot_template_m860.stwu_r1) {
- /*
- * Set u32_handler = to target address
- */
- u32_handler = slot->b_Handler & 0x03fffffc;
- *old_handler = (proc_ptr) u32_handler;
- } else
-#endif /* mpc860 */
-
- *old_handler = 0;
-
- /*
- * Copy the template to the slot and then fix it.
- */
-#if defined(mpc860) || defined(mpc821)
- if (vector >= PPC_IRQ_IRQ0)
- *slot = _CPU_Trap_slot_template_m860;
- else
-#endif /* mpc860 */
- *slot = _CPU_Trap_slot_template;
-
- u32_handler = (unsigned32) new_handler;
-
- /*
- * IMD FIX: insert address fragment only (bits 6..29)
- * therefore check for proper address range
- * and remove unwanted bits
- */
- if ((u32_handler & 0xfc000000) == 0xfc000000) {
- u32_handler &= ~0xfc000000;
- }
- else if ((u32_handler & 0xfc000000) != 0x00000000) {
- _Internal_error_Occurred(INTERNAL_ERROR_CORE,
- TRUE,
- u32_handler);
- }
-
- slot->b_Handler |= u32_handler;
-
- slot->li_r0_IRQ |= vector;
-
- _CPU_Data_Cache_Block_Flush( slot );
-}
-
-unsigned32 ppc_exception_vector_addr(
- unsigned32 vector
-)
-{
-#if (!PPC_HAS_EVPR)
- unsigned32 Msr;
-#endif
- unsigned32 Top = 0;
- unsigned32 Offset = 0x000;
-
-#if (PPC_HAS_EXCEPTION_PREFIX)
- _CPU_MSR_Value ( Msr );
- if ( ( Msr & PPC_MSR_EP) != 0 ) /* Vectors at FFFx_xxxx */
- Top = 0xfff00000;
-#elif (PPC_HAS_EVPR)
- asm volatile( "mfspr %0,0x3d6" : "=r" (Top)); /* EVPR */
- Top = Top & 0xffff0000;
-#endif
-
- switch ( vector ) {
- case PPC_IRQ_SYSTEM_RESET: /* on 40x aka PPC_IRQ_CRIT */
- Offset = 0x00100;
- break;
- case PPC_IRQ_MCHECK:
- Offset = 0x00200;
- break;
- case PPC_IRQ_PROTECT:
- Offset = 0x00300;
- break;
- case PPC_IRQ_ISI:
- Offset = 0x00400;
- break;
- case PPC_IRQ_EXTERNAL:
- Offset = 0x00500;
- break;
- case PPC_IRQ_ALIGNMENT:
- Offset = 0x00600;
- break;
- case PPC_IRQ_PROGRAM:
- Offset = 0x00700;
- break;
- case PPC_IRQ_NOFP:
- Offset = 0x00800;
- break;
- case PPC_IRQ_DECREMENTER:
- Offset = 0x00900;
- break;
- case PPC_IRQ_RESERVED_A:
- Offset = 0x00a00;
- break;
- case PPC_IRQ_RESERVED_B:
- Offset = 0x00b00;
- break;
- case PPC_IRQ_SCALL:
- Offset = 0x00c00;
- break;
- case PPC_IRQ_TRACE:
- Offset = 0x00d00;
- break;
- case PPC_IRQ_FP_ASST:
- Offset = 0x00e00;
- break;
-
-#if defined(ppc403)
-
-/* PPC_IRQ_CRIT is the same vector as PPC_IRQ_RESET
- case PPC_IRQ_CRIT:
- Offset = 0x00100;
- break;
-*/
- case PPC_IRQ_PIT:
- Offset = 0x01000;
- break;
- case PPC_IRQ_FIT:
- Offset = 0x01010;
- break;
- case PPC_IRQ_WATCHDOG:
- Offset = 0x01020;
- break;
- case PPC_IRQ_DEBUG:
- Offset = 0x02000;
- break;
-
-#elif defined(ppc601)
- case PPC_IRQ_TRACE:
- Offset = 0x02000;
- break;
-
-#elif defined(ppc603)
- case PPC_IRQ_TRANS_MISS:
- Offset = 0x1000;
- break;
- case PPC_IRQ_DATA_LOAD:
- Offset = 0x1100;
- break;
- case PPC_IRQ_DATA_STORE:
- Offset = 0x1200;
- break;
- case PPC_IRQ_ADDR_BRK:
- Offset = 0x1300;
- break;
- case PPC_IRQ_SYS_MGT:
- Offset = 0x1400;
- break;
-
-#elif defined(ppc603e)
- case PPC_TLB_INST_MISS:
- Offset = 0x1000;
- break;
- case PPC_TLB_LOAD_MISS:
- Offset = 0x1100;
- break;
- case PPC_TLB_STORE_MISS:
- Offset = 0x1200;
- break;
- case PPC_IRQ_ADDRBRK:
- Offset = 0x1300;
- break;
- case PPC_IRQ_SYS_MGT:
- Offset = 0x1400;
- break;
-
-#elif defined(mpc604)
- case PPC_IRQ_ADDR_BRK:
- Offset = 0x1300;
- break;
- case PPC_IRQ_SYS_MGT:
- Offset = 0x1400;
- break;
-
-#elif defined(mpc860) || defined(mpc821)
- case PPC_IRQ_EMULATE:
- Offset = 0x1000;
- break;
- case PPC_IRQ_INST_MISS:
- Offset = 0x1100;
- break;
- case PPC_IRQ_DATA_MISS:
- Offset = 0x1200;
- break;
- case PPC_IRQ_INST_ERR:
- Offset = 0x1300;
- break;
- case PPC_IRQ_DATA_ERR:
- Offset = 0x1400;
- break;
- case PPC_IRQ_DATA_BPNT:
- Offset = 0x1c00;
- break;
- case PPC_IRQ_INST_BPNT:
- Offset = 0x1d00;
- break;
- case PPC_IRQ_IO_BPNT:
- Offset = 0x1e00;
- break;
- case PPC_IRQ_DEV_PORT:
- Offset = 0x1f00;
- break;
- case PPC_IRQ_IRQ0:
- Offset = 0x2000;
- break;
- case PPC_IRQ_LVL0:
- Offset = 0x2040;
- break;
- case PPC_IRQ_IRQ1:
- Offset = 0x2080;
- break;
- case PPC_IRQ_LVL1:
- Offset = 0x20c0;
- break;
- case PPC_IRQ_IRQ2:
- Offset = 0x2100;
- break;
- case PPC_IRQ_LVL2:
- Offset = 0x2140;
- break;
- case PPC_IRQ_IRQ3:
- Offset = 0x2180;
- break;
- case PPC_IRQ_LVL3:
- Offset = 0x21c0;
- break;
- case PPC_IRQ_IRQ4:
- Offset = 0x2200;
- break;
- case PPC_IRQ_LVL4:
- Offset = 0x2240;
- break;
- case PPC_IRQ_IRQ5:
- Offset = 0x2280;
- break;
- case PPC_IRQ_LVL5:
- Offset = 0x22c0;
- break;
- case PPC_IRQ_IRQ6:
- Offset = 0x2300;
- break;
- case PPC_IRQ_LVL6:
- Offset = 0x2340;
- break;
- case PPC_IRQ_IRQ7:
- Offset = 0x2380;
- break;
- case PPC_IRQ_LVL7:
- Offset = 0x23c0;
- break;
- case PPC_IRQ_CPM_RESERVED_0:
- Offset = 0x2400;
- break;
- case PPC_IRQ_CPM_PC4:
- Offset = 0x2410;
- break;
- case PPC_IRQ_CPM_PC5:
- Offset = 0x2420;
- break;
- case PPC_IRQ_CPM_SMC2:
- Offset = 0x2430;
- break;
- case PPC_IRQ_CPM_SMC1:
- Offset = 0x2440;
- break;
- case PPC_IRQ_CPM_SPI:
- Offset = 0x2450;
- break;
- case PPC_IRQ_CPM_PC6:
- Offset = 0x2460;
- break;
- case PPC_IRQ_CPM_TIMER4:
- Offset = 0x2470;
- break;
- case PPC_IRQ_CPM_RESERVED_8:
- Offset = 0x2480;
- break;
- case PPC_IRQ_CPM_PC7:
- Offset = 0x2490;
- break;
- case PPC_IRQ_CPM_PC8:
- Offset = 0x24a0;
- break;
- case PPC_IRQ_CPM_PC9:
- Offset = 0x24b0;
- break;
- case PPC_IRQ_CPM_TIMER3:
- Offset = 0x24c0;
- break;
- case PPC_IRQ_CPM_RESERVED_D:
- Offset = 0x24d0;
- break;
- case PPC_IRQ_CPM_PC10:
- Offset = 0x24e0;
- break;
- case PPC_IRQ_CPM_PC11:
- Offset = 0x24f0;
- break;
- case PPC_IRQ_CPM_I2C:
- Offset = 0x2500;
- break;
- case PPC_IRQ_CPM_RISC_TIMER:
- Offset = 0x2510;
- break;
- case PPC_IRQ_CPM_TIMER2:
- Offset = 0x2520;
- break;
- case PPC_IRQ_CPM_RESERVED_13:
- Offset = 0x2530;
- break;
- case PPC_IRQ_CPM_IDMA2:
- Offset = 0x2540;
- break;
- case PPC_IRQ_CPM_IDMA1:
- Offset = 0x2550;
- break;
- case PPC_IRQ_CPM_SDMA_ERROR:
- Offset = 0x2560;
- break;
- case PPC_IRQ_CPM_PC12:
- Offset = 0x2570;
- break;
- case PPC_IRQ_CPM_PC13:
- Offset = 0x2580;
- break;
- case PPC_IRQ_CPM_TIMER1:
- Offset = 0x2590;
- break;
- case PPC_IRQ_CPM_PC14:
- Offset = 0x25a0;
- break;
- case PPC_IRQ_CPM_SCC4:
- Offset = 0x25b0;
- break;
- case PPC_IRQ_CPM_SCC3:
- Offset = 0x25c0;
- break;
- case PPC_IRQ_CPM_SCC2:
- Offset = 0x25d0;
- break;
- case PPC_IRQ_CPM_SCC1:
- Offset = 0x25e0;
- break;
- case PPC_IRQ_CPM_PC15:
- Offset = 0x25f0;
- break;
-#endif
-
- }
- Top += Offset;
- return Top;
-}
-
diff --git a/c/src/lib/libbsp/powerpc/support/old_exception_processing/cpu.h b/c/src/lib/libbsp/powerpc/support/old_exception_processing/cpu.h
deleted file mode 100644
index 2a502d0745..0000000000
--- a/c/src/lib/libbsp/powerpc/support/old_exception_processing/cpu.h
+++ /dev/null
@@ -1,1200 +0,0 @@
-/* cpu.h
- *
- * This include file contains information pertaining to the PowerPC
- * processor.
- *
- * Author: Andrew Bray <andy@i-cubed.co.uk>
- *
- * COPYRIGHT (c) 1995 by i-cubed ltd.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of i-cubed limited not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * i-cubed limited makes no representations about the suitability
- * of this software for any purpose.
- *
- * Derived from c/src/exec/cpu/no_cpu/cpu.h:
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __CPU_h
-#define __CPU_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/ppc.h> /* pick up machine definitions */
-#ifndef ASM
-struct CPU_Interrupt_frame;
-typedef void ( *ppc_isr_entry )( int, struct CPU_Interrupt_frame * );
-
-#include <rtems/score/ppctypes.h>
-#endif
-
-/* conditional compilation parameters */
-
-/*
- * Should the calls to _Thread_Enable_dispatch be inlined?
- *
- * If TRUE, then they are inlined.
- * If FALSE, then a subroutine call is made.
- *
- * Basically this is an example of the classic trade-off of size
- * versus speed. Inlining the call (TRUE) typically increases the
- * size of RTEMS while speeding up the enabling of dispatching.
- * [NOTE: In general, the _Thread_Dispatch_disable_level will
- * only be 0 or 1 unless you are in an interrupt handler and that
- * interrupt handler invokes the executive.] When not inlined
- * something calls _Thread_Enable_dispatch which in turns calls
- * _Thread_Dispatch. If the enable dispatch is inlined, then
- * one subroutine call is avoided entirely.]
- */
-
-#define CPU_INLINE_ENABLE_DISPATCH FALSE
-
-/*
- * Should the body of the search loops in _Thread_queue_Enqueue_priority
- * be unrolled one time? In unrolled each iteration of the loop examines
- * two "nodes" on the chain being searched. Otherwise, only one node
- * is examined per iteration.
- *
- * If TRUE, then the loops are unrolled.
- * If FALSE, then the loops are not unrolled.
- *
- * The primary factor in making this decision is the cost of disabling
- * and enabling interrupts (_ISR_Flash) versus the cost of rest of the
- * body of the loop. On some CPUs, the flash is more expensive than
- * one iteration of the loop body. In this case, it might be desirable
- * to unroll the loop. It is important to note that on some CPUs, this
- * code is the longest interrupt disable period in RTEMS. So it is
- * necessary to strike a balance when setting this parameter.
- */
-
-#define CPU_UNROLL_ENQUEUE_PRIORITY FALSE
-
-/*
- * Does RTEMS manage a dedicated interrupt stack in software?
- *
- * If TRUE, then a stack is allocated in _Interrupt_Manager_initialization.
- * If FALSE, nothing is done.
- *
- * If the CPU supports a dedicated interrupt stack in hardware,
- * then it is generally the responsibility of the BSP to allocate it
- * and set it up.
- *
- * If the CPU does not support a dedicated interrupt stack, then
- * the porter has two options: (1) execute interrupts on the
- * stack of the interrupted task, and (2) have RTEMS manage a dedicated
- * interrupt stack.
- *
- * If this is TRUE, CPU_ALLOCATE_INTERRUPT_STACK should also be TRUE.
- *
- * Only one of CPU_HAS_SOFTWARE_INTERRUPT_STACK and
- * CPU_HAS_HARDWARE_INTERRUPT_STACK should be set to TRUE. It is
- * possible that both are FALSE for a particular CPU. Although it
- * is unclear what that would imply about the interrupt processing
- * procedure on that CPU.
- */
-
-#define CPU_HAS_SOFTWARE_INTERRUPT_STACK FALSE
-
-/*
- * Does this CPU have hardware support for a dedicated interrupt stack?
- *
- * If TRUE, then it must be installed during initialization.
- * If FALSE, then no installation is performed.
- *
- * If this is TRUE, CPU_ALLOCATE_INTERRUPT_STACK should also be TRUE.
- *
- * Only one of CPU_HAS_SOFTWARE_INTERRUPT_STACK and
- * CPU_HAS_HARDWARE_INTERRUPT_STACK should be set to TRUE. It is
- * possible that both are FALSE for a particular CPU. Although it
- * is unclear what that would imply about the interrupt processing
- * procedure on that CPU.
- */
-
-/*
- * ACB: This is a lie, but it gets us a handle on a call to set up
- * a variable derived from the top of the interrupt stack.
- */
-
-#define CPU_HAS_HARDWARE_INTERRUPT_STACK TRUE
-
-/*
- * Does RTEMS allocate a dedicated interrupt stack in the Interrupt Manager?
- *
- * If TRUE, then the memory is allocated during initialization.
- * If FALSE, then the memory is allocated during initialization.
- *
- * This should be TRUE is CPU_HAS_SOFTWARE_INTERRUPT_STACK is TRUE
- * or CPU_INSTALL_HARDWARE_INTERRUPT_STACK is TRUE.
- */
-
-#define CPU_ALLOCATE_INTERRUPT_STACK TRUE
-
-/*
- * Does the RTEMS invoke the user's ISR with the vector number and
- * a pointer to the saved interrupt frame (1) or just the vector
- * number (0)?
- */
-
-#define CPU_ISR_PASSES_FRAME_POINTER 1
-
-/*
- * Does the CPU have hardware floating point?
- *
- * If TRUE, then the RTEMS_FLOATING_POINT task attribute is supported.
- * If FALSE, then the RTEMS_FLOATING_POINT task attribute is ignored.
- *
- * If there is a FP coprocessor such as the i387 or mc68881, then
- * the answer is TRUE.
- *
- * The macro name "PPC_HAS_FPU" should be made CPU specific.
- * It indicates whether or not this CPU model has FP support. For
- * example, it would be possible to have an i386_nofp CPU model
- * which set this to false to indicate that you have an i386 without
- * an i387 and wish to leave floating point support out of RTEMS.
- */
-
-#if ( PPC_HAS_FPU == 1 )
-#define CPU_HARDWARE_FP TRUE
-#else
-#define CPU_HARDWARE_FP FALSE
-#endif
-
-/*
- * Are all tasks RTEMS_FLOATING_POINT tasks implicitly?
- *
- * If TRUE, then the RTEMS_FLOATING_POINT task attribute is assumed.
- * If FALSE, then the RTEMS_FLOATING_POINT task attribute is followed.
- *
- * So far, the only CPU in which this option has been used is the
- * HP PA-RISC. The HP C compiler and gcc both implicitly use the
- * floating point registers to perform integer multiplies. If
- * a function which you would not think utilize the FP unit DOES,
- * then one can not easily predict which tasks will use the FP hardware.
- * In this case, this option should be TRUE.
- *
- * If CPU_HARDWARE_FP is FALSE, then this should be FALSE as well.
- */
-
-#define CPU_ALL_TASKS_ARE_FP FALSE
-
-/*
- * Should the IDLE task have a floating point context?
- *
- * If TRUE, then the IDLE task is created as a RTEMS_FLOATING_POINT task
- * and it has a floating point context which is switched in and out.
- * If FALSE, then the IDLE task does not have a floating point context.
- *
- * Setting this to TRUE negatively impacts the time required to preempt
- * the IDLE task from an interrupt because the floating point context
- * must be saved as part of the preemption.
- */
-
-#define CPU_IDLE_TASK_IS_FP FALSE
-
-/*
- * Should the saving of the floating point registers be deferred
- * until a context switch is made to another different floating point
- * task?
- *
- * If TRUE, then the floating point context will not be stored until
- * necessary. It will remain in the floating point registers and not
- * disturned until another floating point task is switched to.
- *
- * If FALSE, then the floating point context is saved when a floating
- * point task is switched out and restored when the next floating point
- * task is restored. The state of the floating point registers between
- * those two operations is not specified.
- *
- * If the floating point context does NOT have to be saved as part of
- * interrupt dispatching, then it should be safe to set this to TRUE.
- *
- * Setting this flag to TRUE results in using a different algorithm
- * for deciding when to save and restore the floating point context.
- * The deferred FP switch algorithm minimizes the number of times
- * the FP context is saved and restored. The FP context is not saved
- * until a context switch is made to another, different FP task.
- * Thus in a system with only one FP task, the FP context will never
- * be saved or restored.
- */
-/*
- * ACB Note: This could make debugging tricky..
- */
-
-#define CPU_USE_DEFERRED_FP_SWITCH TRUE
-
-/*
- * Does this port provide a CPU dependent IDLE task implementation?
- *
- * If TRUE, then the routine _CPU_Thread_Idle_body
- * must be provided and is the default IDLE thread body instead of
- * _CPU_Thread_Idle_body.
- *
- * If FALSE, then use the generic IDLE thread body if the BSP does
- * not provide one.
- *
- * This is intended to allow for supporting processors which have
- * a low power or idle mode. When the IDLE thread is executed, then
- * the CPU can be powered down.
- *
- * The order of precedence for selecting the IDLE thread body is:
- *
- * 1. BSP provided
- * 2. CPU dependent (if provided)
- * 3. generic (if no BSP and no CPU dependent)
- */
-
-#define CPU_PROVIDES_IDLE_THREAD_BODY FALSE
-
-/*
- * Does the stack grow up (toward higher addresses) or down
- * (toward lower addresses)?
- *
- * If TRUE, then the grows upward.
- * If FALSE, then the grows toward smaller addresses.
- */
-
-#define CPU_STACK_GROWS_UP FALSE
-
-/*
- * The following is the variable attribute used to force alignment
- * of critical RTEMS structures. On some processors it may make
- * sense to have these aligned on tighter boundaries than
- * the minimum requirements of the compiler in order to have as
- * much of the critical data area as possible in a cache line.
- *
- * The placement of this macro in the declaration of the variables
- * is based on the syntactically requirements of the GNU C
- * "__attribute__" extension. For example with GNU C, use
- * the following to force a structures to a 32 byte boundary.
- *
- * __attribute__ ((aligned (32)))
- *
- * NOTE: Currently only the Priority Bit Map table uses this feature.
- * To benefit from using this, the data must be heavily
- * used so it will stay in the cache and used frequently enough
- * in the executive to justify turning this on.
- */
-
-#define CPU_STRUCTURE_ALIGNMENT \
- __attribute__ ((aligned (PPC_CACHE_ALIGNMENT)))
-
-/*
- * Define what is required to specify how the network to host conversion
- * routines are handled.
- */
-
-#define CPU_HAS_OWN_HOST_TO_NETWORK_ROUTINES FALSE
-#define CPU_BIG_ENDIAN TRUE
-#define CPU_LITTLE_ENDIAN FALSE
-
-/*
- * The following defines the number of bits actually used in the
- * interrupt field of the task mode. How those bits map to the
- * CPU interrupt levels is defined by the routine _CPU_ISR_Set_level().
- *
- * The interrupt level is bit mapped for the PowerPC family. The
- * bits are set to 0 to indicate that a particular exception source
- * enabled and 1 if it is disabled. This keeps with RTEMS convention
- * that interrupt level 0 means all sources are enabled.
- *
- * The bits are assigned to correspond to enable bits in the MSR.
- */
-
-#define PPC_INTERRUPT_LEVEL_ME 0x01
-#define PPC_INTERRUPT_LEVEL_EE 0x02
-#define PPC_INTERRUPT_LEVEL_CE 0x04
-
-/* XXX should these be maskable? */
-#if 0
-#define PPC_INTERRUPT_LEVEL_DE 0x08
-#define PPC_INTERRUPT_LEVEL_BE 0x10
-#define PPC_INTERRUPT_LEVEL_SE 0x20
-#endif
-
-#define CPU_MODES_INTERRUPT_MASK 0x00000007
-
-/*
- * Processor defined structures
- *
- * Examples structures include the descriptor tables from the i386
- * and the processor control structure on the i960ca.
- */
-
-/* may need to put some structures here. */
-
-/*
- * Contexts
- *
- * Generally there are 2 types of context to save.
- * 1. Interrupt registers to save
- * 2. Task level registers to save
- *
- * This means we have the following 3 context items:
- * 1. task level context stuff:: Context_Control
- * 2. floating point task stuff:: Context_Control_fp
- * 3. special interrupt level context :: Context_Control_interrupt
- *
- * On some processors, it is cost-effective to save only the callee
- * preserved registers during a task context switch. This means
- * that the ISR code needs to save those registers which do not
- * persist across function calls. It is not mandatory to make this
- * distinctions between the caller/callee saves registers for the
- * purpose of minimizing context saved during task switch and on interrupts.
- * If the cost of saving extra registers is minimal, simplicity is the
- * choice. Save the same context on interrupt entry as for tasks in
- * this case.
- *
- * Additionally, if gdb is to be made aware of RTEMS tasks for this CPU, then
- * care should be used in designing the context area.
- *
- * On some CPUs with hardware floating point support, the Context_Control_fp
- * structure will not be used or it simply consist of an array of a
- * fixed number of bytes. This is done when the floating point context
- * is dumped by a "FP save context" type instruction and the format
- * is not really defined by the CPU. In this case, there is no need
- * to figure out the exact format -- only the size. Of course, although
- * this is enough information for RTEMS, it is probably not enough for
- * a debugger such as gdb. But that is another problem.
- */
-
-typedef struct {
- unsigned32 gpr1; /* Stack pointer for all */
- unsigned32 gpr2; /* TOC in PowerOpen, reserved SVR4, section ptr EABI + */
- unsigned32 gpr13; /* First non volatile PowerOpen, section ptr SVR4/EABI */
- unsigned32 gpr14; /* Non volatile for all */
- unsigned32 gpr15; /* Non volatile for all */
- unsigned32 gpr16; /* Non volatile for all */
- unsigned32 gpr17; /* Non volatile for all */
- unsigned32 gpr18; /* Non volatile for all */
- unsigned32 gpr19; /* Non volatile for all */
- unsigned32 gpr20; /* Non volatile for all */
- unsigned32 gpr21; /* Non volatile for all */
- unsigned32 gpr22; /* Non volatile for all */
- unsigned32 gpr23; /* Non volatile for all */
- unsigned32 gpr24; /* Non volatile for all */
- unsigned32 gpr25; /* Non volatile for all */
- unsigned32 gpr26; /* Non volatile for all */
- unsigned32 gpr27; /* Non volatile for all */
- unsigned32 gpr28; /* Non volatile for all */
- unsigned32 gpr29; /* Non volatile for all */
- unsigned32 gpr30; /* Non volatile for all */
- unsigned32 gpr31; /* Non volatile for all */
- unsigned32 cr; /* PART of the CR is non volatile for all */
- unsigned32 pc; /* Program counter/Link register */
- unsigned32 msr; /* Initial interrupt level */
-} Context_Control;
-
-typedef struct {
- /* The ABIs (PowerOpen/SVR4/EABI) only require saving f14-f31 over
- * procedure calls. However, this would mean that the interrupt
- * frame had to hold f0-f13, and the fpscr. And as the majority
- * of tasks will not have an FP context, we will save the whole
- * context here.
- */
-#if (PPC_HAS_DOUBLE == 1)
- double f[32];
- double fpscr;
-#else
- float f[32];
- float fpscr;
-#endif
-} Context_Control_fp;
-
-typedef struct CPU_Interrupt_frame {
- unsigned32 stacklink; /* Ensure this is a real frame (also reg1 save) */
-#if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27)
- unsigned32 dummy[13]; /* Used by callees: PowerOpen ABI */
-#else
- unsigned32 dummy[1]; /* Used by callees: SVR4/EABI */
-#endif
- /* This is what is left out of the primary contexts */
- unsigned32 gpr0;
- unsigned32 gpr2; /* play safe */
- unsigned32 gpr3;
- unsigned32 gpr4;
- unsigned32 gpr5;
- unsigned32 gpr6;
- unsigned32 gpr7;
- unsigned32 gpr8;
- unsigned32 gpr9;
- unsigned32 gpr10;
- unsigned32 gpr11;
- unsigned32 gpr12;
- unsigned32 gpr13; /* Play safe */
- unsigned32 gpr28; /* For internal use by the IRQ handler */
- unsigned32 gpr29; /* For internal use by the IRQ handler */
- unsigned32 gpr30; /* For internal use by the IRQ handler */
- unsigned32 gpr31; /* For internal use by the IRQ handler */
- unsigned32 cr; /* Bits of this are volatile, so no-one may save */
- unsigned32 ctr;
- unsigned32 xer;
- unsigned32 lr;
- unsigned32 pc;
- unsigned32 msr;
- unsigned32 pad[3];
-} CPU_Interrupt_frame;
-
-
-/*
- * The following table contains the information required to configure
- * the PowerPC processor specific parameters.
- */
-
-typedef struct {
- void (*pretasking_hook)( void );
- void (*predriver_hook)( void );
- void (*postdriver_hook)( void );
- void (*idle_task)( void );
- boolean do_zero_of_workspace;
- unsigned32 idle_task_stack_size;
- unsigned32 interrupt_stack_size;
- unsigned32 extra_mpci_receive_server_stack;
- void * (*stack_allocate_hook)( unsigned32 );
- void (*stack_free_hook)( void* );
- /* end of fields required on all CPUs */
-
- unsigned32 clicks_per_usec; /* Timer clicks per microsecond */
- void (*spurious_handler)(unsigned32 vector, CPU_Interrupt_frame *);
- boolean exceptions_in_RAM; /* TRUE if in RAM */
-
-#if (defined(ppc403) || defined(mpc860) || defined(mpc821))
- unsigned32 serial_per_sec; /* Serial clocks per second */
- boolean serial_external_clock;
- boolean serial_xon_xoff;
- boolean serial_cts_rts;
- unsigned32 serial_rate;
- unsigned32 timer_average_overhead; /* Average overhead of timer in ticks */
- unsigned32 timer_least_valid; /* Least valid number from timer */
- boolean timer_internal_clock; /* TRUE, when timer runs with CPU clk */
-#endif
-
-#if (defined(mpc860) || defined(mpc821))
- unsigned32 clock_speed; /* Speed of CPU in Hz */
-#endif
-} rtems_cpu_table;
-
-/*
- * Macros to access required entires in the CPU Table are in
- * the file rtems/system.h.
- */
-
-/*
- * Macros to access PowerPC specific additions to the CPU Table
- */
-
-#define rtems_cpu_configuration_get_clicks_per_usec() \
- (_CPU_Table.clicks_per_usec)
-
-#define rtems_cpu_configuration_get_spurious_handler() \
- (_CPU_Table.spurious_handler)
-
-#define rtems_cpu_configuration_get_exceptions_in_ram() \
- (_CPU_Table.exceptions_in_RAM)
-
-#if (defined(ppc403) || defined(mpc860) || defined(mpc821))
-
-#define rtems_cpu_configuration_get_serial_per_sec() \
- (_CPU_Table.serial_per_sec)
-
-#define rtems_cpu_configuration_get_serial_external_clock() \
- (_CPU_Table.serial_external_clock)
-
-#define rtems_cpu_configuration_get_serial_xon_xoff() \
- (_CPU_Table.serial_xon_xoff)
-
-#define rtems_cpu_configuration_get_serial_cts_rts() \
- (_CPU_Table.serial_cts_rts)
-
-#define rtems_cpu_configuration_get_serial_rate() \
- (_CPU_Table.serial_rate)
-
-#define rtems_cpu_configuration_get_timer_average_overhead() \
- (_CPU_Table.timer_average_overhead)
-
-#define rtems_cpu_configuration_get_timer_least_valid() \
- (_CPU_Table.timer_least_valid)
-
-#define rtems_cpu_configuration_get_timer_internal_clock() \
- (_CPU_Table.timer_internal_clock)
-
-#endif
-
-#if (defined(mpc860) || defined(mpc821))
-#define rtems_cpu_configuration_get_clock_speed() \
- (_CPU_Table.clock_speed)
-#endif
-
-
-/*
- * The following type defines an entry in the PPC's trap table.
- *
- * NOTE: The instructions chosen are RTEMS dependent although one is
- * obligated to use two of the four instructions to perform a
- * long jump. The other instructions load one register with the
- * trap type (a.k.a. vector) and another with the psr.
- */
-
-typedef struct {
- unsigned32 stwu_r1; /* stwu %r1, -(??+IP_END)(%1)*/
- unsigned32 stw_r0; /* stw %r0, IP_0(%r1) */
- unsigned32 li_r0_IRQ; /* li %r0, _IRQ */
- unsigned32 b_Handler; /* b PROC (_ISR_Handler) */
-} CPU_Trap_table_entry;
-
-/*
- * This variable is optional. It is used on CPUs on which it is difficult
- * to generate an "uninitialized" FP context. It is filled in by
- * _CPU_Initialize and copied into the task's FP context area during
- * _CPU_Context_Initialize.
- */
-
-/* EXTERN Context_Control_fp _CPU_Null_fp_context; */
-
-/*
- * On some CPUs, RTEMS supports a software managed interrupt stack.
- * This stack is allocated by the Interrupt Manager and the switch
- * is performed in _ISR_Handler. These variables contain pointers
- * to the lowest and highest addresses in the chunk of memory allocated
- * for the interrupt stack. Since it is unknown whether the stack
- * grows up or down (in general), this give the CPU dependent
- * code the option of picking the version it wants to use.
- *
- * NOTE: These two variables are required if the macro
- * CPU_HAS_SOFTWARE_INTERRUPT_STACK is defined as TRUE.
- */
-
-SCORE_EXTERN void *_CPU_Interrupt_stack_low;
-SCORE_EXTERN void *_CPU_Interrupt_stack_high;
-
-/*
- * With some compilation systems, it is difficult if not impossible to
- * call a high-level language routine from assembly language. This
- * is especially true of commercial Ada compilers and name mangling
- * C++ ones. This variable can be optionally defined by the CPU porter
- * and contains the address of the routine _Thread_Dispatch. This
- * can make it easier to invoke that routine at the end of the interrupt
- * sequence (if a dispatch is necessary).
- */
-
-/* EXTERN void (*_CPU_Thread_dispatch_pointer)(); */
-
-/*
- * Nothing prevents the porter from declaring more CPU specific variables.
- */
-
-
-SCORE_EXTERN struct {
- unsigned32 *Nest_level;
- unsigned32 *Disable_level;
- void *Vector_table;
- void *Stack;
-#if (PPC_ABI == PPC_ABI_POWEROPEN)
- unsigned32 Dispatch_r2;
-#else
- unsigned32 Default_r2;
-#if (PPC_ABI != PPC_ABI_GCC27)
- unsigned32 Default_r13;
-#endif
-#endif
- volatile boolean *Switch_necessary;
- boolean *Signal;
-
- unsigned32 msr_initial;
-} _CPU_IRQ_info CPU_STRUCTURE_ALIGNMENT;
-
-/*
- * The size of the floating point context area. On some CPUs this
- * will not be a "sizeof" because the format of the floating point
- * area is not defined -- only the size is. This is usually on
- * CPUs with a "floating point save context" instruction.
- */
-
-#define CPU_CONTEXT_FP_SIZE sizeof( Context_Control_fp )
-
-/*
- * (Optional) # of bytes for libmisc/stackchk to check
- * If not specifed, then it defaults to something reasonable
- * for most architectures.
- */
-
-#define CPU_STACK_CHECK_SIZE (128)
-
-/*
- * Amount of extra stack (above minimum stack size) required by
- * MPCI receive server thread. Remember that in a multiprocessor
- * system this thread must exist and be able to process all directives.
- */
-
-#define CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK 0
-
-/*
- * This defines the number of entries in the ISR_Vector_table managed
- * by RTEMS.
- */
-
-#define CPU_INTERRUPT_NUMBER_OF_VECTORS (PPC_INTERRUPT_MAX)
-#define CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER (PPC_INTERRUPT_MAX - 1)
-
-/*
- * Should be large enough to run all RTEMS tests. This insures
- * that a "reasonable" small application should not have any problems.
- */
-
-#define CPU_STACK_MINIMUM_SIZE (1024*8)
-
-/*
- * CPU's worst alignment requirement for data types on a byte boundary. This
- * alignment does not take into account the requirements for the stack.
- */
-
-#define CPU_ALIGNMENT (PPC_ALIGNMENT)
-
-/*
- * This number corresponds to the byte alignment requirement for the
- * heap handler. This alignment requirement may be stricter than that
- * for the data types alignment specified by CPU_ALIGNMENT. It is
- * common for the heap to follow the same alignment requirement as
- * CPU_ALIGNMENT. If the CPU_ALIGNMENT is strict enough for the heap,
- * then this should be set to CPU_ALIGNMENT.
- *
- * NOTE: This does not have to be a power of 2. It does have to
- * be greater or equal to than CPU_ALIGNMENT.
- */
-
-#define CPU_HEAP_ALIGNMENT (PPC_ALIGNMENT)
-
-/*
- * This number corresponds to the byte alignment requirement for memory
- * buffers allocated by the partition manager. This alignment requirement
- * may be stricter than that for the data types alignment specified by
- * CPU_ALIGNMENT. It is common for the partition to follow the same
- * alignment requirement as CPU_ALIGNMENT. If the CPU_ALIGNMENT is strict
- * enough for the partition, then this should be set to CPU_ALIGNMENT.
- *
- * NOTE: This does not have to be a power of 2. It does have to
- * be greater or equal to than CPU_ALIGNMENT.
- */
-
-#define CPU_PARTITION_ALIGNMENT (PPC_ALIGNMENT)
-
-/*
- * This number corresponds to the byte alignment requirement for the
- * stack. This alignment requirement may be stricter than that for the
- * data types alignment specified by CPU_ALIGNMENT. If the CPU_ALIGNMENT
- * is strict enough for the stack, then this should be set to 0.
- *
- * NOTE: This must be a power of 2 either 0 or greater than CPU_ALIGNMENT.
- */
-
-#define CPU_STACK_ALIGNMENT (PPC_STACK_ALIGNMENT)
-
-/* ISR handler macros */
-
-/*
- * Disable all interrupts for an RTEMS critical section. The previous
- * level is returned in _isr_cookie.
- */
-
-#define loc_string(a,b) a " (" #b ")\n"
-
-#define _CPU_MSR_Value( _msr_value ) \
- do { \
- _msr_value = 0; \
- asm volatile ("mfmsr %0" : "=&r" ((_msr_value)) : "0" ((_msr_value))); \
- } while (0)
-
-#define _CPU_MSR_SET( _msr_value ) \
-{ asm volatile ("mtmsr %0" : "=&r" ((_msr_value)) : "0" ((_msr_value))); }
-
-#if 0
-#define _CPU_ISR_Disable( _isr_cookie ) \
- { register unsigned int _disable_mask = PPC_MSR_DISABLE_MASK; \
- _isr_cookie = 0; \
- asm volatile (
- "mfmsr %0" : \
- "=r" ((_isr_cookie)) : \
- "0" ((_isr_cookie)) \
- ); \
- asm volatile (
- "andc %1,%0,%1" : \
- "=r" ((_isr_cookie)), "=&r" ((_disable_mask)) : \
- "0" ((_isr_cookie)), "1" ((_disable_mask)) \
- ); \
- asm volatile (
- "mtmsr %1" : \
- "=r" ((_disable_mask)) : \
- "0" ((_disable_mask)) \
- ); \
- }
-#endif
-
-#define _CPU_ISR_Disable( _isr_cookie ) \
- { register unsigned int _disable_mask = PPC_MSR_DISABLE_MASK; \
- _isr_cookie = 0; \
- asm volatile ( \
- "mfmsr %0; andc %1,%0,%1; mtmsr %1" : \
- "=&r" ((_isr_cookie)), "=&r" ((_disable_mask)) : \
- "0" ((_isr_cookie)), "1" ((_disable_mask)) \
- ); \
- }
-
-
-#define _CPU_Data_Cache_Block_Flush( _address ) \
- do { register void *__address = (_address); \
- register unsigned32 _zero = 0; \
- asm volatile ( "dcbf %0,%1" : \
- "=r" (_zero), "=r" (__address) : \
- "0" (_zero), "1" (__address) \
- ); \
- } while (0)
-
-
-/*
- * Enable interrupts to the previous level (returned by _CPU_ISR_Disable).
- * This indicates the end of an RTEMS critical section. The parameter
- * _isr_cookie is not modified.
- */
-
-#define _CPU_ISR_Enable( _isr_cookie ) \
- { \
- asm volatile ( "mtmsr %0" : \
- "=r" ((_isr_cookie)) : \
- "0" ((_isr_cookie))); \
- }
-
-/*
- * This temporarily restores the interrupt to _isr_cookie before immediately
- * disabling them again. This is used to divide long RTEMS critical
- * sections into two or more parts. The parameter _isr_cookie is not
- * modified.
- *
- * NOTE: The version being used is not very optimized but it does
- * not trip a problem in gcc where the disable mask does not
- * get loaded. Check this for future (post 10/97 gcc versions.
- */
-
-#define _CPU_ISR_Flash( _isr_cookie ) \
- { register unsigned int _disable_mask = PPC_MSR_DISABLE_MASK; \
- asm volatile ( \
- "mtmsr %0; andc %1,%0,%1; mtmsr %1" : \
- "=r" ((_isr_cookie)), "=r" ((_disable_mask)) : \
- "0" ((_isr_cookie)), "1" ((_disable_mask)) \
- ); \
- }
-
-/*
- * Map interrupt level in task mode onto the hardware that the CPU
- * actually provides. Currently, interrupt levels which do not
- * map onto the CPU in a generic fashion are undefined. Someday,
- * it would be nice if these were "mapped" by the application
- * via a callout. For example, m68k has 8 levels 0 - 7, levels
- * 8 - 255 would be available for bsp/application specific meaning.
- * This could be used to manage a programmable interrupt controller
- * via the rtems_task_mode directive.
- */
-
-unsigned32 _CPU_ISR_Calculate_level(
- unsigned32 new_level
-);
-
-void _CPU_ISR_Set_level(
- unsigned32 new_level
-);
-
-unsigned32 _CPU_ISR_Get_level( void );
-
-void _CPU_ISR_install_raw_handler(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-);
-
-/* end of ISR handler macros */
-
-/*
- * Simple spin delay in microsecond units for device drivers.
- * This is very dependent on the clock speed of the target.
- */
-
-#define CPU_Get_timebase_low( _value ) \
- asm volatile( "mftb %0" : "=r" (_value) )
-
-#define delay( _microseconds ) \
- do { \
- unsigned32 start, ticks, now; \
- CPU_Get_timebase_low( start ) ; \
- ticks = (_microseconds) * _CPU_Table.clicks_per_usec; \
- do \
- CPU_Get_timebase_low( now ) ; \
- while (now - start < ticks); \
- } while (0)
-
-#define delay_in_bus_cycles( _cycles ) \
- do { \
- unsigned32 start, now; \
- CPU_Get_timebase_low( start ); \
- do \
- CPU_Get_timebase_low( now ); \
- while (now - start < (_cycles)); \
- } while (0)
-
-
-
-/* Context handler macros */
-
-/*
- * Initialize the context to a state suitable for starting a
- * task after a context restore operation. Generally, this
- * involves:
- *
- * - setting a starting address
- * - preparing the stack
- * - preparing the stack and frame pointers
- * - setting the proper interrupt level in the context
- * - initializing the floating point context
- *
- * This routine generally does not set any unnecessary register
- * in the context. The state of the "general data" registers is
- * undefined at task start time.
- *
- * NOTE: Implemented as a subroutine for the SPARC port.
- */
-
-void _CPU_Context_Initialize(
- Context_Control *the_context,
- unsigned32 *stack_base,
- unsigned32 size,
- unsigned32 new_level,
- void *entry_point,
- boolean is_fp
-);
-
-/*
- * This routine is responsible for somehow restarting the currently
- * executing task. If you are lucky, then all that is necessary
- * is restoring the context. Otherwise, there will need to be
- * a special assembly routine which does something special in this
- * case. Context_Restore should work most of the time. It will
- * not work if restarting self conflicts with the stack frame
- * assumptions of restoring a context.
- */
-
-#define _CPU_Context_Restart_self( _the_context ) \
- _CPU_Context_restore( (_the_context) );
-
-/*
- * The purpose of this macro is to allow the initial pointer into
- * a floating point context area (used to save the floating point
- * context) to be at an arbitrary place in the floating point
- * context area.
- *
- * This is necessary because some FP units are designed to have
- * their context saved as a stack which grows into lower addresses.
- * Other FP units can be saved by simply moving registers into offsets
- * from the base of the context area. Finally some FP units provide
- * a "dump context" instruction which could fill in from high to low
- * or low to high based on the whim of the CPU designers.
- */
-
-#define _CPU_Context_Fp_start( _base, _offset ) \
- ( (void *) _Addresses_Add_offset( (_base), (_offset) ) )
-
-/*
- * This routine initializes the FP context area passed to it to.
- * There are a few standard ways in which to initialize the
- * floating point context. The code included for this macro assumes
- * that this is a CPU in which a "initial" FP context was saved into
- * _CPU_Null_fp_context and it simply copies it to the destination
- * context passed to it.
- *
- * Other models include (1) not doing anything, and (2) putting
- * a "null FP status word" in the correct place in the FP context.
- */
-
-#define _CPU_Context_Initialize_fp( _destination ) \
- { \
- ((Context_Control_fp *) *((void **) _destination))->fpscr = PPC_INIT_FPSCR; \
- }
-
-/* end of Context handler macros */
-
-/* Fatal Error manager macros */
-
-/*
- * This routine copies _error into a known place -- typically a stack
- * location or a register, optionally disables interrupts, and
- * halts/stops the CPU.
- */
-
-#define _CPU_Fatal_halt( _error ) \
- _CPU_Fatal_error(_error)
-
-/* end of Fatal Error manager macros */
-
-/* Bitfield handler macros */
-
-/*
- * This routine sets _output to the bit number of the first bit
- * set in _value. _value is of CPU dependent type Priority_Bit_map_control.
- * This type may be either 16 or 32 bits wide although only the 16
- * least significant bits will be used.
- *
- * There are a number of variables in using a "find first bit" type
- * instruction.
- *
- * (1) What happens when run on a value of zero?
- * (2) Bits may be numbered from MSB to LSB or vice-versa.
- * (3) The numbering may be zero or one based.
- * (4) The "find first bit" instruction may search from MSB or LSB.
- *
- * RTEMS guarantees that (1) will never happen so it is not a concern.
- * (2),(3), (4) are handled by the macros _CPU_Priority_mask() and
- * _CPU_Priority_Bits_index(). These three form a set of routines
- * which must logically operate together. Bits in the _value are
- * set and cleared based on masks built by _CPU_Priority_mask().
- * The basic major and minor values calculated by _Priority_Major()
- * and _Priority_Minor() are "massaged" by _CPU_Priority_Bits_index()
- * to properly range between the values returned by the "find first bit"
- * instruction. This makes it possible for _Priority_Get_highest() to
- * calculate the major and directly index into the minor table.
- * This mapping is necessary to ensure that 0 (a high priority major/minor)
- * is the first bit found.
- *
- * This entire "find first bit" and mapping process depends heavily
- * on the manner in which a priority is broken into a major and minor
- * components with the major being the 4 MSB of a priority and minor
- * the 4 LSB. Thus (0 << 4) + 0 corresponds to priority 0 -- the highest
- * priority. And (15 << 4) + 14 corresponds to priority 254 -- the next
- * to the lowest priority.
- *
- * If your CPU does not have a "find first bit" instruction, then
- * there are ways to make do without it. Here are a handful of ways
- * to implement this in software:
- *
- * - a series of 16 bit test instructions
- * - a "binary search using if's"
- * - _number = 0
- * if _value > 0x00ff
- * _value >>=8
- * _number = 8;
- *
- * if _value > 0x0000f
- * _value >=8
- * _number += 4
- *
- * _number += bit_set_table[ _value ]
- *
- * where bit_set_table[ 16 ] has values which indicate the first
- * bit set
- */
-
-#define _CPU_Bitfield_Find_first_bit( _value, _output ) \
- { \
- asm volatile ("cntlzw %0, %1" : "=r" ((_output)), "=r" ((_value)) : \
- "1" ((_value))); \
- }
-
-/* end of Bitfield handler macros */
-
-/*
- * This routine builds the mask which corresponds to the bit fields
- * as searched by _CPU_Bitfield_Find_first_bit(). See the discussion
- * for that routine.
- */
-
-#define _CPU_Priority_Mask( _bit_number ) \
- ( 0x80000000 >> (_bit_number) )
-
-/*
- * This routine translates the bit numbers returned by
- * _CPU_Bitfield_Find_first_bit() into something suitable for use as
- * a major or minor component of a priority. See the discussion
- * for that routine.
- */
-
-#define _CPU_Priority_bits_index( _priority ) \
- (_priority)
-
-/* end of Priority handler macros */
-
-/* variables */
-
-extern const unsigned32 _CPU_msrs[4];
-
-/* functions */
-
-/*
- * _CPU_Initialize
- *
- * This routine performs CPU dependent initialization.
- */
-
-void _CPU_Initialize(
- rtems_cpu_table *cpu_table,
- void (*thread_dispatch)
-);
-
-/*
- * _CPU_ISR_install_vector
- *
- * This routine installs an interrupt vector.
- */
-
-void _CPU_ISR_install_vector(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-);
-
-/*
- * _CPU_Install_interrupt_stack
- *
- * This routine installs the hardware interrupt stack pointer.
- *
- * NOTE: It need only be provided if CPU_HAS_HARDWARE_INTERRUPT_STACK
- * is TRUE.
- */
-
-void _CPU_Install_interrupt_stack( void );
-
-/*
- * _CPU_Context_switch
- *
- * This routine switches from the run context to the heir context.
- */
-
-void _CPU_Context_switch(
- Context_Control *run,
- Context_Control *heir
-);
-
-/*
- * _CPU_Context_restore
- *
- * This routine is generallu used only to restart self in an
- * efficient manner. It may simply be a label in _CPU_Context_switch.
- *
- * NOTE: May be unnecessary to reload some registers.
- */
-
-void _CPU_Context_restore(
- Context_Control *new_context
-);
-
-/*
- * _CPU_Context_save_fp
- *
- * This routine saves the floating point context passed to it.
- */
-
-void _CPU_Context_save_fp(
- void **fp_context_ptr
-);
-
-/*
- * _CPU_Context_restore_fp
- *
- * This routine restores the floating point context passed to it.
- */
-
-void _CPU_Context_restore_fp(
- void **fp_context_ptr
-);
-
-void _CPU_Fatal_error(
- unsigned32 _error
-);
-
-/* The following routine swaps the endian format of an unsigned int.
- * It must be static because it is referenced indirectly.
- *
- * This version will work on any processor, but if there is a better
- * way for your CPU PLEASE use it. The most common way to do this is to:
- *
- * swap least significant two bytes with 16-bit rotate
- * swap upper and lower 16-bits
- * swap most significant two bytes with 16-bit rotate
- *
- * Some CPUs have special instructions which swap a 32-bit quantity in
- * a single instruction (e.g. i486). It is probably best to avoid
- * an "endian swapping control bit" in the CPU. One good reason is
- * that interrupts would probably have to be disabled to insure that
- * an interrupt does not try to access the same "chunk" with the wrong
- * endian. Another good reason is that on some CPUs, the endian bit
- * endianness for ALL fetches -- both code and data -- so the code
- * will be fetched incorrectly.
- */
-
-static inline unsigned int CPU_swap_u32(
- unsigned int value
-)
-{
- unsigned32 swapped;
-
- asm volatile("rlwimi %0,%1,8,24,31;"
- "rlwimi %0,%1,24,16,23;"
- "rlwimi %0,%1,8,8,15;"
- "rlwimi %0,%1,24,0,7;" :
- "=&r" ((swapped)) : "r" ((value)));
-
- return( swapped );
-}
-
-#define CPU_swap_u16( value ) \
- (((value&0xff) << 8) | ((value >> 8)&0xff))
-
-/*
- * Routines to access the decrementer register
- */
-
-#define PPC_Set_decrementer( _clicks ) \
- do { \
- asm volatile( "mtdec %0" : "=r" ((_clicks)) : "r" ((_clicks)) ); \
- } while (0)
-
-/*
- * Routines to access the time base register
- */
-
-static inline unsigned64 PPC_Get_timebase_register( void )
-{
- unsigned32 tbr_low;
- unsigned32 tbr_high;
- unsigned32 tbr_high_old;
- unsigned64 tbr;
-
- do {
- asm volatile( "mftbu %0" : "=r" (tbr_high_old));
- asm volatile( "mftb %0" : "=r" (tbr_low));
- asm volatile( "mftbu %0" : "=r" (tbr_high));
- } while ( tbr_high_old != tbr_high );
-
- tbr = tbr_high;
- tbr <<= 32;
- tbr |= tbr_low;
- return tbr;
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/c/src/lib/libbsp/powerpc/support/old_exception_processing/cpu_asm.S b/c/src/lib/libbsp/powerpc/support/old_exception_processing/cpu_asm.S
deleted file mode 100644
index a377fa5d2a..0000000000
--- a/c/src/lib/libbsp/powerpc/support/old_exception_processing/cpu_asm.S
+++ /dev/null
@@ -1,809 +0,0 @@
-
-/* cpu_asm.s 1.1 - 95/12/04
- *
- * This file contains the assembly code for the PowerPC implementation
- * of RTEMS.
- *
- * Author: Andrew Bray <andy@i-cubed.co.uk>
- *
- * COPYRIGHT (c) 1995 by i-cubed ltd.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of i-cubed limited not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * i-cubed limited makes no representations about the suitability
- * of this software for any purpose.
- *
- * Derived from c/src/exec/cpu/no_cpu/cpu_asm.c:
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <asm.h>
-
-/*
- * Offsets for various Contexts
- */
- .set GP_1, 0
- .set GP_2, (GP_1 + 4)
- .set GP_13, (GP_2 + 4)
- .set GP_14, (GP_13 + 4)
-
- .set GP_15, (GP_14 + 4)
- .set GP_16, (GP_15 + 4)
- .set GP_17, (GP_16 + 4)
- .set GP_18, (GP_17 + 4)
-
- .set GP_19, (GP_18 + 4)
- .set GP_20, (GP_19 + 4)
- .set GP_21, (GP_20 + 4)
- .set GP_22, (GP_21 + 4)
-
- .set GP_23, (GP_22 + 4)
- .set GP_24, (GP_23 + 4)
- .set GP_25, (GP_24 + 4)
- .set GP_26, (GP_25 + 4)
-
- .set GP_27, (GP_26 + 4)
- .set GP_28, (GP_27 + 4)
- .set GP_29, (GP_28 + 4)
- .set GP_30, (GP_29 + 4)
-
- .set GP_31, (GP_30 + 4)
- .set GP_CR, (GP_31 + 4)
- .set GP_PC, (GP_CR + 4)
- .set GP_MSR, (GP_PC + 4)
-
-#if (PPC_HAS_DOUBLE == 1)
- .set FP_0, 0
- .set FP_1, (FP_0 + 8)
- .set FP_2, (FP_1 + 8)
- .set FP_3, (FP_2 + 8)
- .set FP_4, (FP_3 + 8)
- .set FP_5, (FP_4 + 8)
- .set FP_6, (FP_5 + 8)
- .set FP_7, (FP_6 + 8)
- .set FP_8, (FP_7 + 8)
- .set FP_9, (FP_8 + 8)
- .set FP_10, (FP_9 + 8)
- .set FP_11, (FP_10 + 8)
- .set FP_12, (FP_11 + 8)
- .set FP_13, (FP_12 + 8)
- .set FP_14, (FP_13 + 8)
- .set FP_15, (FP_14 + 8)
- .set FP_16, (FP_15 + 8)
- .set FP_17, (FP_16 + 8)
- .set FP_18, (FP_17 + 8)
- .set FP_19, (FP_18 + 8)
- .set FP_20, (FP_19 + 8)
- .set FP_21, (FP_20 + 8)
- .set FP_22, (FP_21 + 8)
- .set FP_23, (FP_22 + 8)
- .set FP_24, (FP_23 + 8)
- .set FP_25, (FP_24 + 8)
- .set FP_26, (FP_25 + 8)
- .set FP_27, (FP_26 + 8)
- .set FP_28, (FP_27 + 8)
- .set FP_29, (FP_28 + 8)
- .set FP_30, (FP_29 + 8)
- .set FP_31, (FP_30 + 8)
- .set FP_FPSCR, (FP_31 + 8)
-#else
- .set FP_0, 0
- .set FP_1, (FP_0 + 4)
- .set FP_2, (FP_1 + 4)
- .set FP_3, (FP_2 + 4)
- .set FP_4, (FP_3 + 4)
- .set FP_5, (FP_4 + 4)
- .set FP_6, (FP_5 + 4)
- .set FP_7, (FP_6 + 4)
- .set FP_8, (FP_7 + 4)
- .set FP_9, (FP_8 + 4)
- .set FP_10, (FP_9 + 4)
- .set FP_11, (FP_10 + 4)
- .set FP_12, (FP_11 + 4)
- .set FP_13, (FP_12 + 4)
- .set FP_14, (FP_13 + 4)
- .set FP_15, (FP_14 + 4)
- .set FP_16, (FP_15 + 4)
- .set FP_17, (FP_16 + 4)
- .set FP_18, (FP_17 + 4)
- .set FP_19, (FP_18 + 4)
- .set FP_20, (FP_19 + 4)
- .set FP_21, (FP_20 + 4)
- .set FP_22, (FP_21 + 4)
- .set FP_23, (FP_22 + 4)
- .set FP_24, (FP_23 + 4)
- .set FP_25, (FP_24 + 4)
- .set FP_26, (FP_25 + 4)
- .set FP_27, (FP_26 + 4)
- .set FP_28, (FP_27 + 4)
- .set FP_29, (FP_28 + 4)
- .set FP_30, (FP_29 + 4)
- .set FP_31, (FP_30 + 4)
- .set FP_FPSCR, (FP_31 + 4)
-#endif
-
- .set IP_LINK, 0
-#if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27)
- .set IP_0, (IP_LINK + 56)
-#else
- .set IP_0, (IP_LINK + 8)
-#endif
- .set IP_2, (IP_0 + 4)
-
- .set IP_3, (IP_2 + 4)
- .set IP_4, (IP_3 + 4)
- .set IP_5, (IP_4 + 4)
- .set IP_6, (IP_5 + 4)
-
- .set IP_7, (IP_6 + 4)
- .set IP_8, (IP_7 + 4)
- .set IP_9, (IP_8 + 4)
- .set IP_10, (IP_9 + 4)
-
- .set IP_11, (IP_10 + 4)
- .set IP_12, (IP_11 + 4)
- .set IP_13, (IP_12 + 4)
- .set IP_28, (IP_13 + 4)
-
- .set IP_29, (IP_28 + 4)
- .set IP_30, (IP_29 + 4)
- .set IP_31, (IP_30 + 4)
- .set IP_CR, (IP_31 + 4)
-
- .set IP_CTR, (IP_CR + 4)
- .set IP_XER, (IP_CTR + 4)
- .set IP_LR, (IP_XER + 4)
- .set IP_PC, (IP_LR + 4)
-
- .set IP_MSR, (IP_PC + 4)
- .set IP_END, (IP_MSR + 16)
-
- /* _CPU_IRQ_info offsets */
-
- /* These must be in this order */
- .set Nest_level, 0
- .set Disable_level, 4
- .set Vector_table, 8
- .set Stack, 12
-#if (PPC_ABI == PPC_ABI_POWEROPEN)
- .set Dispatch_r2, 16
- .set Switch_necessary, 20
-#else
- .set Default_r2, 16
-#if (PPC_ABI != PPC_ABI_GCC27)
- .set Default_r13, 20
- .set Switch_necessary, 24
-#else
- .set Switch_necessary, 20
-#endif
-#endif
- .set Signal, Switch_necessary + 4
- .set msr_initial, Signal + 4
-
- BEGIN_CODE
-/*
- * _CPU_Context_save_fp_context
- *
- * This routine is responsible for saving the FP context
- * at *fp_context_ptr. If the point to load the FP context
- * from is changed then the pointer is modified by this routine.
- *
- * Sometimes a macro implementation of this is in cpu.h which dereferences
- * the ** and a similarly named routine in this file is passed something
- * like a (Context_Control_fp *). The general rule on making this decision
- * is to avoid writing assembly language.
- */
-
- ALIGN (PPC_CACHE_ALIGNMENT, PPC_CACHE_ALIGN_POWER)
- PUBLIC_PROC (_CPU_Context_save_fp)
-PROC (_CPU_Context_save_fp):
-#if (PPC_HAS_FPU == 1)
- lwz r3, 0(r3)
-#if (PPC_HAS_DOUBLE == 1)
- stfd f0, FP_0(r3)
- stfd f1, FP_1(r3)
- stfd f2, FP_2(r3)
- stfd f3, FP_3(r3)
- stfd f4, FP_4(r3)
- stfd f5, FP_5(r3)
- stfd f6, FP_6(r3)
- stfd f7, FP_7(r3)
- stfd f8, FP_8(r3)
- stfd f9, FP_9(r3)
- stfd f10, FP_10(r3)
- stfd f11, FP_11(r3)
- stfd f12, FP_12(r3)
- stfd f13, FP_13(r3)
- stfd f14, FP_14(r3)
- stfd f15, FP_15(r3)
- stfd f16, FP_16(r3)
- stfd f17, FP_17(r3)
- stfd f18, FP_18(r3)
- stfd f19, FP_19(r3)
- stfd f20, FP_20(r3)
- stfd f21, FP_21(r3)
- stfd f22, FP_22(r3)
- stfd f23, FP_23(r3)
- stfd f24, FP_24(r3)
- stfd f25, FP_25(r3)
- stfd f26, FP_26(r3)
- stfd f27, FP_27(r3)
- stfd f28, FP_28(r3)
- stfd f29, FP_29(r3)
- stfd f30, FP_30(r3)
- stfd f31, FP_31(r3)
- mffs f2
- stfd f2, FP_FPSCR(r3)
-#else
- stfs f0, FP_0(r3)
- stfs f1, FP_1(r3)
- stfs f2, FP_2(r3)
- stfs f3, FP_3(r3)
- stfs f4, FP_4(r3)
- stfs f5, FP_5(r3)
- stfs f6, FP_6(r3)
- stfs f7, FP_7(r3)
- stfs f8, FP_8(r3)
- stfs f9, FP_9(r3)
- stfs f10, FP_10(r3)
- stfs f11, FP_11(r3)
- stfs f12, FP_12(r3)
- stfs f13, FP_13(r3)
- stfs f14, FP_14(r3)
- stfs f15, FP_15(r3)
- stfs f16, FP_16(r3)
- stfs f17, FP_17(r3)
- stfs f18, FP_18(r3)
- stfs f19, FP_19(r3)
- stfs f20, FP_20(r3)
- stfs f21, FP_21(r3)
- stfs f22, FP_22(r3)
- stfs f23, FP_23(r3)
- stfs f24, FP_24(r3)
- stfs f25, FP_25(r3)
- stfs f26, FP_26(r3)
- stfs f27, FP_27(r3)
- stfs f28, FP_28(r3)
- stfs f29, FP_29(r3)
- stfs f30, FP_30(r3)
- stfs f31, FP_31(r3)
- mffs f2
- stfs f2, FP_FPSCR(r3)
-#endif
-#endif
- blr
-
-/*
- * _CPU_Context_restore_fp_context
- *
- * This routine is responsible for restoring the FP context
- * at *fp_context_ptr. If the point to load the FP context
- * from is changed then the pointer is modified by this routine.
- *
- * Sometimes a macro implementation of this is in cpu.h which dereferences
- * the ** and a similarly named routine in this file is passed something
- * like a (Context_Control_fp *). The general rule on making this decision
- * is to avoid writing assembly language.
- */
-
- ALIGN (PPC_CACHE_ALIGNMENT, PPC_CACHE_ALIGN_POWER)
- PUBLIC_PROC (_CPU_Context_restore_fp)
-PROC (_CPU_Context_restore_fp):
-#if (PPC_HAS_FPU == 1)
- lwz r3, 0(r3)
-#if (PPC_HAS_DOUBLE == 1)
- lfd f2, FP_FPSCR(r3)
- mtfsf 255, f2
- lfd f0, FP_0(r3)
- lfd f1, FP_1(r3)
- lfd f2, FP_2(r3)
- lfd f3, FP_3(r3)
- lfd f4, FP_4(r3)
- lfd f5, FP_5(r3)
- lfd f6, FP_6(r3)
- lfd f7, FP_7(r3)
- lfd f8, FP_8(r3)
- lfd f9, FP_9(r3)
- lfd f10, FP_10(r3)
- lfd f11, FP_11(r3)
- lfd f12, FP_12(r3)
- lfd f13, FP_13(r3)
- lfd f14, FP_14(r3)
- lfd f15, FP_15(r3)
- lfd f16, FP_16(r3)
- lfd f17, FP_17(r3)
- lfd f18, FP_18(r3)
- lfd f19, FP_19(r3)
- lfd f20, FP_20(r3)
- lfd f21, FP_21(r3)
- lfd f22, FP_22(r3)
- lfd f23, FP_23(r3)
- lfd f24, FP_24(r3)
- lfd f25, FP_25(r3)
- lfd f26, FP_26(r3)
- lfd f27, FP_27(r3)
- lfd f28, FP_28(r3)
- lfd f29, FP_29(r3)
- lfd f30, FP_30(r3)
- lfd f31, FP_31(r3)
-#else
- lfs f2, FP_FPSCR(r3)
- mtfsf 255, f2
- lfs f0, FP_0(r3)
- lfs f1, FP_1(r3)
- lfs f2, FP_2(r3)
- lfs f3, FP_3(r3)
- lfs f4, FP_4(r3)
- lfs f5, FP_5(r3)
- lfs f6, FP_6(r3)
- lfs f7, FP_7(r3)
- lfs f8, FP_8(r3)
- lfs f9, FP_9(r3)
- lfs f10, FP_10(r3)
- lfs f11, FP_11(r3)
- lfs f12, FP_12(r3)
- lfs f13, FP_13(r3)
- lfs f14, FP_14(r3)
- lfs f15, FP_15(r3)
- lfs f16, FP_16(r3)
- lfs f17, FP_17(r3)
- lfs f18, FP_18(r3)
- lfs f19, FP_19(r3)
- lfs f20, FP_20(r3)
- lfs f21, FP_21(r3)
- lfs f22, FP_22(r3)
- lfs f23, FP_23(r3)
- lfs f24, FP_24(r3)
- lfs f25, FP_25(r3)
- lfs f26, FP_26(r3)
- lfs f27, FP_27(r3)
- lfs f28, FP_28(r3)
- lfs f29, FP_29(r3)
- lfs f30, FP_30(r3)
- lfs f31, FP_31(r3)
-#endif
-#endif
- blr
-
-
-/* _CPU_Context_switch
- *
- * This routine performs a normal non-FP context switch.
- */
- ALIGN (PPC_CACHE_ALIGNMENT, PPC_CACHE_ALIGN_POWER)
- PUBLIC_PROC (_CPU_Context_switch)
-PROC (_CPU_Context_switch):
- sync
- isync
-#if (PPC_CACHE_ALIGNMENT == 4) /* No cache */
- stw r1, GP_1(r3)
- lwz r1, GP_1(r4)
- stw r2, GP_2(r3)
- lwz r2, GP_2(r4)
-#if (PPC_USE_MULTIPLE == 1)
- stmw r13, GP_13(r3)
- lmw r13, GP_13(r4)
-#else
- stw r13, GP_13(r3)
- lwz r13, GP_13(r4)
- stw r14, GP_14(r3)
- lwz r14, GP_14(r4)
- stw r15, GP_15(r3)
- lwz r15, GP_15(r4)
- stw r16, GP_16(r3)
- lwz r16, GP_16(r4)
- stw r17, GP_17(r3)
- lwz r17, GP_17(r4)
- stw r18, GP_18(r3)
- lwz r18, GP_18(r4)
- stw r19, GP_19(r3)
- lwz r19, GP_19(r4)
- stw r20, GP_20(r3)
- lwz r20, GP_20(r4)
- stw r21, GP_21(r3)
- lwz r21, GP_21(r4)
- stw r22, GP_22(r3)
- lwz r22, GP_22(r4)
- stw r23, GP_23(r3)
- lwz r23, GP_23(r4)
- stw r24, GP_24(r3)
- lwz r24, GP_24(r4)
- stw r25, GP_25(r3)
- lwz r25, GP_25(r4)
- stw r26, GP_26(r3)
- lwz r26, GP_26(r4)
- stw r27, GP_27(r3)
- lwz r27, GP_27(r4)
- stw r28, GP_28(r3)
- lwz r28, GP_28(r4)
- stw r29, GP_29(r3)
- lwz r29, GP_29(r4)
- stw r30, GP_30(r3)
- lwz r30, GP_30(r4)
- stw r31, GP_31(r3)
- lwz r31, GP_31(r4)
-#endif
- mfcr r5
- stw r5, GP_CR(r3)
- lwz r5, GP_CR(r4)
- mflr r6
- mtcrf 255, r5
- stw r6, GP_PC(r3)
- lwz r6, GP_PC(r4)
- mfmsr r7
- mtlr r6
- stw r7, GP_MSR(r3)
- lwz r7, GP_MSR(r4)
- mtmsr r7
-#endif
-#if (PPC_CACHE_ALIGNMENT == 16)
- /* This assumes that all the registers are in the given order */
- li r5, 16
- addi r3,r3,-4
-#if ( PPC_USE_DATA_CACHE )
- dcbz r5, r3
-#endif
- stw r1, GP_1+4(r3)
- stw r2, GP_2+4(r3)
-#if (PPC_USE_MULTIPLE == 1)
- addi r3, r3, GP_14+4
-#if ( PPC_USE_DATA_CACHE )
- dcbz r5, r3
-#endif
-
- addi r3, r3, GP_18-GP_14
-#if ( PPC_USE_DATA_CACHE )
- dcbz r5, r3
-#endif
- addi r3, r3, GP_22-GP_18
-#if ( PPC_USE_DATA_CACHE )
- dcbz r5, r3
-#endif
- addi r3, r3, GP_26-GP_22
-#if ( PPC_USE_DATA_CACHE )
- dcbz r5, r3
-#endif
- stmw r13, GP_13-GP_26(r3)
-#else
- stw r13, GP_13+4(r3)
- stwu r14, GP_14+4(r3)
-#if ( PPC_USE_DATA_CACHE )
- dcbz r5, r3
-#endif
- stw r15, GP_15-GP_14(r3)
- stw r16, GP_16-GP_14(r3)
- stw r17, GP_17-GP_14(r3)
- stwu r18, GP_18-GP_14(r3)
-#if ( PPC_USE_DATA_CACHE )
- dcbz r5, r3
-#endif
- stw r19, GP_19-GP_18(r3)
- stw r20, GP_20-GP_18(r3)
- stw r21, GP_21-GP_18(r3)
- stwu r22, GP_22-GP_18(r3)
-#if ( PPC_USE_DATA_CACHE )
- dcbz r5, r3
-#endif
- stw r23, GP_23-GP_22(r3)
- stw r24, GP_24-GP_22(r3)
- stw r25, GP_25-GP_22(r3)
- stwu r26, GP_26-GP_22(r3)
-#if ( PPC_USE_DATA_CACHE )
- dcbz r5, r3
-#endif
- stw r27, GP_27-GP_26(r3)
- stw r28, GP_28-GP_26(r3)
- stw r29, GP_29-GP_26(r3)
- stw r30, GP_30-GP_26(r3)
- stw r31, GP_31-GP_26(r3)
-#endif
-#if ( PPC_USE_DATA_CACHE )
- dcbt r0, r4
-#endif
- mfcr r6
- stw r6, GP_CR-GP_26(r3)
- mflr r7
- stw r7, GP_PC-GP_26(r3)
- mfmsr r8
- stw r8, GP_MSR-GP_26(r3)
-
-#if ( PPC_USE_DATA_CACHE )
- dcbt r5, r4
-#endif
- lwz r1, GP_1(r4)
- lwz r2, GP_2(r4)
-#if (PPC_USE_MULTIPLE == 1)
- addi r4, r4, GP_15
-#if ( PPC_USE_DATA_CACHE )
- dcbt r5, r4
-#endif
- addi r4, r4, GP_19-GP_15
-#if ( PPC_USE_DATA_CACHE )
- dcbt r5, r4
-#endif
- addi r4, r4, GP_23-GP_19
-#if ( PPC_USE_DATA_CACHE )
- dcbt r5, r4
-#endif
- addi r4, r4, GP_27-GP_23
-#if ( PPC_USE_DATA_CACHE )
- dcbt r5, r4
-#endif
- lmw r13, GP_13-GP_27(r4)
-#else
- lwz r13, GP_13(r4)
- lwz r14, GP_14(r4)
- lwzu r15, GP_15(r4)
-#if ( PPC_USE_DATA_CACHE )
- dcbt r5, r4
-#endif
- lwz r16, GP_16-GP_15(r4)
- lwz r17, GP_17-GP_15(r4)
- lwz r18, GP_18-GP_15(r4)
- lwzu r19, GP_19-GP_15(r4)
-#if ( PPC_USE_DATA_CACHE )
- dcbt r5, r4
-#endif
- lwz r20, GP_20-GP_19(r4)
- lwz r21, GP_21-GP_19(r4)
- lwz r22, GP_22-GP_19(r4)
- lwzu r23, GP_23-GP_19(r4)
-#if ( PPC_USE_DATA_CACHE )
- dcbt r5, r4
-#endif
- lwz r24, GP_24-GP_23(r4)
- lwz r25, GP_25-GP_23(r4)
- lwz r26, GP_26-GP_23(r4)
- lwzu r27, GP_27-GP_23(r4)
-#if ( PPC_USE_DATA_CACHE )
- dcbt r5, r4
-#endif
- lwz r28, GP_28-GP_27(r4)
- lwz r29, GP_29-GP_27(r4)
- lwz r30, GP_30-GP_27(r4)
- lwz r31, GP_31-GP_27(r4)
-#endif
- lwz r6, GP_CR-GP_27(r4)
- lwz r7, GP_PC-GP_27(r4)
- lwz r8, GP_MSR-GP_27(r4)
- mtcrf 255, r6
- mtlr r7
- mtmsr r8
-#endif
-#if (PPC_CACHE_ALIGNMENT == 32)
- /* This assumes that all the registers are in the given order */
- li r5, 32
- addi r3,r3,-4
-#if ( PPC_USE_DATA_CACHE )
- dcbz r5, r3
-#endif
- stw r1, GP_1+4(r3)
- stw r2, GP_2+4(r3)
-#if (PPC_USE_MULTIPLE == 1)
- addi r3, r3, GP_18+4
-#if ( PPC_USE_DATA_CACHE )
- dcbz r5, r3
-#endif
- stmw r13, GP_13-GP_18(r3)
-#else
- stw r13, GP_13+4(r3)
- stw r14, GP_14+4(r3)
- stw r15, GP_15+4(r3)
- stw r16, GP_16+4(r3)
- stw r17, GP_17+4(r3)
- stwu r18, GP_18+4(r3)
-#if ( PPC_USE_DATA_CACHE )
- dcbz r5, r3
-#endif
- stw r19, GP_19-GP_18(r3)
- stw r20, GP_20-GP_18(r3)
- stw r21, GP_21-GP_18(r3)
- stw r22, GP_22-GP_18(r3)
- stw r23, GP_23-GP_18(r3)
- stw r24, GP_24-GP_18(r3)
- stw r25, GP_25-GP_18(r3)
- stw r26, GP_26-GP_18(r3)
- stw r27, GP_27-GP_18(r3)
- stw r28, GP_28-GP_18(r3)
- stw r29, GP_29-GP_18(r3)
- stw r30, GP_30-GP_18(r3)
- stw r31, GP_31-GP_18(r3)
-#endif
-#if ( PPC_USE_DATA_CACHE )
- dcbt r0, r4
-#endif
- mfcr r6
- stw r6, GP_CR-GP_18(r3)
- mflr r7
- stw r7, GP_PC-GP_18(r3)
- mfmsr r8
- stw r8, GP_MSR-GP_18(r3)
-
-#if ( PPC_USE_DATA_CACHE )
- dcbt r5, r4
-#endif
- lwz r1, GP_1(r4)
- lwz r2, GP_2(r4)
-#if (PPC_USE_MULTIPLE == 1)
- addi r4, r4, GP_19
-#if ( PPC_USE_DATA_CACHE )
- dcbt r5, r4
-#endif
- lmw r13, GP_13-GP_19(r4)
-#else
- lwz r13, GP_13(r4)
- lwz r14, GP_14(r4)
- lwz r15, GP_15(r4)
- lwz r16, GP_16(r4)
- lwz r17, GP_17(r4)
- lwz r18, GP_18(r4)
- lwzu r19, GP_19(r4)
-#if ( PPC_USE_DATA_CACHE )
- dcbt r5, r4
-#endif
- lwz r20, GP_20-GP_19(r4)
- lwz r21, GP_21-GP_19(r4)
- lwz r22, GP_22-GP_19(r4)
- lwz r23, GP_23-GP_19(r4)
- lwz r24, GP_24-GP_19(r4)
- lwz r25, GP_25-GP_19(r4)
- lwz r26, GP_26-GP_19(r4)
- lwz r27, GP_27-GP_19(r4)
- lwz r28, GP_28-GP_19(r4)
- lwz r29, GP_29-GP_19(r4)
- lwz r30, GP_30-GP_19(r4)
- lwz r31, GP_31-GP_19(r4)
-#endif
- lwz r6, GP_CR-GP_19(r4)
- lwz r7, GP_PC-GP_19(r4)
- lwz r8, GP_MSR-GP_19(r4)
- mtcrf 255, r6
- mtlr r7
- mtmsr r8
-#endif
- blr
-
-/*
- * _CPU_Context_restore
- *
- * This routine is generallu used only to restart self in an
- * efficient manner. It may simply be a label in _CPU_Context_switch.
- *
- * NOTE: May be unnecessary to reload some registers.
- */
-/*
- * ACB: Don't worry about cache optimisation here - this is not THAT critical.
- */
- ALIGN (PPC_CACHE_ALIGNMENT, PPC_CACHE_ALIGN_POWER)
- PUBLIC_PROC (_CPU_Context_restore)
-PROC (_CPU_Context_restore):
- lwz r5, GP_CR(r3)
- lwz r6, GP_PC(r3)
- lwz r7, GP_MSR(r3)
- mtcrf 255, r5
- mtlr r6
- mtmsr r7
- lwz r1, GP_1(r3)
- lwz r2, GP_2(r3)
-#if (PPC_USE_MULTIPLE == 1)
- lmw r13, GP_13(r3)
-#else
- lwz r13, GP_13(r3)
- lwz r14, GP_14(r3)
- lwz r15, GP_15(r3)
- lwz r16, GP_16(r3)
- lwz r17, GP_17(r3)
- lwz r18, GP_18(r3)
- lwz r19, GP_19(r3)
- lwz r20, GP_20(r3)
- lwz r21, GP_21(r3)
- lwz r22, GP_22(r3)
- lwz r23, GP_23(r3)
- lwz r24, GP_24(r3)
- lwz r25, GP_25(r3)
- lwz r26, GP_26(r3)
- lwz r27, GP_27(r3)
- lwz r28, GP_28(r3)
- lwz r29, GP_29(r3)
- lwz r30, GP_30(r3)
- lwz r31, GP_31(r3)
-#endif
-
- blr
-
-/* Individual interrupt prologues look like this:
- * #if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27)
- * #if (PPC_HAS_FPU)
- * stwu r1, -(20*4 + 18*8 + IP_END)(r1)
- * #else
- * stwu r1, -(20*4 + IP_END)(r1)
- * #endif
- * #else
- * stwu r1, -(IP_END)(r1)
- * #endif
- * stw r0, IP_0(r1)
- *
- * li r0, vectornum
- * b PROC (_ISR_Handler{,C})
- */
-
-/* void __ISR_Handler()
- *
- * This routine provides the RTEMS interrupt management.
- * The vector number is in r0. R0 has already been stacked.
- *
- */
- ALIGN (PPC_CACHE_ALIGNMENT, PPC_CACHE_ALIGN_POWER)
- PUBLIC_PROC (_ISR_Handler)
-PROC (_ISR_Handler):
-#define LABEL(x) x
-/* XXX ??
-#define MTSAVE(x) mtspr sprg0, x
-#define MFSAVE(x) mfspr x, sprg0
-*/
-#define MTPC(x) mtspr srr0, x
-#define MFPC(x) mfspr x, srr0
-#define MTMSR(x) mtspr srr1, x
-#define MFMSR(x) mfspr x, srr1
-
- #include "irq_stub.S"
- rfi
-
-#if (PPC_HAS_RFCI == 1)
-/* void __ISR_HandlerC()
- *
- * This routine provides the RTEMS interrupt management.
- * For critical interrupts
- *
- */
- ALIGN (PPC_CACHE_ALIGNMENT, PPC_CACHE_ALIGN_POWER)
- PUBLIC_PROC (_ISR_HandlerC)
-PROC (_ISR_HandlerC):
-#undef LABEL
-#undef MTSAVE
-#undef MFSAVE
-#undef MTPC
-#undef MFPC
-#undef MTMSR
-#undef MFMSR
-#define LABEL(x) x##_C
-/* XXX??
-#define MTSAVE(x) mtspr sprg1, x
-#define MFSAVE(x) mfspr x, sprg1
-*/
-#define MTPC(x) mtspr srr2, x
-#define MFPC(x) mfspr x, srr2
-#define MTMSR(x) mtspr srr3, x
-#define MFMSR(x) mfspr x, srr3
- #include "irq_stub.S"
- rfci
-#endif
-
-/* PowerOpen descriptors for indirect function calls.
- */
-
-#if (PPC_ABI == PPC_ABI_POWEROPEN)
- DESCRIPTOR (_CPU_Context_save_fp)
- DESCRIPTOR (_CPU_Context_restore_fp)
- DESCRIPTOR (_CPU_Context_switch)
- DESCRIPTOR (_CPU_Context_restore)
- DESCRIPTOR (_ISR_Handler)
-#if (PPC_HAS_RFCI == 1)
- DESCRIPTOR (_ISR_HandlerC)
-#endif
-#endif
diff --git a/c/src/lib/libbsp/powerpc/support/old_exception_processing/irq_stub.S b/c/src/lib/libbsp/powerpc/support/old_exception_processing/irq_stub.S
deleted file mode 100644
index 76c8927305..0000000000
--- a/c/src/lib/libbsp/powerpc/support/old_exception_processing/irq_stub.S
+++ /dev/null
@@ -1,268 +0,0 @@
-/*
- * This file contains the interrupt handler assembly code for the PowerPC
- * implementation of RTEMS. It is #included from cpu_asm.s.
- *
- * Author: Andrew Bray <andy@i-cubed.co.uk>
- *
- * COPYRIGHT (c) 1995 by i-cubed ltd.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of i-cubed limited not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * i-cubed limited makes no representations about the suitability
- * of this software for any purpose.
- *
- * $Id$
- */
-
-/* void __ISR_Handler()
- *
- * This routine provides the RTEMS interrupt management.
- * The vector number is in r0. R0 has already been stacked.
- *
- */
- PUBLIC_VAR (_CPU_IRQ_info )
-
- /* Finish off the interrupt frame */
- stw r2, IP_2(r1)
- stw r3, IP_3(r1)
- stw r4, IP_4(r1)
- stw r5, IP_5(r1)
- stw r6, IP_6(r1)
- stw r7, IP_7(r1)
- stw r8, IP_8(r1)
- stw r9, IP_9(r1)
- stw r10, IP_10(r1)
- stw r11, IP_11(r1)
- stw r12, IP_12(r1)
- stw r13, IP_13(r1)
- stmw r28, IP_28(r1)
- mfcr r5
- mfctr r6
- mfxer r7
- mflr r8
- MFPC (r9)
- MFMSR (r10)
- /* Establish addressing */
-#if (PPC_USE_SPRG)
- mfspr r11, sprg3
-#else
- lis r11,_CPU_IRQ_info@ha
- addi r11,r11,_CPU_IRQ_info@l
-#endif
- dcbt r0, r11
- stw r5, IP_CR(r1)
- stw r6, IP_CTR(r1)
- stw r7, IP_XER(r1)
- stw r8, IP_LR(r1)
- stw r9, IP_PC(r1)
- stw r10, IP_MSR(r1)
-
- lwz r30, Vector_table(r11)
- slwi r4,r0,2
- lwz r28, Nest_level(r11)
- add r4, r4, r30
-
- lwz r30, 0(r28)
- mr r3, r0
- lwz r31, Stack(r11)
- /*
- * #if ( CPU_HAS_SOFTWARE_INTERRUPT_STACK == TRUE )
- * if ( _ISR_Nest_level == 0 )
- * switch to software interrupt stack
- * #endif
- */
- /* Switch stacks, here we must prevent ALL interrupts */
-#if (PPC_USE_SPRG)
- mfmsr r5
- mfspr r6, sprg2
-#else
- lwz r6,msr_initial(r11)
- lis r5,~PPC_MSR_DISABLE_MASK@ha
- ori r5,r5,~PPC_MSR_DISABLE_MASK@l
- and r6,r6,r5
- mfmsr r5
-#endif
- mtmsr r6
- cmpwi r30, 0
- lwz r29, Disable_level(r11)
- subf r31,r1,r31
- bne LABEL (nested)
- stwux r1,r1,r31
-LABEL (nested):
- /*
- * _ISR_Nest_level++;
- */
- lwz r31, 0(r29)
- addi r30,r30,1
- stw r30,0(r28)
- /* From here on out, interrupts can be re-enabled. RTEMS
- * convention says not.
- */
- lwz r4,0(r4)
- /*
- * _Thread_Dispatch_disable_level++;
- */
- addi r31,r31,1
- stw r31, 0(r29)
-/* SCE 980217
- *
- * We need address translation ON when we call our ISR routine
-
- mtmsr r5
-
- */
-
- /*
- * (*_ISR_Vector_table[ vector ])( vector );
- */
-#if (PPC_ABI == PPC_ABI_POWEROPEN)
- lwz r6,0(r4)
- lwz r2,4(r4)
- mtlr r6
- lwz r11,8(r4)
-#endif
-#if (PPC_ABI == PPC_ABI_GCC27)
- lwz r2, Default_r2(r11)
- mtlr r4
- #lwz r2, 0(r2)
-#endif
-#if (PPC_ABI == PPC_ABI_SVR4 || PPC_ABI == PPC_ABI_EABI)
- mtlr r4
- lwz r2, Default_r2(r11)
- lwz r13, Default_r13(r11)
- #lwz r2, 0(r2)
- #lwz r13, 0(r13)
-#endif
- mr r4,r1
- blrl
- /* NOP marker for debuggers */
- or r6,r6,r6
-
- /* We must re-disable the interrupts */
-#if (PPC_USE_SPRG)
- mfspr r11, sprg3
- mfspr r0, sprg2
-#else
- lis r11,_CPU_IRQ_info@ha
- addi r11,r11,_CPU_IRQ_info@l
- lwz r0,msr_initial(r11)
- lis r30,~PPC_MSR_DISABLE_MASK@ha
- ori r30,r30,~PPC_MSR_DISABLE_MASK@l
- and r0,r0,r30
-#endif
- mtmsr r0
- lwz r30, 0(r28)
- lwz r31, 0(r29)
-
- /*
- * if (--Thread_Dispatch_disable,--_ISR_Nest_level)
- * goto easy_exit;
- */
- addi r30, r30, -1
- cmpwi r30, 0
- addi r31, r31, -1
- stw r30, 0(r28)
- stw r31, 0(r29)
- bne LABEL (easy_exit)
- cmpwi r31, 0
-
- lwz r30, Switch_necessary(r11)
-
- /*
- * #if ( CPU_HAS_SOFTWARE_INTERRUPT_STACK == TRUE )
- * restore stack
- * #endif
- */
- lwz r1,0(r1)
- bne LABEL (easy_exit)
- lwz r30, 0(r30)
- lwz r31, Signal(r11)
-
- /*
- * if ( _Context_Switch_necessary )
- * goto switch
- */
- cmpwi r30, 0
- lwz r28, 0(r31)
- li r6,0
- bne LABEL (switch)
- /*
- * if ( !_ISR_Signals_to_thread_executing )
- * goto easy_exit
- * _ISR_Signals_to_thread_executing = 0;
- */
- cmpwi r28, 0
- beq LABEL (easy_exit)
-
- /*
- * switch:
- * call _Thread_Dispatch() or prepare to return to _ISR_Dispatch
- */
-LABEL (switch):
- stw r6, 0(r31)
- /* Re-enable interrupts */
- lwz r0, IP_MSR(r1)
-#if (PPC_ABI == PPC_ABI_POWEROPEN)
- lwz r2, Dispatch_r2(r11)
-#else
- /* R2 and R13 still hold their values from the last call */
-#endif
- mtmsr r0
- bl SYM (_Thread_Dispatch)
- /* NOP marker for debuggers */
- or r6,r6,r6
- /*
- * prepare to get out of interrupt
- */
- /* Re-disable IRQs */
-#if (PPC_USE_SPRG)
- mfspr r0, sprg2
-#else
- lis r11,_CPU_IRQ_info@ha
- addi r11,r11,_CPU_IRQ_info@l
- lwz r0,msr_initial(r11)
- lis r5,~PPC_MSR_DISABLE_MASK@ha
- ori r5,r5,~PPC_MSR_DISABLE_MASK@l
- and r0,r0,r5
-#endif
- mtmsr r0
-
- /*
- * easy_exit:
- * prepare to get out of interrupt
- * return from interrupt
- */
-LABEL (easy_exit):
- lwz r5, IP_CR(r1)
- lwz r6, IP_CTR(r1)
- lwz r7, IP_XER(r1)
- lwz r8, IP_LR(r1)
- lwz r9, IP_PC(r1)
- lwz r10, IP_MSR(r1)
- mtcrf 255,r5
- mtctr r6
- mtxer r7
- mtlr r8
- MTPC (r9)
- MTMSR (r10)
- lwz r0, IP_0(r1)
- lwz r2, IP_2(r1)
- lwz r3, IP_3(r1)
- lwz r4, IP_4(r1)
- lwz r5, IP_5(r1)
- lwz r6, IP_6(r1)
- lwz r7, IP_7(r1)
- lwz r8, IP_8(r1)
- lwz r9, IP_9(r1)
- lwz r10, IP_10(r1)
- lwz r11, IP_11(r1)
- lwz r12, IP_12(r1)
- lwz r13, IP_13(r1)
- lmw r28, IP_28(r1)
- lwz r1, 0(r1)
diff --git a/c/src/lib/libbsp/powerpc/support/old_exception_processing/ppccache.c b/c/src/lib/libbsp/powerpc/support/old_exception_processing/ppccache.c
deleted file mode 100644
index ecfb4b96ca..0000000000
--- a/c/src/lib/libbsp/powerpc/support/old_exception_processing/ppccache.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * PowerPC Cache enable routines
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-
-#define PPC_Get_HID0( _value ) \
- do { \
- _value = 0; /* to avoid warnings */ \
- asm volatile( \
- "mfspr %0, 0x3f0;" /* get HID0 */ \
- "isync" \
- : "=r" (_value) \
- : "0" (_value) \
- ); \
- } while (0)
-
-#define PPC_Set_HID0( _value ) \
- do { \
- asm volatile( \
- "isync;" \
- "mtspr 0x3f0, %0;" /* load HID0 */ \
- "isync" \
- : "=r" (_value) \
- : "0" (_value) \
- ); \
- } while (0)
-
-
-void powerpc_instruction_cache_enable ()
-{
- unsigned32 value;
-
- /*
- * Enable the instruction cache
- */
-
- PPC_Get_HID0( value );
-
- value |= 0x00008000; /* Set ICE bit */
-
- PPC_Set_HID0( value );
-}
-
-void powerpc_data_cache_enable ()
-{
- unsigned32 value;
-
- /*
- * enable data cache
- */
-
- PPC_Get_HID0( value );
-
- value |= 0x00004000; /* set DCE bit */
-
- PPC_Set_HID0( value );
-}
-
diff --git a/c/src/lib/libbsp/powerpc/support/old_exception_processing/rtems.S b/c/src/lib/libbsp/powerpc/support/old_exception_processing/rtems.S
deleted file mode 100644
index b653152411..0000000000
--- a/c/src/lib/libbsp/powerpc/support/old_exception_processing/rtems.S
+++ /dev/null
@@ -1,132 +0,0 @@
-/* rtems.s
- *
- * This file contains the single entry point code for
- * the PowerPC implementation of RTEMS.
- *
- * Author: Andrew Bray <andy@i-cubed.co.uk>
- *
- * COPYRIGHT (c) 1995 by i-cubed ltd.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of i-cubed limited not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * i-cubed limited makes no representations about the suitability
- * of this software for any purpose.
- *
- * Derived from c/src/exec/cpu/no_cpu/rtems.c:
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <asm.h>
-
- BEGIN_CODE
-/*
- * RTEMS
- *
- * This routine jumps to the directive indicated in r11.
- * This routine is used when RTEMS is linked by itself and placed
- * in ROM. This routine is the first address in the ROM space for
- * RTEMS. The user "calls" this address with the directive arguments
- * in the normal place.
- * This routine then jumps indirectly to the correct directive
- * preserving the arguments. The directive should not realize
- * it has been "wrapped" in this way. The table "_Entry_points"
- * is used to look up the directive.
- */
-
- ALIGN (4, 2)
- PUBLIC_PROC (RTEMS)
-PROC (RTEMS):
-#if (PPC_ABI == PPC_ABI_POWEROPEN)
- mflr r0
- stw r0, 8(r1)
- stwu r1, -64(r1)
-
- /* Establish addressing */
- bl base
-base:
- mflr r12
- addi r12, r12, tabaddr - base
-
- lwz r12, Entry_points-abase(r12)
- slwi r11, r11, 2
- lwzx r12, r12, r11
-
- stw r2, 56(r1)
- lwz r0, 0(r12)
- mtlr r0
- lwz r2, 4(r12)
- lwz r11, 8(r12)
- blrl
- lwz r2, 56(r1)
- addi r1, r1, 64
- lwz r0, 8(r1)
- mtlr r0
-#else
- mflr r0
- stw r0, 4(r1)
- stwu r1, -16(r1)
-
- /* Establish addressing */
- bl base
-base:
- mflr r12
- addi r12, r12, tabaddr - base
-
- lwz r12, Entry_points-abase(r12)
- slwi r11, r11, 2
- lwzx r11, r12, r11
-
- stw r2, 8(r1)
-#if (PPC_ABI != PPC_ABI_GCC27)
- stw r13, 12(r1)
-#endif
- mtlr r11
- lwz r11, irqinfo-abase(r12)
- lwz r2, 0(r11)
-#if (PPC_ABI != PPC_ABI_GCC27)
- lwz r13, 4(r11)
-#endif
- blrl
- lwz r2, 8(r1)
-#if (PPC_ABI != PPC_ABI_GCC27)
- lwz r13, 12(r1)
-#endif
- addi r1, r1, 16
- lwz r0, 4(r1)
- mtlr r0
-#endif
- blr
-
-
- /* Addressability stuff */
-tabaddr:
-abase:
- EXTERN_VAR (_Entry_points)
-Entry_points:
- EXT_SYM_REF (_Entry_points)
-#if (PPC_ABI != PPC_ABI_POWEROPEN)
- EXTERN_VAR (_CPU_IRQ_info)
-irqinfo:
- EXT_SYM_REF (_CPU_IRQ_info)
-#endif
-
-#if (PPC_ABI == PPC_ABI_POWEROPEN)
- DESCRIPTOR (RTEMS)
-#endif
-
-
diff --git a/c/src/lib/libc/utsname.c b/c/src/lib/libc/utsname.c
deleted file mode 100644
index 7da5f9380d..0000000000
--- a/c/src/lib/libc/utsname.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * $Id$
- */
-
-#include <stdio.h>
-#include <string.h>
-
-#include <errno.h>
-#include <sys/utsname.h>
-
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/sptables.h>
-
-#include <rtems/posix/seterr.h>
-
-/*PAGE
- *
- * 4.4.1 Get System Name, P1003.1b-1993, p. 90
- */
-
-int uname(
- struct utsname *name
-)
-{
- /* XXX: Here is what Solaris returns...
- sysname = SunOS
- nodename = node_name
- release = 5.3
- version = Generic_101318-12
- machine = sun4m
- */
-
- if ( !name )
- set_errno_and_return_minus_one( EFAULT );
-
- strcpy( name->sysname, "RTEMS" );
-
- sprintf( name->nodename, "Node %d", _Objects_Local_node );
-
- strcpy( name->release, RTEMS_VERSION );
-
- strcpy( name->version, "" );
-
- sprintf( name->machine, "%s/%s", CPU_NAME, CPU_MODEL_NAME );
-
- return 0;
-}
diff --git a/c/src/lib/libcpu/i386/idt.c b/c/src/lib/libcpu/i386/idt.c
deleted file mode 100644
index 96eb0ba97f..0000000000
--- a/c/src/lib/libcpu/i386/idt.c
+++ /dev/null
@@ -1,288 +0,0 @@
-/*
- * cpu.c - This file contains implementation of C function to
- * instantiate IDT entries. More detailled information can be found
- * on Intel site and more precisely in the following book :
- *
- * Pentium Processor family
- * Developper's Manual
- *
- * Volume 3 : Architecture and Programming Manual
- *
- * Copyright (C) 1998 Eric Valette (valette@crf.canon.fr)
- * Canon Centre Recherche France.
- *
- * The license and distribution terms for this file may be
- * found in found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <libcpu/cpu.h>
-#include <irq.h>
-
-static rtems_raw_irq_connect_data* raw_irq_table;
-static rtems_raw_irq_connect_data default_raw_irq_entry;
-static interrupt_gate_descriptor default_idt_entry;
-static rtems_raw_irq_global_settings* local_settings;
-
-void create_interrupt_gate_descriptor (interrupt_gate_descriptor* idtEntry,
- rtems_raw_irq_hdl hdl)
-{
- idtEntry->low_offsets_bits = (((unsigned) hdl) & 0xffff);
- idtEntry->segment_selector = i386_get_cs();
- idtEntry->fixed_value_bits = 0;
- idtEntry->gate_type = 0xe;
- idtEntry->privilege = 0;
- idtEntry->present = 1;
- idtEntry->high_offsets_bits = ((((unsigned) hdl) >> 16) & 0xffff);
-}
-
-rtems_raw_irq_hdl get_hdl_from_vector(rtems_vector_offset index)
-{
- rtems_raw_irq_hdl hdl;
- interrupt_gate_descriptor* idt_entry_tbl;
- unsigned limit;
-
- i386_get_info_from_IDTR (&idt_entry_tbl, &limit);
-
- /* Convert limit into number of entries */
- limit = (limit + 1) / sizeof(interrupt_gate_descriptor);
-
- if(index >= limit) {
- return 0;
- }
-
- * ((unsigned int*) &hdl) = (idt_entry_tbl[index].low_offsets_bits |
- (idt_entry_tbl[index].high_offsets_bits << 16));
- return hdl;
-}
-
-int i386_set_idt_entry (const rtems_raw_irq_connect_data* irq)
-{
- interrupt_gate_descriptor* idt_entry_tbl;
- unsigned limit;
- unsigned int level;
-
-
- i386_get_info_from_IDTR (&idt_entry_tbl, &limit);
-
- /* Convert limit into number of entries */
- limit = (limit + 1) / sizeof(interrupt_gate_descriptor);
-
- if (irq->idtIndex >= limit) {
- return 0;
- }
- /*
- * Check if default handler is actually connected. If not issue an error.
- * You must first get the current handler via i386_get_current_idt_entry
- * and then disconnect it using i386_delete_idt_entry.
- * RATIONALE : to always have the same transition by forcing the user
- * to get the previous handler before accepting to disconnect.
- */
- if (get_hdl_from_vector(irq->idtIndex) != default_raw_irq_entry.hdl) {
- return 0;
- }
-
- _CPU_ISR_Disable(level);
-
- raw_irq_table [irq->idtIndex] = *irq;
- create_interrupt_gate_descriptor (&idt_entry_tbl[irq->idtIndex], irq->hdl);
- irq->on(irq);
-
- _CPU_ISR_Enable(level);
- return 1;
-}
-
-void _CPU_ISR_install_vector (unsigned vector,
- void* hdl,
- void** oldHdl)
-{
- interrupt_gate_descriptor* idt_entry_tbl;
- unsigned limit;
- interrupt_gate_descriptor new;
- unsigned int level;
-
- i386_get_info_from_IDTR (&idt_entry_tbl, &limit);
-
- /* Convert limit into number of entries */
- limit = (limit + 1) / sizeof(interrupt_gate_descriptor);
-
- if (vector >= limit) {
- return;
- }
- _CPU_ISR_Disable(level)
- * ((unsigned int *) oldHdl) = idt_entry_tbl[vector].low_offsets_bits |
- (idt_entry_tbl[vector].high_offsets_bits << 16);
-
- create_interrupt_gate_descriptor(&new, hdl);
- idt_entry_tbl[vector] = new;
-
- _CPU_ISR_Enable(level);
-}
-
-int i386_get_current_idt_entry (rtems_raw_irq_connect_data* irq)
-{
- interrupt_gate_descriptor* idt_entry_tbl;
- unsigned limit;
-
- i386_get_info_from_IDTR (&idt_entry_tbl, &limit);
-
- /* Convert limit into number of entries */
- limit = (limit + 1) / sizeof(interrupt_gate_descriptor);
-
- if (irq->idtIndex >= limit) {
- return 0;
- }
- raw_irq_table [irq->idtIndex].hdl = get_hdl_from_vector(irq->idtIndex);
-
- *irq = raw_irq_table [irq->idtIndex];
-
- return 1;
-}
-
-int i386_delete_idt_entry (const rtems_raw_irq_connect_data* irq)
-{
- interrupt_gate_descriptor* idt_entry_tbl;
- unsigned limit;
- unsigned int level;
-
- i386_get_info_from_IDTR (&idt_entry_tbl, &limit);
-
- /* Convert limit into number of entries */
- limit = (limit + 1) / sizeof(interrupt_gate_descriptor);
-
- if (irq->idtIndex >= limit) {
- return 0;
- }
- /*
- * Check if handler passed is actually connected. If not issue an error.
- * You must first get the current handler via i386_get_current_idt_entry
- * and then disconnect it using i386_delete_idt_entry.
- * RATIONALE : to always have the same transition by forcing the user
- * to get the previous handler before accepting to disconnect.
- */
- if (get_hdl_from_vector(irq->idtIndex) != irq->hdl){
- return 0;
- }
- _CPU_ISR_Disable(level);
-
- idt_entry_tbl[irq->idtIndex] = default_idt_entry;
-
- irq->off(irq);
-
- raw_irq_table[irq->idtIndex] = default_raw_irq_entry;
- raw_irq_table[irq->idtIndex].idtIndex = irq->idtIndex;
-
- _CPU_ISR_Enable(level);
-
- return 1;
-}
-
-/*
- * Caution this function assumes the IDTR has been already set.
- */
-int i386_init_idt (rtems_raw_irq_global_settings* config)
-{
- unsigned limit;
- unsigned i;
- unsigned level;
- interrupt_gate_descriptor* idt_entry_tbl;
-
- i386_get_info_from_IDTR (&idt_entry_tbl, &limit);
-
- /* Convert limit into number of entries */
- limit = (limit + 1) / sizeof(interrupt_gate_descriptor);
-
- if (config->idtSize != limit) {
- return 0;
- }
- /*
- * store various accelarators
- */
- raw_irq_table = config->rawIrqHdlTbl;
- local_settings = config;
- default_raw_irq_entry = config->defaultRawEntry;
-
- _CPU_ISR_Disable(level);
-
- create_interrupt_gate_descriptor (&default_idt_entry, default_raw_irq_entry.hdl);
-
- for (i=0; i < limit; i++) {
- interrupt_gate_descriptor new;
- create_interrupt_gate_descriptor (&new, raw_irq_table[i].hdl);
- idt_entry_tbl[i] = new;
- if (raw_irq_table[i].hdl != default_raw_irq_entry.hdl) {
- raw_irq_table[i].on(&raw_irq_table[i]);
- }
- else {
- raw_irq_table[i].off(&raw_irq_table[i]);
- }
- }
- _CPU_ISR_Enable(level);
-
- return 1;
-}
-
-int i386_get_idt_config (rtems_raw_irq_global_settings** config)
-{
- *config = local_settings;
- return 1;
-}
-
-/*
- * Caution this function assumes the GDTR has been already set.
- */
-int i386_set_gdt_entry (unsigned short segment_selector, unsigned base,
- unsigned limit)
-{
- unsigned gdt_limit;
- unsigned short tmp_segment = 0;
- unsigned int limit_adjusted;
- segment_descriptors* gdt_entry_tbl;
-
-
- i386_get_info_from_GDTR (&gdt_entry_tbl, &gdt_limit);
-
- if (segment_selector > limit) {
- return 0;
- }
- /*
- * set up limit first
- */
- limit_adjusted = limit;
- if ( limit > 4095 ) {
- gdt_entry_tbl[segment_selector].granularity = 1;
- limit_adjusted /= 4096;
- }
- gdt_entry_tbl[segment_selector].limit_15_0 = limit_adjusted & 0xffff;
- gdt_entry_tbl[segment_selector].limit_19_16 = (limit_adjusted >> 16) & 0xf;
- /*
- * set up base
- */
- gdt_entry_tbl[segment_selector].base_address_15_0 = base & 0xffff;
- gdt_entry_tbl[segment_selector].base_address_23_16 = (base >> 16) & 0xff;
- gdt_entry_tbl[segment_selector].base_address_31_24 = (base >> 24) & 0xff;
- /*
- * set up descriptor type (this may well becomes a parameter if needed)
- */
- gdt_entry_tbl[segment_selector].type = 2; /* Data R/W */
- gdt_entry_tbl[segment_selector].descriptor_type = 1; /* Code or Data */
- gdt_entry_tbl[segment_selector].privilege = 0; /* ring 0 */
- gdt_entry_tbl[segment_selector].present = 1; /* not present */
-
- /*
- * Now, reload all segment registers so the limit takes effect.
- */
-
- asm volatile( "movw %%ds,%0 ; movw %0,%%ds
- movw %%es,%0 ; movw %0,%%es
- movw %%fs,%0 ; movw %0,%%fs
- movw %%gs,%0 ; movw %0,%%gs
- movw %%ss,%0 ; movw %0,%%ss"
- : "=r" (tmp_segment)
- : "0" (tmp_segment)
- );
-
- return 1;
-}
diff --git a/c/src/lib/libcpu/m68k/shared/misc/memcpy.c b/c/src/lib/libcpu/m68k/shared/misc/memcpy.c
deleted file mode 100644
index 3948411f4b..0000000000
--- a/c/src/lib/libcpu/m68k/shared/misc/memcpy.c
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * C library memcpy routine
- *
- * This routine has code to optimize performance on the CPU32+
- * and another version for other 68k machines.
- *
- * It could be optimized more for machines with MOVE16 instructions.
- *
- * The routine is placed in this source directory to ensure that it
- * is picked up by all applications.
- *
- * W. Eric Norum
- * Saskatchewan Accelerator Laboratory
- * University of Saskatchewan
- * Saskatoon, Saskatchewan, CANADA
- * eric@skatter.usask.ca
- */
-
-#include <string.h>
-#include <rtems/score/m68k.h>
-
-#if defined(__mcpu32__)
-#define COPYSETUP(n) n--
-#define COPY(to,from,n,size) \
- asm volatile ("1:\n" \
- "\tmove." size " (%0)+,(%1)+\n" \
- "\tdbf %2,1b\n" \
- "\tsub.l #0x10000,%2\n" \
- "\tbpl.b 1b\n" : \
- "=a" (from), "=a" (to), "=d" (n) :\
- "0" (from), "1" (to), "2" (n) : \
- "cc", "memory")
-#else
-#define COPYSETUP(n)
-#define COPY(to,from,n,size) \
- asm volatile ("1:\n" \
- "\tmove." size " (%0)+,(%1)+\n" \
- "\tsubq.l #1,%2\n\tbne.b 1b\n" : \
- "=a" (from), "=a" (to), "=d" (n) :\
- "0" (from), "1" (to), "2" (n) : \
- "cc", "memory")
-#endif
-
-void *
-memcpy(void *s1, const void *s2, size_t n)
-{
- char *p1 = s1;
- const char *p2 = s2;
-
- if (n) {
- if (n < 16) {
- COPYSETUP (n);
- COPY (p1, p2, n, "b");
- }
- else {
- int nbyte;
- int nl;
- nbyte = (int)p1 & 0x3;
- if (nbyte) {
- nbyte = 4 - nbyte;
- n -= nbyte;
- COPYSETUP (nbyte);
- COPY (p1, p2, nbyte, "b");
- }
-#if (M68K_HAS_MISALIGNED == 0)
- /*
- * Take care of machines that can't
- * handle misaligned references.
- */
- if ((int)p2 & 0x1) {
- COPYSETUP (n);
- COPY (p1, p2, n, "b");
- return s1;
- }
-#endif
- nl = (unsigned int)n >> 2;
- COPYSETUP (nl);
- COPY (p1, p2, nl, "l");
- nbyte = (int)n & 0x3;
- if (nbyte) {
- COPYSETUP (nbyte);
- COPY (p1, p2, nbyte, "b");
- }
- }
- }
- return s1;
-}
diff --git a/c/src/lib/libcpu/mips/Makefile.am b/c/src/lib/libcpu/mips/Makefile.am
deleted file mode 100644
index f40a256bdd..0000000000
--- a/c/src/lib/libcpu/mips/Makefile.am
+++ /dev/null
@@ -1,11 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-
-SUBDIRS = clock timer
-
-include $(top_srcdir)/../../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../../automake/local.am
diff --git a/c/src/lib/libcpu/mips/clock/Makefile.am b/c/src/lib/libcpu/mips/clock/Makefile.am
deleted file mode 100644
index e235a5d4de..0000000000
--- a/c/src/lib/libcpu/mips/clock/Makefile.am
+++ /dev/null
@@ -1,33 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-PGM = $(ARCH)/clock.rel
-
-C_FILES = ckinit.c
-
-S_FILES = clock.S
-
-H_FILES = clock.h
-
-clock_rel_OBJECTS = $(C_FILES:%.c=$(ARCH)/%.o) $(S_FILES:%.S=$(ARCH)/%.o)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../../../automake/lib.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-$(PGM): $(clock_rel_OBJECTS)
- $(make-rel)
-
-all-local: $(ARCH) $(clock_rel_OBJECTS) $(PGM)
-
-.PRECIOUS: $(PGM)
-
-EXTRA_DIST = ckinit.c clock.S clock.h
-
-include $(top_srcdir)/../../../../../automake/local.am
diff --git a/c/src/lib/libcpu/mips/clock/ckinit.c b/c/src/lib/libcpu/mips/clock/ckinit.c
deleted file mode 100644
index c6ae88f9e0..0000000000
--- a/c/src/lib/libcpu/mips/clock/ckinit.c
+++ /dev/null
@@ -1,245 +0,0 @@
-
-/* ckinit.c
- *
- * This file contains the clock driver initialization for the IDT 4650.
- *
- * Author: Craig Lebakken <craigl@transition.com>
- *
- * COPYRIGHT (c) 1996 by Transition Networks Inc.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Transition Networks not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * Transition Networks makes no representations about the suitability
- * of this software for any purpose.
- *
- * Derived from c/src/lib/libbsp/no_cpu/no_bsp/clock/ckinit.c:
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-/*
- * Rather than deleting this, it is commented out to (hopefully) help
- * the submitter send updates.
- *
- * static char _sccsid[] = "@(#)ckinit.c 08/20/96 1.3\n";
- */
-
-
-#include <stdlib.h>
-
-#include <rtems.h>
-#include <rtems/libio.h>
-
-#define EXT_INT5 0x8000 /* external interrupt 5 */
-
-#include "clock.h"
-
-/* formerly in the BSP */
-#if 0
-#define CLOCKS_PER_MICROSECOND ( CPU_CLOCK_RATE_MHZ ) /* equivalent to CPU clock speed in MHz */
-#endif
-
-#define CLOCKS_PER_MICROSECOND \
- rtems_cpu_configuration_get_clicks_per_microsecond()
-/* to avoid including the bsp */
-mips_isr_entry set_vector( rtems_isr_entry, rtems_vector_number, int );
-
-void Clock_exit( void );
-rtems_isr Clock_isr( rtems_vector_number vector );
-
-
-/*
- * The interrupt vector number associated with the clock tick device
- * driver.
- */
-
-#define CLOCK_VECTOR_MASK EXT_INT5
-#define CLOCK_VECTOR 0x7
-
-/*
- * Clock_driver_ticks is a monotonically increasing counter of the
- * number of clock ticks since the driver was initialized.
- */
-
-volatile rtems_unsigned32 Clock_driver_ticks;
-
-/*
- * Clock_isrs is the number of clock ISRs until the next invocation of
- * the RTEMS clock tick routine. The clock tick device driver
- * gets an interrupt once a millisecond and counts down until the
- * length of time between the user configured microseconds per tick
- * has passed.
- */
-
-rtems_unsigned32 Clock_isrs; /* ISRs until next tick */
-
-/*
- * These are set by clock driver during its init
- */
-
-rtems_device_major_number rtems_clock_major = ~0;
-rtems_device_minor_number rtems_clock_minor;
-
-/*
- * The previous ISR on this clock tick interrupt vector.
- */
-
-rtems_isr_entry Old_ticker;
-
-void Clock_exit( void );
-
-static unsigned32 mips_timer_rate = 0;
-
-/*
- * Isr Handler
- */
-
-rtems_isr Clock_isr(
- rtems_vector_number vector
-)
-{
-/*
- * bump the number of clock driver ticks since initialization
- *
- * determine if it is time to announce the passing of tick as configured
- * to RTEMS through the rtems_clock_tick directive
- *
- * perform any timer dependent tasks
- */
-
- /* refresh the internal CPU timer */
- mips_set_timer( mips_timer_rate );
-
- Clock_driver_ticks += 1;
-
- rtems_clock_tick();
-}
-
-/* User callback shell (set from Clock_Control) */
-static void (*user_callback)(void);
-
-rtems_isr User_Clock_isr(
- rtems_vector_number vector
-)
-{
- /* refresh the internal CPU timer */
- mips_set_timer( mips_timer_rate );
-
- if (user_callback)
- user_callback();
-}
-
-/*
- * Install_clock
- *
- * Install a clock tick handleR and reprograms the chip. This
- * is used to initially establish the clock tick.
- */
-
-void Install_clock(
- rtems_isr_entry clock_isr
-)
-{
- /*
- * Initialize the clock tick device driver variables
- */
-
- Clock_driver_ticks = 0;
- Clock_isrs = rtems_configuration_get_milliseconds_per_tick();
-
- Old_ticker = (rtems_isr_entry) set_vector( clock_isr, CLOCK_VECTOR, 1 );
- /*
- * Hardware specific initialize goes here
- */
-
- mips_timer_rate =
- rtems_configuration_get_microseconds_per_tick() * CLOCKS_PER_MICROSECOND;
- mips_set_timer( mips_timer_rate );
- enable_int(CLOCK_VECTOR_MASK);
-
- /*
- * Schedule the clock cleanup routine to execute if the application exits.
- */
-
- atexit( Clock_exit );
-}
-
-/*
- * Clean up before the application exits
- */
-
-void Clock_exit( void )
-{
- /* mips: turn off the timer interrupts */
- disable_int(~CLOCK_VECTOR_MASK);
-}
-
-/*
- * Clock_initialize
- *
- * Device driver entry point for clock tick driver initialization.
- */
-
-rtems_device_driver Clock_initialize(
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void *pargp
-)
-{
- Install_clock( Clock_isr );
-
- /*
- * make major/minor avail to others such as shared memory driver
- */
-
- rtems_clock_major = major;
- rtems_clock_minor = minor;
-
- return RTEMS_SUCCESSFUL;
-}
-
-rtems_device_driver Clock_control(
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void *pargp
-)
-{
- rtems_unsigned32 isrlevel;
- rtems_libio_ioctl_args_t *args = pargp;
-
- if (args == 0)
- goto done;
-
- /*
- * This is hokey, but until we get a defined interface
- * to do this, it will just be this simple...
- */
-
- if (args->command == rtems_build_name('I', 'S', 'R', ' '))
- {
- Clock_isr(CLOCK_VECTOR);
- }
- else if (args->command == rtems_build_name('N', 'E', 'W', ' '))
- {
- rtems_interrupt_disable( isrlevel );
- user_callback = (void (*)(void))args->buffer;
- (void) set_vector( User_Clock_isr, CLOCK_VECTOR, 1 );
- rtems_interrupt_enable( isrlevel );
- }
-
-done:
- return RTEMS_SUCCESSFUL;
-}
diff --git a/c/src/lib/libcpu/mips/clock/clock.S b/c/src/lib/libcpu/mips/clock/clock.S
deleted file mode 100644
index ab3533991a..0000000000
--- a/c/src/lib/libcpu/mips/clock/clock.S
+++ /dev/null
@@ -1,45 +0,0 @@
-/* clock.s
- *
- * This file contains the assembly code for the IDT 4650 clock driver.
- *
- * Author: Craig Lebakken <craigl@transition.com>
- *
- * COPYRIGHT (c) 1996 by Transition Networks Inc.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Transition Networks not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * Transition Networks makes no representations about the suitability
- * of this software for any purpose.
- *
- * $Id$
- */
-/* @(#)clock.S 08/20/96 1.2 */
-
-#include <iregdef.h>
-#include <idtcpu.h>
-#include <idtmon.h>
-
-FRAME(mips_set_timer,sp,0,ra)
- .set noreorder
- mfc0 t0,C0_COUNT
- nop
- addu t0,a0,t0
- mtc0 t0,C0_COMPARE
- nop
- j ra
- .set reorder
-ENDFRAME(mips_set_timer)
-
-FRAME(mips_get_timer,sp,0,ra)
- .set noreorder
- mfc0 v0,C0_COUNT
- nop
- j ra
- .set reorder
-ENDFRAME(mips_get_timer)
diff --git a/c/src/lib/libcpu/mips/clock/clock.h b/c/src/lib/libcpu/mips/clock/clock.h
deleted file mode 100644
index a14304f668..0000000000
--- a/c/src/lib/libcpu/mips/clock/clock.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* clock.s
- *
- * This file contains the assembly code for the IDT 4650 clock driver.
- *
- * Author: Craig Lebakken <craigl@transition.com>
- *
- * COPYRIGHT (c) 1996 by Transition Networks Inc.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Transition Networks not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * Transition Networks makes no representations about the suitability
- * of this software for any purpose.
- *
- * $Id$
- */
-
-/* @(#)clock.h 08/20/96 1.2 */
-
-extern void mips_set_timer( unsigned32 timer_clock_interval );
diff --git a/c/src/lib/libcpu/mips/configure.in b/c/src/lib/libcpu/mips/configure.in
deleted file mode 100644
index aed970845c..0000000000
--- a/c/src/lib/libcpu/mips/configure.in
+++ /dev/null
@@ -1,33 +0,0 @@
-dnl Process this file with autoconf to produce a configure script.
-dnl
-dnl $Id$
-
-AC_PREREQ(2.13)
-AC_INIT(clock)
-RTEMS_TOP(../../../../..)
-AC_CONFIG_AUX_DIR(../../../../..)
-
-RTEMS_CANONICAL_TARGET_CPU
-
-AM_INIT_AUTOMAKE(rtems-c-src-lib-libcpu-mips64orion,$RTEMS_VERSION,no)
-AM_MAINTAINER_MODE
-
-RTEMS_ENABLE_BARE
-RTEMS_ENV_RTEMSBSP
-
-RTEMS_CHECK_CPU
-RTEMS_CANONICAL_HOST
-
-RTEMS_PROJECT_ROOT
-
-RTEMS_PROG_CC_FOR_TARGET
-RTEMS_CANONICALIZE_TOOLS
-
-RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
-RTEMS_CHECK_BSP_CACHE(RTEMS_BSP)
-
-# Explicitly list all Makefiles here
-AC_OUTPUT(
-Makefile
-clock/Makefile
-timer/Makefile)
diff --git a/c/src/lib/libcpu/mips/timer/Makefile.am b/c/src/lib/libcpu/mips/timer/Makefile.am
deleted file mode 100644
index ee37d10453..0000000000
--- a/c/src/lib/libcpu/mips/timer/Makefile.am
+++ /dev/null
@@ -1,31 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-PGM = $(ARCH)/timer.rel
-
-C_FILES = timer.c
-
-S_FILES = gettime.S
-
-timer_rel_OBJECTS = $(C_FILES:%.c=$(ARCH)/%.o) $(S_FILES:%.S=$(ARCH)/%.o)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../../../automake/lib.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-$(PGM): $(timer_rel_OBJECTS)
- $(make-rel)
-
-all-local: $(ARCH) $(timer_rel_OBJECTS) $(PGM)
-
-.PRECIOUS: $(PGM)
-
-EXTRA_DIST = gettime.S timer.c
-
-include $(top_srcdir)/../../../../../automake/local.am
diff --git a/c/src/lib/libcpu/mips/timer/gettime.S b/c/src/lib/libcpu/mips/timer/gettime.S
deleted file mode 100644
index b69f0ab8f5..0000000000
--- a/c/src/lib/libcpu/mips/timer/gettime.S
+++ /dev/null
@@ -1,35 +0,0 @@
-/* gettime.s
- *
- * This file contains the assembly code for the IDT 4650 timer driver.
- *
- * Author: Craig Lebakken <craigl@transition.com>
- *
- * COPYRIGHT (c) 1996 by Transition Networks Inc.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Transition Networks not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * Transition Networks makes no representations about the suitability
- * of this software for any purpose.
- *
- * $Id$
- */
-
-/* @(#)gettime.S 08/20/96 1.2 */
-
-#include <iregdef.h>
-#include <idtcpu.h>
-#include <idtmon.h>
-
-FRAME(mips_read_timer,sp,0,ra)
- .set noreorder
- mfc0 v0,C0_COUNT
- nop
- j ra
- .set reorder
-ENDFRAME(mips_read_timer)
diff --git a/c/src/lib/libcpu/mips/timer/timer.c b/c/src/lib/libcpu/mips/timer/timer.c
deleted file mode 100644
index 23d68f4ec3..0000000000
--- a/c/src/lib/libcpu/mips/timer/timer.c
+++ /dev/null
@@ -1,138 +0,0 @@
-/* timer.c
- *
- * This file contains the initialization code for the IDT 4650 timer driver.
- *
- * Author: Craig Lebakken <craigl@transition.com>
- *
- * COPYRIGHT (c) 1996 by Transition Networks Inc.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Transition Networks not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * Transition Networks makes no representations about the suitability
- * of this software for any purpose.
- *
- * derived from src/lib/libbsp/no_cpu/no_bsp/timer/timer.c
- *
- * This file manages the benchmark timer used by the RTEMS Timing Test
- * Suite. Each measured time period is demarcated by calls to
- * Timer_initialize() and Read_timer(). Read_timer() usually returns
- * the number of microseconds since Timer_initialize() exitted.
- *
- * NOTE: It is important that the timer start/stop overhead be
- * determined when porting or modifying this code.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-/*
- * Rather than deleting this, it is commented out to (hopefully) help
- * the submitter send updates.
- *
- * static char _sccsid[] = "@(#)timer.c 08/20/96 1.5\n";
- */
-
-
-#include <rtems.h>
-
-#define CLOCKS_PER_MICROSECOND ( CPU_CLOCK_RATE_MHZ )
-#define TIMER_MAX_VALUE 0xffffffff
-
-extern unsigned32 mips_read_timer( void );
-
-static rtems_boolean Timer_driver_Find_average_overhead;
-static unsigned32 Timer_initial_value = 0;
-
-void Timer_initialize( void )
-{
- Timer_initial_value = mips_read_timer();
- /*
- * Somehow start the timer
- */
-
- /* Timer on 4650 is always running */
-}
-
-/*
- * The following controls the behavior of Read_timer().
- *
- * AVG_OVEREHAD is the overhead for starting and stopping the timer. It
- * is usually deducted from the number returned.
- *
- * LEAST_VALID is the lowest number this routine should trust. Numbers
- * below this are "noise" and zero is returned.
- */
-
-#define AVG_OVERHEAD 8 /* It typically takes X.X microseconds */
- /* (Y countdowns) to start/stop the timer. */
- /* This value is in cycles. */
-#define LEAST_VALID 1 /* Don't trust a clicks value lower than this */
-
-int Read_timer( void )
-{
- unsigned64 clicks;
- unsigned32 total;
-
- /*
- * Read the timer and see how many clicks it has been since we started.
- */
-
- clicks = mips_read_timer(); /* XXX: read some HW here */
- if (clicks < Timer_initial_value)
- {
- clicks += TIMER_MAX_VALUE;
- }
- clicks -= Timer_initial_value;
-
- /*
- * Total is calculated by taking into account the number of timer overflow
- * interrupts since the timer was initialized and clicks since the last
- * interrupts.
- */
-#if 0 /* leave total in number of cycles */
- total = clicks / CLOCKS_PER_MICROSECOND;
-#else
- total = clicks;
-#endif
-
- if ( Timer_driver_Find_average_overhead == 1 )
- return total; /* in # cycles units */
- else {
- if ( total < LEAST_VALID )
- return 0; /* below timer resolution */
- /*
- * leave total in cycles
- */
- return (total - AVG_OVERHEAD);
- }
-}
-
-/*
- * Empty function call used in loops to measure basic cost of looping
- * in Timing Test Suite.
- */
-
-rtems_status_code Empty_function( void )
-{
- return RTEMS_SUCCESSFUL;
-}
-
-void Set_find_average_overhead(
- rtems_boolean find_flag
-)
-{
- Timer_driver_Find_average_overhead = find_flag;
-}
-
diff --git a/c/src/lib/libcpu/powerpc/new-exceptions/cpu.c b/c/src/lib/libcpu/powerpc/new-exceptions/cpu.c
deleted file mode 100644
index e1c6eac4fd..0000000000
--- a/c/src/lib/libcpu/powerpc/new-exceptions/cpu.c
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * PowerPC CPU Dependent Source
- *
- * Author: Andrew Bray <andy@i-cubed.co.uk>
- *
- * COPYRIGHT (c) 1995 by i-cubed ltd.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of i-cubed limited not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * i-cubed limited makes no representations about the suitability
- * of this software for any purpose.
- *
- * Derived from c/src/exec/cpu/no_cpu/cpu.c:
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may be found in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/context.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/interr.h>
-
-
-/* _CPU_Initialize
- *
- * This routine performs processor dependent initialization.
- *
- * INPUT PARAMETERS:
- * cpu_table - CPU table to initialize
- * thread_dispatch - address of disptaching routine
- */
-
-void _CPU_Initialize(
- rtems_cpu_table *cpu_table,
- void (*thread_dispatch) /* ignored on this CPU */
-)
-{
- _CPU_Table = *cpu_table;
-}
-
-/*PAGE
- *
- * _CPU_Context_Initialize
- */
-
-void _CPU_Context_Initialize(
- Context_Control *the_context,
- unsigned32 *stack_base,
- unsigned32 size,
- unsigned32 new_level,
- void *entry_point,
- boolean is_fp
-)
-{
- unsigned32 msr_value;
- unsigned32 sp;
-
- sp = (unsigned32)stack_base + size - CPU_MINIMUM_STACK_FRAME_SIZE;
- *((unsigned32 *)sp) = 0;
- the_context->gpr1 = sp;
-
- _CPU_MSR_GET( msr_value );
-
- if (!(new_level & CPU_MODES_INTERRUPT_MASK)) {
- msr_value |= MSR_EE;
- }
- else {
- msr_value &= ~MSR_EE;
- }
-
- the_context->msr = msr_value;
-
- /*
- * The FP bit of the MSR should only be enabled if this is a floating
- * point task. Unfortunately, the vfprintf_r routine in newlib
- * ends up pushing a floating point register regardless of whether or
- * not a floating point number is being printed. Serious restructuring
- * of vfprintf.c will be required to avoid this behavior. At this
- * time (7 July 1997), this restructuring is not being done.
- */
-
- /*if ( is_fp ) */
- the_context->msr |= PPC_MSR_FP;
-
- the_context->pc = (unsigned32)entry_point;
-}
-
-
-
-/*PAGE
- *
- * _CPU_Install_interrupt_stack
- */
-
-void _CPU_Install_interrupt_stack( void )
-{
-}
-
-
-
-
diff --git a/c/src/lib/libcpu/powerpc/new-exceptions/cpu_asm.S b/c/src/lib/libcpu/powerpc/new-exceptions/cpu_asm.S
deleted file mode 100644
index 213e094fa6..0000000000
--- a/c/src/lib/libcpu/powerpc/new-exceptions/cpu_asm.S
+++ /dev/null
@@ -1,396 +0,0 @@
-
-/* cpu_asm.s 1.1 - 95/12/04
- *
- * This file contains the assembly code for the PowerPC implementation
- * of RTEMS.
- *
- * Author: Andrew Bray <andy@i-cubed.co.uk>
- *
- * COPYRIGHT (c) 1995 by i-cubed ltd.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of i-cubed limited not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * i-cubed limited makes no representations about the suitability
- * of this software for any purpose.
- *
- * Derived from c/src/exec/cpu/no_cpu/cpu_asm.c:
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <asm.h>
-
-/*
- * Offsets for various Contexts
- */
- .set GP_1, 0
- .set GP_2, (GP_1 + 4)
- .set GP_13, (GP_2 + 4)
- .set GP_14, (GP_13 + 4)
-
- .set GP_15, (GP_14 + 4)
- .set GP_16, (GP_15 + 4)
- .set GP_17, (GP_16 + 4)
- .set GP_18, (GP_17 + 4)
-
- .set GP_19, (GP_18 + 4)
- .set GP_20, (GP_19 + 4)
- .set GP_21, (GP_20 + 4)
- .set GP_22, (GP_21 + 4)
-
- .set GP_23, (GP_22 + 4)
- .set GP_24, (GP_23 + 4)
- .set GP_25, (GP_24 + 4)
- .set GP_26, (GP_25 + 4)
-
- .set GP_27, (GP_26 + 4)
- .set GP_28, (GP_27 + 4)
- .set GP_29, (GP_28 + 4)
- .set GP_30, (GP_29 + 4)
-
- .set GP_31, (GP_30 + 4)
- .set GP_CR, (GP_31 + 4)
- .set GP_PC, (GP_CR + 4)
- .set GP_MSR, (GP_PC + 4)
-
- .set FP_0, 0
- .set FP_1, (FP_0 + 4)
- .set FP_2, (FP_1 + 4)
- .set FP_3, (FP_2 + 4)
- .set FP_4, (FP_3 + 4)
- .set FP_5, (FP_4 + 4)
- .set FP_6, (FP_5 + 4)
- .set FP_7, (FP_6 + 4)
- .set FP_8, (FP_7 + 4)
- .set FP_9, (FP_8 + 4)
- .set FP_10, (FP_9 + 4)
- .set FP_11, (FP_10 + 4)
- .set FP_12, (FP_11 + 4)
- .set FP_13, (FP_12 + 4)
- .set FP_14, (FP_13 + 4)
- .set FP_15, (FP_14 + 4)
- .set FP_16, (FP_15 + 4)
- .set FP_17, (FP_16 + 4)
- .set FP_18, (FP_17 + 4)
- .set FP_19, (FP_18 + 4)
- .set FP_20, (FP_19 + 4)
- .set FP_21, (FP_20 + 4)
- .set FP_22, (FP_21 + 4)
- .set FP_23, (FP_22 + 4)
- .set FP_24, (FP_23 + 4)
- .set FP_25, (FP_24 + 4)
- .set FP_26, (FP_25 + 4)
- .set FP_27, (FP_26 + 4)
- .set FP_28, (FP_27 + 4)
- .set FP_29, (FP_28 + 4)
- .set FP_30, (FP_29 + 4)
- .set FP_31, (FP_30 + 4)
- .set FP_FPSCR, (FP_31 + 4)
-
- .set IP_LINK, 0
- .set IP_0, (IP_LINK + 8)
- .set IP_2, (IP_0 + 4)
-
- .set IP_3, (IP_2 + 4)
- .set IP_4, (IP_3 + 4)
- .set IP_5, (IP_4 + 4)
- .set IP_6, (IP_5 + 4)
-
- .set IP_7, (IP_6 + 4)
- .set IP_8, (IP_7 + 4)
- .set IP_9, (IP_8 + 4)
- .set IP_10, (IP_9 + 4)
-
- .set IP_11, (IP_10 + 4)
- .set IP_12, (IP_11 + 4)
- .set IP_13, (IP_12 + 4)
- .set IP_28, (IP_13 + 4)
-
- .set IP_29, (IP_28 + 4)
- .set IP_30, (IP_29 + 4)
- .set IP_31, (IP_30 + 4)
- .set IP_CR, (IP_31 + 4)
-
- .set IP_CTR, (IP_CR + 4)
- .set IP_XER, (IP_CTR + 4)
- .set IP_LR, (IP_XER + 4)
- .set IP_PC, (IP_LR + 4)
-
- .set IP_MSR, (IP_PC + 4)
- .set IP_END, (IP_MSR + 16)
-
- BEGIN_CODE
-/*
- * _CPU_Context_save_fp_context
- *
- * This routine is responsible for saving the FP context
- * at *fp_context_ptr. If the point to load the FP context
- * from is changed then the pointer is modified by this routine.
- *
- * Sometimes a macro implementation of this is in cpu.h which dereferences
- * the ** and a similarly named routine in this file is passed something
- * like a (Context_Control_fp *). The general rule on making this decision
- * is to avoid writing assembly language.
- */
-
- ALIGN (PPC_CACHE_ALIGNMENT, PPC_CACHE_ALIGN_POWER)
- PUBLIC_PROC (_CPU_Context_save_fp)
-PROC (_CPU_Context_save_fp):
-#if (PPC_HAS_FPU == 1)
- lwz r3, 0(r3)
- stfs f0, FP_0(r3)
- stfs f1, FP_1(r3)
- stfs f2, FP_2(r3)
- stfs f3, FP_3(r3)
- stfs f4, FP_4(r3)
- stfs f5, FP_5(r3)
- stfs f6, FP_6(r3)
- stfs f7, FP_7(r3)
- stfs f8, FP_8(r3)
- stfs f9, FP_9(r3)
- stfs f10, FP_10(r3)
- stfs f11, FP_11(r3)
- stfs f12, FP_12(r3)
- stfs f13, FP_13(r3)
- stfs f14, FP_14(r3)
- stfs f15, FP_15(r3)
- stfs f16, FP_16(r3)
- stfs f17, FP_17(r3)
- stfs f18, FP_18(r3)
- stfs f19, FP_19(r3)
- stfs f20, FP_20(r3)
- stfs f21, FP_21(r3)
- stfs f22, FP_22(r3)
- stfs f23, FP_23(r3)
- stfs f24, FP_24(r3)
- stfs f25, FP_25(r3)
- stfs f26, FP_26(r3)
- stfs f27, FP_27(r3)
- stfs f28, FP_28(r3)
- stfs f29, FP_29(r3)
- stfs f30, FP_30(r3)
- stfs f31, FP_31(r3)
- mffs f2
- stfs f2, FP_FPSCR(r3)
-#endif
- blr
-
-/*
- * _CPU_Context_restore_fp_context
- *
- * This routine is responsible for restoring the FP context
- * at *fp_context_ptr. If the point to load the FP context
- * from is changed then the pointer is modified by this routine.
- *
- * Sometimes a macro implementation of this is in cpu.h which dereferences
- * the ** and a similarly named routine in this file is passed something
- * like a (Context_Control_fp *). The general rule on making this decision
- * is to avoid writing assembly language.
- */
-
- ALIGN (PPC_CACHE_ALIGNMENT, PPC_CACHE_ALIGN_POWER)
- PUBLIC_PROC (_CPU_Context_restore_fp)
-PROC (_CPU_Context_restore_fp):
-#if (PPC_HAS_FPU == 1)
- lwz r3, 0(r3)
- lfs f2, FP_FPSCR(r3)
- mtfsf 255, f2
- lfs f0, FP_0(r3)
- lfs f1, FP_1(r3)
- lfs f2, FP_2(r3)
- lfs f3, FP_3(r3)
- lfs f4, FP_4(r3)
- lfs f5, FP_5(r3)
- lfs f6, FP_6(r3)
- lfs f7, FP_7(r3)
- lfs f8, FP_8(r3)
- lfs f9, FP_9(r3)
- lfs f10, FP_10(r3)
- lfs f11, FP_11(r3)
- lfs f12, FP_12(r3)
- lfs f13, FP_13(r3)
- lfs f14, FP_14(r3)
- lfs f15, FP_15(r3)
- lfs f16, FP_16(r3)
- lfs f17, FP_17(r3)
- lfs f18, FP_18(r3)
- lfs f19, FP_19(r3)
- lfs f20, FP_20(r3)
- lfs f21, FP_21(r3)
- lfs f22, FP_22(r3)
- lfs f23, FP_23(r3)
- lfs f24, FP_24(r3)
- lfs f25, FP_25(r3)
- lfs f26, FP_26(r3)
- lfs f27, FP_27(r3)
- lfs f28, FP_28(r3)
- lfs f29, FP_29(r3)
- lfs f30, FP_30(r3)
- lfs f31, FP_31(r3)
-#endif
- blr
-
-
-/* _CPU_Context_switch
- *
- * This routine performs a normal non-FP context switch.
- */
- ALIGN (PPC_CACHE_ALIGNMENT, PPC_CACHE_ALIGN_POWER)
- PUBLIC_PROC (_CPU_Context_switch)
-PROC (_CPU_Context_switch):
- sync
- isync
- /* This assumes that all the registers are in the given order */
- li r5, 32
- addi r3,r3,-4
-#if ( PPC_USE_DATA_CACHE )
- dcbz r5, r3
-#endif
- stw r1, GP_1+4(r3)
- stw r2, GP_2+4(r3)
-#if (PPC_USE_MULTIPLE == 1)
- addi r3, r3, GP_18+4
-#if ( PPC_USE_DATA_CACHE )
- dcbz r5, r3
-#endif
- stmw r13, GP_13-GP_18(r3)
-#else
- stw r13, GP_13+4(r3)
- stw r14, GP_14+4(r3)
- stw r15, GP_15+4(r3)
- stw r16, GP_16+4(r3)
- stw r17, GP_17+4(r3)
- stwu r18, GP_18+4(r3)
-#if ( PPC_USE_DATA_CACHE )
- dcbz r5, r3
-#endif
- stw r19, GP_19-GP_18(r3)
- stw r20, GP_20-GP_18(r3)
- stw r21, GP_21-GP_18(r3)
- stw r22, GP_22-GP_18(r3)
- stw r23, GP_23-GP_18(r3)
- stw r24, GP_24-GP_18(r3)
- stw r25, GP_25-GP_18(r3)
- stw r26, GP_26-GP_18(r3)
- stw r27, GP_27-GP_18(r3)
- stw r28, GP_28-GP_18(r3)
- stw r29, GP_29-GP_18(r3)
- stw r30, GP_30-GP_18(r3)
- stw r31, GP_31-GP_18(r3)
-#endif
-#if ( PPC_USE_DATA_CACHE )
- dcbt r0, r4
-#endif
- mfcr r6
- stw r6, GP_CR-GP_18(r3)
- mflr r7
- stw r7, GP_PC-GP_18(r3)
- mfmsr r8
- stw r8, GP_MSR-GP_18(r3)
-
-#if ( PPC_USE_DATA_CACHE )
- dcbt r5, r4
-#endif
- lwz r1, GP_1(r4)
- lwz r2, GP_2(r4)
-#if (PPC_USE_MULTIPLE == 1)
- addi r4, r4, GP_19
-#if ( PPC_USE_DATA_CACHE )
- dcbt r5, r4
-#endif
- lmw r13, GP_13-GP_19(r4)
-#else
- lwz r13, GP_13(r4)
- lwz r14, GP_14(r4)
- lwz r15, GP_15(r4)
- lwz r16, GP_16(r4)
- lwz r17, GP_17(r4)
- lwz r18, GP_18(r4)
- lwzu r19, GP_19(r4)
-#if ( PPC_USE_DATA_CACHE )
- dcbt r5, r4
-#endif
- lwz r20, GP_20-GP_19(r4)
- lwz r21, GP_21-GP_19(r4)
- lwz r22, GP_22-GP_19(r4)
- lwz r23, GP_23-GP_19(r4)
- lwz r24, GP_24-GP_19(r4)
- lwz r25, GP_25-GP_19(r4)
- lwz r26, GP_26-GP_19(r4)
- lwz r27, GP_27-GP_19(r4)
- lwz r28, GP_28-GP_19(r4)
- lwz r29, GP_29-GP_19(r4)
- lwz r30, GP_30-GP_19(r4)
- lwz r31, GP_31-GP_19(r4)
-#endif
- lwz r6, GP_CR-GP_19(r4)
- lwz r7, GP_PC-GP_19(r4)
- lwz r8, GP_MSR-GP_19(r4)
- mtcrf 255, r6
- mtlr r7
- mtmsr r8
-
- blr
-
-/*
- * _CPU_Context_restore
- *
- * This routine is generallu used only to restart self in an
- * efficient manner. It may simply be a label in _CPU_Context_switch.
- *
- * NOTE: May be unnecessary to reload some registers.
- */
-/*
- * ACB: Don't worry about cache optimisation here - this is not THAT critical.
- */
- ALIGN (PPC_CACHE_ALIGNMENT, PPC_CACHE_ALIGN_POWER)
- PUBLIC_PROC (_CPU_Context_restore)
-PROC (_CPU_Context_restore):
- lwz r5, GP_CR(r3)
- lwz r6, GP_PC(r3)
- lwz r7, GP_MSR(r3)
- mtcrf 255, r5
- mtlr r6
- mtmsr r7
- lwz r1, GP_1(r3)
- lwz r2, GP_2(r3)
-#if (PPC_USE_MULTIPLE == 1)
- lmw r13, GP_13(r3)
-#else
- lwz r13, GP_13(r3)
- lwz r14, GP_14(r3)
- lwz r15, GP_15(r3)
- lwz r16, GP_16(r3)
- lwz r17, GP_17(r3)
- lwz r18, GP_18(r3)
- lwz r19, GP_19(r3)
- lwz r20, GP_20(r3)
- lwz r21, GP_21(r3)
- lwz r22, GP_22(r3)
- lwz r23, GP_23(r3)
- lwz r24, GP_24(r3)
- lwz r25, GP_25(r3)
- lwz r26, GP_26(r3)
- lwz r27, GP_27(r3)
- lwz r28, GP_28(r3)
- lwz r29, GP_29(r3)
- lwz r30, GP_30(r3)
- lwz r31, GP_31(r3)
-#endif
-
- blr
-
diff --git a/c/src/lib/libcpu/powerpc/new_exception_processing/Makefile.am b/c/src/lib/libcpu/powerpc/new_exception_processing/Makefile.am
deleted file mode 100644
index c3195b159d..0000000000
--- a/c/src/lib/libcpu/powerpc/new_exception_processing/Makefile.am
+++ /dev/null
@@ -1,64 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-C_FILES = cpu.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-ROOT_H_FILES =
-RTEMS_SCORE_H_FILES = cpu.h c_isr.inl
-noinst_HEADERS = $(ROOT_H_FILES) $(RTEMS_SCORE_H_FILES)
-
-S_FILES = cpu_asm.S
-S_O_FILES = $(S_FILES:%.S=${ARCH}/%.o)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../../../../automake/lib.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-PREINSTALL_FILES = \
-$(PROJECT_INCLUDE) \
-$(PROJECT_INCLUDE)/rtems/score \
-$(ROOT_H_FILES:%=$(PROJECT_INCLUDE)/%) \
-$(RTEMS_SCORE_H_FILES:%=$(PROJECT_INCLUDE)/rtems/score/%)
-
-##TMPINSTALL_FILES += \
-##$(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o
-
-##$(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o: $(ARCH)/rtems.o
-## $(INSTALL_DATA) $< $@
-
-$(PROJECT_INCLUDE):
- $(mkinstalldirs) $@
-
-$(PROJECT_INCLUDE)/rtems/score:
- $(mkinstalldirs) $@
-
-$(PROJECT_INCLUDE)/rtems/score/%: %
- $(INSTALL_DATA) $< $@
-
-$(PROJECT_INCLUDE)/%: %
- $(INSTALL_DATA) $< $@
-
-REL = ../$(ARCH)/rtems-cpu.rel
-
-$(REL): $(C_O_FILES) $(S_O_FILES)
- test -d ../$(ARCH) || mkdir ../$(ARCH)
- $(make-rel)
-
-all-local: $(ARCH) $(PREINSTALL_FILES) $(REL)
-## all-local: $(ARCH)/rtems.o
-all-local: $(TMPINSTALL_FILES)
-
-clean-local:
- $(RM) -r ../o-optimize ../o-debug ../o-profile
-
-EXTRA_DIST = \
-$(C_FILES) $(S_FILES)
-
-include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/c/src/lib/libcpu/powerpc/new_exception_processing/c_isr.inl b/c/src/lib/libcpu/powerpc/new_exception_processing/c_isr.inl
deleted file mode 100644
index 68f8116fe9..0000000000
--- a/c/src/lib/libcpu/powerpc/new_exception_processing/c_isr.inl
+++ /dev/null
@@ -1,9 +0,0 @@
-RTEMS_INLINE_ROUTINE boolean _ISR_Is_in_progress( void )
-{
- register unsigned int isr_nesting_level;
- /*
- * Move from special purpose register 0 (mfspr SPRG0, r3)
- */
- asm volatile ("mfspr %0, 272" : "=r" (isr_nesting_level));
- return isr_nesting_level;
-}
diff --git a/c/src/lib/libcpu/powerpc/new_exception_processing/cpu.c b/c/src/lib/libcpu/powerpc/new_exception_processing/cpu.c
deleted file mode 100644
index e1c6eac4fd..0000000000
--- a/c/src/lib/libcpu/powerpc/new_exception_processing/cpu.c
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * PowerPC CPU Dependent Source
- *
- * Author: Andrew Bray <andy@i-cubed.co.uk>
- *
- * COPYRIGHT (c) 1995 by i-cubed ltd.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of i-cubed limited not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * i-cubed limited makes no representations about the suitability
- * of this software for any purpose.
- *
- * Derived from c/src/exec/cpu/no_cpu/cpu.c:
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may be found in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/context.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/interr.h>
-
-
-/* _CPU_Initialize
- *
- * This routine performs processor dependent initialization.
- *
- * INPUT PARAMETERS:
- * cpu_table - CPU table to initialize
- * thread_dispatch - address of disptaching routine
- */
-
-void _CPU_Initialize(
- rtems_cpu_table *cpu_table,
- void (*thread_dispatch) /* ignored on this CPU */
-)
-{
- _CPU_Table = *cpu_table;
-}
-
-/*PAGE
- *
- * _CPU_Context_Initialize
- */
-
-void _CPU_Context_Initialize(
- Context_Control *the_context,
- unsigned32 *stack_base,
- unsigned32 size,
- unsigned32 new_level,
- void *entry_point,
- boolean is_fp
-)
-{
- unsigned32 msr_value;
- unsigned32 sp;
-
- sp = (unsigned32)stack_base + size - CPU_MINIMUM_STACK_FRAME_SIZE;
- *((unsigned32 *)sp) = 0;
- the_context->gpr1 = sp;
-
- _CPU_MSR_GET( msr_value );
-
- if (!(new_level & CPU_MODES_INTERRUPT_MASK)) {
- msr_value |= MSR_EE;
- }
- else {
- msr_value &= ~MSR_EE;
- }
-
- the_context->msr = msr_value;
-
- /*
- * The FP bit of the MSR should only be enabled if this is a floating
- * point task. Unfortunately, the vfprintf_r routine in newlib
- * ends up pushing a floating point register regardless of whether or
- * not a floating point number is being printed. Serious restructuring
- * of vfprintf.c will be required to avoid this behavior. At this
- * time (7 July 1997), this restructuring is not being done.
- */
-
- /*if ( is_fp ) */
- the_context->msr |= PPC_MSR_FP;
-
- the_context->pc = (unsigned32)entry_point;
-}
-
-
-
-/*PAGE
- *
- * _CPU_Install_interrupt_stack
- */
-
-void _CPU_Install_interrupt_stack( void )
-{
-}
-
-
-
-
diff --git a/c/src/lib/libcpu/powerpc/new_exception_processing/cpu.h b/c/src/lib/libcpu/powerpc/new_exception_processing/cpu.h
deleted file mode 100644
index bf2204fd3d..0000000000
--- a/c/src/lib/libcpu/powerpc/new_exception_processing/cpu.h
+++ /dev/null
@@ -1,947 +0,0 @@
-/* cpu.h
- *
- * This include file contains information pertaining to the PowerPC
- * processor.
- *
- * Author: Andrew Bray <andy@i-cubed.co.uk>
- *
- * COPYRIGHT (c) 1995 by i-cubed ltd.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of i-cubed limited not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * i-cubed limited makes no representations about the suitability
- * of this software for any purpose.
- *
- * Derived from c/src/exec/cpu/no_cpu/cpu.h:
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may be found in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __CPU_h
-#define __CPU_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/ppc.h> /* pick up machine definitions */
-#include <libcpu/cpu.h>
-
-#ifndef ASM
-#include <rtems/score/ppctypes.h>
-#endif
-
-/* conditional compilation parameters */
-
-/*
- * Should the calls to _Thread_Enable_dispatch be inlined?
- *
- * If TRUE, then they are inlined.
- * If FALSE, then a subroutine call is made.
- *
- * Basically this is an example of the classic trade-off of size
- * versus speed. Inlining the call (TRUE) typically increases the
- * size of RTEMS while speeding up the enabling of dispatching.
- * [NOTE: In general, the _Thread_Dispatch_disable_level will
- * only be 0 or 1 unless you are in an interrupt handler and that
- * interrupt handler invokes the executive.] When not inlined
- * something calls _Thread_Enable_dispatch which in turns calls
- * _Thread_Dispatch. If the enable dispatch is inlined, then
- * one subroutine call is avoided entirely.]
- */
-
-#define CPU_INLINE_ENABLE_DISPATCH FALSE
-
-/*
- * Should the body of the search loops in _Thread_queue_Enqueue_priority
- * be unrolled one time? In unrolled each iteration of the loop examines
- * two "nodes" on the chain being searched. Otherwise, only one node
- * is examined per iteration.
- *
- * If TRUE, then the loops are unrolled.
- * If FALSE, then the loops are not unrolled.
- *
- * The primary factor in making this decision is the cost of disabling
- * and enabling interrupts (_ISR_Flash) versus the cost of rest of the
- * body of the loop. On some CPUs, the flash is more expensive than
- * one iteration of the loop body. In this case, it might be desirable
- * to unroll the loop. It is important to note that on some CPUs, this
- * code is the longest interrupt disable period in RTEMS. So it is
- * necessary to strike a balance when setting this parameter.
- */
-
-#define CPU_UNROLL_ENQUEUE_PRIORITY FALSE
-
-/*
- * Does RTEMS manage a dedicated interrupt stack in software?
- *
- * If TRUE, then a stack is allocated in _Interrupt_Manager_initialization.
- * If FALSE, nothing is done.
- *
- * If the CPU supports a dedicated interrupt stack in hardware,
- * then it is generally the responsibility of the BSP to allocate it
- * and set it up.
- *
- * If the CPU does not support a dedicated interrupt stack, then
- * the porter has two options: (1) execute interrupts on the
- * stack of the interrupted task, and (2) have RTEMS manage a dedicated
- * interrupt stack.
- *
- * If this is TRUE, CPU_ALLOCATE_INTERRUPT_STACK should also be TRUE.
- *
- * Only one of CPU_HAS_SOFTWARE_INTERRUPT_STACK and
- * CPU_HAS_HARDWARE_INTERRUPT_STACK should be set to TRUE. It is
- * possible that both are FALSE for a particular CPU. Although it
- * is unclear what that would imply about the interrupt processing
- * procedure on that CPU.
- */
-
-#define CPU_HAS_SOFTWARE_INTERRUPT_STACK TRUE
-
-/*
- * Does this CPU have hardware support for a dedicated interrupt stack?
- *
- * If TRUE, then it must be installed during initialization.
- * If FALSE, then no installation is performed.
- *
- * If this is TRUE, CPU_ALLOCATE_INTERRUPT_STACK should also be TRUE.
- *
- * Only one of CPU_HAS_SOFTWARE_INTERRUPT_STACK and
- * CPU_HAS_HARDWARE_INTERRUPT_STACK should be set to TRUE. It is
- * possible that both are FALSE for a particular CPU. Although it
- * is unclear what that would imply about the interrupt processing
- * procedure on that CPU.
- */
-
-#define CPU_HAS_HARDWARE_INTERRUPT_STACK FALSE
-
-/*
- * Does RTEMS allocate a dedicated interrupt stack in the Interrupt Manager?
- *
- * If TRUE, then the memory is allocated during initialization.
- * If FALSE, then the memory is allocated during initialization.
- *
- * This should be TRUE is CPU_HAS_SOFTWARE_INTERRUPT_STACK is TRUE
- * or CPU_INSTALL_HARDWARE_INTERRUPT_STACK is TRUE.
- */
-
-#define CPU_ALLOCATE_INTERRUPT_STACK FALSE
-
-/*
- * Does the RTEMS invoke the user's ISR with the vector number and
- * a pointer to the saved interrupt frame (1) or just the vector
- * number (0)?
- */
-
-#define CPU_ISR_PASSES_FRAME_POINTER 0
-
-/*
- * Does the CPU have hardware floating point?
- *
- * If TRUE, then the RTEMS_FLOATING_POINT task attribute is supported.
- * If FALSE, then the RTEMS_FLOATING_POINT task attribute is ignored.
- *
- * If there is a FP coprocessor such as the i387 or mc68881, then
- * the answer is TRUE.
- *
- * The macro name "PPC_HAS_FPU" should be made CPU specific.
- * It indicates whether or not this CPU model has FP support. For
- * example, it would be possible to have an i386_nofp CPU model
- * which set this to false to indicate that you have an i386 without
- * an i387 and wish to leave floating point support out of RTEMS.
- */
-
-#if ( PPC_HAS_FPU == 1 )
-#define CPU_HARDWARE_FP TRUE
-#else
-#define CPU_HARDWARE_FP FALSE
-#endif
-
-/*
- * Are all tasks RTEMS_FLOATING_POINT tasks implicitly?
- *
- * If TRUE, then the RTEMS_FLOATING_POINT task attribute is assumed.
- * If FALSE, then the RTEMS_FLOATING_POINT task attribute is followed.
- *
- * So far, the only CPU in which this option has been used is the
- * HP PA-RISC. The HP C compiler and gcc both implicitly use the
- * floating point registers to perform integer multiplies. If
- * a function which you would not think utilize the FP unit DOES,
- * then one can not easily predict which tasks will use the FP hardware.
- * In this case, this option should be TRUE.
- *
- * If CPU_HARDWARE_FP is FALSE, then this should be FALSE as well.
- */
-
-#define CPU_ALL_TASKS_ARE_FP FALSE
-
-/*
- * Should the IDLE task have a floating point context?
- *
- * If TRUE, then the IDLE task is created as a RTEMS_FLOATING_POINT task
- * and it has a floating point context which is switched in and out.
- * If FALSE, then the IDLE task does not have a floating point context.
- *
- * Setting this to TRUE negatively impacts the time required to preempt
- * the IDLE task from an interrupt because the floating point context
- * must be saved as part of the preemption.
- */
-
-#define CPU_IDLE_TASK_IS_FP FALSE
-
-/*
- * Should the saving of the floating point registers be deferred
- * until a context switch is made to another different floating point
- * task?
- *
- * If TRUE, then the floating point context will not be stored until
- * necessary. It will remain in the floating point registers and not
- * disturned until another floating point task is switched to.
- *
- * If FALSE, then the floating point context is saved when a floating
- * point task is switched out and restored when the next floating point
- * task is restored. The state of the floating point registers between
- * those two operations is not specified.
- *
- * If the floating point context does NOT have to be saved as part of
- * interrupt dispatching, then it should be safe to set this to TRUE.
- *
- * Setting this flag to TRUE results in using a different algorithm
- * for deciding when to save and restore the floating point context.
- * The deferred FP switch algorithm minimizes the number of times
- * the FP context is saved and restored. The FP context is not saved
- * until a context switch is made to another, different FP task.
- * Thus in a system with only one FP task, the FP context will never
- * be saved or restored.
- */
-/*
- * ACB Note: This could make debugging tricky..
- */
-
-#define CPU_USE_DEFERRED_FP_SWITCH TRUE
-
-/*
- * Does this port provide a CPU dependent IDLE task implementation?
- *
- * If TRUE, then the routine _CPU_Thread_Idle_body
- * must be provided and is the default IDLE thread body instead of
- * _CPU_Thread_Idle_body.
- *
- * If FALSE, then use the generic IDLE thread body if the BSP does
- * not provide one.
- *
- * This is intended to allow for supporting processors which have
- * a low power or idle mode. When the IDLE thread is executed, then
- * the CPU can be powered down.
- *
- * The order of precedence for selecting the IDLE thread body is:
- *
- * 1. BSP provided
- * 2. CPU dependent (if provided)
- * 3. generic (if no BSP and no CPU dependent)
- */
-
-#define CPU_PROVIDES_IDLE_THREAD_BODY FALSE
-
-/*
- * Does the stack grow up (toward higher addresses) or down
- * (toward lower addresses)?
- *
- * If TRUE, then the grows upward.
- * If FALSE, then the grows toward smaller addresses.
- */
-
-#define CPU_STACK_GROWS_UP FALSE
-
-/*
- * The following is the variable attribute used to force alignment
- * of critical RTEMS structures. On some processors it may make
- * sense to have these aligned on tighter boundaries than
- * the minimum requirements of the compiler in order to have as
- * much of the critical data area as possible in a cache line.
- *
- * The placement of this macro in the declaration of the variables
- * is based on the syntactically requirements of the GNU C
- * "__attribute__" extension. For example with GNU C, use
- * the following to force a structures to a 32 byte boundary.
- *
- * __attribute__ ((aligned (32)))
- *
- * NOTE: Currently only the Priority Bit Map table uses this feature.
- * To benefit from using this, the data must be heavily
- * used so it will stay in the cache and used frequently enough
- * in the executive to justify turning this on.
- */
-
-#define CPU_STRUCTURE_ALIGNMENT \
- __attribute__ ((aligned (PPC_CACHE_ALIGNMENT)))
-
-/*
- * Define what is required to specify how the network to host conversion
- * routines are handled.
- */
-
-#define CPU_HAS_OWN_HOST_TO_NETWORK_ROUTINES FALSE
-#define CPU_BIG_ENDIAN TRUE
-#define CPU_LITTLE_ENDIAN FALSE
-
-
-/*
- * Processor defined structures
- *
- * Examples structures include the descriptor tables from the i386
- * and the processor control structure on the i960ca.
- */
-
-/* may need to put some structures here. */
-
-/*
- * Contexts
- *
- * Generally there are 2 types of context to save.
- * 1. Interrupt registers to save
- * 2. Task level registers to save
- *
- * This means we have the following 3 context items:
- * 1. task level context stuff:: Context_Control
- * 2. floating point task stuff:: Context_Control_fp
- * 3. special interrupt level context :: Context_Control_interrupt
- *
- * On some processors, it is cost-effective to save only the callee
- * preserved registers during a task context switch. This means
- * that the ISR code needs to save those registers which do not
- * persist across function calls. It is not mandatory to make this
- * distinctions between the caller/callee saves registers for the
- * purpose of minimizing context saved during task switch and on interrupts.
- * If the cost of saving extra registers is minimal, simplicity is the
- * choice. Save the same context on interrupt entry as for tasks in
- * this case.
- *
- * Additionally, if gdb is to be made aware of RTEMS tasks for this CPU, then
- * care should be used in designing the context area.
- *
- * On some CPUs with hardware floating point support, the Context_Control_fp
- * structure will not be used or it simply consist of an array of a
- * fixed number of bytes. This is done when the floating point context
- * is dumped by a "FP save context" type instruction and the format
- * is not really defined by the CPU. In this case, there is no need
- * to figure out the exact format -- only the size. Of course, although
- * this is enough information for RTEMS, it is probably not enough for
- * a debugger such as gdb. But that is another problem.
- */
-
-#ifndef ASM
-
-typedef struct {
- unsigned32 gpr1; /* Stack pointer for all */
- unsigned32 gpr2; /* TOC in PowerOpen, reserved SVR4, section ptr EABI + */
- unsigned32 gpr13; /* First non volatile PowerOpen, section ptr SVR4/EABI */
- unsigned32 gpr14; /* Non volatile for all */
- unsigned32 gpr15; /* Non volatile for all */
- unsigned32 gpr16; /* Non volatile for all */
- unsigned32 gpr17; /* Non volatile for all */
- unsigned32 gpr18; /* Non volatile for all */
- unsigned32 gpr19; /* Non volatile for all */
- unsigned32 gpr20; /* Non volatile for all */
- unsigned32 gpr21; /* Non volatile for all */
- unsigned32 gpr22; /* Non volatile for all */
- unsigned32 gpr23; /* Non volatile for all */
- unsigned32 gpr24; /* Non volatile for all */
- unsigned32 gpr25; /* Non volatile for all */
- unsigned32 gpr26; /* Non volatile for all */
- unsigned32 gpr27; /* Non volatile for all */
- unsigned32 gpr28; /* Non volatile for all */
- unsigned32 gpr29; /* Non volatile for all */
- unsigned32 gpr30; /* Non volatile for all */
- unsigned32 gpr31; /* Non volatile for all */
- unsigned32 cr; /* PART of the CR is non volatile for all */
- unsigned32 pc; /* Program counter/Link register */
- unsigned32 msr; /* Initial interrupt level */
-} Context_Control;
-
-typedef struct {
- /* The ABIs (PowerOpen/SVR4/EABI) only require saving f14-f31 over
- * procedure calls. However, this would mean that the interrupt
- * frame had to hold f0-f13, and the fpscr. And as the majority
- * of tasks will not have an FP context, we will save the whole
- * context here.
- */
-#if (PPC_HAS_DOUBLE == 1)
- double f[32];
- double fpscr;
-#else
- float f[32];
- float fpscr;
-#endif
-} Context_Control_fp;
-
-typedef struct CPU_Interrupt_frame {
- unsigned32 stacklink; /* Ensure this is a real frame (also reg1 save) */
- unsigned32 calleeLr; /* link register used by callees: SVR4/EABI */
- /* This is what is left out of the primary contexts */
- unsigned32 gpr0;
- unsigned32 gpr2; /* play safe */
- unsigned32 gpr3;
- unsigned32 gpr4;
- unsigned32 gpr5;
- unsigned32 gpr6;
- unsigned32 gpr7;
- unsigned32 gpr8;
- unsigned32 gpr9;
- unsigned32 gpr10;
- unsigned32 gpr11;
- unsigned32 gpr12;
- unsigned32 gpr13; /* Play safe */
- unsigned32 gpr28; /* For internal use by the IRQ handler */
- unsigned32 gpr29; /* For internal use by the IRQ handler */
- unsigned32 gpr30; /* For internal use by the IRQ handler */
- unsigned32 gpr31; /* For internal use by the IRQ handler */
- unsigned32 cr; /* Bits of this are volatile, so no-one may save */
- unsigned32 ctr;
- unsigned32 xer;
- unsigned32 lr;
- unsigned32 pc;
- unsigned32 msr;
- unsigned32 pad[3];
-} CPU_Interrupt_frame;
-
-/*
- * The following table contains the information required to configure
- * the PowerPC processor specific parameters.
- */
-
-typedef struct {
- void (*pretasking_hook)( void );
- void (*predriver_hook)( void );
- void (*postdriver_hook)( void );
- void (*idle_task)( void );
- boolean do_zero_of_workspace;
- unsigned32 idle_task_stack_size;
- unsigned32 interrupt_stack_size;
- unsigned32 extra_mpci_receive_server_stack;
- void * (*stack_allocate_hook)( unsigned32 );
- void (*stack_free_hook)( void* );
- /* end of fields required on all CPUs */
-
- unsigned32 clicks_per_usec; /* Timer clicks per microsecond */
- boolean exceptions_in_RAM; /* TRUE if in RAM */
-
-} rtems_cpu_table;
-
-/*
- * Macros to access required entires in the CPU Table are in
- * the file rtems/system.h.
- */
-
-/*
- * Macros to access PowerPC MPC750 specific additions to the CPU Table
- */
-
-#define rtems_cpu_configuration_get_clicks_per_usec() \
- (_CPU_Table.clicks_per_usec)
-
-#define rtems_cpu_configuration_get_exceptions_in_ram() \
- (_CPU_Table.exceptions_in_RAM)
-
-/*
- * This variable is optional. It is used on CPUs on which it is difficult
- * to generate an "uninitialized" FP context. It is filled in by
- * _CPU_Initialize and copied into the task's FP context area during
- * _CPU_Context_Initialize.
- */
-
-/* EXTERN Context_Control_fp _CPU_Null_fp_context; */
-
-/*
- * On some CPUs, RTEMS supports a software managed interrupt stack.
- * This stack is allocated by the Interrupt Manager and the switch
- * is performed in _ISR_Handler. These variables contain pointers
- * to the lowest and highest addresses in the chunk of memory allocated
- * for the interrupt stack. Since it is unknown whether the stack
- * grows up or down (in general), this give the CPU dependent
- * code the option of picking the version it wants to use.
- *
- * NOTE: These two variables are required if the macro
- * CPU_HAS_SOFTWARE_INTERRUPT_STACK is defined as TRUE.
- */
-
-SCORE_EXTERN void *_CPU_Interrupt_stack_low;
-SCORE_EXTERN void *_CPU_Interrupt_stack_high;
-
-#endif /* ndef ASM */
-
-/*
- * This defines the number of levels and the mask used to pick those
- * bits out of a thread mode.
- */
-
-#define CPU_MODES_INTERRUPT_LEVEL 0x00000001 /* interrupt level in mode */
-#define CPU_MODES_INTERRUPT_MASK 0x00000001 /* interrupt level in mode */
-
-/*
- * With some compilation systems, it is difficult if not impossible to
- * call a high-level language routine from assembly language. This
- * is especially true of commercial Ada compilers and name mangling
- * C++ ones. This variable can be optionally defined by the CPU porter
- * and contains the address of the routine _Thread_Dispatch. This
- * can make it easier to invoke that routine at the end of the interrupt
- * sequence (if a dispatch is necessary).
- */
-
-/* EXTERN void (*_CPU_Thread_dispatch_pointer)(); */
-
-/*
- * Nothing prevents the porter from declaring more CPU specific variables.
- */
-
-#ifndef ASM
-
-SCORE_EXTERN struct {
- unsigned32 *Disable_level;
- void *Stack;
- volatile boolean *Switch_necessary;
- boolean *Signal;
-
-} _CPU_IRQ_info CPU_STRUCTURE_ALIGNMENT;
-
-#endif /* ndef ASM */
-
-/*
- * The size of the floating point context area. On some CPUs this
- * will not be a "sizeof" because the format of the floating point
- * area is not defined -- only the size is. This is usually on
- * CPUs with a "floating point save context" instruction.
- */
-
-#define CPU_CONTEXT_FP_SIZE sizeof( Context_Control_fp )
-
-/*
- * (Optional) # of bytes for libmisc/stackchk to check
- * If not specifed, then it defaults to something reasonable
- * for most architectures.
- */
-
-#define CPU_STACK_CHECK_SIZE (128)
-
-/*
- * Amount of extra stack (above minimum stack size) required by
- * MPCI receive server thread. Remember that in a multiprocessor
- * system this thread must exist and be able to process all directives.
- */
-
-#define CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK 0
-
-/*
- * This defines the number of entries in the ISR_Vector_table managed
- * by RTEMS.
- */
-
-#define CPU_INTERRUPT_NUMBER_OF_VECTORS (PPC_INTERRUPT_MAX)
-#define CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER (PPC_INTERRUPT_MAX - 1)
-
-/*
- * Should be large enough to run all RTEMS tests. This insures
- * that a "reasonable" small application should not have any problems.
- */
-
-#define CPU_STACK_MINIMUM_SIZE (1024*8)
-
-/*
- * CPU's worst alignment requirement for data types on a byte boundary. This
- * alignment does not take into account the requirements for the stack.
- */
-
-#define CPU_ALIGNMENT (PPC_ALIGNMENT)
-
-/*
- * This number corresponds to the byte alignment requirement for the
- * heap handler. This alignment requirement may be stricter than that
- * for the data types alignment specified by CPU_ALIGNMENT. It is
- * common for the heap to follow the same alignment requirement as
- * CPU_ALIGNMENT. If the CPU_ALIGNMENT is strict enough for the heap,
- * then this should be set to CPU_ALIGNMENT.
- *
- * NOTE: This does not have to be a power of 2. It does have to
- * be greater or equal to than CPU_ALIGNMENT.
- */
-
-#define CPU_HEAP_ALIGNMENT (PPC_ALIGNMENT)
-
-/*
- * This number corresponds to the byte alignment requirement for memory
- * buffers allocated by the partition manager. This alignment requirement
- * may be stricter than that for the data types alignment specified by
- * CPU_ALIGNMENT. It is common for the partition to follow the same
- * alignment requirement as CPU_ALIGNMENT. If the CPU_ALIGNMENT is strict
- * enough for the partition, then this should be set to CPU_ALIGNMENT.
- *
- * NOTE: This does not have to be a power of 2. It does have to
- * be greater or equal to than CPU_ALIGNMENT.
- */
-
-#define CPU_PARTITION_ALIGNMENT (PPC_ALIGNMENT)
-
-/*
- * This number corresponds to the byte alignment requirement for the
- * stack. This alignment requirement may be stricter than that for the
- * data types alignment specified by CPU_ALIGNMENT. If the CPU_ALIGNMENT
- * is strict enough for the stack, then this should be set to 0.
- *
- * NOTE: This must be a power of 2 either 0 or greater than CPU_ALIGNMENT.
- */
-
-#define CPU_STACK_ALIGNMENT (PPC_STACK_ALIGNMENT)
-
-/*
- * Needed for Interrupt stack
- */
-#define CPU_MINIMUM_STACK_FRAME_SIZE 8
-
-
-/* ISR handler macros */
-
-/*
- * Disable all interrupts for an RTEMS critical section. The previous
- * level is returned in _isr_cookie.
- */
-
-#define loc_string(a,b) a " (" #b ")\n"
-
-#ifndef ASM
-
-static inline unsigned32 _CPU_ISR_Get_level( void )
-{
- register unsigned int msr;
- _CPU_MSR_GET(msr);
- if (msr & MSR_EE) return 0;
- else return 1;
-}
-
-static inline void _CPU_ISR_Set_level( unsigned32 level )
-{
- register unsigned int msr;
- _CPU_MSR_GET(msr);
- if (!(level & CPU_MODES_INTERRUPT_MASK)) {
- msr |= MSR_EE;
- }
- else {
- msr &= ~MSR_EE;
- }
- _CPU_MSR_SET(msr);
-}
-
-#define _CPU_ISR_install_vector(irq, new, old) {BSP_panic("_CPU_ISR_install_vector called\n");}
-
-/* Context handler macros */
-
-/*
- * Initialize the context to a state suitable for starting a
- * task after a context restore operation. Generally, this
- * involves:
- *
- * - setting a starting address
- * - preparing the stack
- * - preparing the stack and frame pointers
- * - setting the proper interrupt level in the context
- * - initializing the floating point context
- *
- * This routine generally does not set any unnecessary register
- * in the context. The state of the "general data" registers is
- * undefined at task start time.
- *
- * NOTE: Implemented as a subroutine for the SPARC port.
- */
-
-void _CPU_Context_Initialize(
- Context_Control *the_context,
- unsigned32 *stack_base,
- unsigned32 size,
- unsigned32 new_level,
- void *entry_point,
- boolean is_fp
-);
-
-/*
- * This routine is responsible for somehow restarting the currently
- * executing task. If you are lucky, then all that is necessary
- * is restoring the context. Otherwise, there will need to be
- * a special assembly routine which does something special in this
- * case. Context_Restore should work most of the time. It will
- * not work if restarting self conflicts with the stack frame
- * assumptions of restoring a context.
- */
-
-#define _CPU_Context_Restart_self( _the_context ) \
- _CPU_Context_restore( (_the_context) );
-
-/*
- * The purpose of this macro is to allow the initial pointer into
- * a floating point context area (used to save the floating point
- * context) to be at an arbitrary place in the floating point
- * context area.
- *
- * This is necessary because some FP units are designed to have
- * their context saved as a stack which grows into lower addresses.
- * Other FP units can be saved by simply moving registers into offsets
- * from the base of the context area. Finally some FP units provide
- * a "dump context" instruction which could fill in from high to low
- * or low to high based on the whim of the CPU designers.
- */
-
-#define _CPU_Context_Fp_start( _base, _offset ) \
- ( (void *) _Addresses_Add_offset( (_base), (_offset) ) )
-
-/*
- * This routine initializes the FP context area passed to it to.
- * There are a few standard ways in which to initialize the
- * floating point context. The code included for this macro assumes
- * that this is a CPU in which a "initial" FP context was saved into
- * _CPU_Null_fp_context and it simply copies it to the destination
- * context passed to it.
- *
- * Other models include (1) not doing anything, and (2) putting
- * a "null FP status word" in the correct place in the FP context.
- */
-
-#define _CPU_Context_Initialize_fp( _destination ) \
- { \
- ((Context_Control_fp *) *((void **) _destination))->fpscr = PPC_INIT_FPSCR; \
- }
-
-/* end of Context handler macros */
-
-/* Fatal Error manager macros */
-
-/*
- * This routine copies _error into a known place -- typically a stack
- * location or a register, optionally disables interrupts, and
- * halts/stops the CPU.
- */
-
-#define _CPU_Fatal_halt( _error ) \
- _BSP_Fatal_error(_error)
-
-/* end of Fatal Error manager macros */
-
-/* Bitfield handler macros */
-
-/*
- * This routine sets _output to the bit number of the first bit
- * set in _value. _value is of CPU dependent type Priority_Bit_map_control.
- * This type may be either 16 or 32 bits wide although only the 16
- * least significant bits will be used.
- *
- * There are a number of variables in using a "find first bit" type
- * instruction.
- *
- * (1) What happens when run on a value of zero?
- * (2) Bits may be numbered from MSB to LSB or vice-versa.
- * (3) The numbering may be zero or one based.
- * (4) The "find first bit" instruction may search from MSB or LSB.
- *
- * RTEMS guarantees that (1) will never happen so it is not a concern.
- * (2),(3), (4) are handled by the macros _CPU_Priority_mask() and
- * _CPU_Priority_Bits_index(). These three form a set of routines
- * which must logically operate together. Bits in the _value are
- * set and cleared based on masks built by _CPU_Priority_mask().
- * The basic major and minor values calculated by _Priority_Major()
- * and _Priority_Minor() are "massaged" by _CPU_Priority_Bits_index()
- * to properly range between the values returned by the "find first bit"
- * instruction. This makes it possible for _Priority_Get_highest() to
- * calculate the major and directly index into the minor table.
- * This mapping is necessary to ensure that 0 (a high priority major/minor)
- * is the first bit found.
- *
- * This entire "find first bit" and mapping process depends heavily
- * on the manner in which a priority is broken into a major and minor
- * components with the major being the 4 MSB of a priority and minor
- * the 4 LSB. Thus (0 << 4) + 0 corresponds to priority 0 -- the highest
- * priority. And (15 << 4) + 14 corresponds to priority 254 -- the next
- * to the lowest priority.
- *
- * If your CPU does not have a "find first bit" instruction, then
- * there are ways to make do without it. Here are a handful of ways
- * to implement this in software:
- *
- * - a series of 16 bit test instructions
- * - a "binary search using if's"
- * - _number = 0
- * if _value > 0x00ff
- * _value >>=8
- * _number = 8;
- *
- * if _value > 0x0000f
- * _value >=8
- * _number += 4
- *
- * _number += bit_set_table[ _value ]
- *
- * where bit_set_table[ 16 ] has values which indicate the first
- * bit set
- */
-
-#define _CPU_Bitfield_Find_first_bit( _value, _output ) \
- { \
- asm volatile ("cntlzw %0, %1" : "=r" ((_output)), "=r" ((_value)) : \
- "1" ((_value))); \
- }
-
-/* end of Bitfield handler macros */
-
-/*
- * This routine builds the mask which corresponds to the bit fields
- * as searched by _CPU_Bitfield_Find_first_bit(). See the discussion
- * for that routine.
- */
-
-#define _CPU_Priority_Mask( _bit_number ) \
- ( 0x80000000 >> (_bit_number) )
-
-/*
- * This routine translates the bit numbers returned by
- * _CPU_Bitfield_Find_first_bit() into something suitable for use as
- * a major or minor component of a priority. See the discussion
- * for that routine.
- */
-
-#define _CPU_Priority_bits_index( _priority ) \
- (_priority)
-
-/* end of Priority handler macros */
-
-/* variables */
-
-extern const unsigned32 _CPU_msrs[4];
-
-/* functions */
-
-/*
- * _CPU_Initialize
- *
- * This routine performs CPU dependent initialization.
- */
-
-void _CPU_Initialize(
- rtems_cpu_table *cpu_table,
- void (*thread_dispatch)
-);
-
-
-/*
- * _CPU_Install_interrupt_stack
- *
- * This routine installs the hardware interrupt stack pointer.
- *
- * NOTE: It need only be provided if CPU_HAS_HARDWARE_INTERRUPT_STACK
- * is TRUE.
- */
-
-void _CPU_Install_interrupt_stack( void );
-
-/*
- * _CPU_Context_switch
- *
- * This routine switches from the run context to the heir context.
- */
-
-void _CPU_Context_switch(
- Context_Control *run,
- Context_Control *heir
-);
-
-/*
- * _CPU_Context_restore
- *
- * This routine is generallu used only to restart self in an
- * efficient manner. It may simply be a label in _CPU_Context_switch.
- *
- * NOTE: May be unnecessary to reload some registers.
- */
-
-void _CPU_Context_restore(
- Context_Control *new_context
-);
-
-/*
- * _CPU_Context_save_fp
- *
- * This routine saves the floating point context passed to it.
- */
-
-void _CPU_Context_save_fp(
- void **fp_context_ptr
-);
-
-/*
- * _CPU_Context_restore_fp
- *
- * This routine restores the floating point context passed to it.
- */
-
-void _CPU_Context_restore_fp(
- void **fp_context_ptr
-);
-
-void _CPU_Fatal_error(
- unsigned32 _error
-);
-
-/* The following routine swaps the endian format of an unsigned int.
- * It must be static because it is referenced indirectly.
- *
- * This version will work on any processor, but if there is a better
- * way for your CPU PLEASE use it. The most common way to do this is to:
- *
- * swap least significant two bytes with 16-bit rotate
- * swap upper and lower 16-bits
- * swap most significant two bytes with 16-bit rotate
- *
- * Some CPUs have special instructions which swap a 32-bit quantity in
- * a single instruction (e.g. i486). It is probably best to avoid
- * an "endian swapping control bit" in the CPU. One good reason is
- * that interrupts would probably have to be disabled to insure that
- * an interrupt does not try to access the same "chunk" with the wrong
- * endian. Another good reason is that on some CPUs, the endian bit
- * endianness for ALL fetches -- both code and data -- so the code
- * will be fetched incorrectly.
- */
-
-static inline unsigned int CPU_swap_u32(
- unsigned int value
-)
-{
- unsigned32 swapped;
-
- asm volatile("rlwimi %0,%1,8,24,31;"
- "rlwimi %0,%1,24,16,23;"
- "rlwimi %0,%1,8,8,15;"
- "rlwimi %0,%1,24,0,7;" :
- "=&r" ((swapped)) : "r" ((value)));
-
- return( swapped );
-}
-
-#define CPU_swap_u16( value ) \
- (((value&0xff) << 8) | ((value >> 8)&0xff))
-
-#endif /* ndef ASM */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/c/src/lib/libcpu/powerpc/new_exception_processing/cpu_asm.S b/c/src/lib/libcpu/powerpc/new_exception_processing/cpu_asm.S
deleted file mode 100644
index 213e094fa6..0000000000
--- a/c/src/lib/libcpu/powerpc/new_exception_processing/cpu_asm.S
+++ /dev/null
@@ -1,396 +0,0 @@
-
-/* cpu_asm.s 1.1 - 95/12/04
- *
- * This file contains the assembly code for the PowerPC implementation
- * of RTEMS.
- *
- * Author: Andrew Bray <andy@i-cubed.co.uk>
- *
- * COPYRIGHT (c) 1995 by i-cubed ltd.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of i-cubed limited not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * i-cubed limited makes no representations about the suitability
- * of this software for any purpose.
- *
- * Derived from c/src/exec/cpu/no_cpu/cpu_asm.c:
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <asm.h>
-
-/*
- * Offsets for various Contexts
- */
- .set GP_1, 0
- .set GP_2, (GP_1 + 4)
- .set GP_13, (GP_2 + 4)
- .set GP_14, (GP_13 + 4)
-
- .set GP_15, (GP_14 + 4)
- .set GP_16, (GP_15 + 4)
- .set GP_17, (GP_16 + 4)
- .set GP_18, (GP_17 + 4)
-
- .set GP_19, (GP_18 + 4)
- .set GP_20, (GP_19 + 4)
- .set GP_21, (GP_20 + 4)
- .set GP_22, (GP_21 + 4)
-
- .set GP_23, (GP_22 + 4)
- .set GP_24, (GP_23 + 4)
- .set GP_25, (GP_24 + 4)
- .set GP_26, (GP_25 + 4)
-
- .set GP_27, (GP_26 + 4)
- .set GP_28, (GP_27 + 4)
- .set GP_29, (GP_28 + 4)
- .set GP_30, (GP_29 + 4)
-
- .set GP_31, (GP_30 + 4)
- .set GP_CR, (GP_31 + 4)
- .set GP_PC, (GP_CR + 4)
- .set GP_MSR, (GP_PC + 4)
-
- .set FP_0, 0
- .set FP_1, (FP_0 + 4)
- .set FP_2, (FP_1 + 4)
- .set FP_3, (FP_2 + 4)
- .set FP_4, (FP_3 + 4)
- .set FP_5, (FP_4 + 4)
- .set FP_6, (FP_5 + 4)
- .set FP_7, (FP_6 + 4)
- .set FP_8, (FP_7 + 4)
- .set FP_9, (FP_8 + 4)
- .set FP_10, (FP_9 + 4)
- .set FP_11, (FP_10 + 4)
- .set FP_12, (FP_11 + 4)
- .set FP_13, (FP_12 + 4)
- .set FP_14, (FP_13 + 4)
- .set FP_15, (FP_14 + 4)
- .set FP_16, (FP_15 + 4)
- .set FP_17, (FP_16 + 4)
- .set FP_18, (FP_17 + 4)
- .set FP_19, (FP_18 + 4)
- .set FP_20, (FP_19 + 4)
- .set FP_21, (FP_20 + 4)
- .set FP_22, (FP_21 + 4)
- .set FP_23, (FP_22 + 4)
- .set FP_24, (FP_23 + 4)
- .set FP_25, (FP_24 + 4)
- .set FP_26, (FP_25 + 4)
- .set FP_27, (FP_26 + 4)
- .set FP_28, (FP_27 + 4)
- .set FP_29, (FP_28 + 4)
- .set FP_30, (FP_29 + 4)
- .set FP_31, (FP_30 + 4)
- .set FP_FPSCR, (FP_31 + 4)
-
- .set IP_LINK, 0
- .set IP_0, (IP_LINK + 8)
- .set IP_2, (IP_0 + 4)
-
- .set IP_3, (IP_2 + 4)
- .set IP_4, (IP_3 + 4)
- .set IP_5, (IP_4 + 4)
- .set IP_6, (IP_5 + 4)
-
- .set IP_7, (IP_6 + 4)
- .set IP_8, (IP_7 + 4)
- .set IP_9, (IP_8 + 4)
- .set IP_10, (IP_9 + 4)
-
- .set IP_11, (IP_10 + 4)
- .set IP_12, (IP_11 + 4)
- .set IP_13, (IP_12 + 4)
- .set IP_28, (IP_13 + 4)
-
- .set IP_29, (IP_28 + 4)
- .set IP_30, (IP_29 + 4)
- .set IP_31, (IP_30 + 4)
- .set IP_CR, (IP_31 + 4)
-
- .set IP_CTR, (IP_CR + 4)
- .set IP_XER, (IP_CTR + 4)
- .set IP_LR, (IP_XER + 4)
- .set IP_PC, (IP_LR + 4)
-
- .set IP_MSR, (IP_PC + 4)
- .set IP_END, (IP_MSR + 16)
-
- BEGIN_CODE
-/*
- * _CPU_Context_save_fp_context
- *
- * This routine is responsible for saving the FP context
- * at *fp_context_ptr. If the point to load the FP context
- * from is changed then the pointer is modified by this routine.
- *
- * Sometimes a macro implementation of this is in cpu.h which dereferences
- * the ** and a similarly named routine in this file is passed something
- * like a (Context_Control_fp *). The general rule on making this decision
- * is to avoid writing assembly language.
- */
-
- ALIGN (PPC_CACHE_ALIGNMENT, PPC_CACHE_ALIGN_POWER)
- PUBLIC_PROC (_CPU_Context_save_fp)
-PROC (_CPU_Context_save_fp):
-#if (PPC_HAS_FPU == 1)
- lwz r3, 0(r3)
- stfs f0, FP_0(r3)
- stfs f1, FP_1(r3)
- stfs f2, FP_2(r3)
- stfs f3, FP_3(r3)
- stfs f4, FP_4(r3)
- stfs f5, FP_5(r3)
- stfs f6, FP_6(r3)
- stfs f7, FP_7(r3)
- stfs f8, FP_8(r3)
- stfs f9, FP_9(r3)
- stfs f10, FP_10(r3)
- stfs f11, FP_11(r3)
- stfs f12, FP_12(r3)
- stfs f13, FP_13(r3)
- stfs f14, FP_14(r3)
- stfs f15, FP_15(r3)
- stfs f16, FP_16(r3)
- stfs f17, FP_17(r3)
- stfs f18, FP_18(r3)
- stfs f19, FP_19(r3)
- stfs f20, FP_20(r3)
- stfs f21, FP_21(r3)
- stfs f22, FP_22(r3)
- stfs f23, FP_23(r3)
- stfs f24, FP_24(r3)
- stfs f25, FP_25(r3)
- stfs f26, FP_26(r3)
- stfs f27, FP_27(r3)
- stfs f28, FP_28(r3)
- stfs f29, FP_29(r3)
- stfs f30, FP_30(r3)
- stfs f31, FP_31(r3)
- mffs f2
- stfs f2, FP_FPSCR(r3)
-#endif
- blr
-
-/*
- * _CPU_Context_restore_fp_context
- *
- * This routine is responsible for restoring the FP context
- * at *fp_context_ptr. If the point to load the FP context
- * from is changed then the pointer is modified by this routine.
- *
- * Sometimes a macro implementation of this is in cpu.h which dereferences
- * the ** and a similarly named routine in this file is passed something
- * like a (Context_Control_fp *). The general rule on making this decision
- * is to avoid writing assembly language.
- */
-
- ALIGN (PPC_CACHE_ALIGNMENT, PPC_CACHE_ALIGN_POWER)
- PUBLIC_PROC (_CPU_Context_restore_fp)
-PROC (_CPU_Context_restore_fp):
-#if (PPC_HAS_FPU == 1)
- lwz r3, 0(r3)
- lfs f2, FP_FPSCR(r3)
- mtfsf 255, f2
- lfs f0, FP_0(r3)
- lfs f1, FP_1(r3)
- lfs f2, FP_2(r3)
- lfs f3, FP_3(r3)
- lfs f4, FP_4(r3)
- lfs f5, FP_5(r3)
- lfs f6, FP_6(r3)
- lfs f7, FP_7(r3)
- lfs f8, FP_8(r3)
- lfs f9, FP_9(r3)
- lfs f10, FP_10(r3)
- lfs f11, FP_11(r3)
- lfs f12, FP_12(r3)
- lfs f13, FP_13(r3)
- lfs f14, FP_14(r3)
- lfs f15, FP_15(r3)
- lfs f16, FP_16(r3)
- lfs f17, FP_17(r3)
- lfs f18, FP_18(r3)
- lfs f19, FP_19(r3)
- lfs f20, FP_20(r3)
- lfs f21, FP_21(r3)
- lfs f22, FP_22(r3)
- lfs f23, FP_23(r3)
- lfs f24, FP_24(r3)
- lfs f25, FP_25(r3)
- lfs f26, FP_26(r3)
- lfs f27, FP_27(r3)
- lfs f28, FP_28(r3)
- lfs f29, FP_29(r3)
- lfs f30, FP_30(r3)
- lfs f31, FP_31(r3)
-#endif
- blr
-
-
-/* _CPU_Context_switch
- *
- * This routine performs a normal non-FP context switch.
- */
- ALIGN (PPC_CACHE_ALIGNMENT, PPC_CACHE_ALIGN_POWER)
- PUBLIC_PROC (_CPU_Context_switch)
-PROC (_CPU_Context_switch):
- sync
- isync
- /* This assumes that all the registers are in the given order */
- li r5, 32
- addi r3,r3,-4
-#if ( PPC_USE_DATA_CACHE )
- dcbz r5, r3
-#endif
- stw r1, GP_1+4(r3)
- stw r2, GP_2+4(r3)
-#if (PPC_USE_MULTIPLE == 1)
- addi r3, r3, GP_18+4
-#if ( PPC_USE_DATA_CACHE )
- dcbz r5, r3
-#endif
- stmw r13, GP_13-GP_18(r3)
-#else
- stw r13, GP_13+4(r3)
- stw r14, GP_14+4(r3)
- stw r15, GP_15+4(r3)
- stw r16, GP_16+4(r3)
- stw r17, GP_17+4(r3)
- stwu r18, GP_18+4(r3)
-#if ( PPC_USE_DATA_CACHE )
- dcbz r5, r3
-#endif
- stw r19, GP_19-GP_18(r3)
- stw r20, GP_20-GP_18(r3)
- stw r21, GP_21-GP_18(r3)
- stw r22, GP_22-GP_18(r3)
- stw r23, GP_23-GP_18(r3)
- stw r24, GP_24-GP_18(r3)
- stw r25, GP_25-GP_18(r3)
- stw r26, GP_26-GP_18(r3)
- stw r27, GP_27-GP_18(r3)
- stw r28, GP_28-GP_18(r3)
- stw r29, GP_29-GP_18(r3)
- stw r30, GP_30-GP_18(r3)
- stw r31, GP_31-GP_18(r3)
-#endif
-#if ( PPC_USE_DATA_CACHE )
- dcbt r0, r4
-#endif
- mfcr r6
- stw r6, GP_CR-GP_18(r3)
- mflr r7
- stw r7, GP_PC-GP_18(r3)
- mfmsr r8
- stw r8, GP_MSR-GP_18(r3)
-
-#if ( PPC_USE_DATA_CACHE )
- dcbt r5, r4
-#endif
- lwz r1, GP_1(r4)
- lwz r2, GP_2(r4)
-#if (PPC_USE_MULTIPLE == 1)
- addi r4, r4, GP_19
-#if ( PPC_USE_DATA_CACHE )
- dcbt r5, r4
-#endif
- lmw r13, GP_13-GP_19(r4)
-#else
- lwz r13, GP_13(r4)
- lwz r14, GP_14(r4)
- lwz r15, GP_15(r4)
- lwz r16, GP_16(r4)
- lwz r17, GP_17(r4)
- lwz r18, GP_18(r4)
- lwzu r19, GP_19(r4)
-#if ( PPC_USE_DATA_CACHE )
- dcbt r5, r4
-#endif
- lwz r20, GP_20-GP_19(r4)
- lwz r21, GP_21-GP_19(r4)
- lwz r22, GP_22-GP_19(r4)
- lwz r23, GP_23-GP_19(r4)
- lwz r24, GP_24-GP_19(r4)
- lwz r25, GP_25-GP_19(r4)
- lwz r26, GP_26-GP_19(r4)
- lwz r27, GP_27-GP_19(r4)
- lwz r28, GP_28-GP_19(r4)
- lwz r29, GP_29-GP_19(r4)
- lwz r30, GP_30-GP_19(r4)
- lwz r31, GP_31-GP_19(r4)
-#endif
- lwz r6, GP_CR-GP_19(r4)
- lwz r7, GP_PC-GP_19(r4)
- lwz r8, GP_MSR-GP_19(r4)
- mtcrf 255, r6
- mtlr r7
- mtmsr r8
-
- blr
-
-/*
- * _CPU_Context_restore
- *
- * This routine is generallu used only to restart self in an
- * efficient manner. It may simply be a label in _CPU_Context_switch.
- *
- * NOTE: May be unnecessary to reload some registers.
- */
-/*
- * ACB: Don't worry about cache optimisation here - this is not THAT critical.
- */
- ALIGN (PPC_CACHE_ALIGNMENT, PPC_CACHE_ALIGN_POWER)
- PUBLIC_PROC (_CPU_Context_restore)
-PROC (_CPU_Context_restore):
- lwz r5, GP_CR(r3)
- lwz r6, GP_PC(r3)
- lwz r7, GP_MSR(r3)
- mtcrf 255, r5
- mtlr r6
- mtmsr r7
- lwz r1, GP_1(r3)
- lwz r2, GP_2(r3)
-#if (PPC_USE_MULTIPLE == 1)
- lmw r13, GP_13(r3)
-#else
- lwz r13, GP_13(r3)
- lwz r14, GP_14(r3)
- lwz r15, GP_15(r3)
- lwz r16, GP_16(r3)
- lwz r17, GP_17(r3)
- lwz r18, GP_18(r3)
- lwz r19, GP_19(r3)
- lwz r20, GP_20(r3)
- lwz r21, GP_21(r3)
- lwz r22, GP_22(r3)
- lwz r23, GP_23(r3)
- lwz r24, GP_24(r3)
- lwz r25, GP_25(r3)
- lwz r26, GP_26(r3)
- lwz r27, GP_27(r3)
- lwz r28, GP_28(r3)
- lwz r29, GP_29(r3)
- lwz r30, GP_30(r3)
- lwz r31, GP_31(r3)
-#endif
-
- blr
-
diff --git a/c/src/lib/libcpu/powerpc/old-exceptions/README b/c/src/lib/libcpu/powerpc/old-exceptions/README
deleted file mode 100644
index c72bebfe0c..0000000000
--- a/c/src/lib/libcpu/powerpc/old-exceptions/README
+++ /dev/null
@@ -1,80 +0,0 @@
-#
-# $Id$
-#
-
-There are various issues regarding this port:
-
-
-
-1) Legal
-
-This port is written by Andrew Bray <andy@i-cubed.co.uk>, and
-is copyright 1995 i-cubed ltd.
-
-This port was later updated by Joel Sherrill <joel@OARcorp.com>
-to test the support for the PPC603, PPC603e, and MPC604. This
-was tested on the PowerPC simulator PSIM and a VMEbus single board
-computer.
-
-2) CPU support.
-
-This release fully supports the PPC403GA, PPC403GB, PPC603, PPC603e,
-MPC604, MPC750, and numerous MPC8xx processors. A good faith attempt
-has been made to include support other models based upon available
-documentation including the MPC5xx. There are two interrupt structures
-supported by the PowerPC port. The newer structure is supported by
-all the MPC750 and MPC604 BSPs. This structure is required to use
-the RDBG remote debugging support.
-
-This port was originally written and tested on the PPC403GA (using
-software floating point). Current ports are tested primarily on
-60x CPUs using the PowerPC simulator PSIM.
-
-Andrew Bray received assistance during the initial porting effort
-from IBM and Blue Micro and we would like to gratefully acknowledge
-that help.
-
-The support for the PPC602 processor is incomplete as only sketchy
-data is currently available. Perhaps this model has been dropped.
-
-3) Application Binary Interface
-
-In the context of RTEMS, the ABI is of interest for the following
-aspects:
-
-a) Register usage. Which registers are used to provide static variable
- linkage, stack pointer etc.
-
-b) Function calling convention. How parameters are passed, how function
- variables should be invoked, how values are returned, etc.
-
-c) Stack frame layout.
-
-I am aware of a number of ABIs for the PowerPC:
-
-a) The PowerOpen ABI. This is the original Power ABI used on the RS/6000.
- This is the only ABI supported by versions of GCC before 2.7.0.
-
-b) The SVR4 ABI. This is the ABI defined by SunSoft for the Solaris port
- to the PowerPC.
-
-c) The Embedded ABI. This is an embedded ABI for PowerPC use, which has no
- operating system interface defined. It is promoted by SunSoft, Motorola,
- and Cygnus Support. Cygnus are porting the GNU toolchain to this ABI.
-
-d) GCC 2.7.0. This compiler is partway along the road to supporting the EABI,
- but is currently halfway in between.
-
-This port was built and tested using the PowerOpen ABI, with the following
-caveat: we used an ELF assembler and linker. So some attention may be
-required on the assembler files to get them through a traditional (XCOFF)
-PowerOpen assembler.
-
-This port contains support for the other ABIs, but this may prove to be
-incomplete as it is untested.
-
-The RTEMS PowerPC port supports EABI as the primary ABI. The powerpc-rtems
-GNU toolset configuration is EABI.
-
-Andrew Bray, 4 December 1995
-Joel Sherrill, 16 July 1997
diff --git a/c/src/lib/libcpu/powerpc/old-exceptions/TODO b/c/src/lib/libcpu/powerpc/old-exceptions/TODO
deleted file mode 100644
index 64c96cb14c..0000000000
--- a/c/src/lib/libcpu/powerpc/old-exceptions/TODO
+++ /dev/null
@@ -1,8 +0,0 @@
-#
-# $Id$
-#
-
-Todo list:
-
-Maybe decode external interrupts like the HPPA does.
- See c/src/lib/libcpu/powerpc/ppc403/ictrl/* for implementation on ppc403
diff --git a/c/src/lib/libcpu/powerpc/old-exceptions/cpu.c b/c/src/lib/libcpu/powerpc/old-exceptions/cpu.c
deleted file mode 100644
index 7d6824cb26..0000000000
--- a/c/src/lib/libcpu/powerpc/old-exceptions/cpu.c
+++ /dev/null
@@ -1,853 +0,0 @@
-/*
- * PowerPC CPU Dependent Source
- *
- * Author: Andrew Bray <andy@i-cubed.co.uk>
- *
- * COPYRIGHT (c) 1995 by i-cubed ltd.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of i-cubed limited not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * i-cubed limited makes no representations about the suitability
- * of this software for any purpose.
- *
- * Derived from c/src/exec/cpu/no_cpu/cpu.c:
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may be found in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/context.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/interr.h>
-
-/*
- * These are for testing purposes.
- */
-
-/* _CPU_Initialize
- *
- * This routine performs processor dependent initialization.
- *
- * INPUT PARAMETERS:
- * cpu_table - CPU table to initialize
- * thread_dispatch - address of disptaching routine
- */
-
-static void ppc_spurious(int, CPU_Interrupt_frame *);
-
-void _CPU_Initialize(
- rtems_cpu_table *cpu_table,
- void (*thread_dispatch) /* ignored on this CPU */
-)
-{
- proc_ptr handler = (proc_ptr)ppc_spurious;
- int i;
-#if (PPC_ABI != PPC_ABI_POWEROPEN)
- register unsigned32 r2 = 0;
-#if (PPC_ABI != PPC_ABI_GCC27)
- register unsigned32 r13 = 0;
-
- asm ("mr %0,13" : "=r" ((r13)) : "0" ((r13)));
- _CPU_IRQ_info.Default_r13 = r13;
-#endif
-
- asm ("mr %0,2" : "=r" ((r2)) : "0" ((r2)));
- _CPU_IRQ_info.Default_r2 = r2;
-#endif
-
- _CPU_IRQ_info.Nest_level = &_ISR_Nest_level;
- _CPU_IRQ_info.Disable_level = &_Thread_Dispatch_disable_level;
- _CPU_IRQ_info.Vector_table = _ISR_Vector_table;
-#if (PPC_ABI == PPC_ABI_POWEROPEN)
- _CPU_IRQ_info.Dispatch_r2 = ((unsigned32 *)_Thread_Dispatch)[1];
-#endif
- _CPU_IRQ_info.Switch_necessary = &_Context_Switch_necessary;
- _CPU_IRQ_info.Signal = &_ISR_Signals_to_thread_executing;
-
-#if (PPC_USE_SPRG)
- i = (int)&_CPU_IRQ_info;
- asm volatile("mtspr 0x113, %0" : "=r" (i) : "0" (i)); /* SPRG 3 */
-#endif
-
- /*
- * Store Msr Value in the IRQ info structure.
- */
- _CPU_MSR_Value(_CPU_IRQ_info.msr_initial);
-
-#if (PPC_USE_SPRG)
- i = _CPU_IRQ_info.msr_initial;
- asm volatile("mtspr 0x112, %0" : "=r" (i) : "0" (i)); /* SPRG 2 */
-#endif
-
- if ( cpu_table->spurious_handler )
- handler = (proc_ptr)cpu_table->spurious_handler;
-
- for (i = 0; i < PPC_INTERRUPT_MAX; i++)
- _ISR_Vector_table[i] = handler;
-
- _CPU_Table = *cpu_table;
-}
-
-/*PAGE
- *
- * _CPU_ISR_Calculate_level
- *
- * The PowerPC puts its interrupt enable status in the MSR register
- * which also contains things like endianness control. To be more
- * awkward, the layout varies from processor to processor. This
- * is why it was necessary to adopt a scheme which allowed the user
- * to specify specifically which interrupt sources were enabled.
- */
-
-unsigned32 _CPU_ISR_Calculate_level(
- unsigned32 new_level
-)
-{
- register unsigned32 new_msr = 0;
-
- /*
- * Set the critical interrupt enable bit
- */
-
-#if (PPC_HAS_RFCI)
- if ( !(new_level & PPC_INTERRUPT_LEVEL_CE) )
- new_msr |= PPC_MSR_CE;
-#endif
-
- if ( !(new_level & PPC_INTERRUPT_LEVEL_ME) )
- new_msr |= PPC_MSR_ME;
-
- if ( !(new_level & PPC_INTERRUPT_LEVEL_EE) )
- new_msr |= PPC_MSR_EE;
-
- return new_msr;
-}
-
-/*PAGE
- *
- * _CPU_ISR_Set_level
- *
- * This routine sets the requested level in the MSR.
- */
-
-void _CPU_ISR_Set_level(
- unsigned32 new_level
-)
-{
- register unsigned32 tmp = 0;
- register unsigned32 new_msr;
-
- new_msr = _CPU_ISR_Calculate_level( new_level );
-
- asm volatile (
- "mfmsr %0; andc %0,%0,%1; and %2, %2, %1; or %0, %0, %2; mtmsr %0" :
- "=&r" ((tmp)) :
- "r" ((PPC_MSR_DISABLE_MASK)), "r" ((new_msr)), "0" ((tmp))
- );
-}
-
-/*PAGE
- *
- * _CPU_ISR_Get_level
- *
- * This routine gets the current interrupt level from the MSR and
- * converts it to an RTEMS interrupt level.
- */
-
-unsigned32 _CPU_ISR_Get_level( void )
-{
- unsigned32 level = 0;
- unsigned32 msr;
-
- asm volatile("mfmsr %0" : "=r" ((msr)));
-
- msr &= PPC_MSR_DISABLE_MASK;
-
- /*
- * Set the critical interrupt enable bit
- */
-
-#if (PPC_HAS_RFCI)
- if ( !(msr & PPC_MSR_CE) )
- level |= PPC_INTERRUPT_LEVEL_CE;
-#endif
-
- if ( !(msr & PPC_MSR_ME) )
- level |= PPC_INTERRUPT_LEVEL_ME;
-
- if ( !(msr & PPC_MSR_EE) )
- level |= PPC_INTERRUPT_LEVEL_EE;
-
- return level;
-}
-
-/*PAGE
- *
- * _CPU_Context_Initialize
- */
-
-#if (PPC_ABI == PPC_ABI_POWEROPEN)
-#define CPU_MINIMUM_STACK_FRAME_SIZE 56
-#else /* PPC_ABI_SVR4 or PPC_ABI_EABI */
-#define CPU_MINIMUM_STACK_FRAME_SIZE 8
-#endif
-
-void _CPU_Context_Initialize(
- Context_Control *the_context,
- unsigned32 *stack_base,
- unsigned32 size,
- unsigned32 new_level,
- void *entry_point,
- boolean is_fp
-)
-{
- unsigned32 msr_value;
- unsigned32 sp;
-
- sp = (unsigned32)stack_base + size - CPU_MINIMUM_STACK_FRAME_SIZE;
- *((unsigned32 *)sp) = 0;
- the_context->gpr1 = sp;
-
- the_context->msr = _CPU_ISR_Calculate_level( new_level );
-
- /*
- * The FP bit of the MSR should only be enabled if this is a floating
- * point task. Unfortunately, the vfprintf_r routine in newlib
- * ends up pushing a floating point register regardless of whether or
- * not a floating point number is being printed. Serious restructuring
- * of vfprintf.c will be required to avoid this behavior. At this
- * time (7 July 1997), this restructuring is not being done.
- */
-
- /*if ( is_fp ) */
- the_context->msr |= PPC_MSR_FP;
-
- /*
- * Calculate the task's MSR value:
- *
- * + Set the exception prefix bit to point to the exception table
- * + Force the RI bit
- * + Use the DR and IR bits
- */
- _CPU_MSR_Value( msr_value );
- the_context->msr |= (msr_value & PPC_MSR_EP);
- the_context->msr |= PPC_MSR_RI;
- the_context->msr |= msr_value & (PPC_MSR_DR|PPC_MSR_IR);
-
-#if (PPC_ABI == PPC_ABI_POWEROPEN)
- { unsigned32 *desc = (unsigned32 *)entry_point;
-
- the_context->pc = desc[0];
- the_context->gpr2 = desc[1];
- }
-#endif
-
-#if (PPC_ABI == PPC_ABI_SVR4)
- { unsigned r13 = 0;
- asm volatile ("mr %0, 13" : "=r" ((r13)));
-
- the_context->pc = (unsigned32)entry_point;
- the_context->gpr13 = r13;
- }
-#endif
-
-#if (PPC_ABI == PPC_ABI_EABI)
- { unsigned32 r2 = 0;
- unsigned r13 = 0;
- asm volatile ("mr %0,2; mr %1,13" : "=r" ((r2)), "=r" ((r13)));
-
- the_context->pc = (unsigned32)entry_point;
- the_context->gpr2 = r2;
- the_context->gpr13 = r13;
- }
-#endif
-}
-
-
-/* _CPU_ISR_install_vector
- *
- * This kernel routine installs the RTEMS handler for the
- * specified vector.
- *
- * Input parameters:
- * vector - interrupt vector number
- * old_handler - former ISR for this vector number
- * new_handler - replacement ISR for this vector number
- *
- * Output parameters: NONE
- *
- */
-
-void _CPU_ISR_install_vector(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-)
-{
- proc_ptr ignored;
- *old_handler = _ISR_Vector_table[ vector ];
-
- /*
- * If the interrupt vector table is a table of pointer to isr entry
- * points, then we need to install the appropriate RTEMS interrupt
- * handler for this vector number.
- */
-
- /*
- * Install the wrapper so this ISR can be invoked properly.
- */
- if (_CPU_Table.exceptions_in_RAM)
- _CPU_ISR_install_raw_handler( vector, _ISR_Handler, &ignored );
-
- /*
- * We put the actual user ISR address in '_ISR_vector_table'. This will
- * be used by the _ISR_Handler so the user gets control.
- */
-
- _ISR_Vector_table[ vector ] = new_handler ? (ISR_Handler_entry)new_handler :
- _CPU_Table.spurious_handler ?
- (ISR_Handler_entry)_CPU_Table.spurious_handler :
- (ISR_Handler_entry)ppc_spurious;
-}
-
-/*PAGE
- *
- * _CPU_Install_interrupt_stack
- */
-
-void _CPU_Install_interrupt_stack( void )
-{
-#if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27)
- _CPU_IRQ_info.Stack = _CPU_Interrupt_stack_high - 56;
-#else
- _CPU_IRQ_info.Stack = _CPU_Interrupt_stack_high - 8;
-#endif
-}
-
-/* Handle a spurious interrupt */
-static void ppc_spurious(int v, CPU_Interrupt_frame *i)
-{
-#if 0
- printf("Spurious interrupt on vector %d from %08.8x\n",
- v, i->pc);
-#endif
-#ifdef ppc403
- if (v == PPC_IRQ_EXTERNAL)
- {
- register int r = 0;
-
- asm volatile("mtdcr 0x42, %0" :
- "=&r" ((r)) : "0" ((r))); /* EXIER */
- }
- else if (v == PPC_IRQ_PIT)
- {
- register int r = 0x08000000;
-
- asm volatile("mtspr 0x3d8, %0" :
- "=&r" ((r)) : "0" ((r))); /* TSR */
- }
- else if (v == PPC_IRQ_FIT)
- {
- register int r = 0x04000000;
-
- asm volatile("mtspr 0x3d8, %0" :
- "=&r" ((r)) : "0" ((r))); /* TSR */
- }
-#endif
-}
-
-void _CPU_Fatal_error(unsigned32 _error)
-{
- asm volatile ("mr 3, %0" : : "r" ((_error)));
- asm volatile ("tweq 5,5");
- asm volatile ("li 0,0; mtmsr 0");
- while (1) ;
-}
-
-#define PPC_SYNCHRONOUS_TRAP_BIT_MASK 0x100
-#define PPC_ASYNCHRONOUS_TRAP( _trap ) (_trap)
-#define PPC_SYNCHRONOUS_TRAP ( _trap ) ((_trap)+PPC_SYNCHRONOUS_TRAP_BIT_MASK)
-#define PPC_REAL_TRAP_NUMBER ( _trap ) ((_trap)%PPC_SYNCHRONOUS_TRAP_BIT_MASK)
-
-
-const CPU_Trap_table_entry _CPU_Trap_slot_template = {
-
-#if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27)
-#error " Vector install not tested."
-#if (PPC_HAS_FPU)
-#error " Vector install not tested."
- 0x9421feb0, /* stwu r1, -(20*4 + 18*8 + IP_END)(r1) */
-#else
-#error " Vector install not tested."
- 0x9421ff40, /* stwu r1, -(20*4 + IP_END)(r1) */
-#endif
-#else
- 0x9421ff90, /* stwu r1, -(IP_END)(r1) */
-#endif
-
- 0x90010008, /* stw %r0, IP_0(%r1) */
- 0x38000000, /* li %r0, PPC_IRQ */
- 0x48000002 /* ba PROC (_ISR_Handler) */
-};
-
-#if defined(mpc860) || defined(mpc821)
-const CPU_Trap_table_entry _CPU_Trap_slot_template_m860 = {
- 0x7c0803ac, /* mtlr %r0 */
- 0x81210028, /* lwz %r9, IP_9(%r1) */
- 0x38000000, /* li %r0, PPC_IRQ */
- 0x48000002 /* b PROC (_ISR_Handler) */
-};
-#endif /* mpc860 */
-
-unsigned32 ppc_exception_vector_addr(
- unsigned32 vector
-);
-
-
-/*PAGE
- *
- * _CPU_ISR_install_raw_handler
- *
- * This routine installs the specified handler as a "raw" non-executive
- * supported trap handler (a.k.a. interrupt service routine).
- *
- * Input Parameters:
- * vector - trap table entry number plus synchronous
- * vs. asynchronous information
- * new_handler - address of the handler to be installed
- * old_handler - pointer to an address of the handler previously installed
- *
- * Output Parameters: NONE
- * *new_handler - address of the handler previously installed
- *
- * NOTE:
- *
- * This routine is based on the SPARC routine _CPU_ISR_install_raw_handler.
- * Install a software trap handler as an executive interrupt handler
- * (which is desirable since RTEMS takes care of window and register issues),
- * then the executive needs to know that the return address is to the trap
- * rather than the instruction following the trap.
- *
- */
-
-void _CPU_ISR_install_raw_handler(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-)
-{
- unsigned32 real_vector;
- CPU_Trap_table_entry *slot;
- unsigned32 u32_handler=0;
-
- /*
- * Get the "real" trap number for this vector ignoring the synchronous
- * versus asynchronous indicator included with our vector numbers.
- */
-
- real_vector = vector;
-
- /*
- * Get the current base address of the trap table and calculate a pointer
- * to the slot we are interested in.
- */
- slot = (CPU_Trap_table_entry *)ppc_exception_vector_addr( real_vector );
-
- /*
- * Get the address of the old_handler from the trap table.
- *
- * NOTE: The old_handler returned will be bogus if it does not follow
- * the RTEMS model.
- */
-
-#define HIGH_BITS_MASK 0xFFFFFC00
-#define HIGH_BITS_SHIFT 10
-#define LOW_BITS_MASK 0x000003FF
-
- if (slot->stwu_r1 == _CPU_Trap_slot_template.stwu_r1) {
- /*
- * Set u32_handler = to target address
- */
- u32_handler = slot->b_Handler & 0x03fffffc;
-
- /* IMD FIX: sign extend address fragment... */
- if (u32_handler & 0x02000000) {
- u32_handler |= 0xfc000000;
- }
-
- *old_handler = (proc_ptr) u32_handler;
- } else
-/* There are two kinds of handlers for the MPC860. One is the 'standard'
- * one like above. The other is for the cascaded interrupts from the SIU
- * and CPM. Therefore we must check for the alternate one if the standard
- * one is not present
- */
-#if defined(mpc860) || defined(mpc821)
- if (slot->stwu_r1 == _CPU_Trap_slot_template_m860.stwu_r1) {
- /*
- * Set u32_handler = to target address
- */
- u32_handler = slot->b_Handler & 0x03fffffc;
- *old_handler = (proc_ptr) u32_handler;
- } else
-#endif /* mpc860 */
-
- *old_handler = 0;
-
- /*
- * Copy the template to the slot and then fix it.
- */
-#if defined(mpc860) || defined(mpc821)
- if (vector >= PPC_IRQ_IRQ0)
- *slot = _CPU_Trap_slot_template_m860;
- else
-#endif /* mpc860 */
- *slot = _CPU_Trap_slot_template;
-
- u32_handler = (unsigned32) new_handler;
-
- /*
- * IMD FIX: insert address fragment only (bits 6..29)
- * therefore check for proper address range
- * and remove unwanted bits
- */
- if ((u32_handler & 0xfc000000) == 0xfc000000) {
- u32_handler &= ~0xfc000000;
- }
- else if ((u32_handler & 0xfc000000) != 0x00000000) {
- _Internal_error_Occurred(INTERNAL_ERROR_CORE,
- TRUE,
- u32_handler);
- }
-
- slot->b_Handler |= u32_handler;
-
- slot->li_r0_IRQ |= vector;
-
- _CPU_Data_Cache_Block_Flush( slot );
-}
-
-unsigned32 ppc_exception_vector_addr(
- unsigned32 vector
-)
-{
-#if (!PPC_HAS_EVPR)
- unsigned32 Msr;
-#endif
- unsigned32 Top = 0;
- unsigned32 Offset = 0x000;
-
-#if (PPC_HAS_EXCEPTION_PREFIX)
- _CPU_MSR_Value ( Msr );
- if ( ( Msr & PPC_MSR_EP) != 0 ) /* Vectors at FFFx_xxxx */
- Top = 0xfff00000;
-#elif (PPC_HAS_EVPR)
- asm volatile( "mfspr %0,0x3d6" : "=r" (Top)); /* EVPR */
- Top = Top & 0xffff0000;
-#endif
-
- switch ( vector ) {
- case PPC_IRQ_SYSTEM_RESET: /* on 40x aka PPC_IRQ_CRIT */
- Offset = 0x00100;
- break;
- case PPC_IRQ_MCHECK:
- Offset = 0x00200;
- break;
- case PPC_IRQ_PROTECT:
- Offset = 0x00300;
- break;
- case PPC_IRQ_ISI:
- Offset = 0x00400;
- break;
- case PPC_IRQ_EXTERNAL:
- Offset = 0x00500;
- break;
- case PPC_IRQ_ALIGNMENT:
- Offset = 0x00600;
- break;
- case PPC_IRQ_PROGRAM:
- Offset = 0x00700;
- break;
- case PPC_IRQ_NOFP:
- Offset = 0x00800;
- break;
- case PPC_IRQ_DECREMENTER:
- Offset = 0x00900;
- break;
- case PPC_IRQ_RESERVED_A:
- Offset = 0x00a00;
- break;
- case PPC_IRQ_RESERVED_B:
- Offset = 0x00b00;
- break;
- case PPC_IRQ_SCALL:
- Offset = 0x00c00;
- break;
- case PPC_IRQ_TRACE:
- Offset = 0x00d00;
- break;
- case PPC_IRQ_FP_ASST:
- Offset = 0x00e00;
- break;
-
-#if defined(ppc403)
-
-/* PPC_IRQ_CRIT is the same vector as PPC_IRQ_RESET
- case PPC_IRQ_CRIT:
- Offset = 0x00100;
- break;
-*/
- case PPC_IRQ_PIT:
- Offset = 0x01000;
- break;
- case PPC_IRQ_FIT:
- Offset = 0x01010;
- break;
- case PPC_IRQ_WATCHDOG:
- Offset = 0x01020;
- break;
- case PPC_IRQ_DEBUG:
- Offset = 0x02000;
- break;
-
-#elif defined(ppc601)
- case PPC_IRQ_TRACE:
- Offset = 0x02000;
- break;
-
-#elif defined(ppc603)
- case PPC_IRQ_TRANS_MISS:
- Offset = 0x1000;
- break;
- case PPC_IRQ_DATA_LOAD:
- Offset = 0x1100;
- break;
- case PPC_IRQ_DATA_STORE:
- Offset = 0x1200;
- break;
- case PPC_IRQ_ADDR_BRK:
- Offset = 0x1300;
- break;
- case PPC_IRQ_SYS_MGT:
- Offset = 0x1400;
- break;
-
-#elif defined(ppc603e)
- case PPC_TLB_INST_MISS:
- Offset = 0x1000;
- break;
- case PPC_TLB_LOAD_MISS:
- Offset = 0x1100;
- break;
- case PPC_TLB_STORE_MISS:
- Offset = 0x1200;
- break;
- case PPC_IRQ_ADDRBRK:
- Offset = 0x1300;
- break;
- case PPC_IRQ_SYS_MGT:
- Offset = 0x1400;
- break;
-
-#elif defined(mpc604)
- case PPC_IRQ_ADDR_BRK:
- Offset = 0x1300;
- break;
- case PPC_IRQ_SYS_MGT:
- Offset = 0x1400;
- break;
-
-#elif defined(mpc860) || defined(mpc821)
- case PPC_IRQ_EMULATE:
- Offset = 0x1000;
- break;
- case PPC_IRQ_INST_MISS:
- Offset = 0x1100;
- break;
- case PPC_IRQ_DATA_MISS:
- Offset = 0x1200;
- break;
- case PPC_IRQ_INST_ERR:
- Offset = 0x1300;
- break;
- case PPC_IRQ_DATA_ERR:
- Offset = 0x1400;
- break;
- case PPC_IRQ_DATA_BPNT:
- Offset = 0x1c00;
- break;
- case PPC_IRQ_INST_BPNT:
- Offset = 0x1d00;
- break;
- case PPC_IRQ_IO_BPNT:
- Offset = 0x1e00;
- break;
- case PPC_IRQ_DEV_PORT:
- Offset = 0x1f00;
- break;
- case PPC_IRQ_IRQ0:
- Offset = 0x2000;
- break;
- case PPC_IRQ_LVL0:
- Offset = 0x2040;
- break;
- case PPC_IRQ_IRQ1:
- Offset = 0x2080;
- break;
- case PPC_IRQ_LVL1:
- Offset = 0x20c0;
- break;
- case PPC_IRQ_IRQ2:
- Offset = 0x2100;
- break;
- case PPC_IRQ_LVL2:
- Offset = 0x2140;
- break;
- case PPC_IRQ_IRQ3:
- Offset = 0x2180;
- break;
- case PPC_IRQ_LVL3:
- Offset = 0x21c0;
- break;
- case PPC_IRQ_IRQ4:
- Offset = 0x2200;
- break;
- case PPC_IRQ_LVL4:
- Offset = 0x2240;
- break;
- case PPC_IRQ_IRQ5:
- Offset = 0x2280;
- break;
- case PPC_IRQ_LVL5:
- Offset = 0x22c0;
- break;
- case PPC_IRQ_IRQ6:
- Offset = 0x2300;
- break;
- case PPC_IRQ_LVL6:
- Offset = 0x2340;
- break;
- case PPC_IRQ_IRQ7:
- Offset = 0x2380;
- break;
- case PPC_IRQ_LVL7:
- Offset = 0x23c0;
- break;
- case PPC_IRQ_CPM_RESERVED_0:
- Offset = 0x2400;
- break;
- case PPC_IRQ_CPM_PC4:
- Offset = 0x2410;
- break;
- case PPC_IRQ_CPM_PC5:
- Offset = 0x2420;
- break;
- case PPC_IRQ_CPM_SMC2:
- Offset = 0x2430;
- break;
- case PPC_IRQ_CPM_SMC1:
- Offset = 0x2440;
- break;
- case PPC_IRQ_CPM_SPI:
- Offset = 0x2450;
- break;
- case PPC_IRQ_CPM_PC6:
- Offset = 0x2460;
- break;
- case PPC_IRQ_CPM_TIMER4:
- Offset = 0x2470;
- break;
- case PPC_IRQ_CPM_RESERVED_8:
- Offset = 0x2480;
- break;
- case PPC_IRQ_CPM_PC7:
- Offset = 0x2490;
- break;
- case PPC_IRQ_CPM_PC8:
- Offset = 0x24a0;
- break;
- case PPC_IRQ_CPM_PC9:
- Offset = 0x24b0;
- break;
- case PPC_IRQ_CPM_TIMER3:
- Offset = 0x24c0;
- break;
- case PPC_IRQ_CPM_RESERVED_D:
- Offset = 0x24d0;
- break;
- case PPC_IRQ_CPM_PC10:
- Offset = 0x24e0;
- break;
- case PPC_IRQ_CPM_PC11:
- Offset = 0x24f0;
- break;
- case PPC_IRQ_CPM_I2C:
- Offset = 0x2500;
- break;
- case PPC_IRQ_CPM_RISC_TIMER:
- Offset = 0x2510;
- break;
- case PPC_IRQ_CPM_TIMER2:
- Offset = 0x2520;
- break;
- case PPC_IRQ_CPM_RESERVED_13:
- Offset = 0x2530;
- break;
- case PPC_IRQ_CPM_IDMA2:
- Offset = 0x2540;
- break;
- case PPC_IRQ_CPM_IDMA1:
- Offset = 0x2550;
- break;
- case PPC_IRQ_CPM_SDMA_ERROR:
- Offset = 0x2560;
- break;
- case PPC_IRQ_CPM_PC12:
- Offset = 0x2570;
- break;
- case PPC_IRQ_CPM_PC13:
- Offset = 0x2580;
- break;
- case PPC_IRQ_CPM_TIMER1:
- Offset = 0x2590;
- break;
- case PPC_IRQ_CPM_PC14:
- Offset = 0x25a0;
- break;
- case PPC_IRQ_CPM_SCC4:
- Offset = 0x25b0;
- break;
- case PPC_IRQ_CPM_SCC3:
- Offset = 0x25c0;
- break;
- case PPC_IRQ_CPM_SCC2:
- Offset = 0x25d0;
- break;
- case PPC_IRQ_CPM_SCC1:
- Offset = 0x25e0;
- break;
- case PPC_IRQ_CPM_PC15:
- Offset = 0x25f0;
- break;
-#endif
-
- }
- Top += Offset;
- return Top;
-}
-
diff --git a/c/src/lib/libcpu/powerpc/old-exceptions/cpu_asm.S b/c/src/lib/libcpu/powerpc/old-exceptions/cpu_asm.S
deleted file mode 100644
index a377fa5d2a..0000000000
--- a/c/src/lib/libcpu/powerpc/old-exceptions/cpu_asm.S
+++ /dev/null
@@ -1,809 +0,0 @@
-
-/* cpu_asm.s 1.1 - 95/12/04
- *
- * This file contains the assembly code for the PowerPC implementation
- * of RTEMS.
- *
- * Author: Andrew Bray <andy@i-cubed.co.uk>
- *
- * COPYRIGHT (c) 1995 by i-cubed ltd.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of i-cubed limited not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * i-cubed limited makes no representations about the suitability
- * of this software for any purpose.
- *
- * Derived from c/src/exec/cpu/no_cpu/cpu_asm.c:
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <asm.h>
-
-/*
- * Offsets for various Contexts
- */
- .set GP_1, 0
- .set GP_2, (GP_1 + 4)
- .set GP_13, (GP_2 + 4)
- .set GP_14, (GP_13 + 4)
-
- .set GP_15, (GP_14 + 4)
- .set GP_16, (GP_15 + 4)
- .set GP_17, (GP_16 + 4)
- .set GP_18, (GP_17 + 4)
-
- .set GP_19, (GP_18 + 4)
- .set GP_20, (GP_19 + 4)
- .set GP_21, (GP_20 + 4)
- .set GP_22, (GP_21 + 4)
-
- .set GP_23, (GP_22 + 4)
- .set GP_24, (GP_23 + 4)
- .set GP_25, (GP_24 + 4)
- .set GP_26, (GP_25 + 4)
-
- .set GP_27, (GP_26 + 4)
- .set GP_28, (GP_27 + 4)
- .set GP_29, (GP_28 + 4)
- .set GP_30, (GP_29 + 4)
-
- .set GP_31, (GP_30 + 4)
- .set GP_CR, (GP_31 + 4)
- .set GP_PC, (GP_CR + 4)
- .set GP_MSR, (GP_PC + 4)
-
-#if (PPC_HAS_DOUBLE == 1)
- .set FP_0, 0
- .set FP_1, (FP_0 + 8)
- .set FP_2, (FP_1 + 8)
- .set FP_3, (FP_2 + 8)
- .set FP_4, (FP_3 + 8)
- .set FP_5, (FP_4 + 8)
- .set FP_6, (FP_5 + 8)
- .set FP_7, (FP_6 + 8)
- .set FP_8, (FP_7 + 8)
- .set FP_9, (FP_8 + 8)
- .set FP_10, (FP_9 + 8)
- .set FP_11, (FP_10 + 8)
- .set FP_12, (FP_11 + 8)
- .set FP_13, (FP_12 + 8)
- .set FP_14, (FP_13 + 8)
- .set FP_15, (FP_14 + 8)
- .set FP_16, (FP_15 + 8)
- .set FP_17, (FP_16 + 8)
- .set FP_18, (FP_17 + 8)
- .set FP_19, (FP_18 + 8)
- .set FP_20, (FP_19 + 8)
- .set FP_21, (FP_20 + 8)
- .set FP_22, (FP_21 + 8)
- .set FP_23, (FP_22 + 8)
- .set FP_24, (FP_23 + 8)
- .set FP_25, (FP_24 + 8)
- .set FP_26, (FP_25 + 8)
- .set FP_27, (FP_26 + 8)
- .set FP_28, (FP_27 + 8)
- .set FP_29, (FP_28 + 8)
- .set FP_30, (FP_29 + 8)
- .set FP_31, (FP_30 + 8)
- .set FP_FPSCR, (FP_31 + 8)
-#else
- .set FP_0, 0
- .set FP_1, (FP_0 + 4)
- .set FP_2, (FP_1 + 4)
- .set FP_3, (FP_2 + 4)
- .set FP_4, (FP_3 + 4)
- .set FP_5, (FP_4 + 4)
- .set FP_6, (FP_5 + 4)
- .set FP_7, (FP_6 + 4)
- .set FP_8, (FP_7 + 4)
- .set FP_9, (FP_8 + 4)
- .set FP_10, (FP_9 + 4)
- .set FP_11, (FP_10 + 4)
- .set FP_12, (FP_11 + 4)
- .set FP_13, (FP_12 + 4)
- .set FP_14, (FP_13 + 4)
- .set FP_15, (FP_14 + 4)
- .set FP_16, (FP_15 + 4)
- .set FP_17, (FP_16 + 4)
- .set FP_18, (FP_17 + 4)
- .set FP_19, (FP_18 + 4)
- .set FP_20, (FP_19 + 4)
- .set FP_21, (FP_20 + 4)
- .set FP_22, (FP_21 + 4)
- .set FP_23, (FP_22 + 4)
- .set FP_24, (FP_23 + 4)
- .set FP_25, (FP_24 + 4)
- .set FP_26, (FP_25 + 4)
- .set FP_27, (FP_26 + 4)
- .set FP_28, (FP_27 + 4)
- .set FP_29, (FP_28 + 4)
- .set FP_30, (FP_29 + 4)
- .set FP_31, (FP_30 + 4)
- .set FP_FPSCR, (FP_31 + 4)
-#endif
-
- .set IP_LINK, 0
-#if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27)
- .set IP_0, (IP_LINK + 56)
-#else
- .set IP_0, (IP_LINK + 8)
-#endif
- .set IP_2, (IP_0 + 4)
-
- .set IP_3, (IP_2 + 4)
- .set IP_4, (IP_3 + 4)
- .set IP_5, (IP_4 + 4)
- .set IP_6, (IP_5 + 4)
-
- .set IP_7, (IP_6 + 4)
- .set IP_8, (IP_7 + 4)
- .set IP_9, (IP_8 + 4)
- .set IP_10, (IP_9 + 4)
-
- .set IP_11, (IP_10 + 4)
- .set IP_12, (IP_11 + 4)
- .set IP_13, (IP_12 + 4)
- .set IP_28, (IP_13 + 4)
-
- .set IP_29, (IP_28 + 4)
- .set IP_30, (IP_29 + 4)
- .set IP_31, (IP_30 + 4)
- .set IP_CR, (IP_31 + 4)
-
- .set IP_CTR, (IP_CR + 4)
- .set IP_XER, (IP_CTR + 4)
- .set IP_LR, (IP_XER + 4)
- .set IP_PC, (IP_LR + 4)
-
- .set IP_MSR, (IP_PC + 4)
- .set IP_END, (IP_MSR + 16)
-
- /* _CPU_IRQ_info offsets */
-
- /* These must be in this order */
- .set Nest_level, 0
- .set Disable_level, 4
- .set Vector_table, 8
- .set Stack, 12
-#if (PPC_ABI == PPC_ABI_POWEROPEN)
- .set Dispatch_r2, 16
- .set Switch_necessary, 20
-#else
- .set Default_r2, 16
-#if (PPC_ABI != PPC_ABI_GCC27)
- .set Default_r13, 20
- .set Switch_necessary, 24
-#else
- .set Switch_necessary, 20
-#endif
-#endif
- .set Signal, Switch_necessary + 4
- .set msr_initial, Signal + 4
-
- BEGIN_CODE
-/*
- * _CPU_Context_save_fp_context
- *
- * This routine is responsible for saving the FP context
- * at *fp_context_ptr. If the point to load the FP context
- * from is changed then the pointer is modified by this routine.
- *
- * Sometimes a macro implementation of this is in cpu.h which dereferences
- * the ** and a similarly named routine in this file is passed something
- * like a (Context_Control_fp *). The general rule on making this decision
- * is to avoid writing assembly language.
- */
-
- ALIGN (PPC_CACHE_ALIGNMENT, PPC_CACHE_ALIGN_POWER)
- PUBLIC_PROC (_CPU_Context_save_fp)
-PROC (_CPU_Context_save_fp):
-#if (PPC_HAS_FPU == 1)
- lwz r3, 0(r3)
-#if (PPC_HAS_DOUBLE == 1)
- stfd f0, FP_0(r3)
- stfd f1, FP_1(r3)
- stfd f2, FP_2(r3)
- stfd f3, FP_3(r3)
- stfd f4, FP_4(r3)
- stfd f5, FP_5(r3)
- stfd f6, FP_6(r3)
- stfd f7, FP_7(r3)
- stfd f8, FP_8(r3)
- stfd f9, FP_9(r3)
- stfd f10, FP_10(r3)
- stfd f11, FP_11(r3)
- stfd f12, FP_12(r3)
- stfd f13, FP_13(r3)
- stfd f14, FP_14(r3)
- stfd f15, FP_15(r3)
- stfd f16, FP_16(r3)
- stfd f17, FP_17(r3)
- stfd f18, FP_18(r3)
- stfd f19, FP_19(r3)
- stfd f20, FP_20(r3)
- stfd f21, FP_21(r3)
- stfd f22, FP_22(r3)
- stfd f23, FP_23(r3)
- stfd f24, FP_24(r3)
- stfd f25, FP_25(r3)
- stfd f26, FP_26(r3)
- stfd f27, FP_27(r3)
- stfd f28, FP_28(r3)
- stfd f29, FP_29(r3)
- stfd f30, FP_30(r3)
- stfd f31, FP_31(r3)
- mffs f2
- stfd f2, FP_FPSCR(r3)
-#else
- stfs f0, FP_0(r3)
- stfs f1, FP_1(r3)
- stfs f2, FP_2(r3)
- stfs f3, FP_3(r3)
- stfs f4, FP_4(r3)
- stfs f5, FP_5(r3)
- stfs f6, FP_6(r3)
- stfs f7, FP_7(r3)
- stfs f8, FP_8(r3)
- stfs f9, FP_9(r3)
- stfs f10, FP_10(r3)
- stfs f11, FP_11(r3)
- stfs f12, FP_12(r3)
- stfs f13, FP_13(r3)
- stfs f14, FP_14(r3)
- stfs f15, FP_15(r3)
- stfs f16, FP_16(r3)
- stfs f17, FP_17(r3)
- stfs f18, FP_18(r3)
- stfs f19, FP_19(r3)
- stfs f20, FP_20(r3)
- stfs f21, FP_21(r3)
- stfs f22, FP_22(r3)
- stfs f23, FP_23(r3)
- stfs f24, FP_24(r3)
- stfs f25, FP_25(r3)
- stfs f26, FP_26(r3)
- stfs f27, FP_27(r3)
- stfs f28, FP_28(r3)
- stfs f29, FP_29(r3)
- stfs f30, FP_30(r3)
- stfs f31, FP_31(r3)
- mffs f2
- stfs f2, FP_FPSCR(r3)
-#endif
-#endif
- blr
-
-/*
- * _CPU_Context_restore_fp_context
- *
- * This routine is responsible for restoring the FP context
- * at *fp_context_ptr. If the point to load the FP context
- * from is changed then the pointer is modified by this routine.
- *
- * Sometimes a macro implementation of this is in cpu.h which dereferences
- * the ** and a similarly named routine in this file is passed something
- * like a (Context_Control_fp *). The general rule on making this decision
- * is to avoid writing assembly language.
- */
-
- ALIGN (PPC_CACHE_ALIGNMENT, PPC_CACHE_ALIGN_POWER)
- PUBLIC_PROC (_CPU_Context_restore_fp)
-PROC (_CPU_Context_restore_fp):
-#if (PPC_HAS_FPU == 1)
- lwz r3, 0(r3)
-#if (PPC_HAS_DOUBLE == 1)
- lfd f2, FP_FPSCR(r3)
- mtfsf 255, f2
- lfd f0, FP_0(r3)
- lfd f1, FP_1(r3)
- lfd f2, FP_2(r3)
- lfd f3, FP_3(r3)
- lfd f4, FP_4(r3)
- lfd f5, FP_5(r3)
- lfd f6, FP_6(r3)
- lfd f7, FP_7(r3)
- lfd f8, FP_8(r3)
- lfd f9, FP_9(r3)
- lfd f10, FP_10(r3)
- lfd f11, FP_11(r3)
- lfd f12, FP_12(r3)
- lfd f13, FP_13(r3)
- lfd f14, FP_14(r3)
- lfd f15, FP_15(r3)
- lfd f16, FP_16(r3)
- lfd f17, FP_17(r3)
- lfd f18, FP_18(r3)
- lfd f19, FP_19(r3)
- lfd f20, FP_20(r3)
- lfd f21, FP_21(r3)
- lfd f22, FP_22(r3)
- lfd f23, FP_23(r3)
- lfd f24, FP_24(r3)
- lfd f25, FP_25(r3)
- lfd f26, FP_26(r3)
- lfd f27, FP_27(r3)
- lfd f28, FP_28(r3)
- lfd f29, FP_29(r3)
- lfd f30, FP_30(r3)
- lfd f31, FP_31(r3)
-#else
- lfs f2, FP_FPSCR(r3)
- mtfsf 255, f2
- lfs f0, FP_0(r3)
- lfs f1, FP_1(r3)
- lfs f2, FP_2(r3)
- lfs f3, FP_3(r3)
- lfs f4, FP_4(r3)
- lfs f5, FP_5(r3)
- lfs f6, FP_6(r3)
- lfs f7, FP_7(r3)
- lfs f8, FP_8(r3)
- lfs f9, FP_9(r3)
- lfs f10, FP_10(r3)
- lfs f11, FP_11(r3)
- lfs f12, FP_12(r3)
- lfs f13, FP_13(r3)
- lfs f14, FP_14(r3)
- lfs f15, FP_15(r3)
- lfs f16, FP_16(r3)
- lfs f17, FP_17(r3)
- lfs f18, FP_18(r3)
- lfs f19, FP_19(r3)
- lfs f20, FP_20(r3)
- lfs f21, FP_21(r3)
- lfs f22, FP_22(r3)
- lfs f23, FP_23(r3)
- lfs f24, FP_24(r3)
- lfs f25, FP_25(r3)
- lfs f26, FP_26(r3)
- lfs f27, FP_27(r3)
- lfs f28, FP_28(r3)
- lfs f29, FP_29(r3)
- lfs f30, FP_30(r3)
- lfs f31, FP_31(r3)
-#endif
-#endif
- blr
-
-
-/* _CPU_Context_switch
- *
- * This routine performs a normal non-FP context switch.
- */
- ALIGN (PPC_CACHE_ALIGNMENT, PPC_CACHE_ALIGN_POWER)
- PUBLIC_PROC (_CPU_Context_switch)
-PROC (_CPU_Context_switch):
- sync
- isync
-#if (PPC_CACHE_ALIGNMENT == 4) /* No cache */
- stw r1, GP_1(r3)
- lwz r1, GP_1(r4)
- stw r2, GP_2(r3)
- lwz r2, GP_2(r4)
-#if (PPC_USE_MULTIPLE == 1)
- stmw r13, GP_13(r3)
- lmw r13, GP_13(r4)
-#else
- stw r13, GP_13(r3)
- lwz r13, GP_13(r4)
- stw r14, GP_14(r3)
- lwz r14, GP_14(r4)
- stw r15, GP_15(r3)
- lwz r15, GP_15(r4)
- stw r16, GP_16(r3)
- lwz r16, GP_16(r4)
- stw r17, GP_17(r3)
- lwz r17, GP_17(r4)
- stw r18, GP_18(r3)
- lwz r18, GP_18(r4)
- stw r19, GP_19(r3)
- lwz r19, GP_19(r4)
- stw r20, GP_20(r3)
- lwz r20, GP_20(r4)
- stw r21, GP_21(r3)
- lwz r21, GP_21(r4)
- stw r22, GP_22(r3)
- lwz r22, GP_22(r4)
- stw r23, GP_23(r3)
- lwz r23, GP_23(r4)
- stw r24, GP_24(r3)
- lwz r24, GP_24(r4)
- stw r25, GP_25(r3)
- lwz r25, GP_25(r4)
- stw r26, GP_26(r3)
- lwz r26, GP_26(r4)
- stw r27, GP_27(r3)
- lwz r27, GP_27(r4)
- stw r28, GP_28(r3)
- lwz r28, GP_28(r4)
- stw r29, GP_29(r3)
- lwz r29, GP_29(r4)
- stw r30, GP_30(r3)
- lwz r30, GP_30(r4)
- stw r31, GP_31(r3)
- lwz r31, GP_31(r4)
-#endif
- mfcr r5
- stw r5, GP_CR(r3)
- lwz r5, GP_CR(r4)
- mflr r6
- mtcrf 255, r5
- stw r6, GP_PC(r3)
- lwz r6, GP_PC(r4)
- mfmsr r7
- mtlr r6
- stw r7, GP_MSR(r3)
- lwz r7, GP_MSR(r4)
- mtmsr r7
-#endif
-#if (PPC_CACHE_ALIGNMENT == 16)
- /* This assumes that all the registers are in the given order */
- li r5, 16
- addi r3,r3,-4
-#if ( PPC_USE_DATA_CACHE )
- dcbz r5, r3
-#endif
- stw r1, GP_1+4(r3)
- stw r2, GP_2+4(r3)
-#if (PPC_USE_MULTIPLE == 1)
- addi r3, r3, GP_14+4
-#if ( PPC_USE_DATA_CACHE )
- dcbz r5, r3
-#endif
-
- addi r3, r3, GP_18-GP_14
-#if ( PPC_USE_DATA_CACHE )
- dcbz r5, r3
-#endif
- addi r3, r3, GP_22-GP_18
-#if ( PPC_USE_DATA_CACHE )
- dcbz r5, r3
-#endif
- addi r3, r3, GP_26-GP_22
-#if ( PPC_USE_DATA_CACHE )
- dcbz r5, r3
-#endif
- stmw r13, GP_13-GP_26(r3)
-#else
- stw r13, GP_13+4(r3)
- stwu r14, GP_14+4(r3)
-#if ( PPC_USE_DATA_CACHE )
- dcbz r5, r3
-#endif
- stw r15, GP_15-GP_14(r3)
- stw r16, GP_16-GP_14(r3)
- stw r17, GP_17-GP_14(r3)
- stwu r18, GP_18-GP_14(r3)
-#if ( PPC_USE_DATA_CACHE )
- dcbz r5, r3
-#endif
- stw r19, GP_19-GP_18(r3)
- stw r20, GP_20-GP_18(r3)
- stw r21, GP_21-GP_18(r3)
- stwu r22, GP_22-GP_18(r3)
-#if ( PPC_USE_DATA_CACHE )
- dcbz r5, r3
-#endif
- stw r23, GP_23-GP_22(r3)
- stw r24, GP_24-GP_22(r3)
- stw r25, GP_25-GP_22(r3)
- stwu r26, GP_26-GP_22(r3)
-#if ( PPC_USE_DATA_CACHE )
- dcbz r5, r3
-#endif
- stw r27, GP_27-GP_26(r3)
- stw r28, GP_28-GP_26(r3)
- stw r29, GP_29-GP_26(r3)
- stw r30, GP_30-GP_26(r3)
- stw r31, GP_31-GP_26(r3)
-#endif
-#if ( PPC_USE_DATA_CACHE )
- dcbt r0, r4
-#endif
- mfcr r6
- stw r6, GP_CR-GP_26(r3)
- mflr r7
- stw r7, GP_PC-GP_26(r3)
- mfmsr r8
- stw r8, GP_MSR-GP_26(r3)
-
-#if ( PPC_USE_DATA_CACHE )
- dcbt r5, r4
-#endif
- lwz r1, GP_1(r4)
- lwz r2, GP_2(r4)
-#if (PPC_USE_MULTIPLE == 1)
- addi r4, r4, GP_15
-#if ( PPC_USE_DATA_CACHE )
- dcbt r5, r4
-#endif
- addi r4, r4, GP_19-GP_15
-#if ( PPC_USE_DATA_CACHE )
- dcbt r5, r4
-#endif
- addi r4, r4, GP_23-GP_19
-#if ( PPC_USE_DATA_CACHE )
- dcbt r5, r4
-#endif
- addi r4, r4, GP_27-GP_23
-#if ( PPC_USE_DATA_CACHE )
- dcbt r5, r4
-#endif
- lmw r13, GP_13-GP_27(r4)
-#else
- lwz r13, GP_13(r4)
- lwz r14, GP_14(r4)
- lwzu r15, GP_15(r4)
-#if ( PPC_USE_DATA_CACHE )
- dcbt r5, r4
-#endif
- lwz r16, GP_16-GP_15(r4)
- lwz r17, GP_17-GP_15(r4)
- lwz r18, GP_18-GP_15(r4)
- lwzu r19, GP_19-GP_15(r4)
-#if ( PPC_USE_DATA_CACHE )
- dcbt r5, r4
-#endif
- lwz r20, GP_20-GP_19(r4)
- lwz r21, GP_21-GP_19(r4)
- lwz r22, GP_22-GP_19(r4)
- lwzu r23, GP_23-GP_19(r4)
-#if ( PPC_USE_DATA_CACHE )
- dcbt r5, r4
-#endif
- lwz r24, GP_24-GP_23(r4)
- lwz r25, GP_25-GP_23(r4)
- lwz r26, GP_26-GP_23(r4)
- lwzu r27, GP_27-GP_23(r4)
-#if ( PPC_USE_DATA_CACHE )
- dcbt r5, r4
-#endif
- lwz r28, GP_28-GP_27(r4)
- lwz r29, GP_29-GP_27(r4)
- lwz r30, GP_30-GP_27(r4)
- lwz r31, GP_31-GP_27(r4)
-#endif
- lwz r6, GP_CR-GP_27(r4)
- lwz r7, GP_PC-GP_27(r4)
- lwz r8, GP_MSR-GP_27(r4)
- mtcrf 255, r6
- mtlr r7
- mtmsr r8
-#endif
-#if (PPC_CACHE_ALIGNMENT == 32)
- /* This assumes that all the registers are in the given order */
- li r5, 32
- addi r3,r3,-4
-#if ( PPC_USE_DATA_CACHE )
- dcbz r5, r3
-#endif
- stw r1, GP_1+4(r3)
- stw r2, GP_2+4(r3)
-#if (PPC_USE_MULTIPLE == 1)
- addi r3, r3, GP_18+4
-#if ( PPC_USE_DATA_CACHE )
- dcbz r5, r3
-#endif
- stmw r13, GP_13-GP_18(r3)
-#else
- stw r13, GP_13+4(r3)
- stw r14, GP_14+4(r3)
- stw r15, GP_15+4(r3)
- stw r16, GP_16+4(r3)
- stw r17, GP_17+4(r3)
- stwu r18, GP_18+4(r3)
-#if ( PPC_USE_DATA_CACHE )
- dcbz r5, r3
-#endif
- stw r19, GP_19-GP_18(r3)
- stw r20, GP_20-GP_18(r3)
- stw r21, GP_21-GP_18(r3)
- stw r22, GP_22-GP_18(r3)
- stw r23, GP_23-GP_18(r3)
- stw r24, GP_24-GP_18(r3)
- stw r25, GP_25-GP_18(r3)
- stw r26, GP_26-GP_18(r3)
- stw r27, GP_27-GP_18(r3)
- stw r28, GP_28-GP_18(r3)
- stw r29, GP_29-GP_18(r3)
- stw r30, GP_30-GP_18(r3)
- stw r31, GP_31-GP_18(r3)
-#endif
-#if ( PPC_USE_DATA_CACHE )
- dcbt r0, r4
-#endif
- mfcr r6
- stw r6, GP_CR-GP_18(r3)
- mflr r7
- stw r7, GP_PC-GP_18(r3)
- mfmsr r8
- stw r8, GP_MSR-GP_18(r3)
-
-#if ( PPC_USE_DATA_CACHE )
- dcbt r5, r4
-#endif
- lwz r1, GP_1(r4)
- lwz r2, GP_2(r4)
-#if (PPC_USE_MULTIPLE == 1)
- addi r4, r4, GP_19
-#if ( PPC_USE_DATA_CACHE )
- dcbt r5, r4
-#endif
- lmw r13, GP_13-GP_19(r4)
-#else
- lwz r13, GP_13(r4)
- lwz r14, GP_14(r4)
- lwz r15, GP_15(r4)
- lwz r16, GP_16(r4)
- lwz r17, GP_17(r4)
- lwz r18, GP_18(r4)
- lwzu r19, GP_19(r4)
-#if ( PPC_USE_DATA_CACHE )
- dcbt r5, r4
-#endif
- lwz r20, GP_20-GP_19(r4)
- lwz r21, GP_21-GP_19(r4)
- lwz r22, GP_22-GP_19(r4)
- lwz r23, GP_23-GP_19(r4)
- lwz r24, GP_24-GP_19(r4)
- lwz r25, GP_25-GP_19(r4)
- lwz r26, GP_26-GP_19(r4)
- lwz r27, GP_27-GP_19(r4)
- lwz r28, GP_28-GP_19(r4)
- lwz r29, GP_29-GP_19(r4)
- lwz r30, GP_30-GP_19(r4)
- lwz r31, GP_31-GP_19(r4)
-#endif
- lwz r6, GP_CR-GP_19(r4)
- lwz r7, GP_PC-GP_19(r4)
- lwz r8, GP_MSR-GP_19(r4)
- mtcrf 255, r6
- mtlr r7
- mtmsr r8
-#endif
- blr
-
-/*
- * _CPU_Context_restore
- *
- * This routine is generallu used only to restart self in an
- * efficient manner. It may simply be a label in _CPU_Context_switch.
- *
- * NOTE: May be unnecessary to reload some registers.
- */
-/*
- * ACB: Don't worry about cache optimisation here - this is not THAT critical.
- */
- ALIGN (PPC_CACHE_ALIGNMENT, PPC_CACHE_ALIGN_POWER)
- PUBLIC_PROC (_CPU_Context_restore)
-PROC (_CPU_Context_restore):
- lwz r5, GP_CR(r3)
- lwz r6, GP_PC(r3)
- lwz r7, GP_MSR(r3)
- mtcrf 255, r5
- mtlr r6
- mtmsr r7
- lwz r1, GP_1(r3)
- lwz r2, GP_2(r3)
-#if (PPC_USE_MULTIPLE == 1)
- lmw r13, GP_13(r3)
-#else
- lwz r13, GP_13(r3)
- lwz r14, GP_14(r3)
- lwz r15, GP_15(r3)
- lwz r16, GP_16(r3)
- lwz r17, GP_17(r3)
- lwz r18, GP_18(r3)
- lwz r19, GP_19(r3)
- lwz r20, GP_20(r3)
- lwz r21, GP_21(r3)
- lwz r22, GP_22(r3)
- lwz r23, GP_23(r3)
- lwz r24, GP_24(r3)
- lwz r25, GP_25(r3)
- lwz r26, GP_26(r3)
- lwz r27, GP_27(r3)
- lwz r28, GP_28(r3)
- lwz r29, GP_29(r3)
- lwz r30, GP_30(r3)
- lwz r31, GP_31(r3)
-#endif
-
- blr
-
-/* Individual interrupt prologues look like this:
- * #if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27)
- * #if (PPC_HAS_FPU)
- * stwu r1, -(20*4 + 18*8 + IP_END)(r1)
- * #else
- * stwu r1, -(20*4 + IP_END)(r1)
- * #endif
- * #else
- * stwu r1, -(IP_END)(r1)
- * #endif
- * stw r0, IP_0(r1)
- *
- * li r0, vectornum
- * b PROC (_ISR_Handler{,C})
- */
-
-/* void __ISR_Handler()
- *
- * This routine provides the RTEMS interrupt management.
- * The vector number is in r0. R0 has already been stacked.
- *
- */
- ALIGN (PPC_CACHE_ALIGNMENT, PPC_CACHE_ALIGN_POWER)
- PUBLIC_PROC (_ISR_Handler)
-PROC (_ISR_Handler):
-#define LABEL(x) x
-/* XXX ??
-#define MTSAVE(x) mtspr sprg0, x
-#define MFSAVE(x) mfspr x, sprg0
-*/
-#define MTPC(x) mtspr srr0, x
-#define MFPC(x) mfspr x, srr0
-#define MTMSR(x) mtspr srr1, x
-#define MFMSR(x) mfspr x, srr1
-
- #include "irq_stub.S"
- rfi
-
-#if (PPC_HAS_RFCI == 1)
-/* void __ISR_HandlerC()
- *
- * This routine provides the RTEMS interrupt management.
- * For critical interrupts
- *
- */
- ALIGN (PPC_CACHE_ALIGNMENT, PPC_CACHE_ALIGN_POWER)
- PUBLIC_PROC (_ISR_HandlerC)
-PROC (_ISR_HandlerC):
-#undef LABEL
-#undef MTSAVE
-#undef MFSAVE
-#undef MTPC
-#undef MFPC
-#undef MTMSR
-#undef MFMSR
-#define LABEL(x) x##_C
-/* XXX??
-#define MTSAVE(x) mtspr sprg1, x
-#define MFSAVE(x) mfspr x, sprg1
-*/
-#define MTPC(x) mtspr srr2, x
-#define MFPC(x) mfspr x, srr2
-#define MTMSR(x) mtspr srr3, x
-#define MFMSR(x) mfspr x, srr3
- #include "irq_stub.S"
- rfci
-#endif
-
-/* PowerOpen descriptors for indirect function calls.
- */
-
-#if (PPC_ABI == PPC_ABI_POWEROPEN)
- DESCRIPTOR (_CPU_Context_save_fp)
- DESCRIPTOR (_CPU_Context_restore_fp)
- DESCRIPTOR (_CPU_Context_switch)
- DESCRIPTOR (_CPU_Context_restore)
- DESCRIPTOR (_ISR_Handler)
-#if (PPC_HAS_RFCI == 1)
- DESCRIPTOR (_ISR_HandlerC)
-#endif
-#endif
diff --git a/c/src/lib/libcpu/powerpc/old-exceptions/irq_stub.S b/c/src/lib/libcpu/powerpc/old-exceptions/irq_stub.S
deleted file mode 100644
index 76c8927305..0000000000
--- a/c/src/lib/libcpu/powerpc/old-exceptions/irq_stub.S
+++ /dev/null
@@ -1,268 +0,0 @@
-/*
- * This file contains the interrupt handler assembly code for the PowerPC
- * implementation of RTEMS. It is #included from cpu_asm.s.
- *
- * Author: Andrew Bray <andy@i-cubed.co.uk>
- *
- * COPYRIGHT (c) 1995 by i-cubed ltd.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of i-cubed limited not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * i-cubed limited makes no representations about the suitability
- * of this software for any purpose.
- *
- * $Id$
- */
-
-/* void __ISR_Handler()
- *
- * This routine provides the RTEMS interrupt management.
- * The vector number is in r0. R0 has already been stacked.
- *
- */
- PUBLIC_VAR (_CPU_IRQ_info )
-
- /* Finish off the interrupt frame */
- stw r2, IP_2(r1)
- stw r3, IP_3(r1)
- stw r4, IP_4(r1)
- stw r5, IP_5(r1)
- stw r6, IP_6(r1)
- stw r7, IP_7(r1)
- stw r8, IP_8(r1)
- stw r9, IP_9(r1)
- stw r10, IP_10(r1)
- stw r11, IP_11(r1)
- stw r12, IP_12(r1)
- stw r13, IP_13(r1)
- stmw r28, IP_28(r1)
- mfcr r5
- mfctr r6
- mfxer r7
- mflr r8
- MFPC (r9)
- MFMSR (r10)
- /* Establish addressing */
-#if (PPC_USE_SPRG)
- mfspr r11, sprg3
-#else
- lis r11,_CPU_IRQ_info@ha
- addi r11,r11,_CPU_IRQ_info@l
-#endif
- dcbt r0, r11
- stw r5, IP_CR(r1)
- stw r6, IP_CTR(r1)
- stw r7, IP_XER(r1)
- stw r8, IP_LR(r1)
- stw r9, IP_PC(r1)
- stw r10, IP_MSR(r1)
-
- lwz r30, Vector_table(r11)
- slwi r4,r0,2
- lwz r28, Nest_level(r11)
- add r4, r4, r30
-
- lwz r30, 0(r28)
- mr r3, r0
- lwz r31, Stack(r11)
- /*
- * #if ( CPU_HAS_SOFTWARE_INTERRUPT_STACK == TRUE )
- * if ( _ISR_Nest_level == 0 )
- * switch to software interrupt stack
- * #endif
- */
- /* Switch stacks, here we must prevent ALL interrupts */
-#if (PPC_USE_SPRG)
- mfmsr r5
- mfspr r6, sprg2
-#else
- lwz r6,msr_initial(r11)
- lis r5,~PPC_MSR_DISABLE_MASK@ha
- ori r5,r5,~PPC_MSR_DISABLE_MASK@l
- and r6,r6,r5
- mfmsr r5
-#endif
- mtmsr r6
- cmpwi r30, 0
- lwz r29, Disable_level(r11)
- subf r31,r1,r31
- bne LABEL (nested)
- stwux r1,r1,r31
-LABEL (nested):
- /*
- * _ISR_Nest_level++;
- */
- lwz r31, 0(r29)
- addi r30,r30,1
- stw r30,0(r28)
- /* From here on out, interrupts can be re-enabled. RTEMS
- * convention says not.
- */
- lwz r4,0(r4)
- /*
- * _Thread_Dispatch_disable_level++;
- */
- addi r31,r31,1
- stw r31, 0(r29)
-/* SCE 980217
- *
- * We need address translation ON when we call our ISR routine
-
- mtmsr r5
-
- */
-
- /*
- * (*_ISR_Vector_table[ vector ])( vector );
- */
-#if (PPC_ABI == PPC_ABI_POWEROPEN)
- lwz r6,0(r4)
- lwz r2,4(r4)
- mtlr r6
- lwz r11,8(r4)
-#endif
-#if (PPC_ABI == PPC_ABI_GCC27)
- lwz r2, Default_r2(r11)
- mtlr r4
- #lwz r2, 0(r2)
-#endif
-#if (PPC_ABI == PPC_ABI_SVR4 || PPC_ABI == PPC_ABI_EABI)
- mtlr r4
- lwz r2, Default_r2(r11)
- lwz r13, Default_r13(r11)
- #lwz r2, 0(r2)
- #lwz r13, 0(r13)
-#endif
- mr r4,r1
- blrl
- /* NOP marker for debuggers */
- or r6,r6,r6
-
- /* We must re-disable the interrupts */
-#if (PPC_USE_SPRG)
- mfspr r11, sprg3
- mfspr r0, sprg2
-#else
- lis r11,_CPU_IRQ_info@ha
- addi r11,r11,_CPU_IRQ_info@l
- lwz r0,msr_initial(r11)
- lis r30,~PPC_MSR_DISABLE_MASK@ha
- ori r30,r30,~PPC_MSR_DISABLE_MASK@l
- and r0,r0,r30
-#endif
- mtmsr r0
- lwz r30, 0(r28)
- lwz r31, 0(r29)
-
- /*
- * if (--Thread_Dispatch_disable,--_ISR_Nest_level)
- * goto easy_exit;
- */
- addi r30, r30, -1
- cmpwi r30, 0
- addi r31, r31, -1
- stw r30, 0(r28)
- stw r31, 0(r29)
- bne LABEL (easy_exit)
- cmpwi r31, 0
-
- lwz r30, Switch_necessary(r11)
-
- /*
- * #if ( CPU_HAS_SOFTWARE_INTERRUPT_STACK == TRUE )
- * restore stack
- * #endif
- */
- lwz r1,0(r1)
- bne LABEL (easy_exit)
- lwz r30, 0(r30)
- lwz r31, Signal(r11)
-
- /*
- * if ( _Context_Switch_necessary )
- * goto switch
- */
- cmpwi r30, 0
- lwz r28, 0(r31)
- li r6,0
- bne LABEL (switch)
- /*
- * if ( !_ISR_Signals_to_thread_executing )
- * goto easy_exit
- * _ISR_Signals_to_thread_executing = 0;
- */
- cmpwi r28, 0
- beq LABEL (easy_exit)
-
- /*
- * switch:
- * call _Thread_Dispatch() or prepare to return to _ISR_Dispatch
- */
-LABEL (switch):
- stw r6, 0(r31)
- /* Re-enable interrupts */
- lwz r0, IP_MSR(r1)
-#if (PPC_ABI == PPC_ABI_POWEROPEN)
- lwz r2, Dispatch_r2(r11)
-#else
- /* R2 and R13 still hold their values from the last call */
-#endif
- mtmsr r0
- bl SYM (_Thread_Dispatch)
- /* NOP marker for debuggers */
- or r6,r6,r6
- /*
- * prepare to get out of interrupt
- */
- /* Re-disable IRQs */
-#if (PPC_USE_SPRG)
- mfspr r0, sprg2
-#else
- lis r11,_CPU_IRQ_info@ha
- addi r11,r11,_CPU_IRQ_info@l
- lwz r0,msr_initial(r11)
- lis r5,~PPC_MSR_DISABLE_MASK@ha
- ori r5,r5,~PPC_MSR_DISABLE_MASK@l
- and r0,r0,r5
-#endif
- mtmsr r0
-
- /*
- * easy_exit:
- * prepare to get out of interrupt
- * return from interrupt
- */
-LABEL (easy_exit):
- lwz r5, IP_CR(r1)
- lwz r6, IP_CTR(r1)
- lwz r7, IP_XER(r1)
- lwz r8, IP_LR(r1)
- lwz r9, IP_PC(r1)
- lwz r10, IP_MSR(r1)
- mtcrf 255,r5
- mtctr r6
- mtxer r7
- mtlr r8
- MTPC (r9)
- MTMSR (r10)
- lwz r0, IP_0(r1)
- lwz r2, IP_2(r1)
- lwz r3, IP_3(r1)
- lwz r4, IP_4(r1)
- lwz r5, IP_5(r1)
- lwz r6, IP_6(r1)
- lwz r7, IP_7(r1)
- lwz r8, IP_8(r1)
- lwz r9, IP_9(r1)
- lwz r10, IP_10(r1)
- lwz r11, IP_11(r1)
- lwz r12, IP_12(r1)
- lwz r13, IP_13(r1)
- lmw r28, IP_28(r1)
- lwz r1, 0(r1)
diff --git a/c/src/lib/libcpu/powerpc/old-exceptions/ppccache.c b/c/src/lib/libcpu/powerpc/old-exceptions/ppccache.c
deleted file mode 100644
index ecfb4b96ca..0000000000
--- a/c/src/lib/libcpu/powerpc/old-exceptions/ppccache.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * PowerPC Cache enable routines
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-
-#define PPC_Get_HID0( _value ) \
- do { \
- _value = 0; /* to avoid warnings */ \
- asm volatile( \
- "mfspr %0, 0x3f0;" /* get HID0 */ \
- "isync" \
- : "=r" (_value) \
- : "0" (_value) \
- ); \
- } while (0)
-
-#define PPC_Set_HID0( _value ) \
- do { \
- asm volatile( \
- "isync;" \
- "mtspr 0x3f0, %0;" /* load HID0 */ \
- "isync" \
- : "=r" (_value) \
- : "0" (_value) \
- ); \
- } while (0)
-
-
-void powerpc_instruction_cache_enable ()
-{
- unsigned32 value;
-
- /*
- * Enable the instruction cache
- */
-
- PPC_Get_HID0( value );
-
- value |= 0x00008000; /* Set ICE bit */
-
- PPC_Set_HID0( value );
-}
-
-void powerpc_data_cache_enable ()
-{
- unsigned32 value;
-
- /*
- * enable data cache
- */
-
- PPC_Get_HID0( value );
-
- value |= 0x00004000; /* set DCE bit */
-
- PPC_Set_HID0( value );
-}
-
diff --git a/c/src/lib/libcpu/powerpc/old_exception_processing/Makefile.am b/c/src/lib/libcpu/powerpc/old_exception_processing/Makefile.am
deleted file mode 100644
index afd66502eb..0000000000
--- a/c/src/lib/libcpu/powerpc/old_exception_processing/Makefile.am
+++ /dev/null
@@ -1,66 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-# C source names
-C_FILES = cpu.c ppccache.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-ROOT_H_FILES =
-RTEMS_SCORE_H_FILES = cpu.h c_isr.inl
-noinst_HEADERS = $(ROOT_H_FILES) $(RTEMS_SCORE_H_FILES)
-
-# Assembly source names
-S_FILES = cpu_asm.S
-S_O_FILES = $(S_FILES:%.S=${ARCH}/%.o)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../../../../automake/lib.am
-
-PREINSTALL_FILES = \
-$(PROJECT_INCLUDE) \
-$(PROJECT_INCLUDE)/rtems/score \
-$(ROOT_H_FILES:%=$(PROJECT_INCLUDE)/%) \
-$(RTEMS_SCORE_H_FILES:%=$(PROJECT_INCLUDE)/rtems/score/%)
-
-TMPINSTALL_FILES += \
-$(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o
-
-$(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o: $(ARCH)/rtems.o
- $(INSTALL_DATA) $< $@
-
-$(PROJECT_INCLUDE):
- $(mkinstalldirs) $@
-
-$(PROJECT_INCLUDE)/rtems/score:
- $(mkinstalldirs) $@
-
-$(PROJECT_INCLUDE)/rtems/score/%: %
- $(INSTALL_DATA) $< $@
-
-$(PROJECT_INCLUDE)/%: %
- $(INSTALL_DATA) $< $@
-
-REL = ../$(ARCH)/rtems-cpu.rel
-
-$(REL): $(C_O_FILES) $(S_O_FILES)
- test -d ../$(ARCH) || mkdir ../$(ARCH)
- $(make-rel)
-
-all-local: $(ARCH) $(PREINSTALL_FILES) $(REL)
-all-local: $(ARCH)/rtems.o
-all-local: $(TMPINSTALL_FILES)
-
-clean-local:
- $(RM) -r ../o-optimize ../o-debug ../o-profile
-
-UNUSED_FILES = irq_stub.S
-
-EXTRA_DIST = \
-TODO \
-rtems.S \
-$(C_FILES) $(S_FILES) $(UNUSED_FILES)
-
-include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/c/src/lib/libcpu/powerpc/old_exception_processing/README b/c/src/lib/libcpu/powerpc/old_exception_processing/README
deleted file mode 100644
index c72bebfe0c..0000000000
--- a/c/src/lib/libcpu/powerpc/old_exception_processing/README
+++ /dev/null
@@ -1,80 +0,0 @@
-#
-# $Id$
-#
-
-There are various issues regarding this port:
-
-
-
-1) Legal
-
-This port is written by Andrew Bray <andy@i-cubed.co.uk>, and
-is copyright 1995 i-cubed ltd.
-
-This port was later updated by Joel Sherrill <joel@OARcorp.com>
-to test the support for the PPC603, PPC603e, and MPC604. This
-was tested on the PowerPC simulator PSIM and a VMEbus single board
-computer.
-
-2) CPU support.
-
-This release fully supports the PPC403GA, PPC403GB, PPC603, PPC603e,
-MPC604, MPC750, and numerous MPC8xx processors. A good faith attempt
-has been made to include support other models based upon available
-documentation including the MPC5xx. There are two interrupt structures
-supported by the PowerPC port. The newer structure is supported by
-all the MPC750 and MPC604 BSPs. This structure is required to use
-the RDBG remote debugging support.
-
-This port was originally written and tested on the PPC403GA (using
-software floating point). Current ports are tested primarily on
-60x CPUs using the PowerPC simulator PSIM.
-
-Andrew Bray received assistance during the initial porting effort
-from IBM and Blue Micro and we would like to gratefully acknowledge
-that help.
-
-The support for the PPC602 processor is incomplete as only sketchy
-data is currently available. Perhaps this model has been dropped.
-
-3) Application Binary Interface
-
-In the context of RTEMS, the ABI is of interest for the following
-aspects:
-
-a) Register usage. Which registers are used to provide static variable
- linkage, stack pointer etc.
-
-b) Function calling convention. How parameters are passed, how function
- variables should be invoked, how values are returned, etc.
-
-c) Stack frame layout.
-
-I am aware of a number of ABIs for the PowerPC:
-
-a) The PowerOpen ABI. This is the original Power ABI used on the RS/6000.
- This is the only ABI supported by versions of GCC before 2.7.0.
-
-b) The SVR4 ABI. This is the ABI defined by SunSoft for the Solaris port
- to the PowerPC.
-
-c) The Embedded ABI. This is an embedded ABI for PowerPC use, which has no
- operating system interface defined. It is promoted by SunSoft, Motorola,
- and Cygnus Support. Cygnus are porting the GNU toolchain to this ABI.
-
-d) GCC 2.7.0. This compiler is partway along the road to supporting the EABI,
- but is currently halfway in between.
-
-This port was built and tested using the PowerOpen ABI, with the following
-caveat: we used an ELF assembler and linker. So some attention may be
-required on the assembler files to get them through a traditional (XCOFF)
-PowerOpen assembler.
-
-This port contains support for the other ABIs, but this may prove to be
-incomplete as it is untested.
-
-The RTEMS PowerPC port supports EABI as the primary ABI. The powerpc-rtems
-GNU toolset configuration is EABI.
-
-Andrew Bray, 4 December 1995
-Joel Sherrill, 16 July 1997
diff --git a/c/src/lib/libcpu/powerpc/old_exception_processing/TODO b/c/src/lib/libcpu/powerpc/old_exception_processing/TODO
deleted file mode 100644
index 64c96cb14c..0000000000
--- a/c/src/lib/libcpu/powerpc/old_exception_processing/TODO
+++ /dev/null
@@ -1,8 +0,0 @@
-#
-# $Id$
-#
-
-Todo list:
-
-Maybe decode external interrupts like the HPPA does.
- See c/src/lib/libcpu/powerpc/ppc403/ictrl/* for implementation on ppc403
diff --git a/c/src/lib/libcpu/powerpc/old_exception_processing/c_isr.inl b/c/src/lib/libcpu/powerpc/old_exception_processing/c_isr.inl
deleted file mode 100644
index 706d4f7e4f..0000000000
--- a/c/src/lib/libcpu/powerpc/old_exception_processing/c_isr.inl
+++ /dev/null
@@ -1,4 +0,0 @@
-RTEMS_INLINE_ROUTINE boolean _ISR_Is_in_progress( void )
-{
- return (_ISR_Nest_level != 0);
-}
diff --git a/c/src/lib/libcpu/powerpc/old_exception_processing/cpu.c b/c/src/lib/libcpu/powerpc/old_exception_processing/cpu.c
deleted file mode 100644
index 7d6824cb26..0000000000
--- a/c/src/lib/libcpu/powerpc/old_exception_processing/cpu.c
+++ /dev/null
@@ -1,853 +0,0 @@
-/*
- * PowerPC CPU Dependent Source
- *
- * Author: Andrew Bray <andy@i-cubed.co.uk>
- *
- * COPYRIGHT (c) 1995 by i-cubed ltd.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of i-cubed limited not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * i-cubed limited makes no representations about the suitability
- * of this software for any purpose.
- *
- * Derived from c/src/exec/cpu/no_cpu/cpu.c:
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may be found in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/context.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/interr.h>
-
-/*
- * These are for testing purposes.
- */
-
-/* _CPU_Initialize
- *
- * This routine performs processor dependent initialization.
- *
- * INPUT PARAMETERS:
- * cpu_table - CPU table to initialize
- * thread_dispatch - address of disptaching routine
- */
-
-static void ppc_spurious(int, CPU_Interrupt_frame *);
-
-void _CPU_Initialize(
- rtems_cpu_table *cpu_table,
- void (*thread_dispatch) /* ignored on this CPU */
-)
-{
- proc_ptr handler = (proc_ptr)ppc_spurious;
- int i;
-#if (PPC_ABI != PPC_ABI_POWEROPEN)
- register unsigned32 r2 = 0;
-#if (PPC_ABI != PPC_ABI_GCC27)
- register unsigned32 r13 = 0;
-
- asm ("mr %0,13" : "=r" ((r13)) : "0" ((r13)));
- _CPU_IRQ_info.Default_r13 = r13;
-#endif
-
- asm ("mr %0,2" : "=r" ((r2)) : "0" ((r2)));
- _CPU_IRQ_info.Default_r2 = r2;
-#endif
-
- _CPU_IRQ_info.Nest_level = &_ISR_Nest_level;
- _CPU_IRQ_info.Disable_level = &_Thread_Dispatch_disable_level;
- _CPU_IRQ_info.Vector_table = _ISR_Vector_table;
-#if (PPC_ABI == PPC_ABI_POWEROPEN)
- _CPU_IRQ_info.Dispatch_r2 = ((unsigned32 *)_Thread_Dispatch)[1];
-#endif
- _CPU_IRQ_info.Switch_necessary = &_Context_Switch_necessary;
- _CPU_IRQ_info.Signal = &_ISR_Signals_to_thread_executing;
-
-#if (PPC_USE_SPRG)
- i = (int)&_CPU_IRQ_info;
- asm volatile("mtspr 0x113, %0" : "=r" (i) : "0" (i)); /* SPRG 3 */
-#endif
-
- /*
- * Store Msr Value in the IRQ info structure.
- */
- _CPU_MSR_Value(_CPU_IRQ_info.msr_initial);
-
-#if (PPC_USE_SPRG)
- i = _CPU_IRQ_info.msr_initial;
- asm volatile("mtspr 0x112, %0" : "=r" (i) : "0" (i)); /* SPRG 2 */
-#endif
-
- if ( cpu_table->spurious_handler )
- handler = (proc_ptr)cpu_table->spurious_handler;
-
- for (i = 0; i < PPC_INTERRUPT_MAX; i++)
- _ISR_Vector_table[i] = handler;
-
- _CPU_Table = *cpu_table;
-}
-
-/*PAGE
- *
- * _CPU_ISR_Calculate_level
- *
- * The PowerPC puts its interrupt enable status in the MSR register
- * which also contains things like endianness control. To be more
- * awkward, the layout varies from processor to processor. This
- * is why it was necessary to adopt a scheme which allowed the user
- * to specify specifically which interrupt sources were enabled.
- */
-
-unsigned32 _CPU_ISR_Calculate_level(
- unsigned32 new_level
-)
-{
- register unsigned32 new_msr = 0;
-
- /*
- * Set the critical interrupt enable bit
- */
-
-#if (PPC_HAS_RFCI)
- if ( !(new_level & PPC_INTERRUPT_LEVEL_CE) )
- new_msr |= PPC_MSR_CE;
-#endif
-
- if ( !(new_level & PPC_INTERRUPT_LEVEL_ME) )
- new_msr |= PPC_MSR_ME;
-
- if ( !(new_level & PPC_INTERRUPT_LEVEL_EE) )
- new_msr |= PPC_MSR_EE;
-
- return new_msr;
-}
-
-/*PAGE
- *
- * _CPU_ISR_Set_level
- *
- * This routine sets the requested level in the MSR.
- */
-
-void _CPU_ISR_Set_level(
- unsigned32 new_level
-)
-{
- register unsigned32 tmp = 0;
- register unsigned32 new_msr;
-
- new_msr = _CPU_ISR_Calculate_level( new_level );
-
- asm volatile (
- "mfmsr %0; andc %0,%0,%1; and %2, %2, %1; or %0, %0, %2; mtmsr %0" :
- "=&r" ((tmp)) :
- "r" ((PPC_MSR_DISABLE_MASK)), "r" ((new_msr)), "0" ((tmp))
- );
-}
-
-/*PAGE
- *
- * _CPU_ISR_Get_level
- *
- * This routine gets the current interrupt level from the MSR and
- * converts it to an RTEMS interrupt level.
- */
-
-unsigned32 _CPU_ISR_Get_level( void )
-{
- unsigned32 level = 0;
- unsigned32 msr;
-
- asm volatile("mfmsr %0" : "=r" ((msr)));
-
- msr &= PPC_MSR_DISABLE_MASK;
-
- /*
- * Set the critical interrupt enable bit
- */
-
-#if (PPC_HAS_RFCI)
- if ( !(msr & PPC_MSR_CE) )
- level |= PPC_INTERRUPT_LEVEL_CE;
-#endif
-
- if ( !(msr & PPC_MSR_ME) )
- level |= PPC_INTERRUPT_LEVEL_ME;
-
- if ( !(msr & PPC_MSR_EE) )
- level |= PPC_INTERRUPT_LEVEL_EE;
-
- return level;
-}
-
-/*PAGE
- *
- * _CPU_Context_Initialize
- */
-
-#if (PPC_ABI == PPC_ABI_POWEROPEN)
-#define CPU_MINIMUM_STACK_FRAME_SIZE 56
-#else /* PPC_ABI_SVR4 or PPC_ABI_EABI */
-#define CPU_MINIMUM_STACK_FRAME_SIZE 8
-#endif
-
-void _CPU_Context_Initialize(
- Context_Control *the_context,
- unsigned32 *stack_base,
- unsigned32 size,
- unsigned32 new_level,
- void *entry_point,
- boolean is_fp
-)
-{
- unsigned32 msr_value;
- unsigned32 sp;
-
- sp = (unsigned32)stack_base + size - CPU_MINIMUM_STACK_FRAME_SIZE;
- *((unsigned32 *)sp) = 0;
- the_context->gpr1 = sp;
-
- the_context->msr = _CPU_ISR_Calculate_level( new_level );
-
- /*
- * The FP bit of the MSR should only be enabled if this is a floating
- * point task. Unfortunately, the vfprintf_r routine in newlib
- * ends up pushing a floating point register regardless of whether or
- * not a floating point number is being printed. Serious restructuring
- * of vfprintf.c will be required to avoid this behavior. At this
- * time (7 July 1997), this restructuring is not being done.
- */
-
- /*if ( is_fp ) */
- the_context->msr |= PPC_MSR_FP;
-
- /*
- * Calculate the task's MSR value:
- *
- * + Set the exception prefix bit to point to the exception table
- * + Force the RI bit
- * + Use the DR and IR bits
- */
- _CPU_MSR_Value( msr_value );
- the_context->msr |= (msr_value & PPC_MSR_EP);
- the_context->msr |= PPC_MSR_RI;
- the_context->msr |= msr_value & (PPC_MSR_DR|PPC_MSR_IR);
-
-#if (PPC_ABI == PPC_ABI_POWEROPEN)
- { unsigned32 *desc = (unsigned32 *)entry_point;
-
- the_context->pc = desc[0];
- the_context->gpr2 = desc[1];
- }
-#endif
-
-#if (PPC_ABI == PPC_ABI_SVR4)
- { unsigned r13 = 0;
- asm volatile ("mr %0, 13" : "=r" ((r13)));
-
- the_context->pc = (unsigned32)entry_point;
- the_context->gpr13 = r13;
- }
-#endif
-
-#if (PPC_ABI == PPC_ABI_EABI)
- { unsigned32 r2 = 0;
- unsigned r13 = 0;
- asm volatile ("mr %0,2; mr %1,13" : "=r" ((r2)), "=r" ((r13)));
-
- the_context->pc = (unsigned32)entry_point;
- the_context->gpr2 = r2;
- the_context->gpr13 = r13;
- }
-#endif
-}
-
-
-/* _CPU_ISR_install_vector
- *
- * This kernel routine installs the RTEMS handler for the
- * specified vector.
- *
- * Input parameters:
- * vector - interrupt vector number
- * old_handler - former ISR for this vector number
- * new_handler - replacement ISR for this vector number
- *
- * Output parameters: NONE
- *
- */
-
-void _CPU_ISR_install_vector(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-)
-{
- proc_ptr ignored;
- *old_handler = _ISR_Vector_table[ vector ];
-
- /*
- * If the interrupt vector table is a table of pointer to isr entry
- * points, then we need to install the appropriate RTEMS interrupt
- * handler for this vector number.
- */
-
- /*
- * Install the wrapper so this ISR can be invoked properly.
- */
- if (_CPU_Table.exceptions_in_RAM)
- _CPU_ISR_install_raw_handler( vector, _ISR_Handler, &ignored );
-
- /*
- * We put the actual user ISR address in '_ISR_vector_table'. This will
- * be used by the _ISR_Handler so the user gets control.
- */
-
- _ISR_Vector_table[ vector ] = new_handler ? (ISR_Handler_entry)new_handler :
- _CPU_Table.spurious_handler ?
- (ISR_Handler_entry)_CPU_Table.spurious_handler :
- (ISR_Handler_entry)ppc_spurious;
-}
-
-/*PAGE
- *
- * _CPU_Install_interrupt_stack
- */
-
-void _CPU_Install_interrupt_stack( void )
-{
-#if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27)
- _CPU_IRQ_info.Stack = _CPU_Interrupt_stack_high - 56;
-#else
- _CPU_IRQ_info.Stack = _CPU_Interrupt_stack_high - 8;
-#endif
-}
-
-/* Handle a spurious interrupt */
-static void ppc_spurious(int v, CPU_Interrupt_frame *i)
-{
-#if 0
- printf("Spurious interrupt on vector %d from %08.8x\n",
- v, i->pc);
-#endif
-#ifdef ppc403
- if (v == PPC_IRQ_EXTERNAL)
- {
- register int r = 0;
-
- asm volatile("mtdcr 0x42, %0" :
- "=&r" ((r)) : "0" ((r))); /* EXIER */
- }
- else if (v == PPC_IRQ_PIT)
- {
- register int r = 0x08000000;
-
- asm volatile("mtspr 0x3d8, %0" :
- "=&r" ((r)) : "0" ((r))); /* TSR */
- }
- else if (v == PPC_IRQ_FIT)
- {
- register int r = 0x04000000;
-
- asm volatile("mtspr 0x3d8, %0" :
- "=&r" ((r)) : "0" ((r))); /* TSR */
- }
-#endif
-}
-
-void _CPU_Fatal_error(unsigned32 _error)
-{
- asm volatile ("mr 3, %0" : : "r" ((_error)));
- asm volatile ("tweq 5,5");
- asm volatile ("li 0,0; mtmsr 0");
- while (1) ;
-}
-
-#define PPC_SYNCHRONOUS_TRAP_BIT_MASK 0x100
-#define PPC_ASYNCHRONOUS_TRAP( _trap ) (_trap)
-#define PPC_SYNCHRONOUS_TRAP ( _trap ) ((_trap)+PPC_SYNCHRONOUS_TRAP_BIT_MASK)
-#define PPC_REAL_TRAP_NUMBER ( _trap ) ((_trap)%PPC_SYNCHRONOUS_TRAP_BIT_MASK)
-
-
-const CPU_Trap_table_entry _CPU_Trap_slot_template = {
-
-#if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27)
-#error " Vector install not tested."
-#if (PPC_HAS_FPU)
-#error " Vector install not tested."
- 0x9421feb0, /* stwu r1, -(20*4 + 18*8 + IP_END)(r1) */
-#else
-#error " Vector install not tested."
- 0x9421ff40, /* stwu r1, -(20*4 + IP_END)(r1) */
-#endif
-#else
- 0x9421ff90, /* stwu r1, -(IP_END)(r1) */
-#endif
-
- 0x90010008, /* stw %r0, IP_0(%r1) */
- 0x38000000, /* li %r0, PPC_IRQ */
- 0x48000002 /* ba PROC (_ISR_Handler) */
-};
-
-#if defined(mpc860) || defined(mpc821)
-const CPU_Trap_table_entry _CPU_Trap_slot_template_m860 = {
- 0x7c0803ac, /* mtlr %r0 */
- 0x81210028, /* lwz %r9, IP_9(%r1) */
- 0x38000000, /* li %r0, PPC_IRQ */
- 0x48000002 /* b PROC (_ISR_Handler) */
-};
-#endif /* mpc860 */
-
-unsigned32 ppc_exception_vector_addr(
- unsigned32 vector
-);
-
-
-/*PAGE
- *
- * _CPU_ISR_install_raw_handler
- *
- * This routine installs the specified handler as a "raw" non-executive
- * supported trap handler (a.k.a. interrupt service routine).
- *
- * Input Parameters:
- * vector - trap table entry number plus synchronous
- * vs. asynchronous information
- * new_handler - address of the handler to be installed
- * old_handler - pointer to an address of the handler previously installed
- *
- * Output Parameters: NONE
- * *new_handler - address of the handler previously installed
- *
- * NOTE:
- *
- * This routine is based on the SPARC routine _CPU_ISR_install_raw_handler.
- * Install a software trap handler as an executive interrupt handler
- * (which is desirable since RTEMS takes care of window and register issues),
- * then the executive needs to know that the return address is to the trap
- * rather than the instruction following the trap.
- *
- */
-
-void _CPU_ISR_install_raw_handler(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-)
-{
- unsigned32 real_vector;
- CPU_Trap_table_entry *slot;
- unsigned32 u32_handler=0;
-
- /*
- * Get the "real" trap number for this vector ignoring the synchronous
- * versus asynchronous indicator included with our vector numbers.
- */
-
- real_vector = vector;
-
- /*
- * Get the current base address of the trap table and calculate a pointer
- * to the slot we are interested in.
- */
- slot = (CPU_Trap_table_entry *)ppc_exception_vector_addr( real_vector );
-
- /*
- * Get the address of the old_handler from the trap table.
- *
- * NOTE: The old_handler returned will be bogus if it does not follow
- * the RTEMS model.
- */
-
-#define HIGH_BITS_MASK 0xFFFFFC00
-#define HIGH_BITS_SHIFT 10
-#define LOW_BITS_MASK 0x000003FF
-
- if (slot->stwu_r1 == _CPU_Trap_slot_template.stwu_r1) {
- /*
- * Set u32_handler = to target address
- */
- u32_handler = slot->b_Handler & 0x03fffffc;
-
- /* IMD FIX: sign extend address fragment... */
- if (u32_handler & 0x02000000) {
- u32_handler |= 0xfc000000;
- }
-
- *old_handler = (proc_ptr) u32_handler;
- } else
-/* There are two kinds of handlers for the MPC860. One is the 'standard'
- * one like above. The other is for the cascaded interrupts from the SIU
- * and CPM. Therefore we must check for the alternate one if the standard
- * one is not present
- */
-#if defined(mpc860) || defined(mpc821)
- if (slot->stwu_r1 == _CPU_Trap_slot_template_m860.stwu_r1) {
- /*
- * Set u32_handler = to target address
- */
- u32_handler = slot->b_Handler & 0x03fffffc;
- *old_handler = (proc_ptr) u32_handler;
- } else
-#endif /* mpc860 */
-
- *old_handler = 0;
-
- /*
- * Copy the template to the slot and then fix it.
- */
-#if defined(mpc860) || defined(mpc821)
- if (vector >= PPC_IRQ_IRQ0)
- *slot = _CPU_Trap_slot_template_m860;
- else
-#endif /* mpc860 */
- *slot = _CPU_Trap_slot_template;
-
- u32_handler = (unsigned32) new_handler;
-
- /*
- * IMD FIX: insert address fragment only (bits 6..29)
- * therefore check for proper address range
- * and remove unwanted bits
- */
- if ((u32_handler & 0xfc000000) == 0xfc000000) {
- u32_handler &= ~0xfc000000;
- }
- else if ((u32_handler & 0xfc000000) != 0x00000000) {
- _Internal_error_Occurred(INTERNAL_ERROR_CORE,
- TRUE,
- u32_handler);
- }
-
- slot->b_Handler |= u32_handler;
-
- slot->li_r0_IRQ |= vector;
-
- _CPU_Data_Cache_Block_Flush( slot );
-}
-
-unsigned32 ppc_exception_vector_addr(
- unsigned32 vector
-)
-{
-#if (!PPC_HAS_EVPR)
- unsigned32 Msr;
-#endif
- unsigned32 Top = 0;
- unsigned32 Offset = 0x000;
-
-#if (PPC_HAS_EXCEPTION_PREFIX)
- _CPU_MSR_Value ( Msr );
- if ( ( Msr & PPC_MSR_EP) != 0 ) /* Vectors at FFFx_xxxx */
- Top = 0xfff00000;
-#elif (PPC_HAS_EVPR)
- asm volatile( "mfspr %0,0x3d6" : "=r" (Top)); /* EVPR */
- Top = Top & 0xffff0000;
-#endif
-
- switch ( vector ) {
- case PPC_IRQ_SYSTEM_RESET: /* on 40x aka PPC_IRQ_CRIT */
- Offset = 0x00100;
- break;
- case PPC_IRQ_MCHECK:
- Offset = 0x00200;
- break;
- case PPC_IRQ_PROTECT:
- Offset = 0x00300;
- break;
- case PPC_IRQ_ISI:
- Offset = 0x00400;
- break;
- case PPC_IRQ_EXTERNAL:
- Offset = 0x00500;
- break;
- case PPC_IRQ_ALIGNMENT:
- Offset = 0x00600;
- break;
- case PPC_IRQ_PROGRAM:
- Offset = 0x00700;
- break;
- case PPC_IRQ_NOFP:
- Offset = 0x00800;
- break;
- case PPC_IRQ_DECREMENTER:
- Offset = 0x00900;
- break;
- case PPC_IRQ_RESERVED_A:
- Offset = 0x00a00;
- break;
- case PPC_IRQ_RESERVED_B:
- Offset = 0x00b00;
- break;
- case PPC_IRQ_SCALL:
- Offset = 0x00c00;
- break;
- case PPC_IRQ_TRACE:
- Offset = 0x00d00;
- break;
- case PPC_IRQ_FP_ASST:
- Offset = 0x00e00;
- break;
-
-#if defined(ppc403)
-
-/* PPC_IRQ_CRIT is the same vector as PPC_IRQ_RESET
- case PPC_IRQ_CRIT:
- Offset = 0x00100;
- break;
-*/
- case PPC_IRQ_PIT:
- Offset = 0x01000;
- break;
- case PPC_IRQ_FIT:
- Offset = 0x01010;
- break;
- case PPC_IRQ_WATCHDOG:
- Offset = 0x01020;
- break;
- case PPC_IRQ_DEBUG:
- Offset = 0x02000;
- break;
-
-#elif defined(ppc601)
- case PPC_IRQ_TRACE:
- Offset = 0x02000;
- break;
-
-#elif defined(ppc603)
- case PPC_IRQ_TRANS_MISS:
- Offset = 0x1000;
- break;
- case PPC_IRQ_DATA_LOAD:
- Offset = 0x1100;
- break;
- case PPC_IRQ_DATA_STORE:
- Offset = 0x1200;
- break;
- case PPC_IRQ_ADDR_BRK:
- Offset = 0x1300;
- break;
- case PPC_IRQ_SYS_MGT:
- Offset = 0x1400;
- break;
-
-#elif defined(ppc603e)
- case PPC_TLB_INST_MISS:
- Offset = 0x1000;
- break;
- case PPC_TLB_LOAD_MISS:
- Offset = 0x1100;
- break;
- case PPC_TLB_STORE_MISS:
- Offset = 0x1200;
- break;
- case PPC_IRQ_ADDRBRK:
- Offset = 0x1300;
- break;
- case PPC_IRQ_SYS_MGT:
- Offset = 0x1400;
- break;
-
-#elif defined(mpc604)
- case PPC_IRQ_ADDR_BRK:
- Offset = 0x1300;
- break;
- case PPC_IRQ_SYS_MGT:
- Offset = 0x1400;
- break;
-
-#elif defined(mpc860) || defined(mpc821)
- case PPC_IRQ_EMULATE:
- Offset = 0x1000;
- break;
- case PPC_IRQ_INST_MISS:
- Offset = 0x1100;
- break;
- case PPC_IRQ_DATA_MISS:
- Offset = 0x1200;
- break;
- case PPC_IRQ_INST_ERR:
- Offset = 0x1300;
- break;
- case PPC_IRQ_DATA_ERR:
- Offset = 0x1400;
- break;
- case PPC_IRQ_DATA_BPNT:
- Offset = 0x1c00;
- break;
- case PPC_IRQ_INST_BPNT:
- Offset = 0x1d00;
- break;
- case PPC_IRQ_IO_BPNT:
- Offset = 0x1e00;
- break;
- case PPC_IRQ_DEV_PORT:
- Offset = 0x1f00;
- break;
- case PPC_IRQ_IRQ0:
- Offset = 0x2000;
- break;
- case PPC_IRQ_LVL0:
- Offset = 0x2040;
- break;
- case PPC_IRQ_IRQ1:
- Offset = 0x2080;
- break;
- case PPC_IRQ_LVL1:
- Offset = 0x20c0;
- break;
- case PPC_IRQ_IRQ2:
- Offset = 0x2100;
- break;
- case PPC_IRQ_LVL2:
- Offset = 0x2140;
- break;
- case PPC_IRQ_IRQ3:
- Offset = 0x2180;
- break;
- case PPC_IRQ_LVL3:
- Offset = 0x21c0;
- break;
- case PPC_IRQ_IRQ4:
- Offset = 0x2200;
- break;
- case PPC_IRQ_LVL4:
- Offset = 0x2240;
- break;
- case PPC_IRQ_IRQ5:
- Offset = 0x2280;
- break;
- case PPC_IRQ_LVL5:
- Offset = 0x22c0;
- break;
- case PPC_IRQ_IRQ6:
- Offset = 0x2300;
- break;
- case PPC_IRQ_LVL6:
- Offset = 0x2340;
- break;
- case PPC_IRQ_IRQ7:
- Offset = 0x2380;
- break;
- case PPC_IRQ_LVL7:
- Offset = 0x23c0;
- break;
- case PPC_IRQ_CPM_RESERVED_0:
- Offset = 0x2400;
- break;
- case PPC_IRQ_CPM_PC4:
- Offset = 0x2410;
- break;
- case PPC_IRQ_CPM_PC5:
- Offset = 0x2420;
- break;
- case PPC_IRQ_CPM_SMC2:
- Offset = 0x2430;
- break;
- case PPC_IRQ_CPM_SMC1:
- Offset = 0x2440;
- break;
- case PPC_IRQ_CPM_SPI:
- Offset = 0x2450;
- break;
- case PPC_IRQ_CPM_PC6:
- Offset = 0x2460;
- break;
- case PPC_IRQ_CPM_TIMER4:
- Offset = 0x2470;
- break;
- case PPC_IRQ_CPM_RESERVED_8:
- Offset = 0x2480;
- break;
- case PPC_IRQ_CPM_PC7:
- Offset = 0x2490;
- break;
- case PPC_IRQ_CPM_PC8:
- Offset = 0x24a0;
- break;
- case PPC_IRQ_CPM_PC9:
- Offset = 0x24b0;
- break;
- case PPC_IRQ_CPM_TIMER3:
- Offset = 0x24c0;
- break;
- case PPC_IRQ_CPM_RESERVED_D:
- Offset = 0x24d0;
- break;
- case PPC_IRQ_CPM_PC10:
- Offset = 0x24e0;
- break;
- case PPC_IRQ_CPM_PC11:
- Offset = 0x24f0;
- break;
- case PPC_IRQ_CPM_I2C:
- Offset = 0x2500;
- break;
- case PPC_IRQ_CPM_RISC_TIMER:
- Offset = 0x2510;
- break;
- case PPC_IRQ_CPM_TIMER2:
- Offset = 0x2520;
- break;
- case PPC_IRQ_CPM_RESERVED_13:
- Offset = 0x2530;
- break;
- case PPC_IRQ_CPM_IDMA2:
- Offset = 0x2540;
- break;
- case PPC_IRQ_CPM_IDMA1:
- Offset = 0x2550;
- break;
- case PPC_IRQ_CPM_SDMA_ERROR:
- Offset = 0x2560;
- break;
- case PPC_IRQ_CPM_PC12:
- Offset = 0x2570;
- break;
- case PPC_IRQ_CPM_PC13:
- Offset = 0x2580;
- break;
- case PPC_IRQ_CPM_TIMER1:
- Offset = 0x2590;
- break;
- case PPC_IRQ_CPM_PC14:
- Offset = 0x25a0;
- break;
- case PPC_IRQ_CPM_SCC4:
- Offset = 0x25b0;
- break;
- case PPC_IRQ_CPM_SCC3:
- Offset = 0x25c0;
- break;
- case PPC_IRQ_CPM_SCC2:
- Offset = 0x25d0;
- break;
- case PPC_IRQ_CPM_SCC1:
- Offset = 0x25e0;
- break;
- case PPC_IRQ_CPM_PC15:
- Offset = 0x25f0;
- break;
-#endif
-
- }
- Top += Offset;
- return Top;
-}
-
diff --git a/c/src/lib/libcpu/powerpc/old_exception_processing/cpu.h b/c/src/lib/libcpu/powerpc/old_exception_processing/cpu.h
deleted file mode 100644
index 2a502d0745..0000000000
--- a/c/src/lib/libcpu/powerpc/old_exception_processing/cpu.h
+++ /dev/null
@@ -1,1200 +0,0 @@
-/* cpu.h
- *
- * This include file contains information pertaining to the PowerPC
- * processor.
- *
- * Author: Andrew Bray <andy@i-cubed.co.uk>
- *
- * COPYRIGHT (c) 1995 by i-cubed ltd.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of i-cubed limited not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * i-cubed limited makes no representations about the suitability
- * of this software for any purpose.
- *
- * Derived from c/src/exec/cpu/no_cpu/cpu.h:
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __CPU_h
-#define __CPU_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/ppc.h> /* pick up machine definitions */
-#ifndef ASM
-struct CPU_Interrupt_frame;
-typedef void ( *ppc_isr_entry )( int, struct CPU_Interrupt_frame * );
-
-#include <rtems/score/ppctypes.h>
-#endif
-
-/* conditional compilation parameters */
-
-/*
- * Should the calls to _Thread_Enable_dispatch be inlined?
- *
- * If TRUE, then they are inlined.
- * If FALSE, then a subroutine call is made.
- *
- * Basically this is an example of the classic trade-off of size
- * versus speed. Inlining the call (TRUE) typically increases the
- * size of RTEMS while speeding up the enabling of dispatching.
- * [NOTE: In general, the _Thread_Dispatch_disable_level will
- * only be 0 or 1 unless you are in an interrupt handler and that
- * interrupt handler invokes the executive.] When not inlined
- * something calls _Thread_Enable_dispatch which in turns calls
- * _Thread_Dispatch. If the enable dispatch is inlined, then
- * one subroutine call is avoided entirely.]
- */
-
-#define CPU_INLINE_ENABLE_DISPATCH FALSE
-
-/*
- * Should the body of the search loops in _Thread_queue_Enqueue_priority
- * be unrolled one time? In unrolled each iteration of the loop examines
- * two "nodes" on the chain being searched. Otherwise, only one node
- * is examined per iteration.
- *
- * If TRUE, then the loops are unrolled.
- * If FALSE, then the loops are not unrolled.
- *
- * The primary factor in making this decision is the cost of disabling
- * and enabling interrupts (_ISR_Flash) versus the cost of rest of the
- * body of the loop. On some CPUs, the flash is more expensive than
- * one iteration of the loop body. In this case, it might be desirable
- * to unroll the loop. It is important to note that on some CPUs, this
- * code is the longest interrupt disable period in RTEMS. So it is
- * necessary to strike a balance when setting this parameter.
- */
-
-#define CPU_UNROLL_ENQUEUE_PRIORITY FALSE
-
-/*
- * Does RTEMS manage a dedicated interrupt stack in software?
- *
- * If TRUE, then a stack is allocated in _Interrupt_Manager_initialization.
- * If FALSE, nothing is done.
- *
- * If the CPU supports a dedicated interrupt stack in hardware,
- * then it is generally the responsibility of the BSP to allocate it
- * and set it up.
- *
- * If the CPU does not support a dedicated interrupt stack, then
- * the porter has two options: (1) execute interrupts on the
- * stack of the interrupted task, and (2) have RTEMS manage a dedicated
- * interrupt stack.
- *
- * If this is TRUE, CPU_ALLOCATE_INTERRUPT_STACK should also be TRUE.
- *
- * Only one of CPU_HAS_SOFTWARE_INTERRUPT_STACK and
- * CPU_HAS_HARDWARE_INTERRUPT_STACK should be set to TRUE. It is
- * possible that both are FALSE for a particular CPU. Although it
- * is unclear what that would imply about the interrupt processing
- * procedure on that CPU.
- */
-
-#define CPU_HAS_SOFTWARE_INTERRUPT_STACK FALSE
-
-/*
- * Does this CPU have hardware support for a dedicated interrupt stack?
- *
- * If TRUE, then it must be installed during initialization.
- * If FALSE, then no installation is performed.
- *
- * If this is TRUE, CPU_ALLOCATE_INTERRUPT_STACK should also be TRUE.
- *
- * Only one of CPU_HAS_SOFTWARE_INTERRUPT_STACK and
- * CPU_HAS_HARDWARE_INTERRUPT_STACK should be set to TRUE. It is
- * possible that both are FALSE for a particular CPU. Although it
- * is unclear what that would imply about the interrupt processing
- * procedure on that CPU.
- */
-
-/*
- * ACB: This is a lie, but it gets us a handle on a call to set up
- * a variable derived from the top of the interrupt stack.
- */
-
-#define CPU_HAS_HARDWARE_INTERRUPT_STACK TRUE
-
-/*
- * Does RTEMS allocate a dedicated interrupt stack in the Interrupt Manager?
- *
- * If TRUE, then the memory is allocated during initialization.
- * If FALSE, then the memory is allocated during initialization.
- *
- * This should be TRUE is CPU_HAS_SOFTWARE_INTERRUPT_STACK is TRUE
- * or CPU_INSTALL_HARDWARE_INTERRUPT_STACK is TRUE.
- */
-
-#define CPU_ALLOCATE_INTERRUPT_STACK TRUE
-
-/*
- * Does the RTEMS invoke the user's ISR with the vector number and
- * a pointer to the saved interrupt frame (1) or just the vector
- * number (0)?
- */
-
-#define CPU_ISR_PASSES_FRAME_POINTER 1
-
-/*
- * Does the CPU have hardware floating point?
- *
- * If TRUE, then the RTEMS_FLOATING_POINT task attribute is supported.
- * If FALSE, then the RTEMS_FLOATING_POINT task attribute is ignored.
- *
- * If there is a FP coprocessor such as the i387 or mc68881, then
- * the answer is TRUE.
- *
- * The macro name "PPC_HAS_FPU" should be made CPU specific.
- * It indicates whether or not this CPU model has FP support. For
- * example, it would be possible to have an i386_nofp CPU model
- * which set this to false to indicate that you have an i386 without
- * an i387 and wish to leave floating point support out of RTEMS.
- */
-
-#if ( PPC_HAS_FPU == 1 )
-#define CPU_HARDWARE_FP TRUE
-#else
-#define CPU_HARDWARE_FP FALSE
-#endif
-
-/*
- * Are all tasks RTEMS_FLOATING_POINT tasks implicitly?
- *
- * If TRUE, then the RTEMS_FLOATING_POINT task attribute is assumed.
- * If FALSE, then the RTEMS_FLOATING_POINT task attribute is followed.
- *
- * So far, the only CPU in which this option has been used is the
- * HP PA-RISC. The HP C compiler and gcc both implicitly use the
- * floating point registers to perform integer multiplies. If
- * a function which you would not think utilize the FP unit DOES,
- * then one can not easily predict which tasks will use the FP hardware.
- * In this case, this option should be TRUE.
- *
- * If CPU_HARDWARE_FP is FALSE, then this should be FALSE as well.
- */
-
-#define CPU_ALL_TASKS_ARE_FP FALSE
-
-/*
- * Should the IDLE task have a floating point context?
- *
- * If TRUE, then the IDLE task is created as a RTEMS_FLOATING_POINT task
- * and it has a floating point context which is switched in and out.
- * If FALSE, then the IDLE task does not have a floating point context.
- *
- * Setting this to TRUE negatively impacts the time required to preempt
- * the IDLE task from an interrupt because the floating point context
- * must be saved as part of the preemption.
- */
-
-#define CPU_IDLE_TASK_IS_FP FALSE
-
-/*
- * Should the saving of the floating point registers be deferred
- * until a context switch is made to another different floating point
- * task?
- *
- * If TRUE, then the floating point context will not be stored until
- * necessary. It will remain in the floating point registers and not
- * disturned until another floating point task is switched to.
- *
- * If FALSE, then the floating point context is saved when a floating
- * point task is switched out and restored when the next floating point
- * task is restored. The state of the floating point registers between
- * those two operations is not specified.
- *
- * If the floating point context does NOT have to be saved as part of
- * interrupt dispatching, then it should be safe to set this to TRUE.
- *
- * Setting this flag to TRUE results in using a different algorithm
- * for deciding when to save and restore the floating point context.
- * The deferred FP switch algorithm minimizes the number of times
- * the FP context is saved and restored. The FP context is not saved
- * until a context switch is made to another, different FP task.
- * Thus in a system with only one FP task, the FP context will never
- * be saved or restored.
- */
-/*
- * ACB Note: This could make debugging tricky..
- */
-
-#define CPU_USE_DEFERRED_FP_SWITCH TRUE
-
-/*
- * Does this port provide a CPU dependent IDLE task implementation?
- *
- * If TRUE, then the routine _CPU_Thread_Idle_body
- * must be provided and is the default IDLE thread body instead of
- * _CPU_Thread_Idle_body.
- *
- * If FALSE, then use the generic IDLE thread body if the BSP does
- * not provide one.
- *
- * This is intended to allow for supporting processors which have
- * a low power or idle mode. When the IDLE thread is executed, then
- * the CPU can be powered down.
- *
- * The order of precedence for selecting the IDLE thread body is:
- *
- * 1. BSP provided
- * 2. CPU dependent (if provided)
- * 3. generic (if no BSP and no CPU dependent)
- */
-
-#define CPU_PROVIDES_IDLE_THREAD_BODY FALSE
-
-/*
- * Does the stack grow up (toward higher addresses) or down
- * (toward lower addresses)?
- *
- * If TRUE, then the grows upward.
- * If FALSE, then the grows toward smaller addresses.
- */
-
-#define CPU_STACK_GROWS_UP FALSE
-
-/*
- * The following is the variable attribute used to force alignment
- * of critical RTEMS structures. On some processors it may make
- * sense to have these aligned on tighter boundaries than
- * the minimum requirements of the compiler in order to have as
- * much of the critical data area as possible in a cache line.
- *
- * The placement of this macro in the declaration of the variables
- * is based on the syntactically requirements of the GNU C
- * "__attribute__" extension. For example with GNU C, use
- * the following to force a structures to a 32 byte boundary.
- *
- * __attribute__ ((aligned (32)))
- *
- * NOTE: Currently only the Priority Bit Map table uses this feature.
- * To benefit from using this, the data must be heavily
- * used so it will stay in the cache and used frequently enough
- * in the executive to justify turning this on.
- */
-
-#define CPU_STRUCTURE_ALIGNMENT \
- __attribute__ ((aligned (PPC_CACHE_ALIGNMENT)))
-
-/*
- * Define what is required to specify how the network to host conversion
- * routines are handled.
- */
-
-#define CPU_HAS_OWN_HOST_TO_NETWORK_ROUTINES FALSE
-#define CPU_BIG_ENDIAN TRUE
-#define CPU_LITTLE_ENDIAN FALSE
-
-/*
- * The following defines the number of bits actually used in the
- * interrupt field of the task mode. How those bits map to the
- * CPU interrupt levels is defined by the routine _CPU_ISR_Set_level().
- *
- * The interrupt level is bit mapped for the PowerPC family. The
- * bits are set to 0 to indicate that a particular exception source
- * enabled and 1 if it is disabled. This keeps with RTEMS convention
- * that interrupt level 0 means all sources are enabled.
- *
- * The bits are assigned to correspond to enable bits in the MSR.
- */
-
-#define PPC_INTERRUPT_LEVEL_ME 0x01
-#define PPC_INTERRUPT_LEVEL_EE 0x02
-#define PPC_INTERRUPT_LEVEL_CE 0x04
-
-/* XXX should these be maskable? */
-#if 0
-#define PPC_INTERRUPT_LEVEL_DE 0x08
-#define PPC_INTERRUPT_LEVEL_BE 0x10
-#define PPC_INTERRUPT_LEVEL_SE 0x20
-#endif
-
-#define CPU_MODES_INTERRUPT_MASK 0x00000007
-
-/*
- * Processor defined structures
- *
- * Examples structures include the descriptor tables from the i386
- * and the processor control structure on the i960ca.
- */
-
-/* may need to put some structures here. */
-
-/*
- * Contexts
- *
- * Generally there are 2 types of context to save.
- * 1. Interrupt registers to save
- * 2. Task level registers to save
- *
- * This means we have the following 3 context items:
- * 1. task level context stuff:: Context_Control
- * 2. floating point task stuff:: Context_Control_fp
- * 3. special interrupt level context :: Context_Control_interrupt
- *
- * On some processors, it is cost-effective to save only the callee
- * preserved registers during a task context switch. This means
- * that the ISR code needs to save those registers which do not
- * persist across function calls. It is not mandatory to make this
- * distinctions between the caller/callee saves registers for the
- * purpose of minimizing context saved during task switch and on interrupts.
- * If the cost of saving extra registers is minimal, simplicity is the
- * choice. Save the same context on interrupt entry as for tasks in
- * this case.
- *
- * Additionally, if gdb is to be made aware of RTEMS tasks for this CPU, then
- * care should be used in designing the context area.
- *
- * On some CPUs with hardware floating point support, the Context_Control_fp
- * structure will not be used or it simply consist of an array of a
- * fixed number of bytes. This is done when the floating point context
- * is dumped by a "FP save context" type instruction and the format
- * is not really defined by the CPU. In this case, there is no need
- * to figure out the exact format -- only the size. Of course, although
- * this is enough information for RTEMS, it is probably not enough for
- * a debugger such as gdb. But that is another problem.
- */
-
-typedef struct {
- unsigned32 gpr1; /* Stack pointer for all */
- unsigned32 gpr2; /* TOC in PowerOpen, reserved SVR4, section ptr EABI + */
- unsigned32 gpr13; /* First non volatile PowerOpen, section ptr SVR4/EABI */
- unsigned32 gpr14; /* Non volatile for all */
- unsigned32 gpr15; /* Non volatile for all */
- unsigned32 gpr16; /* Non volatile for all */
- unsigned32 gpr17; /* Non volatile for all */
- unsigned32 gpr18; /* Non volatile for all */
- unsigned32 gpr19; /* Non volatile for all */
- unsigned32 gpr20; /* Non volatile for all */
- unsigned32 gpr21; /* Non volatile for all */
- unsigned32 gpr22; /* Non volatile for all */
- unsigned32 gpr23; /* Non volatile for all */
- unsigned32 gpr24; /* Non volatile for all */
- unsigned32 gpr25; /* Non volatile for all */
- unsigned32 gpr26; /* Non volatile for all */
- unsigned32 gpr27; /* Non volatile for all */
- unsigned32 gpr28; /* Non volatile for all */
- unsigned32 gpr29; /* Non volatile for all */
- unsigned32 gpr30; /* Non volatile for all */
- unsigned32 gpr31; /* Non volatile for all */
- unsigned32 cr; /* PART of the CR is non volatile for all */
- unsigned32 pc; /* Program counter/Link register */
- unsigned32 msr; /* Initial interrupt level */
-} Context_Control;
-
-typedef struct {
- /* The ABIs (PowerOpen/SVR4/EABI) only require saving f14-f31 over
- * procedure calls. However, this would mean that the interrupt
- * frame had to hold f0-f13, and the fpscr. And as the majority
- * of tasks will not have an FP context, we will save the whole
- * context here.
- */
-#if (PPC_HAS_DOUBLE == 1)
- double f[32];
- double fpscr;
-#else
- float f[32];
- float fpscr;
-#endif
-} Context_Control_fp;
-
-typedef struct CPU_Interrupt_frame {
- unsigned32 stacklink; /* Ensure this is a real frame (also reg1 save) */
-#if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27)
- unsigned32 dummy[13]; /* Used by callees: PowerOpen ABI */
-#else
- unsigned32 dummy[1]; /* Used by callees: SVR4/EABI */
-#endif
- /* This is what is left out of the primary contexts */
- unsigned32 gpr0;
- unsigned32 gpr2; /* play safe */
- unsigned32 gpr3;
- unsigned32 gpr4;
- unsigned32 gpr5;
- unsigned32 gpr6;
- unsigned32 gpr7;
- unsigned32 gpr8;
- unsigned32 gpr9;
- unsigned32 gpr10;
- unsigned32 gpr11;
- unsigned32 gpr12;
- unsigned32 gpr13; /* Play safe */
- unsigned32 gpr28; /* For internal use by the IRQ handler */
- unsigned32 gpr29; /* For internal use by the IRQ handler */
- unsigned32 gpr30; /* For internal use by the IRQ handler */
- unsigned32 gpr31; /* For internal use by the IRQ handler */
- unsigned32 cr; /* Bits of this are volatile, so no-one may save */
- unsigned32 ctr;
- unsigned32 xer;
- unsigned32 lr;
- unsigned32 pc;
- unsigned32 msr;
- unsigned32 pad[3];
-} CPU_Interrupt_frame;
-
-
-/*
- * The following table contains the information required to configure
- * the PowerPC processor specific parameters.
- */
-
-typedef struct {
- void (*pretasking_hook)( void );
- void (*predriver_hook)( void );
- void (*postdriver_hook)( void );
- void (*idle_task)( void );
- boolean do_zero_of_workspace;
- unsigned32 idle_task_stack_size;
- unsigned32 interrupt_stack_size;
- unsigned32 extra_mpci_receive_server_stack;
- void * (*stack_allocate_hook)( unsigned32 );
- void (*stack_free_hook)( void* );
- /* end of fields required on all CPUs */
-
- unsigned32 clicks_per_usec; /* Timer clicks per microsecond */
- void (*spurious_handler)(unsigned32 vector, CPU_Interrupt_frame *);
- boolean exceptions_in_RAM; /* TRUE if in RAM */
-
-#if (defined(ppc403) || defined(mpc860) || defined(mpc821))
- unsigned32 serial_per_sec; /* Serial clocks per second */
- boolean serial_external_clock;
- boolean serial_xon_xoff;
- boolean serial_cts_rts;
- unsigned32 serial_rate;
- unsigned32 timer_average_overhead; /* Average overhead of timer in ticks */
- unsigned32 timer_least_valid; /* Least valid number from timer */
- boolean timer_internal_clock; /* TRUE, when timer runs with CPU clk */
-#endif
-
-#if (defined(mpc860) || defined(mpc821))
- unsigned32 clock_speed; /* Speed of CPU in Hz */
-#endif
-} rtems_cpu_table;
-
-/*
- * Macros to access required entires in the CPU Table are in
- * the file rtems/system.h.
- */
-
-/*
- * Macros to access PowerPC specific additions to the CPU Table
- */
-
-#define rtems_cpu_configuration_get_clicks_per_usec() \
- (_CPU_Table.clicks_per_usec)
-
-#define rtems_cpu_configuration_get_spurious_handler() \
- (_CPU_Table.spurious_handler)
-
-#define rtems_cpu_configuration_get_exceptions_in_ram() \
- (_CPU_Table.exceptions_in_RAM)
-
-#if (defined(ppc403) || defined(mpc860) || defined(mpc821))
-
-#define rtems_cpu_configuration_get_serial_per_sec() \
- (_CPU_Table.serial_per_sec)
-
-#define rtems_cpu_configuration_get_serial_external_clock() \
- (_CPU_Table.serial_external_clock)
-
-#define rtems_cpu_configuration_get_serial_xon_xoff() \
- (_CPU_Table.serial_xon_xoff)
-
-#define rtems_cpu_configuration_get_serial_cts_rts() \
- (_CPU_Table.serial_cts_rts)
-
-#define rtems_cpu_configuration_get_serial_rate() \
- (_CPU_Table.serial_rate)
-
-#define rtems_cpu_configuration_get_timer_average_overhead() \
- (_CPU_Table.timer_average_overhead)
-
-#define rtems_cpu_configuration_get_timer_least_valid() \
- (_CPU_Table.timer_least_valid)
-
-#define rtems_cpu_configuration_get_timer_internal_clock() \
- (_CPU_Table.timer_internal_clock)
-
-#endif
-
-#if (defined(mpc860) || defined(mpc821))
-#define rtems_cpu_configuration_get_clock_speed() \
- (_CPU_Table.clock_speed)
-#endif
-
-
-/*
- * The following type defines an entry in the PPC's trap table.
- *
- * NOTE: The instructions chosen are RTEMS dependent although one is
- * obligated to use two of the four instructions to perform a
- * long jump. The other instructions load one register with the
- * trap type (a.k.a. vector) and another with the psr.
- */
-
-typedef struct {
- unsigned32 stwu_r1; /* stwu %r1, -(??+IP_END)(%1)*/
- unsigned32 stw_r0; /* stw %r0, IP_0(%r1) */
- unsigned32 li_r0_IRQ; /* li %r0, _IRQ */
- unsigned32 b_Handler; /* b PROC (_ISR_Handler) */
-} CPU_Trap_table_entry;
-
-/*
- * This variable is optional. It is used on CPUs on which it is difficult
- * to generate an "uninitialized" FP context. It is filled in by
- * _CPU_Initialize and copied into the task's FP context area during
- * _CPU_Context_Initialize.
- */
-
-/* EXTERN Context_Control_fp _CPU_Null_fp_context; */
-
-/*
- * On some CPUs, RTEMS supports a software managed interrupt stack.
- * This stack is allocated by the Interrupt Manager and the switch
- * is performed in _ISR_Handler. These variables contain pointers
- * to the lowest and highest addresses in the chunk of memory allocated
- * for the interrupt stack. Since it is unknown whether the stack
- * grows up or down (in general), this give the CPU dependent
- * code the option of picking the version it wants to use.
- *
- * NOTE: These two variables are required if the macro
- * CPU_HAS_SOFTWARE_INTERRUPT_STACK is defined as TRUE.
- */
-
-SCORE_EXTERN void *_CPU_Interrupt_stack_low;
-SCORE_EXTERN void *_CPU_Interrupt_stack_high;
-
-/*
- * With some compilation systems, it is difficult if not impossible to
- * call a high-level language routine from assembly language. This
- * is especially true of commercial Ada compilers and name mangling
- * C++ ones. This variable can be optionally defined by the CPU porter
- * and contains the address of the routine _Thread_Dispatch. This
- * can make it easier to invoke that routine at the end of the interrupt
- * sequence (if a dispatch is necessary).
- */
-
-/* EXTERN void (*_CPU_Thread_dispatch_pointer)(); */
-
-/*
- * Nothing prevents the porter from declaring more CPU specific variables.
- */
-
-
-SCORE_EXTERN struct {
- unsigned32 *Nest_level;
- unsigned32 *Disable_level;
- void *Vector_table;
- void *Stack;
-#if (PPC_ABI == PPC_ABI_POWEROPEN)
- unsigned32 Dispatch_r2;
-#else
- unsigned32 Default_r2;
-#if (PPC_ABI != PPC_ABI_GCC27)
- unsigned32 Default_r13;
-#endif
-#endif
- volatile boolean *Switch_necessary;
- boolean *Signal;
-
- unsigned32 msr_initial;
-} _CPU_IRQ_info CPU_STRUCTURE_ALIGNMENT;
-
-/*
- * The size of the floating point context area. On some CPUs this
- * will not be a "sizeof" because the format of the floating point
- * area is not defined -- only the size is. This is usually on
- * CPUs with a "floating point save context" instruction.
- */
-
-#define CPU_CONTEXT_FP_SIZE sizeof( Context_Control_fp )
-
-/*
- * (Optional) # of bytes for libmisc/stackchk to check
- * If not specifed, then it defaults to something reasonable
- * for most architectures.
- */
-
-#define CPU_STACK_CHECK_SIZE (128)
-
-/*
- * Amount of extra stack (above minimum stack size) required by
- * MPCI receive server thread. Remember that in a multiprocessor
- * system this thread must exist and be able to process all directives.
- */
-
-#define CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK 0
-
-/*
- * This defines the number of entries in the ISR_Vector_table managed
- * by RTEMS.
- */
-
-#define CPU_INTERRUPT_NUMBER_OF_VECTORS (PPC_INTERRUPT_MAX)
-#define CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER (PPC_INTERRUPT_MAX - 1)
-
-/*
- * Should be large enough to run all RTEMS tests. This insures
- * that a "reasonable" small application should not have any problems.
- */
-
-#define CPU_STACK_MINIMUM_SIZE (1024*8)
-
-/*
- * CPU's worst alignment requirement for data types on a byte boundary. This
- * alignment does not take into account the requirements for the stack.
- */
-
-#define CPU_ALIGNMENT (PPC_ALIGNMENT)
-
-/*
- * This number corresponds to the byte alignment requirement for the
- * heap handler. This alignment requirement may be stricter than that
- * for the data types alignment specified by CPU_ALIGNMENT. It is
- * common for the heap to follow the same alignment requirement as
- * CPU_ALIGNMENT. If the CPU_ALIGNMENT is strict enough for the heap,
- * then this should be set to CPU_ALIGNMENT.
- *
- * NOTE: This does not have to be a power of 2. It does have to
- * be greater or equal to than CPU_ALIGNMENT.
- */
-
-#define CPU_HEAP_ALIGNMENT (PPC_ALIGNMENT)
-
-/*
- * This number corresponds to the byte alignment requirement for memory
- * buffers allocated by the partition manager. This alignment requirement
- * may be stricter than that for the data types alignment specified by
- * CPU_ALIGNMENT. It is common for the partition to follow the same
- * alignment requirement as CPU_ALIGNMENT. If the CPU_ALIGNMENT is strict
- * enough for the partition, then this should be set to CPU_ALIGNMENT.
- *
- * NOTE: This does not have to be a power of 2. It does have to
- * be greater or equal to than CPU_ALIGNMENT.
- */
-
-#define CPU_PARTITION_ALIGNMENT (PPC_ALIGNMENT)
-
-/*
- * This number corresponds to the byte alignment requirement for the
- * stack. This alignment requirement may be stricter than that for the
- * data types alignment specified by CPU_ALIGNMENT. If the CPU_ALIGNMENT
- * is strict enough for the stack, then this should be set to 0.
- *
- * NOTE: This must be a power of 2 either 0 or greater than CPU_ALIGNMENT.
- */
-
-#define CPU_STACK_ALIGNMENT (PPC_STACK_ALIGNMENT)
-
-/* ISR handler macros */
-
-/*
- * Disable all interrupts for an RTEMS critical section. The previous
- * level is returned in _isr_cookie.
- */
-
-#define loc_string(a,b) a " (" #b ")\n"
-
-#define _CPU_MSR_Value( _msr_value ) \
- do { \
- _msr_value = 0; \
- asm volatile ("mfmsr %0" : "=&r" ((_msr_value)) : "0" ((_msr_value))); \
- } while (0)
-
-#define _CPU_MSR_SET( _msr_value ) \
-{ asm volatile ("mtmsr %0" : "=&r" ((_msr_value)) : "0" ((_msr_value))); }
-
-#if 0
-#define _CPU_ISR_Disable( _isr_cookie ) \
- { register unsigned int _disable_mask = PPC_MSR_DISABLE_MASK; \
- _isr_cookie = 0; \
- asm volatile (
- "mfmsr %0" : \
- "=r" ((_isr_cookie)) : \
- "0" ((_isr_cookie)) \
- ); \
- asm volatile (
- "andc %1,%0,%1" : \
- "=r" ((_isr_cookie)), "=&r" ((_disable_mask)) : \
- "0" ((_isr_cookie)), "1" ((_disable_mask)) \
- ); \
- asm volatile (
- "mtmsr %1" : \
- "=r" ((_disable_mask)) : \
- "0" ((_disable_mask)) \
- ); \
- }
-#endif
-
-#define _CPU_ISR_Disable( _isr_cookie ) \
- { register unsigned int _disable_mask = PPC_MSR_DISABLE_MASK; \
- _isr_cookie = 0; \
- asm volatile ( \
- "mfmsr %0; andc %1,%0,%1; mtmsr %1" : \
- "=&r" ((_isr_cookie)), "=&r" ((_disable_mask)) : \
- "0" ((_isr_cookie)), "1" ((_disable_mask)) \
- ); \
- }
-
-
-#define _CPU_Data_Cache_Block_Flush( _address ) \
- do { register void *__address = (_address); \
- register unsigned32 _zero = 0; \
- asm volatile ( "dcbf %0,%1" : \
- "=r" (_zero), "=r" (__address) : \
- "0" (_zero), "1" (__address) \
- ); \
- } while (0)
-
-
-/*
- * Enable interrupts to the previous level (returned by _CPU_ISR_Disable).
- * This indicates the end of an RTEMS critical section. The parameter
- * _isr_cookie is not modified.
- */
-
-#define _CPU_ISR_Enable( _isr_cookie ) \
- { \
- asm volatile ( "mtmsr %0" : \
- "=r" ((_isr_cookie)) : \
- "0" ((_isr_cookie))); \
- }
-
-/*
- * This temporarily restores the interrupt to _isr_cookie before immediately
- * disabling them again. This is used to divide long RTEMS critical
- * sections into two or more parts. The parameter _isr_cookie is not
- * modified.
- *
- * NOTE: The version being used is not very optimized but it does
- * not trip a problem in gcc where the disable mask does not
- * get loaded. Check this for future (post 10/97 gcc versions.
- */
-
-#define _CPU_ISR_Flash( _isr_cookie ) \
- { register unsigned int _disable_mask = PPC_MSR_DISABLE_MASK; \
- asm volatile ( \
- "mtmsr %0; andc %1,%0,%1; mtmsr %1" : \
- "=r" ((_isr_cookie)), "=r" ((_disable_mask)) : \
- "0" ((_isr_cookie)), "1" ((_disable_mask)) \
- ); \
- }
-
-/*
- * Map interrupt level in task mode onto the hardware that the CPU
- * actually provides. Currently, interrupt levels which do not
- * map onto the CPU in a generic fashion are undefined. Someday,
- * it would be nice if these were "mapped" by the application
- * via a callout. For example, m68k has 8 levels 0 - 7, levels
- * 8 - 255 would be available for bsp/application specific meaning.
- * This could be used to manage a programmable interrupt controller
- * via the rtems_task_mode directive.
- */
-
-unsigned32 _CPU_ISR_Calculate_level(
- unsigned32 new_level
-);
-
-void _CPU_ISR_Set_level(
- unsigned32 new_level
-);
-
-unsigned32 _CPU_ISR_Get_level( void );
-
-void _CPU_ISR_install_raw_handler(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-);
-
-/* end of ISR handler macros */
-
-/*
- * Simple spin delay in microsecond units for device drivers.
- * This is very dependent on the clock speed of the target.
- */
-
-#define CPU_Get_timebase_low( _value ) \
- asm volatile( "mftb %0" : "=r" (_value) )
-
-#define delay( _microseconds ) \
- do { \
- unsigned32 start, ticks, now; \
- CPU_Get_timebase_low( start ) ; \
- ticks = (_microseconds) * _CPU_Table.clicks_per_usec; \
- do \
- CPU_Get_timebase_low( now ) ; \
- while (now - start < ticks); \
- } while (0)
-
-#define delay_in_bus_cycles( _cycles ) \
- do { \
- unsigned32 start, now; \
- CPU_Get_timebase_low( start ); \
- do \
- CPU_Get_timebase_low( now ); \
- while (now - start < (_cycles)); \
- } while (0)
-
-
-
-/* Context handler macros */
-
-/*
- * Initialize the context to a state suitable for starting a
- * task after a context restore operation. Generally, this
- * involves:
- *
- * - setting a starting address
- * - preparing the stack
- * - preparing the stack and frame pointers
- * - setting the proper interrupt level in the context
- * - initializing the floating point context
- *
- * This routine generally does not set any unnecessary register
- * in the context. The state of the "general data" registers is
- * undefined at task start time.
- *
- * NOTE: Implemented as a subroutine for the SPARC port.
- */
-
-void _CPU_Context_Initialize(
- Context_Control *the_context,
- unsigned32 *stack_base,
- unsigned32 size,
- unsigned32 new_level,
- void *entry_point,
- boolean is_fp
-);
-
-/*
- * This routine is responsible for somehow restarting the currently
- * executing task. If you are lucky, then all that is necessary
- * is restoring the context. Otherwise, there will need to be
- * a special assembly routine which does something special in this
- * case. Context_Restore should work most of the time. It will
- * not work if restarting self conflicts with the stack frame
- * assumptions of restoring a context.
- */
-
-#define _CPU_Context_Restart_self( _the_context ) \
- _CPU_Context_restore( (_the_context) );
-
-/*
- * The purpose of this macro is to allow the initial pointer into
- * a floating point context area (used to save the floating point
- * context) to be at an arbitrary place in the floating point
- * context area.
- *
- * This is necessary because some FP units are designed to have
- * their context saved as a stack which grows into lower addresses.
- * Other FP units can be saved by simply moving registers into offsets
- * from the base of the context area. Finally some FP units provide
- * a "dump context" instruction which could fill in from high to low
- * or low to high based on the whim of the CPU designers.
- */
-
-#define _CPU_Context_Fp_start( _base, _offset ) \
- ( (void *) _Addresses_Add_offset( (_base), (_offset) ) )
-
-/*
- * This routine initializes the FP context area passed to it to.
- * There are a few standard ways in which to initialize the
- * floating point context. The code included for this macro assumes
- * that this is a CPU in which a "initial" FP context was saved into
- * _CPU_Null_fp_context and it simply copies it to the destination
- * context passed to it.
- *
- * Other models include (1) not doing anything, and (2) putting
- * a "null FP status word" in the correct place in the FP context.
- */
-
-#define _CPU_Context_Initialize_fp( _destination ) \
- { \
- ((Context_Control_fp *) *((void **) _destination))->fpscr = PPC_INIT_FPSCR; \
- }
-
-/* end of Context handler macros */
-
-/* Fatal Error manager macros */
-
-/*
- * This routine copies _error into a known place -- typically a stack
- * location or a register, optionally disables interrupts, and
- * halts/stops the CPU.
- */
-
-#define _CPU_Fatal_halt( _error ) \
- _CPU_Fatal_error(_error)
-
-/* end of Fatal Error manager macros */
-
-/* Bitfield handler macros */
-
-/*
- * This routine sets _output to the bit number of the first bit
- * set in _value. _value is of CPU dependent type Priority_Bit_map_control.
- * This type may be either 16 or 32 bits wide although only the 16
- * least significant bits will be used.
- *
- * There are a number of variables in using a "find first bit" type
- * instruction.
- *
- * (1) What happens when run on a value of zero?
- * (2) Bits may be numbered from MSB to LSB or vice-versa.
- * (3) The numbering may be zero or one based.
- * (4) The "find first bit" instruction may search from MSB or LSB.
- *
- * RTEMS guarantees that (1) will never happen so it is not a concern.
- * (2),(3), (4) are handled by the macros _CPU_Priority_mask() and
- * _CPU_Priority_Bits_index(). These three form a set of routines
- * which must logically operate together. Bits in the _value are
- * set and cleared based on masks built by _CPU_Priority_mask().
- * The basic major and minor values calculated by _Priority_Major()
- * and _Priority_Minor() are "massaged" by _CPU_Priority_Bits_index()
- * to properly range between the values returned by the "find first bit"
- * instruction. This makes it possible for _Priority_Get_highest() to
- * calculate the major and directly index into the minor table.
- * This mapping is necessary to ensure that 0 (a high priority major/minor)
- * is the first bit found.
- *
- * This entire "find first bit" and mapping process depends heavily
- * on the manner in which a priority is broken into a major and minor
- * components with the major being the 4 MSB of a priority and minor
- * the 4 LSB. Thus (0 << 4) + 0 corresponds to priority 0 -- the highest
- * priority. And (15 << 4) + 14 corresponds to priority 254 -- the next
- * to the lowest priority.
- *
- * If your CPU does not have a "find first bit" instruction, then
- * there are ways to make do without it. Here are a handful of ways
- * to implement this in software:
- *
- * - a series of 16 bit test instructions
- * - a "binary search using if's"
- * - _number = 0
- * if _value > 0x00ff
- * _value >>=8
- * _number = 8;
- *
- * if _value > 0x0000f
- * _value >=8
- * _number += 4
- *
- * _number += bit_set_table[ _value ]
- *
- * where bit_set_table[ 16 ] has values which indicate the first
- * bit set
- */
-
-#define _CPU_Bitfield_Find_first_bit( _value, _output ) \
- { \
- asm volatile ("cntlzw %0, %1" : "=r" ((_output)), "=r" ((_value)) : \
- "1" ((_value))); \
- }
-
-/* end of Bitfield handler macros */
-
-/*
- * This routine builds the mask which corresponds to the bit fields
- * as searched by _CPU_Bitfield_Find_first_bit(). See the discussion
- * for that routine.
- */
-
-#define _CPU_Priority_Mask( _bit_number ) \
- ( 0x80000000 >> (_bit_number) )
-
-/*
- * This routine translates the bit numbers returned by
- * _CPU_Bitfield_Find_first_bit() into something suitable for use as
- * a major or minor component of a priority. See the discussion
- * for that routine.
- */
-
-#define _CPU_Priority_bits_index( _priority ) \
- (_priority)
-
-/* end of Priority handler macros */
-
-/* variables */
-
-extern const unsigned32 _CPU_msrs[4];
-
-/* functions */
-
-/*
- * _CPU_Initialize
- *
- * This routine performs CPU dependent initialization.
- */
-
-void _CPU_Initialize(
- rtems_cpu_table *cpu_table,
- void (*thread_dispatch)
-);
-
-/*
- * _CPU_ISR_install_vector
- *
- * This routine installs an interrupt vector.
- */
-
-void _CPU_ISR_install_vector(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-);
-
-/*
- * _CPU_Install_interrupt_stack
- *
- * This routine installs the hardware interrupt stack pointer.
- *
- * NOTE: It need only be provided if CPU_HAS_HARDWARE_INTERRUPT_STACK
- * is TRUE.
- */
-
-void _CPU_Install_interrupt_stack( void );
-
-/*
- * _CPU_Context_switch
- *
- * This routine switches from the run context to the heir context.
- */
-
-void _CPU_Context_switch(
- Context_Control *run,
- Context_Control *heir
-);
-
-/*
- * _CPU_Context_restore
- *
- * This routine is generallu used only to restart self in an
- * efficient manner. It may simply be a label in _CPU_Context_switch.
- *
- * NOTE: May be unnecessary to reload some registers.
- */
-
-void _CPU_Context_restore(
- Context_Control *new_context
-);
-
-/*
- * _CPU_Context_save_fp
- *
- * This routine saves the floating point context passed to it.
- */
-
-void _CPU_Context_save_fp(
- void **fp_context_ptr
-);
-
-/*
- * _CPU_Context_restore_fp
- *
- * This routine restores the floating point context passed to it.
- */
-
-void _CPU_Context_restore_fp(
- void **fp_context_ptr
-);
-
-void _CPU_Fatal_error(
- unsigned32 _error
-);
-
-/* The following routine swaps the endian format of an unsigned int.
- * It must be static because it is referenced indirectly.
- *
- * This version will work on any processor, but if there is a better
- * way for your CPU PLEASE use it. The most common way to do this is to:
- *
- * swap least significant two bytes with 16-bit rotate
- * swap upper and lower 16-bits
- * swap most significant two bytes with 16-bit rotate
- *
- * Some CPUs have special instructions which swap a 32-bit quantity in
- * a single instruction (e.g. i486). It is probably best to avoid
- * an "endian swapping control bit" in the CPU. One good reason is
- * that interrupts would probably have to be disabled to insure that
- * an interrupt does not try to access the same "chunk" with the wrong
- * endian. Another good reason is that on some CPUs, the endian bit
- * endianness for ALL fetches -- both code and data -- so the code
- * will be fetched incorrectly.
- */
-
-static inline unsigned int CPU_swap_u32(
- unsigned int value
-)
-{
- unsigned32 swapped;
-
- asm volatile("rlwimi %0,%1,8,24,31;"
- "rlwimi %0,%1,24,16,23;"
- "rlwimi %0,%1,8,8,15;"
- "rlwimi %0,%1,24,0,7;" :
- "=&r" ((swapped)) : "r" ((value)));
-
- return( swapped );
-}
-
-#define CPU_swap_u16( value ) \
- (((value&0xff) << 8) | ((value >> 8)&0xff))
-
-/*
- * Routines to access the decrementer register
- */
-
-#define PPC_Set_decrementer( _clicks ) \
- do { \
- asm volatile( "mtdec %0" : "=r" ((_clicks)) : "r" ((_clicks)) ); \
- } while (0)
-
-/*
- * Routines to access the time base register
- */
-
-static inline unsigned64 PPC_Get_timebase_register( void )
-{
- unsigned32 tbr_low;
- unsigned32 tbr_high;
- unsigned32 tbr_high_old;
- unsigned64 tbr;
-
- do {
- asm volatile( "mftbu %0" : "=r" (tbr_high_old));
- asm volatile( "mftb %0" : "=r" (tbr_low));
- asm volatile( "mftbu %0" : "=r" (tbr_high));
- } while ( tbr_high_old != tbr_high );
-
- tbr = tbr_high;
- tbr <<= 32;
- tbr |= tbr_low;
- return tbr;
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/c/src/lib/libcpu/powerpc/old_exception_processing/cpu_asm.S b/c/src/lib/libcpu/powerpc/old_exception_processing/cpu_asm.S
deleted file mode 100644
index a377fa5d2a..0000000000
--- a/c/src/lib/libcpu/powerpc/old_exception_processing/cpu_asm.S
+++ /dev/null
@@ -1,809 +0,0 @@
-
-/* cpu_asm.s 1.1 - 95/12/04
- *
- * This file contains the assembly code for the PowerPC implementation
- * of RTEMS.
- *
- * Author: Andrew Bray <andy@i-cubed.co.uk>
- *
- * COPYRIGHT (c) 1995 by i-cubed ltd.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of i-cubed limited not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * i-cubed limited makes no representations about the suitability
- * of this software for any purpose.
- *
- * Derived from c/src/exec/cpu/no_cpu/cpu_asm.c:
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <asm.h>
-
-/*
- * Offsets for various Contexts
- */
- .set GP_1, 0
- .set GP_2, (GP_1 + 4)
- .set GP_13, (GP_2 + 4)
- .set GP_14, (GP_13 + 4)
-
- .set GP_15, (GP_14 + 4)
- .set GP_16, (GP_15 + 4)
- .set GP_17, (GP_16 + 4)
- .set GP_18, (GP_17 + 4)
-
- .set GP_19, (GP_18 + 4)
- .set GP_20, (GP_19 + 4)
- .set GP_21, (GP_20 + 4)
- .set GP_22, (GP_21 + 4)
-
- .set GP_23, (GP_22 + 4)
- .set GP_24, (GP_23 + 4)
- .set GP_25, (GP_24 + 4)
- .set GP_26, (GP_25 + 4)
-
- .set GP_27, (GP_26 + 4)
- .set GP_28, (GP_27 + 4)
- .set GP_29, (GP_28 + 4)
- .set GP_30, (GP_29 + 4)
-
- .set GP_31, (GP_30 + 4)
- .set GP_CR, (GP_31 + 4)
- .set GP_PC, (GP_CR + 4)
- .set GP_MSR, (GP_PC + 4)
-
-#if (PPC_HAS_DOUBLE == 1)
- .set FP_0, 0
- .set FP_1, (FP_0 + 8)
- .set FP_2, (FP_1 + 8)
- .set FP_3, (FP_2 + 8)
- .set FP_4, (FP_3 + 8)
- .set FP_5, (FP_4 + 8)
- .set FP_6, (FP_5 + 8)
- .set FP_7, (FP_6 + 8)
- .set FP_8, (FP_7 + 8)
- .set FP_9, (FP_8 + 8)
- .set FP_10, (FP_9 + 8)
- .set FP_11, (FP_10 + 8)
- .set FP_12, (FP_11 + 8)
- .set FP_13, (FP_12 + 8)
- .set FP_14, (FP_13 + 8)
- .set FP_15, (FP_14 + 8)
- .set FP_16, (FP_15 + 8)
- .set FP_17, (FP_16 + 8)
- .set FP_18, (FP_17 + 8)
- .set FP_19, (FP_18 + 8)
- .set FP_20, (FP_19 + 8)
- .set FP_21, (FP_20 + 8)
- .set FP_22, (FP_21 + 8)
- .set FP_23, (FP_22 + 8)
- .set FP_24, (FP_23 + 8)
- .set FP_25, (FP_24 + 8)
- .set FP_26, (FP_25 + 8)
- .set FP_27, (FP_26 + 8)
- .set FP_28, (FP_27 + 8)
- .set FP_29, (FP_28 + 8)
- .set FP_30, (FP_29 + 8)
- .set FP_31, (FP_30 + 8)
- .set FP_FPSCR, (FP_31 + 8)
-#else
- .set FP_0, 0
- .set FP_1, (FP_0 + 4)
- .set FP_2, (FP_1 + 4)
- .set FP_3, (FP_2 + 4)
- .set FP_4, (FP_3 + 4)
- .set FP_5, (FP_4 + 4)
- .set FP_6, (FP_5 + 4)
- .set FP_7, (FP_6 + 4)
- .set FP_8, (FP_7 + 4)
- .set FP_9, (FP_8 + 4)
- .set FP_10, (FP_9 + 4)
- .set FP_11, (FP_10 + 4)
- .set FP_12, (FP_11 + 4)
- .set FP_13, (FP_12 + 4)
- .set FP_14, (FP_13 + 4)
- .set FP_15, (FP_14 + 4)
- .set FP_16, (FP_15 + 4)
- .set FP_17, (FP_16 + 4)
- .set FP_18, (FP_17 + 4)
- .set FP_19, (FP_18 + 4)
- .set FP_20, (FP_19 + 4)
- .set FP_21, (FP_20 + 4)
- .set FP_22, (FP_21 + 4)
- .set FP_23, (FP_22 + 4)
- .set FP_24, (FP_23 + 4)
- .set FP_25, (FP_24 + 4)
- .set FP_26, (FP_25 + 4)
- .set FP_27, (FP_26 + 4)
- .set FP_28, (FP_27 + 4)
- .set FP_29, (FP_28 + 4)
- .set FP_30, (FP_29 + 4)
- .set FP_31, (FP_30 + 4)
- .set FP_FPSCR, (FP_31 + 4)
-#endif
-
- .set IP_LINK, 0
-#if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27)
- .set IP_0, (IP_LINK + 56)
-#else
- .set IP_0, (IP_LINK + 8)
-#endif
- .set IP_2, (IP_0 + 4)
-
- .set IP_3, (IP_2 + 4)
- .set IP_4, (IP_3 + 4)
- .set IP_5, (IP_4 + 4)
- .set IP_6, (IP_5 + 4)
-
- .set IP_7, (IP_6 + 4)
- .set IP_8, (IP_7 + 4)
- .set IP_9, (IP_8 + 4)
- .set IP_10, (IP_9 + 4)
-
- .set IP_11, (IP_10 + 4)
- .set IP_12, (IP_11 + 4)
- .set IP_13, (IP_12 + 4)
- .set IP_28, (IP_13 + 4)
-
- .set IP_29, (IP_28 + 4)
- .set IP_30, (IP_29 + 4)
- .set IP_31, (IP_30 + 4)
- .set IP_CR, (IP_31 + 4)
-
- .set IP_CTR, (IP_CR + 4)
- .set IP_XER, (IP_CTR + 4)
- .set IP_LR, (IP_XER + 4)
- .set IP_PC, (IP_LR + 4)
-
- .set IP_MSR, (IP_PC + 4)
- .set IP_END, (IP_MSR + 16)
-
- /* _CPU_IRQ_info offsets */
-
- /* These must be in this order */
- .set Nest_level, 0
- .set Disable_level, 4
- .set Vector_table, 8
- .set Stack, 12
-#if (PPC_ABI == PPC_ABI_POWEROPEN)
- .set Dispatch_r2, 16
- .set Switch_necessary, 20
-#else
- .set Default_r2, 16
-#if (PPC_ABI != PPC_ABI_GCC27)
- .set Default_r13, 20
- .set Switch_necessary, 24
-#else
- .set Switch_necessary, 20
-#endif
-#endif
- .set Signal, Switch_necessary + 4
- .set msr_initial, Signal + 4
-
- BEGIN_CODE
-/*
- * _CPU_Context_save_fp_context
- *
- * This routine is responsible for saving the FP context
- * at *fp_context_ptr. If the point to load the FP context
- * from is changed then the pointer is modified by this routine.
- *
- * Sometimes a macro implementation of this is in cpu.h which dereferences
- * the ** and a similarly named routine in this file is passed something
- * like a (Context_Control_fp *). The general rule on making this decision
- * is to avoid writing assembly language.
- */
-
- ALIGN (PPC_CACHE_ALIGNMENT, PPC_CACHE_ALIGN_POWER)
- PUBLIC_PROC (_CPU_Context_save_fp)
-PROC (_CPU_Context_save_fp):
-#if (PPC_HAS_FPU == 1)
- lwz r3, 0(r3)
-#if (PPC_HAS_DOUBLE == 1)
- stfd f0, FP_0(r3)
- stfd f1, FP_1(r3)
- stfd f2, FP_2(r3)
- stfd f3, FP_3(r3)
- stfd f4, FP_4(r3)
- stfd f5, FP_5(r3)
- stfd f6, FP_6(r3)
- stfd f7, FP_7(r3)
- stfd f8, FP_8(r3)
- stfd f9, FP_9(r3)
- stfd f10, FP_10(r3)
- stfd f11, FP_11(r3)
- stfd f12, FP_12(r3)
- stfd f13, FP_13(r3)
- stfd f14, FP_14(r3)
- stfd f15, FP_15(r3)
- stfd f16, FP_16(r3)
- stfd f17, FP_17(r3)
- stfd f18, FP_18(r3)
- stfd f19, FP_19(r3)
- stfd f20, FP_20(r3)
- stfd f21, FP_21(r3)
- stfd f22, FP_22(r3)
- stfd f23, FP_23(r3)
- stfd f24, FP_24(r3)
- stfd f25, FP_25(r3)
- stfd f26, FP_26(r3)
- stfd f27, FP_27(r3)
- stfd f28, FP_28(r3)
- stfd f29, FP_29(r3)
- stfd f30, FP_30(r3)
- stfd f31, FP_31(r3)
- mffs f2
- stfd f2, FP_FPSCR(r3)
-#else
- stfs f0, FP_0(r3)
- stfs f1, FP_1(r3)
- stfs f2, FP_2(r3)
- stfs f3, FP_3(r3)
- stfs f4, FP_4(r3)
- stfs f5, FP_5(r3)
- stfs f6, FP_6(r3)
- stfs f7, FP_7(r3)
- stfs f8, FP_8(r3)
- stfs f9, FP_9(r3)
- stfs f10, FP_10(r3)
- stfs f11, FP_11(r3)
- stfs f12, FP_12(r3)
- stfs f13, FP_13(r3)
- stfs f14, FP_14(r3)
- stfs f15, FP_15(r3)
- stfs f16, FP_16(r3)
- stfs f17, FP_17(r3)
- stfs f18, FP_18(r3)
- stfs f19, FP_19(r3)
- stfs f20, FP_20(r3)
- stfs f21, FP_21(r3)
- stfs f22, FP_22(r3)
- stfs f23, FP_23(r3)
- stfs f24, FP_24(r3)
- stfs f25, FP_25(r3)
- stfs f26, FP_26(r3)
- stfs f27, FP_27(r3)
- stfs f28, FP_28(r3)
- stfs f29, FP_29(r3)
- stfs f30, FP_30(r3)
- stfs f31, FP_31(r3)
- mffs f2
- stfs f2, FP_FPSCR(r3)
-#endif
-#endif
- blr
-
-/*
- * _CPU_Context_restore_fp_context
- *
- * This routine is responsible for restoring the FP context
- * at *fp_context_ptr. If the point to load the FP context
- * from is changed then the pointer is modified by this routine.
- *
- * Sometimes a macro implementation of this is in cpu.h which dereferences
- * the ** and a similarly named routine in this file is passed something
- * like a (Context_Control_fp *). The general rule on making this decision
- * is to avoid writing assembly language.
- */
-
- ALIGN (PPC_CACHE_ALIGNMENT, PPC_CACHE_ALIGN_POWER)
- PUBLIC_PROC (_CPU_Context_restore_fp)
-PROC (_CPU_Context_restore_fp):
-#if (PPC_HAS_FPU == 1)
- lwz r3, 0(r3)
-#if (PPC_HAS_DOUBLE == 1)
- lfd f2, FP_FPSCR(r3)
- mtfsf 255, f2
- lfd f0, FP_0(r3)
- lfd f1, FP_1(r3)
- lfd f2, FP_2(r3)
- lfd f3, FP_3(r3)
- lfd f4, FP_4(r3)
- lfd f5, FP_5(r3)
- lfd f6, FP_6(r3)
- lfd f7, FP_7(r3)
- lfd f8, FP_8(r3)
- lfd f9, FP_9(r3)
- lfd f10, FP_10(r3)
- lfd f11, FP_11(r3)
- lfd f12, FP_12(r3)
- lfd f13, FP_13(r3)
- lfd f14, FP_14(r3)
- lfd f15, FP_15(r3)
- lfd f16, FP_16(r3)
- lfd f17, FP_17(r3)
- lfd f18, FP_18(r3)
- lfd f19, FP_19(r3)
- lfd f20, FP_20(r3)
- lfd f21, FP_21(r3)
- lfd f22, FP_22(r3)
- lfd f23, FP_23(r3)
- lfd f24, FP_24(r3)
- lfd f25, FP_25(r3)
- lfd f26, FP_26(r3)
- lfd f27, FP_27(r3)
- lfd f28, FP_28(r3)
- lfd f29, FP_29(r3)
- lfd f30, FP_30(r3)
- lfd f31, FP_31(r3)
-#else
- lfs f2, FP_FPSCR(r3)
- mtfsf 255, f2
- lfs f0, FP_0(r3)
- lfs f1, FP_1(r3)
- lfs f2, FP_2(r3)
- lfs f3, FP_3(r3)
- lfs f4, FP_4(r3)
- lfs f5, FP_5(r3)
- lfs f6, FP_6(r3)
- lfs f7, FP_7(r3)
- lfs f8, FP_8(r3)
- lfs f9, FP_9(r3)
- lfs f10, FP_10(r3)
- lfs f11, FP_11(r3)
- lfs f12, FP_12(r3)
- lfs f13, FP_13(r3)
- lfs f14, FP_14(r3)
- lfs f15, FP_15(r3)
- lfs f16, FP_16(r3)
- lfs f17, FP_17(r3)
- lfs f18, FP_18(r3)
- lfs f19, FP_19(r3)
- lfs f20, FP_20(r3)
- lfs f21, FP_21(r3)
- lfs f22, FP_22(r3)
- lfs f23, FP_23(r3)
- lfs f24, FP_24(r3)
- lfs f25, FP_25(r3)
- lfs f26, FP_26(r3)
- lfs f27, FP_27(r3)
- lfs f28, FP_28(r3)
- lfs f29, FP_29(r3)
- lfs f30, FP_30(r3)
- lfs f31, FP_31(r3)
-#endif
-#endif
- blr
-
-
-/* _CPU_Context_switch
- *
- * This routine performs a normal non-FP context switch.
- */
- ALIGN (PPC_CACHE_ALIGNMENT, PPC_CACHE_ALIGN_POWER)
- PUBLIC_PROC (_CPU_Context_switch)
-PROC (_CPU_Context_switch):
- sync
- isync
-#if (PPC_CACHE_ALIGNMENT == 4) /* No cache */
- stw r1, GP_1(r3)
- lwz r1, GP_1(r4)
- stw r2, GP_2(r3)
- lwz r2, GP_2(r4)
-#if (PPC_USE_MULTIPLE == 1)
- stmw r13, GP_13(r3)
- lmw r13, GP_13(r4)
-#else
- stw r13, GP_13(r3)
- lwz r13, GP_13(r4)
- stw r14, GP_14(r3)
- lwz r14, GP_14(r4)
- stw r15, GP_15(r3)
- lwz r15, GP_15(r4)
- stw r16, GP_16(r3)
- lwz r16, GP_16(r4)
- stw r17, GP_17(r3)
- lwz r17, GP_17(r4)
- stw r18, GP_18(r3)
- lwz r18, GP_18(r4)
- stw r19, GP_19(r3)
- lwz r19, GP_19(r4)
- stw r20, GP_20(r3)
- lwz r20, GP_20(r4)
- stw r21, GP_21(r3)
- lwz r21, GP_21(r4)
- stw r22, GP_22(r3)
- lwz r22, GP_22(r4)
- stw r23, GP_23(r3)
- lwz r23, GP_23(r4)
- stw r24, GP_24(r3)
- lwz r24, GP_24(r4)
- stw r25, GP_25(r3)
- lwz r25, GP_25(r4)
- stw r26, GP_26(r3)
- lwz r26, GP_26(r4)
- stw r27, GP_27(r3)
- lwz r27, GP_27(r4)
- stw r28, GP_28(r3)
- lwz r28, GP_28(r4)
- stw r29, GP_29(r3)
- lwz r29, GP_29(r4)
- stw r30, GP_30(r3)
- lwz r30, GP_30(r4)
- stw r31, GP_31(r3)
- lwz r31, GP_31(r4)
-#endif
- mfcr r5
- stw r5, GP_CR(r3)
- lwz r5, GP_CR(r4)
- mflr r6
- mtcrf 255, r5
- stw r6, GP_PC(r3)
- lwz r6, GP_PC(r4)
- mfmsr r7
- mtlr r6
- stw r7, GP_MSR(r3)
- lwz r7, GP_MSR(r4)
- mtmsr r7
-#endif
-#if (PPC_CACHE_ALIGNMENT == 16)
- /* This assumes that all the registers are in the given order */
- li r5, 16
- addi r3,r3,-4
-#if ( PPC_USE_DATA_CACHE )
- dcbz r5, r3
-#endif
- stw r1, GP_1+4(r3)
- stw r2, GP_2+4(r3)
-#if (PPC_USE_MULTIPLE == 1)
- addi r3, r3, GP_14+4
-#if ( PPC_USE_DATA_CACHE )
- dcbz r5, r3
-#endif
-
- addi r3, r3, GP_18-GP_14
-#if ( PPC_USE_DATA_CACHE )
- dcbz r5, r3
-#endif
- addi r3, r3, GP_22-GP_18
-#if ( PPC_USE_DATA_CACHE )
- dcbz r5, r3
-#endif
- addi r3, r3, GP_26-GP_22
-#if ( PPC_USE_DATA_CACHE )
- dcbz r5, r3
-#endif
- stmw r13, GP_13-GP_26(r3)
-#else
- stw r13, GP_13+4(r3)
- stwu r14, GP_14+4(r3)
-#if ( PPC_USE_DATA_CACHE )
- dcbz r5, r3
-#endif
- stw r15, GP_15-GP_14(r3)
- stw r16, GP_16-GP_14(r3)
- stw r17, GP_17-GP_14(r3)
- stwu r18, GP_18-GP_14(r3)
-#if ( PPC_USE_DATA_CACHE )
- dcbz r5, r3
-#endif
- stw r19, GP_19-GP_18(r3)
- stw r20, GP_20-GP_18(r3)
- stw r21, GP_21-GP_18(r3)
- stwu r22, GP_22-GP_18(r3)
-#if ( PPC_USE_DATA_CACHE )
- dcbz r5, r3
-#endif
- stw r23, GP_23-GP_22(r3)
- stw r24, GP_24-GP_22(r3)
- stw r25, GP_25-GP_22(r3)
- stwu r26, GP_26-GP_22(r3)
-#if ( PPC_USE_DATA_CACHE )
- dcbz r5, r3
-#endif
- stw r27, GP_27-GP_26(r3)
- stw r28, GP_28-GP_26(r3)
- stw r29, GP_29-GP_26(r3)
- stw r30, GP_30-GP_26(r3)
- stw r31, GP_31-GP_26(r3)
-#endif
-#if ( PPC_USE_DATA_CACHE )
- dcbt r0, r4
-#endif
- mfcr r6
- stw r6, GP_CR-GP_26(r3)
- mflr r7
- stw r7, GP_PC-GP_26(r3)
- mfmsr r8
- stw r8, GP_MSR-GP_26(r3)
-
-#if ( PPC_USE_DATA_CACHE )
- dcbt r5, r4
-#endif
- lwz r1, GP_1(r4)
- lwz r2, GP_2(r4)
-#if (PPC_USE_MULTIPLE == 1)
- addi r4, r4, GP_15
-#if ( PPC_USE_DATA_CACHE )
- dcbt r5, r4
-#endif
- addi r4, r4, GP_19-GP_15
-#if ( PPC_USE_DATA_CACHE )
- dcbt r5, r4
-#endif
- addi r4, r4, GP_23-GP_19
-#if ( PPC_USE_DATA_CACHE )
- dcbt r5, r4
-#endif
- addi r4, r4, GP_27-GP_23
-#if ( PPC_USE_DATA_CACHE )
- dcbt r5, r4
-#endif
- lmw r13, GP_13-GP_27(r4)
-#else
- lwz r13, GP_13(r4)
- lwz r14, GP_14(r4)
- lwzu r15, GP_15(r4)
-#if ( PPC_USE_DATA_CACHE )
- dcbt r5, r4
-#endif
- lwz r16, GP_16-GP_15(r4)
- lwz r17, GP_17-GP_15(r4)
- lwz r18, GP_18-GP_15(r4)
- lwzu r19, GP_19-GP_15(r4)
-#if ( PPC_USE_DATA_CACHE )
- dcbt r5, r4
-#endif
- lwz r20, GP_20-GP_19(r4)
- lwz r21, GP_21-GP_19(r4)
- lwz r22, GP_22-GP_19(r4)
- lwzu r23, GP_23-GP_19(r4)
-#if ( PPC_USE_DATA_CACHE )
- dcbt r5, r4
-#endif
- lwz r24, GP_24-GP_23(r4)
- lwz r25, GP_25-GP_23(r4)
- lwz r26, GP_26-GP_23(r4)
- lwzu r27, GP_27-GP_23(r4)
-#if ( PPC_USE_DATA_CACHE )
- dcbt r5, r4
-#endif
- lwz r28, GP_28-GP_27(r4)
- lwz r29, GP_29-GP_27(r4)
- lwz r30, GP_30-GP_27(r4)
- lwz r31, GP_31-GP_27(r4)
-#endif
- lwz r6, GP_CR-GP_27(r4)
- lwz r7, GP_PC-GP_27(r4)
- lwz r8, GP_MSR-GP_27(r4)
- mtcrf 255, r6
- mtlr r7
- mtmsr r8
-#endif
-#if (PPC_CACHE_ALIGNMENT == 32)
- /* This assumes that all the registers are in the given order */
- li r5, 32
- addi r3,r3,-4
-#if ( PPC_USE_DATA_CACHE )
- dcbz r5, r3
-#endif
- stw r1, GP_1+4(r3)
- stw r2, GP_2+4(r3)
-#if (PPC_USE_MULTIPLE == 1)
- addi r3, r3, GP_18+4
-#if ( PPC_USE_DATA_CACHE )
- dcbz r5, r3
-#endif
- stmw r13, GP_13-GP_18(r3)
-#else
- stw r13, GP_13+4(r3)
- stw r14, GP_14+4(r3)
- stw r15, GP_15+4(r3)
- stw r16, GP_16+4(r3)
- stw r17, GP_17+4(r3)
- stwu r18, GP_18+4(r3)
-#if ( PPC_USE_DATA_CACHE )
- dcbz r5, r3
-#endif
- stw r19, GP_19-GP_18(r3)
- stw r20, GP_20-GP_18(r3)
- stw r21, GP_21-GP_18(r3)
- stw r22, GP_22-GP_18(r3)
- stw r23, GP_23-GP_18(r3)
- stw r24, GP_24-GP_18(r3)
- stw r25, GP_25-GP_18(r3)
- stw r26, GP_26-GP_18(r3)
- stw r27, GP_27-GP_18(r3)
- stw r28, GP_28-GP_18(r3)
- stw r29, GP_29-GP_18(r3)
- stw r30, GP_30-GP_18(r3)
- stw r31, GP_31-GP_18(r3)
-#endif
-#if ( PPC_USE_DATA_CACHE )
- dcbt r0, r4
-#endif
- mfcr r6
- stw r6, GP_CR-GP_18(r3)
- mflr r7
- stw r7, GP_PC-GP_18(r3)
- mfmsr r8
- stw r8, GP_MSR-GP_18(r3)
-
-#if ( PPC_USE_DATA_CACHE )
- dcbt r5, r4
-#endif
- lwz r1, GP_1(r4)
- lwz r2, GP_2(r4)
-#if (PPC_USE_MULTIPLE == 1)
- addi r4, r4, GP_19
-#if ( PPC_USE_DATA_CACHE )
- dcbt r5, r4
-#endif
- lmw r13, GP_13-GP_19(r4)
-#else
- lwz r13, GP_13(r4)
- lwz r14, GP_14(r4)
- lwz r15, GP_15(r4)
- lwz r16, GP_16(r4)
- lwz r17, GP_17(r4)
- lwz r18, GP_18(r4)
- lwzu r19, GP_19(r4)
-#if ( PPC_USE_DATA_CACHE )
- dcbt r5, r4
-#endif
- lwz r20, GP_20-GP_19(r4)
- lwz r21, GP_21-GP_19(r4)
- lwz r22, GP_22-GP_19(r4)
- lwz r23, GP_23-GP_19(r4)
- lwz r24, GP_24-GP_19(r4)
- lwz r25, GP_25-GP_19(r4)
- lwz r26, GP_26-GP_19(r4)
- lwz r27, GP_27-GP_19(r4)
- lwz r28, GP_28-GP_19(r4)
- lwz r29, GP_29-GP_19(r4)
- lwz r30, GP_30-GP_19(r4)
- lwz r31, GP_31-GP_19(r4)
-#endif
- lwz r6, GP_CR-GP_19(r4)
- lwz r7, GP_PC-GP_19(r4)
- lwz r8, GP_MSR-GP_19(r4)
- mtcrf 255, r6
- mtlr r7
- mtmsr r8
-#endif
- blr
-
-/*
- * _CPU_Context_restore
- *
- * This routine is generallu used only to restart self in an
- * efficient manner. It may simply be a label in _CPU_Context_switch.
- *
- * NOTE: May be unnecessary to reload some registers.
- */
-/*
- * ACB: Don't worry about cache optimisation here - this is not THAT critical.
- */
- ALIGN (PPC_CACHE_ALIGNMENT, PPC_CACHE_ALIGN_POWER)
- PUBLIC_PROC (_CPU_Context_restore)
-PROC (_CPU_Context_restore):
- lwz r5, GP_CR(r3)
- lwz r6, GP_PC(r3)
- lwz r7, GP_MSR(r3)
- mtcrf 255, r5
- mtlr r6
- mtmsr r7
- lwz r1, GP_1(r3)
- lwz r2, GP_2(r3)
-#if (PPC_USE_MULTIPLE == 1)
- lmw r13, GP_13(r3)
-#else
- lwz r13, GP_13(r3)
- lwz r14, GP_14(r3)
- lwz r15, GP_15(r3)
- lwz r16, GP_16(r3)
- lwz r17, GP_17(r3)
- lwz r18, GP_18(r3)
- lwz r19, GP_19(r3)
- lwz r20, GP_20(r3)
- lwz r21, GP_21(r3)
- lwz r22, GP_22(r3)
- lwz r23, GP_23(r3)
- lwz r24, GP_24(r3)
- lwz r25, GP_25(r3)
- lwz r26, GP_26(r3)
- lwz r27, GP_27(r3)
- lwz r28, GP_28(r3)
- lwz r29, GP_29(r3)
- lwz r30, GP_30(r3)
- lwz r31, GP_31(r3)
-#endif
-
- blr
-
-/* Individual interrupt prologues look like this:
- * #if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27)
- * #if (PPC_HAS_FPU)
- * stwu r1, -(20*4 + 18*8 + IP_END)(r1)
- * #else
- * stwu r1, -(20*4 + IP_END)(r1)
- * #endif
- * #else
- * stwu r1, -(IP_END)(r1)
- * #endif
- * stw r0, IP_0(r1)
- *
- * li r0, vectornum
- * b PROC (_ISR_Handler{,C})
- */
-
-/* void __ISR_Handler()
- *
- * This routine provides the RTEMS interrupt management.
- * The vector number is in r0. R0 has already been stacked.
- *
- */
- ALIGN (PPC_CACHE_ALIGNMENT, PPC_CACHE_ALIGN_POWER)
- PUBLIC_PROC (_ISR_Handler)
-PROC (_ISR_Handler):
-#define LABEL(x) x
-/* XXX ??
-#define MTSAVE(x) mtspr sprg0, x
-#define MFSAVE(x) mfspr x, sprg0
-*/
-#define MTPC(x) mtspr srr0, x
-#define MFPC(x) mfspr x, srr0
-#define MTMSR(x) mtspr srr1, x
-#define MFMSR(x) mfspr x, srr1
-
- #include "irq_stub.S"
- rfi
-
-#if (PPC_HAS_RFCI == 1)
-/* void __ISR_HandlerC()
- *
- * This routine provides the RTEMS interrupt management.
- * For critical interrupts
- *
- */
- ALIGN (PPC_CACHE_ALIGNMENT, PPC_CACHE_ALIGN_POWER)
- PUBLIC_PROC (_ISR_HandlerC)
-PROC (_ISR_HandlerC):
-#undef LABEL
-#undef MTSAVE
-#undef MFSAVE
-#undef MTPC
-#undef MFPC
-#undef MTMSR
-#undef MFMSR
-#define LABEL(x) x##_C
-/* XXX??
-#define MTSAVE(x) mtspr sprg1, x
-#define MFSAVE(x) mfspr x, sprg1
-*/
-#define MTPC(x) mtspr srr2, x
-#define MFPC(x) mfspr x, srr2
-#define MTMSR(x) mtspr srr3, x
-#define MFMSR(x) mfspr x, srr3
- #include "irq_stub.S"
- rfci
-#endif
-
-/* PowerOpen descriptors for indirect function calls.
- */
-
-#if (PPC_ABI == PPC_ABI_POWEROPEN)
- DESCRIPTOR (_CPU_Context_save_fp)
- DESCRIPTOR (_CPU_Context_restore_fp)
- DESCRIPTOR (_CPU_Context_switch)
- DESCRIPTOR (_CPU_Context_restore)
- DESCRIPTOR (_ISR_Handler)
-#if (PPC_HAS_RFCI == 1)
- DESCRIPTOR (_ISR_HandlerC)
-#endif
-#endif
diff --git a/c/src/lib/libcpu/powerpc/old_exception_processing/irq_stub.S b/c/src/lib/libcpu/powerpc/old_exception_processing/irq_stub.S
deleted file mode 100644
index 76c8927305..0000000000
--- a/c/src/lib/libcpu/powerpc/old_exception_processing/irq_stub.S
+++ /dev/null
@@ -1,268 +0,0 @@
-/*
- * This file contains the interrupt handler assembly code for the PowerPC
- * implementation of RTEMS. It is #included from cpu_asm.s.
- *
- * Author: Andrew Bray <andy@i-cubed.co.uk>
- *
- * COPYRIGHT (c) 1995 by i-cubed ltd.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of i-cubed limited not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * i-cubed limited makes no representations about the suitability
- * of this software for any purpose.
- *
- * $Id$
- */
-
-/* void __ISR_Handler()
- *
- * This routine provides the RTEMS interrupt management.
- * The vector number is in r0. R0 has already been stacked.
- *
- */
- PUBLIC_VAR (_CPU_IRQ_info )
-
- /* Finish off the interrupt frame */
- stw r2, IP_2(r1)
- stw r3, IP_3(r1)
- stw r4, IP_4(r1)
- stw r5, IP_5(r1)
- stw r6, IP_6(r1)
- stw r7, IP_7(r1)
- stw r8, IP_8(r1)
- stw r9, IP_9(r1)
- stw r10, IP_10(r1)
- stw r11, IP_11(r1)
- stw r12, IP_12(r1)
- stw r13, IP_13(r1)
- stmw r28, IP_28(r1)
- mfcr r5
- mfctr r6
- mfxer r7
- mflr r8
- MFPC (r9)
- MFMSR (r10)
- /* Establish addressing */
-#if (PPC_USE_SPRG)
- mfspr r11, sprg3
-#else
- lis r11,_CPU_IRQ_info@ha
- addi r11,r11,_CPU_IRQ_info@l
-#endif
- dcbt r0, r11
- stw r5, IP_CR(r1)
- stw r6, IP_CTR(r1)
- stw r7, IP_XER(r1)
- stw r8, IP_LR(r1)
- stw r9, IP_PC(r1)
- stw r10, IP_MSR(r1)
-
- lwz r30, Vector_table(r11)
- slwi r4,r0,2
- lwz r28, Nest_level(r11)
- add r4, r4, r30
-
- lwz r30, 0(r28)
- mr r3, r0
- lwz r31, Stack(r11)
- /*
- * #if ( CPU_HAS_SOFTWARE_INTERRUPT_STACK == TRUE )
- * if ( _ISR_Nest_level == 0 )
- * switch to software interrupt stack
- * #endif
- */
- /* Switch stacks, here we must prevent ALL interrupts */
-#if (PPC_USE_SPRG)
- mfmsr r5
- mfspr r6, sprg2
-#else
- lwz r6,msr_initial(r11)
- lis r5,~PPC_MSR_DISABLE_MASK@ha
- ori r5,r5,~PPC_MSR_DISABLE_MASK@l
- and r6,r6,r5
- mfmsr r5
-#endif
- mtmsr r6
- cmpwi r30, 0
- lwz r29, Disable_level(r11)
- subf r31,r1,r31
- bne LABEL (nested)
- stwux r1,r1,r31
-LABEL (nested):
- /*
- * _ISR_Nest_level++;
- */
- lwz r31, 0(r29)
- addi r30,r30,1
- stw r30,0(r28)
- /* From here on out, interrupts can be re-enabled. RTEMS
- * convention says not.
- */
- lwz r4,0(r4)
- /*
- * _Thread_Dispatch_disable_level++;
- */
- addi r31,r31,1
- stw r31, 0(r29)
-/* SCE 980217
- *
- * We need address translation ON when we call our ISR routine
-
- mtmsr r5
-
- */
-
- /*
- * (*_ISR_Vector_table[ vector ])( vector );
- */
-#if (PPC_ABI == PPC_ABI_POWEROPEN)
- lwz r6,0(r4)
- lwz r2,4(r4)
- mtlr r6
- lwz r11,8(r4)
-#endif
-#if (PPC_ABI == PPC_ABI_GCC27)
- lwz r2, Default_r2(r11)
- mtlr r4
- #lwz r2, 0(r2)
-#endif
-#if (PPC_ABI == PPC_ABI_SVR4 || PPC_ABI == PPC_ABI_EABI)
- mtlr r4
- lwz r2, Default_r2(r11)
- lwz r13, Default_r13(r11)
- #lwz r2, 0(r2)
- #lwz r13, 0(r13)
-#endif
- mr r4,r1
- blrl
- /* NOP marker for debuggers */
- or r6,r6,r6
-
- /* We must re-disable the interrupts */
-#if (PPC_USE_SPRG)
- mfspr r11, sprg3
- mfspr r0, sprg2
-#else
- lis r11,_CPU_IRQ_info@ha
- addi r11,r11,_CPU_IRQ_info@l
- lwz r0,msr_initial(r11)
- lis r30,~PPC_MSR_DISABLE_MASK@ha
- ori r30,r30,~PPC_MSR_DISABLE_MASK@l
- and r0,r0,r30
-#endif
- mtmsr r0
- lwz r30, 0(r28)
- lwz r31, 0(r29)
-
- /*
- * if (--Thread_Dispatch_disable,--_ISR_Nest_level)
- * goto easy_exit;
- */
- addi r30, r30, -1
- cmpwi r30, 0
- addi r31, r31, -1
- stw r30, 0(r28)
- stw r31, 0(r29)
- bne LABEL (easy_exit)
- cmpwi r31, 0
-
- lwz r30, Switch_necessary(r11)
-
- /*
- * #if ( CPU_HAS_SOFTWARE_INTERRUPT_STACK == TRUE )
- * restore stack
- * #endif
- */
- lwz r1,0(r1)
- bne LABEL (easy_exit)
- lwz r30, 0(r30)
- lwz r31, Signal(r11)
-
- /*
- * if ( _Context_Switch_necessary )
- * goto switch
- */
- cmpwi r30, 0
- lwz r28, 0(r31)
- li r6,0
- bne LABEL (switch)
- /*
- * if ( !_ISR_Signals_to_thread_executing )
- * goto easy_exit
- * _ISR_Signals_to_thread_executing = 0;
- */
- cmpwi r28, 0
- beq LABEL (easy_exit)
-
- /*
- * switch:
- * call _Thread_Dispatch() or prepare to return to _ISR_Dispatch
- */
-LABEL (switch):
- stw r6, 0(r31)
- /* Re-enable interrupts */
- lwz r0, IP_MSR(r1)
-#if (PPC_ABI == PPC_ABI_POWEROPEN)
- lwz r2, Dispatch_r2(r11)
-#else
- /* R2 and R13 still hold their values from the last call */
-#endif
- mtmsr r0
- bl SYM (_Thread_Dispatch)
- /* NOP marker for debuggers */
- or r6,r6,r6
- /*
- * prepare to get out of interrupt
- */
- /* Re-disable IRQs */
-#if (PPC_USE_SPRG)
- mfspr r0, sprg2
-#else
- lis r11,_CPU_IRQ_info@ha
- addi r11,r11,_CPU_IRQ_info@l
- lwz r0,msr_initial(r11)
- lis r5,~PPC_MSR_DISABLE_MASK@ha
- ori r5,r5,~PPC_MSR_DISABLE_MASK@l
- and r0,r0,r5
-#endif
- mtmsr r0
-
- /*
- * easy_exit:
- * prepare to get out of interrupt
- * return from interrupt
- */
-LABEL (easy_exit):
- lwz r5, IP_CR(r1)
- lwz r6, IP_CTR(r1)
- lwz r7, IP_XER(r1)
- lwz r8, IP_LR(r1)
- lwz r9, IP_PC(r1)
- lwz r10, IP_MSR(r1)
- mtcrf 255,r5
- mtctr r6
- mtxer r7
- mtlr r8
- MTPC (r9)
- MTMSR (r10)
- lwz r0, IP_0(r1)
- lwz r2, IP_2(r1)
- lwz r3, IP_3(r1)
- lwz r4, IP_4(r1)
- lwz r5, IP_5(r1)
- lwz r6, IP_6(r1)
- lwz r7, IP_7(r1)
- lwz r8, IP_8(r1)
- lwz r9, IP_9(r1)
- lwz r10, IP_10(r1)
- lwz r11, IP_11(r1)
- lwz r12, IP_12(r1)
- lwz r13, IP_13(r1)
- lmw r28, IP_28(r1)
- lwz r1, 0(r1)
diff --git a/c/src/lib/libcpu/powerpc/old_exception_processing/rtems.S b/c/src/lib/libcpu/powerpc/old_exception_processing/rtems.S
deleted file mode 100644
index b653152411..0000000000
--- a/c/src/lib/libcpu/powerpc/old_exception_processing/rtems.S
+++ /dev/null
@@ -1,132 +0,0 @@
-/* rtems.s
- *
- * This file contains the single entry point code for
- * the PowerPC implementation of RTEMS.
- *
- * Author: Andrew Bray <andy@i-cubed.co.uk>
- *
- * COPYRIGHT (c) 1995 by i-cubed ltd.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of i-cubed limited not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * i-cubed limited makes no representations about the suitability
- * of this software for any purpose.
- *
- * Derived from c/src/exec/cpu/no_cpu/rtems.c:
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <asm.h>
-
- BEGIN_CODE
-/*
- * RTEMS
- *
- * This routine jumps to the directive indicated in r11.
- * This routine is used when RTEMS is linked by itself and placed
- * in ROM. This routine is the first address in the ROM space for
- * RTEMS. The user "calls" this address with the directive arguments
- * in the normal place.
- * This routine then jumps indirectly to the correct directive
- * preserving the arguments. The directive should not realize
- * it has been "wrapped" in this way. The table "_Entry_points"
- * is used to look up the directive.
- */
-
- ALIGN (4, 2)
- PUBLIC_PROC (RTEMS)
-PROC (RTEMS):
-#if (PPC_ABI == PPC_ABI_POWEROPEN)
- mflr r0
- stw r0, 8(r1)
- stwu r1, -64(r1)
-
- /* Establish addressing */
- bl base
-base:
- mflr r12
- addi r12, r12, tabaddr - base
-
- lwz r12, Entry_points-abase(r12)
- slwi r11, r11, 2
- lwzx r12, r12, r11
-
- stw r2, 56(r1)
- lwz r0, 0(r12)
- mtlr r0
- lwz r2, 4(r12)
- lwz r11, 8(r12)
- blrl
- lwz r2, 56(r1)
- addi r1, r1, 64
- lwz r0, 8(r1)
- mtlr r0
-#else
- mflr r0
- stw r0, 4(r1)
- stwu r1, -16(r1)
-
- /* Establish addressing */
- bl base
-base:
- mflr r12
- addi r12, r12, tabaddr - base
-
- lwz r12, Entry_points-abase(r12)
- slwi r11, r11, 2
- lwzx r11, r12, r11
-
- stw r2, 8(r1)
-#if (PPC_ABI != PPC_ABI_GCC27)
- stw r13, 12(r1)
-#endif
- mtlr r11
- lwz r11, irqinfo-abase(r12)
- lwz r2, 0(r11)
-#if (PPC_ABI != PPC_ABI_GCC27)
- lwz r13, 4(r11)
-#endif
- blrl
- lwz r2, 8(r1)
-#if (PPC_ABI != PPC_ABI_GCC27)
- lwz r13, 12(r1)
-#endif
- addi r1, r1, 16
- lwz r0, 4(r1)
- mtlr r0
-#endif
- blr
-
-
- /* Addressability stuff */
-tabaddr:
-abase:
- EXTERN_VAR (_Entry_points)
-Entry_points:
- EXT_SYM_REF (_Entry_points)
-#if (PPC_ABI != PPC_ABI_POWEROPEN)
- EXTERN_VAR (_CPU_IRQ_info)
-irqinfo:
- EXT_SYM_REF (_CPU_IRQ_info)
-#endif
-
-#if (PPC_ABI == PPC_ABI_POWEROPEN)
- DESCRIPTOR (RTEMS)
-#endif
-
-
diff --git a/c/src/lib/libcpu/sh/sh7032/include/iosh7032.h b/c/src/lib/libcpu/sh/sh7032/include/iosh7032.h
deleted file mode 100644
index e98185414b..0000000000
--- a/c/src/lib/libcpu/sh/sh7032/include/iosh7032.h
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- * This include file contains information pertaining to the Hitachi SH
- * processor.
- *
- * NOTE: NOT ALL VALUES HAVE BEEN CHECKED !!
- *
- * Authors: Ralf Corsepius (corsepiu@faw.uni-ulm.de) and
- * Bernd Becker (becker@faw.uni-ulm.de)
- *
- * Based on "iosh7030.h" distributed with Hitachi's EVB's tutorials, which
- * contained no copyright notice.
- *
- * COPYRIGHT (c) 1997-1998, FAW Ulm, Germany
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- *
- * COPYRIGHT (c) 1998.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __IOSH7030_H
-#define __IOSH7030_H
-
-/*
- * After each line is explained whether the access is char short or long.
- * The functions read/writeb, w, l, 8, 16, 32 can be found
- * in exec/score/cpu/sh/sh_io.h
- *
- * 8 bit == char ( readb, writeb, read8, write8)
- * 16 bit == short ( readw, writew, read16, write16 )
- * 32 bit == long ( readl, writel, read32, write32 )
- */
-
-#define SCI0_SMR 0x05fffec0 /* char */
-#define SCI0_BRR 0x05fffec1 /* char */
-#define SCI0_SCR 0x05fffec2 /* char */
-#define SCI0_TDR 0x05fffec3 /* char */
-#define SCI0_SSR 0x05fffec4 /* char */
-#define SCI0_RDR 0x05fffec5 /* char */
-
-#define SCI1_SMR 0x05fffec8 /* char */
-#define SCI1_BRR 0x05fffec9 /* char */
-#define SCI1_SCR 0x05fffeca /* char */
-#define SCI1_TDR 0x05fffecb /* char */
-#define SCI1_SSR 0x05fffecc /* char */
-#define SCI1_RDR 0x05fffecd /* char */
-
-
-#define ADDRAH 0x05fffee0 /* char */
-#define ADDRAL 0x05fffee1 /* char */
-#define ADDRBH 0x05fffee2 /* char */
-#define ADDRBL 0x05fffee3 /* char */
-#define ADDRCH 0x05fffee4 /* char */
-#define ADDRCL 0x05fffee5 /* char */
-#define ADDRDH 0x05fffee6 /* char */
-#define ADDRDL 0x05fffee7 /* char */
-#define AD_DRA 0x05fffee0 /* short */
-#define AD_DRB 0x05fffee2 /* short */
-#define AD_DRC 0x05fffee4 /* short */
-#define AD_DRD 0x05fffee6 /* short */
-#define ADCSR 0x05fffee8 /* char */
-#define ADCR 0x05fffee9 /* char */
-
-/*ITU SHARED*/
-#define ITU_TSTR 0x05ffff00 /* char */
-#define ITU_TSNC 0x05ffff01 /* char */
-#define ITU_TMDR 0x05ffff02 /* char */
-#define ITU_TFCR 0x05ffff03 /* char */
-
-/*ITU CHANNEL 0*/
-#define ITU_TCR0 0x05ffff04 /* char */
-#define ITU_TIOR0 0x05ffff05 /* char */
-#define ITU_TIER0 0x05ffff06 /* char */
-#define ITU_TSR0 0x05ffff07 /* char */
-#define ITU_TCNT0 0x05ffff08 /* short */
-#define ITU_GRA0 0x05ffff0a /* short */
-#define ITU_GRB0 0x05ffff0c /* short */
-
- /*ITU CHANNEL 1*/
-#define ITU_TCR1 0x05ffff0E /* char */
-#define ITU_TIOR1 0x05ffff0F /* char */
-#define ITU_TIER1 0x05ffff10 /* char */
-#define ITU_TSR1 0x05ffff11 /* char */
-#define ITU_TCNT1 0x05ffff12 /* short */
-#define ITU_GRA1 0x05ffff14 /* short */
-#define ITU_GRB1 0x05ffff16 /* short */
-
-
- /*ITU CHANNEL 2*/
-#define ITU_TCR2 0x05ffff18 /* char */
-#define ITU_TIOR2 0x05ffff19 /* char */
-#define ITU_TIER2 0x05ffff1A /* char */
-#define ITU_TSR2 0x05ffff1B /* char */
-#define ITU_TCNT2 0x05ffff1C /* short */
-#define ITU_GRA2 0x05ffff1E /* short */
-#define ITU_GRB2 0x05ffff20 /* short */
-
- /*ITU CHANNEL 3*/
-#define ITU_TCR3 0x05ffff22 /* char */
-#define ITU_TIOR3 0x05ffff23 /* char */
-#define ITU_TIER3 0x05ffff24 /* char */
-#define ITU_TSR3 0x05ffff25 /* char */
-#define ITU_TCNT3 0x05ffff26 /* short */
-#define ITU_GRA3 0x05ffff28 /* short */
-#define ITU_GRB3 0x05ffff2A /* short */
-#define ITU_BRA3 0x05ffff2C /* short */
-#define ITU_BRB3 0x05ffff2E /* short */
-
- /*ITU CHANNELS 0-4 SHARED*/
-#define ITU_TOCR 0x05ffff31 /* char */
-
- /*ITU CHANNEL 4*/
-#define ITU_TCR4 0x05ffff32 /* char */
-#define ITU_TIOR4 0x05ffff33 /* char */
-#define ITU_TIER4 0x05ffff34 /* char */
-#define ITU_TSR4 0x05ffff35 /* char */
-#define ITU_TCNT4 0x05ffff36 /* short */
-#define ITU_GRA4 0x05ffff38 /* short */
-#define ITU_GRB4 0x05ffff3A /* short */
-#define ITU_BRA4 0x05ffff3C /* short */
-#define ITU_BRB4 0x05ffff3E /* short */
-
- /*DMAC CHANNELS 0-3 SHARED*/
-#define DMAOR 0x05ffff48 /* short */
-
- /*DMAC CHANNEL 0*/
-#define DMA_SAR0 0x05ffff40 /* long */
-#define DMA_DAR0 0x05ffff44 /* long */
-#define DMA_TCR0 0x05ffff4a /* short */
-#define DMA_CHCR0 0x05ffff4e /* short */
-
- /*DMAC CHANNEL 1*/
-#define DMA_SAR1 0x05ffff50 /* long */
-#define DMA_DAR1 0x05ffff54 /* long */
-#define DMA_TCR1 0x05fffF5a /* short */
-#define DMA_CHCR1 0x05ffff5e /* short */
-
- /*DMAC CHANNEL 3*/
-#define DMA_SAR3 0x05ffff60 /* long */
-#define DMA_DAR3 0x05ffff64 /* long */
-#define DMA_TCR3 0x05fffF6a /* short */
-#define DMA_CHCR3 0x05ffff6e /* short */
-
-/*DMAC CHANNEL 4*/
-#define DMA_SAR4 0x05ffff70 /* long */
-#define DMA_DAR4 0x05ffff74 /* long */
-#define DMA_TCR4 0x05fffF7a /* short */
-#define DMA_CHCR4 0x05ffff7e /* short */
-
-/*INTC*/
-#define INTC_IPRA 0x05ffff84 /* short */
-#define INTC_IPRB 0x05ffff86 /* short */
-#define INTC_IPRC 0x05ffff88 /* short */
-#define INTC_IPRD 0x05ffff8A /* short */
-#define INTC_IPRE 0x05ffff8C /* short */
-#define INTC_ICR 0x05ffff8E /* short */
-
-/*UBC*/
-#define UBC_BARH 0x05ffff90 /* short */
-#define UBC_BARL 0x05ffff92 /* short */
-#define UBC_BAMRH 0x05ffff94 /* short */
-#define UBC_BAMRL 0x05ffff96 /* short */
-#define UBC_BBR 0x05ffff98 /* short */
-
-/*BSC*/
-#define BSC_BCR 0x05ffffA0 /* short */
-#define BSC_WCR1 0x05ffffA2 /* short */
-#define BSC_WCR2 0x05ffffA4 /* short */
-#define BSC_WCR3 0x05ffffA6 /* short */
-#define BSC_DCR 0x05ffffA8 /* short */
-#define BSC_PCR 0x05ffffAA /* short */
-#define BSC_RCR 0x05ffffAC /* short */
-#define BSC_RTCSR 0x05ffffAE /* short */
-#define BSC_RTCNT 0x05ffffB0 /* short */
-#define BSC_RTCOR 0x05ffffB2 /* short */
-
-/*WDT*/
-#define WDT_TCSR 0x05ffffB8 /* char */
-#define WDT_TCNT 0x05ffffB9 /* char */
-#define WDT_RSTCSR 0x05ffffBB /* char */
-
-/*POWER DOWN STATE*/
-#define PDT_SBYCR 0x05ffffBC /* char */
-
-/*PORT A*/
-#define PADR 0x05ffffC0 /* short */
-
-/*PORT B*/
-#define PBDR 0x05ffffC2 /* short */
-
- /*PORT C*/
-#define PCDR 0x05ffffD0 /* short */
-
-/*PFC*/
-#define PFC_PAIOR 0x05ffffC4 /* short */
-#define PFC_PBIOR 0x05ffffC6 /* short */
-#define PFC_PACR1 0x05ffffC8 /* short */
-#define PFC_PACR2 0x05ffffCA /* short */
-#define PFC_PBCR1 0x05ffffCC /* short */
-#define PFC_PBCR2 0x05ffffCE /* short */
-#define PFC_CASCR 0x05ffffEE /* short */
-
-/*TPC*/
-#define TPC_TPMR 0x05ffffF0 /* short */
-#define TPC_TPCR 0x05ffffF1 /* short */
-#define TPC_NDERH 0x05ffffF2 /* short */
-#define TPC_NDERL 0x05ffffF3 /* short */
-#define TPC_NDRB 0x05ffffF4 /* char */
-#define TPC_NDRA 0x05ffffF5 /* char */
-#define TPC_NDRB1 0x05ffffF6 /* char */
-#define TPC_NDRA1 0x05ffffF7 /* char */
-
-#endif
diff --git a/c/src/lib/libcpu/sh/sh7032/include/ispsh7032.h b/c/src/lib/libcpu/sh/sh7032/include/ispsh7032.h
deleted file mode 100644
index 3f9baf1ad2..0000000000
--- a/c/src/lib/libcpu/sh/sh7032/include/ispsh7032.h
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * This include file contains information pertaining to the Hitachi SH
- * processor.
- *
- * Authors: Ralf Corsepius (corsepiu@faw.uni-ulm.de) and
- * Bernd Becker (becker@faw.uni-ulm.de)
- *
- * COPYRIGHT (c) 1997-1998, FAW Ulm, Germany
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- *
- * COPYRIGHT (c) 1998.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __CPU_ISPS_H
-#define __CPU_ISPS_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/shtypes.h>
-
-extern void __ISR_Handler( unsigned32 vector );
-
-
-/*
- * interrupt vector table offsets
- */
-#define NMI_ISP_V 11
-#define USB_ISP_V 12
-#define IRQ0_ISP_V 64
-#define IRQ1_ISP_V 65
-#define IRQ2_ISP_V 66
-#define IRQ3_ISP_V 67
-#define IRQ4_ISP_V 68
-#define IRQ5_ISP_V 69
-#define IRQ6_ISP_V 70
-#define IRQ7_ISP_V 71
-#define DMA0_ISP_V 72
-#define DMA1_ISP_V 74
-#define DMA2_ISP_V 76
-#define DMA3_ISP_V 78
-
-#define IMIA0_ISP_V 80
-#define IMIB0_ISP_V 81
-#define OVI0_ISP_V 82
-
-#define IMIA1_ISP_V 84
-#define IMIB1_ISP_V 85
-#define OVI1_ISP_V 86
-
-#define IMIA2_ISP_V 88
-#define IMIB2_ISP_V 89
-#define OVI2_ISP_V 90
-
-#define IMIA3_ISP_V 92
-#define IMIB3_ISP_V 93
-#define OVI3_ISP_V 94
-
-#define IMIA4_ISP_V 96
-#define IMIB4_ISP_V 97
-#define OVI4_ISP_V 98
-
-#define ERI0_ISP_V 100
-#define RXI0_ISP_V 101
-#define TXI0_ISP_V 102
-#define TEI0_ISP_V 103
-
-#define ERI1_ISP_V 104
-#define RXI1_ISP_V 105
-#define TXI1_ISP_V 106
-#define TEI1_ISP_V 107
-
-#define PRT_ISP_V 108
-#define ADU_ISP_V 109
-#define WDT_ISP_V 112
-#define DREF_ISP_V 113
-
-
-/* dummy ISP */
-extern void _dummy_isp( void );
-
-/* Non Maskable Interrupt */
-extern void _nmi_isp( void );
-
-/* User Break Controller */
-extern void _usb_isp( void );
-
-/* External interrupts 0-7 */
-extern void _irq0_isp( void );
-extern void _irq1_isp( void );
-extern void _irq2_isp( void );
-extern void _irq3_isp( void );
-extern void _irq4_isp( void );
-extern void _irq5_isp( void );
-extern void _irq6_isp( void );
-extern void _irq7_isp( void );
-
-/* DMA - Controller */
-extern void _dma0_isp( void );
-extern void _dma1_isp( void );
-extern void _dma2_isp( void );
-extern void _dma3_isp( void );
-
-/* Interrupt Timer Unit */
-/* Timer 0 */
-extern void _imia0_isp( void );
-extern void _imib0_isp( void );
-extern void _ovi0_isp( void );
-/* Timer 1 */
-extern void _imia1_isp( void );
-extern void _imib1_isp( void );
-extern void _ovi1_isp( void );
-/* Timer 2 */
-extern void _imia2_isp( void );
-extern void _imib2_isp( void );
-extern void _ovi2_isp( void );
-/* Timer 3 */
-extern void _imia3_isp( void );
-extern void _imib3_isp( void );
-extern void _ovi3_isp( void );
-/* Timer 4 */
-extern void _imia4_isp( void );
-extern void _imib4_isp( void );
-extern void _ovi4_isp( void );
-
-/* seriell interfaces */
-extern void _eri0_isp( void );
-extern void _rxi0_isp( void );
-extern void _txi0_isp( void );
-extern void _tei0_isp( void );
-extern void _eri1_isp( void );
-extern void _rxi1_isp( void );
-extern void _txi1_isp( void );
-extern void _tei1_isp( void );
-
-/* Parity Control Unit of the Bus State Controllers */
-extern void _prt_isp( void );
-
-/* ADC */
-extern void _adu_isp( void );
-
-/* Watchdog Timer */
-extern void _wdt_isp( void );
-
-/* DRAM refresh control unit of bus state controller */
-extern void _dref_isp( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/c/src/lib/libcpu/sh/sh7032/score/cpu_asm.c b/c/src/lib/libcpu/sh/sh7032/score/cpu_asm.c
deleted file mode 100644
index 192c2f43d2..0000000000
--- a/c/src/lib/libcpu/sh/sh7032/score/cpu_asm.c
+++ /dev/null
@@ -1,318 +0,0 @@
-/*
- * This file contains the basic algorithms for all assembly code used
- * in an specific CPU port of RTEMS. These algorithms must be implemented
- * in assembly language
- *
- * NOTE: This port uses a C file with inline assembler instructions
- *
- * Authors: Ralf Corsepius (corsepiu@faw.uni-ulm.de) and
- * Bernd Becker (becker@faw.uni-ulm.de)
- *
- * COPYRIGHT (c) 1997-1998, FAW Ulm, Germany
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- *
- * COPYRIGHT (c) 1998.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- *
- * This material may be reproduced by or for the U.S. Government pursuant
- * to the copyright license under the clause at DFARS 252.227-7013. This
- * notice must appear in all copies of this file and its derivatives.
- *
- */
-
-/*
- * This is supposed to be an assembly file. This means that system.h
- * and cpu.h should not be included in a "real" cpu_asm file. An
- * implementation in assembly should include "cpu_asm.h"
- */
-
-#include <rtems/system.h>
-#include <rtems/score/cpu.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/sh.h>
-
-#if defined(sh7032)
-#include <rtems/score/ispsh7032.h>
-#include <rtems/score/iosh7032.h>
-#elif defined (sh7045)
-#include <rtems/score/ispsh7045.h>
-#include <rtems/score/iosh7045.h>
-#endif
-
-#include <rtems/score/sh_io.h>
-
-/* from cpu_isps.c */
-extern proc_ptr _Hardware_isr_Table[];
-
-#if( CPU_HAS_SOFTWARE_INTERRUPT_STACK == TRUE)
- unsigned long *_old_stack_ptr;
-#endif
-
-register unsigned long *stack_ptr asm("r15");
-
-/*
- * sh_set_irq_priority
- *
- * this function sets the interrupt level of the specified interrupt
- *
- * parameters:
- * - irq : interrupt number
- * - prio: priority to set for this interrupt number
- *
- * returns: 0 if ok
- * -1 on error
- */
-
-unsigned int sh_set_irq_priority(
- unsigned int irq,
- unsigned int prio )
-{
- unsigned32 shiftcount;
- unsigned32 prioreg;
- unsigned16 temp16;
- unsigned32 level;
-
- /*
- * first check for valid interrupt
- */
- if(( irq > 113) || (_Hardware_isr_Table[irq] == _dummy_isp))
- return -1;
- /*
- * check for valid irq priority
- */
- if( prio > 15 )
- return -1;
-
- /*
- * look up appropriate interrupt priority register
- */
- if( irq > 71)
- {
- irq = irq - 72;
- shiftcount = 12 - ((irq & ~0x03) % 16);
-
- switch( irq / 16)
- {
- case 0: { prioreg = INTC_IPRC; break;}
- case 1: { prioreg = INTC_IPRD; break;}
- case 2: { prioreg = INTC_IPRE; break;}
- default: return -1;
- }
- }
- else
- {
- shiftcount = 12 - 4 * ( irq % 4);
- if( irq > 67)
- prioreg = INTC_IPRB;
- else
- prioreg = INTC_IPRA;
- }
-
- /*
- * Set the interrupt priority register
- */
- _CPU_ISR_Disable( level );
-
- temp16 = read16( prioreg);
- temp16 &= ~( 15 << shiftcount);
- temp16 |= prio << shiftcount;
- write16( temp16, prioreg);
-
- _CPU_ISR_Enable( level );
-
- return 0;
-}
-
-/*
- * _CPU_Context_save_fp_context
- *
- * This routine is responsible for saving the FP context
- * at *fp_context_ptr. If the point to load the FP context
- * from is changed then the pointer is modified by this routine.
- *
- * Sometimes a macro implementation of this is in cpu.h which dereferences
- * the ** and a similarly named routine in this file is passed something
- * like a (Context_Control_fp *). The general rule on making this decision
- * is to avoid writing assembly language.
- */
-
-void _CPU_Context_save_fp(
- void **fp_context_ptr
-)
-{
-}
-
-/*
- * _CPU_Context_restore_fp_context
- *
- * This routine is responsible for restoring the FP context
- * at *fp_context_ptr. If the point to load the FP context
- * from is changed then the pointer is modified by this routine.
- *
- * Sometimes a macro implementation of this is in cpu.h which dereferences
- * the ** and a similarly named routine in this file is passed something
- * like a (Context_Control_fp *). The general rule on making this decision
- * is to avoid writing assembly language.
- */
-
-void _CPU_Context_restore_fp(
- void **fp_context_ptr
-)
-{
-}
-
-/* _CPU_Context_switch
- *
- * This routine performs a normal non-FP context switch.
- */
-
-/* within __CPU_Context_switch:
- * _CPU_Context_switch
- * _CPU_Context_restore
- *
- * This routine is generally used only to restart self in an
- * efficient manner. It may simply be a label in _CPU_Context_switch.
- *
- * NOTE: It should be safe not to store r4, r5
- *
- * NOTE: It is doubtful if r0 is really needed to be stored
- *
- * NOTE: gbr is added, but should not be necessary, as it is
- * only used globally in this port.
- */
-
-/*
- * FIXME: This is an ugly hack, but we wanted to avoid recalculating
- * the offset each time Context_Control is changed
- */
-void __CPU_Context_switch(
- Context_Control *run, /* r4 */
- Context_Control *heir /* r5 */
-)
-{
-
-asm volatile("
- .global __CPU_Context_switch
-__CPU_Context_switch:
-
- add %0,r4
-
- stc.l sr,@-r4
- stc.l gbr,@-r4
- mov.l r0,@-r4
- mov.l r1,@-r4
- mov.l r2,@-r4
- mov.l r3,@-r4
-
- mov.l r6,@-r4
- mov.l r7,@-r4
- mov.l r8,@-r4
- mov.l r9,@-r4
- mov.l r10,@-r4
- mov.l r11,@-r4
- mov.l r12,@-r4
- mov.l r13,@-r4
- mov.l r14,@-r4
- sts.l pr,@-r4
- sts.l mach,@-r4
- sts.l macl,@-r4
- mov.l r15,@-r4
-
- mov r5, r4"
- :: "I" (sizeof(Context_Control))
- );
-
- asm volatile("
- .global __CPU_Context_restore
-__CPU_Context_restore:
- mov.l @r4+,r15
- lds.l @r4+,macl
- lds.l @r4+,mach
- lds.l @r4+,pr
- mov.l @r4+,r14
- mov.l @r4+,r13
- mov.l @r4+,r12
- mov.l @r4+,r11
- mov.l @r4+,r10
- mov.l @r4+,r9
- mov.l @r4+,r8
- mov.l @r4+,r7
- mov.l @r4+,r6
-
- mov.l @r4+,r3
- mov.l @r4+,r2
- mov.l @r4+,r1
- mov.l @r4+,r0
- ldc.l @r4+,gbr
- ldc.l @r4+,sr
-
- rts
- nop" );
-}
-
-/*
- * This routine provides the RTEMS interrupt management.
- */
-
-void __ISR_Handler( unsigned32 vector)
-{
- register unsigned32 level;
-
- _CPU_ISR_Disable( level );
-
- _Thread_Dispatch_disable_level++;
-
-#if( CPU_HAS_SOFTWARE_INTERRUPT_STACK == TRUE)
- if( _ISR_Nest_level == 0 )
- {
- /* Install irq stack */
- _old_stack_ptr = stack_ptr;
- stack_ptr = _CPU_Interrupt_stack_high;
- }
-
-#endif
-
- _ISR_Nest_level++;
-
- _CPU_ISR_Enable( level );
-
- /* call isp */
- if( _ISR_Vector_table[ vector])
- (*_ISR_Vector_table[ vector ])( vector );
-
- _CPU_ISR_Disable( level );
-
- _ISR_Nest_level--;
-
-#if( CPU_HAS_SOFTWARE_INTERRUPT_STACK == TRUE)
-
- if( _ISR_Nest_level == 0 )
- /* restore old stack pointer */
- stack_ptr = _old_stack_ptr;
-#endif
-
- _Thread_Dispatch_disable_level--;
-
- _CPU_ISR_Enable( level );
-
- if ( _Thread_Dispatch_disable_level == 0 )
- {
- if(( _Context_Switch_necessary) || (! _ISR_Signals_to_thread_executing))
- {
- _ISR_Signals_to_thread_executing = FALSE;
- _Thread_Dispatch();
- }
- }
-}
diff --git a/c/src/lib/libcpu/sh/sh7032/score/ispsh7032.c b/c/src/lib/libcpu/sh/sh7032/score/ispsh7032.c
deleted file mode 100644
index 9fcc9badbf..0000000000
--- a/c/src/lib/libcpu/sh/sh7032/score/ispsh7032.c
+++ /dev/null
@@ -1,256 +0,0 @@
-/*
- * This file contains the isp frames for the user interrupts.
- * From these procedures __ISR_Handler is called with the vector number
- * as argument.
- *
- * __ISR_Handler is kept in a separate file (cpu_asm.c), because a bug in
- * some releases of gcc doesn't properly handle #pragma interrupt, if a
- * file contains both isrs and normal functions.
- *
- * Authors: Ralf Corsepius (corsepiu@faw.uni-ulm.de) and
- * Bernd Becker (becker@faw.uni-ulm.de)
- *
- * COPYRIGHT (c) 1997-1998, FAW Ulm, Germany
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
- *
- *
- * COPYRIGHT (c) 1998.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/shtypes.h>
-#include <rtems/score/ispsh7032.h>
-
-#if !defined(sh7032)
-#error Wrong CPU MODEL
-#endif
-
-/*
- * This is an exception vector table
- *
- * It has the same structure like the actual vector table (vectab)
- */
-proc_ptr _Hardware_isr_Table[256]={
-_dummy_isp, _dummy_isp, _dummy_isp, _dummy_isp,
-_dummy_isp, _dummy_isp, _dummy_isp, _dummy_isp,
-_dummy_isp, _dummy_isp, _dummy_isp,
-_nmi_isp, _usb_isp,
-_dummy_isp, _dummy_isp, _dummy_isp, _dummy_isp,
-_dummy_isp, _dummy_isp, _dummy_isp, _dummy_isp,
-_dummy_isp, _dummy_isp, _dummy_isp, _dummy_isp,
-_dummy_isp, _dummy_isp, _dummy_isp, _dummy_isp,
-_dummy_isp, _dummy_isp, _dummy_isp,
-/* trapa 0 -31 */
-_dummy_isp, _dummy_isp, _dummy_isp, _dummy_isp,
-_dummy_isp, _dummy_isp, _dummy_isp, _dummy_isp,
-_dummy_isp, _dummy_isp, _dummy_isp, _dummy_isp,
-_dummy_isp, _dummy_isp, _dummy_isp, _dummy_isp,
-_dummy_isp, _dummy_isp, _dummy_isp, _dummy_isp,
-_dummy_isp, _dummy_isp, _dummy_isp, _dummy_isp,
-_dummy_isp, _dummy_isp, _dummy_isp, _dummy_isp,
-_dummy_isp, _dummy_isp, _dummy_isp, _dummy_isp,
-/* irq 64 ... */
-_irq0_isp, _irq1_isp, _irq2_isp, _irq3_isp,
-_irq4_isp, _irq5_isp, _irq6_isp, _irq7_isp,
-_dma0_isp, _dummy_isp, _dma1_isp, _dummy_isp,
-_dma2_isp, _dummy_isp, _dma3_isp, _dummy_isp,
-_imia0_isp, _imib0_isp, _ovi0_isp, _dummy_isp,
-_imia1_isp, _imib1_isp, _ovi1_isp, _dummy_isp,
-_imia2_isp, _imib2_isp, _ovi2_isp, _dummy_isp,
-_imia3_isp, _imib3_isp, _ovi3_isp, _dummy_isp,
-_imia4_isp, _imib4_isp, _ovi4_isp, _dummy_isp,
-_eri0_isp, _rxi0_isp, _txi0_isp, _tei0_isp,
-_eri1_isp, _rxi1_isp, _txi1_isp, _tei1_isp,
-_prt_isp, _adu_isp, _dummy_isp, _dummy_isp,
-_wdt_isp,
-/* 113 */ _dref_isp
-};
-
-#define Str(a)#a
-
-/*
- * Some versions of gcc and all version of egcs at least until egcs-1.1b
- * are not able to handle #pragma interrupt correctly if more than 1 isr is
- * contained in a file and when optimizing.
- * We try to work around this problem by using the macro below.
- */
-#define isp( name, number, func)\
-asm (".global _"Str(name)"\n\t" \
- "_"Str(name)": \n\t" \
- " mov.l r0,@-r15 \n\t" \
- " mov.l r1,@-r15 \n\t" \
- " mov.l r2,@-r15 \n\t" \
- " mov.l r3,@-r15 \n\t" \
- " mov.l r4,@-r15 \n\t" \
- " mov.l r5,@-r15 \n\t" \
- " mov.l r6,@-r15 \n\t" \
- " mov.l r7,@-r15 \n\t" \
- " mov.l r14,@-r15 \n\t" \
- " sts.l pr,@-r15 \n\t" \
- " sts.l mach,@-r15 \n\t" \
- " sts.l macl,@-r15 \n\t" \
- " mov r15,r14 \n\t" \
- " mov.l "Str(name)"_k, r1\n\t" \
- " jsr @r1 \n\t" \
- " mov #"Str(number)", r4\n\t" \
- " mov r14,r15 \n\t" \
- " lds.l @r15+,macl \n\t" \
- " lds.l @r15+,mach \n\t" \
- " lds.l @r15+,pr \n\t" \
- " mov.l @r15+,r14 \n\t" \
- " mov.l @r15+,r7 \n\t" \
- " mov.l @r15+,r6 \n\t" \
- " mov.l @r15+,r5 \n\t" \
- " mov.l @r15+,r4 \n\t" \
- " mov.l @r15+,r3 \n\t" \
- " mov.l @r15+,r2 \n\t" \
- " mov.l @r15+,r1 \n\t" \
- " mov.l @r15+,r0 \n\t" \
- " rte \n\t" \
- " nop \n\t" \
- " .align 2 \n\t" \
- #name"_k: \n\t" \
- ".long "Str(func));
-
-/************************************************
- * Dummy interrupt service procedure for
- * interrupts being not allowed --> Trap 34
- ************************************************/
-asm(" .section .text
-.global __dummy_isp
-__dummy_isp:
- mov.l r14,@-r15
- mov r15, r14
- trapa #34
- mov.l @r15+,r14
- rte
- nop");
-
-/*****************************
- * Non maskable interrupt
- *****************************/
-isp( _nmi_isp, NMI_ISP_V, ___ISR_Handler);
-
-/*****************************
- * User break controller
- *****************************/
-isp( _usb_isp, USB_ISP_V, ___ISR_Handler);
-
-/*****************************
- * External interrupts 0-7
- *****************************/
-isp( _irq0_isp, IRQ0_ISP_V, ___ISR_Handler);
-isp( _irq1_isp, IRQ1_ISP_V, ___ISR_Handler);
-isp( _irq2_isp, IRQ2_ISP_V, ___ISR_Handler);
-isp( _irq3_isp, IRQ3_ISP_V, ___ISR_Handler);
-isp( _irq4_isp, IRQ4_ISP_V, ___ISR_Handler);
-isp( _irq5_isp, IRQ5_ISP_V, ___ISR_Handler);
-isp( _irq6_isp, IRQ6_ISP_V, ___ISR_Handler);
-isp( _irq7_isp, IRQ7_ISP_V, ___ISR_Handler);
-
-/*****************************
- * DMA - controller
- *****************************/
-isp( _dma0_isp, DMA0_ISP_V, ___ISR_Handler);
-isp( _dma1_isp, DMA1_ISP_V, ___ISR_Handler);
-isp( _dma2_isp, DMA2_ISP_V, ___ISR_Handler);
-isp( _dma3_isp, DMA3_ISP_V, ___ISR_Handler);
-
-
-/*****************************
- * Interrupt timer unit
- *****************************/
-
-/*****************************
- * Timer 0
- *****************************/
-isp( _imia0_isp, IMIA0_ISP_V, ___ISR_Handler);
-isp( _imib0_isp, IMIB0_ISP_V, ___ISR_Handler);
-isp( _ovi0_isp, OVI0_ISP_V, ___ISR_Handler);
-
-/*****************************
- * Timer 1
- *****************************/
-isp( _imia1_isp, IMIA1_ISP_V, ___ISR_Handler);
-isp( _imib1_isp, IMIB1_ISP_V, ___ISR_Handler);
-isp( _ovi1_isp, OVI1_ISP_V, ___ISR_Handler);
-
-/*****************************
- * Timer 2
- *****************************/
-isp( _imia2_isp, IMIA2_ISP_V, ___ISR_Handler);
-isp( _imib2_isp, IMIB2_ISP_V, ___ISR_Handler);
-isp( _ovi2_isp, OVI2_ISP_V, ___ISR_Handler);
-
-/*****************************
- * Timer 3
- *****************************/
-isp( _imia3_isp, IMIA3_ISP_V, ___ISR_Handler);
-isp( _imib3_isp, IMIB3_ISP_V, ___ISR_Handler);
-isp( _ovi3_isp, OVI3_ISP_V, ___ISR_Handler);
-
-/*****************************
- * Timer 4
- *****************************/
-isp( _imia4_isp, IMIA4_ISP_V, ___ISR_Handler);
-isp( _imib4_isp, IMIB4_ISP_V, ___ISR_Handler);
-isp( _ovi4_isp, OVI4_ISP_V, ___ISR_Handler);
-
-
-/*****************************
- * Serial interfaces
- *****************************/
-
-/*****************************
- * Serial interface 0
- *****************************/
-isp( _eri0_isp, ERI0_ISP_V, ___ISR_Handler);
-isp( _rxi0_isp, RXI0_ISP_V, ___ISR_Handler);
-isp( _txi0_isp, TXI0_ISP_V, ___ISR_Handler);
-isp( _tei0_isp, TEI0_ISP_V, ___ISR_Handler);
-
-/*****************************
- * Serial interface 1
- *****************************/
-isp( _eri1_isp, ERI1_ISP_V, ___ISR_Handler);
-isp( _rxi1_isp, RXI1_ISP_V, ___ISR_Handler);
-isp( _txi1_isp, TXI1_ISP_V, ___ISR_Handler);
-isp( _tei1_isp, TEI1_ISP_V, ___ISR_Handler);
-
-
-/*****************************
- * Parity control unit of
- * the bus state controller
- *****************************/
-isp( _prt_isp, PRT_ISP_V, ___ISR_Handler);
-
-
-/******************************
- * Analog digital converter
- * ADC
- ******************************/
-isp( _adu_isp, ADU_ISP_V, ___ISR_Handler);
-
-
-/******************************
- * Watchdog timer
- ******************************/
-isp( _wdt_isp, WDT_ISP_V, ___ISR_Handler);
-
-
-/******************************
- * DRAM refresh control unit
- * of bus state controller
- ******************************/
-isp( _dref_isp, DREF_ISP_V, ___ISR_Handler);
diff --git a/c/src/lib/libcpu/sh/sh7045/include/io_types.h b/c/src/lib/libcpu/sh/sh7045/include/io_types.h
deleted file mode 100644
index 8d817e9aee..0000000000
--- a/c/src/lib/libcpu/sh/sh7045/include/io_types.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/************************************************************************
- *
- * Data types and constants for Hitachi SH704X on-chip peripherals
- *
- * Author: John M.Mills (jmills@tga.com)
- *
- * COPYRIGHT (c) 1999, TGA Technologies, Norcross, GA, USA
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * This file may be distributed as part of the RTEMS software item.
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * John M. Mills (jmills@tga.com)
- * TGA Technologies, Inc.
- * 100 Pinnacle Way, Suite 140
- * Norcross, GA 30071 U.S.A.
- *
- * This modified file may be copied and distributed in accordance
- * the above-referenced license. It is provided for critique and
- * developmental purposes without any warranty nor representation
- * by the authors or by TGA Technologies.
- *
- * $Id$
- *
- *
- ************************************************************************/
-
-#ifndef _sh_io_types_h
-#define _sh_io_types_h
-
-#include <rtems/score/iosh7045.h>
-#include <termios.h>
-
-typedef enum {SCI0, SCI1} portNo;
-typedef enum {eight, seven} dataBits;
-typedef enum {one, two} stopBits;
-typedef enum {even, odd} parity;
-
-typedef struct {
- portNo line;
- int speed_ix;
- dataBits dBits;
- int parEn;
- parity par;
- int mulPro;
- stopBits sBits;
-} sci_setup_t;
-
-typedef union{
- unsigned char Reg; /* By Register */
- struct { /* By Field */
- unsigned char Sync :1; /* Async/Sync */
- unsigned char DBts :1; /* Char.Length */
- unsigned char ParEn :1; /* Parity En.*/
- unsigned char Odd :1; /* Even/Odd */
- unsigned char SBts :1; /* No.Stop Bits */
- unsigned char MulP :1; /* Multi-Proc. */
- unsigned char Dvsr :2; /* Clock Sel. */
- } Fld;
-} sci_smr_t;
-
-typedef union {
- unsigned char Reg; /* By Register */
- struct { /* By Field */
- unsigned char TIE :1; /* Tx.Int.En. */
- unsigned char RIE :1; /* Rx.Int.En. */
- unsigned char TE :1; /* Tx.En. */
- unsigned char RE :1; /* Rx.En. */
- unsigned char MPIE:1; /* Mult.Pro.Int.En. */
- unsigned char TEIE:1; /* Tx.End Int.En. */
- unsigned char CkSrc :2; /* Clock Src. */
- } Fld;
-} sci_scr_t;
-
-typedef struct {
- unsigned char n ;
- unsigned char N ;
-} sci_bitrate_t;
-
-#endif /* _sh_io_types_h */
-
diff --git a/c/src/lib/libcpu/sh/sh7045/include/iosh7045.h b/c/src/lib/libcpu/sh/sh7045/include/iosh7045.h
deleted file mode 100644
index 62918dd958..0000000000
--- a/c/src/lib/libcpu/sh/sh7045/include/iosh7045.h
+++ /dev/null
@@ -1,321 +0,0 @@
-/*
- * This include file contains information pertaining to the Hitachi SH
- * processor.
- *
- * NOTE: NOT ALL VALUES HAVE BEEN CHECKED !!
- *
- * Authors: Ralf Corsepius (corsepiu@faw.uni-ulm.de) and
- * Bernd Becker (becker@faw.uni-ulm.de)
- *
- * Based on "iosh7030.h" distributed with Hitachi's EVB's tutorials, which
- * contained no copyright notice.
- *
- * COPYRIGHT (c) 1997-1998, FAW Ulm, Germany
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- *
- * COPYRIGHT (c) 1998.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * Modified to reflect on-chip registers for sh7045 processor, based on
- * "Register.h" distributed with Hitachi's EVB7045F tutorials, and which
- * contained no copyright notice:
- * John M. Mills (jmills@tga.com)
- * TGA Technologies, Inc.
- * 100 Pinnacle Way, Suite 140
- * Norcross, GA 30071 U.S.A.
- * August, 1999
- *
- * This modified file may be copied and distributed in accordance
- * the above-referenced license. It is provided for critique and
- * developmental purposes without any warranty nor representation
- * by the authors or by TGA Technologies.
- *
- * $Id$
- */
-
-#ifndef __IOSH7045_H
-#define __IOSH7045_H
-
-/*
- * After each line is explained whether the access is char short or long.
- * The functions read/writeb, w, l, 8, 16, 32 can be found
- * in exec/score/cpu/sh/sh_io.h
- *
- * 8 bit == char ( readb, writeb, read8, write8)
- * 16 bit == short ( readw, writew, read16, write16 )
- * 32 bit == long ( readl, writel, read32, write32 )
- * JMM: Addresses noted "[char, ]short,word" are per Hitachi _SuperH_RISC_
- * ENGINE_..Hardware_Manual; alignment access-restrictions may apply
- */
-
-#define REG_BASE 0xFFFF8000
-
-/* SCI0 Registers */
-#define SCI_SMR0 (REG_BASE + 0x01a0) /*char: Serial mode ch 0 */
-#define SCI_BRR0 (REG_BASE + 0x01a1) /*char: Bit rate ch 0 */
-#define SCI_SCR0 (REG_BASE + 0x01a2) /*char: Serial control ch 0 */
-#define SCI_TDR0 (REG_BASE + 0x01a3) /*char: Transmit data ch 0 */
-#define SCI_SSR0 (REG_BASE + 0x01a4) /*char: Serial status ch 0 */
-#define SCI_RDR0 (REG_BASE + 0x01a5) /*char: Receive data ch 0 */
-
-/* SCI1 Registers */
-#define SCI_SMR1 (REG_BASE + 0x01b0) /* char: Serial mode ch 1 */
-#define SCI_BRR1 (REG_BASE + 0x01b1) /* char: Bit rate ch 1 */
-#define SCI_SCR1 (REG_BASE + 0x01b2) /* char: Serial control ch 1 */
-#define SCI_TDR1 (REG_BASE + 0x01b3) /* char: Transmit data ch 1 */
-#define SCI_SSR1 (REG_BASE + 0x01b4) /* char: Serial status ch 1 */
-#define SCI_RDR1 (REG_BASE + 0x01b5) /* char: Receive data ch 1 */
-
-/* ADI */
-/* High Speed A/D (Excluding A-Mask Part)*/
-#define ADDRA (REG_BASE + 0x03F0) /* short */
-#define ADDRB (REG_BASE + 0x03F2) /* short */
-#define ADDRC (REG_BASE + 0x03F4) /* short */
-#define ADDRD (REG_BASE + 0x03F6) /* short */
-#define ADDRE (REG_BASE + 0x03F8) /* short */
-#define ADDRF (REG_BASE + 0x03FA) /* short */
-#define ADDRG (REG_BASE + 0x03FC) /* short */
-#define ADDRH (REG_BASE + 0x03FE) /* short */
-#define ADCSR (REG_BASE + 0x03E0) /* char */
-#define ADCR (REG_BASE + 0x03E1) /* char */
-
-/* Mid-Speed A/D (A-Mask part)*/
-#define ADDRA0 (REG_BASE + 0x0400) /* char, short */
-#define ADDRA0H (REG_BASE + 0x0400) /* char, short */
-#define ADDRA0L (REG_BASE + 0x0401) /* char */
-#define ADDRB0 (REG_BASE + 0x0402) /* char, short */
-#define ADDRB0H (REG_BASE + 0x0402) /* char, short */
-#define ADDRB0L (REG_BASE + 0x0403) /* char */
-#define ADDRC0 (REG_BASE + 0x0404) /* char, short */
-#define ADDRC0H (REG_BASE + 0x0404) /* char, short */
-#define ADDRC0L (REG_BASE + 0x0405) /* char */
-#define ADDRD0 (REG_BASE + 0x0406) /* char, short */
-#define ADDRD0H (REG_BASE + 0x0406) /* char, short */
-#define ADDRD0L (REG_BASE + 0x0407) /* char */
-#define ADCSR0 (REG_BASE + 0x0410) /* char */
-#define ADCR0 (REG_BASE + 0x0412) /* char */
-#define ADDRA1 (REG_BASE + 0x0408) /* char, short */
-#define ADDRA1H (REG_BASE + 0x0408) /* char, short */
-#define ADDRA1L (REG_BASE + 0x0409) /* char */
-#define ADDRB1 (REG_BASE + 0x040A) /* char, short */
-#define ADDRB1H (REG_BASE + 0x040A) /* char, short */
-#define ADDRB1L (REG_BASE + 0x040B) /* char */
-#define ADDRC1 (REG_BASE + 0x040C) /* char, short */
-#define ADDRC1H (REG_BASE + 0x040C) /* char, short */
-#define ADDRC1L (REG_BASE + 0x040D) /* char */
-#define ADDRD1 (REG_BASE + 0x040E) /* char, short */
-#define ADDRD1H (REG_BASE + 0x040E) /* char, short */
-#define ADDRD1L (REG_BASE + 0x040F) /* char */
-#define ADCSR1 (REG_BASE + 0x0411) /* char */
-#define ADCR1 (REG_BASE + 0x0413) /* char */
-
-/*MTU SHARED*/
-#define MTU_TSTR (REG_BASE + 0x0240) /* char, short, word */
-#define MTU_TSYR (REG_BASE + 0x0241) /* char, short, word */
-#define MTU_ICSR (REG_BASE + 0x03C0) /* input lev. CSR */
-#define MTU_OCSR (REG_BASE + 0x03C0) /* output lev. CSR */
-
-/*MTU CHANNEL 0*/
-#define MTU_TCR0 (REG_BASE + 0x0260) /* char, short, word */
-#define MTU_TMDR0 (REG_BASE + 0x0261) /* char, short, word */
-#define MTU_TIORH0 (REG_BASE + 0x0262) /* char, short, word */
-#define MTU_TIORL0 (REG_BASE + 0x0263) /* char, short, word */
-#define MTU_TIER0 (REG_BASE + 0x0264) /* char, short, word */
-#define MTU_TSR0 (REG_BASE + 0x0265) /* char, short, word */
-#define MTU_TCNT0 (REG_BASE + 0x0266) /* short, word */
-#define MTU_GR0A (REG_BASE + 0x0268) /* short, word */
-#define MTU_GR0B (REG_BASE + 0x026A) /* short, word */
-#define MTU_GR0C (REG_BASE + 0x026C) /* short, word */
-#define MTU_GR0D (REG_BASE + 0x026E) /* short, word */
-
-/*MTU CHANNEL 1*/
-#define MTU_TCR1 (REG_BASE + 0x0280) /* char, short, word */
-#define MTU_TMDR1 (REG_BASE + 0x0281) /* char, short, word */
-#define MTU_TIOR1 (REG_BASE + 0x0282) /* char, short, word */
-#define MTU_TIER1 (REG_BASE + 0x0284) /* char, short, word */
-#define MTU_TSR1 (REG_BASE + 0x0285) /* char, short, word */
-#define MTU_TCNT1 (REG_BASE + 0x0286) /* short, word */
-#define MTU_GR1A (REG_BASE + 0x0288) /* short, word */
-#define MTU_GR1B (REG_BASE + 0x028A) /* short, word */
-
-/*MTU CHANNEL 2*/
-#define MTU_TCR2 (REG_BASE + 0x02A0) /* char, short, word */
-#define MTU_TMDR2 (REG_BASE + 0x02A1) /* char, short, word */
-#define MTU_TIOR2 (REG_BASE + 0x02A2) /* char, short, word */
-#define MTU_TIER2 (REG_BASE + 0x02A4) /* char, short, word */
-#define MTU_TSR2 (REG_BASE + 0x02A5) /* char, short, word */
-#define MTU_TCNT2 (REG_BASE + 0x02A6) /* short, word */
-#define MTU_GR2A (REG_BASE + 0x02A8) /* short, word */
-#define MTU_GR2B (REG_BASE + 0x02AA) /* short, word */
-
-/*MTU CHANNELS 3-4 SHARED*/
-#define MTU_TOER (REG_BASE + 0x020A) /* char, short, word */
-#define MTU_TOCR (REG_BASE + 0x020B) /* char, short, word */
-#define MTU_TGCR (REG_BASE + 0x020D) /* char, short, word */
-#define MTU_TCDR (REG_BASE + 0x0214) /* short, word */
-#define MTU_TDDR (REG_BASE + 0x0216) /* short, word */
-#define MTU_TCNTS (REG_BASE + 0x0220) /* short, word */
-#define MTU_TCBR (REG_BASE + 0x0222) /* short, word */
-
-/*MTU CHANNEL 3*/
-#define MTU_TCR3 (REG_BASE + 0x0200) /* char, short, word */
-#define MTU_TMDR3 (REG_BASE + 0x0202) /* char, short, word */
-#define MTU_TIORH3 (REG_BASE + 0x0204) /* char, short, word */
-#define MTU_TIORL3 (REG_BASE + 0x0205) /* char, short, word */
-#define MTU_TIER3 (REG_BASE + 0x0208) /* char, short, word */
-#define MTU_TSR3 (REG_BASE + 0x022C) /* char, short, word */
-#define MTU_TCNT3 (REG_BASE + 0x0210) /* short, word */
-#define MTU_GR3A (REG_BASE + 0x0218) /* short, word */
-#define MTU_GR3B (REG_BASE + 0x021A) /* short, word */
-#define MTU_GR3C (REG_BASE + 0x0224) /* short, word */
-#define MTU_GR3D (REG_BASE + 0x0226) /* short, word */
-
-/*MTU CHANNEL 4*/
-#define MTU_TCR4 (REG_BASE + 0x0201) /* char, short, word */
-#define MTU_TMDR4 (REG_BASE + 0x0203) /* char, short, word */
-#define MTU_TIOR4 (REG_BASE + 0x0206) /* char, short, word */
-#define MTU_TIORH4 (REG_BASE + 0x0206) /* char, short, word */
-#define MTU_TIORL4 (REG_BASE + 0x0207) /* char, short, word */
-#define MTU_TIER4 (REG_BASE + 0x0209) /* char, short, word */
-#define MTU_TSR4 (REG_BASE + 0x022D) /* char, short, word */
-#define MTU_TCNT4 (REG_BASE + 0x0212) /* short, word */
-#define MTU_GR4A (REG_BASE + 0x021C) /* short, word */
-#define MTU_GR4B (REG_BASE + 0x021E) /* short, word */
-#define MTU_GR4C (REG_BASE + 0x0228) /* short, word */
-#define MTU_GR4D (REG_BASE + 0x022A) /* short, word */
-
-/*DMAC CHANNELS 0-3 SHARED*/
-#define DMAOR (REG_BASE + 0x06B0) /* short */
-
-/*DMAC CHANNEL 0*/
-#define DMA_SAR0 (REG_BASE + 0x06C0) /* short, word */
-#define DMA_DAR0 (REG_BASE + 0x06C4) /* short, word */
-#define DMA_DMATCR0 (REG_BASE + 0x06C8) /* short, word */
-#define DMA_CHCR0 (REG_BASE + 0x06CC) /* short, word */
-
-/*DMAC CHANNEL 1*/
-#define DMA_SAR1 (REG_BASE + 0x06D0) /* short, word */
-#define DMA_DAR1 (REG_BASE + 0x06D4) /* short, word */
-#define DMA_DMATCR1 (REG_BASE + 0x06D8) /* short, wordt */
-#define DMA_CHCR1 (REG_BASE + 0x06DC) /* short, word */
-
-/*DMAC CHANNEL 3*/
-#define DMA_SAR3 (REG_BASE + 0x06E0) /* short, word */
-#define DMA_DAR3 (REG_BASE + 0x06E4) /* short, word */
-#define DMA_DMATCR3 (REG_BASE + 0x06E8) /* short, word */
-#define DMA_CHCR3 (REG_BASE + 0x06EC) /* short, word */
-
-/*DMAC CHANNEL 4*/
-#define DMA_SAR4 (REG_BASE + 0x06F0) /* short, word */
-#define DMA_DAR4 (REG_BASE + 0x06F4) /* short, word */
-#define DMA_DMATCR4 (REG_BASE + 0x06F8) /* short, word */
-#define DMA_CHCR4 (REG_BASE + 0x06FC) /* short, word */
-
-/*Data Transfer Controller*/
-#define DTC_DTEA (REG_BASE + 0x0700) /* char, short, word */
-#define DTC_DTEB (REG_BASE + 0x0701) /* char, short(?), word(?) */
-#define DTC_DTEC (REG_BASE + 0x0702) /* char, short(?), word(?) */
-#define DTC_DTED (REG_BASE + 0x0703) /* char, short(?), word(?) */
-#define DTC_DTEE (REG_BASE + 0x0704) /* char, short(?), word(?) */
-#define DTC_DTCSR (REG_BASE + 0x0706) /* char, short, word */
-#define DTC_DTBR (REG_BASE + 0x0708) /* short, word */
-
-/*Cache Memory*/
-#define CAC_CCR (REG_BASE + 0x0740) /* char, short, word */
-
-/*INTC*/
-#define INTC_IPRA (REG_BASE + 0x0348) /* char, short, word */
-#define INTC_IPRB (REG_BASE + 0x034A) /* char, short, word */
-#define INTC_IPRC (REG_BASE + 0x034C) /* char, short, word */
-#define INTC_IPRD (REG_BASE + 0x034E) /* char, short, word */
-#define INTC_IPRE (REG_BASE + 0x0350) /* char, short, word */
-#define INTC_IPRF (REG_BASE + 0x0352) /* char, short, word */
-#define INTC_IPRG (REG_BASE + 0x0354) /* char, short, word */
-#define INTC_IPRH (REG_BASE + 0x0356) /* char, short, word */
-#define INTC_ICR (REG_BASE + 0x0358) /* char, short, word */
-#define INTC_ISR (REG_BASE + 0x035A) /* char, short, word */
-
-/*Flash (F-ZTAT)*/
-#define FL_FLMCR1 (REG_BASE + 0x0580) /* Fl.Mem.Contr.Reg 1: char */
-#define FL_FLMCR2 (REG_BASE + 0x0581) /* Fl.Mem.Contr.Reg 2: char */
-#define FL_EBR1 (REG_BASE + 0x0582) /* Fl.Mem.Erase Blk.1: char */
-#define FL_EBR2 (REG_BASE + 0x0584) /* Fl.Mem.Erase Blk.2: char */
-#define FL_RAMER (REG_BASE + 0x0628) /* Ram Emul.Reg.- char,short,word */
-
-/*UBC*/
-#define UBC_BARH (REG_BASE + 0x0600) /* char, short, word */
-#define UBC_BARL (REG_BASE + 0x0602) /* char, short, word */
-#define UBC_BAMRH (REG_BASE + 0x0604) /* char, short, word */
-#define UBC_BAMRL (REG_BASE + 0x0606) /* char, short, word */
-#define UBC_BBR (REG_BASE + 0x0608) /* char, short, word */
-/*BSC*/
-#define BSC_BCR1 (REG_BASE + 0x0620) /* short */
-#define BSC_BCR2 (REG_BASE + 0x0622) /* short */
-#define BSC_WCR1 (REG_BASE + 0x0624) /* short */
-#define BSC_WCR2 (REG_BASE + 0x0626) /* short */
-#define BSC_DCR (REG_BASE + 0x062A) /* short */
-#define BSC_RTCSR (REG_BASE + 0x062C) /* short */
-#define BSC_RTCNT (REG_BASE + 0x062E) /* short */
-#define BSC_RTCOR (REG_BASE + 0x0630) /* short */
-
-/*WDT*/
-#define WDT_R_TCSR (REG_BASE + 0x0610) /* rd: char */
-#define WDT_R_TCNT (REG_BASE + 0x0611) /* rd: char */
-#define WDT_R_RSTCSR (REG_BASE + 0x0613) /* rd: char */
-#define WDT_W_TCSR (REG_BASE + 0x0610) /* wrt: short */
-#define WDT_W_TCNT (REG_BASE + 0x0610) /* wrt: short */
-#define WDT_W_RSTCSR (REG_BASE + 0x0612) /* wrt: short */
-
-/*POWER DOWN STATE*/
-#define PDT_SBYCR (REG_BASE + 0x0614) /* char */
-
-/* Port I/O Control Registers */
-#define IO_PADRH (REG_BASE + 0x0380) /* Port A Data Register */
-#define IO_PADRL (REG_BASE + 0x0382) /* Port A Data Register */
-#define IO_PBDR (REG_BASE + 0x0390) /* Port B Data Register */
-#define IO_PCDR (REG_BASE + 0x0392) /* Port C Data Register */
-#define IO_PDDRH (REG_BASE + 0x03A0) /* Port D Data Register */
-#define IO_PDDRL (REG_BASE + 0x03A2) /* Port D Data Register */
-#define IO_PEDR (REG_BASE + 0x03B0) /* Port E Data Register */
-#define IO_PFDR (REG_BASE + 0x03B2) /* Port F Data Register */
-
-/*Pin Function Control Register*/
-#define PFC_PAIORH (REG_BASE + 0x0384) /* Port A I/O Reg. H */
-#define PFC_PAIORL (REG_BASE + 0x0386) /* Port A I/O Reg. L */
-#define PFC_PACRH (REG_BASE + 0x0388) /* Port A Ctr. Reg. H */
-#define PFC_PACRL1 (REG_BASE + 0x038C) /* Port A Ctr. Reg. L1 */
-#define PFC_PACRL2 (REG_BASE + 0x038E) /* Port A Ctr. Reg. L2 */
-#define PFC_PBIOR (REG_BASE + 0x0394) /* Port B I/O Register */
-#define PFC_PBCR1 (REG_BASE + 0x0398) /* Port B Ctr. Reg. R1 */
-#define PFC_PBCR2 (REG_BASE + 0x039A) /* Port B Ctr. Reg. R2 */
-#define PFC_PCIOR (REG_BASE + 0x0396) /* Port C I/O Register */
-#define PFC_PCCR (REG_BASE + 0x039C) /* Port C Ctr. Reg. */
-#define PFC_PDIORH (REG_BASE + 0x03A4) /* Port D I/O Reg. H */
-#define PFC_PDIORL (REG_BASE + 0x03A6) /* Port D I/O Reg. L */
-#define PFC_PDCRH1 (REG_BASE + 0x03A8) /* Port D Ctr. Reg. H1 */
-#define PFC_PDCRH2 (REG_BASE + 0x03AA) /* Port D Ctr. Reg. H2 */
-#define PFC_PDCRL (REG_BASE + 0x03AC) /* Port D Ctr. Reg. L */
-#define PFC_PEIOR (REG_BASE + 0x03B4) /* Port E I/O Register */
-#define PFC_PECR1 (REG_BASE + 0x03B8) /* Port E Ctr. Reg. 1 */
-#define PFC_PECR2 (REG_BASE + 0x03BA) /* Port E Ctr. Reg. 2 */
-#define PFC_IFCR (REG_BASE + 0x03C8) /* short */
-
-/*Compare/Match Timer*/
-#define CMT_CMSTR (REG_BASE + 0x3D0) /* Start Reg. char, short, word */
-#define CMT_CMCSR0 (REG_BASE + 0x3D2) /* C0 SCR short, word */
-#define CMT_CMCNT0 (REG_BASE + 0x3D4) /* C0 Counter char, short, word */
-#define CMT_CMCOR0 (REG_BASE + 0x3D6) /* C0 Const.Reg. char, short, word */
-#define CMT_CMCSR1 (REG_BASE + 0x3D8) /* C1 SCR short, word */
-#define CMT_CMCNT1 (REG_BASE + 0x3DA) /* C1 Counter char, short, word */
-#define CMT_CMCOR1 (REG_BASE + 0x3DC) /* C1 Const.Reg. char, short, word */
-
-#endif
diff --git a/c/src/lib/libcpu/sh/sh7045/include/ispsh7045.h b/c/src/lib/libcpu/sh/sh7045/include/ispsh7045.h
deleted file mode 100644
index e711bb1a21..0000000000
--- a/c/src/lib/libcpu/sh/sh7045/include/ispsh7045.h
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
- * This include file contains information pertaining to the Hitachi SH
- * processor.
- *
- * Authors: Ralf Corsepius (corsepiu@faw.uni-ulm.de) and
- * Bernd Becker (becker@faw.uni-ulm.de)
- *
- * COPYRIGHT (c) 1997-1998, FAW Ulm, Germany
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- *
- * COPYRIGHT (c) 1998.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * Modified to reflect isp entries for sh7045 processor:
- * John M. Mills (jmills@tga.com)
- * TGA Technologies, Inc.
- * 100 Pinnacle Way, Suite 140
- * Norcross, GA 30071 U.S.A.
- *
- *
- * This modified file may be copied and distributed in accordance
- * the above-referenced license. It is provided for critique and
- * developmental purposes without any warranty nor representation
- * by the authors or by TGA Technologies.
- *
- * $Id$
- */
-
-#ifndef __CPU_ISPS_H
-#define __CPU_ISPS_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/shtypes.h>
-
-extern void __ISR_Handler( unsigned32 vector );
-
-
-/*
- * interrupt vector table offsets
- */
-#define NMI_ISP_V 11
-#define USB_ISP_V 12
-#define IRQ0_ISP_V 64
-#define IRQ1_ISP_V 65
-#define IRQ2_ISP_V 66
-#define IRQ3_ISP_V 67
-#define IRQ4_ISP_V 68
-#define IRQ5_ISP_V 69
-#define IRQ6_ISP_V 70
-#define IRQ7_ISP_V 71
-#define DMA0_ISP_V 72
-#define DMA1_ISP_V 76
-#define DMA2_ISP_V 80
-#define DMA3_ISP_V 84
-
-#define MTUA0_ISP_V 88
-#define MTUB0_ISP_V 89
-#define MTUC0_ISP_V 90
-#define MTUD0_ISP_V 91
-#define MTUV0_ISP_V 92
-
-#define MTUA1_ISP_V 96
-#define MTUB1_ISP_V 97
-#define MTUV1_ISP_V 100
-#define MTUU1_ISP_V 101
-
-#define MTUA2_ISP_V 104
-#define MTUB2_ISP_V 105
-#define MTUV2_ISP_V 108
-#define MTUU2_ISP_V 109
-
-#define MTUA3_ISP_V 112
-#define MTUB3_ISP_V 113
-#define MTUC3_ISP_V 114
-#define MTUD3_ISP_V 115
-#define MTUV3_ISP_V 116
-
-#define MTUA4_ISP_V 120
-#define MTUB4_ISP_V 121
-#define MTUC4_ISP_V 122
-#define MTUD4_ISP_V 123
-#define MTUV4_ISP_V 124
-
-#define ERI0_ISP_V 128
-#define RXI0_ISP_V 129
-#define TXI0_ISP_V 130
-#define TEI0_ISP_V 131
-
-#define ERI1_ISP_V 132
-#define RXI1_ISP_V 133
-#define TXI1_ISP_V 134
-#define TEI1_ISP_V 135
-
-#define ADI0_ISP_V 136
-#define ADI1_ISP_V 137
-#define DTC_ISP_V 140 /* Data Transfer Controller */
-#define CMT0_ISP_V 144 /* Compare Match Timer */
-#define CMT1_ISP_V 148
-#define WDT_ISP_V 152 /* Wtachdog Timer */
-#define CMI_ISP_V 153 /* BSC RAS interrupt */
-#define OEI_ISP_V 156 /* I/O Port */
-#define DREF_ISP_V CMI_ISP_V /* DRAM Refresh from BSC */
-#if 0
-#define PRT_ISP_V /* parity error - no equivalent */
-#endif
-
-/* dummy ISP */
-extern void _dummy_isp( void );
-
-/* Non Maskable Interrupt */
-extern void _nmi_isp( void );
-
-/* User Break Controller */
-extern void _usb_isp( void );
-
-/* External interrupts 0-7 */
-extern void _irq0_isp( void );
-extern void _irq1_isp( void );
-extern void _irq2_isp( void );
-extern void _irq3_isp( void );
-extern void _irq4_isp( void );
-extern void _irq5_isp( void );
-extern void _irq6_isp( void );
-extern void _irq7_isp( void );
-
-/* DMA - Controller */
-extern void _dma0_isp( void );
-extern void _dma1_isp( void );
-extern void _dma2_isp( void );
-extern void _dma3_isp( void );
-
-/* Interrupt Timer Unit */
-/* Timer 0 */
-extern void _mtua0_isp( void );
-extern void _mtub0_isp( void );
-extern void _mtuc0_isp( void );
-extern void _mtud0_isp( void );
-extern void _mtuv0_isp( void );
-/* Timer 1 */
-extern void _mtua1_isp( void );
-extern void _mtub1_isp( void );
-extern void _mtuv1_isp( void );
-extern void _mtuu1_isp( void );
-/* Timer 2 */
-extern void _mtua2_isp( void );
-extern void _mtub2_isp( void );
-extern void _mtuv2_isp( void );
-extern void _mtuu2_isp( void );
-/* Timer 3 */
-extern void _mtua3_isp( void );
-extern void _mtub3_isp( void );
-extern void _mtuc3_isp( void );
-extern void _mtud3_isp( void );
-extern void _mtuv3_isp( void );
-/* Timer 4 */
-extern void _mtua4_isp( void );
-extern void _mtub4_isp( void );
-extern void _mtuc4_isp( void );
-extern void _mtud4_isp( void );
-extern void _mtuv4_isp( void );
-
-/* serial interfaces */
-extern void _eri0_isp( void );
-extern void _rxi0_isp( void );
-extern void _txi0_isp( void );
-extern void _tei0_isp( void );
-extern void _eri1_isp( void );
-extern void _rxi1_isp( void );
-extern void _txi1_isp( void );
-extern void _tei1_isp( void );
-
-/* ADC */
-extern void _adi0_isp( void );
-extern void _adi1_isp( void );
-
-/* Data Transfer Controller */
-extern void _dtci_isp( void );
-
-/* Compare Match Timer */
-extern void _cmt0_isp( void );
-extern void _cmt1_isp( void );
-
-/* Watchdog Timer */
-extern void _wdt_isp( void );
-
-/* DRAM refresh control unit of bus state controller */
-extern void _bsc_isp( void );
-
-/* I/O Port */
-extern void _oei_isp( void );
-
-/* Parity Control Unit of the Bus State Controllers */
-/* extern void _prt_isp( void ); */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/c/src/lib/libcpu/sh/sh7045/score/cpu_asm.c b/c/src/lib/libcpu/sh/sh7045/score/cpu_asm.c
deleted file mode 100644
index 192c2f43d2..0000000000
--- a/c/src/lib/libcpu/sh/sh7045/score/cpu_asm.c
+++ /dev/null
@@ -1,318 +0,0 @@
-/*
- * This file contains the basic algorithms for all assembly code used
- * in an specific CPU port of RTEMS. These algorithms must be implemented
- * in assembly language
- *
- * NOTE: This port uses a C file with inline assembler instructions
- *
- * Authors: Ralf Corsepius (corsepiu@faw.uni-ulm.de) and
- * Bernd Becker (becker@faw.uni-ulm.de)
- *
- * COPYRIGHT (c) 1997-1998, FAW Ulm, Germany
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- *
- * COPYRIGHT (c) 1998.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- *
- * This material may be reproduced by or for the U.S. Government pursuant
- * to the copyright license under the clause at DFARS 252.227-7013. This
- * notice must appear in all copies of this file and its derivatives.
- *
- */
-
-/*
- * This is supposed to be an assembly file. This means that system.h
- * and cpu.h should not be included in a "real" cpu_asm file. An
- * implementation in assembly should include "cpu_asm.h"
- */
-
-#include <rtems/system.h>
-#include <rtems/score/cpu.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/sh.h>
-
-#if defined(sh7032)
-#include <rtems/score/ispsh7032.h>
-#include <rtems/score/iosh7032.h>
-#elif defined (sh7045)
-#include <rtems/score/ispsh7045.h>
-#include <rtems/score/iosh7045.h>
-#endif
-
-#include <rtems/score/sh_io.h>
-
-/* from cpu_isps.c */
-extern proc_ptr _Hardware_isr_Table[];
-
-#if( CPU_HAS_SOFTWARE_INTERRUPT_STACK == TRUE)
- unsigned long *_old_stack_ptr;
-#endif
-
-register unsigned long *stack_ptr asm("r15");
-
-/*
- * sh_set_irq_priority
- *
- * this function sets the interrupt level of the specified interrupt
- *
- * parameters:
- * - irq : interrupt number
- * - prio: priority to set for this interrupt number
- *
- * returns: 0 if ok
- * -1 on error
- */
-
-unsigned int sh_set_irq_priority(
- unsigned int irq,
- unsigned int prio )
-{
- unsigned32 shiftcount;
- unsigned32 prioreg;
- unsigned16 temp16;
- unsigned32 level;
-
- /*
- * first check for valid interrupt
- */
- if(( irq > 113) || (_Hardware_isr_Table[irq] == _dummy_isp))
- return -1;
- /*
- * check for valid irq priority
- */
- if( prio > 15 )
- return -1;
-
- /*
- * look up appropriate interrupt priority register
- */
- if( irq > 71)
- {
- irq = irq - 72;
- shiftcount = 12 - ((irq & ~0x03) % 16);
-
- switch( irq / 16)
- {
- case 0: { prioreg = INTC_IPRC; break;}
- case 1: { prioreg = INTC_IPRD; break;}
- case 2: { prioreg = INTC_IPRE; break;}
- default: return -1;
- }
- }
- else
- {
- shiftcount = 12 - 4 * ( irq % 4);
- if( irq > 67)
- prioreg = INTC_IPRB;
- else
- prioreg = INTC_IPRA;
- }
-
- /*
- * Set the interrupt priority register
- */
- _CPU_ISR_Disable( level );
-
- temp16 = read16( prioreg);
- temp16 &= ~( 15 << shiftcount);
- temp16 |= prio << shiftcount;
- write16( temp16, prioreg);
-
- _CPU_ISR_Enable( level );
-
- return 0;
-}
-
-/*
- * _CPU_Context_save_fp_context
- *
- * This routine is responsible for saving the FP context
- * at *fp_context_ptr. If the point to load the FP context
- * from is changed then the pointer is modified by this routine.
- *
- * Sometimes a macro implementation of this is in cpu.h which dereferences
- * the ** and a similarly named routine in this file is passed something
- * like a (Context_Control_fp *). The general rule on making this decision
- * is to avoid writing assembly language.
- */
-
-void _CPU_Context_save_fp(
- void **fp_context_ptr
-)
-{
-}
-
-/*
- * _CPU_Context_restore_fp_context
- *
- * This routine is responsible for restoring the FP context
- * at *fp_context_ptr. If the point to load the FP context
- * from is changed then the pointer is modified by this routine.
- *
- * Sometimes a macro implementation of this is in cpu.h which dereferences
- * the ** and a similarly named routine in this file is passed something
- * like a (Context_Control_fp *). The general rule on making this decision
- * is to avoid writing assembly language.
- */
-
-void _CPU_Context_restore_fp(
- void **fp_context_ptr
-)
-{
-}
-
-/* _CPU_Context_switch
- *
- * This routine performs a normal non-FP context switch.
- */
-
-/* within __CPU_Context_switch:
- * _CPU_Context_switch
- * _CPU_Context_restore
- *
- * This routine is generally used only to restart self in an
- * efficient manner. It may simply be a label in _CPU_Context_switch.
- *
- * NOTE: It should be safe not to store r4, r5
- *
- * NOTE: It is doubtful if r0 is really needed to be stored
- *
- * NOTE: gbr is added, but should not be necessary, as it is
- * only used globally in this port.
- */
-
-/*
- * FIXME: This is an ugly hack, but we wanted to avoid recalculating
- * the offset each time Context_Control is changed
- */
-void __CPU_Context_switch(
- Context_Control *run, /* r4 */
- Context_Control *heir /* r5 */
-)
-{
-
-asm volatile("
- .global __CPU_Context_switch
-__CPU_Context_switch:
-
- add %0,r4
-
- stc.l sr,@-r4
- stc.l gbr,@-r4
- mov.l r0,@-r4
- mov.l r1,@-r4
- mov.l r2,@-r4
- mov.l r3,@-r4
-
- mov.l r6,@-r4
- mov.l r7,@-r4
- mov.l r8,@-r4
- mov.l r9,@-r4
- mov.l r10,@-r4
- mov.l r11,@-r4
- mov.l r12,@-r4
- mov.l r13,@-r4
- mov.l r14,@-r4
- sts.l pr,@-r4
- sts.l mach,@-r4
- sts.l macl,@-r4
- mov.l r15,@-r4
-
- mov r5, r4"
- :: "I" (sizeof(Context_Control))
- );
-
- asm volatile("
- .global __CPU_Context_restore
-__CPU_Context_restore:
- mov.l @r4+,r15
- lds.l @r4+,macl
- lds.l @r4+,mach
- lds.l @r4+,pr
- mov.l @r4+,r14
- mov.l @r4+,r13
- mov.l @r4+,r12
- mov.l @r4+,r11
- mov.l @r4+,r10
- mov.l @r4+,r9
- mov.l @r4+,r8
- mov.l @r4+,r7
- mov.l @r4+,r6
-
- mov.l @r4+,r3
- mov.l @r4+,r2
- mov.l @r4+,r1
- mov.l @r4+,r0
- ldc.l @r4+,gbr
- ldc.l @r4+,sr
-
- rts
- nop" );
-}
-
-/*
- * This routine provides the RTEMS interrupt management.
- */
-
-void __ISR_Handler( unsigned32 vector)
-{
- register unsigned32 level;
-
- _CPU_ISR_Disable( level );
-
- _Thread_Dispatch_disable_level++;
-
-#if( CPU_HAS_SOFTWARE_INTERRUPT_STACK == TRUE)
- if( _ISR_Nest_level == 0 )
- {
- /* Install irq stack */
- _old_stack_ptr = stack_ptr;
- stack_ptr = _CPU_Interrupt_stack_high;
- }
-
-#endif
-
- _ISR_Nest_level++;
-
- _CPU_ISR_Enable( level );
-
- /* call isp */
- if( _ISR_Vector_table[ vector])
- (*_ISR_Vector_table[ vector ])( vector );
-
- _CPU_ISR_Disable( level );
-
- _ISR_Nest_level--;
-
-#if( CPU_HAS_SOFTWARE_INTERRUPT_STACK == TRUE)
-
- if( _ISR_Nest_level == 0 )
- /* restore old stack pointer */
- stack_ptr = _old_stack_ptr;
-#endif
-
- _Thread_Dispatch_disable_level--;
-
- _CPU_ISR_Enable( level );
-
- if ( _Thread_Dispatch_disable_level == 0 )
- {
- if(( _Context_Switch_necessary) || (! _ISR_Signals_to_thread_executing))
- {
- _ISR_Signals_to_thread_executing = FALSE;
- _Thread_Dispatch();
- }
- }
-}
diff --git a/c/src/lib/libcpu/sh/sh7045/score/ispsh7045.c b/c/src/lib/libcpu/sh/sh7045/score/ispsh7045.c
deleted file mode 100644
index 4009ea152a..0000000000
--- a/c/src/lib/libcpu/sh/sh7045/score/ispsh7045.c
+++ /dev/null
@@ -1,315 +0,0 @@
-/*
- * This file contains the isp frames for the user interrupts.
- * From these procedures __ISR_Handler is called with the vector number
- * as argument.
- *
- * __ISR_Handler is kept in a separate file (cpu_asm.c), because a bug in
- * some releases of gcc doesn't properly handle #pragma interrupt, if a
- * file contains both isrs and normal functions.
- *
- * Authors: Ralf Corsepius (corsepiu@faw.uni-ulm.de) and
- * Bernd Becker (becker@faw.uni-ulm.de)
- *
- * COPYRIGHT (c) 1997-1998, FAW Ulm, Germany
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
- *
- *
- * COPYRIGHT (c) 1998.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * Modified to reflect isp entries for sh7045 processor:
- * John M. Mills (jmills@tga.com)
- * TGA Technologies, Inc.
- * 100 Pinnacle Way, Suite 140
- * Norcross, GA 30071 U.S.A.
- * August, 1999
- *
- * This modified file may be copied and distributed in accordance
- * the above-referenced license. It is provided for critique and
- * developmental purposes without any warranty nor representation
- * by the authors or by TGA Technologies.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/shtypes.h>
-
-#if !defined (sh7045)
-#error Wrong CPU MODEL
-#endif
-
-/*
- * This is a exception vector table
- *
- * It has the same structure as the actual vector table (vectab)
- */
-
-
-/* SH-2 ISR Table */
-#include <rtems/score/ispsh7045.h>
-
-proc_ptr _Hardware_isr_Table[256]={
-_dummy_isp, _dummy_isp, _dummy_isp, _dummy_isp, /* PWRon Reset, Maual Reset,...*/
-_dummy_isp, _dummy_isp, _dummy_isp, _dummy_isp,
-_dummy_isp, _dummy_isp, _dummy_isp,
-_nmi_isp, _usb_isp, /* irq 11, 12*/
-_dummy_isp, _dummy_isp, _dummy_isp, _dummy_isp,
-_dummy_isp, _dummy_isp, _dummy_isp, _dummy_isp,
-_dummy_isp, _dummy_isp, _dummy_isp, _dummy_isp,
-_dummy_isp, _dummy_isp, _dummy_isp, _dummy_isp,
-_dummy_isp, _dummy_isp, _dummy_isp,
-/* trapa 0 -31 */
-_dummy_isp, _dummy_isp, _dummy_isp, _dummy_isp,
-_dummy_isp, _dummy_isp, _dummy_isp, _dummy_isp,
-_dummy_isp, _dummy_isp, _dummy_isp, _dummy_isp,
-_dummy_isp, _dummy_isp, _dummy_isp, _dummy_isp,
-_dummy_isp, _dummy_isp, _dummy_isp, _dummy_isp,
-_dummy_isp, _dummy_isp, _dummy_isp, _dummy_isp,
-_dummy_isp, _dummy_isp, _dummy_isp, _dummy_isp,
-_dummy_isp, _dummy_isp, _dummy_isp, _dummy_isp,
-_irq0_isp, _irq1_isp, _irq2_isp, _irq3_isp, /* external H/W: irq 64-71 */
-_irq4_isp, _irq5_isp, _irq6_isp, _irq7_isp,
-_dma0_isp, _dummy_isp, _dummy_isp, _dummy_isp, /* DMAC: irq 72-87*/
-_dma1_isp, _dummy_isp, _dummy_isp, _dummy_isp,
-_dma2_isp, _dummy_isp, _dummy_isp, _dummy_isp,
-_dma3_isp, _dummy_isp, _dummy_isp, _dummy_isp,
-_mtua0_isp, _mtub0_isp, _mtuc0_isp, _mtud0_isp, /* MTUs: irq 88-127 */
-_mtuv0_isp, _dummy_isp, _dummy_isp, _dummy_isp,
-_mtua1_isp, _mtub1_isp, _dummy_isp, _dummy_isp,
-_mtuv1_isp, _mtuu1_isp, _dummy_isp, _dummy_isp,
-_mtua2_isp, _mtub2_isp, _dummy_isp, _dummy_isp,
-_mtuv2_isp, _mtuu2_isp, _dummy_isp, _dummy_isp,
-_mtua3_isp, _mtub3_isp, _mtuc3_isp, _mtud3_isp,
-_mtuv3_isp, _dummy_isp, _dummy_isp, _dummy_isp,
-_mtua4_isp, _mtub4_isp, _mtuc4_isp, _mtud4_isp,
-_mtuv4_isp, _dummy_isp, _dummy_isp, _dummy_isp,
-_eri0_isp, _rxi0_isp, _txi0_isp, _tei0_isp, /* SCI0-1: irq 128-135*/
-_eri1_isp, _rxi1_isp, _txi1_isp, _tei1_isp,
-_adi0_isp, _adi1_isp, _dummy_isp, _dummy_isp, /* ADC0-1: irq 136-139*/
-_dtci_isp, _dummy_isp, _dummy_isp, _dummy_isp, /* DTU: irq 140-143 */
-_cmt0_isp, _dummy_isp, _dummy_isp, _dummy_isp, /* CMT0-1: irq 144-151 */
-_cmt1_isp, _dummy_isp, _dummy_isp, _dummy_isp,
-_wdt_isp, /* WDT: irq 152*/
-_bsc_isp, _dummy_isp, _dummy_isp, /* BSC: irq 153-155*/
-_oei_isp, /* I/O Port: irq 156*/
-};
-
-#define Str(a)#a
-
-/*
- * Some versions of gcc and all version of egcs at least until egcs-1.1b
- * are not able to handle #pragma interrupt correctly if more than 1 isr is
- * contained in a file and when optimizing.
- * We try to work around this problem by using the macro below.
- */
-#define isp( name, number, func)\
-asm (".global _"Str(name)"\n\t" \
- "_"Str(name)": \n\t" \
- " mov.l r0,@-r15 \n\t" \
- " mov.l r1,@-r15 \n\t" \
- " mov.l r2,@-r15 \n\t" \
- " mov.l r3,@-r15 \n\t" \
- " mov.l r4,@-r15 \n\t" \
- " mov.l r5,@-r15 \n\t" \
- " mov.l r6,@-r15 \n\t" \
- " mov.l r7,@-r15 \n\t" \
- " mov.l r14,@-r15 \n\t" \
- " sts.l pr,@-r15 \n\t" \
- " sts.l mach,@-r15 \n\t" \
- " sts.l macl,@-r15 \n\t" \
- " mov r15,r14 \n\t" \
- " mov.l "Str(name)"_k, r1\n\t" \
- " jsr @r1 \n\t" \
- " mov #"Str(number)", r4\n\t" \
- " mov r14,r15 \n\t" \
- " lds.l @r15+,macl \n\t" \
- " lds.l @r15+,mach \n\t" \
- " lds.l @r15+,pr \n\t" \
- " mov.l @r15+,r14 \n\t" \
- " mov.l @r15+,r7 \n\t" \
- " mov.l @r15+,r6 \n\t" \
- " mov.l @r15+,r5 \n\t" \
- " mov.l @r15+,r4 \n\t" \
- " mov.l @r15+,r3 \n\t" \
- " mov.l @r15+,r2 \n\t" \
- " mov.l @r15+,r1 \n\t" \
- " mov.l @r15+,r0 \n\t" \
- " rte \n\t" \
- " nop \n\t" \
- " .align 2 \n\t" \
- #name"_k: \n\t" \
- ".long "Str(func));
-
-/************************************************
- * Dummy interrupt service procedure for
- * interrupts being not allowed --> Trap 34
- ************************************************/
-asm(" .section .text
-.global __dummy_isp
-__dummy_isp:
- mov.l r14,@-r15
- mov r15, r14
- trapa #34
- mov.l @r15+,r14
- rte
- nop");
-
-/*******************************************************************
- * ISP Vector Table for sh7045 family of processors *
- *******************************************************************/
-
-
-/*****************************
- * Non maskable interrupt
- *****************************/
-isp( _nmi_isp, NMI_ISP_V, ___ISR_Handler);
-
-/*****************************
- * User break controller
- *****************************/
-isp( _usb_isp, USB_ISP_V, ___ISR_Handler);
-
-/*****************************
- * External interrupts 0-7
- *****************************/
-isp( _irq0_isp, IRQ0_ISP_V, ___ISR_Handler);
-isp( _irq1_isp, IRQ1_ISP_V, ___ISR_Handler);
-isp( _irq2_isp, IRQ2_ISP_V, ___ISR_Handler);
-isp( _irq3_isp, IRQ3_ISP_V, ___ISR_Handler);
-isp( _irq4_isp, IRQ4_ISP_V, ___ISR_Handler);
-isp( _irq5_isp, IRQ5_ISP_V, ___ISR_Handler);
-isp( _irq6_isp, IRQ6_ISP_V, ___ISR_Handler);
-isp( _irq7_isp, IRQ7_ISP_V, ___ISR_Handler);
-
-/*****************************
- * DMA - controller
- *****************************/
-isp( _dma0_isp, DMA0_ISP_V, ___ISR_Handler);
-isp( _dma1_isp, DMA1_ISP_V, ___ISR_Handler);
-isp( _dma2_isp, DMA2_ISP_V, ___ISR_Handler);
-isp( _dma3_isp, DMA3_ISP_V, ___ISR_Handler);
-
-
-/*****************************
- * Match timer unit
- *****************************/
-
-/*****************************
- * Timer 0
- *****************************/
-isp( _mtua0_isp, MTUA0_ISP_V, ___ISR_Handler);
-isp( _mtub0_isp, MTUB0_ISP_V, ___ISR_Handler);
-isp( _mtuc0_isp, MTUC0_ISP_V, ___ISR_Handler);
-isp( _mtud0_isp, MTUD0_ISP_V, ___ISR_Handler);
-isp( _mtuv0_isp, MTUV0_ISP_V, ___ISR_Handler);
-
-/*****************************
- * Timer 1
- *****************************/
-isp( _mtua1_isp, MTUA1_ISP_V, ___ISR_Handler);
-isp( _mtub1_isp, MTUB1_ISP_V, ___ISR_Handler);
-isp( _mtuv1_isp, MTUV1_ISP_V, ___ISR_Handler);
-isp( _mtuu1_isp, MTUU1_ISP_V, ___ISR_Handler);
-
-/*****************************
- * Timer 2
- *****************************/
-isp( _mtua2_isp, MTUA2_ISP_V, ___ISR_Handler);
-isp( _mtub2_isp, MTUB2_ISP_V, ___ISR_Handler);
-isp( _mtuv2_isp, MTUV2_ISP_V, ___ISR_Handler);
-isp( _mtuu2_isp, MTUU2_ISP_V, ___ISR_Handler);
-
-/*****************************
- * Timer 3
- *****************************/
-isp( _mtua3_isp, MTUA3_ISP_V, ___ISR_Handler);
-isp( _mtub3_isp, MTUB3_ISP_V, ___ISR_Handler);
-isp( _mtuc3_isp, MTUC3_ISP_V, ___ISR_Handler);
-isp( _mtud3_isp, MTUD3_ISP_V, ___ISR_Handler);
-isp( _mtuv3_isp, MTUV3_ISP_V, ___ISR_Handler);
-
-/*****************************
- * Timer 4
- *****************************/
-isp( _mtua4_isp, MTUA4_ISP_V, ___ISR_Handler);
-isp( _mtub4_isp, MTUB4_ISP_V, ___ISR_Handler);
-isp( _mtuc4_isp, MTUC4_ISP_V, ___ISR_Handler);
-isp( _mtud4_isp, MTUD4_ISP_V, ___ISR_Handler);
-isp( _mtuv4_isp, MTUV4_ISP_V, ___ISR_Handler);
-
-
-/*****************************
- * Serial interfaces
- *****************************/
-
-/*****************************
- * Serial interface 0
- *****************************/
-isp( _eri0_isp, ERI0_ISP_V, ___ISR_Handler);
-isp( _rxi0_isp, RXI0_ISP_V, ___ISR_Handler);
-isp( _txi0_isp, TXI0_ISP_V, ___ISR_Handler);
-isp( _tei0_isp, TEI0_ISP_V, ___ISR_Handler);
-
-/*****************************
- * Serial interface 1
- *****************************/
-isp( _eri1_isp, ERI1_ISP_V, ___ISR_Handler);
-isp( _rxi1_isp, RXI1_ISP_V, ___ISR_Handler);
-isp( _txi1_isp, TXI1_ISP_V, ___ISR_Handler);
-isp( _tei1_isp, TEI1_ISP_V, ___ISR_Handler);
-
-
-/******************************
- * A/D converters
- * ADC0-1
- ******************************/
-isp( _adi0_isp, ADI0_ISP_V, ___ISR_Handler);
-isp( _adi1_isp, ADI1_ISP_V, ___ISR_Handler);
-
-
-/******************************
- * Data transfer controller
- ******************************/
-isp( _dtci_isp, DTC_ISP_V, ___ISR_Handler);
-
-
-/******************************
- * Counter match timer
- ******************************/
-isp( _cmt0_isp, CMT0_ISP_V, ___ISR_Handler);
-isp( _cmt1_isp, CMT1_ISP_V, ___ISR_Handler);
-
-
-/******************************
- * Watchdog timer
- ******************************/
-isp( _wdt_isp, WDT_ISP_V, ___ISR_Handler);
-
-
-/******************************
- * DRAM refresh control unit
- * of bus state controller
- ******************************/
-isp( _bsc_isp, CMI_ISP_V, ___ISR_Handler);
-
-/******************************
- * I/O port
- ******************************/
-isp( _oei_isp, OEI_ISP_V, ___ISR_Handler);
-
-
-/*****************************
- * Parity control unit of
- * the bus state controller
- * NOT PROVIDED IN SH-2
- *****************************/
-/* isp( _prt_isp, PRT_ISP_V, ___ISR_Handler); */
diff --git a/c/src/lib/libcpu/sparc/include/erc32.h b/c/src/lib/libcpu/sparc/include/erc32.h
deleted file mode 100644
index 0d2e23da01..0000000000
--- a/c/src/lib/libcpu/sparc/include/erc32.h
+++ /dev/null
@@ -1,520 +0,0 @@
-/* erc32.h
- *
- * This include file contains information pertaining to the ERC32.
- * The ERC32 is a custom SPARC V7 implementation based on the Cypress
- * 601/602 chipset. This CPU has a number of on-board peripherals and
- * was developed by the European Space Agency to target space applications.
- *
- * NOTE: Other than where absolutely required, this version currently
- * supports only the peripherals and bits used by the basic board
- * support package. This includes at least significant pieces of
- * the following items:
- *
- * + UART Channels A and B
- * + General Purpose Timer
- * + Real Time Clock
- * + Watchdog Timer (so it can be disabled)
- * + Control Register (so powerdown mode can be enabled)
- * + Memory Control Register
- * + Interrupt Control
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * Ported to ERC32 implementation of the SPARC by On-Line Applications
- * Research Corporation (OAR) under contract to the European Space
- * Agency (ESA).
- *
- * ERC32 modifications of respective RTEMS file: COPYRIGHT (c) 1995.
- * European Space Agency.
- *
- * $Id$
- */
-
-#ifndef _INCLUDE_ERC32_h
-#define _INCLUDE_ERC32_h
-
-#include <rtems/score/sparc.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Interrupt Sources
- *
- * The interrupt source numbers directly map to the trap type and to
- * the bits used in the Interrupt Clear, Interrupt Force, Interrupt Mask,
- * and the Interrupt Pending Registers.
- */
-
-#define ERC32_INTERRUPT_MASKED_ERRORS 1
-#define ERC32_INTERRUPT_EXTERNAL_1 2
-#define ERC32_INTERRUPT_EXTERNAL_2 3
-#define ERC32_INTERRUPT_UART_A_RX_TX 4
-#define ERC32_INTERRUPT_UART_B_RX_TX 5
-#define ERC32_INTERRUPT_CORRECTABLE_MEMORY_ERROR 6
-#define ERC32_INTERRUPT_UART_ERROR 7
-#define ERC32_INTERRUPT_DMA_ACCESS_ERROR 8
-#define ERC32_INTERRUPT_DMA_TIMEOUT 9
-#define ERC32_INTERRUPT_EXTERNAL_3 10
-#define ERC32_INTERRUPT_EXTERNAL_4 11
-#define ERC32_INTERRUPT_GENERAL_PURPOSE_TIMER 12
-#define ERC32_INTERRUPT_REAL_TIME_CLOCK 13
-#define ERC32_INTERRUPT_EXTERNAL_5 14
-#define ERC32_INTERRUPT_WATCHDOG_TIMEOUT 15
-
-#ifndef ASM
-
-/*
- * Trap Types for on-chip peripherals
- *
- * Source: Table 8 - Interrupt Trap Type and Default Priority Assignments
- *
- * NOTE: The priority level for each source corresponds to the least
- * significant nibble of the trap type.
- */
-
-#define ERC32_TRAP_TYPE( _source ) SPARC_ASYNCHRONOUS_TRAP((_source) + 0x10)
-
-#define ERC32_TRAP_SOURCE( _trap ) ((_trap) - 0x10)
-
-#define ERC32_Is_MEC_Trap( _trap ) \
- ( (_trap) >= ERC32_TRAP_TYPE( ERC32_INTERRUPT_MASKED_ERRORS ) && \
- (_trap) <= ERC32_TRAP_TYPE( ERC32_INTERRUPT_WATCHDOG_TIMEOUT ) )
-
-/*
- * Structure for ERC32 memory mapped registers.
- *
- * Source: Section 3.25.2 - Register Address Map
- *
- * NOTE: There is only one of these structures per CPU, its base address
- * is 0x01f80000, and the variable MEC is placed there by the
- * linkcmds file.
- */
-
-typedef struct {
- volatile unsigned32 Control; /* offset 0x00 */
- volatile unsigned32 Software_Reset; /* offset 0x04 */
- volatile unsigned32 Power_Down; /* offset 0x08 */
- volatile unsigned32 Unimplemented_0; /* offset 0x0c */
- volatile unsigned32 Memory_Configuration; /* offset 0x10 */
- volatile unsigned32 IO_Configuration; /* offset 0x14 */
- volatile unsigned32 Wait_State_Configuration; /* offset 0x18 */
- volatile unsigned32 Unimplemented_1; /* offset 0x1c */
- volatile unsigned32 Memory_Access_0; /* offset 0x20 */
- volatile unsigned32 Memory_Access_1; /* offset 0x24 */
- volatile unsigned32 Unimplemented_2[ 7 ]; /* offset 0x28 */
- volatile unsigned32 Interrupt_Shape; /* offset 0x44 */
- volatile unsigned32 Interrupt_Pending; /* offset 0x48 */
- volatile unsigned32 Interrupt_Mask; /* offset 0x4c */
- volatile unsigned32 Interrupt_Clear; /* offset 0x50 */
- volatile unsigned32 Interrupt_Force; /* offset 0x54 */
- volatile unsigned32 Unimplemented_3[ 2 ]; /* offset 0x58 */
- /* offset 0x60 */
- volatile unsigned32 Watchdog_Program_and_Timeout_Acknowledge;
- volatile unsigned32 Watchdog_Trap_Door_Set; /* offset 0x64 */
- volatile unsigned32 Unimplemented_4[ 6 ]; /* offset 0x68 */
- volatile unsigned32 Real_Time_Clock_Counter; /* offset 0x80 */
- volatile unsigned32 Real_Time_Clock_Scalar; /* offset 0x84 */
- volatile unsigned32 General_Purpose_Timer_Counter; /* offset 0x88 */
- volatile unsigned32 General_Purpose_Timer_Scalar; /* offset 0x8c */
- volatile unsigned32 Unimplemented_5[ 2 ]; /* offset 0x90 */
- volatile unsigned32 Timer_Control; /* offset 0x98 */
- volatile unsigned32 Unimplemented_6; /* offset 0x9c */
- volatile unsigned32 System_Fault_Status; /* offset 0xa0 */
- volatile unsigned32 First_Failing_Address; /* offset 0xa4 */
- volatile unsigned32 First_Failing_Data; /* offset 0xa8 */
- volatile unsigned32 First_Failing_Syndrome_and_Check_Bits;/* offset 0xac */
- volatile unsigned32 Error_and_Reset_Status; /* offset 0xb0 */
- volatile unsigned32 Error_Mask; /* offset 0xb4 */
- volatile unsigned32 Unimplemented_7[ 2 ]; /* offset 0xb8 */
- volatile unsigned32 Debug_Control; /* offset 0xc0 */
- volatile unsigned32 Breakpoint; /* offset 0xc4 */
- volatile unsigned32 Watchpoint; /* offset 0xc8 */
- volatile unsigned32 Unimplemented_8; /* offset 0xcc */
- volatile unsigned32 Test_Control; /* offset 0xd0 */
- volatile unsigned32 Test_Data; /* offset 0xd4 */
- volatile unsigned32 Unimplemented_9[ 2 ]; /* offset 0xd8 */
- volatile unsigned32 UART_Channel_A; /* offset 0xe0 */
- volatile unsigned32 UART_Channel_B; /* offset 0xe4 */
- volatile unsigned32 UART_Status; /* offset 0xe8 */
-} ERC32_Register_Map;
-
-#endif
-
-/*
- * The following constants are intended to be used ONLY in assembly
- * language files.
- *
- * NOTE: The intended style of usage is to load the address of MEC
- * into a register and then use these as displacements from
- * that register.
- */
-
-#ifdef ASM
-
-#define ERC32_MEC_CONTROL_OFFSET 0x00
-#define ERC32_MEC_SOFTWARE_RESET_OFFSET 0x04
-#define ERC32_MEC_POWER_DOWN_OFFSET 0x08
-#define ERC32_MEC_UNIMPLEMENTED_0_OFFSET 0x0C
-#define ERC32_MEC_MEMORY_CONFIGURATION_OFFSET 0x10
-#define ERC32_MEC_IO_CONFIGURATION_OFFSET 0x14
-#define ERC32_MEC_WAIT_STATE_CONFIGURATION_OFFSET 0x18
-#define ERC32_MEC_UNIMPLEMENTED_1_OFFSET 0x1C
-#define ERC32_MEC_MEMORY_ACCESS_0_OFFSET 0x20
-#define ERC32_MEC_MEMORY_ACCESS_1_OFFSET 0x24
-#define ERC32_MEC_UNIMPLEMENTED_2_OFFSET 0x28
-#define ERC32_MEC_INTERRUPT_SHAPE_OFFSET 0x44
-#define ERC32_MEC_INTERRUPT_PENDING_OFFSET 0x48
-#define ERC32_MEC_INTERRUPT_MASK_OFFSET 0x4C
-#define ERC32_MEC_INTERRUPT_CLEAR_OFFSET 0x50
-#define ERC32_MEC_INTERRUPT_FORCE_OFFSET 0x54
-#define ERC32_MEC_UNIMPLEMENTED_3_OFFSET 0x58
-#define ERC32_MEC_WATCHDOG_PROGRAM_AND_TIMEOUT_ACKNOWLEDGE_OFFSET 0x60
-#define ERC32_MEC_WATCHDOG_TRAP_DOOR_SET_OFFSET 0x64
-#define ERC32_MEC_UNIMPLEMENTED_4_OFFSET 0x6C
-#define ERC32_MEC_REAL_TIME_CLOCK_COUNTER_OFFSET 0x80
-#define ERC32_MEC_REAL_TIME_CLOCK_SCALAR_OFFSET 0x84
-#define ERC32_MEC_GENERAL_PURPOSE_TIMER_COUNTER_OFFSET 0x88
-#define ERC32_MEC_GENERAL_PURPOSE_TIMER_SCALAR_OFFSET 0x8C
-#define ERC32_MEC_UNIMPLEMENTED_5_OFFSET 0x90
-#define ERC32_MEC_TIMER_CONTROL_OFFSET 0x98
-#define ERC32_MEC_UNIMPLEMENTED_6_OFFSET 0x9C
-#define ERC32_MEC_SYSTEM_FAULT_STATUS_OFFSET 0xA0
-#define ERC32_MEC_FIRST_FAILING_ADDRESS_OFFSET 0xA4
-#define ERC32_MEC_FIRST_FAILING_DATA_OFFSET 0xA8
-#define ERC32_MEC_FIRST_FAILING_SYNDROME_AND_CHECK_BITS_OFFSET 0xAC
-#define ERC32_MEC_ERROR_AND_RESET_STATUS_OFFSET 0xB0
-#define ERC32_MEC_ERROR_MASK_OFFSET 0xB4
-#define ERC32_MEC_UNIMPLEMENTED_7_OFFSET 0xB8
-#define ERC32_MEC_DEBUG_CONTROL_OFFSET 0xC0
-#define ERC32_MEC_BREAKPOINT_OFFSET 0xC4
-#define ERC32_MEC_WATCHPOINT_OFFSET 0xC8
-#define ERC32_MEC_UNIMPLEMENTED_8_OFFSET 0xCC
-#define ERC32_MEC_TEST_CONTROL_OFFSET 0xD0
-#define ERC32_MEC_TEST_DATA_OFFSET 0xD4
-#define ERC32_MEC_UNIMPLEMENTED_9_OFFSET 0xD8
-#define ERC32_MEC_UART_CHANNEL_A_OFFSET 0xE0
-#define ERC32_MEC_UART_CHANNEL_B_OFFSET 0xE4
-#define ERC32_MEC_UART_STATUS_OFFSET 0xE8
-
-#endif
-
-/*
- * The following defines the bits in the Configuration Register.
- */
-
-#define ERC32_CONFIGURATION_POWER_DOWN_MASK 0x00000001
-#define ERC32_CONFIGURATION_POWER_DOWN_ALLOWED 0x00000001
-#define ERC32_CONFIGURATION_POWER_DOWN_DISABLED 0x00000000
-
-#define ERC32_CONFIGURATION_SOFTWARE_RESET_MASK 0x00000002
-#define ERC32_CONFIGURATION_SOFTWARE_RESET_ALLOWED 0x00000002
-#define ERC32_CONFIGURATION_SOFTWARE_RESET_DISABLED 0x00000000
-
-#define ERC32_CONFIGURATION_BUS_TIMEOUT_MASK 0x00000004
-#define ERC32_CONFIGURATION_BUS_TIMEOUT_ENABLED 0x00000004
-#define ERC32_CONFIGURATION_BUS_TIMEOUT_DISABLED 0x00000000
-
-#define ERC32_CONFIGURATION_ACCESS_PROTECTION_MASK 0x00000008
-#define ERC32_CONFIGURATION_ACCESS_PROTECTION_ENABLED 0x00000008
-#define ERC32_CONFIGURATION_ACCESS_PROTECTION_DISABLED 0x00000000
-
-
-/*
- * The following defines the bits in the Memory Configuration Register.
- */
-
-#define ERC32_MEMORY_CONFIGURATION_RAM_SIZE_MASK 0x00001C00
-#define ERC32_MEMORY_CONFIGURATION_RAM_SIZE_256K ( 0 << 10 )
-#define ERC32_MEMORY_CONFIGURATION_RAM_SIZE_512K ( 1 << 10 )
-#define ERC32_MEMORY_CONFIGURATION_RAM_SIZE_1MB ( 2 << 10 )
-#define ERC32_MEMORY_CONFIGURATION_RAM_SIZE_2MB ( 3 << 10 )
-#define ERC32_MEMORY_CONFIGURATION_RAM_SIZE_4MB ( 4 << 10 )
-#define ERC32_MEMORY_CONFIGURATION_RAM_SIZE_8MB ( 5 << 10 )
-#define ERC32_MEMORY_CONFIGURATION_RAM_SIZE_16MB ( 6 << 10 )
-#define ERC32_MEMORY_CONFIGURATION_RAM_SIZE_32MB ( 7 << 10 )
-
-#define ERC32_MEMORY_CONFIGURATION_PROM_SIZE_MASK 0x001C0000
-#define ERC32_MEMORY_CONFIGURATION_PROM_SIZE_128K ( 0 << 18 )
-#define ERC32_MEMORY_CONFIGURATION_PROM_SIZE_256K ( 1 << 18 )
-#define ERC32_MEMORY_CONFIGURATION_PROM_SIZE_512K ( 2 << 18 )
-#define ERC32_MEMORY_CONFIGURATION_PROM_SIZE_1M ( 3 << 18 )
-#define ERC32_MEMORY_CONFIGURATION_PROM_SIZE_2M ( 4 << 18 )
-#define ERC32_MEMORY_CONFIGURATION_PROM_SIZE_4M ( 5 << 18 )
-#define ERC32_MEMORY_CONFIGURATION_PROM_SIZE_8M ( 6 << 18 )
-#define ERC32_MEMORY_CONFIGURATION_PROM_SIZE_16M ( 7 << 18 )
-
-/*
- * The following defines the bits in the Timer Control Register.
- */
-
-#define ERC32_MEC_TIMER_CONTROL_GCR 0x00000001 /* 1 = reload at 0 */
- /* 0 = stop at 0 */
-#define ERC32_MEC_TIMER_CONTROL_GCL 0x00000002 /* 1 = load and start */
- /* 0 = no function */
-#define ERC32_MEC_TIMER_CONTROL_GSE 0x00000004 /* 1 = enable counting */
- /* 0 = hold scalar and counter */
-#define ERC32_MEC_TIMER_CONTROL_GSL 0x00000008 /* 1 = load scalar and start */
- /* 0 = no function */
-
-#define ERC32_MEC_TIMER_CONTROL_RTCCR 0x00000100 /* 1 = reload at 0 */
- /* 0 = stop at 0 */
-#define ERC32_MEC_TIMER_CONTROL_RTCCL 0x00000200 /* 1 = load and start */
- /* 0 = no function */
-#define ERC32_MEC_TIMER_CONTROL_RTCSE 0x00000400 /* 1 = enable counting */
- /* 0 = hold scalar and counter */
-#define ERC32_MEC_TIMER_CONTROL_RTCSL 0x00000800 /* 1 = load scalar and start */
- /* 0 = no function */
-
-/*
- * The following defines the bits in the UART Control Registers.
- *
- */
-
-#define ERC32_MEC_UART_CONTROL_RTD 0x000000FF /* RX/TX data */
-
-/*
- * The following defines the bits in the MEC UART Control Registers.
- */
-
-#define ERC32_MEC_UART_STATUS_DR 0x00000001 /* Data Ready */
-#define ERC32_MEC_UART_STATUS_TSE 0x00000002 /* TX Send Register Empty */
-#define ERC32_MEC_UART_STATUS_THE 0x00000004 /* TX Hold Register Empty */
-#define ERC32_MEC_UART_STATUS_FE 0x00000010 /* RX Framing Error */
-#define ERC32_MEC_UART_STATUS_PE 0x00000020 /* RX Parity Error */
-#define ERC32_MEC_UART_STATUS_OE 0x00000040 /* RX Overrun Error */
-#define ERC32_MEC_UART_STATUS_CU 0x00000080 /* Clear Errors */
-#define ERC32_MEC_UART_STATUS_TXE 0x00000006 /* TX Empty */
-#define ERC32_MEC_UART_STATUS_CLRA 0x00000080 /* Clear UART A */
-#define ERC32_MEC_UART_STATUS_CLRB 0x00800000 /* Clear UART B */
-#define ERC32_MEC_UART_STATUS_ERRA 0x00000070 /* Error in UART A */
-#define ERC32_MEC_UART_STATUS_ERRB 0x00700000 /* Error in UART B */
-
-#define ERC32_MEC_UART_STATUS_DRA (ERC32_MEC_UART_STATUS_DR << 0)
-#define ERC32_MEC_UART_STATUS_TSEA (ERC32_MEC_UART_STATUS_TSE << 0)
-#define ERC32_MEC_UART_STATUS_THEA (ERC32_MEC_UART_STATUS_THE << 0)
-#define ERC32_MEC_UART_STATUS_FEA (ERC32_MEC_UART_STATUS_FE << 0)
-#define ERC32_MEC_UART_STATUS_PEA (ERC32_MEC_UART_STATUS_PE << 0)
-#define ERC32_MEC_UART_STATUS_OEA (ERC32_MEC_UART_STATUS_OE << 0)
-#define ERC32_MEC_UART_STATUS_CUA (ERC32_MEC_UART_STATUS_CU << 0)
-#define ERC32_MEC_UART_STATUS_TXEA (ERC32_MEC_UART_STATUS_TXE << 0)
-
-#define ERC32_MEC_UART_STATUS_DRB (ERC32_MEC_UART_STATUS_DR << 16)
-#define ERC32_MEC_UART_STATUS_TSEB (ERC32_MEC_UART_STATUS_TSE << 16)
-#define ERC32_MEC_UART_STATUS_THEB (ERC32_MEC_UART_STATUS_THE << 16)
-#define ERC32_MEC_UART_STATUS_FEB (ERC32_MEC_UART_STATUS_FE << 16)
-#define ERC32_MEC_UART_STATUS_PEB (ERC32_MEC_UART_STATUS_PE << 16)
-#define ERC32_MEC_UART_STATUS_OEB (ERC32_MEC_UART_STATUS_OE << 16)
-#define ERC32_MEC_UART_STATUS_CUB (ERC32_MEC_UART_STATUS_CU << 16)
-#define ERC32_MEC_UART_STATUS_TXEB (ERC32_MEC_UART_STATUS_TXE << 16)
-
-#ifndef ASM
-
-/*
- * This is used to manipulate the on-chip registers.
- *
- * The following symbol must be defined in the linkcmds file and point
- * to the correct location.
- */
-
-extern ERC32_Register_Map ERC32_MEC;
-
-/*
- * Macros to manipulate the Interrupt Clear, Interrupt Force, Interrupt Mask,
- * and the Interrupt Pending Registers.
- *
- * NOTE: For operations which are not atomic, this code disables interrupts
- * to guarantee there are no intervening accesses to the same register.
- * The operations which read the register, modify the value and then
- * store the result back are vulnerable.
- */
-
-#define ERC32_Clear_interrupt( _source ) \
- do { \
- ERC32_MEC.Interrupt_Clear = (1 << (_source)); \
- } while (0)
-
-#define ERC32_Force_interrupt( _source ) \
- do { \
- unsigned32 _level; \
- \
- _level = sparc_disable_interrupts(); \
- ERC32_MEC.Test_Control = ERC32_MEC.Test_Control | 0x80000; \
- ERC32_MEC.Interrupt_Force = (1 << (_source)); \
- sparc_enable_interrupts( _level ); \
- } while (0)
-
-#define ERC32_Is_interrupt_pending( _source ) \
- (ERC32_MEC.Interrupt_Pending & (1 << (_source)))
-
-#define ERC32_Is_interrupt_masked( _source ) \
- (ERC32_MEC.Interrupt_Masked & (1 << (_source)))
-
-#define ERC32_Mask_interrupt( _source ) \
- do { \
- unsigned32 _level; \
- \
- _level = sparc_disable_interrupts(); \
- ERC32_MEC.Interrupt_Mask |= (1 << (_source)); \
- sparc_enable_interrupts( _level ); \
- } while (0)
-
-#define ERC32_Unmask_interrupt( _source ) \
- do { \
- unsigned32 _level; \
- \
- _level = sparc_disable_interrupts(); \
- ERC32_MEC.Interrupt_Mask &= ~(1 << (_source)); \
- sparc_enable_interrupts( _level ); \
- } while (0)
-
-#define ERC32_Disable_interrupt( _source, _previous ) \
- do { \
- unsigned32 _level; \
- unsigned32 _mask = 1 << (_source); \
- \
- _level = sparc_disable_interrupts(); \
- (_previous) = ERC32_MEC.Interrupt_Mask; \
- ERC32_MEC.Interrupt_Mask = _previous | _mask; \
- sparc_enable_interrupts( _level ); \
- (_previous) &= _mask; \
- } while (0)
-
-#define ERC32_Restore_interrupt( _source, _previous ) \
- do { \
- unsigned32 _level; \
- unsigned32 _mask = 1 << (_source); \
- \
- _level = sparc_disable_interrupts(); \
- ERC32_MEC.Interrupt_Mask = \
- (ERC32_MEC.Interrupt_Mask & ~_mask) | (_previous); \
- sparc_enable_interrupts( _level ); \
- } while (0)
-
-/*
- * The following macros attempt to hide the fact that the General Purpose
- * Timer and Real Time Clock Timer share the Timer Control Register. Because
- * the Timer Control Register is write only, we must mirror it in software
- * and insure that writes to one timer do not alter the current settings
- * and status of the other timer.
- *
- * This code promotes the view that the two timers are completely independent.
- * By exclusively using the routines below to access the Timer Control
- * Register, the application can view the system as having a General Purpose
- * Timer Control Register and a Real Time Clock Timer Control Register
- * rather than the single shared value.
- *
- * Each logical timer control register is organized as follows:
- *
- * D0 - Counter Reload
- * 1 = reload counter at zero and restart
- * 0 = stop counter at zero
- *
- * D1 - Counter Load
- * 1 = load counter with preset value and restart
- * 0 = no function
- *
- * D2 - Enable
- * 1 = enable counting
- * 0 = hold scaler and counter
- *
- * D3 - Scaler Load
- * 1 = load scalar with preset value and restart
- * 0 = no function
- *
- * To insure the management of the mirror is atomic, we disable interrupts
- * around updates.
- */
-
-#define ERC32_MEC_TIMER_COUNTER_RELOAD_AT_ZERO 0x00000001
-#define ERC32_MEC_TIMER_COUNTER_STOP_AT_ZERO 0x00000000
-
-#define ERC32_MEC_TIMER_COUNTER_LOAD_COUNTER 0x00000002
-
-#define ERC32_MEC_TIMER_COUNTER_ENABLE_COUNTING 0x00000004
-#define ERC32_MEC_TIMER_COUNTER_DISABLE_COUNTING 0x00000000
-
-#define ERC32_MEC_TIMER_COUNTER_LOAD_SCALER 0x00000008
-
-#define ERC32_MEC_TIMER_COUNTER_RELOAD_MASK 0x00000001
-#define ERC32_MEC_TIMER_COUNTER_ENABLE_MASK 0x00000004
-
-#define ERC32_MEC_TIMER_COUNTER_DEFINED_MASK 0x0000000F
-#define ERC32_MEC_TIMER_COUNTER_CURRENT_MODE_MASK 0x00000005
-
-extern unsigned32 _ERC32_MEC_Timer_Control_Mirror;
-
-/*
- * This macros manipulate the General Purpose Timer portion of the
- * Timer Control register and promote the view that there are actually
- * two independent Timer Control Registers.
- */
-
-#define ERC32_MEC_Set_General_Purpose_Timer_Control( _value ) \
- do { \
- unsigned32 _level; \
- unsigned32 _control; \
- unsigned32 __value; \
- \
- __value = ((_value) & 0x0f); \
- _level = sparc_disable_interrupts(); \
- _control = _ERC32_MEC_Timer_Control_Mirror; \
- _control &= ERC32_MEC_TIMER_COUNTER_DEFINED_MASK << 8; \
- _ERC32_MEC_Timer_Control_Mirror = _control | _value; \
- _control &= (ERC32_MEC_TIMER_COUNTER_CURRENT_MODE_MASK << 8); \
- _control |= __value; \
- /* printf( "GPT 0x%x 0x%x 0x%x\n", _value, __value, _control ); */ \
- ERC32_MEC.Timer_Control = _control; \
- sparc_enable_interrupts( _level ); \
- } while ( 0 )
-
-#define ERC32_MEC_Get_General_Purpose_Timer_Control( _value ) \
- do { \
- (_value) = _ERC32_MEC_Timer_Control_Mirror & 0xf; \
- } while ( 0 )
-
-/*
- * This macros manipulate the Real Timer Clock Timer portion of the
- * Timer Control register and promote the view that there are actually
- * two independent Timer Control Registers.
- */
-
-#define ERC32_MEC_Set_Real_Time_Clock_Timer_Control( _value ) \
- do { \
- unsigned32 _level; \
- unsigned32 _control; \
- unsigned32 __value; \
- \
- __value = ((_value) & 0x0f) << 8; \
- _level = sparc_disable_interrupts(); \
- _control = _ERC32_MEC_Timer_Control_Mirror; \
- _control &= ERC32_MEC_TIMER_COUNTER_DEFINED_MASK; \
- _ERC32_MEC_Timer_Control_Mirror = _control | __value; \
- _control &= ERC32_MEC_TIMER_COUNTER_CURRENT_MODE_MASK; \
- _control |= __value; \
- /* printf( "RTC 0x%x 0x%x 0x%x\n", _value, __value, _control ); */ \
- ERC32_MEC.Timer_Control = _control; \
- sparc_enable_interrupts( _level ); \
- } while ( 0 )
-
-#define ERC32_MEC_Get_Real_Time_Clock_Timer_Control( _value ) \
- do { \
- (_value) = (_ERC32_MEC_Timer_Control_Mirror >> 8) & 0xf; \
- } while ( 0 )
-
-
-#endif /* !ASM */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !_INCLUDE_ERC32_h */
-/* end of include file */
-
diff --git a/c/src/libchip/shmdr/README b/c/src/libchip/shmdr/README
deleted file mode 100644
index 5ed9e861b0..0000000000
--- a/c/src/libchip/shmdr/README
+++ /dev/null
@@ -1,9 +0,0 @@
-#
-# $Id$
-#
-
-The mpci.h file provided in here is too simple for an MPCI with
-multiple ways to get to a node.
-
-This version of the shm driver needs to be reorganized to follow
-the better model of the Ada version.
diff --git a/c/src/libchip/shmdr/addlq.c b/c/src/libchip/shmdr/addlq.c
deleted file mode 100644
index 141b98796e..0000000000
--- a/c/src/libchip/shmdr/addlq.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/* void Shm_Locked_queue_Add( lq_cb, ecb )
- *
- * This routine adds an envelope control block to a shared memory queue.
- *
- * Input parameters:
- * lq_cb - pointer to a locked queue control block
- * ecb - pointer to an envelope control block
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include "shm_driver.h"
-
-void Shm_Locked_queue_Add(
- Shm_Locked_queue_Control *lq_cb,
- Shm_Envelope_control *ecb
-)
-{
- rtems_unsigned32 index;
-
- ecb->next = Shm_Locked_queue_End_of_list;
- ecb->queue = lq_cb->owner;
- index = ecb->index;
-
- Shm_Lock( lq_cb );
- if ( Shm_Convert(lq_cb->front) != Shm_Locked_queue_End_of_list )
- Shm_Envelopes[ Shm_Convert(lq_cb->rear) ].next = index;
- else
- lq_cb->front = index;
- lq_cb->rear = index;
- Shm_Unlock( lq_cb );
-}
diff --git a/c/src/libchip/shmdr/cnvpkt.c b/c/src/libchip/shmdr/cnvpkt.c
deleted file mode 100644
index 616bbad8e7..0000000000
--- a/c/src/libchip/shmdr/cnvpkt.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/* void Shm_Convert_packet( &packet )
- *
- * This routine is the shared memory locked queue MPCI driver routine
- * used to convert the RTEMS's information in a packet from non-native
- * format to processor native format.
- *
- * Input parameters:
- * packet - pointer to a packet
- *
- * Output parameters:
- * *packet - packet in native format
- *
- * NOTE: Message buffers are not manipulated.
- * Endian conversion is currently the only conversion.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include "shm_driver.h"
-
-void Shm_Convert_packet(
- rtems_packet_prefix *packet
-)
-{
- rtems_unsigned32 *pkt, i;
-
- pkt = (rtems_unsigned32 *) packet;
- for ( i=RTEMS_MINIMUN_HETERO_CONVERSION ; i ; i--, pkt++ )
- *pkt = CPU_swap_u32( *pkt );
-
- for ( i=packet->to_convert ; i ; i--, pkt++ )
- *pkt = CPU_swap_u32( *pkt );
-}
diff --git a/c/src/libchip/shmdr/dump.c b/c/src/libchip/shmdr/dump.c
deleted file mode 100644
index 10e8e6dbd7..0000000000
--- a/c/src/libchip/shmdr/dump.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * This routine is invoked following a reset to report the statistics
- * gathered during the previous execution.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include <stdio.h>
-
-#include "shm_driver.h"
-
-void
-Shm_Print_statistics(void)
-{
- rtems_unsigned32 ticks;
- rtems_unsigned32 ticks_per_second;
- rtems_unsigned32 seconds;
- int packets_per_second;
-
- (void) rtems_clock_get( RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &ticks );
- (void) rtems_clock_get( RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticks_per_second );
-
- seconds = ticks / ticks_per_second;
- if ( seconds == 0 )
- seconds = 1;
-
- packets_per_second = Shm_Receive_message_count / seconds;
- if ( (Shm_Receive_message_count % seconds) >= (seconds / 2) )
- packets_per_second++;
-
- printf( "\n\nSHMDR STATISTICS (NODE %d)\n", Shm_Local_node );
- printf( "TICKS SINCE BOOT = %d\n", ticks );
- printf( "TICKS PER SECOND = %d\n", ticks_per_second );
- printf( "ISRs=%d\n", Shm_Interrupt_count );
- printf( "RECV=%d\n", Shm_Receive_message_count );
- printf( "NULL=%d\n", Shm_Null_message_count );
- printf( "PKTS/SEC=%d\n", packets_per_second );
-}
diff --git a/c/src/libchip/shmdr/fatal.c b/c/src/libchip/shmdr/fatal.c
deleted file mode 100644
index 340c65e59e..0000000000
--- a/c/src/libchip/shmdr/fatal.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* void MPCI_Fatal( error )
- *
- * This routine is the shared memory driver fatal error handler.
- *
- * Input parameters:
- * error - fatal error code
- *
- * Output parameters: NEVER RETURNS
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include "shm_driver.h"
-
-void MPCI_Fatal(
- Internal_errors_Source source,
- boolean is_internal,
- rtems_unsigned32 error
-)
-{
- /* Eventually need to attempt to broadcast a K_FATAL message
- * without checking for all possible errors (do not want to
- * recurse).
- *
- * Also need to avoid using Shm_Node_statuses if the driver has not been
- * initialized.
- */
-
- Shm_Local_node_status->error = Shm_Convert(error);
-}
diff --git a/c/src/libchip/shmdr/getlq.c b/c/src/libchip/shmdr/getlq.c
deleted file mode 100644
index 199721b9ab..0000000000
--- a/c/src/libchip/shmdr/getlq.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* Shm_Envelope_control *Shm_Locked_queue_Get( lq_cb )
- *
- * This routine returns an envelope control block from a shared
- * memory queue.
- *
- * Input parameters:
- * lq_cb - pointer to a locked queue control block
- *
- * Output parameters:
- * returns - pointer to an envelope control block
- * - NULL if no envelopes on specified queue
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include <shm_driver.h>
-
-Shm_Envelope_control *Shm_Locked_queue_Get(
- Shm_Locked_queue_Control *lq_cb
-)
-{
- Shm_Envelope_control *tmp_ecb;
- rtems_unsigned32 tmpfront;
-
- tmp_ecb = NULL;
- Shm_Lock( lq_cb );
-
- tmpfront = Shm_Convert(lq_cb->front);
- if ( tmpfront != Shm_Locked_queue_End_of_list ) {
- tmp_ecb = &Shm_Envelopes[ tmpfront ];
- lq_cb->front = tmp_ecb->next;
- if ( tmp_ecb->next == Shm_Locked_queue_End_of_list )
- lq_cb->rear = Shm_Locked_queue_End_of_list;
- tmp_ecb->next = Shm_Locked_queue_Not_on_list;
- }
-
- Shm_Unlock( lq_cb );
- return( tmp_ecb );
-}
diff --git a/c/src/libchip/shmdr/getpkt.c b/c/src/libchip/shmdr/getpkt.c
deleted file mode 100644
index 9ed8e42a46..0000000000
--- a/c/src/libchip/shmdr/getpkt.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Shm_Get_packet
- *
- * This routine is the shared memory locked queue MPCI driver
- * routine used to obtain an empty message packet.
- *
- * Input parameters:
- * packet - address of pointer to packet
- *
- * Output parameters:
- * *(cpb->get_packet) - address of allocated packet
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include "shm_driver.h"
-
-rtems_mpci_entry Shm_Get_packet(
- rtems_packet_prefix **packet
-)
-{
- Shm_Envelope_control *ecb;
-
- ecb = Shm_Allocate_envelope();
- if ( !ecb )
- rtems_fatal_error_occurred ( SHM_NO_FREE_PKTS );
- *packet = Shm_Envelope_control_to_packet_prefix_pointer( ecb );
-}
diff --git a/c/src/libchip/shmdr/init.c b/c/src/libchip/shmdr/init.c
deleted file mode 100644
index b4ca93a08a..0000000000
--- a/c/src/libchip/shmdr/init.c
+++ /dev/null
@@ -1,253 +0,0 @@
-/* Shm_Initialization
- *
- * This routine is the shared memory communications initerface
- * driver initialization routine.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define _SHM_INIT
-
-#include <rtems.h>
-#include <shm_driver.h>
-
-#include <string.h> /* memset() */
-#include <stdlib.h> /* malloc() */
-#include <assert.h>
-
-/*
- * User extension to install MPCI_Fatal as a fatal error
- * handler extension
- */
-
-rtems_extensions_table MPCI_Shm_extensions;
-
-rtems_mpci_entry Shm_Initialization( void )
-
-{
- rtems_unsigned32 i, all_initialized;
- rtems_unsigned32 interrupt_cause, interrupt_value;
- void *interrupt_address;
- Shm_Node_status_control *nscb;
- rtems_unsigned32 extension_id; /* for installation of MPCI_Fatal */
- rtems_unsigned32 remaining_memory;
-/* XXX these should use "public" methods to set their values.... */
- rtems_configuration_table *configuration = _Configuration_Table;
- rtems_multiprocessing_table *mp_configuration = _Configuration_MP_table;
-
- Shm_RTEMS_Configuration = configuration;
- Shm_RTEMS_MP_Configuration = mp_configuration;
-
- Shm_Local_node = Shm_RTEMS_MP_Configuration->node;
- Shm_Maximum_nodes = Shm_RTEMS_MP_Configuration->maximum_nodes;
-
- Shm_Get_configuration( Shm_Local_node, &Shm_Configuration );
-
- Shm_Interrupt_table = (Shm_Interrupt_information *) malloc(
- sizeof(Shm_Interrupt_information) * (Shm_Maximum_nodes + 1)
- );
-
- assert( Shm_Interrupt_table );
-
-
- Shm_Receive_message_count = 0;
- Shm_Null_message_count = 0;
- Shm_Interrupt_count = 0;
-
- /*
- * Set the Node Status indicators
- */
-
- Shm_Pending_initialization =
- Shm_Convert(rtems_build_name( 'P', 'E', 'N', 'D' ));
- Shm_Initialization_complete =
- Shm_Convert(rtems_build_name( 'C', 'O', 'M', 'P' ));
- Shm_Active_node =
- Shm_Convert(rtems_build_name( 'A', 'C', 'T', 'V' ));
-
- /*
- * Initialize the constants used by the Locked Queue code.
- */
-
- Shm_Locked_queue_End_of_list = Shm_Convert( 0xffffffff );
- Shm_Locked_queue_Not_on_list = Shm_Convert( 0xfffffffe );
-
- /*
- * Set the base addresses for the:
- * + Node Status Table
- * + Free Pool and Receive Queues
- * + Envelopes
- */
-
- Shm_Node_statuses = (Shm_Node_status_control *) START_NS_CBS;
- Shm_Locked_queues = (Shm_Locked_queue_Control *) START_LQ_CBS;
- Shm_Envelopes = (Shm_Envelope_control *) START_ENVELOPES;
-
- /*
- * Calculate the maximum number of envelopes which can be
- * placed the remaining shared memory.
- */
-
- remaining_memory =
- ((void *)Shm_Configuration->base + Shm_Configuration->length) -
- ((void *)Shm_Envelopes);
-
- Shm_Maximum_envelopes = remaining_memory / sizeof( Shm_Envelope_control );
- Shm_Maximum_envelopes -= 1;
-
- /*
- * Set the pointer to the receive queue for the local node.
- * When we receive a node, we will get it from here before
- * processing it.
- */
-
- Shm_Local_receive_queue = &Shm_Locked_queues[ Shm_Local_node ];
- Shm_Local_node_status = &Shm_Node_statuses[ Shm_Local_node ];
-
- /*
- * Convert local interrupt cause information into the
- * neutral format so other nodes will be able to
- * understand it.
- */
-
- interrupt_address =
- (void *) Shm_Convert( (rtems_unsigned32)Shm_Configuration->Intr.address );
- interrupt_value = Shm_Convert( Shm_Configuration->Intr.value );
- interrupt_cause = Shm_Convert( Shm_Configuration->Intr.length );
-
- if ( Shm_Configuration->poll_intr == POLLED_MODE ) Shm_setclockvec();
- else Shm_setvec();
-
- if ( Shm_Is_master_node() ) {
-
- /*
- * Zero out the shared memory area.
- */
-
- (void) memset(
- (void *) Shm_Configuration->base,
- 0,
- Shm_Configuration->length
- );
-
- /*
- * Initialize all of the locked queues (the free envelope
- * pool and a receive queue per node) and set all of the
- * node's status so they will be waiting to initialization
- * to complete.
- */
-
- Shm_Locked_queue_Initialize( FREE_ENV_CB, FREE_ENV_POOL );
-
- for ( i=SHM_FIRST_NODE ; i<=Shm_Maximum_nodes ; i++ ) {
- Shm_Initialize_receive_queue( i );
-
- Shm_Node_statuses[ i ].status = Shm_Pending_initialization;
- Shm_Node_statuses[ i ].error = 0;
- }
-
- /*
- * Initialize all of the envelopes and place them in the
- * free pool.
- */
-
- for ( i=0 ; i<Shm_Maximum_envelopes ; i++ ) {
- Shm_Envelopes[ i ].index = Shm_Convert(i);
- Shm_Free_envelope( &Shm_Envelopes[ i ] );
- }
-
- /*
- * Initialize this node's interrupt information in the
- * shared area so other nodes can interrupt us.
- */
-
- Shm_Local_node_status->int_address = (rtems_unsigned32) interrupt_address;
- Shm_Local_node_status->int_value = interrupt_value;
- Shm_Local_node_status->int_length = interrupt_cause;
-
- Shm_Local_node_status->status = Shm_Initialization_complete;
-
- /*
- * Loop until all nodes have completed initialization.
- */
-
- do {
- all_initialized = 1;
-
- for ( i = SHM_FIRST_NODE ; i <= Shm_Maximum_nodes ; i++ )
- if ( Shm_Node_statuses[ i ].status != Shm_Initialization_complete )
- all_initialized = 0;
-
- } while ( all_initialized == 0 );
-
- /*
- * Tell the other nodes we think that the system is up.
- */
-
- for ( i = SHM_FIRST_NODE ; i <= Shm_Maximum_nodes ; i++ )
- Shm_Node_statuses[ i ].status = Shm_Active_node;
-
- } else { /* is not MASTER node */
-
- /*
- * Initialize the node status for the non-master nodes.
- * Because the master node zeroes out memory, it is
- * necessary for them to keep putting their values in
- * the node status area until the master says they
- * should become active.
- */
-
- Shm_Local_node_status->status = Shm_Pending_initialization;
-
- do {
-
- if ( Shm_Local_node_status->status == Shm_Pending_initialization ) {
-
- /*
- * Initialize this node's interrupt information in the
- * shared area so other nodes can interrupt us.
- */
-
- Shm_Local_node_status->int_address =
- (rtems_unsigned32) interrupt_address;
- Shm_Local_node_status->int_value = interrupt_value;
- Shm_Local_node_status->int_length = interrupt_cause;
-
- Shm_Local_node_status->status = Shm_Initialization_complete;
- }
- } while ( Shm_Local_node_status->status != Shm_Active_node ) ;
- }
-
- /*
- * Initialize the Interrupt Information Table
- */
-
- for ( i = SHM_FIRST_NODE ; i <= Shm_Maximum_nodes ; i++ ) {
- nscb = &Shm_Node_statuses[ i ];
-
- Shm_Interrupt_table[i].address = Shm_Convert_address(
- (void *)Shm_Convert(((vol_u32) nscb->int_address))
- );
- Shm_Interrupt_table[i].value = Shm_Convert( nscb->int_value );
- Shm_Interrupt_table[i].length = Shm_Convert( nscb->int_length );
- }
-
- MPCI_Shm_extensions.fatal = MPCI_Fatal;
-
- (void) rtems_extension_create(
- rtems_build_name( 'M', 'P', 'E', 'X' ),
- &MPCI_Shm_extensions,
- &extension_id
- );
-}
diff --git a/c/src/libchip/shmdr/initlq.c b/c/src/libchip/shmdr/initlq.c
deleted file mode 100644
index e2e0dd1f8c..0000000000
--- a/c/src/libchip/shmdr/initlq.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* void Shm_Locked_queue_Initialize( lq_cb, owner )
- *
- * This routine initializes a shared memory locked queue.
- *
- * Input parameters:
- * lq_cb - pointer to the control block of the queue
- * to be initialized
- * owner - unique idenitifier of who owns this queue.
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include "shm_driver.h"
-
-void Shm_Locked_queue_Initialize(
- Shm_Locked_queue_Control *lq_cb,
- rtems_unsigned32 owner
-)
-{
- Shm_Initialize_lock( lq_cb );
- lq_cb->front = Shm_Locked_queue_End_of_list;
- lq_cb->rear = Shm_Locked_queue_End_of_list;
- lq_cb->owner = Shm_Convert(owner);
-}
diff --git a/c/src/libchip/shmdr/intr.c b/c/src/libchip/shmdr/intr.c
deleted file mode 100644
index 3374919222..0000000000
--- a/c/src/libchip/shmdr/intr.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/* void Shm_Cause_interrupt( node )
- *
- * This routine is the shared memory driver routine which
- * generates interrupts to other CPUs.
- *
- * It uses the information placed in the node status control
- * block by each node. For example, when used with the Motorola
- * MVME136 board, the MPCSR is used.
- *
- * Input parameters:
- * node - destination of this packet (0 = broadcast)
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include "shm_driver.h"
-
-void Shm_Cause_interrupt(
- rtems_unsigned32 node
-)
-{
- Shm_Interrupt_information *intr;
- rtems_unsigned8 *u8;
- rtems_unsigned16 *u16;
- rtems_unsigned32 *u32;
- rtems_unsigned32 value;
-
- intr = &Shm_Interrupt_table[node];
- value = intr->value;
-
- switch ( intr->length ) {
- case NO_INTERRUPT:
- break;
- case BYTE:
- u8 = (rtems_unsigned8 *)intr->address;
- *u8 = (rtems_unsigned8) value;
- break;
- case WORD:
- u16 = (rtems_unsigned16 *)intr->address;
- *u16 = (rtems_unsigned16) value;
- break;
- case LONG:
- u32 = (rtems_unsigned32 *)intr->address;
- *u32 = (rtems_unsigned32) value;
- break;
- }
-}
diff --git a/c/src/libchip/shmdr/mpci.h b/c/src/libchip/shmdr/mpci.h
deleted file mode 100644
index 203c77dbcd..0000000000
--- a/c/src/libchip/shmdr/mpci.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* mpci.h
- *
- * This include file contains all the renaming necessary to
- * have an application use the Shared Memory Driver as its
- * sole mechanism for MPCI.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __SHM_MPCI_h
-#define __SHM_MPCI_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <shm_driver.h>
-
-#define MPCI_Initialization( _configuration ) \
- Shm_Initialization( _configuration )
-
-#define MPCI_Get_packet( _the_packet ) \
- Shm_Get_packet( _the_packet )
-
-#define MPCI_Return_packet( _the_packet ) \
- Shm_Return_packet( _the_packet )
-
-#define MPCI_Receive_packet( _the_packet ) \
- Shm_Receive_packet( _the_packet )
-
-#define MPCI_Send_packet( _destination, _the_packet ) \
- Shm_Send_packet( _destination, _the_packet )
-
-/* Unnecessary... mapped in shm_driver.h
-#define MPCI_Fatal( _the_error ) \
- Shm_Fatal( _the_error )
-*/
-
-#define MPCI_Enable_statistics()
-
-#define MPCI_Print_statistics() \
- Shm_Print_statistics()
-
-/* no need to rename the MPCI_Table either */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/c/src/libchip/shmdr/mpisr.c b/c/src/libchip/shmdr/mpisr.c
deleted file mode 100644
index fc761101cd..0000000000
--- a/c/src/libchip/shmdr/mpisr.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/* _Shm_isr()
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include "shm_driver.h"
-
-rtems_isr Shm_isr(
- rtems_vector_number vector
-)
-{
- Shm_Interrupt_count += 1;
- rtems_multiprocessing_announce();
-}
diff --git a/c/src/libchip/shmdr/poll.c b/c/src/libchip/shmdr/poll.c
deleted file mode 100644
index 9c3571ae22..0000000000
--- a/c/src/libchip/shmdr/poll.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/* void Shm_Poll()
- *
- * This routine polls to see if a packet has arrived. If one
- * has it informs the executive. It is typically called from
- * the clock tick interrupt service routine.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/libio.h>
-
-#include "shm_driver.h"
-
-void Shm_Poll()
-{
- rtems_unsigned32 tmpfront;
- rtems_libio_ioctl_args_t args;
-
- /* invoke clock isr */
- args.iop = 0;
- args.command = rtems_build_name('I', 'S', 'R', ' ');
- (void) rtems_io_control(rtems_clock_major, rtems_clock_minor, &args);
-
- /*
- * Check for msgs only if we are "up"
- * This avoids a race condition where we may get a clock
- * interrupt before MPCI has completed its init
- */
-
- if (_System_state_Is_up(_System_state_Get()))
- {
- tmpfront = Shm_Local_receive_queue->front;
- if ( Shm_Convert(tmpfront) != Shm_Locked_queue_End_of_list )
- {
- rtems_multiprocessing_announce();
- Shm_Interrupt_count++;
- }
- }
-}
diff --git a/c/src/libchip/shmdr/receive.c b/c/src/libchip/shmdr/receive.c
deleted file mode 100644
index 8d1b2349f7..0000000000
--- a/c/src/libchip/shmdr/receive.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Shm_Receive_packet
- *
- * This routine is the shared memory locked queue MPCI driver routine
- * used to obtain a packet containing a message from this node's
- * receive queue.
- *
- * Input parameters:
- * packet - address of a pointer to a packet
- *
- * Output parameters:
- * *(rpb->packet) - pointer to packet
- * NULL if no packet currently available
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include "shm_driver.h"
-
-rtems_mpci_entry Shm_Receive_packet(
- rtems_packet_prefix **packet
-)
-{
- Shm_Envelope_control *ecb;
-
- ecb = Shm_Locked_queue_Get( Shm_Local_receive_queue );
- if ( ecb ) {
- *(packet) = Shm_Envelope_control_to_packet_prefix_pointer( ecb );
- if ( ecb->Preamble.endian != Shm_Configuration->format )
- Shm_Convert_packet( *packet );
- Shm_Receive_message_count++;
- } else {
- *(packet) = NULL;
- Shm_Null_message_count++;
- }
-}
diff --git a/c/src/libchip/shmdr/retpkt.c b/c/src/libchip/shmdr/retpkt.c
deleted file mode 100644
index c013916603..0000000000
--- a/c/src/libchip/shmdr/retpkt.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Shm_Return_packet
- *
- * This routine is the shared memory locked queue MPCI driver
- * routine used to return a message packet to a free envelope
- * pool accessible by this node.
- *
- * Input parameters:
- * packet - address of pointer to packet
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include "shm_driver.h"
-
-rtems_mpci_entry Shm_Return_packet(
- rtems_packet_prefix *packet
-)
-{
- Shm_Free_envelope( Shm_Packet_prefix_to_envelope_control_pointer(packet) );
-}
-
diff --git a/c/src/libchip/shmdr/send.c b/c/src/libchip/shmdr/send.c
deleted file mode 100644
index 2e5f60988e..0000000000
--- a/c/src/libchip/shmdr/send.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Shm_Send_packet
- *
- * This routine is the shared memory driver locked queue write
- * MPCI driver routine. This routine sends the specified packet
- * to the destination specified by "node". A "node" value of
- * zero designates that this packet is to be broadcasted.
- *
- * Input parameters:
- * node - destination of this packet (0 = broadcast)
- * packet - address of packet
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include "shm_driver.h"
-
-struct pkt_cpy {
- rtems_unsigned32 packet[MAX_PACKET_SIZE/4];
-};
-
-rtems_mpci_entry Shm_Send_packet(
- rtems_unsigned32 node,
- rtems_packet_prefix *packet
-)
-{
- Shm_Envelope_control *ecb, *tmp_ecb;
- rtems_unsigned32 nnum;
-
- ecb = Shm_Packet_prefix_to_envelope_control_pointer( packet );
- if ( node ) {
- Shm_Build_preamble( ecb, node );
- Shm_Build_postamble( ecb );
- Shm_Append_to_receive_queue( node, ecb );
- (*Shm_Configuration->cause_intr)( node );
- }
- else {
- for( nnum = SHM_FIRST_NODE ; nnum <= Shm_Maximum_nodes ; nnum++ )
- if ( Shm_Local_node != nnum ) {
- tmp_ecb = Shm_Allocate_envelope();
- if ( !tmp_ecb )
- rtems_fatal_error_occurred( SHM_NO_FREE_PKTS );
- Shm_Build_preamble( tmp_ecb, nnum );
- *((struct pkt_cpy *)tmp_ecb->packet) = *((struct pkt_cpy *)packet);
- Shm_Build_postamble( tmp_ecb );
- Shm_Append_to_receive_queue( nnum, tmp_ecb );
- (*Shm_Configuration->cause_intr)( nnum );
- }
- Shm_Free_envelope( ecb );
- }
-}
diff --git a/c/src/libchip/shmdr/setckvec.c b/c/src/libchip/shmdr/setckvec.c
deleted file mode 100644
index 9be1b48945..0000000000
--- a/c/src/libchip/shmdr/setckvec.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Shm_setclockvec
- *
- * This routines installs the shared memory clock interrupt handler
- * used when the driver is used in polling mode.
- *
- * INPUT PARAMETERS: NONE
- *
- * OUTPUT PARAMETERS: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include <rtems/libio.h>
-
-#include "shm_driver.h"
-
-rtems_isr Shm_setclockvec()
-{
- rtems_libio_ioctl_args_t args;
- args.iop = 0;
- args.command = rtems_build_name('N', 'E', 'W', ' ');
- args.buffer = (void *) Shm_Poll;
-
- (void) rtems_io_control(rtems_clock_major, rtems_clock_minor, &args);
-}
diff --git a/c/src/libchip/shmdr/shm_driver.h b/c/src/libchip/shmdr/shm_driver.h
deleted file mode 100644
index 7efc9dbfcb..0000000000
--- a/c/src/libchip/shmdr/shm_driver.h
+++ /dev/null
@@ -1,541 +0,0 @@
-/* shm_driver.h
- *
- * This include file contains all the constants, structures,
- * and global variables for this RTEMS based shared memory
- * communications interface driver.
- *
- * Processor board dependencies are in other files.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __SHM_h
-#define __SHM_h
-
-#include <clockdrv.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* The information contained in the Node Status, Locked Queue, and
- * Envelope Control Blocks must be maintained in a NEUTRAL format.
- * Currently the neutral format may be selected as big or little
- * endian by simply defining either NEUTRAL_BIG or NEUTRAL_LITTLE.
- *
- * It is CRITICAL to note that the neutral format can ONLY be
- * changed by modifying this file and recompiling the ENTIRE
- * SHM driver including ALL target specific support files.
- *
- * The following table details the memory contents for the endian
- * field of the Node Status Control Block in the various
- * data format configurations (data is in hexadecimal):
- *
- * NEUTRAL NATIVE BYTE 0 BYTE 1 BYTE 2 BYTE 3
- * ======= ====== ====== ====== ====== ======
- * BIG BIG 00 00 00 01
- * BIG LITTLE 10 00 00 00
- * LITTLE BIG 01 00 00 00
- * LITTLE LITTLE 00 00 00 10
- *
- *
- * NOTE: XXX
- * PORTABILITY OF LOCKING INSTRUCTIONS
- * ===================================
- * The locking mechanism described below is not
- * general enough. Where the hardware supports
- * it we should use "atomic swap" instructions
- * so the values in the lock can be tailored to
- * support a CPU with only weak atomic memory
- * instructions. There are combinations of
- * CPUs with inflexible atomic memory instructions
- * which appear to be incompatible. For example,
- * the SPARClite instruction uses a byte which is
- * 0xFF when locked. The PA-RISC uses 1 to indicate
- * locked and 0 when unlocked. These CPUs appear to
- * have incompatible lock instructions. But
- * they could be used in a heterogenous system
- * with does not mix SPARCs and PA-RISCs. For
- * example, the i386 and SPARC or i386 and SPARC
- * could work together. The bottom line is that
- * not every CPU will work together using this
- * locking scheme. There are supposed to be
- * algorithms to do this without hardware assist
- * and one of these should be incorporated into
- * the shared memory driver.
- *
- * The most flexible scheme using the instructions
- * of the various CPUs for efficiency would be to use
- * "atomic swaps" wherever possible. Make the lock
- * and unlock configurable much like BIG vs LITTLE
- * endian use of shared memory is now. The values
- * of the lock could then reflect the "worst"
- * CPU in a system. This still results in mixes
- * of CPUs which are incompatible.
- *
- * The current locking mechanism is based upon the MC68020
- * "tas" instruction which is atomic. All ports to other CPUs
- * comply with the restrictive placement of lock bit by this
- * instruction. The lock bit is the most significant bit in a
- * big-endian rtems_unsigned32. On other processors, the lock is
- * typically implemented via an atomic swap or atomic modify
- * bits type instruction.
- */
-
-#define NEUTRAL_BIG
-
-#ifdef NEUTRAL_BIG
-#define SHM_BIG 0x00000001
-#define SHM_LITTLE 0x10000000
-#endif
-
-#ifdef NEUTRAL_LITTLE
-#define SHM_BIG 0x01000000
-#define SHM_LITTLE 0x00000010
-#endif
-
-/*
- * The following are the values used to fill in the lock field. Some CPUs
- * are able to write only a single value into field. By making the
- * lock and unlock values configurable, CPUs which support "atomic swap"
- * instructions can generally be made to work in any heterogeneous
- * configuration. However, it is possible for two CPUs to be incompatible
- * in regards to the lock field values. This occurs when two CPUs
- * which write only a single value to the field are used in a system
- * but the two CPUs write different incompatible values.
- *
- * NOTE: The following is a first attempt at defining values which
- * have a chance at working together. The m68k should use
- * chk2 instead of tas to be less restrictive. Target endian
- * problems (like the Force CPU386 which has (broken) big endian
- * view of the VMEbus address space) are not addressed yet.
- */
-
-#if defined(__i960__)
-#define SHM_LOCK_VALUE 0x00000080
-#define SHM_UNLOCK_VALUE 0
-#elif defined(__mc68000__)
-#define SHM_LOCK_VALUE 0x80000000
-#define SHM_UNLOCK_VALUE 0
-#define SHM_LOCK_VALUE 0x80000000
-#define SHM_UNLOCK_VALUE 0
-#elif defined(__i386__)
-#define SHM_LOCK_VALUE 0x80000000
-#define SHM_UNLOCK_VALUE 0
-#elif defined(__mips__)
-#define SHM_LOCK_VALUE 0x80000000
-#define SHM_UNLOCK_VALUE 0
-#elif defined(__hppa__)
-#define SHM_LOCK_VALUE 0
-#define SHM_UNLOCK_VALUE 1
-#elif defined(__PPC__)
-#define SHM_LOCK_VALUE 1
-#define SHM_UNLOCK_VALUE 0
-#elif defined(__unix__)
-#define SHM_LOCK_VALUE 0
-#define SHM_UNLOCK_VALUE 1
-#elif defined(no_cpu) /* for this values are irrelevant */
-#define SHM_LOCK_VALUE 1
-#define SHM_UNLOCK_VALUE 0
-#else
-#error "shm_driver.h - no SHM_LOCK_VALUE defined for this CPU architecture"
-#endif
-
-#define Shm_Convert( value ) \
- ((Shm_Configuration->convert) ? \
- (*Shm_Configuration->convert)(value) : (value))
-
-/* constants */
-
-#define SHM_MASTER 1 /* master initialization node */
-#define SHM_FIRST_NODE 1
-
-/* size constants */
-
-#define KILOBYTE (1024)
-#define MEGABYTE (1024*1024)
-
-/* inter-node interrupt values */
-
-#define NO_INTERRUPT 0 /* used for polled nodes */
-#define BYTE 1
-#define WORD 2
-#define LONG 4
-
-/* operational mode constants -- used in SHM Configuration Table */
-#define POLLED_MODE 0
-#define INTR_MODE 1
-
-/* error codes */
-
-#define NO_ERROR 0
-#define SHM_NO_FREE_PKTS 0xf0000
-
-/* null pointers of different types */
-
-#define NULL_ENV_CB ((Shm_Envelope_control *) 0)
-#define NULL_CONVERT 0
-
-/*
- * size of stuff before preamble in envelope.
- * It must be a constant since we will use it to generate MAX_PACKET_SIZE
- */
-
-#define SHM_ENVELOPE_PREFIX_OVERHEAD (4 * sizeof(vol_u32))
-
-/*
- * The following is adjusted so envelopes are MAX_ENVELOPE_SIZE bytes long.
- * It must be >= RTEMS_MINIMUM_PACKET_SIZE in mppkt.h.
- */
-
-#ifndef MAX_ENVELOPE_SIZE
-#define MAX_ENVELOPE_SIZE 0x180
-#endif
-
-#define MAX_PACKET_SIZE (MAX_ENVELOPE_SIZE - \
- SHM_ENVELOPE_PREFIX_OVERHEAD + \
- sizeof(Shm_Envelope_preamble) + \
- sizeof(Shm_Envelope_postamble))
-
-
-/* constants pertinent to Locked Queue routines */
-
-#define LQ_UNLOCKED SHM_UNLOCK_VALUE
-#define LQ_LOCKED SHM_LOCK_VALUE
-
-/* constants related to the Free Envelope Pool */
-
-#define FREE_ENV_POOL 0
-#define FREE_ENV_CB (&Shm_Locked_queues[ FREE_ENV_POOL ])
-
-/* The following are important when dealing with
- * the shared memory communications interface area.
- *
- * NOTE: The starting address and length of the shared memory
- * is defined in a system dependent file.
- */
-
-#define START_NS_CBS ((void *)Shm_Configuration->base)
-#define START_LQ_CBS ((START_NS_CBS) + \
- ( (sizeof (Shm_Node_status_control)) * (Shm_Maximum_nodes + 1) ) )
-#define START_ENVELOPES ( ((void *) START_LQ_CBS) + \
- ( (sizeof (Shm_Locked_queue_Control)) * (Shm_Maximum_nodes + 1) ) )
-#define END_SHMCI_AREA ( (void *) START_ENVELOPES + \
- ( (sizeof (Shm_Envelope_control)) * Shm_Maximum_envelopes ) )
-#define END_SHARED_MEM (START_NS_CBS+Shm_Configuration->length)
-
-/* macros */
-
-#define Shm_Is_master_node() \
- ( SHM_MASTER == Shm_Local_node )
-
-#define Shm_Free_envelope( ecb ) \
- Shm_Locked_queue_Add( FREE_ENV_CB, (ecb) )
-#define Shm_Allocate_envelope() \
- Shm_Locked_queue_Get(FREE_ENV_CB)
-
-#define Shm_Initialize_receive_queue(node) \
- Shm_Locked_queue_Initialize( &Shm_Locked_queues[node], node )
-
-#define Shm_Append_to_receive_queue(node, ecb) \
- Shm_Locked_queue_Add( &Shm_Locked_queues[node], (ecb) )
-
-#define Shm_Envelope_control_to_packet_prefix_pointer(ecb) \
- ((void *)(ecb)->packet)
-
-#define Shm_Packet_prefix_to_envelope_control_pointer( pkt ) \
- ((Shm_Envelope_control *)((rtems_unsigned8 *)(pkt) - \
- (sizeof(Shm_Envelope_preamble) + SHM_ENVELOPE_PREFIX_OVERHEAD)))
-
-#define Shm_Build_preamble(ecb, node) \
- (ecb)->Preamble.endian = Shm_Configuration->format
-
-#define Shm_Build_postamble( ecb )
-
-/* volatile types */
-
-typedef volatile rtems_unsigned8 vol_u8;
-typedef volatile rtems_unsigned32 vol_u32;
-
-/* shm control information */
-
-struct shm_info {
- vol_u32 not_currently_used_0;
- vol_u32 not_currently_used_1;
- vol_u32 not_currently_used_2;
- vol_u32 not_currently_used_3;
-};
-
-typedef struct {
- /*byte start_of_text;*/
- vol_u32 endian;
- vol_u32 not_currently_used_0;
- vol_u32 not_currently_used_1;
- vol_u32 not_currently_used_2;
-} Shm_Envelope_preamble;
-
-typedef struct {
-} Shm_Envelope_postamble;
-
-/* WARNING! If you change this structure, don't forget to change
- * SHM_ENVELOPE_PREFIX_OVERHEAD and
- * Shm_Packet_prefix_to_envelope_control_pointer() above.
- */
-
-/* This comment block describes the contents of each field
- * of the Envelope Control Block:
- *
- * next - The index of the next envelope on this queue.
- * queue - The index of the queue this envelope is on.
- * index - The index of this envelope.
- * Preamble - Generic packet preamble. One day this structure
- * could be enhanced to contain routing information.
- * packet - RTEMS MPCI packet. Untouched by SHM Driver
- * other than copying and format conversion as
- * documented in the RTEMS User's Guide.
- * Postamble - Generic packet postamble. One day this structure
- * could be enhanced to contain checksum information.
- */
-
-typedef struct {
- vol_u32 next; /* next envelope on queue */
- vol_u32 queue; /* queue on which this resides */
- vol_u32 index; /* index into array of envelopes*/
- vol_u32 pad0; /* insure the next one is aligned */
- Shm_Envelope_preamble Preamble; /* header information */
- vol_u8 packet[MAX_PACKET_SIZE]; /* RTEMS INFO */
- Shm_Envelope_postamble Postamble;/* trailer information */
-} Shm_Envelope_control;
-
-/* This comment block describes the contents of each field
- * of the Locked Queue Control Block:
- *
- * lock - Lock used to insure mutually exclusive access.
- * front - Index of first envelope on queue. This field
- * is used to remove head of queue (receive).
- * rear - Index of last envelope on queue. This field
- * is used to add evelope to queue (send).
- * owner - The node number of the recipient (owning) node.
- * RTEMS does not use the node number zero (0).
- * The zero node is used by the SHM Driver for the
- * Free Envelope Queue shared by all nodes.
- */
-
-typedef struct {
- vol_u32 lock; /* lock field for this queue */
- vol_u32 front; /* first envelope on queue */
- vol_u32 rear; /* last envelope on queue */
- vol_u32 owner; /* receiving (i.e. owning) node */
-} Shm_Locked_queue_Control;
-
-/* This comment block describes the contents of each field
- * of the Node Status Control Block:
- *
- * status - Node status. Current values are Pending Initialization,
- * Initialization Complete, and Active Node. Other values
- * could be added to enhance fault tolerance.
- * error - Zero if the node has not failed. Otherwise,
- * this field contains a status indicating the
- * failure reason.
- * int_address, int_value, and int_length
- * - These field are the Interrupt Information table
- * for this node in neutral format. This is how
- * each node knows how to generate interrupts.
- */
-
-typedef struct {
- vol_u32 status; /* node status information */
- vol_u32 error; /* fatal error code */
- vol_u32 int_address; /* write here for interrupt */
- vol_u32 int_value; /* this value causes interrupt */
- vol_u32 int_length; /* for this length (0,1,2,4) */
- vol_u32 not_currently_used_0;
- vol_u32 not_currently_used_1;
- vol_u32 not_currently_used_2;
-} Shm_Node_status_control;
-
-/* This comment block describes the contents of each field
- * of the Interrupt Information Table. This table describes
- * how another node can generate an interrupt to this node.
- * This information is target board dependent. If the
- * SHM Driver is in POLLED_MODE, then all fields should
- * be initialized to NO_INTERRUPT.
- *
- * address - The address to which another node should
- * write to cause an interrupt.
- * value - The value which must be written
- * length - The size of the value to write. Valid
- * values are BYTE, WORD, and LONG.
- *
- * NOTE: The Node Status Control Block contains this
- * information in neutral format and not in a
- * structure to avoid potential alignment problems.
- */
-
-typedef struct {
- vol_u32 *address; /* write here for interrupt */
- vol_u32 value; /* this value causes interrupt */
- vol_u32 length; /* for this length (0,1,2,4) */
-} Shm_Interrupt_information;
-
-/* SHM Configuration Table
- *
- * This comment block describes the contents of each field
- * of the SHM Configuration Table.
- *
- * base - The base address of the shared memory. This
- * address may be specific to this node.
- * length - The length of the shared memory in bytes.
- * format - The natural format for rtems_unsigned32's in the
- * shared memory. Valid values are currently
- * only SHM_LITTLE and SHM_BIG.
- * convert - The address of the routine which converts
- * between neutral and local format.
- * poll_intr - The operational mode of the driver. Some
- * target boards may not provide hardware for
- * an interprocessor interrupt. If POLLED_MODE
- * is selected, the SHM driver will install a
- * wrapper around the Clock_isr() to poll for
- * incoming packets. Throughput is dependent
- * on the time between clock interrupts.
- * Valid values are POLLED_MODE and INTR_MODE.
- * cause_intr - This is the address of the routine used to
- * write to a particular address and cause an
- * interrupt on another node. This routine
- * may need to be target dependent if something
- * other than a normal write from C does not work.
- * Intr - This structure describes the operation required
- * to cause an interrupt to this node. The actual
- * contents of this structure are described above.
- */
-
-struct shm_config_info {
- vol_u32 *base; /* base address of SHM */
- vol_u32 length; /* length (in bytes) of SHM */
- vol_u32 format; /* SHM is big or little endian */
- vol_u32 (*convert)();/* neutral conversion routine */
- vol_u32 poll_intr;/* POLLED or INTR driven mode */
- void (*cause_intr)( rtems_unsigned32 );
- Shm_Interrupt_information Intr; /* cause intr information */
-};
-
-typedef struct shm_config_info shm_config_table;
-
-/* global variables */
-
-#ifdef _SHM_INIT
-#define SHM_EXTERN
-#else
-#define SHM_EXTERN extern
-#endif
-
-SHM_EXTERN shm_config_table *Shm_Configuration;
-SHM_EXTERN Shm_Interrupt_information *Shm_Interrupt_table;
-SHM_EXTERN Shm_Node_status_control *Shm_Node_statuses;
-SHM_EXTERN Shm_Locked_queue_Control *Shm_Locked_queues;
-SHM_EXTERN Shm_Envelope_control *Shm_Envelopes;
-SHM_EXTERN rtems_configuration_table *Shm_RTEMS_Configuration;
-SHM_EXTERN rtems_multiprocessing_table *Shm_RTEMS_MP_Configuration;
-SHM_EXTERN rtems_unsigned32 Shm_Receive_message_count;
-SHM_EXTERN rtems_unsigned32 Shm_Null_message_count;
-SHM_EXTERN rtems_unsigned32 Shm_Interrupt_count;
-SHM_EXTERN rtems_unsigned32 Shm_Local_node;
-SHM_EXTERN Shm_Locked_queue_Control *Shm_Local_receive_queue;
-SHM_EXTERN Shm_Node_status_control *Shm_Local_node_status;
-SHM_EXTERN rtems_unsigned32 Shm_isrstat;
- /* reported by shmdr */
-
-SHM_EXTERN rtems_unsigned32 Shm_Pending_initialization;
-SHM_EXTERN rtems_unsigned32 Shm_Initialization_complete;
-SHM_EXTERN rtems_unsigned32 Shm_Active_node;
-
-SHM_EXTERN rtems_unsigned32 Shm_Maximum_nodes;
-SHM_EXTERN rtems_unsigned32 Shm_Maximum_envelopes;
-
-SHM_EXTERN rtems_unsigned32 Shm_Locked_queue_End_of_list;
-SHM_EXTERN rtems_unsigned32 Shm_Locked_queue_Not_on_list;
-
-/* functions */
-
-/* locked queue routines */
-void Shm_Locked_queue_Add(
- Shm_Locked_queue_Control *, Shm_Envelope_control * );
-Shm_Envelope_control *Shm_Locked_queue_Get( Shm_Locked_queue_Control * );
-void Shm_Locked_queue_Initialize(
- Shm_Locked_queue_Control *, rtems_unsigned32 );
- /* Shm_Initialize_lock is CPU dependent */
- /* Shm_Lock is CPU dependent */
- /* Shm_Unlock is CPU dependent */
-
-/* portable routines */
-void Init_env_pool();
-void Shm_Print_statistics( void );
-void MPCI_Fatal( Internal_errors_Source, boolean, rtems_unsigned32 );
-rtems_task Shm_Cause_interrupt( rtems_unsigned32 );
-void Shm_Poll();
-void Shm_setclockvec();
-void Shm_Convert_packet( rtems_packet_prefix * );
-
-/* CPU specific routines are inlined in shmcpu.h */
-
-/* target specific routines */
-void *Shm_Convert_address( void * );
-void Shm_Get_configuration( rtems_unsigned32, shm_config_table ** );
-void Shm_isr();
-void Shm_setvec( void );
-
-void Shm_Initialize_lock( Shm_Locked_queue_Control * );
-void Shm_Lock( Shm_Locked_queue_Control * );
-void Shm_Unlock( Shm_Locked_queue_Control * );
-
-/* MPCI entry points */
-rtems_mpci_entry Shm_Get_packet(
- rtems_packet_prefix **
-);
-
-rtems_mpci_entry Shm_Initialization( void );
-
-rtems_mpci_entry Shm_Receive_packet(
- rtems_packet_prefix **
-);
-
-rtems_mpci_entry Shm_Return_packet(
- rtems_packet_prefix *
-);
-
-rtems_mpci_entry Shm_Send_packet(
- rtems_unsigned32,
- rtems_packet_prefix *
-);
-
-extern rtems_mpci_table MPCI_table;
-
-#ifdef _SHM_INIT
-
-/* multiprocessor communications interface (MPCI) table */
-
-rtems_mpci_table MPCI_table = {
- 100000, /* default timeout value in ticks */
- MAX_PACKET_SIZE, /* maximum packet size */
- Shm_Initialization, /* initialization procedure */
- Shm_Get_packet, /* get packet procedure */
- Shm_Return_packet, /* return packet procedure */
- Shm_Send_packet, /* packet send procedure */
- Shm_Receive_packet /* packet receive procedure */
-};
-
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/c/src/libfs/src/imfs/deviceio.c b/c/src/libfs/src/imfs/deviceio.c
deleted file mode 100644
index 0cbdd2a456..0000000000
--- a/c/src/libfs/src/imfs/deviceio.c
+++ /dev/null
@@ -1,221 +0,0 @@
-/*
- * IMFS Device Node Handlers
- *
- * This file contains the set of handlers used to map operations on
- * IMFS device nodes onto calls to the RTEMS Classic API IO Manager.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include <rtems/libio.h>
-#include "libio_.h"
-
-#include "imfs.h"
-
-/*
- * device_open
- *
- * This handler maps an open() operation onto rtems_io_open().
- */
-
-int device_open(
- rtems_libio_t *iop,
- const char *pathname,
- unsigned32 flag,
- unsigned32 mode
-)
-{
- rtems_libio_open_close_args_t args;
- rtems_status_code status;
- IMFS_jnode_t *the_jnode;
-
- the_jnode = iop->file_info;
-
- args.iop = iop;
- args.flags = iop->flags;
- args.mode = mode;
-
- status = rtems_io_open(
- the_jnode->info.device.major,
- the_jnode->info.device.minor,
- (void *) &args
- );
- if ( status )
- return RTEMS_UNSATISFIED;
-
- return 0;
-}
-
-/*
- * device_close
- *
- * This handler maps a close() operation onto rtems_io_close().
- */
-
-int device_close(
- rtems_libio_t *iop
-)
-{
- rtems_libio_open_close_args_t args;
- rtems_status_code status;
- IMFS_jnode_t *the_jnode;
-
- the_jnode = iop->file_info;
-
- args.iop = iop;
- args.flags = 0;
- args.mode = 0;
-
- status = rtems_io_close(
- the_jnode->info.device.major,
- the_jnode->info.device.minor,
- (void *) &args
- );
- if ( status )
- return RTEMS_UNSATISFIED;
-
- return 0;
-}
-
-/*
- * device_read
- *
- * This handler maps a read() operation onto rtems_io_read().
- */
-
-int device_read(
- rtems_libio_t *iop,
- void *buffer,
- unsigned32 count
-)
-{
- rtems_libio_rw_args_t args;
- rtems_status_code status;
- IMFS_jnode_t *the_jnode;
-
- the_jnode = iop->file_info;
-
- args.iop = iop;
- args.offset = iop->offset;
- args.buffer = buffer;
- args.count = count;
- args.flags = iop->flags;
- args.bytes_moved = 0;
-
- status = rtems_io_read(
- the_jnode->info.device.major,
- the_jnode->info.device.minor,
- (void *) &args
- );
-
- if ( status )
- return -1;
-
- return args.bytes_moved;
-}
-
-/*
- * device_write
- *
- * This handler maps a write() operation onto rtems_io_write().
- */
-
-int device_write(
- rtems_libio_t *iop,
- const void *buffer,
- unsigned32 count
-)
-{
- rtems_libio_rw_args_t args;
- rtems_status_code status;
- IMFS_jnode_t *the_jnode;
-
- the_jnode = iop->file_info;
-
- args.iop = iop;
- args.offset = iop->offset;
- args.buffer = (void *) buffer;
- args.count = count;
- args.flags = iop->flags;
- args.bytes_moved = 0;
-
- status = rtems_io_write(
- the_jnode->info.device.major,
- the_jnode->info.device.minor,
- (void *) &args
- );
-
- if ( status )
- return -1;
-
- return args.bytes_moved;
-}
-
-/*
- * device_ioctl
- *
- * This handler maps an ioctl() operation onto rtems_io_ioctl().
- */
-
-int device_ioctl(
- rtems_libio_t *iop,
- unsigned32 command,
- void *buffer
-)
-{
- rtems_libio_ioctl_args_t args;
- rtems_status_code status;
- IMFS_jnode_t *the_jnode;
-
- args.iop = iop;
- args.command = command;
- args.buffer = buffer;
-
- the_jnode = iop->file_info;
-
- status = rtems_io_control(
- the_jnode->info.device.major,
- the_jnode->info.device.minor,
- (void *) &args
- );
-
- if ( status )
- return -1;
-
- return args.ioctl_return;
-}
-
-/*
- * device_lseek
- *
- * This handler eats all lseek() operations.
- */
-
-int device_lseek(
- rtems_libio_t *iop,
- off_t offset,
- int whence
-)
-{
- return 0;
-}
-
-/*
- * device_stat
- *
- * The IMFS_stat() is used.
- */
-
-/*
- * device_rmnod
- *
- * The IMFS_rmnod() is used.
- */
diff --git a/c/src/libfs/src/imfs/imfs.h b/c/src/libfs/src/imfs/imfs.h
deleted file mode 100644
index 38c770a325..0000000000
--- a/c/src/libfs/src/imfs/imfs.h
+++ /dev/null
@@ -1,516 +0,0 @@
-/*
- * Header file for the In-Memory File System
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __IMFS_h
-#define __IMFS_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems.h>
-#include <chain.h>
-
-#include <sys/types.h>
-#include <limits.h>
-#include <rtems/libio.h>
-
-/*
- * File name macros
- */
-
-#define IMFS_is_valid_name_char( _ch ) ( 1 )
-
-#define IMFS_is_separator( _ch ) \
- rtems_filesystem_is_separator( _ch )
-
-/*
- * Data types
- */
-
-struct IMFS_jnode_tt;
-typedef struct IMFS_jnode_tt IMFS_jnode_t;
-
-typedef struct {
- Chain_Control Entries;
- rtems_filesystem_mount_table_entry_t *mt_fs;
-} IMFS_directory_t;
-
-typedef struct {
- rtems_device_major_number major;
- rtems_device_minor_number minor;
-} IMFS_device_t;
-
-typedef struct {
- IMFS_jnode_t *link_node;
-} IMFS_link_t;
-
-typedef struct {
- const char *name;
-} IMFS_sym_link_t;
-
-/*
- * IMFS "memfile" information
- *
- * The data structure for the in-memory "memfiles" is based on classic UNIX.
- *
- * block_ptr is a pointer to a block of IMFS_MEMFILE_BYTES_PER_BLOCK in
- * length which could be data or a table of pointers to blocks.
- *
- * Setting IMFS_MEMFILE_BYTES_PER_BLOCK to different values has a significant
- * impact on the maximum file size supported as well as the amount of
- * memory wasted due to internal file fragmentation. The following
- * is a list of maximum file sizes based on various settings
- *
- * max_filesize with blocks of 16 is 1,328
- * max_filesize with blocks of 32 is 18,656
- * max_filesize with blocks of 64 is 279,488
- * max_filesize with blocks of 128 is 4,329,344
- * max_filesize with blocks of 256 is 68,173,568
- * max_filesize with blocks of 512 is 1,082,195,456
- */
-
-#define IMFS_MEMFILE_BYTES_PER_BLOCK 128
-#define IMFS_MEMFILE_BLOCK_SLOTS \
- (IMFS_MEMFILE_BYTES_PER_BLOCK / sizeof(void *))
-
-typedef unsigned char * block_p;
-typedef block_p *block_ptr;
-
-typedef struct {
- off_t size; /* size of file in bytes */
- block_ptr indirect; /* array of 128 data blocks pointers */
- block_ptr doubly_indirect; /* 128 indirect blocks */
- block_ptr triply_indirect; /* 128 doubly indirect blocks */
-} IMFS_memfile_t;
-
-/*
- * Important block numbers for "memfiles"
- */
-
-#define FIRST_INDIRECT (0)
-#define LAST_INDIRECT (IMFS_MEMFILE_BLOCK_SLOTS - 1)
-
-#define FIRST_DOUBLY_INDIRECT (LAST_INDIRECT + 1)
-#define LAST_DOUBLY_INDIRECT \
- (LAST_INDIRECT + \
- (IMFS_MEMFILE_BLOCK_SLOTS * IMFS_MEMFILE_BLOCK_SLOTS))
-
-#define FIRST_TRIPLY_INDIRECT (LAST_DOUBLY_INDIRECT + 1)
-#define LAST_TRIPLY_INDIRECT \
- (LAST_DOUBLY_INDIRECT +\
- (IMFS_MEMFILE_BLOCK_SLOTS * \
- IMFS_MEMFILE_BLOCK_SLOTS * IMFS_MEMFILE_BLOCK_SLOTS))
-
-#define IMFS_MEMFILE_MAXIMUM_SIZE \
- (LAST_TRIPLY_INDIRECT * IMFS_MEMFILE_BYTES_PER_BLOCK)
-
-/*
- * What types of IMFS file systems entities there can be.
- */
-
-#define IMFS_jnode_types_t rtems_filesystem_node_types_t
-#define IMFS_DIRECTORY RTEMS_FILESYSTEM_DIRECTORY
-#define IMFS_DEVICE RTEMS_FILESYSTEM_DEVICE
-#define IMFS_HARD_LINK RTEMS_FILESYSTEM_HARD_LINK
-#define IMFS_SYM_LINK RTEMS_FILESYSTEM_SYM_LINK
-#define IMFS_MEMORY_FILE RTEMS_FILESYSTEM_MEMORY_FILE
-
-#define IMFS_NUMBER_OF_TYPES (IMFS_MEMORY_FILE + 1)
-
-typedef union {
- IMFS_directory_t directory;
- IMFS_device_t device;
- IMFS_link_t hard_link;
- IMFS_sym_link_t sym_link;
- IMFS_memfile_t file;
-} IMFS_types_union;
-
-/*
- * Maximum length of a "basename" of an IMFS file/node.
- */
-
-#define IMFS_NAME_MAX 32
-
-/*
- * The control structure for an IMFS jnode.
- */
-
-struct IMFS_jnode_tt {
- Chain_Node Node; /* for chaining them together */
- IMFS_jnode_t *Parent; /* Parent node */
- char name[IMFS_NAME_MAX+1]; /* "basename" */
- mode_t st_mode; /* File mode */
- nlink_t st_nlink; /* Link count */
- ino_t st_ino; /* inode */
-
- uid_t st_uid; /* User ID of owner */
- gid_t st_gid; /* Group ID of owner */
-
- time_t st_atime; /* Time of last access */
- time_t st_mtime; /* Time of last modification */
- time_t st_ctime; /* Time of last status change */
- IMFS_jnode_types_t type; /* Type of this entry */
- IMFS_types_union info;
-};
-
-#define IMFS_update_atime( _jnode ) \
- do { \
- struct timeval tv; \
- gettimeofday( &tv, 0 ); \
- _jnode->st_atime = (time_t) tv.tv_sec; \
- } while (0)
-
-#define IMFS_update_mtime( _jnode ) \
- do { \
- struct timeval tv; \
- gettimeofday( &tv, 0 ); \
- _jnode->st_mtime = (time_t) tv.tv_sec; \
- } while (0)
-
-#define IMFS_update_ctime( _jnode ) \
- do { \
- struct timeval tv; \
- gettimeofday( &tv, 0 ); \
- _jnode->st_ctime = (time_t) tv.tv_sec; \
- } while (0)
-
-#define IMFS_atime_mtime_update( _jnode ) \
- do { \
- struct timeval tv; \
- gettimeofday( &tv, 0 ); \
- _jnode->st_mtime = (time_t) tv.tv_sec; \
- _jnode->st_atime = (time_t) tv.tv_sec; \
- } while (0)
-
-typedef struct {
- ino_t ino_count;
- rtems_filesystem_file_handlers_r *memfile_handlers;
- rtems_filesystem_file_handlers_r *directory_handlers;
-} IMFS_fs_info_t;
-
-#define increment_and_check_linkcounts( _fs_info ) \
- ((IMFS_fs_info_t * )_fs_info)->link_counts++; \
- if ( ((IMFS_fs_info_t * )_fs_info)->link_counts > MAXSYMLINKS ) \
- set_errno_and_return_minus_one( ELOOP )
-
-#define decrement_linkcounts( _fs_info ) \
- ((IMFS_fs_info_t * )_fs_info)->link_counts--;
-
-/*
- * Type defination for tokens returned from IMFS_get_token
- */
-
-typedef enum {
- IMFS_NO_MORE_PATH,
- IMFS_CURRENT_DIR,
- IMFS_UP_DIR,
- IMFS_NAME,
- IMFS_INVALID_TOKEN
-} IMFS_token_types;
-
-/*
- * Shared Data
- */
-
-extern rtems_filesystem_file_handlers_r IMFS_directory_handlers;
-extern rtems_filesystem_file_handlers_r IMFS_device_handlers;
-extern rtems_filesystem_file_handlers_r IMFS_link_handlers;
-extern rtems_filesystem_file_handlers_r IMFS_memfile_handlers;
-extern rtems_filesystem_operations_table IMFS_ops;
-extern rtems_filesystem_operations_table miniIMFS_ops;
-extern rtems_filesystem_limits_and_options_t IMFS_LIMITS_AND_OPTIONS;
-
-/*
- * Routines
- */
-
-int IMFS_initialize(
- rtems_filesystem_mount_table_entry_t *mt_entry
-);
-
-int miniIMFS_initialize(
- rtems_filesystem_mount_table_entry_t *mt_entry
-);
-
-int IMFS_initialize_support(
- rtems_filesystem_mount_table_entry_t *mt_entry,
- rtems_filesystem_operations_table *op_table,
- rtems_filesystem_file_handlers_r *memfile_handlers,
- rtems_filesystem_file_handlers_r *directory_handlers
-);
-
-int IMFS_fsunmount(
- rtems_filesystem_mount_table_entry_t *mt_entry
-);
-
-
-/*
- * Returns the number of characters copied from path to token.
- */
-IMFS_token_types IMFS_get_token(
- const char *path,
- char *token,
- int *token_len
-);
-
-void IMFS_dump( void );
-
-void IMFS_initialize_jnode(
- IMFS_jnode_t *the_jnode,
- IMFS_jnode_types_t type,
- IMFS_jnode_t *the_parent,
- char *name,
- mode_t mode
-);
-
-IMFS_jnode_t *IMFS_find_match_in_dir(
- IMFS_jnode_t *directory, /* IN */
- char *name /* IN */
-);
-
-rtems_filesystem_node_types_t IMFS_node_type(
- rtems_filesystem_location_info_t *pathloc /* IN */
-);
-
-int IMFS_stat(
- rtems_filesystem_location_info_t *loc, /* IN */
- struct stat *buf /* OUT */
-);
-
-int IMFS_Set_handlers(
- rtems_filesystem_location_info_t *loc
-);
-
-int IMFS_evaluate_link(
- rtems_filesystem_location_info_t *node, /* IN/OUT */
- int flags /* IN */
-);
-
-int IMFS_eval_path(
- const char *pathname, /* IN */
- int flags, /* IN */
- rtems_filesystem_location_info_t *pathloc /* IN/OUT */
-);
-
-
-int IMFS_link(
- rtems_filesystem_location_info_t *to_loc, /* IN */
- rtems_filesystem_location_info_t *parent_loc, /* IN */
- const char *token /* IN */
-);
-
-int IMFS_unlink(
- rtems_filesystem_location_info_t *pathloc /* IN */
-);
-
-int IMFS_chown(
- rtems_filesystem_location_info_t *pathloc, /* IN */
- uid_t owner, /* IN */
- gid_t group /* IN */
-);
-
-int IMFS_freenodinfo(
- rtems_filesystem_location_info_t *pathloc /* IN */
-);
-
-int IMFS_mknod(
- const char *path, /* IN */
- mode_t mode, /* IN */
- dev_t dev, /* IN */
- rtems_filesystem_location_info_t *pathloc /* IN/OUT */
-);
-
-IMFS_jnode_t *IMFS_create_node(
- rtems_filesystem_location_info_t *parent_loc, /* IN */
- IMFS_jnode_types_t type, /* IN */
- char *name, /* IN */
- mode_t mode, /* IN */
- IMFS_types_union *info /* IN */
-);
-
-int IMFS_evaluate_for_make(
- const char *path, /* IN */
- rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
- const char **name /* OUT */
-);
-
-int IMFS_mount(
- rtems_filesystem_mount_table_entry_t *mt_entry /* IN */
-);
-
-int IMFS_unmount(
- rtems_filesystem_mount_table_entry_t *mt_entry /* IN */
-);
-
-int IMFS_freenod(
- rtems_filesystem_location_info_t *node /* IN/OUT */
-);
-
-int IMFS_memfile_remove(
- IMFS_jnode_t *the_jnode /* IN/OUT */
-);
-
-int memfile_ftruncate(
- rtems_libio_t *iop, /* IN */
- off_t length /* IN */
-);
-
-int imfs_dir_open(
- rtems_libio_t *iop, /* IN */
- const char *pathname, /* IN */
- unsigned32 flag, /* IN */
- unsigned32 mode /* IN */
-);
-
-int imfs_dir_close(
- rtems_libio_t *iop /* IN */
-);
-
-int imfs_dir_read(
- rtems_libio_t *iop, /* IN */
- void *buffer, /* IN */
- unsigned32 count /* IN */
-);
-
-int imfs_dir_lseek(
- rtems_libio_t *iop, /* IN */
- off_t offset, /* IN */
- int whence /* IN */
-);
-
-int imfs_dir_fstat(
- rtems_filesystem_location_info_t *loc, /* IN */
- struct stat *buf /* OUT */
-);
-
-int imfs_dir_rmnod(
- rtems_filesystem_location_info_t *pathloc /* IN */
-);
-
-int memfile_open(
- rtems_libio_t *iop, /* IN */
- const char *pathname, /* IN */
- unsigned32 flag, /* IN */
- unsigned32 mode /* IN */
-);
-
-int memfile_close(
- rtems_libio_t *iop /* IN */
-);
-
-int memfile_read(
- rtems_libio_t *iop, /* IN */
- void *buffer, /* IN */
- unsigned32 count /* IN */
-);
-
-int memfile_write(
- rtems_libio_t *iop, /* IN */
- const void *buffer, /* IN */
- unsigned32 count /* IN */
-);
-
-int memfile_ioctl(
- rtems_libio_t *iop, /* IN */
- unsigned32 command, /* IN */
- void *buffer /* IN */
-);
-
-int memfile_lseek(
- rtems_libio_t *iop, /* IN */
- off_t offset, /* IN */
- int whence /* IN */
-);
-
-int memfile_rmnod(
- rtems_filesystem_location_info_t *pathloc /* IN */
-);
-
-int device_open(
- rtems_libio_t *iop, /* IN */
- const char *pathname, /* IN */
- unsigned32 flag, /* IN */
- unsigned32 mode /* IN */
-);
-
-int device_close(
- rtems_libio_t *iop /* IN */
-);
-
-int device_read(
- rtems_libio_t *iop, /* IN */
- void *buffer, /* IN */
- unsigned32 count /* IN */
-);
-
-int device_write(
- rtems_libio_t *iop, /* IN */
- const void *buffer, /* IN */
- unsigned32 count /* IN */
-);
-
-int device_ioctl(
- rtems_libio_t *iop, /* IN */
- unsigned32 command, /* IN */
- void *buffer /* IN */
-);
-
-int device_lseek(
- rtems_libio_t *iop, /* IN */
- off_t offset, /* IN */
- int whence /* IN */
-);
-
-int IMFS_utime(
- rtems_filesystem_location_info_t *pathloc, /* IN */
- time_t actime, /* IN */
- time_t modtime /* IN */
-);
-
-int IMFS_fchmod(
- rtems_filesystem_location_info_t *loc,
- mode_t mode
-);
-
-int IMFS_symlink(
- rtems_filesystem_location_info_t *parent_loc, /* IN */
- const char *link_name,
- const char *node_name
-);
-
-int IMFS_readlink(
- rtems_filesystem_location_info_t *loc, /* IN */
- char *buf, /* OUT */
- size_t bufsize
-);
-
-int IMFS_fdatasync(
- rtems_libio_t *iop
-);
-
-int IMFS_fcntl(
- int cmd,
- rtems_libio_t *iop
-);
-
-int IMFS_rmnod(
- rtems_filesystem_location_info_t *pathloc /* IN */
-);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/c/src/libfs/src/imfs/imfs_chown.c b/c/src/libfs/src/imfs/imfs_chown.c
deleted file mode 100644
index d9e8f40e7f..0000000000
--- a/c/src/libfs/src/imfs/imfs_chown.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * IMFS_chown
- *
- * This routine is the implementation of the chown() system
- * call for the IMFS.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-#include "libio_.h"
-#include "imfs.h"
-
-int IMFS_chown(
- rtems_filesystem_location_info_t *pathloc, /* IN */
- uid_t owner, /* IN */
- gid_t group /* IN */
-)
-{
- IMFS_jnode_t *jnode;
-#if defined(RTEMS_POSIX_API)
- uid_t st_uid;
-#endif
-
- jnode = (IMFS_jnode_t *) pathloc->node_access;
-
- /*
- * Verify I am the owner of the node or the super user.
- */
-
-#if defined(RTEMS_POSIX_API)
- st_uid = geteuid();
-
- if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
- set_errno_and_return_minus_one( EPERM );
-#endif
-
- jnode->st_uid = owner;
- jnode->st_gid = group;
-
- IMFS_update_ctime( jnode );
-
- return 0;
-}
diff --git a/c/src/libfs/src/imfs/imfs_creat.c b/c/src/libfs/src/imfs/imfs_creat.c
deleted file mode 100644
index 227b5f9300..0000000000
--- a/c/src/libfs/src/imfs/imfs_creat.c
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * IMFS_create_node()
- *
- * Routine to create a new in memory file system node.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
-#include "imfs.h"
-#include "libio_.h"
-
-IMFS_jnode_t *IMFS_create_node(
- rtems_filesystem_location_info_t *parent_loc,
- IMFS_jnode_types_t type,
- char *name,
- mode_t mode,
- IMFS_types_union *info
-)
-{
- IMFS_jnode_t *node;
- struct timeval tv;
- IMFS_jnode_t *parent = NULL;
- IMFS_fs_info_t *fs_info;
- char *sym_name;
-
- if ( parent_loc != NULL )
- parent = parent_loc->node_access;
-
- /*
- * Allocate an IMFS jnode
- */
-
- node = calloc( 1, sizeof( IMFS_jnode_t ) );
- if ( !node )
- return NULL;
-
- /*
- * Fill in the basic information
- */
-
- node->st_nlink = 1;
- node->type = type;
- strncpy( node->name, name, IMFS_NAME_MAX );
-
- /*
- * Fill in the mode and permission information for the jnode structure.
- */
-
- node->st_mode = mode & ~rtems_filesystem_umask;
-
-#if defined(RTEMS_POSIX_API)
- node->st_uid = geteuid();
- node->st_gid = getegid();
-#else
- node->st_uid = 0;
- node->st_gid = 0;
-#endif
-
- /*
- * Now set all the times.
- */
-
- gettimeofday( &tv, 0 );
-
- node->st_atime = (time_t) tv.tv_sec;
- node->st_mtime = (time_t) tv.tv_sec;
- node->st_ctime = (time_t) tv.tv_sec;
-
- /*
- * Set the type specific information
- */
-
- switch (type) {
- case IMFS_DIRECTORY:
- Chain_Initialize_empty(&node->info.directory.Entries);
- break;
-
- case IMFS_HARD_LINK:
- node->info.hard_link.link_node = info->hard_link.link_node;
- break;
-
- case IMFS_SYM_LINK:
- sym_name = calloc( 1, strlen( info->sym_link.name ) + 1 );
- strcpy( sym_name, info->sym_link.name );
- node->info.sym_link.name = sym_name;
- break;
-
- case IMFS_DEVICE:
- node->info.device.major = info->device.major;
- node->info.device.minor = info->device.minor;
- break;
-
- case IMFS_MEMORY_FILE:
- node->info.file.size = 0;
- node->info.file.indirect = 0;
- node->info.file.doubly_indirect = 0;
- node->info.file.triply_indirect = 0;
- break;
-
- default:
- assert(0);
- break;
- }
-
- /*
- * If this node has a parent, then put it in that directory list.
- */
-
- if ( parent ) {
- Chain_Append( &parent->info.directory.Entries, &node->Node );
- node->Parent = parent;
-
- fs_info = parent_loc->mt_entry->fs_info;
- node->st_ino = ++fs_info->ino_count;
- }
-
-
- return node;
-}
diff --git a/c/src/libfs/src/imfs/imfs_debug.c b/c/src/libfs/src/imfs/imfs_debug.c
deleted file mode 100644
index f8151c6c0f..0000000000
--- a/c/src/libfs/src/imfs/imfs_debug.c
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * IMFS debug support routines
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <assert.h>
-#include <string.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <unistd.h> /* for close */
-
-#include <stdio.h>
-#include <sys/stat.h>
-
-#include "imfs.h"
-#include "libio_.h"
-
-/*
- * IMFS_types
- *
- * Printable names for each of the IMFS file system types.
- */
-
-char *IMFS_types[ IMFS_NUMBER_OF_TYPES ] = {
- "directory",
- "device",
- "link",
- "memory file"
-};
-
-/*
- * IMFS_print_jnode
- *
- * This routine prints the contents of the specified jnode.
- */
-
-void IMFS_print_jnode(
- IMFS_jnode_t *the_jnode
-)
-{
- assert( the_jnode );
-
- printf( "%s", the_jnode->name );
- switch( the_jnode->type ) {
- case IMFS_DIRECTORY:
- printf( "/" );
- break;
-
- case IMFS_DEVICE:
- printf( " (device %d, %d)",
- the_jnode->info.device.major, the_jnode->info.device.minor );
- break;
-
- case IMFS_MEMORY_FILE:
- printf( " (file %d %p %p %p)",
- (int)the_jnode->info.file.size,
- the_jnode->info.file.indirect,
- the_jnode->info.file.doubly_indirect,
- the_jnode->info.file.triply_indirect
- );
- break;
-
- case IMFS_HARD_LINK:
- printf( " links not printed\n" );
- assert(0);
- break;
-
- case IMFS_SYM_LINK:
- printf( " links not printed\n" );
- assert(0);
- break;
-
- default:
- printf( " bad type %d\n", the_jnode->type );
- assert(0);
- break;
- }
- puts("");
-}
-
-/*
- * IMFS_dump_directory
- *
- * This routine prints the contents of a directory in the IMFS. If a
- * directory is encountered, then this routine will recurse to process
- * the subdirectory.
- */
-
-void IMFS_dump_directory(
- IMFS_jnode_t *the_directory,
- int level
-)
-{
- Chain_Node *the_node;
- Chain_Control *the_chain;
- IMFS_jnode_t *the_jnode;
- int i;
-
- assert( the_directory );
-
- assert( level >= 0 );
-
- assert( the_directory->type == IMFS_DIRECTORY );
-
- the_chain = &the_directory->info.directory.Entries;
-
- for ( the_node = the_chain->first;
- !_Chain_Is_tail( the_chain, the_node );
- the_node = the_node->next ) {
-
- the_jnode = (IMFS_jnode_t *) the_node;
-
- for ( i=0 ; i<=level ; i++ )
- printf( "...." );
- IMFS_print_jnode( the_jnode );
- if ( the_jnode->type == IMFS_DIRECTORY )
- IMFS_dump_directory( the_jnode, level + 1 );
- }
-}
-
-/*
- * IMFS_dump
- *
- * This routine dumps the entire IMFS that is mounted at the root
- * directory.
- *
- * NOTE: Assuming the "/" directory is bad.
- * Not checking that the starting directory is in an IMFS is bad.
- */
-
-void IMFS_dump( void )
-{
- printf( "*************** Dump of Entire IMFS ***************\n" );
- printf( "/\n" );
- IMFS_dump_directory( rtems_filesystem_root.node_access, 0 );
- printf( "*************** End of Dump ***************\n" );
-}
-
-/*
- * IMFS_memfile_maximum_size()
- *
- * This routine returns the size of the largest file which can be created
- * using the IMFS memory file type.
- *
- */
-
-int IMFS_memfile_maximum_size( void )
-{
- return IMFS_MEMFILE_MAXIMUM_SIZE;
-}
diff --git a/c/src/libfs/src/imfs/imfs_directory.c b/c/src/libfs/src/imfs/imfs_directory.c
deleted file mode 100644
index 1f6d9b5ff5..0000000000
--- a/c/src/libfs/src/imfs/imfs_directory.c
+++ /dev/null
@@ -1,347 +0,0 @@
-/*
- * XXX
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <chain.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-#include <dirent.h>
-
-#include "imfs.h"
-#include "libio_.h"
-
-/* -----------------------------------------------------------------------
- * This rountine will verify that the node being opened as a directory is
- * in fact a directory node. If it is then the offset into the directory
- * will be set to 0 to position to the first directory entry.
- */
-
-int imfs_dir_open(
- rtems_libio_t *iop,
- const char *pathname,
- unsigned32 flag,
- unsigned32 mode
-)
-{
- IMFS_jnode_t *the_jnode;
-
- /* Is the node a directory ? */
- the_jnode = (IMFS_jnode_t *) iop->file_info;
-
- if ( the_jnode->type != IMFS_DIRECTORY )
- return -1; /* It wasn't a directory --> return error */
-
- iop->offset = 0;
- return 0;
-}
-
-
-
-/* -----------------------------------------------------------------------
- * This routine will read the next directory entry based on the directory
- * offset. The offset should be equal to -n- time the size of an individual
- * dirent structure. If n is not an integer multiple of the sizeof a
- * dirent structure, an integer division will be performed to determine
- * directory entry that will be returned in the buffer. Count should reflect
- * -m- times the sizeof dirent bytes to be placed in the buffer.
- * If there are not -m- dirent elements from the current directory position
- * to the end of the exisiting file, the remaining entries will be placed in
- * the buffer and the returned value will be equal to -m actual- times the
- * size of a directory entry.
- */
-
-int imfs_dir_read(
- rtems_libio_t *iop,
- void *buffer,
- unsigned32 count
-)
-{
- /*
- * Read up to element iop->offset in the directory chain of the
- * imfs_jnode_t struct for this file descriptor.
- */
- Chain_Node *the_node;
- Chain_Control *the_chain;
- IMFS_jnode_t *the_jnode;
- int bytes_transferred;
- int current_entry;
- int first_entry;
- int last_entry;
- struct dirent tmp_dirent;
-
- the_jnode = (IMFS_jnode_t *)iop->file_info;
- the_chain = &the_jnode->info.directory.Entries;
-
- if ( Chain_Is_empty( the_chain ) )
- return 0;
-
- /* Move to the first of the desired directory entries */
- the_node = the_chain->first;
-
- bytes_transferred = 0;
- first_entry = iop->offset;
- /* protect against using sizes that are not exact multiples of the */
- /* -dirent- size. These could result in unexpected results */
- last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent);
-
- /* The directory was not empty so try to move to the desired entry in chain*/
- for(
- current_entry = 0;
- current_entry < last_entry;
- current_entry = current_entry + sizeof(struct dirent) ){
-
- if ( Chain_Is_tail( the_chain, the_node ) ){
- /* We hit the tail of the chain while trying to move to the first */
- /* entry in the read */
- return bytes_transferred; /* Indicate that there are no more */
- /* entries to return */
- }
-
- if( current_entry >= first_entry ) {
- /* Move the entry to the return buffer */
- tmp_dirent.d_ino = 1;
- tmp_dirent.d_off = current_entry;
- tmp_dirent.d_reclen = sizeof( struct dirent );
- the_jnode = (IMFS_jnode_t *) the_node;
- tmp_dirent.d_namlen = strlen( the_jnode->name );
- strcpy( tmp_dirent.d_name, the_jnode->name );
- memcpy(
- buffer + bytes_transferred,
- (void *)&tmp_dirent,
- sizeof( struct dirent )
- );
- iop->offset = iop->offset + sizeof(struct dirent);
- bytes_transferred = bytes_transferred + sizeof( struct dirent );
- }
-
- the_node = the_node->next;
- }
-
- /* Success */
- return bytes_transferred;
-}
-
-
-
-/* -----------------------------------------------------------------------
- * This routine will be called by the generic close routine to cleanup any
- * resources that have been allocated for the management of the file
- */
-
-int imfs_dir_close(
- rtems_libio_t *iop
-)
-{
- /* The generic close routine handles the deallocation of the file control */
- /* and associated memory. At present the imfs_dir_close simply */
- /* returns a successful completion status */
-
- return 0;
-}
-
-
-
-/* -----------------------------------------------------------------------
- * This routine will behave in one of three ways based on the state of
- * argument whence. Based on the state of its value the offset argument will
- * be interpreted using one of the following methods:
- *
- * SEEK_SET - offset is the absolute byte offset from the start of the
- * logical start of the dirent sequence that represents the
- * directory
- * SEEK_CUR - offset is used as the relative byte offset from the current
- * directory position index held in the iop structure
- * SEEK_END - N/A --> This will cause an assert.
- */
-
-int imfs_dir_lseek(
- rtems_libio_t *iop,
- off_t offset,
- int whence
-)
-{
- off_t normal_offset;
-
- normal_offset = (offset/sizeof(struct dirent)) * sizeof(struct dirent);
-
-
- switch( whence )
- {
- case SEEK_SET: /* absolute move from the start of the file */
- iop->offset = normal_offset;
- break;
-
- case SEEK_CUR: /* relative move */
- iop->offset = iop->offset + normal_offset;
- break;
-
- case SEEK_END: /* Movement past the end of the directory via lseek */
- /* is not a permitted operation */
- default:
- set_errno_and_return_minus_one( EINVAL );
- break;
-
- }
-
- return 0;
-}
-
-
-
-/* -----------------------------------------------------------------------
- * This routine will obtain the following information concerning the current
- * directory:
- * st_dev 0ll
- * st_ino 1
- * st_mode mode extracted from the jnode
- * st_nlink number of links to this node
- * st_uid uid extracted from the jnode
- * st_gid gid extracted from the jnode
- * st_rdev 0ll
- * st_size the number of bytes in the directory
- * This is calculated by taking the number of entries
- * in the directory and multiplying by the size of a
- * dirent structure
- * st_blksize 0
- * st_blocks 0
- * st_atime time of last access
- * st_mtime time of last modification
- * st_ctime time of the last change
- *
- * This information will be returned to the calling function in a -stat- struct
- *
- */
-
-int imfs_dir_fstat(
- rtems_filesystem_location_info_t *loc,
- struct stat *buf
-)
-{
- Chain_Node *the_node;
- Chain_Control *the_chain;
- IMFS_jnode_t *the_jnode;
-
-
- the_jnode = (IMFS_jnode_t *) loc->node_access;
-
- buf->st_dev = 0ll;
- buf->st_ino = the_jnode->st_ino;
- buf->st_mode = the_jnode->st_mode;
- buf->st_nlink = the_jnode->st_nlink;
- buf->st_uid = the_jnode->st_uid;
- buf->st_gid = the_jnode->st_gid;
- buf->st_rdev = 0ll;
- buf->st_blksize = 0;
- buf->st_blocks = 0;
- buf->st_atime = the_jnode->st_atime;
- buf->st_mtime = the_jnode->st_mtime;
- buf->st_ctime = the_jnode->st_ctime;
-
- buf->st_size = 0;
-
- the_chain = &the_jnode->info.directory.Entries;
-
- /* Run through the chain and count the number of directory entries */
- /* that are subordinate to this directory node */
- for ( the_node = the_chain->first ;
- !_Chain_Is_tail( the_chain, the_node ) ;
- the_node = the_node->next ) {
-
- buf->st_size = buf->st_size + sizeof( struct dirent );
- }
-
- return 0;
-}
-
-/*
- * IMFS_dir_rmnod
- *
- * This routine is available from the optable to remove a node
- * from the IMFS file system.
- */
-
-int imfs_dir_rmnod(
- rtems_filesystem_location_info_t *pathloc /* IN */
-)
-{
- IMFS_jnode_t *the_jnode;
-
- the_jnode = (IMFS_jnode_t *) pathloc->node_access;
-
- /*
- * You cannot remove a node that still has children
- */
-
- if ( ! Chain_Is_empty( &the_jnode->info.directory.Entries ) )
- set_errno_and_return_minus_one( ENOTEMPTY );
-
- /*
- * You cannot remove the file system root node.
- */
-
- if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access )
- set_errno_and_return_minus_one( EBUSY );
-
- /*
- * You cannot remove a mountpoint.
- */
-
- if ( the_jnode->info.directory.mt_fs != NULL )
- set_errno_and_return_minus_one( EBUSY );
-
- /*
- * Take the node out of the parent's chain that contains this node
- */
-
- if ( the_jnode->Parent != NULL ) {
- Chain_Extract( (Chain_Node *) the_jnode );
- the_jnode->Parent = NULL;
- }
-
- /*
- * Decrement the link counter and see if we can free the space.
- */
-
- the_jnode->st_nlink--;
- IMFS_update_ctime( the_jnode );
-
- /*
- * The file cannot be open and the link must be less than 1 to free.
- */
-
- if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) {
-
- /*
- * Is the rtems_filesystem_current is this node?
- */
-
- if ( rtems_filesystem_current.node_access == pathloc->node_access )
- rtems_filesystem_current.node_access = NULL;
-
- /*
- * Free memory associated with a memory file.
- */
-
- free( the_jnode );
- }
-
- return 0;
-
-}
-
-
diff --git a/c/src/libfs/src/imfs/imfs_eval.c b/c/src/libfs/src/imfs/imfs_eval.c
deleted file mode 100644
index 1f1e7c6daf..0000000000
--- a/c/src/libfs/src/imfs/imfs_eval.c
+++ /dev/null
@@ -1,639 +0,0 @@
-/*
- * Evaluation IMFS Node Support Routines
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <assert.h>
-
-#include "imfs.h"
-#include "libio_.h"
-
-#define RTEMS_LIBIO_PERMS_RX (RTEMS_LIBIO_PERMS_SEARCH | RTEMS_LIBIO_PERMS_READ)
-#define RTEMS_LIBIO_PERMS_WX (RTEMS_LIBIO_PERMS_SEARCH | RTEMS_LIBIO_PERMS_WRITE)
-
-#define MAXSYMLINK 5
-
-int IMFS_Set_handlers(
- rtems_filesystem_location_info_t *loc
-)
-{
- IMFS_jnode_t *node = loc->node_access;
- IMFS_fs_info_t *fs_info;
-
- fs_info = loc->mt_entry->fs_info;
- switch( node->type ) {
- case IMFS_DIRECTORY:
- loc->handlers = fs_info->directory_handlers;
- break;
- case IMFS_DEVICE:
- loc->handlers = &IMFS_device_handlers;
- break;
- case IMFS_SYM_LINK:
- case IMFS_HARD_LINK:
- loc->handlers = &IMFS_link_handlers;
- break;
- case IMFS_MEMORY_FILE:
- loc->handlers = fs_info->memfile_handlers;
- break;
- }
-
- return 0;
-}
-
-/*
- * IMFS_evaluate_permission
- *
- * The following routine evaluates that we have permission
- * to do flags on the node.
- */
-
-int IMFS_evaluate_permission(
- rtems_filesystem_location_info_t *node,
- int flags
-)
-{
- uid_t st_uid;
- gid_t st_gid;
- IMFS_jnode_t *jnode;
- int flags_to_test;
-
- if ( !rtems_libio_is_valid_perms( flags ) ) {
- assert( 0 );
- set_errno_and_return_minus_one( EIO );
- }
-
- jnode = node->node_access;
-
-#if defined(RTEMS_POSIX_API)
- st_uid = geteuid();
- st_gid = getegid();
-#else
- st_uid = jnode->st_uid;
- st_gid = jnode->st_gid;
-#endif
-
- /*
- * Check if I am owner or a group member or someone else.
- */
-
- flags_to_test = flags;
-
- if ( st_uid == jnode->st_uid )
- flags_to_test <<= 6;
- else if ( st_gid == jnode->st_gid )
- flags_to_test <<= 3;
- else
- /* must be other - do nothing */;
-
- /*
- * If all of the flags are set we have permission
- * to do this.
- */
- if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
- return 1;
-
- return 0;
-}
-
-/*
- * IMFS_evaluate_hard_link
- *
- * The following routine evaluates a hardlink to the actual node.
- */
-
-int IMFS_evaluate_hard_link(
- rtems_filesystem_location_info_t *node, /* IN/OUT */
- int flags /* IN */
-)
-{
- IMFS_jnode_t *jnode = node->node_access;
- int result = 0;
-
- /*
- * Check for things that should never happen.
- */
-
- if ( jnode->type != IMFS_HARD_LINK )
- rtems_fatal_error_occurred (0xABCD0000);
-
- /*
- * Set the hard link value and the handlers.
- */
-
- node->node_access = jnode->info.hard_link.link_node;
-
- IMFS_Set_handlers( node );
-
- /*
- * Verify we have the correct permissions for this node.
- */
-
- if ( !IMFS_evaluate_permission( node, flags ) )
- set_errno_and_return_minus_one( EACCES );
-
- return result;
-}
-
-
-/*
- * IMFS_evaluate_sym_link
- *
- * The following routine evaluates a symbolic link to the actual node.
- */
-
-int IMFS_evaluate_sym_link(
- rtems_filesystem_location_info_t *node, /* IN/OUT */
- int flags /* IN */
-)
-{
- IMFS_jnode_t *jnode = node->node_access;
- int result = 0;
- int i;
-
- /*
- * Check for things that should never happen.
- */
-
- if ( jnode->type != IMFS_SYM_LINK )
- rtems_fatal_error_occurred (0xABCD0000);
-
- if ( !jnode->Parent )
- rtems_fatal_error_occurred( 0xBAD00000 );
-
-
- /*
- * Move the node_access to either the symbolic links parent or
- * root depending on the symbolic links path.
- */
-
- node->node_access = jnode->Parent;
-
- rtems_filesystem_get_sym_start_loc(
- jnode->info.sym_link.name,
- &i,
- node
- );
-
- /*
- * Use eval path to evaluate the path of the symbolic link.
- */
-
- result = IMFS_eval_path(
- &jnode->info.sym_link.name[i],
- flags,
- node
- );
-
- IMFS_Set_handlers( node );
-
- /*
- * Verify we have the correct permissions for this node.
- */
-
- if ( !IMFS_evaluate_permission( node, flags ) )
- set_errno_and_return_minus_one( EACCES );
-
- return result;
-}
-
-/*
- * IMFS_evaluate_link
- *
- * The following routine returns the real node pointed to by a link.
- */
-
-int IMFS_evaluate_link(
- rtems_filesystem_location_info_t *node, /* IN/OUT */
- int flags /* IN */
-)
-{
- IMFS_jnode_t *jnode;
- int result = 0;
-
- do {
- jnode = node->node_access;
-
- /*
- * Increment and check the link counter.
- */
-
- rtems_filesystem_link_counts ++;
- if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
- rtems_filesystem_link_counts = 0;
- set_errno_and_return_minus_one( ELOOP );
- }
-
- /*
- * Follow the Link node.
- */
-
- if ( jnode->type == IMFS_HARD_LINK )
- result = IMFS_evaluate_hard_link( node, flags );
-
- else if (jnode->type == IMFS_SYM_LINK )
- result = IMFS_evaluate_sym_link( node, flags );
-
- } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
- ( jnode->type == IMFS_HARD_LINK ) ) );
-
- /*
- * Clear link counter.
- */
-
- rtems_filesystem_link_counts = 0;
-
- return result;
-}
-
-
-/*
- * IMFS_evaluate_for_make
- *
- * The following routine evaluate path for a new node to be created.
- * pathloc is returned with a pointer to the parent of the new node.
- * name is returned with a pointer to the first character in the
- * new node name. The parent node is verified to be a directory.
- */
-
-int IMFS_evaluate_for_make(
- const char *path, /* IN */
- rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
- const char **name /* OUT */
-)
-{
- int i = 0;
- int len;
- IMFS_token_types type;
- char token[ IMFS_NAME_MAX + 1 ];
- rtems_filesystem_location_info_t newloc;
- IMFS_jnode_t *node;
- int done = 0;
- int result;
-
- /*
- * This was filled in by the caller and is valid in the
- * mount table.
- */
- node = pathloc->node_access;
-
- /*
- * Evaluate all tokens until we are done or an error occurs.
- */
-
- while( !done ) {
-
- type = IMFS_get_token( &path[i], token, &len );
- i += len;
-
- if ( !pathloc->node_access )
- set_errno_and_return_minus_one( ENOENT );
-
- /*
- * I cannot move out of this directory without execute permission.
- */
-
- if ( type != IMFS_NO_MORE_PATH )
- if ( node->type == IMFS_DIRECTORY )
- if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
- set_errno_and_return_minus_one( EACCES );
-
- node = pathloc->node_access;
-
- switch( type ) {
-
- case IMFS_UP_DIR:
-
- /*
- * Am I at the root of this mounted filesystem?
- */
-
- if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){
-
- /*
- * Am I at the root of all filesystems?
- */
-
- if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
- break;
-
- } else {
- newloc = pathloc->mt_entry->mt_point_node;
- *pathloc = newloc;
- return (*pathloc->ops->evalformake)( &path[i-len], pathloc, name );
- }
- } else {
-
- if ( !node->Parent )
- set_errno_and_return_minus_one( ENOENT );
-
- node = node->Parent;
- }
-
- pathloc->node_access = node;
- break;
-
- case IMFS_NAME:
-
- if ( node->type == IMFS_HARD_LINK ) {
-
- result = IMFS_evaluate_link( pathloc, 0 );
- if ( result == -1 )
- return -1;
-
- } else if ( node->type == IMFS_SYM_LINK ) {
-
- result = IMFS_evaluate_link( pathloc, 0 );
-
- if ( result == -1 )
- return -1;
- }
-
- node = pathloc->node_access;
- if ( !node )
- set_errno_and_return_minus_one( ENOTDIR );
-
- /*
- * Only a directory can be decended into.
- */
-
- if ( node->type != IMFS_DIRECTORY )
- set_errno_and_return_minus_one( ENOTDIR );
-
- /*
- * If we are at a node that is a mount point. Set loc to the
- * new fs root node and let them finish evaluating the path.
- */
-
- if ( node->info.directory.mt_fs != NULL ) {
- newloc = node->info.directory.mt_fs->mt_fs_root;
- *pathloc = newloc;
- return (*pathloc->ops->evalformake)( &path[i-len], pathloc, name );
- }
-
- /*
- * Otherwise find the token name in the present location.
- */
-
- node = IMFS_find_match_in_dir( node, token );
-
- /*
- * If there is no node we have found the name of the node we
- * wish to create.
- */
-
- if ( ! node )
- done = TRUE;
- else
- pathloc->node_access = node;
-
- break;
-
- case IMFS_NO_MORE_PATH:
- set_errno_and_return_minus_one( EEXIST );
- break;
-
- case IMFS_INVALID_TOKEN:
- set_errno_and_return_minus_one( ENAMETOOLONG );
- break;
-
- case IMFS_CURRENT_DIR:
- break;
- }
- }
-
- *name = &path[ i - len ];
-
- /*
- * We have evaluated the path as far as we can.
- * Verify there is not any invalid stuff at the end of the name.
- */
-
- for( ; path[i] != '\0'; i++) {
- if ( !IMFS_is_separator( path[ i ] ) )
- set_errno_and_return_minus_one( ENOENT );
- }
-
- /*
- * Verify we can execute and write to this directory.
- */
-
- result = IMFS_Set_handlers( pathloc );
-
- /*
- * The returned node must be a directory
- */
- node = pathloc->node_access;
- if ( node->type != IMFS_DIRECTORY )
- set_errno_and_return_minus_one( ENOTDIR );
-
- /*
- * We must have Write and execute permission on the returned node.
- */
-
- if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
- set_errno_and_return_minus_one( EACCES );
-
- return result;
-}
-
-
-/*
- * IMFS_eval_path
- *
- * The following routine evaluate path for a node that wishes to be
- * accessed with mode. pathloc is returned with a pointer to the
- * node to be accessed.
- */
-
-int IMFS_eval_path(
- const char *pathname, /* IN */
- int flags, /* IN */
- rtems_filesystem_location_info_t *pathloc /* IN/OUT */
-)
-{
- int i = 0;
- int len;
- IMFS_token_types type = IMFS_CURRENT_DIR;
- char token[ IMFS_NAME_MAX + 1 ];
- rtems_filesystem_location_info_t newloc;
- IMFS_jnode_t *node;
- int result;
-
- if ( !rtems_libio_is_valid_perms( flags ) ) {
- assert( 0 );
- set_errno_and_return_minus_one( EIO );
- }
-
- /*
- * This was filled in by the caller and is valid in the
- * mount table.
- */
-
- node = pathloc->node_access;
-
- /*
- * Evaluate all tokens until we are done or an error occurs.
- */
-
- while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
-
- type = IMFS_get_token( &pathname[i], token, &len );
- i += len;
-
- if ( !pathloc->node_access )
- set_errno_and_return_minus_one( ENOENT );
-
- /*
- * I cannot move out of this directory without execute permission.
- */
- if ( type != IMFS_NO_MORE_PATH )
- if ( node->type == IMFS_DIRECTORY )
- if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
- set_errno_and_return_minus_one( EACCES );
-
- node = pathloc->node_access;
-
- switch( type ) {
- case IMFS_UP_DIR:
-
- /*
- * Am I at the root of this mounted filesystem?
- */
-
- if (pathloc->node_access ==
- pathloc->mt_entry->mt_fs_root.node_access) {
-
- /*
- * Am I at the root of all filesystems?
- */
-
- if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
- break; /* Throw out the .. in this case */
- } else {
- newloc = pathloc->mt_entry->mt_point_node;
- *pathloc = newloc;
- return (*pathloc->ops->evalpath)(&(pathname[i-len]),flags,pathloc);
- }
- } else {
-
- if ( !node->Parent )
- set_errno_and_return_minus_one( ENOENT );
-
- node = node->Parent;
- pathloc->node_access = node;
-
- }
-
- pathloc->node_access = node;
- break;
-
- case IMFS_NAME:
- /*
- * If we are at a link follow it.
- */
-
- if ( node->type == IMFS_HARD_LINK ) {
-
- IMFS_evaluate_hard_link( pathloc, 0 );
-
- node = pathloc->node_access;
- if ( !node )
- set_errno_and_return_minus_one( ENOTDIR );
-
- } else if ( node->type == IMFS_SYM_LINK ) {
-
- result = IMFS_evaluate_sym_link( pathloc, 0 );
-
- node = pathloc->node_access;
- if ( result == -1 )
- return -1;
- }
-
- /*
- * Only a directory can be decended into.
- */
-
- if ( node->type != IMFS_DIRECTORY )
- set_errno_and_return_minus_one( ENOTDIR );
-
- /*
- * If we are at a node that is a mount point. Set loc to the
- * new fs root node and let them finish evaluating the path.
- */
-
- if ( node->info.directory.mt_fs != NULL ) {
- newloc = node->info.directory.mt_fs->mt_fs_root;
- *pathloc = newloc;
- return (*pathloc->ops->evalpath)( &pathname[i-len], flags, pathloc );
- }
-
- /*
- * Otherwise find the token name in the present location.
- */
-
- node = IMFS_find_match_in_dir( node, token );
- if ( !node )
- set_errno_and_return_minus_one( ENOENT );
-
- /*
- * Set the node access to the point we have found.
- */
-
- pathloc->node_access = node;
- break;
-
- case IMFS_NO_MORE_PATH:
- case IMFS_CURRENT_DIR:
- break;
-
- case IMFS_INVALID_TOKEN:
- set_errno_and_return_minus_one( ENAMETOOLONG );
- break;
-
- }
- }
-
- /*
- * Only return root node if this is the base file system.
- */
-
- if ((pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) &&
- (pathloc->node_access != rtems_filesystem_root.node_access) ) {
- newloc = pathloc->mt_entry->mt_point_node;
- *pathloc = newloc;
- }
-
- result = IMFS_Set_handlers( pathloc );
-
- /*
- * Verify we have the correct permissions for this node.
- */
-
- if ( !IMFS_evaluate_permission( pathloc, flags ) )
- set_errno_and_return_minus_one( EACCES );
-
- return result;
-}
-
-
-
-
-
-
-
-
-
diff --git a/c/src/libfs/src/imfs/imfs_fchmod.c b/c/src/libfs/src/imfs/imfs_fchmod.c
deleted file mode 100644
index b766ed74dc..0000000000
--- a/c/src/libfs/src/imfs/imfs_fchmod.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * IMFS file change mode routine.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-
-#include "libio_.h"
-#include "imfs.h"
-
-int IMFS_fchmod(
- rtems_filesystem_location_info_t *loc,
- mode_t mode
-)
-{
- IMFS_jnode_t *jnode;
-#if defined(RTEMS_POSIX_API)
- uid_t st_uid;
-#endif
-
- jnode = loc->node_access;
-
- /*
- * Verify I am the owner of the node or the super user.
- */
-#if defined(RTEMS_POSIX_API)
- st_uid = geteuid();
-
- if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
- set_errno_and_return_minus_one( EPERM );
-#endif
-
- /*
- * Change only the RWX permissions on the jnode to mode.
- */
- if ( mode & (~ (S_IRWXU | S_IRWXG | S_IRWXO ) ) )
- set_errno_and_return_minus_one( EPERM );
-
- jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO);
- jnode->st_mode |= mode;
-
- IMFS_update_ctime( jnode );
-
- return 0;
-}
-
diff --git a/c/src/libfs/src/imfs/imfs_fcntl.c b/c/src/libfs/src/imfs/imfs_fcntl.c
deleted file mode 100644
index c1014a8653..0000000000
--- a/c/src/libfs/src/imfs/imfs_fcntl.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * IMFS_fcntl
- *
- * The following routine does a fcntl on an IMFS node.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "imfs.h"
-
-int IMFS_fcntl(
- int cmd,
- rtems_libio_t *iop
-)
-{
- return 0;
-}
diff --git a/c/src/libfs/src/imfs/imfs_fdatasync.c b/c/src/libfs/src/imfs/imfs_fdatasync.c
deleted file mode 100644
index 6142cc7e0f..0000000000
--- a/c/src/libfs/src/imfs/imfs_fdatasync.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * IMFS_fdatasync
- *
- * The following routine does a sync on an IMFS node. The In Memory
- * File System is always in sync, therefore this routine always returns
- * pass.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "imfs.h"
-
-int IMFS_fdatasync(
- rtems_libio_t *iop
-)
-{
- return 0;
-}
diff --git a/c/src/libfs/src/imfs/imfs_free.c b/c/src/libfs/src/imfs/imfs_free.c
deleted file mode 100644
index 2a5065068c..0000000000
--- a/c/src/libfs/src/imfs/imfs_free.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Free IMFS Node Support Routines
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-
-#include "libio_.h"
-#include "imfs.h"
-
-/*
- * IMFS_freenodinfo
- *
- * This routine is the IMFS free node handler for the file system
- * operations table.
- *
- * The In Memory File System keeps its nodes in memory. This routine
- * is for file sytems that do not.
- */
-
-int IMFS_freenodinfo(
- rtems_filesystem_location_info_t *pathloc /* IN */
-)
-{
- return 0;
-}
-
diff --git a/c/src/libfs/src/imfs/imfs_fsunmount.c b/c/src/libfs/src/imfs/imfs_fsunmount.c
deleted file mode 100644
index 1ae71ee075..0000000000
--- a/c/src/libfs/src/imfs/imfs_fsunmount.c
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * IMFS Initialization
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h> /* for mkdir */
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdlib.h>
-
-#include <assert.h>
-
-#include "imfs.h"
-#include "libio_.h"
-
-#if defined(IMFS_DEBUG)
-#include <stdio.h>
-#endif
-
-/*
- * IMFS_fsunmount
- */
-
-#define jnode_get_control( jnode ) \
- (&jnode->info.directory.Entries)
-
-#define jnode_has_no_children( jnode ) \
- Chain_Is_empty( jnode_get_control( jnode ) )
-
-#define jnode_has_children( jnode ) \
- ( ! jnode_has_no_children( jnode ) )
-
-#define jnode_get_first_child( jnode ) \
- ((IMFS_jnode_t *)( Chain_Head( jnode_get_control( jnode ) )->next))
-
-int IMFS_fsunmount(
- rtems_filesystem_mount_table_entry_t *temp_mt_entry
-)
-{
- IMFS_jnode_t *jnode;
- IMFS_jnode_t *next;
- rtems_filesystem_location_info_t loc;
- int result = 0;
-
- /*
- * Traverse tree that starts at the mt_fs_root and deallocate memory
- * associated memory space
- */
-
- jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access;
- loc = temp_mt_entry->mt_fs_root;
-
- /*
- * Set this to null to indicate that it is being unmounted.
- */
-
- temp_mt_entry->mt_fs_root.node_access = NULL;
-
- do {
- next = jnode->Parent;
- loc.node_access = (void *)jnode;
- IMFS_Set_handlers( &loc );
-
- if ( jnode->type != IMFS_DIRECTORY ) {
- result = IMFS_unlink( &loc );
- if (result != 0)
- return -1;
- jnode = next;
- } else if ( jnode_has_no_children( jnode ) ) {
- result = IMFS_unlink( &loc );
- if (result != 0)
- return -1;
- jnode = next;
- }
- if ( jnode != NULL ) {
- if ( jnode->type == IMFS_DIRECTORY ) {
- if ( jnode_has_children( jnode ) )
- jnode = jnode_get_first_child( jnode );
- }
- }
- } while (jnode != NULL);
-
- return 0;
-}
-
-
-
-
diff --git a/c/src/libfs/src/imfs/imfs_getchild.c b/c/src/libfs/src/imfs/imfs_getchild.c
deleted file mode 100644
index f70a8f292c..0000000000
--- a/c/src/libfs/src/imfs/imfs_getchild.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * IMFS_find_match_in_dir()
- *
- * This routine returns the child name in the given directory.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-#include <assert.h>
-#include "imfs.h"
-
-static char dotname[2] = ".";
-static char dotdotname[2] = "..";
-
-IMFS_jnode_t *IMFS_find_match_in_dir(
- IMFS_jnode_t *directory,
- char *name
-)
-{
- Chain_Node *the_node;
- Chain_Control *the_chain;
- IMFS_jnode_t *the_jnode;
-
- /*
- * Check for fatal errors. A NULL directory show a problem in the
- * the IMFS code.
- */
-
- assert( directory );
- if ( !name )
- return 0;
-
- assert( name );
- if ( !directory )
- return 0;
-
- /*
- * Check for "." and ".."
- */
-
- if ( !strcmp( name, dotname ) )
- return directory;
-
- if ( !strcmp( name, dotdotname ) )
- return directory->Parent;
-
- the_chain = &directory->info.directory.Entries;
-
- for ( the_node = the_chain->first;
- !_Chain_Is_tail( the_chain, the_node );
- the_node = the_node->next ) {
-
- the_jnode = (IMFS_jnode_t *) the_node;
-
- if ( !strcmp( name, the_jnode->name ) )
- return the_jnode;
- }
-
- return 0;
-}
diff --git a/c/src/libfs/src/imfs/imfs_gtkn.c b/c/src/libfs/src/imfs/imfs_gtkn.c
deleted file mode 100644
index 3fd6f8deae..0000000000
--- a/c/src/libfs/src/imfs/imfs_gtkn.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * IMFS_get_token
- *
- * Routine to get a token (name or separator) from the path
- * the length of the token is returned in token_len.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <stdlib.h>
-#include "imfs.h"
-#include "libio_.h"
-
-IMFS_token_types IMFS_get_token(
- const char *path,
- char *token,
- int *token_len
-)
-{
- register int i = 0;
- IMFS_token_types type = IMFS_NAME;
- register char c;
-
- /*
- * Copy a name into token. (Remember NULL is a token.)
- */
- c = path[i];
- while ( (!IMFS_is_separator(c)) && (i <= IMFS_NAME_MAX) ) {
-
- token[i] = c;
-
- if ( i == IMFS_NAME_MAX )
- return IMFS_INVALID_TOKEN;
-
- if ( !IMFS_is_valid_name_char(c) )
- type = IMFS_INVALID_TOKEN;
-
- c = path [++i];
- }
-
- /*
- * Copy a seperator into token.
- */
-
- if ( i == 0 ) {
- token[i] = c;
-
- if ( token[i] != '\0' ) {
- i++;
- type = IMFS_CURRENT_DIR;
- } else {
- type = IMFS_NO_MORE_PATH;
- }
- } else if (token[ i-1 ] != '\0') {
- token[i] = '\0';
- }
-
- /*
- * Set token_len to the number of characters copied.
- */
-
- *token_len = i;
-
- /*
- * If we copied something that was not a seperator see if
- * it was a special name.
- */
-
- if ( type == IMFS_NAME ) {
- if ( strcmp( token, "..") == 0 )
- type = IMFS_UP_DIR;
- else if ( strcmp( token, "." ) == 0 )
- type = IMFS_CURRENT_DIR;
- }
-
- return type;
-}
diff --git a/c/src/libfs/src/imfs/imfs_handlers_device.c b/c/src/libfs/src/imfs/imfs_handlers_device.c
deleted file mode 100644
index 4431819a94..0000000000
--- a/c/src/libfs/src/imfs/imfs_handlers_device.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Device Operations Table for the IMFS
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-
-#include "imfs.h"
-
-/*
- * Handler table for IMFS device nodes
- */
-
-rtems_filesystem_file_handlers_r IMFS_device_handlers = {
- device_open,
- device_close,
- device_read,
- device_write,
- device_ioctl,
- device_lseek,
- IMFS_stat,
- IMFS_fchmod,
- NULL, /* ftruncate */
- NULL, /* fpathconf */
- NULL, /* fsync */
- NULL, /* fdatasync */
- NULL, /* fcntl */
- IMFS_rmnod
-};
diff --git a/c/src/libfs/src/imfs/imfs_handlers_directory.c b/c/src/libfs/src/imfs/imfs_handlers_directory.c
deleted file mode 100644
index 21370c194d..0000000000
--- a/c/src/libfs/src/imfs/imfs_handlers_directory.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Operations Table for Directories for the IMFS
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-
-#include "imfs.h"
-
-/*
- * Set of operations handlers for operations on directories.
- */
-
-rtems_filesystem_file_handlers_r IMFS_directory_handlers = {
- imfs_dir_open,
- imfs_dir_close,
- imfs_dir_read,
- NULL, /* write */
- NULL, /* ioctl */
- imfs_dir_lseek,
- imfs_dir_fstat,
- IMFS_fchmod,
- NULL, /* ftruncate */
- NULL, /* fpathconf */
- NULL, /* fsync */
- IMFS_fdatasync,
- IMFS_fcntl,
- imfs_dir_rmnod
-};
-
-
-
-
-
-
-
-
diff --git a/c/src/libfs/src/imfs/imfs_handlers_link.c b/c/src/libfs/src/imfs/imfs_handlers_link.c
deleted file mode 100644
index b0a057c068..0000000000
--- a/c/src/libfs/src/imfs/imfs_handlers_link.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Link Operations Table for the IMFS
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-
-#include "imfs.h"
-
-/*
- * Handler table for IMFS device nodes
- */
-
-rtems_filesystem_file_handlers_r IMFS_link_handlers = {
- NULL, /* open */
- NULL, /* close */
- NULL, /* read */
- NULL, /* write */
- NULL, /* ioctl */
- NULL, /* lseek */
- NULL, /* stat */
- NULL, /* fchmod */
- NULL, /* ftruncate */
- NULL, /* fpathconf */
- NULL, /* fsync */
- NULL, /* fdatasync */
- NULL, /* fcntl */
- IMFS_rmnod
-};
diff --git a/c/src/libfs/src/imfs/imfs_handlers_memfile.c b/c/src/libfs/src/imfs/imfs_handlers_memfile.c
deleted file mode 100644
index 5133b87198..0000000000
--- a/c/src/libfs/src/imfs/imfs_handlers_memfile.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Memfile Operations Tables for the IMFS
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-
-#include "imfs.h"
-
-/*
- * Set of operations handlers for operations on memfile entities.
- */
-
-rtems_filesystem_file_handlers_r IMFS_memfile_handlers = {
- memfile_open,
- memfile_close,
- memfile_read,
- memfile_write,
- memfile_ioctl,
- memfile_lseek,
- IMFS_stat,
- IMFS_fchmod,
- memfile_ftruncate,
- NULL, /* fpathconf */
- IMFS_fdatasync, /* fsync */
- IMFS_fdatasync,
- IMFS_fcntl,
- memfile_rmnod
-};
diff --git a/c/src/libfs/src/imfs/imfs_init.c b/c/src/libfs/src/imfs/imfs_init.c
deleted file mode 100644
index c2630af78e..0000000000
--- a/c/src/libfs/src/imfs/imfs_init.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * IMFS Initialization
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h> /* for mkdir */
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdlib.h>
-
-#include <assert.h>
-
-#include "imfs.h"
-#include "libio_.h"
-
-#if defined(IMFS_DEBUG)
-#include <stdio.h>
-#endif
-
-/*
- * IMFS file system operations table
- */
-
-rtems_filesystem_operations_table IMFS_ops = {
- IMFS_eval_path,
- IMFS_evaluate_for_make,
- IMFS_link,
- IMFS_unlink,
- IMFS_node_type,
- IMFS_mknod,
- IMFS_chown,
- IMFS_freenodinfo,
- IMFS_mount,
- IMFS_initialize,
- IMFS_unmount,
- IMFS_fsunmount,
- IMFS_utime,
- IMFS_evaluate_link,
- IMFS_symlink,
- IMFS_readlink
-};
-
-/*
- * IMFS_initialize
- */
-
-int IMFS_initialize(
- rtems_filesystem_mount_table_entry_t *temp_mt_entry
-)
-{
- IMFS_initialize_support(
- temp_mt_entry,
- &IMFS_ops,
- &IMFS_memfile_handlers,
- &IMFS_directory_handlers
- );
- return 0;
-}
diff --git a/c/src/libfs/src/imfs/imfs_initsupp.c b/c/src/libfs/src/imfs/imfs_initsupp.c
deleted file mode 100644
index 408789760e..0000000000
--- a/c/src/libfs/src/imfs/imfs_initsupp.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * IMFS Initialization
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h> /* for mkdir */
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdlib.h>
-
-#include <assert.h>
-
-#include "imfs.h"
-#include "libio_.h"
-
-#if defined(IMFS_DEBUG)
-#include <stdio.h>
-#endif
-
-/*
- * IMFS_initialize
- */
-
-int IMFS_initialize_support(
- rtems_filesystem_mount_table_entry_t *temp_mt_entry,
- rtems_filesystem_operations_table *op_table,
- rtems_filesystem_file_handlers_r *memfile_handlers,
- rtems_filesystem_file_handlers_r *directory_handlers
-)
-{
- IMFS_fs_info_t *fs_info;
- IMFS_jnode_t *jnode;
-
- /*
- * Create the root node
- */
-
- temp_mt_entry->mt_fs_root.node_access = IMFS_create_node(
- NULL,
- IMFS_DIRECTORY,
- "",
- ( S_IRWXO | S_IRWXG| S_IRWXU ),
- NULL
- );
-
- temp_mt_entry->mt_fs_root.handlers = directory_handlers;
- temp_mt_entry->mt_fs_root.ops = op_table;
- temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
-
- /*
- * Create custom file system data.
- */
- fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
- if ( !fs_info ){
- free(temp_mt_entry->mt_fs_root.node_access);
- return 1;
- }
- temp_mt_entry->fs_info = fs_info;
-
- /*
- * Set st_ino for the root to 1.
- */
-
- fs_info->ino_count = 1;
- fs_info->memfile_handlers = memfile_handlers;
- fs_info->directory_handlers = directory_handlers;
-
- jnode = temp_mt_entry->mt_fs_root.node_access;
- jnode->st_ino = fs_info->ino_count;
-
- return 0;
-}
diff --git a/c/src/libfs/src/imfs/imfs_link.c b/c/src/libfs/src/imfs/imfs_link.c
deleted file mode 100644
index 6a8fa3c3ef..0000000000
--- a/c/src/libfs/src/imfs/imfs_link.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * IMFS_link
- *
- * The following rouine creates a new link node under parent with the
- * name given in name. The link node is set to point to the node at
- * to_loc.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-#include "imfs.h"
-#include "libio_.h"
-
-int IMFS_link(
- rtems_filesystem_location_info_t *to_loc, /* IN */
- rtems_filesystem_location_info_t *parent_loc, /* IN */
- const char *token /* IN */
-)
-{
- IMFS_types_union info;
- IMFS_jnode_t *new_node;
- char new_name[ IMFS_NAME_MAX + 1 ];
- int i;
-
- /*
- * Verify this node can be linked to.
- */
-
- info.hard_link.link_node = to_loc->node_access;
- if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
- set_errno_and_return_minus_one( EMLINK );
-
- /*
- * Remove any separators at the end of the string.
- */
-
- IMFS_get_token( token, new_name, &i );
-
- /*
- * Create a new link node.
- */
-
- new_node = IMFS_create_node(
- parent_loc,
- IMFS_HARD_LINK,
- new_name,
- ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
- &info
- );
-
- if ( !new_node )
- set_errno_and_return_minus_one( ENOMEM );
-
- /*
- * Increment the link count of the node being pointed to.
- */
-
- info.hard_link.link_node->st_nlink++;
- IMFS_update_ctime( info.hard_link.link_node );
-
- return 0;
-}
-
diff --git a/c/src/libfs/src/imfs/imfs_mknod.c b/c/src/libfs/src/imfs/imfs_mknod.c
deleted file mode 100644
index 05b7ca9a5f..0000000000
--- a/c/src/libfs/src/imfs/imfs_mknod.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * IMFS_mknod
- *
- * Routine to create a node in the IMFS file system.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#include <stdlib.h>
-
-#include "imfs.h"
-#include "libio_.h"
-
-int IMFS_mknod(
- const char *token, /* IN */
- mode_t mode, /* IN */
- dev_t dev, /* IN */
- rtems_filesystem_location_info_t *pathloc /* IN/OUT */
-)
-{
- IMFS_token_types type = 0;
- IMFS_jnode_t *new_node;
- int result;
- char new_name[ IMFS_NAME_MAX + 1 ];
- IMFS_types_union info;
-
- IMFS_get_token( token, new_name, &result );
-
- /*
- * Figure out what type of IMFS node this is.
- */
-
- if ( S_ISDIR(mode) )
- type = IMFS_DIRECTORY;
- else if ( S_ISREG(mode) )
- type = IMFS_MEMORY_FILE;
- else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
- type = IMFS_DEVICE;
- rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
- } else {
- set_errno_and_return_minus_one( EINVAL );
- }
-
- /*
- * Allocate and fill in an IMFS jnode
- */
-
- new_node = IMFS_create_node(
- pathloc,
- type,
- new_name,
- mode,
- &info
- );
-
- if ( !new_node )
- set_errno_and_return_minus_one( ENOMEM );
-
- return 0;
-}
-
diff --git a/c/src/libfs/src/imfs/imfs_mount.c b/c/src/libfs/src/imfs/imfs_mount.c
deleted file mode 100644
index 7b159f476c..0000000000
--- a/c/src/libfs/src/imfs/imfs_mount.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * IMFS_mount
- *
- * This routine will look at a mount table entry that we are going to
- * add to the mount table. If the mount point rtems_filesystem
- * location_info_t struct refers to a node that is a directory,
- * the node will be marked as a mount point by setting its directory.mt_fs
- * pointer to point to the mount table entry that we are about to add
- * to the mount table chain.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-
-#include "imfs.h"
-#include "libio_.h"
-
-int IMFS_mount(
- rtems_filesystem_mount_table_entry_t *mt_entry
-)
-{
- IMFS_jnode_t *node;
-
- node = mt_entry->mt_point_node.node_access;
-
- /*
- * Is the node that we are mounting onto a directory node ?
- */
-
- if ( node->type != IMFS_DIRECTORY )
- set_errno_and_return_minus_one( ENOTDIR );
-
- /*
- * Set mt_fs pointer to point to the mount table entry for
- * the mounted file system.
- */
-
- node->info.directory.mt_fs = mt_entry;
- return 0;
-}
diff --git a/c/src/libfs/src/imfs/imfs_ntype.c b/c/src/libfs/src/imfs/imfs_ntype.c
deleted file mode 100644
index 33beda1bab..0000000000
--- a/c/src/libfs/src/imfs/imfs_ntype.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * IMFS_node_type
- *
- * The following verifies that returns the type of node that the
- * loc refers to.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-#include "imfs.h"
-
-rtems_filesystem_node_types_t IMFS_node_type(
- rtems_filesystem_location_info_t *pathloc /* IN */
-)
-{
- IMFS_jnode_t *node;
-
- node = pathloc->node_access;
- return node->type;
-}
diff --git a/c/src/libfs/src/imfs/imfs_readlink.c b/c/src/libfs/src/imfs/imfs_readlink.c
deleted file mode 100644
index 36bb17815a..0000000000
--- a/c/src/libfs/src/imfs/imfs_readlink.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * IMFS_readlink
- *
- * The following rouine puts the symblic links destination name into
- * buff.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-#include "imfs.h"
-#include "libio_.h"
-
-int IMFS_readlink(
- rtems_filesystem_location_info_t *loc,
- char *buf, /* OUT */
- size_t bufsize
-)
-{
- IMFS_jnode_t *node;
- int i;
-
- node = loc->node_access;
-
- if ( node->type != IMFS_SYM_LINK )
- set_errno_and_return_minus_one( EINVAL );
-
- for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
- buf[i] = node->info.sym_link.name[i];
-
- return i;
-}
diff --git a/c/src/libfs/src/imfs/imfs_rmnod.c b/c/src/libfs/src/imfs/imfs_rmnod.c
deleted file mode 100644
index 3b875145da..0000000000
--- a/c/src/libfs/src/imfs/imfs_rmnod.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * IMFS Node Removal Handler
- *
- * This file contains the handler used to remove a node when a file type
- * does not require special actions.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include <rtems/libio.h>
-#include "libio_.h"
-
-#include "imfs.h"
-
-/*
- * IMFS_rmnod
- */
-
-int IMFS_rmnod(
- rtems_filesystem_location_info_t *pathloc /* IN */
-)
-{
- IMFS_jnode_t *the_jnode;
-
- the_jnode = (IMFS_jnode_t *) pathloc->node_access;
-
- /*
- * Take the node out of the parent's chain that contains this node
- */
-
- if ( the_jnode->Parent != NULL ) {
- Chain_Extract( (Chain_Node *) the_jnode );
- the_jnode->Parent = NULL;
- }
-
- /*
- * Decrement the link counter and see if we can free the space.
- */
-
- the_jnode->st_nlink--;
- IMFS_update_ctime( the_jnode );
-
- /*
- * The file cannot be open and the link must be less than 1 to free.
- */
-
- if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) {
-
- /*
- * Is rtems_filesystem_current this node?
- */
-
- if ( rtems_filesystem_current.node_access == pathloc->node_access )
- rtems_filesystem_current.node_access = NULL;
-
- /*
- * Free memory associated with a memory file.
- */
-
- free( the_jnode );
- }
-
- return 0;
-
-}
-
-
-
diff --git a/c/src/libfs/src/imfs/imfs_stat.c b/c/src/libfs/src/imfs/imfs_stat.c
deleted file mode 100644
index 2edc1a9e9b..0000000000
--- a/c/src/libfs/src/imfs/imfs_stat.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * IMFS_stat
- *
- * This routine provides a stat for the IMFS file system.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-#include "imfs.h"
-#include "libio_.h"
-
-int IMFS_stat(
- rtems_filesystem_location_info_t *loc,
- struct stat *buf
-)
-{
- IMFS_jnode_t *the_jnode;
- IMFS_device_t *io;
-
- the_jnode = loc->node_access;
-
-
- switch ( the_jnode->type ) {
-
- case IMFS_DEVICE:
- io = &the_jnode->info.device;
- buf->st_dev = rtems_filesystem_make_dev_t( io->major, io->minor );
- break;
-
- case IMFS_MEMORY_FILE:
- buf->st_size = the_jnode->info.file.size;
- break;
-
- default:
- set_errno_and_return_minus_one( ENOTSUP );
- break;
- }
-
- buf->st_mode = the_jnode->st_mode;
- buf->st_nlink = the_jnode->st_nlink;
- buf->st_ino = the_jnode->st_ino;
- buf->st_uid = the_jnode->st_uid;
- buf->st_gid = the_jnode->st_gid;
-
- buf->st_atime = the_jnode->st_atime;
- buf->st_mtime = the_jnode->st_mtime;
- buf->st_ctime = the_jnode->st_ctime;
-
- return 0;
-}
diff --git a/c/src/libfs/src/imfs/imfs_symlink.c b/c/src/libfs/src/imfs/imfs_symlink.c
deleted file mode 100644
index 8e795463e3..0000000000
--- a/c/src/libfs/src/imfs/imfs_symlink.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * IMFS_symlink
- *
- * The following rouine creates a new symbolic link node under parent
- * with the name given in name. The node is set to point to the node at
- * to_loc.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-#include "imfs.h"
-#include "libio_.h"
-
-int IMFS_symlink(
- rtems_filesystem_location_info_t *parent_loc,
- const char *link_name,
- const char *node_name
-)
-{
- IMFS_types_union info;
- IMFS_jnode_t *new_node;
- char new_name[ IMFS_NAME_MAX + 1 ];
- int i;
-
- /*
- * Remove any separators at the end of the string.
- */
-
- IMFS_get_token( node_name, new_name, &i );
-
- info.sym_link.name = link_name;
-
- /*
- * Create a new link node.
- */
-
- new_node = IMFS_create_node(
- parent_loc,
- IMFS_SYM_LINK,
- new_name,
- ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
- &info
- );
-
- if ( !new_node )
- set_errno_and_return_minus_one( ENOMEM );
-
- return 0;
-}
-
-
diff --git a/c/src/libfs/src/imfs/imfs_unixstub.c b/c/src/libfs/src/imfs/imfs_unixstub.c
deleted file mode 100644
index 8ee429383c..0000000000
--- a/c/src/libfs/src/imfs/imfs_unixstub.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * IMFS Stub for UNIX configuration
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h> /* for mkdir */
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdlib.h>
-
-#include <assert.h>
-
-#include "imfs.h"
-#include "libio_.h"
-
-#include <stdio.h>
-
-/*
- * IMFS file system operations table
- */
-
-rtems_filesystem_operations_table IMFS_ops = {
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL
-};
-
-/*
- * IMFS file system operations table
- */
-
-rtems_filesystem_operations_table miniIMFS_ops = {
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL
-};
diff --git a/c/src/libfs/src/imfs/imfs_unlink.c b/c/src/libfs/src/imfs/imfs_unlink.c
deleted file mode 100644
index f001c6450d..0000000000
--- a/c/src/libfs/src/imfs/imfs_unlink.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * IMFS_unlink
- *
- * Routine to remove a link node from the tree.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-#include <stdlib.h>
-
-#include "imfs.h"
-#include "libio_.h"
-
-int IMFS_unlink(
- rtems_filesystem_location_info_t *loc /* IN */
-)
-{
- IMFS_jnode_t *node;
- rtems_filesystem_location_info_t the_link;
- int result;
-
- node = loc->node_access;
-
- /*
- * Decrement the link counter of node pointed to and free the
- * space.
- */
-
- /*
- * If this is the last last pointer to the node
- * free the node.
- */
-
- if ( node->type == IMFS_HARD_LINK ) {
-
- if ( !node->info.hard_link.link_node )
- set_errno_and_return_minus_one( EINVAL );
-
- the_link = *loc;
- the_link.node_access = node->info.hard_link.link_node;
- IMFS_Set_handlers( &the_link );
-
- /*
- * If removing the last hard link to a node, then we need
- * to remove the node that is a link and the node itself.
- */
-
- node->info.hard_link.link_node->st_nlink --;
- IMFS_update_ctime( node->info.hard_link.link_node );
- if ( node->info.hard_link.link_node->st_nlink < 1) {
- result = (*the_link.handlers->rmnod)( &the_link );
- if ( result != 0 )
- return -1;
- }
- }
-
- /*
- * Now actually free the node we were asked to free.
- */
-
- result = (*loc->handlers->rmnod)( loc );
-
- return result;
-}
-
diff --git a/c/src/libfs/src/imfs/imfs_unmount.c b/c/src/libfs/src/imfs/imfs_unmount.c
deleted file mode 100644
index 9e07fe0c5e..0000000000
--- a/c/src/libfs/src/imfs/imfs_unmount.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * IMFS_unmount
- *
- * This routine will look at a mount table entry that we are going to
- * add to the mount table. If the mount point
- * rtems_filesystem_location_info_t struct refers to a node that is a
- * directory that has a file system mounted on it, the node will be
- * marked as a mount point by * setting its directory.mt_fs pointer
- * to NULL. This indicates that a directory is no longer mounted on
- * this node.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-
-#include "imfs.h"
-#include "libio_.h"
-
-int IMFS_unmount(
- rtems_filesystem_mount_table_entry_t *mt_entry
-)
-{
- IMFS_jnode_t *node;
-
- node = mt_entry->mt_point_node.node_access;
-
- /*
- * Is the node that we are mounting onto a directory node ?
- */
-
- if ( node->type != IMFS_DIRECTORY )
- set_errno_and_return_minus_one( ENOTDIR );
-
- /*
- * Did the node indicate that there was a directory mounted here?
- */
-
- if ( node->info.directory.mt_fs == NULL )
- set_errno_and_return_minus_one( EINVAL ); /* XXX */
-
- /*
- * Set the mt_fs pointer to indicate that there is no longer
- * a file system mounted to this point.
- */
-
- node->info.directory.mt_fs = NULL;
-
- return 0;
-}
diff --git a/c/src/libfs/src/imfs/imfs_utime.c b/c/src/libfs/src/imfs/imfs_utime.c
deleted file mode 100644
index e20d352c50..0000000000
--- a/c/src/libfs/src/imfs/imfs_utime.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * IMFS_utime
- *
- * This routine is the implementation of the utime() system
- * call for the IMFS.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-#include <sys/time.h>
-
-#include "libio_.h"
-#include "imfs.h"
-
-int IMFS_utime(
- rtems_filesystem_location_info_t *pathloc, /* IN */
- time_t actime, /* IN */
- time_t modtime /* IN */
-)
-{
- IMFS_jnode_t *the_jnode;
-
- the_jnode = (IMFS_jnode_t *) pathloc->node_access;
-
- the_jnode->st_atime = actime;
- the_jnode->st_mtime = modtime;
-
- return 0;
-}
diff --git a/c/src/libfs/src/imfs/ioman.c b/c/src/libfs/src/imfs/ioman.c
deleted file mode 100644
index ee22791657..0000000000
--- a/c/src/libfs/src/imfs/ioman.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * This file emulates the old Classic RTEMS IO manager directives
- * which register and lookup names using the in-memory filesystem.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-
-#include <assert.h>
-
-#include <rtems.h>
-#include "libio_.h"
-#include "imfs.h"
-
-#if defined(__linux__)
-#define S_IFCHR __S_IFCHR
-#endif
-
-/*
- * rtems_io_register_name
- *
- * This assumes that all registered devices are character devices.
- */
-
-rtems_status_code rtems_io_register_name(
- char *device_name,
- rtems_device_major_number major,
- rtems_device_minor_number minor
-)
-{
-#if !defined(RTEMS_UNIX)
- int status;
- dev_t dev;
-
- dev = rtems_filesystem_make_dev_t( major, minor );
- status = mknod( device_name, 0777 | S_IFCHR, dev );
-
- /* this is the only error returned by the old version */
- if ( status )
- return RTEMS_TOO_MANY;
-
-#endif
- return RTEMS_SUCCESSFUL;
-}
-
-/*
- * rtems_io_lookup_name
- *
- * This version is not reentrant.
- *
- * XXX - This is dependent upon IMFS and should not be.
- * Suggest adding a filesystem routine to fill in the device_info.
- */
-
-rtems_status_code rtems_io_lookup_name(
- const char *name,
- rtems_driver_name_t **device_info
-)
-{
-#if !defined(RTEMS_UNIX)
- IMFS_jnode_t *the_jnode;
- rtems_filesystem_location_info_t loc;
- static rtems_driver_name_t device;
- int result;
- rtems_filesystem_node_types_t node_type;
-
- result = rtems_filesystem_evaluate_path( name, 0x00, &loc, TRUE );
- the_jnode = loc.node_access;
-
- node_type = (*loc.ops->node_type)( &loc );
-
- if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
- *device_info = 0;
- rtems_filesystem_freenode( &loc );
- return RTEMS_UNSATISFIED;
- }
-
- device.device_name = (char *) name;
- device.device_name_length = strlen( name );
- device.major = the_jnode->info.device.major;
- device.minor = the_jnode->info.device.minor;
- *device_info = &device;
-
- rtems_filesystem_freenode( &loc );
-
-#endif
- return RTEMS_SUCCESSFUL;
-}
diff --git a/c/src/libfs/src/imfs/memfile.c b/c/src/libfs/src/imfs/memfile.c
deleted file mode 100644
index dad120a0a7..0000000000
--- a/c/src/libfs/src/imfs/memfile.c
+++ /dev/null
@@ -1,1096 +0,0 @@
-/*
- * IMFS Device Node Handlers
- *
- * This file contains the set of handlers used to process operations on
- * IMFS memory file nodes. The memory files are created in memory using
- * malloc'ed memory. Thus any data stored in one of these files is lost
- * at system shutdown unless special arrangements to copy the data to
- * some type of non-volailte storage are made by the application.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <stdlib.h>
-#include <assert.h>
-#include <errno.h>
-
-#include <rtems.h>
-#include <rtems/libio.h>
-#include "imfs.h"
-#include "libio_.h"
-
-#define MEMFILE_STATIC
-
-/*
- * Prototypes of private routines
- */
-
-MEMFILE_STATIC int IMFS_memfile_extend(
- IMFS_jnode_t *the_jnode,
- off_t new_length
-);
-
-MEMFILE_STATIC int IMFS_memfile_addblock(
- IMFS_jnode_t *the_jnode,
- unsigned int block
-);
-
-MEMFILE_STATIC int IMFS_memfile_remove_block(
- IMFS_jnode_t *the_jnode,
- unsigned int block
-);
-
-MEMFILE_STATIC block_p *IMFS_memfile_get_block_pointer(
- IMFS_jnode_t *the_jnode,
- unsigned int block,
- int malloc_it
-);
-
-MEMFILE_STATIC int IMFS_memfile_read(
- IMFS_jnode_t *the_jnode,
- off_t start,
- unsigned char *destination,
- unsigned int length
-);
-
-MEMFILE_STATIC int IMFS_memfile_write(
- IMFS_jnode_t *the_jnode,
- off_t start,
- const unsigned char *source,
- unsigned int length
-);
-
-void *memfile_alloc_block(void);
-
-void memfile_free_block(
- void *memory
-);
-
-/*
- * memfile_open
- *
- * This routine processes the open() system call. Note that there is
- * nothing special to be done at open() time.
- */
-
-int memfile_open(
- rtems_libio_t *iop,
- const char *pathname,
- unsigned32 flag,
- unsigned32 mode
-)
-{
- IMFS_jnode_t *the_jnode;
-
- the_jnode = iop->file_info;
-
- return 0;
-}
-
-/*
- * memfile_close
- *
- * This routine processes the close() system call. Note that there is
- * nothing to flush or memory to free at this point.
- */
-
-int memfile_close(
- rtems_libio_t *iop
-)
-{
- IMFS_jnode_t *the_jnode;
-
- the_jnode = iop->file_info;
-
- return 0;
-}
-
-/*
- * memfile_read
- *
- * This routine processes the read() system call.
- */
-
-int memfile_read(
- rtems_libio_t *iop,
- void *buffer,
- unsigned32 count
-)
-{
- IMFS_jnode_t *the_jnode;
-
- the_jnode = iop->file_info;
-
- return IMFS_memfile_read( the_jnode, iop->offset, buffer, count );
-}
-
-/*
- * memfile_write
- *
- * This routine processes the write() system call.
- */
-
-int memfile_write(
- rtems_libio_t *iop,
- const void *buffer,
- unsigned32 count
-)
-{
- IMFS_jnode_t *the_jnode;
- int status;
-
- the_jnode = iop->file_info;
-
- status = IMFS_memfile_write( the_jnode, iop->offset, buffer, count );
- iop->size = the_jnode->info.file.size;
-
- return status;
-}
-
-/*
- * memfile_ioctl
- *
- * This routine processes the ioctl() system call.
- *
- * NOTE: No ioctl()'s are supported for in-memory files.
- */
-
-int memfile_ioctl(
- rtems_libio_t *iop,
- unsigned32 command,
- void *buffer
-)
-{
- IMFS_jnode_t *the_jnode;
-
- the_jnode = iop->file_info;
-
- return 0;
-}
-
-/*
- * memfile_lseek
- *
- * This routine processes the lseek() system call.
- */
-
-int memfile_lseek(
- rtems_libio_t *iop,
- off_t offset,
- int whence
-)
-{
- IMFS_jnode_t *the_jnode;
-
- the_jnode = iop->file_info;
-
- if (IMFS_memfile_extend( the_jnode, iop->offset ))
- set_errno_and_return_minus_one( ENOSPC );
-
- iop->size = the_jnode->info.file.size;
- return iop->offset;
-}
-
-/*
- * memfile_stat
- *
- * This IMFS_stat() can be used.
- */
-
-/*
- * memfile_ftruncate
- *
- * This routine processes the ftruncate() system call.
- */
-
-int memfile_ftruncate(
- rtems_libio_t *iop,
- off_t length
-)
-{
- IMFS_jnode_t *the_jnode;
-
- the_jnode = iop->file_info;
-
- /*
- * POSIX 1003.1b does not specify what happens if you truncate a file
- * and the new length is greater than the current size. We treat this
- * as an extend operation.
- */
-
- if ( length > the_jnode->info.file.size )
- return IMFS_memfile_extend( the_jnode, length );
-
- /*
- * The in-memory files do not currently reclaim memory until the file is
- * deleted. So we leave the previously allocated blocks in place for
- * future use and just set the length.
- */
-
- the_jnode->info.file.size = length;
- iop->size = the_jnode->info.file.size;
-
- IMFS_update_atime( the_jnode );
-
- return 0;
-}
-
-/*
- * IMFS_memfile_extend
- *
- * This routine insures that the in-memory file is of the length
- * specified. If necessary, it will allocate memory blocks to
- * extend the file.
- */
-
-MEMFILE_STATIC int IMFS_memfile_extend(
- IMFS_jnode_t *the_jnode,
- off_t new_length
-)
-{
- unsigned int block;
- unsigned int new_blocks;
- unsigned int old_blocks;
-
- /*
- * Perform internal consistency checks
- */
-
- assert( the_jnode );
- if ( !the_jnode )
- set_errno_and_return_minus_one( EIO );
-
- assert( the_jnode->type == IMFS_MEMORY_FILE );
- if ( the_jnode->type != IMFS_MEMORY_FILE )
- set_errno_and_return_minus_one( EIO );
-
- if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
- set_errno_and_return_minus_one( EINVAL );
-
- if ( new_length <= the_jnode->info.file.size )
- return 0;
-
- /*
- * Calculate the number of range of blocks to allocate
- */
-
- new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
- old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
-
- /*
- * Now allocate each of those blocks.
- */
-
- for ( block=old_blocks ; block<=new_blocks ; block++ ) {
- if ( IMFS_memfile_addblock( the_jnode, block ) ) {
- for ( ; block>=old_blocks ; block-- ) {
- IMFS_memfile_remove_block( the_jnode, block );
- }
- set_errno_and_return_minus_one( ENOSPC );
- }
- }
-
- /*
- * Set the new length of the file.
- */
-
- the_jnode->info.file.size = new_length;
- return 0;
-}
-
-/*
- * IMFS_memfile_addblock
- *
- * This routine adds a single block to the specified in-memory file.
- */
-
-MEMFILE_STATIC int IMFS_memfile_addblock(
- IMFS_jnode_t *the_jnode,
- unsigned int block
-)
-{
- block_p memory;
- block_p *block_entry_ptr;
-
- assert( the_jnode );
- if ( !the_jnode )
- set_errno_and_return_minus_one( EIO );
-
- assert( the_jnode->type == IMFS_MEMORY_FILE );
- if ( the_jnode->type != IMFS_MEMORY_FILE )
- set_errno_and_return_minus_one( EIO );
-
- block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 );
- if ( *block_entry_ptr )
- return 0;
-
-#if 0
- printf( "%d %p", block, block_entry_ptr );
- fflush(stdout);
-#endif
-
- memory = memfile_alloc_block();
- assert( memory );
- if ( !memory )
- return 1;
- *block_entry_ptr = memory;
-
- return 0;
-}
-
-/*
- * IMFS_memfile_remove_block
- *
- * This routine removes the specified block from the in-memory file.
- *
- * NOTE: This is a support routine and is called only to remove
- * the last block or set of blocks in a file. Removing a
- * block from the middle of a file would be exceptionally
- * dangerous and the results unpredictable.
- */
-
-MEMFILE_STATIC int IMFS_memfile_remove_block(
- IMFS_jnode_t *the_jnode,
- unsigned int block
-)
-{
- block_p *block_entry_ptr;
- block_p ptr;
-
- block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
- ptr = *block_entry_ptr;
- *block_entry_ptr = 0;
-
- memfile_free_block( ptr );
-
- return 1;
-}
-
-/*
- * memfile_free_blocks_in_table
- *
- * This is a support routine for IMFS_memfile_remove. It frees all the
- * blocks in one of the indirection tables.
- */
-
-void memfile_free_blocks_in_table(
- block_p **block_table,
- int entries
-)
-{
- int i;
- block_p *b;
-
- /*
- * Perform internal consistency checks
- */
-
- assert( block_table );
- if ( !block_table )
- return;
-
- /*
- * Now go through all the slots in the table and free the memory.
- */
-
- b = *block_table;
-
- for ( i=0 ; i<entries ; i++ ) {
- if ( b[i] ) {
- memfile_free_block( b[i] );
- b[i] = 0;
- }
- }
-
- /*
- * Now that all the blocks in the block table are free, we can
- * free the block table itself.
- */
-
- memfile_free_block( *block_table );
- *block_table = 0;
-}
-
-/*
- * IMFS_memfile_remove
- *
- * This routine frees all memory associated with an in memory file.
- *
- * NOTE: This is an exceptionally conservative implementation.
- * It will check EVERY pointer which is non-NULL and insure
- * any child non-NULL pointers are freed. Optimistically, all that
- * is necessary is to scan until a NULL pointer is found. There
- * should be no allocated data past that point.
- *
- * In experimentation on the powerpc simulator, it was noted
- * that using blocks which held 128 slots versus 16 slots made
- * a significant difference in the performance of this routine.
- *
- * Regardless until the IMFS implementation is proven, it
- * is better to stick to simple, easy to understand algorithms.
- */
-
-int IMFS_memfile_remove(
- IMFS_jnode_t *the_jnode
-)
-{
- IMFS_memfile_t *info;
- int i;
- int j;
- unsigned int to_free;
- block_p *p;
-
- /*
- * Perform internal consistency checks
- */
-
- assert( the_jnode );
- if ( !the_jnode )
- set_errno_and_return_minus_one( EIO );
-
- assert( the_jnode->type == IMFS_MEMORY_FILE );
- if ( the_jnode->type != IMFS_MEMORY_FILE )
- set_errno_and_return_minus_one( EIO );
-
- /*
- * Eventually this could be set smarter at each call to
- * memfile_free_blocks_in_table to greatly speed this up.
- */
-
- to_free = IMFS_MEMFILE_BLOCK_SLOTS;
-
- /*
- * Now start freeing blocks in this order:
- * + indirect
- * + doubly indirect
- * + triply indirect
- */
-
- info = &the_jnode->info.file;
-
- if ( info->indirect ) {
- memfile_free_blocks_in_table( &info->indirect, to_free );
- }
-
- if ( info->doubly_indirect ) {
-
- for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
- if ( info->doubly_indirect[i] ) {
- memfile_free_blocks_in_table(
- (block_p **)&info->doubly_indirect[i], to_free );
- }
- }
- memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
-
- }
-
- if ( info->triply_indirect ) {
- for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
- p = (block_p *) info->triply_indirect[i];
- for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
- if ( p[j] ) {
- memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
- }
- }
- memfile_free_blocks_in_table(
- (block_p **)&info->triply_indirect[i], to_free );
- }
- memfile_free_blocks_in_table(
- (block_p **)&info->triply_indirect, to_free );
- }
-
- return 0;
-}
-
-/*
- * IMFS_memfile_read
- *
- * This routine read from memory file pointed to by the_jnode into
- * the specified data buffer specified by destination. The file
- * is NOT extended. An offset greater than the length of the file
- * is considered an error. Read from an offset for more bytes than
- * are between the offset and the end of the file will result in
- * reading the data between offset and the end of the file (truncated
- * read).
- */
-
-MEMFILE_STATIC int IMFS_memfile_read(
- IMFS_jnode_t *the_jnode,
- off_t start,
- unsigned char *destination,
- unsigned int length
-)
-{
- block_p *block_ptr;
- unsigned int block;
- unsigned int my_length;
- unsigned int to_copy = 0;
- unsigned int last_byte;
- unsigned int copied;
- unsigned int start_offset;
- unsigned char *dest;
-
- dest = destination;
-
- /*
- * Perform internal consistency checks
- */
-
- assert( the_jnode );
- if ( !the_jnode )
- set_errno_and_return_minus_one( EIO );
-
- assert( the_jnode->type == IMFS_MEMORY_FILE );
- if ( the_jnode->type != IMFS_MEMORY_FILE )
- set_errno_and_return_minus_one( EIO );
-
- /*
- * Error checks on arguments
- */
-
- assert( dest );
- if ( !dest )
- set_errno_and_return_minus_one( EINVAL );
-
- /*
- * If there is nothing to read, then quick exit.
- */
-
- my_length = length;
- if ( !my_length )
- set_errno_and_return_minus_one( EINVAL );
-
- /*
- * If the last byte we are supposed to read is past the end of this
- * in memory file, then shorten the length to read.
- */
-
- last_byte = start + length;
- if ( last_byte > the_jnode->info.file.size )
- my_length = the_jnode->info.file.size - start;
-
- copied = 0;
-
- /*
- * Three phases to the read:
- * + possibly the last part of one block
- * + all of zero of more blocks
- * + possibly the first part of one block
- */
-
- /*
- * Phase 1: possibly the last part of one block
- */
-
- start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
- block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
- if ( start_offset ) {
- to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
- if ( to_copy > my_length )
- to_copy = my_length;
- block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
- assert( block_ptr );
- if ( !block_ptr )
- return copied;
- memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
- dest += to_copy;
- block++;
- my_length -= to_copy;
- copied += to_copy;
- }
-
- /*
- * Phase 2: all of zero of more blocks
- */
-
- to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
- while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
- block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
- assert( block_ptr );
- if ( !block_ptr )
- return copied;
- memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
- dest += to_copy;
- block++;
- my_length -= to_copy;
- copied += to_copy;
- }
-
- /*
- * Phase 3: possibly the first part of one block
- */
-
- assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
-
- if ( my_length ) {
- block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
- assert( block_ptr );
- if ( !block_ptr )
- return copied;
- memcpy( dest, &(*block_ptr)[ 0 ], my_length );
- copied += my_length;
- }
-
- IMFS_update_atime( the_jnode );
-
- return copied;
-}
-
-/*
- * IMFS_memfile_write
- *
- * This routine writes the specified data buffer into the in memory
- * file pointed to by the_jnode. The file is extended as needed.
- */
-
-MEMFILE_STATIC int IMFS_memfile_write(
- IMFS_jnode_t *the_jnode,
- off_t start,
- const unsigned char *source,
- unsigned int length
-)
-{
- block_p *block_ptr;
- unsigned int block;
- int status;
- unsigned int my_length;
- unsigned int to_copy = 0;
- unsigned int last_byte;
- unsigned int start_offset;
- int copied;
- const unsigned char *src;
-
- src = source;
-
- /*
- * Perform internal consistency checks
- */
-
- assert( the_jnode );
- if ( !the_jnode )
- set_errno_and_return_minus_one( EIO );
-
- assert( the_jnode->type == IMFS_MEMORY_FILE );
- if ( the_jnode->type != IMFS_MEMORY_FILE )
- set_errno_and_return_minus_one( EIO );
-
- /*
- * Error check arguments
- */
-
- assert( source );
- if ( !source )
- set_errno_and_return_minus_one( EINVAL );
-
-
- /*
- * If there is nothing to write, then quick exit.
- */
-
- my_length = length;
- if ( !my_length )
- set_errno_and_return_minus_one( EINVAL );
-
- /*
- * If the last byte we are supposed to write is past the end of this
- * in memory file, then extend the length.
- */
-
- last_byte = start + length;
- if ( last_byte > the_jnode->info.file.size ) {
- status = IMFS_memfile_extend( the_jnode, last_byte );
- if ( status )
- set_errno_and_return_minus_one( ENOSPC );
- }
-
- copied = 0;
-
- /*
- * Three phases to the write:
- * + possibly the last part of one block
- * + all of zero of more blocks
- * + possibly the first part of one block
- */
-
- /*
- * Phase 1: possibly the last part of one block
- */
-
- start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
- block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
- if ( start_offset ) {
- to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
- if ( to_copy > my_length )
- to_copy = my_length;
- block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
- assert( block_ptr );
- if ( !block_ptr )
- return copied;
-#if 0
-printf( "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src );
-#endif
- memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
- src += to_copy;
- block++;
- my_length -= to_copy;
- copied += to_copy;
- }
-
- /*
- * Phase 2: all of zero of more blocks
- */
-
- to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
- while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
- block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
- assert( block_ptr );
- if ( !block_ptr )
- return copied;
-#if 0
-printf( "write %d in %d: %*s\n", to_copy, block, to_copy, src );
-#endif
- memcpy( &(*block_ptr)[ 0 ], src, to_copy );
- src += to_copy;
- block++;
- my_length -= to_copy;
- copied += to_copy;
- }
-
- /*
- * Phase 3: possibly the first part of one block
- */
-
- assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
-
- to_copy = my_length;
- if ( my_length ) {
- block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
- assert( block_ptr );
- if ( !block_ptr )
- return copied;
-#if 0
-printf( "write %d in %d: %*s\n", to_copy, block, to_copy, src );
-#endif
- memcpy( &(*block_ptr)[ 0 ], src, my_length );
- my_length = 0;
- copied += to_copy;
- }
-
- IMFS_atime_mtime_update( the_jnode );
-
- return copied;
-}
-
-/*
- * IMFS_memfile_get_block_pointer
- *
- * This routine looks up the block pointer associated with the given block
- * number. If that block has not been allocated and "malloc_it" is
- * TRUE, then the block is allocated. Otherwise, it is an error.
- */
-
-#if 0
-block_p *IMFS_memfile_get_block_pointer_DEBUG(
- IMFS_jnode_t *the_jnode,
- unsigned int block,
- int malloc_it
-);
-
-block_p *IMFS_memfile_get_block_pointer(
- IMFS_jnode_t *the_jnode,
- unsigned int block,
- int malloc_it
-)
-{
- block_p *p;
-
- p = IMFS_memfile_get_block_pointer_DEBUG( the_jnode, block, malloc_it );
- printf( "(%d -> %p) ", block, p );
- return p;
-}
-
-block_p *IMFS_memfile_get_block_pointer_DEBUG(
-#else
-block_p *IMFS_memfile_get_block_pointer(
-#endif
- IMFS_jnode_t *the_jnode,
- unsigned int block,
- int malloc_it
-)
-{
- unsigned int my_block;
- IMFS_memfile_t *info;
- unsigned int singly;
- unsigned int doubly;
- unsigned int triply;
- block_p *p;
- block_p *p1;
- block_p *p2;
-
- /*
- * Perform internal consistency checks
- */
-
- assert( the_jnode );
- if ( !the_jnode )
- return NULL;
-
- assert( the_jnode->type == IMFS_MEMORY_FILE );
- if ( the_jnode->type != IMFS_MEMORY_FILE )
- return NULL;
-
- info = &the_jnode->info.file;
-
- my_block = block;
-
- /*
- * Is the block number in the simple indirect portion?
- */
-
- if ( my_block <= LAST_INDIRECT ) {
-#if 0
-printf( "(s %d) ", block );
-fflush(stdout);
-#endif
- p = info->indirect;
-
- if ( malloc_it ) {
-
- if ( !p ) {
- p = memfile_alloc_block();
- if ( !p )
- return 0;
- info->indirect = p;
- }
- return &info->indirect[ my_block ];
- }
-
- if ( !p )
- return 0;
-
- return &info->indirect[ my_block ];
- }
-
- /*
- * Is the block number in the doubly indirect portion?
- */
-
- if ( my_block <= LAST_DOUBLY_INDIRECT ) {
-#if 0
-printf( "(d %d) ", block );
-fflush(stdout);
-#endif
-
- my_block -= FIRST_DOUBLY_INDIRECT;
-
- singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
- doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
-
- p = info->doubly_indirect;
- if ( malloc_it ) {
-
- if ( !p ) {
- p = memfile_alloc_block();
- if ( !p )
- return 0;
- info->doubly_indirect = p;
- }
-
- p1 = (block_p *)p[ doubly ];
- if ( !p1 ) {
- p1 = memfile_alloc_block();
- if ( !p1 )
- return 0;
- p[ doubly ] = (block_p) p1;
- }
-
- return (block_p *)&p1[ singly ];
- }
-
- if ( !p )
- return 0;
-
- p = (block_p *)p[ doubly ];
- if ( !p )
- return 0;
-
-#if 0
-printf( "(d %d %d %d %d %p %p) ", block, my_block, doubly,
- singly, p, &p[singly] );
-fflush(stdout);
-#endif
- return (block_p *)&p[ singly ];
- }
-
-#if 0
-printf( "(t %d) ", block );
-fflush(stdout);
-#endif
- /*
- * Is the block number in the triply indirect portion?
- */
-
- if ( my_block <= LAST_TRIPLY_INDIRECT ) {
- my_block -= FIRST_TRIPLY_INDIRECT;
-
- singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
- doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
- triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
- doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
-
- p = info->triply_indirect;
-
- if ( malloc_it ) {
- if ( !p ) {
- p = memfile_alloc_block();
- if ( !p )
- return 0;
- info->triply_indirect = p;
- }
-
- p1 = (block_p *) p[ triply ];
- if ( !p1 ) {
- p1 = memfile_alloc_block();
- if ( !p1 )
- return 0;
- p[ triply ] = (block_p) p1;
- }
-
- p2 = (block_p *)p1[ doubly ];
- if ( !p2 ) {
- p2 = memfile_alloc_block();
- if ( !p2 )
- return 0;
- p1[ doubly ] = (block_p) p2;
- }
- return (block_p *)&p2[ singly ];
- }
-
- if ( !p )
- return 0;
-
-#if 0
-printf( "(t %d %d %d %d %d) ", block, my_block, triply, doubly, singly );
-fflush(stdout);
-#endif
- p1 = (block_p *) p[ triply ];
- if ( !p1 )
- return 0;
-
- p2 = (block_p *)p1[ doubly ];
- if ( !p )
- return 0;
-
- return (block_p *)&p2[ singly ];
- }
-
- /*
- * This means the requested block number is out of range.
- */
-
- return 0;
-}
-
-/*
- * memfile_alloc_block
- *
- * Allocate a block for an in-memory file.
- */
-
-int memfile_blocks_allocated = 0;
-
-void *memfile_alloc_block(void)
-{
- void *memory;
-
- memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK);
- if ( memory )
- memfile_blocks_allocated++;
-
- return memory;
-}
-
-/*
- * memfile_free_block
- *
- * Free a block from an in-memory file.
- */
-
-void memfile_free_block(
- void *memory
-)
-{
-#if 0
-printf( "(d %p) ", memory );
-fflush(stdout);
-#endif
- free(memory);
- memfile_blocks_allocated--;
-}
-
-
-/*
- * memfile_rmnod
- *
- * This routine is available from the optable to remove a node
- * from the IMFS file system.
- */
-
-int memfile_rmnod(
- rtems_filesystem_location_info_t *pathloc /* IN */
-)
-{
- IMFS_jnode_t *the_jnode;
-
- the_jnode = (IMFS_jnode_t *) pathloc->node_access;
-
- /*
- * Take the node out of the parent's chain that contains this node
- */
-
- if ( the_jnode->Parent != NULL ) {
- Chain_Extract( (Chain_Node *) the_jnode );
- the_jnode->Parent = NULL;
- }
-
- /*
- * Decrement the link counter and see if we can free the space.
- */
-
- the_jnode->st_nlink--;
- IMFS_update_ctime( the_jnode );
-
- /*
- * The file cannot be open and the link must be less than 1 to free.
- */
-
- if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) {
-
- /*
- * Is the rtems_filesystem_current is this node?
- */
-
- if ( rtems_filesystem_current.node_access == pathloc->node_access )
- rtems_filesystem_current.node_access = NULL;
-
- /*
- * Free memory associated with a memory file.
- */
-
- IMFS_memfile_remove( the_jnode );
-
- free( the_jnode );
- }
-
- return 0;
-
-}
-
-
diff --git a/c/src/libfs/src/imfs/miniimfs_init.c b/c/src/libfs/src/imfs/miniimfs_init.c
deleted file mode 100644
index b2e4fa936e..0000000000
--- a/c/src/libfs/src/imfs/miniimfs_init.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Mini-IMFS Initialization
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h> /* for mkdir */
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdlib.h>
-
-#include <assert.h>
-
-#include "imfs.h"
-#include "libio_.h"
-
-#if defined(IMFS_DEBUG)
-#include <stdio.h>
-#endif
-
-/*
- * miniIMFS file system operations table
- */
-
-rtems_filesystem_operations_table miniIMFS_ops = {
- IMFS_eval_path,
- IMFS_evaluate_for_make,
- NULL, /* XXX IMFS_link, */
- NULL, /* XXX IMFS_unlink, */
- IMFS_node_type,
- IMFS_mknod,
- NULL, /* XXX IMFS_chown, */
- NULL, /* XXX IMFS_freenodinfo, */
- NULL, /* XXX IMFS_mount, */
- miniIMFS_initialize,
- NULL, /* XXX IMFS_unmount, */
- NULL, /* XXX IMFS_fsunmount, */
- NULL, /* XXX IMFS_utime, */
- NULL, /* XXX IMFS_evaluate_link, */
- NULL, /* XXX IMFS_symlink, */
- NULL /* XXX IMFS_readlink */
-};
-
-/*
- * miniIMFS_initialize
- */
-
-int miniIMFS_initialize(
- rtems_filesystem_mount_table_entry_t *temp_mt_entry
-)
-{
- IMFS_initialize_support(
- temp_mt_entry,
- &miniIMFS_ops,
- &rtems_filesystem_null_handlers, /* for memfiles */
- &rtems_filesystem_null_handlers /* for directories */
- );
- return 0;
-}
-
-
-
diff --git a/c/src/librdbg/src/powerpc/new_exception_processing/Makefile.am b/c/src/librdbg/src/powerpc/new_exception_processing/Makefile.am
deleted file mode 100644
index 7dec77f067..0000000000
--- a/c/src/librdbg/src/powerpc/new_exception_processing/Makefile.am
+++ /dev/null
@@ -1,93 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-VPATH = @srcdir@:@srcdir@/..:@srcdir@/../..
-
-LIBNAME = librdbg
-LIB = ${ARCH}/${LIBNAME}.a
-
-# C and C++ source names
-C_FILES = rdbg.c servcon.c servbkpt.c servrpc.c excep.c excep_f.c servtgt.c \
- servtsp.c servutil.c _servtgt.c rdbg_f.c ptrace.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-# Asm source names
-S_FILES = rdbg_cpu_asm.S
-S_O_FILES = $(S_FILES:%.S=${ARCH}/%.o)
-
-# Generated C source names
-GEN_C_FILES = remdeb_xdr.c remdeb_svc.c
-GEN_C_O_FILES = $(GEN_C_FILES:%.c=${ARCH}/%.o)
-
-# H source names
-H_FILES = remdeb.h
-
-# X source names
-X_FILES = remdeb.x remdeb_f.x
-
-OBJS = $(GEN_C_O_FILES) $(C_O_FILES) $(S_O_FILES)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../automake/lib.am
-
-#
-# Add local stuff here using +=
-#
-
-MAINTAINERCLEANFILES += $(H_FILES) $(GEN_C_FILES)
-
-FRONTEND = \"$(RTEMS_CPU)/mcp750/remdeb_f.x\"
-
-$(PROJECT_RELEASE)/lib/$(LIBNAME)$(LIBVARIANT).a: $(LIB)
- $(INSTALL_DATA) $< $@
-
-$(LIB): ${OBJS}
- $(make-library)
-
-$(srcdir)/remdeb.h: $(X_FILES)
-if RPCTOOLS
- @rm -f $@
- ( cd $(top_srcdir)/src; \
- $(RPCGEN) -h -DFRONTEND=$(FRONTEND) \
- -o powerpc/mcp750/remdeb.h remdeb.x )
-endif
-$(srcdir)/remdeb_xdr.c: $(X_FILES)
-if RPCTOOLS
- @rm -f $@
- ( cd $(top_srcdir)/src; \
- $(RPCGEN) -c -DFRONTEND=$(FRONTEND) \
- -o powerpc/mcp750/remdeb_xdr.c remdeb.x )
-endif
-
-$(srcdir)/remdeb_svc.c: $(X_FILES)
-if RPCTOOLS
- @rm -f $@ tmpSvc.c
- ( cd $(top_srcdir)/src; \
- $(RPCGEN) -m -DFRONTEND=$(FRONTEND) \
- -o powerpc/mcp750/tmpSvc.c remdeb.x; \
- $(AWK) -f ./awk.svc THEPROG="remdeb.h" powerpc/mcp750/tmpSvc.c \
- > powerpc/mcp750/remdeb_svc.c; \
- rm -f powerpc/mcp750/tmpSvc.c )
-endif
-
-$(PROJECT_INCLUDE)/rdbg/remdeb.h: $(srcdir)/remdeb.h
- $(INSTALL_DATA) $< $@
-
-$(PROJECT_INCLUDE)/rdbg:
- @$(mkinstalldirs) $@
-
-PREINSTALL_FILES = \
-$(PROJECT_INCLUDE)/rdbg \
-$(PROJECT_INCLUDE)/rdbg/remdeb.h
-
-TMPINSTALL_FILES += \
-$(PROJECT_RELEASE)/lib/$(LIBNAME)$(LIBVARIANT).a
-
-all-local: ${ARCH} $(PREINSTALL_FILES) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = remdeb_f.x $(GEN_C_FILES)
-
-include $(top_srcdir)/../../../automake/local.am
diff --git a/c/src/librdbg/src/powerpc/new_exception_processing/remdeb.h b/c/src/librdbg/src/powerpc/new_exception_processing/remdeb.h
deleted file mode 100644
index 1be1c873e3..0000000000
--- a/c/src/librdbg/src/powerpc/new_exception_processing/remdeb.h
+++ /dev/null
@@ -1,581 +0,0 @@
-/*
- * Please do not edit this file.
- * It was generated using rpcgen.
- */
-
-#ifndef _REMDEB_H_RPCGEN
-#define _REMDEB_H_RPCGEN
-
-#include <rpc/rpc.h>
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define RTEMS_PORT 2071
-#define RTEMS_BACK_PORT 2073
-#ifndef REMDEB_H
-#define RPCGENSRVNAME(a) a
-
-enum rpc_type {
- SUNRPC = 0,
- BADRPCTYPE = 25,
-};
-typedef enum rpc_type rpc_type;
-#define NET_SAFE 1400
-
-struct UDP_MSG {
- u_char type;
- u_char msg_num;
- u_short spec;
- long pid;
- u_long context;
-};
-typedef struct UDP_MSG UDP_MSG;
-/*
- * Sun request values for the remote ptrace system call
- */
-
-
-enum ptracereq {
- RPT_TRACEME = 0,
- RPT_CHILDDONE = 0,
- RPT_PEEKTEXT = 0 + 1,
- RPT_PEEKDATA = 0 + 2,
- RPT_PEEKUSER = 0 + 3,
- RPT_POKETEXT = 0 + 4,
- RPT_POKEDATA = 0 + 5,
- RPT_POKEUSER = 0 + 6,
- RPT_CONT = 0 + 7,
- RPT_KILL = 0 + 8,
- RPT_SINGLESTEP = 0 + 9,
- RPT_ATTACH = 0 + 10,
- RPT_DETACH = 0 + 11,
- RPT_GETREGS = 0 + 12,
- RPT_SETREGS = 0 + 13,
- RPT_GETFPREGS = 0 + 14,
- RPT_SETFPREGS = 0 + 15,
- RPT_READDATA = 0 + 16,
- RPT_WRITEDATA = 0 + 17,
- RPT_READTEXT = 0 + 18,
- RPT_WRITETEXT = 0 + 19,
- RPT_GETFPAREGS = 0 + 20,
- RPT_SETFPAREGS = 0 + 21,
- RPT_22 = 0 + 22,
- RPT_23 = 0 + 23,
- RPT_SYSCALL = 0 + 24,
- RPT_DUMPCORE = 0 + 25,
- RPT_26 = 0 + 26,
- RPT_27 = 0 + 27,
- RPT_28 = 0 + 28,
- RPT_GETUCODE = 0 + 29,
- RPT_GETTARGETTHREAD = 50,
- RPT_SETTARGETTHREAD = 51,
- RPT_THREADSUSPEND = 52,
- RPT_THREADRESUME = 53,
- RPT_THREADLIST = 54,
- RPT_GETTHREADNAME = 55,
- RPT_SETTHREADNAME = 56,
- RPT_SETTHREADREGS = 57,
- RPT_GETTHREADREGS = 58,
- RPT_STEPRANGE = 75,
- RPT_CONTTO = 76,
- RPT_SETBREAK = 77,
- RPT_CLRBREAK = 78,
- RPT_GETBREAK = 79,
- RPT_GETNAME = 80,
- RPT_STOP = 81,
- RPT_PGETREGS = 82,
- RPT_PSETREGS = 83,
- RPT_PSETTHREADREGS = 84,
- RPT_PGETTHREADREGS = 85,
-};
-typedef enum ptracereq ptracereq;
-
-struct xdr_regs {
- u_int tabreg[40];
-};
-typedef struct xdr_regs xdr_regs;
-/* now define register macros to apply to xdr_regs struct */
-
-#define R_PC 0
-#define R_MSR 1
-#define R_EXCEPNB 2
-#define R_R0 3
-#define R_R1 (R_R0 + 1)
-#define R_R2 (R_R0 + 2)
-#define R_R3 (R_R0 + 3)
-#define R_R4 (R_R0 + 4)
-#define R_R5 (R_R0 + 5)
-#define R_R6 (R_R0 + 6)
-#define R_R7 (R_R0 + 7)
-#define R_R8 (R_R0 + 8)
-#define R_R9 (R_R0 + 9)
-#define R_R10 (R_R0 + 10)
-#define R_R11 (R_R0 + 11)
-#define R_R12 (R_R0 + 12)
-#define R_R13 (R_R0 + 13)
-#define R_R14 (R_R0 + 14)
-#define R_R15 (R_R0 + 15)
-#define R_R16 (R_R0 + 16)
-#define R_R17 (R_R0 + 17)
-#define R_R18 (R_R0 + 18)
-#define R_R19 (R_R0 + 19)
-#define R_R20 (R_R0 + 20)
-#define R_R21 (R_R0 + 21)
-#define R_R22 (R_R0 + 22)
-#define R_R23 (R_R0 + 23)
-#define R_R24 (R_R0 + 24)
-#define R_R25 (R_R0 + 25)
-#define R_R26 (R_R0 + 26)
-#define R_R27 (R_R0 + 27)
-#define R_R28 (R_R0 + 28)
-#define R_R29 (R_R0 + 29)
-#define R_R30 (R_R0 + 30)
-#define R_R31 (R_R0 + 31)
-#define R_CR 35
-#define R_CTR 36
-#define R_XER 37
-#define R_LR 38
-#define R_MQ 39
-
-#include <libcpu/raw_exception.h>
-
-#define REG_PC tabreg[R_PC] /* PC register offset */
-#define REG_SP tabreg[R_R1] /* SP register offset */
-#define REG_FP tabreg[R_R1] /* SP register offset (no FP on PPC) */
-#define BREAK_SIZE 4 /* Breakpoint occupies 4 bytes */
-#define BREAK_ADJ 0 /* Nothing to subtract from address after bp */
-#define IS_BREAK(l) ((l) == 0x7d8d6808)
-#define SET_BREAK(l) (0x7d8d6808)
-#define ORG_BREAK(c,p) (p)
-#define IS_STEP(regs) (regs.tabreg[R_EXCEPNB] == ASM_TRACE_VECTOR) /* Was step and not break */
-#define TARGET_PROC_TYPE 3
-#define MAXDEBUGGEE 150
-#define NAMEMAX 17
- /*
- * Memory data for read/write text or data. The size is in data. The target
- * addr is in the addr field.
- * Be careful before modifying because this value goes into internal
- * pipes and is allocated on stack too. Pipes and/or the stack could
- * become too small if this value gets incremented.
- */
-#define MEM_DATA_MAX 256
-
-struct xdr_mem {
- u_long addr;
- u_int dataNb;
- u_char data[MEM_DATA_MAX];
-};
-typedef struct xdr_mem xdr_mem;
-
-enum break_type {
- BRKT_NONE = 0,
- BRKT_INSTR = 1,
- BRKT_READ = 2,
- BRKT_WRITE = 3,
- BRKT_ACCESS = 4,
- BRKT_EXEC = 5,
- BRKT_OS_CALL = 6,
- BRKT_OS_SWITCH = 7,
- BRKT_STEPEMUL = 8,
-};
-typedef enum break_type break_type;
-#define MAX_THRD_BRK 4
-
-struct xdr_break {
- u_char type;
- u_char thread_spec;
- u_short handle;
- u_long ee_loc;
- u_long ee_type;
- u_short length;
- u_char pass_count;
- u_char curr_pass;
- u_long thread_list[MAX_THRD_BRK];
-};
-typedef struct xdr_break xdr_break;
-#define UTHREAD_MAX 64
-#define THREADNAMEMAX 16
-
-typedef char *thread_name;
-
-struct KernThread {
- u_int threadLi;
-};
-typedef struct KernThread KernThread;
-typedef KernThread *ptThreadList;
-
-struct thread_list {
- u_int nbThread;
- ptThreadList threads;
-};
-typedef struct thread_list thread_list;
-
-struct ptrace_addr_data_in {
- ptracereq req;
- union {
- xdr_regs regs;
- struct {
- u_int pregs_len;
- u_int *pregs_val;
- } pregs;
- thread_name name;
- xdr_mem mem;
- xdr_break breakp;
- u_int address;
- } ptrace_addr_data_in_u;
-};
-typedef struct ptrace_addr_data_in ptrace_addr_data_in;
-
-struct ptrace_addr_data_out {
- ptracereq req;
- union {
- xdr_regs regs;
- struct {
- u_int pregs_len;
- u_int *pregs_val;
- } pregs;
- thread_list threads;
- thread_name name;
- xdr_mem mem;
- xdr_break breakp;
- u_int addr;
- } ptrace_addr_data_out_u;
-};
-typedef struct ptrace_addr_data_out ptrace_addr_data_out;
-
-typedef struct {
- u_int CHAR_DATA_len;
- char *CHAR_DATA_val;
-} CHAR_DATA;
-#define XRY_MAX_INST_BUFF 128
-#define XRY_MAX_INSTANCES 16
-#ifndef XRY_MAX_CMD_STR
-#define XRY_MAX_CMD_STR 320
-#endif /* REMDEB_H */
-
-struct xry_inst {
- u_char flags;
- u_char type;
- u_char sub_type;
- u_char res_type;
- u_long value;
- u_long value2;
-};
-typedef struct xry_inst xry_inst;
-
-struct instance {
- struct xry_inst instances[XRY_MAX_INSTANCES];
- u_char buffer[XRY_MAX_INST_BUFF];
-};
-typedef struct instance instance;
-
-struct instance_union {
- bool_t instances;
- union {
- instance inst;
- char *buffer;
- } instance_union_u;
-};
-typedef struct instance_union instance_union;
-
-typedef char *one_arg;
-#define XRY_MAX_OBJ_NAME 32
- /* now open_connex() routine which establishes a connection to server */
-
-enum debug_type {
- DEBTYP_PROCESS = 0,
- DEBTYP_C_ACTOR = 1,
- DEBTYP_KERNEL = 2,
- DEBTYP_OTHER = 3,
-};
-typedef enum debug_type debug_type;
-#define DEBUGGER_IS_GDB 0x2 /* */
-
-struct open_in {
- u_char back_port[16];
- u_short debug_type;
- u_short flags;
- u_char destination[16];
- one_arg user_name;
-};
-typedef struct open_in open_in;
-
-struct open_out {
- u_long port;
- u_int pad[4];
- u_int fp;
- u_char cmd_table_num;
- u_char cmd_table_vers;
- u_short server_vers;
-};
-typedef struct open_out open_out;
- /* now close_connex() routine which detaches from server */
-
-enum close_control {
- CLOSE_IGNORE = 0,
- CLOSE_KILL = 1,
- CLOSE_DETACH = 2,
-};
-typedef enum close_control close_control;
-
-struct close_in {
- close_control control;
-};
-typedef struct close_in close_in;
- /* now send_signal() routine which sends signals to processes like kill(2) */
-
-struct signal_in {
- int pid;
- int sig;
-};
-typedef struct signal_in signal_in;
-
-struct signal_out {
- int kill_return;
- int errNo;
-};
-typedef struct signal_out signal_out;
- /* now wait_info() routine which returns results of polling the wait status
- of a process/actor. It may return 0 if running, else pid or -1 */
-
-enum stop_code {
- STOP_ERROR = 0,
- STOP_NONE = 1,
- STOP_UNKNOWN = 2,
- STOP_BREAK = 3,
- STOP_STEP = 4,
- STOP_SIGNAL = 5,
- STOP_TERM_EXIT = 6,
- STOP_TERM_SIG = 7,
- STOP_DETACHED = 8,
- STOP_KILLED = 9,
- STOP_SPAWN_FAILED = 10,
-};
-typedef enum stop_code stop_code;
-
-struct wait_in {
- int pid;
-};
-typedef struct wait_in wait_in;
-
-struct wait_out {
- int wait_return;
- int errNo;
- int status;
- stop_code reason;
- int handle;
- u_long PC;
- u_long SP;
- u_long FP;
- u_long thread;
-};
-typedef struct wait_out wait_out;
- /* now ptrace() routine. This matches the Sun UNIX ptrace as well as
- some additions */
-#define PTRFLG_FORCE 1
-#define PTRFLG_NON_OWNER 2
-#define PTRFLG_FREE 4
-#define PTRDET_UNOWN 0x100
-
-struct ptrace_in {
- int pid;
- ptrace_addr_data_in addr;
- u_int data;
- u_int flags;
-};
-typedef struct ptrace_in ptrace_in;
-
-struct ptrace_out {
- ptrace_addr_data_out addr;
- int result;
- int errNo;
-};
-typedef struct ptrace_out ptrace_out;
-
-struct one_symbol {
- char *symbolName;
- long symbolValue;
-};
-typedef struct one_symbol one_symbol;
-
-typedef struct {
- u_int all_symbols_len;
- one_symbol *all_symbols_val;
-} all_symbols;
-
-struct get_global_symbols_out {
- all_symbols symbols;
-};
-typedef struct get_global_symbols_out get_global_symbols_out;
-
-struct get_text_data_in {
- int pid;
- char *actorName;
-};
-typedef struct get_text_data_in get_text_data_in;
-
-struct get_text_data_out {
- int result;
- int errNo;
- u_long textStart;
- u_long textSize;
- u_long dataStart;
- u_long dataSize;
-};
-typedef struct get_text_data_out get_text_data_out;
-
-struct one_signal {
- u_int number;
- char *name;
-};
-typedef struct one_signal one_signal;
-
-typedef struct {
- u_int all_signals_len;
- one_signal *all_signals_val;
-} all_signals;
-
-struct get_signal_names_out {
- all_signals signals;
-};
-typedef struct get_signal_names_out get_signal_names_out;
- /* now define the actual calls we support */
-#define REMDEB_H
-#endif
-
-#define REMOTEDEB 0x20000fff
-#define REMOTEVERS 2
-
-#if defined(__STDC__) || defined(__cplusplus)
-#define OPEN_CONNEX 1
-extern open_out * open_connex_2(open_in *, CLIENT *);
-extern open_out * open_connex_2_svc(open_in *, struct svc_req *);
-#define SEND_SIGNAL 2
-extern signal_out * send_signal_2(signal_in *, CLIENT *);
-extern signal_out * send_signal_2_svc(signal_in *, struct svc_req *);
-#define CLOSE_CONNEX 10
-extern void * close_connex_2(close_in *, CLIENT *);
-extern void * close_connex_2_svc(close_in *, struct svc_req *);
-#define PTRACE 11
-extern ptrace_out * ptrace_2(ptrace_in *, CLIENT *);
-extern ptrace_out * ptrace_2_svc(ptrace_in *, struct svc_req *);
-#define WAIT_INFO 13
-extern wait_out * wait_info_2(wait_in *, CLIENT *);
-extern wait_out * wait_info_2_svc(wait_in *, struct svc_req *);
-#define GET_SIGNAL_NAMES 17
-extern get_signal_names_out * get_signal_names_2(void *, CLIENT *);
-extern get_signal_names_out * get_signal_names_2_svc(void *, struct svc_req *);
-extern int remotedeb_2_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
-
-#else /* K&R C */
-#define OPEN_CONNEX 1
-extern open_out * open_connex_2();
-extern open_out * open_connex_2_svc();
-#define SEND_SIGNAL 2
-extern signal_out * send_signal_2();
-extern signal_out * send_signal_2_svc();
-#define CLOSE_CONNEX 10
-extern void * close_connex_2();
-extern void * close_connex_2_svc();
-#define PTRACE 11
-extern ptrace_out * ptrace_2();
-extern ptrace_out * ptrace_2_svc();
-#define WAIT_INFO 13
-extern wait_out * wait_info_2();
-extern wait_out * wait_info_2_svc();
-#define GET_SIGNAL_NAMES 17
-extern get_signal_names_out * get_signal_names_2();
-extern get_signal_names_out * get_signal_names_2_svc();
-extern int remotedeb_2_freeresult ();
-#endif /* K&R C */
-
-/* the xdr functions */
-
-#if defined(__STDC__) || defined(__cplusplus)
-extern bool_t xdr_rpc_type (XDR *, rpc_type*);
-extern bool_t xdr_UDP_MSG (XDR *, UDP_MSG*);
-extern bool_t xdr_ptracereq (XDR *, ptracereq*);
-extern bool_t xdr_xdr_regs (XDR *, xdr_regs*);
-extern bool_t xdr_xdr_mem (XDR *, xdr_mem*);
-extern bool_t xdr_break_type (XDR *, break_type*);
-extern bool_t xdr_xdr_break (XDR *, xdr_break*);
-extern bool_t xdr_thread_name (XDR *, thread_name*);
-extern bool_t xdr_KernThread (XDR *, KernThread*);
-extern bool_t xdr_thread_list (XDR *, thread_list*);
-extern bool_t xdr_ptrace_addr_data_in (XDR *, ptrace_addr_data_in*);
-extern bool_t xdr_ptrace_addr_data_out (XDR *, ptrace_addr_data_out*);
-extern bool_t xdr_CHAR_DATA (XDR *, CHAR_DATA*);
-extern bool_t xdr_xry_inst (XDR *, xry_inst*);
-extern bool_t xdr_instance (XDR *, instance*);
-extern bool_t xdr_instance_union (XDR *, instance_union*);
-extern bool_t xdr_one_arg (XDR *, one_arg*);
-extern bool_t xdr_debug_type (XDR *, debug_type*);
-extern bool_t xdr_open_in (XDR *, open_in*);
-extern bool_t xdr_open_out (XDR *, open_out*);
-extern bool_t xdr_close_control (XDR *, close_control*);
-extern bool_t xdr_close_in (XDR *, close_in*);
-extern bool_t xdr_signal_in (XDR *, signal_in*);
-extern bool_t xdr_signal_out (XDR *, signal_out*);
-extern bool_t xdr_stop_code (XDR *, stop_code*);
-extern bool_t xdr_wait_in (XDR *, wait_in*);
-extern bool_t xdr_wait_out (XDR *, wait_out*);
-extern bool_t xdr_ptrace_in (XDR *, ptrace_in*);
-extern bool_t xdr_ptrace_out (XDR *, ptrace_out*);
-extern bool_t xdr_one_symbol (XDR *, one_symbol*);
-extern bool_t xdr_all_symbols (XDR *, all_symbols*);
-extern bool_t xdr_get_global_symbols_out (XDR *, get_global_symbols_out*);
-extern bool_t xdr_get_text_data_in (XDR *, get_text_data_in*);
-extern bool_t xdr_get_text_data_out (XDR *, get_text_data_out*);
-extern bool_t xdr_one_signal (XDR *, one_signal*);
-extern bool_t xdr_all_signals (XDR *, all_signals*);
-extern bool_t xdr_get_signal_names_out (XDR *, get_signal_names_out*);
-
-#else /* K&R C */
-extern bool_t xdr_rpc_type ();
-extern bool_t xdr_UDP_MSG ();
-extern bool_t xdr_ptracereq ();
-extern bool_t xdr_xdr_regs ();
-extern bool_t xdr_xdr_mem ();
-extern bool_t xdr_break_type ();
-extern bool_t xdr_xdr_break ();
-extern bool_t xdr_thread_name ();
-extern bool_t xdr_KernThread ();
-extern bool_t xdr_thread_list ();
-extern bool_t xdr_ptrace_addr_data_in ();
-extern bool_t xdr_ptrace_addr_data_out ();
-extern bool_t xdr_CHAR_DATA ();
-extern bool_t xdr_xry_inst ();
-extern bool_t xdr_instance ();
-extern bool_t xdr_instance_union ();
-extern bool_t xdr_one_arg ();
-extern bool_t xdr_debug_type ();
-extern bool_t xdr_open_in ();
-extern bool_t xdr_open_out ();
-extern bool_t xdr_close_control ();
-extern bool_t xdr_close_in ();
-extern bool_t xdr_signal_in ();
-extern bool_t xdr_signal_out ();
-extern bool_t xdr_stop_code ();
-extern bool_t xdr_wait_in ();
-extern bool_t xdr_wait_out ();
-extern bool_t xdr_ptrace_in ();
-extern bool_t xdr_ptrace_out ();
-extern bool_t xdr_one_symbol ();
-extern bool_t xdr_all_symbols ();
-extern bool_t xdr_get_global_symbols_out ();
-extern bool_t xdr_get_text_data_in ();
-extern bool_t xdr_get_text_data_out ();
-extern bool_t xdr_one_signal ();
-extern bool_t xdr_all_signals ();
-extern bool_t xdr_get_signal_names_out ();
-
-#endif /* K&R C */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !_REMDEB_H_RPCGEN */
diff --git a/c/src/librdbg/src/powerpc/new_exception_processing/remdeb_f.x b/c/src/librdbg/src/powerpc/new_exception_processing/remdeb_f.x
deleted file mode 100644
index 10cf8dd540..0000000000
--- a/c/src/librdbg/src/powerpc/new_exception_processing/remdeb_f.x
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- **************************************************************************
- *
- * Component = rdblib
- * Synopsis = remdeb_f.x
- *
- **************************************************************************
- * $Id$
- **************************************************************************
- */
-
-struct xdr_regs
-{
- unsigned int tabreg[40];
-};
-
-#ifdef RPC_HDR
-
-%/* now define register macros to apply to xdr_regs struct */
-%
-%#define R_PC 0
-%#define R_MSR 1
-%#define R_EXCEPNB 2
-%#define R_R0 3
-%#define R_R1 (R_R0 + 1)
-%#define R_R2 (R_R0 + 2)
-%#define R_R3 (R_R0 + 3)
-%#define R_R4 (R_R0 + 4)
-%#define R_R5 (R_R0 + 5)
-%#define R_R6 (R_R0 + 6)
-%#define R_R7 (R_R0 + 7)
-%#define R_R8 (R_R0 + 8)
-%#define R_R9 (R_R0 + 9)
-%#define R_R10 (R_R0 + 10)
-%#define R_R11 (R_R0 + 11)
-%#define R_R12 (R_R0 + 12)
-%#define R_R13 (R_R0 + 13)
-%#define R_R14 (R_R0 + 14)
-%#define R_R15 (R_R0 + 15)
-%#define R_R16 (R_R0 + 16)
-%#define R_R17 (R_R0 + 17)
-%#define R_R18 (R_R0 + 18)
-%#define R_R19 (R_R0 + 19)
-%#define R_R20 (R_R0 + 20)
-%#define R_R21 (R_R0 + 21)
-%#define R_R22 (R_R0 + 22)
-%#define R_R23 (R_R0 + 23)
-%#define R_R24 (R_R0 + 24)
-%#define R_R25 (R_R0 + 25)
-%#define R_R26 (R_R0 + 26)
-%#define R_R27 (R_R0 + 27)
-%#define R_R28 (R_R0 + 28)
-%#define R_R29 (R_R0 + 29)
-%#define R_R30 (R_R0 + 30)
-%#define R_R31 (R_R0 + 31)
-%#define R_CR 35
-%#define R_CTR 36
-%#define R_XER 37
-%#define R_LR 38
-%#define R_MQ 39
-%
-%#include <libcpu/raw_exception.h>
-%
-%#define REG_PC tabreg[R_PC] /* PC register offset */
-%#define REG_SP tabreg[R_R1] /* SP register offset */
-%#define REG_FP tabreg[R_R1] /* SP register offset (no FP on PPC) */
-%#define BREAK_SIZE 4 /* Breakpoint occupies 4 bytes */
-%#define BREAK_ADJ 0 /* Nothing to subtract from address after bp */
-%#define IS_BREAK(l) ((l) == 0x7d8d6808)
-%#define SET_BREAK(l) (0x7d8d6808)
-%#define ORG_BREAK(c,p) (p)
-%#define IS_STEP(regs) (regs.tabreg[R_EXCEPNB] == ASM_TRACE_VECTOR) /* Was step and not break */
-%#define TARGET_PROC_TYPE 3
-
-#endif
-
diff --git a/c/src/librdbg/src/powerpc/new_exception_processing/remdeb_svc.c b/c/src/librdbg/src/powerpc/new_exception_processing/remdeb_svc.c
deleted file mode 100644
index 2e5b3725e4..0000000000
--- a/c/src/librdbg/src/powerpc/new_exception_processing/remdeb_svc.c
+++ /dev/null
@@ -1,122 +0,0 @@
-#include <rpc/types.h>
-#include <rpc/rpc.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <bsp.h>
-#include <rdbg/servrpc.h>
-#include <rdbg/remdeb.h>
-#define fprintf(a,b) printf(b)
-/*HEADER_START*/
-#define RTEMS_PORT 2071
-#define RTEMS_BACK_PORT 2073
-/*
- * Sun request values for the remote ptrace system call
- */
-
- /*
- * Memory data for read/write text or data. The size is in data. The target
- * addr is in the addr field.
- * Be careful before modifying because this value goes into internal
- * pipes and is allocated on stack too. Pipes and/or the stack could
- * become too small if this value gets incremented.
- */
-#ifndef XRY_MAX_CMD_STR
-#endif /* REMDEB_H */
- /* now open_connex() routine which establishes a connection to server */
-#define DEBUGGER_IS_GDB 0x2 /* */
- /* now close_connex() routine which detaches from server */
- /* now send_signal() routine which sends signals to processes like kill(2) */
- /* now wait_info() routine which returns results of polling the wait status
- of a process/actor. It may return 0 if running, else pid or -1 */
- /* now ptrace() routine. This matches the Sun UNIX ptrace as well as
- some additions */
- /* now define the actual calls we support */
-const char* names [] = {
- "NULLPROC", "OPEN_CONNEX", "SEND_SIGNAL", "name3",
- "name4", "name5", "name6", "name7",
- "name8", "name9", "CLOSE_CONNEX", "PTRACE",
- "name12", "WAIT_INFO", "name14", "name15",
- "name16", "GET_SIGNAL_NAMES", "name18"
-};
-
-void
-remotedeb_2(struct svc_req *rqstp, register SVCXPRT *transp)
-{
- union {
- open_in open_connex_2_arg;
- signal_in send_signal_2_arg;
- close_in close_connex_2_arg;
- ptrace_in ptrace_2_arg;
- wait_in wait_info_2_arg;
- } argument;
- char *result;
- xdrproc_t _xdr_argument, _xdr_result;
- char *(*local)(char *, struct svc_req *);
-
- DPRINTF (("remotedeb_2: %s (%d)\n",
- (unsigned) rqstp->rq_proc <
- (unsigned) (sizeof names / sizeof names[0]) ?
- names [rqstp->rq_proc] : "???",
- (int) rqstp->rq_proc));
-
- switch (rqstp->rq_proc) {
- case NULLPROC:
- (void) svc_sendreply (transp, (xdrproc_t) xdr_void, (char *)NULL);
- return;
-
- case OPEN_CONNEX:
- _xdr_argument = (xdrproc_t) xdr_open_in;
- _xdr_result = (xdrproc_t) xdr_open_out;
- local = (char *(*)(char *, struct svc_req *)) open_connex_2_svc;
- break;
-
- case SEND_SIGNAL:
- _xdr_argument = (xdrproc_t) xdr_signal_in;
- _xdr_result = (xdrproc_t) xdr_signal_out;
- local = (char *(*)(char *, struct svc_req *)) send_signal_2_svc;
- break;
-
- case CLOSE_CONNEX:
- _xdr_argument = (xdrproc_t) xdr_close_in;
- _xdr_result = (xdrproc_t) xdr_void;
- local = (char *(*)(char *, struct svc_req *)) close_connex_2_svc;
- break;
-
- case PTRACE:
- _xdr_argument = (xdrproc_t) xdr_ptrace_in;
- _xdr_result = (xdrproc_t) xdr_ptrace_out;
- local = (char *(*)(char *, struct svc_req *)) ptrace_2_svc;
- break;
-
- case WAIT_INFO:
- _xdr_argument = (xdrproc_t) xdr_wait_in;
- _xdr_result = (xdrproc_t) xdr_wait_out;
- local = (char *(*)(char *, struct svc_req *)) wait_info_2_svc;
- break;
-
- case GET_SIGNAL_NAMES:
- _xdr_argument = (xdrproc_t) xdr_void;
- _xdr_result = (xdrproc_t) xdr_get_signal_names_out;
- local = (char *(*)(char *, struct svc_req *)) get_signal_names_2_svc;
- break;
-
- default:
- svcerr_noproc (transp);
- return;
- }
- memset ((char *)&argument, 0, sizeof (argument));
- if (!svc_getargs (transp, _xdr_argument, (caddr_t) &argument)) {
- svcerr_decode (transp);
- return;
- }
- result = (*local)((char *)&argument, rqstp);
- if (result != NULL && !svc_sendreply(transp, _xdr_result, result)) {
- svcerr_systemerr (transp);
- }
- if (!svc_freeargs (transp, _xdr_argument, (caddr_t) &argument)) {
- fprintf (stderr, "unable to free arguments");
- exit (1);
- }
- return;
-}
diff --git a/c/src/librdbg/src/powerpc/new_exception_processing/remdeb_xdr.c b/c/src/librdbg/src/powerpc/new_exception_processing/remdeb_xdr.c
deleted file mode 100644
index 3aacec1c21..0000000000
--- a/c/src/librdbg/src/powerpc/new_exception_processing/remdeb_xdr.c
+++ /dev/null
@@ -1,928 +0,0 @@
-/*
- * Please do not edit this file.
- * It was generated using rpcgen.
- */
-
-#include "remdeb.h"
-#define RTEMS_PORT 2071
-#define RTEMS_BACK_PORT 2073
-
-bool_t
-xdr_rpc_type (XDR *xdrs, rpc_type *objp)
-{
- register int32_t *buf;
-
- if (!xdr_enum (xdrs, (enum_t *) objp))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_UDP_MSG (XDR *xdrs, UDP_MSG *objp)
-{
- register int32_t *buf;
-
- if (!xdr_u_char (xdrs, &objp->type))
- return FALSE;
- if (!xdr_u_char (xdrs, &objp->msg_num))
- return FALSE;
- if (!xdr_u_short (xdrs, &objp->spec))
- return FALSE;
- if (!xdr_long (xdrs, &objp->pid))
- return FALSE;
- if (!xdr_u_long (xdrs, &objp->context))
- return FALSE;
- return TRUE;
-}
-/*
- * Sun request values for the remote ptrace system call
- */
-
-
-bool_t
-xdr_ptracereq (XDR *xdrs, ptracereq *objp)
-{
- register int32_t *buf;
-
- if (!xdr_enum (xdrs, (enum_t *) objp))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_xdr_regs (XDR *xdrs, xdr_regs *objp)
-{
- register int32_t *buf;
-
- int i;
-
- if (xdrs->x_op == XDR_ENCODE) {
- buf = XDR_INLINE(xdrs, 40 * BYTES_PER_XDR_UNIT);
- if (buf == NULL) {
- if (!xdr_vector (xdrs, (char *)objp->tabreg, 40,
- sizeof (u_int), (xdrproc_t) xdr_u_int))
- return FALSE;
- } else {
- {
- register u_int *genp;
-
- for (i = 0, genp = objp->tabreg;
- i < 40; ++i) {
- IXDR_PUT_U_LONG(buf, *genp++);
- }
- }
- }
- return TRUE;
- } else if (xdrs->x_op == XDR_DECODE) {
- buf = XDR_INLINE(xdrs, 40 * BYTES_PER_XDR_UNIT);
- if (buf == NULL) {
- if (!xdr_vector (xdrs, (char *)objp->tabreg, 40,
- sizeof (u_int), (xdrproc_t) xdr_u_int))
- return FALSE;
- } else {
- {
- register u_int *genp;
-
- for (i = 0, genp = objp->tabreg;
- i < 40; ++i) {
- *genp++ = IXDR_GET_U_LONG(buf);
- }
- }
- }
- return TRUE;
- }
-
- if (!xdr_vector (xdrs, (char *)objp->tabreg, 40,
- sizeof (u_int), (xdrproc_t) xdr_u_int))
- return FALSE;
- return TRUE;
-}
- /*
- * Memory data for read/write text or data. The size is in data. The target
- * addr is in the addr field.
- * Be careful before modifying because this value goes into internal
- * pipes and is allocated on stack too. Pipes and/or the stack could
- * become too small if this value gets incremented.
- */
-bool_t xdr_xdr_mem(xdrs, objp)
- XDR *xdrs;
- struct xdr_mem *objp;
-{
- if (!xdr_u_long(xdrs, &objp->addr)) {
- return (FALSE);
- }
- if (!xdr_u_int(xdrs, &objp->dataNb)) {
- return(FALSE);
- }
- return (xdr_opaque(xdrs, objp->data, objp->dataNb));
-}
-
-bool_t
-xdr_break_type (XDR *xdrs, break_type *objp)
-{
- register int32_t *buf;
-
- if (!xdr_enum (xdrs, (enum_t *) objp))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_xdr_break (XDR *xdrs, xdr_break *objp)
-{
- register int32_t *buf;
-
- int i;
-
- if (xdrs->x_op == XDR_ENCODE) {
- if (!xdr_u_char (xdrs, &objp->type))
- return FALSE;
- if (!xdr_u_char (xdrs, &objp->thread_spec))
- return FALSE;
- buf = XDR_INLINE (xdrs, 4 * BYTES_PER_XDR_UNIT);
- if (buf == NULL) {
- if (!xdr_u_short (xdrs, &objp->handle))
- return FALSE;
- if (!xdr_u_long (xdrs, &objp->ee_loc))
- return FALSE;
- if (!xdr_u_long (xdrs, &objp->ee_type))
- return FALSE;
- if (!xdr_u_short (xdrs, &objp->length))
- return FALSE;
-
- } else {
- IXDR_PUT_U_SHORT(buf, objp->handle);
- IXDR_PUT_U_LONG(buf, objp->ee_loc);
- IXDR_PUT_U_LONG(buf, objp->ee_type);
- IXDR_PUT_U_SHORT(buf, objp->length);
- }
- if (!xdr_u_char (xdrs, &objp->pass_count))
- return FALSE;
- if (!xdr_u_char (xdrs, &objp->curr_pass))
- return FALSE;
- buf = XDR_INLINE(xdrs, MAX_THRD_BRK * BYTES_PER_XDR_UNIT);
- if (buf == NULL) {
- if (!xdr_vector (xdrs, (char *)objp->thread_list, MAX_THRD_BRK,
- sizeof (u_long), (xdrproc_t) xdr_u_long))
- return FALSE;
- } else {
- {
- register u_long *genp;
-
- for (i = 0, genp = objp->thread_list;
- i < MAX_THRD_BRK; ++i) {
- IXDR_PUT_U_LONG(buf, *genp++);
- }
- }
- }
- return TRUE;
- } else if (xdrs->x_op == XDR_DECODE) {
- if (!xdr_u_char (xdrs, &objp->type))
- return FALSE;
- if (!xdr_u_char (xdrs, &objp->thread_spec))
- return FALSE;
- buf = XDR_INLINE (xdrs, 4 * BYTES_PER_XDR_UNIT);
- if (buf == NULL) {
- if (!xdr_u_short (xdrs, &objp->handle))
- return FALSE;
- if (!xdr_u_long (xdrs, &objp->ee_loc))
- return FALSE;
- if (!xdr_u_long (xdrs, &objp->ee_type))
- return FALSE;
- if (!xdr_u_short (xdrs, &objp->length))
- return FALSE;
-
- } else {
- objp->handle = IXDR_GET_U_SHORT(buf);
- objp->ee_loc = IXDR_GET_U_LONG(buf);
- objp->ee_type = IXDR_GET_U_LONG(buf);
- objp->length = IXDR_GET_U_SHORT(buf);
- }
- if (!xdr_u_char (xdrs, &objp->pass_count))
- return FALSE;
- if (!xdr_u_char (xdrs, &objp->curr_pass))
- return FALSE;
- buf = XDR_INLINE(xdrs, MAX_THRD_BRK * BYTES_PER_XDR_UNIT);
- if (buf == NULL) {
- if (!xdr_vector (xdrs, (char *)objp->thread_list, MAX_THRD_BRK,
- sizeof (u_long), (xdrproc_t) xdr_u_long))
- return FALSE;
- } else {
- {
- register u_long *genp;
-
- for (i = 0, genp = objp->thread_list;
- i < MAX_THRD_BRK; ++i) {
- *genp++ = IXDR_GET_U_LONG(buf);
- }
- }
- }
- return TRUE;
- }
-
- if (!xdr_u_char (xdrs, &objp->type))
- return FALSE;
- if (!xdr_u_char (xdrs, &objp->thread_spec))
- return FALSE;
- if (!xdr_u_short (xdrs, &objp->handle))
- return FALSE;
- if (!xdr_u_long (xdrs, &objp->ee_loc))
- return FALSE;
- if (!xdr_u_long (xdrs, &objp->ee_type))
- return FALSE;
- if (!xdr_u_short (xdrs, &objp->length))
- return FALSE;
- if (!xdr_u_char (xdrs, &objp->pass_count))
- return FALSE;
- if (!xdr_u_char (xdrs, &objp->curr_pass))
- return FALSE;
- if (!xdr_vector (xdrs, (char *)objp->thread_list, MAX_THRD_BRK,
- sizeof (u_long), (xdrproc_t) xdr_u_long))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_thread_name (XDR *xdrs, thread_name *objp)
-{
- register int32_t *buf;
-
- if (!xdr_string (xdrs, objp, THREADNAMEMAX))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_KernThread (XDR *xdrs, KernThread *objp)
-{
- register int32_t *buf;
-
- if (!xdr_u_int (xdrs, &objp->threadLi))
- return FALSE;
- return TRUE;
-}
-bool_t xdr_thread_list(xdrs, objp)
- XDR *xdrs;
- struct thread_list *objp;
-{
- return (xdr_array(xdrs, (char**)&objp->threads, &objp->nbThread,
- UTHREAD_MAX, sizeof(KernThread), xdr_KernThread));
-}
-
-bool_t
-xdr_ptrace_addr_data_in (XDR *xdrs, ptrace_addr_data_in *objp)
-{
- register int32_t *buf;
-
- if (!xdr_ptracereq (xdrs, &objp->req))
- return FALSE;
- switch (objp->req) {
- case RPT_SETTHREADREGS:
- if (!xdr_xdr_regs (xdrs, &objp->ptrace_addr_data_in_u.regs))
- return FALSE;
- break;
- case RPT_SETREGS:
- if (!xdr_xdr_regs (xdrs, &objp->ptrace_addr_data_in_u.regs))
- return FALSE;
- break;
- case RPT_PSETTHREADREGS:
- if (!xdr_array (xdrs, (char **)&objp->ptrace_addr_data_in_u.pregs.pregs_val, (u_int *) &objp->ptrace_addr_data_in_u.pregs.pregs_len, ~0,
- sizeof (u_int), (xdrproc_t) xdr_u_int))
- return FALSE;
- break;
- case RPT_PSETREGS:
- if (!xdr_array (xdrs, (char **)&objp->ptrace_addr_data_in_u.pregs.pregs_val, (u_int *) &objp->ptrace_addr_data_in_u.pregs.pregs_len, ~0,
- sizeof (u_int), (xdrproc_t) xdr_u_int))
- return FALSE;
- break;
- case RPT_SETTHREADNAME:
- if (!xdr_thread_name (xdrs, &objp->ptrace_addr_data_in_u.name))
- return FALSE;
- break;
- case RPT_WRITETEXT:
- if (!xdr_xdr_mem (xdrs, &objp->ptrace_addr_data_in_u.mem))
- return FALSE;
- break;
- case RPT_WRITEDATA:
- if (!xdr_xdr_mem (xdrs, &objp->ptrace_addr_data_in_u.mem))
- return FALSE;
- break;
- case RPT_SETBREAK:
- if (!xdr_xdr_break (xdrs, &objp->ptrace_addr_data_in_u.breakp))
- return FALSE;
- break;
- default:
- if (!xdr_u_int (xdrs, &objp->ptrace_addr_data_in_u.address))
- return FALSE;
- break;
- }
- return TRUE;
-}
-
-bool_t
-xdr_ptrace_addr_data_out (XDR *xdrs, ptrace_addr_data_out *objp)
-{
- register int32_t *buf;
-
- if (!xdr_ptracereq (xdrs, &objp->req))
- return FALSE;
- switch (objp->req) {
- case RPT_GETREGS:
- if (!xdr_xdr_regs (xdrs, &objp->ptrace_addr_data_out_u.regs))
- return FALSE;
- break;
- case RPT_GETTHREADREGS:
- if (!xdr_xdr_regs (xdrs, &objp->ptrace_addr_data_out_u.regs))
- return FALSE;
- break;
- case RPT_PGETREGS:
- if (!xdr_array (xdrs, (char **)&objp->ptrace_addr_data_out_u.pregs.pregs_val, (u_int *) &objp->ptrace_addr_data_out_u.pregs.pregs_len, ~0,
- sizeof (u_int), (xdrproc_t) xdr_u_int))
- return FALSE;
- break;
- case RPT_PGETTHREADREGS:
- if (!xdr_array (xdrs, (char **)&objp->ptrace_addr_data_out_u.pregs.pregs_val, (u_int *) &objp->ptrace_addr_data_out_u.pregs.pregs_len, ~0,
- sizeof (u_int), (xdrproc_t) xdr_u_int))
- return FALSE;
- break;
- case RPT_THREADLIST:
- if (!xdr_thread_list (xdrs, &objp->ptrace_addr_data_out_u.threads))
- return FALSE;
- break;
- case RPT_GETTHREADNAME:
- if (!xdr_thread_name (xdrs, &objp->ptrace_addr_data_out_u.name))
- return FALSE;
- break;
- case RPT_READTEXT:
- if (!xdr_xdr_mem (xdrs, &objp->ptrace_addr_data_out_u.mem))
- return FALSE;
- break;
- case RPT_GETNAME:
- if (!xdr_xdr_mem (xdrs, &objp->ptrace_addr_data_out_u.mem))
- return FALSE;
- break;
- case RPT_READDATA:
- if (!xdr_xdr_mem (xdrs, &objp->ptrace_addr_data_out_u.mem))
- return FALSE;
- break;
- case RPT_GETBREAK:
- if (!xdr_xdr_break (xdrs, &objp->ptrace_addr_data_out_u.breakp))
- return FALSE;
- break;
- default:
- if (!xdr_u_int (xdrs, &objp->ptrace_addr_data_out_u.addr))
- return FALSE;
- break;
- }
- return TRUE;
-}
-
-bool_t
-xdr_CHAR_DATA (XDR *xdrs, CHAR_DATA *objp)
-{
- register int32_t *buf;
-
- if (!xdr_bytes (xdrs, (char **)&objp->CHAR_DATA_val, (u_int *) &objp->CHAR_DATA_len, NET_SAFE))
- return FALSE;
- return TRUE;
-}
-#ifndef XRY_MAX_CMD_STR
-#endif /* REMDEB_H */
-
-bool_t
-xdr_xry_inst (XDR *xdrs, xry_inst *objp)
-{
- register int32_t *buf;
-
- if (!xdr_u_char (xdrs, &objp->flags))
- return FALSE;
- if (!xdr_u_char (xdrs, &objp->type))
- return FALSE;
- if (!xdr_u_char (xdrs, &objp->sub_type))
- return FALSE;
- if (!xdr_u_char (xdrs, &objp->res_type))
- return FALSE;
- if (!xdr_u_long (xdrs, &objp->value))
- return FALSE;
- if (!xdr_u_long (xdrs, &objp->value2))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_instance (XDR *xdrs, instance *objp)
-{
- register int32_t *buf;
-
- int i;
- if (!xdr_vector (xdrs, (char *)objp->instances, XRY_MAX_INSTANCES,
- sizeof (xry_inst), (xdrproc_t) xdr_xry_inst))
- return FALSE;
- if (!xdr_vector (xdrs, (char *)objp->buffer, XRY_MAX_INST_BUFF,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_instance_union (XDR *xdrs, instance_union *objp)
-{
- register int32_t *buf;
-
- if (!xdr_bool (xdrs, &objp->instances))
- return FALSE;
- switch (objp->instances) {
- case TRUE:
- if (!xdr_instance (xdrs, &objp->instance_union_u.inst))
- return FALSE;
- break;
- case FALSE:
- if (!xdr_string (xdrs, &objp->instance_union_u.buffer, XRY_MAX_CMD_STR))
- return FALSE;
- break;
- default:
- return FALSE;
- }
- return TRUE;
-}
-
-bool_t
-xdr_one_arg (XDR *xdrs, one_arg *objp)
-{
- register int32_t *buf;
-
- if (!xdr_string (xdrs, objp, NET_SAFE))
- return FALSE;
- return TRUE;
-}
- /* now open_connex() routine which establishes a connection to server */
-
-bool_t
-xdr_debug_type (XDR *xdrs, debug_type *objp)
-{
- register int32_t *buf;
-
- if (!xdr_enum (xdrs, (enum_t *) objp))
- return FALSE;
- return TRUE;
-}
-#define DEBUGGER_IS_GDB 0x2 /* */
-
-bool_t
-xdr_open_in (XDR *xdrs, open_in *objp)
-{
- register int32_t *buf;
-
- int i;
- if (!xdr_vector (xdrs, (char *)objp->back_port, 16,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- if (!xdr_u_short (xdrs, &objp->debug_type))
- return FALSE;
- if (!xdr_u_short (xdrs, &objp->flags))
- return FALSE;
- if (!xdr_vector (xdrs, (char *)objp->destination, 16,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- if (!xdr_one_arg (xdrs, &objp->user_name))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_open_out (XDR *xdrs, open_out *objp)
-{
- register int32_t *buf;
-
- int i;
-
- if (xdrs->x_op == XDR_ENCODE) {
- buf = XDR_INLINE(xdrs, (2 + ( 4 )) * BYTES_PER_XDR_UNIT);
- if (buf == NULL) {
- if (!xdr_u_long (xdrs, &objp->port))
- return FALSE;
- if (!xdr_vector (xdrs, (char *)objp->pad, 4,
- sizeof (u_int), (xdrproc_t) xdr_u_int))
- return FALSE;
- if (!xdr_u_int (xdrs, &objp->fp))
- return FALSE;
-
- } else {
- IXDR_PUT_U_LONG(buf, objp->port);
- {
- register u_int *genp;
-
- for (i = 0, genp = objp->pad;
- i < 4; ++i) {
- IXDR_PUT_U_LONG(buf, *genp++);
- }
- }
- IXDR_PUT_U_LONG(buf, objp->fp);
- }
- if (!xdr_u_char (xdrs, &objp->cmd_table_num))
- return FALSE;
- if (!xdr_u_char (xdrs, &objp->cmd_table_vers))
- return FALSE;
- if (!xdr_u_short (xdrs, &objp->server_vers))
- return FALSE;
- return TRUE;
- } else if (xdrs->x_op == XDR_DECODE) {
- buf = XDR_INLINE(xdrs, (2 + ( 4 )) * BYTES_PER_XDR_UNIT);
- if (buf == NULL) {
- if (!xdr_u_long (xdrs, &objp->port))
- return FALSE;
- if (!xdr_vector (xdrs, (char *)objp->pad, 4,
- sizeof (u_int), (xdrproc_t) xdr_u_int))
- return FALSE;
- if (!xdr_u_int (xdrs, &objp->fp))
- return FALSE;
-
- } else {
- objp->port = IXDR_GET_U_LONG(buf);
- {
- register u_int *genp;
-
- for (i = 0, genp = objp->pad;
- i < 4; ++i) {
- *genp++ = IXDR_GET_U_LONG(buf);
- }
- }
- objp->fp = IXDR_GET_U_LONG(buf);
- }
- if (!xdr_u_char (xdrs, &objp->cmd_table_num))
- return FALSE;
- if (!xdr_u_char (xdrs, &objp->cmd_table_vers))
- return FALSE;
- if (!xdr_u_short (xdrs, &objp->server_vers))
- return FALSE;
- return TRUE;
- }
-
- if (!xdr_u_long (xdrs, &objp->port))
- return FALSE;
- if (!xdr_vector (xdrs, (char *)objp->pad, 4,
- sizeof (u_int), (xdrproc_t) xdr_u_int))
- return FALSE;
- if (!xdr_u_int (xdrs, &objp->fp))
- return FALSE;
- if (!xdr_u_char (xdrs, &objp->cmd_table_num))
- return FALSE;
- if (!xdr_u_char (xdrs, &objp->cmd_table_vers))
- return FALSE;
- if (!xdr_u_short (xdrs, &objp->server_vers))
- return FALSE;
- return TRUE;
-}
- /* now close_connex() routine which detaches from server */
-
-bool_t
-xdr_close_control (XDR *xdrs, close_control *objp)
-{
- register int32_t *buf;
-
- if (!xdr_enum (xdrs, (enum_t *) objp))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_close_in (XDR *xdrs, close_in *objp)
-{
- register int32_t *buf;
-
- if (!xdr_close_control (xdrs, &objp->control))
- return FALSE;
- return TRUE;
-}
- /* now send_signal() routine which sends signals to processes like kill(2) */
-
-bool_t
-xdr_signal_in (XDR *xdrs, signal_in *objp)
-{
- register int32_t *buf;
-
- if (!xdr_int (xdrs, &objp->pid))
- return FALSE;
- if (!xdr_int (xdrs, &objp->sig))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_signal_out (XDR *xdrs, signal_out *objp)
-{
- register int32_t *buf;
-
- if (!xdr_int (xdrs, &objp->kill_return))
- return FALSE;
- if (!xdr_int (xdrs, &objp->errNo))
- return FALSE;
- return TRUE;
-}
- /* now wait_info() routine which returns results of polling the wait status
- of a process/actor. It may return 0 if running, else pid or -1 */
-
-bool_t
-xdr_stop_code (XDR *xdrs, stop_code *objp)
-{
- register int32_t *buf;
-
- if (!xdr_enum (xdrs, (enum_t *) objp))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_wait_in (XDR *xdrs, wait_in *objp)
-{
- register int32_t *buf;
-
- if (!xdr_int (xdrs, &objp->pid))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_wait_out (XDR *xdrs, wait_out *objp)
-{
- register int32_t *buf;
-
-
- if (xdrs->x_op == XDR_ENCODE) {
- buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
- if (buf == NULL) {
- if (!xdr_int (xdrs, &objp->wait_return))
- return FALSE;
- if (!xdr_int (xdrs, &objp->errNo))
- return FALSE;
- if (!xdr_int (xdrs, &objp->status))
- return FALSE;
-
- } else {
- IXDR_PUT_LONG(buf, objp->wait_return);
- IXDR_PUT_LONG(buf, objp->errNo);
- IXDR_PUT_LONG(buf, objp->status);
- }
- if (!xdr_stop_code (xdrs, &objp->reason))
- return FALSE;
- buf = XDR_INLINE(xdrs,5 * BYTES_PER_XDR_UNIT);
- if (buf == NULL) {
- if (!xdr_int (xdrs, &objp->handle))
- return FALSE;
- if (!xdr_u_long (xdrs, &objp->PC))
- return FALSE;
- if (!xdr_u_long (xdrs, &objp->SP))
- return FALSE;
- if (!xdr_u_long (xdrs, &objp->FP))
- return FALSE;
- if (!xdr_u_long (xdrs, &objp->thread))
- return FALSE;
- } else {
- IXDR_PUT_LONG(buf, objp->handle);
- IXDR_PUT_U_LONG(buf, objp->PC);
- IXDR_PUT_U_LONG(buf, objp->SP);
- IXDR_PUT_U_LONG(buf, objp->FP);
- IXDR_PUT_U_LONG(buf, objp->thread);
- }
- return TRUE;
- } else if (xdrs->x_op == XDR_DECODE) {
- buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
- if (buf == NULL) {
- if (!xdr_int (xdrs, &objp->wait_return))
- return FALSE;
- if (!xdr_int (xdrs, &objp->errNo))
- return FALSE;
- if (!xdr_int (xdrs, &objp->status))
- return FALSE;
-
- } else {
- objp->wait_return = IXDR_GET_LONG(buf);
- objp->errNo = IXDR_GET_LONG(buf);
- objp->status = IXDR_GET_LONG(buf);
- }
- if (!xdr_stop_code (xdrs, &objp->reason))
- return FALSE;
- buf = XDR_INLINE(xdrs,5 * BYTES_PER_XDR_UNIT);
- if (buf == NULL) {
- if (!xdr_int (xdrs, &objp->handle))
- return FALSE;
- if (!xdr_u_long (xdrs, &objp->PC))
- return FALSE;
- if (!xdr_u_long (xdrs, &objp->SP))
- return FALSE;
- if (!xdr_u_long (xdrs, &objp->FP))
- return FALSE;
- if (!xdr_u_long (xdrs, &objp->thread))
- return FALSE;
- } else {
- objp->handle = IXDR_GET_LONG(buf);
- objp->PC = IXDR_GET_U_LONG(buf);
- objp->SP = IXDR_GET_U_LONG(buf);
- objp->FP = IXDR_GET_U_LONG(buf);
- objp->thread = IXDR_GET_U_LONG(buf);
- }
- return TRUE;
- }
-
- if (!xdr_int (xdrs, &objp->wait_return))
- return FALSE;
- if (!xdr_int (xdrs, &objp->errNo))
- return FALSE;
- if (!xdr_int (xdrs, &objp->status))
- return FALSE;
- if (!xdr_stop_code (xdrs, &objp->reason))
- return FALSE;
- if (!xdr_int (xdrs, &objp->handle))
- return FALSE;
- if (!xdr_u_long (xdrs, &objp->PC))
- return FALSE;
- if (!xdr_u_long (xdrs, &objp->SP))
- return FALSE;
- if (!xdr_u_long (xdrs, &objp->FP))
- return FALSE;
- if (!xdr_u_long (xdrs, &objp->thread))
- return FALSE;
- return TRUE;
-}
- /* now ptrace() routine. This matches the Sun UNIX ptrace as well as
- some additions */
-
-bool_t
-xdr_ptrace_in (XDR *xdrs, ptrace_in *objp)
-{
- register int32_t *buf;
-
- if (!xdr_int (xdrs, &objp->pid))
- return FALSE;
- if (!xdr_ptrace_addr_data_in (xdrs, &objp->addr))
- return FALSE;
- if (!xdr_u_int (xdrs, &objp->data))
- return FALSE;
- if (!xdr_u_int (xdrs, &objp->flags))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_ptrace_out (XDR *xdrs, ptrace_out *objp)
-{
- register int32_t *buf;
-
- if (!xdr_ptrace_addr_data_out (xdrs, &objp->addr))
- return FALSE;
- if (!xdr_int (xdrs, &objp->result))
- return FALSE;
- if (!xdr_int (xdrs, &objp->errNo))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_one_symbol (XDR *xdrs, one_symbol *objp)
-{
- register int32_t *buf;
-
- if (!xdr_string (xdrs, &objp->symbolName, ~0))
- return FALSE;
- if (!xdr_long (xdrs, &objp->symbolValue))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_all_symbols (XDR *xdrs, all_symbols *objp)
-{
- register int32_t *buf;
-
- if (!xdr_array (xdrs, (char **)&objp->all_symbols_val, (u_int *) &objp->all_symbols_len, ~0,
- sizeof (one_symbol), (xdrproc_t) xdr_one_symbol))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_get_global_symbols_out (XDR *xdrs, get_global_symbols_out *objp)
-{
- register int32_t *buf;
-
- if (!xdr_all_symbols (xdrs, &objp->symbols))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_get_text_data_in (XDR *xdrs, get_text_data_in *objp)
-{
- register int32_t *buf;
-
- if (!xdr_int (xdrs, &objp->pid))
- return FALSE;
- if (!xdr_string (xdrs, &objp->actorName, 16))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_get_text_data_out (XDR *xdrs, get_text_data_out *objp)
-{
- register int32_t *buf;
-
-
- if (xdrs->x_op == XDR_ENCODE) {
- buf = XDR_INLINE(xdrs,6 * BYTES_PER_XDR_UNIT);
- if (buf == NULL) {
- if (!xdr_int (xdrs, &objp->result))
- return FALSE;
- if (!xdr_int (xdrs, &objp->errNo))
- return FALSE;
- if (!xdr_u_long (xdrs, &objp->textStart))
- return FALSE;
- if (!xdr_u_long (xdrs, &objp->textSize))
- return FALSE;
- if (!xdr_u_long (xdrs, &objp->dataStart))
- return FALSE;
- if (!xdr_u_long (xdrs, &objp->dataSize))
- return FALSE;
- } else {
- IXDR_PUT_LONG(buf, objp->result);
- IXDR_PUT_LONG(buf, objp->errNo);
- IXDR_PUT_U_LONG(buf, objp->textStart);
- IXDR_PUT_U_LONG(buf, objp->textSize);
- IXDR_PUT_U_LONG(buf, objp->dataStart);
- IXDR_PUT_U_LONG(buf, objp->dataSize);
- }
- return TRUE;
- } else if (xdrs->x_op == XDR_DECODE) {
- buf = XDR_INLINE(xdrs,6 * BYTES_PER_XDR_UNIT);
- if (buf == NULL) {
- if (!xdr_int (xdrs, &objp->result))
- return FALSE;
- if (!xdr_int (xdrs, &objp->errNo))
- return FALSE;
- if (!xdr_u_long (xdrs, &objp->textStart))
- return FALSE;
- if (!xdr_u_long (xdrs, &objp->textSize))
- return FALSE;
- if (!xdr_u_long (xdrs, &objp->dataStart))
- return FALSE;
- if (!xdr_u_long (xdrs, &objp->dataSize))
- return FALSE;
- } else {
- objp->result = IXDR_GET_LONG(buf);
- objp->errNo = IXDR_GET_LONG(buf);
- objp->textStart = IXDR_GET_U_LONG(buf);
- objp->textSize = IXDR_GET_U_LONG(buf);
- objp->dataStart = IXDR_GET_U_LONG(buf);
- objp->dataSize = IXDR_GET_U_LONG(buf);
- }
- return TRUE;
- }
-
- if (!xdr_int (xdrs, &objp->result))
- return FALSE;
- if (!xdr_int (xdrs, &objp->errNo))
- return FALSE;
- if (!xdr_u_long (xdrs, &objp->textStart))
- return FALSE;
- if (!xdr_u_long (xdrs, &objp->textSize))
- return FALSE;
- if (!xdr_u_long (xdrs, &objp->dataStart))
- return FALSE;
- if (!xdr_u_long (xdrs, &objp->dataSize))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_one_signal (XDR *xdrs, one_signal *objp)
-{
- register int32_t *buf;
-
- if (!xdr_u_int (xdrs, &objp->number))
- return FALSE;
- if (!xdr_string (xdrs, &objp->name, ~0))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_all_signals (XDR *xdrs, all_signals *objp)
-{
- register int32_t *buf;
-
- if (!xdr_array (xdrs, (char **)&objp->all_signals_val, (u_int *) &objp->all_signals_len, ~0,
- sizeof (one_signal), (xdrproc_t) xdr_one_signal))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_get_signal_names_out (XDR *xdrs, get_signal_names_out *objp)
-{
- register int32_t *buf;
-
- if (!xdr_all_signals (xdrs, &objp->signals))
- return FALSE;
- return TRUE;
-}
- /* now define the actual calls we support */
diff --git a/c/src/make/README b/c/src/make/README
deleted file mode 100644
index 911d2b8aea..0000000000
--- a/c/src/make/README
+++ /dev/null
@@ -1,489 +0,0 @@
-#
-# $Id$
-#
-
- make/README
-
- This file describes the layout and conventions of the make tree used in
- the RTEMS software project and others.
- All of these "make" trees are substantially similar; however this
- file documents the current state of the rtems Makefile tree.
-
- This make tree was developed originally to simplify porting projects
- between various os's. The primary goals are:
-
- . simple *and* customizable individual makefiles
-
- . use widely available GNU make. There is no pre-processing or
- automatic generation of Makefiles.
-
- . Same makefiles work on *many* host os's due to portability
- of GNU make and the host os config files.
-
- . Support for different compilers and operating systems
- on a per-user basis. Using the same sources (including
- Makefiles) one developer can develop and test under SVR4,
- another under 4.x, another under HPUX.
-
- . Builtin support for compiling "variants" such as debug,
- profile, and tcov versions. These variants can be built
- recursively.
-
- . Control of system dependencies. "hidden" dependencies on
- environment variables (such as PATH)
- have been removed whenever possible. No matter what your
- PATH variable is set to, you should get the same thing
- when you 'make' as everyone else on the project.
-
- This description attempts to cover all aspects of the Makefile tree. Most
- of what is described here is maintained automatically by the configuration
- files.
-
- The example makefiles in make/Templates should be used as a starting
- point for new directories.
-
- There are 2 main types of Makefile:
-
- directory and leaf.
-
- Directory Makefiles
- -------------------
-
- A Makefile in a source directory with sub-directories is called a
- "directory" Makefile.
-
- Directory Makefile's are simply responsible for acting as "middle-men"
- and recursing into their sub-directories and propagating the make.
-
- For example, directory src/bin will contain only a Makefile and
- sub-directories. No actual source code will reside in the directory.
- The following commands:
-
- $ cd src/bin
- $ make all
-
- would descend into all the subdirectories of 'src/bin' and recursively
- perform a 'make all'.
-
- A 'make debug' will recurse thru sub-directories as a debug build.
-
- A template directory Makefile which should work in almost all
- cases is in make/Templates/Makefile.dir
-
-
- Leaf Makefiles
- --------------
-
- Source directories that contain source code for libraries or
- programs use a "leaf" Makefile.
-
- These makefiles contain the rules necessary to build programs
- (or libraries).
-
- A template leaf Makefile is in Templates/Makefile.leaf . A template
- leaf Makefile for building libraries is in Templates/Makefile.lib .
-
-
- NOTE: To simplify nested makefile's and source maintenance, we disallow
- combining source and directories (that make(1) would be expected to
- recurse into) in one source directory. Ie., a directory in the source
- tree may contain EITHER source files OR recursive sub directories, but NOT
- both.
-
- Variants (where objects go)
- ---------------------------
-
- All binary targets are placed in a sub-directory whose name is (for
- example):
-
- o-pc386/ -- binaries (no debug, no profile)
- o-pc386-debug/ -- debug binaries
- o-pc386-profile/ -- profiling binaries
-
- Using the template Makefiles, this will all happen automatically.
-
- Within a Makefile, the ${ARCH} variable is set to o-pc386,
- o-pc386-debug, etc., as appropriate.
-
- Typing 'make' will place objects in o-pc386.
- 'make debug' will place objects in o-pc386-debug.
- 'make profile' will place objects in o-pc386-profile.
-
- NOTE: For RTEMS work, the word 'pc386' is the specified
- RTEMS_BSP (specified in the modules file)
-
- The debug and profile targets are equivalent to 'all' except that
- CFLAGS and/or LDFLAGS are modified as per the compiler config file for
- debug and profile support.
-
- The targets debug, profile, etc., can be
- invoked recursively at the directory make level. So from the top of a
- tree, one could install a debug version of everything under that point
- by:
-
- $ cd src/lib
- $ gmake debug
- $ gmake install
-
- When building a command that is linked with a generated library, the
- appropriate version of the library will be linked in.
-
- For example, the following fragments link the normal, debug, or
- profile version of "libmine.a" as appropriate:
-
- LDLIBS += $(LIBMINE)
- LIBMINE = ../libmine/${ARCH}/libmine.a
-
- ${ARCH}/pgm: $(LIBMINE) ${OBJS}
- $(LINK.c) -o $@ ${OBJS} $(LDLIBS)
-
- If we do 'gmake debug', then the library in
- ../libmine/sparc-debug/libmine.a will be linked in. If $(LIBMINE)
- might not exist (or might be out of date) at this point, we could add
-
- ${LIBMINE}: FORCEIT
- cd ../libmine; ${MAKE} ${VARIANT_VA}
-
- The above would generate the following command to build libmine.a:
-
- cd ../libmine; gmake debug
-
- The macro reference ${VARIANT_VA} converts ${ARCH} to the word 'debug'
- (in this example) and thus ensures the proper version of the library
- is built.
-
-
- Targets
- -------
-
- All Makefile's support the following targets:
-
- all -- make "everything"
- install -- install "everything"
-
- The following targets are provided automatically by
- the included config files:
-
- clean -- delete all targets
- clobber -- 'clean' plus delete sccs'd files
- lint -- run lint or lint-like tool
- get -- "sccs get" all sources
- depend -- build a make dependency file
- "variant targets" -- special variants, see below
-
-
- All directory Makefiles automatically propagate all these targets. If
- you don't wish to support 'all' or 'install' in your source directory,
- you must leave the rules section empty, as the parent directory Makefile
- will attempt it on recursive make's.
-
-
- Configuration
- -------------
-
- All the real work described here happens in file(s) included
- from your Makefile.
-
- All Makefiles include a customization file which is used to select
- compiler and host operating system. The environment variable
- RTEMS_CUSTOM must point to this file; eg:
-
- /.../make/custom/pc386.cfg
-
- All leaf Makefile's also include either 'make/leaf.cfg' (or
- 'make/lib.cfg' for building libraries). These config files provide
- default rules and set up the command macros as appropriate.
-
- All directory Makefiles include 'make/directory.cfg'. directory.cfg
- provides all the rules for recursing through sub directories.
-
- The Makefile templates already perform these include's.
-
- 'make/leaf.cfg' (or directory.cfg) in turn includes:
-
- a file specifying general purpose rules appropriate for
- both leaf and directory makefiles.
- ( make/main.cfg )
-
- personality modules specified by the customization file for:
- compiler ( make/compilers/??.cfg )
-
-
- private customization files
- ---------------------------
-
- [ $(RTEMS_CUSTOM) ]
-
- Your own private configuration file. Specifies which of the above
- files you want to include.
-
- generic rules file
- ------------------
-
- [ make/main.cfg ]
- included by leaf.cfg or directory.cfg.
-
- This file contains some standard rules and variable assignments
- that all Makefiles need.
-
- It also includes the FORCEIT: pseudo target.
-
-
- OS config file for host machine
- -------------------------------
-
- [ make/os/OS-NAME.cfg ]
- included by main.cfg
-
- Figures out the target architecture and specifies command names
- for the OS tools including RCS/CVS (but NOT for the compiler tools).
-
-
- Compiler configuration for the target
- -------------------------------------
-
- [ compilers/COMPILER-NAME.cfg ]
- included by leaf.cfg
-
- Specifies the names of tools for compiling programs.
- Names in here should be fully qualified, and NOT depend on $PATH.
-
- Also specifies compiler flags to be used to generate optimized,
- debugging and profile versions, as well as rules to compile
- assembly language and make makefile dependencies.
-
-
- Configuration Variables
- -----------------------
-
- Variables you have to set in the environment or in your Makefile.
- Note: the rtems module files set RTEMS_ROOT and RTEMS_CUSTOM
- for you.
-
- Environment Variables
- ---------------------
-
- RTEMS_BSP -- name of your 'bsp' eg: pc386
-
- RTEMS_ROOT -- The root of your source tree.
- All other file names are derived from this.
- [ eg: % setenv RTEMS_ROOT $HOME/work/rtems ]
-
- RTEMS_CUSTOM -- name of your config files in make/custom
- Example:
- $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
-
- RTEMS_GNUTOOLS -- root of the gcc tools for the target
-
- The value RTEMS_ROOT is used in the custom
- files to generate the make(1) variables:
-
- PROJECT_ROOT
- PROJECT_RELEASE
- PROJECT_TOOLS
-
- etc., which are used within the make config files themselves.
- (The files in make/*.cfg try to avoid use of word RTEMS so
- they can be more easily shared by other projects)
-
- Preset variables
- ----------------
-
- Aside from command names set by the os and compiler config files,
- a number of MAKE variables are automatically set and maintained by
- the config files.
-
- PROJECT_RELEASE
- -- release/install directory
- [ $(PROJECT_ROOT) ]
-
- PROJECT_BIN
- -- directory for installed binaries
- [ $(PROJECT_ROOT)/bin ]
-
- PROJECT_TOOLS
- -- directory for build environment commands
- [ eg: $(PROJECT_ROOT)/build-tools ]
-
- TARCH -- ${TARGET_ARCH}
- [ eg: o-forc386 ]
- obsolete and should not be referenced
-
- ARCH -- target sub-directory for object code
- [ eg: o-pc386 or o-pc386-debug ]
-
- VARIANTS -- full list of all possible values for $(ARCH);
- used mainly for 'make clean'
- [ eg: "o-pc386 o-pc386-debug o-pc386-profile" ]
-
- VARIANT_VA -- Variant name.
- Normally "", but for 'make debug' it is "debug",
- for 'make profile', "profile, etc.
-
- see make/leaf.cfg for more info.
-
-
- Preset compilation variables
- ----------------------------
-
- This is a list of some of the compilation variables.
- Refer to the compiler config files for the complete list.
-
- CFLAGS_OPTIMIZE_V -- value of optimize flag for compiler
- [ eg: -O ]
-
- CFLAGS_DEBUG_V -- value of debug flag for compiler
- [ eg: -g ]
-
- CFLAGS_PROFILE_V -- compiler profile flags
- [ eg: -pg ]
-
- CFLAGS_DEBUG_OPTIMIZE_V
- -- optimize flag if compiling for debug
- [ eg: "" ]
-
- CFLAGS_DEBUG
- CFLAGS_PROFILE
- CFLAGS_OPTIMIZE -- current values for each depending
- on make variant.
-
- LDFLAGS_STATIC_LIBRARIES_V
- -- ld option for static libraries
- -Bstatic or -dy (svr4)
-
- LDFLAGS_SHARED_LIBRARIES_V
- -- ld option for dynamic libraries
- -Bdynamic or -dn (svr4)
-
- LIB_SOCKET
- -- ld(1) -l option(s) to provide
- socket support.
-
- LIB_MATH -- ld(1) -l option(s) to provide
- math library.
-
-
- Makefile Variables
- ------------------
-
- The following variables may be set in a typical Makefile.
-
- C_PIECES -- File names of your .c files without '.c' suffix.
- [ eg: C_PIECES=main funcs stuff ]
-
- CC_PIECES -- ditto, except for .cc files
-
- S_PIECES -- ditto, except for .S files.
-
- LIB -- target library name in leaf library makefiles.
- [ eg: LIB=${ARCH}/libmine.a ]
-
- H_FILES -- your .h files in this directory.
- [ eg: H_FILES=stuff.h extra.h ]
-
- DEFINES -- cc -D items. Included in CPPFLAGS.
- leaf Makefiles.
- [ eg: DEFINES += -DUNIX ]
-
- CPPFLAGS -- -I include directories.
- leaf Makefiles.
- [ eg: CPPFLAGS += -I../include ]
-
- YFLAGS -- Yacc flags.
- leaf Makefiles.
- [ eg: YFLAGS += -v ]
-
- LD_PATHS -- arguments to -L for ld.
- Will be prefixed with '-L' or '-L ' as appropriate
- and included in LDFLAGS.
-
- LDFLAGS -- -L arguments to ld; more may be ADDed.
-
- LD_LIBS -- libraries to be linked in.
- [ eg: LDLIBS += ../libfoo/${ARCH}/libfoo.a ]
-
- XCFLAGS -- "extra" CFLAGS for special needs. Pre-pended
- to CFLAGS.
- Not set or used by Makefiles.
- Can be set on command line to pass extra flags
- to the compiler.
-
- XCPPFLAGS -- ditto for CPPFLAGS
- Can be set on command line to pass extra flags
- to the preprocessor.
-
- XCCPPFLAGS -- same as XCPPFLAGS for C++.
-
- XCCFLAGS -- same as XCFLAGS for C++.
-
- SUBDIRS -- list of sub directories for make recursion.
- directory Makefiles only.
- [ eg: SUBDIRS=cpu bsp ]
-
- CLEAN_ADDITIONS
- -- list of files or directories that should
- be deleted by 'make clean'
- [ eg: CLEAN_ADDITIONS += y.tab.c ]
-
- See 'leaf.cfg' for the 'clean:' rule and its
- default deletions.
-
- CLOBBER_ADDITIONS
- -- list of files or directories that should
- be deleted by 'make clobber'
- Since 'make clobber' includes 'make clean',
- you don't need to duplicate items in both.
-
- TARGET_ARCH -- target architecture (eg: o-pc386)
- leaf makefiles only.
- Should be specified before 'include leaf.cfg'.
- Only needs to be specified if your target is
- different from output of `arch`.
-
- Command names
- -------------
-
- The following commands should only be called
- as make variables:
-
- MAKE,INSTALL,SHELL
-
- ECHO,CAT,RM,CP,MV,LN,MKDIR,CHMOD
-
- ED,SED
-
- CC,CPP,AS,AR,LD,NM,SIZE,RANLIB,MKLIB,
- YACC,LEX,LINT,CTAGS,ETAGS
-
- Special Directory Makefile Targets
- ----------------------------------
-
- all_WRAPUP
- clean_WRAPUP
- install_WRAPUP
- clean_WRAPUP
- clobber_WRAPUP
- depend_WRAPUP
- -- Specify additional commands for recursive
- (directory level) targets.
-
- This is handy in certain cases where you need
- to do bit of work *after* a recursive make.
-
- make/Templates
- --------------
-
- This directory contains Makefile and source file templates that
- should help in creating or converting makefiles.
-
- Makefile.leaf
- Template leaf Makefiles.
-
- Makefile.lib
- Template leaf library Makefiles.
-
- Makefile.dir
- Template "directory" makefile.
-
-
-
diff --git a/c/src/make/compilers/gcc-target-default.cfg b/c/src/make/compilers/gcc-target-default.cfg
deleted file mode 100644
index 88b5e58c0d..0000000000
--- a/c/src/make/compilers/gcc-target-default.cfg
+++ /dev/null
@@ -1,295 +0,0 @@
-#
-# Shared compiler for all GNU tools configurations
-#
-# $Id$
-#
-
-##
-# CFLAGS_OPTIMIZE_V, CFLAGS_DEBUG_V, CFLAGS_PROFILE_V are the values we
-# would want the corresponding macros to be set to.
-#
-# CFLAGS_OPTIMIZE, CFLAGS_DEBUG, CFLAGS_PROFILE are set in the leaf
-# Makefiles by the 'debug:' and 'profile:' targets to their _V values.
-#
-
-# default flags
-# XCPPFLAGS, XCFLAGS, XCXXFLAGS, XASFLAGS
-# are used to add flags from the shell
-# cf. make.info ("Implicit rules/variables" for details)
-
-# NOTE: Should these go to CPPFLAGS ?
-CFLAGS_DEFAULT=-g -Wall -ansi -fasm
-
-# NOTE: CPU_CFLAGS should probably be renamed to CPU_CPPFLAGS
-# NOTE: CPU_DEFINES should probably be merged with CPU_CFLAGS
-CPPFLAGS += $(CPU_DEFINES) $(CPU_CFLAGS) $(DEFINES) $(XCPPFLAGS)
-CFLAGS = $(CFLAGS_DEFAULT) $(XCFLAGS)
-CXXFLAGS = $(CFLAGS_DEFAULT) $(XCXXFLAGS)
-ASFLAGS = $(CPU_ASFLAGS) $(XASFLAGS)
-
-ifeq ($(RTEMS_USE_GCC272),yes)
-ifeq ($(RTEMS_CROSS_TARGET),no)
-
-ifdef RTEMS_LIBC_DIR
-RTEMS_LIBC_INCLUDES := -I$(RTEMS_LIBC_DIR)/include
-endif
-
-# Used for posix bsps
-CPPFLAGS += \
- -I$(PROJECT_INCLUDE) \
- $(RTEMS_LIBC_INCLUDES)
-else
-# Used for embedded bsps
-# Ask gcc where it finds its own include files
-GCC_INCLUDE=$(shell $(CC) $(CPU_CFLAGS) -print-file-name=include $(GCCSED))
-
-CPPFLAGS += -nostdinc \
- -I$(PROJECT_INCLUDE) \
- -I$(GCC_INCLUDE) \
- -I$(RTEMS_LIBC_DIR)/sys-include \
- -I$(RTEMS_LIBC_DIR)/include
-endif
-
-# default location of Standard C Library
-ifndef LIBC_LIBC
-LIBC_LIBC=$(RTEMS_LIBC_DIR)/lib/libc.a
-endif
-
-ifndef LIBC_LIBM
-LIBC_LIBM=$(RTEMS_LIBC_DIR)/lib/libm.a
-endif
-
-else
-# NOTE: GCCSPECS probably belongs to CPPFLAGS
-# Unfortunately, many custom/*.cfg files do not pass CPPFLAGS
-# to their gcc-2.8 make-exe rules
-GCCSPECS = -B$(PROJECT_RELEASE)/lib/ -specs bsp_specs -qrtems
-
-CC += $(GCCSPECS)
-CXX += $(GCCSPECS)
-
-CPPFLAGS +=
-
-# default location of Standard C Library
-ifndef LIBC_LIBC
-LIBC_LIBC=$(shell $(CC) $(CPU_CFLAGS) -print-file-name=libc.a $(GCCSED))
-endif
-
-ifndef LIBC_LIBM
-LIBC_LIBM=$(shell $(CC) $(CPU_CFLAGS) -print-file-name=libm.a $(GCCSED))
-endif
-endif
-
-# Define this to yes if C++ is included in the development environment.
-# This requires that at least the GNU C++ compiler and libg++ be installed.
-ifeq ($(HAS_CPLUSPLUS),yes)
-CPLUS_LD_LIBS += $(PROJECT_RELEASE)/lib/librtems++$(LIBSUFFIX_VA)
-endif
-
-# debug flag;
-CFLAGS_DEBUG_V+=-Wno-unused
-
-ifeq ($(RTEMS_USE_GCC272),no)
-CFLAGS_DEBUG_V+=-qrtems_debug
-endif
-
-# when debugging, optimize flag: typically empty
-# some compilers do allow optimization with their "-g"
-CFLAGS_DEBUG_OPTIMIZE_V=-g
-
-# profile flag; use gprof(1)
-CFLAGS_PROFILE_V=-pg
-
-# default is to optimize
-CFLAGS_OPTIMIZE=$(CFLAGS_OPTIMIZE_V)
-
-# dynamic libraries
-#CFLAGS_DYNAMIC_V=-fpic
-#ASFLAGS_DYNAMIC_V=
-
-CFLAGS += $(CFLAGS_OPTIMIZE) $(CFLAGS_DEBUG) $(CFLAGS_PROFILE)
-
-# List of library paths without -L
-LD_PATHS= $(PROJECT_RELEASE)/lib
-
-# libraries you want EVERYONE to link with
-#LD_LIBS=
-
-# ld flag to ensure pure-text
-#LDFLAGS_MUST_BE_PURE_V =
-
-# ld flag for [un]shared objects
-#LDFLAGS_STATIC_LIBRARIES_V =
-#LDFLAGS_SHARED_LIBRARIES_V =
-
-# ld flag for incomplete link
-LDFLAGS_INCOMPLETE = -r
-
-# Special linker options when building lib.so
-LDFLAGS_DYNAMIC_V = ??
-
-# Some dynamic linking systems want the preferred name recorded in the binary
-# ref: src/libxil/Makefile
-LDFLAGS_DYNAMIC_LIBNAME_V = -h $(DYNAMIC_VERSION_LIBNAME)
-
-# ld flags for profiling, debugging
-LDFLAGS_PROFILE_V =
-LDFLAGS_DEBUG_V =
-
-LDFLAGS=$(LDFLAGS_PROFILE) $(LDFLAGS_DEBUG) $(LD_PATHS:%=-L %)
-
-#
-# Stuff to clean and clobber for the compiler and its tools
-#
-
-CLEAN_CC = a.out *.o *.BAK
-CLOBBER_CC =
-
-#
-# Client compiler and support tools
-#
-
-# CPP command to write file to standard output
-CPP=$(CC) -E -ansi -w -Wp,-$$
-
-# flags set by cc when running cpp
-# NOTE: CPP_CC_FLAGS does not seem to be used anywhere
-# CPP_CC_FLAGS=-D__STDC__
-
-# egrep regexp to ignore symbol table entries in ar archives.
-# Only used to make sure we skip them when coalescing libraries.
-# skip __.SYMDEF and empty names (maybe bug in ranlib??).
-AR_SYMBOL_TABLE="HIGHLY-UNLIKELY-TO-CONFLICT"
-ARFLAGS=ruv
-
-#
-# How to compile stuff into ${ARCH} subdirectory
-#
-
-${ARCH}/%.o: %.c
- ${COMPILE.c} $(AM_CPPFLAGS) $(AM_CFLAGS) -o $@ $<
-
-${ARCH}/%.o: %.cc
- ${COMPILE.cc} $(AM_CPPFLAGS) $(AM_CXXFLAGS) -o $@ $<
-
-${ARCH}/%.o: %.cpp
- ${COMPILE.cc} $(AM_CPPFLAGS) $(AM_CXXFLAGS) -o $@ $<
-
-${ARCH}/%.o: %.cxx
- ${COMPILE.cc} $(AM_CPPFLAGS) $(AM_CXXFLAGS) -o $@ $<
-
-${ARCH}/%.o: %.C
- ${COMPILE.cc} $(AM_CPPFLAGS) $(AM_CXXFLAGS) -o $@ $<
-
-${ARCH}/%.o: %.S
- ${COMPILE.S} $(AM_CPPFLAGS) -DASM -o $@ $<
-
-# Make foo.rel from foo.o
-${ARCH}/%.rel: ${ARCH}/%.o
- ${LD} $(LDFLAGS_INCOMPLETE) -o $@ $^
-
-# create $(ARCH)/pgm from pgm.sh
-${ARCH}/%: %.sh
- $(RM) $@
- $(CP) $< $@
- $(CHMOD) +x $@
-
-# Dependency files for use by gmake
-# NOTE: we don't put them into $(ARCH)
-# so that 'make clean' doesn't blow it away
-
-DEPEND=Depends-${ARCH}
-
-CLEAN_DEPEND=$(DEPEND).tmp
-CLOBBER_DEPEND=$(DEPEND)
-
-# We deliberately don't have anything depend on the
-# $(DEPEND) file; otherwise it will get rebuilt even
-# on 'make clean'
-#
-
-depend-am: $(C_FILES) $(CC_FILES) $(S_FILES)
-ifneq ($(words $(C_FILES) $(CC_FILES) $(S_FILES)), 0)
-# Use gcc -M to generate dependencies
-# Replace foo.o with $(ARCH)/foo.o
-# Replace $(ARCH) value with string $(ARCH)
-# so that it will for debug and profile cases
- $(COMPILE.c) -M $^ | \
- $(SED) -e 's?^\(.*\)\.o[ ]*:?$$(ARCH)/\1.o:?' \
- -e 's?$(ARCH)/?$$(ARCH)/?' >$(DEPEND).tmp
- $(MV) $(DEPEND).tmp $(DEPEND)
-endif
-depend: depend-am
-
-# spell out all the LINK_FILE's, rather than using -lbsp, so
-# that $(LINK_FILES) can be a dependency
-
-# Start file must be one of
-# $(PROJECT_RELEASE)/lib/start$(LIB_VARIANT).o
-# $(PROJECT_RELEASE)/lib/asmiface$(LIB_VARIANT).o
-# It defaults to start.o, but an app can override it.
-
-ifeq ($(START_BASE),)
- START_FILE=
-else
- START_FILE=$(PROJECT_RELEASE)/lib/$(START_BASE)$(LIB_VARIANT).o
-endif
-
-CONSTRUCTOR=
-
-LIBC_LOW=
-
-ifndef LIBGCC
-LIBGCC = $(shell $(CC) $(CFLAGS) -print-libgcc-file-name $(GCCSED))
-endif
-
-#
-# NOTE: a rule to link an rtems' application should look similar to this
-# (cf. "make-exe" in make/custom/*.cfg):
-#
-# gcc27:
-# $(PGM): $(LINK_FILES)
-# $(LD) $(LDFLAGS) -o $@ $(LINK_OBJS) \
-# --start-group $(LINK_LIBS) --end-group
-#
-# gcc28:
-# $(PGM): $(LINK_FILES)
-# $(CC) $(CFLAGS) -o $@ $(LINK_OBJS) $(LINK_LIBS)
-#
-
-LINK_OBJS =\
- $(CONSTRUCTOR) \
- $(OBJS) \
- $(MANAGERS_NOT_WANTED:%=$(PROJECT_RELEASE)/lib/no-%$(LIB_VARIANT).rel)
-
-LINK_FILES =\
- $(START_FILE) \
- $(CONSTRUCTOR) \
- $(OBJS) \
- $(MANAGERS_NOT_WANTED:%=$(PROJECT_RELEASE)/lib/no-%$(LIB_VARIANT).rel) \
- $(PROJECT_RELEASE)/lib/librtemsall$(LIBSUFFIX_VA)
-
-ifeq ($(RTEMS_USE_GCC272),yes)
-LINK_LIBS = $(PROJECT_RELEASE)/lib/librtemsall$(LIBSUFFIX_VA)
-ifeq ($(RTEMS_CROSS_TARGET),yes)
-# NOTE: add libc and libgcc only for embedded targets
-# LIBC_LIBM should not be needed by rtems itself.
-# FIXME: If a BSP requires libm, its make/custom/*.cfg file should add
-# LIBC_LIBM to LINK_LIBS (untested)
-LINK_LIBS += $(LIBC_LIBC) $(LIBGCC)
-endif
-endif
-
-LINK_LIBS += $(LD_LIBS)
-
-#
-# Allow user to override link commands (to build a prom image, perhaps)
-#
-ifndef LINKCMDS
-LINKCMDS=$(PROJECT_RELEASE)/lib/linkcmds
-endif
-
-
-define make-rel
- $(LD) $(LDFLAGS_INCOMPLETE) $(XLDFLAGS) -o $@ $^
-endef
diff --git a/c/src/make/directory.cfg b/c/src/make/directory.cfg
deleted file mode 100644
index b9faa17db9..0000000000
--- a/c/src/make/directory.cfg
+++ /dev/null
@@ -1,60 +0,0 @@
-#
-# $Id$
-#
-# make/directory.cfg
-#
-# Make(1) configuration file include'd by all directory-level Makefile's.
-#
-# See also make/main.cfg
-#
-
-# This is a simplified variant of automake-1.4's rule for handling
-# subdirectories
-$(RECURSE_TARGETS):
- @set fnord $(MAKEFLAGS); amf=$$2; \
- dot_seen=no; \
- target=`echo $@ | sed -e s/-recursive// -e s/debug_// -e s/profile_// `; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- echo "Making $$target in $$subdir"; \
- local_target="$$target"; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
- done && test -z "$$fail"
-
-
-# mostlyclean-recursive maintainer-clean-recursive:
-clean-recursive \
-distclean-recursive:
- @set fnord $(MAKEFLAGS); amf=$$2; \
- dot_seen=no; \
- rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
- rev="$$subdir $$rev"; \
- test "$$subdir" = "." && dot_seen=yes; \
- done; \
- test "$$dot_seen" = "no" && rev=". $$rev"; \
- target=`echo $@ | sed s/-recursive//`; \
- for subdir in $$rev; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
- done && test -z "$$fail"
-
-clean-am: clean-generic
-distclean-am: distclean-generic clean-am
-
-preinstall: preinstall-recursive
-.PHONY: preinstall preinstall-am preinstall-recursive
-
-distclean: distclean-recursive
- -$(RM) config.status
-
-.PHONY: distclean distclean-am distclean-recursive
-
-clean: clean-recursive
-.PHONY: clean clean-am clean-recursive
-
diff --git a/c/src/make/host.cfg.in b/c/src/make/host.cfg.in
deleted file mode 100644
index cae07de613..0000000000
--- a/c/src/make/host.cfg.in
+++ /dev/null
@@ -1,80 +0,0 @@
-#
-# $Id$
-#
-# OS-specific configuration
-#
-# Derived from rtems/c/make/os/*.cfg in previous RTEMS version.
-#
-
-RTEMS_HOST = @RTEMS_HOST@
-
-#
-# Stuff to clean and clobber for the OS
-#
-
-CLEAN_OS =
-CLOBBER_OS = *~ *.bak TAGS tags
-
-SHELL=@SHELL@
-ECHO=echo
-
-CAT=cat
-RM=@RM@ -f
-CP=@CP@
-MV=@MV@
-LN=@LN@
-MKDIR=mkdir
-CHMOD=chmod
-SED=sed
-# Anybody using this?
-# M4=@M4@
-
-# Global tools
-ifndef PACKHEX
-PACKHEX=$(PROJECT_BIN)/packhex
-endif
-
-ifndef INSTALL_CHANGE
-INSTALL_CHANGE=$(PROJECT_BIN)/install-if-change
-endif
-INSTALL_VARIANT=$(INSTALL_CHANGE) -V "$(LIB_VARIANT)"
-
-# FIXME: HACK for a bug in cygwin-hosted egcs which returns a mixture
-# of '\\' and '/' as path separators.
-# Should be removed as soon as this bug is fixed in egcs.
-GCCSED = @GCCSED@
-
-# ksh (or bash) is used by some shell scripts; ref build-tools/scripts/Makefile
-#
-# Must have shell functions. Some ksh's core dump mysteriously and
-# unreliably on RTEMS shell scripts. bash appears to be the most
-# reliable but late model ksh's are usually OK.
-KSH=@KSH@
-
-#
-# Rule to install a shell script with the proper shell to run it.
-#
-
-# when debugging, one may want to save the previous incarnation of the
-# installed script. Replace the first line of this rule to do this.
-#
-# -$(RM) $@.old
-# -$(MV) $@ $@.old >/dev/null 2>&1
-
-# OBSOLETE: Don't use this anymore, this may be removed in future
-define make-script
- -$(RM) $@
- $(SED) -e '1,1s?^#!KSHELL?#!$(KSH)?' \
- -e '1,1s?^#!SHELL?#!$(SHELL)?' < $< > $@
- $(CHMOD) 0555 $@
-endef
-
-INSTBINFLAGS = -m 0755
-INSTDATAFLAGS = -m 0644
-INSTLIBFLAGS = -m 0644
-INSTDIRFLAGS = -m 0755 -d
-INSTINCFLAGS = -m 0644
-
-ifndef INSTALL_DATA
-INSTALL_DATA = $(INSTALL) $(INSTDATAFLAGS)
-endif
diff --git a/c/src/make/lib.cfg b/c/src/make/lib.cfg
deleted file mode 100644
index 88ba811e9a..0000000000
--- a/c/src/make/lib.cfg
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# $Id$
-#
-# make/lib.cfg
-#
-# Make(1) configuration file include'd by all "library" Makefile
-# Assumes $(LIB) is set to $(ARCH)/libfoo.a
-#
-
-include $(RTEMS_ROOT)/make/leaf.cfg
-
-define make-library
-$(RM) $@
-$(AR) $(ARFLAGS) $@ $(OBJS)
-$(RANLIB) $@
-endef
-
-.PRECIOUS: $(LIB)
diff --git a/c/src/optman/rtems/Makefile.am b/c/src/optman/rtems/Makefile.am
deleted file mode 100644
index 943e9cb210..0000000000
--- a/c/src/optman/rtems/Makefile.am
+++ /dev/null
@@ -1,35 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-C_FILES = no-dpmem.c no-event.c no-msg.c no-mp.c no-part.c no-region.c \
- no-rtmon.c no-sem.c no-signal.c no-timer.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-PGMS = $(C_FILES:%.c=$(ARCH)/%.rel)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../automake/lib.am
-
-TMPINSTALL_FILES += \
-$(C_FILES:%.c=$(PROJECT_RELEASE)/lib/%$(LIB_VARIANT).rel)
-
-$(PROJECT_RELEASE)/lib/%$(LIB_VARIANT).rel: $(ARCH)/%.rel
- $(INSTALL_DATA) $< $@
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CFLAGS += $(CFLAGS_OS_V)
-ASM4FLAGS += -I$(PROJECT_INCLUDE)/rtems
-
-all-local: ${ARCH} $(PGMS) $(TMPINSTALL_FILES)
-
-.PRECIOUS: $(PGMS)
-
-EXTRA_DIST = $(C_FILES)
-
-include $(top_srcdir)/../../../automake/local.am
diff --git a/c/src/optman/rtems/no-dpmem.c b/c/src/optman/rtems/no-dpmem.c
deleted file mode 100644
index 96461d114b..0000000000
--- a/c/src/optman/rtems/no-dpmem.c
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Dual Port Memory Manager
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/address.h>
-#include <rtems/score/object.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/interr.h>
-
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/types.h>
-#include <rtems/rtems/dpmem.h>
-
-void _Dual_ported_memory_Manager_initialization(
- unsigned32 maximum_ports
-)
-{
-}
-
-rtems_status_code rtems_port_create(
- rtems_name name,
- void *internal_start,
- void *external_start,
- unsigned32 length,
- Objects_Id *id
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_status_code rtems_port_ident(
- rtems_name name,
- Objects_Id *id
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_status_code rtems_port_delete(
- Objects_Id id
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_status_code rtems_port_internal_to_external(
- Objects_Id id,
- void *internal,
- void **external
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_status_code rtems_port_external_to_internal(
- Objects_Id id,
- void *external,
- void **internal
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
diff --git a/c/src/optman/rtems/no-event.c b/c/src/optman/rtems/no-event.c
deleted file mode 100644
index 3511518c71..0000000000
--- a/c/src/optman/rtems/no-event.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Event Manager
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/event.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/interr.h>
-
-void _Event_Manager_initialization( void )
-{
-}
-
-rtems_status_code rtems_event_send(
- Objects_Id id,
- rtems_event_set event_in
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_status_code rtems_event_receive(
- rtems_event_set event_in,
- rtems_option option_set,
- rtems_interval ticks,
- rtems_event_set *event_out
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
diff --git a/c/src/optman/rtems/no-mp.c b/c/src/optman/rtems/no-mp.c
deleted file mode 100644
index 5fc8f81df6..0000000000
--- a/c/src/optman/rtems/no-mp.c
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- * Multiprocessing Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#if !defined(RTEMS_MULTIPROCESSING)
-char rtems_no_multiprocessing;
-#else
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/mp.h>
-#include <rtems/score/cpu.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/mpci.h>
-#include <rtems/score/mppkt.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/tqdata.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/interr.h>
-
-void _Multiprocessing_Manager_initialization ( void )
-{
-}
-
-void rtems_multiprocessing_announce ( void )
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
-}
-
-void _MPCI_Handler_initialization(
- MPCI_Control *users_mpci_table,
- unsigned32 timeout_status
-)
-{
-}
-
-void _MPCI_Create_server( void )
-{
-}
-
-void _MPCI_Initialization ( void )
-{
-}
-
-void _MPCI_Register_packet_processor(
- MP_packet_Classes the_class,
- MPCI_Packet_processor the_packet_processor
-
-)
-{
-}
-
-MP_packet_Prefix *_MPCI_Get_packet ( void )
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return NULL;
-}
-
-void _MPCI_Return_packet (
- MP_packet_Prefix *the_packet
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
-}
-
-void _MPCI_Send_process_packet (
- unsigned32 destination,
- MP_packet_Prefix *the_packet
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
-}
-
-unsigned32 _MPCI_Send_request_packet (
- unsigned32 destination,
- MP_packet_Prefix *the_packet,
- States_Control extra_state
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return 0;
-}
-
-void _MPCI_Send_response_packet (
- unsigned32 destination,
- MP_packet_Prefix *the_packet
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
-}
-
-MP_packet_Prefix *_MPCI_Receive_packet ( void )
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return NULL;
-}
-
-Thread_Control *_MPCI_Process_response (
- MP_packet_Prefix *the_packet
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return NULL;
-}
-
-Thread _MPCI_Receive_server(
- unsigned32 ignore
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
-}
-
-void _MPCI_Announce ( void )
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
-}
-
-
-void _MPCI_Internal_packets_Send_process_packet (
- MPCI_Internal_Remote_operations operation
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
-}
-
-void _MPCI_Internal_packets_Process_packet (
- MP_packet_Prefix *the_packet_prefix
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
-}
-
-MPCI_Internal_packet *_MPCI_Internal_packets_Get_packet ( void )
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return NULL;
-}
-#endif
-/* end of file */
diff --git a/c/src/optman/rtems/no-msg.c b/c/src/optman/rtems/no-msg.c
deleted file mode 100644
index ccd34720c3..0000000000
--- a/c/src/optman/rtems/no-msg.c
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
- * Message Queue Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/attr.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/rtems/message.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/interr.h>
-
-void _Message_queue_Manager_initialization(
- unsigned32 maximum_message_queues
-)
-{
-}
-
-rtems_status_code rtems_message_queue_create(
- rtems_name name,
- unsigned32 count,
- unsigned32 max_message_size,
- rtems_attribute attribute_set,
- Objects_Id *id
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_status_code rtems_message_queue_ident(
- rtems_name name,
- unsigned32 node,
- Objects_Id *id
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_status_code rtems_message_queue_delete(
- Objects_Id id
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_status_code rtems_message_queue_send(
- Objects_Id id,
- void *buffer,
- unsigned32 size
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_status_code rtems_message_queue_urgent(
- Objects_Id id,
- void *buffer,
- unsigned32 size
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_status_code rtems_message_queue_broadcast(
- Objects_Id id,
- void *buffer,
- unsigned32 size,
- unsigned32 *count
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_status_code rtems_message_queue_receive(
- Objects_Id id,
- void *buffer,
- unsigned32 *size_p,
- unsigned32 option_set,
- rtems_interval timeout
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_status_code rtems_message_queue_flush(
- Objects_Id id,
- unsigned32 *count
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-unsigned32 _Message_queue_Flush_support(
- Message_queue_Control *the_message_queue
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
- return 0;
-}
-
-boolean _Message_queue_Seize(
- Message_queue_Control *the_message_queue,
- rtems_option option_set,
- void *buffer,
- unsigned32 *size_p
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
- _Thread_Executing->Wait.return_code = RTEMS_UNSATISFIED;
- return TRUE;
-}
-
-rtems_status_code _Message_queue_Submit(
- Objects_Id id,
- void *buffer,
- unsigned32 size,
- Message_queue_Submit_types submit_type
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
diff --git a/c/src/optman/rtems/no-part.c b/c/src/optman/rtems/no-part.c
deleted file mode 100644
index 842ea89333..0000000000
--- a/c/src/optman/rtems/no-part.c
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Partition Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/score/address.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/part.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/interr.h>
-
-void _Partition_Manager_initialization(
- unsigned32 maximum_partitions
-)
-{
-}
-
-rtems_status_code rtems_partition_create(
- rtems_name name,
- void *starting_address,
- unsigned32 length,
- unsigned32 buffer_size,
- rtems_attribute attribute_set,
- Objects_Id *id
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_status_code rtems_partition_ident(
- rtems_name name,
- unsigned32 node,
- Objects_Id *id
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_status_code rtems_partition_delete(
- Objects_Id id
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_status_code rtems_partition_get_buffer(
- Objects_Id id,
- void **buffer
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_status_code rtems_partition_return_buffer(
- Objects_Id id,
- void *buffer
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
diff --git a/c/src/optman/rtems/no-region.c b/c/src/optman/rtems/no-region.c
deleted file mode 100644
index 017d90f722..0000000000
--- a/c/src/optman/rtems/no-region.c
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Region Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
-#include <rtems/rtems/region.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/interr.h>
-
-void _Region_Manager_initialization(
- unsigned32 maximum_regions
-)
-{
-}
-
-rtems_status_code rtems_region_create(
- rtems_name name,
- void *starting_address,
- unsigned32 length,
- unsigned32 page_size,
- rtems_attribute attribute_set,
- Objects_Id *id
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_status_code rtems_region_ident(
- rtems_name name,
- Objects_Id *id
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_status_code rtems_region_delete(
- Objects_Id id
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_status_code rtems_region_get_segment(
- Objects_Id id,
- unsigned32 size,
- rtems_option option_set,
- rtems_interval timeout,
- void **segment
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_status_code rtems_region_get_segment_size(
- Objects_Id id,
- void *segment,
- unsigned32 *size
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_status_code rtems_region_return_segment(
- Objects_Id id,
- void *segment
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
diff --git a/c/src/optman/rtems/no-rtmon.c b/c/src/optman/rtems/no-rtmon.c
deleted file mode 100644
index cc96089a63..0000000000
--- a/c/src/optman/rtems/no-rtmon.c
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Rate Monotonic Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/interr.h>
-
-#include <rtems/rtems/types.h>
-#include <rtems/rtems/ratemon.h>
-
-void _Rate_monotonic_Manager_initialization(
- unsigned32 maximum_periods
-)
-{
-}
-
-rtems_status_code rtems_rate_monotonic_create(
- rtems_name name,
- Objects_Id *id
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_status_code rtems_rate_monotonic_ident(
- rtems_name name,
- Objects_Id *id
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_status_code rtems_rate_monotonic_cancel(
- Objects_Id id
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_status_code rtems_rate_monotonic_delete(
- Objects_Id id
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_status_code rtems_rate_monotonic_period(
- Objects_Id id,
- rtems_interval length
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-void _Rate_monotonic_Timeout(
- Objects_Id id,
- void *ignored
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
-}
-
-boolean _Rate_monotonic_Set_state(
-Rate_monotonic_Control *the_period
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return FALSE;
-}
diff --git a/c/src/optman/rtems/no-sem.c b/c/src/optman/rtems/no-sem.c
deleted file mode 100644
index 7eb04d6eca..0000000000
--- a/c/src/optman/rtems/no-sem.c
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Semaphore Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/attr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
-#include <rtems/rtems/sem.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/interr.h>
-
-void _Semaphore_Manager_initialization(
- unsigned32 maximum_semaphores
-)
-{
-}
-
-rtems_status_code rtems_semaphore_create(
- rtems_name name,
- unsigned32 count,
- rtems_attribute attribute_set,
- rtems_task_priority priority_ceiling,
- Objects_Id *id
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_status_code rtems_semaphore_ident(
- rtems_name name,
- unsigned32 node,
- Objects_Id *id
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_status_code rtems_semaphore_delete(
- Objects_Id id
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_status_code rtems_semaphore_obtain(
- Objects_Id id,
- unsigned32 option_set,
- rtems_interval timeout
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_status_code rtems_semaphore_release(
- Objects_Id id
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-boolean _Semaphore_Seize(
- Semaphore_Control *the_semaphore,
- rtems_option option_set
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- _Thread_Executing->Wait.return_code = RTEMS_UNSATISFIED;
- return TRUE;
-}
diff --git a/c/src/optman/rtems/no-signal.c b/c/src/optman/rtems/no-signal.c
deleted file mode 100644
index b45fc33265..0000000000
--- a/c/src/optman/rtems/no-signal.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Signal Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/interr.h>
-
-#include <rtems/rtems/asr.h>
-#include <rtems/rtems/modes.h>
-#include <rtems/rtems/signal.h>
-
-void _Signal_Manager_initialization( void )
-{
-}
-
-rtems_status_code rtems_signal_catch(
- rtems_asr_entry handler,
- rtems_mode mode_set
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_status_code rtems_signal_send(
- rtems_id id,
- rtems_signal_set signal_set
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-/* end of file */
diff --git a/c/src/optman/rtems/no-timer.c b/c/src/optman/rtems/no-timer.c
deleted file mode 100644
index e788ad433f..0000000000
--- a/c/src/optman/rtems/no-timer.c
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Timer Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/score/object.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/tod.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/score/interr.h>
-
-#include <rtems/rtems/types.h>
-#include <rtems/rtems/timer.h>
-
-void _Timer_Manager_initialization(
- unsigned32 maximum_timers
-)
-{
-}
-
-rtems_status_code rtems_timer_create(
- rtems_name name,
- Objects_Id *id
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_status_code rtems_timer_ident(
- rtems_name name,
- Objects_Id *id
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_status_code rtems_timer_cancel(
- Objects_Id id
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_status_code rtems_timer_delete(
- Objects_Id id
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_status_code rtems_timer_fire_after(
- Objects_Id id,
- rtems_interval ticks,
- rtems_timer_service_routine_entry routine,
- void *user_data
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_status_code rtems_timer_fire_when(
- Objects_Id id,
- rtems_time_of_day *wall_time,
- rtems_timer_service_routine_entry routine,
- void *user_data
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_status_code rtems_timer_reset(
- Objects_Id id
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
diff --git a/c/src/optman/sapi/Makefile.am b/c/src/optman/sapi/Makefile.am
deleted file mode 100644
index c98b33860f..0000000000
--- a/c/src/optman/sapi/Makefile.am
+++ /dev/null
@@ -1,34 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-C_FILES = no-ext.c no-io.c
-C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
-
-PGMS = $(C_FILES:%.c=$(ARCH)/%.rel)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../automake/lib.am
-
-TMPINSTALL_FILES += \
-$(C_FILES:%.c=$(PROJECT_RELEASE)/lib/%$(LIB_VARIANT).rel)
-
-$(PROJECT_RELEASE)/lib/%$(LIB_VARIANT).rel: $(ARCH)/%.rel
- $(INSTALL_DATA) $< $@
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CFLAGS += $(CFLAGS_OS_V)
-ASM4FLAGS += -I $(PROJECT_INCLUDE)/rtems
-
-all-local: ${ARCH} $(PGMS) $(TMPINSTALL_FILES)
-
-.PRECIOUS: $(PGMS)
-
-EXTRA_DIST = $(C_FILES)
-
-include $(top_srcdir)/../../../automake/local.am
diff --git a/c/src/optman/sapi/no-ext.c b/c/src/optman/sapi/no-ext.c
deleted file mode 100644
index 1c2fffe8b8..0000000000
--- a/c/src/optman/sapi/no-ext.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Extension Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/score/object.h>
-#include <rtems/score/thread.h>
-#include <rtems/extension.h>
-#include <rtems/score/interr.h>
-
-void _Extension_Manager_initialization(
- unsigned32 maximum_extensions
-)
-{
-}
-
-rtems_status_code rtems_extension_create(
- rtems_name name,
- rtems_extensions_table *extension_table,
- Objects_Id *id
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_status_code rtems_extension_ident(
- rtems_name name,
- Objects_Id *id
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_status_code rtems_extension_delete(
- Objects_Id id
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
diff --git a/c/src/optman/sapi/no-io.c b/c/src/optman/sapi/no-io.c
deleted file mode 100644
index df03245239..0000000000
--- a/c/src/optman/sapi/no-io.c
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * Input/Output Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/io.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/interr.h>
-
-void _IO_Manager_initialization(
- rtems_driver_address_table *driver_table,
- unsigned32 number_of_drivers,
- unsigned32 number_of_devices
-)
-{
-}
-
-void _IO_Initialize_all_drivers( void )
-{
-}
-
-rtems_status_code rtems_io_register_name(
- char *device_name,
- rtems_device_major_number major,
- rtems_device_minor_number minor
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_status_code rtems_io_lookup_name(
- const char *pathname,
- rtems_driver_name_t **rnp
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_status_code rtems_io_initialize(
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void *argument
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_status_code rtems_io_open(
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void *argument
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_status_code rtems_io_close(
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void *argument
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_status_code rtems_io_read(
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void *argument
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_status_code rtems_io_write(
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void *argument
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_status_code rtems_io_control(
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void *argument
-)
-{
- _Internal_error_Occurred(
- INTERNAL_ERROR_RTEMS_API,
- FALSE,
- RTEMS_NOT_CONFIGURED
- );
- return RTEMS_NOT_CONFIGURED;
-}
diff --git a/cpukit/Makefile.am b/cpukit/Makefile.am
deleted file mode 100644
index 3677d657e4..0000000000
--- a/cpukit/Makefile.am
+++ /dev/null
@@ -1,19 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-
-if HAS_POSIX
-POSIX_SUBDIRS = posix
-endif
-
-if HAS_ITRON
-ITRON_SUBDIRS = itron
-endif
-
-SUBDIRS = score rtems $(POSIX_SUBDIRS) $(ITRON_SUBDIRS) sapi wrapup
-
-include $(top_srcdir)/../../../automake/subdirs.am
-include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/ada/rtems.adb b/cpukit/ada/rtems.adb
deleted file mode 100644
index 44cd0838a3..0000000000
--- a/cpukit/ada/rtems.adb
+++ /dev/null
@@ -1,2064 +0,0 @@
---
--- RTEMS / Body
--- DESCRIPTION:
---
--- This package provides the interface to the RTEMS API.
---
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1997.
--- On-Line Applications Research Corporation (OAR).
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with Ada;
-with Ada.Unchecked_Conversion;
-with System;
-with Interfaces; use Interfaces;
-with Interfaces.C;
-
-package body RTEMS is
-
- --
- -- Utility Functions
- --
-
- function From_Ada_Boolean (
- Ada_Boolean : Standard.Boolean
- ) return RTEMS.Boolean is
- begin
-
- if Ada_Boolean = Standard.True then
- return RTEMS.True;
- end if;
-
- return RTEMS.False;
-
- end From_Ada_Boolean;
-
- function To_Ada_Boolean (
- RTEMS_Boolean : RTEMS.Boolean
- ) return Standard.Boolean is
- begin
-
- if RTEMS_Boolean = RTEMS.True then
- return Standard.True;
- end if;
-
- return Standard.False;
-
- end To_Ada_Boolean;
-
- function Milliseconds_To_Microseconds (
- Milliseconds : RTEMS.Unsigned32
- ) return RTEMS.Unsigned32 is
- begin
-
- return Milliseconds * 1000;
-
- end Milliseconds_To_Microseconds;
-
- function Microseconds_To_Ticks (
- Microseconds : RTEMS.Unsigned32
- ) return RTEMS.Interval is
- Microseconds_Per_Tick : RTEMS.Interval;
- pragma Import (C, Microseconds_Per_Tick, "_TOD_Microseconds_per_tick");
- begin
-
- return Microseconds / Microseconds_Per_Tick;
-
- end Microseconds_To_Ticks;
-
- function Milliseconds_To_Ticks (
- Milliseconds : RTEMS.Unsigned32
- ) return RTEMS.Interval is
- begin
-
- return Microseconds_To_Ticks(Milliseconds_To_Microseconds(Milliseconds));
-
- end Milliseconds_To_Ticks;
-
- function Build_Name (
- C1 : in Character;
- C2 : in Character;
- C3 : in Character;
- C4 : in Character
- ) return RTEMS.Name is
- C1_Value : RTEMS.Unsigned32;
- C2_Value : RTEMS.Unsigned32;
- C3_Value : RTEMS.Unsigned32;
- C4_Value : RTEMS.Unsigned32;
- begin
-
- C1_Value := Character'Pos( C1 );
- C2_Value := Character'Pos( C2 );
- C3_Value := Character'Pos( C3 );
- C4_Value := Character'Pos( C4 );
-
- return Interfaces.Shift_Left( C1_Value, 24 ) or
- Interfaces.Shift_Left( C2_Value, 16 ) or
- Interfaces.Shift_Left( C3_Value, 8 ) or
- C4_Value;
-
- end Build_Name;
-
- procedure Name_To_Characters (
- Name : in RTEMS.Name;
- C1 : out Character;
- C2 : out Character;
- C3 : out Character;
- C4 : out Character
- ) is
- C1_Value : RTEMS.Unsigned32;
- C2_Value : RTEMS.Unsigned32;
- C3_Value : RTEMS.Unsigned32;
- C4_Value : RTEMS.Unsigned32;
- begin
-
- C1_Value := Interfaces.Shift_Right( Name, 24 );
- C2_Value := Interfaces.Shift_Right( Name, 16 );
- C3_Value := Interfaces.Shift_Right( Name, 8 );
- C4_Value := Name;
-
- C1_Value := C1_Value and 16#00FF#;
- C2_Value := C2_Value and 16#00FF#;
- C3_Value := C3_Value and 16#00FF#;
- C4_Value := C4_Value and 16#00FF#;
-
- C1 := Character'Val( C1_Value );
- C2 := Character'Val( C2_Value );
- C3 := Character'Val( C3_Value );
- C4 := Character'Val( C4_Value );
-
- end Name_To_Characters;
-
- function Get_Node (
- ID : in RTEMS.ID
- ) return RTEMS.Unsigned32 is
- begin
-
- -- May not be right
- return Interfaces.Shift_Right( ID, 16 );
-
- end Get_Node;
-
- function Get_Index (
- ID : in RTEMS.ID
- ) return RTEMS.Unsigned32 is
- begin
-
- -- May not be right
- return ID and 16#FFFF#;
-
- end Get_Index;
-
-
- function Are_Statuses_Equal (
- Status : in RTEMS.Status_Codes;
- Desired : in RTEMS.Status_Codes
- ) return Standard.Boolean is
- begin
-
- if Status = Desired then
- return Standard.True;
- end if;
-
- return Standard.False;
-
- end Are_Statuses_Equal;
-
- function Is_Status_Successful (
- Status : in RTEMS.Status_Codes
- ) return Standard.Boolean is
- begin
-
- if Status = RTEMS.Successful then
- return Standard.True;
- end if;
-
- return Standard.False;
-
- end Is_Status_Successful;
-
- function Subtract (
- Left : in RTEMS.Address;
- Right : in RTEMS.Address
- ) return RTEMS.Unsigned32 is
- function To_Unsigned32 is
- new Ada.Unchecked_Conversion (System.Address, RTEMS.Unsigned32);
-
- begin
- return To_Unsigned32(Left) - To_Unsigned32(Right);
- end Subtract;
-
- function Are_Equal (
- Left : in RTEMS.Address;
- Right : in RTEMS.Address
- ) return Standard.Boolean is
- function To_Unsigned32 is
- new Ada.Unchecked_Conversion (System.Address, RTEMS.Unsigned32);
-
- begin
- return (To_Unsigned32(Left) = To_Unsigned32(Right));
- end Are_Equal;
-
-
- --
- --
- -- RTEMS API
- --
-
- --
- -- Initialization Manager
- --
-
- procedure Initialize_Executive (
- Configuration_Table : in RTEMS.Configuration_Table_Pointer;
- CPU_Table : in RTEMS.CPU_Table_Pointer
- ) is
- procedure Initialize_Executive_Base (
- Configuration_Table : in RTEMS.Configuration_Table_Pointer;
- CPU_Table : in RTEMS.CPU_Table_Pointer
- );
- pragma Import (C, Initialize_Executive_Base,
- "rtems_initialize_executive");
-
- begin
-
- Initialize_Executive_Base (Configuration_Table, CPU_Table);
-
- end Initialize_Executive;
-
- procedure Initialize_Executive_Early (
- Configuration_Table : in RTEMS.Configuration_Table_Pointer;
- CPU_Table : in RTEMS.CPU_Table_Pointer;
- Level : out RTEMS.ISR_Level
- ) is
- function Initialize_Executive_Early_Base (
- Configuration_Table : in RTEMS.Configuration_Table_Pointer;
- CPU_Table : in RTEMS.CPU_Table_Pointer
- ) return RTEMS.ISR_Level;
- pragma Import (C, Initialize_Executive_Early_Base,
- "rtems_initialize_executive_early");
-
- begin
-
- Level := Initialize_Executive_Early_Base (Configuration_Table, CPU_Table);
-
- end Initialize_Executive_Early;
-
- procedure Initialize_Executive_Late (
- BSP_Level : in RTEMS.ISR_Level
- ) is
- procedure Initialize_Executive_Late_Base (
- Level : in RTEMS.ISR_Level
- );
- pragma Import (C, Initialize_Executive_Late_Base,
- "rtems_initialize_executive_late");
-
- begin
-
- Initialize_Executive_Late_Base (BSP_Level);
-
- end Initialize_Executive_Late;
-
- procedure Shutdown_Executive (
- Result : in RTEMS.Unsigned32
- ) is
- procedure Shutdown_Executive_Base;
- pragma Import (C,Shutdown_Executive_Base,"rtems_shutdown_executive");
- begin
-
- Shutdown_Executive_Base;
-
- end Shutdown_Executive;
-
-
- --
- -- Task Manager
- --
-
- procedure Task_Create (
- Name : in RTEMS.Name;
- Initial_Priority : in RTEMS.Task_Priority;
- Stack_Size : in RTEMS.Unsigned32;
- Initial_Modes : in RTEMS.Mode;
- Attribute_Set : in RTEMS.Attribute;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Task_Create_Base (
- Name : RTEMS.Name;
- Initial_Priority : RTEMS.Task_Priority;
- Stack_Size : RTEMS.Unsigned32;
- Initial_Modes : RTEMS.Mode;
- Attribute_Set : RTEMS.Attribute;
- ID : access RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Task_Create_Base, "rtems_task_create");
- ID_Base : aliased RTEMS.ID := ID;
- begin
- Result := Task_Create_Base (
- Name,
- Initial_Priority,
- Stack_Size,
- Initial_Modes,
- Attribute_Set,
- ID_Base'Unchecked_Access
- );
- ID := ID_Base;
- end Task_Create;
-
-
- procedure Task_Ident (
- Name : in RTEMS.Name;
- Node : in RTEMS.Node;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
-
- function Task_Ident_Base (
- Name : RTEMS.Name;
- Node : RTEMS.Node;
- ID : access RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Task_Ident_Base, "rtems_task_ident");
- ID_Base : aliased RTEMS.ID := ID;
-
- begin
-
- Result := Task_Ident_Base (
- Name,
- Node,
- ID_Base'Unchecked_Access
- );
-
- ID := ID_Base;
-
- end Task_Ident;
-
- procedure Task_Start (
- ID : in RTEMS.ID;
- Entry_Point : in RTEMS.Task_Entry;
- Argument : in RTEMS.Task_Argument;
- Result : out RTEMS.Status_Codes
- ) is
-
- function Task_Start_Base (
- ID : RTEMS.ID;
- Entry_Point : RTEMS.Task_Entry;
- Argument : RTEMS.Task_Argument
- ) return RTEMS.Status_Codes;
- pragma Import (C, Task_Start_Base, "rtems_task_start");
-
- begin
-
- Result := Task_Start_Base (
- ID,
- Entry_Point,
- Argument
- );
-
- end Task_Start;
-
- procedure Task_Restart (
- ID : in RTEMS.ID;
- Argument : in RTEMS.Task_Argument;
- Result : out RTEMS.Status_Codes
- ) is
- function Task_Restart_Base (
- ID : RTEMS.ID;
- Argument : RTEMS.Task_Argument
- ) return RTEMS.Status_Codes;
- pragma Import (C, Task_Restart_Base, "rtems_task_restart");
- begin
-
- Result := Task_Restart_Base (
- ID,
- Argument
- );
-
- end Task_Restart;
-
- procedure Task_Delete (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Task_Delete_Base (
- ID : RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Task_Delete_Base, "rtems_task_delete");
- begin
-
- Result := Task_Delete_Base ( ID );
-
- end Task_Delete;
-
- procedure Task_Suspend (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Task_Suspend_Base (
- ID : RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Task_Suspend_Base, "rtems_task_suspend");
- begin
-
- Result := Task_Suspend_Base ( ID );
-
- end Task_Suspend;
-
- procedure Task_Resume (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Task_Resume_Base (
- ID : RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Task_Resume_Base, "rtems_task_resume");
- begin
-
- Result := Task_Resume_Base ( ID );
-
- end Task_Resume;
-
- procedure Task_Is_Suspended (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Task_Is_Suspended (
- ID : RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Task_Is_Suspended_Base, "rtems_task_is_suspended");
- begin
-
- Result := Task_Is_Suspended_Base ( ID );
-
- end Task_Is_Suspended;
-
-
- procedure Task_Set_Priority (
- ID : in RTEMS.ID;
- New_Priority : in RTEMS.Task_Priority;
- Old_Priority : out RTEMS.Task_Priority;
- Result : out RTEMS.Status_Codes
- ) is
- function Task_Set_Priority_Base (
- ID : RTEMS.ID;
- New_Priority : RTEMS.Task_Priority;
- Old_Priority : access RTEMS.Task_Priority
- ) return RTEMS.Status_Codes;
- pragma Import (C, Task_Set_Priority_Base, "rtems_task_set_priority");
- Old_Priority_Base : aliased RTEMS.Task_Priority := Old_Priority;
-
- begin
-
- Result := Task_Set_Priority_Base (
- ID,
- New_Priority,
- Old_Priority_Base'Unchecked_Access
- );
-
- Old_Priority := Old_Priority_Base;
-
- end Task_Set_Priority;
-
- procedure Task_Mode (
- Mode_Set : in RTEMS.Mode;
- Mask : in RTEMS.Mode;
- Previous_Mode_Set : out RTEMS.Mode;
- Result : out RTEMS.Status_Codes
- ) is
- function Task_Mode_Base (
- Mode_Set : RTEMS.Mode;
- Mask : RTEMS.Mode;
- Previous_Mode_Set : access RTEMS.Mode
- ) return RTEMS.Status_Codes;
- pragma Import (C, Task_Mode_Base, "rtems_task_mode");
- Previous_Mode_Set_Base : aliased RTEMS.Mode := Previous_Mode_Set;
- begin
-
- Result := Task_Mode_Base (
- Mode_Set,
- Mask,
- Previous_Mode_Set_Base'Unchecked_Access
- );
-
- Previous_Mode_Set := Previous_Mode_Set_Base;
-
- end Task_Mode;
-
- procedure Task_Get_Note (
- ID : in RTEMS.ID;
- Notepad : in RTEMS.Notepad_Index;
- Note : out RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
- ) is
- function Task_Get_Note_Base (
- ID : RTEMS.ID;
- Notepad : RTEMS.Notepad_Index;
- Note : access RTEMS.Unsigned32
- ) return RTEMS.Status_Codes;
- pragma Import (C, Task_Get_Note_Base, "rtems_task_get_note");
- Note_Base : aliased RTEMS.Unsigned32 := Note;
- begin
-
- Result := Task_Get_Note_Base (
- ID,
- Notepad,
- Note_Base'Unchecked_Access
- );
-
- Note := NOTE_Base;
-
- end Task_Get_Note;
-
- procedure Task_Set_Note (
- ID : in RTEMS.ID;
- Notepad : in RTEMS.Notepad_Index;
- Note : in RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
- ) is
- function Task_Set_Note_Base (
- ID : RTEMS.ID;
- Notepad : RTEMS.Notepad_Index;
- Note : RTEMS.Unsigned32
- ) return RTEMS.Status_Codes;
- pragma Import (C, Task_Set_Note_Base, "rtems_task_set_note");
- begin
-
- Result := Task_Set_Note_Base ( ID, Notepad, Note );
-
- end Task_Set_Note;
-
- procedure Task_Wake_When (
- Time_Buffer : in RTEMS.Time_Of_Day;
- Result : out RTEMS.Status_Codes
- ) is
- function Task_Wake_When_Base (
- Time_Buffer : RTEMS.Time_Of_Day
- ) return RTEMS.Status_Codes;
- pragma Import (C, Task_Wake_When_Base, "rtems_task_wake_when");
- begin
-
- Result := Task_Wake_When_Base ( Time_Buffer );
-
- end Task_Wake_When;
-
- procedure Task_Wake_After (
- Ticks : in RTEMS.Interval;
- Result : out RTEMS.Status_Codes
- ) is
- function Task_Wake_After_Base (
- Ticks : RTEMS.Interval
- ) return RTEMS.Status_Codes;
- pragma Import (C, Task_Wake_After_Base, "rtems_task_wake_after");
- begin
-
- Result := Task_Wake_After_Base ( Ticks );
-
- end Task_Wake_After;
-
- --
- -- Interrupt Manager
- --
-
- procedure Interrupt_Catch (
- New_ISR_Handler : in RTEMS.Address;
- Vector : in RTEMS.Vector_Number;
- Old_ISR_Handler : out RTEMS.Address;
- Result : out RTEMS.Status_Codes
- ) is
- function Interrupt_Catch_Base (
- New_ISR_Handler : RTEMS.Address;
- Vector : RTEMS.Vector_Number;
- Old_ISR_Handler : access RTEMS.Address
- ) return RTEMS.Status_Codes;
- pragma Import (C, Interrupt_Catch_Base, "rtems_interrupt_catch");
- Old_ISR_Handler_Base : aliased RTEMS.Address := Old_ISR_Handler;
- begin
-
- Result := Interrupt_Catch_Base (
- New_ISR_Handler,
- Vector,
- OLD_ISR_HANDLER_Base'Unchecked_Access
- );
-
- Old_ISR_Handler := OLD_ISR_HANDLER_Base;
-
- end Interrupt_Catch;
-
- -- XXX
- function Interrupt_Disable
- return RTEMS.ISR_Level is
- begin
- return 0;
- end Interrupt_Disable;
-
- procedure Interrupt_Enable (
- Level : in RTEMS.ISR_Level
- ) is
- begin
- Null;
- end Interrupt_Enable;
-
- procedure Interrupt_Flash (
- Level : in RTEMS.ISR_Level
- ) is
- begin
- Null;
- end Interrupt_Flash;
-
- function Interrupt_Is_In_Progress
- return RTEMS.Boolean is
- begin
- return RTEMS.From_Ada_Boolean (Standard.True);
- end Interrupt_Is_In_Progress;
-
- --
- -- Clock Manager
- --
-
- procedure Clock_Get (
- Option : in RTEMS.Clock_Get_Options;
- Time_Buffer : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
- ) is
- function Clock_Get_base (
- Option : RTEMS.Clock_Get_Options;
- Time_Buffer : RTEMS.Address
- ) return RTEMS.Status_Codes;
- pragma Import (C, Clock_Get_base, "rtems_clock_get");
- begin
-
- Result := Clock_Get_base ( Option, Time_Buffer );
-
- end Clock_Get;
-
- procedure Clock_Set (
- Time_Buffer : in RTEMS.Time_Of_Day;
- Result : out RTEMS.Status_Codes
- ) is
- function Clock_Set_base (
- Time_Buffer : RTEMS.Time_Of_Day
- ) return RTEMS.Status_Codes;
- pragma Import (C, Clock_Set_base, "rtems_clock_set");
- begin
-
- Result := Clock_Set_base ( Time_Buffer );
-
- end Clock_Set;
-
- procedure Clock_Tick (
- Result : out RTEMS.Status_Codes
- ) is
- function Clock_Tick_Base return RTEMS.Status_Codes;
- pragma Import (C, Clock_Tick_Base, "rtems_clock_tick");
- begin
-
- Result := Clock_Tick_Base;
-
- end Clock_Tick;
-
- --
- -- Extension Manager
- --
-
- procedure Extension_Create (
- Name : in RTEMS.Name;
- Table : in RTEMS.Extensions_Table_Pointer;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Extension_Create_Base (
- Name : RTEMS.Name;
- Table : RTEMS.Extensions_Table_Pointer;
- ID : access RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Extension_Create_Base, "rtems_extension_create");
- ID_Base : aliased RTEMS.ID := ID;
- begin
-
- Result := Extension_Create_Base (
- Name,
- Table,
- ID_Base'Unchecked_Access
- );
-
- ID := ID_Base;
-
- end Extension_Create;
-
- procedure Extension_Ident (
- Name : in RTEMS.Name;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Extension_Ident_Base (
- Name : RTEMS.Name;
- ID : access RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Extension_Ident_Base, "rtems_extension_ident");
- ID_Base : aliased RTEMS.ID := ID;
- begin
-
- Result := Extension_Ident_Base (
- Name,
- ID_Base'Unchecked_Access
- );
-
- ID := ID_Base;
-
- end Extension_Ident;
-
- procedure Extension_Delete (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Extension_Delete_Base (
- ID : RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Extension_Delete_Base, "rtems_extension_delete");
- begin
-
- Result := Extension_Delete_Base ( ID );
-
- end Extension_Delete;
-
- --
- -- Timer Manager
- --
-
- procedure Timer_Create (
- Name : in RTEMS.Name;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Timer_Create_Base (
- Name : RTEMS.Name;
- ID : access RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Timer_Create_Base, "rtems_timer_create");
- ID_Base : aliased RTEMS.ID := ID;
- begin
-
- Result := Timer_Create_Base (
- Name,
- ID_Base'Unchecked_Access
- );
-
- ID := ID_Base;
-
- end Timer_Create;
-
- procedure Timer_Ident (
- Name : in RTEMS.Name;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Timer_Ident_Base (
- Name : RTEMS.Name;
- ID : access RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Timer_Ident_Base, "rtems_timer_ident");
- ID_Base : aliased RTEMS.ID := ID;
- begin
-
- Result := Timer_Ident_Base (
- Name,
- ID_Base'Unchecked_Access
- );
-
- ID := ID_Base;
-
- end Timer_Ident;
-
- procedure Timer_Delete (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Timer_Delete_Base (
- ID : RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Timer_Delete_Base, "rtems_timer_delete");
- begin
-
- Result := Timer_Delete_Base ( ID );
-
- end Timer_Delete;
-
- procedure Timer_Fire_After (
- ID : in RTEMS.ID;
- Ticks : in RTEMS.Interval;
- Routine : in RTEMS.Timer_Service_Routine;
- User_Data : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
- ) is
- function Timer_Fire_After_Base (
- ID : RTEMS.ID;
- Ticks : RTEMS.Interval;
- Routine : RTEMS.Timer_Service_Routine;
- User_Data : RTEMS.Address
- ) return RTEMS.Status_Codes;
- pragma Import (C, Timer_Fire_After_Base, "rtems_timer_fire_after");
- begin
-
- Result := Timer_Fire_After_Base (
- ID,
- Ticks,
- Routine,
- User_Data
- );
-
- end Timer_Fire_After;
-
- procedure Timer_Fire_When (
- ID : in RTEMS.ID;
- Wall_Time : in RTEMS.Time_Of_Day;
- Routine : in RTEMS.Timer_Service_Routine;
- User_Data : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
- ) is
- function Timer_Fire_When (
- ID : RTEMS.ID;
- Wall_Time : in RTEMS.Time_Of_Day;
- Routine : RTEMS.Timer_Service_Routine;
- User_Data : RTEMS.Address
- ) return RTEMS.Status_Codes;
- pragma Import (C, Timer_Fire_When, "rtems_timer_fire_when");
- begin
-
- Result := Timer_Fire_When (
- ID,
- Wall_Time,
- Routine,
- User_Data
- );
-
- end Timer_Fire_When;
-
- procedure Timer_Reset (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Timer_Reset_Base (
- ID : RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Timer_Reset_Base, "rtems_timer_reset");
- begin
-
- Result := Timer_Reset_Base ( ID );
-
- end Timer_Reset;
-
- procedure Timer_Cancel (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Timer_Cancel_Base (
- ID : RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Timer_Cancel_Base, "rtems_timer_cancel");
- begin
-
- Result := Timer_Cancel_Base ( ID );
-
- end Timer_Cancel;
-
- --
- -- Semaphore Manager
- --
-
- procedure Semaphore_Create (
- Name : in RTEMS.Name;
- Count : in RTEMS.Unsigned32;
- Attribute_Set : in RTEMS.Attribute;
- Priority_Ceiling : in RTEMS.Task_Priority;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Semaphore_Create_Base (
- Name : RTEMS.Name;
- Count : RTEMS.Unsigned32;
- Attribute_Set : RTEMS.Attribute;
- Priority_Ceiling : RTEMS.Task_Priority;
- ID : access RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Semaphore_Create_Base, "rtems_semaphore_create");
- ID_Base : aliased RTEMS.ID := ID;
- begin
-
- Result := Semaphore_Create_Base (
- Name,
- Count,
- Attribute_Set,
- Priority_Ceiling,
- ID_Base'Unchecked_Access
- );
-
- ID := ID_Base;
-
- end Semaphore_Create;
-
- procedure Semaphore_Delete (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Semaphore_Delete_Base (
- ID : RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Semaphore_Delete_Base, "rtems_semaphore_delete");
- begin
-
- Result := Semaphore_Delete_Base ( ID );
-
- end Semaphore_Delete;
-
- procedure Semaphore_Ident (
- Name : in RTEMS.Name;
- Node : in RTEMS.Unsigned32;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Semaphore_Ident_Base (
- Name : RTEMS.Name;
- Node : RTEMS.Unsigned32;
- ID : access RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Semaphore_Ident_Base, "rtems_semaphore_ident");
- ID_Base : aliased RTEMS.ID := ID;
- begin
-
- Result := Semaphore_Ident_Base (
- Name,
- Node,
- ID_Base'Unchecked_Access
- );
-
- ID := ID_Base;
-
- end Semaphore_Ident;
-
- procedure Semaphore_Obtain (
- ID : in RTEMS.ID;
- Option_Set : in RTEMS.Option;
- Timeout : in RTEMS.Interval;
- Result : out RTEMS.Status_Codes
- ) is
- function Semaphore_Obtain_Base (
- ID : RTEMS.ID;
- Option_Set : RTEMS.Option;
- Timeout : RTEMS.Interval
- ) return RTEMS.Status_Codes;
- pragma Import (C, Semaphore_Obtain_Base, "rtems_semaphore_obtain");
- begin
-
- Result := Semaphore_Obtain_Base ( ID, Option_Set, Timeout );
-
- end Semaphore_Obtain;
-
- procedure Semaphore_Release (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Semaphore_Release_Base (
- ID : RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Semaphore_Release_Base, "rtems_semaphore_release");
- begin
-
- Result := Semaphore_Release_Base ( ID );
-
- end Semaphore_Release;
-
- procedure Semaphore_Flush (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Semaphore_Flush_Base (
- ID : RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Semaphore_Flush_Base, "rtems_semaphore_flush");
- begin
-
- Result := Semaphore_Flush_Base ( ID );
-
- end Semaphore_Release;
-
- --
- -- Message Queue Manager
- --
-
- procedure Message_Queue_Create (
- Name : in RTEMS.Name;
- Count : in RTEMS.Unsigned32;
- Max_Message_Size : in RTEMS.Unsigned32;
- Attribute_Set : in RTEMS.Attribute;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- -- XXX broken
- function Message_Queue_Create_Base (
- Name : RTEMS.Name;
- Count : RTEMS.Unsigned32;
- Max_Message_Size : RTEMS.Unsigned32;
- Attribute_Set : RTEMS.Attribute;
- ID : access RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C,
- Message_Queue_Create_Base, "rtems_message_queue_create");
- ID_Base : aliased RTEMS.ID := ID;
- begin
-
- Result := Message_Queue_Create_Base (
- Name,
- Count,
- Max_Message_Size,
- Attribute_Set,
- ID_Base'Unchecked_Access
- );
-
- ID := ID_Base;
-
- end Message_Queue_Create;
-
- procedure Message_Queue_Ident (
- Name : in RTEMS.Name;
- Node : in RTEMS.Unsigned32;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Message_Queue_Ident_Base (
- Name : RTEMS.Name;
- Node : RTEMS.Unsigned32;
- ID : access RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Message_Queue_Ident_Base, "rtems_message_queue_ident");
- ID_Base : aliased RTEMS.ID := ID;
- begin
-
- Result := Message_Queue_Ident_Base (
- Name,
- Node,
- ID_Base'Unchecked_Access
- );
-
- ID := ID_Base;
-
- end Message_Queue_Ident;
-
- procedure Message_Queue_Delete (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Message_Queue_Delete_Base (
- ID : RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Message_Queue_Delete_Base,
- "rtems_message_queue_delete");
- begin
-
- Result := Message_Queue_Delete_Base ( ID );
-
- end Message_Queue_Delete;
-
- procedure Message_Queue_Send (
- ID : in RTEMS.ID;
- Buffer : in RTEMS.Address;
- Size : in RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
- ) is
- function Message_Queue_Send_Base (
- ID : RTEMS.ID;
- Buffer : RTEMS.Address;
- Size : RTEMS.Unsigned32
- ) return RTEMS.Status_Codes;
- pragma Import (C, Message_Queue_Send_Base, "rtems_message_queue_send");
- begin
-
- Result := Message_Queue_Send_Base ( ID, Buffer, Size );
-
- end Message_Queue_Send;
-
- procedure Message_Queue_Urgent (
- ID : in RTEMS.ID;
- Buffer : in RTEMS.Address;
- Size : in RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
- ) is
- function Message_Queue_Urgent_Base (
- ID : RTEMS.ID;
- Buffer : RTEMS.Address;
- Size : RTEMS.Unsigned32
- ) return RTEMS.Status_Codes;
- pragma Import (C, Message_Queue_Urgent_Base,
- "rtems_message_queue_urgent");
- begin
-
- Result := Message_Queue_Urgent_Base ( ID, Buffer, Size );
-
- end Message_Queue_Urgent;
-
- procedure Message_Queue_Broadcast (
- ID : in RTEMS.ID;
- Buffer : in RTEMS.Address;
- Size : in RTEMS.Unsigned32;
- Count : out RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
- ) is
- function Message_Queue_Broadcast_Base (
- ID : RTEMS.ID;
- Buffer : RTEMS.Address;
- Size : RTEMS.Unsigned32;
- Count : access RTEMS.Unsigned32
- ) return RTEMS.Status_Codes;
- pragma Import (C, Message_Queue_Broadcast_Base,
- "rtems_message_queue_broadcast");
- Count_Base : aliased RTEMS.Unsigned32 := Count;
- begin
-
- Result := Message_Queue_Broadcast_Base (
- ID,
- Buffer,
- Size,
- Count_Base'Unchecked_Access
- );
-
- Count := Count_Base;
-
- end Message_Queue_Broadcast;
-
- procedure Message_Queue_Receive (
- ID : in RTEMS.ID;
- Buffer : in RTEMS.Address;
- Option_Set : in RTEMS.Option;
- Timeout : in RTEMS.Interval;
- Size : out RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
- ) is
- function Message_Queue_Receive_Base (
- ID : RTEMS.ID;
- Buffer : RTEMS.Address;
- Size : access RTEMS.Unsigned32;
- Option_Set : RTEMS.Option;
- Timeout : RTEMS.Interval
- ) return RTEMS.Status_Codes;
- pragma Import (C, Message_Queue_Receive_Base,
- "rtems_message_queue_receive");
- Size_Base : aliased RTEMS.Unsigned32;
- begin
-
- Result := Message_Queue_Receive_Base (
- ID,
- Buffer,
- Size_Base'Unchecked_Access,
- Option_Set,
- Timeout
- );
-
- Size := Size_Base;
-
- end Message_Queue_Receive;
-
- procedure Message_Queue_Flush (
- ID : in RTEMS.ID;
- Count : out RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
- ) is
- function Message_Queue_Flush_Base (
- ID : RTEMS.ID;
- Count : access RTEMS.Unsigned32
- ) return RTEMS.Status_Codes;
- pragma Import (C, Message_Queue_Flush_Base, "rtems_message_queue_flush");
- COUNT_Base : aliased RTEMS.Unsigned32 := Count;
- begin
-
- Result := Message_Queue_Flush_Base (
- ID,
- COUNT_Base'Unchecked_Access
- );
-
- Count := COUNT_Base;
-
- end Message_Queue_Flush;
-
-
- --
- -- Event Manager
- --
-
- procedure Event_Send (
- ID : in RTEMS.ID;
- Event_In : in RTEMS.Event_Set;
- Result : out RTEMS.Status_Codes
- ) is
- function Event_Send_Base (
- ID : RTEMS.ID;
- Event_In : RTEMS.Event_Set
- ) return RTEMS.Status_Codes;
- pragma Import (C, Event_Send_Base, "rtems_event_send");
- begin
-
- Result := Event_Send_Base (
- ID,
- Event_In
- );
-
- end Event_Send;
-
- procedure Event_Receive (
- Event_In : in RTEMS.Event_Set;
- Option_Set : in RTEMS.Option;
- Ticks : in RTEMS.Interval;
- Event_Out : out RTEMS.Event_Set;
- Result : out RTEMS.Status_Codes
- ) is
- function Event_Receive_Base (
- Event_In : RTEMS.Event_Set;
- Option_Set : RTEMS.Option;
- Ticks : RTEMS.Interval;
- Event_Out : access RTEMS.Event_Set
- ) return RTEMS.Status_Codes;
- pragma Import (C, Event_Receive_Base, "rtems_event_receive");
- Event_Out_Base : aliased RTEMS.Event_Set; -- := Event_Out;
- begin
-
- Result := Event_Receive_Base (
- Event_In,
- Option_Set,
- Ticks,
- Event_Out_Base'Access
- );
-
- Event_Out := Event_Out_Base;
-
- end Event_Receive;
-
- --
- -- Signal Manager
- --
-
- procedure Signal_Catch (
- ASR_Handler : in RTEMS.ASR_Handler;
- Mode_Set : in RTEMS.Mode;
- Result : out RTEMS.Status_Codes
- ) is
- function Signal_Catch_Base (
- ASR_Handler : RTEMS.ASR_Handler;
- Mode_Set : RTEMS.Mode
- ) return RTEMS.Status_Codes;
- pragma Import (C, Signal_Catch_Base, "rtems_signal_catch");
- begin
-
- Result := Signal_Catch_Base ( ASR_Handler, Mode_Set );
-
- end Signal_Catch;
-
- procedure Signal_Send (
- ID : in RTEMS.ID;
- Signal_Set : in RTEMS.Signal_Set;
- Result : out RTEMS.Status_Codes
- ) is
- function Signal_Send_Base (
- ID : RTEMS.ID;
- Signal_Set : RTEMS.Signal_Set
- ) return RTEMS.Status_Codes;
- pragma Import (C, Signal_Send_Base, "rtems_signal_send");
- begin
-
- Result := Signal_Send_Base ( ID, Signal_Set );
-
- end Signal_Send;
-
-
- --
- -- Partition Manager
- --
-
- procedure Partition_Create (
- Name : in RTEMS.Name;
- Starting_Address : in RTEMS.Address;
- Length : in RTEMS.Unsigned32;
- Buffer_Size : in RTEMS.Unsigned32;
- Attribute_Set : in RTEMS.Attribute;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Partition_Create_Base (
- Name : RTEMS.Name;
- Starting_Address : RTEMS.Address;
- Length : RTEMS.Unsigned32;
- Buffer_Size : RTEMS.Unsigned32;
- Attribute_Set : RTEMS.Attribute;
- ID : access RTEMS.Event_Set
- ) return RTEMS.Status_Codes;
- pragma Import (C, Partition_Create_Base, "rtems_partition_create");
- ID_Base : aliased RTEMS.ID := ID;
- begin
-
- Result := Partition_Create_Base (
- Name,
- Starting_Address,
- Length,
- Buffer_Size,
- Attribute_Set,
- ID_Base'Unchecked_Access
- );
-
- ID := ID_Base;
-
- end Partition_Create;
-
- procedure Partition_Ident (
- Name : in RTEMS.Name;
- Node : in RTEMS.Unsigned32;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Partition_Ident_Base (
- Name : RTEMS.Name;
- Node : RTEMS.Unsigned32;
- ID : access RTEMS.Event_Set
- ) return RTEMS.Status_Codes;
- pragma Import (C, Partition_Ident_Base, "rtems_partition_ident");
- ID_Base : aliased RTEMS.ID := ID;
- begin
-
- Result := Partition_Ident_Base (
- Name,
- Node,
- ID_Base'Unchecked_Access
- );
-
- ID := ID_Base;
-
- end Partition_Ident;
-
- procedure Partition_Delete (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Partition_Delete_Base (
- ID : RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Partition_Delete_Base, "rtems_partition_delete");
- begin
-
- Result := Partition_Delete_Base ( ID );
-
- end Partition_Delete;
-
- procedure Partition_Get_Buffer (
- ID : in RTEMS.ID;
- Buffer : out RTEMS.Address;
- Result : out RTEMS.Status_Codes
- ) is
- function Partition_Get_Buffer_Base (
- ID : RTEMS.ID;
- Buffer : access RTEMS.Address
- ) return RTEMS.Status_Codes;
- pragma Import (C, Partition_Get_Buffer_Base,
- "rtems_partition_get_buffer");
- Buffer_Base : aliased RTEMS.Address := Buffer;
- begin
-
- Result := Partition_Get_Buffer_Base (
- ID,
- Buffer_Base'Unchecked_Access
- );
-
- Buffer := Buffer_Base;
-
- end Partition_Get_Buffer;
-
- procedure Partition_Return_Buffer (
- ID : in RTEMS.ID;
- Buffer : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
- ) is
- function Partition_Return_Buffer_Base (
- ID : RTEMS.Name;
- Buffer : RTEMS.Address
- ) return RTEMS.Status_Codes;
- pragma Import (C, Partition_Return_Buffer_Base,
- "rtems_partition_return_buffer");
- begin
-
- Result := Partition_Return_Buffer_Base ( ID, Buffer );
-
- end Partition_Return_Buffer;
-
- --
- -- Region Manager
- --
-
- procedure Region_Create (
- Name : in RTEMS.Name;
- Starting_Address : in RTEMS.Address;
- Length : in RTEMS.Unsigned32;
- Page_Size : in RTEMS.Unsigned32;
- Attribute_Set : in RTEMS.Attribute;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Region_Create_Base (
- Name : RTEMS.Name;
- Starting_Address : RTEMS.Address;
- Length : RTEMS.Unsigned32;
- Page_Size : RTEMS.Unsigned32;
- Attribute_Set : RTEMS.Attribute;
- ID : access RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Region_Create_Base, "rtems_region_create");
- ID_Base : aliased RTEMS.ID := ID;
-
- begin
-
- Result := Region_Create_Base (
- Name,
- Starting_Address,
- Length,
- Page_Size,
- Attribute_Set,
- ID_Base'Unchecked_Access
- );
-
- ID := ID_Base;
-
- end Region_Create;
-
- procedure Region_Ident (
- Name : in RTEMS.Name;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Region_Ident_Base (
- Name : RTEMS.Name;
- ID : access RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Region_Ident_Base, "rtems_region_ident");
- ID_Base : aliased RTEMS.ID := ID;
- begin
-
- Result := Region_Ident_Base (
- Name,
- ID_Base'Unchecked_Access
- );
-
- ID := ID_Base;
-
- end Region_Ident;
-
- procedure Region_Delete (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Region_Delete_Base (
- ID : RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Region_Delete_Base, "rtems_region_delete");
- begin
-
- Result := Region_Delete_Base ( ID );
-
- end Region_Delete;
-
- procedure Region_Extend (
- ID : in RTEMS.ID;
- Starting_Address : in RTEMS.Address;
- Length : in RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
- ) is
- function Region_Extend_Base (
- ID : RTEMS.ID;
- Starting_Address : RTEMS.Address;
- Length : RTEMS.Unsigned32
- ) return RTEMS.Status_Codes;
- pragma Import (C, Region_Extend_Base, "rtems_region_extend");
- begin
-
- Result := Region_Extend_Base ( ID, Starting_Address, Length );
-
- end Region_Extend;
-
- procedure Region_Get_Segment (
- ID : in RTEMS.ID;
- Size : in RTEMS.Unsigned32;
- Option_Set : in RTEMS.Option;
- Timeout : in RTEMS.Interval;
- Segment : out RTEMS.Address;
- Result : out RTEMS.Status_Codes
- ) is
- function Region_Get_Segment_Base (
- ID : RTEMS.ID;
- Size : RTEMS.Unsigned32;
- Option_Set : RTEMS.Option;
- Timeout : RTEMS.Interval;
- Segment : access RTEMS.Address
- ) return RTEMS.Status_Codes;
- pragma Import (C, Region_Get_Segment_Base, "rtems_region_get_segment");
- Segment_Base : aliased RTEMS.Address := Segment;
- begin
-
- Result := Region_Get_Segment_Base (
- ID,
- Size,
- Option_Set,
- Timeout,
- Segment_Base'Unchecked_Access
- );
-
- Segment := SEGMENT_Base;
-
- end Region_Get_Segment;
-
- procedure Region_Get_Segment_Size (
- ID : in RTEMS.ID;
- Segment : in RTEMS.Address;
- Size : out RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
- ) is
- function Region_Get_Segment_Size_Base (
- ID : RTEMS.ID;
- Segment : RTEMS.Address;
- Size : access RTEMS.Unsigned32
- ) return RTEMS.Status_Codes;
- pragma Import (C, Region_Get_Segment_Size_Base,
- "rtems_region_get_segment_size");
- Size_Base : aliased RTEMS.Unsigned32 := Size;
- begin
-
- Result := Region_Get_Segment_Size_Base (
- ID,
- Segment,
- Size_Base'Unchecked_Access
- );
-
- Size := SIZE_Base;
-
- end Region_Get_Segment_Size;
-
- procedure Region_Return_Segment (
- ID : in RTEMS.ID;
- Segment : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
- ) is
- function Region_Return_Segment_Base (
- ID : RTEMS.ID;
- Segment : RTEMS.Address
- ) return RTEMS.Status_Codes;
- pragma Import (C, Region_Return_Segment_Base,
- "rtems_region_return_segment");
- begin
-
- Result := Region_Return_Segment_Base ( ID, Segment );
-
- end Region_Return_Segment;
-
-
- --
- -- Dual Ported Memory Manager
- --
-
- procedure Port_Create (
- Name : in RTEMS.Name;
- Internal_Start : in RTEMS.Address;
- External_Start : in RTEMS.Address;
- Length : in RTEMS.Unsigned32;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Port_Create_Base (
- Name : RTEMS.Name;
- Internal_Start : RTEMS.Address;
- External_Start : RTEMS.Address;
- Length : RTEMS.Unsigned32;
- ID : access RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Port_Create_Base, "rtems_port_create");
- ID_Base : aliased RTEMS.ID := ID;
-
- begin
-
- Result := Port_Create_Base (
- Name,
- Internal_Start,
- External_Start,
- Length,
- ID_Base'Unchecked_Access
- );
-
- ID := ID_Base;
-
- end Port_Create;
-
- procedure Port_Ident (
- Name : in RTEMS.Name;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Port_Ident_Base (
- Name : RTEMS.Name;
- ID : access RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Port_Ident_Base, "rtems_port_ident");
- ID_Base : aliased RTEMS.ID := ID;
- begin
-
- Result := Port_Ident_Base (
- Name,
- ID_Base'Unchecked_Access
- );
-
- ID := ID_Base;
-
- end Port_Ident;
-
- procedure Port_Delete (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Port_Delete_Base (
- ID : RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Port_Delete_Base, "rtems_port_delete");
- begin
-
- Result := Port_Delete_Base ( ID );
-
- end Port_Delete;
-
- procedure Port_External_To_Internal (
- ID : in RTEMS.ID;
- External : in RTEMS.Address;
- Internal : out RTEMS.Address;
- Result : out RTEMS.Status_Codes
- ) is
- function Port_External_To_Internal_Base (
- ID : RTEMS.ID;
- External : RTEMS.Address;
- Internal : access RTEMS.Address
- ) return RTEMS.Status_Codes;
- pragma Import (C, Port_External_To_Internal_Base,
- "rtems_port_external_to_internal");
- Internal_Base : aliased RTEMS.Address := Internal;
- begin
-
- Result := Port_External_To_Internal_Base (
- ID,
- External,
- Internal_Base'Unchecked_Access
- );
-
- Internal := INTERNAL_Base;
-
- end Port_External_To_Internal;
-
- procedure Port_Internal_To_External (
- ID : in RTEMS.ID;
- Internal : in RTEMS.Address;
- External : out RTEMS.Address;
- Result : out RTEMS.Status_Codes
- ) is
- function Port_Internal_To_External_Base (
- ID : RTEMS.ID;
- Internal : RTEMS.Address;
- External : access RTEMS.Address
- ) return RTEMS.Status_Codes;
- pragma Import (C, Port_Internal_To_External_Base,
- "rtems_port_internal_to_external");
- External_Base : aliased RTEMS.Address := External;
- begin
-
- Result := Port_Internal_To_External_Base (
- ID,
- Internal,
- External_Base'Unchecked_Access
- );
-
- External := EXTERNAL_Base;
-
- end Port_Internal_To_External;
-
- --
- -- Input/Output Manager
- --
-
- procedure IO_Initialize (
- Major : in RTEMS.Device_Major_Number;
- Minor : in RTEMS.Device_Minor_Number;
- Argument : in RTEMS.Address;
- Return_Value : out RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
- ) is
- function IO_Initialize_Base (
- Major : RTEMS.Device_Major_Number;
- Minor : RTEMS.Device_Minor_Number;
- Argument : RTEMS.Address;
- Return_Value : access RTEMS.Unsigned32
- ) return RTEMS.Status_Codes;
- pragma Import (C, IO_Initialize_Base, "rtems_io_initialize");
- Return_Value_Base : aliased RTEMS.Unsigned32 := Return_Value;
- begin
-
- Result := IO_Initialize_Base (
- Major,
- Minor,
- Argument,
- Return_Value_Base'Unchecked_Access
- );
-
- Return_Value := Return_Value_Base;
-
- end IO_Initialize;
-
- procedure IO_Register_Name (
- Name : in String;
- Major : in RTEMS.Device_Major_Number;
- Minor : in RTEMS.Device_Minor_Number;
- Result : out RTEMS.Status_Codes
- ) is
- function IO_Register_Name_Base (
- Name : Interfaces.C.Char_Array;
- Major : RTEMS.Device_Major_Number;
- Minor : RTEMS.Device_Minor_Number
- ) return RTEMS.Status_Codes;
- pragma Import (C, IO_Register_Name_Base, "rtems_io_register_name");
- begin
-
- Result := IO_Register_Name_Base (
- Interfaces.C.To_C (Name),
- Major,
- Minor
- );
-
- end IO_Register_Name;
-
- procedure IO_Lookup_Name (
- Name : in String;
- Device_Info : out RTEMS.Driver_Name_t;
- Result : out RTEMS.Status_Codes
- ) is
- function IO_Lookup_Name_Base (
- Name : Interfaces.C.Char_Array;
- Device_Info : access RTEMS.Driver_Name_t
- ) return RTEMS.Status_Codes;
- pragma Import (C, IO_Lookup_Name_Base, "rtems_io_lookup_name");
-
- Device_Info_Base : aliased RTEMS.Driver_Name_t;
- begin
-
- Result := IO_Lookup_Name_Base (
- Interfaces.C.To_C (Name),
- Device_Info_Base'Unchecked_Access
- );
-
- Device_Info := Device_Info_Base;
-
- end IO_Lookup_Name;
-
- procedure IO_Open (
- Major : in RTEMS.Device_Major_Number;
- Minor : in RTEMS.Device_Minor_Number;
- Argument : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
- ) is
- function IO_Open_Base (
- Major : RTEMS.Device_Major_Number;
- Minor : RTEMS.Device_Minor_Number;
- Argument : RTEMS.Address
- ) return RTEMS.Status_Codes;
- pragma Import (C, IO_Open_Base, "rtems_io_open");
- begin
-
- Result := IO_Open_Base (Major, Minor, Argument);
-
- end IO_Open;
-
- procedure IO_Close (
- Major : in RTEMS.Device_Major_Number;
- Minor : in RTEMS.Device_Minor_Number;
- Argument : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
- ) is
- function IO_Close_Base (
- Major : RTEMS.Device_Major_Number;
- Minor : RTEMS.Device_Minor_Number;
- Argument : RTEMS.Address
- ) return RTEMS.Status_Codes;
- pragma Import (C, IO_Close_Base, "rtems_io_close");
- begin
-
- Result := IO_Close_Base (Major, Minor, Argument);
-
- end IO_Close;
-
- procedure IO_Read (
- Major : in RTEMS.Device_Major_Number;
- Minor : in RTEMS.Device_Minor_Number;
- Argument : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
- ) is
- function IO_Read_Base (
- Major : RTEMS.Device_Major_Number;
- Minor : RTEMS.Device_Minor_Number;
- Argument : RTEMS.Address
- ) return RTEMS.Status_Codes;
- pragma Import (C, IO_Read_Base, "rtems_io_read");
- begin
-
- Result := IO_Read_Base (Major, Minor, Argument);
-
- end IO_Read;
-
- procedure IO_Write (
- Major : in RTEMS.Device_Major_Number;
- Minor : in RTEMS.Device_Minor_Number;
- Argument : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
- ) is
- function IO_Write_Base (
- Major : RTEMS.Device_Major_Number;
- Minor : RTEMS.Device_Minor_Number;
- Argument : RTEMS.Address
- ) return RTEMS.Status_Codes;
- pragma Import (C, IO_Write_Base, "rtems_io_write");
- begin
-
- Result := IO_Write_Base (Major, Minor, Argument);
-
- end IO_Write;
-
- procedure IO_Control (
- Major : in RTEMS.Device_Major_Number;
- Minor : in RTEMS.Device_Minor_Number;
- Argument : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
- ) is
- function IO_Control_Base (
- Major : RTEMS.Device_Major_Number;
- Minor : RTEMS.Device_Minor_Number;
- Argument : RTEMS.Address
- ) return RTEMS.Status_Codes;
- pragma Import (C, IO_Control_Base, "rtems_io_control");
- begin
-
- Result := IO_Control_Base (Major, Minor, Argument);
-
- end IO_Control;
-
-
- --
- -- Fatal Error Manager
- --
-
- procedure Fatal_Error_Occurred (
- The_Error : in RTEMS.Unsigned32
- ) is
- procedure Fatal_Error_Occurred_base (
- The_Error : RTEMS.Unsigned32
- );
- pragma Import (C, Fatal_Error_Occurred_Base, "rtems_fatal_error_occurred");
- begin
-
- Fatal_Error_Occurred_Base ( The_Error );
-
- end Fatal_Error_Occurred;
- --
- -- Rate Monotonic Manager
- --
-
- procedure Rate_Monotonic_Create (
- Name : in RTEMS.Name;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Rate_Monotonic_Create_base (
- Name : RTEMS.Name;
- ID : access RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Rate_Monotonic_Create_base, "rtems_rate_monotonic_create");
- ID_Base : aliased RTEMS.ID := ID;
- begin
-
- Result := Rate_Monotonic_Create_base (
- Name,
- ID_Base'Unchecked_Access
- );
-
- ID := ID_Base;
-
- end Rate_Monotonic_Create;
-
- procedure Rate_Monotonic_Ident (
- Name : in RTEMS.Name;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Rate_Monotonic_Ident_Base (
- Name : RTEMS.Name;
- ID : access RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Rate_Monotonic_Ident_Base, "rtems_rate_monotonic_ident");
- ID_Base : aliased RTEMS.ID := ID;
- begin
-
- Result := Rate_Monotonic_Ident_Base (
- Name,
- ID_Base'Unchecked_Access
- );
-
- ID := ID_Base;
-
- end Rate_Monotonic_Ident;
-
- procedure Rate_Monotonic_Delete (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Rate_Monotonic_Delete_Base (
- ID : RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Rate_Monotonic_Delete_Base,
- "rtems_rate_monotonic_delete");
- begin
-
- Result := Rate_Monotonic_Delete_base ( ID );
-
- end Rate_Monotonic_Delete;
-
- procedure Rate_Monotonic_Cancel (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- ) is
- function Rate_Monotonic_Cancel_Base (
- ID : RTEMS.ID
- ) return RTEMS.Status_Codes;
- pragma Import (C, Rate_Monotonic_Cancel_Base,
- "rtems_rate_monotonic_cancel");
- begin
-
- Result := Rate_Monotonic_Cancel_Base ( ID );
-
- end Rate_Monotonic_Cancel;
-
- procedure Rate_Monotonic_Period (
- ID : in RTEMS.ID;
- Length : in RTEMS.Interval;
- Result : out RTEMS.Status_Codes
- ) is
- function Rate_Monotonic_Period_Base (
- ID : RTEMS.ID;
- Length : RTEMS.Interval
- ) return RTEMS.Status_Codes;
- pragma Import (C, Rate_Monotonic_Period_Base,
- "rtems_rate_monotonic_period");
- begin
-
- Result := Rate_Monotonic_Period_base ( ID, Length );
-
- end Rate_Monotonic_Period;
-
-
- procedure Rate_Monotonic_Get_Status (
- ID : in RTEMS.ID;
- Status : out RTEMS.Rate_Monotonic_Period_Status;
- Result : out RTEMS.Status_Codes
- ) is
- function Rate_Monotonic_Get_Status_Base (
- ID : RTEMS.ID;
- Status : access RTEMS.Rate_Monotonic_Period_Status
- ) return RTEMS.Status_Codes;
- pragma Import (C, Rate_Monotonic_Get_Status_Base,
- "rtems_rate_monotonic_get_status");
-
- Status_Base : aliased RTEMS.Rate_Monotonic_Period_Status;
- begin
-
- Result := Rate_Monotonic_Get_Status_Base (
- ID,
- Status_Base'Unchecked_Access
- );
-
- Status := Status_Base;
-
-
- end Rate_Monotonic_Get_Status;
-
- --
- -- Multiprocessing Manager
- --
-
- procedure Multiprocessing_Announce is
- procedure Multiprocessing_Announce_Base;
- pragma Import (C, Multiprocessing_Announce_Base,
- "rtems_multiprocessing_announce");
- begin
-
- Multiprocessing_Announce_Base;
-
- end Multiprocessing_Announce;
-
-
- --
- -- Debug Manager
- --
-
- procedure Debug_Enable (
- To_Be_Enabled : in RTEMS.Debug_Set
- ) is
- procedure Debug_Enable_Base (
- To_Be_Enabled : RTEMS.Debug_Set
- );
- pragma Import (C, Debug_Enable_Base, "rtems_debug_enable");
- begin
-
- Debug_Enable_Base ( To_Be_Enabled );
-
- end Debug_Enable;
-
- procedure Debug_Disable (
- To_Be_Disabled : in RTEMS.Debug_Set
- ) is
- procedure Debug_Disable_Base (
- To_Be_Disabled : RTEMS.Debug_Set
- );
- pragma Import (C, Debug_Disable_Base, "rtems_debug_disable");
- begin
-
- Debug_Disable_Base ( To_Be_Disabled );
-
- end Debug_Disable;
-
- function Debug_Is_Enabled (
- Level : in RTEMS.Debug_Set
- ) return RTEMS.Boolean is
- function Debug_Is_Enabled_Base (
- Level : RTEMS.Debug_Set
- ) return RTEMS.Boolean;
- pragma Import (C, Debug_Is_Enabled_Base, "_Debug_Is_enabled");
- begin
-
- return Debug_Is_Enabled_Base ( Level );
-
- end Debug_Is_Enabled;
-
- -- HACK
- -- function Configuration
- -- return RTEMS.Configuration_Table_Pointer is
- -- Configuration_base : RTEMS.Configuration_Table_Pointer;
- -- pragma Import (C, Configuration_base, "_Configuration_Table");
- -- begin
- -- return Configuration_Base;
- -- end Configuration;
-
-end RTEMS;
-
diff --git a/cpukit/ada/rtems.ads b/cpukit/ada/rtems.ads
deleted file mode 100644
index 08d8f2a894..0000000000
--- a/cpukit/ada/rtems.ads
+++ /dev/null
@@ -1,1439 +0,0 @@
---
--- RTEMS / Specification
---
--- DESCRIPTION:
---
--- This package provides the interface to the RTEMS API.
---
--- DEPENDENCIES:
---
---
---
--- COPYRIGHT (c) 1997.
--- On-Line Applications Research Corporation (OAR).
---
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.OARcorp.com/rtems/license.html.
---
--- $Id$
---
-
-with System;
-with System.Storage_Elements; use System.Storage_Elements;
-with Interfaces;
-with Interfaces.C;
-
-package RTEMS is
-
- Structure_Alignment : constant := 8;
-
- --
- -- RTEMS Base Types
- --
-
- subtype Unsigned8 is Interfaces.Unsigned_8;
- subtype Unsigned16 is Interfaces.Unsigned_16;
- subtype Unsigned32 is Interfaces.Unsigned_32;
-
- type Unsigned32_Pointer is access all RTEMS.Unsigned32;
- type Unsigned16_Pointer is access all RTEMS.Unsigned16;
- type Unsigned8_Pointer is access all RTEMS.Unsigned8;
-
- subtype Boolean is RTEMS.Unsigned32;
- subtype Address is System.Address;
- subtype Single is Interfaces.C.C_float;
- subtype Double is Interfaces.C.Double;
-
- --
- -- The following define the size of each of the base types in
- -- both bits and system units.
- --
-
- Unsigned8_Bits : constant := 7;
- Unsigned16_Bits : constant := 15;
- Unsigned32_Bits : constant := 31;
- Boolean_Bits : constant := 31;
- Address_Bits : constant := 31;
- Single_Bits : constant := 31;
- Double_Bits : constant := 63;
-
- Unsigned8_Units : constant := 1;
- Unsigned16_Units : constant := 2;
- Unsigned32_Units : constant := 4;
- Boolean_Units : constant := 4;
- Address_Units : constant := 4;
- Single_Units : constant := 4;
- Double_Units : constant := 8;
-
- Null_Address : constant RTEMS.Address :=
- System.Storage_Elements.To_Address(0);
-
- True : constant RTEMS.Boolean := 1;
- False : constant RTEMS.Boolean := 0;
-
- -- More Types
- --
-
- subtype Name is RTEMS.Unsigned32;
- subtype ID is RTEMS.Unsigned32;
- subtype Interval is RTEMS.Unsigned32;
- subtype Attribute is RTEMS.Unsigned32;
- subtype Mode is RTEMS.Unsigned32;
- subtype Option is RTEMS.Unsigned32;
- subtype Task_Priority is RTEMS.Unsigned32;
- subtype Notepad_Index is RTEMS.Unsigned32 range 0 .. 15;
-
- subtype Event_Set is RTEMS.Unsigned32;
- subtype Signal_Set is RTEMS.Unsigned32;
- subtype Debug_Set is RTEMS.Unsigned32;
- subtype Device_Major_Number is RTEMS.Unsigned32;
- subtype Device_Minor_Number is RTEMS.Unsigned32;
- subtype Vector_Number is RTEMS.Unsigned32;
- subtype ISR_Level is RTEMS.Unsigned32;
-
- subtype Node is RTEMS.Unsigned32;
-
- --
- -- Task Related Types
- -- XXXX fix this
- subtype Task_Argument is RTEMS.Unsigned32;
- type Task_Argument_PTR is access all Task_Argument;
-
- -- XXXX fix this
- subtype TCB is RTEMS.Unsigned32;
- type TCB_Pointer is access all RTEMS.TCB;
-
- subtype Task_States is RTEMS.Unsigned32;
-
- type Task_Entry is access procedure (
- Argument : RTEMS.Unsigned32
- );
-
- --
- -- Clock and Time of Day Types
- --
-
- type Time_Of_Day is
- record
- Year : RTEMS.Unsigned32; -- year, A.D.
- Month : RTEMS.Unsigned32; -- month, 1 .. 12
- Day : RTEMS.Unsigned32; -- day, 1 .. 31
- Hour : RTEMS.Unsigned32; -- hour, 0 .. 23
- Minute : RTEMS.Unsigned32; -- minute, 0 .. 59
- Second : RTEMS.Unsigned32; -- second, 0 .. 59
- Ticks : RTEMS.Unsigned32; -- elapsed ticks between seconds
- end record;
-
- type Clock_Time_Value is
- record
- Seconds : RTEMS.Unsigned32;
- Microseconds : RTEMS.Unsigned32;
- end record;
-
- type Clock_Get_Options is (
- Clock_Get_TOD,
- Clock_Get_Seconds_Since_Epoch,
- Clock_Get_Ticks_Since_Boot,
- Clock_Get_Ticks_Per_Seconds,
- Clock_Get_Time_Value
- );
-
- --
- -- Device Driver Entry Prototype
- --
-
- type Device_Driver_Entry is access function (
- Major : in RTEMS.Device_Major_Number;
- Minor : in RTEMS.Device_Major_Number;
- Argument : in RTEMS.Unsigned32;
- ID : in RTEMS.Unsigned32
- ) return RTEMS.Unsigned32;
-
- type Driver_Address_Table_Entry is
- record
- Initialization : RTEMS.Device_Driver_Entry;
- Open : RTEMS.Device_Driver_Entry;
- Close : RTEMS.Device_Driver_Entry;
- Read : RTEMS.Device_Driver_Entry;
- Write : RTEMS.Device_Driver_Entry;
- Control : RTEMS.Device_Driver_Entry;
- end record;
-
- type Driver_Address_Table is array ( RTEMS.Unsigned32
- range 1 .. RTEMS.Unsigned32'Last ) of RTEMS.Driver_Address_Table_Entry;
-
- type Driver_Address_Table_Pointer is access all Driver_Address_Table;
-
- type Driver_Name_t is
- record
- Device_Name : RTEMS.Address;
- Device_Name_Length : RTEMS.Unsigned32;
- Major : RTEMS.Device_Major_Number;
- Minor : RTEMS.Device_Minor_Number;
-
- end record;
-
- --
- -- Ident Options
- --
-
- Search_All_Nodes : constant RTEMS.Node := 0;
-
- --
- -- Options
- --
-
- Default_Options : constant RTEMS.Option := 16#0000#;
-
- Wait : constant RTEMS.Option := 16#0000#;
- No_Wait : constant RTEMS.Option := 16#0001#;
-
- Event_All : constant RTEMS.Option := 16#0000#;
- Event_Any : constant RTEMS.Option := 16#0002#;
-
- --
- -- Mode constants
- --
-
- Default_Modes : constant RTEMS.Mode := 16#0000#;
-
- All_Mode_Masks : constant RTEMS.Mode := 16#0000_ffff#;
- Current_Mode : constant RTEMS.Mode := 16#0000_0000#;
- Preempt_Mask : constant RTEMS.Mode := 16#0000_0100#;
- Timeslice_Mask : constant RTEMS.Mode := 16#0000_0200#;
- ASR_Mask : constant RTEMS.Mode := 16#0000_0400#;
- Interrupt_Mask : RTEMS.Mode;
- Preempt : constant RTEMS.Mode := 16#0000_0000#;
- No_Preempt : constant RTEMS.Mode := 16#0000_0100#;
- No_Timeslice : constant RTEMS.Mode := 16#0000_0000#;
- Timeslice : constant RTEMS.Mode := 16#0000_0200#;
- ASR : constant RTEMS.Mode := 16#0000_0000#;
- No_ASR : constant RTEMS.Mode := 16#0000_0400#;
-
- pragma Import (C, Interrupt_Mask, "rtems_interrupt_mask");
-
- --
- -- Attribute constants
- --
-
- Default_Attributes : constant RTEMS.Attribute := 16#00000000#;
- No_Floating_Point : constant RTEMS.Attribute := 16#00000000#;
- Floating_Point : constant RTEMS.Attribute := 16#00000001#;
- Local : constant RTEMS.Attribute := 16#00000000#;
- Global : constant RTEMS.Attribute := 16#00000002#;
- FIFO : constant RTEMS.Attribute := 16#00000000#;
- Priority : constant RTEMS.Attribute := 16#00000004#;
- Counting_Semaphore : constant RTEMS.Attribute := 16#00000000#;
- Binary_Semaphore : constant RTEMS.Attribute := 16#00000010#;
- No_Inherit_Priority : constant RTEMS.Attribute := 16#00000000#;
- Inherit_Priority : constant RTEMS.Attribute := 16#00000020#;
- No_Priority_Ceiling : constant RTEMS.Attribute := 16#00000000#;
- Priority_Ceiling : constant RTEMS.Attribute := 16#00000040#;
-
- function Interrupt_Level (
- Level : in RTEMS.Unsigned32
- ) return RTEMS.Attribute;
- pragma Import (C, Interrupt_Level, "rtems_interrupt_level_attribute");
-
-
- Minimum_Stack_Size : RTEMS.Unsigned32;
- pragma Import (C, Minimum_Stack_Size, "rtems_minimum_stack_size");
-
-
- --
- -- Notepad index constants
- --
-
- Notepad_0 : constant RTEMS.Unsigned32 := 0;
- Notepad_1 : constant RTEMS.Unsigned32 := 1;
- Notepad_2 : constant RTEMS.Unsigned32 := 2;
- Notepad_3 : constant RTEMS.Unsigned32 := 3;
- Notepad_4 : constant RTEMS.Unsigned32 := 4;
- Notepad_5 : constant RTEMS.Unsigned32 := 5;
- Notepad_6 : constant RTEMS.Unsigned32 := 6;
- Notepad_7 : constant RTEMS.Unsigned32 := 7;
- Notepad_8 : constant RTEMS.Unsigned32 := 8;
- Notepad_9 : constant RTEMS.Unsigned32 := 9;
- Notepad_10 : constant RTEMS.Unsigned32 := 10;
- Notepad_11 : constant RTEMS.Unsigned32 := 11;
- Notepad_12 : constant RTEMS.Unsigned32 := 12;
- Notepad_13 : constant RTEMS.Unsigned32 := 13;
- Notepad_14 : constant RTEMS.Unsigned32 := 14;
- Notepad_15 : constant RTEMS.Unsigned32 := 15;
-
- --
- -- Miscellaneous
- --
-
- No_Timeout : constant RTEMS.Interval := 0;
- Self : constant RTEMS.ID := 0;
- Period_Status : constant RTEMS.Interval := 0;
- Yield_Processor : constant RTEMS.Interval := 0;
- Current_Priority : constant RTEMS.Task_Priority := 0;
- No_Priority : constant RTEMS.Task_Priority := 0;
-
-
- --
- -- Extension Callouts and Table
- --
-
- type Thread_Create_Extension is access procedure (
- Current_Task : in RTEMS.TCB_Pointer;
- New_Task : in RTEMS.TCB_Pointer
- );
-
- type Thread_Start_Extension is access procedure (
- Current_Task : in RTEMS.TCB_Pointer;
- Started_Task : in RTEMS.TCB_Pointer
- );
-
- type Thread_Restart_Extension is access procedure (
- Current_Task : in RTEMS.TCB_Pointer;
- Restarted_Task : in RTEMS.TCB_Pointer
- );
-
- type Thread_Delete_Extension is access procedure (
- Current_Task : in RTEMS.TCB_Pointer;
- Deleted_Task : in RTEMS.TCB_Pointer
- );
-
- type Thread_Switch_Extension is access procedure (
- Current_Task : in RTEMS.TCB_Pointer;
- Heir_Task : in RTEMS.TCB_Pointer
- );
-
- type Thread_Post_Switch_Extension is access procedure (
- Current_Task : in RTEMS.TCB_Pointer
- );
-
- type Thread_Begin_Extension is access procedure (
- Current_Task : in RTEMS.TCB_Pointer
- );
-
- type Thread_Exitted_Extension is access procedure (
- Current_Task : in RTEMS.TCB_Pointer
- );
-
- type Fatal_Error_Extension is access procedure (
- Error : in RTEMS.Unsigned32
- );
-
- type Extensions_Table is
- record
- Thread_Create : RTEMS.Thread_Create_Extension;
- Thread_Start : RTEMS.Thread_Start_Extension;
- Thread_Restart : RTEMS.Thread_Restart_Extension;
- Thread_Delete : RTEMS.Thread_Delete_Extension;
- Thread_Switch : RTEMS.Thread_Switch_Extension;
- Thread_Post_Switch : RTEMS.Thread_Post_Switch_Extension;
- Thread_Begin : RTEMS.Thread_Begin_Extension;
- Thread_Exitted : RTEMS.Thread_Exitted_Extension;
- Fatal : RTEMS.Fatal_Error_Extension;
- end record;
-
- type Extensions_Table_Pointer is access all Extensions_Table;
-
- --
- -- The following type define a pointer to a watchdog/timer service routine.
- --
-
- type Timer_Service_Routine is access procedure (
- ID : in RTEMS.ID;
- User_Data : in RTEMS.Address
- );
-
- --
- -- The following type define a pointer to a signal service routine.
- --
-
- type ASR_Handler is access procedure (
- Signals : in RTEMS.Signal_Set
- );
-
- --
- -- The following type defines the status information returned
- -- about a period.
- --
-
- type Rate_Monotonic_Period_States is (
- Inactive, -- off chain, never initialized
- Owner_Is_Blocking, -- on chain, owner is blocking on it
- Active, -- on chain, running continuously
- Expired_While_Blocking, -- on chain, expired while owner was was blocking
- Expired -- off chain, will be reset by next
- -- rtems_rate_monotonic_period
- );
-
- for Rate_Monotonic_Period_States'Size use 32;
-
- for Rate_Monotonic_Period_States use (
- Inactive => 0,
- Owner_Is_Blocking => 1,
- Active => 2,
- Expired_While_Blocking => 3,
- Expired => 4
- );
-
- type Rate_Monotonic_Period_Status is
- record
- State : RTEMS.Rate_Monotonic_Period_States;
- Ticks_Since_Last_Period : RTEMS.Unsigned32;
- Ticks_Executed_Since_Last_Period : RTEMS.Unsigned32;
- end record;
-
- --
- -- Method Completions Status Codes
- --
-
- type Status_Codes is (
- Successful, -- successful completion
- Task_Exitted, -- returned from a task
- MP_Not_Configured, -- multiprocessing not configured
- Invalid_Name, -- invalid object name
- Invalid_ID, -- invalid object id
- Too_Many, -- too many
- Timeout, -- timed out waiting
- Object_Was_Deleted, -- object deleted while waiting
- Invalid_Size, -- specified size was invalid
- Invalid_Address, -- address specified is invalid
- Invalid_Number, -- number was invalid
- Not_Defined, -- item has not been initialized
- Resource_In_Use, -- resources still outstanding
- Unsatisfied, -- request not satisfied
- Incorrect_State, -- task is in wrong state
- Already_Suspended, -- task already in state
- Illegal_On_Self, -- illegal on calling task
- Illegal_On_Remote_Object, -- illegal for remote object
- Called_From_ISR, -- called from wrong environment
- Invalid_Priority, -- invalid task priority
- Invalid_Clock, -- invalid date/time
- Invalid_Node, -- invalid node id
- Not_Configured, -- directive not configured
- Not_Owner_Of_Resource, -- not owner of resource
- Not_Implemented, -- directive not implemented
- Internal_Error, -- RTEMS inconsistency detected
- No_Memory, -- no memory left in heap
- IO_Error, -- driver IO error
- Proxy_Blocking -- internal multiprocessing only
- );
-
- for Status_Codes'Size use 32;
-
- for Status_Codes use (
- Successful => 0,
- Task_Exitted => 1,
- MP_Not_Configured => 2,
- Invalid_Name => 3,
- Invalid_ID => 4,
- Too_Many => 5,
- Timeout => 6,
- Object_Was_Deleted => 7,
- Invalid_Size => 8,
- Invalid_Address => 9,
- Invalid_NumbeR => 10,
- Not_Defined => 11,
- Resource_In_Use => 12,
- Unsatisfied => 13,
- Incorrect_State => 14,
- Already_Suspended => 15,
- Illegal_On_Self => 16,
- Illegal_On_Remote_Object => 17,
- Called_From_ISR => 18,
- Invalid_Priority => 19,
- Invalid_Clock => 20,
- Invalid_Node => 21,
- Not_Configured => 22,
- Not_Owner_Of_Resource => 23,
- Not_ImplementeD => 24,
- Internal_Error => 25,
- No_Memory => 26,
- IO_Error => 27,
- Proxy_Blocking => 28
- );
-
- --
- -- RTEMS Events
- --
-
- Pending_Events : constant RTEMS.Event_Set := 16#0000_0000#;
- All_Events : constant RTEMS.Event_Set := 16#FFFF_FFFF#;
- Event_0 : constant RTEMS.Event_Set := 16#0000_0001#;
- Event_1 : constant RTEMS.Event_Set := 16#0000_0002#;
- Event_2 : constant RTEMS.Event_Set := 16#0000_0004#;
- Event_3 : constant RTEMS.Event_Set := 16#0000_0008#;
- Event_4 : constant RTEMS.Event_Set := 16#0000_0010#;
- Event_5 : constant RTEMS.Event_Set := 16#0000_0020#;
- Event_6 : constant RTEMS.Event_Set := 16#0000_0040#;
- Event_7 : constant RTEMS.Event_Set := 16#0000_0080#;
- Event_8 : constant RTEMS.Event_Set := 16#0000_0100#;
- Event_9 : constant RTEMS.Event_Set := 16#0000_0200#;
- Event_10 : constant RTEMS.Event_Set := 16#0000_0400#;
- Event_11 : constant RTEMS.Event_Set := 16#0000_0800#;
- Event_12 : constant RTEMS.Event_Set := 16#0000_1000#;
- Event_13 : constant RTEMS.Event_Set := 16#0000_2000#;
- Event_14 : constant RTEMS.Event_Set := 16#0000_4000#;
- Event_15 : constant RTEMS.Event_Set := 16#0000_8000#;
- Event_16 : constant RTEMS.Event_Set := 16#0001_0000#;
- Event_17 : constant RTEMS.Event_Set := 16#0002_0000#;
- Event_18 : constant RTEMS.Event_Set := 16#0004_0000#;
- Event_19 : constant RTEMS.Event_Set := 16#0008_0000#;
- Event_20 : constant RTEMS.Event_Set := 16#0010_0000#;
- Event_21 : constant RTEMS.Event_Set := 16#0020_0000#;
- Event_22 : constant RTEMS.Event_Set := 16#0040_0000#;
- Event_23 : constant RTEMS.Event_Set := 16#0080_0000#;
- Event_24 : constant RTEMS.Event_Set := 16#0100_0000#;
- Event_25 : constant RTEMS.Event_Set := 16#0200_0000#;
- Event_26 : constant RTEMS.Event_Set := 16#0400_0000#;
- Event_27 : constant RTEMS.Event_Set := 16#0800_0000#;
- Event_28 : constant RTEMS.Event_Set := 16#1000_0000#;
- Event_29 : constant RTEMS.Event_Set := 16#2000_0000#;
- Event_30 : constant RTEMS.Event_Set := 16#4000_0000#;
- Event_31 : constant RTEMS.Event_Set := 16#8000_0000#;
-
- --
- -- RTEMS Signals
- --
-
- All_Signals : constant RTEMS.Signal_Set := 16#7FFFFFFF#;
- Signal_0 : constant RTEMS.Signal_Set := 16#00000001#;
- Signal_1 : constant RTEMS.Signal_Set := 16#00000002#;
- Signal_2 : constant RTEMS.Signal_Set := 16#00000004#;
- Signal_3 : constant RTEMS.Signal_Set := 16#00000008#;
- Signal_4 : constant RTEMS.Signal_Set := 16#00000010#;
- Signal_5 : constant RTEMS.Signal_Set := 16#00000020#;
- Signal_6 : constant RTEMS.Signal_Set := 16#00000040#;
- Signal_7 : constant RTEMS.Signal_Set := 16#00000080#;
- Signal_8 : constant RTEMS.Signal_Set := 16#00000100#;
- Signal_9 : constant RTEMS.Signal_Set := 16#00000200#;
- Signal_10 : constant RTEMS.Signal_Set := 16#00000400#;
- Signal_11 : constant RTEMS.Signal_Set := 16#00000800#;
- Signal_12 : constant RTEMS.Signal_Set := 16#00001000#;
- Signal_13 : constant RTEMS.Signal_Set := 16#00002000#;
- Signal_14 : constant RTEMS.Signal_Set := 16#00004000#;
- Signal_15 : constant RTEMS.Signal_Set := 16#00008000#;
- Signal_16 : constant RTEMS.Signal_Set := 16#00010000#;
- Signal_17 : constant RTEMS.Signal_Set := 16#00020000#;
- Signal_18 : constant RTEMS.Signal_Set := 16#00040000#;
- Signal_19 : constant RTEMS.Signal_Set := 16#00080000#;
- Signal_20 : constant RTEMS.Signal_Set := 16#00100000#;
- Signal_21 : constant RTEMS.Signal_Set := 16#00200000#;
- Signal_22 : constant RTEMS.Signal_Set := 16#00400000#;
- Signal_23 : constant RTEMS.Signal_Set := 16#00800000#;
- Signal_24 : constant RTEMS.Signal_Set := 16#01000000#;
- Signal_25 : constant RTEMS.Signal_Set := 16#02000000#;
- Signal_26 : constant RTEMS.Signal_Set := 16#04000000#;
- Signal_27 : constant RTEMS.Signal_Set := 16#08000000#;
- Signal_28 : constant RTEMS.Signal_Set := 16#10000000#;
- Signal_29 : constant RTEMS.Signal_Set := 16#20000000#;
- Signal_30 : constant RTEMS.Signal_Set := 16#40000000#;
- Signal_31 : constant RTEMS.Signal_Set := 16#80000000#;
-
- --
- -- RTEMS API Configuration Information
- --
-
- type Initialization_Tasks_Table_Entry is
- record
- Name : RTEMS.Name; -- task name
- Stack_Size : RTEMS.Unsigned32; -- task stack size
- Initial_Priority : RTEMS.Task_priority; -- task priority
- Attribute_Set : RTEMS.Attribute; -- task attributes
- Entry_Point : RTEMS.Task_Entry; -- task entry point
- Mode_Set : RTEMS.Mode; -- task initial mode
- Argument : RTEMS.Unsigned32; -- task argument
- end record;
-
- type Initialization_Tasks_Table is array ( RTEMS.Unsigned32 range <> ) of
- RTEMS.Initialization_Tasks_Table_Entry;
-
- type Initialization_Tasks_Table_Pointer is access all
- Initialization_Tasks_Table;
-
- type API_Configuration_Table is
- record
- Maximum_Tasks : RTEMS.Unsigned32;
- Maximum_Timers : RTEMS.Unsigned32;
- Maximum_Semaphores : RTEMS.Unsigned32;
- Maximum_Message_queues : RTEMS.Unsigned32;
- Maximum_Partitions : RTEMS.Unsigned32;
- Maximum_Regions : RTEMS.Unsigned32;
- Maximum_Ports : RTEMS.Unsigned32;
- Maximum_Periods : RTEMS.Unsigned32;
- Number_Of_Initialization_Tasks : RTEMS.Unsigned32;
- User_Initialization_Tasks_Table :
- RTEMS.Initialization_Tasks_Table_Pointer;
- end record;
-
- type API_Configuration_Table_Pointer is access all API_Configuration_Table;
-
- --
- -- RTEMS POSIX API Configuration Information
- --
-
- type POSIX_Thread_Entry is access procedure (
- Argument : in RTEMS.Address
- );
-
- type POSIX_Initialization_Threads_Table_Entry is
- record
- Thread_Entry : RTEMS.POSIX_Thread_Entry;
- end record;
-
- type POSIX_Initialization_Threads_Table is array
- ( RTEMS.Unsigned32 range <> ) of
- RTEMS.POSIX_Initialization_Threads_Table_Entry;
-
- type POSIX_Initialization_Threads_Table_Pointer is access all
- POSIX_Initialization_Threads_Table;
-
- type POSIX_API_Configuration_Table_Entry is
- record
- Maximum_Threads : Interfaces.C.Int;
- Maximum_Mutexes : Interfaces.C.Int;
- Maximum_Condition_Variables : Interfaces.C.Int;
- Maximum_Keys : Interfaces.C.Int;
- Maximum_Queued_Signals : Interfaces.C.Int;
- Number_Of_Initialization_Tasks : Interfaces.C.Int;
- User_Initialization_Tasks_Table :
- RTEMS.POSIX_Initialization_Threads_Table_Pointer;
- end record;
-
- type POSIX_API_Configuration_Table is array ( RTEMS.Unsigned32 range <> ) of
- RTEMS.POSIX_API_Configuration_Table_Entry;
-
- type POSIX_API_Configuration_Table_Pointer is access all
- RTEMS.POSIX_API_Configuration_Table;
-
- --
- -- MPCI Information include MPCI Configuration
- --
-
- type Configuration_Table_Pointer;
-
- type MP_Packet_Classes is (
- MP_PACKET_MPCI_INTERNAL,
- MP_PACKET_TASKS,
- MP_PACKET_MESSAGE_QUEUE,
- MP_PACKET_SEMAPHORE,
- MP_PACKET_PARTITION,
- MP_PACKET_REGION,
- MP_PACKET_EVENT,
- MP_PACKET_SIGNAL
- );
-
- for MP_Packet_Classes use (
- MP_PACKET_MPCI_INTERNAL => 0,
- MP_PACKET_TASKS => 1,
- MP_PACKET_MESSAGE_QUEUE => 2,
- MP_PACKET_SEMAPHORE => 3,
- MP_PACKET_PARTITION => 4,
- MP_PACKET_REGION => 5,
- MP_PACKET_EVENT => 6,
- MP_PACKET_SIGNAL => 7
- );
-
- type Packet_Prefix is
- record
- The_Class : RTEMS.MP_Packet_Classes;
- ID : RTEMS.ID;
- Source_TID : RTEMS.ID;
- Source_Priority : RTEMS.Task_Priority;
- Return_Code : RTEMS.Unsigned32;
- Length : RTEMS.Unsigned32;
- To_Convert : RTEMS.Unsigned32;
- Timeout : RTEMS.Interval;
- end record;
-
- type Packet_Prefix_Pointer is access all Packet_Prefix;
-
- type MPCI_Initialization_Entry is access procedure (
- Configuration : in RTEMS.Configuration_Table_Pointer
- );
-
- type MPCI_Get_Packet_Entry is access procedure (
- Packet : access RTEMS.Packet_Prefix_Pointer
- );
-
- type MPCI_Return_Packet_Entry is access procedure (
- Packet : in RTEMS.Packet_Prefix_Pointer
- );
-
- type MPCI_Send_Entry is access procedure (
- Packet : in RTEMS.Packet_Prefix_Pointer
- );
-
- type MPCI_Receive_Entry is access procedure (
- Packet : access RTEMS.Packet_Prefix_Pointer
- );
-
- type MPCI_Table is
- record
- Default_Timeout : RTEMS.Unsigned32; -- in ticks
- Maximum_Packet_Size : RTEMS.Unsigned32;
- Initialization : RTEMS.MPCI_Initialization_Entry;
- Get_Packet : RTEMS.MPCI_Get_Packet_Entry;
- Return_Packet : RTEMS.MPCI_Return_Packet_Entry;
- Send : RTEMS.MPCI_Send_Entry;
- Receive : RTEMS.MPCI_Receive_Entry;
- end record;
-
- type MPCI_Table_Pointer is access all MPCI_Table;
-
- --
- -- Configuration Information
- --
-
- type Multiprocessing_Table is
- record
- Node : RTEMS.Unsigned32;
- Maximum_Nodes : RTEMS.Unsigned32;
- Maximum_Global_Objects : RTEMS.Unsigned32;
- Maximum_Proxies : RTEMS.Unsigned32;
- User_MPCI_Table : RTEMS.MPCI_Table_Pointer;
- end record;
-
- type Multiprocessing_Table_Pointer is access all Multiprocessing_Table;
-
- type Configuration_Table is
- record
- Work_Space_Start : RTEMS.Address;
- Work_Space_Size : RTEMS.Unsigned32;
- Maximum_Extensions : RTEMS.Unsigned32;
- Microseconds_Per_Tick : RTEMS.Unsigned32;
- Ticks_Per_Timeslice : RTEMS.Unsigned32;
- Maximum_Devices : RTEMS.Unsigned32;
- Number_Of_Device_Drivers : RTEMS.Unsigned32;
- Device_Driver_Table : RTEMS.Driver_Address_Table_Pointer;
- Number_Of_Initial_Extensions : RTEMS.Unsigned32;
- User_Extension_Table : RTEMS.Extensions_Table_Pointer;
- User_Multiprocessing_Table : RTEMS.Multiprocessing_Table_Pointer;
- RTEMS_API_Configuration : RTEMS.API_Configuration_Table_Pointer;
- POSIX_API_Configuration : RTEMS.POSIX_API_Configuration_Table_Pointer;
- end record;
-
- type Configuration_Table_Pointer is access all Configuration_Table;
-
- --
- -- For now, do not provide access to the CPU Table from Ada.
- -- When this type is provided, a CPU dependent file must
- -- define it.
- --
-
- subtype CPU_Table is RTEMS.Address;
- type CPU_Table_Pointer is access all CPU_Table;
-
- --
- -- Utility Functions
- --
-
- function From_Ada_Boolean (
- Ada_Boolean : Standard.Boolean
- ) return RTEMS.Boolean;
-
- function To_Ada_Boolean (
- RTEMS_Boolean : RTEMS.Boolean
- ) return Standard.Boolean;
-
- function Milliseconds_To_Microseconds (
- Milliseconds : RTEMS.Unsigned32
- ) return RTEMS.Unsigned32;
-
- function Microseconds_To_Ticks (
- Microseconds : RTEMS.Unsigned32
- ) return RTEMS.Interval;
-
- function Milliseconds_To_Ticks (
- Milliseconds : RTEMS.Unsigned32
- ) return RTEMS.Interval;
-
- function Build_Name (
- C1 : in Character;
- C2 : in Character;
- C3 : in Character;
- C4 : in Character
- ) return RTEMS.Name;
-
- procedure Name_To_Characters (
- Name : in RTEMS.Name;
- C1 : out Character;
- C2 : out Character;
- C3 : out Character;
- C4 : out Character
- );
-
- function Get_Node (
- ID : in RTEMS.ID
- ) return RTEMS.Unsigned32;
-
- function Get_Index (
- ID : in RTEMS.ID
- ) return RTEMS.Unsigned32;
-
- function Are_Statuses_Equal (
- Status : in RTEMS.Status_Codes;
- Desired : in RTEMS.Status_Codes
- ) return Standard.Boolean;
-
- function Is_Status_Successful (
- Status : in RTEMS.Status_Codes
- ) return Standard.Boolean;
-
- function Subtract (
- Left : in RTEMS.Address;
- Right : in RTEMS.Address
- ) return RTEMS.Unsigned32;
-
- function Are_Equal (
- Left : in RTEMS.Address;
- Right : in RTEMS.Address
- ) return Standard.Boolean;
- --
- -- RTEMS API
- --
-
- --
- -- Initialization Manager
- --
-
- procedure Initialize_Executive (
- Configuration_Table : in RTEMS.Configuration_Table_Pointer;
- CPU_Table : in RTEMS.CPU_Table_Pointer
- );
-
- procedure Initialize_Executive_Early (
- Configuration_Table : in RTEMS.Configuration_Table_Pointer;
- CPU_Table : in RTEMS.CPU_Table_Pointer;
- Level : out RTEMS.ISR_Level
- );
-
- procedure Initialize_Executive_Late (
- BSP_Level : in RTEMS.ISR_Level
- );
-
- procedure Shutdown_Executive (
- Result : in RTEMS.Unsigned32
- );
-
- --
- -- Task Manager
- --
-
- procedure Task_Create (
- Name : in RTEMS.Name;
- Initial_Priority : in RTEMS.Task_Priority;
- Stack_Size : in Unsigned32;
- Initial_Modes : in RTEMS.Mode;
- Attribute_Set : in RTEMS.Attribute;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Task_Ident (
- Name : in RTEMS.Name;
- Node : in RTEMS.Node;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Task_Start (
- ID : in RTEMS.ID;
- Entry_Point : in RTEMS.Task_Entry;
- Argument : in RTEMS.Task_Argument;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Task_Restart (
- ID : in RTEMS.ID;
- Argument : in RTEMS.Task_Argument;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Task_Delete (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Task_Suspend (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Task_Resume (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Task_Is_Suspended (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Task_Set_Priority (
- ID : in RTEMS.ID;
- New_Priority : in RTEMS.Task_Priority;
- Old_Priority : out RTEMS.Task_Priority;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Task_Mode (
- Mode_Set : in RTEMS.Mode;
- Mask : in RTEMS.Mode;
- Previous_Mode_Set : out RTEMS.Mode;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Task_Get_Note (
- ID : in RTEMS.ID;
- Notepad : in RTEMS.Notepad_Index;
- Note : out RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Task_Set_Note (
- ID : in RTEMS.ID;
- Notepad : in RTEMS.Notepad_Index;
- Note : in RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Task_Wake_When (
- Time_Buffer : in RTEMS.Time_Of_Day;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Task_Wake_After (
- Ticks : in RTEMS.Interval;
- Result : out RTEMS.Status_Codes
- );
-
- --
- -- Interrupt Manager
- --
-
- procedure Interrupt_Catch (
- New_ISR_Handler : in RTEMS.Address;
- Vector : in RTEMS.Vector_Number;
- Old_ISR_Handler : out RTEMS.Address;
- Result : out RTEMS.Status_Codes
- );
-
- function Interrupt_Disable
- return RTEMS.ISR_Level;
-
- procedure Interrupt_Enable (
- Level : in RTEMS.ISR_Level
- );
-
- procedure Interrupt_Flash (
- Level : in RTEMS.ISR_Level
- );
-
- function Interrupt_Is_In_Progress
- return RTEMS.Boolean;
-
- --
- -- Clock Manager
- --
-
- procedure Clock_Get (
- Option : in RTEMS.Clock_Get_Options;
- Time_Buffer : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Clock_Set (
- Time_Buffer : in RTEMS.Time_Of_Day;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Clock_Tick (
- Result : out RTEMS.Status_Codes
- );
-
- --
- -- Extension Manager
- --
-
- procedure Extension_Create (
- Name : in RTEMS.Name;
- Table : in RTEMS.Extensions_Table_Pointer;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Extension_Ident (
- Name : in RTEMS.Name;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Extension_Delete (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
-
- --
- -- Timer Manager
- --
-
- procedure Timer_Create (
- Name : in RTEMS.Name;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Timer_Ident (
- Name : in RTEMS.Name;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Timer_Delete (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Timer_Fire_After (
- ID : in RTEMS.ID;
- Ticks : in RTEMS.Interval;
- Routine : in RTEMS.Timer_Service_Routine;
- User_Data : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Timer_Fire_When (
- ID : in RTEMS.ID;
- Wall_Time : in RTEMS.Time_Of_Day;
- Routine : in RTEMS.Timer_Service_Routine;
- User_Data : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Timer_Reset (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Timer_Cancel (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- --
- -- Semaphore Manager
- --
-
- procedure Semaphore_Create (
- Name : in RTEMS.Name;
- Count : in RTEMS.Unsigned32;
- Attribute_Set : in RTEMS.Attribute;
- Priority_Ceiling : in RTEMS.Task_Priority;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Semaphore_Delete (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Semaphore_Ident (
- Name : in RTEMS.Name;
- Node : in RTEMS.Unsigned32;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Semaphore_Obtain (
- ID : in RTEMS.ID;
- Option_Set : in RTEMS.Option;
- Timeout : in RTEMS.Interval;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Semaphore_Release (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Semaphore_Flush (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- --
- -- Message Queue Manager
- --
-
- procedure Message_Queue_Create (
- Name : in RTEMS.Name;
- Count : in RTEMS.Unsigned32;
- Max_Message_Size : in RTEMS.Unsigned32;
- Attribute_Set : in RTEMS.Attribute;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Message_Queue_Ident (
- Name : in RTEMS.Name;
- Node : in RTEMS.Unsigned32;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Message_Queue_Delete (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Message_Queue_Send (
- ID : in RTEMS.ID;
- Buffer : in RTEMS.Address;
- Size : in RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Message_Queue_Urgent (
- ID : in RTEMS.ID;
- Buffer : in RTEMS.Address;
- Size : in RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Message_Queue_Broadcast (
- ID : in RTEMS.ID;
- Buffer : in RTEMS.Address;
- Size : in RTEMS.Unsigned32;
- Count : out RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Message_Queue_Receive (
- ID : in RTEMS.ID;
- Buffer : in RTEMS.Address;
- Option_Set : in RTEMS.Option;
- Timeout : in RTEMS.Interval;
- Size : out RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Message_Queue_Flush (
- ID : in RTEMS.ID;
- Count : out RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
- );
-
-
- --
- -- Event Manager
- --
-
- procedure Event_Send (
- ID : in RTEMS.ID;
- Event_In : in RTEMS.Event_Set;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Event_Receive (
- Event_In : in RTEMS.Event_Set;
- Option_Set : in RTEMS.Option;
- Ticks : in RTEMS.Interval;
- Event_Out : out RTEMS.Event_Set;
- Result : out RTEMS.Status_Codes
- );
-
- --
- -- Signal Manager
- --
-
- procedure Signal_Catch (
- ASR_Handler : in RTEMS.ASR_Handler;
- Mode_Set : in RTEMS.Mode;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Signal_Send (
- ID : in RTEMS.ID;
- Signal_Set : in RTEMS.Signal_Set;
- Result : out RTEMS.Status_Codes
- );
-
-
- --
- -- Partition Manager
- --
-
- procedure Partition_Create (
- Name : in RTEMS.Name;
- Starting_Address : in RTEMS.Address;
- Length : in RTEMS.Unsigned32;
- Buffer_Size : in RTEMS.Unsigned32;
- Attribute_Set : in RTEMS.Attribute;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Partition_Ident (
- Name : in RTEMS.Name;
- Node : in RTEMS.Unsigned32;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Partition_Delete (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Partition_Get_Buffer (
- ID : in RTEMS.ID;
- Buffer : out RTEMS.Address;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Partition_Return_Buffer (
- ID : in RTEMS.ID;
- Buffer : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
- );
-
-
- --
- -- Region Manager
- --
-
- procedure Region_Create (
- Name : in RTEMS.Name;
- Starting_Address : in RTEMS.Address;
- Length : in RTEMS.Unsigned32;
- Page_Size : in RTEMS.Unsigned32;
- Attribute_Set : in RTEMS.Attribute;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Region_Ident (
- Name : in RTEMS.Name;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Region_Delete (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Region_Extend (
- ID : in RTEMS.ID;
- Starting_Address : in RTEMS.Address;
- Length : in RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Region_Get_Segment (
- ID : in RTEMS.ID;
- Size : in RTEMS.Unsigned32;
- Option_Set : in RTEMS.Option;
- Timeout : in RTEMS.Interval;
- Segment : out RTEMS.Address;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Region_Get_Segment_Size (
- ID : in RTEMS.ID;
- Segment : in RTEMS.Address;
- Size : out RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Region_Return_Segment (
- ID : in RTEMS.ID;
- Segment : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
- );
-
-
- --
- -- Dual Ported Memory Manager
- --
-
- procedure Port_Create (
- Name : in RTEMS.Name;
- Internal_Start : in RTEMS.Address;
- External_Start : in RTEMS.Address;
- Length : in RTEMS.Unsigned32;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Port_Ident (
- Name : in RTEMS.Name;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Port_Delete (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Port_External_To_Internal (
- ID : in RTEMS.ID;
- External : in RTEMS.Address;
- Internal : out RTEMS.Address;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Port_Internal_To_External (
- ID : in RTEMS.ID;
- Internal : in RTEMS.Address;
- External : out RTEMS.Address;
- Result : out RTEMS.Status_Codes
- );
-
- --
- -- Input/Output Manager
- --
-
- procedure IO_Initialize (
- Major : in RTEMS.Device_Major_Number;
- Minor : in RTEMS.Device_Minor_Number;
- Argument : in RTEMS.Address;
- Return_Value : out RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
- );
-
- procedure IO_Register_Name (
- Name : in String;
- Major : in RTEMS.Device_Major_Number;
- Minor : in RTEMS.Device_Minor_Number;
- Result : out RTEMS.Status_Codes
- );
-
- procedure IO_Lookup_Name (
- Name : in String;
- Device_Info : out RTEMS.Driver_Name_t;
- Result : out RTEMS.Status_Codes
- );
-
- procedure IO_Open (
- Major : in RTEMS.Device_Major_Number;
- Minor : in RTEMS.Device_Minor_Number;
- Argument : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
- );
-
- procedure IO_Close (
- Major : in RTEMS.Device_Major_Number;
- Minor : in RTEMS.Device_Minor_Number;
- Argument : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
- );
-
- procedure IO_Read (
- Major : in RTEMS.Device_Major_Number;
- Minor : in RTEMS.Device_Minor_Number;
- Argument : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
- );
-
- procedure IO_Write (
- Major : in RTEMS.Device_Major_Number;
- Minor : in RTEMS.Device_Minor_Number;
- Argument : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
- );
-
- procedure IO_Control (
- Major : in RTEMS.Device_Major_Number;
- Minor : in RTEMS.Device_Minor_Number;
- Argument : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
- );
-
-
- --
- -- Fatal Error Manager
- --
-
- procedure Fatal_Error_Occurred (
- The_Error : in RTEMS.Unsigned32
- );
-
-
- --
- -- Rate Monotonic Manager
- --
-
- procedure Rate_Monotonic_Create (
- Name : in RTEMS.Name;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Rate_Monotonic_Ident (
- Name : in RTEMS.Name;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Rate_Monotonic_Delete (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Rate_Monotonic_Cancel (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Rate_Monotonic_Period (
- ID : in RTEMS.ID;
- Length : in RTEMS.Interval;
- Result : out RTEMS.Status_Codes
- );
-
- procedure Rate_Monotonic_Get_Status (
- ID : in RTEMS.ID;
- Status : out RTEMS.Rate_Monotonic_Period_Status;
- Result : out RTEMS.Status_Codes
- );
-
- --
- -- Multiprocessing Manager
- --
-
- procedure Multiprocessing_Announce;
-
-
- --
- -- Debug Manager
- --
-
- Debug_All_Mask : constant RTEMS.Debug_Set := 16#ffffffff#;
- Debug_Region : constant RTEMS.Debug_Set := 16#00000001#;
-
- procedure Debug_Enable (
- To_Be_Enabled : in RTEMS.Debug_Set
- );
-
- procedure Debug_Disable (
- To_Be_Disabled : in RTEMS.Debug_Set
- );
-
- function Debug_Is_Enabled (
- Level : in RTEMS.Debug_Set
- ) return RTEMS.Boolean;
-
- --
- -- Some Useful Data Items
- --
-
- Configuration : RTEMS.Configuration_Table_Pointer;
- pragma Import (C, Configuration, "_Configuration_Table");
-
-
-private
-end RTEMS;
diff --git a/cpukit/ftpd/Makefile.am b/cpukit/ftpd/Makefile.am
deleted file mode 100644
index 77d1677844..0000000000
--- a/cpukit/ftpd/Makefile.am
+++ /dev/null
@@ -1,31 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-LIBNAME = lib.a
-LIB = $(ARCH)/$(LIBNAME)
-
-C_FILES = ftpd.c
-C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
-
-OBJS = $(C_O_FILES)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../automake/lib.am
-
-#
-# Add local stuff here using +=
-#
-
-$(LIB): $(OBJS)
- $(make-library)
-
-all-local: $(ARCH) $(OBJS) $(LIB)
-
-.PRECIOUS: $(LIB)
-
-EXTRA_DIST = ftpd.c ftpd.h
-
-include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/ftpd/ftpd.c b/cpukit/ftpd/ftpd.c
deleted file mode 100644
index 25b1f3c4e4..0000000000
--- a/cpukit/ftpd/ftpd.c
+++ /dev/null
@@ -1,1072 +0,0 @@
-/* FIXME: 1. Parse command is a hack. We can do better.
- * 2. chdir is a hack. We can do better.
- * 3. PWD doesn't work.
- * 4. Some sort of access control?
- *
- * FTP Server Daemon
- *
- * Submitted by: Jake Janovetz <janovetz@tempest.ece.uiuc.edu>
- *
- * $Id$
- */
-
-/**************************************************************************
- * ftpd.c *
- **************************************************************************
- * Description: *
- * *
- * This file contains the daemon which services requests that appear *
- * on the FTP port. This server is compatible with FTP, but it *
- * also provides 'hooks' to make it usable in situations where files *
- * are not used/necessary. Once the server is started, it runs *
- * forever. *
- * *
- * *
- * Organization: *
- * *
- * The FTP daemon is started upon boot. It runs all the time *
- * and waits for connections on the known FTP port (21). When *
- * a connection is made, it starts a 'session' task. That *
- * session then interacts with the remote host. When the session *
- * is complete, the session task deletes itself. The daemon still *
- * runs, however. *
- * *
- * *
- * Supported commands are: *
- * *
- * RETR xxx - Sends a file from the client. *
- * STOR xxx - Receives a file from the client. xxx = filename. *
- * LIST xxx - Sends a file list to the client. *
- * (LIST xxx isn't working yet...) *
- * USER - Does nothing. *
- * PASS - Does nothing. *
- * SYST - Replies with the system type (`RTEMS'). *
- * DELE xxx - Delete file xxx. *
- * MKD xxx - Create directory xxx. *
- * RMD xxx - Remove directory xxx. *
- * PWD - Print working directory. *
- * CWD xxx - Change working directory. *
- * SITE CHMOD xxx yyy - Change permissions on file yyy to xxx. *
- * PORT a,b,c,d,x,y - Setup for a data port to IP address a.b.c.d *
- * and port (x*256 + y). *
- * *
- * *
- * The public routines contained in this file are: *
- * *
- * rtems_initialize_ftpd_start - Starts the server daemon, then *
- * returns to its caller. *
- * *
- * *
- * The private routines contained in this file are: *
- * *
- * rtems_ftpd_send_reply - Sends a reply code and text through the *
- * control port. *
- * rtems_ftpd_command_retrieve - Performs to "RETR" command. *
- * rtems_ftpd_command_store - Performs the "STOR" command. *
- * rtems_ftpd_command_list - Performs the "LIST" command. *
- * rtems_ftpd_command_port - Opens a data port (the "PORT" command). *
- * rtems_ftpd_parse_command - Parses an incoming command. *
- * rtmes_ftpd_session - Begins a service session. *
- * rtems_ftpd_daemon - Listens on the FTP port for service *
- * requests. *
- *------------------------------------------------------------------------*
- * Jake Janovetz *
- * University of Illinois *
- * 1406 West Green Street *
- * Urbana IL 61801 *
- **************************************************************************
- * Change History: *
- * 12/01/97 - Creation (JWJ) *
- *************************************************************************/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <dirent.h>
-
-#include <rtems.h>
-#include <rtems/rtems_bsdnet.h>
-#include <rtems/error.h>
-#include <syslog.h>
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <arpa/ftp.h>
-#include <netinet/in.h>
-
-#include "ftpd.h"
-
-
-extern struct rtems_ftpd_configuration rtems_ftpd_configuration;
-
-/**************************************************************************
- * Meanings of first and second digits of reply codes:
- *
- * Reply: Description:
- *-------- --------------
- * 1yz Positive preliminary reply. The action is being started but
- * expect another reply before sending another command.
- * 2yz Positive completion reply. A new command can be sent.
- * 3yz Positive intermediate reply. The command has been accpeted
- * but another command must be sent.
- * 4yz Transient negative completion reply. The requested action did
- * not take place, but the error condition is temporary so the
- * command can be reissued later.
- * 5yz Permanent negative completion reply. The command was not
- * accepted and should not be retried.
- *-------------------------------------------------------------------------
- * x0z Syntax errors.
- * x1z Information.
- * x2z Connections. Replies referring to the control or data
- * connections.
- * x3z Authentication and accounting. Replies for the login or
- * accounting commands.
- * x4z Unspecified.
- * x5z Filesystem status.
- *************************************************************************/
-
-
-/**************************************************************************
- * SessionInfo structure.
- *
- * The following structure is allocated for each session. The pointer
- * to this structure is contained in the tasks notepad entry.
- *************************************************************************/
-typedef struct
-{
- struct sockaddr_in data_addr; /* Data address for PORT commands */
- FILE *ctrl_fp; /* File pointer for control connection */
- char cwd[255]; /* Current working directory */
- /* Login -- future use -- */
- int xfer_mode; /* Transfer mode (ASCII/binary) */
-} FTPD_SessionInfo_t;
-
-
-#define FTPD_SERVER_MESSAGE "RTEMS FTP server (Version 1.0-JWJ) ready."
-#define FTPD_WELCOME_MESSAGE \
- "Welcome to the RTEMS FTP server.\n" \
- "\n" \
- "Login accepted.\n"
-
-
-/**************************************************************************
- * Function: rtems_ftpd_send_reply *
- **************************************************************************
- * Description: *
- * *
- * This procedure sends a reply to the client via the control *
- * connection. *
- * *
- * *
- * Inputs: *
- * *
- * int code - The 3-digit reply code. *
- * char *text - Reply text. *
- * *
- * Output: *
- * *
- * none *
- * *
- **************************************************************************
- * Change History: *
- * 12/01/97 - Creation (JWJ) *
- *************************************************************************/
-static void
-rtems_ftpd_send_reply(int code, char *text)
-{
- rtems_status_code sc;
- FTPD_SessionInfo_t *info = NULL;
- char str[80];
-
-
- sc = rtems_task_get_note(RTEMS_SELF, RTEMS_NOTEPAD_0,
- (rtems_unsigned32 *)&info);
-
- /***********************************************************************
- * code must be a 3-digit number.
- **********************************************************************/
- if ((code < 100) || (code > 999))
- {
- syslog(LOG_ERR, "ftpd: Code not 3-digits.");
- return;
- }
-
- /***********************************************************************
- * If a text reply exists, add it to the reply data.
- **********************************************************************/
- if (text != NULL)
- {
- sprintf(str, "%d %.70s\r\n", code, text);
- fprintf(info->ctrl_fp, "%d %.70s\r\n", code, text);
- }
- else
- {
- sprintf(str, "%d\r\n", code);
- fprintf(info->ctrl_fp, "%d\r\n", code);
- }
- fflush(info->ctrl_fp);
-}
-
-
-/**************************************************************************
- * Function: rtems_ftpd_command_retrieve *
- **************************************************************************
- * Description: *
- * *
- * This performs the "RETR" command. A data connection must already *
- * be open (via the "PORT" command.) Here, we send the data to the *
- * connection. *
- * *
- * *
- * Inputs: *
- * *
- * char *filename - Source filename. *
- * *
- * Output: *
- * *
- * int - 0 for reply sent. *
- * 1 for no reply sent. *
- * *
- **************************************************************************
- * Change History: *
- * 04/29/98 - Creation (JWJ) *
- *************************************************************************/
-static int
-rtems_ftpd_command_retrieve(char *filename)
-{
- int s;
- int n;
- int fd;
- unsigned char *bufr;
- rtems_status_code sc;
- FTPD_SessionInfo_t *info = NULL;
-
-
- sc = rtems_task_get_note(RTEMS_SELF, RTEMS_NOTEPAD_0,
- (rtems_unsigned32 *)&info);
-
- if ((fd = open(filename, O_RDONLY)) == -1)
- {
- rtems_ftpd_send_reply(450, "Error opening file.");
- return(0);
- }
-
- bufr = (unsigned char *)malloc(BUFSIZ);
- if (bufr == NULL)
- {
- rtems_ftpd_send_reply(440, "Server error - malloc fail.");
- close(fd);
- return(0);
- }
-
- /***********************************************************************
- * Connect to the data connection (PORT made in an earlier PORT call).
- **********************************************************************/
- rtems_ftpd_send_reply(150, "BINARY data connection.");
- s = socket(AF_INET, SOCK_STREAM, 0);
- if (connect(s, (struct sockaddr *)&info->data_addr,
- sizeof(struct sockaddr)) < 0)
- {
- rtems_ftpd_send_reply(420, "Server error - could not connect socket.");
- free(bufr);
- close(fd);
- close(s);
- return(1);
- }
-
- /***********************************************************************
- * Send the data over the ether.
- **********************************************************************/
- while ((n = read(fd, bufr, BUFSIZ)) > 0)
- {
- send(s, bufr, n, 0);
- bufr[n-1] = '\0';
- }
-
- if (n == 0)
- {
- rtems_ftpd_send_reply(210, "File sent successfully.");
- }
- else
- {
- rtems_ftpd_send_reply(450, "Retrieve failed.");
- }
-
- if (close(s) != 0)
- {
- syslog(LOG_ERR, "ftpd: Error closing data socket");
- }
-
- free(bufr);
- close(fd);
- return(0);
-}
-
-
-/**************************************************************************
- * Function: rtems_ftpd_command_store *
- **************************************************************************
- * Description: *
- * *
- * This performs the "STOR" command. A data connection must already *
- * be open (via the "PORT" command.) Here, we get the data from the *
- * connection and figure out what to do with it. *
- * *
- * *
- * Inputs: *
- * *
- * char *filename - Destination filename. *
- * *
- * Output: *
- * *
- * int - 0 for success. *
- * 1 for failure. *
- * *
- **************************************************************************
- * Change History: *
- * 12/01/97 - Creation (JWJ) *
- *************************************************************************/
-static int
-rtems_ftpd_command_store(char *filename)
-{
- char *bufr;
- int s;
- int n;
- unsigned long size = 0;
- rtems_status_code sc;
- FTPD_SessionInfo_t *info = NULL;
- struct rtems_ftpd_hook *usehook = NULL;
-
-
- sc = rtems_task_get_note(RTEMS_SELF, RTEMS_NOTEPAD_0,
- (rtems_unsigned32 *)&info);
-
- bufr = (char *)malloc(BUFSIZ * sizeof(char));
- if (bufr == NULL)
- {
- rtems_ftpd_send_reply(440, "Server error - malloc fail.");
- return(1);
- }
-
- rtems_ftpd_send_reply(150, "BINARY data connection.");
-
- s = socket(AF_INET, SOCK_STREAM, 0);
- if (connect(s, (struct sockaddr *)&info->data_addr,
- sizeof(struct sockaddr)) < 0)
- {
- free(bufr);
- close(s);
- return(1);
- }
-
-
- /***********************************************************************
- * File: "/dev/null" just throws the data away.
- * Otherwise, search our list of hooks to see if we need to do something
- * special.
- **********************************************************************/
- if (!strncmp("/dev/null", filename, 9))
- {
- while ((n = read(s, bufr, BUFSIZ)) > 0);
- }
- else if (rtems_ftpd_configuration.hooks != NULL)
- {
- struct rtems_ftpd_hook *hook;
- int i;
-
- i = 0;
- hook = &rtems_ftpd_configuration.hooks[i++];
- while (hook->filename != NULL)
- {
- if (!strcmp(hook->filename, filename))
- {
- usehook = hook;
- break;
- }
- hook = &rtems_ftpd_configuration.hooks[i++];
- }
- }
-
- if (usehook != NULL)
- {
- char *bigBufr;
-
- /***********************************************************************
- * Allocate space for our "file".
- **********************************************************************/
- bigBufr = (char *)malloc(
- rtems_ftpd_configuration.max_hook_filesize * sizeof(char));
- if (bigBufr == NULL)
- {
- rtems_ftpd_send_reply(440, "Server error - malloc fail.");
- free(bufr);
- return(1);
- }
-
- /***********************************************************************
- * Retrieve the file into our buffer space.
- **********************************************************************/
- size = 0;
- while ((n = read(s, bufr, BUFSIZ)) > 0)
- {
- if (size + n >
- rtems_ftpd_configuration.max_hook_filesize * sizeof(char))
- {
- rtems_ftpd_send_reply(440, "Server error - Buffer size exceeded.");
- free(bufr);
- free(bigBufr);
- close(s);
- return(1);
- }
- memcpy(&bigBufr[size], bufr, n);
- size += n;
- }
- close(s);
-
- /***********************************************************************
- * Call our hook.
- **********************************************************************/
- if ((usehook->hook_function)(bigBufr, size) == 0)
- {
- rtems_ftpd_send_reply(210, "File transferred successfully.");
- }
- else
- {
- rtems_ftpd_send_reply(440, "File transfer failed.");
- }
- free(bigBufr);
- }
- else
- {
- int fd;
- size_t written;
-
- fd = creat(filename, S_IRUSR | S_IWUSR |
- S_IRGRP | S_IWGRP |
- S_IROTH | S_IWOTH);
- if (fd == -1)
- {
- rtems_ftpd_send_reply(450, "Could not open file.");
- close(s);
- free(bufr);
- return(1);
- }
- while ((n = read(s, bufr, BUFSIZ)) > 0)
- {
- written = write(fd, bufr, n);
- if (written == -1)
- {
- rtems_ftpd_send_reply(450, "Error during write.");
- close(fd);
- close(s);
- free(bufr);
- return(1);
- }
- }
- close(fd);
- close(s);
- rtems_ftpd_send_reply(226, "Transfer complete.");
- }
-
- free(bufr);
- return(0);
-}
-
-
-/**************************************************************************
- * Function: rtems_ftpd_command_list *
- **************************************************************************
- * Description: *
- * *
- * Sends a file list through a data connection. The data *
- * connection must have already been opened with the "PORT" command. *
- * *
- * *
- * Inputs: *
- * *
- * char *fname - File (or directory) to list. *
- * *
- * Output: *
- * *
- * none *
- * *
- **************************************************************************
- * Change History: *
- * 12/01/97 - Creation (JWJ) *
- *************************************************************************/
-static void
-rtems_ftpd_command_list(char *fname)
-{
- int s;
- rtems_status_code sc;
- FTPD_SessionInfo_t *info = NULL;
- DIR *dirp;
- struct dirent *dp;
- char dirline[255];
- struct stat stat_buf;
-
-
- sc = rtems_task_get_note(RTEMS_SELF, RTEMS_NOTEPAD_0,
- (rtems_unsigned32 *)&info);
-
- rtems_ftpd_send_reply(150, "ASCII data connection for LIST.");
-
- s = socket(AF_INET, SOCK_STREAM, 0);
- if (connect(s, (struct sockaddr *)&info->data_addr,
- sizeof(struct sockaddr)) < 0)
- {
- syslog(LOG_ERR, "ftpd: Error connecting to data socket.");
- return;
- }
-
- if ((dirp = opendir(fname)) == NULL)
- {
- sprintf(dirline, "%s: No such file or directory.%s\n",
- fname, (info->xfer_mode==TYPE_A)?("\r"):(""));
- send(s, dirline, strlen(dirline), 0);
- close(s);
- rtems_ftpd_send_reply(226, "Transfer complete.");
- return;
- }
- while ((dp = readdir(dirp)) != NULL)
- {
- if (stat(dp->d_name, &stat_buf) == 0)
- {
- sprintf(dirline, "%c%c%c%c%c%c%c%c%c%c %5d %5d %11d %s%s\n",
- (S_ISLNK(stat_buf.st_mode)?('l'):
- (S_ISDIR(stat_buf.st_mode)?('d'):('-'))),
- (stat_buf.st_mode & S_IRUSR)?('r'):('-'),
- (stat_buf.st_mode & S_IWUSR)?('w'):('-'),
- (stat_buf.st_mode & S_IXUSR)?('x'):('-'),
- (stat_buf.st_mode & S_IRGRP)?('r'):('-'),
- (stat_buf.st_mode & S_IWGRP)?('w'):('-'),
- (stat_buf.st_mode & S_IXGRP)?('x'):('-'),
- (stat_buf.st_mode & S_IROTH)?('r'):('-'),
- (stat_buf.st_mode & S_IWOTH)?('w'):('-'),
- (stat_buf.st_mode & S_IXOTH)?('x'):('-'),
- (int)stat_buf.st_uid,
- (int)stat_buf.st_gid,
- (int)stat_buf.st_size,
- dp->d_name,
- (info->xfer_mode==TYPE_A)?("\r"):(""));
- send(s, dirline, strlen(dirline), 0);
- }
- }
- closedir(dirp);
-
- close(s);
- rtems_ftpd_send_reply(226, "Transfer complete.");
-}
-
-
-/*
- * Cheesy way to change directories
- */
-static void
-rtems_ftpd_CWD(char *dir)
-{
- rtems_status_code sc;
- FTPD_SessionInfo_t *info = NULL;
-
-
- sc = rtems_task_get_note(RTEMS_SELF, RTEMS_NOTEPAD_0,
- (rtems_unsigned32 *)&info);
-
- if (chdir(dir) == 0)
- {
- rtems_ftpd_send_reply(250, "CWD command successful.");
- }
- else
- {
- rtems_ftpd_send_reply(550, "CWD command failed.");
- }
-}
-
-
-/**************************************************************************
- * Function: rtems_ftpd_command_port *
- **************************************************************************
- * Description: *
- * *
- * This procedure opens up a data port given the IP address of the *
- * remote machine and the port on the remote machine. This connection *
- * will then be used to transfer data between the hosts. *
- * *
- * *
- * Inputs: *
- * *
- * char *bufr - Arguments to the "PORT" command. *
- * *
- * *
- * Output: *
- * *
- * none *
- * *
- **************************************************************************
- * Change History: *
- * 12/01/97 - Creation (JWJ) *
- *************************************************************************/
-static void
-rtems_ftpd_command_port(char *bufr)
-{
- char *ip;
- char *port;
- int ip0, ip1, ip2, ip3, port0, port1;
- rtems_status_code sc;
- FTPD_SessionInfo_t *info = NULL;
-
-
- sc = rtems_task_get_note(RTEMS_SELF, RTEMS_NOTEPAD_0,
- (rtems_unsigned32 *)&info);
-
- sscanf(bufr, "%d,%d,%d,%d,%d,%d", &ip0, &ip1, &ip2, &ip3, &port0, &port1);
- ip = (char *)&(info->data_addr.sin_addr);
- ip[0] = ip0 & 0xff;
- ip[1] = ip1 & 0xff;
- ip[2] = ip2 & 0xff;
- ip[3] = ip3 & 0xff;
- port = (char *)&(info->data_addr.sin_port);
- port[0] = port0 & 0xff;
- port[1] = port1 & 0xff;
- info->data_addr.sin_family = AF_INET;
-}
-
-
-/**************************************************************************
- * Function: rtems_ftpd_parse_command *
- **************************************************************************
- * Description: *
- * *
- * Here, we parse the commands that have come through the control *
- * connection. *
- * *
- * FIXME: This section is somewhat of a hack. We should have a better *
- * way to parse commands. *
- * *
- * Inputs: *
- * *
- * char *bufr - Pointer to the buffer which contains the command *
- * text. *
- * *
- * Output: *
- * *
- * none *
- * *
- **************************************************************************
- * Change History: *
- * 12/01/97 - Creation (JWJ) *
- *************************************************************************/
-static void
-rtems_ftpd_parse_command(char *bufr)
-{
- char fname[255];
- rtems_status_code sc;
- FTPD_SessionInfo_t *info = NULL;
-
-
- sc = rtems_task_get_note(RTEMS_SELF, RTEMS_NOTEPAD_0,
- (rtems_unsigned32 *)&info);
-
- if (!strncmp("PORT", bufr, 4))
- {
- rtems_ftpd_send_reply(200, "PORT command successful.");
- rtems_ftpd_command_port(&bufr[5]);
- }
- else if (!strncmp("RETR", bufr, 4))
- {
- sscanf(&bufr[5], "%254s", fname);
- rtems_ftpd_command_retrieve(fname);
- }
- else if (!strncmp("STOR", bufr, 4))
- {
- sscanf(&bufr[5], "%254s", fname);
- rtems_ftpd_command_store(fname);
- }
- else if (!strncmp("LIST", bufr, 4))
- {
- if (bufr[5] == '\n')
- {
- rtems_ftpd_command_list(".");
- }
- else
- {
- sscanf(&bufr[5], "%254s", fname);
- rtems_ftpd_command_list(fname);
- }
- }
- else if (!strncmp("USER", bufr, 4))
- {
- rtems_ftpd_send_reply(230, "User logged in.");
- }
- else if (!strncmp("SYST", bufr, 4))
- {
- rtems_ftpd_send_reply(240, "RTEMS");
- }
- else if (!strncmp("TYPE", bufr, 4))
- {
- if (bufr[5] == 'I')
- {
- info->xfer_mode = TYPE_I;
- rtems_ftpd_send_reply(200, "Type set to I.");
- }
- else if (bufr[5] == 'A')
- {
- info->xfer_mode = TYPE_A;
- rtems_ftpd_send_reply(200, "Type set to A.");
- }
- else
- {
- info->xfer_mode = TYPE_I;
- rtems_ftpd_send_reply(504, "Type not implemented. Set to I.");
- }
- }
- else if (!strncmp("PASS", bufr, 4))
- {
- rtems_ftpd_send_reply(230, "User logged in.");
- }
- else if (!strncmp("DELE", bufr, 4))
- {
- sscanf(&bufr[4], "%254s", fname);
- if (unlink(fname) == 0)
- {
- rtems_ftpd_send_reply(257, "DELE successful.");
- }
- else
- {
- rtems_ftpd_send_reply(550, "DELE failed.");
- }
- }
- else if (!strncmp("SITE CHMOD", bufr, 10))
- {
- int mask;
-
- sscanf(&bufr[11], "%o %254s", &mask, fname);
- if (chmod(fname, (mode_t)mask) == 0)
- {
- rtems_ftpd_send_reply(257, "CHMOD successful.");
- }
- else
- {
- rtems_ftpd_send_reply(550, "CHMOD failed.");
- }
- }
- else if (!strncmp("RMD", bufr, 3))
- {
- sscanf(&bufr[4], "%254s", fname);
- if (rmdir(fname) == 0)
- {
- rtems_ftpd_send_reply(257, "RMD successful.");
- }
- else
- {
- rtems_ftpd_send_reply(550, "RMD failed.");
- }
- }
- else if (!strncmp("MKD", bufr, 3))
- {
- sscanf(&bufr[4], "%254s", fname);
- if (mkdir(fname, S_IRWXU | S_IRWXG | S_IRWXO) == 0)
- {
- rtems_ftpd_send_reply(257, "MKD successful.");
- }
- else
- {
- rtems_ftpd_send_reply(550, "MKD failed.");
- }
- }
- else if (!strncmp("CWD", bufr, 3))
- {
- sscanf(&bufr[4], "%254s", fname);
- rtems_ftpd_CWD(fname);
- }
- else if (!strncmp("PWD", bufr, 3))
- {
- char *cwd = getcwd(0, 0);
- sprintf(bufr, "\"%s\" is the current directory.", cwd);
- rtems_ftpd_send_reply(250, bufr);
- free(cwd);
- }
- else
- {
- rtems_ftpd_send_reply(500, "Unrecognized/unsupported command.");
- }
-}
-
-
-/**************************************************************************
- * Function: rtems_ftpd_session *
- **************************************************************************
- * Description: *
- * *
- * This task is started when the FTP daemon gets a service request *
- * from a remote machine. Here, we watch for commands that will *
- * come through the "control" connection. These commands are then *
- * parsed and executed until the connection is closed, either *
- * unintentionally or intentionally with the "QUIT" command. *
- * *
- * *
- * Inputs: *
- * *
- * rtems_task_argument arg - The daemon task passes the socket *
- * which serves as the control connection. *
- * *
- * Output: *
- * *
- * none *
- * *
- **************************************************************************
- * Change History: *
- * 12/01/97 - Creation (JWJ) *
- *************************************************************************/
-static void
-rtems_ftpd_session(rtems_task_argument arg)
-{
- char cmd[256];
- rtems_status_code sc;
- FTPD_SessionInfo_t *info = NULL;
-
-
- sc = rtems_task_get_note(RTEMS_SELF, RTEMS_NOTEPAD_0,
- (rtems_unsigned32 *)&info);
-
- rtems_ftpd_send_reply(220, FTPD_SERVER_MESSAGE);
-
- /***********************************************************************
- * Set initial directory to "/".
- **********************************************************************/
- strcpy(info->cwd, "/");
- info->xfer_mode = TYPE_A;
- while (1)
- {
- if (fgets(cmd, 256, info->ctrl_fp) == NULL)
- {
- syslog(LOG_INFO, "ftpd: Connection aborted.");
- break;
- }
-
- if (!strncmp("QUIT", cmd, 4))
- {
- rtems_ftpd_send_reply(221, "Goodbye.");
- break;
- }
- else
- {
- rtems_ftpd_parse_command(cmd);
- }
- }
-
- if (fclose(info->ctrl_fp) != 0)
- {
- syslog(LOG_ERR, "ftpd: Could not close session.");
- }
-
-
- /* Least we can do is put the CWD back to /. */
- chdir("/");
-
- /***********************************************************************
- * Free up the allocated SessionInfo struct and exit.
- **********************************************************************/
- free(info);
- sc = rtems_task_delete(RTEMS_SELF);
- syslog(LOG_ERR, "ftpd: Task deletion failed: %s",
- rtems_status_text(sc));
-}
-
-
-/**************************************************************************
- * Function: rtems_ftpd_daemon *
- **************************************************************************
- * Description: *
- * *
- * This task runs in the background forever. It waits for service *
- * requests on the FTP port (port 21). When a request is received, *
- * it opens a new session to handle those requests until the *
- * connection is closed. *
- * *
- * *
- * Inputs: *
- * *
- * none *
- * *
- * Output: *
- * *
- * none *
- * *
- **************************************************************************
- * Change History: *
- * 12/01/97 - Creation (JWJ) *
- *************************************************************************/
-static void
-rtems_ftpd_daemon()
-{
- int s;
- int s1;
- int addrLen;
- struct sockaddr_in remoteAddr;
- struct sockaddr_in localAddr;
- char sessionID;
- rtems_task_priority priority;
- rtems_status_code sc;
- rtems_id tid;
- FTPD_SessionInfo_t *info = NULL;
-
-
- sessionID = 'a';
-
- s = socket(AF_INET, SOCK_STREAM, 0);
- if (s < 0)
- {
- perror("Creating socket");
- }
-
- localAddr.sin_family = AF_INET;
- localAddr.sin_port = htons(rtems_ftpd_configuration.port);
- localAddr.sin_addr.s_addr = INADDR_ANY;
- memset(localAddr.sin_zero, '\0', sizeof(localAddr.sin_zero));
- if (bind(s, (struct sockaddr *)&localAddr,
- sizeof(localAddr)) < 0)
- {
- perror("Binding control socket");
- }
-
- if (listen(s, 2) < 0)
- {
- perror("Listening on control socket");
- }
-
- while (1)
- {
- /********************************************************************
- * Allocate a SessionInfo structure for the session task.
- *******************************************************************/
- info = (FTPD_SessionInfo_t *)malloc(sizeof(FTPD_SessionInfo_t));
- if (info == NULL)
- {
- syslog(LOG_ERR, "ftpd: Could not allocate session info struct.");
- rtems_panic("Malloc fail.");
- }
-
- /********************************************************************
- * Accept on the socket and start the session task.
- *******************************************************************/
- addrLen = sizeof(remoteAddr);
- s1 = accept(s, (struct sockaddr *)&remoteAddr, &addrLen);
- if (s1 < 0)
- {
- perror("Accepting control connection");
- }
-
- rtems_task_set_priority(RTEMS_SELF, RTEMS_CURRENT_PRIORITY, &priority);
- sc = rtems_task_create(rtems_build_name('F', 'T', 'P', sessionID),
- priority, 8*1024,
- RTEMS_PREEMPT | RTEMS_NO_TIMESLICE |
- RTEMS_NO_ASR | RTEMS_INTERRUPT_LEVEL(0),
- RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
- &tid);
- if (sc != RTEMS_SUCCESSFUL)
- {
- syslog(LOG_ERR, "ftpd: Could not create FTPD session: %s",
- rtems_status_text(sc));
- }
-
- if (sessionID == 'z')
- {
- sessionID = 'a';
- }
- else
- {
- sessionID++;
- }
-
- /********************************************************************
- * Send the socket on to the new session.
- *******************************************************************/
- if ((info->ctrl_fp = fdopen(s1, "r+")) == NULL)
- {
- syslog(LOG_ERR, "ftpd: fdopen() on socket failed.");
- close(s1);
- }
- else
- {
- sc = rtems_task_set_note(tid, RTEMS_NOTEPAD_0,
- (rtems_unsigned32)info);
- sc = rtems_task_start(tid, rtems_ftpd_session, 0);
- if (sc != RTEMS_SUCCESSFUL)
- {
- syslog(LOG_ERR, "ftpd: Could not start FTPD session: %s",
- rtems_status_text(sc));
- }
- }
- }
-}
-
-
-/**************************************************************************
- * Function: rtems_ftpd_start *
- **************************************************************************
- * Description: *
- * *
- * Here, we start the FTPD task which waits for FTP requests and *
- * services them. This procedure returns to its caller once the *
- * task is started. *
- * *
- * *
- * Inputs: *
- * *
- * rtems_task_priority priority - Priority to assign to this task. *
- * *
- * Output: *
- * *
- * int - RTEMS_SUCCESSFUL on successful start of the daemon. *
- * *
- **************************************************************************
- * Change History: *
- * 12/01/97 - Creation (JWJ) *
- *************************************************************************/
-int
-rtems_initialize_ftpd()
-{
- rtems_status_code sc;
- rtems_id tid;
-
-
- if (rtems_ftpd_configuration.port == 0)
- {
- rtems_ftpd_configuration.port = FTPD_CONTROL_PORT;
- }
-
- /***********************************************************************
- * Default FTPD priority.
- **********************************************************************/
- if (rtems_ftpd_configuration.priority == 0)
- {
- rtems_ftpd_configuration.priority = 40;
- }
- sc = rtems_task_create(rtems_build_name('F', 'T', 'P', 'D'),
- rtems_ftpd_configuration.priority, 8*1024,
- RTEMS_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR |
- RTEMS_INTERRUPT_LEVEL(0),
- RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
- &tid);
- if (sc != RTEMS_SUCCESSFUL)
- {
- syslog(LOG_ERR, "ftpd: Could not create FTP daemon: %s",
- rtems_status_text(sc));
- return(RTEMS_UNSATISFIED);
- }
-
- sc = rtems_task_start(tid, rtems_ftpd_daemon, 0);
- if (sc != RTEMS_SUCCESSFUL)
- {
- syslog(LOG_ERR, "ftpd: Could not start FTP daemon: %s",
- rtems_status_text(sc));
- return(RTEMS_UNSATISFIED);
- }
-
- syslog(LOG_INFO, "ftpd: FTP daemon started.");
- return(RTEMS_SUCCESSFUL);
-}
-
diff --git a/cpukit/ftpd/ftpd.h b/cpukit/ftpd/ftpd.h
deleted file mode 100644
index 6daaaf4d51..0000000000
--- a/cpukit/ftpd/ftpd.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * FTP Server Information
- *
- * $Id$
- */
-
-#ifndef __FTPD_H__
-#define __FTPD_H__
-
-
-#define FTPD_CONTROL_PORT 21
-
-typedef int (*rtems_ftpd_hookfunction)(unsigned char *, unsigned long);
-
-struct rtems_ftpd_hook
-{
- char *filename;
- rtems_ftpd_hookfunction hook_function;
-};
-
-struct rtems_ftpd_configuration
-{
- rtems_task_priority priority; /* FTPD task priority */
- unsigned long max_hook_filesize; /* Maximum buffersize */
- /* for hooks */
- int port; /* Well-known port */
- struct rtems_ftpd_hook *hooks; /* List of hooks */
-};
-
-/*
- * Reply codes.
- */
-#define PRELIM 1 /* positive preliminary */
-#define COMPLETE 2 /* positive completion */
-#define CONTINUE 3 /* positive intermediate */
-#define TRANSIENT 4 /* transient negative completion */
-#define ERROR 5 /* permanent negative completion */
-
-int rtems_initialize_ftpd();
-
-#endif /* __FTPD_H__ */
-
diff --git a/cpukit/httpd/Makefile.am b/cpukit/httpd/Makefile.am
deleted file mode 100644
index 3dae7f9676..0000000000
--- a/cpukit/httpd/Makefile.am
+++ /dev/null
@@ -1,41 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-LIBNAME = lib.a
-LIB = $(ARCH)/$(LIBNAME)
-
-C_FILES = asp.c balloc.c wbase64.c default.c ejlex.c ejparse.c form.c h.c \
- handler.c mime.c misc.c webpage.c ringq.c rom.c security.c socket.c \
- sym.c uemf.c url.c value.c webcomp.c webrom.c webs.c websuemf.c \
- webmain.c
-C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
-
-OBJS = $(C_O_FILES)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../automake/lib.am
-
-#
-# Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -DWEBS -DUEMF -DOS="RTEMS"
-
-$(LIB): $(OBJS)
- $(make-library)
-
-if HAS_POSIX
-all-local: $(ARCH) $(OBJS) $(LIB)
-endif
-
-.PRECIOUS: $(LIB)
-
-EXTRA_DIST = asp.c balloc.c default.c ej.h ejlex.c ejparse.c form.c h.c \
- handler.c mime.c misc.c ringq.c rom.c rtems_webserver.h security.c \
- socket.c sym.c uemf.c uemf.h url.c value.c wbase64.c webcomp.c webmain.c \
- webpage.c webrom.c webs.c webs.h websuemf.c wsIntrn.h
-
-include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/httpd/asp.c b/cpukit/httpd/asp.c
deleted file mode 100644
index 4611a8f422..0000000000
--- a/cpukit/httpd/asp.c
+++ /dev/null
@@ -1,313 +0,0 @@
-/*
- * asp.c -- Active Server Page Support
- *
- * Copyright (c) Go Ahead Software Inc., 1995-1999. All Rights Reserved.
- *
- * See the file "license.txt" for usage and redistribution license requirements
- */
-
-/******************************** Description *********************************/
-
-/*
- * The ASP module processes ASP pages and executes embedded scripts. It
- * support an open scripting architecture with in-built support for
- * Ejscript(TM).
- */
-
-/********************************* Includes ***********************************/
-
-#include "wsIntrn.h"
-
-/********************************** Locals ************************************/
-
-static sym_fd_t websAspFunctions = -1; /* Symbol table of functions */
-
-/***************************** Forward Declarations ***************************/
-
-static char_t *strtokcmp(char_t* s1, char_t* s2);
-static char_t *skipWhite(char_t *s);
-
-/************************************* Code ***********************************/
-/*
- * Create script spaces and commands
- */
-
-int websAspOpen()
-{
-/*
- * Create the table for ASP functions
- */
- websAspFunctions = symOpen(128);
-
-/*
- * Create standard ASP commands
- */
- websAspDefine(T("write"), websAspWrite);
- return 0;
-}
-
-/************************************* Code ***********************************/
-/*
- * Close Asp symbol table.
- */
-
-void websAspClose()
-{
- if (websAspFunctions != -1) {
- symClose(websAspFunctions, NULL);
- }
-}
-
-/******************************************************************************/
-/*
- * Process ASP requests and expand all scripting commands. We read the
- * entire ASP page into memory and then process. If you have really big
- * documents, it is better to make them plain HTML files rather than ASPs.
- */
-
-int websAspRequest(webs_t wp, char_t* lpath)
-{
- websStatType sbuf;
- char *rbuf;
- char_t *token, *lang, *result, *path, *ep, *cp, *buf, *nextp;
- char_t *last;
- int rc, engine, len, ejid;
-
- a_assert(websValid(wp));
- a_assert(lpath && *lpath);
-
- rc = -1;
- buf = NULL;
- rbuf = NULL;
- engine = EMF_SCRIPT_EJSCRIPT;
- wp->flags |= WEBS_HEADER_DONE;
- path = websGetRequestPath(wp);
-
-/*
- * Create Ejscript instance incase it is needed
- */
- ejid = ejOpenEngine(wp->cgiVars, websAspFunctions);
- if (ejid < 0) {
- websError(wp, 200, T("Can't create Ejscript engine"));
- goto done;
- }
- ejSetUserHandle(ejid, (int) wp);
-
- if (websPageStat(wp, lpath, path, &sbuf) < 0) {
- websError(wp, 200, T("Can't stat %s"), lpath);
- goto done;
- }
-
-/*
- * Create a buffer to hold the ASP file in-memory
- */
- len = sbuf.size * sizeof(char);
- if ((rbuf = balloc(B_L, len + 1)) == NULL) {
- websError(wp, 200, T("Can't get memory"));
- goto done;
- }
- rbuf[len] = '\0';
-
- if (websPageReadData(wp, rbuf, len) != len) {
- websError(wp, 200, T("Cant read %s"), lpath);
- goto done;
- }
- websCloseFileHandle(wp);
-
-/*
- * Convert to UNICODE if necessary.
- */
- if ((buf = ballocAscToUni(rbuf)) == NULL) {
- websError(wp, 200, T("Can't get memory"));
- goto done;
- }
-
-/*
- * Scan for the next "<%"
- */
- last = buf;
- rc = 0;
- while (rc == 0 && *last && ((nextp = gstrstr(last, T("<%"))) != NULL)) {
- websWriteBlock(wp, last, (nextp - last));
- nextp = skipWhite(nextp + 2);
-
-/*
- * Decode the language
- */
- token = T("language");
-
- if ((lang = strtokcmp(nextp, token)) != NULL) {
- if ((cp = strtokcmp(lang, T("=javascript"))) != NULL) {
- engine = EMF_SCRIPT_EJSCRIPT;
- } else {
- cp = nextp;
- }
- nextp = cp;
- }
-
-/*
- * Find tailing bracket and then evaluate the script
- */
- if ((ep = gstrstr(nextp, T("%>"))) != NULL) {
-
- *ep = '\0';
- last = ep + 2;
- nextp = skipWhite(nextp);
-/*
- * Handle backquoted newlines
- */
- for (cp = nextp; *cp; ) {
- if (*cp == '\\' && (cp[1] == '\r' || cp[1] == '\n')) {
- *cp++ = ' ';
- while (*cp == '\r' || *cp == '\n') {
- *cp++ = ' ';
- }
- } else {
- cp++;
- }
- }
-
-/*
- * Now call the relevant script engine. Output is done directly
- * by the ASP script procedure by calling websWrite()
- */
- if (*nextp) {
- result = NULL;
- if (engine == EMF_SCRIPT_EJSCRIPT) {
- rc = scriptEval(engine, nextp, &result, ejid);
- } else {
- rc = scriptEval(engine, nextp, &result, (int) wp);
- }
- if (rc < 0) {
-/*
- * On an error, discard all output accumulated so far
- * and store the error in the result buffer. Be careful if the
- * user has called websError() already.
- */
- if (websValid(wp)) {
- if (result) {
- websWrite(wp, T("<h2><b>ASP Error: %s</b></h2>\n"),
- result);
- websWrite(wp, T("<pre>%s</pre>"), nextp);
- bfree(B_L, result);
- } else {
- websWrite(wp, T("<h2><b>ASP Error</b></h2>\n%s\n"),
- nextp);
- }
- websWrite(wp, T("</body></html>\n"));
- rc = 0;
- }
- goto done;
- }
- }
-
- } else {
- websError(wp, 200, T("Unterminated script in %s: \n"), lpath);
- rc = -1;
- goto done;
- }
- }
-/*
- * Output any trailing HTML page text
- */
- if (last && *last && rc == 0) {
- websWriteBlock(wp, last, gstrlen(last));
- }
- rc = 0;
-
-/*
- * Common exit and cleanup
- */
-done:
- if (websValid(wp)) {
- websCloseFileHandle(wp);
- if (ejid >= 0) {
- ejCloseEngine(ejid);
- }
- }
- bfreeSafe(B_L, buf);
- bfreeSafe(B_L, rbuf);
- return rc;
-}
-
-/******************************************************************************/
-/*
- * Define an ASP Ejscript function. Bind an ASP name to a C procedure.
- */
-
-int websAspDefine(char_t *name,
- int (*fn)(int ejid, webs_t wp, int argc, char_t **argv))
-{
- return ejSetGlobalFunctionDirect(websAspFunctions, name,
- (int (*)(int, void*, int, char_t**)) fn);
-}
-
-/******************************************************************************/
-/*
- * Asp write command. This implemements <% write("text"); %> command
- */
-
-int websAspWrite(int ejid, webs_t wp, int argc, char_t **argv)
-{
- int i;
-
- a_assert(websValid(wp));
- a_assert(argv);
-
- for (i = 0; i < argc; ) {
- if (websWriteBlock(wp, argv[i], gstrlen(argv[i])) < 0) {
- return -1;
- }
- if (++i < argc) {
- if (websWriteBlock(wp, T(" "), 2) < 0) {
- return -1;
- }
- }
- }
- return 0;
-}
-
-/******************************************************************************/
-/*
- * strtokcmp -- Find s2 in s1. We skip leading white space in s1.
- * Return a pointer to the location in s1 after s2 ends.
- */
-
-static char_t* strtokcmp(char_t* s1, char_t* s2)
-{
- int len;
-
- s1 = skipWhite(s1);
- len = gstrlen(s2);
- for (len = gstrlen(s2); len > 0 && (tolower(*s1) == tolower(*s2)); len--) {
- if (*s2 == '\0') {
- return s1;
- }
- s1++;
- s2++;
- }
- if (len == 0) {
- return s1;
- }
- return NULL;
-}
-
-/******************************************************************************/
-/*
- * Skip white space
- */
-
-static char_t *skipWhite(char_t *s)
-{
- a_assert(s);
-
- if (s == NULL) {
- return s;
- }
- while (*s && gisspace(*s)) {
- s++;
- }
- return s;
-}
-
-/******************************************************************************/ \ No newline at end of file
diff --git a/cpukit/httpd/balloc.c b/cpukit/httpd/balloc.c
deleted file mode 100644
index 20612ed148..0000000000
--- a/cpukit/httpd/balloc.c
+++ /dev/null
@@ -1,836 +0,0 @@
-/*
- * balloc.c -- Block allocation module
- *
- * Copyright (c) GoAhead Software Inc., 1995-1999. All Rights Reserved.
- *
- * See the file "license.txt" for usage and redistribution license requirements
- */
-
-/******************************** Description *********************************/
-
-/*
- * This module implements a very fast block allocation scheme suitable for
- * ROMed environments. It maintains block class queues for rapid allocation
- * and minimal fragmentation. This modules does not coalesce blocks. The
- * storage space may be populated statically or via the traditional malloc
- * mechanisms. Large blocks greater than the maximum class size may be
- * allocated from the O/S or run-time system via malloc. To permit the use
- * of malloc, call bopen with flags set to B_USE_MALLOC (this is the default).
- * It is recommended that bopen be called first thing in the application.
- * If it is not, it will be called with default values on the first call to
- * balloc(). Note that this code is not designed for multi-threading purposes
- * and it depends on newly declared variables being initialized to zero.
- */
-
-/********************************* Includes ***********************************/
-
-#define IN_BALLOC
-
-#if UEMF
- #include "uemf.h"
-#else
- #include "basic/basicInternal.h"
-#endif
-
-#include <stdarg.h>
-#include <stdlib.h>
-
-#if !NO_BALLOC
-/********************************* Defines ************************************/
-
-typedef struct {
- union {
- void *next; /* Pointer to next in q */
- int size; /* Actual requested size */
- } u;
- int flags; /* Per block allocation flags */
-} bType;
-
-/*
- * Define B_STATS if you wish to track memory block and stack usage
- */
-#if B_STATS
-/*
- * Optional statistics
- */
-
-typedef struct {
- long alloc; /* Block allocation calls */
- long inuse; /* Blocks in use */
-} bStatsType;
-
-typedef struct {
- char_t file[FNAMESIZE];
- long allocated; /* Bytes currently allocated */
- long count; /* Current block count */
- long allocs; /* Count of alloc attempts */
-} bStatsFileType;
-
-/*
- * This one is very expensive but great stats
- */
-typedef struct {
- void *ptr; /* Pointer to memory */
- bStatsFileType *who; /* Who allocated the memory */
-} bStatsBlkType;
-
-static bStatsType bStats[B_MAX_CLASS]; /* Per class stats */
-static bStatsFileType bStatsFiles[B_MAX_FILES];/* Per file stats */
-static bStatsBlkType bStatsBlks[B_MAX_BLOCKS];/* Per block stats */
-static int bStatsBlksMax; /* Max block entry */
-static int bStatsFilesMax; /* Max file entry */
-static int bStatsMemInUse; /* Memory currently in use */
-static int bStatsMemMax; /* Max memory ever used */
-static void *bStackMin = (void*) -1;/* Miniumum stack position */
-static void *bStackStart; /* Starting stack position */
-static int bStatsMemMalloc; /* Malloced memory */
-#endif /* B_STATS */
-
-
-/********************************** Locals ************************************/
-/*
- * bQhead blocks are created as the original memory allocation is freed up.
- * See bfree.
- */
-static bType *bQhead[B_MAX_CLASS]; /* Per class block q head */
-static char *bFreeBuf; /* Pointer to free memory */
-static char *bFreeNext; /* Pointer to next free mem */
-static int bFreeSize; /* Size of free memory */
-static int bFreeLeft; /* Size of free left for use */
-static int bFlags = B_USE_MALLOC; /* Default to auto-malloc */
-
-/*************************** Forward Declarations *****************************/
-
-#if B_STATS
-static void bStatsAlloc(B_ARGS_DEC, void *ptr, int q, int size);
-static void bStatsFree(B_ARGS_DEC, void *ptr, int q, int size);
-static void bstatsWrite(int handle, char_t *fmt, ...);
-static int bStatsFileSort(const void *cp1, const void *cp2);
-#endif /* B_STATS */
-
-#if B_FILL || B_VERIFY_CAUSES_SEVERE_OVERHEAD
-static void bFillBlock(void *buf, int bufsize);
-#endif
-
-#if B_VERIFY_CAUSES_SEVERE_OVERHEAD
-static void verifyUsedBlock(bType *bp, int q);
-static void verifyFreeBlock(bType *bp, int q);
-static void verifyBallocSpace();
-#endif
-
-/********************************** Code **************************************/
-/*
- * Initialize the balloc module. bopen should be called the very first thing
- * after the application starts and bclose should be called the last thing
- * before exiting. If bopen is not called, it will be called on the first
- * allocation with default values. "buf" points to memory to use of size
- * "bufsize". If buf is NULL, memory is allocated using malloc. flags may
- * be set to B_USE_MALLOC if using malloc is okay. This routine will allocate
- * an initial buffer of size bufsize for use by the application.
- */
-
-int bopen(void *buf, int bufsize, int flags)
-{
- bFlags = flags;
-
- if (buf == NULL) {
- if (bufsize == 0) {
- bufsize = B_DEFAULT_MEM;
- }
- if ((buf = malloc(bufsize)) == NULL) {
- return -1;
- }
-#if B_STATS
- bStatsMemMalloc += bufsize;
-#endif
- } else {
- bFlags |= B_USER_BUF;
- }
-
- bFreeSize = bFreeLeft = bufsize;
- bFreeBuf = bFreeNext = buf;
-#if B_FILL || B_VERIFY_CAUSES_SEVERE_OVERHEAD
- bFillBlock(buf, bufsize);
-#endif
-#if B_STATS
- bStackStart = &buf;
-#endif
-#if B_VERIFY_CAUSES_SEVERE_OVERHEAD
- verifyFreeBlock(buf, bufsize);
-#endif
- return 0;
-}
-
-/******************************************************************************/
-/*
- * Close down the balloc module and free all malloced memory.
- */
-
-void bclose()
-{
-#if B_VERIFY_CAUSES_SEVERE_OVERHEAD
- verifyBallocSpace();
-#endif
- if (! (bFlags & B_USER_BUF)) {
- free(bFreeBuf);
- }
-}
-
-/******************************************************************************/
-/*
- * Allocate a block of the requested size. First check the block
- * queues for a suitable one.
- */
-
-void *balloc(B_ARGS_DEC, int size)
-{
- bType *bp;
- int q, memSize, mask;
-
-/*
- * Call bopen with default values if the application has not yet done so
- */
- if (bFreeBuf == NULL) {
- if (bopen(NULL, B_DEFAULT_MEM , 0) < 0) {
- return NULL;
- }
- }
-#if B_VERIFY_CAUSES_SEVERE_OVERHEAD
- verifyBallocSpace();
-#endif
- if (size < 0) {
- return NULL;
- }
-
-/*
- * Determine the relevant block queue with a block big enough --
- * include room for the block header.
- */
- mask = (size + sizeof(bType)) >> B_SHIFT;
- for (q = 0; mask; mask >>= 1) {
- q++;
- }
-
- a_assert(0 <= q && q <= B_MAX_CLASS);
- memSize = (1 << (B_SHIFT + q));
-
- if (q >= B_MAX_CLASS) {
-/*
- * Size if bigger than the maximum class. Malloc if use has been okayed
- */
- if (bFlags & B_USE_MALLOC) {
-#if B_STATS
- bstats(0, NULL);
-#endif
- bp = (bType*) malloc(memSize);
- if (bp == NULL) {
- trace(0, T("B: malloc failed for %s:%d, size %d\n"),
- B_ARGS, memSize);
- return NULL;
- }
-#if B_STATS
- bStatsMemMalloc += memSize;
-#endif
-#if B_FILL || B_VERIFY_CAUSES_SEVERE_OVERHEAD
- bFillBlock(bp, memSize);
-#endif
-
- } else {
- trace(0, T("B: balloc failed for %s:%d, size %d\n"),
- B_ARGS, memSize);
- return NULL;
- }
- bp->u.size = size;
- bp->flags = B_MALLOCED;
-
- } else if ((bp = bQhead[q]) != NULL) {
-/*
- * Take first block off the relevant q if non-empty
- */
- bQhead[q] = bp->u.next;
-#if B_VERIFY_CAUSES_SEVERE_OVERHEAD
- verifyFreeBlock(bp, q);
-#endif
-#if B_FILL || B_VERIFY_CAUSES_SEVERE_OVERHEAD
- bFillBlock(bp, memSize);
-#endif
- bp->u.size = size;
- bp->flags = 0;
-
- } else {
- if (bFreeLeft > memSize) {
-/*
- * The q was empty, and the free list has spare memory so
- * create a new block out of the primary free block
- */
- bp = (bType*) bFreeNext;
-#if B_VERIFY_CAUSES_SEVERE_OVERHEAD
- verifyFreeBlock(bp, q);
-#endif
- bFreeNext += memSize;
- bFreeLeft -= memSize;
-#if B_FILL || B_VERIFY_CAUSES_SEVERE_OVERHEAD
- bFillBlock(bp, memSize);
-#endif
- bp->u.size = size;
- bp->flags = 0;
-
- } else if (bFlags & B_USE_MALLOC) {
- static int once = 0;
- if (once++ < 20) {
-#if B_STATS
- bstats(0, NULL);
-#endif
- }
-/*
- * Nothing left on the primary free list, so malloc a new block
- */
- if ((bp = (bType*) malloc(memSize)) == NULL) {
- trace(0, T("B: malloc failed for %s:%d size %d\n"),
- B_ARGS, memSize);
- return NULL;
- }
-#if B_STATS
- bStatsMemMalloc += memSize;
-#endif
-#if B_FILL || B_VERIFY_CAUSES_SEVERE_OVERHEAD
- bFillBlock(bp, memSize);
-#endif
- bp->u.size = size;
- bp->flags = B_MALLOCED;
-
- } else {
- trace(0, T("B: alloc failed for %s:%d size %d\n"), B_ARGS, size);
- return NULL;
- }
- }
-
-#if B_STATS
- bStatsAlloc(B_ARGS, bp, q, size);
-#endif
- bp->flags |= B_INTEGRITY;
-
- return (void*) ((char*) bp + sizeof(bType));
-}
-
-/******************************************************************************/
-/*
- * Free a block back to the relevant free q. We don't free back to the O/S
- * or run time system unless the block is greater than the maximum class size.
- * We also do not coalesce blocks.
- */
-
-void bfree(B_ARGS_DEC, void *mp)
-{
- bType *bp;
- int mask, q;
-
-#if B_VERIFY_CAUSES_SEVERE_OVERHEAD
- verifyBallocSpace();
-#endif
- a_assert(mp);
-
- bp = (bType*) ((char*) mp - sizeof(bType));
- a_assert((bp->flags & B_INTEGRITY_MASK) == B_INTEGRITY);
- if ((bp->flags & B_INTEGRITY_MASK) != B_INTEGRITY) {
- return;
- }
-
-/*
- * Determine the relevant block queue
- */
- mask = (bp->u.size + sizeof(bType)) >> B_SHIFT;
- for (q = 0; mask; mask >>= 1) {
- q++;
- }
- a_assert(0 <= q && q <= B_MAX_CLASS);
-
-#if B_VERIFY_CAUSES_SEVERE_OVERHEAD
- verifyUsedBlock(bp,q);
-#endif
- if (bp->flags & B_MALLOCED) {
- free(bp);
- return;
- }
-
-#if B_STATS
- bStatsFree(B_ARGS, bp, q, bp->u.size);
-#endif
-#if B_VERIFY_CAUSES_SEVERE_OVERHEAD
- bFillBlock(bp, 1 << (B_SHIFT + q));
-#endif
-
-/*
- * Simply link onto the head of the relevant q
- */
- bp->u.next = bQhead[q];
- bQhead[q] = bp;
-}
-
-/******************************************************************************/
-/*
- * Safe free
- */
-
-void bfreeSafe(B_ARGS_DEC, void *mp)
-{
- if (mp) {
- bfree(B_ARGS, mp);
- }
-}
-
-/******************************************************************************/
-#if UNICODE
-/*
- * Duplicate a string, allow NULL pointers and then dup an empty string.
- */
-
-char *bstrdupA(B_ARGS_DEC, char *s)
-{
- char *cp;
- int len;
-
- if (s == NULL) {
- s = "";
- }
- len = strlen(s) + 1;
- if (cp = balloc(B_ARGS, len)) {
- strcpy(cp, s);
- }
- return cp;
-}
-
-#endif /* UNICODE */
-/******************************************************************************/
-/*
- * Duplicate an ascii string, allow NULL pointers and then dup an empty string.
- * If UNICODE, bstrdup above works with wide chars, so we need this routine
- * for ascii strings.
- */
-
-char_t *bstrdup(B_ARGS_DEC, char_t *s)
-{
- char_t *cp;
- int len;
-
- if (s == NULL) {
- s = T("");
- }
- len = gstrlen(s) + 1;
- if ((cp = balloc(B_ARGS, len * sizeof(char_t))) != NULL) {
- gstrcpy(cp, s);
- }
- return cp;
-}
-
-/******************************************************************************/
-/*
- * Reallocate a block. Allow NULL pointers and just do a malloc.
- * Note: if the realloc fails, we return NULL and the previous buffer is
- * preserved.
- */
-
-void *brealloc(B_ARGS_DEC, void *mp, int newsize)
-{
- bType* bp;
- void *newbuf;
-
- if (mp == NULL) {
- return balloc(B_ARGS, newsize);
- }
- bp = (bType*) ((char*) mp - sizeof(bType));
- a_assert((bp->flags & B_INTEGRITY_MASK) == B_INTEGRITY);
- if ((newbuf = balloc(B_ARGS, newsize)) != NULL) {
- memcpy(newbuf, mp, bp->u.size);
- bfree(B_ARGS, mp);
- }
- return newbuf;
-}
-
-
-/******************************************************************************/
-#if B_FILL || B_VERIFY_CAUSES_SEVERE_OVERHEAD
-/*
- * Fill the block (useful during development to catch zero fill assumptions)
- */
-
-static void bFillBlock(void *buf, int bufsize)
-{
- memset(buf, B_FILL_CHAR, bufsize);
-}
-#endif
-
-/******************************************************************************/
-#if B_STATS
-/*
- * Statistics. Do output via calling the writefn callback function with
- * "handle" as the output file handle.
- */
-
-void bstats(int handle, void (*writefn)(int handle, char_t *fmt, ...))
-{
- bStatsFileType *fp;
- bType *bp;
- int q, count, mem, total;
- static int recurseProtect = 0;
-
- if (recurseProtect++ > 0) {
- return;
- }
-
- if (writefn == NULL) {
- writefn = bstatsWrite;
- }
-
-/*
- * Print stats for each memory block
- */
- (*writefn)(handle, T("\nMemory Stats\n"));
-
-/*
- * The following tabular format is now used for the output.
- * Q Size Free Bytes Inuse Bytes Allocs
- * dd ddddd ddd ddddd dddd ddddd dddd
- */
- (*writefn)(handle, " Q Size Free Bytes Inuse Bytes Allocs\n");
-
- total = 0;
- for (q = 0; q < B_MAX_CLASS; q++) {
- count = 0;
- for (bp = bQhead[q]; bp; bp = bp->u.next) {
- a_assert((bp->flags & B_INTEGRITY_MASK) == B_INTEGRITY);
- count++;
- }
- mem = count * (1 << (q + B_SHIFT));
- total += mem;
- (*writefn)(handle,
- T("%2d %5d %3d %5d %4d %5d %4d\n"),
- q, 1 << (q + B_SHIFT), count, mem, bStats[q].inuse,
- bStats[q].inuse * (1 << (q + B_SHIFT)), bStats[q].alloc);
- }
-
- (*writefn)(handle, T("\n"));
-
-/*
- * Print summary stats
- */
- (*writefn)(handle, T("Initial free list size %7d\n"), bFreeSize);
- (*writefn)(handle, T("Max memory malloced %7d\n"), bStatsMemMalloc);
- (*writefn)(handle, T("Max memory ever used %7d\n"), bStatsMemMax);
- (*writefn)(handle, T("Memory currently in use %7d\n"), bStatsMemInUse);
- (*writefn)(handle, T("Max blocks allocated %7d\n"), bStatsBlksMax);
- (*writefn)(handle, T("Maximum stack used %7d\n"),
- (int) bStackStart - (int) bStackMin);
-
- (*writefn)(handle, T("Free memory on all queues %7d\n"), total);
- (*writefn)(handle, T("Free list buffer left %7d\n"), bFreeLeft);
- (*writefn)(handle, T("Total free memory %7d\n"), bFreeLeft + total);
-
-/*
- * Print per file allocation stats
- */
- qsort(bStatsFiles, bStatsFilesMax, sizeof(bStatsFileType), bStatsFileSort);
- (*writefn)(handle, T("\nPer File Memory Stats\n"));
- total = 0;
- for (fp = bStatsFiles; fp < &bStatsFiles[bStatsFilesMax]; fp++) {
- if (fp->file[0]) {
- (*writefn)(handle,
- T("%18s, bytes %7d, blocks in use %5d, total allocs %6d\n"),
- fp->file, fp->allocated, fp->count, fp->allocs);
- total += fp->allocated;
- }
- }
- (*writefn)(handle, T("\nTotal allocated %7d\n"), total);
- recurseProtect--;
-}
-
-/******************************************************************************/
-/*
- * File sort function. Used to sort per file stats
- */
-
-static int bStatsFileSort(const void *cp1, const void *cp2)
-{
- bStatsFileType *s1, *s2;
-
- s1 = (bStatsFileType*) cp1;
- s2 = (bStatsFileType*) cp2;
-
- if (s1->allocated < s2->allocated)
- return -1;
- else if (s1->allocated == s2->allocated)
- return 0;
- return 1;
-}
-
-/******************************************************************************/
-/*
- * Default output function. Just send to trace channel.
- */
-
-static void bstatsWrite(int handle, char_t *fmt, ...)
-{
- va_list args;
- char_t *buf;
-
- va_start(args, fmt);
- buf = NULL;
- gvsnprintf(&buf, VALUE_MAX_STRING, fmt, args);
- va_end(args);
- trace(0, buf);
- if (buf) {
- bfree(B_L, buf);
- }
-}
-
-/******************************************************************************/
-/*
- * Accumulate allocation statistics
- */
-
-static void bStatsAlloc(B_ARGS_DEC, void *ptr, int q, int size)
-{
- bStatsFileType *fp;
- bStatsBlkType *bp;
- char_t name[FNAMESIZE + 10];
-
- a_assert(file && *file);
- a_assert(0 <= q && q <= B_MAX_CLASS);
- a_assert(size > 0);
-
- gsprintf(name, T("%s:%d"), B_ARGS);
-
- bStats[q].alloc++;
- bStats[q].inuse++;
- bStatsMemInUse += size;
-
- if (bStatsMemInUse > bStatsMemMax) {
- bStatsMemMax = bStatsMemInUse;
- }
-
-/*
- * Track maximum stack usage. Assumes a stack growth down. Approximate as
- * we only measure this on block allocation.
- */
- if ((void*) &file < bStackMin) {
- bStackMin = (void*) &file;
- }
-
-/*
- * Find the file and adjust the stats for this file
- */
- for (fp = bStatsFiles; fp < &bStatsFiles[bStatsFilesMax]; fp++) {
- if (fp->file[0] == file[0] && gstrcmp(fp->file, name) == 0) {
- fp->allocated += size;
- fp->count++;
- fp->allocs++;
- break;
- }
- }
-
-/*
- * Find the first free slot for this file and add current block size.
- */
- if (fp >= &bStatsFiles[bStatsFilesMax]) {
- for (fp = bStatsFiles; fp < &bStatsFiles[B_MAX_FILES]; fp++) {
- if (fp->file[0] == '\0') {
- gstrncpy(fp->file, name, TSZ(fp->file));
- fp->allocated += size;
- fp->count++;
- fp->allocs++;
- if ((fp - bStatsFiles) >= bStatsFilesMax) {
- bStatsFilesMax = (fp - bStatsFiles) + 1;
- }
- break;
- }
- }
- }
-
-/*
- * Update the per block stats. Allocate a new slot.
- */
- for (bp = bStatsBlks; bp < &bStatsBlks[B_MAX_BLOCKS]; bp++) {
- if (bp->ptr == NULL) {
- bp->ptr = ptr;
- bp->who = fp;
- if ((bp - bStatsBlks) >= bStatsBlksMax) {
- bStatsBlksMax = (bp - bStatsBlks) + 1;
- }
- break;
- }
- }
-}
-
-/******************************************************************************/
-/*
- * Free statistics
- */
-
-static void bStatsFree(B_ARGS_DEC, void *ptr, int q, int size)
-{
- bStatsFileType *fp;
- bStatsBlkType *bp;
- char_t name[FNAMESIZE + 10];
-
- a_assert(file && *file);
- a_assert(0 <= q && q <= B_MAX_CLASS);
- a_assert(size > 0);
-
- bStatsMemInUse -= size;
- bStats[q].inuse--;
-
- gsprintf(name, T("%s:%d"), B_ARGS);
-
-/*
- * Update the per block stats
- */
- for (bp = bStatsBlks; bp < &bStatsBlks[bStatsBlksMax]; bp++) {
- if (bp->ptr == ptr) {
- bp->ptr = NULL;
- fp = bp->who;
- fp->allocated -= size;
- fp->count--;
- return;
- }
- }
- a_assert(0);
-
-}
-
-#else /* not B_STATS */
-/******************************************************************************/
-/*
- * Dummy bstats for external calls that aren't protected by #if B_STATS.
- */
-
-void bstats(int handle, void (*writefn)(int handle, char_t *fmt, ...))
-{
-}
-#endif /* B_STATS */
-
-/******************************************************************************/
-#if B_VERIFY_CAUSES_SEVERE_OVERHEAD
-/*
- * The following routines verify the integrity of the balloc memory space.
- * These functions depend use the B_FILL feature. Corruption is defined
- * as bad integrity flags in allocated blocks or data other than B_FILL_CHAR
- * being found anywhere in the space which is unallocated and that is not a
- * next pointer in the free queues. a_assert is called if any corruption is
- * found. CAUTION: These functions add severe processing overhead and should
- * only be used when searching for a tough corruption problem.
- */
-
-/******************************************************************************/
-/*
- * verifyUsedBlock verifies that a block which was previously allocated is
- * still uncorrupted.
- */
-
-static void verifyUsedBlock(bType *bp, int q)
-{
- int memSize, size;
- char *p;
-
- memSize = (1 << (B_SHIFT + q));
- a_assert((bp->flags & ~B_MALLOCED) == B_INTEGRITY );
- size = bp->u.size;
- for (p = ((char *)bp)+sizeof(bType)+size; p < ((char*)bp)+memSize; p++) {
- a_assert(*p == B_FILL_CHAR);
- }
-}
-
-/******************************************************************************/
-/*
- * verifyFreeBlock verifies that a previously free'd block in one of the queues
- * is still uncorrupted.
- */
-
-static void verifyFreeBlock(bType *bp, int q)
-{
- int memSize;
- char *p;
-
- memSize = (1 << (B_SHIFT + q));
- for (p = ((char *)bp)+sizeof(void*); p < ((char*)bp)+memSize; p++) {
- a_assert(*p == B_FILL_CHAR);
- }
- bp = (bType *)p;
- a_assert((bp->flags & ~B_MALLOCED) == B_INTEGRITY ||
- bp->flags == B_FILL_WORD);
-}
-
-/******************************************************************************/
-/*
- * verifyBallocSpace reads through the entire balloc memory space and
- * verifies that all allocated blocks are uncorrupted and that with the
- * exception of free list next pointers all other unallocated space is
- * filled with B_FILL_CHAR.
- */
-
-static void verifyBallocSpace()
-{
- char *p;
- bType *bp;
-
- p = bFreeBuf;
- while (p < (bFreeBuf + bFreeSize)) {
- bp = (bType *)p;
- if (bp->u.size > 0xFFFFF) {
- p += sizeof(bp->u);
- while (p < (bFreeBuf + bFreeSize) && *p == B_FILL_CHAR) {
- p++;
- }
- } else {
- a_assert(((bp->flags & ~B_MALLOCED) == B_INTEGRITY) ||
- bp->flags == B_FILL_WORD);
- p += (sizeof(bType) + bp->u.size);
- while (p < (bFreeBuf + bFreeSize) && *p == B_FILL_CHAR) {
- p++;
- }
- }
- }
-}
-#endif /* B_VERIFY_CAUSES_SEVERE_OVERHEAD */
-
-/******************************************************************************/
-
-#else /* NO_BALLOC */
-int bopen(void *buf, int bufsize, int flags)
-{
- return 0;
-}
-
-/******************************************************************************/
-
-void bclose()
-{
-}
-
-/******************************************************************************/
-#if UNICODE
-char_t* bstrdupNoBalloc(char_t* s)
-{
- if (s) {
- return wcsdup(s);
- } else {
- return wcsdup(T(""));
- }
-}
-#endif /* UNICODE */
-
-/******************************************************************************/
-char* bstrdupANoBalloc(char* s)
-{
- char* buf;
-
- if (s == NULL) {
- s = "";
- }
- buf = malloc(strlen(s)+1);
- strcpy(buf, s);
- return buf;
-}
-
-#endif /* NO_BALLOC */
-/******************************************************************************/
-
diff --git a/cpukit/httpd/default.c b/cpukit/httpd/default.c
deleted file mode 100644
index c485c22285..0000000000
--- a/cpukit/httpd/default.c
+++ /dev/null
@@ -1,389 +0,0 @@
-/*
- * default.c -- Default URL handler. Includes support for ASP.
- *
- * Copyright (c) Go Ahead Software Inc., 1995-1999. All Rights Reserved.
- *
- * See the file "license.txt" for usage and redistribution license requirements
- */
-
-/******************************** Description *********************************/
-
-/*
- * This module provides default URL handling and Active Server Page support.
- *
- * In many cases we don't check the return code of calls to websWrite as
- * it is easier, smaller and non-fatal to continue even when the requesting
- * browser has gone away.
- */
-
-/********************************* Includes ***********************************/
-
-#include "wsIntrn.h"
-
-/*********************************** Locals ***********************************/
-
-static char_t *websDefaultPage; /* Default page name */
-static char_t *websDefaultDir; /* Default Web page directory */
-
-/**************************** Forward Declarations ****************************/
-
-static void websDefaultWriteEvent(webs_t wp);
-
-/*********************************** Code *************************************/
-/*
- * Process a default URL request. This will validate the URL and handle "../"
- * and will provide support for Active Server Pages. As the handler is the
- * last handler to run, it always indicates that it has handled the URL
- * by returning 1.
- */
-
-int websDefaultHandler(webs_t wp, char_t *urlPrefix, char_t *webDir, int arg,
- char_t *url, char_t *path, char_t* query)
-{
- websStatType sbuf;
- char_t *lpath, *tmp;
- char_t *date;
- int bytes, flags, nchars;
-
- a_assert(websValid(wp));
- a_assert(url && *url);
- a_assert(path && *path);
- a_assert(query);
-
-/*
- * Validate the URL and ensure that ".."s don't give access to unwanted files
- */
- flags = websGetRequestFlags(wp);
-
- if (websValidateUrl(wp, path) < 0) {
- websError(wp, 500, T("Invalid URL %s"), url);
- return 1;
- }
- lpath = websGetRequestLpath(wp);
- nchars = gstrlen(lpath) - 1;
- if (lpath[nchars] == '/' || lpath[nchars] == '\\') {
- lpath[nchars] = '\0';
- }
-
-/*
- * If the file is a directory, redirect using the nominated default page
- */
- if (websPageIsDirectory(lpath)) {
- nchars = gstrlen(path);
- if (path[nchars-1] == '/' || path[nchars-1] == '\\') {
- path[--nchars] = '\0';
- }
- nchars += gstrlen(websDefaultPage) + 2;
- tmp = NULL;
- gsnprintf(&tmp, nchars, T("%s/%s"), path, websDefaultPage);
- websRedirect(wp, tmp);
- bfreeSafe(B_L, tmp);
- return 1;
- }
-
-/*
- * Open the document. Stat for later use.
- */
- if (websPageOpen(wp, lpath, path, SOCKET_RDONLY | SOCKET_BINARY,
- 0666) < 0) {
- websError(wp, 400,
- T("Can't open document <b>%s</b><br>for URL <b>%s</b>"),
- lpath, url);
- return 1;
- }
- if (websPageStat(wp, lpath, path, &sbuf) < 0) {
- websError(wp, 400, T("Can't stat page <b>%s</b><br>for URL <b>%s</b>"),
- lpath, url);
- }
-
-/*
- * If the page has not been modified since the user last received it and it
- * is not dynamically generated each time (ASP), then optimize request by
- * sending a 304 Use local copy response
- */
- websStats.localHits++;
-#if WEBS_IF_MODIFIED_SUPPORT
- if (flags & WEBS_IF_MODIFIED && !(flags & WEBS_ASP)) {
- if (sbuf.mtime <= wp->since) {
- websWrite(wp, T("HTTP/1.0 304 Use local copy\r\n"));
-
- /* by license terms the following line of code must
- * not be modified.
- */
- websWrite(wp, T("Server: GoAhead-Webs\r\n"));
-
- if (flags && WEBS_KEEP_ALIVE) {
- websWrite(wp, T("Connection: keep-alive\r\n"));
- }
- websWrite(wp, T("\r\n"));
- websSetRequestFlags(wp, flags |= WEBS_HEADER_DONE);
- websDone(wp, 304);
- return 1;
- }
- }
-#endif
-
-/*
- * Output the normal HTTP response header
- */
- if ((date = websGetDateString(NULL)) != NULL) {
- websWrite(wp, T("HTTP/1.0 200 OK\r\nDate: %s\r\n"), date);
-
-/*
- * By license terms the following line of code must not be modified.
-*/
- websWrite(wp, T("Server: GoAhead-Webs\r\n"));
- bfree(B_L, date);
- }
- flags |= WEBS_HEADER_DONE;
-
-/*
- * If this is an ASP request, ensure the remote browser doesn't cache it.
- * Send back both HTTP/1.0 and HTTP/1.1 cache control directives
- */
- if (flags & WEBS_ASP) {
- bytes = 0;
- websWrite(wp, T("Pragma: no-cache\r\nCache-Control: no-cache\r\n"));
-
- } else {
- if ((date = websGetDateString(&sbuf)) != NULL) {
- websWrite(wp, T("Last-modified: %s\r\n"), date);
- bfree(B_L, date);
- }
- bytes = sbuf.size;
- }
-
- if (bytes) {
- websWrite(wp, T("Content-length: %d\r\n"), bytes);
- websSetRequestBytes(wp, bytes);
- }
- websWrite(wp, T("Content-type: %s\r\n"), websGetRequestType(wp));
-
- if ((flags & WEBS_KEEP_ALIVE) && !(flags & WEBS_ASP)) {
- websWrite(wp, T("Connection: keep-alive\r\n"));
- }
- websWrite(wp, T("\r\n"));
-
-/*
- * Evaluate ASP requests
- */
- if (flags & WEBS_ASP) {
- if (websAspRequest(wp, lpath) < 0) {
- return 1;
- }
- websDone(wp, 200);
- return 1;
- }
-
-/*
- * All done if the browser did a HEAD request
- */
- if (flags & WEBS_HEAD_REQUEST) {
- websDone(wp, 200);
- return 1;
- }
-/*
- * For normal web documents, return the data via background write
- */
- websSetRequestSocketHandler(wp, SOCKET_WRITABLE, websDefaultWriteEvent);
- return 1;
-}
-
-/******************************************************************************/
-/*
- * Validate the URL path and process ".." path segments. Return -1 if the URL
- * is bad.
- */
-
-int websValidateUrl(webs_t wp, char_t *path)
-{
- char_t *parts[64]; /* Array of ptr's to URL parts */
- char_t *token, *dir, *lpath;
- int i, len, npart;
-
- a_assert(websValid(wp));
- a_assert(path);
-
- dir = websGetRequestDir(wp);
- if (dir == NULL || *dir == '\0') {
- return -1;
- }
-
-/*
- * Copy the string so we don't destroy the original
- */
- path = bstrdup(B_L, path);
- websDecodeUrl(path, path, gstrlen(path));
-
- len = npart = 0;
- parts[0] = NULL;
- token = gstrtok(path, T("/"));
-
-/*
- * Look at each directory segment and process "." and ".." segments
- * Don't allow the browser to pop outside the root web.
- */
- while (token != NULL) {
- if (gstrcmp(token, T("..")) == 0) {
- if (npart > 0) {
- npart--;
- }
-
- } else if (gstrcmp(token, T(".")) != 0) {
- parts[npart] = token;
- len += gstrlen(token) + 1;
- npart++;
- }
- token = gstrtok(NULL, T("/"));
- }
-
-/*
- * Create local path for document. Need extra space all "/" and null.
- */
- if (npart) {
- lpath = balloc(B_L, (gstrlen(dir) + 1 + len + 1) * sizeof(char_t));
- gstrcpy(lpath, dir);
-
- for (i = 0; i < npart; i++) {
- gstrcat(lpath, T("/"));
- gstrcat(lpath, parts[i]);
- }
- websSetRequestLpath(wp, lpath);
- bfree(B_L, path);
- bfree(B_L, lpath);
-
- } else {
- bfree(B_L, path);
- return -1;
- }
- return 0;
-}
-
-/******************************************************************************/
-/*
- * Do output back to the browser in the background. This is a socket
- * write handler.
- */
-
-static void websDefaultWriteEvent(webs_t wp)
-{
- int len, wrote, flags, bytes, written;
- char * buf;
-
- a_assert(websValid(wp));
-
- flags = websGetRequestFlags(wp);
-
- wrote = 0;
- bytes = 0;
- written = websGetRequestWritten(wp);
-
-/*
- * We only do this for non-ASP documents
- */
- if ( !(flags & WEBS_ASP)) {
- bytes = websGetRequestBytes(wp);
-/*
- * Note: websWriteBlock may return less than we wanted. It will return
- * -1 on a socket error
- */
- if ((buf = balloc(B_L, PAGE_READ_BUFSIZE)) == NULL) {
- websError(wp, 200, T("Can't get memory"));
- }
- else {
- while ((len = websPageReadData(wp, buf, PAGE_READ_BUFSIZE)) > 0) {
- if ((wrote = websWriteBlockData(wp, buf, len)) < 0) {
- break;
- }
- written += wrote;
- if (wrote != len) {
- websPageSeek(wp, - (wrote - len));
- break;
- }
- }
-/*
- * Safety. If we are at EOF, we must be done
- */
- if (len == 0) {
- a_assert(written >= bytes);
- written = bytes;
- }
- bfree(B_L, buf);
- }
- }
-
-/*
- * We're done if an error, or all bytes output
- */
- websSetRequestWritten(wp, written);
- if (wrote < 0 || written >= bytes) {
- websDone(wp, 200);
- }
-}
-
-/******************************************************************************/
-/*
- * Closing down. Free resources.
- */
-
-void websDefaultClose()
-{
- if (websDefaultPage) {
- bfree(B_L, websDefaultPage);
- }
- if (websDefaultDir) {
- bfree(B_L, websDefaultDir);
- }
-}
-
-/******************************************************************************/
-/*
- * Get the default page for URL requests ending in "/"
- */
-
-char_t *websGetDefaultPage()
-{
- return websDefaultPage;
-}
-
-/******************************************************************************/
-/*
- * Get the default web directory
- */
-
-char_t *websGetDefaultDir()
-{
- return websDefaultDir;
-}
-
-/******************************************************************************/
-/*
- * Set the default page for URL requests ending in "/"
- */
-
-void websSetDefaultPage(char_t *page)
-{
- a_assert(page && *page);
-
- if (websDefaultPage) {
- bfree(B_L, websDefaultPage);
- }
- websDefaultPage = bstrdup(B_L, page);
-}
-
-/******************************************************************************/
-/*
- * Set the default web directory
- */
-
-void websSetDefaultDir(char_t *dir)
-{
- a_assert(dir && *dir);
- if (websDefaultDir) {
- bfree(B_L, websDefaultDir);
- }
- websDefaultDir = bstrdup(B_L, dir);
-}
-
-/******************************************************************************/
-
diff --git a/cpukit/httpd/ej.h b/cpukit/httpd/ej.h
deleted file mode 100644
index 91eb72a4d2..0000000000
--- a/cpukit/httpd/ej.h
+++ /dev/null
@@ -1,226 +0,0 @@
-/*
- * ej.h -- Ejscript(TM) header
- *
- * Copyright (c) Go Ahead Software, Inc., 1992-1999
- *
- * See the file "license.txt" for information on usage and redistribution
- */
-
-#ifndef _h_EJ
-#define _h_EJ 1
-
-/******************************** Description *********************************/
-
-/*
- * Go Ahead Ejscript(TM) header. This defines the Ejscript API and internal
- * structures.
- */
-
-/********************************* Includes ***********************************/
-
-#include <ctype.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#ifndef CE
- #include <fcntl.h>
-#endif
-
-#if LYNX
- #include <unistd.h>
-#endif
-
-#ifdef QNX4
- #include <dirent.h>
-#endif
-
-#if UEMF
- #include "uemf.h"
-#else
- #include <param.h>
- #include <stat.h>
- #include "basic/basicInternal.h"
- #include "emf/emf.h"
- #include "webs/webs.h"
-#endif
-
-/********************************** Defines ***********************************/
-/*
- * Constants
- */
-#define EJ_INC 110 /* Growth for tags/tokens */
-#define EJ_OFFSET 1 /* hAlloc doesn't like 0 entries */
-#define EJ_MAX_RECURSE 100 /* Sanity for maximum recursion */
-
-/*
- * Ejscript Lexical analyser tokens
- */
-#define TOK_ERR -1 /* Any error */
-#define TOK_LPAREN 1 /* ( */
-#define TOK_RPAREN 2 /* ) */
-#define TOK_IF 3 /* if */
-#define TOK_ELSE 4 /* else */
-#define TOK_LBRACE 5 /* { */
-#define TOK_RBRACE 6 /* } */
-#define TOK_LOGICAL 7 /* ||, &&, ! */
-#define TOK_EXPR 8 /* +, -, /, % */
-#define TOK_SEMI 9 /* ; */
-#define TOK_LITERAL 10 /* literal string */
-#define TOK_FUNCTION 11 /* function name */
-#define TOK_NEWLINE 12 /* newline white space */
-#define TOK_ID 13 /* function name */
-#define TOK_EOF 14 /* End of script */
-#define TOK_COMMA 15 /* Comma */
-#define TOK_VAR 16 /* var */
-#define TOK_ASSIGNMENT 17 /* = */
-#define TOK_FOR 18 /* for */
-#define TOK_INC_DEC 19 /* ++, -- */
-#define TOK_RETURN 20 /* return */
-
-/*
- * Expression operators
- */
-#define EXPR_LESS 1 /* < */
-#define EXPR_LESSEQ 2 /* <= */
-#define EXPR_GREATER 3 /* > */
-#define EXPR_GREATEREQ 4 /* >= */
-#define EXPR_EQ 5 /* == */
-#define EXPR_NOTEQ 6 /* != */
-#define EXPR_PLUS 7 /* + */
-#define EXPR_MINUS 8 /* - */
-#define EXPR_DIV 9 /* / */
-#define EXPR_MOD 10 /* % */
-#define EXPR_LSHIFT 11 /* << */
-#define EXPR_RSHIFT 12 /* >> */
-#define EXPR_MUL 13 /* * */
-#define EXPR_ASSIGNMENT 14 /* = */
-#define EXPR_INC 15 /* ++ */
-#define EXPR_DEC 16 /* -- */
-
-/*
- * Conditional operators
- */
-#define COND_AND 1 /* && */
-#define COND_OR 2 /* || */
-#define COND_NOT 3 /* ! */
-
-/*
- * States
- */
-#define STATE_ERR -1 /* Error state */
-#define STATE_EOF 1 /* End of file */
-#define STATE_COND 2 /* Parsing a "(conditional)" stmt */
-#define STATE_COND_DONE 3
-#define STATE_RELEXP 4 /* Parsing a relational expr */
-#define STATE_RELEXP_DONE 5
-#define STATE_EXPR 6 /* Parsing an expression */
-#define STATE_EXPR_DONE 7
-#define STATE_STMT 8 /* Parsing General statement */
-#define STATE_STMT_DONE 9
-#define STATE_STMT_BLOCK_DONE 10 /* End of block "}" */
-#define STATE_ARG_LIST 11 /* Function arg list */
-#define STATE_ARG_LIST_DONE 12
-#define STATE_DEC_LIST 16 /* Declaration list */
-#define STATE_DEC_LIST_DONE 17
-#define STATE_DEC 18
-#define STATE_DEC_DONE 19
-#define STATE_BEGIN STATE_STMT
-
-/*
- * Flags. Used in ej_t and as parameter to parse()
- */
-#define FLAGS_EXE 0x1 /* Execute statements */
-#define FLAGS_VARIABLES 0x2 /* Allocated variables store */
-#define FLAGS_FUNCTIONS 0x4 /* Allocated function store */
-
-/*
- * Function call structure
- */
-typedef struct {
- char_t *fname; /* Function name */
- char_t **args; /* Args for function (halloc) */
- int nArgs; /* Number of args */
-} ejfunc_t;
-
-/*
- * EJ evaluation block structure
- */
-typedef struct ejEval {
- ringq_t tokbuf; /* Current token */
- ringq_t script; /* Input script for parsing */
- char_t *putBackToken; /* Putback token string */
- int putBackTokenId; /* Putback token ID */
- char_t *line; /* Current line */
- int lineLength; /* Current line length */
- int lineNumber; /* Parse line number */
- int lineColumn; /* Column in line */
-} ejinput_t;
-
-/*
- * Per Ejscript session structure
- */
-typedef struct ej {
- ejinput_t *input; /* Input evaluation block */
- sym_fd_t functions; /* Symbol table for functions */
- sym_fd_t *variables; /* hAlloc list of variables */
- int variableMax; /* Number of entries */
- ejfunc_t *func; /* Current function */
- char_t *result; /* Current expression result */
- char_t *error; /* Error message */
- char_t *token; /* Pointer to token string */
- int tid; /* Current token id */
- int eid; /* Halloc handle */
- int flags; /* Flags */
- int userHandle; /* User defined handle */
-} ej_t;
-
-/******************************** Prototypes **********************************/
-
-extern int ejOpenEngine(sym_fd_t variables, sym_fd_t functions);
-extern void ejCloseEngine(int eid);
-extern int ejOpenBlock(int eid);
-extern int ejCloseBlock(int eid, int vid);
-extern char_t *ejEval(int eid, char_t *script, char_t **emsg);
-extern char_t *ejEvalBlock(int eid, char_t *script, char_t **emsg);
-extern char_t *ejEvalFile(int eid, char_t *path, char_t **emsg);
-extern int ejSetGlobalFunction(int eid, char_t *name,
- int (*fn)(int eid, void *handle, int argc, char_t **argv));
-extern void *ejGetGlobalFunction(int eid, char_t *name);
-extern int ejSetGlobalFunctionDirect(sym_fd_t functions, char_t *name,
- int (*fn)(int eid, void *handle, int argc, char_t **argv));
-extern int ejArgs(int argc, char_t **argv, char_t *fmt, ...);
-extern void ejError(ej_t* ep, char_t* fmt, ...);
-extern void ejSetUserHandle(int eid, int handle);
-extern int ejGetUserHandle(int eid);
-extern int ejGetLineNumber(int eid);
-extern void ejSetResult(int eid, char_t *s);
-extern char_t *ejGetResult(int eid);
-extern void ejSetVar(int eid, char_t *var, char_t *value);
-extern void ejSetLocalVar(int eid, char_t *var, char_t *value);
-extern int ejGetVar(int eid, char_t *var, char_t **value);
-extern void ejSetGlobalVar(int eid, char_t *var, char_t *value);
-
-extern int ejLexOpen(ej_t* ep);
-extern void ejLexClose(ej_t* ep);
-extern int ejLexOpenScript(ej_t* ep, char_t *script);
-extern void ejLexCloseScript(ej_t* ep);
-extern void ejLexSaveInputState(ej_t* ep, ejinput_t* state);
-extern void ejLexFreeInputState(ej_t* ep, ejinput_t* state);
-extern void ejLexRestoreInputState(ej_t* ep, ejinput_t* state);
-extern int ejLexGetToken(ej_t* ep, int state);
-extern void ejLexPutbackToken(ej_t* ep, int tid, char_t *string);
-
-extern sym_fd_t ejGetVariableTable(int eid);
-extern sym_fd_t ejGetFunctionTable(int eid);
-
-extern int ejEmfOpen(int eid);
-extern void ejEmfClose(int eid);
-
-extern int ejEmfDbRead(int eid, void *handle, int argc, char_t **argv);
-extern int ejEmfDbReadKeyed(int eid, void *handle, int argc, char_t **argv);
-extern int ejEmfDbTableGetNrow(int eid, void *handle, int argc, char_t **argv);
-extern int ejEmfTrace(int eid, void *handle, int argc, char_t **argv);
-extern int ejEmfDbWrite(int eid, void *handle, int argc, char_t **argv);
-
-#endif /* _h_EJ */
-
-/*****************************************************************************/
diff --git a/cpukit/httpd/ejlex.c b/cpukit/httpd/ejlex.c
deleted file mode 100644
index 67e1504bd7..0000000000
--- a/cpukit/httpd/ejlex.c
+++ /dev/null
@@ -1,679 +0,0 @@
-/*
- * ejlex.c -- Ejscript(TM) Lexical Analyser
- *
- * Copyright (c) Go Ahead Software, Inc., 1995-1999
- *
- * See the file "license.txt" for usage and redistribution license requirements
- */
-
-/******************************** Description *********************************/
-
-/*
- * Ejscript lexical analyser. This implementes a lexical analyser for a
- * a subset of the JavaScript language.
- */
-
-/********************************** Includes **********************************/
-
-#include "ej.h"
-
-#if UEMF
- #include "uemf.h"
-#else
- #include "basic/basicInternal.h"
-#endif
-
-/****************************** Forward Declarations **************************/
-
-static int getLexicalToken(ej_t* ep, int state);
-static int tokenAddChar(ej_t *ep, int c);
-static int inputGetc(ej_t* ep);
-static void inputPutback(ej_t* ep, int c);
-
-/************************************* Code ***********************************/
-/*
- * Setup the lexical analyser
- */
-
-int ejLexOpen(ej_t* ep)
-{
- return 0;
-}
-
-/******************************************************************************/
-/*
- * Close the lexicial analyser
- */
-
-void ejLexClose(ej_t* ep)
-{
-}
-
-/******************************************************************************/
-/*
- * Open a new input script
- */
-
-int ejLexOpenScript(ej_t* ep, char_t *script)
-{
- ejinput_t *ip;
-
- a_assert(ep);
- a_assert(script);
-
- if ((ep->input = balloc(B_L, sizeof(ejinput_t))) == NULL) {
- return -1;
- }
- ip = ep->input;
- memset(ip, 0, sizeof(*ip));
-
- a_assert(ip);
- a_assert(ip->putBackToken == NULL);
- a_assert(ip->putBackTokenId == 0);
-
-/*
- * Create the parse token buffer and script buffer
- */
- if (ringqOpen(&ip->tokbuf, EJ_INC, -1) < 0) {
- return -1;
- }
- if (ringqOpen(&ip->script, EJ_INC, -1) < 0) {
- return -1;
- }
-/*
- * Put the Ejscript into a ring queue for easy parsing
- */
- ringqPutstr(&ip->script, script);
-
- ip->lineNumber = 1;
- ip->lineLength = 0;
- ip->lineColumn = 0;
- ip->line = NULL;
-
- return 0;
-}
-
-/******************************************************************************/
-/*
- * Close the input script
- */
-
-void ejLexCloseScript(ej_t* ep)
-{
- ejinput_t *ip;
-
- a_assert(ep);
-
- ip = ep->input;
- a_assert(ip);
-
- if (ip->putBackToken) {
- bfree(B_L, ip->putBackToken);
- ip->putBackToken = NULL;
- }
- ip->putBackTokenId = 0;
-
- if (ip->line) {
- bfree(B_L, ip->line);
- ip->line = NULL;
- }
-
- ringqClose(&ip->tokbuf);
- ringqClose(&ip->script);
-
- bfree(B_L, ip);
-}
-
-/******************************************************************************/
-/*
- * Save the input state
- */
-
-void ejLexSaveInputState(ej_t* ep, ejinput_t* state)
-{
- ejinput_t *ip;
-
- a_assert(ep);
-
- ip = ep->input;
- a_assert(ip);
-
- *state = *ip;
- if (ip->putBackToken) {
- state->putBackToken = bstrdup(B_L, ip->putBackToken);
- }
-}
-
-/******************************************************************************/
-/*
- * Restore the input state
- */
-
-void ejLexRestoreInputState(ej_t* ep, ejinput_t* state)
-{
- ejinput_t *ip;
-
- a_assert(ep);
-
- ip = ep->input;
- a_assert(ip);
-
- ip->tokbuf = state->tokbuf;
- ip->script = state->script;
- ip->putBackTokenId = state->putBackTokenId;
- if (ip->putBackToken) {
- bfree(B_L, ip->putBackToken);
- }
- if (state->putBackToken) {
- ip->putBackToken = bstrdup(B_L, state->putBackToken);
- }
-}
-
-/******************************************************************************/
-/*
- * Free a saved input state
- */
-
-void ejLexFreeInputState(ej_t* ep, ejinput_t* state)
-{
- if (state->putBackToken) {
- bfree(B_L, state->putBackToken);
- }
-}
-
-/******************************************************************************/
-/*
- * Get the next Ejscript token
- */
-
-int ejLexGetToken(ej_t* ep, int state)
-{
- ep->tid = getLexicalToken(ep, state);
- trace(7, T("ejGetToken: %d, \"%s\"\n"), ep->tid, ep->token);
- return ep->tid;
-}
-
-/******************************************************************************/
-/*
- * Get the next Ejscript token
- */
-
-static int getLexicalToken(ej_t* ep, int state)
-{
- ringq_t *inq, *tokq;
- ejinput_t* ip;
- int done, tid, c, quote, style, back_quoted, lval, i;
-
- a_assert(ep);
- ip = ep->input;
- a_assert(ip);
-
- inq = &ip->script;
- tokq = &ip->tokbuf;
-
- ep->tid = -1;
- tid = -1;
- ep->token = T("");
-
- ringqFlush(tokq);
-
- if (ip->putBackTokenId > 0) {
- ringqPutstr(tokq, ip->putBackToken);
- tid = ip->putBackTokenId;
- ip->putBackTokenId = 0;
- ep->token = (char_t*) tokq->servp;
- return tid;
- }
-
- if ((c = inputGetc(ep)) < 0) {
- return TOK_EOF;
- }
-
- for (done = 0; !done; ) {
- switch (c) {
- case -1:
- return TOK_EOF;
-
- case ' ':
- case '\t':
- case '\r':
- do {
- if ((c = inputGetc(ep)) < 0)
- break;
- } while (c == ' ' || c == '\t' || c == '\r');
- break;
-
- case '\n':
- return TOK_NEWLINE;
-
- case '(':
- tokenAddChar(ep, c);
- return TOK_LPAREN;
-
- case ')':
- tokenAddChar(ep, c);
- return TOK_RPAREN;
-
- case '{':
- tokenAddChar(ep, c);
- return TOK_LBRACE;
-
- case '}':
- tokenAddChar(ep, c);
- return TOK_RBRACE;
-
- case '+':
- if ((c = inputGetc(ep)) < 0) {
- ejError(ep, T("Syntax Error"));
- return TOK_ERR;
- }
- if (c != '+' ) {
- inputPutback(ep, c);
- tokenAddChar(ep, EXPR_PLUS);
- return TOK_EXPR;
- }
- tokenAddChar(ep, EXPR_INC);
- return TOK_INC_DEC;
-
- case '-':
- if ((c = inputGetc(ep)) < 0) {
- ejError(ep, T("Syntax Error"));
- return TOK_ERR;
- }
- if (c != '-' ) {
- inputPutback(ep, c);
- tokenAddChar(ep, EXPR_MINUS);
- return TOK_EXPR;
- }
- tokenAddChar(ep, EXPR_DEC);
- return TOK_INC_DEC;
-
- case '*':
- tokenAddChar(ep, EXPR_MUL);
- return TOK_EXPR;
-
- case '%':
- tokenAddChar(ep, EXPR_MOD);
- return TOK_EXPR;
-
- case '/':
-/*
- * Handle the division operator and comments
- */
- if ((c = inputGetc(ep)) < 0) {
- ejError(ep, T("Syntax Error"));
- return TOK_ERR;
- }
- if (c != '*' && c != '/') {
- inputPutback(ep, c);
- tokenAddChar(ep, EXPR_DIV);
- return TOK_EXPR;
- }
- style = c;
-/*
- * Eat comments. Both C and C++ comment styles are supported.
- */
- while (1) {
- if ((c = inputGetc(ep)) < 0) {
- ejError(ep, T("Syntax Error"));
- return TOK_ERR;
- }
- if (c == '\n' && style == '/') {
- break;
- } else if (c == '*') {
- c = inputGetc(ep);
- if (style == '/') {
- if (c == '\n') {
- break;
- }
- } else {
- if (c == '/') {
- break;
- }
- }
- }
- }
-/*
- * Continue looking for a token, so get the next character
- */
- if ((c = inputGetc(ep)) < 0) {
- return TOK_EOF;
- }
- break;
-
- case '<': /* < and <= */
- if ((c = inputGetc(ep)) < 0) {
- ejError(ep, T("Syntax Error"));
- return TOK_ERR;
- }
- if (c == '<') {
- tokenAddChar(ep, EXPR_LSHIFT);
- return TOK_EXPR;
- } else if (c == '=') {
- tokenAddChar(ep, EXPR_LESSEQ);
- return TOK_EXPR;
- }
- tokenAddChar(ep, EXPR_LESS);
- inputPutback(ep, c);
- return TOK_EXPR;
-
- case '>': /* > and >= */
- if ((c = inputGetc(ep)) < 0) {
- ejError(ep, T("Syntax Error"));
- return TOK_ERR;
- }
- if (c == '>') {
- tokenAddChar(ep, EXPR_RSHIFT);
- return TOK_EXPR;
- } else if (c == '=') {
- tokenAddChar(ep, EXPR_GREATEREQ);
- return TOK_EXPR;
- }
- tokenAddChar(ep, EXPR_GREATER);
- inputPutback(ep, c);
- return TOK_EXPR;
-
- case '=': /* "==" */
- if ((c = inputGetc(ep)) < 0) {
- ejError(ep, T("Syntax Error"));
- return TOK_ERR;
- }
- if (c == '=') {
- tokenAddChar(ep, EXPR_EQ);
- return TOK_EXPR;
- }
- inputPutback(ep, c);
- return TOK_ASSIGNMENT;
-
- case '!': /* "!=" */
- if ((c = inputGetc(ep)) < 0) {
- ejError(ep, T("Syntax Error"));
- return TOK_ERR;
- }
- if (c == '=') {
- tokenAddChar(ep, EXPR_NOTEQ);
- return TOK_EXPR;
- }
- tokenAddChar(ep, COND_NOT);
- return TOK_LOGICAL;
-
- case ';':
- tokenAddChar(ep, c);
- return TOK_SEMI;
-
- case ',':
- tokenAddChar(ep, c);
- return TOK_COMMA;
-
- case '|': /* "||" */
- if ((c = inputGetc(ep)) < 0 || c != '|') {
- ejError(ep, T("Syntax Error"));
- return TOK_ERR;
- }
- tokenAddChar(ep, COND_OR);
- return TOK_LOGICAL;
-
- case '&': /* "&&" */
- if ((c = inputGetc(ep)) < 0 || c != '&') {
- ejError(ep, T("Syntax Error"));
- return TOK_ERR;
- }
- tokenAddChar(ep, COND_AND);
- return TOK_LOGICAL;
-
- case '\"': /* String quote */
- case '\'':
- quote = c;
- if ((c = inputGetc(ep)) < 0) {
- ejError(ep, T("Syntax Error"));
- return TOK_ERR;
- }
- back_quoted = 0;
- while (c != quote) {
- if (c == '\\' && !back_quoted) {
- back_quoted++;
- } else if (back_quoted) {
- if (gisdigit((char_t) c)) {
- lval = 0;
- for (i = 0; i < 3; i++) {
- if ('0' <= c && c <= '7') {
- break;
- }
- lval = lval * 8 + c;
- if ((c = inputGetc(ep)) < 0) {
- break;
- }
- }
- c = (int) lval;
-
- } else if (back_quoted) {
- switch (c) {
- case 'n':
- c = '\n'; break;
- case 'b':
- c = '\b'; break;
- case 'f':
- c = '\f'; break;
- case 'r':
- c = '\r'; break;
- case 't':
- c = '\t'; break;
- case 'x':
- lval = 0;
- for (i = 0; i < 2; i++) {
- if (! gisxdigit((char_t) c)) {
- break;
- }
- lval = lval * 16 + c;
- if ((c = inputGetc(ep)) < 0) {
- break;
- }
- }
- c = (int) lval;
- break;
- case 'u':
- lval = 0;
- for (i = 0; i < 4; i++) {
- if (! gisxdigit((char_t) c)) {
- break;
- }
- lval = lval * 16 + c;
- if ((c = inputGetc(ep)) < 0) {
- break;
- }
- }
- c = (int) lval;
- break;
- case '\'':
- case '\"':
- break;
- }
- }
- back_quoted = 0;
- if (tokenAddChar(ep, c) < 0) {
- return TOK_ERR;
- }
- } else {
- if (tokenAddChar(ep, c) < 0) {
- return TOK_ERR;
- }
- }
- if ((c = inputGetc(ep)) < 0) {
- ejError(ep, T("Unmatched Quote"));
- return TOK_ERR;
- }
- }
- return TOK_LITERAL;
-
- case '0': case '1': case '2': case '3': case '4':
- case '5': case '6': case '7': case '8': case '9':
- do {
- if (tokenAddChar(ep, c) < 0) {
- return TOK_ERR;
- }
- if ((c = inputGetc(ep)) < 0)
- break;
- } while (gisdigit((char_t) c));
- inputPutback(ep, c);
- return TOK_LITERAL;
-
- default:
-/*
- * Identifiers or a function names
- */
- back_quoted = 0;
- while (1) {
- if (c == '\\' && !back_quoted) {
- back_quoted++;
- } else {
- back_quoted = 0;
- if (tokenAddChar(ep, c) < 0) {
- break;
- }
- }
- if ((c = inputGetc(ep)) < 0) {
- break;
- }
- if (!back_quoted && (!gisalnum((char_t) c) && c != '$' &&
- c != '_')) {
- break;
- }
- }
- if (! gisalpha(*tokq->servp) && *tokq->servp != '$' &&
- *tokq->servp != '_') {
- ejError(ep, T("Invalid identifier %s"), tokq->servp);
- return TOK_ERR;
- }
-/*
- * Check for reserved words (only "if", "else", "var", "for"
- * and "return" at the moment)
- */
- if (state == STATE_STMT) {
- if (gstrcmp(ep->token, T("if")) == 0) {
- return TOK_IF;
- } else if (gstrcmp(ep->token, T("else")) == 0) {
- return TOK_ELSE;
- } else if (gstrcmp(ep->token, T("var")) == 0) {
- return TOK_VAR;
- } else if (gstrcmp(ep->token, T("for")) == 0) {
- return TOK_FOR;
- } else if (gstrcmp(ep->token, T("return")) == 0) {
- return TOK_RETURN;
- }
- }
-
-/*
- * skip white space after token to find out whether this is
- * a function or not.
- */
- while (c == ' ' || c == '\t' || c == '\r' || c == '\n') {
- if ((c = inputGetc(ep)) < 0)
- break;
- }
-
- tid = (c == '(') ? TOK_FUNCTION : TOK_ID;
- done++;
- }
- }
-
-/*
- * Putback the last extra character for next time
- */
- inputPutback(ep, c);
- return tid;
-}
-
-/******************************************************************************/
-/*
- * Putback the last token read
- */
-
-void ejLexPutbackToken(ej_t* ep, int tid, char_t *string)
-{
- ejinput_t* ip;
-
- a_assert(ep);
- ip = ep->input;
- a_assert(ip);
-
- if (ip->putBackToken) {
- bfree(B_L, ip->putBackToken);
- }
- ip->putBackTokenId = tid;
- ip->putBackToken = bstrdup(B_L, string);
-}
-
-/******************************************************************************/
-/*
- * Add a character to the token ringq buffer
- */
-
-static int tokenAddChar(ej_t *ep, int c)
-{
- ejinput_t* ip;
-
- a_assert(ep);
- ip = ep->input;
- a_assert(ip);
-
- if (ringqPutc(&ip->tokbuf, (char_t) c) < 0) {
- ejError(ep, T("Token too big"));
- return -1;
- }
- * ((char_t*) ip->tokbuf.endp) = '\0';
- ep->token = (char_t*) ip->tokbuf.servp;
-
- return 0;
-}
-
-/******************************************************************************/
-/*
- * Get another input character
- */
-
-static int inputGetc(ej_t* ep)
-{
- ejinput_t *ip;
- int c, len;
-
- a_assert(ep);
- ip = ep->input;
-
- if ((len = ringqLen(&ip->script)) == 0) {
- return -1;
- }
-
- c = ringqGetc(&ip->script);
-
- if (c == '\n') {
- ip->lineNumber++;
- ip->lineColumn = 0;
- } else {
- if ((ip->lineColumn + 2) >= ip->lineLength) {
- ip->lineLength += EJ_INC;
- ip->line = brealloc(B_L, ip->line, ip->lineLength * sizeof(char_t));
- }
- ip->line[ip->lineColumn++] = c;
- ip->line[ip->lineColumn] = '\0';
- }
- return c;
-}
-
-/******************************************************************************/
-/*
- * Putback a character onto the input queue
- */
-
-static void inputPutback(ej_t* ep, int c)
-{
- ejinput_t *ip;
-
- a_assert(ep);
-
- ip = ep->input;
- ringqInsertc(&ip->script, (char_t) c);
- ip->lineColumn--;
- ip->line[ip->lineColumn] = '\0';
-}
-
-/******************************************************************************/
diff --git a/cpukit/httpd/ejparse.c b/cpukit/httpd/ejparse.c
deleted file mode 100644
index 1734f6f719..0000000000
--- a/cpukit/httpd/ejparse.c
+++ /dev/null
@@ -1,1665 +0,0 @@
-/*
- * ejparse.c -- Ejscript(TM) Parser
- *
- * Copyright (c) Go Ahead Software, Inc., 1995-1999
- *
- * See the file "license.txt" for usage and redistribution license requirements
- */
-
-/******************************** Description *********************************/
-
-/*
- * Ejscript parser. This implementes a subset of the JavaScript language.
- * Multiple Ejscript parsers can be opened at a time.
- */
-
-/********************************** Includes **********************************/
-
-#include "ej.h"
-
-/********************************** Local Data ********************************/
-
-ej_t **ejHandles; /* List of ej handles */
-int ejMax = -1; /* Maximum size of */
-
-/****************************** Forward Declarations **************************/
-
-static ej_t *ejPtr(int eid);
-static void clearString(char_t **ptr);
-static void setString(char_t **ptr, char_t *s);
-static void appendString(char_t **ptr, char_t *s);
-static void freeVar(sym_t* sp);
-static int parse(ej_t *ep, int state, int flags);
-static int parseStmt(ej_t *ep, int state, int flags);
-static int parseDeclaration(ej_t *ep, int state, int flags);
-static int parseArgs(ej_t *ep, int state, int flags);
-static int parseCond(ej_t *ep, int state, int flags);
-static int parseExpr(ej_t *ep, int state, int flags);
-static int evalExpr(ej_t *ep, char_t *lhs, int rel, char_t *rhs);
-static int evalCond(ej_t *ep, char_t *lhs, int rel, char_t *rhs);
-static int evalFunction(ej_t *ep);
-static void freeFunc(ejfunc_t *func);
-
-/************************************* Code ***********************************/
-/*
- * Initialize a Ejscript engine
- */
-
-int ejOpenEngine(sym_fd_t variables, sym_fd_t functions)
-{
- ej_t *ep;
- int eid, vid;
-
- if ((eid = hAllocEntry((void***) &ejHandles, &ejMax, sizeof(ej_t))) < 0) {
- return -1;
- }
- ep = ejHandles[eid];
- ep->eid = eid;
-
-/*
- * Create a top level symbol table if one is not provided for variables and
- * functions. Variables may create other symbol tables for block level
- * declarations so we use hAlloc to manage a list of variable tables.
- */
- if ((vid = hAlloc((void***) &ep->variables)) < 0) {
- ejMax = hFree((void***) &ejHandles, ep->eid);
- return -1;
- }
- if (vid >= ep->variableMax) {
- ep->variableMax = vid + 1;
- }
-
- if (variables == -1) {
- ep->variables[vid] = symOpen(64) + EJ_OFFSET;
- ep->flags |= FLAGS_VARIABLES;
-
- } else {
- ep->variables[vid] = variables + EJ_OFFSET;
- }
-
- if (functions == -1) {
- ep->functions = symOpen(64);
- ep->flags |= FLAGS_FUNCTIONS;
- } else {
- ep->functions = functions;
- }
-
- ejLexOpen(ep);
-
-/*
- * Define standard constants
- */
- ejSetGlobalVar(ep->eid, T("null"), NULL);
-
-#if EMF
- ejEmfOpen(ep->eid);
-#endif
- return ep->eid;
-}
-
-/******************************************************************************/
-/*
- * Close
- */
-
-void ejCloseEngine(int eid)
-{
- ej_t *ep;
- int i;
-
- if ((ep = ejPtr(eid)) == NULL) {
- return;
- }
-
-#if EMF
- ejEmfClose(eid);
-#endif
-
- bfreeSafe(B_L, ep->error);
- ep->error = NULL;
- bfreeSafe(B_L, ep->result);
- ep->result = NULL;
-
- ejLexClose(ep);
-
- if (ep->flags & FLAGS_VARIABLES) {
- for (i = ep->variableMax - 1; i >= 0; i--) {
- symClose(ep->variables[i] - EJ_OFFSET, freeVar);
- ep->variableMax = hFree((void***) &ep->variables, i);
- }
- }
- if (ep->flags & FLAGS_FUNCTIONS) {
- symClose(ep->functions, freeVar);
- }
-
- ejMax = hFree((void***) &ejHandles, ep->eid);
- bfree(B_L, ep);
-}
-
-/******************************************************************************/
-/*
- * Callback from symClose. Free the variable.
- */
-
-static void freeVar(sym_t* sp)
-{
- valueFree(&sp->content);
-}
-
-/******************************************************************************/
-/*
- * Evaluate a Ejscript file
- */
-
-#if DEV
-char_t *ejEvalFile(int eid, char_t *path, char_t **emsg)
-{
- gstat_t sbuf;
- ej_t *ep;
- char_t *script, *rs;
- char *fileBuf;
- int fd;
-
- a_assert(path && *path);
-
- if (emsg) {
- *emsg = NULL;
- }
- if ((ep = ejPtr(eid)) == NULL) {
- return NULL;
- }
-
- if ((fd = gopen(path, O_RDONLY | O_BINARY, 0666)) < 0) {
- ejError(ep, T("Bad handle %d"), eid);
- return NULL;
- }
- if (gstat(path, &sbuf) < 0) {
- close(fd);
- ejError(ep, T("Cant stat %s"), path);
- return NULL;
- }
- if ((fileBuf = balloc(B_L, sbuf.st_size + 1)) == NULL) {
- close(fd);
- ejError(ep, T("Cant malloc %d"), sbuf.st_size);
- return NULL;
- }
- if (read(fd, fileBuf, sbuf.st_size) != (int)sbuf.st_size) {
- close(fd);
- bfree(B_L, fileBuf);
- ejError(ep, T("Error reading %s"), path);
- return NULL;
- }
- fileBuf[sbuf.st_size] = '\0';
- close(fd);
-
- if ((script = ballocAscToUni(fileBuf)) == NULL) {
- bfree(B_L, fileBuf);
- ejError(ep, T("Cant malloc %d"), sbuf.st_size + 1);
- return NULL;
- }
- bfree(B_L, fileBuf);
-
- rs = ejEvalBlock(eid, script, emsg);
-
- bfree(B_L, script);
- return rs;
-}
-#endif
-
-/******************************************************************************/
-/*
- * Create a new variable scope block so that consecutive ejEval calls may
- * be made with the same varible scope. This space MUST be closed with
- * ejCloseBlock when the evaluations are complete.
- */
-
-int ejOpenBlock(int eid)
-{
- ej_t *ep;
- int vid;
-
- if((ep = ejPtr(eid)) == NULL) {
- return -1;
- }
- if ((vid = hAlloc((void***) &ep->variables)) < 0) {
- return -1;
- }
- if (vid >= ep->variableMax) {
- ep->variableMax = vid + 1;
- }
- ep->variables[vid] = symOpen(64) + EJ_OFFSET;
- return vid;
-
-}
-
-/******************************************************************************/
-/*
- * Close a variable scope block. The vid parameter is the return value from
- * the call to ejOpenBlock
- */
-
-int ejCloseBlock(int eid, int vid)
-{
- ej_t *ep;
-
- if((ep = ejPtr(eid)) == NULL) {
- return -1;
- }
- symClose(ep->variables[vid] - EJ_OFFSET, freeVar);
- ep->variableMax = hFree((void***) &ep->variables, vid);
- return 0;
-
-}
-/******************************************************************************/
-/*
- * Create a new variable scope block and evaluate a script. All variables
- * created during this context will be automatically deleted when complete.
- */
-
-char_t *ejEvalBlock(int eid, char_t *script, char_t **emsg)
-{
- char_t* returnVal;
- int vid;
-
- a_assert(script);
-
- vid = ejOpenBlock(eid);
- returnVal = ejEval(eid, script, emsg);
- ejCloseBlock(eid, vid);
-
- return returnVal;
-}
-
-/******************************************************************************/
-/*
- * Parse and evaluate a Ejscript. The caller may provide a symbol table to
- * use for variables and function definitions. Return char_t pointer on
- * success otherwise NULL pointer is returned.
- */
-
-char_t *ejEval(int eid, char_t *script, char_t **emsg)
-{
- ej_t *ep;
- ejinput_t *oldBlock;
- int state;
-
- a_assert(script);
-
- if (emsg) {
- *emsg = NULL;
- }
- if ((ep = ejPtr(eid)) == NULL) {
- return NULL;
- }
-
- setString(&ep->result, T(""));
-
-/*
- * Allocate a new evaluation block, and save the old one
- */
- oldBlock = ep->input;
- ejLexOpenScript(ep, script);
-
-/*
- * Do the actual parsing and evaluation
- */
- do {
- state = parse(ep, STATE_BEGIN, FLAGS_EXE);
- } while (state != STATE_EOF && state != STATE_ERR);
-
- ejLexCloseScript(ep);
-
-/*
- * Return any error string to the user
- */
- if (state == STATE_ERR && emsg) {
- *emsg = bstrdup(B_L, ep->error);
- }
-
-/*
- * Restore the old evaluation block
- */
- ep->input = oldBlock;
-
- if (state == STATE_EOF) {
- return ep->result;
- }
- if (state == STATE_ERR) {
- return NULL;
- }
- return ep->result;
-}
-
-/******************************************************************************/
-/*
- * Recursive descent parser for Ejscript
- */
-
-static int parse(ej_t *ep, int state, int flags)
-{
- a_assert(ep);
-
- switch (state) {
-/*
- * Any statement, function arguments or conditional expressions
- */
- case STATE_STMT:
- case STATE_DEC:
- state = parseStmt(ep, state, flags);
- break;
-
- case STATE_EXPR:
- state = parseStmt(ep, state, flags);
- break;
-
-/*
- * Variable declaration list
- */
- case STATE_DEC_LIST:
- state = parseDeclaration(ep, state, flags);
- break;
-
-/*
- * Function argument string
- */
- case STATE_ARG_LIST:
- state = parseArgs(ep, state, flags);
- break;
-
-/*
- * Logical condition list (relational operations separated by &&, ||)
- */
- case STATE_COND:
- state = parseCond(ep, state, flags);
- break;
-
-/*
- * Expression list
- */
- case STATE_RELEXP:
- state = parseExpr(ep, state, flags);
- break;
- }
-
- if (state == STATE_ERR && ep->error == NULL) {
- ejError(ep, T("Syntax error"));
- }
- return state;
-}
-
-/******************************************************************************/
-/*
- * Parse any statement including functions and simple relational operations
- */
-
-static int parseStmt(ej_t *ep, int state, int flags)
-{
- ejfunc_t func;
- ejfunc_t *saveFunc;
- ejinput_t condScript, endScript, bodyScript, incrScript;
- char_t *value;
- char_t *identifier;
- int done, expectSemi, thenFlags, elseFlags, tid, cond, forFlags;
-
- a_assert(ep);
-
-/*
- * Set these to NULL, else we try to free them if an error occurs.
- */
- endScript.putBackToken = NULL;
- bodyScript.putBackToken = NULL;
- incrScript.putBackToken = NULL;
- condScript.putBackToken = NULL;
-
- expectSemi = 0;
- saveFunc = NULL;
-
- for (done = 0; !done; ) {
- tid = ejLexGetToken(ep, state);
-
- switch (tid) {
- default:
- ejLexPutbackToken(ep, TOK_EXPR, ep->token);
- done++;
- break;
-
- case TOK_ERR:
- state = STATE_ERR;
- done++;
- break;
-
- case TOK_EOF:
- state = STATE_EOF;
- done++;
- break;
-
- case TOK_NEWLINE:
- break;
-
- case TOK_SEMI:
-/*
- * This case is when we discover no statement and just a lone ';'
- */
- if (state != STATE_STMT) {
- ejLexPutbackToken(ep, tid, ep->token);
- }
- done++;
- break;
-
- case TOK_ID:
-/*
- * This could either be a reference to a variable or an assignment
- */
- identifier = NULL;
- setString(&identifier, ep->token);
-/*
- * Peek ahead to see if this is an assignment
- */
- tid = ejLexGetToken(ep, state);
- if (tid == TOK_ASSIGNMENT) {
- if (parse(ep, STATE_RELEXP, flags) != STATE_RELEXP_DONE) {
- goto error;
- }
- if (flags & FLAGS_EXE) {
- if ( state == STATE_DEC ) {
- ejSetLocalVar(ep->eid, identifier, ep->result);
- }
- else {
- if (ejGetVar(ep->eid, identifier, &value) > 0) {
- ejSetLocalVar(ep->eid, identifier, ep->result);
- } else {
- ejSetGlobalVar(ep->eid, identifier, ep->result);
- }
- }
- }
-
- } else if (tid == TOK_INC_DEC ) {
- value = NULL;
- if ( flags & FLAGS_EXE ) {
- if (ejGetVar(ep->eid, identifier, &value) < 0) {
- ejError(ep, T("Undefined variable %s\n"), identifier);
- goto error;
- }
- setString(&ep->result, value);
- if (evalExpr(ep, value, (int) *ep->token, T("1")) < 0) {
- state = STATE_ERR;
- break;
- }
- ejSetGlobalVar(ep->eid, identifier, ep->result);
- }
-
- } else {
-/*
- * If we are processing a declaration, allow undefined vars
- */
- value = NULL;
- if (state == STATE_DEC) {
- if (ejGetVar(ep->eid, identifier, &value) > 0) {
- ejError(ep, T("Variable already declared"),
- identifier);
- clearString(&identifier);
- goto error;
- }
- ejSetLocalVar(ep->eid, identifier, NULL);
- } else {
- if ( flags & FLAGS_EXE ) {
- if (ejGetVar(ep->eid, identifier, &value) < 0) {
- ejError(ep, T("Undefined variable %s\n"),
- identifier);
- clearString(&identifier);
- goto error;
- }
- }
- }
- setString(&ep->result, value);
- ejLexPutbackToken(ep, tid, ep->token);
- }
- clearString(&identifier);
-
- if (state == STATE_STMT) {
- expectSemi++;
- }
- done++;
- break;
-
- case TOK_LITERAL:
-/*
- * Set the result to the literal (number or string constant)
- */
- setString(&ep->result, ep->token);
- if (state == STATE_STMT) {
- expectSemi++;
- }
- done++;
- break;
-
- case TOK_FUNCTION:
-/*
- * We must save any current ep->func value for the current stack frame
- */
- if (ep->func) {
- saveFunc = ep->func;
- }
- memset(&func, 0, sizeof(ejfunc_t));
- setString(&func.fname, ep->token);
- ep->func = &func;
-
- setString(&ep->result, T(""));
- if (ejLexGetToken(ep, state) != TOK_LPAREN) {
- freeFunc(&func);
- goto error;
- }
-
- if (parse(ep, STATE_ARG_LIST, flags) != STATE_ARG_LIST_DONE) {
- freeFunc(&func);
- ep->func = saveFunc;
- goto error;
- }
-/*
- * Evaluate the function if required
- */
- if (flags & FLAGS_EXE && evalFunction(ep) < 0) {
- freeFunc(&func);
- ep->func = saveFunc;
- goto error;
- }
-
- freeFunc(&func);
- ep->func = saveFunc;
-
- if (ejLexGetToken(ep, state) != TOK_RPAREN) {
- goto error;
- }
- if (state == STATE_STMT) {
- expectSemi++;
- }
- done++;
- break;
-
- case TOK_IF:
- if (state != STATE_STMT) {
- goto error;
- }
- if (ejLexGetToken(ep, state) != TOK_LPAREN) {
- goto error;
- }
-/*
- * Evaluate the entire condition list "(condition)"
- */
- if (parse(ep, STATE_COND, flags) != STATE_COND_DONE) {
- goto error;
- }
- if (ejLexGetToken(ep, state) != TOK_RPAREN) {
- goto error;
- }
-/*
- * This is the "then" case. We need to always parse both cases and
- * execute only the relevant case.
- */
- if (*ep->result == '1') {
- thenFlags = flags;
- elseFlags = flags & ~FLAGS_EXE;
- } else {
- thenFlags = flags & ~FLAGS_EXE;
- elseFlags = flags;
- }
-/*
- * Process the "then" case
- */
- if (parse(ep, STATE_STMT, thenFlags) != STATE_STMT_DONE) {
- goto error;
- }
- tid = ejLexGetToken(ep, state);
- if (tid != TOK_ELSE) {
- ejLexPutbackToken(ep, tid, ep->token);
- done++;
- break;
- }
-/*
- * Process the "else" case
- */
- if (parse(ep, STATE_STMT, elseFlags) != STATE_STMT_DONE) {
- goto error;
- }
- done++;
- break;
-
- case TOK_FOR:
-/*
- * Format for the expression is:
- *
- * for (initial; condition; incr) {
- * body;
- * }
- */
- if (state != STATE_STMT) {
- goto error;
- }
- if (ejLexGetToken(ep, state) != TOK_LPAREN) {
- goto error;
- }
-
-/*
- * Evaluate the for loop initialization statement
- */
- if (parse(ep, STATE_EXPR, flags) != STATE_EXPR_DONE) {
- goto error;
- }
- if (ejLexGetToken(ep, state) != TOK_SEMI) {
- goto error;
- }
-
-/*
- * The first time through, we save the current input context just
- * to each step: prior to the conditional, the loop increment and the
- * loop body.
- */
- ejLexSaveInputState(ep, &condScript);
- if (parse(ep, STATE_COND, flags) != STATE_COND_DONE) {
- goto error;
- }
- cond = (*ep->result != '0');
-
- if (ejLexGetToken(ep, state) != TOK_SEMI) {
- goto error;
- }
-
-/*
- * Don't execute the loop increment statement or the body first time
- */
- forFlags = flags & ~FLAGS_EXE;
- ejLexSaveInputState(ep, &incrScript);
- if (parse(ep, STATE_EXPR, forFlags) != STATE_EXPR_DONE) {
- goto error;
- }
- if (ejLexGetToken(ep, state) != TOK_RPAREN) {
- goto error;
- }
-
-/*
- * Parse the body and remember the end of the body script
- */
- ejLexSaveInputState(ep, &bodyScript);
- if (parse(ep, STATE_STMT, forFlags) != STATE_STMT_DONE) {
- goto error;
- }
- ejLexSaveInputState(ep, &endScript);
-
-/*
- * Now actually do the for loop. Note loop has been rotated
- */
- while (cond && (flags & FLAGS_EXE) ) {
-/*
- * Evaluate the body
- */
- ejLexRestoreInputState(ep, &bodyScript);
- if (parse(ep, STATE_STMT, flags) != STATE_STMT_DONE) {
- goto error;
- }
-/*
- * Evaluate the increment script
- */
- ejLexRestoreInputState(ep, &incrScript);
- if (parse(ep, STATE_EXPR, flags) != STATE_EXPR_DONE) {
- goto error;
- }
-/*
- * Evaluate the condition
- */
- ejLexRestoreInputState(ep, &condScript);
- if (parse(ep, STATE_COND, flags) != STATE_COND_DONE) {
- goto error;
- }
- cond = (*ep->result != '0');
- }
- ejLexRestoreInputState(ep, &endScript);
- done++;
- break;
-
- case TOK_VAR:
- if (parse(ep, STATE_DEC_LIST, flags) != STATE_DEC_LIST_DONE) {
- goto error;
- }
- done++;
- break;
-
- case TOK_COMMA:
- ejLexPutbackToken(ep, TOK_EXPR, ep->token);
- done++;
- break;
-
- case TOK_LPAREN:
- if (state == STATE_EXPR) {
- if (parse(ep, STATE_RELEXP, flags) != STATE_RELEXP_DONE) {
- goto error;
- }
- if (ejLexGetToken(ep, state) != TOK_RPAREN) {
- goto error;
- }
- return STATE_EXPR_DONE;
- }
- done++;
- break;
-
- case TOK_RPAREN:
- ejLexPutbackToken(ep, tid, ep->token);
- return STATE_EXPR_DONE;
-
- case TOK_LBRACE:
-/*
- * This handles any code in braces except "if () {} else {}"
- */
- if (state != STATE_STMT) {
- goto error;
- }
-
-/*
- * Parse will return STATE_STMT_BLOCK_DONE when the RBRACE is seen
- */
- do {
- state = parse(ep, STATE_STMT, flags);
- } while (state == STATE_STMT_DONE);
-
- if (ejLexGetToken(ep, state) != TOK_RBRACE) {
- goto error;
- }
- return STATE_STMT_DONE;
-
- case TOK_RBRACE:
- if (state == STATE_STMT) {
- ejLexPutbackToken(ep, tid, ep->token);
- return STATE_STMT_BLOCK_DONE;
- }
- goto error;
-
- case TOK_RETURN:
- if (parse(ep, STATE_RELEXP, flags) != STATE_RELEXP_DONE) {
- goto error;
- }
- if (flags & FLAGS_EXE) {
- while ( ejLexGetToken(ep, state) != TOK_EOF );
- done++;
- return STATE_EOF;
- }
- break;
- }
- }
-
- if (expectSemi) {
- tid = ejLexGetToken(ep, state);
- if (tid != TOK_SEMI && tid != TOK_NEWLINE) {
- goto error;
- }
-
-/*
- * Skip newline after semi-colon
- */
- tid = ejLexGetToken(ep, state);
- if (tid != TOK_NEWLINE) {
- ejLexPutbackToken(ep, tid, ep->token);
- }
- }
-
-/*
- * Free resources and return the correct status
- */
-doneParse:
- if (tid == TOK_FOR) {
- ejLexFreeInputState(ep, &condScript);
- ejLexFreeInputState(ep, &incrScript);
- ejLexFreeInputState(ep, &endScript);
- ejLexFreeInputState(ep, &bodyScript);
- }
- if (state == STATE_STMT) {
- return STATE_STMT_DONE;
- } else if (state == STATE_DEC) {
- return STATE_DEC_DONE;
- } else if (state == STATE_EXPR) {
- return STATE_EXPR_DONE;
- } else if (state == STATE_EOF) {
- return state;
- } else {
- return STATE_ERR;
- }
-
-/*
- * Common error exit
- */
-error:
- state = STATE_ERR;
- goto doneParse;
-}
-
-/******************************************************************************/
-/*
- * Parse variable declaration list
- */
-
-static int parseDeclaration(ej_t *ep, int state, int flags)
-{
- int tid;
-
- a_assert(ep);
-
-/*
- * Declarations can be of the following forms:
- * var x;
- * var x, y, z;
- * var x = 1 + 2 / 3, y = 2 + 4;
- *
- * We set the variable to NULL if there is no associated assignment.
- */
-
- do {
- if ((tid = ejLexGetToken(ep, state)) != TOK_ID) {
- return STATE_ERR;
- }
- ejLexPutbackToken(ep, tid, ep->token);
-
-/*
- * Parse the entire assignment or simple identifier declaration
- */
- if (parse(ep, STATE_DEC, flags) != STATE_DEC_DONE) {
- return STATE_ERR;
- }
-
-/*
- * Peek at the next token, continue if comma seen
- */
- tid = ejLexGetToken(ep, state);
- if (tid == TOK_SEMI) {
- return STATE_DEC_LIST_DONE;
- } else if (tid != TOK_COMMA) {
- return STATE_ERR;
- }
- } while (tid == TOK_COMMA);
-
- if (tid != TOK_SEMI) {
- return STATE_ERR;
- }
- return STATE_DEC_LIST_DONE;
-}
-
-/******************************************************************************/
-/*
- * Parse function arguments
- */
-
-static int parseArgs(ej_t *ep, int state, int flags)
-{
- int tid, aid;
-
- a_assert(ep);
-
- do {
- state = parse(ep, STATE_RELEXP, flags);
- if (state == STATE_EOF || state == STATE_ERR) {
- return state;
- }
- if (state == STATE_RELEXP_DONE) {
- aid = hAlloc((void***) &ep->func->args);
- ep->func->args[aid] = bstrdup(B_L, ep->result);
- ep->func->nArgs++;
- }
-/*
- * Peek at the next token, continue if more args (ie. comma seen)
- */
- tid = ejLexGetToken(ep, state);
- if (tid != TOK_COMMA) {
- ejLexPutbackToken(ep, tid, ep->token);
- }
- } while (tid == TOK_COMMA);
-
- if (tid != TOK_RPAREN && state != STATE_RELEXP_DONE) {
- return STATE_ERR;
- }
- return STATE_ARG_LIST_DONE;
-}
-
-/******************************************************************************/
-/*
- * Parse conditional expression (relational ops separated by ||, &&)
- */
-
-static int parseCond(ej_t *ep, int state, int flags)
-{
- char_t *lhs, *rhs;
- int tid, operator;
-
- a_assert(ep);
-
- setString(&ep->result, T(""));
- rhs = lhs = NULL;
- operator = 0;
-
- do {
-/*
- * Recurse to handle one side of a conditional. Accumulate the
- * left hand side and the final result in ep->result.
- */
- state = parse(ep, STATE_RELEXP, flags);
- if (state != STATE_RELEXP_DONE) {
- state = STATE_ERR;
- break;
- }
- if (operator > 0) {
- setString(&rhs, ep->result);
- if (evalCond(ep, lhs, operator, rhs) < 0) {
- state = STATE_ERR;
- break;
- }
- }
- setString(&lhs, ep->result);
-
- tid = ejLexGetToken(ep, state);
- if (tid == TOK_LOGICAL) {
- operator = (int) *ep->token;
-
- } else if (tid == TOK_RPAREN || tid == TOK_SEMI) {
- ejLexPutbackToken(ep, tid, ep->token);
- state = STATE_COND_DONE;
- break;
-
- } else {
- ejLexPutbackToken(ep, tid, ep->token);
- }
-
- } while (state == STATE_RELEXP_DONE);
-
- if (lhs) {
- bfree(B_L, lhs);
- }
- if (rhs) {
- bfree(B_L, rhs);
- }
- return state;
-}
-
-/******************************************************************************/
-/*
- * Parse expression (leftHandSide operator rightHandSide)
- */
-
-static int parseExpr(ej_t *ep, int state, int flags)
-{
- char_t *lhs, *rhs;
- int rel, tid;
-
- a_assert(ep);
-
- setString(&ep->result, T(""));
- rhs = lhs = NULL;
- rel = 0;
-
- do {
-/*
- * This loop will handle an entire expression list. We call parse
- * to evalutate each term which returns the result in ep->result.
- */
- state = parse(ep, STATE_EXPR, flags);
- if (state != STATE_EXPR_DONE) {
- state = STATE_ERR;
- break;
- }
- if (rel > 0) {
- setString(&rhs, ep->result);
- if (evalExpr(ep, lhs, rel, rhs) < 0) {
- state = STATE_ERR;
- break;
- }
- }
- setString(&lhs, ep->result);
-
- if ((tid = ejLexGetToken(ep, state)) == TOK_EXPR) {
- rel = (int) *ep->token;
-
- } else if (tid == TOK_INC_DEC) {
- rel = (int) *ep->token;
-
- } else {
- ejLexPutbackToken(ep, tid, ep->token);
- state = STATE_RELEXP_DONE;
- }
-
- } while (state == STATE_EXPR_DONE);
-
- if (rhs)
- bfree(B_L, rhs);
- if (lhs)
- bfree(B_L, lhs);
- return state;
-}
-
-/******************************************************************************/
-/*
- * Evaluate a condition. Implements &&, ||, !
- */
-
-static int evalCond(ej_t *ep, char_t *lhs, int rel, char_t *rhs)
-{
- char_t buf[16];
- int l, r, lval;
-
- a_assert(lhs);
- a_assert(rhs);
- a_assert(rel > 0);
-
- lval = 0;
- if (gisdigit(*lhs) && gisdigit(*rhs)) {
- l = gatoi(lhs);
- r = gatoi(rhs);
- switch (rel) {
- case COND_AND:
- lval = l && r;
- break;
- case COND_OR:
- lval = l || r;
- break;
- default:
- ejError(ep, T("Bad operator %d"), rel);
- return -1;
- }
- } else {
- if (!gisdigit(*lhs)) {
- ejError(ep, T("Conditional must be numeric"), lhs);
- } else {
- ejError(ep, T("Conditional must be numeric"), rhs);
- }
- }
-
- stritoa(lval, buf, sizeof(buf));
- setString(&ep->result, buf);
- return 0;
-}
-
-/******************************************************************************/
-/*
- * Evaluate an operation
- */
-
-static int evalExpr(ej_t *ep, char_t *lhs, int rel, char_t *rhs)
-{
- char_t *cp, buf[16];
- int numeric, l, r, lval;
-
- a_assert(lhs);
- a_assert(rhs);
- a_assert(rel > 0);
-
-/*
- * All of the characters in the lhs and rhs must be numeric
- */
- numeric = 1;
- for (cp = lhs; *cp; cp++) {
- if (!gisdigit(*cp)) {
- numeric = 0;
- break;
- }
- }
- if (numeric) {
- for (cp = rhs; *cp; cp++) {
- if (!gisdigit(*cp)) {
- numeric = 0;
- break;
- }
- }
- }
- if (numeric) {
- l = gatoi(lhs);
- r = gatoi(rhs);
- switch (rel) {
- case EXPR_PLUS:
- lval = l + r;
- break;
- case EXPR_INC:
- lval = l + 1;
- break;
- case EXPR_MINUS:
- lval = l - r;
- break;
- case EXPR_DEC:
- lval = l - 1;
- break;
- case EXPR_MUL:
- lval = l * r;
- break;
- case EXPR_DIV:
- if (r != 0) {
- lval = l / r;
- } else {
- lval = 0;
- }
- break;
- case EXPR_MOD:
- if (r != 0) {
- lval = l % r;
- } else {
- lval = 0;
- }
- break;
- case EXPR_LSHIFT:
- lval = l << r;
- break;
- case EXPR_RSHIFT:
- lval = l >> r;
- break;
- case EXPR_EQ:
- lval = l == r;
- break;
- case EXPR_NOTEQ:
- lval = l != r;
- break;
- case EXPR_LESS:
- lval = (l < r) ? 1 : 0;
- break;
- case EXPR_LESSEQ:
- lval = (l <= r) ? 1 : 0;
- break;
- case EXPR_GREATER:
- lval = (l > r) ? 1 : 0;
- break;
- case EXPR_GREATEREQ:
- lval = (l >= r) ? 1 : 0;
- break;
- default:
- ejError(ep, T("Bad operator %d"), rel);
- return -1;
- }
-
- } else {
- switch (rel) {
- case EXPR_PLUS:
- clearString(&ep->result);
- appendString(&ep->result, lhs);
- appendString(&ep->result, rhs);
- return 0;
- case EXPR_LESS:
- lval = gstrcmp(lhs, rhs) < 0;
- break;
- case EXPR_LESSEQ:
- lval = gstrcmp(lhs, rhs) <= 0;
- break;
- case EXPR_GREATER:
- lval = gstrcmp(lhs, rhs) > 0;
- break;
- case EXPR_GREATEREQ:
- lval = gstrcmp(lhs, rhs) >= 0;
- break;
- case EXPR_EQ:
- lval = gstrcmp(lhs, rhs) == 0;
- break;
- case EXPR_NOTEQ:
- lval = gstrcmp(lhs, rhs) != 0;
- break;
- case EXPR_INC:
- case EXPR_DEC:
- case EXPR_MINUS:
- case EXPR_DIV:
- case EXPR_MOD:
- case EXPR_LSHIFT:
- case EXPR_RSHIFT:
- default:
- ejError(ep, T("Bad operator"));
- return -1;
- }
- }
-
- stritoa(lval, buf, sizeof(buf));
- setString(&ep->result, buf);
- return 0;
-}
-
-/******************************************************************************/
-/*
- * Evaluate a function
- */
-
-static int evalFunction(ej_t *ep)
-{
- sym_t *sp;
- int (*fn)(int eid, void *handle, int argc, char_t **argv);
-
- if ((sp = symLookup(ep->functions, ep->func->fname)) == NULL) {
- ejError(ep, T("Undefined procedure %s"), ep->func->fname);
- return -1;
- }
- fn = (int (*)(int, void*, int, char_t**)) sp->content.value.integer;
- if (fn == NULL) {
- ejError(ep, T("Undefined procedure %s"), ep->func->fname);
- return -1;
- }
-
- return (*fn)(ep->eid, (void*) ep->userHandle, ep->func->nArgs,
- ep->func->args);
-}
-
-/******************************************************************************/
-/*
- * Output a parse ej_error message
- */
-
-void ejError(ej_t* ep, char_t* fmt, ...)
-{
- va_list args;
- ejinput_t *ip;
- char_t *errbuf, *msgbuf;
-
- a_assert(ep);
- a_assert(fmt);
- ip = ep->input;
-
- va_start(args, fmt);
- msgbuf = NULL;
- gvsnprintf(&msgbuf, E_MAX_ERROR, fmt, args);
- va_end(args);
-
- if (ep && ip) {
- errbuf = NULL;
- gsnprintf(&errbuf, E_MAX_ERROR, T("%s\n At line %d, line => \n\n%s\n"),
- msgbuf, ip->lineNumber, ip->line);
- bfreeSafe(B_L, ep->error);
- ep->error = errbuf;
- }
- bfreeSafe(B_L, msgbuf);
-}
-
-/******************************************************************************/
-/*
- * Clear a string value
- */
-
-static void clearString(char_t **ptr)
-{
- a_assert(ptr);
-
- if (*ptr) {
- bfree(B_L, *ptr);
- }
- *ptr = NULL;
-}
-
-/******************************************************************************/
-/*
- * Set a string value
- */
-
-static void setString(char_t **ptr, char_t *s)
-{
- a_assert(ptr);
-
- if (*ptr) {
- bfree(B_L, *ptr);
- }
- *ptr = bstrdup(B_L, s);
-}
-
-/******************************************************************************/
-/*
- * Append to the pointer value
- */
-
-static void appendString(char_t **ptr, char_t *s)
-{
- int len, oldlen;
-
- a_assert(ptr);
-
- if (*ptr) {
- len = gstrlen(s);
- oldlen = gstrlen(*ptr);
- *ptr = brealloc(B_L, *ptr, (len + oldlen + 1) * sizeof(char_t));
- gstrcpy(&(*ptr)[oldlen], s);
- } else {
- *ptr = bstrdup(B_L, s);
- }
-}
-
-/******************************************************************************/
-/*
- * Define a function
- */
-
-int ejSetGlobalFunction(int eid, char_t *name,
- int (*fn)(int eid, void *handle, int argc, char_t **argv))
-{
- ej_t *ep;
-
- if ((ep = ejPtr(eid)) == NULL) {
- return -1;
- }
- return ejSetGlobalFunctionDirect(ep->functions, name, fn);
-}
-
-/******************************************************************************/
-/*
- * Define a function directly into the function symbol table.
- */
-
-int ejSetGlobalFunctionDirect(sym_fd_t functions, char_t *name,
- int (*fn)(int eid, void *handle, int argc, char_t **argv))
-{
- if (symEnter(functions, name, valueInteger((long) fn), 0) == NULL) {
- return -1;
- }
- return 0;
-}
-
-/******************************************************************************/
-/*
- * Get a function definition
- */
-
-void *ejGetGlobalFunction(int eid, char_t *name)
-{
- ej_t *ep;
- sym_t *sp;
- int (*fn)(int eid, void *handle, int argc, char_t **argv);
-
- if ((ep = ejPtr(eid)) == NULL) {
- return NULL;
- }
- if ((sp = symLookup(ep->functions, name)) != NULL) {
- fn = (int (*)(int, void*, int, char_t**)) sp->content.value.integer;
- return (void*) fn;
- }
- return NULL;
-}
-
-/******************************************************************************/
-/*
- * Utility routine to crack Ejscript arguments. Return the number of args
- * seen. This routine only supports %s and %d type args.
- *
- * Typical usage:
- *
- * if (ejArgs(argc, argv, "%s %d", &name, &age) < 2) {
- * error("Insufficient args\n");
- * return -1;
- * }
- */
-
-int ejArgs(int argc, char_t **argv, char_t *fmt, ...)
-{
- va_list vargs;
- char_t *cp, **sp;
- int *ip;
- int argn;
-
- va_start(vargs, fmt);
-
- if (argv == NULL) {
- return 0;
- }
-
- for (argn = 0, cp = fmt; cp && *cp && argv[argn]; ) {
- if (*cp++ != '%') {
- continue;
- }
-
- switch (*cp) {
- case 'd':
- ip = va_arg(vargs, int*);
- *ip = gatoi(argv[argn]);
- break;
-
- case 's':
- sp = va_arg(vargs, char_t**);
- *sp = argv[argn];
- break;
-
- default:
-/*
- * Unsupported
- */
- a_assert(0);
- }
- argn++;
- }
-
- va_end(vargs);
- return argn;
-}
-
-/******************************************************************************/
-/*
- * Define the user handle
- */
-
-void ejSetUserHandle(int eid, int handle)
-{
- ej_t *ep;
-
- if ((ep = ejPtr(eid)) == NULL) {
- return;
- }
- ep->userHandle = handle;
-}
-
-/******************************************************************************/
-/*
- * Get the user handle
- */
-
-int ejGetUserHandle(int eid)
-{
- ej_t *ep;
-
- if ((ep = ejPtr(eid)) == NULL) {
- return -1;
- }
- return ep->userHandle;
-}
-
-/******************************************************************************/
-/*
- * Get the current line number
- */
-
-int ejGetLineNumber(int eid)
-{
- ej_t *ep;
-
- if ((ep = ejPtr(eid)) == NULL) {
- return -1;
- }
- return ep->input->lineNumber;
-}
-
-/******************************************************************************/
-/*
- * Set the result
- */
-
-void ejSetResult(int eid, char_t *s)
-{
- ej_t *ep;
-
- if ((ep = ejPtr(eid)) == NULL) {
- return;
- }
- setString(&ep->result, s);
-}
-
-/******************************************************************************/
-/*
- * Get the result
- */
-
-char_t *ejGetResult(int eid)
-{
- ej_t *ep;
-
- if ((ep = ejPtr(eid)) == NULL) {
- return NULL;
- }
- return ep->result;
-}
-
-/******************************************************************************/
-/*
- * Set a variable. Note: a variable with a value of NULL means declared but
- * undefined. The value is defined in the top-most variable frame.
- */
-
-void ejSetVar(int eid, char_t *var, char_t *value)
-{
- ej_t *ep;
- value_t v;
-
- a_assert(var && *var);
-
- if ((ep = ejPtr(eid)) == NULL) {
- return;
- }
- if (value == NULL) {
- v = valueString(value, 0);
- } else {
- v = valueString(value, VALUE_ALLOCATE);
- }
- symEnter(ep->variables[ep->variableMax - 1] - EJ_OFFSET, var, v, 0);
-}
-
-/******************************************************************************/
-/*
- * Set a local variable. Note: a variable with a value of NULL means
- * declared but undefined. The value is defined in the top-most variable frame.
- */
-
-void ejSetLocalVar(int eid, char_t *var, char_t *value)
-{
- ej_t *ep;
- value_t v;
-
- a_assert(var && *var);
-
- if ((ep = ejPtr(eid)) == NULL) {
- return;
- }
- if (value == NULL) {
- v = valueString(value, 0);
- } else {
- v = valueString(value, VALUE_ALLOCATE);
- }
- symEnter(ep->variables[ep->variableMax - 1] - EJ_OFFSET, var, v, 0);
-}
-
-/******************************************************************************/
-/*
- * Set a global variable. Note: a variable with a value of NULL means
- * declared but undefined. The value is defined in the global variable frame.
- */
-
-void ejSetGlobalVar(int eid, char_t *var, char_t *value)
-{
- ej_t *ep;
- value_t v;
-
- a_assert(var && *var);
-
- if ((ep = ejPtr(eid)) == NULL) {
- return;
- }
- if (value == NULL) {
- v = valueString(value, 0);
- } else {
- v = valueString(value, VALUE_ALLOCATE);
- }
- symEnter(ep->variables[0] - EJ_OFFSET, var, v, 0);
-}
-
-/******************************************************************************/
-/*
- * Get a variable
- */
-
-int ejGetVar(int eid, char_t *var, char_t **value)
-{
- ej_t *ep;
- sym_t *sp;
- int i;
-
- a_assert(var && *var);
- a_assert(value);
-
- if ((ep = ejPtr(eid)) == NULL) {
- return -1;
- }
-
- for (i = ep->variableMax - 1; i >= 0; i--) {
- if ((sp = symLookup(ep->variables[i] - EJ_OFFSET, var)) == NULL) {
- continue;
- }
- a_assert(sp->content.type == string);
- *value = sp->content.value.string;
- return i;
- }
- return -1;
-}
-
-/******************************************************************************/
-#if UNUSED
-/*
- * Get the variable symbol table
- */
-
-sym_fd_t ejGetVariableTable(int eid)
-{
- ej_t *ep;
-
- if ((ep = ejPtr(eid)) == NULL) {
- return -1;
- }
- return ep->variables;
-}
-#endif
-/******************************************************************************/
-/*
- * Get the functions symbol table
- */
-
-sym_fd_t ejGetFunctionTable(int eid)
-{
- ej_t *ep;
-
- if ((ep = ejPtr(eid)) == NULL) {
- return -1;
- }
- return ep->functions;
-}
-
-/******************************************************************************/
-/*
- * Free an argument list
- */
-
-static void freeFunc(ejfunc_t *func)
-{
- int i;
-
- for (i = func->nArgs - 1; i >= 0; i--) {
- bfree(B_L, func->args[i]);
- func->nArgs = hFree((void***) &func->args, i);
- }
- if (func->fname) {
- bfree(B_L, func->fname);
- func->fname = NULL;
- }
-}
-
-/******************************************************************************/
-/*
- * Get Ejscript pointer
- */
-
-static ej_t *ejPtr(int eid)
-{
- a_assert(0 <= eid && eid < ejMax);
-
- if (eid < 0 || eid >= ejMax || ejHandles[eid] == NULL) {
- ejError(NULL, T("Bad handle %d"), eid);
- return NULL;
- }
- return ejHandles[eid];
-}
-
-/******************************************************************************/
diff --git a/cpukit/httpd/form.c b/cpukit/httpd/form.c
deleted file mode 100644
index 05d5600ada..0000000000
--- a/cpukit/httpd/form.c
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * form.c -- Form processing (in-memory CGI) for the GoAhead Web server
- *
- * Copyright (c) Go Ahead Software Inc., 1995-1999. All Rights Reserved.
- *
- * See the file "license.txt" for usage and redistribution license requirements
- */
-
-/********************************** Description *******************************/
-
-/*
- * This module implements the /goform handler. It emulates CGI processing
- * but performs this in-process and not as an external process. This enables
- * a very high performance implementation with easy parsing and decoding
- * of query strings and posted data.
- */
-
-/*********************************** Includes *********************************/
-
-#include "wsIntrn.h"
-
-/************************************ Locals **********************************/
-
-static sym_fd_t formSymtab = -1; /* Symbol table for form handlers */
-
-/************************************* Code ***********************************/
-/*
- * Process a form request. Returns 1 always to indicate it handled the URL
- */
-
-int websFormHandler(webs_t wp, char_t *urlPrefix, char_t *webDir, int arg,
- char_t *url, char_t *path, char_t* query)
-{
- sym_t *sp;
- char_t formBuf[FNAMESIZE];
- char_t *cp, *formName;
- int (*fn)(void *sock, char_t* path, char_t *args);
-
- a_assert(websValid(wp));
- a_assert(url && *url);
- a_assert(path && *path == '/');
-
- websStats.formHits++;
-
-/*
- * Extract the form name
- */
- gstrncpy(formBuf, path, TSZ(formBuf));
- if ((formName = gstrchr(&formBuf[1], '/')) == NULL) {
- websError(wp, 200, T("Missing form name"));
- return 1;
- }
- formName++;
- if ((cp = gstrchr(formName, '/')) != NULL) {
- *cp = '\0';
- }
-
-/*
- * Lookup the C form function first and then try tcl (no javascript support
- * yet).
- */
- sp = symLookup(formSymtab, formName);
- if (sp == NULL) {
- websError(wp, 200, T("Form %s is not defined"), formName);
- } else {
- fn = (int (*)(void*, char_t*, char_t*)) sp->content.value.integer;
- a_assert(fn);
- if (fn) {
-/*
- * For good practice, forms must call websDone()
- */
- (*fn)((void*) wp, formName, query);
- if (websValid(wp)) {
- websError(wp, 200, T("Form didn't call websDone"));
- }
- }
- }
- return 1;
-}
-
-/******************************************************************************/
-/*
- * Define a form function in the "form" map space.
- */
-
-int websFormDefine(char_t *name, void (*fn)(webs_t wp, char_t *path,
- char_t *query))
-{
- static int once = 0;
-
- a_assert(name && *name);
- a_assert(fn);
-
- if (fn == NULL) {
- return -1;
- }
-
- if (once++ == 0) {
- websFormOpen();
- }
- symEnter(formSymtab, name, valueInteger((int) fn), (int) NULL);
- return 0;
-}
-
-/******************************************************************************/
-/*
- * Open the symbol table for forms.
- */
-
-void websFormOpen()
-{
- formSymtab = symOpen(64);
-}
-
-/******************************************************************************/
-/*
- * Close the symbol table for forms.
- */
-
-void websFormClose()
-{
- if (formSymtab != -1) {
- symClose(formSymtab, NULL);
- }
-}
-
-/******************************************************************************/
-/*
- * Write a webs header. This is a convenience routine to write a common
- * header for a form back to the browser.
- */
-
-void websHeader(webs_t wp)
-{
- a_assert(websValid(wp));
-
- websWrite(wp, T("HTTP/1.0 200 OK\n"));
-
-/*
- * By license terms the following line of code must not be modified
- */
- websWrite(wp, T("Server: GoAhead-Webs\r\n"));
-
- websWrite(wp, T("Pragma: no-cache\n"));
- websWrite(wp, T("Cache-control: no-cache\n"));
- websWrite(wp, T("Content-Type: text/html\n"));
- websWrite(wp, T("\n"));
- websWrite(wp, T("<html>\n"));
-}
-
-/******************************************************************************/
-/*
- * Write a webs footer
- */
-
-void websFooter(webs_t wp)
-{
- a_assert(websValid(wp));
-
- websWrite(wp, T("</html>\n"));
-}
-
-/******************************************************************************/
diff --git a/cpukit/httpd/h.c b/cpukit/httpd/h.c
deleted file mode 100644
index ed7a4553eb..0000000000
--- a/cpukit/httpd/h.c
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- * h.c -- Handle allocation module
- *
- * Copyright (c) GoAhead Software Inc., 1995-1999. All Rights Reserved.
- * See the file "license.txt" for usage and redistribution license requirements
- */
-
-/******************************** Description *********************************/
-
-/*
- * This module provides a simple API to allocate and free handles
- * It maintains a dynamic array of pointers. These usually point to
- * per-handle structures.
- */
-
-/********************************* Includes ***********************************/
-
-#if UEMF
- #include "uemf.h"
-#else
- #include "basic/basicInternal.h"
-#endif
-
-/********************************** Defines ***********************************/
-/*
- * The handle list stores the length of the list and the number of used
- * handles in the first two words. These are hidden from the caller by
- * returning a pointer to the third word to the caller
- */
-
-#define H_LEN 0 /* First entry holds length of list */
-#define H_USED 1 /* Second entry holds number of used */
-#define H_OFFSET 2 /* Offset to real start of list */
-
-#define H_INCR 16 /* Grow handle list in chunks this size */
-
-/*********************************** Code *************************************/
-/*
- * Allocate a new file handle. On the first call, the caller must set the
- * handle map to be a pointer to a null pointer. *map points to the second
- * element in the handle array.
- */
-
-int hAlloc(void ***map)
-{
- int *mp;
- int handle, len, memsize, incr;
-
- a_assert(map);
-
- if (*map == NULL) {
- incr = H_INCR;
- memsize = (incr + H_OFFSET) * sizeof(void**);
- if ((mp = (int*) balloc(B_L, memsize)) == NULL) {
- return -1;
- }
- memset(mp, 0, memsize);
- mp[H_LEN] = incr;
- mp[H_USED] = 0;
- *map = (void**) &mp[H_OFFSET];
- } else {
- mp = &((*(int**)map)[-H_OFFSET]);
- }
-
- len = mp[H_LEN];
-
-/*
- * Find the first null handle
- */
- if (mp[H_USED] < mp[H_LEN]) {
- for (handle = 0; handle < len; handle++)
- if (mp[handle+H_OFFSET] == 0) {
- mp[H_USED]++;
- return handle;
- }
- } else {
- handle = len;
- }
-
-/*
- * No free handle so grow the handle list. Grow list in chunks of H_INCR.
- */
- len += H_INCR;
- memsize = (len + H_OFFSET) * sizeof(void**);
- if ((mp = (int*) brealloc(B_L, (void*) mp, memsize)) == NULL) {
- return -1;
- }
- *map = (void**) &mp[H_OFFSET];
- mp[H_LEN] = len;
- memset(&mp[H_OFFSET + len - H_INCR], 0, sizeof(int*) * H_INCR);
- mp[H_USED]++;
- return handle;
-}
-
-/******************************************************************************/
-/*
- * Free a handle. This function returns the value of the largest
- * handle in use plus 1, to be saved as a max value.
- */
-
-int hFree(void ***map, int handle)
-{
- int *mp;
- int len;
-
- a_assert(map);
- mp = &((*(int**)map)[-H_OFFSET]);
- a_assert(mp[H_LEN] >= H_INCR);
-
- a_assert(mp[handle + H_OFFSET]);
- a_assert(mp[H_USED]);
- mp[handle + H_OFFSET] = 0;
- if (--(mp[H_USED]) == 0) {
- bfree(B_L, (void*) mp);
- *map = NULL;
- }
-
-/*
- * Find the greatest handle number in use.
- */
- if (*map == NULL) {
- handle = -1;
- } else {
- len = mp[H_LEN];
- if (mp[H_USED] < mp[H_LEN]) {
- for (handle = len - 1; handle >= 0; handle--) {
- if (mp[handle + H_OFFSET])
- break;
- }
- } else {
- handle = len;
- }
- }
- return handle + 1;
-}
-
-/******************************************************************************/
-/*
- * Allocate an entry in the halloc array.
- */
-
-int hAllocEntry(void ***list, int *max, int size)
-{
- char_t *cp;
- int id;
-
- a_assert(list);
- a_assert(max);
-
- if ((id = hAlloc((void***) list)) < 0) {
- return -1;
- }
-
- if (size > 0) {
- if ((cp = balloc(B_L, size)) == NULL) {
- hFree(list, id);
- return -1;
- }
- a_assert(cp);
- memset(cp, 0, size);
-
- (*list)[id] = (void*) cp;
- }
-
- if (id >= *max) {
- *max = id + 1;
- }
- return id;
-}
-
-/******************************************************************************/
diff --git a/cpukit/httpd/handler.c b/cpukit/httpd/handler.c
deleted file mode 100644
index d481ec3c0c..0000000000
--- a/cpukit/httpd/handler.c
+++ /dev/null
@@ -1,284 +0,0 @@
-/*
- * handler.c -- URL handler support
- *
- * Copyright (c) Go Ahead Software Inc., 1995-1999. All Rights Reserved.
- *
- * See the file "license.txt" for usage and redistribution license requirements
- */
-
-/******************************** Description *********************************/
-
-/*
- * This module implements a URL handler interface and API to permit
- * the addition of user definable URL processors.
- */
-
-/********************************* Includes ***********************************/
-
-#include "wsIntrn.h"
-
-/*********************************** Locals ***********************************/
-
-static websUrlHandlerType* websUrlHandler; /* URL handler list */
-static int websUrlHandlerMax; /* Number of entries */
-
-/**************************** Forward Declarations ****************************/
-
-static int websUrlHandlerSort(const void* p1, const void* p2);
-static int websPublishHandler(webs_t wp, char_t *urlPrefix, char_t *webDir,
- int sid, char_t *url, char_t *path, char_t *query);
-
-/*********************************** Code *************************************/
-/*
- * Initialize the URL handler module
- */
-
-int websUrlHandlerOpen()
-{
- websAspOpen();
- return 0;
-}
-
-/******************************************************************************/
-/*
- * Close the URL handler module
- */
-
-void websUrlHandlerClose()
-{
- websUrlHandlerType* sp;
-
- websAspClose();
- for (sp = websUrlHandler; sp < &websUrlHandler[websUrlHandlerMax]; sp++) {
- bfree(B_L, sp->urlPrefix);
- if (sp->webDir) {
- bfree(B_L, sp->webDir);
- }
- }
- bfree(B_L, websUrlHandler);
- websUrlHandlerMax = 0;
-}
-
-/******************************************************************************/
-/*
- * Define a new URL handler. urlPrefix is the URL prefix to match. webDir is
- * an optional root directory path for a web directory. arg is an optional
- * arg to pass to the URL handler. flags defines the matching order. Valid
- * flags include WEBS_HANDLER_LAST, WEBS_HANDLER_FIRST. If multiple users
- * specify last or first, their order is defined alphabetically by the
- * urlPrefix.
- */
-
-int websUrlHandlerDefine(char_t *urlPrefix, char_t *webDir, int arg,
- int (*handler)(webs_t wp, char_t *urlPrefix, char_t *webdir, int arg,
- char_t *url, char_t *path, char_t *query), int flags)
-{
- websUrlHandlerType *sp;
- int len;
-
- a_assert(urlPrefix);
- a_assert(handler);
-
-/*
- * Grow the URL handler array to create a new slot
- */
- len = (websUrlHandlerMax + 1) * sizeof(websUrlHandlerType);
- if ((websUrlHandler = brealloc(B_L, websUrlHandler, len)) == NULL) {
- return -1;
- }
- sp = &websUrlHandler[websUrlHandlerMax++];
- memset(sp, 0, sizeof(websUrlHandlerType));
-
- sp->urlPrefix = bstrdup(B_L, urlPrefix);
- sp->len = gstrlen(sp->urlPrefix);
- if (webDir) {
- sp->webDir = bstrdup(B_L, webDir);
- } else {
- sp->webDir = bstrdup(B_L, T(""));
- }
- sp->handler = handler;
- sp->arg = arg;
- sp->flags = flags;
-
-/*
- * Sort in decreasing URL length order observing the flags for first and last
- */
- qsort(websUrlHandler, websUrlHandlerMax, sizeof(websUrlHandlerType),
- websUrlHandlerSort);
- return 0;
-}
-
-/******************************************************************************/
-/*
- * Delete an existing URL handler. We don't reclaim the space of the old
- * handler, just NULL the entry. Return -1 if handler is not found.
- */
-
-int websUrlHandlerDelete(int (*handler)(webs_t wp, char_t *urlPrefix,
- char_t *webDir, int arg, char_t *url, char_t *path, char_t *query))
-{
- websUrlHandlerType *sp;
- int i;
-
- for (i = 0; i < websUrlHandlerMax; i++) {
- sp = &websUrlHandler[i];
- if (sp->handler == handler) {
- sp->handler = NULL;
- return 0;
- }
- }
- return -1;
-}
-
-/******************************************************************************/
-/*
- * Sort in decreasing URL length order observing the flags for first and last
- */
-
-static int websUrlHandlerSort(const void* p1, const void* p2)
-{
- websUrlHandlerType *s1, *s2;
- int rc;
-
- a_assert(p1);
- a_assert(p2);
-
- s1 = (websUrlHandlerType*) p1;
- s2 = (websUrlHandlerType*) p2;
-
- if ((s1->flags & WEBS_HANDLER_FIRST) || (s2->flags & WEBS_HANDLER_LAST)) {
- return -1;
- }
-
- if ((s2->flags & WEBS_HANDLER_FIRST) || (s1->flags & WEBS_HANDLER_LAST)) {
- return 1;
- }
-
- if ((rc = gstrcmp(s1->urlPrefix, s2->urlPrefix)) == 0) {
- if (s1->len < s2->len) {
- return 1;
- } else if (s1->len > s2->len) {
- return -1;
- }
- }
- return -rc;
-}
-
-/******************************************************************************/
-/*
- * Publish a new web directory (Use the default URL handler)
- */
-
-int websPublish(char_t *urlPrefix, char_t *path)
-{
- return websUrlHandlerDefine(urlPrefix, path, 0, websPublishHandler, 0);
-}
-
-/******************************************************************************/
-/*
- * Return the directory for a given prefix. Ignore empty prefixes
- */
-
-char_t *websGetPublishDir(char_t *path, char_t **urlPrefix)
-{
- websUrlHandlerType *sp;
- int i;
-
- for (i = 0; i < websUrlHandlerMax; i++) {
- sp = &websUrlHandler[i];
- if (sp->urlPrefix[0] == '\0') {
- continue;
- }
- if (sp->handler && gstrncmp(sp->urlPrefix, path, sp->len) == 0) {
- if (urlPrefix) {
- *urlPrefix = sp->urlPrefix;
- }
- return sp->webDir;
- }
- }
- return NULL;
-}
-
-/******************************************************************************/
-/*
- * Publish URL handler. We just patch the web page Directory and let the
- * default handler do the rest.
- */
-
-static int websPublishHandler(webs_t wp, char_t *urlPrefix, char_t *webDir,
- int sid, char_t *url, char_t *path, char_t *query)
-{
- int len;
-
- a_assert(websValid(wp));
- a_assert(path);
-
-/*
- * Trim the urlPrefix off the path and set the webdirectory. Add one to step
- * over the trailing '/'
- */
- len = gstrlen(urlPrefix) + 1;
- websSetRequestPath(wp, webDir, &path[len]);
- return 0;
-}
-
-/******************************************************************************/
-/*
- * See if any valid handlers are defined for this request. If so, call them
- * and continue calling valid handlers until one accepts the request.
- * Return true if a handler was invoked, else return FALSE.
- */
-
-int websUrlHandlerRequest(webs_t wp)
-{
- websUrlHandlerType *sp;
- int i, first;
-
- a_assert(websValid(wp));
-
-/*
- * Delete the socket handler as we don't want to start reading any
- * data on the connection as it may be for the next pipelined HTTP/1.1
- * request if using Keep Alive
- */
- socketDeleteHandler(wp->sid);
- wp->state = WEBS_PROCESSING;
- websStats.handlerHits++;
-
- websSetRequestPath(wp, websGetDefaultDir(), NULL);
-
-/*
- * We loop over each handler in order till one accepts the request.
- * The security handler will handle the request if access is NOT allowed.
- */
- first = 1;
- for (i = 0; i < websUrlHandlerMax; i++) {
- sp = &websUrlHandler[i];
- if (sp->handler && gstrncmp(sp->urlPrefix, wp->path, sp->len) == 0) {
- if (first) {
- websSetEnv(wp);
- first = 0;
- }
- if ((*sp->handler)(wp, sp->urlPrefix, sp->webDir, sp->arg,
- wp->url, wp->path, wp->query)) {
- return 1;
- }
- if (!websValid(wp)) {
- trace(0,
- T("webs: handler %s called websDone, but didn't return 1\n"),
- sp->urlPrefix);
- return 1;
- }
- }
- }
-/*
- * If no handler processed the request, then return an error. Note: It was
- * the handlers responsibility to call websDone
- */
- if (i >= websUrlHandlerMax) {
- websError(wp, 200, T("No handler for this URL %s"), wp->url);
- }
- return 0;
-}
-
-/******************************************************************************/
diff --git a/cpukit/httpd/mime.c b/cpukit/httpd/mime.c
deleted file mode 100644
index 2aa2422ca9..0000000000
--- a/cpukit/httpd/mime.c
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * mime.c -- Web server mime types
- *
- * Copyright (c) Go Ahead Software Inc., 1995-1999. All Rights Reserved.
- *
- * See the file "license.txt" for usage and redistribution license requirements
- */
-
-/******************************** Description *********************************/
-
-/*
- * Mime types and file extensions. This module maps URL extensions to
- * content types.
- */
-
-/********************************* Includes ***********************************/
-
-#include "wsIntrn.h"
-
-/******************************** Global Data *********************************/
-/*
- * Addd entries to the MimeList as required for your content
- */
-
-websMimeType websMimeList[] = {
- { T("application/java"), T(".class") },
- { T("application/java"), T(".jar") },
- { T("text/html"), T(".asp") },
- { T("text/html"), T(".htm") },
- { T("text/html"), T(".html") },
- { T("image/gif"), T(".gif") },
- { T("image/jpeg"), T(".jpg") },
- { T("text/css"), T(".css") },
- { T("text/plain"), T(".txt") },
-
-#if MORE_MIME_TYPES
- { T("application/binary"), T(".exe") },
- { T("application/compress"), T(".z") },
- { T("application/gzip"), T(".gz") },
- { T("application/octet-stream"), T(".bin") },
- { T("application/oda"), T(".oda") },
- { T("application/pdf"), T(".pdf") },
- { T("application/postscript"), T(".ai") },
- { T("application/postscript"), T(".eps") },
- { T("application/postscript"), T(".ps") },
- { T("application/rtf"), T(".rtf") },
- { T("application/x-bcpio"), T(".bcpio") },
- { T("application/x-cpio"), T(".cpio") },
- { T("application/x-csh"), T(".csh") },
- { T("application/x-dvi"), T(".dvi") },
- { T("application/x-gtar"), T(".gtar") },
- { T("application/x-hdf"), T(".hdf") },
- { T("application/x-latex"), T(".latex") },
- { T("application/x-mif"), T(".mif") },
- { T("application/x-netcdf"), T(".nc") },
- { T("application/x-netcdf"), T(".cdf") },
- { T("application/x-ns-proxy-autoconfig"), T(".pac") },
- { T("application/x-patch"), T(".patch") },
- { T("application/x-sh"), T(".sh") },
- { T("application/x-shar"), T(".shar") },
- { T("application/x-sv4cpio"), T(".sv4cpio") },
- { T("application/x-sv4crc"), T(".sv4crc") },
- { T("application/x-tar"), T(".tar") },
- { T("application/x-tcl"), T(".tcl") },
- { T("application/x-tex"), T(".tex") },
- { T("application/x-texinfo"), T(".texinfo") },
- { T("application/x-texinfo"), T(".texi") },
- { T("application/x-troff"), T(".t") },
- { T("application/x-troff"), T(".tr") },
- { T("application/x-troff"), T(".roff") },
- { T("application/x-troff-man"), T(".man") },
- { T("application/x-troff-me"), T(".me") },
- { T("application/x-troff-ms"), T(".ms") },
- { T("application/x-ustar"), T(".ustar") },
- { T("application/x-wais-source"), T(".src") },
- { T("application/zip"), T(".zip") },
- { T("audio/basic"), T(".au snd") },
- { T("audio/x-aiff"), T(".aif") },
- { T("audio/x-aiff"), T(".aiff") },
- { T("audio/x-aiff"), T(".aifc") },
- { T("audio/x-wav"), T(".wav") },
- { T("audio/x-wav"), T(".ram") },
- { T("image/ief"), T(".ief") },
- { T("image/jpeg"), T(".jpeg") },
- { T("image/jpeg"), T(".jpe") },
- { T("image/tiff"), T(".tiff") },
- { T("image/tiff"), T(".tif") },
- { T("image/x-cmu-raster"), T(".ras") },
- { T("image/x-portable-anymap"), T(".pnm") },
- { T("image/x-portable-bitmap"), T(".pbm") },
- { T("image/x-portable-graymap"), T(".pgm") },
- { T("image/x-portable-pixmap"), T(".ppm") },
- { T("image/x-rgb"), T(".rgb") },
- { T("image/x-xbitmap"), T(".xbm") },
- { T("image/x-xpixmap"), T(".xpm") },
- { T("image/x-xwindowdump"), T(".xwd") },
- { T("text/html"), T(".cfm") },
- { T("text/html"), T(".shtm") },
- { T("text/html"), T(".shtml") },
- { T("text/richtext"), T(".rtx") },
- { T("text/tab-separated-values"), T(".tsv") },
- { T("text/x-setext"), T(".etx") },
- { T("video/mpeg"), T(".mpeg mpg mpe") },
- { T("video/quicktime"), T(".qt") },
- { T("video/quicktime"), T(".mov") },
- { T("video/x-msvideo"), T(".avi") },
- { T("video/x-sgi-movie"), T(".movie") },
-#endif
- { NULL, NULL},
-};
-
-/*****************************************************************************/
diff --git a/cpukit/httpd/misc.c b/cpukit/httpd/misc.c
deleted file mode 100644
index 88b65a2008..0000000000
--- a/cpukit/httpd/misc.c
+++ /dev/null
@@ -1,581 +0,0 @@
-/*
- * misc.c -- Miscellaneous routines.
- *
- * Copyright (c) GoAhead Software Inc., 1995-1999. All Rights Reserved.
- *
- * See the file "license.txt" for usage and redistribution license requirements
- */
-
-/********************************* Includes ***********************************/
-
-#if UEMF
- #include "uemf.h"
-#else
- #include "basic/basicInternal.h"
-#endif
-
-/********************************* Defines ************************************/
-/*
- * Sprintf buffer structure. Make the increment 8 less than 64 so that
- * a balloc can use a 64 byte block.
- */
-
-#define STR_REALLOC 0x1 /* Reallocate the buffer as required */
-#define STR_INC 58 /* Growth increment */
-
-typedef struct {
- char_t *s; /* Pointer to buffer */
- int size; /* Current buffer size */
- int max; /* Maximum buffer size */
- int count; /* Buffer count */
- int flags; /* Allocation flags */
-} strbuf_t;
-
-/*
- * Sprintf formatting flags
- */
-enum flag {
- flag_none = 0,
- flag_minus = 1,
- flag_plus = 2,
- flag_space = 4,
- flag_hash = 8,
- flag_zero = 16,
- flag_short = 32,
- flag_long = 64
-};
-
-/************************** Forward Declarations ******************************/
-
-static int dsnprintf(char_t **s, int size, char_t *fmt, va_list arg,
- int msize);
-static int strnlen(char_t *s, unsigned int n);
-static void put_char(strbuf_t *buf, char_t c);
-static void put_string(strbuf_t *buf, char_t *s, int len,
- int width, int prec, enum flag f);
-static void put_ulong(strbuf_t *buf, unsigned long int value, int base,
- int upper, char_t *prefix, int width, int prec, enum flag f);
-
-/************************************ Code ************************************/
-/*
- * "basename" returns a pointer to the last component of a pathname
- * LINUX, RTEMS, and LynxOS have their own basename function
- */
-
-#if ! LINUX & ! __rtems__ & ! LYNX
-char_t *basename(char_t* name)
-{
- char_t *cp;
-
-#if NW || WIN
- if (((cp = gstrrchr(name, '\\')) == NULL) &&
- ((cp = gstrrchr(name, '/')) == NULL)) {
- return name;
-#else
- if ((cp = gstrrchr(name, '/')) == NULL) {
- return name;
-#endif
- } else if (*(cp + 1) == '\0' && cp == name) {
- return name;
- } else if (*(cp + 1) == '\0' && cp != name) {
- return T("");
- } else {
- return ++cp;
- }
-}
-#endif /* ! LINUX && ! __rtems__ && ! LYNX */
-
-/******************************************************************************/
-/*
- * Returns a pointer to the directory component of a pathname. bufsize is
- * the size of the buffer in BYTES!
- */
-
-char_t *dirname(char_t* buf, char_t* name, int bufsize)
-{
- char_t* cp;
- int len;
-
- a_assert(name);
- a_assert(buf);
- a_assert(bufsize > 0);
-
-#if WIN || NW
- if ((cp = gstrrchr(name, '/')) == NULL &&
- (cp = gstrrchr(name, '\\')) == NULL)
-#else
- if ((cp = gstrrchr(name, '/')) == NULL)
-#endif
- {
- gstrcpy(buf, T("."));
- return buf;
- }
-
- if ((*(cp + 1) == '\0' && cp == name)) {
- gstrncpy(buf, T("."), TSZ(bufsize));
- gstrcpy(buf, T("."));
- return buf;
- }
-
- len = cp - name;
-
- if (len < bufsize) {
- gstrncpy(buf, name, len);
- buf[len] = '\0';
- } else {
- gstrncpy(buf, name, TSZ(bufsize));
- buf[bufsize - 1] = '\0';
- }
-
- return buf;
-}
-
-/******************************************************************************/
-/*
- * sprintf and vsprintf are bad, ok. You can easily clobber memory. Use
- * gsnprintf and gvsnprintf instead! These functions do _not_ support floating
- * point, like %e, %f, %g...
- */
-
-int gsnprintf(char_t **s, int n, char_t *fmt, ...)
-{
- va_list ap;
- int result;
-
- a_assert(s);
- a_assert(fmt);
-
- *s = NULL;
- va_start(ap, fmt);
- result = gvsnprintf(s, n, fmt, ap);
- va_end(ap);
- return result;
-}
-
-/******************************************************************************/
-/*
- * This function appends the formatted string to the supplied string,
- * reallocing if required.
- */
-
-int gsprintfRealloc(char_t **s, int n, int msize, char_t *fmt, ...)
-{
- va_list ap;
- int result;
-
- a_assert(s);
- a_assert(fmt);
-
- if (msize == -1) {
- *s = NULL;
- }
- va_start(ap, fmt);
- result = dsnprintf(s, n, fmt, ap, msize);
- va_end(ap);
- return result;
-}
-
-/******************************************************************************/
-/*
- * A vsprintf replacement.
- */
-
-int gvsnprintf(char_t **s, int n, char_t *fmt, va_list arg)
-{
- a_assert(s);
- a_assert(fmt);
-
- return dsnprintf(s, n, fmt, arg, 0);
-}
-
-/******************************************************************************/
-/*
- * Dynamic sprintf implementation. Supports dynamic buffer allocation also.
- * This function can be called multiple times to grow an existing allocated
- * buffer. In this case, msize is set to the size of the previously allocated
- * buffer. The buffer will be realloced, as required. If msize is set, we
- * return the size of the allocated buffer for use with the next call. For
- * the first call, msize can be set to -1.
- */
-
-static int dsnprintf(char_t **s, int size, char_t *fmt, va_list arg, int msize)
-{
- strbuf_t buf;
- char_t c;
-
- a_assert(s);
- a_assert(fmt);
-
- memset(&buf, 0, sizeof(buf));
- buf.s = *s;
-
- if (*s == NULL || msize != 0) {
- buf.max = size;
- buf.flags |= STR_REALLOC;
- if (msize != 0) {
- buf.size = max(msize, 0);
- }
- if (*s != NULL && msize != 0) {
- buf.count = gstrlen(*s);
- }
- } else {
- buf.size = size;
- }
-
- while ((c = *fmt++) != '\0') {
- if (c != '%' || (c = *fmt++) == '%') {
- put_char(&buf, c);
- } else {
- enum flag f = flag_none;
- int width = 0;
- int prec = -1;
- for ( ; c != '\0'; c = *fmt++) {
- if (c == '-') {
- f |= flag_minus;
- } else if (c == '+') {
- f |= flag_plus;
- } else if (c == ' ') {
- f |= flag_space;
- } else if (c == '#') {
- f |= flag_hash;
- } else if (c == '0') {
- f |= flag_zero;
- } else {
- break;
- }
- }
- if (c == '*') {
- width = va_arg(arg, int);
- if (width < 0) {
- f |= flag_minus;
- width = -width;
- }
- c = *fmt++;
- } else {
- for ( ; gisdigit(c); c = *fmt++) {
- width = width * 10 + (c - '0');
- }
- }
- if (c == '.') {
- f &= ~flag_zero;
- c = *fmt++;
- if (c == '*') {
- prec = va_arg(arg, int);
- c = *fmt++;
- } else {
- for (prec = 0; gisdigit(c); c = *fmt++) {
- prec = prec * 10 + (c - '0');
- }
- }
- }
- if (c == 'h' || c == 'l') {
- f |= (c == 'h' ? flag_short : flag_long);
- c = *fmt++;
- }
- if (c == 'd' || c == 'i') {
- long int value;
- if (f & flag_short) {
- value = (short int) va_arg(arg, int);
- } else if (f & flag_long) {
- value = va_arg(arg, long int);
- } else {
- value = va_arg(arg, int);
- }
- if (value >= 0) {
- if (f & flag_plus) {
- put_ulong(&buf, value, 10, 0, T("+"), width, prec, f);
- } else if (f & flag_space) {
- put_ulong(&buf, value, 10, 0, T(" "), width, prec, f);
- } else {
- put_ulong(&buf, value, 10, 0, NULL, width, prec, f);
- }
- } else {
- put_ulong(&buf, -value, 10, 0, T("-"), width, prec, f);
- }
- } else if (c == 'o' || c == 'u' || c == 'x' || c == 'X') {
- unsigned long int value;
- if (f & flag_short) {
- value = (unsigned short int) va_arg(arg, unsigned int);
- } else if (f & flag_long) {
- value = va_arg(arg, unsigned long int);
- } else {
- value = va_arg(arg, unsigned int);
- }
- if (c == 'o') {
- if (f & flag_hash && value != 0) {
- put_ulong(&buf, value, 8, 0, T("0"), width, prec, f);
- } else {
- put_ulong(&buf, value, 8, 0, NULL, width, prec, f);
- }
- } else if (c == 'u') {
- put_ulong(&buf, value, 10, 0, NULL, width, prec, f);
- } else {
- if (f & flag_hash && value != 0) {
- if (c == 'x') {
- put_ulong(&buf, value, 16, 0, T("0x"), width,
- prec, f);
- } else {
- put_ulong(&buf, value, 16, 1, T("0X"), width,
- prec, f);
- }
- } else {
- put_ulong(&buf, value, 16, 0, NULL, width, prec, f);
- }
- }
-
- } else if (c == 'c') {
- char_t value = va_arg(arg, int);
- put_char(&buf, value);
-
- } else if (c == 's' || c == 'S') {
- char_t *value = va_arg(arg, char_t *);
- if (value == NULL) {
- put_string(&buf, T("(null)"), -1, width, prec, f);
- } else if (f & flag_hash) {
- put_string(&buf,
- value + 1, (char_t) *value, width, prec, f);
- } else {
- put_string(&buf, value, -1, width, prec, f);
- }
- } else if (c == 'p') {
- void *value = va_arg(arg, void *);
- put_ulong(&buf,
- (unsigned long int) value, 16, 0, T("0x"), width, prec, f);
- } else if (c == 'n') {
- if (f & flag_short) {
- short int *value = va_arg(arg, short int *);
- *value = buf.count;
- } else if (f & flag_long) {
- long int *value = va_arg(arg, long int *);
- *value = buf.count;
- } else {
- int *value = va_arg(arg, int *);
- *value = buf.count;
- }
- } else {
- put_char(&buf, c);
- }
- }
- }
- if (buf.s == NULL) {
- put_char(&buf, '\0');
- }
-
-/*
- * If the user requested a dynamic buffer (*s == NULL), ensure it is returned.
- */
- if (*s == NULL || msize != 0) {
- *s = buf.s;
- }
-
- if (*s != NULL && size > 0) {
- if (buf.count < size) {
- (*s)[buf.count] = '\0';
- } else {
- (*s)[buf.size - 1] = '\0';
- }
- }
-
- if (msize != 0) {
- return buf.size;
- }
- return buf.count;
-}
-
-/******************************************************************************/
-/*
- * Return the length of a string limited by a given length
- */
-
-static int strnlen(char_t *s, unsigned int n)
-{
- unsigned int len;
-
- len = gstrlen(s);
- return min(len, n);
-}
-
-/******************************************************************************/
-/*
- * Add a character to a string buffer
- */
-
-static void put_char(strbuf_t *buf, char_t c)
-{
- if (buf->count >= buf->size) {
- if (! (buf->flags & STR_REALLOC)) {
- return;
- }
- buf->size += STR_INC;
- if (buf->size > buf->max && buf->size > STR_INC) {
- a_assert(buf->size <= buf->max);
- buf->size -= STR_INC;
- return;
- }
- if (buf->s == NULL) {
- buf->s = balloc(B_L, buf->size * sizeof(char_t*));
- } else {
- buf->s = brealloc(B_L, buf->s, buf->size * sizeof(char_t*));
- }
- }
- buf->s[buf->count] = c;
- ++buf->count;
-}
-
-/******************************************************************************/
-/*
- * Add a string to a string buffer
- */
-
-static void put_string(strbuf_t *buf, char_t *s, int len, int width,
- int prec, enum flag f)
-{
- int i;
-
- if (len < 0) {
- len = strnlen(s, prec >= 0 ? prec : ULONG_MAX);
- } else if (prec >= 0 && prec < len) {
- len = prec;
- }
- if (width > len && !(f & flag_minus)) {
- for (i = len; i < width; ++i) {
- put_char(buf, ' ');
- }
- }
- for (i = 0; i < len; ++i) {
- put_char(buf, s[i]);
- }
- if (width > len && f & flag_minus) {
- for (i = len; i < width; ++i) {
- put_char(buf, ' ');
- }
- }
-}
-
-/******************************************************************************/
-/*
- * Add a long to a string buffer
- */
-
-static void put_ulong(strbuf_t *buf, unsigned long int value, int base,
- int upper, char_t *prefix, int width, int prec, enum flag f)
-{
- unsigned long x, x2;
- int len, zeros, i;
-
- for (len = 1, x = 1; x < ULONG_MAX / base; ++len, x = x2) {
- x2 = x * base;
- if (x2 > value) {
- break;
- }
- }
- zeros = (prec > len) ? prec - len : 0;
- width -= zeros + len;
- if (prefix != NULL) {
- width -= strnlen(prefix, ULONG_MAX);
- }
- if (!(f & flag_minus)) {
- for (i = 0; i < width; ++i) {
- put_char(buf, ' ');
- }
- }
- if (prefix != NULL) {
- put_string(buf, prefix, -1, 0, -1, flag_none);
- }
- for (i = 0; i < zeros; ++i) {
- put_char(buf, '0');
- }
- for ( ; x > 0; x /= base) {
- int digit = (value / x) % base;
- put_char(buf, (char) ((digit < 10 ? '0' : (upper ? 'A' : 'a') - 10) +
- digit));
- }
- if (f & flag_minus) {
- for (i = 0; i < width; ++i) {
- put_char(buf, ' ');
- }
- }
-}
-
-/******************************************************************************/
-/*
- * Convert an ansi string to a unicode string. On an error, we return the
- * original ansi string which is better than returning NULL. nBytes is the
- * size of the destination buffer (ubuf) in _bytes_.
- */
-
-char_t *ascToUni(char_t *ubuf, char *str, int nBytes)
-{
-#if UNICODE
- if (MultiByteToWideChar(CP_ACP, 0, str, nBytes / sizeof(char_t), ubuf,
- nBytes / sizeof(char_t)) < 0) {
- return (char_t*) str;
- }
-#else
- memcpy(ubuf, str, nBytes);
-#endif
- return ubuf;
-}
-
-/******************************************************************************/
-/*
- * Convert a unicode string to an ansi string. On an error, return the
- * original unicode string which is better than returning NULL.
- * N.B. nBytes is the number of _bytes_ in the destination buffer, buf.
- */
-
-char *uniToAsc(char *buf, char_t* ustr, int nBytes)
-{
-#if UNICODE
- if (WideCharToMultiByte(CP_ACP, 0, ustr, nBytes, buf, nBytes, NULL,
- NULL) < 0) {
- return (char*) ustr;
- }
-#else
- memcpy(buf, ustr, nBytes);
-#endif
- return (char*) buf;
-}
-
-
-/******************************************************************************/
-/*
- * allocate (balloc) a buffer and do ascii to unicode conversion into it.
- * cp points to the ascii string which must be NULL terminated.
- * Return a pointer to the unicode buffer which must be bfree'd later.
- * Return NULL on failure to get buffer.
- */
-char_t *ballocAscToUni(char * cp)
-{
- char_t * unip;
- int ulen;
-
- ulen = (strlen(cp) + 1) * sizeof(char_t);
- if ((unip = balloc(B_L, ulen)) == NULL) {
- return NULL;
- }
- ascToUni(unip, cp, ulen);
- return unip;
-}
-
-/******************************************************************************/
-/*
- * allocate (balloc) a buffer and do unicode to ascii conversion into it.
- * unip points to the unicoded string. ulen is the number of characters
- * in the unicode string including teminating null, if there is one.
- * Return a pointer to the ascii buffer which must be bfree'd later.
- * Return NULL on failure to get buffer.
- */
-char *ballocUniToAsc(char_t * unip, int ulen)
-{
- char * cp;
-
- if ((cp = balloc(B_L, ulen)) == NULL) {
- return NULL;
- }
- uniToAsc(cp, unip, ulen);
- return cp;
-}
-
-/******************************************************************************/
-
diff --git a/cpukit/httpd/ringq.c b/cpukit/httpd/ringq.c
deleted file mode 100644
index 62c4634eef..0000000000
--- a/cpukit/httpd/ringq.c
+++ /dev/null
@@ -1,537 +0,0 @@
-/*
- * ringq.c -- Ring queue buffering module
- *
- * Copyright (c) GoAhead Software Inc., 1995-1999. All Rights Reserved.
- *
- * See the file "license.txt" for usage and redistribution license requirements
- */
-
-/******************************** Description *********************************/
-
-/*
- * A ring queue allows maximum utilization of memory for data storage and is
- * ideal for input/output buffering. This module provides a highly effecient
- * implementation and a vehicle for dynamic strings.
- *
- * WARNING: This is a public implementation and callers have full access to
- * the queue structure and pointers. Change this module very carefully.
- *
- * This module follows the open/close model.
- *
- * Operation of a ringq where rq is a pointer to a ringq :
- *
- * rq->buflen contains the size of the buffer.
- * rq->buf will point to the start of the buffer.
- * rq->servp will point to the first (un-consumed) data byte.
- * rq->endp will point to the next free location to which new data is added
- * rq->endbuf will point to one past the end of the buffer.
- *
- * Eg. If the ringq contains the data "abcdef", it might look like :
- *
- * +-------------------------------------------------------------------+
- * | | | | | | | | a | b | c | d | e | f | | | | |
- * +-------------------------------------------------------------------+
- * ^ ^ ^ ^
- * | | | |
- * rq->buf rq->servp rq->endp rq->enduf
- *
- * The queue is empty when servp == endp. This means that the queue will hold
- * at most rq->buflen -1 bytes. It is the fillers responsibility to ensure
- * the ringq is never filled such that servp == endp.
- *
- * It is the fillers responsibility to "wrap" the endp back to point to
- * rq->buf when the pointer steps past the end. Correspondingly it is the
- * consumers responsibility to "wrap" the servp when it steps to rq->endbuf.
- * The ringqPutc and ringqGetc routines will do this automatically.
- */
-
-/********************************* Includes ***********************************/
-
-#if UEMF
- #include "uemf.h"
-#else
- #include "basic/basicInternal.h"
-#endif
-
-/*********************************** Defines **********************************/
-/*
- * Faster than a function call
- */
-
-#define RINGQ_LEN(rq) \
- ((rq->servp > rq->endp) ? \
- (rq->buflen + (rq->endp - rq->servp)) : \
- (rq->endp - rq->servp))
-
-/***************************** Forward Declarations ***************************/
-
-static int ringq_grow(ringq_t *rq);
-
-/*********************************** Code *************************************/
-/*
- * Create a new ringq. "increment" is the amount to increase the size of the
- * ringq should it need to grow to accomodate data being added. "maxsize" is
- * an upper limit (sanity level) beyond which the q must not grow. Set maxsize
- * to -1 to imply no upper limit. The buffer for the ringq is always
- * dynamically allocated. Set maxsize
- */
-
-int ringqOpen(ringq_t *rq, int increment, int maxsize)
-{
- a_assert(rq);
- a_assert(increment >= 0);
-
- if ((rq->buf = balloc(B_L, increment)) == NULL) {
- return -1;
- }
- rq->maxsize = maxsize;
- rq->buflen = increment;
- rq->increment = increment;
- rq->endbuf = &rq->buf[rq->buflen];
- rq->servp = rq->buf;
- rq->endp = rq->buf;
- *rq->servp = '\0';
- return 0;
-}
-
-/******************************************************************************/
-/*
- * Delete a ringq and free the ringq buffer.
- */
-
-void ringqClose(ringq_t *rq)
-{
- a_assert(rq);
- a_assert(rq->buflen == (rq->endbuf - rq->buf));
-
- if (rq == NULL) {
- return;
- }
-
- ringqFlush(rq);
- bfree(B_L, (char*) rq->buf);
- rq->buf = NULL;
-}
-
-/******************************************************************************/
-/*
- * Return the length of the ringq. Users must fill the queue to a high
- * water mark of at most one less than the queue size.
- */
-
-int ringqLen(ringq_t *rq)
-{
- a_assert(rq);
- a_assert(rq->buflen == (rq->endbuf - rq->buf));
-
- if (rq->servp > rq->endp) {
- return rq->buflen + rq->endp - rq->servp;
- }
- else {
- return rq->endp - rq->servp;
- }
-}
-
-/******************************************************************************/
-/*
- * Get a byte from the queue
- */
-
-int ringqGetc(ringq_t *rq)
-{
- char_t c;
- char_t* cp;
-
- a_assert(rq);
- a_assert(rq->buflen == (rq->endbuf - rq->buf));
-
- if (rq->servp == rq->endp) {
- return -1;
- }
-
- cp = (char_t*) rq->servp;
- c = *cp++;
- rq->servp = (unsigned char *) cp;
- if (rq->servp >= rq->endbuf) {
- rq->servp = rq->buf;
- }
- return c;
-}
-
-/******************************************************************************/
-/*
- * Add a char to the queue. Note if being used to store wide strings
- * this does not add a trailing '\0'. Grow the q as required.
- */
-
-int ringqPutc(ringq_t *rq, char_t c)
-{
- char_t* cp;
-
- a_assert(rq);
- a_assert(rq->buflen == (rq->endbuf - rq->buf));
-
- if (ringqPutBlkMax(rq) < (int) sizeof(char_t) && !ringq_grow(rq)) {
- return -1;
- }
-
- cp = (char_t*) rq->endp;
- *cp++ = (char_t) c;
- rq->endp = (unsigned char *) cp;
- if (rq->endp >= rq->endbuf) {
- rq->endp = rq->buf;
- }
- return 0;
-}
-
-/******************************************************************************/
-/*
- * Insert a wide character at the front of the queue
- */
-
-int ringqInsertc(ringq_t *rq, char_t c)
-{
- char_t* cp;
-
- a_assert(rq);
- a_assert(rq->buflen == (rq->endbuf - rq->buf));
-
- if (ringqPutBlkMax(rq) < (int) sizeof(char_t) && !ringq_grow(rq)) {
- return -1;
- }
- if (rq->servp <= rq->buf) {
- rq->servp = rq->endbuf;
- }
- cp = (char_t*) rq->servp;
- *--cp = (char_t) c;
- rq->servp = (unsigned char *) cp;
- return 0;
-}
-
-/******************************************************************************/
-/*
- * Add a string to the queue. Add a trailing wide null (two nulls)
- */
-
-int ringqPutstr(ringq_t *rq, char_t *str)
-{
- int rc;
-
- a_assert(rq);
- a_assert(str);
- a_assert(rq->buflen == (rq->endbuf - rq->buf));
-
- rc = ringqPutBlk(rq, (unsigned char*) str, gstrlen(str) * sizeof(char_t));
- *((char_t*) rq->endp) = (char_t) '\0';
- return rc;
-}
-
-/******************************************************************************/
-#if UNICODE
-/*
- * Get a byte from the queue
- */
-
-int ringqGetcA(ringq_t *rq)
-{
- unsigned char c;
-
- a_assert(rq);
- a_assert(rq->buflen == (rq->endbuf - rq->buf));
-
- if (rq->servp == rq->endp) {
- return -1;
- }
-
- c = *rq->servp++;
- if (rq->servp >= rq->endbuf) {
- rq->servp = rq->buf;
- }
- return c;
-}
-
-/******************************************************************************/
-/*
- * Add a byte to the queue. Note if being used to store strings this does not
- * add a trailing '\0'. Grow the q as required.
- */
-
-int ringqPutcA(ringq_t *rq, char c)
-{
- a_assert(rq);
- a_assert(rq->buflen == (rq->endbuf - rq->buf));
-
- if (ringqPutBlkMax(rq) == 0 && !ringq_grow(rq)) {
- return -1;
- }
-
- *rq->endp++ = (unsigned char) c;
- if (rq->endp >= rq->endbuf) {
- rq->endp = rq->buf;
- }
- return 0;
-}
-
-/******************************************************************************/
-/*
- * Insert a byte at the front of the queue
- */
-
-int ringqInsertcA(ringq_t *rq, char c)
-{
- a_assert(rq);
- a_assert(rq->buflen == (rq->endbuf - rq->buf));
-
- if (ringqPutBlkMax(rq) == 0 && !ringq_grow(rq)) {
- return -1;
- }
- if (rq->servp <= rq->buf) {
- rq->servp = rq->endbuf;
- }
- *--rq->servp = (unsigned char) c;
- return 0;
-}
-
-/******************************************************************************/
-/*
- * Add a string to the queue. Add a trailing null (not really in the q).
- * ie. beyond the last valid byte.
- */
-
-int ringqPutstrA(ringq_t *rq, char *str)
-{
- int rc;
-
- a_assert(rq);
- a_assert(str);
- a_assert(rq->buflen == (rq->endbuf - rq->buf));
-
- rc = ringqPutBlk(rq, (unsigned char*) str, strlen(str));
- rq->endp[0] = '\0';
- return rc;
-}
-
-#endif /* UNICODE */
-/******************************************************************************/
-/*
- * Add a block of data to the ringq. Return the number of bytes added.
- * Grow the q as required.
- */
-
-int ringqPutBlk(ringq_t *rq, unsigned char *buf, int size)
-{
- int this, bytes_put;
-
- a_assert(rq);
- a_assert(rq->buflen == (rq->endbuf - rq->buf));
- a_assert(buf);
- a_assert(0 <= size);
-
-/*
- * Loop adding the maximum bytes we can add in a single straight line copy
- */
- bytes_put = 0;
- while (size > 0) {
- this = min(ringqPutBlkMax(rq), size);
- if (this <= 0) {
- if (! ringq_grow(rq)) {
- break;
- }
- this = min(ringqPutBlkMax(rq), size);
- }
-
- memcpy(rq->endp, buf, this);
- buf += this;
- rq->endp += this;
- size -= this;
- bytes_put += this;
-
- if (rq->endp >= rq->endbuf) {
- rq->endp = rq->buf;
- }
- }
- return bytes_put;
-}
-
-/******************************************************************************/
-/*
- * Get a block of data from the ringq. Return the number of bytes returned.
- */
-
-int ringqGetBlk(ringq_t *rq, unsigned char *buf, int size)
-{
- int this, bytes_read;
-
- a_assert(rq);
- a_assert(rq->buflen == (rq->endbuf - rq->buf));
- a_assert(buf);
- a_assert(0 <= size && size < rq->buflen);
-
-/*
- * Loop getting the maximum bytes we can get in a single straight line copy
- */
- bytes_read = 0;
- while (size > 0) {
- this = ringqGetBlkMax(rq);
- this = min(this, size);
- if (this <= 0) {
- break;
- }
-
- memcpy(buf, rq->servp, this);
- buf += this;
- rq->servp += this;
- size -= this;
- bytes_read += this;
-
- if (rq->servp >= rq->endbuf) {
- rq->servp = rq->buf;
- }
- }
- return bytes_read;
-}
-
-/******************************************************************************/
-/*
- * Return the maximum number of bytes the ring q can accept via a single
- * block copy. Useful if the user is doing their own data insertion.
- */
-
-int ringqPutBlkMax(ringq_t *rq)
-{
- int space, in_a_line;
-
- a_assert(rq);
- a_assert(rq->buflen == (rq->endbuf - rq->buf));
-
- space = rq->buflen - RINGQ_LEN(rq) - 1;
- in_a_line = rq->endbuf - rq->endp;
-
- return min(in_a_line, space);
-}
-
-/******************************************************************************/
-/*
- * Return the maximum number of bytes the ring q can provide via a single
- * block copy. Useful if the user is doing their own data retrieval.
- */
-
-int ringqGetBlkMax(ringq_t *rq)
-{
- int len, in_a_line;
-
- a_assert(rq);
- a_assert(rq->buflen == (rq->endbuf - rq->buf));
-
- len = RINGQ_LEN(rq);
- in_a_line = rq->endbuf - rq->servp;
-
- return min(in_a_line, len);
-}
-
-/******************************************************************************/
-/*
- * Adjust the endp pointer after the user has copied data into the queue.
- */
-
-void ringqPutBlkAdj(ringq_t *rq, int size)
-{
- a_assert(rq);
- a_assert(rq->buflen == (rq->endbuf - rq->buf));
- a_assert(0 <= size && size < rq->buflen);
-
- rq->endp += size;
- if (rq->endp >= rq->endbuf) {
- rq->endp -= rq->buflen;
- }
-/*
- * Flush the queue if the endp pointer is corrupted via a bad size
- */
- if (rq->endp >= rq->endbuf) {
- error(E_L, E_LOG, T("Bad end pointer"));
- ringqFlush(rq);
- }
-}
-
-/******************************************************************************/
-/*
- * Adjust the servp pointer after the user has copied data from the queue.
- */
-
-void ringqGetBlkAdj(ringq_t *rq, int size)
-{
- a_assert(rq);
- a_assert(rq->buflen == (rq->endbuf - rq->buf));
- a_assert(0 < size && size < rq->buflen);
-
- rq->servp += size;
- if (rq->servp >= rq->endbuf) {
- rq->servp -= rq->buflen;
- }
-/*
- * Flush the queue if the servp pointer is corrupted via a bad size
- */
- if (rq->servp >= rq->endbuf) {
- error(E_L, E_LOG, T("Bad serv pointer"));
- ringqFlush(rq);
- }
-}
-
-/******************************************************************************/
-/*
- * Flush all data in a ring q. Reset the pointers.
- */
-
-void ringqFlush(ringq_t *rq)
-{
- a_assert(rq);
-
- rq->servp = rq->buf;
- rq->endp = rq->buf;
- *rq->servp = '\0';
-}
-
-/******************************************************************************/
-/*
- * Grow the buffer. Return true if the buffer can be grown. Grow using
- * the increment size specified when opening the ringq. Don't grow beyond
- * the maximum possible size.
- */
-
-static int ringq_grow(ringq_t *rq)
-{
- unsigned char *newbuf;
- int len;
-
- a_assert(rq);
-
- if (rq->maxsize >= 0 && rq->buflen >= rq->maxsize) {
- return 0;
- }
-
- len = ringqLen(rq);
-
- if ((newbuf = balloc(B_L, rq->buflen + rq->increment)) == NULL) {
- return 0;
- }
- ringqGetBlk(rq, newbuf, ringqLen(rq));
- bfree(B_L, (char*) rq->buf);
-
-#if OLD
- rq->endp = &newbuf[endp];
- rq->servp = &newbuf[servp];
- rq->endbuf = &newbuf[rq->buflen];
- rq->buf = newbuf;
-#endif
-
- rq->buflen += rq->increment;
- rq->endp = newbuf;
- rq->servp = newbuf;
- rq->buf = newbuf;
- rq->endbuf = &rq->buf[rq->buflen];
-
- ringqPutBlk(rq, newbuf, len);
- return 1;
-}
-
-/******************************************************************************/
diff --git a/cpukit/httpd/rom.c b/cpukit/httpd/rom.c
deleted file mode 100644
index 4e6c8f1e93..0000000000
--- a/cpukit/httpd/rom.c
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
- * rom.c -- Support for ROMed page retrieval.
- *
- * Copyright (c) Go Ahead Software Inc., 1995-1999. All Rights Reserved.
- *
- * See the file "license.txt" for usage and redistribution license requirements
- */
-
-/******************************** Description *********************************/
-
-/*
- * This module provides web page retrieval from compiled web pages. Use the
- * webcomp program to compile web pages and link into the GoAhead WebServer.
- * This module uses a hashed symbol table for fast page lookup.
- *
- * Usage: webcomp -f webPageFileList -p Prefix >webrom.c
- */
-
-/********************************* Includes ***********************************/
-
-#include <stdlib.h>
-
-#if CE
-#define EINVAL 22
-#define EBADF 9
-#else
-#include <errno.h>
-#endif
-
-#include "wsIntrn.h"
-
-/******************************** Local Data **********************************/
-
-#if WEBS_PAGE_ROM
-
-sym_fd_t romTab; /* Symbol table for web pages */
-
-/*********************************** Code *************************************/
-/*
- * Open the ROM module
- */
-
-int websRomOpen()
-{
- websRomPageIndexType *wip;
- int nchars;
- char_t name[SYM_MAX];
-
- romTab = symOpen(64);
-
- for (wip = websRomPageIndex; wip->path; wip++) {
- gstrncpy(name, wip->path, SYM_MAX);
- nchars = gstrlen(name) - 1;
- if (nchars > 0 &&
- (name[nchars] == '/' || name[nchars] == '\\')) {
- name[nchars] = '\0';
- }
- symEnter(romTab, name, valueInteger((int) wip), 0);
- }
- return 0;
-}
-
-/******************************************************************************/
-/*
- * Close the ROM module
- */
-
-void websRomClose()
-{
- symClose(romTab, NULL);
-}
-
-/******************************************************************************/
-/*
- * Open a web page
- */
-
-int websRomPageOpen(webs_t wp, char_t *path, int mode, int perm)
-{
- websRomPageIndexType *wip;
- sym_t *sp;
-
- a_assert(websValid(wp));
- a_assert(path && *path);
-
- if ((sp = symLookup(romTab, path)) == NULL) {
- return -1;
- }
- wip = (websRomPageIndexType*) sp->content.value.integer;
- wip->pos = 0;
- return (wp->docfd = wip - websRomPageIndex);
-}
-
-/******************************************************************************/
-/*
- * Close a web page
- */
-
-void websRomPageClose(int fd)
-{
-}
-
-/******************************************************************************/
-/*
- * Stat a web page
- */
-
-int websRomPageStat(char_t *path, websStatType* sbuf)
-{
- websRomPageIndexType *wip;
- sym_t *sp;
-
- a_assert(path && *path);
-
- if ((sp = symLookup(romTab, path)) == NULL) {
- return -1;
- }
- wip = (websRomPageIndexType*) sp->content.value.integer;
-
- memset(sbuf, 0, sizeof(websStatType));
- sbuf->size = wip->size;
- if (wip->page == NULL) {
- sbuf->isDir = 1;
- }
- return 0;
-}
-
-/******************************************************************************/
-/*
- * Read a web page
- */
-
-int websRomPageReadData(webs_t wp, char *buf, int nBytes)
-{
- websRomPageIndexType *wip;
- int len;
-
- a_assert(websValid(wp));
- a_assert(buf);
- a_assert(wp->docfd >= 0);
-
- wip = &websRomPageIndex[wp->docfd];
-
- len = min(wip->size - wip->pos, nBytes);
- memcpy(buf, &wip->page[wip->pos], len);
- wip->pos += len;
- return len;
-}
-
-/******************************************************************************/
-/*
- * Position a web page
- */
-
-long websRomPageSeek(webs_t wp, long offset, int origin)
-{
- websRomPageIndexType *wip;
- long pos;
-
- a_assert(websValid(wp));
- a_assert(origin == SEEK_SET || origin == SEEK_CUR || origin == SEEK_END);
- a_assert(wp->docfd >= 0);
-
- wip = &websRomPageIndex[wp->docfd];
-
- if (origin != SEEK_SET && origin != SEEK_CUR && origin != SEEK_END) {
- errno = EINVAL;
- return -1;
- }
-
- if (wp->docfd < 0) {
- errno = EBADF;
- return -1;
- }
-
- pos = offset;
- switch (origin) {
- case SEEK_CUR:
- pos = wip->pos + offset;
- break;
- case SEEK_END:
- pos = wip->size + offset;
- break;
- default:
- break;
- }
-
- if (pos < 0) {
- errno = EBADF;
- return -1;
- }
-
- return (wip->pos = pos);
-}
-
-#endif
-
-/******************************************************************************/
diff --git a/cpukit/httpd/rtems_webserver.h b/cpukit/httpd/rtems_webserver.h
deleted file mode 100644
index f1e4046ef5..0000000000
--- a/cpukit/httpd/rtems_webserver.h
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
- * rtems_webserver.h --
- *
- */
-
-int rtems_initialize_webserver();
-
diff --git a/cpukit/httpd/security.c b/cpukit/httpd/security.c
deleted file mode 100644
index 01d4000f40..0000000000
--- a/cpukit/httpd/security.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * security.c -- Security handler
- *
- * Copyright (c) Go Ahead Software Inc., 1995-1999. All Rights Reserved.
- *
- * See the file "license.txt" for usage and redistribution license requirements
- */
-
-/******************************** Description *********************************/
-
-/*
- * This module provides a basic security policy. It supports a single global
- * password and ignores the username. Encoding/decoding of the password is
- * -not- done.
- */
-
-/********************************* Includes ***********************************/
-
-#include "wsIntrn.h"
-
-/******************************** Local Data **********************************/
-
-static char_t websPassword[WEBS_MAX_PASS]; /* Access password (decoded) */
-
-/*********************************** Code *************************************/
-/*
- * Determine if this request should be honored
- */
-
-int websSecurityHandler(webs_t wp, char_t *urlPrefix, char_t *webDir, int arg,
- char_t *url, char_t *path, char_t *query)
-{
- char_t *type, *password;
- int flags;
-
- a_assert(websValid(wp));
- a_assert(url && *url);
- a_assert(path && *path);
-
-/*
- * Get the critical request details
- */
- type = websGetRequestType(wp);
- password = websGetRequestPassword(wp);
- flags = websGetRequestFlags(wp);
-
-/*
- * Validate the users password if required (local access is always allowed)
- * We compare the decoded form of the password.
- */
- if (*websPassword && !(flags & WEBS_LOCAL_REQUEST)) {
-
- if (password && *password) {
- if (gstrcmp(password, websPassword) != 0) {
- websStats.access++;
- websError(wp, 200, T("Access Denied\nWrong Password"));
- websSetPassword(T(""));
- return 1;
- }
- } else {
-/*
- * This will cause the browser to display a password / username
- * dialog
- */
- websStats.errors++;
- websError(wp, 401, T("<html><head>Access Denied</head><body>\r\n\
- Access to this document requires a password.</body>\
- </html>\r\n"));
- return 1;
- }
- }
- return 0;
-}
-
-/******************************************************************************/
-/*
- * Delete the default security handler
- */
-
-void websSecurityDelete()
-{
- websUrlHandlerDelete(websSecurityHandler);
-}
-
-/******************************************************************************/
-/*
- * Store the new password, expect a decoded password. Store in websPassword in
- * the decoded form.
- */
-
-void websSetPassword(char_t *password)
-{
- a_assert(password);
-
- gstrncpy(websPassword, password, TSZ(websPassword));
-}
-
-/******************************************************************************/
-/*
- * Get password, return the decoded form
- */
-
-char_t *websGetPassword()
-{
- return websPassword;
-}
-
-/******************************************************************************/
-
diff --git a/cpukit/httpd/socket.c b/cpukit/httpd/socket.c
deleted file mode 100644
index 81d81eb6fd..0000000000
--- a/cpukit/httpd/socket.c
+++ /dev/null
@@ -1,994 +0,0 @@
-/*
- * socket.c -- Socket support module for UNIX
- *
- * Copyright (c) Go Ahead, 1995-1999
- */
-
-/******************************** Description *********************************/
-
-/*
- * SCO Unix Socket Module. This supports non-blocking buffered socket I/O.
- */
-
-/********************************** Includes **********************************/
-
-#include <errno.h>
-#include <fcntl.h>
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-#if __rtems__
-#include <sys/select.h>
-#endif
-
-#include "uemf.h"
-
-/*********************************** Defines **********************************/
-
-typedef struct {
- char host[64]; /* Host name */
- ringq_t inBuf; /* Input ring queue */
- ringq_t outBuf; /* Output ring queue */
- ringq_t lineBuf; /* Line ring queue */
- socketAccept_t accept; /* Accept handler */
- socketHandler_t handler; /* User I/O handler */
- int handler_data; /* User handler data */
- int sid; /* Index into socket[] */
- int port; /* Port to listen on */
- int flags; /* Current state flags */
- int readyMask; /* Events now ready */
- int interestMask; /* Events interest */
- int error; /* Last error */
- int sock; /* Actual socket handle */
-} socket_t;
-
-/************************************ Locals **********************************/
-
-static socket_t** socketList; /* List of open sockets */
-static int socketMax; /* Maximum size of socket */
-static int socketHighestFd = -1; /* Highest socket fd opened */
-
-/***************************** Forward Declarations ***************************/
-
-static int socketAlloc(char* host, int port, socketAccept_t accept, int flags);
-static void socketFree(int sid);
-static void socketAccept(socket_t* sp);
-static int socketGetInput(int sid, char* buf, int toRead, int* errCode);
-static int socketDoOutput(socket_t* sp, char* buf, int toWrite, int* errCode);
-static int socketDoEvent(socket_t *sp);
-static int socketGetError();
-static int socketWaitForEvent(socket_t* sp, int events, int* errCode);
-static int socketNonBlock(socket_t *sp);
-static socket_t* socketPtr(int sid);
-
-/*********************************** Code *************************************/
-/*
- * Open socket module
- */
-
-int socketOpen()
-{
- return 0;
-}
-
-/******************************************************************************/
-/*
- * Close the socket module, by closing all open connections
- */
-
-void socketClose()
-{
- int i;
-
- for (i = socketMax; i >= 0; i--) {
- if (socketList && socketList[i]) {
- socketCloseConnection(i);
- }
- }
-}
-
-/******************************************************************************/
-/*
- * Open a client or server socket. Host is NULL if we want server capability.
- */
-
-int socketOpenConnection(char* host, int port, socketAccept_t accept, int flags)
-{
- socket_t *sp;
- struct sockaddr_in sockaddr;
- struct hostent *hostent; /* Host database entry */
- int sid, rc;
-
-/*
- * Allocate a socket structure
- */
- if ((sid = socketAlloc(host, port, accept, flags)) < 0) {
- return -1;
- }
- sp = socketList[sid];
- a_assert(sp);
-
-/*
- * Create the socket address structure
- */
- memset((char *) &sockaddr, '\0', sizeof(struct sockaddr_in));
- sockaddr.sin_family = AF_INET;
- sockaddr.sin_port = htons((short) (port & 0xFFFF));
-
- if (host == NULL) {
- sockaddr.sin_addr.s_addr = INADDR_ANY;
- } else {
- sockaddr.sin_addr.s_addr = inet_addr(host);
- if (sockaddr.sin_addr.s_addr == INADDR_NONE) {
- hostent = gethostbyname(host);
- if (hostent != NULL) {
- memcpy((char *) &sockaddr.sin_addr,
- (char *) hostent->h_addr_list[0],
- (size_t) hostent->h_length);
- } else {
- errno = ENXIO;
- socketFree(sid);
- return -1;
- }
- }
- }
-
-/*
- * Create the socket. Set the close on exec flag so children don't
- * inherit the socket.
- */
- sp->sock = socket(AF_INET, SOCK_STREAM, 0);
- if (sp->sock < 0) {
- socketFree(sid);
- return -1;
- }
- fcntl(sp->sock, F_SETFD, FD_CLOEXEC);
- socketHighestFd = max(socketHighestFd, sp->sock);
-
-/*
- * Host is set if we are the client
- */
- if (host) {
-/*
- * Connect to the remote server
- */
- if (connect(sp->sock, (struct sockaddr *) &sockaddr,
- sizeof(sockaddr)) < 0) {
- socketFree(sid);
- return -1;
- }
- socketNonBlock(sp);
-
- } else {
-/*
- * Bind to the socket endpoint with resule and the call listen()
- ** to start listening
- */
- rc = 1;
- setsockopt(sp->sock, SOL_SOCKET, SO_REUSEADDR, (char *)&rc, sizeof(rc));
- if (bind(sp->sock, (struct sockaddr *) &sockaddr, sizeof(sockaddr))
- < 0) {
- socketFree(sid);
- return -1;
- }
- sp->flags |= SOCKET_LISTENING;
-
- if (listen(sp->sock, SOMAXCONN) < 0) {
- socketFree(sid);
- return -1;
- }
- sp->interestMask = SOCKET_READABLE;
- }
- return sid;
-}
-
-/******************************************************************************/
-/*
- * Close a socket
- */
-
-void socketCloseConnection(int sid)
-{
- socket_t* sp;
-
- if ((sp = socketPtr(sid)) == NULL) {
- return;
- }
-
-/*
- * We always flush all output before closing. Unlink from the emf event
- * mechanism and then free (and close) the connection
- */
- socketFlush(sid, 1);
- socketFree(sid);
-}
-
-/******************************************************************************/
-/*
- * Accept a connection. Called by socketDoEvent
- */
-
-static void socketAccept(socket_t* sp)
-{
- struct sockaddr_in addr;
- socket_t *nsp;
- int len;
- int newSock, nid;
-
- a_assert(sp);
-
-/*
- * Accept the connection and prevent inheriting by children (F_SETFD)
- */
- len = sizeof(struct sockaddr_in);
- if ((newSock = accept(sp->sock, (struct sockaddr *) &addr, &len)) < 0) {
- return;
- }
- fcntl(newSock, F_SETFD, FD_CLOEXEC);
- socketHighestFd = max(socketHighestFd, newSock);
-
-/*
- * Create a socket structure and insert into the socket list
- */
- nid = socketAlloc(sp->host, sp->port, sp->accept, 0);
- nsp = socketList[nid];
- a_assert(nsp);
- nsp->sock = newSock;
-
- if (nsp == NULL) {
- return;
- }
-/*
- * Call the user accept callback, the user must call socketCreateHandler
- * to register for further events of interest.
- */
- if (sp->accept != NULL) {
- if ((sp->accept)(nid, inet_ntoa(addr.sin_addr),
- ntohs(addr.sin_port)) < 0) {
- socketFree(nid);
- return;
- }
- }
- socketNonBlock(nsp);
-}
-
-/******************************************************************************/
-/*
- * Write to a socket. This may block if the underlying socket cannot
- * absorb the data. Returns -1 on error, otherwise the number of bytes
- * written.
- */
-
-int socketWrite(int sid, char* buf, int bufsize)
-{
- socket_t* sp;
- ringq_t* rq;
- int len, bytesWritten, room;
-
- a_assert(buf);
- a_assert(bufsize >= 0);
-
- if ((sp = socketPtr(sid)) == NULL) {
- return -1;
- }
-
-/*
- * Loop adding as much data to the output ringq as we can absorb
- * Flush when the ringq is too full and continue.
- */
- rq = &sp->outBuf;
- for (bytesWritten = 0; bufsize > 0; ) {
- if ((room = ringqPutBlkMax(rq)) == 0) {
- if (socketFlush(sid, 0) < 0) {
- return -1;
- }
- if ((room = ringqPutBlkMax(rq)) == 0) {
- break;
- }
- continue;
- }
- len = min(room, bufsize);
- ringqPutBlk(rq, (unsigned char*) buf, len);
- bytesWritten += len;
- bufsize -= len;
- buf += len;
- }
- return bytesWritten;
-}
-
-/******************************************************************************/
-/*
- * Read from a socket. Return the number of bytes read if successful. This
- * may be less than the requested "bufsize" and may be zero. Return -1 for
- * errors. Return 0 for EOF. Otherwise return the number of bytes read. Since
- * this may be zero, callers should use socketEof() to distinguish between
- * this and EOF. Note: this ignores the line buffer, so a previous socketGets
- * which read a partial line may cause a subsequent socketRead to miss
- * some data.
- */
-
-int socketRead(int sid, char* buf, int bufsize)
-{
- socket_t* sp;
- ringq_t* rq;
- int len, room, errCode, bytesRead;
-
- a_assert(buf);
- a_assert(bufsize > 0);
-
- if ((sp = socketPtr(sid)) == NULL) {
- return -1;
- }
-
- if (sp->flags & SOCKET_EOF) {
- return 0;
- }
-
- rq = &sp->inBuf;
- for (bytesRead = 0; bufsize > 0; ) {
- len = min(ringqLen(rq), bufsize);
- if (len <= 0) {
- room = ringqPutBlkMax(rq);
- len = socketGetInput(sid, (char*) rq->endp, room, &errCode);
- if (len < 0) {
- if (errCode == EWOULDBLOCK) {
- if (bytesRead >= 0) {
- return bytesRead;
- }
- }
- return -1;
-
- } else if (len == 0) {
-/*
- * This is EOF, but we may have already read some data so pass that
- * back first before notifying EOF. The next read will return 0
- * to indicate EOF.
- */
- return bytesRead;
- }
- ringqPutBlkAdj(rq, len);
- len = min(len, bufsize);
- }
- memcpy(&buf[bytesRead], rq->servp, len);
- ringqGetBlkAdj(rq, len);
- bufsize -= len;
- bytesRead += len;
- }
- return bytesRead;
-}
-
-/******************************************************************************/
-/*
- * Get a string from a socket. This returns data in *buf in a malloced string
- * after trimming the '\n'. If there is zero bytes returned, *buf will be set
- * to NULL. It returns -1 for error, EOF or when no complete line yet read.
- * Otherwise the length of the line is returned. If a partial line is read
- * socketInputBuffered or socketEof can be used to distinguish between EOF
- * and partial line still buffered. This routine eats and ignores carriage
- * returns.
- */
-
-int socketGets(int sid, char** buf)
-{
- socket_t* sp;
- ringq_t* lq;
- char c;
- int rc, len;
-
- a_assert(buf);
-
- if ((sp = socketPtr(sid)) == NULL) {
- return -1;
- }
- lq = &sp->lineBuf;
-
- while (1) {
-
- if ((rc = socketRead(sid, &c, 1)) < 0) {
- return rc;
-
- } else if (rc == 0) {
-/*
- * If there is a partial line and we are at EOF, pretend we saw a '\n'
- */
- if (ringqLen(lq) > 0 && (sp->flags & SOCKET_EOF)) {
- c = '\n';
- } else {
- return -1;
- }
- }
-/*
- * If a newline is seen, return the data excluding the new line to the
- * caller. If carriage return is seen, just eat it.
- */
- if (c == '\n') {
- len = ringqLen(lq);
- if (len > 0) {
- if ((*buf = balloc(B_L, len + 1)) == NULL) {
- return -1;
- }
- memset(*buf, 0, len + 1);
- ringqGetBlk(lq, (unsigned char*) *buf, len);
- } else {
- *buf = NULL;
- }
- return len;
-
- } else if (c == '\r') {
- continue;
- }
- ringqPutc(lq, c);
- }
-}
-
-/******************************************************************************/
-/*
- * Flush a socket. Do not wait, just initiate output and return.
- * This will return -1 on errors and 0 if successful.
- */
-
-int socketFlush(int sid, int block)
-{
- socket_t* sp;
- ringq_t* rq;
- int len, bytesWritten, errCode;
-
- a_assert(block == 0 || block == 1);
-
- if ((sp = socketPtr(sid)) == NULL) {
- return -1;
- }
- rq = &sp->outBuf;
-
-/*
- * Set the background flushing flag which socketDoEvent will check to
- * continue the flush.
- */
- if (!block) {
- sp->flags |= SOCKET_FLUSHING;
- }
-
-/*
- * Break from loop if not blocking after initiating output. If we are blocking
- * we wait for a write event.
- */
- while (ringqLen(rq) > 0) {
- len = ringqGetBlkMax(&sp->outBuf);
- bytesWritten = socketDoOutput(sp, (char*) rq->servp, len, &errCode);
- if (bytesWritten < 0) {
- if (errCode == EINTR) {
- continue;
- } else if (errCode == EWOULDBLOCK || errCode == EAGAIN) {
- if (! block) {
- return 0;
- }
- if (socketWaitForEvent(sp, SOCKET_WRITABLE | SOCKET_EXCEPTION,
- &errCode)) {
- continue;
- }
- }
- return -1;
- }
- ringqGetBlkAdj(rq, bytesWritten);
- if (! block) {
- break;
- }
- }
- return 0;
-}
-
-/******************************************************************************/
-/*
- * Return the count of input characters buffered. We look at both the line
- * buffer and the input (raw) buffer. Return -1 on error or EOF.
- */
-
-int socketInputBuffered(int sid)
-{
- socket_t* sp;
-
- if ((sp = socketPtr(sid)) == NULL) {
- return -1;
- }
- if (socketEof(sid)) {
- return -1;
- }
- return ringqLen(&sp->lineBuf) + ringqLen(&sp->inBuf);
-}
-
-/******************************************************************************/
-/*
- * Return true if EOF
- */
-
-int socketEof(int sid)
-{
- socket_t* sp;
-
- if ((sp = socketPtr(sid)) == NULL) {
- return -1;
- }
- return sp->flags & SOCKET_EOF;
-}
-
-/******************************************************************************/
-/*
- * Create a user handler for this socket. The handler called whenever there
- * is an event of interest as defined by interestMask (SOCKET_READABLE, ...)
- */
-
-void socketCreateHandler(int sid, int interestMask, socketHandler_t handler,
- int data)
-{
- socket_t* sp;
-
- if ((sp = socketPtr(sid)) == NULL) {
- return;
- }
- sp->handler = handler;
- sp->handler_data = data;
- sp->interestMask = interestMask;
-}
-
-/******************************************************************************/
-/*
- * Delete a handler
- */
-
-void socketDeleteHandler(int sid)
-{
- socket_t* sp;
-
- if ((sp = socketPtr(sid)) == NULL) {
- return;
- }
- sp->handler = NULL;
- sp->interestMask = 0;
-}
-
-/******************************************************************************/
-/*
- * Get more input from the socket and return in buf.
- * Returns 0 for EOF, -1 for errors and otherwise the number of bytes read.
- */
-
-static int socketGetInput(int sid, char* buf, int toRead, int* errCode)
-{
- struct sockaddr_in server;
- socket_t* sp;
- int len, bytesRead;
-
- a_assert(buf);
- a_assert(errCode);
-
- *errCode = 0;
-
- if ((sp = socketPtr(sid)) == NULL) {
- return -1;
- }
-
-/*
- * If we have previously seen an EOF condition, then just return
- */
- if (sp->flags & SOCKET_EOF) {
- return 0;
- }
-
-/*
- * Read the data
- */
- if (sp->flags & SOCKET_BROADCAST) {
- server.sin_family = AF_INET;
- server.sin_addr.s_addr = INADDR_BROADCAST;
- server.sin_port = htons((short)(sp->port & 0xFFFF));
- len = sizeof(server);
- bytesRead = recvfrom(sp->sock, buf, toRead, 0,
- (struct sockaddr*) &server, &len);
- } else {
- bytesRead = recv(sp->sock, buf, toRead, 0);
- }
-
- if (bytesRead < 0) {
- if (errno == ECONNRESET) {
- return 0;
- }
- *errCode = socketGetError();
- return -1;
-
- } else if (bytesRead == 0) {
- sp->flags |= SOCKET_EOF;
- }
- return bytesRead;
-}
-
-/******************************************************************************/
-/*
- * Socket output procedure. Return -1 on errors otherwise return the number
- * of bytes written.
- */
-
-static int socketDoOutput(socket_t* sp, char* buf, int toWrite, int* errCode)
-{
- struct sockaddr_in server;
- int bytes;
-
- a_assert(sp);
- a_assert(buf);
- a_assert(toWrite > 0);
- a_assert(errCode);
-
- *errCode = 0;
-
-/*
- * Write the data
- */
- if (sp->flags & SOCKET_BROADCAST) {
- server.sin_family = AF_INET;
- server.sin_addr.s_addr = INADDR_BROADCAST;
- server.sin_port = htons((short)(sp->port & 0xFFFF));
- bytes = sendto(sp->sock, buf, toWrite, 0,
- (struct sockaddr*) &server, sizeof(server));
- } else {
- bytes = send(sp->sock, buf, toWrite, 0);
- }
-
- if (bytes == 0 && bytes != toWrite) {
- *errCode = EWOULDBLOCK;
- return -1;
- }
-
- if (bytes < 0) {
- *errCode = socketGetError();
- }
- return bytes;
-}
-
-/******************************************************************************/
-/*
- * Return TRUE if there is a socket with an event ready to process,
- */
-
-int socketReady()
-{
- socket_t *sp;
- int i;
-
- for (i = 0; i < socketMax; i++) {
- if ((sp = socketList[i]) == NULL) {
- continue;
- }
- if (sp->readyMask & sp->interestMask) {
- return 1;
- }
- }
- return 0;
-}
-
-/******************************************************************************/
-/*
- * Wait for a handle to become readable or writable and return a number of
- * noticed events.
- */
-
-int socketSelect()
-{
- socket_t *sp;
- fd_mask *readFds, *writeFds, *exceptFds;
- int sid, len, nwords, index, bit, nEvents;
-
-/*
- * Allocate and zero the select masks
- */
- nwords = (socketHighestFd + NFDBITS - 1) / NFDBITS;
- len = nwords * sizeof(int);
-
- readFds = balloc(B_L, len);
- memset(readFds, 0, len);
- writeFds = balloc(B_L, len);
- memset(writeFds, 0, len);
- exceptFds = balloc(B_L, len);
- memset(exceptFds, 0, len);
-
-/*
- * Set the select event masks for events to watch
- */
- for (sid = 0; sid < socketMax; sid++) {
- if ((sp = socketList[sid]) == NULL) {
- continue;
- }
- a_assert(sp);
-
-/*
- * Initialize the ready masks and compute the mask offsets.
- */
- index = sp->sock / (NBBY * sizeof(fd_mask));
- bit = 1 << (sp->sock % (NBBY * sizeof(fd_mask)));
-
-/*
- * Set the appropriate bit in the ready masks for the sp->sock.
- */
- if (sp->interestMask & SOCKET_READABLE) {
- readFds[index] |= bit;
- }
- if (sp->interestMask & SOCKET_WRITABLE) {
- writeFds[index] |= bit;
- }
- if (sp->interestMask & SOCKET_EXCEPTION) {
- exceptFds[index] |= bit;
- }
- }
-
-/*
- * Wait for the event or a timeout.
- */
- nEvents = select(socketHighestFd + 1, (fd_set *) readFds,
- (fd_set *) writeFds, (fd_set *) exceptFds, NULL);
- if (nEvents > 0) {
- for (sid = 0; sid < socketMax; sid++) {
- if ((sp = socketList[sid]) == NULL) {
- continue;
- }
-
- index = sp->sock / (NBBY * sizeof(fd_mask));
- bit = 1 << (sp->sock % (NBBY * sizeof(fd_mask)));
-
- if (readFds[index] & bit) {
- sp->readyMask |= SOCKET_READABLE;
- }
- if (writeFds[index] & bit) {
- sp->readyMask |= SOCKET_WRITABLE;
- }
- if (exceptFds[index] & bit) {
- sp->readyMask |= SOCKET_EXCEPTION;
- }
- }
- }
-
- bfree(B_L, readFds);
- bfree(B_L, writeFds);
- bfree(B_L, exceptFds);
-
- return nEvents;
-}
-
-/******************************************************************************/
-/*
- * Process socket events
- */
-
-void socketProcess()
-{
- socket_t *sp;
- int sid;
-
-/*
- * Process each socket
- */
- for (sid = 0; sid < socketMax; sid++) {
- if ((sp = socketList[sid]) == NULL) {
- continue;
- }
- if ((sp->readyMask & sp->interestMask) ||
- ((sp->interestMask & SOCKET_READABLE) &&
- socketInputBuffered(sid))) {
- socketDoEvent(sp);
- }
- }
-}
-
-/******************************************************************************/
-/*
- * Process and event on the event queue
- */
-
-static int socketDoEvent(socket_t *sp)
-{
- ringq_t* rq;
- int sid;
-
- a_assert(sp);
-
- sid = sp->sid;
- if (sp->readyMask & SOCKET_READABLE) {
- if (sp->flags & SOCKET_LISTENING) {
- socketAccept(sp);
- sp->readyMask = 0;
- return 1;
- }
- } else {
-/*
- * If there is still read data in the buffers, trigger the read handler
- * NOTE: this may busy spin if the read handler doesn't read the data
- */
- if (sp->interestMask & SOCKET_READABLE && socketInputBuffered(sid)) {
- sp->readyMask |= SOCKET_READABLE;
- }
- }
-
-
-/*
- * If now writable and flushing in the background, continue flushing
- */
- if (sp->readyMask & SOCKET_WRITABLE) {
- if (sp->flags & SOCKET_FLUSHING) {
- rq = &sp->outBuf;
- if (ringqLen(rq) > 0) {
- socketFlush(sp->sid, 0);
- } else {
- sp->flags &= ~SOCKET_FLUSHING;
- }
- }
- }
-
-/*
- * Now invoke the users socket handler. NOTE: the handler may delete the
- * socket, so we must be very careful after calling the handler.
- */
- if (sp->handler && (sp->interestMask & sp->readyMask)) {
- (sp->handler)(sid, sp->interestMask & sp->readyMask,
- sp->handler_data);
-/*
- * Make sure socket pointer is still valid, then set the readyMask
- * to 0.
- */
- if (socketPtr(sid)) {
- sp->readyMask = 0;
- }
- }
- return 1;
-}
-
-/******************************************************************************/
-/*
- * Allocate a new socket structure
- */
-
-static int socketAlloc(char* host, int port, socketAccept_t accept, int flags)
-{
- socket_t *sp;
- int sid;
-
- if ((sid = hAlloc((void***) &socketList)) < 0) {
- return -1;
- }
- if ((sp = (socket_t*) balloc(B_L, sizeof(socket_t))) == NULL) {
- hFree((void***) &socket, sid);
- return -1;
- }
- memset(sp, 0, sizeof(socket_t));
- socketList[sid] = sp;
- if (sid >= socketMax)
- socketMax = sid + 1;
-
- sp->sid = sid;
- sp->accept = accept;
- sp->port = port;
- sp->flags = flags;
-
- if (host) {
- strncpy(sp->host, host, sizeof(sp->host));
- }
-
- ringqOpen(&sp->inBuf, SOCKET_BUFSIZ, SOCKET_BUFSIZ);
- ringqOpen(&sp->outBuf, SOCKET_BUFSIZ, SOCKET_BUFSIZ);
- ringqOpen(&sp->lineBuf, SOCKET_BUFSIZ, -1);
-
- return sid;
-}
-
-/******************************************************************************/
-/*
- * Free a socket structure
- */
-
-static void socketFree(int sid)
-{
- socket_t* sp;
- int i;
-
- if ((sp = socketPtr(sid)) == NULL) {
- return;
- }
- if (sp->sock >= 0) {
- close(sp->sock);
- }
-
- ringqClose(&sp->inBuf);
- ringqClose(&sp->outBuf);
- ringqClose(&sp->lineBuf);
-
- bfree(B_L, sp);
- socketMax = hFree((void***) &socketList, sid);
-
-/*
- * Calculate the new highest socket number
- */
- socketHighestFd = -1;
- for (i = 0; i < socketMax; i++) {
- if ((sp = socketList[i]) == NULL) {
- continue;
- }
- socketHighestFd = max(socketHighestFd, sp->sock);
- }
-}
-
-/******************************************************************************/
-/*
- * Validate a socket handle
- */
-
-static socket_t* socketPtr(int sid)
-{
- if (sid < 0 || sid >= socketMax || socketList[sid] == NULL) {
- a_assert(NULL);
- return NULL;
- }
-
- a_assert(socketList[sid]);
- return socketList[sid];
-}
-
-/******************************************************************************/
-/*
- * Get the operating system error code
- */
-
-static int socketGetError()
-{
- return errno;
-}
-
-/******************************************************************************/
-/*
- * Wait until an event occurs on a socket. Return 1 on success, 0 on failure.
- */
-
-static int socketWaitForEvent(socket_t* sp, int interestMask, int* errCode)
-{
- a_assert(sp);
-
- while (socketSelect()) {
- if (sp->readyMask & interestMask) {
- break;
- }
- }
- if (sp->readyMask & SOCKET_EXCEPTION) {
- return -1;
- } else if (sp->readyMask & SOCKET_WRITABLE) {
- return 0;
- } else {
- *errCode = errno = EWOULDBLOCK;
- return -1;
- }
-}
-
-/******************************************************************************/
-/*
- * Put the socket into non-blocking mode
- */
-
-static int socketNonBlock(socket_t *sp)
-{
- int flags;
-
- flags = fcntl(sp->sock, F_GETFL) | O_NONBLOCK;
- if (fcntl(sp->sock, F_SETFL, flags) < 0) {
- return -1;
- }
- return 0;
-}
-
-/******************************************************************************/
-/*
- * Duplicate stdin and stdout
- */
-
-int DuplicateStdFile (int sid)
-{
- if (0 != dup2(socketList[sid]->sock, 0) || 1 != dup2(socketList[sid]->sock, 1))
- return -1;
-
- return 0;
-
-}
diff --git a/cpukit/httpd/sym.c b/cpukit/httpd/sym.c
deleted file mode 100644
index c7b47b5e00..0000000000
--- a/cpukit/httpd/sym.c
+++ /dev/null
@@ -1,452 +0,0 @@
-/*
- * sym.c -- Symbol Table module
- *
- * Copyright (c) GoAhead Software Inc., 1995-1999. All Rights Reserved.
- *
- * See the file "license.txt" for usage and redistribution license requirements
- */
-
-/******************************** Description *********************************/
-/*
- * This module implements a highly efficient generic symbol table with
- * update and access routines. Symbols are simple character strings and
- * the values they take can be flexible types as defined by value_t.
- * This modules allows multiple symbol tables to be created.
- */
-
-/********************************* Includes ***********************************/
-
-#if UEMF
- #include "uemf.h"
-#else
- #include "basic/basicInternal.h"
-#endif
-
-/********************************* Defines ************************************/
-
-typedef struct { /* Symbol table descriptor */
- int inuse; /* Is this entry in use */
- int hash_size; /* Size of the table below */
- sym_t **hash_table; /* Allocated at run time */
-} sym_tabent_t;
-
-/********************************* Globals ************************************/
-
-static sym_tabent_t **sym; /* List of symbol tables */
-static int sym_max; /* One past the max symbol table */
-
-static int htIndex; /* Current location in table */
-static sym_t* next; /* Next symbol in iteration */
-
-/**************************** Forward Declarations ****************************/
-
-static int hashIndex(sym_tabent_t *tp, char_t *name);
-static sym_t *hash(sym_tabent_t *tp, char_t *name);
-static int calc_prime(int size);
-
-/*********************************** Code *************************************/
-/*
- * Create a symbol table.
- */
-
-sym_fd_t symOpen(int hash_size)
-{
- sym_fd_t sd;
- sym_tabent_t *tp;
-
- a_assert(hash_size > 2);
-
-/*
- * Create a new handle for this symbol table
- */
- if ((sd = hAlloc((void***) &sym)) < 0) {
- return -1;
- }
-
-/*
- * Create a new symbol table structure and zero
- */
- if ((tp = (sym_tabent_t*) balloc(B_L, sizeof(sym_tabent_t))) == NULL) {
- sym_max = hFree((void***) &sym, sd);
- return -1;
- }
- memset(tp, 0, sizeof(sym_tabent_t));
- if (sd >= sym_max) {
- sym_max = sd + 1;
- }
- a_assert(0 <= sd && sd < sym_max);
- sym[sd] = tp;
-
-/*
- * Now create the hash table for fast indexing.
- */
- tp->hash_size = calc_prime(hash_size);
- tp->hash_table = (sym_t**) balloc(B_L, tp->hash_size * sizeof(sym_t*));
- a_assert(tp->hash_table);
- memset(tp->hash_table, 0, tp->hash_size * sizeof(sym_t*));
-
- return sd;
-}
-
-/******************************************************************************/
-/*
- * Close this symbol table. Call a cleanup function to allow the caller
- * to free resources associated with each symbol table entry.
- */
-
-void symClose(sym_fd_t sd, void (*cleanup)(sym_t *symp))
-{
- sym_tabent_t *tp;
- sym_t *sp, *forw;
- int i;
-
- a_assert(0 <= sd && sd < sym_max);
- tp = sym[sd];
- a_assert(tp);
-
-/*
- * Free all symbols in the hash table, then the hash table itself.
- */
- for (i = 0; i < tp->hash_size; i++) {
- for (sp = tp->hash_table[i]; sp; sp = forw) {
- forw = sp->forw;
- if (cleanup) {
- (*cleanup)(sp);
- }
- valueFree(&sp->name);
- bfree(B_L, (void*) sp);
- sp = forw;
- }
- }
- bfree(B_L, (void*) tp->hash_table);
-
- sym_max = hFree((void***) &sym, sd);
- bfree(B_L, (void*) tp);
-}
-
-/******************************************************************************/
-/*
- * Default callback for freeing the value.
- */
-
-void symFreeVar(sym_t* sp)
-{
- valueFree(&sp->content);
-}
-
-/******************************************************************************/
-/*
- * Return the first symbol in the hashtable if there is one. This call is used
- * as the first step in traversing the table. A call to symFirst should be
- * followed by calls to symNext to get all the rest of the entries.
- */
-
-sym_t* symFirst(sym_fd_t sd)
-{
- sym_tabent_t *tp;
- sym_t *sp, *forw;
- int i;
-
- a_assert(0 <= sd && sd < sym_max);
- tp = sym[sd];
- a_assert(tp);
-
-/*
- * Find the first symbol in the hashtable and return a pointer to it.
- */
- for (i = 0; i < tp->hash_size; i++) {
- for (sp = tp->hash_table[i]; sp; sp = forw) {
- forw = sp->forw;
-
- if (forw == NULL) {
- htIndex = i + 1;
- next = tp->hash_table[htIndex];
- } else {
- htIndex = i;
- next = forw;
- }
- return sp;
- }
- }
- return NULL;
-}
-
-/******************************************************************************/
-/*
- * Return the next symbol in the hashtable if there is one. See symFirst.
- */
-
-sym_t* symNext(sym_fd_t sd)
-{
- sym_tabent_t *tp;
- sym_t *sp, *forw;
- int i;
-
- a_assert(0 <= sd && sd < sym_max);
- tp = sym[sd];
- a_assert(tp);
-
-/*
- * Find the first symbol in the hashtable and return a pointer to it.
- */
- for (i = htIndex; i < tp->hash_size; i++) {
- for (sp = next; sp; sp = forw) {
- forw = sp->forw;
-
- if (forw == NULL) {
- htIndex = i + 1;
- next = tp->hash_table[htIndex];
- } else {
- htIndex = i;
- next = forw;
- }
- return sp;
- }
- next = tp->hash_table[i + 1];
- }
- return NULL;
-}
-
-/******************************************************************************/
-/*
- * Lookup a symbol and return a pointer to the symbol entry. If not present
- * then return a NULL.
- */
-
-sym_t *symLookup(sym_fd_t sd, char_t *name)
-{
- sym_tabent_t *tp;
- sym_t *sp;
- char_t *cp;
-
- a_assert(0 <= sd && sd < sym_max);
- tp = sym[sd];
- a_assert(tp);
-
- if (name == NULL || *name == '\0') {
- return NULL;
- }
-
-/*
- * Do an initial hash and then follow the link chain to find the right entry
- */
- for (sp = hash(tp, name); sp; sp = sp->forw) {
- cp = sp->name.value.string;
- if (cp[0] == name[0] && gstrcmp(cp, name) == 0) {
- break;
- }
- }
- return sp;
-}
-
-/******************************************************************************/
-/*
- * Enter a symbol into the table. If already there, update its value.
- * Always succeeds if memory available.
- */
-
-sym_t *symEnter(sym_fd_t sd, char_t *name, value_t v, int arg)
-{
- sym_tabent_t *tp;
- sym_t *sp, *last;
- char_t *cp;
- int hindex;
-
- a_assert(name && *name);
- a_assert(0 <= sd && sd < sym_max);
- tp = sym[sd];
- a_assert(tp);
-
-/*
- * Calculate the first daisy-chain from the hash table. If non-zero, then
- * we have daisy-chain, so scan it and look for the symbol.
- */
- last = NULL;
- hindex = hashIndex(tp, name);
- if ((sp = tp->hash_table[hindex]) != NULL) {
- for (; sp; sp = sp->forw) {
- cp = sp->name.value.string;
- if (cp[0] == name[0] && gstrcmp(cp, name) == 0) {
- break;
- }
- last = sp;
- }
- if (sp) {
-/*
- * Found, so update the value
- * If the caller stores handles which require freeing, they
- * will be lost here. It is the callers responsibility to free
- * resources before overwriting existing contents. We will here
- * free allocated strings which occur due to value_instring().
- * We should consider providing the cleanup function on the open rather
- * than the close and then we could call it here and solve the problem.
- */
- if (sp->content.valid) {
- valueFree(&sp->content);
- }
- sp->content = v;
- sp->arg = arg;
- return sp;
- }
-/*
- * Not found so allocate and append to the daisy-chain
- */
- sp = (sym_t*) balloc(B_L, sizeof(sym_t));
- if (sp == NULL) {
- return NULL;
- }
- sp->name = valueString(name, VALUE_ALLOCATE);
- sp->content = v;
- sp->forw = (sym_t*) NULL;
- sp->arg = arg;
- last->forw = sp;
-
- } else {
-/*
- * Daisy chain is empty so we need to start the chain
- */
- sp = (sym_t*) balloc(B_L, sizeof(sym_t));
- if (sp == NULL) {
- return NULL;
- }
- tp->hash_table[hindex] = sp;
- tp->hash_table[hashIndex(tp, name)] = sp;
-
- sp->forw = (sym_t*) NULL;
- sp->content = v;
- sp->arg = arg;
- sp->name = valueString(name, VALUE_ALLOCATE);
- }
- return sp;
-}
-
-/******************************************************************************/
-/*
- * Delete a symbol from a table
- */
-
-int symDelete(sym_fd_t sd, char_t *name)
-{
- sym_tabent_t *tp;
- sym_t *sp, *last;
- char_t *cp;
- int hindex;
-
- a_assert(name && *name);
- a_assert(0 <= sd && sd < sym_max);
- tp = sym[sd];
- a_assert(tp);
-
-/*
- * Calculate the first daisy-chain from the hash table. If non-zero, then
- * we have daisy-chain, so scan it and look for the symbol.
- */
- last = NULL;
- hindex = hashIndex(tp, name);
- if ((sp = tp->hash_table[hindex]) != NULL) {
- for ( ; sp; sp = sp->forw) {
- cp = sp->name.value.string;
- if (cp[0] == name[0] && gstrcmp(cp, name) == 0) {
- break;
- }
- last = sp;
- }
- }
- if (sp == (sym_t*) NULL) { /* Not Found */
- return -1;
- }
-
-/*
- * Unlink and free the symbol. Last will be set if the element to be deleted
- * is not first in the chain.
- */
- if (last) {
- last->forw = sp->forw;
- } else {
- tp->hash_table[hindex] = sp->forw;
- }
- valueFree(&sp->name);
- bfree(B_L, (void*) sp);
-
- return 0;
-}
-
-/******************************************************************************/
-/*
- * Hash a symbol and return a pointer to the hash daisy-chain list
- * All symbols reside on the chain (ie. none stored in the hash table itself)
- */
-
-static sym_t *hash(sym_tabent_t *tp, char_t *name)
-{
- a_assert(tp);
-
- return tp->hash_table[hashIndex(tp, name)];
-}
-
-/******************************************************************************/
-/*
- * Compute the hash function and return an index into the hash table
- * We use a basic additive function that is then made modulo the size of the
- * table.
- */
-
-static int hashIndex(sym_tabent_t *tp, char_t *name)
-{
- unsigned int sum;
- int i;
-
- a_assert(tp);
-/*
- * Add in each character shifted up progressively by 7 bits. The shift
- * amount is rounded so as to not shift too far. It thus cycles with each
- * new cycle placing character shifted up by one bit.
- */
- i = 0;
- sum = 0;
- while (*name) {
- sum += (((int) *name++) << i);
- i = (i + 7) % (BITS(int) - BITSPERBYTE);
- }
- return sum % tp->hash_size;
-}
-
-/******************************************************************************/
-/*
- * Check if this number is a prime
- */
-
-static int is_prime(int n)
-{
- int i;
-
- a_assert(n > 0);
-
- for (i = 2; i < n; i++) {
- if (n % i == 0) {
- return 0;
- }
- }
- return 1;
-}
-
-/******************************************************************************/
-/*
- * Calculate the largest prime smaller than size.
- */
-
-static int calc_prime(int size)
-{
- int count;
-
- a_assert(size > 0);
-
- for (count = size; count > 0; count--) {
- if (is_prime(count)) {
- return count;
- }
- }
- return 1;
-}
-
-/******************************************************************************/
diff --git a/cpukit/httpd/uemf.c b/cpukit/httpd/uemf.c
deleted file mode 100644
index 8a6675f944..0000000000
--- a/cpukit/httpd/uemf.c
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * uemf.c -- GoAhead Micro Embedded Management Framework
- *
- * Copyright (c) Go Ahead Software, Inc., 1995-1999
- *
- * See the file "license.txt" for usage and redistribution license requirements
- */
-
-/********************************** Description *******************************/
-
-/*
- * This module provides compatibility with the full GoAhead EMF.
- * It is a collection of routines which permits the GoAhead WebServer to
- * run stand-alone and to also load as a solution pack under the GoAhead EMF.
- */
-
-/*********************************** Includes *********************************/
-
-#include "uemf.h"
-
-/********************************** Local Data ********************************/
-
-int emfInst; /* Application instance handle */
-
-/************************************* Code ***********************************/
-/*
- * Error message that doesn't need user attention. Customize this code
- * to direct error messages to whereever the developer wishes
- */
-
-void error(E_ARGS_DEC, int flags, char_t *fmt, ...)
-{
- if (flags & E_LOG) {
- /* Log error message */
-
- } else if (flags & E_ASSERT) {
- /* Assert message */
-
- } else if (flags & E_USER) {
- /* Display message to the user */
-
- }
-}
-
-/******************************************************************************/
-/*
- * Trace log. Customize this function to log trace output
- */
-
-void trace(int level, char_t *afmt, ...)
-{
-#if DEBUG
- va_list args;
- char_t *buf;
-
- va_start(args, afmt);
- buf = NULL;
- gvsnprintf(&buf, VALUE_MAX_STRING, afmt, args);
- if (buf) {
- gprintf(buf);
- bfree(B_L, buf);
- }
- va_end(args);
-#endif
-}
-
-/******************************************************************************/
-/*
- * Save the instance handle
- */
-
-void emfInstSet(int inst)
-{
- emfInst = inst;
-}
-
-/******************************************************************************/
-/*
- * Get the instance handle
- */
-
-int emfInstGet()
-{
- return emfInst;
-}
-
-/******************************************************************************/
-/*
- * Convert a string to lower case
- */
-
-char_t *strlower(char_t *string)
-{
- char_t *s;
-
- a_assert(string);
-
- if (string == NULL) {
- return NULL;
- }
-
- s = string;
- while (*s) {
- if (gisupper(*s)) {
- *s = (char_t) gtolower(*s);
- }
- s++;
- }
- *s = '\0';
- return string;
-}
-
-/******************************************************************************/
-/*
- * Convert a string to upper case
- */
-
-char_t *strupper(char_t *string)
-{
- char_t *s;
-
- a_assert(string);
- if (string == NULL) {
- return NULL;
- }
-
- s = string;
- while (*s) {
- if (gislower(*s)) {
- *s = (char_t) gtoupper(*s);
- }
- s++;
- }
- *s = '\0';
- return string;
-}
-
-/******************************************************************************/
-/*
- * Convert integer to ascii string. Allow a NULL string in which case we
- * allocate a dynamic buffer.
- */
-
-char_t *stritoa(int n, char_t *string, int width)
-{
- char_t *cp, *lim, *s;
- char_t buf[16]; /* Just temp to hold number */
- int next, minus;
-
- a_assert(string && width > 0);
-
- if (string == NULL) {
- if (width == 0) {
- width = 10;
- }
- if ((string = balloc(B_L, width + 1)) == NULL) {
- return NULL;
- }
- }
- if (n < 0) {
- minus = 1;
- n = -n;
- width--;
- } else {
- minus = 0;
- }
-
- cp = buf;
- lim = &buf[width - 1];
- while (n > 9 && cp < lim) {
- next = n;
- n /= 10;
- *cp++ = (char_t) (next - n * 10 + '0');
- }
- if (cp < lim) {
- *cp++ = (char_t) (n + '0');
- }
-
- s = string;
- if (minus) {
- *s++ = '-';
- }
-
- while (cp > buf) {
- *s++ = *--cp;
- }
-
- *s++ = '\0';
- return string;
-}
-
-/******************************************************************************/
-
diff --git a/cpukit/httpd/uemf.h b/cpukit/httpd/uemf.h
deleted file mode 100644
index c63e75bd99..0000000000
--- a/cpukit/httpd/uemf.h
+++ /dev/null
@@ -1,666 +0,0 @@
-/*
- * uemf.h -- Go Ahead Micro Embedded Management Framework Header
- *
- * Copyright (c) Go Ahead Software, Inc., 1995-1999
- *
- * See the file "license.txt" for usage and redistribution license requirements
- */
-
-#ifndef _h_UEMF
-#define _h_UEMF 1
-
-/******************************** Description *********************************/
-
-/*
- * Go Ahead Web Server header. This defines the Web public APIs
- */
-
-/******************************* Per O/S Includes *****************************/
-
-#if WIN
- #include <direct.h>
- #include <io.h>
- #include <sys/stat.h>
- #include <limits.h>
- #include <tchar.h>
- #include <windows.h>
- #include <winnls.h>
- #include <time.h>
- #include <sys/types.h>
- #include <stdio.h>
- #include <stdlib.h>
-#endif
-
-#if CE
- #include <limits.h>
- #include <tchar.h>
- #include <windows.h>
- #include <winnls.h>
- #include "CE/wincompat.h"
-#endif
-
-#if NW
- #include <stdio.h>
-#endif
-
-#if UNIX
- #include <stdio.h>
-#endif
-
-#if LINUX || __rtems__
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <sys/param.h>
- #include <limits.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
- #include <sys/socket.h>
- #include <sys/select.h>
- #include <netinet/in.h>
- #include <arpa/inet.h>
- #include <netdb.h>
- #include <time.h>
-#endif
-
-#if LYNX
- #include <limits.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
- #include <socket.h>
- #include <netinet/in.h>
- #include <arpa/inet.h>
- #include <netdb.h>
- #include <time.h>
-#endif
-
-#if UW
- #include <stdio.h>
-#endif
-
-#if VXW486
- #include <vxWorks.h>
- #include <sockLib.h>
- #include <selectLib.h>
- #include <inetLib.h>
- #include <ioLib.h>
- #include <stdio.h>
- #include <stat.h>
- #include <time.h>
- #include <usrLib.h>
-#endif
-
-#if QNX4
- #include <sys/types.h>
- #include <stdio.h>
- #include <sys/socket.h>
- #include <sys/select.h>
- #include <netinet/in.h>
- #include <arpa/inet.h>
- #include <netdb.h>
-#endif
-
-/********************************** Includes **********************************/
-
-#include <ctype.h>
-#include <stdarg.h>
-#include <string.h>
-
-/********************************** Unicode ***********************************/
-/*
- * Constants and limits. Also FNAMESIZE and PATHSIZE are currently defined
- * in param.h to be 128 and 512
- */
-#define TRACE_MAX (4096 - 48)
-#define VALUE_MAX_STRING (4096 - 48)
-#define SYM_MAX (512)
-#define XML_MAX 4096 /* Maximum size for tags/tokens */
-#define BUF_MAX 4096 /* General sanity check for bufs */
-
-/*
- * Type for unicode systems
- */
-#if UNICODE
-
-/*
- * To convert strings to UNICODE. We have a level of indirection so things
- * like T(__FILE__) will expand properly.
- */
-#define T(x) __TXT(x)
-#define __TXT(s) L ## s
-typedef unsigned short char_t;
-typedef unsigned short uchar_t;
-
-/*
- * Text size of buffer macro. A buffer bytes will hold (size / char size)
- * characters.
- */
-#define TSZ(x) (sizeof(x) / sizeof(char_t))
-
-/*
- * How many ASCII bytes are required to represent this UNICODE string?
- */
-#define TASTRL(x) ((wcslen(x) + 1) * sizeof(char_t))
-
-
-#define gmain wmain
-
-#define gsprintf swprintf
-#define gprintf wprintf
-#define gfprintf fwprintf
-#define gsscanf swscanf
-#define gvsprintf vswprintf
-
-#define gstrcpy wcscpy
-#define gstrncpy wcsncpy
-#define gstrncat wcsncat
-#define gstrlen wcslen
-#define gstrcat wcscat
-#define gstrcmp wcscmp
-#define gstrncmp wcsncmp
-#define gstricmp wcsicmp
-#define gstrchr wcschr
-#define gstrrchr wcsrchr
-#define gstrtok wcstok
-#define gstrnset wcsnset
-#define gstrstr wcsstr
-
-#define gfopen _wfopen
-#define gopen _wopen
-#define gcreat _wcreat
-#define gfgets fgetws
-#define gfputs fputws
-#define gunlink _wunlink
-#define grename _wrename
-#define gtmpnam _wtmpnam
-#define gtempnam _wtempnam
-#define gfindfirst _wfindfirst
-#define gfinddata_t _wfinddata_t
-#define gfindnext _wfindnext
-#define gfindclose _findclose
-#define gstat _wstat
-#define gaccess _waccess
-
-typedef struct _stat gstat_t;
-
-#define gmkdir _wmkdir
-#define gchdir _wchdir
-#define grmdir _wrmdir
-#define gremove _wremove
-#define ggetcwd _wgetcwd
-
-#define gtolower towlower
-#define gtoupper towupper
-#define gisspace iswspace
-#define gisdigit iswdigit
-#define gisxdigit iswxdigit
-#define gisalnum iswalnum
-#define gisalpha iswalpha
-#define gisupper iswupper
-#define gislower iswlower
-#define gatoi(s) wcstol(s, NULL, 10)
-
-#define gctime _wctime
-#define ggetenv _wgetenv
-#define gexecvp _wexecvp
-
-#else /* ! UNICODE */
-
-#define T(s) s
-#define TSZ(x) (sizeof(x))
-#define TASTRL(x) (strlen(x) + 1)
-typedef char char_t;
-#if WIN
-typedef unsigned char uchar_t;
-#endif
-
-#define gsprintf sprintf
-#define gprintf printf
-#define gfprintf fprintf
-#define gsscanf sscanf
-#define gvsprintf vsprintf
-
-#define gstrcpy strcpy
-#define gstrncpy strncpy
-#define gstrncat strncat
-#define gstrlen strlen
-#define gstrcat strcat
-#define gstrcmp strcmp
-#define gstrncmp strncmp
-#define gstricmp stricmp
-#define gstrchr strchr
-#define gstrrchr strrchr
-#define gstrtok strtok
-#define gstrnset strnset
-#define gstrstr strstr
-
-#define gfopen fopen
-#define gopen open
-#define gcreat creat
-#define gfgets fgets
-#define gfputs fputs
-#define gunlink unlink
-#define grename rename
-#define gtmpnam tmpnam
-#define gtempnam tempnam
-#define gfindfirst _findfirst
-#define gfinddata_t _finddata_t
-#define gfindnext _findnext
-#define gfindclose _findclose
-#define gstat stat
-#define gaccess access
-
-typedef struct stat gstat_t;
-
-#define gmkdir mkdir
-#define gchdir chdir
-#define grmdir rmdir
-#define gremove remove
-#define ggetcwd getcwd
-
-#define gtolower tolower
-#define gtoupper toupper
-#define gisspace isspace
-#define gisdigit isdigit
-#define gisxdigit isxdigit
-#define gisalnum isalnum
-#define gisalpha isalpha
-#define gisupper isupper
-#define gislower islower
-#define gatoi atoi
-
-#define gctime ctime
-#define ggetenv getenv
-#define gexecvp execvp
-#ifndef VXW486
-#define gmain main
-#endif
-#endif
-
-/********************************** Defines ***********************************/
-
-#define FNAMESIZE 256 /* Max length of file names */
-
-#define E_MAX_ERROR 4096
-/*
- * Error types
- */
-#define E_ASSERT 0x1 /* Assertion error */
-#define E_LOG 0x2 /* Log error to log file */
-#define E_USER 0x3 /* Error that must be displayed */
-
-#define E_L T(__FILE__), __LINE__
-#define E_ARGS_DEC char_t *file, int line
-#define E_ARGS file, line
-
-#if ASSERT
- #define a_assert(C) if (C) ; else error(E_L, E_ASSERT, T("%s"), #C)
-#else
- #define a_assert(C) if (1) ; else
-#endif
-
-#define VALUE_VALID { {0}, integer, 1 }
-#define VALUE_INVALID { {0}, undefined, 0 }
-
-/*
- * Allocation flags
- */
-#define VALUE_ALLOCATE 0x1
-
-#define value_numeric(t) (t == integer)
-#define value_str(t) (t >= string || t <= bytes)
-#define value_ok(t) (t > undefined && t <= symbol)
-
-/*
- * These values are not prefixed so as to aid code readability
- */
-#if !defined(UW) && !defined(__rtems__)
-#pragma pack(2)
-#endif
-
-typedef enum {
- undefined = 0,
- integer = 1,
- string = 2,
- bytes = 3,
- errmsg = 4
-} value_type_t;
-
-/*
- * In UW, bit fields default to unsigned unless explicitly defined as signed.
- * Unfortunately, enum become ints, but not explicitly signed. Thus, if using
- * an enum type in a bit field, it becomes unsigned, but we need signed. So
- * for UW we declare value_type_t to be a signed int to make this all work.
- */
-typedef struct {
-
- union {
- long integer;
- char_t *string;
- char_t *bytes;
- char_t *errmsg;
- void *symbol;
- } value;
-
-#if UW
- signed int type : 8;
-#else
- value_type_t type : 8;
-#endif
-
- unsigned int valid : 1;
- unsigned int user_def_1 : 1;
- unsigned int allocated : 1; /* String was balloced */
-} value_t;
-
-/*
- * Extract a string from the value depending whether inline or via pointer
- */
-#define value_strget(v) \
- (((v)->type == bytes) ? (v)->value.bytes : (v)->value.string)
-
-#if !defined(UW) && !defined(__rtems__)
-#pragma pack()
-#endif
-
-/******************************************************************************/
-/*
- * A ring queue allows maximum utilization of memory for data storage and is
- * ideal for input/output buffering. This module provides a highly effecient
- * implementation and a vehicle for dynamic strings.
- *
- * WARNING: This is a public implementation and callers have full access to
- * the queue structure and pointers. Change this module very carefully.
- *
- * This module follows the open/close model.
- *
- * Operation of a ringq where rq is a pointer to a ringq :
- *
- * rq->buflen contains the size of the buffer.
- * rq->buf will point to the start of the buffer.
- * rq->servp will point to the first (un-consumed) data byte.
- * rq->endp will point to the next free location to which new data is added
- * rq->endbuf will point to one past the end of the buffer.
- *
- * Eg. If the ringq contains the data "abcdef", it might look like :
- *
- * +-------------------------------------------------------------------+
- * | | | | | | | | a | b | c | d | e | f | | | | |
- * +-------------------------------------------------------------------+
- * ^ ^ ^ ^
- * | | | |
- * rq->buf rq->servp rq->endp rq->enduf
- *
- * The queue is empty when servp == endp. This means that the queue will hold
- * at most rq->buflen -1 bytes. It is the fillers responsibility to ensure
- * the ringq is never filled such that servp == endp.
- *
- * It is the fillers responsibility to "wrap" the endp back to point to
- * rq->buf when the pointer steps past the end. Correspondingly it is the
- * consumers responsibility to "wrap" the servp when it steps to rq->endbuf.
- * The ringqPutc and ringqGetc routines will do this automatically.
- */
-
-/*
- * Ring queue buffer structure
- */
-typedef struct {
- unsigned char *buf; /* Holding buffer for data */
- unsigned char *servp; /* Pointer to start of data */
- unsigned char *endp; /* Pointer to end of data */
- unsigned char *endbuf; /* Pointer to end of buffer */
- int buflen; /* Length of ring queue */
- int maxsize; /* Maximum size */
- int increment; /* Growth increment */
-} ringq_t;
-
-/*
- * Block allocation definitions
- */
-#define B_L __FILE__, __LINE__
-#define B_ARGS_DEC char *file, int line
-#define B_ARGS file, line
-
-/*
- * Block classes are: 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192,
- * 16384, 32768, 65536
- */
-#define B_SHIFT 4 /* Convert size to class */
-#define B_ROUND ((1 << (B_SHIFT)) - 1)
-#define B_MAX_CLASS 13 /* Maximum class number + 1 */
-#define B_MALLOCED 0x80000000 /* Block was malloced */
-#define B_DEFAULT_MEM (64 * 1024) /* Default memory allocation */
-#define B_MAX_FILES (512) /* Maximum number of files */
-#define B_FILL_CHAR (0x77) /* Fill byte for buffers */
-#define B_FILL_WORD (0x77777777) /* Fill word for buffers */
-#define B_MAX_BLOCKS (64 * 1024) /* Maximum allocated blocks */
-
-/*
- * Flags. The integer value is used as an arbitrary value to fill the flags.
- */
-
-#define B_USE_MALLOC 0x1 /* Okay to use malloc if required */
-#define B_USER_BUF 0x2 /* User supplied buffer for mem */
-#define B_INTEGRITY 0x8124000 /* Integrity value */
-#define B_INTEGRITY_MASK 0xFFFF000 /* Integrity mask */
-
-/*
- * The symbol table record for each symbol entry
- */
-
-typedef struct sym_t {
- struct sym_t *forw; /* Pointer to next hash list */
- value_t name; /* Name of symbol */
- value_t content; /* Value of symbol */
- int arg; /* Parameter value */
-} sym_t;
-
-typedef int sym_fd_t; /* Returned by symOpen */
-
-/*
- * Socket flags
- */
-#define SOCKET_EOF 0x1 /* Seen end of file */
-#define SOCKET_CONNECTING 0x2 /* Connect in progress */
-#define SOCKET_BROADCAST 0x4 /* Broadcast mode */
-#define SOCKET_PENDING 0x8 /* Message pending on this socket */
-#define SOCKET_FLUSHING 0x10 /* Background flushing */
-#define SOCKET_LISTENING 0x20 /* Server socket listening */
-
-/*
- * Socket error values
- */
-#define SOCKET_WOULDBLOCK 1 /* Socket would block on I/O */
-#define SOCKET_RESET 2 /* Socket has been reset */
-#define SOCKET_NETDOWN 3 /* Network is down */
-#define SOCKET_AGAIN 4 /* Issue the request again */
-#define SOCKET_INTR 5 /* Call was interrupted */
-#define SOCKET_INVAL 6 /* Invalid */
-
-/*
- * Handler event masks
- */
-#define SOCKET_READABLE 0x2 /* Make socket readable */
-#define SOCKET_WRITABLE 0x4 /* Make socket writable */
-#define SOCKET_EXCEPTION 0x8 /* Interested in exceptions */
-
-#define SOCKET_BUFSIZ 512 /* Underlying buffer size */
-
-typedef void (*socketHandler_t)(int sid, int mask, int data);
-typedef int (*socketAccept_t)(int sid, char *ipaddr, int port);
-
-/*
- * Script engines
- */
-#define EMF_SCRIPT_JSCRIPT 0 /* javascript */
-#define EMF_SCRIPT_TCL 1 /* tcl */
-#define EMF_SCRIPT_EJSCRIPT 2 /* Ejscript */
-#define EMF_SCRIPT_MAX 3
-
-#define MAXINT INT_MAX
-#define BITSPERBYTE 8
-#define BITS(type) (BITSPERBYTE * (int) sizeof(type))
-
-#ifndef max
-#define max(a,b) (((a) > (b)) ? (a) : (b))
-#endif
-
-#ifndef min
-#define min(a,b) (((a) < (b)) ? (a) : (b))
-#endif
-
-/******************************* Per O/S Defines ******************************/
-
-#if VXW486 || LINUX || __rtems__ || LYNX
-#ifndef O_BINARY
-#define O_BINARY 0
-#endif
-#define SOCKET_ERROR -1
-#endif
-
-#if WIN
-#undef R_OK
-#define R_OK 4
-#undef W_OK
-#define W_OK 2
-#undef X_OK
-#define X_OK 1
-#undef F_OK
-#define F_OK 0
-#endif
-
-/********************************* Prototypes *********************************/
-
-extern void bclose();
-extern int bopen(void *buf, int bufsize, int flags);
-#if NO_BALLOC
-#undef B_L
-#define B_L x
-#define balloc(x, num) malloc(num)
-#define bfree(x, p) free(p)
-#define bfreeSafe(x, p) \
- if (p) { bfree(x, p); } else
-#define brealloc(x, p, num) realloc(p, num)
-extern char *bstrdupANoBalloc(char *s);
-#define bstrdupA(x, s) bstrdupANoBalloc(s)
-#if UNICODE
-extern char_t *bstrdupNoBalloc(char_t *s);
-#define bstrdup(x, s) bstrdupNoBalloc(s)
-#define gstrdup(x, s) bstrdupNoBalloc(s)
-#else /* Not UNICODE */
-#define bstrdup(x, s) bstrdupANoBalloc(s)
-#define gstrdup(x, s) bstrdupANoBalloc(s)
-#endif /* UNICODE */
-
-#else /* BALLOC */
-extern void *balloc(B_ARGS_DEC, int size);
-extern void bfree(B_ARGS_DEC, void *mp);
-extern void *brealloc(B_ARGS_DEC, void *buf, int newsize);
-extern void bstats(int handle, void (*writefn)(int fd, char_t *fmt, ...));
-extern char_t *bstrdup(B_ARGS_DEC, char_t *s);
-extern void bfreeSafe(B_ARGS_DEC, void* mp);
-#define gstrdup(B_ARGS, s) bstrdup(B_ARGS, s)
-#if UNICODE
-extern char *bstrdupA(B_ARGS_DEC, char *s);
-#else
-#define bstrdupA bstrdup
-#endif /* UNICODE */
-#endif /* BALLOC */
-
-#if !LINUX && !__rtems__
-extern char_t* basename(char_t* name);
-#endif
-
-extern void *emfCreateTimer(int delay, void (*routine)(long arg), long arg);
-extern void emfDeleteTimer(void *id);
-extern int emfInstGet();
-extern void emfInstSet(int inst);
-extern void error(E_ARGS_DEC, int flags, char_t *fmt, ...);
-
-extern int hAlloc(void*** map);
-extern int hFree(void*** map, int handle);
-extern int hAllocEntry(void ***list, int *max, int size);
-
-extern int ringqOpen(ringq_t *rq, int increment, int maxsize);
-extern void ringqClose(ringq_t *rq);
-extern int ringqLen(ringq_t *rq);
-
-extern int ringqPutc(ringq_t *rq, char_t c);
-extern int ringqInsertc(ringq_t *rq, char_t c);
-extern int ringqPutstr(ringq_t *rq, char_t *str);
-extern int ringqGetc(ringq_t *rq);
-
-extern int gvsnprintf(char_t **s, int n, char_t *fmt, va_list arg);
-extern int gsnprintf(char_t **s, int n, char_t *fmt, ...);
-
-#if UNICODE
-extern int ringqPutcA(ringq_t* rq, char c);
-extern int ringqInsertcA(ringq_t* rq, char c);
-extern int ringqPutstrA(ringq_t* rq, char* str);
-extern int ringqGetcA(ringq_t* rq);
-#else
-#define ringqPutcA ringqPutc
-#define ringqInsertcA ringqInsertc
-#define ringqPutstrA ringqPutstr
-#define ringqGetcA ringqGetc
-#endif
-
-extern int ringqPutBlk(ringq_t *rq, unsigned char *buf, int len);
-extern int ringqPutBlkMax(ringq_t *rq);
-extern void ringqPutBlkAdj(ringq_t *rq, int size);
-extern int ringqGetBlk(ringq_t *rq, unsigned char *buf, int len);
-extern int ringqGetBlkMax(ringq_t *rq);
-extern void ringqGetBlkAdj(ringq_t *rq, int size);
-extern void ringqFlush(ringq_t *rq);
-
-extern int scriptSetVar(int engine, char_t *var, char_t *value);
-extern int scriptEval(int engine, char_t *cmd, char_t **rslt, int chan);
-
-extern void socketClose();
-extern void socketCloseConnection(int sid);
-extern void socketCreateHandler(int sid, int mask, socketHandler_t
- handler, int arg);
-extern void socketDeleteHandler(int sid);
-extern int socketEof(int sid);
-extern int socketFlush(int sid, int block);
-extern int socketGets(int sid, char_t** buf);
-extern int socketInputBuffered(int sid);
-extern int socketOpen();
-extern int socketOpenConnection(char *host, int port,
- socketAccept_t accept, int flags);
-extern void socketProcess();
-extern int socketRead(int sid, char *buf, int len);
-extern int socketReady();
-extern int socketWrite(int sid, char *buf, int len);
-extern int socketWriteString(int sid, char_t *buf);
-extern int socketSelect();
-
-extern char_t *strlower(char_t *string);
-extern char_t *strupper(char_t *string);
-
-extern char_t *stritoa(int n, char_t *string, int width);
-
-extern sym_fd_t symOpen(int hash_size);
-extern void symClose(sym_fd_t sd, void (*cleanup)(sym_t *sp));
-extern sym_t *symLookup(sym_fd_t sd, char_t *name);
-extern sym_t *symEnter(sym_fd_t sd, char_t *name, value_t v, int arg);
-extern int symDelete(sym_fd_t sd, char_t *name);
-extern void symWalk(sym_fd_t sd, void (*fn)(sym_t *symp));
-
-extern void trace(int lev, char_t *fmt, ...);
-
-extern value_t valueInteger(long value);
-extern value_t valueString(char_t *value, int flags);
-extern value_t valueErrmsg(char_t *value);
-extern void valueFree(value_t *v);
-
-extern char_t *ascToUni(char_t *ubuf, char *str, int nBytes);
-extern char *uniToAsc(char *buf, char_t *ustr, int nBytes);
-extern char_t *ballocAscToUni(char * cp);
-extern char *ballocUniToAsc(char_t * unip, int ulen);
-
-#endif /* _h_UEMF */
-
-/******************************************************************************/
diff --git a/cpukit/httpd/url.c b/cpukit/httpd/url.c
deleted file mode 100644
index 75746fd490..0000000000
--- a/cpukit/httpd/url.c
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- * url.c -- Parse URLs
- *
- * Copyright (c) Go Ahead Software Inc., 1995-1999. All Rights Reserved.
- *
- * See the file "license.txt" for usage and redistribution license requirements
- */
-
-/******************************** Description *********************************/
-
-/*
- * This module parses URLs into their components.
- */
-
-/********************************* Includes ***********************************/
-
-#include "wsIntrn.h"
-
-/********************************* Statics ************************************/
-/*
- * htmExt is declared in this way to avoid a Linux and Solaris segmentation
- * fault when a constant string is passed to strlower which could change its
- * argument.
- */
-
-char_t htmExt[] = T(".htm");
-
-
-/*********************************** Code *************************************/
-/*
- * Return the mime type for the given URL given a URL.
- * The caller supplies the buffer to hold the result.
- * charCnt is the number of characters the buffer will hold, ascii or UNICODE.
- */
-
-char_t *websUrlType(char_t *url, char_t *buf, int charCnt)
-{
- sym_t *sp;
- char_t *ext, *parsebuf;
-
- a_assert(url && *url);
- a_assert(buf && charCnt > 0);
-
- if (url == NULL || *url == '\0') {
- gstrcpy(buf, T("text/plain"));
- return buf;
- }
- if (websUrlParse(url, &parsebuf, NULL, NULL, NULL, NULL, NULL,
- NULL, &ext) < 0) {
- gstrcpy(buf, T("text/plain"));
- return buf;
- }
- strlower(ext);
-
-/*
- * Lookup the mime type symbol table to find the relevant content type
- */
- if ((sp = symLookup(websMime, ext)) != NULL) {
- gstrncpy(buf, sp->content.value.string, charCnt);
- } else {
- gstrcpy(buf, T("text/plain"));
- }
- bfree(B_L, parsebuf);
- return buf;
-}
-
-/******************************************************************************/
-/*
- * Parse the URL. A buffer is allocated to store the parsed URL in *pbuf.
- * This must be freed by the caller. NOTE: tag is not yet fully supported.
- */
-
-int websUrlParse(char_t *url, char_t **pbuf, char_t **phost, char_t **ppath,
- char_t **pport, char_t **pquery, char_t **pproto, char_t **ptag,
- char_t **pext)
-{
- char_t *tok, *cp, *host, *path, *port, *proto, *tag, *query, *ext;
- char_t *last_delim, *hostbuf, *portbuf, *buf;
- int c, len, ulen;
-
- a_assert(url);
- a_assert(pbuf);
-
- ulen = gstrlen(url);
-/*
- * We allocate enough to store a separate hostname and port number fields.
- * As there are 3 strings in the one buffer, we need room for 3 null chars.
- * We allocate MAX_PORT_LEN char_t's for the port number.
- */
- len = ulen * 2 + MAX_PORT_LEN + 3;
- if ((buf = balloc(B_L, len * sizeof(char_t))) == NULL) {
- return -1;
- }
- portbuf = &buf[len - MAX_PORT_LEN - 1];
- hostbuf = &buf[ulen+1];
- gstrcpy(buf, url);
- url = buf;
-
-/*
- * Convert the current listen port to a string. We use this if the URL has
- * no explicit port setting
- */
- stritoa(websGetPort(), portbuf, MAX_PORT_LEN);
- port = portbuf;
- path = T("/");
- proto = T("http");
- host = T("localhost");
- query = T("");
- ext = htmExt;
- tag = T("");
-
- if (gstrncmp(url, T("http://"), 7) == 0) {
- tok = &url[7];
- tok[-3] = '\0';
- proto = url;
- host = tok;
- for (cp = tok; *cp; cp++) {
- if (*cp == '/') {
- break;
- }
- if (*cp == ':') {
- *cp++ = '\0';
- port = cp;
- tok = cp;
- }
- }
- if ((cp = gstrchr(tok, '/')) != NULL) {
-/*
- * If a full URL is supplied, we need to copy the host and port
- * portions into static buffers.
- */
- c = *cp;
- *cp = '\0';
- gstrncpy(hostbuf, host, ulen);
- gstrncpy(portbuf, port, MAX_PORT_LEN);
- *cp = c;
- host = hostbuf;
- port = portbuf;
- path = cp;
- tok = cp;
- }
-
- } else {
- path = url;
- tok = url;
- }
-
-/*
- * Parse the tag and the query
- */
- if ((cp = gstrchr(tok, '#')) != NULL) {
- *cp++ = '\0';
- path = tok;
- tok = cp;
- }
- if ((cp = gstrchr(tok, '?')) != NULL) {
- *cp++ = '\0';
- query = cp;
- }
-
-/*
- * Only do the following if asked for the extension
- */
- if (pext) {
- if ((cp = gstrrchr(path, '.')) != NULL) {
- if ((last_delim = gstrrchr(path, '/')) != NULL) {
- if (last_delim > cp) {
- ext = htmExt;
- } else {
- ext = cp;
- }
- } else {
- ext = cp;
- }
- } else {
- if (path[gstrlen(path) - 1] == '/') {
- ext = htmExt;
- }
- }
- }
-
-/*
- * Pass back the fields requested (if not NULL)
- */
- if (phost)
- *phost = host;
- if (ppath)
- *ppath = path;
- if (pport)
- *pport = port;
- if (pproto)
- *pproto = proto;
- if (pquery)
- *pquery = query;
- if (ptag)
- *ptag = tag;
- if (pext)
- *pext = ext;
- *pbuf = buf;
- return 0;
-}
-
-/******************************************************************************/
diff --git a/cpukit/httpd/value.c b/cpukit/httpd/value.c
deleted file mode 100644
index 5872382556..0000000000
--- a/cpukit/httpd/value.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * value.c -- Generic type (holds all types)
- *
- * Copyright (c) Go Ahead Software, Inc., 1995-1999
- *
- * See the file "license.txt" for usage and redistribution license requirements
- */
-
-/******************************** Description *********************************/
-
-/*
- * This module provides a generic type that can hold all possible types.
- * It is designed to provide maximum effeciency.
- */
-
-/********************************* Includes ***********************************/
-
-#include "uemf.h"
-
-/*********************************** Locals ***********************************/
-
-
-/*********************************** Code *************************************/
-/*
- * Initialize a integer value.
- */
-
-value_t valueInteger(long value)
-{
- value_t v = VALUE_VALID;
-
- v.value.integer = value;
- return v;
-}
-
-/******************************************************************************/
-/*
- * Initialize a string value. Note: not allocation
- */
-
-value_t valueString(char_t *value, int flags)
-{
- value_t v = VALUE_VALID;
-
- v.type = string;
- if (flags & VALUE_ALLOCATE) {
- v.allocated = 1;
- v.value.string = gstrdup(B_L, value);
- } else {
- v.allocated = 0;
- v.value.string = value;
- }
- return v;
-}
-
-/******************************************************************************/
-/*
- * Free any storage allocated for a value.
- */
-
-void valueFree(value_t *v)
-{
- a_assert(v);
-
- if (v->valid && v->allocated && v->type == string &&
- v->value.string != NULL) {
- bfree(B_L, v->value.string);
- }
- v->type = undefined;
- v->valid = 0;
- v->allocated = 0;
-}
-
-/******************************************************************************/
diff --git a/cpukit/httpd/wbase64.c b/cpukit/httpd/wbase64.c
deleted file mode 100644
index 0898b16728..0000000000
--- a/cpukit/httpd/wbase64.c
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * base64.c -- Base64 Mime encoding
- *
- * Copyright (c) Go Ahead Software Inc., 1995-1999. All Rights Reserved.
- *
- * See the file "license.txt" for usage and redistribution license requirements
- */
-
-/******************************** Description *********************************/
-
-/*
- * The base64 command encodes and decodes a string in mime base64 format
- */
-
-/********************************* Includes ***********************************/
-
-#include "wsIntrn.h"
-
-/******************************** Local Data **********************************/
-/*
- * Mapping of ANSI chars to base64 Mime encoding alphabet (see below)
- */
-
-static char_t map64[] = {
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1,
- -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
- 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1,
- -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
- 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-};
-
-static char_t alphabet64[] = {
- 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
- 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
- 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X',
- 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f',
- 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',
- 'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
- 'w', 'x', 'y', 'z', '0', '1', '2', '3',
- '4', '5', '6', '7', '8', '9', '+', '/',
-};
-
-/*********************************** Code *************************************/
-/*
- * Decode a buffer from "string" and into "outbuf"
- */
-
-int websDecode64(char_t* outbuf, char_t* string, int outlen)
-{
- unsigned long shiftbuf;
- char_t* cp;
- char_t* op;
- int c, i, j, shift;
-
- op = outbuf;
- *op = '\0';
- cp = string;
- while (*cp && *cp != '=') {
-/*
- * Map 4 (6bit) input bytes and store in a single long (shiftbuf)
- */
- shiftbuf = 0;
- shift = 18;
- for (i = 0; i < 4 && *cp && *cp != '='; i++, cp++) {
- c = map64[*cp & 0xff];
- if (c == -1) {
- error(E_L, E_LOG, T("Bad string: %s at %c index %d"), string,
- c, i);
- return -1;
- }
- shiftbuf = shiftbuf | (c << shift);
- shift -= 6;
- }
-/*
- * Interpret as 3 normal 8 bit bytes (fill in reverse order).
- * Check for potential buffer overflow before filling.
- */
- --i;
- if ((op + i) >= &outbuf[outlen]) {
- gstrcpy(outbuf, T("String too big"));
- return -1;
- }
- for (j = 0; j < i; j++) {
- *op++ = (char_t) ((shiftbuf >> (8 * (2 - j))) & 0xff);
- }
- *op = '\0';
- }
- return 0;
-}
-
-
-/******************************************************************************/
-/*
- * Encode a buffer from "string" into "outbuf"
- */
-
-void websEncode64(char_t* outbuf, char_t* string, int outlen)
-{
- unsigned long shiftbuf;
- char_t* cp;
- char_t* op;
- int x, i, j, shift;
-
- op = outbuf;
- *op = '\0';
- cp = string;
- while (*cp) {
-/*
- * Take three characters and create a 24 bit number in shiftbuf
- */
- shiftbuf = 0;
- for (j = 2; j >= 0 && *cp; j--, cp++) {
- shiftbuf |= ((*cp & 0xff) << (j * 8));
- }
-/*
- * Now convert shiftbuf to 4 base64 letters. The i,j magic calculates
- * how many letters need to be output.
- */
- shift = 18;
- for (i = ++j; i < 4 && op < &outbuf[outlen] ; i++) {
- x = (shiftbuf >> shift) & 0x3f;
- *op++ = alphabet64[(shiftbuf >> shift) & 0x3f];
- shift -= 6;
- }
-/*
- * Pad at the end with '='
- */
- while (j-- > 0) {
- *op++ = '=';
- }
- *op = '\0';
- }
-}
-/******************************************************************************/
diff --git a/cpukit/httpd/webcomp.c b/cpukit/httpd/webcomp.c
deleted file mode 100644
index d642a144c0..0000000000
--- a/cpukit/httpd/webcomp.c
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
- * webcomp -- Compile web pages into C source
- *
- * Copyright (c) Go Ahead Software Inc., 1995-1999. All Rights Reserved.
- *
- * See the file "license.txt" for usage and redistribution license requirements
- */
-
-/******************************** Description *********************************/
-
-/*
- * Usage: webcomp prefix filelist >webrom.c
- *
- * filelist is a file containing the pathnames of all web pages
- * prefix is a path prefix to remove from all the web page pathnames
- * webrom.c is the resulting C source file to compile and link.
- */
-
-/********************************* Includes ***********************************/
-
-#include "wsIntrn.h"
-
-/**************************** Forward Declarations ****************************/
-
-static int compile(char_t *fileList, char_t *prefix);
-static void usage();
-
-/*********************************** Code *************************************/
-/*
- * Main program for webpack test harness
- */
-
-int gmain(int argc, char_t* argv[])
-{
- char_t *fileList, *prefix;
-
- fileList = NULL;
-
- if (argc != 3) {
- usage();
- }
-
- prefix = argv[1];
- fileList = argv[2];
-
- if (compile(fileList, prefix) < 0) {
- return -1;
- }
- return 0;
-}
-
-/******************************************************************************/
-/*
- * Output usage message
- */
-
-static void usage()
-{
- fprintf(stderr, "usage: webcomp prefix filelist >output.c\n");
- exit(2);
-}
-
-/******************************************************************************/
-/*
- * Compile the web pages
- */
-
-static int compile(char_t *fileList, char_t *prefix)
-{
- gstat_t sbuf;
- FILE *lp;
- time_t now;
- char_t file[FNAMESIZE];
- char_t *cp;
- char buf[512];
- char *p;
- int j, i, len, fd, nFile;
-
-/*
- * Open list of files
- */
- if ((lp = fopen(fileList, "r")) == NULL) {
- fprintf(stderr, "Can't open file list %s\n", fileList);
- return -1;
- }
-
- time(&now);
- fprintf(stdout, "/*\n * webrom.c -- Compiled Web Pages\n *\n");
- fprintf(stdout, " * Compiled by GoAhead WebCompile: %s */\n\n",
- ctime(&now));
- fprintf(stdout, "#include \"wsIntrn.h\"\n\n");
- fprintf(stdout, "#ifndef WEBS_PAGE_ROM\n");
- fprintf(stdout, "websRomPageIndexType websRomPageIndex[] = {\n");
- fprintf(stdout, " { 0, 0, 0 },\n};\n");
- fprintf(stdout, "#else\n");
-
-/*
- * Open each input file and compile each web page
- */
- nFile = 0;
- while (fgets(file, sizeof(file), lp) != NULL) {
- if ((p = strchr(file, '\n')) || (p = strchr(file, '\r'))) {
- *p = '\0';
- }
- if (gstat(file, &sbuf) == 0 && sbuf.st_mode & S_IFDIR) {
- continue;
- }
- if ((fd = gopen(file, O_RDONLY | O_BINARY)) < 0) {
- fprintf(stderr, "Can't open file %s\n", file);
- return -1;
- }
- fprintf(stdout, "static unsigned char page_%d[] = {\n", nFile);
-
- while ((len = read(fd, buf, sizeof(buf))) > 0) {
- p = buf;
- for (i = 0; i < len; ) {
- fprintf(stdout, " ");
- for (j = 0; p < &buf[len] && j < 16; j++, p++) {
- fprintf(stdout, "%3d,", *p);
- }
- i += j;
- fprintf(stdout, "\n");
- }
- }
- fprintf(stdout, " 0 };\n\n");
-
- close(fd);
- nFile++;
- }
- fclose(lp);
-
-/*
- * Now output the page index
- */
- fprintf(stdout, "websRomPageIndexType websRomPageIndex[] = {\n");
-
- if ((lp = fopen(fileList, "r")) == NULL) {
- fprintf(stderr, "Can't open file list %s\n", fileList);
- return -1;
- }
- nFile = 0;
- while (fgets(file, sizeof(file), lp) != NULL) {
- if ((p = strchr(file, '\n')) || (p = strchr(file, '\r'))) {
- *p = '\0';
- }
-/*
- * Remove the prefix and add a leading "/" when we print the path
- */
- if (strncmp(file, prefix, gstrlen(prefix)) == 0) {
- cp = &file[gstrlen(prefix)];
- } else {
- cp = file;
- }
- if (*cp == '/') {
- cp++;
- }
-
- if (gstat(file, &sbuf) == 0 && sbuf.st_mode & S_IFDIR) {
- fprintf(stdout, " { T(\"/%s\"), 0, 0 },\n", cp);
- continue;
- }
- fprintf(stdout, " { T(\"/%s\"), page_%d, %ld },\n", cp, nFile,
- (long) sbuf.st_size);
- nFile++;
- }
- fclose(lp);
-
- fprintf(stdout, " { 0, 0, 0 },\n");
- fprintf(stdout, "};\n");
- fprintf(stdout, "#endif /* WEBS_PAGE_ROM */\n");
-
- fclose(lp);
- fflush(stdout);
- return 0;
-}
-
-/******************************************************************************/
diff --git a/cpukit/httpd/webmain.c b/cpukit/httpd/webmain.c
deleted file mode 100644
index f61b649ced..0000000000
--- a/cpukit/httpd/webmain.c
+++ /dev/null
@@ -1,417 +0,0 @@
-/*
- * main.c -- Main program for the GoAhead WebServer (RTEMS version)
- *
- * Copyright (c) Go Ahead Software Inc., 1995-1999. All Rights Reserved.
- *
- * See the file "license.txt" for usage and redistribution license requirements
- *
- * $Id$
- */
-
-/******************************** Description *********************************/
-
-/*
- * Main program for for the GoAhead WebServer. This is a demonstration
- * main program to initialize and configure the web server.
- */
-
-/********************************* Includes ***********************************/
-
-#include "uemf.h"
-#include "wsIntrn.h"
-#include <signal.h>
-#include <sys/time.h>
-#include <pthread.h>
-
-#include <rtems/error.h>
-
-/*********************************** Locals ***********************************/
-/*
- * Change configuration here
- */
-
-static char_t *rootWeb = T("web"); /* Root web directory */
-static char_t *password = T(""); /* Security password */
-static int port = 80; /* Server port */
-static int retries = 5; /* Server port retries */
-static int finished; /* Finished flag */
-
-/*
- * Structure to hold timer events
- */
-typedef struct {
- void (*routine)(long arg); /* Timer routine */
- long arg; /* Argument to routine */
-} websTimer_t;
-
-/* The following holds the pointer to an allocated websTimer_t structure .
- * Using this method only one timer can be active at a time, but
- * for the WebServer, this should be OK.
- */
-websTimer_t *tp;
-
-/****************************** Forward Declarations **************************/
-
-static int initWebs();
-static int aspTest(int eid, webs_t wp, int argc, char_t **argv);
-static void formTest(webs_t wp, char_t *path, char_t *query);
-static int websHomePageHandler(webs_t wp, char_t *urlPrefix, char_t *webDir,
- int arg, char_t* url, char_t* path, char_t* query);
-static void timerProc(int signo);
-#if B_STATS
-static void printMemStats(int handle, char_t *fmt, ...);
-static void memLeaks();
-#endif
-static timer_t timer_id;
-static void rtems_httpd_daemon();
-
-/*********************************** Code *************************************/
-/*
- * Main -- entry point from RTEMS
- */
-int rtems_initialize_webserver()
-{
- rtems_status_code sc;
- rtems_id tid;
- int priority;
-
- /***********************************************************************
- * Default HTTPD priority.
- **********************************************************************/
- priority = 40;
-
- sc = rtems_task_create(rtems_build_name('H', 'T', 'P', 'D'),
- priority, 8*1024,
- RTEMS_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR |
- RTEMS_INTERRUPT_LEVEL(0),
- RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
- &tid);
- if (sc != RTEMS_SUCCESSFUL)
- {
- return(RTEMS_UNSATISFIED);
- }
-
- sc = rtems_task_start(tid, rtems_httpd_daemon, 0);
- if (sc != RTEMS_SUCCESSFUL)
- {
- return(RTEMS_UNSATISFIED);
- }
-
- return(RTEMS_SUCCESSFUL);
-
-}
-
-static void
-rtems_httpd_daemon()
-{
-/*
- * Initialize the memory allocator. Allow use of malloc and start with a
- * 10K heap.
- */
- bopen(NULL, (10 * 1024), B_USE_MALLOC);
-
-/*
- * Initialize the web server
- */
- if (initWebs() < 0) {
- rtems_panic("Unable to initialize Web server !!\n");
- }
-
-/*
- * Basic event loop. SocketReady returns true when a socket is ready for
- * service. SocketSelect will block until an event occurs. SocketProcess
- * will actually do the servicing.
- */
- while (!finished) {
- if (socketReady() || socketSelect()) {
- socketProcess();
- }
- }
-
-/*
- * Close the socket module, report memory leaks and close the memory allocator
- */
- websCloseServer();
- socketClose();
-#if B_STATS
- memLeaks();
-#endif
- bclose();
- rtems_task_delete( RTEMS_SELF );
-}
-
-/******************************************************************************/
-/*
- * Initialize the web server.
- */
-
-static int initWebs()
-{
- struct hostent* hp;
- struct in_addr intaddr;
- char host[128], dir[128], webdir[128];
- char *cp;
- char_t wbuf[128];
-
-/*
- * Initialize the socket subsystem
- */
- socketOpen();
-
-/*
- * Define the local Ip address, host name, default home page and the
- * root web directory.
- */
- if (gethostname(host, sizeof(host)) < 0) {
- error(E_L, E_LOG, T("Can't get hostname"));
- return -1;
- }
-
-/* intaddr.s_addr = (unsigned long) hostGetByName(host); */
- if ((hp = gethostbyname(host)) == NULL) {
- error(E_L, E_LOG, T("Can't get host address"));
- return -1;
- }
- memcpy((char *) &intaddr, (char *) hp->h_addr_list[0],
- (size_t) hp->h_length);
-
-/*
- * Set ../web as the root web. Modify this to suit your needs
- */
- getcwd(dir, sizeof(dir));
- if ((cp = strrchr(dir, '/'))) {
- *cp = '\0';
- }
- sprintf(webdir, "%s/%s", dir, rootWeb);
-
-/*
- * Configure the web server options before opening the web server
- */
- websSetDefaultDir(webdir);
- ascToUni(wbuf, inet_ntoa(intaddr), sizeof(wbuf));
- websSetIpaddr(wbuf);
- ascToUni(wbuf, host, sizeof(wbuf));
- websSetHost(wbuf);
-
-/*
- * Configure the web server options before opening the web server
- */
- websSetDefaultPage(T("default.asp"));
- websSetPassword(password);
-
-/*
- * Open the web server on the given port. If that port is taken, try
- * the next sequential port for up to "retries" attempts.
- */
- websOpenServer(port, retries);
-
-/*
- * First create the URL handlers. Note: handlers are called in sorted order
- * with the longest path handler examined first. Here we define the security
- * handler, forms handler and the default web page handler.
- */
- websUrlHandlerDefine(T(""), NULL, 0, websSecurityHandler,
- WEBS_HANDLER_FIRST);
- websUrlHandlerDefine(T("/goform"), NULL, 0, websFormHandler, 0);
- websUrlHandlerDefine(T(""), NULL, 0, websDefaultHandler,
- WEBS_HANDLER_LAST);
-
-/*
- * Now define two test procedures. Replace these with your application
- * relevant ASP script procedures and form functions.
- */
- websAspDefine(T("aspTest"), aspTest);
- websFormDefine(T("formTest"), formTest);
-
-/*
- * Create a handler for the default home page
- */
- websUrlHandlerDefine(T("/"), NULL, 0, websHomePageHandler, 0);
- return 0;
-}
-
-/******************************************************************************/
-/*
- * Test Javascript binding for ASP. This will be invoked when "aspTest" is
- * embedded in an ASP page. See web/asp.asp for usage. Set browser to
- * "localhost/asp.asp" to test.
- */
-
-static int aspTest(int eid, webs_t wp, int argc, char_t **argv)
-{
- char_t *name, *address;
-
- if (ejArgs(argc, argv, T("%s %s"), &name, &address) < 2) {
- websError(wp, 400, T("Insufficient args\n"));
- return -1;
- }
- return websWrite(wp, T("Name: %s, Address %s"), name, address);
-}
-/******************************************************************************/
-/*
- * Test form for posted data (in-memory CGI). This will be called when the
- * form in web/asp.asp is invoked. Set browser to "localhost/asp.asp" to test.
- */
-
-static void formTest(webs_t wp, char_t *path, char_t *query)
-{
- char_t *name, *address;
-
- name = websGetVar(wp, T("name"), T("Joe Smith"));
- address = websGetVar(wp, T("address"), T("1212 Milky Way Ave."));
-
- websHeader(wp);
- websWrite(wp, T("<body><h2>Name: %s, Address: %s</h2>\n"), name, address);
- websFooter(wp);
- websDone(wp, 200);
-}
-
-/******************************************************************************/
-/*
- * Create a timer to invoke the routine in "delay" milliseconds.
- */
-
-void *emfCreateTimer(int delay, void (*routine)(long arg), long arg)
-{
-/* this variable is only used in the if'ed 0 section below */
-#if 0
- struct sigaction act;
-#endif
- struct itimerspec its = { {0,0}, {0,0} };
- struct sigevent se;
- int status;
-
- if ((tp = balloc(B_L, sizeof(websTimer_t)))) {
- tp->routine = routine;
- tp->arg = arg;
- }
- else {
- return NULL;
- }
-
- se.sigev_notify = SIGEV_THREAD;
- se.sigev_value.sival_ptr = tp;
- se.sigev_notify_function = (void (*)(union sigval)) timerProc;
-
- /*
- * NOT POSIX?
- * se.sigev_notify_attributes = NULL;
- */
-
-
- status = timer_create(CLOCK_REALTIME, &se, &timer_id);
- if (status != 0) {
- bfree(B_L, tp);
- return NULL;
- }
- /* convert delay millisecs to secs and usecs required by struct */
- its.it_value.tv_sec = delay / 1000;
- its.it_value.tv_nsec = (delay % 1000) * 1000000;
-
- status = timer_settime(timer_id, 0, &its, 0);
- if (status != 0) {
- bfree(B_L, tp);
- return NULL;
- }
-
-#if 0
- act.sa_flags = 0;
- sigemptyset(&act.sa_mask);
- act.sa_handler = timerProc;
- sigaction(SIGALRM, &act, NULL);
-
- /* convert delay millisecs to secs and usecs required by struct */
- its.it_value.tv_sec = delay / 1000;
- its.it_value.tv_usec = (delay % 1000) * 1000;
-
- if (setitimer(ITIMER_REAL, &its, NULL) == -1) {
- bfree(B_L, tp);
- return NULL;
- }
-#endif
- return tp;
-}
-
-/******************************************************************************/
-/*
- * Delete a timer
- */
-
-void emfDeleteTimer(void * id)
-{
- websTimer_t *wtp;
- /*struct itimerval its = { {0,0}, {0,0} };*/
-
- wtp = (websTimer_t *)id;
- /* setitimer(ITIMER_REAL, &its, NULL);*/
- timer_delete(timer_id);
- bfree(B_L, wtp);
-}
-
-/******************************************************************************/
-/*
- * Timer handler
- */
-
-static void timerProc(int signo)
-{
- websTimer_t wtp = *tp;
-
-/* Copy the timer structure to a local first and delete it before calling
- * the function, since the function could create another timer. In this
- * implementation, only one timer can be allocated at a time.
- */
-
- bfree(B_L, tp);
- (wtp.routine)(wtp.arg);
-}
-
-/******************************************************************************/
-/*
- * Home page handler
- */
-
-static int websHomePageHandler(webs_t wp, char_t *urlPrefix, char_t *webDir,
- int arg, char_t* url, char_t* path, char_t* query)
-{
-/*
- * If the empty or "/" URL is invoked, redirect default URLs to the home page
- */
- if (*url == '\0' || gstrcmp(url, T("/")) == 0) {
- websRedirect(wp, T("home.asp"));
- return 1;
- }
- return 0;
-}
-
-/******************************************************************************/
-
-#if B_STATS
-static void memLeaks()
-{
- int fd;
-
- if ((fd = gopen(T("leak.txt"), O_CREAT | O_TRUNC | O_WRONLY)) >= 0) {
- bstats(fd, printMemStats);
- close(fd);
- }
-}
-
-/******************************************************************************/
-/*
- * Print memory usage / leaks
- */
-
-static void printMemStats(int handle, char_t *fmt, ...)
-{
- va_list args;
- char_t buf[256];
-
- va_start(args, fmt);
- vsprintf(buf, fmt, args);
- va_end(args);
- write(handle, buf, strlen(buf));
-}
-#endif
-
-/******************************************************************************/
diff --git a/cpukit/httpd/webpage.c b/cpukit/httpd/webpage.c
deleted file mode 100644
index d2b976e38f..0000000000
--- a/cpukit/httpd/webpage.c
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Page.c -- Support for page retrieval.
- *
- * Copyright (c) Go Ahead Software Inc., 1995-1999. All Rights Reserved.
- *
- * See the file "license.txt" for usage and redistribution license requirements
- */
-
-/******************************** Description *********************************/
-
-/*
- * This module provides page retrieval handling. It provides support for
- * reading web pages from file systems and has expansion for ROMed web
- * pages.
- */
-
-/********************************* Includes ***********************************/
-
-#include "wsIntrn.h"
-
-/*********************************** Code *************************************/
-/*
- * Open a web page. lpath is the local filename. path is the URL path name.
- */
-
-int websPageOpen(webs_t wp, char_t *lpath, char_t *path, int mode, int perm)
-{
- a_assert(websValid(wp));
-
-#if WEBS_PAGE_ROM
- return websRomPageOpen(wp, path, mode, perm);
-#else
- return (wp->docfd = gopen(lpath, mode, perm));
-#endif /* WEBS_PAGE_ROM */
-}
-
-/******************************************************************************/
-/*
- * Close a web page
- */
-
-void websPageClose(webs_t wp)
-{
-#if WEBS_PAGE_ROM
- websRomPageClose(wp->docfd);
-#else
- if (wp->docfd >= 0) {
- close(wp->docfd);
- wp->docfd = -1;
- }
-#endif
-}
-
-/******************************************************************************/
-/*
- * Stat a web page lpath is the local filename. path is the URL path name.
- */
-
-int websPageStat(webs_t wp, char_t *lpath, char_t *path, websStatType* sbuf)
-{
-#if WEBS_PAGE_ROM
- return websRomPageStat(path, sbuf);
-#else
- gstat_t s;
-
- if (gstat(lpath, &s) < 0) {
- return -1;
- }
- sbuf->size = s.st_size;
- sbuf->mtime = s.st_mtime;
- sbuf->isDir = s.st_mode & S_IFDIR;
- return 0;
-#endif
-}
-
-/******************************************************************************/
-/*
- * Is this file a directory?
- */
-
-int websPageIsDirectory(char_t *lpath)
-{
-#if WEBS_PAGE_ROM
- websStatType sbuf;
-
- if (websRomPageStat(lpath, &sbuf) >= 0) {
- return(sbuf.isDir);
- } else {
- return 0;
- }
-#else
- gstat_t sbuf;
-
- if (gstat(lpath, &sbuf) >= 0) {
- return(sbuf.st_mode & S_IFDIR);
- } else {
- return 0;
- }
-#endif
-}
-
-
-/******************************************************************************/
-/*
- * Read a web page. Returns the number of _bytes_ read.
- * len is the size of buf, in bytes.
- */
-
-int websPageReadData(webs_t wp, char *buf, int nBytes)
-{
-
-#if WEBS_PAGE_ROM
- a_assert(websValid(wp));
- return websRomPageReadData(wp, buf, nBytes);
-#else
- a_assert(websValid(wp));
- return read(wp->docfd, buf, nBytes);
-#endif
-}
-
-/******************************************************************************/
-/*
- * Move file pointer offset bytes.
- */
-
-void websPageSeek(webs_t wp, long offset)
-{
- a_assert(websValid(wp));
-
-#if WEBS_PAGE_ROM
- websRomPageSeek(wp, offset, SEEK_CUR);
-#else
- lseek(wp->docfd, offset, SEEK_CUR);
-#endif
-}
-
-/******************************************************************************/
-
diff --git a/cpukit/httpd/webrom.c b/cpukit/httpd/webrom.c
deleted file mode 100644
index 225d8bbf22..0000000000
--- a/cpukit/httpd/webrom.c
+++ /dev/null
@@ -1,12 +0,0 @@
-/*
- * webrom.c -- Compiled Web Pages
- *
- * Copyright (c) Go Ahead Software Inc., 1995-1999. All Rights Reserved.
- * See the file "license.txt" for usage and redistribution license requirements
- */
-
-#include "wsIntrn.h"
-
-websRomPageIndexType websRomPageIndex[] = {
- { 0, 0, 0 },
-};
diff --git a/cpukit/httpd/webs.c b/cpukit/httpd/webs.c
deleted file mode 100644
index e198cc1e9a..0000000000
--- a/cpukit/httpd/webs.c
+++ /dev/null
@@ -1,1841 +0,0 @@
-/*
- * webs.c -- GoAhead Embedded HTTP webs server
- *
- * Copyright (c) Go Ahead Software Inc., 1995-1999. All Rights Reserved.
- *
- * See the file "license.txt" for usage and redistribution license requirements
- */
-
-/******************************** Description *********************************/
-
-/*
- * This module implements an embedded HTTP/1.1 webs server. It supports
- * loadable URL handlers that define the nature of URL processing performed.
- */
-
-/********************************* Includes ***********************************/
-
-#include "wsIntrn.h"
-
-/******************************** Global Data *********************************/
-
-websStatsType websStats; /* Web access stats */
-webs_t *webs; /* Open connection list head */
-sym_fd_t websMime; /* Set of mime types */
-int websMax; /* List size */
-int websPort; /* Listen port for server */
-char_t websHost[64]; /* Host name for the server */
-char_t websIpaddr[64]; /* IP address for the server */
-char_t *websHostUrl = NULL; /* URL to access server */
-
-/*********************************** Locals ***********************************/
-/*
- * Standard HTTP error codes
- */
-
-websErrorType websErrors[] = {
- { 200, T("Data follows") },
- { 204, T("No Content") },
- { 301, T("Redirect") },
- { 302, T("Redirect") },
- { 304, T("User local copy") },
- { 400, T("Page not found") },
- { 401, T("Password Required") },
- { 404, T("Site or Page Not Found") },
- { 405, T("Access Denied") },
- { 500, T("Web Error") },
- { 503, T("Site Temporarily Unavailable. Try again") },
- { 0, NULL }
-};
-
-#if WEBS_LOG_SUPPORT
-static char_t websLogname[64] = T("log.txt"); /* Log filename */
-static int websLogFd; /* Log file handle */
-#endif
-
-static int websListenSock; /* Listen socket */
-
-/**************************** Forward Declarations ****************************/
-
-static int websAccept(int sid, char *ipaddr, int port);
-static int websAlloc(int sid);
-static char_t *websErrorMsg(int code);
-static void websFree(webs_t wp);
-static void websFreeVar(sym_t* sp);
-static int websGetInput(webs_t wp, char_t **ptext, int *nbytes);
-static int websParseFirst(webs_t wp, char_t *text);
-static void websParseRequest(webs_t wp);
-static void websReadEvent(webs_t wp);
-static void websSocketEvent(int sid, int mask, int data);
-static void websTimeout(long wp);
-static void websTimeoutCancel(webs_t wp);
-static void websMarkTime(webs_t wp);
-static int websGetTimeSinceMark(webs_t wp);
-
-#if WEBS_LOG_SUPPORT
-static void websLog(webs_t wp, int code);
-#endif
-#if WEBS_IF_MODIFIED_SUPPORT
-static time_t dateParse(time_t tip, char_t *cmd);
-#endif
-
-/*********************************** Code *************************************/
-/*
- * Open the GoAhead WebServer
- */
-
-int websOpenServer(int port, int retries)
-{
- websMimeType *mt;
-
- a_assert(port > 0);
- a_assert(retries >= 0);
-
-#if WEBS_PAGE_ROM
- websRomOpen();
-#endif
-
-/*
- * Create a mime type lookup table for quickly determining the content type
- */
- websMime = symOpen(256);
- a_assert(websMime >= 0);
- for (mt = websMimeList; mt->type; mt++) {
- symEnter(websMime, mt->ext, valueString(mt->type, 0), 0);
- }
-
-/*
- * Open the URL handler module. The caller should create the required
- * URL handlers after calling this function.
- */
- if (websUrlHandlerOpen() < 0) {
- return -1;
- }
-
-#if WEBS_LOG_SUPPORT
-/*
- * Optional request log support
- */
- websLogFd = gopen(websLogname, O_CREAT | O_TRUNC | O_APPEND | O_WRONLY,
- 0666);
- a_assert(websLogFd >= 0);
-#endif
-
- return websOpenListen(port, retries);
-}
-
-/******************************************************************************/
-/*
- * Close the GoAhead WebServer
- */
-
-void websCloseServer()
-{
- webs_t wp;
- int wid;
-
-/*
- * Close the listen handle first then all open connections.
- */
- websCloseListen();
-
-/*
- * Close each open browser connection and free all resources
- */
- for (wid = websMax; webs && wid >= 0; wid--) {
- if ((wp = webs[wid]) == NULL) {
- continue;
- }
- socketCloseConnection(wp->sid);
- websFree(wp);
- }
-
-#if WEBS_LOG_SUPPORT
- if (websLogFd >= 0) {
- close(websLogFd);
- websLogFd = -1;
- }
-#endif
-
-#if WEBS_PAGE_ROM
- websRomClose();
-#endif
- symClose(websMime, NULL);
- websFormClose();
- websUrlHandlerClose();
-}
-
-/******************************************************************************/
-/*
- * Open the GoAhead WebServer listen port
- */
-
-int websOpenListen(int port, int retries)
-{
- int i, orig;
-
- a_assert(port > 0);
- a_assert(retries >= 0);
-
- orig = port;
-/*
- * Open the webs webs listen port. If we fail, try the next port.
- */
- for (i = 0; i <= retries; i++) {
- websListenSock = socketOpenConnection(NULL, port, websAccept, 0);
- if (websListenSock >= 0) {
- break;
- }
- port++;
- }
- if (i > retries) {
- error(E_L, E_USER, T("Couldn't open a socket on ports %d - %d"),
- orig, port - 1);
- return -1;
- }
- trace(0, T("webs: Listening for HTTP requests on port %d\n"), port);
-
-/*
- * Determine the full URL address to access the home page for this web server
- */
- websPort = port;
- bfreeSafe(B_L, websHostUrl);
- websHostUrl = NULL;
- if (port == 80) {
- websHostUrl = bstrdup(B_L, websHost);
- } else {
- gsnprintf(&websHostUrl, WEBS_MAX_URL + 80, T("%s:%d"), websHost, port);
- }
- return port;
-}
-
-/******************************************************************************/
-/*
- * Close webs listen port
- */
-
-void websCloseListen()
-{
- if (websListenSock >= 0) {
- socketCloseConnection(websListenSock);
- websListenSock = -1;
- }
- bfreeSafe(B_L, websHostUrl);
- websHostUrl = NULL;
-}
-
-/******************************************************************************/
-/*
- * Accept a connection
- */
-
-static int websAccept(int sid, char *ipaddr, int port)
-{
- webs_t wp;
- int wid;
-
- a_assert(ipaddr && *ipaddr);
- a_assert(sid >= 0);
- a_assert(port >= 0);
-
-/*
- * Allocate a new handle for this accepted connection. This will allocate
- * a webs_t structure in the webs[] list
- */
- if ((wid = websAlloc(sid)) < 0) {
- return -1;
- }
- wp = webs[wid];
- a_assert(wp);
-
- ascToUni(wp->ipaddr, ipaddr, sizeof(wp->ipaddr));
-
-/*
- * Check if this is a request from a browser on this system. This is useful
- * to know for permitting administrative operations only for local access
- */
- if (gstrcmp(wp->ipaddr, T("127.0.0.1")) == 0 ||
- gstrcmp(wp->ipaddr, websIpaddr) == 0 ||
- gstrcmp(wp->ipaddr, websHost) == 0) {
- wp->flags |= WEBS_LOCAL_REQUEST;
- }
-
-/*
- * Arrange for websSocketEvent to be called when read data is available
- */
- socketCreateHandler(sid, SOCKET_READABLE , websSocketEvent, (int) wp);
-
-/*
- * Arrange for a timeout to kill hung requests
- */
- wp->timeout = emfCreateTimer(WEBS_TIMEOUT, websTimeout, (long) wp);
- trace(5, T("webs: accept request\n"));
- return 0;
-}
-
-/******************************************************************************/
-/*
- * The webs socket handler. Called in response to I/O. We just pass control
- * to the relevant read or write handler. A pointer to the webs structure
- * is passed as an (int) in iwp.
- */
-
-static void websSocketEvent(int sid, int mask, int iwp)
-{
- webs_t wp;
-
- wp = (webs_t) iwp;
- a_assert(wp);
-
- if (! websValid(wp)) {
- return;
- }
-
- if (mask & SOCKET_READABLE) {
- websReadEvent(wp);
- }
- if (mask & SOCKET_WRITABLE) {
- if (wp->writeSocket) {
- (*wp->writeSocket)(wp);
- }
- }
-}
-
-/******************************************************************************/
-/*
- * The webs read handler. This is the primary read event loop. It uses a
- * state machine to track progress while parsing the HTTP request.
- * Note: we never block as the socket is always in non-blocking mode.
- */
-
-static void websReadEvent(webs_t wp)
-{
- char_t *text;
- int rc, nbytes, len, done;
-
- a_assert(wp);
- a_assert(websValid(wp));
-
- websMarkTime(wp);
-
-/*
- * Read as many lines as possible. socketGets is called to read the header
- * and socketRead is called to read posted data.
- */
- text = NULL;
- for (done = 0; !done; ) {
- if (text) {
- bfree(B_L, text);
- text = NULL;
- }
-
-/*
- * Get more input into "text". Returns 0, if more data is needed
- * to continue, -1 if finished with the request, or 1 if all
- * required data is available for current state.
- */
- while ((rc = websGetInput(wp, &text, &nbytes)) == 0) {
- ;
- }
-
-/*
- * websGetInput returns -1 if it finishes with the request
- */
- if (rc < 0) {
- break;
- }
-
-/*
- * This is the state machine for the web server.
- */
- switch(wp->state) {
- case WEBS_BEGIN:
-/*
- * Parse the first line of the Http header
- */
- if (websParseFirst(wp, text) < 0) {
- done++;
- break;
- }
- wp->state = WEBS_HEADER;
- break;
-
- case WEBS_HEADER:
-/*
- * Store more of the HTTP header. As we are doing line reads, we
- * need to separate the lines with '\n'
- */
- if (ringqLen(&wp->header) > 0) {
- ringqPutstr(&wp->header, T("\n"));
- }
- ringqPutstr(&wp->header, text);
- break;
-
- case WEBS_POST_CLEN:
-/*
- * POST request with content specified by a content length
- */
- if (wp->query) {
- if (wp->query[0] && !(wp->flags & WEBS_POST_DATA)) {
-/*
- * Special case where the POST request also had query data
- * specified in the URL, ie. url?query_data. In this case
- * the URL query data is separated by a '&' from the posted
- * query data.
- */
- len = gstrlen(wp->query);
- wp->query = brealloc(B_L, wp->query, (len + gstrlen(text) +
- 2) * sizeof(char_t));
- wp->query[len++] = '&';
- gstrcpy(&wp->query[len], text);
-
- } else {
-/*
- * The existing query data came from the POST request so just
- * append it.
- */
- len = gstrlen(wp->query);
- wp->query = brealloc(B_L, wp->query, (len + gstrlen(text) +
- 1) * sizeof(char_t));
- if (wp->query) {
- gstrcpy(&wp->query[len], text);
- }
- }
-
- } else {
- wp->query = bstrdup(B_L, text);
- }
-/*
- * Calculate how much more post data is to be read.
- */
- wp->flags |= WEBS_POST_DATA;
- wp->clen -= nbytes;
- if (wp->clen > 0) {
- if (nbytes > 0) {
- done++;
- break;
- }
- done++;
- break;
- }
-/*
- * No more data so process the request
- */
- websUrlHandlerRequest(wp);
- done++;
- break;
-
- case WEBS_POST:
-/*
- * POST without content-length specification
- */
- if (wp->query && *wp->query && !(wp->flags & WEBS_POST_DATA)) {
- len = gstrlen(wp->query);
- wp->query = brealloc(B_L, wp->query, (len + gstrlen(text) +
- 2) * sizeof(char_t));
- if (wp->query) {
- wp->query[len++] = '&';
- gstrcpy(&wp->query[len], text);
- }
-
- } else {
- wp->query = bstrdup(B_L, text);
- }
- wp->flags |= WEBS_POST_DATA;
- done++;
- break;
-
- default:
- websError(wp, 404, T("Bad state"));
- done++;
- break;
- }
- }
- if (text) {
- bfree(B_L, text);
- }
-}
-
-/******************************************************************************/
-/*
- * Get input from the browser. Return TRUE (!0) if the request has been
- * handled. Return -1 on errors, 1 if input read, and 0 to instruct the
- * caller to call again for more input.
- *
- * Note: socketRead will Return the number of bytes read if successful. This
- * may be less than the requested "bufsize" and may be zero. It returns -1 for
- * errors. It returns 0 for EOF. Otherwise it returns the number of bytes
- * read. Since this may be zero, callers should use socketEof() to
- * distinguish between this and EOF.
- */
-
-static int websGetInput(webs_t wp, char_t **ptext, int *pnbytes)
-{
- char_t *text;
- char buf[WEBS_SOCKET_BUFSIZ+1];
- int nbytes, len, clen;
-
- a_assert(websValid(wp));
- a_assert(ptext);
- a_assert(pnbytes);
-
- *ptext = text = NULL;
- *pnbytes = 0;
-
-/*
- * If this request is a POST with a content length, we know the number
- * of bytes to read so we use socketRead().
- */
- if (wp->state == WEBS_POST_CLEN) {
- len = (wp->clen > WEBS_SOCKET_BUFSIZ) ? WEBS_SOCKET_BUFSIZ : wp->clen;
- } else {
- len = 0;
- }
-
- if (len > 0) {
- nbytes = socketRead(wp->sid, buf, len);
-
- if (nbytes < 0) { /* Error */
- websDone(wp, 0);
- return -1;
-
- } else if (nbytes == 0) { /* EOF or No data available */
- return -1;
-
- } else { /* Valid data */
-/*
- * Convert to UNICODE if necessary. First be sure the string
- * is NULL terminated.
- */
- buf[nbytes] = '\0';
- if ((text = ballocAscToUni(buf)) == NULL) {
- websError(wp, 503, T("Insufficient memory"));
- return -1;
- }
- }
-
- } else {
- nbytes = socketGets(wp->sid, &text);
-
- if (nbytes < 0) {
-/*
- * Error, EOF or incomplete
- */
- if (socketEof(wp->sid)) {
-/*
- * If this is a post request without content length, process
- * the request as we now have all the data. Otherwise just
- * close the connection.
- */
- if (wp->state == WEBS_POST) {
- websUrlHandlerRequest(wp);
- } else {
- websDone(wp, 0);
- }
- }
-/*
- * If state is WEBS_HEADER and the ringq is empty, then this is a
- * simple request with no additional header fields to process and
- * no empty line terminator.
- */
- if (wp->state == WEBS_HEADER && ringqLen(&wp->header) <= 0) {
- websParseRequest(wp);
- websUrlHandlerRequest(wp);
- }
- return -1;
-
- } else if (nbytes == 0) {
- if (wp->state == WEBS_HEADER) {
-/*
- * Valid empty line, now finished with header
- */
- websParseRequest(wp);
- if (wp->flags & WEBS_POST_REQUEST) {
- if (wp->flags & WEBS_CLEN) {
- wp->state = WEBS_POST_CLEN;
- clen = wp->clen;
- } else {
- wp->state = WEBS_POST;
- clen = 1;
- }
- if (clen > 0) {
- return 0; /* Get more data */
- }
- return 1;
-
- }
-/*
- * We've read the header so go and handle the request
- */
- websUrlHandlerRequest(wp);
- }
- return -1;
-
- }
- }
- a_assert(text);
- a_assert(nbytes > 0);
- *ptext = text;
- *pnbytes = nbytes;
- return 1;
-}
-
-/******************************************************************************/
-/*
- * Parse the first line of a HTTP request
- */
-
-static int websParseFirst(webs_t wp, char_t *text)
-{
- char_t *op, *proto, *url, *host, *query, *path, *port, *ext, *buf;
-
- a_assert(websValid(wp));
- a_assert(text && *text);
-
-/*
- * Determine the request type: GET, HEAD or POST
- */
- op = gstrtok(text, T(" \t"));
- if (op == NULL || *op == '\0') {
- websError(wp, 400, T("Bad HTTP request"));
- return -1;
- }
- if (gstrcmp(op, T("GET")) != 0) {
- if (gstrcmp(op, T("POST")) == 0) {
- wp->flags |= WEBS_POST_REQUEST;
- } else if (gstrcmp(op, T("HEAD")) == 0) {
- wp->flags |= WEBS_HEAD_REQUEST;
- } else {
- websError(wp, 400, T("Bad request type"));
- return -1;
- }
- }
-
-/*
- * Store result in the form (CGI) variable store
- */
- websSetVar(wp, T("REQUEST_METHOD"), op);
-
- url = gstrtok(NULL, T(" \t\n"));
- if (url == NULL || *url == '\0') {
- websError(wp, 400, T("Bad HTTP request"));
- return -1;
- }
-
-/*
- * Parse the URL and store all the various URL components. websUrlParse
- * returns an allocated buffer in buf which we must free. We support both
- * proxied and non-proxied requests. Proxied requests will have http://host/
- * at the start of the URL. Non-proxied will just be local path names.
- */
- host = path = port = proto = query = ext = NULL;
- if (websUrlParse(url, &buf, &host, &path, &port, &query, &proto,
- NULL, &ext) < 0) {
- websError(wp, 400, T("Bad URL format"));
- return -1;
- }
-
- wp->url = bstrdup(B_L, url);
- wp->query = bstrdup(B_L, query);
- wp->host = bstrdup(B_L, host);
- wp->path = bstrdup(B_L, path);
- wp->port = gatoi(port);
- if (gstrcmp(ext, T(".asp")) == 0) {
- wp->flags |= WEBS_ASP;
- }
- bfree(B_L, buf);
-
- websUrlType(url, wp->type, TSZ(wp->type));
-
-#if WEBS_PROXY_SUPPORT
-/*
- * Determine if this is a request for local webs data. If it is not a proxied
- * request from the browser, we won't see the "http://" or the system name, so
- * we assume it must be talking to us directly for local webs data.
- * Note: not fully implemented yet.
- */
- if (gstrstr(wp->url, T("http://")) == NULL ||
- ((gstrcmp(wp->host, T("localhost")) == 0 ||
- gstrcmp(wp->host, websHost) == 0) && (wp->port == websPort))) {
- wp->flags |= WEBS_LOCAL_PAGE;
- if (gstrcmp(wp->path, T("/")) == 0) {
- wp->flags |= WEBS_HOME_PAGE;
- }
- }
-#endif
-
- ringqFlush(&wp->header);
- return 0;
-}
-
-/******************************************************************************/
-/*
- * Parse a full request
- */
-
-static void websParseRequest(webs_t wp)
-{
- char_t *upperKey, *cp, *browser, *lp, *key, *value;
-
- a_assert(websValid(wp));
-
-/*
- * Define default CGI values
- */
- websSetVar(wp, T("HTTP_AUTHORIZATION"), T(""));
-
-/*
- * Parse the header and create the Http header keyword variables
- * We rewrite the header as we go for non-local requests. NOTE: this
- * modifies the header string directly and tokenizes each line with '\0'.
- */
- browser = NULL;
- for (lp = (char_t*) wp->header.servp; lp && *lp; ) {
- cp = lp;
- if ((lp = gstrchr(lp, '\n')) != NULL) {
- lp++;
- }
-
- if ((key = gstrtok(cp, T(": \t\n"))) == NULL) {
- continue;
- }
-
- if ((value = gstrtok(NULL, T("\n"))) == NULL) {
- value = T("");
- }
-
- while (gisspace(*value)) {
- value++;
- }
- strlower(key);
-
-/*
- * Create a variable (CGI) for each line in the header
- */
- gsnprintf(&upperKey, (gstrlen(key) + 6), T("HTTP_%s"), key);
- for (cp = upperKey; *cp; cp++) {
- if (*cp == '-')
- *cp = '_';
- }
- strupper(upperKey);
- websSetVar(wp, upperKey, value);
- bfree(B_L, upperKey);
-
-/*
- * Track the requesting agent (browser) type
- */
- if (gstrcmp(key, T("user-agent")) == 0) {
- wp->userAgent = bstrdup(B_L, value);
-
-/*
- * Parse the user authorization. ie. password
- */
- } else if (gstrcmp(key, T("authorization")) == 0) {
- char_t password[FNAMESIZE];
-
-/*
- * The incoming value is password:username
- */
- if ((cp = gstrchr(value, ' ')) != NULL) {
- websDecode64(password, ++cp, sizeof(password));
- } else {
- websDecode64(password, value, sizeof(password));
- }
- if ((cp = gstrchr(password, ':')) != NULL) {
- *cp++ = '\0';
- }
- if (cp) {
- wp->password = bstrdup(B_L, cp);
- } else {
- wp->password = bstrdup(B_L, T(""));
- }
-
-/*
- * Parse the content length
- */
- } else if (gstrcmp(key, T("content-length")) == 0) {
- wp->flags |= WEBS_CLEN;
- wp->clen = gatoi(value);
- websSetVar(wp, T("CONTENT_LENGTH"), value);
-
-#if WEBS_KEEP_ALIVE_SUPPORT
- } else if (gstrcmp(key, T("connection")) == 0) {
- strlower(value);
- if (gstrcmp(value, T("keep-alive")) == 0) {
- wp->flags |= WEBS_KEEP_ALIVE;
- }
-#endif
-
-#if WEBS_PROXY_SUPPORT
-/*
- * This may be useful if you wish to keep a local cache of web pages
- * for proxied requests.
- */
- } else if (gstrcmp(key, T("pragma")) == 0) {
- char_t tmp[256];
- gstrncpy(tmp, value, TSZ(tmp));
- strlower(tmp);
- if (gstrstr(tmp, T("no-cache"))) {
- wp->flags |= WEBS_DONT_USE_CACHE;
- }
-#endif
-
-/*
- * Store the cookie
- */
- } else if (gstrcmp(key, T("cookie")) == 0) {
- wp->flags |= WEBS_COOKIE;
- wp->cookie = bstrdup(B_L, value);
-
-#if WEBS_IF_MODIFIED_SUPPORT
-/*
- * See if the local page has been modified since the browser last
- * requested this document. If not, just return a 302
- */
- } else if (gstrcmp(key, T("if-modified-since")) == 0) {
- char_t *cmd;
- time_t tip = 0;
-
- if (cp = gstrchr(value, ';')) {
- *cp = '\0';
- }
-
- if (cp = gstrstr(value, T(", "))) {
- cp += 2;
- }
-
- if (gstrstr(cp, T("GMT"))) {
- gsnprintf(&cmd, 64, T("clock scan %s -gmt 1"), cp);
- } else {
- gsnprintf(&cmd, 64, T("clock scan %s"), cp);
- }
- if (wp->since = dateParse(tip, cmd)) {
- wp->flags |= WEBS_IF_MODIFIED;
- }
- bfreeSafe(B_L, cmd);
-#endif
- }
- }
-}
-
-
-#if WEBS_IF_MODIFIED_SUPPORT
-/******************************************************************************/
-/*
- * Parse the date and time string.
- */
-
-static time_t dateParse(time_t tip, char_t *cmd)
-{
- return (time_t)0;
-}
-#endif
-
-
-/******************************************************************************/
-/*
- * Set the variable (CGI) environment for this request. Create variables
- * for all standard CGI variables. Also decode the query string and create
- * a variable for each name=value pair.
- */
-
-void websSetEnv(webs_t wp)
-{
- char_t portBuf[8];
- char_t *keyword, *value;
-
- a_assert(websValid(wp));
-
- websSetVar(wp, T("QUERY_STRING"), wp->query);
- websSetVar(wp, T("GATEWAY_INTERFACE"), T("CGI/1.1"));
- websSetVar(wp, T("SERVER_HOST"), websHost);
- websSetVar(wp, T("SERVER_URL"), websHostUrl);
- websSetVar(wp, T("REMOTE_HOST"), wp->ipaddr);
- websSetVar(wp, T("REMOTE_ADDR"), wp->ipaddr);
- websSetVar(wp, T("PATH_INFO"), wp->path);
- stritoa(websPort, portBuf, sizeof(portBuf));
- websSetVar(wp, T("SERVER_PORT"), portBuf);
-
-/*
- * Decode and create an environment query variable for each query keyword.
- * We split into pairs at each '&', then split pairs at the '='.
- * Note: we rely on wp->decodedQuery preserving the decoded values in the
- * symbol table.
- */
- wp->decodedQuery = bstrdup(B_L, wp->query);
- keyword = gstrtok(wp->decodedQuery, T("&"));
- while (keyword != NULL) {
- if ((value = gstrchr(keyword, '=')) != NULL) {
- *value++ = '\0';
- websDecodeUrl(keyword, keyword, gstrlen(keyword));
- websDecodeUrl(value, value, gstrlen(value));
-
- } else {
- value = T("");
- }
-
- if (*keyword) {
- websSetVar(wp, keyword, value);
- }
- keyword = gstrtok(NULL, T("&"));
- }
-
-#if EMF
-/*
- * Add GoAhead Embedded Management Framework defines
- */
- websSetEmfEnvironment(wp);
-#endif
-}
-
-/******************************************************************************/
-/*
- * Define a webs (CGI) variable for this connection. Also create in relevant
- * scripting engines. Note: the incoming value may be volatile.
- */
-
-void websSetVar(webs_t wp, char_t *var, char_t *value)
-{
- value_t v;
-
- a_assert(websValid(wp));
-
-/*
- * value_instring will allocate the string if required.
- */
- if (value) {
- v = valueString(value, VALUE_ALLOCATE);
- } else {
- v = valueString(T(""), VALUE_ALLOCATE);
- }
- symEnter(wp->cgiVars, var, v, 0);
-}
-
-/******************************************************************************/
-/*
- * Return TRUE if a webs variable exists for this connection.
- */
-
-int websTestVar(webs_t wp, char_t *var)
-{
- sym_t *sp;
-
- a_assert(websValid(wp));
-
- if (var == NULL || *var == '\0') {
- return 0;
- }
-
- if ((sp = symLookup(wp->cgiVars, var)) == NULL) {
- return 0;
- }
- return 1;
-}
-
-/******************************************************************************/
-/*
- * Get a webs variable but return a default value if string not found.
- * Note, defaultGetValue can be NULL to permit testing existance.
- */
-
-char_t *websGetVar(webs_t wp, char_t *var, char_t *defaultGetValue)
-{
- sym_t *sp;
-
- a_assert(websValid(wp));
- a_assert(var && *var);
-
- if ((sp = symLookup(wp->cgiVars, var)) != NULL) {
- a_assert(sp->content.type == string);
- if (sp->content.value.string) {
- return sp->content.value.string;
- } else {
- return T("");
- }
- }
- return defaultGetValue;
-}
-
-/******************************************************************************/
-/*
- * Cancel the request timeout. Note may be called multiple times.
- */
-
-static void websTimeoutCancel(webs_t wp)
-{
- a_assert(websValid(wp));
-
- if (wp->timeout) {
- emfDeleteTimer(wp->timeout);
- wp->timeout = NULL;
- }
-}
-
-/******************************************************************************/
-/*
- * Output a HTTP response back to the browser. If redirect is set to a
- * URL, the browser will be sent to this location.
- */
-
-void websResponse(webs_t wp, int code, char_t *message, char_t *redirect)
-{
- char_t *date;
-
- a_assert(websValid(wp));
-
-/*
- * IE3.0 needs no Keep Alive for some return codes.
- */
- wp->flags &= ~WEBS_KEEP_ALIVE;
-
-/*
- * Only output the header if a header has not already been output.
- */
- if ( !(wp->flags & WEBS_HEADER_DONE)) {
- wp->flags |= WEBS_HEADER_DONE;
- websWrite(wp, T("HTTP/1.0 %d %s\r\n"), code, websErrorMsg(code));
-
- /* by license terms the following line of code must
- * not be modified.
- */
- websWrite(wp, T("Server: GoAhead-Webs\r\n"));
-
- if (wp->flags & WEBS_KEEP_ALIVE) {
- websWrite(wp, T("Connection: keep-alive\r\n"));
- }
- websWrite(wp, T("Pragma: no-cache\r\nCache-Control: no-cache\r\n"));
-
- if ((date = websGetDateString(NULL)) != NULL) {
- websWrite(wp, T("Date: %s\r\n"), date);
- bfree(B_L, date);
- }
- websWrite(wp, T("Content-Type: text/html\r\n"));
-
-/*
- * We don't do a string length here as the message may be multi-line.
- * Ie. <CR><LF> will count as only one and we will have a content-length
- * that is too short.
- *
- * websWrite(wp, T("Content-Length: %s\r\n"), message);
- */
- if (redirect) {
- websWrite(wp, T("Location: %s\r\n"), redirect);
- }
- websWrite(wp, T("\r\n"));
- }
-
- if (message && *message) {
- websWrite(wp, T("%s\r\n"), message);
- }
- websDone(wp, code);
-}
-
-/******************************************************************************/
-/*
- * Redirect the user to another webs page
- */
-
-void websRedirect(webs_t wp, char_t *url)
-{
- char_t *msgbuf, *urlbuf;
-
- a_assert(websValid(wp));
- a_assert(url);
-
- websStats.redirects++;
- msgbuf = urlbuf = NULL;
-
-/*
- * Some browsers require a http://host qualified URL for redirection
- */
- if (gstrstr(url, T("http://")) == NULL) {
- if (*url == '/') {
- url++;
- }
- gsnprintf(&urlbuf, WEBS_MAX_URL + 80, T("http://%s/%s"),
- websGetVar(wp, T("HTTP_HOST"), websHostUrl), url);
- url = urlbuf;
- }
-
-/*
- * Add human readable message for completeness. Should not be required.
- */
- gsnprintf(&msgbuf, WEBS_MAX_URL + 80,
- T("<html><head></head><body>\r\n\
- This document has moved to a new <a href=\"%s\">location</a>.\r\n\
- Please update your documents to reflect the new location.\r\n\
- </body></html>\r\n"), url);
-
- websResponse(wp, 302, msgbuf, url);
-
- bfreeSafe(B_L, msgbuf);
- bfreeSafe(B_L, urlbuf);
-}
-
-/******************************************************************************/
-/*
- * Output an error message and cleanup
- */
-
-void websError(webs_t wp, int code, char_t *fmt, ...)
-{
- va_list args;
- char_t *msg, *userMsg, *buf;
-
- a_assert(websValid(wp));
- a_assert(fmt);
-
- websStats.errors++;
-
- va_start(args, fmt);
- userMsg = NULL;
- gvsnprintf(&userMsg, WEBS_BUFSIZE, fmt, args);
- va_end(args);
-
- msg = T("<html><head><title>Document Error: %s</title></head>\r\n\
- <body><h2>Access Error: %s</h2>\r\n\
- when trying to obtain <b>%s</b><br><p>%s</p></body></html>\r\n");
-/*
- * Ensure we have plenty of room
- */
- buf = NULL;
- gsnprintf(&buf, WEBS_BUFSIZE, msg, websErrorMsg(code),
- websErrorMsg(code), wp->url, userMsg);
-
- websResponse(wp, code, buf, NULL);
- bfreeSafe(B_L, buf);
- bfreeSafe(B_L, userMsg);
-}
-
-/******************************************************************************/
-/*
- * Return the error message for a given code
- */
-
-static char_t *websErrorMsg(int code)
-{
- websErrorType* ep;
-
- for (ep = websErrors; ep->code; ep++) {
- if (code == ep->code) {
- return ep->msg;
- }
- }
- a_assert(0);
- return T("");
-}
-
-/******************************************************************************/
-/*
- * Do formatted output to the browser. This is the public ASP and form
- * write procedure.
- */
-
-int websWrite(webs_t wp, char_t* fmt, ...)
-{
- va_list vargs;
- char_t *buf;
- int rc;
-
- a_assert(websValid(wp));
-
- va_start(vargs, fmt);
-
- buf = NULL;
- rc = 0;
- if (gvsnprintf(&buf, WEBS_BUFSIZE, fmt, vargs) >= WEBS_BUFSIZE) {
- trace(0, T("webs: websWrite lost data, buffer overflow\n"));
- }
- va_end(vargs);
- a_assert(buf);
- if (buf) {
- rc = websWriteBlock(wp, buf, gstrlen(buf));
- bfree(B_L, buf);
- }
- return rc;
-}
-
-/******************************************************************************/
-/*
- * Write a block of data of length "nChars" to the user's browser. Public
- * write block procedure. If unicode is turned on this function expects
- * buf to be a unicode string and it converts it to ASCII before writing.
- * See websWriteBlockData to always write binary or ASCII data with no
- * unicode conversion. This returns the number of char_t's processed.
- */
-
-int websWriteBlock(webs_t wp, char_t *buf, int nChars)
-{
-#if ! UNICODE
- return websWriteBlockData(wp, buf, nChars);
-#else
- int r;
- char *charBuf;
-
- a_assert(buf);
- a_assert(nChars >= 0);
-
- if ((charBuf = ballocUniToAsc(buf, nChars)) == NULL) {
- return -1;
- }
- r = websWriteBlockData(wp, charBuf, nChars);
- bfree(B_L, charBuf);
- return r;
-#endif
-}
-
-/******************************************************************************/
-/*
- * Write a block of data of length "nChars" to the user's browser. Same as
- * websWriteBlock except that it expects straight ASCII or binary and does no
- * unicode conversion before writing the data.
- * This returns the number of chars processed.
- */
-
-int websWriteBlockData(webs_t wp, char *buf, int nChars)
-{
- int len, done;
-
- a_assert(wp);
- a_assert(websValid(wp));
- a_assert(buf);
- a_assert(nChars >= 0);
-
- done = len = 0;
- while (nChars > 0) {
- if ((len = socketWrite(wp->sid, buf, nChars)) < 0) {
- return -1;
- }
-/*
- * Block in flush if the last write could not take any more data
- */
- socketFlush(wp->sid, len == 0);
- nChars -= len;
- buf += len;
- done += len;
- }
- return done;
-}
-
-/******************************************************************************/
-/*
- * Decode a URL (or part thereof). Allows insitu decoding.
- */
-
-void websDecodeUrl(char_t *decoded, char_t *token, int len)
-{
- char_t *ip, *op;
- int num, i, c;
-
- a_assert(decoded);
- a_assert(token);
- num = 0;
-
- op = decoded;
- for (ip = token; *ip && len > 0; ip++, op++) {
- if (*ip == '+') {
- *op = ' ';
- } else if (*ip == '%' && gisxdigit(ip[1]) && gisxdigit(ip[2])) {
-
-/*
- * Convert %nn to a single character
- */
- ip++;
- for (i = 0; i < 2; i++, ip++) {
- c = tolower(*ip);
- if (c >= 'a' && c <= 'f') {
- num = (num * 16) + 10 + c - 'a';
- } else {
- num = (num * 16) + c - '0';
- }
- }
- *op = (char_t) num;
- ip--;
-
- } else {
- *op = *ip;
- }
- len--;
- }
- *op = '\0';
-}
-
-/******************************************************************************/
-#if WEBS_LOG_SUPPORT
-/*
- * Output a log message
- */
-
-static void websLog(webs_t wp, int code)
-{
- char_t *buf;
- char *abuf;
- int len;
-
- a_assert(websValid(wp));
-
- buf = NULL;
- gsnprintf(&buf, WEBS_MAX_URL + 80, T("%d %s %d %d\n"), time(0),
- wp->url, code, wp->written);
- len = gstrlen(buf);
- abuf = ballocUniToAsc(buf, len+1);
- write(websLogFd, abuf, len);
- bfreeSafe(B_L, buf);
- bfreeSafe(B_L, abuf);
-}
-
-#endif /* WEBS_LOG_SUPPORT */
-
-/******************************************************************************/
-/*
- * Request timeout. The timeout triggers if we have not read any data from
- * the users browser in the last WEBS_TIMEOUT period. If we have heard from
- * the browser, simply re-issue the timeout.
- */
-
-static void websTimeout(long iwp)
-{
- webs_t wp;
- int delay, tm;
-
- wp = (webs_t) iwp;
- a_assert(websValid(wp));
-
- tm = websGetTimeSinceMark(wp) * 1000;
- if (tm >= WEBS_TIMEOUT) {
- websStats.timeouts++;
- wp->timeout = NULL;
- websDone(wp, 404);
-
- } else {
- delay = WEBS_TIMEOUT - tm;
- a_assert(delay > 0);
- wp->timeout = emfCreateTimer(delay, websTimeout, (long) wp);
- }
-}
-
-/******************************************************************************/
-/*
- * Called when the request is done.
- */
-
-void websDone(webs_t wp, int code)
-{
- a_assert(websValid(wp));
-
-/*
- * Disable socket handler in case keep alive set.
- */
- socketDeleteHandler(wp->sid);
-
- if (code != 200) {
- wp->flags &= ~WEBS_KEEP_ALIVE;
- }
-
-#if WEBS_PROXY_SUPPORT
- if (! (wp->flags & WEBS_LOCAL_PAGE)) {
- websStats.activeNetRequests--;
- }
-#endif
-
-#if WEBS_LOG_SUPPORT
- if (! (wp->flags & WEBS_REQUEST_DONE)) {
- websLog(wp, code);
- }
-#endif
-
-/*
- * Close any opened document by a handler
- */
- websPageClose(wp);
-
-/*
- * If using Keep Alive (HTTP/1.1) we keep the socket open for a period
- * while waiting for another request on the socket.
- */
- if (wp->flags & WEBS_KEEP_ALIVE) {
- if (socketFlush(wp->sid, 0) == 0) {
- wp->state = WEBS_BEGIN;
- wp->flags |= WEBS_REQUEST_DONE;
- if (wp->header.buf) {
- ringqFlush(&wp->header);
- }
- socketCreateHandler(wp->sid, SOCKET_READABLE, websSocketEvent,
- (int) wp);
- websTimeoutCancel(wp);
- wp->timeout = emfCreateTimer(WEBS_TIMEOUT, websTimeout, (long) wp);
- return;
- }
- } else {
- websTimeoutCancel(wp);
- socketCloseConnection(wp->sid);
- }
- websFree(wp);
-}
-
-/******************************************************************************/
-/*
- * Allocate a new webs structure
- */
-
-static int websAlloc(int sid)
-{
- webs_t wp;
- int wid;
-
-/*
- * Allocate a new handle for this connection
- */
- if ((wid = hAllocEntry((void***) &webs, &websMax,
- sizeof(struct websRec))) < 0) {
- return -1;
- }
- wp = webs[wid];
-
- wp->wid = wid;
- wp->sid = sid;
- wp->state = WEBS_BEGIN;
- wp->docfd = -1;
- wp->dir = NULL;
-
- ringqOpen(&wp->header, WEBS_HEADER_BUFINC, WEBS_MAX_HEADER);
-
-/*
- * Create storage for the CGI variables. We supply the symbol tables for
- * both the CGI variables and for the global functions. The function table
- * is common to all webs instances (ie. all browsers)
- */
- wp->cgiVars = symOpen(64);
-
- return wid;
-}
-
-/******************************************************************************/
-/*
- * Free a webs structure
- */
-
-static void websFree(webs_t wp)
-{
- a_assert(websValid(wp));
-
- if (wp->path)
- bfree(B_L, wp->path);
- if (wp->url)
- bfree(B_L, wp->url);
- if (wp->host)
- bfree(B_L, wp->host);
- if (wp->lpath)
- bfree(B_L, wp->lpath);
- if (wp->query)
- bfree(B_L, wp->query);
- if (wp->decodedQuery)
- bfree(B_L, wp->decodedQuery);
- if (wp->password)
- bfree(B_L, wp->password);
- if (wp->userName)
- bfree(B_L, wp->userName);
- if (wp->cookie)
- bfree(B_L, wp->cookie);
- if (wp->userAgent)
- bfree(B_L, wp->userAgent);
- if (wp->dir)
- bfree(B_L, wp->dir);
-
- symClose(wp->cgiVars, websFreeVar);
-
- if (wp->header.buf) {
- ringqClose(&wp->header);
- }
-
- websMax = hFree((void***) &webs, wp->wid);
- bfree(B_L, wp);
- a_assert(websMax >= 0);
-}
-
-/******************************************************************************/
-/*
- * Callback from symClose. Free the variable.
- */
-
-static void websFreeVar(sym_t* sp)
-{
- valueFree(&sp->content);
-}
-
-/******************************************************************************/
-/*
- * Return the server address
- */
-
-char_t* websGetHost()
-{
- return websHost;
-}
-
-/******************************************************************************/
-/*
- * Return the server address
- */
-
-char_t* websGetHostUrl()
-{
- return websHostUrl;
-}
-
-/******************************************************************************/
-/*
- * Return the listen port
- */
-
-int websGetPort()
-{
- return websPort;
-}
-
-/******************************************************************************/
-/*
- * Get the number of bytes to write
- */
-
-int websGetRequestBytes(webs_t wp)
-{
- a_assert(websValid(wp));
-
- return wp->numbytes;
-}
-
-/******************************************************************************/
-/*
- * Get the directory for this request
- */
-
-char_t *websGetRequestDir(webs_t wp)
-{
- a_assert(websValid(wp));
-
- if (wp->dir == NULL) {
- return T("");
- }
-
- return wp->dir;
-}
-
-/******************************************************************************/
-/*
- * Get the flags for this request
- */
-
-int websGetRequestFlags(webs_t wp)
-{
- a_assert(websValid(wp));
-
- return wp->flags;
-}
-
-/******************************************************************************/
-/*
- * Return the IP address
- */
-
-char_t *websGetRequestIpaddr(webs_t wp)
-{
- a_assert(websValid(wp));
-
- return wp->ipaddr;
-}
-
-/******************************************************************************/
-/*
- * Set the local path for the request
- */
-
-char_t *websGetRequestLpath(webs_t wp)
-{
- a_assert(websValid(wp));
-
-#if WEBS_PAGE_ROM
- return wp->path;
-#else
- return wp->lpath;
-#endif
-}
-
-/******************************************************************************/
-/*
- * Get the path for this request
- */
-
-char_t *websGetRequestPath(webs_t wp)
-{
- a_assert(websValid(wp));
-
- if (wp->path == NULL) {
- return T("");
- }
-
- return wp->path;
-}
-
-/******************************************************************************/
-/*
- * Return the password
- */
-
-char_t* websGetRequestPassword(webs_t wp)
-{
- a_assert(websValid(wp));
-
- return wp->password;
-}
-
-/******************************************************************************/
-/*
- * Return the request type
- */
-
-char_t* websGetRequestType(webs_t wp)
-{
- a_assert(websValid(wp));
-
- return wp->type;
-}
-
-/******************************************************************************/
-/*
- * Return the username
- */
-
-char_t* websGetRequestUserName(webs_t wp)
-{
- a_assert(websValid(wp));
-
- return wp->userName;
-}
-
-/******************************************************************************/
-/*
- * Get the number of bytes written
- */
-
-int websGetRequestWritten(webs_t wp)
-{
- a_assert(websValid(wp));
-
- return wp->written;
-}
-
-/******************************************************************************/
-/*
- * Set the hostname
- */
-
-void websSetHost(char_t *host)
-{
- gstrncpy(websHost, host, TSZ(websHost));
-}
-
-/******************************************************************************/
-/*
- * Set the host URL
- */
-
-void websSetHostUrl(char_t *url)
-{
- a_assert(url && *url);
-
- bfreeSafe(B_L, websHostUrl);
- websHostUrl = gstrdup(B_L, url);
-}
-
-/******************************************************************************/
-/*
- * Set the IP address
- */
-
-void websSetIpaddr(char_t *ipaddr)
-{
- a_assert(ipaddr && *ipaddr);
-
- gstrncpy(websIpaddr, ipaddr, TSZ(websIpaddr));
-}
-
-/******************************************************************************/
-/*
- * Set the number of bytes to write
- */
-
-void websSetRequestBytes(webs_t wp, int bytes)
-{
- a_assert(websValid(wp));
- a_assert(bytes >= 0);
-
- wp->numbytes = bytes;
-}
-
-/******************************************************************************/
-/*
- * Set the flags for this request
- */
-
-void websSetRequestFlags(webs_t wp, int flags)
-{
- a_assert(websValid(wp));
-
- wp->flags = flags;
-}
-
-/******************************************************************************/
-/*
- * Set the local path for the request
- */
-
-void websSetRequestLpath(webs_t wp, char_t *lpath)
-{
- a_assert(websValid(wp));
- a_assert(lpath && *lpath);
-
- if (wp->lpath) {
- bfree(B_L, wp->lpath);
- }
- wp->lpath = bstrdup(B_L, lpath);
- websSetVar(wp, T("PATH_TRANSLATED"), wp->lpath);
-}
-
-/******************************************************************************/
-/*
- * Update the URL path and the directory containing the web page
- */
-
-void websSetRequestPath(webs_t wp, char_t *dir, char_t *path)
-{
- char_t *tmp;
-
- a_assert(websValid(wp));
-
- if (dir) {
- tmp = wp->dir;
- wp->dir = bstrdup(B_L, dir);
- if (tmp) {
- bfree(B_L, tmp);
- }
- }
- if (path) {
- tmp = wp->path;
- wp->path = bstrdup(B_L, path);
- websSetVar(wp, T("PATH_INFO"), wp->path);
- if (tmp) {
- bfree(B_L, tmp);
- }
- }
-}
-
-/******************************************************************************/
-/*
- * Set the Write handler for this socket
- */
-
-void websSetRequestSocketHandler(webs_t wp, int mask, void (*fn)(webs_t wp))
-{
- a_assert(websValid(wp));
-
- wp->writeSocket = fn;
- socketCreateHandler(wp->sid, SOCKET_WRITABLE, websSocketEvent, (int) wp);
-}
-
-/******************************************************************************/
-/*
- * Set the number of bytes written
- */
-
-void websSetRequestWritten(webs_t wp, int written)
-{
- a_assert(websValid(wp));
-
- wp->written = written;
-}
-
-/******************************************************************************/
-/*
- * Reurn true if the webs handle is valid
- */
-
-int websValid(webs_t wp)
-{
- int wid;
-
- for (wid = 0; wid < websMax; wid++) {
- if (wp == webs[wid]) {
- return 1;
- }
- }
- return 0;
-}
-
-/******************************************************************************/
-/*
- * Close the document handle.
- */
-
-int websCloseFileHandle(webs_t wp)
-{
- a_assert(websValid(wp));
-
-#ifndef WEBS_PAGE_ROM
- if (wp->docfd >= 0) {
- close(wp->docfd);
- wp->docfd = -1;
- }
-#endif
-
- return 0;
-}
-
-/******************************************************************************/
-/*
- * Build an ASCII time string. If sbuf is NULL we use the current time,
- * else we use the last modified time of sbuf;
- */
-
-char_t* websGetDateString(websStatType* sbuf)
-{
- char_t* cp;
- char_t* r;
- time_t now;
-
- if (sbuf == NULL) {
- time(&now);
- } else {
- now = sbuf->mtime;
- }
- if ((cp = gctime(&now)) != NULL) {
- cp[gstrlen(cp) - 1] = '\0';
- r = bstrdup(B_L, cp);
- return r;
- }
- return NULL;
-}
-
-/******************************************************************************/
-/*
- * Mark time. Set a timestamp so that, later, we can return the number of
- * seconds since we made the mark. Note that the mark my not be a
- * "real" time, but rather a relative marker.
- */
-
-static void websMarkTime(webs_t wp)
-{
- wp->timestamp = time(0);
-}
-
-/******************************************************************************/
-/*
- * Get the number of seconds since the last mark.
- */
-
-static int websGetTimeSinceMark(webs_t wp)
-{
- return time(0) - wp->timestamp;
-}
-
-/******************************************************************************/
diff --git a/cpukit/httpd/webs.h b/cpukit/httpd/webs.h
deleted file mode 100644
index 46e11bc2fc..0000000000
--- a/cpukit/httpd/webs.h
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * webs.h -- Go Ahead Web public header
- *
- * Copyright (c) Go Ahead Software Inc., 1992-1999. All Rights Reserved.
- *
- * See the file "license.txt" for information on usage and redistribution
- */
-
-#ifndef _h_WEBS
-#define _h_WEBS 1
-
-/******************************** Description *********************************/
-
-/*
- * Go Ahead Web Server header. This defines the Web public APIs.
- * Include this header for files that contain ASP or Form procedures.
- * Include wsIntrn.h when creating URL handlers.
- */
-
-/********************************* Includes ***********************************/
-
-#include "ej.h"
-
-/********************************** Defines ***********************************/
-
-#define WEBS_HEADER_BUFINC 512 /* Header buffer size */
-#define WEBS_ASP_BUFINC 512 /* Asp expansion increment */
-#define WEBS_MAX_PASS 32 /* Size of password */
-#define WEBS_BUFSIZE 1000 /* websWrite max output string */
-#define WEBS_MAX_HEADER (5 * 1024) /* Sanity check header */
-#define WEBS_MAX_URL 4096 /* Maximum URL size for sanity */
-#define WEBS_SOCKET_BUFSIZ 256 /* Bytes read from socket */
-
-/*
- * Request flags. Also returned by websGetRequestFlags().
- */
-#define WEBS_LOCAL_PAGE 0x1 /* Request for local webs page */
-#define WEBS_KEEP_ALIVE 0x2 /* HTTP/1.1 keep alive */
-#define WEBS_DONT_USE_CACHE 0x4 /* Not implemented cache support */
-#define WEBS_COOKIE 0x8 /* Cookie supplied in request */
-#define WEBS_IF_MODIFIED 0x10 /* If-modified-since in request */
-#define WEBS_POST_REQUEST 0x20 /* Post request operation */
-#define WEBS_LOCAL_REQUEST 0x40 /* Request from this system */
-#define WEBS_HOME_PAGE 0x80 /* Request for the home page */
-#define WEBS_ASP 0x100 /* ASP request */
-#define WEBS_HEAD_REQUEST 0x200 /* Head request */
-#define WEBS_CLEN 0x400 /* Request had a content length */
-#define WEBS_FORM 0x800 /* Request is a form */
-#define WEBS_REQUEST_DONE 0x1000 /* Request complete */
-#define WEBS_POST_DATA 0x2000 /* Already appended post data */
-#define WEBS_HEADER_DONE 0x40000 /* Already output the HTTP header */
-
-/*
- * URL handler flags
- */
-#define WEBS_HANDLER_FIRST 0x1 /* Process this handler first */
-#define WEBS_HANDLER_LAST 0x2 /* Process this handler last */
-
-/*
- * Per socket connection webs structure
- */
-typedef struct websRec {
- ringq_t header; /* Header dynamic string */
- time_t since; /* Parsed if-modified-since time */
- sym_fd_t cgiVars; /* CGI standard variables */
- sym_fd_t cgiQuery; /* CGI decoded query string */
- time_t timestamp; /* Last transaction with browser */
- void* timeout; /* Timeout handle */
- char_t ipaddr[32]; /* Connecting ipaddress */
- char_t type[64]; /* Mime type */
- char_t* dir; /* Directory containing the page */
- char_t* path; /* Path name without query */
- char_t* url; /* Full request url */
- char_t* host; /* Requested host */
- char_t* lpath; /* Cache local path name */
- char_t* query; /* Request query */
- char_t* decodedQuery; /* Decoded request query */
- char_t* password; /* Authorization password */
- char_t* userName; /* Authorization username */
- char_t* cookie; /* Cookie string */
- char_t* userAgent; /* User agent (browser) */
- int sid; /* Socket id (handler) */
- int port; /* Request port number */
- int state; /* Current state */
- int flags; /* Current flags -- see above */
- int code; /* Request result code */
- int clen; /* Content length */
- int wid; /* Index into webs */
- int docfd; /* Document file descriptor */
- int numbytes; /* Bytes to transfer to browser */
- int written; /* Bytes actually transferred */
- void (*writeSocket)(struct websRec *wp);
-} websRec;
-
-typedef websRec *webs_t;
-typedef websRec websType;
-
-/******************************** Prototypes **********************************/
-
-extern int websAspDefine(char_t *name,
- int (*fn)(int ejid, webs_t wp, int argc, char_t **argv));
-extern int websAspRequest(webs_t wp, char_t *lpath);
-extern void websCloseListen();
-extern int websDecode64(char_t *outbuf, char_t *string, int buflen);
-extern void websDecodeUrl(char_t *token, char_t *decoded, int len);
-extern void websDone(webs_t wp, int code);
-extern void websEncode64(char_t *outbuf, char_t *string, int buflen);
-extern void websError(webs_t wp, int code, char_t *msg, ...);
-extern void websFooter(webs_t wp);
-extern int websFormDefine(char_t *name, void (*fn)(webs_t wp,
- char_t *path, char_t *query));
-extern char_t *websGetDefaultDir();
-extern char_t *websGetDefaultPage();
-extern char_t *websGetHostUrl();
-extern char_t *websGetPassword();
-extern int websGetPort();
-extern char_t *websGetPublishDir(char_t *path, char_t **urlPrefix);
-extern int websGetRequestBytes(webs_t wp);
-extern char_t *websGetRequestDir(webs_t wp);
-extern int websGetRequestFlags(webs_t wp);
-extern char_t *websGetRequestIpaddr(webs_t wp);
-extern char_t *websGetRequestLpath(webs_t wp);
-extern char_t *websGetRequestPath(webs_t wp);
-extern char_t *websGetRequestPassword(webs_t wp);
-extern char_t *websGetRequestType(webs_t wp);
-extern int websGetRequestWritten(webs_t wp);
-extern char_t *websGetVar(webs_t wp, char_t *var, char_t *def);
-extern void websHeader(webs_t wp);
-extern int websOpenListen(int port, int retries);
-extern int websPageOpen(webs_t wp, char_t *lpath, char_t *path,
- int mode, int perm);
-extern void websPageClose(webs_t wp);
-extern int websPublish(char_t *urlPrefix, char_t *path);
-extern void websRedirect(webs_t wp, char_t *url);
-extern void websSecurityDelete();
-extern int websSecurityHandler(webs_t wp, char_t *urlPrefix,
- char_t *webDir, int arg, char_t *url, char_t *path,
- char_t *query);
-extern void websSetDefaultDir(char_t *dir);
-extern void websSetDefaultPage(char_t *page);
-extern void websSetEnv(webs_t wp);
-extern void websSetHost(char_t *host);
-extern void websSetIpaddr(char_t *ipaddr);
-extern void websSetPassword(char_t *password);
-extern void websSetRequestBytes(webs_t wp, int bytes);
-extern void websSetRequestFlags(webs_t wp, int flags);
-extern void websSetRequestLpath(webs_t wp, char_t *lpath);
-extern void websSetRequestPath(webs_t wp, char_t *dir, char_t *path);
-extern char_t *websGetRequestUserName(webs_t wp);
-extern void websSetRequestWritten(webs_t wp, int written);
-extern void websSetVar(webs_t wp, char_t *var, char_t *value);
-extern int websTestVar(webs_t wp, char_t *var);
-extern int websUrlHandlerDefine(char_t *urlPrefix, char_t *webDir,
- int arg, int (*fn)(webs_t wp, char_t *urlPrefix,
- char_t *webDir, int arg, char_t *url, char_t *path,
- char_t *query), int flags);
-extern int websUrlHandlerDelete(int (*fn)(webs_t wp, char_t *urlPrefix,
- char_t *webDir, int arg, char_t *url, char_t *path,
- char_t *query));
-extern int websUrlHandlerRequest(webs_t wp);
-extern int websUrlParse(char_t *url, char_t **buf, char_t **host,
- char_t **path, char_t **port, char_t **query,
- char_t **proto, char_t **tag, char_t **ext);
-extern char_t *websUrlType(char_t *webs, char_t *buf, int charCnt);
-extern int websWrite(webs_t wp, char_t* fmt, ...);
-extern int websWriteBlock(webs_t wp, char_t *buf, int nChars);
-extern int websWriteBlockData(webs_t wp, char *buf, int nChars);
-extern int websValid(webs_t wp);
-extern int websValidateUrl(webs_t wp, char_t *path);
-extern int websCloseFileHandle(webs_t wp);
-
-/*
- * Prototypes for functions available when running as part of the
- * GoAhead Embedded Management Framework (EMF)
- */
-#if EMF
-extern void websFormExplain(webs_t wp, char_t *path, char_t *query);
-#endif
-
-#endif /* _h_WEBS */
-
-/******************************************************************************/
diff --git a/cpukit/httpd/websuemf.c b/cpukit/httpd/websuemf.c
deleted file mode 100644
index 48a30f25d0..0000000000
--- a/cpukit/httpd/websuemf.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * websuemf.c -- GoAhead Micro Embedded Management Framework
- *
- * Copyright (c) Go Ahead Software Inc., 1995-1999. All Rights Reserved.
- *
- * See the file "license.txt" for usage and redistribution license requirements
- */
-
-/********************************** Description *******************************/
-
-/*
- * This modules provides compatibility with the full GoAhead EMF.
- */
-
-/*********************************** Includes *********************************/
-
-#include "wsIntrn.h"
-
-/************************************* Code ***********************************/
-/*
- * Evaluate a script
- */
-
-int scriptEval(int engine, char_t* cmd, char_t** result, int chan)
-{
- int ejid;
-
- if (engine == EMF_SCRIPT_EJSCRIPT) {
- ejid = (int) chan;
- if (ejEval(ejid, cmd, NULL) ) {
- return 0;
- } else {
- return -1;
- }
- }
- return -1;
-}
-
-/******************************************************************************/
diff --git a/cpukit/httpd/wsIntrn.h b/cpukit/httpd/wsIntrn.h
deleted file mode 100644
index bd77ef8862..0000000000
--- a/cpukit/httpd/wsIntrn.h
+++ /dev/null
@@ -1,268 +0,0 @@
-/*
- * wsIntrn.h -- Internal Go Ahead Web server header
- *
- * Copyright (c) Go Ahead Software Inc., 1992-1999. All Rights Reserved.
- *
- * See the file "license.txt" for information on usage and redistribution
- */
-
-#ifndef _h_WEBS_INTERNAL
-#define _h_WEBS_INTERNAL 1
-
-/******************************** Description *********************************/
-
-/*
- * Internal Go Ahead Web Server header. This defines the Web private APIs
- * Include this header when you want to create URL handlers.
- */
-
-/*********************************** Defines **********************************/
-
-/*
- * Define this to enable login of web accesses to a file
- * #define WEBS_LOG_SUPPORT 1
- *
- * Define this to enable HTTP/1.1 keep alive support
- * #define WEBS_KEEP_ALIVE_SUPPORT 1
- *
- * Define this to enable if-modified-since support
- * #define WEBS_IF_MODIFIED_SUPPORT 1
- *
- * Define this to support proxy capability and track local vs remote request
- * Note: this is not yet fully implemented.
- * #define WEBS_PROXY_SUPPORT 1
- *
- * Define this to support reading pages from ROM
- * Note: this is not yet fully implemented.
- * #define WEBS_PAGE_ROM 1
- *
- * Define this to enable memory allocation and stack usage tracking
- * #define B_STATS 1
- */
-
-/********************************** Includes **********************************/
-
-#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdarg.h>
-
-#if WIN
- #include <fcntl.h>
- #include <sys/stat.h>
- #include <io.h>
-#endif
-
-#if CE
-#if ! UEMF
- #include <io.h>
-#endif
-#endif
-
-#if NW
- #include <fcntl.h>
- #include <sys/stat.h>
-#endif
-
-#if LYNX
- #include <fcntl.h>
- #include <sys/stat.h>
- #include <signal.h>
- #include <unistd.h>
-#endif
-
-#if UNIX
- #include <fcntl.h>
- #include <sys/stat.h>
- #include <signal.h>
- #include <unistd.h>
-#endif
-
-#if QNX4
- #include <fcntl.h>
- #include <sys/stat.h>
- #include <signal.h>
- #include <unistd.h>
- #include <unix.h>
-#endif
-
-#if UW
- #include <fcntl.h>
- #include <sys/stat.h>
-#endif
-
-#if VXW486
- #include <vxWorks.h>
- #include <fcntl.h>
- #include <sys/stat.h>
-#endif
-
-#if UEMF
- #include "uemf.h"
- #include "ej.h"
-#else
- #include "emf/emfInternal.h"
-#endif
-
-#include "webs.h"
-
-/********************************** Defines ***********************************/
-/*
- * Read handler flags and state
- */
-#define WEBS_BEGIN 0x1 /* Beginning state */
-#define WEBS_HEADER 0x2 /* Ready to read first line */
-#define WEBS_POST 0x4 /* POST without content */
-#define WEBS_POST_CLEN 0x8 /* Ready to read content for POST */
-#define WEBS_PROCESSING 0x10 /* Processing request */
-#define WEBS_KEEP_TIMEOUT 15000 /* Keep-alive timeout (15 secs) */
-#define WEBS_TIMEOUT 60000 /* General request timeout (60) */
-
-#define PAGE_READ_BUFSIZE 512 /* bytes read from page files */
-#define MAX_PORT_LEN 10 /* max digits in port number */
-
-/*
- * URL handler structure. Stores the leading URL path and the handler
- * function to call when the URL path is seen.
- */
-typedef struct {
- int (*handler)(webs_t wp, char_t *urlPrefix, char_t *webDir, int arg,
- char_t *url, char_t *path,
- char_t *query); /* Callback URL handler function */
- char_t *webDir; /* Web directory if required */
- char_t *urlPrefix; /* URL leading prefix */
- int len; /* Length of urlPrefix for speed */
- int arg; /* Argument to provide to handler */
- int flags; /* Flags */
-} websUrlHandlerType;
-
-/*
- * Webs statistics
- */
-typedef struct {
- long errors; /* General errors */
- long redirects;
- long net_requests;
- long activeNetRequests;
- long activeBrowserRequests;
- long timeouts;
- long access; /* Access violations */
- long localHits;
- long remoteHits;
- long formHits;
- long handlerHits;
-} websStatsType;
-
-extern websStatsType websStats; /* Web access stats */
-
-/*
- * Error code list
- */
-typedef struct {
- int code; /* HTTP error code */
- char_t *msg; /* HTTP error message */
-} websErrorType;
-
-/*
- * Mime type list
- */
-typedef struct {
- char_t *type; /* Mime type */
- char_t *ext; /* File extension */
-} websMimeType;
-
-/*
- * File information structure.
- */
-typedef struct {
- unsigned long size; /* File length */
- int isDir; /* Set if directory */
- time_t mtime; /* Modified time */
-} websStatType;
-
-/*
- * Compiled Rom Page Index
- */
-typedef struct {
- char_t *path; /* Web page URL path */
- unsigned char *page; /* Web page data */
- int size; /* Size of web page in bytes */
- int pos; /* Current read position */
-} websRomPageIndexType;
-
-/*
- * Defines for file open.
- */
-#ifndef CE
-#define SOCKET_RDONLY O_RDONLY
-#define SOCKET_BINARY O_BINARY
-#else /* CE */
-#define SOCKET_RDONLY 0x1
-#define SOCKET_BINARY 0x2
-#endif /* CE */
-
-extern websRomPageIndexType websRomPageIndex[];
-extern websMimeType websMimeList[]; /* List of mime types */
-extern sym_fd_t websMime; /* Set of mime types */
-extern webs_t* webs; /* Session list head */
-extern int websMax; /* List size */
-extern char_t websHost[64]; /* Name of this host */
-extern char_t websIpaddr[64]; /* IP address of this host */
-extern char_t *websHostUrl; /* URL for this host */
-extern int websPort; /* Port number */
-
-/******************************** Prototypes **********************************/
-
-extern int websAspOpen();
-extern void websAspClose();
-extern void websFormOpen();
-extern void websFormClose();
-extern int websAspWrite(int ejid, webs_t wp, int argc, char_t **argv);
-extern void websDefaultClose();
-extern int websDefaultHandler(webs_t wp, char_t *urlPrefix,
- char_t *webDir, int arg, char_t *url, char_t *path,
- char_t *query);
-extern int websFormHandler(webs_t wp, char_t *urlPrefix, char_t *webDir,
- int arg, char_t *url, char_t *path, char_t *query);
-extern int websOpen(int sid);
-extern void websResponse(webs_t wp, int code, char_t *msg,
- char_t *redirect);
-extern int websJavaScriptEval(webs_t wp, char_t *script);
-extern int websPageReadData(webs_t wp, char *buf, int nBytes);
-extern int websPageOpen(webs_t wp, char_t *lpath, char_t *path, int mode, int perm);
-extern void websPageClose(webs_t wp);
-extern void websPageSeek(webs_t wp, long offset);
-extern int websPageStat(webs_t wp, char_t *lpath, char_t *path,
- websStatType *sbuf);
-extern int websPageIsDirectory(char_t *lpath);
-extern int websRomOpen();
-extern void websRomClose();
-extern int websRomPageOpen(webs_t wp, char_t *path, int mode, int perm);
-extern void websRomPageClose(int fd);
-extern int websRomPageReadData(webs_t wp, char *buf, int len);
-extern int websRomPageStat(char_t *path, websStatType *sbuf);
-extern long websRomPageSeek(webs_t wp, long offset, int origin);
-extern void websSetRequestSocketHandler(webs_t wp, int mask,
- void (*fn)(webs_t wp));
-extern int websSolutionHandler(webs_t wp, char_t *urlPrefix,
- char_t *webDir, int arg, char_t *url, char_t *path,
- char_t *query);
-extern void websUrlHandlerClose();
-extern int websUrlHandlerOpen();
-extern int websOpenServer(int port, int retries);
-extern void websCloseServer();
-extern char_t* websGetDateString(websStatType* sbuf);
-
-/*
- * Prototypes for functions available when running as part of the
- * GoAhead Embedded Management Framework (EMF)
- */
-#if EMF
-extern int websEmfOpen();
-extern void websEmfClose();
-extern void websSetEmfEnvironment(webs_t wp);
-#endif
-
-#endif /* _h_WEBS_INTERNAL */
-
-/******************************************************************************/
diff --git a/cpukit/include/rtems/libio_.h b/cpukit/include/rtems/libio_.h
deleted file mode 100644
index 8e74b34edb..0000000000
--- a/cpukit/include/rtems/libio_.h
+++ /dev/null
@@ -1,272 +0,0 @@
-/*
- * Libio Internal Information
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __LIBIO__h
-#define __LIBIO__h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems.h>
-#include <rtems/libio.h> /* include before standard IO */
-#include <rtems/assoc.h> /* assoc.h not included by rtems.h */
-
-#include <stdio.h> /* O_RDONLY, et.al. */
-#include <fcntl.h> /* O_RDONLY, et.al. */
-#include <assert.h>
-#include <stdarg.h>
-#include <errno.h>
-
-#if ! defined(O_NDELAY)
-# if defined(solaris2)
-# define O_NDELAY O_NONBLOCK
-# elif defined(RTEMS_NEWLIB)
-# define O_NDELAY _FNBIO
-# endif
-#endif
-
-#if !defined(ENOTSUP)
-#define ENOTSUP EOPNOTSUPP
-#endif
-
-#include <errno.h>
-#include <string.h> /* strcmp */
-#include <unistd.h>
-#include <stdlib.h> /* calloc() */
-
-/*
- * Semaphore to protect the io table
- */
-
-#define RTEMS_LIBIO_SEM rtems_build_name('L', 'B', 'I', 'O')
-#define RTEMS_LIBIO_IOP_SEM(n) rtems_build_name('L', 'B', 'I', n)
-
-extern rtems_id rtems_libio_semaphore;
-extern rtems_filesystem_file_handlers_r rtems_filesystem_null_handlers;
-
-/*
- * File descriptor Table Information
- */
-
-extern unsigned32 rtems_libio_number_iops;
-extern rtems_libio_t *rtems_libio_iops;
-extern rtems_libio_t *rtems_libio_last_iop;
-extern rtems_libio_t *rtems_libio_iop_freelist;
-
-/*
- * Default mode for all files.
- */
-
-extern mode_t rtems_filesystem_umask;
-
-/*
- * set_errno_and_return_minus_one
- *
- * Macro to ease common way to return an error.
- */
-
-#ifndef set_errno_and_return_minus_one
-#define set_errno_and_return_minus_one( _error ) \
- do { errno = (_error); return -1; } while(0)
-#endif
-
-/*
- * rtems_libio_iop
- *
- * Macro to return the file descriptor pointer.
- */
-
-#define rtems_libio_iop(_fd) \
- ((((unsigned32)(_fd)) < rtems_libio_number_iops) ? \
- &rtems_libio_iops[_fd] : 0)
-
-/*
- * rtems_libio_check_is_open
- *
- * Macro to check if a file descriptor is actually open.
- */
-
-#define rtems_libio_check_is_open(_iop) \
- do { \
- if (((_iop)->flags & LIBIO_FLAGS_OPEN) == 0) { \
- errno = EBADF; \
- return -1; \
- } \
- } while (0)
-
-/*
- * rtems_libio_check_fd
- *
- * Macro to check if a file descriptor number is valid.
- */
-
-#define rtems_libio_check_fd(_fd) \
- do { \
- if ((unsigned32) (_fd) >= rtems_libio_number_iops) { \
- errno = EBADF; \
- return -1; \
- } \
- } while (0)
-
-/*
- * rtems_libio_check_buffer
- *
- * Macro to check if a buffer pointer is valid.
- */
-
-#define rtems_libio_check_buffer(_buffer) \
- do { \
- if ((_buffer) == 0) { \
- errno = EINVAL; \
- return -1; \
- } \
- } while (0)
-
-/*
- * rtems_libio_check_count
- *
- * Macro to check if a count or length is valid.
- */
-
-#define rtems_libio_check_count(_count) \
- do { \
- if ((_count) == 0) { \
- return 0; \
- } \
- } while (0)
-
-/*
- * rtems_libio_check_permissions
- *
- * Macro to check if a file descriptor is open for this operation.
- */
-
-#define rtems_libio_check_permissions(_iop, _flag) \
- do { \
- if (((_iop)->flags & (_flag)) == 0) { \
- set_errno_and_return_minus_one( EINVAL ); \
- return -1; \
- } \
- } while (0)
-
-/*
- * rtems_filesystem_freenode
- *
- * Macro to free a node.
- */
-
-#define rtems_filesystem_freenode( _node ) \
- do { \
- if ( (_node)->ops->freenod ) \
- (*(_node)->ops->freenod)( (_node) ); \
- } while (0)
-
-/*
- * rtems_filesystem_is_separator
- *
- * Macro to determine if a character is a path name separator.
- *
- * NOTE: This macro handles MS-DOS and UNIX style names.
- */
-
-#define rtems_filesystem_is_separator( _ch ) \
- ( ((_ch) == '/') || ((_ch) == '\\') || ((_ch) == '\0'))
-
-/*
- * rtems_filesystem_get_start_loc
- *
- * Macro to determine if path is absolute or relative.
- */
-
-#define rtems_filesystem_get_start_loc( _path, _index, _loc ) \
- do { \
- if ( rtems_filesystem_is_separator( (_path)[ 0 ] ) ) { \
- *(_loc) = rtems_filesystem_root; \
- *(_index) = 1; \
- } else { \
- *(_loc) = rtems_filesystem_current; \
- *(_index) = 0; \
- } \
- } while (0)
-
-#define rtems_filesystem_get_sym_start_loc( _path, _index, _loc ) \
- do { \
- if ( rtems_filesystem_is_separator( (_path)[ 0 ] ) ) { \
- *(_loc) = rtems_filesystem_root; \
- *(_index) = 1; \
- } else { \
- *(_index) = 0; \
- } \
- } while (0)
-
-
-/*
- * External structures
- */
-
-extern rtems_filesystem_location_info_t rtems_filesystem_current;
-extern rtems_filesystem_location_info_t rtems_filesystem_root;
-extern nlink_t rtems_filesystem_link_counts;
-
-
-/*
- * File Descriptor Routine Prototypes
- */
-
-rtems_libio_t *rtems_libio_allocate(void);
-
-unsigned32 rtems_libio_fcntl_flags(
- unsigned32 fcntl_flags
-);
-
-unsigned32 rtems_libio_to_fcntl_flags(
- unsigned32 flags
-);
-
-void rtems_libio_free(
- rtems_libio_t *iop
-);
-
-int rtems_libio_is_open_files_in_fs(
- rtems_filesystem_mount_table_entry_t *mt_entry
-);
-
-int rtems_libio_is_file_open(
- void *node_access
-);
-
-/*
- * File System Routine Prototypes
- */
-
-int rtems_filesystem_evaluate_path(
- const char *pathname,
- int flags,
- rtems_filesystem_location_info_t *pathloc,
- int follow_link
-);
-
-void rtems_filesystem_initialize();
-
-int init_fs_mount_table();
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
-
-
diff --git a/cpukit/itron/Makefile.am b/cpukit/itron/Makefile.am
deleted file mode 100644
index 294450228e..0000000000
--- a/cpukit/itron/Makefile.am
+++ /dev/null
@@ -1,11 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-
-SUBDIRS = include inline src
-
-include $(top_srcdir)/../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/cpukit/itron/include/Makefile.am b/cpukit/itron/include/Makefile.am
deleted file mode 100644
index a12590301a..0000000000
--- a/cpukit/itron/include/Makefile.am
+++ /dev/null
@@ -1,27 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-H_FILES = itron.h
-
-noinst_HEADERS = $(H_FILES)
-
-PREINSTALL_FILES = \
-$(PROJECT_INCLUDE) \
-$(noinst_HEADERS:%=$(PROJECT_INCLUDE)/%)
-
-$(PROJECT_INCLUDE):
- @$(mkinstalldirs) $@
-$(PROJECT_INCLUDE)/%.h: %.h
- $(INSTALL_DATA) $< $@
-
-all-am: $(PREINSTALL_FILES)
-debug-am: $(PREINSTALL_FILES)
-profile-am: $(PREINSTALL_FILES)
-
-SUBDIRS = rtems itronsys
-
-include $(top_srcdir)/../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/cpukit/itron/include/itron.h b/cpukit/itron/include/itron.h
deleted file mode 100644
index 445042e1d3..0000000000
--- a/cpukit/itron/include/itron.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __ITRON_h_
-#define __ITRON_h_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Include the basic requirements
- */
-
-#include <rtems/system.h> /* basic RTEMS types defined by */
- /* each port */
-#include <itronsys/types.h> /* define all the TRON types */
- /* in terms of the RTEMS base types */
-#include <itronsys/status.h> /* define all ITRON status codes */
-
-/*
- * Now include the per manager include files
- */
-
-#include <itronsys/eventflags.h>
-#include <itronsys/fmempool.h>
-#include <itronsys/intr.h>
-#include <itronsys/mbox.h>
-#include <itronsys/msgbuffer.h>
-#include <itronsys/sysmgmt.h> /* network depends on this file */
-#include <itronsys/network.h>
-#include <itronsys/port.h>
-#include <itronsys/semaphore.h>
-#include <itronsys/task.h>
-#include <itronsys/time.h>
-#include <itronsys/vmempool.h>
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/itron/include/itronsys/README b/cpukit/itron/include/itronsys/README
deleted file mode 100644
index 8191ad3c5f..0000000000
--- a/cpukit/itron/include/itronsys/README
+++ /dev/null
@@ -1,9 +0,0 @@
-#
-# $Id$
-#
-
-This directory contains the public interface of each manager.
-Each file in this directory is included from <itron.h>.
-
-The private header file for each ITRON manager is in
-../rtems/itron. \ No newline at end of file
diff --git a/cpukit/itron/include/itronsys/eventflags.h b/cpukit/itron/include/itronsys/eventflags.h
deleted file mode 100644
index 1e0c7ac3b6..0000000000
--- a/cpukit/itron/include/itronsys/eventflags.h
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __ITRON_EVENTFLAGS_h_
-#define __ITRON_EVENTFLAGS_h_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Create Eventflags (cre_flg) Structure
- */
-
-typedef struct t_cflg {
- VP exinf; /* extended information */
- ATR flgatr; /* eventflag attribute */
- UINT iflgptn; /* initial eventflag */
- /* additional information may be included depending on the implementation */
-} T_CFLG;
-
-/*
- * flgatr
- */
-
-#define TA_WSGL 0x00 /* multiple tasks are not allowed to wait (Wait
- Single Task) */
-#define TA_WMUL 0x08 /* multiple tasks are allowed to wait (Wait
- Multiple Task) */
-
-/*
- * wfmode
- */
-
-#define TWF_ANDW 0x00 /* AND wait */
-#define TWF_ORW 0x02 /* OR wait */
-#define TWF_CLR 0x01 /* clear specification */
-
-/*
- * Reference Eventflags (ref_flg) Structure
- */
-
-typedef struct t_rflg {
- VP exinf; /* extended information */
- BOOL_ID wtsk; /* indicates whether or not there is a waiting task */
- UINT flgptn; /* eventflag bit pattern */
- /* additional information may be included depending on the implementation */
-} T_RFLG;
-
-/*
- * Eventflag Functions
- */
-
-/*
- * cre_flg - Create Eventflag
- */
-
-ER cre_flg(
- ID flgid,
- T_CFLG *pk_cflg
-);
-
-/*
- * del_flg - Delete Eventflag
- */
-
-ER del_flg(
- ID flgid
-);
-
-/*
- * set_flg - Set Eventflag
- */
-
-ER set_flg(
- ID flgid,
- UINT setptn
-);
-
-/*
- * clr_flg - Clear Eventflag
- */
-
-ER clr_flg(
- ID flgid,
- UINT clrptn
-);
-
-/*
- * wai_flg - Wait on Eventflag
- */
-
-ER wai_flg(
- UINT *p_flgptn,
- ID flgid,
- UINT waiptn,
- UINT wfmode
-);
-
-/*
- * pol_flg - Wait for Eventflag(Polling)
- */
-
-ER pol_flg(
- UINT *p_flgptn,
- ID flgid,
- UINT waiptn,
- UINT wfmode
-);
-
-/*
- * twai_flg - Wait on Eventflag with Timeout
- */
-
-ER twai_flg(
- UINT *p_flgptn,
- ID flgid,
- UINT waiptn,
- UINT wfmode,
- TMO tmout
-);
-
-/*
- * ref_flg - Reference Eventflag Status
- */
-
-ER ref_flg(
- T_RFLG *pk_rflg,
- ID flgid
-);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/itron/include/itronsys/fmempool.h b/cpukit/itron/include/itronsys/fmempool.h
deleted file mode 100644
index 4f63d9ba5d..0000000000
--- a/cpukit/itron/include/itronsys/fmempool.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __ITRON_FIXED_MEMORYPOOL_h_
-#define __ITRON_FIXED_MEMORYPOOL_h_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Create Fixed Memory Pool (cre_mpf) Structure
- */
-
- /* cre_mpf */
-typedef struct t_cmpf {
- VP exinf; /* extended information */
- ATR mpfatr; /* memorypool attributes */
- INT mpfcnt; /* block count for entire memorypool */
- INT blfsz; /* fixed-size memory block size */
- /* additional information may be included depending on the implementation */
-} T_CMPF;
-
-/*
- * mpfatr
- */
-
-#define TA_TFIFO 0x00 /* waiting tasks are handled by FIFO */
-#define TA_TPRI 0x01 /* waiting tasks are handled by priority */
-
-
-/*
- * Reference Fixed Memory Pool (ref_mpf) Structure
- */
-
- /* ref_mpf */
-typedef struct t_rmpf {
- VP exinf; /* extended information */
- BOOL_ID wtsk; /* indicates whether or not there are waiting tasks */
- INT frbcnt; /* free block count */
- /* additional information may be included depending on the implementation */
-} T_RMPF;
-
-/*
- * Fixed Memory Pool Functions
- */
-
-/*
- * cre_mpf - Create Fixed-Size Memorypool
- */
-
-ER cre_mpf(
- ID mpfid,
- T_CMPF *pk_cmpf
-);
-
-/*
- * del_mpf - Delete Fixed-Size Memorypool
- */
-
-ER del_mpf(
- ID mpfid
-);
-
-/*
- * get_blf - Get Fixed-Size Memory Block
- */
-
-ER get_blf(
- VP *p_blf,
- ID mpfid
-);
-
-/*
- * pget_blf - Poll and Get Fixed-Size Memory Block
- */
-
-ER pget_blf(
- VP *p_blf,
- ID mpfid
-);
-
-/*
- * tget_blf - Get Fixed-Size Memory Block with Timeout
- */
-
-ER tget_blf(
- VP *p_blf,
- ID mpfid,
- TMO tmout
-);
-
-/*
- * rel_blf - Release Fixed-Size Memory Block
- */
-
-ER rel_blf(
- ID mpfid,
- VP blf
-);
-
-/*
- * ref_mpf - Reference Fixed-Size Memorypool Status
- */
-
-ER ref_mpf(
- T_RMPF *pk_rmpf,
- ID mpfid
-);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/itron/include/itronsys/intr.h b/cpukit/itron/include/itronsys/intr.h
deleted file mode 100644
index c42987313e..0000000000
--- a/cpukit/itron/include/itronsys/intr.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __ITRON_INTERRUPT_h_
-#define __ITRON_INTERRUPT_h_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Define Interrupt (def_int) Structure
- */
-
-typedef struct t_dint {
- ATR intatr; /* interrupt handler attributes */
- FP inthdr; /* interrupt handler address */
- /* additional information may be included depending on the implementation */
-} T_DINT;
-
-/*
- * Interrupt Functions
- */
-
-/*
- * def_int - Define Interrupt Handler
- */
-
-ER def_int(
- UINT dintno,
- T_DINT *pk_dint
-);
-
-/*
- * ret_int - Return from Interrupt Handler
- */
-
-void ret_int( void );
-
-/*
- * ret_wup - Return and Wakeup Task
- */
-
-void ret_wup(
- ID tskid
-);
-
-/*
- * loc_cpu - Lock CPU
- */
-
-ER loc_cpu( void );
-
-/*
- * unl_cpu - Unlock CPU
- */
-
-ER unl_cpu( void );
-
-/*
- * dis_int - Disable Interrupt
- */
-
-ER dis_int(
- UINT eintno
-);
-
-/*
- * ena_int - Enable Interrupt
- */
-
-ER ena_int(
- UINT eintno
-);
-
-/*
- * chg_iXX - Change Interrupt Mask(Level or Priority)
- */
-
-ER chg_iXX(
- UINT iXXXX
-);
-
-/*
- * ref_iXX - Reference Interrupt Mask(Level or Priority)
- */
-
-ER ref_iXX(
- UINT *p_iXXXX
-);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/itron/include/itronsys/mbox.h b/cpukit/itron/include/itronsys/mbox.h
deleted file mode 100644
index 7e741d1ba5..0000000000
--- a/cpukit/itron/include/itronsys/mbox.h
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __ITRON_MBOX_h_
-#define __ITRON_MBOX_h_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Create Mailbox (cre_mbx) Structure
- */
-
-typedef struct t_cmbx {
- VP exinf; /* extended information */
- ATR mbxatr; /* mailbox attributes */
- /* Following is implementation-dependent function */
- INT bufcnt; /* maximum number of messages to let pend */
- /* additional information may be included depending on the implementation */
-} T_CMBX;
-
-/*
- * mbxatr
- */
-
-#define TA_TFIFO 0x00 /* waiting tasks are handled by FIFO */
-#define TA_TPRI 0x01 /* waiting tasks are handled by priority */
-#define TA_MFIFO 0x00 /* messages are handled by FIFO */
-#define TA_MPRI 0x02 /* messages are handled by priority */
-
-typedef struct t_msg {
- /*
- * A region (header) reserved by the OS may be included first
- * depending on the implementation.
- *
- * NOTE: The first two fields are RTEMS specific.
- */
-
- INT msgpri; /* priority of each message */
- /* VB msgcont[]; XXX */
- unsigned8 msgcont[1];
-} T_MSG;
-
-/*
- * Reference Mailbox (ref_mbx) Structure
- */
-
-typedef struct t_rmbx {
- VP exinf; /* extended information */
- BOOL_ID wtsk; /* indicates whether or not there is a waiting task */
- T_MSG *pk_msg; /* message to be sent next */
- /* additional information may be included depending on the implementation */
-} T_RMBX;
-
-/*
- * Mailbox Functions
- */
-
-/*
- * cre_mbx - Create Mailbox
- */
-
-ER cre_mbx(
- ID mbxid,
- T_CMBX *pk_cmbx
-);
-
-/*
- * del_mbx - Delete Mailbox
- */
-
-ER del_mbx(
- ID mbxid
-);
-
-/*
- * snd_msg - Send Message to Mailbox
- */
-
-ER snd_msg(
- ID mbxid,
- T_MSG *pk_msg
-);
-
-/*
- * rcv_msg - Receive Message from Mailbox
- */
-
-ER rcv_msg(
- T_MSG **ppk_msg,
- ID mbxid
-);
-
-/*
- * prcv_msg - Poll and Receive Message from Mailbox
- */
-
-ER prcv_msg(
- T_MSG **ppk_msg,
- ID mbxid
-);
-
-/*
- * trcv_msg - Receive Message from Mailbox with Timeout
- */
-
-ER trcv_msg(
- T_MSG **ppk_msg,
- ID mbxid,
- TMO tmout
-);
-
-/*
- * ref_mbx - Reference Mailbox Status
- */
-
-ER ref_mbx(
- T_RMBX *pk_rmbx,
- ID mbxid
-);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/itron/include/itronsys/msgbuffer.h b/cpukit/itron/include/itronsys/msgbuffer.h
deleted file mode 100644
index 7b58a63924..0000000000
--- a/cpukit/itron/include/itronsys/msgbuffer.h
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __ITRON_MESSAGEBUFFER_h_
-#define __ITRON_MESSAGEBUFFER_h_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Create Message Buffer (cre_mbf) Structure
- */
-
-typedef struct t_cmbf {
- VP exinf; /* extended information */
- ATR mbfatr; /* messagebuffer attributes */
- INT bufsz; /* messagebuffer size */
- INT maxmsz; /* maximum size of messages */
- /* additional information may be included depending on the implementation */
-} T_CMBF;
-
-/*
- * mbfatr
- */
-
-#define TA_TFIFO 0x00 /* tasks waiting to receive messages are handled
- by FIFO */
-#define TA_TPRI 0x01 /* tasks waiting to receive messages are handled
- by priority */
-
-/*
- * mbfid
- */
-
-#define TMBF_OS (-4) /* messagebuffer used for OS error log */
-#define TMBF_DB (-3) /* messagebuffer used for debugging */
-
-/*
- * Reference Message Buffer (ref_mbf) Structure
- */
-
-typedef struct t_rmbf {
- VP exinf; /* extended information */
- BOOL_ID wtsk; /* indicates whether or not there is a */
- /* task waiting to receive a message */
- BOOL_ID stsk; /* indicates whether or not there is a */
- /* task waiting to send a message */
- INT msgsz; /* size of message to be sent next */
- INT frbufsz; /* size of free buffer */
- /* additional information may be included depending on the implementation */
-} T_RMBF;
-
-/*
- * Message Buffer Functions
- */
-
-/*
- * cre_mbf - Create MessageBuffer
- */
-
-ER cre_mbf(
- ID mbfid,
- T_CMBF *pk_cmbf
-);
-
-/*
- * del_mbf - Delete MessageBuffer
- */
-
-ER del_mbf(
- ID mbfid
-);
-
-/*
- * snd_mbf - Send Message to MessageBuffer
- */
-
-ER snd_mbf(
- ID mbfid,
- VP msg,
- INT msgsz
-);
-
-/*
- * psnd_mbf - Poll and Send Message to MessageBuffer
- */
-
-ER psnd_mbf(
- ID mbfid,
- VP msg,
- INT msgsz
-);
-
-/*
- * tsnd_mbf - Send Message to MessageBuffer with Timeout
- */
-
-ER tsnd_mbf(
- ID mbfid,
- VP msg,
- INT msgsz,
- TMO tmout
-);
-
-/*
- * rcv_mbf - Receive Message from MessageBuffer
- */
-
-ER rcv_mbf(
- VP msg,
- INT *p_msgsz,
- ID mbfid
-);
-
-/*
- * prcv_mbf - Poll and Receive Message from MessageBuffer
- */
-
-ER prcv_mbf(
- VP msg,
- INT *p_msgsz,
- ID mbfid
-);
-
-/*
- * trcv_mbf - Receive Message from MessageBuffer with Timeout
- */
-
-ER trcv_mbf(
- VP msg,
- INT *p_msgsz,
- ID mbfid,
- TMO tmout
-);
-
-/*
- * ref_mbf - Reference MessageBuffer Status
- */
-
-ER ref_mbf(
- T_RMBF *pk_rmbf,
- ID mbfid
-);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/itron/include/itronsys/network.h b/cpukit/itron/include/itronsys/network.h
deleted file mode 100644
index 394d381eb7..0000000000
--- a/cpukit/itron/include/itronsys/network.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __ITRON_NETWORK_h_
-#define __ITRON_NETWORK_h_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * NODE srcnode, dstnode, nod:
- */
-
-#define TND_SELF 0 /* specifies the local node */
-#define TND_OTHR (-1) /* specifies default remote node */
-
-/*
- * Network Functions
- */
-
-/*
- * nrea_dat - Read Data from another Node
- */
-
-ER nrea_dat(
- INT *p_reasz,
- VP dstadr,
- NODE srcnode,
- VP srcadr,
- INT datsz
-);
-
-/*
- * nwri_dat - Write Data to another Node
- */
-
-ER nwri_dat(
- INT *p_wrisz,
- NODE dstnode,
- VP dstadr,
- VP srcadr,
- INT datsz
-);
-
-/*
- * nget_nod - Get Local Node Number
- */
-
-ER nget_nod(
- NODE *p_node
-);
-
-/*
- * nget_ver - Get Version Information of another Node
- */
-
-ER nget_ver(
- T_VER *pk_ver,
- NODE node
-);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/itron/include/itronsys/port.h b/cpukit/itron/include/itronsys/port.h
deleted file mode 100644
index 3999678eaa..0000000000
--- a/cpukit/itron/include/itronsys/port.h
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __ITRON_PORT_h_
-#define __ITRON_PORT_h_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Create Port (cre_por) Structure
- */
-
-typedef struct t_cpor {
- VP exinf; /* extended information */
- ATR poratr; /* port attributes */
- INT maxcmsz; /* maximum call message size */
- INT maxrmsz; /* maximum reply message size */
- /* additional information may be included depending on the implementation */
-} T_CPOR;
-
-/*
- * poratr
- */
-
-#define TA_NULL 0 /* specifies no particular attributes */
-
-/*
- * TA_NULL should be used in place of zeroes to turn off all
- * attribute features.
- */
-
-/*
- * Reference Port (ref_por) Structure
- */
-
-typedef struct t_rpor {
- VP exinf; /* extended information */
- BOOL_ID wtsk; /* indicates whether or not there is a task */
- /* waiting to call a rendezvous */
- BOOL_ID atsk; /* indicates whether or not there is a task */
- /* waiting to accept a rendezvous */
- /* additional information may be included depending on the implementation */
-} T_RPOR;
-
-/*
- * Port Functions
- */
-
-/*
- * cre_por - Create Port for Rendezvous
- */
-
-ER cre_por(
- ID porid,
- T_CPOR *pk_cpor
-);
-
-/*
- * del_por - Delete Port for Rendezvous
- */
-
-ER del_por(
- ID porid
-);
-
-/*
- * cal_por - Call Port for Rendezvous Poll
- */
-
-ER cal_por(
- VP msg,
- INT *p_rmsgsz,
- ID porid,
- UINT calptn,
- INT cmsgsz
-);
-
-/*
- * pcal_por - Poll and Call Port for Rendezvous
- */
-
-ER pcal_por(
- VP msg,
- INT *p_rmsgsz,
- ID porid,
- UINT calptn,
- INT cmsgsz
-);
-
-/*
- * tcal_por - Call Port for Rendezvous with Timeout
- */
-
-ER tcal_por(
- VP msg,
- INT *p_rmsgsz,
- ID porid,
- UINT calptn,
- INT cmsgsz,
- TMO tmout
-);
-
-/*
- * acp_por - Accept Port for Rendezvous Poll
- */
-
-ER acp_por(
- RNO *p_rdvno,
- VP msg,
- INT *p_cmsgsz,
- ID porid,
- UINT acpptn
-);
-
-/*
- * pacp_por - Poll and Accept Port for Rendezvous
- */
-
-ER pacp_por(
- RNO *p_rdvno,
- VP msg,
- INT *p_cmsgsz,
- ID porid,
- UINT acpptn
-);
-
-/*
- * tacp_por - Accept Port for Rendezvous with Timeout
- */
-
-ER tacp_por(
- RNO *p_rdvno,
- VP msg,
- INT *p_cmsgsz,
- ID porid,
- UINT acpptn,
- TMO tmout
-);
-
-/*
- * fwd_por - Forward Rendezvous to Other Port
- */
-
-ER fwd_por(
- ID porid,
- UINT calptn,
- RNO rdvno,
- VP msg,
- INT cmsgsz
-);
-
-/*
- * rpl_rdv - Reply Rendezvous
- */
-
-ER rpl_rdv(
- RNO rdvno,
- VP msg,
- INT rmsgsz
-);
-
-/*
- * ref_por - Reference Port Status
- */
-
-ER ref_por(
- T_RPOR *pk_rpor,
- ID porid
-);
-
-
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/itron/include/itronsys/semaphore.h b/cpukit/itron/include/itronsys/semaphore.h
deleted file mode 100644
index b76b72387d..0000000000
--- a/cpukit/itron/include/itronsys/semaphore.h
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __ITRON_SEMAPHORE_h_
-#define __ITRON_SEMAPHORE_h_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Create Semaphore (cre_sem) Structure
- */
-
-typedef struct t_csem {
- VP exinf; /* extended information */
- ATR sematr; /* semaphore attributes */
- /* Following is the extended function for [level X]. */
- INT isemcnt; /* initial semaphore count */
- INT maxsem; /* maximum semaphore count */
- /* additional information may be included depending on the implementation */
-} T_CSEM;
-
-/*
- * sematr - Semaphore Attribute Values
- */
-
-#define TA_TFIFO 0x00 /* waiting tasks are handled by FIFO */
-#define TA_TPRI 0x01 /* waiting tasks are handled by priority */
-
-#define _ITRON_SEMAPHORE_UNUSED_ATTRIBUTES ~(TA_TPRI)
-
-/*
- * Reference Semaphore (ref_sem) Structure
- */
-
-typedef struct t_rsem {
- VP exinf; /* extended information */
- BOOL_ID wtsk; /* indicates whether or not there is a waiting task */
- INT semcnt; /* current semaphore count */
- /* additional information may be included depending on the implementation */
-} T_RSEM;
-
-/*
- * Semaphore Functions
- */
-
-/*
- * cre_sem - Create Semaphore
- */
-
-ER cre_sem(
- ID semid,
- T_CSEM *pk_csem
-);
-
-/*
- * del_sem - Delete Semaphore
- */
-
-ER del_sem(
- ID semid
-);
-
-/*
- * sig_sem - Signal Semaphore
- */
-
-ER sig_sem(
- ID semid
-);
-
-/*
- * wai_sem - Wait on Semaphore
- */
-
-ER wai_sem(
- ID semid
-);
-
-/*
- * preq_sem - Poll and Request Semaphore
- */
-
-ER preq_sem(
- ID semid
-);
-
-/*
- * twai_sem - Wait on Semaphore with Timeout
- */
-
-ER twai_sem(
- ID semid,
- TMO tmout
-);
-
-/*
- * ref_sem - Reference Semaphore Status
- */
-
-ER ref_sem(
- ID semid,
- T_RSEM *pk_rsem
-);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/itron/include/itronsys/status.h b/cpukit/itron/include/itronsys/status.h
deleted file mode 100644
index 42f7226749..0000000000
--- a/cpukit/itron/include/itronsys/status.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __ITRON_STATUS_h_
-#define __ITRON_STATUS_h_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define E_OK 0 /* Normal completion */
-#define E_SYS (-5) /* System error */
-#define E_NOMEM (-10) /* Insufficient memory */
-#define E_NOSPT (-17) /* Feature not supported */
-#define E_INOSPT (-18) /* Feature not supported by ITRON/FILE */
- /* specification */
-#define E_RSFN (-20) /* Reserved function code number */
-#define E_RSATR (-24) /* Reserved attribute */
-#define E_PAR (-33) /* Parameter error */
-#define E_ID (-35) /* Invalid ID number */
-#define E_NOEXS (-52) /* Object does not exist */
-#define E_OBJ (-63) /* Invalid object state */
-#define E_MACV (-65) /* Memory access disabled or memory access */
- /* violation */
-#define E_OACV (-66) /* Object access violation */
-#define E_CTX (-69) /* Context error */
-#define E_QOVR (-73) /* Queuing or nesting overflow */
-#define E_DLT (-81) /* Object being waited for was deleted */
-#define E_TMOUT (-85) /* Polling failure or timeout exceeded */
-#define E_RLWAI (-86) /* WAIT state was forcibly released */
-#define EN_NOND (-113) /* Target node does not exist or cannot be */
- /* accessed */
-#define EN_OBJNO (-114) /* Specifies an object number which could not be */
- /* accessed on the target node */
-#define EN_PROTO (-115) /* Protocol not supported on target node */
-#define EN_RSFN (-116) /* System call or function not supported on */
- /* target node */
-#define EN_COMM (-117) /* No response from target node */
-#define EN_RLWAI (-118) /* Connection function response wait state was */
- /* forcibly released */
-#define EN_PAR (-119) /* A value outside the range supported by the */
- /* target node and/or transmission packet */
- /* format was specified as a parameter */
-#define EN_RPAR (-120) /* A value outside the range supported by the */
- /* issuing node and/or transmission packet */
- /* format was returned as a return parameter */
-#define EN_CTXID (-121) /* An object on another node was specified to */
- /* a system call issued from a task in dispatch */
- /* disabled state or from a task-independent */
- /* portion */
-#define EN_EXEC (-122) /* System call could not be executed due to */
- /* insufficient resources on the target node */
-#define EN_NOSPT (-123) /* Connection function not supported */
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/itron/include/itronsys/sysmgmt.h b/cpukit/itron/include/itronsys/sysmgmt.h
deleted file mode 100644
index 0f3c403f82..0000000000
--- a/cpukit/itron/include/itronsys/sysmgmt.h
+++ /dev/null
@@ -1,319 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __ITRON_SYSTEM_MANAGEMENT_h_
-#define __ITRON_SYSTEM_MANAGEMENT_h_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Get Version (get_ver) Structure
- */
-
-typedef struct t_ver {
- UH maker; /* vendor */
- UH id; /* format number */
- UH spver; /* specification version */
- UH prver; /* product version */
- UH prno[4]; /* product control information */
- UH cpu; /* CPU information */
- UH var; /* variation descriptor */
-} T_VER;
-
-/*
- * Specific MAKER codes established as of March, 1993 are as follows.
- * Due to restrictions on the assignment of CPU codes described below, it is
- * necessary to use maker codes in the range 0x000 through 0x00ff for vendors
- * developing CPUs.
- */
-
-/*
- * CPU defines XXX need to name the constants
- */
-
-#if 0
-#define 0x000 /* No version (test systems, etc.) */
-#define 0x001 /* University of Tokyo */
-#define 0x009 /* FUJITSU LIMITED */
-#define 0x00a /* Hitachi, Ltd. */
-#define 0x00b /* Matsushita Electric Industrial Co., Ltd. */
-#define 0x00c /* Mitsubishi Electric Corporation */
-#define 0x00d /* NEC Corporation */
-#define 0x00e /* Oki Electric Industry Co., Ltd. */
-#define 0x00f /* TOSHIBA CORPORATION */
-#endif
-
-/*
- * The above have been assigned in alphabetical order.
- */
-
-#if 0
-#define 0x010 /* ALPS ELECTRIC CO., LTD. */
-#define 0x011 /* WACOM Co., Ltd. */
-#define 0x012 /* Personal Media Corporation */
-#define 0x101 /* OMRON CORPORATION */
-#define 0x102 /* SEIKOSHA CO., LTD. */
-#define 0x103 /* SYSTEM ALGO CO., LTD. */
-#define 0x104 /* Tokyo Computer Service Co., Ltd. */
-#define 0x105 /* YAMAHA CORPORATION */
-#define 0x106 /* MORSON JAPAN */
-#define 0x107 /* TOSHIBA INFORMATION SYSTEMS (JAPAN) CORP. */
-#define 0x108 /* Miyazaki System Planning Office */
-#define 0x109 /* Three Ace Computer Corporation */
-#endif
-
-/*
- * CPU Codes
- *
- * Figure 47 shows the format of cpu code. Some processors use the format
- * given in Figure 47(1). The format given in Figure 47(2) is used for all
- * other proprietary processors.
- *
- * The code assignment of the CPU1 region in the format given in Figure 47(1)
- * is common to ITRON and BTRON specifications. The same number is used in
- * the CPU type of the standard object format of BTRON specification
- * operating systems implemented on a TRON-specification chip.
- *
- * When using the format given in Figure 47(2) the code used for MAKER1 is
- * assigned by using the lower 8 bits of MAKER described in the previous
- * subsection. The code assignment of CPU2 is left up to each maker.
- *
- *
- *
- * +---------------+---------------+---------------+---------------+
- * (1) | 0 0 0 0 0 0 0 0 | CPU1 |
- * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
- * +---------------+---------------+---------------+---------------+
- * (2) | MAKER1 | CPU2 |
- * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
- *
- * Figure 47 Format of cpu Returned by get_ver
- *
- *
- * Specific CPU codes established as of March, 1993 are as follows.
- */
-
-#if 0
-/*
- * XXX CONVERT THESE to #defines
- */
-
-
-/*
- * Contents of the CPU1 field
- */
-
-#define (0x0) CPU unspecified, no CPU information given
-#define (0x1) TRONCHIP32 shared
-#define (0x2) reserved
-#define (0x3) reserved
-#define (0x4) reserved
-#define (0x5) reserved (<<L1R>> TRON-specification chip)
-#define (0x6) reserved (<<L1>> TRON-specification chip)
-#define (0x7) reserved (TRON-specification chip supporting the
- LSID function)
-/* CPU vendors are unspecified for codes B'00000000 through B'00000111. */
-
-#define (0x8) reserved
-#define (0x9) GMICRO/100
-#define (0xa) GMICRO/200
-#define (0xb) GMICRO/300
-#define (0xc) reserved
-#define (0xd) TX1
-#define (0xe) TX2
-#define (0xf) reserved
-
-#define (0x10) reserved
-#define (0x11) reserved
-#define (0x12) reserved
-#define (0x13) O32
-#define (0x14) reserved
-#define (0x15) MN10400
-#define (0x16) reserved
-#define (0x17) reserved
-
-#define (0x18) GMICRO/400
-#define (0x19) GMICRO/500
-#define (0x1a) reserved
-#define (0x1b-0x3f)
- reserved
- * For GMICRO extended, TX series extended, and TRONCHIP64 chips.
-
-#define (0x40) Motorola 68000
-#define (0x41) Motorola 68010
-#define (0x42) Motorola 68020
-#define (0x43) Motorola 68030
-#define (0x44) Motorola 68040
-#define -(0x40-0x4f)
-#define Motorola 68000 family
-#define (0x50) National Semiconductor NS32032
-#define (0x50-0x5f)
- National Semiconductor NS32000 family
-#define (0x60) Intel 8086, 8088
-#define (0x61) Intel 80186
-#define (0x62) Intel 80286
-#define (0x63) Intel 80386
-#define (0x64) Intel 80486
-#define (0x60-0x6f)
- Intel iAPX86 family
-
-#define (0x70-0x7f)
- NEC V Series
-
-#define (0x80-0xff)
- reserved
-#endif
-
-/*
- * Assigning Version Numbers
- *
- * The version numbers of ITRON and uITRON specifications take the following
- * form.
- *
- * Ver X.YY.ZZ[.WW]
- *
- * where "X" represents major version number of the ITRON specification to
- * distinguish ITRON1, ITRON2 and uITRON 3.0 specifications. Specific
- * assignment is as follows.
- *
- * "X" = 1 ITRON1 specification
- * = 2 ITRON2 or uITRON 2.0 specification
- * = 3 uITRON 3.0 specification
- *
- * "YY" is a number used to distinguish versions according to changes and
- * additions made to the specification. After the specification is published,
- * this number is incremented in order "YY" = 00, 01, 02... according to
- * version upgrades. The first digit of "YY" is 'A', 'B' or 'C' for draft
- * standard versions and test versions within the TRON Association before the
- * specification have been published.
- *
- * The "X.YY" part of the specification version numbers is returned by spver
- * to get_ver system call. The corresponding hexadecimal value is used when
- * "YY" includes 'A', 'B' or 'C'.
- *
- * "ZZ" represents a number used to distinguish versions related to the written
- * style of a specification. This number is incremented in order
- * "ZZ" = 00, 01, 02... when there have been changes in specification
- * configuration, reordering of chapters or corrections of misprints.
- * When a further distinction of the written style of specifications is
- * desired, ".WW" may be added optionally after "ZZ". WW will be assumed
- * to be zero if ".WW" is omitted.
- */
-
-/*
- * Reference System (ref_sys) Structure
- */
-
-typedef struct t_rsys {
- INT sysstat; /* system state */
- /* additional information may be included depending on the implementation */
-} T_RSYS;
-
-/*
- * sysstat
- */
-
-#define TSS_TSK 0 /* normal state in which dispatching is enabled during
- task portion execution */
-#define TSS_DDSP 1 /* state after dis_dsp has been executed during task
- portion execution (dispatch disabled) */
-#define TSS_LOC 3 /* state after loc_cpu has been executed during task
- portion execution (interrupt and dispatch disabled)
- */
-#define TSS_INDP 4 /* state during execution of task-independent portions
- (interrupt and timer handlers) */
-
-/*
- * Reference Configuration (ref_cfg) Structure
- */
-
-typedef struct t_rcfg {
- /* details concerning members are implementation dependent */
-} T_RCFG;
-
-/*
- * Define Service (def_svc) Structure
- */
-
-typedef struct t_dsvc {
- ATR svcatr; /* extended SVC handler attributes */
- FP svchdr; /* extended SVC handler address */
- /* additional information may be included depending on the implementation */
-} T_DSVC;
-
-/*
- * Define Exception (def_exc) Structure
- */
-
-typedef struct t_dexc {
- ATR excatr; /* exception handler attributes */
- FP exchdr; /* exception handler address */
- /* additional information may be included depending on the implementation */
-} T_DEXC;
-
-/*
- * System Management Functions
- */
-
-/*
- * get_ver - Get Version Information
- */
-
-ER get_ver(
- T_VER *pk_ver
-);
-
-/*
- * ref_sys - Reference Semaphore Status
- */
-
-ER ref_sys(
- T_RSYS *pk_rsys
-);
-
-/*
- * ref_cfg - Reference Configuration Information
- */
-
-ER ref_cfg(
- T_RCFG *pk_rcfg
-);
-
-/*
- * def_svc - Define Extended SVC Handler
- */
-
-ER def_svc(
- FN s_fncd,
- T_DSVC *pk_dsvc
-);
-
-/*
- * def_exc - Define Exception Handler
- */
-
-ER def_exc(
- UINT exckind,
- T_DEXC *pk_dexc
-);
-
-
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/itron/include/itronsys/task.h b/cpukit/itron/include/itronsys/task.h
deleted file mode 100644
index d4f7a5e470..0000000000
--- a/cpukit/itron/include/itronsys/task.h
+++ /dev/null
@@ -1,298 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __ITRON_TASK_h_
-#define __ITRON_TASK_h_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Create Task (cre_tsk) Structure
- */
-
-typedef struct t_ctsk {
- VP exinf; /* extended information */
- ATR tskatr; /* task attributes */
- FP task; /* task start address */
- PRI itskpri; /* initial task priority */
- INT stksz; /* stack size */
- /* additional information may be included depending on the implementation */
-} T_CTSK;
-
-/*
- * Values for the tskatr field
- */
-
-#define TA_ASM 0x00 /* program written in assembly language */
-#define TA_HLNG 0x01 /* program written in high-level language */
-#define TA_COP0 0x8000 /* uses coprocessor having ID = 0 */
-#define TA_COP1 0x4000 /* uses coprocessor having ID = 1 */
-#define TA_COP2 0x2000 /* uses coprocessor having ID = 2 */
-#define TA_COP3 0x1000 /* uses coprocessor having ID = 3 */
-#define TA_COP4 0x0800 /* uses coprocessor having ID = 4 */
-#define TA_COP5 0x0400 /* uses coprocessor having ID = 5 */
-#define TA_COP6 0x0200 /* uses coprocessor having ID = 6 */
-#define TA_COP7 0x0100 /* uses coprocessor having ID = 7 */
-
-/*
- * Values for the tskid field
- */
-
-#define TSK_SELF 0 /* task specifies itself */
-
-/* XXX is this a mistake in ITRON? FALSE was here and in the types list */
-#if 0
-
-#define FALSE 0 /* indicates a task-independent portion (return */
- /* parameters only) */
-#endif
-
-/*
- * Values for the tskpri field
- */
-
-#define TPRI_INI 0 /* specifies the initial priority on */
- /* task startup (chg_pri) */
-#define TPRI_RUN 0 /* specifies the highest priority during */
- /* execution (rot_rdq) */
-
-
-/*
- * Reference Task (ref_tsk) Structure
- */
-
-typedef struct t_rtsk {
- VP exinf; /* extended information */
- PRI tskpri; /* current priority */
- UINT tskstat; /* task state */
- /*
- * The following are represent extended features of support
- * [level X] (implementation-dependent).
- */
- UINT tskwait; /* cause of wait */
- ID wid; /* ID of object being waited for */
- INT wupcnt; /* wakeup request count */
- INT suscnt; /* SUSPEND request count */
- ATR tskatr; /* task attributes */
- FP task; /* task start address */
- PRI itskpri; /* initial task priority */
- INT stksz; /* stack size */
-} T_RTSK;
-
-/*
- * Values for the tskstat field
- */
-
-
-#define TTS_RUN 0x01 /* RUN */
-#define TTS_RDY 0x02 /* READY */
-#define TTS_WAI 0x04 /* WAIT */
-#define TTS_SUS 0x08 /* SUSPEND */
-#define TTS_WAS 0x0C /* WAIT-SUSPEND */
-#define TTS_DMT 0x10 /* DORMANT */
-
-/*
- * Values for the tskwait field
- */
-
-#define TTW_SLP 0x0001 /* wait due to slp_tsk or tslp_tsk */
-#define TTW_DLY 0x0002 /* wait due to dly_tsk */
-#define TTW_NOD 0x0008 /* connection function response wait */
-#define TTW_FLG 0x0010 /* wait due to wai_flg or twai_flg */
-#define TTW_SEM 0x0020 /* wait due to wai_sem or twai_sem */
-#define TTW_MBX 0x0040 /* wait due to rcv_msg or trcv_msg */
-#define TTW_SMBF 0x0080 /* wait due to snd_mbf or tsnd_mbf */
-#define TTW_MBF 0x0100 /* wait due to rcv_mbf or trcv_mbf */
-#define TTW_CAL 0x0200 /* wait for rendezvous call */
-#define TTW_ACP 0x0400 /* wait for rendezvous accept */
-#define TTW_RDV 0x0800 /* wait for rendezvous completion */
-#define TTW_MPL 0x1000 /* wait due to get_blk or tget_blk */
-#define TTW_MPF 0x2000 /* wait due to get_blf or tget_blf */
-
-/*
- * Since the task states given by tskstat and tskwait are expressed
- * by bit correspondences, they are convenient when looking for OR
- * conditions (such as whether a task is in WAIT or READY state).
- */
-
-/*
- * Task Management Functions
- */
-
-/*
- * cre_tsk - Create Task
- */
-
-ER cre_tsk(
- ID tskid,
- T_CTSK *pk_ctsk
-);
-
-/*
- * del_tsk - Delete Task
- */
-
-ER del_tsk(
- ID tskid
-);
-
-/*
- * sta_tsk - Start Task
- */
-
-ER sta_tsk(
- ID tskid,
- INT stacd
-);
-
-/*
- * ext_tsk - Exit Issuing Task
- */
-
-void ext_tsk( void );
-
-/*
- * exd_tsk - Exit and Delete Task
- */
-
-void exd_tsk( void );
-
-/*
- * ter_tsk - Terminate Other Task
- */
-
-ER ter_tsk(
- ID tskid
-);
-
-/*
- * dis_dsp - Disable Dispatch
- */
-
-ER dis_dsp( void );
-
-/*
- * ena_dsp - Enable Dispatch
- */
-
-ER ena_dsp( void );
-
-/*
- * chg_pri - Change Task Priority
- */
-
-ER chg_pri(
- ID tskid,
- PRI tskpri
-);
-
-/*
- * rot_rdq - Rotate Tasks on the Ready Queue
- */
-
-ER rot_rdq(
- PRI tskpri
-);
-
-/*
- * rel_wai - Release Wait of Other Task
- */
-
-ER rel_wai(
- ID tskid
-);
-
-/*
- * get_tid - Get Task Identifier
- */
-
-ER get_tid(
- ID *p_tskid
-);
-
-/*
- * ref_tsk - Reference Task Status
- */
-
-ER ref_tsk(
- T_RTSK *pk_rtsk,
- ID tskid
-);
-
-
-/*
- * Task-Dependent Synchronization Functions
- */
-
-/*
- * sus_tsk - Suspend Other Task
- */
-
-ER sus_tsk(
- ID tskid
-);
-
-/*
- * rsm_tsk - Resume Suspended Task
- */
-
-ER rsm_tsk(
- ID tskid
-);
-
-/*
- * frsm_tsk - Forcibly Resume Suspended Task
- */
-
-ER frsm_tsk(
- ID tskid
-);
-
-/*
- * slp_tsk - Sleep Task Sleep Task with Timeout
- */
-
-ER slp_tsk( void );
-
-/*
- * tslp_tsk - Sleep Task with Timeout
- */
-
-ER tslp_tsk(
- TMO tmout
-);
-
-/*
- * wup_tsk - Wakeup Other Task
- */
-
-ER wup_tsk(
- ID tskid
-);
-
-/*
- * can_wup - Cancel Wakeup Request
- */
-
-ER can_wup(
- INT *p_wupcnt,
- ID tskid
-);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/itron/include/itronsys/time.h b/cpukit/itron/include/itronsys/time.h
deleted file mode 100644
index 7868e45ff0..0000000000
--- a/cpukit/itron/include/itronsys/time.h
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __ITRON_TIME_h_
-#define __ITRON_TIME_h_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * System Time Data Type
- *
- * Member configuration depends on the bit width of the processor and
- * on the implementation. A total of 48 bits is recommended.
- *
- */
-
-typedef struct t_systime {
- H utime; /* upper 16 bits */
- UW ltime; /* lower 32 bits */
-} SYSTIME, CYCTIME, ALMTIME;
-
-/*
- * XXX Look this up in the spec and figure out where it comes
- * XXX from. dly_tim() references it but it was left out
- * XXX of the initial cut at the header files.
- */
-
-typedef int DLYTIME;
-
-/*
- * XXX (def_cyc) Structure
- */
-
-typedef struct t_dcyc {
- VP exinf; /* extended information */
- ATR cycatr; /* cyclic handler attributes */
- FP cychdr; /* cyclic handler address */
- UINT cycact; /* cyclic handler activation */
- CYCTIME cyctim; /* cyclic startup period */
-} T_DCYC;
-
-/*
- * cycact
- */
-
-#define TCY_OFF 0x00 /* do not invoke cyclic handler */
-#define TCY_ON 0x01 /* invoke cyclic handler */
-#define TCY_INT 0x02 /* initialize cycle count */
-
-/*
- * Reference Cyclic Handler (ref_cyc) Structure
- */
-
-typedef struct t_rcyc {
- VP exinf; /* extended information */
- CYCTIME lfttim; /* time left before next handler startup */
- UINT cycact; /* cyclic handler activation */
- /* additional information may be included depending on the implementation */
-} T_RCYC;
-
-/*
- * Define Alarm (def_alm) Structure
- */
-
-typedef struct t_dalm {
- VP exinf; /* extended information */
- ATR almatr; /* alarm handler attributes */
- FP almhdr; /* alarm handler address */
- UINT tmmode; /* start time specification mode */
- ALMTIME almtim; /* handler startup time */
-} T_DALM;
-
-/*
- * tmmode
- */
-
-#define TTM_ABS 0x00 /* specified as an absolute time */
-#define TTM_REL 0x01 /* specified as a relative time */
-
-/*
- * Reference Alarm (ref_alm) Structure
- */
-
-typedef struct t_ralm {
- VP exinf; /* extended information */
- ALMTIME lfttim; /* time left before next handler startup */
- /* additional information may be included depending on the implementation */
-} T_RALM;
-
-/*
- * Time Management Functions
- */
-
-/*
- * set_tim - Set System Clock
- */
-
-ER set_tim(
- SYSTIME *pk_tim
-);
-
-/*
- * get_tim - Get System Clock
- */
-
-ER get_tim(
- SYSTIME *pk_tim
-);
-
-/*
- * dly_tsk - Delay Task
- */
-
-ER dly_tsk(
- DLYTIME dlytim
-);
-
-/*
- * def_cyc - Define Cyclic Handler
- */
-
-ER def_cyc(
- HNO cycno,
- T_DCYC *pk_dcyc
-);
-
-/*
- * act_cyc - Activate Cyclic Handler
- */
-
-ER act_cyc(
- HNO cycno,
- UINT cycact
-);
-
-/*
- * ref_cyc - Reference Cyclic Handler Status
- */
-
-ER ref_cyc(
- T_RCYC *pk_rcyc,
- HNO cycno
-);
-
-/*
- * def_alm - Define Alarm Handler
- */
-
-ER def_alm(
- HNO almno,
- T_DALM *pk_dalm
-);
-
-/*
- * ref_alm - Reference Alarm Handler Status
- */
-
-ER ref_alm(
- T_RALM *pk_ralm,
- HNO almno
-);
-
-/*
- * ret_tmr - Return from Timer Handler
- */
-
-void ret_tmr( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/itron/include/itronsys/types.h b/cpukit/itron/include/itronsys/types.h
deleted file mode 100644
index 27a701fa47..0000000000
--- a/cpukit/itron/include/itronsys/types.h
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __ITRON_TYPES_h_
-#define __ITRON_TYPES_h_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* XXX some of these may need to be moved */
-/*
- * XXX: These names are too short and conflict with numerous
- * off the shell programs including paranoia.
- */
-
-typedef signed8 B; /* signed 8-bit integer */
-typedef signed16 H; /* signed 16-bit integer */
-typedef signed32 W; /* signed 32-bit integer */
-typedef unsigned8 UB; /* unsigned 8-bit integer */
-typedef unsigned16 UH; /* unsigned 16-bit integer */
-typedef unsigned32 UW; /* unsigned 32-bit integer */
-
-typedef unsigned32 VW; /* unpredictable data type (32-bit size) */
-typedef unsigned16 VH; /* unpredictable data type (16-bit size) */
-typedef unsigned8 VB; /* unpredictable data type (8-bit size) */
-
-typedef void *VP; /* pointer to an unpredictable data type */
-
-typedef void (*FP)(); /* program start address */
-
-/*
- * 6.4 Data Types
- *
- * The difference between VB, VH and VW and B, H and W is that only the
- * number of bits is known for the former, not the data type of the
- * contents. The latter clearly represent integers.
- */
-
-/*
- * Data Types Dependent on ITRON Specification
- *
- * In order to clarify the meanings of certain parameters, the
- * following names are used for data types which appear frequently
- * and/or have special meanings.
- */
-
-typedef signed32 INT; /* Signed integer (bit width of processor) */
-typedef unsigned32 UINT; /* Unsigned integer (bit width of processor) */
-typedef boolean BOOL; /* Boolean value. TRUE (1) or FALSE (0). */
-typedef signed16 FN; /* Function code. Signed integer. Maximum 2 bytes. */
-typedef int ID; /* Object ID number (???id) */
- /* Value range depends on the system. Usually */
- /* a signed integer. Certain ID values may */
- /* represent objects on other nodes when the */
- /* connection function is supported. */
-
-typedef unsigned32 BOOL_ID;/* Boolean value or ID number */
-
-typedef signed32 HNO; /* Handler number */
-typedef signed32 RNO; /* Rendezvous number */
-typedef signed32 NODE; /* Node Number. Usually a signed integer. */
-typedef signed32 ATR; /* Object or handler attribute. */
- /* An unsigned integer. */
-typedef signed32 ER; /* Error code. A signed integer. */
-typedef unsigned32 PRI; /* Task priority. A signed integer. */
-typedef signed32 TMO; /* Timeout value. A signed integer. */
- /* TMO_POL = 0 indicates polling, */
- /* while TMO_FEVR = -1 indicates wait forever. */
-
-/*
- * 6.6 Common Constants and Data Structure Packet Formats
- */
-
-#define NADR (-1) /* invalid address or pointer value */
-
-#ifndef TRUE
-#define TRUE 1 /* true */
-#endif
-
-#ifndef FALSE
-#define FALSE 0 /* false */
-#endif
-
-/*
- * ATR tskatr, intatr, cycatr, almatr, svcatr, excatr:
- *
- * TA_ASM indicates that the task or handler is directly started
- * at the assembly language level. The TA_ASM attribute has the
- * opposite meaning of TA_HLNG.
- *
- * NOTE: Really in <itronsys/task.h>
- */
-
-#if 0
-#define TA_ASM 0x00 /* program written in assembly language */
-#define TA_HLNG 0x01 /* program written in high-level language */
-#endif
-
-/*
- * TMO tmout:
- */
-
-#define TMO_POL 0 /* polling */
-#define TMO_FEVR (-1) /* wait forever */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/itron/include/itronsys/vmempool.h b/cpukit/itron/include/itronsys/vmempool.h
deleted file mode 100644
index fbb2f1e2b8..0000000000
--- a/cpukit/itron/include/itronsys/vmempool.h
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __ITRON_VARIABLE_MEMORYPOOL_h_
-#define __ITRON_VARIABLE_MEMORYPOOL_h_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Create Variable Memory Pool (cre_mpl) Structure
- */
-
-typedef struct t_cmpl {
- VP exinf; /* extended information */
- ATR mplatr; /* memorypool attributes */
- INT mplsz; /* memorypool size */
- /* additional information may be included depending on the implementation */
-} T_CMPL;
-
-/*
- * mplatr
- */
-
-#define TA_TFIFO 0x00 /* waiting tasks are handled by FIFO */
-#define TA_TPRI 0x01 /* waiting tasks are handled by priority */
-
-/*
- * mplid
- */
-
-#define TMPL_OS (-4) /* memorypool used by OS */
-
-/*
- * Reference Variable Memory Pool (ref_mpl) Structure
- */
-
-typedef struct t_rmpl {
- VP exinf; /* extended information */
- BOOL_ID wtsk; /* indicates whether or not there are waiting tasks */
- INT frsz; /* total size of free memory */
- INT maxsz; /* size of largest contiguous memory */
- /* additional information may be included depending on the implementation */
-} T_RMPL;
-
-/*
- * Variable Memory Pool Functions
- */
-
-/*
- * cre_mpl - Create Variable-Size Memorypool
- */
-
-ER cre_mpl(
- ID mplid,
- T_CMPL *pk_cmpl
-);
-
-/*
- * del_mpl - Delete Variable-Size Memorypool
- */
-
-ER del_mpl(
- ID mplid
-);
-
-/*
- * get_blk - Get Variable-Size Memory Block
- */
-
-ER get_blk(
- VP *p_blk,
- ID mplid,
- INT blksz
-);
-
-/*
- * pget_blk - Poll and Get Variable-Size Memory Block
- */
-
-ER pget_blk(
- VP *p_blk,
- ID mplid,
- INT blksz
-);
-
-/*
- * tget_blk - Get Variable-Size Memory Block with Timeout
- */
-
-ER tget_blk(
- VP *p_blk,
- ID mplid,
- INT blksz,
- TMO tmout
-);
-
-/*
- * rel_blk - Release Variable-Size Memory Block
- */
-
-ER rel_blk(
- ID mplid,
- VP blk
-);
-
-/*
- * ref_mpl - Reference Variable-Size Memorypool Status
- */
-
-ER ref_mpl(
- T_RMPL *pk_rmpl,
- ID mplid
-);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/itron/include/rtems/itron/README b/cpukit/itron/include/rtems/itron/README
deleted file mode 100644
index 9ac3bf3417..0000000000
--- a/cpukit/itron/include/rtems/itron/README
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# $Id$
-#
-
-This directory contains the private interface of each manager.
-These files should only be included from the from the
-implementation of each manager.
-
-The public header file for each ITRON manager is in
-../../../tronsys. \ No newline at end of file
diff --git a/cpukit/itron/include/rtems/itron/config.h b/cpukit/itron/include/rtems/itron/config.h
deleted file mode 100644
index 9b7b84709d..0000000000
--- a/cpukit/itron/include/rtems/itron/config.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* config.h
- *
- * This include file contains the table of user defined configuration
- * parameters specific for the ITRON API.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_ITRON_CONFIGURATION_h
-#define __RTEMS_ITRON_CONFIGURATION_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * XXX
- *
- * The following records define the Configuration Table. The
- * information contained in this table is required in all
- * RTEMS systems, whether single or multiprocessor. This
- * table primarily defines the following:
- *
- * + required number of each object type
- */
-
-/*
- * For now, we are only allowing the user to specify the entry point
- * and stack size for ITRON initialization threads.
- */
-
-typedef struct {
- ID id;
- T_CTSK attributes;
-} itron_initialization_tasks_table;
-
-typedef struct {
- int maximum_tasks;
- int maximum_semaphores;
- int maximum_eventflags;
- int maximum_mailboxes;
- int maximum_message_buffers;
- int maximum_ports;
- int maximum_memory_pools;
- int maximum_fixed_memory_pools;
- int number_of_initialization_tasks;
- itron_initialization_tasks_table *User_initialization_tasks_table;
-} itron_api_configuration_table;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/itron/include/rtems/itron/eventflags.h b/cpukit/itron/include/rtems/itron/eventflags.h
deleted file mode 100644
index 1c709be752..0000000000
--- a/cpukit/itron/include/rtems/itron/eventflags.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_ITRON_EVENTFLAGS_h_
-#define __RTEMS_ITRON_EVENTFLAGS_h_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/itron/object.h>
-
-/*
- * The following defines the control block used to manage each event flag.
- */
-
-typedef struct {
- ITRON_Objects_Control Object;
- unsigned32 XXX_more_stuff_goes_here;
-} ITRON_Eventflags_Control;
-
-/*
- * The following defines the information control block used to manage
- * this class of objects.
- */
-
-ITRON_EXTERN Objects_Information _ITRON_Eventflags_Information;
-
-/*
- * _ITRON_Eventflags_Manager_initialization
- *
- * DESCRIPTION:
- *
- * This routine performs the initialization necessary for this manager.
- */
-
-void _ITRON_Eventflags_Manager_initialization(
- unsigned32 maximum_eventflags
-);
-
-/*
- * XXX insert private stuff here
- */
-
-#include <rtems/itron/eventflags.inl>
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/itron/include/rtems/itron/fmempool.h b/cpukit/itron/include/rtems/itron/fmempool.h
deleted file mode 100644
index 221d376d1e..0000000000
--- a/cpukit/itron/include/rtems/itron/fmempool.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_ITRON_FIXED_MEMORYPOOL_h_
-#define __RTEMS_ITRON_FIXED_MEMORYPOOL_h_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/itron/object.h>
-
-/*
- * The following defines the control block used to manage each
- * fixed memory pool.
- */
-
-typedef struct {
- ITRON_Objects_Control Object;
- unsigned32 XXX_more_stuff_goes_here;
-} ITRON_Fixed_memory_pool_Control;
-
-/*
- * The following defines the information control block used to manage
- * this class of objects.
- */
-
-ITRON_EXTERN Objects_Information _ITRON_Fixed_memory_pool_Information;
-
-/*
- * _ITRON_Fixed_memory_pool_Manager_initialization
- *
- * DESCRIPTION:
- *
- * This routine performs the initialization necessary for this manager.
- */
-
-void _ITRON_Fixed_memory_pool_Manager_initialization(
- unsigned32 maximum_fixed_memory_pools
-);
-
-/*
- * XXX insert private stuff here
- */
-
-#include <rtems/itron/fmempool.inl>
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/itron/include/rtems/itron/intr.h b/cpukit/itron/include/rtems/itron/intr.h
deleted file mode 100644
index 514b9198fe..0000000000
--- a/cpukit/itron/include/rtems/itron/intr.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_ITRON_INTERRUPT_h_
-#define __RTEMS_ITRON_INTERRUPT_h_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * XXX insert private stuff here
- */
-
-#include <rtems/itron/intr.inl>
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/itron/include/rtems/itron/itronapi.h b/cpukit/itron/include/rtems/itron/itronapi.h
deleted file mode 100644
index 775813d2f4..0000000000
--- a/cpukit/itron/include/rtems/itron/itronapi.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * ITRON API Support
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __ITRON_API_h
-#define __ITRON_API_h
-
-#include <rtems/config.h>
-
-/*
- * _ITRON_API_Initialize
- *
- * Initialize the ITRON API.
- */
-
-void _ITRON_API_Initialize(
- rtems_configuration_table *configuration_table
-);
-
-#endif
-/* end of include file */
diff --git a/cpukit/itron/include/rtems/itron/mbox.h b/cpukit/itron/include/rtems/itron/mbox.h
deleted file mode 100644
index 8f240ee8ce..0000000000
--- a/cpukit/itron/include/rtems/itron/mbox.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_ITRON_MBOX_h_
-#define __RTEMS_ITRON_MBOX_h_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/itron/object.h>
-#include <rtems/score/coremsg.h>
-
-/*
- * The following defines the control block used to manage each mailbox.
- */
-
-typedef struct {
- ITRON_Objects_Control Object;
- unsigned32 count;
- boolean do_message_priority;
- CORE_message_queue_Control message_queue;
-} ITRON_Mailbox_Control;
-
-/*
- * The following defines the information control block used to manage
- * this class of objects.
- */
-
-ITRON_EXTERN Objects_Information _ITRON_Mailbox_Information;
-
-/*
- * _ITRON_Mailbox_Manager_initialization
- *
- * DESCRIPTION:
- *
- * This routine performs the initialization necessary for this manager.
- */
-
-void _ITRON_Mailbox_Manager_initialization(
- unsigned32 maximum_mailboxes
-);
-
-/*
- * _ITRON_Mailbox_Translate_core_message_queue_return_code
- *
- * DESCRIPTION:
- *
- * This routine translates a core message queue object status
- * into the appropriate ITRON status code.
- */
-
-ER _ITRON_Mailbox_Translate_core_message_queue_return_code(
- CORE_message_queue_Status status
-);
-
-#include <rtems/itron/mbox.inl>
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/itron/include/rtems/itron/msgbuffer.h b/cpukit/itron/include/rtems/itron/msgbuffer.h
deleted file mode 100644
index 4b3192af79..0000000000
--- a/cpukit/itron/include/rtems/itron/msgbuffer.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_ITRON_MESSAGEBUFFER_h_
-#define __RTEMS_ITRON_MESSAGEBUFFER_h_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/itron/object.h>
-#include <rtems/score/coremsg.h>
-
-/*
- * The following defines the control block used to manage each
- * message buffer.
- */
-
-typedef struct {
- ITRON_Objects_Control Object;
- boolean is_priority_blocking;
- CORE_message_queue_Control message_queue;
-} ITRON_Message_buffer_Control;
-
-/*
- * The following defines the information control block used to manage
- * this class of objects.
- */
-
-ITRON_EXTERN Objects_Information _ITRON_Message_buffer_Information;
-
-/*
- * _ITRON_Message_buffer_Manager_initialization
- *
- * DESCRIPTION:
- *
- * This routine performs the initialization necessary for this manager.
- */
-
-void _ITRON_Message_buffer_Manager_initialization(
- unsigned32 maximum_message_buffers
-);
-
-/*
- * _ITRON_Message_buffer_Translate_core_message_buffer_return_code
- *
- * DESCRIPTION:
- *
- * This routine translates a core message buffer object status
- * into the appropriate ITRON status code.
- */
-
-ER _ITRON_Message_buffer_Translate_core_message_buffer_return_code(
- CORE_message_queue_Status status
-);
-
-#include <rtems/itron/msgbuffer.inl>
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/itron/include/rtems/itron/network.h b/cpukit/itron/include/rtems/itron/network.h
deleted file mode 100644
index 6889cf41fa..0000000000
--- a/cpukit/itron/include/rtems/itron/network.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_ITRON_NETWORK_h_
-#define __RTEMS_ITRON_NETWORK_h_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * XXX insert private stuff here
- */
-
-#include <rtems/itron/network.inl>
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/itron/include/rtems/itron/object.h b/cpukit/itron/include/rtems/itron/object.h
deleted file mode 100644
index 77c1c5e47f..0000000000
--- a/cpukit/itron/include/rtems/itron/object.h
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_ITRON_OBJECT_h_
-#define __RTEMS_ITRON_OBJECT_h_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/object.h>
-
-typedef Objects_Control ITRON_Objects_Control;
-
-/*
- * Maximum length of an ITRON object name
- *
- * NOTE: Since ITRON objects do not have names, then then length is 0.
- */
-
-#define ITRON_MAXIMUM_NAME_LENGTH 0
-
-/*
- * _ITRON_Objects_Open
- *
- * Make this ITRON object visible to the system.
- *
- * NOTE: This macro hides the fact that ITRON objects don't have names.
- */
-
-#define _ITRON_Objects_Open( _the_information, _the_object ) \
- _Objects_Open( (_the_information), (_the_object), NULL )
-
-/*
- * _ITRON_Objects_Close
- *
- * Make this ITRON object invisible from the system. Usually used as
- * the first step of deleting an object.
- */
-
-#define _ITRON_Objects_Close( _the_information, _the_object ) \
- _Objects_Close( (_the_information), (_the_object) )
-
-/*
- * _ITRON_Objects_Allocate_by_index
- *
- * Allocate the ITRON object specified by "_id". The ITRON id is the
- * index portion of the traditional RTEMS ID. The Classic and POSIX
- * APIs do not require that a specific object be allocated.
- */
-
-#define _ITRON_Objects_Allocate_by_index( _the_information, _id, _sizeof ) \
- _Objects_Allocate_by_index( (_the_information), (_id), (_sizeof) )
-
-/*
- * _ITRON_Objects_Clarify_allocation_id_error
- *
- * This function is invoked when an object allocation ID error
- * occurs to determine the specific ITRON error code to return.
- */
-
-#define _ITRON_Objects_Clarify_allocation_id_error( _the_information, _id ) \
- (((_id) < -4) ? E_OACV : /* attempt to access a "system object" */ \
- ((_id) <= 0) ? E_ID : /* bogus index of 0 - -3 */ \
- ((_id) <= (_the_information)->maximum) ? E_OBJ : /* object is in use */ \
- E_ID) /* simply a bad id */
-
-/*
- * _ITRON_Objects_Clarify_get_id_error
- *
- * This function is invoked when an object get ID error
- * occurs to determine the specific ITRON error code to return.
- */
-
-#define _ITRON_Objects_Clarify_get_id_error( _the_information, _id ) \
- (((_id) < -4) ? E_OACV : /* attempt to access a "system object" */ \
- ((_id) <= 0) ? E_ID : /* bogus index of 0 - -3 */ \
- ((_id) <= (_the_information)->maximum) ? E_NOEXS : /* does not exist */ \
- E_ID) /* simply a bad id */
-
-
-/*
- * _ITRON_Objects_Free
- *
- * Free this ITRON object to the pool of inactive objects. This
- * operation is the same as for the Classic and POSIX APIs.
- */
-
-#define _ITRON_Objects_Free( _the_information, _the_object ) \
- _Objects_Free( (_the_information), (_the_object) )
-
-
-/*
- * _ITRON_Objects_Get
- *
- * Obtain (get) the pointer to the control block for the object
- * specified by "id". The ITRON id passed in here is simply
- * the "index" portion of the traditional RTEMS ID. This
- * requires that this operation be slightly different
- * from the object get used by the Classic and POSIX APIs.
- */
-
-#define _ITRON_Objects_Get( _the_information, _id, _the_object ) \
- _Objects_Get( (_the_information), (_id), (_the_object) )
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/itron/include/rtems/itron/port.h b/cpukit/itron/include/rtems/itron/port.h
deleted file mode 100644
index f8e17c630f..0000000000
--- a/cpukit/itron/include/rtems/itron/port.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_ITRON_PORT_h_
-#define __RTEMS_ITRON_PORT_h_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/itron/object.h>
-
-/*
- * The following defines the control block used to manage each port.
- */
-
-typedef struct {
- ITRON_Objects_Control Object;
- unsigned32 XXX_more_stuff_goes_here;
-} ITRON_Port_Control;
-
-/*
- * The following defines the information control block used to manage
- * this class of objects.
- */
-
-ITRON_EXTERN Objects_Information _ITRON_Port_Information;
-
-/*
- * _ITRON_Port_Manager_initialization
- *
- * DESCRIPTION:
- *
- * This routine performs the initialization necessary for this manager.
- */
-
-void _ITRON_Port_Manager_initialization(
- unsigned32 maximum_ports
-);
-
-/*
- * XXX insert private stuff here
- */
-
-#include <rtems/itron/port.inl>
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/itron/include/rtems/itron/semaphore.h b/cpukit/itron/include/rtems/itron/semaphore.h
deleted file mode 100644
index f9c327bba4..0000000000
--- a/cpukit/itron/include/rtems/itron/semaphore.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_ITRON_SEMAPHORE_h_
-#define __RTEMS_ITRON_SEMAPHORE_h_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/itron/object.h>
-#include <rtems/score/coresem.h>
-
-/*
- * The following defines the control block used to manage each semaphore.
- */
-
-typedef struct {
- ITRON_Objects_Control Object;
- boolean is_priority_blocking;
- CORE_semaphore_Control semaphore;
-} ITRON_Semaphore_Control;
-
-/*
- * The following defines the information control block used to manage
- * this class of objects.
- */
-
-ITRON_EXTERN Objects_Information _ITRON_Semaphore_Information;
-
-/*
- * _ITRON_Semaphore_Manager_initialization
- *
- * DESCRIPTION:
- *
- * This routine performs the initialization necessary for this manager.
- */
-
-void _ITRON_Semaphore_Manager_initialization(
- unsigned32 maximum_semaphores
-);
-
-#include <rtems/itron/semaphore.inl>
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/itron/include/rtems/itron/sysmgmt.h b/cpukit/itron/include/rtems/itron/sysmgmt.h
deleted file mode 100644
index f6cea9a693..0000000000
--- a/cpukit/itron/include/rtems/itron/sysmgmt.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_ITRON_TIME_h_
-#define __RTEMS_ITRON_TIME_h_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * XXX insert private stuff here
- */
-
-#include <rtems/itron/sysmgmt.inl>
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/itron/include/rtems/itron/task.h b/cpukit/itron/include/rtems/itron/task.h
deleted file mode 100644
index 3d8d0aa8f5..0000000000
--- a/cpukit/itron/include/rtems/itron/task.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_ITRON_TASK_h_
-#define __RTEMS_ITRON_TASK_h_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/itron/object.h>
-#include <rtems/itron/config.h>
-#include <rtems/score/thread.h>
-
-/*
- * This macro evaluates to TRUE if there should be a "context error."
- * This is defined as a blocking directive being issed from
- * task-independent portions or a task in dispatch disabled state.
- *
- * NOTE: Dispatching is disabled in interrupts so this should cover
- * both cases.
- */
-
-#define _ITRON_Is_in_non_task_state() \
- (_Thread_Dispatch_disable_level != 0)
-
-/*
- * This is the API specific information required by each thread for
- * the ITRON API to function correctly.
- */
-
-
-typedef struct {
- unsigned32 unused; /* no use for the API extension */
- /* structure for ITRON identified yet */
-} ITRON_API_Control;
-
-/*
- * The following defines the information control block used to
- * manage this class of objects.
- */
-
-ITRON_EXTERN Objects_Information _ITRON_Task_Information;
-
-/*
- * These are used to manage the user initialization tasks.
- */
-
-ITRON_EXTERN itron_initialization_tasks_table
- *_ITRON_Task_User_initialization_tasks;
-ITRON_EXTERN unsigned32 _ITRON_Task_Number_of_initialization_tasks;
-
-
-/*
- * _ITRON_Task_Manager_initialization
- *
- * This routine initializes the ITRON Task Manager.
- */
-
-void _ITRON_Task_Manager_initialization(
- unsigned32 maximum_tasks,
- unsigned32 number_of_initialization_tasks,
- itron_initialization_tasks_table *user_tasks
-);
-
-/*
- *
- * _ITRON_Delete_task
- */
-
-ER _ITRON_Delete_task(
- Thread_Control *the_thread
-);
-
-/* XXX remove the need for this. Enable dispatch should not be hidden */
-
-#define _ITRON_return_errorno( _errno ) \
-do { \
- _Thread_Enable_dispatch(); \
- return _errno; \
-} while (0);
-
-
-#ifndef __RTEMS_APPLICATION__
-#include <rtems/itron/task.inl>
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/itron/include/rtems/itron/time.h b/cpukit/itron/include/rtems/itron/time.h
deleted file mode 100644
index f13bd2d981..0000000000
--- a/cpukit/itron/include/rtems/itron/time.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_ITRON_TIME_h_
-#define __RTEMS_ITRON_TIME_h_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * XXX insert private stuff here
- */
-
-#include <rtems/itron/time.inl>
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/itron/include/rtems/itron/vmempool.h b/cpukit/itron/include/rtems/itron/vmempool.h
deleted file mode 100644
index 35db087da8..0000000000
--- a/cpukit/itron/include/rtems/itron/vmempool.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_ITRON_VARIABLE_MEMORYPOOL_h_
-#define __RTEMS_ITRON_VARIABLE_MEMORYPOOL_h_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/itron/object.h>
-
-/*
- * The following defines the control block used to manage each variable
- * memory pool.
- */
-
-typedef struct {
- ITRON_Objects_Control Object;
- unsigned32 XXX_more_stuff_goes_here;
-} ITRON_Variable_memory_pool_Control;
-
-/*
- * The following defines the information control block used to manage
- * this class of objects.
- */
-
-ITRON_EXTERN Objects_Information _ITRON_Variable_memory_pool_Information;
-
-/*
- * _ITRON_Variable_memory_pool_Manager_initialization
- *
- * DESCRIPTION:
- *
- * This routine performs the initialization necessary for this manager.
- */
-
-void _ITRON_Variable_memory_pool_Manager_initialization(
- unsigned32 maximum_variable_memory_pools
-);
-
-/*
- * XXX insert private stuff here
- */
-
-#include <rtems/itron/vmempool.inl>
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/itron/inline/Makefile.am b/cpukit/itron/inline/Makefile.am
deleted file mode 100644
index 32269fcdcd..0000000000
--- a/cpukit/itron/inline/Makefile.am
+++ /dev/null
@@ -1,10 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-SUBDIRS = rtems
-
-include $(top_srcdir)/../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/cpukit/itron/inline/rtems/itron/eventflags.inl b/cpukit/itron/inline/rtems/itron/eventflags.inl
deleted file mode 100644
index b4d8416714..0000000000
--- a/cpukit/itron/inline/rtems/itron/eventflags.inl
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __ITRON_EVENTFLAGS_inl_
-#define __ITRON_EVENTFLAGS_inl_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * _ITRON_Eventflags_Allocate
- *
- * DESCRIPTION:
- *
- * This routine allocates the eventflags associated with the specified
- * eventflags ID from the pool of inactive eventflagss.
- *
- * Input parameters:
- * flgid - id of eventflags to allocate
- * status - pointer to status variable
- *
- * Output parameters:
- * returns - pointer to the eventflags control block
- * *status - status
- */
-
-RTEMS_INLINE_ROUTINE ITRON_Eventflags_Control *_ITRON_Eventflags_Allocate(
- ID flgid
-)
-{
- return (ITRON_Eventflags_Control *)_ITRON_Objects_Allocate_by_index(
- &_ITRON_Eventflags_Information,
- flgid,
- sizeof(ITRON_Eventflags_Control)
- );
-}
-
-/*
- * _ITRON_Eventflags_Clarify_allocation_id_error
- *
- * This function is invoked when an object allocation ID error
- * occurs to determine the specific ITRON error code to return.
- */
-
-#define _ITRON_Eventflags_Clarify_allocation_id_error( _id ) \
- _ITRON_Objects_Clarify_allocation_id_error( \
- &_ITRON_Eventflags_Information, (_id) )
-
-/*
- * _ITRON_Eventflags_Clarify_get_id_error
- *
- * This function is invoked when an object get ID error
- * occurs to determine the specific ITRON error code to return.
- */
-
-#define _ITRON_Eventflags_Clarify_get_id_error( _id ) \
- _ITRON_Objects_Clarify_get_id_error( &_ITRON_Eventflags_Information, (_id) )
-
-/*
- * _ITRON_Eventflags_Free
- *
- * DESCRIPTION:
- *
- * This routine frees a eventflags control block to the
- * inactive chain of free eventflags control blocks.
- *
- * Input parameters:
- * the_eventflags - pointer to eventflags control block
- *
- * Output parameters: NONE
- */
-
-RTEMS_INLINE_ROUTINE void _ITRON_Eventflags_Free (
- ITRON_Eventflags_Control *the_eventflags
-)
-{
- _ITRON_Objects_Free( &_ITRON_Eventflags_Information, &the_eventflags->Object );
-}
-
-/*PAGE
- *
- * _ITRON_Eventflags_Get
- *
- * DESCRIPTION:
- *
- * This function maps eventflags IDs to eventflags control blocks.
- * If ID corresponds to a local eventflags, then it returns
- * the_eventflags control pointer which maps to ID and location
- * is set to OBJECTS_LOCAL. if the eventflags ID is global and
- * resides on a remote node, then location is set to OBJECTS_REMOTE,
- * and the_eventflags is undefined. Otherwise, location is set
- * to OBJECTS_ERROR and the_eventflags is undefined.
- *
- * Input parameters:
- * id - ITRON eventflags ID.
- * the_location - pointer to a location variable
- *
- * Output parameters:
- * *the_location - location of the object
- */
-
-RTEMS_INLINE_ROUTINE ITRON_Eventflags_Control *_ITRON_Eventflags_Get (
- ID id,
- Objects_Locations *location
-)
-{
- return (ITRON_Eventflags_Control *)
- _ITRON_Objects_Get( &_ITRON_Eventflags_Information, id, location );
-}
-
-/*PAGE
- *
- * _ITRON_Eventflags_Is_null
- *
- * This function returns TRUE if the_eventflags is NULL and FALSE otherwise.
- *
- * Input parameters:
- * the_eventflags - pointer to eventflags control block
- *
- * Output parameters:
- * TRUE - if the_eventflags is NULL
- * FALSE - otherwise
- */
-
-RTEMS_INLINE_ROUTINE boolean _ITRON_Eventflags_Is_null (
- ITRON_Eventflags_Control *the_eventflags
-)
-{
- return ( the_eventflags == NULL );
-}
-
-/*
- * XXX insert inline routines here
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/itron/inline/rtems/itron/fmempool.inl b/cpukit/itron/inline/rtems/itron/fmempool.inl
deleted file mode 100644
index 9709edfd95..0000000000
--- a/cpukit/itron/inline/rtems/itron/fmempool.inl
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __ITRON_FIXED_MEMORY_POOL_inl_
-#define __ITRON_FIXED_MEMORY_POOL_inl_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * _ITRON_Fixed_memory_pool_Allocate
- *
- * DESCRIPTION:
- *
- * This routine allocates the fixed_memory_pool associated with the specified
- * fixed_memory_pool ID from the pool of inactive fixed_memory_pools.
- *
- * Input parameters:
- * mpfid - id of fixed_memory_pool to allocate
- * status - pointer to status variable
- *
- * Output parameters:
- * returns - pointer to the fixed_memory_pool control block
- * *status - status
- */
-
-RTEMS_INLINE_ROUTINE ITRON_Fixed_memory_pool_Control
- *_ITRON_Fixed_memory_pool_Allocate(
- ID mpfid
-)
-{
- return (ITRON_Fixed_memory_pool_Control *)_ITRON_Objects_Allocate_by_index(
- &_ITRON_Fixed_memory_pool_Information,
- mpfid,
- sizeof(ITRON_Fixed_memory_pool_Control)
- );
-}
-
-/*
- * _ITRON_Fixed_memory_pool_Clarify_allocation_id_error
- *
- * This function is invoked when an object allocation ID error
- * occurs to determine the specific ITRON error code to return.
- */
-
-#define _ITRON_Fixed_memory_pool_Clarify_allocation_id_error( _id ) \
- _ITRON_Objects_Clarify_allocation_id_error( \
- &_ITRON_Fixed_memory_pool_Information, (_id) )
-
-/*
- * _ITRON_Fixed_memory_pool_Clarify_get_id_error
- *
- * This function is invoked when an object get ID error
- * occurs to determine the specific ITRON error code to return.
- */
-
-#define _ITRON_Fixed_memory_pool_Clarify_get_id_error( _id ) \
- _ITRON_Objects_Clarify_get_id_error( \
- &_ITRON_Fixed_memory_pool_Information, (_id) )
-
-/*
- * _ITRON_Fixed_memory_pool_Free
- *
- * DESCRIPTION:
- *
- * This routine frees a fixed_memory_pool control block to the
- * inactive chain of free fixed_memory_pool control blocks.
- *
- * Input parameters:
- * the_fixed_memory_pool - pointer to fixed_memory_pool control block
- *
- * Output parameters: NONE
- */
-
-RTEMS_INLINE_ROUTINE void _ITRON_Fixed_memory_pool_Free (
- ITRON_Fixed_memory_pool_Control *the_fixed_memory_pool
-)
-{
- _ITRON_Objects_Free(
- &_ITRON_Fixed_memory_pool_Information,
- &the_fixed_memory_pool->Object
- );
-}
-
-/*PAGE
- *
- * _ITRON_Fixed_memory_pool_Get
- *
- * DESCRIPTION:
- *
- * This function maps fixed memory pool IDs to control blocks.
- * If ID corresponds to a local fixed memory pool, then it returns
- * the_fixed memory pool control pointer which maps to ID and location
- * is set to OBJECTS_LOCAL. if the fixed memory pool ID is global and
- * resides on a remote node, then location is set to OBJECTS_REMOTE,
- * and the fixed memory pool is undefined. Otherwise, location is set
- * to OBJECTS_ERROR and the fixed memory pool is undefined.
- *
- * Input parameters:
- * id - ITRON fixed memory pool ID.
- * the_location - pointer to a location variable
- *
- * Output parameters:
- * *the_location - location of the object
- */
-
-RTEMS_INLINE_ROUTINE ITRON_Fixed_memory_pool_Control
- *_ITRON_Fixed_memory_pool_Get (
- ID id,
- Objects_Locations *location
-)
-{
- return (ITRON_Fixed_memory_pool_Control *)
- _ITRON_Objects_Get( &_ITRON_Fixed_memory_pool_Information, id, location );
-}
-
-/*PAGE
- *
- * _ITRON_Fixed_memory_pool_Is_null
- *
- * This function returns TRUE if the_fixed_memory_pool is NULL
- * and FALSE otherwise.
- *
- * Input parameters:
- * the_fixed_memory_pool - pointer to fixed_memory_pool control block
- *
- * Output parameters:
- * TRUE - if the_fixed_memory_pool is NULL
- * FALSE - otherwise
- */
-
-RTEMS_INLINE_ROUTINE boolean _ITRON_Fixed_memory_pool_Is_null (
- ITRON_Fixed_memory_pool_Control *the_fixed_memory_pool
-)
-{
- return ( the_fixed_memory_pool == NULL );
-}
-
-/*
- * XXX insert inline routines here
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/itron/inline/rtems/itron/intr.inl b/cpukit/itron/inline/rtems/itron/intr.inl
deleted file mode 100644
index 93c44eff00..0000000000
--- a/cpukit/itron/inline/rtems/itron/intr.inl
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __ITRON_INTERRUPT_inl_
-#define __ITRON_INTERRUPT_inl_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * XXX insert inline routines here
- */
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/itron/inline/rtems/itron/mbox.inl b/cpukit/itron/inline/rtems/itron/mbox.inl
deleted file mode 100644
index fa2f96848d..0000000000
--- a/cpukit/itron/inline/rtems/itron/mbox.inl
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __ITRON_MAILBOX_inl_
-#define __ITRON_MAILBOX_inl_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * _ITRON_Mailbox_Allocate
- *
- * DESCRIPTION:
- *
- * This routine allocates the mailbox associated with the specified
- * mailbox ID from the pool of inactive mailboxs.
- *
- * Input parameters:
- * mbxid - id of mailbox to allocate
- * status - pointer to status variable
- *
- * Output parameters:
- * returns - pointer to the mailbox control block
- * *status - status
- */
-
-RTEMS_INLINE_ROUTINE ITRON_Mailbox_Control *_ITRON_Mailbox_Allocate(
- ID mbxid
-)
-{
- return (ITRON_Mailbox_Control *)_ITRON_Objects_Allocate_by_index(
- &_ITRON_Mailbox_Information,
- mbxid,
- sizeof(ITRON_Mailbox_Control)
- );
-}
-
-/*
- * _ITRON_Mailbox_Clarify_allocation_id_error
- *
- * This function is invoked when an object allocation ID error
- * occurs to determine the specific ITRON error code to return.
- */
-
-#define _ITRON_Mailbox_Clarify_allocation_id_error( _id ) \
- _ITRON_Objects_Clarify_allocation_id_error( \
- &_ITRON_Mailbox_Information, (_id) )
-
-/*
- * _ITRON_Mailbox_Clarify_get_id_error
- *
- * This function is invoked when an object get ID error
- * occurs to determine the specific ITRON error code to return.
- */
-
-#define _ITRON_Mailbox_Clarify_get_id_error( _id ) \
- _ITRON_Objects_Clarify_get_id_error( &_ITRON_Mailbox_Information, (_id) )
-
-/*
- * _ITRON_Mailbox_Free
- *
- * DESCRIPTION:
- *
- * This routine frees a mailbox control block to the
- * inactive chain of free mailbox control blocks.
- *
- * Input parameters:
- * the_mailbox - pointer to mailbox control block
- *
- * Output parameters: NONE
- */
-
-RTEMS_INLINE_ROUTINE void _ITRON_Mailbox_Free (
- ITRON_Mailbox_Control *the_mailbox
-)
-{
- _ITRON_Objects_Free( &_ITRON_Mailbox_Information, &the_mailbox->Object );
-}
-
-/*PAGE
- *
- * _ITRON_Mailbox_Get
- *
- * DESCRIPTION:
- *
- * This function maps mailbox IDs to mailbox control blocks.
- * If ID corresponds to a local mailbox, then it returns
- * the_mailbox control pointer which maps to ID and location
- * is set to OBJECTS_LOCAL. if the mailbox ID is global and
- * resides on a remote node, then location is set to OBJECTS_REMOTE,
- * and the_mailbox is undefined. Otherwise, location is set
- * to OBJECTS_ERROR and the_mailbox is undefined.
- *
- * Input parameters:
- * id - ITRON mailbox ID.
- * the_location - pointer to a location variable
- *
- * Output parameters:
- * *the_location - location of the object
- */
-
-RTEMS_INLINE_ROUTINE ITRON_Mailbox_Control *_ITRON_Mailbox_Get (
- ID id,
- Objects_Locations *location
-)
-{
- return (ITRON_Mailbox_Control *)
- _ITRON_Objects_Get( &_ITRON_Mailbox_Information, id, location );
-}
-
-/*PAGE
- *
- * _ITRON_Mailbox_Is_null
- *
- * This function returns TRUE if the_mailbox is NULL and FALSE otherwise.
- *
- * Input parameters:
- * the_mailbox - pointer to mailbox control block
- *
- * Output parameters:
- * TRUE - if the_mailbox is NULL
- * FALSE - otherwise
- */
-
-RTEMS_INLINE_ROUTINE boolean _ITRON_Mailbox_Is_null (
- ITRON_Mailbox_Control *the_mailbox
-)
-{
- return ( the_mailbox == NULL );
-}
-
-/*
- * XXX insert inline routines here
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/itron/inline/rtems/itron/msgbuffer.inl b/cpukit/itron/inline/rtems/itron/msgbuffer.inl
deleted file mode 100644
index a8ac6e2aac..0000000000
--- a/cpukit/itron/inline/rtems/itron/msgbuffer.inl
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __ITRON_MESSAGE_BUFFER_inl_
-#define __ITRON_MESSAGE_BUFFER_inl_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * _ITRON_Message_buffer_Allocate
- *
- * DESCRIPTION:
- *
- * This routine allocates the message buffer associated with the specified
- * message buffer ID from the pool of inactive message buffers.
- *
- * Input parameters:
- * mbfid - id of message buffer to allocate
- * status - pointer to status variable
- *
- * Output parameters:
- * returns - pointer to the message buffer control block
- * *status - status
- */
-
-RTEMS_INLINE_ROUTINE ITRON_Message_buffer_Control
- *_ITRON_Message_buffer_Allocate(
- ID mbfid
-)
-{
- return (ITRON_Message_buffer_Control *)_ITRON_Objects_Allocate_by_index(
- &_ITRON_Message_buffer_Information,
- mbfid,
- sizeof(ITRON_Message_buffer_Control)
- );
-}
-
-/*
- * _ITRON_Message_buffer_Clarify_allocation_id_error
- *
- * This function is invoked when an object allocation ID error
- * occurs to determine the specific ITRON error code to return.
- */
-
-#define _ITRON_Message_buffer_Clarify_allocation_id_error( _id ) \
- _ITRON_Objects_Clarify_allocation_id_error( \
- &_ITRON_Message_buffer_Information, (_id) )
-
-/*
- * _ITRON_Message_buffer_Clarify_get_id_error
- *
- * This function is invoked when an object get ID error
- * occurs to determine the specific ITRON error code to return.
- */
-
-#define _ITRON_Message_buffer_Clarify_get_id_error( _id ) \
- _ITRON_Objects_Clarify_get_id_error( &_ITRON_Message_buffer_Information, (_id) )
-
-/*
- * _ITRON_Message_buffer_Free
- *
- * DESCRIPTION:
- *
- * This routine frees a message buffer control block to the
- * inactive chain of free message buffer control blocks.
- *
- * Input parameters:
- * the_message_buffer - pointer to message_buffer control block
- *
- * Output parameters: NONE
- */
-
-RTEMS_INLINE_ROUTINE void _ITRON_Message_buffer_Free (
- ITRON_Message_buffer_Control *the_message_buffer
-)
-{
- _ITRON_Objects_Free(
- &_ITRON_Message_buffer_Information,
- &the_message_buffer->Object
- );
-}
-
-/*PAGE
- *
- * _ITRON_Message_buffer_Get
- *
- * DESCRIPTION:
- *
- * This function maps message buffer IDs to message buffer control blocks.
- * If ID corresponds to a local message buffer, then it returns
- * the message buffer control pointer which maps to ID and location
- * is set to OBJECTS_LOCAL. if the message buffer ID is global and
- * resides on a remote node, then location is set to OBJECTS_REMOTE,
- * and the message buffer is undefined. Otherwise, location is set
- * to OBJECTS_ERROR and the message buffer is undefined.
- *
- * Input parameters:
- * id - ITRON message_buffer ID.
- * the_location - pointer to a location variable
- *
- * Output parameters:
- * *the_location - location of the object
- */
-
-RTEMS_INLINE_ROUTINE ITRON_Message_buffer_Control *_ITRON_Message_buffer_Get (
- ID id,
- Objects_Locations *location
-)
-{
- return (ITRON_Message_buffer_Control *)
- _ITRON_Objects_Get( &_ITRON_Message_buffer_Information, id, location );
-}
-
-/*PAGE
- *
- * _ITRON_Message_buffer_Is_null
- *
- * This function returns TRUE if the_message_buffer is NULL
- * and FALSE otherwise.
- *
- * Input parameters:
- * the_message_buffer - pointer to message buffer control block
- *
- * Output parameters:
- * TRUE - if the_message_buffer is NULL
- * FALSE - otherwise
- */
-
-RTEMS_INLINE_ROUTINE boolean _ITRON_Message_buffer_Is_null (
- ITRON_Message_buffer_Control *the_message_buffer
-)
-{
- return ( the_message_buffer == NULL );
-}
-
-/*
- * XXX insert inline routines here
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/itron/inline/rtems/itron/network.inl b/cpukit/itron/inline/rtems/itron/network.inl
deleted file mode 100644
index dd833bb079..0000000000
--- a/cpukit/itron/inline/rtems/itron/network.inl
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __ITRON_NETWORK_inl_
-#define __ITRON_NETWORK_inl_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * XXX insert inline routines here
- */
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/itron/inline/rtems/itron/port.inl b/cpukit/itron/inline/rtems/itron/port.inl
deleted file mode 100644
index 4593b38ca0..0000000000
--- a/cpukit/itron/inline/rtems/itron/port.inl
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __ITRON_PORT_inl_
-#define __ITRON_PORT_inl_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * _ITRON_Port_Allocate
- *
- * DESCRIPTION:
- *
- * This routine allocates the port associated with the specified
- * port ID from the pool of inactive ports.
- *
- * Input parameters:
- * porid - id of port to allocate
- * status - pointer to status variable
- *
- * Output parameters:
- * returns - pointer to the port control block
- * *status - status
- */
-
-RTEMS_INLINE_ROUTINE ITRON_Port_Control *_ITRON_Port_Allocate(
- ID porid
-)
-{
- return (ITRON_Port_Control *)_ITRON_Objects_Allocate_by_index(
- &_ITRON_Port_Information,
- porid,
- sizeof(ITRON_Port_Control)
- );
-}
-
-/*
- * _ITRON_Port_Clarify_allocation_id_error
- *
- * This function is invoked when an object allocation ID error
- * occurs to determine the specific ITRON error code to return.
- */
-
-#define _ITRON_Port_Clarify_allocation_id_error( _id ) \
- _ITRON_Objects_Clarify_allocation_id_error( \
- &_ITRON_Port_Information, (_id) )
-
-/*
- * _ITRON_Port_Clarify_get_id_error
- *
- * This function is invoked when an object get ID error
- * occurs to determine the specific ITRON error code to return.
- */
-
-#define _ITRON_Port_Clarify_get_id_error( _id ) \
- _ITRON_Objects_Clarify_get_id_error( &_ITRON_Port_Information, (_id) )
-
-/*
- * _ITRON_Port_Free
- *
- * DESCRIPTION:
- *
- * This routine frees a port control block to the
- * inactive chain of free port control blocks.
- *
- * Input parameters:
- * the_port - pointer to port control block
- *
- * Output parameters: NONE
- */
-
-RTEMS_INLINE_ROUTINE void _ITRON_Port_Free (
- ITRON_Port_Control *the_port
-)
-{
- _ITRON_Objects_Free( &_ITRON_Port_Information, &the_port->Object );
-}
-
-/*PAGE
- *
- * _ITRON_Port_Get
- *
- * DESCRIPTION:
- *
- * This function maps port IDs to port control blocks.
- * If ID corresponds to a local port, then it returns
- * the_port control pointer which maps to ID and location
- * is set to OBJECTS_LOCAL. if the port ID is global and
- * resides on a remote node, then location is set to OBJECTS_REMOTE,
- * and the_port is undefined. Otherwise, location is set
- * to OBJECTS_ERROR and the_port is undefined.
- *
- * Input parameters:
- * id - ITRON port ID.
- * the_location - pointer to a location variable
- *
- * Output parameters:
- * *the_location - location of the object
- */
-
-RTEMS_INLINE_ROUTINE ITRON_Port_Control *_ITRON_Port_Get (
- ID id,
- Objects_Locations *location
-)
-{
- return (ITRON_Port_Control *)
- _ITRON_Objects_Get( &_ITRON_Port_Information, id, location );
-}
-
-/*PAGE
- *
- * _ITRON_Port_Is_null
- *
- * This function returns TRUE if the_port is NULL and FALSE otherwise.
- *
- * Input parameters:
- * the_port - pointer to port control block
- *
- * Output parameters:
- * TRUE - if the_port is NULL
- * FALSE - otherwise
- */
-
-RTEMS_INLINE_ROUTINE boolean _ITRON_Port_Is_null (
- ITRON_Port_Control *the_port
-)
-{
- return ( the_port == NULL );
-}
-
-/*
- * XXX insert inline routines here
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/itron/inline/rtems/itron/semaphore.inl b/cpukit/itron/inline/rtems/itron/semaphore.inl
deleted file mode 100644
index 0fb234bb6b..0000000000
--- a/cpukit/itron/inline/rtems/itron/semaphore.inl
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __ITRON_SEMAPHORE_inl_
-#define __ITRON_SEMAPHORE_inl_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * _ITRON_Semaphore_Allocate
- *
- * DESCRIPTION:
- *
- * This routine allocates the semaphore associated with the specified
- * semaphore ID from the pool of inactive semaphores.
- *
- * Input parameters:
- * semid - id of semaphore to allocate
- * status - pointer to status variable
- *
- * Output parameters:
- * returns - pointer to the semaphore control block
- * *status - status
- */
-
-RTEMS_INLINE_ROUTINE ITRON_Semaphore_Control *_ITRON_Semaphore_Allocate(
- ID semid
-)
-{
- return (ITRON_Semaphore_Control *)_ITRON_Objects_Allocate_by_index(
- &_ITRON_Semaphore_Information,
- semid,
- sizeof(ITRON_Semaphore_Control)
- );
-}
-
-/*
- * _ITRON_Semaphore_Clarify_allocation_id_error
- *
- * This function is invoked when an object allocation ID error
- * occurs to determine the specific ITRON error code to return.
- */
-
-#define _ITRON_Semaphore_Clarify_allocation_id_error( _id ) \
- _ITRON_Objects_Clarify_allocation_id_error( \
- &_ITRON_Semaphore_Information, (_id) )
-
-/*
- * _ITRON_Semaphore_Clarify_get_id_error
- *
- * This function is invoked when an object get ID error
- * occurs to determine the specific ITRON error code to return.
- */
-
-#define _ITRON_Semaphore_Clarify_get_id_error( _id ) \
- _ITRON_Objects_Clarify_get_id_error( &_ITRON_Semaphore_Information, (_id) )
-
-/*
- * _ITRON_Semaphore_Free
- *
- * DESCRIPTION:
- *
- * This routine frees a semaphore control block to the
- * inactive chain of free semaphore control blocks.
- *
- * Input parameters:
- * the_semaphore - pointer to semaphore control block
- *
- * Output parameters: NONE
- */
-
-RTEMS_INLINE_ROUTINE void _ITRON_Semaphore_Free (
- ITRON_Semaphore_Control *the_semaphore
-)
-{
- _ITRON_Objects_Free( &_ITRON_Semaphore_Information, &the_semaphore->Object );
-}
-
-/*PAGE
- *
- * _ITRON_Semaphore_Get
- *
- * DESCRIPTION:
- *
- * This function maps semaphore IDs to semaphore control blocks.
- * If ID corresponds to a local semaphore, then it returns
- * the_semaphore control pointer which maps to ID and location
- * is set to OBJECTS_LOCAL. if the semaphore ID is global and
- * resides on a remote node, then location is set to OBJECTS_REMOTE,
- * and the_semaphore is undefined. Otherwise, location is set
- * to OBJECTS_ERROR and the_semaphore is undefined.
- *
- * Input parameters:
- * id - ITRON semaphore ID.
- * the_location - pointer to a location variable
- *
- * Output parameters:
- * *the_location - location of the object
- */
-
-RTEMS_INLINE_ROUTINE ITRON_Semaphore_Control *_ITRON_Semaphore_Get (
- ID id,
- Objects_Locations *location
-)
-{
- return (ITRON_Semaphore_Control *)
- _ITRON_Objects_Get( &_ITRON_Semaphore_Information, id, location );
-}
-
-/*PAGE
- *
- * _ITRON_Semaphore_Is_null
- *
- * This function returns TRUE if the_semaphore is NULL and FALSE otherwise.
- *
- * Input parameters:
- * the_semaphore - pointer to semaphore control block
- *
- * Output parameters:
- * TRUE - if the_semaphore is NULL
- * FALSE - otherwise
- */
-
-RTEMS_INLINE_ROUTINE boolean _ITRON_Semaphore_Is_null (
- ITRON_Semaphore_Control *the_semaphore
-)
-{
- return ( the_semaphore == NULL );
-}
-
-/*
- * _ITRON_Semaphore_Translate_core_semaphore_return_code
- *
- * This function returns a ITRON status code based on the semaphore
- * status code specified.
- *
- * Input parameters:
- * the_semaphore_status - semaphore status code to translate
- *
- * Output parameters:
- * ITRON status code - translated ITRON status code
- *
- */
-
-RTEMS_INLINE_ROUTINE ER _ITRON_Semaphore_Translate_core_semaphore_return_code (
- unsigned32 the_semaphore_status
-)
-{
-/* XXX need to be able to return "E_RLWAI" */
- switch ( the_semaphore_status ) {
- case CORE_SEMAPHORE_STATUS_SUCCESSFUL:
- return E_OK;
- case CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT:
- return E_TMOUT;
- case CORE_SEMAPHORE_WAS_DELETED:
- return E_DLT;
- case CORE_SEMAPHORE_TIMEOUT:
- return E_TMOUT;
- case CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED:
- return E_QOVR;
- case THREAD_STATUS_PROXY_BLOCKING:
- return THREAD_STATUS_PROXY_BLOCKING;
- }
- return E_OK; /* unreached - only to remove warnings */
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/itron/inline/rtems/itron/sysmgmt.inl b/cpukit/itron/inline/rtems/itron/sysmgmt.inl
deleted file mode 100644
index 183232a785..0000000000
--- a/cpukit/itron/inline/rtems/itron/sysmgmt.inl
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __ITRON_TIME_inl_
-#define __ITRON_TIME_inl_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * XXX insert inline routines here
- */
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/itron/inline/rtems/itron/task.inl b/cpukit/itron/inline/rtems/itron/task.inl
deleted file mode 100644
index 37056e5d09..0000000000
--- a/cpukit/itron/inline/rtems/itron/task.inl
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __ITRON_TASK_inl_
-#define __ITRON_TASK_inl_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * _ITRON_Task_Allocate
- *
- * DESCRIPTION:
- *
- * This routine allocates the task associated with the specified
- * task ID from the pool of inactive tasks.
- *
- * Input parameters:
- * tskid - id of task to allocate
- * status - pointer to status variable
- *
- * Output parameters:
- * returns - pointer to the task control block
- * *status - status
- */
-
-RTEMS_INLINE_ROUTINE Thread_Control *_ITRON_Task_Allocate(
- ID tskid
-)
-{
- return (Thread_Control *)_ITRON_Objects_Allocate_by_index(
- &_ITRON_Task_Information,
- tskid,
- sizeof(Thread_Control)
- );
-}
-
-/*
- * _ITRON_Task_Clarify_allocation_id_error
- *
- * This function is invoked when an object allocation ID error
- * occurs to determine the specific ITRON error code to return.
- */
-
-#define _ITRON_Task_Clarify_allocation_id_error( _id ) \
- _ITRON_Objects_Clarify_allocation_id_error( \
- &_ITRON_Task_Information, (_id) )
-
-/*
- * _ITRON_Task_Clarify_get_id_error
- *
- * This function is invoked when an object get ID error
- * occurs to determine the specific ITRON error code to return.
- */
-
-#define _ITRON_Task_Clarify_get_id_error( _id ) \
- _ITRON_Objects_Clarify_get_id_error( &_ITRON_Task_Information, (_id) )
-
-/*
- * _ITRON_Task_Free
- *
- * DESCRIPTION:
- *
- * This routine frees a task control block to the
- * inactive chain of free task control blocks.
- *
- * Input parameters:
- * the_task - pointer to task control block
- *
- * Output parameters: NONE
- */
-
-RTEMS_INLINE_ROUTINE void _ITRON_Task_Free (
- Thread_Control *the_task
-)
-{
- _ITRON_Objects_Free( &_ITRON_Task_Information, &the_task->Object );
-}
-
-/*PAGE
- *
- * _ITRON_Task_Get
- *
- * DESCRIPTION:
- *
- * This function maps task IDs to task control blocks.
- * If ID corresponds to a local task, then it returns
- * the_task control pointer which maps to ID and location
- * is set to OBJECTS_LOCAL. if the task ID is global and
- * resides on a remote node, then location is set to OBJECTS_REMOTE,
- * and the_task is undefined. Otherwise, location is set
- * to OBJECTS_ERROR and the_task is undefined.
- *
- * Input parameters:
- * id - ITRON task ID.
- * the_location - pointer to a location variable
- *
- * Output parameters:
- * *the_location - location of the object
- */
-
-RTEMS_INLINE_ROUTINE Thread_Control *_ITRON_Task_Get (
- ID id,
- Objects_Locations *location
-)
-{
- if ( id == 0 ) {
- _Thread_Disable_dispatch();
- *location = OBJECTS_LOCAL;
- return _Thread_Executing;
- }
-
- return (Thread_Control *)
- _ITRON_Objects_Get( &_ITRON_Task_Information, id, location );
-}
-
-/*PAGE
- *
- * _ITRON_Task_Is_null
- *
- * This function returns TRUE if the_task is NULL and FALSE otherwise.
- *
- * Input parameters:
- * the_task - pointer to task control block
- *
- * Output parameters:
- * TRUE - if the_task is NULL
- * FALSE - otherwise
- */
-
-RTEMS_INLINE_ROUTINE boolean _ITRON_Task_Is_null (
- Thread_Control *the_task
-)
-{
- return ( the_task == NULL );
-}
-
-/*
- * XXX insert inline routines here
- */
-
-/*PAGE
- *
- * _ITRON_tasks_Priority_to_Core
- */
-
-RTEMS_INLINE_ROUTINE _ITRON_Task_Priority_to_Core(
- PRI ITRON_priority
-)
-{
- return (Priority_Control) ITRON_priority;
-}
-
-/*PAGE
- *
- * _ITRON_tasks_Core_to_Priority
- */
-
-RTEMS_INLINE_ROUTINE _ITRON_Task_Core_to_Priority(
- Priority_Control core_priority
-)
-{
- return (PRI) core_priority;
-}
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/itron/inline/rtems/itron/time.inl b/cpukit/itron/inline/rtems/itron/time.inl
deleted file mode 100644
index 183232a785..0000000000
--- a/cpukit/itron/inline/rtems/itron/time.inl
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __ITRON_TIME_inl_
-#define __ITRON_TIME_inl_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * XXX insert inline routines here
- */
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/itron/inline/rtems/itron/vmempool.inl b/cpukit/itron/inline/rtems/itron/vmempool.inl
deleted file mode 100644
index d1d18ef351..0000000000
--- a/cpukit/itron/inline/rtems/itron/vmempool.inl
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __ITRON_VARIABLE_MEMORY_POOL_inl_
-#define __ITRON_VARIABLE_MEMORY_POOL_inl_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * _ITRON_Variable_memory_pool_Allocate
- *
- * DESCRIPTION:
- *
- * This routine allocates the variable memory pool associated with
- * the specified variable memory pool ID from the pool of inactive
- * variable memory pools.
- *
- * Input parameters:
- * mplid - id of variable memory pool to allocate
- * status - pointer to status variable
- *
- * Output parameters:
- * returns - pointer to the variable memory pool control block
- * *status - status
- */
-
-RTEMS_INLINE_ROUTINE ITRON_Variable_memory_pool_Control
- *_ITRON_Variable_memory_pool_Allocate(
- ID mplid
-)
-{
- return (ITRON_Variable_memory_pool_Control *)_ITRON_Objects_Allocate_by_index(
- &_ITRON_Variable_memory_pool_Information,
- mplid,
- sizeof(ITRON_Variable_memory_pool_Control)
- );
-}
-
-/*
- * _ITRON_Variable_memory_pool_Clarify_allocation_id_error
- *
- * This function is invoked when an object allocation ID error
- * occurs to determine the specific ITRON error code to return.
- */
-
-#define _ITRON_Variable_memory_pool_Clarify_allocation_id_error( _id ) \
- _ITRON_Objects_Clarify_allocation_id_error( \
- &_ITRON_Variable_memory_pool_Information, (_id) )
-
-/*
- * _ITRON_Variable_memory_pool_Clarify_get_id_error
- *
- * This function is invoked when an object get ID error
- * occurs to determine the specific ITRON error code to return.
- */
-
-#define _ITRON_Variable_memory_pool_Clarify_get_id_error( _id ) \
- _ITRON_Objects_Clarify_get_id_error( &_ITRON_Variable_memory_pool_Information, (_id) )
-
-/*
- * _ITRON_Variable_memory_pool_Free
- *
- * DESCRIPTION:
- *
- * This routine frees a variable memory pool control block to the
- * inactive chain of free variable memory pool control blocks.
- *
- * Input parameters:
- * the_variable_memory_pool - pointer to variable memory pool control block
- *
- * Output parameters: NONE
- */
-
-RTEMS_INLINE_ROUTINE void _ITRON_Variable_memory_pool_Free (
- ITRON_Variable_memory_pool_Control *the_variable_memory_pool
-)
-{
- _ITRON_Objects_Free(
- &_ITRON_Variable_memory_pool_Information,
- &the_variable_memory_pool->Object
- );
-}
-
-/*PAGE
- *
- * _ITRON_Variable_memory_pool_Get
- *
- * DESCRIPTION:
- *
- * This function maps variable memory pool IDs to variable memory pool
- * control blocks. If ID corresponds to a local variable memory pool,
- * then it returns the variable memory pool control pointer which maps
- * to ID and location is set to OBJECTS_LOCAL. if the variable memory
- * pool ID is global and resides on a remote node, then location is set
- * to OBJECTS_REMOTE, and the variable memory pool is undefined. Otherwise,
- * location is set to OBJECTS ERROR and the variable memory pool is undefined.
- *
- * Input parameters:
- * id - ITRON variable memory pool ID.
- * the_location - pointer to a location variable
- *
- * Output parameters:
- * *the_location - location of the object
- */
-
-RTEMS_INLINE_ROUTINE ITRON_Variable_memory_pool_Control
- *_ITRON_Variable_memory_pool_Get (
- ID id,
- Objects_Locations *location
-)
-{
- return (ITRON_Variable_memory_pool_Control *) _ITRON_Objects_Get(
- &_ITRON_Variable_memory_pool_Information,
- id,
- location
- );
-}
-
-/*PAGE
- *
- * _ITRON_Variable_memory_pool_Is_null
- *
- * This function returns TRUE if the_variable_memory_pool is NULL
- * and FALSE otherwise.
- *
- * Input parameters:
- * the_variable_memory_pool - pointer to variable memory pool control block
- *
- * Output parameters:
- * TRUE - if the_variable_memory_pool is NULL
- * FALSE - otherwise
- */
-
-RTEMS_INLINE_ROUTINE boolean _ITRON_Variable_memory_pool_Is_null (
- ITRON_Variable_memory_pool_Control *the_variable_memory_pool
-)
-{
- return ( the_variable_memory_pool == NULL );
-}
-
-/*
- * XXX insert inline routines here
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/itron/src/Makefile.am b/cpukit/itron/src/Makefile.am
deleted file mode 100644
index f508440f60..0000000000
--- a/cpukit/itron/src/Makefile.am
+++ /dev/null
@@ -1,69 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-TASK_C_FILES = task.c cre_tsk.c del_tsk.c sta_tsk.c ext_tsk.c exd_tsk.c \
- ter_tsk.c dis_dsp.c ena_dsp.c chg_pri.c rot_rdq.c rel_wai.c get_tid.c \
- ref_tsk.c
-
-TASKSYNC_C_FILES = sus_tsk.c rsm_tsk.c frsm_tsk.c slp_tsk.c tslp_tsk.c \
- wup_tsk.c can_wup.c
-
-SEMAPHORE_C_FILES = itronsem.c cre_sem.c del_sem.c preq_sem.c ref_sem.c \
- sig_sem.c twai_sem.c wai_sem.c
-
-EVENTFLAGS_C_FILES = eventflags.c
-
-MAILBOX_C_FILES = mbox.c
-
-MSGBUFFER_C_FILES = msgbuffer.c msgbuffertranslatereturncode.c \
- cre_mbf.c del_mbf.c prcv_mbf.c psnd_mbf.c rcv_mbf.c ref_mbf.c snd_mbf.c \
- trcv_mbf.c tsnd_mbf.c
-
-RENDEZVOUS_C_FILES = port.c
-
-INTERRUPT_C_FILES = itronintr.c
-
-VARIABLE_MEMORY_POOL_C_FILES = vmempool.c
-
-FIXED_MEMORY_POOL_C_FILES = fmempool.c
-
-TIME_C_FILES = itrontime.c
-
-CONFIGURATION_C_FILES = sysmgmt.c
-
-NETWORK_C_FILES = network.c
-
-C_FILES = $(TASK_C_FILES) $(TASKSYNC_C_FILES) $(SEMAPHORE_C_FILES) \
- $(EVENTFLAGS_C_FILES) $(MAILBOX_C_FILES) $(MSGBUFFER_C_FILES) \
- $(RENDEZVOUS_C_FILES) $(INTERRUPT_C_FILES) \
- $(VARIABLE_MEMORY_POOL_C_FILES) $(FIXED_MEMORY_POOL_C_FILES) \
- $(TIME_C_FILES)
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-OBJS = $(C_O_FILES)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../../automake/lib.am
-
-AM_CPPFLAGS += -D__RTEMS_INSIDE__
-AM_CFLAGS += $(CFLAGS_OS_V)
-
-all: ${ARCH} ${OBJS}
-
-UNUSED_C_FILES = \
-cre_mbx.c del_mbx.c \
-mboxtranslatereturncode.c \
-network.c \
-prcv_mbx.c \
-rcv_mbx.c \
-ref_mbx.c \
-snd_mbx.c \
-sysmgmt.c \
-trcv_mbx.c
-
-EXTRA_DIST = $(C_FILES) $(UNUSED_C_FILES)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/cpukit/itron/src/TODO b/cpukit/itron/src/TODO
deleted file mode 100644
index 8b87f58c8a..0000000000
--- a/cpukit/itron/src/TODO
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# $Id$
-#
-
-The overall status including a major item todo list is in the Status
-chapter of the RTEMS ITRON API User's Guide. This file contains very
-short things that need to be addressed.
-
-+ unlimited object not support for allocate by index. Support either
- needs to be added for this type of object or the manager initialization
- code needs to consider it a fatal error to configure the object class
- in this mode.
-
diff --git a/cpukit/itron/src/can_wup.c b/cpukit/itron/src/can_wup.c
deleted file mode 100644
index 7b48bf5ffd..0000000000
--- a/cpukit/itron/src/can_wup.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/score/thread.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/sysstate.h>
-
-#include <rtems/itron/task.h>
-
-/*
- * can_wup - Cancel Wakeup Request
- */
-
-ER can_wup(
- INT *p_wupcnt,
- ID tskid
-)
-{
- register Thread_Control *the_thread;
- Objects_Locations location;
-
- the_thread = _ITRON_Task_Get( tskid, &location );
- switch ( location ) {
- case OBJECTS_REMOTE:
- case OBJECTS_ERROR:
- return _ITRON_Task_Clarify_get_id_error( tskid );
-
- case OBJECTS_LOCAL:
- /*
- * XXX - FILL ME IN.
- */
- break;
- }
-
- _ITRON_return_errorno( E_OK );
-}
-
diff --git a/cpukit/itron/src/chg_pri.c b/cpukit/itron/src/chg_pri.c
deleted file mode 100644
index 2d4d76d85f..0000000000
--- a/cpukit/itron/src/chg_pri.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/score/thread.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/sysstate.h>
-
-#include <rtems/itron/task.h>
-
-/*
- * chg_pri - Change Task Priority
- */
-
-ER chg_pri(
- ID tskid,
- PRI tskpri
-)
-{
- register Thread_Control *the_thread;
- Objects_Locations location;
- Priority_Control new_priority;
-
- the_thread = _ITRON_Task_Get( tskid, &location );
- switch ( location ) {
- case OBJECTS_REMOTE:
- case OBJECTS_ERROR:
- return _ITRON_Task_Clarify_get_id_error( tskid );
-
- case OBJECTS_LOCAL:
- if (_States_Is_dormant( the_thread->current_state ))
- _ITRON_return_errorno( E_OBJ );
-
- if (( tskpri <= 0 ) || ( tskpri >= 256 ))
- _ITRON_return_errorno( E_PAR );
-
- new_priority = _ITRON_Task_Priority_to_Core( tskpri );
- the_thread->real_priority = new_priority;
-
- /*
- * The priority should not be changed until later if priority
- * inheratance has occured.
- */
-
- if ( the_thread->resource_count == 0 ||
- the_thread->current_priority > new_priority )
- _Thread_Change_priority( the_thread, new_priority, FALSE );
-
- break;
- }
-
- _ITRON_return_errorno( E_OK );
-}
-
-
diff --git a/cpukit/itron/src/cre_mbf.c b/cpukit/itron/src/cre_mbf.c
deleted file mode 100644
index 0db738435e..0000000000
--- a/cpukit/itron/src/cre_mbf.c
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * ITRON Message Buffer Manager
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/itron/msgbuffer.h>
-#include <rtems/itron/task.h>
-
-/*
- * cre_mbf - Create MessageBuffer
- */
-
-ER cre_mbf(
- ID mbfid,
- T_CMBF *pk_cmbf
-)
-{
- CORE_message_queue_Attributes the_msgq_attributes;
- ITRON_Message_buffer_Control *the_message_buffer;
-
- /*
- * Bad pointer to the attributes structure
- */
-
- if ( !pk_cmbf )
- return E_PAR;
-
- /*
- * Bits were set that were note defined.
- */
-
- if (pk_cmbf->mbfatr & ~(TA_TPRI))
- return E_RSATR;
-
- if (pk_cmbf->bufsz < 0 || pk_cmbf->maxmsz < 0)
- return E_PAR;
-
- if (pk_cmbf->bufsz < pk_cmbf->maxmsz)
- return E_PAR;
-
- _Thread_Disable_dispatch(); /* prevents deletion */
-
- the_message_buffer = _ITRON_Message_buffer_Allocate(mbfid);
- if ( !the_message_buffer ) {
- _Thread_Enable_dispatch();
- return _ITRON_Message_buffer_Clarify_allocation_id_error(mbfid);
- }
-
- if ( pk_cmbf->mbfatr & TA_TPRI )
- the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY;
- else
- the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO;
-
- _CORE_message_queue_Initialize(
- &the_message_buffer->message_queue,
- OBJECTS_ITRON_MESSAGE_BUFFERS,
- &the_msgq_attributes,
- pk_cmbf->bufsz / pk_cmbf->maxmsz,
- pk_cmbf->maxmsz,
- NULL /* Multiprocessing not supported */
- );
-
- _ITRON_Objects_Open( &_ITRON_Message_buffer_Information,
- &the_message_buffer->Object );
-
- /*
- * If multiprocessing were supported, this is where we would announce
- * the existence of the semaphore to the rest of the system.
- */
-
-#if defined(RTEMS_MULTIPROCESSING)
-#endif
-
- _Thread_Enable_dispatch();
-
- return E_OK;
-}
diff --git a/cpukit/itron/src/cre_mbx.c b/cpukit/itron/src/cre_mbx.c
deleted file mode 100644
index bd4c3e4c41..0000000000
--- a/cpukit/itron/src/cre_mbx.c
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * ITRON 3.0 Mailbox Manager
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/itron/mbox.h>
-#include <rtems/itron/task.h>
-
-/*
- * cre_mbx - Create Mailbox
- *
- * Creates a Mailbox according to the following spec:
- *
- * ------Parameters-------------------------
- * ID mbxid MailboxID
- * T_CMBX *pk_cmbx Packet to Create Mailbox
- * -----------------------------------------
- * -*pk_cmbx members*-
- * VP exinf ExtendedInformation
- * ATR mbxatr MailboxAttributes
- * (the use of the following information
- * is implementation dependent)
- * INT bufcnt BufferMessageCount
- * (CPU and/or implementation-dependent information
- * may also be included)
- *
- * ----Return Parameters--------------------
- * ER ercd ErrorCode
- * -----------------------------------------
- *
- *
- * ----C Language Interface-----------------
- * ER ercd = cre_mbx ( ID mbxid, T_CMBX *pk_cmbx ) ;
- * -----------------------------------------
- *
- */
-
-ER cre_mbx(
- ID mbxid,
- T_CMBX *pk_cmbx
-)
-{
- register ITRON_Mailbox_Control *the_mailbox;
- CORE_message_queue_Attributes the_mailbox_attributes;
-
- if ( !pk_cmbx )
- return E_PAR;
-
- if ((pk_cmbx->mbxatr & (TA_TPRI | TA_MPRI)) != 0 )
- return E_RSATR;
-
- _Thread_Disable_dispatch(); /* protects object pointer */
-
- the_mailbox = _ITRON_Mailbox_Allocate( mbxid );
- if ( !the_mailbox ) {
- _Thread_Enable_dispatch();
- return _ITRON_Mailbox_Clarify_allocation_id_error( mbxid );
- }
-
- the_mailbox->count = pk_cmbx->bufcnt;
- if (pk_cmbx->mbxatr & TA_MPRI)
- the_mailbox->do_message_priority = TRUE;
- else
- the_mailbox->do_message_priority = FALSE;
-
- if (pk_cmbx->mbxatr & TA_TPRI)
- the_mailbox_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY;
- else
- the_mailbox_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO;
-
- if ( !_CORE_message_queue_Initialize(
- &the_mailbox->message_queue,
- OBJECTS_ITRON_MAILBOXES,
- &the_mailbox_attributes,
- the_mailbox->count,
- sizeof(T_MSG *),
- NULL ) ) { /* Multiprocessing not supported */
- _ITRON_Mailbox_Free(the_mailbox);
- _ITRON_return_errorno( E_OBJ );
- }
-
- _ITRON_Objects_Open( &_ITRON_Mailbox_Information, &the_mailbox->Object );
-
- /*
- * If multiprocessing were supported, this is where we would announce
- * the existence of the semaphore to the rest of the system.
- */
-
-#if defined(RTEMS_MULTIPROCESSING)
-#endif
-
- _ITRON_return_errorno( E_OK );
-}
diff --git a/cpukit/itron/src/cre_sem.c b/cpukit/itron/src/cre_sem.c
deleted file mode 100644
index 322adc3d41..0000000000
--- a/cpukit/itron/src/cre_sem.c
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/itron/semaphore.h>
-#include <rtems/itron/task.h>
-#include <rtems/score/tod.h>
-
-/*
- * cre_sem - Create Semaphore
- *
- * This function implements the ITRON 3.0 cre_sem() service.
- */
-
-ER cre_sem(
- ID semid,
- T_CSEM *pk_csem
-)
-{
- CORE_semaphore_Attributes the_semaphore_attributes;
- ITRON_Semaphore_Control *the_semaphore;
-
- /*
- * Bad pointer to the attributes structure
- */
-
- if ( !pk_csem )
- return E_PAR;
-
- /*
- * Bits were set that were note defined.
- */
-
- if ( pk_csem->sematr & _ITRON_SEMAPHORE_UNUSED_ATTRIBUTES )
- return E_RSATR;
-
- /*
- * Initial semaphore count exceeds the maximum.
- */
-
- if ( pk_csem->isemcnt > pk_csem->maxsem )
- return E_PAR;
-
- /*
- * This error is not in the specification but this condition
- * does not make sense.
- */
-
- if ( pk_csem->maxsem == 0 )
- return E_PAR;
-
- _Thread_Disable_dispatch(); /* prevents deletion */
-
- the_semaphore = _ITRON_Semaphore_Allocate( semid );
- if ( !the_semaphore ) {
- _Thread_Enable_dispatch();
- return _ITRON_Semaphore_Clarify_allocation_id_error( semid );
- }
-
- if ( pk_csem->sematr & TA_TPRI )
- the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY;
- else
- the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO;
-
- the_semaphore_attributes.maximum_count = pk_csem->maxsem;
-
- _CORE_semaphore_Initialize(
- &the_semaphore->semaphore,
- OBJECTS_ITRON_SEMAPHORES,
- &the_semaphore_attributes,
- pk_csem->isemcnt,
- NULL /* Multiprocessing not supported */
- );
-
- _ITRON_Objects_Open( &_ITRON_Semaphore_Information, &the_semaphore->Object );
-
- /*
- * If multiprocessing were supported, this is where we would announce
- * the existence of the semaphore to the rest of the system.
- */
-
-#if defined(RTEMS_MULTIPROCESSING)
-#endif
-
- _Thread_Enable_dispatch();
- return E_OK;
-}
diff --git a/cpukit/itron/src/cre_tsk.c b/cpukit/itron/src/cre_tsk.c
deleted file mode 100644
index 665e158652..0000000000
--- a/cpukit/itron/src/cre_tsk.c
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/score/thread.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/sysstate.h>
-
-#include <rtems/itron/task.h>
-
-
-/*
- * cre_tsk - Create Task
- */
-
-ER cre_tsk(
- ID tskid,
- T_CTSK *pk_ctsk
-)
-{
- register Thread_Control *the_thread;
- char *name = "trn";
- boolean status;
- Priority_Control core_priority;
-
- /*
- * Validate Parameters.
- */
-
- if ( pk_ctsk == NULL )
- return E_PAR;
-
- if ((pk_ctsk->tskatr != TA_ASM ) &&
- (pk_ctsk->tskatr != TA_HLNG) &&
- (pk_ctsk->tskatr != TA_COP0) &&
- (pk_ctsk->tskatr != TA_COP1) &&
- (pk_ctsk->tskatr != TA_COP2) &&
- (pk_ctsk->tskatr != TA_COP3) &&
- (pk_ctsk->tskatr != TA_COP4) &&
- (pk_ctsk->tskatr != TA_COP5) &&
- (pk_ctsk->tskatr != TA_COP6) &&
- (pk_ctsk->tskatr != TA_COP7))
- return E_RSATR;
-
- if (( pk_ctsk->itskpri <= 0 ) || ( pk_ctsk->itskpri >= 256 ))
- return E_PAR;
- if ( pk_ctsk->task == NULL )
- return E_PAR;
- if ( pk_ctsk->stksz < 0 )
- return E_PAR;
-
- /*
- * Disable dispatching.
- */
-
- _Thread_Disable_dispatch();
-
- /*
- * allocate the thread.
- */
-
- the_thread = _ITRON_Task_Allocate( tskid );
- if ( !the_thread )
- _ITRON_return_errorno( _ITRON_Task_Clarify_allocation_id_error( tskid ) );
-
- /*
- * Initialize the core thread for this task.
- */
-
- core_priority = _ITRON_Task_Priority_to_Core( pk_ctsk->itskpri );
- status = _Thread_Initialize(
- &_ITRON_Task_Information,
- the_thread,
- NULL,
- pk_ctsk->stksz,
- TRUE, /* XXX - All tasks FP for now */
- core_priority,
- TRUE,
- THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE,
- NULL, /* no budget algorithm callout */
- 0,
- &name
- );
-
- if ( !status ) {
- _ITRON_Task_Free( the_thread );
- _ITRON_return_errorno( E_NOMEM );
- }
-
- /*
- * This insures we evaluate the process-wide signals pending when we
- * first run.
- *
- * NOTE: Since the thread starts with all unblocked, this is necessary.
- */
-
- the_thread->do_post_task_switch_extension = TRUE;
-
- the_thread->Start.entry_point = (Thread_Entry) pk_ctsk->task;
-
- _ITRON_return_errorno( E_OK );
-}
-
-
-
-
diff --git a/cpukit/itron/src/del_mbf.c b/cpukit/itron/src/del_mbf.c
deleted file mode 100644
index 1b75602e75..0000000000
--- a/cpukit/itron/src/del_mbf.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * ITRON Message Buffer Manager
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/itron/msgbuffer.h>
-#include <rtems/itron/task.h>
-
-/*
- * del_mbf - Delete MessageBuffer
- */
-
-ER del_mbf(
- ID mbfid
-)
-{
- ITRON_Message_buffer_Control *the_message_buffer;
- Objects_Locations location;
-
- the_message_buffer = _ITRON_Message_buffer_Get(mbfid, &location);
- switch (location) {
- case OBJECTS_REMOTE:
- case OBJECTS_ERROR: /* Multiprocessing not supported */
- return _ITRON_Message_buffer_Clarify_get_id_error(mbfid);
-
- case OBJECTS_LOCAL:
- _CORE_message_queue_Flush(&the_message_buffer->message_queue);
- _ITRON_Objects_Close( &_ITRON_Message_buffer_Information,
- &the_message_buffer->Object);
- _ITRON_Message_buffer_Free(the_message_buffer);
-
- /*
- * If multiprocessing were supported, this is where we would announce
- * the existence of the semaphore to the rest of the system.
- */
-
-#if defined(RTEMS_MULTIPROCESSING)
-#endif
- _Thread_Enable_dispatch();
- return E_OK;
- }
-
- return E_OK;
-}
diff --git a/cpukit/itron/src/del_mbx.c b/cpukit/itron/src/del_mbx.c
deleted file mode 100644
index 44d7e2df6e..0000000000
--- a/cpukit/itron/src/del_mbx.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * ITRON 3.0 Mailbox Manager
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/itron/mbox.h>
-#include <rtems/itron/task.h>
-
-/*
- * del_mbx - Delete Mailbox
- *
- *
- * ------Parameters--------------
- * ID mbxid The Mailbox's ID
- * ------------------------------
- *
- * -----Return Parameters-------
- * ER ercd Itron Error Code
- * -----------------------------
- *
- * -----C Language Interface----
- * ER ercd = del_mbx(ID mbxid);
- * -----------------------------
- *
- */
-
-ER del_mbx(
- ID mbxid
-)
-{
- register ITRON_Mailbox_Control *the_mailbox;
- Objects_Locations location;
-
- the_mailbox= _ITRON_Mailbox_Get( mbxid, &location );
- switch ( location ) {
- case OBJECTS_ERROR:
- case OBJECTS_REMOTE:
- return _ITRON_Mailbox_Clarify_get_id_error( mbxid );
-
- case OBJECTS_LOCAL:
- _Objects_Close( &_ITRON_Mailbox_Information, &the_mailbox->Object );
-
- _CORE_message_queue_Close(
- &the_mailbox->message_queue,
- NULL, /* Multiprocessing not supported */
- CORE_MESSAGE_QUEUE_STATUS_WAS_DELETED
- );
-
- _ITRON_Mailbox_Free(the_mailbox);
- break;
- }
-
- _ITRON_return_errorno( E_OK );
-}
diff --git a/cpukit/itron/src/del_sem.c b/cpukit/itron/src/del_sem.c
deleted file mode 100644
index 46a50f1890..0000000000
--- a/cpukit/itron/src/del_sem.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/itron/semaphore.h>
-#include <rtems/itron/task.h>
-#include <rtems/score/tod.h>
-
-/*
- * del_sem - Delete Semaphore
- *
- * This function implements the ITRON 3.0 del_sem() service.
- */
-
-ER del_sem(
- ID semid
-)
-{
- ITRON_Semaphore_Control *the_semaphore;
- Objects_Locations location;
-
- the_semaphore = _ITRON_Semaphore_Get( semid, &location );
- switch ( location ) {
- case OBJECTS_REMOTE: /* Multiprocessing not supported */
- case OBJECTS_ERROR:
- return _ITRON_Semaphore_Clarify_get_id_error( semid );
-
- case OBJECTS_LOCAL:
- _CORE_semaphore_Flush(
- &the_semaphore->semaphore,
- NULL, /* Multiprocessing not supported */
- CORE_SEMAPHORE_WAS_DELETED
- );
-
- _ITRON_Objects_Close(
- &_ITRON_Semaphore_Information,
- &the_semaphore->Object
- );
-
- _ITRON_Semaphore_Free( the_semaphore );
-
- /*
- * If multiprocessing were supported, this is where we would announce
- * the destruction of the semaphore to the rest of the system.
- */
-
-#if defined(RTEMS_MULTIPROCESSING)
-#endif
-
- _Thread_Enable_dispatch();
- return E_OK;
-
- }
- return E_OK;
-}
diff --git a/cpukit/itron/src/del_tsk.c b/cpukit/itron/src/del_tsk.c
deleted file mode 100644
index 43c2edef51..0000000000
--- a/cpukit/itron/src/del_tsk.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/score/thread.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/sysstate.h>
-
-#include <rtems/itron/task.h>
-
-
-/*
- * del_tsk - Delete Task
- */
-
-ER del_tsk(
- ID tskid
-)
-{
- register Thread_Control *the_thread;
- Objects_Locations location;
- ER result = E_OK; /* to avoid warning */
-
- the_thread = _ITRON_Task_Get( tskid, &location );
- switch ( location ) {
- case OBJECTS_REMOTE:
- case OBJECTS_ERROR:
- return _ITRON_Task_Clarify_get_id_error( tskid );
-
- case OBJECTS_LOCAL:
-
- if ( _Thread_Is_executing( the_thread ) )
- _ITRON_return_errorno( E_OBJ );
-
- if ( !_States_Is_dormant( the_thread->current_state ) )
- _ITRON_return_errorno( E_OBJ );
-
- result = _ITRON_Delete_task( the_thread );
- break;
- }
-
- _ITRON_return_errorno( result );
-}
-
diff --git a/cpukit/itron/src/dis_dsp.c b/cpukit/itron/src/dis_dsp.c
deleted file mode 100644
index f16208a6e7..0000000000
--- a/cpukit/itron/src/dis_dsp.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/score/thread.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/sysstate.h>
-
-#include <rtems/itron/task.h>
-
-
-/*
- * dis_dsp - Disable Dispatch
- */
-
-ER dis_dsp( void )
-{
- /*
- * Disable dispatch for protection
- */
-
- _Thread_Disable_dispatch();
-
- return E_OK;
-}
-
-
diff --git a/cpukit/itron/src/ena_dsp.c b/cpukit/itron/src/ena_dsp.c
deleted file mode 100644
index f2df3fdf09..0000000000
--- a/cpukit/itron/src/ena_dsp.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/score/thread.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/sysstate.h>
-
-#include <rtems/itron/task.h>
-
-
-/*
- * ena_dsp - Enable Dispatch
- */
-
-ER ena_dsp( void )
-{
- _Thread_Enable_dispatch();
-
- return E_OK;
-}
-
diff --git a/cpukit/itron/src/eventflags.c b/cpukit/itron/src/eventflags.c
deleted file mode 100644
index b7d974ae37..0000000000
--- a/cpukit/itron/src/eventflags.c
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/itron/eventflags.h>
-
-/*
- * _ITRON_Eventflags_Manager_initialization
- *
- * This routine initializes all event flags manager related data structures.
- *
- * Input parameters:
- * maximum_eventflags - maximum configured eventflags
- *
- * Output parameters: NONE
- */
-
-void _ITRON_Eventflags_Manager_initialization(
- unsigned32 maximum_eventflags
-)
-{
- _Objects_Initialize_information(
- &_ITRON_Eventflags_Information, /* object information table */
- OBJECTS_ITRON_EVENTFLAGS, /* object class */
- FALSE, /* TRUE if this is a global */
- /* object class */
- maximum_eventflags, /* maximum objects of this class */
- sizeof( ITRON_Eventflags_Control ), /* size of this object's */
- /* control block */
- FALSE, /* TRUE if names for this object */
- /* are strings */
- RTEMS_MAXIMUM_NAME_LENGTH, /* maximum length of each object's */
- /* name */
- FALSE /* TRUE if this class is threads */
- );
-
- /*
- * Register the MP Process Packet routine.
- *
- * NOTE: No MP Support YET in RTEMS ITRON implementation.
- */
-
-}
-
-/*
- * cre_flg - Create Eventflag
- */
-
-ER cre_flg(
- ID flgid,
- T_CFLG *pk_cflg
-)
-{
- return E_OK;
-}
-
-/*
- * del_flg - Delete Eventflag
- */
-
-ER del_flg(
- ID flgid
-)
-{
- return E_OK;
-}
-
-/*
- * set_flg - Set Eventflag
- */
-
-ER set_flg(
- ID flgid,
- UINT setptn
-)
-{
- return E_OK;
-}
-
-/*
- * clr_flg - Clear Eventflag
- */
-
-ER clr_flg(
- ID flgid,
- UINT clrptn
-)
-{
- return E_OK;
-}
-
-/*
- * wai_flg - Wait on Eventflag
- */
-
-ER wai_flg(
- UINT *p_flgptn,
- ID flgid,
- UINT waiptn,
- UINT wfmode
-)
-{
- return E_OK;
-}
-
-/*
- * pol_flg - Wait for Eventflag(Polling)
- */
-
-ER pol_flg(
- UINT *p_flgptn,
- ID flgid,
- UINT waiptn,
- UINT wfmode
-)
-{
- return E_OK;
-}
-
-/*
- * twai_flg - Wait on Eventflag with Timeout
- */
-
-ER twai_flg(
- UINT *p_flgptn,
- ID flgid,
- UINT waiptn,
- UINT wfmode,
- TMO tmout
-)
-{
- return E_OK;
-}
-
-/*
- * ref_flg - Reference Eventflag Status
- */
-
-ER ref_flg(
- T_RFLG *pk_rflg,
- ID flgid
-)
-{
- return E_OK;
-}
-
diff --git a/cpukit/itron/src/exd_tsk.c b/cpukit/itron/src/exd_tsk.c
deleted file mode 100644
index c9bc02dd04..0000000000
--- a/cpukit/itron/src/exd_tsk.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-#include <assert.h>
-
-#include <rtems/score/thread.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/sysstate.h>
-
-#include <rtems/itron/task.h>
-
-/*
- * exd_tsk - Exit and Delete Task
- */
-
-void exd_tsk( void )
-{
- Objects_Information *the_information;
-
- _Thread_Disable_dispatch();
-
- the_information = _Objects_Get_information( _Thread_Executing->Object.id );
-
- /* This should never happen if _Thread_Get() works right */
- assert( the_information );
-
- _Thread_Set_state( _Thread_Executing, STATES_DORMANT );
- _ITRON_Delete_task( _Thread_Executing );
-
- _Thread_Enable_dispatch();
-}
-
diff --git a/cpukit/itron/src/ext_tsk.c b/cpukit/itron/src/ext_tsk.c
deleted file mode 100644
index 482daf0b22..0000000000
--- a/cpukit/itron/src/ext_tsk.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/score/thread.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/sysstate.h>
-
-#include <rtems/itron/task.h>
-
-
-/*
- * ext_tsk - Exit Issuing Task
- */
-
-void ext_tsk( void )
-{
- /*
- * Figure out what to do if this happens.
- * We can not return regardless
- if ( _ITRON_Is_in_non_task_state() )
- return E_CTX;
- */
-
- _Thread_Disable_dispatch();
-
- _Thread_Set_state( _Thread_Executing, STATES_DORMANT );
- _Thread_Reset( _Thread_Executing, NULL, 0 );
-
- _Thread_Enable_dispatch();
-}
diff --git a/cpukit/itron/src/fmempool.c b/cpukit/itron/src/fmempool.c
deleted file mode 100644
index ec19e6770c..0000000000
--- a/cpukit/itron/src/fmempool.c
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/itron/fmempool.h>
-
-/*
- * _ITRON_Fixed_memory_pool_Manager_initialization
- *
- * This routine initializes all fixed memory pool manager related
- * data structures.
- *
- * Input parameters:
- * maximum_fixed_memory_pools - maximum configured fixed memory pools
- *
- * Output parameters: NONE
- */
-
-void _ITRON_Fixed_memory_pool_Manager_initialization(
- unsigned32 maximum_fixed_memory_pools
-)
-{
- _Objects_Initialize_information(
- &_ITRON_Fixed_memory_pool_Information, /* object information table */
- OBJECTS_ITRON_FIXED_MEMORY_POOLS, /* object class */
- FALSE, /* TRUE if this is a global */
- /* object class */
- maximum_fixed_memory_pools, /* maximum objects of this class */
- sizeof( ITRON_Fixed_memory_pool_Control ),
- /* size of this object's control block */
- FALSE, /* TRUE if names for this object */
- /* are strings */
- RTEMS_MAXIMUM_NAME_LENGTH, /* maximum length of each object's */
- /* name */
- FALSE /* TRUE if this class is threads */
- );
-
- /*
- * Register the MP Process Packet routine.
- *
- * NOTE: No MP Support YET in RTEMS ITRON implementation.
- */
-
-}
-
-/*
- * cre_mpf - Create Fixed-Size Memorypool
- */
-
-ER cre_mpf(
- ID mpfid,
- T_CMPF *pk_cmpf
-)
-{
- return E_OK;
-}
-
-/*
- * del_mpf - Delete Fixed-Size Memorypool
- */
-
-ER del_mpf(
- ID mpfid
-)
-{
- return E_OK;
-}
-
-/*
- * get_blf - Get Fixed-Size Memory Block
- */
-
-ER get_blf(
- VP *p_blf,
- ID mpfid
-)
-{
- return E_OK;
-}
-
-/*
- * pget_blf - Poll and Get Fixed-Size Memory Block
- */
-
-ER pget_blf(
- VP *p_blf,
- ID mpfid
-)
-{
- return E_OK;
-}
-
-/*
- * tget_blf - Get Fixed-Size Memory Block with Timeout
- */
-
-ER tget_blf(
- VP *p_blf,
- ID mpfid,
- TMO tmout
-)
-{
- return E_OK;
-}
-
-/*
- * rel_blf - Release Fixed-Size Memory Block
- */
-
-ER rel_blf(
- ID mpfid,
- VP blf
-)
-{
- return E_OK;
-}
-
-/*
- * ref_mpf - Reference Fixed-Size Memorypool Status
- */
-
-ER ref_mpf(
- T_RMPF *pk_rmpf,
- ID mpfid
-)
-{
- return E_OK;
-}
-
diff --git a/cpukit/itron/src/frsm_tsk.c b/cpukit/itron/src/frsm_tsk.c
deleted file mode 100644
index efa6f3457a..0000000000
--- a/cpukit/itron/src/frsm_tsk.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/score/thread.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/sysstate.h>
-
-#include <rtems/itron/task.h>
-
-
-/*
- * frsm_tsk - Forcibly Resume Suspended Task
- */
-
-ER frsm_tsk(
- ID tskid
-)
-{
- register Thread_Control *the_thread;
- Objects_Locations location;
-
- the_thread = _ITRON_Task_Get( tskid, &location );
- switch ( location ) {
- case OBJECTS_REMOTE:
- case OBJECTS_ERROR:
- return _ITRON_Task_Clarify_get_id_error( tskid );
-
- case OBJECTS_LOCAL:
- if ( _Thread_Is_executing( the_thread ) )
- _ITRON_return_errorno( E_OBJ );
-
- if (_States_Is_dormant( the_thread->current_state ))
- _ITRON_return_errorno( E_OBJ );
-
- if ( ! _States_Is_suspended(the_thread->current_state) )
- _ITRON_return_errorno( E_OK );
-
- _Thread_Resume( the_thread, TRUE );
- break;
- }
-
- _ITRON_return_errorno( E_OK );
-
-}
-
-
diff --git a/cpukit/itron/src/get_tid.c b/cpukit/itron/src/get_tid.c
deleted file mode 100644
index 1e85eeb26f..0000000000
--- a/cpukit/itron/src/get_tid.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/score/thread.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/sysstate.h>
-
-#include <rtems/itron/task.h>
-
-/*
- * get_tid - Get Task Identifier
- */
-
-ER get_tid(
- ID *p_tskid
-)
-{
- /*
- * This does not support multiprocessing. The id handling will have
- * to be enhanced to support multiprocessing.
- */
-
- *p_tskid = _Objects_Get_index( _Thread_Executing->Object.id );
- return E_OK;
-}
-
diff --git a/cpukit/itron/src/itronintr.c b/cpukit/itron/src/itronintr.c
deleted file mode 100644
index 8a07d9e215..0000000000
--- a/cpukit/itron/src/itronintr.c
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/itron/intr.h>
-
-/*
- * def_int - Define Interrupt Handler
- */
-
-ER def_int(
- UINT dintno,
- T_DINT *pk_dint
-)
-{
- return E_OK;
-}
-
-/*
- * ret_int - Return from Interrupt Handler
- */
-
-void ret_int( void )
-{
-}
-
-/*
- * ret_wup - Return and Wakeup Task
- */
-
-void ret_wup(
- ID tskid
-)
-{
-}
-
-/*
- * loc_cpu - Lock CPU
- */
-
-ER loc_cpu( void )
-{
- return E_OK;
-}
-
-/*
- * unl_cpu - Unlock CPU
- */
-
-ER unl_cpu( void )
-{
- return E_OK;
-}
-
-/*
- * dis_int - Disable Interrupt
- */
-
-ER dis_int(
- UINT eintno
-)
-{
- return E_OK;
-}
-
-/*
- * ena_int - Enable Interrupt
- */
-
-ER ena_int(
- UINT eintno
-)
-{
- return E_OK;
-}
-
-/*
- * chg_iXX - Change Interrupt Mask(Level or Priority)
- */
-
-ER chg_iXX(
- UINT iXXXX
-)
-{
- return E_OK;
-}
-
-/*
- * ref_iXX - Reference Interrupt Mask(Level or Priority)
- */
-
-ER ref_iXX(
- UINT *p_iXXXX
-)
-{
- return E_OK;
-}
-
diff --git a/cpukit/itron/src/itronsem.c b/cpukit/itron/src/itronsem.c
deleted file mode 100644
index ad9278aec2..0000000000
--- a/cpukit/itron/src/itronsem.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/itron/semaphore.h>
-#include <rtems/itron/task.h>
-#include <rtems/score/tod.h>
-
-/*
- * _ITRON_Semaphore_Manager_initialization
- *
- * DESCRIPTION:
- *
- * This routine initializes all semaphore manager related data structures.
- *
- * Input parameters:
- * maximum_semaphores - maximum configured semaphores
- *
- * Output parameters: NONE
- */
-
-void _ITRON_Semaphore_Manager_initialization(
- unsigned32 maximum_semaphores
-)
-{
- _Objects_Initialize_information(
- &_ITRON_Semaphore_Information, /* object information table */
- OBJECTS_ITRON_SEMAPHORES, /* object class */
- FALSE, /* TRUE if this is a global */
- /* object class */
- maximum_semaphores, /* maximum objects of this class */
- sizeof( ITRON_Semaphore_Control ), /* size of this object's control block */
- FALSE, /* TRUE if names for this object */
- /* are strings */
- RTEMS_MAXIMUM_NAME_LENGTH, /* maximum length of each object's */
- /* name */
- FALSE /* TRUE if this class is threads */
- );
-
- /*
- * Register the MP Process Packet routine.
- *
- * NOTE: No MP Support YET in RTEMS ITRON implementation.
- */
-
-}
-
diff --git a/cpukit/itron/src/itrontime.c b/cpukit/itron/src/itrontime.c
deleted file mode 100644
index e3ad47e8b5..0000000000
--- a/cpukit/itron/src/itrontime.c
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/score/thread.h>
-#include <rtems/score/tod.h>
-
-#include <rtems/itron/time.h>
-
-/*
- * set_tim - Set System Clock
- */
-
-void converTime(SYSTIME ms, TOD_Control *time)
-{
- int millisecond;
-
-/* XXX need to dereference structure */
-#if 0
- milisecond = ms % 1000;
- tempSecond = ms / 1000;
-#else
- millisecond = 0;
-#endif
-}
-
-
-/*
- * set_tim - Set System Clock
- */
-
-ER set_tim(
- SYSTIME *pk_tim
-)
-{
- Watchdog_Interval temp; /* an integer in seconds after conversion from SYSTIME */
- TOD_Control the_tod;
-
-/* convert *pk_tim which is 48 bits integer in binary into an ordinary
- integer in milliseconds */
-
-/* XXX */ temp = 0;
- if(temp > 0) {
- _Thread_Disable_dispatch();
- _TOD_Set(&the_tod, temp);
- _Thread_Enable_dispatch();
- if(_TOD_Validate(&the_tod)){
- return E_OK;
- }
- }
- return E_SYS;
-}
-
-/*
- * get_tim - Get System Clock
- */
-
-ER get_tim(
- SYSTIME *pk_tim
-)
-{
- return E_OK;
-}
-
-/*
- * dly_tsk - Delay Task
- */
-
-ER dly_tsk(
- DLYTIME dlytim
-)
-{
- Watchdog_Interval ticks;
-
- ticks = TOD_MILLISECONDS_TO_TICKS(dlytim);
-
- _Thread_Disable_dispatch();
- if ( ticks == 0 ) {
- _Thread_Yield_processor();
- } else {
- _Thread_Set_state( _Thread_Executing, STATES_DELAYING );
- _Watchdog_Initialize(
- &_Thread_Executing->Timer,
- _Thread_Delay_ended,
- _Thread_Executing->Object.id,
- NULL
- );
- _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks );
- }
- _Thread_Enable_dispatch();
- return E_OK;
-}
-
-/*
- * def_cyc - Define Cyclic Handler
- */
-
-ER def_cyc(
- HNO cycno,
- T_DCYC *pk_dcyc
-)
-{
- Watchdog_Control *object;
-#if 0
- Watchdog_Interval timeInterval;
-#endif
-
-/* XXX */ object = 0;
- if ( pk_dcyc->cycatr != TA_HLNG)
- return E_RSATR;
-#if 0
- timeInterval = pk_dcyc->cyctim / 1000;
- object->delta_interval = timeInterval;
-#endif
- _Watchdog_Initialize(
- object,
- pk_dcyc->cychdr,
- cycno,
- pk_dcyc->exinf);
- _Watchdog_Deactivate(object);
-
- return E_OK;
-}
-
-/*
- * act_cyc - Activate Cyclic Handler
- */
-
-ER act_cyc(
- HNO cycno,
- UINT cycact
-)
-{
- Watchdog_Control *object;
-
- if(cycact != TCY_OFF || cycact != TCY_ON)
- return E_PAR;
-
-#if 0
- if( object->Object_ID != cycno)
- return E_NOEXS;
-#endif
-
- _Watchdog_Activate(object);
-
- return E_OK;
-}
-
-/*
- * ref_cyc - Reference Cyclic Handler Status
- */
-
-ER ref_cyc(
- T_RCYC *pk_rcyc,
- HNO cycno
-)
-{
-#if 0
- int timeElapse_since_actCyclic;
-#endif
- T_DCYC *pk_dcyc;
-#if 0
- Watchdog_Control *object;
-#endif
-
-/* XXX */ pk_dcyc = 0;
-
-/* XXX will to use a "get" routine to map from id to object pointer */
-/* XXX and the object pointer should be of type specific to this manager */
-#if 0
- if( object->Object_ID == cycno))
-#else
- if ( 1 )
-#endif
- {
- pk_rcyc->exinf = pk_dcyc->exinf;
- pk_rcyc->cycact = pk_dcyc->cycact;
-#if 0
- pk_rcyc->lfttim = pk_dcyc->cyctim - timeElapse_since_actCyclic;
-#endif
-
- return E_OK;
- }
- else
- return E_NOEXS;
-}
-
-/*
- * def_alm - Define Alarm Handler
- */
-
-ER def_alm(
- HNO almno,
- T_DALM *pk_dalm
-)
-{
-#if 0
- Objects_Control *objectAlrm;
- Watchdog_Interval timeInterval;
-
- timeInterval = pk_dalm->almtim / 1000;
- (void) _Watchdog_Remove(&objectAlrm);
- _Watchdog_Initialize(
- objectAlrm,
- pk_dalm->almhdr,
- almno,
- pk_dalm->exinf);
- _Watchdong_Insert_seconds(objectAlrm,timeInterval);
- _Thread_Enable_dispatch();
-#endif
-
- return E_OK;
-}
-
-/*
- * ref_alm - Reference Alarm Handler Status
- */
-
-ER ref_alm(
- T_RALM *pk_ralm,
- HNO almno
-)
-{
-
- return E_OK;
-}
-
-/*
- * ret_tmr - Return from Timer Handler
- */
-
-void ret_tmr( void )
-{
-}
-
diff --git a/cpukit/itron/src/mbox.c b/cpukit/itron/src/mbox.c
deleted file mode 100644
index a8dd9a26ca..0000000000
--- a/cpukit/itron/src/mbox.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * ITRON 3.0 Mailbox Manager
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/itron/mbox.h>
-#include <rtems/itron/task.h>
-
-/*
- * _ITRON_Mailbox_Manager_initialization
- *
- * This routine initializes all mailboxes manager related data structures.
- *
- * Input parameters:
- * maximum_mailboxes - maximum configured mailboxes
- *
- * Output parameters: NONE
- */
-
-void _ITRON_Mailbox_Manager_initialization(
- unsigned32 maximum_mailboxes
-)
-{
- _Objects_Initialize_information(
- &_ITRON_Mailbox_Information, /* object information table */
- OBJECTS_ITRON_MAILBOXES, /* object class */
- FALSE, /* TRUE if this is a global */
- /* object class */
- maximum_mailboxes, /* maximum objects of this class */
- sizeof( ITRON_Mailbox_Control ), /* size of this object's control block */
- FALSE, /* TRUE if names for this object */
- /* are strings */
- RTEMS_MAXIMUM_NAME_LENGTH, /* maximum length of each object's */
- /* name */
- FALSE /* TRUE if this class is threads */
- );
-
- /*
- * Register the MP Process Packet routine.
- *
- * NOTE: No MP Support YET in RTEMS ITRON implementation.
- */
-
-}
diff --git a/cpukit/itron/src/mboxtranslatereturncode.c b/cpukit/itron/src/mboxtranslatereturncode.c
deleted file mode 100644
index aa28476199..0000000000
--- a/cpukit/itron/src/mboxtranslatereturncode.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * ITRON 3.0 Mailbox Manager
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/itron/mbox.h>
-#include <rtems/itron/task.h>
-
-/*
- * _ITRON_Mailbox_Translate_core_message_queue_return_code
- *
- * This routine translates a core message queue object status
- * into the appropriate ITRON status code.
- */
-
-ER _ITRON_Mailbox_Translate_core_message_queue_return_code(
- CORE_message_queue_Status status
-)
-{
- switch (status) {
- case CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL:
- return E_OK;
- case CORE_MESSAGE_QUEUE_STATUS_TOO_MANY:
- return E_TMOUT;
- case CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE:
- return E_PAR;
- case CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT:
- return E_TMOUT;
- case CORE_MESSAGE_QUEUE_STATUS_TIMEOUT:
- return E_TMOUT;
- default:
- return E_ID;
- }
-}
diff --git a/cpukit/itron/src/msgbuffer.c b/cpukit/itron/src/msgbuffer.c
deleted file mode 100644
index 13c89efba6..0000000000
--- a/cpukit/itron/src/msgbuffer.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * ITRON Message Buffer Manager
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/itron/msgbuffer.h>
-#include <rtems/itron/task.h>
-
-/*
- * _ITRON_Message_buffer_Manager_initialization
- *
- * This routine initializes all message buffer manager related data
- * structures.
- *
- * Input parameters:
- * maximum_message_buffers - maximum configured message buffers
- *
- * Output parameters: NONE
- */
-
-void _ITRON_Message_buffer_Manager_initialization(
- unsigned32 maximum_message_buffers
-)
-{
- _Objects_Initialize_information(
- &_ITRON_Message_buffer_Information, /* object information table */
- OBJECTS_ITRON_MESSAGE_BUFFERS, /* object class */
- FALSE, /* TRUE if this is a
- global object class */
- maximum_message_buffers, /* maximum objects of this class */
- sizeof( ITRON_Message_buffer_Control ), /* size of this
- object's control
- block */
- FALSE, /* TRUE if names for this
- object are strings */
- RTEMS_MAXIMUM_NAME_LENGTH, /* maximum length of each
- object's name */
- FALSE /* TRUE if this class is threads */
- );
-
- /*
- * Register the MP Process Packet routine.
- *
- * NOTE: No MP Support YET in RTEMS ITRON implementation.
- */
-}
-
diff --git a/cpukit/itron/src/msgbuffertranslatereturncode.c b/cpukit/itron/src/msgbuffertranslatereturncode.c
deleted file mode 100644
index 665b940180..0000000000
--- a/cpukit/itron/src/msgbuffertranslatereturncode.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * ITRON Message Buffer Manager
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/itron/msgbuffer.h>
-#include <rtems/itron/task.h>
-
-/*
- * _ITRON_Message_buffer_Translate_core_message_buffer_return_code
- *
- * This routine translates a core message buffer object status
- * into the appropriate ITRON status code.
- */
-
-ER _ITRON_Message_buffer_Translate_core_message_buffer_return_code(
- CORE_message_queue_Status status
-)
-{
- switch (status) {
- case CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL:
- return E_OK;
- case CORE_MESSAGE_QUEUE_STATUS_TOO_MANY:
- return E_TMOUT;
- case CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE:
- return E_PAR;
- case CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT:
- return E_TMOUT;
- case CORE_MESSAGE_QUEUE_STATUS_TIMEOUT:
- return E_TMOUT;
- default:
- return E_ID;
- }
-}
diff --git a/cpukit/itron/src/network.c b/cpukit/itron/src/network.c
deleted file mode 100644
index fd0c27ce3f..0000000000
--- a/cpukit/itron/src/network.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/itron/network.h>
-
-/*
- * nrea_dat - Read Data from another Node
- */
-
-ER nrea_dat(
- INT *p_reasz,
- VP dstadr,
- NODE srcnode,
- VP srcadr,
- INT datsz
-)
-{
- return E_OK;
-}
-
-/*
- * nwri_dat - Write Data to another Node
- */
-
-ER nwri_dat(
- INT *p_wrisz,
- NODE dstnode,
- VP dstadr,
- VP srcadr,
- INT datsz
-)
-{
- return E_OK;
-}
-
-/*
- * nget_nod - Get Local Node Number
- */
-
-ER nget_nod(
- NODE *p_node
-)
-{
- return E_OK;
-}
-
-/*
- * nget_ver - Get Version Information of another Node
- */
-
-ER nget_ver(
- T_VER *pk_ver,
- NODE node
-)
-{
- return E_OK;
-}
-
diff --git a/cpukit/itron/src/port.c b/cpukit/itron/src/port.c
deleted file mode 100644
index 0e9d98eb04..0000000000
--- a/cpukit/itron/src/port.c
+++ /dev/null
@@ -1,205 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/itron/port.h>
-
-/*
- * _ITRON_Port_Manager_initialization
- *
- * This routine initializes all ports manager related data structures.
- *
- * Input parameters:
- * maximum_ports - maximum configured ports
- *
- * Output parameters: NONE
- */
-
-void _ITRON_Port_Manager_initialization(
- unsigned32 maximum_ports
-)
-{
- _Objects_Initialize_information(
- &_ITRON_Port_Information, /* object information table */
- OBJECTS_ITRON_PORTS, /* object class */
- FALSE, /* TRUE if this is a global object class */
- maximum_ports, /* maximum objects of this class */
- sizeof( ITRON_Port_Control ), /* size of this object's control block */
- FALSE, /* TRUE if names for this object */
- /* are strings */
- RTEMS_MAXIMUM_NAME_LENGTH, /* maximum length of each object's name */
- FALSE /* TRUE if this class is threads */
- );
-
- /*
- * Register the MP Process Packet routine.
- *
- * NOTE: No MP Support YET in RTEMS ITRON implementation.
- */
-
-}
-
-/*
- * cre_por - Create Port for Rendezvous
- */
-
-ER cre_por(
- ID porid,
- T_CPOR *pk_cpor
-)
-{
- return E_OK;
-}
-
-/*
- * del_por - Delete Port for Rendezvous
- */
-
-ER del_por(
- ID porid
-)
-{
- return E_OK;
-}
-
-/*
- * cal_por - Call Port for Rendezvous Poll
- */
-
-ER cal_por(
- VP msg,
- INT *p_rmsgsz,
- ID porid,
- UINT calptn,
- INT cmsgsz
-)
-{
- return E_OK;
-}
-
-/*
- * pcal_por - Poll and Call Port for Rendezvous
- */
-
-ER pcal_por(
- VP msg,
- INT *p_rmsgsz,
- ID porid,
- UINT calptn,
- INT cmsgsz
-)
-{
- return E_OK;
-}
-
-/*
- * tcal_por - Call Port for Rendezvous with Timeout
- */
-
-ER tcal_por(
- VP msg,
- INT *p_rmsgsz,
- ID porid,
- UINT calptn,
- INT cmsgsz,
- TMO tmout
-)
-{
- return E_OK;
-}
-
-/*
- * acp_por - Accept Port for Rendezvous Poll
- */
-
-ER acp_por(
- RNO *p_rdvno,
- VP msg,
- INT *p_cmsgsz,
- ID porid,
- UINT acpptn
-)
-{
- return E_OK;
-}
-
-/*
- * pacp_por - Poll and Accept Port for Rendezvous
- */
-
-ER pacp_por(
- RNO *p_rdvno,
- VP msg,
- INT *p_cmsgsz,
- ID porid,
- UINT acpptn
-)
-{
- return E_OK;
-}
-
-/*
- * tacp_por - Accept Port for Rendezvous with Timeout
- */
-
-ER tacp_por(
- RNO *p_rdvno,
- VP msg,
- INT *p_cmsgsz,
- ID porid,
- UINT acpptn,
- TMO tmout
-)
-{
- return E_OK;
-}
-
-/*
- * fwd_por - Forward Rendezvous to Other Port
- */
-
-ER fwd_por(
- ID porid,
- UINT calptn,
- RNO rdvno,
- VP msg,
- INT cmsgsz
-)
-{
- return E_OK;
-}
-
-/*
- * rpl_rdv - Reply Rendezvous
- */
-
-ER rpl_rdv(
- RNO rdvno,
- VP msg,
- INT rmsgsz
-)
-{
- return E_OK;
-}
-
-/*
- * ref_por - Reference Port Status
- */
-
-ER ref_por(
- T_RPOR *pk_rpor,
- ID porid
-)
-{
- return E_OK;
-}
-
diff --git a/cpukit/itron/src/prcv_mbf.c b/cpukit/itron/src/prcv_mbf.c
deleted file mode 100644
index d6d03c23e2..0000000000
--- a/cpukit/itron/src/prcv_mbf.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * ITRON Message Buffer Manager
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/itron/msgbuffer.h>
-#include <rtems/itron/task.h>
-
-/*
- * prcv_mbf - Poll and Receive Message from MessageBuffer
- */
-
-ER prcv_mbf(
- VP msg,
- INT *p_msgsz,
- ID mbfid
-)
-{
- return trcv_mbf(msg, p_msgsz, mbfid, TMO_POL);
-}
diff --git a/cpukit/itron/src/prcv_mbx.c b/cpukit/itron/src/prcv_mbx.c
deleted file mode 100644
index de9e0445ee..0000000000
--- a/cpukit/itron/src/prcv_mbx.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * ITRON 3.0 Mailbox Manager
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/itron/mbox.h>
-#include <rtems/itron/task.h>
-
-/*
- * prcv_msg - Poll and Receive Message from Mailbox
- */
-
-ER prcv_msg(
- T_MSG **ppk_msg,
- ID mbxid
-)
-{
- return trcv_msg( ppk_msg, mbxid, TMO_POL );
-}
diff --git a/cpukit/itron/src/preq_sem.c b/cpukit/itron/src/preq_sem.c
deleted file mode 100644
index 4e0803cd9d..0000000000
--- a/cpukit/itron/src/preq_sem.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/itron/semaphore.h>
-#include <rtems/itron/task.h>
-#include <rtems/score/tod.h>
-
-/*
- * preq_sem - Poll and Request Semaphore
- *
- * This function implements the ITRON 3.0 preq_sem() service.
- */
-
-ER preq_sem(
- ID semid
-)
-{
- return twai_sem( semid, TMO_POL );
-}
diff --git a/cpukit/itron/src/psnd_mbf.c b/cpukit/itron/src/psnd_mbf.c
deleted file mode 100644
index 6b833efe4f..0000000000
--- a/cpukit/itron/src/psnd_mbf.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * ITRON Message Buffer Manager
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/itron/msgbuffer.h>
-#include <rtems/itron/task.h>
-
-/*
- * psnd_mbf - Poll and Send Message to MessageBuffer
- */
-
-ER psnd_mbf(
- ID mbfid,
- VP msg,
- INT msgsz
-)
-{
- return tsnd_mbf( mbfid, msg, msgsz, TMO_POL );
-}
diff --git a/cpukit/itron/src/rcv_mbf.c b/cpukit/itron/src/rcv_mbf.c
deleted file mode 100644
index 9bd46317f2..0000000000
--- a/cpukit/itron/src/rcv_mbf.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * ITRON Message Buffer Manager
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/itron/msgbuffer.h>
-#include <rtems/itron/task.h>
-
-/*
- * rcv_mbf - Receive Message from MessageBuffer
- */
-
-ER rcv_mbf(
- VP msg,
- INT *p_msgsz,
- ID mbfid
-)
-{
- return trcv_mbf(msg, p_msgsz, mbfid, TMO_FEVR);
-}
diff --git a/cpukit/itron/src/rcv_mbx.c b/cpukit/itron/src/rcv_mbx.c
deleted file mode 100644
index b91c9311b0..0000000000
--- a/cpukit/itron/src/rcv_mbx.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * ITRON 3.0 Mailbox Manager
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/itron/mbox.h>
-#include <rtems/itron/task.h>
-
-/*
- * rcv_msg - Receive Message from Mailbox
- */
-
-ER rcv_msg(
- T_MSG **ppk_msg,
- ID mbxid
-)
-{
- return trcv_msg( ppk_msg, mbxid, TMO_FEVR );
-}
diff --git a/cpukit/itron/src/ref_mbf.c b/cpukit/itron/src/ref_mbf.c
deleted file mode 100644
index a75f6eb205..0000000000
--- a/cpukit/itron/src/ref_mbf.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * ITRON Message Buffer Manager
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/itron/msgbuffer.h>
-#include <rtems/itron/task.h>
-
-/*
- * ref_mbf - Reference Message Buffer Status
- */
-
-ER ref_mbf(
- T_RMBF *pk_rmbf,
- ID mbfid
-)
-{
- ITRON_Message_buffer_Control *the_message_buffer;
- Objects_Locations location;
- CORE_message_queue_Control *the_core_msgq;
-
- if ( !pk_rmbf )
- return E_PAR; /* XXX check this error code */
-
- the_message_buffer = _ITRON_Message_buffer_Get( mbfid, &location );
- switch ( location ) {
- case OBJECTS_REMOTE: /* Multiprocessing not supported */
- case OBJECTS_ERROR:
- return _ITRON_Message_buffer_Clarify_get_id_error( mbfid );
-
- case OBJECTS_LOCAL:
- the_core_msgq = &the_message_buffer->message_queue;
-
- /*
- * Fill in the size of message to be sent
- */
-
- if (the_core_msgq->number_of_pending_messages == 0) {
- pk_rmbf->msgsz = 0;
- } else {
- pk_rmbf->msgsz = ((CORE_message_queue_Buffer_control *)
- the_core_msgq->Pending_messages.first)->Contents.size;
- }
-
- /*
- * Fill in the size of free buffer
- */
-
- pk_rmbf->frbufsz =
- (the_core_msgq->maximum_pending_messages -
- the_core_msgq->number_of_pending_messages) *
- the_core_msgq->maximum_message_size;
-
-
- /*
- * Fill in whether or not there is a waiting task
- */
-
- if ( !_Thread_queue_First(&the_core_msgq->Wait_queue ) )
- pk_rmbf->wtsk = FALSE;
- else
- pk_rmbf->wtsk = TRUE;
-
- pk_rmbf->stsk = FALSE;
- _Thread_Enable_dispatch();
- return E_OK;
- }
- return E_OK;
-}
diff --git a/cpukit/itron/src/ref_mbx.c b/cpukit/itron/src/ref_mbx.c
deleted file mode 100644
index 847add0c5e..0000000000
--- a/cpukit/itron/src/ref_mbx.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * ITRON 3.0 Mailbox Manager
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/itron/mbox.h>
-#include <rtems/itron/task.h>
-
-/*
- * ref_mbx - Reference Mailbox Status
- */
-
-ER ref_mbx(
- T_RMBX *pk_rmbx,
- ID mbxid
-)
-{
- register ITRON_Mailbox_Control *the_mailbox;
- Objects_Locations location;
- Chain_Control *pending;
-
- if ( !pk_rmbx )
- return E_PAR;
-
- the_mailbox = _ITRON_Mailbox_Get( mbxid, &location );
- switch ( location ) {
- case OBJECTS_REMOTE:
- case OBJECTS_ERROR:
- return _ITRON_Mailbox_Clarify_get_id_error( mbxid );
-
- case OBJECTS_LOCAL:
-
- pending = &the_mailbox->message_queue.Pending_messages;
- if ( _Chain_Is_empty( pending ) )
- pk_rmbx->pk_msg = NULL;
- else
- pk_rmbx->pk_msg = (T_MSG *) pending->first;
-
- /*
- * Fill in whether or not there is a waiting task
- */
-
- if ( !_Thread_queue_First( &the_mailbox->message_queue.Wait_queue ) )
- pk_rmbx->wtsk = FALSE;
- else
- pk_rmbx->wtsk = TRUE;
-
- break;
- }
- _ITRON_return_errorno( E_OK );
-}
-
diff --git a/cpukit/itron/src/ref_sem.c b/cpukit/itron/src/ref_sem.c
deleted file mode 100644
index 1d71356db4..0000000000
--- a/cpukit/itron/src/ref_sem.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/itron/semaphore.h>
-#include <rtems/itron/task.h>
-#include <rtems/score/tod.h>
-
-/*
- * ref_sem - Reference Semaphore Status
- *
- * This function implements the ITRON 3.0 ref_sem() service.
- */
-
-ER ref_sem(
- ID semid,
- T_RSEM *pk_rsem
-)
-{
- ITRON_Semaphore_Control *the_semaphore;
- Objects_Locations location;
-
- if ( !pk_rsem )
- return E_PAR; /* XXX check this error code */
-
- the_semaphore = _ITRON_Semaphore_Get( semid, &location );
- switch ( location ) {
- case OBJECTS_REMOTE: /* Multiprocessing not supported */
- case OBJECTS_ERROR:
- return _ITRON_Semaphore_Clarify_get_id_error( semid );
-
- case OBJECTS_LOCAL:
- /*
- * Fill in the current semaphore count
- */
-
- pk_rsem->semcnt = _CORE_semaphore_Get_count( &the_semaphore->semaphore );
-
- /*
- * Fill in whether or not there is a waiting task
- */
-
- if ( !_Thread_queue_First( &the_semaphore->semaphore.Wait_queue ) )
- pk_rsem->wtsk = FALSE;
- else
- pk_rsem->wtsk = TRUE;
-
- _Thread_Enable_dispatch();
- return E_OK;
- }
- return E_OK;
-}
-
diff --git a/cpukit/itron/src/ref_tsk.c b/cpukit/itron/src/ref_tsk.c
deleted file mode 100644
index 552ce9652b..0000000000
--- a/cpukit/itron/src/ref_tsk.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/score/thread.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/sysstate.h>
-
-#include <rtems/itron/task.h>
-
-
-/*
- * ref_tsk - Reference Task Status
- */
-
-ER ref_tsk(
- T_RTSK *pk_rtsk,
- ID tskid
-)
-{
- register Thread_Control *the_thread;
- Objects_Locations location;
- Priority_Control core_priority;
-
- if (!pk_rtsk)
- return E_PAR;
-
- the_thread = _ITRON_Task_Get( tskid, &location );
- switch ( location ) {
- case OBJECTS_REMOTE:
- case OBJECTS_ERROR:
- return _ITRON_Task_Clarify_get_id_error( tskid );
-
- case OBJECTS_LOCAL:
-
- if ( location != OBJECTS_LOCAL )
- return _ITRON_Task_Clarify_get_id_error( tskid );
-
- /*
- * The following are extended functions [level X ].
- * XXX - tskwait, wid, wupcnt, and tskatr are presently not implemented.
- */
-
- pk_rtsk->tskwait = 0;
- pk_rtsk->wid = 0;
- pk_rtsk->wupcnt = 0;
- pk_rtsk->suscnt = the_thread->suspend_count;
- pk_rtsk->tskatr = 0; /* XXX - Not correctly implemented */
- pk_rtsk->task = (FP) the_thread->Start.entry_point;
- core_priority = the_thread->Start.initial_priority;
- pk_rtsk->itskpri = _ITRON_Task_Core_to_Priority( core_priority );
- pk_rtsk->stksz = the_thread->Start.Initial_stack.size;
-
- /*
- * The following are required.
- */
-
- pk_rtsk->exinf = NULL; /* extended information */
- pk_rtsk->tskpri =
- _ITRON_Task_Core_to_Priority(the_thread->current_priority);
-
- /*
- * Mask in the tskstat information
- * Convert the task state XXX double check this
- */
-
- pk_rtsk->tskstat = 0;
- if ( the_thread == _Thread_Executing )
- pk_rtsk->tskstat |= TTS_RUN;
- if ( _States_Is_ready(the_thread->current_state) )
- pk_rtsk->tskstat |= TTS_RDY;
- if ( _States_Is_dormant( the_thread->current_state) )
- pk_rtsk->tskstat |= TTS_DMT;
- if ( _States_Is_suspended(the_thread->current_state) )
- pk_rtsk->tskstat |= TTS_SUS;
- if ( _States_Is_blocked(the_thread->current_state) )
- pk_rtsk->tskstat |= TTS_WAI;
-
- break;
- }
-
- _ITRON_return_errorno( E_OK );
-
-}
-
-
-
-
diff --git a/cpukit/itron/src/rel_wai.c b/cpukit/itron/src/rel_wai.c
deleted file mode 100644
index e98ea22265..0000000000
--- a/cpukit/itron/src/rel_wai.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/score/thread.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/sysstate.h>
-
-#include <rtems/itron/task.h>
-
-/*
- * rel_wai - Release Wait of Other Task
- */
-
-ER rel_wai(
- ID tskid
-)
-{
- register Thread_Control *the_thread;
- Objects_Locations location;
-
- the_thread = _ITRON_Task_Get( tskid, &location );
- switch ( location ) {
- case OBJECTS_REMOTE:
- case OBJECTS_ERROR:
- return _ITRON_Task_Clarify_get_id_error( tskid );
-
- case OBJECTS_LOCAL:
- /*
- * XXX - FILL ME IN.
- */
-
- break;
- }
-
- _ITRON_return_errorno( E_OK );
-}
-
-
-
diff --git a/cpukit/itron/src/rot_rdq.c b/cpukit/itron/src/rot_rdq.c
deleted file mode 100644
index a9b1df80db..0000000000
--- a/cpukit/itron/src/rot_rdq.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/score/thread.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/sysstate.h>
-
-#include <rtems/itron/task.h>
-
-/*
- * rot_rdq - Rotate Tasks on the Ready Queue
- */
-
-ER rot_rdq(
- PRI tskpri
-)
-{
- PRI priority;
-
-
- if (( tskpri <= 0 ) || ( tskpri >= 256 ))
- return E_PAR;
-
- _Thread_Disable_dispatch();
-
- /*
- * Yield of processor will rotate the queue for this processor.
- */
-
- priority = _ITRON_Task_Core_to_Priority(_Thread_Executing->current_priority);
- if ( priority == tskpri )
- _Thread_Yield_processor();
- else {
- _Thread_Rotate_Ready_Queue( _ITRON_Task_Core_to_Priority( tskpri ) );
- }
- _Thread_Enable_dispatch();
-
- return E_OK;
-}
-
-
diff --git a/cpukit/itron/src/rsm_tsk.c b/cpukit/itron/src/rsm_tsk.c
deleted file mode 100644
index da761fbbe7..0000000000
--- a/cpukit/itron/src/rsm_tsk.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/score/thread.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/sysstate.h>
-
-#include <rtems/itron/task.h>
-
-
-/*
- * rsm_tsk - Resume Suspended Task
- */
-
-ER rsm_tsk(
- ID tskid
-)
-{
- register Thread_Control *the_thread;
- Objects_Locations location;
-
- the_thread = _ITRON_Task_Get( tskid, &location );
- switch ( location ) {
- case OBJECTS_REMOTE:
- case OBJECTS_ERROR:
- return _ITRON_Task_Clarify_get_id_error( tskid );
-
- case OBJECTS_LOCAL:
-
- if ( _Thread_Is_executing( the_thread ) )
- _ITRON_return_errorno( E_OBJ );
-
- if ( _States_Is_dormant( the_thread->current_state ))
- _ITRON_return_errorno( E_OBJ );
-
- if ( ! _States_Is_suspended(the_thread->current_state) )
- _ITRON_return_errorno( E_OK );
-
- _Thread_Resume( the_thread, FALSE );
- break;
- }
-
- _ITRON_return_errorno( E_OK );
-}
-
diff --git a/cpukit/itron/src/sig_sem.c b/cpukit/itron/src/sig_sem.c
deleted file mode 100644
index cf31bdb8f6..0000000000
--- a/cpukit/itron/src/sig_sem.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/itron/semaphore.h>
-#include <rtems/itron/task.h>
-#include <rtems/score/tod.h>
-
-/*
- * sig_sem - Signal Semaphore
- *
- * This function implements the ITRON 3.0 sig_sem() service.
- */
-
-ER sig_sem(
- ID semid
-)
-{
- ITRON_Semaphore_Control *the_semaphore;
- Objects_Locations location;
- CORE_semaphore_Status status;
-
- the_semaphore = _ITRON_Semaphore_Get( semid, &location );
- switch ( location ) {
- case OBJECTS_REMOTE: /* Multiprocessing not supported */
- case OBJECTS_ERROR:
- return _ITRON_Semaphore_Clarify_get_id_error( semid );
-
- case OBJECTS_LOCAL:
- /*
- * XXX maxsemcnt
- */
-
- status = _CORE_semaphore_Surrender(
- &the_semaphore->semaphore,
- the_semaphore->Object.id,
- NULL /* Multiprocessing not supported */
- );
- _Thread_Enable_dispatch();
- return _ITRON_Semaphore_Translate_core_semaphore_return_code( status );
- }
- return E_OK;
-}
diff --git a/cpukit/itron/src/slp_tsk.c b/cpukit/itron/src/slp_tsk.c
deleted file mode 100644
index 7fa312146f..0000000000
--- a/cpukit/itron/src/slp_tsk.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/score/thread.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/sysstate.h>
-
-#include <rtems/itron/task.h>
-
-
-
-/*
- * slp_tsk - Sleep Task
- */
-
-ER slp_tsk( void )
-{
- return E_OK;
-}
diff --git a/cpukit/itron/src/snd_mbf.c b/cpukit/itron/src/snd_mbf.c
deleted file mode 100644
index 87fa5ca1e6..0000000000
--- a/cpukit/itron/src/snd_mbf.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * ITRON Message Buffer Manager
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/itron/msgbuffer.h>
-#include <rtems/itron/task.h>
-
-/*
- * snd_mbf - Send Message to MessageBuffer
- */
-
-ER snd_mbf(
- ID mbfid,
- VP msg,
- INT msgsz
-)
-{
- return tsnd_mbf( mbfid, msg, msgsz, TMO_FEVR );
-}
diff --git a/cpukit/itron/src/snd_mbx.c b/cpukit/itron/src/snd_mbx.c
deleted file mode 100644
index e02714465e..0000000000
--- a/cpukit/itron/src/snd_mbx.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * ITRON 3.0 Mailbox Manager
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/itron/mbox.h>
-#include <rtems/itron/task.h>
-
-/*
- * snd_msg - Send Message to Mailbox
- */
-
-ER snd_msg(
- ID mbxid,
- T_MSG *pk_msg
-)
-{
- register ITRON_Mailbox_Control *the_mailbox;
- Objects_Locations location;
- unsigned32 message_priority;
- void *message_contents;
-
- if ( !pk_msg )
- return E_PAR;
-
- the_mailbox = _ITRON_Mailbox_Get( mbxid, &location );
- switch ( location ) {
- case OBJECTS_REMOTE:
- case OBJECTS_ERROR:
- return _ITRON_Mailbox_Clarify_get_id_error( mbxid );
-
- case OBJECTS_LOCAL:
- if ( the_mailbox->do_message_priority )
- message_priority = pk_msg->msgpri;
- else
- message_priority = CORE_MESSAGE_QUEUE_SEND_REQUEST;
-
- message_contents = pk_msg;
- _CORE_message_queue_Submit(
- &the_mailbox->message_queue,
- &message_contents,
- sizeof(T_MSG *),
- the_mailbox->Object.id,
- NULL, /* multiprocessing not supported */
- message_priority,
- FALSE, /* do not allow sender to block */
- 0 /* no timeout */
- );
- break;
- }
-
- _ITRON_return_errorno(
- _ITRON_Mailbox_Translate_core_message_queue_return_code(
- _Thread_Executing->Wait.return_code
- )
- );
-}
diff --git a/cpukit/itron/src/sta_tsk.c b/cpukit/itron/src/sta_tsk.c
deleted file mode 100644
index e30ebbcf58..0000000000
--- a/cpukit/itron/src/sta_tsk.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/score/thread.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/sysstate.h>
-
-#include <rtems/itron/task.h>
-
-
-/*
- * sta_tsk - Start Task
- */
-
-ER sta_tsk(
- ID tskid,
- INT stacd
-)
-{
- register Thread_Control *the_thread;
- Objects_Locations location;
- boolean status;
-
- the_thread = _ITRON_Task_Get( tskid, &location );
- switch ( location ) {
- case OBJECTS_REMOTE:
- case OBJECTS_ERROR:
- return _ITRON_Task_Clarify_get_id_error( tskid );
-
- case OBJECTS_LOCAL:
-
- if ( !_States_Is_dormant( the_thread->current_state ) )
- _ITRON_return_errorno( E_OBJ );
-
- status = _Thread_Start(
- the_thread,
- THREAD_START_NUMERIC, /* XXX should be able to say we have no arg */
- the_thread->Start.entry_point,
- 0, /* XXX supercore forces us to have an arg */
- 0 /* unused */
- );
-
- /*
- * This error can not happen entry_point is checked in create.
- if ( !status )
- _ITRON_return_errorno( E_OBJ );
- */
-
- break;
- }
-
- _ITRON_return_errorno( E_OK );
-}
-
-
-
-
diff --git a/cpukit/itron/src/sus_tsk.c b/cpukit/itron/src/sus_tsk.c
deleted file mode 100644
index 3143513f53..0000000000
--- a/cpukit/itron/src/sus_tsk.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <limits.h>
-#include <itron.h>
-
-#include <rtems/score/thread.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/sysstate.h>
-
-#include <rtems/itron/task.h>
-
-
-/*
- * Task-Dependent Synchronization Functions
- */
-
-/*
- * sus_tsk - Suspend Other Task
- */
-
-ER sus_tsk(
- ID tskid
-)
-{
- register Thread_Control *the_thread;
- Objects_Locations location;
-
- the_thread = _ITRON_Task_Get( tskid, &location );
- switch ( location ) {
- case OBJECTS_REMOTE:
- case OBJECTS_ERROR:
- return _ITRON_Task_Clarify_get_id_error( tskid );
-
- case OBJECTS_LOCAL:
-
- if ( _Thread_Is_executing( the_thread ) )
- _ITRON_return_errorno( E_OBJ );
-
- if (the_thread->suspend_count == INT_MAX )
- _ITRON_return_errorno( E_QOVR );
-
- _Thread_Suspend( the_thread );
- break;
- }
-
- _ITRON_return_errorno( E_OK );
-}
-
-
-
-
-
-
-
diff --git a/cpukit/itron/src/sysmgmt.c b/cpukit/itron/src/sysmgmt.c
deleted file mode 100644
index 45704707d0..0000000000
--- a/cpukit/itron/src/sysmgmt.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/itron/sysmgmt.h>
-
-/*
- * get_ver - Get Version Information
- */
-
-ER get_ver(
- T_VER *pk_ver
-)
-{
- return E_OK;
-}
-
-/*
- * ref_sys - Reference System Status
- */
-
-ER ref_sys(
- T_RSYS *pk_rsys
-)
-{
- return E_OK;
-}
-
-/*
- * ref_cfg - Reference Configuration Information
- */
-
-ER ref_cfg(
- T_RCFG *pk_rcfg
-)
-{
- return E_OK;
-}
-
-/*
- * def_svc - Define Extended SVC Handler
- */
-
-ER def_svc(
- FN s_fncd,
- T_DSVC *pk_dsvc
-)
-{
- return E_OK;
-}
-
-/*
- * def_exc - Define Exception Handler
- */
-
-ER def_exc(
- UINT exckind,
- T_DEXC *pk_dexc
-)
-{
- return E_OK;
-}
-
diff --git a/cpukit/itron/src/task.c b/cpukit/itron/src/task.c
deleted file mode 100644
index e8f3b5ff70..0000000000
--- a/cpukit/itron/src/task.c
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/score/thread.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/sysstate.h>
-
-#include <rtems/itron/task.h>
-
-/*
- * _ITRON_Task_Create_extension
- *
- * This routine is an extension routine that is invoked as part
- * of creating any type of task or thread in the system. If the
- * task is created via another API, then this routine is invoked
- * and this API given the opportunity to initialize its extension
- * area.
- */
-
-boolean _ITRON_Task_Create_extension(
- Thread_Control *executing,
- Thread_Control *created
-)
-{
- ITRON_API_Control *api;
-
- api = _Workspace_Allocate( sizeof( ITRON_API_Control ) );
-
- if ( !api )
- return FALSE;
-
- created->API_Extensions[ THREAD_API_ITRON ] = api;
-
- /*
- * Initialize the ITRON API extension
- */
-
- return TRUE;
-}
-
-/*
- * _ITRON_Task_Delete_extension
- *
- * This extension routine is invoked when a task is deleted.
- */
-
-User_extensions_routine _ITRON_Task_Delete_extension(
- Thread_Control *executing,
- Thread_Control *deleted
-)
-{
- (void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_ITRON ] );
-
- deleted->API_Extensions[ THREAD_API_ITRON ] = NULL;
-}
-
-/*
- * _ITRON_Task_Initialize_user_tasks
- *
- * This routine creates and starts all configured user
- * initialzation threads.
- */
-
-void _ITRON_Task_Initialize_user_tasks( void )
-{
- unsigned32 index;
- unsigned32 maximum;
- ER return_value;
- itron_initialization_tasks_table *user_tasks;
-
- /*
- * NOTE: This is slightly different from the Ada implementation.
- */
-
- user_tasks = _ITRON_Task_User_initialization_tasks;
- maximum = _ITRON_Task_Number_of_initialization_tasks;
-
- if ( !user_tasks || maximum == 0 )
- return;
-
- for ( index=0 ; index < maximum ; index++ ) {
-
- return_value = cre_tsk(
- user_tasks[ index ].id,
- &user_tasks[ index ].attributes
- );
-
- if ( return_value != E_OK )
- _Internal_error_Occurred( INTERNAL_ERROR_ITRON_API, TRUE, return_value );
-
- return_value = sta_tsk( user_tasks[ index ].id, 0 );
-
- if ( return_value != E_OK )
- _Internal_error_Occurred( INTERNAL_ERROR_ITRON_API, TRUE, return_value );
-
- }
-}
-
-/*PAGE
- *
- * _ITRON_Delete_task
- */
-
-ER _ITRON_Delete_task(
- Thread_Control *the_thread
-)
-{
- Objects_Information *the_information;
-
- the_information = _Objects_Get_information( the_thread->Object.id );
- if ( !the_information ) {
- return E_OBJ; /* XXX - should never happen */
- }
-
- _Thread_Close( the_information, the_thread );
-
- _ITRON_Task_Free( the_thread );
-
- return E_OK;
-}
-
-/*
- * At this point in time, the ITRON API does not need any other
- * extensions. See the POSIX and RTEMS API extensions for
- * examples of how they can be used.
- */
-
-/*
- * Extension Tables
- */
-
-API_extensions_Control _ITRON_Task_API_extensions = {
- { NULL, NULL },
- NULL, /* predriver */
- _ITRON_Task_Initialize_user_tasks, /* postdriver */
- NULL /* post switch */
-};
-
-User_extensions_Control _ITRON_Task_User_extensions = {
- { NULL, NULL },
- { _ITRON_Task_Create_extension, /* create */
- NULL, /* start */
- NULL, /* restart */
- _ITRON_Task_Delete_extension, /* delete */
- NULL, /* switch */
- NULL, /* begin */
- NULL, /* exitted */
- NULL /* fatal */
- }
-};
-
-/*
- * _ITRON_Task_Manager_initialization
- *
- * This routine initializes all Task Manager related data structures.
- *
- * Input parameters:
- * maximum_tasks - number of tasks to initialize
- *
- * Output parameters: NONE
- */
-
-void _ITRON_Task_Manager_initialization(
- unsigned32 maximum_tasks,
- unsigned32 number_of_initialization_tasks,
- itron_initialization_tasks_table *user_tasks
-)
-{
-
- _ITRON_Task_Number_of_initialization_tasks = number_of_initialization_tasks;
- _ITRON_Task_User_initialization_tasks = user_tasks;
-
- /*
- * There may not be any ITRON_initialization tasks configured.
- */
-
-#if 0
- if ( user_tasks == NULL || number_of_initialization_tasks == 0 )
- _Internal_error_Occurred( INTERNAL_ERROR_ITRON_API, TRUE, -1 );
-#endif
-
- _Objects_Initialize_information(
- &_ITRON_Task_Information, /* object information table */
- OBJECTS_ITRON_TASKS, /* object class */
- FALSE, /* TRUE if this is a global object class */
- maximum_tasks, /* maximum objects of this class */
- sizeof( Thread_Control ), /* size of this object's control block */
- FALSE, /* TRUE if names for this object are strings */
- ITRON_MAXIMUM_NAME_LENGTH, /* maximum length of each object's name */
- TRUE /* TRUE if this class is threads */
- );
-
- /*
- * Add all the extensions for this API
- */
-
- _User_extensions_Add_API_set( &_ITRON_Task_User_extensions );
-
- _API_extensions_Add( &_ITRON_Task_API_extensions );
-
- /*
- * XXX MP not supported
- * Register the MP Process Packet routine.
- */
-
-}
diff --git a/cpukit/itron/src/ter_tsk.c b/cpukit/itron/src/ter_tsk.c
deleted file mode 100644
index ae272e0857..0000000000
--- a/cpukit/itron/src/ter_tsk.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/score/thread.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/sysstate.h>
-
-#include <rtems/itron/task.h>
-
-
-/*
- * ter_tsk - Terminate Other Task - Set State to DORMANT
- */
-
-ER ter_tsk(
- ID tskid
-)
-{
- register Thread_Control *the_thread;
- Objects_Locations location;
-
- the_thread = _ITRON_Task_Get( tskid, &location );
- switch ( location ) {
- case OBJECTS_REMOTE:
- case OBJECTS_ERROR:
- return _ITRON_Task_Clarify_get_id_error( tskid );
-
- case OBJECTS_LOCAL:
-
- if ( _Thread_Is_executing( the_thread ) )
- _ITRON_return_errorno( E_OBJ );
-
- if ( _States_Is_dormant( the_thread->current_state ) )
- _ITRON_return_errorno( E_OBJ );
-
- _Thread_Restart( the_thread, NULL, 0 );
- _Thread_Set_state( the_thread, STATES_DORMANT );
- break;
- }
-
- _ITRON_return_errorno( E_OK );
-}
-
-
-
-
-
-
-
diff --git a/cpukit/itron/src/trcv_mbf.c b/cpukit/itron/src/trcv_mbf.c
deleted file mode 100644
index 0b2b89e612..0000000000
--- a/cpukit/itron/src/trcv_mbf.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * ITRON Message Buffer Manager
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/itron/msgbuffer.h>
-#include <rtems/itron/task.h>
-
-/*
- * trcv_mbf - Receive Message from MessageBuffer with Timeout
- */
-
-ER trcv_mbf(
- VP msg,
- INT *p_msgsz,
- ID mbfid,
- TMO tmout
-)
-{
- ITRON_Message_buffer_Control *the_message_buffer;
- Objects_Locations location;
- CORE_message_queue_Status status;
- boolean wait;
- Watchdog_Interval interval;
-
- interval = 0;
- if (tmout == TMO_POL) {
- wait = FALSE;
- } else {
- wait = TRUE;
- if (tmout != TMO_FEVR)
- interval = TOD_MILLISECONDS_TO_TICKS(tmout);
- }
-
- if (wait && _ITRON_Is_in_non_task_state() )
- return E_CTX;
-
- if (!p_msgsz || !msg || tmout <= -2)
- return E_PAR;
-
- the_message_buffer = _ITRON_Message_buffer_Get(mbfid, &location);
- switch (location) {
- case OBJECTS_REMOTE:
- case OBJECTS_ERROR: /* Multiprocessing not supported */
- return _ITRON_Message_buffer_Clarify_get_id_error(mbfid);
-
- case OBJECTS_LOCAL:
- _CORE_message_queue_Seize(
- &the_message_buffer->message_queue,
- the_message_buffer->Object.id,
- msg,
- p_msgsz,
- wait,
- interval
- );
- _Thread_Enable_dispatch();
- status = (CORE_message_queue_Status)_Thread_Executing->Wait.return_code;
- return
- _ITRON_Message_buffer_Translate_core_message_buffer_return_code(status);
- }
-
- /*
- * If multiprocessing were supported, this is where we would announce
- * the existence of the semaphore to the rest of the system.
- */
-
-#if defined(RTEMS_MULTIPROCESSING)
-#endif
- return E_OK;
-}
diff --git a/cpukit/itron/src/trcv_mbx.c b/cpukit/itron/src/trcv_mbx.c
deleted file mode 100644
index 0c4350bb04..0000000000
--- a/cpukit/itron/src/trcv_mbx.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * ITRON 3.0 Mailbox Manager
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/itron/mbox.h>
-#include <rtems/itron/task.h>
-
-/*
- * trcv_msg - Receive Message from Mailbox with Timeout
- */
-
-ER trcv_msg(
- T_MSG **ppk_msg,
- ID mbxid,
- TMO tmout
-)
-{
- register ITRON_Mailbox_Control *the_mailbox;
- Watchdog_Interval interval;
- boolean wait;
- Objects_Locations location;
- unsigned32 size;
-
- if (!ppk_msg)
- return E_PAR;
-
- interval = 0;
- if ( tmout == TMO_POL ) {
- wait = FALSE;
- } else {
- wait = TRUE;
- if ( tmout != TMO_FEVR )
- interval = TOD_MILLISECONDS_TO_TICKS(tmout);
- }
-
- if ( wait && _ITRON_Is_in_non_task_state() )
- return E_CTX;
-
- the_mailbox = _ITRON_Mailbox_Get( mbxid, &location );
- switch ( location ) {
- case OBJECTS_REMOTE:
- case OBJECTS_ERROR:
- return _ITRON_Mailbox_Clarify_get_id_error( mbxid );
-
- case OBJECTS_LOCAL:
-
- _CORE_message_queue_Seize(
- &the_mailbox->message_queue,
- the_mailbox->Object.id,
- ppk_msg,
- &size,
- wait,
- interval
- );
- break;
- }
-
- _ITRON_return_errorno(
- _ITRON_Mailbox_Translate_core_message_queue_return_code(
- _Thread_Executing->Wait.return_code ) );
-}
diff --git a/cpukit/itron/src/tslp_tsk.c b/cpukit/itron/src/tslp_tsk.c
deleted file mode 100644
index 728a007a1b..0000000000
--- a/cpukit/itron/src/tslp_tsk.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/score/thread.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/sysstate.h>
-
-#include <rtems/itron/task.h>
-
-
-/*
- * tslp_tsk - Sleep Task with Timeout
- */
-
-ER tslp_tsk(
- TMO tmout
-)
-{
- return E_OK;
-}
-
-
diff --git a/cpukit/itron/src/tsnd_mbf.c b/cpukit/itron/src/tsnd_mbf.c
deleted file mode 100644
index 0ed3b4f90e..0000000000
--- a/cpukit/itron/src/tsnd_mbf.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * ITRON Message Buffer Manager
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/itron/msgbuffer.h>
-#include <rtems/itron/task.h>
-
-#include <assert.h> /* only for blocking */
-
-/*
- * tsnd_mbf - Send Message to MessageBuffer with Timeout
- */
-
-ER tsnd_mbf(
- ID mbfid,
- VP msg,
- INT msgsz,
- TMO tmout
-)
-{
- ITRON_Message_buffer_Control *the_message_buffer;
- Objects_Locations location;
- Watchdog_Interval interval;
- boolean wait;
-
- if (msgsz <= 0 || !msg)
- return E_PAR;
-
- interval = 0;
- if ( tmout == TMO_POL ) {
- wait = FALSE;
- } else {
- wait = TRUE;
- if ( tmout != TMO_FEVR )
- interval = TOD_MILLISECONDS_TO_TICKS(tmout);
- }
-
- if ( wait && _ITRON_Is_in_non_task_state() )
- return E_CTX;
-
- the_message_buffer = _ITRON_Message_buffer_Get(mbfid, &location);
- switch (location) {
- case OBJECTS_REMOTE:
- case OBJECTS_ERROR: /* Multiprocessing not supported */
- return _ITRON_Message_buffer_Clarify_get_id_error(mbfid);
-
- case OBJECTS_LOCAL:
- /* XXX Submit needs to take into account blocking */
- _CORE_message_queue_Submit(
- &the_message_buffer->message_queue,
- msg,
- msgsz,
- the_message_buffer->Object.id,
- NULL,
- CORE_MESSAGE_QUEUE_SEND_REQUEST,
- wait, /* sender may block */
- interval /* timeout interval */
- );
- _Thread_Enable_dispatch();
- return _ITRON_Message_buffer_Translate_core_message_buffer_return_code(
- _Thread_Executing->Wait.return_code
- );
- }
-
- /*
- * If multiprocessing were supported, this is where we would announce
- * the existence of the semaphore to the rest of the system.
- */
-
-#if defined(RTEMS_MULTIPROCESSING)
-#endif
-
- return E_OK;
-}
diff --git a/cpukit/itron/src/twai_sem.c b/cpukit/itron/src/twai_sem.c
deleted file mode 100644
index f55916a22b..0000000000
--- a/cpukit/itron/src/twai_sem.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/itron/semaphore.h>
-#include <rtems/itron/task.h>
-#include <rtems/score/tod.h>
-
-/*
- * twai_sem - Wait on Semaphore with Timeout
- *
- * This function implements the ITRON 3.0 twai_sem() service.
- */
-
-ER twai_sem(
- ID semid,
- TMO tmout
-)
-{
- ITRON_Semaphore_Control *the_semaphore;
- Objects_Locations location;
- Watchdog_Interval interval;
- boolean wait;
- CORE_semaphore_Status status;
-
- interval = 0;
- if ( tmout == TMO_POL ) {
- wait = FALSE;
- } else {
- wait = TRUE;
- if ( tmout != TMO_FEVR )
- interval = TOD_MILLISECONDS_TO_TICKS(tmout);
- }
-
- if ( wait && _ITRON_Is_in_non_task_state() )
- return E_CTX;
-
- the_semaphore = _ITRON_Semaphore_Get( semid, &location );
- switch ( location ) {
- case OBJECTS_REMOTE: /* Multiprocessing not supported */
- case OBJECTS_ERROR:
- return _ITRON_Semaphore_Clarify_get_id_error( semid );
-
- case OBJECTS_LOCAL:
- _CORE_semaphore_Seize(
- &the_semaphore->semaphore,
- the_semaphore->Object.id,
- wait, /* wait for a timeout */
- interval /* timeout value */
- );
- _Thread_Enable_dispatch();
- status = (CORE_semaphore_Status) _Thread_Executing->Wait.return_code;
- return _ITRON_Semaphore_Translate_core_semaphore_return_code( status );
- }
- return E_OK;
-}
diff --git a/cpukit/itron/src/vmempool.c b/cpukit/itron/src/vmempool.c
deleted file mode 100644
index d1a7d8a4a7..0000000000
--- a/cpukit/itron/src/vmempool.c
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/itron/vmempool.h>
-
-/*
- * _ITRON_Variable_memory_pool_Manager_initialization
- *
- * This routine initializes all variable memory pool manager related
- * data structures.
- *
- * Input parameters:
- * maximum_variable_memory_pools - maximum configured variable memory pools
- *
- * Output parameters: NONE
- */
-
-void _ITRON_Variable_memory_pool_Manager_initialization(
- unsigned32 maximum_variable_memory_pools
-)
-{
- _Objects_Initialize_information(
- &_ITRON_Variable_memory_pool_Information, /* object information table */
- OBJECTS_ITRON_VARIABLE_MEMORY_POOLS, /* object class */
- FALSE, /* TRUE if this is a global */
- /* object class */
- maximum_variable_memory_pools, /* maximum objects of this class */
- sizeof( ITRON_Variable_memory_pool_Control ),
- /* size of this object's control block */
- FALSE, /* TRUE if names for this object */
- /* are strings */
- RTEMS_MAXIMUM_NAME_LENGTH, /* maximum length of each object's */
- /* name */
- FALSE /* TRUE if this class is threads */
- );
-
- /*
- * Register the MP Process Packet routine.
- *
- * NOTE: No MP Support YET in RTEMS ITRON implementation.
- */
-
-}
-
-/*
- * cre_mpl - Create Variable-Size Memorypool
- */
-
-ER cre_mpl(
- ID mplid,
- T_CMPL *pk_cmpl
-)
-{
- return E_OK;
-}
-
-/*
- * del_mpl - Delete Variable-Size Memorypool
- */
-
-ER del_mpl(
- ID mplid
-)
-{
- return E_OK;
-}
-
-/*
- * get_blk - Get Variable-Size Memory Block
- */
-
-ER get_blk(
- VP *p_blk,
- ID mplid,
- INT blksz
-)
-{
- return E_OK;
-}
-
-/*
- * pget_blk - Poll and Get Variable-Size Memory Block
- */
-
-ER pget_blk(
- VP *p_blk,
- ID mplid,
- INT blksz
-)
-{
- return E_OK;
-}
-
-/*
- * tget_blk - Get Variable-Size Memory Block with Timeout
- */
-
-ER tget_blk(
- VP *p_blk,
- ID mplid,
- INT blksz,
- TMO tmout
-)
-{
- return E_OK;
-}
-
-/*
- * rel_blk - Release Variable-Size Memory Block
- */
-
-ER rel_blk(
- ID mplid,
- VP blk
-)
-{
- return E_OK;
-}
-
-/*
- * ref_mpl - Reference Variable-Size Memorypool Status
- */
-
-ER ref_mpl(
- T_RMPL *pk_rmpl,
- ID mplid
-)
-{
- return E_OK;
-}
-
diff --git a/cpukit/itron/src/wai_sem.c b/cpukit/itron/src/wai_sem.c
deleted file mode 100644
index 5ac4dc61a3..0000000000
--- a/cpukit/itron/src/wai_sem.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/itron/semaphore.h>
-#include <rtems/itron/task.h>
-#include <rtems/score/tod.h>
-
-/*
- * wai_sem - Wait on Semaphore
- *
- * This function implements the ITRON 3.0 wai_sem() service.
- */
-
-ER wai_sem(
- ID semid
-)
-{
- return twai_sem( semid, TMO_FEVR );
-}
diff --git a/cpukit/itron/src/wup_tsk.c b/cpukit/itron/src/wup_tsk.c
deleted file mode 100644
index b51646b3dd..0000000000
--- a/cpukit/itron/src/wup_tsk.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <itron.h>
-
-#include <rtems/score/thread.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/sysstate.h>
-
-#include <rtems/itron/task.h>
-
-
-/*
- * wup_tsk - Wakeup Other Task
- */
-
-ER wup_tsk(
- ID tskid
-)
-{
- return E_OK;
-}
-
diff --git a/cpukit/libcsupport/Makefile.am b/cpukit/libcsupport/Makefile.am
deleted file mode 100644
index f65729290b..0000000000
--- a/cpukit/libcsupport/Makefile.am
+++ /dev/null
@@ -1,12 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-
-SUBDIRS = include libc libcpu libbsp \
- $(LIBHWAPI)
-
-include $(top_srcdir)/../../../automake/subdirs.am
-include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/libcsupport/include/chain.h b/cpukit/libcsupport/include/chain.h
deleted file mode 100644
index 98cf2b1a86..0000000000
--- a/cpukit/libcsupport/include/chain.h
+++ /dev/null
@@ -1,362 +0,0 @@
-/* chain.h
- *
- * This include file contains all the constants and structures associated
- * with doubly linked chains. This file actually just provides an
- * interface to the chain object in rtems.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $ld:
- */
-
-#ifndef __CHAIN_h
-#define __CHAIN_h
-
-#include <rtems.h>
-
-/*
- * Chain_Initialize
- *
- * This routine initializes the_chain structure to manage the
- * contiguous array of number_nodes nodes which starts at
- * starting_address. Each node is of node_size bytes.
- *
- * Chain_Control *the_chain, * IN *
- * void *starting_address, * IN *
- * rtems_unsigned32 number_nodes, * IN *
- * rtems_unsigned32 node_size * IN *
- */
-
-#define Chain_Initialize( the_chain, starting_address, \
- number_nodes, node_size ) \
- _Chain_Initialize( the_chain, starting_address, \
- number_nodes, node_size ) \
-
-
-/*
- * Chain_Initialize_empty
- *
- * This routine initializes the specified chain to contain zero nodes.
- *
- * Chain_Control *the_chain * IN *
- */
-
-#define Chain_Initialize_empty( the_chain ) \
- _Chain_Initialize_empty( the_chain )
-
-
-/*
- * Chain_Are_nodes_equal
- *
- * This function returns TRUE if LEFT and RIGHT are equal,
- * and FALSE otherwise.
- *
- * Chain_Node *left, * IN *
- * Chain_Node *right * IN *
- */
-
-#define Chain_Are_nodes_equal( left, right ) \
- _Chain_Are_nodes_equal( left, right )
-
-
-/*
- * Chain_Extract_unprotected
- *
- * This routine extracts the_node from the chain on which it resides.
- * It does NOT disable interrupts to insure the atomicity of the
- * extract operation.
- *
- * Chain_Node *the_node * IN *
- */
-
-#define Chain_Extract_unprotected( the_node ) \
- _Chain_Extract_unprotected( the_node )
-
-
-/*
- * Chain_Extract
- *
- * This routine extracts the_node from the chain on which it resides.
- * It disables interrupts to insure the atomicity of the
- * extract operation.
- *
- * Chain_Node *the_node * IN *
- */
-
-#define Chain_Extract( the_node ) \
- _Chain_Extract( the_node )
-
-
-/*
- * Chain_Get_unprotected
- *
- * This function removes the first node from the_chain and returns
- * a pointer to that node. If the_chain is empty, then NULL is returned.
- * It does NOT disable interrupts to insure the atomicity of the
- * get operation.
- *
- * Chain_Control *the_chain * IN *
- */
-
-#define Chain_Get_unprotected( the_chain ) \
- _Chain_Get_unprotected( the_chain )
-
-
-/*
- * Chain_Get
- *
- * This function removes the first node from the_chain and returns
- * a pointer to that node. If the_chain is empty, then NULL is returned.
- * It disables interrupts to insure the atomicity of the
- * get operation.
- *
- * Chain_Control *the_chain * IN *
- */
-
-#define Chain_Get( the_chain ) \
- _Chain_Get( the_chain )
-
-
-/*
- * Chain_Get_first_unprotected
- *
- * This function removes the first node from the_chain and returns
- * a pointer to that node. It does NOT disable interrupts to insure
- * the atomicity of the get operation.
- *
- * Chain_Control *the_chain * IN *
- */
-
-#define Chain_Get_first_unprotected( the_chain ) \
- _Chain_Get_first_unprotected( the_chain )
-
-
-/*
- * Chain_Insert_unprotected
- *
- * This routine inserts the_node on a chain immediately following
- * after_node. It does NOT disable interrupts to insure the atomicity
- * of the extract operation.
- *
- * Chain_Node *after_node, * IN *
- * Chain_Node *the_node * IN *
- */
-
-#define Chain_Insert_unprotected( after_node, the_node ) \
- _Chain_Insert_unprotected( after_node, the_node )
-
-
-/*
- * Chain_Insert
- *
- * This routine inserts the_node on a chain immediately following
- * after_node. It disables interrupts to insure the atomicity
- * of the extract operation.
- *
- * Chain_Node *after_node, * IN *
- * Chain_Node *the_node * IN *
- */
-
-#define Chain_Insert( after_node, the_node ) \
- _Chain_Insert( after_node, the_node )
-
-
-/*
- * Chain_Append_unprotected
- *
- * This routine appends the_node onto the end of the_chain.
- * It does NOT disable interrupts to insure the atomicity of the
- * append operation.
- *
- * Chain_Control *the_chain, * IN *
- * Chain_Node *the_node * IN *
- */
-
-#define Chain_Append_unprotected( the_chain, the_node ) \
- _Chain_Append_unprotected( the_chain, the_node )
-
-
-/*
- * Chain_Append
- *
- * This routine appends the_node onto the end of the_chain.
- * It disables interrupts to insure the atomicity of the
- * append operation.
- *
- * Chain_Control *the_chain, * IN *
- * Chain_Node *the_node * IN *
- */
-
-#define Chain_Append( the_chain, the_node ) \
- _Chain_Append( the_chain, the_node )
-
-
-/*
- * Chain_Prepend_unprotected
- *
- * This routine prepends the_node onto the front of the_chain.
- * It does NOT disable interrupts to insure the atomicity of the
- * prepend operation.
- *
- * Chain_Control *the_chain, * IN *
- * Chain_Node *the_node * IN *
- */
-
-#define Chain_Prepend_unprotected( the_chain, the_node ) \
- _Chain_Prepend_unprotected( the_chain, the_node )
-
-
-/*
- * Chain_Prepend
- *
- * This routine prepends the_node onto the front of the_chain.
- * It disables interrupts to insure the atomicity of the
- * prepend operation.
- *
- * Chain_Control *the_chain, * IN *
- * Chain_Node *the_node * IN *
- */
-
-#define Chain_Prepend( the_chain, the_node ) \
- _Chain_Prepend( the_chain, the_node )
-
-
-/*
- * Chain_Head
- *
- * This function returns a pointer to the first node on the chain.
- *
- * Chain_Control *the_chain * IN *
- */
-
-#define Chain_Head( the_chain ) \
- _Chain_Head( the_chain )
-
-
-/*
- * Chain_Tail
- *
- * This function returns a pointer to the last node on the chain.
- *
- * Chain_Control *the_chain * IN *
- */
-
-#define Chain_Tail( the_chain ) \
- _Chain_Tail( the_chain )
-
-
-/*
- * Chain_Is_head
- *
- * This function returns TRUE if the_node is the head of the_chain and
- * FALSE otherwise.
- *
- * Chain_Control *the_chain, * IN *
- * Chain_Node *the_node * IN *
- */
-
-#define Chain_Is_head( the_chain, the_node ) \
- _Chain_Is_head( the_chain, the_node )
-
-
-/*
- * Chain_Is_tail
- *
- * This function returns TRUE if the_node is the tail of the_chain and
- * FALSE otherwise.
- *
- * Chain_Control *the_chain, * IN *
- * Chain_Node *the_node * IN *
- */
-
-#define Chain_Is_tail( the_chain, the_node ) \
- _Chain_Is_tail( the_chain, the_node )
-
-
-/*
- * Chain_Is_first
- *
- * This function returns TRUE if the_node is the first node on a chain and
- * FALSE otherwise.
- *
- * Chain_Node *the_node * IN *
- */
-
-#define Chain_Is_first( the_node ) \
- _Chain_Is_first( the_node )
-
-
-/*
- * Chain_Is_last
- *
- * This function returns TRUE if the_node is the last node on a chain and
- * FALSE otherwise.
- *
- * Chain_Node *the_node * IN *
- */
-
-#define Chain_Is_last( the_node ) \
- _Chain_Is_last( the_node )
-
-
-/*
- * Chain_Is_empty
- *
- * This function returns TRUE if there are no nodes on the_chain and
- * FALSE otherwise.
- *
- * Chain_Control *the_chain * IN *
- */
-
-#define Chain_Is_empty( the_chain ) \
- _Chain_Is_empty( the_chain )
-
-
-/*
- * Chain_Has_only_one_node
- *
- * This function returns TRUE if there is only one node on the_chain and
- * FALSE otherwise.
- *
- * Chain_Control *the_chain * IN *
- */
-
-#define Chain_Has_only_one_node( the_chain ) \
- _Chain_Has_only_one_node( the_chain )
-
-
-/*
- * Chain_Is_null
- *
- * This function returns TRUE if the_chain is NULL and FALSE otherwise.
- *
- * Chain_Control *the_chain * IN *
- */
-
-#define Chain_Is_null( the_chain ) \
- _Chain_Is_null( the_chain )
-
-
-/*
- * Chain_Is_null_node
- *
- * This function returns TRUE if the_node is NULL and FALSE otherwise.
- *
- * Chain_Node *the_node * IN *
- */
-
-#define Chain_Is_null_node( the_node ) \
- _Chain_Is_null_node( the_node )
-
-
-#undef __RTEMS_APPLICATION__
-#include <rtems/score/chain.inl>
-#define __RTEMS_APPLICATION__
-#endif
-/* end of include file */
diff --git a/cpukit/libcsupport/include/clockdrv.h b/cpukit/libcsupport/include/clockdrv.h
deleted file mode 100644
index d7b0b4671f..0000000000
--- a/cpukit/libcsupport/include/clockdrv.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* clock.h
- *
- * This file describes the Clock Driver for all boards.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __CLOCK_DRIVER_h
-#define __CLOCK_DRIVER_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* variables */
-
-extern volatile rtems_unsigned32 Clock_driver_ticks;
-extern rtems_device_major_number rtems_clock_major;
-extern rtems_device_minor_number rtems_clock_minor;
-
-/* default clock driver entry */
-
-#define CLOCK_DRIVER_TABLE_ENTRY \
- { Clock_initialize, NULL, NULL, NULL, NULL, Clock_control }
-
-rtems_device_driver Clock_initialize(
- rtems_device_major_number,
- rtems_device_minor_number,
- void *
-);
-
-rtems_device_driver Clock_control(
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void *pargp
-);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/libcsupport/include/console.h b/cpukit/libcsupport/include/console.h
deleted file mode 100644
index 7bc6b5e3d4..0000000000
--- a/cpukit/libcsupport/include/console.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* console.h
- *
- * This file describes the Console Device Driver for all boards.
- * This driver provides support for the standard C Library.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef _CONSOLE_DRIVER_h
-#define _CONSOLE_DRIVER_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define CONSOLE_DRIVER_TABLE_ENTRY \
- { console_initialize, console_open, console_close, \
- console_read, console_write, console_control }
-
-void console_reserve_resources(
- rtems_configuration_table *configuration
-);
-
-rtems_device_driver console_initialize(
- rtems_device_major_number,
- rtems_device_minor_number,
- void *
-);
-
-rtems_device_driver console_open(
- rtems_device_major_number,
- rtems_device_minor_number,
- void *
-);
-
-rtems_device_driver console_close(
- rtems_device_major_number,
- rtems_device_minor_number,
- void *
-);
-
-rtems_device_driver console_read(
- rtems_device_major_number,
- rtems_device_minor_number,
- void *
-);
-
-rtems_device_driver console_write(
- rtems_device_major_number,
- rtems_device_minor_number,
- void *
-);
-
-rtems_device_driver console_control(
- rtems_device_major_number,
- rtems_device_minor_number,
- void *
-);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/libcsupport/include/iosupp.h b/cpukit/libcsupport/include/iosupp.h
deleted file mode 100644
index ef8e01b76d..0000000000
--- a/cpukit/libcsupport/include/iosupp.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* iosupp.h
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __IOSUPP_h
-#define __IOSUPP_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* character constants */
-
-#define BS 0x08 /* backspace */
-#define LF 0x0a /* line feed */
-#define CR 0x0d /* carriage return */
-#define XON 0x11 /* control-Q */
-#define XOFF 0x13 /* control-S */
-
-/* structures */
-
-#ifdef IOSUPP_INIT
-#define IOSUPP_EXTERN
-#else
-#undef IOSUPP_EXTERN
-#define IOSUPP_EXTERN extern
-#endif
-
-/* functions */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/cpukit/libcsupport/include/motorola/mc68230.h b/cpukit/libcsupport/include/motorola/mc68230.h
deleted file mode 100644
index 22ec49c12b..0000000000
--- a/cpukit/libcsupport/include/motorola/mc68230.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * mc68230.h -- Low level support code for the Motorola 68230 Parallel
- * Interface/Timer (PIT)
- *
- * Modified by Doug McBride, Colorado Space Grant College
- *
- * Format taken partly from RTEMS code and mostly from Motorola IDP user's
- * manual. RTEMS copyright information below.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __MC68230_H__
-#define __MC68230_H__
-
-/* Some Motorola IDP User manual defines: */
-#define PIT_ADDR 0x00c01003 /* base address of the PIT */
-#define REGOFF 0x04 /* Difference between addresses */
-#define VECT 64
-#define H1VECT 0x00
-#define H2VECT 0x01
-#define H3VECT 0x02
-#define H4VECT 0x03
-
-/*
- * mc68230 register offsets
- */
-#define PGCR 0x00
-#define PSRR 1*REGOFF
-#define PADDR 2*REGOFF
-#define PBDDR 3*REGOFF
-#define PCDDR 4*REGOFF
-#define PIVR 5*REGOFF
-#define PACR 6*REGOFF
-#define PBCR 7*REGOFF
-#define PADR 8*REGOFF
-#define PBDR 9*REGOFF
-#define PAAR 10*REGOFF
-#define PBAR 11*REGOFF
-#define PCDR 12*REGOFF
-#define PITSR 13*REGOFF
-#define TCR 16*REGOFF
-#define TIVR 17*REGOFF
-#define CPRH 19*REGOFF
-#define CPRM 20*REGOFF
-#define CPRL 21*REGOFF
-#define CNTRH 23*REGOFF
-#define CNTRM 24*REGOFF
-#define CNTRL 25*REGOFF
-#define TSR 26*REGOFF
-
-/* Some RTEMS style defines: */
-#ifndef VOL8
-#define VOL8( ptr ) ((volatile rtems_unsigned8 *)(ptr))
-#endif
-
-#define MC68230_WRITE( reg, data ) \
- *(VOL8(PIT_ADDR+reg)) = (data)
-
-#define MC68230_READ( reg, data ) \
- (data) = *(VOL8(PIT_ADDR+reg))
-
-#endif
diff --git a/cpukit/libcsupport/include/motorola/mc68681.h b/cpukit/libcsupport/include/motorola/mc68681.h
deleted file mode 100644
index 7602097fd8..0000000000
--- a/cpukit/libcsupport/include/motorola/mc68681.h
+++ /dev/null
@@ -1,306 +0,0 @@
-/*
- * mc68681-duart.h -- Low level support code for the Motorola mc68681
- * DUART.
- *
- * Originally written by rob@cygnus.com (Rob Savoye) for the libgloss
- * IDP support.
- *
- * $Id$
- */
-
-#ifndef __MC68681_H__
-#define __MC68681_H__
-
-/*
- * In the dark ages when this controller was designed, it was actually
- * possible to access data on unaligned byte boundaries with no penalty.
- * Now we find this chip in configurations in which the registers are
- * at 16-bit, 32-bit, and 64-bit boundaries at the whim of the board
- * designer. If the registers are not at byte addresses, then
- * set this multiplier before including this file to correct the offsets.
- */
-
-#ifndef MC68681_OFFSET_MULTIPLIER
-#define MC68681_OFFSET_MULTIPLIER 1
-#endif
-
-#define __MC68681_REG(_R) ((_R) * MC68681_OFFSET_MULTIPLIER)
-
-/*
- * mc68681 register offsets Read/Write Addresses
- */
-#define MC68681_MODE_REG_1A __MC68681_REG(0) /* MR1A-MR Prior to Read */
-#define MC68681_MODE_REG_2A __MC68681_REG(0) /* MR2A-MR After Read */
-
-#define MC68681_COUNT_MODE_CURRENT_MSB __MC68681_REG(6) /* CTU */
-#define MC68681_COUNTER_TIMER_UPPER_REG __MC68681_REG(6) /* CTU */
-#define MC68681_COUNT_MODE_CURRENT_LSB __MC68681_REG(7) /* CTL */
-#define MC68681_COUNTER_TIMER_LOWER_REG __MC68681_REG(7) /* CTL */
-#define MC68681_INTERRUPT_VECTOR_REG __MC68681_REG(12) /* IVR */
-
-#define MC68681_MODE_REG_1B __MC68681_REG(8) /* MR1B-MR Prior to Read */
-#define MC68681_MODE_REG_2B __MC68681_REG(8) /* MR2BA-MR After Read */
-
-/*
- * mc68681 register offsets Read Only Addresses
- */
-#define MC68681_STATUS_REG_A __MC68681_REG(1) /* SRA */
-#define MC68681_MASK_ISR_REG __MC68681_REG(2) /* MISR */
-#define MC68681_RECEIVE_BUFFER_A __MC68681_REG(3) /* RHRA */
-#define MC68681_INPUT_PORT_CHANGE_REG __MC68681_REG(4) /* IPCR */
-#define MC68681_INTERRUPT_STATUS_REG __MC68681_REG(5) /* ISR */
-#define MC68681_STATUS_REG_B __MC68681_REG(9) /* SRB */
-#define MC68681_RECEIVE_BUFFER_B __MC68681_REG(11) /* RHRB */
-#define MC68681_INPUT_PORT __MC68681_REG(13) /* IP */
-#define MC68681_START_COUNT_CMD __MC68681_REG(14) /* SCC */
-#define MC68681_STOP_COUNT_CMD __MC68681_REG(15) /* STC */
-
-/*
- * mc68681 register offsets Write Only Addresses
- */
-#define MC68681_CLOCK_SELECT_REG_A __MC68681_REG(1) /* CSRA */
-#define MC68681_COMMAND_REG_A __MC68681_REG(2) /* CRA */
-#define MC68681_TRANSMIT_BUFFER_A __MC68681_REG(3) /* THRA */
-#define MC68681_AUX_CTRL_REG __MC68681_REG(4) /* ACR */
-#define MC68681_INTERRUPT_MASK_REG __MC68681_REG(5) /* IMR */
-#define MC68681_CLOCK_SELECT_REG_B __MC68681_REG(9) /* CSRB */
-#define MC68681_COMMAND_REG_B __MC68681_REG(10) /* CRB */
-#define MC68681_TRANSMIT_BUFFER_B __MC68681_REG(11) /* THRB */
-#define MC68681_OUTPUT_PORT_CONFIG_REG __MC68681_REG(13) /* OPCR */
-#define MC68681_OUTPUT_PORT_SET_REG __MC68681_REG(14) /* SOPBC */
-#define MC68681_OUTPUT_PORT_RESET_BITS __MC68681_REG(15) /* COPBC */
-
-
-#ifndef MC6681_VOL
-#define MC6681_VOL( ptr ) ((volatile unsigned char *)(ptr))
-#endif
-
-#define MC68681_WRITE( _base, _reg, _data ) \
- *((volatile unsigned char *)_base+_reg) = (_data)
-
-#define MC68681_READ( _base, _reg ) \
- *(((volatile unsigned char *)_base+_reg))
-
-
-
-#define MC68681_CLEAR 0x00
-
-#define MC68681_PORT_A 0
-#define MC68681_PORT_B 1
-
-/*
- * DUART Command Register Definitions:
- *
- * MC68681_COMMAND_REG_A,MC68681_COMMAND_REG_B
- */
-#define MC68681_MODE_REG_ENABLE_RX 0x01
-#define MC68681_MODE_REG_DISABLE_RX 0x02
-#define MC68681_MODE_REG_ENABLE_TX 0x04
-#define MC68681_MODE_REG_DISABLE_TX 0x08
-#define MC68681_MODE_REG_RESET_MR_PTR 0x10
-#define MC68681_MODE_REG_RESET_RX 0x20
-#define MC68681_MODE_REG_RESET_TX 0x30
-#define MC68681_MODE_REG_RESET_ERROR 0x40
-#define MC68681_MODE_REG_RESET_BREAK 0x50
-#define MC68681_MODE_REG_START_BREAK 0x60
-#define MC68681_MODE_REG_STOP_BREAK 0x70
-#define MC68681_MODE_REG_SET_RX_BRG 0x80
-#define MC68681_MODE_REG_CLEAR_RX_BRG 0x90
-#define MC68681_MODE_REG_SET_TX_BRG 0xa0
-#define MC68681_MODE_REG_CLEAR_TX_BRG 0xb0
-#define MC68681_MODE_REG_SET_STANDBY 0xc0
-#define MC68681_MODE_REG_SET_ACTIVE 0xd0
-
-/*
- * Mode Register Definitions
- *
- * MC68681_MODE_REG_1A
- * MC68681_MODE_REG_1B
- */
-#define MC68681_5BIT_CHARS 0x00
-#define MC68681_6BIT_CHARS 0x01
-#define MC68681_7BIT_CHARS 0x02
-#define MC68681_8BIT_CHARS 0x03
-
-#define MC68681_ODD_PARITY 0x00
-#define MC68681_EVEN_PARITY 0x04
-
-#define MC68681_WITH_PARITY 0x00
-#define MC68681_FORCE_PARITY 0x08
-#define MC68681_NO_PARITY 0x10
-#define MC68681_MULTI_DROP 0x18
-
-#define MC68681_ERR_MODE_CHAR 0x00
-#define MC68681_ERR_MODE_BLOCK 0x20
-
-#define MC68681_RX_INTR_RX_READY 0x00
-#define MC68681_RX_INTR_FFULL 0x40
-
-#define MC68681_NO_RX_RTS_CTL 0x00
-#define MC68681_RX_RTS_CTRL 0x80
-
-
-/*
- * Mode Register Definitions
- *
- * MC68681_MODE_REG_2A
- * MC68681_MODE_REG_2B
- */
-#define MC68681_STOP_BIT_LENGTH__563 0x00
-#define MC68681_STOP_BIT_LENGTH__625 0x01
-#define MC68681_STOP_BIT_LENGTH__688 0x02
-#define MC68681_STOP_BIT_LENGTH__75 0x03
-#define MC68681_STOP_BIT_LENGTH__813 0x04
-#define MC68681_STOP_BIT_LENGTH__875 0x05
-#define MC68681_STOP_BIT_LENGTH__938 0x06
-#define MC68681_STOP_BIT_LENGTH_1 0x07
-#define MC68681_STOP_BIT_LENGTH_1_563 0x08
-#define MC68681_STOP_BIT_LENGTH_1_625 0x09
-#define MC68681_STOP_BIT_LENGTH_1_688 0x0a
-#define MC68681_STOP_BIT_LENGTH_1_75 0x0b
-#define MC68681_STOP_BIT_LENGTH_1_813 0x0c
-#define MC68681_STOP_BIT_LENGTH_1_875 0x0d
-#define MC68681_STOP_BIT_LENGTH_1_938 0x0e
-#define MC68681_STOP_BIT_LENGTH_2 0x0f
-
-#define MC68681_CTS_ENABLE_TX 0x10
-#define MC68681_TX_RTS_CTRL 0x20
-
-#define MC68681_CHANNEL_MODE_NORMAL 0x00
-#define MC68681_CHANNEL_MODE_ECHO 0x40
-#define MC68681_CHANNEL_MODE_LOCAL_LOOP 0x80
-#define MC68681_CHANNEL_MODE_REMOTE_LOOP 0xc0
-
-/*
- * Status Register Definitions
- *
- * MC68681_STATUS_REG_A, MC68681_STATUS_REG_B
- */
-#define MC68681_RX_READY 0x01
-#define MC68681_FFULL 0x02
-#define MC68681_TX_READY 0x04
-#define MC68681_TX_EMPTY 0x08
-#define MC68681_OVERRUN_ERROR 0x10
-#define MC68681_PARITY_ERROR 0x20
-#define MC68681_FRAMING_ERROR 0x40
-#define MC68681_RECEIVED_BREAK 0x80
-
-
-/*
- * Interupt Status Register Definitions.
- *
- * MC68681_INTERRUPT_STATUS_REG
- */
-
-
-/*
- * Interupt Mask Register Definitions
- *
- * MC68681_INTERRUPT_MASK_REG
- */
-#define MC68681_IR_TX_READY_A 0x01
-#define MC68681_IR_RX_READY_A 0x02
-#define MC68681_IR_BREAK_A 0x04
-#define MC68681_IR_COUNTER_READY 0x08
-#define MC68681_IR_TX_READY_B 0x10
-#define MC68681_IR_RX_READY_B 0x20
-#define MC68681_IR_BREAK_B 0x40
-#define MC68681_IR_INPUT_PORT_CHANGE 0x80
-
-/*
- * Status Register Definitions.
- *
- * MC68681_STATUS_REG_A,MC68681_STATUS_REG_B
- */
-#define MC68681_STATUS_RXRDY 0x01
-#define MC68681_STATUS_FFULL 0x02
-#define MC68681_STATUS_TXRDY 0x04
-#define MC68681_STATUS_TXEMT 0x08
-#define MC68681_STATUS_OVERRUN_ERROR 0x10
-#define MC68681_STATUS_PARITY_ERROR 0x20
-#define MC68681_STATUS_FRAMING_ERROR 0x40
-#define MC68681_STATUS_RECEIVED_BREAK 0x80
-
-/*
- * Definitions for the Interrupt Vector Register:
- *
- * MC68681_INTERRUPT_VECTOR_REG
- */
-#define MC68681_INTERRUPT_VECTOR_INIT 0x0f
-
-/*
- * Definitions for the Auxiliary Control Register
- *
- * MC68681_AUX_CTRL_REG
- */
-#define MC68681_AUX_BRG_SET1 0x00
-#define MC68681_AUX_BRG_SET2 0x80
-
-
-/*
- * The following Baud rates assume the X1 clock pin is driven with a
- * 3.6864 MHz signal. If a different frequency is used the DUART channel
- * is running at the follwoing baud rate:
- * ((Table Baud Rate)*frequency)/3.6864 MHz
- */
-
-/*
- * Definitions for the Clock Select Register:
- *
- * MC68681_CLOCK_SELECT_REG_A,MC68681_CLOCK_SELECT_REG_A
- *
- * Note: ACR[7] is the MSB of the Auxiliary Control register
- * X is the extend bit.
- * CRA - 0x08 Set Rx BRG Select Extend Bit (X=1)
- * CRA - 0x09 Clear Rx BRG Select Extend Bit (X=0)
- * CRB - 0x0a Set Tx BRG Select Extend Bit (X=1)
- * CRB - 0x0b Clear Tx BRG Select Extend Bit (x=1)
- */
-#define MC68681_BAUD_RATE_MASK_50 0x00 /* ACR[7]=0,X=0 */
- /* ARC[7]=1,X=1 */
-#define MC68681_BAUD_RATE_MASK_75 0x00 /* ACR[7]=0,X=0 */
- /* ARC[7]=1,X=1 */
-#define MC68681_BAUD_RATE_MASK_110 0x01
-#define MC68681_BAUD_RATE_MASK_134_5 0x02
-#define MC68681_BAUD_RATE_MASK_150 0x03 /* ACR[7]=0,X=0 */
- /* ARC[7]=1,X=1 */
-#define MC68681_BAUD_RATE_MASK_200 0x03 /* ACR[7]=0,X=0 */
- /* ARC[7]=1,X=1 */
-#define MC68681_BAUD_RATE_MASK_300 0x04 /* ACR[7]=0,X=0 */
- /* ARC[7]=1,X=1 */
-#define MC68681_BAUD_RATE_MASK_600 0x05 /* ACR[7]=0,X=0 */
- /* ARC[7]=1,X=1 */
-#define MC68681_BAUD_RATE_MASK_1050 0x07 /* ACR[7]=0,X=0 */
- /* ARC[7]=1,X=1 */
-#define MC68681_BAUD_RATE_MASK_1200 0x06 /* ACR[7]=0,X=0 */
- /* ARC[7]=1,X=1 */
-#define MC68681_BAUD_RATE_MASK_1800 0x0a /* ACR[7]=0,X=0 */
- /* ARC[7]=1,X=1 */
-#define MC68681_BAUD_RATE_MASK_2400 0x08 /* ACR[7]=0,X=0 */
- /* ARC[7]=1,X=1 */
-#define MC68681_BAUD_RATE_MASK_3600 0x04 /* ACR[7]=0,X=0 */
- /* ARC[7]=1,X=1 */
-#define MC68681_BAUD_RATE_MASK_4800 0x09
-#define MC68681_BAUD_RATE_MASK_7200 0x0a /* ACR[7]=0,X=0 */
- /* ARC[7]=1,X=1 */
-#define MC68681_BAUD_RATE_MASK_9600 0xbb
-
-#define MC68681_BAUD_RATE_MASK_14_4K 0x05 /* ACR[7]=0,X=0 */
- /* ARC[7]=1,X=1 */
-#define MC68681_BAUD_RATE_MASK_19_2K 0xcc /* ACR[7]=1,X=0 */
- /* ARC[7]=0,X=1 */
-#define MC68681_BAUD_RATE_MASK_28_8K 0x06 /* ACR[7]=0,X=0 */
- /* ARC[7]=1,X=1 */
-#define MC68681_BAUD_RATE_MASK_38_4K 0xcc /* ACR[7]=0,X=0 */
- /* ARC[7]=1,X=1 */
-#define MC68681_BAUD_RATE_MASK_57_6K 0x07 /* ACR[7]=0,X=0 */
- /* ARC[7]=1,X=1 */
-#define MC68681_BAUD_RATE_MASK_115_5K 0x08
-#define MC68681_BAUD_RATE_MASK_TIMER 0xdd
-#define MC68681_BAUD_RATE_MASK_TIMER_16X 0xee
-#define MC68681_BAUD_RATE_MASK_TIMER_1X 0xff
-
-#endif
-
-
-
diff --git a/cpukit/libcsupport/include/ringbuf.h b/cpukit/libcsupport/include/ringbuf.h
deleted file mode 100644
index 8c80aaf9c8..0000000000
--- a/cpukit/libcsupport/include/ringbuf.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * ringbuf.h
- *
- * This file provides simple ring buffer functionality.
- *
- * $Id$
- */
-
-#ifndef __RINGBUF_H__
-#define __RINGBUF_H__
-
-#ifndef RINGBUF_QUEUE_LENGTH
-#define RINGBUF_QUEUE_LENGTH 128
-#endif
-
-typedef struct {
- char buffer[RINGBUF_QUEUE_LENGTH];
- volatile int head;
- volatile int tail;
-} Ring_buffer_t;
-
-#define Ring_buffer_Initialize( _buffer ) \
- do { \
- (_buffer)->head = (_buffer)->tail = 0; \
- } while ( 0 )
-
-#define Ring_buffer_Is_empty( _buffer ) \
- ( (_buffer)->head == (_buffer)->tail )
-
-#define Ring_buffer_Is_full( _buffer ) \
- ( (_buffer)->head == ((_buffer)->tail + 1) % RINGBUF_QUEUE_LENGTH )
-
-#define Ring_buffer_Add_character( _buffer, _ch ) \
- do { \
- rtems_unsigned32 isrlevel; \
- \
- rtems_interrupt_disable( isrlevel ); \
- (_buffer)->tail = ((_buffer)->tail+1) % RINGBUF_QUEUE_LENGTH; \
- (_buffer)->buffer[ (_buffer)->tail ] = (_ch); \
- rtems_interrupt_enable( isrlevel ); \
- } while ( 0 )
-
-#define Ring_buffer_Remove_character( _buffer, _ch ) \
- do { \
- rtems_unsigned32 isrlevel; \
- \
- rtems_interrupt_disable( isrlevel ); \
- (_buffer)->head = ((_buffer)->head+1) % RINGBUF_QUEUE_LENGTH; \
- (_ch) = (_buffer)->buffer[ (_buffer)->head ]; \
- rtems_interrupt_enable( isrlevel ); \
- } while ( 0 )
-
-#endif
diff --git a/cpukit/libcsupport/include/rtems/assoc.h b/cpukit/libcsupport/include/rtems/assoc.h
deleted file mode 100644
index 1982d654ac..0000000000
--- a/cpukit/libcsupport/include/rtems/assoc.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- *
- * Rtems associativity routines. Mainly used to convert a value from
- * one space to another (eg: our errno's to host errno's and v.v)
- *
- *
- * $Id$
- */
-
-#ifndef _INCLUDE_ASSOC_H
-#define _INCLUDE_ASSOC_H
-
-typedef struct {
- const char *name;
- unsigned32 local_value;
- unsigned32 remote_value;
-} rtems_assoc_t;
-
-/*
- * Flag/marker for optional default value in each table
- */
-
-#define RTEMS_ASSOC_DEFAULT_NAME "(default)"
-
-const rtems_assoc_t *rtems_assoc_ptr_by_name(const rtems_assoc_t *, const char *);
-const rtems_assoc_t *rtems_assoc_ptr_by_value(const rtems_assoc_t *, unsigned32);
-const rtems_assoc_t *rtems_assoc_ptr_by_remote(const rtems_assoc_t *, unsigned32);
-
-unsigned32 rtems_assoc_remote_by_local(const rtems_assoc_t *, unsigned32);
-unsigned32 rtems_assoc_local_by_remote(const rtems_assoc_t *, unsigned32);
-unsigned32 rtems_assoc_remote_by_name(const rtems_assoc_t *, const char *);
-unsigned32 rtems_assoc_local_by_name(const rtems_assoc_t *, const char *);
-const char *rtems_assoc_name_by_local(const rtems_assoc_t *, unsigned32);
-const char *rtems_assoc_name_by_remote(const rtems_assoc_t *, unsigned32);
-
-unsigned32 rtems_assoc_remote_by_local_bitfield(const rtems_assoc_t *, unsigned32);
-char *rtems_assoc_name_by_local_bitfield(const rtems_assoc_t *, unsigned32, char *);
-char *rtems_assoc_name_by_remote_bitfield(const rtems_assoc_t *, unsigned32, char *);
-unsigned32 rtems_assoc_local_by_remote_bitfield(const rtems_assoc_t *, unsigned32);
-
-
-#endif /* ! _INCLUDE_ASSOC_H */
diff --git a/cpukit/libcsupport/include/rtems/error.h b/cpukit/libcsupport/include/rtems/error.h
deleted file mode 100644
index a0698afb5d..0000000000
--- a/cpukit/libcsupport/include/rtems/error.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Defines and externs for rtems error reporting
- *
- * $Id$
- */
-
-#ifndef __RTEMS_ERROR_h
-#define __RTEMS_ERROR_h
-
-/*
- * rtems_error() and rtems_panic() support
- */
-
-#define RTEMS_ERROR_ERRNO (1<<((sizeof(int) * 8) - 2)) /* hi bit; use 'errno' */
-#define RTEMS_ERROR_PANIC (RTEMS_ERROR_ERRNO / 2) /* err fatal; no return */
-#define RTEMS_ERROR_ABORT (RTEMS_ERROR_ERRNO / 4) /* err is fatal; panic */
-
-#define RTEMS_ERROR_MASK (RTEMS_ERROR_ERRNO | RTEMS_ERROR_ABORT | \
- RTEMS_ERROR_PANIC) /* all */
-
-const char *rtems_status_text(rtems_status_code);
-int rtems_error(int error_code, const char *printf_format, ...);
-#ifdef __GNUC__
-void rtems_panic(const char *printf_format, ...);
-/*
- * We should be able to use this attribute but gcc complains that
- * rtems_panic does in fact return. :(
- *
- * __attribute__ ((__noreturn__));
- */
-#else
-void rtems_panic(const char *printf_format, ...);
-#endif
-
-extern int rtems_panic_in_progress;
-
-#endif
-/* end of include file */
diff --git a/cpukit/libcsupport/include/rtems/libcsupport.h b/cpukit/libcsupport/include/rtems/libcsupport.h
deleted file mode 100644
index 4c6764c1d4..0000000000
--- a/cpukit/libcsupport/include/rtems/libcsupport.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* libcsupport.h
- *
- * This include file contains the information regarding the
- * RTEMS specific support for the standard C library.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __LIBC_SUPPORT_h
-#define __LIBC_SUPPORT_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <sys/types.h>
-
-void RTEMS_Malloc_Initialize(
- void *start,
- size_t length,
- size_t sbrk_amount
-);
-
-extern void malloc_dump(void);
-extern void malloc_walk(size_t source, size_t printf_enabled);
-extern void libc_init(int reentrant);
-extern int host_errno(void);
-extern void fix_syscall_errno(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/libcsupport/include/rtems/libio.h b/cpukit/libcsupport/include/rtems/libio.h
deleted file mode 100644
index 3cc4648863..0000000000
--- a/cpukit/libcsupport/include/rtems/libio.h
+++ /dev/null
@@ -1,584 +0,0 @@
-/*
- * System call and file system interface definition
- *
- * General purpose communication channel for RTEMS to allow UNIX/POSIX
- * system call behavior under RTEMS. Initially this supported only
- * IO to devices but has since been enhanced to support networking
- * and support for mounted file systems.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef _RTEMS_LIBIO_H
-#define _RTEMS_LIBIO_H
-
-#include <rtems.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-/*
- * Define data types which must be constructed using forward references.
- */
-
-typedef struct rtems_libio_tt rtems_libio_t;
-
-struct rtems_filesystem_location_info_tt;
-typedef struct rtems_filesystem_location_info_tt
- rtems_filesystem_location_info_t;
-
-struct rtems_filesystem_mount_table_entry_tt;
-typedef struct rtems_filesystem_mount_table_entry_tt
- rtems_filesystem_mount_table_entry_t;
-
-/*
- * Valid RTEMS file types.
- */
-typedef enum {
- RTEMS_FILESYSTEM_DIRECTORY,
- RTEMS_FILESYSTEM_DEVICE,
- RTEMS_FILESYSTEM_HARD_LINK,
- RTEMS_FILESYSTEM_SYM_LINK,
- RTEMS_FILESYSTEM_MEMORY_FILE
-} rtems_filesystem_node_types_t;
-
-/*
- * File Handler Operations Table
- */
-
-typedef int (*rtems_filesystem_open_t)(
- rtems_libio_t *iop,
- const char *pathname,
- unsigned32 flag,
- unsigned32 mode
-);
-
-typedef int (*rtems_filesystem_close_t)(
- rtems_libio_t *iop
-);
-
-typedef int (*rtems_filesystem_read_t)(
- rtems_libio_t *iop,
- void *buffer,
- unsigned32 count
-);
-
-typedef int (*rtems_filesystem_write_t)(
- rtems_libio_t *iop,
- const void *buffer,
- unsigned32 count
-);
-
-typedef int (*rtems_filesystem_ioctl_t)(
- rtems_libio_t *iop,
- unsigned32 command,
- void *buffer
-);
-
-typedef int (*rtems_filesystem_lseek_t)(
- rtems_libio_t *iop,
- off_t length,
- int whence
-);
-
-typedef int (*rtems_filesystem_fstat_t)(
- rtems_filesystem_location_info_t *loc,
- struct stat *buf
-);
-
-typedef int (*rtems_filesystem_fchmod_t)(
- rtems_filesystem_location_info_t *loc,
- mode_t mode
-);
-
-typedef int (*rtems_filesystem_ftruncate_t)(
- rtems_libio_t *iop,
- off_t length
-);
-
-typedef int (*rtems_filesystem_fpathconf_t)(
- rtems_libio_t *iop,
- int name
-);
-
-typedef int (*rtems_filesystem_fsync_t)(
- rtems_libio_t *iop
-);
-
-typedef int (*rtems_filesystem_fdatasync_t)(
- rtems_libio_t *iop
-);
-
-typedef int (*rtems_filesystem_fcntl_t)(
- int cmd,
- rtems_libio_t *iop
-);
-
-typedef int (*rtems_filesystem_rmnod_t)(
- rtems_filesystem_location_info_t *pathloc /* IN */
-);
-
-typedef struct {
- rtems_filesystem_open_t open;
- rtems_filesystem_close_t close;
- rtems_filesystem_read_t read;
- rtems_filesystem_write_t write;
- rtems_filesystem_ioctl_t ioctl;
- rtems_filesystem_lseek_t lseek;
- rtems_filesystem_fstat_t fstat;
- rtems_filesystem_fchmod_t fchmod;
- rtems_filesystem_ftruncate_t ftruncate;
- rtems_filesystem_fpathconf_t fpathconf;
- rtems_filesystem_fsync_t fsync;
- rtems_filesystem_fdatasync_t fdatasync;
- rtems_filesystem_fcntl_t fcntl;
- rtems_filesystem_rmnod_t rmnod;
-} rtems_filesystem_file_handlers_r;
-
-/*
- * File System Operations Table
- */
-
-/*
- * XXX
- * This routine does not allocate any space and rtems_filesystem_freenode_t
- * is not called by the generic after calling this routine.
- * ie. node_access does not have to contain valid data when the
- * routine returns.
- */
-
-typedef int (*rtems_filesystem_mknod_t)(
- const char *path, /* IN */
- mode_t mode, /* IN */
- dev_t dev, /* IN */
- rtems_filesystem_location_info_t *pathloc /* IN/OUT */
-);
-
-/*
- * rtems_filesystem_freenode_t must be called by the generic after
- * calling this routine
- */
-
-typedef int (*rtems_filesystem_evalpath_t)(
- const char *pathname, /* IN */
- int flags, /* IN */
- rtems_filesystem_location_info_t *pathloc /* IN/OUT */
-);
-
-typedef int (*rtems_filesystem_evalmake_t)(
- const char *path, /* IN */
- rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
- const char **name /* OUT */
-);
-
-typedef int (*rtems_filesystem_link_t)(
- rtems_filesystem_location_info_t *to_loc, /* IN */
- rtems_filesystem_location_info_t *parent_loc, /* IN */
- const char *name /* IN */
-);
-
-typedef int (*rtems_filesystem_unlink_t)(
- rtems_filesystem_location_info_t *pathloc /* IN */
-);
-
-typedef int (*rtems_filesystem_chown_t)(
- rtems_filesystem_location_info_t *pathloc, /* IN */
- uid_t owner, /* IN */
- gid_t group /* IN */
-);
-
-typedef int (*rtems_filesystem_freenode_t)(
- rtems_filesystem_location_info_t *pathloc /* IN */
-);
-
-typedef int (* rtems_filesystem_mount_t ) (
- rtems_filesystem_mount_table_entry_t *mt_entry /* in */
-);
-
-typedef int (* rtems_filesystem_fsmount_me_t )(
- rtems_filesystem_mount_table_entry_t *mt_entry
-);
-
-typedef int (* rtems_filesystem_unmount_t ) (
- rtems_filesystem_mount_table_entry_t *mt_entry /* in */
-);
-
-typedef int (* rtems_filesystem_fsunmount_me_t ) (
- rtems_filesystem_mount_table_entry_t *mt_entry /* in */
-);
-
-typedef rtems_filesystem_node_types_t (* rtems_filesystem_node_type_t) (
- rtems_filesystem_location_info_t *pathloc /* in */
-);
-
-typedef int (* rtems_filesystem_utime_t)(
- rtems_filesystem_location_info_t *pathloc, /* IN */
- time_t actime, /* IN */
- time_t modtime /* IN */
-);
-
-typedef int (*rtems_filesystem_evaluate_link_t)(
- rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
- int flags /* IN */
-);
-
-typedef int (*rtems_filesystem_symlink_t)(
- rtems_filesystem_location_info_t *loc, /* IN */
- const char *link_name, /* IN */
- const char *node_name
-);
-
-typedef int (*rtems_filesystem_readlink_t)(
- rtems_filesystem_location_info_t *loc, /* IN */
- char *buf, /* OUT */
- size_t bufsize
-);
-
-/*
- * operations table that must be defined for every file system.
- */
-
-/*
- * File system types
- */
-typedef struct {
- rtems_filesystem_evalpath_t evalpath;
- rtems_filesystem_evalmake_t evalformake;
- rtems_filesystem_link_t link;
- rtems_filesystem_unlink_t unlink;
- rtems_filesystem_node_type_t node_type;
- rtems_filesystem_mknod_t mknod;
- rtems_filesystem_chown_t chown;
- rtems_filesystem_freenode_t freenod;
- rtems_filesystem_mount_t mount;
- rtems_filesystem_fsmount_me_t fsmount_me;
- rtems_filesystem_unmount_t unmount;
- rtems_filesystem_fsunmount_me_t fsunmount_me;
- rtems_filesystem_utime_t utime;
- rtems_filesystem_evaluate_link_t eval_link;
- rtems_filesystem_symlink_t symlink;
- rtems_filesystem_readlink_t readlink;
-} rtems_filesystem_operations_table;
-
-#define IMFS_FILE_SYSTEM IMFS_ops
-extern rtems_filesystem_operations_table IMFS_ops;
-
-
-/*
- * Structure used to determine a location/filesystem in the tree.
- */
-
-struct rtems_filesystem_location_info_tt
-{
- void *node_access;
- rtems_filesystem_file_handlers_r *handlers;
- rtems_filesystem_operations_table *ops;
- rtems_filesystem_mount_table_entry_t *mt_entry;
-};
-
-/*
- * Structure used to contain file system specific information which
- * is required to support fpathconf().
- */
-
-typedef struct {
- int link_max;
- int max_canon;
- int max_input;
- int name_max;
- int path_max;
- int pipe_buf;
- int posix_async_io;
- int posix_chown_restrictions;
- int posix_no_trunc;
- int posix_prio_io;
- int posix_sync_io;
- int posix_vdisable;
-} rtems_filesystem_limits_and_options_t;
-
-/*
- * Structure for a mount table entry.
- */
-
-struct rtems_filesystem_mount_table_entry_tt {
- Chain_Node Node;
- rtems_filesystem_location_info_t mt_point_node;
- rtems_filesystem_location_info_t mt_fs_root;
- int options;
- void *fs_info;
-
- rtems_filesystem_limits_and_options_t pathconf_limits_and_options;
-
- /*
- * When someone adds a mounted filesystem on a real device,
- * this will need to be used.
- *
- * The best option long term for this is probably an open file descriptor.
- */
- char *dev;
-};
-
-/*
- * Valid RTEMS file systems options
- */
-
-typedef enum
-{
- RTEMS_FILESYSTEM_READ_ONLY,
- RTEMS_FILESYSTEM_READ_WRITE,
- RTEMS_FILESYSTEM_BAD_OPTIONS
-} rtems_filesystem_options_t;
-
-
-/*
- * An open file data structure, indexed by 'fd'
- * TODO:
- * should really have a separate per/file data structure that this
- * points to (eg: size, offset, driver, pathname should be in that)
- */
-
-struct rtems_libio_tt {
- rtems_driver_name_t *driver;
- off_t size; /* size of file */
- off_t offset; /* current offset into file */
- unsigned32 flags;
- rtems_filesystem_location_info_t pathinfo;
- Objects_Id sem;
- unsigned32 data0; /* private to "driver" */
- void *data1; /* ... */
- void *file_info; /* used by file handlers */
- rtems_filesystem_file_handlers_r *handlers; /* type specific handlers */
-};
-
-/*
- * param block for read/write
- * Note: it must include 'offset' instead of using iop's offset since
- * we can have multiple outstanding i/o's on a device.
- */
-
-typedef struct {
- rtems_libio_t *iop;
- off_t offset;
- unsigned8 *buffer;
- unsigned32 count;
- unsigned32 flags;
- unsigned32 bytes_moved;
-} rtems_libio_rw_args_t;
-
-/*
- * param block for open/close
- */
-
-typedef struct {
- rtems_libio_t *iop;
- unsigned32 flags;
- unsigned32 mode;
-} rtems_libio_open_close_args_t;
-
-/*
- * param block for ioctl
- */
-
-typedef struct {
- rtems_libio_t *iop;
- unsigned32 command;
- void *buffer;
- unsigned32 ioctl_return;
-} rtems_libio_ioctl_args_t;
-
-/*
- * Values for 'flag'
- */
-
-#define LIBIO_FLAGS_NO_DELAY 0x0001 /* return immediately if no data */
-#define LIBIO_FLAGS_READ 0x0002 /* reading */
-#define LIBIO_FLAGS_WRITE 0x0004 /* writing */
-#define LIBIO_FLAGS_OPEN 0x0100 /* device is open */
-#define LIBIO_FLAGS_APPEND 0x0200 /* all writes append */
-#define LIBIO_FLAGS_CREATE 0x0400 /* create file */
-#define LIBIO_FLAGS_CLOSE_ON_EXEC 0x0800 /* close on process exec() */
-#define LIBIO_FLAGS_READ_WRITE (LIBIO_FLAGS_READ | LIBIO_FLAGS_WRITE)
-
-void rtems_libio_init(void);
-
-/*
- * External I/O handlers
- */
-
-typedef int (*rtems_libio_open_t)(
- const char *pathname,
- unsigned32 flag,
- unsigned32 mode
-);
-
-typedef int (*rtems_libio_close_t)(
- int fd
-);
-
-typedef int (*rtems_libio_read_t)(
- int fd,
- void *buffer,
- unsigned32 count
-);
-
-typedef int (*rtems_libio_write_t)(
- int fd,
- const void *buffer,
- unsigned32 count
-);
-
-typedef int (*rtems_libio_ioctl_t)(
- int fd,
- unsigned32 command,
- void *buffer
-);
-
-typedef int (*rtems_libio_lseek_t)(
- int fd,
- off_t offset,
- int whence
-);
-
-/*
- * IOCTL values
- */
-
-#define RTEMS_IO_GET_ATTRIBUTES 1
-#define RTEMS_IO_SET_ATTRIBUTES 2
-#define RTEMS_IO_TCDRAIN 3
-
-/*
- * The following macros are used to build up the permissions sets
- * used to check permissions. These are similar in style to the
- * mode_t bits and should stay compatible with them.
- */
-
-#define RTEMS_LIBIO_PERMS_READ S_IROTH
-#define RTEMS_LIBIO_PERMS_WRITE S_IWOTH
-#define RTEMS_LIBIO_PERMS_RDWR (S_IROTH|S_IWOTH)
-#define RTEMS_LIBIO_PERMS_EXEC S_IXOTH
-#define RTEMS_LIBIO_PERMS_SEARCH RTEMS_LIBIO_PERMS_EXEC
-#define RTEMS_LIBIO_PERMS_RWX S_IRWXO
-
-/*
- * Macros
- */
-
-#define rtems_filesystem_make_dev_t( _major, _minor ) \
- ((((dev_t)(_major)) << 32) | (dev_t)(_minor))
-
-#define rtems_filesystem_split_dev_t( _dev, _major, _minor ) \
- do { \
- (_major) = (rtems_device_major_number) ((_dev) >> 32); \
- (_minor) = (rtems_device_minor_number) ((_dev) & 0xFFFFFFFF); \
- } while(0)
-
-/*
- * Verifies that the permission flag is valid.
- */
-#define rtems_libio_is_valid_perms( _perm ) \
- (~ ((~RTEMS_LIBIO_PERMS_RWX) & _perm ))
-
-
-/*
- * Prototypes for filesystem
- */
-
-void rtems_filesystem_initialize( void );
-
-
-/*
- * Callbacks from TERMIOS routines to device-dependent code
- */
-
-#include <termios.h>
-
-typedef struct rtems_termios_callbacks {
- int (*firstOpen)(int major, int minor, void *arg);
- int (*lastClose)(int major, int minor, void *arg);
- int (*pollRead)(int minor);
- int (*write)(int minor, const char *buf, int len);
- int (*setAttributes)(int minor, const struct termios *t);
- int (*stopRemoteTx)(int minor);
- int (*startRemoteTx)(int minor);
- int outputUsesInterrupts;
-} rtems_termios_callbacks;
-
-/*
- * Device-independent TERMIOS routines
- */
-
-void rtems_termios_initialize (void);
-
-rtems_status_code rtems_termios_open (
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void *arg,
- const rtems_termios_callbacks *callbacks
-);
-
-rtems_status_code rtems_termios_close(
- void *arg
-);
-
-rtems_status_code rtems_termios_read(
- void *arg
-);
-
-rtems_status_code rtems_termios_write(
- void *arg
-);
-
-rtems_status_code rtems_termios_ioctl(
- void *arg
-);
-
-int rtems_termios_enqueue_raw_characters(
- void *ttyp,
- char *buf,
- int len
-);
-
-int rtems_termios_dequeue_characters(
- void *ttyp,
- int len
-);
-
-void rtems_termios_reserve_resources(
- rtems_configuration_table *configuration,
- rtems_unsigned32 number_of_devices
-);
-
-int unmount(
- const char *mount_path
-);
-
-int mount(
- rtems_filesystem_mount_table_entry_t **mt_entry,
- rtems_filesystem_operations_table *fs_ops,
- rtems_filesystem_options_t fsoptions,
- char *device,
- char *mount_point
-);
-
-/*
- * Boot Time Mount Table Structure
- */
-
-typedef struct {
- rtems_filesystem_operations_table *fs_ops;
- rtems_filesystem_options_t fsoptions;
- char *device;
- char *mount_point;
-} rtems_filesystem_mount_table_t;
-
-extern rtems_filesystem_mount_table_t *rtems_filesystem_mount_table;
-extern int rtems_filesystem_mount_table_size;
-
-#endif /* _RTEMS_LIBIO_H */
diff --git a/cpukit/libcsupport/include/rtems/libio_.h b/cpukit/libcsupport/include/rtems/libio_.h
deleted file mode 100644
index 8e74b34edb..0000000000
--- a/cpukit/libcsupport/include/rtems/libio_.h
+++ /dev/null
@@ -1,272 +0,0 @@
-/*
- * Libio Internal Information
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __LIBIO__h
-#define __LIBIO__h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems.h>
-#include <rtems/libio.h> /* include before standard IO */
-#include <rtems/assoc.h> /* assoc.h not included by rtems.h */
-
-#include <stdio.h> /* O_RDONLY, et.al. */
-#include <fcntl.h> /* O_RDONLY, et.al. */
-#include <assert.h>
-#include <stdarg.h>
-#include <errno.h>
-
-#if ! defined(O_NDELAY)
-# if defined(solaris2)
-# define O_NDELAY O_NONBLOCK
-# elif defined(RTEMS_NEWLIB)
-# define O_NDELAY _FNBIO
-# endif
-#endif
-
-#if !defined(ENOTSUP)
-#define ENOTSUP EOPNOTSUPP
-#endif
-
-#include <errno.h>
-#include <string.h> /* strcmp */
-#include <unistd.h>
-#include <stdlib.h> /* calloc() */
-
-/*
- * Semaphore to protect the io table
- */
-
-#define RTEMS_LIBIO_SEM rtems_build_name('L', 'B', 'I', 'O')
-#define RTEMS_LIBIO_IOP_SEM(n) rtems_build_name('L', 'B', 'I', n)
-
-extern rtems_id rtems_libio_semaphore;
-extern rtems_filesystem_file_handlers_r rtems_filesystem_null_handlers;
-
-/*
- * File descriptor Table Information
- */
-
-extern unsigned32 rtems_libio_number_iops;
-extern rtems_libio_t *rtems_libio_iops;
-extern rtems_libio_t *rtems_libio_last_iop;
-extern rtems_libio_t *rtems_libio_iop_freelist;
-
-/*
- * Default mode for all files.
- */
-
-extern mode_t rtems_filesystem_umask;
-
-/*
- * set_errno_and_return_minus_one
- *
- * Macro to ease common way to return an error.
- */
-
-#ifndef set_errno_and_return_minus_one
-#define set_errno_and_return_minus_one( _error ) \
- do { errno = (_error); return -1; } while(0)
-#endif
-
-/*
- * rtems_libio_iop
- *
- * Macro to return the file descriptor pointer.
- */
-
-#define rtems_libio_iop(_fd) \
- ((((unsigned32)(_fd)) < rtems_libio_number_iops) ? \
- &rtems_libio_iops[_fd] : 0)
-
-/*
- * rtems_libio_check_is_open
- *
- * Macro to check if a file descriptor is actually open.
- */
-
-#define rtems_libio_check_is_open(_iop) \
- do { \
- if (((_iop)->flags & LIBIO_FLAGS_OPEN) == 0) { \
- errno = EBADF; \
- return -1; \
- } \
- } while (0)
-
-/*
- * rtems_libio_check_fd
- *
- * Macro to check if a file descriptor number is valid.
- */
-
-#define rtems_libio_check_fd(_fd) \
- do { \
- if ((unsigned32) (_fd) >= rtems_libio_number_iops) { \
- errno = EBADF; \
- return -1; \
- } \
- } while (0)
-
-/*
- * rtems_libio_check_buffer
- *
- * Macro to check if a buffer pointer is valid.
- */
-
-#define rtems_libio_check_buffer(_buffer) \
- do { \
- if ((_buffer) == 0) { \
- errno = EINVAL; \
- return -1; \
- } \
- } while (0)
-
-/*
- * rtems_libio_check_count
- *
- * Macro to check if a count or length is valid.
- */
-
-#define rtems_libio_check_count(_count) \
- do { \
- if ((_count) == 0) { \
- return 0; \
- } \
- } while (0)
-
-/*
- * rtems_libio_check_permissions
- *
- * Macro to check if a file descriptor is open for this operation.
- */
-
-#define rtems_libio_check_permissions(_iop, _flag) \
- do { \
- if (((_iop)->flags & (_flag)) == 0) { \
- set_errno_and_return_minus_one( EINVAL ); \
- return -1; \
- } \
- } while (0)
-
-/*
- * rtems_filesystem_freenode
- *
- * Macro to free a node.
- */
-
-#define rtems_filesystem_freenode( _node ) \
- do { \
- if ( (_node)->ops->freenod ) \
- (*(_node)->ops->freenod)( (_node) ); \
- } while (0)
-
-/*
- * rtems_filesystem_is_separator
- *
- * Macro to determine if a character is a path name separator.
- *
- * NOTE: This macro handles MS-DOS and UNIX style names.
- */
-
-#define rtems_filesystem_is_separator( _ch ) \
- ( ((_ch) == '/') || ((_ch) == '\\') || ((_ch) == '\0'))
-
-/*
- * rtems_filesystem_get_start_loc
- *
- * Macro to determine if path is absolute or relative.
- */
-
-#define rtems_filesystem_get_start_loc( _path, _index, _loc ) \
- do { \
- if ( rtems_filesystem_is_separator( (_path)[ 0 ] ) ) { \
- *(_loc) = rtems_filesystem_root; \
- *(_index) = 1; \
- } else { \
- *(_loc) = rtems_filesystem_current; \
- *(_index) = 0; \
- } \
- } while (0)
-
-#define rtems_filesystem_get_sym_start_loc( _path, _index, _loc ) \
- do { \
- if ( rtems_filesystem_is_separator( (_path)[ 0 ] ) ) { \
- *(_loc) = rtems_filesystem_root; \
- *(_index) = 1; \
- } else { \
- *(_index) = 0; \
- } \
- } while (0)
-
-
-/*
- * External structures
- */
-
-extern rtems_filesystem_location_info_t rtems_filesystem_current;
-extern rtems_filesystem_location_info_t rtems_filesystem_root;
-extern nlink_t rtems_filesystem_link_counts;
-
-
-/*
- * File Descriptor Routine Prototypes
- */
-
-rtems_libio_t *rtems_libio_allocate(void);
-
-unsigned32 rtems_libio_fcntl_flags(
- unsigned32 fcntl_flags
-);
-
-unsigned32 rtems_libio_to_fcntl_flags(
- unsigned32 flags
-);
-
-void rtems_libio_free(
- rtems_libio_t *iop
-);
-
-int rtems_libio_is_open_files_in_fs(
- rtems_filesystem_mount_table_entry_t *mt_entry
-);
-
-int rtems_libio_is_file_open(
- void *node_access
-);
-
-/*
- * File System Routine Prototypes
- */
-
-int rtems_filesystem_evaluate_path(
- const char *pathname,
- int flags,
- rtems_filesystem_location_info_t *pathloc,
- int follow_link
-);
-
-void rtems_filesystem_initialize();
-
-int init_fs_mount_table();
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
-
-
diff --git a/cpukit/libcsupport/include/spurious.h b/cpukit/libcsupport/include/spurious.h
deleted file mode 100644
index 36fcaba904..0000000000
--- a/cpukit/libcsupport/include/spurious.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* spurious.h
- *
- * This file describes the Spurious Interrupt Driver for all boards.
- *
- * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __SPURIOUS_h
-#define __SPURIOUS_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define SPURIOUS_DRIVER_TABLE_ENTRY \
- { Spurious_Initialize, NULL, NULL, NULL, NULL, NULL }
-
-rtems_device_driver Spurious_Initialize(
- rtems_device_major_number,
- rtems_device_minor_number,
- void *,
- rtems_id,
- rtems_unsigned32 *
-);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/libcsupport/include/sys/filio.h b/cpukit/libcsupport/include/sys/filio.h
deleted file mode 100644
index b82a649c0f..0000000000
--- a/cpukit/libcsupport/include/sys/filio.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*-
- * Copyright (c) 1982, 1986, 1990, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- * (c) UNIX System Laboratories, Inc.
- * All or some portions of this file are derived from material licensed
- * to the University of California by American Telephone and Telegraph
- * Co. or Unix System Laboratories, Inc. and are reproduced herein with
- * the permission of UNIX System Laboratories, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)filio.h 8.1 (Berkeley) 3/28/94
- * $Id$
- */
-
-#ifndef _SYS_FILIO_H_
-#define _SYS_FILIO_H_
-
-#include <sys/ioccom.h>
-
-/* Generic file-descriptor ioctl's. */
-#define FIOCLEX _IO('f', 1) /* set close on exec on fd */
-#define FIONCLEX _IO('f', 2) /* remove close on exec */
-#define FIONREAD _IOR('f', 127, int) /* get # bytes to read */
-#define FIONBIO _IOW('f', 126, int) /* set/clear non-blocking i/o */
-#define FIOASYNC _IOW('f', 125, int) /* set/clear async i/o */
-#define FIOSETOWN _IOW('f', 124, int) /* set owner */
-#define FIOGETOWN _IOR('f', 123, int) /* get owner */
-
-#endif /* !_SYS_FILIO_H_ */
diff --git a/cpukit/libcsupport/include/sys/ioctl.h b/cpukit/libcsupport/include/sys/ioctl.h
deleted file mode 100644
index e3a69a5a7f..0000000000
--- a/cpukit/libcsupport/include/sys/ioctl.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*-
- * Copyright (c) 1982, 1986, 1990, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- * (c) UNIX System Laboratories, Inc.
- * All or some portions of this file are derived from material licensed
- * to the University of California by American Telephone and Telegraph
- * Co. or Unix System Laboratories, Inc. and are reproduced herein with
- * the permission of UNIX System Laboratories, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ioctl.h 8.6 (Berkeley) 3/28/94
- * $Id$
- */
-
-#ifndef _SYS_IOCTL_H_
-#define _SYS_IOCTL_H_
-
-#include <sys/ttycom.h>
-
-/*
- * Pun for SunOS prior to 3.2. SunOS 3.2 and later support TIOCGWINSZ
- * and TIOCSWINSZ (yes, even 3.2-3.5, the fact that it wasn't documented
- * notwithstanding).
- */
-struct ttysize {
- unsigned short ts_lines;
- unsigned short ts_cols;
- unsigned short ts_xxx;
- unsigned short ts_yyy;
-};
-#define TIOCGSIZE TIOCGWINSZ
-#define TIOCSSIZE TIOCSWINSZ
-
-#include <sys/ioccom.h>
-
-#include <sys/filio.h>
-#include <sys/sockio.h>
-
-#endif /* !_SYS_IOCTL_H_ */
-
-/*
- * Keep outside _SYS_IOCTL_H_
- * Compatibility with old terminal driver
- *
- * Source level -> #define USE_OLD_TTY
- * Kernel level -> options COMPAT_43 or COMPAT_SUNOS
- */
-#if defined(USE_OLD_TTY) || defined(COMPAT_43) || defined(COMPAT_SUNOS)
-#include <sys/ioctl_compat.h>
-#endif
diff --git a/cpukit/libcsupport/include/sys/sockio.h b/cpukit/libcsupport/include/sys/sockio.h
deleted file mode 100644
index 5e54baffe8..0000000000
--- a/cpukit/libcsupport/include/sys/sockio.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*-
- * Copyright (c) 1982, 1986, 1990, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)sockio.h 8.1 (Berkeley) 3/28/94
- * $Id$
- */
-
-#ifndef _SYS_SOCKIO_H_
-#define _SYS_SOCKIO_H_
-
-#include <sys/ioccom.h>
-
-/* Socket ioctl's. */
-#define SIOCSHIWAT _IOW('s', 0, int) /* set high watermark */
-#define SIOCGHIWAT _IOR('s', 1, int) /* get high watermark */
-#define SIOCSLOWAT _IOW('s', 2, int) /* set low watermark */
-#define SIOCGLOWAT _IOR('s', 3, int) /* get low watermark */
-#define SIOCATMARK _IOR('s', 7, int) /* at oob mark? */
-#define SIOCSPGRP _IOW('s', 8, int) /* set process group */
-#define SIOCGPGRP _IOR('s', 9, int) /* get process group */
-
-#define SIOCADDRT _IOW('r', 10, struct ortentry) /* add route */
-#define SIOCDELRT _IOW('r', 11, struct ortentry) /* delete route */
-#define SIOCGETVIFCNT _IOWR('r', 15, struct sioc_vif_req)/* get vif pkt cnt */
-#define SIOCGETSGCNT _IOWR('r', 16, struct sioc_sg_req) /* get s,g pkt cnt */
-
-#define SIOCSIFADDR _IOW('i', 12, struct ifreq) /* set ifnet address */
-#define OSIOCGIFADDR _IOWR('i', 13, struct ifreq) /* get ifnet address */
-#define SIOCGIFADDR _IOWR('i', 33, struct ifreq) /* get ifnet address */
-#define SIOCSIFDSTADDR _IOW('i', 14, struct ifreq) /* set p-p address */
-#define OSIOCGIFDSTADDR _IOWR('i', 15, struct ifreq) /* get p-p address */
-#define SIOCGIFDSTADDR _IOWR('i', 34, struct ifreq) /* get p-p address */
-#define SIOCSIFFLAGS _IOW('i', 16, struct ifreq) /* set ifnet flags */
-#define SIOCGIFFLAGS _IOWR('i', 17, struct ifreq) /* get ifnet flags */
-#define OSIOCGIFBRDADDR _IOWR('i', 18, struct ifreq) /* get broadcast addr */
-#define SIOCGIFBRDADDR _IOWR('i', 35, struct ifreq) /* get broadcast addr */
-#define SIOCSIFBRDADDR _IOW('i', 19, struct ifreq) /* set broadcast addr */
-#define OSIOCGIFCONF _IOWR('i', 20, struct ifconf) /* get ifnet list */
-#define SIOCGIFCONF _IOWR('i', 36, struct ifconf) /* get ifnet list */
-#define OSIOCGIFNETMASK _IOWR('i', 21, struct ifreq) /* get net addr mask */
-#define SIOCGIFNETMASK _IOWR('i', 37, struct ifreq) /* get net addr mask */
-#define SIOCSIFNETMASK _IOW('i', 22, struct ifreq) /* set net addr mask */
-#define SIOCGIFMETRIC _IOWR('i', 23, struct ifreq) /* get IF metric */
-#define SIOCSIFMETRIC _IOW('i', 24, struct ifreq) /* set IF metric */
-#define SIOCDIFADDR _IOW('i', 25, struct ifreq) /* delete IF addr */
-#define SIOCAIFADDR _IOW('i', 26, struct ifaliasreq)/* add/chg IF alias */
-
-#define SIOCADDMULTI _IOW('i', 49, struct ifreq) /* add m'cast addr */
-#define SIOCDELMULTI _IOW('i', 50, struct ifreq) /* del m'cast addr */
-#define SIOCGIFMTU _IOWR('i', 51, struct ifreq) /* get IF mtu */
-#define SIOCSIFMTU _IOW('i', 52, struct ifreq) /* set IF mtu */
-#define SIOCGIFPHYS _IOWR('i', 53, struct ifreq) /* get IF wire */
-#define SIOCSIFPHYS _IOW('i', 54, struct ifreq) /* set IF wire */
-#define SIOCSIFMEDIA _IOWR('i', 55, struct ifreq) /* set net media */
-#define SIOCGIFMEDIA _IOWR('i', 56, struct ifmediareq) /* get net media */
-
-/*
- * RTEMS additions for setting/getting `tap' function on incoming packets.
- */
-#define SIOCSIFTAP _IOW('i', 80, struct ifreq) /* set tap function */
-#define SIOCGIFTAP _IOW('i', 81, struct ifreq) /* get tap function */
-
-#endif /* !_SYS_SOCKIO_H_ */
diff --git a/cpukit/libcsupport/include/sys/termios.h b/cpukit/libcsupport/include/sys/termios.h
deleted file mode 100644
index bb64d55433..0000000000
--- a/cpukit/libcsupport/include/sys/termios.h
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- * POSIX termios implementation for RTEMS console device driver.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef TERMIOS_H
-#define TERMIOS_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef unsigned char cc_t;
-typedef unsigned int speed_t;
-typedef unsigned int tcflag_t;
-
-#define NCCS 19
-struct termios {
- tcflag_t c_iflag; /* input mode flags */
- tcflag_t c_oflag; /* output mode flags */
- tcflag_t c_cflag; /* control mode flags */
- tcflag_t c_lflag; /* local mode flags */
- cc_t c_line; /* line discipline */
- cc_t c_cc[NCCS]; /* control characters */
-};
-
-/* c_cc characters */
-#define VINTR 0
-#define VQUIT 1
-#define VERASE 2
-#define VKILL 3
-#define VEOF 4
-#define VTIME 5
-#define VMIN 6
-#define VSWTC 7
-#define VSTART 8
-#define VSTOP 9
-#define VSUSP 10
-#define VEOL 11
-#define VREPRINT 12
-#define VDISCARD 13
-#define VWERASE 14
-#define VLNEXT 15
-#define VEOL2 16
-
-/* c_iflag bits */
-#define IGNBRK 0000001
-#define BRKINT 0000002
-#define IGNPAR 0000004
-#define PARMRK 0000010
-#define INPCK 0000020
-#define ISTRIP 0000040
-#define INLCR 0000100
-#define IGNCR 0000200
-#define ICRNL 0000400
-#define IUCLC 0001000
-#define IXON 0002000
-#define IXANY 0004000
-#define IXOFF 0010000
-#define IMAXBEL 0020000
-
-/* c_oflag bits */
-#define OPOST 0000001
-#define OLCUC 0000002
-#define ONLCR 0000004
-#define OCRNL 0000010
-#define ONOCR 0000020
-#define ONLRET 0000040
-#define OFILL 0000100
-#define OFDEL 0000200
-#define NLDLY 0000400
-#define NL0 0000000
-#define NL1 0000400
-#define CRDLY 0003000
-#define CR0 0000000
-#define CR1 0001000
-#define CR2 0002000
-#define CR3 0003000
-#define TABDLY 0014000
-#define TAB0 0000000
-#define TAB1 0004000
-#define TAB2 0010000
-#define TAB3 0014000
-#define XTABS 0014000
-#define BSDLY 0020000
-#define BS0 0000000
-#define BS1 0020000
-#define VTDLY 0040000
-#define VT0 0000000
-#define VT1 0040000
-#define FFDLY 0100000
-#define FF0 0000000
-#define FF1 0100000
-
-/* c_cflag bit meaning */
-#define CBAUD 0010017
-#define B0 0000000 /* hang up */
-#define B50 0000001
-#define B75 0000002
-#define B110 0000003
-#define B134 0000004
-#define B150 0000005
-#define B200 0000006
-#define B300 0000007
-#define B600 0000010
-#define B1200 0000011
-#define B1800 0000012
-#define B2400 0000013
-#define B4800 0000014
-#define B9600 0000015
-#define B19200 0000016
-#define B38400 0000017
-#define EXTA B19200
-#define EXTB B38400
-#define CSIZE 0000060
-#define CS5 0000000
-#define CS6 0000020
-#define CS7 0000040
-#define CS8 0000060
-#define CSTOPB 0000100
-#define CREAD 0000200
-#define PARENB 0000400
-#define PARODD 0001000
-#define HUPCL 0002000
-#define CLOCAL 0004000
-#define CBAUDEX 0010000
-#define B57600 0010001
-#define B115200 0010002
-#define B230400 0010003
-#define B460800 0010004
-#define CIBAUD 002003600000 /* input baud rate (not used) */
-#define CRTSCTS 020000000000 /* flow control */
-
-#define RTEMS_TERMIOS_NUMBER_BAUD_RATES 20
-
-/* c_lflag bits */
-#define ISIG 0000001
-#define ICANON 0000002
-#define XCASE 0000004
-#define ECHO 0000010
-#define ECHOE 0000020
-#define ECHOK 0000040
-#define ECHONL 0000100
-#define NOFLSH 0000200
-#define TOSTOP 0000400
-#define ECHOCTL 0001000
-#define ECHOPRT 0002000
-#define ECHOKE 0004000
-#define FLUSHO 0010000
-#define PENDIN 0040000
-#define IEXTEN 0100000
-
-/* tcflow() and TCXONC use these */
-#define TCOOFF 0
-#define TCOON 1
-#define TCIOFF 2
-#define TCION 3
-
-/* tcflush() and TCFLSH use these */
-#define TCIFLUSH 0
-#define TCOFLUSH 1
-#define TCIOFLUSH 2
-
-/* tcsetattr uses these */
-#define TCSANOW 0
-#define TCSADRAIN 1
-#define TCSAFLUSH 2
-
-int tcgetattr(int, struct termios *);
-int tcsetattr(int, int, struct termios *);
-int tcdrain(int);
-speed_t cfgetospeed(const struct termios *tp);
-int cfsetospeed(struct termios *tp, speed_t speed);
-speed_t cfgetispeed(const struct termios *tp);
-int cfsetispeed(struct termios *tp, speed_t speed);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* TERMIOS_H */
diff --git a/cpukit/libcsupport/include/sys/utime.h b/cpukit/libcsupport/include/sys/utime.h
deleted file mode 100644
index 3e9955e61f..0000000000
--- a/cpukit/libcsupport/include/sys/utime.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * $Id$
- */
-
-#ifndef __UTIME_h__
-#define __UTIME_h__
-
-/*
- * POSIX 1003.1b 5.6.6 Set File Access and Modification Times
- */
-
-struct utimbuf {
- time_t actime; /* Access time */
- time_t modtime; /* Modification time */
-};
-
-/* Functions */
-
-int utime(
- const char *path,
- const struct utimbuf *times
-);
-
-#endif
-/* end of include file */
diff --git a/cpukit/libcsupport/include/sys/utsname.h b/cpukit/libcsupport/include/sys/utsname.h
deleted file mode 100644
index ca15230d40..0000000000
--- a/cpukit/libcsupport/include/sys/utsname.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* sys/utsname.h
- *
- * $Id$
- */
-
-#ifndef __POSIX_SYS_UTSNAME_h
-#define __POSIX_SYS_UTSNAME_h
-
-#include <sys/times.h>
-#include <sys/types.h>
-
-/*
- * 4.4.1 Get System Name (Table 4-1), P1003.1b-1993, p. 90
- *
- * NOTE: The lengths of the strings in this structure are
- * just long enough to reliably contain the RTEMS information.
- * For example, the fields are not long enough to support
- * Internet hostnames.
- */
-
-struct utsname {
- char sysname[ 32 ]; /* Name of this implementation of the operating system */
- char nodename[ 32 ]; /* Name of this node within an implementation */
- /* specified communication network */
- char release[ 32 ]; /* Current release level of this implementation */
- char version[ 32 ]; /* Current version level of this release */
- char machine[ 32 ]; /* Name of the hardware type on which the system */
- /* is running */
-};
-
-/*
- * 4.4.1 Get System Name, P1003.1b-1993, p. 90
- */
-
-int uname(
- struct utsname *name
-);
-
-/*
- * 4.5.2 Get Process Times, P1003.1b-1993, p. 92
- */
-
-clock_t times(
- struct tms *buffer
-);
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/libcsupport/include/timerdrv.h b/cpukit/libcsupport/include/timerdrv.h
deleted file mode 100644
index 1234f8283a..0000000000
--- a/cpukit/libcsupport/include/timerdrv.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* timerdrv.h
- *
- * This file describes the Timer Driver for all boards.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __TIMER_DRIVER_h
-#define __TIMER_DRIVER_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* functions */
-
-void Timer_initialize( void );
-
-rtems_unsigned32 Read_timer( void );
-
-rtems_status_code Empty_function( void );
-
-void Set_find_average_overhead(
- rtems_boolean find_flag
-);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/libcsupport/include/vmeintr.h b/cpukit/libcsupport/include/vmeintr.h
deleted file mode 100644
index 583ccff6cc..0000000000
--- a/cpukit/libcsupport/include/vmeintr.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * vmeintr.h
- *
- * This file is the specification for the VMEbus interface library
- * which should be provided by all BSPs for VMEbus Single Board
- * Computers but currently only a few do so.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __VME_INTERRUPT_h
-#define __VME_INTERRUPT_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This defines the mask which is used to determine which
- * interrupt levels are affected by a call to this package.
- * The LSB corresponds to VME interrupt 0 and the MSB
- * to VME interrupt 7.
- *
- */
-
-typedef rtems_unsigned8 VME_interrupt_Mask;
-
-/*
- * VME_interrupt_Disable
- *
- */
-
-void VME_interrupt_Disable (
- VME_interrupt_Mask mask /* IN */
-);
-
-/*
- * VME_interrupt_Disable
- *
- */
-
-void VME_interrupt_Enable (
- VME_interrupt_Mask mask /* IN */
-);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* end of include file */
diff --git a/cpukit/libcsupport/include/zilog/z8036.h b/cpukit/libcsupport/include/zilog/z8036.h
deleted file mode 100644
index d2f1652bcc..0000000000
--- a/cpukit/libcsupport/include/zilog/z8036.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/* z8036.h
- *
- * This include file defines information related to a Zilog Z8036
- * Counter/Timer/IO Chip. It is a memory mapped part.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * NOTE: This file shares as much as possible with the include
- * file for the Z8536 via z8x36.h.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __Z8036_h
-#define __Z8036_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* macros */
-
-#define Z8036( ptr ) ((volatile struct z8036_map *)(ptr))
-
-#define Z8x36_STATE0 ( z8036 ) \
- { /*char *garbage = *(Z8036(z8036))->???; */ }
-
-
-#define Z8x36_WRITE( z8036, reg, data ) \
- (Z8036(z8036))->reg = (data)
-
-
-#define Z8x36_READ( z8036, reg, data ) \
- (Z8036(z8036))->reg = (data)
-
-/* structures */
-
-struct z8036_map {
-/* MAIN CONTROL REGISTERS (0x00-0x07) */
- rtems_unsigned8 MASTER_INTR; /* Master Interrupt Ctl Reg */
- rtems_unsigned8 MASTER_CFG; /* Master Configuration Ctl Reg */
- rtems_unsigned8 PORTA_VECTOR; /* Port A - Interrupt Vector */
- rtems_unsigned8 PORTB_VECTOR; /* Port B - Interrupt Vector */
- rtems_unsigned8 CNT_TMR_VECTOR; /* Counter/Timer Interrupt Vector */
- rtems_unsigned8 PORTC_DATA_POLARITY; /* Port C - Data Path Polarity */
- rtems_unsigned8 PORTC_DIRECTION; /* Port C - Data Direction */
- rtems_unsigned8 PORTC_SPECIAL_IO_CTL; /* Port C - Special IO Control */
-/* MOST OFTEN ACCESSED REGISTERS (0x08 - 0x0f) */
- rtems_unsigned8 PORTA_CMD_STATUS; /* Port A - Command Status Reg */
- rtems_unsigned8 PORTB_CMD_STATUS; /* Port B - Command Status Reg */
- rtems_unsigned8 CT1_CMD_STATUS; /* Ctr/Timer 1 - Command Status Reg */
- rtems_unsigned8 CT2_CMD_STATUS; /* Ctr/Timer 2 - Command Status Reg */
- rtems_unsigned8 CT3_CMD_STATUS; /* Ctr/Timer 3 - Command Status Reg */
- rtems_unsigned8 PORTA_DATA; /* Port A - Data */
- rtems_unsigned8 PORTB_DATA; /* Port B - Data */
- rtems_unsigned8 PORTC_DATA; /* Port C - Data */
-/* COUNTER/TIMER RELATED REGISTERS (0x10-0x1f) */
- rtems_unsigned8 CT1_CUR_CNT_MSB; /* Ctr/Timer 1 - Current Count (MSB) */
- rtems_unsigned8 CT1_CUR_CNT_LSB; /* Ctr/Timer 1 - Current Count (LSB) */
- rtems_unsigned8 CT2_CUR_CNT_MSB; /* Ctr/Timer 2 - Current Count (MSB) */
- rtems_unsigned8 CT2_CUR_CNT_LSB; /* Ctr/Timer 2 - Current Count (LSB) */
- rtems_unsigned8 CT3_CUR_CNT_MSB; /* Ctr/Timer 3 - Current Count (MSB) */
- rtems_unsigned8 CT3_CUR_CNT_LSB; /* Ctr/Timer 3 - Current Count (LSB) */
- rtems_unsigned8 CT1_TIME_CONST_MSB; /* Ctr/Timer 1 - Time Constant (MSB) */
- rtems_unsigned8 CT1_TIME_CONST_LSB; /* Ctr/Timer 1 - Time Constant (LSB) */
- rtems_unsigned8 CT2_TIME_CONST_MSB; /* Ctr/Timer 2 - Time Constant (MSB) */
- rtems_unsigned8 CT2_TIME_CONST_LSB; /* Ctr/Timer 2 - Time Constant (LSB) */
- rtems_unsigned8 CT3_TIME_CONST_MSB; /* Ctr/Timer 3 - Time Constant (MSB) */
- rtems_unsigned8 CT3_TIME_CONST_LSB; /* Ctr/Timer 3 - Time Constant (LSB) */
- rtems_unsigned8 CT1_MODE_SPEC; /* Ctr/Timer 1 - Mode Specification */
- rtems_unsigned8 CT2_MODE_SPEC; /* Ctr/Timer 2 - Mode Specification */
- rtems_unsigned8 CT3_MODE_SPEC; /* Ctr/Timer 3 - Mode Specification */
- rtems_unsigned8 CURRENT_VECTOR; /* Current Vector */
-/* PORT A SPECIFICATION REGISTERS (0x20 -0x27) */
- rtems_unsigned8 PORTA_MODE; /* Port A - Mode Specification */
- rtems_unsigned8 PORTA_HANDSHAKE; /* Port A - Handshake Specification */
- rtems_unsigned8 PORTA_DATA_POLARITY; /* Port A - Data Path Polarity */
- rtems_unsigned8 PORTA_DIRECTION; /* Port A - Data Direction */
- rtems_unsigned8 PORTA_SPECIAL_IO_CTL; /* Port A - Special IO Control */
- rtems_unsigned8 PORTA_PATT_POLARITY; /* Port A - Pattern Polarity */
- rtems_unsigned8 PORTA_PATT_TRANS; /* Port A - Pattern Transition */
- rtems_unsigned8 PORTA_PATT_MASK; /* Port A - Pattern Mask */
-/* PORT B SPECIFICATION REGISTERS (0x28-0x2f) */
- rtems_unsigned8 PORTB_MODE; /* Port B - Mode Specification */
- rtems_unsigned8 PORTB_HANDSHAKE; /* Port B - Handshake Specification */
- rtems_unsigned8 PORTB_DATA_POLARITY; /* Port B - Data Path Polarity */
- rtems_unsigned8 PORTB_DIRECTION; /* Port B - Data Direction */
- rtems_unsigned8 PORTB_SPECIAL_IO_CTL; /* Port B - Special IO Control */
- rtems_unsigned8 PORTB_PATT_POLARITY; /* Port B - Pattern Polarity */
- rtems_unsigned8 PORTB_PATT_TRANS; /* Port B - Pattern Transition */
- rtems_unsigned8 PORTB_PATT_MASK; /* Port B - Pattern Mask */
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
diff --git a/cpukit/libcsupport/include/zilog/z8530.h b/cpukit/libcsupport/include/zilog/z8530.h
deleted file mode 100644
index aba481ac25..0000000000
--- a/cpukit/libcsupport/include/zilog/z8530.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/* z8530.h
- *
- * This include file defines information related to a Zilog Z8530
- * SCC Chip. It is a IO mapped part.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __Z8530_h
-#define __Z8530_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* macros */
-
-#define VOL8( ptr ) ((volatile rtems_unsigned8 *)(ptr))
-
-#define Z8x30_STATE0 ( z8530 ) \
- { char *garbage; \
- (garbage) = *(VOL8(z8530)) \
- }
-
-#define Z8x30_WRITE_CONTROL( z8530, reg, data ) \
- *(VOL8(z8530)) = (reg); \
- *(VOL8(z8530)) = (data)
-
-#define Z8x30_READ_CONTROL( z8530, reg, data ) \
- *(VOL8(z8530)) = (reg); \
- (data) = *(VOL8(z8530))
-
-#define Z8x30_WRITE_DATA( z8530, data ) \
- *(VOL8(z8530)) = (data);
-
-#define Z8x30_READ_DATA( z8530, data ) \
- (data) = *(VOL8(z8530));
-
-
-/* RR_0 Bit Definitions */
-
-#define RR_0_TX_BUFFER_EMPTY 0x04
-#define RR_0_RX_DATA_AVAILABLE 0x01
-
-/* read registers */
-
-#define RR_0 0x00
-#define RR_1 0x01
-#define RR_2 0x02
-#define RR_3 0x03
-#define RR_4 0x04
-#define RR_5 0x05
-#define RR_6 0x06
-#define RR_7 0x07
-#define RR_8 0x08
-#define RR_9 0x09
-#define RR_10 0x0A
-#define RR_11 0x0B
-#define RR_12 0x0C
-#define RR_13 0x0D
-#define RR_14 0x0E
-#define RR_15 0x0F
-
-/* write registers */
-
-#define WR_0 0x00
-#define WR_1 0x01
-#define WR_2 0x02
-#define WR_3 0x03
-#define WR_4 0x04
-#define WR_5 0x05
-#define WR_6 0x06
-#define WR_7 0x07
-#define WR_8 0x08
-#define WR_9 0x09
-#define WR_10 0x0A
-#define WR_11 0x0B
-#define WR_12 0x0C
-#define WR_13 0x0D
-#define WR_14 0x0E
-#define WR_15 0x0F
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/cpukit/libcsupport/include/zilog/z8536.h b/cpukit/libcsupport/include/zilog/z8536.h
deleted file mode 100644
index 8b8fac4567..0000000000
--- a/cpukit/libcsupport/include/zilog/z8536.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/* z8536.h
- *
- * This include file defines information related to a Zilog Z8536
- * Counter/Timer/IO Chip. It is a IO mapped part.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * NOTE: This file shares as much as possible with the include
- * file for the Z8036 via z8x36.h.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __Z8536_h
-#define __Z8536_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* macros */
-
-#define VOL8( ptr ) ((volatile rtems_unsigned8 *)(ptr))
-
-#define Z8x36_STATE0 ( z8536 ) \
- { char *garbage; \
- (garbage) = *(VOL8(z8536+0xC)) \
- }
-
-#define Z8x36_WRITE( z8536, reg, data ) \
- *(VOL8(z8536+0xC)) = (reg); \
- *(VOL8(z8536+0xC)) = (data)
-
-#define Z8x36_READ( z8536, reg, data ) \
- *(VOL8(z8536+0xC)) = (reg); \
- (data) = *(VOL8(z8536+0xC))
-
-/* structures */
-
-/* MAIN CONTROL REGISTERS (0x00-0x07) */
-#define MASTER_INTR 0x00 /* Master Interrupt Ctl Reg */
-#define MASTER_CFG 0x01 /* Master Configuration Ctl Reg */
-#define PORTA_VECTOR 0x02 /* Port A - Interrupt Vector */
-#define PORTB_VECTOR 0x03 /* Port B - Interrupt Vector */
-#define CNT_TMR_VECTOR 0x04 /* Counter/Timer Interrupt Vector */
-#define PORTC_DATA_POLARITY 0x05 /* Port C - Data Path Polarity */
-#define PORTC_DIRECTION 0x06 /* Port C - Data Direction */
-#define PORTC_SPECIAL_IO_CTL 0x07 /* Port C - Special IO Control */
-
-/* MOST OFTEN ACCESSED REGISTERS (0x08 - 0x0f) */
-#define PORTA_CMD_STATUS 0x08 /* Port A - Command Status Reg */
-#define PORTB_CMD_STATUS 0x09 /* Port B - Command Status Reg */
-#define CT1_CMD_STATUS 0x0a /* Ctr/Timer 1 - Command Status Reg */
-#define CT2_CMD_STATUS 0x0b /* Ctr/Timer 2 - Command Status Reg */
-#define CT3_CMD_STATUS 0x0c /* Ctr/Timer 3 - Command Status Reg */
-#define PORTA_DATA 0x0d /* Port A - Data */
-#define PORTB_DATA 0x0e /* Port B - Data */
-#define PORTC_DATA 0x0f /* Port C - Data */
-
-/* COUNTER/TIMER RELATED REGISTERS (0x10-0x1f) */
-#define CT1_CUR_CNT_MSB 0x10 /* Ctr/Timer 1 - Current Count (MSB) */
-#define CT1_CUR_CNT_LSB 0x11 /* Ctr/Timer 1 - Current Count (LSB) */
-#define CT2_CUR_CNT_MSB 0x12 /* Ctr/Timer 2 - Current Count (MSB) */
-#define CT2_CUR_CNT_LSB 0x13 /* Ctr/Timer 2 - Current Count (LSB) */
-#define CT3_CUR_CNT_MSB 0x14 /* Ctr/Timer 3 - Current Count (MSB) */
-#define CT3_CUR_CNT_LSB 0x15 /* Ctr/Timer 3 - Current Count (LSB) */
-#define CT1_TIME_CONST_MSB 0x16 /* Ctr/Timer 1 - Time Constant (MSB) */
-#define CT1_TIME_CONST_LSB 0x17 /* Ctr/Timer 1 - Time Constant (LSB) */
-#define CT2_TIME_CONST_MSB 0x18 /* Ctr/Timer 2 - Time Constant (MSB) */
-#define CT2_TIME_CONST_LSB 0x19 /* Ctr/Timer 2 - Time Constant (LSB) */
-#define CT3_TIME_CONST_MSB 0x1a /* Ctr/Timer 3 - Time Constant (MSB) */
-#define CT3_TIME_CONST_LSB 0x1b /* Ctr/Timer 3 - Time Constant (LSB) */
-#define CT1_MODE_SPEC 0x1c /* Ctr/Timer 1 - Mode Specification */
-#define CT2_MODE_SPEC 0x1d /* Ctr/Timer 2 - Mode Specification */
-#define CT3_MODE_SPEC 0x1e /* Ctr/Timer 3 - Mode Specification */
-#define CURRENT_VECTOR 0x1f /* Current Vector */
-
-/* PORT A SPECIFICATION REGISTERS (0x20 -0x27) */
-#define PORTA_MODE 0x20 /* Port A - Mode Specification */
-#define PORTA_HANDSHAKE 0x21 /* Port A - Handshake Specification */
-#define PORTA_DATA_POLARITY 0x22 /* Port A - Data Path Polarity */
-#define PORTA_DIRECTION 0x23 /* Port A - Data Direction */
-#define PORTA_SPECIAL_IO_CTL 0x24 /* Port A - Special IO Control */
-#define PORTA_PATT_POLARITY 0x25 /* Port A - Pattern Polarity */
-#define PORTA_PATT_TRANS 0x26 /* Port A - Pattern Transition */
-#define PORTA_PATT_MASK 0x27 /* Port A - Pattern Mask */
-
-/* PORT B SPECIFICATION REGISTERS (0x28-0x2f) */
-#define PORTB_MODE 0x28 /* Port B - Mode Specification */
-#define PORTB_HANDSHAKE 0x29 /* Port B - Handshake Specification */
-#define PORTB_DATA_POLARITY 0x2a /* Port B - Data Path Polarity */
-#define PORTB_DIRECTION 0x2b /* Port B - Data Direction */
-#define PORTB_SPECIAL_IO_CTL 0x2c /* Port B - Special IO Control */
-#define PORTB_PATT_POLARITY 0x2d /* Port B - Pattern Polarity */
-#define PORTB_PATT_TRANS 0x2e /* Port B - Pattern Transition */
-#define PORTB_PATT_MASK 0x2f /* Port B - Pattern Mask */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/cpukit/libcsupport/src/CASES b/cpukit/libcsupport/src/CASES
deleted file mode 100644
index 4578ae5009..0000000000
--- a/cpukit/libcsupport/src/CASES
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-# $Id$
-#
-
-This is a list of cases to consider when implementing a file system:
-
-
-+ Given a tree of this form:
-
- a ----- b
- /
- c
-
- Where a and b are directories and c is a link to directory b. Consider
- this sequence:
-
- - rmdir a/b
- - mknod c/b/x
- - unlink c
-
-
-
-
diff --git a/cpukit/libcsupport/src/README b/cpukit/libcsupport/src/README
deleted file mode 100644
index ee7a90501e..0000000000
--- a/cpukit/libcsupport/src/README
+++ /dev/null
@@ -1,37 +0,0 @@
---
--- $Id$
---
-
-Overview of newlib support (newlib is from CYGNUS)
- Each task can have its own libc state including:
- open stdio files
- strtok
- multi precision arithmetic state
- etc.
-
- This is implemented by a reentrancy data structure for each task.
-
- When a task is "started" (in RTEMS sense) the reentrancy structure
- is allocated. Its address is stored in notepad[NOTEPAD_LAST].
-
- When task is switched to, the value of global variable _impure_ptr
- is changed to the value of the new tasks reentrancy structure.
-
- When a task is deleted
- atexit() processing (for that task) happens
- task's stdio buffers are flushed
-
- When exit(3) is called
- calling task's atexit processing done
- global libc state atexit processing done
- (this will include any atexit routines installed by drivers)
- executive is shutdown
- causes a context switch back to bsp land
-
-
-NOTE:
- libc extension are installed by bsp_libc_init()
- iff we are using clock interrupts.
- This hack is necessary to allow the tmtests to avoid
- timing the extensions.
-
diff --git a/cpukit/libcsupport/src/TODO b/cpukit/libcsupport/src/TODO
deleted file mode 100644
index 9d894688d9..0000000000
--- a/cpukit/libcsupport/src/TODO
+++ /dev/null
@@ -1,11 +0,0 @@
-#
-# $Id$
-#
-
-+ newlib 1.8.0 has the wrong prototype for at least read() and write().
-
-+ There should be a "eat it" stub for all system calls which are
- available to make filling out an operations table easier.
- See device_lseek() for an example of where this would be nice.
-
-+ Fix strerror() so it prints all error numbers.
diff --git a/cpukit/libcsupport/src/__brk.c b/cpukit/libcsupport/src/__brk.c
deleted file mode 100644
index 4e5a7fcd22..0000000000
--- a/cpukit/libcsupport/src/__brk.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * RTEMS "Broken" __brk Implementation
- *
- * NOTE: sbrk() is provided by each BSP.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#if !defined(RTEMS_UNIX)
-
-#include <errno.h>
-
-int __brk(
- const void *endds
-)
-{
- errno = EINVAL;
- return -1;
-}
-#endif
diff --git a/cpukit/libcsupport/src/__getpid.c b/cpukit/libcsupport/src/__getpid.c
deleted file mode 100644
index 32353b717d..0000000000
--- a/cpukit/libcsupport/src/__getpid.c
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- * Some C Libraries reference this routine since they think getpid is
- * a real system call.
- *
- * $Id$
- */
-
-#include <unistd.h>
-
-pid_t __getpid(void)
-{
- return getpid();
-}
-
diff --git a/cpukit/libcsupport/src/__gettod.c b/cpukit/libcsupport/src/__gettod.c
deleted file mode 100644
index 6c30e40bfb..0000000000
--- a/cpukit/libcsupport/src/__gettod.c
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * gettimeofday() - SVR4 and BSD4.3 extension required by Newlib
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
-
-#include <rtems.h>
-
-#if !defined(RTEMS_UNIX)
-#ifdef RTEMS_NEWLIB
-#include <sys/reent.h>
-#endif
-
-#include <sys/time.h>
-#include <time.h>
-
-#include <errno.h>
-#include <assert.h>
-
-/*
- * Seconds from January 1, 1970 to January 1, 1988. Used to account for
- * differences between POSIX API and RTEMS core.
- */
-
-#define POSIX_TIME_SECONDS_1970_THROUGH_1988 \
- (((1987 - 1970 + 1) * TOD_SECONDS_PER_NON_LEAP_YEAR) + \
- (4 * TOD_SECONDS_PER_DAY))
-
-/*
- * NOTE: The solaris gettimeofday does not have a second parameter.
- */
-
-int gettimeofday(
- struct timeval *tp,
- struct timezone *tzp
-)
-{
- rtems_interrupt_level level;
- rtems_unsigned32 seconds;
- rtems_unsigned32 microseconds;
-
- if ( !tp ) {
- errno = EFAULT;
- return -1;
- }
-
- /*
- * POSIX does not seem to allow for not having a TOD so we just
- * grab the time of day.
- *
- * NOTE: XXX this routine should really be in the executive proper.
- */
-
- rtems_interrupt_disable(level);
- seconds = _TOD_Seconds_since_epoch;
- microseconds = _TOD_Current.ticks;
- rtems_interrupt_enable(level);
-
- tp->tv_sec = seconds + POSIX_TIME_SECONDS_1970_THROUGH_1988;
- tp->tv_usec = microseconds * _TOD_Microseconds_per_tick;
-
- /*
- * newlib does not have timezone and daylight savings time
- * yet. When it does this needs to be fixed.
- */
-
-#if 0
- if ( tzp ) {
- tzp->tz_minuteswest = 0; /* at UTC */
- tzp->tz_dsttime = 0; /* no daylight savings */
- tzp->minuteswest = timezone / 60; /* from seconds to minutes */
- tzp->dsttime = daylight;
- }
-#endif
- return 0;
-}
-
-#if defined(RTEMS_NEWLIB)
-
-/*
- * "Reentrant" version
- */
-
-int _gettimeofday_r(
- struct _reent *ignored_reentrancy_stuff,
- struct timeval *tp,
- struct timezone *tzp
-)
-{
- return gettimeofday( tp, tzp );
-}
-
-/*
- * "System call" version
- */
-
-int _gettimeofday(
- struct timeval *tp,
- struct timezone *tzp
-)
-{
- return gettimeofday( tp, tzp );
-}
-
-#endif /* defined(RTEMS_NEWLIB) */
-
-#endif
diff --git a/cpukit/libcsupport/src/__sbrk.c b/cpukit/libcsupport/src/__sbrk.c
deleted file mode 100644
index f09188c571..0000000000
--- a/cpukit/libcsupport/src/__sbrk.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * RTEMS "Broken" __sbrk Implementation
- *
- * NOTE: sbrk is provided by the BSP.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#if !defined(RTEMS_UNIX)
-
-#include <errno.h>
-
-void * __sbrk(
- int incr
-)
-{
- errno = EINVAL;
- return (void *)0;
-}
-#endif
diff --git a/cpukit/libcsupport/src/__times.c b/cpukit/libcsupport/src/__times.c
deleted file mode 100644
index 49bd64042b..0000000000
--- a/cpukit/libcsupport/src/__times.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * times() - POSIX 1003.1b 4.5.2 - Get Process Times
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-
-#include <sys/times.h>
-#include <time.h>
-#include <sys/time.h>
-#include <errno.h>
-#include <assert.h>
-
-clock_t _times(
- struct tms *ptms
-)
-{
- rtems_status_code status;
- rtems_interval ticks;
-
- if ( !ptms ) {
- errno = EFAULT;
- return -1;
- }
-
- /* "POSIX" does not seem to allow for not having a TOD */
- status = rtems_clock_get( RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &ticks );
- if ( status != RTEMS_SUCCESSFUL ) {
- assert( 0 );
- return -1;
- }
-
- /*
- * RTEMS has no notion of system versus user time and although
- * a way to keep track of per task CPU usage was added since
- * 3.6.0, this routine does not utilize it yet.
- */
-
- ptms->tms_utime = ticks;
- ptms->tms_stime = 0;
- ptms->tms_cutime = 0;
- ptms->tms_cstime = 0;
-
- return 0;
-}
-
-/*
- * times()
- *
- * times() system call wrapper for _times() above.
- */
-
-clock_t times(
- struct tms *ptms
-)
-{
- return _times( ptms );
-}
-
-/*
- * _times_r
- *
- * This is the Newlib dependent reentrant version of times().
- */
-
-#if defined(RTEMS_NEWLIB)
-
-#include <reent.h>
-
-clock_t _times_r(
- struct _reent *ptr,
- struct tms *ptms
-)
-{
- return _times( ptms );
-}
-#endif
diff --git a/cpukit/libcsupport/src/access.c b/cpukit/libcsupport/src/access.c
deleted file mode 100644
index 7e25fdfc30..0000000000
--- a/cpukit/libcsupport/src/access.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * access() - POSIX 1003.1b 5.6.3 - File Accessibility
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-
-int access(
- const char *path,
- int amode
-)
-{
- struct stat statbuf;
-
- if ( stat(path, &statbuf) )
- return -1;
-
- if ( amode & R_OK ) {
- if (!( statbuf.st_mode & S_IREAD ))
- return -1;
- }
-
- if ( amode & W_OK ) {
- if ( !( statbuf.st_mode & S_IWRITE ) )
- return -1;
- }
-
- if ( amode & X_OK ) {
- if ( !( statbuf.st_mode & S_IEXEC ) )
- return -1;
- }
-
- return 0;
-}
-
diff --git a/cpukit/libcsupport/src/assoc.c b/cpukit/libcsupport/src/assoc.c
deleted file mode 100644
index 5a24bd43a7..0000000000
--- a/cpukit/libcsupport/src/assoc.c
+++ /dev/null
@@ -1,250 +0,0 @@
-/*
- * assoc.c
- * rtems assoc routines
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include "assoc.h"
-
-#include <string.h> /* strcat, strcmp */
-
-#define STREQ(a,b) (strcmp((a), (b)) == 0)
-#define rtems_assoc_is_default(ap) ((ap)->name && STREQ(ap->name, RTEMS_ASSOC_DEFAULT_NAME))
-
-const rtems_assoc_t *
-rtems_assoc_ptr_by_name(
- const rtems_assoc_t *ap,
- const char *name
- )
-{
- const rtems_assoc_t *default_ap = 0;
-
- if (rtems_assoc_is_default(ap))
- default_ap = ap++;
-
- for ( ; ap->name; ap++)
- if (strcmp(ap->name, name) == 0)
- return ap;
-
- return default_ap;
-}
-
-const rtems_assoc_t *
-rtems_assoc_ptr_by_local(
- const rtems_assoc_t *ap,
- unsigned32 local_value
- )
-{
- const rtems_assoc_t *default_ap = 0;
-
- if (rtems_assoc_is_default(ap))
- default_ap = ap++;
-
- for ( ; ap->name; ap++)
- if (ap->local_value == local_value)
- return ap;
-
- return default_ap;
-}
-
-
-const rtems_assoc_t *
-rtems_assoc_ptr_by_remote(
- const rtems_assoc_t *ap,
- unsigned32 remote_value
- )
-{
- const rtems_assoc_t *default_ap = 0;
-
- if (rtems_assoc_is_default(ap))
- default_ap = ap++;
-
- for ( ; ap->name; ap++)
- if (ap->remote_value == remote_value)
- return ap;
-
- return default_ap;
-}
-
-
-/*
- * Get values
- */
-
-unsigned32
-rtems_assoc_remote_by_local(
- const rtems_assoc_t *ap,
- unsigned32 local_value
- )
-{
- const rtems_assoc_t *nap;
- nap = rtems_assoc_ptr_by_local(ap, local_value);
- if (nap)
- return nap->remote_value;
-
- return 0;
-}
-
-unsigned32
-rtems_assoc_local_by_remote(
- const rtems_assoc_t *ap,
- unsigned32 remote_value
- )
-{
- const rtems_assoc_t *nap;
- nap = rtems_assoc_ptr_by_remote(ap, remote_value);
- if (nap)
- return nap->local_value;
-
- return 0;
-}
-
-unsigned32
-rtems_assoc_remote_by_name(
- const rtems_assoc_t *ap,
- const char *name
- )
-{
- const rtems_assoc_t *nap;
- nap = rtems_assoc_ptr_by_name(ap, name);
- if (nap)
- return nap->remote_value;
-
- return 0;
-}
-
-unsigned32
-rtems_assoc_local_by_name(
- const rtems_assoc_t *ap,
- const char *name
- )
-{
- const rtems_assoc_t *nap;
- nap = rtems_assoc_ptr_by_name(ap, name);
- if (nap)
- return nap->local_value;
-
- return 0;
-}
-
-/*
- * what to return if a value is not found
- * this is not reentrant, but it really shouldn't be invoked anyway
- */
-
-const char *rtems_assoc_name_bad(
- unsigned32 bad_value
-);
-
-/* body in separate file to reduce dependency on printf */
-
-
-const char *
-rtems_assoc_name_by_local(
- const rtems_assoc_t *ap,
- unsigned32 local_value
- )
-{
- const rtems_assoc_t *nap;
- nap = rtems_assoc_ptr_by_local(ap, local_value);
- if (nap)
- return nap->name;
-
- return rtems_assoc_name_bad(local_value);
-}
-
-const char *
-rtems_assoc_name_by_remote(
- const rtems_assoc_t *ap,
- unsigned32 remote_value
- )
-{
- const rtems_assoc_t *nap;
- nap = rtems_assoc_ptr_by_remote(ap, remote_value);
- if (nap)
- return nap->name;
-
- return rtems_assoc_name_bad(remote_value);
-}
-
-/*
- * Bitfield functions assume just 1 bit set in each of remote and local
- * entries; they do not check for this.
- */
-
-unsigned32 rtems_assoc_remote_by_local_bitfield(
- const rtems_assoc_t *ap,
- unsigned32 local_value
- )
-{
- unsigned32 b;
- unsigned32 remote_value = 0;
-
- for (b = 1; b; b <<= 1)
- if (b & local_value)
- remote_value |= rtems_assoc_remote_by_local(ap, b);
-
- return remote_value;
-}
-
-
-unsigned32 rtems_assoc_local_by_remote_bitfield(
- const rtems_assoc_t *ap,
- unsigned32 remote_value
- )
-{
- unsigned32 b;
- unsigned32 local_value = 0;
-
- for (b = 1; b; b <<= 1)
- if (b & remote_value)
- local_value |= rtems_assoc_local_by_remote(ap, b);
-
- return local_value;
-}
-
-char *
-rtems_assoc_name_by_remote_bitfield(
- const rtems_assoc_t *ap,
- unsigned32 value,
- char *buffer
- )
-{
- unsigned32 b;
-
- *buffer = 0;
-
- for (b = 1; b; b <<= 1)
- if (b & value)
- {
- if (*buffer)
- strcat(buffer, " ");
- strcat(buffer, rtems_assoc_name_by_remote(ap, b));
- }
-
- return buffer;
-}
-
-char *
-rtems_assoc_name_by_local_bitfield(
- const rtems_assoc_t *ap,
- unsigned32 value,
- char *buffer
- )
-{
- unsigned32 b;
-
- *buffer = 0;
-
- for (b = 1; b; b <<= 1)
- if (b & value)
- {
- if (*buffer)
- strcat(buffer, " ");
- strcat(buffer, rtems_assoc_name_by_local(ap, b));
- }
-
- return buffer;
-}
diff --git a/cpukit/libcsupport/src/assocnamebad.c b/cpukit/libcsupport/src/assocnamebad.c
deleted file mode 100644
index e336c39cc7..0000000000
--- a/cpukit/libcsupport/src/assocnamebad.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * assoc.c
- * rtems assoc routines
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include "assoc.h"
-
-#include <stdio.h> /* sprintf */
-#include <string.h> /* strcat, strcmp */
-
-#define STREQ(a,b) (strcmp((a), (b)) == 0)
-#define rtems_assoc_is_default(ap) ((ap)->name && STREQ(ap->name, RTEMS_ASSOC_DEFAULT_NAME))
-
-/*
- * what to return if a value is not found
- * this is not reentrant, but it really shouldn't be invoked anyway
- */
-
-const char *
-rtems_assoc_name_bad(
- unsigned32 bad_value
-)
-{
-#ifdef RTEMS_DEBUG
- static char bad_buffer[32];
-
- sprintf(bad_buffer, "< %d [0x%x] >", bad_value, bad_value);
-#else
- static char bad_buffer[32] = "<assoc.c: BAD NAME>";
-#endif
- return bad_buffer;
-}
-
-
diff --git a/cpukit/libcsupport/src/base_fs.c b/cpukit/libcsupport/src/base_fs.c
deleted file mode 100644
index 3ea1abd7aa..0000000000
--- a/cpukit/libcsupport/src/base_fs.c
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Base file system initialization
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include <rtems/libio.h>
-#include "imfs.h"
-#include "libio_.h"
-
-/*
- * Global information for the base file system.
- */
-
-rtems_filesystem_location_info_t rtems_filesystem_current;
-rtems_filesystem_location_info_t rtems_filesystem_root;
-nlink_t rtems_filesystem_link_counts;
-
-/*
- * Default mode for created files.
- */
-
-mode_t rtems_filesystem_umask;
-
-/*
- * rtems_filesystem_initialize
- *
- * Initialize the foundation of the file system with one instantiation
- * of the IMFS with a single "/dev" directory in it.
- */
-
-void rtems_filesystem_initialize( void )
-{
-#if !defined(RTEMS_UNIX)
-#if 0
- int i;
-#endif
- int status;
- rtems_filesystem_mount_table_entry_t *entry;
- rtems_filesystem_mount_table_t *mt;
-
- /*
- * Set the default umask to "022".
- */
-
- rtems_filesystem_umask = S_IWOTH | S_IROTH;
-
- init_fs_mount_table();
-
- /*
- * mount the first filesystem.
- */
-
- if ( rtems_filesystem_mount_table_size == 0 )
- rtems_fatal_error_occurred( 0xABCD0001 );
-
- mt = &rtems_filesystem_mount_table[0];
-
- status = mount(
- &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point );
-
- if ( status == -1 )
- rtems_fatal_error_occurred( 0xABCD0002 );
-
- rtems_filesystem_link_counts = 0;
- rtems_filesystem_root = entry->mt_fs_root;
- rtems_filesystem_current = rtems_filesystem_root;
-
- /*
- * Traditionally RTEMS devices are under "/dev" so install this directory.
- *
- * If the mkdir() fails, we can't print anything so just fatal error.
- *
- * NOTE: UNIX root is 755 and owned by root/root (0/0).
- */
-
- status = mkdir( "/dev", S_IRWXU | S_IRWXG | S_IRWXO );
- if ( status != 0 )
- rtems_fatal_error_occurred( 0xABCD0003 );
-
- /*
- * This code if if'ed 0 out because you can't mount another
- * filesystem properly until the mount point it will be
- * mounted onto is created. Moreover, if it is going to
- * use a device, then it is REALLY unfair to attempt this
- * before device drivers are initialized.
- */
-
-#if 0
- /*
- * Now if there are other filesystems to mount, go for it.
- */
-
- for ( i=1 ; i < rtems_filesystem_mount_table_size ; i++ ) {
- mt = &rtems_filesystem_mount_table[0];
-
- status = mount(
- &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point );
-
- if ( status == -1 )
- rtems_fatal_error_occurred( 0xABCD0003 );
- }
-#endif
-#endif
-}
diff --git a/cpukit/libcsupport/src/cfgetispeed.c b/cpukit/libcsupport/src/cfgetispeed.c
deleted file mode 100644
index 43a8c97137..0000000000
--- a/cpukit/libcsupport/src/cfgetispeed.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * cfgetispeed() - POSIX 1003.1b 7.1.3 - Baud Rate Functions
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#if defined(RTEMS_NEWLIB)
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <termios.h>
-
-speed_t cfgetispeed(
- const struct termios *tp
-)
-{
- return (tp->c_cflag / (CIBAUD / CBAUD)) & CBAUD;
-}
-#endif
diff --git a/cpukit/libcsupport/src/cfgetospeed.c b/cpukit/libcsupport/src/cfgetospeed.c
deleted file mode 100644
index 460b47b498..0000000000
--- a/cpukit/libcsupport/src/cfgetospeed.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * cfgetospeed() - POSIX 1003.1b 7.1.3 - Baud Rate Functions
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#if defined(RTEMS_NEWLIB)
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <termios.h>
-
-speed_t cfgetospeed(
- const struct termios *tp
-)
-{
- return tp->c_cflag & CBAUD;
-}
-#endif
diff --git a/cpukit/libcsupport/src/cfsetispeed.c b/cpukit/libcsupport/src/cfsetispeed.c
deleted file mode 100644
index af1a1b840c..0000000000
--- a/cpukit/libcsupport/src/cfsetispeed.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * cfsetispeed() - POSIX 1003.1b 7.1.3 - Baud Rate Functions
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#if defined(RTEMS_NEWLIB)
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <termios.h>
-
-#include "libio_.h"
-
-int cfsetispeed(
- struct termios *tp,
- speed_t speed
-)
-{
- if ( speed & ~CBAUD )
- set_errno_and_return_minus_one( EINVAL );
-
- tp->c_cflag = (tp->c_cflag & ~CIBAUD) | (speed * (CIBAUD / CBAUD));
- return 0;
-}
-#endif
diff --git a/cpukit/libcsupport/src/cfsetospeed.c b/cpukit/libcsupport/src/cfsetospeed.c
deleted file mode 100644
index f6f6c5838c..0000000000
--- a/cpukit/libcsupport/src/cfsetospeed.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * cfsetospeed() - POSIX 1003.1b 7.1.3 - Baud Rate Functions
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#if defined(RTEMS_NEWLIB)
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <termios.h>
-
-#include "libio_.h"
-
-int cfsetospeed(
- struct termios *tp,
- speed_t speed
-)
-{
- if ( speed & ~CBAUD )
- set_errno_and_return_minus_one( EINVAL );
-
- tp->c_cflag = (tp->c_cflag & ~CBAUD) | speed;
- return 0;
-}
-#endif
diff --git a/cpukit/libcsupport/src/chdir.c b/cpukit/libcsupport/src/chdir.c
deleted file mode 100644
index 4ab5c84cb8..0000000000
--- a/cpukit/libcsupport/src/chdir.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * chdir() - POSIX 1003.1b - 5.2.1 - Change Current Working Directory
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-
-#include <unistd.h>
-#include <errno.h>
-
-#include "libio_.h"
-
-int chdir(
- const char *pathname
-)
-{
- rtems_filesystem_location_info_t loc;
- int result;
-
- /*
- * Get the node where we wish to go.
- */
-
- result = rtems_filesystem_evaluate_path( pathname, 0, &loc, TRUE );
- if ( result != 0 )
- return -1;
-
- /*
- * Verify you can change directory into this node.
- */
-
- if ( !loc.ops->node_type ) {
- rtems_filesystem_freenode( &loc );
- set_errno_and_return_minus_one( ENOTSUP );
- }
-
- if ( (*loc.ops->node_type)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
- rtems_filesystem_freenode( &loc );
- set_errno_and_return_minus_one( ENOTDIR );
- }
-
- rtems_filesystem_freenode( &rtems_filesystem_current );
-
- rtems_filesystem_current = loc;
-
- return 0;
-}
diff --git a/cpukit/libcsupport/src/chmod.c b/cpukit/libcsupport/src/chmod.c
deleted file mode 100644
index d88e80eeb7..0000000000
--- a/cpukit/libcsupport/src/chmod.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * chmod() - POSIX 1003.1b 5.6.4 - Change File Modes
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include <rtems/libio.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <unistd.h>
-
-#include "libio_.h"
-
-int chmod(
- const char *path,
- mode_t mode
-)
-{
- int status;
- rtems_filesystem_location_info_t loc;
- int result;
-
- status = rtems_filesystem_evaluate_path( path, 0, &loc, TRUE );
- if ( status != 0 )
- return -1;
-
- if ( !loc.handlers->fchmod ){
- rtems_filesystem_freenode( &loc );
- set_errno_and_return_minus_one( ENOTSUP );
- }
-
- result = (*loc.handlers->fchmod)( &loc, mode );
-
- rtems_filesystem_freenode( &loc );
-
- return result;
-}
diff --git a/cpukit/libcsupport/src/chown.c b/cpukit/libcsupport/src/chown.c
deleted file mode 100644
index 796fa5370c..0000000000
--- a/cpukit/libcsupport/src/chown.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * chown() - POSIX 1003.1b 5.6.5 - Change Owner and Group of a File
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/stat.h>
-#include <errno.h>
-
-#include <rtems.h>
-#include <rtems/libio.h>
-
-#include "libio_.h"
-
-int chown(
- const char *path,
- uid_t owner,
- gid_t group
-)
-{
- rtems_filesystem_location_info_t loc;
- int result;
-
- if ( rtems_filesystem_evaluate_path( path, 0x00, &loc, TRUE ) )
- return -1;
-
- if ( !loc.ops->chown ) {
- rtems_filesystem_freenode( &loc );
- set_errno_and_return_minus_one( ENOTSUP );
- }
-
- result = (*loc.ops->chown)( &loc, owner, group );
-
- rtems_filesystem_freenode( &loc );
-
- return result;
-}
diff --git a/cpukit/libcsupport/src/close.c b/cpukit/libcsupport/src/close.c
deleted file mode 100644
index 0ee9df89ed..0000000000
--- a/cpukit/libcsupport/src/close.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * close() - POSIX 1003.1b 6.3.1 - Close a File
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "libio_.h"
-
-int close(
- int fd
-)
-{
- rtems_libio_t *iop;
- rtems_status_code rc;
-
- rtems_libio_check_fd(fd);
- iop = rtems_libio_iop(fd);
- rtems_libio_check_is_open(iop);
-
- rc = RTEMS_SUCCESSFUL;
- if ( iop->handlers->close )
- rc = (*iop->handlers->close)( iop );
-
- rtems_libio_free( iop );
-
- return rc;
-}
-
-/*
- * _close_r
- *
- * This is the Newlib dependent reentrant version of close().
- */
-
-#if defined(RTEMS_NEWLIB)
-
-#include <reent.h>
-
-int _close_r(
- struct _reent *ptr,
- int fd
-)
-{
- return close( fd );
-}
-#endif
diff --git a/cpukit/libcsupport/src/closedir.c b/cpukit/libcsupport/src/closedir.c
deleted file mode 100644
index 4d948ec95b..0000000000
--- a/cpukit/libcsupport/src/closedir.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * closedir() - POSIX 1003.1b - XXX
- *
- * This was copied from Newlib 1.8.0.
- *
- *
- * Copyright (c) 1983 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)closedir.c 5.9 (Berkeley) 2/23/91";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <dirent.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <errno.h>
-
-
-#include "libio_.h"
-
-/*
- * close a directory.
- */
-int
-closedir(dirp)
- register DIR *dirp;
-{
- int fd;
-
- if ( !dirp )
- set_errno_and_return_minus_one( EBADF );
-
- fd = dirp->dd_fd;
- dirp->dd_fd = -1;
- dirp->dd_loc = 0;
- (void)free((void *)dirp->dd_buf);
- (void)free((void *)dirp);
- return(close(fd));
-}
diff --git a/cpukit/libcsupport/src/creat.c b/cpukit/libcsupport/src/creat.c
deleted file mode 100644
index 6b11162060..0000000000
--- a/cpukit/libcsupport/src/creat.c
+++ /dev/null
@@ -1,11 +0,0 @@
-/* creat() "system call" */
-
-/* This is needed by f2c and therefore the SPEC benchmarks. */
-
-#include <fcntl.h>
-
-int
-creat (const char *path, mode_t mode)
-{
- return open (path, O_WRONLY | O_CREAT | O_TRUNC, mode);
-}
diff --git a/cpukit/libcsupport/src/ctermid.c b/cpukit/libcsupport/src/ctermid.c
deleted file mode 100644
index 63fb610f43..0000000000
--- a/cpukit/libcsupport/src/ctermid.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * ctermid() - POSIX 1003.1b 4.7.1 - Generate Terminal Pathname
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#if defined(RTEMS_NEWLIB)
-
-#include <stdio.h>
-
-static char *ctermid_name = "/dev/console";
-
-char *ctermid(
- char *s
-)
-{
- if ( !s )
- return ctermid_name;
-
- strcpy( s, ctermid_name );
- return s;
-}
-
-#endif
diff --git a/cpukit/libcsupport/src/dup.c b/cpukit/libcsupport/src/dup.c
deleted file mode 100644
index 902c70756a..0000000000
--- a/cpukit/libcsupport/src/dup.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * dup() - POSIX 1003.1b 6.2.1 Duplicate an Open File Descriptor
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <unistd.h>
-#include <fcntl.h>
-
-int dup(
- int fildes
-)
-{
- return fcntl( fildes, F_DUPFD, 0 );
-}
diff --git a/cpukit/libcsupport/src/dup2.c b/cpukit/libcsupport/src/dup2.c
deleted file mode 100644
index 21701bfd0d..0000000000
--- a/cpukit/libcsupport/src/dup2.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * dup2() - POSIX 1003.1b 6.2.1 Duplicate an Open File Descriptor
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <unistd.h>
-#include <fcntl.h>
-
-#include "libio_.h"
-
-int dup2(
- int fildes,
- int fildes2
-)
-{
- int status;
- struct stat buf;
-
- /*
- * If fildes is not valid, then fildes2 should not be closed.
- */
-
- status = fstat( fildes, &buf );
- if ( status == -1 )
- return -1;
-
- /*
- * If fildes2 is not valid, then we should not do anything either.
- */
-
- status = fstat( fildes2, &buf );
- if ( status == -1 )
- return -1;
-
- /*
- * This fcntl handles everything else.
- */
-
- return fcntl( fildes, F_DUPFD, fildes2 );
-}
diff --git a/cpukit/libcsupport/src/error.c b/cpukit/libcsupport/src/error.c
deleted file mode 100644
index 339f8eb374..0000000000
--- a/cpukit/libcsupport/src/error.c
+++ /dev/null
@@ -1,210 +0,0 @@
-/*
- * report errors and panics to RTEMS' stderr.
- * Currently just used by RTEMS monitor.
- *
- * $Id$
- */
-
-
-/*
- * These routines provide general purpose error reporting.
- * rtems_error reports an error to stderr and allows use of
- * printf style formatting. A newline is appended to all messages.
- *
- * error_flag can be specified as any of the following:
- *
- * RTEMS_ERROR_ERRNO -- include errno text in output
- * RTEMS_ERROR_PANIC -- halts local system after output
- * RTEMS_ERROR_ABORT -- abort after output
- *
- * It can also include a rtems_status value which can be OR'd
- * with the above flags. *
- *
- * EXAMPLE
- * #include <rtems.h>
- * #include <rtems/error.h>
- * rtems_error(0, "stray interrupt %d", intr);
- *
- * EXAMPLE
- * if ((status = rtems_task_create(...)) != RTEMS_SUCCCESSFUL)
- * {
- * rtems_error(status | RTEMS_ERROR_ABORT,
- * "could not create task");
- * }
- *
- * EXAMPLE
- * if ((fd = open(pathname, O_RDNLY)) < 0)
- * {
- * rtems_error(RTEMS_ERROR_ERRNO, "open of '%s' failed", pathname);
- * goto failed;
- * }
- */
-
-#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
-#include <rtems.h>
-
-#include "error.h"
-#include <rtems/assoc.h>
-
-#include <stdio.h>
-#include <stdarg.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h> /* _exit() */
-
-/* bug in hpux <errno.h>: no prototypes unless you are C++ */
-#ifdef hpux9
-char *strerror(int);
-#endif
-
-extern char *rtems_progname;
-int rtems_panic_in_progress;
-
-rtems_assoc_t rtems_status_assoc[] = {
- { "successful completion", RTEMS_SUCCESSFUL, },
- { "returned from a thread", RTEMS_TASK_EXITTED, },
- { "multiprocessing not configured", RTEMS_MP_NOT_CONFIGURED, },
- { "invalid object name", RTEMS_INVALID_NAME, },
- { "invalid object id", RTEMS_INVALID_ID, },
- { "too many", RTEMS_TOO_MANY, },
- { "timed out waiting", RTEMS_TIMEOUT, },
- { "object deleted while waiting", RTEMS_OBJECT_WAS_DELETED, },
- { "specified size was invalid", RTEMS_INVALID_SIZE, },
- { "address specified is invalid", RTEMS_INVALID_ADDRESS, },
- { "number was invalid", RTEMS_INVALID_NUMBER, },
- { "item has not been initialized", RTEMS_NOT_DEFINED, },
- { "resources still outstanding", RTEMS_RESOURCE_IN_USE, },
- { "request not satisfied", RTEMS_UNSATISFIED, },
- { "thread is in wrong state", RTEMS_INCORRECT_STATE, },
- { "thread already in state", RTEMS_ALREADY_SUSPENDED, },
- { "illegal on calling thread", RTEMS_ILLEGAL_ON_SELF, },
- { "illegal for remote object", RTEMS_ILLEGAL_ON_REMOTE_OBJECT, },
- { "called from wrong environment", RTEMS_CALLED_FROM_ISR, },
- { "invalid thread priority", RTEMS_INVALID_PRIORITY, },
- { "invalid date/time", RTEMS_INVALID_CLOCK, },
- { "invalid node id", RTEMS_INVALID_NODE, },
- { "directive not configured", RTEMS_NOT_CONFIGURED, },
- { "not owner of resource", RTEMS_NOT_OWNER_OF_RESOURCE , },
- { "directive not implemented", RTEMS_NOT_IMPLEMENTED, },
- { "RTEMS inconsistency detected", RTEMS_INTERNAL_ERROR, },
- { "could not get enough memory", RTEMS_NO_MEMORY, },
- { "driver IO error", RTEMS_IO_ERROR, },
- { "internal multiprocessing only", THREAD_STATUS_PROXY_BLOCKING, },
- { 0, 0, 0 },
-};
-
-
-const char *
-rtems_status_text(
- rtems_status_code status
-)
-{
- return rtems_assoc_name_by_local(rtems_status_assoc, status);
-}
-
-
-static int rtems_verror(
- unsigned32 error_flag,
- const char *printf_format,
- va_list arglist
-)
-{
- int local_errno = 0;
- int chars_written = 0;
- rtems_status_code status;
-
- if (error_flag & RTEMS_ERROR_PANIC)
- {
- if (rtems_panic_in_progress++)
- _Thread_Disable_dispatch(); /* disable task switches */
-
- /* don't aggravate things */
- if (rtems_panic_in_progress > 2)
- return 0;
- }
-
- (void) fflush(stdout); /* in case stdout/stderr same */
-
- status = error_flag & ~RTEMS_ERROR_MASK;
- if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
- local_errno = errno;
-
- if (_System_state_Is_multiprocessing)
- fprintf(stderr, "[%d] ", _Configuration_MP_table->node);
-
- if (rtems_progname && *rtems_progname)
- chars_written += fprintf(stderr, "%s: ", rtems_progname);
- chars_written += vfprintf(stderr, printf_format, arglist);
-
- if (status)
- chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
-
- if (local_errno)
- {
- if ((local_errno > 0) && *strerror(local_errno))
- chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
- else
- chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
- }
-
- chars_written += fprintf(stderr, "\n");
-
- (void) fflush(stderr);
-
- if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT))
- {
- if (error_flag & RTEMS_ERROR_PANIC)
- {
- rtems_error(0, "fatal error, exiting");
- _exit(local_errno);
- }
- else
- {
- rtems_error(0, "fatal error, aborting");
- abort();
- }
- }
- return chars_written;
-}
-
-
-/*
- * Report an error.
- * error_flag is as above; printf_format is a normal
- * printf(3) format string, with its concommitant arguments.
- *
- * Returns the number of characters written.
- */
-
-int rtems_error(
- int error_flag,
- const char *printf_format,
- ...
- )
-{
- va_list arglist;
- int chars_written;
-
- va_start(arglist, printf_format);
- chars_written = rtems_verror(error_flag, printf_format, arglist);
- va_end(arglist);
-
- return chars_written;
-}
-
-/*
- * rtems_panic is shorthand for rtems_error(RTEMS_ERROR_PANIC, ...)
- */
-
-void rtems_panic(
- const char *printf_format,
- ...
- )
-{
- va_list arglist;
-
- va_start(arglist, printf_format);
- (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist);
- va_end(arglist);
-}
diff --git a/cpukit/libcsupport/src/eval.c b/cpukit/libcsupport/src/eval.c
deleted file mode 100644
index 8fc27ca19c..0000000000
--- a/cpukit/libcsupport/src/eval.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * rtems_filesystem_evaluate_path()
- *
- * Routine to seed the evaluate path routine.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include "libio_.h"
-
-int rtems_filesystem_evaluate_path(
- const char *pathname,
- int flags,
- rtems_filesystem_location_info_t *pathloc,
- int follow_link
-)
-{
- int i;
- int result;
- rtems_filesystem_node_types_t type;
-
- /*
- * Verify Input parameters.
- */
-
- if ( !pathname )
- set_errno_and_return_minus_one( EFAULT );
-
- if ( !pathloc )
- set_errno_and_return_minus_one( EIO ); /* should never happen */
-
- /*
- * Evaluate the path using the optable evalpath.
- */
-
- rtems_filesystem_get_start_loc( pathname, &i, pathloc );
-
- result = (*pathloc->ops->evalpath)( &pathname[i], flags, pathloc );
-
- /*
- * Get the Node type and determine if you need to follow the link or
- * not.
- */
-
- if ( (result == 0) && follow_link ) {
-
- if ( !pathloc->ops->node_type )
- set_errno_and_return_minus_one( ENOTSUP );
-
- type = (*pathloc->ops->node_type)( pathloc );
-
- if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
- ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) {
-
- if ( !pathloc->ops->eval_link )
- set_errno_and_return_minus_one( ENOTSUP );
-
- result = (*pathloc->ops->eval_link)( pathloc, flags );
-
- }
- }
-
- return result;
-}
-
diff --git a/cpukit/libcsupport/src/fchmod.c b/cpukit/libcsupport/src/fchmod.c
deleted file mode 100644
index 74d9a30647..0000000000
--- a/cpukit/libcsupport/src/fchmod.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * fchmod() - POSIX 1003.1b 5.6.4 - Change File Modes
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <unistd.h>
-#include <sys/stat.h>
-#include <errno.h>
-
-#include <rtems.h>
-#include <rtems/libio.h>
-#include "libio_.h"
-
-int fchmod(
- int fd,
- mode_t mode
-)
-{
- rtems_libio_t *iop;
-
- rtems_libio_check_fd( fd );
- iop = rtems_libio_iop( fd );
- rtems_libio_check_is_open(iop);
-
- /*
- * Now process the fchmod().
- */
-
- rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
-
- if ( !iop->handlers->fchmod )
- set_errno_and_return_minus_one( ENOTSUP );
-
- return (*iop->pathinfo.handlers->fchmod)( &iop->pathinfo, mode );
-}
-
diff --git a/cpukit/libcsupport/src/fcntl.c b/cpukit/libcsupport/src/fcntl.c
deleted file mode 100644
index 05410eaff6..0000000000
--- a/cpukit/libcsupport/src/fcntl.c
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * fcntl() - POSIX 1003.1b 6.5.2 - File Control
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-
-#include <rtems.h>
-#include "libio_.h"
-
-int fcntl(
- int fd,
- int cmd,
- ...
-)
-{
- va_list ap;
- rtems_libio_t *iop;
- rtems_libio_t *diop;
- int fd2;
- int flags;
- int mask;
- int ret = 0;
-
- va_start( ap, cmd );
-
- rtems_libio_check_fd( fd );
- iop = rtems_libio_iop( fd );
- rtems_libio_check_is_open(iop);
-
- /*
- * Now process the fcntl().
- */
-
- /*
- * This switch should contain all the cases from POSIX.
- */
-
- switch ( cmd ) {
- case F_DUPFD: /* dup */
- fd2 = va_arg( ap, int );
- if ( fd2 )
- diop = rtems_libio_iop( fd2 );
- else {
- /* allocate a file control block */
- diop = rtems_libio_allocate();
- if ( diop == 0 ) {
- ret = -1;
- break;
- }
- }
-
- diop->handlers = iop->handlers;
- diop->file_info = iop->file_info;
- diop->flags = iop->flags;
- diop->pathinfo = iop->pathinfo;
- ret = (int) (diop - rtems_libio_iops);
- break;
-
- case F_GETFD: /* get f_flags */
- ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0);
- break;
-
- case F_SETFD: /* set f_flags */
- /*
- * Interpret the third argument as the "close on exec()" flag.
- * If this argument is 1, then the file descriptor is to be closed
- * if a new process is exec()'ed. Since RTEMS does not support
- * processes, then we can ignore this one except to make
- * F_GETFD work.
- */
-
- if ( va_arg( ap, int ) )
- iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
- else
- iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
- break;
-
- case F_GETFL: /* more flags (cloexec) */
- ret = rtems_libio_to_fcntl_flags( iop->flags );
- break;
-
- case F_SETFL:
- flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
- mask = LIBIO_FLAGS_NO_DELAY | LIBIO_FLAGS_APPEND;
-
- /*
- * XXX If we are turning on append, should we seek to the end?
- */
-
- iop->flags = (iop->flags & ~mask) | (flags & mask);
- break;
-
- case F_GETLK:
- errno = ENOTSUP;
- ret = -1;
- break;
-
- case F_SETLK:
- errno = ENOTSUP;
- ret = -1;
- break;
-
- case F_SETLKW:
- errno = ENOTSUP;
- ret = -1;
- break;
-
- case F_SETOWN: /* for sockets. */
- errno = ENOTSUP;
- ret = -1;
- break;
-
- case F_GETOWN: /* for sockets. */
- errno = ENOTSUP;
- ret = -1;
- break;
-
- default:
- errno = EINVAL;
- ret = -1;
- break;
- }
- if ((ret >= 0) && iop->handlers->fcntl) {
- int err = (*iop->handlers->fcntl)( cmd, iop );
- if (err) {
- errno = err;
- ret = -1;
- }
- }
- return ret;
-}
diff --git a/cpukit/libcsupport/src/fdatasync.c b/cpukit/libcsupport/src/fdatasync.c
deleted file mode 100644
index 7a86dc53c6..0000000000
--- a/cpukit/libcsupport/src/fdatasync.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * fdatasync() - POSIX 1003.1b 6.6.2 - Synchronize the Data of a File
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <unistd.h>
-
-#include "libio_.h"
-
-int fdatasync(
- int fd
-)
-{
- rtems_libio_t *iop;
-
- rtems_libio_check_fd( fd );
- iop = rtems_libio_iop( fd );
- rtems_libio_check_is_open(iop);
- rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
-
- /*
- * Now process the fdatasync().
- */
-
- if ( !iop->handlers->fdatasync )
- set_errno_and_return_minus_one( ENOTSUP );
-
- return (*iop->handlers->fdatasync)( iop );
-}
diff --git a/cpukit/libcsupport/src/fpathconf.c b/cpukit/libcsupport/src/fpathconf.c
deleted file mode 100644
index 744551ec88..0000000000
--- a/cpukit/libcsupport/src/fpathconf.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * fpathconf() - POSIX 1003.1b - 5.7.1 - Configurable Pathname Varables
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "libio_.h"
-
-#include <unistd.h>
-#include <errno.h>
-
-long fpathconf(
- int fd,
- int name
-)
-{
- long return_value;
- rtems_libio_t *iop;
- rtems_filesystem_limits_and_options_t *the_limits;
-
- rtems_libio_check_fd(fd);
- iop = rtems_libio_iop(fd);
- rtems_libio_check_is_open(iop);
- rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ);
-
- /*
- * Now process the information request.
- */
-
- the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
-
- switch ( name ) {
- case _PC_LINK_MAX:
- return_value = the_limits->link_max;
- break;
- case _PC_MAX_CANON:
- return_value = the_limits->max_canon;
- break;
- case _PC_MAX_INPUT:
- return_value = the_limits->max_input;
- break;
- case _PC_NAME_MAX:
- return_value = the_limits->name_max;
- break;
- case _PC_PATH_MAX:
- return_value = the_limits->path_max;
- break;
- case _PC_PIPE_BUF:
- return_value = the_limits->pipe_buf;
- break;
- case _PC_CHOWN_RESTRICTED:
- return_value = the_limits->posix_chown_restrictions;
- break;
- case _PC_NO_TRUNC:
- return_value = the_limits->posix_no_trunc;
- break;
- case _PC_VDISABLE:
- return_value = the_limits->posix_vdisable;
- break;
- case _PC_ASYNC_IO:
- return_value = the_limits->posix_async_io;
- break;
- case _PC_PRIO_IO:
- return_value = the_limits->posix_prio_io;
- break;
- case _PC_SYNC_IO:
- return_value = the_limits->posix_sync_io;
- break;
- default:
- set_errno_and_return_minus_one( EINVAL );
- break;
- }
-
- return return_value;
-}
diff --git a/cpukit/libcsupport/src/fs_null_handlers.c b/cpukit/libcsupport/src/fs_null_handlers.c
deleted file mode 100644
index 3bedb6a512..0000000000
--- a/cpukit/libcsupport/src/fs_null_handlers.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Null Filesystem Operations Tables
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-
-#include <rtems/libio.h>
-
-/*
- * Set of null operations handlers.
- */
-
-rtems_filesystem_file_handlers_r rtems_filesystem_null_handlers = {
- NULL, /* open */
- NULL, /* close */
- NULL, /* read */
- NULL, /* write */
- NULL, /* ioctl */
- NULL, /* lseek */
- NULL, /* fstat */
- NULL, /* fchmod */
- NULL, /* ftruncate */
- NULL, /* fpathconf */
- NULL, /* fsync */
- NULL, /* fdatasync */
- NULL /* fcntl */
-};
diff --git a/cpukit/libcsupport/src/fstat.c b/cpukit/libcsupport/src/fstat.c
deleted file mode 100644
index 8f216e3cfc..0000000000
--- a/cpukit/libcsupport/src/fstat.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * fstat() - POSIX 1003.1b 5.6.2 - Get File Status
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/stat.h>
-#include <unistd.h>
-#include <string.h>
-
-#include "libio_.h"
-
-int fstat(
- int fd,
- struct stat *sbuf
-)
-{
- rtems_libio_t *iop;
-
- /*
- * Check to see if we were passed a valid pointer.
- */
-
- if ( !sbuf )
- set_errno_and_return_minus_one( EFAULT );
-
- /*
- * Now process the stat() request.
- */
-
- iop = rtems_libio_iop( fd );
- rtems_libio_check_fd( fd );
- rtems_libio_check_is_open(iop);
-
- if ( !iop->handlers )
- set_errno_and_return_minus_one( EBADF );
-
- if ( !iop->handlers->fstat )
- set_errno_and_return_minus_one( ENOTSUP );
-
- /*
- * Zero out the stat structure so the various support
- * versions of stat don't have to.
- */
- memset( sbuf, 0, sizeof(struct stat) );
-
- return (*iop->handlers->fstat)( &iop->pathinfo, sbuf );
-}
-
-/*
- * _fstat_r
- *
- * This is the Newlib dependent reentrant version of fstat().
- */
-
-#if defined(RTEMS_NEWLIB)
-
-#include <reent.h>
-
-int _fstat_r(
- struct _reent *ptr,
- int fd,
- struct stat *buf
-)
-{
- return fstat( fd, buf );
-}
-#endif
diff --git a/cpukit/libcsupport/src/fsync.c b/cpukit/libcsupport/src/fsync.c
deleted file mode 100644
index 64f05f341a..0000000000
--- a/cpukit/libcsupport/src/fsync.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * fsync() - POSIX 1003.1b 6.6.1 - Synchronize the State of a File
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <unistd.h>
-
-#include "libio_.h"
-
-int fsync(
- int fd
-)
-{
- rtems_libio_t *iop;
-
- rtems_libio_check_fd( fd );
- iop = rtems_libio_iop( fd );
- rtems_libio_check_is_open(iop);
- rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
-
- /*
- * Now process the fsync().
- */
-
- if ( !iop->handlers->fsync )
- set_errno_and_return_minus_one( ENOTSUP );
-
- return (*iop->handlers->fsync)( iop );
-}
diff --git a/cpukit/libcsupport/src/ftruncate.c b/cpukit/libcsupport/src/ftruncate.c
deleted file mode 100644
index bbf0bc7240..0000000000
--- a/cpukit/libcsupport/src/ftruncate.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * ftruncate() - Truncate a File to the Specified Length
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <unistd.h>
-#include <errno.h>
-
-#include "libio_.h"
-
-int ftruncate(
- int fd,
- off_t length
-)
-{
- rtems_libio_t *iop;
- rtems_filesystem_location_info_t loc;
-
- rtems_libio_check_fd( fd );
- iop = rtems_libio_iop( fd );
- rtems_libio_check_is_open(iop);
-
- /*
- * Now process the ftruncate() request.
- */
-
- /*
- * Make sure we are not working on a directory
- */
-
- loc = iop->pathinfo;
- if ( !loc.ops->node_type )
- set_errno_and_return_minus_one( ENOTSUP );
-
- if ( (*loc.ops->node_type)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
- set_errno_and_return_minus_one( EISDIR );
-
- rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
-
- if ( !iop->handlers->ftruncate )
- set_errno_and_return_minus_one( ENOTSUP );
-
- return (*iop->handlers->ftruncate)( iop, length );
-}
-
diff --git a/cpukit/libcsupport/src/getcwd.c b/cpukit/libcsupport/src/getcwd.c
deleted file mode 100644
index 26b564a760..0000000000
--- a/cpukit/libcsupport/src/getcwd.c
+++ /dev/null
@@ -1,280 +0,0 @@
-/*
- * Copyright (c) 1989, 1991 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * Copied from newlib 1.8.1. RTEMS can not build all of the contents
- * of the UNIX directory but we need this routine.
- *
- * $Id$
- */
-
-/*
- * Added these when moved to RTEMS
- */
-
-#define _stat stat
-#define _opendir opendir
-#define _fstat fstat
-#define _readdir readdir
-#define _closedir closedir
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getcwd.c 5.11 (Berkeley) 2/24/91";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/stat.h>
-#include <errno.h>
-#include <dirent.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <reent.h>
-#include <_syslist.h>
-
-#define bcopy(a,b,c) memmove (b,a,c)
-
-#define ISDOT(dp) \
- (dp->d_name[0] == '.' && (dp->d_name[1] == '\0' || \
- (dp->d_name[1] == '.' && dp->d_name[2] == '\0')))
-
-#ifndef _REENT_ONLY
-
-char *
-getcwd (pt, size)
- char *pt;
- size_t size;
-{
- register struct dirent *dp;
- register DIR *dir;
- register dev_t dev;
- register ino_t ino;
- register int first;
- register char *bpt, *bup;
- struct stat s;
- dev_t root_dev;
- ino_t root_ino;
- size_t ptsize, upsize;
- int save_errno;
- char *ept, *eup, *up;
-
- /*
- * If no buffer specified by the user, allocate one as necessary.
- * If a buffer is specified, the size has to be non-zero. The path
- * is built from the end of the buffer backwards.
- */
-
- if (pt)
- {
- ptsize = 0;
- if (!size)
- {
- errno = EINVAL;
- return (char *) NULL;
- }
- ept = pt + size;
- }
- else
- {
- if (!(pt = (char *) malloc (ptsize = 1024 - 4)))
- {
- return (char *) NULL;
- }
- ept = pt + ptsize;
- }
- bpt = ept - 1;
- *bpt = '\0';
-
- /*
- * Allocate bytes (1024 - malloc space) for the string of "../"'s.
- * Should always be enough (it's 340 levels). If it's not, allocate
- * as necessary. Special * case the first stat, it's ".", not "..".
- */
-
- if (!(up = (char *) malloc (upsize = 1024 - 4)))
- {
- goto err;
- }
- eup = up + MAXPATHLEN;
- bup = up;
- up[0] = '.';
- up[1] = '\0';
-
- /* Save root values, so know when to stop. */
- if (stat ("/", &s))
- goto err;
- root_dev = s.st_dev;
- root_ino = s.st_ino;
-
- errno = 0; /* XXX readdir has no error return. */
-
- for (first = 1;; first = 0)
- {
- /* Stat the current level. */
- if (_stat (up, &s))
- goto err;
-
- /* Save current node values. */
- ino = s.st_ino;
- dev = s.st_dev;
-
- /* Check for reaching root. */
- if (root_dev == dev && root_ino == ino)
- {
- *--bpt = '/';
- /*
- * It's unclear that it's a requirement to copy the
- * path to the beginning of the buffer, but it's always
- * been that way and stuff would probably break.
- */
- (void) bcopy (bpt, pt, ept - bpt);
- free (up);
- return pt;
- }
-
- /*
- * Build pointer to the parent directory, allocating memory
- * as necessary. Max length is 3 for "../", the largest
- * possible component name, plus a trailing NULL.
- */
-
- if (bup + 3 + MAXNAMLEN + 1 >= eup)
- {
- if (!(up = (char *) realloc (up, upsize *= 2)))
- {
- goto err;
- }
- bup = up;
- eup = up + upsize;
- }
- *bup++ = '.';
- *bup++ = '.';
- *bup = '\0';
-
- /* Open and stat parent directory. */
- if (!(dir = _opendir (up)) || _fstat (__dirfd (dir), &s))
- goto err;
-
- /* Add trailing slash for next directory. */
- *bup++ = '/';
-
- /*
- * If it's a mount point, have to stat each element because
- * the inode number in the directory is for the entry in the
- * parent directory, not the inode number of the mounted file.
- */
-
- save_errno = 0;
- if (s.st_dev == dev)
- {
- for (;;)
- {
- if (!(dp = _readdir (dir)))
- goto notfound;
- if (dp->d_ino == ino)
- break;
- }
- }
- else
- for (;;)
- {
- if (!(dp = _readdir (dir)))
- goto notfound;
- if (ISDOT (dp))
- continue;
- bcopy (dp->d_name, bup, strlen (dp->d_name) + 1);
-
- /* Save the first error for later. */
- if (stat (up, &s))
- {
- if (!save_errno)
- save_errno = errno;
- errno = 0;
- continue;
- }
- if (s.st_dev == dev && s.st_ino == ino)
- break;
- }
-
- /*
- * Check for length of the current name, preceding slash,
- * leading slash.
- */
-
- if (bpt - pt <= strlen (dp->d_name) + (first ? 1 : 2))
- {
- size_t len, off;
-
- if (!ptsize)
- {
- errno = ERANGE;
- goto err;
- }
- off = bpt - pt;
- len = ept - bpt;
- if (!(pt = (char *) realloc (pt, ptsize *= 2)))
- {
- goto err;
- }
- bpt = pt + off;
- ept = pt + ptsize;
- (void) bcopy (bpt, ept - len, len);
- bpt = ept - len;
- }
- if (!first)
- *--bpt = '/';
- bpt -= strlen (dp->d_name);
- bcopy (dp->d_name, bpt, strlen (dp->d_name));
- (void) _closedir (dir);
-
- /* Truncate any file name. */
- *bup = '\0';
- }
-
-notfound:
- /*
- * If readdir set errno, use it, not any saved error; otherwise,
- * didn't find the current directory in its parent directory, set
- * errno to ENOENT.
- */
-
- if (!errno)
- errno = save_errno ? save_errno : ENOENT;
- /* FALLTHROUGH */
-
-err:
- if (ptsize)
- free (pt);
- free (up);
- return (char *) NULL;
-}
-
-#endif /* _REENT_ONLY */
diff --git a/cpukit/libcsupport/src/getdents.c b/cpukit/libcsupport/src/getdents.c
deleted file mode 100644
index b1afbb13f7..0000000000
--- a/cpukit/libcsupport/src/getdents.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * getdents() - Get Directory Entries
- *
- * SVR4 and SVID extension required by Newlib readdir() family.
- *
- * This routine will dd_len / (sizeof dirent) directory entries relative to
- * the current directory position index. These entries will be placed in
- * character array pointed to by -dd_buf-
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-
-#include "libio_.h"
-
-int getdents(
- int dd_fd,
- char *dd_buf,
- int dd_len
-)
-{
- rtems_libio_t *iop;
- rtems_filesystem_location_info_t loc;
-
- /*
- * Get the file control block structure associated with the file descriptor
- */
-
- iop = rtems_libio_iop( dd_fd );
-
- /*
- * Make sure we are working on a directory
- */
- loc = iop->pathinfo;
- if ( !loc.ops->node_type )
- set_errno_and_return_minus_one( ENOTSUP );
-
- if ( (*loc.ops->node_type)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
- set_errno_and_return_minus_one( ENOTDIR );
-
- /*
- * Return the number of bytes that were actually transfered as a result
- * of the read attempt.
- */
-
- if ( !iop->handlers->read )
- set_errno_and_return_minus_one( ENOTSUP );
-
- return (*iop->handlers->read)( iop, dd_buf, dd_len );
-}
diff --git a/cpukit/libcsupport/src/getgrent.c b/cpukit/libcsupport/src/getgrent.c
deleted file mode 100644
index da339718a0..0000000000
--- a/cpukit/libcsupport/src/getgrent.c
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * POSIX 1003.1b - 9.2.1 - Group Database Access Routines
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <grp.h>
-#include <errno.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <limits.h>
-
-static struct group gr_group; /* password structure */
-static FILE *group_fp;
-
-/*
- * The size of these buffers is arbitrary and there is no provision
- * to protect any of them from overflowing. The scanf patterns
- * need to be changed to prevent overflowing. In addition,
- * the limits on these needs to be examined.
- */
-
-static char groupname[8];
-static char password[1024];
-static char groups[1024];
-static char *gr_mem[16] = { } ;
-
-extern void init_etc_passwd_group(void);
-
-int getgrnam_r(
- const char *name,
- struct group *grp,
- char *buffer,
- size_t bufsize,
- struct group **result
-)
-{
- FILE *fp;
-
- init_etc_passwd_group();
-
- if ((fp = fopen ("/etc/group", "r")) == NULL) {
- errno = EINVAL;
- return -1;
- }
-
- while (fgets (buffer, bufsize, fp)) {
- sscanf (buffer, "%[^:]:%[^:]:%d:%s\n",
- groupname, password, (int *) &grp->gr_gid,
- groups);
- grp->gr_name = groupname;
- grp->gr_passwd = password;
- grp->gr_mem = gr_mem ;
-
- if (!strcmp (groupname, name)) {
- fclose (fp);
- *result = grp;
- return 0;
- }
- }
- fclose (fp);
- errno = EINVAL;
- return -1;
-}
-
-struct group *getgrnam(
- const char *name
-)
-{
- char buf[1024];
- struct group *g;
-
- if ( getgrnam_r( name, &gr_group, buf, 1024, &g ) )
- return NULL;
-
- return g;
-}
-
-int getgrgid_r(
- gid_t gid,
- struct group *grp,
- char *buffer,
- size_t bufsize,
- struct group **result
-)
-{
- FILE *fp;
-
- init_etc_passwd_group();
-
- if ((fp = fopen ("/etc/group", "r")) == NULL) {
- errno = EINVAL;
- return -1;
- }
-
- while (fgets (buffer, bufsize, fp)) {
- sscanf (buffer, "%[^:]:%[^:]:%d:%s\n",
- groupname, password, (int *) &gr_group.gr_gid,
- groups);
- gr_group.gr_name = groupname;
- gr_group.gr_passwd = password;
- gr_group.gr_mem = gr_mem ;
-
-
- if (gid == gr_group.gr_gid) {
- fclose (fp);
- *result = grp;
- return 0;
- }
- }
- fclose (fp);
- errno = EINVAL;
- return -1;
-}
-
-struct group *getgrgid (
- gid_t gid
-)
-{
- char buf[1024];
- struct group *g;
-
- if ( getgrgid_r( gid, &gr_group, buf, 1024, &g ) )
- return NULL;
-
- return g;
-}
-
-struct group *getgrent( void )
-{
- char buf[1024];
-
- if (group_fp == NULL)
- return NULL;
-
- if (fgets (buf, sizeof (buf), group_fp) == NULL)
- return NULL;
-
- sscanf (buf, "%[^:]:%[^:]:%d:%s\n",
- groupname, password, (int *) &gr_group.gr_gid,
- groups);
- gr_group.gr_name = groupname;
- gr_group.gr_passwd = password;
- gr_group.gr_mem = gr_mem ;
-
- return &gr_group;
-}
-
-void
-setgrent ()
-{
- init_etc_passwd_group();
-
- if (group_fp != NULL)
- fclose (group_fp);
-
- group_fp = fopen ("/etc/group", "r");
-}
-
-void
-endgrent ()
-{
- if (group_fp != NULL)
- fclose (group_fp);
-}
diff --git a/cpukit/libcsupport/src/getpwent.c b/cpukit/libcsupport/src/getpwent.c
deleted file mode 100644
index 06f7318d27..0000000000
--- a/cpukit/libcsupport/src/getpwent.c
+++ /dev/null
@@ -1,227 +0,0 @@
-/*
- * POSIX 1003.1b - 9.2.2 - User Database Access Routines
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <pwd.h>
-#include <errno.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <limits.h>
-#include <fcntl.h>
-#include <unistd.h>
-
-static struct passwd pw_passwd; /* password structure */
-static FILE *passwd_fp;
-
-/*
- * The size of these buffers is arbitrary and there is no provision
- * to protect any of them from overflowing. The scanf patterns
- * need to be changed to prevent overflowing. In addition,
- * the limits on these needs to be examined.
- */
-
-static char logname[8];
-static char password[1024];
-static char comment[1024];
-static char gecos[1024];
-static char dir[1024];
-static char shell[1024];
-
-/*
- * Initialize a useable but dummy /etc/passwd
- *
- * NOTE: Ignore all errors.
- *
- */
-
-static char etc_passwd_initted = 0;
-
-void init_etc_passwd_group(void)
-{
- FILE *fp;
-
- if ( etc_passwd_initted )
- return;
- etc_passwd_initted = 1;
-
- (void) mkdir( "/etc", S_IRWXU | S_IRWXG | S_IRWXO );
-
- /*
- * Initialize /etc/passwd
- */
-
- if ((fp = fopen ("/etc/passwd", "w")) == NULL)
- return;
-
- fprintf( fp, "root:*:0:0:root,,,,:/tmp:/bin/false\n"
- "rtems:*:1:1:RTEMS Application,,,,:/tmp:/bin/false\n" );
-
- fclose( fp );
-
- /*
- * Initialize /etc/group
- */
-
- if ((fp = fopen ("/etc/group", "w")) == NULL)
- return;
-
- fprintf( fp, "root::0:root\n"
- "rtems::0:rtems\n" );
-
- fclose( fp );
-}
-
-int getpwnam_r(
- const char *name,
- struct passwd *pwd,
- char *buffer,
- size_t bufsize,
- struct passwd **result
-)
-{
- FILE *fp;
-
- init_etc_passwd_group();
-
- if ((fp = fopen ("/etc/passwd", "r")) == NULL) {
- errno = EINVAL;
- return -1;
- }
-
- while (fgets (buffer, bufsize, fp)) {
- sscanf (buffer, "%[^:]:%[^:]:%d:%d:%[^:]:%[^:]:%[^:]:%s\n",
- logname, password, &pwd->pw_uid,
- &pwd->pw_gid, comment, gecos,
- dir, shell);
- pwd->pw_name = logname;
- pwd->pw_passwd = password;
- pwd->pw_comment = comment;
- pwd->pw_gecos = gecos;
- pwd->pw_dir = dir;
- pwd->pw_shell = shell;
-
- if (!strcmp (logname, name)) {
- fclose (fp);
- *result = pwd;
- return 0;
- }
- }
- fclose (fp);
- errno = EINVAL;
- return -1;
-}
-
-struct passwd *getpwnam(
- const char *name
-)
-{
- char buf[1024];
- struct passwd *p;
-
- if ( getpwnam_r( name, &pw_passwd, buf, 1024, &p ) )
- return NULL;
-
- return p;
-}
-
-int getpwuid_r(
- uid_t uid,
- struct passwd *pwd,
- char *buffer,
- size_t bufsize,
- struct passwd **result
-)
-{
- FILE *fp;
-
- init_etc_passwd_group();
-
- if ((fp = fopen ("/etc/passwd", "r")) == NULL) {
- errno = EINVAL;
- return -1;
- }
-
- while (fgets (buffer, bufsize, fp)) {
- sscanf (buffer, "%[^:]:%[^:]:%d:%d:%[^:]:%[^:]:%[^:]:%s\n",
- logname, password, &pw_passwd.pw_uid,
- &pw_passwd.pw_gid, comment, gecos,
- dir, shell);
- pwd->pw_name = logname;
- pwd->pw_passwd = password;
- pwd->pw_comment = comment;
- pwd->pw_gecos = gecos;
- pwd->pw_dir = dir;
- pwd->pw_shell = shell;
-
- if (uid == pwd->pw_uid) {
- fclose (fp);
- *result = pwd;
- return 0;
- }
- }
- fclose (fp);
- errno = EINVAL;
- return -1;
-}
-
-struct passwd *getpwuid(
- uid_t uid
-)
-{
- char buf[1024];
- struct passwd *p;
-
- if ( getpwuid_r( uid, &pw_passwd, buf, 1024, &p ) )
- return NULL;
-
- return p;
-}
-
-struct passwd *getpwent()
-{
- char buf[1024];
-
- if (passwd_fp == NULL)
- return NULL;
-
- if (fgets (buf, sizeof (buf), passwd_fp) == NULL)
- return NULL;
-
- sscanf (buf, "%[^:]:%[^:]:%d:%d:%[^:]:%[^:]:%[^:]:%s\n",
- logname, password, &pw_passwd.pw_uid,
- &pw_passwd.pw_gid, comment, gecos,
- dir, shell);
- pw_passwd.pw_name = logname;
- pw_passwd.pw_passwd = password;
- pw_passwd.pw_comment = comment;
- pw_passwd.pw_gecos = gecos;
- pw_passwd.pw_dir = dir;
- pw_passwd.pw_shell = shell;
-
- return &pw_passwd;
-}
-
-void setpwent( void )
-{
- init_etc_passwd_group();
-
- if (passwd_fp != NULL)
- fclose (passwd_fp);
-
- passwd_fp = fopen ("/etc/passwd", "r");
-}
-
-void endpwent( void )
-{
- if (passwd_fp != NULL)
- fclose (passwd_fp);
-}
diff --git a/cpukit/libcsupport/src/hosterr.c b/cpukit/libcsupport/src/hosterr.c
deleted file mode 100644
index addb110dea..0000000000
--- a/cpukit/libcsupport/src/hosterr.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Routines to access a host errno
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#if defined(RTEMS_UNIX)
-#include <errno.h>
-
-int host_errno( void );
-
-/*
- * fix_syscall_errno
- *
- * copy host errno, if any to thread aware errno, if any
- */
-
-void fix_syscall_errno( void )
-{
- errno = host_errno();
-}
-
-/*
- * host_errno
- *
- * Get the host system errno, if any
- * When using newlib (or possibly other libc's) on top of UNIX
- * the errno returned by system calls may be unavailable due
- * to trickery of making errno thread aware.
- * This provides a kludge of getting at it.
- */
-
-#undef errno
-extern int errno;
-int host_errno(void)
-{
- return errno;
-}
-#endif
diff --git a/cpukit/libcsupport/src/ioctl.c b/cpukit/libcsupport/src/ioctl.c
deleted file mode 100644
index af986743dd..0000000000
--- a/cpukit/libcsupport/src/ioctl.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * ioctl() system call
- *
- * This routine is not defined in the POSIX 1003.1b standard but is
- * commonly supported on most UNIX and POSIX systems.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "libio_.h"
-
-int ioctl(
- int fd,
- unsigned32 command,
- void * buffer
-)
-{
- rtems_status_code rc;
- rtems_libio_t *iop;
-
- rtems_libio_check_fd( fd );
- iop = rtems_libio_iop( fd );
- rtems_libio_check_is_open(iop);
-
- /*
- * Now process the ioctl().
- */
-
- if ( !iop->handlers->ioctl )
- set_errno_and_return_minus_one( ENOTSUP );
-
- rc = (*iop->handlers->ioctl)( iop, command, buffer );
-
- return rc;
-}
diff --git a/cpukit/libcsupport/src/isatty.c b/cpukit/libcsupport/src/isatty.c
deleted file mode 100644
index 3c64647a94..0000000000
--- a/cpukit/libcsupport/src/isatty.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* isatty.c */
-
-/* Dumb implementation so programs will at least run. */
-
-#include <sys/stat.h>
-
-int
-isatty (int fd)
-{
- struct stat buf;
-
- if (fstat (fd, &buf) < 0)
- return 0;
- if (S_ISCHR (buf.st_mode))
- return 1;
- return 0;
-}
diff --git a/cpukit/libcsupport/src/libio.c b/cpukit/libcsupport/src/libio.c
deleted file mode 100644
index 9e075c9f0b..0000000000
--- a/cpukit/libcsupport/src/libio.c
+++ /dev/null
@@ -1,327 +0,0 @@
-/*
- * This file contains the support infrastructure used to manage the
- * table of integer style file descriptors used by the low level
- * POSIX system calls like open(), read, fstat(), etc.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "libio_.h" /* libio_.h pulls in rtems */
-#include <rtems.h>
-#include <rtems/assoc.h> /* assoc.h not included by rtems.h */
-
-#include <stdio.h> /* O_RDONLY, et.al. */
-#include <fcntl.h> /* O_RDONLY, et.al. */
-#include <assert.h>
-#include <errno.h>
-
-#if ! defined(O_NDELAY)
-# if defined(solaris2)
-# define O_NDELAY O_NONBLOCK
-# elif defined(RTEMS_NEWLIB)
-# define O_NDELAY _FNBIO
-# endif
-#endif
-
-
-#include <errno.h>
-#include <string.h> /* strcmp */
-#include <unistd.h>
-#include <stdlib.h> /* calloc() */
-
-#include <rtems/libio.h> /* libio.h not pulled in by rtems */
-
-/*
- * File descriptor Table Information
- */
-
-extern unsigned32 rtems_libio_number_iops;
-rtems_id rtems_libio_semaphore;
-rtems_libio_t *rtems_libio_iops;
-rtems_libio_t *rtems_libio_iop_freelist;
-
-/*
- * rtems_libio_init
- *
- * Called by BSP startup code to initialize the libio subsystem.
- */
-
-void rtems_libio_init( void )
-{
- rtems_status_code rc;
- int i;
- rtems_libio_t *iop;
-
- if (rtems_libio_number_iops > 0)
- {
- rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
- sizeof(rtems_libio_t));
- if (rtems_libio_iops == NULL)
- rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
-
- iop = rtems_libio_iop_freelist = rtems_libio_iops;
- for (i = 0 ; i < (rtems_libio_number_iops - 1) ; i++, iop++)
- iop->data1 = iop + 1;
- iop->data1 = NULL;
- }
-
- /*
- * Create the binary semaphore used to provide mutual exclusion
- * on the IOP Table.
- */
-
- rc = rtems_semaphore_create(
- RTEMS_LIBIO_SEM,
- 1,
- RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
- RTEMS_NO_PRIORITY,
- &rtems_libio_semaphore
- );
- if ( rc != RTEMS_SUCCESSFUL )
- rtems_fatal_error_occurred( rc );
-
- /*
- * Initialize the base file system infrastructure.
- */
-
- rtems_filesystem_initialize();
-}
-
-/*
- * rtems_libio_fcntl_flags
- *
- * Convert UNIX fnctl(2) flags to ones that RTEMS drivers understand
- */
-
-rtems_assoc_t access_modes_assoc[] = {
- { "READ", LIBIO_FLAGS_READ, O_RDONLY },
- { "WRITE", LIBIO_FLAGS_WRITE, O_WRONLY },
- { "READ/WRITE", LIBIO_FLAGS_READ_WRITE, O_RDWR },
- { 0, 0, 0 },
-};
-
-rtems_assoc_t status_flags_assoc[] = {
- { "NO DELAY", LIBIO_FLAGS_NO_DELAY, O_NDELAY },
- { "APPEND", LIBIO_FLAGS_APPEND, O_APPEND },
- { "CREATE", LIBIO_FLAGS_CREATE, O_CREAT },
- { 0, 0, 0 },
-};
-
-unsigned32 rtems_libio_fcntl_flags(
- unsigned32 fcntl_flags
-)
-{
- unsigned32 flags = 0;
- unsigned32 access_modes;
-
- /*
- * Access mode is a small integer
- */
-
- access_modes = fcntl_flags & O_ACCMODE;
- fcntl_flags &= ~O_ACCMODE;
- flags = rtems_assoc_local_by_remote( access_modes_assoc, access_modes );
-
- /*
- * Everything else is single bits
- */
-
- flags |=
- rtems_assoc_local_by_remote_bitfield(status_flags_assoc, fcntl_flags);
- return flags;
-}
-
-/*
- * rtems_libio_to_fcntl_flags
- *
- * Convert RTEMS internal flags to UNIX fnctl(2) flags
- */
-
-unsigned32 rtems_libio_to_fcntl_flags(
- unsigned32 flags
-)
-{
- unsigned32 fcntl_flags = 0;
-
- if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
- fcntl_flags |= O_RDWR;
- } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
- fcntl_flags |= O_RDONLY;
- } else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) {
- fcntl_flags |= O_WRONLY;
- }
-
- if ( (flags & LIBIO_FLAGS_NO_DELAY) == LIBIO_FLAGS_NO_DELAY ) {
- fcntl_flags |= O_NDELAY;
- }
-
- if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) {
- fcntl_flags |= O_APPEND;
- }
-
- if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) {
- fcntl_flags |= O_CREAT;
- }
-
- return fcntl_flags;
-}
-
-/*
- * rtems_libio_allocate
- *
- * This routine searches the IOP Table for an unused entry. If it
- * finds one, it returns it. Otherwise, it returns NULL.
- */
-
-rtems_libio_t *rtems_libio_allocate( void )
-{
- rtems_libio_t *iop;
- rtems_status_code rc;
-
- rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
-
- if (rtems_libio_iop_freelist) {
- iop = rtems_libio_iop_freelist;
- rc = rtems_semaphore_create(
- RTEMS_LIBIO_IOP_SEM(iop - rtems_libio_iops),
- 1,
- RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
- RTEMS_NO_PRIORITY,
- &iop->sem
- );
- if (rc != RTEMS_SUCCESSFUL)
- goto failed;
- rtems_libio_iop_freelist = iop->data1;
- iop->data1 = 0;
- iop->flags = LIBIO_FLAGS_OPEN;
- goto done;
- }
-
-failed:
- iop = 0;
-
-done:
- rtems_semaphore_release( rtems_libio_semaphore );
- return iop;
-}
-
-/*
- * rtems_libio_free
- *
- * This routine frees the resources associated with an IOP (file descriptor)
- * and clears the slot in the IOP Table.
- */
-
-void rtems_libio_free(
- rtems_libio_t *iop
-)
-{
- rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
-
- if (iop->sem)
- rtems_semaphore_delete(iop->sem);
-
- iop->flags &= ~LIBIO_FLAGS_OPEN;
- iop->data1 = rtems_libio_iop_freelist;
- rtems_libio_iop_freelist = iop;
-
- rtems_semaphore_release(rtems_libio_semaphore);
-}
-
-/*
- * rtems_libio_is_open_files_in_fs
- *
- * This routine scans the entire file descriptor table to determine if the
- * are any active file descriptors that refer to the at least one node in the
- * file system that we are trying to dismount.
- *
- * If there is at least one node in the file system referenced by the mount
- * table entry a 1 is returned, otherwise a 0 is returned.
- */
-
-int rtems_libio_is_open_files_in_fs(
- rtems_filesystem_mount_table_entry_t * fs_mt_entry
-)
-{
- rtems_libio_t *iop;
- int result = 0;
- int i;
-
- rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
-
- /*
- * Look for any active file descriptor entry.
- */
-
- for (iop=rtems_libio_iops,i=0; i <= rtems_libio_number_iops; iop++, i++){
-
- if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
-
- /*
- * Check if this node is under the file system that we
- * are trying to dismount.
- */
-
- if ( iop->pathinfo.mt_entry == fs_mt_entry ) {
- result = 1;
- break;
- }
- }
- }
-
- rtems_semaphore_release( rtems_libio_semaphore );
-
- return result;
-}
-
-/*
- * rtems_libio_is_file_open
- *
- * This routine scans the entire file descriptor table to determine if the
- * given file refers to an active file descriptor.
- *
- * If the given file is open a 1 is returned, otherwise a 0 is returned.
- */
-
-int rtems_libio_is_file_open(
- void *node_access
-)
-{
- rtems_libio_t *iop;
- int result=0;
- int i;
-
- rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
-
- /*
- * Look for any active file descriptor entry.
- */
-
- for (iop=rtems_libio_iops,i=0; i <= rtems_libio_number_iops; iop++, i++){
- if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
-
- /*
- * Check if this node is under the file system that we
- * are trying to dismount.
- */
-
- if ( iop->pathinfo.node_access == node_access ) {
- result = 1;
- break;
- }
- }
- }
-
- rtems_semaphore_release( rtems_libio_semaphore );
-
- return result;
-}
-
-
diff --git a/cpukit/libcsupport/src/libio_sockets.c b/cpukit/libcsupport/src/libio_sockets.c
deleted file mode 100644
index ac15a2a5c2..0000000000
--- a/cpukit/libcsupport/src/libio_sockets.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * This file contains the support infrastructure used to manage the
- * table of integer style file descriptors used by the socket calls.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "libio_.h" /* libio_.h pulls in rtems */
-#include <rtems.h>
-
-#include <errno.h>
-
-/*
- * Convert an RTEMS file descriptor to a BSD socket pointer.
- */
-
-struct socket *rtems_bsdnet_fdToSocket(
- int fd
-)
-{
- rtems_libio_t *iop;
-
- if ((unsigned32)fd >= rtems_libio_number_iops) {
- errno = EBADF;
- return NULL;
- }
- iop = &rtems_libio_iops[fd];
- if (iop->data1 == NULL)
- errno = EBADF;
- return iop->data1;
-}
-
-/*
- * Create an RTEMS file descriptor for a socket
- */
-
-int rtems_bsdnet_makeFdForSocket(
- void *so,
- const rtems_filesystem_file_handlers_r *h
-)
-{
- rtems_libio_t *iop;
- int fd;
-
- iop = rtems_libio_allocate();
- if (iop == 0) {
- errno = ENFILE;
- return -1;
- }
- fd = iop - rtems_libio_iops;
- iop->flags |= LIBIO_FLAGS_WRITE | LIBIO_FLAGS_READ;
- iop->data0 = fd;
- iop->data1 = so;
- iop->handlers = (rtems_filesystem_file_handlers_r *) h;
- return fd;
-}
diff --git a/cpukit/libcsupport/src/link.c b/cpukit/libcsupport/src/link.c
deleted file mode 100644
index 5bf8f90353..0000000000
--- a/cpukit/libcsupport/src/link.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * link() - POSIX 1003.1b - 5.3.4 - Create a new link
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include <rtems/libio.h>
-#include <errno.h>
-
-#include "libio_.h"
-
-int link(
- const char *existing,
- const char *new
-)
-{
- rtems_filesystem_location_info_t existing_loc;
- rtems_filesystem_location_info_t parent_loc;
- int i;
- int result;
- const char *name_start;
-
- /*
- * Get the node we are linking to.
- */
-
- result = rtems_filesystem_evaluate_path( existing, 0, &existing_loc, TRUE );
- if ( result != 0 )
- return -1;
-
- /*
- * Get the parent of the node we are creating.
- */
-
- rtems_filesystem_get_start_loc( new, &i, &parent_loc );
- result = (*parent_loc.ops->evalformake)( &new[i], &parent_loc, &name_start );
- if ( result != 0 ) {
- rtems_filesystem_freenode( &parent_loc );
- set_errno_and_return_minus_one( result );
- }
-
- /*
- * Check to see if the caller is trying to link across file system
- * boundaries.
- */
-
- if ( parent_loc.mt_entry != existing_loc.mt_entry ) {
- rtems_filesystem_freenode( &existing_loc );
- rtems_filesystem_freenode( &parent_loc );
- set_errno_and_return_minus_one( EXDEV );
- }
-
- if ( !parent_loc.ops->link ) {
- rtems_filesystem_freenode( &existing_loc );
- rtems_filesystem_freenode( &parent_loc );
- set_errno_and_return_minus_one( ENOTSUP );
- }
-
- result = (*parent_loc.ops->link)( &existing_loc, &parent_loc, name_start );
-
- rtems_filesystem_freenode( &existing_loc );
- rtems_filesystem_freenode( &parent_loc );
-
- return result;
-}
-
-/*
- * _link_r
- *
- * This is the Newlib dependent reentrant version of link().
- */
-
-#if defined(RTEMS_NEWLIB)
-
-#include <reent.h>
-
-int _link_r(
- struct _reent *ptr,
- const char *existing,
- const char *new
-)
-{
- return link( existing, new );
-}
-#endif
-
diff --git a/cpukit/libcsupport/src/lseek.c b/cpukit/libcsupport/src/lseek.c
deleted file mode 100644
index 992056482e..0000000000
--- a/cpukit/libcsupport/src/lseek.c
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * lseek() - POSIX 1003.1b 6.5.3 - Reposition Read/Write File Offset
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <stdio.h>
-
-#include "libio_.h"
-
-off_t lseek(
- int fd,
- off_t offset,
- int whence
-)
-{
- rtems_libio_t *iop;
-
- rtems_libio_check_fd( fd );
- iop = rtems_libio_iop( fd );
- rtems_libio_check_is_open(iop);
-
- /*
- * Now process the lseek().
- */
-
- switch ( whence ) {
- case SEEK_SET:
- iop->offset = offset;
- break;
-
- case SEEK_CUR:
- iop->offset += offset;
- break;
-
- case SEEK_END:
- iop->offset = iop->size - offset;
- break;
-
- default:
- errno = EINVAL;
- return -1;
- }
-
- if ( !iop->handlers->lseek )
- set_errno_and_return_minus_one( ENOTSUP );
-
- return (*iop->handlers->lseek)( iop, offset, whence );
-}
-
-/*
- * _lseek_r
- *
- * This is the Newlib dependent reentrant version of lseek().
- */
-
-#if defined(RTEMS_NEWLIB)
-
-#include <reent.h>
-
-off_t _lseek_r(
- struct _reent *ptr,
- int fd,
- off_t offset,
- int whence
-)
-{
- return lseek( fd, offset, whence );
-}
-#endif
-
diff --git a/cpukit/libcsupport/src/lstat.c b/cpukit/libcsupport/src/lstat.c
deleted file mode 100644
index 8a3e38c049..0000000000
--- a/cpukit/libcsupport/src/lstat.c
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * lstat() - BSD 4.3 and SVR4 - Get File Status
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define _STAT_NAME lstat
-#define _STAT_R_NAME _lstat_r
-#define _STAT_FOLLOW_LINKS FALSE
-
-#include "stat.c"
diff --git a/cpukit/libcsupport/src/malloc.c b/cpukit/libcsupport/src/malloc.c
deleted file mode 100644
index cc63b6c7d0..0000000000
--- a/cpukit/libcsupport/src/malloc.c
+++ /dev/null
@@ -1,422 +0,0 @@
-/*
- * RTEMS Malloc Family Implementation
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
-#include <rtems.h>
-#include "libcsupport.h"
-#ifdef RTEMS_NEWLIB
-#include <sys/reent.h>
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <assert.h>
-#include <errno.h>
-#include <string.h>
-
-#include <unistd.h> /* sbrk(2) */
-
-rtems_id RTEMS_Malloc_Heap;
-size_t RTEMS_Malloc_Sbrk_amount;
-
-#ifdef RTEMS_DEBUG
-#define MALLOC_STATS
-#define MALLOC_DIRTY
-#endif
-
-#ifdef MALLOC_STATS
-#define MSBUMP(f,n) rtems_malloc_stats.f += (n)
-
-struct {
- unsigned32 space_available; /* current size of malloc area */
- unsigned32 malloc_calls; /* # calls to malloc */
- unsigned32 free_calls;
- unsigned32 realloc_calls;
- unsigned32 calloc_calls;
- unsigned32 max_depth; /* most ever malloc'd at 1 time */
- unsigned64 lifetime_allocated;
- unsigned64 lifetime_freed;
-} rtems_malloc_stats;
-
-#else /* No rtems_malloc_stats */
-#define MSBUMP(f,n)
-#endif
-
-void RTEMS_Malloc_Initialize(
- void *start,
- size_t length,
- size_t sbrk_amount
-)
-{
- rtems_status_code status;
- void *starting_address;
- rtems_unsigned32 old_address;
- rtems_unsigned32 u32_address;
-
- /*
- * If the starting address is 0 then we are to attempt to
- * get length worth of memory using sbrk. Make sure we
- * align the address that we get back.
- */
-
- starting_address = start;
- RTEMS_Malloc_Sbrk_amount = sbrk_amount;
-
- if (!starting_address) {
- u32_address = (unsigned int)sbrk(length);
-
- if (u32_address == (rtems_unsigned32) -1) {
- rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
- /* DOES NOT RETURN!!! */
- }
-
- if (u32_address & (CPU_ALIGNMENT-1)) {
- old_address = u32_address;
- u32_address = (u32_address + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
-
- /*
- * adjust the length by whatever we aligned by
- */
-
- length -= u32_address - old_address;
- }
-
- starting_address = (void *)u32_address;
- }
-
- /*
- * If the BSP is not clearing out the workspace, then it is most likely
- * not clearing out the initial memory for the heap. There is no
- * standard supporting zeroing out the heap memory. But much code
- * with UNIX history seems to assume that memory malloc'ed during
- * initialization (before any free's) is zero'ed. This is true most
- * of the time under UNIX because zero'ing memory when it is first
- * given to a process eliminates the chance of a process seeing data
- * left over from another process. This would be a security violation.
- */
-
- if ( rtems_cpu_configuration_get_do_zero_of_workspace() )
- memset( starting_address, 0, length );
-
- /*
- * Unfortunately we cannot use assert if this fails because if this
- * has failed we do not have a heap and if we do not have a heap
- * STDIO cannot work because there will be no buffers.
- */
-
- status = rtems_region_create(
- rtems_build_name( 'H', 'E', 'A', 'P' ),
- starting_address,
- length,
- CPU_ALIGNMENT,
- RTEMS_DEFAULT_ATTRIBUTES,
- &RTEMS_Malloc_Heap
- );
- if ( status != RTEMS_SUCCESSFUL )
- rtems_fatal_error_occurred( status );
-
-#ifdef MALLOC_STATS
- /* zero all the stats */
- (void) memset( &rtems_malloc_stats, 0, sizeof(rtems_malloc_stats) );
-#endif
-
- MSBUMP(space_available, length);
-}
-
-#ifdef RTEMS_NEWLIB
-void *malloc(
- size_t size
-)
-{
- void *return_this;
- void *starting_address;
- rtems_unsigned32 the_size;
- rtems_unsigned32 sbrk_amount;
- rtems_status_code status;
-
- MSBUMP(malloc_calls, 1);
-
- if ( !size )
- return (void *) 0;
-
- /*
- * Try to give a segment in the current region if there is not
- * enough space then try to grow the region using rtems_region_extend().
- * If this fails then return a NULL pointer.
- */
-
- status = rtems_region_get_segment(
- RTEMS_Malloc_Heap,
- size,
- RTEMS_NO_WAIT,
- RTEMS_NO_TIMEOUT,
- &return_this
- );
-
- if ( status != RTEMS_SUCCESSFUL ) {
- /*
- * Round to the "requested sbrk amount" so hopefully we won't have
- * to grow again for a while. This effectively does sbrk() calls
- * in "page" amounts.
- */
-
- sbrk_amount = RTEMS_Malloc_Sbrk_amount;
-
- if ( sbrk_amount == 0 )
- return (void *) 0;
-
- the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount);
-
- if (((rtems_unsigned32)starting_address = (void *)sbrk(the_size))
- == (rtems_unsigned32) -1)
- return (void *) 0;
-
- status = rtems_region_extend(
- RTEMS_Malloc_Heap,
- starting_address,
- the_size
- );
- if ( status != RTEMS_SUCCESSFUL ) {
- sbrk(-the_size);
- errno = ENOMEM;
- return (void *) 0;
- }
-
- MSBUMP(space_available, the_size);
-
- status = rtems_region_get_segment(
- RTEMS_Malloc_Heap,
- size,
- RTEMS_NO_WAIT,
- RTEMS_NO_TIMEOUT,
- &return_this
- );
- if ( status != RTEMS_SUCCESSFUL ) {
- errno = ENOMEM;
- return (void *) 0;
- }
- }
-
-#ifdef MALLOC_STATS
- if (return_this)
- {
- unsigned32 actual_size;
- unsigned32 current_depth;
- status = rtems_region_get_segment_size(
- RTEMS_Malloc_Heap, return_this, &actual_size);
- MSBUMP(lifetime_allocated, actual_size);
- current_depth = rtems_malloc_stats.lifetime_allocated -
- rtems_malloc_stats.lifetime_freed;
- if (current_depth > rtems_malloc_stats.max_depth)
- rtems_malloc_stats.max_depth = current_depth;
- }
-#endif
-
-#ifdef MALLOC_DIRTY
- (void) memset(return_this, 0xCF, size);
-#endif
-
- return return_this;
-}
-
-void *calloc(
- size_t nelem,
- size_t elsize
-)
-{
- register char *cptr;
- int length;
-
- MSBUMP(calloc_calls, 1);
-
- length = nelem * elsize;
- cptr = malloc( length );
- if ( cptr )
- memset( cptr, '\0', length );
-
- MSBUMP(malloc_calls, -1); /* subtract off the malloc */
-
- return cptr;
-}
-
-void *realloc(
- void *ptr,
- size_t size
-)
-{
- rtems_unsigned32 old_size;
- rtems_status_code status;
- char *new_area;
-
- MSBUMP(realloc_calls, 1);
-
- if ( !ptr )
- return malloc( size );
-
- if ( !size ) {
- free( ptr );
- return (void *) 0;
- }
-
- new_area = malloc( size );
-
- MSBUMP(malloc_calls, -1); /* subtract off the malloc */
-
- if ( !new_area ) {
- free( ptr );
- return (void *) 0;
- }
-
- status = rtems_region_get_segment_size( RTEMS_Malloc_Heap, ptr, &old_size );
- if ( status != RTEMS_SUCCESSFUL ) {
- errno = EINVAL;
- return (void *) 0;
- }
-
- memcpy( new_area, ptr, (size < old_size) ? size : old_size );
- free( ptr );
-
- return new_area;
-
-}
-
-void free(
- void *ptr
-)
-{
- rtems_status_code status;
-
- MSBUMP(free_calls, 1);
-
- if ( !ptr )
- return;
-
-#ifdef MALLOC_STATS
- {
- unsigned32 size;
- status = rtems_region_get_segment_size( RTEMS_Malloc_Heap, ptr, &size );
- if ( status == RTEMS_SUCCESSFUL ) {
- MSBUMP(lifetime_freed, size);
- }
- }
-#endif
-
- status = rtems_region_return_segment( RTEMS_Malloc_Heap, ptr );
- if ( status != RTEMS_SUCCESSFUL ) {
- errno = EINVAL;
- assert( 0 );
- }
-}
-/* end if RTEMS_NEWLIB */
-#endif
-
-#ifdef MALLOC_STATS
-/*
- * Dump the malloc statistics
- * May be called via atexit() (installable by our bsp) or
- * at any time by user
- */
-
-void malloc_dump(void)
-{
- unsigned32 allocated = rtems_malloc_stats.lifetime_allocated -
- rtems_malloc_stats.lifetime_freed;
-
- printf("Malloc stats\n");
- printf(" avail:%uk allocated:%uk (%d%%) "
- "max:%uk (%d%%) lifetime:%Luk freed:%Luk\n",
- (unsigned int) rtems_malloc_stats.space_available / 1024,
- (unsigned int) allocated / 1024,
- /* avoid float! */
- (allocated * 100) / rtems_malloc_stats.space_available,
- (unsigned int) rtems_malloc_stats.max_depth / 1024,
- (rtems_malloc_stats.max_depth * 100) / rtems_malloc_stats.space_available,
- (unsigned64) rtems_malloc_stats.lifetime_allocated / 1024,
- (unsigned64) rtems_malloc_stats.lifetime_freed / 1024);
- printf(" Call counts: malloc:%d free:%d realloc:%d calloc:%d\n",
- rtems_malloc_stats.malloc_calls,
- rtems_malloc_stats.free_calls,
- rtems_malloc_stats.realloc_calls,
- rtems_malloc_stats.calloc_calls);
-}
-
-
-void malloc_walk(size_t source, size_t printf_enabled)
-{
- register Region_Control *the_region;
- Objects_Locations location;
-
- the_region = _Region_Get( RTEMS_Malloc_Heap, &location );
- if ( location == OBJECTS_LOCAL )
- {
- _Heap_Walk( &the_region->Memory, source, printf_enabled );
- _Thread_Enable_dispatch();
- }
-}
-
-#else
-
-void malloc_dump(void)
-{
- return;
-}
-
-void malloc_walk(size_t source, size_t printf_enabled)
-{
- return;
-}
-
-#endif
-
-/*
- * "Reentrant" versions of the above routines implemented above.
- */
-
-#ifdef RTEMS_NEWLIB
-void *_malloc_r(
- struct _reent *ignored,
- size_t size
-)
-{
- return malloc( size );
-}
-
-void *_calloc_r(
- struct _reent *ignored,
- size_t nelem,
- size_t elsize
-)
-{
- return calloc( nelem, elsize );
-}
-
-void *_realloc_r(
- struct _reent *ignored,
- void *ptr,
- size_t size
-)
-{
- return realloc( ptr, size );
-}
-
-void _free_r(
- struct _reent *ignored,
- void *ptr
-)
-{
- free( ptr );
-}
-#endif
-
diff --git a/cpukit/libcsupport/src/mkdir.c b/cpukit/libcsupport/src/mkdir.c
deleted file mode 100644
index d1cf4c306c..0000000000
--- a/cpukit/libcsupport/src/mkdir.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * mkdir() - POSIX 1003.1b 5.4.1 - Make a Directory
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#include <stdlib.h>
-
-int mkdir(
- const char *pathname,
- mode_t mode
-)
-{
- return mknod( pathname, mode | S_IFDIR, 0LL);
-}
-
diff --git a/cpukit/libcsupport/src/mkfifo.c b/cpukit/libcsupport/src/mkfifo.c
deleted file mode 100644
index 9ea820675b..0000000000
--- a/cpukit/libcsupport/src/mkfifo.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * mkfifo() - POSIX 1003.1b 5.4.1 - Make a FIFO Special File
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-
-int mkfifo(
- const char *path,
- mode_t mode
-)
-{
- return mknod( path, mode | S_IFIFO, 0LL );
-}
diff --git a/cpukit/libcsupport/src/mknod.c b/cpukit/libcsupport/src/mknod.c
deleted file mode 100644
index 0a3a108f9a..0000000000
--- a/cpukit/libcsupport/src/mknod.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * mknod()
- *
- * This routine is not defined in the POSIX 1003.1b standard but is
- * commonly supported on most UNIX and POSIX systems. It is the
- * foundation for creating file system objects.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#include <stdlib.h>
-
-#include "libio_.h"
-
-int mknod(
- const char *pathname,
- mode_t mode,
- dev_t dev
-)
-{
- rtems_filesystem_location_info_t temp_loc;
- int i;
- const char *name_start;
- int result;
-
- if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) )
- set_errno_and_return_minus_one( EINVAL );
-
- if ( S_ISFIFO(mode) )
- set_errno_and_return_minus_one( ENOTSUP );
-
- rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
-
- result = (*temp_loc.ops->evalformake)(
- &pathname[i],
- &temp_loc,
- &name_start
- );
- if ( result != 0 )
- return -1;
-
- if ( !temp_loc.ops->mknod ) {
- rtems_filesystem_freenode( &temp_loc );
- set_errno_and_return_minus_one( ENOTSUP );
- }
-
- result = (*temp_loc.ops->mknod)( name_start, mode, dev, &temp_loc );
-
- rtems_filesystem_freenode( &temp_loc );
-
- return result;
-}
diff --git a/cpukit/libcsupport/src/mount.c b/cpukit/libcsupport/src/mount.c
deleted file mode 100644
index 578404ecdc..0000000000
--- a/cpukit/libcsupport/src/mount.c
+++ /dev/null
@@ -1,286 +0,0 @@
-/*
- * mount()
- *
- * XXX
- *
- * XXX make sure no required ops are NULL
- * XXX make sure no optional ops you are using are NULL
- * XXX unmount should be required.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <chain.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-#include "libio_.h"
-
-Chain_Control rtems_filesystem_mount_table_control;
-
-#include "imfs.h"
-
-/* XXX this structure should be in an IMFS specific file */
-/* XXX this structure should use real constants */
-
-rtems_filesystem_limits_and_options_t IMFS_LIMITS_AND_OPTIONS = {
- 5, /* link_max */
- 6, /* max_canon */
- 7, /* max_input */
- IMFS_NAME_MAX, /* name_max */
- 255, /* path_max */
- 2, /* pipe_buf */
- 1, /* posix_async_io */
- 2, /* posix_chown_restrictions */
- 3, /* posix_no_trunc */
- 4, /* posix_prio_io */
- 5, /* posix_sync_io */
- 6 /* posix_vdisable */
-};
-
-/*
- * XXX
- */
-
-int search_mt_for_mount_point(
- rtems_filesystem_location_info_t *location_of_mount_point
-);
-
-int init_fs_mount_table( void );
-
-
-/*
- * XXX
- */
-
-#define FOUND 0
-#define NOT_FOUND -1
-
-/*
- * mount
- *
- * This routine will attempt to mount a new file system at the specified
- * mount point. A series of tests will be run to determine if any of the
- * following reasons exist to prevent the mount operation:
- *
- * 1) The file system type or options are not valid
- * 2) No new file system root node is specified
- * 3) The selected file system has already been mounted
- * 4) The mount point exists with the proper permissions to allow mounting
- * 5) The selected mount point already has a file system mounted to it
- *
- */
-
-int mount(
- rtems_filesystem_mount_table_entry_t **mt_entry,
- rtems_filesystem_operations_table *fs_ops,
- rtems_filesystem_options_t options,
- char *device,
- char *mount_point
-)
-{
- rtems_filesystem_location_info_t loc;
- rtems_filesystem_mount_table_entry_t *temp_mt_entry;
- rtems_filesystem_location_info_t *loc_to_free = NULL;
-
-/* XXX add code to check for required operations */
-
- /*
- * Is there a file system operations table?
- */
-
- if ( fs_ops == NULL ) {
- errno = EINVAL;
- return -1;
- }
-
- /*
- * Are the file system options valid?
- */
-
- if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
- options != RTEMS_FILESYSTEM_READ_WRITE ) {
- errno = EINVAL;
- return -1;
- }
-
- /*
- * Allocate a mount table entry
- */
-
- temp_mt_entry = malloc( sizeof(rtems_filesystem_mount_table_entry_t) );
-
- if ( !temp_mt_entry ) {
- errno = ENOMEM;
- return -1;
- }
-
- temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry;
- temp_mt_entry->options = options;
- if ( device )
- strcpy( temp_mt_entry->dev, device );
- else
- temp_mt_entry->dev = 0;
-
- /*
- * The mount_point should be a directory with read/write/execute
- * permissions in the existing tree.
- */
-
- if ( mount_point ) {
-
- if ( rtems_filesystem_evaluate_path(
- mount_point, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE ) == -1 )
- goto cleanup_and_bail;
-
- /*
- * Test to see if it is a directory
- */
-
- loc_to_free = &loc;
- if ( loc.ops->node_type( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
- errno = ENOTDIR;
- goto cleanup_and_bail;
- }
-
- /*
- * You can only mount one file system onto a single mount point.
- */
-
- if ( search_mt_for_mount_point( &loc ) == FOUND ) {
- errno = EBUSY;
- goto cleanup_and_bail;
- }
-
- /*
- * This must be a good mount point, so move the location information
- * into the allocated mount entry. Note: the information that
- * may have been allocated in loc should not be sent to freenode
- * until the system is unmounted. It may be needed to correctly
- * traverse the tree.
- */
-
- temp_mt_entry->mt_point_node.node_access = loc.node_access;
- temp_mt_entry->mt_point_node.handlers = loc.handlers;
- temp_mt_entry->mt_point_node.ops = loc.ops;
- temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry;
-
- /*
- * This link to the parent is only done when we are dealing with system
- * below the base file system
- */
-
- if ( !loc.ops->mount ){
- errno = ENOTSUP;
- goto cleanup_and_bail;
- }
-
- if ( loc.ops->mount( temp_mt_entry ) ) {
- goto cleanup_and_bail;
- }
- } else {
-
- /*
- * This is a mount of the base file system --> The
- * mt_point_node.node_access will be set to null to indicate that this
- * is the root of the entire file system.
- */
-
- temp_mt_entry->mt_fs_root.node_access = NULL;
- temp_mt_entry->mt_fs_root.handlers = NULL;
- temp_mt_entry->mt_fs_root.ops = NULL;
-
- temp_mt_entry->mt_point_node.node_access = NULL;
- temp_mt_entry->mt_point_node.handlers = NULL;
- temp_mt_entry->mt_point_node.ops = NULL;
- temp_mt_entry->mt_point_node.mt_entry = NULL;
- }
-
- if ( !fs_ops->fsmount_me ) {
- errno = ENOTSUP;
- goto cleanup_and_bail;
- }
-
- if ( fs_ops->fsmount_me( temp_mt_entry ) )
- goto cleanup_and_bail;
-
- /*
- * Add the mount table entry to the mount table chain
- */
-
- Chain_Append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node );
-
- *mt_entry = temp_mt_entry;
-
- return 0;
-
-cleanup_and_bail:
-
- free( temp_mt_entry );
-
- if ( loc_to_free )
- rtems_filesystem_freenode( loc_to_free );
-
- return -1;
-}
-
-
-
-/*
- * init_fs_mount_table
- *
- * This routine will initialize the chain control element that manages the
- * mount table chain.
- */
-
-int init_fs_mount_table()
-{
- Chain_Initialize_empty ( &rtems_filesystem_mount_table_control );
- return 0;
-}
-
-
-/*
- * search_mt_for_mount_point
- *
- * This routine will run through the entries that currently exist in the
- * mount table chain. For each entry in the mount table chain it will
- * compare the mount tables mt_point_node to the node describing the selected
- * mount point.. If any of the mount table file system mount point nodes
- * match the new file system selected mount point node, we are attempting
- * to mount the new file system onto a node that already has a file system
- * mounted to it. This is not a permitted operation.
- */
-
-int search_mt_for_mount_point(
- rtems_filesystem_location_info_t *location_of_mount_point
-)
-{
- Chain_Node *the_node;
- rtems_filesystem_mount_table_entry_t *the_mount_entry;
-
- for ( the_node = rtems_filesystem_mount_table_control.first;
- !Chain_Is_tail( &rtems_filesystem_mount_table_control, the_node );
- the_node = the_node->next ) {
-
- the_mount_entry = (rtems_filesystem_mount_table_entry_t *) the_node;
- if ( the_mount_entry->mt_point_node.node_access ==
- location_of_mount_point->node_access )
- return FOUND;
- }
- return NOT_FOUND;
-}
-
diff --git a/cpukit/libcsupport/src/newlibc.c b/cpukit/libcsupport/src/newlibc.c
deleted file mode 100644
index cfa9100e96..0000000000
--- a/cpukit/libcsupport/src/newlibc.c
+++ /dev/null
@@ -1,359 +0,0 @@
-/*
- * Implementation of hooks for the CYGNUS newlib libc
- * These hooks set things up so that:
- * + '_REENT' is switched at task switch time.
- *
- * COPYRIGHT (c) 1994 by Division Incorporated
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- *
- */
-
-#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
-#include <rtems.h>
-
-#if defined(RTEMS_NEWLIB)
-#include <libcsupport.h>
-#include <stdlib.h> /* for free() */
-#include <string.h> /* for memset() */
-
-#include <sys/reent.h> /* for extern of _REENT (aka _impure_ptr) */
-#include <errno.h>
-
-/*
- * NOTE:
- * There is some problem with doing this on the hpux version
- * of the UNIX simulator (symptom is printf core dumps), so
- * we just don't for now.
- * Not sure if this is a problem with hpux, newlib, or something else.
- */
-
-#if defined(RTEMS_UNIX) && !defined(hpux)
-#define NEED_SETVBUF
-#endif
-
-#ifdef NEED_SETVBUF
-#include <stdio.h>
-#endif
-
-static int extension_index;
-
-/*
- * Private routines
- */
-
-#define set_newlib_extension( _the_thread, _value ) \
- (_the_thread)->extensions[ extension_index ] = (_value);
-
-#define get_newlib_extension( _the_thread ) \
- (_the_thread)->extensions[ extension_index ]
-
-int libc_reentrant; /* do we think we are reentrant? */
-struct _reent libc_global_reent;
-
-/*
- * CYGNUS newlib routine that does atexit() processing and flushes
- * stdio streams
- * undocumented
- */
-
-extern void _wrapup_reent(struct _reent *);
-extern void _reclaim_reent(struct _reent *);
-
-#include <stdio.h>
-
-void libc_wrapup(void)
-{
- /*
- * In case RTEMS is already down, don't do this. It could be
- * dangerous.
- */
-
- if (!_System_state_Is_up(_System_state_Get()))
- return;
-
- /*
- * This was already done if the user called exit() directly .
- _wrapup_reent(0);
- */
-
- if (_REENT != &libc_global_reent) {
- _wrapup_reent(&libc_global_reent);
-#if 0
- /* Don't reclaim this one, just in case we do printfs
- * on the way out to ROM.
- */
- _reclaim_reent(&libc_global_reent);
-#endif
- _REENT = &libc_global_reent;
- }
-
- /*
- * Try to drain output buffers.
- *
- * Should this be changed to do *all* file streams?
- * _fwalk (_REENT, fclose);
- */
-
- fclose (stdin);
- fclose (stdout);
- fclose (stderr);
-}
-
-
-rtems_boolean libc_create_hook(
- rtems_tcb *current_task,
- rtems_tcb *creating_task
-)
-{
- set_newlib_extension( creating_task, NULL );
- return TRUE;
-}
-
-/*
- * Called for all user TASKS (system tasks are MPCI Receive Server and IDLE)
- */
-
-rtems_extension libc_start_hook(
- rtems_tcb *current_task,
- rtems_tcb *starting_task
-)
-{
- struct _reent *ptr;
-
- /* NOTE: The RTEMS malloc is reentrant without a reent ptr since
- * it is based on the Classic API Region Manager.
- */
-
- ptr = (struct _reent *) calloc(1, sizeof(struct _reent));
-
- if (!ptr)
- rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
-
-#ifdef __GNUC__
- /* GCC extension: structure constants */
- *ptr = (struct _reent) _REENT_INIT((*ptr));
-#else
- /*
- * WARNING: THIS IS VERY DEPENDENT ON NEWLIB!!!
- * Last visual check was against newlib 1.8.2 but last known
- * use was against 1.7.0. This is basically an exansion of
- * REENT_INIT() in <sys/reent.h>.
- * NOTE: calloc() takes care of zeroing fields.
- */
- ptr->_stdin = &ptr->__sf[0];
- ptr->_stdout = &ptr->__sf[1];
- ptr->_stderr = &ptr->__sf[2];
- ptr->_current_locale = "C";
- ptr->_new._reent._rand_next = 1;
-#endif
-
- set_newlib_extension( starting_task, ptr );
-}
-
-/*
- * Called for all user TASKS (system tasks are MPCI Receive Server and IDLE)
- */
-
-#ifdef NEED_SETVBUF
-rtems_extension libc_begin_hook(rtems_tcb *current_task)
-{
- setvbuf( stdout, NULL, _IOLBF, BUFSIZ );
-}
-#endif
-
-rtems_extension libc_switch_hook(
- rtems_tcb *current_task,
- rtems_tcb *heir_task
-)
-{
- /*
- * Don't touch the outgoing task if it has been deleted.
- */
-
- if ( !_States_Is_transient( current_task->current_state ) ) {
- set_newlib_extension( current_task, _REENT );
- }
-
- _REENT = (struct _reent *) get_newlib_extension( heir_task );
-}
-
-/*
- * Function: libc_delete_hook
- * Created: 94/12/10
- *
- * Description:
- * Called when a task is deleted.
- * Must restore the new lib reentrancy state for the new current
- * task.
- *
- * Parameters:
- *
- *
- * Returns:
- *
- *
- * Side Effects:
- *
- * Notes:
- *
- *
- * Deficiencies/ToDo:
- *
- *
- */
-
-rtems_extension libc_delete_hook(
- rtems_tcb *current_task,
- rtems_tcb *deleted_task
-)
-{
- struct _reent *ptr;
-
- /*
- * The reentrancy structure was allocated by newlib using malloc()
- */
-
- if (current_task == deleted_task) {
- ptr = _REENT;
- } else {
- ptr = (struct _reent *) get_newlib_extension( deleted_task );
- }
-
- /* if (ptr) */
- if (ptr && ptr != &libc_global_reent) {
- _wrapup_reent(ptr);
- _reclaim_reent(ptr);
- free(ptr);
- }
-
- set_newlib_extension( deleted_task, NULL );
-
- /*
- * Require the switch back to another task to install its own
- */
-
- if ( current_task == deleted_task ) {
- _REENT = 0;
- }
-}
-
-/*
- * Function: libc_init
- * Created: 94/12/10
- *
- * Description:
- * Init libc for CYGNUS newlib
- * Set up _REENT to use our global libc_global_reent.
- * (newlib provides a global of its own, but we prefer our
- * own name for it)
- *
- * If reentrancy is desired (which it should be), then
- * we install the task extension hooks to maintain the
- * newlib reentrancy global variable _REENT on task
- * create, delete, switch, exit, etc.
- *
- * Parameters:
- * reentrant non-zero if reentrant library desired.
- *
- * Returns:
- *
- * Side Effects:
- * installs libc extensions if reentrant.
- *
- * Notes:
- *
- *
- * Deficiencies/ToDo:
- *
- */
-
-void
-libc_init(int reentrant)
-{
- rtems_extensions_table libc_extension;
- rtems_status_code rc;
- rtems_id extension_id;
-
- libc_global_reent = (struct _reent) _REENT_INIT((libc_global_reent));
- _REENT = &libc_global_reent;
-
- if (reentrant) {
- memset(&libc_extension, 0, sizeof(libc_extension));
-
- libc_extension.thread_create = libc_create_hook;
- libc_extension.thread_start = libc_start_hook;
-#ifdef NEED_SETVBUF
- libc_extension.thread_begin = libc_begin_hook;
-#endif
- libc_extension.thread_switch = libc_switch_hook;
- libc_extension.thread_delete = libc_delete_hook;
-
- rc = rtems_extension_create(rtems_build_name('L', 'I', 'B', 'C'),
- &libc_extension, &extension_id);
- if (rc != RTEMS_SUCCESSFUL)
- rtems_fatal_error_occurred( rc );
-
- libc_reentrant = reentrant;
- extension_index = rtems_get_index( extension_id );
- }
-}
-
-/*
- * Function: _exit
- * Created: 94/12/10
- *
- * Description:
- * Called from exit() after it does atexit() processing and stdio fflush's
- *
- * called from bottom of exit() to really delete the task.
- * If we are using reentrant libc, then let the delete extension
- * do all the work, otherwise if a shutdown is in progress,
- * then just do it.
- *
- * Parameters:
- * exit status
- *
- * Returns:
- * does not return
- *
- * Side Effects:
- *
- * Notes:
- *
- *
- * Deficiencies/ToDo:
- *
- *
- */
-
-#include <stdio.h>
-
-#if !defined(RTEMS_UNIX) && !defined(_AM29K)
-void _exit(int status)
-{
- /*
- * We need to do the exit processing on the global reentrancy structure.
- * This has already been done on the per task reentrancy structure
- * associated with this task.
- */
-
- libc_wrapup();
- rtems_shutdown_executive(status);
-}
-
-#else
-
-void exit(int status)
-{
- libc_wrapup();
- rtems_shutdown_executive(status);
-}
-#endif
-
-
-#endif
diff --git a/cpukit/libcsupport/src/no_libc.c b/cpukit/libcsupport/src/no_libc.c
deleted file mode 100644
index 4a7e5d8c27..0000000000
--- a/cpukit/libcsupport/src/no_libc.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * This file contains stubs for the reentrancy hooks when
- * an unknown C library is used.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <rtems.h>
-#if !defined(RTEMS_NEWLIB) && !defined(RTEMS_UNIX)
-
-#include "libcsupport.h"
-
-#include <stdlib.h> /* for free() */
-
-void libc_init(
- int reentrant
-)
-{
-}
-
-void libc_suspend_main(void)
-{
-}
-
-
-void libc_global_exit(
- rtems_unsigned32 code
-)
-{
-}
-
-void _exit(
- int status
-)
-{
-}
-
-#else
-
-/* remove ANSI errors.
- * A program must contain at least one external-declaration
- * (X3.159-1989 p.82,L3).
- */
-void no_libc_dummy_function( void )
-{
-}
-
-#endif
diff --git a/cpukit/libcsupport/src/no_posix.c b/cpukit/libcsupport/src/no_posix.c
deleted file mode 100644
index 9973230e44..0000000000
--- a/cpukit/libcsupport/src/no_posix.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Marginal implementations of some POSIX API routines
- * to be used when POSIX is disabled.
- *
- * + getpid
- * + _getpid_r
- * + kill
- * + _kill_r
- * + __kill
- * + sleep
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-
-#include <unistd.h>
-
-/*
- * These are directly supported (and completely correct) in the posix api.
- */
-
-#if !defined(RTEMS_POSIX_API)
-pid_t getpid(void)
-{
- return 0;
-}
-
-#if defined(RTEMS_NEWLIB)
-#include <sys/reent.h>
-
-pid_t _getpid_r(
- struct _reent *ptr
-)
-{
- return getpid();
-}
-#endif
-
-#endif
-
-#if !defined(RTEMS_POSIX_API)
-int kill( pid_t pid, int sig )
-{
- return 0;
-}
-
-int _kill_r( pid_t pid, int sig )
-{
- return 0;
-}
-#endif
-
-int __kill( pid_t pid, int sig )
-{
- return 0;
-}
-
-
-/*
- * 3.4.3 Delay Process Execution, P1003.1b-1993, p. 81
- *
- * $Id$
- */
-
-#include <time.h>
-#include <unistd.h>
-
-#include <rtems.h>
-
-#if !defined(RTEMS_POSIX_API)
-unsigned int sleep(
- unsigned int seconds
-)
-{
- rtems_status_code status;
- rtems_interval ticks_per_second;
- rtems_interval ticks;
-
- status = rtems_clock_get(
- RTEMS_CLOCK_GET_TICKS_PER_SECOND,
- &ticks_per_second
- );
-
- ticks = seconds * ticks_per_second;
-
- status = rtems_task_wake_after( ticks );
-
- /*
- * Returns the "unslept" amount of time. In RTEMS signals are not
- * interruptable, so tasks really sleep all of the requested time.
- */
-
- return 0;
-}
-#endif
-
diff --git a/cpukit/libcsupport/src/open.c b/cpukit/libcsupport/src/open.c
deleted file mode 100644
index 1203ca9688..0000000000
--- a/cpukit/libcsupport/src/open.c
+++ /dev/null
@@ -1,205 +0,0 @@
-/*
- * open() - POSIX 1003.1 5.3.1 - Open a File
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "libio_.h"
-
-#include <unistd.h>
-
-/*
- * Returns file descriptor on success or -1 and errno set to one of the
- * following:
- *
- * EACCESS - Seach permission is denied on a component of the path prefix,
- * or the file exists and the permissions specified by the
- * flags are denied, or the file does not exist and write
- * permission is denied for the parent directory of the file
- * to be created, or O_TRUNC is specified and write permission
- * is denied.
- * EEXIST - O_CREAT and O_EXCL are set and the named file exists.
- * EINTR - The open( operation was interrupted by a signal.
- * EINVAL - This implementation does not support synchronized IO for this
- * file.
- * EISDIR - The named file is a directory and the flags argument
- * specified write or read/write access.
- * EMFILE - Too many file descriptors are in used by this process.
- * ENAMETOOLONG -
- * The length of the path exceeds PATH_MAX or a pathname
- * component is longer than NAME_MAX while POSIX_NO_TRUNC
- * is in effect.
- * ENFILE - Too many files are open in the system.
- * ENOENT - O_CREAT is not set and and the anmed file does not exist,
- * or O_CREAT is set and eitehr the path prefix does not exist
- * or the path argument points to an empty string.
- * ENOSPC - The directory or file system that would contain the new file
- * cannot be extended.
- * ENOTDIR - A component of the path prefix is not a directory.
- * ENXIO - O_NONBLOCK is set, the named file is a FIFO, O_WRONLY is
- * set, and no process has the file open for reading.
- * EROFS - The named file resides on a read-only file system and either
- * O_WRONLY, O_RDWR, O_CREAT (if the file does not exist), or
- * O_TRUNC is set in the flags argument.
- */
-
-int open(
- const char *pathname,
- int flags,
- ...
-)
-{
- va_list ap;
- int mode;
- int rc;
- rtems_libio_t *iop = 0;
- int status;
- rtems_filesystem_location_info_t loc;
- int eval_flags;
-
-
- /*
- * Set the Evaluation flags
- */
-
- eval_flags = 0;
- status = flags + 1;
- if ( ( status & _FREAD ) == _FREAD )
- eval_flags |= RTEMS_LIBIO_PERMS_READ;
- if ( ( status & _FWRITE ) == _FWRITE )
- eval_flags |= RTEMS_LIBIO_PERMS_WRITE;
-
-
- va_start(ap, flags);
-
- mode = va_arg( ap, int );
-
- /*
- * NOTE: This comment is OBSOLETE. The proper way to do this now
- * would be to support a magic mounted file system.
- *
- * Additional external I/O handlers would be supported by adding
- * code to pick apart the pathname appropriately. The networking
- * code does not require changes here since network file
- * descriptors are obtained using socket(), not open().
- */
-
- /* allocate a file control block */
- iop = rtems_libio_allocate();
- if ( iop == 0 ) {
- rc = ENFILE;
- goto done;
- }
-
- /*
- * See if the file exists.
- */
-
- status = rtems_filesystem_evaluate_path(
- pathname, eval_flags, &loc, TRUE );
-
- if ( status == -1 ) {
- if ( errno != ENOENT ) {
- rc = errno;
- goto done;
- }
-
- /* If the file does not exist and we are not trying to create it--> error */
- if ( !(flags & O_CREAT) ) {
- rc = ENOENT;
- goto done;
- }
-
- /* Create the node for the new regular file */
- rc = mknod( pathname, S_IFREG | mode, 0LL );
- if ( rc ) {
- rc = errno;
- goto done;
- }
-
- /* Sanity check to see if the file name exists after the mknod() */
- status = rtems_filesystem_evaluate_path( pathname, 0x0, &loc, TRUE );
- if ( status != 0 ) { /* The file did not exist */
- rc = EACCES;
- goto done;
- }
-
- } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
- /* We were trying to create a file that already exists */
- rc = EEXIST;
- goto done;
- }
-
- /*
- * Fill in the file control block based on the loc structure
- * returned by successful path evaluation.
- */
-
- iop->offset = 0;
- iop->handlers = loc.handlers;
- iop->file_info = loc.node_access;
- iop->flags |= rtems_libio_fcntl_flags( flags );
- iop->pathinfo = loc;
-
- if ( !iop->handlers->open ) {
- rc = ENOTSUP;
- goto done;
- }
-
- rc = (*iop->handlers->open)( iop, pathname, flags, mode );
- if ( rc )
- goto done;
-
- /*
- * Optionally truncate the file.
- */
-
- if ( (flags & O_TRUNC) == O_TRUNC ) {
- rc = ftruncate( iop - rtems_libio_iops, 0 );
- }
-
- /*
- * Single exit and clean up path.
- */
-
-done:
- va_end(ap);
-
- if ( rc ) {
- if ( iop )
- rtems_libio_free( iop );
- set_errno_and_return_minus_one( rc );
- }
-
- rtems_filesystem_freenode( &loc );
-
- return iop - rtems_libio_iops;
-}
-
-/*
- * _open_r
- *
- * This is the Newlib dependent reentrant version of open().
- */
-
-#if defined(RTEMS_NEWLIB)
-
-#include <reent.h>
-
-int _open_r(
- struct _reent *ptr,
- const char *buf,
- int flags,
- int mode
-)
-{
- return open( buf, flags, mode );
-}
-#endif
diff --git a/cpukit/libcsupport/src/opendir.c b/cpukit/libcsupport/src/opendir.c
deleted file mode 100644
index f0e9488684..0000000000
--- a/cpukit/libcsupport/src/opendir.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * opendir() - POSIX 1003.1b - XXX
- *
- * This was copied from Newlib 1.8.0.
- *
- *
- * Copyright (c) 1983 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)opendir.c 5.11 (Berkeley) 2/23/91";
-#endif /* LIBC_SCCS and not lint */
-
-#include <dirent.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-/*
- * open a directory.
- */
-DIR *
-opendir(name)
- const char *name;
-{
- register DIR *dirp;
- register int fd;
-
- if ((fd = open(name, 0)) == -1)
- return NULL;
- if (fcntl(fd, F_SETFD, 1) == -1 ||
- (dirp = (DIR *)malloc(sizeof(DIR))) == NULL) {
- close (fd);
- return NULL;
- }
- /*
- * If CLSIZE is an exact multiple of DIRBLKSIZ, use a CLSIZE
- * buffer that it cluster boundary aligned.
- * Hopefully this can be a big win someday by allowing page trades
- * to user space to be done by getdirentries()
- */
- dirp->dd_buf = malloc (512);
- dirp->dd_len = 512;
-
- if (dirp->dd_buf == NULL) {
- close (fd);
- return NULL;
- }
- dirp->dd_fd = fd;
- dirp->dd_loc = 0;
- dirp->dd_seek = 0;
- /*
- * Set up seek point for rewinddir.
- */
- return dirp;
-}
diff --git a/cpukit/libcsupport/src/pathconf.c b/cpukit/libcsupport/src/pathconf.c
deleted file mode 100644
index 7516ffb965..0000000000
--- a/cpukit/libcsupport/src/pathconf.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * pathconf() - POSIX 1003.1b - 5.7.1 - Configurable Pathname Varables
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <unistd.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-
-long pathconf(
- const char *path,
- int name
-)
-{
- int status;
- int fd;
-
- fd = open( path, O_RDONLY );
- if ( fd == -1 )
- return -1;
-
- status = fpathconf( fd, name );
-
- (void) close( fd );
-
- return status;
-}
diff --git a/cpukit/libcsupport/src/pipe.c b/cpukit/libcsupport/src/pipe.c
deleted file mode 100644
index 45ab89ed95..0000000000
--- a/cpukit/libcsupport/src/pipe.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * pipe() - POSIX 1003.1b 6.1.1 Create an Inter-Process Channel
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-
-int pipe(
- int filsdes[2]
-)
-{
- errno = ENOSYS;
- return -1;
-}
diff --git a/cpukit/libcsupport/src/read.c b/cpukit/libcsupport/src/read.c
deleted file mode 100644
index 80ad9abc42..0000000000
--- a/cpukit/libcsupport/src/read.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * read() - POSIX 1003.1b 6.4.1 - Read From a File
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "libio_.h"
-
-ssize_t read(
- int fd,
- void *buffer,
- size_t count
-)
-{
- int rc; /* XXX change to a size_t when prototype is fixed */
- rtems_libio_t *iop;
-
- rtems_libio_check_fd( fd );
- iop = rtems_libio_iop( fd );
- rtems_libio_check_is_open(iop);
- rtems_libio_check_buffer( buffer );
- rtems_libio_check_count( count );
- rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
-
- /*
- * Now process the read().
- */
-
- if ( !iop->handlers->read )
- set_errno_and_return_minus_one( ENOTSUP );
-
- rc = (*iop->handlers->read)( iop, buffer, count );
-
- if ( rc > 0 )
- iop->offset += rc;
-
- return rc;
-}
-
-/*
- * _read_r
- *
- * This is the Newlib dependent reentrant version of read().
- */
-
-#if defined(RTEMS_NEWLIB)
-
-#include <reent.h>
-
-_ssize_t _read_r(
- struct _reent *ptr,
- int fd,
- void *buf,
- size_t nbytes
-)
-{
- return read( fd, buf, nbytes );
-}
-#endif
diff --git a/cpukit/libcsupport/src/readdir.c b/cpukit/libcsupport/src/readdir.c
deleted file mode 100644
index ec41679511..0000000000
--- a/cpukit/libcsupport/src/readdir.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * readdir() - POSIX 1003.1b - XXX
- *
- * This was copied from Newlib 1.8.0.
- *
- *
- * Copyright (c) 1983 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)readdir.c 5.7 (Berkeley) 6/1/90";
-#endif /* LIBC_SCCS and not lint */
-
-#include <dirent.h>
-
-int getdents(
- int dd_fd,
- char *dd_buf,
- int dd_len
-);
-
-/*
- * get next entry in a directory.
- */
-struct dirent *
-readdir(dirp)
-register DIR *dirp; {
- register struct dirent *dp;
-
- if ( !dirp )
- return NULL;
-
- for (;;) {
- if (dirp->dd_loc == 0) {
- dirp->dd_size = getdents (dirp->dd_fd,
- dirp->dd_buf,
- dirp->dd_len);
-
- if (dirp->dd_size <= 0)
- return NULL;
- }
- if (dirp->dd_loc >= dirp->dd_size) {
- dirp->dd_loc = 0;
- continue;
- }
- dp = (struct dirent *)(dirp->dd_buf + dirp->dd_loc);
- if ((int)dp & 03) /* bogus pointer check */
- return NULL;
- if (dp->d_reclen <= 0 ||
- dp->d_reclen > dirp->dd_len + 1 - dirp->dd_loc)
- return NULL;
- dirp->dd_loc += dp->d_reclen;
- if (dp->d_ino == 0)
- continue;
- return (dp);
- }
-}
diff --git a/cpukit/libcsupport/src/readlink.c b/cpukit/libcsupport/src/readlink.c
deleted file mode 100644
index bec00e5c72..0000000000
--- a/cpukit/libcsupport/src/readlink.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * readlink() - POSIX 1003.1b - X.X.X - XXX
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "libio_.h"
-
-int readlink(
- const char *pathname,
- char *buf,
- int bufsize
-)
-{
- rtems_filesystem_location_info_t loc;
- int result;
-
- if (!buf)
- set_errno_and_return_minus_one( EFAULT );
-
- result = rtems_filesystem_evaluate_path( pathname, 0, &loc, FALSE );
- if ( result != 0 )
- return -1;
-
- if ( !loc.ops->node_type ){
- rtems_filesystem_freenode( &loc );
- set_errno_and_return_minus_one( ENOTSUP );
- }
-
- if ( (*loc.ops->node_type)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
- rtems_filesystem_freenode( &loc );
- set_errno_and_return_minus_one( EINVAL );
- }
-
- if ( !loc.ops->readlink ){
- rtems_filesystem_freenode( &loc );
- set_errno_and_return_minus_one( ENOTSUP );
- }
-
- result = (*loc.ops->readlink)( &loc, buf, bufsize );
-
- rtems_filesystem_freenode( &loc );
-
- return result;
-}
diff --git a/cpukit/libcsupport/src/rewinddir.c b/cpukit/libcsupport/src/rewinddir.c
deleted file mode 100644
index e5c753a183..0000000000
--- a/cpukit/libcsupport/src/rewinddir.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * rewinddir() - POSIX 1003.1b - XXX
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- */
-
-#include <sys/types.h>
-#include <assert.h>
-#include <dirent.h>
-#include <stdio.h>
-#include <errno.h>
-#include <unistd.h>
-
-void rewinddir(
- DIR *dirp
-)
-{
- off_t status;
-
- if ( !dirp )
- return;
-
- status = lseek( dirp->dd_fd, 0, SEEK_SET );
-
- if( status == -1 )
- return;
-
- dirp->dd_loc = 0;
-}
diff --git a/cpukit/libcsupport/src/rmdir.c b/cpukit/libcsupport/src/rmdir.c
deleted file mode 100644
index 521a2e6934..0000000000
--- a/cpukit/libcsupport/src/rmdir.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * rmdir() - POSIX 1003.1b - 5.2.2 - Remove a Directory
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#include <stdlib.h>
-
-#include "libio_.h"
-
-int rmdir(
- const char *pathname
-)
-{
- rtems_filesystem_location_info_t loc;
- int result;
-
- /*
- * Get the node where we wish to go.
- */
-
- result = rtems_filesystem_evaluate_path( pathname, 0, &loc, FALSE );
- if ( result != 0 )
- return -1;
-
- /*
- * Verify you can remove this node as a directory.
- */
-
- if ( !loc.ops->node_type ){
- rtems_filesystem_freenode( &loc );
- set_errno_and_return_minus_one( ENOTSUP );
- }
-
- if ( (*loc.ops->node_type)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){
- rtems_filesystem_freenode( &loc );
- set_errno_and_return_minus_one( ENOTDIR );
- }
-
- /*
- * Use the filesystems rmnod to remove the node.
- */
-
- if ( !loc.handlers->rmnod ){
- rtems_filesystem_freenode( &loc );
- set_errno_and_return_minus_one( ENOTSUP );
- }
-
- result = (*loc.handlers->rmnod)( &loc );
-
- rtems_filesystem_freenode( &loc );
-
- return result;
-}
diff --git a/cpukit/libcsupport/src/scandir.c b/cpukit/libcsupport/src/scandir.c
deleted file mode 100644
index 43c7c51747..0000000000
--- a/cpukit/libcsupport/src/scandir.c
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * scandir() - POSIX 1003.1b - XXX
- *
- * This was copied from Newlib 1.8.0.
- *
- *
- * Copyright (c) 1983 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)scandir.c 5.10 (Berkeley) 2/23/91";
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * Scan the directory dirname calling select to make a list of selected
- * directory entries then sort using qsort and compare routine dcomp.
- * Returns the number of entries and a pointer to a list of pointers to
- * struct dirent (through namelist). Returns -1 if there were any errors.
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <dirent.h>
-#include <stdlib.h>
-#include <string.h>
-
-/*
- * The DIRSIZ macro gives the minimum record length which will hold
- * the directory entry. This requires the amount of space in struct dirent
- * without the d_name field, plus enough space for the name with a terminating
- * null byte (dp->d_namlen+1), rounded up to a 4 byte boundary.
- */
-#undef DIRSIZ
-/*
-#define DIRSIZ(dp) \
- ((sizeof (struct dirent) - (MAXNAMLEN+1)) + (((dp)->d_namlen+1 + 3) &~ 3))
-*/
-
-#define DIRSIZ(dp) \
- ((sizeof (struct dirent) - (NAME_MAX+1)) + (((dp)->d_namlen+1 + 3) &~ 3))
-
-#ifndef __P
-#define __P(args) ()
-#endif
-
-int
-scandir(dirname, namelist, select, dcomp)
- const char *dirname;
- struct dirent ***namelist;
- int (*select) __P((struct dirent *));
- int (*dcomp) __P((const void *, const void *));
-{
- register struct dirent *d, *p, **names;
- register size_t nitems;
- struct stat stb;
- long arraysz;
- DIR *dirp;
-
- if ((dirp = opendir(dirname)) == NULL)
- return(-1);
- if (fstat(dirp->dd_fd, &stb) < 0)
- return(-1);
-
- /*
- * estimate the array size by taking the size of the directory file
- * and dividing it by a multiple of the minimum size entry.
- */
- arraysz = (stb.st_size / 24);
- names = (struct dirent **)malloc(arraysz * sizeof(struct dirent *));
- if (names == NULL)
- return(-1);
-
- nitems = 0;
- while ((d = readdir(dirp)) != NULL) {
- if (select != NULL && !(*select)(d))
- continue; /* just selected names */
- /*
- * Make a minimum size copy of the data
- */
- p = (struct dirent *)malloc(DIRSIZ(d));
- if (p == NULL)
- return(-1);
- p->d_ino = d->d_ino;
- p->d_reclen = d->d_reclen;
- p->d_namlen = d->d_namlen;
- strncpy(p->d_name, d->d_name, p->d_namlen + 1);
- /*
- * Check to make sure the array has space left and
- * realloc the maximum size.
- */
- if (++nitems >= arraysz) {
- if (fstat(dirp->dd_fd, &stb) < 0)
- return(-1); /* just might have grown */
- arraysz = stb.st_size / 12;
- names = (struct dirent **)realloc((char *)names,
- arraysz * sizeof(struct dirent *));
- if (names == NULL)
- return(-1);
- }
- names[nitems-1] = p;
- }
- closedir(dirp);
- if (nitems && dcomp != NULL){
- qsort(names, nitems, sizeof(struct dirent *), dcomp);
- }
- *namelist = names;
- return(nitems);
-}
-
-/*
- * Alphabetic order comparison routine for those who want it.
- */
-int
-alphasort(d1, d2)
- const void *d1;
- const void *d2;
-{
- return(strcmp((*(struct dirent **)d1)->d_name,
- (*(struct dirent **)d2)->d_name));
-}
diff --git a/cpukit/libcsupport/src/seekdir.c b/cpukit/libcsupport/src/seekdir.c
deleted file mode 100644
index eeb9c3209f..0000000000
--- a/cpukit/libcsupport/src/seekdir.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * seekdir() - POSIX 1003.1b - XXX
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- */
-
-#include <sys/param.h>
-#include <assert.h>
-#include <dirent.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <errno.h>
-
-void seekdir(
- DIR *dirp,
- long loc
-)
-{
- off_t status;
-
- if ( !dirp )
- return;
-
- status = lseek( dirp->dd_fd, loc, SEEK_SET );
-
- /*
- * This is not a nice way to error out, but we have no choice here.
- */
-
- if ( status == -1 )
- return;
-
- dirp->dd_loc = 0;
-}
diff --git a/cpukit/libcsupport/src/stat.c b/cpukit/libcsupport/src/stat.c
deleted file mode 100644
index 688333ac2e..0000000000
--- a/cpukit/libcsupport/src/stat.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * stat() - POSIX 1003.1b 5.6.2 - Get File Status
- *
- * Reused from lstat().
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-/*
- * lstat() and stat() share the same implementation with a minor
- * difference on how links are evaluated.
- */
-
-#ifndef _STAT_NAME
-#define _STAT_NAME stat
-#define _STAT_R_NAME _stat_r
-#define _STAT_FOLLOW_LINKS TRUE
-#endif
-
-
-#include <rtems.h>
-
-#if !defined(RTEMS_UNIX)
-
-#include <rtems/libio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-
-#include "libio_.h"
-
-int _STAT_NAME(
- const char *path,
- struct stat *buf
-)
-{
- int status;
- rtems_filesystem_location_info_t loc;
-
- /*
- * Check to see if we were passed a valid pointer.
- */
-
- if ( !buf )
- set_errno_and_return_minus_one( EFAULT );
-
- status = rtems_filesystem_evaluate_path( path, 0, &loc, _STAT_FOLLOW_LINKS );
- if ( status != 0 )
- return -1;
-
- if ( !loc.handlers->fstat ){
- rtems_filesystem_freenode( &loc );
- set_errno_and_return_minus_one( ENOTSUP );
- }
-
- /*
- * Zero out the stat structure so the various support
- * versions of stat don't have to.
- */
-
- memset( buf, 0, sizeof(struct stat) );
-
- status = (*loc.handlers->fstat)( &loc, buf );
-
- rtems_filesystem_freenode( &loc );
-
- return status;
-}
-#endif
-
-/*
- * _stat_r, _lstat_r
- *
- * This is the Newlib dependent reentrant version of stat() and lstat().
- */
-
-#if defined(RTEMS_NEWLIB)
-
-#include <reent.h>
-
-int _STAT_R_NAME(
- struct _reent *ptr,
- const char *path,
- struct stat *buf
-)
-{
- return _STAT_NAME( path, buf );
-}
-#endif
diff --git a/cpukit/libcsupport/src/symlink.c b/cpukit/libcsupport/src/symlink.c
deleted file mode 100644
index 6a31a25bad..0000000000
--- a/cpukit/libcsupport/src/symlink.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * symlink() - POSIX 1003.1b - X.X.X - XXX
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "libio_.h"
-
-int symlink(
- const char *actualpath,
- const char *sympath
-)
-{
- rtems_filesystem_location_info_t loc;
- int i;
- const char *name_start;
- int result;
-
- rtems_filesystem_get_start_loc( sympath, &i, &loc );
- result = (*loc.ops->evalformake)( &sympath[i], &loc, &name_start );
- if ( result != 0 )
- return -1;
-
- result = (*loc.ops->symlink)( &loc, actualpath, name_start);
-
- rtems_filesystem_freenode( &loc );
-
- return result;
-}
-
diff --git a/cpukit/libcsupport/src/tcdrain.c b/cpukit/libcsupport/src/tcdrain.c
deleted file mode 100644
index 0c89a58115..0000000000
--- a/cpukit/libcsupport/src/tcdrain.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * tcdrain() - POSIX 1003.1b 7.2.2 - Line Control Functions
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#if defined(RTEMS_NEWLIB)
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <termios.h>
-/* #include <sys/ioctl.h> */
-
-int ioctl();
-
-#include <rtems/libio.h>
-
-int tcdrain(
- int fd
-)
-{
- return ioctl( fd, RTEMS_IO_TCDRAIN, 0 );
-}
-
-#endif
diff --git a/cpukit/libcsupport/src/tcflow.c b/cpukit/libcsupport/src/tcflow.c
deleted file mode 100644
index 723013c898..0000000000
--- a/cpukit/libcsupport/src/tcflow.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * tcflow() - POSIX 1003.1b 7.2.2 - Line Control Functions
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#if defined(RTEMS_NEWLIB)
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <termios.h>
-/* #include <sys/ioctl.h> */
-
-int ioctl();
-
-#include <rtems/libio.h>
-
-int tcflow (int fd, int action)
-{
- return 0;
-}
-
-#endif
diff --git a/cpukit/libcsupport/src/tcflush.c b/cpukit/libcsupport/src/tcflush.c
deleted file mode 100644
index 7d2f119aec..0000000000
--- a/cpukit/libcsupport/src/tcflush.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * tcflush() - POSIX 1003.1b 7.2.2 - Line Control Functions
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#if defined(RTEMS_NEWLIB)
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <termios.h>
-/* #include <sys/ioctl.h> */
-
-int ioctl();
-
-#include <rtems/libio.h>
-
-int tcflush (int fd, int queue)
-{
- return 0;
-}
-
-#endif
diff --git a/cpukit/libcsupport/src/tcgetattr.c b/cpukit/libcsupport/src/tcgetattr.c
deleted file mode 100644
index 388282d37a..0000000000
--- a/cpukit/libcsupport/src/tcgetattr.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * tcgetattr() - POSIX 1003.1b 7.2.1 - Get and Set State
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#if defined(RTEMS_NEWLIB)
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <termios.h>
-/* #include <sys/ioctl.h> */
-
-int ioctl();
-
-#include <rtems/libio.h>
-
-int tcgetattr(
- int fd,
- struct termios *tp
-)
-{
- return ioctl( fd, RTEMS_IO_GET_ATTRIBUTES, tp );
-}
-#endif
diff --git a/cpukit/libcsupport/src/tcgetprgrp.c b/cpukit/libcsupport/src/tcgetprgrp.c
deleted file mode 100644
index 3f34b6ee13..0000000000
--- a/cpukit/libcsupport/src/tcgetprgrp.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * tcgetprgrp() - POSIX 1003.1b 7.2.3 - Get Foreground Process Group ID
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#if defined(RTEMS_NEWLIB)
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <termios.h>
-/* #include <sys/ioctl.h> */
-
-int ioctl();
-
-#include <rtems/libio.h>
-
-pid_t tcgetprgrp(int fd)
-{
- return getpid();
-}
-
-#endif
diff --git a/cpukit/libcsupport/src/tcsendbreak.c b/cpukit/libcsupport/src/tcsendbreak.c
deleted file mode 100644
index b367d26ece..0000000000
--- a/cpukit/libcsupport/src/tcsendbreak.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * tcsendbreak() - POSIX 1003.1b 7.2.2 - Line Control Functions
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#if defined(RTEMS_NEWLIB)
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <termios.h>
-/* #include <sys/ioctl.h> */
-
-int ioctl();
-
-#include <rtems/libio.h>
-
-int tcsendbreak ( int fd, int duration )
-{
- return 0;
-}
-
-#endif
diff --git a/cpukit/libcsupport/src/tcsetattr.c b/cpukit/libcsupport/src/tcsetattr.c
deleted file mode 100644
index 466d2c35fb..0000000000
--- a/cpukit/libcsupport/src/tcsetattr.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * tcsetattr() - POSIX 1003.1b 7.2.1 - Get and Set State
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#if defined(RTEMS_NEWLIB)
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <termios.h>
-/* #include <sys/ioctl.h> */
-
-int ioctl();
-
-#include <rtems/libio.h>
-#include "libio_.h"
-
-int tcsetattr(
- int fd,
- int opt,
- struct termios *tp
-)
-{
- switch (opt) {
- default:
- set_errno_and_return_minus_one( ENOTSUP );
-
- case TCSADRAIN:
- if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0)
- return -1;
- /*
- * Fall through to....
- */
- case TCSANOW:
- return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
- }
-}
-#endif
diff --git a/cpukit/libcsupport/src/tcsetpgrp.c b/cpukit/libcsupport/src/tcsetpgrp.c
deleted file mode 100644
index fa54df3b5f..0000000000
--- a/cpukit/libcsupport/src/tcsetpgrp.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * tcsetprgrp() - POSIX 1003.1b 7.2.4 - Set Foreground Process Group ID
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#if defined(RTEMS_NEWLIB)
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <termios.h>
-/* #include <sys/ioctl.h> */
-
-int ioctl();
-
-#include <rtems/libio.h>
-
-int tcsetprgrp(int fd, pid_t pid)
-{
- return 0;
-}
-
-#endif
diff --git a/cpukit/libcsupport/src/telldir.c b/cpukit/libcsupport/src/telldir.c
deleted file mode 100644
index 521138d648..0000000000
--- a/cpukit/libcsupport/src/telldir.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * telldir() - XXX
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- */
-
-#include <sys/param.h>
-#include <assert.h>
-#include <dirent.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <errno.h>
-
-#include "libio_.h"
-
-
-long telldir(
- DIR *dirp
-)
-{
- rtems_libio_t *iop;
-
- if ( !dirp )
- set_errno_and_return_minus_one( EBADF );
-
- /*
- * Get the file control block structure associated with the
- * file descriptor
- */
-
- iop = rtems_libio_iop( dirp->dd_fd );
-
- if (iop == NULL)
- assert(0);
-
- return (long)( iop->offset );
-}
diff --git a/cpukit/libcsupport/src/termios.c b/cpukit/libcsupport/src/termios.c
deleted file mode 100644
index 6d334ecd23..0000000000
--- a/cpukit/libcsupport/src/termios.c
+++ /dev/null
@@ -1,1131 +0,0 @@
-/*
- * TERMIOS serial line support
- *
- * Author:
- * W. Eric Norum
- * Saskatchewan Accelerator Laboratory
- * University of Saskatchewan
- * Saskatoon, Saskatchewan, CANADA
- * eric@skatter.usask.ca
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include <rtems/libio.h>
-#include <ctype.h>
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <termios.h>
-#include <unistd.h>
-
-/*
- * FreeBSD does not support a full POSIX termios so we have to help it out
- */
-
-
-#if defined(__FreeBSD__)
-#define XTABS 0
-#define ONLRET 0
-#define ONOCR 0
-#define TABDLY 0
-#define OLCUC 0
-#define ILCUC 0
-#define OCRNL 0
-#define IUCLC 0
-#endif
-
-/*
- * The size of the cooked buffer
- */
-#define CBUFSIZE 256
-
-/*
- * The sizes of the raw message buffers.
- * On most architectures it is quite a bit more
- * efficient if these are powers of two.
- */
-#define RAW_INPUT_BUFFER_SIZE 128
-#define RAW_OUTPUT_BUFFER_SIZE 64
-
-/*
- * Variables associated with each termios instance.
- * One structure for each hardware I/O device.
- */
-struct rtems_termios_tty {
- /*
- * Linked-list of active TERMIOS devices
- */
- struct rtems_termios_tty *forw;
- struct rtems_termios_tty *back;
-
- /*
- * How many times has this device been opened
- */
- int refcount;
-
- /*
- * This device
- */
- rtems_device_major_number major;
- rtems_device_major_number minor;
-
- /*
- * Mutual-exclusion semaphores
- */
- rtems_id isem;
- rtems_id osem;
-
- /*
- * The canonical (cooked) character buffer
- */
- char cbuf[CBUFSIZE];
- int ccount;
- int cindex;
-
- /*
- * Keep track of cursor (printhead) position
- */
- int column;
- int read_start_column;
-
- /*
- * The ioctl settings
- */
- struct termios termios;
- rtems_interval vtimeTicks;
-
- /*
- * Raw input character buffer
- */
- volatile char rawInBuf[RAW_INPUT_BUFFER_SIZE];
- volatile unsigned int rawInBufHead;
- volatile unsigned int rawInBufTail;
- rtems_id rawInBufSemaphore;
- rtems_unsigned32 rawInBufSemaphoreOptions;
- rtems_interval rawInBufSemaphoreTimeout;
- rtems_interval rawInBufSemaphoreFirstTimeout;
- unsigned int rawInBufDropped; /* Statistics */
-
- /*
- * Raw output character buffer
- */
- volatile char rawOutBuf[RAW_OUTPUT_BUFFER_SIZE];
- volatile unsigned int rawOutBufHead;
- volatile unsigned int rawOutBufTail;
- rtems_id rawOutBufSemaphore;
- enum {rob_idle, rob_busy, rob_wait } rawOutBufState;
-
- /*
- * Callbacks to device-specific routines
- */
- rtems_termios_callbacks device;
- volatile unsigned int flow_ctrl;
- unsigned int lowwater,highwater;
-};
-
-/* fields for "flow_ctrl" status */
-#define FL_IREQXOF 1 /* input queue requests stop of incoming data */
-#define FL_ISNTXOF 2 /* XOFF has been sent to other side of line */
-#define FL_IRTSOFF 4 /* RTS has been turned off for other side.. */
-
-#define FL_ORCVXOF 0x10 /* XOFF has been received */
-#define FL_OSTOP 0x20 /* output has been stopped due to XOFF */
-
-#define FL_MDRTS 0x100 /* input controlled with RTS/CTS handshake */
-#define FL_MDXON 0x200 /* input controlled with XON/XOFF protocol */
-#define FL_MDXOF 0x400 /* output controlled with XON/XOFF protocol */
-
-extern struct rtems_termios_tty *rtems_termios_ttyHead;
-extern struct rtems_termios_tty *rtems_termios_ttyTail;
-extern rtems_id rtems_termios_ttyMutex;
-
-/*
- * Open a termios device
- */
-rtems_status_code
-rtems_termios_open (
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void *arg,
- const rtems_termios_callbacks *callbacks
- )
-{
- rtems_status_code sc;
- rtems_libio_open_close_args_t *args = arg;
- struct rtems_termios_tty *tty;
-
- /*
- * See if the device has already been opened
- */
- sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
- if (sc != RTEMS_SUCCESSFUL)
- return sc;
- for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
- if ((tty->major == major) && (tty->minor == minor))
- break;
- }
- if (tty == NULL) {
- static char c = 'a';
-
- /*
- * Create a new device
- */
- tty = calloc (1, sizeof (struct rtems_termios_tty));
- if (tty == NULL) {
- rtems_semaphore_release (rtems_termios_ttyMutex);
- return RTEMS_NO_MEMORY;
- }
- tty->forw = rtems_termios_ttyHead;
- rtems_termios_ttyHead = tty;
- if (rtems_termios_ttyTail == NULL)
- rtems_termios_ttyTail = tty;
-
- tty->minor = minor;
- tty->major = major;
-
- /*
- * Set up mutex semaphores
- */
- sc = rtems_semaphore_create (
- rtems_build_name ('T', 'R', 'i', c),
- 1,
- RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
- RTEMS_NO_PRIORITY,
- &tty->isem);
- if (sc != RTEMS_SUCCESSFUL)
- rtems_fatal_error_occurred (sc);
- sc = rtems_semaphore_create (
- rtems_build_name ('T', 'R', 'o', c),
- 1,
- RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
- RTEMS_NO_PRIORITY,
- &tty->osem);
- if (sc != RTEMS_SUCCESSFUL)
- rtems_fatal_error_occurred (sc);
- sc = rtems_semaphore_create (
- rtems_build_name ('T', 'R', 'x', c),
- 0,
- RTEMS_COUNTING_SEMAPHORE | RTEMS_PRIORITY,
- RTEMS_NO_PRIORITY,
- &tty->rawOutBufSemaphore);
- if (sc != RTEMS_SUCCESSFUL)
- rtems_fatal_error_occurred (sc);
- tty->rawOutBufState = rob_idle;
-
- /*
- * Set callbacks
- */
- tty->device = *callbacks;
- if (!tty->device.pollRead) {
- sc = rtems_semaphore_create (
- rtems_build_name ('T', 'R', 'r', c),
- 0,
- RTEMS_COUNTING_SEMAPHORE | RTEMS_PRIORITY,
- RTEMS_NO_PRIORITY,
- &tty->rawInBufSemaphore);
- if (sc != RTEMS_SUCCESSFUL)
- rtems_fatal_error_occurred (sc);
- }
-
- /*
- * Set default parameters
- */
- tty->termios.c_iflag = BRKINT | ICRNL | IMAXBEL;
- tty->termios.c_oflag = OPOST | ONLCR | XTABS;
- tty->termios.c_cflag = B9600 | CS8 | CREAD;
- tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
-
- tty->termios.c_cc[VINTR] = '\003';
- tty->termios.c_cc[VQUIT] = '\034';
- tty->termios.c_cc[VERASE] = '\177';
- tty->termios.c_cc[VKILL] = '\025';
- tty->termios.c_cc[VEOF] = '\004';
- tty->termios.c_cc[VEOL] = '\000';
- tty->termios.c_cc[VEOL2] = '\000';
- tty->termios.c_cc[VSTART] = '\021';
- tty->termios.c_cc[VSTOP] = '\023';
- tty->termios.c_cc[VSUSP] = '\032';
- tty->termios.c_cc[VREPRINT] = '\022';
- tty->termios.c_cc[VDISCARD] = '\017';
- tty->termios.c_cc[VWERASE] = '\027';
- tty->termios.c_cc[VLNEXT] = '\026';
-
- /* setup flow control mode, clear flow control flags */
- tty->flow_ctrl = FL_MDXON;
- /*
- * set low/highwater mark for XON/XOFF support
- */
- tty->lowwater = RAW_INPUT_BUFFER_SIZE * 1/2;
- tty->highwater = RAW_INPUT_BUFFER_SIZE * 3/4;
- /*
- * Bump name characer
- */
- if (c++ == 'z')
- c = 'a';
-
- }
- args->iop->data1 = tty;
- if (!tty->refcount++ && tty->device.firstOpen)
- (*tty->device.firstOpen)(major, minor, arg);
- rtems_semaphore_release (rtems_termios_ttyMutex);
- return RTEMS_SUCCESSFUL;
-}
-
-/*
- * Drain output queue
- */
-static void
-drainOutput (struct rtems_termios_tty *tty)
-{
- rtems_interrupt_level level;
- rtems_status_code sc;
-
- if (tty->device.outputUsesInterrupts) {
- rtems_interrupt_disable (level);
- while (tty->rawOutBufTail != tty->rawOutBufHead) {
- tty->rawOutBufState = rob_wait;
- rtems_interrupt_enable (level);
- sc = rtems_semaphore_obtain (tty->rawOutBufSemaphore,
- RTEMS_WAIT,
- RTEMS_NO_TIMEOUT);
- if (sc != RTEMS_SUCCESSFUL)
- rtems_fatal_error_occurred (sc);
- rtems_interrupt_disable (level);
- }
- rtems_interrupt_enable (level);
- }
-}
-
-rtems_status_code
-rtems_termios_close (void *arg)
-{
- rtems_libio_open_close_args_t *args = arg;
- struct rtems_termios_tty *tty = args->iop->data1;
- rtems_status_code sc;
-
- sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
- if (sc != RTEMS_SUCCESSFUL)
- rtems_fatal_error_occurred (sc);
- if (--tty->refcount == 0) {
- drainOutput (tty);
- if (tty->device.lastClose)
- (*tty->device.lastClose)(tty->major, tty->minor, arg);
- if (tty->forw == NULL)
- rtems_termios_ttyTail = tty->back;
- else
- tty->forw->back = tty->back;
- if (tty->back == NULL)
- rtems_termios_ttyHead = tty->forw;
- else
- tty->back->forw = tty->forw;
- rtems_semaphore_delete (tty->isem);
- rtems_semaphore_delete (tty->osem);
- rtems_semaphore_delete (tty->rawOutBufSemaphore);
- if (!tty->device.pollRead)
- rtems_semaphore_delete (tty->rawInBufSemaphore);
- free (tty);
- }
- rtems_semaphore_release (rtems_termios_ttyMutex);
- return RTEMS_SUCCESSFUL;
-}
-
-static void
-termios_set_flowctrl(struct rtems_termios_tty *tty)
-{
- rtems_interrupt_level level;
- /*
- * check for flow control options to be switched off
- */
-
- /* check for outgoing XON/XOFF flow control switched off */
- if (( tty->flow_ctrl & FL_MDXON) &&
- !(tty->termios.c_iflag & IXON)) {
- /* clear related flags in flow_ctrl */
- tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF);
-
- /* has output been stopped due to received XOFF? */
- if (tty->flow_ctrl & FL_OSTOP) {
- /* disable interrupts */
- rtems_interrupt_disable(level);
- tty->flow_ctrl &= ~FL_OSTOP;
- /* check for chars in output buffer (or rob_state?) */
- if (tty->rawOutBufState != rob_idle) {
- /* if chars available, call write function... */
- (*tty->device.write)(tty->minor,
- (char *)&tty->rawOutBuf[tty->rawOutBufTail], 1);
- }
- /* reenable interrupts */
- rtems_interrupt_enable(level);
- }
- }
- /* check for incoming XON/XOFF flow control switched off */
- if (( tty->flow_ctrl & FL_MDXOF) &&
- !(tty->termios.c_iflag & IXOFF)) {
- /* clear related flags in flow_ctrl */
- tty->flow_ctrl &= ~(FL_MDXOF);
- /* FIXME: what happens, if we had sent XOFF but not yet XON? */
- tty->flow_ctrl &= ~(FL_ISNTXOF);
- }
-
- /* check for incoming RTS/CTS flow control switched off */
- if (( tty->flow_ctrl & FL_MDRTS) &&
- !(tty->termios.c_cflag & CRTSCTS)) {
- /* clear related flags in flow_ctrl */
- tty->flow_ctrl &= ~(FL_MDRTS);
-
- /* restart remote Tx, if it was stopped */
- if ((tty->flow_ctrl & FL_IRTSOFF) &&
- (tty->device.startRemoteTx != NULL)) {
- tty->device.startRemoteTx(tty->minor);
- }
- tty->flow_ctrl &= ~(FL_IRTSOFF);
- }
-
- /*
- * check for flow control options to be switched on
- */
- /* check for incoming RTS/CTS flow control switched on */
- if (tty->termios.c_cflag & CRTSCTS) {
- tty->flow_ctrl |= FL_MDRTS;
- }
- /* check for incoming XON/XOF flow control switched on */
- if (tty->termios.c_iflag & IXOFF) {
- tty->flow_ctrl |= FL_MDXOF;
- }
- /* check for outgoing XON/XOF flow control switched on */
- if (tty->termios.c_iflag & IXON) {
- tty->flow_ctrl |= FL_MDXON;
- }
-}
-
-rtems_status_code
-rtems_termios_ioctl (void *arg)
-{
- rtems_libio_ioctl_args_t *args = arg;
- struct rtems_termios_tty *tty = args->iop->data1;
- rtems_status_code sc;
-
- args->ioctl_return = 0;
- sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
- if (sc != RTEMS_SUCCESSFUL) {
- args->ioctl_return = sc;
- return sc;
- }
- switch (args->command) {
- default:
- sc = RTEMS_INVALID_NUMBER;
- break;
-
- case RTEMS_IO_GET_ATTRIBUTES:
- *(struct termios *)args->buffer = tty->termios;
- break;
-
- case RTEMS_IO_SET_ATTRIBUTES:
- tty->termios = *(struct termios *)args->buffer;
-
- /* check for and process change in flow control options */
- termios_set_flowctrl(tty);
-
- if (tty->termios.c_lflag & ICANON) {
- tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
- tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
- tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
- }
- else {
- rtems_interval ticksPerSecond;
- rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticksPerSecond);
- tty->vtimeTicks = tty->termios.c_cc[VTIME] * ticksPerSecond / 10;
- if (tty->termios.c_cc[VTIME]) {
- tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
- tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
- if (tty->termios.c_cc[VMIN])
- tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
- else
- tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
- }
- else {
- if (tty->termios.c_cc[VMIN]) {
- tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
- tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
- tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
- }
- else {
- tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
- }
- }
- }
- if (tty->device.setAttributes)
- (*tty->device.setAttributes)(tty->minor, &tty->termios);
- break;
-
- case RTEMS_IO_TCDRAIN:
- drainOutput (tty);
- break;
- }
- rtems_semaphore_release (tty->osem);
- args->ioctl_return = sc;
- return sc;
-}
-
-/*
- * Send characters to device-specific code
- */
-static void
-osend (const char *buf, int len, struct rtems_termios_tty *tty)
-{
- unsigned int newHead;
- rtems_interrupt_level level;
- rtems_status_code sc;
-
- if (!tty->device.outputUsesInterrupts) {
- (*tty->device.write)(tty->minor, buf, len);
- return;
- }
- newHead = tty->rawOutBufHead;
- while (len) {
- /*
- * Performance improvement could be made here.
- * Copy multiple bytes to raw buffer:
- * if (len > 1) && (space to buffer end, or tail > 1)
- * ncopy = MIN (len, space to buffer end or tail)
- * memcpy (raw buffer, buf, ncopy)
- * buf += ncopy
- * len -= ncopy
- *
- * To minimize latency, the memcpy should be done
- * with interrupts enabled.
- */
- newHead = (newHead + 1) % RAW_OUTPUT_BUFFER_SIZE;
- rtems_interrupt_disable (level);
- while (newHead == tty->rawOutBufTail) {
- tty->rawOutBufState = rob_wait;
- rtems_interrupt_enable (level);
- sc = rtems_semaphore_obtain (tty->rawOutBufSemaphore,
- RTEMS_WAIT,
- RTEMS_NO_TIMEOUT);
- if (sc != RTEMS_SUCCESSFUL)
- rtems_fatal_error_occurred (sc);
- rtems_interrupt_disable (level);
- }
- tty->rawOutBuf[tty->rawOutBufHead] = *buf++;
- tty->rawOutBufHead = newHead;
- if (tty->rawOutBufState == rob_idle) {
- /* check, whether XOFF has been received */
- if (!(tty->flow_ctrl & FL_ORCVXOF)) {
- (*tty->device.write)(tty->minor,
- (char *)&tty->rawOutBuf[tty->rawOutBufTail],1);
- }
- else {
- /* remember that output has been stopped due to flow ctrl*/
- tty->flow_ctrl |= FL_OSTOP;
- }
- tty->rawOutBufState = rob_busy;
- }
- rtems_interrupt_enable (level);
- len--;
- }
-}
-
-/*
- * Handle output processing
- */
-static void
-oproc (unsigned char c, struct rtems_termios_tty *tty)
-{
- int i;
-
- if (tty->termios.c_oflag & OPOST) {
- switch (c) {
- case '\n':
- if (tty->termios.c_oflag & ONLRET)
- tty->column = 0;
- if (tty->termios.c_oflag & ONLCR) {
- osend ("\r", 1, tty);
- tty->column = 0;
- }
- break;
-
- case '\r':
- if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
- return;
- if (tty->termios.c_oflag & OCRNL) {
- c = '\n';
- if (tty->termios.c_oflag & ONLRET)
- tty->column = 0;
- break;
- }
- tty->column = 0;
- break;
-
- case '\t':
- i = 8 - (tty->column & 7);
- if ((tty->termios.c_oflag & TABDLY) == XTABS) {
- tty->column += i;
- osend ( " ", i, tty);
- return;
- }
- tty->column += i;
- break;
-
- case '\b':
- if (tty->column > 0)
- tty->column--;
- break;
-
- default:
- if (tty->termios.c_oflag & OLCUC)
- c = toupper(c);
- if (!iscntrl(c))
- tty->column++;
- break;
- }
- }
- osend (&c, 1, tty);
-}
-
-rtems_status_code
-rtems_termios_write (void *arg)
-{
- rtems_libio_rw_args_t *args = arg;
- struct rtems_termios_tty *tty = args->iop->data1;
- rtems_status_code sc;
-
- sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
- if (sc != RTEMS_SUCCESSFUL)
- return sc;
- if (tty->termios.c_oflag & OPOST) {
- unsigned32 count = args->count;
- unsigned8 *buffer = args->buffer;
- while (count--)
- oproc (*buffer++, tty);
- args->bytes_moved = args->count;
- }
- else {
- osend (args->buffer, args->count, tty);
- args->bytes_moved = args->count;
- }
- rtems_semaphore_release (tty->osem);
- return sc;
-}
-
-/*
- * Echo a typed character
- */
-static void
-echo (unsigned char c, struct rtems_termios_tty *tty)
-{
- if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
- char echobuf[2];
-
- echobuf[0] = '^';
- echobuf[1] = c ^ 0x40;
- osend (echobuf, 2, tty);
- tty->column += 2;
- }
- else {
- oproc (c, tty);
- }
-}
-
-/*
- * Erase a character or line
- * FIXME: Needs support for WERASE and ECHOPRT.
- * FIXME: Some of the tests should check for IEXTEN, too.
- */
-static void
-erase (struct rtems_termios_tty *tty, int lineFlag)
-{
- if (tty->ccount == 0)
- return;
- if (lineFlag) {
- if (!(tty->termios.c_lflag & ECHO)) {
- tty->ccount = 0;
- return;
- }
- if (!(tty->termios.c_lflag & ECHOE)) {
- tty->ccount = 0;
- echo (tty->termios.c_cc[VKILL], tty);
- if (tty->termios.c_lflag & ECHOK)
- echo ('\n', tty);
- return;
- }
- }
- while (tty->ccount) {
- unsigned char c = tty->cbuf[--tty->ccount];
-
- if (tty->termios.c_lflag & ECHO) {
- if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
- echo (tty->termios.c_cc[VERASE], tty);
- }
- else if (c == '\t') {
- int col = tty->read_start_column;
- int i = 0;
-
- /*
- * Find the character before the tab
- */
- while (i != tty->ccount) {
- c = tty->cbuf[i++];
- if (c == '\t') {
- col = (col | 7) + 1;
- }
- else if (iscntrl (c)) {
- if (tty->termios.c_lflag & ECHOCTL)
- col += 2;
- }
- else {
- col++;
- }
- }
-
- /*
- * Back up over the tab
- */
- while (tty->column > col) {
- osend ("\b", 1, tty);
- tty->column--;
- }
- }
- else {
- if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
- osend ("\b \b", 3, tty);
- if (tty->column)
- tty->column--;
- }
- if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
- osend ("\b \b", 3, tty);
- if (tty->column)
- tty->column--;
- }
- }
- }
- if (!lineFlag)
- break;
- }
-}
-
-/*
- * Process a single input character
- */
-static int
-iproc (unsigned char c, struct rtems_termios_tty *tty)
-{
- if (tty->termios.c_iflag & ISTRIP)
- c &= 0x7f;
- if (tty->termios.c_iflag & IUCLC)
- c = tolower (c);
- if (c == '\r') {
- if (tty->termios.c_iflag & IGNCR)
- return 0;
- if (tty->termios.c_iflag & ICRNL)
- c = '\n';
- }
- else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
- c = '\r';
- }
- if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
- if (c == tty->termios.c_cc[VERASE]) {
- erase (tty, 0);
- return 0;
- }
- else if (c == tty->termios.c_cc[VKILL]) {
- erase (tty, 1);
- return 0;
- }
- else if (c == tty->termios.c_cc[VEOF]) {
- return 1;
- }
- else if (c == '\n') {
- if (tty->termios.c_lflag & (ECHO | ECHONL))
- echo (c, tty);
- tty->cbuf[tty->ccount++] = c;
- return 1;
- }
- else if ((c == tty->termios.c_cc[VEOL])
- || (c == tty->termios.c_cc[VEOL2])) {
- if (tty->termios.c_lflag & ECHO)
- echo (c, tty);
- tty->cbuf[tty->ccount++] = c;
- return 1;
- }
- }
-
- /*
- * FIXME: Should do IMAXBEL handling somehow
- */
- if (tty->ccount < (CBUFSIZE-1)) {
- if (tty->termios.c_lflag & ECHO)
- echo (c, tty);
- tty->cbuf[tty->ccount++] = c;
- }
- return 0;
-}
-
-/*
- * Process input character, with semaphore.
- */
-static int
-siproc (unsigned char c, struct rtems_termios_tty *tty)
-{
- int i;
-
- /*
- * Obtain output semaphore if character will be echoed
- */
- if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
- rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
- i = iproc (c, tty);
- rtems_semaphore_release (tty->osem);
- }
- else {
- i = iproc (c, tty);
- }
- return i;
-}
-
-/*
- * Fill the input buffer by polling the device
- */
-static rtems_status_code
-fillBufferPoll (struct rtems_termios_tty *tty)
-{
- int n;
-
- if (tty->termios.c_lflag & ICANON) {
- for (;;) {
- n = (*tty->device.pollRead)(tty->minor);
- if (n < 0) {
- rtems_task_wake_after (1);
- }
- else {
- if (siproc (n, tty))
- break;
- }
- }
- }
- else {
- rtems_interval then, now;
- if (!tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
- rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then);
- for (;;) {
- n = (*tty->device.pollRead)(tty->minor);
- if (n < 0) {
- if (tty->termios.c_cc[VMIN]) {
- if (tty->termios.c_cc[VTIME] && tty->ccount) {
- rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now);
- if ((now - then) > tty->vtimeTicks) {
- break;
- }
- }
- }
- else {
- if (!tty->termios.c_cc[VTIME])
- break;
- rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now);
- if ((now - then) > tty->vtimeTicks) {
- break;
- }
- }
- rtems_task_wake_after (1);
- }
- else {
- siproc (n, tty);
- if (tty->ccount >= tty->termios.c_cc[VMIN])
- break;
- if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
- rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then);
- }
- }
- }
- return RTEMS_SUCCESSFUL;
-}
-
-/*
- * Fill the input buffer from the raw input queue
- */
-static rtems_status_code
-fillBufferQueue (struct rtems_termios_tty *tty)
-{
- rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout;
- rtems_status_code sc;
-
- for (;;) {
- /*
- * Process characters read from raw queue
- */
- while (tty->rawInBufHead != tty->rawInBufTail) {
- unsigned char c;
- unsigned int newHead;
-
- newHead = (tty->rawInBufHead + 1) % RAW_INPUT_BUFFER_SIZE;
- c = tty->rawInBuf[newHead];
- tty->rawInBufHead = newHead;
- if(((tty->rawInBufTail-newHead+RAW_INPUT_BUFFER_SIZE)
- % RAW_INPUT_BUFFER_SIZE)
- < tty->lowwater) {
- tty->flow_ctrl &= ~FL_IREQXOF;
- /* if tx stopped and XON should be sent... */
- if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
- == (FL_MDXON | FL_ISNTXOF))
- && ((tty->rawOutBufState == rob_idle)
- || (tty->flow_ctrl & FL_OSTOP))) {
- /* XON should be sent now... */
- (*tty->device.write)(tty->minor,
- &(tty->termios.c_cc[VSTART]),
- 1);
- }
- else if (tty->flow_ctrl & FL_MDRTS) {
- tty->flow_ctrl &= ~FL_IRTSOFF;
- /* activate RTS line */
- if (tty->device.startRemoteTx != NULL) {
- tty->device.startRemoteTx(tty->minor);
- }
- }
- }
-
- /* continue processing new character */
- if (tty->termios.c_lflag & ICANON) {
- if (siproc (c, tty))
- return RTEMS_SUCCESSFUL;
- }
- else {
- siproc (c, tty);
- if (tty->ccount >= tty->termios.c_cc[VMIN])
- return RTEMS_SUCCESSFUL;
- }
- timeout = tty->rawInBufSemaphoreTimeout;
- }
-
- /*
- * Wait for characters
- */
- sc = rtems_semaphore_obtain (tty->rawInBufSemaphore,
- tty->rawInBufSemaphoreOptions,
- timeout);
- if (sc != RTEMS_SUCCESSFUL)
- break;
- }
- return RTEMS_SUCCESSFUL;
-}
-
-rtems_status_code
-rtems_termios_read (void *arg)
-{
- rtems_libio_rw_args_t *args = arg;
- struct rtems_termios_tty *tty = args->iop->data1;
- unsigned32 count = args->count;
- unsigned8 *buffer = args->buffer;
- rtems_status_code sc;
-
- sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
- if (sc != RTEMS_SUCCESSFUL)
- return sc;
- if (tty->cindex == tty->ccount) {
- tty->cindex = tty->ccount = 0;
- tty->read_start_column = tty->column;
- if (tty->device.pollRead)
- sc = fillBufferPoll (tty);
- else
- sc = fillBufferQueue (tty);
- if (sc != RTEMS_SUCCESSFUL)
- tty->cindex = tty->ccount = 0;
- }
- while (count && (tty->cindex < tty->ccount)) {
- *buffer++ = tty->cbuf[tty->cindex++];
- count--;
- }
- args->bytes_moved = args->count - count;
- rtems_semaphore_release (tty->isem);
- return sc;
-}
-
-/*
- * Place characters on raw queue.
- * NOTE: This routine runs in the context of the
- * device receive interrupt handler.
- * Returns the number of characters dropped because of overflow.
- */
-int
-rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len)
-{
- struct rtems_termios_tty *tty = ttyp;
- unsigned int newTail;
- char c;
- int dropped = 0;
- boolean flow_rcv = FALSE; /* TRUE, if flow control char received */
- rtems_interrupt_level level;
-
- while (len--) {
- c = *buf++;
- /* FIXME: implement IXANY: any character restarts output */
- /* if incoming XON/XOFF controls outgoing stream: */
- if (tty->flow_ctrl & FL_MDXON) {
- /* if received char is V_STOP and V_START (both are equal value) */
- if (c == tty->termios.c_cc[VSTOP]) {
- if (c == tty->termios.c_cc[VSTART]) {
- /* received VSTOP and VSTART==VSTOP? */
- /* then toggle "stop output" status */
- tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
- }
- else {
- /* VSTOP received (other code than VSTART) */
- /* stop output */
- tty->flow_ctrl |= FL_ORCVXOF;
- }
- flow_rcv = TRUE;
- }
- else if (c == tty->termios.c_cc[VSTART]) {
- /* VSTART received */
- /* restart output */
- tty->flow_ctrl &= ~FL_ORCVXOF;
- flow_rcv = TRUE;
- }
- }
- if (flow_rcv) {
- /* restart output according to FL_ORCVXOF flag */
- if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
- /* disable interrupts */
- rtems_interrupt_disable(level);
- tty->flow_ctrl &= ~FL_OSTOP;
- /* check for chars in output buffer (or rob_state?) */
- if (tty->rawOutBufState != rob_idle) {
- /* if chars available, call write function... */
- (*tty->device.write)(tty->minor,
- (char *)&tty->rawOutBuf[tty->rawOutBufTail], 1);
- }
- /* reenable interrupts */
- rtems_interrupt_enable(level);
- }
- }
- else {
- newTail = (tty->rawInBufTail + 1) % RAW_INPUT_BUFFER_SIZE;
- /* if chars_in_buffer > highwater */
- rtems_interrupt_disable(level);
- if ((((newTail - tty->rawInBufHead + RAW_INPUT_BUFFER_SIZE)
- % RAW_INPUT_BUFFER_SIZE)
- > tty->highwater) &&
- !(tty->flow_ctrl & FL_IREQXOF)) {
- /* incoming data stream should be stopped */
- tty->flow_ctrl |= FL_IREQXOF;
- if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
- == (FL_MDXOF ) ){
- if ((tty->flow_ctrl & FL_OSTOP) ||
- (tty->rawOutBufState == rob_idle)) {
- /* if tx is stopped due to XOFF or out of data */
- /* call write function here */
- tty->flow_ctrl |= FL_ISNTXOF;
- (*tty->device.write)(tty->minor,
- &(tty->termios.c_cc[VSTOP]),
- 1);
- }
- }
- else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF))
- == (FL_MDRTS ) ) {
- tty->flow_ctrl |= FL_IRTSOFF;
- /* deactivate RTS line */
- if (tty->device.stopRemoteTx != NULL) {
- tty->device.stopRemoteTx(tty->minor);
- }
- }
- }
- /* reenable interrupts */
- rtems_interrupt_enable(level);
-
- if (newTail == tty->rawInBufHead) {
- dropped++;
- }
- else {
- tty->rawInBuf[newTail] = c;
- tty->rawInBufTail = newTail;
- }
- }
- }
- tty->rawInBufDropped += dropped;
- rtems_semaphore_release (tty->rawInBufSemaphore);
- return dropped;
-}
-
-/*
- * Characters have been transmitted
- * NOTE: This routine runs in the context of the
- * device transmit interrupt handler.
- * The second argument is the number of characters transmitted so far.
- * This value will always be 1 for devices which generate an interrupt
- * for each transmitted character.
- * It returns number of characters left to transmit
- */
-int
-rtems_termios_dequeue_characters (void *ttyp, int len)
-{
- struct rtems_termios_tty *tty = ttyp;
- unsigned int newTail;
- int nToSend;
-
- /* check for XOF/XON to send */
- if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
- == (FL_MDXOF | FL_IREQXOF)) {
- /* XOFF should be sent now... */
- (*tty->device.write)(tty->minor,
- &(tty->termios.c_cc[VSTOP]), 1);
- tty->flow_ctrl |= FL_ISNTXOF;
- nToSend = 1;
- }
- else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF))
- == FL_ISNTXOF) {
- /* NOTE: send XON even, if no longer in XON/XOFF mode... */
- /* XON should be sent now... */
- (*tty->device.write)(tty->minor,
- &(tty->termios.c_cc[VSTART]), 1);
- tty->flow_ctrl &= ~FL_ISNTXOF;
- nToSend = 1;
- }
- else {
- if (tty->rawOutBufState == rob_wait)
- rtems_semaphore_release (tty->rawOutBufSemaphore);
- if ( tty->rawOutBufHead == tty->rawOutBufTail )
- return 0;
- newTail = (tty->rawOutBufTail + len) % RAW_OUTPUT_BUFFER_SIZE;
- if (newTail == tty->rawOutBufHead) {
- /*
- * Buffer empty
- */
- tty->rawOutBufState = rob_idle;
- nToSend = 0;
- }
- /* check, whether output should stop due to received XOFF */
- else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
- == (FL_MDXON | FL_ORCVXOF)) {
- /* Buffer not empty, but output stops due to XOFF */
- /* set flag, that output has been stopped */
- tty->flow_ctrl |= FL_OSTOP;
- nToSend = 0;
- }
- else {
- /*
- * Buffer not empty, start tranmitter
- */
- if (newTail > tty->rawOutBufHead)
- nToSend = RAW_OUTPUT_BUFFER_SIZE - newTail;
- else
- nToSend = tty->rawOutBufHead - newTail;
- /* when flow control XON or XOF, don't send blocks of data */
- /* to allow fast reaction on incoming flow ctrl and low latency*/
- /* for outgoing flow control */
- if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) {
- nToSend = 1;
- }
- (*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf[newTail], nToSend);
- tty->rawOutBufState = rob_busy;
- }
- tty->rawOutBufTail = newTail;
- }
- return nToSend;
-}
-
-
diff --git a/cpukit/libcsupport/src/termiosinitialize.c b/cpukit/libcsupport/src/termiosinitialize.c
deleted file mode 100644
index f6e73787c9..0000000000
--- a/cpukit/libcsupport/src/termiosinitialize.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Termios initialization routine
- *
- * Author:
- * W. Eric Norum
- * Saskatchewan Accelerator Laboratory
- * University of Saskatchewan
- * Saskatoon, Saskatchewan, CANADA
- * eric@skatter.usask.ca
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include <rtems.h>
-#include <rtems/libio.h>
-#include <ctype.h>
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <termios.h>
-#include <unistd.h>
-
-struct rtems_termios_tty *rtems_termios_ttyHead;
-struct rtems_termios_tty *rtems_termios_ttyTail;
-rtems_id rtems_termios_ttyMutex;
-
-void
-rtems_termios_initialize (void)
-{
- rtems_status_code sc;
-
- /*
- * Create the mutex semaphore for the tty list
- */
- if (!rtems_termios_ttyMutex) {
- sc = rtems_semaphore_create (
- rtems_build_name ('T', 'R', 'm', 'i'),
- 1,
- RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
- RTEMS_NO_PRIORITY,
- &rtems_termios_ttyMutex);
- if (sc != RTEMS_SUCCESSFUL)
- rtems_fatal_error_occurred (sc);
- }
-}
diff --git a/cpukit/libcsupport/src/termiosreserveresources.c b/cpukit/libcsupport/src/termiosreserveresources.c
deleted file mode 100644
index 2d9c05c988..0000000000
--- a/cpukit/libcsupport/src/termiosreserveresources.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Reserve enough resources to open every physical device once.
- *
- * $Id$
- */
-
-#include <rtems.h>
-
-static int first_time; /* assumed to be zeroed by BSS initialization */
-
-void rtems_termios_reserve_resources (
- rtems_configuration_table *configuration,
- rtems_unsigned32 number_of_devices
-)
-{
- rtems_api_configuration_table *rtems_config;
-
- if (!configuration)
- rtems_fatal_error_occurred (0xFFF0F001);
- rtems_config = configuration->RTEMS_api_configuration;
- if (!rtems_config)
- rtems_fatal_error_occurred (0xFFF0F002);
- if (!first_time)
- rtems_config->maximum_semaphores += 1;
- first_time = 1;
- rtems_config->maximum_semaphores += (4 * number_of_devices);
-}
-
diff --git a/cpukit/libcsupport/src/truncate.c b/cpukit/libcsupport/src/truncate.c
deleted file mode 100644
index d551b5be5b..0000000000
--- a/cpukit/libcsupport/src/truncate.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * truncate() - Truncate a File to the Specified Length
- *
- * This routine is not defined in the POSIX 1003.1b standard but is
- * commonly supported on most UNIX and POSIX systems. It is provided
- * for compatibility.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <unistd.h>
-#include <errno.h>
-#include <fcntl.h>
-
-int truncate(
- const char *path,
- off_t length
-)
-{
- int status;
- int fd;
-
- fd = open( path, O_WRONLY );
- if ( fd == -1 )
- return -1;
-
- status = ftruncate( fd, length );
-
- (void) close( fd );
-
- return status;
-}
-
diff --git a/cpukit/libcsupport/src/ttyname.c b/cpukit/libcsupport/src/ttyname.c
deleted file mode 100644
index ceb6ed8121..0000000000
--- a/cpukit/libcsupport/src/ttyname.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * ttyname_r() - POSIX 1003.1b 4.7.2 - Demetermine Terminal Device Name
- *
- * $Id$
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <dirent.h>
-#include <termios.h>
-#include <unistd.h>
-#include <paths.h>
-#include <_syslist.h>
-#include <errno.h>
-
-#include "libio_.h"
-
-
-int ttyname_r(
- int fd,
- char *name,
- int namesize
-)
-{
- struct stat sb;
- struct termios tty;
- struct dirent *dirp;
- DIR *dp;
- struct stat dsb;
- char *rval;
-
- /* Must be a terminal. */
- if (tcgetattr (fd, &tty) < 0)
- set_errno_and_return_minus_one(EBADF);
-
- /* Must be a character device. */
- if (_fstat (fd, &sb) || !S_ISCHR (sb.st_mode))
- set_errno_and_return_minus_one(EBADF);
-
- if ((dp = opendir (_PATH_DEV)) == NULL)
- set_errno_and_return_minus_one(EBADF);
-
- for (rval = NULL; (dirp = readdir (dp)) != NULL ;)
- {
- if (dirp->d_ino != sb.st_ino)
- continue;
- strcpy (name + sizeof (_PATH_DEV) - 1, dirp->d_name);
- if (stat (name, &dsb) || sb.st_dev != dsb.st_dev ||
- sb.st_ino != dsb.st_ino)
- continue;
- (void) closedir (dp);
- rval = name;
- break;
- }
- (void) closedir (dp);
- return 0;
-}
-
-static char buf[sizeof (_PATH_DEV) + MAXNAMLEN] = _PATH_DEV;
-
-/*
- * ttyname() - POSIX 1003.1b 4.7.2 - Demetermine Terminal Device Name
- */
-
-char *ttyname(
- int fd
-)
-{
- if ( !ttyname_r( fd, buf, sizeof(buf) ) )
- return buf;
- return NULL;
-}
-
diff --git a/cpukit/libcsupport/src/ttyname_r.c b/cpukit/libcsupport/src/ttyname_r.c
deleted file mode 100644
index 69ca36cc43..0000000000
--- a/cpukit/libcsupport/src/ttyname_r.c
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * This file was copied from newlib-1.8.2/newlib/unix/ttyname.c
- * and transformed into ttyname_r().
- *
- * Copyright (c) 1988 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)ttyname.c 5.10 (Berkeley) 5/6/91";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <dirent.h>
-#include <termios.h>
-#include <unistd.h>
-#include <paths.h>
-#include <_syslist.h>
-#include <errno.h>
-
-#include "libio_.h"
-
-/*
- * ttyname_r() - POSIX 1003.1b 4.7.2 - Demetermine Terminal Device Name
- */
-
-int ttyname_r(
- int fd,
- char *name,
- int namesize
-)
-{
- struct stat sb;
- struct termios tty;
- struct dirent *dirp;
- DIR *dp;
- struct stat dsb;
- char *rval;
-
- /* Must be a terminal. */
- if (tcgetattr (fd, &tty) < 0)
- set_errno_and_return_minus_one(EBADF);
-
- /* Must be a character device. */
- if (_fstat (fd, &sb) || !S_ISCHR (sb.st_mode))
- set_errno_and_return_minus_one(EBADF);
-
- if ((dp = opendir (_PATH_DEV)) == NULL)
- set_errno_and_return_minus_one(EBADF);
-
- for (rval = NULL; (dirp = readdir (dp)) != NULL ;)
- {
- if (dirp->d_ino != sb.st_ino)
- continue;
- strcpy (name + sizeof (_PATH_DEV) - 1, dirp->d_name);
- if (stat (name, &dsb) || sb.st_dev != dsb.st_dev ||
- sb.st_ino != dsb.st_ino)
- continue;
- (void) closedir (dp);
- rval = name;
- break;
- }
- (void) closedir (dp);
- return 0;
-}
-
-static char buf[sizeof (_PATH_DEV) + MAXNAMLEN] = _PATH_DEV;
-
-/*
- * ttyname() - POSIX 1003.1b 4.7.2 - Demetermine Terminal Device Name
- */
-
-char *ttyname(
- int fd
-)
-{
- if ( !ttyname_r( fd, buf, sizeof(buf) ) )
- return buf;
- return NULL;
-}
-
diff --git a/cpukit/libcsupport/src/umask.c b/cpukit/libcsupport/src/umask.c
deleted file mode 100644
index c9f0b4851b..0000000000
--- a/cpukit/libcsupport/src/umask.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * umask() - POSIX 1003.1b 5.3.3 - Set File Creation Mask
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#include "libio_.h"
-
-mode_t umask(
- mode_t cmask
-)
-{
- mode_t old_mask;
-
- old_mask = rtems_filesystem_umask;
- rtems_filesystem_umask = cmask;
-
- return old_mask;
-}
diff --git a/cpukit/libcsupport/src/unixlibc.c b/cpukit/libcsupport/src/unixlibc.c
deleted file mode 100644
index 494e83b159..0000000000
--- a/cpukit/libcsupport/src/unixlibc.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * $Id$
- * UNIX Port C Library Support
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- */
-
-#include <rtems.h>
-
-#if defined(RTEMS_UNIXLIB)
-
-void libc_init(int reentrant)
-{
-}
-
-#else
-
-/* remove ANSI errors.
- * A program must contain at least one external-declaration
- * (X3.159-1989 p.82,L3).
- */
-void unixlibc_dummy_function( void )
-{
-}
-
-#endif
diff --git a/cpukit/libcsupport/src/unlink.c b/cpukit/libcsupport/src/unlink.c
deleted file mode 100644
index cf11db227c..0000000000
--- a/cpukit/libcsupport/src/unlink.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * unlink() - POSIX 1003.1b - 5.5.1 - Remove an existing link
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-
-#include "libio_.h"
-
-int unlink(
- const char *path
-)
-{
- rtems_filesystem_location_info_t loc;
- int result;
-
- /*
- * Get the node to be unlinked.
- */
-
- result = rtems_filesystem_evaluate_path( path, 0, &loc, FALSE );
- if ( result != 0 )
- return -1;
-
- if ( !loc.ops->node_type ) {
- rtems_filesystem_freenode( &loc );
- set_errno_and_return_minus_one( ENOTSUP );
- }
-
- if ( (*loc.ops->node_type)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
- rtems_filesystem_freenode( &loc );
- set_errno_and_return_minus_one( EISDIR );
- }
-
- if ( !loc.ops->unlink ) {
- rtems_filesystem_freenode( &loc );
- set_errno_and_return_minus_one( ENOTSUP );
- }
-
- result = (*loc.ops->unlink)( &loc );
-
- rtems_filesystem_freenode( &loc );
-
- return result;
-}
-
-/*
- * _unlink_r
- *
- * This is the Newlib dependent reentrant version of unlink().
- */
-
-#if defined(RTEMS_NEWLIB)
-
-#include <reent.h>
-
-int _unlink_r(
- struct _reent *ptr,
- const char *path
-)
-{
- return unlink( path );
-}
-#endif
-
diff --git a/cpukit/libcsupport/src/unmount.c b/cpukit/libcsupport/src/unmount.c
deleted file mode 100644
index c4b6bdae7d..0000000000
--- a/cpukit/libcsupport/src/unmount.c
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- * unmount() - Unmount a File System
- *
- * This routine is not defined in the POSIX 1003.1b standard but
- * in some form is supported on most UNIX and POSIX systems. This
- * routine is necessary to mount instantiations of a file system
- * into the file system name space.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <chain.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-#include "imfs.h"
-#include "libio_.h"
-
-/*
- * Data structures and routines private to mount/unmount pair.
- */
-
-extern Chain_Control rtems_filesystem_mount_table_control;
-extern rtems_filesystem_location_info_t rtems_filesystem_current;
-
-int search_mt_for_mount_point(
- rtems_filesystem_location_info_t *location_of_mount_point
-);
-
-
-int file_systems_below_this_mountpoint(
- const char *mount_path,
- rtems_filesystem_location_info_t *temp_loc,
- rtems_filesystem_mount_table_entry_t *temp_mt_entry
-);
-
-/*
- * unmount
- *
- * This routine will attempt to unmount the file system that has been
- * is mounted a mount_path. If the operation is successful, 0 will
- * be returned to the calling routine. Otherwise, 1 will be returned.
- */
-
-int unmount(
- const char *mount_path
-)
-{
- int status;
- rtems_filesystem_location_info_t temp_loc;
- rtems_filesystem_mount_table_entry_t temp_mt_entry;
- int result;
-
- /*
- * Are there any file systems below the mount_path specified
- */
-
- status = file_systems_below_this_mountpoint(
- mount_path,
- &temp_loc,
- &temp_mt_entry
- );
-
- if ( status != 0 )
- return -1;
-
- /*
- * Is the current node reference pointing to a node in the file system
- * we are attempting to unmount ?
- */
-
- if ( rtems_filesystem_current.mt_entry == temp_loc.mt_entry ) {
- rtems_filesystem_freenode( &temp_loc );
- set_errno_and_return_minus_one( EBUSY );
- }
-
- /*
- * Run the file descriptor table to determine if there are any file
- * descriptors that are currently active and reference nodes in the
- * file system that we are trying to unmount
- */
-
- if ( rtems_libio_is_open_files_in_fs( temp_loc.mt_entry ) == 1 ) {
- rtems_filesystem_freenode( &temp_loc );
- set_errno_and_return_minus_one( EBUSY );
- }
-
- /*
- * Allow the file system being mounted on to do its cleanup.
- * XXX - Did I change these correctly ??? It looks like either I did
- * XXX this backwards or the IMFS_unmount and IMFS_fsumount are swaped.
- * XXX Add to the mt_point_node unmount to set the mt_entry back to null
- * XXX I will step off in space when evaluating past the end of the node.
- */
-
- if ((temp_mt_entry.mt_point_node.ops->unmount )( temp_loc.mt_entry ) != 0 ) {
- rtems_filesystem_freenode( &temp_loc );
- return -1;
- }
-
- /*
- * Run the unmount function for the subordinate file system.
- */
-
- if ((temp_mt_entry.mt_fs_root.ops->fsunmount_me )( temp_loc.mt_entry ) != 0){
- rtems_filesystem_freenode( &temp_loc );
- return -1;
- }
-
- /*
- * Allow the file system to clean up.
- */
-
- result = (*temp_loc.ops->fsunmount_me)( temp_loc.mt_entry );
-
- /*
- * Extract the mount table entry from the chain
- */
-
- Chain_Extract( ( Chain_Node * ) temp_loc.mt_entry );
-
- /*
- * Free the memory associated with the extracted mount table entry.
- */
-
- rtems_filesystem_freenode( &temp_loc.mt_entry->mt_point_node );
- free( temp_loc.mt_entry );
- rtems_filesystem_freenode( &temp_loc );
-
- return result;
-
-}
-
-
-/*
- * file_systems_below_this_mountpoint
- *
- * This routine will run through the entries that currently exist in the
- * mount table chain. For each entry in the mount table chain it will
- * compare the mount tables mt_fs_root to the new_fs_root_node. If any of the
- * mount table file system root nodes matches the new file system root node
- * this indicates that we are trying to mount a file system that has already
- * been mounted. This is not a permitted operation. temp_loc is set to
- * the root node of the file system being unmounted.
- */
-
-int file_systems_below_this_mountpoint(
- const char *mount_path,
- rtems_filesystem_location_info_t *temp_loc,
- rtems_filesystem_mount_table_entry_t *temp_mt_entry
-)
-{
- Chain_Node *the_node;
- rtems_filesystem_mount_table_entry_t *the_mount_entry;
- rtems_filesystem_mount_table_entry_t *current_fs_mt_entry;
-
- /*
- * Is the mount_path even a valid node name in the existing tree?
- */
-
- if ( rtems_filesystem_evaluate_path( mount_path, 0x0, temp_loc, TRUE ) )
- return -1;
-
- /*
- * Look for the node defined in temp_loc as a mount point in the
- * mount table chain.
- */
-
- for ( the_node = rtems_filesystem_mount_table_control.first;
- !Chain_Is_tail( &rtems_filesystem_mount_table_control, the_node );
- the_node = the_node->next ) {
-
- the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node;
- if (the_mount_entry->mt_point_node.node_access ==
- temp_loc->node_access ) {
- current_fs_mt_entry = the_mount_entry;
- *temp_loc = current_fs_mt_entry->mt_fs_root;
- goto after_real_mount_point_found;
- }
- }
- set_errno_and_return_minus_one( EACCES );
-
-
-after_real_mount_point_found:
-
- for ( the_node = rtems_filesystem_mount_table_control.first;
- !Chain_Is_tail( &rtems_filesystem_mount_table_control, the_node );
- the_node = the_node->next ) {
-
- the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node;
-
- /*
- * Exclude the current file systems mount table entry from the test
- */
-
- if ( current_fs_mt_entry != the_mount_entry ) {
- if ( the_mount_entry->mt_point_node.mt_entry == current_fs_mt_entry ) {
-
- /*
- * There is at least one fs below the fs on the mount_path.
- */
- set_errno_and_return_minus_one( EBUSY );
- }
- }
- }
-
- *temp_mt_entry = *current_fs_mt_entry;
-
- return 0;
-}
diff --git a/cpukit/libcsupport/src/utime.c b/cpukit/libcsupport/src/utime.c
deleted file mode 100644
index 50eeece59a..0000000000
--- a/cpukit/libcsupport/src/utime.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * utime() - POSIX 1003.1b 5.5.6 - Set File Access and Modification Times
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h>
-#include <utime.h>
-#include <errno.h>
-
-#include "libio_.h"
-
-int utime(
- const char *path,
- const struct utimbuf *times
-)
-{
- rtems_filesystem_location_info_t temp_loc;
- int result;
-
- if ( rtems_filesystem_evaluate_path( path, 0x00, &temp_loc, TRUE ) )
- return -1;
-
- if ( !temp_loc.ops->utime )
- set_errno_and_return_minus_one( ENOTSUP );
-
- result = (*temp_loc.ops->utime)( &temp_loc, times->actime, times->modtime );
-
- rtems_filesystem_freenode( &temp_loc );
-
- return result;
-}
diff --git a/cpukit/libcsupport/src/utsname.c b/cpukit/libcsupport/src/utsname.c
deleted file mode 100644
index 7da5f9380d..0000000000
--- a/cpukit/libcsupport/src/utsname.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * $Id$
- */
-
-#include <stdio.h>
-#include <string.h>
-
-#include <errno.h>
-#include <sys/utsname.h>
-
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/sptables.h>
-
-#include <rtems/posix/seterr.h>
-
-/*PAGE
- *
- * 4.4.1 Get System Name, P1003.1b-1993, p. 90
- */
-
-int uname(
- struct utsname *name
-)
-{
- /* XXX: Here is what Solaris returns...
- sysname = SunOS
- nodename = node_name
- release = 5.3
- version = Generic_101318-12
- machine = sun4m
- */
-
- if ( !name )
- set_errno_and_return_minus_one( EFAULT );
-
- strcpy( name->sysname, "RTEMS" );
-
- sprintf( name->nodename, "Node %d", _Objects_Local_node );
-
- strcpy( name->release, RTEMS_VERSION );
-
- strcpy( name->version, "" );
-
- sprintf( name->machine, "%s/%s", CPU_NAME, CPU_MODEL_NAME );
-
- return 0;
-}
diff --git a/cpukit/libcsupport/src/write.c b/cpukit/libcsupport/src/write.c
deleted file mode 100644
index a47a4f40a9..0000000000
--- a/cpukit/libcsupport/src/write.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * write() - POSIX 1003.1b 6.4.2 - Write to a File
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "libio_.h"
-
-
-/*
- * write
- *
- * This routine writes count bytes from from buffer pointed to by buffer
- * to the file associated with the open file descriptor, fildes.
- */
-
-ssize_t write(
- int fd,
- const void *buffer,
- size_t count
-)
-{
- rtems_status_code rc;
- rtems_libio_t *iop;
-
- rtems_libio_check_fd( fd );
- iop = rtems_libio_iop( fd );
- rtems_libio_check_is_open(iop);
- rtems_libio_check_buffer( buffer );
- rtems_libio_check_count( count );
- rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
-
- /*
- * Now process the write() request.
- */
-
- if ( !iop->handlers->write )
- set_errno_and_return_minus_one( ENOTSUP );
-
- rc = (*iop->handlers->write)( iop, buffer, count );
-
- if ( rc > 0 )
- iop->offset += rc;
-
- return rc;
-}
-
-/*
- * _write_r
- *
- * This is the Newlib dependent reentrant version of write().
- */
-
-#if defined(RTEMS_NEWLIB)
-
-#include <reent.h>
-
-long _write_r(
- struct _reent *ptr,
- int fd,
- const void *buf,
- size_t nbytes
-)
-{
- return write( fd, buf, nbytes );
-}
-#endif
diff --git a/cpukit/libfs/src/imfs/deviceio.c b/cpukit/libfs/src/imfs/deviceio.c
deleted file mode 100644
index 0cbdd2a456..0000000000
--- a/cpukit/libfs/src/imfs/deviceio.c
+++ /dev/null
@@ -1,221 +0,0 @@
-/*
- * IMFS Device Node Handlers
- *
- * This file contains the set of handlers used to map operations on
- * IMFS device nodes onto calls to the RTEMS Classic API IO Manager.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include <rtems/libio.h>
-#include "libio_.h"
-
-#include "imfs.h"
-
-/*
- * device_open
- *
- * This handler maps an open() operation onto rtems_io_open().
- */
-
-int device_open(
- rtems_libio_t *iop,
- const char *pathname,
- unsigned32 flag,
- unsigned32 mode
-)
-{
- rtems_libio_open_close_args_t args;
- rtems_status_code status;
- IMFS_jnode_t *the_jnode;
-
- the_jnode = iop->file_info;
-
- args.iop = iop;
- args.flags = iop->flags;
- args.mode = mode;
-
- status = rtems_io_open(
- the_jnode->info.device.major,
- the_jnode->info.device.minor,
- (void *) &args
- );
- if ( status )
- return RTEMS_UNSATISFIED;
-
- return 0;
-}
-
-/*
- * device_close
- *
- * This handler maps a close() operation onto rtems_io_close().
- */
-
-int device_close(
- rtems_libio_t *iop
-)
-{
- rtems_libio_open_close_args_t args;
- rtems_status_code status;
- IMFS_jnode_t *the_jnode;
-
- the_jnode = iop->file_info;
-
- args.iop = iop;
- args.flags = 0;
- args.mode = 0;
-
- status = rtems_io_close(
- the_jnode->info.device.major,
- the_jnode->info.device.minor,
- (void *) &args
- );
- if ( status )
- return RTEMS_UNSATISFIED;
-
- return 0;
-}
-
-/*
- * device_read
- *
- * This handler maps a read() operation onto rtems_io_read().
- */
-
-int device_read(
- rtems_libio_t *iop,
- void *buffer,
- unsigned32 count
-)
-{
- rtems_libio_rw_args_t args;
- rtems_status_code status;
- IMFS_jnode_t *the_jnode;
-
- the_jnode = iop->file_info;
-
- args.iop = iop;
- args.offset = iop->offset;
- args.buffer = buffer;
- args.count = count;
- args.flags = iop->flags;
- args.bytes_moved = 0;
-
- status = rtems_io_read(
- the_jnode->info.device.major,
- the_jnode->info.device.minor,
- (void *) &args
- );
-
- if ( status )
- return -1;
-
- return args.bytes_moved;
-}
-
-/*
- * device_write
- *
- * This handler maps a write() operation onto rtems_io_write().
- */
-
-int device_write(
- rtems_libio_t *iop,
- const void *buffer,
- unsigned32 count
-)
-{
- rtems_libio_rw_args_t args;
- rtems_status_code status;
- IMFS_jnode_t *the_jnode;
-
- the_jnode = iop->file_info;
-
- args.iop = iop;
- args.offset = iop->offset;
- args.buffer = (void *) buffer;
- args.count = count;
- args.flags = iop->flags;
- args.bytes_moved = 0;
-
- status = rtems_io_write(
- the_jnode->info.device.major,
- the_jnode->info.device.minor,
- (void *) &args
- );
-
- if ( status )
- return -1;
-
- return args.bytes_moved;
-}
-
-/*
- * device_ioctl
- *
- * This handler maps an ioctl() operation onto rtems_io_ioctl().
- */
-
-int device_ioctl(
- rtems_libio_t *iop,
- unsigned32 command,
- void *buffer
-)
-{
- rtems_libio_ioctl_args_t args;
- rtems_status_code status;
- IMFS_jnode_t *the_jnode;
-
- args.iop = iop;
- args.command = command;
- args.buffer = buffer;
-
- the_jnode = iop->file_info;
-
- status = rtems_io_control(
- the_jnode->info.device.major,
- the_jnode->info.device.minor,
- (void *) &args
- );
-
- if ( status )
- return -1;
-
- return args.ioctl_return;
-}
-
-/*
- * device_lseek
- *
- * This handler eats all lseek() operations.
- */
-
-int device_lseek(
- rtems_libio_t *iop,
- off_t offset,
- int whence
-)
-{
- return 0;
-}
-
-/*
- * device_stat
- *
- * The IMFS_stat() is used.
- */
-
-/*
- * device_rmnod
- *
- * The IMFS_rmnod() is used.
- */
diff --git a/cpukit/libfs/src/imfs/imfs.h b/cpukit/libfs/src/imfs/imfs.h
deleted file mode 100644
index 38c770a325..0000000000
--- a/cpukit/libfs/src/imfs/imfs.h
+++ /dev/null
@@ -1,516 +0,0 @@
-/*
- * Header file for the In-Memory File System
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __IMFS_h
-#define __IMFS_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems.h>
-#include <chain.h>
-
-#include <sys/types.h>
-#include <limits.h>
-#include <rtems/libio.h>
-
-/*
- * File name macros
- */
-
-#define IMFS_is_valid_name_char( _ch ) ( 1 )
-
-#define IMFS_is_separator( _ch ) \
- rtems_filesystem_is_separator( _ch )
-
-/*
- * Data types
- */
-
-struct IMFS_jnode_tt;
-typedef struct IMFS_jnode_tt IMFS_jnode_t;
-
-typedef struct {
- Chain_Control Entries;
- rtems_filesystem_mount_table_entry_t *mt_fs;
-} IMFS_directory_t;
-
-typedef struct {
- rtems_device_major_number major;
- rtems_device_minor_number minor;
-} IMFS_device_t;
-
-typedef struct {
- IMFS_jnode_t *link_node;
-} IMFS_link_t;
-
-typedef struct {
- const char *name;
-} IMFS_sym_link_t;
-
-/*
- * IMFS "memfile" information
- *
- * The data structure for the in-memory "memfiles" is based on classic UNIX.
- *
- * block_ptr is a pointer to a block of IMFS_MEMFILE_BYTES_PER_BLOCK in
- * length which could be data or a table of pointers to blocks.
- *
- * Setting IMFS_MEMFILE_BYTES_PER_BLOCK to different values has a significant
- * impact on the maximum file size supported as well as the amount of
- * memory wasted due to internal file fragmentation. The following
- * is a list of maximum file sizes based on various settings
- *
- * max_filesize with blocks of 16 is 1,328
- * max_filesize with blocks of 32 is 18,656
- * max_filesize with blocks of 64 is 279,488
- * max_filesize with blocks of 128 is 4,329,344
- * max_filesize with blocks of 256 is 68,173,568
- * max_filesize with blocks of 512 is 1,082,195,456
- */
-
-#define IMFS_MEMFILE_BYTES_PER_BLOCK 128
-#define IMFS_MEMFILE_BLOCK_SLOTS \
- (IMFS_MEMFILE_BYTES_PER_BLOCK / sizeof(void *))
-
-typedef unsigned char * block_p;
-typedef block_p *block_ptr;
-
-typedef struct {
- off_t size; /* size of file in bytes */
- block_ptr indirect; /* array of 128 data blocks pointers */
- block_ptr doubly_indirect; /* 128 indirect blocks */
- block_ptr triply_indirect; /* 128 doubly indirect blocks */
-} IMFS_memfile_t;
-
-/*
- * Important block numbers for "memfiles"
- */
-
-#define FIRST_INDIRECT (0)
-#define LAST_INDIRECT (IMFS_MEMFILE_BLOCK_SLOTS - 1)
-
-#define FIRST_DOUBLY_INDIRECT (LAST_INDIRECT + 1)
-#define LAST_DOUBLY_INDIRECT \
- (LAST_INDIRECT + \
- (IMFS_MEMFILE_BLOCK_SLOTS * IMFS_MEMFILE_BLOCK_SLOTS))
-
-#define FIRST_TRIPLY_INDIRECT (LAST_DOUBLY_INDIRECT + 1)
-#define LAST_TRIPLY_INDIRECT \
- (LAST_DOUBLY_INDIRECT +\
- (IMFS_MEMFILE_BLOCK_SLOTS * \
- IMFS_MEMFILE_BLOCK_SLOTS * IMFS_MEMFILE_BLOCK_SLOTS))
-
-#define IMFS_MEMFILE_MAXIMUM_SIZE \
- (LAST_TRIPLY_INDIRECT * IMFS_MEMFILE_BYTES_PER_BLOCK)
-
-/*
- * What types of IMFS file systems entities there can be.
- */
-
-#define IMFS_jnode_types_t rtems_filesystem_node_types_t
-#define IMFS_DIRECTORY RTEMS_FILESYSTEM_DIRECTORY
-#define IMFS_DEVICE RTEMS_FILESYSTEM_DEVICE
-#define IMFS_HARD_LINK RTEMS_FILESYSTEM_HARD_LINK
-#define IMFS_SYM_LINK RTEMS_FILESYSTEM_SYM_LINK
-#define IMFS_MEMORY_FILE RTEMS_FILESYSTEM_MEMORY_FILE
-
-#define IMFS_NUMBER_OF_TYPES (IMFS_MEMORY_FILE + 1)
-
-typedef union {
- IMFS_directory_t directory;
- IMFS_device_t device;
- IMFS_link_t hard_link;
- IMFS_sym_link_t sym_link;
- IMFS_memfile_t file;
-} IMFS_types_union;
-
-/*
- * Maximum length of a "basename" of an IMFS file/node.
- */
-
-#define IMFS_NAME_MAX 32
-
-/*
- * The control structure for an IMFS jnode.
- */
-
-struct IMFS_jnode_tt {
- Chain_Node Node; /* for chaining them together */
- IMFS_jnode_t *Parent; /* Parent node */
- char name[IMFS_NAME_MAX+1]; /* "basename" */
- mode_t st_mode; /* File mode */
- nlink_t st_nlink; /* Link count */
- ino_t st_ino; /* inode */
-
- uid_t st_uid; /* User ID of owner */
- gid_t st_gid; /* Group ID of owner */
-
- time_t st_atime; /* Time of last access */
- time_t st_mtime; /* Time of last modification */
- time_t st_ctime; /* Time of last status change */
- IMFS_jnode_types_t type; /* Type of this entry */
- IMFS_types_union info;
-};
-
-#define IMFS_update_atime( _jnode ) \
- do { \
- struct timeval tv; \
- gettimeofday( &tv, 0 ); \
- _jnode->st_atime = (time_t) tv.tv_sec; \
- } while (0)
-
-#define IMFS_update_mtime( _jnode ) \
- do { \
- struct timeval tv; \
- gettimeofday( &tv, 0 ); \
- _jnode->st_mtime = (time_t) tv.tv_sec; \
- } while (0)
-
-#define IMFS_update_ctime( _jnode ) \
- do { \
- struct timeval tv; \
- gettimeofday( &tv, 0 ); \
- _jnode->st_ctime = (time_t) tv.tv_sec; \
- } while (0)
-
-#define IMFS_atime_mtime_update( _jnode ) \
- do { \
- struct timeval tv; \
- gettimeofday( &tv, 0 ); \
- _jnode->st_mtime = (time_t) tv.tv_sec; \
- _jnode->st_atime = (time_t) tv.tv_sec; \
- } while (0)
-
-typedef struct {
- ino_t ino_count;
- rtems_filesystem_file_handlers_r *memfile_handlers;
- rtems_filesystem_file_handlers_r *directory_handlers;
-} IMFS_fs_info_t;
-
-#define increment_and_check_linkcounts( _fs_info ) \
- ((IMFS_fs_info_t * )_fs_info)->link_counts++; \
- if ( ((IMFS_fs_info_t * )_fs_info)->link_counts > MAXSYMLINKS ) \
- set_errno_and_return_minus_one( ELOOP )
-
-#define decrement_linkcounts( _fs_info ) \
- ((IMFS_fs_info_t * )_fs_info)->link_counts--;
-
-/*
- * Type defination for tokens returned from IMFS_get_token
- */
-
-typedef enum {
- IMFS_NO_MORE_PATH,
- IMFS_CURRENT_DIR,
- IMFS_UP_DIR,
- IMFS_NAME,
- IMFS_INVALID_TOKEN
-} IMFS_token_types;
-
-/*
- * Shared Data
- */
-
-extern rtems_filesystem_file_handlers_r IMFS_directory_handlers;
-extern rtems_filesystem_file_handlers_r IMFS_device_handlers;
-extern rtems_filesystem_file_handlers_r IMFS_link_handlers;
-extern rtems_filesystem_file_handlers_r IMFS_memfile_handlers;
-extern rtems_filesystem_operations_table IMFS_ops;
-extern rtems_filesystem_operations_table miniIMFS_ops;
-extern rtems_filesystem_limits_and_options_t IMFS_LIMITS_AND_OPTIONS;
-
-/*
- * Routines
- */
-
-int IMFS_initialize(
- rtems_filesystem_mount_table_entry_t *mt_entry
-);
-
-int miniIMFS_initialize(
- rtems_filesystem_mount_table_entry_t *mt_entry
-);
-
-int IMFS_initialize_support(
- rtems_filesystem_mount_table_entry_t *mt_entry,
- rtems_filesystem_operations_table *op_table,
- rtems_filesystem_file_handlers_r *memfile_handlers,
- rtems_filesystem_file_handlers_r *directory_handlers
-);
-
-int IMFS_fsunmount(
- rtems_filesystem_mount_table_entry_t *mt_entry
-);
-
-
-/*
- * Returns the number of characters copied from path to token.
- */
-IMFS_token_types IMFS_get_token(
- const char *path,
- char *token,
- int *token_len
-);
-
-void IMFS_dump( void );
-
-void IMFS_initialize_jnode(
- IMFS_jnode_t *the_jnode,
- IMFS_jnode_types_t type,
- IMFS_jnode_t *the_parent,
- char *name,
- mode_t mode
-);
-
-IMFS_jnode_t *IMFS_find_match_in_dir(
- IMFS_jnode_t *directory, /* IN */
- char *name /* IN */
-);
-
-rtems_filesystem_node_types_t IMFS_node_type(
- rtems_filesystem_location_info_t *pathloc /* IN */
-);
-
-int IMFS_stat(
- rtems_filesystem_location_info_t *loc, /* IN */
- struct stat *buf /* OUT */
-);
-
-int IMFS_Set_handlers(
- rtems_filesystem_location_info_t *loc
-);
-
-int IMFS_evaluate_link(
- rtems_filesystem_location_info_t *node, /* IN/OUT */
- int flags /* IN */
-);
-
-int IMFS_eval_path(
- const char *pathname, /* IN */
- int flags, /* IN */
- rtems_filesystem_location_info_t *pathloc /* IN/OUT */
-);
-
-
-int IMFS_link(
- rtems_filesystem_location_info_t *to_loc, /* IN */
- rtems_filesystem_location_info_t *parent_loc, /* IN */
- const char *token /* IN */
-);
-
-int IMFS_unlink(
- rtems_filesystem_location_info_t *pathloc /* IN */
-);
-
-int IMFS_chown(
- rtems_filesystem_location_info_t *pathloc, /* IN */
- uid_t owner, /* IN */
- gid_t group /* IN */
-);
-
-int IMFS_freenodinfo(
- rtems_filesystem_location_info_t *pathloc /* IN */
-);
-
-int IMFS_mknod(
- const char *path, /* IN */
- mode_t mode, /* IN */
- dev_t dev, /* IN */
- rtems_filesystem_location_info_t *pathloc /* IN/OUT */
-);
-
-IMFS_jnode_t *IMFS_create_node(
- rtems_filesystem_location_info_t *parent_loc, /* IN */
- IMFS_jnode_types_t type, /* IN */
- char *name, /* IN */
- mode_t mode, /* IN */
- IMFS_types_union *info /* IN */
-);
-
-int IMFS_evaluate_for_make(
- const char *path, /* IN */
- rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
- const char **name /* OUT */
-);
-
-int IMFS_mount(
- rtems_filesystem_mount_table_entry_t *mt_entry /* IN */
-);
-
-int IMFS_unmount(
- rtems_filesystem_mount_table_entry_t *mt_entry /* IN */
-);
-
-int IMFS_freenod(
- rtems_filesystem_location_info_t *node /* IN/OUT */
-);
-
-int IMFS_memfile_remove(
- IMFS_jnode_t *the_jnode /* IN/OUT */
-);
-
-int memfile_ftruncate(
- rtems_libio_t *iop, /* IN */
- off_t length /* IN */
-);
-
-int imfs_dir_open(
- rtems_libio_t *iop, /* IN */
- const char *pathname, /* IN */
- unsigned32 flag, /* IN */
- unsigned32 mode /* IN */
-);
-
-int imfs_dir_close(
- rtems_libio_t *iop /* IN */
-);
-
-int imfs_dir_read(
- rtems_libio_t *iop, /* IN */
- void *buffer, /* IN */
- unsigned32 count /* IN */
-);
-
-int imfs_dir_lseek(
- rtems_libio_t *iop, /* IN */
- off_t offset, /* IN */
- int whence /* IN */
-);
-
-int imfs_dir_fstat(
- rtems_filesystem_location_info_t *loc, /* IN */
- struct stat *buf /* OUT */
-);
-
-int imfs_dir_rmnod(
- rtems_filesystem_location_info_t *pathloc /* IN */
-);
-
-int memfile_open(
- rtems_libio_t *iop, /* IN */
- const char *pathname, /* IN */
- unsigned32 flag, /* IN */
- unsigned32 mode /* IN */
-);
-
-int memfile_close(
- rtems_libio_t *iop /* IN */
-);
-
-int memfile_read(
- rtems_libio_t *iop, /* IN */
- void *buffer, /* IN */
- unsigned32 count /* IN */
-);
-
-int memfile_write(
- rtems_libio_t *iop, /* IN */
- const void *buffer, /* IN */
- unsigned32 count /* IN */
-);
-
-int memfile_ioctl(
- rtems_libio_t *iop, /* IN */
- unsigned32 command, /* IN */
- void *buffer /* IN */
-);
-
-int memfile_lseek(
- rtems_libio_t *iop, /* IN */
- off_t offset, /* IN */
- int whence /* IN */
-);
-
-int memfile_rmnod(
- rtems_filesystem_location_info_t *pathloc /* IN */
-);
-
-int device_open(
- rtems_libio_t *iop, /* IN */
- const char *pathname, /* IN */
- unsigned32 flag, /* IN */
- unsigned32 mode /* IN */
-);
-
-int device_close(
- rtems_libio_t *iop /* IN */
-);
-
-int device_read(
- rtems_libio_t *iop, /* IN */
- void *buffer, /* IN */
- unsigned32 count /* IN */
-);
-
-int device_write(
- rtems_libio_t *iop, /* IN */
- const void *buffer, /* IN */
- unsigned32 count /* IN */
-);
-
-int device_ioctl(
- rtems_libio_t *iop, /* IN */
- unsigned32 command, /* IN */
- void *buffer /* IN */
-);
-
-int device_lseek(
- rtems_libio_t *iop, /* IN */
- off_t offset, /* IN */
- int whence /* IN */
-);
-
-int IMFS_utime(
- rtems_filesystem_location_info_t *pathloc, /* IN */
- time_t actime, /* IN */
- time_t modtime /* IN */
-);
-
-int IMFS_fchmod(
- rtems_filesystem_location_info_t *loc,
- mode_t mode
-);
-
-int IMFS_symlink(
- rtems_filesystem_location_info_t *parent_loc, /* IN */
- const char *link_name,
- const char *node_name
-);
-
-int IMFS_readlink(
- rtems_filesystem_location_info_t *loc, /* IN */
- char *buf, /* OUT */
- size_t bufsize
-);
-
-int IMFS_fdatasync(
- rtems_libio_t *iop
-);
-
-int IMFS_fcntl(
- int cmd,
- rtems_libio_t *iop
-);
-
-int IMFS_rmnod(
- rtems_filesystem_location_info_t *pathloc /* IN */
-);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/libfs/src/imfs/imfs_chown.c b/cpukit/libfs/src/imfs/imfs_chown.c
deleted file mode 100644
index d9e8f40e7f..0000000000
--- a/cpukit/libfs/src/imfs/imfs_chown.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * IMFS_chown
- *
- * This routine is the implementation of the chown() system
- * call for the IMFS.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-#include "libio_.h"
-#include "imfs.h"
-
-int IMFS_chown(
- rtems_filesystem_location_info_t *pathloc, /* IN */
- uid_t owner, /* IN */
- gid_t group /* IN */
-)
-{
- IMFS_jnode_t *jnode;
-#if defined(RTEMS_POSIX_API)
- uid_t st_uid;
-#endif
-
- jnode = (IMFS_jnode_t *) pathloc->node_access;
-
- /*
- * Verify I am the owner of the node or the super user.
- */
-
-#if defined(RTEMS_POSIX_API)
- st_uid = geteuid();
-
- if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
- set_errno_and_return_minus_one( EPERM );
-#endif
-
- jnode->st_uid = owner;
- jnode->st_gid = group;
-
- IMFS_update_ctime( jnode );
-
- return 0;
-}
diff --git a/cpukit/libfs/src/imfs/imfs_creat.c b/cpukit/libfs/src/imfs/imfs_creat.c
deleted file mode 100644
index 227b5f9300..0000000000
--- a/cpukit/libfs/src/imfs/imfs_creat.c
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * IMFS_create_node()
- *
- * Routine to create a new in memory file system node.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
-#include "imfs.h"
-#include "libio_.h"
-
-IMFS_jnode_t *IMFS_create_node(
- rtems_filesystem_location_info_t *parent_loc,
- IMFS_jnode_types_t type,
- char *name,
- mode_t mode,
- IMFS_types_union *info
-)
-{
- IMFS_jnode_t *node;
- struct timeval tv;
- IMFS_jnode_t *parent = NULL;
- IMFS_fs_info_t *fs_info;
- char *sym_name;
-
- if ( parent_loc != NULL )
- parent = parent_loc->node_access;
-
- /*
- * Allocate an IMFS jnode
- */
-
- node = calloc( 1, sizeof( IMFS_jnode_t ) );
- if ( !node )
- return NULL;
-
- /*
- * Fill in the basic information
- */
-
- node->st_nlink = 1;
- node->type = type;
- strncpy( node->name, name, IMFS_NAME_MAX );
-
- /*
- * Fill in the mode and permission information for the jnode structure.
- */
-
- node->st_mode = mode & ~rtems_filesystem_umask;
-
-#if defined(RTEMS_POSIX_API)
- node->st_uid = geteuid();
- node->st_gid = getegid();
-#else
- node->st_uid = 0;
- node->st_gid = 0;
-#endif
-
- /*
- * Now set all the times.
- */
-
- gettimeofday( &tv, 0 );
-
- node->st_atime = (time_t) tv.tv_sec;
- node->st_mtime = (time_t) tv.tv_sec;
- node->st_ctime = (time_t) tv.tv_sec;
-
- /*
- * Set the type specific information
- */
-
- switch (type) {
- case IMFS_DIRECTORY:
- Chain_Initialize_empty(&node->info.directory.Entries);
- break;
-
- case IMFS_HARD_LINK:
- node->info.hard_link.link_node = info->hard_link.link_node;
- break;
-
- case IMFS_SYM_LINK:
- sym_name = calloc( 1, strlen( info->sym_link.name ) + 1 );
- strcpy( sym_name, info->sym_link.name );
- node->info.sym_link.name = sym_name;
- break;
-
- case IMFS_DEVICE:
- node->info.device.major = info->device.major;
- node->info.device.minor = info->device.minor;
- break;
-
- case IMFS_MEMORY_FILE:
- node->info.file.size = 0;
- node->info.file.indirect = 0;
- node->info.file.doubly_indirect = 0;
- node->info.file.triply_indirect = 0;
- break;
-
- default:
- assert(0);
- break;
- }
-
- /*
- * If this node has a parent, then put it in that directory list.
- */
-
- if ( parent ) {
- Chain_Append( &parent->info.directory.Entries, &node->Node );
- node->Parent = parent;
-
- fs_info = parent_loc->mt_entry->fs_info;
- node->st_ino = ++fs_info->ino_count;
- }
-
-
- return node;
-}
diff --git a/cpukit/libfs/src/imfs/imfs_debug.c b/cpukit/libfs/src/imfs/imfs_debug.c
deleted file mode 100644
index f8151c6c0f..0000000000
--- a/cpukit/libfs/src/imfs/imfs_debug.c
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * IMFS debug support routines
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <assert.h>
-#include <string.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <unistd.h> /* for close */
-
-#include <stdio.h>
-#include <sys/stat.h>
-
-#include "imfs.h"
-#include "libio_.h"
-
-/*
- * IMFS_types
- *
- * Printable names for each of the IMFS file system types.
- */
-
-char *IMFS_types[ IMFS_NUMBER_OF_TYPES ] = {
- "directory",
- "device",
- "link",
- "memory file"
-};
-
-/*
- * IMFS_print_jnode
- *
- * This routine prints the contents of the specified jnode.
- */
-
-void IMFS_print_jnode(
- IMFS_jnode_t *the_jnode
-)
-{
- assert( the_jnode );
-
- printf( "%s", the_jnode->name );
- switch( the_jnode->type ) {
- case IMFS_DIRECTORY:
- printf( "/" );
- break;
-
- case IMFS_DEVICE:
- printf( " (device %d, %d)",
- the_jnode->info.device.major, the_jnode->info.device.minor );
- break;
-
- case IMFS_MEMORY_FILE:
- printf( " (file %d %p %p %p)",
- (int)the_jnode->info.file.size,
- the_jnode->info.file.indirect,
- the_jnode->info.file.doubly_indirect,
- the_jnode->info.file.triply_indirect
- );
- break;
-
- case IMFS_HARD_LINK:
- printf( " links not printed\n" );
- assert(0);
- break;
-
- case IMFS_SYM_LINK:
- printf( " links not printed\n" );
- assert(0);
- break;
-
- default:
- printf( " bad type %d\n", the_jnode->type );
- assert(0);
- break;
- }
- puts("");
-}
-
-/*
- * IMFS_dump_directory
- *
- * This routine prints the contents of a directory in the IMFS. If a
- * directory is encountered, then this routine will recurse to process
- * the subdirectory.
- */
-
-void IMFS_dump_directory(
- IMFS_jnode_t *the_directory,
- int level
-)
-{
- Chain_Node *the_node;
- Chain_Control *the_chain;
- IMFS_jnode_t *the_jnode;
- int i;
-
- assert( the_directory );
-
- assert( level >= 0 );
-
- assert( the_directory->type == IMFS_DIRECTORY );
-
- the_chain = &the_directory->info.directory.Entries;
-
- for ( the_node = the_chain->first;
- !_Chain_Is_tail( the_chain, the_node );
- the_node = the_node->next ) {
-
- the_jnode = (IMFS_jnode_t *) the_node;
-
- for ( i=0 ; i<=level ; i++ )
- printf( "...." );
- IMFS_print_jnode( the_jnode );
- if ( the_jnode->type == IMFS_DIRECTORY )
- IMFS_dump_directory( the_jnode, level + 1 );
- }
-}
-
-/*
- * IMFS_dump
- *
- * This routine dumps the entire IMFS that is mounted at the root
- * directory.
- *
- * NOTE: Assuming the "/" directory is bad.
- * Not checking that the starting directory is in an IMFS is bad.
- */
-
-void IMFS_dump( void )
-{
- printf( "*************** Dump of Entire IMFS ***************\n" );
- printf( "/\n" );
- IMFS_dump_directory( rtems_filesystem_root.node_access, 0 );
- printf( "*************** End of Dump ***************\n" );
-}
-
-/*
- * IMFS_memfile_maximum_size()
- *
- * This routine returns the size of the largest file which can be created
- * using the IMFS memory file type.
- *
- */
-
-int IMFS_memfile_maximum_size( void )
-{
- return IMFS_MEMFILE_MAXIMUM_SIZE;
-}
diff --git a/cpukit/libfs/src/imfs/imfs_directory.c b/cpukit/libfs/src/imfs/imfs_directory.c
deleted file mode 100644
index 1f6d9b5ff5..0000000000
--- a/cpukit/libfs/src/imfs/imfs_directory.c
+++ /dev/null
@@ -1,347 +0,0 @@
-/*
- * XXX
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <chain.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-#include <dirent.h>
-
-#include "imfs.h"
-#include "libio_.h"
-
-/* -----------------------------------------------------------------------
- * This rountine will verify that the node being opened as a directory is
- * in fact a directory node. If it is then the offset into the directory
- * will be set to 0 to position to the first directory entry.
- */
-
-int imfs_dir_open(
- rtems_libio_t *iop,
- const char *pathname,
- unsigned32 flag,
- unsigned32 mode
-)
-{
- IMFS_jnode_t *the_jnode;
-
- /* Is the node a directory ? */
- the_jnode = (IMFS_jnode_t *) iop->file_info;
-
- if ( the_jnode->type != IMFS_DIRECTORY )
- return -1; /* It wasn't a directory --> return error */
-
- iop->offset = 0;
- return 0;
-}
-
-
-
-/* -----------------------------------------------------------------------
- * This routine will read the next directory entry based on the directory
- * offset. The offset should be equal to -n- time the size of an individual
- * dirent structure. If n is not an integer multiple of the sizeof a
- * dirent structure, an integer division will be performed to determine
- * directory entry that will be returned in the buffer. Count should reflect
- * -m- times the sizeof dirent bytes to be placed in the buffer.
- * If there are not -m- dirent elements from the current directory position
- * to the end of the exisiting file, the remaining entries will be placed in
- * the buffer and the returned value will be equal to -m actual- times the
- * size of a directory entry.
- */
-
-int imfs_dir_read(
- rtems_libio_t *iop,
- void *buffer,
- unsigned32 count
-)
-{
- /*
- * Read up to element iop->offset in the directory chain of the
- * imfs_jnode_t struct for this file descriptor.
- */
- Chain_Node *the_node;
- Chain_Control *the_chain;
- IMFS_jnode_t *the_jnode;
- int bytes_transferred;
- int current_entry;
- int first_entry;
- int last_entry;
- struct dirent tmp_dirent;
-
- the_jnode = (IMFS_jnode_t *)iop->file_info;
- the_chain = &the_jnode->info.directory.Entries;
-
- if ( Chain_Is_empty( the_chain ) )
- return 0;
-
- /* Move to the first of the desired directory entries */
- the_node = the_chain->first;
-
- bytes_transferred = 0;
- first_entry = iop->offset;
- /* protect against using sizes that are not exact multiples of the */
- /* -dirent- size. These could result in unexpected results */
- last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent);
-
- /* The directory was not empty so try to move to the desired entry in chain*/
- for(
- current_entry = 0;
- current_entry < last_entry;
- current_entry = current_entry + sizeof(struct dirent) ){
-
- if ( Chain_Is_tail( the_chain, the_node ) ){
- /* We hit the tail of the chain while trying to move to the first */
- /* entry in the read */
- return bytes_transferred; /* Indicate that there are no more */
- /* entries to return */
- }
-
- if( current_entry >= first_entry ) {
- /* Move the entry to the return buffer */
- tmp_dirent.d_ino = 1;
- tmp_dirent.d_off = current_entry;
- tmp_dirent.d_reclen = sizeof( struct dirent );
- the_jnode = (IMFS_jnode_t *) the_node;
- tmp_dirent.d_namlen = strlen( the_jnode->name );
- strcpy( tmp_dirent.d_name, the_jnode->name );
- memcpy(
- buffer + bytes_transferred,
- (void *)&tmp_dirent,
- sizeof( struct dirent )
- );
- iop->offset = iop->offset + sizeof(struct dirent);
- bytes_transferred = bytes_transferred + sizeof( struct dirent );
- }
-
- the_node = the_node->next;
- }
-
- /* Success */
- return bytes_transferred;
-}
-
-
-
-/* -----------------------------------------------------------------------
- * This routine will be called by the generic close routine to cleanup any
- * resources that have been allocated for the management of the file
- */
-
-int imfs_dir_close(
- rtems_libio_t *iop
-)
-{
- /* The generic close routine handles the deallocation of the file control */
- /* and associated memory. At present the imfs_dir_close simply */
- /* returns a successful completion status */
-
- return 0;
-}
-
-
-
-/* -----------------------------------------------------------------------
- * This routine will behave in one of three ways based on the state of
- * argument whence. Based on the state of its value the offset argument will
- * be interpreted using one of the following methods:
- *
- * SEEK_SET - offset is the absolute byte offset from the start of the
- * logical start of the dirent sequence that represents the
- * directory
- * SEEK_CUR - offset is used as the relative byte offset from the current
- * directory position index held in the iop structure
- * SEEK_END - N/A --> This will cause an assert.
- */
-
-int imfs_dir_lseek(
- rtems_libio_t *iop,
- off_t offset,
- int whence
-)
-{
- off_t normal_offset;
-
- normal_offset = (offset/sizeof(struct dirent)) * sizeof(struct dirent);
-
-
- switch( whence )
- {
- case SEEK_SET: /* absolute move from the start of the file */
- iop->offset = normal_offset;
- break;
-
- case SEEK_CUR: /* relative move */
- iop->offset = iop->offset + normal_offset;
- break;
-
- case SEEK_END: /* Movement past the end of the directory via lseek */
- /* is not a permitted operation */
- default:
- set_errno_and_return_minus_one( EINVAL );
- break;
-
- }
-
- return 0;
-}
-
-
-
-/* -----------------------------------------------------------------------
- * This routine will obtain the following information concerning the current
- * directory:
- * st_dev 0ll
- * st_ino 1
- * st_mode mode extracted from the jnode
- * st_nlink number of links to this node
- * st_uid uid extracted from the jnode
- * st_gid gid extracted from the jnode
- * st_rdev 0ll
- * st_size the number of bytes in the directory
- * This is calculated by taking the number of entries
- * in the directory and multiplying by the size of a
- * dirent structure
- * st_blksize 0
- * st_blocks 0
- * st_atime time of last access
- * st_mtime time of last modification
- * st_ctime time of the last change
- *
- * This information will be returned to the calling function in a -stat- struct
- *
- */
-
-int imfs_dir_fstat(
- rtems_filesystem_location_info_t *loc,
- struct stat *buf
-)
-{
- Chain_Node *the_node;
- Chain_Control *the_chain;
- IMFS_jnode_t *the_jnode;
-
-
- the_jnode = (IMFS_jnode_t *) loc->node_access;
-
- buf->st_dev = 0ll;
- buf->st_ino = the_jnode->st_ino;
- buf->st_mode = the_jnode->st_mode;
- buf->st_nlink = the_jnode->st_nlink;
- buf->st_uid = the_jnode->st_uid;
- buf->st_gid = the_jnode->st_gid;
- buf->st_rdev = 0ll;
- buf->st_blksize = 0;
- buf->st_blocks = 0;
- buf->st_atime = the_jnode->st_atime;
- buf->st_mtime = the_jnode->st_mtime;
- buf->st_ctime = the_jnode->st_ctime;
-
- buf->st_size = 0;
-
- the_chain = &the_jnode->info.directory.Entries;
-
- /* Run through the chain and count the number of directory entries */
- /* that are subordinate to this directory node */
- for ( the_node = the_chain->first ;
- !_Chain_Is_tail( the_chain, the_node ) ;
- the_node = the_node->next ) {
-
- buf->st_size = buf->st_size + sizeof( struct dirent );
- }
-
- return 0;
-}
-
-/*
- * IMFS_dir_rmnod
- *
- * This routine is available from the optable to remove a node
- * from the IMFS file system.
- */
-
-int imfs_dir_rmnod(
- rtems_filesystem_location_info_t *pathloc /* IN */
-)
-{
- IMFS_jnode_t *the_jnode;
-
- the_jnode = (IMFS_jnode_t *) pathloc->node_access;
-
- /*
- * You cannot remove a node that still has children
- */
-
- if ( ! Chain_Is_empty( &the_jnode->info.directory.Entries ) )
- set_errno_and_return_minus_one( ENOTEMPTY );
-
- /*
- * You cannot remove the file system root node.
- */
-
- if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access )
- set_errno_and_return_minus_one( EBUSY );
-
- /*
- * You cannot remove a mountpoint.
- */
-
- if ( the_jnode->info.directory.mt_fs != NULL )
- set_errno_and_return_minus_one( EBUSY );
-
- /*
- * Take the node out of the parent's chain that contains this node
- */
-
- if ( the_jnode->Parent != NULL ) {
- Chain_Extract( (Chain_Node *) the_jnode );
- the_jnode->Parent = NULL;
- }
-
- /*
- * Decrement the link counter and see if we can free the space.
- */
-
- the_jnode->st_nlink--;
- IMFS_update_ctime( the_jnode );
-
- /*
- * The file cannot be open and the link must be less than 1 to free.
- */
-
- if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) {
-
- /*
- * Is the rtems_filesystem_current is this node?
- */
-
- if ( rtems_filesystem_current.node_access == pathloc->node_access )
- rtems_filesystem_current.node_access = NULL;
-
- /*
- * Free memory associated with a memory file.
- */
-
- free( the_jnode );
- }
-
- return 0;
-
-}
-
-
diff --git a/cpukit/libfs/src/imfs/imfs_eval.c b/cpukit/libfs/src/imfs/imfs_eval.c
deleted file mode 100644
index 1f1e7c6daf..0000000000
--- a/cpukit/libfs/src/imfs/imfs_eval.c
+++ /dev/null
@@ -1,639 +0,0 @@
-/*
- * Evaluation IMFS Node Support Routines
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <assert.h>
-
-#include "imfs.h"
-#include "libio_.h"
-
-#define RTEMS_LIBIO_PERMS_RX (RTEMS_LIBIO_PERMS_SEARCH | RTEMS_LIBIO_PERMS_READ)
-#define RTEMS_LIBIO_PERMS_WX (RTEMS_LIBIO_PERMS_SEARCH | RTEMS_LIBIO_PERMS_WRITE)
-
-#define MAXSYMLINK 5
-
-int IMFS_Set_handlers(
- rtems_filesystem_location_info_t *loc
-)
-{
- IMFS_jnode_t *node = loc->node_access;
- IMFS_fs_info_t *fs_info;
-
- fs_info = loc->mt_entry->fs_info;
- switch( node->type ) {
- case IMFS_DIRECTORY:
- loc->handlers = fs_info->directory_handlers;
- break;
- case IMFS_DEVICE:
- loc->handlers = &IMFS_device_handlers;
- break;
- case IMFS_SYM_LINK:
- case IMFS_HARD_LINK:
- loc->handlers = &IMFS_link_handlers;
- break;
- case IMFS_MEMORY_FILE:
- loc->handlers = fs_info->memfile_handlers;
- break;
- }
-
- return 0;
-}
-
-/*
- * IMFS_evaluate_permission
- *
- * The following routine evaluates that we have permission
- * to do flags on the node.
- */
-
-int IMFS_evaluate_permission(
- rtems_filesystem_location_info_t *node,
- int flags
-)
-{
- uid_t st_uid;
- gid_t st_gid;
- IMFS_jnode_t *jnode;
- int flags_to_test;
-
- if ( !rtems_libio_is_valid_perms( flags ) ) {
- assert( 0 );
- set_errno_and_return_minus_one( EIO );
- }
-
- jnode = node->node_access;
-
-#if defined(RTEMS_POSIX_API)
- st_uid = geteuid();
- st_gid = getegid();
-#else
- st_uid = jnode->st_uid;
- st_gid = jnode->st_gid;
-#endif
-
- /*
- * Check if I am owner or a group member or someone else.
- */
-
- flags_to_test = flags;
-
- if ( st_uid == jnode->st_uid )
- flags_to_test <<= 6;
- else if ( st_gid == jnode->st_gid )
- flags_to_test <<= 3;
- else
- /* must be other - do nothing */;
-
- /*
- * If all of the flags are set we have permission
- * to do this.
- */
- if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
- return 1;
-
- return 0;
-}
-
-/*
- * IMFS_evaluate_hard_link
- *
- * The following routine evaluates a hardlink to the actual node.
- */
-
-int IMFS_evaluate_hard_link(
- rtems_filesystem_location_info_t *node, /* IN/OUT */
- int flags /* IN */
-)
-{
- IMFS_jnode_t *jnode = node->node_access;
- int result = 0;
-
- /*
- * Check for things that should never happen.
- */
-
- if ( jnode->type != IMFS_HARD_LINK )
- rtems_fatal_error_occurred (0xABCD0000);
-
- /*
- * Set the hard link value and the handlers.
- */
-
- node->node_access = jnode->info.hard_link.link_node;
-
- IMFS_Set_handlers( node );
-
- /*
- * Verify we have the correct permissions for this node.
- */
-
- if ( !IMFS_evaluate_permission( node, flags ) )
- set_errno_and_return_minus_one( EACCES );
-
- return result;
-}
-
-
-/*
- * IMFS_evaluate_sym_link
- *
- * The following routine evaluates a symbolic link to the actual node.
- */
-
-int IMFS_evaluate_sym_link(
- rtems_filesystem_location_info_t *node, /* IN/OUT */
- int flags /* IN */
-)
-{
- IMFS_jnode_t *jnode = node->node_access;
- int result = 0;
- int i;
-
- /*
- * Check for things that should never happen.
- */
-
- if ( jnode->type != IMFS_SYM_LINK )
- rtems_fatal_error_occurred (0xABCD0000);
-
- if ( !jnode->Parent )
- rtems_fatal_error_occurred( 0xBAD00000 );
-
-
- /*
- * Move the node_access to either the symbolic links parent or
- * root depending on the symbolic links path.
- */
-
- node->node_access = jnode->Parent;
-
- rtems_filesystem_get_sym_start_loc(
- jnode->info.sym_link.name,
- &i,
- node
- );
-
- /*
- * Use eval path to evaluate the path of the symbolic link.
- */
-
- result = IMFS_eval_path(
- &jnode->info.sym_link.name[i],
- flags,
- node
- );
-
- IMFS_Set_handlers( node );
-
- /*
- * Verify we have the correct permissions for this node.
- */
-
- if ( !IMFS_evaluate_permission( node, flags ) )
- set_errno_and_return_minus_one( EACCES );
-
- return result;
-}
-
-/*
- * IMFS_evaluate_link
- *
- * The following routine returns the real node pointed to by a link.
- */
-
-int IMFS_evaluate_link(
- rtems_filesystem_location_info_t *node, /* IN/OUT */
- int flags /* IN */
-)
-{
- IMFS_jnode_t *jnode;
- int result = 0;
-
- do {
- jnode = node->node_access;
-
- /*
- * Increment and check the link counter.
- */
-
- rtems_filesystem_link_counts ++;
- if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
- rtems_filesystem_link_counts = 0;
- set_errno_and_return_minus_one( ELOOP );
- }
-
- /*
- * Follow the Link node.
- */
-
- if ( jnode->type == IMFS_HARD_LINK )
- result = IMFS_evaluate_hard_link( node, flags );
-
- else if (jnode->type == IMFS_SYM_LINK )
- result = IMFS_evaluate_sym_link( node, flags );
-
- } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
- ( jnode->type == IMFS_HARD_LINK ) ) );
-
- /*
- * Clear link counter.
- */
-
- rtems_filesystem_link_counts = 0;
-
- return result;
-}
-
-
-/*
- * IMFS_evaluate_for_make
- *
- * The following routine evaluate path for a new node to be created.
- * pathloc is returned with a pointer to the parent of the new node.
- * name is returned with a pointer to the first character in the
- * new node name. The parent node is verified to be a directory.
- */
-
-int IMFS_evaluate_for_make(
- const char *path, /* IN */
- rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
- const char **name /* OUT */
-)
-{
- int i = 0;
- int len;
- IMFS_token_types type;
- char token[ IMFS_NAME_MAX + 1 ];
- rtems_filesystem_location_info_t newloc;
- IMFS_jnode_t *node;
- int done = 0;
- int result;
-
- /*
- * This was filled in by the caller and is valid in the
- * mount table.
- */
- node = pathloc->node_access;
-
- /*
- * Evaluate all tokens until we are done or an error occurs.
- */
-
- while( !done ) {
-
- type = IMFS_get_token( &path[i], token, &len );
- i += len;
-
- if ( !pathloc->node_access )
- set_errno_and_return_minus_one( ENOENT );
-
- /*
- * I cannot move out of this directory without execute permission.
- */
-
- if ( type != IMFS_NO_MORE_PATH )
- if ( node->type == IMFS_DIRECTORY )
- if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
- set_errno_and_return_minus_one( EACCES );
-
- node = pathloc->node_access;
-
- switch( type ) {
-
- case IMFS_UP_DIR:
-
- /*
- * Am I at the root of this mounted filesystem?
- */
-
- if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){
-
- /*
- * Am I at the root of all filesystems?
- */
-
- if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
- break;
-
- } else {
- newloc = pathloc->mt_entry->mt_point_node;
- *pathloc = newloc;
- return (*pathloc->ops->evalformake)( &path[i-len], pathloc, name );
- }
- } else {
-
- if ( !node->Parent )
- set_errno_and_return_minus_one( ENOENT );
-
- node = node->Parent;
- }
-
- pathloc->node_access = node;
- break;
-
- case IMFS_NAME:
-
- if ( node->type == IMFS_HARD_LINK ) {
-
- result = IMFS_evaluate_link( pathloc, 0 );
- if ( result == -1 )
- return -1;
-
- } else if ( node->type == IMFS_SYM_LINK ) {
-
- result = IMFS_evaluate_link( pathloc, 0 );
-
- if ( result == -1 )
- return -1;
- }
-
- node = pathloc->node_access;
- if ( !node )
- set_errno_and_return_minus_one( ENOTDIR );
-
- /*
- * Only a directory can be decended into.
- */
-
- if ( node->type != IMFS_DIRECTORY )
- set_errno_and_return_minus_one( ENOTDIR );
-
- /*
- * If we are at a node that is a mount point. Set loc to the
- * new fs root node and let them finish evaluating the path.
- */
-
- if ( node->info.directory.mt_fs != NULL ) {
- newloc = node->info.directory.mt_fs->mt_fs_root;
- *pathloc = newloc;
- return (*pathloc->ops->evalformake)( &path[i-len], pathloc, name );
- }
-
- /*
- * Otherwise find the token name in the present location.
- */
-
- node = IMFS_find_match_in_dir( node, token );
-
- /*
- * If there is no node we have found the name of the node we
- * wish to create.
- */
-
- if ( ! node )
- done = TRUE;
- else
- pathloc->node_access = node;
-
- break;
-
- case IMFS_NO_MORE_PATH:
- set_errno_and_return_minus_one( EEXIST );
- break;
-
- case IMFS_INVALID_TOKEN:
- set_errno_and_return_minus_one( ENAMETOOLONG );
- break;
-
- case IMFS_CURRENT_DIR:
- break;
- }
- }
-
- *name = &path[ i - len ];
-
- /*
- * We have evaluated the path as far as we can.
- * Verify there is not any invalid stuff at the end of the name.
- */
-
- for( ; path[i] != '\0'; i++) {
- if ( !IMFS_is_separator( path[ i ] ) )
- set_errno_and_return_minus_one( ENOENT );
- }
-
- /*
- * Verify we can execute and write to this directory.
- */
-
- result = IMFS_Set_handlers( pathloc );
-
- /*
- * The returned node must be a directory
- */
- node = pathloc->node_access;
- if ( node->type != IMFS_DIRECTORY )
- set_errno_and_return_minus_one( ENOTDIR );
-
- /*
- * We must have Write and execute permission on the returned node.
- */
-
- if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
- set_errno_and_return_minus_one( EACCES );
-
- return result;
-}
-
-
-/*
- * IMFS_eval_path
- *
- * The following routine evaluate path for a node that wishes to be
- * accessed with mode. pathloc is returned with a pointer to the
- * node to be accessed.
- */
-
-int IMFS_eval_path(
- const char *pathname, /* IN */
- int flags, /* IN */
- rtems_filesystem_location_info_t *pathloc /* IN/OUT */
-)
-{
- int i = 0;
- int len;
- IMFS_token_types type = IMFS_CURRENT_DIR;
- char token[ IMFS_NAME_MAX + 1 ];
- rtems_filesystem_location_info_t newloc;
- IMFS_jnode_t *node;
- int result;
-
- if ( !rtems_libio_is_valid_perms( flags ) ) {
- assert( 0 );
- set_errno_and_return_minus_one( EIO );
- }
-
- /*
- * This was filled in by the caller and is valid in the
- * mount table.
- */
-
- node = pathloc->node_access;
-
- /*
- * Evaluate all tokens until we are done or an error occurs.
- */
-
- while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
-
- type = IMFS_get_token( &pathname[i], token, &len );
- i += len;
-
- if ( !pathloc->node_access )
- set_errno_and_return_minus_one( ENOENT );
-
- /*
- * I cannot move out of this directory without execute permission.
- */
- if ( type != IMFS_NO_MORE_PATH )
- if ( node->type == IMFS_DIRECTORY )
- if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
- set_errno_and_return_minus_one( EACCES );
-
- node = pathloc->node_access;
-
- switch( type ) {
- case IMFS_UP_DIR:
-
- /*
- * Am I at the root of this mounted filesystem?
- */
-
- if (pathloc->node_access ==
- pathloc->mt_entry->mt_fs_root.node_access) {
-
- /*
- * Am I at the root of all filesystems?
- */
-
- if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
- break; /* Throw out the .. in this case */
- } else {
- newloc = pathloc->mt_entry->mt_point_node;
- *pathloc = newloc;
- return (*pathloc->ops->evalpath)(&(pathname[i-len]),flags,pathloc);
- }
- } else {
-
- if ( !node->Parent )
- set_errno_and_return_minus_one( ENOENT );
-
- node = node->Parent;
- pathloc->node_access = node;
-
- }
-
- pathloc->node_access = node;
- break;
-
- case IMFS_NAME:
- /*
- * If we are at a link follow it.
- */
-
- if ( node->type == IMFS_HARD_LINK ) {
-
- IMFS_evaluate_hard_link( pathloc, 0 );
-
- node = pathloc->node_access;
- if ( !node )
- set_errno_and_return_minus_one( ENOTDIR );
-
- } else if ( node->type == IMFS_SYM_LINK ) {
-
- result = IMFS_evaluate_sym_link( pathloc, 0 );
-
- node = pathloc->node_access;
- if ( result == -1 )
- return -1;
- }
-
- /*
- * Only a directory can be decended into.
- */
-
- if ( node->type != IMFS_DIRECTORY )
- set_errno_and_return_minus_one( ENOTDIR );
-
- /*
- * If we are at a node that is a mount point. Set loc to the
- * new fs root node and let them finish evaluating the path.
- */
-
- if ( node->info.directory.mt_fs != NULL ) {
- newloc = node->info.directory.mt_fs->mt_fs_root;
- *pathloc = newloc;
- return (*pathloc->ops->evalpath)( &pathname[i-len], flags, pathloc );
- }
-
- /*
- * Otherwise find the token name in the present location.
- */
-
- node = IMFS_find_match_in_dir( node, token );
- if ( !node )
- set_errno_and_return_minus_one( ENOENT );
-
- /*
- * Set the node access to the point we have found.
- */
-
- pathloc->node_access = node;
- break;
-
- case IMFS_NO_MORE_PATH:
- case IMFS_CURRENT_DIR:
- break;
-
- case IMFS_INVALID_TOKEN:
- set_errno_and_return_minus_one( ENAMETOOLONG );
- break;
-
- }
- }
-
- /*
- * Only return root node if this is the base file system.
- */
-
- if ((pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) &&
- (pathloc->node_access != rtems_filesystem_root.node_access) ) {
- newloc = pathloc->mt_entry->mt_point_node;
- *pathloc = newloc;
- }
-
- result = IMFS_Set_handlers( pathloc );
-
- /*
- * Verify we have the correct permissions for this node.
- */
-
- if ( !IMFS_evaluate_permission( pathloc, flags ) )
- set_errno_and_return_minus_one( EACCES );
-
- return result;
-}
-
-
-
-
-
-
-
-
-
diff --git a/cpukit/libfs/src/imfs/imfs_fchmod.c b/cpukit/libfs/src/imfs/imfs_fchmod.c
deleted file mode 100644
index b766ed74dc..0000000000
--- a/cpukit/libfs/src/imfs/imfs_fchmod.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * IMFS file change mode routine.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-
-#include "libio_.h"
-#include "imfs.h"
-
-int IMFS_fchmod(
- rtems_filesystem_location_info_t *loc,
- mode_t mode
-)
-{
- IMFS_jnode_t *jnode;
-#if defined(RTEMS_POSIX_API)
- uid_t st_uid;
-#endif
-
- jnode = loc->node_access;
-
- /*
- * Verify I am the owner of the node or the super user.
- */
-#if defined(RTEMS_POSIX_API)
- st_uid = geteuid();
-
- if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
- set_errno_and_return_minus_one( EPERM );
-#endif
-
- /*
- * Change only the RWX permissions on the jnode to mode.
- */
- if ( mode & (~ (S_IRWXU | S_IRWXG | S_IRWXO ) ) )
- set_errno_and_return_minus_one( EPERM );
-
- jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO);
- jnode->st_mode |= mode;
-
- IMFS_update_ctime( jnode );
-
- return 0;
-}
-
diff --git a/cpukit/libfs/src/imfs/imfs_fcntl.c b/cpukit/libfs/src/imfs/imfs_fcntl.c
deleted file mode 100644
index c1014a8653..0000000000
--- a/cpukit/libfs/src/imfs/imfs_fcntl.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * IMFS_fcntl
- *
- * The following routine does a fcntl on an IMFS node.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "imfs.h"
-
-int IMFS_fcntl(
- int cmd,
- rtems_libio_t *iop
-)
-{
- return 0;
-}
diff --git a/cpukit/libfs/src/imfs/imfs_fdatasync.c b/cpukit/libfs/src/imfs/imfs_fdatasync.c
deleted file mode 100644
index 6142cc7e0f..0000000000
--- a/cpukit/libfs/src/imfs/imfs_fdatasync.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * IMFS_fdatasync
- *
- * The following routine does a sync on an IMFS node. The In Memory
- * File System is always in sync, therefore this routine always returns
- * pass.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "imfs.h"
-
-int IMFS_fdatasync(
- rtems_libio_t *iop
-)
-{
- return 0;
-}
diff --git a/cpukit/libfs/src/imfs/imfs_free.c b/cpukit/libfs/src/imfs/imfs_free.c
deleted file mode 100644
index 2a5065068c..0000000000
--- a/cpukit/libfs/src/imfs/imfs_free.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Free IMFS Node Support Routines
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-
-#include "libio_.h"
-#include "imfs.h"
-
-/*
- * IMFS_freenodinfo
- *
- * This routine is the IMFS free node handler for the file system
- * operations table.
- *
- * The In Memory File System keeps its nodes in memory. This routine
- * is for file sytems that do not.
- */
-
-int IMFS_freenodinfo(
- rtems_filesystem_location_info_t *pathloc /* IN */
-)
-{
- return 0;
-}
-
diff --git a/cpukit/libfs/src/imfs/imfs_fsunmount.c b/cpukit/libfs/src/imfs/imfs_fsunmount.c
deleted file mode 100644
index 1ae71ee075..0000000000
--- a/cpukit/libfs/src/imfs/imfs_fsunmount.c
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * IMFS Initialization
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h> /* for mkdir */
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdlib.h>
-
-#include <assert.h>
-
-#include "imfs.h"
-#include "libio_.h"
-
-#if defined(IMFS_DEBUG)
-#include <stdio.h>
-#endif
-
-/*
- * IMFS_fsunmount
- */
-
-#define jnode_get_control( jnode ) \
- (&jnode->info.directory.Entries)
-
-#define jnode_has_no_children( jnode ) \
- Chain_Is_empty( jnode_get_control( jnode ) )
-
-#define jnode_has_children( jnode ) \
- ( ! jnode_has_no_children( jnode ) )
-
-#define jnode_get_first_child( jnode ) \
- ((IMFS_jnode_t *)( Chain_Head( jnode_get_control( jnode ) )->next))
-
-int IMFS_fsunmount(
- rtems_filesystem_mount_table_entry_t *temp_mt_entry
-)
-{
- IMFS_jnode_t *jnode;
- IMFS_jnode_t *next;
- rtems_filesystem_location_info_t loc;
- int result = 0;
-
- /*
- * Traverse tree that starts at the mt_fs_root and deallocate memory
- * associated memory space
- */
-
- jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access;
- loc = temp_mt_entry->mt_fs_root;
-
- /*
- * Set this to null to indicate that it is being unmounted.
- */
-
- temp_mt_entry->mt_fs_root.node_access = NULL;
-
- do {
- next = jnode->Parent;
- loc.node_access = (void *)jnode;
- IMFS_Set_handlers( &loc );
-
- if ( jnode->type != IMFS_DIRECTORY ) {
- result = IMFS_unlink( &loc );
- if (result != 0)
- return -1;
- jnode = next;
- } else if ( jnode_has_no_children( jnode ) ) {
- result = IMFS_unlink( &loc );
- if (result != 0)
- return -1;
- jnode = next;
- }
- if ( jnode != NULL ) {
- if ( jnode->type == IMFS_DIRECTORY ) {
- if ( jnode_has_children( jnode ) )
- jnode = jnode_get_first_child( jnode );
- }
- }
- } while (jnode != NULL);
-
- return 0;
-}
-
-
-
-
diff --git a/cpukit/libfs/src/imfs/imfs_getchild.c b/cpukit/libfs/src/imfs/imfs_getchild.c
deleted file mode 100644
index f70a8f292c..0000000000
--- a/cpukit/libfs/src/imfs/imfs_getchild.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * IMFS_find_match_in_dir()
- *
- * This routine returns the child name in the given directory.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-#include <assert.h>
-#include "imfs.h"
-
-static char dotname[2] = ".";
-static char dotdotname[2] = "..";
-
-IMFS_jnode_t *IMFS_find_match_in_dir(
- IMFS_jnode_t *directory,
- char *name
-)
-{
- Chain_Node *the_node;
- Chain_Control *the_chain;
- IMFS_jnode_t *the_jnode;
-
- /*
- * Check for fatal errors. A NULL directory show a problem in the
- * the IMFS code.
- */
-
- assert( directory );
- if ( !name )
- return 0;
-
- assert( name );
- if ( !directory )
- return 0;
-
- /*
- * Check for "." and ".."
- */
-
- if ( !strcmp( name, dotname ) )
- return directory;
-
- if ( !strcmp( name, dotdotname ) )
- return directory->Parent;
-
- the_chain = &directory->info.directory.Entries;
-
- for ( the_node = the_chain->first;
- !_Chain_Is_tail( the_chain, the_node );
- the_node = the_node->next ) {
-
- the_jnode = (IMFS_jnode_t *) the_node;
-
- if ( !strcmp( name, the_jnode->name ) )
- return the_jnode;
- }
-
- return 0;
-}
diff --git a/cpukit/libfs/src/imfs/imfs_gtkn.c b/cpukit/libfs/src/imfs/imfs_gtkn.c
deleted file mode 100644
index 3fd6f8deae..0000000000
--- a/cpukit/libfs/src/imfs/imfs_gtkn.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * IMFS_get_token
- *
- * Routine to get a token (name or separator) from the path
- * the length of the token is returned in token_len.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <stdlib.h>
-#include "imfs.h"
-#include "libio_.h"
-
-IMFS_token_types IMFS_get_token(
- const char *path,
- char *token,
- int *token_len
-)
-{
- register int i = 0;
- IMFS_token_types type = IMFS_NAME;
- register char c;
-
- /*
- * Copy a name into token. (Remember NULL is a token.)
- */
- c = path[i];
- while ( (!IMFS_is_separator(c)) && (i <= IMFS_NAME_MAX) ) {
-
- token[i] = c;
-
- if ( i == IMFS_NAME_MAX )
- return IMFS_INVALID_TOKEN;
-
- if ( !IMFS_is_valid_name_char(c) )
- type = IMFS_INVALID_TOKEN;
-
- c = path [++i];
- }
-
- /*
- * Copy a seperator into token.
- */
-
- if ( i == 0 ) {
- token[i] = c;
-
- if ( token[i] != '\0' ) {
- i++;
- type = IMFS_CURRENT_DIR;
- } else {
- type = IMFS_NO_MORE_PATH;
- }
- } else if (token[ i-1 ] != '\0') {
- token[i] = '\0';
- }
-
- /*
- * Set token_len to the number of characters copied.
- */
-
- *token_len = i;
-
- /*
- * If we copied something that was not a seperator see if
- * it was a special name.
- */
-
- if ( type == IMFS_NAME ) {
- if ( strcmp( token, "..") == 0 )
- type = IMFS_UP_DIR;
- else if ( strcmp( token, "." ) == 0 )
- type = IMFS_CURRENT_DIR;
- }
-
- return type;
-}
diff --git a/cpukit/libfs/src/imfs/imfs_handlers_device.c b/cpukit/libfs/src/imfs/imfs_handlers_device.c
deleted file mode 100644
index 4431819a94..0000000000
--- a/cpukit/libfs/src/imfs/imfs_handlers_device.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Device Operations Table for the IMFS
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-
-#include "imfs.h"
-
-/*
- * Handler table for IMFS device nodes
- */
-
-rtems_filesystem_file_handlers_r IMFS_device_handlers = {
- device_open,
- device_close,
- device_read,
- device_write,
- device_ioctl,
- device_lseek,
- IMFS_stat,
- IMFS_fchmod,
- NULL, /* ftruncate */
- NULL, /* fpathconf */
- NULL, /* fsync */
- NULL, /* fdatasync */
- NULL, /* fcntl */
- IMFS_rmnod
-};
diff --git a/cpukit/libfs/src/imfs/imfs_handlers_directory.c b/cpukit/libfs/src/imfs/imfs_handlers_directory.c
deleted file mode 100644
index 21370c194d..0000000000
--- a/cpukit/libfs/src/imfs/imfs_handlers_directory.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Operations Table for Directories for the IMFS
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-
-#include "imfs.h"
-
-/*
- * Set of operations handlers for operations on directories.
- */
-
-rtems_filesystem_file_handlers_r IMFS_directory_handlers = {
- imfs_dir_open,
- imfs_dir_close,
- imfs_dir_read,
- NULL, /* write */
- NULL, /* ioctl */
- imfs_dir_lseek,
- imfs_dir_fstat,
- IMFS_fchmod,
- NULL, /* ftruncate */
- NULL, /* fpathconf */
- NULL, /* fsync */
- IMFS_fdatasync,
- IMFS_fcntl,
- imfs_dir_rmnod
-};
-
-
-
-
-
-
-
-
diff --git a/cpukit/libfs/src/imfs/imfs_handlers_link.c b/cpukit/libfs/src/imfs/imfs_handlers_link.c
deleted file mode 100644
index b0a057c068..0000000000
--- a/cpukit/libfs/src/imfs/imfs_handlers_link.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Link Operations Table for the IMFS
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-
-#include "imfs.h"
-
-/*
- * Handler table for IMFS device nodes
- */
-
-rtems_filesystem_file_handlers_r IMFS_link_handlers = {
- NULL, /* open */
- NULL, /* close */
- NULL, /* read */
- NULL, /* write */
- NULL, /* ioctl */
- NULL, /* lseek */
- NULL, /* stat */
- NULL, /* fchmod */
- NULL, /* ftruncate */
- NULL, /* fpathconf */
- NULL, /* fsync */
- NULL, /* fdatasync */
- NULL, /* fcntl */
- IMFS_rmnod
-};
diff --git a/cpukit/libfs/src/imfs/imfs_handlers_memfile.c b/cpukit/libfs/src/imfs/imfs_handlers_memfile.c
deleted file mode 100644
index 5133b87198..0000000000
--- a/cpukit/libfs/src/imfs/imfs_handlers_memfile.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Memfile Operations Tables for the IMFS
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-
-#include "imfs.h"
-
-/*
- * Set of operations handlers for operations on memfile entities.
- */
-
-rtems_filesystem_file_handlers_r IMFS_memfile_handlers = {
- memfile_open,
- memfile_close,
- memfile_read,
- memfile_write,
- memfile_ioctl,
- memfile_lseek,
- IMFS_stat,
- IMFS_fchmod,
- memfile_ftruncate,
- NULL, /* fpathconf */
- IMFS_fdatasync, /* fsync */
- IMFS_fdatasync,
- IMFS_fcntl,
- memfile_rmnod
-};
diff --git a/cpukit/libfs/src/imfs/imfs_init.c b/cpukit/libfs/src/imfs/imfs_init.c
deleted file mode 100644
index c2630af78e..0000000000
--- a/cpukit/libfs/src/imfs/imfs_init.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * IMFS Initialization
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h> /* for mkdir */
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdlib.h>
-
-#include <assert.h>
-
-#include "imfs.h"
-#include "libio_.h"
-
-#if defined(IMFS_DEBUG)
-#include <stdio.h>
-#endif
-
-/*
- * IMFS file system operations table
- */
-
-rtems_filesystem_operations_table IMFS_ops = {
- IMFS_eval_path,
- IMFS_evaluate_for_make,
- IMFS_link,
- IMFS_unlink,
- IMFS_node_type,
- IMFS_mknod,
- IMFS_chown,
- IMFS_freenodinfo,
- IMFS_mount,
- IMFS_initialize,
- IMFS_unmount,
- IMFS_fsunmount,
- IMFS_utime,
- IMFS_evaluate_link,
- IMFS_symlink,
- IMFS_readlink
-};
-
-/*
- * IMFS_initialize
- */
-
-int IMFS_initialize(
- rtems_filesystem_mount_table_entry_t *temp_mt_entry
-)
-{
- IMFS_initialize_support(
- temp_mt_entry,
- &IMFS_ops,
- &IMFS_memfile_handlers,
- &IMFS_directory_handlers
- );
- return 0;
-}
diff --git a/cpukit/libfs/src/imfs/imfs_initsupp.c b/cpukit/libfs/src/imfs/imfs_initsupp.c
deleted file mode 100644
index 408789760e..0000000000
--- a/cpukit/libfs/src/imfs/imfs_initsupp.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * IMFS Initialization
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h> /* for mkdir */
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdlib.h>
-
-#include <assert.h>
-
-#include "imfs.h"
-#include "libio_.h"
-
-#if defined(IMFS_DEBUG)
-#include <stdio.h>
-#endif
-
-/*
- * IMFS_initialize
- */
-
-int IMFS_initialize_support(
- rtems_filesystem_mount_table_entry_t *temp_mt_entry,
- rtems_filesystem_operations_table *op_table,
- rtems_filesystem_file_handlers_r *memfile_handlers,
- rtems_filesystem_file_handlers_r *directory_handlers
-)
-{
- IMFS_fs_info_t *fs_info;
- IMFS_jnode_t *jnode;
-
- /*
- * Create the root node
- */
-
- temp_mt_entry->mt_fs_root.node_access = IMFS_create_node(
- NULL,
- IMFS_DIRECTORY,
- "",
- ( S_IRWXO | S_IRWXG| S_IRWXU ),
- NULL
- );
-
- temp_mt_entry->mt_fs_root.handlers = directory_handlers;
- temp_mt_entry->mt_fs_root.ops = op_table;
- temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
-
- /*
- * Create custom file system data.
- */
- fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
- if ( !fs_info ){
- free(temp_mt_entry->mt_fs_root.node_access);
- return 1;
- }
- temp_mt_entry->fs_info = fs_info;
-
- /*
- * Set st_ino for the root to 1.
- */
-
- fs_info->ino_count = 1;
- fs_info->memfile_handlers = memfile_handlers;
- fs_info->directory_handlers = directory_handlers;
-
- jnode = temp_mt_entry->mt_fs_root.node_access;
- jnode->st_ino = fs_info->ino_count;
-
- return 0;
-}
diff --git a/cpukit/libfs/src/imfs/imfs_link.c b/cpukit/libfs/src/imfs/imfs_link.c
deleted file mode 100644
index 6a8fa3c3ef..0000000000
--- a/cpukit/libfs/src/imfs/imfs_link.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * IMFS_link
- *
- * The following rouine creates a new link node under parent with the
- * name given in name. The link node is set to point to the node at
- * to_loc.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-#include "imfs.h"
-#include "libio_.h"
-
-int IMFS_link(
- rtems_filesystem_location_info_t *to_loc, /* IN */
- rtems_filesystem_location_info_t *parent_loc, /* IN */
- const char *token /* IN */
-)
-{
- IMFS_types_union info;
- IMFS_jnode_t *new_node;
- char new_name[ IMFS_NAME_MAX + 1 ];
- int i;
-
- /*
- * Verify this node can be linked to.
- */
-
- info.hard_link.link_node = to_loc->node_access;
- if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
- set_errno_and_return_minus_one( EMLINK );
-
- /*
- * Remove any separators at the end of the string.
- */
-
- IMFS_get_token( token, new_name, &i );
-
- /*
- * Create a new link node.
- */
-
- new_node = IMFS_create_node(
- parent_loc,
- IMFS_HARD_LINK,
- new_name,
- ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
- &info
- );
-
- if ( !new_node )
- set_errno_and_return_minus_one( ENOMEM );
-
- /*
- * Increment the link count of the node being pointed to.
- */
-
- info.hard_link.link_node->st_nlink++;
- IMFS_update_ctime( info.hard_link.link_node );
-
- return 0;
-}
-
diff --git a/cpukit/libfs/src/imfs/imfs_mknod.c b/cpukit/libfs/src/imfs/imfs_mknod.c
deleted file mode 100644
index 05b7ca9a5f..0000000000
--- a/cpukit/libfs/src/imfs/imfs_mknod.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * IMFS_mknod
- *
- * Routine to create a node in the IMFS file system.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#include <stdlib.h>
-
-#include "imfs.h"
-#include "libio_.h"
-
-int IMFS_mknod(
- const char *token, /* IN */
- mode_t mode, /* IN */
- dev_t dev, /* IN */
- rtems_filesystem_location_info_t *pathloc /* IN/OUT */
-)
-{
- IMFS_token_types type = 0;
- IMFS_jnode_t *new_node;
- int result;
- char new_name[ IMFS_NAME_MAX + 1 ];
- IMFS_types_union info;
-
- IMFS_get_token( token, new_name, &result );
-
- /*
- * Figure out what type of IMFS node this is.
- */
-
- if ( S_ISDIR(mode) )
- type = IMFS_DIRECTORY;
- else if ( S_ISREG(mode) )
- type = IMFS_MEMORY_FILE;
- else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
- type = IMFS_DEVICE;
- rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
- } else {
- set_errno_and_return_minus_one( EINVAL );
- }
-
- /*
- * Allocate and fill in an IMFS jnode
- */
-
- new_node = IMFS_create_node(
- pathloc,
- type,
- new_name,
- mode,
- &info
- );
-
- if ( !new_node )
- set_errno_and_return_minus_one( ENOMEM );
-
- return 0;
-}
-
diff --git a/cpukit/libfs/src/imfs/imfs_mount.c b/cpukit/libfs/src/imfs/imfs_mount.c
deleted file mode 100644
index 7b159f476c..0000000000
--- a/cpukit/libfs/src/imfs/imfs_mount.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * IMFS_mount
- *
- * This routine will look at a mount table entry that we are going to
- * add to the mount table. If the mount point rtems_filesystem
- * location_info_t struct refers to a node that is a directory,
- * the node will be marked as a mount point by setting its directory.mt_fs
- * pointer to point to the mount table entry that we are about to add
- * to the mount table chain.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-
-#include "imfs.h"
-#include "libio_.h"
-
-int IMFS_mount(
- rtems_filesystem_mount_table_entry_t *mt_entry
-)
-{
- IMFS_jnode_t *node;
-
- node = mt_entry->mt_point_node.node_access;
-
- /*
- * Is the node that we are mounting onto a directory node ?
- */
-
- if ( node->type != IMFS_DIRECTORY )
- set_errno_and_return_minus_one( ENOTDIR );
-
- /*
- * Set mt_fs pointer to point to the mount table entry for
- * the mounted file system.
- */
-
- node->info.directory.mt_fs = mt_entry;
- return 0;
-}
diff --git a/cpukit/libfs/src/imfs/imfs_ntype.c b/cpukit/libfs/src/imfs/imfs_ntype.c
deleted file mode 100644
index 33beda1bab..0000000000
--- a/cpukit/libfs/src/imfs/imfs_ntype.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * IMFS_node_type
- *
- * The following verifies that returns the type of node that the
- * loc refers to.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-#include "imfs.h"
-
-rtems_filesystem_node_types_t IMFS_node_type(
- rtems_filesystem_location_info_t *pathloc /* IN */
-)
-{
- IMFS_jnode_t *node;
-
- node = pathloc->node_access;
- return node->type;
-}
diff --git a/cpukit/libfs/src/imfs/imfs_readlink.c b/cpukit/libfs/src/imfs/imfs_readlink.c
deleted file mode 100644
index 36bb17815a..0000000000
--- a/cpukit/libfs/src/imfs/imfs_readlink.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * IMFS_readlink
- *
- * The following rouine puts the symblic links destination name into
- * buff.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-#include "imfs.h"
-#include "libio_.h"
-
-int IMFS_readlink(
- rtems_filesystem_location_info_t *loc,
- char *buf, /* OUT */
- size_t bufsize
-)
-{
- IMFS_jnode_t *node;
- int i;
-
- node = loc->node_access;
-
- if ( node->type != IMFS_SYM_LINK )
- set_errno_and_return_minus_one( EINVAL );
-
- for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
- buf[i] = node->info.sym_link.name[i];
-
- return i;
-}
diff --git a/cpukit/libfs/src/imfs/imfs_rmnod.c b/cpukit/libfs/src/imfs/imfs_rmnod.c
deleted file mode 100644
index 3b875145da..0000000000
--- a/cpukit/libfs/src/imfs/imfs_rmnod.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * IMFS Node Removal Handler
- *
- * This file contains the handler used to remove a node when a file type
- * does not require special actions.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include <rtems/libio.h>
-#include "libio_.h"
-
-#include "imfs.h"
-
-/*
- * IMFS_rmnod
- */
-
-int IMFS_rmnod(
- rtems_filesystem_location_info_t *pathloc /* IN */
-)
-{
- IMFS_jnode_t *the_jnode;
-
- the_jnode = (IMFS_jnode_t *) pathloc->node_access;
-
- /*
- * Take the node out of the parent's chain that contains this node
- */
-
- if ( the_jnode->Parent != NULL ) {
- Chain_Extract( (Chain_Node *) the_jnode );
- the_jnode->Parent = NULL;
- }
-
- /*
- * Decrement the link counter and see if we can free the space.
- */
-
- the_jnode->st_nlink--;
- IMFS_update_ctime( the_jnode );
-
- /*
- * The file cannot be open and the link must be less than 1 to free.
- */
-
- if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) {
-
- /*
- * Is rtems_filesystem_current this node?
- */
-
- if ( rtems_filesystem_current.node_access == pathloc->node_access )
- rtems_filesystem_current.node_access = NULL;
-
- /*
- * Free memory associated with a memory file.
- */
-
- free( the_jnode );
- }
-
- return 0;
-
-}
-
-
-
diff --git a/cpukit/libfs/src/imfs/imfs_stat.c b/cpukit/libfs/src/imfs/imfs_stat.c
deleted file mode 100644
index 2edc1a9e9b..0000000000
--- a/cpukit/libfs/src/imfs/imfs_stat.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * IMFS_stat
- *
- * This routine provides a stat for the IMFS file system.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-#include "imfs.h"
-#include "libio_.h"
-
-int IMFS_stat(
- rtems_filesystem_location_info_t *loc,
- struct stat *buf
-)
-{
- IMFS_jnode_t *the_jnode;
- IMFS_device_t *io;
-
- the_jnode = loc->node_access;
-
-
- switch ( the_jnode->type ) {
-
- case IMFS_DEVICE:
- io = &the_jnode->info.device;
- buf->st_dev = rtems_filesystem_make_dev_t( io->major, io->minor );
- break;
-
- case IMFS_MEMORY_FILE:
- buf->st_size = the_jnode->info.file.size;
- break;
-
- default:
- set_errno_and_return_minus_one( ENOTSUP );
- break;
- }
-
- buf->st_mode = the_jnode->st_mode;
- buf->st_nlink = the_jnode->st_nlink;
- buf->st_ino = the_jnode->st_ino;
- buf->st_uid = the_jnode->st_uid;
- buf->st_gid = the_jnode->st_gid;
-
- buf->st_atime = the_jnode->st_atime;
- buf->st_mtime = the_jnode->st_mtime;
- buf->st_ctime = the_jnode->st_ctime;
-
- return 0;
-}
diff --git a/cpukit/libfs/src/imfs/imfs_symlink.c b/cpukit/libfs/src/imfs/imfs_symlink.c
deleted file mode 100644
index 8e795463e3..0000000000
--- a/cpukit/libfs/src/imfs/imfs_symlink.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * IMFS_symlink
- *
- * The following rouine creates a new symbolic link node under parent
- * with the name given in name. The node is set to point to the node at
- * to_loc.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-#include "imfs.h"
-#include "libio_.h"
-
-int IMFS_symlink(
- rtems_filesystem_location_info_t *parent_loc,
- const char *link_name,
- const char *node_name
-)
-{
- IMFS_types_union info;
- IMFS_jnode_t *new_node;
- char new_name[ IMFS_NAME_MAX + 1 ];
- int i;
-
- /*
- * Remove any separators at the end of the string.
- */
-
- IMFS_get_token( node_name, new_name, &i );
-
- info.sym_link.name = link_name;
-
- /*
- * Create a new link node.
- */
-
- new_node = IMFS_create_node(
- parent_loc,
- IMFS_SYM_LINK,
- new_name,
- ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
- &info
- );
-
- if ( !new_node )
- set_errno_and_return_minus_one( ENOMEM );
-
- return 0;
-}
-
-
diff --git a/cpukit/libfs/src/imfs/imfs_unixstub.c b/cpukit/libfs/src/imfs/imfs_unixstub.c
deleted file mode 100644
index 8ee429383c..0000000000
--- a/cpukit/libfs/src/imfs/imfs_unixstub.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * IMFS Stub for UNIX configuration
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h> /* for mkdir */
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdlib.h>
-
-#include <assert.h>
-
-#include "imfs.h"
-#include "libio_.h"
-
-#include <stdio.h>
-
-/*
- * IMFS file system operations table
- */
-
-rtems_filesystem_operations_table IMFS_ops = {
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL
-};
-
-/*
- * IMFS file system operations table
- */
-
-rtems_filesystem_operations_table miniIMFS_ops = {
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL
-};
diff --git a/cpukit/libfs/src/imfs/imfs_unlink.c b/cpukit/libfs/src/imfs/imfs_unlink.c
deleted file mode 100644
index f001c6450d..0000000000
--- a/cpukit/libfs/src/imfs/imfs_unlink.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * IMFS_unlink
- *
- * Routine to remove a link node from the tree.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-#include <stdlib.h>
-
-#include "imfs.h"
-#include "libio_.h"
-
-int IMFS_unlink(
- rtems_filesystem_location_info_t *loc /* IN */
-)
-{
- IMFS_jnode_t *node;
- rtems_filesystem_location_info_t the_link;
- int result;
-
- node = loc->node_access;
-
- /*
- * Decrement the link counter of node pointed to and free the
- * space.
- */
-
- /*
- * If this is the last last pointer to the node
- * free the node.
- */
-
- if ( node->type == IMFS_HARD_LINK ) {
-
- if ( !node->info.hard_link.link_node )
- set_errno_and_return_minus_one( EINVAL );
-
- the_link = *loc;
- the_link.node_access = node->info.hard_link.link_node;
- IMFS_Set_handlers( &the_link );
-
- /*
- * If removing the last hard link to a node, then we need
- * to remove the node that is a link and the node itself.
- */
-
- node->info.hard_link.link_node->st_nlink --;
- IMFS_update_ctime( node->info.hard_link.link_node );
- if ( node->info.hard_link.link_node->st_nlink < 1) {
- result = (*the_link.handlers->rmnod)( &the_link );
- if ( result != 0 )
- return -1;
- }
- }
-
- /*
- * Now actually free the node we were asked to free.
- */
-
- result = (*loc->handlers->rmnod)( loc );
-
- return result;
-}
-
diff --git a/cpukit/libfs/src/imfs/imfs_unmount.c b/cpukit/libfs/src/imfs/imfs_unmount.c
deleted file mode 100644
index 9e07fe0c5e..0000000000
--- a/cpukit/libfs/src/imfs/imfs_unmount.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * IMFS_unmount
- *
- * This routine will look at a mount table entry that we are going to
- * add to the mount table. If the mount point
- * rtems_filesystem_location_info_t struct refers to a node that is a
- * directory that has a file system mounted on it, the node will be
- * marked as a mount point by * setting its directory.mt_fs pointer
- * to NULL. This indicates that a directory is no longer mounted on
- * this node.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-
-#include "imfs.h"
-#include "libio_.h"
-
-int IMFS_unmount(
- rtems_filesystem_mount_table_entry_t *mt_entry
-)
-{
- IMFS_jnode_t *node;
-
- node = mt_entry->mt_point_node.node_access;
-
- /*
- * Is the node that we are mounting onto a directory node ?
- */
-
- if ( node->type != IMFS_DIRECTORY )
- set_errno_and_return_minus_one( ENOTDIR );
-
- /*
- * Did the node indicate that there was a directory mounted here?
- */
-
- if ( node->info.directory.mt_fs == NULL )
- set_errno_and_return_minus_one( EINVAL ); /* XXX */
-
- /*
- * Set the mt_fs pointer to indicate that there is no longer
- * a file system mounted to this point.
- */
-
- node->info.directory.mt_fs = NULL;
-
- return 0;
-}
diff --git a/cpukit/libfs/src/imfs/imfs_utime.c b/cpukit/libfs/src/imfs/imfs_utime.c
deleted file mode 100644
index e20d352c50..0000000000
--- a/cpukit/libfs/src/imfs/imfs_utime.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * IMFS_utime
- *
- * This routine is the implementation of the utime() system
- * call for the IMFS.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <errno.h>
-#include <sys/time.h>
-
-#include "libio_.h"
-#include "imfs.h"
-
-int IMFS_utime(
- rtems_filesystem_location_info_t *pathloc, /* IN */
- time_t actime, /* IN */
- time_t modtime /* IN */
-)
-{
- IMFS_jnode_t *the_jnode;
-
- the_jnode = (IMFS_jnode_t *) pathloc->node_access;
-
- the_jnode->st_atime = actime;
- the_jnode->st_mtime = modtime;
-
- return 0;
-}
diff --git a/cpukit/libfs/src/imfs/ioman.c b/cpukit/libfs/src/imfs/ioman.c
deleted file mode 100644
index ee22791657..0000000000
--- a/cpukit/libfs/src/imfs/ioman.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * This file emulates the old Classic RTEMS IO manager directives
- * which register and lookup names using the in-memory filesystem.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-
-#include <assert.h>
-
-#include <rtems.h>
-#include "libio_.h"
-#include "imfs.h"
-
-#if defined(__linux__)
-#define S_IFCHR __S_IFCHR
-#endif
-
-/*
- * rtems_io_register_name
- *
- * This assumes that all registered devices are character devices.
- */
-
-rtems_status_code rtems_io_register_name(
- char *device_name,
- rtems_device_major_number major,
- rtems_device_minor_number minor
-)
-{
-#if !defined(RTEMS_UNIX)
- int status;
- dev_t dev;
-
- dev = rtems_filesystem_make_dev_t( major, minor );
- status = mknod( device_name, 0777 | S_IFCHR, dev );
-
- /* this is the only error returned by the old version */
- if ( status )
- return RTEMS_TOO_MANY;
-
-#endif
- return RTEMS_SUCCESSFUL;
-}
-
-/*
- * rtems_io_lookup_name
- *
- * This version is not reentrant.
- *
- * XXX - This is dependent upon IMFS and should not be.
- * Suggest adding a filesystem routine to fill in the device_info.
- */
-
-rtems_status_code rtems_io_lookup_name(
- const char *name,
- rtems_driver_name_t **device_info
-)
-{
-#if !defined(RTEMS_UNIX)
- IMFS_jnode_t *the_jnode;
- rtems_filesystem_location_info_t loc;
- static rtems_driver_name_t device;
- int result;
- rtems_filesystem_node_types_t node_type;
-
- result = rtems_filesystem_evaluate_path( name, 0x00, &loc, TRUE );
- the_jnode = loc.node_access;
-
- node_type = (*loc.ops->node_type)( &loc );
-
- if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
- *device_info = 0;
- rtems_filesystem_freenode( &loc );
- return RTEMS_UNSATISFIED;
- }
-
- device.device_name = (char *) name;
- device.device_name_length = strlen( name );
- device.major = the_jnode->info.device.major;
- device.minor = the_jnode->info.device.minor;
- *device_info = &device;
-
- rtems_filesystem_freenode( &loc );
-
-#endif
- return RTEMS_SUCCESSFUL;
-}
diff --git a/cpukit/libfs/src/imfs/memfile.c b/cpukit/libfs/src/imfs/memfile.c
deleted file mode 100644
index dad120a0a7..0000000000
--- a/cpukit/libfs/src/imfs/memfile.c
+++ /dev/null
@@ -1,1096 +0,0 @@
-/*
- * IMFS Device Node Handlers
- *
- * This file contains the set of handlers used to process operations on
- * IMFS memory file nodes. The memory files are created in memory using
- * malloc'ed memory. Thus any data stored in one of these files is lost
- * at system shutdown unless special arrangements to copy the data to
- * some type of non-volailte storage are made by the application.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <stdlib.h>
-#include <assert.h>
-#include <errno.h>
-
-#include <rtems.h>
-#include <rtems/libio.h>
-#include "imfs.h"
-#include "libio_.h"
-
-#define MEMFILE_STATIC
-
-/*
- * Prototypes of private routines
- */
-
-MEMFILE_STATIC int IMFS_memfile_extend(
- IMFS_jnode_t *the_jnode,
- off_t new_length
-);
-
-MEMFILE_STATIC int IMFS_memfile_addblock(
- IMFS_jnode_t *the_jnode,
- unsigned int block
-);
-
-MEMFILE_STATIC int IMFS_memfile_remove_block(
- IMFS_jnode_t *the_jnode,
- unsigned int block
-);
-
-MEMFILE_STATIC block_p *IMFS_memfile_get_block_pointer(
- IMFS_jnode_t *the_jnode,
- unsigned int block,
- int malloc_it
-);
-
-MEMFILE_STATIC int IMFS_memfile_read(
- IMFS_jnode_t *the_jnode,
- off_t start,
- unsigned char *destination,
- unsigned int length
-);
-
-MEMFILE_STATIC int IMFS_memfile_write(
- IMFS_jnode_t *the_jnode,
- off_t start,
- const unsigned char *source,
- unsigned int length
-);
-
-void *memfile_alloc_block(void);
-
-void memfile_free_block(
- void *memory
-);
-
-/*
- * memfile_open
- *
- * This routine processes the open() system call. Note that there is
- * nothing special to be done at open() time.
- */
-
-int memfile_open(
- rtems_libio_t *iop,
- const char *pathname,
- unsigned32 flag,
- unsigned32 mode
-)
-{
- IMFS_jnode_t *the_jnode;
-
- the_jnode = iop->file_info;
-
- return 0;
-}
-
-/*
- * memfile_close
- *
- * This routine processes the close() system call. Note that there is
- * nothing to flush or memory to free at this point.
- */
-
-int memfile_close(
- rtems_libio_t *iop
-)
-{
- IMFS_jnode_t *the_jnode;
-
- the_jnode = iop->file_info;
-
- return 0;
-}
-
-/*
- * memfile_read
- *
- * This routine processes the read() system call.
- */
-
-int memfile_read(
- rtems_libio_t *iop,
- void *buffer,
- unsigned32 count
-)
-{
- IMFS_jnode_t *the_jnode;
-
- the_jnode = iop->file_info;
-
- return IMFS_memfile_read( the_jnode, iop->offset, buffer, count );
-}
-
-/*
- * memfile_write
- *
- * This routine processes the write() system call.
- */
-
-int memfile_write(
- rtems_libio_t *iop,
- const void *buffer,
- unsigned32 count
-)
-{
- IMFS_jnode_t *the_jnode;
- int status;
-
- the_jnode = iop->file_info;
-
- status = IMFS_memfile_write( the_jnode, iop->offset, buffer, count );
- iop->size = the_jnode->info.file.size;
-
- return status;
-}
-
-/*
- * memfile_ioctl
- *
- * This routine processes the ioctl() system call.
- *
- * NOTE: No ioctl()'s are supported for in-memory files.
- */
-
-int memfile_ioctl(
- rtems_libio_t *iop,
- unsigned32 command,
- void *buffer
-)
-{
- IMFS_jnode_t *the_jnode;
-
- the_jnode = iop->file_info;
-
- return 0;
-}
-
-/*
- * memfile_lseek
- *
- * This routine processes the lseek() system call.
- */
-
-int memfile_lseek(
- rtems_libio_t *iop,
- off_t offset,
- int whence
-)
-{
- IMFS_jnode_t *the_jnode;
-
- the_jnode = iop->file_info;
-
- if (IMFS_memfile_extend( the_jnode, iop->offset ))
- set_errno_and_return_minus_one( ENOSPC );
-
- iop->size = the_jnode->info.file.size;
- return iop->offset;
-}
-
-/*
- * memfile_stat
- *
- * This IMFS_stat() can be used.
- */
-
-/*
- * memfile_ftruncate
- *
- * This routine processes the ftruncate() system call.
- */
-
-int memfile_ftruncate(
- rtems_libio_t *iop,
- off_t length
-)
-{
- IMFS_jnode_t *the_jnode;
-
- the_jnode = iop->file_info;
-
- /*
- * POSIX 1003.1b does not specify what happens if you truncate a file
- * and the new length is greater than the current size. We treat this
- * as an extend operation.
- */
-
- if ( length > the_jnode->info.file.size )
- return IMFS_memfile_extend( the_jnode, length );
-
- /*
- * The in-memory files do not currently reclaim memory until the file is
- * deleted. So we leave the previously allocated blocks in place for
- * future use and just set the length.
- */
-
- the_jnode->info.file.size = length;
- iop->size = the_jnode->info.file.size;
-
- IMFS_update_atime( the_jnode );
-
- return 0;
-}
-
-/*
- * IMFS_memfile_extend
- *
- * This routine insures that the in-memory file is of the length
- * specified. If necessary, it will allocate memory blocks to
- * extend the file.
- */
-
-MEMFILE_STATIC int IMFS_memfile_extend(
- IMFS_jnode_t *the_jnode,
- off_t new_length
-)
-{
- unsigned int block;
- unsigned int new_blocks;
- unsigned int old_blocks;
-
- /*
- * Perform internal consistency checks
- */
-
- assert( the_jnode );
- if ( !the_jnode )
- set_errno_and_return_minus_one( EIO );
-
- assert( the_jnode->type == IMFS_MEMORY_FILE );
- if ( the_jnode->type != IMFS_MEMORY_FILE )
- set_errno_and_return_minus_one( EIO );
-
- if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
- set_errno_and_return_minus_one( EINVAL );
-
- if ( new_length <= the_jnode->info.file.size )
- return 0;
-
- /*
- * Calculate the number of range of blocks to allocate
- */
-
- new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
- old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
-
- /*
- * Now allocate each of those blocks.
- */
-
- for ( block=old_blocks ; block<=new_blocks ; block++ ) {
- if ( IMFS_memfile_addblock( the_jnode, block ) ) {
- for ( ; block>=old_blocks ; block-- ) {
- IMFS_memfile_remove_block( the_jnode, block );
- }
- set_errno_and_return_minus_one( ENOSPC );
- }
- }
-
- /*
- * Set the new length of the file.
- */
-
- the_jnode->info.file.size = new_length;
- return 0;
-}
-
-/*
- * IMFS_memfile_addblock
- *
- * This routine adds a single block to the specified in-memory file.
- */
-
-MEMFILE_STATIC int IMFS_memfile_addblock(
- IMFS_jnode_t *the_jnode,
- unsigned int block
-)
-{
- block_p memory;
- block_p *block_entry_ptr;
-
- assert( the_jnode );
- if ( !the_jnode )
- set_errno_and_return_minus_one( EIO );
-
- assert( the_jnode->type == IMFS_MEMORY_FILE );
- if ( the_jnode->type != IMFS_MEMORY_FILE )
- set_errno_and_return_minus_one( EIO );
-
- block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 );
- if ( *block_entry_ptr )
- return 0;
-
-#if 0
- printf( "%d %p", block, block_entry_ptr );
- fflush(stdout);
-#endif
-
- memory = memfile_alloc_block();
- assert( memory );
- if ( !memory )
- return 1;
- *block_entry_ptr = memory;
-
- return 0;
-}
-
-/*
- * IMFS_memfile_remove_block
- *
- * This routine removes the specified block from the in-memory file.
- *
- * NOTE: This is a support routine and is called only to remove
- * the last block or set of blocks in a file. Removing a
- * block from the middle of a file would be exceptionally
- * dangerous and the results unpredictable.
- */
-
-MEMFILE_STATIC int IMFS_memfile_remove_block(
- IMFS_jnode_t *the_jnode,
- unsigned int block
-)
-{
- block_p *block_entry_ptr;
- block_p ptr;
-
- block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
- ptr = *block_entry_ptr;
- *block_entry_ptr = 0;
-
- memfile_free_block( ptr );
-
- return 1;
-}
-
-/*
- * memfile_free_blocks_in_table
- *
- * This is a support routine for IMFS_memfile_remove. It frees all the
- * blocks in one of the indirection tables.
- */
-
-void memfile_free_blocks_in_table(
- block_p **block_table,
- int entries
-)
-{
- int i;
- block_p *b;
-
- /*
- * Perform internal consistency checks
- */
-
- assert( block_table );
- if ( !block_table )
- return;
-
- /*
- * Now go through all the slots in the table and free the memory.
- */
-
- b = *block_table;
-
- for ( i=0 ; i<entries ; i++ ) {
- if ( b[i] ) {
- memfile_free_block( b[i] );
- b[i] = 0;
- }
- }
-
- /*
- * Now that all the blocks in the block table are free, we can
- * free the block table itself.
- */
-
- memfile_free_block( *block_table );
- *block_table = 0;
-}
-
-/*
- * IMFS_memfile_remove
- *
- * This routine frees all memory associated with an in memory file.
- *
- * NOTE: This is an exceptionally conservative implementation.
- * It will check EVERY pointer which is non-NULL and insure
- * any child non-NULL pointers are freed. Optimistically, all that
- * is necessary is to scan until a NULL pointer is found. There
- * should be no allocated data past that point.
- *
- * In experimentation on the powerpc simulator, it was noted
- * that using blocks which held 128 slots versus 16 slots made
- * a significant difference in the performance of this routine.
- *
- * Regardless until the IMFS implementation is proven, it
- * is better to stick to simple, easy to understand algorithms.
- */
-
-int IMFS_memfile_remove(
- IMFS_jnode_t *the_jnode
-)
-{
- IMFS_memfile_t *info;
- int i;
- int j;
- unsigned int to_free;
- block_p *p;
-
- /*
- * Perform internal consistency checks
- */
-
- assert( the_jnode );
- if ( !the_jnode )
- set_errno_and_return_minus_one( EIO );
-
- assert( the_jnode->type == IMFS_MEMORY_FILE );
- if ( the_jnode->type != IMFS_MEMORY_FILE )
- set_errno_and_return_minus_one( EIO );
-
- /*
- * Eventually this could be set smarter at each call to
- * memfile_free_blocks_in_table to greatly speed this up.
- */
-
- to_free = IMFS_MEMFILE_BLOCK_SLOTS;
-
- /*
- * Now start freeing blocks in this order:
- * + indirect
- * + doubly indirect
- * + triply indirect
- */
-
- info = &the_jnode->info.file;
-
- if ( info->indirect ) {
- memfile_free_blocks_in_table( &info->indirect, to_free );
- }
-
- if ( info->doubly_indirect ) {
-
- for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
- if ( info->doubly_indirect[i] ) {
- memfile_free_blocks_in_table(
- (block_p **)&info->doubly_indirect[i], to_free );
- }
- }
- memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
-
- }
-
- if ( info->triply_indirect ) {
- for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
- p = (block_p *) info->triply_indirect[i];
- for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
- if ( p[j] ) {
- memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
- }
- }
- memfile_free_blocks_in_table(
- (block_p **)&info->triply_indirect[i], to_free );
- }
- memfile_free_blocks_in_table(
- (block_p **)&info->triply_indirect, to_free );
- }
-
- return 0;
-}
-
-/*
- * IMFS_memfile_read
- *
- * This routine read from memory file pointed to by the_jnode into
- * the specified data buffer specified by destination. The file
- * is NOT extended. An offset greater than the length of the file
- * is considered an error. Read from an offset for more bytes than
- * are between the offset and the end of the file will result in
- * reading the data between offset and the end of the file (truncated
- * read).
- */
-
-MEMFILE_STATIC int IMFS_memfile_read(
- IMFS_jnode_t *the_jnode,
- off_t start,
- unsigned char *destination,
- unsigned int length
-)
-{
- block_p *block_ptr;
- unsigned int block;
- unsigned int my_length;
- unsigned int to_copy = 0;
- unsigned int last_byte;
- unsigned int copied;
- unsigned int start_offset;
- unsigned char *dest;
-
- dest = destination;
-
- /*
- * Perform internal consistency checks
- */
-
- assert( the_jnode );
- if ( !the_jnode )
- set_errno_and_return_minus_one( EIO );
-
- assert( the_jnode->type == IMFS_MEMORY_FILE );
- if ( the_jnode->type != IMFS_MEMORY_FILE )
- set_errno_and_return_minus_one( EIO );
-
- /*
- * Error checks on arguments
- */
-
- assert( dest );
- if ( !dest )
- set_errno_and_return_minus_one( EINVAL );
-
- /*
- * If there is nothing to read, then quick exit.
- */
-
- my_length = length;
- if ( !my_length )
- set_errno_and_return_minus_one( EINVAL );
-
- /*
- * If the last byte we are supposed to read is past the end of this
- * in memory file, then shorten the length to read.
- */
-
- last_byte = start + length;
- if ( last_byte > the_jnode->info.file.size )
- my_length = the_jnode->info.file.size - start;
-
- copied = 0;
-
- /*
- * Three phases to the read:
- * + possibly the last part of one block
- * + all of zero of more blocks
- * + possibly the first part of one block
- */
-
- /*
- * Phase 1: possibly the last part of one block
- */
-
- start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
- block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
- if ( start_offset ) {
- to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
- if ( to_copy > my_length )
- to_copy = my_length;
- block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
- assert( block_ptr );
- if ( !block_ptr )
- return copied;
- memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
- dest += to_copy;
- block++;
- my_length -= to_copy;
- copied += to_copy;
- }
-
- /*
- * Phase 2: all of zero of more blocks
- */
-
- to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
- while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
- block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
- assert( block_ptr );
- if ( !block_ptr )
- return copied;
- memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
- dest += to_copy;
- block++;
- my_length -= to_copy;
- copied += to_copy;
- }
-
- /*
- * Phase 3: possibly the first part of one block
- */
-
- assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
-
- if ( my_length ) {
- block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
- assert( block_ptr );
- if ( !block_ptr )
- return copied;
- memcpy( dest, &(*block_ptr)[ 0 ], my_length );
- copied += my_length;
- }
-
- IMFS_update_atime( the_jnode );
-
- return copied;
-}
-
-/*
- * IMFS_memfile_write
- *
- * This routine writes the specified data buffer into the in memory
- * file pointed to by the_jnode. The file is extended as needed.
- */
-
-MEMFILE_STATIC int IMFS_memfile_write(
- IMFS_jnode_t *the_jnode,
- off_t start,
- const unsigned char *source,
- unsigned int length
-)
-{
- block_p *block_ptr;
- unsigned int block;
- int status;
- unsigned int my_length;
- unsigned int to_copy = 0;
- unsigned int last_byte;
- unsigned int start_offset;
- int copied;
- const unsigned char *src;
-
- src = source;
-
- /*
- * Perform internal consistency checks
- */
-
- assert( the_jnode );
- if ( !the_jnode )
- set_errno_and_return_minus_one( EIO );
-
- assert( the_jnode->type == IMFS_MEMORY_FILE );
- if ( the_jnode->type != IMFS_MEMORY_FILE )
- set_errno_and_return_minus_one( EIO );
-
- /*
- * Error check arguments
- */
-
- assert( source );
- if ( !source )
- set_errno_and_return_minus_one( EINVAL );
-
-
- /*
- * If there is nothing to write, then quick exit.
- */
-
- my_length = length;
- if ( !my_length )
- set_errno_and_return_minus_one( EINVAL );
-
- /*
- * If the last byte we are supposed to write is past the end of this
- * in memory file, then extend the length.
- */
-
- last_byte = start + length;
- if ( last_byte > the_jnode->info.file.size ) {
- status = IMFS_memfile_extend( the_jnode, last_byte );
- if ( status )
- set_errno_and_return_minus_one( ENOSPC );
- }
-
- copied = 0;
-
- /*
- * Three phases to the write:
- * + possibly the last part of one block
- * + all of zero of more blocks
- * + possibly the first part of one block
- */
-
- /*
- * Phase 1: possibly the last part of one block
- */
-
- start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
- block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
- if ( start_offset ) {
- to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
- if ( to_copy > my_length )
- to_copy = my_length;
- block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
- assert( block_ptr );
- if ( !block_ptr )
- return copied;
-#if 0
-printf( "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src );
-#endif
- memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
- src += to_copy;
- block++;
- my_length -= to_copy;
- copied += to_copy;
- }
-
- /*
- * Phase 2: all of zero of more blocks
- */
-
- to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
- while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
- block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
- assert( block_ptr );
- if ( !block_ptr )
- return copied;
-#if 0
-printf( "write %d in %d: %*s\n", to_copy, block, to_copy, src );
-#endif
- memcpy( &(*block_ptr)[ 0 ], src, to_copy );
- src += to_copy;
- block++;
- my_length -= to_copy;
- copied += to_copy;
- }
-
- /*
- * Phase 3: possibly the first part of one block
- */
-
- assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
-
- to_copy = my_length;
- if ( my_length ) {
- block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
- assert( block_ptr );
- if ( !block_ptr )
- return copied;
-#if 0
-printf( "write %d in %d: %*s\n", to_copy, block, to_copy, src );
-#endif
- memcpy( &(*block_ptr)[ 0 ], src, my_length );
- my_length = 0;
- copied += to_copy;
- }
-
- IMFS_atime_mtime_update( the_jnode );
-
- return copied;
-}
-
-/*
- * IMFS_memfile_get_block_pointer
- *
- * This routine looks up the block pointer associated with the given block
- * number. If that block has not been allocated and "malloc_it" is
- * TRUE, then the block is allocated. Otherwise, it is an error.
- */
-
-#if 0
-block_p *IMFS_memfile_get_block_pointer_DEBUG(
- IMFS_jnode_t *the_jnode,
- unsigned int block,
- int malloc_it
-);
-
-block_p *IMFS_memfile_get_block_pointer(
- IMFS_jnode_t *the_jnode,
- unsigned int block,
- int malloc_it
-)
-{
- block_p *p;
-
- p = IMFS_memfile_get_block_pointer_DEBUG( the_jnode, block, malloc_it );
- printf( "(%d -> %p) ", block, p );
- return p;
-}
-
-block_p *IMFS_memfile_get_block_pointer_DEBUG(
-#else
-block_p *IMFS_memfile_get_block_pointer(
-#endif
- IMFS_jnode_t *the_jnode,
- unsigned int block,
- int malloc_it
-)
-{
- unsigned int my_block;
- IMFS_memfile_t *info;
- unsigned int singly;
- unsigned int doubly;
- unsigned int triply;
- block_p *p;
- block_p *p1;
- block_p *p2;
-
- /*
- * Perform internal consistency checks
- */
-
- assert( the_jnode );
- if ( !the_jnode )
- return NULL;
-
- assert( the_jnode->type == IMFS_MEMORY_FILE );
- if ( the_jnode->type != IMFS_MEMORY_FILE )
- return NULL;
-
- info = &the_jnode->info.file;
-
- my_block = block;
-
- /*
- * Is the block number in the simple indirect portion?
- */
-
- if ( my_block <= LAST_INDIRECT ) {
-#if 0
-printf( "(s %d) ", block );
-fflush(stdout);
-#endif
- p = info->indirect;
-
- if ( malloc_it ) {
-
- if ( !p ) {
- p = memfile_alloc_block();
- if ( !p )
- return 0;
- info->indirect = p;
- }
- return &info->indirect[ my_block ];
- }
-
- if ( !p )
- return 0;
-
- return &info->indirect[ my_block ];
- }
-
- /*
- * Is the block number in the doubly indirect portion?
- */
-
- if ( my_block <= LAST_DOUBLY_INDIRECT ) {
-#if 0
-printf( "(d %d) ", block );
-fflush(stdout);
-#endif
-
- my_block -= FIRST_DOUBLY_INDIRECT;
-
- singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
- doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
-
- p = info->doubly_indirect;
- if ( malloc_it ) {
-
- if ( !p ) {
- p = memfile_alloc_block();
- if ( !p )
- return 0;
- info->doubly_indirect = p;
- }
-
- p1 = (block_p *)p[ doubly ];
- if ( !p1 ) {
- p1 = memfile_alloc_block();
- if ( !p1 )
- return 0;
- p[ doubly ] = (block_p) p1;
- }
-
- return (block_p *)&p1[ singly ];
- }
-
- if ( !p )
- return 0;
-
- p = (block_p *)p[ doubly ];
- if ( !p )
- return 0;
-
-#if 0
-printf( "(d %d %d %d %d %p %p) ", block, my_block, doubly,
- singly, p, &p[singly] );
-fflush(stdout);
-#endif
- return (block_p *)&p[ singly ];
- }
-
-#if 0
-printf( "(t %d) ", block );
-fflush(stdout);
-#endif
- /*
- * Is the block number in the triply indirect portion?
- */
-
- if ( my_block <= LAST_TRIPLY_INDIRECT ) {
- my_block -= FIRST_TRIPLY_INDIRECT;
-
- singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
- doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
- triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
- doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
-
- p = info->triply_indirect;
-
- if ( malloc_it ) {
- if ( !p ) {
- p = memfile_alloc_block();
- if ( !p )
- return 0;
- info->triply_indirect = p;
- }
-
- p1 = (block_p *) p[ triply ];
- if ( !p1 ) {
- p1 = memfile_alloc_block();
- if ( !p1 )
- return 0;
- p[ triply ] = (block_p) p1;
- }
-
- p2 = (block_p *)p1[ doubly ];
- if ( !p2 ) {
- p2 = memfile_alloc_block();
- if ( !p2 )
- return 0;
- p1[ doubly ] = (block_p) p2;
- }
- return (block_p *)&p2[ singly ];
- }
-
- if ( !p )
- return 0;
-
-#if 0
-printf( "(t %d %d %d %d %d) ", block, my_block, triply, doubly, singly );
-fflush(stdout);
-#endif
- p1 = (block_p *) p[ triply ];
- if ( !p1 )
- return 0;
-
- p2 = (block_p *)p1[ doubly ];
- if ( !p )
- return 0;
-
- return (block_p *)&p2[ singly ];
- }
-
- /*
- * This means the requested block number is out of range.
- */
-
- return 0;
-}
-
-/*
- * memfile_alloc_block
- *
- * Allocate a block for an in-memory file.
- */
-
-int memfile_blocks_allocated = 0;
-
-void *memfile_alloc_block(void)
-{
- void *memory;
-
- memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK);
- if ( memory )
- memfile_blocks_allocated++;
-
- return memory;
-}
-
-/*
- * memfile_free_block
- *
- * Free a block from an in-memory file.
- */
-
-void memfile_free_block(
- void *memory
-)
-{
-#if 0
-printf( "(d %p) ", memory );
-fflush(stdout);
-#endif
- free(memory);
- memfile_blocks_allocated--;
-}
-
-
-/*
- * memfile_rmnod
- *
- * This routine is available from the optable to remove a node
- * from the IMFS file system.
- */
-
-int memfile_rmnod(
- rtems_filesystem_location_info_t *pathloc /* IN */
-)
-{
- IMFS_jnode_t *the_jnode;
-
- the_jnode = (IMFS_jnode_t *) pathloc->node_access;
-
- /*
- * Take the node out of the parent's chain that contains this node
- */
-
- if ( the_jnode->Parent != NULL ) {
- Chain_Extract( (Chain_Node *) the_jnode );
- the_jnode->Parent = NULL;
- }
-
- /*
- * Decrement the link counter and see if we can free the space.
- */
-
- the_jnode->st_nlink--;
- IMFS_update_ctime( the_jnode );
-
- /*
- * The file cannot be open and the link must be less than 1 to free.
- */
-
- if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) {
-
- /*
- * Is the rtems_filesystem_current is this node?
- */
-
- if ( rtems_filesystem_current.node_access == pathloc->node_access )
- rtems_filesystem_current.node_access = NULL;
-
- /*
- * Free memory associated with a memory file.
- */
-
- IMFS_memfile_remove( the_jnode );
-
- free( the_jnode );
- }
-
- return 0;
-
-}
-
-
diff --git a/cpukit/libfs/src/imfs/miniimfs_init.c b/cpukit/libfs/src/imfs/miniimfs_init.c
deleted file mode 100644
index b2e4fa936e..0000000000
--- a/cpukit/libfs/src/imfs/miniimfs_init.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Mini-IMFS Initialization
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h> /* for mkdir */
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdlib.h>
-
-#include <assert.h>
-
-#include "imfs.h"
-#include "libio_.h"
-
-#if defined(IMFS_DEBUG)
-#include <stdio.h>
-#endif
-
-/*
- * miniIMFS file system operations table
- */
-
-rtems_filesystem_operations_table miniIMFS_ops = {
- IMFS_eval_path,
- IMFS_evaluate_for_make,
- NULL, /* XXX IMFS_link, */
- NULL, /* XXX IMFS_unlink, */
- IMFS_node_type,
- IMFS_mknod,
- NULL, /* XXX IMFS_chown, */
- NULL, /* XXX IMFS_freenodinfo, */
- NULL, /* XXX IMFS_mount, */
- miniIMFS_initialize,
- NULL, /* XXX IMFS_unmount, */
- NULL, /* XXX IMFS_fsunmount, */
- NULL, /* XXX IMFS_utime, */
- NULL, /* XXX IMFS_evaluate_link, */
- NULL, /* XXX IMFS_symlink, */
- NULL /* XXX IMFS_readlink */
-};
-
-/*
- * miniIMFS_initialize
- */
-
-int miniIMFS_initialize(
- rtems_filesystem_mount_table_entry_t *temp_mt_entry
-)
-{
- IMFS_initialize_support(
- temp_mt_entry,
- &miniIMFS_ops,
- &rtems_filesystem_null_handlers, /* for memfiles */
- &rtems_filesystem_null_handlers /* for directories */
- );
- return 0;
-}
-
-
-
diff --git a/cpukit/libmisc/Makefile.am b/cpukit/libmisc/Makefile.am
deleted file mode 100644
index 45cff91454..0000000000
--- a/cpukit/libmisc/Makefile.am
+++ /dev/null
@@ -1,13 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-
-SUBDIRS = dummy dumpbuf stackchk monitor cpuuse rtmonuse untar wrapup
-
-EXTRA_DIST = README
-
-include $(top_srcdir)/../../../automake/subdirs.am
-include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/libmisc/README b/cpukit/libmisc/README
deleted file mode 100644
index bbde4feeae..0000000000
--- a/cpukit/libmisc/README
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-# $Id$
-#
-
-This directory contains for the "miscellaneous" library. Currently
-this library contains a number of useful support libraries:
-
- + Task Stack Overflow Checker
- + Workspace Consistency Checker
- + Task Execution Time Monitor
- + Period Statistics Monitor
- + Debug Monitor
-
-The following ideas have been mentioned for items which could go
-in this library, but this list is not all inclusive:
-
- + there are no outstanding suggestions.
-
-The intent of this library is to provide a home for useful utility routines
-which are dependent upon RTEMS.
-
---joel
-16 Sept 97
diff --git a/cpukit/libmisc/cpuuse/Makefile.am b/cpukit/libmisc/cpuuse/Makefile.am
deleted file mode 100644
index 542eae4bab..0000000000
--- a/cpukit/libmisc/cpuuse/Makefile.am
+++ /dev/null
@@ -1,41 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-LIBNAME = libcpuuse-tmp
-LIB = $(ARCH)/$(LIBNAME).a
-
-C_FILES = cpuuse.c
-C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
-
-H_FILES = cpuuse.h
-
-OBJS = $(C_O_FILES)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../automake/lib.am
-
-$(PROJECT_INCLUDE)/rtems:
- @$(mkinstalldirs) $@
-$(PROJECT_INCLUDE)/rtems/%.h: %.h
- $(INSTALL_DATA) $< $@
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-$(LIB): $(OBJS)
- $(make-library)
-
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems \
- $(H_FILES:%=$(PROJECT_INCLUDE)/rtems/%)
-
-all-local: $(ARCH) $(PREINSTALL_FILES) $(OBJS) $(LIB)
-
-.PRECIOUS: $(LIB)
-
-EXTRA_DIST = README cpuuse.c cpuuse.h
-
-include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/libmisc/cpuuse/README b/cpukit/libmisc/cpuuse/README
deleted file mode 100644
index 20e76f07bc..0000000000
--- a/cpukit/libmisc/cpuuse/README
+++ /dev/null
@@ -1,41 +0,0 @@
-#
-# $Id$
-#
-
-This directory contains a stack bounds checker. It provides two
-primary features:
-
- + check for stack overflow at each context switch
- + provides an educated guess at each task's stack usage
-
-The stack overflow check at context switch works by looking for
-a 16 byte pattern at the logical end of the stack to be corrupted.
-The "guesser" assumes that the entire stack was prefilled with a known
-pattern and assumes that the pattern is still in place if the memory
-has not been used as a stack.
-
-Both of these can be fooled by pushing large holes onto the stack
-and not writing to them... or (much more unlikely) writing the
-magic patterns into memory.
-
-This code has not been extensively tested. It is provided as a tool
-for RTEMS users to catch the most common mistake in multitasking
-systems ... too little stack space. Suggestions and comments are appreciated.
-
-NOTES:
-
-1. Stack usage information is questionable on CPUs which push
- large holes on stack.
-
-2. The stack checker has a tendency to generate a fault when
- trying to print the helpful diagnostic message. If it comes
- out, congratulations. If not, then the variable Stack_check_Blown_task
- contains a pointer to the TCB of the offending task. This
- is usually enough to go on.
-
-FUTURE:
-
-1. Determine how/if gcc will generate stack probe calls and support that.
-
-2. Get accurate stack usage numbers on i960.. it pushes very large
- holes on the stack.
diff --git a/cpukit/libmisc/cpuuse/cpuuse.c b/cpukit/libmisc/cpuuse/cpuuse.c
deleted file mode 100644
index 66c006e3d3..0000000000
--- a/cpukit/libmisc/cpuuse/cpuuse.c
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * CPU Usage Reporter
- *
- * COPYRIGHT (c) 1989-1999. 1996.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- *
- */
-
-#include <rtems.h>
-
-#include <assert.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include <rtems/cpuuse.h>
-
-unsigned32 CPU_usage_Ticks_at_last_reset;
-
-/*PAGE
- *
- * CPU_usage_Dump
- */
-
-void CPU_usage_Dump( void )
-{
- unsigned32 i;
- unsigned32 class_index;
- Thread_Control *the_thread;
- Objects_Information *information;
- unsigned32 u32_name;
- char name[5];
- unsigned32 total_units = 0;
-
- for ( class_index = OBJECTS_CLASSES_FIRST ;
- class_index <= OBJECTS_CLASSES_LAST ;
- class_index++ ) {
- information = _Objects_Information_table[ class_index ];
- if ( information && information->is_thread ) {
- for ( i=1 ; i <= information->maximum ; i++ ) {
- the_thread = (Thread_Control *)information->local_table[ i ];
-
- if ( the_thread )
- total_units += the_thread->ticks_executed;
- }
- }
- }
-
- printf("CPU Usage by thread\n");
-#if defined(unix) || ( CPU_HARDWARE_FP == TRUE )
- printf( " ID NAME TICKS PERCENT\n" );
-#else
- printf( " ID NAME TICKS\n" );
-#endif
-
- for ( class_index = OBJECTS_CLASSES_FIRST ;
- class_index <= OBJECTS_CLASSES_LAST ;
- class_index++ ) {
- information = _Objects_Information_table[ class_index ];
- if ( information && information->is_thread ) {
- for ( i=1 ; i <= information->maximum ; i++ ) {
- the_thread = (Thread_Control *)information->local_table[ i ];
-
- if ( !the_thread )
- continue;
-
- u32_name = *(unsigned32 *)the_thread->Object.name;
-
- name[ 0 ] = (u32_name >> 24) & 0xff;
- name[ 1 ] = (u32_name >> 16) & 0xff;
- name[ 2 ] = (u32_name >> 8) & 0xff;
- name[ 3 ] = (u32_name >> 0) & 0xff;
- name[ 4 ] = '\0';
-
-#if defined(unix) || ( CPU_HARDWARE_FP == TRUE )
- printf( "0x%08x %4s %8d %5.3f\n",
- the_thread->Object.id,
- name,
- the_thread->ticks_executed,
- (total_units) ?
- (double)the_thread->ticks_executed / (double)total_units :
- (double)total_units
- );
-#else
- printf( "0x%08x %4s %8d\n",
- the_thread->Object.id,
- name,
- the_thread->ticks_executed
- );
-#endif
- }
- }
- }
-
- printf(
- "\nTicks since last reset = %d\n",
- _Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset
- );
- printf( "\nTotal Units = %d\n", total_units );
-}
-
-/*PAGE
- *
- * CPU_usage_Reset
- */
-
-void CPU_usage_Reset( void )
-{
- unsigned32 i;
- unsigned32 class_index;
- Thread_Control *the_thread;
- Objects_Information *information;
-
- CPU_usage_Ticks_at_last_reset = _Watchdog_Ticks_since_boot;
-
- for ( class_index = OBJECTS_CLASSES_FIRST ;
- class_index <= OBJECTS_CLASSES_LAST ;
- class_index++ ) {
- information = _Objects_Information_table[ class_index ];
- if ( information && information->is_thread ) {
- for ( i=1 ; i <= information->maximum ; i++ ) {
- the_thread = (Thread_Control *)information->local_table[ i ];
-
- if ( !the_thread )
- continue;
-
- the_thread->ticks_executed = 0;
- }
- }
- }
-
-}
-
diff --git a/cpukit/libmisc/cpuuse/cpuuse.h b/cpukit/libmisc/cpuuse/cpuuse.h
deleted file mode 100644
index 34e2b3ade5..0000000000
--- a/cpukit/libmisc/cpuuse/cpuuse.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* cpuuse.h
- *
- * This include file contains information necessary to utilize
- * and install the cpu usage reporting mechanism.
- *
- * COPYRIGHT (c) 1989-1999. 1996.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __CPU_USE_h
-#define __CPU_USE_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * CPU_usage_Dump
- */
-
-void CPU_usage_Dump( void );
-
-/*
- * CPU_usage_Reset
- */
-
-void CPU_usage_Reset( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/libmisc/dummy/Makefile.am b/cpukit/libmisc/dummy/Makefile.am
deleted file mode 100644
index ba67d1a561..0000000000
--- a/cpukit/libmisc/dummy/Makefile.am
+++ /dev/null
@@ -1,36 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-PGMNAME = dummy
-PGM = $(ARCH)/$(PGMNAME).rel
-
-C_FILES = dummy.c
-C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
-
-OBJS = $(C_O_FILES)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../automake/lib.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-$(PGM): $(OBJS)
- $(make-rel)
-
-$(PROJECT_RELEASE)/lib/$(PGMNAME)$(LIB_VARIANT).rel: $(PGM)
- $(INSTALL_DATA) $< $@
-
-TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/$(PGMNAME)$(LIB_VARIANT).rel
-
-all-local: $(ARCH) $(OBJS) $(PGM) $(TMPINSTALL_FILES)
-
-.PRECIOUS: $(PGM)
-
-EXTRA_DIST = README dummy.c
-
-include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/libmisc/dummy/README b/cpukit/libmisc/dummy/README
deleted file mode 100644
index 03bb30834d..0000000000
--- a/cpukit/libmisc/dummy/README
+++ /dev/null
@@ -1,23 +0,0 @@
-dummy.rel
-=========
-
-A relocatible objects which contains a dummy configuration for RTEMS.
-
-Helps linking standard c-program code with RTEMS, which shall *not* be run
-on a target, such as configure script code fragments generated by autoconf's
-AC_TRY_LINK.
-
-Example:
-
-tar xzvf somepkg.tar.gz
-cd somepkg
-
-LDFLAGS=/usr/local/rtems/<cpu>-rtems/<bsp>/lib/dummy.rel \
-CC="<cpu>-rtems-gcc \
--B/usr/local/rtems/<cpu>-rtems/<bsp>/lib/ -specs bsp_specs -qrtems" \
-CC_FOR_BUILD="gcc" \
-configure --host=<cpu>-rtems --build=i686-pc-linux-gnu
-make
-
-History:
-Starting dummy.c with a copy of rtems-19990528/c/src/tests/samples/minimum/init.c
diff --git a/cpukit/libmisc/dummy/dummy.c b/cpukit/libmisc/dummy/dummy.c
deleted file mode 100644
index 92f284fd83..0000000000
--- a/cpukit/libmisc/dummy/dummy.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Init
- *
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-
-rtems_task Init(
- rtems_task_argument ignored
-)
-{
-}
-
-/* configuration information */
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#define CONFIGURE_INIT
-
-#include <confdefs.h>
-
-/* global variables */
-
diff --git a/cpukit/libmisc/dumpbuf/Makefile.am b/cpukit/libmisc/dumpbuf/Makefile.am
deleted file mode 100644
index 7bcd22e46e..0000000000
--- a/cpukit/libmisc/dumpbuf/Makefile.am
+++ /dev/null
@@ -1,41 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-LIBNAME = libdumpbuf-tmp
-LIB = $(ARCH)/$(LIBNAME).a
-
-C_FILES = dumpbuf.c
-C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
-
-H_FILES = dumpbuf.h
-
-OBJS = $(C_O_FILES)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../automake/lib.am
-
-$(PROJECT_INCLUDE)/rtems:
- @$(mkinstalldirs) $@
-$(PROJECT_INCLUDE)/rtems/%.h: %.h
- $(INSTALL_DATA) $< $@
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-$(LIB): $(OBJS)
- $(make-library)
-
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems \
- $(H_FILES:%=$(PROJECT_INCLUDE)/rtems/%)
-
-all-local: $(ARCH) $(PREINSTALL_FILES) $(OBJS) $(LIB)
-
-.PRECIOUS: $(LIB)
-
-EXTRA_DIST = dumpbuf.c dumpbuf.h
-
-include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/libmisc/dumpbuf/dumpbuf.c b/cpukit/libmisc/dumpbuf/dumpbuf.c
deleted file mode 100644
index 1e41f52bbf..0000000000
--- a/cpukit/libmisc/dumpbuf/dumpbuf.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * COPYRIGHT (c) 1997.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <rtems/dumpbuf.h>
-
-/*
- * Put the body below Dump_Buffer so it won't get inlined.
- */
-
-static inline void Dump_Line(
- unsigned char *buffer,
- int length
-);
-
-void Dump_Buffer(
- unsigned char *buffer,
- int length
-)
-{
-
- int i, mod, max;
-
- if ( !length ) return;
-
- mod = length % 16;
-
- max = length - mod;
-
- for ( i=0 ; i<max ; i+=16 )
- Dump_Line( &buffer[ i ], 16 );
-
- if ( mod )
- Dump_Line( &buffer[ max ], mod );
-}
-
-static inline void Dump_Line(
- unsigned char *buffer,
- int length
-)
-{
-
- int i;
- char line_buffer[120];
-
- line_buffer[0] = '\0';
-
- for( i=0 ; i<length ; i++ )
- sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
-
- for( ; i<16 ; i++ )
- strcat( line_buffer, " " );
-
- strcat( line_buffer, "|" );
- for( i=0 ; i<length ; i++ )
- sprintf( line_buffer, "%s%c", line_buffer,
- isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
-
- for( ; i<16 ; i++ )
- strcat( line_buffer, " " );
-
- strcat( line_buffer, "|\n" );
-
- printf( line_buffer );
-}
diff --git a/cpukit/libmisc/dumpbuf/dumpbuf.h b/cpukit/libmisc/dumpbuf/dumpbuf.h
deleted file mode 100644
index 3af196e8d1..0000000000
--- a/cpukit/libmisc/dumpbuf/dumpbuf.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * COPYRIGHT (c) 1997.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __DUMP_BUFFER_h
-#define __DUMP_BUFFER_h
-
-void Dump_Buffer(
- unsigned char *buffer,
- int length
-);
-
-#endif
-/* end of include file */
diff --git a/cpukit/libmisc/monitor/Makefile.am b/cpukit/libmisc/monitor/Makefile.am
deleted file mode 100644
index 2c8db51ffa..0000000000
--- a/cpukit/libmisc/monitor/Makefile.am
+++ /dev/null
@@ -1,54 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-LIBNAME = libmonitor-tmp
-LIB = $(ARCH)/$(LIBNAME).a
-
-# We only build multiprocessing related files if HAS_MP was defined
-MP_C_FILES = mon-mpci.c
-
-C_FILES = mon-command.c mon-symbols.c mon-prmisc.c mon-monitor.c \
- mon-object.c mon-server.c mon-task.c mon-queue.c mon-driver.c \
- mon-dname.c mon-itask.c mon-extension.c mon-manager.c mon-config.c
-
-if HAS_MP
-C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o) $(MP_C_FILES:%.c=$(ARCH)/%.o)
-else
-C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
-endif
-
-H_FILES = monitor.h symbols.h
-
-OBJS = $(C_O_FILES)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../automake/lib.am
-
-$(PROJECT_INCLUDE)/rtems:
- $(mkinstalldirs) $@
-$(PROJECT_INCLUDE)/rtems/%.h: %.h
- $(INSTALL_DATA) $< $@
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-$(LIB): $(OBJS)
- $(make-library)
-
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems \
- $(H_FILES:%=$(PROJECT_INCLUDE)/rtems/%)
-
-all-local: $(ARCH) $(PREINSTALL_FILES) $(OBJS) $(LIB)
-
-.PRECIOUS: $(LIB)
-
-EXTRA_DIST = README mon-command.c mon-config.c mon-dname.c mon-driver.c \
- mon-extension.c mon-itask.c mon-manager.c mon-monitor.c mon-mpci.c \
- mon-object.c mon-prmisc.c mon-queue.c mon-server.c mon-symbols.c \
- mon-task.c monitor.h symbols.h
-
-include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/libmisc/monitor/README b/cpukit/libmisc/monitor/README
deleted file mode 100644
index d5a73da140..0000000000
--- a/cpukit/libmisc/monitor/README
+++ /dev/null
@@ -1,97 +0,0 @@
-#
-# $Id$
-#
-
-monitor task
-
-The monitor task is an optional task that knows about RTEMS
-data structures and can print out information about them.
-It is a work-in-progress and needs many more commands, but
-is useful now.
-
-The monitor works best when it is the highest priority task,
-so all your other tasks should ideally be at some priority
-greater than 1.
-
-To use the monitor:
--------------------
-
- #include <rtems/monitor.h>
-
- ...
-
- rtems_monitor_init(0);
-
- The parameter to rtems_monitor_init() tells the monitor whether
- to suspend itself on startup. A value of 0 causes the monitor
- to immediately enter command mode; a non-zero value causes the
- monitor to suspend itself after creation and wait for explicit
- wakeup.
-
-
- rtems_monitor_wakeup();
-
- wakes up a suspended monitor and causes it to reenter command mode.
-
-Monitor commands
-----------------
-
- The monitor prompt is 'rtems> '.
- Can abbreviate commands to "uniquity"
- There is a 'help' command. Here is the output from various
- help commands:
-
- Commands (may be abbreviated)
-
- help -- get this message or command specific help
- task -- show task information
- queue -- show message queue information
- symbol -- show entries from symbol table
- pause -- pause monitor for a specified number of ticks
- fatal -- invoke a fatal RTEMS error
-
- task [id [id ...] ]
- display information about the specified tasks.
- Default is to display information about all tasks on this node
-
- queue [id [id ... ] ]
- display information about the specified message queues
- Default is to display information about all queues on this node
-
- symbol [ symbolname [symbolname ... ] ]
- display value associated with specified symbol.
- Defaults to displaying all known symbols.
-
- pause [ticks]
- monitor goes to "sleep" for specified ticks (default is 1)
- monitor will resume at end of period or if explicitly awakened
-
- fatal [status]
- Invoke 'rtems_fatal_error_occurred' with 'status'
- (default is RTEMS_INTERNAL_ERROR)
-
- continue
- put the monitor to sleep waiting for an explicit wakeup from the
- program running.
-
-
-Sample output from 'task' command
----------------------------------
-
- rtems> task
- ID NAME PRIO STAT MODES EVENTS WAITID WAITARG NOTES
- ------------------------------------------------------------------------
- 00010001 UI1 2 READY P:T:nA NONE15: 0x40606348
- 00010002 RMON 1 READY nP NONE15: 0x40604110
-
- 'RMON' is the monitor itself, so we have 1 "user" task.
- Its modes are P:T:nA which translate to:
-
- preemptable
- timesliced
- no ASRS
-
- It has no events.
- It has a notepad value for notepad 15 which is 0x40606348
- (this is the libc thread state)
-
diff --git a/cpukit/libmisc/monitor/mon-command.c b/cpukit/libmisc/monitor/mon-command.c
deleted file mode 100644
index 5c733b60d9..0000000000
--- a/cpukit/libmisc/monitor/mon-command.c
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * Command parsing routines for RTEMS monitor
- *
- * TODO:
- *
- * $Id$
- */
-
-#include <rtems.h>
-
-#include <rtems/monitor.h>
-
-#include <stdio.h>
-#include <string.h>
-
-/*
- * make_argv(cp): token-count
- * Break up the command line in 'cp' into global argv[] and argc (return
- * value).
- */
-
-int
-rtems_monitor_make_argv(
- char *cp,
- int *argc_p,
- char **argv)
-{
- int argc = 0;
-
- while ((cp = strtok(cp, " \t\n\r")))
- {
- argv[argc++] = cp;
- cp = (char *) NULL;
- }
- argv[argc] = (char *) NULL; /* end of argv */
-
- return *argc_p = argc;
-}
-
-
-/*
- * Read and break up a monitor command
- *
- * We have to loop on the gets call, since it will return NULL under UNIX
- * RTEMS when we get a signal (eg: SIGALRM).
- */
-
-int
-rtems_monitor_command_read(char *command,
- int *argc,
- char **argv)
-{
- static char monitor_prompt[32];
-
- /*
- * put node number in the prompt if we are multiprocessing
- */
-
- if (!rtems_configuration_get_user_multiprocessing_table())
- sprintf(monitor_prompt, "%s", MONITOR_PROMPT);
- else if (rtems_monitor_default_node != rtems_monitor_node)
- sprintf(monitor_prompt, "%d-%s-%d", rtems_monitor_node, MONITOR_PROMPT, rtems_monitor_default_node);
- else
- sprintf(monitor_prompt, "%d-%s", rtems_monitor_node, MONITOR_PROMPT);
-
-#ifdef RTEMS_UNIX
- /* RTEMS on unix gets so many interrupt system calls this is hosed */
- printf("%s> ", monitor_prompt);
- fflush(stdout);
- while (gets(command) == (char *) 0)
- ;
-#else
- do
- {
- printf("%s> ", monitor_prompt);
- fflush(stdout);
- } while (gets(command) == (char *) 0);
-#endif
-
- return rtems_monitor_make_argv(command, argc, argv);
-}
-
-/*
- * Look up a command in a command table
- *
- */
-
-rtems_monitor_command_entry_t *
-rtems_monitor_command_lookup(
- rtems_monitor_command_entry_t *table,
- int argc,
- char **argv
-)
-{
- rtems_monitor_command_entry_t *p;
- rtems_monitor_command_entry_t *abbreviated_match = 0;
- int abbreviated_matches = 0;
- char *command;
- int command_length;
-
- command = argv[0];
-
- if ((table == 0) || (command == 0))
- goto failed;
-
- command_length = strlen(command);
-
- for (p = table; p->command; p++)
- if (STREQ(command, p->command)) /* exact match */
- goto done;
- else if (STRNEQ(command, p->command, command_length))
- {
- abbreviated_matches++;
- abbreviated_match = p;
- }
-
- /* no perfect match; is there a non-ambigous abbreviated match? */
- if ( ! abbreviated_match)
- {
- printf("Unrecognized command '%s'; try 'help'\n", command);
- goto failed;
- }
-
- if (abbreviated_matches > 1)
- {
- printf("Command '%s' is ambiguous; try 'help'\n", command);
- goto failed;
- }
-
- p = abbreviated_match;
-
-done:
- if (p->command_function == 0)
- goto failed;
- return p;
-
-failed:
- return 0;
-}
-
-void
-rtems_monitor_command_usage(rtems_monitor_command_entry_t *table,
- char *command_string)
-{
- rtems_monitor_command_entry_t *help = 0;
- char *help_command_argv[2];
-
- /* if first entry in table is a usage, then print it out */
- if (command_string == 0)
- {
- if (STREQ(table->command, "--usage--") && table->usage)
- help = table;
- }
- else
- {
- help_command_argv[0] = command_string;
- help_command_argv[1] = 0;
- help = rtems_monitor_command_lookup(table, 1, help_command_argv);
- }
-
- if (help)
- printf("%s\n", help->usage);
-}
-
-
-void
-rtems_monitor_help_cmd(
- int argc,
- char **argv,
- unsigned32 command_arg,
- boolean verbose
-)
-{
- int arg;
- rtems_monitor_command_entry_t *command;
-
- command = (rtems_monitor_command_entry_t *) command_arg;
-
- if (argc == 1)
- rtems_monitor_command_usage(command, 0);
- else
- {
- for (arg=1; argv[arg]; arg++)
- rtems_monitor_command_usage(command, argv[arg]);
- }
-}
diff --git a/cpukit/libmisc/monitor/mon-config.c b/cpukit/libmisc/monitor/mon-config.c
deleted file mode 100644
index 5efd480b14..0000000000
--- a/cpukit/libmisc/monitor/mon-config.c
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * RTEMS Config display support
- *
- * TODO
- *
- * $Id$
- */
-
-
-#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
-#include <rtems.h>
-#include <rtems/monitor.h>
-
-#include <stdio.h>
-#include <stdlib.h> /* strtoul() */
-
-#define DATACOL 15
-#define CONTCOL DATACOL /* continued col */
-
-/*
- * Fill in entire monitor config table
- * for sending to a remote monitor or printing on the local system
- */
-
-void
-rtems_monitor_config_canonical(
- rtems_monitor_config_t *canonical_config,
- void *config_void
-)
-{
- rtems_configuration_table *c = (rtems_configuration_table *) config_void;
- rtems_api_configuration_table *r = c->RTEMS_api_configuration;
-
- canonical_config->work_space_start = c->work_space_start;
- canonical_config->work_space_size = c->work_space_size;
- canonical_config->maximum_tasks = r->maximum_tasks;
- canonical_config->maximum_timers = r->maximum_timers;
- canonical_config->maximum_semaphores = r->maximum_semaphores;
- canonical_config->maximum_message_queues = r->maximum_message_queues;
- canonical_config->maximum_partitions = r->maximum_partitions;
- canonical_config->maximum_regions = r->maximum_regions;
- canonical_config->maximum_ports = r->maximum_ports;
- canonical_config->maximum_periods = r->maximum_periods;
- canonical_config->maximum_extensions = c->maximum_extensions;
- canonical_config->microseconds_per_tick = c->microseconds_per_tick;
- canonical_config->ticks_per_timeslice = c->ticks_per_timeslice;
- canonical_config->number_of_initialization_tasks = r->number_of_initialization_tasks;
-}
-
-/*
- * This is easy, since there is only 1 (altho we could get them from
- * other nodes...)
- */
-
-void *
-rtems_monitor_config_next(
- void *object_info,
- rtems_monitor_config_t *canonical_config,
- rtems_id *next_id
-)
-{
- rtems_configuration_table *c = _Configuration_Table;
- int n = rtems_get_index(*next_id);
-
- if (n >= 1)
- goto failed;
-
- _Thread_Disable_dispatch();
-
- *next_id += 1;
- return (void *) c;
-
-failed:
- *next_id = RTEMS_OBJECT_ID_FINAL;
- return 0;
-}
-
-
-void
-rtems_monitor_config_dump_header(
- boolean verbose
-)
-{
- printf("\
-INITIAL (startup) Configuration Info\n");
-/*23456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
-0 1 2 3 4 5 6 7 */
- rtems_monitor_separator();
-}
-
-
-void
-rtems_monitor_config_dump(
- rtems_monitor_config_t *monitor_config,
- boolean verbose
-)
-{
- unsigned32 length = 0;
-
- length = 0;
- length += printf("WORKSPACE");
- length += rtems_monitor_pad(DATACOL, length);
- length += printf("start: 0x%x; size: 0x%x\n",
- (unsigned32) monitor_config->work_space_start,
- monitor_config->work_space_size);
-
- length = 0;
- length += printf("TIME");
- length += rtems_monitor_pad(DATACOL, length);
- length += printf("usec/tick: %d; tick/timeslice: %d; tick/sec: %d\n",
- monitor_config->microseconds_per_tick,
- monitor_config->ticks_per_timeslice,
- 1000000 / monitor_config->microseconds_per_tick);
-
- length = 0;
- length += printf("MAXIMUMS");
- length += rtems_monitor_pad(DATACOL, length);
- length += printf("tasks: %d; timers: %d; sems: %d; que's: %d; ext's: %d\n",
- monitor_config->maximum_tasks,
- monitor_config->maximum_timers,
- monitor_config->maximum_semaphores,
- monitor_config->maximum_message_queues,
- monitor_config->maximum_extensions);
- length = 0;
- length += rtems_monitor_pad(CONTCOL, length);
- length += printf("partitions: %d; regions: %d; ports: %d; periods: %d\n",
- monitor_config->maximum_partitions,
- monitor_config->maximum_regions,
- monitor_config->maximum_ports,
- monitor_config->maximum_periods);
-}
diff --git a/cpukit/libmisc/monitor/mon-dname.c b/cpukit/libmisc/monitor/mon-dname.c
deleted file mode 100644
index 45c28342ff..0000000000
--- a/cpukit/libmisc/monitor/mon-dname.c
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * RTEMS monitor driver names support.
- *
- * There are 2 "driver" things the monitor knows about.
- *
- * 1. Regular RTEMS drivers.
- * This is a table indexed by major device number and
- * containing driver entry points only.
- *
- * 2. Driver name table.
- * A separate table of names for drivers.
- * The table converts driver names to a major number
- * as index into the driver table and a minor number
- * for an argument to driver.
- *
- * Drivers are displayed with 'driver' command.
- * Names are displayed with 'dname' command.
- *
- * $Id$
- */
-
-#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
-#include <rtems.h>
-
-#include <rtems/monitor.h>
-
-#include <stdio.h>
-#include <stdlib.h> /* strtoul() */
-#include <string.h> /* strncpy() */
-
-#define DATACOL 15
-#define CONTCOL DATACOL /* continued col */
-
-void
-rtems_monitor_dname_canonical(
- rtems_monitor_dname_t *canonical_dname,
- void *dname_void
-)
-{
- rtems_driver_name_t *np = (rtems_driver_name_t *) dname_void;
-
- (void) strncpy(canonical_dname->name_string, np->device_name, sizeof(canonical_dname->name_string));
- canonical_dname->major = np->major;
- canonical_dname->minor = np->minor;
-}
-
-void *
-rtems_monitor_dname_next(
- void *object_information,
- rtems_monitor_dname_t *canonical_dname,
- rtems_id *next_id
-)
-{
- rtems_unsigned32 n = rtems_get_index(*next_id);
- rtems_driver_name_t *table = _IO_Driver_name_table;
- rtems_driver_name_t *np = 0;
-
-/* XXX should we be using _IO_Number_of_devices */
- for (np = table + n ; n<_IO_Number_of_devices; n++, np++)
- if (np->device_name)
- goto done;
-
- *next_id = RTEMS_OBJECT_ID_FINAL;
- return 0;
-
-done:
- _Thread_Disable_dispatch();
-
- /*
- * dummy up a fake id and name for this item
- */
-
- canonical_dname->id = n;
- canonical_dname->name = rtems_build_name('-', '-', '-', '-');
-
- *next_id += 1;
- return np;
-}
-
-void
-rtems_monitor_dname_dump_header(
- boolean verbose
-)
-{
- printf("\
- Major:Minor Name\n");
-/*23456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
-0 1 2 3 4 5 6 7 */
- rtems_monitor_separator();
-}
-
-void
-rtems_monitor_dname_dump(
- rtems_monitor_dname_t *monitor_dname,
- boolean verbose
-)
-{
- unsigned32 length = 0;
-
- length += rtems_monitor_pad(6, length);
- length += rtems_monitor_dump_hex(monitor_dname->major);
- length += printf(":");
- length += rtems_monitor_dump_hex(monitor_dname->minor);
-
- length += rtems_monitor_pad(16, length);
- length += printf("%.*s",
- (int) sizeof(monitor_dname->name_string),
- (char *) monitor_dname->name_string);
-
- length += printf("\n");
- length = 0;
-}
diff --git a/cpukit/libmisc/monitor/mon-driver.c b/cpukit/libmisc/monitor/mon-driver.c
deleted file mode 100644
index c8eb36ab4e..0000000000
--- a/cpukit/libmisc/monitor/mon-driver.c
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * RTEMS monitor IO (device drivers) support
- *
- * There are 2 "driver" things the monitor knows about.
- *
- * 1. Regular RTEMS drivers.
- * This is a table indexed by major device number and
- * containing driver entry points only.
- *
- * 2. Driver name table.
- * A separate table of names for drivers.
- * The table converts driver names to a major number
- * as index into the driver table and a minor number
- * for an argument to driver.
- *
- * Drivers are displayed with 'driver' command.
- * Names are displayed with 'name' command.
- *
- * $Id$
- */
-
-#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
-#include <rtems.h>
-
-#include <rtems/monitor.h>
-
-#include <stdio.h>
-#include <stdlib.h> /* strtoul() */
-
-#define DATACOL 15
-#define CONTCOL DATACOL /* continued col */
-
-
-void
-rtems_monitor_driver_canonical(
- rtems_monitor_driver_t *canonical_driver,
- void *driver_void
-)
-{
- rtems_driver_address_table *d = (rtems_driver_address_table *) driver_void;
-
- rtems_monitor_symbol_canonical_by_value(&canonical_driver->initialization,
- (void *) d->initialization);
-
- rtems_monitor_symbol_canonical_by_value(&canonical_driver->open,
- (void *) d->open);
- rtems_monitor_symbol_canonical_by_value(&canonical_driver->close,
- (void *) d->close);
- rtems_monitor_symbol_canonical_by_value(&canonical_driver->read,
- (void *) d->read);
- rtems_monitor_symbol_canonical_by_value(&canonical_driver->write,
- (void *) d->write);
- rtems_monitor_symbol_canonical_by_value(&canonical_driver->control,
- (void *) d->control);
-}
-
-
-void *
-rtems_monitor_driver_next(
- void *object_info,
- rtems_monitor_driver_t *canonical_driver,
- rtems_id *next_id
-)
-{
- rtems_configuration_table *c = _Configuration_Table;
- rtems_unsigned32 n = rtems_get_index(*next_id);
-
- if (n >= c->number_of_device_drivers)
- goto failed;
-
- _Thread_Disable_dispatch();
-
- /*
- * dummy up a fake id and name for this item
- */
-
- canonical_driver->id = n;
- canonical_driver->name = rtems_build_name('-', '-', '-', '-');
-
- *next_id += 1;
- return (void *) (c->Device_driver_table + n);
-
-failed:
- *next_id = RTEMS_OBJECT_ID_FINAL;
- return 0;
-}
-
-
-void
-rtems_monitor_driver_dump_header(
- boolean verbose
-)
-{
- printf("\
- Major Entry points\n");
-/*23456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
-0 1 2 3 4 5 6 7 */
- rtems_monitor_separator();
-}
-
-void
-rtems_monitor_driver_dump(
- rtems_monitor_driver_t *monitor_driver,
- boolean verbose
-)
-{
- unsigned32 length = 0;
-
- length += printf(" %d", monitor_driver->id);
-
- length += rtems_monitor_pad(13, length);
- length += printf("init: ");
- length += rtems_monitor_symbol_dump(&monitor_driver->initialization, verbose);
- length += printf("; control: ");
- length += rtems_monitor_symbol_dump(&monitor_driver->control, verbose);
- length += printf("\n");
- length = 0;
-
- length += rtems_monitor_pad(13, length);
-
- length += printf("open: ");
- length += rtems_monitor_symbol_dump(&monitor_driver->open, verbose);
- length += printf("; close: ");
- length += rtems_monitor_symbol_dump(&monitor_driver->close, verbose);
- length += printf("\n");
- length = 0;
-
- length += rtems_monitor_pad(13, length);
-
- length += printf("read: ");
- length += rtems_monitor_symbol_dump(&monitor_driver->read, verbose);
- length += printf("; write: ");
- length += rtems_monitor_symbol_dump(&monitor_driver->write, verbose);
- length += printf("\n");
- length = 0;
-}
diff --git a/cpukit/libmisc/monitor/mon-extension.c b/cpukit/libmisc/monitor/mon-extension.c
deleted file mode 100644
index 107fd5184e..0000000000
--- a/cpukit/libmisc/monitor/mon-extension.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * RTEMS Monitor extension support
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include <rtems/monitor.h>
-
-#include <stdio.h>
-
-void
-rtems_monitor_extension_canonical(
- rtems_monitor_extension_t *canonical_extension,
- void *extension_void
-)
-{
- Extension_Control *rtems_extension = (Extension_Control *) extension_void;
- rtems_extensions_table *e = &rtems_extension->Extension.Callouts;
-
- rtems_monitor_symbol_canonical_by_value(&canonical_extension->e_create,
- (void *) e->thread_create);
-
- rtems_monitor_symbol_canonical_by_value(&canonical_extension->e_start,
- (void *) e->thread_start);
- rtems_monitor_symbol_canonical_by_value(&canonical_extension->e_restart,
- (void *) e->thread_restart);
- rtems_monitor_symbol_canonical_by_value(&canonical_extension->e_delete,
- (void *) e->thread_delete);
- rtems_monitor_symbol_canonical_by_value(&canonical_extension->e_tswitch,
- (void *) e->thread_switch);
- rtems_monitor_symbol_canonical_by_value(&canonical_extension->e_begin,
- (void *) e->thread_begin);
- rtems_monitor_symbol_canonical_by_value(&canonical_extension->e_exitted,
- (void *) e->thread_exitted);
- rtems_monitor_symbol_canonical_by_value(&canonical_extension->e_fatal,
- (void *) e->fatal);
-}
-
-void
-rtems_monitor_extension_dump_header(
- boolean verbose
-)
-{
- printf("\
- ID NAME\n");
-/*23456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
-0 1 2 3 4 5 6 7 */
-
- rtems_monitor_separator();
-}
-
-
-/*
- * Dump out the canonical form
- */
-
-void
-rtems_monitor_extension_dump(
- rtems_monitor_extension_t *monitor_extension,
- boolean verbose
-)
-{
- unsigned32 length = 0;
-
- length += rtems_monitor_dump_id(monitor_extension->id);
- length += rtems_monitor_pad(11, length);
- length += rtems_monitor_dump_name(monitor_extension->name);
-
- length += rtems_monitor_pad(18, length);
- length += printf("create: ");
- length += rtems_monitor_symbol_dump(&monitor_extension->e_create, verbose);
- length += printf("; start: ");
- length += rtems_monitor_symbol_dump(&monitor_extension->e_start, verbose);
- length += printf("; restart: ");
- length += rtems_monitor_symbol_dump(&monitor_extension->e_restart, verbose);
- length += printf("\n");
- length = 0;
-
- length += rtems_monitor_pad(18, length);
- length += printf("delete: ");
- length += rtems_monitor_symbol_dump(&monitor_extension->e_delete, verbose);
- length += printf("; switch: ");
- length += rtems_monitor_symbol_dump(&monitor_extension->e_tswitch, verbose);
- length += printf("; begin: ");
- length += rtems_monitor_symbol_dump(&monitor_extension->e_begin, verbose);
- length += printf("\n");
- length = 0;
-
- length += rtems_monitor_pad(18, length);
- length += printf("exitted: ");
- length += rtems_monitor_symbol_dump(&monitor_extension->e_exitted, verbose);
- length += printf("; fatal: ");
- length += rtems_monitor_symbol_dump(&monitor_extension->e_fatal, verbose);
- length += printf("\n");
- length = 0;
- printf("\n");
-}
diff --git a/cpukit/libmisc/monitor/mon-itask.c b/cpukit/libmisc/monitor/mon-itask.c
deleted file mode 100644
index 59a3a4f284..0000000000
--- a/cpukit/libmisc/monitor/mon-itask.c
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * RTEMS Monitor init task support
- *
- * $Id$
- */
-
-#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
-#include <rtems.h>
-#include <rtems/monitor.h>
-
-#include <stdio.h>
-
-/*
- * As above, but just for init tasks
- */
-void
-rtems_monitor_init_task_canonical(
- rtems_monitor_init_task_t *canonical_itask,
- void *itask_void
-)
-{
- rtems_initialization_tasks_table *rtems_itask = itask_void;
-
- rtems_monitor_symbol_canonical_by_value(&canonical_itask->entry,
- (void *) rtems_itask->entry_point);
-
- canonical_itask->argument = rtems_itask->argument;
- canonical_itask->stack_size = rtems_itask->stack_size;
- canonical_itask->priority = rtems_itask->initial_priority;
- canonical_itask->modes = rtems_itask->mode_set;
- canonical_itask->attributes = rtems_itask->attribute_set;
-}
-
-void *
-rtems_monitor_init_task_next(
- void *object_info,
- rtems_monitor_init_task_t *canonical_init_task,
- rtems_id *next_id
-)
-{
- rtems_configuration_table *c = _Configuration_Table;
- rtems_initialization_tasks_table *itask;
- rtems_unsigned32 n = rtems_get_index(*next_id);
-
- if (n >= c->RTEMS_api_configuration->number_of_initialization_tasks)
- goto failed;
-
- _Thread_Disable_dispatch();
-
- itask = c->RTEMS_api_configuration->User_initialization_tasks_table + n;
-
- /*
- * dummy up a fake id and name for this item
- */
-
- canonical_init_task->id = n;
- canonical_init_task->name = itask->name;
-
- *next_id += 1;
- return (void *) itask;
-
-failed:
- *next_id = RTEMS_OBJECT_ID_FINAL;
- return 0;
-}
-
-
-void
-rtems_monitor_init_task_dump_header(
- boolean verbose
-)
-{
- printf("\
- # NAME ENTRY ARGUMENT PRIO MODES ATTRIBUTES STACK SIZE\n");
-/*23456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
-0 1 2 3 4 5 6 7 */
- rtems_monitor_separator();
-}
-
-/*
- */
-
-void
-rtems_monitor_init_task_dump(
- rtems_monitor_init_task_t *monitor_itask,
- boolean verbose
-)
-{
- int length = 0;
-
- length += rtems_monitor_dump_decimal(monitor_itask->id);
-
- length += rtems_monitor_pad(7, length);
- length += rtems_monitor_dump_name(monitor_itask->name);
-
- length += rtems_monitor_pad(14, length);
- length += rtems_monitor_symbol_dump(&monitor_itask->entry, verbose);
-
- length += rtems_monitor_pad(25, length);
- length += printf("%d [0x%x]", monitor_itask->argument, monitor_itask->argument);
-
- length += rtems_monitor_pad(39, length);
- length += rtems_monitor_dump_priority(monitor_itask->priority);
-
- length += rtems_monitor_pad(46, length);
- length += rtems_monitor_dump_modes(monitor_itask->modes);
-
- length += rtems_monitor_pad(54, length);
- length += rtems_monitor_dump_attributes(monitor_itask->attributes);
-
- length += rtems_monitor_pad(66, length);
- length += printf("%d [0x%x]", monitor_itask->stack_size, monitor_itask->stack_size);
-
- printf("\n");
-}
diff --git a/cpukit/libmisc/monitor/mon-manager.c b/cpukit/libmisc/monitor/mon-manager.c
deleted file mode 100644
index 497f0255a0..0000000000
--- a/cpukit/libmisc/monitor/mon-manager.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * RTEMS Monitor "manager" support.
- * Used to traverse object (chain) lists and print them out.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include <rtems/monitor.h>
-
-#include <stdio.h>
-
-/*
- * "next" routine for all objects that are RTEMS manager objects
- */
-
-void *
-rtems_monitor_manager_next(
- void *table_void,
- void *canonical,
- rtems_id *next_id
-)
-{
- Objects_Information *table = table_void;
- rtems_monitor_generic_t *copy;
- Objects_Control *object = 0;
- Objects_Locations location;
-
- /*
- * When we are called, it must be local
- */
-
- if ( ! _Objects_Is_local_id(*next_id))
- goto done;
-
- object = _Objects_Get_next(table, *next_id, &location, next_id);
-
- if (object)
- {
- copy = (rtems_monitor_generic_t *) canonical;
- copy->id = object->id;
- _Objects_Copy_name_raw(object->name, &copy->name, sizeof(copy->name));
- }
-
-done:
- return object;
-}
-
diff --git a/cpukit/libmisc/monitor/mon-monitor.c b/cpukit/libmisc/monitor/mon-monitor.c
deleted file mode 100644
index 289425d8e4..0000000000
--- a/cpukit/libmisc/monitor/mon-monitor.c
+++ /dev/null
@@ -1,518 +0,0 @@
-/*
- * RTEMS monitor main body
- *
- * TODO:
- * add stuff to RTEMS api
- * rtems_get_name(id)
- * rtems_get_type(id)
- * rtems_build_id(node, type, num)
- * Add a command to dump out info about an arbitrary id when
- * types are added to id's
- * rtems> id idnum
- * idnum: node n, object: whatever, id: whatever
- * allow id's to be specified as n:t:id, where 'n:t' is optional
- * should have a separate monitor FILE stream (ala the debugger)
- * remote request/response stuff should be cleaned up
- * maybe we can use real rpc??
- * 'info' command to print out:
- * interrupt stack location, direction and size
- * floating point config stuff
- * interrupt config stuff
- *
- * $Id$
- */
-
-#include <rtems.h>
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-#include <rtems/monitor.h>
-
-/* set by trap handler */
-extern rtems_tcb *debugger_interrupted_task;
-extern rtems_context *debugger_interrupted_task_context;
-extern rtems_unsigned32 debugger_trap;
-
-/*
- * Various id's for the monitor
- * They need to be public variables for access by other agencies
- * such as debugger and remote servers'
- */
-
-rtems_id rtems_monitor_task_id;
-
-unsigned32 rtems_monitor_node; /* our node number */
-unsigned32 rtems_monitor_default_node; /* current default for commands */
-
-/*
- * The rtems symbol table
- */
-
-rtems_symbol_table_t *rtems_monitor_symbols;
-
-/*
- * The top-level commands
- */
-
-rtems_monitor_command_entry_t rtems_monitor_commands[] = {
- { "--usage--",
- "\n"
- "RTEMS monitor\n"
- "\n"
- "Commands (may be abbreviated)\n"
- "\n"
- " help -- get this message or command specific help\n"
- " pause -- pause monitor for a specified number of ticks\n"
- " exit -- invoke a fatal RTEMS error\n"
- " symbol -- show entries from symbol table\n"
- " continue -- put monitor to sleep waiting for explicit wakeup\n"
- " config -- show system configuration\n"
- " itask -- list init tasks\n"
- " mpci -- list mpci config\n"
- " task -- show task information\n"
- " queue -- show message queue information\n"
- " extension -- user extensions\n"
- " driver -- show information about named drivers\n"
- " dname -- show information about named drivers\n"
- " object -- generic object information\n"
- " node -- specify default node for commands that take id's\n"
-#ifdef CPU_INVOKE_DEBUGGER
- " debugger -- invoke system debugger\n"
-#endif
- ,
- 0,
- 0,
- (unsigned32) rtems_monitor_commands,
- },
- { "config",
- "config\n"
- " Show the system configuration.\n",
- 0,
- rtems_monitor_object_cmd,
- RTEMS_MONITOR_OBJECT_CONFIG,
- },
- { "itask",
- "itask\n"
- " List init tasks for the system\n",
- 0,
- rtems_monitor_object_cmd,
- RTEMS_MONITOR_OBJECT_INIT_TASK,
- },
- { "mpci",
- "mpci\n"
- " Show the MPCI system configuration, if configured.\n",
- 0,
- rtems_monitor_object_cmd,
- RTEMS_MONITOR_OBJECT_MPCI,
- },
- { "pause",
- "pause [ticks]\n"
- " monitor goes to \"sleep\" for specified ticks (default is 1)\n"
- " monitor will resume at end of period or if explicitly awakened\n",
- 0,
- rtems_monitor_pause_cmd,
- 0,
- },
- { "continue",
- "continue\n"
- " put the monitor to sleep waiting for an explicit wakeup from the\n"
- " program running.\n",
- 0,
- rtems_monitor_continue_cmd,
- 0,
- },
- { "go",
- "go\n"
- " Alias for 'continue'\n",
- 0,
- rtems_monitor_continue_cmd,
- 0,
- },
- { "node",
- "node [ node number ]\n"
- " Specify default node number for commands that take id's\n",
- 0,
- rtems_monitor_node_cmd,
- 0,
- },
- { "symbol",
- "symbol [ symbolname [symbolname ... ] ]\n"
- " display value associated with specified symbol.\n"
- " Defaults to displaying all known symbols.\n",
- 0,
- rtems_monitor_symbol_cmd,
- (unsigned32) &rtems_monitor_symbols,
- },
- { "extension",
- "extension [id [id ...] ]\n"
- " display information about specified extensions.\n"
- " Default is to display information about all extensions on this node\n",
- 0,
- rtems_monitor_object_cmd,
- RTEMS_MONITOR_OBJECT_EXTENSION,
- },
- { "task",
- "task [id [id ...] ]\n"
- " display information about the specified tasks.\n"
- " Default is to display information about all tasks on this node\n",
- 0,
- rtems_monitor_object_cmd,
- RTEMS_MONITOR_OBJECT_TASK,
- },
- { "queue",
- "queue [id [id ... ] ]\n"
- " display information about the specified message queues\n"
- " Default is to display information about all queues on this node\n",
- 0,
- rtems_monitor_object_cmd,
- RTEMS_MONITOR_OBJECT_QUEUE,
- },
- { "object",
- "object [id [id ...] ]\n"
- " display information about specified RTEMS objects.\n"
- " Object id's must include 'type' information.\n"
- " (which may normally be defaulted)\n",
- 0,
- rtems_monitor_object_cmd,
- RTEMS_MONITOR_OBJECT_INVALID,
- },
- { "driver",
- "driver [ major [ major ... ] ]\n"
- " Display the RTEMS device driver table.\n",
- 0,
- rtems_monitor_object_cmd,
- RTEMS_MONITOR_OBJECT_DRIVER,
- },
- { "dname",
- "dname\n"
- " Displays information about named drivers.\n",
- 0,
- rtems_monitor_object_cmd,
- RTEMS_MONITOR_OBJECT_DNAME,
- },
- { "exit",
- "exit [status]\n"
- " Invoke 'rtems_fatal_error_occurred' with 'status'\n"
- " (default is RTEMS_SUCCESSFUL)\n",
- 0,
- rtems_monitor_fatal_cmd,
- RTEMS_SUCCESSFUL,
- },
- { "fatal",
- "fatal [status]\n"
- " 'exit' with fatal error; default error is RTEMS_TASK_EXITTED\n",
- 0,
- rtems_monitor_fatal_cmd,
- RTEMS_TASK_EXITTED, /* exit value */
- },
- { "quit",
- "quit [status]\n"
- " Alias for 'exit'\n",
- 0,
- rtems_monitor_fatal_cmd,
- RTEMS_SUCCESSFUL, /* exit value */
- },
- { "help",
- "help [ command [ command ] ]\n"
- " provide information about commands\n"
- " Default is show basic command summary.\n",
- 0,
- rtems_monitor_help_cmd,
- (unsigned32) rtems_monitor_commands,
- },
-#ifdef CPU_INVOKE_DEBUGGER
- { "debugger",
- "debugger\n"
- " Enter the debugger, if possible.\n"
- " A continue from the debugger will return to the monitor.\n",
- 0,
- rtems_monitor_debugger_cmd,
- 0,
- },
-#endif
- { 0, 0, 0, 0, 0 },
-};
-
-
-rtems_status_code
-rtems_monitor_suspend(rtems_interval timeout)
-{
- rtems_event_set event_set;
- rtems_status_code status;
-
- status = rtems_event_receive(MONITOR_WAKEUP_EVENT,
- RTEMS_DEFAULT_OPTIONS,
- timeout,
- &event_set);
- return status;
-}
-
-void
-rtems_monitor_wakeup(void)
-{
- rtems_status_code status;
-
- status = rtems_event_send(rtems_monitor_task_id, MONITOR_WAKEUP_EVENT);
-}
-
-void
-rtems_monitor_debugger_cmd(
- int argc,
- char **argv,
- unsigned32 command_arg,
- boolean verbose
-)
-{
-#ifdef CPU_INVOKE_DEBUGGER
- CPU_INVOKE_DEBUGGER;
-#endif
-}
-
-void
-rtems_monitor_pause_cmd(
- int argc,
- char **argv,
- unsigned32 command_arg,
- boolean verbose
-)
-{
- if (argc == 1)
- rtems_monitor_suspend(1);
- else
- rtems_monitor_suspend(strtoul(argv[1], 0, 0));
-}
-
-void
-rtems_monitor_fatal_cmd(
- int argc,
- char **argv,
- unsigned32 command_arg,
- boolean verbose
-)
-{
- if (argc == 1)
- rtems_fatal_error_occurred(command_arg);
- else
- rtems_fatal_error_occurred(strtoul(argv[1], 0, 0));
-}
-
-void
-rtems_monitor_continue_cmd(
- int argc,
- char **argv,
- unsigned32 command_arg,
- boolean verbose
-)
-{
- rtems_monitor_suspend(RTEMS_NO_TIMEOUT);
-}
-
-void
-rtems_monitor_node_cmd(
- int argc,
- char **argv,
- unsigned32 command_arg,
- boolean verbose
-)
-{
- unsigned32 new_node = rtems_monitor_default_node;
-
- switch (argc)
- {
- case 1: /* no node, just set back to ours */
- new_node = rtems_monitor_node;
- break;
-
- case 2:
- new_node = strtoul(argv[1], 0, 0);
- break;
-
- default:
- printf("invalid syntax, try 'help node'\n");
- break;
- }
-
- if ((new_node >= 1) &&
- _Configuration_MP_table &&
- (new_node <= _Configuration_MP_table->maximum_nodes))
- rtems_monitor_default_node = new_node;
-}
-
-
-/*
- * Function: rtems_monitor_symbols_loadup
- *
- * Description:
- * Create and load the monitor's symbol table.
- * We are reading the output format of 'gnm' which looks like this:
- *
- * 400a7068 ? _Rate_monotonic_Information
- * 400a708c ? _Thread_Dispatch_disable_level
- * 400a7090 ? _Configuration_Table
- *
- * We ignore the type field.
- *
- * Side Effects:
- * Creates and fills in 'rtems_monitor_symbols' table
- *
- * TODO
- * there should be a BSP #define or something like that
- * to do this; Assuming stdio is crazy.
- * Someday this should know BFD
- * Maybe we could get objcopy to just copy the symbol areas
- * and copy that down.
- *
- */
-
-void
-rtems_monitor_symbols_loadup(void)
-{
- FILE *fp;
- char buffer[128];
-
- if (rtems_monitor_symbols)
- rtems_symbol_table_destroy(rtems_monitor_symbols);
-
- rtems_monitor_symbols = rtems_symbol_table_create(10);
- if (rtems_monitor_symbols == 0)
- return;
-
- fp = fopen("symbols", "r");
-
- if (fp == 0)
- return;
-
- while (fgets(buffer, sizeof(buffer) - 1, fp))
- {
- char *symbol;
- char *value;
- char *ignored_type;
-
- value = strtok(buffer, " \t\n");
- ignored_type = strtok(0, " \t\n");
- symbol = strtok(0, " \t\n");
-
- if (symbol && ignored_type && value)
- {
- rtems_symbol_t *sp;
- sp = rtems_symbol_create(rtems_monitor_symbols,
- symbol,
- (rtems_unsigned32) strtoul(value, 0, 16));
- if (sp == 0)
- {
- printf("could not define symbol '%s'\n", symbol);
- goto done;
- }
- }
- else
- {
- printf("parsing error on '%s'\n", buffer);
- goto done;
- }
- }
-
-done:
- return;
-}
-
-
-/*
- * Main monitor command loop
- */
-
-void
-rtems_monitor_task(
- rtems_task_argument monitor_flags
-)
-{
- rtems_tcb *debugee = 0;
- rtems_context *rp;
- rtems_context_fp *fp;
- char command_buffer[513];
- int argc;
- char *argv[64];
- boolean verbose = FALSE;
-
- if (monitor_flags & RTEMS_MONITOR_SUSPEND)
- (void) rtems_monitor_suspend(RTEMS_NO_TIMEOUT);
-
- for (;;)
- {
- extern rtems_tcb * _Thread_Executing;
- rtems_monitor_command_entry_t *command;
-
- debugee = _Thread_Executing;
- rp = &debugee->Registers;
- fp = (rtems_context_fp *) debugee->fp_context; /* possibly 0 */
-
- if (0 == rtems_monitor_command_read(command_buffer, &argc, argv))
- continue;
- if ((command = rtems_monitor_command_lookup(rtems_monitor_commands,
- argc,
- argv)) == 0)
- continue;
-
- command->command_function(argc, argv, command->command_arg, verbose);
-
- fflush(stdout);
- }
-}
-
-
-void
-rtems_monitor_kill(void)
-{
- if (rtems_monitor_task_id)
- rtems_task_delete(rtems_monitor_task_id);
- rtems_monitor_task_id = 0;
-
- rtems_monitor_server_kill();
-}
-
-void
-rtems_monitor_init(
- unsigned32 monitor_flags
-)
-{
- rtems_status_code status;
-
- rtems_monitor_kill();
-
- status = rtems_task_create(RTEMS_MONITOR_NAME,
- 1,
- RTEMS_MINIMUM_STACK_SIZE * 2,
- RTEMS_INTERRUPT_LEVEL(0),
- RTEMS_DEFAULT_ATTRIBUTES,
- &rtems_monitor_task_id);
- if (status != RTEMS_SUCCESSFUL)
- {
- rtems_error(status, "could not create monitor task");
- goto done;
- }
-
- rtems_monitor_node = rtems_get_node(rtems_monitor_task_id);
- rtems_monitor_default_node = rtems_monitor_node;
-
- rtems_monitor_symbols_loadup();
-
- if (monitor_flags & RTEMS_MONITOR_GLOBAL)
- rtems_monitor_server_init(monitor_flags);
-
- /*
- * Start the monitor task itself
- */
-
- status = rtems_task_start(rtems_monitor_task_id,
- rtems_monitor_task,
- monitor_flags);
- if (status != RTEMS_SUCCESSFUL)
- {
- rtems_error(status, "could not start monitor");
- goto done;
- }
-
-done:
-}
diff --git a/cpukit/libmisc/monitor/mon-mpci.c b/cpukit/libmisc/monitor/mon-mpci.c
deleted file mode 100644
index 5399f37555..0000000000
--- a/cpukit/libmisc/monitor/mon-mpci.c
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * RTEMS MPCI Config display support
- *
- * TODO
- *
- * $Id$
- */
-
-
-#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
-#include <rtems.h>
-#include <rtems/monitor.h>
-
-#include <stdio.h>
-#include <stdlib.h> /* strtoul() */
-
-#define DATACOL 15
-
-/*
- * Fill in entire monitor config table
- * for sending to a remote monitor or printing on the local system
- */
-
-void
-rtems_monitor_mpci_canonical(
- rtems_monitor_mpci_t *canonical_mpci,
- void *config_void
-)
-{
- rtems_configuration_table *c = _Configuration_Table;
- rtems_multiprocessing_table *m;
- rtems_mpci_table *mt;
-
- m = c->User_multiprocessing_table;
- if (m == 0)
- return;
- mt = m->User_mpci_table;
-
- canonical_mpci->node = m->node;
- canonical_mpci->maximum_nodes = m->maximum_nodes;
- canonical_mpci->maximum_global_objects = m->maximum_global_objects;
- canonical_mpci->maximum_proxies = m->maximum_proxies;
-
- canonical_mpci->default_timeout = mt->default_timeout;
- canonical_mpci->maximum_packet_size = mt->maximum_packet_size;
-
- rtems_monitor_symbol_canonical_by_value(&canonical_mpci->initialization,
- (void *) mt->initialization);
-
- rtems_monitor_symbol_canonical_by_value(&canonical_mpci->get_packet,
- (void *) mt->get_packet);
- rtems_monitor_symbol_canonical_by_value(&canonical_mpci->return_packet,
- (void *) mt->return_packet);
- rtems_monitor_symbol_canonical_by_value(&canonical_mpci->send_packet,
- (void *) mt->send_packet);
- rtems_monitor_symbol_canonical_by_value(&canonical_mpci->receive_packet,
- (void *) mt->receive_packet);
-}
-
-/*
- * This is easy, since there is only 1 (altho we could get them from
- * other nodes...)
- */
-
-void *
-rtems_monitor_mpci_next(
- void *object_info,
- rtems_monitor_mpci_t *canonical_mpci,
- rtems_id *next_id
-)
-{
- rtems_configuration_table *c = _Configuration_Table;
- int n = rtems_get_index(*next_id);
-
- if (n >= 1)
- goto failed;
-
- if ( ! c->User_multiprocessing_table)
- goto failed;
-
- _Thread_Disable_dispatch();
-
- *next_id += 1;
- return (void *) c;
-
-failed:
- *next_id = RTEMS_OBJECT_ID_FINAL;
- return 0;
-}
-
-
-void
-rtems_monitor_mpci_dump_header(
- boolean verbose
-)
-{
- printf("\
- max max max default max\n\
- node nodes globals proxies timeout pktsize\n");
-/*23456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
-0 1 2 3 4 5 6 7 */
-
- rtems_monitor_separator();
-}
-
-
-void
-rtems_monitor_mpci_dump(
- rtems_monitor_mpci_t *monitor_mpci,
- boolean verbose
-)
-{
- unsigned32 length = 0;
-
- length += rtems_monitor_pad(2, length);
- length += printf(" %d", monitor_mpci->node);
- length += rtems_monitor_pad(11, length);
- length += printf("%d", monitor_mpci->maximum_nodes);
-
- length += rtems_monitor_pad(18, length);
- length += rtems_monitor_dump_decimal(monitor_mpci->maximum_global_objects);
-
- length += rtems_monitor_pad(28, length);
- length += rtems_monitor_dump_decimal(monitor_mpci->maximum_proxies);
-
- length += rtems_monitor_pad(37, length);
- length += rtems_monitor_dump_decimal(monitor_mpci->default_timeout);
-
- length += rtems_monitor_pad(46, length);
- length += rtems_monitor_dump_decimal(monitor_mpci->maximum_packet_size);
-
- printf("\n");
- length = 0;
- length += rtems_monitor_pad(DATACOL, length);
-
- length += printf("init: ");
- length += rtems_monitor_symbol_dump(&monitor_mpci->initialization, verbose);
-
- printf("\n");
- length = 0;
- length += rtems_monitor_pad(DATACOL, length);
-
- length += printf("get: ");
- length += rtems_monitor_symbol_dump(&monitor_mpci->get_packet, verbose);
- length += printf("; return: ");
- length += rtems_monitor_symbol_dump(&monitor_mpci->return_packet, verbose);
-
- printf("\n");
- length = 0;
- length += rtems_monitor_pad(DATACOL, length);
-
- length += printf("send: ");
- length += rtems_monitor_symbol_dump(&monitor_mpci->send_packet, verbose);
- length += printf("; receive: ");
- length += rtems_monitor_symbol_dump(&monitor_mpci->receive_packet, verbose);
-
- printf("\n");
- length = 0;
-}
diff --git a/cpukit/libmisc/monitor/mon-object.c b/cpukit/libmisc/monitor/mon-object.c
deleted file mode 100644
index 8112372d86..0000000000
--- a/cpukit/libmisc/monitor/mon-object.c
+++ /dev/null
@@ -1,382 +0,0 @@
-/*
- * RTEMS Monitor "object" support.
- *
- * Used to traverse object lists and print them out.
- * An object can be an RTEMS object (chain based stuff) or
- * a "misc" object such as a device driver.
- *
- * Each object has its own file in this directory (eg: extension.c)
- * That file provides routines to convert a "native" structure
- * to its canonical form, print a canonical structure, etc.
- *
- * TODO:
- * should allow for non-numeric id's???
- *
- * $Id$
- */
-
-#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
-#include <rtems.h>
-#include <rtems/monitor.h>
-
-#include <stdio.h>
-#include <stdlib.h> /* strtoul() */
-#include <string.h> /* memcpy() */
-
-#define NUMELEMS(arr) (sizeof(arr) / sizeof(arr[0]))
-
-/*
- * add:
- * next
- */
-
-rtems_monitor_object_info_t rtems_monitor_object_info[] =
-{
- { RTEMS_MONITOR_OBJECT_CONFIG,
- (void *) 0,
- sizeof(rtems_monitor_config_t),
- (rtems_monitor_object_next_fn) rtems_monitor_config_next,
- (rtems_monitor_object_canonical_fn) rtems_monitor_config_canonical,
- (rtems_monitor_object_dump_header_fn) rtems_monitor_config_dump_header,
- (rtems_monitor_object_dump_fn) rtems_monitor_config_dump,
- },
- { RTEMS_MONITOR_OBJECT_MPCI,
- (void *) 0,
-#if defined(RTEMS_MULTIPROCESSING)
- sizeof(rtems_monitor_mpci_t),
- (rtems_monitor_object_next_fn) rtems_monitor_mpci_next,
- (rtems_monitor_object_canonical_fn) rtems_monitor_mpci_canonical,
- (rtems_monitor_object_dump_header_fn) rtems_monitor_mpci_dump_header,
- (rtems_monitor_object_dump_fn) rtems_monitor_mpci_dump,
-#else
- 0,
- (rtems_monitor_object_next_fn) 0,
- (rtems_monitor_object_canonical_fn) 0,
- (rtems_monitor_object_dump_header_fn) 0,
- (rtems_monitor_object_dump_fn) 0,
-#endif
- },
- { RTEMS_MONITOR_OBJECT_INIT_TASK,
- (void *) 0,
- sizeof(rtems_monitor_init_task_t),
- (rtems_monitor_object_next_fn) rtems_monitor_init_task_next,
- (rtems_monitor_object_canonical_fn) rtems_monitor_init_task_canonical,
- (rtems_monitor_object_dump_header_fn) rtems_monitor_init_task_dump_header,
- (rtems_monitor_object_dump_fn) rtems_monitor_init_task_dump,
- },
- { RTEMS_MONITOR_OBJECT_TASK,
- (void *) &_RTEMS_tasks_Information,
- sizeof(rtems_monitor_task_t),
- (rtems_monitor_object_next_fn) rtems_monitor_manager_next,
- (rtems_monitor_object_canonical_fn) rtems_monitor_task_canonical,
- (rtems_monitor_object_dump_header_fn) rtems_monitor_task_dump_header,
- (rtems_monitor_object_dump_fn) rtems_monitor_task_dump,
- },
- { RTEMS_MONITOR_OBJECT_QUEUE,
- (void *) &_Message_queue_Information,
- sizeof(rtems_monitor_queue_t),
- (rtems_monitor_object_next_fn) rtems_monitor_manager_next,
- (rtems_monitor_object_canonical_fn) rtems_monitor_queue_canonical,
- (rtems_monitor_object_dump_header_fn) rtems_monitor_queue_dump_header,
- (rtems_monitor_object_dump_fn) rtems_monitor_queue_dump,
- },
- { RTEMS_MONITOR_OBJECT_EXTENSION,
- (void *) &_Extension_Information,
- sizeof(rtems_monitor_extension_t),
- (rtems_monitor_object_next_fn) rtems_monitor_manager_next,
- (rtems_monitor_object_canonical_fn) rtems_monitor_extension_canonical,
- (rtems_monitor_object_dump_header_fn) rtems_monitor_extension_dump_header,
- (rtems_monitor_object_dump_fn) rtems_monitor_extension_dump,
- },
- { RTEMS_MONITOR_OBJECT_DRIVER,
- (void *) 0,
- sizeof(rtems_monitor_driver_t),
- (rtems_monitor_object_next_fn) rtems_monitor_driver_next,
- (rtems_monitor_object_canonical_fn) rtems_monitor_driver_canonical,
- (rtems_monitor_object_dump_header_fn) rtems_monitor_driver_dump_header,
- (rtems_monitor_object_dump_fn) rtems_monitor_driver_dump,
- },
- { RTEMS_MONITOR_OBJECT_DNAME,
- /* XXX now that the driver name table is allocated from the */
- /* XXX Workspace, this does not work */
- (void *) 0,
- /* (void *) _IO_Driver_name_table, */
- sizeof(rtems_monitor_dname_t),
- (rtems_monitor_object_next_fn) rtems_monitor_dname_next,
- (rtems_monitor_object_canonical_fn) rtems_monitor_dname_canonical,
- (rtems_monitor_object_dump_header_fn) rtems_monitor_dname_dump_header,
- (rtems_monitor_object_dump_fn) rtems_monitor_dname_dump,
- },
-};
-
-/*
- * Allow id's to be specified without the node number or
- * type for convenience.
- */
-
-rtems_id
-rtems_monitor_id_fixup(
- rtems_id id,
- unsigned32 default_node,
- rtems_monitor_object_type_t type
-)
-{
- unsigned32 node;
-
- node = rtems_get_node(id);
- if (node == 0)
- {
- if (rtems_get_class(id) != OBJECTS_NO_CLASS)
- type = rtems_get_class(id);
-
- id = _Objects_Build_id(type, default_node, rtems_get_index(id));
- }
- return id;
-}
-
-
-rtems_monitor_object_info_t *
-rtems_monitor_object_lookup(
- rtems_monitor_object_type_t type
-)
-{
- rtems_monitor_object_info_t *p;
- for (p = &rtems_monitor_object_info[0];
- p < &rtems_monitor_object_info[NUMELEMS(rtems_monitor_object_info)];
- p++)
- {
- if (p->type == type)
- return p;
- }
- return 0;
-}
-
-rtems_id
-rtems_monitor_object_canonical_next_remote(
- rtems_monitor_object_type_t type,
- rtems_id id,
- void *canonical
-)
-{
- rtems_id next_id;
- rtems_status_code status;
- rtems_monitor_server_request_t request;
- rtems_monitor_server_response_t response;
-
- /*
- * Send request
- */
-
- request.command = RTEMS_MONITOR_SERVER_CANONICAL;
- request.argument0 = (unsigned32) type;
- request.argument1 = (unsigned32) id;
-
- status = rtems_monitor_server_request(rtems_get_node(id), &request, &response);
- if (status != RTEMS_SUCCESSFUL)
- goto failed;
-
- /*
- * process response
- */
-
- next_id = (rtems_id) response.result0;
- if (next_id != RTEMS_OBJECT_ID_FINAL)
- (void) memcpy(canonical, &response.payload, response.result1);
-
- return next_id;
-
-failed:
- return RTEMS_OBJECT_ID_FINAL;
-
-}
-
-
-rtems_id
-rtems_monitor_object_canonical_next(
- rtems_monitor_object_info_t *info,
- rtems_id id,
- void *canonical
-)
-{
- rtems_id next_id;
- void *raw_item;
-
- if ( ! _Objects_Is_local_id(id))
- next_id = rtems_monitor_object_canonical_next_remote(info->type,
- id,
- canonical);
- else
- {
- next_id = id;
-
- raw_item = (void *) info->next(info->object_information,
- canonical,
- &next_id);
-
- if (raw_item)
- {
- info->canonical(canonical, raw_item);
- _Thread_Enable_dispatch();
- }
- }
- return next_id;
-}
-
-
-/*
- * this is routine server invokes locally to get the type
- */
-
-rtems_id
-rtems_monitor_object_canonical_get(
- rtems_monitor_object_type_t type,
- rtems_id id,
- void *canonical,
- unsigned32 *size_p
-)
-{
- rtems_monitor_object_info_t *info;
- rtems_id next_id;
-
- *size_p = 0;
-
- info = rtems_monitor_object_lookup(type);
-
- if (info == 0)
- return RTEMS_OBJECT_ID_FINAL;
-
- next_id = rtems_monitor_object_canonical_next(info, id, canonical);
- *size_p = info->size;
-
- return next_id;
-}
-
-
-void
-rtems_monitor_object_dump_1(
- rtems_monitor_object_info_t *info,
- rtems_id id,
- boolean verbose
-)
-{
- rtems_id next_id;
- rtems_monitor_union_t canonical;
-
- if ((next_id = rtems_monitor_object_canonical_next(
- info,
- id,
- &canonical)) != RTEMS_OBJECT_ID_FINAL)
- {
- /*
- * If the one we actually got is the one we wanted, then
- * print it out.
- * For ones that have an id field, this works fine,
- * for all others, always dump it out.
- *
- * HACK: the way we determine whether there is an id is a hack.
- *
- * by the way: the reason we try to not have an id, is that some
- * of the canonical structures are almost too big for shared
- * memory driver (eg: mpci)
- */
-
- if ((info->next != rtems_monitor_manager_next) ||
- (id == canonical.generic.id))
- info->dump(&canonical, verbose);
- }
-}
-
-void
-rtems_monitor_object_dump_all(
- rtems_monitor_object_info_t *info,
- boolean verbose
-)
-{
- rtems_id next_id;
- rtems_monitor_union_t canonical;
-
- next_id = RTEMS_OBJECT_ID_INITIAL(info->type, rtems_monitor_default_node);
-
- while ((next_id = rtems_monitor_object_canonical_next(
- info,
- next_id,
- &canonical)) != RTEMS_OBJECT_ID_FINAL)
- {
- info->dump(&canonical, verbose);
- }
-}
-
-void
-rtems_monitor_object_cmd(
- int argc,
- char **argv,
- unsigned32 command_arg,
- boolean verbose
-)
-{
- int arg;
- rtems_monitor_object_info_t *info = 0;
- rtems_monitor_object_type_t type = (rtems_monitor_object_type_t) command_arg;
-
- /* what is the default type? */
- type = (rtems_monitor_object_type_t) command_arg;
-
- if (argc == 1)
- {
- if (type == RTEMS_MONITOR_OBJECT_INVALID)
- {
- printf("A type must be specified to \"dump all\"\n");
- goto done;
- }
-
- info = rtems_monitor_object_lookup(type);
- if (info == 0)
- goto not_found;
-
- if (info->dump_header)
- info->dump_header(verbose);
- rtems_monitor_object_dump_all(info, verbose);
- }
- else
- {
- unsigned32 default_node = rtems_monitor_default_node;
- rtems_monitor_object_type_t last_type = RTEMS_MONITOR_OBJECT_INVALID;
- rtems_id id;
-
- for (arg=1; argv[arg]; arg++)
- {
- id = (rtems_id) strtoul(argv[arg], 0, 16);
- id = rtems_monitor_id_fixup(id, default_node, type);
- type = (rtems_monitor_object_type_t) rtems_get_class(id);
-
- /*
- * Allow the item type to change in the middle
- * of the command. If the type changes, then
- * just dump out a new header and keep on going.
- */
- if (type != last_type)
- {
- info = rtems_monitor_object_lookup(type);
- if (info == 0)
- goto not_found;
-
- if (info->dump_header)
- info->dump_header(verbose);
- }
-
- if (info == 0)
- {
-not_found: printf("Invalid or unsupported type %d\n", type);
- goto done;
- }
-
- rtems_monitor_object_dump_1(info, id, verbose);
-
- default_node = rtems_get_node(id);
-
- last_type = type;
- }
- }
-done:
- return;
-}
diff --git a/cpukit/libmisc/monitor/mon-prmisc.c b/cpukit/libmisc/monitor/mon-prmisc.c
deleted file mode 100644
index ce9aa9a554..0000000000
--- a/cpukit/libmisc/monitor/mon-prmisc.c
+++ /dev/null
@@ -1,259 +0,0 @@
-/*
- * Print misc stuff for the monitor dump routines
- * Each routine returns the number of characters it output.
- *
- * TODO:
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include <rtems/monitor.h>
-
-#include <rtems/assoc.h>
-
-#include <stdio.h>
-#include <ctype.h>
-
-void
-rtems_monitor_separator(void)
-{
- printf("------------------------------------------------------------------------------\n");
-}
-
-unsigned32
-rtems_monitor_pad(
- unsigned32 destination_column,
- unsigned32 current_column
-)
-{
- int pad_length;
-
- if (destination_column <= current_column)
- pad_length = 1;
- else
- pad_length = destination_column - current_column;
-
- return printf("%*s", pad_length, "");
-}
-
-unsigned32
-rtems_monitor_dump_char(rtems_unsigned8 ch)
-{
- if (isprint(ch))
- return printf("%c", ch);
- else
- return printf("%02x", ch);
-}
-
-unsigned32
-rtems_monitor_dump_decimal(unsigned32 num)
-{
- return printf("%4d", num);
-}
-
-unsigned32
-rtems_monitor_dump_hex(unsigned32 num)
-{
- return printf("0x%x", num);
-}
-
-unsigned32
-rtems_monitor_dump_assoc_bitfield(
- rtems_assoc_t *ap,
- char *separator,
- unsigned32 value
- )
-{
- unsigned32 b;
- unsigned32 length = 0;
- const char *name;
-
- for (b = 1; b; b <<= 1)
- if (b & value)
- {
- if (length)
- length += printf("%s", separator);
-
- name = rtems_assoc_name_by_local(ap, b);
-
- if (name)
- length += printf("%s", name);
- else
- length += printf("0x%x", b);
- }
-
- return length;
-}
-
-unsigned32
-rtems_monitor_dump_id(rtems_id id)
-{
- return printf("%08x", id);
-}
-
-unsigned32
-rtems_monitor_dump_name(rtems_name name)
-{
- unsigned32 i;
- unsigned32 length = 0;
- union {
- unsigned32 ui;
- char c[4];
- } u;
-
- u.ui = (rtems_unsigned32) name;
-
-#if (CPU_BIG_ENDIAN == TRUE)
- for (i=0; i<sizeof(u.c); i++)
- length += rtems_monitor_dump_char(u.c[i]);
-#else
- for (i=sizeof(u.c)-1; i ; i--)
- length += rtems_monitor_dump_char(u.c[i]);
-#endif
- return length;
-}
-
-unsigned32
-rtems_monitor_dump_priority(rtems_task_priority priority)
-{
- return printf("%3d", priority);
-}
-
-
-rtems_assoc_t rtems_monitor_state_assoc[] = {
- { "DORM", STATES_DORMANT },
- { "SUSP", STATES_SUSPENDED },
- { "TRANS", STATES_TRANSIENT },
- { "DELAY", STATES_DELAYING },
- { "Wbuf", STATES_WAITING_FOR_BUFFER },
- { "Wseg", STATES_WAITING_FOR_SEGMENT },
- { "Wmsg" , STATES_WAITING_FOR_MESSAGE },
- { "Wevnt", STATES_WAITING_FOR_EVENT },
- { "Wsem", STATES_WAITING_FOR_SEMAPHORE },
- { "Wtime", STATES_WAITING_FOR_TIME },
- { "Wrpc", STATES_WAITING_FOR_RPC_REPLY },
- { "WRATE", STATES_WAITING_FOR_PERIOD },
- { 0, 0, 0 },
-};
-
-unsigned32
-rtems_monitor_dump_state(States_Control state)
-{
- unsigned32 length = 0;
-
- if (state == STATES_READY) /* assoc doesn't deal with this as it is 0 */
- length += printf("READY");
-
- length += rtems_monitor_dump_assoc_bitfield(rtems_monitor_state_assoc,
- ":",
- state);
- return length;
-}
-
-rtems_assoc_t rtems_monitor_attribute_assoc[] = {
- { "FL", RTEMS_FLOATING_POINT },
- { "GL", RTEMS_GLOBAL },
- { "PR", RTEMS_PRIORITY },
- { "BI", RTEMS_BINARY_SEMAPHORE },
- { "IN", RTEMS_INHERIT_PRIORITY },
- { 0, 0, 0 },
-};
-
-unsigned32
-rtems_monitor_dump_attributes(rtems_attribute attributes)
-{
- unsigned32 length = 0;
-
- if (attributes == RTEMS_DEFAULT_ATTRIBUTES) /* value is 0 */
- length += printf("DEFAULT");
-
- length += rtems_monitor_dump_assoc_bitfield(rtems_monitor_attribute_assoc,
- ":",
- attributes);
- return length;
-}
-
-rtems_assoc_t rtems_monitor_modes_assoc[] = {
- { "nP", RTEMS_NO_PREEMPT },
- { "T", RTEMS_TIMESLICE },
- { "nA", RTEMS_NO_ASR },
- { 0, 0, 0 },
-};
-
-unsigned32
-rtems_monitor_dump_modes(rtems_mode modes)
-{
- unsigned32 length = 0;
-
- if (modes == RTEMS_DEFAULT_MODES) /* value is 0 */
- length += printf("P:T:nA");
-
- length += rtems_monitor_dump_assoc_bitfield(rtems_monitor_modes_assoc,
- ":",
- modes);
- return length;
-}
-
-rtems_assoc_t rtems_monitor_events_assoc[] = {
- { "0", RTEMS_EVENT_0 },
- { "1", RTEMS_EVENT_1 },
- { "2", RTEMS_EVENT_2 },
- { "3", RTEMS_EVENT_3 },
- { "4", RTEMS_EVENT_4 },
- { "5", RTEMS_EVENT_5 },
- { "6", RTEMS_EVENT_6 },
- { "7", RTEMS_EVENT_7 },
- { "8", RTEMS_EVENT_8 },
- { "9", RTEMS_EVENT_9 },
- { "10", RTEMS_EVENT_10 },
- { "11", RTEMS_EVENT_11 },
- { "12", RTEMS_EVENT_12 },
- { "13", RTEMS_EVENT_13 },
- { "14", RTEMS_EVENT_14 },
- { "15", RTEMS_EVENT_15 },
- { "16", RTEMS_EVENT_16 },
- { "17", RTEMS_EVENT_17 },
- { "18", RTEMS_EVENT_18 },
- { "19", RTEMS_EVENT_19 },
- { "20", RTEMS_EVENT_20 },
- { "21", RTEMS_EVENT_21 },
- { "22", RTEMS_EVENT_22 },
- { "23", RTEMS_EVENT_23 },
- { "24", RTEMS_EVENT_24 },
- { "25", RTEMS_EVENT_25 },
- { "26", RTEMS_EVENT_26 },
- { "27", RTEMS_EVENT_27 },
- { "28", RTEMS_EVENT_28 },
- { "29", RTEMS_EVENT_29 },
- { "30", RTEMS_EVENT_30 },
- { "31", RTEMS_EVENT_31 },
- { 0, 0, 0 },
-};
-
-unsigned32
-rtems_monitor_dump_events(rtems_event_set events)
-{
- unsigned32 length = 0;
-
- if (events == EVENT_SETS_NONE_PENDING) /* value is 0 */
- length += printf("NONE");
-
- length += rtems_monitor_dump_assoc_bitfield(rtems_monitor_events_assoc,
- ":",
- events);
- return length;
-}
-
-unsigned32
-rtems_monitor_dump_notepad(unsigned32 *notepad)
-{
- unsigned32 length = 0;
- int i;
-
- for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
- if (notepad[i])
- length += printf("%d: 0x%x ", i, notepad[i]);
-
- return length;
-}
diff --git a/cpukit/libmisc/monitor/mon-queue.c b/cpukit/libmisc/monitor/mon-queue.c
deleted file mode 100644
index b165062e28..0000000000
--- a/cpukit/libmisc/monitor/mon-queue.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * $Id$
- */
-
-#include <rtems.h>
-#include <rtems/monitor.h>
-
-#include <stdio.h>
-
-void
-rtems_monitor_queue_canonical(
- rtems_monitor_queue_t *canonical_queue,
- void *queue_void
-)
-{
- Message_queue_Control *rtems_queue = (Message_queue_Control *) queue_void;
-
- canonical_queue->attributes = rtems_queue->attribute_set;
- canonical_queue->maximum_message_size = rtems_queue->message_queue.maximum_message_size;
- canonical_queue->maximum_pending_messages = rtems_queue->message_queue.maximum_pending_messages;
- canonical_queue->number_of_pending_messages = rtems_queue->message_queue.number_of_pending_messages;
-}
-
-void
-rtems_monitor_queue_dump_header(
- boolean verbose
-)
-{
- printf("\
- ID NAME ATTRIBUTES PEND MAXPEND MAXSIZE\n");
-/*23456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
-0 1 2 3 4 5 6 7 */
- rtems_monitor_separator();
-}
-
-
-/*
- * Dump out the "next" queue indicated by 'id'.
- * Returns next one to check.
- * Returns RTEMS_OBJECT_ID_FINAL when all done
- */
-
-void
-rtems_monitor_queue_dump(
- rtems_monitor_queue_t *monitor_queue,
- boolean verbose
-)
-{
- unsigned32 length = 0;
-
- length += rtems_monitor_dump_id(monitor_queue->id);
- length += rtems_monitor_pad(11, length);
- length += rtems_monitor_dump_name(monitor_queue->name);
- length += rtems_monitor_pad(19, length);
- length += rtems_monitor_dump_attributes(monitor_queue->attributes);
- length += rtems_monitor_pad(31, length);
- length += rtems_monitor_dump_decimal(monitor_queue->number_of_pending_messages);
- length += rtems_monitor_pad(39, length);
- length += rtems_monitor_dump_decimal(monitor_queue->maximum_pending_messages);
- length += rtems_monitor_pad(48, length);
- length += rtems_monitor_dump_decimal(monitor_queue->maximum_message_size);
-
- printf("\n");
-}
diff --git a/cpukit/libmisc/monitor/mon-server.c b/cpukit/libmisc/monitor/mon-server.c
deleted file mode 100644
index 3ae56058d3..0000000000
--- a/cpukit/libmisc/monitor/mon-server.c
+++ /dev/null
@@ -1,303 +0,0 @@
-/*
- * RTEMS monitor server (handles requests for info from RTEMS monitors
- * running on other nodes)
- *
- * $Id$
- */
-
-#include <rtems.h>
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-#include <rtems/monitor.h>
-
-/*
- * Various id's for the server
- */
-
-rtems_id rtems_monitor_server_task_id;
-rtems_id rtems_monitor_server_request_queue_id; /* our server */
-rtems_id *rtems_monitor_server_request_queue_ids; /* all servers */
-rtems_id rtems_monitor_server_response_queue_id; /* our server */
-
-
-/*
- * Send a request to a server task
- */
-
-rtems_status_code
-rtems_monitor_server_request(
- unsigned32 server_node,
- rtems_monitor_server_request_t *request,
- rtems_monitor_server_response_t *response
-)
-{
- rtems_id server_id;
- rtems_status_code status;
- unsigned32 size;
-
- /*
- * What is id of monitor on target node?
- * Look it up if we don't know it yet.
- */
-
- server_id = rtems_monitor_server_request_queue_ids[server_node];
- if (server_id == 0)
- {
- status = rtems_message_queue_ident(RTEMS_MONITOR_QUEUE_NAME,
- server_node,
- &server_id);
- if (status != RTEMS_SUCCESSFUL)
- {
- rtems_error(status, "ident of remote server failed");
- goto done;
- }
-
- rtems_monitor_server_request_queue_ids[server_node] = server_id;
- }
-
- request->return_id = rtems_monitor_server_response_queue_id;
-
- status = rtems_message_queue_send(server_id, request, sizeof(*request));
- if (status != RTEMS_SUCCESSFUL)
- {
- rtems_error(status, "monitor server request send failed");
- goto done;
- }
-
- /*
- * Await response, if requested
- */
-
- if (response)
- {
- status = rtems_message_queue_receive(rtems_monitor_server_response_queue_id,
- response,
- &size,
- RTEMS_WAIT,
- 100);
- if (status != RTEMS_SUCCESSFUL)
- {
- rtems_error(status, "server did not respond");
-
- /* maybe server task was restarted; look it up again next time */
- rtems_monitor_server_request_queue_ids[server_node] = 0;
-
- goto done;
- }
-
- if (response->command != RTEMS_MONITOR_SERVER_RESPONSE)
- {
- status = RTEMS_INCORRECT_STATE;
- goto done;
- }
- }
-
-done:
- return status;
-}
-
-
-
-/*
- * monitor server task
- */
-
-void
-rtems_monitor_server_task(
- rtems_task_argument monitor_flags
-)
-{
- rtems_monitor_server_request_t request;
- rtems_monitor_server_response_t response;
- rtems_status_code status;
- unsigned32 size;
-
- for (;;)
- {
- status = rtems_message_queue_receive(
- rtems_monitor_server_request_queue_id,
- &request,
- &size,
- RTEMS_WAIT,
- (rtems_interval) 0);
-
- if (status != RTEMS_SUCCESSFUL)
- {
- rtems_error(status, "monitor server msg queue receive error");
- goto failed;
- }
-
- if (size != sizeof(request))
- {
- rtems_error(0, "monitor server bad size on receive");
- goto failed;
- }
-
- switch (request.command)
- {
- case RTEMS_MONITOR_SERVER_CANONICAL:
- {
- rtems_monitor_object_type_t object_type;
- rtems_id id;
- rtems_id next_id;
-
- object_type = (rtems_monitor_object_type_t) request.argument0;
- id = (rtems_id) request.argument1;
- next_id = rtems_monitor_object_canonical_get(object_type,
- id,
- &response.payload,
- &size);
-
- response.command = RTEMS_MONITOR_SERVER_RESPONSE;
- response.result0 = next_id;
- response.result1 = size;
-
-#define SERVER_OVERHEAD (RTEMS_offsetof(rtems_monitor_server_response_t, \
- payload))
-
- status = rtems_message_queue_send(request.return_id,
- &response,
- size + SERVER_OVERHEAD);
- if (status != RTEMS_SUCCESSFUL)
- {
- rtems_error(status, "response send failed");
- goto failed;
- }
- break;
- }
-
- default:
- {
- rtems_error(0, "invalid command to monitor server: %d", request.command);
- goto failed;
- }
- }
- }
-
-failed:
- rtems_task_delete(RTEMS_SELF);
-}
-
-
-/*
- * Kill off any old server
- * Not sure if this is useful, but it doesn't help
- */
-
-void
-rtems_monitor_server_kill(void)
-{
- if (rtems_monitor_server_task_id)
- rtems_task_delete(rtems_monitor_server_task_id);
- rtems_monitor_task_id = 0;
-
- if (rtems_monitor_server_request_queue_id)
- rtems_message_queue_delete(rtems_monitor_server_request_queue_id);
- rtems_monitor_server_response_queue_id = 0;
-
- if (rtems_monitor_server_response_queue_id)
- rtems_message_queue_delete(rtems_monitor_server_response_queue_id);
- rtems_monitor_server_request_queue_ids = 0;
-
- if (rtems_monitor_server_request_queue_ids)
- free(rtems_monitor_server_request_queue_ids);
- rtems_monitor_server_request_queue_ids = 0;
-}
-
-
-void
-rtems_monitor_server_init(
- unsigned32 monitor_flags
-)
-{
- rtems_status_code status;
-
- if (_System_state_Is_multiprocessing &&
- (_Configuration_MP_table->maximum_nodes > 1))
- {
- unsigned32 maximum_nodes = _Configuration_MP_table->maximum_nodes;
-
- /*
- * create the msg que our server will listen
- * Since we only get msgs from other RTEMS monitors, we just
- * need reserve space for 1 msg from each node.
- */
-
- status = rtems_message_queue_create(
- RTEMS_MONITOR_QUEUE_NAME,
- maximum_nodes,
- sizeof(rtems_monitor_server_request_t),
- RTEMS_GLOBAL,
- &rtems_monitor_server_request_queue_id);
-
- if (status != RTEMS_SUCCESSFUL)
- {
- rtems_error(status, "could not create monitor server message queue");
- goto done;
- }
-
- /*
- * create the msg que our responses will come on
- * Since monitor just does one thing at a time, we only need 1 item
- * message queue.
- */
-
- status = rtems_message_queue_create(
- RTEMS_MONITOR_RESPONSE_QUEUE_NAME,
- 1, /* depth */
- sizeof(rtems_monitor_server_response_t),
- RTEMS_GLOBAL,
- &rtems_monitor_server_response_queue_id);
-
- if (status != RTEMS_SUCCESSFUL)
- {
- rtems_error(status, "could not create monitor response message queue");
- goto done;
- }
-
- /* need an id for queue of each other server we might talk to */
- /* indexed by node, so add 1 to maximum_nodes */
- rtems_monitor_server_request_queue_ids =
- (rtems_id *) malloc((maximum_nodes + 1) * sizeof(rtems_id));
- (void) memset(rtems_monitor_server_request_queue_ids,
- 0,
- (maximum_nodes + 1) * sizeof(rtems_id));
-
- rtems_monitor_server_request_queue_ids[rtems_monitor_node] =
- rtems_monitor_server_request_queue_id;
-
- /*
- * create the server task
- */
- status = rtems_task_create(RTEMS_MONITOR_SERVER_NAME,
- 1,
- 0 /* default stack */,
- RTEMS_INTERRUPT_LEVEL(0),
- RTEMS_DEFAULT_ATTRIBUTES,
- &rtems_monitor_server_task_id);
- if (status != RTEMS_SUCCESSFUL)
- {
- rtems_error(status, "could not create monitor server task");
- goto done;
- }
-
- /*
- * Start the server task
- */
- status = rtems_task_start(rtems_monitor_server_task_id,
- rtems_monitor_server_task,
- monitor_flags);
- if (status != RTEMS_SUCCESSFUL)
- {
- rtems_error(status, "could not start monitor server");
- goto done;
- }
- }
-
-done:
- return;
-}
diff --git a/cpukit/libmisc/monitor/mon-symbols.c b/cpukit/libmisc/monitor/mon-symbols.c
deleted file mode 100644
index c7b34838b4..0000000000
--- a/cpukit/libmisc/monitor/mon-symbols.c
+++ /dev/null
@@ -1,484 +0,0 @@
-/*
- * File: symbols.c
- *
- * Description:
- * Symbol table manager for the RTEMS monitor.
- * These routines may be used by other system resources also.
- *
- *
- * TODO:
- *
- * $Id$
- */
-
-/* for strcasecmp in linux and solaris */
-#undef __STRICT_ANSI__
-#include <string.h>
-
-#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
-#include <rtems.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <rtems/monitor.h>
-#include <rtems/symbols.h>
-
-
-rtems_symbol_table_t *
-rtems_symbol_table_create()
-{
- rtems_symbol_table_t *table;
-
- table = (rtems_symbol_table_t *) malloc(sizeof(rtems_symbol_table_t));
- memset((void *) table, 0, sizeof(*table));
-
- table->growth_factor = 30; /* 30 percent */
-
- return table;
-}
-
-void
-rtems_symbol_table_destroy(rtems_symbol_table_t *table)
-{
- rtems_symbol_string_block_t *p, *pnext;
-
- if (table)
- {
- if (table->addresses)
- (void) free(table->addresses);
- table->addresses = 0;
- p = table->string_buffer_head;
- while (p)
- {
- pnext = p->next;
- free(p);
- p = pnext;
- }
- table->string_buffer_head = 0;
- table->string_buffer_current = 0;
-
- free(table);
- }
-}
-
-rtems_symbol_t *
-rtems_symbol_create(
- rtems_symbol_table_t *table,
- char *name,
- rtems_unsigned32 value
- )
-{
- int symbol_length;
- size_t newsize;
- rtems_symbol_t *sp;
-
- symbol_length = strlen(name) + 1; /* include '\000' in length */
-
- /* need to grow the table? */
- if (table->next >= table->size)
- {
- if (table->size == 0)
- newsize = 100;
- else
- newsize = table->size + (table->size / (100 / table->growth_factor));
-
- table->addresses = (rtems_symbol_t *) realloc((void *) table->addresses, newsize * sizeof(rtems_symbol_t));
- if (table->addresses == 0) /* blew it; lost orig */
- goto failed;
- table->size = newsize;
- }
-
- sp = &table->addresses[table->next];
- sp->value = value;
-
- /* Have to add it to string pool */
- /* need to grow pool? */
-
- if ((table->string_buffer_head == 0) ||
- (table->strings_next + symbol_length) >= SYMBOL_STRING_BLOCK_SIZE)
- {
- rtems_symbol_string_block_t *p;
-
- p = (rtems_symbol_string_block_t *) malloc(sizeof(rtems_symbol_string_block_t));
- if (p == 0)
- goto failed;
- p->next = 0;
- if (table->string_buffer_head == 0)
- table->string_buffer_head = p;
- else
- table->string_buffer_current->next = p;
- table->string_buffer_current = p;
-
- table->strings_next = 0;
- }
-
- sp->name = table->string_buffer_current->buffer + table->strings_next;
- (void) strcpy(sp->name, name);
-
- table->strings_next += symbol_length;
- table->sorted = 0;
- table->next++;
-
- return sp;
-
-/* XXX Not sure what to do here. We've possibly destroyed the initial
- symbol table due to realloc failure */
-failed:
- return 0;
-}
-
-/*
- * Qsort entry point for compare by address
- */
-
-static int
-rtems_symbol_compare(const void *e1,
- const void *e2)
-{
- rtems_symbol_t *s1, *s2;
- s1 = (rtems_symbol_t *) e1;
- s2 = (rtems_symbol_t *) e2;
-
- if (s1->value < s2->value)
- return -1;
- if (s1->value > s2->value)
- return 1;
- return 0;
-}
-
-
-/*
- * Sort the symbol table using qsort
- */
-
-static void
-rtems_symbol_sort(rtems_symbol_table_t *table)
-{
- qsort((void *) table->addresses, (size_t) table->next,
- sizeof(rtems_symbol_t), rtems_symbol_compare);
- table->sorted = 1;
-}
-
-
-/*
- * Search the symbol table by address
- * This code based on CYGNUS newlib bsearch, but changed
- * to allow for finding closest symbol <= key
- */
-
-rtems_symbol_t *
-rtems_symbol_value_lookup(
- rtems_symbol_table_t *table,
- rtems_unsigned32 value
- )
-{
- rtems_symbol_t *sp;
- rtems_symbol_t *base;
- rtems_symbol_t *best = 0;
- rtems_unsigned32 distance;
- rtems_unsigned32 best_distance = ~0;
- rtems_unsigned32 elements;
-
- if (table == 0)
- table = rtems_monitor_symbols;
-
- if ((table == 0) || (table->size == 0))
- return 0;
-
- if (table->sorted == 0)
- rtems_symbol_sort(table);
-
- base = table->addresses;
- elements = table->next;
-
- while (elements)
- {
- sp = base + (elements / 2);
- if (value < sp->value)
- elements /= 2;
- else if (value > sp->value)
- {
- distance = value - sp->value;
- if (distance < best_distance)
- {
- best_distance = distance;
- best = sp;
- }
- base = sp + 1;
- elements = (elements / 2) - (elements % 2 ? 0 : 1);
- }
- else
- return sp;
- }
-
- if (value == base->value)
- return base;
-
- return best;
-}
-
-/*
- * Search the symbol table for the exact matching address.
- * If the symbol table has already been sorted, then
- * call the regular symbol value lookup, however, it it
- * has not yet been sorted, search it sequentially.
- * This routine is primarily used for low level symbol
- * lookups (eg. from exception handler and interrupt routines)
- * where the penality of sorted is not wanted and where
- * an exact match is needed such that symbol table order
- * is not important.
- */
-const rtems_symbol_t *
-rtems_symbol_value_lookup_exact(
- rtems_symbol_table_t *table,
- rtems_unsigned32 value
- )
-{
- rtems_unsigned32 s;
- rtems_symbol_t *sp;
-
- if (table == 0)
- {
- table = rtems_monitor_symbols;
- if (table == 0)
- return NULL;
- }
-
- if (table->sorted)
- {
- sp = rtems_symbol_value_lookup(table, value);
- if ( rtems_symbol_value(sp) == value )
- return sp;
- else
- return NULL; /* not an exact match */
- }
-
- for (s = 0, sp = table->addresses; s < table->next; s++, sp++)
- {
- if ( sp->value == value )
- return sp;
- }
-
- return NULL;
-
-}
-
-
-/*
- * Search the symbol table by string name (case independent)
- */
-
-rtems_symbol_t *
-rtems_symbol_name_lookup(
- rtems_symbol_table_t *table,
- char *name
- )
-{
- rtems_unsigned32 s;
- rtems_symbol_t *sp;
-
- if (table == 0)
- {
- table = rtems_monitor_symbols;
- if (table == 0)
- return NULL;
- }
-
- for (s = 0, sp = table->addresses; s < table->next; s++, sp++)
- {
- if ( strcasecmp(sp->name, name) == 0 )
- return sp;
- }
-
- return NULL;
-}
-
-void *
-rtems_monitor_symbol_next(
- void *object_info,
- rtems_monitor_symbol_t *canonical,
- rtems_id *next_id
-)
-{
- rtems_symbol_table_t *table;
- rtems_unsigned32 n = rtems_get_index(*next_id);
-
- table = *(rtems_symbol_table_t **) object_info;
- if (table == 0)
- goto failed;
-
- if (n >= table->next)
- goto failed;
-
- /* NOTE: symbols do not have id and name fields */
-
- if (table->sorted == 0)
- rtems_symbol_sort(table);
-
- _Thread_Disable_dispatch();
-
- *next_id += 1;
- return (void *) (table->addresses + n);
-
-failed:
- *next_id = RTEMS_OBJECT_ID_FINAL;
- return 0;
-}
-
-void
-rtems_monitor_symbol_canonical(
- rtems_monitor_symbol_t *canonical_symbol,
- rtems_symbol_t *sp
-)
-{
- canonical_symbol->value = sp->value;
- canonical_symbol->offset = 0;
- strncpy(canonical_symbol->name, sp->name, sizeof(canonical_symbol->name));
-}
-
-
-void
-rtems_monitor_symbol_canonical_by_name(
- rtems_monitor_symbol_t *canonical_symbol,
- char *name
-)
-{
- rtems_symbol_t *sp;
-
- sp = rtems_symbol_name_lookup(0, name);
-
- canonical_symbol->value = sp ? sp->value : 0;
-
- strncpy(canonical_symbol->name, name, sizeof(canonical_symbol->name));
- canonical_symbol->offset = 0;
-}
-
-void
-rtems_monitor_symbol_canonical_by_value(
- rtems_monitor_symbol_t *canonical_symbol,
- void *value_void_p
-)
-{
- unsigned32 value = (unsigned32) value_void_p;
- rtems_symbol_t *sp;
-
- sp = rtems_symbol_value_lookup(0, value);
- if (sp)
- {
- canonical_symbol->value = sp->value;
- canonical_symbol->offset = value - sp->value;
- strncpy(canonical_symbol->name, sp->name, sizeof(canonical_symbol->name));
- }
- else
- {
- canonical_symbol->value = value;
- canonical_symbol->offset = 0;
- canonical_symbol->name[0] = '\0';
- }
-}
-
-
-unsigned32
-rtems_monitor_symbol_dump(
- rtems_monitor_symbol_t *canonical_symbol,
- boolean verbose
-)
-{
- unsigned32 length = 0;
-
- /*
- * print the name if it exists AND if value is non-zero
- * Ie: don't print some garbage symbol for address 0
- */
-
- if (canonical_symbol->name[0] && (canonical_symbol->value != 0))
- {
- if (canonical_symbol->offset == 0)
- length += printf("%.*s",
- (int) sizeof(canonical_symbol->name),
- canonical_symbol->name);
- else
- length += printf("<%.*s+0x%x>",
- (int) sizeof(canonical_symbol->name),
- canonical_symbol->name,
- canonical_symbol->offset);
- if (verbose)
- length += printf(" [0x%x]", canonical_symbol->value);
- }
- else
- length += printf("[0x%x]", canonical_symbol->value);
-
- return length;
-}
-
-
-void
-rtems_monitor_symbol_dump_all(
- rtems_symbol_table_t *table,
- boolean verbose
-)
-{
- rtems_unsigned32 s;
- rtems_symbol_t *sp;
-
- if (table == 0)
- {
- table = rtems_monitor_symbols;
- if (table == 0)
- return;
- }
-
- if (table->sorted == 0)
- rtems_symbol_sort(table);
-
- for (s = 0, sp = table->addresses; s < table->next; s++, sp++)
- {
- rtems_monitor_symbol_t canonical_symbol;
-
- rtems_monitor_symbol_canonical(&canonical_symbol, sp);
- rtems_monitor_symbol_dump(&canonical_symbol, TRUE);
- printf("\n");
- }
-}
-
-
-/*
- * 'symbol' command
- */
-
-void
-rtems_monitor_symbol_cmd(
- int argc,
- char **argv,
- unsigned32 command_arg,
- boolean verbose
-)
-{
- int arg;
- rtems_symbol_table_t *table;
-
- table = *(rtems_symbol_table_t **) command_arg;
- if (table == 0)
- {
- table = rtems_monitor_symbols;
- if (table == 0)
- return;
- }
-
- /*
- * Use object command to dump out whole symbol table
- */
- if (argc == 1)
- rtems_monitor_symbol_dump_all(table, verbose);
- else
- {
- rtems_monitor_symbol_t canonical_symbol;
-
- for (arg=1; argv[arg]; arg++)
- {
- rtems_monitor_symbol_canonical_by_name(&canonical_symbol, argv[arg]);
- rtems_monitor_symbol_dump(&canonical_symbol, verbose);
- printf("\n");
- }
- }
-}
diff --git a/cpukit/libmisc/monitor/mon-task.c b/cpukit/libmisc/monitor/mon-task.c
deleted file mode 100644
index b6ca36ddd1..0000000000
--- a/cpukit/libmisc/monitor/mon-task.c
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * RTEMS Monitor task support
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include <rtems/monitor.h>
-
-#include <stdio.h>
-#include <string.h> /* memcpy() */
-
-void
-rtems_monitor_task_canonical(
- rtems_monitor_task_t *canonical_task,
- void *thread_void
-)
-{
- Thread_Control *rtems_thread = (Thread_Control *) thread_void;
- RTEMS_API_Control *api;
-
- api = rtems_thread->API_Extensions[ THREAD_API_RTEMS ];
-
- canonical_task->entry = rtems_thread->Start.entry_point;
- canonical_task->argument = rtems_thread->Start.numeric_argument;
- canonical_task->stack = rtems_thread->Start.Initial_stack.area;
- canonical_task->stack_size = rtems_thread->Start.Initial_stack.size;
- canonical_task->priority = rtems_thread->current_priority;
- canonical_task->state = rtems_thread->current_state;
- canonical_task->wait_id = rtems_thread->Wait.id;
- canonical_task->events = api->pending_events;
-
-/* XXX modes and attributes only exist in the RTEMS API .. */
-/* XXX not directly in the core thread.. they will have to be derived */
-/* XXX if they are important enough to include anymore. */
- canonical_task->modes = 0; /* XXX FIX ME.... rtems_thread->current_modes; */
- canonical_task->attributes = 0 /* XXX FIX ME rtems_thread->API_Extensions[ THREAD_API_RTEMS ]->attribute_set */;
- (void) memcpy(canonical_task->notepad, api ->Notepads, sizeof(canonical_task->notepad));
-/* XXX more to fix */
-/*
- (void) memcpy(&canonical_task->wait_args, &rtems_thread->Wait.Extra, sizeof(canonical_task->wait_args));
-*/
-}
-
-
-void
-rtems_monitor_task_dump_header(
- boolean verbose
-)
-{
- printf("\
- ID NAME PRIO STAT MODES EVENTS WAITID WAITARG NOTES\n");
-/*23456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
-0 1 2 3 4 5 6 7 */
-
- rtems_monitor_separator();
-}
-
-/*
- */
-
-void
-rtems_monitor_task_dump(
- rtems_monitor_task_t *monitor_task,
- boolean verbose
-)
-{
- int length = 0;
-
- length += rtems_monitor_dump_id(monitor_task->id);
- length += rtems_monitor_pad(11, length);
- length += rtems_monitor_dump_name(monitor_task->name);
- length += rtems_monitor_pad(18, length);
- length += rtems_monitor_dump_priority(monitor_task->priority);
- length += rtems_monitor_pad(24, length);
- length += rtems_monitor_dump_state(monitor_task->state);
- length += rtems_monitor_pad(31, length);
- length += rtems_monitor_dump_modes(monitor_task->modes);
- length += rtems_monitor_pad(39, length);
- length += rtems_monitor_dump_events(monitor_task->events);
- if (monitor_task->wait_id)
- {
- length += rtems_monitor_pad(47, length);
- length += rtems_monitor_dump_id(monitor_task->wait_id);
- length += rtems_monitor_pad(57, length);
- length += rtems_monitor_dump_hex(monitor_task->wait_args);
- }
-
- length += rtems_monitor_pad(65, length);
- length += rtems_monitor_dump_notepad(monitor_task->notepad);
- printf("\n");
-}
-
diff --git a/cpukit/libmisc/monitor/monitor.h b/cpukit/libmisc/monitor/monitor.h
deleted file mode 100644
index a9584808f3..0000000000
--- a/cpukit/libmisc/monitor/monitor.h
+++ /dev/null
@@ -1,449 +0,0 @@
-/*
- * File: monitor.h
- *
- * Description:
- * The RTEMS monitor task include file.
- *
- * TODO:
- *
- * $Id$
- */
-
-#ifndef __MONITOR_H
-#define __MONITOR_H
-
-#include <rtems/symbols.h>
-#include <rtems/error.h> /* rtems_error() */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Monitor types are derived from rtems object classes
- */
-
-typedef enum {
- RTEMS_MONITOR_OBJECT_INVALID = OBJECTS_NO_CLASS,
- RTEMS_MONITOR_OBJECT_TASK = OBJECTS_RTEMS_TASKS,
- RTEMS_MONITOR_OBJECT_EXTENSION = OBJECTS_RTEMS_EXTENSIONS,
- RTEMS_MONITOR_OBJECT_QUEUE = OBJECTS_RTEMS_MESSAGE_QUEUES,
- RTEMS_MONITOR_OBJECT_SEMAPHORE = OBJECTS_RTEMS_SEMAPHORES,
- RTEMS_MONITOR_OBJECT_PARTITION = OBJECTS_RTEMS_PARTITIONS,
- RTEMS_MONITOR_OBJECT_REGION = OBJECTS_RTEMS_REGIONS,
- RTEMS_MONITOR_OBJECT_PORT = OBJECTS_RTEMS_PORTS,
-
- /* following monitor objects are not known to RTEMS, but
- * we like to have "types" for them anyway */
-
- RTEMS_MONITOR_OBJECT_DRIVER = OBJECTS_CLASSES_LAST+1,
- RTEMS_MONITOR_OBJECT_DNAME,
- RTEMS_MONITOR_OBJECT_CONFIG,
- RTEMS_MONITOR_OBJECT_INIT_TASK,
- RTEMS_MONITOR_OBJECT_MPCI,
- RTEMS_MONITOR_OBJECT_SYMBOL
-} rtems_monitor_object_type_t;
-
-/*
- * rtems_monitor_init() flags
- */
-
-#define RTEMS_MONITOR_SUSPEND 0x0001 /* suspend monitor on startup */
-#define RTEMS_MONITOR_GLOBAL 0x0002 /* monitor should be global */
-
-
-/*
- * Public interfaces for RTEMS data structures monitor is aware of.
- * These are only used by the monitor.
- *
- * NOTE:
- * All the canonical objects that correspond to RTEMS managed "objects"
- * must have an identical first portion with 'id' and 'name' fields.
- *
- * Others do not have that restriction, even tho we would like them to.
- * This is because some of the canonical structures are almost too big
- * for shared memory driver (eg: mpci) and we are nickel and diming it.
- */
-
-/*
- * Type of a pointer that may be a symbol
- */
-
-#define MONITOR_SYMBOL_LEN 20
-typedef struct {
- char name[MONITOR_SYMBOL_LEN];
- unsigned32 value;
- unsigned32 offset;
-} rtems_monitor_symbol_t;
-
-typedef struct {
- rtems_id id;
- rtems_name name;
- /* end of common portion */
-} rtems_monitor_generic_t;
-
-/*
- * Task
- */
-typedef struct {
- rtems_id id;
- rtems_name name;
- /* end of common portion */
- Thread_Entry entry;
- unsigned32 argument;
- void *stack;
- unsigned32 stack_size;
- rtems_task_priority priority;
- States_Control state;
- rtems_event_set events;
- rtems_mode modes;
- rtems_attribute attributes;
- unsigned32 notepad[RTEMS_NUMBER_NOTEPADS];
- rtems_id wait_id;
- unsigned32 wait_args;
-} rtems_monitor_task_t;
-
-/*
- * Init task
- */
-
-typedef struct {
- rtems_id id; /* not really an id */
- rtems_name name;
- /* end of common portion */
- rtems_monitor_symbol_t entry;
- unsigned32 argument;
- unsigned32 stack_size;
- rtems_task_priority priority;
- rtems_mode modes;
- rtems_attribute attributes;
-} rtems_monitor_init_task_t;
-
-
-/*
- * Message queue
- */
-typedef struct {
- rtems_id id;
- rtems_name name;
- /* end of common portion */
- rtems_attribute attributes;
- unsigned32 number_of_pending_messages;
- unsigned32 maximum_pending_messages;
- unsigned32 maximum_message_size;
-} rtems_monitor_queue_t;
-
-/*
- * Extension
- */
-typedef struct {
- rtems_id id;
- rtems_name name;
- /* end of common portion */
- rtems_monitor_symbol_t e_create;
- rtems_monitor_symbol_t e_start;
- rtems_monitor_symbol_t e_restart;
- rtems_monitor_symbol_t e_delete;
- rtems_monitor_symbol_t e_tswitch;
- rtems_monitor_symbol_t e_begin;
- rtems_monitor_symbol_t e_exitted;
- rtems_monitor_symbol_t e_fatal;
-} rtems_monitor_extension_t;
-
-/*
- * Device driver
- */
-
-typedef struct {
- rtems_id id; /* not really an id (should be tho) */
- rtems_name name; /* ditto */
- /* end of common portion */
- rtems_monitor_symbol_t initialization; /* initialization procedure */
- rtems_monitor_symbol_t open; /* open request procedure */
- rtems_monitor_symbol_t close; /* close request procedure */
- rtems_monitor_symbol_t read; /* read request procedure */
- rtems_monitor_symbol_t write; /* write request procedure */
- rtems_monitor_symbol_t control; /* special functions procedure */
-} rtems_monitor_driver_t;
-
-typedef struct {
- rtems_id id; /* not used for drivers (yet) */
- rtems_name name; /* not used for drivers (yet) */
- /* end of common portion */
- unsigned32 major;
- unsigned32 minor;
- char name_string[64];
-} rtems_monitor_dname_t;
-
-/*
- * System config
- */
-
-typedef struct {
- void *work_space_start;
- unsigned32 work_space_size;
- unsigned32 maximum_tasks;
- unsigned32 maximum_timers;
- unsigned32 maximum_semaphores;
- unsigned32 maximum_message_queues;
- unsigned32 maximum_partitions;
- unsigned32 maximum_regions;
- unsigned32 maximum_ports;
- unsigned32 maximum_periods;
- unsigned32 maximum_extensions;
- unsigned32 microseconds_per_tick;
- unsigned32 ticks_per_timeslice;
- unsigned32 number_of_initialization_tasks;
-} rtems_monitor_config_t;
-
-/*
- * MPCI config
- */
-
-#if defined(RTEMS_MULTIPROCESSING)
-typedef struct {
- unsigned32 node; /* local node number */
- unsigned32 maximum_nodes; /* maximum # nodes in system */
- unsigned32 maximum_global_objects; /* maximum # global objects */
- unsigned32 maximum_proxies; /* maximum # proxies */
-
- unsigned32 default_timeout; /* in ticks */
- unsigned32 maximum_packet_size;
- rtems_monitor_symbol_t initialization;
- rtems_monitor_symbol_t get_packet;
- rtems_monitor_symbol_t return_packet;
- rtems_monitor_symbol_t send_packet;
- rtems_monitor_symbol_t receive_packet;
-} rtems_monitor_mpci_t;
-#endif
-
-/*
- * The generic canonical information union
- */
-
-typedef union {
- rtems_monitor_generic_t generic;
- rtems_monitor_task_t task;
- rtems_monitor_queue_t queue;
- rtems_monitor_extension_t extension;
- rtems_monitor_driver_t driver;
- rtems_monitor_dname_t dname;
- rtems_monitor_config_t config;
-#if defined(RTEMS_MULTIPROCESSING)
- rtems_monitor_mpci_t mpci;
-#endif
- rtems_monitor_init_task_t itask;
-} rtems_monitor_union_t;
-
-/*
- * Support for talking to other monitors
- */
-
-/*
- * Names of other monitors
- */
-
-#define RTEMS_MONITOR_NAME (rtems_build_name('R', 'M', 'O', 'N'))
-#define RTEMS_MONITOR_SERVER_NAME (rtems_build_name('R', 'M', 'S', 'V'))
-#define RTEMS_MONITOR_QUEUE_NAME (rtems_build_name('R', 'M', 'S', 'Q'))
-#define RTEMS_MONITOR_RESPONSE_QUEUE_NAME (rtems_build_name('R', 'M', 'R', 'Q'))
-
-#define RTEMS_MONITOR_SERVER_RESPONSE 0x0001
-#define RTEMS_MONITOR_SERVER_CANONICAL 0x0002
-
-typedef struct
-{
- unsigned32 command;
- rtems_id return_id;
- unsigned32 argument0;
- unsigned32 argument1;
- unsigned32 argument2;
- unsigned32 argument3;
- unsigned32 argument4;
- unsigned32 argument5;
-} rtems_monitor_server_request_t;
-
-typedef struct
-{
- unsigned32 command;
- unsigned32 result0;
- unsigned32 result1;
- rtems_monitor_union_t payload;
-} rtems_monitor_server_response_t;
-
-extern rtems_id rtems_monitor_task_id;
-
-extern unsigned32 rtems_monitor_node; /* our node number */
-extern unsigned32 rtems_monitor_default_node; /* current default for commands */
-
-/*
- * Monitor command function and table entry
- */
-
-typedef struct rtems_monitor_command_entry_s rtems_monitor_command_entry_t;
-
-typedef void ( *rtems_monitor_command_function_t )(
- int argc,
- char **argv,
- unsigned32 command_arg,
- boolean verbose
- );
-
-struct rtems_monitor_command_entry_s {
- char *command; /* command name */
- char *usage; /* usage string for the command */
- unsigned32 arguments_required; /* # of required args */
- rtems_monitor_command_function_t command_function;
-
- /* Some argument for the command */
- unsigned32 command_arg;
-};
-
-typedef void *(*rtems_monitor_object_next_fn)(void *, void *, rtems_id *);
-typedef void (*rtems_monitor_object_canonical_fn)(void *, void *);
-typedef void (*rtems_monitor_object_dump_header_fn)(boolean);
-typedef void (*rtems_monitor_object_dump_fn)(void *, boolean);
-
-typedef struct {
- rtems_monitor_object_type_t type;
- void *object_information;
- int size; /* of canonical object */
- rtems_monitor_object_next_fn next;
- rtems_monitor_object_canonical_fn canonical;
- rtems_monitor_object_dump_header_fn dump_header;
- rtems_monitor_object_dump_fn dump;
-} rtems_monitor_object_info_t;
-
-
-/* monitor.c */
-void rtems_monitor_kill(void);
-void rtems_monitor_init(unsigned32);
-void rtems_monitor_wakeup(void);
-void rtems_monitor_pause_cmd(int, char **, unsigned32, boolean);
-void rtems_monitor_fatal_cmd(int, char **, unsigned32, boolean);
-void rtems_monitor_continue_cmd(int, char **, unsigned32, boolean);
-void rtems_monitor_debugger_cmd(int, char **, unsigned32, boolean);
-void rtems_monitor_node_cmd(int, char **, unsigned32, boolean);
-void rtems_monitor_symbols_loadup(void);
-void rtems_monitor_task(rtems_task_argument);
-
-/* server.c */
-void rtems_monitor_server_kill(void);
-rtems_status_code rtems_monitor_server_request(unsigned32, rtems_monitor_server_request_t *, rtems_monitor_server_response_t *);
-void rtems_monitor_server_task(rtems_task_argument);
-void rtems_monitor_server_init(unsigned32);
-
-/* command.c */
-int rtems_monitor_make_argv(char *, int *, char **);
-int rtems_monitor_command_read(char *, int *, char **);
-rtems_monitor_command_entry_t *rtems_monitor_command_lookup(
- rtems_monitor_command_entry_t * table, int argc, char **argv);
-void rtems_monitor_command_usage(rtems_monitor_command_entry_t *, char *);
-void rtems_monitor_help_cmd(int, char **, unsigned32, boolean);
-
-/* prmisc.c */
-void rtems_monitor_separator(void);
-unsigned32 rtems_monitor_pad(unsigned32 dest_col, unsigned32 curr_col);
-unsigned32 rtems_monitor_dump_char(unsigned8 ch);
-unsigned32 rtems_monitor_dump_decimal(unsigned32 num);
-unsigned32 rtems_monitor_dump_hex(unsigned32 num);
-unsigned32 rtems_monitor_dump_id(rtems_id id);
-unsigned32 rtems_monitor_dump_name(rtems_name name);
-unsigned32 rtems_monitor_dump_priority(rtems_task_priority priority);
-unsigned32 rtems_monitor_dump_state(States_Control state);
-unsigned32 rtems_monitor_dump_modes(rtems_mode modes);
-unsigned32 rtems_monitor_dump_attributes(rtems_attribute attributes);
-unsigned32 rtems_monitor_dump_events(rtems_event_set events);
-unsigned32 rtems_monitor_dump_notepad(unsigned32 *notepad);
-
-/* object.c */
-rtems_id rtems_monitor_id_fixup(rtems_id, unsigned32, rtems_monitor_object_type_t);
-rtems_id rtems_monitor_object_canonical_get(rtems_monitor_object_type_t, rtems_id, void *, unsigned32 *size_p);
-rtems_id rtems_monitor_object_canonical_next(rtems_monitor_object_info_t *, rtems_id, void *);
-void *rtems_monitor_object_next(void *, void *, rtems_id, rtems_id *);
-rtems_id rtems_monitor_object_canonical(rtems_id, void *);
-void rtems_monitor_object_cmd(int, char **, unsigned32, boolean);
-
-/* manager.c */
-void *rtems_monitor_manager_next(void *, void *, rtems_id *);
-
-/* config.c */
-void rtems_monitor_config_canonical(rtems_monitor_config_t *, void *);
-void *rtems_monitor_config_next(void *, rtems_monitor_config_t *, rtems_id *);
-void rtems_monitor_config_dump_header(boolean);
-void rtems_monitor_config_dump(rtems_monitor_config_t *, boolean verbose);
-
-/* mpci.c */
-#if defined(RTEMS_MULTIPROCESSING)
-void rtems_monitor_mpci_canonical(rtems_monitor_mpci_t *, void *);
-void *rtems_monitor_mpci_next(void *, rtems_monitor_mpci_t *, rtems_id *);
-void rtems_monitor_mpci_dump_header(boolean);
-void rtems_monitor_mpci_dump(rtems_monitor_mpci_t *, boolean verbose);
-#endif
-
-/* itask.c */
-void rtems_monitor_init_task_canonical(rtems_monitor_init_task_t *, void *);
-void *rtems_monitor_init_task_next(void *, rtems_monitor_init_task_t *, rtems_id *);
-void rtems_monitor_init_task_dump_header(boolean);
-void rtems_monitor_init_task_dump(rtems_monitor_init_task_t *, boolean verbose);
-
-/* extension.c */
-void rtems_monitor_extension_canonical(rtems_monitor_extension_t *, void *);
-void rtems_monitor_extension_dump_header(boolean verbose);
-void rtems_monitor_extension_dump(rtems_monitor_extension_t *, boolean);
-
-/* task.c */
-void rtems_monitor_task_canonical(rtems_monitor_task_t *, void *);
-void rtems_monitor_task_dump_header(boolean verbose);
-void rtems_monitor_task_dump(rtems_monitor_task_t *, boolean);
-
-/* queue.c */
-void rtems_monitor_queue_canonical(rtems_monitor_queue_t *, void *);
-void rtems_monitor_queue_dump_header(boolean verbose);
-void rtems_monitor_queue_dump(rtems_monitor_queue_t *, boolean);
-
-/* driver.c */
-void *rtems_monitor_driver_next(void *, rtems_monitor_driver_t *, rtems_id *);
-void rtems_monitor_driver_canonical(rtems_monitor_driver_t *, void *);
-void rtems_monitor_driver_dump_header(boolean);
-void rtems_monitor_driver_dump(rtems_monitor_driver_t *, boolean);
-
-/* dname.c */
-void *rtems_monitor_dname_next(void *, rtems_monitor_dname_t *, rtems_id *);
-void rtems_monitor_dname_canonical(rtems_monitor_dname_t *, void *);
-void rtems_monitor_dname_dump_header(boolean);
-void rtems_monitor_dname_dump(rtems_monitor_dname_t *, boolean);
-
-/* symbols.c */
-rtems_symbol_table_t *rtems_symbol_table_create();
-void rtems_symbol_table_destroy(rtems_symbol_table_t *table);
-
-rtems_symbol_t *rtems_symbol_create(rtems_symbol_table_t *, char *, unsigned32);
-rtems_symbol_t *rtems_symbol_value_lookup(rtems_symbol_table_t *, unsigned32);
-const rtems_symbol_t *rtems_symbol_value_lookup_exact(rtems_symbol_table_t *, unsigned32);
-rtems_symbol_t *rtems_symbol_name_lookup(rtems_symbol_table_t *, char *);
-void *rtems_monitor_symbol_next(void *object_info, rtems_monitor_symbol_t *, rtems_id *);
-void rtems_monitor_symbol_canonical(rtems_monitor_symbol_t *, rtems_symbol_t *);
-void rtems_monitor_symbol_canonical_by_name(rtems_monitor_symbol_t *, char *);
-void rtems_monitor_symbol_canonical_by_value(rtems_monitor_symbol_t *, void *);
-unsigned32 rtems_monitor_symbol_dump(rtems_monitor_symbol_t *, boolean);
-void rtems_monitor_symbol_cmd(int, char **, unsigned32, boolean);
-
-
-extern rtems_symbol_table_t *rtems_monitor_symbols;
-
-#ifndef MONITOR_PROMPT
-#define MONITOR_PROMPT "rtems" /* will have '> ' appended */
-#endif
-
-#define MONITOR_WAKEUP_EVENT RTEMS_EVENT_0
-
-
-#define STREQ(a,b) (strcmp(a,b) == 0)
-#define STRNEQ(a,b,n) (strncmp(a,b,n) == 0)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* ! __MONITOR_H */
diff --git a/cpukit/libmisc/monitor/symbols.h b/cpukit/libmisc/monitor/symbols.h
deleted file mode 100644
index 119c879d54..0000000000
--- a/cpukit/libmisc/monitor/symbols.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * RTEMS monitor symbol table functions
- *
- * Description:
- * Entry points for symbol table routines.
- *
- *
- *
- * TODO:
- *
- * $Id$
- */
-
-#ifndef _INCLUDE_SYMBOLS_H
-#define _INCLUDE_SYMBOLS_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct {
- rtems_unsigned32 value;
- char *name;
-} rtems_symbol_t;
-
-#define SYMBOL_STRING_BLOCK_SIZE 4080
-typedef struct rtems_symbol_string_block_s {
- struct rtems_symbol_string_block_s *next;
- char buffer[SYMBOL_STRING_BLOCK_SIZE];
-} rtems_symbol_string_block_t;
-
-typedef struct {
-
- rtems_unsigned32 sorted; /* are symbols sorted right now? */
- rtems_unsigned32 growth_factor; /* % to grow by when needed */
- rtems_unsigned32 next; /* next symbol slot to use when adding */
- rtems_unsigned32 size; /* max # of symbols */
-
- /*
- * Symbol list -- sorted by address (when we do a lookup)
- */
-
- rtems_symbol_t *addresses; /* symbol array by address */
-
- /*
- * String pool, unsorted, a list of blocks of string data
- */
-
- rtems_symbol_string_block_t *string_buffer_head;
- rtems_symbol_string_block_t *string_buffer_current;
- rtems_unsigned32 strings_next; /* next byte to use in this block */
-
-} rtems_symbol_table_t;
-
-#define rtems_symbol_name(sp) ((sp)->name)
-#define rtems_symbol_value(sp) ((sp)->value)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* ! _INCLUDE_SYMBOLS_H */
diff --git a/cpukit/libmisc/rtmonuse/Makefile.am b/cpukit/libmisc/rtmonuse/Makefile.am
deleted file mode 100644
index 76f7f19acd..0000000000
--- a/cpukit/libmisc/rtmonuse/Makefile.am
+++ /dev/null
@@ -1,41 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-LIBNAME = librtmonuse-tmp
-LIB = $(ARCH)/$(LIBNAME).a
-
-C_FILES = rtmonuse.c
-C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
-
-H_FILES = rtmonuse.h
-
-OBJS = $(C_O_FILES)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../automake/lib.am
-
-$(PROJECT_INCLUDE)/rtems:
- @$(mkinstalldirs) $@
-$(PROJECT_INCLUDE)/rtems/%.h: %.h
- $(INSTALL_DATA) $< $@
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-$(LIB): $(OBJS)
- $(make-library)
-
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems \
- $(H_FILES:%=$(PROJECT_INCLUDE)/rtems/%)
-
-all-local: $(ARCH) $(PREINSTALL_FILES) $(OBJS) $(LIB)
-
-.PRECIOUS: $(LIB)
-
-EXTRA_DIST = rtmonuse.c rtmonuse.h
-
-include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/libmisc/rtmonuse/rtmonuse.c b/cpukit/libmisc/rtmonuse/rtmonuse.c
deleted file mode 100644
index d10008a302..0000000000
--- a/cpukit/libmisc/rtmonuse/rtmonuse.c
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * $Id$
- */
-
-#include <rtems.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <assert.h>
-
-#include <rtems/rtmonuse.h>
-
-typedef struct {
- rtems_id id;
- unsigned32 count;
- unsigned32 missed_count;
- unsigned32 min_cpu_time;
- unsigned32 max_cpu_time;
- unsigned32 total_cpu_time;
- unsigned32 min_wall_time;
- unsigned32 max_wall_time;
- unsigned32 total_wall_time;
-} Period_usage_t;
-
-Period_usage_t *Period_usage_Information;
-
-/*PAGE
- *
- * Period_usage_Initialize
- */
-
-void Period_usage_Initialize( void )
-{
- int maximum;
-
- maximum = _Configuration_Table->RTEMS_api_configuration->maximum_periods;
-
- Period_usage_Information = malloc( sizeof(Period_usage_t) * (maximum+1) );
-
- Period_usage_Reset();
-}
-
-/*PAGE
- *
- * Period_usage_Reset
- */
-
-void Period_usage_Reset( void )
-{
- unsigned32 i;
- Period_usage_t *the_usage;
-
- for ( i=0 ;
- i<_Configuration_Table->RTEMS_api_configuration->maximum_periods ;
- i++ ) {
- the_usage = &Period_usage_Information[ i ];
-
- the_usage->count = 0;
- the_usage->missed_count = 0;
- the_usage->min_cpu_time = 0xFFFFFFFF;
- the_usage->max_cpu_time = 0;
- the_usage->total_cpu_time = 0;
- the_usage->min_wall_time = 0xFFFFFFFF;
- the_usage->max_wall_time = 0;
- the_usage->total_wall_time = 0;
-
- }
-}
-
-/*PAGE
- *
- * Period_usage_Update
- */
-
-void Period_usage_Update(
- rtems_id id
-)
-{
- rtems_rate_monotonic_period_status rm_status;
- rtems_status_code status;
- Period_usage_t *the_usage;
-
- assert( Period_usage_Information );
-
- status = rtems_rate_monotonic_get_status( id, &rm_status );
- assert( status == RTEMS_SUCCESSFUL );
-
- the_usage = &Period_usage_Information[ rtems_get_index( id ) ];
-
- the_usage->id = id;
- the_usage->count++;
- if ( rm_status.state == RATE_MONOTONIC_EXPIRED )
- the_usage->missed_count++;
- the_usage->total_cpu_time += rm_status.ticks_executed_since_last_period;
- the_usage->total_wall_time += rm_status.ticks_since_last_period;
-
- /*
- * Update CPU time
- */
-
- if ( rm_status.ticks_executed_since_last_period < the_usage->min_cpu_time )
- the_usage->min_cpu_time = rm_status.ticks_executed_since_last_period;
-
- if ( rm_status.ticks_executed_since_last_period > the_usage->max_cpu_time )
- the_usage->max_cpu_time = rm_status.ticks_executed_since_last_period;
-
- /*
- * Update Wall time
- */
-
- if ( rm_status.ticks_since_last_period < the_usage->min_wall_time )
- the_usage->min_wall_time = rm_status.ticks_since_last_period;
-
- if ( rm_status.ticks_since_last_period > the_usage->max_wall_time )
- the_usage->max_wall_time = rm_status.ticks_since_last_period;
-
-}
-
-/*PAGE
- *
- * Period_usage_Dump
- */
-
-void Period_usage_Dump( void )
-{
- unsigned32 i;
- Period_usage_t *the_usage;
- Rate_monotonic_Control *the_period;
- unsigned32 u32_name;
- char name[5];
-
- if ( !Period_usage_Information ) {
- printf( "Period statistics library is not initialized\n" );
- return;
- }
-
- printf( "Period information by period\n" );
- printf( " ID OWNER PERIODS MISSED CPU TIME WALL TIME\n" );
-
- /*
- * RTEMS does not use an index of zero for object ids.
- */
-
- for ( i=1 ;
- i<_Configuration_Table->RTEMS_api_configuration->maximum_periods ;
- i++ ) {
- the_usage = &Period_usage_Information[ i ];
- if ( the_usage->count == 0 )
- continue;
-
- the_period =
- (Rate_monotonic_Control *)_Rate_monotonic_Information.local_table[ i ];
-
- if ( the_period->owner )
- u32_name = *(unsigned32 *)the_period->owner->Object.name;
- else
- u32_name = rtems_build_name(' ', ' ', ' ', ' ');
-
- name[ 0 ] = (u32_name >> 24) & 0xff;
- name[ 1 ] = (u32_name >> 16) & 0xff;
- name[ 2 ] = (u32_name >> 8) & 0xff;
- name[ 3 ] = (u32_name >> 0) & 0xff;
- name[ 4 ] = '\0';
-
- printf(
- "0x%08x %4s %6d %3d %d/%d/%5.2f %d/%d/%3.2f\n",
- the_usage->id,
- name,
- the_usage->count,
- the_usage->missed_count,
- the_usage->min_cpu_time,
- the_usage->max_cpu_time,
- (double) the_usage->total_cpu_time / (double) the_usage->count,
- the_usage->min_wall_time,
- the_usage->max_wall_time,
- (double) the_usage->total_wall_time / (double) the_usage->count
- );
- }
-}
diff --git a/cpukit/libmisc/rtmonuse/rtmonuse.h b/cpukit/libmisc/rtmonuse/rtmonuse.h
deleted file mode 100644
index f0580a4f0b..0000000000
--- a/cpukit/libmisc/rtmonuse/rtmonuse.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * $Id$
- */
-
-#ifndef __RATE_MONOTONIC_USAGE_h
-#define __RATE_MONOTONIC_USAGE_h
-
-void Period_usage_Initialize( void );
-
-void Period_usage_Reset( void );
-
-void Period_usage_Update(
- rtems_id id
-);
-
-void Period_usage_Dump( void );
-
-#endif
diff --git a/cpukit/libmisc/stackchk/Makefile.am b/cpukit/libmisc/stackchk/Makefile.am
deleted file mode 100644
index 83dd699c85..0000000000
--- a/cpukit/libmisc/stackchk/Makefile.am
+++ /dev/null
@@ -1,42 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-LIBNAME = libstackchk-tmp
-LIB = $(ARCH)/$(LIBNAME).a
-
-C_FILES = check.c
-C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
-
-H_FILES = internal.h
-INSTALLED_H_FILES = stackchk.h
-
-OBJS = $(C_O_FILES)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../automake/lib.am
-
-$(PROJECT_INCLUDE)/rtems:
- @$(mkinstalldirs) $@
-$(PROJECT_INCLUDE)/rtems/%.h: %.h
- $(INSTALL_DATA) $< $@
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-$(LIB): $(OBJS)
- $(make-library)
-
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems \
- $(INSTALLED_H_FILES:%=$(PROJECT_INCLUDE)/rtems/%)
-
-all-local: $(ARCH) $(PREINSTALL_FILES) $(OBJS) $(LIB)
-
-.PRECIOUS: $(LIB)
-
-EXTRA_DIST = README check.c internal.h stackchk.h
-
-include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/libmisc/stackchk/README b/cpukit/libmisc/stackchk/README
deleted file mode 100644
index 0f6e2f2b10..0000000000
--- a/cpukit/libmisc/stackchk/README
+++ /dev/null
@@ -1,56 +0,0 @@
-#
-# $Id$
-#
-
-Introduction
-============
-
-This directory contains a stack bounds checker. It provides two
-primary features:
-
- + check for stack overflow at each context switch
- + provides an educated guess at each task's stack usage
-
-Enabling
-========
-
-Add the stack checker extension to the initial user extension set.
-If using confdefs.h to build your configuration table, this is
-as simple as adding -DSTACK_CHECK_ON to the gcc command line which
-compiles the file defining the configuration table. In the RTEMS
-test suites and samples, this is always init.c
-
-Background
-==========
-
-The stack overflow check at context switch works by looking for
-a 16 byte pattern at the logical end of the stack to be corrupted.
-The "guesser" assumes that the entire stack was prefilled with a known
-pattern and assumes that the pattern is still in place if the memory
-has not been used as a stack.
-
-Both of these can be fooled by pushing large holes onto the stack
-and not writing to them... or (much more unlikely) writing the
-magic patterns into memory.
-
-This code has not been extensively tested. It is provided as a tool
-for RTEMS users to catch the most common mistake in multitasking
-systems ... too little stack space. Suggestions and comments are appreciated.
-
-NOTES:
-
-1. Stack usage information is questionable on CPUs which push
- large holes on stack.
-
-2. The stack checker has a tendency to generate a fault when
- trying to print the helpful diagnostic message. If it comes
- out, congratulations. If not, then the variable Stack_check_Blown_task
- contains a pointer to the TCB of the offending task. This
- is usually enough to go on.
-
-FUTURE:
-
-1. Determine how/if gcc will generate stack probe calls and support that.
-
-2. Get accurate stack usage numbers on i960.. it pushes very large
- holes on the stack.
diff --git a/cpukit/libmisc/stackchk/check.c b/cpukit/libmisc/stackchk/check.c
deleted file mode 100644
index 8e811e493d..0000000000
--- a/cpukit/libmisc/stackchk/check.c
+++ /dev/null
@@ -1,531 +0,0 @@
-/*
- * Stack Overflow Check User Extension Set
- *
- * NOTE: This extension set automatically determines at
- * initialization time whether the stack for this
- * CPU grows up or down and installs the correct
- * extension routines for that direction.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- *
- */
-
-#include <rtems.h>
-
-/*
- * HACK
- * the stack dump information should be printed by a "fatal" extension.
- * Fatal extensions only get called via rtems_fatal_error_occurred()
- * and not when rtems_shutdown_executive() is called.
- * I hope/think this is changing so that fatal extensions are renamed
- * to "shutdown" extensions.
- * When that happens, this #define should be deleted and all the code
- * it marks.
- */
-#define DONT_USE_FATAL_EXTENSION
-
-#include <assert.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include <rtems/stackchk.h>
-#include "internal.h"
-
-/*
- * This variable contains the name of the task which "blew" the stack.
- * It is NULL if the system is all right.
- */
-
-Thread_Control *Stack_check_Blown_task;
-
-/*
- * The extension table for the stack checker.
- */
-
-rtems_extensions_table Stack_check_Extension_table = {
- Stack_check_Create_extension, /* rtems_task_create */
- 0, /* rtems_task_start */
- 0, /* rtems_task_restart */
- 0, /* rtems_task_delete */
- Stack_check_Switch_extension, /* task_switch */
- Stack_check_Begin_extension, /* task_begin */
- 0, /* task_exitted */
-#ifdef DONT_USE_FATAL_EXTENSION
- 0, /* fatal */
-#else
- Stack_check_Fatal_extension, /* fatal */
-#endif
-};
-
-/*
- * The "magic pattern" used to mark the end of the stack.
- */
-
-Stack_check_Control Stack_check_Pattern;
-
-/*
- * Where the pattern goes in the stack area is dependent upon
- * whether the stack grow to the high or low area of the memory.
- *
- */
-
-#if ( CPU_STACK_GROWS_UP == TRUE )
-
-#define Stack_check_Get_pattern_area( _the_stack ) \
- ((Stack_check_Control *) ((char *)(_the_stack)->area + \
- (_the_stack)->size - sizeof( Stack_check_Control ) ))
-
-#define Stack_check_Calculate_used( _low, _size, _high_water ) \
- ((char *)(_high_water) - (char *)(_low))
-
-#define Stack_check_usable_stack_start(_the_stack) \
- ((_the_stack)->area)
-
-#else
-
-#define Stack_check_Get_pattern_area( _the_stack ) \
- ((Stack_check_Control *) ((char *)(_the_stack)->area + HEAP_OVERHEAD))
-
-#define Stack_check_Calculate_used( _low, _size, _high_water) \
- ( ((char *)(_low) + (_size)) - (char *)(_high_water) )
-
-#define Stack_check_usable_stack_start(_the_stack) \
- ((char *)(_the_stack)->area + sizeof(Stack_check_Control))
-
-#endif
-
-#define Stack_check_usable_stack_size(_the_stack) \
- ((_the_stack)->size - sizeof(Stack_check_Control))
-
-
-/*
- * Do we have an interrupt stack?
- * XXX it would sure be nice if the interrupt stack were also
- * stored in a "stack" structure!
- */
-
-
-Stack_Control stack_check_interrupt_stack;
-
-/*
- * Prototypes necessary for forward references
- */
-
-void Stack_check_Dump_usage( void );
-
-/*
- * Fill an entire stack area with BYTE_PATTERN.
- * This will be used by a Fatal extension to check for
- * amount of actual stack used
- */
-
-void
-stack_check_dope_stack(Stack_Control *stack)
-{
- memset(stack->area, BYTE_PATTERN, stack->size);
-}
-
-
-/*PAGE
- *
- * Stack_check_Initialize
- */
-
-unsigned32 stack_check_initialized = 0;
-
-void Stack_check_Initialize( void )
-{
-#if 0
- rtems_status_code status;
- Objects_Id id_ignored;
-#endif
- unsigned32 *p;
-#if 0
- unsigned32 i;
- unsigned32 class_index;
- Thread_Control *the_thread;
- Objects_Information *information;
-#endif
-
- if (stack_check_initialized)
- return;
-
- /*
- * Dope the pattern and fill areas
- */
-
- for ( p = Stack_check_Pattern.pattern;
- p < &Stack_check_Pattern.pattern[PATTERN_SIZE_WORDS];
- p += 4
- )
- {
- p[0] = 0xFEEDF00D; /* FEED FOOD to BAD DOG */
- p[1] = 0x0BAD0D06;
- p[2] = 0xDEADF00D; /* DEAD FOOD GOOD DOG */
- p[3] = 0x600D0D06;
- };
-
-#if 0
- status = rtems_extension_create(
- rtems_build_name( 'S', 'T', 'C', 'K' ),
- &Stack_check_Extension_table,
- &id_ignored
- );
- assert ( status == RTEMS_SUCCESSFUL );
-#endif
-
- Stack_check_Blown_task = 0;
-
- /*
- * If installed by a task, that task will not get setup properly
- * since it missed out on the create hook. This will cause a
- * failure on first switch out of that task.
- * So pretend here that we actually ran create and begin extensions.
- */
-
- /* XXX
- *
- * Technically this has not been done for any task created before this
- * happened. So just run through them and fix the situation.
- */
-#if 0
- if (_Thread_Executing)
- {
- Stack_check_Create_extension(_Thread_Executing, _Thread_Executing);
- }
-#endif
-
-#if 0
- for ( class_index = OBJECTS_CLASSES_FIRST ;
- class_index <= OBJECTS_CLASSES_LAST ;
- class_index++ ) {
- information = _Objects_Information_table[ class_index ];
- if ( information && information->is_thread ) {
- for ( i=1 ; i <= information->maximum ; i++ ) {
- the_thread = (Thread_Control *)information->local_table[ i ];
- Stack_check_Create_extension( the_thread, the_thread );
- }
- }
- }
-#endif
-
- /*
- * If appropriate, setup the interrupt stack for high water testing
- * also.
- */
- if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high)
- {
- stack_check_interrupt_stack.area = _CPU_Interrupt_stack_low;
- stack_check_interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
- (char *) _CPU_Interrupt_stack_low;
-
- stack_check_dope_stack(&stack_check_interrupt_stack);
- }
-
-#ifdef DONT_USE_FATAL_EXTENSION
-#ifdef RTEMS_DEBUG
- /*
- * this would normally be called by a fatal extension
- * handler, but we don't run fatal extensions unless
- * we fatal error.
- */
- atexit(Stack_check_Dump_usage);
-#endif
-#endif
-
- stack_check_initialized = 1;
-}
-
-/*PAGE
- *
- * Stack_check_Create_extension
- */
-
-boolean Stack_check_Create_extension(
- Thread_Control *running,
- Thread_Control *the_thread
-)
-{
- if (!stack_check_initialized)
- Stack_check_Initialize();
-
- if (the_thread /* XXX && (the_thread != _Thread_Executing) */ )
- stack_check_dope_stack(&the_thread->Start.Initial_stack);
-
- return TRUE;
-}
-
-/*PAGE
- *
- * Stack_check_Begin_extension
- */
-
-void Stack_check_Begin_extension(
- Thread_Control *the_thread
-)
-{
- Stack_check_Control *the_pattern;
-
- if (!stack_check_initialized)
- Stack_check_Initialize();
-
- if ( the_thread->Object.id == 0 ) /* skip system tasks */
- return;
-
- the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack);
-
- *the_pattern = Stack_check_Pattern;
-}
-
-/*PAGE
- *
- * Stack_check_report_blown_task
- * Report a blown stack. Needs to be a separate routine
- * so that interrupt handlers can use this too.
- *
- * Caller must have set the Stack_check_Blown_task.
- *
- * NOTE: The system is in a questionable state... we may not get
- * the following message out.
- */
-
-void Stack_check_report_blown_task(void)
-{
- Stack_Control *stack;
- Thread_Control *running;
-
- running = Stack_check_Blown_task;
- stack = &running->Start.Initial_stack;
-
- fprintf(
- stderr,
- "BLOWN STACK!!! Offending task(%p): id=0x%08x; name=0x%08x",
- running,
- running->Object.id,
- *(unsigned32 *)running->Object.name
- );
- fflush(stderr);
-
- if (rtems_configuration_get_user_multiprocessing_table())
- fprintf(
- stderr,
- "; node=%d\n",
- rtems_configuration_get_user_multiprocessing_table()->node
- );
- else
- fprintf(stderr, "\n");
- fflush(stderr);
-
- fprintf(
- stderr,
- " stack covers range 0x%08x - 0x%08x (%d bytes)\n",
- (unsigned32) stack->area,
- (unsigned32) stack->area + stack->size - 1,
- (unsigned32) stack->size);
- fflush(stderr);
-
- fprintf(
- stderr,
- " Damaged pattern begins at 0x%08x and is %d bytes long\n",
- (unsigned32) Stack_check_Get_pattern_area(stack), PATTERN_SIZE_BYTES);
- fflush(stderr);
-
- rtems_fatal_error_occurred( (unsigned32) "STACK BLOWN" );
-}
-
-/*PAGE
- *
- * Stack_check_Switch_extension
- */
-
-void Stack_check_Switch_extension(
- Thread_Control *running,
- Thread_Control *heir
-)
-{
- if ( running->Object.id == 0 ) /* skip system tasks */
- return;
-
- if (0 != memcmp( (void *) Stack_check_Get_pattern_area( &running->Start.Initial_stack)->pattern,
- (void *) Stack_check_Pattern.pattern,
- PATTERN_SIZE_BYTES))
- {
- Stack_check_Blown_task = running;
- Stack_check_report_blown_task();
- }
-}
-
-void *Stack_check_find_high_water_mark(
- const void *s,
- size_t n
-)
-{
- const unsigned32 *base, *ebase;
- unsigned32 length;
-
- base = s;
- length = n/4;
-
-#if ( CPU_STACK_GROWS_UP == TRUE )
- /*
- * start at higher memory and find first word that does not
- * match pattern
- */
-
- base += length - 1;
- for (ebase = s; base > ebase; base--)
- if (*base != U32_PATTERN)
- return (void *) base;
-#else
- /*
- * start at lower memory and find first word that does not
- * match pattern
- */
-
- base += PATTERN_SIZE_WORDS;
- for (ebase = base + length; base < ebase; base++)
- if (*base != U32_PATTERN)
- return (void *) base;
-#endif
-
- return (void *)0;
-}
-
-/*PAGE
- *
- * Stack_check_Dump_threads_usage
- * Try to print out how much stack was actually used by the task.
- *
- */
-
-void Stack_check_Dump_threads_usage(
- Thread_Control *the_thread
-)
-{
- unsigned32 size, used;
- void *low;
- void *high_water_mark;
- Stack_Control *stack;
- unsigned32 u32_name;
- char name[5];
-
-
- if ( !the_thread )
- return;
-
- /*
- * XXX HACK to get to interrupt stack
- */
-
- if (the_thread == (Thread_Control *) -1)
- {
- if (stack_check_interrupt_stack.area)
- {
- stack = &stack_check_interrupt_stack;
- the_thread = 0;
- }
- else
- return;
- }
- else
- stack = &the_thread->Start.Initial_stack;
-
- low = Stack_check_usable_stack_start(stack);
- size = Stack_check_usable_stack_size(stack);
-
- high_water_mark = Stack_check_find_high_water_mark(low, size);
-
- if ( high_water_mark )
- used = Stack_check_Calculate_used( low, size, high_water_mark );
- else
- used = 0;
-
- if ( the_thread )
- u32_name = *(unsigned32 *)the_thread->Object.name;
- else
- u32_name = rtems_build_name('I', 'N', 'T', 'R');
-
- name[ 0 ] = (u32_name >> 24) & 0xff;
- name[ 1 ] = (u32_name >> 16) & 0xff;
- name[ 2 ] = (u32_name >> 8) & 0xff;
- name[ 3 ] = (u32_name >> 0) & 0xff;
- name[ 4 ] = '\0';
-
- printf( "0x%08x %4s 0x%08x 0x%08x %8d %8d\n",
- the_thread ? the_thread->Object.id : ~0,
- name,
- (unsigned32) stack->area,
- (unsigned32) stack->area + (unsigned32) stack->size - 1,
- size,
- used
- );
-}
-
-/*PAGE
- *
- * Stack_check_Fatal_extension
- */
-
-void Stack_check_Fatal_extension(
- Internal_errors_Source source,
- boolean is_internal,
- unsigned32 status
-)
-{
-#ifndef DONT_USE_FATAL_EXTENSION
- if (status == 0)
- Stack_check_Dump_usage();
-#endif
-}
-
-
-/*PAGE
- *
- * Stack_check_Dump_usage
- */
-
-void Stack_check_Dump_usage( void )
-{
- unsigned32 i;
- unsigned32 class_index;
- Thread_Control *the_thread;
- unsigned32 hit_running = 0;
- Objects_Information *information;
-
- if (stack_check_initialized == 0)
- return;
-
- printf("Stack usage by thread\n");
- printf(
- " ID NAME LOW HIGH AVAILABLE USED\n"
- );
-
- for ( class_index = OBJECTS_CLASSES_FIRST ;
- class_index <= OBJECTS_CLASSES_LAST ;
- class_index++ ) {
- information = _Objects_Information_table[ class_index ];
- if ( information && information->is_thread ) {
- for ( i=1 ; i <= information->maximum ; i++ ) {
- the_thread = (Thread_Control *)information->local_table[ i ];
- Stack_check_Dump_threads_usage( the_thread );
- if ( the_thread == _Thread_Executing )
- hit_running = 1;
- }
- }
- }
-
- if ( !hit_running )
- Stack_check_Dump_threads_usage( _Thread_Executing );
-
- /* dump interrupt stack info if any */
- Stack_check_Dump_threads_usage((Thread_Control *) -1);
-}
-
diff --git a/cpukit/libmisc/stackchk/internal.h b/cpukit/libmisc/stackchk/internal.h
deleted file mode 100644
index ef2713abfd..0000000000
--- a/cpukit/libmisc/stackchk/internal.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/* internal.h
- *
- * This include file contains internal information
- * for the RTEMS stack checker.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __INTERNAL_STACK_CHECK_h
-#define __INTERNAL_STACK_CHECK_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This structure is used to fill in and compare the "end of stack"
- * marker pattern.
- * pattern area must be a multiple of 4 words.
- */
-
-#ifdef CPU_STACK_CHECK_SIZE
-#define PATTERN_SIZE_WORDS (((CPU_STACK_CHECK_SIZE / 4) + 3) & ~0x3)
-#else
-#define PATTERN_SIZE_WORDS 4
-#endif
-
-#define PATTERN_SIZE_BYTES (PATTERN_SIZE_WORDS * 4)
-
-typedef struct {
- unsigned32 pattern[ PATTERN_SIZE_WORDS ];
-} Stack_check_Control;
-
-/*
- * The pattern used to fill the entire stack.
- */
-
-#define BYTE_PATTERN 0xA5
-#define U32_PATTERN 0xA5A5A5A5
-
-/*
- * Stack_check_Create_extension
- */
-
-boolean Stack_check_Create_extension(
- Thread_Control *running,
- Thread_Control *the_thread
-);
-
-/*
- * Stack_check_Begin_extension
- */
-
-void Stack_check_Begin_extension(
- Thread_Control *the_thread
-);
-
-/*
- * Stack_check_Switch_extension
- */
-
-void Stack_check_Switch_extension(
- Thread_Control *running,
- Thread_Control *heir
-);
-
-/*
- * Stack_check_Fatal_extension
- */
-
-void Stack_check_Fatal_extension(
- Internal_errors_Source source,
- boolean is_internal,
- unsigned32 status
-);
-
-/*
- * Stack_check_Dump_usage
- */
-
-void Stack_check_Dump_usage( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/libmisc/stackchk/stackchk.h b/cpukit/libmisc/stackchk/stackchk.h
deleted file mode 100644
index e5caaf1285..0000000000
--- a/cpukit/libmisc/stackchk/stackchk.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/* stackchk.h
- *
- * This include file contains information necessary to utilize
- * and install the stack checker mechanism.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __STACK_CHECK_h
-#define __STACK_CHECK_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Stack_check_Initialize
- */
-
-void Stack_check_Initialize( void );
-
-/*
- * Stack_check_Dump_usage
- */
-
-void Stack_check_Dump_usage( void );
-
-/*
- * Stack_check_Create_extension
- */
-
-boolean Stack_check_Create_extension(
- Thread_Control *running,
- Thread_Control *the_thread
-);
-
-/*
- * Stack_check_Begin_extension
- */
-
-void Stack_check_Begin_extension(
- Thread_Control *the_thread
-);
-
-/*
- * Stack_check_Switch_extension
- */
-
-void Stack_check_Switch_extension(
- Thread_Control *running,
- Thread_Control *heir
-);
-
-/*
- * Extension set definition
- */
-
-#define STACK_CHECKER_EXTENSION \
-{ \
- Stack_check_Create_extension, /* rtems_task_create */ \
- 0, /* rtems_task_start */ \
- 0, /* rtems_task_restart */ \
- 0, /* rtems_task_delete */ \
- Stack_check_Switch_extension, /* task_switch */ \
- Stack_check_Begin_extension, /* task_begin */ \
- 0, /* task_exitted */ \
- 0 /* Stack_check_Fatal_extension */, /* fatal */ \
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/libmisc/untar/Makefile.am b/cpukit/libmisc/untar/Makefile.am
deleted file mode 100644
index 6bb36617a3..0000000000
--- a/cpukit/libmisc/untar/Makefile.am
+++ /dev/null
@@ -1,41 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-LIBNAME = libuntar-tmp
-LIB = $(ARCH)/$(LIBNAME).a
-
-C_FILES = untar.c
-C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
-
-H_FILES = untar.h
-
-OBJS = $(C_O_FILES)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../automake/lib.am
-
-$(PROJECT_INCLUDE)/rtems:
- @$(mkinstalldirs) $@
-$(PROJECT_INCLUDE)/rtems/%.h: %.h
- $(INSTALL_DATA) $< $@
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-$(LIB): $(OBJS)
- $(make-library)
-
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems \
- $(H_FILES:%=$(PROJECT_INCLUDE)/rtems/%)
-
-all-local: $(ARCH) $(PREINSTALL_FILES) $(OBJS) $(LIB)
-
-.PRECIOUS: $(LIB)
-
-EXTRA_DIST = README untar.c untar.h
-
-include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/libmisc/untar/README b/cpukit/libmisc/untar/README
deleted file mode 100644
index 24c9e7fa62..0000000000
--- a/cpukit/libmisc/untar/README
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-#
-# untar information
-#
-# Author: Jake Janovetz 7.6.1999
-#
-# $Id$
-#
-
-untar.c contains two procedures for extracting files from a UNIX
-tar file:
-
- int Untar_FromMemory(unsigned char *tar_buf, unsigned long size);
- int Untar_FromFile(char *tar_name);
-
-Untar_FromMemory(...) takes its input from a chunk of allocated memory.
-This is particularly useful when the tar is stored in Flash memory or
-comes from the FTP daemon by way of a hook.
-
-Untar_FromFile(...) is identical except the source is from an existing
-file. The fully qualified filename is passed through char *tar_name.
-
-
-
-BUGS: Please email janovetz@uiuc.edu
------
diff --git a/cpukit/libmisc/untar/untar.c b/cpukit/libmisc/untar/untar.c
deleted file mode 100644
index 60f1550c61..0000000000
--- a/cpukit/libmisc/untar/untar.c
+++ /dev/null
@@ -1,382 +0,0 @@
-/* FIXME:
- * 1. Symbolic links are not created.
- * 2. Untar_FromMemory has printfs.
- * 3. Untar_FromMemory uses FILE *fp.
- * 4. How to determine end of archive?
- *
- * Written by: Jake Janovetz <janovetz@tempest.ece.uiuc.edu>
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include "untar.h"
-
-
-/**************************************************************************
- * TAR file format:
- *
- * Offset Length Contents
- * 0 100 bytes File name ('\0' terminated, 99 maxmum length)
- * 100 8 bytes File mode (in octal ascii)
- * 108 8 bytes User ID (in octal ascii)
- * 116 8 bytes Group ID (in octal ascii)
- * 124 12 bytes File size (s) (in octal ascii)
- * 136 12 bytes Modify time (in octal ascii)
- * 148 8 bytes Header checksum (in octal ascii)
- * 156 1 bytes Link flag
- * 157 100 bytes Linkname ('\0' terminated, 99 maxmum length)
- * 257 8 bytes Magic ("ustar \0")
- * 265 32 bytes User name ('\0' terminated, 31 maxmum length)
- * 297 32 bytes Group name ('\0' terminated, 31 maxmum length)
- * 329 8 bytes Major device ID (in octal ascii)
- * 337 8 bytes Minor device ID (in octal ascii)
- * 345 167 bytes Padding
- * 512 (s+p)bytes File contents (s+p) := (((s) + 511) & ~511),
- * round up to 512 bytes
- *
- * Checksum:
- * int i, sum;
- * char* header = tar_header_pointer;
- * sum = 0;
- * for(i = 0; i < 512; i++)
- * sum += 0xFF & header[i];
- *************************************************************************/
-
-#define LF_OLDNORMAL '\0' /* Normal disk file, Unix compatible */
-#define LF_NORMAL '0' /* Normal disk file */
-#define LF_LINK '1' /* Link to previously dumped file */
-#define LF_SYMLINK '2' /* Symbolic link */
-#define LF_CHR '3' /* Character special file */
-#define LF_BLK '4' /* Block special file */
-#define LF_DIR '5' /* Directory */
-#define LF_FIFO '6' /* FIFO special file */
-#define LF_CONFIG '7' /* Contiguous file */
-
-#define MAX_NAME_FIELD_SIZE 99
-
-#define MIN(a,b) ((a)>(b)?(b):(a))
-
-
-/**************************************************************************
- * This converts octal ASCII number representations into an
- * unsigned long. Only support 32-bit numbers for now.
- *************************************************************************/
-static unsigned long
-octal2ulong(char *octascii, int len)
-{
- int i;
- unsigned long num;
- unsigned long mult;
-
- num = 0;
- mult = 1;
- for (i=len-1; i>=0; i--)
- {
- if ((octascii[i] < '0') || (octascii[i] > '9'))
- {
- continue;
- }
- num += mult*((unsigned long)(octascii[i] - '0'));
- mult *= 8;
- }
- return(num);
-}
-
-
-/**************************************************************************
- * Function: Untar_FromMemory *
- **************************************************************************
- * Description: *
- * *
- * This is a simple subroutine used to rip links, directories, and *
- * files out of a block of memory. *
- * *
- * *
- * Inputs: *
- * *
- * unsigned char *tar_buf - Pointer to TAR buffer. *
- * unsigned long size - Length of TAR buffer. *
- * *
- * *
- * Output: *
- * *
- * int - UNTAR_SUCCESSFUL (0) on successful completion. *
- * UNTAR_INVALID_CHECKSUM for an invalid header checksum. *
- * UNTAR_INVALID_HEADER for an invalid header. *
- * *
- **************************************************************************
- * Change History: *
- * 12/30/1998 - Creation (JWJ) *
- *************************************************************************/
-int
-Untar_FromMemory(unsigned char *tar_buf, unsigned long size)
-{
- FILE *fp;
- char *bufr;
- size_t n;
- char fname[100];
- char linkname[100];
- int sum;
- int hdr_chksum;
- int retval;
- unsigned long ptr;
- unsigned long i;
- unsigned long nblocks;
- unsigned long file_size;
- unsigned char linkflag;
-
-
- ptr = 0;
- while (1)
- {
- if (ptr + 512 > size)
- {
- retval = UNTAR_SUCCESSFUL;
- break;
- }
-
- /* Read the header */
- bufr = &tar_buf[ptr];
- ptr += 512;
- if (strncmp(&bufr[257], "ustar ", 7))
- {
- retval = UNTAR_SUCCESSFUL;
- break;
- }
-
- strncpy(fname, bufr, MAX_NAME_FIELD_SIZE);
- fname[MAX_NAME_FIELD_SIZE] = '\0';
-
- linkflag = bufr[156];
- file_size = octal2ulong(&bufr[124], 12);
-
- /******************************************************************
- * Compute the TAR checksum and check with the value in
- * the archive. The checksum is computed over the entire
- * header, but the checksum field is substituted with blanks.
- ******************************************************************/
- hdr_chksum = (int)octal2ulong(&bufr[148], 8);
- sum = 0;
- for (i=0; i<512; i++)
- {
- if ((i >= 148) && (i < 156))
- {
- sum += 0xff & ' ';
- }
- else
- {
- sum += 0xff & bufr[i];
- }
- }
- if (sum != hdr_chksum)
- {
- retval = UNTAR_INVALID_CHECKSUM;
- break;
- }
-
-
- /******************************************************************
- * We've decoded the header, now figure out what it contains and
- * do something with it.
- *****************************************************************/
- if (linkflag == LF_SYMLINK)
- {
- strncpy(linkname, &bufr[157], MAX_NAME_FIELD_SIZE);
- linkname[MAX_NAME_FIELD_SIZE] = '\0';
- /* symlink(fname, linkname); */
- }
- else if (linkflag == LF_NORMAL)
- {
- nblocks = (((file_size) + 511) & ~511) / 512;
- if ((fp = fopen(fname, "w")) == NULL)
- {
- printf("Untar failed to create file %s\n", fname);
- ptr += 512 * nblocks;
- }
- else
- {
- unsigned long sizeToGo = file_size;
- unsigned long len;
-
- /***************************************************************
- * Read out the data. There are nblocks of data where nblocks
- * is the file_size rounded to the nearest 512-byte boundary.
- **************************************************************/
- for (i=0; i<nblocks; i++)
- {
- len = ((sizeToGo < 512L)?(sizeToGo):(512L));
- n = fwrite(&tar_buf[ptr], 1, len, fp);
- if (n != len)
- {
- printf("Error during write\n");
- break;
- }
- ptr += 512;
- sizeToGo -= n;
- }
- fclose(fp);
- }
- }
- else if (linkflag == LF_DIR)
- {
- mkdir(fname, S_IRWXU | S_IRWXG | S_IRWXO);
- }
- }
-
- return(retval);
-}
-
-
-/**************************************************************************
- * Function: Untar_FromFile *
- **************************************************************************
- * Description: *
- * *
- * This is a simple subroutine used to rip links, directories, and *
- * files out of a TAR file. *
- * *
- * *
- * Inputs: *
- * *
- * char *tar_name - TAR filename. *
- * *
- * *
- * Output: *
- * *
- * int - UNTAR_SUCCESSFUL (0) on successful completion. *
- * UNTAR_INVALID_CHECKSUM for an invalid header checksum. *
- * UNTAR_INVALID_HEADER for an invalid header. *
- * *
- **************************************************************************
- * Change History: *
- * 12/30/1998 - Creation (JWJ) *
- *************************************************************************/
-int
-Untar_FromFile(char *tar_name)
-{
- int fd;
- char *bufr;
- size_t n;
- char fname[100];
- char linkname[100];
- int sum;
- int hdr_chksum;
- int retval;
- unsigned long i;
- unsigned long nblocks;
- unsigned long size;
- unsigned char linkflag;
-
-
- retval = UNTAR_SUCCESSFUL;
- bufr = (char *)malloc(512);
- if (bufr == NULL)
- {
- return(UNTAR_FAIL);
- }
-
- fd = open(tar_name, O_RDONLY);
- while (1)
- {
- /* Read the header */
- /* If the header read fails, we just consider it the end
- of the tarfile. */
- if ((n = read(fd, bufr, 512)) != 512)
- {
- break;
- }
-
- if (strncmp(&bufr[257], "ustar ", 7))
- {
- break;
- }
-
- strncpy(fname, bufr, MAX_NAME_FIELD_SIZE);
- fname[MAX_NAME_FIELD_SIZE] = '\0';
-
- linkflag = bufr[156];
- size = octal2ulong(&bufr[124], 12);
-
- /******************************************************************
- * Compute the TAR checksum and check with the value in
- * the archive. The checksum is computed over the entire
- * header, but the checksum field is substituted with blanks.
- ******************************************************************/
- hdr_chksum = (int)octal2ulong(&bufr[148], 8);
- sum = 0;
- for (i=0; i<512; i++)
- {
- if ((i >= 148) && (i < 156))
- {
- sum += 0xff & ' ';
- }
- else
- {
- sum += 0xff & bufr[i];
- }
- }
- if (sum != hdr_chksum)
- {
- retval = UNTAR_INVALID_CHECKSUM;
- break;
- }
-
-
- /******************************************************************
- * We've decoded the header, now figure out what it contains and
- * do something with it.
- *****************************************************************/
- if (linkflag == LF_SYMLINK)
- {
- strncpy(linkname, &bufr[157], MAX_NAME_FIELD_SIZE);
- linkname[MAX_NAME_FIELD_SIZE] = '\0';
- }
- else if (linkflag == LF_NORMAL)
- {
- int out_fd;
-
- /******************************************************************
- * Read out the data. There are nblocks of data where nblocks
- * is the size rounded to the nearest 512-byte boundary.
- *****************************************************************/
- nblocks = (((size) + 511) & ~511) / 512;
-
- if ((out_fd = creat(fname, 0644)) == -1)
- {
- for (i=0; i<nblocks; i++)
- {
- n = read(fd, bufr, 512);
- }
- }
- else
- {
- for (i=0; i<nblocks; i++)
- {
- n = read(fd, bufr, 512);
- n = MIN(n, size - i*512);
- write(out_fd, bufr, n);
- }
- close(out_fd);
- }
- }
- else if (linkflag == LF_DIR)
- {
- mkdir(fname, S_IRWXU | S_IRWXG | S_IRWXO);
- }
- }
- free(bufr);
- close(fd);
-
- return(retval);
-}
-
diff --git a/cpukit/libmisc/untar/untar.h b/cpukit/libmisc/untar/untar.h
deleted file mode 100644
index d8c5bcfc01..0000000000
--- a/cpukit/libmisc/untar/untar.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Written by: Jake Janovetz <janovetz@tempest.ece.uiuc.edu>
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __UNTAR_H__
-#define __UNTAR_H__
-
-
-#define UNTAR_SUCCESSFUL 0
-#define UNTAR_FAIL 1
-#define UNTAR_INVALID_CHECKSUM 2
-#define UNTAR_INVALID_HEADER 3
-
-
-int Untar_FromMemory(unsigned char *tar_buf, unsigned long size);
-int Untar_FromFile(char *tar_name);
-
-
-#endif /* __UNTAR_H__ */
diff --git a/cpukit/libmisc/wrapup/Makefile.am b/cpukit/libmisc/wrapup/Makefile.am
deleted file mode 100644
index 5d43b326b3..0000000000
--- a/cpukit/libmisc/wrapup/Makefile.am
+++ /dev/null
@@ -1,39 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-LIBNAME = libmisc
-LIB = $(ARCH)/$(LIBNAME).a
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../automake/lib.am
-
-TMP_LIBS = ../monitor/$(ARCH)/libmonitor-tmp.a \
- ../untar/$(ARCH)/libuntar-tmp.a ../stackchk/$(ARCH)/libstackchk-tmp.a \
- ../cpuuse/$(ARCH)/libcpuuse-tmp.a ../rtmonuse/$(ARCH)/librtmonuse-tmp.a \
- ../dumpbuf/$(ARCH)/libdumpbuf-tmp.a
-
-$(PROJECT_RELEASE)/lib/$(LIBNAME)$(LIB_VARIANT).a: $(LIB)
- $(INSTALL_DATA) $< $@
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-$(LIB): $(TMP_LIBS)
- $(RM) $@
- $(RM) -r $(ARCH)
- mkdir $(ARCH)
- cd $(ARCH); for lib in $^; do $(AR) -xv ../$$lib; done
- $(AR) ruv $@ $(ARCH)/*
- $(RANLIB) $@
-
-TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/$(LIBNAME)$(LIB_VARIANT).a
-
-all-local: $(ARCH) $(LIB) $(TMPINSTALL_FILES)
-
-.PRECIOUS: $(LIB)
-
-include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/libnetworking/Makefile.am b/cpukit/libnetworking/Makefile.am
deleted file mode 100644
index ce9cf6c399..0000000000
--- a/cpukit/libnetworking/Makefile.am
+++ /dev/null
@@ -1,15 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-
-SUBDIRS = include arpa kern machine sys vm lib libc net netinet nfs rtems \
- rtems_servers pppd rtems_webserver wrapup
-
-EXTRA_DIST = CHANGELOG bpfilter.h loop.h netdb.h opt_ipfw.h opt_mrouting.h \
- opt_tcpdebug.h poll.h resolv.h syslog.h
-
-include $(top_srcdir)/../../../automake/subdirs.am
-include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/libnetworking/README b/cpukit/libnetworking/README
deleted file mode 100644
index d0c22ec688..0000000000
--- a/cpukit/libnetworking/README
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# $Id$
-#
-
-This is a snapshot of my attempt to fit the FreeBSD networking code into
-RTEMS. Things seem to be working!
-
-Things that need to be done:
- 1) More documentation!
- 2) Figure out what's still not working :-)
- 3) Rationalize the include files. Right now I have a special
- hack in the Makefile to ensure that I pick up the FreeBSD versions
- of the include files that are duplicated between RTEMS
- and FreeBSD.
- The network device driver source should move to the BSP source tree.
- 4) Have a look at all the FIXME comments.
- 5) Go through and make sure that all the source files are
- free of undesired copyright restrictions.
diff --git a/cpukit/libnetworking/arpa/Makefile.am b/cpukit/libnetworking/arpa/Makefile.am
deleted file mode 100644
index dba97b83d5..0000000000
--- a/cpukit/libnetworking/arpa/Makefile.am
+++ /dev/null
@@ -1,9 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-EXTRA_DIST = ftp.h inet.h nameser.h nameser_compat.h telnet.h
-
-include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/libnetworking/arpa/ftp.h b/cpukit/libnetworking/arpa/ftp.h
deleted file mode 100644
index 584d290bc9..0000000000
--- a/cpukit/libnetworking/arpa/ftp.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright (c) 1983, 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ftp.h 8.1 (Berkeley) 6/2/93
- *
- * $Id$
- */
-
-#ifndef _ARPA_FTP_H_
-#define _ARPA_FTP_H_
-
-/* Definitions for FTP; see RFC-765. */
-
-/*
- * Reply codes.
- */
-#define PRELIM 1 /* positive preliminary */
-#define COMPLETE 2 /* positive completion */
-#define CONTINUE 3 /* positive intermediate */
-#define TRANSIENT 4 /* transient negative completion */
-#define ERROR 5 /* permanent negative completion */
-
-/*
- * Type codes
- */
-#define TYPE_A 1 /* ASCII */
-#define TYPE_E 2 /* EBCDIC */
-#define TYPE_I 3 /* image */
-#define TYPE_L 4 /* local byte size */
-
-#ifdef FTP_NAMES
-char *typenames[] = {"0", "ASCII", "EBCDIC", "Image", "Local" };
-#endif
-
-/*
- * Form codes
- */
-#define FORM_N 1 /* non-print */
-#define FORM_T 2 /* telnet format effectors */
-#define FORM_C 3 /* carriage control (ASA) */
-#ifdef FTP_NAMES
-char *formnames[] = {"0", "Nonprint", "Telnet", "Carriage-control" };
-#endif
-
-/*
- * Structure codes
- */
-#define STRU_F 1 /* file (no record structure) */
-#define STRU_R 2 /* record structure */
-#define STRU_P 3 /* page structure */
-#ifdef FTP_NAMES
-char *strunames[] = {"0", "File", "Record", "Page" };
-#endif
-
-/*
- * Mode types
- */
-#define MODE_S 1 /* stream */
-#define MODE_B 2 /* block */
-#define MODE_C 3 /* compressed */
-#ifdef FTP_NAMES
-char *modenames[] = {"0", "Stream", "Block", "Compressed" };
-#endif
-
-/*
- * Record Tokens
- */
-#define REC_ESC '\377' /* Record-mode Escape */
-#define REC_EOR '\001' /* Record-mode End-of-Record */
-#define REC_EOF '\002' /* Record-mode End-of-File */
-
-/*
- * Block Header
- */
-#define BLK_EOR 0x80 /* Block is End-of-Record */
-#define BLK_EOF 0x40 /* Block is End-of-File */
-#define BLK_ERRORS 0x20 /* Block is suspected of containing errors */
-#define BLK_RESTART 0x10 /* Block is Restart Marker */
-
-#define BLK_BYTECOUNT 2 /* Bytes in this block */
-
-#endif /* !_FTP_H_ */
diff --git a/cpukit/libnetworking/arpa/inet.h b/cpukit/libnetworking/arpa/inet.h
deleted file mode 100644
index ad5332e7ab..0000000000
--- a/cpukit/libnetworking/arpa/inet.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * -
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-/*
- * @(#)inet.h 8.1 (Berkeley) 6/2/93
- * From: Id: inet.h,v 8.5 1997/01/29 08:48:09 vixie Exp $
- * $Id$
- */
-
-#ifndef _ARPA_INET_H_
-#define _ARPA_INET_H_
-
-/* External definitions for functions in inet(3), addr2ascii(3) */
-
-#include <sys/types.h>
-#include <sys/cdefs.h>
-
-struct in_addr;
-
-#if 0 /* RTEMS -- Why rename these? */
-/* XXX all new diversions!! argh!! */
-#define inet_addr __inet_addr
-#define inet_aton __inet_aton
-#define inet_lnaof __inet_lnaof
-#define inet_makeaddr __inet_makeaddr
-#define inet_neta __inet_neta
-#define inet_netof __inet_netof
-#define inet_network __inet_network
-#define inet_net_ntop __inet_net_ntop
-#define inet_net_pton __inet_net_pton
-#define inet_ntoa __inet_ntoa
-#define inet_pton __inet_pton
-#define inet_ntop __inet_ntop
-#define inet_nsap_addr __inet_nsap_addr
-#define inet_nsap_ntoa __inet_nsap_ntoa
-#endif
-
-__BEGIN_DECLS
-int ascii2addr __P((int, const char *, void *));
-char *addr2ascii __P((int, const void *, int, char *));
-unsigned long inet_addr __P((const char *));
-int inet_aton __P((const char *, struct in_addr *));
-unsigned long inet_lnaof __P((struct in_addr));
-struct in_addr inet_makeaddr __P((u_long , u_long));
-char * inet_neta __P((u_long, char *, size_t));
-unsigned long inet_netof __P((struct in_addr));
-unsigned long inet_network __P((const char *));
-char *inet_net_ntop __P((int, const void *, int, char *, size_t));
-int inet_net_pton __P((int, const char *, void *, size_t));
-char *inet_ntoa __P((struct in_addr));
-int inet_pton __P((int, const char *, void *));
-const char *inet_ntop __P((int, const void *, char *, size_t));
-u_int inet_nsap_addr __P((const char *, u_char *, int));
-char *inet_nsap_ntoa __P((int, const u_char *, char *));
-__END_DECLS
-
-#endif /* !_INET_H_ */
diff --git a/cpukit/libnetworking/arpa/nameser.h b/cpukit/libnetworking/arpa/nameser.h
deleted file mode 100644
index 634dece37b..0000000000
--- a/cpukit/libnetworking/arpa/nameser.h
+++ /dev/null
@@ -1,448 +0,0 @@
-/*
- * Copyright (c) 1983, 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-/*
- * From: Id: nameser.h,v 8.16 1998/02/06 00:35:58 halley Exp
- * $Id$
- */
-
-#ifndef _ARPA_NAMESER_H_
-#define _ARPA_NAMESER_H_
-
-#define BIND_4_COMPAT
-
-#include <sys/types.h>
-#include <sys/cdefs.h>
-
-/*
- * revision information. this is the release date in YYYYMMDD format.
- * it can change every day so the right thing to do with it is use it
- * in preprocessor commands such as "#if (__NAMESER > 19931104)". do not
- * compare for equality; rather, use it to determine whether your libnameser.a
- * is new enough to contain a certain feature.
- */
-
-/* XXXRTH I made this bigger than __BIND in 4.9.5 T6B */
-#define __NAMESER 19961001 /* New interface version stamp. */
-
-/*
- * Define constants based on RFC 883, RFC 1034, RFC 1035
- */
-#define NS_PACKETSZ 512 /* maximum packet size */
-#define NS_MAXDNAME 1025 /* maximum domain name */
-#define NS_MAXCDNAME 255 /* maximum compressed domain name */
-#define NS_MAXLABEL 63 /* maximum length of domain label */
-#define NS_HFIXEDSZ 12 /* #/bytes of fixed data in header */
-#define NS_QFIXEDSZ 4 /* #/bytes of fixed data in query */
-#define NS_RRFIXEDSZ 10 /* #/bytes of fixed data in r record */
-#define NS_INT32SZ 4 /* #/bytes of data in a u_int32_t */
-#define NS_INT16SZ 2 /* #/bytes of data in a u_int16_t */
-#define NS_INT8SZ 1 /* #/bytes of data in a u_int8_t */
-#define NS_INADDRSZ 4 /* IPv4 T_A */
-#define NS_IN6ADDRSZ 16 /* IPv6 T_AAAA */
-#define NS_CMPRSFLGS 0xc0 /* Flag bits indicating name compression. */
-#define NS_DEFAULTPORT 53 /* For both TCP and UDP. */
-
-/*
- * These can be expanded with synonyms, just keep ns_parse.c:ns_parserecord()
- * in synch with it.
- */
-typedef enum __ns_sect {
- ns_s_qd = 0, /* Query: Question. */
- ns_s_zn = 0, /* Update: Zone. */
- ns_s_an = 1, /* Query: Answer. */
- ns_s_pr = 1, /* Update: Prerequisites. */
- ns_s_ns = 2, /* Query: Name servers. */
- ns_s_ud = 2, /* Update: Update. */
- ns_s_ar = 3, /* Query|Update: Additional records. */
- ns_s_max = 4
-} ns_sect;
-
-/*
- * This is a message handle. It is caller allocated and has no dynamic data.
- * This structure is intended to be opaque to all but ns_parse.c, thus the
- * leading _'s on the member names. Use the accessor functions, not the _'s.
- */
-typedef struct __ns_msg {
- const u_char *_msg, *_eom;
- u_int16_t _id, _flags, _counts[ns_s_max];
- const u_char *_sections[ns_s_max];
- ns_sect _sect;
- int _rrnum;
- const u_char *_ptr;
-} ns_msg;
-
-/* Private data structure - do not use from outside library. */
-struct _ns_flagdata { int mask, shift; };
-extern struct _ns_flagdata _ns_flagdata[];
-
-/* Accessor macros - this is part of the public interface. */
-#define ns_msg_getflag(handle, flag) ( \
- ((handle)._flags & _ns_flagdata[flag].mask) \
- >> _ns_flagdata[flag].shift \
- )
-#define ns_msg_id(handle) ((handle)._id + 0)
-#define ns_msg_base(handle) ((handle)._msg + 0)
-#define ns_msg_end(handle) ((handle)._eom + 0)
-#define ns_msg_size(handle) ((handle)._eom - (handle)._msg)
-#define ns_msg_count(handle, section) ((handle)._counts[section] + 0)
-
-/*
- * This is a parsed record. It is caller allocated and has no dynamic data.
- */
-typedef struct __ns_rr {
- char name[NS_MAXDNAME]; /* XXX need to malloc */
- u_int16_t type;
- u_int16_t class;
- u_int32_t ttl;
- u_int16_t rdlength;
- const u_char *rdata;
-} ns_rr;
-
-/* Accessor macros - this is part of the public interface. */
-#define ns_rr_name(rr) (((rr).name[0] != '\0') ? (rr).name : ".")
-#define ns_rr_type(rr) ((rr).type + 0)
-#define ns_rr_class(rr) ((rr).class + 0)
-#define ns_rr_ttl(rr) ((rr).ttl + 0)
-#define ns_rr_rdlen(rr) ((rr).rdlength + 0)
-#define ns_rr_rdata(rr) ((rr).rdata + 0)
-
-/*
- * These don't have to be in the same order as in the packet flags word,
- * and they can even overlap in some cases, but they will need to be kept
- * in synch with ns_parse.c:ns_flagdata[].
- */
-typedef enum __ns_flag {
- ns_f_qr, /* Question/Response. */
- ns_f_opcode, /* Operation code. */
- ns_f_aa, /* Authoritative Answer. */
- ns_f_tc, /* Truncation occurred. */
- ns_f_rd, /* Recursion Desired. */
- ns_f_ra, /* Recursion Available. */
- ns_f_z, /* MBZ. */
- ns_f_ad, /* Authentic Data (DNSSEC). */
- ns_f_cd, /* Checking Disabled (DNSSEC). */
- ns_f_rcode, /* Response code. */
- ns_f_max
-} ns_flag;
-
-/*
- * Currently defined opcodes.
- */
-typedef enum __ns_opcode {
- ns_o_query = 0, /* Standard query. */
- ns_o_iquery = 1, /* Inverse query (deprecated/unsupported). */
- ns_o_status = 2, /* Name server status query (unsupported). */
- /* Opcode 3 is undefined/reserved. */
- ns_o_notify = 4, /* Zone change notification. */
- ns_o_update = 5, /* Zone update message. */
- ns_o_max = 6
-} ns_opcode;
-
-/*
- * Currently defined response codes.
- */
-typedef enum __ns_rcode {
- ns_r_noerror = 0, /* No error occurred. */
- ns_r_formerr = 1, /* Format error. */
- ns_r_servfail = 2, /* Server failure. */
- ns_r_nxdomain = 3, /* Name error. */
- ns_r_notimpl = 4, /* Unimplemented. */
- ns_r_refused = 5, /* Operation refused. */
- /* these are for BIND_UPDATE */
- ns_r_yxdomain = 6, /* Name exists */
- ns_r_yxrrset = 7, /* RRset exists */
- ns_r_nxrrset = 8, /* RRset does not exist */
- ns_r_notauth = 9, /* Not authoritative for zone */
- ns_r_notzone = 10, /* Zone of record different from zone section */
- ns_r_max = 11
-} ns_rcode;
-
-/* BIND_UPDATE */
-typedef enum __ns_update_operation {
- ns_uop_delete = 0,
- ns_uop_add = 1,
- ns_uop_max = 2
-} ns_update_operation;
-
-/*
- * This RR-like structure is particular to UPDATE.
- */
-struct ns_updrec {
- struct ns_updrec *r_prev; /* prev record */
- struct ns_updrec *r_next; /* next record */
- u_int8_t r_section; /* ZONE/PREREQUISITE/UPDATE */
- char * r_dname; /* owner of the RR */
- u_int16_t r_class; /* class number */
- u_int16_t r_type; /* type number */
- u_int32_t r_ttl; /* time to live */
- u_char * r_data; /* rdata fields as text string */
- u_int16_t r_size; /* size of r_data field */
- int r_opcode; /* type of operation */
- /* following fields for private use by the resolver/server routines */
- struct ns_updrec *r_grpnext; /* next record when grouped */
- struct databuf *r_dp; /* databuf to process */
- struct databuf *r_deldp; /* databuf's deleted/overwritten */
- u_int16_t r_zone; /* zone number on server */
-};
-typedef struct ns_updrec ns_updrec;
-
-/*
- * Currently defined type values for resources and queries.
- */
-typedef enum __ns_type {
- ns_t_a = 1, /* Host address. */
- ns_t_ns = 2, /* Authoritative server. */
- ns_t_md = 3, /* Mail destination. */
- ns_t_mf = 4, /* Mail forwarder. */
- ns_t_cname = 5, /* Canonical name. */
- ns_t_soa = 6, /* Start of authority zone. */
- ns_t_mb = 7, /* Mailbox domain name. */
- ns_t_mg = 8, /* Mail group member. */
- ns_t_mr = 9, /* Mail rename name. */
- ns_t_null = 10, /* Null resource record. */
- ns_t_wks = 11, /* Well known service. */
- ns_t_ptr = 12, /* Domain name pointer. */
- ns_t_hinfo = 13, /* Host information. */
- ns_t_minfo = 14, /* Mailbox information. */
- ns_t_mx = 15, /* Mail routing information. */
- ns_t_txt = 16, /* Text strings. */
- ns_t_rp = 17, /* Responsible person. */
- ns_t_afsdb = 18, /* AFS cell database. */
- ns_t_x25 = 19, /* X_25 calling address. */
- ns_t_isdn = 20, /* ISDN calling address. */
- ns_t_rt = 21, /* Router. */
- ns_t_nsap = 22, /* NSAP address. */
- ns_t_nsap_ptr = 23, /* Reverse NSAP lookup (deprecated). */
- ns_t_sig = 24, /* Security signature. */
- ns_t_key = 25, /* Security key. */
- ns_t_px = 26, /* X.400 mail mapping. */
- ns_t_gpos = 27, /* Geographical position (withdrawn). */
- ns_t_aaaa = 28, /* Ip6 Address. */
- ns_t_loc = 29, /* Location Information. */
- ns_t_nxt = 30, /* Next domain (security). */
- ns_t_eid = 31, /* Endpoint identifier. */
- ns_t_nimloc = 32, /* Nimrod Locator. */
- ns_t_srv = 33, /* Server Selection. */
- ns_t_atma = 34, /* ATM Address */
- ns_t_naptr = 35, /* Naming Authority PoinTeR */
- /* Query type values which do not appear in resource records. */
- ns_t_ixfr = 251, /* Incremental zone transfer. */
- ns_t_axfr = 252, /* Transfer zone of authority. */
- ns_t_mailb = 253, /* Transfer mailbox records. */
- ns_t_maila = 254, /* Transfer mail agent records. */
- ns_t_any = 255, /* Wildcard match. */
- ns_t_max = 65536
-} ns_type;
-
-/*
- * Values for class field
- */
-typedef enum __ns_class {
- ns_c_in = 1, /* Internet. */
- /* Class 2 unallocated/unsupported. */
- ns_c_chaos = 3, /* MIT Chaos-net. */
- ns_c_hs = 4, /* MIT Hesiod. */
- /* Query class values which do not appear in resource records */
- ns_c_none = 254, /* for prereq. sections in update requests */
- ns_c_any = 255, /* Wildcard match. */
- ns_c_max = 65536
-} ns_class;
-
-/*
- * Flags field of the KEY RR rdata
- */
-#define NS_KEY_TYPEMASK 0xC000 /* Mask for "type" bits */
-#define NS_KEY_TYPE_AUTH_CONF 0x0000 /* Key usable for both */
-#define NS_KEY_TYPE_CONF_ONLY 0x8000 /* Key usable for confidentiality */
-#define NS_KEY_TYPE_AUTH_ONLY 0x4000 /* Key usable for authentication */
-#define NS_KEY_TYPE_NO_KEY 0xC000 /* No key usable for either; no key */
-/* The type bits can also be interpreted independently, as single bits: */
-#define NS_KEY_NO_AUTH 0x8000 /* Key unusable for authentication */
-#define NS_KEY_NO_CONF 0x4000 /* Key unusable for confidentiality */
-#define NS_KEY_EXPERIMENTAL 0x2000 /* Security is *mandatory* if bit=0 */
-#define NS_KEY_RESERVED3 0x1000 /* reserved - must be zero */
-#define NS_KEY_RESERVED4 0x0800 /* reserved - must be zero */
-#define NS_KEY_USERACCOUNT 0x0400 /* key is assoc. with a user acct */
-#define NS_KEY_ENTITY 0x0200 /* key is assoc. with entity eg host */
-#define NS_KEY_ZONEKEY 0x0100 /* key is zone key */
-#define NS_KEY_IPSEC 0x0080 /* key is for IPSEC (host or user)*/
-#define NS_KEY_EMAIL 0x0040 /* key is for email (MIME security) */
-#define NS_KEY_RESERVED10 0x0020 /* reserved - must be zero */
-#define NS_KEY_RESERVED11 0x0010 /* reserved - must be zero */
-#define NS_KEY_SIGNATORYMASK 0x000F /* key can sign RR's of same name */
-
-#define NS_KEY_RESERVED_BITMASK ( NS_KEY_RESERVED3 | \
- NS_KEY_RESERVED4 | \
- NS_KEY_RESERVED10 | \
- NS_KEY_RESERVED11 )
-
-/* The Algorithm field of the KEY and SIG RR's is an integer, {1..254} */
-#define NS_ALG_MD5RSA 1 /* MD5 with RSA */
-#define NS_ALG_EXPIRE_ONLY 253 /* No alg, no security */
-#define NS_ALG_PRIVATE_OID 254 /* Key begins with OID giving alg */
-
-/* Signatures */
-#define NS_MD5RSA_MIN_BITS 512 /* Size of a mod or exp in bits */
-#define NS_MD5RSA_MAX_BITS 2552
- /* Total of binary mod and exp */
-#define NS_MD5RSA_MAX_BYTES ((NS_MD5RSA_MAX_BITS+7/8)*2+3)
- /* Max length of text sig block */
-#define NS_MD5RSA_MAX_BASE64 (((NS_MD5RSA_MAX_BYTES+2)/3)*4)
-
-/* Offsets into SIG record rdata to find various values */
-#define NS_SIG_TYPE 0 /* Type flags */
-#define NS_SIG_ALG 2 /* Algorithm */
-#define NS_SIG_LABELS 3 /* How many labels in name */
-#define NS_SIG_OTTL 4 /* Original TTL */
-#define NS_SIG_EXPIR 8 /* Expiration time */
-#define NS_SIG_SIGNED 12 /* Signature time */
-#define NS_SIG_FOOT 16 /* Key footprint */
-#define NS_SIG_SIGNER 18 /* Domain name of who signed it */
-
-/* How RR types are represented as bit-flags in NXT records */
-#define NS_NXT_BITS 8
-#define NS_NXT_BIT_SET( n,p) (p[(n)/NS_NXT_BITS] |= (0x80>>((n)%NS_NXT_BITS)))
-#define NS_NXT_BIT_CLEAR(n,p) (p[(n)/NS_NXT_BITS] &= ~(0x80>>((n)%NS_NXT_BITS)))
-#define NS_NXT_BIT_ISSET(n,p) (p[(n)/NS_NXT_BITS] & (0x80>>((n)%NS_NXT_BITS)))
-
-
-/*
- * Inline versions of get/put short/long. Pointer is advanced.
- */
-#define NS_GET16(s, cp) { \
- register u_char *t_cp = (u_char *)(cp); \
- (s) = ((u_int16_t)t_cp[0] << 8) \
- | ((u_int16_t)t_cp[1]) \
- ; \
- (cp) += NS_INT16SZ; \
-}
-
-#define NS_GET32(l, cp) { \
- register u_char *t_cp = (u_char *)(cp); \
- (l) = ((u_int32_t)t_cp[0] << 24) \
- | ((u_int32_t)t_cp[1] << 16) \
- | ((u_int32_t)t_cp[2] << 8) \
- | ((u_int32_t)t_cp[3]) \
- ; \
- (cp) += NS_INT32SZ; \
-}
-
-#define NS_PUT16(s, cp) { \
- register u_int16_t t_s = (u_int16_t)(s); \
- register u_char *t_cp = (u_char *)(cp); \
- *t_cp++ = t_s >> 8; \
- *t_cp = t_s; \
- (cp) += NS_INT16SZ; \
-}
-
-#define NS_PUT32(l, cp) { \
- register u_int32_t t_l = (u_int32_t)(l); \
- register u_char *t_cp = (u_char *)(cp); \
- *t_cp++ = t_l >> 24; \
- *t_cp++ = t_l >> 16; \
- *t_cp++ = t_l >> 8; \
- *t_cp = t_l; \
- (cp) += NS_INT32SZ; \
-}
-
-/*
- * ANSI C identifier hiding.
- */
-#define ns_get16 __ns_get16
-#define ns_get32 __ns_get32
-#define ns_put16 __ns_put16
-#define ns_put32 __ns_put32
-#define ns_initparse __ns_initparse
-#define ns_parserr __ns_parserr
-#define ns_sprintrr __ns_sprintrr
-#define ns_sprintrrf __ns_sprintrrf
-#define ns_format_ttl __ns_format_ttl
-#define ns_parse_ttl __ns_parse_ttl
-#define ns_name_ntop __ns_name_ntop
-#define ns_name_pton __ns_name_pton
-#define ns_name_unpack __ns_name_unpack
-#define ns_name_pack __ns_name_pack
-#define ns_name_compress __ns_name_compress
-#define ns_name_uncompress __ns_name_uncompress
-
-__BEGIN_DECLS
-u_int ns_get16 __P((const u_char *));
-u_long ns_get32 __P((const u_char *));
-void ns_put16 __P((u_int, u_char *));
-void ns_put32 __P((u_long, u_char *));
-int ns_initparse __P((const u_char *, int, ns_msg *));
-int ns_parserr __P((ns_msg *, ns_sect, int, ns_rr *));
-int ns_sprintrr __P((const ns_msg *, const ns_rr *,
- const char *, const char *, char *, size_t));
-int ns_sprintrrf __P((const u_char *, size_t, const char *,
- ns_class, ns_type, u_long, const u_char *,
- size_t, const char *, const char *,
- char *, size_t));
-int ns_format_ttl __P((u_long, char *, size_t));
-int ns_parse_ttl __P((const char *, u_long *));
-int ns_name_ntop __P((const u_char *, char *, size_t));
-int ns_name_pton __P((const char *, u_char *, size_t));
-int ns_name_unpack __P((const u_char *, const u_char *,
- const u_char *, u_char *, size_t));
-int ns_name_pack __P((const u_char *, u_char *, int,
- const u_char **, const u_char **));
-int ns_name_uncompress __P((const u_char *, const u_char *,
- const u_char *, char *, size_t));
-int ns_name_compress __P((const char *, u_char *, size_t,
- const u_char **, const u_char **));
-int ns_name_skip __P((const u_char **, const u_char *));
-__END_DECLS
-
-#ifdef BIND_4_COMPAT
-#include <arpa/nameser_compat.h>
-#endif
-
-#endif /* !_ARPA_NAMESER_H_ */
diff --git a/cpukit/libnetworking/arpa/nameser_compat.h b/cpukit/libnetworking/arpa/nameser_compat.h
deleted file mode 100644
index 2ab5b47386..0000000000
--- a/cpukit/libnetworking/arpa/nameser_compat.h
+++ /dev/null
@@ -1,194 +0,0 @@
-/* Copyright (c) 1983, 1989
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * from nameser.h 8.1 (Berkeley) 6/2/93
- * From: Id: nameser_compat.h,v 8.9 1998/03/20 23:25:10 halley Exp
- * $Id$
- */
-
-#ifndef _ARPA_NAMESER_COMPAT_
-#define _ARPA_NAMESER_COMPAT_
-
-#define __BIND 19950621 /* (DEAD) interface version stamp. */
-
-#include <machine/endian.h>
-
-#if !defined(BYTE_ORDER) || \
- (BYTE_ORDER != BIG_ENDIAN && BYTE_ORDER != LITTLE_ENDIAN && \
- BYTE_ORDER != PDP_ENDIAN)
- /* you must determine what the correct bit order is for
- * your compiler - the next line is an intentional error
- * which will force your compiles to bomb until you fix
- * the above macros.
- */
- error "Undefined or invalid BYTE_ORDER";
-#endif
-
-/*
- * Structure for query header. The order of the fields is machine- and
- * compiler-dependent, depending on the byte/bit order and the layout
- * of bit fields. We use bit fields only in int variables, as this
- * is all ANSI requires. This requires a somewhat confusing rearrangement.
- */
-
-typedef struct {
- unsigned id :16; /* query identification number */
-#if BYTE_ORDER == BIG_ENDIAN
- /* fields in third byte */
- unsigned qr: 1; /* response flag */
- unsigned opcode: 4; /* purpose of message */
- unsigned aa: 1; /* authoritive answer */
- unsigned tc: 1; /* truncated message */
- unsigned rd: 1; /* recursion desired */
- /* fields in fourth byte */
- unsigned ra: 1; /* recursion available */
- unsigned unused :1; /* unused bits (MBZ as of 4.9.3a3) */
- unsigned ad: 1; /* authentic data from named */
- unsigned cd: 1; /* checking disabled by resolver */
- unsigned rcode :4; /* response code */
-#endif
-#if BYTE_ORDER == LITTLE_ENDIAN || BYTE_ORDER == PDP_ENDIAN
- /* fields in third byte */
- unsigned rd :1; /* recursion desired */
- unsigned tc :1; /* truncated message */
- unsigned aa :1; /* authoritive answer */
- unsigned opcode :4; /* purpose of message */
- unsigned qr :1; /* response flag */
- /* fields in fourth byte */
- unsigned rcode :4; /* response code */
- unsigned cd: 1; /* checking disabled by resolver */
- unsigned ad: 1; /* authentic data from named */
- unsigned unused :1; /* unused bits (MBZ as of 4.9.3a3) */
- unsigned ra :1; /* recursion available */
-#endif
- /* remaining bytes */
- unsigned qdcount :16; /* number of question entries */
- unsigned ancount :16; /* number of answer entries */
- unsigned nscount :16; /* number of authority entries */
- unsigned arcount :16; /* number of resource entries */
-} HEADER;
-
-#define PACKETSZ NS_PACKETSZ
-#define MAXDNAME NS_MAXDNAME
-#define MAXCDNAME NS_MAXCDNAME
-#define MAXLABEL NS_MAXLABEL
-#define HFIXEDSZ NS_HFIXEDSZ
-#define QFIXEDSZ NS_QFIXEDSZ
-#define RRFIXEDSZ NS_RRFIXEDSZ
-#define INT32SZ NS_INT32SZ
-#define INT16SZ NS_INT16SZ
-#define INADDRSZ NS_INADDRSZ
-#define IN6ADDRSZ NS_IN6ADDRSZ
-#define INDIR_MASK NS_CMPRSFLGS
-#define NAMESERVER_PORT NS_DEFAULTPORT
-
-#define S_ZONE ns_s_zn
-#define S_PREREQ ns_s_pr
-#define S_UPDATE ns_s_ud
-#define S_ADDT ns_s_ar
-
-#define QUERY ns_o_query
-#define IQUERY ns_o_iquery
-#define STATUS ns_o_status
-#define NS_NOTIFY_OP ns_o_notify
-#define NS_UPDATE_OP ns_o_update
-
-#define NOERROR ns_r_noerror
-#define FORMERR ns_r_formerr
-#define SERVFAIL ns_r_servfail
-#define NXDOMAIN ns_r_nxdomain
-#define NOTIMP ns_r_notimpl
-#define REFUSED ns_r_refused
-#define YXDOMAIN ns_r_yxdomain
-#define YXRRSET ns_r_yxrrset
-#define NXRRSET ns_r_nxrrset
-#define NOTAUTH ns_r_notauth
-#define NOTZONE ns_r_notzone
-
-#define DELETE ns_uop_delete
-#define ADD ns_uop_add
-
-#define T_A ns_t_a
-#define T_NS ns_t_ns
-#define T_MD ns_t_md
-#define T_MF ns_t_mf
-#define T_CNAME ns_t_cname
-#define T_SOA ns_t_soa
-#define T_MB ns_t_mb
-#define T_MG ns_t_mg
-#define T_MR ns_t_mr
-#define T_NULL ns_t_null
-#define T_WKS ns_t_wks
-#define T_PTR ns_t_ptr
-#define T_HINFO ns_t_hinfo
-#define T_MINFO ns_t_minfo
-#define T_MX ns_t_mx
-#define T_TXT ns_t_txt
-#define T_RP ns_t_rp
-#define T_AFSDB ns_t_afsdb
-#define T_X25 ns_t_x25
-#define T_ISDN ns_t_isdn
-#define T_RT ns_t_rt
-#define T_NSAP ns_t_nsap
-#define T_NSAP_PTR ns_t_nsap_ptr
-#define T_SIG ns_t_sig
-#define T_KEY ns_t_key
-#define T_PX ns_t_px
-#define T_GPOS ns_t_gpos
-#define T_AAAA ns_t_aaaa
-#define T_LOC ns_t_loc
-#define T_NXT ns_t_nxt
-#define T_EID ns_t_eid
-#define T_NIMLOC ns_t_nimloc
-#define T_SRV ns_t_srv
-#define T_ATMA ns_t_atma
-#define T_NAPTR ns_t_naptr
-#define T_IXFR ns_t_ixfr
-#define T_AXFR ns_t_axfr
-#define T_MAILB ns_t_mailb
-#define T_MAILA ns_t_maila
-#define T_ANY ns_t_any
-
-#define C_IN ns_c_in
-#define C_CHAOS ns_c_chaos
-#define C_HS ns_c_hs
-/* BIND_UPDATE */
-#define C_NONE ns_c_none
-#define C_ANY ns_c_any
-
-#define GETSHORT NS_GET16
-#define GETLONG NS_GET32
-#define PUTSHORT NS_PUT16
-#define PUTLONG NS_PUT32
-
-#endif /* _ARPA_NAMESER_COMPAT_ */
diff --git a/cpukit/libnetworking/arpa/telnet.h b/cpukit/libnetworking/arpa/telnet.h
deleted file mode 100644
index 09b85692da..0000000000
--- a/cpukit/libnetworking/arpa/telnet.h
+++ /dev/null
@@ -1,342 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)telnet.h 8.2 (Berkeley) 12/15/93
- *
- * $Id$
- */
-
-#ifndef _ARPA_TELNET_H_
-#define _ARPA_TELNET_H_
-
-/*
- * Definitions for the TELNET protocol.
- */
-#define IAC 255 /* interpret as command: */
-#define DONT 254 /* you are not to use option */
-#define DO 253 /* please, you use option */
-#define WONT 252 /* I won't use option */
-#define WILL 251 /* I will use option */
-#define SB 250 /* interpret as subnegotiation */
-#define GA 249 /* you may reverse the line */
-#define EL 248 /* erase the current line */
-#define EC 247 /* erase the current character */
-#define AYT 246 /* are you there */
-#define AO 245 /* abort output--but let prog finish */
-#define IP 244 /* interrupt process--permanently */
-#define BREAK 243 /* break */
-#define DM 242 /* data mark--for connect. cleaning */
-#define NOP 241 /* nop */
-#define SE 240 /* end sub negotiation */
-#define EOR 239 /* end of record (transparent mode) */
-#define ABORT 238 /* Abort process */
-#define SUSP 237 /* Suspend process */
-#define xEOF 236 /* End of file: EOF is already used... */
-
-#define SYNCH 242 /* for telfunc calls */
-
-#ifdef TELCMDS
-char *telcmds[] = {
- "EOF", "SUSP", "ABORT", "EOR",
- "SE", "NOP", "DMARK", "BRK", "IP", "AO", "AYT", "EC",
- "EL", "GA", "SB", "WILL", "WONT", "DO", "DONT", "IAC",
- 0
-};
-#else
-extern char *telcmds[];
-#endif
-
-#define TELCMD_FIRST xEOF
-#define TELCMD_LAST IAC
-#define TELCMD_OK(x) ((unsigned int)(x) <= TELCMD_LAST && \
- (unsigned int)(x) >= TELCMD_FIRST)
-#define TELCMD(x) telcmds[(x)-TELCMD_FIRST]
-
-/* telnet options */
-#define TELOPT_BINARY 0 /* 8-bit data path */
-#define TELOPT_ECHO 1 /* echo */
-#define TELOPT_RCP 2 /* prepare to reconnect */
-#define TELOPT_SGA 3 /* suppress go ahead */
-#define TELOPT_NAMS 4 /* approximate message size */
-#define TELOPT_STATUS 5 /* give status */
-#define TELOPT_TM 6 /* timing mark */
-#define TELOPT_RCTE 7 /* remote controlled transmission and echo */
-#define TELOPT_NAOL 8 /* negotiate about output line width */
-#define TELOPT_NAOP 9 /* negotiate about output page size */
-#define TELOPT_NAOCRD 10 /* negotiate about CR disposition */
-#define TELOPT_NAOHTS 11 /* negotiate about horizontal tabstops */
-#define TELOPT_NAOHTD 12 /* negotiate about horizontal tab disposition */
-#define TELOPT_NAOFFD 13 /* negotiate about formfeed disposition */
-#define TELOPT_NAOVTS 14 /* negotiate about vertical tab stops */
-#define TELOPT_NAOVTD 15 /* negotiate about vertical tab disposition */
-#define TELOPT_NAOLFD 16 /* negotiate about output LF disposition */
-#define TELOPT_XASCII 17 /* extended ascic character set */
-#define TELOPT_LOGOUT 18 /* force logout */
-#define TELOPT_BM 19 /* byte macro */
-#define TELOPT_DET 20 /* data entry terminal */
-#define TELOPT_SUPDUP 21 /* supdup protocol */
-#define TELOPT_SUPDUPOUTPUT 22 /* supdup output */
-#define TELOPT_SNDLOC 23 /* send location */
-#define TELOPT_TTYPE 24 /* terminal type */
-#define TELOPT_EOR 25 /* end or record */
-#define TELOPT_TUID 26 /* TACACS user identification */
-#define TELOPT_OUTMRK 27 /* output marking */
-#define TELOPT_TTYLOC 28 /* terminal location number */
-#define TELOPT_3270REGIME 29 /* 3270 regime */
-#define TELOPT_X3PAD 30 /* X.3 PAD */
-#define TELOPT_NAWS 31 /* window size */
-#define TELOPT_TSPEED 32 /* terminal speed */
-#define TELOPT_LFLOW 33 /* remote flow control */
-#define TELOPT_LINEMODE 34 /* Linemode option */
-#define TELOPT_XDISPLOC 35 /* X Display Location */
-#define TELOPT_OLD_ENVIRON 36 /* Old - Environment variables */
-#define TELOPT_AUTHENTICATION 37/* Authenticate */
-#define TELOPT_ENCRYPT 38 /* Encryption option */
-#define TELOPT_NEW_ENVIRON 39 /* New - Environment variables */
-#define TELOPT_EXOPL 255 /* extended-options-list */
-
-
-#define NTELOPTS (1+TELOPT_NEW_ENVIRON)
-#ifdef TELOPTS
-char *telopts[NTELOPTS+1] = {
- "BINARY", "ECHO", "RCP", "SUPPRESS GO AHEAD", "NAME",
- "STATUS", "TIMING MARK", "RCTE", "NAOL", "NAOP",
- "NAOCRD", "NAOHTS", "NAOHTD", "NAOFFD", "NAOVTS",
- "NAOVTD", "NAOLFD", "EXTEND ASCII", "LOGOUT", "BYTE MACRO",
- "DATA ENTRY TERMINAL", "SUPDUP", "SUPDUP OUTPUT",
- "SEND LOCATION", "TERMINAL TYPE", "END OF RECORD",
- "TACACS UID", "OUTPUT MARKING", "TTYLOC",
- "3270 REGIME", "X.3 PAD", "NAWS", "TSPEED", "LFLOW",
- "LINEMODE", "XDISPLOC", "OLD-ENVIRON", "AUTHENTICATION",
- "ENCRYPT", "NEW-ENVIRON",
- 0
-};
-#define TELOPT_FIRST TELOPT_BINARY
-#define TELOPT_LAST TELOPT_NEW_ENVIRON
-#define TELOPT_OK(x) ((unsigned int)(x) <= TELOPT_LAST)
-#define TELOPT(x) telopts[(x)-TELOPT_FIRST]
-#endif
-
-/* sub-option qualifiers */
-#define TELQUAL_IS 0 /* option is... */
-#define TELQUAL_SEND 1 /* send option */
-#define TELQUAL_INFO 2 /* ENVIRON: informational version of IS */
-#define TELQUAL_REPLY 2 /* AUTHENTICATION: client version of IS */
-#define TELQUAL_NAME 3 /* AUTHENTICATION: client version of IS */
-
-#define LFLOW_OFF 0 /* Disable remote flow control */
-#define LFLOW_ON 1 /* Enable remote flow control */
-#define LFLOW_RESTART_ANY 2 /* Restart output on any char */
-#define LFLOW_RESTART_XON 3 /* Restart output only on XON */
-
-/*
- * LINEMODE suboptions
- */
-
-#define LM_MODE 1
-#define LM_FORWARDMASK 2
-#define LM_SLC 3
-
-#define MODE_EDIT 0x01
-#define MODE_TRAPSIG 0x02
-#define MODE_ACK 0x04
-#define MODE_SOFT_TAB 0x08
-#define MODE_LIT_ECHO 0x10
-
-#define MODE_MASK 0x1f
-
-/* Not part of protocol, but needed to simplify things... */
-#define MODE_FLOW 0x0100
-#define MODE_ECHO 0x0200
-#define MODE_INBIN 0x0400
-#define MODE_OUTBIN 0x0800
-#define MODE_FORCE 0x1000
-
-#define SLC_SYNCH 1
-#define SLC_BRK 2
-#define SLC_IP 3
-#define SLC_AO 4
-#define SLC_AYT 5
-#define SLC_EOR 6
-#define SLC_ABORT 7
-#define SLC_EOF 8
-#define SLC_SUSP 9
-#define SLC_EC 10
-#define SLC_EL 11
-#define SLC_EW 12
-#define SLC_RP 13
-#define SLC_LNEXT 14
-#define SLC_XON 15
-#define SLC_XOFF 16
-#define SLC_FORW1 17
-#define SLC_FORW2 18
-#define SLC_MCL 19
-#define SLC_MCR 20
-#define SLC_MCWL 21
-#define SLC_MCWR 22
-#define SLC_MCBOL 23
-#define SLC_MCEOL 24
-#define SLC_INSRT 25
-#define SLC_OVER 26
-#define SLC_ECR 27
-#define SLC_EWR 28
-#define SLC_EBOL 29
-#define SLC_EEOL 30
-
-#define NSLC 30
-
-/*
- * For backwards compatability, we define SLC_NAMES to be the
- * list of names if SLC_NAMES is not defined.
- */
-#define SLC_NAMELIST "0", "SYNCH", "BRK", "IP", "AO", "AYT", "EOR", \
- "ABORT", "EOF", "SUSP", "EC", "EL", "EW", "RP", \
- "LNEXT", "XON", "XOFF", "FORW1", "FORW2", \
- "MCL", "MCR", "MCWL", "MCWR", "MCBOL", \
- "MCEOL", "INSRT", "OVER", "ECR", "EWR", \
- "EBOL", "EEOL", \
- 0
-
-#ifdef SLC_NAMES
-char *slc_names[] = {
- SLC_NAMELIST
-};
-#else
-extern char *slc_names[];
-#define SLC_NAMES SLC_NAMELIST
-#endif
-
-#define SLC_NAME_OK(x) ((unsigned int)(x) <= NSLC)
-#define SLC_NAME(x) slc_names[x]
-
-#define SLC_NOSUPPORT 0
-#define SLC_CANTCHANGE 1
-#define SLC_VARIABLE 2
-#define SLC_DEFAULT 3
-#define SLC_LEVELBITS 0x03
-
-#define SLC_FUNC 0
-#define SLC_FLAGS 1
-#define SLC_VALUE 2
-
-#define SLC_ACK 0x80
-#define SLC_FLUSHIN 0x40
-#define SLC_FLUSHOUT 0x20
-
-#define OLD_ENV_VAR 1
-#define OLD_ENV_VALUE 0
-#define NEW_ENV_VAR 0
-#define NEW_ENV_VALUE 1
-#define ENV_ESC 2
-#define ENV_USERVAR 3
-
-/*
- * AUTHENTICATION suboptions
- */
-
-/*
- * Who is authenticating who ...
- */
-#define AUTH_WHO_CLIENT 0 /* Client authenticating server */
-#define AUTH_WHO_SERVER 1 /* Server authenticating client */
-#define AUTH_WHO_MASK 1
-
-/*
- * amount of authentication done
- */
-#define AUTH_HOW_ONE_WAY 0
-#define AUTH_HOW_MUTUAL 2
-#define AUTH_HOW_MASK 2
-
-#define AUTHTYPE_NULL 0
-#define AUTHTYPE_KERBEROS_V4 1
-#define AUTHTYPE_KERBEROS_V5 2
-#define AUTHTYPE_SPX 3
-#define AUTHTYPE_MINK 4
-#define AUTHTYPE_CNT 5
-
-#define AUTHTYPE_TEST 99
-
-#ifdef AUTH_NAMES
-char *authtype_names[] = {
- "NULL", "KERBEROS_V4", "KERBEROS_V5", "SPX", "MINK",
- 0
-};
-#else
-extern char *authtype_names[];
-#endif
-
-#define AUTHTYPE_NAME_OK(x) ((unsigned int)(x) < AUTHTYPE_CNT)
-#define AUTHTYPE_NAME(x) authtype_names[x]
-
-/*
- * ENCRYPTion suboptions
- */
-#define ENCRYPT_IS 0 /* I pick encryption type ... */
-#define ENCRYPT_SUPPORT 1 /* I support encryption types ... */
-#define ENCRYPT_REPLY 2 /* Initial setup response */
-#define ENCRYPT_START 3 /* Am starting to send encrypted */
-#define ENCRYPT_END 4 /* Am ending encrypted */
-#define ENCRYPT_REQSTART 5 /* Request you start encrypting */
-#define ENCRYPT_REQEND 6 /* Request you end encrypting */
-#define ENCRYPT_ENC_KEYID 7
-#define ENCRYPT_DEC_KEYID 8
-#define ENCRYPT_CNT 9
-
-#define ENCTYPE_ANY 0
-#define ENCTYPE_DES_CFB64 1
-#define ENCTYPE_DES_OFB64 2
-#define ENCTYPE_CNT 3
-
-#ifdef ENCRYPT_NAMES
-char *encrypt_names[] = {
- "IS", "SUPPORT", "REPLY", "START", "END",
- "REQUEST-START", "REQUEST-END", "ENC-KEYID", "DEC-KEYID",
- 0
-};
-char *enctype_names[] = {
- "ANY", "DES_CFB64", "DES_OFB64",
- 0
-};
-#else
-extern char *encrypt_names[];
-extern char *enctype_names[];
-#endif
-
-
-#define ENCRYPT_NAME_OK(x) ((unsigned int)(x) < ENCRYPT_CNT)
-#define ENCRYPT_NAME(x) encrypt_names[x]
-
-#define ENCTYPE_NAME_OK(x) ((unsigned int)(x) < ENCTYPE_CNT)
-#define ENCTYPE_NAME(x) enctype_names[x]
-
-#endif /* !_TELNET_H_ */
diff --git a/cpukit/libnetworking/bpfilter.h b/cpukit/libnetworking/bpfilter.h
deleted file mode 100644
index 5a6ee0337b..0000000000
--- a/cpukit/libnetworking/bpfilter.h
+++ /dev/null
@@ -1,6 +0,0 @@
-/*
- * $Id$
- */
-
-/* intentionally empty file */
-
diff --git a/cpukit/libnetworking/kern/Makefile.am b/cpukit/libnetworking/kern/Makefile.am
deleted file mode 100644
index aedc2bbadf..0000000000
--- a/cpukit/libnetworking/kern/Makefile.am
+++ /dev/null
@@ -1,35 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-LIBNAME = lib.a
-LIB = $(ARCH)/$(LIBNAME)
-
-C_FILES = kern_subr.c uipc_domain.c uipc_mbuf.c uipc_socket.c uipc_socket2.c
-C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
-
-OBJS = $(C_O_FILES)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../automake/lib.am
-
-#
-# Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -D_COMPILING_BSD_KERNEL_ -DKERNEL -DINET -DNFS -DDIAGNOSTIC \
- -DBOOTP_COMPAT
-
-$(LIB): $(OBJS)
- $(make-library)
-
-all-local: $(ARCH) $(OBJS) $(LIB)
-
-.PRECIOUS: $(LIB)
-
-EXTRA_DIST = kern_subr.c uipc_domain.c uipc_mbuf.c uipc_socket.c \
- uipc_socket2.c
-
-include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/libnetworking/kern/kern_subr.c b/cpukit/libnetworking/kern/kern_subr.c
deleted file mode 100644
index 71e51fc442..0000000000
--- a/cpukit/libnetworking/kern/kern_subr.c
+++ /dev/null
@@ -1,206 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1991, 1993
- * The Regents of the University of California. All rights reserved.
- * (c) UNIX System Laboratories, Inc.
- * All or some portions of this file are derived from material licensed
- * to the University of California by American Telephone and Telegraph
- * Co. or Unix System Laboratories, Inc. and are reproduced herein with
- * the permission of UNIX System Laboratories, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)kern_subr.c 8.3 (Berkeley) 1/21/94
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/proc.h>
-#include <sys/malloc.h>
-#include <sys/queue.h>
-
-int
-uiomove(cp, n, uio)
- register caddr_t cp;
- register int n;
- register struct uio *uio;
-{
- register struct iovec *iov;
- u_int cnt;
- int error;
-
-#ifdef DIAGNOSTIC
- if (uio->uio_rw != UIO_READ && uio->uio_rw != UIO_WRITE)
- panic("uiomove: mode");
-#endif
- while (n > 0 && uio->uio_resid) {
- iov = uio->uio_iov;
- cnt = iov->iov_len;
- if (cnt == 0) {
- uio->uio_iov++;
- uio->uio_iovcnt--;
- continue;
- }
- if (cnt > n)
- cnt = n;
-
- switch (uio->uio_segflg) {
-
- case UIO_USERSPACE:
- case UIO_USERISPACE:
- if (uio->uio_rw == UIO_READ)
- error = copyout(cp, iov->iov_base, cnt);
- else
- error = copyin(iov->iov_base, cp, cnt);
- if (error)
- return (error);
- break;
-
- case UIO_SYSSPACE:
- if (uio->uio_rw == UIO_READ)
- bcopy((caddr_t)cp, iov->iov_base, cnt);
- else
- bcopy(iov->iov_base, (caddr_t)cp, cnt);
- break;
- case UIO_NOCOPY:
- break;
- }
- iov->iov_base += cnt;
- iov->iov_len -= cnt;
- uio->uio_resid -= cnt;
- uio->uio_offset += cnt;
- cp += cnt;
- n -= cnt;
- }
- return (0);
-}
-
-#ifdef vax /* unused except by ct.c, other oddities XXX */
-/*
- * Get next character written in by user from uio.
- */
-int
-uwritec(uio)
- struct uio *uio;
-{
- register struct iovec *iov;
- register int c;
-
- if (uio->uio_resid <= 0)
- return (-1);
-again:
- if (uio->uio_iovcnt <= 0)
- panic("uwritec");
- iov = uio->uio_iov;
- if (iov->iov_len == 0) {
- uio->uio_iov++;
- if (--uio->uio_iovcnt == 0)
- return (-1);
- goto again;
- }
- switch (uio->uio_segflg) {
-
- case UIO_USERSPACE:
- c = fubyte(iov->iov_base);
- break;
-
- case UIO_SYSSPACE:
- c = *(u_char *) iov->iov_base;
- break;
-
- case UIO_USERISPACE:
- c = fuibyte(iov->iov_base);
- break;
- }
- if (c < 0)
- return (-1);
- iov->iov_base++;
- iov->iov_len--;
- uio->uio_resid--;
- uio->uio_offset++;
- return (c);
-}
-#endif /* vax */
-
-/*
- * General routine to allocate a hash table.
- */
-void *
-hashinit(elements, type, hashmask)
- int elements, type;
- u_long *hashmask;
-{
- long hashsize;
- LIST_HEAD(generic, generic) *hashtbl;
- int i;
-
- if (elements <= 0)
- panic("hashinit: bad elements");
- for (hashsize = 1; hashsize <= elements; hashsize <<= 1)
- continue;
- hashsize >>= 1;
- hashtbl = malloc((u_long)hashsize * sizeof(*hashtbl), type, M_WAITOK);
- for (i = 0; i < hashsize; i++)
- LIST_INIT(&hashtbl[i]);
- *hashmask = hashsize - 1;
- return (hashtbl);
-}
-
-#define NPRIMES 27
-static int primes[] = { 1, 13, 31, 61, 127, 251, 509, 761, 1021, 1531, 2039,
- 2557, 3067, 3583, 4093, 4603, 5119, 5623, 6143, 6653,
- 7159, 7673, 8191, 12281, 16381, 24571, 32749 };
-
-/*
- * General routine to allocate a prime number sized hash table.
- */
-void *
-phashinit(elements, type, nentries)
- int elements, type;
- u_long *nentries;
-{
- long hashsize;
- LIST_HEAD(generic, generic) *hashtbl;
- int i;
-
- if (elements <= 0)
- panic("phashinit: bad elements");
- for (i = 1, hashsize = primes[1]; hashsize <= elements;) {
- i++;
- if (i == NPRIMES)
- break;
- hashsize = primes[i];
- }
- hashsize = primes[i - 1];
- hashtbl = malloc((u_long)hashsize * sizeof(*hashtbl), type, M_WAITOK);
- for (i = 0; i < hashsize; i++)
- LIST_INIT(&hashtbl[i]);
- *nentries = hashsize;
- return (hashtbl);
-}
diff --git a/cpukit/libnetworking/kern/uipc_domain.c b/cpukit/libnetworking/kern/uipc_domain.c
deleted file mode 100644
index 81d741fe37..0000000000
--- a/cpukit/libnetworking/kern/uipc_domain.c
+++ /dev/null
@@ -1,228 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)uipc_domain.c 8.2 (Berkeley) 10/18/93
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <sys/protosw.h>
-#include <sys/domain.h>
-#include <sys/mbuf.h>
-#include <sys/kernel.h>
-#include <sys/systm.h>
-
-/*
- * System initialization
- *
- * Note: domain initialization wants to take place on a per domain basis
- * as a result of traversing a linker set. Most likely, each domain
- * want to call a registration function rather than being handled here
- * in domaininit(). Probably this will look like:
- *
- * SYSINIT(unique, SI_SUB_PROTO_DOMAI, SI_ORDER_ANY, domain_add, xxx)
- *
- * Where 'xxx' is replaced by the address of a parameter struct to be
- * passed to the doamin_add() function.
- */
-
-#if !defined(__rtems__)
-static int x_save_spl; /* used by kludge*/
-static void kludge_splimp __P((void *));
-static void kludge_splx __P((void *));
- void domaininit __P((void *));
-SYSINIT(splimp, SI_SUB_PROTO_BEGIN, SI_ORDER_FIRST, kludge_splimp, &x_save_spl)
-SYSINIT(domain, SI_SUB_PROTO_DOMAIN, SI_ORDER_FIRST, domaininit, NULL)
-SYSINIT(splx, SI_SUB_PROTO_END, SI_ORDER_FIRST, kludge_splx, &x_save_spl)
-#endif
-
-static void pffasttimo __P((void *));
-static void pfslowtimo __P((void *));
-
-struct domain *domains;
-
-#define ADDDOMAIN(x) { \
- __CONCAT(x,domain.dom_next) = domains; \
- domains = &__CONCAT(x,domain); \
-}
-
-extern struct linker_set domain_set;
-
-/* ARGSUSED*/
-void
-domaininit(dummy)
- void *dummy;
-{
- register struct domain *dp;
- register struct protosw *pr;
-
-/* - not in our sources
-#ifdef ISDN
- ADDDOMAIN(isdn);
-#endif
-*/
-
- for (dp = domains; dp; dp = dp->dom_next) {
- if (dp->dom_init)
- (*dp->dom_init)();
- for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++){
-#ifdef PRU_OLDSTYLE
- /* See comments in uipc_socket2.c. */
- if (pr->pr_usrreqs == 0 && pr->pr_ousrreq)
- pr->pr_usrreqs = &pru_oldstyle;
-#endif
- if (pr->pr_init)
- (*pr->pr_init)();
- }
- }
-
- if (max_linkhdr < 16) /* XXX */
- max_linkhdr = 16;
- max_hdr = max_linkhdr + max_protohdr;
- max_datalen = MHLEN - max_hdr;
- timeout(pffasttimo, (void *)0, 1);
- timeout(pfslowtimo, (void *)0, 1);
-}
-
-
-#if !defined(__rtems__)
-/*
- * The following two operations are kludge code. Most likely, they should
- * be done as a "domainpreinit()" for the first function and then rolled
- * in as the last act of "domaininit()" for the second.
- *
- * In point of fact, it is questionable why other initialization prior
- * to this does not also take place at splimp by default.
- */
-static void
-kludge_splimp(udata)
- void *udata;
-{
- int *savesplp = udata;
-
- *savesplp = splimp();
-}
-
-static void
-kludge_splx(udata)
- void *udata;
-{
- int *savesplp = udata;
-
- splx( *savesplp);
-}
-#endif /* !defined(__rtems__) */
-
-struct protosw *
-pffindtype(int family, int type)
-{
- register struct domain *dp;
- register struct protosw *pr;
-
- for (dp = domains; dp; dp = dp->dom_next)
- if (dp->dom_family == family)
- goto found;
- return (0);
-found:
- for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++)
- if (pr->pr_type && pr->pr_type == type)
- return (pr);
- return (0);
-}
-
-struct protosw *
-pffindproto(int family, int protocol, int type)
-{
- register struct domain *dp;
- register struct protosw *pr;
- struct protosw *maybe = 0;
-
- if (family == 0)
- return (0);
- for (dp = domains; dp; dp = dp->dom_next)
- if (dp->dom_family == family)
- goto found;
- return (0);
-found:
- for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++) {
- if ((pr->pr_protocol == protocol) && (pr->pr_type == type))
- return (pr);
-
- if (type == SOCK_RAW && pr->pr_type == SOCK_RAW &&
- pr->pr_protocol == 0 && maybe == (struct protosw *)0)
- maybe = pr;
- }
- return (maybe);
-}
-
-void
-pfctlinput(cmd, sa)
- int cmd;
- struct sockaddr *sa;
-{
- register struct domain *dp;
- register struct protosw *pr;
-
- for (dp = domains; dp; dp = dp->dom_next)
- for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++)
- if (pr->pr_ctlinput)
- (*pr->pr_ctlinput)(cmd, sa, (void *)0);
-}
-
-static void
-pfslowtimo(arg)
- void *arg;
-{
- register struct domain *dp;
- register struct protosw *pr;
-
- for (dp = domains; dp; dp = dp->dom_next)
- for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++)
- if (pr->pr_slowtimo)
- (*pr->pr_slowtimo)();
- timeout(pfslowtimo, (void *)0, hz/2);
-}
-
-static void
-pffasttimo(arg)
- void *arg;
-{
- register struct domain *dp;
- register struct protosw *pr;
-
- for (dp = domains; dp; dp = dp->dom_next)
- for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++)
- if (pr->pr_fasttimo)
- (*pr->pr_fasttimo)();
- timeout(pffasttimo, (void *)0, hz/5);
-}
diff --git a/cpukit/libnetworking/kern/uipc_mbuf.c b/cpukit/libnetworking/kern/uipc_mbuf.c
deleted file mode 100644
index 17d2be6b26..0000000000
--- a/cpukit/libnetworking/kern/uipc_mbuf.c
+++ /dev/null
@@ -1,748 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1988, 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)uipc_mbuf.c 8.2 (Berkeley) 1/4/94
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/proc.h>
-#include <sys/malloc.h>
-#define MBTYPES
-#include <sys/mbuf.h>
-#include <sys/kernel.h>
-#include <sys/syslog.h>
-#include <sys/domain.h>
-#include <sys/protosw.h>
-
-#include <vm/vm.h>
-#include <vm/vm_param.h>
-#include <vm/vm_kern.h>
-#include <vm/vm_extern.h>
-
-static void mbinit __P((void *)) __attribute__ ((unused));
-SYSINIT(mbuf, SI_SUB_MBUF, SI_ORDER_FIRST, mbinit, NULL)
-
-struct mbuf *mbutl;
-char *mclrefcnt;
-struct mbstat mbstat;
-struct mbuf *mmbfree;
-union mcluster *mclfree;
-int max_linkhdr;
-int max_protohdr;
-int max_hdr;
-int max_datalen;
-
-/* "number of clusters of pages" */
-#define NCL_INIT 1
-
-#define NMB_INIT 16
-
-/*
- * When MGET failes, ask protocols to free space when short of memory,
- * then re-attempt to allocate an mbuf.
- */
-struct mbuf *
-m_retry(i, t)
- int i, t;
-{
- register struct mbuf *m;
-
- m_reclaim();
-#define m_retry(i, t) (struct mbuf *)0
- MGET(m, i, t);
-#undef m_retry
- if (m != NULL)
- mbstat.m_wait++;
- else
- mbstat.m_drops++;
- return (m);
-}
-
-/*
- * As above; retry an MGETHDR.
- */
-struct mbuf *
-m_retryhdr(i, t)
- int i, t;
-{
- register struct mbuf *m;
-
- m_reclaim();
-#define m_retryhdr(i, t) (struct mbuf *)0
- MGETHDR(m, i, t);
-#undef m_retryhdr
- if (m != NULL)
- mbstat.m_wait++;
- else
- mbstat.m_drops++;
- return (m);
-}
-
-void
-m_reclaim(void)
-{
- register struct domain *dp;
- register struct protosw *pr;
- int s = splimp();
-
- for (dp = domains; dp; dp = dp->dom_next)
- for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++)
- if (pr->pr_drain)
- (*pr->pr_drain)();
- splx(s);
- mbstat.m_drain++;
-}
-
-/*
- * Space allocation routines.
- * These are also available as macros
- * for critical paths.
- */
-struct mbuf *
-m_get(nowait, type)
- int nowait, type;
-{
- register struct mbuf *m;
-
- MGET(m, nowait, type);
- return (m);
-}
-
-struct mbuf *
-m_gethdr(nowait, type)
- int nowait, type;
-{
- register struct mbuf *m;
-
- MGETHDR(m, nowait, type);
- return (m);
-}
-
-struct mbuf *
-m_getclr(nowait, type)
- int nowait, type;
-{
- register struct mbuf *m;
-
- MGET(m, nowait, type);
- if (m == 0)
- return (0);
- bzero(mtod(m, caddr_t), MLEN);
- return (m);
-}
-
-struct mbuf *
-m_free(m)
- struct mbuf *m;
-{
- register struct mbuf *n;
-
- MFREE(m, n);
- return (n);
-}
-
-void
-m_freem(m)
- register struct mbuf *m;
-{
- register struct mbuf *n;
-
- if (m == NULL)
- return;
- do {
- MFREE(m, n);
- m = n;
- } while (m);
-}
-
-/*
- * Mbuffer utility routines.
- */
-
-/*
- * Lesser-used path for M_PREPEND:
- * allocate new mbuf to prepend to chain,
- * copy junk along.
- */
-struct mbuf *
-m_prepend(m, len, how)
- register struct mbuf *m;
- int len, how;
-{
- struct mbuf *mn;
-
- MGET(mn, how, m->m_type);
- if (mn == (struct mbuf *)NULL) {
- m_freem(m);
- return ((struct mbuf *)NULL);
- }
- if (m->m_flags & M_PKTHDR) {
- M_COPY_PKTHDR(mn, m);
- m->m_flags &= ~M_PKTHDR;
- }
- mn->m_next = m;
- m = mn;
- if (len < MHLEN)
- MH_ALIGN(m, len);
- m->m_len = len;
- return (m);
-}
-
-/*
- * Make a copy of an mbuf chain starting "off0" bytes from the beginning,
- * continuing for "len" bytes. If len is M_COPYALL, copy to end of mbuf.
- * The wait parameter is a choice of M_WAIT/M_DONTWAIT from caller.
- */
-static int MCFail;
-
-struct mbuf *
-m_copym(m, off0, len, wait)
- register struct mbuf *m;
- int off0, wait;
- register int len;
-{
- register struct mbuf *n, **np;
- register int off = off0;
- struct mbuf *top;
- int copyhdr = 0;
-
- if (off < 0 || len < 0)
- panic("m_copym");
- if (off == 0 && m->m_flags & M_PKTHDR)
- copyhdr = 1;
- while (off > 0) {
- if (m == 0)
- panic("m_copym");
- if (off < m->m_len)
- break;
- off -= m->m_len;
- m = m->m_next;
- }
- np = &top;
- top = 0;
- while (len > 0) {
- if (m == 0) {
- if (len != M_COPYALL)
- panic("m_copym");
- break;
- }
- MGET(n, wait, m->m_type);
- *np = n;
- if (n == 0)
- goto nospace;
- if (copyhdr) {
- M_COPY_PKTHDR(n, m);
- if (len == M_COPYALL)
- n->m_pkthdr.len -= off0;
- else
- n->m_pkthdr.len = len;
- copyhdr = 0;
- }
- n->m_len = min(len, m->m_len - off);
- if (m->m_flags & M_EXT) {
- n->m_data = m->m_data + off;
- if(!m->m_ext.ext_ref)
- mclrefcnt[mtocl(m->m_ext.ext_buf)]++;
- else
- (*(m->m_ext.ext_ref))(m->m_ext.ext_buf,
- m->m_ext.ext_size);
- n->m_ext = m->m_ext;
- n->m_flags |= M_EXT;
- } else
- bcopy(mtod(m, caddr_t)+off, mtod(n, caddr_t),
- (unsigned)n->m_len);
- if (len != M_COPYALL)
- len -= n->m_len;
- off = 0;
- m = m->m_next;
- np = &n->m_next;
- }
- if (top == 0)
- MCFail++;
- return (top);
-nospace:
- m_freem(top);
- MCFail++;
- return (0);
-}
-
-/*
- * Copy an entire packet, including header (which must be present).
- * An optimization of the common case `m_copym(m, 0, M_COPYALL, how)'.
- */
-struct mbuf *
-m_copypacket(m, how)
- struct mbuf *m;
- int how;
-{
- struct mbuf *top, *n, *o;
-
- MGET(n, how, m->m_type);
- top = n;
- if (!n)
- goto nospace;
-
- M_COPY_PKTHDR(n, m);
- n->m_len = m->m_len;
- if (m->m_flags & M_EXT) {
- n->m_data = m->m_data;
- mclrefcnt[mtocl(m->m_ext.ext_buf)]++;
- n->m_ext = m->m_ext;
- n->m_flags |= M_EXT;
- } else {
- bcopy(mtod(m, char *), mtod(n, char *), n->m_len);
- }
-
- m = m->m_next;
- while (m) {
- MGET(o, how, m->m_type);
- if (!o)
- goto nospace;
-
- n->m_next = o;
- n = n->m_next;
-
- n->m_len = m->m_len;
- if (m->m_flags & M_EXT) {
- n->m_data = m->m_data;
- mclrefcnt[mtocl(m->m_ext.ext_buf)]++;
- n->m_ext = m->m_ext;
- n->m_flags |= M_EXT;
- } else {
- bcopy(mtod(m, char *), mtod(n, char *), n->m_len);
- }
-
- m = m->m_next;
- }
- return top;
-nospace:
- m_freem(top);
- MCFail++;
- return 0;
-}
-
-/*
- * Copy data from an mbuf chain starting "off" bytes from the beginning,
- * continuing for "len" bytes, into the indicated buffer.
- */
-void
-m_copydata(m, off, len, cp)
- register struct mbuf *m;
- register int off;
- register int len;
- caddr_t cp;
-{
- register unsigned count;
-
- if (off < 0 || len < 0)
- panic("m_copydata");
- while (off > 0) {
- if (m == 0)
- panic("m_copydata");
- if (off < m->m_len)
- break;
- off -= m->m_len;
- m = m->m_next;
- }
- while (len > 0) {
- if (m == 0)
- panic("m_copydata");
- count = min(m->m_len - off, len);
- bcopy(mtod(m, caddr_t) + off, cp, count);
- len -= count;
- cp += count;
- off = 0;
- m = m->m_next;
- }
-}
-
-/*
- * Concatenate mbuf chain n to m.
- * Both chains must be of the same type (e.g. MT_DATA).
- * Any m_pkthdr is not updated.
- */
-void
-m_cat(m, n)
- register struct mbuf *m, *n;
-{
- while (m->m_next)
- m = m->m_next;
- while (n) {
- if (m->m_flags & M_EXT ||
- m->m_data + m->m_len + n->m_len >= &m->m_dat[MLEN]) {
- /* just join the two chains */
- m->m_next = n;
- return;
- }
- /* splat the data from one into the other */
- bcopy(mtod(n, caddr_t), mtod(m, caddr_t) + m->m_len,
- (u_int)n->m_len);
- m->m_len += n->m_len;
- n = m_free(n);
- }
-}
-
-void
-m_adj(mp, req_len)
- struct mbuf *mp;
- int req_len;
-{
- register int len = req_len;
- register struct mbuf *m;
- register int count;
-
- if ((m = mp) == NULL)
- return;
- if (len >= 0) {
- /*
- * Trim from head.
- */
- while (m != NULL && len > 0) {
- if (m->m_len <= len) {
- len -= m->m_len;
- m->m_len = 0;
- m = m->m_next;
- } else {
- m->m_len -= len;
- m->m_data += len;
- len = 0;
- }
- }
- m = mp;
- if (mp->m_flags & M_PKTHDR)
- m->m_pkthdr.len -= (req_len - len);
- } else {
- /*
- * Trim from tail. Scan the mbuf chain,
- * calculating its length and finding the last mbuf.
- * If the adjustment only affects this mbuf, then just
- * adjust and return. Otherwise, rescan and truncate
- * after the remaining size.
- */
- len = -len;
- count = 0;
- for (;;) {
- count += m->m_len;
- if (m->m_next == (struct mbuf *)0)
- break;
- m = m->m_next;
- }
- if (m->m_len >= len) {
- m->m_len -= len;
- if (mp->m_flags & M_PKTHDR)
- mp->m_pkthdr.len -= len;
- return;
- }
- count -= len;
- if (count < 0)
- count = 0;
- /*
- * Correct length for chain is "count".
- * Find the mbuf with last data, adjust its length,
- * and toss data from remaining mbufs on chain.
- */
- m = mp;
- if (m->m_flags & M_PKTHDR)
- m->m_pkthdr.len = count;
- for (; m; m = m->m_next) {
- if (m->m_len >= count) {
- m->m_len = count;
- break;
- }
- count -= m->m_len;
- }
- while (m->m_next)
- (m = m->m_next) ->m_len = 0;
- }
-}
-
-/*
- * Rearange an mbuf chain so that len bytes are contiguous
- * and in the data area of an mbuf (so that mtod and dtom
- * will work for a structure of size len). Returns the resulting
- * mbuf chain on success, frees it and returns null on failure.
- * If there is room, it will add up to max_protohdr-len extra bytes to the
- * contiguous region in an attempt to avoid being called next time.
- */
-static int MPFail;
-
-struct mbuf *
-m_pullup(n, len)
- register struct mbuf *n;
- int len;
-{
- register struct mbuf *m;
- register int count;
- int space;
-
- /*
- * If first mbuf has no cluster, and has room for len bytes
- * without shifting current data, pullup into it,
- * otherwise allocate a new mbuf to prepend to the chain.
- */
- if ((n->m_flags & M_EXT) == 0 &&
- n->m_data + len < &n->m_dat[MLEN] && n->m_next) {
- if (n->m_len >= len)
- return (n);
- m = n;
- n = n->m_next;
- len -= m->m_len;
- } else {
- if (len > MHLEN)
- goto bad;
- MGET(m, M_DONTWAIT, n->m_type);
- if (m == 0)
- goto bad;
- m->m_len = 0;
- if (n->m_flags & M_PKTHDR) {
- M_COPY_PKTHDR(m, n);
- n->m_flags &= ~M_PKTHDR;
- }
- }
- space = &m->m_dat[MLEN] - (m->m_data + m->m_len);
- do {
- count = min(min(max(len, max_protohdr), space), n->m_len);
- bcopy(mtod(n, caddr_t), mtod(m, caddr_t) + m->m_len,
- (unsigned)count);
- len -= count;
- m->m_len += count;
- n->m_len -= count;
- space -= count;
- if (n->m_len)
- n->m_data += count;
- else
- n = m_free(n);
- } while (len > 0 && n);
- if (len > 0) {
- (void) m_free(m);
- goto bad;
- }
- m->m_next = n;
- return (m);
-bad:
- m_freem(n);
- MPFail++;
- return (0);
-}
-
-/*
- * Partition an mbuf chain in two pieces, returning the tail --
- * all but the first len0 bytes. In case of failure, it returns NULL and
- * attempts to restore the chain to its original state.
- */
-struct mbuf *
-m_split(m0, len0, wait)
- register struct mbuf *m0;
- int len0, wait;
-{
- register struct mbuf *m, *n;
- unsigned len = len0, remain;
-
- for (m = m0; m && len > m->m_len; m = m->m_next)
- len -= m->m_len;
- if (m == 0)
- return (0);
- remain = m->m_len - len;
- if (m0->m_flags & M_PKTHDR) {
- MGETHDR(n, wait, m0->m_type);
- if (n == 0)
- return (0);
- n->m_pkthdr.rcvif = m0->m_pkthdr.rcvif;
- n->m_pkthdr.len = m0->m_pkthdr.len - len0;
- m0->m_pkthdr.len = len0;
- if (m->m_flags & M_EXT)
- goto extpacket;
- if (remain > MHLEN) {
- /* m can't be the lead packet */
- MH_ALIGN(n, 0);
- n->m_next = m_split(m, len, wait);
- if (n->m_next == 0) {
- (void) m_free(n);
- return (0);
- } else
- return (n);
- } else
- MH_ALIGN(n, remain);
- } else if (remain == 0) {
- n = m->m_next;
- m->m_next = 0;
- return (n);
- } else {
- MGET(n, wait, m->m_type);
- if (n == 0)
- return (0);
- M_ALIGN(n, remain);
- }
-extpacket:
- if (m->m_flags & M_EXT) {
- n->m_flags |= M_EXT;
- n->m_ext = m->m_ext;
- if(!m->m_ext.ext_ref)
- mclrefcnt[mtocl(m->m_ext.ext_buf)]++;
- else
- (*(m->m_ext.ext_ref))(m->m_ext.ext_buf,
- m->m_ext.ext_size);
- m->m_ext.ext_size = 0; /* For Accounting XXXXXX danger */
- n->m_data = m->m_data + len;
- } else {
- bcopy(mtod(m, caddr_t) + len, mtod(n, caddr_t), remain);
- }
- n->m_len = remain;
- m->m_len = len;
- n->m_next = m->m_next;
- m->m_next = 0;
- return (n);
-}
-/*
- * Routine to copy from device local memory into mbufs.
- */
-struct mbuf *
-m_devget(buf, totlen, off0, ifp, copy)
- char *buf;
- int totlen, off0;
- struct ifnet *ifp;
- void (*copy) __P((char *from, caddr_t to, u_int len));
-{
- register struct mbuf *m;
- struct mbuf *top = 0, **mp = &top;
- register int off = off0, len;
- register char *cp;
- char *epkt;
-
- cp = buf;
- epkt = cp + totlen;
- if (off) {
- cp += off + 2 * sizeof(u_short);
- totlen -= 2 * sizeof(u_short);
- }
- MGETHDR(m, M_DONTWAIT, MT_DATA);
- if (m == 0)
- return (0);
- m->m_pkthdr.rcvif = ifp;
- m->m_pkthdr.len = totlen;
- m->m_len = MHLEN;
-
- while (totlen > 0) {
- if (top) {
- MGET(m, M_DONTWAIT, MT_DATA);
- if (m == 0) {
- m_freem(top);
- return (0);
- }
- m->m_len = MLEN;
- }
- len = min(totlen, epkt - cp);
- if (len >= MINCLSIZE) {
- MCLGET(m, M_DONTWAIT);
- if (m->m_flags & M_EXT)
- m->m_len = len = min(len, MCLBYTES);
- else
- len = m->m_len;
- } else {
- /*
- * Place initial small packet/header at end of mbuf.
- */
- if (len < m->m_len) {
- if (top == 0 && len + max_linkhdr <= m->m_len)
- m->m_data += max_linkhdr;
- m->m_len = len;
- } else
- len = m->m_len;
- }
- if (copy)
- copy(cp, mtod(m, caddr_t), (unsigned)len);
- else
- bcopy(cp, mtod(m, caddr_t), (unsigned)len);
- cp += len;
- *mp = m;
- mp = &m->m_next;
- totlen -= len;
- if (cp == epkt)
- cp = buf;
- }
- return (top);
-}
-
-/*
- * Copy data from a buffer back into the indicated mbuf chain,
- * starting "off" bytes from the beginning, extending the mbuf
- * chain if necessary.
- */
-void
-m_copyback(m0, off, len, cp)
- struct mbuf *m0;
- register int off;
- register int len;
- caddr_t cp;
-{
- register int mlen;
- register struct mbuf *m = m0, *n;
- int totlen = 0;
-
- if (m0 == 0)
- return;
- while (off > (mlen = m->m_len)) {
- off -= mlen;
- totlen += mlen;
- if (m->m_next == 0) {
- n = m_getclr(M_DONTWAIT, m->m_type);
- if (n == 0)
- goto out;
- n->m_len = min(MLEN, len + off);
- m->m_next = n;
- }
- m = m->m_next;
- }
- while (len > 0) {
- mlen = min (m->m_len - off, len);
- bcopy(cp, off + mtod(m, caddr_t), (unsigned)mlen);
- cp += mlen;
- len -= mlen;
- mlen += off;
- off = 0;
- totlen += mlen;
- if (len == 0)
- break;
- if (m->m_next == 0) {
- n = m_get(M_DONTWAIT, m->m_type);
- if (n == 0)
- break;
- n->m_len = min(MLEN, len);
- m->m_next = n;
- }
- m = m->m_next;
- }
-out: if (((m = m0)->m_flags & M_PKTHDR) && (m->m_pkthdr.len < totlen))
- m->m_pkthdr.len = totlen;
-}
diff --git a/cpukit/libnetworking/kern/uipc_socket.c b/cpukit/libnetworking/kern/uipc_socket.c
deleted file mode 100644
index 49a5a65653..0000000000
--- a/cpukit/libnetworking/kern/uipc_socket.c
+++ /dev/null
@@ -1,1143 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1988, 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)uipc_socket.c 8.3 (Berkeley) 4/15/94
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/systm.h>
-#include <sys/proc.h>
-#include <sys/file.h>
-#include <sys/malloc.h>
-#include <sys/mbuf.h>
-#include <sys/domain.h>
-#include <sys/kernel.h>
-#include <sys/protosw.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/resourcevar.h>
-#include <sys/signalvar.h>
-#include <sys/sysctl.h>
-#include <limits.h>
-
-static int somaxconn = SOMAXCONN;
-SYSCTL_INT(_kern, KERN_SOMAXCONN, somaxconn, CTLFLAG_RW, &somaxconn, 0, "");
-
-/*
- * Socket operation routines.
- * These routines are called by the routines in
- * sys_socket.c or from a system process, and
- * implement the semantics of socket operations by
- * switching out to the protocol specific routines.
- */
-/*ARGSUSED*/
-int
-socreate(dom, aso, type, proto, p)
- int dom;
- struct socket **aso;
- register int type;
- int proto;
- struct proc *p;
-{
- register struct protosw *prp;
- register struct socket *so;
- register int error;
-
- if (proto)
- prp = pffindproto(dom, proto, type);
- else
- prp = pffindtype(dom, type);
- if (prp == 0 || prp->pr_usrreqs == 0)
- return (EPROTONOSUPPORT);
- if (prp->pr_type != type)
- return (EPROTOTYPE);
- MALLOC(so, struct socket *, sizeof(*so), M_SOCKET, M_WAIT);
- bzero((caddr_t)so, sizeof(*so));
- TAILQ_INIT(&so->so_incomp);
- TAILQ_INIT(&so->so_comp);
- so->so_type = type;
- so->so_state = SS_PRIV;
- so->so_uid = 0;
- so->so_proto = prp;
- error = (*prp->pr_usrreqs->pru_attach)(so, proto);
- if (error) {
- so->so_state |= SS_NOFDREF;
- sofree(so);
- return (error);
- }
- *aso = so;
- return (0);
-}
-
-int
-sobind(so, nam)
- struct socket *so;
- struct mbuf *nam;
-{
- int s = splnet();
- int error;
-
- error = (*so->so_proto->pr_usrreqs->pru_bind)(so, nam);
- splx(s);
- return (error);
-}
-
-int
-solisten(so, backlog)
- register struct socket *so;
- int backlog;
-{
- int s = splnet(), error;
-
- error = (*so->so_proto->pr_usrreqs->pru_listen)(so);
- if (error) {
- splx(s);
- return (error);
- }
- if (so->so_comp.tqh_first == NULL)
- so->so_options |= SO_ACCEPTCONN;
- if (backlog < 0 || backlog > somaxconn)
- backlog = somaxconn;
- so->so_qlimit = backlog;
- splx(s);
- return (0);
-}
-
-void
-sofree(so)
- register struct socket *so;
-{
- struct socket *head = so->so_head;
-
- if (so->so_pcb || (so->so_state & SS_NOFDREF) == 0)
- return;
- if (head != NULL) {
- if (so->so_state & SS_INCOMP) {
- TAILQ_REMOVE(&head->so_incomp, so, so_list);
- head->so_incqlen--;
- } else if (so->so_state & SS_COMP) {
- TAILQ_REMOVE(&head->so_comp, so, so_list);
- } else {
- panic("sofree: not queued");
- }
- head->so_qlen--;
- so->so_state &= ~(SS_INCOMP|SS_COMP);
- so->so_head = NULL;
- }
- sbrelease(&so->so_snd);
- sorflush(so);
- FREE(so, M_SOCKET);
-}
-
-/*
- * Close a socket on last file table reference removal.
- * Initiate disconnect if connected.
- * Free socket when disconnect complete.
- */
-int
-soclose(so)
- register struct socket *so;
-{
- int s = splnet(); /* conservative */
- int error = 0;
-
- if (so->so_options & SO_ACCEPTCONN) {
- struct socket *sp, *sonext;
-
- for (sp = so->so_incomp.tqh_first; sp != NULL; sp = sonext) {
- sonext = sp->so_list.tqe_next;
- (void) soabort(sp);
- }
- for (sp = so->so_comp.tqh_first; sp != NULL; sp = sonext) {
- sonext = sp->so_list.tqe_next;
- (void) soabort(sp);
- }
- }
- if (so->so_pcb == 0)
- goto discard;
- if (so->so_state & SS_ISCONNECTED) {
- if ((so->so_state & SS_ISDISCONNECTING) == 0) {
- error = sodisconnect(so);
- if (error)
- goto drop;
- }
- if (so->so_options & SO_LINGER) {
- if ((so->so_state & SS_ISDISCONNECTING) &&
- (so->so_state & SS_NBIO))
- goto drop;
- while (so->so_state & SS_ISCONNECTED) {
- soconnsleep (so);
- }
- }
- }
-drop:
- if (so->so_pcb) {
- int error2 = (*so->so_proto->pr_usrreqs->pru_detach)(so);
- if (error == 0)
- error = error2;
- }
-discard:
- if (so->so_state & SS_NOFDREF)
- panic("soclose: NOFDREF");
- so->so_state |= SS_NOFDREF;
- sofree(so);
- splx(s);
- return (error);
-}
-
-/*
- * Must be called at splnet...
- */
-int
-soabort(so)
- struct socket *so;
-{
-
- return (*so->so_proto->pr_usrreqs->pru_abort)(so);
-}
-
-int
-soaccept(so, nam)
- register struct socket *so;
- struct mbuf *nam;
-{
- int s = splnet();
- int error;
-
- if ((so->so_state & SS_NOFDREF) == 0)
- panic("soaccept: !NOFDREF");
- so->so_state &= ~SS_NOFDREF;
- error = (*so->so_proto->pr_usrreqs->pru_accept)(so, nam);
- splx(s);
- return (error);
-}
-
-int
-soconnect(so, nam)
- register struct socket *so;
- struct mbuf *nam;
-{
- int s;
- int error;
-
- if (so->so_options & SO_ACCEPTCONN)
- return (EOPNOTSUPP);
- s = splnet();
- /*
- * If protocol is connection-based, can only connect once.
- * Otherwise, if connected, try to disconnect first.
- * This allows user to disconnect by connecting to, e.g.,
- * a null address.
- */
- if (so->so_state & (SS_ISCONNECTED|SS_ISCONNECTING) &&
- ((so->so_proto->pr_flags & PR_CONNREQUIRED) ||
- (error = sodisconnect(so))))
- error = EISCONN;
- else
- error = (*so->so_proto->pr_usrreqs->pru_connect)(so, nam);
- splx(s);
- return (error);
-}
-
-int
-soconnect2(so1, so2)
- register struct socket *so1;
- struct socket *so2;
-{
- int s = splnet();
- int error;
-
- error = (*so1->so_proto->pr_usrreqs->pru_connect2)(so1, so2);
- splx(s);
- return (error);
-}
-
-int
-sodisconnect(so)
- register struct socket *so;
-{
- int s = splnet();
- int error;
-
- if ((so->so_state & SS_ISCONNECTED) == 0) {
- error = ENOTCONN;
- goto bad;
- }
- if (so->so_state & SS_ISDISCONNECTING) {
- error = EALREADY;
- goto bad;
- }
- error = (*so->so_proto->pr_usrreqs->pru_disconnect)(so);
-bad:
- splx(s);
- return (error);
-}
-
-#define SBLOCKWAIT(f) (((f) & MSG_DONTWAIT) ? M_NOWAIT : M_WAITOK)
-/*
- * Send on a socket.
- * If send must go all at once and message is larger than
- * send buffering, then hard error.
- * Lock against other senders.
- * If must go all at once and not enough room now, then
- * inform user that this would block and do nothing.
- * Otherwise, if nonblocking, send as much as possible.
- * The data to be sent is described by "uio" if nonzero,
- * otherwise by the mbuf chain "top" (which must be null
- * if uio is not). Data provided in mbuf chain must be small
- * enough to send all at once.
- *
- * Returns nonzero on error, timeout or signal; callers
- * must check for short counts if EINTR/ERESTART are returned.
- * Data and control buffers are freed on return.
- */
-int
-sosend(so, addr, uio, top, control, flags)
- register struct socket *so;
- struct mbuf *addr;
- struct uio *uio;
- struct mbuf *top;
- struct mbuf *control;
- int flags;
-{
- struct mbuf **mp;
- register struct mbuf *m;
- register long space, len, resid;
- int clen = 0, error, s, dontroute, mlen;
- int atomic = sosendallatonce(so) || top;
-
- if (uio)
- resid = uio->uio_resid;
- else
- resid = top->m_pkthdr.len;
- /*
- * In theory resid should be unsigned.
- * However, space must be signed, as it might be less than 0
- * if we over-committed, and we must use a signed comparison
- * of space and resid. On the other hand, a negative resid
- * causes us to loop sending 0-length segments to the protocol.
- *
- * Also check to make sure that MSG_EOR isn't used on SOCK_STREAM
- * type sockets since that's an error.
- */
- if ((resid < 0) || (so->so_type == SOCK_STREAM && (flags & MSG_EOR))) {
- error = EINVAL;
- goto out;
- }
-
- dontroute =
- (flags & MSG_DONTROUTE) && (so->so_options & SO_DONTROUTE) == 0 &&
- (so->so_proto->pr_flags & PR_ATOMIC);
- if (control)
- clen = control->m_len;
-#define snderr(errno) { error = errno; splx(s); goto release; }
-
-restart:
- error = sblock(&so->so_snd, SBLOCKWAIT(flags));
- if (error)
- goto out;
- do {
- s = splnet();
- if (so->so_state & SS_CANTSENDMORE)
- snderr(EPIPE);
- if (so->so_error) {
- error = so->so_error;
- so->so_error = 0;
- splx(s);
- goto release;
- }
- if ((so->so_state & SS_ISCONNECTED) == 0) {
- /*
- * `sendto' and `sendmsg' is allowed on a connection-
- * based socket if it supports implied connect.
- * Return ENOTCONN if not connected and no address is
- * supplied.
- */
- if ((so->so_proto->pr_flags & PR_CONNREQUIRED) &&
- (so->so_proto->pr_flags & PR_IMPLOPCL) == 0) {
- if ((so->so_state & SS_ISCONFIRMING) == 0 &&
- !(resid == 0 && clen != 0))
- snderr(ENOTCONN);
- } else if (addr == 0)
- snderr(so->so_proto->pr_flags & PR_CONNREQUIRED ?
- ENOTCONN : EDESTADDRREQ);
- }
- space = sbspace(&so->so_snd);
- if (flags & MSG_OOB)
- space += 1024;
- if ((atomic && resid > so->so_snd.sb_hiwat) ||
- clen > so->so_snd.sb_hiwat)
- snderr(EMSGSIZE);
- if (space < resid + clen && uio &&
- (atomic || space < so->so_snd.sb_lowat || space < clen)) {
- if (so->so_state & SS_NBIO)
- snderr(EWOULDBLOCK);
- sbunlock(&so->so_snd);
- error = sbwait(&so->so_snd);
- splx(s);
- if (error)
- goto out;
- goto restart;
- }
- splx(s);
- mp = &top;
- space -= clen;
- do {
- if (uio == NULL) {
- /*
- * Data is prepackaged in "top".
- */
- resid = 0;
- if (flags & MSG_EOR)
- top->m_flags |= M_EOR;
- } else do {
- if (top == 0) {
- MGETHDR(m, M_WAIT, MT_DATA);
- mlen = MHLEN;
- m->m_pkthdr.len = 0;
- m->m_pkthdr.rcvif = (struct ifnet *)0;
- } else {
- MGET(m, M_WAIT, MT_DATA);
- mlen = MLEN;
- }
- if (resid >= MINCLSIZE) {
- MCLGET(m, M_WAIT);
- if ((m->m_flags & M_EXT) == 0)
- goto nopages;
- mlen = MCLBYTES;
- len = min(min(mlen, resid), space);
- } else {
-nopages:
- len = min(min(mlen, resid), space);
- /*
- * For datagram protocols, leave room
- * for protocol headers in first mbuf.
- */
- if (atomic && top == 0 && len < mlen)
- MH_ALIGN(m, len);
- }
- space -= len;
- error = uiomove(mtod(m, caddr_t), (int)len, uio);
- resid = uio->uio_resid;
- m->m_len = len;
- *mp = m;
- top->m_pkthdr.len += len;
- if (error)
- goto release;
- mp = &m->m_next;
- if (resid <= 0) {
- if (flags & MSG_EOR)
- top->m_flags |= M_EOR;
- break;
- }
- } while (space > 0 && atomic);
- if (dontroute)
- so->so_options |= SO_DONTROUTE;
- s = splnet(); /* XXX */
- error = (*so->so_proto->pr_usrreqs->pru_send)(so,
- (flags & MSG_OOB) ? PRUS_OOB :
- /*
- * If the user set MSG_EOF, the protocol
- * understands this flag and nothing left to
- * send then use PRU_SEND_EOF instead of PRU_SEND.
- */
- ((flags & MSG_EOF) &&
- (so->so_proto->pr_flags & PR_IMPLOPCL) &&
- (resid <= 0)) ?
- PRUS_EOF : 0,
- top, addr, control);
- splx(s);
- if (dontroute)
- so->so_options &= ~SO_DONTROUTE;
- clen = 0;
- control = 0;
- top = 0;
- mp = &top;
- if (error)
- goto release;
- } while (resid && space > 0);
- } while (resid);
-
-release:
- sbunlock(&so->so_snd);
-out:
- if (top)
- m_freem(top);
- if (control)
- m_freem(control);
- return (error);
-}
-
-/*
- * Implement receive operations on a socket.
- * We depend on the way that records are added to the sockbuf
- * by sbappend*. In particular, each record (mbufs linked through m_next)
- * must begin with an address if the protocol so specifies,
- * followed by an optional mbuf or mbufs containing ancillary data,
- * and then zero or more mbufs of data.
- * In order to avoid blocking network interrupts for the entire time here,
- * we splx() while doing the actual copy to user space.
- * Although the sockbuf is locked, new data may still be appended,
- * and thus we must maintain consistency of the sockbuf during that time.
- *
- * The caller may receive the data as a single mbuf chain by supplying
- * an mbuf **mp0 for use in returning the chain. The uio is then used
- * only for the count in uio_resid.
- */
-int
-soreceive(so, paddr, uio, mp0, controlp, flagsp)
- register struct socket *so;
- struct mbuf **paddr;
- struct uio *uio;
- struct mbuf **mp0;
- struct mbuf **controlp;
- int *flagsp;
-{
- register struct mbuf *m, **mp;
- register int flags, len, error, s, offset;
- struct protosw *pr = so->so_proto;
- struct mbuf *nextrecord;
- int moff, type = 0;
- int orig_resid = uio->uio_resid;
-
- mp = mp0;
- if (paddr)
- *paddr = 0;
- if (controlp)
- *controlp = 0;
- if (flagsp)
- flags = *flagsp &~ MSG_EOR;
- else
- flags = 0;
- if (flags & MSG_OOB) {
- m = m_get(M_WAIT, MT_DATA);
- error = (*pr->pr_usrreqs->pru_rcvoob)(so, m, flags & MSG_PEEK);
- if (error)
- goto bad;
- do {
- error = uiomove(mtod(m, caddr_t),
- (int) min(uio->uio_resid, m->m_len), uio);
- m = m_free(m);
- } while (uio->uio_resid && error == 0 && m);
-bad:
- if (m)
- m_freem(m);
- return (error);
- }
- if (mp)
- *mp = (struct mbuf *)0;
- if (so->so_state & SS_ISCONFIRMING && uio->uio_resid)
- (*pr->pr_usrreqs->pru_rcvd)(so, 0);
-
-restart:
- error = sblock(&so->so_rcv, SBLOCKWAIT(flags));
- if (error)
- return (error);
- s = splnet();
-
- m = so->so_rcv.sb_mb;
- /*
- * If we have less data than requested, block awaiting more
- * (subject to any timeout) if:
- * 1. the current count is less than the low water mark, or
- * 2. MSG_WAITALL is set, and it is possible to do the entire
- * receive operation at once if we block (resid <= hiwat).
- * 3. MSG_DONTWAIT is not set
- * If MSG_WAITALL is set but resid is larger than the receive buffer,
- * we have to do the receive in sections, and thus risk returning
- * a short count if a timeout or signal occurs after we start.
- */
- if (m == 0 || (((flags & MSG_DONTWAIT) == 0 &&
- so->so_rcv.sb_cc < uio->uio_resid) &&
- (so->so_rcv.sb_cc < so->so_rcv.sb_lowat ||
- ((flags & MSG_WAITALL) && uio->uio_resid <= so->so_rcv.sb_hiwat)) &&
- m->m_nextpkt == 0 && (pr->pr_flags & PR_ATOMIC) == 0)) {
-#ifdef DIAGNOSTIC
- if (m == 0 && so->so_rcv.sb_cc)
- panic("receive 1");
-#endif
- if (so->so_error) {
- if (m)
- goto dontblock;
- error = so->so_error;
- if ((flags & MSG_PEEK) == 0)
- so->so_error = 0;
- goto release;
- }
- if (so->so_state & SS_CANTRCVMORE) {
- if (m)
- goto dontblock;
- else
- goto release;
- }
- for (; m; m = m->m_next)
- if (m->m_type == MT_OOBDATA || (m->m_flags & M_EOR)) {
- m = so->so_rcv.sb_mb;
- goto dontblock;
- }
- if ((so->so_state & (SS_ISCONNECTED|SS_ISCONNECTING)) == 0 &&
- (so->so_proto->pr_flags & PR_CONNREQUIRED)) {
- error = ENOTCONN;
- goto release;
- }
- if (uio->uio_resid == 0)
- goto release;
- if ((so->so_state & SS_NBIO) || (flags & MSG_DONTWAIT)) {
- error = EWOULDBLOCK;
- goto release;
- }
- sbunlock(&so->so_rcv);
- error = sbwait(&so->so_rcv);
- splx(s);
- if (error)
- return (error);
- goto restart;
- }
-dontblock:
- nextrecord = m->m_nextpkt;
- if (pr->pr_flags & PR_ADDR) {
-#ifdef DIAGNOSTIC
- if (m->m_type != MT_SONAME)
- panic("receive 1a");
-#endif
- orig_resid = 0;
- if (flags & MSG_PEEK) {
- if (paddr)
- *paddr = m_copy(m, 0, m->m_len);
- m = m->m_next;
- } else {
- sbfree(&so->so_rcv, m);
- if (paddr) {
- *paddr = m;
- so->so_rcv.sb_mb = m->m_next;
- m->m_next = 0;
- m = so->so_rcv.sb_mb;
- } else {
- MFREE(m, so->so_rcv.sb_mb);
- m = so->so_rcv.sb_mb;
- }
- }
- }
- while (m && m->m_type == MT_CONTROL && error == 0) {
- if (flags & MSG_PEEK) {
- if (controlp)
- *controlp = m_copy(m, 0, m->m_len);
- m = m->m_next;
- } else {
- sbfree(&so->so_rcv, m);
- if (controlp) {
- if (pr->pr_domain->dom_externalize &&
- mtod(m, struct cmsghdr *)->cmsg_type ==
- SCM_RIGHTS)
- error = (*pr->pr_domain->dom_externalize)(m);
- *controlp = m;
- so->so_rcv.sb_mb = m->m_next;
- m->m_next = 0;
- m = so->so_rcv.sb_mb;
- } else {
- MFREE(m, so->so_rcv.sb_mb);
- m = so->so_rcv.sb_mb;
- }
- }
- if (controlp) {
- orig_resid = 0;
- controlp = &(*controlp)->m_next;
- }
- }
- if (m) {
- if ((flags & MSG_PEEK) == 0)
- m->m_nextpkt = nextrecord;
- type = m->m_type;
- if (type == MT_OOBDATA)
- flags |= MSG_OOB;
- }
- moff = 0;
- offset = 0;
- while (m && uio->uio_resid > 0 && error == 0) {
- if (m->m_type == MT_OOBDATA) {
- if (type != MT_OOBDATA)
- break;
- } else if (type == MT_OOBDATA)
- break;
-#ifdef DIAGNOSTIC
- else if (m->m_type != MT_DATA && m->m_type != MT_HEADER)
- panic("receive 3");
-#endif
- so->so_state &= ~SS_RCVATMARK;
- len = uio->uio_resid;
- if (so->so_oobmark && len > so->so_oobmark - offset)
- len = so->so_oobmark - offset;
- if (len > m->m_len - moff)
- len = m->m_len - moff;
- /*
- * If mp is set, just pass back the mbufs.
- * Otherwise copy them out via the uio, then free.
- * Sockbuf must be consistent here (points to current mbuf,
- * it points to next record) when we drop priority;
- * we must note any additions to the sockbuf when we
- * block interrupts again.
- */
- if (mp == 0) {
- splx(s);
- error = uiomove(mtod(m, caddr_t) + moff, (int)len, uio);
- s = splnet();
- if (error)
- goto release;
- } else
- uio->uio_resid -= len;
- if (len == m->m_len - moff) {
- if (m->m_flags & M_EOR)
- flags |= MSG_EOR;
- if (flags & MSG_PEEK) {
- m = m->m_next;
- moff = 0;
- } else {
- nextrecord = m->m_nextpkt;
- sbfree(&so->so_rcv, m);
- if (mp) {
- *mp = m;
- mp = &m->m_next;
- so->so_rcv.sb_mb = m = m->m_next;
- *mp = (struct mbuf *)0;
- } else {
- MFREE(m, so->so_rcv.sb_mb);
- m = so->so_rcv.sb_mb;
- }
- if (m)
- m->m_nextpkt = nextrecord;
- }
- } else {
- if (flags & MSG_PEEK)
- moff += len;
- else {
- if (mp)
- *mp = m_copym(m, 0, len, M_WAIT);
- m->m_data += len;
- m->m_len -= len;
- so->so_rcv.sb_cc -= len;
- }
- }
- if (so->so_oobmark) {
- if ((flags & MSG_PEEK) == 0) {
- so->so_oobmark -= len;
- if (so->so_oobmark == 0) {
- so->so_state |= SS_RCVATMARK;
- break;
- }
- } else {
- offset += len;
- if (offset == so->so_oobmark)
- break;
- }
- }
- if (flags & MSG_EOR)
- break;
- /*
- * If the MSG_WAITALL flag is set (for non-atomic socket),
- * we must not quit until "uio->uio_resid == 0" or an error
- * termination. If a signal/timeout occurs, return
- * with a short count but without error.
- * Keep sockbuf locked against other readers.
- */
- while (flags & MSG_WAITALL && m == 0 && uio->uio_resid > 0 &&
- !sosendallatonce(so) && !nextrecord) {
- if (so->so_error || so->so_state & SS_CANTRCVMORE)
- break;
- error = sbwait(&so->so_rcv);
- if (error) {
- sbunlock(&so->so_rcv);
- splx(s);
- return (0);
- }
- m = so->so_rcv.sb_mb;
- if (m)
- nextrecord = m->m_nextpkt;
- }
- }
-
- if (m && pr->pr_flags & PR_ATOMIC) {
- flags |= MSG_TRUNC;
- if ((flags & MSG_PEEK) == 0)
- (void) sbdroprecord(&so->so_rcv);
- }
- if ((flags & MSG_PEEK) == 0) {
- if (m == 0)
- so->so_rcv.sb_mb = nextrecord;
- if (pr->pr_flags & PR_WANTRCVD && so->so_pcb)
- (*pr->pr_usrreqs->pru_rcvd)(so, flags);
- }
- if (orig_resid == uio->uio_resid && orig_resid &&
- (flags & MSG_EOR) == 0 && (so->so_state & SS_CANTRCVMORE) == 0) {
- sbunlock(&so->so_rcv);
- splx(s);
- goto restart;
- }
-
- if (flagsp)
- *flagsp |= flags;
-release:
- sbunlock(&so->so_rcv);
- splx(s);
- return (error);
-}
-
-int
-soshutdown(so, how)
- register struct socket *so;
- register int how;
-{
- register struct protosw *pr = so->so_proto;
-
- how++;
- if (how & FREAD)
- sorflush(so);
- if (how & FWRITE)
- return ((*pr->pr_usrreqs->pru_shutdown)(so));
- return (0);
-}
-
-void
-sorflush(so)
- register struct socket *so;
-{
- register struct sockbuf *sb = &so->so_rcv;
- register struct protosw *pr = so->so_proto;
- register int s;
- struct sockbuf asb;
-
- sb->sb_flags |= SB_NOINTR;
- (void) sblock(sb, M_WAITOK);
- s = splimp();
- socantrcvmore(so);
- sbunlock(sb);
- asb = *sb;
- bzero((caddr_t)sb, sizeof (*sb));
- splx(s);
- if (pr->pr_flags & PR_RIGHTS && pr->pr_domain->dom_dispose)
- (*pr->pr_domain->dom_dispose)(asb.sb_mb);
- sbrelease(&asb);
-}
-
-int
-sosetopt(so, level, optname, m0)
- register struct socket *so;
- int level, optname;
- struct mbuf *m0;
-{
- int error = 0;
- register struct mbuf *m = m0;
-
- if (level != SOL_SOCKET) {
- if (so->so_proto && so->so_proto->pr_ctloutput)
- return ((*so->so_proto->pr_ctloutput)
- (PRCO_SETOPT, so, level, optname, &m0));
- error = ENOPROTOOPT;
- } else {
- switch (optname) {
-
- case SO_LINGER:
- if (m == NULL || m->m_len != sizeof (struct linger)) {
- error = EINVAL;
- goto bad;
- }
- so->so_linger = mtod(m, struct linger *)->l_linger;
- /* fall thru... */
-
- case SO_DEBUG:
- case SO_KEEPALIVE:
- case SO_DONTROUTE:
- case SO_USELOOPBACK:
- case SO_BROADCAST:
- case SO_REUSEADDR:
- case SO_REUSEPORT:
- case SO_OOBINLINE:
- case SO_TIMESTAMP:
- if (m == NULL || m->m_len < sizeof (int)) {
- error = EINVAL;
- goto bad;
- }
- if (*mtod(m, int *))
- so->so_options |= optname;
- else
- so->so_options &= ~optname;
- break;
-
- case SO_SNDBUF:
- case SO_RCVBUF:
- case SO_SNDLOWAT:
- case SO_RCVLOWAT:
- {
- int optval;
-
- if (m == NULL || m->m_len < sizeof (int)) {
- error = EINVAL;
- goto bad;
- }
-
- /*
- * Values < 1 make no sense for any of these
- * options, so disallow them.
- */
- optval = *mtod(m, int *);
- if (optval < 1) {
- error = EINVAL;
- goto bad;
- }
-
- switch (optname) {
-
- case SO_SNDBUF:
- case SO_RCVBUF:
- if (sbreserve(optname == SO_SNDBUF ?
- &so->so_snd : &so->so_rcv,
- (u_long) optval) == 0) {
- error = ENOBUFS;
- goto bad;
- }
- break;
-
- /*
- * Make sure the low-water is never greater than
- * the high-water.
- */
- case SO_SNDLOWAT:
- so->so_snd.sb_lowat =
- (optval > so->so_snd.sb_hiwat) ?
- so->so_snd.sb_hiwat : optval;
- break;
- case SO_RCVLOWAT:
- so->so_rcv.sb_lowat =
- (optval > so->so_rcv.sb_hiwat) ?
- so->so_rcv.sb_hiwat : optval;
- break;
- }
- break;
- }
-
- case SO_SNDTIMEO:
- case SO_RCVTIMEO:
- {
- struct timeval *tv;
- unsigned long val;
-
- if (m == NULL || m->m_len < sizeof (*tv)) {
- error = EINVAL;
- goto bad;
- }
- tv = mtod(m, struct timeval *);
- if (tv->tv_sec >= (ULONG_MAX - hz) / hz) {
- error = EDOM;
- goto bad;
- }
- val = tv->tv_sec * hz + tv->tv_usec / tick;
-
- switch (optname) {
-
- case SO_SNDTIMEO:
- so->so_snd.sb_timeo = val;
- break;
- case SO_RCVTIMEO:
- so->so_rcv.sb_timeo = val;
- break;
- }
- break;
- }
-
- case SO_PRIVSTATE:
- /* we don't care what the parameter is... */
- so->so_state &= ~SS_PRIV;
- break;
-
- case SO_SNDWAKEUP:
- case SO_RCVWAKEUP:
- {
- /* RTEMS addition. */
- struct sockwakeup *sw;
- struct sockbuf *sb;
-
- if (m == NULL
- || m->m_len != sizeof (struct sockwakeup)) {
- error = EINVAL;
- goto bad;
- }
- sw = mtod(m, struct sockwakeup *);
- sb = (optname == SO_SNDWAKEUP
- ? &so->so_snd
- : &so->so_rcv);
- sb->sb_wakeup = sw->sw_pfn;
- sb->sb_wakeuparg = sw->sw_arg;
- if (sw->sw_pfn)
- sb->sb_flags |= SB_ASYNC;
- else
- sb->sb_flags &=~ SB_ASYNC;
- break;
- }
-
- default:
- error = ENOPROTOOPT;
- break;
- }
- if (error == 0 && so->so_proto && so->so_proto->pr_ctloutput) {
- (void) ((*so->so_proto->pr_ctloutput)
- (PRCO_SETOPT, so, level, optname, &m0));
- m = NULL; /* freed by protocol */
- }
- }
-bad:
- if (m)
- (void) m_free(m);
- return (error);
-}
-
-int
-sogetopt(so, level, optname, mp)
- register struct socket *so;
- int level, optname;
- struct mbuf **mp;
-{
- register struct mbuf *m;
-
- if (level != SOL_SOCKET) {
- if (so->so_proto && so->so_proto->pr_ctloutput) {
- return ((*so->so_proto->pr_ctloutput)
- (PRCO_GETOPT, so, level, optname, mp));
- } else
- return (ENOPROTOOPT);
- } else {
- m = m_get(M_WAIT, MT_SOOPTS);
- m->m_len = sizeof (int);
-
- switch (optname) {
-
- case SO_LINGER:
- m->m_len = sizeof (struct linger);
- mtod(m, struct linger *)->l_onoff =
- so->so_options & SO_LINGER;
- mtod(m, struct linger *)->l_linger = so->so_linger;
- break;
-
- case SO_USELOOPBACK:
- case SO_DONTROUTE:
- case SO_DEBUG:
- case SO_KEEPALIVE:
- case SO_REUSEADDR:
- case SO_REUSEPORT:
- case SO_BROADCAST:
- case SO_OOBINLINE:
- case SO_TIMESTAMP:
- *mtod(m, int *) = so->so_options & optname;
- break;
-
- case SO_PRIVSTATE:
- *mtod(m, int *) = so->so_state & SS_PRIV;
- break;
-
- case SO_TYPE:
- *mtod(m, int *) = so->so_type;
- break;
-
- case SO_ERROR:
- *mtod(m, int *) = so->so_error;
- so->so_error = 0;
- break;
-
- case SO_SNDBUF:
- *mtod(m, int *) = so->so_snd.sb_hiwat;
- break;
-
- case SO_RCVBUF:
- *mtod(m, int *) = so->so_rcv.sb_hiwat;
- break;
-
- case SO_SNDLOWAT:
- *mtod(m, int *) = so->so_snd.sb_lowat;
- break;
-
- case SO_RCVLOWAT:
- *mtod(m, int *) = so->so_rcv.sb_lowat;
- break;
-
- case SO_SNDTIMEO:
- case SO_RCVTIMEO:
- {
- unsigned long val = (optname == SO_SNDTIMEO ?
- so->so_snd.sb_timeo : so->so_rcv.sb_timeo);
-
- m->m_len = sizeof(struct timeval);
- mtod(m, struct timeval *)->tv_sec = val / hz;
- mtod(m, struct timeval *)->tv_usec =
- (val % hz) * tick;
- break;
- }
-
- case SO_SNDWAKEUP:
- case SO_RCVWAKEUP:
- {
- struct sockbuf *sb;
- struct sockwakeup *sw;
-
- /* RTEMS additions. */
- sb = (optname == SO_SNDWAKEUP
- ? &so->so_snd
- : &so->so_rcv);
- m->m_len = sizeof (struct sockwakeup);
- sw = mtod(m, struct sockwakeup *);
- sw->sw_pfn = sb->sb_wakeup;
- sw->sw_arg = sb->sb_wakeuparg;
- break;
- }
-
- default:
- (void)m_free(m);
- return (ENOPROTOOPT);
- }
- *mp = m;
- return (0);
- }
-}
-
-void
-sohasoutofband(so)
- register struct socket *so;
-{
-#if 0 /* FIXME: For now we just ignore out of band data */
- struct proc *p;
-
- if (so->so_pgid < 0)
- gsignal(-so->so_pgid, SIGURG);
- else if (so->so_pgid > 0 && (p = pfind(so->so_pgid)) != 0)
- psignal(p, SIGURG);
- selwakeup(&so->so_rcv.sb_sel);
-#endif
-}
diff --git a/cpukit/libnetworking/kern/uipc_socket2.c b/cpukit/libnetworking/kern/uipc_socket2.c
deleted file mode 100644
index 0539d2c5f3..0000000000
--- a/cpukit/libnetworking/kern/uipc_socket2.c
+++ /dev/null
@@ -1,965 +0,0 @@
-/*
- * This file has undergone several changes to reflect the
- * differences between the RTEMS and FreeBSD kernels.
- */
-
-/*
- * Copyright (c) 1982, 1986, 1988, 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)uipc_socket2.c 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/proc.h>
-#include <sys/file.h>
-#include <sys/buf.h>
-#include <sys/malloc.h>
-#include <sys/mbuf.h>
-#include <sys/protosw.h>
-#include <sys/stat.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/signalvar.h>
-#include <sys/sysctl.h>
-
-/*
- * Primitive routines for operating on sockets and socket buffers
- */
-
-u_long sb_max = SB_MAX; /* XXX should be static */
-SYSCTL_INT(_kern, KERN_MAXSOCKBUF, maxsockbuf, CTLFLAG_RW, &sb_max, 0, "")
-
-static u_long sb_efficiency = 8; /* parameter for sbreserve() */
-SYSCTL_INT(_kern, OID_AUTO, sockbuf_waste_factor, CTLFLAG_RW, &sb_efficiency,
- 0, "");
-
-/*
- * Procedures to manipulate state flags of socket
- * and do appropriate wakeups. Normal sequence from the
- * active (originating) side is that soisconnecting() is
- * called during processing of connect() call,
- * resulting in an eventual call to soisconnected() if/when the
- * connection is established. When the connection is torn down
- * soisdisconnecting() is called during processing of disconnect() call,
- * and soisdisconnected() is called when the connection to the peer
- * is totally severed. The semantics of these routines are such that
- * connectionless protocols can call soisconnected() and soisdisconnected()
- * only, bypassing the in-progress calls when setting up a ``connection''
- * takes no time.
- *
- * From the passive side, a socket is created with
- * two queues of sockets: so_q0 for connections in progress
- * and so_q for connections already made and awaiting user acceptance.
- * As a protocol is preparing incoming connections, it creates a socket
- * structure queued on so_q0 by calling sonewconn(). When the connection
- * is established, soisconnected() is called, and transfers the
- * socket structure to so_q, making it available to accept().
- *
- * If a socket is closed with sockets on either
- * so_q0 or so_q, these sockets are dropped.
- *
- * If higher level protocols are implemented in
- * the kernel, the wakeups done here will sometimes
- * cause software-interrupt process scheduling.
- */
-
-void
-soisconnecting(so)
- register struct socket *so;
-{
-
- so->so_state &= ~(SS_ISCONNECTED|SS_ISDISCONNECTING);
- so->so_state |= SS_ISCONNECTING;
-}
-
-void
-soisconnected(so)
- register struct socket *so;
-{
- register struct socket *head = so->so_head;
-
- so->so_state &= ~(SS_ISCONNECTING|SS_ISDISCONNECTING|SS_ISCONFIRMING);
- so->so_state |= SS_ISCONNECTED;
- if (head && (so->so_state & SS_INCOMP)) {
- TAILQ_REMOVE(&head->so_incomp, so, so_list);
- head->so_incqlen--;
- so->so_state &= ~SS_INCOMP;
- TAILQ_INSERT_TAIL(&head->so_comp, so, so_list);
- so->so_state |= SS_COMP;
- sorwakeup(head);
- soconnwakeup(head);
- } else {
- soconnwakeup(so);
- sorwakeup(so);
- sowwakeup(so);
- }
-}
-
-void
-soisdisconnecting(so)
- register struct socket *so;
-{
-
- so->so_state &= ~SS_ISCONNECTING;
- so->so_state |= (SS_ISDISCONNECTING|SS_CANTRCVMORE|SS_CANTSENDMORE);
- soconnwakeup(so);
- sowwakeup(so);
- sorwakeup(so);
-}
-
-void
-soisdisconnected(so)
- register struct socket *so;
-{
-
- so->so_state &= ~(SS_ISCONNECTING|SS_ISCONNECTED|SS_ISDISCONNECTING);
- so->so_state |= (SS_CANTRCVMORE|SS_CANTSENDMORE);
- soconnwakeup(so);
- sowwakeup(so);
- sorwakeup(so);
-}
-
-/*
- * Return a random connection that hasn't been serviced yet and
- * is eligible for discard. There is a one in qlen chance that
- * we will return a null, saying that there are no dropable
- * requests. In this case, the protocol specific code should drop
- * the new request. This insures fairness.
- *
- * This may be used in conjunction with protocol specific queue
- * congestion routines.
- */
-struct socket *
-sodropablereq(head)
- register struct socket *head;
-{
- register struct socket *so;
- unsigned int i, j, qlen, m;
-
- static int rnd;
- static long old_mono_secs;
- static unsigned int cur_cnt, old_cnt;
-
- if ((i = (m = rtems_bsdnet_seconds_since_boot()) - old_mono_secs) != 0) {
- old_mono_secs = m;
- old_cnt = cur_cnt / i;
- cur_cnt = 0;
- }
-
- so = TAILQ_FIRST(&head->so_incomp);
- if (!so)
- return (so);
-
- qlen = head->so_incqlen;
- if (++cur_cnt > qlen || old_cnt > qlen) {
- rnd = (314159 * rnd + 66329) & 0xffff;
- j = ((qlen + 1) * rnd) >> 16;
-
- while (j-- && so)
- so = TAILQ_NEXT(so, so_list);
- }
-
- return (so);
-}
-
-/*
- * When an attempt at a new connection is noted on a socket
- * which accepts connections, sonewconn is called. If the
- * connection is possible (subject to space constraints, etc.)
- * then we allocate a new structure, propoerly linked into the
- * data structure of the original socket, and return this.
- * Connstatus may be 0, or SO_ISCONFIRMING, or SO_ISCONNECTED.
- *
- * Currently, sonewconn() is defined as sonewconn1() in socketvar.h
- * to catch calls that are missing the (new) second parameter.
- */
-struct socket *
-sonewconn1(head, connstatus)
- register struct socket *head;
- int connstatus;
-{
- register struct socket *so;
-
- if (head->so_qlen > 3 * head->so_qlimit / 2)
- return ((struct socket *)0);
- MALLOC(so, struct socket *, sizeof(*so), M_SOCKET, M_DONTWAIT);
- if (so == NULL)
- return ((struct socket *)0);
- bzero((caddr_t)so, sizeof(*so));
- so->so_head = head;
- so->so_type = head->so_type;
- so->so_options = head->so_options &~ SO_ACCEPTCONN;
- so->so_linger = head->so_linger;
- so->so_state = head->so_state | SS_NOFDREF;
- so->so_proto = head->so_proto;
- so->so_timeo = head->so_timeo;
- so->so_pgid = head->so_pgid;
- so->so_uid = head->so_uid;
- (void) soreserve(so, head->so_snd.sb_hiwat, head->so_rcv.sb_hiwat);
- if (connstatus) {
- TAILQ_INSERT_TAIL(&head->so_comp, so, so_list);
- so->so_state |= SS_COMP;
- } else {
- TAILQ_INSERT_TAIL(&head->so_incomp, so, so_list);
- so->so_state |= SS_INCOMP;
- head->so_incqlen++;
- }
- head->so_qlen++;
- if ((*so->so_proto->pr_usrreqs->pru_attach)(so, 0)) {
- if (so->so_state & SS_COMP) {
- TAILQ_REMOVE(&head->so_comp, so, so_list);
- } else {
- TAILQ_REMOVE(&head->so_incomp, so, so_list);
- head->so_incqlen--;
- }
- head->so_qlen--;
- (void) free((caddr_t)so, M_SOCKET);
- return ((struct socket *)0);
- }
- if (connstatus) {
- sorwakeup(head);
- soconnwakeup(head);
- so->so_state |= connstatus;
- }
- return (so);
-}
-
-/*
- * Socantsendmore indicates that no more data will be sent on the
- * socket; it would normally be applied to a socket when the user
- * informs the system that no more data is to be sent, by the protocol
- * code (in case PRU_SHUTDOWN). Socantrcvmore indicates that no more data
- * will be received, and will normally be applied to the socket by a
- * protocol when it detects that the peer will send no more data.
- * Data queued for reading in the socket may yet be read.
- */
-
-void
-socantsendmore(so)
- struct socket *so;
-{
-
- so->so_state |= SS_CANTSENDMORE;
- sowwakeup(so);
-}
-
-void
-socantrcvmore(so)
- struct socket *so;
-{
-
- so->so_state |= SS_CANTRCVMORE;
- sorwakeup(so);
-}
-
-/*
- * Socket buffer (struct sockbuf) utility routines.
- *
- * Each socket contains two socket buffers: one for sending data and
- * one for receiving data. Each buffer contains a queue of mbufs,
- * information about the number of mbufs and amount of data in the
- * queue, and other fields allowing select() statements and notification
- * on data availability to be implemented.
- *
- * Data stored in a socket buffer is maintained as a list of records.
- * Each record is a list of mbufs chained together with the m_next
- * field. Records are chained together with the m_nextpkt field. The upper
- * level routine soreceive() expects the following conventions to be
- * observed when placing information in the receive buffer:
- *
- * 1. If the protocol requires each message be preceded by the sender's
- * name, then a record containing that name must be present before
- * any associated data (mbuf's must be of type MT_SONAME).
- * 2. If the protocol supports the exchange of ``access rights'' (really
- * just additional data associated with the message), and there are
- * ``rights'' to be received, then a record containing this data
- * should be present (mbuf's must be of type MT_RIGHTS).
- * 3. If a name or rights record exists, then it must be followed by
- * a data record, perhaps of zero length.
- *
- * Before using a new socket structure it is first necessary to reserve
- * buffer space to the socket, by calling sbreserve(). This should commit
- * some of the available buffer space in the system buffer pool for the
- * socket (currently, it does nothing but enforce limits). The space
- * should be released by calling sbrelease() when the socket is destroyed.
- */
-
-int
-soreserve(so, sndcc, rcvcc)
- register struct socket *so;
- u_long sndcc, rcvcc;
-{
-
- if (sbreserve(&so->so_snd, sndcc) == 0)
- goto bad;
- if (sbreserve(&so->so_rcv, rcvcc) == 0)
- goto bad2;
- if (so->so_rcv.sb_lowat == 0)
- so->so_rcv.sb_lowat = 1;
- if (so->so_snd.sb_lowat == 0)
- so->so_snd.sb_lowat = MCLBYTES;
- if (so->so_snd.sb_lowat > so->so_snd.sb_hiwat)
- so->so_snd.sb_lowat = so->so_snd.sb_hiwat;
- return (0);
-bad2:
- sbrelease(&so->so_snd);
-bad:
- return (ENOBUFS);
-}
-
-/*
- * Allot mbufs to a sockbuf.
- * Attempt to scale mbmax so that mbcnt doesn't become limiting
- * if buffering efficiency is near the normal case.
- */
-int
-sbreserve(sb, cc)
- struct sockbuf *sb;
- u_long cc;
-{
-
- if (cc > sb_max * MCLBYTES / (MSIZE + MCLBYTES))
- return (0);
- sb->sb_hiwat = cc;
- sb->sb_mbmax = min(cc * sb_efficiency, sb_max);
- if (sb->sb_lowat > sb->sb_hiwat)
- sb->sb_lowat = sb->sb_hiwat;
- return (1);
-}
-
-/*
- * Free mbufs held by a socket, and reserved mbuf space.
- */
-void
-sbrelease(sb)
- struct sockbuf *sb;
-{
-
- sbflush(sb);
- sb->sb_hiwat = sb->sb_mbmax = 0;
-}
-
-/*
- * Routines to add and remove
- * data from an mbuf queue.
- *
- * The routines sbappend() or sbappendrecord() are normally called to
- * append new mbufs to a socket buffer, after checking that adequate
- * space is available, comparing the function sbspace() with the amount
- * of data to be added. sbappendrecord() differs from sbappend() in
- * that data supplied is treated as the beginning of a new record.
- * To place a sender's address, optional access rights, and data in a
- * socket receive buffer, sbappendaddr() should be used. To place
- * access rights and data in a socket receive buffer, sbappendrights()
- * should be used. In either case, the new data begins a new record.
- * Note that unlike sbappend() and sbappendrecord(), these routines check
- * for the caller that there will be enough space to store the data.
- * Each fails if there is not enough space, or if it cannot find mbufs
- * to store additional information in.
- *
- * Reliable protocols may use the socket send buffer to hold data
- * awaiting acknowledgement. Data is normally copied from a socket
- * send buffer in a protocol with m_copy for output to a peer,
- * and then removing the data from the socket buffer with sbdrop()
- * or sbdroprecord() when the data is acknowledged by the peer.
- */
-
-/*
- * Append mbuf chain m to the last record in the
- * socket buffer sb. The additional space associated
- * the mbuf chain is recorded in sb. Empty mbufs are
- * discarded and mbufs are compacted where possible.
- */
-void
-sbappend(sb, m)
- struct sockbuf *sb;
- struct mbuf *m;
-{
- register struct mbuf *n;
-
- if (m == 0)
- return;
- n = sb->sb_mb;
- if (n) {
- while (n->m_nextpkt)
- n = n->m_nextpkt;
- do {
- if (n->m_flags & M_EOR) {
- sbappendrecord(sb, m); /* XXXXXX!!!! */
- return;
- }
- } while (n->m_next && (n = n->m_next));
- }
- sbcompress(sb, m, n);
-}
-
-#ifdef SOCKBUF_DEBUG
-void
-sbcheck(sb)
- register struct sockbuf *sb;
-{
- register struct mbuf *m;
- register int len = 0, mbcnt = 0;
-
- for (m = sb->sb_mb; m; m = m->m_next) {
- len += m->m_len;
- mbcnt += MSIZE;
- if (m->m_flags & M_EXT) /*XXX*/ /* pretty sure this is bogus */
- mbcnt += m->m_ext.ext_size;
- if (m->m_nextpkt)
- panic("sbcheck nextpkt");
- }
- if (len != sb->sb_cc || mbcnt != sb->sb_mbcnt) {
- printf("cc %d != %d || mbcnt %d != %d\n", len, sb->sb_cc,
- mbcnt, sb->sb_mbcnt);
- panic("sbcheck");
- }
-}
-#endif
-
-/*
- * As above, except the mbuf chain
- * begins a new record.
- */
-void
-sbappendrecord(sb, m0)
- register struct sockbuf *sb;
- register struct mbuf *m0;
-{
- register struct mbuf *m;
-
- if (m0 == 0)
- return;
- m = sb->sb_mb;
- if (m)
- while (m->m_nextpkt)
- m = m->m_nextpkt;
- /*
- * Put the first mbuf on the queue.
- * Note this permits zero length records.
- */
- sballoc(sb, m0);
- if (m)
- m->m_nextpkt = m0;
- else
- sb->sb_mb = m0;
- m = m0->m_next;
- m0->m_next = 0;
- if (m && (m0->m_flags & M_EOR)) {
- m0->m_flags &= ~M_EOR;
- m->m_flags |= M_EOR;
- }
- sbcompress(sb, m, m0);
-}
-
-/*
- * As above except that OOB data
- * is inserted at the beginning of the sockbuf,
- * but after any other OOB data.
- */
-void
-sbinsertoob(sb, m0)
- register struct sockbuf *sb;
- register struct mbuf *m0;
-{
- register struct mbuf *m;
- register struct mbuf **mp;
-
- if (m0 == 0)
- return;
- for (mp = &sb->sb_mb; *mp ; mp = &((*mp)->m_nextpkt)) {
- m = *mp;
- again:
- switch (m->m_type) {
-
- case MT_OOBDATA:
- continue; /* WANT next train */
-
- case MT_CONTROL:
- m = m->m_next;
- if (m)
- goto again; /* inspect THIS train further */
- }
- break;
- }
- /*
- * Put the first mbuf on the queue.
- * Note this permits zero length records.
- */
- sballoc(sb, m0);
- m0->m_nextpkt = *mp;
- *mp = m0;
- m = m0->m_next;
- m0->m_next = 0;
- if (m && (m0->m_flags & M_EOR)) {
- m0->m_flags &= ~M_EOR;
- m->m_flags |= M_EOR;
- }
- sbcompress(sb, m, m0);
-}
-
-/*
- * Append address and data, and optionally, control (ancillary) data
- * to the receive queue of a socket. If present,
- * m0 must include a packet header with total length.
- * Returns 0 if no space in sockbuf or insufficient mbufs.
- */
-int
-sbappendaddr(sb, asa, m0, control)
- register struct sockbuf *sb;
- struct sockaddr *asa;
- struct mbuf *m0, *control;
-{
- register struct mbuf *m, *n;
- int space = asa->sa_len;
-
-if (m0 && (m0->m_flags & M_PKTHDR) == 0)
-panic("sbappendaddr");
- if (m0)
- space += m0->m_pkthdr.len;
- for (n = control; n; n = n->m_next) {
- space += n->m_len;
- if (n->m_next == 0) /* keep pointer to last control buf */
- break;
- }
- if (space > sbspace(sb))
- return (0);
- if (asa->sa_len > MLEN)
- return (0);
- MGET(m, M_DONTWAIT, MT_SONAME);
- if (m == 0)
- return (0);
- m->m_len = asa->sa_len;
- bcopy((caddr_t)asa, mtod(m, caddr_t), asa->sa_len);
- if (n)
- n->m_next = m0; /* concatenate data to control */
- else
- control = m0;
- m->m_next = control;
- for (n = m; n; n = n->m_next)
- sballoc(sb, n);
- n = sb->sb_mb;
- if (n) {
- while (n->m_nextpkt)
- n = n->m_nextpkt;
- n->m_nextpkt = m;
- } else
- sb->sb_mb = m;
- return (1);
-}
-
-int
-sbappendcontrol(sb, m0, control)
- struct sockbuf *sb;
- struct mbuf *control, *m0;
-{
- register struct mbuf *m, *n;
- int space = 0;
-
- if (control == 0)
- panic("sbappendcontrol");
- for (m = control; ; m = m->m_next) {
- space += m->m_len;
- if (m->m_next == 0)
- break;
- }
- n = m; /* save pointer to last control buffer */
- for (m = m0; m; m = m->m_next)
- space += m->m_len;
- if (space > sbspace(sb))
- return (0);
- n->m_next = m0; /* concatenate data to control */
- for (m = control; m; m = m->m_next)
- sballoc(sb, m);
- n = sb->sb_mb;
- if (n) {
- while (n->m_nextpkt)
- n = n->m_nextpkt;
- n->m_nextpkt = control;
- } else
- sb->sb_mb = control;
- return (1);
-}
-
-/*
- * Compress mbuf chain m into the socket
- * buffer sb following mbuf n. If n
- * is null, the buffer is presumed empty.
- */
-void
-sbcompress(sb, m, n)
- register struct sockbuf *sb;
- register struct mbuf *m, *n;
-{
- register int eor = 0;
- register struct mbuf *o;
-
- while (m) {
- eor |= m->m_flags & M_EOR;
- if (m->m_len == 0 &&
- (eor == 0 ||
- (((o = m->m_next) || (o = n)) &&
- o->m_type == m->m_type))) {
- m = m_free(m);
- continue;
- }
- if (n && (n->m_flags & (M_EXT | M_EOR)) == 0 &&
- (n->m_data + n->m_len + m->m_len) < &n->m_dat[MLEN] &&
- n->m_type == m->m_type) {
- bcopy(mtod(m, caddr_t), mtod(n, caddr_t) + n->m_len,
- (unsigned)m->m_len);
- n->m_len += m->m_len;
- sb->sb_cc += m->m_len;
- m = m_free(m);
- continue;
- }
- if (n)
- n->m_next = m;
- else
- sb->sb_mb = m;
- sballoc(sb, m);
- n = m;
- m->m_flags &= ~M_EOR;
- m = m->m_next;
- n->m_next = 0;
- }
- if (eor) {
- if (n)
- n->m_flags |= eor;
- else
- printf("semi-panic: sbcompress\n");
- }
-}
-
-/*
- * Free all mbufs in a sockbuf.
- * Check that all resources are reclaimed.
- */
-void
-sbflush(sb)
- register struct sockbuf *sb;
-{
-
- if (sb->sb_flags & SB_LOCK)
- panic("sbflush");
- while (sb->sb_mbcnt)
- sbdrop(sb, (int)sb->sb_cc);
- if (sb->sb_cc || sb->sb_mb)
- panic("sbflush 2");
-}
-
-/*
- * Drop data from (the front of) a sockbuf.
- */
-void
-sbdrop(sb, len)
- register struct sockbuf *sb;
- register int len;
-{
- register struct mbuf *m, *mn;
- struct mbuf *next;
-
- next = (m = sb->sb_mb) ? m->m_nextpkt : 0;
- while (len > 0) {
- if (m == 0) {
- if (next == 0)
- panic("sbdrop");
- m = next;
- next = m->m_nextpkt;
- continue;
- }
- if (m->m_len > len) {
- m->m_len -= len;
- m->m_data += len;
- sb->sb_cc -= len;
- break;
- }
- len -= m->m_len;
- sbfree(sb, m);
- MFREE(m, mn);
- m = mn;
- }
- while (m && m->m_len == 0) {
- sbfree(sb, m);
- MFREE(m, mn);
- m = mn;
- }
- if (m) {
- sb->sb_mb = m;
- m->m_nextpkt = next;
- } else
- sb->sb_mb = next;
-}
-
-/*
- * Drop a record off the front of a sockbuf
- * and move the next record to the front.
- */
-void
-sbdroprecord(sb)
- register struct sockbuf *sb;
-{
- register struct mbuf *m, *mn;
-
- m = sb->sb_mb;
- if (m) {
- sb->sb_mb = m->m_nextpkt;
- do {
- sbfree(sb, m);
- MFREE(m, mn);
- m = mn;
- } while (m);
- }
-}
-
-/*
- * Create a "control" mbuf containing the specified data
- * with the specified type for presentation on a socket buffer.
- */
-struct mbuf *
-sbcreatecontrol(p, size, type, level)
- caddr_t p;
- register int size;
- int type, level;
-{
- register struct cmsghdr *cp;
- struct mbuf *m;
-
- if ((m = m_get(M_DONTWAIT, MT_CONTROL)) == NULL)
- return ((struct mbuf *) NULL);
- cp = mtod(m, struct cmsghdr *);
- /* XXX check size? */
- (void)memcpy(CMSG_DATA(cp), p, size);
- size += sizeof(*cp);
- m->m_len = size;
- cp->cmsg_len = size;
- cp->cmsg_level = level;
- cp->cmsg_type = type;
- return (m);
-}
-
-#ifdef PRU_OLDSTYLE
-/*
- * The following routines mediate between the old-style `pr_usrreq'
- * protocol implementations and the new-style `struct pr_usrreqs'
- * calling convention.
- */
-
-/* syntactic sugar */
-#define nomb (struct mbuf *)0
-
-static int
-old_abort(struct socket *so)
-{
- return so->so_proto->pr_ousrreq(so, PRU_ABORT, nomb, nomb, nomb);
-}
-
-static int
-old_accept(struct socket *so, struct mbuf *nam)
-{
- return so->so_proto->pr_ousrreq(so, PRU_ACCEPT, nomb, nam, nomb);
-}
-
-static int
-old_attach(struct socket *so, int proto)
-{
- return so->so_proto->pr_ousrreq(so, PRU_ATTACH, nomb,
- (struct mbuf *)proto, /* XXX */
- nomb);
-}
-
-static int
-old_bind(struct socket *so, struct mbuf *nam)
-{
- return so->so_proto->pr_ousrreq(so, PRU_BIND, nomb, nam, nomb);
-}
-
-static int
-old_connect(struct socket *so, struct mbuf *nam)
-{
- return so->so_proto->pr_ousrreq(so, PRU_CONNECT, nomb, nam, nomb);
-}
-
-static int
-old_connect2(struct socket *so1, struct socket *so2)
-{
- return so1->so_proto->pr_ousrreq(so1, PRU_CONNECT2, nomb,
- (struct mbuf *)so2, nomb);
-}
-
-static int
-old_control(struct socket *so, int cmd, caddr_t data, struct ifnet *ifp)
-{
- return so->so_proto->pr_ousrreq(so, PRU_CONTROL, (struct mbuf *)cmd,
- (struct mbuf *)data,
- (struct mbuf *)ifp);
-}
-
-static int
-old_detach(struct socket *so)
-{
- return so->so_proto->pr_ousrreq(so, PRU_DETACH, nomb, nomb, nomb);
-}
-
-static int
-old_disconnect(struct socket *so)
-{
- return so->so_proto->pr_ousrreq(so, PRU_DISCONNECT, nomb, nomb, nomb);
-}
-
-static int
-old_listen(struct socket *so)
-{
- return so->so_proto->pr_ousrreq(so, PRU_LISTEN, nomb, nomb, nomb);
-}
-
-static int
-old_peeraddr(struct socket *so, struct mbuf *nam)
-{
- return so->so_proto->pr_ousrreq(so, PRU_PEERADDR, nomb, nam, nomb);
-}
-
-static int
-old_rcvd(struct socket *so, int flags)
-{
- return so->so_proto->pr_ousrreq(so, PRU_RCVD, nomb,
- (struct mbuf *)flags, /* XXX */
- nomb);
-}
-
-static int
-old_rcvoob(struct socket *so, struct mbuf *m, int flags)
-{
- return so->so_proto->pr_ousrreq(so, PRU_RCVOOB, m,
- (struct mbuf *)flags, /* XXX */
- nomb);
-}
-
-static int
-old_send(struct socket *so, int flags, struct mbuf *m, struct mbuf *addr,
- struct mbuf *control)
-{
- int req;
-
- if (flags & PRUS_OOB) {
- req = PRU_SENDOOB;
- } else if(flags & PRUS_EOF) {
- req = PRU_SEND_EOF;
- } else {
- req = PRU_SEND;
- }
- return so->so_proto->pr_ousrreq(so, req, m, addr, control);
-}
-
-static int
-old_sense(struct socket *so, struct stat *sb)
-{
- return so->so_proto->pr_ousrreq(so, PRU_SENSE, (struct mbuf *)sb,
- nomb, nomb);
-}
-
-static int
-old_shutdown(struct socket *so)
-{
- return so->so_proto->pr_ousrreq(so, PRU_SHUTDOWN, nomb, nomb, nomb);
-}
-
-static int
-old_sockaddr(struct socket *so, struct mbuf *nam)
-{
- return so->so_proto->pr_ousrreq(so, PRU_SOCKADDR, nomb, nam, nomb);
-}
-
-struct pr_usrreqs pru_oldstyle = {
- old_abort, old_accept, old_attach, old_bind, old_connect,
- old_connect2, old_control, old_detach, old_disconnect,
- old_listen, old_peeraddr, old_rcvd, old_rcvoob, old_send,
- old_sense, old_shutdown, old_sockaddr
-};
-
-#endif /* PRU_OLDSTYLE */
-
-/*
- * Some routines that return EOPNOTSUPP for entry points that are not
- * supported by a protocol. Fill in as needed.
- */
-int
-pru_accept_notsupp(struct socket *so, struct mbuf *nam)
-{
- return EOPNOTSUPP;
-}
-
-int
-pru_connect2_notsupp(struct socket *so1, struct socket *so2)
-{
- return EOPNOTSUPP;
-}
-
-int
-pru_control_notsupp(struct socket *so, int cmd, caddr_t data,
- struct ifnet *ifp)
-{
- return EOPNOTSUPP;
-}
-
-int
-pru_listen_notsupp(struct socket *so)
-{
- return EOPNOTSUPP;
-}
-
-int
-pru_rcvd_notsupp(struct socket *so, int flags)
-{
- return EOPNOTSUPP;
-}
-
-int
-pru_rcvoob_notsupp(struct socket *so, struct mbuf *m, int flags)
-{
- return EOPNOTSUPP;
-}
-
-/*
- * This isn't really a ``null'' operation, but it's the default one
- * and doesn't do anything destructive.
- */
-int
-pru_sense_null(struct socket *so, struct stat *sb)
-{
- sb->st_blksize = so->so_snd.sb_hiwat;
- return 0;
-}
-
diff --git a/cpukit/libnetworking/lib/Makefile.am b/cpukit/libnetworking/lib/Makefile.am
deleted file mode 100644
index 5f8d151e13..0000000000
--- a/cpukit/libnetworking/lib/Makefile.am
+++ /dev/null
@@ -1,33 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-LIBNAME = lib.a
-LIB = $(ARCH)/$(LIBNAME)
-
-C_FILES = getprotoby.c rtems_bsdnet_ntp.c syslog.c tftpDriver.c
-C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
-
-OBJS = $(C_O_FILES)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../automake/lib.am
-
-#
-# Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -DNOPOLL -DNOSELECT
-
-$(LIB): $(OBJS)
- $(make-library)
-
-all-local: $(ARCH) $(OBJS) $(LIB)
-
-.PRECIOUS: $(LIB)
-
-EXTRA_DIST = README getprotoby.c rtems_bsdnet_ntp.c syslog.c tftpDriver.c
-
-include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/libnetworking/lib/README b/cpukit/libnetworking/lib/README
deleted file mode 100644
index 998bd5e708..0000000000
--- a/cpukit/libnetworking/lib/README
+++ /dev/null
@@ -1,5 +0,0 @@
-#
-# $Id$
-#
-
-Sources from application-level (as opposed to kernel-level) libraries.
diff --git a/cpukit/libnetworking/lib/getprotoby.c b/cpukit/libnetworking/lib/getprotoby.c
deleted file mode 100644
index fc8de6e402..0000000000
--- a/cpukit/libnetworking/lib/getprotoby.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * $Id$
- */
-
-#include <netdb.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-
-static const struct protoent prototab[] = {
- { "ip", NULL, IPPROTO_IP },
- { "icmp", NULL, IPPROTO_ICMP },
- { "tcp", NULL, IPPROTO_TCP },
- { "udp", NULL, IPPROTO_UDP },
- };
-
-/*
- * Dummy version of BSD getprotobyname()
- */
-struct protoent *
-getprotobyname (const char *name)
-{
- int i;
-
- for (i = 0 ; i < (sizeof prototab / sizeof prototab[0]) ; i++) {
- if (strcmp (name, prototab[i].p_name) == 0)
- return (struct protoent *) &prototab[i];
- }
- return NULL;
-}
-
-/*
- * Dummy version of BSD getprotobynumber()
- */
-struct protoent *
-getprotobynumber (int proto)
-{
- int i;
-
- for (i = 0 ; i < (sizeof prototab / sizeof prototab[0]) ; i++) {
- if (proto == prototab[i].p_proto)
- return (struct protoent *) &prototab[i];
- }
- return NULL;
-}
diff --git a/cpukit/libnetworking/lib/rtems_bsdnet_ntp.c b/cpukit/libnetworking/lib/rtems_bsdnet_ntp.c
deleted file mode 100644
index 11b0cef63a..0000000000
--- a/cpukit/libnetworking/lib/rtems_bsdnet_ntp.c
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Synchronize with an NTP server
- *
- * This program may be distributed and used for any purpose.
- * I ask only that you:
- * 1. Leave this author information intact.
- * 2. Document any changes you make.
- *
- * W. Eric Norum
- * Canadian Light Source
- * University of Saskatchewan
- * Saskatoon, Saskatchewan, CANADA
- * eric@cls.usask.ca
- *
- * $Id$
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <time.h>
-#include <limits.h>
-#include <rtems.h>
-#include <rtems/rtems_bsdnet.h>
-#include <rtems/error.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-
-/*
- * RTEMS base: 1988, January 1
- * UNIX base: 1970, January 1
- * NTP base: 1900, January 1
- */
-#define UNIX_BASE_TO_NTP_BASE (((70UL*365UL)+17UL) * (24*60*60))
-
-struct timestamp {
- rtems_unsigned32 integer;
- rtems_unsigned32 fraction;
-};
-
-struct ntpPacketSmall {
- rtems_unsigned8 li_vn_mode;
- rtems_unsigned8 stratum;
- rtems_signed8 poll_interval;
- rtems_signed8 precision;
- rtems_signed32 root_delay;
- rtems_signed32 root_dispersion;
- char reference_identifier[4];
- struct timestamp reference_timestamp;
- struct timestamp originate_timestamp;
- struct timestamp receive_timestamp;
- struct timestamp transmit_timestamp;
-};
-
-struct ntpPacket {
- struct ntpPacketSmall ntp;
- char authenticator[96];
-};
-
-static int
-processPacket (struct ntpPacketSmall *p)
-{
- time_t tbuf;
- struct tm *lt;
- rtems_time_of_day rt;
- rtems_interval ticks_per_second;
-
- if (((p->li_vn_mode & (0x7 << 3)) != (3 << 3))
- || ((p->transmit_timestamp.integer == 0) && (p->transmit_timestamp.fraction == 0)))
- return 0;
- rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticks_per_second);
- tbuf = ntohl (p->transmit_timestamp.integer) - UNIX_BASE_TO_NTP_BASE - rtems_bsdnet_timeoffset;
- lt = gmtime (&tbuf);
- rt.year = lt->tm_year + 1900;
- rt.month = lt->tm_mon + 1;
- rt.day = lt->tm_mday;
- rt.hour = lt->tm_hour;
- rt.minute = lt->tm_min;
- rt.second = lt->tm_sec;
- rt.ticks = ntohl (p->transmit_timestamp.fraction) / (ULONG_MAX / ticks_per_second);
- if (rt.ticks >= ticks_per_second)
- rt.ticks = ticks_per_second - 1;
- rtems_clock_set (&rt);
- return 1;
-}
-
-int
-rtems_bsdnet_synchronize_ntp (int interval, rtems_task_priority priority)
-{
- int s;
- int i;
- static struct sockaddr_in myAddr, farAddr;
- int fromlen;
- struct ntpPacketSmall packet;
- struct timeval tv;
-
- if (interval != 0) {
- printf ("Daemon-mode note yet supported.\n");
- errno = EINVAL;
- return -1;
- }
- s = socket (AF_INET, SOCK_DGRAM, 0);
- if (s < 0) {
- printf ("Can't create socket: %s\n", strerror (errno));
- return -1;
- }
- tv.tv_sec = 5;
- tv.tv_usec = 0;
- if (setsockopt (s, SOL_SOCKET, SO_RCVTIMEO, (char *)&tv, sizeof tv) < 0) {
- printf ("Can't set socket receive timeout: %s", strerror (errno));
- return -1;
- }
- memset (&myAddr, sizeof myAddr, 0);
- myAddr.sin_family = AF_INET;
- myAddr.sin_port = htons (123);
- myAddr.sin_addr.s_addr = htonl (INADDR_ANY);
- if (bind (s, (struct sockaddr *)&myAddr, sizeof myAddr) < 0) {
- printf ("Can't bind socket: %s\n", strerror (errno));
- return -1;
- }
- for (;;) {
- /*
- * If there's no server we just have to wait
- * and hope that there's an NTP broadcast
- * server out there somewhere.
- */
- if (rtems_bsdnet_ntpserver_count > 0) {
- memset (&farAddr, sizeof farAddr, 0);
- farAddr.sin_family = AF_INET;
- farAddr.sin_port = htons (123);
- /*
- * For now, try only the first server.
- */
- farAddr.sin_addr = rtems_bsdnet_ntpserver[0];
- memset (&packet, sizeof packet, 0);
- packet.li_vn_mode = (3 << 3) | 3; /* NTP version 3, client */
- i = sendto (s, &packet, sizeof packet, 0, (struct sockaddr *)&farAddr, sizeof farAddr);
- if (i != sizeof packet) {
- printf ("Can't send: %s\n", strerror (errno));
- return -1;
- }
- }
- fromlen = sizeof farAddr;
- i = recvfrom (s, &packet, sizeof packet, 0, (struct sockaddr *)&farAddr, &fromlen);
- if (i == 0)
- rtems_panic ("EOF");
- if (i < 0) {
- if ((errno == EWOULDBLOCK) || (errno == EAGAIN))
- continue;
- rtems_panic ("Can't receive: %s", strerror (errno));
- }
- if (i >= sizeof packet) {
- if (processPacket (&packet))
- return 0;
- }
- }
-}
diff --git a/cpukit/libnetworking/lib/syslog.c b/cpukit/libnetworking/lib/syslog.c
deleted file mode 100644
index 0bb15bc78e..0000000000
--- a/cpukit/libnetworking/lib/syslog.c
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- * RTEMS version of syslog and associated routines
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include <stdio.h>
-#include <stdarg.h>
-#include <errno.h>
-#include <syslog.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-
-#include <unistd.h>
-
-static int LogStatus = LOG_CONS;
-static const char *LogTag = "syslog";
-static int LogFacility = LOG_USER;
-static int LogMask = 0xff;
-
-static int LogFd = -1;
-static rtems_id LogSemaphore;
-extern struct in_addr rtems_bsdnet_log_host_address;
-
-#define SYSLOG_PORT 514
-
-void
-syslog (int pri, const char *fmt, ...)
-{
- va_list ap;
-
- va_start (ap, fmt);
- vsyslog (pri, fmt, ap);
- va_end (ap);
-}
-
-/*
- * FIXME: Should cbuf be static? It could be if we put the mutex
- * around the entire body of this routine. Then we wouldn't
- * have to worry about blowing stacks with a local variable
- * that large. Could make cbuf bigger, too.
- */
-void
-vsyslog (int pri, const char *fmt, va_list ap)
-{
- int cnt;
- char *cp;
- char *msgp, cbuf[200];
- int sent;
-
- if (pri & ~(LOG_PRIMASK|LOG_FACMASK)) {
- syslog (LOG_ERR|LOG_CONS|LOG_PERROR|LOG_PID,
- "syslog: unknown facility/priority: %#x", pri);
- pri &= LOG_PRIMASK|LOG_FACMASK;
- }
-
- if (!LOG_MASK(LOG_PRI(pri)) & LogMask)
- return;
-
- if ((pri & LOG_FACMASK) == 0)
- pri |= LogFacility;
-
- cnt = sprintf (cbuf, "<%d>", pri);
- cp = msgp = cbuf + cnt;
- if (LogTag) {
- const char *lp = LogTag;
- while ((*cp = *lp++) != '\0')
- cp++;
- }
- if (LogStatus & LOG_PID) {
- rtems_id tid;
- rtems_task_ident (RTEMS_SELF, 0, &tid);
- cnt = sprintf (cp, "[%#lx]", (unsigned long)tid);
- cp += cnt;
- }
- if (LogTag) {
- *cp++ = ':';
- *cp++ = ' ';
- }
- cnt = vsprintf (cp, fmt, ap);
- cnt += cp - cbuf;
- if (cbuf[cnt-1] == '\n')
- cbuf[--cnt] = '\0';
-
- if (LogStatus & LOG_PERROR)
- printf ("%s\n", cbuf);
-
- /*
- * Grab the mutex
- */
- sent = 0;
- if ((rtems_bsdnet_log_host_address.s_addr != INADDR_ANY)
- && (LogFd >= 0)
- && (rtems_semaphore_obtain (LogSemaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT) == RTEMS_SUCCESSFUL)) {
- /*
- * Set the destination address/port
- */
- struct sockaddr_in farAddress;
- farAddress.sin_family = AF_INET;
- farAddress.sin_port = htons (SYSLOG_PORT);
- farAddress.sin_addr = rtems_bsdnet_log_host_address;
- memset (farAddress.sin_zero, '\0', sizeof farAddress.sin_zero);
-
- /*
- * Send the message
- */
- if (sendto (LogFd, cbuf, cnt, 0, (struct sockaddr *)&farAddress, sizeof farAddress) >= 0)
- sent = 1;
- rtems_semaphore_release (LogSemaphore);
- }
- if (!sent && (LogStatus & LOG_CONS) && !(LogStatus & LOG_PERROR))
- printf ("%s\n", msgp);
-}
-
-void
-openlog (const char *ident, int logstat, int logfac)
-{
- rtems_status_code sc;
- struct sockaddr_in myAddress;
-
- if (ident != NULL)
- LogTag = ident;
- LogStatus = logstat;
- if (logfac != 0 && (logfac & ~LOG_FACMASK) == 0)
- LogFacility = logfac;
-
- /*
- * Create the socket
- */
- if ((LogFd = socket (AF_INET, SOCK_DGRAM, 0)) < 0) {
- printf ("Can't create syslog socket: %d\n", errno);
- return;
- }
-
- /*
- * Bind socket to name
- */
- myAddress.sin_family = AF_INET;
- myAddress.sin_addr.s_addr = INADDR_ANY;
- myAddress.sin_port = 0;
- memset (myAddress.sin_zero, '\0', sizeof myAddress.sin_zero);
- if (bind (LogFd, (struct sockaddr *)&myAddress, sizeof (myAddress)) < 0) {
- close (LogFd);
- LogFd = -1;
- printf ("Can't bind syslog socket: %d\n", errno);
- return;
- }
-
- /*
- * Create the mutex
- */
- sc = rtems_semaphore_create (rtems_build_name('s', 'L', 'o', 'g'),
- 1,
- RTEMS_PRIORITY |
- RTEMS_BINARY_SEMAPHORE |
- RTEMS_INHERIT_PRIORITY |
- RTEMS_NO_PRIORITY_CEILING |
- RTEMS_LOCAL,
- 0,
- &LogSemaphore);
- if (sc != RTEMS_SUCCESSFUL) {
- printf ("Can't create syslog seamphore: %d\n", sc);
- close (LogFd);
- LogFd = -1;
- }
-}
-
-void
-closelog(void)
-{
- if (LogFd >= 0) {
- close (LogFd);
- LogFd = -1;
- rtems_semaphore_delete (LogSemaphore);
- }
-}
-
-int
-setlogmask (int pmask)
-{
- int omask;
-
- omask = LogMask;
- if (pmask != 0)
- LogMask = pmask;
- return (omask);
-}
diff --git a/cpukit/libnetworking/lib/tftpDriver.c b/cpukit/libnetworking/lib/tftpDriver.c
deleted file mode 100644
index ea3de5a901..0000000000
--- a/cpukit/libnetworking/lib/tftpDriver.c
+++ /dev/null
@@ -1,775 +0,0 @@
-/*
- * Trivial File Transfer Protocol (RFC 1350)
- *
- * Transfer file to/from remote host
- *
- * W. Eric Norum
- * Saskatchewan Accelerator Laboratory
- * University of Saskatchewan
- * Saskatoon, Saskatchewan, CANADA
- * eric@skatter.usask.ca
- *
- * $Id$
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <malloc.h>
-#include <string.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <rtems.h>
-#include <rtems/libio.h>
-#include <rtems/rtems_bsdnet.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-#ifndef set_errno_and_return_minus_one
-#define set_errno_and_return_minus_one( _error ) \
- do { errno = (_error); return -1; } while(0)
-#endif
-
-
-/*
- * Range of UDP ports to try
- */
-#define UDP_PORT_BASE 3180
-
-/*
- * Pathname prefix
- */
-#define TFTP_PATHNAME_PREFIX "/TFTP/"
-
-/*
- * Default limits
- */
-#define PACKET_REPLY_MILLISECONDS 6000
-#define OPEN_RETRY_LIMIT 10
-#define IO_RETRY_LIMIT 10
-
-/*
- * TFTP opcodes
- */
-#define TFTP_OPCODE_RRQ 1
-#define TFTP_OPCODE_WRQ 2
-#define TFTP_OPCODE_DATA 3
-#define TFTP_OPCODE_ACK 4
-#define TFTP_OPCODE_ERROR 5
-
-/*
- * Largest data transfer
- */
-#define TFTP_BUFSIZE 512
-
-/*
- * Packets transferred between machines
- */
-union tftpPacket {
- /*
- * RRQ/WRQ packet
- */
- struct tftpRWRQ {
- rtems_unsigned16 opcode;
- char filename_mode[TFTP_BUFSIZE];
- } tftpRWRQ;
-
- /*
- * DATA packet
- */
- struct tftpDATA {
- rtems_unsigned16 opcode;
- rtems_unsigned16 blocknum;
- rtems_unsigned8 data[TFTP_BUFSIZE];
- } tftpDATA;
-
- /*
- * ACK packet
- */
- struct tftpACK {
- rtems_unsigned16 opcode;
- rtems_unsigned16 blocknum;
- } tftpACK;
-
- /*
- * ERROR packet
- */
- struct tftpERROR {
- rtems_unsigned16 opcode;
- rtems_unsigned16 errorCode;
- char errorMessage[TFTP_BUFSIZE];
- } tftpERROR;
-};
-
-/*
- * State of each TFTP stream
- */
-struct tftpStream {
- /*
- * Buffer for storing most recently-received packet
- */
- union tftpPacket pkbuf;
-
- /*
- * Last block number received
- */
- rtems_unsigned16 blocknum;
-
- /*
- * Data transfer socket
- */
- int socket;
- struct sockaddr_in myAddress;
- struct sockaddr_in farAddress;
-
- /*
- * Indices into buffer
- */
- int nleft;
- int nused;
-
- /*
- * Flags
- */
- int firstReply;
- int eof;
-};
-
-/*
- * Number of streams open at the same time
- */
-
-static rtems_id tftp_mutex;
-static int nStreams;
-static struct tftpStream ** volatile tftpStreams;
-
-typedef const char *tftp_node;
-extern rtems_filesystem_operations_table rtems_tftp_ops;
-extern rtems_filesystem_file_handlers_r rtems_tftp_handlers;
-
-/*
- * Direct copy from the IMFS. Look at this.
- */
-
-rtems_filesystem_limits_and_options_t rtems_tftp_limits_and_options = {
- 5, /* link_max */
- 6, /* max_canon */
- 7, /* max_input */
- 255, /* name_max */
- 255, /* path_max */
- 2, /* pipe_buf */
- 1, /* posix_async_io */
- 2, /* posix_chown_restrictions */
- 3, /* posix_no_trunc */
- 4, /* posix_prio_io */
- 5, /* posix_sync_io */
- 6 /* posix_vdisable */
-};
-
-int rtems_tftp_mount_me(
- rtems_filesystem_mount_table_entry_t *temp_mt_entry
-)
-{
- rtems_status_code sc;
-
- temp_mt_entry->mt_fs_root.handlers = &rtems_tftp_handlers;
- temp_mt_entry->mt_fs_root.ops = &rtems_tftp_ops;
-
- /*
- * We have no tftp filesystem specific data to maintain. This
- * filesystem may only be mounted ONCE.
- *
- * And we maintain no real filesystem nodes, so there is no real root.
- */
-
- temp_mt_entry->fs_info = NULL;
- temp_mt_entry->mt_fs_root.node_access = NULL;
-
- /*
- * These need to be looked at for full POSIX semantics.
- */
-
- temp_mt_entry->pathconf_limits_and_options = rtems_tftp_limits_and_options;
-
-
- /*
- * Now allocate a semaphore for mutual exclusion.
- *
- * NOTE: This could be in an fsinfo for this filesystem type.
- */
-
- sc = rtems_semaphore_create (
- rtems_build_name('T', 'F', 'T', 'P'),
- 1,
- RTEMS_FIFO |
- RTEMS_BINARY_SEMAPHORE |
- RTEMS_NO_INHERIT_PRIORITY |
- RTEMS_NO_PRIORITY_CEILING |
- RTEMS_LOCAL,
- 0,
- &tftp_mutex
- );
-
- if (sc != RTEMS_SUCCESSFUL)
- set_errno_and_return_minus_one( ENOMEM );
-
- return 0;
-}
-
-/*
- * Initialize the TFTP driver
- */
-
-int rtems_bsdnet_initialize_tftp_filesystem ()
-{
- int status;
- rtems_filesystem_mount_table_entry_t *entry;
-
- status = mkdir( TFTP_PATHNAME_PREFIX, S_IRWXU | S_IRWXG | S_IRWXO );
- if ( status == -1 )
- return status;
-
- status = mount(
- &entry,
- &rtems_tftp_ops,
- RTEMS_FILESYSTEM_READ_ONLY,
- NULL,
- TFTP_PATHNAME_PREFIX
- );
-
- if ( status )
- perror( "TFTP mount failed" );
-
- return status;
-}
-
-/*
- * Set error message
- * This RTEMS/UNIX error mapping needs to be fixed!
- */
-static void
-tftpSetErrno (struct tftpStream *tp)
-{
- unsigned int tftpError;
- static const int errorMap[] = {
- 0,
- ENOENT,
- EPERM,
- ENOSPC,
- EINVAL,
- ENXIO,
- EEXIST,
- ESRCH,
- 0,
- };
-
- tftpError = ntohs (tp->pkbuf.tftpERROR.errorCode);
- if (tftpError < (sizeof errorMap / sizeof errorMap[0]))
- errno = errorMap[tftpError];
- else
- errno = 1000 + tftpError;
-}
-
-/*
- * Send a message to make the other end shut up
- */
-static void
-sendStifle (struct tftpStream *tp, struct sockaddr_in *to)
-{
- int len;
-
- /*
- * Create the error packet (Unknown transfer ID).
- */
- tp->pkbuf.tftpERROR.opcode = htons (TFTP_OPCODE_ERROR);
- tp->pkbuf.tftpERROR.errorCode = htons (5);
- len = sizeof tp->pkbuf.tftpERROR.opcode +
- sizeof tp->pkbuf.tftpERROR.errorCode + 1;
- len += sprintf (tp->pkbuf.tftpERROR.errorMessage, "GO AWAY");
-
- /*
- * Send it
- */
- sendto (tp->socket, (char *)&tp->pkbuf, len, 0,
- (struct sockaddr *)to, sizeof *to);
-}
-
-/*
- * Wait for a data packet
- */
-static int
-getPacket (struct tftpStream *tp)
-{
- int len;
- struct timeval tv;
-
- tv.tv_sec = PACKET_REPLY_MILLISECONDS / 1000;
- tv.tv_usec = (PACKET_REPLY_MILLISECONDS % 1000) * 1000;
- setsockopt (tp->socket, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof tv);
- for (;;) {
- union {
- struct sockaddr s;
- struct sockaddr_in i;
- } from;
- int fromlen = sizeof from;
- len = recvfrom (tp->socket, (char *)&tp->pkbuf,
- sizeof tp->pkbuf, 0,
- &from.s, &fromlen);
- if (len < 0)
- break;
- if (from.i.sin_addr.s_addr == tp->farAddress.sin_addr.s_addr) {
- if (tp->firstReply) {
- tp->firstReply = 0;
- tp->farAddress.sin_port = from.i.sin_port;
- }
- if (tp->farAddress.sin_port == from.i.sin_port)
- break;
- }
-
- /*
- * Packet is from someone with whom we are
- * not interested. Tell them to go away.
- */
- sendStifle (tp, &from.i);
- }
- tv.tv_sec = 0;
- tv.tv_usec = 0;
- setsockopt (tp->socket, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof tv);
- return len;
-}
-
-/*
- * Send an acknowledgement
- */
-static int
-sendAck (struct tftpStream *tp)
-{
- /*
- * Create the acknowledgement
- */
- tp->pkbuf.tftpACK.opcode = htons (TFTP_OPCODE_ACK);
- tp->pkbuf.tftpACK.blocknum = htons (tp->blocknum);
-
- /*
- * Send it
- */
- if (sendto (tp->socket, (char *)&tp->pkbuf, sizeof tp->pkbuf.tftpACK, 0,
- (struct sockaddr *)&tp->farAddress,
- sizeof tp->farAddress) < 0)
- return errno;
- return 0;
-}
-
-/*
- * Release a stream and clear the pointer to it
- */
-static void
-releaseStream (int s)
-{
- rtems_semaphore_obtain (tftp_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
- free (tftpStreams[s]);
- tftpStreams[s] = NULL;
- rtems_semaphore_release (tftp_mutex);
-}
-
-int rtems_tftp_evaluate_for_make(
- const char *path, /* IN */
- rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
- const char **name /* OUT */
-)
-{
- set_errno_and_return_minus_one( EIO );
-}
-
-/*
- * XXX - Fix return values.
- */
-
-int rtems_tftp_eval_path(
- const char *pathname, /* IN */
- int flags, /* IN */
- rtems_filesystem_location_info_t *pathloc /* IN/OUT */
-)
-{
-
- /*
- * Read-only for now
- */
-
- if ( (flags & O_WRONLY) == O_WRONLY )
- set_errno_and_return_minus_one( ENOENT );
-
- /*
- * The File system is mounted at TFTP_PATHNAME_PREFIX
- * the caller of this routine has striped off this part of the
- * name. Save the remainder of the name for use by the open routine.
- */
-
- pathloc->node_access = (void * ) pathname;
- pathloc->handlers = &rtems_tftp_handlers;
-
- return 0;
-}
-
-
-int rtems_tftp_open(
- rtems_libio_t *iop,
- const char *new_name,
- unsigned32 flag,
- unsigned32 mode
-)
-{
- struct tftpStream *tp;
- int retryCount;
- rtems_unsigned32 farAddress;
- int s;
- int len;
- char *cp1;
- char *cp2;
- char *remoteFilename;
- rtems_interval now;
- rtems_status_code sc;
- char *hostname;
-
- /*
- * This came from the evaluate path.
- */
-
- cp2 = iop->file_info;
-
- cp1 = cp2;
- while (*cp2 != '/') {
- if (*cp2 == '\0')
- return ENOENT;
- cp2++;
- }
-
- len = cp2 - cp1;
- hostname = malloc (len + 1);
- if (hostname == NULL)
- return ENOMEM;
-
- strncpy (hostname, cp1, len);
- hostname[len] = '\0';
- farAddress = inet_addr (hostname);
- free (hostname);
-
- if ((farAddress == 0) || (farAddress == ~0))
- return ENOENT;
-
- if (*++cp2 == '\0')
- return ENOENT;
-
- remoteFilename = cp2;
- if (strlen (remoteFilename) > (TFTP_BUFSIZE - 10))
- return ENOENT;
-
- /*
- * Find a free stream
- */
-
- sc = rtems_semaphore_obtain (tftp_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
- if (sc != RTEMS_SUCCESSFUL)
- return EBUSY;
-
- for (s = 0 ; s < nStreams ; s++) {
- if (tftpStreams[s] == NULL)
- break;
- }
-
- if (s == nStreams) {
- /*
- * Reallocate stream pointers
- * Guard against the case where realloc() returns NULL.
- */
- struct tftpStream **np;
-
- np = realloc (tftpStreams, ++nStreams * sizeof *tftpStreams);
- if (np == NULL) {
- rtems_semaphore_release (tftp_mutex);
- return ENOMEM;
- }
- tftpStreams = np;
- }
-
- tp = tftpStreams[s] = malloc (sizeof (struct tftpStream));
- rtems_semaphore_release (tftp_mutex);
- if (tp == NULL)
- return ENOMEM;
- iop->data0 = s;
- iop->data1 = tp;
-
- /*
- * Create the socket
- */
-
- if ((tp->socket = socket (AF_INET, SOCK_DGRAM, 0)) < 0) {
- releaseStream (s);
- return ENOMEM;
- }
-
- /*
- * Bind the socket to a local address
- */
-
- retryCount = 0;
- rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now);
- for (;;) {
- int try = (now + retryCount) % 10;
-
- tp->myAddress.sin_family = AF_INET;
- tp->myAddress.sin_port = htons (UDP_PORT_BASE + nStreams * try + s);
- tp->myAddress.sin_addr.s_addr = htonl (INADDR_ANY);
- if (bind (tp->socket, (struct sockaddr *)&tp->myAddress, sizeof tp->myAddress) >= 0)
- break;
- if (++retryCount == 10) {
- close (tp->socket);
- releaseStream (s);
- return EBUSY;
- }
- }
-
- /*
- * Set the UDP destination to the TFTP server
- * port on the remote machine.
- */
- tp->farAddress.sin_family = AF_INET;
- tp->farAddress.sin_addr.s_addr = farAddress;
- tp->farAddress.sin_port = htons (69);
-
- /*
- * Start the transfer
- */
- tp->firstReply = 1;
- for (;;) {
- /*
- * Create the request
- */
- tp->pkbuf.tftpRWRQ.opcode = htons (TFTP_OPCODE_RRQ);
- cp1 = (char *) tp->pkbuf.tftpRWRQ.filename_mode;
- cp2 = (char *) remoteFilename;
- while ((*cp1++ = *cp2++) != '\0')
- continue;
- cp2 = "octet";
- while ((*cp1++ = *cp2++) != '\0')
- continue;
- len = cp1 - (char *)&tp->pkbuf.tftpRWRQ;
-
- /*
- * Send the request
- */
- if (sendto (tp->socket, (char *)&tp->pkbuf, len, 0,
- (struct sockaddr *)&tp->farAddress,
- sizeof tp->farAddress) < 0) {
- close (tp->socket);
- releaseStream (s);
- return EIO;
- }
-
- /*
- * Get reply
- */
- len = getPacket (tp);
- if (len >= (int) sizeof tp->pkbuf.tftpACK) {
- int opcode = ntohs (tp->pkbuf.tftpDATA.opcode);
- if ((opcode == TFTP_OPCODE_DATA)
- && (ntohs (tp->pkbuf.tftpDATA.blocknum) == 1)) {
- tp->nused = 0;
- tp->blocknum = 1;
- tp->nleft = len - 2 * sizeof (rtems_unsigned16);
- tp->eof = (tp->nleft < TFTP_BUFSIZE);
- if (sendAck (tp) != 0) {
- close (tp->socket);
- releaseStream (s);
- return EIO;
- }
- break;
- }
- if (opcode == TFTP_OPCODE_ERROR) {
- tftpSetErrno (tp);
- close (tp->socket);
- releaseStream (s);
- return EIO;
- }
- }
-
- /*
- * Keep trying
- */
- if (++retryCount >= OPEN_RETRY_LIMIT) {
- close (tp->socket);
- releaseStream (s);
- return EIO;
- }
- }
-
- return 0;
-}
-
-/*
- * Read from a TFTP stream
- */
-
-int rtems_tftp_read(
- rtems_libio_t *iop,
- void *buffer,
- unsigned32 count
-)
-{
- char *bp;
- struct tftpStream *tp;
- int retryCount;
- int nwant;
-
- tp = iop->data1;
-
- /*
- * Read till user request is satisfied or EOF is reached
- */
-
- bp = buffer;
- nwant = count;
- while (nwant) {
- if (tp->nleft) {
- int count;
- if (nwant < tp->nleft)
- count = nwant;
- else
- count = tp->nleft;
- memcpy (bp, &tp->pkbuf.tftpDATA.data[tp->nused], count);
- tp->nused += count;
- tp->nleft -= count;
- bp += count;
- nwant -= count;
- if (nwant == 0)
- break;
- }
- if (tp->eof)
- break;
-
- /*
- * Wait for the next packet
- */
- retryCount = 0;
- for (;;) {
- int len = getPacket (tp);
- if (len >= (int)sizeof tp->pkbuf.tftpACK) {
- int opcode = ntohs (tp->pkbuf.tftpDATA.opcode);
- rtems_unsigned16 nextBlock = tp->blocknum + 1;
- if ((opcode == TFTP_OPCODE_DATA)
- && (ntohs (tp->pkbuf.tftpDATA.blocknum) == nextBlock)) {
- tp->nused = 0;
- tp->nleft = len - 2 * sizeof (rtems_unsigned16);
- tp->eof = (tp->nleft < TFTP_BUFSIZE);
- tp->blocknum++;
- if (sendAck (tp) != 0)
- set_errno_and_return_minus_one( EIO );
- break;
- }
- if (opcode == TFTP_OPCODE_ERROR) {
- tftpSetErrno (tp);
- return RTEMS_INTERNAL_ERROR;
- }
- }
-
- /*
- * Keep trying?
- */
- if (++retryCount == IO_RETRY_LIMIT)
- set_errno_and_return_minus_one( EIO );
- if (sendAck (tp) != 0)
- set_errno_and_return_minus_one( EIO );
- }
- }
-
- /*
- * XXX - Eric is this right?
- *
- */
- return count - nwant;
-}
-
-/*
- * Close a TFTP stream
- */
-int rtems_tftp_close(
- rtems_libio_t *iop
-)
-{
- struct tftpStream *tp = iop->data1;;
-
- if (!tp->eof && !tp->firstReply) {
- /*
- * Tell the other end to stop
- */
- rtems_interval ticksPerSecond;
- sendStifle (tp, &tp->farAddress);
- rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticksPerSecond);
- rtems_task_wake_after (1 + ticksPerSecond / 10);
- }
- close (tp->socket);
- releaseStream (iop->data0);
- return RTEMS_SUCCESSFUL;
-}
-
-int rtems_tftp_write(
- rtems_libio_t *iop,
- const void *buffer,
- unsigned32 count
-)
-{
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_device_driver rtems_tftp_control(
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void *pargp
-)
-{
- return RTEMS_NOT_CONFIGURED;
-}
-
-rtems_filesystem_node_types_t rtems_tftp_node_type(
- rtems_filesystem_location_info_t *pathloc /* IN */
-)
-{
- return RTEMS_FILESYSTEM_MEMORY_FILE;
-}
-
-
-rtems_filesystem_operations_table rtems_tftp_ops = {
- rtems_tftp_eval_path, /* eval_path */
- rtems_tftp_evaluate_for_make, /* evaluate_for_make */
- NULL, /* link */
- NULL, /* unlink */
- rtems_tftp_node_type, /* node_type */
- NULL, /* mknod */
- NULL, /* chown */
- NULL, /* freenodinfo */
- NULL, /* mount */
- rtems_tftp_mount_me, /* initialize */
- NULL, /* unmount */
- NULL, /* fsunmount */
- NULL, /* utime, */
- NULL, /* evaluate_link */
- NULL, /* symlink */
- NULL, /* readlin */
-};
-
-rtems_filesystem_file_handlers_r rtems_tftp_handlers = {
- rtems_tftp_open,
- rtems_tftp_close,
- rtems_tftp_read,
- rtems_tftp_write,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
-};
diff --git a/cpukit/libnetworking/libc/Makefile.am b/cpukit/libnetworking/libc/Makefile.am
deleted file mode 100644
index 57b2b412f2..0000000000
--- a/cpukit/libnetworking/libc/Makefile.am
+++ /dev/null
@@ -1,57 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4 no-installman
-
-LIBNAME = lib.a
-LIB = $(ARCH)/$(LIBNAME)
-
-C_FILES = base64.c gethostbydns.c gethostbyht.c gethostbynis.c \
- gethostnamadr.c getnetbydns.c getnetbyht.c getnetbynis.c getnetnamadr.c \
- getproto.c getprotoent.c getprotoname.c getservbyname.c getservbyport.c \
- getservent.c herror.c inet_addr.c inet_lnaof.c inet_makeaddr.c \
- inet_network.c inet_ntoa.c inet_ntop.c inet_pton.c map_v4v6.c \
- nsap_addr.c ns_name.c ns_netint.c ns_parse.c ns_print.c ns_ttl.c \
- res_comp.c res_data.c res_debug.c res_init.c res_mkquery.c \
- res_mkupdate.c res_query.c res_send.c res_stubs.c res_update.c strsep.c
-C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
-
-OBJS = $(C_O_FILES)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../automake/lib.am
-
-man_MANS = addr2ascii.3 byteorder.3 ethers.3 gethostbyname.3 getnetent.3 \
- getprotoent.3 getservent.3 inet.3 iso_addr.3 linkaddr.3 ns.3 rcmd.3 \
- resolver.3
-
-#
-# Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -DNOPOLL -DNOSELECT
-AM_CPPFLAGS += -U__STRICT_ANSI__
-
-$(LIB): $(OBJS)
- $(make-library)
-
-all-local: $(ARCH) $(OBJS) $(LIB)
-
-.PRECIOUS: $(LIB)
-
-EXTRA_DIST = addr2ascii.3 addr2ascii.c ascii2addr.c base64.c byteorder.3 \
- ether_addr.c ethers.3 gethostbydns.c gethostbyht.c gethostbyname.3 \
- gethostbynis.c gethostnamadr.c gethostname.c getnetbydns.c getnetbyht.c \
- getnetbynis.c getnetent.3 getnetnamadr.c getproto.c getprotoent.3 \
- getprotoent.c getprotoname.c getservbyname.c getservbyport.c \
- getservent.3 getservent.c herror.c inet.3 inet_addr.c inet_lnaof.c \
- inet_makeaddr.c inet_net_ntop.c inet_net_pton.c inet_neta.c inet_netof.c \
- inet_network.c inet_ntoa.c inet_ntop.c inet_pton.c iso_addr.3 iso_addr.c \
- linkaddr.3 linkaddr.c map_v4v6.c ns.3 ns_addr.c ns_name.c ns_netint.c \
- ns_ntoa.c ns_parse.c ns_print.c ns_ttl.c nsap_addr.c rcmd.3 rcmd.c \
- recv.c res_comp.c res_config.h res_data.c res_debug.c res_init.c \
- res_mkquery.c res_mkupdate.c res_query.c res_send.c res_stubs.c \
- res_update.c resolver.3 send.c strsep.c
-
-include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/libnetworking/libc/addr2ascii.3 b/cpukit/libnetworking/libc/addr2ascii.3
deleted file mode 100644
index 10c839ea74..0000000000
--- a/cpukit/libnetworking/libc/addr2ascii.3
+++ /dev/null
@@ -1,217 +0,0 @@
-.\"
-.\" Copyright 1996 Massachusetts Institute of Technology
-.\"
-.\" Permission to use, copy, modify, and distribute this software and
-.\" its documentation for any purpose and without fee is hereby
-.\" granted, provided that both the above copyright notice and this
-.\" permission notice appear in all copies, that both the above
-.\" copyright notice and this permission notice appear in all
-.\" supporting documentation, and that the name of M.I.T. not be used
-.\" in advertising or publicity pertaining to distribution of the
-.\" software without specific, written prior permission. M.I.T. makes
-.\" no representations about the suitability of this software for any
-.\" purpose. It is provided "as is" without express or implied
-.\" warranty.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''. M.I.T. DISCLAIMS
-.\" ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE,
-.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
-.\" SHALL M.I.T. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-.\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-.\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" $ANA: addr2ascii.3,v 1.1 1996/06/13 18:41:46 wollman Exp $
-.\" $Id$
-.\"
-.Dd June 13, 1996
-.Dt ADDR2ASCII 3
-.Os
-.Sh NAME
-.Nm addr2ascii ,
-.Nm ascii2addr
-.Nd Generic address formatting routines
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <netinet/in.h>
-.Fd #include <arpa/inet.h>
-.Ft "char *"
-.Fn addr2ascii "int af" "const void *addrp" "int len" "char *buf"
-.Ft int
-.Fn ascii2addr "int af" "const char *ascii" "void *result"
-.Sh DESCRIPTION
-The routines
-.Fn addr2ascii
-and
-.Fn ascii2addr
-are used to convert network addresses between binary form and a
-printable form appropriate to the address family. Both functions take
-an
-.Fa af
-argument, specifying the address family to be used in the conversion
-process.
-(Currently, only the
-.Dv AF_INET
-and
-.Dv AF_LINK
-address families are supported.)
-.Pp
-The
-.Fn addr2ascii
-function
-is used to convert binary, network-format addresses into printable
-form. In addition to
-.Fa af ,
-there are three other arguments. The
-.Fa addrp
-argument is a pointer to the network address to be converted.
-The
-.Fa len
-argument is the length of the address. The
-.Fa buf
-argument is an optional pointer to a caller-allocated buffer to hold
-the result; if a null pointer is passed,
-.Fn addr2ascii
-uses a statically-allocated buffer.
-.Pp
-The
-.Fn ascii2addr
-function performs the inverse operation to
-.Fn addr2ascii .
-In addition to
-.Fa af ,
-it takes two parameters,
-.Fa ascii
-and
-.Fa result .
-The
-.Fa ascii
-parameter is a pointer to the string which is to be converted into
-binary. The
-.Fa result
-parameter is a pointer to an appropriate network address structure for
-the specified family.
-.Pp
-The following gives the appropriate structure to use for binary
-addresses in the specified family:
-.Pp
-.Bl -tag -width AF_INETxxxx -compact
-.It Dv AF_INET
-.Li struct in_addr
-.Pq in Aq Pa netinet/in.h
-.It Dv AF_LINK
-.Li struct sockaddr_dl
-.Pq in Aq Pa net/if_dl.h
-.\" .It Dv AF_INET6
-.\" .Li struct in6_addr
-.\" .Pq in Aq Pa netinet6/in6.h
-.El
-.Sh RETURN VALUES
-The
-.Fn addr2ascii
-function returns the address of the buffer it was passed, or a static
-buffer if the a null pointer was passed; on failure, it returns a null
-pointer.
-The
-.Fn ascii2addr
-function returns the length of the binary address in bytes, or -1 on
-failure.
-.Sh EXAMPLES
-The
-.Xr inet 3
-functions
-.Fn inet_ntoa
-and
-.Fn inet_aton
-could be implemented thusly:
-.Bd -literal -offset indent
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-char *
-inet_ntoa(struct in_addr addr)
-{
- return addr2ascii(AF_INET, &addr, sizeof addr, 0);
-}
-
-int
-inet_aton(const char *ascii, struct in_addr *addr)
-{
- return (ascii2addr(AF_INET, ascii, addr)
- == sizeof(*addr));
-}
-.Ed
-.Pp
-In actuality, this cannot be done because
-.Fn addr2ascii
-and
-.Fn ascii2addr
-are implemented in terms of the
-.Xr inet 3
-functions, rather than the other way around.
-.Sh ERRORS
-When a failure is returned,
-.Li errno
-is set to one of the following values:
-.Bl -tag -width [EPROTONOSUPPORT]
-.It Bq Er ENAMETOOLONG
-The
-.Fn addr2ascii
-routine was passed a
-.Fa len
-parameter which was inappropriate for the address family given by
-.Fa af .
-.It Bq Er EPROTONOSUPPORT
-Either routine was passed an
-.Fa af
-parameter other than
-.Dv AF_INET
-or
-.Dv AF_LINK .
-.It Bq Er EINVAL
-The string passed to
-.Fn ascii2addr
-was improperly formatted for address family
-.Fa af .
-.El
-.Sh SEE ALSO
-.Xr inet 3 ,
-.Xr linkaddr 3 ,
-.Xr inet 4
-.Sh HISTORY
-An interface close to this one was originally suggested by Craig
-Partridge. This particular interface originally appeared in the
-.Tn INRIA
-.Tn IPv6
-implementation.
-.Sh AUTHORS
-Code and documentation by
-.An Garrett A. Wollman ,
-MIT Laboratory for Computer Science.
-.Sh BUGS
-The original implementations supported IPv6. This support should
-eventually be resurrected. The
-.Tn NRL
-implementation also included support for the
-.Dv AF_ISO
-and
-.Dv AF_NS
-address families.
-.Pp
-The genericity of this interface is somewhat questionable. A truly
-generic interface would provide a means for determining the length of
-the buffer to be used so that it could be dynamically allocated, and
-would always require a
-.Dq Li "struct sockaddr"
-to hold the binary address. Unfortunately, this is incompatible with existing
-practice. This limitation means that a routine for printing network
-addresses from arbitrary address families must still have internal
-knowledge of the maximum buffer length needed and the appropriate part
-of the address to use as the binary address.
diff --git a/cpukit/libnetworking/libc/addr2ascii.c b/cpukit/libnetworking/libc/addr2ascii.c
deleted file mode 100644
index dc651743b6..0000000000
--- a/cpukit/libnetworking/libc/addr2ascii.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright 1996 Massachusetts Institute of Technology
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby
- * granted, provided that both the above copyright notice and this
- * permission notice appear in all copies, that both the above
- * copyright notice and this permission notice appear in all
- * supporting documentation, and that the name of M.I.T. not be used
- * in advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission. M.I.T. makes
- * no representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied
- * warranty.
- *
- * THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''. M.I.T. DISCLAIMS
- * ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
- * SHALL M.I.T. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $ANA: addr2ascii.c,v 1.1 1996/06/13 18:41:46 wollman Exp $
- *
- * $Id$
- */
-
-#include <sys/types.h>
-#include <sys/socket.h>
-
-#include <errno.h>
-#include <string.h>
-
-#include <net/if_dl.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-/*-
- * Convert a network address from binary to printable numeric format.
- * This API is copied from INRIA's IPv6 implementation, but it is a
- * bit bogus in two ways:
- *
- * 1) There is no value in passing both an address family and
- * an address length; either one should imply the other,
- * or we should be passing sockaddrs instead.
- * 2) There should by contrast be /added/ a length for the buffer
- * that we pass in, so that programmers are spared the need to
- * manually calculate (read: ``guess'') the maximum length.
- *
- * Flash: the API is also the same in the NRL implementation, and seems to
- * be some sort of standard, so we appear to be stuck with both the bad
- * naming and the poor choice of arguments.
- */
-char *
-addr2ascii(af, addrp, len, buf)
- int af;
- const void *addrp;
- int len; /* should be size_t XXX */
- char *buf; /* XXX should pass length of buffer */
-{
- static char staticbuf[64]; /* 64 for AF_LINK > 16 for AF_INET */
-
- if (!buf)
- buf = staticbuf;
-
- switch(af) {
- case AF_INET:
- if (len != sizeof(struct in_addr)) {
- errno = ENAMETOOLONG;
- return 0;
- }
- strcpy(buf, inet_ntoa(*(const struct in_addr *)addrp));
- break;
-
- case AF_LINK:
- if (len != sizeof(struct sockaddr_dl)) {
- errno = ENAMETOOLONG;
- return 0;
- }
- strcpy(buf, link_ntoa((const struct sockaddr_dl *)addrp));
- break;
-
- default:
- errno = EPROTONOSUPPORT;
- return 0;
- }
- return buf;
-}
diff --git a/cpukit/libnetworking/libc/ascii2addr.c b/cpukit/libnetworking/libc/ascii2addr.c
deleted file mode 100644
index e140244737..0000000000
--- a/cpukit/libnetworking/libc/ascii2addr.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright 1996 Massachusetts Institute of Technology
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby
- * granted, provided that both the above copyright notice and this
- * permission notice appear in all copies, that both the above
- * copyright notice and this permission notice appear in all
- * supporting documentation, and that the name of M.I.T. not be used
- * in advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission. M.I.T. makes
- * no representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied
- * warranty.
- *
- * THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''. M.I.T. DISCLAIMS
- * ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
- * SHALL M.I.T. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $ANA: ascii2addr.c,v 1.2 1996/06/13 18:46:02 wollman Exp $
- *
- * $Id$
- */
-
-#include <sys/types.h>
-#include <sys/socket.h>
-
-#include <errno.h>
-#include <string.h>
-
-#include <net/if_dl.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-int
-ascii2addr(af, ascii, result)
- int af;
- const char *ascii;
- void *result;
-{
- struct in_addr *ina;
- char strbuf[4*sizeof("123")]; /* long enough for V4 only */
-
- switch(af) {
- case AF_INET:
- ina = result;
- strbuf[0] = '\0';
- strncat(strbuf, ascii, (sizeof strbuf)-1);
- if (inet_aton(strbuf, ina))
- return sizeof(struct in_addr);
- errno = EINVAL;
- break;
-
- case AF_LINK:
- link_addr(ascii, result);
- /* oops... no way to detect failure */
- return sizeof(struct sockaddr_dl);
-
- default:
- errno = EPROTONOSUPPORT;
- break;
- }
-
- return -1;
-}
diff --git a/cpukit/libnetworking/libc/base64.c b/cpukit/libnetworking/libc/base64.c
deleted file mode 100644
index 3017ccc01c..0000000000
--- a/cpukit/libnetworking/libc/base64.c
+++ /dev/null
@@ -1,318 +0,0 @@
-/*
- * Copyright (c) 1996, 1998 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-/*
- * Portions Copyright (c) 1995 by International Business Machines, Inc.
- *
- * International Business Machines, Inc. (hereinafter called IBM) grants
- * permission under its copyrights to use, copy, modify, and distribute this
- * Software with or without fee, provided that the above copyright notice and
- * all paragraphs of this notice appear in all copies, and that the name of IBM
- * not be used in connection with the marketing of any product incorporating
- * the Software or modifications thereof, without specific, written prior
- * permission.
- *
- * To the extent it has a right to do so, IBM grants an immunity from suit
- * under its patents, if any, for the use, sale or manufacture of products to
- * the extent that such products are used for performing Domain Name System
- * dynamic updates in TCP/IP networks by means of the Software. No immunity is
- * granted for any product per se or for any other function of any product.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- * PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL,
- * DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING
- * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN
- * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES.
- */
-
-#if !defined(__rtems__)
-#if !defined(LINT) && !defined(CODECENTER)
-static char rcsid[] = "$Id$";
-#endif /* not lint */
-#endif /* not rtems */
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/socket.h>
-
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-
-#include <ctype.h>
-#include <resolv.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#define Assert(Cond) if (!(Cond)) abort()
-
-static const char Base64[] =
- "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
-static const char Pad64 = '=';
-
-/* (From RFC1521 and draft-ietf-dnssec-secext-03.txt)
- The following encoding technique is taken from RFC 1521 by Borenstein
- and Freed. It is reproduced here in a slightly edited form for
- convenience.
-
- A 65-character subset of US-ASCII is used, enabling 6 bits to be
- represented per printable character. (The extra 65th character, "=",
- is used to signify a special processing function.)
-
- The encoding process represents 24-bit groups of input bits as output
- strings of 4 encoded characters. Proceeding from left to right, a
- 24-bit input group is formed by concatenating 3 8-bit input groups.
- These 24 bits are then treated as 4 concatenated 6-bit groups, each
- of which is translated into a single digit in the base64 alphabet.
-
- Each 6-bit group is used as an index into an array of 64 printable
- characters. The character referenced by the index is placed in the
- output string.
-
- Table 1: The Base64 Alphabet
-
- Value Encoding Value Encoding Value Encoding Value Encoding
- 0 A 17 R 34 i 51 z
- 1 B 18 S 35 j 52 0
- 2 C 19 T 36 k 53 1
- 3 D 20 U 37 l 54 2
- 4 E 21 V 38 m 55 3
- 5 F 22 W 39 n 56 4
- 6 G 23 X 40 o 57 5
- 7 H 24 Y 41 p 58 6
- 8 I 25 Z 42 q 59 7
- 9 J 26 a 43 r 60 8
- 10 K 27 b 44 s 61 9
- 11 L 28 c 45 t 62 +
- 12 M 29 d 46 u 63 /
- 13 N 30 e 47 v
- 14 O 31 f 48 w (pad) =
- 15 P 32 g 49 x
- 16 Q 33 h 50 y
-
- Special processing is performed if fewer than 24 bits are available
- at the end of the data being encoded. A full encoding quantum is
- always completed at the end of a quantity. When fewer than 24 input
- bits are available in an input group, zero bits are added (on the
- right) to form an integral number of 6-bit groups. Padding at the
- end of the data is performed using the '=' character.
-
- Since all base64 input is an integral number of octets, only the
- -------------------------------------------------
- following cases can arise:
-
- (1) the final quantum of encoding input is an integral
- multiple of 24 bits; here, the final unit of encoded
- output will be an integral multiple of 4 characters
- with no "=" padding,
- (2) the final quantum of encoding input is exactly 8 bits;
- here, the final unit of encoded output will be two
- characters followed by two "=" padding characters, or
- (3) the final quantum of encoding input is exactly 16 bits;
- here, the final unit of encoded output will be three
- characters followed by one "=" padding character.
- */
-
-int
-b64_ntop(u_char const *src, size_t srclength, char *target, size_t targsize) {
- size_t datalength = 0;
- u_char input[3];
- u_char output[4];
- size_t i;
-
- while (2 < srclength) {
- input[0] = *src++;
- input[1] = *src++;
- input[2] = *src++;
- srclength -= 3;
-
- output[0] = input[0] >> 2;
- output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4);
- output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6);
- output[3] = input[2] & 0x3f;
- Assert(output[0] < 64);
- Assert(output[1] < 64);
- Assert(output[2] < 64);
- Assert(output[3] < 64);
-
- if (datalength + 4 > targsize)
- return (-1);
- target[datalength++] = Base64[output[0]];
- target[datalength++] = Base64[output[1]];
- target[datalength++] = Base64[output[2]];
- target[datalength++] = Base64[output[3]];
- }
-
- /* Now we worry about padding. */
- if (0 != srclength) {
- /* Get what's left. */
- input[0] = input[1] = input[2] = '\0';
- for (i = 0; i < srclength; i++)
- input[i] = *src++;
-
- output[0] = input[0] >> 2;
- output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4);
- output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6);
- Assert(output[0] < 64);
- Assert(output[1] < 64);
- Assert(output[2] < 64);
-
- if (datalength + 4 > targsize)
- return (-1);
- target[datalength++] = Base64[output[0]];
- target[datalength++] = Base64[output[1]];
- if (srclength == 1)
- target[datalength++] = Pad64;
- else
- target[datalength++] = Base64[output[2]];
- target[datalength++] = Pad64;
- }
- if (datalength >= targsize)
- return (-1);
- target[datalength] = '\0'; /* Returned value doesn't count \0. */
- return (datalength);
-}
-
-/* skips all whitespace anywhere.
- converts characters, four at a time, starting at (or after)
- src from base - 64 numbers into three 8 bit bytes in the target area.
- it returns the number of data bytes stored at the target, or -1 on error.
- */
-
-int
-b64_pton(src, target, targsize)
- char const *src;
- u_char *target;
- size_t targsize;
-{
- int tarindex, state, ch;
- char *pos;
-
- state = 0;
- tarindex = 0;
-
- while ((ch = *src++) != '\0') {
- if (isspace(ch)) /* Skip whitespace anywhere. */
- continue;
-
- if (ch == Pad64)
- break;
-
- pos = strchr(Base64, ch);
- if (pos == 0) /* A non-base64 character. */
- return (-1);
-
- switch (state) {
- case 0:
- if (target) {
- if ((size_t)tarindex >= targsize)
- return (-1);
- target[tarindex] = (pos - Base64) << 2;
- }
- state = 1;
- break;
- case 1:
- if (target) {
- if ((size_t)tarindex + 1 >= targsize)
- return (-1);
- target[tarindex] |= (pos - Base64) >> 4;
- target[tarindex+1] = ((pos - Base64) & 0x0f)
- << 4 ;
- }
- tarindex++;
- state = 2;
- break;
- case 2:
- if (target) {
- if ((size_t)tarindex + 1 >= targsize)
- return (-1);
- target[tarindex] |= (pos - Base64) >> 2;
- target[tarindex+1] = ((pos - Base64) & 0x03)
- << 6;
- }
- tarindex++;
- state = 3;
- break;
- case 3:
- if (target) {
- if ((size_t)tarindex >= targsize)
- return (-1);
- target[tarindex] |= (pos - Base64);
- }
- tarindex++;
- state = 0;
- break;
- default:
- abort();
- }
- }
-
- /*
- * We are done decoding Base-64 chars. Let's see if we ended
- * on a byte boundary, and/or with erroneous trailing characters.
- */
-
- if (ch == Pad64) { /* We got a pad char. */
- ch = *src++; /* Skip it, get next. */
- switch (state) {
- case 0: /* Invalid = in first position */
- case 1: /* Invalid = in second position */
- return (-1);
-
- case 2: /* Valid, means one byte of info */
- /* Skip any number of spaces. */
- for ((void)NULL; ch != '\0'; ch = *src++)
- if (!isspace(ch))
- break;
- /* Make sure there is another trailing = sign. */
- if (ch != Pad64)
- return (-1);
- ch = *src++; /* Skip the = */
- /* Fall through to "single trailing =" case. */
- /* FALLTHROUGH */
-
- case 3: /* Valid, means two bytes of info */
- /*
- * We know this char is an =. Is there anything but
- * whitespace after it?
- */
- for ((void)NULL; ch != '\0'; ch = *src++)
- if (!isspace(ch))
- return (-1);
-
- /*
- * Now make sure for cases 2 and 3 that the "extra"
- * bits that slopped past the last full byte were
- * zeros. If we don't check them, they become a
- * subliminal channel.
- */
- if (target && target[tarindex] != 0)
- return (-1);
- }
- } else {
- /*
- * We ended by seeing the end of the string. Make sure we
- * have no partial bytes lying around.
- */
- if (state != 0)
- return (-1);
- }
-
- return (tarindex);
-}
diff --git a/cpukit/libnetworking/libc/byteorder.3 b/cpukit/libnetworking/libc/byteorder.3
deleted file mode 100644
index 81bf604867..0000000000
--- a/cpukit/libnetworking/libc/byteorder.3
+++ /dev/null
@@ -1,77 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)byteorder.3 8.1 (Berkeley) 6/4/93
-.\" $Id$
-.\"
-.Dd June 4, 1993
-.Dt BYTEORDER 3
-.Os BSD 4.2
-.Sh NAME
-.Nm htonl ,
-.Nm htons ,
-.Nm ntohl ,
-.Nm ntohs
-.Nd convert values between host and network byte order
-.Sh SYNOPSIS
-.Fd #include <sys/param.h>
-.Ft u_long
-.Fn htonl "u_long hostlong"
-.Ft u_short
-.Fn htons "u_short hostshort"
-.Ft u_long
-.Fn ntohl "u_long netlong"
-.Ft u_short
-.Fn ntohs "u_short netshort"
-.Sh DESCRIPTION
-These routines convert 16 and 32 bit quantities between network
-byte order and host byte order.
-On machines which have a byte order which is the same as the network
-order, routines are defined as null macros.
-.Pp
-These routines are most often used in conjunction with Internet
-addresses and ports as returned by
-.Xr gethostbyname 3
-and
-.Xr getservent 3 .
-.Sh SEE ALSO
-.Xr gethostbyname 3 ,
-.Xr getservent 3
-.Sh HISTORY
-The
-.Nm byteorder
-functions appeared in
-.Bx 4.2 .
-.Sh BUGS
-On the
-.Tn VAX
-bytes are handled backwards from most everyone else in
-the world. This is not expected to be fixed in the near future.
diff --git a/cpukit/libnetworking/libc/ether_addr.c b/cpukit/libnetworking/libc/ether_addr.c
deleted file mode 100644
index 9b7a9abf44..0000000000
--- a/cpukit/libnetworking/libc/ether_addr.c
+++ /dev/null
@@ -1,226 +0,0 @@
-/*
- * Copyright (c) 1995
- * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Bill Paul.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * ethernet address conversion and lookup routines
- *
- * Written by Bill Paul <wpaul@ctr.columbia.edu>
- * Center for Telecommunications Research
- * Columbia University, New York City
- *
- * $Id$
- */
-
-
-#include <stdio.h>
-#include <paths.h>
-#include <sys/types.h>
-#include <string.h>
-#include <stdlib.h>
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <net/ethernet.h>
-#ifdef YP
-#include <rpc/rpc.h>
-#include <rpcsvc/yp_prot.h>
-#include <rpcsvc/ypclnt.h>
-#endif
-
-#ifndef _PATH_ETHERS
-#define _PATH_ETHERS "/etc/ethers"
-#endif
-
-/*
- * Parse a string of text containing an ethernet address and hostname
- * and separate it into its component parts.
- */
-int ether_line(l, e, hostname)
- char *l;
- struct ether_addr *e;
- char *hostname;
-{
- int i, o[6];
-
- i = sscanf(l, "%x:%x:%x:%x:%x:%x %s", &o[0], &o[1], &o[2],
- &o[3], &o[4], &o[5],
- hostname);
- if (i != 7)
- return (i);
-
- for (i=0; i<6; i++)
- e->octet[i] = o[i];
- return (0);
-}
-
-/*
- * Convert an ASCII representation of an ethernet address to
- * binary form.
- */
-struct ether_addr *ether_aton(a)
- char *a;
-{
- int i;
- static struct ether_addr o;
- unsigned int o0, o1, o2, o3, o4, o5;
-
- i = sscanf(a, "%x:%x:%x:%x:%x:%x", &o0, &o1, &o2, &o3, &o4, &o5);
-
- if (i != 6)
- return (NULL);
-
- o.octet[0]=o0;
- o.octet[1]=o1;
- o.octet[2]=o2;
- o.octet[3]=o3;
- o.octet[4]=o4;
- o.octet[5]=o5;
-
- return ((struct ether_addr *)&o);
-}
-
-/*
- * Convert a binary representation of an ethernet address to
- * an ASCII string.
- */
-char *ether_ntoa(n)
- struct ether_addr *n;
-{
- int i;
- static char a[18];
-
- i = sprintf(a,"%x:%x:%x:%x:%x:%x",n->octet[0],n->octet[1],n->octet[2],
- n->octet[3],n->octet[4],n->octet[5]);
- if (i < 11)
- return (NULL);
- return ((char *)&a);
-}
-
-/*
- * Map an ethernet address to a hostname. Use either /etc/ethers or
- * NIS/YP.
- */
-
-int ether_ntohost(hostname, e)
- char *hostname;
- struct ether_addr *e;
-{
- FILE *fp;
- char buf[BUFSIZ + 2];
- struct ether_addr local_ether;
- char local_host[MAXHOSTNAMELEN];
-#ifdef YP
- char *result;
- int resultlen;
- char *ether_a;
- char *yp_domain;
-#endif
- if ((fp = fopen(_PATH_ETHERS, "r")) == NULL)
- return (1);
-
- while (fgets(buf,BUFSIZ,fp)) {
- if (buf[0] == '#')
- continue;
-#ifdef YP
- if (buf[0] == '+') {
- if (yp_get_default_domain(&yp_domain))
- continue;
- ether_a = ether_ntoa(e);
- if (yp_match(yp_domain, "ethers.byaddr", ether_a,
- strlen(ether_a), &result, &resultlen)) {
- continue;
- }
- strncpy(buf, result, resultlen);
- buf[resultlen] = '\0';
- free(result);
- }
-#endif
- if (!ether_line(buf, &local_ether, local_host)) {
- if (!bcmp((char *)&local_ether.octet[0],
- (char *)&e->octet[0], 6)) {
- /* We have a match */
- strcpy(hostname, local_host);
- fclose(fp);
- return(0);
- }
- }
- }
- fclose(fp);
- return (1);
-}
-
-/*
- * Map a hostname to an ethernet address using /etc/ethers or
- * NIS/YP.
- */
-int ether_hostton(hostname, e)
- char *hostname;
- struct ether_addr *e;
-{
- FILE *fp;
- char buf[BUFSIZ + 2];
- struct ether_addr local_ether;
- char local_host[MAXHOSTNAMELEN];
-#ifdef YP
- char *result;
- int resultlen;
- char *yp_domain;
-#endif
- if ((fp = fopen(_PATH_ETHERS, "r")) == NULL)
- return (1);
-
- while (fgets(buf,BUFSIZ,fp)) {
- if (buf[0] == '#')
- continue;
-#ifdef YP
- if (buf[0] == '+') {
- if (yp_get_default_domain(&yp_domain))
- continue;
- if (yp_match(yp_domain, "ethers.byname", hostname,
- strlen(hostname), &result, &resultlen)) {
- continue;
- }
- strncpy(buf, result, resultlen);
- buf[resultlen] = '\0';
- free(result);
- }
-#endif
- if (!ether_line(buf, &local_ether, local_host)) {
- if (!strcmp(hostname, local_host)) {
- /* We have a match */
- bcopy((char *)&local_ether.octet[0],
- (char *)&e->octet[0], 6);
- fclose(fp);
- return(0);
- }
- }
- }
- fclose(fp);
- return (1);
-}
diff --git a/cpukit/libnetworking/libc/ethers.3 b/cpukit/libnetworking/libc/ethers.3
deleted file mode 100644
index afea48320a..0000000000
--- a/cpukit/libnetworking/libc/ethers.3
+++ /dev/null
@@ -1,193 +0,0 @@
-.\" Copyright (c) 1995
-.\" Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by Bill Paul.
-.\" 4. Neither the name of the author nor the names of any co-contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" $Id$
-.\"
-.Dd April 12, 1995
-.Dt ETHERS 3
-.Os FreeBSD 2.1
-.Sh NAME
-.Nm ethers ,
-.Nm ether_line ,
-.Nm ether_aton ,
-.Nm ether_ntoa ,
-.Nm ether_ntohost ,
-.Nm ether_hostton
-.Nd Ethernet address conversion and lookup routines
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/socket.h>
-.Fd #include <net/ethernet.h>
-.Ft int
-.Fn ether_line "char *l" "struct ether_addr *e" "char *hostname"
-.Ft struct ether_addr *
-.Fn ether_aton "char *a"
-.Ft char *
-.Fn ether_ntoa "struct ether_addr *n"
-.Ft int
-.Fn ether_ntohost "char *hostname" "struct ether_addr *e"
-.Ft int
-.Fn ether_hostton "char *hostname" "struct ether_addr *e"
-.Sh DESCRIPTION
-These functions operate on ethernet addresses using an
-.Ar ether_addr
-structure, which is defined in the header file
-.Aq Pa netinet/if_ether.h :
-.Bd -literal -offset indent
-/*
- * The number of bytes in an ethernet (MAC) address.
- */
-#define ETHER_ADDR_LEN 6
-
-/*
- * Structure of a 48-bit Ethernet address.
- */
-struct ether_addr {
- u_char octet[ETHER_ADDR_LEN];
-};
-.Ed
-.Pp
-The function
-.Fn ether_line
-scans
-.Ar l ,
-an
-.Tn ASCII
-string in
-.Xr ethers 5
-format and sets
-.Ar e
-to the ethernet address specified in the string and
-.Ar h
-to the hostname. This function is used to parse lines from
-.Pa /etc/ethers
-into their component parts.
-.Pp
-The
-.Fn ether_aton
-function converts an
-.Tn ASCII
-representation of an ethernet address into an
-.Ar ether_addr
-structure. Likewise,
-.Fn ether_ntoa
-converts an ethernet address specified as an
-.Ar ether_addr
-structure into an
-.Tn ASCII
-string.
-.Pp
-The
-.Fn ether_ntohost
-and
-.Fn ether_hostton
-functions map ethernet addresses to their corresponding hostnames
-as specified in the
-.Pa /etc/ethers
-database.
-.Fn ether_ntohost
-converts from ethernet address to hostname, and
-.Fn ether_hostton
-converts from hostname to ethernet address.
-.Sh RETURN VALUES
-.Fn ether_line
-returns zero on success and non-zero if it was unable to parse
-any part of the supplied line
-.Ar l .
-It returns the extracted ethernet address in the supplied
-.Ar ether_addr
-structure
-.Ar e
-and the hostname in the supplied string
-.Ar h .
-.Pp
-On success,
-.Fn ether_ntoa
-returns a pointer to a string containing an
-.Tn ASCII
-representation of an ethernet address. If it is unable to convert
-the supplied
-.Ar ether_addr
-structure, it returns a
-.Dv NULL
-pointer. Likewise,
-.Fn ether_aton
-returns a pointer to an
-.Ar ether_addr
-structure on success and a
-.Dv NULL
-pointer on failure.
-.Pp
-The
-.Fn ether_ntohost
-and
-.Fn ether_hostton
-functions both return zero on success or non-zero if they were
-unable to find a match in the
-.Pa /etc/ethers
-database.
-.Sh NOTES
-The user must insure that the hostname strings passed to the
-the
-.Fn ether_line ,
-.Fn ether_ntohost
-and
-.Fn ether_hostton
-functions are large enough to contain the returned hostnames.
-.Sh NIS INTERACTION
-If the
-.Pa /etc/ethers
-contains a line with a single + in it, the
-.Fn ether_ntohost
-and
-.Fn ether_hostton
-functions will attempt to consult the NIS
-.Pa ethers.byname
-and
-.Pa ethers.byaddr
-maps in addition to the data in the
-.Pa /etc/ethers
-file.
-.Sh SEE ALSO
-.Xr yp 4 ,
-.Xr ethers 5
-.Sh BUGS
-.Pp
-The
-.Fn ether_aton
-and
-.Fn ether_ntoa
-functions returns values that are stored in static memory areas
-which may be overwritten the next time they are called.
-.Sh HISTORY
-This particular implementation of the
-.Nm ethers
-library functions were written for and first appeared in
-.Fx 2.1 .
diff --git a/cpukit/libnetworking/libc/gethostbydns.c b/cpukit/libnetworking/libc/gethostbydns.c
deleted file mode 100644
index 3d80ffde7a..0000000000
--- a/cpukit/libnetworking/libc/gethostbydns.c
+++ /dev/null
@@ -1,773 +0,0 @@
-/*
- * ++Copyright++ 1985, 1988, 1993
- * -
- * Copyright (c) 1985, 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * -
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- * -
- * --Copyright--
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)gethostnamadr.c 8.1 (Berkeley) 6/4/93";
-static char fromrcsid[] = "From: Id: gethnamaddr.c,v 8.23 1998/04/07 04:59:46 vixie Exp $";
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-
-#include <stdio.h>
-#include <unistd.h>
-#include <string.h>
-#include <netdb.h>
-#include <resolv.h>
-#include <ctype.h>
-#include <errno.h>
-#include <syslog.h>
-
-#include "res_config.h"
-
-#define SPRINTF(x) ((size_t)sprintf x)
-
-#define MAXALIASES 35
-#define MAXADDRS 35
-
-static const char AskedForGot[] =
- "gethostby*.gethostanswer: asked for \"%s\", got \"%s\"";
-
-static char *h_addr_ptrs[MAXADDRS + 1];
-
-static struct hostent host;
-static char *host_aliases[MAXALIASES];
-static char hostbuf[8*1024];
-static u_char host_addr[16]; /* IPv4 or IPv6 */
-
-#ifdef RESOLVSORT
-static void addrsort __P((char **, int));
-#endif
-
-#if PACKETSZ > 1024
-#define MAXPACKET PACKETSZ
-#else
-#define MAXPACKET 1024
-#endif
-
-typedef union {
- HEADER hdr;
- u_char buf[MAXPACKET];
-} querybuf;
-
-typedef union {
- int32_t al;
- char ac;
-} align;
-
-extern int h_errno;
-int _dns_ttl_;
-
-#ifdef DEBUG
-static void
-dprintf(msg, num)
- char *msg;
- int num;
-{
- if (_res.options & RES_DEBUG) {
- int save = errno;
-
- printf(msg, num);
- errno = save;
- }
-}
-#else
-# define dprintf(msg, num) /*nada*/
-#endif
-
-#define BOUNDED_INCR(x) \
- do { \
- cp += x; \
- if (cp > eom) { \
- h_errno = NO_RECOVERY; \
- return (NULL); \
- } \
- } while (0)
-
-#define BOUNDS_CHECK(ptr, count) \
- do { \
- if ((ptr) + (count) > eom) { \
- h_errno = NO_RECOVERY; \
- return (NULL); \
- } \
- } while (0)
-
-static struct hostent *
-gethostanswer(answer, anslen, qname, qtype)
- const querybuf *answer;
- int anslen;
- const char *qname;
- int qtype;
-{
- register const HEADER *hp;
- register const u_char *cp;
- register int n;
- const u_char *eom, *erdata;
- char *bp, **ap, **hap;
- int type, class, buflen, ancount, qdcount;
- int haveanswer, had_error;
- int toobig = 0;
- char tbuf[MAXDNAME];
- const char *tname;
- int (*name_ok) __P((const char *));
-
- tname = qname;
- host.h_name = NULL;
- eom = answer->buf + anslen;
- switch (qtype) {
- case T_A:
- case T_AAAA:
- name_ok = res_hnok;
- break;
- case T_PTR:
- name_ok = res_dnok;
- break;
- default:
- h_errno = NO_RECOVERY;
- return (NULL); /* XXX should be abort(); */
- }
- /*
- * find first satisfactory answer
- */
- hp = &answer->hdr;
- ancount = ntohs(hp->ancount);
- qdcount = ntohs(hp->qdcount);
- bp = hostbuf;
- buflen = sizeof hostbuf;
- cp = answer->buf;
- BOUNDED_INCR(HFIXEDSZ);
- if (qdcount != 1) {
- h_errno = NO_RECOVERY;
- return (NULL);
- }
- n = dn_expand(answer->buf, eom, cp, bp, buflen);
- if ((n < 0) || !(*name_ok)(bp)) {
- h_errno = NO_RECOVERY;
- return (NULL);
- }
- BOUNDED_INCR(n + QFIXEDSZ);
- if (qtype == T_A || qtype == T_AAAA) {
- /* res_send() has already verified that the query name is the
- * same as the one we sent; this just gets the expanded name
- * (i.e., with the succeeding search-domain tacked on).
- */
- n = strlen(bp) + 1; /* for the \0 */
- if (n >= MAXHOSTNAMELEN) {
- h_errno = NO_RECOVERY;
- return (NULL);
- }
- host.h_name = bp;
- bp += n;
- buflen -= n;
- /* The qname can be abbreviated, but h_name is now absolute. */
- qname = host.h_name;
- }
- ap = host_aliases;
- *ap = NULL;
- host.h_aliases = host_aliases;
- hap = h_addr_ptrs;
- *hap = NULL;
- host.h_addr_list = h_addr_ptrs;
- haveanswer = 0;
- had_error = 0;
- _dns_ttl_ = -1;
- while (ancount-- > 0 && cp < eom && !had_error) {
- n = dn_expand(answer->buf, eom, cp, bp, buflen);
- if ((n < 0) || !(*name_ok)(bp)) {
- had_error++;
- continue;
- }
- cp += n; /* name */
- BOUNDS_CHECK(cp, 3 * INT16SZ + INT32SZ);
- type = _getshort(cp);
- cp += INT16SZ; /* type */
- class = _getshort(cp);
- cp += INT16SZ; /* class */
- if (qtype == T_A && type == T_A)
- _dns_ttl_ = _getlong(cp);
- cp += INT32SZ; /* TTL */
- n = _getshort(cp);
- cp += INT16SZ; /* len */
- BOUNDS_CHECK(cp, n);
- erdata = cp + n;
- if (class != C_IN) {
- /* XXX - debug? syslog? */
- cp += n;
- continue; /* XXX - had_error++ ? */
- }
- if ((qtype == T_A || qtype == T_AAAA) && type == T_CNAME) {
- if (ap >= &host_aliases[MAXALIASES-1])
- continue;
- n = dn_expand(answer->buf, eom, cp, tbuf, sizeof tbuf);
- if ((n < 0) || !(*name_ok)(tbuf)) {
- had_error++;
- continue;
- }
- cp += n;
- if (cp != erdata) {
- h_errno = NO_RECOVERY;
- return (NULL);
- }
- /* Store alias. */
- *ap++ = bp;
- n = strlen(bp) + 1; /* for the \0 */
- if (n >= MAXHOSTNAMELEN) {
- had_error++;
- continue;
- }
- bp += n;
- buflen -= n;
- /* Get canonical name. */
- n = strlen(tbuf) + 1; /* for the \0 */
- if (n > buflen || n >= MAXHOSTNAMELEN) {
- had_error++;
- continue;
- }
- strcpy(bp, tbuf);
- host.h_name = bp;
- bp += n;
- buflen -= n;
- continue;
- }
- if (qtype == T_PTR && type == T_CNAME) {
- n = dn_expand(answer->buf, eom, cp, tbuf, sizeof tbuf);
- if (n < 0 || !res_dnok(tbuf)) {
- had_error++;
- continue;
- }
- cp += n;
- if (cp != erdata) {
- h_errno = NO_RECOVERY;
- return (NULL);
- }
- /* Get canonical name. */
- n = strlen(tbuf) + 1; /* for the \0 */
- if (n > buflen || n >= MAXHOSTNAMELEN) {
- had_error++;
- continue;
- }
- strcpy(bp, tbuf);
- tname = bp;
- bp += n;
- buflen -= n;
- continue;
- }
- if (type != qtype) {
- syslog(LOG_NOTICE|LOG_AUTH,
- "gethostby*.gethostanswer: asked for \"%s %s %s\", got type \"%s\"",
- qname, p_class(C_IN), p_type(qtype),
- p_type(type));
- cp += n;
- continue; /* XXX - had_error++ ? */
- }
- switch (type) {
- case T_PTR:
- if (strcasecmp(tname, bp) != 0) {
- syslog(LOG_NOTICE|LOG_AUTH,
- AskedForGot, qname, bp);
- cp += n;
- continue; /* XXX - had_error++ ? */
- }
- n = dn_expand(answer->buf, eom, cp, bp, buflen);
- if ((n < 0) || !res_hnok(bp)) {
- had_error++;
- break;
- }
-#if MULTI_PTRS_ARE_ALIASES
- cp += n;
- if (cp != erdata) {
- h_errno = NO_RECOVERY;
- return (NULL);
- }
- if (!haveanswer)
- host.h_name = bp;
- else if (ap < &host_aliases[MAXALIASES-1])
- *ap++ = bp;
- else
- n = -1;
- if (n != -1) {
- n = strlen(bp) + 1; /* for the \0 */
- if (n >= MAXHOSTNAMELEN) {
- had_error++;
- break;
- }
- bp += n;
- buflen -= n;
- }
- break;
-#else
- host.h_name = bp;
- if (_res.options & RES_USE_INET6) {
- n = strlen(bp) + 1; /* for the \0 */
- if (n >= MAXHOSTNAMELEN) {
- had_error++;
- break;
- }
- bp += n;
- buflen -= n;
- _map_v4v6_hostent(&host, &bp, &buflen);
- }
- h_errno = NETDB_SUCCESS;
- return (&host);
-#endif
- case T_A:
- case T_AAAA:
- if (strcasecmp(host.h_name, bp) != 0) {
- syslog(LOG_NOTICE|LOG_AUTH,
- AskedForGot, host.h_name, bp);
- cp += n;
- continue; /* XXX - had_error++ ? */
- }
- if (n != host.h_length) {
- cp += n;
- continue;
- }
- if (!haveanswer) {
- register int nn;
-
- host.h_name = bp;
- nn = strlen(bp) + 1; /* for the \0 */
- bp += nn;
- buflen -= nn;
- }
-
- bp += sizeof(align) - ((u_long)bp % sizeof(align));
-
- if (bp + n >= &hostbuf[sizeof hostbuf]) {
- dprintf("size (%d) too big\n", n);
- had_error++;
- continue;
- }
- if (hap >= &h_addr_ptrs[MAXADDRS-1]) {
- if (!toobig++)
- dprintf("Too many addresses (%d)\n",
- MAXADDRS);
- cp += n;
- continue;
- }
- bcopy(cp, *hap++ = bp, n);
- bp += n;
- buflen -= n;
- cp += n;
- if (cp != erdata) {
- h_errno = NO_RECOVERY;
- return (NULL);
- }
- break;
- default:
- dprintf("Impossible condition (type=%d)\n", type);
- h_errno = NO_RECOVERY;
- return (NULL);
- /* BIND has abort() here, too risky on bad data */
- }
- if (!had_error)
- haveanswer++;
- }
- if (haveanswer) {
- *ap = NULL;
- *hap = NULL;
-# if defined(RESOLVSORT)
- /*
- * Note: we sort even if host can take only one address
- * in its return structures - should give it the "best"
- * address in that case, not some random one
- */
- if (_res.nsort && haveanswer > 1 && qtype == T_A)
- addrsort(h_addr_ptrs, haveanswer);
-# endif /*RESOLVSORT*/
- if (!host.h_name) {
- n = strlen(qname) + 1; /* for the \0 */
- if (n > buflen || n >= MAXHOSTNAMELEN)
- goto no_recovery;
- strcpy(bp, qname);
- host.h_name = bp;
- bp += n;
- buflen -= n;
- }
- if (_res.options & RES_USE_INET6)
- _map_v4v6_hostent(&host, &bp, &buflen);
- h_errno = NETDB_SUCCESS;
- return (&host);
- }
- no_recovery:
- h_errno = NO_RECOVERY;
- return (NULL);
-}
-
-struct hostent *
-__dns_getanswer(answer, anslen, qname, qtype)
- const char *answer;
- int anslen;
- const char *qname;
- int qtype;
-{
- switch(qtype) {
- case T_AAAA:
- host.h_addrtype = AF_INET6;
- host.h_length = IN6ADDRSZ;
- break;
- case T_A:
- default:
- host.h_addrtype = AF_INET;
- host.h_length = INADDRSZ;
- break;
- }
-
- return(gethostanswer((const querybuf *)answer, anslen, qname, qtype));
-}
-
-struct hostent *
-_gethostbydnsname(name, af)
- const char *name;
- int af;
-{
- querybuf buf;
- register const char *cp;
- char *bp;
- int n, size, type, len;
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
- h_errno = NETDB_INTERNAL;
- return (NULL);
- }
-
- switch (af) {
- case AF_INET:
- size = INADDRSZ;
- type = T_A;
- break;
- case AF_INET6:
- size = IN6ADDRSZ;
- type = T_AAAA;
- break;
- default:
- h_errno = NETDB_INTERNAL;
- errno = EAFNOSUPPORT;
- return (NULL);
- }
-
- host.h_addrtype = af;
- host.h_length = size;
-
- /*
- * if there aren't any dots, it could be a user-level alias.
- * this is also done in res_query() since we are not the only
- * function that looks up host names.
- */
- if (!strchr(name, '.') && (cp = __hostalias(name)))
- name = cp;
-
- /*
- * disallow names consisting only of digits/dots, unless
- * they end in a dot.
- */
- if (isdigit((int)name[0]))
- for (cp = name;; ++cp) {
- if (!*cp) {
- if (*--cp == '.')
- break;
- /*
- * All-numeric, no dot at the end.
- * Fake up a hostent as if we'd actually
- * done a lookup.
- */
- if (inet_pton(af, name, host_addr) <= 0) {
- h_errno = HOST_NOT_FOUND;
- return (NULL);
- }
- strncpy(hostbuf, name, MAXDNAME);
- hostbuf[MAXDNAME] = '\0';
- bp = hostbuf + MAXDNAME;
- len = sizeof hostbuf - MAXDNAME;
- host.h_name = hostbuf;
- host.h_aliases = host_aliases;
- host_aliases[0] = NULL;
- h_addr_ptrs[0] = (char *)host_addr;
- h_addr_ptrs[1] = NULL;
- host.h_addr_list = h_addr_ptrs;
- if (_res.options & RES_USE_INET6)
- _map_v4v6_hostent(&host, &bp, &len);
- h_errno = NETDB_SUCCESS;
- return (&host);
- }
- if (!isdigit((int)*cp) && *cp != '.')
- break;
- }
- if ((isxdigit((int)name[0]) && strchr(name, ':') != NULL) ||
- name[0] == ':')
- for (cp = name;; ++cp) {
- if (!*cp) {
- if (*--cp == '.')
- break;
- /*
- * All-IPv6-legal, no dot at the end.
- * Fake up a hostent as if we'd actually
- * done a lookup.
- */
- if (inet_pton(af, name, host_addr) <= 0) {
- h_errno = HOST_NOT_FOUND;
- return (NULL);
- }
- strncpy(hostbuf, name, MAXDNAME);
- hostbuf[MAXDNAME] = '\0';
- bp = hostbuf + MAXDNAME;
- len = sizeof hostbuf - MAXDNAME;
- host.h_name = hostbuf;
- host.h_aliases = host_aliases;
- host_aliases[0] = NULL;
- h_addr_ptrs[0] = (char *)host_addr;
- h_addr_ptrs[1] = NULL;
- host.h_addr_list = h_addr_ptrs;
- h_errno = NETDB_SUCCESS;
- return (&host);
- }
- if (!isxdigit((int)*cp) && *cp != ':' && *cp != '.')
- break;
- }
-
- if ((n = res_search(name, C_IN, type, buf.buf, sizeof(buf))) < 0) {
- dprintf("res_search failed (%d)\n", n);
- return (NULL);
- }
- return (gethostanswer(&buf, n, name, type));
-}
-
-struct hostent *
-_gethostbydnsaddr(addr, len, af)
- const char *addr; /* XXX should have been def'd as u_char! */
- int len, af;
-{
- const u_char *uaddr = (const u_char *)addr;
- static const u_char mapped[] = { 0,0, 0,0, 0,0, 0,0, 0,0, 0xff,0xff };
- static const u_char tunnelled[] = { 0,0, 0,0, 0,0, 0,0, 0,0, 0,0 };
- int n, size;
- querybuf buf;
- register struct hostent *hp;
- char qbuf[MAXDNAME+1], *qp;
-#ifdef SUNSECURITY
- register struct hostent *rhp;
- char **haddr;
- u_long old_options;
- char hname2[MAXDNAME+1];
-#endif /*SUNSECURITY*/
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
- h_errno = NETDB_INTERNAL;
- return (NULL);
- }
- if (af == AF_INET6 && len == IN6ADDRSZ &&
- (!bcmp(uaddr, mapped, sizeof mapped) ||
- !bcmp(uaddr, tunnelled, sizeof tunnelled))) {
- /* Unmap. */
- addr += sizeof mapped;
- uaddr += sizeof mapped;
- af = AF_INET;
- len = INADDRSZ;
- }
- switch (af) {
- case AF_INET:
- size = INADDRSZ;
- break;
- case AF_INET6:
- size = IN6ADDRSZ;
- break;
- default:
- errno = EAFNOSUPPORT;
- h_errno = NETDB_INTERNAL;
- return (NULL);
- }
- if (size != len) {
- errno = EINVAL;
- h_errno = NETDB_INTERNAL;
- return (NULL);
- }
- switch (af) {
- case AF_INET:
- (void) sprintf(qbuf, "%u.%u.%u.%u.in-addr.arpa",
- (uaddr[3] & 0xff),
- (uaddr[2] & 0xff),
- (uaddr[1] & 0xff),
- (uaddr[0] & 0xff));
- break;
- case AF_INET6:
- qp = qbuf;
- for (n = IN6ADDRSZ - 1; n >= 0; n--) {
- qp += SPRINTF((qp, "%x.%x.",
- uaddr[n] & 0xf,
- (uaddr[n] >> 4) & 0xf));
- }
- strcpy(qp, "ip6.int");
- break;
- default:
- abort();
- }
- n = res_query(qbuf, C_IN, T_PTR, (u_char *)buf.buf, sizeof buf.buf);
- if (n < 0) {
- dprintf("res_query failed (%d)\n", n);
- return (NULL);
- }
- if (!(hp = gethostanswer(&buf, n, qbuf, T_PTR)))
- return (NULL); /* h_errno was set by gethostanswer() */
-#ifdef SUNSECURITY
- if (af == AF_INET) {
- /*
- * turn off search as the name should be absolute,
- * 'localhost' should be matched by defnames
- */
- strncpy(hname2, hp->h_name, MAXDNAME);
- hname2[MAXDNAME] = '\0';
- old_options = _res.options;
- _res.options &= ~RES_DNSRCH;
- _res.options |= RES_DEFNAMES;
- if (!(rhp = gethostbyname(hname2))) {
- syslog(LOG_NOTICE|LOG_AUTH,
- "gethostbyaddr: No A record for %s (verifying [%s])",
- hname2, inet_ntoa(*((struct in_addr *)addr)));
- _res.options = old_options;
- h_errno = HOST_NOT_FOUND;
- return (NULL);
- }
- _res.options = old_options;
- for (haddr = rhp->h_addr_list; *haddr; haddr++)
- if (!memcmp(*haddr, addr, INADDRSZ))
- break;
- if (!*haddr) {
- syslog(LOG_NOTICE|LOG_AUTH,
- "gethostbyaddr: A record of %s != PTR record [%s]",
- hname2, inet_ntoa(*((struct in_addr *)addr)));
- h_errno = HOST_NOT_FOUND;
- return (NULL);
- }
- }
-#endif /*SUNSECURITY*/
- hp->h_addrtype = af;
- hp->h_length = len;
- bcopy(addr, host_addr, len);
- h_addr_ptrs[0] = (char *)host_addr;
- h_addr_ptrs[1] = NULL;
- if (af == AF_INET && (_res.options & RES_USE_INET6)) {
- _map_v4v6_address((char*)host_addr, (char*)host_addr);
- hp->h_addrtype = AF_INET6;
- hp->h_length = IN6ADDRSZ;
- }
- h_errno = NETDB_SUCCESS;
- return (hp);
-}
-
-#ifdef RESOLVSORT
-static void
-addrsort(ap, num)
- char **ap;
- int num;
-{
- int i, j;
- char **p;
- short aval[MAXADDRS];
- int needsort = 0;
-
- p = ap;
- for (i = 0; i < num; i++, p++) {
- for (j = 0 ; (unsigned)j < _res.nsort; j++)
- if (_res.sort_list[j].addr.s_addr ==
- (((struct in_addr *)(*p))->s_addr & _res.sort_list[j].mask))
- break;
- aval[i] = j;
- if (needsort == 0 && i > 0 && j < aval[i-1])
- needsort = i;
- }
- if (!needsort)
- return;
-
- while (needsort < num) {
- for (j = needsort - 1; j >= 0; j--) {
- if (aval[j] > aval[j+1]) {
- char *hp;
-
- i = aval[j];
- aval[j] = aval[j+1];
- aval[j+1] = i;
-
- hp = ap[j];
- ap[j] = ap[j+1];
- ap[j+1] = hp;
-
- } else
- break;
- }
- needsort++;
- }
-}
-#endif
-void
-_sethostdnsent(stayopen)
- int stayopen;
-{
- if ((_res.options & RES_INIT) == 0 && res_init() == -1)
- return;
- if (stayopen)
- _res.options |= RES_STAYOPEN | RES_USEVC;
-}
-
-void
-_endhostdnsent()
-{
- _res.options &= ~(RES_STAYOPEN | RES_USEVC);
- res_close();
-}
diff --git a/cpukit/libnetworking/libc/gethostbyht.c b/cpukit/libnetworking/libc/gethostbyht.c
deleted file mode 100644
index 29f2805367..0000000000
--- a/cpukit/libnetworking/libc/gethostbyht.c
+++ /dev/null
@@ -1,202 +0,0 @@
-/*-
- * Copyright (c) 1985, 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * -
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- * -
- * --Copyright--
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)gethostnamadr.c 8.1 (Berkeley) 6/4/93";
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <errno.h>
-#include <string.h>
-#include <arpa/nameser.h> /* XXX */
-#include <resolv.h> /* XXX */
-
-#define MAXALIASES 35
-
-static struct hostent host;
-static char *host_aliases[MAXALIASES];
-static char hostbuf[BUFSIZ+1];
-static FILE *hostf = NULL;
-static u_char host_addr[16]; /* IPv4 or IPv6 */
-static char *h_addr_ptrs[2];
-static int stayopen = 0;
-
-void
-_sethosthtent(f)
- int f;
-{
- if (!hostf)
- hostf = fopen(_PATH_HOSTS, "r" );
- else
- rewind(hostf);
- stayopen = f;
-}
-
-void
-_endhosthtent()
-{
- if (hostf && !stayopen) {
- (void) fclose(hostf);
- hostf = NULL;
- }
-}
-
-struct hostent *
-gethostent()
-{
- char *p;
- register char *cp, **q;
- int af, len;
-
- if (!hostf && !(hostf = fopen(_PATH_HOSTS, "r" ))) {
- h_errno = NETDB_INTERNAL;
- return (NULL);
- }
- again:
- if (!(p = fgets(hostbuf, sizeof hostbuf, hostf))) {
- h_errno = HOST_NOT_FOUND;
- return (NULL);
- }
- if (*p == '#')
- goto again;
- if (!(cp = strpbrk(p, "#\n")))
- goto again;
- *cp = '\0';
- if (!(cp = strpbrk(p, " \t")))
- goto again;
- *cp++ = '\0';
- if (inet_pton(AF_INET6, p, host_addr) > 0) {
- af = AF_INET6;
- len = IN6ADDRSZ;
- } else if (inet_pton(AF_INET, p, host_addr) > 0) {
- if (_res.options & RES_USE_INET6) {
- _map_v4v6_address((char*)host_addr, (char*)host_addr);
- af = AF_INET6;
- len = IN6ADDRSZ;
- } else {
- af = AF_INET;
- len = INADDRSZ;
- }
- } else {
- goto again;
- }
- h_addr_ptrs[0] = (char *)host_addr;
- h_addr_ptrs[1] = NULL;
- host.h_addr_list = h_addr_ptrs;
- host.h_length = len;
- host.h_addrtype = af;
- while (*cp == ' ' || *cp == '\t')
- cp++;
- host.h_name = cp;
- q = host.h_aliases = host_aliases;
- if ((cp = strpbrk(cp, " \t")) != NULL)
- *cp++ = '\0';
- while (cp && *cp) {
- if (*cp == ' ' || *cp == '\t') {
- cp++;
- continue;
- }
- if (q < &host_aliases[MAXALIASES - 1])
- *q++ = cp;
- if ((cp = strpbrk(cp, " \t")) != NULL)
- *cp++ = '\0';
- }
- *q = NULL;
- h_errno = NETDB_SUCCESS;
- return (&host);
-}
-
-struct hostent *
-_gethostbyhtname(name, af)
- const char *name;
- int af;
-{
- register struct hostent *p;
- register char **cp;
-
- sethostent(0);
- while ((p = gethostent()) != NULL) {
- if (p->h_addrtype != af)
- continue;
- if (strcasecmp(p->h_name, name) == 0)
- break;
- for (cp = p->h_aliases; *cp != 0; cp++)
- if (strcasecmp(*cp, name) == 0)
- goto found;
- }
-found:
- endhostent();
- return (p);
-}
-
-struct hostent *
-_gethostbyhtaddr(addr, len, af)
- const char *addr;
- int len, af;
-{
- register struct hostent *p;
-
- sethostent(0);
- while ((p = gethostent()) != NULL)
- if (p->h_addrtype == af && !bcmp(p->h_addr, addr, len))
- break;
- endhostent();
- return (p);
-}
diff --git a/cpukit/libnetworking/libc/gethostbyname.3 b/cpukit/libnetworking/libc/gethostbyname.3
deleted file mode 100644
index e21dc79f1d..0000000000
--- a/cpukit/libnetworking/libc/gethostbyname.3
+++ /dev/null
@@ -1,305 +0,0 @@
-.\" Copyright (c) 1983, 1987, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" From: @(#)gethostbyname.3 8.4 (Berkeley) 5/25/95
-.\" $Id$
-.\"
-.Dd May 25, 1995
-.Dt GETHOSTBYNAME 3
-.Os BSD 4.2
-.Sh NAME
-.Nm gethostbyname ,
-.Nm gethostbyname2 ,
-.Nm gethostbyaddr ,
-.Nm gethostent ,
-.Nm sethostent ,
-.Nm endhostent ,
-.Nm herror ,
-.Nm hstrerror
-.Nd get network host entry
-.Sh SYNOPSIS
-.Fd #include <netdb.h>
-.Vt extern int h_errno;
-.Ft struct hostent *
-.Fn gethostbyname "const char *name"
-.Ft struct hostent *
-.Fn gethostbyname2 "const char *name" "int af"
-.Ft struct hostent *
-.Fn gethostbyaddr "const char *addr" "int len" "int type"
-.Ft struct hostent *
-.Fn gethostent void
-.Ft void
-.Fn sethostent "int stayopen"
-.Ft void
-.Fn endhostent void
-.Ft void
-.Fn herror "const char *string"
-.Ft const char *
-.Fn hstrerror "int err"
-.Sh DESCRIPTION
-The
-.Fn gethostbyname ,
-.Fn gethostbyname2
-and
-.Fn gethostbyaddr
-functions
-each return a pointer to an object with the
-following structure describing an internet host
-referenced by name or by address, respectively.
-This structure contains either the information obtained from the name server,
-.Xr named 8 ,
-or broken-out fields from a line in
-.Pa /etc/hosts .
-If the local name server is not running these routines do a lookup in
-.Pa /etc/hosts .
-.Bd -literal
-struct hostent {
- char *h_name; /* official name of host */
- char **h_aliases; /* alias list */
- int h_addrtype; /* host address type */
- int h_length; /* length of address */
- char **h_addr_list; /* list of addresses from name server */
-};
-#define h_addr h_addr_list[0] /* address, for backward compatibility */
-.Ed
-.Pp
-The members of this structure are:
-.Bl -tag -width h_addr_list
-.It Fa h_name
-Official name of the host.
-.It Fa h_aliases
-A NULL-terminated array of alternate names for the host.
-.It Fa h_addrtype
-The type of address being returned; usually
-.Dv AF_INET .
-.It Fa h_length
-The length, in bytes, of the address.
-.It Fa h_addr_list
-A NULL-terminated array of network addresses for the host.
-Host addresses are returned in network byte order.
-.It Fa h_addr
-The first address in
-.Fa h_addr_list ;
-this is for backward compatibility.
-.El
-.Pp
-When using the nameserver,
-.Fn gethostbyname
-and
-.Fn gethostbyname
-will search for the named host in the current domain and its parents
-unless the name ends in a dot.
-If the name contains no dot, and if the environment variable
-.Dq Ev HOSTALIASES
-contains the name of an alias file, the alias file will first be searched
-for an alias matching the input name.
-See
-.Xr hostname 7
-for the domain search procedure and the alias file format.
-.Pp
-The
-.Fn gethostbyname2
-function is an evolution of
-.Fn gethostbyname
-which is intended to allow lookups in address families other than
-.Dv AF_INET ,
-for example
-.Dv AF_INET6 .
-Currently the
-.Fa af
-argument must be specified as
-.Dv AF_INET
-else the function will return
-.Dv NULL
-after having set
-.Va h_errno
-to
-.Dv NETDB_INTERNAL
-.Pp
-The
-.Fn sethostent
-function
-may be used to request the use of a connected
-.Tn TCP
-socket for queries.
-If the
-.Fa stayopen
-flag is non-zero,
-this sets the option to send all queries to the name server using
-.Tn TCP
-and to retain the connection after each call to
-.Fn gethostbyname ,
-.Fn gethostbyname2
-or
-.Fn gethostbyaddr .
-Otherwise, queries are performed using
-.Tn UDP
-datagrams.
-.Pp
-The
-.Fn endhostent
-function
-closes the
-.Tn TCP
-connection.
-.Pp
-The
-.Fn herror
-function writes a message to the diagnostic output consisting of the
-string parameter
-.Fa s ,
-the constant string ": ", and a message corresponding to the value of
-.Va h_errno .
-.Pp
-The
-.Fn hstrerror
-function returns a string which is the message text corresponding to the
-value of the
-.Fa err
-parameter.
-.Sh FILES
-.Bl -tag -width /etc/resolv.conf -compact
-.It Pa /etc/hosts
-.It Pa /etc/host.conf
-.It Pa /etc/resolv.conf
-.El
-.Sh DIAGNOSTICS
-Error return status from
-.Fn gethostbyname ,
-.Fn gethostbyname2
-and
-.Fn gethostbyaddr
-is indicated by return of a null pointer.
-The external integer
-.Va h_errno
-may then be checked to see whether this is a temporary failure
-or an invalid or unknown host.
-The routine
-.Fn herror
-can be used to print an error message describing the failure.
-If its argument
-.Fa string
-is
-.Pf non Dv -NULL ,
-it is printed, followed by a colon and a space.
-The error message is printed with a trailing newline.
-.Pp
-The variable
-.Va h_errno
-can have the following values:
-.Bl -tag -width HOST_NOT_FOUND
-.It Dv HOST_NOT_FOUND
-No such host is known.
-.It Dv TRY_AGAIN
-This is usually a temporary error
-and means that the local server did not receive
-a response from an authoritative server.
-A retry at some later time may succeed.
-.It Dv NO_RECOVERY
-Some unexpected server failure was encountered.
-This is a non-recoverable error.
-.It Dv NO_DATA
-The requested name is valid but does not have an IP address;
-this is not a temporary error.
-This means that the name is known to the name server but there is no address
-associated with this name.
-Another type of request to the name server using this domain name
-will result in an answer;
-for example, a mail-forwarder may be registered for this domain.
-.El
-.Sh SEE ALSO
-.Xr resolver 3 ,
-.Xr hosts 5 ,
-.Xr hostname 7 ,
-.Xr named 8
-.Sh CAVEAT
-The
-.Fn gethostent
-function
-is defined, and
-.Fn sethostent
-and
-.Fn endhostent
-are redefined,
-when
-.Xr libc 3
-is built to use only the routines to lookup in
-.Pa /etc/hosts
-and not the name server.
-.Pp
-The
-.Fn gethostent
-function
-reads the next line of
-.Pa /etc/hosts ,
-opening the file if necessary.
-.Pp
-The
-.Fn sethostent
-function
-opens and/or rewinds the file
-.Pa /etc/hosts .
-If the
-.Fa stayopen
-argument is non-zero,
-the file will not be closed after each call to
-.Fn gethostbyname ,
-.Fn gethostbyname2
-or
-.Fn gethostbyaddr .
-.Pp
-The
-.Fn endhostent
-function
-closes the file.
-.Sh HISTORY
-The
-.Fn herror
-function appeared in
-.Bx 4.3 .
-The
-.Fn endhostent ,
-.Fn gethostbyaddr ,
-.Fn gethostbyname ,
-.Fn gethostent ,
-and
-.Fn sethostent
-functions appeared in
-.Bx 4.2 .
-The
-.Fn gethostbyname2
-function first appeared in bind-4.9.4.
-.Sh BUGS
-These functions use static data storage;
-if the data is needed for future use, it should be
-copied before any subsequent calls overwrite it.
-Only the Internet
-address format is currently understood.
diff --git a/cpukit/libnetworking/libc/gethostbynis.c b/cpukit/libnetworking/libc/gethostbynis.c
deleted file mode 100644
index 45dbe5a85d..0000000000
--- a/cpukit/libnetworking/libc/gethostbynis.c
+++ /dev/null
@@ -1,142 +0,0 @@
-/*-
- * Copyright (c) 1994, Garrett Wollman
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)$Id$";
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <errno.h>
-#include <string.h>
-#ifdef YP
-#include <rpc/rpc.h>
-#include <rpcsvc/yp_prot.h>
-#include <rpcsvc/ypclnt.h>
-#endif
-
-#define MAXALIASES 35
-#define MAXADDRS 35
-
-#ifdef YP
-static char *host_aliases[MAXALIASES];
-static char hostaddr[MAXADDRS];
-static char *host_addrs[2];
-#endif /* YP */
-
-static struct hostent *
-_gethostbynis(name, map, af)
- const char *name;
- char *map;
- int af;
-{
-#ifdef YP
- register char *cp, **q;
- char *result;
- int resultlen;
- static struct hostent h;
- static char *domain = (char *)NULL;
- static char ypbuf[YPMAXRECORD + 2];
-
- switch(af) {
- case AF_INET:
- break;
- default:
- case AF_INET6:
- errno = EAFNOSUPPORT;
- return NULL;
- }
-
- if (domain == (char *)NULL)
- if (yp_get_default_domain (&domain))
- return ((struct hostent *)NULL);
-
- if (yp_match(domain, map, name, strlen(name), &result, &resultlen))
- return ((struct hostent *)NULL);
-
- /* avoid potential memory leak */
- bcopy((char *)result, (char *)&ypbuf, resultlen);
- ypbuf[resultlen] = '\0';
- free(result);
- result = (char *)&ypbuf;
-
- if ((cp = index(result, '\n')))
- *cp = '\0';
-
- cp = strpbrk(result, " \t");
- *cp++ = '\0';
- h.h_addr_list = host_addrs;
- h.h_addr = hostaddr;
- *((u_long *)h.h_addr) = inet_addr(result);
- h.h_length = sizeof(u_long);
- h.h_addrtype = AF_INET;
- while (*cp == ' ' || *cp == '\t')
- cp++;
- h.h_name = cp;
- q = h.h_aliases = host_aliases;
- cp = strpbrk(cp, " \t");
- if (cp != NULL)
- *cp++ = '\0';
- while (cp && *cp) {
- if (*cp == ' ' || *cp == '\t') {
- cp++;
- continue;
- }
- if (q < &host_aliases[MAXALIASES - 1])
- *q++ = cp;
- cp = strpbrk(cp, " \t");
- if (cp != NULL)
- *cp++ = '\0';
- }
- *q = NULL;
- return (&h);
-#else
- return (NULL);
-#endif /* YP */
-}
-
-struct hostent *
-_gethostbynisname(name, af)
- const char *name;
- int af;
-{
- return _gethostbynis(name, "hosts.byname", af);
-}
-
-struct hostent *
-_gethostbynisaddr(addr, len, af)
- const char *addr;
- int len;
- int af;
-{
- return _gethostbynis(inet_ntoa(*(struct in_addr *)addr),"hosts.byaddr", af);
-}
diff --git a/cpukit/libnetworking/libc/gethostnamadr.c b/cpukit/libnetworking/libc/gethostnamadr.c
deleted file mode 100644
index 92f7a21014..0000000000
--- a/cpukit/libnetworking/libc/gethostnamadr.c
+++ /dev/null
@@ -1,224 +0,0 @@
-/*-
- * Copyright (c) 1994, Garrett Wollman
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)$Id$";
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <errno.h>
-#include <string.h>
-#include <arpa/nameser.h> /* XXX hack for _res */
-#include <resolv.h> /* XXX hack for _res */
-
-#define _PATH_HOSTCONF "/etc/host.conf"
-
-enum service_type {
- SERVICE_NONE = 0,
- SERVICE_BIND,
- SERVICE_HOSTS,
- SERVICE_NIS };
-#define SERVICE_MAX SERVICE_NIS
-
-static struct {
- const char *name;
- enum service_type type;
-} service_names[] = {
- { "hosts", SERVICE_HOSTS },
- { "/etc/hosts", SERVICE_HOSTS },
- { "hosttable", SERVICE_HOSTS },
- { "htable", SERVICE_HOSTS },
- { "bind", SERVICE_BIND },
- { "dns", SERVICE_BIND },
- { "domain", SERVICE_BIND },
- { "yp", SERVICE_NIS },
- { "yellowpages", SERVICE_NIS },
- { "nis", SERVICE_NIS },
- { 0, SERVICE_NONE }
-};
-
-static enum service_type service_order[SERVICE_MAX + 1];
-static int service_done = 0;
-
-static enum service_type
-get_service_name(const char *name) {
- int i;
- for(i = 0; service_names[i].type != SERVICE_NONE; i++) {
- if(!strcasecmp(name, service_names[i].name)) {
- return service_names[i].type;
- }
- }
- return SERVICE_NONE;
-}
-
-static void
-init_services()
-{
- char *cp, *p, buf[BUFSIZ];
- register int cc = 0;
- FILE *fd;
-
- if ((fd = (FILE *)fopen(_PATH_HOSTCONF, "r")) == NULL) {
- /* make some assumptions */
- service_order[0] = SERVICE_BIND;
- service_order[1] = SERVICE_HOSTS;
- service_order[2] = SERVICE_NONE;
- } else {
- while (fgets(buf, BUFSIZ, fd) != NULL && cc < SERVICE_MAX) {
- if(buf[0] == '#')
- continue;
-
- p = buf;
- while ((cp = strsep(&p, "\n \t,:;")) != NULL && *cp == '\0')
- ;
- if (cp == NULL)
- continue;
- do {
- if (isalpha((int)cp[0])) {
- service_order[cc] = get_service_name(cp);
- if(service_order[cc] != SERVICE_NONE)
- cc++;
- }
- while ((cp = strsep(&p, "\n \t,:;")) != NULL && *cp == '\0')
- ;
- } while(cp != NULL && cc < SERVICE_MAX);
- }
- service_order[cc] = SERVICE_NONE;
- fclose(fd);
- }
- service_done = 1;
-}
-
-struct hostent *
-gethostbyname(const char *name)
-{
- struct hostent *hp;
-
- if (_res.options & RES_USE_INET6) { /* XXX */
- hp = gethostbyname2(name, AF_INET6); /* XXX */
- if (hp) /* XXX */
- return (hp); /* XXX */
- } /* XXX */
- return (gethostbyname2(name, AF_INET));
-}
-
-struct hostent *
-gethostbyname2(const char *name, int type)
-{
- struct hostent *hp = 0;
- int nserv = 0;
-
- if (!service_done)
- init_services();
-
- while (!hp) {
- switch (service_order[nserv]) {
- case SERVICE_NONE:
- return NULL;
- case SERVICE_HOSTS:
- hp = _gethostbyhtname(name, type);
- break;
- case SERVICE_BIND:
- hp = _gethostbydnsname(name, type);
- break;
- case SERVICE_NIS:
- hp = _gethostbynisname(name, type);
- break;
- }
- nserv++;
- }
- return hp;
-}
-
-struct hostent *
-gethostbyaddr(const char *addr, int len, int type)
-{
- struct hostent *hp = 0;
- int nserv = 0;
-
- if (!service_done)
- init_services();
-
- while (!hp) {
- switch (service_order[nserv]) {
- case SERVICE_NONE:
- return 0;
- case SERVICE_HOSTS:
- hp = _gethostbyhtaddr(addr, len, type);
- break;
- case SERVICE_BIND:
- hp = _gethostbydnsaddr(addr, len, type);
- break;
- case SERVICE_NIS:
- hp = _gethostbynisaddr(addr, len, type);
- break;
- }
- nserv++;
- }
- return hp;
-}
-
-#ifdef _THREAD_SAFE
-struct hostent_data;
-
-/*
- * Temporary function (not thread safe)
- */
-int gethostbyaddr_r(const char *addr, int len, int type,
- struct hostent *result, struct hostent_data *buffer)
-{
- struct hostent *hp;
- int ret;
- if ((hp = gethostbyaddr(addr, len, type)) == NULL) {
- ret = -1;
- } else {
- memcpy(result, hp, sizeof(struct hostent));
- ret = 0;
- }
- return(ret);
-}
-#endif
-
-void
-sethostent(stayopen)
- int stayopen;
-{
- _sethosthtent(stayopen);
- _sethostdnsent(stayopen);
-}
-
-void
-endhostent()
-{
- _endhosthtent();
- _endhostdnsent();
-}
diff --git a/cpukit/libnetworking/libc/gethostname.c b/cpukit/libnetworking/libc/gethostname.c
deleted file mode 100644
index 81dc2267c2..0000000000
--- a/cpukit/libnetworking/libc/gethostname.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * $Id$
- */
-
-#include "config.h"
-
-/*
- * Solaris doesn't include the gethostname call by default.
- */
-#include <sys/utsname.h>
-#include <sys/systeminfo.h>
-
-#include <netdb.h>
-
-/*
- * PUBLIC: #ifndef HAVE_GETHOSTNAME
- * PUBLIC: int gethostname __P((char *, int));
- * PUBLIC: #endif
- */
-int
-gethostname(host, len)
- char *host;
- int len;
-{
- return (sysinfo(SI_HOSTNAME, host, len) == -1 ? -1 : 0);
-}
diff --git a/cpukit/libnetworking/libc/getnetbydns.c b/cpukit/libnetworking/libc/getnetbydns.c
deleted file mode 100644
index 8f8c576332..0000000000
--- a/cpukit/libnetworking/libc/getnetbydns.c
+++ /dev/null
@@ -1,313 +0,0 @@
-/*-
- * Copyright (c) 1985, 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * -
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- * -
- * --Copyright--
- */
-/* Portions Copyright (c) 1993 Carlos Leandro and Rui Salgueiro
- * Dep. Matematica Universidade de Coimbra, Portugal, Europe
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)gethostnamadr.c 8.1 (Berkeley) 6/4/93";
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-
-#include <stdio.h>
-#include <netdb.h>
-#include <resolv.h>
-#include <ctype.h>
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-#include <syslog.h>
-
-#include "res_config.h"
-
-extern int h_errno;
-
-#define BYADDR 0
-#define BYNAME 1
-#define MAXALIASES 35
-
-#if PACKETSZ > 1024
-#define MAXPACKET PACKETSZ
-#else
-#define MAXPACKET 1024
-#endif
-
-typedef union {
- HEADER hdr;
- u_char buf[MAXPACKET];
-} querybuf;
-
-typedef union {
- long al;
- char ac;
-} align;
-
-static struct netent *
-getnetanswer(answer, anslen, net_i)
- querybuf *answer;
- int anslen;
- int net_i;
-{
-
- register HEADER *hp;
- register u_char *cp;
- register int n;
- u_char *eom;
- int type, class, buflen, ancount, qdcount, haveanswer, i, nchar;
- char aux1[MAXHOSTNAMELEN], aux2[MAXHOSTNAMELEN], ans[MAXHOSTNAMELEN];
- char *in, *st, *pauxt, *bp, **ap;
- char *paux1 = &aux1[0], *paux2 = &aux2[0], flag = 0;
-static struct netent net_entry;
-static char *net_aliases[MAXALIASES], netbuf[PACKETSZ];
-
- /*
- * find first satisfactory answer
- *
- * answer --> +------------+ ( MESSAGE )
- * | Header |
- * +------------+
- * | Question | the question for the name server
- * +------------+
- * | Answer | RRs answering the question
- * +------------+
- * | Authority | RRs pointing toward an authority
- * | Additional | RRs holding additional information
- * +------------+
- */
- eom = answer->buf + anslen;
- hp = &answer->hdr;
- ancount = ntohs(hp->ancount); /* #/records in the answer section */
- qdcount = ntohs(hp->qdcount); /* #/entries in the question section */
- bp = netbuf;
- buflen = sizeof(netbuf);
- cp = answer->buf + HFIXEDSZ;
- if (!qdcount) {
- if (hp->aa)
- h_errno = HOST_NOT_FOUND;
- else
- h_errno = TRY_AGAIN;
- return (NULL);
- }
- while (qdcount-- > 0)
- cp += __dn_skipname(cp, eom) + QFIXEDSZ;
- ap = net_aliases;
- *ap = NULL;
- net_entry.n_aliases = net_aliases;
- haveanswer = 0;
- while (--ancount >= 0 && cp < eom) {
- n = dn_expand(answer->buf, eom, cp, bp, buflen);
- if ((n < 0) || !res_dnok(bp))
- break;
- cp += n;
- ans[0] = '\0';
- (void)strncpy(&ans[0], bp, sizeof(ans) - 1);
- ans[sizeof(ans) - 1] = '\0';
- GETSHORT(type, cp);
- GETSHORT(class, cp);
- cp += INT32SZ; /* TTL */
- GETSHORT(n, cp);
- if (class == C_IN && type == T_PTR) {
- n = dn_expand(answer->buf, eom, cp, bp, buflen);
- if ((n < 0) || !res_hnok(bp)) {
- cp += n;
- return (NULL);
- }
- cp += n;
- *ap++ = bp;
- bp += strlen(bp) + 1;
- net_entry.n_addrtype =
- (class == C_IN) ? AF_INET : AF_UNSPEC;
- haveanswer++;
- }
- }
- if (haveanswer) {
- *ap = NULL;
- switch (net_i) {
- case BYADDR:
- net_entry.n_name = *net_entry.n_aliases;
- net_entry.n_net = 0L;
- break;
- case BYNAME:
- in = *net_entry.n_aliases;
- net_entry.n_name = &ans[0];
- aux2[0] = '\0';
- for (i = 0; i < 4; i++) {
- for (st = in, nchar = 0;
- *st != '.';
- st++, nchar++)
- ;
- if (nchar != 1 || *in != '0' || flag) {
- flag = 1;
- (void)strncpy(paux1,
- (i==0) ? in : in-1,
- (i==0) ?nchar : nchar+1);
- paux1[(i==0) ? nchar : nchar+1] = '\0';
- pauxt = paux2;
- paux2 = strcat(paux1, paux2);
- paux1 = pauxt;
- }
- in = ++st;
- }
- net_entry.n_net = inet_network(paux2);
- break;
- }
- net_entry.n_aliases++;
- return (&net_entry);
- }
- h_errno = TRY_AGAIN;
- return (NULL);
-}
-
-struct netent *
-_getnetbydnsaddr(net, net_type)
- register unsigned long net;
- register int net_type;
-{
- unsigned int netbr[4];
- int nn, anslen;
- querybuf buf;
- char qbuf[MAXDNAME];
- unsigned long net2;
- struct netent *net_entry;
-
- if (net_type != AF_INET)
- return (NULL);
-
- for (nn = 4, net2 = net; net2; net2 >>= 8)
- netbr[--nn] = net2 & 0xff;
- switch (nn) {
- case 3: /* Class A */
- sprintf(qbuf, "0.0.0.%u.in-addr.arpa", netbr[3]);
- break;
- case 2: /* Class B */
- sprintf(qbuf, "0.0.%u.%u.in-addr.arpa", netbr[3], netbr[2]);
- break;
- case 1: /* Class C */
- sprintf(qbuf, "0.%u.%u.%u.in-addr.arpa", netbr[3], netbr[2],
- netbr[1]);
- break;
- case 0: /* Class D - E */
- sprintf(qbuf, "%u.%u.%u.%u.in-addr.arpa", netbr[3], netbr[2],
- netbr[1], netbr[0]);
- break;
- }
- anslen = res_query(qbuf, C_IN, T_PTR, (u_char *)&buf, sizeof(buf));
- if (anslen < 0) {
-#ifdef DEBUG
- if (_res.options & RES_DEBUG)
- printf("res_query failed\n");
-#endif
- return (NULL);
- }
- net_entry = getnetanswer(&buf, anslen, BYADDR);
- if (net_entry) {
- unsigned u_net = net; /* maybe net should be unsigned ? */
-
- /* Strip trailing zeros */
- while ((u_net & 0xff) == 0 && u_net != 0)
- u_net >>= 8;
- net_entry->n_net = u_net;
- return (net_entry);
- }
- return (NULL);
-}
-
-struct netent *
-_getnetbydnsname(net)
- register const char *net;
-{
- int anslen;
- querybuf buf;
- char qbuf[MAXDNAME];
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
- h_errno = NETDB_INTERNAL;
- return (NULL);
- }
- strncpy(qbuf, net, sizeof(qbuf) - 1);
- qbuf[sizeof(qbuf) - 1] = '\0';
- anslen = res_search(qbuf, C_IN, T_PTR, (u_char *)&buf, sizeof(buf));
- if (anslen < 0) {
-#ifdef DEBUG
- if (_res.options & RES_DEBUG)
- printf("res_query failed\n");
-#endif
- return (NULL);
- }
- return getnetanswer(&buf, anslen, BYNAME);
-}
-
-void
-_setnetdnsent(stayopen)
- int stayopen;
-{
- if (stayopen)
- _res.options |= RES_STAYOPEN | RES_USEVC;
-}
-
-void
-_endnetdnsent()
-{
- _res.options &= ~(RES_STAYOPEN | RES_USEVC);
- res_close();
-}
diff --git a/cpukit/libnetworking/libc/getnetbyht.c b/cpukit/libnetworking/libc/getnetbyht.c
deleted file mode 100644
index f7b7b1091d..0000000000
--- a/cpukit/libnetworking/libc/getnetbyht.c
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/* Portions Copyright (c) 1993 Carlos Leandro and Rui Salgueiro
- * Dep. Matematica Universidade de Coimbra, Portugal, Europe
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * from getnetent.c 1.1 (Coimbra) 93/06/02
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getnetent.c 8.1 (Berkeley) 6/4/93";
-static char orig_rcsid[] = "From: Id: getnetent.c,v 8.4 1997/06/01 20:34:37 vixie Exp";
-static chat rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-#include <netdb.h>
-#include <stdio.h>
-#include <string.h>
-
-#define MAXALIASES 35
-
-static FILE *netf;
-static char line[BUFSIZ+1];
-static struct netent net;
-static char *net_aliases[MAXALIASES];
-static int _net_stayopen;
-
-void
-_setnethtent(f)
- int f;
-{
-
- if (netf == NULL)
- netf = fopen(_PATH_NETWORKS, "r" );
- else
- rewind(netf);
- _net_stayopen |= f;
-}
-
-void
-_endnethtent()
-{
-
- if (netf) {
- fclose(netf);
- netf = NULL;
- }
- _net_stayopen = 0;
-}
-
-struct netent *
-getnetent()
-{
- char *p;
- register char *cp, **q;
-
- if (netf == NULL && (netf = fopen(_PATH_NETWORKS, "r" )) == NULL)
- return (NULL);
-again:
- p = fgets(line, sizeof line, netf);
- if (p == NULL)
- return (NULL);
- if (*p == '#')
- goto again;
- cp = strpbrk(p, "#\n");
- if (cp == NULL)
- goto again;
- *cp = '\0';
- net.n_name = p;
- cp = strpbrk(p, " \t");
- if (cp == NULL)
- goto again;
- *cp++ = '\0';
- while (*cp == ' ' || *cp == '\t')
- cp++;
- p = strpbrk(cp, " \t");
- if (p != NULL)
- *p++ = '\0';
- net.n_net = inet_network(cp);
- net.n_addrtype = AF_INET;
- q = net.n_aliases = net_aliases;
- if (p != NULL)
- cp = p;
- while (cp && *cp) {
- if (*cp == ' ' || *cp == '\t') {
- cp++;
- continue;
- }
- if (q < &net_aliases[MAXALIASES - 1])
- *q++ = cp;
- cp = strpbrk(cp, " \t");
- if (cp != NULL)
- *cp++ = '\0';
- }
- *q = NULL;
- return (&net);
-}
-
-struct netent *
-_getnetbyhtname(name)
- register const char *name;
-{
- register struct netent *p;
- register char **cp;
-
- setnetent(_net_stayopen);
- while ( (p = getnetent()) ) {
- if (strcasecmp(p->n_name, name) == 0)
- break;
- for (cp = p->n_aliases; *cp != 0; cp++)
- if (strcasecmp(*cp, name) == 0)
- goto found;
- }
-found:
- if (!_net_stayopen)
- endnetent();
- return (p);
-}
-
-struct netent *
-_getnetbyhtaddr(net, type)
- register unsigned long net;
- register int type;
-{
- register struct netent *p;
-
- setnetent(_net_stayopen);
- while ( (p = getnetent()) )
- if (p->n_addrtype == type && p->n_net == net)
- break;
- if (!_net_stayopen)
- endnetent();
- return (p);
-}
diff --git a/cpukit/libnetworking/libc/getnetbynis.c b/cpukit/libnetworking/libc/getnetbynis.c
deleted file mode 100644
index 0549016ba2..0000000000
--- a/cpukit/libnetworking/libc/getnetbynis.c
+++ /dev/null
@@ -1,177 +0,0 @@
-/*-
- * Copyright (c) 1994, Garrett Wollman
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)$Id$";
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <errno.h>
-#include <string.h>
-#include <arpa/nameser.h>
-#ifdef YP
-#include <rpc/rpc.h>
-#include <rpcsvc/yp_prot.h>
-#include <rpcsvc/ypclnt.h>
-#endif
-
-#define MAXALIASES 35
-#define MAXADDRS 35
-
-#ifdef YP
-static char *host_aliases[MAXALIASES];
-#endif /* YP */
-
-static struct netent *
-_getnetbynis(name, map, af)
- const char *name;
- char *map;
- int af;
-{
-#ifdef YP
- register char *cp, **q;
- static char *result;
- int resultlen;
- static struct netent h;
- static char *domain = (char *)NULL;
- static char ypbuf[YPMAXRECORD + 2];
-
- switch(af) {
- case AF_INET:
- break;
- default:
- case AF_INET6:
- errno = EAFNOSUPPORT;
- return NULL;
- }
-
- if (domain == (char *)NULL)
- if (yp_get_default_domain (&domain))
- return (NULL);
-
- if (yp_match(domain, map, name, strlen(name), &result, &resultlen))
- return (NULL);
-
- bcopy((char *)result, (char *)&ypbuf, resultlen);
- ypbuf[resultlen] = '\0';
- free(result);
- result = (char *)&ypbuf;
-
- if ((cp = index(result, '\n')))
- *cp = '\0';
-
- cp = strpbrk(result, " \t");
- *cp++ = '\0';
- h.n_name = result;
-
- while (*cp == ' ' || *cp == '\t')
- cp++;
-
- h.n_net = inet_network(cp);
- h.n_addrtype = AF_INET;
-
- q = h.n_aliases = host_aliases;
- cp = strpbrk(cp, " \t");
- if (cp != NULL)
- *cp++ = '\0';
- while (cp && *cp) {
- if (*cp == ' ' || *cp == '\t') {
- cp++;
- continue;
- }
- if (q < &host_aliases[MAXALIASES - 1])
- *q++ = cp;
- cp = strpbrk(cp, " \t");
- if (cp != NULL)
- *cp++ = '\0';
- }
- *q = NULL;
- return (&h);
-#else
- return (NULL);
-#endif
-}
-
-struct netent *
-_getnetbynisname(name)
- const char *name;
-{
- return _getnetbynis(name, "networks.byname", AF_INET);
-}
-
-struct netent *
-_getnetbynisaddr(addr, af)
- unsigned long addr;
- int af;
-{
- char *str, *cp;
- unsigned long net2;
- int nn;
- unsigned int netbr[4];
- char buf[MAXDNAME];
-
- if (af != AF_INET) {
- errno = EAFNOSUPPORT;
- return (NULL);
- }
-
- for (nn = 4, net2 = addr; net2; net2 >>= 8) {
- netbr[--nn] = net2 & 0xff;
- }
-
- switch (nn) {
- case 3: /* Class A */
- sprintf(buf, "%u", netbr[3]);
- break;
- case 2: /* Class B */
- sprintf(buf, "%u.%u", netbr[2], netbr[3]);
- break;
- case 1: /* Class C */
- sprintf(buf, "%u.%u.%u", netbr[1], netbr[2], netbr[3]);
- break;
- case 0: /* Class D - E */
- sprintf(buf, "%u.%u.%u.%u", netbr[0], netbr[1],
- netbr[2], netbr[3]);
- break;
- }
-
- str = (char *)&buf;
- cp = str + (strlen(str) - 2);
-
- while(!strcmp(cp, ".0")) {
- *cp = '\0';
- cp = str + (strlen(str) - 2);
- }
-
- return _getnetbynis(str, "networks.byaddr", af);
-}
diff --git a/cpukit/libnetworking/libc/getnetent.3 b/cpukit/libnetworking/libc/getnetent.3
deleted file mode 100644
index aec93b5876..0000000000
--- a/cpukit/libnetworking/libc/getnetent.3
+++ /dev/null
@@ -1,159 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)getnetent.3 8.1 (Berkeley) 6/4/93
-.\" $Id$
-.\"
-.Dd June 4, 1993
-.Dt GETNETENT 3
-.Os BSD 4.2
-.Sh NAME
-.Nm getnetent ,
-.Nm getnetbyaddr ,
-.Nm getnetbyname ,
-.Nm setnetent ,
-.Nm endnetent
-.Nd get network entry
-.Sh SYNOPSIS
-.Fd #include <netdb.h>
-.Ft struct netent *
-.Fn getnetent void
-.Ft struct netent *
-.Fn getnetbyname "const char *name"
-.Ft struct netent *
-.Fn getnetbyaddr "unsigned long net" "int type"
-.Ft void
-.Fn setnetent "int stayopen"
-.Ft void
-.Fn endnetent void
-.Sh DESCRIPTION
-The
-.Fn getnetent ,
-.Fn getnetbyname ,
-and
-.Fn getnetbyaddr
-functions
-each return a pointer to an object with the
-following structure
-containing the broken-out
-fields of a line in the network data base,
-.Pa /etc/networks .
-.Bd -literal -offset indent
-struct netent {
- char *n_name; /* official name of net */
- char **n_aliases; /* alias list */
- int n_addrtype; /* net number type */
- unsigned long n_net; /* net number */
-};
-.Ed
-.Pp
-The members of this structure are:
-.Bl -tag -width n_addrtype
-.It Fa n_name
-The official name of the network.
-.It Fa n_aliases
-A zero terminated list of alternate names for the network.
-.It Fa n_addrtype
-The type of the network number returned; currently only AF_INET.
-.It Fa n_net
-The network number. Network numbers are returned in machine byte
-order.
-.El
-.Pp
-The
-.Fn getnetent
-function
-reads the next line of the file, opening the file if necessary.
-.Pp
-The
-.Fn setnetent
-function
-opens and rewinds the file. If the
-.Fa stayopen
-flag is non-zero,
-the net data base will not be closed after each call to
-.Fn getnetbyname
-or
-.Fn getnetbyaddr .
-.Pp
-The
-.Fn endnetent
-function
-closes the file.
-.Pp
-The
-.Fn getnetbyname
-function
-and
-.Fn getnetbyaddr
-sequentially search from the beginning
-of the file until a matching
-net name or
-net address and type is found,
-or until
-.Dv EOF
-is encountered. The
-.Fa type
-must be
-.Dv AF_INET .
-Network numbers are supplied in host order.
-.Sh FILES
-.Bl -tag -width /etc/networks -compact
-.It Pa /etc/networks
-.El
-.Sh DIAGNOSTICS
-Null pointer
-(0) returned on
-.Dv EOF
-or error.
-.Sh SEE ALSO
-.Xr networks 5
-.Pp
-.%T RFC 1101
-.Sh HISTORY
-The
-.Fn getnetent ,
-.Fn getnetbyaddr ,
-.Fn getnetbyname ,
-.Fn setnetent ,
-and
-.Fn endnetent
-functions appeared in
-.Bx 4.2 .
-.Sh BUGS
-The data space used by
-these functions is static; if future use requires the data, it should be
-copied before any subsequent calls to these functions overwrite it.
-Only Internet network
-numbers are currently understood.
-Expecting network numbers to fit
-in no more than 32 bits is probably
-naive.
diff --git a/cpukit/libnetworking/libc/getnetnamadr.c b/cpukit/libnetworking/libc/getnetnamadr.c
deleted file mode 100644
index 4d6597f98c..0000000000
--- a/cpukit/libnetworking/libc/getnetnamadr.c
+++ /dev/null
@@ -1,190 +0,0 @@
-/*-
- * Copyright (c) 1994, Garrett Wollman
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <errno.h>
-#include <string.h>
-
-#ifndef _PATH_NETCONF
-#define _PATH_NETCONF "/etc/host.conf"
-#endif
-
-enum service_type {
- SERVICE_NONE = 0,
- SERVICE_BIND,
- SERVICE_TABLE,
- SERVICE_NIS };
-#define SERVICE_MAX SERVICE_NIS
-
-static struct {
- const char *name;
- enum service_type type;
-} service_names[] = {
- { "hosts", SERVICE_TABLE },
- { "/etc/hosts", SERVICE_TABLE },
- { "hosttable", SERVICE_TABLE },
- { "htable", SERVICE_TABLE },
- { "bind", SERVICE_BIND },
- { "dns", SERVICE_BIND },
- { "domain", SERVICE_BIND },
- { "yp", SERVICE_NIS },
- { "yellowpages", SERVICE_NIS },
- { "nis", SERVICE_NIS },
- { 0, SERVICE_NONE }
-};
-
-static enum service_type service_order[SERVICE_MAX + 1];
-static int service_done = 0;
-
-static enum service_type
-get_service_name(const char *name) {
- int i;
- for(i = 0; service_names[i].type != SERVICE_NONE; i++) {
- if(!strcasecmp(name, service_names[i].name)) {
- return service_names[i].type;
- }
- }
- return SERVICE_NONE;
-}
-
-static void
-init_services()
-{
- char *cp, *p, buf[BUFSIZ];
- register int cc = 0;
- FILE *fd;
-
- if ((fd = (FILE *)fopen(_PATH_NETCONF, "r")) == NULL) {
- /* make some assumptions */
- service_order[0] = SERVICE_TABLE;
- service_order[1] = SERVICE_NONE;
- } else {
- while (fgets(buf, BUFSIZ, fd) != NULL && cc < SERVICE_MAX) {
- if(buf[0] == '#')
- continue;
-
- p = buf;
- while ((cp = strsep(&p, "\n \t,:;")) != NULL && *cp == '\0')
- ;
- if (cp == NULL)
- continue;
- do {
- if (isalpha(cp[0])) {
- service_order[cc] = get_service_name(cp);
- if(service_order[cc] != SERVICE_NONE)
- cc++;
- }
- while ((cp = strsep(&p, "\n \t,:;")) != NULL && *cp == '\0')
- ;
- } while(cp != NULL && cc < SERVICE_MAX);
- }
- service_order[cc] = SERVICE_NONE;
- fclose(fd);
- }
- service_done = 1;
-}
-
-struct netent *
-getnetbyname(const char *name)
-{
- struct netent *hp = 0;
- int nserv = 0;
-
- if (!service_done)
- init_services();
-
- while (!hp) {
- switch (service_order[nserv]) {
- case SERVICE_NONE:
- return NULL;
- case SERVICE_TABLE:
- hp = _getnetbyhtname(name);
- break;
- case SERVICE_BIND:
- hp = _getnetbydnsname(name);
- break;
- case SERVICE_NIS:
- hp = _getnetbynisname(name);
- break;
- }
- nserv++;
- }
- return hp;
-}
-
-struct netent *
-getnetbyaddr(addr, af)
- u_long addr;
- int af;
-{
- struct netent *hp = 0;
- int nserv = 0;
-
- if (!service_done)
- init_services();
-
- while (!hp) {
- switch (service_order[nserv]) {
- case SERVICE_NONE:
- return 0;
- case SERVICE_TABLE:
- hp = _getnetbyhtaddr(addr, af);
- break;
- case SERVICE_BIND:
- hp = _getnetbydnsaddr(addr, af);
- break;
- case SERVICE_NIS:
- hp = _getnetbynisaddr(addr, af);
- break;
- }
- nserv++;
- }
- return hp;
-}
-
-void
-setnetent(stayopen)
- int stayopen;
-{
- _setnethtent(stayopen);
- _setnetdnsent(stayopen);
-}
-
-void
-endnetent()
-{
- _endnethtent();
- _endnetdnsent();
-}
diff --git a/cpukit/libnetworking/libc/getproto.c b/cpukit/libnetworking/libc/getproto.c
deleted file mode 100644
index c2a653f4b4..0000000000
--- a/cpukit/libnetworking/libc/getproto.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getproto.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <netdb.h>
-
-extern int _proto_stayopen;
-
-struct protoent *
-getprotobynumber(proto)
- register int proto;
-{
- register struct protoent *p;
-
- setprotoent(_proto_stayopen);
- while ( (p = getprotoent()) )
- if (p->p_proto == proto)
- break;
- if (!_proto_stayopen)
- endprotoent();
- return (p);
-}
diff --git a/cpukit/libnetworking/libc/getprotoent.3 b/cpukit/libnetworking/libc/getprotoent.3
deleted file mode 100644
index 784461d7e3..0000000000
--- a/cpukit/libnetworking/libc/getprotoent.3
+++ /dev/null
@@ -1,147 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)getprotoent.3 8.1 (Berkeley) 6/4/93
-.\" $Id$
-.\"
-.Dd June 4, 1993
-.Dt GETPROTOENT 3
-.Os BSD 4.2
-.Sh NAME
-.Nm getprotoent ,
-.Nm getprotobynumber ,
-.Nm getprotobyname ,
-.Nm setprotoent ,
-.Nm endprotoent
-.Nd get protocol entry
-.Sh SYNOPSIS
-.Fd #include <netdb.h>
-.Ft struct protoent *
-.Fn getprotoent void
-.Ft struct protoent *
-.Fn getprotobyname "const char *name"
-.Ft struct protoent *
-.Fn getprotobynumber "int proto"
-.Ft void
-.Fn setprotoent "int stayopen"
-.Ft void
-.Fn endprotoent void
-.Sh DESCRIPTION
-The
-.Fn getprotoent ,
-.Fn getprotobyname ,
-and
-.Fn getprotobynumber
-functions
-each return a pointer to an object with the
-following structure
-containing the broken-out
-fields of a line in the network protocol data base,
-.Pa /etc/protocols .
-.Bd -literal -offset indent
-.Pp
-struct protoent {
- char *p_name; /* official name of protocol */
- char **p_aliases; /* alias list */
- int p_proto; /* protocol number */
-};
-.Ed
-.Pp
-The members of this structure are:
-.Bl -tag -width p_aliases
-.It Fa p_name
-The official name of the protocol.
-.It Fa p_aliases
-A zero terminated list of alternate names for the protocol.
-.It Fa p_proto
-The protocol number.
-.El
-.Pp
-The
-.Fn getprotoent
-function
-reads the next line of the file, opening the file if necessary.
-.Pp
-The
-.Fn setprotoent
-function
-opens and rewinds the file. If the
-.Fa stayopen
-flag is non-zero,
-the net data base will not be closed after each call to
-.Fn getprotobyname
-or
-.Fn getprotobynumber .
-.Pp
-The
-.Fn endprotoent
-function
-closes the file.
-.Pp
-The
-.Fn getprotobyname
-function
-and
-.Fn getprotobynumber
-sequentially search from the beginning
-of the file until a matching
-protocol name or
-protocol number is found,
-or until
-.Dv EOF
-is encountered.
-.Sh RETURN VALUES
-Null pointer
-(0) returned on
-.Dv EOF
-or error.
-.Sh FILES
-.Bl -tag -width /etc/protocols -compact
-.It Pa /etc/protocols
-.El
-.Sh SEE ALSO
-.Xr protocols 5
-.Sh HISTORY
-The
-.Fn getprotoent ,
-.Fn getprotobynumber ,
-.Fn getprotobyname ,
-.Fn setprotoent ,
-and
-.Fn endprotoent
-functions appeared in
-.Bx 4.2 .
-.Sh BUGS
-These functions use a static data space;
-if the data is needed for future use, it should be
-copied before any subsequent calls overwrite it.
-Only the Internet
-protocols are currently understood.
diff --git a/cpukit/libnetworking/libc/getprotoent.c b/cpukit/libnetworking/libc/getprotoent.c
deleted file mode 100644
index 0b9cefec68..0000000000
--- a/cpukit/libnetworking/libc/getprotoent.c
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getprotoent.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netdb.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#define MAXALIASES 35
-
-static FILE *protof = NULL;
-static char line[BUFSIZ+1];
-static struct protoent proto;
-static char *proto_aliases[MAXALIASES];
-int _proto_stayopen;
-
-void
-setprotoent(f)
- int f;
-{
- if (protof == NULL)
- protof = fopen(_PATH_PROTOCOLS, "r" );
- else
- rewind(protof);
- _proto_stayopen |= f;
-}
-
-void
-endprotoent()
-{
- if (protof) {
- fclose(protof);
- protof = NULL;
- }
- _proto_stayopen = 0;
-}
-
-struct protoent *
-getprotoent()
-{
- char *p;
- register char *cp, **q;
-
- if (protof == NULL && (protof = fopen(_PATH_PROTOCOLS, "r" )) == NULL)
- return (NULL);
-again:
- if ((p = fgets(line, BUFSIZ, protof)) == NULL)
- return (NULL);
- if (*p == '#')
- goto again;
- cp = strpbrk(p, "#\n");
- if (cp == NULL)
- goto again;
- *cp = '\0';
- proto.p_name = p;
- cp = strpbrk(p, " \t");
- if (cp == NULL)
- goto again;
- *cp++ = '\0';
- while (*cp == ' ' || *cp == '\t')
- cp++;
- p = strpbrk(cp, " \t");
- if (p != NULL)
- *p++ = '\0';
- proto.p_proto = atoi(cp);
- q = proto.p_aliases = proto_aliases;
- if (p != NULL) {
- cp = p;
- while (cp && *cp) {
- if (*cp == ' ' || *cp == '\t') {
- cp++;
- continue;
- }
- if (q < &proto_aliases[MAXALIASES - 1])
- *q++ = cp;
- cp = strpbrk(cp, " \t");
- if (cp != NULL)
- *cp++ = '\0';
- }
- }
- *q = NULL;
- return (&proto);
-}
diff --git a/cpukit/libnetworking/libc/getprotoname.c b/cpukit/libnetworking/libc/getprotoname.c
deleted file mode 100644
index 46880eb005..0000000000
--- a/cpukit/libnetworking/libc/getprotoname.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getprotoname.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <netdb.h>
-#include <string.h>
-
-extern int _proto_stayopen;
-
-struct protoent *
-getprotobyname(name)
- register const char *name;
-{
- register struct protoent *p;
- register char **cp;
-
- setprotoent(_proto_stayopen);
- while ( (p = getprotoent()) ) {
- if (strcmp(p->p_name, name) == 0)
- break;
- for (cp = p->p_aliases; *cp != 0; cp++)
- if (strcmp(*cp, name) == 0)
- goto found;
- }
-found:
- if (!_proto_stayopen)
- endprotoent();
- return (p);
-}
diff --git a/cpukit/libnetworking/libc/getservbyname.c b/cpukit/libnetworking/libc/getservbyname.c
deleted file mode 100644
index 19936907d3..0000000000
--- a/cpukit/libnetworking/libc/getservbyname.c
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getservbyname.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <netdb.h>
-#include <string.h>
-
-extern int _serv_stayopen;
-
-struct servent *
-getservbyname(name, proto)
- const char *name, *proto;
-{
- register struct servent *p;
- register char **cp;
-
-#ifdef YP
- extern char *___getservbyname_yp;
- extern char *___getservbyproto_yp;
-
- ___getservbyname_yp = (char *)name;
- ___getservbyproto_yp = (char *)proto;
-#endif
-
- setservent(_serv_stayopen);
- while ( (p = getservent()) ) {
- if (strcmp(name, p->s_name) == 0)
- goto gotname;
- for (cp = p->s_aliases; *cp; cp++)
- if (strcmp(name, *cp) == 0)
- goto gotname;
- continue;
-gotname:
- if (proto == 0 || strcmp(p->s_proto, proto) == 0)
- break;
- }
- if (!_serv_stayopen)
- endservent();
-
-#ifdef YP
- ___getservbyname_yp = NULL;
- ___getservbyproto_yp = NULL;
-#endif
-
- return (p);
-}
diff --git a/cpukit/libnetworking/libc/getservbyport.c b/cpukit/libnetworking/libc/getservbyport.c
deleted file mode 100644
index c8433954e1..0000000000
--- a/cpukit/libnetworking/libc/getservbyport.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getservbyport.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <netdb.h>
-#include <string.h>
-
-extern int _serv_stayopen;
-
-struct servent *
-getservbyport(port, proto)
- int port;
- const char *proto;
-{
- register struct servent *p;
-
-#ifdef YP
- extern int ___getservbyport_yp;
- extern char *___getservbyproto_yp;
-
- ___getservbyport_yp = port;
- ___getservbyproto_yp = (char *)proto;
-#endif
-
- setservent(_serv_stayopen);
- while ( (p = getservent()) ) {
- if (p->s_port != port)
- continue;
- if (proto == 0 || strcmp(p->s_proto, proto) == 0)
- break;
- }
- if (!_serv_stayopen)
- endservent();
-
-#ifdef YP
- ___getservbyport_yp = 0;
- ___getservbyproto_yp = NULL;
-#endif
-
- return (p);
-}
diff --git a/cpukit/libnetworking/libc/getservent.3 b/cpukit/libnetworking/libc/getservent.3
deleted file mode 100644
index 79c18a3beb..0000000000
--- a/cpukit/libnetworking/libc/getservent.3
+++ /dev/null
@@ -1,156 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" From: @(#)getservent.3 8.3 (Berkeley) 1/12/94
-.\" $Id$
-.\"
-.Dd July 9, 1995
-.Dt GETSERVENT 3
-.Os BSD 4.2
-.Sh NAME
-.Nm getservent ,
-.Nm getservbyport ,
-.Nm getservbyname ,
-.Nm setservent ,
-.Nm endservent
-.Nd get service entry
-.Sh SYNOPSIS
-.Fd #include <netdb.h>
-.Ft struct servent *
-.Fn getservent
-.Ft struct servent *
-.Fn getservbyname "const char *name" "const char *proto"
-.Ft struct servent *
-.Fn getservbyport "int port" "const char *proto"
-.Ft void
-.Fn setservent "int stayopen"
-.Ft void
-.Fn endservent void
-.Sh DESCRIPTION
-The
-.Fn getservent ,
-.Fn getservbyname ,
-and
-.Fn getservbyport
-functions
-each return a pointer to an object with the
-following structure
-containing the broken-out
-fields of a line in the network services data base,
-.Pa /etc/services .
-.Bd -literal -offset indent
-struct servent {
- char *s_name; /* official name of service */
- char **s_aliases; /* alias list */
- int s_port; /* port service resides at */
- char *s_proto; /* protocol to use */
-};
-.Ed
-.Pp
-The members of this structure are:
-.Bl -tag -width s_aliases
-.It Fa s_name
-The official name of the service.
-.It Fa s_aliases
-A zero terminated list of alternate names for the service.
-.It Fa s_port
-The port number at which the service resides.
-Port numbers are returned in network byte order.
-.It Fa s_proto
-The name of the protocol to use when contacting the
-service.
-.El
-.Pp
-The
-.Fn getservent
-function
-reads the next line of the file, opening the file if necessary.
-.Pp
-The
-.Fn setservent
-function
-opens and rewinds the file. If the
-.Fa stayopen
-flag is non-zero,
-the net data base will not be closed after each call to
-.Fn getservbyname
-or
-.Fn getservbyport .
-.Pp
-The
-.Fn endservent
-function
-closes the file.
-.Pp
-The
-.Fn getservbyname
-and
-.Fn getservbyport
-functions
-sequentially search from the beginning
-of the file until a matching
-protocol name or
-port number is found,
-or until
-.Dv EOF
-is encountered.
-If a protocol name is also supplied (non-
-.Dv NULL ) ,
-searches must also match the protocol.
-.ne 1i
-.Sh FILES
-.Bl -tag -width /etc/services -compact
-.It Pa /etc/services
-.El
-.Sh DIAGNOSTICS
-Null pointer
-(0) returned on
-.Dv EOF
-or error.
-.Sh SEE ALSO
-.Xr getprotoent 3 ,
-.Xr services 5
-.Sh HISTORY
-The
-.Fn getservent ,
-.Fn getservbyport ,
-.Fn getservbyname ,
-.Fn setservent ,
-and
-.Fn endservent
-functions appeared in
-.Bx 4.2 .
-.Sh BUGS
-These functions use static data storage;
-if the data is needed for future use, it should be
-copied before any subsequent calls overwrite it.
-Expecting port numbers to fit in a 32 bit
-quantity is probably naive.
diff --git a/cpukit/libnetworking/libc/getservent.c b/cpukit/libnetworking/libc/getservent.c
deleted file mode 100644
index 08a05c0975..0000000000
--- a/cpukit/libnetworking/libc/getservent.c
+++ /dev/null
@@ -1,280 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getservent.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netdb.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#ifdef YP
-#include <rpc/rpc.h>
-#include <rpcsvc/yp_prot.h>
-#include <rpcsvc/ypclnt.h>
-static int serv_stepping_yp = 0;
-extern int _yp_check __P(( char ** ));
-#endif
-
-
-#define MAXALIASES 35
-
-static FILE *servf = NULL;
-static char line[BUFSIZ+1];
-static struct servent serv;
-static char *serv_aliases[MAXALIASES];
-int _serv_stayopen;
-
-#ifdef YP
-char *___getservbyname_yp = NULL;
-char *___getservbyproto_yp = NULL;
-int ___getservbyport_yp = 0;
-static char *yp_domain = NULL;
-
-static int
-_getservbyport_yp(line)
- char *line;
-{
- char *result;
- int resultlen;
- char buf[YPMAXRECORD + 2];
- int rv;
-
- snprintf(buf, sizeof(buf), "%d/%s", ntohs(___getservbyport_yp),
- ___getservbyproto_yp);
-
- ___getservbyport_yp = 0;
- ___getservbyproto_yp = NULL;
-
- if(!yp_domain) {
- if(yp_get_default_domain(&yp_domain))
- return (0);
- }
-
- /*
- * We have to be a little flexible here. Ideally you're supposed
- * to have both a services.byname and a services.byport map, but
- * some systems have only services.byname. FreeBSD cheats a little
- * by putting the services.byport information in the same map as
- * services.byname so that either case will work. We allow for both
- * possibilities here: if there is no services.byport map, we try
- * services.byname instead.
- */
- if ((rv = yp_match(yp_domain, "services.byport", buf, strlen(buf),
- &result, &resultlen))) {
- if (rv == YPERR_MAP) {
- if (yp_match(yp_domain, "services.byname", buf,
- strlen(buf), &result, &resultlen))
- return(0);
- } else
- return(0);
- }
-
- /* getservent() expects lines terminated with \n -- make it happy */
- snprintf(line, BUFSIZ, "%.*s\n", resultlen, result);
-
- free(result);
- return(1);
-}
-
-static int
-_getservbyname_yp(line)
- char *line;
-{
- char *result;
- int resultlen;
- char buf[YPMAXRECORD + 2];
-
- if(!yp_domain) {
- if(yp_get_default_domain(&yp_domain))
- return (0);
- }
-
- snprintf(buf, sizeof(buf), "%s/%s", ___getservbyname_yp,
- ___getservbyproto_yp);
-
- ___getservbyname_yp = 0;
- ___getservbyproto_yp = NULL;
-
- if (yp_match(yp_domain, "services.byname", buf, strlen(buf),
- &result, &resultlen)) {
- return(0);
- }
-
- /* getservent() expects lines terminated with \n -- make it happy */
- snprintf(line, BUFSIZ, "%.*s\n", resultlen, result);
-
- free(result);
- return(1);
-}
-
-static int
-_getservent_yp(line)
- char *line;
-{
- static char *key = NULL;
- static int keylen;
- char *lastkey, *result;
- int resultlen;
- int rv;
-
- if(!yp_domain) {
- if(yp_get_default_domain(&yp_domain))
- return (0);
- }
-
- if (!serv_stepping_yp) {
- if (key)
- free(key);
- if ((rv = yp_first(yp_domain, "services.byname", &key, &keylen,
- &result, &resultlen))) {
- serv_stepping_yp = 0;
- return(0);
- }
- serv_stepping_yp = 1;
- } else {
- lastkey = key;
- rv = yp_next(yp_domain, "services.byname", key, keylen, &key,
- &keylen, &result, &resultlen);
- free(lastkey);
- if (rv) {
- serv_stepping_yp = 0;
- return (0);
- }
- }
-
- /* getservent() expects lines terminated with \n -- make it happy */
- snprintf(line, BUFSIZ, "%.*s\n", resultlen, result);
-
- free(result);
-
- return(1);
-}
-#endif
-
-void
-setservent(f)
- int f;
-{
- if (servf == NULL)
- servf = fopen(_PATH_SERVICES, "r" );
- else
- rewind(servf);
- _serv_stayopen |= f;
-}
-
-void
-endservent()
-{
- if (servf) {
- fclose(servf);
- servf = NULL;
- }
- _serv_stayopen = 0;
-}
-
-struct servent *
-getservent()
-{
- char *p;
- register char *cp, **q;
-
-#ifdef YP
- if (serv_stepping_yp && _getservent_yp(line)) {
- p = (char *)&line;
- goto unpack;
- }
-tryagain:
-#endif
- if (servf == NULL && (servf = fopen(_PATH_SERVICES, "r" )) == NULL)
- return (NULL);
-again:
- if ((p = fgets(line, BUFSIZ, servf)) == NULL)
- return (NULL);
-#ifdef YP
- if (*p == '+' && _yp_check(NULL)) {
- if (___getservbyname_yp != NULL) {
- if (!_getservbyname_yp(line))
- goto tryagain;
- }
- else if (___getservbyport_yp != 0) {
- if (!_getservbyport_yp(line))
- goto tryagain;
- }
- else if (!_getservent_yp(line))
- goto tryagain;
- }
-unpack:
-#endif
- if (*p == '#')
- goto again;
- cp = strpbrk(p, "#\n");
- if (cp == NULL)
- goto again;
- *cp = '\0';
- serv.s_name = p;
- p = strpbrk(p, " \t");
- if (p == NULL)
- goto again;
- *p++ = '\0';
- while (*p == ' ' || *p == '\t')
- p++;
- cp = strpbrk(p, ",/");
- if (cp == NULL)
- goto again;
- *cp++ = '\0';
- serv.s_port = htons((u_short)atoi(p));
- serv.s_proto = cp;
- q = serv.s_aliases = serv_aliases;
- cp = strpbrk(cp, " \t");
- if (cp != NULL)
- *cp++ = '\0';
- while (cp && *cp) {
- if (*cp == ' ' || *cp == '\t') {
- cp++;
- continue;
- }
- if (q < &serv_aliases[MAXALIASES - 1])
- *q++ = cp;
- cp = strpbrk(cp, " \t");
- if (cp != NULL)
- *cp++ = '\0';
- }
- *q = NULL;
- return (&serv);
-}
diff --git a/cpukit/libnetworking/libc/herror.c b/cpukit/libnetworking/libc/herror.c
deleted file mode 100644
index ba1dae934d..0000000000
--- a/cpukit/libnetworking/libc/herror.c
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Copyright (c) 1987, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Portions Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)herror.c 8.1 (Berkeley) 6/4/93";
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/uio.h>
-#include <netdb.h>
-#include <string.h>
-#include <unistd.h>
-
-const char *h_errlist[] = {
- "Resolver Error 0 (no error)",
- "Unknown host", /* 1 HOST_NOT_FOUND */
- "Host name lookup failure", /* 2 TRY_AGAIN */
- "Unknown server error", /* 3 NO_RECOVERY */
- "No address associated with name", /* 4 NO_ADDRESS */
-};
-int h_nerr = { sizeof h_errlist / sizeof h_errlist[0] };
-
-int h_errno;
-
-/*
- * herror --
- * print the error indicated by the h_errno value.
- */
-void
-herror(s)
- const char *s;
-{
-#if 0
- struct iovec iov[4];
- register struct iovec *v = iov;
-
- if (s && *s) {
- v->iov_base = (char *)s;
- v->iov_len = strlen(s);
- v++;
- v->iov_base = ": ";
- v->iov_len = 2;
- v++;
- }
- v->iov_base = (char *)hstrerror(h_errno);
- v->iov_len = strlen(v->iov_base);
- v++;
- v->iov_base = "\n";
- v->iov_len = 1;
- writev(STDERR_FILENO, iov, (v - iov) + 1);
-#else
- /*
- * RTEMS: no writev yet
- */
- if (s && *s) {
- write (2, s, strlen (s));
- write (2, ": ", 2);
- }
- s = (char *)hstrerror(h_errno);
- write (2, s, strlen (s));
- write (2, "\n", 1);
-#endif
-}
-
-const char *
-hstrerror(err)
- int err;
-{
- if (err < 0)
- return ("Resolver internal error");
- else if (err < h_nerr)
- return (h_errlist[err]);
- return ("Unknown resolver error");
-}
diff --git a/cpukit/libnetworking/libc/inet.3 b/cpukit/libnetworking/libc/inet.3
deleted file mode 100644
index 1052f538f2..0000000000
--- a/cpukit/libnetworking/libc/inet.3
+++ /dev/null
@@ -1,210 +0,0 @@
-.\" Copyright (c) 1983, 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" From: @(#)inet.3 8.1 (Berkeley) 6/4/93
-.\" $Id$
-.\"
-.Dd June 17, 1996
-.Dt INET 3
-.Os BSD 4.2
-.Sh NAME
-.Nm inet_aton ,
-.Nm inet_addr ,
-.Nm inet_network ,
-.Nm inet_ntoa ,
-.Nm inet_makeaddr ,
-.Nm inet_lnaof ,
-.Nm inet_netof
-.Nd Internet address manipulation routines
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/socket.h>
-.Fd #include <netinet/in.h>
-.Fd #include <arpa/inet.h>
-.Ft int
-.Fn inet_aton "const char *cp" "struct in_addr *pin"
-.Ft unsigned long
-.Fn inet_addr "const char *cp"
-.Ft unsigned long
-.Fn inet_network "const char *cp"
-.Ft char *
-.Fn inet_ntoa "struct in_addr in"
-.Ft struct in_addr
-.Fn inet_makeaddr "unsigned long net" "unsigned long lna"
-.Ft unsigned long
-.Fn inet_lnaof "struct in_addr in"
-.Ft unsigned long
-.Fn inet_netof "struct in_addr in"
-.Sh DESCRIPTION
-The routines
-.Fn inet_aton ,
-.Fn inet_addr
-and
-.Fn inet_network
-interpret character strings representing
-numbers expressed in the Internet standard
-.Ql \&.
-notation.
-The
-.Fn inet_aton
-routine interprets the specified character string as an Internet address,
-placing the address into the structure provided.
-It returns 1 if the string was successfully interpreted,
-or 0 if the string is invalid.
-The
-.Fn inet_addr
-and
-.Fn inet_network
-functions return numbers suitable for use
-as Internet addresses and Internet network
-numbers, respectively.
-The routine
-.Fn inet_ntoa
-takes an Internet address and returns an
-.Tn ASCII
-string representing the address in
-.Ql \&.
-notation. The routine
-.Fn inet_makeaddr
-takes an Internet network number and a local
-network address and constructs an Internet address
-from it. The routines
-.Fn inet_netof
-and
-.Fn inet_lnaof
-break apart Internet host addresses, returning
-the network number and local network address part,
-respectively.
-.Pp
-All Internet addresses are returned in network
-order (bytes ordered from left to right).
-All network numbers and local address parts are
-returned as machine format integer values.
-.Sh INTERNET ADDRESSES
-Values specified using the
-.Ql \&.
-notation take one
-of the following forms:
-.Bd -literal -offset indent
-a.b.c.d
-a.b.c
-a.b
-a
-.Ed
-.Pp
-When four parts are specified, each is interpreted
-as a byte of data and assigned, from left to right,
-to the four bytes of an Internet address. Note
-that when an Internet address is viewed as a 32-bit
-integer quantity on the
-.Tn VAX
-the bytes referred to
-above appear as
-.Dq Li d.c.b.a .
-That is,
-.Tn VAX
-bytes are
-ordered from right to left.
-.Pp
-When a three part address is specified, the last
-part is interpreted as a 16-bit quantity and placed
-in the right-most two bytes of the network address.
-This makes the three part address format convenient
-for specifying Class B network addresses as
-.Dq Li 128.net.host .
-.Pp
-When a two part address is supplied, the last part
-is interpreted as a 24-bit quantity and placed in
-the right most three bytes of the network address.
-This makes the two part address format convenient
-for specifying Class A network addresses as
-.Dq Li net.host .
-.Pp
-When only one part is given, the value is stored
-directly in the network address without any byte
-rearrangement.
-.Pp
-All numbers supplied as
-.Dq parts
-in a
-.Ql \&.
-notation
-may be decimal, octal, or hexadecimal, as specified
-in the C language (i.e., a leading 0x or 0X implies
-hexadecimal; otherwise, a leading 0 implies octal;
-otherwise, the number is interpreted as decimal).
-.Pp
-The
-.Fn inet_aton
-and
-.Fn inet_ntoa
-functions are semi-deprecated in favor of the
-.Xr addr2ascii 3
-family. However, since those functions are not yet widely implemented,
-portable programs cannot rely on their presence and will continue
-to use the
-.Xr inet 3
-functions for some time.
-.Sh DIAGNOSTICS
-The constant
-.Dv INADDR_NONE
-is returned by
-.Fn inet_addr
-and
-.Fn inet_network
-for malformed requests.
-.Sh SEE ALSO
-.Xr addr2ascii 3 ,
-.Xr gethostbyname 3 ,
-.Xr getnetent 3 ,
-.Xr hosts 5 ,
-.Xr networks 5
-.Sh HISTORY
-These
-functions appeared in
-.Bx 4.2 .
-.Sh BUGS
-The value
-.Dv INADDR_NONE
-(0xffffffff) is a valid broadcast address, but
-.Fn inet_addr
-cannot return that value without indicating failure.
-The newer
-.Fn inet_aton
-function does not share this problem.
-The problem of host byte ordering versus network byte ordering is
-confusing.
-The string returned by
-.Fn inet_ntoa
-resides in a static memory area.
-.Pp
-Inet_addr should return a
-.Fa struct in_addr .
diff --git a/cpukit/libnetworking/libc/inet_addr.c b/cpukit/libnetworking/libc/inet_addr.c
deleted file mode 100644
index 225ccc1269..0000000000
--- a/cpukit/libnetworking/libc/inet_addr.c
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * ++Copyright++ 1983, 1990, 1993
- * -
- * Copyright (c) 1983, 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * -
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- * -
- * --Copyright--
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)inet_addr.c 8.1 (Berkeley) 6/17/93";
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <ctype.h>
-
-/*
- * Ascii internet address interpretation routine.
- * The value returned is in network order.
- */
-u_long
-inet_addr(cp)
- register const char *cp;
-{
- struct in_addr val;
-
- if (inet_aton(cp, &val))
- return (val.s_addr);
- return (INADDR_NONE);
-}
-
-/*
- * Check whether "cp" is a valid ascii representation
- * of an Internet address and convert to a binary address.
- * Returns 1 if the address is valid, 0 if not.
- * This replaces inet_addr, the return value from which
- * cannot distinguish between failure and a local broadcast address.
- */
-int
-inet_aton(cp, addr)
- register const char *cp;
- struct in_addr *addr;
-{
- register u_long val;
- register int base, n;
- register char c;
- u_int parts[4];
- register u_int *pp = parts;
-
- c = *cp;
- for (;;) {
- /*
- * Collect number up to ``.''.
- * Values are specified as for C:
- * 0x=hex, 0=octal, isdigit=decimal.
- */
- if (!isdigit((int)c))
- return (0);
- val = 0; base = 10;
- if (c == '0') {
- c = *++cp;
- if (c == 'x' || c == 'X')
- base = 16, c = *++cp;
- else
- base = 8;
- }
- for (;;) {
- if (isascii((int)c) && isdigit((int)c)) {
- val = (val * base) + (c - '0');
- c = *++cp;
- } else if (base == 16 && isascii((int)c) && isxdigit((int)c)) {
- val = (val << 4) |
- (c + 10 - (islower((int)c) ? 'a' : 'A'));
- c = *++cp;
- } else
- break;
- }
- if (c == '.') {
- /*
- * Internet format:
- * a.b.c.d
- * a.b.c (with c treated as 16 bits)
- * a.b (with b treated as 24 bits)
- */
- if (pp >= parts + 3)
- return (0);
- *pp++ = val;
- c = *++cp;
- } else
- break;
- }
- /*
- * Check for trailing characters.
- */
- if (c != '\0' && (!isascii((int)c) || !isspace((int)c)))
- return (0);
- /*
- * Concoct the address according to
- * the number of parts specified.
- */
- n = pp - parts + 1;
- switch (n) {
-
- case 0:
- return (0); /* initial nondigit */
-
- case 1: /* a -- 32 bits */
- break;
-
- case 2: /* a.b -- 8.24 bits */
- if (val > 0xffffff)
- return (0);
- val |= parts[0] << 24;
- break;
-
- case 3: /* a.b.c -- 8.8.16 bits */
- if (val > 0xffff)
- return (0);
- val |= (parts[0] << 24) | (parts[1] << 16);
- break;
-
- case 4: /* a.b.c.d -- 8.8.8.8 bits */
- if (val > 0xff)
- return (0);
- val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8);
- break;
- }
- if (addr)
- addr->s_addr = htonl(val);
- return (1);
-}
diff --git a/cpukit/libnetworking/libc/inet_lnaof.c b/cpukit/libnetworking/libc/inet_lnaof.c
deleted file mode 100644
index 6ec6a9aef1..0000000000
--- a/cpukit/libnetworking/libc/inet_lnaof.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)inet_lnaof.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-/*
- * Return the local network address portion of an
- * internet address; handles class a/b/c network
- * number formats.
- */
-u_long
-inet_lnaof(in)
- struct in_addr in;
-{
- register u_long i = ntohl(in.s_addr);
-
- if (IN_CLASSA(i))
- return ((i)&IN_CLASSA_HOST);
- else if (IN_CLASSB(i))
- return ((i)&IN_CLASSB_HOST);
- else
- return ((i)&IN_CLASSC_HOST);
-}
diff --git a/cpukit/libnetworking/libc/inet_makeaddr.c b/cpukit/libnetworking/libc/inet_makeaddr.c
deleted file mode 100644
index ce84170ed9..0000000000
--- a/cpukit/libnetworking/libc/inet_makeaddr.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)inet_makeaddr.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-/*
- * Formulate an Internet address from network + host. Used in
- * building addresses stored in the ifnet structure.
- */
-struct in_addr
-inet_makeaddr(net, host)
- u_long net, host;
-{
- u_long addr;
-
- if (net < 128)
- addr = (net << IN_CLASSA_NSHIFT) | (host & IN_CLASSA_HOST);
- else if (net < 65536)
- addr = (net << IN_CLASSB_NSHIFT) | (host & IN_CLASSB_HOST);
- else if (net < 16777216L)
- addr = (net << IN_CLASSC_NSHIFT) | (host & IN_CLASSC_HOST);
- else
- addr = net | host;
- addr = htonl(addr);
- return (*(struct in_addr *)&addr);
-}
diff --git a/cpukit/libnetworking/libc/inet_net_ntop.c b/cpukit/libnetworking/libc/inet_net_ntop.c
deleted file mode 100644
index 4c7893d417..0000000000
--- a/cpukit/libnetworking/libc/inet_net_ntop.c
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static const char orig_rcsid[] = "From Id: inet_net_ntop.c,v 8.2 1996/08/08 06:54:44 vixie Exp";
-static const char rcsid[] = "$Id$";
-#endif
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-#ifdef SPRINTF_CHAR
-# define SPRINTF(x) strlen(sprintf/**/x)
-#else
-# define SPRINTF(x) ((size_t)sprintf x)
-#endif
-
-static char * inet_net_ntop_ipv4 __P((const u_char *src, int bits,
- char *dst, size_t size));
-
-/*
- * char *
- * inet_net_ntop(af, src, bits, dst, size)
- * convert network number from network to presentation format.
- * generates CIDR style result always.
- * return:
- * pointer to dst, or NULL if an error occurred (check errno).
- * author:
- * Paul Vixie (ISC), July 1996
- */
-char *
-inet_net_ntop(af, src, bits, dst, size)
- int af;
- const void *src;
- int bits;
- char *dst;
- size_t size;
-{
- switch (af) {
- case AF_INET:
- return (inet_net_ntop_ipv4(src, bits, dst, size));
- default:
- errno = EAFNOSUPPORT;
- return (NULL);
- }
-}
-
-/*
- * static char *
- * inet_net_ntop_ipv4(src, bits, dst, size)
- * convert IPv4 network number from network to presentation format.
- * generates CIDR style result always.
- * return:
- * pointer to dst, or NULL if an error occurred (check errno).
- * note:
- * network byte order assumed. this means 192.5.5.240/28 has
- * 0x11110000 in its fourth octet.
- * author:
- * Paul Vixie (ISC), July 1996
- */
-static char *
-inet_net_ntop_ipv4(src, bits, dst, size)
- const u_char *src;
- int bits;
- char *dst;
- size_t size;
-{
- char *odst = dst;
- char *t;
- u_int m;
- int b;
-
- if (bits < 0 || bits > 32) {
- errno = EINVAL;
- return (NULL);
- }
- if (bits == 0) {
- if (size < sizeof "0")
- goto emsgsize;
- *dst++ = '0';
- *dst = '\0';
- }
-
- /* Format whole octets. */
- for (b = bits / 8; b > 0; b--) {
- if (size < sizeof "255.")
- goto emsgsize;
- t = dst;
- dst += SPRINTF((dst, "%u", *src++));
- if (b > 1) {
- *dst++ = '.';
- *dst = '\0';
- }
- size -= (size_t)(dst - t);
- }
-
- /* Format partial octet. */
- b = bits % 8;
- if (b > 0) {
- if (size < sizeof ".255")
- goto emsgsize;
- t = dst;
- if (dst != odst)
- *dst++ = '.';
- m = ((1 << b) - 1) << (8 - b);
- dst += SPRINTF((dst, "%u", *src & m));
- size -= (size_t)(dst - t);
- }
-
- /* Format CIDR /width. */
- if (size < sizeof "/32")
- goto emsgsize;
- dst += SPRINTF((dst, "/%u", bits));
- return (odst);
-
- emsgsize:
- errno = EMSGSIZE;
- return (NULL);
-}
diff --git a/cpukit/libnetworking/libc/inet_net_pton.c b/cpukit/libnetworking/libc/inet_net_pton.c
deleted file mode 100644
index 8915c2a5be..0000000000
--- a/cpukit/libnetworking/libc/inet_net_pton.c
+++ /dev/null
@@ -1,207 +0,0 @@
-/*
- * Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static const char orig_rcsid[] = "From Id: inet_net_pton.c,v 1.8 1996/11/21 10:28:12 vixie Exp $";
-static const char rcsid[] = "$Id$";
-#endif
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-#include <assert.h>
-#include <ctype.h>
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-#ifdef SPRINTF_CHAR
-# define SPRINTF(x) strlen(sprintf/**/x)
-#else
-# define SPRINTF(x) ((size_t)sprintf x)
-#endif
-
-static int inet_net_pton_ipv4 __P((const char *src, u_char *dst,
- size_t size));
-
-/*
- * static int
- * inet_net_pton(af, src, dst, size)
- * convert network number from presentation to network format.
- * accepts hex octets, hex strings, decimal octets, and /CIDR.
- * "size" is in bytes and describes "dst".
- * return:
- * number of bits, either imputed classfully or specified with /CIDR,
- * or -1 if some failure occurred (check errno). ENOENT means it was
- * not a valid network specification.
- * author:
- * Paul Vixie (ISC), June 1996
- */
-int
-inet_net_pton(af, src, dst, size)
- int af;
- const char *src;
- void *dst;
- size_t size;
-{
- switch (af) {
- case AF_INET:
- return (inet_net_pton_ipv4(src, dst, size));
- default:
- errno = EAFNOSUPPORT;
- return (-1);
- }
-}
-
-/*
- * static int
- * inet_net_pton_ipv4(src, dst, size)
- * convert IPv4 network number from presentation to network format.
- * accepts hex octets, hex strings, decimal octets, and /CIDR.
- * "size" is in bytes and describes "dst".
- * return:
- * number of bits, either imputed classfully or specified with /CIDR,
- * or -1 if some failure occurred (check errno). ENOENT means it was
- * not an IPv4 network specification.
- * note:
- * network byte order assumed. this means 192.5.5.240/28 has
- * 0x11110000 in its fourth octet.
- * author:
- * Paul Vixie (ISC), June 1996
- */
-static int
-inet_net_pton_ipv4(src, dst, size)
- const char *src;
- u_char *dst;
- size_t size;
-{
- static const char
- xdigits[] = "0123456789abcdef",
- digits[] = "0123456789";
- int n, ch, tmp, dirty, bits;
- const u_char *odst = dst;
-
- ch = *src++;
- if (ch == '0' && (src[0] == 'x' || src[0] == 'X')
- && isascii(src[1]) && isxdigit(src[1])) {
- /* Hexadecimal: Eat nybble string. */
- if (size <= 0)
- goto emsgsize;
- *dst = 0, dirty = 0;
- src++; /* skip x or X. */
- while ((ch = *src++) != '\0' &&
- isascii(ch) && isxdigit(ch)) {
- if (isupper(ch))
- ch = tolower(ch);
- n = strchr(xdigits, ch) - xdigits;
- assert(n >= 0 && n <= 15);
- *dst |= n;
- if (!dirty++)
- *dst <<= 4;
- else if (size-- > 0)
- *++dst = 0, dirty = 0;
- else
- goto emsgsize;
- }
- if (dirty)
- size--;
- } else if (isascii(ch) && isdigit(ch)) {
- /* Decimal: eat dotted digit string. */
- for (;;) {
- tmp = 0;
- do {
- n = strchr(digits, ch) - digits;
- assert(n >= 0 && n <= 9);
- tmp *= 10;
- tmp += n;
- if (tmp > 255)
- goto enoent;
- } while ((ch = *src++) != '\0' &&
- isascii(ch) && isdigit(ch));
- if (size-- <= 0)
- goto emsgsize;
- *dst++ = (u_char) tmp;
- if (ch == '\0' || ch == '/')
- break;
- if (ch != '.')
- goto enoent;
- ch = *src++;
- if (!isascii(ch) || !isdigit(ch))
- goto enoent;
- }
- } else
- goto enoent;
-
- bits = -1;
- if (ch == '/' && isascii(src[0]) && isdigit(src[0]) && dst > odst) {
- /* CIDR width specifier. Nothing can follow it. */
- ch = *src++; /* Skip over the /. */
- bits = 0;
- do {
- n = strchr(digits, ch) - digits;
- assert(n >= 0 && n <= 9);
- bits *= 10;
- bits += n;
- } while ((ch = *src++) != '\0' && isascii(ch) && isdigit(ch));
- if (ch != '\0')
- goto enoent;
- if (bits > 32)
- goto emsgsize;
- }
-
- /* Firey death and destruction unless we prefetched EOS. */
- if (ch != '\0')
- goto enoent;
-
- /* If nothing was written to the destination, we found no address. */
- if (dst == odst)
- goto enoent;
- /* If no CIDR spec was given, infer width from net class. */
- if (bits == -1) {
- if (*odst >= 240) /* Class E */
- bits = 32;
- else if (*odst >= 224) /* Class D */
- bits = 4;
- else if (*odst >= 192) /* Class C */
- bits = 24;
- else if (*odst >= 128) /* Class B */
- bits = 16;
- else /* Class A */
- bits = 8;
- /* If imputed mask is narrower than specified octets, widen. */
- if (bits >= 8 && bits < ((dst - odst) * 8))
- bits = (dst - odst) * 8;
- }
- /* Extend network to cover the actual mask. */
- while (bits > ((dst - odst) * 8)) {
- if (size-- <= 0)
- goto emsgsize;
- *dst++ = '\0';
- }
- return (bits);
-
- enoent:
- errno = ENOENT;
- return (-1);
-
- emsgsize:
- errno = EMSGSIZE;
- return (-1);
-}
diff --git a/cpukit/libnetworking/libc/inet_neta.c b/cpukit/libnetworking/libc/inet_neta.c
deleted file mode 100644
index 59b156f7f6..0000000000
--- a/cpukit/libnetworking/libc/inet_neta.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static const char orig_rcsid[] = "From Id: inet_neta.c,v 8.2 1996/08/08 06:54:44 vixie Exp";
-static const char rcsid[] = "$Id$";
-#endif
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-
-#ifdef SPRINTF_CHAR
-# define SPRINTF(x) strlen(sprintf/**/x)
-#else
-# define SPRINTF(x) ((size_t)sprintf x)
-#endif
-
-/*
- * char *
- * inet_neta(src, dst, size)
- * format a u_long network number into presentation format.
- * return:
- * pointer to dst, or NULL if an error occurred (check errno).
- * note:
- * format of ``src'' is as for inet_network().
- * author:
- * Paul Vixie (ISC), July 1996
- */
-char *
-inet_neta(src, dst, size)
- u_long src;
- char *dst;
- size_t size;
-{
- char *odst = dst;
- char *tp;
-
- while (src & 0xffffffff) {
- u_char b = (src & 0xff000000) >> 24;
-
- src <<= 8;
- if (b) {
- if (size < sizeof "255.")
- goto emsgsize;
- tp = dst;
- dst += SPRINTF((dst, "%u", b));
- if (src != 0L) {
- *dst++ = '.';
- *dst = '\0';
- }
- size -= (size_t)(dst - tp);
- }
- }
- if (dst == odst) {
- if (size < sizeof "0.0.0.0")
- goto emsgsize;
- strcpy(dst, "0.0.0.0");
- }
- return (odst);
-
- emsgsize:
- errno = EMSGSIZE;
- return (NULL);
-}
diff --git a/cpukit/libnetworking/libc/inet_netof.c b/cpukit/libnetworking/libc/inet_netof.c
deleted file mode 100644
index 179731efc3..0000000000
--- a/cpukit/libnetworking/libc/inet_netof.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)inet_netof.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-/*
- * Return the network number from an internet
- * address; handles class a/b/c network #'s.
- */
-u_long
-inet_netof(in)
- struct in_addr in;
-{
- register u_long i = ntohl(in.s_addr);
-
- if (IN_CLASSA(i))
- return (((i)&IN_CLASSA_NET) >> IN_CLASSA_NSHIFT);
- else if (IN_CLASSB(i))
- return (((i)&IN_CLASSB_NET) >> IN_CLASSB_NSHIFT);
- else
- return (((i)&IN_CLASSC_NET) >> IN_CLASSC_NSHIFT);
-}
diff --git a/cpukit/libnetworking/libc/inet_network.c b/cpukit/libnetworking/libc/inet_network.c
deleted file mode 100644
index ac0073bf0a..0000000000
--- a/cpukit/libnetworking/libc/inet_network.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)inet_network.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <ctype.h>
-
-/*
- * Internet network address interpretation routine.
- * The library routines call this routine to interpret
- * network numbers.
- */
-u_long
-inet_network(cp)
- register const char *cp;
-{
- register u_long val, base, n, i;
- register char c;
- u_long parts[4], *pp = parts;
-
-again:
- val = 0; base = 10;
- if (*cp == '0')
- base = 8, cp++;
- if (*cp == 'x' || *cp == 'X')
- base = 16, cp++;
- while ((c = *cp) != 0) {
- if (isdigit(c)) {
- val = (val * base) + (c - '0');
- cp++;
- continue;
- }
- if (base == 16 && isxdigit(c)) {
- val = (val << 4) + (c + 10 - (islower(c) ? 'a' : 'A'));
- cp++;
- continue;
- }
- break;
- }
- if (*cp == '.') {
- if (pp >= parts + 3)
- return (INADDR_NONE);
- *pp++ = val, cp++;
- goto again;
- }
- if (*cp && !isspace(*cp))
- return (INADDR_NONE);
- *pp++ = val;
- n = pp - parts;
- for (val = 0, i = 0; i < n; i++) {
- val <<= 8;
- val |= parts[i] & 0xff;
- }
- return (val);
-}
diff --git a/cpukit/libnetworking/libc/inet_ntoa.c b/cpukit/libnetworking/libc/inet_ntoa.c
deleted file mode 100644
index 44b686f0b3..0000000000
--- a/cpukit/libnetworking/libc/inet_ntoa.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)inet_ntoa.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <stdio.h>
-
-/*
- * Convert network-format internet address
- * to base 256 d.d.d.d representation.
- */
-char *
-inet_ntoa(in)
- struct in_addr in;
-{
- static char ret[18];
-
- strcpy(ret, "[inet_ntoa error]");
- (void) inet_ntop(AF_INET, &in, ret, sizeof ret);
- return (ret);
-}
diff --git a/cpukit/libnetworking/libc/inet_ntop.c b/cpukit/libnetworking/libc/inet_ntop.c
deleted file mode 100644
index 76a538755a..0000000000
--- a/cpukit/libnetworking/libc/inet_ntop.c
+++ /dev/null
@@ -1,191 +0,0 @@
-/* Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-
-#define SPRINTF(x) ((size_t)sprintf x)
-
-/*
- * WARNING: Don't even consider trying to compile this on a system where
- * sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX.
- */
-
-static const char *inet_ntop4 __P((const u_char *src, char *dst, size_t size));
-static const char *inet_ntop6 __P((const u_char *src, char *dst, size_t size));
-
-/* char *
- * inet_ntop(af, src, dst, size)
- * convert a network format address to presentation format.
- * return:
- * pointer to presentation format address (`dst'), or NULL (see errno).
- * author:
- * Paul Vixie, 1996.
- */
-const char *
-inet_ntop(af, src, dst, size)
- int af;
- const void *src;
- char *dst;
- size_t size;
-{
- switch (af) {
- case AF_INET:
- return (inet_ntop4(src, dst, size));
- case AF_INET6:
- return (inet_ntop6(src, dst, size));
- default:
- errno = EAFNOSUPPORT;
- return (NULL);
- }
- /* NOTREACHED */
-}
-
-/* const char *
- * inet_ntop4(src, dst, size)
- * format an IPv4 address, more or less like inet_ntoa()
- * return:
- * `dst' (as a const)
- * notes:
- * (1) uses no statics
- * (2) takes a u_char* not an in_addr as input
- * author:
- * Paul Vixie, 1996.
- */
-static const char *
-inet_ntop4(src, dst, size)
- const u_char *src;
- char *dst;
- size_t size;
-{
- static const char fmt[] = "%u.%u.%u.%u";
- char tmp[sizeof "255.255.255.255"];
-
- if (SPRINTF((tmp, fmt, src[0], src[1], src[2], src[3])) > size) {
- errno = ENOSPC;
- return (NULL);
- }
- strcpy(dst, tmp);
- return (dst);
-}
-
-/* const char *
- * inet_ntop6(src, dst, size)
- * convert IPv6 binary address into presentation (printable) format
- * author:
- * Paul Vixie, 1996.
- */
-static const char *
-inet_ntop6(src, dst, size)
- const u_char *src;
- char *dst;
- size_t size;
-{
- /*
- * Note that int32_t and int16_t need only be "at least" large enough
- * to contain a value of the specified size. On some systems, like
- * Crays, there is no such thing as an integer variable with 16 bits.
- * Keep this in mind if you think this function should have been coded
- * to use pointer overlays. All the world's not a VAX.
- */
- char tmp[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"], *tp;
- struct { int base, len; } best, cur;
- u_int words[NS_IN6ADDRSZ / NS_INT16SZ];
- int i;
-
- /*
- * Preprocess:
- * Copy the input (bytewise) array into a wordwise array.
- * Find the longest run of 0x00's in src[] for :: shorthanding.
- */
- memset(words, '\0', sizeof words);
- for (i = 0; i < NS_IN6ADDRSZ; i++)
- words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3));
- best.base = -1;
- cur.base = -1;
- for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++) {
- if (words[i] == 0) {
- if (cur.base == -1)
- cur.base = i, cur.len = 1;
- else
- cur.len++;
- } else {
- if (cur.base != -1) {
- if (best.base == -1 || cur.len > best.len)
- best = cur;
- cur.base = -1;
- }
- }
- }
- if (cur.base != -1) {
- if (best.base == -1 || cur.len > best.len)
- best = cur;
- }
- if (best.base != -1 && best.len < 2)
- best.base = -1;
-
- /*
- * Format the result.
- */
- tp = tmp;
- for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++) {
- /* Are we inside the best run of 0x00's? */
- if (best.base != -1 && i >= best.base &&
- i < (best.base + best.len)) {
- if (i == best.base)
- *tp++ = ':';
- continue;
- }
- /* Are we following an initial run of 0x00s or any real hex? */
- if (i != 0)
- *tp++ = ':';
- /* Is this address an encapsulated IPv4? */
- if (i == 6 && best.base == 0 &&
- (best.len == 6 || (best.len == 5 && words[5] == 0xffff))) {
- if (!inet_ntop4(src+12, tp, sizeof tmp - (tp - tmp)))
- return (NULL);
- tp += strlen(tp);
- break;
- }
- tp += SPRINTF((tp, "%x", words[i]));
- }
- /* Was it a trailing run of 0x00's? */
- if (best.base != -1 && (best.base + best.len) ==
- (NS_IN6ADDRSZ / NS_INT16SZ))
- *tp++ = ':';
- *tp++ = '\0';
-
- /*
- * Check for overflow, copy, and we're done.
- */
- if ((size_t)(tp - tmp) > size) {
- errno = ENOSPC;
- return (NULL);
- }
- strcpy(dst, tmp);
- return (dst);
-}
diff --git a/cpukit/libnetworking/libc/inet_pton.c b/cpukit/libnetworking/libc/inet_pton.c
deleted file mode 100644
index 8d21111cfa..0000000000
--- a/cpukit/libnetworking/libc/inet_pton.c
+++ /dev/null
@@ -1,214 +0,0 @@
-/* Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-#include <string.h>
-#include <errno.h>
-
-/*
- * WARNING: Don't even consider trying to compile this on a system where
- * sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX.
- */
-
-static int inet_pton4 __P((const char *src, u_char *dst));
-static int inet_pton6 __P((const char *src, u_char *dst));
-
-/* int
- * inet_pton(af, src, dst)
- * convert from presentation format (which usually means ASCII printable)
- * to network format (which is usually some kind of binary format).
- * return:
- * 1 if the address was valid for the specified address family
- * 0 if the address wasn't valid (`dst' is untouched in this case)
- * -1 if some other error occurred (`dst' is untouched in this case, too)
- * author:
- * Paul Vixie, 1996.
- */
-int
-inet_pton(af, src, dst)
- int af;
- const char *src;
- void *dst;
-{
- switch (af) {
- case AF_INET:
- return (inet_pton4(src, dst));
- case AF_INET6:
- return (inet_pton6(src, dst));
- default:
- errno = EAFNOSUPPORT;
- return (-1);
- }
- /* NOTREACHED */
-}
-
-/* int
- * inet_pton4(src, dst)
- * like inet_aton() but without all the hexadecimal and shorthand.
- * return:
- * 1 if `src' is a valid dotted quad, else 0.
- * notice:
- * does not touch `dst' unless it's returning 1.
- * author:
- * Paul Vixie, 1996.
- */
-static int
-inet_pton4(src, dst)
- const char *src;
- u_char *dst;
-{
- static const char digits[] = "0123456789";
- int saw_digit, octets, ch;
- u_char tmp[NS_INADDRSZ], *tp;
-
- saw_digit = 0;
- octets = 0;
- *(tp = tmp) = 0;
- while ((ch = *src++) != '\0') {
- const char *pch;
-
- if ((pch = strchr(digits, ch)) != NULL) {
- u_int new = *tp * 10 + (pch - digits);
-
- if (new > 255)
- return (0);
- *tp = new;
- if (! saw_digit) {
- if (++octets > 4)
- return (0);
- saw_digit = 1;
- }
- } else if (ch == '.' && saw_digit) {
- if (octets == 4)
- return (0);
- *++tp = 0;
- saw_digit = 0;
- } else
- return (0);
- }
- if (octets < 4)
- return (0);
-
- memcpy(dst, tmp, NS_INADDRSZ);
- return (1);
-}
-
-/* int
- * inet_pton6(src, dst)
- * convert presentation level address to network order binary form.
- * return:
- * 1 if `src' is a valid [RFC1884 2.2] address, else 0.
- * notice:
- * (1) does not touch `dst' unless it's returning 1.
- * (2) :: in a full address is silently ignored.
- * credit:
- * inspired by Mark Andrews.
- * author:
- * Paul Vixie, 1996.
- */
-static int
-inet_pton6(src, dst)
- const char *src;
- u_char *dst;
-{
- static const char xdigits_l[] = "0123456789abcdef",
- xdigits_u[] = "0123456789ABCDEF";
- u_char tmp[NS_IN6ADDRSZ], *tp, *endp, *colonp;
- const char *xdigits, *curtok;
- int ch, saw_xdigit;
- u_int val;
-
- memset((tp = tmp), '\0', NS_IN6ADDRSZ);
- endp = tp + NS_IN6ADDRSZ;
- colonp = NULL;
- /* Leading :: requires some special handling. */
- if (*src == ':')
- if (*++src != ':')
- return (0);
- curtok = src;
- saw_xdigit = 0;
- val = 0;
- while ((ch = *src++) != '\0') {
- const char *pch;
-
- if ((pch = strchr((xdigits = xdigits_l), ch)) == NULL)
- pch = strchr((xdigits = xdigits_u), ch);
- if (pch != NULL) {
- val <<= 4;
- val |= (pch - xdigits);
- if (val > 0xffff)
- return (0);
- saw_xdigit = 1;
- continue;
- }
- if (ch == ':') {
- curtok = src;
- if (!saw_xdigit) {
- if (colonp)
- return (0);
- colonp = tp;
- continue;
- }
- if (tp + NS_INT16SZ > endp)
- return (0);
- *tp++ = (u_char) (val >> 8) & 0xff;
- *tp++ = (u_char) val & 0xff;
- saw_xdigit = 0;
- val = 0;
- continue;
- }
- if (ch == '.' && ((tp + NS_INADDRSZ) <= endp) &&
- inet_pton4(curtok, tp) > 0) {
- tp += NS_INADDRSZ;
- saw_xdigit = 0;
- break; /* '\0' was seen by inet_pton4(). */
- }
- return (0);
- }
- if (saw_xdigit) {
- if (tp + NS_INT16SZ > endp)
- return (0);
- *tp++ = (u_char) (val >> 8) & 0xff;
- *tp++ = (u_char) val & 0xff;
- }
- if (colonp != NULL) {
- /*
- * Since some memmove()'s erroneously fail to handle
- * overlapping regions, we'll do the shift by hand.
- */
- const int n = tp - colonp;
- int i;
-
- for (i = 1; i <= n; i++) {
- endp[- i] = colonp[n - i];
- colonp[n - i] = 0;
- }
- tp = endp;
- }
- if (tp != endp)
- return (0);
- memcpy(dst, tmp, NS_IN6ADDRSZ);
- return (1);
-}
diff --git a/cpukit/libnetworking/libc/iso_addr.3 b/cpukit/libnetworking/libc/iso_addr.3
deleted file mode 100644
index 0c9973bef4..0000000000
--- a/cpukit/libnetworking/libc/iso_addr.3
+++ /dev/null
@@ -1,111 +0,0 @@
-.\" Copyright (c) 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)iso_addr.3 8.1 (Berkeley) 6/4/93
-.\" $Id$
-.\"
-.Dd June 4, 1993
-.Dt ISO_ADDR 3
-.Os
-.Sh NAME
-.Nm iso_addr ,
-.Nm iso_ntoa
-.Nd "elementary network address conversion routines for Open System Interconnection
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <netiso/iso.h>
-.Ft struct iso_addr *
-.Fn iso_addr "char *cp"
-.Ft char *
-.Fn iso_ntoa "struct iso_addr *isoa"
-.Sh DESCRIPTION
-The routine
-.Fn iso_addr
-interprets character strings representing
-.Tn OSI
-addresses, returning binary information suitable
-for use in system calls.
-The routine
-.Fn iso_ntoa
-takes
-.Tn OSI
-addresses and returns
-.Tn ASCII
-strings representing NSAPs (network service
-access points) in a
-notation inverse to that accepted by
-.Fn iso_addr .
-.Pp
-Unfortunately, no universal standard exists for representing
-.Tn OSI
-network addresses.
-.Pp
-The format employed by
-.Fn iso_addr
-is a sequence of hexadecimal
-.Dq digits
-(optionally separated by periods),
-of the form:
-.Bd -filled -offset indent
-<hex digits>.<hex digits>.<hex digits>
-.Ed
-.Pp
-Each pair of hexadecimal digits represents a byte
-with the leading digit indicating the higher-ordered bits.
-A period following an even number of bytes has no
-effect (but may be used to increase legibility).
-A period following an odd number of bytes has the
-effect of causing the byte of address being translated
-to have its higher order bits filled with zeros.
-.Sh RETURN VALUES
-.Fn iso_ntoa
-always returns a null terminated string.
-.Fn iso_addr
-always returns a pointer to a struct iso_addr.
-(See
-.Sx BUGS . )
-.Sh SEE ALSO
-.Xr iso 4
-.Sh HISTORY
-The
-.Fn iso_addr
-and
-.Fn iso_ntoa
-functions appeared in
-.Bx 4.3 Reno .
-.Sh BUGS
-The returned values
-reside in a static memory area.
-.Pp
-The function
-.Fn iso_addr
-should diagnose improperly formed input, and there should be an unambiguous
-way to recognize this.
diff --git a/cpukit/libnetworking/libc/iso_addr.c b/cpukit/libnetworking/libc/iso_addr.c
deleted file mode 100644
index eb14e8a72b..0000000000
--- a/cpukit/libnetworking/libc/iso_addr.c
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)iso_addr.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <netiso/iso.h>
-#include <string.h>
-
-/* States*/
-#define VIRGIN 0
-#define GOTONE 1
-#define GOTTWO 2
-/* Inputs */
-#define DIGIT (4*0)
-#define END (4*1)
-#define DELIM (4*2)
-
-struct iso_addr *
-iso_addr(addr)
- register const char *addr;
-{
- static struct iso_addr out_addr;
- register char *cp = out_addr.isoa_genaddr;
- char *cplim = cp + sizeof(out_addr.isoa_genaddr);
- register int byte = 0, state = VIRGIN, new;
-
- bzero((char *)&out_addr, sizeof(out_addr));
- do {
- if ((*addr >= '0') && (*addr <= '9')) {
- new = *addr - '0';
- } else if ((*addr >= 'a') && (*addr <= 'f')) {
- new = *addr - 'a' + 10;
- } else if ((*addr >= 'A') && (*addr <= 'F')) {
- new = *addr - 'A' + 10;
- } else if (*addr == 0)
- state |= END;
- else
- state |= DELIM;
- addr++;
- switch (state /* | INPUT */) {
- case GOTTWO | DIGIT:
- *cp++ = byte; /*FALLTHROUGH*/
- case VIRGIN | DIGIT:
- state = GOTONE; byte = new; continue;
- case GOTONE | DIGIT:
- state = GOTTWO; byte = new + (byte << 4); continue;
- default: /* | DELIM */
- state = VIRGIN; *cp++ = byte; byte = 0; continue;
- case GOTONE | END:
- case GOTTWO | END:
- *cp++ = byte; /* FALLTHROUGH */
- case VIRGIN | END:
- break;
- }
- break;
- } while (cp < cplim);
- out_addr.isoa_len = cp - out_addr.isoa_genaddr;
- return (&out_addr);
-}
-
-static char hexlist[] = "0123456789abcdef";
-
-char *
-iso_ntoa(isoa)
- const struct iso_addr *isoa;
-{
- static char tmpbuf[sizeof(isoa->isoa_genaddr)*3];
- const u_char *binary;
- char *cp;
- int i;
-
- binary = isoa->isoa_genaddr;
- cp = tmpbuf;
-
- for (i = 0; i < isoa->isoa_len; i++) {
- *cp++ = hexlist[*binary >> 4];
- *cp++ = hexlist[*binary++ & 0xf];
-
- if ((((i % 2) == 0) && ((i + 1) < isoa->isoa_len)))
- *cp++ = '.';
- }
- *cp = '\0';
- return tmpbuf;
-}
diff --git a/cpukit/libnetworking/libc/linkaddr.3 b/cpukit/libnetworking/libc/linkaddr.3
deleted file mode 100644
index 6999add0e8..0000000000
--- a/cpukit/libnetworking/libc/linkaddr.3
+++ /dev/null
@@ -1,138 +0,0 @@
-.\" Copyright (c) 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Donn Seeley at BSDI.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" From: @(#)linkaddr.3 8.1 (Berkeley) 7/28/93
-.\" $Id$
-.\"
-.Dd June 17, 1996
-.Dt LINK_ADDR 3
-.Os BSD 4.4
-.Sh NAME
-.Nm link_addr ,
-.Nm link_ntoa
-.Nd elementary address specification routines for link level access
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/socket.h>
-.Fd #include <net/if_dl.h>
-.Ft void
-.Fn link_addr "const char *addr" "struct sockaddr_dl *sdl"
-.Ft char *
-.Fn link_ntoa "const struct sockaddr_dl *sdl"
-.Sh DESCRIPTION
-The routine
-.Fn link_addr
-interprets character strings representing
-link-level addresses, returning binary information suitable
-for use in system calls.
-The routine
-.Fn link_ntoa
-takes
-a link-level
-address and returns an
-.Tn ASCII
-string representing some of the information present,
-including the link level address itself, and the interface name
-or number, if present.
-This facility is experimental and is
-still subject to change.
-.Pp
-For
-.Fn link_addr ,
-the string
-.Fa addr
-may contain
-an optional network interface identifier of the form
-.Dq "name unit-number" ,
-suitable for the first argument to
-.Xr ifconfig 8 ,
-followed in all cases by a colon and
-an interface address in the form of
-groups of hexadecimal digits
-separated by periods.
-Each group represents a byte of address;
-address bytes are filled left to right from
-low order bytes through high order bytes.
-.Pp
-.\" A regular expression may make this format clearer:
-.\" .Bd -literal -offset indent
-.\" ([a-z]+[0-9]+:)?[0-9a-f]+(\e.[0-9a-f]+)*
-.\" .Ed
-.\" .Pp
-Thus
-.Li le0:8.0.9.13.d.30
-represents an ethernet address
-to be transmitted on the first Lance ethernet interface.
-.Pp
-The direct use of these functions is deprecated in favor of the
-.Xr addr2ascii 3
-interface; however, portable programs cannot rely on the latter as it is
-not yet widely implemented.
-.Sh RETURN VALUES
-.Fn link_ntoa
-always returns a null terminated string.
-.Fn link_addr
-has no return value.
-(See
-.Sx BUGS . )
-.Sh SEE ALSO
-.Xr addr2ascii 3
-.\" .Xr iso 4
-.Sh HISTORY
-The
-.Fn link_addr
-and
-.Fn link_ntoa
-functions appeared in
-.Bx 4.3 Reno .
-.Sh BUGS
-The returned values for link_ntoa
-reside in a static memory area.
-.Pp
-The function
-.Fn link_addr
-should diagnose improperly formed input, and there should be an unambiguous
-way to recognize this.
-.Pp
-If the
-.Va sdl_len
-field of the link socket address
-.Fa sdl
-is 0,
-.Fn link_ntoa
-will not insert a colon before the interface address bytes.
-If this translated address is given to
-.Fn link_addr
-without inserting an initial colon,
-the latter will not interpret it correctly.
diff --git a/cpukit/libnetworking/libc/linkaddr.c b/cpukit/libnetworking/libc/linkaddr.c
deleted file mode 100644
index 28c16cff05..0000000000
--- a/cpukit/libnetworking/libc/linkaddr.c
+++ /dev/null
@@ -1,160 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)linkaddr.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <net/if_dl.h>
-#include <string.h>
-
-/* States*/
-#define NAMING 0
-#define GOTONE 1
-#define GOTTWO 2
-#define RESET 3
-/* Inputs */
-#define DIGIT (4*0)
-#define END (4*1)
-#define DELIM (4*2)
-#define LETTER (4*3)
-
-void
-link_addr(addr, sdl)
- register const char *addr;
- register struct sockaddr_dl *sdl;
-{
- register char *cp = sdl->sdl_data;
- char *cplim = sdl->sdl_len + (char *)sdl;
- register int byte = 0, state = NAMING, new;
-
- bzero((char *)&sdl->sdl_family, sdl->sdl_len - 1);
- sdl->sdl_family = AF_LINK;
- do {
- state &= ~LETTER;
- if ((*addr >= '0') && (*addr <= '9')) {
- new = *addr - '0';
- } else if ((*addr >= 'a') && (*addr <= 'f')) {
- new = *addr - 'a' + 10;
- } else if ((*addr >= 'A') && (*addr <= 'F')) {
- new = *addr - 'A' + 10;
- } else if (*addr == 0) {
- state |= END;
- } else if (state == NAMING &&
- (((*addr >= 'A') && (*addr <= 'Z')) ||
- ((*addr >= 'a') && (*addr <= 'z'))))
- state |= LETTER;
- else
- state |= DELIM;
- addr++;
- switch (state /* | INPUT */) {
- case NAMING | DIGIT:
- case NAMING | LETTER:
- *cp++ = addr[-1];
- continue;
- case NAMING | DELIM:
- state = RESET;
- sdl->sdl_nlen = cp - sdl->sdl_data;
- continue;
- case GOTTWO | DIGIT:
- *cp++ = byte;
- /* FALLTHROUGH */
- case RESET | DIGIT:
- state = GOTONE;
- byte = new;
- continue;
- case GOTONE | DIGIT:
- state = GOTTWO;
- byte = new + (byte << 4);
- continue;
- default: /* | DELIM */
- state = RESET;
- *cp++ = byte;
- byte = 0;
- continue;
- case GOTONE | END:
- case GOTTWO | END:
- *cp++ = byte;
- /* FALLTHROUGH */
- case RESET | END:
- break;
- }
- break;
- } while (cp < cplim);
- sdl->sdl_alen = cp - LLADDR(sdl);
- new = cp - (char *)sdl;
- if (new > sizeof(*sdl))
- sdl->sdl_len = new;
- return;
-}
-
-static char hexlist[] = "0123456789abcdef";
-
-char *
-link_ntoa(sdl)
- register const struct sockaddr_dl *sdl;
-{
- static char obuf[64];
- register char *out = obuf;
- register int i;
- register u_char *in = (u_char *)LLADDR(sdl);
- u_char *inlim = in + sdl->sdl_alen;
- int firsttime = 1;
-
- if (sdl->sdl_nlen) {
- bcopy(sdl->sdl_data, obuf, sdl->sdl_nlen);
- out += sdl->sdl_nlen;
- if (sdl->sdl_alen)
- *out++ = ':';
- }
- while (in < inlim) {
- if (firsttime)
- firsttime = 0;
- else
- *out++ = '.';
- i = *in++;
- if (i > 0xf) {
- out[1] = hexlist[i & 0xf];
- i >>= 4;
- out[0] = hexlist[i];
- out += 2;
- } else
- *out++ = hexlist[i];
- }
- *out = 0;
- return (obuf);
-}
diff --git a/cpukit/libnetworking/libc/map_v4v6.c b/cpukit/libnetworking/libc/map_v4v6.c
deleted file mode 100644
index 0f8658e117..0000000000
--- a/cpukit/libnetworking/libc/map_v4v6.c
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * ++Copyright++ 1985, 1988, 1993
- * -
- * Copyright (c) 1985, 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * -
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- * -
- * --Copyright--
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)gethostnamadr.c 8.1 (Berkeley) 6/4/93";
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-
-#include <stdio.h>
-#include <string.h>
-#include <netdb.h>
-#include <resolv.h>
-#include <ctype.h>
-#include <errno.h>
-#include <syslog.h>
-
-typedef union {
- int32_t al;
- char ac;
-} align;
-
-void
-_map_v4v6_address(src, dst)
- const char *src;
- char *dst;
-{
- u_char *p = (u_char *)dst;
- char tmp[INADDRSZ];
- int i;
-
- /* Stash a temporary copy so our caller can update in place. */
- bcopy(src, tmp, INADDRSZ);
- /* Mark this ipv6 addr as a mapped ipv4. */
- for (i = 0; i < 10; i++)
- *p++ = 0x00;
- *p++ = 0xff;
- *p++ = 0xff;
- /* Retrieve the saved copy and we're done. */
- bcopy(tmp, (void*)p, INADDRSZ);
-}
-
-void
-_map_v4v6_hostent(hp, bpp, lenp)
- struct hostent *hp;
- char **bpp;
- int *lenp;
-{
- char **ap;
-
- if (hp->h_addrtype != AF_INET || hp->h_length != INADDRSZ)
- return;
- hp->h_addrtype = AF_INET6;
- hp->h_length = IN6ADDRSZ;
- for (ap = hp->h_addr_list; *ap; ap++) {
- int i = sizeof(align) - ((u_long)*bpp % sizeof(align));
-
- if (*lenp < (i + IN6ADDRSZ)) {
- /* Out of memory. Truncate address list here. XXX */
- *ap = NULL;
- return;
- }
- *bpp += i;
- *lenp -= i;
- _map_v4v6_address(*ap, *bpp);
- *ap = *bpp;
- *bpp += IN6ADDRSZ;
- *lenp -= IN6ADDRSZ;
- }
-}
diff --git a/cpukit/libnetworking/libc/ns.3 b/cpukit/libnetworking/libc/ns.3
deleted file mode 100644
index e621ad2d90..0000000000
--- a/cpukit/libnetworking/libc/ns.3
+++ /dev/null
@@ -1,131 +0,0 @@
-.\" Copyright (c) 1986, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)ns.3 8.1 (Berkeley) 6/4/93
-.\" $Id$
-.\"
-.Dd June 4, 1993
-.Dt NS 3
-.Os BSD 4.3
-.Sh NAME
-.Nm ns_addr ,
-.Nm ns_ntoa
-.Nd Xerox
-.Tn NS Ns (tm)
-address conversion routines
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <netns/ns.h>
-.Ft struct ns_addr
-.Fn ns_addr "char *cp"
-.Ft char *
-.Fn ns_ntoa "struct ns_addr ns"
-.Sh DESCRIPTION
-The routine
-.Fn ns_addr
-interprets character strings representing
-.Tn XNS
-addresses, returning binary information suitable
-for use in system calls.
-The routine
-.Fn ns_ntoa
-takes
-.Tn XNS
-addresses and returns
-.Tn ASCII
-strings representing the address in a
-notation in common use in the Xerox Development Environment:
-.Bd -filled -offset indent
-<network number>.<host number>.<port number>
-.Ed
-.Pp
-Trailing zero fields are suppressed, and each number is printed in hexadecimal,
-in a format suitable for input to
-.Fn ns_addr .
-Any fields lacking super-decimal digits will have a
-trailing
-.Ql H
-appended.
-.Pp
-Unfortunately, no universal standard exists for representing
-.Tn XNS
-addresses.
-An effort has been made to insure that
-.Fn ns_addr
-be compatible with most formats in common use.
-It will first separate an address into 1 to 3 fields using a single delimiter
-chosen from
-period
-.Ql \&. ,
-colon
-.Ql \&:
-or pound-sign
-.Ql \&# .
-Each field is then examined for byte separators (colon or period).
-If there are byte separators, each subfield separated is taken to be
-a small hexadecimal number, and the entirety is taken as a network-byte-ordered
-quantity to be zero extended in the high-network-order bytes.
-Next, the field is inspected for hyphens, in which case
-the field is assumed to be a number in decimal notation
-with hyphens separating the millenia.
-Next, the field is assumed to be a number:
-It is interpreted
-as hexadecimal if there is a leading
-.Ql 0x
-(as in C),
-a trailing
-.Ql H
-(as in Mesa), or there are any super-decimal digits present.
-It is interpreted as octal is there is a leading
-.Ql 0
-and there are no super-octal digits.
-Otherwise, it is converted as a decimal number.
-.Sh RETURN VALUES
-None. (See
-.Sx BUGS . )
-.Sh SEE ALSO
-.Xr hosts 5 ,
-.Xr networks 5
-.Sh HISTORY
-The
-.Fn ns_addr
-and
-.Fn ns_toa
-functions appeared in
-.Bx 4.3 .
-.Sh BUGS
-The string returned by
-.Fn ns_ntoa
-resides in a static memory area.
-The function
-.Fn ns_addr
-should diagnose improperly formed input, and there should be an unambiguous
-way to recognize this.
diff --git a/cpukit/libnetworking/libc/ns_addr.c b/cpukit/libnetworking/libc/ns_addr.c
deleted file mode 100644
index 18fabe91f1..0000000000
--- a/cpukit/libnetworking/libc/ns_addr.c
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
- * Copyright (c) 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * J.Q. Johnson.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)ns_addr.c 8.1 (Berkeley) 6/7/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <netns/ns.h>
-#include <stdio.h>
-#include <string.h>
-
-static struct ns_addr addr, zero_addr;
-
-static void Field(), cvtbase();
-
-struct ns_addr
-ns_addr(name)
- const char *name;
-{
- char separator;
- char *hostname, *socketname, *cp;
- char buf[50];
-
- (void)strncpy(buf, name, sizeof(buf) - 1);
- buf[sizeof(buf) - 1] = '\0';
-
- /*
- * First, figure out what he intends as a field separtor.
- * Despite the way this routine is written, the prefered
- * form 2-272.AA001234H.01777, i.e. XDE standard.
- * Great efforts are made to insure backward compatability.
- */
- if ((hostname = strchr(buf, '#')) != NULL)
- separator = '#';
- else {
- hostname = strchr(buf, '.');
- if ((cp = strchr(buf, ':')) &&
- ((hostname && cp < hostname) || (hostname == 0))) {
- hostname = cp;
- separator = ':';
- } else
- separator = '.';
- }
- if (hostname)
- *hostname++ = 0;
-
- addr = zero_addr;
- Field(buf, addr.x_net.c_net, 4);
- if (hostname == 0)
- return (addr); /* No separator means net only */
-
- socketname = strchr(hostname, separator);
- if (socketname) {
- *socketname++ = 0;
- Field(socketname, (u_char *)&addr.x_port, 2);
- }
-
- Field(hostname, addr.x_host.c_host, 6);
-
- return (addr);
-}
-
-static void
-Field(buf, out, len)
- char *buf;
- u_char *out;
- int len;
-{
- register char *bp = buf;
- int i, ibase, base16 = 0, base10 = 0, clen = 0;
- int hb[6], *hp;
- char *fmt;
-
- /*
- * first try 2-273#2-852-151-014#socket
- */
- if ((*buf != '-') &&
- (1 < (i = sscanf(buf, "%d-%d-%d-%d-%d",
- &hb[0], &hb[1], &hb[2], &hb[3], &hb[4])))) {
- cvtbase(1000L, 256, hb, i, out, len);
- return;
- }
- /*
- * try form 8E1#0.0.AA.0.5E.E6#socket
- */
- if (1 < (i = sscanf(buf,"%x.%x.%x.%x.%x.%x",
- &hb[0], &hb[1], &hb[2], &hb[3], &hb[4], &hb[5]))) {
- cvtbase(256L, 256, hb, i, out, len);
- return;
- }
- /*
- * try form 8E1#0:0:AA:0:5E:E6#socket
- */
- if (1 < (i = sscanf(buf,"%x:%x:%x:%x:%x:%x",
- &hb[0], &hb[1], &hb[2], &hb[3], &hb[4], &hb[5]))) {
- cvtbase(256L, 256, hb, i, out, len);
- return;
- }
- /*
- * This is REALLY stretching it but there was a
- * comma notation separting shorts -- definitely non standard
- */
- if (1 < (i = sscanf(buf,"%x,%x,%x",
- &hb[0], &hb[1], &hb[2]))) {
- hb[0] = htons(hb[0]); hb[1] = htons(hb[1]);
- hb[2] = htons(hb[2]);
- cvtbase(65536L, 256, hb, i, out, len);
- return;
- }
-
- /* Need to decide if base 10, 16 or 8 */
- while (*bp) switch (*bp++) {
-
- case '0': case '1': case '2': case '3': case '4': case '5':
- case '6': case '7': case '-':
- break;
-
- case '8': case '9':
- base10 = 1;
- break;
-
- case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
- case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
- base16 = 1;
- break;
-
- case 'x': case 'X':
- *--bp = '0';
- base16 = 1;
- break;
-
- case 'h': case 'H':
- base16 = 1;
- /* fall into */
-
- default:
- *--bp = 0; /* Ends Loop */
- }
- if (base16) {
- fmt = "%3x";
- ibase = 4096;
- } else if (base10 == 0 && *buf == '0') {
- fmt = "%3o";
- ibase = 512;
- } else {
- fmt = "%3d";
- ibase = 1000;
- }
-
- for (bp = buf; *bp++; ) clen++;
- if (clen == 0) clen++;
- if (clen > 18) clen = 18;
- i = ((clen - 1) / 3) + 1;
- bp = clen + buf - 3;
- hp = hb + i - 1;
-
- while (hp > hb) {
- (void)sscanf(bp, fmt, hp);
- bp[0] = 0;
- hp--;
- bp -= 3;
- }
- (void)sscanf(buf, fmt, hp);
- cvtbase((long)ibase, 256, hb, i, out, len);
-}
-
-static void
-cvtbase(oldbase,newbase,input,inlen,result,reslen)
- long oldbase;
- int newbase;
- int input[];
- int inlen;
- unsigned char result[];
- int reslen;
-{
- int d, e;
- long sum;
-
- e = 1;
- while (e > 0 && reslen > 0) {
- d = 0; e = 0; sum = 0;
- /* long division: input=input/newbase */
- while (d < inlen) {
- sum = sum*oldbase + (long) input[d];
- e += (sum > 0);
- input[d++] = sum / newbase;
- sum %= newbase;
- }
- result[--reslen] = sum; /* accumulate remainder */
- }
- for (d=0; d < reslen; d++)
- result[d] = 0;
-}
diff --git a/cpukit/libnetworking/libc/ns_name.c b/cpukit/libnetworking/libc/ns_name.c
deleted file mode 100644
index af10d2f062..0000000000
--- a/cpukit/libnetworking/libc/ns_name.c
+++ /dev/null
@@ -1,595 +0,0 @@
-/*
- * Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if !defined(__rtems__)
-#if !defined(LINT) && !defined(CODECENTER)
-static char rcsid[] = "$Id$";
-#endif /* not lint */
-#endif /* not rtems */
-
-#include <sys/types.h>
-
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-
-#include <errno.h>
-#include <resolv.h>
-#include <string.h>
-
-/* Data. */
-
-static char digits[] = "0123456789";
-
-/* Forward. */
-
-static int special(int);
-static int printable(int);
-static int dn_find(const u_char *, const u_char *,
- const u_char * const *,
- const u_char * const *);
-
-/* Public. */
-
-/*
- * ns_name_ntop(src, dst, dstsiz)
- * Convert an encoded domain name to printable ascii as per RFC1035.
- * return:
- * Number of bytes written to buffer, or -1 (with errno set)
- * notes:
- * The root is returned as "."
- * All other domains are returned in non absolute form
- */
-int
-ns_name_ntop(const u_char *src, char *dst, size_t dstsiz) {
- const u_char *cp;
- char *dn, *eom;
- u_char c;
- u_int n;
-
- cp = src;
- dn = dst;
- eom = dst + dstsiz;
-
- while ((n = *cp++) != 0) {
- if ((n & NS_CMPRSFLGS) != 0) {
- /* Some kind of compression pointer. */
- errno = EMSGSIZE;
- return (-1);
- }
- if (dn != dst) {
- if (dn >= eom) {
- errno = EMSGSIZE;
- return (-1);
- }
- *dn++ = '.';
- }
- if (dn + n >= eom) {
- errno = EMSGSIZE;
- return (-1);
- }
- for ((void)NULL; n > 0; n--) {
- c = *cp++;
- if (special(c)) {
- if (dn + 1 >= eom) {
- errno = EMSGSIZE;
- return (-1);
- }
- *dn++ = '\\';
- *dn++ = (char)c;
- } else if (!printable(c)) {
- if (dn + 3 >= eom) {
- errno = EMSGSIZE;
- return (-1);
- }
- *dn++ = '\\';
- *dn++ = digits[c / 100];
- *dn++ = digits[(c % 100) / 10];
- *dn++ = digits[c % 10];
- } else {
- if (dn >= eom) {
- errno = EMSGSIZE;
- return (-1);
- }
- *dn++ = (char)c;
- }
- }
- }
- if (dn == dst) {
- if (dn >= eom) {
- errno = EMSGSIZE;
- return (-1);
- }
- *dn++ = '.';
- }
- if (dn >= eom) {
- errno = EMSGSIZE;
- return (-1);
- }
- *dn++ = '\0';
- return (dn - dst);
-}
-
-/*
- * ns_name_pton(src, dst, dstsiz)
- * Convert a ascii string into an encoded domain name as per RFC1035.
- * return:
- * -1 if it fails
- * 1 if string was fully qualified
- * 0 is string was not fully qualified
- * notes:
- * Enforces label and domain length limits.
- */
-
-int
-ns_name_pton(const char *src, u_char *dst, size_t dstsiz) {
- u_char *label, *bp, *eom;
- int c, n, escaped;
- char *cp;
-
- escaped = 0;
- bp = dst;
- eom = dst + dstsiz;
- label = bp++;
-
- while ((c = *src++) != 0) {
- if (escaped) {
- if ((cp = strchr(digits, c)) != NULL) {
- n = (cp - digits) * 100;
- if ((c = *src++) == 0 ||
- (cp = strchr(digits, c)) == NULL) {
- errno = EMSGSIZE;
- return (-1);
- }
- n += (cp - digits) * 10;
- if ((c = *src++) == 0 ||
- (cp = strchr(digits, c)) == NULL) {
- errno = EMSGSIZE;
- return (-1);
- }
- n += (cp - digits);
- if (n > 255) {
- errno = EMSGSIZE;
- return (-1);
- }
- c = n;
- }
- escaped = 0;
- } else if (c == '\\') {
- escaped = 1;
- continue;
- } else if (c == '.') {
- c = (bp - label - 1);
- if ((c & NS_CMPRSFLGS) != 0) { /* Label too big. */
- errno = EMSGSIZE;
- return (-1);
- }
- if (label >= eom) {
- errno = EMSGSIZE;
- return (-1);
- }
- *label = c;
- /* Fully qualified ? */
- if (*src == '\0') {
- if (c != 0) {
- if (bp >= eom) {
- errno = EMSGSIZE;
- return (-1);
- }
- *bp++ = '\0';
- }
- if ((bp - dst) > MAXCDNAME) {
- errno = EMSGSIZE;
- return (-1);
- }
- return (1);
- }
- if (c == 0) {
- errno = EMSGSIZE;
- return (-1);
- }
- label = bp++;
- continue;
- }
- if (bp >= eom) {
- errno = EMSGSIZE;
- return (-1);
- }
- *bp++ = (u_char)c;
- }
- c = (bp - label - 1);
- if ((c & NS_CMPRSFLGS) != 0) { /* Label too big. */
- errno = EMSGSIZE;
- return (-1);
- }
- if (label >= eom) {
- errno = EMSGSIZE;
- return (-1);
- }
- *label = c;
- if (c != 0) {
- if (bp >= eom) {
- errno = EMSGSIZE;
- return (-1);
- }
- *bp++ = 0;
- }
- if ((bp - dst) > MAXCDNAME) { /* src too big */
- errno = EMSGSIZE;
- return (-1);
- }
- return (0);
-}
-
-/*
- * ns_name_unpack(msg, eom, src, dst, dstsiz)
- * Unpack a domain name from a message, source may be compressed.
- * return:
- * -1 if it fails, or consumed octets if it succeeds.
- */
-int
-ns_name_unpack(const u_char *msg, const u_char *eom, const u_char *src,
- u_char *dst, size_t dstsiz)
-{
- const u_char *srcp, *dstlim;
- u_char *dstp;
- int n, len, checked;
-
- len = -1;
- checked = 0;
- dstp = dst;
- srcp = src;
- dstlim = dst + dstsiz;
- if (srcp < msg || srcp >= eom) {
- errno = EMSGSIZE;
- return (-1);
- }
- /* Fetch next label in domain name. */
- while ((n = *srcp++) != 0) {
- /* Check for indirection. */
- switch (n & NS_CMPRSFLGS) {
- case 0:
- /* Limit checks. */
- if (dstp + n + 1 >= dstlim || srcp + n >= eom) {
- errno = EMSGSIZE;
- return (-1);
- }
- checked += n + 1;
- *dstp++ = n;
- memcpy(dstp, srcp, n);
- dstp += n;
- srcp += n;
- break;
-
- case NS_CMPRSFLGS:
- if (srcp >= eom) {
- errno = EMSGSIZE;
- return (-1);
- }
- if (len < 0)
- len = srcp - src + 1;
- srcp = msg + (((n & 0x3f) << 8) | (*srcp & 0xff));
- if (srcp < msg || srcp >= eom) { /* Out of range. */
- errno = EMSGSIZE;
- return (-1);
- }
- checked += 2;
- /*
- * Check for loops in the compressed name;
- * if we've looked at the whole message,
- * there must be a loop.
- */
- if (checked >= eom - msg) {
- errno = EMSGSIZE;
- return (-1);
- }
- break;
-
- default:
- errno = EMSGSIZE;
- return (-1); /* flag error */
- }
- }
- *dstp = '\0';
- if (len < 0)
- len = srcp - src;
- return (len);
-}
-
-/*
- * ns_name_pack(src, dst, dstsiz, dnptrs, lastdnptr)
- * Pack domain name 'domain' into 'comp_dn'.
- * return:
- * Size of the compressed name, or -1.
- * notes:
- * 'dnptrs' is an array of pointers to previous compressed names.
- * dnptrs[0] is a pointer to the beginning of the message. The array
- * ends with NULL.
- * 'lastdnptr' is a pointer to the end of the array pointed to
- * by 'dnptrs'.
- * Side effects:
- * The list of pointers in dnptrs is updated for labels inserted into
- * the message as we compress the name. If 'dnptr' is NULL, we don't
- * try to compress names. If 'lastdnptr' is NULL, we don't update the
- * list.
- */
-int
-ns_name_pack(const u_char *src, u_char *dst, int dstsiz,
- const u_char **dnptrs, const u_char **lastdnptr)
-{
- u_char *dstp;
- const u_char **cpp, **lpp, *eob, *msg;
- const u_char *srcp;
- int n, l;
-
- srcp = src;
- dstp = dst;
- eob = dstp + dstsiz;
- lpp = cpp = NULL;
- if (dnptrs != NULL) {
- if ((msg = *dnptrs++) != NULL) {
- for (cpp = dnptrs; *cpp != NULL; cpp++)
- (void)NULL;
- lpp = cpp; /* end of list to search */
- }
- } else
- msg = NULL;
-
- /* make sure the domain we are about to add is legal */
- l = 0;
- do {
- n = *srcp;
- if ((n & NS_CMPRSFLGS) != 0) {
- errno = EMSGSIZE;
- return (-1);
- }
- l += n + 1;
- if (l > MAXCDNAME) {
- errno = EMSGSIZE;
- return (-1);
- }
- srcp += n + 1;
- } while (n != 0);
-
- srcp = src;
- do {
- /* Look to see if we can use pointers. */
- n = *srcp;
- if (n != 0 && msg != NULL) {
- l = dn_find(srcp, msg, (const u_char * const *)dnptrs,
- (const u_char * const *)lpp);
- if (l >= 0) {
- if (dstp + 1 >= eob) {
- errno = EMSGSIZE;
- return (-1);
- }
- *dstp++ = (l >> 8) | NS_CMPRSFLGS;
- *dstp++ = l % 256;
- return (dstp - dst);
- }
- /* Not found, save it. */
- if (lastdnptr != NULL && cpp < lastdnptr - 1 &&
- (dstp - msg) < 0x4000) {
- *cpp++ = dstp;
- *cpp = NULL;
- }
- }
- /* copy label to buffer */
- if (n & NS_CMPRSFLGS) { /* Should not happen. */
- errno = EMSGSIZE;
- return (-1);
- }
- if (dstp + 1 + n >= eob) {
- errno = EMSGSIZE;
- return (-1);
- }
- memcpy(dstp, srcp, n + 1);
- srcp += n + 1;
- dstp += n + 1;
- } while (n != 0);
-
- if (dstp > eob) {
- if (msg != NULL)
- *lpp = NULL;
- errno = EMSGSIZE;
- return (-1);
- }
- return (dstp - dst);
-}
-
-/*
- * ns_name_uncompress(msg, eom, src, dst, dstsiz)
- * Expand compressed domain name to presentation format.
- * return:
- * Number of bytes read out of `src', or -1 (with errno set).
- * note:
- * Root domain returns as "." not "".
- */
-int
-ns_name_uncompress(const u_char *msg, const u_char *eom, const u_char *src,
- char *dst, size_t dstsiz)
-{
- u_char tmp[NS_MAXCDNAME];
- int n;
-
- if ((n = ns_name_unpack(msg, eom, src, tmp, sizeof tmp)) == -1)
- return (-1);
- if (ns_name_ntop(tmp, dst, dstsiz) == -1)
- return (-1);
- return (n);
-}
-
-/*
- * ns_name_compress(src, dst, dstsiz, dnptrs, lastdnptr)
- * Compress a domain name into wire format, using compression pointers.
- * return:
- * Number of bytes consumed in `dst' or -1 (with errno set).
- * notes:
- * 'dnptrs' is an array of pointers to previous compressed names.
- * dnptrs[0] is a pointer to the beginning of the message.
- * The list ends with NULL. 'lastdnptr' is a pointer to the end of the
- * array pointed to by 'dnptrs'. Side effect is to update the list of
- * pointers for labels inserted into the message as we compress the name.
- * If 'dnptr' is NULL, we don't try to compress names. If 'lastdnptr'
- * is NULL, we don't update the list.
- */
-int
-ns_name_compress(const char *src, u_char *dst, size_t dstsiz,
- const u_char **dnptrs, const u_char **lastdnptr)
-{
- u_char tmp[NS_MAXCDNAME];
-
- if (ns_name_pton(src, tmp, sizeof tmp) == -1)
- return (-1);
- return (ns_name_pack(tmp, dst, dstsiz, dnptrs, lastdnptr));
-}
-
-/*
- * ns_name_skip(ptrptr, eom)
- * Advance *ptrptr to skip over the compressed name it points at.
- * return:
- * 0 on success, -1 (with errno set) on failure.
- */
-int
-ns_name_skip(const u_char **ptrptr, const u_char *eom) {
- const u_char *cp;
- u_int n;
-
- cp = *ptrptr;
- while (cp < eom && (n = *cp++) != 0) {
- /* Check for indirection. */
- switch (n & NS_CMPRSFLGS) {
- case 0: /* normal case, n == len */
- cp += n;
- continue;
- case NS_CMPRSFLGS: /* indirection */
- cp++;
- break;
- default: /* illegal type */
- errno = EMSGSIZE;
- return (-1);
- }
- break;
- }
- if (cp > eom) {
- errno = EMSGSIZE;
- return (-1);
- }
- *ptrptr = cp;
- return (0);
-}
-
-/* Private. */
-
-/*
- * special(ch)
- * Thinking in noninternationalized USASCII (per the DNS spec),
- * is this characted special ("in need of quoting") ?
- * return:
- * boolean.
- */
-static int
-special(int ch) {
- switch (ch) {
- case 0x22: /* '"' */
- case 0x2E: /* '.' */
- case 0x3B: /* ';' */
- case 0x5C: /* '\\' */
- /* Special modifiers in zone files. */
- case 0x40: /* '@' */
- case 0x24: /* '$' */
- return (1);
- default:
- return (0);
- }
-}
-
-/*
- * printable(ch)
- * Thinking in noninternationalized USASCII (per the DNS spec),
- * is this character visible and not a space when printed ?
- * return:
- * boolean.
- */
-static int
-printable(int ch) {
- return (ch > 0x20 && ch < 0x7f);
-}
-
-/*
- * Thinking in noninternationalized USASCII (per the DNS spec),
- * convert this character to lower case if it's upper case.
- */
-static int
-mklower(int ch) {
- if (ch >= 0x41 && ch <= 0x5A)
- return (ch + 0x20);
- return (ch);
-}
-
-/*
- * dn_find(domain, msg, dnptrs, lastdnptr)
- * Search for the counted-label name in an array of compressed names.
- * return:
- * offset from msg if found, or -1.
- * notes:
- * dnptrs is the pointer to the first name on the list,
- * not the pointer to the start of the message.
- */
-static int
-dn_find(const u_char *domain, const u_char *msg,
- const u_char * const *dnptrs,
- const u_char * const *lastdnptr)
-{
- const u_char *dn, *cp, *sp;
- const u_char * const *cpp;
- u_int n;
-
- for (cpp = dnptrs; cpp < lastdnptr; cpp++) {
- dn = domain;
- sp = cp = *cpp;
- while ((n = *cp++) != 0) {
- /*
- * check for indirection
- */
- switch (n & NS_CMPRSFLGS) {
- case 0: /* normal case, n == len */
- if (n != *dn++)
- goto next;
- for ((void)NULL; n > 0; n--)
- if (mklower(*dn++) != mklower(*cp++))
- goto next;
- /* Is next root for both ? */
- if (*dn == '\0' && *cp == '\0')
- return (sp - msg);
- if (*dn)
- continue;
- goto next;
-
- case NS_CMPRSFLGS: /* indirection */
- cp = msg + (((n & 0x3f) << 8) | *cp);
- break;
-
- default: /* illegal type */
- errno = EMSGSIZE;
- return (-1);
- }
- }
- next: ;
- }
- errno = ENOENT;
- return (-1);
-}
diff --git a/cpukit/libnetworking/libc/ns_netint.c b/cpukit/libnetworking/libc/ns_netint.c
deleted file mode 100644
index 3c09da8f8c..0000000000
--- a/cpukit/libnetworking/libc/ns_netint.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if !defined(__rtems__)
-#if !defined(LINT) && !defined(CODECENTER)
-static char rcsid[] = "$Id$";
-#endif /* not lint */
-#endif /* not rtems */
-
-/* Import. */
-
-#include <sys/types.h>
-#include <sys/socket.h>
-
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-
-u_int
-ns_get16(const u_char *src) {
- u_int dst;
-
- NS_GET16(dst, src);
- return (dst);
-}
-
-u_long
-ns_get32(const u_char *src) {
- u_long dst;
-
- NS_GET32(dst, src);
- return (dst);
-}
-
-void
-ns_put16(u_int src, u_char *dst) {
- NS_PUT16(src, dst);
-}
-
-void
-ns_put32(u_long src, u_char *dst) {
- NS_PUT32(src, dst);
-}
diff --git a/cpukit/libnetworking/libc/ns_ntoa.c b/cpukit/libnetworking/libc/ns_ntoa.c
deleted file mode 100644
index 9d0be2e1dc..0000000000
--- a/cpukit/libnetworking/libc/ns_ntoa.c
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (c) 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)ns_ntoa.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <netns/ns.h>
-#include <stdio.h>
-
-char *
-ns_ntoa(addr)
- struct ns_addr addr;
-{
- static char obuf[40];
- union { union ns_net net_e; u_long long_e; } net;
- u_short port = htons(addr.x_port);
- register char *cp;
- char *cp2;
- register u_char *up = addr.x_host.c_host;
- u_char *uplim = up + 6;
- static char *spectHex();
-
- net.net_e = addr.x_net;
- sprintf(obuf, "%lx", (u_long)ntohl(net.long_e));
- cp = spectHex(obuf);
- cp2 = cp + 1;
- while (*up==0 && up < uplim) up++;
- if (up == uplim) {
- if (port) {
- sprintf(cp, ".0");
- cp += 2;
- }
- } else {
- sprintf(cp, ".%x", *up++);
- while (up < uplim) {
- while (*cp) cp++;
- sprintf(cp, "%02x", *up++);
- }
- cp = spectHex(cp2);
- }
- if (port) {
- sprintf(cp, ".%x", port);
- spectHex(cp + 1);
- }
- return (obuf);
-}
-
-static char *
-spectHex(p0)
- char *p0;
-{
- int ok = 0;
- int nonzero = 0;
- register char *p = p0;
- for (; *p; p++) switch (*p) {
-
- case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
- *p += ('A' - 'a');
- /* fall into . . . */
- case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
- ok = 1;
- case '1': case '2': case '3': case '4': case '5':
- case '6': case '7': case '8': case '9':
- nonzero = 1;
- }
- if (nonzero && !ok) { *p++ = 'H'; *p = 0; }
- return (p);
-}
diff --git a/cpukit/libnetworking/libc/ns_parse.c b/cpukit/libnetworking/libc/ns_parse.c
deleted file mode 100644
index cc1f070156..0000000000
--- a/cpukit/libnetworking/libc/ns_parse.c
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if !defined(__rtems__)
-#if !defined(LINT) && !defined(CODECENTER)
-static char rcsid[] = "$Id$";
-#endif /* not lint */
-#endif /* not rtems */
-
-#include <sys/types.h>
-
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-
-#include <errno.h>
-#include <resolv.h>
-#include <string.h>
-
-/* These need to be in the same order as the nres.h:ns_flag enum. */
-struct _ns_flagdata _ns_flagdata[16] = {
- { 0x8000, 15 }, /* qr. */
- { 0x7800, 11 }, /* opcode. */
- { 0x0400, 10 }, /* aa. */
- { 0x0200, 9 }, /* tc. */
- { 0x0100, 8 }, /* rd. */
- { 0x0080, 7 }, /* ra. */
- { 0x0040, 6 }, /* z. */
- { 0x0020, 5 }, /* ad. */
- { 0x0010, 4 }, /* cd. */
- { 0x000f, 0 }, /* rcode. */
- { 0x0000, 0 }, /* expansion (1/6). */
- { 0x0000, 0 }, /* expansion (2/6). */
- { 0x0000, 0 }, /* expansion (3/6). */
- { 0x0000, 0 }, /* expansion (4/6). */
- { 0x0000, 0 }, /* expansion (5/6). */
- { 0x0000, 0 }, /* expansion (6/6). */
-};
-
-static int
-skiprr(const u_char *ptr, const u_char *eom, ns_sect section, int count) {
- const u_char *optr = ptr;
-
- for ((void)NULL; count > 0; count--) {
- int b, rdlength;
-
- b = dn_skipname(ptr, eom);
- if (b < 0)
- goto emsgsize;
- ptr += b/*Name*/ + NS_INT16SZ/*Type*/ + NS_INT16SZ/*Class*/;
- if (section != ns_s_qd) {
- if (ptr + NS_INT32SZ > eom)
- goto emsgsize;
- ptr += NS_INT32SZ/*TTL*/;
- if (ptr + NS_INT16SZ > eom)
- goto emsgsize;
- NS_GET16(rdlength, ptr);
- ptr += rdlength/*RData*/;
- }
- }
- if (ptr > eom)
- goto emsgsize;
- return (ptr - optr);
- emsgsize:
- errno = EMSGSIZE;
- return (-1);
-}
-
-int
-ns_initparse(const u_char *msg, int msglen, ns_msg *handle) {
- const u_char *eom = msg + msglen;
- int i;
-
- memset(handle, 0x5e, sizeof *handle);
- handle->_msg = msg;
- handle->_eom = eom;
- if (msg + NS_INT16SZ > eom)
- goto emsgsize;
- NS_GET16(handle->_id, msg);
- if (msg + NS_INT16SZ > eom)
- goto emsgsize;
- NS_GET16(handle->_flags, msg);
- for (i = 0; i < ns_s_max; i++) {
- if (msg + NS_INT16SZ > eom)
- goto emsgsize;
- NS_GET16(handle->_counts[i], msg);
- }
- for (i = 0; i < ns_s_max; i++)
- if (handle->_counts[i] == 0)
- handle->_sections[i] = NULL;
- else {
- int b = skiprr(msg, eom, (ns_sect)i,
- handle->_counts[i]);
-
- if (b < 0)
- return (-1);
- handle->_sections[i] = msg;
- msg += b;
- }
- if (msg != eom)
- goto emsgsize;
- handle->_sect = ns_s_max;
- handle->_rrnum = -1;
- handle->_ptr = NULL;
- return (0);
- emsgsize:
- errno = EMSGSIZE;
- return (-1);
-}
-
-int
-ns_parserr(ns_msg *handle, ns_sect section, int rrnum, ns_rr *rr) {
- int b;
-
- /* Make section right. */
- if (section < 0 || section >= ns_s_max)
- goto enodev;
- if ((int)section != (int)handle->_sect) {
- handle->_sect = section;
- handle->_rrnum = 0;
- handle->_ptr = handle->_sections[(int)section];
- }
-
- /* Make rrnum right. */
- if (rrnum == -1)
- rrnum = handle->_rrnum;
- if (rrnum < 0 || rrnum >= handle->_counts[(int)section])
- goto enodev;
- if (rrnum < handle->_rrnum) {
- handle->_rrnum = 0;
- handle->_ptr = handle->_sections[(int)section];
- }
-
- b = skiprr(handle->_msg, handle->_eom, section,
- rrnum - handle->_rrnum);
- if (b < 0)
- return (-1);
- handle->_ptr += b;
- handle->_rrnum = rrnum;
-
- /* Do the parse. */
- b = dn_expand(handle->_msg, handle->_eom,
- handle->_ptr, rr->name, NS_MAXDNAME);
- if (b < 0)
- return (-1);
- handle->_ptr += b;
- if (handle->_ptr + NS_INT16SZ > handle->_eom)
- goto emsgsize;
- NS_GET16(rr->type, handle->_ptr);
- if (handle->_ptr + NS_INT16SZ > handle->_eom)
- goto emsgsize;
- NS_GET16(rr->class, handle->_ptr);
- if (section == ns_s_qd) {
- rr->ttl = 0;
- rr->rdlength = 0;
- rr->rdata = NULL;
- } else {
- if (handle->_ptr + NS_INT32SZ > handle->_eom)
- goto emsgsize;
- NS_GET32(rr->ttl, handle->_ptr);
- if (handle->_ptr + NS_INT16SZ > handle->_eom)
- goto emsgsize;
- NS_GET16(rr->rdlength, handle->_ptr);
- if (handle->_ptr + rr->rdlength > handle->_eom)
- goto emsgsize;
- rr->rdata = handle->_ptr;
- handle->_ptr += rr->rdlength;
- }
- handle->_rrnum++;
-
- /* All done. */
- return (0);
- enodev:
- errno = ENODEV;
- return (-1);
- emsgsize:
- errno = EMSGSIZE;
- return (-1);
-}
diff --git a/cpukit/libnetworking/libc/ns_print.c b/cpukit/libnetworking/libc/ns_print.c
deleted file mode 100644
index f7d7d16c64..0000000000
--- a/cpukit/libnetworking/libc/ns_print.c
+++ /dev/null
@@ -1,745 +0,0 @@
-/*
- * Copyright (c) 1996, 1998 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if !defined(__rtems__)
-#if !defined(LINT) && !defined(CODECENTER)
-static char rcsid[] = "$Id$";
-#endif /* not lint */
-#endif /* not rtems */
-
-/* Import. */
-
-#include <sys/types.h>
-#include <sys/socket.h>
-
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-#include <arpa/inet.h>
-
-#include <assert.h>
-#include <errno.h>
-#include <resolv.h>
-#include <string.h>
-#include <ctype.h>
-
-#define SPRINTF(x) ((size_t)sprintf x)
-
-/* Forward. */
-
-static size_t prune_origin(const char *name, const char *origin);
-static int charstr(const u_char *rdata, const u_char *edata,
- char **buf, size_t *buflen);
-static int addname(const u_char *msg, size_t msglen,
- const u_char **p, const char *origin,
- char **buf, size_t *buflen);
-static void addlen(size_t len, char **buf, size_t *buflen);
-static int addstr(const char *src, size_t len,
- char **buf, size_t *buflen);
-static int addtab(size_t len, size_t target, int spaced,
- char **buf, size_t *buflen);
-
-/* Macros. */
-
-#define T(x) \
- do { \
- if ((x) < 0) \
- return (-1); \
- } while (0)
-
-/* Public. */
-
-/*
- * int
- * ns_sprintrr(handle, rr, name_ctx, origin, buf, buflen)
- * Convert an RR to presentation format.
- * return:
- * Number of characters written to buf, or -1 (check errno).
- */
-int
-ns_sprintrr(const ns_msg *handle, const ns_rr *rr,
- const char *name_ctx, const char *origin,
- char *buf, size_t buflen)
-{
- int n;
-
- n = ns_sprintrrf(ns_msg_base(*handle), ns_msg_size(*handle),
- ns_rr_name(*rr), ns_rr_class(*rr), ns_rr_type(*rr),
- ns_rr_ttl(*rr), ns_rr_rdata(*rr), ns_rr_rdlen(*rr),
- name_ctx, origin, buf, buflen);
- return (n);
-}
-
-/*
- * int
- * ns_sprintrrf(msg, msglen, name, class, type, ttl, rdata, rdlen,
- * name_ctx, origin, buf, buflen)
- * Convert the fields of an RR into presentation format.
- * return:
- * Number of characters written to buf, or -1 (check errno).
- */
-int
-ns_sprintrrf(const u_char *msg, size_t msglen,
- const char *name, ns_class class, ns_type type,
- u_long ttl, const u_char *rdata, size_t rdlen,
- const char *name_ctx, const char *origin,
- char *buf, size_t buflen)
-{
- const char *obuf = buf;
- const u_char *edata = rdata + rdlen;
- int spaced = 0;
-
- const char *comment;
- char tmp[100];
- int len, x;
-
- /*
- * Owner.
- */
- if (name_ctx != NULL && strcasecmp(name_ctx, name) == 0) {
- T(addstr("\t\t\t", 3, &buf, &buflen));
- } else {
- len = prune_origin(name, origin);
- if (len == 0) {
- T(addstr("@\t\t\t", 4, &buf, &buflen));
- } else {
- T(addstr(name, len, &buf, &buflen));
- /* Origin not used and no trailing dot? */
- if ((!origin || !origin[0] || name[len] == '\0') &&
- name[len - 1] != '.') {
- T(addstr(".", 1, &buf, &buflen));
- len++;
- }
- T(spaced = addtab(len, 24, spaced, &buf, &buflen));
- }
- }
-
- /*
- * TTL, Class, Type.
- */
- T(x = ns_format_ttl(ttl, buf, buflen));
- addlen(x, &buf, &buflen);
- len = SPRINTF((tmp, " %s %s", p_class(class), p_type(type)));
- T(addstr(tmp, len, &buf, &buflen));
- T(spaced = addtab(x + len, 16, spaced, &buf, &buflen));
-
- /*
- * RData.
- */
- switch (type) {
- case ns_t_a:
- if (rdlen != NS_INADDRSZ)
- goto formerr;
- (void) inet_ntop(AF_INET, rdata, buf, buflen);
- addlen(strlen(buf), &buf, &buflen);
- break;
-
- case ns_t_cname:
- case ns_t_mb:
- case ns_t_mg:
- case ns_t_mr:
- case ns_t_ns:
- case ns_t_ptr:
- T(addname(msg, msglen, &rdata, origin, &buf, &buflen));
- break;
-
- case ns_t_hinfo:
- case ns_t_isdn:
- /* First word. */
- T(len = charstr(rdata, edata, &buf, &buflen));
- if (len == 0)
- goto formerr;
- rdata += len;
- T(addstr(" ", 1, &buf, &buflen));
-
- /* Second word. */
- T(len = charstr(rdata, edata, &buf, &buflen));
- if (len == 0)
- goto formerr;
- rdata += len;
- break;
-
- case ns_t_soa: {
- u_long t;
-
- /* Server name. */
- T(addname(msg, msglen, &rdata, origin, &buf, &buflen));
- T(addstr(" ", 1, &buf, &buflen));
-
- /* Administrator name. */
- T(addname(msg, msglen, &rdata, origin, &buf, &buflen));
- T(addstr(" (\n", 3, &buf, &buflen));
- spaced = 0;
-
- if ((edata - rdata) != 5*NS_INT32SZ)
- goto formerr;
-
- /* Serial number. */
- t = ns_get32(rdata); rdata += NS_INT32SZ;
- T(addstr("\t\t\t\t\t", 5, &buf, &buflen));
- len = SPRINTF((tmp, "%lu", t));
- T(addstr(tmp, len, &buf, &buflen));
- T(spaced = addtab(len, 16, spaced, &buf, &buflen));
- T(addstr("; serial\n", 9, &buf, &buflen));
- spaced = 0;
-
- /* Refresh interval. */
- t = ns_get32(rdata); rdata += NS_INT32SZ;
- T(addstr("\t\t\t\t\t", 5, &buf, &buflen));
- T(len = ns_format_ttl(t, buf, buflen));
- addlen(len, &buf, &buflen);
- T(spaced = addtab(len, 16, spaced, &buf, &buflen));
- T(addstr("; refresh\n", 10, &buf, &buflen));
- spaced = 0;
-
- /* Retry interval. */
- t = ns_get32(rdata); rdata += NS_INT32SZ;
- T(addstr("\t\t\t\t\t", 5, &buf, &buflen));
- T(len = ns_format_ttl(t, buf, buflen));
- addlen(len, &buf, &buflen);
- T(spaced = addtab(len, 16, spaced, &buf, &buflen));
- T(addstr("; retry\n", 8, &buf, &buflen));
- spaced = 0;
-
- /* Expiry. */
- t = ns_get32(rdata); rdata += NS_INT32SZ;
- T(addstr("\t\t\t\t\t", 5, &buf, &buflen));
- T(len = ns_format_ttl(t, buf, buflen));
- addlen(len, &buf, &buflen);
- T(spaced = addtab(len, 16, spaced, &buf, &buflen));
- T(addstr("; expiry\n", 9, &buf, &buflen));
- spaced = 0;
-
- /* Minimum TTL. */
- t = ns_get32(rdata); rdata += NS_INT32SZ;
- T(addstr("\t\t\t\t\t", 5, &buf, &buflen));
- T(len = ns_format_ttl(t, buf, buflen));
- addlen(len, &buf, &buflen);
- T(addstr(" )", 2, &buf, &buflen));
- T(spaced = addtab(len, 16, spaced, &buf, &buflen));
- T(addstr("; minimum\n", 10, &buf, &buflen));
-
- break;
- }
-
- case ns_t_mx:
- case ns_t_afsdb:
- case ns_t_rt: {
- u_int t;
-
- if (rdlen < NS_INT16SZ)
- goto formerr;
-
- /* Priority. */
- t = ns_get16(rdata);
- rdata += NS_INT16SZ;
- len = SPRINTF((tmp, "%u ", t));
- T(addstr(tmp, len, &buf, &buflen));
-
- /* Target. */
- T(addname(msg, msglen, &rdata, origin, &buf, &buflen));
-
- break;
- }
-
- case ns_t_px: {
- u_int t;
-
- if (rdlen < NS_INT16SZ)
- goto formerr;
-
- /* Priority. */
- t = ns_get16(rdata);
- rdata += NS_INT16SZ;
- len = SPRINTF((tmp, "%u ", t));
- T(addstr(tmp, len, &buf, &buflen));
-
- /* Name1. */
- T(addname(msg, msglen, &rdata, origin, &buf, &buflen));
- T(addstr(" ", 1, &buf, &buflen));
-
- /* Name2. */
- T(addname(msg, msglen, &rdata, origin, &buf, &buflen));
-
- break;
- }
-
- case ns_t_x25:
- T(len = charstr(rdata, edata, &buf, &buflen));
- if (len == 0)
- goto formerr;
- rdata += len;
- break;
-
- case ns_t_txt:
- while (rdata < edata) {
- T(len = charstr(rdata, edata, &buf, &buflen));
- if (len == 0)
- goto formerr;
- rdata += len;
- if (rdata < edata)
- T(addstr(" ", 1, &buf, &buflen));
- }
- break;
-
- case ns_t_nsap: {
- char t[255*3];
-
- (void) inet_nsap_ntoa(rdlen, rdata, t);
- T(addstr(t, strlen(t), &buf, &buflen));
- break;
- }
-
- case ns_t_aaaa:
- if (rdlen != NS_IN6ADDRSZ)
- goto formerr;
- (void) inet_ntop(AF_INET6, rdata, buf, buflen);
- addlen(strlen(buf), &buf, &buflen);
- break;
-
- case ns_t_loc: {
- char t[255];
-
- /* XXX protocol format checking? */
- (void) loc_ntoa(rdata, t);
- T(addstr(t, strlen(t), &buf, &buflen));
- break;
- }
-
- case ns_t_naptr: {
- u_int order, preference;
- char t[50];
-
- if (rdlen < 2*NS_INT16SZ)
- goto formerr;
-
- /* Order, Precedence. */
- order = ns_get16(rdata); rdata += NS_INT16SZ;
- preference = ns_get16(rdata); rdata += NS_INT16SZ;
- len = SPRINTF((t, "%u %u ", order, preference));
- T(addstr(t, len, &buf, &buflen));
-
- /* Flags. */
- T(len = charstr(rdata, edata, &buf, &buflen));
- if (len == 0)
- goto formerr;
- rdata += len;
- T(addstr(" ", 1, &buf, &buflen));
-
- /* Service. */
- T(len = charstr(rdata, edata, &buf, &buflen));
- if (len == 0)
- goto formerr;
- rdata += len;
- T(addstr(" ", 1, &buf, &buflen));
-
- /* Regexp. */
- T(len = charstr(rdata, edata, &buf, &buflen));
- if (len < 0)
- return (-1);
- if (len == 0)
- goto formerr;
- rdata += len;
- T(addstr(" ", 1, &buf, &buflen));
-
- /* Server. */
- T(addname(msg, msglen, &rdata, origin, &buf, &buflen));
- break;
- }
-
- case ns_t_srv: {
- u_int priority, weight, port;
- char t[50];
-
- if (rdlen < NS_INT16SZ*3)
- goto formerr;
-
- /* Priority, Weight, Port. */
- priority = ns_get16(rdata); rdata += NS_INT16SZ;
- weight = ns_get16(rdata); rdata += NS_INT16SZ;
- port = ns_get16(rdata); rdata += NS_INT16SZ;
- len = SPRINTF((t, "%u %u %u ", priority, weight, port));
- T(addstr(t, len, &buf, &buflen));
-
- /* Server. */
- T(addname(msg, msglen, &rdata, origin, &buf, &buflen));
- break;
- }
-
- case ns_t_minfo:
- case ns_t_rp:
- /* Name1. */
- T(addname(msg, msglen, &rdata, origin, &buf, &buflen));
- T(addstr(" ", 1, &buf, &buflen));
-
- /* Name2. */
- T(addname(msg, msglen, &rdata, origin, &buf, &buflen));
-
- break;
-
- case ns_t_wks: {
- int n, lcnt;
-
- if (rdlen < NS_INT32SZ + 1)
- goto formerr;
-
- /* Address. */
- (void) inet_ntop(AF_INET, rdata, buf, buflen);
- addlen(strlen(buf), &buf, &buflen);
- rdata += NS_INADDRSZ;
-
- /* Protocol. */
- len = SPRINTF((tmp, " %u ( ", *rdata));
- T(addstr(tmp, len, &buf, &buflen));
- rdata += NS_INT8SZ;
-
- /* Bit map. */
- n = 0;
- lcnt = 0;
- while (rdata < edata) {
- u_int c = *rdata++;
- do {
- if (c & 0200) {
- if (lcnt == 0) {
- T(addstr("\n\t\t\t\t", 5,
- &buf, &buflen));
- lcnt = 10;
- spaced = 0;
- }
- len = SPRINTF((tmp, "%d ", n));
- T(addstr(tmp, len, &buf, &buflen));
- lcnt--;
- }
- c <<= 1;
- } while (++n & 07);
- }
- T(addstr(")", 1, &buf, &buflen));
-
- break;
- }
-
- case ns_t_key: {
- char base64_key[NS_MD5RSA_MAX_BASE64];
- u_int keyflags, protocol, algorithm;
- const char *leader;
- int n;
-
- if (rdlen < NS_INT16SZ + NS_INT8SZ + NS_INT8SZ)
- goto formerr;
-
- /* Key flags, Protocol, Algorithm. */
- keyflags = ns_get16(rdata); rdata += NS_INT16SZ;
- protocol = *rdata++;
- algorithm = *rdata++;
- len = SPRINTF((tmp, "0x%04x %u %u",
- keyflags, protocol, algorithm));
- T(addstr(tmp, len, &buf, &buflen));
-
- /* Public key data. */
- len = b64_ntop(rdata, edata - rdata,
- base64_key, sizeof base64_key);
- if (len < 0)
- goto formerr;
- if (len > 15) {
- T(addstr(" (", 2, &buf, &buflen));
- leader = "\n\t\t";
- spaced = 0;
- } else
- leader = " ";
- for (n = 0; n < len; n += 48) {
- T(addstr(leader, strlen(leader), &buf, &buflen));
- T(addstr(base64_key + n, MIN(len - n, 48),
- &buf, &buflen));
- }
- if (len > 15)
- T(addstr(" )", 2, &buf, &buflen));
-
- break;
- }
-
- case ns_t_sig: {
- char base64_key[NS_MD5RSA_MAX_BASE64];
- u_int type, algorithm, labels, footprint;
- const char *leader;
- u_long t;
- int n;
-
- if (rdlen < 22)
- goto formerr;
-
- /* Type covered, Algorithm, Label count, Original TTL. */
- type = ns_get16(rdata); rdata += NS_INT16SZ;
- algorithm = *rdata++;
- labels = *rdata++;
- t = ns_get32(rdata); rdata += NS_INT32SZ;
- len = SPRINTF((tmp, " %s %d %lu ",
- p_type(type), algorithm, t));
- T(addstr(tmp, len, &buf, &buflen));
- if (labels != (u_int)dn_count_labels(name))
- goto formerr;
-
- /* Signature expiry. */
- t = ns_get32(rdata); rdata += NS_INT32SZ;
- len = SPRINTF((tmp, "%s ", p_secstodate(t)));
- T(addstr(tmp, len, &buf, &buflen));
-
- /* Time signed. */
- t = ns_get32(rdata); rdata += NS_INT32SZ;
- len = SPRINTF((tmp, "%s ", p_secstodate(t)));
- T(addstr(tmp, len, &buf, &buflen));
-
- /* Signature Footprint. */
- footprint = ns_get16(rdata); rdata += NS_INT16SZ;
- len = SPRINTF((tmp, "%u ", footprint));
- T(addstr(tmp, len, &buf, &buflen));
-
- /* Signer's name. */
- T(addname(msg, msglen, &rdata, origin, &buf, &buflen));
-
- /* Signature. */
- len = b64_ntop(rdata, edata - rdata,
- base64_key, sizeof base64_key);
- if (len > 15) {
- T(addstr(" (", 2, &buf, &buflen));
- leader = "\n\t\t";
- spaced = 0;
- } else
- leader = " ";
- if (len < 0)
- goto formerr;
- for (n = 0; n < len; n += 48) {
- T(addstr(leader, strlen(leader), &buf, &buflen));
- T(addstr(base64_key + n, MIN(len - n, 48),
- &buf, &buflen));
- }
- if (len > 15)
- T(addstr(" )", 2, &buf, &buflen));
-
- break;
- }
-
- case ns_t_nxt: {
- int n, c;
-
- /* Next domain name. */
- T(addname(msg, msglen, &rdata, origin, &buf, &buflen));
-
- /* Type bit map. */
- n = edata - rdata;
- for (c = 0; c < n*8; c++)
- if (NS_NXT_BIT_ISSET(c, rdata)) {
- len = SPRINTF((tmp, " %s", p_type(c)));
- T(addstr(tmp, len, &buf, &buflen));
- }
- break;
- }
-
- default:
- comment = "unknown RR type";
- goto hexify;
- }
- return (buf - obuf);
- formerr:
- comment = "RR format error";
- hexify: {
- int n, m;
- char *p;
-
- len = SPRINTF((tmp, "\\#(\t\t; %s", comment));
- T(addstr(tmp, len, &buf, &buflen));
- while (rdata < edata) {
- p = tmp;
- p += SPRINTF((p, "\n\t"));
- spaced = 0;
- n = MIN(16, edata - rdata);
- for (m = 0; m < n; m++)
- p += SPRINTF((p, "%02x ", rdata[m]));
- T(addstr(tmp, p - tmp, &buf, &buflen));
- if (n < 16) {
- T(addstr(")", 1, &buf, &buflen));
- T(addtab(p - tmp + 1, 48, spaced, &buf, &buflen));
- }
- p = tmp;
- p += SPRINTF((p, "; "));
- for (m = 0; m < n; m++)
- *p++ = (isascii(rdata[m]) && isprint(rdata[m]))
- ? rdata[m]
- : '.';
- T(addstr(tmp, p - tmp, &buf, &buflen));
- rdata += n;
- }
- return (buf - obuf);
- }
-}
-
-/* Private. */
-
-/*
- * size_t
- * prune_origin(name, origin)
- * Find out if the name is at or under the current origin.
- * return:
- * Number of characters in name before start of origin,
- * or length of name if origin does not match.
- * notes:
- * This function should share code with samedomain().
- */
-static size_t
-prune_origin(const char *name, const char *origin) {
- const char *oname = name;
-
- while (*name != '\0') {
- if (origin != NULL && strcasecmp(name, origin) == 0)
- return (name - oname - (name > oname));
- while (*name != '\0') {
- if (*name == '\\') {
- name++;
- /* XXX need to handle \nnn form. */
- if (*name == '\0')
- break;
- } else if (*name == '.') {
- name++;
- break;
- }
- name++;
- }
- }
- return (name - oname);
-}
-
-/*
- * int
- * charstr(rdata, edata, buf, buflen)
- * Format a <character-string> into the presentation buffer.
- * return:
- * Number of rdata octets consumed
- * 0 for protocol format error
- * -1 for output buffer error
- * side effects:
- * buffer is advanced on success.
- */
-static int
-charstr(const u_char *rdata, const u_char *edata, char **buf, size_t *buflen) {
- const u_char *odata = rdata;
- size_t save_buflen = *buflen;
- char *save_buf = *buf;
-
- if (addstr("\"", 1, buf, buflen) < 0)
- goto enospc;
- if (rdata < edata) {
- int n = *rdata;
-
- if (rdata + 1 + n <= edata) {
- rdata++;
- while (n-- > 0) {
- if (strchr("\n\"\\", *rdata) != NULL)
- if (addstr("\\", 1, buf, buflen) < 0)
- goto enospc;
- if (addstr((const char *)rdata, 1,
- buf, buflen) < 0)
- goto enospc;
- rdata++;
- }
- }
- }
- if (addstr("\"", 1, buf, buflen) < 0)
- goto enospc;
- return (rdata - odata);
- enospc:
- errno = ENOSPC;
- *buf = save_buf;
- *buflen = save_buflen;
- return (-1);
-}
-
-static int
-addname(const u_char *msg, size_t msglen,
- const u_char **pp, const char *origin,
- char **buf, size_t *buflen)
-{
- size_t newlen, save_buflen = *buflen;
- char *save_buf = *buf;
- int n;
-
- n = dn_expand(msg, msg + msglen, *pp, *buf, *buflen);
- if (n < 0)
- goto enospc; /* Guess. */
- newlen = prune_origin(*buf, origin);
- if ((origin == NULL || origin[0] == '\0' || (*buf)[newlen] == '\0') &&
- (newlen == 0 || (*buf)[newlen - 1] != '.')) {
- /* No trailing dot. */
- if (newlen + 2 > *buflen)
- goto enospc; /* No room for ".\0". */
- (*buf)[newlen++] = '.';
- (*buf)[newlen] = '\0';
- }
- if (newlen == 0) {
- /* Use "@" instead of name. */
- if (newlen + 2 > *buflen)
- goto enospc; /* No room for "@\0". */
- (*buf)[newlen++] = '@';
- (*buf)[newlen] = '\0';
- }
- *pp += n;
- addlen(newlen, buf, buflen);
- **buf = '\0';
- return (newlen);
- enospc:
- errno = ENOSPC;
- *buf = save_buf;
- *buflen = save_buflen;
- return (-1);
-}
-
-static void
-addlen(size_t len, char **buf, size_t *buflen) {
- assert(len <= *buflen);
- *buf += len;
- *buflen -= len;
-}
-
-static int
-addstr(const char *src, size_t len, char **buf, size_t *buflen) {
- if (len > *buflen) {
- errno = ENOSPC;
- return (-1);
- }
- memcpy(*buf, src, len);
- addlen(len, buf, buflen);
- **buf = '\0';
- return (0);
-}
-
-static int
-addtab(size_t len, size_t target, int spaced, char **buf, size_t *buflen) {
- size_t save_buflen = *buflen;
- char *save_buf = *buf;
- int t;
-
- if (spaced || len >= target - 1) {
- T(addstr(" ", 2, buf, buflen));
- spaced = 1;
- } else {
- for (t = (target - len - 1) / 8; t >= 0; t--)
- if (addstr("\t", 1, buf, buflen) < 0) {
- *buflen = save_buflen;
- *buf = save_buf;
- return (-1);
- }
- spaced = 0;
- }
- return (spaced);
-}
diff --git a/cpukit/libnetworking/libc/ns_ttl.c b/cpukit/libnetworking/libc/ns_ttl.c
deleted file mode 100644
index 75093c1dbc..0000000000
--- a/cpukit/libnetworking/libc/ns_ttl.c
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if !defined(__rtems__)
-#if !defined(LINT) && !defined(CODECENTER)
-static char rcsid[] = "$Id$";
-#endif /* not lint */
-#endif /* not rtems */
-
-/* Import. */
-
-#include <arpa/nameser.h>
-
-#include <ctype.h>
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-
-#define SPRINTF(x) ((size_t)sprintf x)
-
-/* Forward. */
-
-static int fmt1(int t, char s, char **buf, size_t *buflen);
-
-/* Macros. */
-
-#define T(x) if ((x) < 0) return (-1); else (void)NULL
-
-/* Public. */
-
-int
-ns_format_ttl(u_long src, char *dst, size_t dstlen) {
- char *odst = dst;
- int secs, mins, hours, days, weeks, x;
- char *p;
-
- secs = src % 60; src /= 60;
- mins = src % 60; src /= 60;
- hours = src % 24; src /= 24;
- days = src % 7; src /= 7;
- weeks = src; src = 0;
-
- x = 0;
- if (weeks) {
- T(fmt1(weeks, 'W', &dst, &dstlen));
- x++;
- }
- if (days) {
- T(fmt1(days, 'D', &dst, &dstlen));
- x++;
- }
- if (hours) {
- T(fmt1(hours, 'H', &dst, &dstlen));
- x++;
- }
- if (mins) {
- T(fmt1(mins, 'M', &dst, &dstlen));
- x++;
- }
- if (secs || !(weeks || days || hours || mins)) {
- T(fmt1(secs, 'S', &dst, &dstlen));
- x++;
- }
-
- if (x > 1) {
- int ch;
-
- for (p = odst; (ch = *p) != '\0'; p++)
- if (isascii(ch) && isupper(ch))
- *p = tolower(ch);
- }
-
- return (dst - odst);
-}
-
-int
-ns_parse_ttl(const char *src, u_long *dst) {
- u_long ttl, tmp;
- int ch, digits, dirty;
-
- ttl = 0;
- tmp = 0;
- digits = 0;
- dirty = 0;
- while ((ch = *src++) != '\0') {
- if (!isascii(ch) || !isprint(ch))
- goto einval;
- if (isdigit(ch)) {
- tmp *= 10;
- tmp += (ch - '0');
- digits++;
- continue;
- }
- if (digits == 0)
- goto einval;
- if (islower(ch))
- ch = toupper(ch);
- switch (ch) {
- case 'W': tmp *= 7;
- case 'D': tmp *= 24;
- case 'H': tmp *= 60;
- case 'M': tmp *= 60;
- case 'S': break;
- default: goto einval;
- }
- ttl += tmp;
- tmp = 0;
- digits = 0;
- dirty = 1;
- }
- if (digits > 0) {
- if (dirty)
- goto einval;
- else
- ttl += tmp;
- }
- *dst = ttl;
- return (0);
-
- einval:
- errno = EINVAL;
- return (-1);
-}
-
-/* Private. */
-
-static int
-fmt1(int t, char s, char **buf, size_t *buflen) {
- char tmp[50];
- size_t len;
-
- len = SPRINTF((tmp, "%d%c", t, s));
- if (len + 1 > *buflen)
- return (-1);
- strcpy(*buf, tmp);
- *buf += len;
- *buflen -= len;
- return (0);
-}
diff --git a/cpukit/libnetworking/libc/nsap_addr.c b/cpukit/libnetworking/libc/nsap_addr.c
deleted file mode 100644
index a7af57a266..0000000000
--- a/cpukit/libnetworking/libc/nsap_addr.c
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright (c) 1996, 1998 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-#include <ctype.h>
-#include <resolv.h>
-
-static char
-xtob(c)
- register int c;
-{
- return (c - (((c >= '0') && (c <= '9')) ? '0' : '7'));
-}
-
-u_int
-inet_nsap_addr(ascii, binary, maxlen)
- const char *ascii;
- u_char *binary;
- int maxlen;
-{
- u_char c, nib;
- u_int len = 0;
-
- while ((c = *ascii++) != '\0' && len < (u_int)maxlen) {
- if (c == '.' || c == '+' || c == '/')
- continue;
- if (!isascii(c))
- return (0);
- if (islower(c))
- c = toupper(c);
- if (isxdigit(c)) {
- nib = xtob(c);
- c = *ascii++;
- if (c != '\0') {
- c = toupper(c);
- if (isxdigit(c)) {
- *binary++ = (nib << 4) | xtob(c);
- len++;
- } else
- return (0);
- }
- else
- return (0);
- }
- else
- return (0);
- }
- return (len);
-}
-
-char *
-inet_nsap_ntoa(binlen, binary, ascii)
- int binlen;
- register const u_char *binary;
- register char *ascii;
-{
- register int nib;
- int i;
- static char tmpbuf[255*3];
- char *start;
-
- if (ascii)
- start = ascii;
- else {
- ascii = tmpbuf;
- start = tmpbuf;
- }
-
- if (binlen > 255)
- binlen = 255;
-
- for (i = 0; i < binlen; i++) {
- nib = *binary >> 4;
- *ascii++ = nib + (nib < 10 ? '0' : '7');
- nib = *binary++ & 0x0f;
- *ascii++ = nib + (nib < 10 ? '0' : '7');
- if (((i % 2) == 0 && (i + 1) < binlen))
- *ascii++ = '.';
- }
- *ascii = '\0';
- return (start);
-}
diff --git a/cpukit/libnetworking/libc/rcmd.3 b/cpukit/libnetworking/libc/rcmd.3
deleted file mode 100644
index e25057fa4e..0000000000
--- a/cpukit/libnetworking/libc/rcmd.3
+++ /dev/null
@@ -1,204 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" From: @(#)rcmd.3 8.1 (Berkeley) 6/4/93
-.\" $Id$
-.\"
-.Dd February 15, 1996
-.Dt RCMD 3
-.Os BSD 4.2
-.Sh NAME
-.Nm rcmd ,
-.Nm rresvport ,
-.Nm iruserok ,
-.Nm ruserok
-.Nd routines for returning a stream to a remote command
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft int
-.Fn rcmd "char **ahost" "int inport" "const char *locuser" "const char *remuser" "const char *cmd" "int *fd2p"
-.Ft int
-.Fn rresvport "int *port"
-.Ft int
-.Fn iruserok "u_long raddr" "int superuser" "const char *ruser" "const char *luser"
-.Ft int
-.Fn ruserok "const char *rhost" "int superuser" "const char *ruser" "const char *luser"
-.Sh DESCRIPTION
-The
-.Fn rcmd
-function
-is used by the super-user to execute a command on
-a remote machine using an authentication scheme based
-on reserved port numbers.
-The
-.Fn rresvport
-function
-returns a descriptor to a socket
-with an address in the privileged port space.
-The
-.Fn ruserok
-function
-is used by servers
-to authenticate clients requesting service with
-.Fn rcmd .
-All three functions are present in the same file and are used
-by the
-.Xr rshd 8
-server (among others).
-.Pp
-The
-.Fn rcmd
-function
-looks up the host
-.Fa *ahost
-using
-.Xr gethostbyname 3 ,
-returning \-1 if the host does not exist.
-Otherwise
-.Fa *ahost
-is set to the standard name of the host
-and a connection is established to a server
-residing at the well-known Internet port
-.Fa inport .
-.Pp
-If the connection succeeds,
-a socket in the Internet domain of type
-.Dv SOCK_STREAM
-is returned to the caller, and given to the remote
-command as
-.Em stdin
-and
-.Em stdout .
-If
-.Fa fd2p
-is non-zero, then an auxiliary channel to a control
-process will be set up, and a descriptor for it will be placed
-in
-.Fa *fd2p .
-The control process will return diagnostic
-output from the command (unit 2) on this channel, and will also
-accept bytes on this channel as being
-.Tn UNIX
-signal numbers, to be
-forwarded to the process group of the command.
-If
-.Fa fd2p
-is 0, then the
-.Em stderr
-(unit 2 of the remote
-command) will be made the same as the
-.Em stdout
-and no
-provision is made for sending arbitrary signals to the remote process,
-although you may be able to get its attention by using out-of-band data.
-.Pp
-The protocol is described in detail in
-.Xr rshd 8 .
-.Pp
-The
-.Fn rresvport
-function is used to obtain a socket with a privileged
-address bound to it. This socket is suitable for use
-by
-.Fn rcmd
-and several other functions. Privileged Internet ports are those
-in the range 0 to 1023. Only the super-user
-is allowed to bind an address of this sort to a socket.
-.Pp
-The
-.Fn iruserok
-and
-.Fn ruserok
-functions take a remote host's IP address or name, as returned by the
-.Xr gethostbyname 3
-routines, two user names and a flag indicating whether the local user's
-name is that of the super-user.
-Then, if the user is
-.Em NOT
-the super-user, it checks the
-.Pa /etc/hosts.equiv
-file.
-If that lookup is not done, or is unsuccessful, the
-.Pa .rhosts
-in the local user's home directory is checked to see if the request for
-service is allowed.
-.Pp
-If this file does not exist, is not a regular file, is owned by anyone
-other than the user or the super-user, or is writable by anyone other
-than the owner, the check automatically fails.
-Zero is returned if the machine name is listed in the
-.Dq Pa hosts.equiv
-file, or the host and remote user name are found in the
-.Dq Pa .rhosts
-file; otherwise
-.Fn iruserok
-and
-.Fn ruserok
-return \-1.
-If the local domain (as obtained from
-.Xr gethostname 3 )
-is the same as the remote domain, only the machine name need be specified.
-.Pp
-The
-.Fn iruserok
-function is strongly preferred for security reasons.
-It requires trusting the local DNS at most, while the
-.Fn ruserok
-function requires trusting the entire DNS, which can be spoofed.
-.Sh DIAGNOSTICS
-The
-.Fn rcmd
-function
-returns a valid socket descriptor on success.
-It returns \-1 on error and prints a diagnostic message on the standard error.
-.Pp
-The
-.Fn rresvport
-function
-returns a valid, bound socket descriptor on success.
-It returns \-1 on error with the global value
-.Va errno
-set according to the reason for failure.
-The error code
-.Dv EAGAIN
-is overloaded to mean ``All network ports in use.''
-.Sh SEE ALSO
-.Xr rlogin 1 ,
-.Xr rsh 1 ,
-.Xr intro 2 ,
-.Xr rexec 3 ,
-.Xr rexecd 8 ,
-.Xr rlogind 8 ,
-.Xr rshd 8
-.Sh HISTORY
-These
-functions appeared in
-.Bx 4.2 .
diff --git a/cpukit/libnetworking/libc/rcmd.c b/cpukit/libnetworking/libc/rcmd.c
deleted file mode 100644
index 32e4953e9b..0000000000
--- a/cpukit/libnetworking/libc/rcmd.c
+++ /dev/null
@@ -1,520 +0,0 @@
-/*
- * Copyright (c) 1983, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)rcmd.c 8.3 (Berkeley) 3/26/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-#include <signal.h>
-#include <fcntl.h>
-#include <netdb.h>
-#include <unistd.h>
-#include <pwd.h>
-#include <errno.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <string.h>
-#ifdef YP
-#include <rpc/rpc.h>
-#include <rpcsvc/yp_prot.h>
-#include <rpcsvc/ypclnt.h>
-#endif
-
-extern int innetgr __P(( const char *, const char *, const char *, const char * ));
-
-#define max(a, b) ((a > b) ? a : b)
-
-int __ivaliduser __P((FILE *, u_long, const char *, const char *));
-static int __icheckhost __P((u_long, char *));
-
-int
-rcmd(ahost, rport, locuser, remuser, cmd, fd2p)
- char **ahost;
- u_short rport;
- const char *locuser, *remuser, *cmd;
- int *fd2p;
-{
- struct hostent *hp;
- struct sockaddr_in sin, from;
- fd_set reads;
- long oldmask;
- pid_t pid;
- int s, lport, timo;
- char c;
-
- pid = getpid();
- hp = gethostbyname(*ahost);
- if (hp == NULL) {
- herror(*ahost);
- return (-1);
- }
- *ahost = hp->h_name;
- oldmask = sigblock(sigmask(SIGURG));
- for (timo = 1, lport = IPPORT_RESERVED - 1;;) {
- s = rresvport(&lport);
- if (s < 0) {
- if (errno == EAGAIN)
- (void)fprintf(stderr,
- "rcmd: socket: All ports in use\n");
- else
- (void)fprintf(stderr, "rcmd: socket: %s\n",
- strerror(errno));
- sigsetmask(oldmask);
- return (-1);
- }
- fcntl(s, F_SETOWN, pid);
- bzero(&sin, sizeof sin);
- sin.sin_len = sizeof(struct sockaddr_in);
- sin.sin_family = hp->h_addrtype;
- sin.sin_port = rport;
- bcopy(hp->h_addr_list[0], &sin.sin_addr, MIN(hp->h_length, sizeof sin.sin_addr));
- if (connect(s, (struct sockaddr *)&sin, sizeof(sin)) >= 0)
- break;
- (void)close(s);
- if (errno == EADDRINUSE) {
- lport--;
- continue;
- }
- if (errno == ECONNREFUSED && timo <= 16) {
- (void)sleep(timo);
- timo *= 2;
- continue;
- }
- if (hp->h_addr_list[1] != NULL) {
- int oerrno = errno;
-
- (void)fprintf(stderr, "connect to address %s: ",
- inet_ntoa(sin.sin_addr));
- errno = oerrno;
- perror(0);
- hp->h_addr_list++;
- bcopy(hp->h_addr_list[0], &sin.sin_addr, MIN(hp->h_length, sizeof sin.sin_addr));
- (void)fprintf(stderr, "Trying %s...\n",
- inet_ntoa(sin.sin_addr));
- continue;
- }
- (void)fprintf(stderr, "%s: %s\n", hp->h_name, strerror(errno));
- sigsetmask(oldmask);
- return (-1);
- }
- lport--;
- if (fd2p == 0) {
- write(s, "", 1);
- lport = 0;
- } else {
- char num[8];
- int s2 = rresvport(&lport), s3;
- int len = sizeof(from);
- int nfds;
-
- if (s2 < 0)
- goto bad;
- listen(s2, 1);
- (void)snprintf(num, sizeof(num), "%d", lport);
- if (write(s, num, strlen(num)+1) != strlen(num)+1) {
- (void)fprintf(stderr,
- "rcmd: write (setting up stderr): %s\n",
- strerror(errno));
- (void)close(s2);
- goto bad;
- }
- nfds = max(s, s2)+1;
- if(nfds > FD_SETSIZE) {
- fprintf(stderr, "rcmd: too many files\n");
- (void)close(s2);
- goto bad;
- }
-again:
- FD_ZERO(&reads);
- FD_SET(s, &reads);
- FD_SET(s2, &reads);
- errno = 0;
- if (select(nfds, &reads, 0, 0, 0) < 1 || !FD_ISSET(s2, &reads)){
- if (errno != 0)
- (void)fprintf(stderr,
- "rcmd: select (setting up stderr): %s\n",
- strerror(errno));
- else
- (void)fprintf(stderr,
- "select: protocol failure in circuit setup\n");
- (void)close(s2);
- goto bad;
- }
- s3 = accept(s2, (struct sockaddr *)&from, &len);
- /*
- * XXX careful for ftp bounce attacks. If discovered, shut them
- * down and check for the real auxiliary channel to connect.
- */
- if (from.sin_family == AF_INET && from.sin_port == htons(20)) {
- close(s3);
- goto again;
- }
- (void)close(s2);
- if (s3 < 0) {
- (void)fprintf(stderr,
- "rcmd: accept: %s\n", strerror(errno));
- lport = 0;
- goto bad;
- }
- *fd2p = s3;
- from.sin_port = ntohs((u_short)from.sin_port);
- if (from.sin_family != AF_INET ||
- from.sin_port >= IPPORT_RESERVED ||
- from.sin_port < IPPORT_RESERVED / 2) {
- (void)fprintf(stderr,
- "socket: protocol failure in circuit setup.\n");
- goto bad2;
- }
- }
- (void)write(s, locuser, strlen(locuser)+1);
- (void)write(s, remuser, strlen(remuser)+1);
- (void)write(s, cmd, strlen(cmd)+1);
- if (read(s, &c, 1) != 1) {
- (void)fprintf(stderr,
- "rcmd: %s: %s\n", *ahost, strerror(errno));
- goto bad2;
- }
- if (c != 0) {
- while (read(s, &c, 1) == 1) {
- (void)write(STDERR_FILENO, &c, 1);
- if (c == '\n')
- break;
- }
- goto bad2;
- }
- sigsetmask(oldmask);
- return (s);
-bad2:
- if (lport)
- (void)close(*fd2p);
-bad:
- (void)close(s);
- sigsetmask(oldmask);
- return (-1);
-}
-
-int
-rresvport(alport)
- int *alport;
-{
- struct sockaddr_in sin;
- int s;
-
- bzero(&sin, sizeof sin);
- sin.sin_len = sizeof(struct sockaddr_in);
- sin.sin_family = AF_INET;
- sin.sin_addr.s_addr = INADDR_ANY;
- s = socket(AF_INET, SOCK_STREAM, 0);
- if (s < 0)
- return (-1);
-#if 0 /* compat_exact_traditional_rresvport_semantics */
- sin.sin_port = htons((u_short)*alport);
- if (bind(s, (struct sockaddr *)&sin, sizeof(sin)) >= 0)
- return (s);
- if (errno != EADDRINUSE) {
- (void)close(s);
- return (-1);
- }
-#endif
- sin.sin_port = 0;
- if (bindresvport(s, &sin) == -1) {
- (void)close(s);
- return (-1);
- }
- *alport = (int)ntohs(sin.sin_port);
- return (s);
-}
-
-int __check_rhosts_file = 1;
-char *__rcmd_errstr;
-
-int
-ruserok(rhost, superuser, ruser, luser)
- const char *rhost, *ruser, *luser;
- int superuser;
-{
- struct hostent *hp;
- u_long addr;
- char **ap;
-
- if ((hp = gethostbyname(rhost)) == NULL)
- return (-1);
- for (ap = hp->h_addr_list; *ap; ++ap) {
- bcopy(*ap, &addr, sizeof(addr));
- if (iruserok(addr, superuser, ruser, luser) == 0)
- return (0);
- }
- return (-1);
-}
-
-/*
- * New .rhosts strategy: We are passed an ip address. We spin through
- * hosts.equiv and .rhosts looking for a match. When the .rhosts only
- * has ip addresses, we don't have to trust a nameserver. When it
- * contains hostnames, we spin through the list of addresses the nameserver
- * gives us and look for a match.
- *
- * Returns 0 if ok, -1 if not ok.
- */
-int
-iruserok(raddr, superuser, ruser, luser)
- u_long raddr;
- int superuser;
- const char *ruser, *luser;
-{
- register char *cp;
- struct stat sbuf;
- struct passwd *pwd;
- FILE *hostf;
- uid_t uid;
- int first;
- char pbuf[MAXPATHLEN];
-
- first = 1;
- hostf = superuser ? NULL : fopen(_PATH_HEQUIV, "r");
-again:
- if (hostf) {
- if (__ivaliduser(hostf, raddr, luser, ruser) == 0) {
- (void)fclose(hostf);
- return (0);
- }
- (void)fclose(hostf);
- }
- if (first == 1 && (__check_rhosts_file || superuser)) {
- first = 0;
- if ((pwd = getpwnam(luser)) == NULL)
- return (-1);
- (void)strcpy(pbuf, pwd->pw_dir);
- (void)strcat(pbuf, "/.rhosts");
-
- /*
- * Change effective uid while opening .rhosts. If root and
- * reading an NFS mounted file system, can't read files that
- * are protected read/write owner only.
- */
- uid = geteuid();
- (void)seteuid(pwd->pw_uid);
- hostf = fopen(pbuf, "r");
- (void)seteuid(uid);
-
- if (hostf == NULL)
- return (-1);
- /*
- * If not a regular file, or is owned by someone other than
- * user or root or if writeable by anyone but the owner, quit.
- */
- cp = NULL;
- if (lstat(pbuf, &sbuf) < 0)
- cp = ".rhosts lstat failed";
- else if (!S_ISREG(sbuf.st_mode))
- cp = ".rhosts not regular file";
- else if (fstat(fileno(hostf), &sbuf) < 0)
- cp = ".rhosts fstat failed";
- else if (sbuf.st_uid && sbuf.st_uid != pwd->pw_uid)
- cp = "bad .rhosts owner";
- else if (sbuf.st_mode & (S_IWGRP|S_IWOTH))
- cp = ".rhosts writeable by other than owner";
- /* If there were any problems, quit. */
- if (cp) {
- __rcmd_errstr = cp;
- (void)fclose(hostf);
- return (-1);
- }
- goto again;
- }
- return (-1);
-}
-
-/*
- * XXX
- * Don't make static, used by lpd(8).
- *
- * Returns 0 if ok, -1 if not ok.
- */
-int
-__ivaliduser(hostf, raddr, luser, ruser)
- FILE *hostf;
- u_long raddr;
- const char *luser, *ruser;
-{
- register char *user, *p;
- int ch;
- char buf[MAXHOSTNAMELEN + 128]; /* host + login */
- char hname[MAXHOSTNAMELEN];
- struct hostent *hp;
- /* Presumed guilty until proven innocent. */
- int userok = 0, hostok = 0;
-#ifdef YP
- char *ypdomain;
-
- if (yp_get_default_domain(&ypdomain))
- ypdomain = NULL;
-#else
-#define ypdomain NULL
-#endif
- /* We need to get the damn hostname back for netgroup matching. */
- if ((hp = gethostbyaddr((char *)&raddr, sizeof(u_long),
- AF_INET)) == NULL)
- return (-1);
- strncpy(hname, hp->h_name, sizeof(hname));
- hname[sizeof(hname) - 1] = '\0';
-
- while (fgets(buf, sizeof(buf), hostf)) {
- p = buf;
- /* Skip lines that are too long. */
- if (strchr(p, '\n') == NULL) {
- while ((ch = getc(hostf)) != '\n' && ch != EOF);
- continue;
- }
- if (*p == '\n' || *p == '#') {
- /* comment... */
- continue;
- }
- while (*p != '\n' && *p != ' ' && *p != '\t' && *p != '\0') {
- *p = isupper(*p) ? tolower(*p) : *p;
- p++;
- }
- if (*p == ' ' || *p == '\t') {
- *p++ = '\0';
- while (*p == ' ' || *p == '\t')
- p++;
- user = p;
- while (*p != '\n' && *p != ' ' &&
- *p != '\t' && *p != '\0')
- p++;
- } else
- user = p;
- *p = '\0';
- /*
- * Do +/- and +@/-@ checking. This looks really nasty,
- * but it matches SunOS's behavior so far as I can tell.
- */
- switch(buf[0]) {
- case '+':
- if (!buf[1]) { /* '+' matches all hosts */
- hostok = 1;
- break;
- }
- if (buf[1] == '@') /* match a host by netgroup */
- hostok = innetgr((char *)&buf[2],
- (char *)&hname, NULL, ypdomain);
- else /* match a host by addr */
- hostok = __icheckhost(raddr,(char *)&buf[1]);
- break;
- case '-': /* reject '-' hosts and all their users */
- if (buf[1] == '@') {
- if (innetgr((char *)&buf[2],
- (char *)&hname, NULL, ypdomain))
- return(-1);
- } else {
- if (__icheckhost(raddr,(char *)&buf[1]))
- return(-1);
- }
- break;
- default: /* if no '+' or '-', do a simple match */
- hostok = __icheckhost(raddr, buf);
- break;
- }
- switch(*user) {
- case '+':
- if (!*(user+1)) { /* '+' matches all users */
- userok = 1;
- break;
- }
- if (*(user+1) == '@') /* match a user by netgroup */
- userok = innetgr(user+2, NULL, ruser, ypdomain);
- else /* match a user by direct specification */
- userok = !(strcmp(ruser, user+1));
- break;
- case '-': /* if we matched a hostname, */
- if (hostok) { /* check for user field rejections */
- if (!*(user+1))
- return(-1);
- if (*(user+1) == '@') {
- if (innetgr(user+2, NULL,
- ruser, ypdomain))
- return(-1);
- } else {
- if (!strcmp(ruser, user+1))
- return(-1);
- }
- }
- break;
- default: /* no rejections: try to match the user */
- if (hostok)
- userok = !(strcmp(ruser,*user ? user : luser));
- break;
- }
- if (hostok && userok)
- return(0);
- }
- return (-1);
-}
-
-/*
- * Returns "true" if match, 0 if no match.
- */
-static int
-__icheckhost(raddr, lhost)
- u_long raddr;
- register char *lhost;
-{
- register struct hostent *hp;
- register u_long laddr;
- register char **pp;
-
- /* Try for raw ip address first. */
- if (isdigit(*lhost) && (long)(laddr = inet_addr(lhost)) != -1)
- return (raddr == laddr);
-
- /* Better be a hostname. */
- if ((hp = gethostbyname(lhost)) == NULL)
- return (0);
-
- /* Spin through ip addresses. */
- for (pp = hp->h_addr_list; *pp; ++pp)
- if (!bcmp(&raddr, *pp, sizeof(u_long)))
- return (1);
-
- /* No match. */
- return (0);
-}
diff --git a/cpukit/libnetworking/libc/recv.c b/cpukit/libnetworking/libc/recv.c
deleted file mode 100644
index a842244caf..0000000000
--- a/cpukit/libnetworking/libc/recv.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)recv.c 8.2 (Berkeley) 2/21/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/socket.h>
-
-#include <stddef.h>
-
-ssize_t
-recv(s, buf, len, flags)
- int s, flags;
- size_t len;
- void *buf;
-{
- return (recvfrom(s, buf, len, flags, NULL, 0));
-}
diff --git a/cpukit/libnetworking/libc/res_comp.c b/cpukit/libnetworking/libc/res_comp.c
deleted file mode 100644
index 93043276f2..0000000000
--- a/cpukit/libnetworking/libc/res_comp.c
+++ /dev/null
@@ -1,258 +0,0 @@
-/*
- * Copyright (c) 1985, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-/*
- * Portions Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)res_comp.c 8.1 (Berkeley) 6/4/93";
-static char orig_rcsid[] = "From: Id: res_comp.c,v 8.11 1997/05/21 19:31:04 halley Exp $";
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-#include <ctype.h>
-#include <resolv.h>
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-
-#define BIND_4_COMPAT
-
-/*
- * Expand compressed domain name 'comp_dn' to full domain name.
- * 'msg' is a pointer to the begining of the message,
- * 'eomorig' points to the first location after the message,
- * 'exp_dn' is a pointer to a buffer of size 'length' for the result.
- * Return size of compressed name or -1 if there was an error.
- */
-int
-dn_expand(const u_char *msg, const u_char *eom, const u_char *src,
- char *dst, int dstsiz)
-{
- int n = ns_name_uncompress(msg, eom, src, dst, (size_t)dstsiz);
-
- if (n > 0 && dst[0] == '.')
- dst[0] = '\0';
- return (n);
-}
-
-/*
- * Pack domain name 'exp_dn' in presentation form into 'comp_dn'.
- * Return the size of the compressed name or -1.
- * 'length' is the size of the array pointed to by 'comp_dn'.
- */
-int
-dn_comp(const char *src, u_char *dst, int dstsiz,
- u_char **dnptrs, u_char **lastdnptr)
-{
- return (ns_name_compress(src, dst, (size_t)dstsiz,
- (const u_char **)dnptrs,
- (const u_char **)lastdnptr));
-}
-
-/*
- * Skip over a compressed domain name. Return the size or -1.
- */
-int
-dn_skipname(const u_char *ptr, const u_char *eom) {
- const u_char *saveptr = ptr;
-
- if (ns_name_skip(&ptr, eom) == -1)
- return (-1);
- return (ptr - saveptr);
-}
-
-/*
- * Verify that a domain name uses an acceptable character set.
- */
-
-/*
- * Note the conspicuous absence of ctype macros in these definitions. On
- * non-ASCII hosts, we can't depend on string literals or ctype macros to
- * tell us anything about network-format data. The rest of the BIND system
- * is not careful about this, but for some reason, we're doing it right here.
- */
-#define PERIOD 0x2e
-#define hyphenchar(c) ((c) == 0x2d)
-#define bslashchar(c) ((c) == 0x5c)
-#define periodchar(c) ((c) == PERIOD)
-#define asterchar(c) ((c) == 0x2a)
-#define alphachar(c) (((c) >= 0x41 && (c) <= 0x5a) \
- || ((c) >= 0x61 && (c) <= 0x7a))
-#define digitchar(c) ((c) >= 0x30 && (c) <= 0x39)
-
-#define borderchar(c) (alphachar(c) || digitchar(c))
-#define middlechar(c) (borderchar(c) || hyphenchar(c))
-#define domainchar(c) ((c) > 0x20 && (c) < 0x7f)
-
-int
-res_hnok(dn)
- const char *dn;
-{
- int ppch = '\0', pch = PERIOD, ch = *dn++;
-
- while (ch != '\0') {
- int nch = *dn++;
-
- if (periodchar(ch)) {
- (void)NULL;
- } else if (periodchar(pch)) {
- if (!borderchar(ch))
- return (0);
- } else if (periodchar(nch) || nch == '\0') {
- if (!borderchar(ch))
- return (0);
- } else {
- if (!middlechar(ch))
- return (0);
- }
- ppch = pch, pch = ch, ch = nch;
- }
- return (1);
-}
-
-/*
- * hostname-like (A, MX, WKS) owners can have "*" as their first label
- * but must otherwise be as a host name.
- */
-int
-res_ownok(dn)
- const char *dn;
-{
- if (asterchar(dn[0])) {
- if (periodchar(dn[1]))
- return (res_hnok(dn+2));
- if (dn[1] == '\0')
- return (1);
- }
- return (res_hnok(dn));
-}
-
-/*
- * SOA RNAMEs and RP RNAMEs can have any printable character in their first
- * label, but the rest of the name has to look like a host name.
- */
-int
-res_mailok(dn)
- const char *dn;
-{
- int ch, escaped = 0;
-
- /* "." is a valid missing representation */
- if (*dn == '\0')
- return (1);
-
- /* otherwise <label>.<hostname> */
- while ((ch = *dn++) != '\0') {
- if (!domainchar(ch))
- return (0);
- if (!escaped && periodchar(ch))
- break;
- if (escaped)
- escaped = 0;
- else if (bslashchar(ch))
- escaped = 1;
- }
- if (periodchar(ch))
- return (res_hnok(dn));
- return (0);
-}
-
-/*
- * This function is quite liberal, since RFC 1034's character sets are only
- * recommendations.
- */
-int
-res_dnok(dn)
- const char *dn;
-{
- int ch;
-
- while ((ch = *dn++) != '\0')
- if (!domainchar(ch))
- return (0);
- return (1);
-}
-
-#ifdef BIND_4_COMPAT
-/*
- * This module must export the following externally-visible symbols:
- * ___putlong
- * ___putshort
- * __getlong
- * __getshort
- * Note that one _ comes from C and the others come from us.
- */
-void __putlong(u_int32_t src, u_char *dst) { ns_put32(src, dst); }
-void __putshort(u_int16_t src, u_char *dst) { ns_put16(src, dst); }
-u_int32_t _getlong(const u_char *src) { return (ns_get32(src)); }
-u_int16_t _getshort(const u_char *src) { return (ns_get16(src)); }
-#endif /*BIND_4_COMPAT*/
diff --git a/cpukit/libnetworking/libc/res_config.h b/cpukit/libnetworking/libc/res_config.h
deleted file mode 100644
index fbd1d694f7..0000000000
--- a/cpukit/libnetworking/libc/res_config.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * $Id$
- */
-
-#define DEBUG 1 /* enable debugging code (needed for dig) */
-#define RESOLVSORT /* allow sorting of addresses in gethostbyname */
-#define RFC1535 /* comply with RFC1535 (STRONGLY reccomended by vixie)*/
-#undef USELOOPBACK /* res_init() bind to localhost */
-#undef SUNSECURITY /* verify gethostbyaddr() calls - WE DONT NEED IT */
-#define MULTI_PTRS_ARE_ALIASES 1 /* fold multiple PTR records into aliases */
-#define CHECK_SRVR_ADDR 1 /* confirm that the server requested sent the reply */
-#define BIND_UPDATE 1 /* update support */
-
-#if defined(__rtems__)
-u_int16_t _getshort(const u_char *src);
-u_int32_t _getlong(const u_char *src);
-int gethostname (char *name, size_t namelen);
-int sethostname (char *name, size_t namelen);
-int issetugid (void);
-#endif
diff --git a/cpukit/libnetworking/libc/res_data.c b/cpukit/libnetworking/libc/res_data.c
deleted file mode 100644
index fb7d2c66eb..0000000000
--- a/cpukit/libnetworking/libc/res_data.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 1995,1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <sys/time.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-#include <ctype.h>
-#include <resolv.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include "res_config.h"
-
-const char *_res_opcodes[] = {
- "QUERY",
- "IQUERY",
- "CQUERYM",
- "CQUERYU", /* experimental */
- "NOTIFY", /* experimental */
- "UPDATE",
- "6",
- "7",
- "8",
- "9",
- "10",
- "11",
- "12",
- "13",
- "ZONEINIT",
- "ZONEREF",
-};
-
-const char *_res_resultcodes[] = {
- "NOERROR",
- "FORMERR",
- "SERVFAIL",
- "NXDOMAIN",
- "NOTIMP",
- "REFUSED",
- "YXDOMAIN",
- "YXRRSET",
- "NXRRSET",
- "NOTAUTH",
- "ZONEERR",
- "11",
- "12",
- "13",
- "14",
- "NOCHANGE",
-};
-
-#ifdef BIND_UPDATE
-const char *_res_sectioncodes[] = {
- "ZONE",
- "PREREQUISITES",
- "UPDATE",
- "ADDITIONAL",
-};
-#endif
diff --git a/cpukit/libnetworking/libc/res_debug.c b/cpukit/libnetworking/libc/res_debug.c
deleted file mode 100644
index b747b6e6d2..0000000000
--- a/cpukit/libnetworking/libc/res_debug.c
+++ /dev/null
@@ -1,966 +0,0 @@
-/*
- * Copyright (c) 1985
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-/*
- * Portions Copyright (c) 1995 by International Business Machines, Inc.
- *
- * International Business Machines, Inc. (hereinafter called IBM) grants
- * permission under its copyrights to use, copy, modify, and distribute this
- * Software with or without fee, provided that the above copyright notice and
- * all paragraphs of this notice appear in all copies, and that the name of IBM
- * not be used in connection with the marketing of any product incorporating
- * the Software or modifications thereof, without specific, written prior
- * permission.
- *
- * To the extent it has a right to do so, IBM grants an immunity from suit
- * under its patents, if any, for the use, sale or manufacture of products to
- * the extent that such products are used for performing Domain Name System
- * dynamic updates in TCP/IP networks by means of the Software. No immunity is
- * granted for any product per se or for any other function of any product.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- * PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL,
- * DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING
- * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN
- * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES.
- */
-
-/*
- * Portions Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)res_debug.c 8.1 (Berkeley) 6/4/93";
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/socket.h>
-
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-
-#include <ctype.h>
-#include <errno.h>
-#include <math.h>
-#include <netdb.h>
-#include <resolv.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#define SPRINTF(x) sprintf x
-
-extern const char *_res_opcodes[];
-extern const char *_res_resultcodes[];
-extern const char *_res_sectioncodes[];
-
-/*
- * Print the current options.
- */
-void
-fp_resstat(struct __res_state *statp, FILE *file) {
- u_long mask;
-
- fprintf(file, ";; res options:");
- if (!statp)
- statp = &_res;
- for (mask = 1; mask != 0; mask <<= 1)
- if (statp->options & mask)
- fprintf(file, " %s", p_option(mask));
- putc('\n', file);
-}
-
-static void
-do_section(ns_msg *handle, ns_sect section, int pflag, FILE *file) {
- int n, sflag, rrnum;
- char buf[2048]; /* XXX need to malloc */
- ns_opcode opcode;
- ns_rr rr;
-
- /*
- * Print answer records.
- */
- sflag = (_res.pfcode & pflag);
- if (_res.pfcode && !sflag)
- return;
-
- opcode = ns_msg_getflag(*handle, ns_f_opcode);
- rrnum = 0;
- for (;;) {
- if (ns_parserr(handle, section, rrnum, &rr)) {
- if (errno != ENODEV)
- fprintf(file, ";; ns_parserr: %s\n",
- strerror(errno));
- else if (rrnum > 0 && sflag != 0 &&
- (_res.pfcode & RES_PRF_HEAD1))
- putc('\n', file);
- return;
- }
- if (rrnum == 0 && sflag != 0 && (_res.pfcode & RES_PRF_HEAD1))
- fprintf(file, ";; %s SECTION:\n",
- p_section(section, opcode));
- if (section == ns_s_qd)
- fprintf(file, ";;\t%s, type = %s, class = %s\n",
- ns_rr_name(rr),
- p_type(ns_rr_type(rr)),
- p_class(ns_rr_class(rr)));
- else {
- n = ns_sprintrr(handle, &rr, NULL, NULL,
- buf, sizeof buf);
- if (n < 0) {
- fprintf(file, ";; ns_sprintrr: %s\n",
- strerror(errno));
- return;
- }
- fputs(buf, file);
- fputc('\n', file);
- }
- rrnum++;
- }
-}
-
-void
-p_query(const u_char *msg) {
- fp_query(msg, stdout);
-}
-
-void
-fp_query(const u_char *msg, FILE *file) {
- fp_nquery(msg, PACKETSZ, file);
-}
-
-/*
- * Print the contents of a query.
- * This is intended to be primarily a debugging routine.
- */
-void
-fp_nquery(const u_char *msg, int len, FILE *file) {
- ns_msg handle;
- int qdcount, ancount, nscount, arcount;
- u_int opcode, rcode, id;
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1)
- return;
-
- if (ns_initparse(msg, len, &handle) < 0) {
- fprintf(file, ";; ns_initparse: %s\n", strerror(errno));
- return;
- }
- opcode = ns_msg_getflag(handle, ns_f_opcode);
- rcode = ns_msg_getflag(handle, ns_f_rcode);
- id = ns_msg_id(handle);
- qdcount = ns_msg_count(handle, ns_s_qd);
- ancount = ns_msg_count(handle, ns_s_an);
- nscount = ns_msg_count(handle, ns_s_ns);
- arcount = ns_msg_count(handle, ns_s_ar);
-
- /*
- * Print header fields.
- */
- if ((!_res.pfcode) || (_res.pfcode & RES_PRF_HEADX) || rcode)
- fprintf(file,
- ";; ->>HEADER<<- opcode: %s, status: %s, id: %d\n",
- _res_opcodes[opcode], _res_resultcodes[rcode], id);
- if ((!_res.pfcode) || (_res.pfcode & RES_PRF_HEADX))
- putc(';', file);
- if ((!_res.pfcode) || (_res.pfcode & RES_PRF_HEAD2)) {
- fprintf(file, "; flags:");
- if (ns_msg_getflag(handle, ns_f_qr))
- fprintf(file, " qr");
- if (ns_msg_getflag(handle, ns_f_aa))
- fprintf(file, " aa");
- if (ns_msg_getflag(handle, ns_f_tc))
- fprintf(file, " tc");
- if (ns_msg_getflag(handle, ns_f_rd))
- fprintf(file, " rd");
- if (ns_msg_getflag(handle, ns_f_ra))
- fprintf(file, " ra");
- if (ns_msg_getflag(handle, ns_f_z))
- fprintf(file, " ??");
- if (ns_msg_getflag(handle, ns_f_ad))
- fprintf(file, " ad");
- if (ns_msg_getflag(handle, ns_f_cd))
- fprintf(file, " cd");
- }
- if ((!_res.pfcode) || (_res.pfcode & RES_PRF_HEAD1)) {
- fprintf(file, "; %s: %d",
- p_section(ns_s_qd, opcode), qdcount);
- fprintf(file, ", %s: %d",
- p_section(ns_s_an, opcode), ancount);
- fprintf(file, ", %s: %d",
- p_section(ns_s_ns, opcode), nscount);
- fprintf(file, ", %s: %d",
- p_section(ns_s_ar, opcode), arcount);
- }
- if ((!_res.pfcode) || (_res.pfcode &
- (RES_PRF_HEADX | RES_PRF_HEAD2 | RES_PRF_HEAD1))) {
- putc('\n',file);
- }
- /*
- * Print the various sections.
- */
- do_section(&handle, ns_s_qd, RES_PRF_QUES, file);
- do_section(&handle, ns_s_an, RES_PRF_ANS, file);
- do_section(&handle, ns_s_ns, RES_PRF_AUTH, file);
- do_section(&handle, ns_s_ar, RES_PRF_ADD, file);
- if (qdcount == 0 && ancount == 0 &&
- nscount == 0 && arcount == 0)
- putc('\n', file);
-}
-
-const u_char *
-p_cdnname(const u_char *cp, const u_char *msg, int len, FILE *file) {
- char name[MAXDNAME];
- int n;
-
- if ((n = dn_expand(msg, msg + len, cp, name, sizeof name)) < 0)
- return (NULL);
- if (name[0] == '\0')
- putc('.', file);
- else
- fputs(name, file);
- return (cp + n);
-}
-
-const u_char *
-p_cdname(const u_char *cp, const u_char *msg, FILE *file) {
- return (p_cdnname(cp, msg, PACKETSZ, file));
-}
-
-/* Return a fully-qualified domain name from a compressed name (with
- length supplied). */
-
-const u_char *
-p_fqnname(cp, msg, msglen, name, namelen)
- const u_char *cp, *msg;
- int msglen;
- char *name;
- int namelen;
-{
- int n, newlen;
-
- if ((n = dn_expand(msg, cp + msglen, cp, name, namelen)) < 0)
- return (NULL);
- newlen = strlen(name);
- if (newlen == 0 || name[newlen - 1] != '.') {
- if (newlen + 1 >= namelen) /* Lack space for final dot */
- return (NULL);
- else
- strcpy(name + newlen, ".");
- }
- return (cp + n);
-}
-
-/* XXX: the rest of these functions need to become length-limited, too. */
-
-const u_char *
-p_fqname(const u_char *cp, const u_char *msg, FILE *file) {
- char name[MAXDNAME];
- const u_char *n;
-
- n = p_fqnname(cp, msg, MAXCDNAME, name, sizeof name);
- if (n == NULL)
- return (NULL);
- fputs(name, file);
- return (n);
-}
-
-/*
- * Names of RR classes and qclasses. Classes and qclasses are the same, except
- * that C_ANY is a qclass but not a class. (You can ask for records of class
- * C_ANY, but you can't have any records of that class in the database.)
- */
-const struct res_sym __p_class_syms[] = {
- {C_IN, "IN"},
- {C_CHAOS, "CHAOS"},
- {C_HS, "HS"},
- {C_HS, "HESIOD"},
- {C_ANY, "ANY"},
- {C_NONE, "NONE"},
- {C_IN, (char *)0}
-};
-
-/*
- * Names of message sections.
- */
-const struct res_sym __p_default_section_syms[] = {
- {ns_s_qd, "QUERY"},
- {ns_s_an, "ANSWER"},
- {ns_s_ns, "AUTHORITY"},
- {ns_s_ar, "ADDITIONAL"},
- {0, (char *)0}
-};
-
-const struct res_sym __p_update_section_syms[] = {
- {S_ZONE, "ZONE"},
- {S_PREREQ, "PREREQUISITE"},
- {S_UPDATE, "UPDATE"},
- {S_ADDT, "ADDITIONAL"},
- {0, (char *)0}
-};
-
-/*
- * Names of RR types and qtypes. Types and qtypes are the same, except
- * that T_ANY is a qtype but not a type. (You can ask for records of type
- * T_ANY, but you can't have any records of that type in the database.)
- */
-const struct res_sym __p_type_syms[] = {
- {T_A, "A", "address"},
- {T_NS, "NS", "name server"},
- {T_MD, "MD", "mail destination (deprecated)"},
- {T_MF, "MF", "mail forwarder (deprecated)"},
- {T_CNAME, "CNAME", "canonical name"},
- {T_SOA, "SOA", "start of authority"},
- {T_MB, "MB", "mailbox"},
- {T_MG, "MG", "mail group member"},
- {T_MR, "MR", "mail rename"},
- {T_NULL, "NULL", "null"},
- {T_WKS, "WKS", "well-known service (deprecated)"},
- {T_PTR, "PTR", "domain name pointer"},
- {T_HINFO, "HINFO", "host information"},
- {T_MINFO, "MINFO", "mailbox information"},
- {T_MX, "MX", "mail exchanger"},
- {T_TXT, "TXT", "text"},
- {T_RP, "RP", "responsible person"},
- {T_AFSDB, "AFSDB", "DCE or AFS server"},
- {T_X25, "X25", "X25 address"},
- {T_ISDN, "ISDN", "ISDN address"},
- {T_RT, "RT", "router"},
- {T_NSAP, "NSAP", "nsap address"},
- {T_NSAP_PTR, "NSAP_PTR", "domain name pointer"},
- {T_SIG, "SIG", "signature"},
- {T_KEY, "KEY", "key"},
- {T_PX, "PX", "mapping information"},
- {T_GPOS, "GPOS", "geographical position (withdrawn)"},
- {T_AAAA, "AAAA", "IPv6 address"},
- {T_LOC, "LOC", "location"},
- {T_NXT, "NXT", "next valid name (unimplemented)"},
- {T_EID, "EID", "endpoint identifier (unimplemented)"},
- {T_NIMLOC, "NIMLOC", "NIMROD locator (unimplemented)"},
- {T_SRV, "SRV", "server selection"},
- {T_ATMA, "ATMA", "ATM address (unimplemented)"},
- {T_IXFR, "IXFR", "incremental zone transfer"},
- {T_AXFR, "AXFR", "zone transfer"},
- {T_MAILB, "MAILB", "mailbox-related data (deprecated)"},
- {T_MAILA, "MAILA", "mail agent (deprecated)"},
- {T_NAPTR, "NAPTR", "URN Naming Authority"},
- {T_ANY, "ANY", "\"any\""},
- {0, NULL, NULL}
-};
-
-int
-sym_ston(const struct res_sym *syms, const char *name, int *success) {
- for ((void)NULL; syms->name != 0; syms++) {
- if (strcasecmp (name, syms->name) == 0) {
- if (success)
- *success = 1;
- return (syms->number);
- }
- }
- if (success)
- *success = 0;
- return (syms->number); /* The default value. */
-}
-
-const char *
-sym_ntos(const struct res_sym *syms, int number, int *success) {
- static char unname[20];
-
- for ((void)NULL; syms->name != 0; syms++) {
- if (number == syms->number) {
- if (success)
- *success = 1;
- return (syms->name);
- }
- }
-
- sprintf(unname, "%d", number);
- if (success)
- *success = 0;
- return (unname);
-}
-
-const char *
-sym_ntop(const struct res_sym *syms, int number, int *success) {
- static char unname[20];
-
- for ((void)NULL; syms->name != 0; syms++) {
- if (number == syms->number) {
- if (success)
- *success = 1;
- return (syms->humanname);
- }
- }
- sprintf(unname, "%d", number);
- if (success)
- *success = 0;
- return (unname);
-}
-
-/*
- * Return a string for the type.
- */
-const char *
-p_type(int type) {
- return (sym_ntos(__p_type_syms, type, (int *)0));
-}
-
-/*
- * Return a string for the type.
- */
-const char *
-p_section(int section, int opcode) {
- const struct res_sym *symbols;
-
- switch (opcode) {
- case ns_o_update:
- symbols = __p_update_section_syms;
- break;
- default:
- symbols = __p_default_section_syms;
- break;
- }
- return (sym_ntos(symbols, section, (int *)0));
-}
-
-/*
- * Return a mnemonic for class.
- */
-const char *
-p_class(int class) {
- return (sym_ntos(__p_class_syms, class, (int *)0));
-}
-
-/*
- * Return a mnemonic for an option
- */
-const char *
-p_option(u_long option) {
- static char nbuf[40];
-
- switch (option) {
- case RES_INIT: return "init";
- case RES_DEBUG: return "debug";
- case RES_AAONLY: return "aaonly(unimpl)";
- case RES_USEVC: return "usevc";
- case RES_PRIMARY: return "primry(unimpl)";
- case RES_IGNTC: return "igntc";
- case RES_RECURSE: return "recurs";
- case RES_DEFNAMES: return "defnam";
- case RES_STAYOPEN: return "styopn";
- case RES_DNSRCH: return "dnsrch";
- case RES_INSECURE1: return "insecure1";
- case RES_INSECURE2: return "insecure2";
- default: sprintf(nbuf, "?0x%lx?", (u_long)option);
- return (nbuf);
- }
-}
-
-/*
- * Return a mnemonic for a time to live.
- */
-const char *
-p_time(u_int32_t value) {
- static char nbuf[40];
-
- if (ns_format_ttl(value, nbuf, sizeof nbuf) < 0)
- sprintf(nbuf, "%u", value);
- return (nbuf);
-}
-
-
-/*
- * routines to convert between on-the-wire RR format and zone file format.
- * Does not contain conversion to/from decimal degrees; divide or multiply
- * by 60*60*1000 for that.
- */
-
-static unsigned int poweroften[10] = {1, 10, 100, 1000, 10000, 100000,
- 1000000,10000000,100000000,1000000000};
-
-/* takes an XeY precision/size value, returns a string representation. */
-static const char *
-precsize_ntoa(prec)
- u_int8_t prec;
-{
- static char retbuf[sizeof "90000000.00"];
- unsigned long val;
- int mantissa, exponent;
-
- mantissa = (int)((prec >> 4) & 0x0f) % 10;
- exponent = (int)((prec >> 0) & 0x0f) % 10;
-
- val = mantissa * poweroften[exponent];
-
- (void) sprintf(retbuf, "%ld.%.2ld", val/100, val%100);
- return (retbuf);
-}
-
-/* converts ascii size/precision X * 10**Y(cm) to 0xXY. moves pointer. */
-static u_int8_t
-precsize_aton(strptr)
- char **strptr;
-{
- unsigned int mval = 0, cmval = 0;
- u_int8_t retval = 0;
- char *cp;
- int exponent;
- int mantissa;
-
- cp = *strptr;
-
- while (isdigit((int)*cp))
- mval = mval * 10 + (*cp++ - '0');
-
- if (*cp == '.') { /* centimeters */
- cp++;
- if (isdigit((int)*cp)) {
- cmval = (*cp++ - '0') * 10;
- if (isdigit((int)*cp)) {
- cmval += (*cp++ - '0');
- }
- }
- }
- cmval = (mval * 100) + cmval;
-
- for (exponent = 0; exponent < 9; exponent++)
- if (cmval < poweroften[exponent+1])
- break;
-
- mantissa = cmval / poweroften[exponent];
- if (mantissa > 9)
- mantissa = 9;
-
- retval = (mantissa << 4) | exponent;
-
- *strptr = cp;
-
- return (retval);
-}
-
-/* converts ascii lat/lon to unsigned encoded 32-bit number. moves pointer. */
-static u_int32_t
-latlon2ul(latlonstrptr,which)
- char **latlonstrptr;
- int *which;
-{
- char *cp;
- u_int32_t retval;
- int deg = 0, min = 0, secs = 0, secsfrac = 0;
-
- cp = *latlonstrptr;
-
- while (isdigit((int)*cp))
- deg = deg * 10 + (*cp++ - '0');
-
- while (isspace((int)*cp))
- cp++;
-
- if (!(isdigit((int)*cp)))
- goto fndhemi;
-
- while (isdigit((int)*cp))
- min = min * 10 + (*cp++ - '0');
-
- while (isspace((int)*cp))
- cp++;
-
- if (!(isdigit((int)*cp)))
- goto fndhemi;
-
- while (isdigit((int)*cp))
- secs = secs * 10 + (*cp++ - '0');
-
- if (*cp == '.') { /* decimal seconds */
- cp++;
- if (isdigit((int)*cp)) {
- secsfrac = (*cp++ - '0') * 100;
- if (isdigit((int)*cp)) {
- secsfrac += (*cp++ - '0') * 10;
- if (isdigit((int)*cp)) {
- secsfrac += (*cp++ - '0');
- }
- }
- }
- }
-
- while (!isspace((int)*cp)) /* if any trailing garbage */
- cp++;
-
- while (isspace((int)*cp))
- cp++;
-
- fndhemi:
- switch (*cp) {
- case 'N': case 'n':
- case 'E': case 'e':
- retval = ((unsigned)1<<31)
- + (((((deg * 60) + min) * 60) + secs) * 1000)
- + secsfrac;
- break;
- case 'S': case 's':
- case 'W': case 'w':
- retval = ((unsigned)1<<31)
- - (((((deg * 60) + min) * 60) + secs) * 1000)
- - secsfrac;
- break;
- default:
- retval = 0; /* invalid value -- indicates error */
- break;
- }
-
- switch (*cp) {
- case 'N': case 'n':
- case 'S': case 's':
- *which = 1; /* latitude */
- break;
- case 'E': case 'e':
- case 'W': case 'w':
- *which = 2; /* longitude */
- break;
- default:
- *which = 0; /* error */
- break;
- }
-
- cp++; /* skip the hemisphere */
-
- while (!isspace((int)*cp)) /* if any trailing garbage */
- cp++;
-
- while (isspace((int)*cp)) /* move to next field */
- cp++;
-
- *latlonstrptr = cp;
-
- return (retval);
-}
-
-/* converts a zone file representation in a string to an RDATA on-the-wire
- * representation. */
-int
-loc_aton(ascii, binary)
- const char *ascii;
- u_char *binary;
-{
- const char *cp, *maxcp;
- u_char *bcp;
-
- u_int32_t latit = 0, longit = 0, alt = 0;
- u_int32_t lltemp1 = 0, lltemp2 = 0;
- int altmeters = 0, altfrac = 0, altsign = 1;
- u_int8_t hp = 0x16; /* default = 1e6 cm = 10000.00m = 10km */
- u_int8_t vp = 0x13; /* default = 1e3 cm = 10.00m */
- u_int8_t siz = 0x12; /* default = 1e2 cm = 1.00m */
- int which1 = 0, which2 = 0;
-
- cp = ascii;
- maxcp = cp + strlen(ascii);
-
- lltemp1 = latlon2ul(&cp, &which1);
-
- lltemp2 = latlon2ul(&cp, &which2);
-
- switch (which1 + which2) {
- case 3: /* 1 + 2, the only valid combination */
- if ((which1 == 1) && (which2 == 2)) { /* normal case */
- latit = lltemp1;
- longit = lltemp2;
- } else if ((which1 == 2) && (which2 == 1)) { /* reversed */
- longit = lltemp1;
- latit = lltemp2;
- } else { /* some kind of brokenness */
- return (0);
- }
- break;
- default: /* we didn't get one of each */
- return (0);
- }
-
- /* altitude */
- if (*cp == '-') {
- altsign = -1;
- cp++;
- }
-
- if (*cp == '+')
- cp++;
-
- while (isdigit((int)*cp))
- altmeters = altmeters * 10 + (*cp++ - '0');
-
- if (*cp == '.') { /* decimal meters */
- cp++;
- if (isdigit((int)*cp)) {
- altfrac = (*cp++ - '0') * 10;
- if (isdigit((int)*cp)) {
- altfrac += (*cp++ - '0');
- }
- }
- }
-
- alt = (10000000 + (altsign * (altmeters * 100 + altfrac)));
-
- while (!isspace((int)*cp) && (cp < maxcp)) /* if trailing garbage or m */
- cp++;
-
- while (isspace((int)*cp) && (cp < maxcp))
- cp++;
-
- if (cp >= maxcp)
- goto defaults;
-
- siz = precsize_aton(&cp);
-
- while (!isspace((int)*cp) && (cp < maxcp)) /* if trailing garbage or m */
- cp++;
-
- while (isspace((int)*cp) && (cp < maxcp))
- cp++;
-
- if (cp >= maxcp)
- goto defaults;
-
- hp = precsize_aton(&cp);
-
- while (!isspace((int)*cp) && (cp < maxcp)) /* if trailing garbage or m */
- cp++;
-
- while (isspace((int)*cp) && (cp < maxcp))
- cp++;
-
- if (cp >= maxcp)
- goto defaults;
-
- vp = precsize_aton(&cp);
-
- defaults:
-
- bcp = binary;
- *bcp++ = (u_int8_t) 0; /* version byte */
- *bcp++ = siz;
- *bcp++ = hp;
- *bcp++ = vp;
- PUTLONG(latit,bcp);
- PUTLONG(longit,bcp);
- PUTLONG(alt,bcp);
-
- return (16); /* size of RR in octets */
-}
-
-/* takes an on-the-wire LOC RR and formats it in a human readable format. */
-const char *
-loc_ntoa(binary, ascii)
- const u_char *binary;
- char *ascii;
-{
- static char *error = "?";
- const u_char *cp = binary;
-
- int latdeg, latmin, latsec, latsecfrac;
- int longdeg, longmin, longsec, longsecfrac;
- char northsouth, eastwest;
- int altmeters, altfrac, altsign;
-
- const u_int32_t referencealt = 100000 * 100;
-
- int32_t latval, longval, altval;
- u_int32_t templ;
- u_int8_t sizeval, hpval, vpval, versionval;
-
- char *sizestr, *hpstr, *vpstr;
-
- versionval = *cp++;
-
- if (versionval) {
- (void) sprintf(ascii, "; error: unknown LOC RR version");
- return (ascii);
- }
-
- sizeval = *cp++;
-
- hpval = *cp++;
- vpval = *cp++;
-
- GETLONG(templ, cp);
- latval = (templ - ((unsigned)1<<31));
-
- GETLONG(templ, cp);
- longval = (templ - ((unsigned)1<<31));
-
- GETLONG(templ, cp);
- if (templ < referencealt) { /* below WGS 84 spheroid */
- altval = referencealt - templ;
- altsign = -1;
- } else {
- altval = templ - referencealt;
- altsign = 1;
- }
-
- if (latval < 0) {
- northsouth = 'S';
- latval = -latval;
- } else
- northsouth = 'N';
-
- latsecfrac = latval % 1000;
- latval = latval / 1000;
- latsec = latval % 60;
- latval = latval / 60;
- latmin = latval % 60;
- latval = latval / 60;
- latdeg = latval;
-
- if (longval < 0) {
- eastwest = 'W';
- longval = -longval;
- } else
- eastwest = 'E';
-
- longsecfrac = longval % 1000;
- longval = longval / 1000;
- longsec = longval % 60;
- longval = longval / 60;
- longmin = longval % 60;
- longval = longval / 60;
- longdeg = longval;
-
- altfrac = altval % 100;
- altmeters = (altval / 100) * altsign;
-
- if ((sizestr = strdup(precsize_ntoa(sizeval))) == NULL)
- sizestr = error;
- if ((hpstr = strdup(precsize_ntoa(hpval))) == NULL)
- hpstr = error;
- if ((vpstr = strdup(precsize_ntoa(vpval))) == NULL)
- vpstr = error;
-
- sprintf(ascii,
- "%d %.2d %.2d.%.3d %c %d %.2d %.2d.%.3d %c %d.%.2dm %sm %sm %sm",
- latdeg, latmin, latsec, latsecfrac, northsouth,
- longdeg, longmin, longsec, longsecfrac, eastwest,
- altmeters, altfrac, sizestr, hpstr, vpstr);
-
- if (sizestr != error)
- free(sizestr);
- if (hpstr != error)
- free(hpstr);
- if (vpstr != error)
- free(vpstr);
-
- return (ascii);
-}
-
-
-/* Return the number of DNS hierarchy levels in the name. */
-int
-dn_count_labels(const char *name) {
- int i, len, count;
-
- len = strlen(name);
- for (i = 0, count = 0; i < len; i++) {
- /* XXX need to check for \. or use named's nlabels(). */
- if (name[i] == '.')
- count++;
- }
-
- /* don't count initial wildcard */
- if (name[0] == '*')
- if (count)
- count--;
-
- /* don't count the null label for root. */
- /* if terminating '.' not found, must adjust */
- /* count to include last label */
- if (len > 0 && name[len-1] != '.')
- count++;
- return (count);
-}
-
-
-/*
- * Make dates expressed in seconds-since-Jan-1-1970 easy to read.
- * SIG records are required to be printed like this, by the Secure DNS RFC.
- */
-char *
-p_secstodate (u_long secs) {
- static char output[15]; /* YYYYMMDDHHMMSS and null */
- time_t clock = secs;
- struct tm *time;
-
- time = gmtime(&clock);
- time->tm_year += 1900;
- time->tm_mon += 1;
- sprintf(output, "%04d%02d%02d%02d%02d%02d",
- time->tm_year, time->tm_mon, time->tm_mday,
- time->tm_hour, time->tm_min, time->tm_sec);
- return (output);
-}
diff --git a/cpukit/libnetworking/libc/res_init.c b/cpukit/libnetworking/libc/res_init.c
deleted file mode 100644
index 9371e9fa82..0000000000
--- a/cpukit/libnetworking/libc/res_init.c
+++ /dev/null
@@ -1,497 +0,0 @@
-/*
- * Copyright (c) 1985, 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-/*
- * Portions Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)res_init.c 8.1 (Berkeley) 6/7/93";
-static char orig_rcsid[] = "From: Id: res_init.c,v 8.7 1996/11/18 09:10:04 vixie Exp $";
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <sys/time.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-#include <ctype.h>
-#include <resolv.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include "res_config.h"
-
-static void res_setoptions __P((char *, char *));
-
-#ifdef RESOLVSORT
-static const char sort_mask[] = "/&";
-#define ISSORTMASK(ch) (strchr(sort_mask, ch) != NULL)
-static u_int32_t net_mask __P((struct in_addr));
-#endif
-
-#if !defined(isascii) /* XXX - could be a function */
-# define isascii(c) (!(c & 0200))
-#endif
-
-/*
- * Resolver state default settings.
- */
-
-struct __res_state _res
-# if defined(__BIND_RES_TEXT)
- = { RES_TIMEOUT, } /* Motorola, et al. */
-# endif
- ;
-
-
-/*
- * Set up default settings. If the configuration file exist, the values
- * there will have precedence. Otherwise, the server address is set to
- * INADDR_ANY and the default domain name comes from the gethostname().
- *
- * An interrim version of this code (BIND 4.9, pre-4.4BSD) used 127.0.0.1
- * rather than INADDR_ANY ("0.0.0.0") as the default name server address
- * since it was noted that INADDR_ANY actually meant ``the first interface
- * you "ifconfig"'d at boot time'' and if this was a SLIP or PPP interface,
- * it had to be "up" in order for you to reach your own name server. It
- * was later decided that since the recommended practice is to always
- * install local static routes through 127.0.0.1 for all your network
- * interfaces, that we could solve this problem without a code change.
- *
- * The configuration file should always be used, since it is the only way
- * to specify a default domain. If you are running a server on your local
- * machine, you should say "nameserver 0.0.0.0" or "nameserver 127.0.0.1"
- * in the configuration file.
- *
- * Return 0 if completes successfully, -1 on error
- */
-int
-res_init()
-{
- register FILE *fp;
- register char *cp, **pp;
- register int n;
- char buf[MAXDNAME];
- int nserv = 0; /* number of nameserver records read from file */
- int haveenv = 0;
- int havesearch = 0;
-#ifdef RESOLVSORT
- int nsort = 0;
- char *net;
-#endif
-#ifndef RFC1535
- int dots;
-#endif
-
- /*
- * These three fields used to be statically initialized. This made
- * it hard to use this code in a shared library. It is necessary,
- * now that we're doing dynamic initialization here, that we preserve
- * the old semantics: if an application modifies one of these three
- * fields of _res before res_init() is called, res_init() will not
- * alter them. Of course, if an application is setting them to
- * _zero_ before calling res_init(), hoping to override what used
- * to be the static default, we can't detect it and unexpected results
- * will follow. Zero for any of these fields would make no sense,
- * so one can safely assume that the applications were already getting
- * unexpected results.
- *
- * _res.options is tricky since some apps were known to diddle the bits
- * before res_init() was first called. We can't replicate that semantic
- * with dynamic initialization (they may have turned bits off that are
- * set in RES_DEFAULT). Our solution is to declare such applications
- * "broken". They could fool us by setting RES_INIT but none do (yet).
- */
- if (!_res.retrans)
- _res.retrans = RES_TIMEOUT;
- if (!_res.retry)
- _res.retry = 4;
- if (!(_res.options & RES_INIT))
- _res.options = RES_DEFAULT;
-
- /*
- * This one used to initialize implicitly to zero, so unless the app
- * has set it to something in particular, we can randomize it now.
- */
- if (!_res.id)
- _res.id = res_randomid();
-
-#ifdef USELOOPBACK
- _res.nsaddr.sin_addr = inet_makeaddr(IN_LOOPBACKNET, 1);
-#else
- _res.nsaddr.sin_addr.s_addr = INADDR_ANY;
-#endif
- _res.nsaddr.sin_family = AF_INET;
- _res.nsaddr.sin_port = htons(NAMESERVER_PORT);
- _res.nscount = 1;
- _res.ndots = 1;
- _res.pfcode = 0;
-
- /*
- * RTEMS -- Set up name servers
- */
- {
-#include <rtems/rtems_bsdnet_internal.h>
- int n = 0;
- while ((n < rtems_bsdnet_nameserver_count) && (nserv < MAXNS)) {
- _res.nsaddr_list[nserv].sin_addr = rtems_bsdnet_nameserver[n];
- _res.nsaddr_list[nserv].sin_family = AF_INET;
- _res.nsaddr_list[nserv].sin_port = htons(NAMESERVER_PORT);
- nserv++;
- n++;
- }
- if (rtems_bsdnet_domain_name)
- (void)strncpy(_res.defdname, rtems_bsdnet_domain_name, sizeof(_res.defdname) - 1);
- }
-
- /* Allow user to override the local domain definition */
- if ((cp = getenv("LOCALDOMAIN")) != NULL) {
- (void)strncpy(_res.defdname, cp, sizeof(_res.defdname) - 1);
- haveenv++;
-
- /*
- * Set search list to be blank-separated strings
- * from rest of env value. Permits users of LOCALDOMAIN
- * to still have a search list, and anyone to set the
- * one that they want to use as an individual (even more
- * important now that the rfc1535 stuff restricts searches)
- */
- cp = _res.defdname;
- pp = _res.dnsrch;
- *pp++ = cp;
- for (n = 0; *cp && pp < _res.dnsrch + MAXDNSRCH; cp++) {
- if (*cp == '\n') /* silly backwards compat */
- break;
- else if (*cp == ' ' || *cp == '\t') {
- *cp = 0;
- n = 1;
- } else if (n) {
- *pp++ = cp;
- n = 0;
- havesearch = 1;
- }
- }
- /* null terminate last domain if there are excess */
- while (*cp != '\0' && *cp != ' ' && *cp != '\t' && *cp != '\n')
- cp++;
- *cp = '\0';
- *pp++ = 0;
- }
-
-#define MATCH(line, name) \
- (!strncmp(line, name, sizeof(name) - 1) && \
- (line[sizeof(name) - 1] == ' ' || \
- line[sizeof(name) - 1] == '\t'))
-
- if ((fp = fopen(_PATH_RESCONF, "r")) != NULL) {
- /* read the config file */
- while (fgets(buf, sizeof(buf), fp) != NULL) {
- /* skip comments */
- if (*buf == ';' || *buf == '#')
- continue;
- /* read default domain name */
- if (MATCH(buf, "domain")) {
- if (haveenv) /* skip if have from environ */
- continue;
- cp = buf + sizeof("domain") - 1;
- while (*cp == ' ' || *cp == '\t')
- cp++;
- if ((*cp == '\0') || (*cp == '\n'))
- continue;
- strncpy(_res.defdname, cp, sizeof(_res.defdname) - 1);
- if ((cp = strpbrk(_res.defdname, " \t\n")) != NULL)
- *cp = '\0';
- havesearch = 0;
- continue;
- }
- /* set search list */
- if (MATCH(buf, "search")) {
- if (haveenv) /* skip if have from environ */
- continue;
- cp = buf + sizeof("search") - 1;
- while (*cp == ' ' || *cp == '\t')
- cp++;
- if ((*cp == '\0') || (*cp == '\n'))
- continue;
- strncpy(_res.defdname, cp, sizeof(_res.defdname) - 1);
- if ((cp = strchr(_res.defdname, '\n')) != NULL)
- *cp = '\0';
- /*
- * Set search list to be blank-separated strings
- * on rest of line.
- */
- cp = _res.defdname;
- pp = _res.dnsrch;
- *pp++ = cp;
- for (n = 0; *cp && pp < _res.dnsrch + MAXDNSRCH; cp++) {
- if (*cp == ' ' || *cp == '\t') {
- *cp = 0;
- n = 1;
- } else if (n) {
- *pp++ = cp;
- n = 0;
- }
- }
- /* null terminate last domain if there are excess */
- while (*cp != '\0' && *cp != ' ' && *cp != '\t')
- cp++;
- *cp = '\0';
- *pp++ = 0;
- havesearch = 1;
- continue;
- }
- /* read nameservers to query */
- if (MATCH(buf, "nameserver") && nserv < MAXNS) {
- struct in_addr a;
-
- cp = buf + sizeof("nameserver") - 1;
- while (*cp == ' ' || *cp == '\t')
- cp++;
- if ((*cp != '\0') && (*cp != '\n') && inet_aton(cp, &a)) {
- _res.nsaddr_list[nserv].sin_addr = a;
- _res.nsaddr_list[nserv].sin_family = AF_INET;
- _res.nsaddr_list[nserv].sin_port =
- htons(NAMESERVER_PORT);
- nserv++;
- }
- continue;
- }
-#ifdef RESOLVSORT
- if (MATCH(buf, "sortlist")) {
- struct in_addr a;
-
- cp = buf + sizeof("sortlist") - 1;
- while (nsort < MAXRESOLVSORT) {
- while (*cp == ' ' || *cp == '\t')
- cp++;
- if (*cp == '\0' || *cp == '\n' || *cp == ';')
- break;
- net = cp;
- while (*cp && !ISSORTMASK(*cp) && *cp != ';' &&
- isascii((int)*cp) && !isspace((int)*cp))
- cp++;
- n = *cp;
- *cp = 0;
- if (inet_aton(net, &a)) {
- _res.sort_list[nsort].addr = a;
- if (ISSORTMASK(n)) {
- *cp++ = n;
- net = cp;
- while (*cp && *cp != ';' &&
- isascii((int)*cp) && !isspace((int)*cp))
- cp++;
- n = *cp;
- *cp = 0;
- if (inet_aton(net, &a)) {
- _res.sort_list[nsort].mask = a.s_addr;
- } else {
- _res.sort_list[nsort].mask =
- net_mask(_res.sort_list[nsort].addr);
- }
- } else {
- _res.sort_list[nsort].mask =
- net_mask(_res.sort_list[nsort].addr);
- }
- nsort++;
- }
- *cp = n;
- }
- continue;
- }
-#endif
- if (MATCH(buf, "options")) {
- res_setoptions(buf + sizeof("options") - 1, "conf");
- continue;
- }
- }
- if (nserv > 1)
- _res.nscount = nserv;
-#ifdef RESOLVSORT
- _res.nsort = nsort;
-#endif
- (void) fclose(fp);
- }
- if (_res.defdname[0] == 0 &&
- gethostname(buf, sizeof(_res.defdname) - 1) == 0 &&
- (cp = strchr(buf, '.')) != NULL)
- strcpy(_res.defdname, cp + 1);
-
- /* find components of local domain that might be searched */
- if (havesearch == 0) {
- pp = _res.dnsrch;
- *pp++ = _res.defdname;
- *pp = NULL;
-
-#ifndef RFC1535
- dots = 0;
- for (cp = _res.defdname; *cp; cp++)
- dots += (*cp == '.');
-
- cp = _res.defdname;
- while (pp < _res.dnsrch + MAXDFLSRCH) {
- if (dots < LOCALDOMAINPARTS)
- break;
- cp = strchr(cp, '.') + 1; /* we know there is one */
- *pp++ = cp;
- dots--;
- }
- *pp = NULL;
-#ifdef DEBUG
- if (_res.options & RES_DEBUG) {
- printf(";; res_init()... default dnsrch list:\n");
- for (pp = _res.dnsrch; *pp; pp++)
- printf(";;\t%s\n", *pp);
- printf(";;\t..END..\n");
- }
-#endif
-#endif /* !RFC1535 */
- }
-
- if ((cp = getenv("RES_OPTIONS")) != NULL)
- res_setoptions(cp, "env");
- _res.options |= RES_INIT;
- return (0);
-}
-
-static void
-res_setoptions(options, source)
- char *options, *source;
-{
- char *cp = options;
- int i;
-
-#ifdef DEBUG
- if (_res.options & RES_DEBUG)
- printf(";; res_setoptions(\"%s\", \"%s\")...\n",
- options, source);
-#endif
- while (*cp) {
- /* skip leading and inner runs of spaces */
- while (*cp == ' ' || *cp == '\t')
- cp++;
- /* search for and process individual options */
- if (!strncmp(cp, "ndots:", sizeof("ndots:") - 1)) {
- i = atoi(cp + sizeof("ndots:") - 1);
- if (i <= RES_MAXNDOTS)
- _res.ndots = i;
- else
- _res.ndots = RES_MAXNDOTS;
-#ifdef DEBUG
- if (_res.options & RES_DEBUG)
- printf(";;\tndots=%d\n", _res.ndots);
-#endif
- } else if (!strncmp(cp, "debug", sizeof("debug") - 1)) {
-#ifdef DEBUG
- if (!(_res.options & RES_DEBUG)) {
- printf(";; res_setoptions(\"%s\", \"%s\")..\n",
- options, source);
- _res.options |= RES_DEBUG;
- }
- printf(";;\tdebug\n");
-#endif
- } else if (!strncmp(cp, "inet6", sizeof("inet6") - 1)) {
- _res.options |= RES_USE_INET6;
- } else if (!strncmp(cp, "no_tld_query", sizeof("no_tld_query") - 1)) {
- _res.options |= RES_NOTLDQUERY;
- } else {
- /* XXX - print a warning here? */
- }
- /* skip to next run of spaces */
- while (*cp && *cp != ' ' && *cp != '\t')
- cp++;
- }
-}
-
-#ifdef RESOLVSORT
-/* XXX - should really support CIDR which means explicit masks always. */
-static u_int32_t
-net_mask(in) /* XXX - should really use system's version of this */
- struct in_addr in;
-{
- register u_int32_t i = ntohl(in.s_addr);
-
- if (IN_CLASSA(i))
- return (htonl(IN_CLASSA_NET));
- else if (IN_CLASSB(i))
- return (htonl(IN_CLASSB_NET));
- return (htonl(IN_CLASSC_NET));
-}
-#endif
-
-u_int
-res_randomid()
-{
- struct timeval now;
-
- gettimeofday(&now, NULL);
- return (0xffff & (now.tv_sec ^ now.tv_usec ^ getpid()));
-}
diff --git a/cpukit/libnetworking/libc/res_mkquery.c b/cpukit/libnetworking/libc/res_mkquery.c
deleted file mode 100644
index d3fabfa5ab..0000000000
--- a/cpukit/libnetworking/libc/res_mkquery.c
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- * Copyright (c) 1985, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-/*
- * Portions Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)res_mkquery.c 8.1 (Berkeley) 6/4/93";
-static char orig_rcsid[] = "From: Id: res_mkquery.c,v 8.9 1997/04/24 22:22:36 vixie Exp $";
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-#include <netdb.h>
-#include <resolv.h>
-#include <stdio.h>
-#include <string.h>
-
-#include "res_config.h"
-
-/*
- * Form all types of queries.
- * Returns the size of the result or -1.
- */
-int
-res_mkquery(op, dname, class, type, data, datalen, newrr_in, buf, buflen)
- int op; /* opcode of query */
- const char *dname; /* domain name */
- int class, type; /* class and type of query */
- const u_char *data; /* resource record data */
- int datalen; /* length of data */
- const u_char *newrr_in; /* new rr for modify or append */
- u_char *buf; /* buffer to put query */
- int buflen; /* size of buffer */
-{
- register HEADER *hp;
- register u_char *cp;
- register int n;
- u_char *dnptrs[20], **dpp, **lastdnptr;
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
- h_errno = NETDB_INTERNAL;
- return (-1);
- }
-#ifdef DEBUG
- if (_res.options & RES_DEBUG)
- printf(";; res_mkquery(%d, %s, %d, %d)\n",
- op, dname, class, type);
-#endif
- /*
- * Initialize header fields.
- */
- if ((buf == NULL) || (buflen < HFIXEDSZ))
- return (-1);
- memset(buf, 0, HFIXEDSZ);
- hp = (HEADER *) buf;
- hp->id = htons(++_res.id);
- hp->opcode = op;
- hp->rd = (_res.options & RES_RECURSE) != 0;
- hp->rcode = NOERROR;
- cp = buf + HFIXEDSZ;
- buflen -= HFIXEDSZ;
- dpp = dnptrs;
- *dpp++ = buf;
- *dpp++ = NULL;
- lastdnptr = dnptrs + sizeof dnptrs / sizeof dnptrs[0];
- /*
- * perform opcode specific processing
- */
- switch (op) {
- case QUERY: /*FALLTHROUGH*/
- case NS_NOTIFY_OP:
- if ((buflen -= QFIXEDSZ) < 0)
- return (-1);
- if ((n = dn_comp(dname, cp, buflen, dnptrs, lastdnptr)) < 0)
- return (-1);
- cp += n;
- buflen -= n;
- __putshort(type, cp);
- cp += INT16SZ;
- __putshort(class, cp);
- cp += INT16SZ;
- hp->qdcount = htons(1);
- if (op == QUERY || data == NULL)
- break;
- /*
- * Make an additional record for completion domain.
- */
- buflen -= RRFIXEDSZ;
- n = dn_comp((char *)data, cp, buflen, dnptrs, lastdnptr);
- if (n < 0)
- return (-1);
- cp += n;
- buflen -= n;
- __putshort(T_NULL, cp);
- cp += INT16SZ;
- __putshort(class, cp);
- cp += INT16SZ;
- __putlong(0, cp);
- cp += INT32SZ;
- __putshort(0, cp);
- cp += INT16SZ;
- hp->arcount = htons(1);
- break;
-
- case IQUERY:
- /*
- * Initialize answer section
- */
- if (buflen < 1 + RRFIXEDSZ + datalen)
- return (-1);
- *cp++ = '\0'; /* no domain name */
- __putshort(type, cp);
- cp += INT16SZ;
- __putshort(class, cp);
- cp += INT16SZ;
- __putlong(0, cp);
- cp += INT32SZ;
- __putshort(datalen, cp);
- cp += INT16SZ;
- if (datalen) {
- memcpy(cp, data, datalen);
- cp += datalen;
- }
- hp->ancount = htons(1);
- break;
-
- default:
- return (-1);
- }
- return (cp - buf);
-}
diff --git a/cpukit/libnetworking/libc/res_mkupdate.c b/cpukit/libnetworking/libc/res_mkupdate.c
deleted file mode 100644
index 56362f650b..0000000000
--- a/cpukit/libnetworking/libc/res_mkupdate.c
+++ /dev/null
@@ -1,415 +0,0 @@
-/*
- * Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-/*
- * Based on the Dynamic DNS reference implementation by Viraj Bais
- * <viraj_bais@ccm.fm.intel.com>
- */
-
-#if !defined(__rtems__)
-#if !defined(lint) && !defined(SABER)
-static char rcsid[] = "$Id$";
-#endif /* not lint */
-#endif /* not rtems */
-
-#include <sys/types.h>
-#include <sys/param.h>
-
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-#include <arpa/inet.h>
-
-#include <errno.h>
-#include <limits.h>
-#include <netdb.h>
-#include <resolv.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <ctype.h>
-
-#include "res_config.h"
-
-static int getnum_str(u_char **, u_char *);
-static int getword_str(char *, int, u_char **, u_char *);
-
-#define ShrinkBuffer(x) if ((buflen -= x) < 0) return (-2);
-
-/*
- * Form update packets.
- * Returns the size of the resulting packet if no error
- * On error,
- * returns -1 if error in reading a word/number in rdata
- * portion for update packets
- * -2 if length of buffer passed is insufficient
- * -3 if zone section is not the first section in
- * the linked list, or section order has a problem
- * -4 on a number overflow
- * -5 unknown operation or no records
- */
-int
-res_mkupdate(ns_updrec *rrecp_in, u_char *buf, int buflen) {
- ns_updrec *rrecp_start = rrecp_in;
- HEADER *hp;
- u_char *cp, *sp1, *sp2, *startp, *endp;
- int n, i, soanum, multiline;
- ns_updrec *rrecp;
- struct in_addr ina;
- char buf2[MAXDNAME];
- int section, numrrs = 0, counts[ns_s_max];
- u_int16_t rtype, rclass;
- u_int32_t n1, rttl;
- u_char *dnptrs[20], **dpp, **lastdnptr;
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
- h_errno = NETDB_INTERNAL;
- return (-1);
- }
-
- /*
- * Initialize header fields.
- */
- if ((buf == NULL) || (buflen < HFIXEDSZ))
- return (-1);
- memset(buf, 0, HFIXEDSZ);
- hp = (HEADER *) buf;
- hp->id = htons(++_res.id);
- hp->opcode = ns_o_update;
- hp->rcode = NOERROR;
- sp1 = buf + 2*INT16SZ; /* save pointer to zocount */
- cp = buf + HFIXEDSZ;
- buflen -= HFIXEDSZ;
- dpp = dnptrs;
- *dpp++ = buf;
- *dpp++ = NULL;
- lastdnptr = dnptrs + sizeof dnptrs / sizeof dnptrs[0];
-
- if (rrecp_start == NULL)
- return (-5);
- else if (rrecp_start->r_section != S_ZONE)
- return (-3);
-
- memset(counts, 0, sizeof counts);
- for (rrecp = rrecp_start; rrecp; rrecp = rrecp->r_grpnext) {
- numrrs++;
- section = rrecp->r_section;
- if (section < 0 || section >= ns_s_max)
- return (-1);
- counts[section]++;
- for (i = section + 1; i < ns_s_max; i++)
- if (counts[i])
- return (-3);
- rtype = rrecp->r_type;
- rclass = rrecp->r_class;
- rttl = rrecp->r_ttl;
- /* overload class and type */
- if (section == S_PREREQ) {
- rttl = 0;
- switch (rrecp->r_opcode) {
- case YXDOMAIN:
- rclass = C_ANY;
- rtype = T_ANY;
- rrecp->r_size = 0;
- break;
- case NXDOMAIN:
- rclass = C_NONE;
- rtype = T_ANY;
- rrecp->r_size = 0;
- break;
- case NXRRSET:
- rclass = C_NONE;
- rrecp->r_size = 0;
- break;
- case YXRRSET:
- if (rrecp->r_size == 0)
- rclass = C_ANY;
- break;
- default:
- fprintf(stderr,
- "res_mkupdate: incorrect opcode: %d\n",
- rrecp->r_opcode);
- fflush(stderr);
- return (-1);
- }
- } else if (section == S_UPDATE) {
- switch (rrecp->r_opcode) {
- case DELETE:
- rclass = rrecp->r_size == 0 ? C_ANY : C_NONE;
- break;
- case ADD:
- break;
- default:
- fprintf(stderr,
- "res_mkupdate: incorrect opcode: %d\n",
- rrecp->r_opcode);
- fflush(stderr);
- return (-1);
- }
- }
-
- /*
- * XXX appending default domain to owner name is omitted,
- * fqdn must be provided
- */
- if ((n = dn_comp(rrecp->r_dname, cp, buflen, dnptrs,
- lastdnptr)) < 0)
- return (-1);
- cp += n;
- ShrinkBuffer(n + 2*INT16SZ);
- PUTSHORT(rtype, cp);
- PUTSHORT(rclass, cp);
- if (section == S_ZONE) {
- if (numrrs != 1 || rrecp->r_type != T_SOA)
- return (-3);
- continue;
- }
- ShrinkBuffer(INT32SZ + INT16SZ);
- PUTLONG(rttl, cp);
- sp2 = cp; /* save pointer to length byte */
- cp += INT16SZ;
- if (rrecp->r_size == 0) {
- if (section == S_UPDATE && rclass != C_ANY)
- return (-1);
- else {
- PUTSHORT(0, sp2);
- continue;
- }
- }
- startp = rrecp->r_data;
- endp = startp + rrecp->r_size - 1;
- /* XXX this should be done centrally. */
- switch (rrecp->r_type) {
- case T_A:
- if (!getword_str(buf2, sizeof buf2, &startp, endp))
- return (-1);
- if (!inet_aton(buf2, &ina))
- return (-1);
- n1 = ntohl(ina.s_addr);
- ShrinkBuffer(INT32SZ);
- PUTLONG(n1, cp);
- break;
- case T_CNAME:
- case T_MB:
- case T_MG:
- case T_MR:
- case T_NS:
- case T_PTR:
- if (!getword_str(buf2, sizeof buf2, &startp, endp))
- return (-1);
- n = dn_comp(buf2, cp, buflen, dnptrs, lastdnptr);
- if (n < 0)
- return (-1);
- cp += n;
- ShrinkBuffer(n);
- break;
- case T_MINFO:
- case T_SOA:
- case T_RP:
- for (i = 0; i < 2; i++) {
- if (!getword_str(buf2, sizeof buf2, &startp,
- endp))
- return (-1);
- n = dn_comp(buf2, cp, buflen,
- dnptrs, lastdnptr);
- if (n < 0)
- return (-1);
- cp += n;
- ShrinkBuffer(n);
- }
- if (rrecp->r_type == T_SOA) {
- ShrinkBuffer(5 * INT32SZ);
- while (isspace(*startp) || !*startp)
- startp++;
- if (*startp == '(') {
- multiline = 1;
- startp++;
- } else
- multiline = 0;
- /* serial, refresh, retry, expire, minimum */
- for (i = 0; i < 5; i++) {
- soanum = getnum_str(&startp, endp);
- if (soanum < 0)
- return (-1);
- PUTLONG(soanum, cp);
- }
- if (multiline) {
- while (isspace(*startp) || !*startp)
- startp++;
- if (*startp != ')')
- return (-1);
- }
- }
- break;
- case T_MX:
- case T_AFSDB:
- case T_RT:
- n = getnum_str(&startp, endp);
- if (n < 0)
- return (-1);
- PUTSHORT(n, cp);
- ShrinkBuffer(INT16SZ);
- if (!getword_str(buf2, sizeof buf2, &startp, endp))
- return (-1);
- n = dn_comp(buf2, cp, buflen, dnptrs, lastdnptr);
- if (n < 0)
- return (-1);
- cp += n;
- ShrinkBuffer(n);
- break;
- case T_PX:
- n = getnum_str(&startp, endp);
- if (n < 0)
- return (-1);
- PUTSHORT(n, cp);
- ShrinkBuffer(INT16SZ);
- for (i = 0; i < 2; i++) {
- if (!getword_str(buf2, sizeof buf2, &startp,
- endp))
- return (-1);
- n = dn_comp(buf2, cp, buflen, dnptrs,
- lastdnptr);
- if (n < 0)
- return (-1);
- cp += n;
- ShrinkBuffer(n);
- }
- break;
- case T_WKS:
- case T_HINFO:
- case T_TXT:
- case T_X25:
- case T_ISDN:
- case T_NSAP:
- case T_LOC:
- /* XXX - more fine tuning needed here */
- ShrinkBuffer(rrecp->r_size);
- memcpy(cp, rrecp->r_data, rrecp->r_size);
- cp += rrecp->r_size;
- break;
- default:
- return (-1);
- } /*switch*/
- n = (u_int16_t)((cp - sp2) - INT16SZ);
- PUTSHORT(n, sp2);
- } /*for*/
-
- hp->qdcount = htons(counts[0]);
- hp->ancount = htons(counts[1]);
- hp->nscount = htons(counts[2]);
- hp->arcount = htons(counts[3]);
- return (cp - buf);
-}
-
-/*
- * Get a whitespace delimited word from a string (not file)
- * into buf. modify the start pointer to point after the
- * word in the string.
- */
-static int
-getword_str(char *buf, int size, u_char **startpp, u_char *endp) {
- char *cp;
- int c;
-
- for (cp = buf; *startpp <= endp; ) {
- c = **startpp;
- if (isspace(c) || c == '\0') {
- if (cp != buf) /* trailing whitespace */
- break;
- else { /* leading whitespace */
- (*startpp)++;
- continue;
- }
- }
- (*startpp)++;
- if (cp >= buf+size-1)
- break;
- *cp++ = (u_char)c;
- }
- *cp = '\0';
- return (cp != buf);
-}
-
-/*
- * Get a whitespace delimited number from a string (not file) into buf
- * update the start pointer to point after the number in the string.
- */
-static int
-getnum_str(u_char **startpp, u_char *endp) {
- int c, n;
- int seendigit = 0;
- int m = 0;
-
- for (n = 0; *startpp <= endp; ) {
- c = **startpp;
- if (isspace(c) || c == '\0') {
- if (seendigit) /* trailing whitespace */
- break;
- else { /* leading whitespace */
- (*startpp)++;
- continue;
- }
- }
- if (c == ';') {
- while ((*startpp <= endp) &&
- ((c = **startpp) != '\n'))
- (*startpp)++;
- if (seendigit)
- break;
- continue;
- }
- if (!isdigit(c)) {
- if (c == ')' && seendigit) {
- (*startpp)--;
- break;
- }
- return (-1);
- }
- (*startpp)++;
- n = n * 10 + (c - '0');
- seendigit = 1;
- }
- return (n + m);
-}
-
-/*
- * Allocate a resource record buffer & save rr info.
- */
-ns_updrec *
-res_mkupdrec(int section, const char *dname,
- u_int class, u_int type, u_long ttl) {
- ns_updrec *rrecp = (ns_updrec *)calloc(1, sizeof(ns_updrec));
-
- if (!rrecp || !(rrecp->r_dname = strdup(dname)))
- return (NULL);
- rrecp->r_class = class;
- rrecp->r_type = type;
- rrecp->r_ttl = ttl;
- rrecp->r_section = section;
- return (rrecp);
-}
-
-/*
- * Free a resource record buffer created by res_mkupdrec.
- */
-void
-res_freeupdrec(ns_updrec *rrecp) {
- /* Note: freeing r_dp is the caller's responsibility. */
- if (rrecp->r_dname != NULL)
- free(rrecp->r_dname);
- free(rrecp);
-}
diff --git a/cpukit/libnetworking/libc/res_query.c b/cpukit/libnetworking/libc/res_query.c
deleted file mode 100644
index 784fa433bc..0000000000
--- a/cpukit/libnetworking/libc/res_query.c
+++ /dev/null
@@ -1,410 +0,0 @@
-/*
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-/*
- * Portions Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)res_query.c 8.1 (Berkeley) 6/4/93";
-static char orig_rcsid = "From: Id: res_query.c,v 8.14 1997/06/09 17:47:05 halley Exp $";
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-#include <ctype.h>
-#include <errno.h>
-#include <netdb.h>
-#include <resolv.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "res_config.h"
-
-#if PACKETSZ > 1024
-#define MAXPACKET PACKETSZ
-#else
-#define MAXPACKET 1024
-#endif
-
-/*
- * Formulate a normal query, send, and await answer.
- * Returned answer is placed in supplied buffer "answer".
- * Perform preliminary check of answer, returning success only
- * if no error is indicated and the answer count is nonzero.
- * Return the size of the response on success, -1 on error.
- * Error number is left in h_errno.
- *
- * Caller must parse answer and determine whether it answers the question.
- */
-int
-res_query(name, class, type, answer, anslen)
- const char *name; /* domain name */
- int class, type; /* class and type of query */
- u_char *answer; /* buffer to put answer */
- int anslen; /* size of answer buffer */
-{
- u_char buf[MAXPACKET];
- HEADER *hp = (HEADER *) answer;
- int n;
-
- hp->rcode = NOERROR; /* default */
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
- h_errno = NETDB_INTERNAL;
- return (-1);
- }
-#ifdef DEBUG
- if (_res.options & RES_DEBUG)
- printf(";; res_query(%s, %d, %d)\n", name, class, type);
-#endif
-
- n = res_mkquery(QUERY, name, class, type, NULL, 0, NULL,
- buf, sizeof(buf));
- if (n <= 0) {
-#ifdef DEBUG
- if (_res.options & RES_DEBUG)
- printf(";; res_query: mkquery failed\n");
-#endif
- h_errno = NO_RECOVERY;
- return (n);
- }
- n = res_send(buf, n, answer, anslen);
- if (n < 0) {
-#ifdef DEBUG
- if (_res.options & RES_DEBUG)
- printf(";; res_query: send error\n");
-#endif
- h_errno = TRY_AGAIN;
- return (n);
- }
-
- if (hp->rcode != NOERROR || ntohs(hp->ancount) == 0) {
-#ifdef DEBUG
- if (_res.options & RES_DEBUG)
- printf(";; rcode = %d, ancount=%d\n", hp->rcode,
- ntohs(hp->ancount));
-#endif
- switch (hp->rcode) {
- case NXDOMAIN:
- h_errno = HOST_NOT_FOUND;
- break;
- case SERVFAIL:
- h_errno = TRY_AGAIN;
- break;
- case NOERROR:
- h_errno = NO_DATA;
- break;
- case FORMERR:
- case NOTIMP:
- case REFUSED:
- default:
- h_errno = NO_RECOVERY;
- break;
- }
- return (-1);
- }
- return (n);
-}
-
-/*
- * Formulate a normal query, send, and retrieve answer in supplied buffer.
- * Return the size of the response on success, -1 on error.
- * If enabled, implement search rules until answer or unrecoverable failure
- * is detected. Error code, if any, is left in h_errno.
- */
-int
-res_search(name, class, type, answer, anslen)
- const char *name; /* domain name */
- int class, type; /* class and type of query */
- u_char *answer; /* buffer to put answer */
- int anslen; /* size of answer */
-{
- const char *cp, * const *domain;
- HEADER *hp = (HEADER *) answer;
- u_int dots;
- int trailing_dot, ret, saved_herrno;
- int got_nodata = 0, got_servfail = 0, tried_as_is = 0;
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
- h_errno = NETDB_INTERNAL;
- return (-1);
- }
- errno = 0;
- h_errno = HOST_NOT_FOUND; /* default, if we never query */
- dots = 0;
- for (cp = name; *cp; cp++)
- dots += (*cp == '.');
- trailing_dot = 0;
- if (cp > name && *--cp == '.')
- trailing_dot++;
-
- /* If there aren't any dots, it could be a user-level alias */
- if (!dots && (cp = hostalias(name)) != NULL)
- return (res_query(cp, class, type, answer, anslen));
-
- /*
- * If there are dots in the name already, let's just give it a try
- * 'as is'. The threshold can be set with the "ndots" option.
- */
- saved_herrno = -1;
- if (dots >= _res.ndots) {
- ret = res_querydomain(name, NULL, class, type, answer, anslen);
- if (ret > 0)
- return (ret);
- saved_herrno = h_errno;
- tried_as_is++;
- }
-
- /*
- * We do at least one level of search if
- * - there is no dot and RES_DEFNAME is set, or
- * - there is at least one dot, there is no trailing dot,
- * and RES_DNSRCH is set.
- */
- if ((!dots && (_res.options & RES_DEFNAMES)) ||
- (dots && !trailing_dot && (_res.options & RES_DNSRCH))) {
- int done = 0;
-
- for (domain = (const char * const *)_res.dnsrch;
- *domain && !done;
- domain++) {
-
- ret = res_querydomain(name, *domain, class, type,
- answer, anslen);
- if (ret > 0)
- return (ret);
-
- /*
- * If no server present, give up.
- * If name isn't found in this domain,
- * keep trying higher domains in the search list
- * (if that's enabled).
- * On a NO_DATA error, keep trying, otherwise
- * a wildcard entry of another type could keep us
- * from finding this entry higher in the domain.
- * If we get some other error (negative answer or
- * server failure), then stop searching up,
- * but try the input name below in case it's
- * fully-qualified.
- */
- if (errno == ECONNREFUSED) {
- h_errno = TRY_AGAIN;
- return (-1);
- }
-
- switch (h_errno) {
- case NO_DATA:
- got_nodata++;
- /* FALLTHROUGH */
- case HOST_NOT_FOUND:
- /* keep trying */
- break;
- case TRY_AGAIN:
- if (hp->rcode == SERVFAIL) {
- /* try next search element, if any */
- got_servfail++;
- break;
- }
- /* FALLTHROUGH */
- default:
- /* anything else implies that we're done */
- done++;
- }
-
- /* if we got here for some reason other than DNSRCH,
- * we only wanted one iteration of the loop, so stop.
- */
- if (!(_res.options & RES_DNSRCH))
- done++;
- }
- }
-
- /*
- * If we have not already tried the name "as is", do that now.
- * note that we do this regardless of how many dots were in the
- * name or whether it ends with a dot unless NOTLDQUERY is set.
- */
- if (!tried_as_is && (dots || !(_res.options & RES_NOTLDQUERY))) {
- ret = res_querydomain(name, NULL, class, type, answer, anslen);
- if (ret > 0)
- return (ret);
- }
-
- /* if we got here, we didn't satisfy the search.
- * if we did an initial full query, return that query's h_errno
- * (note that we wouldn't be here if that query had succeeded).
- * else if we ever got a nodata, send that back as the reason.
- * else send back meaningless h_errno, that being the one from
- * the last DNSRCH we did.
- */
- if (saved_herrno != -1)
- h_errno = saved_herrno;
- else if (got_nodata)
- h_errno = NO_DATA;
- else if (got_servfail)
- h_errno = TRY_AGAIN;
- return (-1);
-}
-
-/*
- * Perform a call on res_query on the concatenation of name and domain,
- * removing a trailing dot from name if domain is NULL.
- */
-int
-res_querydomain(name, domain, class, type, answer, anslen)
- const char *name, *domain;
- int class, type; /* class and type of query */
- u_char *answer; /* buffer to put answer */
- int anslen; /* size of answer */
-{
- char nbuf[MAXDNAME];
- const char *longname = nbuf;
- int n, d;
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
- h_errno = NETDB_INTERNAL;
- return (-1);
- }
-#ifdef DEBUG
- if (_res.options & RES_DEBUG)
- printf(";; res_querydomain(%s, %s, %d, %d)\n",
- name, domain?domain:"<Nil>", class, type);
-#endif
- if (domain == NULL) {
- /*
- * Check for trailing '.';
- * copy without '.' if present.
- */
- n = strlen(name);
- if (n >= MAXDNAME) {
- h_errno = NO_RECOVERY;
- return (-1);
- }
- n--;
- if (n >= 0 && name[n] == '.') {
- strncpy(nbuf, name, n);
- nbuf[n] = '\0';
- } else
- longname = name;
- } else {
- n = strlen(name);
- d = strlen(domain);
- if (n + d + 1 >= MAXDNAME) {
- h_errno = NO_RECOVERY;
- return (-1);
- }
- sprintf(nbuf, "%s.%s", name, domain);
- }
- return (res_query(longname, class, type, answer, anslen));
-}
-
-const char *
-hostalias(name)
- const char *name;
-{
- register char *cp1, *cp2;
- FILE *fp;
- char *file;
- char buf[BUFSIZ];
- static char abuf[MAXDNAME];
-
- if (_res.options & RES_NOALIASES)
- return (NULL);
- if (issetugid())
- return (NULL);
- file = getenv("HOSTALIASES");
- if (file == NULL || (fp = fopen(file, "r")) == NULL)
- return (NULL);
- setbuf(fp, NULL);
- buf[sizeof(buf) - 1] = '\0';
- while (fgets(buf, sizeof(buf), fp)) {
- for (cp1 = buf; *cp1 && !isspace((int)*cp1); ++cp1)
- ;
- if (!*cp1)
- break;
- *cp1 = '\0';
- if (!strcasecmp(buf, name)) {
- while (isspace((int)*++cp1))
- ;
- if (!*cp1)
- break;
- for (cp2 = cp1 + 1; *cp2 && !isspace((int)*cp2); ++cp2)
- ;
- abuf[sizeof(abuf) - 1] = *cp2 = '\0';
- strncpy(abuf, cp1, sizeof(abuf) - 1);
- fclose(fp);
- return (abuf);
- }
- }
- fclose(fp);
- return (NULL);
-}
diff --git a/cpukit/libnetworking/libc/res_send.c b/cpukit/libnetworking/libc/res_send.c
deleted file mode 100644
index 08cb78490f..0000000000
--- a/cpukit/libnetworking/libc/res_send.c
+++ /dev/null
@@ -1,929 +0,0 @@
-/*
- * Copyright (c) 1985, 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-/*
- * Portions Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)res_send.c 8.1 (Berkeley) 6/4/93";
-static char orig_rcsid[] = "From: Id: res_send.c,v 8.20 1998/04/06 23:27:51 halley Exp $";
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * Send query to name server and wait for reply.
- */
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/time.h>
-#include <sys/socket.h>
-#include <sys/uio.h>
-
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-#include <arpa/inet.h>
-
-#include <errno.h>
-#include <netdb.h>
-#include <resolv.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <poll.h>
-
-#include "res_config.h"
-
-#if !defined(__rtems__)
-#ifdef NOPOLL /* libc_r doesn't wrap poll yet() */
-static int use_poll = 0;
-#else
-static int use_poll = 1; /* adapt to poll() syscall availability */
- /* 0 = not present, 1 = try it, 2 = exists */
-#endif
-#endif
-
-static int s = -1; /* socket used for communications */
-static int connected = 0; /* is the socket connected */
-static int vc = 0; /* is the socket a virtual circuit? */
-static res_send_qhook Qhook = NULL;
-static res_send_rhook Rhook = NULL;
-
-
-#define CAN_RECONNECT 1
-
-#ifndef DEBUG
-# define Dprint(cond, args) /*empty*/
-# define DprintQ(cond, args, query, size) /*empty*/
-# define Aerror(file, string, error, address) /*empty*/
-# define Perror(file, string, error) /*empty*/
-#else
-# define Dprint(cond, args) if (cond) {fprintf args;} else {}
-# define DprintQ(cond, args, query, size) if (cond) {\
- fprintf args;\
- __fp_nquery(query, size, stdout);\
- } else {}
- static void
- Aerror(file, string, error, address)
- FILE *file;
- char *string;
- int error;
- struct sockaddr_in address;
- {
- int save = errno;
-
- if (_res.options & RES_DEBUG) {
- fprintf(file, "res_send: %s ([%s].%u): %s\n",
- string,
- inet_ntoa(address.sin_addr),
- ntohs(address.sin_port),
- strerror(error));
- }
- errno = save;
- }
- static void
- Perror(file, string, error)
- FILE *file;
- char *string;
- int error;
- {
- int save = errno;
-
- if (_res.options & RES_DEBUG) {
- fprintf(file, "res_send: %s: %s\n",
- string, strerror(error));
- }
- errno = save;
- }
-#endif
-
-void
-res_send_setqhook(hook)
- res_send_qhook hook;
-{
-
- Qhook = hook;
-}
-
-void
-res_send_setrhook(hook)
- res_send_rhook hook;
-{
-
- Rhook = hook;
-}
-
-/* int
- * res_isourserver(ina)
- * looks up "ina" in _res.ns_addr_list[]
- * returns:
- * 0 : not found
- * >0 : found
- * author:
- * paul vixie, 29may94
- */
-int
-res_isourserver(inp)
- const struct sockaddr_in *inp;
-{
- struct sockaddr_in ina;
- int ns, ret;
-
- ina = *inp;
- ret = 0;
- for (ns = 0; ns < _res.nscount; ns++) {
- const struct sockaddr_in *srv = &_res.nsaddr_list[ns];
-
- if (srv->sin_family == ina.sin_family &&
- srv->sin_port == ina.sin_port &&
- (srv->sin_addr.s_addr == INADDR_ANY ||
- srv->sin_addr.s_addr == ina.sin_addr.s_addr)) {
- ret++;
- break;
- }
- }
- return (ret);
-}
-
-/* int
- * res_nameinquery(name, type, class, buf, eom)
- * look for (name,type,class) in the query section of packet (buf,eom)
- * requires:
- * buf + HFIXEDSZ <= eom
- * returns:
- * -1 : format error
- * 0 : not found
- * >0 : found
- * author:
- * paul vixie, 29may94
- */
-int
-res_nameinquery(name, type, class, buf, eom)
- const char *name;
- int type, class;
- const u_char *buf, *eom;
-{
- const u_char *cp = buf + HFIXEDSZ;
- int qdcount = ntohs(((HEADER*)buf)->qdcount);
-
- while (qdcount-- > 0) {
- char tname[MAXDNAME+1];
- int n, ttype, tclass;
-
- n = dn_expand(buf, eom, cp, tname, sizeof tname);
- if (n < 0)
- return (-1);
- cp += n;
- if (cp + 2 * INT16SZ > eom)
- return (-1);
- ttype = ns_get16(cp); cp += INT16SZ;
- tclass = ns_get16(cp); cp += INT16SZ;
- if (ttype == type &&
- tclass == class &&
- strcasecmp(tname, name) == 0)
- return (1);
- }
- return (0);
-}
-
-/* int
- * res_queriesmatch(buf1, eom1, buf2, eom2)
- * is there a 1:1 mapping of (name,type,class)
- * in (buf1,eom1) and (buf2,eom2)?
- * returns:
- * -1 : format error
- * 0 : not a 1:1 mapping
- * >0 : is a 1:1 mapping
- * author:
- * paul vixie, 29may94
- */
-int
-res_queriesmatch(buf1, eom1, buf2, eom2)
- const u_char *buf1, *eom1;
- const u_char *buf2, *eom2;
-{
- const u_char *cp = buf1 + HFIXEDSZ;
- int qdcount = ntohs(((HEADER*)buf1)->qdcount);
-
- if (buf1 + HFIXEDSZ > eom1 || buf2 + HFIXEDSZ > eom2)
- return (-1);
-
- /*
- * Only header section present in replies to
- * dynamic update packets.
- */
- if ( (((HEADER *)buf1)->opcode == ns_o_update) &&
- (((HEADER *)buf2)->opcode == ns_o_update) )
- return (1);
-
- if (qdcount != ntohs(((HEADER*)buf2)->qdcount))
- return (0);
- while (qdcount-- > 0) {
- char tname[MAXDNAME+1];
- int n, ttype, tclass;
-
- n = dn_expand(buf1, eom1, cp, tname, sizeof tname);
- if (n < 0)
- return (-1);
- cp += n;
- if (cp + 2 * INT16SZ > eom1)
- return (-1);
- ttype = ns_get16(cp); cp += INT16SZ;
- tclass = ns_get16(cp); cp += INT16SZ;
- if (!res_nameinquery(tname, ttype, tclass, buf2, eom2))
- return (0);
- }
- return (1);
-}
-
-int
-res_send(buf, buflen, ans, anssiz)
- const u_char *buf;
- int buflen;
- u_char *ans;
- int anssiz;
-{
- HEADER *hp = (HEADER *) buf;
- HEADER *anhp = (HEADER *) ans;
- int gotsomewhere, connreset, terrno, try, v_circuit, resplen, ns, n;
- u_int badns; /* XXX NSMAX can't exceed #/bits in this variable */
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
- /* errno should have been set by res_init() in this case. */
- return (-1);
- }
- if (anssiz < HFIXEDSZ) {
- errno = EINVAL;
- return (-1);
- }
- DprintQ((_res.options & RES_DEBUG) || (_res.pfcode & RES_PRF_QUERY),
- (stdout, ";; res_send()\n"), buf, buflen);
- v_circuit = (_res.options & RES_USEVC) || buflen > PACKETSZ;
- gotsomewhere = 0;
- connreset = 0;
- terrno = ETIMEDOUT;
- badns = 0;
-
- /*
- * Send request, RETRY times, or until successful
- */
- for (try = 0; try < _res.retry; try++) {
- for (ns = 0; ns < _res.nscount; ns++) {
- struct sockaddr_in *nsap = &_res.nsaddr_list[ns];
- same_ns:
- if (badns & (1 << ns)) {
- res_close();
- goto next_ns;
- }
-
- if (Qhook) {
- int done = 0, loops = 0;
-
- do {
- res_sendhookact act;
-
- act = (*Qhook)(&nsap, &buf, &buflen,
- ans, anssiz, &resplen);
- switch (act) {
- case res_goahead:
- done = 1;
- break;
- case res_nextns:
- res_close();
- goto next_ns;
- case res_done:
- return (resplen);
- case res_modified:
- /* give the hook another try */
- if (++loops < 42) /*doug adams*/
- break;
- /*FALLTHROUGH*/
- case res_error:
- /*FALLTHROUGH*/
- default:
- return (-1);
- }
- } while (!done);
- }
-
- Dprint(_res.options & RES_DEBUG,
- (stdout, ";; Querying server (# %d) address = %s\n",
- ns + 1, inet_ntoa(nsap->sin_addr)));
-
- if (v_circuit) {
- int truncated;
-#if !defined(__rtems__)
- struct iovec iov[2];
-#endif
- u_short len;
- u_char *cp;
-
- /*
- * Use virtual circuit;
- * at most one attempt per server.
- */
- try = _res.retry;
- truncated = 0;
- if (s < 0 || !vc || hp->opcode == ns_o_update) {
- if (s >= 0)
- res_close();
-
- s = socket(PF_INET, SOCK_STREAM, 0);
- if (s < 0) {
- terrno = errno;
- Perror(stderr, "socket(vc)", errno);
- return (-1);
- }
- errno = 0;
- if (connect(s, (struct sockaddr *)nsap,
- sizeof *nsap) < 0) {
- terrno = errno;
- Aerror(stderr, "connect/vc",
- errno, *nsap);
- badns |= (1 << ns);
- res_close();
- goto next_ns;
- }
- vc = 1;
- }
- /*
- * Send length & message
- */
- putshort((u_short)buflen, (u_char*)&len);
-#if !defined(__rtems__)
- iov[0].iov_base = (caddr_t)&len;
- iov[0].iov_len = INT16SZ;
- iov[1].iov_base = (caddr_t)buf;
- iov[1].iov_len = buflen;
- if (writev(s, iov, 2) != (INT16SZ + buflen)) {
-#else
- /*
- * RTEMS doesn't have writev (yet)
- */
- if ((write (s, &len, INT16SZ) != INT16SZ)
- || (write (s, buf, buflen) != buflen)) {
-#endif
- terrno = errno;
- Perror(stderr, "write failed", errno);
- badns |= (1 << ns);
- res_close();
- goto next_ns;
- }
- /*
- * Receive length & response
- */
-read_len:
- cp = ans;
- len = INT16SZ;
- while ((n = read(s, (char *)cp, (int)len)) > 0) {
- cp += n;
- if ((len -= n) <= 0)
- break;
- }
- if (n <= 0) {
- terrno = errno;
- Perror(stderr, "read failed", errno);
- res_close();
- /*
- * A long running process might get its TCP
- * connection reset if the remote server was
- * restarted. Requery the server instead of
- * trying a new one. When there is only one
- * server, this means that a query might work
- * instead of failing. We only allow one reset
- * per query to prevent looping.
- */
- if (terrno == ECONNRESET && !connreset) {
- connreset = 1;
- res_close();
- goto same_ns;
- }
- res_close();
- goto next_ns;
- }
- resplen = ns_get16(ans);
- if (resplen > anssiz) {
- Dprint(_res.options & RES_DEBUG,
- (stdout, ";; response truncated\n")
- );
- truncated = 1;
- len = anssiz;
- } else
- len = resplen;
- if (len < HFIXEDSZ) {
- /*
- * Undersized message.
- */
- Dprint(_res.options & RES_DEBUG,
- (stdout, ";; undersized: %d\n", len));
- terrno = EMSGSIZE;
- badns |= (1 << ns);
- res_close();
- goto next_ns;
- }
- cp = ans;
- while (len != 0 &&
- (n = read(s, (char *)cp, (int)len)) > 0) {
- cp += n;
- len -= n;
- }
- if (n <= 0) {
- terrno = errno;
- Perror(stderr, "read(vc)", errno);
- res_close();
- goto next_ns;
- }
- if (truncated) {
- /*
- * Flush rest of answer
- * so connection stays in synch.
- */
- anhp->tc = 1;
- len = resplen - anssiz;
- while (len != 0) {
- char junk[PACKETSZ];
-
- n = (len > sizeof(junk)
- ? sizeof(junk)
- : len);
- if ((n = read(s, junk, n)) > 0)
- len -= n;
- else
- break;
- }
- }
- /*
- * The calling applicating has bailed out of
- * a previous call and failed to arrange to have
- * the circuit closed or the server has got
- * itself confused. Anyway drop the packet and
- * wait for the correct one.
- */
- if (hp->id != anhp->id) {
- DprintQ((_res.options & RES_DEBUG) ||
- (_res.pfcode & RES_PRF_REPLY),
- (stdout, ";; old answer (unexpected):\n"),
- ans, (resplen>anssiz)?anssiz:resplen);
- goto read_len;
- }
- } else {
- /*
- * Use datagrams.
- */
-#ifndef NOPOLL
- struct pollfd pfd;
- int msec;
-#endif
- struct timeval timeout;
-#ifndef NOSELECT
- fd_set dsmask, *dsmaskp;
- int dsmasklen;
-#endif
- struct sockaddr_in from;
- int fromlen;
-
- if ((s < 0) || vc) {
- if (vc)
- res_close();
- s = socket(PF_INET, SOCK_DGRAM, 0);
- if (s < 0) {
-#ifndef CAN_RECONNECT
- bad_dg_sock:
-#endif
- terrno = errno;
- Perror(stderr, "socket(dg)", errno);
- return (-1);
- }
- connected = 0;
- }
-#ifndef CANNOT_CONNECT_DGRAM
- /*
- * On a 4.3BSD+ machine (client and server,
- * actually), sending to a nameserver datagram
- * port with no nameserver will cause an
- * ICMP port unreachable message to be returned.
- * If our datagram socket is "connected" to the
- * server, we get an ECONNREFUSED error on the next
- * socket operation, and select returns if the
- * error message is received. We can thus detect
- * the absence of a nameserver without timing out.
- * If we have sent queries to at least two servers,
- * however, we don't want to remain connected,
- * as we wish to receive answers from the first
- * server to respond.
- */
- if (_res.nscount == 1 || (try == 0 && ns == 0)) {
- /*
- * Connect only if we are sure we won't
- * receive a response from another server.
- */
- if (!connected) {
- if (connect(s, (struct sockaddr *)nsap,
- sizeof *nsap
- ) < 0) {
- Aerror(stderr,
- "connect(dg)",
- errno, *nsap);
- badns |= (1 << ns);
- res_close();
- goto next_ns;
- }
- connected = 1;
- }
- if (send(s, (char*)buf, buflen, 0) != buflen) {
- Perror(stderr, "send", errno);
- badns |= (1 << ns);
- res_close();
- goto next_ns;
- }
- } else {
- /*
- * Disconnect if we want to listen
- * for responses from more than one server.
- */
- if (connected) {
-#ifdef CAN_RECONNECT
- struct sockaddr_in no_addr;
-
- no_addr.sin_family = AF_INET;
- no_addr.sin_addr.s_addr = INADDR_ANY;
- no_addr.sin_port = 0;
- (void) connect(s,
- (struct sockaddr *)
- &no_addr,
- sizeof no_addr);
-#else
- int s1 = socket(PF_INET, SOCK_DGRAM,0);
- if (s1 < 0)
- goto bad_dg_sock;
- (void) dup2(s1, s);
- (void) close(s1);
- Dprint(_res.options & RES_DEBUG,
- (stdout, ";; new DG socket\n"))
-#endif /* CAN_RECONNECT */
- connected = 0;
- errno = 0;
- }
-#endif /* !CANNOT_CONNECT_DGRAM */
- if (sendto(s, (char*)buf, buflen, 0,
- (struct sockaddr *)nsap,
- sizeof *nsap)
- != buflen) {
- Aerror(stderr, "sendto", errno, *nsap);
- badns |= (1 << ns);
- res_close();
- goto next_ns;
- }
-#ifndef CANNOT_CONNECT_DGRAM
- }
-#endif /* !CANNOT_CONNECT_DGRAM */
-
- /*
- * Wait for reply
- */
-#ifndef NOPOLL
- othersyscall:
- if (use_poll) {
- msec = (_res.retrans << try) * 1000;
- if (try > 0)
- msec /= _res.nscount;
- if (msec <= 0)
- msec = 1000;
- } else {
-#endif
- timeout.tv_sec = (_res.retrans << try);
- if (try > 0)
- timeout.tv_sec /= _res.nscount;
- if ((long) timeout.tv_sec <= 0)
- timeout.tv_sec = 1;
- timeout.tv_usec = 0;
-#ifndef NOPOLL
- }
-#endif
- wait:
- if (s < 0) {
- Perror(stderr, "s out-of-bounds", EMFILE);
- res_close();
- goto next_ns;
- }
-#ifndef NOPOLL
- if (use_poll) {
- struct sigaction sa, osa;
- int sigsys_installed = 0;
-
- pfd.fd = s;
- pfd.events = POLLIN;
- if (use_poll == 1) {
- bzero(&sa, sizeof(sa));
- sa.sa_handler = SIG_IGN;
- if (sigaction(SIGSYS, &sa, &osa) >= 0)
- sigsys_installed = 1;
- }
- n = poll(&pfd, 1, msec);
- if (sigsys_installed == 1) {
- int oerrno = errno;
- sigaction(SIGSYS, &osa, NULL);
- errno = oerrno;
- }
- /* XXX why does nosys() return EINVAL? */
- if (n < 0 && (errno == ENOSYS ||
- errno == EINVAL)) {
- use_poll = 0;
- goto othersyscall;
- } else if (use_poll == 1)
- use_poll = 2;
- if (n < 0) {
- if (errno == EINTR)
- goto wait;
- Perror(stderr, "poll", errno);
- res_close();
- goto next_ns;
- }
- } else {
-#endif
-#ifndef NOSELECT
- dsmasklen = howmany(s + 1, NFDBITS) *
- sizeof(fd_mask);
- if (dsmasklen > sizeof(fd_set)) {
- dsmaskp = (fd_set *)malloc(dsmasklen);
- if (dsmaskp == NULL) {
- res_close();
- goto next_ns;
- }
- } else
- dsmaskp = &dsmask;
- /* only zero what we need */
- bzero((char *)dsmaskp, dsmasklen);
- FD_SET(s, dsmaskp);
- n = select(s + 1, dsmaskp, (fd_set *)NULL,
- (fd_set *)NULL, &timeout);
- if (dsmaskp != &dsmask)
- free(dsmaskp);
- if (n < 0) {
- if (errno == EINTR)
- goto wait;
- Perror(stderr, "select", errno);
- res_close();
- goto next_ns;
- }
-#endif
-#ifndef NOPOLL
- }
-#endif
-
-#ifdef NOSELECT
- setsockopt (s, SOL_SOCKET, SO_RCVTIMEO, &timeout, sizeof timeout);
-#else
- if (n == 0) {
- /*
- * timeout
- */
- Dprint(_res.options & RES_DEBUG,
- (stdout, ";; timeout\n"));
- gotsomewhere = 1;
- res_close();
- goto next_ns;
- }
-#endif
- errno = 0;
- fromlen = sizeof(struct sockaddr_in);
- resplen = recvfrom(s, (char*)ans, anssiz, 0,
- (struct sockaddr *)&from, &fromlen);
- if (resplen <= 0) {
-#ifdef NOSELECT
- if (errno == ETIMEDOUT) {
- Dprint(_res.options & RES_DEBUG,
- (stdout, ";; timeout\n"));
- gotsomewhere = 1;
- res_close();
- goto next_ns;
- }
-#endif
- Perror(stderr, "recvfrom", errno);
- res_close();
- goto next_ns;
- }
- gotsomewhere = 1;
- if (resplen < HFIXEDSZ) {
- /*
- * Undersized message.
- */
- Dprint(_res.options & RES_DEBUG,
- (stdout, ";; undersized: %d\n",
- resplen));
- terrno = EMSGSIZE;
- badns |= (1 << ns);
- res_close();
- goto next_ns;
- }
- if (hp->id != anhp->id) {
- /*
- * response from old query, ignore it.
- * XXX - potential security hazard could
- * be detected here.
- */
- DprintQ((_res.options & RES_DEBUG) ||
- (_res.pfcode & RES_PRF_REPLY),
- (stdout, ";; old answer:\n"),
- ans, (resplen>anssiz)?anssiz:resplen);
- goto wait;
- }
-#ifdef CHECK_SRVR_ADDR
- if (!(_res.options & RES_INSECURE1) &&
- !res_isourserver(&from)) {
- /*
- * response from wrong server? ignore it.
- * XXX - potential security hazard could
- * be detected here.
- */
- DprintQ((_res.options & RES_DEBUG) ||
- (_res.pfcode & RES_PRF_REPLY),
- (stdout, ";; not our server:\n"),
- ans, (resplen>anssiz)?anssiz:resplen);
- goto wait;
- }
-#endif
- if (!(_res.options & RES_INSECURE2) &&
- !res_queriesmatch(buf, buf + buflen,
- ans, ans + anssiz)) {
- /*
- * response contains wrong query? ignore it.
- * XXX - potential security hazard could
- * be detected here.
- */
- DprintQ((_res.options & RES_DEBUG) ||
- (_res.pfcode & RES_PRF_REPLY),
- (stdout, ";; wrong query name:\n"),
- ans, (resplen>anssiz)?anssiz:resplen);
- goto wait;
- }
- if (anhp->rcode == SERVFAIL ||
- anhp->rcode == NOTIMP ||
- anhp->rcode == REFUSED) {
- DprintQ(_res.options & RES_DEBUG,
- (stdout, "server rejected query:\n"),
- ans, (resplen>anssiz)?anssiz:resplen);
- badns |= (1 << ns);
- res_close();
- /* don't retry if called from dig */
- if (!_res.pfcode)
- goto next_ns;
- }
- if (!(_res.options & RES_IGNTC) && anhp->tc) {
- /*
- * get rest of answer;
- * use TCP with same server.
- */
- Dprint(_res.options & RES_DEBUG,
- (stdout, ";; truncated answer\n"));
- v_circuit = 1;
- res_close();
- goto same_ns;
- }
- } /*if vc/dg*/
- Dprint((_res.options & RES_DEBUG) ||
- ((_res.pfcode & RES_PRF_REPLY) &&
- (_res.pfcode & RES_PRF_HEAD1)),
- (stdout, ";; got answer:\n"));
- DprintQ((_res.options & RES_DEBUG) ||
- (_res.pfcode & RES_PRF_REPLY),
- (stdout, "%s", ""),
- ans, (resplen>anssiz)?anssiz:resplen);
- /*
- * If using virtual circuits, we assume that the first server
- * is preferred over the rest (i.e. it is on the local
- * machine) and only keep that one open.
- * If we have temporarily opened a virtual circuit,
- * or if we haven't been asked to keep a socket open,
- * close the socket.
- */
- if ((v_circuit && (!(_res.options & RES_USEVC) || ns != 0)) ||
- !(_res.options & RES_STAYOPEN)) {
- res_close();
- }
- if (Rhook) {
- int done = 0, loops = 0;
-
- do {
- res_sendhookact act;
-
- act = (*Rhook)(nsap, buf, buflen,
- ans, anssiz, &resplen);
- switch (act) {
- case res_goahead:
- case res_done:
- done = 1;
- break;
- case res_nextns:
- res_close();
- goto next_ns;
- case res_modified:
- /* give the hook another try */
- if (++loops < 42) /*doug adams*/
- break;
- /*FALLTHROUGH*/
- case res_error:
- /*FALLTHROUGH*/
- default:
- return (-1);
- }
- } while (!done);
-
- }
- return (resplen);
- next_ns: ;
- } /*foreach ns*/
- } /*foreach retry*/
- res_close();
- if (!v_circuit) {
- if (!gotsomewhere)
- errno = ECONNREFUSED; /* no nameservers found */
- else
- errno = ETIMEDOUT; /* no answer obtained */
- } else
- errno = terrno;
- return (-1);
-}
-
-/*
- * This routine is for closing the socket if a virtual circuit is used and
- * the program wants to close it. This provides support for endhostent()
- * which expects to close the socket.
- *
- * This routine is not expected to be user visible.
- */
-void
-res_close()
-{
- if (s >= 0) {
- (void) close(s);
- s = -1;
- connected = 0;
- vc = 0;
- }
-}
diff --git a/cpukit/libnetworking/libc/res_stubs.c b/cpukit/libnetworking/libc/res_stubs.c
deleted file mode 100644
index 92cf0fac54..0000000000
--- a/cpukit/libnetworking/libc/res_stubs.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (C) 1996 Peter Wemm <peter@freebsd.org>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-/*
- * This file is for FreeBSD-3.0 that has a bind-4.9.5-P1 derived
- * resolver in the libc. It provides aliases for functions that
- * have moved since 4.9.4-P1.
- *
- * I'll save everybody the trouble and say it now: *THIS IS A HACK*!
- *
- * Yes, many of these are private functions to the resolver, but some are
- * needed as there is no other way to provide the functionality and they've
- * turned up all over the place. :-(
- */
-
-#include <sys/types.h>
-#include <sys/cdefs.h>
-
-__weak_reference(__inet_addr, inet_addr);
-__weak_reference(__inet_aton, inet_aton);
-__weak_reference(__inet_lnaof, inet_lnaof);
-__weak_reference(__inet_makeaddr, inet_makeaddr);
-__weak_reference(__inet_neta, inet_neta);
-__weak_reference(__inet_netof, inet_netof);
-__weak_reference(__inet_network, inet_network);
-__weak_reference(__inet_net_ntop, inet_net_ntop);
-__weak_reference(__inet_net_pton, inet_net_pton);
-__weak_reference(__inet_ntoa, inet_ntoa);
-__weak_reference(__inet_pton, inet_pton);
-__weak_reference(__inet_ntop, inet_ntop);
-__weak_reference(__inet_nsap_addr, inet_nsap_addr);
-__weak_reference(__inet_nsap_ntoa, inet_nsap_ntoa);
-
-__weak_reference(__sym_ston, sym_ston);
-__weak_reference(__sym_ntos, sym_ntos);
-__weak_reference(__sym_ntop, sym_ntop);
-__weak_reference(__fp_resstat, fp_resstat);
-__weak_reference(__p_query, p_query);
-__weak_reference(__p_fqnname, p_fqnname);
-__weak_reference(__p_secstodate, p_secstodate);
-__weak_reference(__dn_count_labels, dn_count_labels);
-__weak_reference(__dn_comp, dn_comp);
-__weak_reference(__res_close, _res_close);
-__weak_reference(__dn_expand, dn_expand);
-__weak_reference(__res_init, res_init);
-__weak_reference(__res_query, res_query);
-__weak_reference(__res_search, res_search);
-__weak_reference(__res_querydomain, res_querydomain);
-__weak_reference(__res_mkquery, res_mkquery);
-__weak_reference(__res_send, res_send);
diff --git a/cpukit/libnetworking/libc/res_update.c b/cpukit/libnetworking/libc/res_update.c
deleted file mode 100644
index ef591e0674..0000000000
--- a/cpukit/libnetworking/libc/res_update.c
+++ /dev/null
@@ -1,518 +0,0 @@
-#if !defined(__rtems__)
-#if !defined(lint) && !defined(SABER)
-static char rcsid[] = "$Id$";
-#endif /* not lint */
-#endif /* not rtems */
-
-/*
- * Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-/*
- * Based on the Dynamic DNS reference implementation by Viraj Bais
- * <viraj_bais@ccm.fm.intel.com>
- */
-
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <sys/time.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-#include <errno.h>
-#include <limits.h>
-#include <netdb.h>
-#include <resolv.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-/*
- * Separate a linked list of records into groups so that all records
- * in a group will belong to a single zone on the nameserver.
- * Create a dynamic update packet for each zone and send it to the
- * nameservers for that zone, and await answer.
- * Abort if error occurs in updating any zone.
- * Return the number of zones updated on success, < 0 on error.
- *
- * On error, caller must deal with the unsynchronized zones
- * eg. an A record might have been successfully added to the forward
- * zone but the corresponding PTR record would be missing if error
- * was encountered while updating the reverse zone.
- */
-
-#define NSMAX 16
-
-struct ns1 {
- char nsname[MAXDNAME];
- struct in_addr nsaddr1;
-};
-
-struct zonegrp {
- char z_origin[MAXDNAME];
- int16_t z_class;
- char z_soardata[MAXDNAME + 5 * INT32SZ];
- struct ns1 z_ns[NSMAX];
- int z_nscount;
- ns_updrec * z_rr;
- struct zonegrp *z_next;
-};
-
-
-int
-res_update(ns_updrec *rrecp_in) {
- ns_updrec *rrecp, *tmprrecp;
- u_char buf[PACKETSZ], answer[PACKETSZ], packet[2*PACKETSZ];
- char name[MAXDNAME], zname[MAXDNAME], primary[MAXDNAME],
- mailaddr[MAXDNAME];
- u_char soardata[2*MAXCDNAME+5*INT32SZ];
- char *dname, *svdname, *cp1, *target;
- u_char *cp, *eom;
- HEADER *hp = (HEADER *) answer;
- struct zonegrp *zptr = NULL, *tmpzptr, *prevzptr, *zgrp_start = NULL;
- int i, j, k = 0, n, ancount, nscount, arcount, rcode, rdatasize,
- newgroup, done, myzone, seen_before, numzones = 0;
- u_int16_t dlen, class, qclass, type, qtype;
- u_int32_t ttl;
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
- h_errno = NETDB_INTERNAL;
- return (-1);
- }
-
- for (rrecp = rrecp_in; rrecp; rrecp = rrecp->r_next) {
- dname = rrecp->r_dname;
- n = strlen(dname);
- if (dname[n-1] == '.')
- dname[n-1] = '\0';
- qtype = T_SOA;
- qclass = rrecp->r_class;
- done = 0;
- seen_before = 0;
-
- while (!done && dname) {
- if (qtype == T_SOA) {
- for (tmpzptr = zgrp_start;
- tmpzptr && !seen_before;
- tmpzptr = tmpzptr->z_next) {
- if (strcasecmp(dname,
- tmpzptr->z_origin) == 0 &&
- tmpzptr->z_class == qclass)
- seen_before++;
- for (tmprrecp = tmpzptr->z_rr;
- tmprrecp && !seen_before;
- tmprrecp = tmprrecp->r_grpnext)
- if (strcasecmp(dname, tmprrecp->r_dname) == 0
- && tmprrecp->r_class == qclass) {
- seen_before++;
- break;
- }
- if (seen_before) {
- /*
- * Append to the end of
- * current group.
- */
- for (tmprrecp = tmpzptr->z_rr;
- tmprrecp->r_grpnext;
- tmprrecp = tmprrecp->r_grpnext)
- (void)NULL;
- tmprrecp->r_grpnext = rrecp;
- rrecp->r_grpnext = NULL;
- done = 1;
- break;
- }
- }
- } else if (qtype == T_A) {
- for (tmpzptr = zgrp_start;
- tmpzptr && !done;
- tmpzptr = tmpzptr->z_next)
- for (i = 0; i < tmpzptr->z_nscount; i++)
- if (tmpzptr->z_class == qclass &&
- strcasecmp(tmpzptr->z_ns[i].nsname,
- dname) == 0 &&
- tmpzptr->z_ns[i].nsaddr1.s_addr != 0) {
- zptr->z_ns[k].nsaddr1.s_addr =
- tmpzptr->z_ns[i].nsaddr1.s_addr;
- done = 1;
- break;
- }
- }
- if (done)
- break;
- n = res_mkquery(QUERY, dname, qclass, qtype, NULL,
- 0, NULL, buf, sizeof buf);
- if (n <= 0) {
- fprintf(stderr, "res_update: mkquery failed\n");
- return (n);
- }
- n = res_send(buf, n, answer, sizeof answer);
- if (n < 0) {
- fprintf(stderr, "res_update: send error for %s\n",
- rrecp->r_dname);
- return (n);
- }
- if (n < HFIXEDSZ)
- return (-1);
- ancount = ntohs(hp->ancount);
- nscount = ntohs(hp->nscount);
- arcount = ntohs(hp->arcount);
- rcode = hp->rcode;
- cp = answer + HFIXEDSZ;
- eom = answer + n;
- /* skip the question section */
- n = dn_skipname(cp, eom);
- if (n < 0 || cp + n + 2 * INT16SZ > eom)
- return (-1);
- cp += n + 2 * INT16SZ;
-
- if (qtype == T_SOA) {
- if (ancount == 0 && nscount == 0 && arcount == 0) {
- /*
- * if (rcode == NOERROR) then the dname exists but
- * has no soa record associated with it.
- * if (rcode == NXDOMAIN) then the dname does not
- * exist and the server is replying out of NCACHE.
- * in either case, proceed with the next try
- */
- dname = strchr(dname, '.');
- if (dname != NULL)
- dname++;
- continue;
- } else if ((rcode == NOERROR || rcode == NXDOMAIN) &&
- ancount == 0 &&
- nscount == 1 && arcount == 0) {
- /*
- * name/data does not exist, soa record supplied in the
- * authority section
- */
- /* authority section must contain the soa record */
- if ((n = dn_expand(answer, eom, cp, zname,
- sizeof zname)) < 0)
- return (n);
- cp += n;
- if (cp + 2 * INT16SZ > eom)
- return (-1);
- GETSHORT(type, cp);
- GETSHORT(class, cp);
- if (type != T_SOA || class != qclass) {
- fprintf(stderr, "unknown answer\n");
- return (-1);
- }
- myzone = 0;
- svdname = dname;
- while (dname)
- if (strcasecmp(dname, zname) == 0) {
- myzone = 1;
- break;
- } else if ((dname = strchr(dname, '.')) != NULL)
- dname++;
- if (!myzone) {
- dname = strchr(svdname, '.');
- if (dname != NULL)
- dname++;
- continue;
- }
- nscount = 0;
- /* fallthrough */
- } else if (rcode == NOERROR && ancount == 1) {
- /*
- * found the zone name
- * new servers will supply NS records for the zone
- * in authority section and A records for those
- * nameservers in the additional section
- * older servers have to be explicitly queried for
- * NS records for the zone
- */
- /* answer section must contain the soa record */
- if ((n = dn_expand(answer, eom, cp, zname,
- sizeof zname)) < 0)
- return (n);
- else
- cp += n;
- if (cp + 2 * INT16SZ > eom)
- return (-1);
- GETSHORT(type, cp);
- GETSHORT(class, cp);
- if (type == T_CNAME) {
- dname = strchr(dname, '.');
- if (dname != NULL)
- dname++;
- continue;
- }
- if (strcasecmp(dname, zname) != 0 ||
- type != T_SOA ||
- class != rrecp->r_class) {
- fprintf(stderr, "unknown answer\n");
- return (-1);
- }
- /* FALLTHROUGH */
- } else {
- fprintf(stderr,
- "unknown response: ans=%d, auth=%d, add=%d, rcode=%d\n",
- ancount, nscount, arcount, hp->rcode);
- return (-1);
- }
- if (cp + INT32SZ + INT16SZ > eom)
- return (-1);
- /* continue processing the soa record */
- GETLONG(ttl, cp);
- GETSHORT(dlen, cp);
- if (cp + dlen > eom)
- return (-1);
- newgroup = 1;
- zptr = zgrp_start;
- prevzptr = NULL;
- while (zptr) {
- if (strcasecmp(zname, zptr->z_origin) == 0 &&
- type == T_SOA && class == qclass) {
- newgroup = 0;
- break;
- }
- prevzptr = zptr;
- zptr = zptr->z_next;
- }
- if (!newgroup) {
- for (tmprrecp = zptr->z_rr;
- tmprrecp->r_grpnext;
- tmprrecp = tmprrecp->r_grpnext)
- ;
- tmprrecp->r_grpnext = rrecp;
- rrecp->r_grpnext = NULL;
- done = 1;
- cp += dlen;
- break;
- } else {
- if ((n = dn_expand(answer, eom, cp, primary,
- sizeof primary)) < 0)
- return (n);
- cp += n;
- /*
- * We don't have to bounds check here because the
- * next use of 'cp' is in dn_expand().
- */
- cp1 = (char *)soardata;
- strcpy(cp1, primary);
- cp1 += strlen(cp1) + 1;
- if ((n = dn_expand(answer, eom, cp, mailaddr,
- sizeof mailaddr)) < 0)
- return (n);
- cp += n;
- strcpy(cp1, mailaddr);
- cp1 += strlen(cp1) + 1;
- if (cp + 5*INT32SZ > eom)
- return (-1);
- memcpy(cp1, cp, 5*INT32SZ);
- cp += 5*INT32SZ;
- cp1 += 5*INT32SZ;
- rdatasize = (u_char *)cp1 - soardata;
- zptr = calloc(1, sizeof(struct zonegrp));
- if (zptr == NULL)
- return (-1);
- if (zgrp_start == NULL)
- zgrp_start = zptr;
- else
- prevzptr->z_next = zptr;
- zptr->z_rr = rrecp;
- rrecp->r_grpnext = NULL;
- strcpy(zptr->z_origin, zname);
- zptr->z_class = class;
- memcpy(zptr->z_soardata, soardata, rdatasize);
- /* fallthrough to process NS and A records */
- }
- } else if (qtype == T_NS) {
- if (rcode == NOERROR && ancount > 0) {
- strcpy(zname, dname);
- for (zptr = zgrp_start; zptr; zptr = zptr->z_next) {
- if (strcasecmp(zname, zptr->z_origin) == 0)
- break;
- }
- if (zptr == NULL)
- /* should not happen */
- return (-1);
- if (nscount > 0) {
- /*
- * answer and authority sections contain
- * the same information, skip answer section
- */
- for (j = 0; j < ancount; j++) {
- n = dn_skipname(cp, eom);
- if (n < 0)
- return (-1);
- n += 2*INT16SZ + INT32SZ;
- if (cp + n + INT16SZ > eom)
- return (-1);
- cp += n;
- GETSHORT(dlen, cp);
- cp += dlen;
- }
- } else
- nscount = ancount;
- /* fallthrough to process NS and A records */
- } else {
- fprintf(stderr, "cannot determine nameservers for %s:\
-ans=%d, auth=%d, add=%d, rcode=%d\n",
- dname, ancount, nscount, arcount, hp->rcode);
- return (-1);
- }
- } else if (qtype == T_A) {
- if (rcode == NOERROR && ancount > 0) {
- arcount = ancount;
- ancount = nscount = 0;
- /* fallthrough to process A records */
- } else {
- fprintf(stderr, "cannot determine address for %s:\
-ans=%d, auth=%d, add=%d, rcode=%d\n",
- dname, ancount, nscount, arcount, hp->rcode);
- return (-1);
- }
- }
- /* process NS records for the zone */
- j = 0;
- for (i = 0; i < nscount; i++) {
- if ((n = dn_expand(answer, eom, cp, name,
- sizeof name)) < 0)
- return (n);
- cp += n;
- if (cp + 3 * INT16SZ + INT32SZ > eom)
- return (-1);
- GETSHORT(type, cp);
- GETSHORT(class, cp);
- GETLONG(ttl, cp);
- GETSHORT(dlen, cp);
- if (cp + dlen > eom)
- return (-1);
- if (strcasecmp(name, zname) == 0 &&
- type == T_NS && class == qclass) {
- if ((n = dn_expand(answer, eom, cp,
- name, sizeof name)) < 0)
- return (n);
- target = zptr->z_ns[j++].nsname;
- strcpy(target, name);
- }
- cp += dlen;
- }
- if (zptr->z_nscount == 0)
- zptr->z_nscount = j;
- /* get addresses for the nameservers */
- for (i = 0; i < arcount; i++) {
- if ((n = dn_expand(answer, eom, cp, name,
- sizeof name)) < 0)
- return (n);
- cp += n;
- if (cp + 3 * INT16SZ + INT32SZ > eom)
- return (-1);
- GETSHORT(type, cp);
- GETSHORT(class, cp);
- GETLONG(ttl, cp);
- GETSHORT(dlen, cp);
- if (cp + dlen > eom)
- return (-1);
- if (type == T_A && dlen == INT32SZ && class == qclass) {
- for (j = 0; j < zptr->z_nscount; j++)
- if (strcasecmp(name, zptr->z_ns[j].nsname) == 0) {
- memcpy(&zptr->z_ns[j].nsaddr1.s_addr, cp,
- INT32SZ);
- break;
- }
- }
- cp += dlen;
- }
- if (zptr->z_nscount == 0) {
- dname = zname;
- qtype = T_NS;
- continue;
- }
- done = 1;
- for (k = 0; k < zptr->z_nscount; k++)
- if (zptr->z_ns[k].nsaddr1.s_addr == 0) {
- done = 0;
- dname = zptr->z_ns[k].nsname;
- qtype = T_A;
- }
-
- } /* while */
- }
-
- _res.options |= RES_DEBUG;
- for (zptr = zgrp_start; zptr; zptr = zptr->z_next) {
-
- /* append zone section */
- rrecp = res_mkupdrec(ns_s_zn, zptr->z_origin,
- zptr->z_class, ns_t_soa, 0);
- if (rrecp == NULL) {
- fprintf(stderr, "saverrec error\n");
- fflush(stderr);
- return (-1);
- }
- rrecp->r_grpnext = zptr->z_rr;
- zptr->z_rr = rrecp;
-
- n = res_mkupdate(zptr->z_rr, packet, sizeof packet);
- if (n < 0) {
- fprintf(stderr, "res_mkupdate error\n");
- fflush(stderr);
- return (-1);
- } else
- fprintf(stdout, "res_mkupdate: packet size = %d\n", n);
-
- /*
- * Override the list of NS records from res_init() with
- * the authoritative nameservers for the zone being updated.
- * Sort primary to be the first in the list of nameservers.
- */
- for (i = 0; i < zptr->z_nscount; i++) {
- if (strcasecmp(zptr->z_ns[i].nsname,
- zptr->z_soardata) == 0) {
- struct in_addr tmpaddr;
-
- if (i != 0) {
- strcpy(zptr->z_ns[i].nsname,
- zptr->z_ns[0].nsname);
- strcpy(zptr->z_ns[0].nsname,
- zptr->z_soardata);
- tmpaddr = zptr->z_ns[i].nsaddr1;
- zptr->z_ns[i].nsaddr1 =
- zptr->z_ns[0].nsaddr1;
- zptr->z_ns[0].nsaddr1 = tmpaddr;
- }
- break;
- }
- }
- for (i = 0; i < MAXNS; i++) {
- _res.nsaddr_list[i].sin_addr = zptr->z_ns[i].nsaddr1;
- _res.nsaddr_list[i].sin_family = AF_INET;
- _res.nsaddr_list[i].sin_port = htons(NAMESERVER_PORT);
- }
- _res.nscount = (zptr->z_nscount < MAXNS) ?
- zptr->z_nscount : MAXNS;
- n = res_send(packet, n, answer, sizeof(answer));
- if (n < 0) {
- fprintf(stderr, "res_send: send error, n=%d\n", n);
- break;
- } else
- numzones++;
- }
-
- /* free malloc'ed memory */
- while(zgrp_start) {
- zptr = zgrp_start;
- zgrp_start = zgrp_start->z_next;
- res_freeupdrec(zptr->z_rr); /* Zone section we allocated. */
- free((char *)zptr);
- }
-
- return (numzones);
-}
diff --git a/cpukit/libnetworking/libc/resolver.3 b/cpukit/libnetworking/libc/resolver.3
deleted file mode 100644
index 8c6f18334f..0000000000
--- a/cpukit/libnetworking/libc/resolver.3
+++ /dev/null
@@ -1,352 +0,0 @@
-.\" Copyright (c) 1985, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)resolver.3 8.1 (Berkeley) 6/4/93
-.\" $Id$
-.\"
-.Dd June 4, 1993
-.Dt RESOLVER 3
-.Os BSD 4.3
-.Sh NAME
-.Nm res_query ,
-.Nm res_search ,
-.Nm res_mkquery ,
-.Nm res_send ,
-.Nm res_init ,
-.Nm dn_comp ,
-.Nm dn_expand
-.Nd resolver routines
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <netinet/in.h>
-.Fd #include <arpa/nameser.h>
-.Fd #include <resolv.h>
-.Ft int
-.Fo res_query
-.Fa "const char *dname"
-.Fa "int class"
-.Fa "int type"
-.Fa "u_char *answer"
-.Fa "int anslen"
-.Fc
-.Ft int
-.Fo res_search
-.Fa "const char *dname"
-.Fa "int class"
-.Fa "int type"
-.Fa "u_char *answer"
-.Fa "int anslen"
-.Fc
-.Ft int
-.Fo res_mkquery
-.Fa "int op"
-.Fa "const char *dname"
-.Fa "int class"
-.Fa "int type"
-.Fa "const u_char *data"
-.Fa "int datalen"
-.Fa "const u_char *newrr_in"
-.Fa "u_char *buf"
-.Fa "int buflen"
-.Fc
-.Ft int
-.Fo res_send
-.Fa "const u_char *msg"
-.Fa "int msglen"
-.Fa "u_char *answer"
-.Fa "int anslen"
-.Fc
-.Ft int
-.Fn res_init
-.Fo dn_comp
-.Fa "const char *exp_dn"
-.Fa "u_char *comp_dn"
-.Fa "int length"
-.Fa "u_char **dnptrs"
-.Fa "u_char **lastdnptr"
-.Fc
-.Ft int
-.Fo dn_expand
-.Fa "const u_char *msg"
-.Fa "const u_char *eomorig"
-.Fa "const u_char *comp_dn"
-.Fa "char *exp_dn"
-.Fa "int length"
-.Fc
-.Sh DESCRIPTION
-These routines are used for making, sending and interpreting
-query and reply messages with Internet domain name servers.
-.Pp
-Global configuration and state information that is used by the
-resolver routines is kept in the structure
-.Em _res .
-Most of the values have reasonable defaults and can be ignored.
-Options
-stored in
-.Em _res.options
-are defined in
-.Pa resolv.h
-and are as follows.
-Options are stored as a simple bit mask containing the bitwise ``or''
-of the options enabled.
-.Bl -tag -width RES_DEFNAMES
-.It Dv RES_INIT
-True if the initial name server address and default domain name are
-initialized (i.e.,
-.Fn res_init
-has been called).
-.It Dv RES_DEBUG
-Print debugging messages.
-.It Dv RES_AAONLY
-Accept authoritative answers only.
-With this option,
-.Fn res_send
-should continue until it finds an authoritative answer or finds an error.
-Currently this is not implemented.
-.It Dv RES_USEVC
-Use
-.Tn TCP
-connections for queries instead of
-.Tn UDP
-datagrams.
-.It Dv RES_STAYOPEN
-Used with
-.Dv RES_USEVC
-to keep the
-.Tn TCP
-connection open between
-queries.
-This is useful only in programs that regularly do many queries.
-.Tn UDP
-should be the normal mode used.
-.It Dv RES_IGNTC
-Unused currently (ignore truncation errors, i.e., don't retry with
-.Tn TCP ) .
-.It Dv RES_RECURSE
-Set the recursion-desired bit in queries.
-This is the default.
-.Pf ( Fn res_send
-does not do iterative queries and expects the name server
-to handle recursion.)
-.It Dv RES_DEFNAMES
-If set,
-.Fn res_search
-will append the default domain name to single-component names
-(those that do not contain a dot).
-This option is enabled by default.
-.It Dv RES_DNSRCH
-If this option is set,
-.Fn res_search
-will search for host names in the current domain and in parent domains; see
-.Xr hostname 7 .
-This is used by the standard host lookup routine
-.Xr gethostbyname 3 .
-This option is enabled by default.
-.It Dv RES_NOALIASES
-This option turns off the user level aliasing feature controlled by the
-.Dq Ev HOSTALIASES
-environment variable. Network daemons should set this option.
-.El
-.Pp
-The
-.Fn res_init
-routine
-reads the configuration file (if any; see
-.Xr resolver 5 )
-to get the default domain name,
-search list and
-the Internet address of the local name server(s).
-If no server is configured, the host running
-the resolver is tried.
-The current domain name is defined by the hostname
-if not specified in the configuration file;
-it can be overridden by the environment variable
-.Ev LOCALDOMAIN .
-This environment variable may contain several blank-separated
-tokens if you wish to override the
-.Em "search list"
-on a per-process basis. This is similar to the
-.Em search
-command in the configuration file.
-Another environment variable (
-.Dq Ev RES_OPTIONS
-can be set to
-override certain internal resolver options which are otherwise
-set by changing fields in the
-.Em _res
-structure or are inherited from the configuration file's
-.Em options
-command. The syntax of the
-.Dq Ev RES_OPTIONS
-environment variable is explained in
-.Xr resolver 5 .
-Initialization normally occurs on the first call
-to one of the following routines.
-.Pp
-The
-.Fn res_query
-function provides an interface to the server query mechanism.
-It constructs a query, sends it to the local server,
-awaits a response, and makes preliminary checks on the reply.
-The query requests information of the specified
-.Fa type
-and
-.Fa class
-for the specified fully-qualified domain name
-.Fa dname .
-The reply message is left in the
-.Fa answer
-buffer with length
-.Fa anslen
-supplied by the caller.
-.Pp
-The
-.Fn res_search
-routine makes a query and awaits a response like
-.Fn res_query ,
-but in addition, it implements the default and search rules
-controlled by the
-.Dv RES_DEFNAMES
-and
-.Dv RES_DNSRCH
-options.
-It returns the first successful reply.
-.Pp
-The remaining routines are lower-level routines used by
-.Fn res_query .
-The
-.Fn res_mkquery
-function
-constructs a standard query message and places it in
-.Fa buf .
-It returns the size of the query, or \-1 if the query is
-larger than
-.Fa buflen .
-The query type
-.Fa op
-is usually
-.Dv QUERY ,
-but can be any of the query types defined in
-.Aq Pa arpa/nameser.h .
-The domain name for the query is given by
-.Fa dname .
-.Fa Newrr
-is currently unused but is intended for making update messages.
-.Pp
-The
-.Fn res_send
-routine
-sends a pre-formatted query and returns an answer.
-It will call
-.Fn res_init
-if
-.Dv RES_INIT
-is not set, send the query to the local name server, and
-handle timeouts and retries.
-The length of the reply message is returned, or
-\-1 if there were errors.
-.Pp
-The
-.Fn dn_comp
-function
-compresses the domain name
-.Fa exp_dn
-and stores it in
-.Fa comp_dn .
-The size of the compressed name is returned or \-1 if there were errors.
-The size of the array pointed to by
-.Fa comp_dn
-is given by
-.Fa length .
-The compression uses
-an array of pointers
-.Fa dnptrs
-to previously-compressed names in the current message.
-The first pointer points to
-to the beginning of the message and the list ends with
-.Dv NULL .
-The limit to the array is specified by
-.Fa lastdnptr .
-A side effect of
-.Fn dn_comp
-is to update the list of pointers for
-labels inserted into the message
-as the name is compressed.
-If
-.Em dnptr
-is
-.Dv NULL, names are not compressed.
-If
-.Fa lastdnptr
-is
-.Dv NULL ,
-the list of labels is not updated.
-.Pp
-The
-.Fn dn_expand
-entry
-expands the compressed domain name
-.Fa comp_dn
-to a full domain name
-The compressed name is contained in a query or reply message;
-.Fa msg
-is a pointer to the beginning of the message.
-The uncompressed name is placed in the buffer indicated by
-.Fa exp_dn
-which is of size
-.Fa length .
-The size of compressed name is returned or \-1 if there was an error.
-.Sh FILES
-.Bl -tag -width Pa
-/etc/resolv.conf
-The configuration file
-see
-.Xr resolver 5 .
-.El
-.Sh SEE ALSO
-.Xr gethostbyname 3 ,
-.Xr resolver 5 ,
-.Xr hostname 7 ,
-.Xr named 8
-.Pp
-.%T RFC1032 ,
-.%T RFC1033 ,
-.%T RFC1034 ,
-.%T RFC1035 ,
-.%T RFC974
-.Rs
-.%T "Name Server Operations Guide for BIND"
-.Re
-.Sh HISTORY
-The
-.Nm
-function appeared in
-.Bx 4.3 .
diff --git a/cpukit/libnetworking/libc/send.c b/cpukit/libnetworking/libc/send.c
deleted file mode 100644
index ad14bd3cd2..0000000000
--- a/cpukit/libnetworking/libc/send.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)send.c 8.2 (Berkeley) 2/21/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/socket.h>
-
-#include <stddef.h>
-
-ssize_t
-send(s, msg, len, flags)
- int s, flags;
- size_t len;
- const void *msg;
-{
- return (sendto(s, msg, len, flags, NULL, 0));
-}
diff --git a/cpukit/libnetworking/libc/strsep.c b/cpukit/libnetworking/libc/strsep.c
deleted file mode 100644
index 182319493d..0000000000
--- a/cpukit/libnetworking/libc/strsep.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static const char sccsid[] = "@(#)strsep.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <string.h>
-#include <stdio.h>
-
-/*
- * Get next token from string *stringp, where tokens are possibly-empty
- * strings separated by characters from delim.
- *
- * Writes NULs into the string at *stringp to end tokens.
- * delim need not remain constant from call to call.
- * On return, *stringp points past the last NUL written (if there might
- * be further tokens), or is NULL (if there are definitely no more tokens).
- *
- * If *stringp is NULL, strsep returns NULL.
- *
- * PUBLIC: #ifndef HAVE_STRSEP
- * PUBLIC: char *strsep __P((char **, const char *));
- * PUBLIC: #endif
- */
-char *
-strsep(stringp, delim)
- register char **stringp;
- register const char *delim;
-{
- register char *s;
- register const char *spanp;
- register int c, sc;
- char *tok;
-
- if ((s = *stringp) == NULL)
- return (NULL);
- for (tok = s;;) {
- c = *s++;
- spanp = delim;
- do {
- if ((sc = *spanp++) == c) {
- if (c == 0)
- s = NULL;
- else
- s[-1] = 0;
- *stringp = s;
- return (tok);
- }
- } while (sc != 0);
- }
- /* NOTREACHED */
-}
diff --git a/cpukit/libnetworking/loop.h b/cpukit/libnetworking/loop.h
deleted file mode 100644
index 34e0b828e4..0000000000
--- a/cpukit/libnetworking/loop.h
+++ /dev/null
@@ -1,5 +0,0 @@
-/*
- * $Id$
- */
-
-#define NLOOP 1
diff --git a/cpukit/libnetworking/machine/Makefile.am b/cpukit/libnetworking/machine/Makefile.am
deleted file mode 100644
index 11e23bf86c..0000000000
--- a/cpukit/libnetworking/machine/Makefile.am
+++ /dev/null
@@ -1,10 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-EXTRA_DIST = conf.h cpu.h cpufunc.h endian.h in_cksum.h limits.h param.h \
- types.h vmparam.h
-
-include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/libnetworking/machine/conf.h b/cpukit/libnetworking/machine/conf.h
deleted file mode 100644
index 5a6ee0337b..0000000000
--- a/cpukit/libnetworking/machine/conf.h
+++ /dev/null
@@ -1,6 +0,0 @@
-/*
- * $Id$
- */
-
-/* intentionally empty file */
-
diff --git a/cpukit/libnetworking/machine/cpu.h b/cpukit/libnetworking/machine/cpu.h
deleted file mode 100644
index 5a6ee0337b..0000000000
--- a/cpukit/libnetworking/machine/cpu.h
+++ /dev/null
@@ -1,6 +0,0 @@
-/*
- * $Id$
- */
-
-/* intentionally empty file */
-
diff --git a/cpukit/libnetworking/machine/cpufunc.h b/cpukit/libnetworking/machine/cpufunc.h
deleted file mode 100644
index 2b4c47e48f..0000000000
--- a/cpukit/libnetworking/machine/cpufunc.h
+++ /dev/null
@@ -1,5 +0,0 @@
-/*
- * $Id$
- */
-
-/* intentionally empty file */
diff --git a/cpukit/libnetworking/machine/endian.h b/cpukit/libnetworking/machine/endian.h
deleted file mode 100644
index 6b17da58d3..0000000000
--- a/cpukit/libnetworking/machine/endian.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * $Id$
- */
-
-#ifndef _MACHINE_ENDIAN_H_
-#define _MACHINE_ENDIAN_H_
-
-#include <rtems/score/cpu.h>
-
-/*
- * BSD-style endian declaration
- */
-#define BIG_ENDIAN 4321
-#define LITTLE_ENDIAN 1234
-
-#if CPU_BIG_ENDIAN
-# define BYTE_ORDER BIG_ENDIAN
-#elif CPU_LITTLE_ENDIAN
-# define BYTE_ORDER LITTLE_ENDIAN
-#else
-# error "Can't decide which end is which!"
-#endif
-
-#if ( CPU_HAS_OWN_HOST_TO_NETWORK_ROUTINES == FALSE )
-
-#if ( CPU_BIG_ENDIAN == TRUE )
-
-/*
- * Very simply on big endian CPUs
- */
-
-#define ntohl(_x) (_x)
-#define ntohs(_x) (_x)
-#define htonl(_x) (_x)
-#define htons(_x) (_x)
-
-#define NTOHS(x)
-#define HTONS(x)
-#define NTOHL(x)
-#define HTONL(x)
-
-#elif ( CPU_LITTLE_ENDIAN == TRUE )
-
-/*
- * A little more complicated on little endian CPUs
- */
-
-#define ntohl(_x) ((long) CPU_swap_u32((unsigned32)_x))
-#define ntohs(_x) ((short) CPU_swap_u16((unsigned16)_x))
-#define htonl(_x) ((long) CPU_swap_u32((unsigned32)_x))
-#define htons(_x) ((short) CPU_swap_u16((unsigned16)_x))
-
-#define NTOHS(x) (x) = ntohs(x)
-#define HTONS(x) (x) = htons(x)
-#define NTOHL(x) (x) = ntohl(x)
-#define HTONL(x) (x) = htonl(x)
-
-#else
-#error "Unknown endian-ness for this cpu"
-#endif
-
-#endif /* CPU_HAS_OWN_HOST_TO_NETWORK_ROUTINES */
-
-#endif /* _MACHINE_ENDIAN_H_ */
diff --git a/cpukit/libnetworking/machine/in_cksum.h b/cpukit/libnetworking/machine/in_cksum.h
deleted file mode 100644
index dd2e01d4de..0000000000
--- a/cpukit/libnetworking/machine/in_cksum.h
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * from tahoe: in_cksum.c 1.2 86/01/05
- * from: @(#)in_cksum.c 1.3 (Berkeley) 1/19/91
- * from: Id: in_cksum.c,v 1.8 1995/12/03 18:35:19 bde Exp
- * $Id$
- */
-
-#ifndef _MACHINE_IN_CKSUM_H_
-#define _MACHINE_IN_CKSUM_H_ 1
-
-#include <sys/cdefs.h>
-
-/*
- * It it useful to have an Internet checksum routine which is inlineable
- * and optimized specifically for the task of computing IP header checksums
- * in the normal case (where there are no options and the header length is
- * therefore always exactly five 32-bit words.
- */
-
-/*
- * Optimized version for the i386 family
- */
-
-#if (defined(__GNUC__) && defined(__i386__))
-
-static __inline u_int
-in_cksum_hdr(const struct ip *ip)
-{
- register u_int sum = 0;
-
-#define ADD(n) \
- __asm__ volatile ("addl " #n "(%2), %0" : "=r" (sum) : "0" (sum), "r" (ip))
-#define ADDC(n) \
- __asm__ volatile ("adcl " #n "(%2), %0" : "=r" (sum) : "0" (sum), "r" (ip))
-#define MOP \
- __asm__ volatile ("adcl $0, %0" : "=r" (sum) : "0" (sum))
-
- ADD(0);
- ADDC(4);
- ADDC(8);
- ADDC(12);
- ADDC(16);
- MOP;
- sum = (sum & 0xffff) + (sum >> 16);
- if (sum > 0xffff)
- sum -= 0xffff;
-
- return ~sum & 0xffff;
-}
-
-static __inline void
-in_cksum_update(struct ip *ip)
-{
- int __tmpsum;
- __tmpsum = (int)ntohs(ip->ip_sum) + 256;
- ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16));
-}
-
-/*
- * Optimized version for the MC68xxx and Coldfire families
- */
-
-#elif (defined(__GNUC__) && (defined(__mc68000__) || defined(__m68k__)))
-
-static __inline__ u_int
-in_cksum_hdr(const struct ip *ip)
-{
- register u_int *ap = (u_int *)ip;
- register u_int sum = *ap++;
- register u_int tmp;
-
- __asm__("addl %2@+,%0\n\t"
- "movel %2@+,%1\n\t"
- "addxl %1,%0\n\t"
- "movel %2@+,%1\n\t"
- "addxl %1,%0\n\t"
- "movel %2@,%1\n\t"
- "addxl %1,%0\n\t"
- "moveq #0,%1\n\t"
- "addxl %1,%0\n" :
- "=d" (sum), "=d" (tmp), "=a" (ap) :
- "0" (sum), "2" (ap));
- sum = (sum & 0xffff) + (sum >> 16);
- if (sum > 0xffff)
- sum -= 0xffff;
- return ~sum & 0xffff;
-}
-
-/*
- * Optimized version for the PowerPC family
- */
-
-#elif (defined(__GNUC__) && (defined(__PPC__) || defined(__ppc__)))
-
-static __inline u_int
-in_cksum_hdr(const struct ip *ip)
-{
- register u_int sum = 0;
- register u_int tmp;
-
-#define ADD(n) \
- __asm__ volatile ("addc %0,%0,%2" : "=r" (sum) : "0" (sum), "r" (n))
-#define ADDC(n) \
- __asm__ volatile ("adde %0,%0,%2" : "=r" (sum) : "0" (sum), "r" (n))
-#define MOP \
- __asm__ volatile ("addic %0,%0,0" : "=r" (sum) : "0" (sum))
-
- tmp = *(((u_int *) ip)); ADD(tmp);
- tmp = *(((u_int *) ip) + 1); ADDC(tmp);
- tmp = *(((u_int *) ip) + 2); ADDC(tmp);
- tmp = *(((u_int *) ip) + 3); ADDC(tmp);
- tmp = *(((u_int *) ip) + 4); ADDC(tmp);
- tmp = 0; ADDC(tmp);
- sum = (sum & 0xffff) + (sum >> 16);
- if (sum > 0xffff)
- sum -= 0xffff;
-
- return ~sum & 0xffff;
-}
-
-static __inline void
-in_cksum_update(struct ip *ip)
-{
- int __tmpsum;
- __tmpsum = (int)ntohs(ip->ip_sum) + 256;
- ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16));
-}
-
-/*
- * SPARC Version
- */
-
-#elif (defined(__GNUC__) && defined(sparc))
-
-static __inline u_int
-in_cksum_hdr(const struct ip *ip)
-{
- register u_int sum = 0;
- register u_int tmp_o2;
- register u_int tmp_o3;
-
- __asm__ volatile ("
- ld [%0], %1 ; \
- ld [%0+4], %2 ; \
- addcc %1, %2, %1 ; \
- ld [%0+8], %2 ; \
- addxcc %1, %2, %1 ; \
- ld [%0+12], %2 ; \
- addxcc %1, %2, %1 ; \
- ld [%0+16], %2 ; \
- addxcc %1, %2, %1 ; \
- set 0x0ffff, %3 ; \
- srl %1, 16, %2 ; \
- and %1, %3, %1 ; \
- addx %1, %2, %1 ; \
- srl %1, 16, %1 ; \
- add %1, %%g0, %1 ; \
- neg %1 ; \
- and %1, %3, %1 ; \
- " : "=r" (ip), "=r" (sum), "=r" (tmp_o2), "=r" (tmp_o3)
- : "0" (ip), "1" (sum)
- );
- return sum;
-}
-
-#define in_cksum_update(ip) \
- do { \
- int __tmpsum; \
- __tmpsum = (int)ntohs(ip->ip_sum) + 256; \
- ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16)); \
- } while(0)
-/*
- * Here is the generic, portable, inefficient algorithm.
- */
-
-#else
-u_int in_cksum_hdr __P((const struct ip *));
-#define in_cksum_update(ip) \
- do { \
- int __tmpsum; \
- __tmpsum = (int)ntohs(ip->ip_sum) + 256; \
- ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16)); \
- } while(0)
-
-#endif
-
-#endif /* _MACHINE_IN_CKSUM_H_ */
diff --git a/cpukit/libnetworking/machine/limits.h b/cpukit/libnetworking/machine/limits.h
deleted file mode 100644
index 5a6ee0337b..0000000000
--- a/cpukit/libnetworking/machine/limits.h
+++ /dev/null
@@ -1,6 +0,0 @@
-/*
- * $Id$
- */
-
-/* intentionally empty file */
-
diff --git a/cpukit/libnetworking/machine/param.h b/cpukit/libnetworking/machine/param.h
deleted file mode 100644
index 4168f1f6cf..0000000000
--- a/cpukit/libnetworking/machine/param.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * $Id$
- */
-
-#ifndef _MACHINE_PARAM_H_
-#define _MACHINE_PARAM_H_
-
-/*
- * These aren't really machine-dependent for RTEMS.....
- */
-
-/*
-#define MACHINE "i386"
-#define MID_MACHINE MID_I386
-*/
-
-/*
- * Round p (pointer or byte index) up to a correctly-aligned value
- * for all data types (int, long, ...). The result is unsigned int
- * and must be cast to any desired pointer type.
- */
-#define ALIGNBYTES (sizeof(int) - 1)
-#define ALIGN(p) (((unsigned)(p) + ALIGNBYTES) & ~ALIGNBYTES)
-
-#define PAGE_SHIFT 12 /* LOG2(PAGE_SIZE) */
-#define PAGE_SIZE (1<<PAGE_SHIFT) /* bytes/page */
-#define PAGE_MASK (PAGE_SIZE-1)
-#define NPTEPG (PAGE_SIZE/(sizeof (pt_entry_t)))
-
-#define NPDEPG (PAGE_SIZE/(sizeof (pd_entry_t)))
-#define PDRSHIFT 22 /* LOG2(NBPDR) */
-#define NBPDR (1<<PDRSHIFT) /* bytes/page dir */
-
-#define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */
-#define DEV_BSIZE (1<<DEV_BSHIFT)
-
-#define BLKDEV_IOSIZE 2048
-#define MAXPHYS (64 * 1024) /* max raw I/O transfer size */
-
-#define UPAGES 2 /* pages of u-area */
-
-/*
- * Constants related to network buffer management.
- * MCLBYTES must be no larger than CLBYTES (the software page size), and,
- * on machines that exchange pages of input or output buffers with mbuf
- * clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple
- * of the hardware page size.
- */
-#ifndef MSIZE
-#define MSIZE 128 /* size of an mbuf */
-#endif /* MSIZE */
-
-#ifndef MCLSHIFT
-#define MCLSHIFT 11 /* convert bytes to m_buf clusters */
-#endif /* MCLSHIFT */
-#define MCLBYTES (1 << MCLSHIFT) /* size of an m_buf cluster */
-#define MCLOFSET (MCLBYTES - 1) /* offset within an m_buf cluster */
-
-/*
- * Some macros for units conversion
- */
-
-/* clicks to bytes */
-#define ctob(x) ((x)<<PAGE_SHIFT)
-
-/* bytes to clicks */
-#define btoc(x) (((unsigned)(x)+PAGE_MASK)>>PAGE_SHIFT)
-
-/*
- * btodb() is messy and perhaps slow because `bytes' may be an off_t. We
- * want to shift an unsigned type to avoid sign extension and we don't
- * want to widen `bytes' unnecessarily. Assume that the result fits in
- * a daddr_t.
- */
-#define btodb(bytes) /* calculates (bytes / DEV_BSIZE) */ \
- (sizeof (bytes) > sizeof(long) \
- ? (daddr_t)((unsigned long long)(bytes) >> DEV_BSHIFT) \
- : (daddr_t)((unsigned long)(bytes) >> DEV_BSHIFT))
-
-#define dbtob(db) /* calculates (db * DEV_BSIZE) */ \
- ((off_t)(db) << DEV_BSHIFT)
-
-/*
- * Mach derived conversion macros
- */
-#define trunc_page(x) ((unsigned)(x) & ~PAGE_MASK)
-#define round_page(x) ((((unsigned)(x)) + PAGE_MASK) & ~PAGE_MASK)
-
-#define atop(x) ((unsigned)(x) >> PAGE_SHIFT)
-#define ptoa(x) ((unsigned)(x) << PAGE_SHIFT)
-
-#endif /* !_MACHINE_PARAM_H_ */
diff --git a/cpukit/libnetworking/machine/types.h b/cpukit/libnetworking/machine/types.h
deleted file mode 100644
index 730a6dec1d..0000000000
--- a/cpukit/libnetworking/machine/types.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * This file will have to be incorparated into the RTEMS source
- * tree (probably in the existing <machine/types.h> so that these
- * contents are included when an application source file includes
- * <sys/types.h>.
- *
- * $Id$
- */
-
-#ifndef _MACHINE_TYPES_H_
-#define _MACHINE_TYPES_H_
-
-#include <rtems.h>
-#include <machine/endian.h>
-
-typedef rtems_signed64 int64_t;
-typedef rtems_signed32 int32_t;
-typedef rtems_signed16 int16_t;
-typedef rtems_signed8 int8_t;
-
-typedef rtems_unsigned64 u_int64_t;
-typedef rtems_unsigned32 u_int32_t;
-typedef rtems_unsigned16 u_int16_t;
-typedef rtems_unsigned8 u_int8_t;
-
-#define _CLOCK_T_ unsigned long
-#define _TIME_T_ long
-
-#ifdef _COMPILING_BSD_KERNEL_
-#include <rtems/rtems_bsdnet_internal.h>
-#include <rtems/rtems_bsdnet.h>
-#endif
-
-#endif /* _MACHINE_TYPES_H_ */
diff --git a/cpukit/libnetworking/machine/vmparam.h b/cpukit/libnetworking/machine/vmparam.h
deleted file mode 100644
index 5a6ee0337b..0000000000
--- a/cpukit/libnetworking/machine/vmparam.h
+++ /dev/null
@@ -1,6 +0,0 @@
-/*
- * $Id$
- */
-
-/* intentionally empty file */
-
diff --git a/cpukit/libnetworking/net/Makefile.am b/cpukit/libnetworking/net/Makefile.am
deleted file mode 100644
index d965963974..0000000000
--- a/cpukit/libnetworking/net/Makefile.am
+++ /dev/null
@@ -1,37 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-LIBNAME = lib.a
-LIB = $(ARCH)/$(LIBNAME)
-
-C_FILES = if.c if_ethersubr.c if_loop.c radix.c route.c rtsock.c raw_cb.c \
- raw_usrreq.c
-C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
-
-OBJS = $(C_O_FILES)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../automake/lib.am
-
-#
-# Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -D_COMPILING_BSD_KERNEL_ -DKERNEL -DINET -DNFS -DDIAGNOSTIC \
- -DBOOTP_COMPAT
-
-$(LIB): $(OBJS)
- $(make-library)
-
-all-local: $(ARCH) $(OBJS) $(LIB)
-
-.PRECIOUS: $(LIB)
-
-EXTRA_DIST = bpf.h ethernet.h if.c if.h if_arp.h if_dl.h if_ethersubr.c \
- if_llc.h if_loop.c if_ppp.h if_types.h netisr.h ppp-comp.h ppp_defs.h \
- radix.c radix.h raw_cb.c raw_cb.h raw_usrreq.c route.c route.h rtsock.c
-
-include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/libnetworking/net/bpf.h b/cpukit/libnetworking/net/bpf.h
deleted file mode 100644
index 7847d72470..0000000000
--- a/cpukit/libnetworking/net/bpf.h
+++ /dev/null
@@ -1,236 +0,0 @@
-/*
- * Copyright (c) 1990, 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from the Stanford/CMU enet packet filter,
- * (net/enet.c) distributed as part of 4.3BSD, and code contributed
- * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence
- * Berkeley Laboratory.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)bpf.h 8.1 (Berkeley) 6/10/93
- * @(#)bpf.h 1.34 (LBL) 6/16/96
- *
- * $Id$
- */
-
-#ifndef _NET_BPF_H_
-#define _NET_BPF_H_
-
-/* BSD style release date */
-#define BPF_RELEASE 199606
-
-typedef int32_t bpf_int32;
-typedef u_int32_t bpf_u_int32;
-
-/*
- * Alignment macros. BPF_WORDALIGN rounds up to the next
- * even multiple of BPF_ALIGNMENT.
- */
-#define BPF_ALIGNMENT sizeof(bpf_int32)
-#define BPF_WORDALIGN(x) (((x)+(BPF_ALIGNMENT-1))&~(BPF_ALIGNMENT-1))
-
-#define BPF_MAXINSNS 512
-#define BPF_MAXBUFSIZE 0x8000
-#define BPF_MINBUFSIZE 32
-
-/*
- * Structure for BIOCSETF.
- */
-struct bpf_program {
- u_int bf_len;
- struct bpf_insn *bf_insns;
-};
-
-/*
- * Struct returned by BIOCGSTATS.
- */
-struct bpf_stat {
- u_int bs_recv; /* number of packets received */
- u_int bs_drop; /* number of packets dropped */
-};
-
-/*
- * Struct return by BIOCVERSION. This represents the version number of
- * the filter language described by the instruction encodings below.
- * bpf understands a program iff kernel_major == filter_major &&
- * kernel_minor >= filter_minor, that is, if the value returned by the
- * running kernel has the same major number and a minor number equal
- * equal to or less than the filter being downloaded. Otherwise, the
- * results are undefined, meaning an error may be returned or packets
- * may be accepted haphazardly.
- * It has nothing to do with the source code version.
- */
-struct bpf_version {
- u_short bv_major;
- u_short bv_minor;
-};
-/* Current version number of filter architecture. */
-#define BPF_MAJOR_VERSION 1
-#define BPF_MINOR_VERSION 1
-
-#define BIOCGBLEN _IOR('B',102, u_int)
-#define BIOCSBLEN _IOWR('B',102, u_int)
-#define BIOCSETF _IOW('B',103, struct bpf_program)
-#define BIOCFLUSH _IO('B',104)
-#define BIOCPROMISC _IO('B',105)
-#define BIOCGDLT _IOR('B',106, u_int)
-#define BIOCGETIF _IOR('B',107, struct ifreq)
-#define BIOCSETIF _IOW('B',108, struct ifreq)
-#define BIOCSRTIMEOUT _IOW('B',109, struct timeval)
-#define BIOCGRTIMEOUT _IOR('B',110, struct timeval)
-#define BIOCGSTATS _IOR('B',111, struct bpf_stat)
-#define BIOCIMMEDIATE _IOW('B',112, u_int)
-#define BIOCVERSION _IOR('B',113, struct bpf_version)
-#define BIOCGRSIG _IOR('B',114, u_int)
-#define BIOCSRSIG _IOW('B',115, u_int)
-
-/*
- * Structure prepended to each packet.
- */
-struct bpf_hdr {
- struct timeval bh_tstamp; /* time stamp */
- bpf_u_int32 bh_caplen; /* length of captured portion */
- bpf_u_int32 bh_datalen; /* original length of packet */
- u_short bh_hdrlen; /* length of bpf header (this struct
- plus alignment padding) */
-};
-/*
- * Because the structure above is not a multiple of 4 bytes, some compilers
- * will insist on inserting padding; hence, sizeof(struct bpf_hdr) won't work.
- * Only the kernel needs to know about it; applications use bh_hdrlen.
- */
-#ifdef KERNEL
-#define SIZEOF_BPF_HDR 18
-#endif
-
-/*
- * Data-link level type codes.
- */
-#define DLT_NULL 0 /* no link-layer encapsulation */
-#define DLT_EN10MB 1 /* Ethernet (10Mb) */
-#define DLT_EN3MB 2 /* Experimental Ethernet (3Mb) */
-#define DLT_AX25 3 /* Amateur Radio AX.25 */
-#define DLT_PRONET 4 /* Proteon ProNET Token Ring */
-#define DLT_CHAOS 5 /* Chaos */
-#define DLT_IEEE802 6 /* IEEE 802 Networks */
-#define DLT_ARCNET 7 /* ARCNET */
-#define DLT_SLIP 8 /* Serial Line IP */
-#define DLT_PPP 9 /* Point-to-point Protocol */
-#define DLT_FDDI 10 /* FDDI */
-#define DLT_ATM_RFC1483 11 /* LLC/SNAP encapsulated atm */
-
-/*
- * The instruction encodings.
- */
-/* instruction classes */
-#define BPF_CLASS(code) ((code) & 0x07)
-#define BPF_LD 0x00
-#define BPF_LDX 0x01
-#define BPF_ST 0x02
-#define BPF_STX 0x03
-#define BPF_ALU 0x04
-#define BPF_JMP 0x05
-#define BPF_RET 0x06
-#define BPF_MISC 0x07
-
-/* ld/ldx fields */
-#define BPF_SIZE(code) ((code) & 0x18)
-#define BPF_W 0x00
-#define BPF_H 0x08
-#define BPF_B 0x10
-#define BPF_MODE(code) ((code) & 0xe0)
-#define BPF_IMM 0x00
-#define BPF_ABS 0x20
-#define BPF_IND 0x40
-#define BPF_MEM 0x60
-#define BPF_LEN 0x80
-#define BPF_MSH 0xa0
-
-/* alu/jmp fields */
-#define BPF_OP(code) ((code) & 0xf0)
-#define BPF_ADD 0x00
-#define BPF_SUB 0x10
-#define BPF_MUL 0x20
-#define BPF_DIV 0x30
-#define BPF_OR 0x40
-#define BPF_AND 0x50
-#define BPF_LSH 0x60
-#define BPF_RSH 0x70
-#define BPF_NEG 0x80
-#define BPF_JA 0x00
-#define BPF_JEQ 0x10
-#define BPF_JGT 0x20
-#define BPF_JGE 0x30
-#define BPF_JSET 0x40
-#define BPF_SRC(code) ((code) & 0x08)
-#define BPF_K 0x00
-#define BPF_X 0x08
-
-/* ret - BPF_K and BPF_X also apply */
-#define BPF_RVAL(code) ((code) & 0x18)
-#define BPF_A 0x10
-
-/* misc */
-#define BPF_MISCOP(code) ((code) & 0xf8)
-#define BPF_TAX 0x00
-#define BPF_TXA 0x80
-
-/*
- * The instruction data structure.
- */
-struct bpf_insn {
- u_short code;
- u_char jt;
- u_char jf;
- bpf_u_int32 k;
-};
-
-/*
- * Macros for insn array initializers.
- */
-#define BPF_STMT(code, k) { (u_short)(code), 0, 0, k }
-#define BPF_JUMP(code, k, jt, jf) { (u_short)(code), jt, jf, k }
-
-#ifdef KERNEL
-int bpf_validate __P((struct bpf_insn *, int));
-void bpf_tap __P((struct ifnet *, u_char *, u_int));
-void bpf_mtap __P((struct ifnet *, struct mbuf *));
-void bpfattach __P((struct ifnet *, u_int, u_int));
-void bpfilterattach __P((int));
-u_int bpf_filter __P((struct bpf_insn *, u_char *, u_int, u_int));
-#endif
-
-/*
- * Number of scratch memory words (for BPF_LD|BPF_MEM and BPF_ST).
- */
-#define BPF_MEMWORDS 16
-
-#endif
diff --git a/cpukit/libnetworking/net/ethernet.h b/cpukit/libnetworking/net/ethernet.h
deleted file mode 100644
index c6c07189ec..0000000000
--- a/cpukit/libnetworking/net/ethernet.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Fundamental constants relating to ethernet.
- *
- * $Id$
- *
- */
-
-#ifndef _NET_ETHERNET_H_
-#define _NET_ETHERNET_H_
-
-/*
- * The number of bytes in an ethernet (MAC) address.
- */
-#define ETHER_ADDR_LEN 6
-
-/*
- * The number of bytes in the type field.
- */
-#define ETHER_TYPE_LEN 2
-
-/*
- * The number of bytes in the trailing CRC field.
- */
-#define ETHER_CRC_LEN 4
-
-/*
- * The length of the combined header.
- */
-#define ETHER_HDR_LEN (ETHER_ADDR_LEN*2+ETHER_TYPE_LEN)
-
-/*
- * The minimum packet length.
- */
-#define ETHER_MIN_LEN 64
-
-/*
- * The maximum packet length.
- */
-#define ETHER_MAX_LEN 1518
-
-/*
- * A macro to validate a length with
- */
-#define ETHER_IS_VALID_LEN(foo) \
- ((foo) >= ETHER_MIN_LEN && (foo) <= ETHER_MAX_LEN)
-
-/*
- * Structure of a 10Mb/s Ethernet header.
- */
-struct ether_header {
- u_char ether_dhost[ETHER_ADDR_LEN];
- u_char ether_shost[ETHER_ADDR_LEN];
- u_short ether_type;
-};
-
-/*
- * Structure of a 48-bit Ethernet address.
- */
-struct ether_addr {
- u_char octet[ETHER_ADDR_LEN];
-};
-
-#endif
diff --git a/cpukit/libnetworking/net/if.c b/cpukit/libnetworking/net/if.c
deleted file mode 100644
index 6f42b29903..0000000000
--- a/cpukit/libnetworking/net/if.c
+++ /dev/null
@@ -1,794 +0,0 @@
-/*
- * Copyright (c) 1980, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)if.c 8.3 (Berkeley) 1/4/94
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/mbuf.h>
-#include <sys/systm.h>
-#include <sys/proc.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/protosw.h>
-#include <sys/kernel.h>
-#include <sys/ioctl.h>
-#include <sys/errno.h>
-#include <sys/syslog.h>
-#include <sys/sysctl.h>
-
-#include <net/if.h>
-#include <net/if_dl.h>
-#include <net/if_types.h>
-#include <net/radix.h>
-
-/*
- * System initialization
- */
-
-static int ifconf __P((int, caddr_t));
- void ifinit __P((void *));
-static void if_qflush __P((struct ifqueue *));
-static void if_slowtimo __P((void *));
-static void link_rtrequest __P((int, struct rtentry *, struct sockaddr *));
-
-SYSINIT(interfaces, SI_SUB_PROTO_IF, SI_ORDER_FIRST, ifinit, NULL)
-
-
-int ifqmaxlen = IFQ_MAXLEN;
-struct ifnet *ifnet;
-
-/*
- * Network interface utility routines.
- *
- * Routines with ifa_ifwith* names take sockaddr *'s as
- * parameters.
- *
- * This routine assumes that it will be called at splimp() or higher.
- */
-/* ARGSUSED*/
-void
-ifinit(dummy)
- void *dummy;
-{
- register struct ifnet *ifp;
-
- for (ifp = ifnet; ifp; ifp = ifp->if_next)
- if (ifp->if_snd.ifq_maxlen == 0)
- ifp->if_snd.ifq_maxlen = ifqmaxlen;
- if_slowtimo(0);
-}
-
-int if_index = 0;
-struct ifaddr **ifnet_addrs;
-
-
-/*
- * Attach an interface to the
- * list of "active" interfaces.
- */
-void
-if_attach(ifp)
- struct ifnet *ifp;
-{
- unsigned socksize, ifasize;
- int namelen, masklen;
- char workbuf[64];
- register struct ifnet **p = &ifnet;
- register struct sockaddr_dl *sdl;
- register struct ifaddr *ifa;
- static int if_indexlim = 8;
-
-
- while (*p)
- p = &((*p)->if_next);
- *p = ifp;
- ifp->if_index = ++if_index;
- microtime(&ifp->if_lastchange);
- if (ifnet_addrs == 0 || if_index >= if_indexlim) {
- unsigned n = (if_indexlim <<= 1) * sizeof(ifa);
- struct ifaddr **q = (struct ifaddr **)
- malloc(n, M_IFADDR, M_WAITOK);
- bzero((caddr_t)q, n);
- if (ifnet_addrs) {
- bcopy((caddr_t)ifnet_addrs, (caddr_t)q, n/2);
- free((caddr_t)ifnet_addrs, M_IFADDR);
- }
- ifnet_addrs = q;
- }
- /*
- * create a Link Level name for this device
- */
- namelen = sprintf(workbuf, "%s%d", ifp->if_name, ifp->if_unit);
-#define _offsetof(t, m) ((int)((caddr_t)&((t *)0)->m))
- masklen = _offsetof(struct sockaddr_dl, sdl_data[0]) + namelen;
- socksize = masklen + ifp->if_addrlen;
-#define ROUNDUP(a) (1 + (((a) - 1) | (sizeof(long) - 1)))
- socksize = ROUNDUP(socksize);
- if (socksize < sizeof(*sdl))
- socksize = sizeof(*sdl);
- ifasize = sizeof(*ifa) + 2 * socksize;
- ifa = (struct ifaddr *)malloc(ifasize, M_IFADDR, M_WAITOK);
- if (ifa) {
- bzero((caddr_t)ifa, ifasize);
- sdl = (struct sockaddr_dl *)(ifa + 1);
- sdl->sdl_len = socksize;
- sdl->sdl_family = AF_LINK;
- bcopy(workbuf, sdl->sdl_data, namelen);
- sdl->sdl_nlen = namelen;
- sdl->sdl_index = ifp->if_index;
- sdl->sdl_type = ifp->if_type;
- ifnet_addrs[if_index - 1] = ifa;
- ifa->ifa_ifp = ifp;
- ifa->ifa_next = ifp->if_addrlist;
- ifa->ifa_rtrequest = link_rtrequest;
- ifp->if_addrlist = ifa;
- ifa->ifa_addr = (struct sockaddr *)sdl;
-
- sdl = (struct sockaddr_dl *)(socksize + (caddr_t)sdl);
- ifa->ifa_netmask = (struct sockaddr *)sdl;
- sdl->sdl_len = masklen;
- while (namelen != 0)
- sdl->sdl_data[--namelen] = 0xff;
- }
-}
-/*
- * Locate an interface based on a complete address.
- */
-/*ARGSUSED*/
-struct ifaddr *
-ifa_ifwithaddr(addr)
- register struct sockaddr *addr;
-{
- register struct ifnet *ifp;
- register struct ifaddr *ifa;
-
-#define equal(a1, a2) \
- (bcmp((caddr_t)(a1), (caddr_t)(a2), ((struct sockaddr *)(a1))->sa_len) == 0)
- for (ifp = ifnet; ifp; ifp = ifp->if_next)
- for (ifa = ifp->if_addrlist; ifa; ifa = ifa->ifa_next) {
- if (ifa->ifa_addr->sa_family != addr->sa_family)
- continue;
- if (equal(addr, ifa->ifa_addr))
- return (ifa);
- if ((ifp->if_flags & IFF_BROADCAST) && ifa->ifa_broadaddr &&
- equal(ifa->ifa_broadaddr, addr))
- return (ifa);
- }
- return ((struct ifaddr *)0);
-}
-/*
- * Locate the point to point interface with a given destination address.
- */
-/*ARGSUSED*/
-struct ifaddr *
-ifa_ifwithdstaddr(addr)
- register struct sockaddr *addr;
-{
- register struct ifnet *ifp;
- register struct ifaddr *ifa;
-
- for (ifp = ifnet; ifp; ifp = ifp->if_next)
- if (ifp->if_flags & IFF_POINTOPOINT)
- for (ifa = ifp->if_addrlist; ifa; ifa = ifa->ifa_next) {
- if (ifa->ifa_addr->sa_family != addr->sa_family)
- continue;
- if (ifa->ifa_dstaddr && equal(addr, ifa->ifa_dstaddr))
- return (ifa);
- }
- return ((struct ifaddr *)0);
-}
-
-/*
- * Find an interface on a specific network. If many, choice
- * is most specific found.
- */
-struct ifaddr *
-ifa_ifwithnet(addr)
- struct sockaddr *addr;
-{
- register struct ifnet *ifp;
- register struct ifaddr *ifa;
- struct ifaddr *ifa_maybe = (struct ifaddr *) 0;
- u_int af = addr->sa_family;
- char *addr_data = addr->sa_data, *cplim;
-
- if (af == AF_LINK) {
- register struct sockaddr_dl *sdl = (struct sockaddr_dl *)addr;
- if (sdl->sdl_index && sdl->sdl_index <= if_index)
- return (ifnet_addrs[sdl->sdl_index - 1]);
- }
- for (ifp = ifnet; ifp; ifp = ifp->if_next) {
- for (ifa = ifp->if_addrlist; ifa; ifa = ifa->ifa_next) {
- register char *cp, *cp2, *cp3;
-
- if (ifa->ifa_addr->sa_family != af)
- next: continue;
- if (ifp->if_flags & IFF_POINTOPOINT) {
- if (ifa->ifa_dstaddr != 0
- && equal(addr, ifa->ifa_dstaddr))
- return (ifa);
- } else {
- /*
- * if we have a special address handler,
- * then use it instead of the generic one.
- */
- if (ifa->ifa_claim_addr) {
- if ((*ifa->ifa_claim_addr)(ifa, addr)) {
- return (ifa);
- } else {
- continue;
- }
- }
-
- /*
- * Scan all the bits in the ifa's address.
- * If a bit dissagrees with what we are
- * looking for, mask it with the netmask
- * to see if it really matters.
- * (A byte at a time)
- */
- if (ifa->ifa_netmask == 0)
- continue;
- cp = addr_data;
- cp2 = ifa->ifa_addr->sa_data;
- cp3 = ifa->ifa_netmask->sa_data;
- cplim = ifa->ifa_netmask->sa_len + (char *)ifa->ifa_netmask;
- while (cp3 < cplim)
- if ((*cp++ ^ *cp2++) & *cp3++)
- goto next;
- if (ifa_maybe == 0 ||
- rn_refines((caddr_t)ifa->ifa_netmask,
- (caddr_t)ifa_maybe->ifa_netmask))
- ifa_maybe = ifa;
- }
- }
- }
- return (ifa_maybe);
-}
-
-/*
- * Find an interface address specific to an interface best matching
- * a given address.
- */
-struct ifaddr *
-ifaof_ifpforaddr(addr, ifp)
- struct sockaddr *addr;
- register struct ifnet *ifp;
-{
- register struct ifaddr *ifa;
- register char *cp, *cp2, *cp3;
- register char *cplim;
- struct ifaddr *ifa_maybe = 0;
- u_int af = addr->sa_family;
-
- if (af >= AF_MAX)
- return (0);
- for (ifa = ifp->if_addrlist; ifa; ifa = ifa->ifa_next) {
- if (ifa->ifa_addr->sa_family != af)
- continue;
- if (ifa_maybe == 0)
- ifa_maybe = ifa;
- if (ifa->ifa_netmask == 0) {
- if (equal(addr, ifa->ifa_addr) ||
- (ifa->ifa_dstaddr && equal(addr, ifa->ifa_dstaddr)))
- return (ifa);
- continue;
- }
- if (ifp->if_flags & IFF_POINTOPOINT) {
- if (equal(addr, ifa->ifa_dstaddr))
- return (ifa);
- } else {
- cp = addr->sa_data;
- cp2 = ifa->ifa_addr->sa_data;
- cp3 = ifa->ifa_netmask->sa_data;
- cplim = ifa->ifa_netmask->sa_len + (char *)ifa->ifa_netmask;
- for (; cp3 < cplim; cp3++)
- if ((*cp++ ^ *cp2++) & *cp3)
- break;
- if (cp3 == cplim)
- return (ifa);
- }
- }
- return (ifa_maybe);
-}
-
-#include <net/route.h>
-
-/*
- * Default action when installing a route with a Link Level gateway.
- * Lookup an appropriate real ifa to point to.
- * This should be moved to /sys/net/link.c eventually.
- */
-static void
-link_rtrequest(cmd, rt, sa)
- int cmd;
- register struct rtentry *rt;
- struct sockaddr *sa;
-{
- register struct ifaddr *ifa;
- struct sockaddr *dst;
- struct ifnet *ifp;
-
- if (cmd != RTM_ADD || ((ifa = rt->rt_ifa) == 0) ||
- ((ifp = ifa->ifa_ifp) == 0) || ((dst = rt_key(rt)) == 0))
- return;
- ifa = ifaof_ifpforaddr(dst, ifp);
- if (ifa) {
- IFAFREE(rt->rt_ifa);
- rt->rt_ifa = ifa;
- ifa->ifa_refcnt++;
- if (ifa->ifa_rtrequest && ifa->ifa_rtrequest != link_rtrequest)
- ifa->ifa_rtrequest(cmd, rt, sa);
- }
-}
-
-/*
- * Mark an interface down and notify protocols of
- * the transition.
- * NOTE: must be called at splnet or eqivalent.
- */
-void
-if_down(ifp)
- register struct ifnet *ifp;
-{
- register struct ifaddr *ifa;
-
- ifp->if_flags &= ~IFF_UP;
- microtime(&ifp->if_lastchange);
- for (ifa = ifp->if_addrlist; ifa; ifa = ifa->ifa_next)
- pfctlinput(PRC_IFDOWN, ifa->ifa_addr);
- if_qflush(&ifp->if_snd);
- rt_ifmsg(ifp);
-}
-
-/*
- * Mark an interface up and notify protocols of
- * the transition.
- * NOTE: must be called at splnet or eqivalent.
- */
-void
-if_up(ifp)
- register struct ifnet *ifp;
-{
-
- ifp->if_flags |= IFF_UP;
- microtime(&ifp->if_lastchange);
-#ifdef notyet
- register struct ifaddr *ifa;
- /* this has no effect on IP, and will kill all iso connections XXX */
- for (ifa = ifp->if_addrlist; ifa; ifa = ifa->ifa_next)
- pfctlinput(PRC_IFUP, ifa->ifa_addr);
-#endif
- rt_ifmsg(ifp);
-}
-
-/*
- * Flush an interface queue.
- */
-static void
-if_qflush(ifq)
- register struct ifqueue *ifq;
-{
- register struct mbuf *m, *n;
-
- n = ifq->ifq_head;
- while ((m = n) != 0) {
- n = m->m_act;
- m_freem(m);
- }
- ifq->ifq_head = 0;
- ifq->ifq_tail = 0;
- ifq->ifq_len = 0;
-}
-
-/*
- * Handle interface watchdog timer routines. Called
- * from softclock, we decrement timers (if set) and
- * call the appropriate interface routine on expiration.
- */
-static void
-if_slowtimo(arg)
- void *arg;
-{
- register struct ifnet *ifp;
- int s = splimp();
-
- for (ifp = ifnet; ifp; ifp = ifp->if_next) {
- if (ifp->if_timer == 0 || --ifp->if_timer)
- continue;
- if (ifp->if_watchdog)
- (*ifp->if_watchdog)(ifp);
- }
- splx(s);
- timeout(if_slowtimo, (void *)0, hz / IFNET_SLOWHZ);
-}
-
-/*
- * Map interface name to
- * interface structure pointer.
- */
-struct ifnet *
-ifunit(name)
- register char *name;
-{
- register char *cp;
- register struct ifnet *ifp;
- int unit;
- unsigned len;
- char *ep, c;
-
- for (cp = name; cp < name + IFNAMSIZ && *cp; cp++)
- if (*cp >= '0' && *cp <= '9')
- break;
- if (*cp == '\0' || cp == name + IFNAMSIZ)
- return ((struct ifnet *)0);
- /*
- * Save first char of unit, and pointer to it,
- * so we can put a null there to avoid matching
- * initial substrings of interface names.
- */
- len = cp - name + 1;
- c = *cp;
- ep = cp;
- for (unit = 0; *cp >= '0' && *cp <= '9'; )
- unit = unit * 10 + *cp++ - '0';
- if (*cp != '\0')
- return 0; /* no trailing garbage allowed */
- *ep = 0;
- for (ifp = ifnet; ifp; ifp = ifp->if_next) {
- if (bcmp(ifp->if_name, name, len))
- continue;
- if (unit == ifp->if_unit)
- break;
- }
- *ep = c;
- return (ifp);
-}
-
-/*
- * Interface ioctls.
- */
-int
-ifioctl(so, cmd, data, p)
- struct socket *so;
- int cmd;
- caddr_t data;
- struct proc *p;
-{
- register struct ifnet *ifp;
- register struct ifreq *ifr;
- int error;
-
- switch (cmd) {
-
- case SIOCGIFCONF:
- case OSIOCGIFCONF:
- return (ifconf(cmd, data));
- }
- ifr = (struct ifreq *)data;
- ifp = ifunit(ifr->ifr_name);
- if (ifp == 0)
- return (ENXIO);
- switch (cmd) {
-
- case SIOCGIFFLAGS:
- ifr->ifr_flags = ifp->if_flags;
- break;
-
- case SIOCGIFMETRIC:
- ifr->ifr_metric = ifp->if_metric;
- break;
-
- case SIOCGIFMTU:
- ifr->ifr_mtu = ifp->if_mtu;
- break;
-
- case SIOCGIFPHYS:
- ifr->ifr_phys = ifp->if_physical;
- break;
-
- case SIOCSIFFLAGS:
- error = suser(p->p_ucred, &p->p_acflag);
- if (error)
- return (error);
- if (ifp->if_flags & IFF_UP && (ifr->ifr_flags & IFF_UP) == 0) {
- int s = splimp();
- if_down(ifp);
- splx(s);
- }
- if (ifr->ifr_flags & IFF_UP && (ifp->if_flags & IFF_UP) == 0) {
- int s = splimp();
- if_up(ifp);
- splx(s);
- }
- ifp->if_flags = (ifp->if_flags & IFF_CANTCHANGE) |
- (ifr->ifr_flags &~ IFF_CANTCHANGE);
- if (ifp->if_ioctl)
- (void) (*ifp->if_ioctl)(ifp, cmd, data);
- microtime(&ifp->if_lastchange);
- break;
-
- case SIOCSIFMETRIC:
- error = suser(p->p_ucred, &p->p_acflag);
- if (error)
- return (error);
- ifp->if_metric = ifr->ifr_metric;
- microtime(&ifp->if_lastchange);
- break;
-
- case SIOCSIFPHYS:
- error = suser(p->p_ucred, &p->p_acflag);
- if (error)
- return error;
- if (!ifp->if_ioctl)
- return EOPNOTSUPP;
- error = (*ifp->if_ioctl)(ifp, cmd, data);
- if (error == 0)
- microtime(&ifp->if_lastchange);
- return(error);
-
- case SIOCSIFMTU:
- error = suser(p->p_ucred, &p->p_acflag);
- if (error)
- return (error);
- if (ifp->if_ioctl == NULL)
- return (EOPNOTSUPP);
- /*
- * 72 was chosen below because it is the size of a TCP/IP
- * header (40) + the minimum mss (32).
- */
- if (ifr->ifr_mtu < 72 || ifr->ifr_mtu > 65535)
- return (EINVAL);
- error = (*ifp->if_ioctl)(ifp, cmd, data);
- if (error == 0)
- microtime(&ifp->if_lastchange);
- return(error);
-
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = suser(p->p_ucred, &p->p_acflag);
- if (error)
- return (error);
- if (ifp->if_ioctl == NULL)
- return (EOPNOTSUPP);
- error = (*ifp->if_ioctl)(ifp, cmd, data);
- if (error == 0 )
- microtime(&ifp->if_lastchange);
- return(error);
-
- case SIOCSIFMEDIA:
- error = suser(p->p_ucred, &p->p_acflag);
- if (error)
- return (error);
- if (ifp->if_ioctl == 0)
- return (EOPNOTSUPP);
- error = (*ifp->if_ioctl)(ifp, cmd, data);
- if (error == 0)
- microtime(&ifp->if_lastchange);
- return error;
-
- case SIOCGIFMEDIA:
- if (ifp->if_ioctl == 0)
- return (EOPNOTSUPP);
- return ((*ifp->if_ioctl)(ifp, cmd, data));
-
- default:
- if (so->so_proto == 0)
- return (EOPNOTSUPP);
-#ifndef COMPAT_43
- return ((*so->so_proto->pr_usrreqs->pru_control)(so, cmd,
- data,
- ifp));
-#else
- {
- int ocmd = cmd;
-
- switch (cmd) {
-
- case SIOCSIFDSTADDR:
- case SIOCSIFADDR:
- case SIOCSIFBRDADDR:
- case SIOCSIFNETMASK:
-#if BYTE_ORDER != BIG_ENDIAN
- if (ifr->ifr_addr.sa_family == 0 &&
- ifr->ifr_addr.sa_len < 16) {
- ifr->ifr_addr.sa_family = ifr->ifr_addr.sa_len;
- ifr->ifr_addr.sa_len = 16;
- }
-#else
- if (ifr->ifr_addr.sa_len == 0)
- ifr->ifr_addr.sa_len = 16;
-#endif
- break;
-
- case OSIOCGIFADDR:
- cmd = SIOCGIFADDR;
- break;
-
- case OSIOCGIFDSTADDR:
- cmd = SIOCGIFDSTADDR;
- break;
-
- case OSIOCGIFBRDADDR:
- cmd = SIOCGIFBRDADDR;
- break;
-
- case OSIOCGIFNETMASK:
- cmd = SIOCGIFNETMASK;
- }
- error = ((*so->so_proto->pr_usrreqs->pru_control)(so,
- cmd,
- data,
- ifp));
- switch (ocmd) {
-
- case OSIOCGIFADDR:
- case OSIOCGIFDSTADDR:
- case OSIOCGIFBRDADDR:
- case OSIOCGIFNETMASK:
- *(u_short *)&ifr->ifr_addr = ifr->ifr_addr.sa_family;
- }
- return (error);
-
- }
-#endif
-
- /*
- * RTEMS additions for setting/getting `tap' function
- */
- case SIOCSIFTAP:
- ifp->if_tap = ifr->ifr_tap;
- return 0;
-
- case SIOCGIFTAP:
- ifr->ifr_tap = ifp->if_tap;
- return 0;
- }
- return (0);
-}
-
-/*
- * Set/clear promiscuous mode on interface ifp based on the truth value
- * of pswitch. The calls are reference counted so that only the first
- * "on" request actually has an effect, as does the final "off" request.
- * Results are undefined if the "off" and "on" requests are not matched.
- */
-int
-ifpromisc(ifp, pswitch)
- struct ifnet *ifp;
- int pswitch;
-{
- struct ifreq ifr;
-
- if (pswitch) {
- /*
- * If the device is not configured up, we cannot put it in
- * promiscuous mode.
- */
- if ((ifp->if_flags & IFF_UP) == 0)
- return (ENETDOWN);
- if (ifp->if_pcount++ != 0)
- return (0);
- ifp->if_flags |= IFF_PROMISC;
- log(LOG_INFO, "%s%d: promiscuous mode enabled\n",
- ifp->if_name, ifp->if_unit);
- } else {
- if (--ifp->if_pcount > 0)
- return (0);
- ifp->if_flags &= ~IFF_PROMISC;
- }
- ifr.ifr_flags = ifp->if_flags;
- return ((*ifp->if_ioctl)(ifp, SIOCSIFFLAGS, (caddr_t)&ifr));
-}
-
-/*
- * Return interface configuration
- * of system. List may be used
- * in later ioctl's (above) to get
- * other information.
- */
-/*ARGSUSED*/
-static int
-ifconf(cmd, data)
- int cmd;
- caddr_t data;
-{
- register struct ifconf *ifc = (struct ifconf *)data;
- register struct ifnet *ifp = ifnet;
- register struct ifaddr *ifa;
- struct ifreq ifr, *ifrp;
- int space = ifc->ifc_len, error = 0;
-
- ifrp = ifc->ifc_req;
- for (; space > sizeof (ifr) && ifp; ifp = ifp->if_next) {
- char workbuf[64];
- int ifnlen;
-
- ifnlen = sprintf(workbuf, "%s%d", ifp->if_name, ifp->if_unit);
- if(ifnlen + 1 > sizeof ifr.ifr_name) {
- error = ENAMETOOLONG;
- } else {
- strcpy(ifr.ifr_name, workbuf);
- }
-
- if ((ifa = ifp->if_addrlist) == 0) {
- bzero((caddr_t)&ifr.ifr_addr, sizeof(ifr.ifr_addr));
- error = copyout((caddr_t)&ifr, (caddr_t)ifrp,
- sizeof (ifr));
- if (error)
- break;
- space -= sizeof (ifr), ifrp++;
- } else
- for ( ; space > sizeof (ifr) && ifa; ifa = ifa->ifa_next) {
- register struct sockaddr *sa = ifa->ifa_addr;
-#ifdef COMPAT_43
- if (cmd == OSIOCGIFCONF) {
- struct osockaddr *osa =
- (struct osockaddr *)&ifr.ifr_addr;
- ifr.ifr_addr = *sa;
- osa->sa_family = sa->sa_family;
- error = copyout((caddr_t)&ifr, (caddr_t)ifrp,
- sizeof (ifr));
- ifrp++;
- } else
-#endif
- if (sa->sa_len <= sizeof(*sa)) {
- ifr.ifr_addr = *sa;
- error = copyout((caddr_t)&ifr, (caddr_t)ifrp,
- sizeof (ifr));
- ifrp++;
- } else {
- space -= sa->sa_len - sizeof(*sa);
- if (space < sizeof (ifr))
- break;
- error = copyout((caddr_t)&ifr, (caddr_t)ifrp,
- sizeof (ifr.ifr_name));
- if (error == 0)
- error = copyout((caddr_t)sa,
- (caddr_t)&ifrp->ifr_addr, sa->sa_len);
- ifrp = (struct ifreq *)
- (sa->sa_len + (caddr_t)&ifrp->ifr_addr);
- }
- if (error)
- break;
- space -= sizeof (ifr);
- }
- }
- ifc->ifc_len -= space;
- return (error);
-}
-
-SYSCTL_NODE(_net, PF_LINK, link, CTLFLAG_RW, 0, "Link layers");
-SYSCTL_NODE(_net_link, 0, generic, CTLFLAG_RW, 0, "Generic link-management");
diff --git a/cpukit/libnetworking/net/if.h b/cpukit/libnetworking/net/if.h
deleted file mode 100644
index 39b6cc0d39..0000000000
--- a/cpukit/libnetworking/net/if.h
+++ /dev/null
@@ -1,474 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)if.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _NET_IF_H_
-#define _NET_IF_H_
-
-/*
- * Structures defining a network interface, providing a packet
- * transport mechanism (ala level 0 of the PUP protocols).
- *
- * Each interface accepts output datagrams of a specified maximum
- * length, and provides higher level routines with input datagrams
- * received from its medium.
- *
- * Output occurs when the routine if_output is called, with three parameters:
- * (*ifp->if_output)(ifp, m, dst, rt)
- * Here m is the mbuf chain to be sent and dst is the destination address.
- * The output routine encapsulates the supplied datagram if necessary,
- * and then transmits it on its medium.
- *
- * On input, each interface unwraps the data received by it, and either
- * places it on the input queue of a internetwork datagram routine
- * and posts the associated software interrupt, or passes the datagram to a raw
- * packet input routine.
- *
- * Routines exist for locating interfaces by their addresses
- * or for locating a interface on a certain network, as well as more general
- * routing and gateway routines maintaining information used to locate
- * interfaces. These routines live in the files if.c and route.c
- */
-
-#ifndef _TIME_ /* XXX fast fix for SNMP, going away soon */
-#include <sys/time.h>
-#endif
-
-#ifdef __STDC__
-/*
- * Forward structure declarations for function prototypes [sic].
- */
-struct mbuf;
-struct proc;
-struct rtentry;
-struct socket;
-struct ether_header;
-#endif
-
-/*
- * Structure describing information about an interface
- * which may be of interest to management entities.
- */
-struct if_data {
- /* generic interface information */
- u_char ifi_type; /* ethernet, tokenring, etc */
- u_char ifi_physical; /* e.g., AUI, Thinnet, 10base-T, etc */
- u_char ifi_addrlen; /* media address length */
- u_char ifi_hdrlen; /* media header length */
- u_char ifi_recvquota; /* polling quota for receive intrs */
- u_char ifi_xmitquota; /* polling quota for xmit intrs */
- u_long ifi_mtu; /* maximum transmission unit */
- u_long ifi_metric; /* routing metric (external only) */
- u_long ifi_baudrate; /* linespeed */
- /* volatile statistics */
- u_long ifi_ipackets; /* packets received on interface */
- u_long ifi_ierrors; /* input errors on interface */
- u_long ifi_opackets; /* packets sent on interface */
- u_long ifi_oerrors; /* output errors on interface */
- u_long ifi_collisions; /* collisions on csma interfaces */
- u_long ifi_ibytes; /* total number of octets received */
- u_long ifi_obytes; /* total number of octets sent */
- u_long ifi_imcasts; /* packets received via multicast */
- u_long ifi_omcasts; /* packets sent via multicast */
- u_long ifi_iqdrops; /* dropped on input, this interface */
- u_long ifi_noproto; /* destined for unsupported protocol */
- u_long ifi_recvtiming; /* usec spent receiving when timing */
- u_long ifi_xmittiming; /* usec spent xmitting when timing */
- struct timeval ifi_lastchange; /* time of last administrative change */
-};
-
-/*
- * Structure defining a queue for a network interface.
- */
-struct ifqueue {
- struct mbuf *ifq_head;
- struct mbuf *ifq_tail;
- int ifq_len;
- int ifq_maxlen;
- int ifq_drops;
-};
-
-/*
- * Structure defining a network interface.
- *
- * (Would like to call this struct ``if'', but C isn't PL/1.)
- */
-struct ifnet {
- void *if_softc; /* pointer to driver state */
- char *if_name; /* name, e.g. ``en'' or ``lo'' */
- struct ifnet *if_next; /* all struct ifnets are chained */
- struct ifaddr *if_addrlist; /* linked list of addresses per if */
- int if_pcount; /* number of promiscuous listeners */
- struct bpf_if *if_bpf; /* packet filter structure */
- u_short if_index; /* numeric abbreviation for this if */
- short if_unit; /* sub-unit for lower level driver */
- short if_timer; /* time 'til if_watchdog called */
- short if_flags; /* up/down, broadcast, etc. */
- int if_ipending; /* interrupts pending */
- void *if_linkmib; /* link-type-specific MIB data */
- size_t if_linkmiblen; /* length of above data */
- struct if_data if_data;
-/* procedure handles */
- int (*if_output) /* output routine (enqueue) */
- __P((struct ifnet *, struct mbuf *, struct sockaddr *,
- struct rtentry *));
- void (*if_start) /* initiate output routine */
- __P((struct ifnet *));
- int (*if_done) /* output complete routine */
- __P((struct ifnet *)); /* (XXX not used; fake prototype) */
- int (*if_ioctl) /* ioctl routine */
- __P((struct ifnet *, int, caddr_t));
- void (*if_watchdog) /* timer routine */
- __P((struct ifnet *));
- int (*if_poll_recv) /* polled receive routine */
- __P((struct ifnet *, int *));
- int (*if_poll_xmit) /* polled transmit routine */
- __P((struct ifnet *, int *));
- void (*if_poll_intren) /* polled interrupt reenable routine */
- __P((struct ifnet *));
- void (*if_poll_slowinput) /* input routine for slow devices */
- __P((struct ifnet *, struct mbuf *));
- void (*if_init) /* Init routine */
- __P((void *));
- int (*if_tap) /* Packet filter routine */
- (struct ifnet *, struct ether_header *, struct mbuf *);
- struct ifqueue if_snd; /* output queue */
- struct ifqueue *if_poll_slowq; /* input queue for slow devices */
-};
-typedef void if_init_f_t __P((void *));
-
-#define if_mtu if_data.ifi_mtu
-#define if_type if_data.ifi_type
-#define if_physical if_data.ifi_physical
-#define if_addrlen if_data.ifi_addrlen
-#define if_hdrlen if_data.ifi_hdrlen
-#define if_metric if_data.ifi_metric
-#define if_baudrate if_data.ifi_baudrate
-#define if_ipackets if_data.ifi_ipackets
-#define if_ierrors if_data.ifi_ierrors
-#define if_opackets if_data.ifi_opackets
-#define if_oerrors if_data.ifi_oerrors
-#define if_collisions if_data.ifi_collisions
-#define if_ibytes if_data.ifi_ibytes
-#define if_obytes if_data.ifi_obytes
-#define if_imcasts if_data.ifi_imcasts
-#define if_omcasts if_data.ifi_omcasts
-#define if_iqdrops if_data.ifi_iqdrops
-#define if_noproto if_data.ifi_noproto
-#define if_lastchange if_data.ifi_lastchange
-#define if_recvquota if_data.ifi_recvquota
-#define if_xmitquota if_data.ifi_xmitquota
-#define if_rawoutput(if, m, sa) if_output(if, m, sa, (struct rtentry *)0)
-
-#define IFF_UP 0x1 /* interface is up */
-#define IFF_BROADCAST 0x2 /* broadcast address valid */
-#define IFF_DEBUG 0x4 /* turn on debugging */
-#define IFF_LOOPBACK 0x8 /* is a loopback net */
-#define IFF_POINTOPOINT 0x10 /* interface is point-to-point link */
-/*#define IFF_NOTRAILERS 0x20 * obsolete: avoid use of trailers */
-#define IFF_RUNNING 0x40 /* resources allocated */
-#define IFF_NOARP 0x80 /* no address resolution protocol */
-#define IFF_PROMISC 0x100 /* receive all packets */
-#define IFF_ALLMULTI 0x200 /* receive all multicast packets */
-#define IFF_OACTIVE 0x400 /* transmission in progress */
-#define IFF_SIMPLEX 0x800 /* can't hear own transmissions */
-#define IFF_LINK0 0x1000 /* per link layer defined bit */
-#define IFF_LINK1 0x2000 /* per link layer defined bit */
-#define IFF_LINK2 0x4000 /* per link layer defined bit */
-#define IFF_ALTPHYS IFF_LINK2 /* use alternate physical connection */
-#define IFF_MULTICAST 0x8000 /* supports multicast */
-
-/* flags set internally only: */
-#define IFF_CANTCHANGE \
- (IFF_BROADCAST|IFF_POINTOPOINT|IFF_RUNNING|IFF_OACTIVE|\
- IFF_SIMPLEX|IFF_MULTICAST|IFF_ALLMULTI)
-
-
-/*
- * These really don't belong here, but there's no other obviously appropriate
- * location.
- */
-#define IFP_AUI 0
-#define IFP_10BASE2 1
-#define IFP_10BASET 2
-/* etc. */
-
-/*
- * Bit values in if_ipending
- */
-#define IFI_RECV 1 /* I want to receive */
-#define IFI_XMIT 2 /* I want to transmit */
-
-/*
- * Output queues (ifp->if_snd) and slow device input queues (*ifp->if_slowq)
- * are queues of messages stored on ifqueue structures
- * (defined above). Entries are added to and deleted from these structures
- * by these macros, which should be called with ipl raised to splimp().
- */
-#define IF_QFULL(ifq) ((ifq)->ifq_len >= (ifq)->ifq_maxlen)
-#define IF_DROP(ifq) ((ifq)->ifq_drops++)
-#define IF_ENQUEUE(ifq, m) { \
-/* printf(" IF_ENQUEUE: %p %p\n", ifq, m ); */ \
- (m)->m_nextpkt = 0; \
- if ((ifq)->ifq_tail == 0) \
- (ifq)->ifq_head = m; \
- else \
- (ifq)->ifq_tail->m_nextpkt = m; \
- (ifq)->ifq_tail = m; \
- (ifq)->ifq_len++; \
-}
-#define IF_PREPEND(ifq, m) { \
-/* printf(" IF_PREPEND: %p %p\n", ifq, m ); */ \
- (m)->m_nextpkt = (ifq)->ifq_head; \
- if ((ifq)->ifq_tail == 0) \
- (ifq)->ifq_tail = (m); \
- (ifq)->ifq_head = (m); \
- (ifq)->ifq_len++; \
-}
-#define IF_DEQUEUE(ifq, m) { \
- (m) = (ifq)->ifq_head; \
- if (m) { \
-/* printf(" IF_DEQUEUE: %p %p\n", ifq, m ); */ \
- if (((ifq)->ifq_head = (m)->m_nextpkt) == 0) \
- (ifq)->ifq_tail = 0; \
- (m)->m_nextpkt = 0; \
- (ifq)->ifq_len--; \
- } \
-}
-
-#ifdef KERNEL
-#define IF_ENQ_DROP(ifq, m) if_enq_drop(ifq, m)
-
-#if defined(__GNUC__) && defined(MT_HEADER)
-static inline int
-if_queue_drop(struct ifqueue *ifq, struct mbuf *m)
-{
- IF_DROP(ifq);
- return 0;
-}
-
-static inline int
-if_enq_drop(struct ifqueue *ifq, struct mbuf *m)
-{
- if (IF_QFULL(ifq) &&
- !if_queue_drop(ifq, m))
- return 0;
- IF_ENQUEUE(ifq, m);
- return 1;
-}
-#else
-
-#ifdef MT_HEADER
-int if_enq_drop __P((struct ifqueue *, struct mbuf *));
-#endif
-
-#endif
-#endif /* KERNEL */
-
-#define IFQ_MAXLEN 50
-#define IFNET_SLOWHZ 1 /* granularity is 1 second */
-
-/*
- * The ifaddr structure contains information about one address
- * of an interface. They are maintained by the different address families,
- * are allocated and attached when an address is set, and are linked
- * together so all addresses for an interface can be located.
- */
-struct ifaddr {
- struct sockaddr *ifa_addr; /* address of interface */
- struct sockaddr *ifa_dstaddr; /* other end of p-to-p link */
-#define ifa_broadaddr ifa_dstaddr /* broadcast address interface */
- struct sockaddr *ifa_netmask; /* used to determine subnet */
- struct ifnet *ifa_ifp; /* back-pointer to interface */
- struct ifaddr *ifa_next; /* next address for interface */
- void (*ifa_rtrequest) /* check or clean routes (+ or -)'d */
- __P((int, struct rtentry *, struct sockaddr *));
- u_short ifa_flags; /* mostly rt_flags for cloning */
- short ifa_refcnt; /* references to this structure */
- int ifa_metric; /* cost of going out this interface */
-#ifdef notdef
- struct rtentry *ifa_rt; /* XXXX for ROUTETOIF ????? */
-#endif
- int (*ifa_claim_addr) /* check if an addr goes to this if */
- __P((struct ifaddr *, struct sockaddr *));
-
-};
-#define IFA_ROUTE RTF_UP /* route installed */
-
-/*
- * Message format for use in obtaining information about interfaces
- * from getkerninfo and the routing socket
- */
-struct if_msghdr {
- u_short ifm_msglen; /* to skip over non-understood messages */
- u_char ifm_version; /* future binary compatability */
- u_char ifm_type; /* message type */
- int ifm_addrs; /* like rtm_addrs */
- int ifm_flags; /* value of if_flags */
- u_short ifm_index; /* index for associated ifp */
- struct if_data ifm_data;/* statistics and other data about if */
-};
-
-/*
- * Message format for use in obtaining information about interface addresses
- * from getkerninfo and the routing socket
- */
-struct ifa_msghdr {
- u_short ifam_msglen; /* to skip over non-understood messages */
- u_char ifam_version; /* future binary compatability */
- u_char ifam_type; /* message type */
- int ifam_addrs; /* like rtm_addrs */
- int ifam_flags; /* value of ifa_flags */
- u_short ifam_index; /* index for associated ifp */
- int ifam_metric; /* value of ifa_metric */
-};
-
-/*
- * Interface request structure used for socket
- * ioctl's. All interface ioctl's must have parameter
- * definitions which begin with ifr_name. The
- * remainder may be interface specific.
- */
-struct ifreq {
-#define IFNAMSIZ 16
- char ifr_name[IFNAMSIZ]; /* if name, e.g. "en0" */
- union {
- struct sockaddr ifru_addr;
- struct sockaddr ifru_dstaddr;
- struct sockaddr ifru_broadaddr;
- short ifru_flags;
- int ifru_metric;
- int ifru_mtu;
- int ifru_phys;
- int ifru_media;
- caddr_t ifru_data;
- int (*ifru_tap)(struct ifnet *, struct ether_header *, struct mbuf *);
- } ifr_ifru;
-#define ifr_addr ifr_ifru.ifru_addr /* address */
-#define ifr_dstaddr ifr_ifru.ifru_dstaddr /* other end of p-to-p link */
-#define ifr_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */
-#define ifr_flags ifr_ifru.ifru_flags /* flags */
-#define ifr_metric ifr_ifru.ifru_metric /* metric */
-#define ifr_mtu ifr_ifru.ifru_mtu /* mtu */
-#define ifr_phys ifr_ifru.ifru_phys /* physical wire */
-#define ifr_media ifr_ifru.ifru_media /* physical media */
-#define ifr_data ifr_ifru.ifru_data /* for use by interface */
-#define ifr_tap ifr_ifru.ifru_tap /* tap function */
-};
-
-struct ifaliasreq {
- char ifra_name[IFNAMSIZ]; /* if name, e.g. "en0" */
- struct sockaddr ifra_addr;
- struct sockaddr ifra_broadaddr;
- struct sockaddr ifra_mask;
-};
-
-struct ifmediareq {
- char ifm_name[IFNAMSIZ]; /* if name, e.g. "en0" */
- int ifm_current; /* current media options */
- int ifm_mask; /* don't care mask */
- int ifm_status; /* media status */
- int ifm_active; /* active options */
- int ifm_count; /* # entries in ifm_ulist array */
- int *ifm_ulist; /* media words */
-};
-/*
- * Structure used in SIOCGIFCONF request.
- * Used to retrieve interface configuration
- * for machine (useful for programs which
- * must know all networks accessible).
- */
-struct ifconf {
- int ifc_len; /* size of associated buffer */
- union {
- caddr_t ifcu_buf;
- struct ifreq *ifcu_req;
- } ifc_ifcu;
-#define ifc_buf ifc_ifcu.ifcu_buf /* buffer address */
-#define ifc_req ifc_ifcu.ifcu_req /* array of structures returned */
-};
-
-#include <net/if_arp.h>
-
-#ifdef KERNEL
-#define IFAFREE(ifa) \
- if ((ifa)->ifa_refcnt <= 0) \
- ifafree(ifa); \
- else \
- (ifa)->ifa_refcnt--;
-
-extern struct ifnet *ifnet;
-extern int ifqmaxlen;
-extern struct ifnet loif[];
-extern int if_index;
-extern struct ifaddr **ifnet_addrs;
-
-void ether_ifattach __P((struct ifnet *));
-void ether_input __P((struct ifnet *, struct ether_header *, struct mbuf *));
-int ether_output __P((struct ifnet *,
- struct mbuf *, struct sockaddr *, struct rtentry *));
-int ether_ioctl __P((struct ifnet *, int , caddr_t ));
-
-void if_attach __P((struct ifnet *));
-void if_down __P((struct ifnet *));
-void if_up __P((struct ifnet *));
-#ifdef vax
-void ifubareset __P((int));
-#endif
-/*void ifinit __P((void));*/ /* declared in systm.h for main() */
-int ifioctl __P((struct socket *, int, caddr_t, struct proc *));
-int ifpromisc __P((struct ifnet *, int));
-struct ifnet *ifunit __P((char *));
-
-int if_poll_recv_slow __P((struct ifnet *ifp, int *quotap));
-void if_poll_xmit_slow __P((struct ifnet *ifp, int *quotap));
-void if_poll_throttle __P((void));
-void if_poll_unthrottle __P((void *));
-void if_poll_init __P((void));
-void if_poll __P((void));
-
-struct ifaddr *ifa_ifwithaddr __P((struct sockaddr *));
-struct ifaddr *ifa_ifwithdstaddr __P((struct sockaddr *));
-struct ifaddr *ifa_ifwithnet __P((struct sockaddr *));
-struct ifaddr *ifa_ifwithroute __P((int, struct sockaddr *,
- struct sockaddr *));
-struct ifaddr *ifaof_ifpforaddr __P((struct sockaddr *, struct ifnet *));
-void ifafree __P((struct ifaddr *));
-
-int looutput __P((struct ifnet *,
- struct mbuf *, struct sockaddr *, struct rtentry *));
-#endif /* KERNEL */
-
-#endif /* !_NET_IF_H_ */
diff --git a/cpukit/libnetworking/net/if_arp.h b/cpukit/libnetworking/net/if_arp.h
deleted file mode 100644
index dd726bf856..0000000000
--- a/cpukit/libnetworking/net/if_arp.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright (c) 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)if_arp.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _NET_IF_ARP_H_
-#define _NET_IF_ARP_H_
-
-/*
- * Address Resolution Protocol.
- *
- * See RFC 826 for protocol description. ARP packets are variable
- * in size; the arphdr structure defines the fixed-length portion.
- * Protocol type values are the same as those for 10 Mb/s Ethernet.
- * It is followed by the variable-sized fields ar_sha, arp_spa,
- * arp_tha and arp_tpa in that order, according to the lengths
- * specified. Field names used correspond to RFC 826.
- */
-struct arphdr {
- u_short ar_hrd; /* format of hardware address */
-#define ARPHRD_ETHER 1 /* ethernet hardware format */
-#define ARPHRD_FRELAY 15 /* frame relay hardware format */
- u_short ar_pro; /* format of protocol address */
- u_char ar_hln; /* length of hardware address */
- u_char ar_pln; /* length of protocol address */
- u_short ar_op; /* one of: */
-#define ARPOP_REQUEST 1 /* request to resolve address */
-#define ARPOP_REPLY 2 /* response to previous request */
-#define ARPOP_REVREQUEST 3 /* request protocol address given hardware */
-#define ARPOP_REVREPLY 4 /* response giving protocol address */
-#define ARPOP_INVREQUEST 8 /* request to identify peer */
-#define ARPOP_INVREPLY 9 /* response identifying peer */
-/*
- * The remaining fields are variable in size,
- * according to the sizes above.
- */
-#ifdef COMMENT_ONLY
- u_char ar_sha[]; /* sender hardware address */
- u_char ar_spa[]; /* sender protocol address */
- u_char ar_tha[]; /* target hardware address */
- u_char ar_tpa[]; /* target protocol address */
-#endif
-};
-
-/*
- * ARP ioctl request
- */
-struct arpreq {
- struct sockaddr arp_pa; /* protocol address */
- struct sockaddr arp_ha; /* hardware address */
- int arp_flags; /* flags */
-};
-/* arp_flags and at_flags field values */
-#define ATF_INUSE 0x01 /* entry in use */
-#define ATF_COM 0x02 /* completed entry (enaddr valid) */
-#define ATF_PERM 0x04 /* permanent entry */
-#define ATF_PUBL 0x08 /* publish entry (respond for other host) */
-#define ATF_USETRAILERS 0x10 /* has requested trailers */
-
-#endif /* !_NET_IF_ARP_H_ */
diff --git a/cpukit/libnetworking/net/if_dl.h b/cpukit/libnetworking/net/if_dl.h
deleted file mode 100644
index 053ae3e92f..0000000000
--- a/cpukit/libnetworking/net/if_dl.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)if_dl.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _NET_IF_DL_H_
-#define _NET_IF_DL_H_
-
-/*
- * A Link-Level Sockaddr may specify the interface in one of two
- * ways: either by means of a system-provided index number (computed
- * anew and possibly differently on every reboot), or by a human-readable
- * string such as "il0" (for managerial convenience).
- *
- * Census taking actions, such as something akin to SIOCGCONF would return
- * both the index and the human name.
- *
- * High volume transactions (such as giving a link-level ``from'' address
- * in a recvfrom or recvmsg call) may be likely only to provide the indexed
- * form, (which requires fewer copy operations and less space).
- *
- * The form and interpretation of the link-level address is purely a matter
- * of convention between the device driver and its consumers; however, it is
- * expected that all drivers for an interface of a given if_type will agree.
- */
-
-/*
- * Structure of a Link-Level sockaddr:
- */
-struct sockaddr_dl {
- u_char sdl_len; /* Total length of sockaddr */
- u_char sdl_family; /* AF_DLI */
- u_short sdl_index; /* if != 0, system given index for interface */
- u_char sdl_type; /* interface type */
- u_char sdl_nlen; /* interface name length, no trailing 0 reqd. */
- u_char sdl_alen; /* link level address length */
- u_char sdl_slen; /* link layer selector length */
- char sdl_data[12]; /* minimum work area, can be larger;
- contains both if name and ll address */
-};
-
-#define LLADDR(s) ((caddr_t)((s)->sdl_data + (s)->sdl_nlen))
-
-#ifndef KERNEL
-
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-void link_addr __P((const char *, struct sockaddr_dl *));
-char *link_ntoa __P((const struct sockaddr_dl *));
-__END_DECLS
-
-#endif /* !KERNEL */
-
-#endif
diff --git a/cpukit/libnetworking/net/if_ethersubr.c b/cpukit/libnetworking/net/if_ethersubr.c
deleted file mode 100644
index 2a6446ebb6..0000000000
--- a/cpukit/libnetworking/net/if_ethersubr.c
+++ /dev/null
@@ -1,997 +0,0 @@
-/*
- * Copyright (c) 1982, 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)if_ethersubr.c 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/malloc.h>
-#include <sys/mbuf.h>
-#include <sys/protosw.h>
-#include <sys/socket.h>
-#include <sys/ioctl.h>
-#include <sys/errno.h>
-#include <sys/syslog.h>
-#include <sys/sysctl.h>
-
-#include <net/if.h>
-#include <net/netisr.h>
-#include <net/route.h>
-#include <net/if_llc.h>
-#include <net/if_dl.h>
-#include <net/if_types.h>
-#include <net/ethernet.h>
-
-#ifdef INET
-#include <netinet/in.h>
-#include <netinet/in_var.h>
-#endif
-#include <netinet/if_ether.h>
-
-#ifdef IPX
-#include <netipx/ipx.h>
-#include <netipx/ipx_if.h>
-#endif
-
-#ifdef NS
-#include <netns/ns.h>
-#include <netns/ns_if.h>
-ushort ns_nettype;
-int ether_outputdebug = 0;
-int ether_inputdebug = 0;
-#endif
-
-#ifdef ISO
-#include <netiso/argo_debug.h>
-#include <netiso/iso.h>
-#include <netiso/iso_var.h>
-#include <netiso/iso_snpac.h>
-#endif
-
-/*#ifdef LLC
-#include <netccitt/dll.h>
-#include <netccitt/llc_var.h>
-#endif*/
-
-#if defined(LLC) && defined(CCITT)
-extern struct ifqueue pkintrq;
-#endif
-
-#ifdef NETATALK
-#include <netatalk/at.h>
-#include <netatalk/at_var.h>
-#include <netatalk/at_extern.h>
-
-#define llc_snap_org_code llc_un.type_snap.org_code
-#define llc_snap_ether_type llc_un.type_snap.ether_type
-
-extern u_char at_org_code[ 3 ];
-extern u_char aarp_org_code[ 3 ];
-#endif NETATALK
-
-u_char etherbroadcastaddr[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
-#define senderr(e) { error = (e); goto bad;}
-
-/*
- * Ethernet output routine.
- * Encapsulate a packet of type family for the local net.
- * Use trailer local net encapsulation if enough data in first
- * packet leaves a multiple of 512 bytes of data in remainder.
- * Assumes that ifp is actually pointer to arpcom structure.
- */
-int
-ether_output(ifp, m0, dst, rt0)
- register struct ifnet *ifp;
- struct mbuf *m0;
- struct sockaddr *dst;
- struct rtentry *rt0;
-{
- short type;
- int s, error = 0;
-#ifdef NS
- u_char *cp
- register struct ifqueue *inq;
- register struct mbuf *m2;
-#endif
- u_char edst[6];
- register struct mbuf *m = m0;
- register struct rtentry *rt;
- struct mbuf *mcopy = (struct mbuf *)0;
- register struct ether_header *eh;
- int off, len = m->m_pkthdr.len;
- struct arpcom *ac = (struct arpcom *)ifp;
-#ifdef NETATALK
- struct at_ifaddr *aa;
-#endif NETATALK
-
- if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING))
- senderr(ENETDOWN);
- rt = rt0;
- if (rt) {
- if ((rt->rt_flags & RTF_UP) == 0) {
- rt0 = rt = rtalloc1(dst, 1, 0UL);
- if (rt0)
- rt->rt_refcnt--;
- else
- senderr(EHOSTUNREACH);
- }
- if (rt->rt_flags & RTF_GATEWAY) {
- if (rt->rt_gwroute == 0)
- goto lookup;
- if (((rt = rt->rt_gwroute)->rt_flags & RTF_UP) == 0) {
- rtfree(rt); rt = rt0;
- lookup: rt->rt_gwroute = rtalloc1(rt->rt_gateway, 1,
- 0UL);
- if ((rt = rt->rt_gwroute) == 0)
- senderr(EHOSTUNREACH);
- }
- }
- if (rt->rt_flags & RTF_REJECT)
- if (rt->rt_rmx.rmx_expire == 0 ||
- rtems_bsdnet_seconds_since_boot() < rt->rt_rmx.rmx_expire)
- senderr(rt == rt0 ? EHOSTDOWN : EHOSTUNREACH);
- }
- switch (dst->sa_family) {
-
-#ifdef INET
- case AF_INET:
- if (!arpresolve(ac, rt, m, dst, edst, rt0))
- return (0); /* if not yet resolved */
- /* If broadcasting on a simplex interface, loopback a copy */
- if ((m->m_flags & M_BCAST) && (ifp->if_flags & IFF_SIMPLEX))
- mcopy = m_copy(m, 0, (int)M_COPYALL);
- off = m->m_pkthdr.len - m->m_len;
- type = htons(ETHERTYPE_IP);
- break;
-#endif
-#ifdef IPX
- case AF_IPX:
- {
- struct ifaddr *ia;
-
- type = htons(ETHERTYPE_IPX);
- bcopy((caddr_t)&(((struct sockaddr_ipx *)dst)->sipx_addr.x_host),
- (caddr_t)edst, sizeof (edst));
- for (ia = ifp->if_addrlist; ia != NULL; ia = ia->ifa_next)
- if(ia->ifa_addr->sa_family == AF_IPX &&
- !bcmp((caddr_t)edst,
- (caddr_t)&((struct ipx_ifaddr *)ia)->ia_addr.sipx_addr.x_host,
- sizeof(edst)))
- return (looutput(ifp, m, dst, rt));
- /* If broadcasting on a simplex interface, loopback a copy */
- if ((m->m_flags & M_BCAST) && (ifp->if_flags & IFF_SIMPLEX))
- mcopy = m_copy(m, 0, (int)M_COPYALL);
- break;
- }
-#endif
-#ifdef NETATALK
- case AF_APPLETALK:
- {
- struct sockaddr_at *sat = (struct sockaddr_at *)dst;
-
- /*
- * super hack..
- * Most of this loopback code should move into the appletalk
- * code, but it's here for now.. remember to move it! [JRE]
- * This may not get the same interface we started with
- * fix asap. XXX
- */
- aa = at_ifawithnet( sat );
- if (aa == NULL) {
- goto bad;
- }
- if( aa->aa_ifa.ifa_ifp != ifp ) {
- (*aa->aa_ifa.ifa_ifp->if_output)(aa->aa_ifa.ifa_ifp,
- m,dst,rt);
- }
- if (((sat->sat_addr.s_net == ATADDR_ANYNET)
- && (sat->sat_addr.s_node == ATADDR_ANYNODE))
- || ((sat->sat_addr.s_net == aa->aa_addr.sat_addr.s_net )
- && (sat->sat_addr.s_node == aa->aa_addr.sat_addr.s_node))) {
- (void) looutput(ifp, m, dst, rt);
- return(0);
- }
-
- if (!aarpresolve(ac, m, (struct sockaddr_at *)dst, edst)) {
-#ifdef NETATALKDEBUG
- extern char *prsockaddr(struct sockaddr *);
- printf("aarpresolv: failed for %s\n", prsockaddr(dst));
-#endif NETATALKDEBUG
- return (0);
- }
-
- /*
- * If broadcasting on a simplex interface, loopback a copy
- */
- if ((m->m_flags & M_BCAST) && (ifp->if_flags & IFF_SIMPLEX))
- mcopy = m_copy(m, 0, (int)M_COPYALL);
- }
- /*
- * In the phase 2 case, we need to prepend an mbuf for the llc header.
- * Since we must preserve the value of m, which is passed to us by
- * value, we m_copy() the first mbuf, and use it for our llc header.
- */
- if ( aa->aa_flags & AFA_PHASE2 ) {
- struct llc llc;
-
- M_PREPEND(m, sizeof(struct llc), M_WAIT);
- len += sizeof(struct llc);
- llc.llc_dsap = llc.llc_ssap = LLC_SNAP_LSAP;
- llc.llc_control = LLC_UI;
- bcopy(at_org_code, llc.llc_snap_org_code, sizeof(at_org_code));
- llc.llc_snap_ether_type = htons( ETHERTYPE_AT );
- bcopy(&llc, mtod(m, caddr_t), sizeof(struct llc));
- type = htons(m->m_pkthdr.len);
- } else {
- type = htons(ETHERTYPE_AT);
- }
- break;
-#endif NETATALK
-#ifdef NS
- case AF_NS:
- switch(ns_nettype){
- default:
- case 0x8137: /* Novell Ethernet_II Ethernet TYPE II */
- type = 0x8137;
- break;
- case 0x0: /* Novell 802.3 */
- type = htons( m->m_pkthdr.len);
- break;
- case 0xe0e0: /* Novell 802.2 and Token-Ring */
- M_PREPEND(m, 3, M_WAIT);
- type = htons( m->m_pkthdr.len);
- cp = mtod(m, u_char *);
- *cp++ = 0xE0;
- *cp++ = 0xE0;
- *cp++ = 0x03;
- break;
- }
- bcopy((caddr_t)&(((struct sockaddr_ns *)dst)->sns_addr.x_host),
- (caddr_t)edst, sizeof (edst));
- if (!bcmp((caddr_t)edst, (caddr_t)&ns_thishost, sizeof(edst))){
- m->m_pkthdr.rcvif = ifp;
- schednetisr(NETISR_NS);
- inq = &nsintrq;
- s = splimp();
- if (IF_QFULL(inq)) {
- IF_DROP(inq);
- m_freem(m);
- } else
- IF_ENQUEUE(inq, m);
- splx(s);
- return (error);
- }
- if (!bcmp((caddr_t)edst, (caddr_t)&ns_broadhost, sizeof(edst))){
- m2 = m_copy(m, 0, (int)M_COPYALL);
- m2->m_pkthdr.rcvif = ifp;
- schednetisr(NETISR_NS);
- inq = &nsintrq;
- s = splimp();
- if (IF_QFULL(inq)) {
- IF_DROP(inq);
- m_freem(m2);
- } else
- IF_ENQUEUE(inq, m2);
- splx(s);
- }
- /* If broadcasting on a simplex interface, loopback a copy */
- if ((m->m_flags & M_BCAST) && (ifp->if_flags & IFF_SIMPLEX)){
- mcopy = m_copy(m, 0, (int)M_COPYALL);
- }
- break;
-#endif /* NS */
-#ifdef ISO
- case AF_ISO: {
- int snpalen;
- struct llc *l;
- register struct sockaddr_dl *sdl;
-
- if (rt && (sdl = (struct sockaddr_dl *)rt->rt_gateway) &&
- sdl->sdl_family == AF_LINK && sdl->sdl_alen > 0) {
- bcopy(LLADDR(sdl), (caddr_t)edst, sizeof(edst));
- } else if (error =
- iso_snparesolve(ifp, (struct sockaddr_iso *)dst,
- (char *)edst, &snpalen))
- goto bad; /* Not Resolved */
- /* If broadcasting on a simplex interface, loopback a copy */
- if (*edst & 1)
- m->m_flags |= (M_BCAST|M_MCAST);
- if ((m->m_flags & M_BCAST) && (ifp->if_flags & IFF_SIMPLEX) &&
- (mcopy = m_copy(m, 0, (int)M_COPYALL))) {
- M_PREPEND(mcopy, sizeof (*eh), M_DONTWAIT);
- if (mcopy) {
- eh = mtod(mcopy, struct ether_header *);
- bcopy((caddr_t)edst,
- (caddr_t)eh->ether_dhost, sizeof (edst));
- bcopy((caddr_t)ac->ac_enaddr,
- (caddr_t)eh->ether_shost, sizeof (edst));
- }
- }
- M_PREPEND(m, 3, M_DONTWAIT);
- if (m == NULL)
- return (0);
- type = htons(m->m_pkthdr.len);
- l = mtod(m, struct llc *);
- l->llc_dsap = l->llc_ssap = LLC_ISO_LSAP;
- l->llc_control = LLC_UI;
- len += 3;
- IFDEBUG(D_ETHER)
- int i;
- printf("unoutput: sending pkt to: ");
- for (i=0; i<6; i++)
- printf("%x ", edst[i] & 0xff);
- printf("\n");
- ENDDEBUG
- } break;
-#endif /* ISO */
-#ifdef LLC
-/* case AF_NSAP: */
- case AF_CCITT: {
- register struct sockaddr_dl *sdl =
- (struct sockaddr_dl *) rt -> rt_gateway;
-
- if (sdl && sdl->sdl_family == AF_LINK
- && sdl->sdl_alen > 0) {
- bcopy(LLADDR(sdl), (char *)edst,
- sizeof(edst));
- } else goto bad; /* Not a link interface ? Funny ... */
- if ((ifp->if_flags & IFF_SIMPLEX) && (*edst & 1) &&
- (mcopy = m_copy(m, 0, (int)M_COPYALL))) {
- M_PREPEND(mcopy, sizeof (*eh), M_DONTWAIT);
- if (mcopy) {
- eh = mtod(mcopy, struct ether_header *);
- bcopy((caddr_t)edst,
- (caddr_t)eh->ether_dhost, sizeof (edst));
- bcopy((caddr_t)ac->ac_enaddr,
- (caddr_t)eh->ether_shost, sizeof (edst));
- }
- }
- type = htons(m->m_pkthdr.len);
-#ifdef LLC_DEBUG
- {
- int i;
- register struct llc *l = mtod(m, struct llc *);
-
- printf("ether_output: sending LLC2 pkt to: ");
- for (i=0; i<6; i++)
- printf("%x ", edst[i] & 0xff);
- printf(" len 0x%x dsap 0x%x ssap 0x%x control 0x%x\n",
- type & 0xff, l->llc_dsap & 0xff, l->llc_ssap &0xff,
- l->llc_control & 0xff);
-
- }
-#endif /* LLC_DEBUG */
- } break;
-#endif /* LLC */
-
- case AF_UNSPEC:
- eh = (struct ether_header *)dst->sa_data;
- (void)memcpy(edst, eh->ether_dhost, sizeof (edst));
- type = eh->ether_type;
- break;
-
- default:
- printf("%s%d: can't handle af%d\n", ifp->if_name, ifp->if_unit,
- dst->sa_family);
- senderr(EAFNOSUPPORT);
- }
-
-
- if (mcopy)
- (void) looutput(ifp, mcopy, dst, rt);
- /*
- * Add local net header. If no space in first mbuf,
- * allocate another.
- */
- M_PREPEND(m, sizeof (struct ether_header), M_DONTWAIT);
- if (m == 0)
- senderr(ENOBUFS);
- eh = mtod(m, struct ether_header *);
- (void)memcpy(&eh->ether_type, &type,
- sizeof(eh->ether_type));
- (void)memcpy(eh->ether_dhost, edst, sizeof (edst));
- (void)memcpy(eh->ether_shost, ac->ac_enaddr,
- sizeof(eh->ether_shost));
- s = splimp();
- /*
- * Queue message on interface, and start output if interface
- * not yet active.
- */
- if (IF_QFULL(&ifp->if_snd)) {
- IF_DROP(&ifp->if_snd);
- splx(s);
- senderr(ENOBUFS);
- }
- IF_ENQUEUE(&ifp->if_snd, m);
- if ((ifp->if_flags & IFF_OACTIVE) == 0)
- (*ifp->if_start)(ifp);
- splx(s);
- ifp->if_obytes += len + sizeof (struct ether_header);
- if (m->m_flags & M_MCAST)
- ifp->if_omcasts++;
- return (error);
-
-bad:
- if (m)
- m_freem(m);
- return (error);
-}
-
-/*
- * Process a received Ethernet packet;
- * the packet is in the mbuf chain m without
- * the ether header, which is provided separately.
- */
-void
-ether_input(ifp, eh, m)
- struct ifnet *ifp;
- register struct ether_header *eh;
- struct mbuf *m;
-{
- register struct ifqueue *inq;
- u_short ether_type;
-#ifdef NS
- u_short *checksum;
-#endif
- int s;
-#if defined (ISO) || defined (LLC) || defined(NETATALK)
- register struct llc *l;
-#endif
-
- if ((ifp->if_flags & IFF_UP) == 0) {
- m_freem(m);
- return;
- }
- ifp->if_ibytes += m->m_pkthdr.len + sizeof (*eh);
- if (bcmp((caddr_t)etherbroadcastaddr, (caddr_t)eh->ether_dhost,
- sizeof(etherbroadcastaddr)) == 0)
- m->m_flags |= M_BCAST;
- else if (eh->ether_dhost[0] & 1)
- m->m_flags |= M_MCAST;
- if (m->m_flags & (M_BCAST|M_MCAST))
- ifp->if_imcasts++;
-
- /*
- * RTEMS addition -- allow application to `tap into'
- * the incoming packet stream.
- */
- if (ifp->if_tap && (*ifp->if_tap)(ifp, eh, m)) {
- m_freem(m);
- return;
- }
-
- ether_type = ntohs(eh->ether_type);
-
- switch (ether_type) {
-#ifdef INET
- case ETHERTYPE_IP:
- schednetisr(NETISR_IP);
- inq = &ipintrq;
- break;
-
- case ETHERTYPE_ARP:
- schednetisr(NETISR_ARP);
- inq = &arpintrq;
- break;
-#endif
-#ifdef IPX
- case ETHERTYPE_IPX:
- schednetisr(NETISR_IPX);
- inq = &ipxintrq;
- break;
-#endif
-#ifdef NS
- case 0x8137: /* Novell Ethernet_II Ethernet TYPE II */
- schednetisr(NETISR_NS);
- inq = &nsintrq;
- break;
-
-#endif /* NS */
-#ifdef NETATALK
- case ETHERTYPE_AT:
- schednetisr(NETISR_ATALK);
- inq = &atintrq1;
- break;
- case ETHERTYPE_AARP:
- /* probably this should be done with a NETISR as well */
- aarpinput((struct arpcom *)ifp, m); /* XXX */
- return;
-#endif NETATALK
- default:
-#ifdef NS
- checksum = mtod(m, ushort *);
- /* Novell 802.3 */
- if ((ether_type <= ETHERMTU) &&
- ((*checksum == 0xffff) || (*checksum == 0xE0E0))){
- if(*checksum == 0xE0E0) {
- m->m_pkthdr.len -= 3;
- m->m_len -= 3;
- m->m_data += 3;
- }
- schednetisr(NETISR_NS);
- inq = &nsintrq;
- break;
- }
-#endif /* NS */
-#if defined (ISO) || defined (LLC) || defined(NETATALK)
- if (ether_type > ETHERMTU)
- goto dropanyway;
- l = mtod(m, struct llc *);
- switch (l->llc_dsap) {
-#ifdef NETATALK
- case LLC_SNAP_LSAP:
- switch (l->llc_control) {
- case LLC_UI:
- if (l->llc_ssap != LLC_SNAP_LSAP)
- goto dropanyway;
-
- if (Bcmp(&(l->llc_snap_org_code)[0], at_org_code,
- sizeof(at_org_code)) == 0 &&
- ntohs(l->llc_snap_ether_type) == ETHERTYPE_AT) {
- inq = &atintrq2;
- m_adj( m, sizeof( struct llc ));
- schednetisr(NETISR_ATALK);
- break;
- }
-
- if (Bcmp(&(l->llc_snap_org_code)[0], aarp_org_code,
- sizeof(aarp_org_code)) == 0 &&
- ntohs(l->llc_snap_ether_type) == ETHERTYPE_AARP) {
- m_adj( m, sizeof( struct llc ));
- aarpinput((struct arpcom *)ifp, m); /* XXX */
- return;
- }
-
- default:
- goto dropanyway;
- }
- break;
-#endif NETATALK
-#ifdef ISO
- case LLC_ISO_LSAP:
- switch (l->llc_control) {
- case LLC_UI:
- /* LLC_UI_P forbidden in class 1 service */
- if ((l->llc_dsap == LLC_ISO_LSAP) &&
- (l->llc_ssap == LLC_ISO_LSAP)) {
- /* LSAP for ISO */
- if (m->m_pkthdr.len > ether_type)
- m_adj(m, ether_type - m->m_pkthdr.len);
- m->m_data += 3; /* XXX */
- m->m_len -= 3; /* XXX */
- m->m_pkthdr.len -= 3; /* XXX */
- M_PREPEND(m, sizeof *eh, M_DONTWAIT);
- if (m == 0)
- return;
- *mtod(m, struct ether_header *) = *eh;
- IFDEBUG(D_ETHER)
- printf("clnp packet");
- ENDDEBUG
- schednetisr(NETISR_ISO);
- inq = &clnlintrq;
- break;
- }
- goto dropanyway;
-
- case LLC_XID:
- case LLC_XID_P:
- if(m->m_len < 6)
- goto dropanyway;
- l->llc_window = 0;
- l->llc_fid = 9;
- l->llc_class = 1;
- l->llc_dsap = l->llc_ssap = 0;
- /* Fall through to */
- case LLC_TEST:
- case LLC_TEST_P:
- {
- struct sockaddr sa;
- register struct ether_header *eh2;
- int i;
- u_char c = l->llc_dsap;
-
- l->llc_dsap = l->llc_ssap;
- l->llc_ssap = c;
- if (m->m_flags & (M_BCAST | M_MCAST))
- bcopy((caddr_t)ac->ac_enaddr,
- (caddr_t)eh->ether_dhost, 6);
- sa.sa_family = AF_UNSPEC;
- sa.sa_len = sizeof(sa);
- eh2 = (struct ether_header *)sa.sa_data;
- for (i = 0; i < 6; i++) {
- eh2->ether_shost[i] = c = eh->ether_dhost[i];
- eh2->ether_dhost[i] =
- eh->ether_dhost[i] = eh->ether_shost[i];
- eh->ether_shost[i] = c;
- }
- ifp->if_output(ifp, m, &sa, NULL);
- return;
- }
- default:
- m_freem(m);
- return;
- }
- break;
-#endif /* ISO */
-#ifdef LLC
- case LLC_X25_LSAP:
- {
- if (m->m_pkthdr.len > ether_type)
- m_adj(m, ether_type - m->m_pkthdr.len);
- M_PREPEND(m, sizeof(struct sdl_hdr) , M_DONTWAIT);
- if (m == 0)
- return;
- if ( !sdl_sethdrif(ifp, eh->ether_shost, LLC_X25_LSAP,
- eh->ether_dhost, LLC_X25_LSAP, 6,
- mtod(m, struct sdl_hdr *)))
- panic("ETHER cons addr failure");
- mtod(m, struct sdl_hdr *)->sdlhdr_len = ether_type;
-#ifdef LLC_DEBUG
- printf("llc packet\n");
-#endif /* LLC_DEBUG */
- schednetisr(NETISR_CCITT);
- inq = &llcintrq;
- break;
- }
-#endif /* LLC */
- dropanyway:
- default:
- m_freem(m);
- return;
- }
-#else /* ISO || LLC || NETATALK */
- m_freem(m);
- return;
-#endif /* ISO || LLC || NETATALK */
- }
-
- s = splimp();
- if (IF_QFULL(inq)) {
- IF_DROP(inq);
- m_freem(m);
- } else
- IF_ENQUEUE(inq, m);
- splx(s);
-}
-
-/*
- * Perform common duties while attaching to interface list
- */
-void
-ether_ifattach(ifp)
- register struct ifnet *ifp;
-{
- register struct ifaddr *ifa;
- register struct sockaddr_dl *sdl;
-
- ifp->if_type = IFT_ETHER;
- ifp->if_addrlen = 6;
- ifp->if_hdrlen = 14;
- ifp->if_mtu = ETHERMTU;
- if (ifp->if_baudrate == 0)
- ifp->if_baudrate = 10000000;
- for (ifa = ifp->if_addrlist; ifa; ifa = ifa->ifa_next)
- if ((sdl = (struct sockaddr_dl *)ifa->ifa_addr) &&
- sdl->sdl_family == AF_LINK) {
- sdl->sdl_type = IFT_ETHER;
- sdl->sdl_alen = ifp->if_addrlen;
- bcopy((caddr_t)((struct arpcom *)ifp)->ac_enaddr,
- LLADDR(sdl), ifp->if_addrlen);
- break;
- }
-}
-
-static u_char ether_ipmulticast_min[6] =
- { 0x01, 0x00, 0x5e, 0x00, 0x00, 0x00 };
-static u_char ether_ipmulticast_max[6] =
- { 0x01, 0x00, 0x5e, 0x7f, 0xff, 0xff };
-/*
- * Add an Ethernet multicast address or range of addresses to the list for a
- * given interface.
- */
-int
-ether_addmulti(ifr, ac)
- struct ifreq *ifr;
- register struct arpcom *ac;
-{
- register struct ether_multi *enm;
- struct sockaddr_in *sin;
- u_char addrlo[6];
- u_char addrhi[6];
- int set_allmulti = 0;
- int s = splimp();
-
- switch (ifr->ifr_addr.sa_family) {
-
- case AF_UNSPEC:
- bcopy(ifr->ifr_addr.sa_data, addrlo, 6);
- bcopy(addrlo, addrhi, 6);
- break;
-
-#ifdef INET
- case AF_INET:
- sin = (struct sockaddr_in *)&(ifr->ifr_addr);
- if (sin->sin_addr.s_addr == INADDR_ANY) {
- /*
- * An IP address of INADDR_ANY means listen to all
- * of the Ethernet multicast addresses used for IP.
- * (This is for the sake of IP multicast routers.)
- */
- bcopy(ether_ipmulticast_min, addrlo, 6);
- bcopy(ether_ipmulticast_max, addrhi, 6);
- set_allmulti = 1;
- }
- else {
- ETHER_MAP_IP_MULTICAST(&sin->sin_addr, addrlo);
- bcopy(addrlo, addrhi, 6);
- }
- break;
-#endif
-
- default:
- splx(s);
- return (EAFNOSUPPORT);
- }
-
- /*
- * Verify that we have valid Ethernet multicast addresses.
- */
- if ((addrlo[0] & 0x01) != 1 || (addrhi[0] & 0x01) != 1) {
- splx(s);
- return (EINVAL);
- }
- /*
- * See if the address range is already in the list.
- */
- ETHER_LOOKUP_MULTI(addrlo, addrhi, ac, enm);
- if (enm != NULL) {
- /*
- * Found it; just increment the reference count.
- */
- ++enm->enm_refcount;
- splx(s);
- return (0);
- }
- /*
- * New address or range; malloc a new multicast record
- * and link it into the interface's multicast list.
- */
- enm = (struct ether_multi *)malloc(sizeof(*enm), M_IFMADDR, M_NOWAIT);
- if (enm == NULL) {
- splx(s);
- return (ENOBUFS);
- }
- bcopy(addrlo, enm->enm_addrlo, 6);
- bcopy(addrhi, enm->enm_addrhi, 6);
- enm->enm_ac = ac;
- enm->enm_refcount = 1;
- enm->enm_next = ac->ac_multiaddrs;
- ac->ac_multiaddrs = enm;
- ac->ac_multicnt++;
- splx(s);
- if (set_allmulti)
- ac->ac_if.if_flags |= IFF_ALLMULTI;
-
- /*
- * Return ENETRESET to inform the driver that the list has changed
- * and its reception filter should be adjusted accordingly.
- */
- return (ENETRESET);
-}
-
-/*
- * Delete a multicast address record.
- */
-int
-ether_delmulti(ifr, ac)
- struct ifreq *ifr;
- register struct arpcom *ac;
-{
- register struct ether_multi *enm;
- register struct ether_multi **p;
- struct sockaddr_in *sin;
- u_char addrlo[6];
- u_char addrhi[6];
- int unset_allmulti = 0;
- int s = splimp();
-
- switch (ifr->ifr_addr.sa_family) {
-
- case AF_UNSPEC:
- bcopy(ifr->ifr_addr.sa_data, addrlo, 6);
- bcopy(addrlo, addrhi, 6);
- break;
-
-#ifdef INET
- case AF_INET:
- sin = (struct sockaddr_in *)&(ifr->ifr_addr);
- if (sin->sin_addr.s_addr == INADDR_ANY) {
- /*
- * An IP address of INADDR_ANY means stop listening
- * to the range of Ethernet multicast addresses used
- * for IP.
- */
- bcopy(ether_ipmulticast_min, addrlo, 6);
- bcopy(ether_ipmulticast_max, addrhi, 6);
- unset_allmulti = 1;
- }
- else {
- ETHER_MAP_IP_MULTICAST(&sin->sin_addr, addrlo);
- bcopy(addrlo, addrhi, 6);
- }
- break;
-#endif
-
- default:
- splx(s);
- return (EAFNOSUPPORT);
- }
-
- /*
- * Look up the address in our list.
- */
- ETHER_LOOKUP_MULTI(addrlo, addrhi, ac, enm);
- if (enm == NULL) {
- splx(s);
- return (ENXIO);
- }
- if (--enm->enm_refcount != 0) {
- /*
- * Still some claims to this record.
- */
- splx(s);
- return (0);
- }
- /*
- * No remaining claims to this record; unlink and free it.
- */
- for (p = &enm->enm_ac->ac_multiaddrs;
- *p != enm;
- p = &(*p)->enm_next)
- continue;
- *p = (*p)->enm_next;
- free(enm, M_IFMADDR);
- ac->ac_multicnt--;
- splx(s);
- if (unset_allmulti)
- ac->ac_if.if_flags &= ~IFF_ALLMULTI;
-
- /*
- * Return ENETRESET to inform the driver that the list has changed
- * and its reception filter should be adjusted accordingly.
- */
- return (ENETRESET);
-}
-
-SYSCTL_NODE(_net_link, IFT_ETHER, ether, CTLFLAG_RW, 0, "Ethernet");
-
-int
-ether_ioctl(struct ifnet *ifp, int command, caddr_t data)
-{
- struct ifaddr *ifa = (struct ifaddr *) data;
- struct ifreq *ifr = (struct ifreq *) data;
- int error = 0;
-
- switch (command) {
- case SIOCSIFADDR:
- ifp->if_flags |= IFF_UP;
-
- switch (ifa->ifa_addr->sa_family) {
-#ifdef INET
- case AF_INET:
- ifp->if_init(ifp->if_softc); /* before arpwhohas */
- arp_ifinit((struct arpcom *)ifp, ifa);
- break;
-#endif
-#ifdef IPX
- /*
- * XXX - This code is probably wrong
- */
- case AF_IPX:
- {
- register struct ipx_addr *ina = &(IA_SIPX(ifa)->sipx_addr);
- struct arpcom *ac = (struct arpcom *) (ifp->if_softc);
-
- if (ipx_nullhost(*ina))
- ina->x_host =
- *(union ipx_host *)
- ac->ac_enaddr;
- else {
- bcopy((caddr_t) ina->x_host.c_host,
- (caddr_t) ac->ac_enaddr,
- sizeof(ac->ac_enaddr));
- }
-
- /*
- * Set new address
- */
- ifp->if_init(ifp->if_softc);
- break;
- }
-#endif
-#ifdef NS
- /*
- * XXX - This code is probably wrong
- */
- case AF_NS:
- {
- register struct ns_addr *ina = &(IA_SNS(ifa)->sns_addr);
- struct arpcom *ac = (struct arpcom *) (ifp->if_softc);
-
- if (ns_nullhost(*ina))
- ina->x_host =
- *(union ns_host *) (ac->ac_enaddr);
- else {
- bcopy((caddr_t) ina->x_host.c_host,
- (caddr_t) ac->ac_enaddr,
- sizeof(ac->ac_enaddr));
- }
-
- /*
- * Set new address
- */
- ifp->if_init(ifp->if_softc);
- break;
- }
-#endif
- default:
- ifp->if_init(ifp->if_softc);
- break;
- }
- break;
-
- case SIOCGIFADDR:
- {
- struct sockaddr *sa;
-
- sa = (struct sockaddr *) & ifr->ifr_data;
- bcopy(((struct arpcom *)ifp->if_softc)->ac_enaddr,
- (caddr_t) sa->sa_data, ETHER_ADDR_LEN);
- }
- break;
-
- case SIOCSIFMTU:
- /*
- * Set the interface MTU.
- */
- if (ifr->ifr_mtu > ETHERMTU) {
- error = EINVAL;
- } else {
- ifp->if_mtu = ifr->ifr_mtu;
- }
- break;
- }
- return (error);
-}
diff --git a/cpukit/libnetworking/net/if_llc.h b/cpukit/libnetworking/net/if_llc.h
deleted file mode 100644
index 3cdf652167..0000000000
--- a/cpukit/libnetworking/net/if_llc.h
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)if_llc.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _NET_IF_LLC_H_
-#define _NET_IF_LLC_H_
-
-/*
- * IEEE 802.2 Link Level Control headers, for use in conjunction with
- * 802.{3,4,5} media access control methods.
- *
- * Headers here do not use bit fields due to shortcomings in many
- * compilers.
- */
-
-struct llc {
- u_char llc_dsap;
- u_char llc_ssap;
- union {
- struct {
- u_char control;
- u_char format_id;
- u_char class;
- u_char window_x2;
- } type_u;
- struct {
- u_char num_snd_x2;
- u_char num_rcv_x2;
- } type_i;
- struct {
- u_char control;
- u_char num_rcv_x2;
- } type_s;
- struct {
- u_char control;
- struct frmrinfo {
- u_char rej_pdu_0;
- u_char rej_pdu_1;
- u_char frmr_control;
- u_char frmr_control_ext;
- u_char frmr_cause;
- } frmrinfo;
- } type_frmr;
- struct {
- u_char control;
- u_char org_code[3];
- u_short ether_type;
- } type_snap;
- struct {
- u_char control;
- u_char control_ext;
- } type_raw;
- } llc_un;
-};
-#define llc_control llc_un.type_u.control
-#define llc_control_ext llc_un.type_raw.control_ext
-#define llc_fid llc_un.type_u.format_id
-#define llc_class llc_un.type_u.class
-#define llc_window llc_un.type_u.window_x2
-#define llc_frmrinfo llc_un.type_frmr.frmrinfo
-#define llc_frmr_pdu0 llc_un.type_frmr.frmrinfo.rej_pdu0
-#define llc_frmr_pdu1 llc_un.type_frmr.frmrinfo.rej_pdu1
-#define llc_frmr_control llc_un.type_frmr.frmrinfo.frmr_control
-#define llc_frmr_control_ext llc_un.type_frmr.frmrinfo.frmr_control_ext
-#define llc_frmr_cause llc_un.type_frmr.frmrinfo.frmr_control_ext
-
-/*
- * Don't use sizeof(struct llc_un) for LLC header sizes
- */
-#define LLC_ISFRAMELEN 4
-#define LLC_UFRAMELEN 3
-#define LLC_FRMRLEN 7
-
-/*
- * Unnumbered LLC format commands
- */
-#define LLC_UI 0x3
-#define LLC_UI_P 0x13
-#define LLC_DISC 0x43
-#define LLC_DISC_P 0x53
-#define LLC_UA 0x63
-#define LLC_UA_P 0x73
-#define LLC_TEST 0xe3
-#define LLC_TEST_P 0xf3
-#define LLC_FRMR 0x87
-#define LLC_FRMR_P 0x97
-#define LLC_DM 0x0f
-#define LLC_DM_P 0x1f
-#define LLC_XID 0xaf
-#define LLC_XID_P 0xbf
-#define LLC_SABME 0x6f
-#define LLC_SABME_P 0x7f
-
-/*
- * Supervisory LLC commands
- */
-#define LLC_RR 0x01
-#define LLC_RNR 0x05
-#define LLC_REJ 0x09
-
-/*
- * Info format - dummy only
- */
-#define LLC_INFO 0x00
-
-/*
- * ISO PDTR 10178 contains among others
- */
-#define LLC_X25_LSAP 0x7e
-#define LLC_SNAP_LSAP 0xaa
-#define LLC_ISO_LSAP 0xfe
-
-#endif
diff --git a/cpukit/libnetworking/net/if_loop.c b/cpukit/libnetworking/net/if_loop.c
deleted file mode 100644
index 3823c28744..0000000000
--- a/cpukit/libnetworking/net/if_loop.c
+++ /dev/null
@@ -1,301 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)if_loop.c 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-/*
- * Loopback interface driver for protocol testing and timing.
- */
-#include "loop.h"
-#if NLOOP > 0
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-#include <sys/errno.h>
-#include <sys/ioctl.h>
-#include <sys/time.h>
-
-#include <net/if.h>
-#include <net/if_types.h>
-#include <net/netisr.h>
-#include <net/route.h>
-#include <net/bpf.h>
-
-#ifdef INET
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/in_var.h>
-#include <netinet/ip.h>
-#endif
-
-#ifdef IPX
-#include <netipx/ipx.h>
-#include <netipx/ipx_if.h>
-#endif
-
-#ifdef NS
-#include <netns/ns.h>
-#include <netns/ns_if.h>
-#endif
-
-#ifdef ISO
-#include <netiso/iso.h>
-#include <netiso/iso_var.h>
-#endif
-
-#ifdef NETATALK
-#include <netinet/if_ether.h>
-#include <netatalk/at.h>
-#include <netatalk/at_var.h>
-#endif NETATALK
-
-#include "bpfilter.h"
-
-static int loioctl __P((struct ifnet *, int, caddr_t));
-static void lortrequest __P((int, struct rtentry *, struct sockaddr *));
-
- void rtems_bsdnet_loopattach __P((void *));
-PSEUDO_SET(loopattach, if_loop);
-
-#ifdef TINY_LOMTU
-#define LOMTU (1024+512)
-#else
-#define LOMTU 16384
-#endif
-
-struct ifnet loif[NLOOP];
-
-/* ARGSUSED */
-void
-rtems_bsdnet_loopattach(dummy)
- void *dummy;
-{
- register struct ifnet *ifp;
- register int i = 0;
-
- for (ifp = loif; i < NLOOP; ifp++) {
- ifp->if_name = "lo";
- ifp->if_next = NULL;
- ifp->if_unit = i++;
- ifp->if_mtu = LOMTU;
- ifp->if_flags = IFF_LOOPBACK | IFF_MULTICAST;
- ifp->if_ioctl = loioctl;
- ifp->if_output = looutput;
- ifp->if_type = IFT_LOOP;
- ifp->if_hdrlen = 0;
- ifp->if_addrlen = 0;
- if_attach(ifp);
-#if NBPFILTER > 0
- bpfattach(ifp, DLT_NULL, sizeof(u_int));
-#endif
- }
-}
-
-int
-looutput(ifp, m, dst, rt)
- struct ifnet *ifp;
- register struct mbuf *m;
- struct sockaddr *dst;
- register struct rtentry *rt;
-{
- int s, isr;
- register struct ifqueue *ifq = 0;
-
- if ((m->m_flags & M_PKTHDR) == 0)
- panic("looutput no HDR");
-#if NBPFILTER > 0
- /* BPF write needs to be handled specially */
- if (dst->sa_family == AF_UNSPEC) {
- dst->sa_family = *(mtod(m, int *));
- m->m_len -= sizeof(int);
- m->m_pkthdr.len -= sizeof(int);
- m->m_data += sizeof(int);
- }
-
- if (ifp->if_bpf) {
- /*
- * We need to prepend the address family as
- * a four byte field. Cons up a dummy header
- * to pacify bpf. This is safe because bpf
- * will only read from the mbuf (i.e., it won't
- * try to free it or keep a pointer a to it).
- */
- struct mbuf m0;
- u_int af = dst->sa_family;
-
- m0.m_next = m;
- m0.m_len = 4;
- m0.m_data = (char *)&af;
-
- bpf_mtap(ifp, &m0);
- }
-#endif
- m->m_pkthdr.rcvif = ifp;
-
- if (rt && rt->rt_flags & (RTF_REJECT|RTF_BLACKHOLE)) {
- m_freem(m);
- return (rt->rt_flags & RTF_BLACKHOLE ? 0 :
- rt->rt_flags & RTF_HOST ? EHOSTUNREACH : ENETUNREACH);
- }
- ifp->if_opackets++;
- ifp->if_obytes += m->m_pkthdr.len;
- switch (dst->sa_family) {
-
-#ifdef INET
- case AF_INET:
- ifq = &ipintrq;
- isr = NETISR_IP;
- break;
-#endif
-#ifdef IPX
- case AF_IPX:
- ifq = &ipxintrq;
- isr = NETISR_IPX;
- break;
-#endif
-#ifdef NS
- case AF_NS:
- ifq = &nsintrq;
- isr = NETISR_NS;
- break;
-#endif
-#ifdef ISO
- case AF_ISO:
- ifq = &clnlintrq;
- isr = NETISR_ISO;
- break;
-#endif
-#ifdef NETATALK
- case AF_APPLETALK:
- ifq = &atintrq2;
- isr = NETISR_ATALK;
- break;
-#endif NETATALK
- default:
- printf("lo%d: can't handle af%d\n", ifp->if_unit,
- dst->sa_family);
- m_freem(m);
- return (EAFNOSUPPORT);
- }
- s = splimp();
- if (IF_QFULL(ifq)) {
- IF_DROP(ifq);
- m_freem(m);
- splx(s);
- return (ENOBUFS);
- }
- IF_ENQUEUE(ifq, m);
- schednetisr(isr);
- ifp->if_ipackets++;
- ifp->if_ibytes += m->m_pkthdr.len;
- splx(s);
- return (0);
-}
-
-/* ARGSUSED */
-static void
-lortrequest(cmd, rt, sa)
- int cmd;
- struct rtentry *rt;
- struct sockaddr *sa;
-{
- if (rt) {
- rt->rt_rmx.rmx_mtu = rt->rt_ifp->if_mtu; /* for ISO */
- /*
- * For optimal performance, the send and receive buffers
- * should be at least twice the MTU plus a little more for
- * overhead.
- */
- rt->rt_rmx.rmx_recvpipe =
- rt->rt_rmx.rmx_sendpipe = 3 * LOMTU;
- }
-}
-
-/*
- * Process an ioctl request.
- */
-/* ARGSUSED */
-static int
-loioctl(ifp, cmd, data)
- register struct ifnet *ifp;
- int cmd;
- caddr_t data;
-{
- register struct ifaddr *ifa;
- register struct ifreq *ifr = (struct ifreq *)data;
- register int error = 0;
-
- switch (cmd) {
-
- case SIOCSIFADDR:
- ifp->if_flags |= IFF_UP | IFF_RUNNING;
- ifa = (struct ifaddr *)data;
- ifa->ifa_rtrequest = lortrequest;
- /*
- * Everything else is done at a higher level.
- */
- break;
-
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- if (ifr == 0) {
- error = EAFNOSUPPORT; /* XXX */
- break;
- }
- switch (ifr->ifr_addr.sa_family) {
-
-#ifdef INET
- case AF_INET:
- break;
-#endif
-
- default:
- error = EAFNOSUPPORT;
- break;
- }
- break;
-
- case SIOCSIFMTU:
- ifp->if_mtu = ifr->ifr_mtu;
- break;
-
- default:
- error = EINVAL;
- }
- return (error);
-}
-#endif /* NLOOP > 0 */
diff --git a/cpukit/libnetworking/net/if_ppp.h b/cpukit/libnetworking/net/if_ppp.h
deleted file mode 100644
index 9322f2e13b..0000000000
--- a/cpukit/libnetworking/net/if_ppp.h
+++ /dev/null
@@ -1,132 +0,0 @@
-/* $Id$ */
-
-/*
- * if_ppp.h - Point-to-Point Protocol definitions.
- *
- * Copyright (c) 1989 Carnegie Mellon University.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by Carnegie Mellon University. The name of the
- * University may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#ifndef _IF_PPP_H_
-#define _IF_PPP_H_
-
-/*
- * Bit definitions for flags.
- */
-#define SC_COMP_PROT 0x00000001 /* protocol compression (output) */
-#define SC_COMP_AC 0x00000002 /* header compression (output) */
-#define SC_COMP_TCP 0x00000004 /* TCP (VJ) compression (output) */
-#define SC_NO_TCP_CCID 0x00000008 /* disable VJ connection-id comp. */
-#define SC_REJ_COMP_AC 0x00000010 /* reject adrs/ctrl comp. on input */
-#define SC_REJ_COMP_TCP 0x00000020 /* reject TCP (VJ) comp. on input */
-#define SC_CCP_OPEN 0x00000040 /* Look at CCP packets */
-#define SC_CCP_UP 0x00000080 /* May send/recv compressed packets */
-#define SC_DEBUG 0x00010000 /* enable debug messages */
-#define SC_LOG_INPKT 0x00020000 /* log contents of good pkts recvd */
-#define SC_LOG_OUTPKT 0x00040000 /* log contents of pkts sent */
-#define SC_LOG_RAWIN 0x00080000 /* log all chars received */
-#define SC_LOG_FLUSH 0x00100000 /* log all chars flushed */
-#define SC_RCV_B7_0 0x01000000 /* have rcvd char with bit 7 = 0 */
-#define SC_RCV_B7_1 0x02000000 /* have rcvd char with bit 7 = 1 */
-#define SC_RCV_EVNP 0x04000000 /* have rcvd char with even parity */
-#define SC_RCV_ODDP 0x08000000 /* have rcvd char with odd parity */
-#define SC_MASK 0x0fff00ff /* bits that user can change */
-
-/*
- * State bits in sc_flags, not changeable by user.
- */
-#define SC_TIMEOUT 0x00000400 /* timeout is currently pending */
-#define SC_VJ_RESET 0x00000800 /* need to reset VJ decomp */
-#define SC_COMP_RUN 0x00001000 /* compressor has been inited */
-#define SC_DECOMP_RUN 0x00002000 /* decompressor has been inited */
-#define SC_DC_ERROR 0x00004000 /* non-fatal decomp error detected */
-#define SC_DC_FERROR 0x00008000 /* fatal decomp error detected */
-#define SC_TBUSY 0x10000000 /* xmitter doesn't need a packet yet */
-#define SC_PKTLOST 0x20000000 /* have lost or dropped a packet */
-#define SC_FLUSH 0x40000000 /* flush input until next PPP_FLAG */
-#define SC_ESCAPED 0x80000000 /* saw a PPP_ESCAPE */
-
-/*
- * Ioctl definitions.
- */
-
-struct npioctl {
- int protocol; /* PPP procotol, e.g. PPP_IP */
- enum NPmode mode;
-};
-
-/* Structure describing a CCP configuration option, for PPPIOCSCOMPRESS */
-struct ppp_option_data {
- u_char *ptr;
- u_int length;
- int transmit;
-};
-
-struct ifpppstatsreq {
- char ifr_name[IFNAMSIZ];
- struct ppp_stats stats;
-};
-
-struct ifpppcstatsreq {
- char ifr_name[IFNAMSIZ];
- struct ppp_comp_stats stats;
-};
-
-/*
- * Ioctl definitions.
- */
-
-#define PPPIOCGFLAGS _IOR('t', 90, int) /* get configuration flags */
-#define PPPIOCSFLAGS _IOW('t', 89, int) /* set configuration flags */
-#define PPPIOCGASYNCMAP _IOR('t', 88, int) /* get async map */
-#define PPPIOCSASYNCMAP _IOW('t', 87, int) /* set async map */
-#define PPPIOCGUNIT _IOR('t', 86, int) /* get ppp unit number */
-#define PPPIOCGRASYNCMAP _IOR('t', 85, int) /* get receive async map */
-#define PPPIOCSRASYNCMAP _IOW('t', 84, int) /* set receive async map */
-#define PPPIOCGMRU _IOR('t', 83, int) /* get max receive unit */
-#define PPPIOCSMRU _IOW('t', 82, int) /* set max receive unit */
-#define PPPIOCSMAXCID _IOW('t', 81, int) /* set VJ max slot ID */
-#define PPPIOCGXASYNCMAP _IOR('t', 80, ext_accm) /* get extended ACCM */
-#define PPPIOCSXASYNCMAP _IOW('t', 79, ext_accm) /* set extended ACCM */
-#define PPPIOCXFERUNIT _IO('t', 78) /* transfer PPP unit */
-#define PPPIOCSCOMPRESS _IOW('t', 77, struct ppp_option_data)
-#define PPPIOCGNPMODE _IOWR('t', 76, struct npioctl) /* get NP mode */
-#define PPPIOCSNPMODE _IOW('t', 75, struct npioctl) /* set NP mode */
-#define PPPIOCGIDLE _IOR('t', 74, struct ppp_idle) /* get idle time */
-#ifdef PPP_FILTER
-#define PPPIOCSPASS _IOW('t', 71, struct bpf_program) /* set pass filter */
-#define PPPIOCSACTIVE _IOW('t', 70, struct bpf_program) /* set active filt */
-#endif /* PPP_FILTER */
-
-/* PPPIOC[GS]MTU are alternatives to SIOC[GS]IFMTU, used under Ultrix */
-#define PPPIOCGMTU _IOR('t', 73, int) /* get interface MTU */
-#define PPPIOCSMTU _IOW('t', 72, int) /* set interface MTU */
-
-/*
- * These two are interface ioctls so that pppstats can do them on
- * a socket without having to open the serial device.
- */
-#define SIOCGPPPSTATS _IOWR('i', 123, struct ifpppstatsreq)
-#define SIOCGPPPCSTATS _IOWR('i', 122, struct ifpppcstatsreq)
-
-#if !defined(ifr_mtu)
-#define ifr_mtu ifr_ifru.ifru_metric
-#endif
-
-#if (defined(_KERNEL) || defined(KERNEL)) && !defined(NeXT)
-void pppattach __P((void));
-void pppintr __P((void));
-#endif
-#endif /* _IF_PPP_H_ */
diff --git a/cpukit/libnetworking/net/if_types.h b/cpukit/libnetworking/net/if_types.h
deleted file mode 100644
index 833ba471c3..0000000000
--- a/cpukit/libnetworking/net/if_types.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright (c) 1989, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)if_types.h 8.2 (Berkeley) 4/20/94
- * $Id$
- */
-
-#ifndef _NET_IF_TYPES_H_
-#define _NET_IF_TYPES_H_
-
-/*
- * Interface types for benefit of parsing media address headers.
- * This list is derived from the SNMP list of ifTypes, currently
- * documented in RFC1573.
- */
-
-#define IFT_OTHER 0x1 /* none of the following */
-#define IFT_1822 0x2 /* old-style arpanet imp */
-#define IFT_HDH1822 0x3 /* HDH arpanet imp */
-#define IFT_X25DDN 0x4 /* x25 to imp */
-#define IFT_X25 0x5 /* PDN X25 interface (RFC877) */
-#define IFT_ETHER 0x6 /* Ethernet CSMACD */
-#define IFT_ISO88023 0x7 /* CMSA CD */
-#define IFT_ISO88024 0x8 /* Token Bus */
-#define IFT_ISO88025 0x9 /* Token Ring */
-#define IFT_ISO88026 0xa /* MAN */
-#define IFT_STARLAN 0xb
-#define IFT_P10 0xc /* Proteon 10MBit ring */
-#define IFT_P80 0xd /* Proteon 80MBit ring */
-#define IFT_HY 0xe /* Hyperchannel */
-#define IFT_FDDI 0xf
-#define IFT_LAPB 0x10
-#define IFT_SDLC 0x11
-#define IFT_T1 0x12
-#define IFT_CEPT 0x13 /* E1 - european T1 */
-#define IFT_ISDNBASIC 0x14
-#define IFT_ISDNPRIMARY 0x15
-#define IFT_PTPSERIAL 0x16 /* Proprietary PTP serial */
-#define IFT_PPP 0x17 /* RFC 1331 */
-#define IFT_LOOP 0x18 /* loopback */
-#define IFT_EON 0x19 /* ISO over IP */
-#define IFT_XETHER 0x1a /* obsolete 3MB experimental ethernet */
-#define IFT_NSIP 0x1b /* XNS over IP */
-#define IFT_SLIP 0x1c /* IP over generic TTY */
-#define IFT_ULTRA 0x1d /* Ultra Technologies */
-#define IFT_DS3 0x1e /* Generic T3 */
-#define IFT_SIP 0x1f /* SMDS */
-#define IFT_FRELAY 0x20 /* Frame Relay DTE only */
-#define IFT_RS232 0x21
-#define IFT_PARA 0x22 /* parallel-port */
-#define IFT_ARCNET 0x23
-#define IFT_ARCNETPLUS 0x24
-#define IFT_ATM 0x25 /* ATM cells */
-#define IFT_MIOX25 0x26
-#define IFT_SONET 0x27 /* SONET or SDH */
-#define IFT_X25PLE 0x28
-#define IFT_ISO88022LLC 0x29
-#define IFT_LOCALTALK 0x2a
-#define IFT_SMDSDXI 0x2b
-#define IFT_FRELAYDCE 0x2c /* Frame Relay DCE */
-#define IFT_V35 0x2d
-#define IFT_HSSI 0x2e
-#define IFT_HIPPI 0x2f
-#define IFT_MODEM 0x30 /* Generic Modem */
-#define IFT_AAL5 0x31 /* AAL5 over ATM */
-#define IFT_SONETPATH 0x32
-#define IFT_SONETVT 0x33
-#define IFT_SMDSICIP 0x34 /* SMDS InterCarrier Interface */
-#define IFT_PROPVIRTUAL 0x35 /* Proprietary Virtual/internal */
-#define IFT_PROPMUX 0x36 /* Proprietary Multiplexing */
-
-#endif
diff --git a/cpukit/libnetworking/net/netisr.h b/cpukit/libnetworking/net/netisr.h
deleted file mode 100644
index 73269a4442..0000000000
--- a/cpukit/libnetworking/net/netisr.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 1980, 1986, 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)netisr.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _NET_NETISR_H_
-#define _NET_NETISR_H_
-
-/*
- * The networking code runs off software interrupts.
- *
- * You can switch into the network by doing splnet() and return by splx().
- * The software interrupt level for the network is higher than the software
- * level for the clock (so you can enter the network in routines called
- * at timeout time).
- */
-#if defined(vax) || defined(tahoe)
-#define setsoftnet() mtpr(SIRR, 12)
-#endif
-
-/*
- * Each ``pup-level-1'' input queue has a bit in a ``netisr'' status
- * word which is used to de-multiplex a single software
- * interrupt used for scheduling the network code to calls
- * on the lowest level routine of each protocol.
- */
-#define NETISR_RAW 0 /* same as AF_UNSPEC */
-#define NETISR_IP 2 /* same as AF_INET */
-#define NETISR_IMP 3 /* same as AF_IMPLINK */
-#define NETISR_NS 6 /* same as AF_NS */
-#define NETISR_ISO 7 /* same as AF_ISO */
-#define NETISR_CCITT 10 /* same as AF_CCITT */
-#define NETISR_ATALK 16 /* same as AF_APPLETALK */
-#define NETISR_ARP 18 /* same as AF_LINK */
-#define NETISR_IPX 23 /* same as AF_IPX */
-#define NETISR_ISDN 26 /* same as AF_E164 */
-#define NETISR_PPP 27 /* PPP soft interrupt */
-
-#define schednetisr(anisr) rtems_bsdnet_schednetisr(anisr)
-
-#ifndef LOCORE
-#ifdef KERNEL
-extern volatile unsigned int netisr; /* scheduling bits for network */
-
-typedef void netisr_t(void);
-
-struct netisrtab {
- int nit_num;
- netisr_t *nit_isr;
-};
-
-#define NETISR_SET(num, isr)
-
-int register_netisr __P((int, netisr_t *));
-
-#endif
-#endif
-
-#endif
diff --git a/cpukit/libnetworking/net/ppp-comp.h b/cpukit/libnetworking/net/ppp-comp.h
deleted file mode 100644
index 0e6a9c672f..0000000000
--- a/cpukit/libnetworking/net/ppp-comp.h
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * ppp-comp.h - Definitions for doing PPP packet compression.
- *
- * Copyright (c) 1994 The Australian National University.
- * All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation is hereby granted, provided that the above copyright
- * notice appears in all copies. This software is provided without any
- * warranty, express or implied. The Australian National University
- * makes no representations about the suitability of this software for
- * any purpose.
- *
- * IN NO EVENT SHALL THE AUSTRALIAN NATIONAL UNIVERSITY BE LIABLE TO ANY
- * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
- * THE AUSTRALIAN NATIONAL UNIVERSITY HAVE BEEN ADVISED OF THE POSSIBILITY
- * OF SUCH DAMAGE.
- *
- * THE AUSTRALIAN NATIONAL UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE AUSTRALIAN NATIONAL UNIVERSITY HAS NO
- * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,
- * OR MODIFICATIONS.
- *
- * $Id$
- */
-
-#ifndef _NET_PPP_COMP_H
-#define _NET_PPP_COMP_H
-
-/*
- * The following symbols control whether we include code for
- * various compression methods.
- */
-#ifndef DO_BSD_COMPRESS
-#define DO_BSD_COMPRESS 1 /* by default, include BSD-Compress */
-#endif
-#ifndef DO_DEFLATE
-#define DO_DEFLATE 1 /* by default, include Deflate */
-#endif
-#define DO_PREDICTOR_1 0
-#define DO_PREDICTOR_2 0
-
-/*
- * Structure giving methods for compression/decompression.
- */
-#ifdef PACKETPTR
-struct compressor {
- int compress_proto; /* CCP compression protocol number */
-
- /* Allocate space for a compressor (transmit side) */
- void *(*comp_alloc) __P((u_char *options, int opt_len));
- /* Free space used by a compressor */
- void (*comp_free) __P((void *state));
- /* Initialize a compressor */
- int (*comp_init) __P((void *state, u_char *options, int opt_len,
- int unit, int hdrlen, int debug));
- /* Reset a compressor */
- void (*comp_reset) __P((void *state));
- /* Compress a packet */
- int (*compress) __P((void *state, PACKETPTR *mret,
- PACKETPTR mp, int orig_len, int max_len));
- /* Return compression statistics */
- void (*comp_stat) __P((void *state, struct compstat *stats));
-
- /* Allocate space for a decompressor (receive side) */
- void *(*decomp_alloc) __P((u_char *options, int opt_len));
- /* Free space used by a decompressor */
- void (*decomp_free) __P((void *state));
- /* Initialize a decompressor */
- int (*decomp_init) __P((void *state, u_char *options, int opt_len,
- int unit, int hdrlen, int mru, int debug));
- /* Reset a decompressor */
- void (*decomp_reset) __P((void *state));
- /* Decompress a packet. */
- int (*decompress) __P((void *state, PACKETPTR mp,
- PACKETPTR *dmpp));
- /* Update state for an incompressible packet received */
- void (*incomp) __P((void *state, PACKETPTR mp));
- /* Return decompression statistics */
- void (*decomp_stat) __P((void *state, struct compstat *stats));
-};
-#endif /* PACKETPTR */
-
-/*
- * Return values for decompress routine.
- * We need to make these distinctions so that we can disable certain
- * useful functionality, namely sending a CCP reset-request as a result
- * of an error detected after decompression. This is to avoid infringing
- * a patent held by Motorola.
- * Don't you just lurve software patents.
- */
-#define DECOMP_OK 0 /* everything went OK */
-#define DECOMP_ERROR 1 /* error detected before decomp. */
-#define DECOMP_FATALERROR 2 /* error detected after decomp. */
-
-/*
- * CCP codes.
- */
-#define CCP_CONFREQ 1
-#define CCP_CONFACK 2
-#define CCP_TERMREQ 5
-#define CCP_TERMACK 6
-#define CCP_RESETREQ 14
-#define CCP_RESETACK 15
-
-/*
- * Max # bytes for a CCP option
- */
-#define CCP_MAX_OPTION_LENGTH 32
-
-/*
- * Parts of a CCP packet.
- */
-#define CCP_CODE(dp) ((dp)[0])
-#define CCP_ID(dp) ((dp)[1])
-#define CCP_LENGTH(dp) (((dp)[2] << 8) + (dp)[3])
-#define CCP_HDRLEN 4
-
-#define CCP_OPT_CODE(dp) ((dp)[0])
-#define CCP_OPT_LENGTH(dp) ((dp)[1])
-#define CCP_OPT_MINLEN 2
-
-/*
- * Definitions for BSD-Compress.
- */
-#define CI_BSD_COMPRESS 21 /* config. option for BSD-Compress */
-#define CILEN_BSD_COMPRESS 3 /* length of config. option */
-
-/* Macros for handling the 3rd byte of the BSD-Compress config option. */
-#define BSD_NBITS(x) ((x) & 0x1F) /* number of bits requested */
-#define BSD_VERSION(x) ((x) >> 5) /* version of option format */
-#define BSD_CURRENT_VERSION 1 /* current version number */
-#define BSD_MAKE_OPT(v, n) (((v) << 5) | (n))
-
-#define BSD_MIN_BITS 9 /* smallest code size supported */
-#define BSD_MAX_BITS 15 /* largest code size supported */
-
-/*
- * Definitions for Deflate.
- */
-#define CI_DEFLATE 26 /* config option for Deflate */
-#define CI_DEFLATE_DRAFT 24 /* value used in original draft RFC */
-#define CILEN_DEFLATE 4 /* length of its config option */
-
-#define DEFLATE_MIN_SIZE 8
-#define DEFLATE_MAX_SIZE 15
-#define DEFLATE_METHOD_VAL 8
-#define DEFLATE_SIZE(x) (((x) >> 4) + DEFLATE_MIN_SIZE)
-#define DEFLATE_METHOD(x) ((x) & 0x0F)
-#define DEFLATE_MAKE_OPT(w) ((((w) - DEFLATE_MIN_SIZE) << 4) \
- + DEFLATE_METHOD_VAL)
-#define DEFLATE_CHK_SEQUENCE 0
-
-/*
- * Definitions for other, as yet unsupported, compression methods.
- */
-#define CI_PREDICTOR_1 1 /* config option for Predictor-1 */
-#define CILEN_PREDICTOR_1 2 /* length of its config option */
-#define CI_PREDICTOR_2 2 /* config option for Predictor-2 */
-#define CILEN_PREDICTOR_2 2 /* length of its config option */
-
-#endif /* _NET_PPP_COMP_H */
diff --git a/cpukit/libnetworking/net/ppp_defs.h b/cpukit/libnetworking/net/ppp_defs.h
deleted file mode 100644
index 89c62af6cb..0000000000
--- a/cpukit/libnetworking/net/ppp_defs.h
+++ /dev/null
@@ -1,183 +0,0 @@
-/* $Id$ */
-
-/*
- * ppp_defs.h - PPP definitions.
- *
- * Copyright (c) 1994 The Australian National University.
- * All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation is hereby granted, provided that the above copyright
- * notice appears in all copies. This software is provided without any
- * warranty, express or implied. The Australian National University
- * makes no representations about the suitability of this software for
- * any purpose.
- *
- * IN NO EVENT SHALL THE AUSTRALIAN NATIONAL UNIVERSITY BE LIABLE TO ANY
- * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
- * THE AUSTRALIAN NATIONAL UNIVERSITY HAVE BEEN ADVISED OF THE POSSIBILITY
- * OF SUCH DAMAGE.
- *
- * THE AUSTRALIAN NATIONAL UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE AUSTRALIAN NATIONAL UNIVERSITY HAS NO
- * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,
- * OR MODIFICATIONS.
- */
-
-#ifndef _PPP_DEFS_H_
-#define _PPP_DEFS_H_
-
-/*
- * The basic PPP frame.
- */
-#define PPP_HDRLEN 4 /* octets for standard ppp header */
-#define PPP_FCSLEN 2 /* octets for FCS */
-
-/*
- * Packet sizes
- *
- * Note - lcp shouldn't be allowed to negotiate stuff outside these
- * limits. See lcp.h in the pppd directory.
- * (XXX - these constants should simply be shared by lcp.c instead
- * of living in lcp.h)
- */
-#define PPP_MTU 1500 /* Default MTU (size of Info field) */
-#define PPP_MAXMTU 65535 - (PPP_HDRLEN + PPP_FCSLEN)
-#define PPP_MINMTU 64
-#define PPP_MRU 1500 /* default MRU = max length of info field */
-#define PPP_MAXMRU 65000 /* Largest MRU we allow */
-#define PPP_MINMRU 128
-
-#define PPP_ADDRESS(p) (((u_char *)(p))[0])
-#define PPP_CONTROL(p) (((u_char *)(p))[1])
-#define PPP_PROTOCOL(p) ((((u_char *)(p))[2] << 8) + ((u_char *)(p))[3])
-
-/*
- * Significant octet values.
- */
-#define PPP_ALLSTATIONS 0xff /* All-Stations broadcast address */
-#define PPP_UI 0x03 /* Unnumbered Information */
-#define PPP_FLAG 0x7e /* Flag Sequence */
-#define PPP_ESCAPE 0x7d /* Asynchronous Control Escape */
-#define PPP_TRANS 0x20 /* Asynchronous transparency modifier */
-
-/*
- * Protocol field values.
- */
-#define PPP_IP 0x21 /* Internet Protocol */
-#define PPP_AT 0x29 /* AppleTalk Protocol */
-#define PPP_IPX 0x2b /* IPX protocol */
-#define PPP_VJC_COMP 0x2d /* VJ compressed TCP */
-#define PPP_VJC_UNCOMP 0x2f /* VJ uncompressed TCP */
-#define PPP_IPV6 0x57 /* Internet Protocol Version 6 */
-#define PPP_COMP 0xfd /* compressed packet */
-#define PPP_IPCP 0x8021 /* IP Control Protocol */
-#define PPP_ATCP 0x8029 /* AppleTalk Control Protocol */
-#define PPP_IPXCP 0x802b /* IPX Control Protocol */
-#define PPP_CCP 0x80fd /* Compression Control Protocol */
-#define PPP_LCP 0xc021 /* Link Control Protocol */
-#define PPP_PAP 0xc023 /* Password Authentication Protocol */
-#define PPP_LQR 0xc025 /* Link Quality Report protocol */
-#define PPP_CHAP 0xc223 /* Cryptographic Handshake Auth. Protocol */
-#define PPP_CBCP 0xc029 /* Callback Control Protocol */
-
-/*
- * Values for FCS calculations.
- */
-#define PPP_INITFCS 0xffff /* Initial FCS value */
-#define PPP_GOODFCS 0xf0b8 /* Good final FCS value */
-#define PPP_FCS(fcs, c) (((fcs) >> 8) ^ fcstab[((fcs) ^ (c)) & 0xff])
-
-/*
- * A 32-bit unsigned integral type.
- */
-
-#if !defined(__BIT_TYPES_DEFINED__) && !defined(_BITYPES) \
- && !defined(__FreeBSD__) && (NS_TARGET < 40) && !defined(__rtems__)
-#ifdef UINT32_T
-typedef UINT32_T u_int32_t;
-#else
-typedef unsigned int u_int32_t;
-typedef unsigned short u_int16_t;
-#endif
-#endif
-
-/*
- * Extended asyncmap - allows any character to be escaped.
- */
-typedef u_int32_t ext_accm[8];
-
-/*
- * What to do with network protocol (NP) packets.
- */
-enum NPmode {
- NPMODE_PASS, /* pass the packet through */
- NPMODE_DROP, /* silently drop the packet */
- NPMODE_ERROR, /* return an error */
- NPMODE_QUEUE /* save it up for later. */
-};
-
-/*
- * Statistics.
- */
-struct pppstat {
- unsigned int ppp_ibytes; /* bytes received */
- unsigned int ppp_ipackets; /* packets received */
- unsigned int ppp_ierrors; /* receive errors */
- unsigned int ppp_obytes; /* bytes sent */
- unsigned int ppp_opackets; /* packets sent */
- unsigned int ppp_oerrors; /* transmit errors */
-};
-
-struct vjstat {
- unsigned int vjs_packets; /* outbound packets */
- unsigned int vjs_compressed; /* outbound compressed packets */
- unsigned int vjs_searches; /* searches for connection state */
- unsigned int vjs_misses; /* times couldn't find conn. state */
- unsigned int vjs_uncompressedin; /* inbound uncompressed packets */
- unsigned int vjs_compressedin; /* inbound compressed packets */
- unsigned int vjs_errorin; /* inbound unknown type packets */
- unsigned int vjs_tossed; /* inbound packets tossed because of error */
-};
-
-struct ppp_stats {
- struct pppstat p; /* basic PPP statistics */
- struct vjstat vj; /* VJ header compression statistics */
-};
-
-struct compstat {
- unsigned int unc_bytes; /* total uncompressed bytes */
- unsigned int unc_packets; /* total uncompressed packets */
- unsigned int comp_bytes; /* compressed bytes */
- unsigned int comp_packets; /* compressed packets */
- unsigned int inc_bytes; /* incompressible bytes */
- unsigned int inc_packets; /* incompressible packets */
- unsigned int ratio; /* recent compression ratio << 8 */
-};
-
-struct ppp_comp_stats {
- struct compstat c; /* packet compression statistics */
- struct compstat d; /* packet decompression statistics */
-};
-
-/*
- * The following structure records the time in seconds since
- * the last NP packet was sent or received.
- */
-struct ppp_idle {
- time_t xmit_idle; /* time since last NP packet sent */
- time_t recv_idle; /* time since last NP packet received */
-};
-
-#ifndef __P
-#ifdef __STDC__
-#define __P(x) x
-#else
-#define __P(x) ()
-#endif
-#endif
-
-#endif /* _PPP_DEFS_H_ */
diff --git a/cpukit/libnetworking/net/radix.c b/cpukit/libnetworking/net/radix.c
deleted file mode 100644
index bc1b7ee1d1..0000000000
--- a/cpukit/libnetworking/net/radix.c
+++ /dev/null
@@ -1,1028 +0,0 @@
-/*
- * Copyright (c) 1988, 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)radix.c 8.4 (Berkeley) 11/2/94
- * $Id$
- */
-
-/*
- * Routines to build and maintain radix trees for routing lookups.
- */
-#ifndef _RADIX_H_
-#include <sys/param.h>
-#ifdef KERNEL
-#include <sys/systm.h>
-#include <sys/malloc.h>
-#define M_DONTWAIT M_NOWAIT
-#include <sys/domain.h>
-#else
-#include <stdlib.h>
-#endif
-#include <sys/syslog.h>
-#include <net/radix.h>
-#endif
-
-static struct radix_node *
- rn_lookup __P((void *v_arg, void *m_arg,
- struct radix_node_head *head));
-static int rn_walktree_from __P((struct radix_node_head *h, void *a,
- void *m, walktree_f_t *f, void *w));
-static int rn_walktree __P((struct radix_node_head *, walktree_f_t *, void *));
-static struct radix_node
- *rn_delete __P((void *, void *, struct radix_node_head *)),
- *rn_insert __P((void *, struct radix_node_head *, int *,
- struct radix_node [2])),
- *rn_newpair __P((void *, int, struct radix_node[2])),
- *rn_search __P((void *, struct radix_node *)),
- *rn_search_m __P((void *, struct radix_node *, void *));
-
-static int max_keylen;
-static struct radix_mask *rn_mkfreelist;
-static struct radix_node_head *mask_rnhead;
-static char *addmask_key;
-static char normal_chars[] = {0, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, -1};
-static char *rn_zeros, *rn_ones;
-
-#define rn_masktop (mask_rnhead->rnh_treetop)
-#undef Bcmp
-#define Bcmp(a, b, l) (l == 0 ? 0 : bcmp((caddr_t)(a), (caddr_t)(b), (u_long)l))
-
-static int rn_lexobetter __P((void *m_arg, void *n_arg));
-static struct radix_mask *
- rn_new_radix_mask __P((struct radix_node *tt,
- struct radix_mask *next));
-static int rn_satsifies_leaf __P((char *trial, struct radix_node *leaf,
- int skip));
-
-/*
- * The data structure for the keys is a radix tree with one way
- * branching removed. The index rn_b at an internal node n represents a bit
- * position to be tested. The tree is arranged so that all descendants
- * of a node n have keys whose bits all agree up to position rn_b - 1.
- * (We say the index of n is rn_b.)
- *
- * There is at least one descendant which has a one bit at position rn_b,
- * and at least one with a zero there.
- *
- * A route is determined by a pair of key and mask. We require that the
- * bit-wise logical and of the key and mask to be the key.
- * We define the index of a route to associated with the mask to be
- * the first bit number in the mask where 0 occurs (with bit number 0
- * representing the highest order bit).
- *
- * We say a mask is normal if every bit is 0, past the index of the mask.
- * If a node n has a descendant (k, m) with index(m) == index(n) == rn_b,
- * and m is a normal mask, then the route applies to every descendant of n.
- * If the index(m) < rn_b, this implies the trailing last few bits of k
- * before bit b are all 0, (and hence consequently true of every descendant
- * of n), so the route applies to all descendants of the node as well.
- *
- * Similar logic shows that a non-normal mask m such that
- * index(m) <= index(n) could potentially apply to many children of n.
- * Thus, for each non-host route, we attach its mask to a list at an internal
- * node as high in the tree as we can go.
- *
- * The present version of the code makes use of normal routes in short-
- * circuiting an explict mask and compare operation when testing whether
- * a key satisfies a normal route, and also in remembering the unique leaf
- * that governs a subtree.
- */
-
-static struct radix_node *
-rn_search(v_arg, head)
- void *v_arg;
- struct radix_node *head;
-{
- register struct radix_node *x;
- register caddr_t v;
-
- for (x = head, v = v_arg; x->rn_b >= 0;) {
- if (x->rn_bmask & v[x->rn_off])
- x = x->rn_r;
- else
- x = x->rn_l;
- }
- return (x);
-};
-
-static struct radix_node *
-rn_search_m(v_arg, head, m_arg)
- struct radix_node *head;
- void *v_arg, *m_arg;
-{
- register struct radix_node *x;
- register caddr_t v = v_arg, m = m_arg;
-
- for (x = head; x->rn_b >= 0;) {
- if ((x->rn_bmask & m[x->rn_off]) &&
- (x->rn_bmask & v[x->rn_off]))
- x = x->rn_r;
- else
- x = x->rn_l;
- }
- return x;
-};
-
-int
-rn_refines(m_arg, n_arg)
- void *m_arg, *n_arg;
-{
- register caddr_t m = m_arg, n = n_arg;
- register caddr_t lim, lim2 = lim = n + *(u_char *)n;
- int longer = (*(u_char *)n++) - (int)(*(u_char *)m++);
- int masks_are_equal = 1;
-
- if (longer > 0)
- lim -= longer;
- while (n < lim) {
- if (*n & ~(*m))
- return 0;
- if (*n++ != *m++)
- masks_are_equal = 0;
- }
- while (n < lim2)
- if (*n++)
- return 0;
- if (masks_are_equal && (longer < 0))
- for (lim2 = m - longer; m < lim2; )
- if (*m++)
- return 1;
- return (!masks_are_equal);
-}
-
-struct radix_node *
-rn_lookup(v_arg, m_arg, head)
- void *v_arg, *m_arg;
- struct radix_node_head *head;
-{
- register struct radix_node *x;
- caddr_t netmask = 0;
-
- if (m_arg) {
- if ((x = rn_addmask(m_arg, 1, head->rnh_treetop->rn_off)) == 0)
- return (0);
- netmask = x->rn_key;
- }
- x = rn_match(v_arg, head);
- if (x && netmask) {
- while (x && x->rn_mask != netmask)
- x = x->rn_dupedkey;
- }
- return x;
-}
-
-static int
-rn_satsifies_leaf(trial, leaf, skip)
- char *trial;
- register struct radix_node *leaf;
- int skip;
-{
- register char *cp = trial, *cp2 = leaf->rn_key, *cp3 = leaf->rn_mask;
- char *cplim;
- int length = min(*(u_char *)cp, *(u_char *)cp2);
-
- if (cp3 == 0)
- cp3 = rn_ones;
- else
- length = min(length, *(u_char *)cp3);
- cplim = cp + length; cp3 += skip; cp2 += skip;
- for (cp += skip; cp < cplim; cp++, cp2++, cp3++)
- if ((*cp ^ *cp2) & *cp3)
- return 0;
- return 1;
-}
-
-struct radix_node *
-rn_match(v_arg, head)
- void *v_arg;
- struct radix_node_head *head;
-{
- caddr_t v = v_arg;
- register struct radix_node *t = head->rnh_treetop, *x;
- register caddr_t cp = v, cp2;
- caddr_t cplim;
- struct radix_node *saved_t, *top = t;
- int off = t->rn_off, vlen = *(u_char *)cp, matched_off;
- register int test, b, rn_b;
-
- /*
- * Open code rn_search(v, top) to avoid overhead of extra
- * subroutine call.
- */
- for (; t->rn_b >= 0; ) {
- if (t->rn_bmask & cp[t->rn_off])
- t = t->rn_r;
- else
- t = t->rn_l;
- }
- /*
- * See if we match exactly as a host destination
- * or at least learn how many bits match, for normal mask finesse.
- *
- * It doesn't hurt us to limit how many bytes to check
- * to the length of the mask, since if it matches we had a genuine
- * match and the leaf we have is the most specific one anyway;
- * if it didn't match with a shorter length it would fail
- * with a long one. This wins big for class B&C netmasks which
- * are probably the most common case...
- */
- if (t->rn_mask)
- vlen = *(u_char *)t->rn_mask;
- cp += off; cp2 = t->rn_key + off; cplim = v + vlen;
- for (; cp < cplim; cp++, cp2++)
- if (*cp != *cp2)
- goto on1;
- /*
- * This extra grot is in case we are explicitly asked
- * to look up the default. Ugh!
- */
- if ((t->rn_flags & RNF_ROOT) && t->rn_dupedkey)
- t = t->rn_dupedkey;
- return t;
-on1:
- test = (*cp ^ *cp2) & 0xff; /* find first bit that differs */
- for (b = 7; (test >>= 1) > 0;)
- b--;
- matched_off = cp - v;
- b += matched_off << 3;
- rn_b = -1 - b;
- /*
- * If there is a host route in a duped-key chain, it will be first.
- */
- if ((saved_t = t)->rn_mask == 0)
- t = t->rn_dupedkey;
- for (; t; t = t->rn_dupedkey)
- /*
- * Even if we don't match exactly as a host,
- * we may match if the leaf we wound up at is
- * a route to a net.
- */
- if (t->rn_flags & RNF_NORMAL) {
- if (rn_b <= t->rn_b)
- return t;
- } else if (rn_satsifies_leaf(v, t, matched_off))
- return t;
- t = saved_t;
- /* start searching up the tree */
- do {
- register struct radix_mask *m;
- t = t->rn_p;
- m = t->rn_mklist;
- if (m) {
- /*
- * If non-contiguous masks ever become important
- * we can restore the masking and open coding of
- * the search and satisfaction test and put the
- * calculation of "off" back before the "do".
- */
- do {
- if (m->rm_flags & RNF_NORMAL) {
- if (rn_b <= m->rm_b)
- return (m->rm_leaf);
- } else {
- off = min(t->rn_off, matched_off);
- x = rn_search_m(v, t, m->rm_mask);
- while (x && x->rn_mask != m->rm_mask)
- x = x->rn_dupedkey;
- if (x && rn_satsifies_leaf(v, x, off))
- return x;
- }
- m = m->rm_mklist;
- } while (m);
- }
- } while (t != top);
- return 0;
-};
-
-#ifdef RN_DEBUG
-int rn_nodenum;
-struct radix_node *rn_clist;
-int rn_saveinfo;
-int rn_debug = 1;
-#endif
-
-static struct radix_node *
-rn_newpair(v, b, nodes)
- void *v;
- int b;
- struct radix_node nodes[2];
-{
- register struct radix_node *tt = nodes, *t = tt + 1;
- t->rn_b = b; t->rn_bmask = 0x80 >> (b & 7);
- t->rn_l = tt; t->rn_off = b >> 3;
- tt->rn_b = -1; tt->rn_key = (caddr_t)v; tt->rn_p = t;
- tt->rn_flags = t->rn_flags = RNF_ACTIVE;
-#ifdef RN_DEBUG
- tt->rn_info = rn_nodenum++; t->rn_info = rn_nodenum++;
- tt->rn_twin = t; tt->rn_ybro = rn_clist; rn_clist = tt;
-#endif
- return t;
-}
-
-static struct radix_node *
-rn_insert(v_arg, head, dupentry, nodes)
- void *v_arg;
- struct radix_node_head *head;
- int *dupentry;
- struct radix_node nodes[2];
-{
- caddr_t v = v_arg;
- struct radix_node *top = head->rnh_treetop;
- int head_off = top->rn_off, vlen = (int)*((u_char *)v);
- register struct radix_node *t = rn_search(v_arg, top);
- register caddr_t cp = v + head_off;
- register int b;
- struct radix_node *tt;
- /*
- * Find first bit at which v and t->rn_key differ
- */
- {
- register caddr_t cp2 = t->rn_key + head_off;
- register int cmp_res;
- caddr_t cplim = v + vlen;
-
- while (cp < cplim)
- if (*cp2++ != *cp++)
- goto on1;
- *dupentry = 1;
- return t;
-on1:
- *dupentry = 0;
- cmp_res = (cp[-1] ^ cp2[-1]) & 0xff;
- for (b = (cp - v) << 3; cmp_res; b--)
- cmp_res >>= 1;
- }
- {
- register struct radix_node *p, *x = top;
- cp = v;
- do {
- p = x;
- if (cp[x->rn_off] & x->rn_bmask)
- x = x->rn_r;
- else x = x->rn_l;
- } while (b > (unsigned) x->rn_b); /* x->rn_b < b && x->rn_b >= 0 */
-#ifdef RN_DEBUG
- if (rn_debug)
- log(LOG_DEBUG, "rn_insert: Going In:\n"), traverse(p);
-#endif
- t = rn_newpair(v_arg, b, nodes); tt = t->rn_l;
- if ((cp[p->rn_off] & p->rn_bmask) == 0)
- p->rn_l = t;
- else
- p->rn_r = t;
- x->rn_p = t; t->rn_p = p; /* frees x, p as temp vars below */
- if ((cp[t->rn_off] & t->rn_bmask) == 0) {
- t->rn_r = x;
- } else {
- t->rn_r = tt; t->rn_l = x;
- }
-#ifdef RN_DEBUG
- if (rn_debug)
- log(LOG_DEBUG, "rn_insert: Coming Out:\n"), traverse(p);
-#endif
- }
- return (tt);
-}
-
-struct radix_node *
-rn_addmask(n_arg, search, skip)
- int search, skip;
- void *n_arg;
-{
- caddr_t netmask = (caddr_t)n_arg;
- register struct radix_node *x;
- register caddr_t cp, cplim;
- register int b = 0, mlen, j;
- int maskduplicated, m0, isnormal;
- struct radix_node *saved_x;
- static int last_zeroed = 0;
-
- if ((mlen = *(u_char *)netmask) > max_keylen)
- mlen = max_keylen;
- if (skip == 0)
- skip = 1;
- if (mlen <= skip)
- return (mask_rnhead->rnh_nodes);
- if (skip > 1)
- Bcopy(rn_ones + 1, addmask_key + 1, skip - 1);
- if ((m0 = mlen) > skip)
- Bcopy(netmask + skip, addmask_key + skip, mlen - skip);
- /*
- * Trim trailing zeroes.
- */
- for (cp = addmask_key + mlen; (cp > addmask_key) && cp[-1] == 0;)
- cp--;
- mlen = cp - addmask_key;
- if (mlen <= skip) {
- if (m0 >= last_zeroed)
- last_zeroed = mlen;
- return (mask_rnhead->rnh_nodes);
- }
- if (m0 < last_zeroed)
- Bzero(addmask_key + m0, last_zeroed - m0);
- *addmask_key = last_zeroed = mlen;
- x = rn_search(addmask_key, rn_masktop);
- if (Bcmp(addmask_key, x->rn_key, mlen) != 0)
- x = 0;
- if (x || search)
- return (x);
- R_Malloc(x, struct radix_node *, max_keylen + 2 * sizeof (*x));
- if ((saved_x = x) == 0)
- return (0);
- Bzero(x, max_keylen + 2 * sizeof (*x));
- netmask = cp = (caddr_t)(x + 2);
- Bcopy(addmask_key, cp, mlen);
- x = rn_insert(cp, mask_rnhead, &maskduplicated, x);
- if (maskduplicated) {
- log(LOG_ERR, "rn_addmask: mask impossibly already in tree");
- Free(saved_x);
- return (x);
- }
- /*
- * Calculate index of mask, and check for normalcy.
- */
- cplim = netmask + mlen; isnormal = 1;
- for (cp = netmask + skip; (cp < cplim) && *(u_char *)cp == 0xff;)
- cp++;
- if (cp != cplim) {
- for (j = 0x80; (j & *cp) != 0; j >>= 1)
- b++;
- if (*cp != normal_chars[b] || cp != (cplim - 1))
- isnormal = 0;
- }
- b += (cp - netmask) << 3;
- x->rn_b = -1 - b;
- if (isnormal)
- x->rn_flags |= RNF_NORMAL;
- return (x);
-}
-
-static int /* XXX: arbitrary ordering for non-contiguous masks */
-rn_lexobetter(m_arg, n_arg)
- void *m_arg, *n_arg;
-{
- register u_char *mp = m_arg, *np = n_arg, *lim;
-
- if (*mp > *np)
- return 1; /* not really, but need to check longer one first */
- if (*mp == *np)
- for (lim = mp + *mp; mp < lim;)
- if (*mp++ > *np++)
- return 1;
- return 0;
-}
-
-static struct radix_mask *
-rn_new_radix_mask(tt, next)
- register struct radix_node *tt;
- register struct radix_mask *next;
-{
- register struct radix_mask *m;
-
- MKGet(m);
- if (m == 0) {
- log(LOG_ERR, "Mask for route not entered\n");
- return (0);
- }
- Bzero(m, sizeof *m);
- m->rm_b = tt->rn_b;
- m->rm_flags = tt->rn_flags;
- if (tt->rn_flags & RNF_NORMAL)
- m->rm_leaf = tt;
- else
- m->rm_mask = tt->rn_mask;
- m->rm_mklist = next;
- tt->rn_mklist = m;
- return m;
-}
-
-struct radix_node *
-rn_addroute(v_arg, n_arg, head, treenodes)
- void *v_arg, *n_arg;
- struct radix_node_head *head;
- struct radix_node treenodes[2];
-{
- caddr_t v = (caddr_t)v_arg, netmask = (caddr_t)n_arg;
- register struct radix_node *t, *x = 0, *tt;
- struct radix_node *saved_tt, *top = head->rnh_treetop;
- short b = 0, b_leaf = 0;
- int keyduplicated;
- caddr_t mmask;
- struct radix_mask *m, **mp;
-
- /*
- * In dealing with non-contiguous masks, there may be
- * many different routes which have the same mask.
- * We will find it useful to have a unique pointer to
- * the mask to speed avoiding duplicate references at
- * nodes and possibly save time in calculating indices.
- */
- if (netmask) {
- if ((x = rn_addmask(netmask, 0, top->rn_off)) == 0)
- return (0);
- b_leaf = x->rn_b;
- b = -1 - x->rn_b;
- netmask = x->rn_key;
- }
- /*
- * Deal with duplicated keys: attach node to previous instance
- */
- saved_tt = tt = rn_insert(v, head, &keyduplicated, treenodes);
- if (keyduplicated) {
- for (t = tt; tt; t = tt, tt = tt->rn_dupedkey) {
- if (tt->rn_mask == netmask)
- return (0);
- if (netmask == 0 ||
- (tt->rn_mask &&
- ((b_leaf < tt->rn_b) || /* index(netmask) > node */
- rn_refines(netmask, tt->rn_mask) ||
- rn_lexobetter(netmask, tt->rn_mask))))
- break;
- }
- /*
- * If the mask is not duplicated, we wouldn't
- * find it among possible duplicate key entries
- * anyway, so the above test doesn't hurt.
- *
- * We sort the masks for a duplicated key the same way as
- * in a masklist -- most specific to least specific.
- * This may require the unfortunate nuisance of relocating
- * the head of the list.
- */
- if (tt == saved_tt) {
- struct radix_node *xx = x;
- /* link in at head of list */
- (tt = treenodes)->rn_dupedkey = t;
- tt->rn_flags = t->rn_flags;
- tt->rn_p = x = t->rn_p;
- t->rn_p = tt; /* parent */
- if (x->rn_l == t) x->rn_l = tt; else x->rn_r = tt;
- saved_tt = tt; x = xx;
- } else {
- (tt = treenodes)->rn_dupedkey = t->rn_dupedkey;
- t->rn_dupedkey = tt;
- tt->rn_p = t; /* parent */
- if (tt->rn_dupedkey) /* parent */
- tt->rn_dupedkey->rn_p = tt; /* parent */
- }
-#ifdef RN_DEBUG
- t=tt+1; tt->rn_info = rn_nodenum++; t->rn_info = rn_nodenum++;
- tt->rn_twin = t; tt->rn_ybro = rn_clist; rn_clist = tt;
-#endif
- tt->rn_key = (caddr_t) v;
- tt->rn_b = -1;
- tt->rn_flags = RNF_ACTIVE;
- }
- /*
- * Put mask in tree.
- */
- if (netmask) {
- tt->rn_mask = netmask;
- tt->rn_b = x->rn_b;
- tt->rn_flags |= x->rn_flags & RNF_NORMAL;
- }
- t = saved_tt->rn_p;
- if (keyduplicated)
- goto on2;
- b_leaf = -1 - t->rn_b;
- if (t->rn_r == saved_tt) x = t->rn_l; else x = t->rn_r;
- /* Promote general routes from below */
- if (x->rn_b < 0) {
- for (mp = &t->rn_mklist; x; x = x->rn_dupedkey)
- if (x->rn_mask && (x->rn_b >= b_leaf) && x->rn_mklist == 0) {
- *mp = m = rn_new_radix_mask(x, 0);
- if (m)
- mp = &m->rm_mklist;
- }
- } else if (x->rn_mklist) {
- /*
- * Skip over masks whose index is > that of new node
- */
- for (mp = &x->rn_mklist; (m = *mp); mp = &m->rm_mklist)
- if (m->rm_b >= b_leaf)
- break;
- t->rn_mklist = m; *mp = 0;
- }
-on2:
- /* Add new route to highest possible ancestor's list */
- if ((netmask == 0) || (b > t->rn_b ))
- return tt; /* can't lift at all */
- b_leaf = tt->rn_b;
- do {
- x = t;
- t = t->rn_p;
- } while (b <= t->rn_b && x != top);
- /*
- * Search through routes associated with node to
- * insert new route according to index.
- * Need same criteria as when sorting dupedkeys to avoid
- * double loop on deletion.
- */
- for (mp = &x->rn_mklist; (m = *mp); mp = &m->rm_mklist) {
- if (m->rm_b < b_leaf)
- continue;
- if (m->rm_b > b_leaf)
- break;
- if (m->rm_flags & RNF_NORMAL) {
- mmask = m->rm_leaf->rn_mask;
- if (tt->rn_flags & RNF_NORMAL) {
- log(LOG_ERR,
- "Non-unique normal route, mask not entered");
- return tt;
- }
- } else
- mmask = m->rm_mask;
- if (mmask == netmask) {
- m->rm_refs++;
- tt->rn_mklist = m;
- return tt;
- }
- if (rn_refines(netmask, mmask) || rn_lexobetter(netmask, mmask))
- break;
- }
- *mp = rn_new_radix_mask(tt, *mp);
- return tt;
-}
-
-static struct radix_node *
-rn_delete(v_arg, netmask_arg, head)
- void *v_arg, *netmask_arg;
- struct radix_node_head *head;
-{
- register struct radix_node *t, *p, *x, *tt;
- struct radix_mask *m, *saved_m, **mp;
- struct radix_node *dupedkey, *saved_tt, *top;
- caddr_t v, netmask;
- int b, head_off, vlen;
-
- v = v_arg;
- netmask = netmask_arg;
- x = head->rnh_treetop;
- tt = rn_search(v, x);
- head_off = x->rn_off;
- vlen = *(u_char *)v;
- saved_tt = tt;
- top = x;
- if (tt == 0 ||
- Bcmp(v + head_off, tt->rn_key + head_off, vlen - head_off))
- return (0);
- /*
- * Delete our route from mask lists.
- */
- if (netmask) {
- if ((x = rn_addmask(netmask, 1, head_off)) == 0)
- return (0);
- netmask = x->rn_key;
- while (tt->rn_mask != netmask)
- if ((tt = tt->rn_dupedkey) == 0)
- return (0);
- }
- if (tt->rn_mask == 0 || (saved_m = m = tt->rn_mklist) == 0)
- goto on1;
- if (tt->rn_flags & RNF_NORMAL) {
- if (m->rm_leaf != tt || m->rm_refs > 0) {
- log(LOG_ERR, "rn_delete: inconsistent annotation\n");
- return 0; /* dangling ref could cause disaster */
- }
- } else {
- if (m->rm_mask != tt->rn_mask) {
- log(LOG_ERR, "rn_delete: inconsistent annotation\n");
- goto on1;
- }
- if (--m->rm_refs >= 0)
- goto on1;
- }
- b = -1 - tt->rn_b;
- t = saved_tt->rn_p;
- if (b > t->rn_b)
- goto on1; /* Wasn't lifted at all */
- do {
- x = t;
- t = t->rn_p;
- } while (b <= t->rn_b && x != top);
- for (mp = &x->rn_mklist; (m = *mp); mp = &m->rm_mklist)
- if (m == saved_m) {
- *mp = m->rm_mklist;
- MKFree(m);
- break;
- }
- if (m == 0) {
- log(LOG_ERR, "rn_delete: couldn't find our annotation\n");
- if (tt->rn_flags & RNF_NORMAL)
- return (0); /* Dangling ref to us */
- }
-on1:
- /*
- * Eliminate us from tree
- */
- if (tt->rn_flags & RNF_ROOT)
- return (0);
-#ifdef RN_DEBUG
- /* Get us out of the creation list */
- for (t = rn_clist; t && t->rn_ybro != tt; t = t->rn_ybro) {}
- if (t) t->rn_ybro = tt->rn_ybro;
-#endif
- t = tt->rn_p;
- dupedkey = saved_tt->rn_dupedkey;
- if (dupedkey) {
- /*
- * at this point, tt is the deletion target and saved_tt
- * is the head of the dupekey chain
- */
- if (tt == saved_tt) {
- /* remove from head of chain */
- x = dupedkey; x->rn_p = t;
- if (t->rn_l == tt) t->rn_l = x; else t->rn_r = x;
- } else {
- /* find node in front of tt on the chain */
- for (x = p = saved_tt; p && p->rn_dupedkey != tt;)
- p = p->rn_dupedkey;
- if (p) {
- p->rn_dupedkey = tt->rn_dupedkey;
- if (tt->rn_dupedkey) /* parent */
- tt->rn_dupedkey->rn_p = p; /* parent */
- } else log(LOG_ERR, "rn_delete: couldn't find us\n");
- }
- t = tt + 1;
- if (t->rn_flags & RNF_ACTIVE) {
-#ifndef RN_DEBUG
- *++x = *t; p = t->rn_p;
-#else
- b = t->rn_info; *++x = *t; t->rn_info = b; p = t->rn_p;
-#endif
- if (p->rn_l == t) p->rn_l = x; else p->rn_r = x;
- x->rn_l->rn_p = x; x->rn_r->rn_p = x;
- }
- goto out;
- }
- if (t->rn_l == tt) x = t->rn_r; else x = t->rn_l;
- p = t->rn_p;
- if (p->rn_r == t) p->rn_r = x; else p->rn_l = x;
- x->rn_p = p;
- /*
- * Demote routes attached to us.
- */
- if (t->rn_mklist) {
- if (x->rn_b >= 0) {
- for (mp = &x->rn_mklist; (m = *mp);)
- mp = &m->rm_mklist;
- *mp = t->rn_mklist;
- } else {
- /* If there are any key,mask pairs in a sibling
- duped-key chain, some subset will appear sorted
- in the same order attached to our mklist */
- for (m = t->rn_mklist; m && x; x = x->rn_dupedkey)
- if (m == x->rn_mklist) {
- struct radix_mask *mm = m->rm_mklist;
- x->rn_mklist = 0;
- if (--(m->rm_refs) < 0)
- MKFree(m);
- m = mm;
- }
- if (m)
- log(LOG_ERR, "%s %p at %x\n",
- "rn_delete: Orphaned Mask", m, x);
- }
- }
- /*
- * We may be holding an active internal node in the tree.
- */
- x = tt + 1;
- if (t != x) {
-#ifndef RN_DEBUG
- *t = *x;
-#else
- b = t->rn_info; *t = *x; t->rn_info = b;
-#endif
- t->rn_l->rn_p = t; t->rn_r->rn_p = t;
- p = x->rn_p;
- if (p->rn_l == x) p->rn_l = t; else p->rn_r = t;
- }
-out:
- tt->rn_flags &= ~RNF_ACTIVE;
- tt[1].rn_flags &= ~RNF_ACTIVE;
- return (tt);
-}
-
-/*
- * This is the same as rn_walktree() except for the parameters and the
- * exit.
- */
-static int
-rn_walktree_from(h, a, m, f, w)
- struct radix_node_head *h;
- void *a, *m;
- walktree_f_t *f;
- void *w;
-{
- int error;
- struct radix_node *base, *next;
- u_char *xa = (u_char *)a;
- u_char *xm = (u_char *)m;
- register struct radix_node *rn, *last = 0 /* shut up gcc */;
- int stopping = 0;
- int lastb;
-
- /*
- * rn_search_m is sort-of-open-coded here.
- */
- /* printf("about to search\n"); */
- for (rn = h->rnh_treetop; rn->rn_b >= 0; ) {
- last = rn;
- /* printf("rn_b %d, rn_bmask %x, xm[rn_off] %x\n",
- rn->rn_b, rn->rn_bmask, xm[rn->rn_off]); */
- if (!(rn->rn_bmask & xm[rn->rn_off])) {
- break;
- }
- if (rn->rn_bmask & xa[rn->rn_off]) {
- rn = rn->rn_r;
- } else {
- rn = rn->rn_l;
- }
- }
- /* printf("done searching\n"); */
-
- /*
- * Two cases: either we stepped off the end of our mask,
- * in which case last == rn, or we reached a leaf, in which
- * case we want to start from the last node we looked at.
- * Either way, last is the node we want to start from.
- */
- rn = last;
- lastb = rn->rn_b;
-
- /* printf("rn %p, lastb %d\n", rn, lastb);*/
-
- /*
- * This gets complicated because we may delete the node
- * while applying the function f to it, so we need to calculate
- * the successor node in advance.
- */
- while (rn->rn_b >= 0)
- rn = rn->rn_l;
-
- while (!stopping) {
- /* printf("node %p (%d)\n", rn, rn->rn_b); */
- base = rn;
- /* If at right child go back up, otherwise, go right */
- while (rn->rn_p->rn_r == rn && !(rn->rn_flags & RNF_ROOT)) {
- rn = rn->rn_p;
-
- /* if went up beyond last, stop */
- if (rn->rn_b < lastb) {
- stopping = 1;
- /* printf("up too far\n"); */
- }
- }
-
- /* Find the next *leaf* since next node might vanish, too */
- for (rn = rn->rn_p->rn_r; rn->rn_b >= 0;)
- rn = rn->rn_l;
- next = rn;
- /* Process leaves */
- while ((rn = base) != 0) {
- base = rn->rn_dupedkey;
- /* printf("leaf %p\n", rn); */
- if (!(rn->rn_flags & RNF_ROOT)
- && (error = (*f)(rn, w)))
- return (error);
- }
- rn = next;
-
- if (rn->rn_flags & RNF_ROOT) {
- /* printf("root, stopping"); */
- stopping = 1;
- }
-
- }
- return 0;
-}
-
-static int
-rn_walktree(h, f, w)
- struct radix_node_head *h;
- walktree_f_t *f;
- void *w;
-{
- int error;
- struct radix_node *base, *next;
- register struct radix_node *rn = h->rnh_treetop;
- /*
- * This gets complicated because we may delete the node
- * while applying the function f to it, so we need to calculate
- * the successor node in advance.
- */
- /* First time through node, go left */
- while (rn->rn_b >= 0)
- rn = rn->rn_l;
- for (;;) {
- base = rn;
- /* If at right child go back up, otherwise, go right */
- while (rn->rn_p->rn_r == rn && (rn->rn_flags & RNF_ROOT) == 0)
- rn = rn->rn_p;
- /* Find the next *leaf* since next node might vanish, too */
- for (rn = rn->rn_p->rn_r; rn->rn_b >= 0;)
- rn = rn->rn_l;
- next = rn;
- /* Process leaves */
- while ((rn = base)) {
- base = rn->rn_dupedkey;
- if (!(rn->rn_flags & RNF_ROOT) && (error = (*f)(rn, w)))
- return (error);
- }
- rn = next;
- if (rn->rn_flags & RNF_ROOT)
- return (0);
- }
- /* NOTREACHED */
-}
-
-int
-rn_inithead(head, off)
- void **head;
- int off;
-{
- register struct radix_node_head *rnh;
- register struct radix_node *t, *tt, *ttt;
- if (*head)
- return (1);
- R_Malloc(rnh, struct radix_node_head *, sizeof (*rnh));
- if (rnh == 0)
- return (0);
- Bzero(rnh, sizeof (*rnh));
- *head = rnh;
- t = rn_newpair(rn_zeros, off, rnh->rnh_nodes);
- ttt = rnh->rnh_nodes + 2;
- t->rn_r = ttt;
- t->rn_p = t;
- tt = t->rn_l;
- tt->rn_flags = t->rn_flags = RNF_ROOT | RNF_ACTIVE;
- tt->rn_b = -1 - off;
- *ttt = *tt;
- ttt->rn_key = rn_ones;
- rnh->rnh_addaddr = rn_addroute;
- rnh->rnh_deladdr = rn_delete;
- rnh->rnh_matchaddr = rn_match;
- rnh->rnh_lookup = rn_lookup;
- rnh->rnh_walktree = rn_walktree;
- rnh->rnh_walktree_from = rn_walktree_from;
- rnh->rnh_treetop = t;
- return (1);
-}
-
-void
-rn_init()
-{
- char *cp, *cplim;
-#ifdef KERNEL
- struct domain *dom;
-
- for (dom = domains; dom; dom = dom->dom_next)
- if (dom->dom_maxrtkey > max_keylen)
- max_keylen = dom->dom_maxrtkey;
-#endif
- if (max_keylen == 0) {
- log(LOG_ERR,
- "rn_init: radix functions require max_keylen be set\n");
- return;
- }
- R_Malloc(rn_zeros, char *, 3 * max_keylen);
- if (rn_zeros == NULL)
- panic("rn_init");
- Bzero(rn_zeros, 3 * max_keylen);
- rn_ones = cp = rn_zeros + max_keylen;
- addmask_key = cplim = rn_ones + max_keylen;
- while (cp < cplim)
- *cp++ = -1;
- if (rn_inithead((void **)&mask_rnhead, 0) == 0)
- panic("rn_init 2");
-}
diff --git a/cpukit/libnetworking/net/radix.h b/cpukit/libnetworking/net/radix.h
deleted file mode 100644
index 6ef9aafbac..0000000000
--- a/cpukit/libnetworking/net/radix.h
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * Copyright (c) 1988, 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)radix.h 8.2 (Berkeley) 10/31/94
- * $Id$
- */
-
-#ifndef _RADIX_H_
-#define _RADIX_H_
-
-/*
- * Radix search tree node layout.
- */
-
-struct radix_node {
- struct radix_mask *rn_mklist; /* list of masks contained in subtree */
- struct radix_node *rn_p; /* parent */
- short rn_b; /* bit offset; -1-index(netmask) */
- char rn_bmask; /* node: mask for bit test*/
- u_char rn_flags; /* enumerated next */
-#define RNF_NORMAL 1 /* leaf contains normal route */
-#define RNF_ROOT 2 /* leaf is root leaf for tree */
-#define RNF_ACTIVE 4 /* This node is alive (for rtfree) */
- union {
- struct { /* leaf only data: */
- caddr_t rn_Key; /* object of search */
- caddr_t rn_Mask; /* netmask, if present */
- struct radix_node *rn_Dupedkey;
- } rn_leaf;
- struct { /* node only data: */
- int rn_Off; /* where to start compare */
- struct radix_node *rn_L;/* progeny */
- struct radix_node *rn_R;/* progeny */
- } rn_node;
- } rn_u;
-#ifdef RN_DEBUG
- int rn_info;
- struct radix_node *rn_twin;
- struct radix_node *rn_ybro;
-#endif
-};
-
-#define rn_dupedkey rn_u.rn_leaf.rn_Dupedkey
-#define rn_key rn_u.rn_leaf.rn_Key
-#define rn_mask rn_u.rn_leaf.rn_Mask
-#define rn_off rn_u.rn_node.rn_Off
-#define rn_l rn_u.rn_node.rn_L
-#define rn_r rn_u.rn_node.rn_R
-
-/*
- * Annotations to tree concerning potential routes applying to subtrees.
- */
-
-extern struct radix_mask {
- short rm_b; /* bit offset; -1-index(netmask) */
- char rm_unused; /* cf. rn_bmask */
- u_char rm_flags; /* cf. rn_flags */
- struct radix_mask *rm_mklist; /* more masks to try */
- union {
- caddr_t rmu_mask; /* the mask */
- struct radix_node *rmu_leaf; /* for normal routes */
- } rm_rmu;
- int rm_refs; /* # of references to this struct */
-} *rn_mkfreelist;
-
-#define rm_mask rm_rmu.rmu_mask
-#define rm_leaf rm_rmu.rmu_leaf /* extra field would make 32 bytes */
-
-#define MKGet(m) {\
- if (rn_mkfreelist) {\
- m = rn_mkfreelist; \
- rn_mkfreelist = (m)->rm_mklist; \
- } else \
- R_Malloc(m, struct radix_mask *, sizeof (*(m))); }\
-
-#define MKFree(m) { (m)->rm_mklist = rn_mkfreelist; rn_mkfreelist = (m);}
-
-typedef int walktree_f_t __P((struct radix_node *, void *));
-
-struct radix_node_head {
- struct radix_node *rnh_treetop;
- int rnh_addrsize; /* permit, but not require fixed keys */
- int rnh_pktsize; /* permit, but not require fixed keys */
- struct radix_node *(*rnh_addaddr) /* add based on sockaddr */
- __P((void *v, void *mask,
- struct radix_node_head *head, struct radix_node nodes[]));
- struct radix_node *(*rnh_addpkt) /* add based on packet hdr */
- __P((void *v, void *mask,
- struct radix_node_head *head, struct radix_node nodes[]));
- struct radix_node *(*rnh_deladdr) /* remove based on sockaddr */
- __P((void *v, void *mask, struct radix_node_head *head));
- struct radix_node *(*rnh_delpkt) /* remove based on packet hdr */
- __P((void *v, void *mask, struct radix_node_head *head));
- struct radix_node *(*rnh_matchaddr) /* locate based on sockaddr */
- __P((void *v, struct radix_node_head *head));
- struct radix_node *(*rnh_lookup) /* locate based on sockaddr */
- __P((void *v, void *mask, struct radix_node_head *head));
- struct radix_node *(*rnh_matchpkt) /* locate based on packet hdr */
- __P((void *v, struct radix_node_head *head));
- int (*rnh_walktree) /* traverse tree */
- __P((struct radix_node_head *head, walktree_f_t *f, void *w));
- int (*rnh_walktree_from) /* traverse tree below a */
- __P((struct radix_node_head *head, void *a, void *m,
- walktree_f_t *f, void *w));
- void (*rnh_close) /* do something when the last ref drops */
- __P((struct radix_node *rn, struct radix_node_head *head));
- struct radix_node rnh_nodes[3]; /* empty tree for common case */
-};
-
-#ifndef KERNEL
-#define Bcmp(a, b, n) bcmp(((char *)(a)), ((char *)(b)), (n))
-#define Bcopy(a, b, n) bcopy(((char *)(a)), ((char *)(b)), (unsigned)(n))
-#define Bzero(p, n) bzero((char *)(p), (int)(n));
-#define R_Malloc(p, t, n) (p = (t) malloc((unsigned int)(n)))
-#define Free(p) free((char *)p);
-#else
-#define Bcmp(a, b, n) bcmp(((caddr_t)(a)), ((caddr_t)(b)), (unsigned)(n))
-#define Bcopy(a, b, n) bcopy(((caddr_t)(a)), ((caddr_t)(b)), (unsigned)(n))
-#define Bzero(p, n) bzero((caddr_t)(p), (unsigned)(n));
-#define R_Malloc(p, t, n) (p = (t) malloc((unsigned long)(n), M_RTABLE, M_DONTWAIT))
-#define Free(p) free((caddr_t)p, M_RTABLE);
-#endif /*KERNEL*/
-
-extern struct radix_node_head *mask_rnhead;
-
-void rn_init __P((void));
-int rn_inithead __P((void **, int));
-int rn_refines __P((void *, void *));
-struct radix_node
- *rn_addmask __P((void *, int, int)),
- *rn_addroute __P((void *, void *, struct radix_node_head *,
- struct radix_node [2])),
- *rn_match __P((void *, struct radix_node_head *));
-
-
-#endif /* _RADIX_H_ */
diff --git a/cpukit/libnetworking/net/raw_cb.c b/cpukit/libnetworking/net/raw_cb.c
deleted file mode 100644
index 0676931cdc..0000000000
--- a/cpukit/libnetworking/net/raw_cb.c
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Copyright (c) 1980, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)raw_cb.c 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/systm.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/domain.h>
-#include <sys/protosw.h>
-#include <sys/errno.h>
-
-#include <net/if.h>
-#include <net/route.h>
-#include <net/raw_cb.h>
-#include <netinet/in.h>
-
-/*
- * Routines to manage the raw protocol control blocks.
- *
- * TODO:
- * hash lookups by protocol family/protocol + address family
- * take care of unique address problems per AF?
- * redo address binding to allow wildcards
- */
-
-struct rawcb rawcb;
-static u_long raw_sendspace = RAWSNDQ;
-static u_long raw_recvspace = RAWRCVQ;
-
-/*
- * Allocate a control block and a nominal amount
- * of buffer space for the socket.
- */
-int
-raw_attach(so, proto)
- register struct socket *so;
- int proto;
-{
- register struct rawcb *rp = sotorawcb(so);
- int error;
-
- /*
- * It is assumed that raw_attach is called
- * after space has been allocated for the
- * rawcb.
- */
- if (rp == 0)
- return (ENOBUFS);
- error = soreserve(so, raw_sendspace, raw_recvspace);
- if (error)
- return (error);
- rp->rcb_socket = so;
- rp->rcb_proto.sp_family = so->so_proto->pr_domain->dom_family;
- rp->rcb_proto.sp_protocol = proto;
- insque(rp, &rawcb);
- return (0);
-}
-
-/*
- * Detach the raw connection block and discard
- * socket resources.
- */
-void
-raw_detach(rp)
- register struct rawcb *rp;
-{
- struct socket *so = rp->rcb_socket;
-
- so->so_pcb = 0;
- sofree(so);
- remque(rp);
-#ifdef notdef
- if (rp->rcb_laddr)
- m_freem(dtom(rp->rcb_laddr));
- rp->rcb_laddr = 0;
-#endif
- free((caddr_t)(rp), M_PCB);
-}
-
-/*
- * Disconnect and possibly release resources.
- */
-void
-raw_disconnect(rp)
- struct rawcb *rp;
-{
-
-#ifdef notdef
- if (rp->rcb_faddr)
- m_freem(dtom(rp->rcb_faddr));
- rp->rcb_faddr = 0;
-#endif
- if (rp->rcb_socket->so_state & SS_NOFDREF)
- raw_detach(rp);
-}
-
-#ifdef notdef
-int
-raw_bind(so, nam)
- register struct socket *so;
- struct mbuf *nam;
-{
- struct sockaddr *addr = mtod(nam, struct sockaddr *);
- register struct rawcb *rp;
-
- if (ifnet == 0)
- return (EADDRNOTAVAIL);
- rp = sotorawcb(so);
- nam = m_copym(nam, 0, M_COPYALL, M_WAITOK);
- rp->rcb_laddr = mtod(nam, struct sockaddr *);
- return (0);
-}
-#endif
diff --git a/cpukit/libnetworking/net/raw_cb.h b/cpukit/libnetworking/net/raw_cb.h
deleted file mode 100644
index c1ed5e5e0a..0000000000
--- a/cpukit/libnetworking/net/raw_cb.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 1980, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)raw_cb.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _NET_RAW_CB_H_
-#define _NET_RAW_CB_H_
-
-/*
- * Raw protocol interface control block. Used
- * to tie a socket to the generic raw interface.
- */
-struct rawcb {
- struct rawcb *rcb_next; /* doubly linked list */
- struct rawcb *rcb_prev;
- struct socket *rcb_socket; /* back pointer to socket */
- struct sockaddr *rcb_faddr; /* destination address */
- struct sockaddr *rcb_laddr; /* socket's address */
- struct sockproto rcb_proto; /* protocol family, protocol */
-};
-
-#define sotorawcb(so) ((struct rawcb *)(so)->so_pcb)
-
-/*
- * Nominal space allocated to a raw socket.
- */
-#define RAWSNDQ 8192
-#define RAWRCVQ 8192
-
-#ifdef KERNEL
-extern struct rawcb rawcb; /* head of list */
-
-int raw_attach __P((struct socket *, int));
-void raw_ctlinput __P((int, struct sockaddr *, void *));
-void raw_detach __P((struct rawcb *));
-void raw_disconnect __P((struct rawcb *));
-void raw_init __P((void));
-void raw_input __P((struct mbuf *,
- struct sockproto *, struct sockaddr *, struct sockaddr *));
-int raw_usrreq __P((struct socket *,
- int, struct mbuf *, struct mbuf *, struct mbuf *));
-#endif
-
-#endif
diff --git a/cpukit/libnetworking/net/raw_usrreq.c b/cpukit/libnetworking/net/raw_usrreq.c
deleted file mode 100644
index fb4faf4d6d..0000000000
--- a/cpukit/libnetworking/net/raw_usrreq.c
+++ /dev/null
@@ -1,315 +0,0 @@
-/*
- * Copyright (c) 1980, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)raw_usrreq.c 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/systm.h>
-#include <sys/mbuf.h>
-#include <sys/domain.h>
-#include <sys/protosw.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/errno.h>
-
-#include <net/if.h>
-#include <net/route.h>
-#include <net/netisr.h>
-#include <net/raw_cb.h>
-
-/*
- * Initialize raw connection block q.
- */
-void
-raw_init()
-{
-
- rawcb.rcb_next = rawcb.rcb_prev = &rawcb;
-}
-
-
-/*
- * Raw protocol input routine. Find the socket
- * associated with the packet(s) and move them over. If
- * nothing exists for this packet, drop it.
- */
-/*
- * Raw protocol interface.
- */
-void
-raw_input(m0, proto, src, dst)
- struct mbuf *m0;
- register struct sockproto *proto;
- struct sockaddr *src, *dst;
-{
- register struct rawcb *rp;
- register struct mbuf *m = m0;
- register int sockets = 0;
- struct socket *last;
-
- last = 0;
- for (rp = rawcb.rcb_next; rp != &rawcb; rp = rp->rcb_next) {
- if (rp->rcb_proto.sp_family != proto->sp_family)
- continue;
- if (rp->rcb_proto.sp_protocol &&
- rp->rcb_proto.sp_protocol != proto->sp_protocol)
- continue;
- /*
- * We assume the lower level routines have
- * placed the address in a canonical format
- * suitable for a structure comparison.
- *
- * Note that if the lengths are not the same
- * the comparison will fail at the first byte.
- */
-#define equal(a1, a2) \
- (bcmp((caddr_t)(a1), (caddr_t)(a2), a1->sa_len) == 0)
- if (rp->rcb_laddr && !equal(rp->rcb_laddr, dst))
- continue;
- if (rp->rcb_faddr && !equal(rp->rcb_faddr, src))
- continue;
- if (last) {
- struct mbuf *n;
- n = m_copy(m, 0, (int)M_COPYALL);
- if (n) {
- if (sbappendaddr(&last->so_rcv, src,
- n, (struct mbuf *)0) == 0)
- /* should notify about lost packet */
- m_freem(n);
- else {
- sorwakeup(last);
- sockets++;
- }
- }
- }
- last = rp->rcb_socket;
- }
- if (last) {
- if (sbappendaddr(&last->so_rcv, src,
- m, (struct mbuf *)0) == 0)
- m_freem(m);
- else {
- sorwakeup(last);
- sockets++;
- }
- } else
- m_freem(m);
-}
-
-/*ARGSUSED*/
-void
-raw_ctlinput(cmd, arg, dummy)
- int cmd;
- struct sockaddr *arg;
- void *dummy;
-{
-
- if (cmd < 0 || cmd > PRC_NCMDS)
- return;
- /* INCOMPLETE */
-}
-
-/*ARGSUSED*/
-int
-raw_usrreq(so, req, m, nam, control)
- struct socket *so;
- int req;
- struct mbuf *m, *nam, *control;
-{
- register struct rawcb *rp = sotorawcb(so);
- register int error = 0;
- int len;
-
- if (req == PRU_CONTROL)
- return (EOPNOTSUPP);
- if (control && control->m_len) {
- error = EOPNOTSUPP;
- goto release;
- }
- if (rp == 0) {
- error = EINVAL;
- goto release;
- }
- switch (req) {
-
- /*
- * Allocate a raw control block and fill in the
- * necessary info to allow packets to be routed to
- * the appropriate raw interface routine.
- */
- case PRU_ATTACH:
- if ((so->so_state & SS_PRIV) == 0) {
- error = EACCES;
- break;
- }
- error = raw_attach(so, (int)nam);
- break;
-
- /*
- * Destroy state just before socket deallocation.
- * Flush data or not depending on the options.
- */
- case PRU_DETACH:
- if (rp == 0) {
- error = ENOTCONN;
- break;
- }
- raw_detach(rp);
- break;
-
- /*
- * If a socket isn't bound to a single address,
- * the raw input routine will hand it anything
- * within that protocol family (assuming there's
- * nothing else around it should go to).
- */
- case PRU_CONNECT:
- error = EINVAL;
-#if 0
- if (rp->rcb_faddr) {
- error = EISCONN;
- break;
- }
- nam = m_copym(nam, 0, M_COPYALL, M_WAIT);
- rp->rcb_faddr = mtod(nam, struct sockaddr *);
- soisconnected(so);
-#endif
- break;
-
- case PRU_BIND:
- error = EINVAL;
-#if 0
- if (rp->rcb_laddr) {
- error = EINVAL; /* XXX */
- break;
- }
- error = raw_bind(so, nam);
-#endif
- break;
-
- case PRU_CONNECT2:
- error = EOPNOTSUPP;
- goto release;
-
- case PRU_DISCONNECT:
- if (rp->rcb_faddr == 0) {
- error = ENOTCONN;
- break;
- }
- raw_disconnect(rp);
- soisdisconnected(so);
- break;
-
- /*
- * Mark the connection as being incapable of further input.
- */
- case PRU_SHUTDOWN:
- socantsendmore(so);
- break;
-
- /*
- * Ship a packet out. The appropriate raw output
- * routine handles any massaging necessary.
- */
- case PRU_SEND:
- if (nam) {
- if (rp->rcb_faddr) {
- error = EISCONN;
- break;
- }
- rp->rcb_faddr = mtod(nam, struct sockaddr *);
- } else if (rp->rcb_faddr == 0) {
- error = ENOTCONN;
- break;
- }
- error = (*so->so_proto->pr_output)(m, so);
- m = NULL;
- if (nam)
- rp->rcb_faddr = 0;
- break;
-
- case PRU_ABORT:
- raw_disconnect(rp);
- sofree(so);
- soisdisconnected(so);
- break;
-
- case PRU_SENSE:
- /*
- * stat: don't bother with a blocksize.
- */
- return (0);
-
- /*
- * Not supported.
- */
- case PRU_RCVOOB:
- case PRU_RCVD:
- return(EOPNOTSUPP);
-
- case PRU_LISTEN:
- case PRU_ACCEPT:
- case PRU_SENDOOB:
- error = EOPNOTSUPP;
- break;
-
- case PRU_SOCKADDR:
- if (rp->rcb_laddr == 0) {
- error = EINVAL;
- break;
- }
- len = rp->rcb_laddr->sa_len;
- bcopy((caddr_t)rp->rcb_laddr, mtod(nam, caddr_t), (unsigned)len);
- nam->m_len = len;
- break;
-
- case PRU_PEERADDR:
- if (rp->rcb_faddr == 0) {
- error = ENOTCONN;
- break;
- }
- len = rp->rcb_faddr->sa_len;
- bcopy((caddr_t)rp->rcb_faddr, mtod(nam, caddr_t), (unsigned)len);
- nam->m_len = len;
- break;
-
- default:
- panic("raw_usrreq");
- }
-release:
- if (m != NULL)
- m_freem(m);
- return (error);
-}
diff --git a/cpukit/libnetworking/net/route.c b/cpukit/libnetworking/net/route.c
deleted file mode 100644
index 683ddafee9..0000000000
--- a/cpukit/libnetworking/net/route.c
+++ /dev/null
@@ -1,959 +0,0 @@
-/*
- * Copyright (c) 1980, 1986, 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)route.c 8.2 (Berkeley) 11/15/93
- * $Id$
- */
-
-#include "opt_mrouting.h"
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/proc.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/domain.h>
-#include <sys/protosw.h>
-#include <sys/ioctl.h>
-
-#include <net/if.h>
-#include <net/route.h>
-#include <net/raw_cb.h>
-
-#include <netinet/in.h>
-#include <netinet/in_var.h>
-#include <netinet/ip_mroute.h>
-
-#define SA(p) ((struct sockaddr *)(p))
-
-struct route_cb route_cb;
-static struct rtstat rtstat;
-struct radix_node_head *rt_tables[AF_MAX+1];
-
-static int rttrash; /* routes not in table but not freed */
-
-static void rt_maskedcopy __P((struct sockaddr *,
- struct sockaddr *, struct sockaddr *));
-static void rtable_init __P((void **));
-
-static void
-rtable_init(table)
- void **table;
-{
- struct domain *dom;
- for (dom = domains; dom; dom = dom->dom_next)
- if (dom->dom_rtattach)
- dom->dom_rtattach(&table[dom->dom_family],
- dom->dom_rtoffset);
-}
-
-void
-route_init()
-{
- rn_init(); /* initialize all zeroes, all ones, mask table */
- rtable_init((void **)rt_tables);
-}
-
-/*
- * Packet routing routines.
- */
-void
-rtalloc(ro)
- register struct route *ro;
-{
- if (ro->ro_rt && ro->ro_rt->rt_ifp && (ro->ro_rt->rt_flags & RTF_UP))
- return; /* XXX */
- ro->ro_rt = rtalloc1(&ro->ro_dst, 1, 0UL);
-}
-
-void
-rtalloc_ign(ro, ignore)
- register struct route *ro;
- u_long ignore;
-{
- if (ro->ro_rt && ro->ro_rt->rt_ifp && (ro->ro_rt->rt_flags & RTF_UP))
- return; /* XXX */
- ro->ro_rt = rtalloc1(&ro->ro_dst, 1, ignore);
-}
-
-/*
- * Look up the route that matches the address given
- * Or, at least try.. Create a cloned route if needed.
- */
-struct rtentry *
-rtalloc1(dst, report, ignflags)
- register struct sockaddr *dst;
- int report;
- u_long ignflags;
-{
- register struct radix_node_head *rnh = rt_tables[dst->sa_family];
- register struct rtentry *rt;
- register struct radix_node *rn;
- struct rtentry *newrt = 0;
- struct rt_addrinfo info;
- u_long nflags;
- int s = splnet(), err = 0, msgtype = RTM_MISS;
-
- /*
- * Look up the address in the table for that Address Family
- */
- if (rnh && (rn = rnh->rnh_matchaddr((caddr_t)dst, rnh)) &&
- ((rn->rn_flags & RNF_ROOT) == 0)) {
- /*
- * If we find it and it's not the root node, then
- * get a refernce on the rtentry associated.
- */
- newrt = rt = (struct rtentry *)rn;
- nflags = rt->rt_flags & ~ignflags;
- if (report && (nflags & (RTF_CLONING | RTF_PRCLONING))) {
- /*
- * We are apparently adding (report = 0 in delete).
- * If it requires that it be cloned, do so.
- * (This implies it wasn't a HOST route.)
- */
- err = rtrequest(RTM_RESOLVE, dst, SA(0),
- SA(0), 0, &newrt);
- if (err) {
- /*
- * If the cloning didn't succeed, maybe
- * what we have will do. Return that.
- */
- newrt = rt;
- rt->rt_refcnt++;
- goto miss;
- }
- if ((rt = newrt) && (rt->rt_flags & RTF_XRESOLVE)) {
- /*
- * If the new route specifies it be
- * externally resolved, then go do that.
- */
- msgtype = RTM_RESOLVE;
- goto miss;
- }
- } else
- rt->rt_refcnt++;
- } else {
- /*
- * Either we hit the root or couldn't find any match,
- * Which basically means
- * "caint get there frm here"
- */
- rtstat.rts_unreach++;
- miss: if (report) {
- /*
- * If required, report the failure to the supervising
- * Authorities.
- * For a delete, this is not an error. (report == 0)
- */
- bzero((caddr_t)&info, sizeof(info));
- info.rti_info[RTAX_DST] = dst;
- rt_missmsg(msgtype, &info, 0, err);
- }
- }
- splx(s);
- return (newrt);
-}
-
-void
-rtfree(rt)
- register struct rtentry *rt;
-{
- register struct radix_node_head *rnh =
- rt_tables[rt_key(rt)->sa_family];
- register struct ifaddr *ifa;
-
- if (rt == 0 || rnh == 0)
- panic("rtfree");
- rt->rt_refcnt--;
- if(rnh->rnh_close && rt->rt_refcnt == 0) {
- rnh->rnh_close((struct radix_node *)rt, rnh);
- }
- if (rt->rt_refcnt <= 0 && (rt->rt_flags & RTF_UP) == 0) {
- if (rt->rt_nodes->rn_flags & (RNF_ACTIVE | RNF_ROOT))
- panic ("rtfree 2");
- rttrash--;
- if (rt->rt_refcnt < 0) {
- printf("rtfree: %p not freed (neg refs)\n", rt);
- return;
- }
- ifa = rt->rt_ifa;
- IFAFREE(ifa);
- if (rt->rt_parent) {
- RTFREE(rt->rt_parent);
- }
- Free(rt_key(rt));
- Free(rt);
- }
-}
-
-void
-ifafree(ifa)
- register struct ifaddr *ifa;
-{
- if (ifa == NULL)
- panic("ifafree");
- if (ifa->ifa_refcnt == 0)
- free(ifa, M_IFADDR);
- else
- ifa->ifa_refcnt--;
-}
-
-/*
- * Force a routing table entry to the specified
- * destination to go through the given gateway.
- * Normally called as a result of a routing redirect
- * message from the network layer.
- *
- * N.B.: must be called at splnet
- *
- */
-void
-rtredirect(dst, gateway, netmask, flags, src, rtp)
- struct sockaddr *dst, *gateway, *netmask, *src;
- int flags;
- struct rtentry **rtp;
-{
- register struct rtentry *rt;
- int error = 0;
- short *stat = 0;
- struct rt_addrinfo info;
- struct ifaddr *ifa;
-
- /* verify the gateway is directly reachable */
- if ((ifa = ifa_ifwithnet(gateway)) == 0) {
- error = ENETUNREACH;
- goto out;
- }
- rt = rtalloc1(dst, 0, 0UL);
- /*
- * If the redirect isn't from our current router for this dst,
- * it's either old or wrong. If it redirects us to ourselves,
- * we have a routing loop, perhaps as a result of an interface
- * going down recently.
- */
-#define equal(a1, a2) (bcmp((caddr_t)(a1), (caddr_t)(a2), (a1)->sa_len) == 0)
- if (!(flags & RTF_DONE) && rt &&
- (!equal(src, rt->rt_gateway) || rt->rt_ifa != ifa))
- error = EINVAL;
- else if (ifa_ifwithaddr(gateway))
- error = EHOSTUNREACH;
- if (error)
- goto done;
- /*
- * Create a new entry if we just got back a wildcard entry
- * or the the lookup failed. This is necessary for hosts
- * which use routing redirects generated by smart gateways
- * to dynamically build the routing tables.
- */
- if ((rt == 0) || (rt_mask(rt) && rt_mask(rt)->sa_len < 2))
- goto create;
- /*
- * Don't listen to the redirect if it's
- * for a route to an interface.
- */
- if (rt->rt_flags & RTF_GATEWAY) {
- if (((rt->rt_flags & RTF_HOST) == 0) && (flags & RTF_HOST)) {
- /*
- * Changing from route to net => route to host.
- * Create new route, rather than smashing route to net.
- */
- create:
- flags |= RTF_GATEWAY | RTF_DYNAMIC;
- error = rtrequest((int)RTM_ADD, dst, gateway,
- netmask, flags,
- (struct rtentry **)0);
- stat = &rtstat.rts_dynamic;
- } else {
- /*
- * Smash the current notion of the gateway to
- * this destination. Should check about netmask!!!
- */
- rt->rt_flags |= RTF_MODIFIED;
- flags |= RTF_MODIFIED;
- stat = &rtstat.rts_newgateway;
- rt_setgate(rt, rt_key(rt), gateway);
- }
- } else
- error = EHOSTUNREACH;
-done:
- if (rt) {
- if (rtp && !error)
- *rtp = rt;
- else
- rtfree(rt);
- }
-out:
- if (error)
- rtstat.rts_badredirect++;
- else if (stat != NULL)
- (*stat)++;
- bzero((caddr_t)&info, sizeof(info));
- info.rti_info[RTAX_DST] = dst;
- info.rti_info[RTAX_GATEWAY] = gateway;
- info.rti_info[RTAX_NETMASK] = netmask;
- info.rti_info[RTAX_AUTHOR] = src;
- rt_missmsg(RTM_REDIRECT, &info, flags, error);
-}
-
-/*
-* Routing table ioctl interface.
-*/
-int
-rtioctl(req, data, p)
- int req;
- caddr_t data;
- struct proc *p;
-{
-#ifdef INET
- /* Multicast goop, grrr... */
-#ifdef MROUTING
- return mrt_ioctl(req, data);
-#else
- return mrt_ioctl(req, data, p);
-#endif
-#else /* INET */
- return ENXIO;
-#endif /* INET */
-}
-
-struct ifaddr *
-ifa_ifwithroute(flags, dst, gateway)
- int flags;
- struct sockaddr *dst, *gateway;
-{
- register struct ifaddr *ifa;
- if ((flags & RTF_GATEWAY) == 0) {
- /*
- * If we are adding a route to an interface,
- * and the interface is a pt to pt link
- * we should search for the destination
- * as our clue to the interface. Otherwise
- * we can use the local address.
- */
- ifa = 0;
- if (flags & RTF_HOST) {
- ifa = ifa_ifwithdstaddr(dst);
- }
- if (ifa == 0)
- ifa = ifa_ifwithaddr(gateway);
- } else {
- /*
- * If we are adding a route to a remote net
- * or host, the gateway may still be on the
- * other end of a pt to pt link.
- */
- ifa = ifa_ifwithdstaddr(gateway);
- }
- if (ifa == 0)
- ifa = ifa_ifwithnet(gateway);
- if (ifa == 0) {
- struct rtentry *rt = rtalloc1(dst, 0, 0UL);
- if (rt == 0)
- return (0);
- rt->rt_refcnt--;
- if ((ifa = rt->rt_ifa) == 0)
- return (0);
- }
- if (ifa->ifa_addr->sa_family != dst->sa_family) {
- struct ifaddr *oifa = ifa;
- ifa = ifaof_ifpforaddr(dst, ifa->ifa_ifp);
- if (ifa == 0)
- ifa = oifa;
- }
- return (ifa);
-}
-
-#define ROUNDUP(a) (a>0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long))
-
-static int rt_fixdelete(struct radix_node *, void *);
-static int rt_fixchange(struct radix_node *, void *);
-
-struct rtfc_arg {
- struct rtentry *rt0;
- struct radix_node_head *rnh;
-};
-
-/*
- * Do appropriate manipulations of a routing tree given
- * all the bits of info needed
- */
-int
-rtrequest(req, dst, gateway, netmask, flags, ret_nrt)
- int req, flags;
- struct sockaddr *dst, *gateway, *netmask;
- struct rtentry **ret_nrt;
-{
- int s = splnet(); int error = 0;
- register struct rtentry *rt;
- register struct radix_node *rn;
- register struct radix_node_head *rnh;
- struct ifaddr *ifa;
- struct sockaddr *ndst;
-#define senderr(x) { error = x ; goto bad; }
-
- /*
- * Find the correct routing tree to use for this Address Family
- */
- if ((rnh = rt_tables[dst->sa_family]) == 0)
- senderr(ESRCH);
- /*
- * If we are adding a host route then we don't want to put
- * a netmask in the tree
- */
- if (flags & RTF_HOST)
- netmask = 0;
- switch (req) {
- case RTM_DELETE:
- /*
- * Remove the item from the tree and return it.
- * Complain if it is not there and do no more processing.
- */
- if ((rn = rnh->rnh_deladdr(dst, netmask, rnh)) == 0)
- senderr(ESRCH);
- if (rn->rn_flags & (RNF_ACTIVE | RNF_ROOT))
- panic ("rtrequest delete");
- rt = (struct rtentry *)rn;
-
- /*
- * Now search what's left of the subtree for any cloned
- * routes which might have been formed from this node.
- */
- if ((rt->rt_flags & RTF_PRCLONING) && netmask) {
- rnh->rnh_walktree_from(rnh, dst, netmask,
- rt_fixdelete, rt);
- }
-
- /*
- * Remove any external references we may have.
- * This might result in another rtentry being freed if
- * we held it's last reference.
- */
- if (rt->rt_gwroute) {
- rt = rt->rt_gwroute;
- RTFREE(rt);
- (rt = (struct rtentry *)rn)->rt_gwroute = 0;
- }
-
- /*
- * NB: RTF_UP must be set during the search above,
- * because we might delete the last ref, causing
- * rt to get freed prematurely.
- */
- rt->rt_flags &= ~RTF_UP;
-
- /*
- * If there is llinfo or similar associated with the
- * route, give the interface a chance to deal with it..
- */
- if ((ifa = rt->rt_ifa) && ifa->ifa_rtrequest)
- ifa->ifa_rtrequest(RTM_DELETE, rt, SA(0));
- rttrash++;
- /*
- * If the caller wants it, then it can have it, but it's up to it
- * to free the rtentry as we won't be doing it.
- */
- if (ret_nrt)
- *ret_nrt = rt;
- else if (rt->rt_refcnt <= 0) {
- rt->rt_refcnt++; /* make a 1->0 transition */
- rtfree(rt);
- }
- break;
-
- case RTM_RESOLVE:
- if (ret_nrt == 0 || (rt = *ret_nrt) == 0)
- senderr(EINVAL);
- ifa = rt->rt_ifa;
- flags = rt->rt_flags &
- ~(RTF_CLONING | RTF_PRCLONING | RTF_STATIC);
- flags |= RTF_WASCLONED;
- gateway = rt->rt_gateway;
- if ((netmask = rt->rt_genmask) == 0)
- flags |= RTF_HOST;
- goto makeroute;
-
- case RTM_ADD:
- if ((flags & RTF_GATEWAY) && !gateway)
- panic("rtrequest: GATEWAY but no gateway");
-
- if ((ifa = ifa_ifwithroute(flags, dst, gateway)) == 0)
- senderr(ENETUNREACH);
-
- makeroute:
- R_Malloc(rt, struct rtentry *, sizeof(*rt));
- if (rt == 0)
- senderr(ENOBUFS);
- Bzero(rt, sizeof(*rt));
- rt->rt_flags = RTF_UP | flags;
- if ((error = rt_setgate(rt, dst, gateway))) {
- Free(rt);
- senderr(error);
- }
- ndst = rt_key(rt);
- if (netmask) {
- rt_maskedcopy(dst, ndst, netmask);
- } else
- Bcopy(dst, ndst, dst->sa_len);
-
- /*
- * This moved from below so that rnh->rnh_addaddr() can
- * examine the ifa and ifp if it so desires.
- */
- ifa->ifa_refcnt++;
- rt->rt_ifa = ifa;
- rt->rt_ifp = ifa->ifa_ifp;
-
- rn = rnh->rnh_addaddr((caddr_t)ndst, (caddr_t)netmask,
- rnh, rt->rt_nodes);
- if (rn == 0) {
- struct rtentry *rt2;
- /*
- * Uh-oh, we already have one of these in the tree.
- * We do a special hack: if the route that's already
- * there was generated by the protocol-cloning
- * mechanism, then we just blow it away and retry
- * the insertion of the new one.
- */
- rt2 = rtalloc1(dst, 0, RTF_PRCLONING);
- if (rt2 && rt2->rt_parent) {
- rtrequest(RTM_DELETE,
- (struct sockaddr *)rt_key(rt2),
- rt2->rt_gateway,
- rt_mask(rt2), rt2->rt_flags, 0);
- RTFREE(rt2);
- rn = rnh->rnh_addaddr((caddr_t)ndst,
- (caddr_t)netmask,
- rnh, rt->rt_nodes);
- } else if (rt2) {
- RTFREE(rt2);
- }
- }
-
- if (rn == 0) {
- if (rt->rt_gwroute)
- rtfree(rt->rt_gwroute);
- if (rt->rt_ifa) {
- IFAFREE(rt->rt_ifa);
- }
- Free(rt_key(rt));
- Free(rt);
- senderr(EEXIST);
- }
- rt->rt_parent = 0;
-
- if (req == RTM_RESOLVE) {
- rt->rt_rmx = (*ret_nrt)->rt_rmx; /* copy metrics */
- if ((*ret_nrt)->rt_flags & RTF_PRCLONING) {
- rt->rt_parent = (*ret_nrt);
- (*ret_nrt)->rt_refcnt++;
- }
- }
- if (ifa->ifa_rtrequest)
- ifa->ifa_rtrequest(req, rt, SA(ret_nrt ? *ret_nrt : 0));
- /*
- * We repeat the same procedure from rt_setgate() here because
- * it doesn't fire when we call it there because the node
- * hasn't been added to the tree yet.
- */
- if (!(rt->rt_flags & RTF_HOST) && rt_mask(rt) != 0) {
- struct rtfc_arg arg;
- arg.rnh = rnh;
- arg.rt0 = rt;
- rnh->rnh_walktree_from(rnh, rt_key(rt), rt_mask(rt),
- rt_fixchange, &arg);
- }
-
- if (ret_nrt) {
- *ret_nrt = rt;
- rt->rt_refcnt++;
- }
- break;
- }
-bad:
- splx(s);
- return (error);
-}
-
-/*
- * Called from rtrequest(RTM_DELETE, ...) to fix up the route's ``family''
- * (i.e., the routes related to it by the operation of cloning). This
- * routine is iterated over all potential former-child-routes by way of
- * rnh->rnh_walktree_from() above, and those that actually are children of
- * the late parent (passed in as VP here) are themselves deleted.
- */
-static int
-rt_fixdelete(struct radix_node *rn, void *vp)
-{
- struct rtentry *rt = (struct rtentry *)rn;
- struct rtentry *rt0 = vp;
-
- if (rt->rt_parent == rt0 && !(rt->rt_flags & RTF_PINNED)) {
- return rtrequest(RTM_DELETE, rt_key(rt),
- (struct sockaddr *)0, rt_mask(rt),
- rt->rt_flags, (struct rtentry **)0);
- }
- return 0;
-}
-
-/*
- * This routine is called from rt_setgate() to do the analogous thing for
- * adds and changes. There is the added complication in this case of a
- * middle insert; i.e., insertion of a new network route between an older
- * network route and (cloned) host routes. For this reason, a simple check
- * of rt->rt_parent is insufficient; each candidate route must be tested
- * against the (mask, value) of the new route (passed as before in vp)
- * to see if the new route matches it. Unfortunately, this has the obnoxious
- * property of also triggering for insertion /above/ a pre-existing network
- * route and clones. Sigh. This may be fixed some day.
- *
- * XXX - it may be possible to do fixdelete() for changes and reserve this
- * routine just for adds. I'm not sure why I thought it was necessary to do
- * changes this way.
- */
-#ifdef DEBUG
-int rtfcdebug = 0;
-#endif
-
-static int
-rt_fixchange(struct radix_node *rn, void *vp)
-{
- struct rtentry *rt = (struct rtentry *)rn;
- struct rtfc_arg *ap = vp;
- struct rtentry *rt0 = ap->rt0;
- struct radix_node_head *rnh = ap->rnh;
- u_char *xk1, *xm1, *xk2;
- int i, len;
-
-#ifdef DEBUG
- if (rtfcdebug)
- printf("rt_fixchange: rt %p, rt0 %p\n", rt, rt0);
-#endif
-
- if (!rt->rt_parent || (rt->rt_flags & RTF_PINNED)) {
-#ifdef DEBUG
- if(rtfcdebug) printf("no parent or pinned\n");
-#endif
- return 0;
- }
-
- if (rt->rt_parent == rt0) {
-#ifdef DEBUG
- if(rtfcdebug) printf("parent match\n");
-#endif
- return rtrequest(RTM_DELETE, rt_key(rt),
- (struct sockaddr *)0, rt_mask(rt),
- rt->rt_flags, (struct rtentry **)0);
- }
-
- /*
- * There probably is a function somewhere which does this...
- * if not, there should be.
- */
- len = imin(((struct sockaddr *)rt_key(rt0))->sa_len,
- ((struct sockaddr *)rt_key(rt))->sa_len);
-
- xk1 = (u_char *)rt_key(rt0);
- xm1 = (u_char *)rt_mask(rt0);
- xk2 = (u_char *)rt_key(rt);
-
- for (i = rnh->rnh_treetop->rn_off; i < len; i++) {
- if ((xk2[i] & xm1[i]) != xk1[i]) {
-#ifdef DEBUG
- if(rtfcdebug) printf("no match\n");
-#endif
- return 0;
- }
- }
-
- /*
- * OK, this node is a clone, and matches the node currently being
- * changed/added under the node's mask. So, get rid of it.
- */
-#ifdef DEBUG
- if(rtfcdebug) printf("deleting\n");
-#endif
- return rtrequest(RTM_DELETE, rt_key(rt), (struct sockaddr *)0,
- rt_mask(rt), rt->rt_flags, (struct rtentry **)0);
-}
-
-int
-rt_setgate(rt0, dst, gate)
- struct rtentry *rt0;
- struct sockaddr *dst, *gate;
-{
- caddr_t new, old;
- int dlen = ROUNDUP(dst->sa_len), glen = ROUNDUP(gate->sa_len);
- register struct rtentry *rt = rt0;
- struct radix_node_head *rnh = rt_tables[dst->sa_family];
-
- /*
- * A host route with the destination equal to the gateway
- * will interfere with keeping LLINFO in the routing
- * table, so disallow it.
- */
- if (((rt0->rt_flags & (RTF_HOST|RTF_GATEWAY|RTF_LLINFO)) ==
- (RTF_HOST|RTF_GATEWAY)) &&
- (dst->sa_len == gate->sa_len) &&
- (bcmp(dst, gate, dst->sa_len) == 0)) {
- /*
- * The route might already exist if this is an RTM_CHANGE
- * or a routing redirect, so try to delete it.
- */
- if (rt_key(rt0))
- rtrequest(RTM_DELETE, (struct sockaddr *)rt_key(rt0),
- rt0->rt_gateway, rt_mask(rt0), rt0->rt_flags, 0);
- return EADDRNOTAVAIL;
- }
-
- if (rt->rt_gateway == 0 || glen > ROUNDUP(rt->rt_gateway->sa_len)) {
- old = (caddr_t)rt_key(rt);
- R_Malloc(new, caddr_t, dlen + glen);
- if (new == 0)
- return ENOBUFS;
- rt->rt_nodes->rn_key = new;
- } else {
- new = rt->rt_nodes->rn_key;
- old = 0;
- }
- Bcopy(gate, (rt->rt_gateway = (struct sockaddr *)(new + dlen)), glen);
- if (old) {
- Bcopy(dst, new, dlen);
- Free(old);
- }
- if (rt->rt_gwroute) {
- rt = rt->rt_gwroute; RTFREE(rt);
- rt = rt0; rt->rt_gwroute = 0;
- }
- /*
- * Cloning loop avoidance:
- * In the presence of protocol-cloning and bad configuration,
- * it is possible to get stuck in bottomless mutual recursion
- * (rtrequest rt_setgate rtalloc1). We avoid this by not allowing
- * protocol-cloning to operate for gateways (which is probably the
- * correct choice anyway), and avoid the resulting reference loops
- * by disallowing any route to run through itself as a gateway.
- * This is obviuosly mandatory when we get rt->rt_output().
- */
- if (rt->rt_flags & RTF_GATEWAY) {
- rt->rt_gwroute = rtalloc1(gate, 1, RTF_PRCLONING);
- if (rt->rt_gwroute == rt) {
- RTFREE(rt->rt_gwroute);
- rt->rt_gwroute = 0;
- return EDQUOT; /* failure */
- }
- }
-
- /*
- * This isn't going to do anything useful for host routes, so
- * don't bother. Also make sure we have a reasonable mask
- * (we don't yet have one during adds).
- */
- if (!(rt->rt_flags & RTF_HOST) && rt_mask(rt) != 0) {
- struct rtfc_arg arg;
- arg.rnh = rnh;
- arg.rt0 = rt;
- rnh->rnh_walktree_from(rnh, rt_key(rt), rt_mask(rt),
- rt_fixchange, &arg);
- }
-
- return 0;
-}
-
-static void
-rt_maskedcopy(src, dst, netmask)
- struct sockaddr *src, *dst, *netmask;
-{
- register u_char *cp1 = (u_char *)src;
- register u_char *cp2 = (u_char *)dst;
- register u_char *cp3 = (u_char *)netmask;
- u_char *cplim = cp2 + *cp3;
- u_char *cplim2 = cp2 + *cp1;
-
- *cp2++ = *cp1++; *cp2++ = *cp1++; /* copies sa_len & sa_family */
- cp3 += 2;
- if (cplim > cplim2)
- cplim = cplim2;
- while (cp2 < cplim)
- *cp2++ = *cp1++ & *cp3++;
- if (cp2 < cplim2)
- bzero((caddr_t)cp2, (unsigned)(cplim2 - cp2));
-}
-
-/*
- * Set up a routing table entry, normally
- * for an interface.
- */
-int
-rtinit(ifa, cmd, flags)
- register struct ifaddr *ifa;
- int cmd, flags;
-{
- register struct rtentry *rt;
- register struct sockaddr *dst;
- register struct sockaddr *deldst;
- struct mbuf *m = 0;
- struct rtentry *nrt = 0;
- int error;
-
- dst = flags & RTF_HOST ? ifa->ifa_dstaddr : ifa->ifa_addr;
- /*
- * If it's a delete, check that if it exists, it's on the correct
- * interface or we might scrub a route to another ifa which would
- * be confusing at best and possibly worse.
- */
- if (cmd == RTM_DELETE) {
- /*
- * It's a delete, so it should already exist..
- * If it's a net, mask off the host bits
- * (Assuming we have a mask)
- */
- if ((flags & RTF_HOST) == 0 && ifa->ifa_netmask) {
- m = m_get(M_WAIT, MT_SONAME);
- deldst = mtod(m, struct sockaddr *);
- rt_maskedcopy(dst, deldst, ifa->ifa_netmask);
- dst = deldst;
- }
- /*
- * Get an rtentry that is in the routing tree and
- * contains the correct info. (if this fails we can't get there).
- * We set "report" to FALSE so that if it doesn't exist,
- * it doesn't report an error or clone a route, etc. etc.
- */
- rt = rtalloc1(dst, 0, 0UL);
- if (rt) {
- /*
- * Ok so we found the rtentry. it has an extra reference
- * for us at this stage. we won't need that so
- * lop that off now.
- */
- rt->rt_refcnt--;
- if (rt->rt_ifa != ifa) {
- /*
- * If the interface in the rtentry doesn't match
- * the interface we are using, then we don't
- * want to delete it, so return an error.
- * This seems to be the only point of
- * this whole RTM_DELETE clause.
- */
- if (m)
- (void) m_free(m);
- return (flags & RTF_HOST ? EHOSTUNREACH
- : ENETUNREACH);
- }
- }
- /* XXX */
-#if 0
- else {
- /*
- * One would think that as we are deleting, and we know
- * it doesn't exist, we could just return at this point
- * with an "ELSE" clause, but apparently not..
- */
- return (flags & RTF_HOST ? EHOSTUNREACH
- : ENETUNREACH);
- }
-#endif
- }
- /*
- * Do the actual request
- */
- error = rtrequest(cmd, dst, ifa->ifa_addr, ifa->ifa_netmask,
- flags | ifa->ifa_flags, &nrt);
- if (m)
- (void) m_free(m);
- /*
- * If we are deleting, and we found an entry, then
- * it's been removed from the tree.. now throw it away.
- */
- if (cmd == RTM_DELETE && error == 0 && (rt = nrt)) {
- /*
- * notify any listenning routing agents of the change
- */
- rt_newaddrmsg(cmd, ifa, error, nrt);
- if (rt->rt_refcnt <= 0) {
- rt->rt_refcnt++; /* need a 1->0 transition to free */
- rtfree(rt);
- }
- }
-
- /*
- * We are adding, and we have a returned routing entry.
- * We need to sanity check the result.
- */
- if (cmd == RTM_ADD && error == 0 && (rt = nrt)) {
- /*
- * We just wanted to add it.. we don't actually need a reference
- */
- rt->rt_refcnt--;
- /*
- * If it came back with an unexpected interface, then it must
- * have already existed or something. (XXX)
- */
- if (rt->rt_ifa != ifa) {
- printf("rtinit: wrong ifa (%p) was (%p)\n", ifa,
- rt->rt_ifa);
- /*
- * Ask that the route we got back be removed
- * from the routing tables as we are trying
- * to supersede it.
- */
- if (rt->rt_ifa->ifa_rtrequest)
- rt->rt_ifa->ifa_rtrequest(RTM_DELETE, rt, SA(0));
- /*
- * Remove the referenve to the it's ifaddr.
- */
- IFAFREE(rt->rt_ifa);
- /*
- * And substitute in references to the ifaddr
- * we are adding.
- */
- rt->rt_ifa = ifa;
- rt->rt_ifp = ifa->ifa_ifp;
- ifa->ifa_refcnt++;
- /*
- * Now add it to the routing table
- * XXX could we have just left it?
- * as it might have been in the right place..
- */
- if (ifa->ifa_rtrequest)
- ifa->ifa_rtrequest(RTM_ADD, rt, SA(0));
- }
- /*
- * notify any listenning routing agents of the change
- */
- rt_newaddrmsg(cmd, ifa, error, nrt);
- }
- return (error);
-}
diff --git a/cpukit/libnetworking/net/route.h b/cpukit/libnetworking/net/route.h
deleted file mode 100644
index 6099b424c3..0000000000
--- a/cpukit/libnetworking/net/route.h
+++ /dev/null
@@ -1,286 +0,0 @@
-/*
- * Copyright (c) 1980, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)route.h 8.3 (Berkeley) 4/19/94
- * $Id$
- */
-
-#ifndef _NET_ROUTE_H_
-#define _NET_ROUTE_H_
-
-/*
- * Kernel resident routing tables.
- *
- * The routing tables are initialized when interface addresses
- * are set by making entries for all directly connected interfaces.
- */
-
-/*
- * A route consists of a destination address and a reference
- * to a routing entry. These are often held by protocols
- * in their control blocks, e.g. inpcb.
- */
-struct route {
- struct rtentry *ro_rt;
- struct sockaddr ro_dst;
-};
-
-/*
- * These numbers are used by reliable protocols for determining
- * retransmission behavior and are included in the routing structure.
- */
-struct rt_metrics {
- u_long rmx_locks; /* Kernel must leave these values alone */
- u_long rmx_mtu; /* MTU for this path */
- u_long rmx_hopcount; /* max hops expected */
- u_long rmx_expire; /* lifetime for route, e.g. redirect */
- u_long rmx_recvpipe; /* inbound delay-bandwidth product */
- u_long rmx_sendpipe; /* outbound delay-bandwidth product */
- u_long rmx_ssthresh; /* outbound gateway buffer limit */
- u_long rmx_rtt; /* estimated round trip time */
- u_long rmx_rttvar; /* estimated rtt variance */
- u_long rmx_pksent; /* packets sent using this route */
- u_long rmx_filler[4]; /* will be used for T/TCP later */
-};
-
-/*
- * rmx_rtt and rmx_rttvar are stored as microseconds;
- * RTTTOPRHZ(rtt) converts to a value suitable for use
- * by a protocol slowtimo counter.
- */
-#define RTM_RTTUNIT 1000000 /* units for rtt, rttvar, as units per sec */
-#define RTTTOPRHZ(r) ((r) / (RTM_RTTUNIT / PR_SLOWHZ))
-
-/*
- * XXX kernel function pointer `rt_output' is visible to applications.
- */
-struct mbuf;
-
-/*
- * We distinguish between routes to hosts and routes to networks,
- * preferring the former if available. For each route we infer
- * the interface to use from the gateway address supplied when
- * the route was entered. Routes that forward packets through
- * gateways are marked so that the output routines know to address the
- * gateway rather than the ultimate destination.
- */
-#ifndef RNF_NORMAL
-#include <net/radix.h>
-#endif
-struct rtentry {
- struct radix_node rt_nodes[2]; /* tree glue, and other values */
-#define rt_key(r) ((struct sockaddr *)((r)->rt_nodes->rn_key))
-#define rt_mask(r) ((struct sockaddr *)((r)->rt_nodes->rn_mask))
- struct sockaddr *rt_gateway; /* value */
- short rt_filler; /* was short flags field */
- short rt_refcnt; /* # held references */
- u_long rt_flags; /* up/down?, host/net */
- struct ifnet *rt_ifp; /* the answer: interface to use */
- struct ifaddr *rt_ifa; /* the answer: interface to use */
- struct sockaddr *rt_genmask; /* for generation of cloned routes */
- caddr_t rt_llinfo; /* pointer to link level info cache */
- struct rt_metrics rt_rmx; /* metrics used by rx'ing protocols */
- struct rtentry *rt_gwroute; /* implied entry for gatewayed routes */
- int (*rt_output) __P((struct ifnet *, struct mbuf *,
- struct sockaddr *, struct rtentry *));
- /* output routine for this (rt,if) */
- struct rtentry *rt_parent; /* cloning parent of this route */
- void *rt_filler2; /* more filler */
-};
-
-/*
- * Following structure necessary for 4.3 compatibility;
- * We should eventually move it to a compat file.
- */
-struct ortentry {
- u_long rt_hash; /* to speed lookups */
- struct sockaddr rt_dst; /* key */
- struct sockaddr rt_gateway; /* value */
- short rt_flags; /* up/down?, host/net */
- short rt_refcnt; /* # held references */
- u_long rt_use; /* raw # packets forwarded */
- struct ifnet *rt_ifp; /* the answer: interface to use */
-};
-
-#define rt_use rt_rmx.rmx_pksent
-
-#define RTF_UP 0x1 /* route usable */
-#define RTF_GATEWAY 0x2 /* destination is a gateway */
-#define RTF_HOST 0x4 /* host entry (net otherwise) */
-#define RTF_REJECT 0x8 /* host or net unreachable */
-#define RTF_DYNAMIC 0x10 /* created dynamically (by redirect) */
-#define RTF_MODIFIED 0x20 /* modified dynamically (by redirect) */
-#define RTF_DONE 0x40 /* message confirmed */
-/* 0x80 unused */
-#define RTF_CLONING 0x100 /* generate new routes on use */
-#define RTF_XRESOLVE 0x200 /* external daemon resolves name */
-#define RTF_LLINFO 0x400 /* generated by link layer (e.g. ARP) */
-#define RTF_STATIC 0x800 /* manually added */
-#define RTF_BLACKHOLE 0x1000 /* just discard pkts (during updates) */
-#define RTF_PROTO2 0x4000 /* protocol specific routing flag */
-#define RTF_PROTO1 0x8000 /* protocol specific routing flag */
-
-#define RTF_PRCLONING 0x10000 /* protocol requires cloning */
-#define RTF_WASCLONED 0x20000 /* route generated through cloning */
-#define RTF_PROTO3 0x40000 /* protocol specific routing flag */
-/* 0x80000 unused */
-#define RTF_PINNED 0x100000 /* future use */
-#define RTF_LOCAL 0x200000 /* route represents a local address */
-#define RTF_BROADCAST 0x400000 /* route represents a bcast address */
-#define RTF_MULTICAST 0x800000 /* route represents a mcast address */
- /* 0x1000000 and up unassigned */
-
-/*
- * Routing statistics.
- */
-struct rtstat {
- short rts_badredirect; /* bogus redirect calls */
- short rts_dynamic; /* routes created by redirects */
- short rts_newgateway; /* routes modified by redirects */
- short rts_unreach; /* lookups which failed */
- short rts_wildcard; /* lookups satisfied by a wildcard */
-};
-/*
- * Structures for routing messages.
- */
-struct rt_msghdr {
- u_short rtm_msglen; /* to skip over non-understood messages */
- u_char rtm_version; /* future binary compatibility */
- u_char rtm_type; /* message type */
- u_short rtm_index; /* index for associated ifp */
- int rtm_flags; /* flags, incl. kern & message, e.g. DONE */
- int rtm_addrs; /* bitmask identifying sockaddrs in msg */
- pid_t rtm_pid; /* identify sender */
- int rtm_seq; /* for sender to identify action */
- int rtm_errno; /* why failed */
- int rtm_use; /* from rtentry */
- u_long rtm_inits; /* which metrics we are initializing */
- struct rt_metrics rtm_rmx; /* metrics themselves */
-};
-
-#define RTM_VERSION 5 /* Up the ante and ignore older versions */
-
-#define RTM_ADD 0x1 /* Add Route */
-#define RTM_DELETE 0x2 /* Delete Route */
-#define RTM_CHANGE 0x3 /* Change Metrics or flags */
-#define RTM_GET 0x4 /* Report Metrics */
-#define RTM_LOSING 0x5 /* Kernel Suspects Partitioning */
-#define RTM_REDIRECT 0x6 /* Told to use different route */
-#define RTM_MISS 0x7 /* Lookup failed on this address */
-#define RTM_LOCK 0x8 /* fix specified metrics */
-#define RTM_OLDADD 0x9 /* caused by SIOCADDRT */
-#define RTM_OLDDEL 0xa /* caused by SIOCDELRT */
-#define RTM_RESOLVE 0xb /* req to resolve dst to LL addr */
-#define RTM_NEWADDR 0xc /* address being added to iface */
-#define RTM_DELADDR 0xd /* address being removed from iface */
-#define RTM_IFINFO 0xe /* iface going up/down etc. */
-
-#define RTV_MTU 0x1 /* init or lock _mtu */
-#define RTV_HOPCOUNT 0x2 /* init or lock _hopcount */
-#define RTV_EXPIRE 0x4 /* init or lock _hopcount */
-#define RTV_RPIPE 0x8 /* init or lock _recvpipe */
-#define RTV_SPIPE 0x10 /* init or lock _sendpipe */
-#define RTV_SSTHRESH 0x20 /* init or lock _ssthresh */
-#define RTV_RTT 0x40 /* init or lock _rtt */
-#define RTV_RTTVAR 0x80 /* init or lock _rttvar */
-
-/*
- * Bitmask values for rtm_addr.
- */
-#define RTA_DST 0x1 /* destination sockaddr present */
-#define RTA_GATEWAY 0x2 /* gateway sockaddr present */
-#define RTA_NETMASK 0x4 /* netmask sockaddr present */
-#define RTA_GENMASK 0x8 /* cloning mask sockaddr present */
-#define RTA_IFP 0x10 /* interface name sockaddr present */
-#define RTA_IFA 0x20 /* interface addr sockaddr present */
-#define RTA_AUTHOR 0x40 /* sockaddr for author of redirect */
-#define RTA_BRD 0x80 /* for NEWADDR, broadcast or p-p dest addr */
-
-/*
- * Index offsets for sockaddr array for alternate internal encoding.
- */
-#define RTAX_DST 0 /* destination sockaddr present */
-#define RTAX_GATEWAY 1 /* gateway sockaddr present */
-#define RTAX_NETMASK 2 /* netmask sockaddr present */
-#define RTAX_GENMASK 3 /* cloning mask sockaddr present */
-#define RTAX_IFP 4 /* interface name sockaddr present */
-#define RTAX_IFA 5 /* interface addr sockaddr present */
-#define RTAX_AUTHOR 6 /* sockaddr for author of redirect */
-#define RTAX_BRD 7 /* for NEWADDR, broadcast or p-p dest addr */
-#define RTAX_MAX 8 /* size of array to allocate */
-
-struct rt_addrinfo {
- int rti_addrs;
- struct sockaddr *rti_info[RTAX_MAX];
-};
-
-struct route_cb {
- int ip_count;
- int ipx_count;
- int ns_count;
- int iso_count;
- int any_count;
-};
-
-#ifdef KERNEL
-#define RTFREE(rt) \
- do { \
- if ((rt)->rt_refcnt <= 1) \
- rtfree(rt); \
- else \
- (rt)->rt_refcnt--; \
- } while (0)
-
-extern struct route_cb route_cb;
-extern struct rtstat rtstat;
-extern struct radix_node_head *rt_tables[AF_MAX+1];
-
-void route_init __P((void));
-void rt_ifmsg __P((struct ifnet *));
-void rt_missmsg __P((int, struct rt_addrinfo *, int, int));
-void rt_newaddrmsg __P((int, struct ifaddr *, int, struct rtentry *));
-int rt_setgate __P((struct rtentry *,
- struct sockaddr *, struct sockaddr *));
-void rtalloc __P((struct route *));
-void rtalloc_ign __P((struct route *, unsigned long));
-struct rtentry *
- rtalloc1 __P((struct sockaddr *, int, unsigned long));
-void rtfree __P((struct rtentry *));
-int rtinit __P((struct ifaddr *, int, int));
-int rtioctl __P((int, caddr_t, struct proc *));
-void rtredirect __P((struct sockaddr *, struct sockaddr *,
- struct sockaddr *, int, struct sockaddr *, struct rtentry **));
-int rtrequest __P((int, struct sockaddr *,
- struct sockaddr *, struct sockaddr *, int, struct rtentry **));
-#endif
-
-#endif
diff --git a/cpukit/libnetworking/net/rtsock.c b/cpukit/libnetworking/net/rtsock.c
deleted file mode 100644
index 57e777906a..0000000000
--- a/cpukit/libnetworking/net/rtsock.c
+++ /dev/null
@@ -1,829 +0,0 @@
-/*
- * Copyright (c) 1988, 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)rtsock.c 8.5 (Berkeley) 11/2/94
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/sysctl.h>
-#include <sys/proc.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/domain.h>
-#include <sys/protosw.h>
-
-#include <net/if.h>
-#include <net/route.h>
-#include <net/raw_cb.h>
-
-static struct sockaddr route_dst = { 2, PF_ROUTE, };
-static struct sockaddr route_src = { 2, PF_ROUTE, };
-static struct sockaddr sa_zero = { sizeof(sa_zero), AF_INET, };
-static struct sockproto route_proto = { PF_ROUTE, };
-
-struct walkarg {
- int w_tmemsize;
- int w_op, w_arg;
- caddr_t w_tmem;
- struct sysctl_req *w_req;
-};
-
-static struct mbuf *
- rt_msg1 __P((int, struct rt_addrinfo *));
-static int rt_msg2 __P((int,
- struct rt_addrinfo *, caddr_t, struct walkarg *));
-static int rt_xaddrs __P((caddr_t, caddr_t, struct rt_addrinfo *));
-static int sysctl_dumpentry __P((struct radix_node *rn, void *vw));
-static int sysctl_iflist __P((int af, struct walkarg *w));
-static int route_output __P((struct mbuf *, struct socket *));
-static int route_usrreq __P((struct socket *,
- int, struct mbuf *, struct mbuf *, struct mbuf *));
-static void rt_setmetrics __P((u_long, struct rt_metrics *, struct rt_metrics *));
-
-/* Sleazy use of local variables throughout file, warning!!!! */
-#define dst info.rti_info[RTAX_DST]
-#define gate info.rti_info[RTAX_GATEWAY]
-#define netmask info.rti_info[RTAX_NETMASK]
-#define genmask info.rti_info[RTAX_GENMASK]
-#define ifpaddr info.rti_info[RTAX_IFP]
-#define ifaaddr info.rti_info[RTAX_IFA]
-#define brdaddr info.rti_info[RTAX_BRD]
-
-/*ARGSUSED*/
-static int
-route_usrreq(so, req, m, nam, control)
- register struct socket *so;
- int req;
- struct mbuf *m, *nam, *control;
-{
- register int error = 0;
- register struct rawcb *rp = sotorawcb(so);
- int s;
-
- if (req == PRU_ATTACH) {
- MALLOC(rp, struct rawcb *, sizeof(*rp), M_PCB, M_WAITOK);
- so->so_pcb = (caddr_t)rp;
- if (so->so_pcb)
- bzero(so->so_pcb, sizeof(*rp));
- }
- if (req == PRU_DETACH && rp) {
- int af = rp->rcb_proto.sp_protocol;
- if (af == AF_INET)
- route_cb.ip_count--;
- else if (af == AF_IPX)
- route_cb.ipx_count--;
- else if (af == AF_NS)
- route_cb.ns_count--;
- else if (af == AF_ISO)
- route_cb.iso_count--;
- route_cb.any_count--;
- }
- s = splnet();
- error = raw_usrreq(so, req, m, nam, control);
- rp = sotorawcb(so);
- if (req == PRU_ATTACH && rp) {
- int af = rp->rcb_proto.sp_protocol;
- if (error) {
- free((caddr_t)rp, M_PCB);
- splx(s);
- return (error);
- }
- if (af == AF_INET)
- route_cb.ip_count++;
- else if (af == AF_IPX)
- route_cb.ipx_count++;
- else if (af == AF_NS)
- route_cb.ns_count++;
- else if (af == AF_ISO)
- route_cb.iso_count++;
- rp->rcb_faddr = &route_src;
- route_cb.any_count++;
- soisconnected(so);
- so->so_options |= SO_USELOOPBACK;
- }
- splx(s);
- return (error);
-}
-
-/*ARGSUSED*/
-static int
-route_output(m, so)
- register struct mbuf *m;
- struct socket *so;
-{
- register struct rt_msghdr *rtm = 0;
- register struct rtentry *rt = 0;
- struct rtentry *saved_nrt = 0;
- struct radix_node_head *rnh;
- struct rt_addrinfo info;
- int len, error = 0;
- struct ifnet *ifp = 0;
- struct ifaddr *ifa = 0;
-
-#define senderr(e) { error = e; goto flush;}
- if (m == 0 || ((m->m_len < sizeof(long)) &&
- (m = m_pullup(m, sizeof(long))) == 0))
- return (ENOBUFS);
- if ((m->m_flags & M_PKTHDR) == 0)
- panic("route_output");
- len = m->m_pkthdr.len;
- if (len < sizeof(*rtm) ||
- len != mtod(m, struct rt_msghdr *)->rtm_msglen) {
- dst = 0;
- senderr(EINVAL);
- }
- R_Malloc(rtm, struct rt_msghdr *, len);
- if (rtm == 0) {
- dst = 0;
- senderr(ENOBUFS);
- }
- m_copydata(m, 0, len, (caddr_t)rtm);
- if (rtm->rtm_version != RTM_VERSION) {
- dst = 0;
- senderr(EPROTONOSUPPORT);
- }
- info.rti_addrs = rtm->rtm_addrs;
- if (rt_xaddrs((caddr_t)(rtm + 1), len + (caddr_t)rtm, &info)) {
- dst = 0;
- senderr(EINVAL);
- }
- if (dst == 0 || (dst->sa_family >= AF_MAX)
- || (gate != 0 && (gate->sa_family >= AF_MAX)))
- senderr(EINVAL);
- if (genmask) {
- struct radix_node *t;
- t = rn_addmask((caddr_t)genmask, 0, 1);
- if (t && Bcmp(genmask, t->rn_key, *(u_char *)genmask) == 0)
- genmask = (struct sockaddr *)(t->rn_key);
- else
- senderr(ENOBUFS);
- }
- switch (rtm->rtm_type) {
-
- case RTM_ADD:
- if (gate == 0)
- senderr(EINVAL);
- error = rtrequest(RTM_ADD, dst, gate, netmask,
- rtm->rtm_flags, &saved_nrt);
- if (error == 0 && saved_nrt) {
- rt_setmetrics(rtm->rtm_inits,
- &rtm->rtm_rmx, &saved_nrt->rt_rmx);
- saved_nrt->rt_rmx.rmx_locks &= ~(rtm->rtm_inits);
- saved_nrt->rt_rmx.rmx_locks |=
- (rtm->rtm_inits & rtm->rtm_rmx.rmx_locks);
- saved_nrt->rt_refcnt--;
- saved_nrt->rt_genmask = genmask;
- }
- break;
-
- case RTM_DELETE:
- error = rtrequest(RTM_DELETE, dst, gate, netmask,
- rtm->rtm_flags, &saved_nrt);
- if (error == 0) {
- if ((rt = saved_nrt))
- rt->rt_refcnt++;
- goto report;
- }
- break;
-
- case RTM_GET:
- case RTM_CHANGE:
- case RTM_LOCK:
- if ((rnh = rt_tables[dst->sa_family]) == 0) {
- senderr(EAFNOSUPPORT);
- } else if ((rt = (struct rtentry *)
- rnh->rnh_lookup(dst, netmask, rnh)))
- rt->rt_refcnt++;
- else
- senderr(ESRCH);
- switch(rtm->rtm_type) {
-
- case RTM_GET:
- report:
- dst = rt_key(rt);
- gate = rt->rt_gateway;
- netmask = rt_mask(rt);
- genmask = rt->rt_genmask;
- if (rtm->rtm_addrs & (RTA_IFP | RTA_IFA)) {
- ifp = rt->rt_ifp;
- if (ifp) {
- ifpaddr = ifp->if_addrlist->ifa_addr;
- ifaaddr = rt->rt_ifa->ifa_addr;
- rtm->rtm_index = ifp->if_index;
- } else {
- ifpaddr = 0;
- ifaaddr = 0;
- }
- }
- len = rt_msg2(rtm->rtm_type, &info, (caddr_t)0,
- (struct walkarg *)0);
- if (len > rtm->rtm_msglen) {
- struct rt_msghdr *new_rtm;
- R_Malloc(new_rtm, struct rt_msghdr *, len);
- if (new_rtm == 0)
- senderr(ENOBUFS);
- Bcopy(rtm, new_rtm, rtm->rtm_msglen);
- Free(rtm); rtm = new_rtm;
- }
- (void)rt_msg2(rtm->rtm_type, &info, (caddr_t)rtm,
- (struct walkarg *)0);
- rtm->rtm_flags = rt->rt_flags;
- rtm->rtm_rmx = rt->rt_rmx;
- rtm->rtm_addrs = info.rti_addrs;
- break;
-
- case RTM_CHANGE:
- if (gate && (error = rt_setgate(rt, rt_key(rt), gate)))
- senderr(error);
-
- /*
- * If they tried to change things but didn't specify
- * the required gateway, then just use the old one.
- * This can happen if the user tries to change the
- * flags on the default route without changing the
- * default gateway. Changing flags still doesn't work.
- */
- if ((rt->rt_flags & RTF_GATEWAY) && !gate)
- gate = rt->rt_gateway;
-
- /* new gateway could require new ifaddr, ifp;
- flags may also be different; ifp may be specified
- by ll sockaddr when protocol address is ambiguous */
- if (ifpaddr && (ifa = ifa_ifwithnet(ifpaddr)) &&
- (ifp = ifa->ifa_ifp) && (ifaaddr || gate))
- ifa = ifaof_ifpforaddr(ifaaddr ? ifaaddr : gate,
- ifp);
- else if ((ifaaddr && (ifa = ifa_ifwithaddr(ifaaddr))) ||
- (gate && (ifa = ifa_ifwithroute(rt->rt_flags,
- rt_key(rt), gate))))
- ifp = ifa->ifa_ifp;
- if (ifa) {
- register struct ifaddr *oifa = rt->rt_ifa;
- if (oifa != ifa) {
- if (oifa && oifa->ifa_rtrequest)
- oifa->ifa_rtrequest(RTM_DELETE,
- rt, gate);
- IFAFREE(rt->rt_ifa);
- rt->rt_ifa = ifa;
- ifa->ifa_refcnt++;
- rt->rt_ifp = ifp;
- }
- }
- rt_setmetrics(rtm->rtm_inits, &rtm->rtm_rmx,
- &rt->rt_rmx);
- if (rt->rt_ifa && rt->rt_ifa->ifa_rtrequest)
- rt->rt_ifa->ifa_rtrequest(RTM_ADD, rt, gate);
- if (genmask)
- rt->rt_genmask = genmask;
- /*
- * Fall into
- */
- case RTM_LOCK:
- rt->rt_rmx.rmx_locks &= ~(rtm->rtm_inits);
- rt->rt_rmx.rmx_locks |=
- (rtm->rtm_inits & rtm->rtm_rmx.rmx_locks);
- break;
- }
- break;
-
- default:
- senderr(EOPNOTSUPP);
- }
-
-flush:
- if (rtm) {
- if (error)
- rtm->rtm_errno = error;
- else
- rtm->rtm_flags |= RTF_DONE;
- }
- if (rt)
- rtfree(rt);
- {
- register struct rawcb *rp = 0;
- /*
- * Check to see if we don't want our own messages.
- */
- if ((so->so_options & SO_USELOOPBACK) == 0) {
- if (route_cb.any_count <= 1) {
- if (rtm)
- Free(rtm);
- m_freem(m);
- return (error);
- }
- /* There is another listener, so construct message */
- rp = sotorawcb(so);
- }
- if (rtm) {
- m_copyback(m, 0, rtm->rtm_msglen, (caddr_t)rtm);
- Free(rtm);
- }
- if (rp)
- rp->rcb_proto.sp_family = 0; /* Avoid us */
- if (dst)
- route_proto.sp_protocol = dst->sa_family;
- raw_input(m, &route_proto, &route_src, &route_dst);
- if (rp)
- rp->rcb_proto.sp_family = PF_ROUTE;
- }
- return (error);
-}
-
-static void
-rt_setmetrics(which, in, out)
- u_long which;
- register struct rt_metrics *in, *out;
-{
-#define metric(f, e) if (which & (f)) out->e = in->e;
- metric(RTV_RPIPE, rmx_recvpipe);
- metric(RTV_SPIPE, rmx_sendpipe);
- metric(RTV_SSTHRESH, rmx_ssthresh);
- metric(RTV_RTT, rmx_rtt);
- metric(RTV_RTTVAR, rmx_rttvar);
- metric(RTV_HOPCOUNT, rmx_hopcount);
- metric(RTV_MTU, rmx_mtu);
- metric(RTV_EXPIRE, rmx_expire);
-#undef metric
-}
-
-#define ROUNDUP(a) \
- ((a) > 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long))
-#define ADVANCE(x, n) (x += ROUNDUP((n)->sa_len))
-
-
-/*
- * Extract the addresses of the passed sockaddrs.
- * Do a little sanity checking so as to avoid bad memory references.
- * This data is derived straight from userland.
- */
-static int
-rt_xaddrs(cp, cplim, rtinfo)
- register caddr_t cp, cplim;
- register struct rt_addrinfo *rtinfo;
-{
- register struct sockaddr *sa;
- register int i;
-
- bzero(rtinfo->rti_info, sizeof(rtinfo->rti_info));
- for (i = 0; (i < RTAX_MAX) && (cp < cplim); i++) {
- if ((rtinfo->rti_addrs & (1 << i)) == 0)
- continue;
- sa = (struct sockaddr *)cp;
- /*
- * It won't fit.
- */
- if ( (cp + sa->sa_len) > cplim ) {
- return (EINVAL);
- }
-
- /*
- * there are no more.. quit now
- * If there are more bits, they are in error.
- * I've seen this. route(1) can evidently generate these.
- * This causes kernel to core dump.
- * for compatibility, If we see this, point to a safe address.
- */
- if (sa->sa_len == 0) {
- rtinfo->rti_info[i] = &sa_zero;
- return (0); /* should be EINVAL but for compat */
- }
-
- /* accept it */
- rtinfo->rti_info[i] = sa;
- ADVANCE(cp, sa);
- }
- return (0);
-}
-
-static struct mbuf *
-rt_msg1(type, rtinfo)
- int type;
- register struct rt_addrinfo *rtinfo;
-{
- register struct rt_msghdr *rtm;
- register struct mbuf *m;
- register int i;
- register struct sockaddr *sa;
- int len, dlen;
-
- m = m_gethdr(M_DONTWAIT, MT_DATA);
- if (m == 0)
- return (m);
- switch (type) {
-
- case RTM_DELADDR:
- case RTM_NEWADDR:
- len = sizeof(struct ifa_msghdr);
- break;
-
- case RTM_IFINFO:
- len = sizeof(struct if_msghdr);
- break;
-
- default:
- len = sizeof(struct rt_msghdr);
- }
- if (len > MHLEN)
- panic("rt_msg1");
- m->m_pkthdr.len = m->m_len = len;
- m->m_pkthdr.rcvif = 0;
- rtm = mtod(m, struct rt_msghdr *);
- bzero((caddr_t)rtm, len);
- for (i = 0; i < RTAX_MAX; i++) {
- if ((sa = rtinfo->rti_info[i]) == NULL)
- continue;
- rtinfo->rti_addrs |= (1 << i);
- dlen = ROUNDUP(sa->sa_len);
- m_copyback(m, len, dlen, (caddr_t)sa);
- len += dlen;
- }
- if (m->m_pkthdr.len != len) {
- m_freem(m);
- return (NULL);
- }
- rtm->rtm_msglen = len;
- rtm->rtm_version = RTM_VERSION;
- rtm->rtm_type = type;
- return (m);
-}
-
-static int
-rt_msg2(type, rtinfo, cp, w)
- int type;
- register struct rt_addrinfo *rtinfo;
- caddr_t cp;
- struct walkarg *w;
-{
- register int i;
- int len, dlen, second_time = 0;
- caddr_t cp0;
-
- rtinfo->rti_addrs = 0;
-again:
- switch (type) {
-
- case RTM_DELADDR:
- case RTM_NEWADDR:
- len = sizeof(struct ifa_msghdr);
- break;
-
- case RTM_IFINFO:
- len = sizeof(struct if_msghdr);
- break;
-
- default:
- len = sizeof(struct rt_msghdr);
- }
- cp0 = cp;
- if (cp0)
- cp += len;
- for (i = 0; i < RTAX_MAX; i++) {
- register struct sockaddr *sa;
-
- if ((sa = rtinfo->rti_info[i]) == 0)
- continue;
- rtinfo->rti_addrs |= (1 << i);
- dlen = ROUNDUP(sa->sa_len);
- if (cp) {
- bcopy((caddr_t)sa, cp, (unsigned)dlen);
- cp += dlen;
- }
- len += dlen;
- }
- if (cp == 0 && w != NULL && !second_time) {
- register struct walkarg *rw = w;
-
- if (rw->w_req) {
- if (rw->w_tmemsize < len) {
- if (rw->w_tmem)
- free(rw->w_tmem, M_RTABLE);
- rw->w_tmem = (caddr_t)
- malloc(len, M_RTABLE, M_NOWAIT);
- if (rw->w_tmem)
- rw->w_tmemsize = len;
- }
- if (rw->w_tmem) {
- cp = rw->w_tmem;
- second_time = 1;
- goto again;
- }
- }
- }
- if (cp) {
- register struct rt_msghdr *rtm = (struct rt_msghdr *)cp0;
-
- rtm->rtm_version = RTM_VERSION;
- rtm->rtm_type = type;
- rtm->rtm_msglen = len;
- }
- return (len);
-}
-
-/*
- * This routine is called to generate a message from the routing
- * socket indicating that a redirect has occured, a routing lookup
- * has failed, or that a protocol has detected timeouts to a particular
- * destination.
- */
-void
-rt_missmsg(type, rtinfo, flags, error)
- int type, flags, error;
- register struct rt_addrinfo *rtinfo;
-{
- register struct rt_msghdr *rtm;
- register struct mbuf *m;
- struct sockaddr *sa = rtinfo->rti_info[RTAX_DST];
-
- if (route_cb.any_count == 0)
- return;
- m = rt_msg1(type, rtinfo);
- if (m == 0)
- return;
- rtm = mtod(m, struct rt_msghdr *);
- rtm->rtm_flags = RTF_DONE | flags;
- rtm->rtm_errno = error;
- rtm->rtm_addrs = rtinfo->rti_addrs;
- route_proto.sp_protocol = sa ? sa->sa_family : 0;
- raw_input(m, &route_proto, &route_src, &route_dst);
-}
-
-/*
- * This routine is called to generate a message from the routing
- * socket indicating that the status of a network interface has changed.
- */
-void
-rt_ifmsg(ifp)
- register struct ifnet *ifp;
-{
- register struct if_msghdr *ifm;
- struct mbuf *m;
- struct rt_addrinfo info;
-
- if (route_cb.any_count == 0)
- return;
- bzero((caddr_t)&info, sizeof(info));
- m = rt_msg1(RTM_IFINFO, &info);
- if (m == 0)
- return;
- ifm = mtod(m, struct if_msghdr *);
- ifm->ifm_index = ifp->if_index;
- ifm->ifm_flags = (u_short)ifp->if_flags;
- ifm->ifm_data = ifp->if_data;
- ifm->ifm_addrs = 0;
- route_proto.sp_protocol = 0;
- raw_input(m, &route_proto, &route_src, &route_dst);
-}
-
-/*
- * This is called to generate messages from the routing socket
- * indicating a network interface has had addresses associated with it.
- * if we ever reverse the logic and replace messages TO the routing
- * socket indicate a request to configure interfaces, then it will
- * be unnecessary as the routing socket will automatically generate
- * copies of it.
- */
-void
-rt_newaddrmsg(cmd, ifa, error, rt)
- int cmd, error;
- register struct ifaddr *ifa;
- register struct rtentry *rt;
-{
- struct rt_addrinfo info;
- struct sockaddr *sa = 0;
- int pass;
- struct mbuf *m = 0;
- struct ifnet *ifp = ifa->ifa_ifp;
-
- if (route_cb.any_count == 0)
- return;
- for (pass = 1; pass < 3; pass++) {
- bzero((caddr_t)&info, sizeof(info));
- if ((cmd == RTM_ADD && pass == 1) ||
- (cmd == RTM_DELETE && pass == 2)) {
- register struct ifa_msghdr *ifam;
- int ncmd = cmd == RTM_ADD ? RTM_NEWADDR : RTM_DELADDR;
-
- ifaaddr = sa = ifa->ifa_addr;
- ifpaddr = ifp->if_addrlist->ifa_addr;
- netmask = ifa->ifa_netmask;
- brdaddr = ifa->ifa_dstaddr;
- if ((m = rt_msg1(ncmd, &info)) == NULL)
- continue;
- ifam = mtod(m, struct ifa_msghdr *);
- ifam->ifam_index = ifp->if_index;
- ifam->ifam_metric = ifa->ifa_metric;
- ifam->ifam_flags = ifa->ifa_flags;
- ifam->ifam_addrs = info.rti_addrs;
- }
- if ((cmd == RTM_ADD && pass == 2) ||
- (cmd == RTM_DELETE && pass == 1)) {
- register struct rt_msghdr *rtm;
-
- if (rt == 0)
- continue;
- netmask = rt_mask(rt);
- dst = sa = rt_key(rt);
- gate = rt->rt_gateway;
- if ((m = rt_msg1(cmd, &info)) == NULL)
- continue;
- rtm = mtod(m, struct rt_msghdr *);
- rtm->rtm_index = ifp->if_index;
- rtm->rtm_flags |= rt->rt_flags;
- rtm->rtm_errno = error;
- rtm->rtm_addrs = info.rti_addrs;
- }
- route_proto.sp_protocol = sa ? sa->sa_family : 0;
- raw_input(m, &route_proto, &route_src, &route_dst);
- }
-}
-
-
-/*
- * This is used in dumping the kernel table via sysctl().
- */
-int
-sysctl_dumpentry(rn, vw)
- struct radix_node *rn;
- void *vw;
-{
- register struct walkarg *w = vw;
- register struct rtentry *rt = (struct rtentry *)rn;
- int error = 0, size;
- struct rt_addrinfo info;
-
- if (w->w_op == NET_RT_FLAGS && !(rt->rt_flags & w->w_arg))
- return 0;
- bzero((caddr_t)&info, sizeof(info));
- dst = rt_key(rt);
- gate = rt->rt_gateway;
- netmask = rt_mask(rt);
- genmask = rt->rt_genmask;
- size = rt_msg2(RTM_GET, &info, 0, w);
- if (w->w_req && w->w_tmem) {
- register struct rt_msghdr *rtm = (struct rt_msghdr *)w->w_tmem;
-
- rtm->rtm_flags = rt->rt_flags;
- rtm->rtm_use = rt->rt_use;
- rtm->rtm_rmx = rt->rt_rmx;
- rtm->rtm_index = rt->rt_ifp->if_index;
- rtm->rtm_errno = rtm->rtm_pid = rtm->rtm_seq = 0;
- rtm->rtm_addrs = info.rti_addrs;
- error = 0;
- return (error);
- }
- return (error);
-}
-
-int
-sysctl_iflist(af, w)
- int af;
- register struct walkarg *w;
-{
- register struct ifnet *ifp;
- register struct ifaddr *ifa;
- struct rt_addrinfo info;
- int len, error = 0;
-
- bzero((caddr_t)&info, sizeof(info));
- for (ifp = ifnet; ifp; ifp = ifp->if_next) {
- if (w->w_arg && w->w_arg != ifp->if_index)
- continue;
- ifa = ifp->if_addrlist;
- ifpaddr = ifa->ifa_addr;
- len = rt_msg2(RTM_IFINFO, &info, (caddr_t)0, w);
- ifpaddr = 0;
- if (w->w_req && w->w_tmem) {
- register struct if_msghdr *ifm;
-
- ifm = (struct if_msghdr *)w->w_tmem;
- ifm->ifm_index = ifp->if_index;
- ifm->ifm_flags = (u_short)ifp->if_flags;
- ifm->ifm_data = ifp->if_data;
- ifm->ifm_addrs = info.rti_addrs;
- error =0;
- if (error)
- return (error);
- }
- while ((ifa = ifa->ifa_next) != 0) {
- if (af && af != ifa->ifa_addr->sa_family)
- continue;
- ifaaddr = ifa->ifa_addr;
- netmask = ifa->ifa_netmask;
- brdaddr = ifa->ifa_dstaddr;
- len = rt_msg2(RTM_NEWADDR, &info, 0, w);
- if (w->w_req && w->w_tmem) {
- register struct ifa_msghdr *ifam;
-
- ifam = (struct ifa_msghdr *)w->w_tmem;
- ifam->ifam_index = ifa->ifa_ifp->if_index;
- ifam->ifam_flags = ifa->ifa_flags;
- ifam->ifam_metric = ifa->ifa_metric;
- ifam->ifam_addrs = info.rti_addrs;
- error = 0;
- if (error)
- return (error);
- }
- }
- ifaaddr = netmask = brdaddr = 0;
- }
- return (0);
-}
-
-static int
-sysctl_rtsock SYSCTL_HANDLER_ARGS
-{
- int *name = (int *)arg1;
- u_int namelen = arg2;
- register struct radix_node_head *rnh;
- int i, s, error = EINVAL;
- u_char af;
- struct walkarg w;
-
- name ++;
- namelen--;
- if (req->newptr)
- return (EPERM);
- if (namelen != 3)
- return (EINVAL);
- af = name[0];
- Bzero(&w, sizeof(w));
- w.w_op = name[1];
- w.w_arg = name[2];
- w.w_req = req;
-
- s = splnet();
- switch (w.w_op) {
-
- case NET_RT_DUMP:
- case NET_RT_FLAGS:
- for (i = 1; i <= AF_MAX; i++)
- if ((rnh = rt_tables[i]) && (af == 0 || af == i) &&
- (error = rnh->rnh_walktree(rnh,
- sysctl_dumpentry, &w)))
- break;
- break;
-
- case NET_RT_IFLIST:
- error = sysctl_iflist(af, &w);
- }
- splx(s);
- if (w.w_tmem)
- free(w.w_tmem, M_RTABLE);
- return (error);
-}
-
-SYSCTL_NODE(_net, PF_ROUTE, routetable, CTLFLAG_RD, sysctl_rtsock,"");
-
-/*
- * Definitions of protocols supported in the ROUTE domain.
- */
-
-extern struct domain routedomain; /* or at least forward */
-
-static struct protosw routesw[] = {
-{ SOCK_RAW, &routedomain, 0, PR_ATOMIC|PR_ADDR,
- 0, route_output, raw_ctlinput, 0,
- route_usrreq,
- raw_init
-}
-};
-
-struct domain routedomain =
- { PF_ROUTE, "route", route_init, 0, 0,
- routesw, &routesw[sizeof(routesw)/sizeof(routesw[0])] };
-
-DOMAIN_SET(route);
diff --git a/cpukit/libnetworking/netdb.h b/cpukit/libnetworking/netdb.h
deleted file mode 100644
index ec274f851f..0000000000
--- a/cpukit/libnetworking/netdb.h
+++ /dev/null
@@ -1,182 +0,0 @@
-/*-
- * Copyright (c) 1980, 1983, 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * -
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- * -
- * --Copyright--
- */
-
-/*
- * @(#)netdb.h 8.1 (Berkeley) 6/2/93
- * From: Id: netdb.h,v 8.9 1996/11/19 08:39:29 vixie Exp $
- * $Id$
- */
-
-#ifndef _NETDB_H_
-#define _NETDB_H_
-
-#include <sys/cdefs.h>
-
-#ifndef _PATH_HEQUIV
-# define _PATH_HEQUIV "/etc/hosts.equiv"
-#endif
-#define _PATH_HOSTS "/etc/hosts"
-#define _PATH_NETWORKS "/etc/networks"
-#define _PATH_PROTOCOLS "/etc/protocols"
-#define _PATH_SERVICES "/etc/services"
-
-extern int h_errno;
-
-/*
- * Structures returned by network data base library. All addresses are
- * supplied in host order, and returned in network order (suitable for
- * use in system calls).
- */
-struct hostent {
- char *h_name; /* official name of host */
- char **h_aliases; /* alias list */
- int h_addrtype; /* host address type */
- int h_length; /* length of address */
- char **h_addr_list; /* list of addresses from name server */
-#define h_addr h_addr_list[0] /* address, for backward compatibility */
-};
-
-/*
- * Assumption here is that a network number
- * fits in an unsigned long -- probably a poor one.
- */
-struct netent {
- char *n_name; /* official name of net */
- char **n_aliases; /* alias list */
- int n_addrtype; /* net address type */
- unsigned long n_net; /* network # */
-};
-
-struct servent {
- char *s_name; /* official service name */
- char **s_aliases; /* alias list */
- int s_port; /* port # */
- char *s_proto; /* protocol to use */
-};
-
-struct protoent {
- char *p_name; /* official protocol name */
- char **p_aliases; /* alias list */
- int p_proto; /* protocol # */
-};
-
-/*
- * Error return codes from gethostbyname() and gethostbyaddr()
- * (left in extern int h_errno).
- */
-
-#define NETDB_INTERNAL -1 /* see errno */
-#define NETDB_SUCCESS 0 /* no problem */
-#define HOST_NOT_FOUND 1 /* Authoritative Answer Host not found */
-#define TRY_AGAIN 2 /* Non-Authoritative Host not found, or SERVERFAIL */
-#define NO_RECOVERY 3 /* Non recoverable errors, FORMERR, REFUSED, NOTIMP */
-#define NO_DATA 4 /* Valid name, no data record of requested type */
-#define NO_ADDRESS NO_DATA /* no address, look for MX record */
-
-__BEGIN_DECLS
-void endhostent __P((void));
-void endnetent __P((void));
-void endprotoent __P((void));
-void endservent __P((void));
-struct hostent *gethostbyaddr __P((const char *, int, int));
-struct hostent *gethostbyname __P((const char *));
-struct hostent *gethostbyname2 __P((const char *, int));
-struct hostent *gethostent __P((void));
-struct netent *getnetbyaddr __P((unsigned long, int));
-struct netent *getnetbyname __P((const char *));
-struct netent *getnetent __P((void));
-struct protoent *getprotobyname __P((const char *));
-struct protoent *getprotobynumber __P((int));
-struct protoent *getprotoent __P((void));
-struct servent *getservbyname __P((const char *, const char *));
-struct servent *getservbyport __P((int, const char *));
-struct servent *getservent __P((void));
-void herror __P((const char *));
-__const char *hstrerror __P((int));
-void sethostent __P((int));
-/* void sethostfile __P((const char *)); */
-void setnetent __P((int));
-void setprotoent __P((int));
-void setservent __P((int));
-
-/*
- * PRIVATE functions specific to the FreeBSD implementation
- */
-
-/* DO NOT USE THESE, THEY ARE SUBJECT TO CHANGE AND ARE NOT PORTABLE!!! */
-void _sethosthtent __P((int));
-void _endhosthtent __P((void));
-void _sethostdnsent __P((int));
-void _endhostdnsent __P((void));
-void _setnethtent __P((int));
-void _endnethtent __P((void));
-void _setnetdnsent __P((int));
-void _endnetdnsent __P((void));
-struct hostent * _gethostbyhtname __P((const char *, int));
-struct hostent * _gethostbydnsname __P((const char *, int));
-struct hostent * _gethostbynisname __P((const char *, int));
-struct hostent * _gethostbyhtaddr __P((const char *, int, int));
-struct hostent * _gethostbydnsaddr __P((const char *, int, int));
-struct hostent * _gethostbynisaddr __P((const char *, int, int));
-struct netent * _getnetbyhtname __P((const char *));
-struct netent * _getnetbydnsname __P((const char *));
-struct netent * _getnetbynisname __P((const char *));
-struct netent * _getnetbyhtaddr __P((unsigned long, int));
-struct netent * _getnetbydnsaddr __P((unsigned long, int));
-struct netent * _getnetbynisaddr __P((unsigned long, int));
-void _map_v4v6_address __P((const char *src, char *dst));
-void _map_v4v6_hostent __P((struct hostent *hp, char **bp, int *len));
-__END_DECLS
-
-#endif /* !_NETDB_H_ */
diff --git a/cpukit/libnetworking/netinet/Makefile.am b/cpukit/libnetworking/netinet/Makefile.am
deleted file mode 100644
index f967b65cd7..0000000000
--- a/cpukit/libnetworking/netinet/Makefile.am
+++ /dev/null
@@ -1,43 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-LIBNAME = lib.a
-LIB = $(ARCH)/$(LIBNAME)
-
-C_FILES = if_ether.c igmp.c in.c in_cksum.c in_pcb.c in_proto.c in_rmx.c \
- ip_divert.c ip_fw.c ip_icmp.c ip_input.c ip_mroute.c ip_output.c \
- raw_ip.c tcp_debug.c tcp_input.c tcp_output.c tcp_subr.c tcp_timer.c \
- tcp_usrreq.c udp_usrreq.c
-C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
-
-OBJS = $(C_O_FILES)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../automake/lib.am
-
-#
-# Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -D_COMPILING_BSD_KERNEL_ -DKERNEL -DINET -DNFS -DDIAGNOSTIC \
- -DBOOTP_COMPAT
-
-$(LIB): $(OBJS)
- $(make-library)
-
-all-local: $(ARCH) $(OBJS) $(LIB)
-
-.PRECIOUS: $(LIB)
-
-EXTRA_DIST = icmp_var.h if_ether.c if_ether.h igmp.c igmp.h igmp_var.h in.c \
- in.h in_cksum.c in_cksum_i386.c in_cksum_m68k.c in_cksum_powerpc.c \
- in_pcb.c in_pcb.h in_proto.c in_rmx.c in_systm.h in_var.h ip.h \
- ip_divert.c ip_fw.c ip_fw.h ip_icmp.c ip_icmp.h ip_input.c ip_mroute.c \
- ip_mroute.h ip_output.c ip_var.h raw_ip.c tcp.h tcp_debug.c tcp_debug.h \
- tcp_fsm.h tcp_input.c tcp_output.c tcp_seq.h tcp_subr.c tcp_timer.c \
- tcp_timer.h tcp_usrreq.c tcp_var.h tcpip.h udp.h udp_usrreq.c udp_var.h
-
-include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/libnetworking/netinet/icmp_var.h b/cpukit/libnetworking/netinet/icmp_var.h
deleted file mode 100644
index 7657f31acf..0000000000
--- a/cpukit/libnetworking/netinet/icmp_var.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)icmp_var.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _NETINET_ICMP_VAR_H_
-#define _NETINET_ICMP_VAR_H_
-
-/*
- * Variables related to this implementation
- * of the internet control message protocol.
- */
-struct icmpstat {
-/* statistics related to icmp packets generated */
- u_long icps_error; /* # of calls to icmp_error */
- u_long icps_oldshort; /* no error 'cuz old ip too short */
- u_long icps_oldicmp; /* no error 'cuz old was icmp */
- u_long icps_outhist[ICMP_MAXTYPE + 1];
-/* statistics related to input messages processed */
- u_long icps_badcode; /* icmp_code out of range */
- u_long icps_tooshort; /* packet < ICMP_MINLEN */
- u_long icps_checksum; /* bad checksum */
- u_long icps_badlen; /* calculated bound mismatch */
- u_long icps_reflect; /* number of responses */
- u_long icps_inhist[ICMP_MAXTYPE + 1];
- u_long icps_bmcastecho; /* b/mcast echo requests dropped */
- u_long icps_bmcasttstamp; /* b/mcast tstamp requests dropped */
-};
-
-/*
- * Names for ICMP sysctl objects
- */
-#define ICMPCTL_MASKREPL 1 /* allow replies to netmask requests */
-#define ICMPCTL_STATS 2 /* statistics (read-only) */
-#define ICMPCTL_MAXID 3
-
-#define ICMPCTL_NAMES { \
- { 0, 0 }, \
- { "maskrepl", CTLTYPE_INT }, \
- { "stats", CTLTYPE_STRUCT }, \
-}
-
-#ifdef KERNEL
-extern struct icmpstat icmpstat;
-#endif
-
-#endif
diff --git a/cpukit/libnetworking/netinet/if_ether.c b/cpukit/libnetworking/netinet/if_ether.c
deleted file mode 100644
index 985ce6e7d9..0000000000
--- a/cpukit/libnetworking/netinet/if_ether.c
+++ /dev/null
@@ -1,638 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)if_ether.c 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-/*
- * Ethernet address resolution protocol.
- * TODO:
- * add "inuse/lock" bit (or ref. count) along with valid bit
- */
-
-#include <sys/param.h>
-#include <sys/kernel.h>
-#include <sys/sysctl.h>
-#include <sys/queue.h>
-#include <sys/systm.h>
-#include <sys/mbuf.h>
-#include <sys/malloc.h>
-#include <sys/socket.h>
-#include <sys/syslog.h>
-
-#include <net/if.h>
-#include <net/if_dl.h>
-#include <net/route.h>
-#include <net/netisr.h>
-
-#include <netinet/in.h>
-#include <netinet/in_var.h>
-#include <netinet/if_ether.h>
-
-#define SIN(s) ((struct sockaddr_in *)s)
-#define SDL(s) ((struct sockaddr_dl *)s)
-
-SYSCTL_NODE(_net_link_ether, PF_INET, inet, CTLFLAG_RW, 0, "");
-
-/* timer values */
-static int arpt_prune = (5*60*1); /* walk list every 5 minutes */
-static int arpt_keep = (20*60); /* once resolved, good for 20 more minutes */
-static int arpt_down = 20; /* once declared down, don't send for 20 sec */
-
-SYSCTL_INT(_net_link_ether_inet, OID_AUTO, prune_intvl, CTLFLAG_RW,
- &arpt_prune, 0, "");
-SYSCTL_INT(_net_link_ether_inet, OID_AUTO, max_age, CTLFLAG_RW,
- &arpt_keep, 0, "");
-SYSCTL_INT(_net_link_ether_inet, OID_AUTO, host_down_time, CTLFLAG_RW,
- &arpt_down, 0, "");
-
-#define rt_expire rt_rmx.rmx_expire
-
-struct llinfo_arp {
- LIST_ENTRY(llinfo_arp) la_le;
- struct rtentry *la_rt;
- struct mbuf *la_hold; /* last packet until resolved/timeout */
- long la_asked; /* last time we QUERIED for this addr */
-#define la_timer la_rt->rt_rmx.rmx_expire /* deletion time in seconds */
-};
-
-static LIST_HEAD(, llinfo_arp) llinfo_arp;
-
-struct ifqueue arpintrq = {0, 0, 0, 50};
-static int arp_inuse, arp_allocated;
-
-static int arp_maxtries = 5;
-static int useloopback = 1; /* use loopback interface for local traffic */
-static int arp_proxyall = 0;
-
-SYSCTL_INT(_net_link_ether_inet, OID_AUTO, maxtries, CTLFLAG_RW,
- &arp_maxtries, 0, "");
-SYSCTL_INT(_net_link_ether_inet, OID_AUTO, useloopback, CTLFLAG_RW,
- &useloopback, 0, "");
-SYSCTL_INT(_net_link_ether_inet, OID_AUTO, proxyall, CTLFLAG_RW,
- &arp_proxyall, 0, "");
-
-static void arp_rtrequest __P((int, struct rtentry *, struct sockaddr *));
-static void arprequest __P((struct arpcom *, u_long *, u_long *, u_char *));
-void arpintr __P((void));
-static void arptfree __P((struct llinfo_arp *));
-static void arptimer __P((void *));
-static struct llinfo_arp
- *arplookup __P((u_long, int, int));
-static void in_arpinput __P((struct mbuf *));
-
-/*
- * Timeout routine. Age arp_tab entries periodically.
- */
-/* ARGSUSED */
-static void
-arptimer(ignored_arg)
- void *ignored_arg;
-{
- int s = splnet();
- register struct llinfo_arp *la = llinfo_arp.lh_first;
- struct llinfo_arp *ola;
-
- timeout(arptimer, (caddr_t)0, arpt_prune * hz);
- while ((ola = la) != 0) {
- register struct rtentry *rt = la->la_rt;
- la = la->la_le.le_next;
- if (rt->rt_expire && rt->rt_expire <= rtems_bsdnet_seconds_since_boot())
- arptfree(ola); /* timer has expired, clear */
- }
- splx(s);
-}
-
-/*
- * Parallel to llc_rtrequest.
- */
-static void
-arp_rtrequest(req, rt, sa)
- int req;
- register struct rtentry *rt;
- struct sockaddr *sa;
-{
- register struct sockaddr *gate = rt->rt_gateway;
- register struct llinfo_arp *la = (struct llinfo_arp *)rt->rt_llinfo;
- static struct sockaddr_dl null_sdl = {sizeof(null_sdl), AF_LINK};
- static int arpinit_done;
-
- if (!arpinit_done) {
- arpinit_done = 1;
- LIST_INIT(&llinfo_arp);
- timeout(arptimer, (caddr_t)0, hz);
- }
- if (rt->rt_flags & RTF_GATEWAY)
- return;
- switch (req) {
-
- case RTM_ADD:
- /*
- * XXX: If this is a manually added route to interface
- * such as older version of routed or gated might provide,
- * restore cloning bit.
- */
- if ((rt->rt_flags & RTF_HOST) == 0 &&
- SIN(rt_mask(rt))->sin_addr.s_addr != 0xffffffff)
- rt->rt_flags |= RTF_CLONING;
- if (rt->rt_flags & RTF_CLONING) {
- /*
- * Case 1: This route should come from a route to iface.
- */
- rt_setgate(rt, rt_key(rt),
- (struct sockaddr *)&null_sdl);
- gate = rt->rt_gateway;
- SDL(gate)->sdl_type = rt->rt_ifp->if_type;
- SDL(gate)->sdl_index = rt->rt_ifp->if_index;
- rt->rt_expire = rtems_bsdnet_seconds_since_boot();
- break;
- }
- /* Announce a new entry if requested. */
- if (rt->rt_flags & RTF_ANNOUNCE)
- arprequest((struct arpcom *)rt->rt_ifp,
- &SIN(rt_key(rt))->sin_addr.s_addr,
- &SIN(rt_key(rt))->sin_addr.s_addr,
- (u_char *)LLADDR(SDL(gate)));
- /*FALLTHROUGH*/
- case RTM_RESOLVE:
- if (gate->sa_family != AF_LINK ||
- gate->sa_len < sizeof(null_sdl)) {
- log(LOG_DEBUG, "arp_rtrequest: bad gateway value\n");
- break;
- }
- SDL(gate)->sdl_type = rt->rt_ifp->if_type;
- SDL(gate)->sdl_index = rt->rt_ifp->if_index;
- if (la != 0)
- break; /* This happens on a route change */
- /*
- * Case 2: This route may come from cloning, or a manual route
- * add with a LL address.
- */
- R_Malloc(la, struct llinfo_arp *, sizeof(*la));
- rt->rt_llinfo = (caddr_t)la;
- if (la == 0) {
- log(LOG_DEBUG, "arp_rtrequest: malloc failed\n");
- break;
- }
- arp_inuse++, arp_allocated++;
- Bzero(la, sizeof(*la));
- la->la_rt = rt;
- rt->rt_flags |= RTF_LLINFO;
- LIST_INSERT_HEAD(&llinfo_arp, la, la_le);
-
- /*
- * This keeps the multicast addresses from showing up
- * in `arp -a' listings as unresolved. It's not actually
- * functional. Then the same for broadcast.
- */
- if (IN_MULTICAST(ntohl(SIN(rt_key(rt))->sin_addr.s_addr))) {
- ETHER_MAP_IP_MULTICAST(&SIN(rt_key(rt))->sin_addr,
- LLADDR(SDL(gate)));
- SDL(gate)->sdl_alen = 6;
- rt->rt_expire = 0;
- }
- if (in_broadcast(SIN(rt_key(rt))->sin_addr, rt->rt_ifp)) {
- memcpy(LLADDR(SDL(gate)), etherbroadcastaddr, 6);
- SDL(gate)->sdl_alen = 6;
- rt->rt_expire = 0;
- }
-
- if (SIN(rt_key(rt))->sin_addr.s_addr ==
- (IA_SIN(rt->rt_ifa))->sin_addr.s_addr) {
- /*
- * This test used to be
- * if (loif.if_flags & IFF_UP)
- * It allowed local traffic to be forced
- * through the hardware by configuring the loopback down.
- * However, it causes problems during network configuration
- * for boards that can't receive packets they send.
- * It is now necessary to clear "useloopback" and remove
- * the route to force traffic out to the hardware.
- */
- rt->rt_expire = 0;
- Bcopy(((struct arpcom *)rt->rt_ifp)->ac_enaddr,
- LLADDR(SDL(gate)), SDL(gate)->sdl_alen = 6);
- if (useloopback)
- rt->rt_ifp = loif;
-
- }
- break;
-
- case RTM_DELETE:
- if (la == 0)
- break;
- arp_inuse--;
- LIST_REMOVE(la, la_le);
- rt->rt_llinfo = 0;
- rt->rt_flags &= ~RTF_LLINFO;
- if (la->la_hold)
- m_freem(la->la_hold);
- Free((caddr_t)la);
- }
-}
-
-/*
- * Broadcast an ARP request. Caller specifies:
- * - arp header source ip address
- * - arp header target ip address
- * - arp header source ethernet address
- */
-static void
-arprequest(ac, sip, tip, enaddr)
- register struct arpcom *ac;
- register u_long *sip, *tip;
- register u_char *enaddr;
-{
- register struct mbuf *m;
- register struct ether_header *eh;
- register struct ether_arp *ea;
- struct sockaddr sa;
-
- if ((m = m_gethdr(M_DONTWAIT, MT_DATA)) == NULL)
- return;
- m->m_len = sizeof(*ea);
- m->m_pkthdr.len = sizeof(*ea);
- MH_ALIGN(m, sizeof(*ea));
- ea = mtod(m, struct ether_arp *);
- eh = (struct ether_header *)sa.sa_data;
- bzero((caddr_t)ea, sizeof (*ea));
- (void)memcpy(eh->ether_dhost, etherbroadcastaddr, sizeof(eh->ether_dhost));
- eh->ether_type = htons(ETHERTYPE_ARP); /* if_output will not swap */
- ea->arp_hrd = htons(ARPHRD_ETHER);
- ea->arp_pro = htons(ETHERTYPE_IP);
- ea->arp_hln = sizeof(ea->arp_sha); /* hardware address length */
- ea->arp_pln = sizeof(ea->arp_spa); /* protocol address length */
- ea->arp_op = htons(ARPOP_REQUEST);
- (void)memcpy(ea->arp_sha, enaddr, sizeof(ea->arp_sha));
- (void)memcpy(ea->arp_spa, sip, sizeof(ea->arp_spa));
- (void)memcpy(ea->arp_tpa, tip, sizeof(ea->arp_tpa));
- sa.sa_family = AF_UNSPEC;
- sa.sa_len = sizeof(sa);
- (*ac->ac_if.if_output)(&ac->ac_if, m, &sa, (struct rtentry *)0);
-}
-
-/*
- * Resolve an IP address into an ethernet address. If success,
- * desten is filled in. If there is no entry in arptab,
- * set one up and broadcast a request for the IP address.
- * Hold onto this mbuf and resend it once the address
- * is finally resolved. A return value of 1 indicates
- * that desten has been filled in and the packet should be sent
- * normally; a 0 return indicates that the packet has been
- * taken over here, either now or for later transmission.
- */
-int
-arpresolve(ac, rt, m, dst, desten, rt0)
- register struct arpcom *ac;
- register struct rtentry *rt;
- struct mbuf *m;
- register struct sockaddr *dst;
- register u_char *desten;
- struct rtentry *rt0;
-{
- register struct llinfo_arp *la;
- struct sockaddr_dl *sdl;
-
- if (m->m_flags & M_BCAST) { /* broadcast */
- (void)memcpy(desten, etherbroadcastaddr, sizeof(etherbroadcastaddr));
- return (1);
- }
- if (m->m_flags & M_MCAST) { /* multicast */
- ETHER_MAP_IP_MULTICAST(&SIN(dst)->sin_addr, desten);
- return(1);
- }
- if (rt)
- la = (struct llinfo_arp *)rt->rt_llinfo;
- else {
- la = arplookup(SIN(dst)->sin_addr.s_addr, 1, 0);
- if (la)
- rt = la->la_rt;
- }
- if (la == 0 || rt == 0) {
- log(LOG_DEBUG, "arpresolve: can't allocate llinfo for %s\n",
- inet_ntoa(SIN(dst)->sin_addr));
- m_freem(m);
- return (0);
- }
- sdl = SDL(rt->rt_gateway);
- /*
- * Check the address family and length is valid, the address
- * is resolved; otherwise, try to resolve.
- */
- if ((rt->rt_expire == 0 || rt->rt_expire > rtems_bsdnet_seconds_since_boot()) &&
- sdl->sdl_family == AF_LINK && sdl->sdl_alen != 0) {
- bcopy(LLADDR(sdl), desten, sdl->sdl_alen);
- return 1;
- }
- /*
- * There is an arptab entry, but no ethernet address
- * response yet. Replace the held mbuf with this
- * latest one.
- */
- if (la->la_hold)
- m_freem(la->la_hold);
- la->la_hold = m;
- if (rt->rt_expire) {
- rt->rt_flags &= ~RTF_REJECT;
- if (la->la_asked == 0 || rt->rt_expire != rtems_bsdnet_seconds_since_boot()) {
- rt->rt_expire = rtems_bsdnet_seconds_since_boot();
- if (la->la_asked++ < arp_maxtries)
- arprequest(ac,
- &(SIN(rt->rt_ifa->ifa_addr)->sin_addr.s_addr),
- &(SIN(dst)->sin_addr.s_addr),
- ac->ac_enaddr);
- else {
- rt->rt_flags |= RTF_REJECT;
- rt->rt_expire += arpt_down;
- la->la_asked = 0;
- }
-
- }
- }
- return (0);
-}
-
-/*
- * Common length and type checks are done here,
- * then the protocol-specific routine is called.
- */
-void
-arpintr(void)
-{
- register struct mbuf *m;
- register struct arphdr *ar;
- int s;
-
- while (arpintrq.ifq_head) {
- s = splimp();
- IF_DEQUEUE(&arpintrq, m);
- splx(s);
- if (m == 0 || (m->m_flags & M_PKTHDR) == 0)
- panic("arpintr");
- if (m->m_len >= sizeof(struct arphdr) &&
- (ar = mtod(m, struct arphdr *)) &&
- ntohs(ar->ar_hrd) == ARPHRD_ETHER &&
- m->m_len >=
- sizeof(struct arphdr) + 2 * ar->ar_hln + 2 * ar->ar_pln)
-
- switch (ntohs(ar->ar_pro)) {
-
- case ETHERTYPE_IP:
- in_arpinput(m);
- continue;
- }
- m_freem(m);
- }
-}
-
-NETISR_SET(NETISR_ARP, arpintr);
-
-/*
- * ARP for Internet protocols on 10 Mb/s Ethernet.
- * Algorithm is that given in RFC 826.
- * In addition, a sanity check is performed on the sender
- * protocol address, to catch impersonators.
- * We no longer handle negotiations for use of trailer protocol:
- * Formerly, ARP replied for protocol type ETHERTYPE_TRAIL sent
- * along with IP replies if we wanted trailers sent to us,
- * and also sent them in response to IP replies.
- * This allowed either end to announce the desire to receive
- * trailer packets.
- * We no longer reply to requests for ETHERTYPE_TRAIL protocol either,
- * but formerly didn't normally send requests.
- */
-static void
-in_arpinput(m)
- struct mbuf *m;
-{
- register struct ether_arp *ea;
- register struct arpcom *ac = (struct arpcom *)m->m_pkthdr.rcvif;
- struct ether_header *eh;
- register struct llinfo_arp *la = 0;
- register struct rtentry *rt;
- struct in_ifaddr *ia, *maybe_ia = 0;
- struct sockaddr_dl *sdl;
- struct sockaddr sa;
- struct in_addr isaddr, itaddr, myaddr;
- int op;
-
- ea = mtod(m, struct ether_arp *);
- op = ntohs(ea->arp_op);
- (void)memcpy(&isaddr, ea->arp_spa, sizeof (isaddr));
- (void)memcpy(&itaddr, ea->arp_tpa, sizeof (itaddr));
- for (ia = in_ifaddr; ia; ia = ia->ia_next)
- if (ia->ia_ifp == &ac->ac_if) {
- maybe_ia = ia;
- if ((itaddr.s_addr == ia->ia_addr.sin_addr.s_addr) ||
- (isaddr.s_addr == ia->ia_addr.sin_addr.s_addr))
- break;
- }
- if (maybe_ia == 0) {
- m_freem(m);
- return;
- }
- myaddr = ia ? ia->ia_addr.sin_addr : maybe_ia->ia_addr.sin_addr;
- if (!bcmp((caddr_t)ea->arp_sha, (caddr_t)ac->ac_enaddr,
- sizeof (ea->arp_sha))) {
- m_freem(m); /* it's from me, ignore it. */
- return;
- }
- if (!bcmp((caddr_t)ea->arp_sha, (caddr_t)etherbroadcastaddr,
- sizeof (ea->arp_sha))) {
- log(LOG_ERR,
- "arp: ether address is broadcast for IP address %s!\n",
- inet_ntoa(isaddr));
- m_freem(m);
- return;
- }
- if (isaddr.s_addr == myaddr.s_addr) {
- log(LOG_ERR,
- "arp: %6D is using my IP address %s!\n",
- ea->arp_sha, ":", inet_ntoa(isaddr));
- itaddr = myaddr;
- goto reply;
- }
- la = arplookup(isaddr.s_addr, itaddr.s_addr == myaddr.s_addr, 0);
- if (la && (rt = la->la_rt) && (sdl = SDL(rt->rt_gateway))) {
- if (sdl->sdl_alen &&
- bcmp((caddr_t)ea->arp_sha, LLADDR(sdl), sdl->sdl_alen))
- log(LOG_INFO, "arp: %s moved from %6D to %6D\n",
- inet_ntoa(isaddr), (u_char *)LLADDR(sdl), ":",
- ea->arp_sha, ":");
- (void)memcpy(LLADDR(sdl), ea->arp_sha, sizeof(ea->arp_sha));
- sdl->sdl_alen = sizeof(ea->arp_sha);
- if (rt->rt_expire)
- rt->rt_expire = rtems_bsdnet_seconds_since_boot() + arpt_keep;
- rt->rt_flags &= ~RTF_REJECT;
- la->la_asked = 0;
- if (la->la_hold) {
- (*ac->ac_if.if_output)(&ac->ac_if, la->la_hold,
- rt_key(rt), rt);
- la->la_hold = 0;
- }
- }
-reply:
- if (op != ARPOP_REQUEST) {
- m_freem(m);
- return;
- }
- if (itaddr.s_addr == myaddr.s_addr) {
- /* I am the target */
- (void)memcpy(ea->arp_tha, ea->arp_sha, sizeof(ea->arp_sha));
- (void)memcpy(ea->arp_sha, ac->ac_enaddr, sizeof(ea->arp_sha));
- } else {
- la = arplookup(itaddr.s_addr, 0, SIN_PROXY);
- if (la == NULL) {
- struct sockaddr_in sin;
-
- if (!arp_proxyall) {
- m_freem(m);
- return;
- }
-
- bzero(&sin, sizeof sin);
- sin.sin_family = AF_INET;
- sin.sin_len = sizeof sin;
- sin.sin_addr = itaddr;
-
- rt = rtalloc1((struct sockaddr *)&sin, 0, 0UL);
- if (!rt) {
- m_freem(m);
- return;
- }
- /*
- * Don't send proxies for nodes on the same interface
- * as this one came out of, or we'll get into a fight
- * over who claims what Ether address.
- */
- if (rt->rt_ifp == &ac->ac_if) {
- rtfree(rt);
- m_freem(m);
- return;
- }
- (void)memcpy(ea->arp_tha, ea->arp_sha, sizeof(ea->arp_sha));
- (void)memcpy(ea->arp_sha, ac->ac_enaddr, sizeof(ea->arp_sha));
- rtfree(rt);
-#ifdef DEBUG_PROXY
- printf("arp: proxying for %s\n",
- inet_ntoa(itaddr));
-#endif
- } else {
- rt = la->la_rt;
- (void)memcpy(ea->arp_tha, ea->arp_sha, sizeof(ea->arp_sha));
- sdl = SDL(rt->rt_gateway);
- (void)memcpy(ea->arp_sha, LLADDR(sdl), sizeof(ea->arp_sha));
- }
- }
-
- (void)memcpy(ea->arp_tpa, ea->arp_spa, sizeof(ea->arp_spa));
- (void)memcpy(ea->arp_spa, &itaddr, sizeof(ea->arp_spa));
- ea->arp_op = htons(ARPOP_REPLY);
- ea->arp_pro = htons(ETHERTYPE_IP); /* let's be sure! */
- eh = (struct ether_header *)sa.sa_data;
- (void)memcpy(eh->ether_dhost, ea->arp_tha, sizeof(eh->ether_dhost));
- eh->ether_type = htons(ETHERTYPE_ARP);
- sa.sa_family = AF_UNSPEC;
- sa.sa_len = sizeof(sa);
- (*ac->ac_if.if_output)(&ac->ac_if, m, &sa, (struct rtentry *)0);
- return;
-}
-
-/*
- * Free an arp entry.
- */
-static void
-arptfree(la)
- register struct llinfo_arp *la;
-{
- register struct rtentry *rt = la->la_rt;
- register struct sockaddr_dl *sdl;
- if (rt == 0)
- panic("arptfree");
- if (rt->rt_refcnt > 0 && (sdl = SDL(rt->rt_gateway)) &&
- sdl->sdl_family == AF_LINK) {
- sdl->sdl_alen = 0;
- la->la_asked = 0;
- rt->rt_flags &= ~RTF_REJECT;
- return;
- }
- rtrequest(RTM_DELETE, rt_key(rt), (struct sockaddr *)0, rt_mask(rt),
- 0, (struct rtentry **)0);
-}
-/*
- * Lookup or enter a new address in arptab.
- */
-static struct llinfo_arp *
-arplookup(addr, create, proxy)
- u_long addr;
- int create, proxy;
-{
- register struct rtentry *rt;
- static struct sockaddr_inarp sin = {sizeof(sin), AF_INET };
- const char *why = 0;
-
- sin.sin_addr.s_addr = addr;
- sin.sin_other = proxy ? SIN_PROXY : 0;
- rt = rtalloc1((struct sockaddr *)&sin, create, 0UL);
- if (rt == 0)
- return (0);
- rt->rt_refcnt--;
-
- if (rt->rt_flags & RTF_GATEWAY)
- why = "host is not on local network";
- else if ((rt->rt_flags & RTF_LLINFO) == 0)
- why = "could not allocate llinfo";
- else if (rt->rt_gateway->sa_family != AF_LINK)
- why = "gateway route is not ours";
-
- if (why && create) {
- log(LOG_DEBUG, "arplookup %s failed: %s\n",
- inet_ntoa(sin.sin_addr), why);
- return 0;
- } else if (why) {
- return 0;
- }
- return ((struct llinfo_arp *)rt->rt_llinfo);
-}
-
-void
-arp_ifinit(ac, ifa)
- struct arpcom *ac;
- struct ifaddr *ifa;
-{
- if (ntohl(IA_SIN(ifa)->sin_addr.s_addr) != INADDR_ANY)
- arprequest(ac, &(IA_SIN(ifa)->sin_addr.s_addr),
- &(IA_SIN(ifa)->sin_addr.s_addr), ac->ac_enaddr);
- ifa->ifa_rtrequest = arp_rtrequest;
- ifa->ifa_flags |= RTF_CLONING;
-}
diff --git a/cpukit/libnetworking/netinet/if_ether.h b/cpukit/libnetworking/netinet/if_ether.h
deleted file mode 100644
index 22c8e97187..0000000000
--- a/cpukit/libnetworking/netinet/if_ether.h
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)if_ether.h 8.3 (Berkeley) 5/2/95
- * $Id$
- */
-
-#ifndef _NETINET_IF_ETHER_H_
-#define _NETINET_IF_ETHER_H_
-
-#include <net/ethernet.h>
-
-#define ETHERTYPE_PUP 0x0200 /* PUP protocol */
-#define ETHERTYPE_IP 0x0800 /* IP protocol */
-#define ETHERTYPE_ARP 0x0806 /* Addr. resolution protocol */
-#define ETHERTYPE_REVARP 0x8035 /* reverse Addr. resolution protocol */
-
-/*
- * The ETHERTYPE_NTRAILER packet types starting at ETHERTYPE_TRAIL have
- * (type-ETHERTYPE_TRAIL)*512 bytes of data followed
- * by an ETHER type (as given above) and then the (variable-length) header.
- */
-#define ETHERTYPE_TRAIL 0x1000 /* Trailer packet */
-#define ETHERTYPE_NTRAILER 16
-
-#define ETHERMTU (ETHER_MAX_LEN-ETHER_HDR_LEN-ETHER_CRC_LEN)
-#define ETHERMIN (ETHER_MIN_LEN-ETHER_HDR_LEN-ETHER_CRC_LEN)
-
-#ifdef KERNEL
-/*
- * Macro to map an IP multicast address to an Ethernet multicast address.
- * The high-order 25 bits of the Ethernet address are statically assigned,
- * and the low-order 23 bits are taken from the low end of the IP address.
- */
-#define ETHER_MAP_IP_MULTICAST(ipaddr, enaddr) \
- /* struct in_addr *ipaddr; */ \
- /* u_char enaddr[ETHER_ADDR_LEN]; */ \
-{ \
- (enaddr)[0] = 0x01; \
- (enaddr)[1] = 0x00; \
- (enaddr)[2] = 0x5e; \
- (enaddr)[3] = ((u_char *)ipaddr)[1] & 0x7f; \
- (enaddr)[4] = ((u_char *)ipaddr)[2]; \
- (enaddr)[5] = ((u_char *)ipaddr)[3]; \
-}
-#endif
-
-/*
- * Ethernet Address Resolution Protocol.
- *
- * See RFC 826 for protocol description. Structure below is adapted
- * to resolving internet addresses. Field names used correspond to
- * RFC 826.
- */
-struct ether_arp {
- struct arphdr ea_hdr; /* fixed-size header */
- u_char arp_sha[ETHER_ADDR_LEN]; /* sender hardware address */
- u_char arp_spa[4]; /* sender protocol address */
- u_char arp_tha[ETHER_ADDR_LEN]; /* target hardware address */
- u_char arp_tpa[4]; /* target protocol address */
-};
-#define arp_hrd ea_hdr.ar_hrd
-#define arp_pro ea_hdr.ar_pro
-#define arp_hln ea_hdr.ar_hln
-#define arp_pln ea_hdr.ar_pln
-#define arp_op ea_hdr.ar_op
-
-
-/*
- * Structure shared between the ethernet driver modules and
- * the address resolution code. For example, each ec_softc or il_softc
- * begins with this structure.
- */
-struct arpcom {
- /*
- * The ifnet struct _must_ be at the head of this structure.
- */
- struct ifnet ac_if; /* network-visible interface */
- u_char ac_enaddr[ETHER_ADDR_LEN]; /* ethernet hardware address */
- struct ether_multi *ac_multiaddrs; /* list of ether multicast addrs */
- int ac_multicnt; /* length of ac_multiaddrs list */
-};
-
-struct sockaddr_inarp {
- u_char sin_len;
- u_char sin_family;
- u_short sin_port;
- struct in_addr sin_addr;
- struct in_addr sin_srcaddr;
- u_short sin_tos;
- u_short sin_other;
-#define SIN_PROXY 1
-};
-/*
- * IP and ethernet specific routing flags
- */
-#define RTF_USETRAILERS RTF_PROTO1 /* use trailers */
-#define RTF_ANNOUNCE RTF_PROTO2 /* announce new arp entry */
-
-#ifdef KERNEL
-extern u_char etherbroadcastaddr[ETHER_ADDR_LEN];
-extern u_char ether_ipmulticast_min[ETHER_ADDR_LEN];
-extern u_char ether_ipmulticast_max[ETHER_ADDR_LEN];
-extern struct ifqueue arpintrq;
-
-int arpresolve __P((struct arpcom *, struct rtentry *, struct mbuf *,
- struct sockaddr *, u_char *, struct rtentry *));
-void arp_ifinit __P((struct arpcom *, struct ifaddr *));
-int ether_addmulti __P((struct ifreq *, struct arpcom *));
-int ether_delmulti __P((struct ifreq *, struct arpcom *));
-
-/*
- * Ethernet multicast address structure. There is one of these for each
- * multicast address or range of multicast addresses that we are supposed
- * to listen to on a particular interface. They are kept in a linked list,
- * rooted in the interface's arpcom structure. (This really has nothing to
- * do with ARP, or with the Internet address family, but this appears to be
- * the minimally-disrupting place to put it.)
- */
-struct ether_multi {
- u_char enm_addrlo[ETHER_ADDR_LEN]; /* low or only address of range */
- u_char enm_addrhi[ETHER_ADDR_LEN]; /* high or only address of range */
- struct arpcom *enm_ac; /* back pointer to arpcom */
- u_int enm_refcount; /* no. claims to this addr/range */
- struct ether_multi *enm_next; /* ptr to next ether_multi */
-};
-
-/*
- * Structure used by macros below to remember position when stepping through
- * all of the ether_multi records.
- */
-struct ether_multistep {
- struct ether_multi *e_enm;
-};
-
-/*
- * Macro for looking up the ether_multi record for a given range of Ethernet
- * multicast addresses connected to a given arpcom structure. If no matching
- * record is found, "enm" returns NULL.
- */
-#define ETHER_LOOKUP_MULTI(addrlo, addrhi, ac, enm) \
- /* u_char addrlo[ETHER_ADDR_LEN]; */ \
- /* u_char addrhi[ETHER_ADDR_LEN]; */ \
- /* struct arpcom *ac; */ \
- /* struct ether_multi *enm; */ \
-{ \
- for ((enm) = (ac)->ac_multiaddrs; \
- (enm) != NULL && \
- (bcmp((enm)->enm_addrlo, (addrlo), ETHER_ADDR_LEN) != 0 || \
- bcmp((enm)->enm_addrhi, (addrhi), ETHER_ADDR_LEN) != 0); \
- (enm) = (enm)->enm_next); \
-}
-
-/*
- * Macro to step through all of the ether_multi records, one at a time.
- * The current position is remembered in "step", which the caller must
- * provide. ETHER_FIRST_MULTI(), below, must be called to initialize "step"
- * and get the first record. Both macros return a NULL "enm" when there
- * are no remaining records.
- */
-#define ETHER_NEXT_MULTI(step, enm) \
- /* struct ether_multistep step; */ \
- /* struct ether_multi *enm; */ \
-{ \
- if (((enm) = (step).e_enm) != NULL) \
- (step).e_enm = (enm)->enm_next; \
-}
-
-#define ETHER_FIRST_MULTI(step, ac, enm) \
- /* struct ether_multistep step; */ \
- /* struct arpcom *ac; */ \
- /* struct ether_multi *enm; */ \
-{ \
- (step).e_enm = (ac)->ac_multiaddrs; \
- ETHER_NEXT_MULTI((step), (enm)); \
-}
-
-#endif
-
-#endif
diff --git a/cpukit/libnetworking/netinet/igmp.c b/cpukit/libnetworking/netinet/igmp.c
deleted file mode 100644
index 2af8b7038e..0000000000
--- a/cpukit/libnetworking/netinet/igmp.c
+++ /dev/null
@@ -1,479 +0,0 @@
-/*
- * Copyright (c) 1988 Stephen Deering.
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Stephen Deering of Stanford University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)igmp.c 8.1 (Berkeley) 7/19/93
- * $Id$
- */
-
-/*
- * Internet Group Management Protocol (IGMP) routines.
- *
- * Written by Steve Deering, Stanford, May 1988.
- * Modified by Rosen Sharma, Stanford, Aug 1994.
- * Modified by Bill Fenner, Xerox PARC, Feb 1995.
- * Modified to fully comply to IGMPv2 by Bill Fenner, Oct 1995.
- *
- * MULTICAST Revision: 3.5.1.4
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-#include <sys/protosw.h>
-#include <sys/kernel.h>
-#include <sys/sysctl.h>
-
-#include <net/if.h>
-#include <net/route.h>
-
-#include <netinet/in.h>
-#include <netinet/in_var.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/ip_var.h>
-#include <netinet/igmp.h>
-#include <netinet/igmp_var.h>
-
-static struct router_info *
- find_rti __P((struct ifnet *ifp));
-
-static struct igmpstat igmpstat;
-
-SYSCTL_STRUCT(_net_inet_igmp, IGMPCTL_STATS, stats, CTLFLAG_RD,
- &igmpstat, igmpstat, "");
-
-static int igmp_timers_are_running;
-static u_long igmp_all_hosts_group;
-static u_long igmp_all_rtrs_group;
-static struct mbuf *router_alert;
-static struct router_info *Head;
-
-static void igmp_sendpkt(struct in_multi *, int, unsigned long);
-
-void
-igmp_init()
-{
- struct ipoption *ra;
-
- /*
- * To avoid byte-swapping the same value over and over again.
- */
- igmp_all_hosts_group = htonl(INADDR_ALLHOSTS_GROUP);
- igmp_all_rtrs_group = htonl(INADDR_ALLRTRS_GROUP);
-
- igmp_timers_are_running = 0;
-
- /*
- * Construct a Router Alert option to use in outgoing packets
- */
- MGET(router_alert, M_DONTWAIT, MT_DATA);
- ra = mtod(router_alert, struct ipoption *);
- ra->ipopt_dst.s_addr = 0;
- ra->ipopt_list[0] = IPOPT_RA; /* Router Alert Option */
- ra->ipopt_list[1] = 0x04; /* 4 bytes long */
- ra->ipopt_list[2] = 0x00;
- ra->ipopt_list[3] = 0x00;
- router_alert->m_len = sizeof(ra->ipopt_dst) + ra->ipopt_list[1];
-
- Head = (struct router_info *) 0;
-}
-
-static struct router_info *
-find_rti(ifp)
- struct ifnet *ifp;
-{
- register struct router_info *rti = Head;
-
-#ifdef IGMP_DEBUG
- printf("[igmp.c, _find_rti] --> entering \n");
-#endif
- while (rti) {
- if (rti->rti_ifp == ifp) {
-#ifdef IGMP_DEBUG
- printf("[igmp.c, _find_rti] --> found old entry \n");
-#endif
- return rti;
- }
- rti = rti->rti_next;
- }
- MALLOC(rti, struct router_info *, sizeof *rti, M_MRTABLE, M_NOWAIT);
- rti->rti_ifp = ifp;
- rti->rti_type = IGMP_V2_ROUTER;
- rti->rti_time = 0;
- rti->rti_next = Head;
- Head = rti;
-#ifdef IGMP_DEBUG
- printf("[igmp.c, _find_rti] --> created an entry \n");
-#endif
- return rti;
-}
-
-void
-igmp_input(m, iphlen)
- register struct mbuf *m;
- register int iphlen;
-{
- register struct igmp *igmp;
- register struct ip *ip;
- register int igmplen;
- register struct ifnet *ifp = m->m_pkthdr.rcvif;
- register int minlen;
- register struct in_multi *inm;
- register struct in_ifaddr *ia;
- struct in_multistep step;
- struct router_info *rti;
-
- int timer; /** timer value in the igmp query header **/
-
- ++igmpstat.igps_rcv_total;
-
- ip = mtod(m, struct ip *);
- igmplen = ip->ip_len;
-
- /*
- * Validate lengths
- */
- if (igmplen < IGMP_MINLEN) {
- ++igmpstat.igps_rcv_tooshort;
- m_freem(m);
- return;
- }
- minlen = iphlen + IGMP_MINLEN;
- if ((m->m_flags & M_EXT || m->m_len < minlen) &&
- (m = m_pullup(m, minlen)) == 0) {
- ++igmpstat.igps_rcv_tooshort;
- return;
- }
-
- /*
- * Validate checksum
- */
- m->m_data += iphlen;
- m->m_len -= iphlen;
- igmp = mtod(m, struct igmp *);
- if (in_cksum(m, igmplen)) {
- ++igmpstat.igps_rcv_badsum;
- m_freem(m);
- return;
- }
- m->m_data -= iphlen;
- m->m_len += iphlen;
-
- ip = mtod(m, struct ip *);
- timer = igmp->igmp_code * PR_FASTHZ / IGMP_TIMER_SCALE;
- rti = find_rti(ifp);
-
- /*
- * In the IGMPv2 specification, there are 3 states and a flag.
- *
- * In Non-Member state, we simply don't have a membership record.
- * In Delaying Member state, our timer is running (inm->inm_timer)
- * In Idle Member state, our timer is not running (inm->inm_timer==0)
- *
- * The flag is inm->inm_state, it is set to IGMP_OTHERMEMBER if
- * we have heard a report from another member, or IGMP_IREPORTEDLAST
- * if I sent the last report.
- */
- switch (igmp->igmp_type) {
-
- case IGMP_MEMBERSHIP_QUERY:
- ++igmpstat.igps_rcv_queries;
-
- if (ifp->if_flags & IFF_LOOPBACK)
- break;
-
- if (igmp->igmp_code == 0) {
- /*
- * Old router. Remember that the querier on this
- * interface is old, and set the timer to the
- * value in RFC 1112.
- */
-
- rti->rti_type = IGMP_V1_ROUTER;
- rti->rti_time = 0;
-
- timer = IGMP_MAX_HOST_REPORT_DELAY * PR_FASTHZ;
-
- if (ip->ip_dst.s_addr != igmp_all_hosts_group ||
- igmp->igmp_group.s_addr != 0) {
- ++igmpstat.igps_rcv_badqueries;
- m_freem(m);
- return;
- }
- } else {
- /*
- * New router. Simply do the new validity check.
- */
-
- if (igmp->igmp_group.s_addr != 0 &&
- !IN_MULTICAST(ntohl(igmp->igmp_group.s_addr))) {
- ++igmpstat.igps_rcv_badqueries;
- m_freem(m);
- return;
- }
- }
-
- /*
- * - Start the timers in all of our membership records
- * that the query applies to for the interface on
- * which the query arrived excl. those that belong
- * to the "all-hosts" group (224.0.0.1).
- * - Restart any timer that is already running but has
- * a value longer than the requested timeout.
- * - Use the value specified in the query message as
- * the maximum timeout.
- */
- IN_FIRST_MULTI(step, inm);
- while (inm != NULL) {
- if (inm->inm_ifp == ifp &&
- inm->inm_addr.s_addr != igmp_all_hosts_group &&
- (igmp->igmp_group.s_addr == 0 ||
- igmp->igmp_group.s_addr == inm->inm_addr.s_addr)) {
- if (inm->inm_timer == 0 ||
- inm->inm_timer > timer) {
- inm->inm_timer =
- IGMP_RANDOM_DELAY(timer);
- igmp_timers_are_running = 1;
- }
- }
- IN_NEXT_MULTI(step, inm);
- }
-
- break;
-
- case IGMP_V1_MEMBERSHIP_REPORT:
- case IGMP_V2_MEMBERSHIP_REPORT:
- /*
- * For fast leave to work, we have to know that we are the
- * last person to send a report for this group. Reports
- * can potentially get looped back if we are a multicast
- * router, so discard reports sourced by me.
- */
- IFP_TO_IA(ifp, ia);
- if (ia && ip->ip_src.s_addr == IA_SIN(ia)->sin_addr.s_addr)
- break;
-
- ++igmpstat.igps_rcv_reports;
-
- if (ifp->if_flags & IFF_LOOPBACK)
- break;
-
- if (!IN_MULTICAST(ntohl(igmp->igmp_group.s_addr))) {
- ++igmpstat.igps_rcv_badreports;
- m_freem(m);
- return;
- }
-
- /*
- * KLUDGE: if the IP source address of the report has an
- * unspecified (i.e., zero) subnet number, as is allowed for
- * a booting host, replace it with the correct subnet number
- * so that a process-level multicast routing demon can
- * determine which subnet it arrived from. This is necessary
- * to compensate for the lack of any way for a process to
- * determine the arrival interface of an incoming packet.
- */
- if ((ntohl(ip->ip_src.s_addr) & IN_CLASSA_NET) == 0)
- if (ia) ip->ip_src.s_addr = htonl(ia->ia_subnet);
-
- /*
- * If we belong to the group being reported, stop
- * our timer for that group.
- */
- IN_LOOKUP_MULTI(igmp->igmp_group, ifp, inm);
-
- if (inm != NULL) {
- inm->inm_timer = 0;
- ++igmpstat.igps_rcv_ourreports;
-
- inm->inm_state = IGMP_OTHERMEMBER;
- }
-
- break;
- }
-
- /*
- * Pass all valid IGMP packets up to any process(es) listening
- * on a raw IGMP socket.
- */
- rip_input(m, iphlen);
-}
-
-void
-igmp_joingroup(inm)
- struct in_multi *inm;
-{
- int s = splnet();
-
- if (inm->inm_addr.s_addr == igmp_all_hosts_group
- || inm->inm_ifp->if_flags & IFF_LOOPBACK) {
- inm->inm_timer = 0;
- inm->inm_state = IGMP_OTHERMEMBER;
- } else {
- inm->inm_rti = find_rti(inm->inm_ifp);
- igmp_sendpkt(inm, inm->inm_rti->rti_type, 0);
- inm->inm_timer = IGMP_RANDOM_DELAY(
- IGMP_MAX_HOST_REPORT_DELAY*PR_FASTHZ);
- inm->inm_state = IGMP_IREPORTEDLAST;
- igmp_timers_are_running = 1;
- }
- splx(s);
-}
-
-void
-igmp_leavegroup(inm)
- struct in_multi *inm;
-{
- if (inm->inm_state == IGMP_IREPORTEDLAST &&
- inm->inm_addr.s_addr != igmp_all_hosts_group &&
- !(inm->inm_ifp->if_flags & IFF_LOOPBACK) &&
- inm->inm_rti->rti_type != IGMP_V1_ROUTER)
- igmp_sendpkt(inm, IGMP_V2_LEAVE_GROUP, igmp_all_rtrs_group);
-}
-
-void
-igmp_fasttimo()
-{
- register struct in_multi *inm;
- struct in_multistep step;
- int s;
-
- /*
- * Quick check to see if any work needs to be done, in order
- * to minimize the overhead of fasttimo processing.
- */
-
- if (!igmp_timers_are_running)
- return;
-
- s = splnet();
- igmp_timers_are_running = 0;
- IN_FIRST_MULTI(step, inm);
- while (inm != NULL) {
- if (inm->inm_timer == 0) {
- /* do nothing */
- } else if (--inm->inm_timer == 0) {
- igmp_sendpkt(inm, inm->inm_rti->rti_type, 0);
- inm->inm_state = IGMP_IREPORTEDLAST;
- } else {
- igmp_timers_are_running = 1;
- }
- IN_NEXT_MULTI(step, inm);
- }
- splx(s);
-}
-
-void
-igmp_slowtimo()
-{
- int s = splnet();
- register struct router_info *rti = Head;
-
-#ifdef IGMP_DEBUG
- printf("[igmp.c,_slowtimo] -- > entering \n");
-#endif
- while (rti) {
- if (rti->rti_type == IGMP_V1_ROUTER) {
- rti->rti_time++;
- if (rti->rti_time >= IGMP_AGE_THRESHOLD) {
- rti->rti_type = IGMP_V2_ROUTER;
- }
- }
- rti = rti->rti_next;
- }
-#ifdef IGMP_DEBUG
- printf("[igmp.c,_slowtimo] -- > exiting \n");
-#endif
- splx(s);
-}
-
-static struct route igmprt;
-
-static void
-igmp_sendpkt(inm, type, addr)
- struct in_multi *inm;
- int type;
- unsigned long addr;
-{
- struct mbuf *m;
- struct igmp *igmp;
- struct ip *ip;
- struct ip_moptions imo;
-
- MGETHDR(m, M_DONTWAIT, MT_HEADER);
- if (m == NULL)
- return;
-
- m->m_pkthdr.rcvif = loif;
- m->m_pkthdr.len = sizeof(struct ip) + IGMP_MINLEN;
- MH_ALIGN(m, IGMP_MINLEN + sizeof(struct ip));
- m->m_data += sizeof(struct ip);
- m->m_len = IGMP_MINLEN;
- igmp = mtod(m, struct igmp *);
- igmp->igmp_type = type;
- igmp->igmp_code = 0;
- igmp->igmp_group = inm->inm_addr;
- igmp->igmp_cksum = 0;
- igmp->igmp_cksum = in_cksum(m, IGMP_MINLEN);
-
- m->m_data -= sizeof(struct ip);
- m->m_len += sizeof(struct ip);
- ip = mtod(m, struct ip *);
- ip->ip_tos = 0;
- ip->ip_len = sizeof(struct ip) + IGMP_MINLEN;
- ip->ip_off = 0;
- ip->ip_p = IPPROTO_IGMP;
- ip->ip_src.s_addr = INADDR_ANY;
- ip->ip_dst.s_addr = addr ? addr : igmp->igmp_group.s_addr;
-
- imo.imo_multicast_ifp = inm->inm_ifp;
- imo.imo_multicast_ttl = 1;
- imo.imo_multicast_vif = -1;
- /*
- * Request loopback of the report if we are acting as a multicast
- * router, so that the process-level routing demon can hear it.
- */
- imo.imo_multicast_loop = (ip_mrouter != NULL);
-
- /*
- * XXX
- * Do we have to worry about reentrancy here? Don't think so.
- */
- ip_output(m, router_alert, &igmprt, 0, &imo);
-
- ++igmpstat.igps_snd_reports;
-}
diff --git a/cpukit/libnetworking/netinet/igmp.h b/cpukit/libnetworking/netinet/igmp.h
deleted file mode 100644
index 01d6d09179..0000000000
--- a/cpukit/libnetworking/netinet/igmp.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (c) 1988 Stephen Deering.
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Stephen Deering of Stanford University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)igmp.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _NETINET_IGMP_H_
-#define _NETINET_IGMP_H_
-
-/*
- * Internet Group Management Protocol (IGMP) definitions.
- *
- * Written by Steve Deering, Stanford, May 1988.
- *
- * MULTICAST Revision: 3.5.1.2
- */
-
-/*
- * IGMP packet format.
- */
-struct igmp {
- u_char igmp_type; /* version & type of IGMP message */
- u_char igmp_code; /* subtype for routing msgs */
- u_short igmp_cksum; /* IP-style checksum */
- struct in_addr igmp_group; /* group address being reported */
-}; /* (zero for queries) */
-
-#define IGMP_MINLEN 8
-
-/*
- * Message types, including version number.
- */
-#define IGMP_MEMBERSHIP_QUERY 0x11 /* membership query */
-#define IGMP_V1_MEMBERSHIP_REPORT 0x12 /* Ver. 1 membership report */
-#define IGMP_V2_MEMBERSHIP_REPORT 0x16 /* Ver. 2 membership report */
-#define IGMP_V2_LEAVE_GROUP 0x17 /* Leave-group message */
-
-#define IGMP_DVMRP 0x13 /* DVMRP routing message */
-#define IGMP_PIM 0x14 /* PIM routing message */
-
-#define IGMP_MTRACE_RESP 0x1e /* traceroute resp.(to sender)*/
-#define IGMP_MTRACE 0x1f /* mcast traceroute messages */
-
-#define IGMP_MAX_HOST_REPORT_DELAY 10 /* max delay for response to */
- /* query (in seconds) according */
- /* to RFC1112 */
-
-
-#define IGMP_TIMER_SCALE 10 /* denotes that the igmp code field */
- /* specifies time in 10th of seconds*/
-
-/*
- * The following four defininitions are for backwards compatibility.
- * They should be removed as soon as all applications are updated to
- * use the new constant names.
- */
-#define IGMP_HOST_MEMBERSHIP_QUERY IGMP_MEMBERSHIP_QUERY
-#define IGMP_HOST_MEMBERSHIP_REPORT IGMP_V1_MEMBERSHIP_REPORT
-#define IGMP_HOST_NEW_MEMBERSHIP_REPORT IGMP_V2_MEMBERSHIP_REPORT
-#define IGMP_HOST_LEAVE_MESSAGE IGMP_V2_LEAVE_GROUP
-
-#endif /* _NETINET_IGMP_H_ */
diff --git a/cpukit/libnetworking/netinet/igmp_var.h b/cpukit/libnetworking/netinet/igmp_var.h
deleted file mode 100644
index f408bf2bc1..0000000000
--- a/cpukit/libnetworking/netinet/igmp_var.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright (c) 1988 Stephen Deering.
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Stephen Deering of Stanford University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)igmp_var.h 8.1 (Berkeley) 7/19/93
- * $Id$
- */
-
-#ifndef _NETINET_IGMP_VAR_H_
-#define _NETINET_IGMP_VAR_H_
-
-/*
- * Internet Group Management Protocol (IGMP),
- * implementation-specific definitions.
- *
- * Written by Steve Deering, Stanford, May 1988.
- *
- * MULTICAST Revision: 3.5.1.3
- */
-
-struct igmpstat {
- u_int igps_rcv_total; /* total IGMP messages received */
- u_int igps_rcv_tooshort; /* received with too few bytes */
- u_int igps_rcv_badsum; /* received with bad checksum */
- u_int igps_rcv_queries; /* received membership queries */
- u_int igps_rcv_badqueries; /* received invalid queries */
- u_int igps_rcv_reports; /* received membership reports */
- u_int igps_rcv_badreports; /* received invalid reports */
- u_int igps_rcv_ourreports; /* received reports for our groups */
- u_int igps_snd_reports; /* sent membership reports */
-};
-
-#ifdef KERNEL
-extern struct igmpstat igmpstat;
-
-#define IGMP_RANDOM_DELAY(X) (random() % (X) + 1)
-
-/*
- * States for IGMPv2's leave processing
- */
-#define IGMP_OTHERMEMBER 0
-#define IGMP_IREPORTEDLAST 1
-
-/*
- * We must remember what version the subnet's querier is.
- * We conveniently use the IGMP message type for the proper
- * membership report to keep this state.
- */
-#define IGMP_V1_ROUTER IGMP_V1_MEMBERSHIP_REPORT
-#define IGMP_V2_ROUTER IGMP_V2_MEMBERSHIP_REPORT
-
-/*
- * Revert to new router if we haven't heard from an old router in
- * this amount of time.
- */
-#define IGMP_AGE_THRESHOLD 540
-
-void igmp_init __P((void));
-void igmp_input __P((struct mbuf *, int));
-void igmp_joingroup __P((struct in_multi *));
-void igmp_leavegroup __P((struct in_multi *));
-void igmp_fasttimo __P((void));
-void igmp_slowtimo __P((void));
-#endif
-
-/*
- * Names for IGMP sysctl objects
- */
-#define IGMPCTL_STATS 1 /* statistics (read-only) */
-#define IGMPCTL_MAXID 2
-
-#define IGMPCTL_NAMES { \
- { 0, 0 }, \
- { "stats", CTLTYPE_STRUCT }, \
-}
-
-#endif
-
-
diff --git a/cpukit/libnetworking/netinet/in.c b/cpukit/libnetworking/netinet/in.c
deleted file mode 100644
index 701406f207..0000000000
--- a/cpukit/libnetworking/netinet/in.c
+++ /dev/null
@@ -1,728 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)in.c 8.4 (Berkeley) 1/9/95
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/systm.h>
-#include <sys/ioctl.h>
-#include <sys/errno.h>
-#include <sys/malloc.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/kernel.h>
-#include <sys/sysctl.h>
-
-#include <net/if.h>
-#include <net/route.h>
-
-#include <netinet/in_systm.h>
-#include <netinet/in.h>
-#include <netinet/in_var.h>
-#include <netinet/if_ether.h>
-
-#include <netinet/igmp_var.h>
-
-/*
- * This structure is used to keep track of in_multi chains which belong to
- * deleted interface addresses.
- */
-static LIST_HEAD(, multi_kludge) in_mk; /* XXX BSS initialization */
-
-struct multi_kludge {
- LIST_ENTRY(multi_kludge) mk_entry;
- struct ifnet *mk_ifp;
- struct in_multihead mk_head;
-};
-
-static void in_socktrim __P((struct sockaddr_in *));
-static int in_ifinit __P((struct ifnet *,
- struct in_ifaddr *, struct sockaddr_in *, int));
-static void in_ifscrub __P((struct ifnet *, struct in_ifaddr *));
-
-static int subnetsarelocal = 0;
-SYSCTL_INT(_net_inet_ip, OID_AUTO, subnets_are_local, CTLFLAG_RW,
- &subnetsarelocal, 0, "");
-/*
- * Return 1 if an internet address is for a ``local'' host
- * (one to which we have a connection). If subnetsarelocal
- * is true, this includes other subnets of the local net.
- * Otherwise, it includes only the directly-connected (sub)nets.
- */
-int
-in_localaddr(in)
- struct in_addr in;
-{
- register u_long i = ntohl(in.s_addr);
- register struct in_ifaddr *ia;
-
- if (subnetsarelocal) {
- for (ia = in_ifaddr; ia; ia = ia->ia_next)
- if ((i & ia->ia_netmask) == ia->ia_net)
- return (1);
- } else {
- for (ia = in_ifaddr; ia; ia = ia->ia_next)
- if ((i & ia->ia_subnetmask) == ia->ia_subnet)
- return (1);
- }
- return (0);
-}
-
-/*
- * Determine whether an IP address is in a reserved set of addresses
- * that may not be forwarded, or whether datagrams to that destination
- * may be forwarded.
- */
-int
-in_canforward(in)
- struct in_addr in;
-{
- register u_long i = ntohl(in.s_addr);
- register u_long net;
-
- if (IN_EXPERIMENTAL(i) || IN_MULTICAST(i))
- return (0);
- if (IN_CLASSA(i)) {
- net = i & IN_CLASSA_NET;
- if (net == 0 || net == (IN_LOOPBACKNET << IN_CLASSA_NSHIFT))
- return (0);
- }
- return (1);
-}
-
-/*
- * Trim a mask in a sockaddr
- */
-static void
-in_socktrim(ap)
-struct sockaddr_in *ap;
-{
- register char *cplim = (char *) &ap->sin_addr;
- register char *cp = (char *) (&ap->sin_addr + 1);
-
- ap->sin_len = 0;
- while (--cp >= cplim)
- if (*cp) {
- (ap)->sin_len = cp - (char *) (ap) + 1;
- break;
- }
-}
-
-static int in_interfaces; /* number of external internet interfaces */
-
-/*
- * Generic internet control operations (ioctl's).
- * Ifp is 0 if not an interface-specific ioctl.
- */
-/* ARGSUSED */
-int
-in_control(so, cmd, data, ifp)
- struct socket *so;
- u_long cmd;
- caddr_t data;
- register struct ifnet *ifp;
-{
- register struct ifreq *ifr = (struct ifreq *)data;
- register struct in_ifaddr *ia = 0, *iap;
- register struct ifaddr *ifa;
- struct in_ifaddr *oia;
- struct in_aliasreq *ifra = (struct in_aliasreq *)data;
- struct sockaddr_in oldaddr;
- int error, hostIsNew, maskIsNew, s;
- u_long i;
- struct multi_kludge *mk;
-
- /*
- * Find address for this interface, if it exists.
- *
- * If an alias address was specified, find that one instead of
- * the first one on the interface.
- */
- if (ifp)
- for (iap = in_ifaddr; iap; iap = iap->ia_next)
- if (iap->ia_ifp == ifp) {
- if (((struct sockaddr_in *)&ifr->ifr_addr)->sin_addr.s_addr ==
- iap->ia_addr.sin_addr.s_addr) {
- ia = iap;
- break;
- } else if (ia == NULL) {
- ia = iap;
- if (ifr->ifr_addr.sa_family != AF_INET)
- break;
- }
- }
-
- switch (cmd) {
-
- case SIOCAIFADDR:
- case SIOCDIFADDR:
- if (ifra->ifra_addr.sin_family == AF_INET) {
- for (oia = ia; ia; ia = ia->ia_next) {
- if (ia->ia_ifp == ifp &&
- ia->ia_addr.sin_addr.s_addr ==
- ifra->ifra_addr.sin_addr.s_addr)
- break;
- }
- if ((ifp->if_flags & IFF_POINTOPOINT)
- && (cmd == SIOCAIFADDR)
- && (ifra->ifra_dstaddr.sin_addr.s_addr
- == INADDR_ANY)) {
- return EDESTADDRREQ;
- }
- }
- if (cmd == SIOCDIFADDR && ia == 0)
- return (EADDRNOTAVAIL);
- /* FALLTHROUGH */
- case SIOCSIFADDR:
- case SIOCSIFNETMASK:
- case SIOCSIFDSTADDR:
- if ((so->so_state & SS_PRIV) == 0)
- return (EPERM);
-
- if (ifp == 0)
- panic("in_control");
- if (ia == (struct in_ifaddr *)0) {
- oia = (struct in_ifaddr *)
- malloc(sizeof *oia, M_IFADDR, M_WAITOK);
- if (oia == (struct in_ifaddr *)NULL)
- return (ENOBUFS);
- bzero((caddr_t)oia, sizeof *oia);
- ia = in_ifaddr;
- /*
- * Protect from ipintr() traversing address list
- * while we're modifying it.
- */
- s = splnet();
-
- if (ia) {
- for ( ; ia->ia_next; ia = ia->ia_next)
- continue;
- ia->ia_next = oia;
- } else
- in_ifaddr = oia;
- ia = oia;
- ifa = ifp->if_addrlist;
- if (ifa) {
- for ( ; ifa->ifa_next; ifa = ifa->ifa_next)
- continue;
- ifa->ifa_next = (struct ifaddr *) ia;
- } else
- ifp->if_addrlist = (struct ifaddr *) ia;
- ia->ia_ifa.ifa_addr = (struct sockaddr *)&ia->ia_addr;
- ia->ia_ifa.ifa_dstaddr
- = (struct sockaddr *)&ia->ia_dstaddr;
- ia->ia_ifa.ifa_netmask
- = (struct sockaddr *)&ia->ia_sockmask;
- ia->ia_sockmask.sin_len = 8;
- if (ifp->if_flags & IFF_BROADCAST) {
- ia->ia_broadaddr.sin_len = sizeof(ia->ia_addr);
- ia->ia_broadaddr.sin_family = AF_INET;
- }
- ia->ia_ifp = ifp;
- if (!(ifp->if_flags & IFF_LOOPBACK))
- in_interfaces++;
- splx(s);
- }
- break;
-
- case SIOCSIFBRDADDR:
- if ((so->so_state & SS_PRIV) == 0)
- return (EPERM);
- /* FALLTHROUGH */
-
- case SIOCGIFADDR:
- case SIOCGIFNETMASK:
- case SIOCGIFDSTADDR:
- case SIOCGIFBRDADDR:
- if (ia == (struct in_ifaddr *)0)
- return (EADDRNOTAVAIL);
- break;
- }
- switch (cmd) {
-
- case SIOCGIFADDR:
- *((struct sockaddr_in *)&ifr->ifr_addr) = ia->ia_addr;
- break;
-
- case SIOCGIFBRDADDR:
- if ((ifp->if_flags & IFF_BROADCAST) == 0)
- return (EINVAL);
- *((struct sockaddr_in *)&ifr->ifr_dstaddr) = ia->ia_broadaddr;
- break;
-
- case SIOCGIFDSTADDR:
- if ((ifp->if_flags & IFF_POINTOPOINT) == 0)
- return (EINVAL);
- *((struct sockaddr_in *)&ifr->ifr_dstaddr) = ia->ia_dstaddr;
- break;
-
- case SIOCGIFNETMASK:
- *((struct sockaddr_in *)&ifr->ifr_addr) = ia->ia_sockmask;
- break;
-
- case SIOCSIFDSTADDR:
- if ((ifp->if_flags & IFF_POINTOPOINT) == 0)
- return (EINVAL);
- oldaddr = ia->ia_dstaddr;
- ia->ia_dstaddr = *(struct sockaddr_in *)&ifr->ifr_dstaddr;
- if (ifp->if_ioctl && (error = (*ifp->if_ioctl)
- (ifp, SIOCSIFDSTADDR, (caddr_t)ia))) {
- ia->ia_dstaddr = oldaddr;
- return (error);
- }
- if (ia->ia_flags & IFA_ROUTE) {
- ia->ia_ifa.ifa_dstaddr = (struct sockaddr *)&oldaddr;
- rtinit(&(ia->ia_ifa), (int)RTM_DELETE, RTF_HOST);
- ia->ia_ifa.ifa_dstaddr =
- (struct sockaddr *)&ia->ia_dstaddr;
- rtinit(&(ia->ia_ifa), (int)RTM_ADD, RTF_HOST|RTF_UP);
- }
- break;
-
- case SIOCSIFBRDADDR:
- if ((ifp->if_flags & IFF_BROADCAST) == 0)
- return (EINVAL);
- ia->ia_broadaddr = *(struct sockaddr_in *)&ifr->ifr_broadaddr;
- break;
-
- case SIOCSIFADDR:
- return (in_ifinit(ifp, ia,
- (struct sockaddr_in *) &ifr->ifr_addr, 1));
-
- case SIOCSIFNETMASK:
- i = ifra->ifra_addr.sin_addr.s_addr;
- ia->ia_subnetmask = ntohl(ia->ia_sockmask.sin_addr.s_addr = i);
- break;
-
- case SIOCAIFADDR:
- maskIsNew = 0;
- hostIsNew = 1;
- error = 0;
- if (ia->ia_addr.sin_family == AF_INET) {
- if (ifra->ifra_addr.sin_len == 0) {
- ifra->ifra_addr = ia->ia_addr;
- hostIsNew = 0;
- } else if (ifra->ifra_addr.sin_addr.s_addr ==
- ia->ia_addr.sin_addr.s_addr)
- hostIsNew = 0;
- }
- if (ifra->ifra_mask.sin_len) {
- in_ifscrub(ifp, ia);
- ia->ia_sockmask = ifra->ifra_mask;
- ia->ia_subnetmask =
- ntohl(ia->ia_sockmask.sin_addr.s_addr);
- maskIsNew = 1;
- }
- if ((ifp->if_flags & IFF_POINTOPOINT) &&
- (ifra->ifra_dstaddr.sin_family == AF_INET)) {
- in_ifscrub(ifp, ia);
- ia->ia_dstaddr = ifra->ifra_dstaddr;
- maskIsNew = 1; /* We lie; but the effect's the same */
- }
- if (ifra->ifra_addr.sin_family == AF_INET &&
- (hostIsNew || maskIsNew))
- error = in_ifinit(ifp, ia, &ifra->ifra_addr, 0);
- if ((ifp->if_flags & IFF_BROADCAST) &&
- (ifra->ifra_broadaddr.sin_family == AF_INET))
- ia->ia_broadaddr = ifra->ifra_broadaddr;
- return (error);
-
- case SIOCDIFADDR:
- mk = malloc(sizeof *mk, M_IPMADDR, M_WAITOK);
- if (!mk)
- return ENOBUFS;
-
- in_ifscrub(ifp, ia);
- /*
- * Protect from ipintr() traversing address list
- * while we're modifying it.
- */
- s = splnet();
-
- if ((ifa = ifp->if_addrlist) == (struct ifaddr *)ia)
- ifp->if_addrlist = ifa->ifa_next;
- else {
- while (ifa->ifa_next &&
- (ifa->ifa_next != (struct ifaddr *)ia))
- ifa = ifa->ifa_next;
- if (ifa->ifa_next)
- ifa->ifa_next = ((struct ifaddr *)ia)->ifa_next;
- else
- printf("Couldn't unlink inifaddr from ifp\n");
- }
- oia = ia;
- if (oia == (ia = in_ifaddr))
- in_ifaddr = ia->ia_next;
- else {
- while (ia->ia_next && (ia->ia_next != oia))
- ia = ia->ia_next;
- if (ia->ia_next)
- ia->ia_next = oia->ia_next;
- else
- printf("Didn't unlink inifadr from list\n");
- }
-
- if (!oia->ia_multiaddrs.lh_first) {
- IFAFREE(&oia->ia_ifa);
- FREE(mk, M_IPMADDR);
- splx(s);
- break;
- }
-
- /*
- * Multicast address kludge:
- * If there were any multicast addresses attached to this
- * interface address, either move them to another address
- * on this interface, or save them until such time as this
- * interface is reconfigured for IP.
- */
- IFP_TO_IA(oia->ia_ifp, ia);
- if (ia) { /* there is another address */
- struct in_multi *inm;
- for(inm = oia->ia_multiaddrs.lh_first; inm;
- inm = inm->inm_entry.le_next) {
- IFAFREE(&inm->inm_ia->ia_ifa);
- ia->ia_ifa.ifa_refcnt++;
- inm->inm_ia = ia;
- LIST_INSERT_HEAD(&ia->ia_multiaddrs, inm,
- inm_entry);
- }
- FREE(mk, M_IPMADDR);
- } else { /* last address on this if deleted, save */
- struct in_multi *inm;
-
- LIST_INIT(&mk->mk_head);
- mk->mk_ifp = ifp;
-
- for(inm = oia->ia_multiaddrs.lh_first; inm;
- inm = inm->inm_entry.le_next) {
- LIST_INSERT_HEAD(&mk->mk_head, inm, inm_entry);
- }
-
- if (mk->mk_head.lh_first) {
- LIST_INSERT_HEAD(&in_mk, mk, mk_entry);
- } else {
- FREE(mk, M_IPMADDR);
- }
- }
-
- IFAFREE((&oia->ia_ifa));
- splx(s);
- break;
-
- default:
- if (ifp == 0 || ifp->if_ioctl == 0)
- return (EOPNOTSUPP);
- return ((*ifp->if_ioctl)(ifp, cmd, data));
- }
- return (0);
-}
-
-/*
- * Delete any existing route for an interface.
- */
-static void
-in_ifscrub(ifp, ia)
- register struct ifnet *ifp;
- register struct in_ifaddr *ia;
-{
-
- if ((ia->ia_flags & IFA_ROUTE) == 0)
- return;
- if (ifp->if_flags & (IFF_LOOPBACK|IFF_POINTOPOINT))
- rtinit(&(ia->ia_ifa), (int)RTM_DELETE, RTF_HOST);
- else
- rtinit(&(ia->ia_ifa), (int)RTM_DELETE, 0);
- ia->ia_flags &= ~IFA_ROUTE;
-}
-
-/*
- * Initialize an interface's internet address
- * and routing table entry.
- */
-static int
-in_ifinit(ifp, ia, sin, scrub)
- register struct ifnet *ifp;
- register struct in_ifaddr *ia;
- struct sockaddr_in *sin;
- int scrub;
-{
- register u_long i = ntohl(sin->sin_addr.s_addr);
- struct sockaddr_in oldaddr;
- int s = splimp(), flags = RTF_UP, error;
- struct multi_kludge *mk;
-
- oldaddr = ia->ia_addr;
- ia->ia_addr = *sin;
- /*
- * Give the interface a chance to initialize
- * if this is its first address,
- * and to validate the address if necessary.
- */
- if (ifp->if_ioctl &&
- (error = (*ifp->if_ioctl)(ifp, SIOCSIFADDR, (caddr_t)ia))) {
- splx(s);
- ia->ia_addr = oldaddr;
- return (error);
- }
- splx(s);
- if (scrub) {
- ia->ia_ifa.ifa_addr = (struct sockaddr *)&oldaddr;
- in_ifscrub(ifp, ia);
- ia->ia_ifa.ifa_addr = (struct sockaddr *)&ia->ia_addr;
- }
- if (IN_CLASSA(i))
- ia->ia_netmask = IN_CLASSA_NET;
- else if (IN_CLASSB(i))
- ia->ia_netmask = IN_CLASSB_NET;
- else
- ia->ia_netmask = IN_CLASSC_NET;
- /*
- * The subnet mask usually includes at least the standard network part,
- * but may may be smaller in the case of supernetting.
- * If it is set, we believe it.
- */
- if (ia->ia_subnetmask == 0) {
- ia->ia_subnetmask = ia->ia_netmask;
- ia->ia_sockmask.sin_addr.s_addr = htonl(ia->ia_subnetmask);
- } else
- ia->ia_netmask &= ia->ia_subnetmask;
- ia->ia_net = i & ia->ia_netmask;
- ia->ia_subnet = i & ia->ia_subnetmask;
- in_socktrim(&ia->ia_sockmask);
- /*
- * Add route for the network.
- */
- ia->ia_ifa.ifa_metric = ifp->if_metric;
- if (ifp->if_flags & IFF_BROADCAST) {
- ia->ia_broadaddr.sin_addr.s_addr =
- htonl(ia->ia_subnet | ~ia->ia_subnetmask);
- ia->ia_netbroadcast.s_addr =
- htonl(ia->ia_net | ~ ia->ia_netmask);
- } else if (ifp->if_flags & IFF_LOOPBACK) {
- ia->ia_ifa.ifa_dstaddr = ia->ia_ifa.ifa_addr;
- flags |= RTF_HOST;
- } else if (ifp->if_flags & IFF_POINTOPOINT) {
- if (ia->ia_dstaddr.sin_family != AF_INET)
- return (0);
- flags |= RTF_HOST;
- }
- if ((error = rtinit(&(ia->ia_ifa), (int)RTM_ADD, flags)) == 0)
- ia->ia_flags |= IFA_ROUTE;
-
- LIST_INIT(&ia->ia_multiaddrs);
- /*
- * If the interface supports multicast, join the "all hosts"
- * multicast group on that interface.
- */
- if (ifp->if_flags & IFF_MULTICAST) {
- struct in_addr addr;
-
- /*
- * Continuation of multicast address hack:
- * If there was a multicast group list previously saved
- * for this interface, then we re-attach it to the first
- * address configured on the i/f.
- */
- for(mk = in_mk.lh_first; mk; mk = mk->mk_entry.le_next) {
- if(mk->mk_ifp == ifp) {
- struct in_multi *inm;
-
- for(inm = mk->mk_head.lh_first; inm;
- inm = inm->inm_entry.le_next) {
- IFAFREE(&inm->inm_ia->ia_ifa);
- ia->ia_ifa.ifa_refcnt++;
- inm->inm_ia = ia;
- LIST_INSERT_HEAD(&ia->ia_multiaddrs,
- inm, inm_entry);
- }
- LIST_REMOVE(mk, mk_entry);
- free(mk, M_IPMADDR);
- break;
- }
- }
-
- addr.s_addr = htonl(INADDR_ALLHOSTS_GROUP);
- in_addmulti(&addr, ifp);
- }
- return (error);
-}
-
-
-/*
- * Return 1 if the address might be a local broadcast address.
- */
-int
-in_broadcast(in, ifp)
- struct in_addr in;
- struct ifnet *ifp;
-{
- register struct ifaddr *ifa;
- u_long t;
-
- if (in.s_addr == INADDR_BROADCAST ||
- in.s_addr == INADDR_ANY)
- return 1;
- if ((ifp->if_flags & IFF_BROADCAST) == 0)
- return 0;
- t = ntohl(in.s_addr);
- /*
- * Look through the list of addresses for a match
- * with a broadcast address.
- */
-#define ia ((struct in_ifaddr *)ifa)
- for (ifa = ifp->if_addrlist; ifa; ifa = ifa->ifa_next)
- if (ifa->ifa_addr->sa_family == AF_INET &&
- (in.s_addr == ia->ia_broadaddr.sin_addr.s_addr ||
- in.s_addr == ia->ia_netbroadcast.s_addr ||
- /*
- * Check for old-style (host 0) broadcast.
- */
- t == ia->ia_subnet || t == ia->ia_net) &&
- /*
- * Check for an all one subnetmask. These
- * only exist when an interface gets a secondary
- * address.
- */
- ia->ia_subnetmask != (u_long)0xffffffff)
- return 1;
- return (0);
-#undef ia
-}
-/*
- * Add an address to the list of IP multicast addresses for a given interface.
- */
-struct in_multi *
-in_addmulti(ap, ifp)
- register struct in_addr *ap;
- register struct ifnet *ifp;
-{
- register struct in_multi *inm;
- struct ifreq ifr;
- struct in_ifaddr *ia;
- int s = splnet();
-
- /*
- * See if address already in list.
- */
- IN_LOOKUP_MULTI(*ap, ifp, inm);
- if (inm != NULL) {
- /*
- * Found it; just increment the reference count.
- */
- ++inm->inm_refcount;
- }
- else {
- /*
- * New address; allocate a new multicast record
- * and link it into the interface's multicast list.
- */
- inm = (struct in_multi *)malloc(sizeof(*inm),
- M_IPMADDR, M_NOWAIT);
- if (inm == NULL) {
- splx(s);
- return (NULL);
- }
- inm->inm_addr = *ap;
- inm->inm_ifp = ifp;
- inm->inm_refcount = 1;
- IFP_TO_IA(ifp, ia);
- if (ia == NULL) {
- free(inm, M_IPMADDR);
- splx(s);
- return (NULL);
- }
- inm->inm_ia = ia;
- ia->ia_ifa.ifa_refcnt++; /* gain a reference */
- LIST_INSERT_HEAD(&ia->ia_multiaddrs, inm, inm_entry);
-
- /*
- * Ask the network driver to update its multicast reception
- * filter appropriately for the new address.
- */
- ((struct sockaddr_in *)&ifr.ifr_addr)->sin_family = AF_INET;
- ((struct sockaddr_in *)&ifr.ifr_addr)->sin_addr = *ap;
- if ((ifp->if_ioctl == NULL) ||
- (*ifp->if_ioctl)(ifp, SIOCADDMULTI,(caddr_t)&ifr) != 0) {
- LIST_REMOVE(inm, inm_entry);
- IFAFREE(&ia->ia_ifa); /* release reference */
- free(inm, M_IPMADDR);
- splx(s);
- return (NULL);
- }
- /*
- * Let IGMP know that we have joined a new IP multicast group.
- */
- igmp_joingroup(inm);
- }
- splx(s);
- return (inm);
-}
-
-/*
- * Delete a multicast address record.
- */
-void
-in_delmulti(inm)
- register struct in_multi *inm;
-{
- struct ifreq ifr;
- int s = splnet();
-
- if (--inm->inm_refcount == 0) {
- /*
- * No remaining claims to this record; let IGMP know that
- * we are leaving the multicast group.
- */
- igmp_leavegroup(inm);
- /*
- * Unlink from list.
- */
- LIST_REMOVE(inm, inm_entry);
- IFAFREE(&inm->inm_ia->ia_ifa); /* release reference */
-
- /*
- * Notify the network driver to update its multicast reception
- * filter.
- */
- ((struct sockaddr_in *)&(ifr.ifr_addr))->sin_family = AF_INET;
- ((struct sockaddr_in *)&(ifr.ifr_addr))->sin_addr =
- inm->inm_addr;
- (*inm->inm_ifp->if_ioctl)(inm->inm_ifp, SIOCDELMULTI,
- (caddr_t)&ifr);
- free(inm, M_IPMADDR);
- }
- splx(s);
-}
diff --git a/cpukit/libnetworking/netinet/in.h b/cpukit/libnetworking/netinet/in.h
deleted file mode 100644
index ba3cbb21cc..0000000000
--- a/cpukit/libnetworking/netinet/in.h
+++ /dev/null
@@ -1,433 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)in.h 8.3 (Berkeley) 1/3/94
- * $Id$
- */
-
-#ifndef _NETINET_IN_H_
-#define _NETINET_IN_H_
-
-/*
- * Constants and structures defined by the internet system,
- * Per RFC 790, September 1981, and numerous additions.
- */
-
-/*
- * Protocols (RFC 1700)
- */
-#define IPPROTO_IP 0 /* dummy for IP */
-#define IPPROTO_ICMP 1 /* control message protocol */
-#define IPPROTO_IGMP 2 /* group mgmt protocol */
-#define IPPROTO_GGP 3 /* gateway^2 (deprecated) */
-#define IPPROTO_IPIP 4 /* IP encapsulation in IP */
-#define IPPROTO_TCP 6 /* tcp */
-#define IPPROTO_ST 7 /* Stream protocol II */
-#define IPPROTO_EGP 8 /* exterior gateway protocol */
-#define IPPROTO_PIGP 9 /* private interior gateway */
-#define IPPROTO_RCCMON 10 /* BBN RCC Monitoring */
-#define IPPROTO_NVPII 11 /* network voice protocol*/
-#define IPPROTO_PUP 12 /* pup */
-#define IPPROTO_ARGUS 13 /* Argus */
-#define IPPROTO_EMCON 14 /* EMCON */
-#define IPPROTO_XNET 15 /* Cross Net Debugger */
-#define IPPROTO_CHAOS 16 /* Chaos*/
-#define IPPROTO_UDP 17 /* user datagram protocol */
-#define IPPROTO_MUX 18 /* Multiplexing */
-#define IPPROTO_MEAS 19 /* DCN Measurement Subsystems */
-#define IPPROTO_HMP 20 /* Host Monitoring */
-#define IPPROTO_PRM 21 /* Packet Radio Measurement */
-#define IPPROTO_IDP 22 /* xns idp */
-#define IPPROTO_TRUNK1 23 /* Trunk-1 */
-#define IPPROTO_TRUNK2 24 /* Trunk-2 */
-#define IPPROTO_LEAF1 25 /* Leaf-1 */
-#define IPPROTO_LEAF2 26 /* Leaf-2 */
-#define IPPROTO_RDP 27 /* Reliable Data */
-#define IPPROTO_IRTP 28 /* Reliable Transaction */
-#define IPPROTO_TP 29 /* tp-4 w/ class negotiation */
-#define IPPROTO_BLT 30 /* Bulk Data Transfer */
-#define IPPROTO_NSP 31 /* Network Services */
-#define IPPROTO_INP 32 /* Merit Internodal */
-#define IPPROTO_SEP 33 /* Sequential Exchange */
-#define IPPROTO_3PC 34 /* Third Party Connect */
-#define IPPROTO_IDPR 35 /* InterDomain Policy Routing */
-#define IPPROTO_XTP 36 /* XTP */
-#define IPPROTO_DDP 37 /* Datagram Delivery */
-#define IPPROTO_CMTP 38 /* Control Message Transport */
-#define IPPROTO_TPXX 39 /* TP++ Transport */
-#define IPPROTO_IL 40 /* IL transport protocol */
-#define IPPROTO_SIP 41 /* Simple Internet Protocol */
-#define IPPROTO_SDRP 42 /* Source Demand Routing */
-#define IPPROTO_SIPSR 43 /* SIP Source Route */
-#define IPPROTO_SIPFRAG 44 /* SIP Fragment */
-#define IPPROTO_IDRP 45 /* InterDomain Routing*/
-#define IPPROTO_RSVP 46 /* resource reservation */
-#define IPPROTO_GRE 47 /* General Routing Encap. */
-#define IPPROTO_MHRP 48 /* Mobile Host Routing */
-#define IPPROTO_BHA 49 /* BHA */
-#define IPPROTO_ESP 50 /* SIPP Encap Sec. Payload */
-#define IPPROTO_AH 51 /* SIPP Auth Header */
-#define IPPROTO_INLSP 52 /* Integ. Net Layer Security */
-#define IPPROTO_SWIPE 53 /* IP with encryption */
-#define IPPROTO_NHRP 54 /* Next Hop Resolution */
-/* 55-60: Unassigned */
-#define IPPROTO_AHIP 61 /* any host internal protocol */
-#define IPPROTO_CFTP 62 /* CFTP */
-#define IPPROTO_HELLO 63 /* "hello" routing protocol */
-#define IPPROTO_SATEXPAK 64 /* SATNET/Backroom EXPAK */
-#define IPPROTO_KRYPTOLAN 65 /* Kryptolan */
-#define IPPROTO_RVD 66 /* Remote Virtual Disk */
-#define IPPROTO_IPPC 67 /* Pluribus Packet Core */
-#define IPPROTO_ADFS 68 /* Any distributed FS */
-#define IPPROTO_SATMON 69 /* Satnet Monitoring */
-#define IPPROTO_VISA 70 /* VISA Protocol */
-#define IPPROTO_IPCV 71 /* Packet Core Utility */
-#define IPPROTO_CPNX 72 /* Comp. Prot. Net. Executive */
-#define IPPROTO_CPHB 73 /* Comp. Prot. HeartBeat */
-#define IPPROTO_WSN 74 /* Wang Span Network */
-#define IPPROTO_PVP 75 /* Packet Video Protocol */
-#define IPPROTO_BRSATMON 76 /* BackRoom SATNET Monitoring */
-#define IPPROTO_ND 77 /* Sun net disk proto (temp.) */
-#define IPPROTO_WBMON 78 /* WIDEBAND Monitoring */
-#define IPPROTO_WBEXPAK 79 /* WIDEBAND EXPAK */
-#define IPPROTO_EON 80 /* ISO cnlp */
-#define IPPROTO_VMTP 81 /* VMTP */
-#define IPPROTO_SVMTP 82 /* Secure VMTP */
-#define IPPROTO_VINES 83 /* Banyon VINES */
-#define IPPROTO_TTP 84 /* TTP */
-#define IPPROTO_IGP 85 /* NSFNET-IGP */
-#define IPPROTO_DGP 86 /* dissimilar gateway prot. */
-#define IPPROTO_TCF 87 /* TCF */
-#define IPPROTO_IGRP 88 /* Cisco/GXS IGRP */
-#define IPPROTO_OSPFIGP 89 /* OSPFIGP */
-#define IPPROTO_SRPC 90 /* Strite RPC protocol */
-#define IPPROTO_LARP 91 /* Locus Address Resoloution */
-#define IPPROTO_MTP 92 /* Multicast Transport */
-#define IPPROTO_AX25 93 /* AX.25 Frames */
-#define IPPROTO_IPEIP 94 /* IP encapsulated in IP */
-#define IPPROTO_MICP 95 /* Mobile Int.ing control */
-#define IPPROTO_SCCSP 96 /* Semaphore Comm. security */
-#define IPPROTO_ETHERIP 97 /* Ethernet IP encapsulation */
-#define IPPROTO_ENCAP 98 /* encapsulation header */
-#define IPPROTO_APES 99 /* any private encr. scheme */
-#define IPPROTO_GMTP 100 /* GMTP*/
-/* 101-254: Unassigned */
-/* 255: Reserved */
-/* BSD Private, local use, namespace incursion */
-#define IPPROTO_DIVERT 254 /* divert pseudo-protocol */
-#define IPPROTO_RAW 255 /* raw IP packet */
-#define IPPROTO_MAX 256
-
-
-/*
- * Local port number conventions:
- *
- * When a user does a bind(2) or connect(2) with a port number of zero,
- * a non-conflicting local port address is chosen.
- * The default range is IPPORT_RESERVED through
- * IPPORT_USERRESERVED, although that is settable by sysctl.
- *
- * A user may set the IPPROTO_IP option IP_PORTRANGE to change this
- * default assignment range.
- *
- * The value IP_PORTRANGE_DEFAULT causes the default behavior.
- *
- * The value IP_PORTRANGE_HIGH changes the range of candidate port numbers
- * into the "high" range. These are reserved for client outbound connections
- * which do not want to be filtered by any firewalls.
- *
- * The value IP_PORTRANGE_LOW changes the range to the "low" are
- * that is (by convention) restricted to privileged processes. This
- * convention is based on "vouchsafe" principles only. It is only secure
- * if you trust the remote host to restrict these ports.
- *
- * The default range of ports and the high range can be changed by
- * sysctl(3). (net.inet.ip.port{hi,low}{first,last}_auto)
- *
- * Changing those values has bad security implications if you are
- * using a a stateless firewall that is allowing packets outside of that
- * range in order to allow transparent outgoing connections.
- *
- * Such a firewall configuration will generally depend on the use of these
- * default values. If you change them, you may find your Security
- * Administrator looking for you with a heavy object.
- */
-
-/*
- * Ports < IPPORT_RESERVED are reserved for
- * privileged processes (e.g. root). (IP_PORTRANGE_LOW)
- * Ports > IPPORT_USERRESERVED are reserved
- * for servers, not necessarily privileged. (IP_PORTRANGE_DEFAULT)
- */
-#define IPPORT_RESERVED 1024
-#define IPPORT_USERRESERVED 5000
-
-/*
- * Default local port range to use by setting IP_PORTRANGE_HIGH
- */
-#define IPPORT_HIFIRSTAUTO 40000
-#define IPPORT_HILASTAUTO 44999
-
-/*
- * Scanning for a free reserved port return a value below IPPORT_RESERVED,
- * but higher than IPPORT_RESERVEDSTART. Traditionally the start value was
- * 512, but that conflicts with some well-known-services that firewalls may
- * have a fit if we use.
- */
-#define IPPORT_RESERVEDSTART 600
-
-/*
- * Internet address (a structure for historical reasons)
- */
-struct in_addr {
- u_long s_addr;
-};
-
-/*
- * Definitions of bits in internet address integers.
- * On subnets, the decomposition of addresses to host and net parts
- * is done according to subnet mask, not the masks here.
- */
-#define IN_CLASSA(i) (((long)(i) & 0x80000000) == 0)
-#define IN_CLASSA_NET 0xff000000
-#define IN_CLASSA_NSHIFT 24
-#define IN_CLASSA_HOST 0x00ffffff
-#define IN_CLASSA_MAX 128
-
-#define IN_CLASSB(i) (((long)(i) & 0xc0000000) == 0x80000000)
-#define IN_CLASSB_NET 0xffff0000
-#define IN_CLASSB_NSHIFT 16
-#define IN_CLASSB_HOST 0x0000ffff
-#define IN_CLASSB_MAX 65536
-
-#define IN_CLASSC(i) (((long)(i) & 0xe0000000) == 0xc0000000)
-#define IN_CLASSC_NET 0xffffff00
-#define IN_CLASSC_NSHIFT 8
-#define IN_CLASSC_HOST 0x000000ff
-
-#define IN_CLASSD(i) (((long)(i) & 0xf0000000) == 0xe0000000)
-#define IN_CLASSD_NET 0xf0000000 /* These ones aren't really */
-#define IN_CLASSD_NSHIFT 28 /* net and host fields, but */
-#define IN_CLASSD_HOST 0x0fffffff /* routing needn't know. */
-#define IN_MULTICAST(i) IN_CLASSD(i)
-
-#define IN_EXPERIMENTAL(i) (((long)(i) & 0xf0000000) == 0xf0000000)
-#define IN_BADCLASS(i) (((long)(i) & 0xf0000000) == 0xf0000000)
-
-#define INADDR_ANY (u_long)0x00000000
-#define INADDR_BROADCAST (u_long)0xffffffff /* must be masked */
-#ifndef KERNEL
-#define INADDR_NONE 0xffffffff /* -1 return */
-#endif
-
-#define INADDR_UNSPEC_GROUP (u_long)0xe0000000 /* 224.0.0.0 */
-#define INADDR_ALLHOSTS_GROUP (u_long)0xe0000001 /* 224.0.0.1 */
-#define INADDR_ALLRTRS_GROUP (u_long)0xe0000002 /* 224.0.0.2 */
-#define INADDR_MAX_LOCAL_GROUP (u_long)0xe00000ff /* 224.0.0.255 */
-
-#define IN_LOOPBACKNET 127 /* official! */
-
-/*
- * Socket address, internet style.
- */
-struct sockaddr_in {
- u_char sin_len;
- u_char sin_family;
- u_short sin_port;
- struct in_addr sin_addr;
- char sin_zero[8];
-};
-
-/*
- * Structure used to describe IP options.
- * Used to store options internally, to pass them to a process,
- * or to restore options retrieved earlier.
- * The ip_dst is used for the first-hop gateway when using a source route
- * (this gets put into the header proper).
- */
-struct ip_opts {
- struct in_addr ip_dst; /* first hop, 0 w/o src rt */
- char ip_opts[40]; /* actually variable in size */
-};
-
-/*
- * Options for use with [gs]etsockopt at the IP level.
- * First word of comment is data type; bool is stored in int.
- */
-#define IP_OPTIONS 1 /* buf/ip_opts; set/get IP options */
-#define IP_HDRINCL 2 /* int; header is included with data */
-#define IP_TOS 3 /* int; IP type of service and preced. */
-#define IP_TTL 4 /* int; IP time to live */
-#define IP_RECVOPTS 5 /* bool; receive all IP opts w/dgram */
-#define IP_RECVRETOPTS 6 /* bool; receive IP opts for response */
-#define IP_RECVDSTADDR 7 /* bool; receive IP dst addr w/dgram */
-#define IP_RETOPTS 8 /* ip_opts; set/get IP options */
-#define IP_MULTICAST_IF 9 /* u_char; set/get IP multicast i/f */
-#define IP_MULTICAST_TTL 10 /* u_char; set/get IP multicast ttl */
-#define IP_MULTICAST_LOOP 11 /* u_char; set/get IP multicast loopback */
-#define IP_ADD_MEMBERSHIP 12 /* ip_mreq; add an IP group membership */
-#define IP_DROP_MEMBERSHIP 13 /* ip_mreq; drop an IP group membership */
-#define IP_MULTICAST_VIF 14 /* set/get IP mcast virt. iface */
-#define IP_RSVP_ON 15 /* enable RSVP in kernel */
-#define IP_RSVP_OFF 16 /* disable RSVP in kernel */
-#define IP_RSVP_VIF_ON 17 /* set RSVP per-vif socket */
-#define IP_RSVP_VIF_OFF 18 /* unset RSVP per-vif socket */
-#define IP_PORTRANGE 19 /* int; range to choose for unspec port */
-#define IP_RECVIF 20 /* bool; receive reception if w/dgram */
-
-#define IP_FW_ADD 50 /* add a firewall rule to chain */
-#define IP_FW_DEL 51 /* delete a firewall rule from chain */
-#define IP_FW_FLUSH 52 /* flush firewall rule chain */
-#define IP_FW_ZERO 53 /* clear single/all firewall counter(s) */
-#define IP_FW_GET 54 /* get entire firewall rule chain */
-#define IP_NAT 55 /* set/get NAT opts */
-
-/*
- * Defaults and limits for options
- */
-#define IP_DEFAULT_MULTICAST_TTL 1 /* normally limit m'casts to 1 hop */
-#define IP_DEFAULT_MULTICAST_LOOP 1 /* normally hear sends if a member */
-#define IP_MAX_MEMBERSHIPS 20 /* per socket */
-
-/*
- * Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP.
- */
-struct ip_mreq {
- struct in_addr imr_multiaddr; /* IP multicast address of group */
- struct in_addr imr_interface; /* local IP address of interface */
-};
-
-/*
- * Argument for IP_PORTRANGE:
- * - which range to search when port is unspecified at bind() or connect()
- */
-#define IP_PORTRANGE_DEFAULT 0 /* default range */
-#define IP_PORTRANGE_HIGH 1 /* "high" - request firewall bypass */
-#define IP_PORTRANGE_LOW 2 /* "low" - vouchsafe security */
-
-/*
- * Definitions for inet sysctl operations.
- *
- * Third level is protocol number.
- * Fourth level is desired variable within that protocol.
- */
-#define IPPROTO_MAXID (IPPROTO_IDP + 1) /* don't list to IPPROTO_MAX */
-
-#define CTL_IPPROTO_NAMES { \
- { "ip", CTLTYPE_NODE }, \
- { "icmp", CTLTYPE_NODE }, \
- { "igmp", CTLTYPE_NODE }, \
- { "ggp", CTLTYPE_NODE }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { "tcp", CTLTYPE_NODE }, \
- { 0, 0 }, \
- { "egp", CTLTYPE_NODE }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { "pup", CTLTYPE_NODE }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { "udp", CTLTYPE_NODE }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { "idp", CTLTYPE_NODE }, \
-}
-
-/*
- * Names for IP sysctl objects
- */
-#define IPCTL_FORWARDING 1 /* act as router */
-#define IPCTL_SENDREDIRECTS 2 /* may send redirects when forwarding */
-#define IPCTL_DEFTTL 3 /* default TTL */
-#ifdef notyet
-#define IPCTL_DEFMTU 4 /* default MTU */
-#endif
-#define IPCTL_RTEXPIRE 5 /* cloned route expiration time */
-#define IPCTL_RTMINEXPIRE 6 /* min value for expiration time */
-#define IPCTL_RTMAXCACHE 7 /* trigger level for dynamic expire */
-#define IPCTL_SOURCEROUTE 8 /* may perform source routes */
-#define IPCTL_DIRECTEDBROADCAST 9 /* may re-broadcast received packets */
-#define IPCTL_INTRQMAXLEN 10 /* max length of netisr queue */
-#define IPCTL_INTRQDROPS 11 /* number of netisr q drops */
-#define IPCTL_ACCEPTSOURCEROUTE 13 /* may accept source routed packets */
-#define IPCTL_MAXID 13
-
-#define IPCTL_NAMES { \
- { 0, 0 }, \
- { "forwarding", CTLTYPE_INT }, \
- { "redirect", CTLTYPE_INT }, \
- { "ttl", CTLTYPE_INT }, \
- { "mtu", CTLTYPE_INT }, \
- { "rtexpire", CTLTYPE_INT }, \
- { "rtminexpire", CTLTYPE_INT }, \
- { "rtmaxcache", CTLTYPE_INT }, \
- { "sourceroute", CTLTYPE_INT }, \
- { "directed-broadcast", CTLTYPE_INT }, \
- { "intr-queue-maxlen", CTLTYPE_INT }, \
- { "intr-queue-drops", CTLTYPE_INT }, \
- { "accept_sourceroute", CTLTYPE_INT }, \
-}
-
-
-#ifdef KERNEL
-struct ifnet; struct mbuf; /* forward declarations for Standard C */
-
-int in_broadcast __P((struct in_addr, struct ifnet *));
-int in_canforward __P((struct in_addr));
-int in_cksum __P((struct mbuf *, int));
-int in_localaddr __P((struct in_addr));
-char *inet_ntoa __P((struct in_addr)); /* in libkern */
-
-/* Firewall hooks */
-struct ip;
-typedef int ip_fw_chk_t __P((struct ip**, int, struct ifnet*, int, struct mbuf**));
-typedef int ip_fw_ctl_t __P((int, struct mbuf**));
-extern ip_fw_chk_t *ip_fw_chk_ptr;
-extern ip_fw_ctl_t *ip_fw_ctl_ptr;
-
-/* IP NAT hooks */
-typedef int ip_nat_t __P((struct ip**, struct mbuf**, struct ifnet*, int));
-typedef int ip_nat_ctl_t __P((int, struct mbuf**));
-extern ip_nat_t *ip_nat_ptr;
-extern ip_nat_ctl_t *ip_nat_ctl_ptr;
-#define IP_NAT_IN 0x00000001
-#define IP_NAT_OUT 0x00000002
-
-#endif /* KERNEL */
-
-#endif
diff --git a/cpukit/libnetworking/netinet/in_cksum.c b/cpukit/libnetworking/netinet/in_cksum.c
deleted file mode 100644
index c7792e0e87..0000000000
--- a/cpukit/libnetworking/netinet/in_cksum.c
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * Copyright (c) 1988, 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)in_cksum.c 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/mbuf.h>
-
-/*
- * Try to use a CPU specific version, then punt to the portable C one.
- */
-
-#if (defined(__GNUC__) && (defined(__mc68000__) || defined(__m68k__)))
-
-#include "in_cksum_m68k.c"
-
-#elif (defined(__GNUC__) && defined(__i386__))
-
-#include "in_cksum_i386.c"
-
-#elif (defined(__GNUC__) && defined(__PPC__))
-
-#include "in_cksum_powerpc.c"
-
-#else
-
-/*
- * Checksum routine for Internet Protocol family headers (Portable Version).
- *
- * This routine is very heavily used in the network
- * code and should be modified for each CPU to be as fast as possible.
- */
-
-#define ADDCARRY(x) (x > 65535 ? x -= 65535 : x)
-#define REDUCE \
- {l_util.l = sum; sum = l_util.s[0] + l_util.s[1]; ADDCARRY(sum);}
-
-int
-in_cksum(m, len)
- register struct mbuf *m;
- register int len;
-{
- register u_short *w;
- register int sum = 0;
- register int mlen = 0;
- int byte_swapped = 0;
-
- union {
- char c[2];
- u_short s;
- } s_util;
- union {
- u_short s[2];
- long l;
- } l_util;
-
- for (;m && len; m = m->m_next) {
- if (m->m_len == 0)
- continue;
- w = mtod(m, u_short *);
- if (mlen == -1) {
- /*
- * The first byte of this mbuf is the continuation
- * of a word spanning between this mbuf and the
- * last mbuf.
- *
- * s_util.c[0] is already saved when scanning previous
- * mbuf.
- */
- s_util.c[1] = *(char *)w;
- sum += s_util.s;
- w = (u_short *)((char *)w + 1);
- mlen = m->m_len - 1;
- len--;
- } else
- mlen = m->m_len;
- if (len < mlen)
- mlen = len;
- len -= mlen;
- /*
- * Force to even boundary.
- */
- if ((1 & (int) w) && (mlen > 0)) {
- REDUCE;
- sum <<= 8;
- s_util.c[0] = *(u_char *)w;
- w = (u_short *)((char *)w + 1);
- mlen--;
- byte_swapped = 1;
- }
- /*
- * Unroll the loop to make overhead from
- * branches &c small.
- */
- while ((mlen -= 32) >= 0) {
- sum += w[0]; sum += w[1]; sum += w[2]; sum += w[3];
- sum += w[4]; sum += w[5]; sum += w[6]; sum += w[7];
- sum += w[8]; sum += w[9]; sum += w[10]; sum += w[11];
- sum += w[12]; sum += w[13]; sum += w[14]; sum += w[15];
- w += 16;
- }
- mlen += 32;
- while ((mlen -= 8) >= 0) {
- sum += w[0]; sum += w[1]; sum += w[2]; sum += w[3];
- w += 4;
- }
- mlen += 8;
- if (mlen == 0 && byte_swapped == 0)
- continue;
- REDUCE;
- while ((mlen -= 2) >= 0) {
- sum += *w++;
- }
- if (byte_swapped) {
- REDUCE;
- sum <<= 8;
- byte_swapped = 0;
- if (mlen == -1) {
- s_util.c[1] = *(char *)w;
- sum += s_util.s;
- mlen = 0;
- } else
- mlen = -1;
- } else if (mlen == -1)
- s_util.c[0] = *(char *)w;
- }
- if (len)
- puts("cksum: out of data");
- if (mlen == -1) {
- /* The last mbuf has odd # of bytes. Follow the
- standard (the odd byte may be shifted left by 8 bits
- or not as determined by endian-ness of the machine) */
- s_util.c[1] = 0;
- sum += s_util.s;
- }
- REDUCE;
- return (~sum & 0xffff);
-}
-#endif
diff --git a/cpukit/libnetworking/netinet/in_cksum_i386.c b/cpukit/libnetworking/netinet/in_cksum_i386.c
deleted file mode 100644
index 0612c5a7c4..0000000000
--- a/cpukit/libnetworking/netinet/in_cksum_i386.c
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- * Checksum routine for Internet Protocol family headers.
- *
- * This routine is very heavily used in the network
- * code and should be modified for each CPU to be as fast as possible.
- *
- * This implementation is 386 version.
- *
- * $Id$
- */
-
-#include <stdio.h> /* for puts */
-
-#undef ADDCARRY
-#define ADDCARRY(x) if ((x) > 0xffff) (x) -= 0xffff
-#define REDUCE {sum = (sum & 0xffff) + (sum >> 16); ADDCARRY(sum);}
-
-/*
- * Thanks to gcc we don't have to guess
- * which registers contain sum & w.
- */
-#define ADD(n) asm("addl " #n "(%2), %0" : "=r" (sum) : "0" (sum), "r" (w))
-#define ADDC(n) asm("adcl " #n "(%2), %0" : "=r" (sum) : "0" (sum), "r" (w))
-#define LOAD(n) asm volatile("movb " #n "(%1), %0" : "=r" (junk) : "r" (w))
-#define MOP asm("adcl $0, %0" : "=r" (sum) : "0" (sum))
-
-int
-in_cksum(m, len)
- register struct mbuf *m;
- register int len;
-{
- register u_short *w;
- register unsigned sum = 0;
- register int mlen = 0;
- int byte_swapped = 0;
- union { char c[2]; u_short s; } su;
-
- for (;m && len; m = m->m_next) {
- if (m->m_len == 0)
- continue;
- w = mtod(m, u_short *);
- if (mlen == -1) {
- /*
- * The first byte of this mbuf is the continuation
- * of a word spanning between this mbuf and the
- * last mbuf.
- */
-
- /* su.c[0] is already saved when scanning previous
- * mbuf. sum was REDUCEd when we found mlen == -1
- */
- su.c[1] = *(u_char *)w;
- sum += su.s;
- w = (u_short *)((char *)w + 1);
- mlen = m->m_len - 1;
- len--;
- } else
- mlen = m->m_len;
- if (len < mlen)
- mlen = len;
- len -= mlen;
- /*
- * Force to long boundary so we do longword aligned
- * memory operations
- */
- if (3 & (int) w) {
- REDUCE;
- if ((1 & (int) w) && (mlen > 0)) {
- sum <<= 8;
- su.c[0] = *(char *)w;
- w = (u_short *)((char *)w + 1);
- mlen--;
- byte_swapped = 1;
- }
- if ((2 & (int) w) && (mlen >= 2)) {
- sum += *w++;
- mlen -= 2;
- }
- }
- /*
- * Advance to a 486 cache line boundary.
- */
- if (4 & (int) w && mlen >= 4) {
- ADD(0);
- MOP;
- w += 2;
- mlen -= 4;
- }
- if (8 & (int) w && mlen >= 8) {
- ADD(0);
- ADDC(4);
- MOP;
- w += 4;
- mlen -= 8;
- }
- /*
- * Do as much of the checksum as possible 32 bits at at time.
- * In fact, this loop is unrolled to make overhead from
- * branches &c small.
- */
- mlen -= 1;
- while ((mlen -= 32) >= 0) {
- u_char junk;
- /*
- * Add with carry 16 words and fold in the last
- * carry by adding a 0 with carry.
- *
- * The early ADD(16) and the LOAD(32) are to load
- * the next 2 cache lines in advance on 486's. The
- * 486 has a penalty of 2 clock cycles for loading
- * a cache line, plus whatever time the external
- * memory takes to load the first word(s) addressed.
- * These penalties are unavoidable. Subsequent
- * accesses to a cache line being loaded (and to
- * other external memory?) are delayed until the
- * whole load finishes. These penalties are mostly
- * avoided by not accessing external memory for
- * 8 cycles after the ADD(16) and 12 cycles after
- * the LOAD(32). The loop terminates when mlen
- * is initially 33 (not 32) to guaranteed that
- * the LOAD(32) is within bounds.
- */
- ADD(16);
- ADDC(0);
- ADDC(4);
- ADDC(8);
- ADDC(12);
- LOAD(32);
- ADDC(20);
- ADDC(24);
- ADDC(28);
- MOP;
- w += 16;
- }
- mlen += 32 + 1;
- if (mlen >= 32) {
- ADD(16);
- ADDC(0);
- ADDC(4);
- ADDC(8);
- ADDC(12);
- ADDC(20);
- ADDC(24);
- ADDC(28);
- MOP;
- w += 16;
- mlen -= 32;
- }
- if (mlen >= 16) {
- ADD(0);
- ADDC(4);
- ADDC(8);
- ADDC(12);
- MOP;
- w += 8;
- mlen -= 16;
- }
- if (mlen >= 8) {
- ADD(0);
- ADDC(4);
- MOP;
- w += 4;
- mlen -= 8;
- }
- if (mlen == 0 && byte_swapped == 0)
- continue; /* worth 1% maybe ?? */
- REDUCE;
- while ((mlen -= 2) >= 0) {
- sum += *w++;
- }
- if (byte_swapped) {
- sum <<= 8;
- byte_swapped = 0;
- if (mlen == -1) {
- su.c[1] = *(char *)w;
- sum += su.s;
- mlen = 0;
- } else
- mlen = -1;
- } else if (mlen == -1)
- /*
- * This mbuf has odd number of bytes.
- * There could be a word split betwen
- * this mbuf and the next mbuf.
- * Save the last byte (to prepend to next mbuf).
- */
- su.c[0] = *(char *)w;
- }
-
- if (len)
- puts("cksum: out of data");
- if (mlen == -1) {
- /* The last mbuf has odd # of bytes. Follow the
- standard (the odd byte is shifted left by 8 bits) */
- su.c[1] = 0;
- sum += su.s;
- }
- REDUCE;
- return (~sum & 0xffff);
-}
diff --git a/cpukit/libnetworking/netinet/in_cksum_i386.h b/cpukit/libnetworking/netinet/in_cksum_i386.h
deleted file mode 100644
index 0612c5a7c4..0000000000
--- a/cpukit/libnetworking/netinet/in_cksum_i386.h
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- * Checksum routine for Internet Protocol family headers.
- *
- * This routine is very heavily used in the network
- * code and should be modified for each CPU to be as fast as possible.
- *
- * This implementation is 386 version.
- *
- * $Id$
- */
-
-#include <stdio.h> /* for puts */
-
-#undef ADDCARRY
-#define ADDCARRY(x) if ((x) > 0xffff) (x) -= 0xffff
-#define REDUCE {sum = (sum & 0xffff) + (sum >> 16); ADDCARRY(sum);}
-
-/*
- * Thanks to gcc we don't have to guess
- * which registers contain sum & w.
- */
-#define ADD(n) asm("addl " #n "(%2), %0" : "=r" (sum) : "0" (sum), "r" (w))
-#define ADDC(n) asm("adcl " #n "(%2), %0" : "=r" (sum) : "0" (sum), "r" (w))
-#define LOAD(n) asm volatile("movb " #n "(%1), %0" : "=r" (junk) : "r" (w))
-#define MOP asm("adcl $0, %0" : "=r" (sum) : "0" (sum))
-
-int
-in_cksum(m, len)
- register struct mbuf *m;
- register int len;
-{
- register u_short *w;
- register unsigned sum = 0;
- register int mlen = 0;
- int byte_swapped = 0;
- union { char c[2]; u_short s; } su;
-
- for (;m && len; m = m->m_next) {
- if (m->m_len == 0)
- continue;
- w = mtod(m, u_short *);
- if (mlen == -1) {
- /*
- * The first byte of this mbuf is the continuation
- * of a word spanning between this mbuf and the
- * last mbuf.
- */
-
- /* su.c[0] is already saved when scanning previous
- * mbuf. sum was REDUCEd when we found mlen == -1
- */
- su.c[1] = *(u_char *)w;
- sum += su.s;
- w = (u_short *)((char *)w + 1);
- mlen = m->m_len - 1;
- len--;
- } else
- mlen = m->m_len;
- if (len < mlen)
- mlen = len;
- len -= mlen;
- /*
- * Force to long boundary so we do longword aligned
- * memory operations
- */
- if (3 & (int) w) {
- REDUCE;
- if ((1 & (int) w) && (mlen > 0)) {
- sum <<= 8;
- su.c[0] = *(char *)w;
- w = (u_short *)((char *)w + 1);
- mlen--;
- byte_swapped = 1;
- }
- if ((2 & (int) w) && (mlen >= 2)) {
- sum += *w++;
- mlen -= 2;
- }
- }
- /*
- * Advance to a 486 cache line boundary.
- */
- if (4 & (int) w && mlen >= 4) {
- ADD(0);
- MOP;
- w += 2;
- mlen -= 4;
- }
- if (8 & (int) w && mlen >= 8) {
- ADD(0);
- ADDC(4);
- MOP;
- w += 4;
- mlen -= 8;
- }
- /*
- * Do as much of the checksum as possible 32 bits at at time.
- * In fact, this loop is unrolled to make overhead from
- * branches &c small.
- */
- mlen -= 1;
- while ((mlen -= 32) >= 0) {
- u_char junk;
- /*
- * Add with carry 16 words and fold in the last
- * carry by adding a 0 with carry.
- *
- * The early ADD(16) and the LOAD(32) are to load
- * the next 2 cache lines in advance on 486's. The
- * 486 has a penalty of 2 clock cycles for loading
- * a cache line, plus whatever time the external
- * memory takes to load the first word(s) addressed.
- * These penalties are unavoidable. Subsequent
- * accesses to a cache line being loaded (and to
- * other external memory?) are delayed until the
- * whole load finishes. These penalties are mostly
- * avoided by not accessing external memory for
- * 8 cycles after the ADD(16) and 12 cycles after
- * the LOAD(32). The loop terminates when mlen
- * is initially 33 (not 32) to guaranteed that
- * the LOAD(32) is within bounds.
- */
- ADD(16);
- ADDC(0);
- ADDC(4);
- ADDC(8);
- ADDC(12);
- LOAD(32);
- ADDC(20);
- ADDC(24);
- ADDC(28);
- MOP;
- w += 16;
- }
- mlen += 32 + 1;
- if (mlen >= 32) {
- ADD(16);
- ADDC(0);
- ADDC(4);
- ADDC(8);
- ADDC(12);
- ADDC(20);
- ADDC(24);
- ADDC(28);
- MOP;
- w += 16;
- mlen -= 32;
- }
- if (mlen >= 16) {
- ADD(0);
- ADDC(4);
- ADDC(8);
- ADDC(12);
- MOP;
- w += 8;
- mlen -= 16;
- }
- if (mlen >= 8) {
- ADD(0);
- ADDC(4);
- MOP;
- w += 4;
- mlen -= 8;
- }
- if (mlen == 0 && byte_swapped == 0)
- continue; /* worth 1% maybe ?? */
- REDUCE;
- while ((mlen -= 2) >= 0) {
- sum += *w++;
- }
- if (byte_swapped) {
- sum <<= 8;
- byte_swapped = 0;
- if (mlen == -1) {
- su.c[1] = *(char *)w;
- sum += su.s;
- mlen = 0;
- } else
- mlen = -1;
- } else if (mlen == -1)
- /*
- * This mbuf has odd number of bytes.
- * There could be a word split betwen
- * this mbuf and the next mbuf.
- * Save the last byte (to prepend to next mbuf).
- */
- su.c[0] = *(char *)w;
- }
-
- if (len)
- puts("cksum: out of data");
- if (mlen == -1) {
- /* The last mbuf has odd # of bytes. Follow the
- standard (the odd byte is shifted left by 8 bits) */
- su.c[1] = 0;
- sum += su.s;
- }
- REDUCE;
- return (~sum & 0xffff);
-}
diff --git a/cpukit/libnetworking/netinet/in_cksum_m68k.c b/cpukit/libnetworking/netinet/in_cksum_m68k.c
deleted file mode 100644
index 58199c3adf..0000000000
--- a/cpukit/libnetworking/netinet/in_cksum_m68k.c
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- * Copyright (c) 1988, 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)in_cksum.c 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/mbuf.h>
-
-#if (defined (__mcf5200__))
-# define IS_COLDFIRE 1
-#else
-# define IS_COLDFIRE 0
-#endif
-
-#define REDUCE { sum = (sum & 0xFFFF) + (sum >> 16); if (sum > 0xFFFF) sum -= 0xFFFF; }
-
-/*
- * Motorola 68k version of Internet Protocol Checksum routine
- * W. Eric Norum
- * Saskatchewan Accelerator Laboratory
- * August, 1998
- */
-int
-in_cksum(m, len)
- struct mbuf *m;
- int len;
-{
- unsigned short *w;
- unsigned long sum = 0;
- int mlen = 0;
- int byte_swapped = 0;
- union {
- char c[2];
- u_short s;
- } s_util;
-
- for ( ; m && len ; m = m->m_next) {
- if (m->m_len == 0)
- continue;
- w = mtod(m, u_short *);
- if (mlen == -1) {
- /*
- * The first byte of this mbuf is the continuation
- * of a word spanning between this mbuf and the
- * last mbuf.
- *
- * s_util.c[0] is already saved when scanning previous
- * mbuf.
- */
- s_util.c[1] = *(char *)w;
- sum += s_util.s;
- w = (u_short *)((char *)w + 1);
- mlen = m->m_len - 1;
- len--;
- } else
- mlen = m->m_len;
- if (len < mlen)
- mlen = len;
- len -= mlen;
-
- /*
- * Force to longword boundary.
- */
- if (3 & (int)w) {
- REDUCE;
- if ((1 & (int) w) && (mlen > 0)) {
- sum <<= 8;
- s_util.c[0] = *(u_char *)w;
- w = (u_short *)((char *)w + 1);
- mlen--;
- byte_swapped = 1;
- }
- if ((2 & (int) w) && (mlen >= 2)) {
- sum += *w++;
- mlen -= 2;
- }
- }
-
- /*
- * Sum all the longwords in the buffer.
- * See RFC 1071 -- Computing the Internet Checksum.
- * It should work for all 68k family members.
- */
- {
- unsigned long tcnt = mlen, t1;
- __asm__ volatile (
- "movel %2,%3\n\t"
- "lsrl #6,%2 | count/64 = # loop traversals\n\t"
- "andl #0x3c,%3 | Then find fractions of a chunk\n\t"
- "negl %3\n\t | Each long uses 4 instruction bytes\n\t"
-#if IS_COLDFIRE
- "addql #1,%2 | Clear X (extended carry flag)\n\t"
- "subql #1,%2 | \n\t"
-#else
- "andi #0xf,%%cc | Clear X (extended carry flag)\n\t"
-#endif
- "jmp %%pc@(lcsum2_lbl-.-2:b,%3) | Jump into loop\n"
- "lcsum1_lbl: | Begin inner loop...\n\t"
- "movel %1@+,%3 | 0: Fetch 32-bit word\n\t"
- "addxl %3,%0 | Add word + previous carry\n\t"
- "movel %1@+,%3 | 1: Fetch 32-bit word\n\t"
- "addxl %3,%0 | Add word + previous carry\n\t"
- "movel %1@+,%3 | 2: Fetch 32-bit word\n\t"
- "addxl %3,%0 | Add word + previous carry\n\t"
- "movel %1@+,%3 | 3: Fetch 32-bit word\n\t"
- "addxl %3,%0 | Add word + previous carry\n\t"
- "movel %1@+,%3 | 4: Fetch 32-bit word\n\t"
- "addxl %3,%0 | Add word + previous carry\n\t"
- "movel %1@+,%3 | 5: Fetch 32-bit word\n\t"
- "addxl %3,%0 | Add word + previous carry\n\t"
- "movel %1@+,%3 | 6: Fetch 32-bit word\n\t"
- "addxl %3,%0 | Add word + previous carry\n\t"
- "movel %1@+,%3 | 7: Fetch 32-bit word\n\t"
- "addxl %3,%0 | Add word + previous carry\n\t"
- "movel %1@+,%3 | 8: Fetch 32-bit word\n\t"
- "addxl %3,%0 | Add word + previous carry\n\t"
- "movel %1@+,%3 | 9: Fetch 32-bit word\n\t"
- "addxl %3,%0 | Add word + previous carry\n\t"
- "movel %1@+,%3 | A: Fetch 32-bit word\n\t"
- "addxl %3,%0 | Add word + previous carry\n\t"
- "movel %1@+,%3 | B: Fetch 32-bit word\n\t"
- "addxl %3,%0 | Add word + previous carry\n\t"
- "movel %1@+,%3 | C: Fetch 32-bit word\n\t"
- "addxl %3,%0 | Add word + previous carry\n\t"
- "movel %1@+,%3 | D: Fetch 32-bit word\n\t"
- "addxl %3,%0 | Add word + previous carry\n\t"
- "movel %1@+,%3 | E: Fetch 32-bit word\n\t"
- "addxl %3,%0 | Add word + previous carry\n\t"
- "movel %1@+,%3 | F: Fetch 32-bit word\n\t"
- "addxl %3,%0 | Add word + previous carry\n"
- "lcsum2_lbl: | End of unrolled loop\n\t"
-#if IS_COLDFIRE
- "moveq #0,%3 | Add in last carry\n\t"
- "addxl %3,%0 |\n\t"
- "subql #1,%2 | Update loop count\n\t"
- "bplb lcsum1_lbl | Loop (with X clear) if not done\n\t"
- "movel #0xffff,%2 | Get word mask\n\t"
- "movel %0,%3 | Fold 32 bit sum to 16 bits\n\t"
- "swap %3 |\n\t"
- "andl %2,%0 | Mask to 16-bit sum\n\t"
- "andl %2,%3 | Mask to 16-bit sum\n\t"
- "addl %3,%0 |\n\t"
- "movel %0,%3 | Add in last carry\n\t"
- "swap %3 |\n\t"
- "addl %3,%0 |\n\t"
- "andl %2,%0 | Mask to 16-bit sum\n\t"
-#else
- "dbf %2,lcsum1_lbl | (NB- dbf doesn't affect X)\n\t"
- "movel %0,%3 | Fold 32 bit sum to 16 bits\n\t"
- "swap %3 | (NB- swap doesn't affect X)\n\t"
- "addxw %3,%0 |\n\t"
- "moveq #0,%3 | Add in last carry\n\t"
- "addxw %3,%0 |\n\t"
- "andl #0xffff,%0 | Mask to 16-bit sum\n"
-#endif
- :
- "=d" (sum), "=a" (w), "=d" (tcnt) , "=d" (t1) :
- "0" (sum), "1" (w), "2" (tcnt) :
- "cc", "memory");
- }
- mlen &= 3;
-
- /*
- * Soak up the last 1, 2 or 3 bytes
- */
- while ((mlen -= 2) >= 0)
- sum += *w++;
- if (byte_swapped) {
- REDUCE;
- sum <<= 8;
- byte_swapped = 0;
- if (mlen == -1) {
- s_util.c[1] = *(char *)w;
- sum += s_util.s;
- mlen = 0;
- } else
- mlen = -1;
- } else if (mlen == -1)
- s_util.c[0] = *(char *)w;
- }
- if (len)
- sum = 0xDEAD;
- if (mlen == -1) {
- /* The last mbuf has odd # of bytes. Follow the
- standard (the odd byte may be shifted left by 8 bits
- or not as determined by endian-ness of the machine) */
- s_util.c[1] = 0;
- sum += s_util.s;
- }
- REDUCE;
- return (~sum & 0xffff);
-}
diff --git a/cpukit/libnetworking/netinet/in_cksum_m68k.h b/cpukit/libnetworking/netinet/in_cksum_m68k.h
deleted file mode 100644
index 58199c3adf..0000000000
--- a/cpukit/libnetworking/netinet/in_cksum_m68k.h
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- * Copyright (c) 1988, 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)in_cksum.c 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/mbuf.h>
-
-#if (defined (__mcf5200__))
-# define IS_COLDFIRE 1
-#else
-# define IS_COLDFIRE 0
-#endif
-
-#define REDUCE { sum = (sum & 0xFFFF) + (sum >> 16); if (sum > 0xFFFF) sum -= 0xFFFF; }
-
-/*
- * Motorola 68k version of Internet Protocol Checksum routine
- * W. Eric Norum
- * Saskatchewan Accelerator Laboratory
- * August, 1998
- */
-int
-in_cksum(m, len)
- struct mbuf *m;
- int len;
-{
- unsigned short *w;
- unsigned long sum = 0;
- int mlen = 0;
- int byte_swapped = 0;
- union {
- char c[2];
- u_short s;
- } s_util;
-
- for ( ; m && len ; m = m->m_next) {
- if (m->m_len == 0)
- continue;
- w = mtod(m, u_short *);
- if (mlen == -1) {
- /*
- * The first byte of this mbuf is the continuation
- * of a word spanning between this mbuf and the
- * last mbuf.
- *
- * s_util.c[0] is already saved when scanning previous
- * mbuf.
- */
- s_util.c[1] = *(char *)w;
- sum += s_util.s;
- w = (u_short *)((char *)w + 1);
- mlen = m->m_len - 1;
- len--;
- } else
- mlen = m->m_len;
- if (len < mlen)
- mlen = len;
- len -= mlen;
-
- /*
- * Force to longword boundary.
- */
- if (3 & (int)w) {
- REDUCE;
- if ((1 & (int) w) && (mlen > 0)) {
- sum <<= 8;
- s_util.c[0] = *(u_char *)w;
- w = (u_short *)((char *)w + 1);
- mlen--;
- byte_swapped = 1;
- }
- if ((2 & (int) w) && (mlen >= 2)) {
- sum += *w++;
- mlen -= 2;
- }
- }
-
- /*
- * Sum all the longwords in the buffer.
- * See RFC 1071 -- Computing the Internet Checksum.
- * It should work for all 68k family members.
- */
- {
- unsigned long tcnt = mlen, t1;
- __asm__ volatile (
- "movel %2,%3\n\t"
- "lsrl #6,%2 | count/64 = # loop traversals\n\t"
- "andl #0x3c,%3 | Then find fractions of a chunk\n\t"
- "negl %3\n\t | Each long uses 4 instruction bytes\n\t"
-#if IS_COLDFIRE
- "addql #1,%2 | Clear X (extended carry flag)\n\t"
- "subql #1,%2 | \n\t"
-#else
- "andi #0xf,%%cc | Clear X (extended carry flag)\n\t"
-#endif
- "jmp %%pc@(lcsum2_lbl-.-2:b,%3) | Jump into loop\n"
- "lcsum1_lbl: | Begin inner loop...\n\t"
- "movel %1@+,%3 | 0: Fetch 32-bit word\n\t"
- "addxl %3,%0 | Add word + previous carry\n\t"
- "movel %1@+,%3 | 1: Fetch 32-bit word\n\t"
- "addxl %3,%0 | Add word + previous carry\n\t"
- "movel %1@+,%3 | 2: Fetch 32-bit word\n\t"
- "addxl %3,%0 | Add word + previous carry\n\t"
- "movel %1@+,%3 | 3: Fetch 32-bit word\n\t"
- "addxl %3,%0 | Add word + previous carry\n\t"
- "movel %1@+,%3 | 4: Fetch 32-bit word\n\t"
- "addxl %3,%0 | Add word + previous carry\n\t"
- "movel %1@+,%3 | 5: Fetch 32-bit word\n\t"
- "addxl %3,%0 | Add word + previous carry\n\t"
- "movel %1@+,%3 | 6: Fetch 32-bit word\n\t"
- "addxl %3,%0 | Add word + previous carry\n\t"
- "movel %1@+,%3 | 7: Fetch 32-bit word\n\t"
- "addxl %3,%0 | Add word + previous carry\n\t"
- "movel %1@+,%3 | 8: Fetch 32-bit word\n\t"
- "addxl %3,%0 | Add word + previous carry\n\t"
- "movel %1@+,%3 | 9: Fetch 32-bit word\n\t"
- "addxl %3,%0 | Add word + previous carry\n\t"
- "movel %1@+,%3 | A: Fetch 32-bit word\n\t"
- "addxl %3,%0 | Add word + previous carry\n\t"
- "movel %1@+,%3 | B: Fetch 32-bit word\n\t"
- "addxl %3,%0 | Add word + previous carry\n\t"
- "movel %1@+,%3 | C: Fetch 32-bit word\n\t"
- "addxl %3,%0 | Add word + previous carry\n\t"
- "movel %1@+,%3 | D: Fetch 32-bit word\n\t"
- "addxl %3,%0 | Add word + previous carry\n\t"
- "movel %1@+,%3 | E: Fetch 32-bit word\n\t"
- "addxl %3,%0 | Add word + previous carry\n\t"
- "movel %1@+,%3 | F: Fetch 32-bit word\n\t"
- "addxl %3,%0 | Add word + previous carry\n"
- "lcsum2_lbl: | End of unrolled loop\n\t"
-#if IS_COLDFIRE
- "moveq #0,%3 | Add in last carry\n\t"
- "addxl %3,%0 |\n\t"
- "subql #1,%2 | Update loop count\n\t"
- "bplb lcsum1_lbl | Loop (with X clear) if not done\n\t"
- "movel #0xffff,%2 | Get word mask\n\t"
- "movel %0,%3 | Fold 32 bit sum to 16 bits\n\t"
- "swap %3 |\n\t"
- "andl %2,%0 | Mask to 16-bit sum\n\t"
- "andl %2,%3 | Mask to 16-bit sum\n\t"
- "addl %3,%0 |\n\t"
- "movel %0,%3 | Add in last carry\n\t"
- "swap %3 |\n\t"
- "addl %3,%0 |\n\t"
- "andl %2,%0 | Mask to 16-bit sum\n\t"
-#else
- "dbf %2,lcsum1_lbl | (NB- dbf doesn't affect X)\n\t"
- "movel %0,%3 | Fold 32 bit sum to 16 bits\n\t"
- "swap %3 | (NB- swap doesn't affect X)\n\t"
- "addxw %3,%0 |\n\t"
- "moveq #0,%3 | Add in last carry\n\t"
- "addxw %3,%0 |\n\t"
- "andl #0xffff,%0 | Mask to 16-bit sum\n"
-#endif
- :
- "=d" (sum), "=a" (w), "=d" (tcnt) , "=d" (t1) :
- "0" (sum), "1" (w), "2" (tcnt) :
- "cc", "memory");
- }
- mlen &= 3;
-
- /*
- * Soak up the last 1, 2 or 3 bytes
- */
- while ((mlen -= 2) >= 0)
- sum += *w++;
- if (byte_swapped) {
- REDUCE;
- sum <<= 8;
- byte_swapped = 0;
- if (mlen == -1) {
- s_util.c[1] = *(char *)w;
- sum += s_util.s;
- mlen = 0;
- } else
- mlen = -1;
- } else if (mlen == -1)
- s_util.c[0] = *(char *)w;
- }
- if (len)
- sum = 0xDEAD;
- if (mlen == -1) {
- /* The last mbuf has odd # of bytes. Follow the
- standard (the odd byte may be shifted left by 8 bits
- or not as determined by endian-ness of the machine) */
- s_util.c[1] = 0;
- sum += s_util.s;
- }
- REDUCE;
- return (~sum & 0xffff);
-}
diff --git a/cpukit/libnetworking/netinet/in_cksum_powerpc.c b/cpukit/libnetworking/netinet/in_cksum_powerpc.c
deleted file mode 100644
index fe2f04e246..0000000000
--- a/cpukit/libnetworking/netinet/in_cksum_powerpc.c
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * Checksum routine for Internet Protocol family headers.
- *
- * This routine is very heavily used in the network
- * code and should be modified for each CPU to be as fast as possible.
- *
- * This implementation is the PowerPC version.
- *
- * $Id$
- */
-
-#include <stdio.h> /* for puts */
-
-#undef ADDCARRY
-#define ADDCARRY(x) if ((x) > 0xffff) (x) -= 0xffff
-#define REDUCE {sum = (sum & 0xffff) + (sum >> 16); ADDCARRY(sum);}
-
-/*
- * Thanks to gcc we don't have to guess
- * which registers contain sum & w.
- */
-
-#define LDTMP(n) tmp = *((u_int *)((u_char *)w + n))
-
-#define ADD(n) \
- LDTMP(n); \
- __asm__ volatile("addc %0,%0,%2" : "=r" (sum) : "0" (sum), "r" (tmp))
-
-#define ADDC(n) \
- LDTMP(n); \
- __asm__ volatile("adde %0,%0,%2" : "=r" (sum) : "0" (sum), "r" (tmp))
-
-#define MOP \
- tmp = 0; \
- __asm__ volatile("adde %0,%0,%2" : "=r" (sum) : "0" (sum), "r" (tmp))
-
-#define LOAD(n) junk = (u_char) *((volatile u_char *) w + n)
-
-
-int
-in_cksum(m, len)
- register struct mbuf *m;
- register int len;
-{
- u_char junk;
- register u_short *w;
- register unsigned sum = 0;
- register unsigned tmp;
- register int mlen = 0;
- int byte_swapped = 0;
- union { char c[2]; u_short s; } su;
-
- for (;m && len; m = m->m_next) {
- if (m->m_len == 0)
- continue;
- w = mtod(m, u_short *);
- if (mlen == -1) {
- /*
- * The first byte of this mbuf is the continuation
- * of a word spanning between this mbuf and the
- * last mbuf.
- */
-
- /* su.c[0] is already saved when scanning previous
- * mbuf. sum was REDUCEd when we found mlen == -1
- */
- su.c[1] = *(u_char *)w;
- sum += su.s;
- w = (u_short *)((char *)w + 1);
- mlen = m->m_len - 1;
- len--;
- } else
- mlen = m->m_len;
- if (len < mlen)
- mlen = len;
- len -= mlen;
- /*
- * Force to long boundary so we do longword aligned
- * memory operations
- */
- if (3 & (int) w) {
- REDUCE;
- if ((1 & (int) w) && (mlen > 0)) {
- sum <<= 8;
- su.c[0] = *(char *)w;
- w = (u_short *)((char *)w + 1);
- mlen--;
- byte_swapped = 1;
- }
- if ((2 & (int) w) && (mlen >= 2)) {
- sum += *w++;
- mlen -= 2;
- }
- }
-
- /*
- * Do as much of the checksum as possible 32 bits at at time.
- * In fact, this loop is unrolled to keep overhead from
- * branches small.
- */
- while (mlen >= 32) {
- /*
- * Add with carry 16 words and fold in the last
- * carry by adding a 0 with carry.
- *
- * The early ADD(16) and the LOAD(32) are intended
- * to help get the data into the cache.
- */
- ADD(16);
- ADDC(0);
- ADDC(4);
- ADDC(8);
- ADDC(12);
- LOAD(32);
- ADDC(20);
- ADDC(24);
- ADDC(28);
- MOP;
- w += 16;
- mlen -= 32;
- }
- if (mlen >= 16) {
- ADD(0);
- ADDC(4);
- ADDC(8);
- ADDC(12);
- MOP;
- w += 8;
- mlen -= 16;
- }
- if (mlen >= 8) {
- ADD(0);
- ADDC(4);
- MOP;
- w += 4;
- mlen -= 8;
- }
- if (mlen == 0 && byte_swapped == 0)
- continue; /* worth 1% maybe ?? */
- REDUCE;
- while ((mlen -= 2) >= 0) {
- sum += *w++;
- }
- if (byte_swapped) {
- sum <<= 8;
- byte_swapped = 0;
- if (mlen == -1) {
- su.c[1] = *(char *)w;
- sum += su.s;
- mlen = 0;
- } else
- mlen = -1;
- } else if (mlen == -1)
- /*
- * This mbuf has odd number of bytes.
- * There could be a word split betwen
- * this mbuf and the next mbuf.
- * Save the last byte (to prepend to next mbuf).
- */
- su.c[0] = *(char *)w;
- }
-
- if (len)
- puts("cksum: out of data");
- if (mlen == -1) {
- /* The last mbuf has odd # of bytes. Follow the
- standard (the odd byte is shifted left by 8 bits) */
- su.c[1] = 0;
- sum += su.s;
- }
- REDUCE;
- return (~sum & 0xffff);
-}
diff --git a/cpukit/libnetworking/netinet/in_cksum_powerpc.h b/cpukit/libnetworking/netinet/in_cksum_powerpc.h
deleted file mode 100644
index fe2f04e246..0000000000
--- a/cpukit/libnetworking/netinet/in_cksum_powerpc.h
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * Checksum routine for Internet Protocol family headers.
- *
- * This routine is very heavily used in the network
- * code and should be modified for each CPU to be as fast as possible.
- *
- * This implementation is the PowerPC version.
- *
- * $Id$
- */
-
-#include <stdio.h> /* for puts */
-
-#undef ADDCARRY
-#define ADDCARRY(x) if ((x) > 0xffff) (x) -= 0xffff
-#define REDUCE {sum = (sum & 0xffff) + (sum >> 16); ADDCARRY(sum);}
-
-/*
- * Thanks to gcc we don't have to guess
- * which registers contain sum & w.
- */
-
-#define LDTMP(n) tmp = *((u_int *)((u_char *)w + n))
-
-#define ADD(n) \
- LDTMP(n); \
- __asm__ volatile("addc %0,%0,%2" : "=r" (sum) : "0" (sum), "r" (tmp))
-
-#define ADDC(n) \
- LDTMP(n); \
- __asm__ volatile("adde %0,%0,%2" : "=r" (sum) : "0" (sum), "r" (tmp))
-
-#define MOP \
- tmp = 0; \
- __asm__ volatile("adde %0,%0,%2" : "=r" (sum) : "0" (sum), "r" (tmp))
-
-#define LOAD(n) junk = (u_char) *((volatile u_char *) w + n)
-
-
-int
-in_cksum(m, len)
- register struct mbuf *m;
- register int len;
-{
- u_char junk;
- register u_short *w;
- register unsigned sum = 0;
- register unsigned tmp;
- register int mlen = 0;
- int byte_swapped = 0;
- union { char c[2]; u_short s; } su;
-
- for (;m && len; m = m->m_next) {
- if (m->m_len == 0)
- continue;
- w = mtod(m, u_short *);
- if (mlen == -1) {
- /*
- * The first byte of this mbuf is the continuation
- * of a word spanning between this mbuf and the
- * last mbuf.
- */
-
- /* su.c[0] is already saved when scanning previous
- * mbuf. sum was REDUCEd when we found mlen == -1
- */
- su.c[1] = *(u_char *)w;
- sum += su.s;
- w = (u_short *)((char *)w + 1);
- mlen = m->m_len - 1;
- len--;
- } else
- mlen = m->m_len;
- if (len < mlen)
- mlen = len;
- len -= mlen;
- /*
- * Force to long boundary so we do longword aligned
- * memory operations
- */
- if (3 & (int) w) {
- REDUCE;
- if ((1 & (int) w) && (mlen > 0)) {
- sum <<= 8;
- su.c[0] = *(char *)w;
- w = (u_short *)((char *)w + 1);
- mlen--;
- byte_swapped = 1;
- }
- if ((2 & (int) w) && (mlen >= 2)) {
- sum += *w++;
- mlen -= 2;
- }
- }
-
- /*
- * Do as much of the checksum as possible 32 bits at at time.
- * In fact, this loop is unrolled to keep overhead from
- * branches small.
- */
- while (mlen >= 32) {
- /*
- * Add with carry 16 words and fold in the last
- * carry by adding a 0 with carry.
- *
- * The early ADD(16) and the LOAD(32) are intended
- * to help get the data into the cache.
- */
- ADD(16);
- ADDC(0);
- ADDC(4);
- ADDC(8);
- ADDC(12);
- LOAD(32);
- ADDC(20);
- ADDC(24);
- ADDC(28);
- MOP;
- w += 16;
- mlen -= 32;
- }
- if (mlen >= 16) {
- ADD(0);
- ADDC(4);
- ADDC(8);
- ADDC(12);
- MOP;
- w += 8;
- mlen -= 16;
- }
- if (mlen >= 8) {
- ADD(0);
- ADDC(4);
- MOP;
- w += 4;
- mlen -= 8;
- }
- if (mlen == 0 && byte_swapped == 0)
- continue; /* worth 1% maybe ?? */
- REDUCE;
- while ((mlen -= 2) >= 0) {
- sum += *w++;
- }
- if (byte_swapped) {
- sum <<= 8;
- byte_swapped = 0;
- if (mlen == -1) {
- su.c[1] = *(char *)w;
- sum += su.s;
- mlen = 0;
- } else
- mlen = -1;
- } else if (mlen == -1)
- /*
- * This mbuf has odd number of bytes.
- * There could be a word split betwen
- * this mbuf and the next mbuf.
- * Save the last byte (to prepend to next mbuf).
- */
- su.c[0] = *(char *)w;
- }
-
- if (len)
- puts("cksum: out of data");
- if (mlen == -1) {
- /* The last mbuf has odd # of bytes. Follow the
- standard (the odd byte is shifted left by 8 bits) */
- su.c[1] = 0;
- sum += su.s;
- }
- REDUCE;
- return (~sum & 0xffff);
-}
diff --git a/cpukit/libnetworking/netinet/in_pcb.c b/cpukit/libnetworking/netinet/in_pcb.c
deleted file mode 100644
index 116f70eebf..0000000000
--- a/cpukit/libnetworking/netinet/in_pcb.c
+++ /dev/null
@@ -1,757 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1991, 1993, 1995
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)in_pcb.c 8.4 (Berkeley) 5/24/95
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/systm.h>
-#include <sys/malloc.h>
-#include <sys/mbuf.h>
-#include <sys/protosw.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/ioctl.h>
-#include <sys/errno.h>
-#include <sys/time.h>
-#include <sys/proc.h>
-#include <sys/kernel.h>
-#include <sys/sysctl.h>
-
-#include <net/if.h>
-#include <net/route.h>
-
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/in_pcb.h>
-#include <netinet/in_var.h>
-#include <netinet/ip_var.h>
-
-struct in_addr zeroin_addr;
-
-static void in_pcbinshash __P((struct inpcb *));
-static void in_rtchange __P((struct inpcb *, int));
-
-/*
- * These configure the range of local port addresses assigned to
- * "unspecified" outgoing connections/packets/whatever.
- */
-static int ipport_lowfirstauto = IPPORT_RESERVED - 1; /* 1023 */
-static int ipport_lowlastauto = IPPORT_RESERVEDSTART; /* 600 */
-static int ipport_firstauto = IPPORT_RESERVED; /* 1024 */
-static int ipport_lastauto = IPPORT_USERRESERVED; /* 5000 */
-static int ipport_hifirstauto = IPPORT_HIFIRSTAUTO; /* 40000 */
-static int ipport_hilastauto = IPPORT_HILASTAUTO; /* 44999 */
-
-#define RANGECHK(var, min, max) \
- if ((var) < (min)) { (var) = (min); } \
- else if ((var) > (max)) { (var) = (max); }
-
-#if 0
-static int
-sysctl_net_ipport_check SYSCTL_HANDLER_ARGS
-{
- int error = sysctl_handle_int(oidp,
- oidp->oid_arg1, oidp->oid_arg2, req);
- if (!error) {
- RANGECHK(ipport_lowfirstauto, 1, IPPORT_RESERVED - 1);
- RANGECHK(ipport_lowlastauto, 1, IPPORT_RESERVED - 1);
- RANGECHK(ipport_firstauto, IPPORT_RESERVED, USHRT_MAX);
- RANGECHK(ipport_lastauto, IPPORT_RESERVED, USHRT_MAX);
- RANGECHK(ipport_hifirstauto, IPPORT_RESERVED, USHRT_MAX);
- RANGECHK(ipport_hilastauto, IPPORT_RESERVED, USHRT_MAX);
- }
- return error;
-}
-#endif
-
-#undef RANGECHK
-
-SYSCTL_NODE(_net_inet_ip, IPPROTO_IP, portrange, CTLFLAG_RW, 0, "IP Ports");
-
-SYSCTL_PROC(_net_inet_ip_portrange, OID_AUTO, lowfirst, CTLTYPE_INT|CTLFLAG_RW,
- &ipport_lowfirstauto, 0, &sysctl_net_ipport_check, "I", "");
-SYSCTL_PROC(_net_inet_ip_portrange, OID_AUTO, lowlast, CTLTYPE_INT|CTLFLAG_RW,
- &ipport_lowlastauto, 0, &sysctl_net_ipport_check, "I", "");
-SYSCTL_PROC(_net_inet_ip_portrange, OID_AUTO, first, CTLTYPE_INT|CTLFLAG_RW,
- &ipport_firstauto, 0, &sysctl_net_ipport_check, "I", "");
-SYSCTL_PROC(_net_inet_ip_portrange, OID_AUTO, last, CTLTYPE_INT|CTLFLAG_RW,
- &ipport_lastauto, 0, &sysctl_net_ipport_check, "I", "");
-SYSCTL_PROC(_net_inet_ip_portrange, OID_AUTO, hifirst, CTLTYPE_INT|CTLFLAG_RW,
- &ipport_hifirstauto, 0, &sysctl_net_ipport_check, "I", "");
-SYSCTL_PROC(_net_inet_ip_portrange, OID_AUTO, hilast, CTLTYPE_INT|CTLFLAG_RW,
- &ipport_hilastauto, 0, &sysctl_net_ipport_check, "I", "");
-
-int
-in_pcballoc(so, pcbinfo)
- struct socket *so;
- struct inpcbinfo *pcbinfo;
-{
- register struct inpcb *inp;
- int s;
-
- MALLOC(inp, struct inpcb *, sizeof(*inp), M_PCB, M_NOWAIT);
- if (inp == NULL)
- return (ENOBUFS);
- bzero((caddr_t)inp, sizeof(*inp));
- inp->inp_pcbinfo = pcbinfo;
- inp->inp_socket = so;
- s = splnet();
- LIST_INSERT_HEAD(pcbinfo->listhead, inp, inp_list);
- in_pcbinshash(inp);
- splx(s);
- so->so_pcb = (caddr_t)inp;
- return (0);
-}
-
-int
-in_pcbbind(inp, nam)
- register struct inpcb *inp;
- struct mbuf *nam;
-{
- register struct socket *so = inp->inp_socket;
- unsigned short *lastport;
- struct sockaddr_in *sin;
- u_short lport = 0;
- int wild = 0, reuseport = (so->so_options & SO_REUSEPORT);
- int error;
-
- if (in_ifaddr == 0)
- return (EADDRNOTAVAIL);
- if (inp->inp_lport || inp->inp_laddr.s_addr != INADDR_ANY)
- return (EINVAL);
- if ((so->so_options & (SO_REUSEADDR|SO_REUSEPORT)) == 0 &&
- ((so->so_proto->pr_flags & PR_CONNREQUIRED) == 0 ||
- (so->so_options & SO_ACCEPTCONN) == 0))
- wild = 1;
- if (nam) {
- sin = mtod(nam, struct sockaddr_in *);
- if (nam->m_len != sizeof (*sin))
- return (EINVAL);
-#ifdef notdef
- /*
- * We should check the family, but old programs
- * incorrectly fail to initialize it.
- */
- if (sin->sin_family != AF_INET)
- return (EAFNOSUPPORT);
-#endif
- lport = sin->sin_port;
- if (IN_MULTICAST(ntohl(sin->sin_addr.s_addr))) {
- /*
- * Treat SO_REUSEADDR as SO_REUSEPORT for multicast;
- * allow complete duplication of binding if
- * SO_REUSEPORT is set, or if SO_REUSEADDR is set
- * and a multicast address is bound on both
- * new and duplicated sockets.
- */
- if (so->so_options & SO_REUSEADDR)
- reuseport = SO_REUSEADDR|SO_REUSEPORT;
- } else if (sin->sin_addr.s_addr != INADDR_ANY) {
- sin->sin_port = 0; /* yech... */
- if (ifa_ifwithaddr((struct sockaddr *)sin) == 0)
- return (EADDRNOTAVAIL);
- }
- if (lport) {
- struct inpcb *t;
-
- /* GROSS */
- if (ntohs(lport) < IPPORT_RESERVED &&
- (error = suser(p->p_ucred, &p->p_acflag)))
- return (EACCES);
- if (so->so_uid) {
- t = in_pcblookup(inp->inp_pcbinfo, zeroin_addr,
- 0, sin->sin_addr, lport,
- INPLOOKUP_WILDCARD);
- if (t && (so->so_uid != t->inp_socket->so_uid))
- return (EADDRINUSE);
- }
- t = in_pcblookup(inp->inp_pcbinfo, zeroin_addr, 0,
- sin->sin_addr, lport, wild);
- if (t && (reuseport & t->inp_socket->so_options) == 0)
- return (EADDRINUSE);
- }
- inp->inp_laddr = sin->sin_addr;
- }
- if (lport == 0) {
- ushort first, last;
- int count;
-
- inp->inp_flags |= INP_ANONPORT;
-
- if (inp->inp_flags & INP_HIGHPORT) {
- first = ipport_hifirstauto; /* sysctl */
- last = ipport_hilastauto;
- lastport = &inp->inp_pcbinfo->lasthi;
- } else if (inp->inp_flags & INP_LOWPORT) {
- if ((error = suser(p->p_ucred, &p->p_acflag)))
- return (EACCES);
- first = ipport_lowfirstauto; /* 1023 */
- last = ipport_lowlastauto; /* 600 */
- lastport = &inp->inp_pcbinfo->lastlow;
- } else {
- first = ipport_firstauto; /* sysctl */
- last = ipport_lastauto;
- lastport = &inp->inp_pcbinfo->lastport;
- }
- /*
- * Simple check to ensure all ports are not used up causing
- * a deadlock here.
- *
- * We split the two cases (up and down) so that the direction
- * is not being tested on each round of the loop.
- */
- if (first > last) {
- /*
- * counting down
- */
- count = first - last;
-
- do {
- if (count-- <= 0) /* completely used? */
- return (EADDRNOTAVAIL);
- --*lastport;
- if (*lastport > first || *lastport < last)
- *lastport = first;
- lport = htons(*lastport);
- } while (in_pcblookup(inp->inp_pcbinfo,
- zeroin_addr, 0, inp->inp_laddr, lport, wild));
- } else {
- /*
- * counting up
- */
- count = last - first;
-
- do {
- if (count-- <= 0) /* completely used? */
- return (EADDRNOTAVAIL);
- ++*lastport;
- if (*lastport < first || *lastport > last)
- *lastport = first;
- lport = htons(*lastport);
- } while (in_pcblookup(inp->inp_pcbinfo,
- zeroin_addr, 0, inp->inp_laddr, lport, wild));
- }
- }
- inp->inp_lport = lport;
- in_pcbrehash(inp);
- return (0);
-}
-
-/*
- * Transform old in_pcbconnect() into an inner subroutine for new
- * in_pcbconnect(): Do some validity-checking on the remote
- * address (in mbuf 'nam') and then determine local host address
- * (i.e., which interface) to use to access that remote host.
- *
- * This preserves definition of in_pcbconnect(), while supporting a
- * slightly different version for T/TCP. (This is more than
- * a bit of a kludge, but cleaning up the internal interfaces would
- * have forced minor changes in every protocol).
- */
-
-int
-in_pcbladdr(inp, nam, plocal_sin)
- register struct inpcb *inp;
- struct mbuf *nam;
- struct sockaddr_in **plocal_sin;
-{
- struct in_ifaddr *ia;
- register struct sockaddr_in *sin = mtod(nam, struct sockaddr_in *);
-
- if (nam->m_len != sizeof (*sin))
- return (EINVAL);
- if (sin->sin_family != AF_INET)
- return (EAFNOSUPPORT);
- if (sin->sin_port == 0)
- return (EADDRNOTAVAIL);
- if (in_ifaddr) {
- /*
- * If the destination address is INADDR_ANY,
- * use the primary local address.
- * If the supplied address is INADDR_BROADCAST,
- * and the primary interface supports broadcast,
- * choose the broadcast address for that interface.
- */
-#define satosin(sa) ((struct sockaddr_in *)(sa))
-#define sintosa(sin) ((struct sockaddr *)(sin))
-#define ifatoia(ifa) ((struct in_ifaddr *)(ifa))
- if (sin->sin_addr.s_addr == INADDR_ANY)
- sin->sin_addr = IA_SIN(in_ifaddr)->sin_addr;
- else if (sin->sin_addr.s_addr == (u_long)INADDR_BROADCAST &&
- (in_ifaddr->ia_ifp->if_flags & IFF_BROADCAST))
- sin->sin_addr = satosin(&in_ifaddr->ia_broadaddr)->sin_addr;
- }
- if (inp->inp_laddr.s_addr == INADDR_ANY) {
- register struct route *ro;
-
- ia = (struct in_ifaddr *)0;
- /*
- * If route is known or can be allocated now,
- * our src addr is taken from the i/f, else punt.
- */
- ro = &inp->inp_route;
- if (ro->ro_rt &&
- (satosin(&ro->ro_dst)->sin_addr.s_addr !=
- sin->sin_addr.s_addr ||
- inp->inp_socket->so_options & SO_DONTROUTE)) {
- RTFREE(ro->ro_rt);
- ro->ro_rt = (struct rtentry *)0;
- }
- if ((inp->inp_socket->so_options & SO_DONTROUTE) == 0 && /*XXX*/
- (ro->ro_rt == (struct rtentry *)0 ||
- ro->ro_rt->rt_ifp == (struct ifnet *)0)) {
- /* No route yet, so try to acquire one */
- ro->ro_dst.sa_family = AF_INET;
- ro->ro_dst.sa_len = sizeof(struct sockaddr_in);
- ((struct sockaddr_in *) &ro->ro_dst)->sin_addr =
- sin->sin_addr;
- rtalloc(ro);
- }
- /*
- * If we found a route, use the address
- * corresponding to the outgoing interface
- * unless it is the loopback (in case a route
- * to our address on another net goes to loopback).
- */
- if (ro->ro_rt && !(ro->ro_rt->rt_ifp->if_flags & IFF_LOOPBACK))
- ia = ifatoia(ro->ro_rt->rt_ifa);
- if (ia == 0) {
- u_short fport = sin->sin_port;
-
- sin->sin_port = 0;
- ia = ifatoia(ifa_ifwithdstaddr(sintosa(sin)));
- if (ia == 0)
- ia = ifatoia(ifa_ifwithnet(sintosa(sin)));
- sin->sin_port = fport;
- if (ia == 0)
- ia = in_ifaddr;
- if (ia == 0)
- return (EADDRNOTAVAIL);
- }
- /*
- * If the destination address is multicast and an outgoing
- * interface has been set as a multicast option, use the
- * address of that interface as our source address.
- */
- if (IN_MULTICAST(ntohl(sin->sin_addr.s_addr)) &&
- inp->inp_moptions != NULL) {
- struct ip_moptions *imo;
- struct ifnet *ifp;
-
- imo = inp->inp_moptions;
- if (imo->imo_multicast_ifp != NULL) {
- ifp = imo->imo_multicast_ifp;
- for (ia = in_ifaddr; ia; ia = ia->ia_next)
- if (ia->ia_ifp == ifp)
- break;
- if (ia == 0)
- return (EADDRNOTAVAIL);
- }
- }
- /*
- * Don't do pcblookup call here; return interface in plocal_sin
- * and exit to caller, that will do the lookup.
- */
- *plocal_sin = &ia->ia_addr;
-
- }
- return(0);
-}
-
-/*
- * Outer subroutine:
- * Connect from a socket to a specified address.
- * Both address and port must be specified in argument sin.
- * If don't have a local address for this socket yet,
- * then pick one.
- */
-int
-in_pcbconnect(inp, nam)
- register struct inpcb *inp;
- struct mbuf *nam;
-{
- struct sockaddr_in *ifaddr;
- register struct sockaddr_in *sin = mtod(nam, struct sockaddr_in *);
- int error;
-
- /*
- * Call inner routine, to assign local interface address.
- */
- if ((error = in_pcbladdr(inp, nam, &ifaddr)))
- return(error);
-
- if (in_pcblookuphash(inp->inp_pcbinfo, sin->sin_addr, sin->sin_port,
- inp->inp_laddr.s_addr ? inp->inp_laddr : ifaddr->sin_addr,
- inp->inp_lport, 0) != NULL)
- return (EADDRINUSE);
- if (inp->inp_laddr.s_addr == INADDR_ANY) {
- if (inp->inp_lport == 0)
- (void)in_pcbbind(inp, (struct mbuf *)0);
- inp->inp_laddr = ifaddr->sin_addr;
- }
- inp->inp_faddr = sin->sin_addr;
- inp->inp_fport = sin->sin_port;
- in_pcbrehash(inp);
- return (0);
-}
-
-void
-in_pcbdisconnect(inp)
- struct inpcb *inp;
-{
-
- inp->inp_faddr.s_addr = INADDR_ANY;
- inp->inp_fport = 0;
- in_pcbrehash(inp);
- if (inp->inp_socket->so_state & SS_NOFDREF)
- in_pcbdetach(inp);
-}
-
-void
-in_pcbdetach(inp)
- struct inpcb *inp;
-{
- struct socket *so = inp->inp_socket;
- int s;
-
- so->so_pcb = 0;
- sofree(so);
- if (inp->inp_options)
- (void)m_free(inp->inp_options);
- if (inp->inp_route.ro_rt)
- rtfree(inp->inp_route.ro_rt);
- ip_freemoptions(inp->inp_moptions);
- s = splnet();
- LIST_REMOVE(inp, inp_hash);
- LIST_REMOVE(inp, inp_list);
- splx(s);
- FREE(inp, M_PCB);
-}
-
-void
-in_setsockaddr(inp, nam)
- register struct inpcb *inp;
- struct mbuf *nam;
-{
- register struct sockaddr_in *sin;
-
- nam->m_len = sizeof (*sin);
- sin = mtod(nam, struct sockaddr_in *);
- bzero((caddr_t)sin, sizeof (*sin));
- sin->sin_family = AF_INET;
- sin->sin_len = sizeof(*sin);
- sin->sin_port = inp->inp_lport;
- sin->sin_addr = inp->inp_laddr;
-}
-
-void
-in_setpeeraddr(inp, nam)
- struct inpcb *inp;
- struct mbuf *nam;
-{
- register struct sockaddr_in *sin;
-
- nam->m_len = sizeof (*sin);
- sin = mtod(nam, struct sockaddr_in *);
- bzero((caddr_t)sin, sizeof (*sin));
- sin->sin_family = AF_INET;
- sin->sin_len = sizeof(*sin);
- sin->sin_port = inp->inp_fport;
- sin->sin_addr = inp->inp_faddr;
-}
-
-/*
- * Pass some notification to all connections of a protocol
- * associated with address dst. The local address and/or port numbers
- * may be specified to limit the search. The "usual action" will be
- * taken, depending on the ctlinput cmd. The caller must filter any
- * cmds that are uninteresting (e.g., no error in the map).
- * Call the protocol specific routine (if any) to report
- * any errors for each matching socket.
- *
- * Must be called at splnet.
- */
-void
-in_pcbnotify(head, dst, fport_arg, laddr, lport_arg, cmd, notify)
- struct inpcbhead *head;
- struct sockaddr *dst;
- u_int fport_arg, lport_arg;
- struct in_addr laddr;
- int cmd;
- void (*notify) __P((struct inpcb *, int));
-{
- register struct inpcb *inp, *oinp;
- struct in_addr faddr;
- u_short fport = fport_arg, lport = lport_arg;
- int errnum, s;
-
- if ((unsigned)cmd > PRC_NCMDS || dst->sa_family != AF_INET)
- return;
- faddr = ((struct sockaddr_in *)dst)->sin_addr;
- if (faddr.s_addr == INADDR_ANY)
- return;
-
- /*
- * Redirects go to all references to the destination,
- * and use in_rtchange to invalidate the route cache.
- * Dead host indications: notify all references to the destination.
- * Otherwise, if we have knowledge of the local port and address,
- * deliver only to that socket.
- */
- if (PRC_IS_REDIRECT(cmd) || cmd == PRC_HOSTDEAD) {
- fport = 0;
- lport = 0;
- laddr.s_addr = 0;
- if (cmd != PRC_HOSTDEAD)
- notify = in_rtchange;
- }
- errnum = inetctlerrmap[cmd];
- s = splnet();
- for (inp = head->lh_first; inp != NULL;) {
- if (inp->inp_faddr.s_addr != faddr.s_addr ||
- inp->inp_socket == 0 ||
- (lport && inp->inp_lport != lport) ||
- (laddr.s_addr && inp->inp_laddr.s_addr != laddr.s_addr) ||
- (fport && inp->inp_fport != fport)) {
- inp = inp->inp_list.le_next;
- continue;
- }
- oinp = inp;
- inp = inp->inp_list.le_next;
- if (notify)
- (*notify)(oinp, errnum);
- }
- splx(s);
-}
-
-/*
- * Check for alternatives when higher level complains
- * about service problems. For now, invalidate cached
- * routing information. If the route was created dynamically
- * (by a redirect), time to try a default gateway again.
- */
-void
-in_losing(inp)
- struct inpcb *inp;
-{
- register struct rtentry *rt;
- struct rt_addrinfo info;
-
- if ((rt = inp->inp_route.ro_rt)) {
- inp->inp_route.ro_rt = 0;
- bzero((caddr_t)&info, sizeof(info));
- info.rti_info[RTAX_DST] =
- (struct sockaddr *)&inp->inp_route.ro_dst;
- info.rti_info[RTAX_GATEWAY] = rt->rt_gateway;
- info.rti_info[RTAX_NETMASK] = rt_mask(rt);
- rt_missmsg(RTM_LOSING, &info, rt->rt_flags, 0);
- if (rt->rt_flags & RTF_DYNAMIC)
- (void) rtrequest(RTM_DELETE, rt_key(rt),
- rt->rt_gateway, rt_mask(rt), rt->rt_flags,
- (struct rtentry **)0);
- else
- /*
- * A new route can be allocated
- * the next time output is attempted.
- */
- rtfree(rt);
- }
-}
-
-/*
- * After a routing change, flush old routing
- * and allocate a (hopefully) better one.
- */
-static void
-in_rtchange(inp, errnum)
- register struct inpcb *inp;
- int errnum;
-{
- if (inp->inp_route.ro_rt) {
- rtfree(inp->inp_route.ro_rt);
- inp->inp_route.ro_rt = 0;
- /*
- * A new route can be allocated the next time
- * output is attempted.
- */
- }
-}
-
-struct inpcb *
-in_pcblookup(pcbinfo, faddr, fport_arg, laddr, lport_arg, wild_okay)
- struct inpcbinfo *pcbinfo;
- struct in_addr faddr, laddr;
- u_int fport_arg, lport_arg;
- int wild_okay;
-{
- register struct inpcb *inp, *match = NULL;
- int matchwild = 3, wildcard;
- u_short fport = fport_arg, lport = lport_arg;
- int s;
-
- s = splnet();
-
- for (inp = pcbinfo->listhead->lh_first; inp != NULL; inp = inp->inp_list.le_next) {
- if (inp->inp_lport != lport)
- continue;
- wildcard = 0;
- if (inp->inp_faddr.s_addr != INADDR_ANY) {
- if (faddr.s_addr == INADDR_ANY)
- wildcard++;
- else if (inp->inp_faddr.s_addr != faddr.s_addr ||
- inp->inp_fport != fport)
- continue;
- } else {
- if (faddr.s_addr != INADDR_ANY)
- wildcard++;
- }
- if (inp->inp_laddr.s_addr != INADDR_ANY) {
- if (laddr.s_addr == INADDR_ANY)
- wildcard++;
- else if (inp->inp_laddr.s_addr != laddr.s_addr)
- continue;
- } else {
- if (laddr.s_addr != INADDR_ANY)
- wildcard++;
- }
- if (wildcard && wild_okay == 0)
- continue;
- if (wildcard < matchwild) {
- match = inp;
- matchwild = wildcard;
- if (matchwild == 0) {
- break;
- }
- }
- }
- splx(s);
- return (match);
-}
-
-/*
- * Lookup PCB in hash list.
- */
-struct inpcb *
-in_pcblookuphash(pcbinfo, faddr, fport_arg, laddr, lport_arg, wildcard)
- struct inpcbinfo *pcbinfo;
- struct in_addr faddr, laddr;
- u_int fport_arg, lport_arg;
- int wildcard;
-{
- struct inpcbhead *head;
- register struct inpcb *inp;
- u_short fport = fport_arg, lport = lport_arg;
- int s;
-
- s = splnet();
- /*
- * First look for an exact match.
- */
- head = &pcbinfo->hashbase[INP_PCBHASH(faddr.s_addr, lport, fport, pcbinfo->hashmask)];
- for (inp = head->lh_first; inp != NULL; inp = inp->inp_hash.le_next) {
- if (inp->inp_faddr.s_addr == faddr.s_addr &&
- inp->inp_laddr.s_addr == laddr.s_addr &&
- inp->inp_fport == fport &&
- inp->inp_lport == lport)
- goto found;
- }
- if (wildcard) {
- struct inpcb *local_wild = NULL;
-
- head = &pcbinfo->hashbase[INP_PCBHASH(INADDR_ANY, lport, 0, pcbinfo->hashmask)];
- for (inp = head->lh_first; inp != NULL; inp = inp->inp_hash.le_next) {
- if (inp->inp_faddr.s_addr == INADDR_ANY &&
- inp->inp_fport == 0 && inp->inp_lport == lport) {
- if (inp->inp_laddr.s_addr == laddr.s_addr)
- goto found;
- else if (inp->inp_laddr.s_addr == INADDR_ANY)
- local_wild = inp;
- }
- }
- if (local_wild != NULL) {
- inp = local_wild;
- goto found;
- }
- }
- splx(s);
- return (NULL);
-
-found:
- /*
- * Move PCB to head of this hash chain so that it can be
- * found more quickly in the future.
- * XXX - this is a pessimization on machines with few
- * concurrent connections.
- */
- if (inp != head->lh_first) {
- LIST_REMOVE(inp, inp_hash);
- LIST_INSERT_HEAD(head, inp, inp_hash);
- }
- splx(s);
- return (inp);
-}
-
-/*
- * Insert PCB into hash chain. Must be called at splnet.
- */
-static void
-in_pcbinshash(inp)
- struct inpcb *inp;
-{
- struct inpcbhead *head;
-
- head = &inp->inp_pcbinfo->hashbase[INP_PCBHASH(inp->inp_faddr.s_addr,
- inp->inp_lport, inp->inp_fport, inp->inp_pcbinfo->hashmask)];
-
- LIST_INSERT_HEAD(head, inp, inp_hash);
-}
-
-void
-in_pcbrehash(inp)
- struct inpcb *inp;
-{
- struct inpcbhead *head;
- int s;
-
- s = splnet();
- LIST_REMOVE(inp, inp_hash);
-
- head = &inp->inp_pcbinfo->hashbase[INP_PCBHASH(inp->inp_faddr.s_addr,
- inp->inp_lport, inp->inp_fport, inp->inp_pcbinfo->hashmask)];
-
- LIST_INSERT_HEAD(head, inp, inp_hash);
- splx(s);
-}
diff --git a/cpukit/libnetworking/netinet/in_pcb.h b/cpukit/libnetworking/netinet/in_pcb.h
deleted file mode 100644
index 9390cfda6c..0000000000
--- a/cpukit/libnetworking/netinet/in_pcb.h
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)in_pcb.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _NETINET_IN_PCB_H_
-#define _NETINET_IN_PCB_H_
-
-#include <sys/queue.h>
-
-/*
- * Common structure pcb for internet protocol implementation.
- * Here are stored pointers to local and foreign host table
- * entries, local and foreign socket numbers, and pointers
- * up (to a socket structure) and down (to a protocol-specific)
- * control block.
- */
-LIST_HEAD(inpcbhead, inpcb);
-
-struct inpcb {
- LIST_ENTRY(inpcb) inp_list; /* list for all PCBs of this proto */
- LIST_ENTRY(inpcb) inp_hash; /* hash list */
- struct inpcbinfo *inp_pcbinfo; /* PCB list info */
- struct in_addr inp_faddr; /* foreign host table entry */
- struct in_addr inp_laddr; /* local host table entry */
- u_short inp_fport; /* foreign port */
- u_short inp_lport; /* local port */
- caddr_t inp_ppcb; /* pointer to per-protocol pcb */
- struct socket *inp_socket; /* back pointer to socket */
- struct mbuf *inp_options; /* IP options */
- struct route inp_route; /* placeholder for routing entry */
- int inp_flags; /* generic IP/datagram flags */
- u_char inp_ip_tos; /* type of service proto */
- u_char inp_ip_ttl; /* time to live proto */
- u_char inp_ip_p; /* protocol proto */
- u_char pad[1]; /* alignment */
- struct ip_moptions *inp_moptions; /* IP multicast options */
-#if 0 /* Someday, perhaps... */
- struct ip inp_ip; /* header prototype; should have more */
-#endif
-};
-
-struct inpcbinfo {
- struct inpcbhead *listhead;
- struct inpcbhead *hashbase;
- unsigned long hashmask;
- unsigned short lastport;
- unsigned short lastlow;
- unsigned short lasthi;
-};
-
-#define INP_PCBHASH(faddr, lport, fport, mask) \
- (((faddr) ^ ((faddr) >> 16) ^ (lport) ^ (fport)) & (mask))
-
-/* flags in inp_flags: */
-#define INP_RECVOPTS 0x01 /* receive incoming IP options */
-#define INP_RECVRETOPTS 0x02 /* receive IP options for reply */
-#define INP_RECVDSTADDR 0x04 /* receive IP dst address */
-#define INP_HDRINCL 0x08 /* user supplies entire IP header */
-#define INP_HIGHPORT 0x10 /* user wants "high" port binding */
-#define INP_LOWPORT 0x20 /* user wants "low" port binding */
-#define INP_ANONPORT 0x40 /* port chosen for user */
-#define INP_RECVIF 0x80 /* receive incoming interface */
-#define INP_CONTROLOPTS (INP_RECVOPTS|INP_RECVRETOPTS|INP_RECVDSTADDR|\
- INP_RECVIF)
-
-#define INPLOOKUP_WILDCARD 1
-
-#define sotoinpcb(so) ((struct inpcb *)(so)->so_pcb)
-
-#ifdef KERNEL
-void in_losing __P((struct inpcb *));
-int in_pcballoc __P((struct socket *, struct inpcbinfo *));
-int in_pcbbind __P((struct inpcb *, struct mbuf *));
-int in_pcbconnect __P((struct inpcb *, struct mbuf *));
-void in_pcbdetach __P((struct inpcb *));
-void in_pcbdisconnect __P((struct inpcb *));
-int in_pcbladdr __P((struct inpcb *, struct mbuf *,
- struct sockaddr_in **));
-struct inpcb *
- in_pcblookup __P((struct inpcbinfo *,
- struct in_addr, u_int, struct in_addr, u_int, int));
-struct inpcb *
- in_pcblookuphash __P((struct inpcbinfo *,
- struct in_addr, u_int, struct in_addr, u_int, int));
-void in_pcbnotify __P((struct inpcbhead *, struct sockaddr *,
- u_int, struct in_addr, u_int, int, void (*)(struct inpcb *, int)));
-void in_pcbrehash __P((struct inpcb *));
-void in_setpeeraddr __P((struct inpcb *, struct mbuf *));
-void in_setsockaddr __P((struct inpcb *, struct mbuf *));
-#endif
-
-#endif
diff --git a/cpukit/libnetworking/netinet/in_proto.c b/cpukit/libnetworking/netinet/in_proto.c
deleted file mode 100644
index 3fa845955e..0000000000
--- a/cpukit/libnetworking/netinet/in_proto.c
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)in_proto.c 8.2 (Berkeley) 2/9/95
- * $Id$
- */
-
-#include "opt_tcpdebug.h"
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/kernel.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/domain.h>
-#include <sys/mbuf.h>
-#include <sys/protosw.h>
-#include <sys/sysctl.h>
-
-#include <net/if.h>
-#include <net/radix.h>
-#include <net/route.h>
-
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/ip_var.h>
-#include <netinet/ip_icmp.h>
-#include <netinet/in_pcb.h>
-#include <netinet/igmp_var.h>
-#include <netinet/tcp.h>
-#include <netinet/tcp_fsm.h>
-#include <netinet/tcp_seq.h>
-#include <netinet/tcp_timer.h>
-#include <netinet/tcp_var.h>
-#include <netinet/tcpip.h>
-#ifdef TCPDEBUG
-#include <netinet/tcp_debug.h>
-#endif
-#include <netinet/udp.h>
-#include <netinet/udp_var.h>
-/*
- * TCP/IP protocol family: IP, ICMP, UDP, TCP.
- */
-
-#ifdef IPXIP
-#include <netipx/ipx.h>
-#include <netipx/ipx_ip.h>
-#endif
-
-#ifdef NSIP
-#include <netns/ns.h>
-#include <netns/ns_if.h>
-#endif
-
-#ifdef TPIP
-void tpip_input(), tpip_ctlinput(), tp_init(), tp_slowtimo(), tp_drain();
-int tp_ctloutput(), tp_usrreq();
-#endif
-
-#ifdef EON
-void eoninput(), eonctlinput(), eonprotoinit();
-#endif /* EON */
-
-extern struct domain inetdomain;
-
-struct protosw inetsw[] = {
-{ 0, &inetdomain, 0, 0,
- 0, 0, 0, 0,
- 0,
- ip_init, 0, ip_slowtimo, ip_drain
-},
-{ SOCK_DGRAM, &inetdomain, IPPROTO_UDP, PR_ATOMIC|PR_ADDR,
- udp_input, 0, udp_ctlinput, ip_ctloutput,
- udp_usrreq,
- udp_init
-},
-{ SOCK_STREAM, &inetdomain, IPPROTO_TCP,
- PR_CONNREQUIRED|PR_IMPLOPCL|PR_WANTRCVD,
- tcp_input, 0, tcp_ctlinput, tcp_ctloutput,
- 0,
- tcp_init, tcp_fasttimo, tcp_slowtimo, tcp_drain,
- &tcp_usrreqs
-},
-{ SOCK_RAW, &inetdomain, IPPROTO_RAW, PR_ATOMIC|PR_ADDR,
- rip_input, 0, 0, rip_ctloutput,
- rip_usrreq,
- 0, 0, 0, 0,
-},
-{ SOCK_RAW, &inetdomain, IPPROTO_ICMP, PR_ATOMIC|PR_ADDR,
- icmp_input, 0, 0, rip_ctloutput,
- rip_usrreq
-},
-{ SOCK_RAW, &inetdomain, IPPROTO_IGMP, PR_ATOMIC|PR_ADDR,
- igmp_input, 0, 0, rip_ctloutput,
- rip_usrreq,
- igmp_init, igmp_fasttimo, igmp_slowtimo
-},
-{ SOCK_RAW, &inetdomain, IPPROTO_RSVP, PR_ATOMIC|PR_ADDR,
- rsvp_input, 0, 0, rip_ctloutput,
- rip_usrreq,
- 0, 0, 0, 0,
-},
-{ SOCK_RAW, &inetdomain, IPPROTO_IPIP, PR_ATOMIC|PR_ADDR,
- ipip_input, 0, 0, rip_ctloutput,
- rip_usrreq,
- 0, 0, 0, 0,
-},
-#ifdef IPDIVERT
-{ SOCK_RAW, &inetdomain, IPPROTO_DIVERT, PR_ATOMIC|PR_ADDR,
- div_input, 0, 0, ip_ctloutput,
- div_usrreq,
- div_init, 0, 0, 0,
-},
-#endif
-#ifdef TPIP
-{ SOCK_SEQPACKET,&inetdomain, IPPROTO_TP, PR_CONNREQUIRED|PR_WANTRCVD,
- tpip_input, 0, tpip_ctlinput, tp_ctloutput,
- tp_usrreq,
- tp_init, 0, tp_slowtimo, tp_drain,
-},
-#endif
-/* EON (ISO CLNL over IP) */
-#ifdef EON
-{ SOCK_RAW, &inetdomain, IPPROTO_EON, 0,
- eoninput, 0, eonctlinput, 0,
- 0,
- eonprotoinit, 0, 0, 0,
-},
-#endif
-#ifdef IPXIP
-{ SOCK_RAW, &inetdomain, IPPROTO_IDP, PR_ATOMIC|PR_ADDR,
- ipxip_input, 0, ipxip_ctlinput, 0,
- rip_usrreq,
- 0, 0, 0, 0,
-},
-#endif
-#ifdef NSIP
-{ SOCK_RAW, &inetdomain, IPPROTO_IDP, PR_ATOMIC|PR_ADDR,
- idpip_input, 0, nsip_ctlinput, 0,
- rip_usrreq,
- 0, 0, 0, 0,
-},
-#endif
- /* raw wildcard */
-{ SOCK_RAW, &inetdomain, 0, PR_ATOMIC|PR_ADDR,
- rip_input, 0, 0, rip_ctloutput,
- rip_usrreq,
- rip_init, 0, 0, 0,
-},
-};
-
-extern int in_inithead(void **, int);
-
-struct domain inetdomain =
- { AF_INET, "internet", 0, 0, 0,
- inetsw, &inetsw[sizeof(inetsw)/sizeof(inetsw[0])], 0,
- in_inithead, 32, sizeof(struct sockaddr_in)
- };
-
-DOMAIN_SET(inet);
-
-SYSCTL_NODE(_net, PF_INET, inet, CTLFLAG_RW, 0,
- "Internet Family");
-
-SYSCTL_NODE(_net_inet, IPPROTO_IP, ip, CTLFLAG_RW, 0, "IP");
-SYSCTL_NODE(_net_inet, IPPROTO_ICMP, icmp, CTLFLAG_RW, 0, "ICMP");
-SYSCTL_NODE(_net_inet, IPPROTO_UDP, udp, CTLFLAG_RW, 0, "UDP");
-SYSCTL_NODE(_net_inet, IPPROTO_TCP, tcp, CTLFLAG_RW, 0, "TCP");
-SYSCTL_NODE(_net_inet, IPPROTO_IGMP, igmp, CTLFLAG_RW, 0, "IGMP");
-#ifdef IPDIVERT
-SYSCTL_NODE(_net_inet, IPPROTO_DIVERT, div, CTLFLAG_RW, 0, "DIVERT");
-#endif
-
diff --git a/cpukit/libnetworking/netinet/in_rmx.c b/cpukit/libnetworking/netinet/in_rmx.c
deleted file mode 100644
index ba1793b3b4..0000000000
--- a/cpukit/libnetworking/netinet/in_rmx.c
+++ /dev/null
@@ -1,384 +0,0 @@
-/*
- * Copyright 1994, 1995 Massachusetts Institute of Technology
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby
- * granted, provided that both the above copyright notice and this
- * permission notice appear in all copies, that both the above
- * copyright notice and this permission notice appear in all
- * supporting documentation, and that the name of M.I.T. not be used
- * in advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission. M.I.T. makes
- * no representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied
- * warranty.
- *
- * THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''. M.I.T. DISCLAIMS
- * ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
- * SHALL M.I.T. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-/*
- * This code does two things necessary for the enhanced TCP metrics to
- * function in a useful manner:
- * 1) It marks all non-host routes as `cloning', thus ensuring that
- * every actual reference to such a route actually gets turned
- * into a reference to a host route to the specific destination
- * requested.
- * 2) When such routes lose all their references, it arranges for them
- * to be deleted in some random collection of circumstances, so that
- * a large quantity of stale routing data is not kept in kernel memory
- * indefinitely. See in_rtqtimo() below for the exact mechanism.
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/sysctl.h>
-#include <sys/queue.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/mbuf.h>
-#include <sys/syslog.h>
-
-#include <net/if.h>
-#include <net/route.h>
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/in_var.h>
-
-#include <netinet/ip.h>
-#include <netinet/ip_var.h>
-
-#include <netinet/tcp.h>
-#include <netinet/tcp_seq.h>
-#include <netinet/tcp_timer.h>
-#include <netinet/tcp_var.h>
-
-extern int in_inithead __P((void **head, int off));
-
-#define RTPRF_OURS RTF_PROTO3 /* set on routes we manage */
-
-/*
- * Do what we need to do when inserting a route.
- */
-static struct radix_node *
-in_addroute(void *v_arg, void *n_arg, struct radix_node_head *head,
- struct radix_node *treenodes)
-{
- struct rtentry *rt = (struct rtentry *)treenodes;
- struct sockaddr_in *sin = (struct sockaddr_in *)rt_key(rt);
- struct radix_node *ret;
-
- /*
- * For IP, all unicast non-host routes are automatically cloning.
- */
- if(IN_MULTICAST(ntohl(sin->sin_addr.s_addr)))
- rt->rt_flags |= RTF_MULTICAST;
-
- if(!(rt->rt_flags & (RTF_HOST | RTF_CLONING | RTF_MULTICAST))) {
- rt->rt_flags |= RTF_PRCLONING;
- }
-
- /*
- * A little bit of help for both IP output and input:
- * For host routes, we make sure that RTF_BROADCAST
- * is set for anything that looks like a broadcast address.
- * This way, we can avoid an expensive call to in_broadcast()
- * in ip_output() most of the time (because the route passed
- * to ip_output() is almost always a host route).
- *
- * We also do the same for local addresses, with the thought
- * that this might one day be used to speed up ip_input().
- *
- * We also mark routes to multicast addresses as such, because
- * it's easy to do and might be useful (but this is much more
- * dubious since it's so easy to inspect the address). (This
- * is done above.)
- */
- if (rt->rt_flags & RTF_HOST) {
- if (in_broadcast(sin->sin_addr, rt->rt_ifp)) {
- rt->rt_flags |= RTF_BROADCAST;
- } else {
-#define satosin(sa) ((struct sockaddr_in *)sa)
- if (satosin(rt->rt_ifa->ifa_addr)->sin_addr.s_addr
- == sin->sin_addr.s_addr)
- rt->rt_flags |= RTF_LOCAL;
-#undef satosin
- }
- }
-
- /*
- * We also specify a send and receive pipe size for every
- * route added, to help TCP a bit. TCP doesn't actually
- * want a true pipe size, which would be prohibitive in memory
- * costs and is hard to compute anyway; it simply uses these
- * values to size its buffers. So, we fill them in with the
- * same values that TCP would have used anyway, and allow the
- * installing program or the link layer to override these values
- * as it sees fit. This will hopefully allow TCP more
- * opportunities to save its ssthresh value.
- */
- if (!rt->rt_rmx.rmx_sendpipe && !(rt->rt_rmx.rmx_locks & RTV_SPIPE))
- rt->rt_rmx.rmx_sendpipe = tcp_sendspace;
-
- if (!rt->rt_rmx.rmx_recvpipe && !(rt->rt_rmx.rmx_locks & RTV_RPIPE))
- rt->rt_rmx.rmx_recvpipe = tcp_recvspace;
-
- if (!rt->rt_rmx.rmx_mtu && !(rt->rt_rmx.rmx_locks & RTV_MTU)
- && rt->rt_ifp)
- rt->rt_rmx.rmx_mtu = rt->rt_ifp->if_mtu;
-
- ret = rn_addroute(v_arg, n_arg, head, treenodes);
- if (ret == NULL && rt->rt_flags & RTF_HOST) {
- struct rtentry *rt2;
- /*
- * We are trying to add a host route, but can't.
- * Find out if it is because of an
- * ARP entry and delete it if so.
- */
- rt2 = rtalloc1((struct sockaddr *)sin, 0,
- RTF_CLONING | RTF_PRCLONING);
- if (rt2) {
- if (rt2->rt_flags & RTF_LLINFO &&
- rt2->rt_flags & RTF_HOST &&
- rt2->rt_gateway &&
- rt2->rt_gateway->sa_family == AF_LINK) {
- rtrequest(RTM_DELETE,
- (struct sockaddr *)rt_key(rt2),
- rt2->rt_gateway,
- rt_mask(rt2), rt2->rt_flags, 0);
- ret = rn_addroute(v_arg, n_arg, head,
- treenodes);
- }
- RTFREE(rt2);
- }
- }
- return ret;
-}
-
-/*
- * This code is the inverse of in_clsroute: on first reference, if we
- * were managing the route, stop doing so and set the expiration timer
- * back off again.
- */
-static struct radix_node *
-in_matroute(void *v_arg, struct radix_node_head *head)
-{
- struct radix_node *rn = rn_match(v_arg, head);
- struct rtentry *rt = (struct rtentry *)rn;
-
- if(rt && rt->rt_refcnt == 0) { /* this is first reference */
- if(rt->rt_flags & RTPRF_OURS) {
- rt->rt_flags &= ~RTPRF_OURS;
- rt->rt_rmx.rmx_expire = 0;
- }
- }
- return rn;
-}
-
-static int rtq_reallyold = 60*60;
- /* one hour is ``really old'' */
-SYSCTL_INT(_net_inet_ip, IPCTL_RTEXPIRE, rtexpire,
- CTLFLAG_RW, &rtq_reallyold , 0, "");
-
-static int rtq_minreallyold = 10;
- /* never automatically crank down to less */
-SYSCTL_INT(_net_inet_ip, IPCTL_RTMINEXPIRE, rtminexpire,
- CTLFLAG_RW, &rtq_minreallyold , 0, "");
-
-static int rtq_toomany = 128;
- /* 128 cached routes is ``too many'' */
-SYSCTL_INT(_net_inet_ip, IPCTL_RTMAXCACHE, rtmaxcache,
- CTLFLAG_RW, &rtq_toomany , 0, "");
-
-
-/*
- * On last reference drop, mark the route as belong to us so that it can be
- * timed out.
- */
-static void
-in_clsroute(struct radix_node *rn, struct radix_node_head *head)
-{
- struct rtentry *rt = (struct rtentry *)rn;
-
- if(!(rt->rt_flags & RTF_UP))
- return; /* prophylactic measures */
-
- if((rt->rt_flags & (RTF_LLINFO | RTF_HOST)) != RTF_HOST)
- return;
-
- if((rt->rt_flags & (RTF_WASCLONED | RTPRF_OURS))
- != RTF_WASCLONED)
- return;
-
- /*
- * As requested by David Greenman:
- * If rtq_reallyold is 0, just delete the route without
- * waiting for a timeout cycle to kill it.
- */
- if(rtq_reallyold != 0) {
- rt->rt_flags |= RTPRF_OURS;
- rt->rt_rmx.rmx_expire = rtems_bsdnet_seconds_since_boot() + rtq_reallyold;
- } else {
- rtrequest(RTM_DELETE,
- (struct sockaddr *)rt_key(rt),
- rt->rt_gateway, rt_mask(rt),
- rt->rt_flags, 0);
- }
-}
-
-struct rtqk_arg {
- struct radix_node_head *rnh;
- int draining;
- int killed;
- int found;
- int updating;
- time_t nextstop;
-};
-
-/*
- * Get rid of old routes. When draining, this deletes everything, even when
- * the timeout is not expired yet. When updating, this makes sure that
- * nothing has a timeout longer than the current value of rtq_reallyold.
- */
-static int
-in_rtqkill(struct radix_node *rn, void *rock)
-{
- struct rtqk_arg *ap = rock;
- struct rtentry *rt = (struct rtentry *)rn;
- int err;
-
- if(rt->rt_flags & RTPRF_OURS) {
- ap->found++;
-
- if(ap->draining || rt->rt_rmx.rmx_expire <= rtems_bsdnet_seconds_since_boot()) {
- if(rt->rt_refcnt > 0)
- panic("rtqkill route really not free");
-
- err = rtrequest(RTM_DELETE,
- (struct sockaddr *)rt_key(rt),
- rt->rt_gateway, rt_mask(rt),
- rt->rt_flags, 0);
- if(err) {
- log(LOG_WARNING, "in_rtqkill: error %d\n", err);
- } else {
- ap->killed++;
- }
- } else {
- if(ap->updating
- && (rt->rt_rmx.rmx_expire - rtems_bsdnet_seconds_since_boot()
- > rtq_reallyold)) {
- rt->rt_rmx.rmx_expire = rtems_bsdnet_seconds_since_boot()
- + rtq_reallyold;
- }
- ap->nextstop = lmin(ap->nextstop,
- rt->rt_rmx.rmx_expire);
- }
- }
-
- return 0;
-}
-
-#define RTQ_TIMEOUT 60*10 /* run no less than once every ten minutes */
-static int rtq_timeout = RTQ_TIMEOUT;
-
-static void
-in_rtqtimo(void *rock)
-{
- struct radix_node_head *rnh = rock;
- struct rtqk_arg arg;
- struct timeval atv;
- static time_t last_adjusted_timeout = 0;
- int s;
-
- arg.found = arg.killed = 0;
- arg.rnh = rnh;
- arg.nextstop = rtems_bsdnet_seconds_since_boot() + rtq_timeout;
- arg.draining = arg.updating = 0;
- s = splnet();
- rnh->rnh_walktree(rnh, in_rtqkill, &arg);
- splx(s);
-
- /*
- * Attempt to be somewhat dynamic about this:
- * If there are ``too many'' routes sitting around taking up space,
- * then crank down the timeout, and see if we can't make some more
- * go away. However, we make sure that we will never adjust more
- * than once in rtq_timeout seconds, to keep from cranking down too
- * hard.
- */
- if((arg.found - arg.killed > rtq_toomany)
- && (rtems_bsdnet_seconds_since_boot() - last_adjusted_timeout >= rtq_timeout)
- && rtq_reallyold > rtq_minreallyold) {
- rtq_reallyold = 2*rtq_reallyold / 3;
- if(rtq_reallyold < rtq_minreallyold) {
- rtq_reallyold = rtq_minreallyold;
- }
-
- last_adjusted_timeout = rtems_bsdnet_seconds_since_boot();
-#ifdef DIAGNOSTIC
- log(LOG_DEBUG, "in_rtqtimo: adjusted rtq_reallyold to %d\n",
- rtq_reallyold);
-#endif
- arg.found = arg.killed = 0;
- arg.updating = 1;
- s = splnet();
- rnh->rnh_walktree(rnh, in_rtqkill, &arg);
- splx(s);
- }
-
- atv.tv_usec = 0;
- atv.tv_sec = arg.nextstop;
- timeout(in_rtqtimo, rock, hzto(&atv));
-}
-
-void
-in_rtqdrain(void)
-{
- struct radix_node_head *rnh = rt_tables[AF_INET];
- struct rtqk_arg arg;
- int s;
- arg.found = arg.killed = 0;
- arg.rnh = rnh;
- arg.nextstop = 0;
- arg.draining = 1;
- arg.updating = 0;
- s = splnet();
- rnh->rnh_walktree(rnh, in_rtqkill, &arg);
- splx(s);
-}
-
-/*
- * Initialize our routing tree.
- */
-int
-in_inithead(void **head, int off)
-{
- struct radix_node_head *rnh;
-
- if(!rn_inithead(head, off))
- return 0;
-
- if(head != (void **)&rt_tables[AF_INET]) /* BOGUS! */
- return 1; /* only do this for the real routing table */
-
- rnh = *head;
- rnh->rnh_addaddr = in_addroute;
- rnh->rnh_matchaddr = in_matroute;
- rnh->rnh_close = in_clsroute;
- in_rtqtimo(rnh); /* kick off timeout first time */
- return 1;
-}
-
diff --git a/cpukit/libnetworking/netinet/in_systm.h b/cpukit/libnetworking/netinet/in_systm.h
deleted file mode 100644
index d72e9b4665..0000000000
--- a/cpukit/libnetworking/netinet/in_systm.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)in_systm.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _NETINET_IN_SYSTM_H_
-#define _NETINET_IN_SYSTM_H_
-
-/*
- * Miscellaneous internetwork
- * definitions for kernel.
- */
-
-/*
- * Network types.
- *
- * Internally the system keeps counters in the headers with the bytes
- * swapped so that VAX instructions will work on them. It reverses
- * the bytes before transmission at each protocol level. The n_ types
- * represent the types with the bytes in ``high-ender'' order.
- */
-typedef u_short n_short; /* short as received from the net */
-typedef u_long n_long; /* long as received from the net */
-
-typedef u_long n_time; /* ms since 00:00 GMT, byte rev */
-
-#ifdef KERNEL
-n_time iptime __P((void));
-#endif
-
-#endif
diff --git a/cpukit/libnetworking/netinet/in_var.h b/cpukit/libnetworking/netinet/in_var.h
deleted file mode 100644
index e7a54d5e85..0000000000
--- a/cpukit/libnetworking/netinet/in_var.h
+++ /dev/null
@@ -1,235 +0,0 @@
-/*
- * Copyright (c) 1985, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)in_var.h 8.2 (Berkeley) 1/9/95
- * $Id$
- */
-
-#ifndef _NETINET_IN_VAR_H_
-#define _NETINET_IN_VAR_H_
-
-#include <sys/queue.h>
-
-/*
- * Interface address, Internet version. One of these structures
- * is allocated for each interface with an Internet address.
- * The ifaddr structure contains the protocol-independent part
- * of the structure and is assumed to be first.
- */
-struct in_ifaddr {
- struct ifaddr ia_ifa; /* protocol-independent info */
-#define ia_ifp ia_ifa.ifa_ifp
-#define ia_flags ia_ifa.ifa_flags
- /* ia_{,sub}net{,mask} in host order */
- u_long ia_net; /* network number of interface */
- u_long ia_netmask; /* mask of net part */
- u_long ia_subnet; /* subnet number, including net */
- u_long ia_subnetmask; /* mask of subnet part */
- struct in_addr ia_netbroadcast; /* to recognize net broadcasts */
- struct in_ifaddr *ia_next; /* next in list of internet addresses */
- struct sockaddr_in ia_addr; /* reserve space for interface name */
- struct sockaddr_in ia_dstaddr; /* reserve space for broadcast addr */
-#define ia_broadaddr ia_dstaddr
- struct sockaddr_in ia_sockmask; /* reserve space for general netmask */
- LIST_HEAD(in_multihead, in_multi) ia_multiaddrs;
- /* list of multicast addresses */
-};
-
-struct in_aliasreq {
- char ifra_name[IFNAMSIZ]; /* if name, e.g. "en0" */
- struct sockaddr_in ifra_addr;
- struct sockaddr_in ifra_broadaddr;
-#define ifra_dstaddr ifra_broadaddr
- struct sockaddr_in ifra_mask;
-};
-/*
- * Given a pointer to an in_ifaddr (ifaddr),
- * return a pointer to the addr as a sockaddr_in.
- */
-#define IA_SIN(ia) (&(((struct in_ifaddr *)(ia))->ia_addr))
-#define IA_DSTSIN(ia) (&(((struct in_ifaddr *)(ia))->ia_dstaddr))
-
-#define IN_LNAOF(in, ifa) \
- ((ntohl((in).s_addr) & ~((struct in_ifaddr *)(ifa)->ia_subnetmask))
-
-
-#ifdef KERNEL
-extern struct in_ifaddr *in_ifaddr;
-extern struct ifqueue ipintrq; /* ip packet input queue */
-extern struct in_addr zeroin_addr;
-extern u_char inetctlerrmap[];
-extern int rtq_reallyold; /* XXX */
-extern int rtq_minreallyold; /* XXX */
-extern int rtq_toomany; /* XXX */
-
-/*
- * Macro for finding the interface (ifnet structure) corresponding to one
- * of our IP addresses.
- */
-#define INADDR_TO_IFP(addr, ifp) \
- /* struct in_addr addr; */ \
- /* struct ifnet *ifp; */ \
-{ \
- register struct in_ifaddr *ia; \
-\
- for (ia = in_ifaddr; \
- ia != NULL && ((ia->ia_ifp->if_flags & IFF_POINTOPOINT)? \
- IA_DSTSIN(ia):IA_SIN(ia))->sin_addr.s_addr != (addr).s_addr; \
- ia = ia->ia_next) \
- continue; \
- if (ia == NULL) \
- for (ia = in_ifaddr; \
- ia != NULL; \
- ia = ia->ia_next) \
- if (ia->ia_ifp->if_flags & IFF_POINTOPOINT && \
- IA_SIN(ia)->sin_addr.s_addr == (addr).s_addr) \
- break; \
- (ifp) = (ia == NULL) ? NULL : ia->ia_ifp; \
-}
-
-/*
- * Macro for finding the internet address structure (in_ifaddr) corresponding
- * to a given interface (ifnet structure).
- */
-#define IFP_TO_IA(ifp, ia) \
- /* struct ifnet *ifp; */ \
- /* struct in_ifaddr *ia; */ \
-{ \
- for ((ia) = in_ifaddr; \
- (ia) != NULL && (ia)->ia_ifp != (ifp); \
- (ia) = (ia)->ia_next) \
- continue; \
-}
-#endif
-
-/*
- * This information should be part of the ifnet structure but we don't wish
- * to change that - as it might break a number of things
- */
-
-struct router_info {
- struct ifnet *rti_ifp;
- int rti_type; /* type of router which is querier on this interface */
- int rti_time; /* # of slow timeouts since last old query */
- struct router_info *rti_next;
-};
-
-/*
- * Internet multicast address structure. There is one of these for each IP
- * multicast group to which this host belongs on a given network interface.
- * They are kept in a linked list, rooted in the interface's in_ifaddr
- * structure.
- */
-struct in_multi {
- LIST_ENTRY(in_multi) inm_entry; /* list glue */
- struct in_addr inm_addr; /* IP multicast address */
- struct ifnet *inm_ifp; /* back pointer to ifnet */
- struct in_ifaddr *inm_ia; /* back pointer to in_ifaddr */
- u_int inm_refcount; /* no. membership claims by sockets */
- u_int inm_timer; /* IGMP membership report timer */
- u_int inm_state; /* state of the membership */
- struct router_info *inm_rti; /* router info*/
-};
-
-#ifdef KERNEL
-/*
- * Structure used by macros below to remember position when stepping through
- * all of the in_multi records.
- */
-struct in_multistep {
- struct in_ifaddr *i_ia;
- struct in_multi *i_inm;
-};
-
-/*
- * Macro for looking up the in_multi record for a given IP multicast address
- * on a given interface. If no matching record is found, "inm" returns NULL.
- */
-#define IN_LOOKUP_MULTI(addr, ifp, inm) \
- /* struct in_addr addr; */ \
- /* struct ifnet *ifp; */ \
- /* struct in_multi *inm; */ \
-{ \
- register struct in_ifaddr *ia; \
-\
- IFP_TO_IA((ifp), ia); \
- if (ia == NULL) \
- (inm) = NULL; \
- else \
- for ((inm) = ia->ia_multiaddrs.lh_first; \
- (inm) != NULL && (inm)->inm_addr.s_addr != (addr).s_addr; \
- (inm) = inm->inm_entry.le_next) \
- continue; \
-}
-
-/*
- * Macro to step through all of the in_multi records, one at a time.
- * The current position is remembered in "step", which the caller must
- * provide. IN_FIRST_MULTI(), below, must be called to initialize "step"
- * and get the first record. Both macros return a NULL "inm" when there
- * are no remaining records.
- */
-#define IN_NEXT_MULTI(step, inm) \
- /* struct in_multistep step; */ \
- /* struct in_multi *inm; */ \
-{ \
- if (((inm) = (step).i_inm) != NULL) \
- (step).i_inm = (inm)->inm_entry.le_next; \
- else \
- while ((step).i_ia != NULL) { \
- (inm) = (step).i_ia->ia_multiaddrs.lh_first; \
- (step).i_ia = (step).i_ia->ia_next; \
- if ((inm) != NULL) { \
- (step).i_inm = (inm)->inm_entry.le_next; \
- break; \
- } \
- } \
-}
-
-#define IN_FIRST_MULTI(step, inm) \
- /* struct in_multistep step; */ \
- /* struct in_multi *inm; */ \
-{ \
- (step).i_ia = in_ifaddr; \
- (step).i_inm = NULL; \
- IN_NEXT_MULTI((step), (inm)); \
-}
-
-struct in_multi *in_addmulti __P((struct in_addr *, struct ifnet *));
-void in_delmulti __P((struct in_multi *));
-int in_control __P((struct socket *, u_long, caddr_t, struct ifnet *));
-void in_rtqdrain __P((void));
-void ip_input __P((struct mbuf *));
-
-#endif /* KERNEL */
-
-#endif /* _NETINET_IN_VAR_H_ */
diff --git a/cpukit/libnetworking/netinet/ip.h b/cpukit/libnetworking/netinet/ip.h
deleted file mode 100644
index e7f824ca6f..0000000000
--- a/cpukit/libnetworking/netinet/ip.h
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ip.h 8.2 (Berkeley) 6/1/94
- * $Id$
- */
-
-#ifndef _NETINET_IP_H_
-#define _NETINET_IP_H_
-
-/*
- * Definitions for internet protocol version 4.
- * Per RFC 791, September 1981.
- */
-#define IPVERSION 4
-
-/*
- * Structure of an internet header, naked of options.
- *
- * We declare ip_len and ip_off to be short, rather than u_short
- * pragmatically since otherwise unsigned comparisons can result
- * against negative integers quite easily, and fail in subtle ways.
- */
-struct ip {
-#ifdef _IP_VHL
- u_char ip_vhl; /* version << 4 | header length >> 2 */
-#else
-#if BYTE_ORDER == LITTLE_ENDIAN
- u_char ip_hl:4, /* header length */
- ip_v:4; /* version */
-#endif
-#if BYTE_ORDER == BIG_ENDIAN
- u_char ip_v:4, /* version */
- ip_hl:4; /* header length */
-#endif
-#endif /* not _IP_VHL */
- u_char ip_tos; /* type of service */
- u_short ip_len; /* total length */
- u_short ip_id; /* identification */
- u_short ip_off; /* fragment offset field */
-#define IP_RF 0x8000 /* reserved fragment flag */
-#define IP_DF 0x4000 /* dont fragment flag */
-#define IP_MF 0x2000 /* more fragments flag */
-#define IP_OFFMASK 0x1fff /* mask for fragmenting bits */
- u_char ip_ttl; /* time to live */
- u_char ip_p; /* protocol */
- u_short ip_sum; /* checksum */
- struct in_addr ip_src,ip_dst; /* source and dest address */
-};
-
-#ifdef _IP_VHL
-#define IP_MAKE_VHL(v, hl) ((v) << 4 | (hl))
-#define IP_VHL_HL(vhl) ((vhl) & 0x0f)
-#define IP_VHL_V(vhl) ((vhl) >> 4)
-#define IP_VHL_BORING 0x45
-#endif
-
-#define IP_MAXPACKET 65535 /* maximum packet size */
-
-/*
- * Definitions for IP type of service (ip_tos)
- */
-#define IPTOS_LOWDELAY 0x10
-#define IPTOS_THROUGHPUT 0x08
-#define IPTOS_RELIABILITY 0x04
-#define IPTOS_MINCOST 0x02
-
-/*
- * Definitions for IP precedence (also in ip_tos) (hopefully unused)
- */
-#define IPTOS_PREC_NETCONTROL 0xe0
-#define IPTOS_PREC_INTERNETCONTROL 0xc0
-#define IPTOS_PREC_CRITIC_ECP 0xa0
-#define IPTOS_PREC_FLASHOVERRIDE 0x80
-#define IPTOS_PREC_FLASH 0x60
-#define IPTOS_PREC_IMMEDIATE 0x40
-#define IPTOS_PREC_PRIORITY 0x20
-#define IPTOS_PREC_ROUTINE 0x00
-
-/*
- * Definitions for options.
- */
-#define IPOPT_COPIED(o) ((o)&0x80)
-#define IPOPT_CLASS(o) ((o)&0x60)
-#define IPOPT_NUMBER(o) ((o)&0x1f)
-
-#define IPOPT_CONTROL 0x00
-#define IPOPT_RESERVED1 0x20
-#define IPOPT_DEBMEAS 0x40
-#define IPOPT_RESERVED2 0x60
-
-#define IPOPT_EOL 0 /* end of option list */
-#define IPOPT_NOP 1 /* no operation */
-
-#define IPOPT_RR 7 /* record packet route */
-#define IPOPT_TS 68 /* timestamp */
-#define IPOPT_SECURITY 130 /* provide s,c,h,tcc */
-#define IPOPT_LSRR 131 /* loose source route */
-#define IPOPT_SATID 136 /* satnet id */
-#define IPOPT_SSRR 137 /* strict source route */
-#define IPOPT_RA 148 /* router alert */
-
-/*
- * Offsets to fields in options other than EOL and NOP.
- */
-#define IPOPT_OPTVAL 0 /* option ID */
-#define IPOPT_OLEN 1 /* option length */
-#define IPOPT_OFFSET 2 /* offset within option */
-#define IPOPT_MINOFF 4 /* min value of above */
-
-/*
- * Time stamp option structure.
- */
-struct ip_timestamp {
- u_char ipt_code; /* IPOPT_TS */
- u_char ipt_len; /* size of structure (variable) */
- u_char ipt_ptr; /* index of current entry */
-#if BYTE_ORDER == LITTLE_ENDIAN
- u_char ipt_flg:4, /* flags, see below */
- ipt_oflw:4; /* overflow counter */
-#endif
-#if BYTE_ORDER == BIG_ENDIAN
- u_char ipt_oflw:4, /* overflow counter */
- ipt_flg:4; /* flags, see below */
-#endif
- union ipt_timestamp {
- n_long ipt_time[1];
- struct ipt_ta {
- struct in_addr ipt_addr;
- n_long ipt_time;
- } ipt_ta[1];
- } ipt_timestamp;
-};
-
-#include <machine/in_cksum.h>
-
-/* flag bits for ipt_flg */
-#define IPOPT_TS_TSONLY 0 /* timestamps only */
-#define IPOPT_TS_TSANDADDR 1 /* timestamps and addresses */
-#define IPOPT_TS_PRESPEC 3 /* specified modules only */
-
-/* bits for security (not byte swapped) */
-#define IPOPT_SECUR_UNCLASS 0x0000
-#define IPOPT_SECUR_CONFID 0xf135
-#define IPOPT_SECUR_EFTO 0x789a
-#define IPOPT_SECUR_MMMM 0xbc4d
-#define IPOPT_SECUR_RESTR 0xaf13
-#define IPOPT_SECUR_SECRET 0xd788
-#define IPOPT_SECUR_TOPSECRET 0x6bc5
-
-/*
- * Internet implementation parameters.
- */
-#define MAXTTL 255 /* maximum time to live (seconds) */
-#define IPDEFTTL 64 /* default ttl, from RFC 1340 */
-#define IPFRAGTTL 60 /* time to live for frags, slowhz */
-#define IPTTLDEC 1 /* subtracted when forwarding */
-
-#define IP_MSS 576 /* default maximum segment size */
-
-#endif
diff --git a/cpukit/libnetworking/netinet/ip_divert.c b/cpukit/libnetworking/netinet/ip_divert.c
deleted file mode 100644
index 2955e811ad..0000000000
--- a/cpukit/libnetworking/netinet/ip_divert.c
+++ /dev/null
@@ -1,382 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/malloc.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-#include <sys/protosw.h>
-#include <sys/socketvar.h>
-#include <sys/errno.h>
-#include <sys/systm.h>
-
-#include <net/if.h>
-#include <net/route.h>
-
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/in_pcb.h>
-#include <netinet/in_var.h>
-#include <netinet/ip_var.h>
-
-/*
- * Divert sockets
- */
-
-/*
- * Allocate enough space to hold a full IP packet
- */
-#define DIVSNDQ (65536 + 100)
-#define DIVRCVQ (65536 + 100)
-
-/* Global variables */
-
-/*
- * ip_input() and ip_output() set this secret value before calling us to
- * let us know which divert port to divert a packet to; this is done so
- * we can use the existing prototype for struct protosw's pr_input().
- * This is stored in host order.
- */
-u_short ip_divert_port;
-
-/*
- * We set this value to a non-zero port number when we want the call to
- * ip_fw_chk() in ip_input() or ip_output() to ignore ``divert <port>''
- * chain entries. This is stored in host order.
- */
-u_short ip_divert_ignore;
-
-/* Internal variables */
-
-static struct inpcbhead divcb;
-static struct inpcbinfo divcbinfo;
-
-static u_long div_sendspace = DIVSNDQ; /* XXX sysctl ? */
-static u_long div_recvspace = DIVRCVQ; /* XXX sysctl ? */
-
-/* Optimization: have this preinitialized */
-static struct sockaddr_in divsrc = { sizeof(divsrc), AF_INET };
-
-/* Internal functions */
-
-static int div_output(struct socket *so,
- struct mbuf *m, struct mbuf *addr, struct mbuf *control);
-
-/*
- * Initialize divert connection block queue.
- */
-void
-div_init(void)
-{
- LIST_INIT(&divcb);
- divcbinfo.listhead = &divcb;
- /*
- * XXX We don't use the hash list for divert IP, but it's easier
- * to allocate a one entry hash list than it is to check all
- * over the place for hashbase == NULL.
- */
- divcbinfo.hashbase = hashinit(1, M_PCB, &divcbinfo.hashmask);
-}
-
-/*
- * Setup generic address and protocol structures
- * for div_input routine, then pass them along with
- * mbuf chain. ip->ip_len is assumed to have had
- * the header length (hlen) subtracted out already.
- * We tell whether the packet was incoming or outgoing
- * by seeing if hlen == 0, which is a hack.
- */
-void
-div_input(struct mbuf *m, int hlen)
-{
- struct ip *ip;
- struct inpcb *inp;
- struct socket *sa;
-
- /* Sanity check */
- if (ip_divert_port == 0)
- panic("div_input: port is 0");
-
- /* Assure header */
- if (m->m_len < sizeof(struct ip) &&
- (m = m_pullup(m, sizeof(struct ip))) == 0) {
- return;
- }
- ip = mtod(m, struct ip *);
-
- /* Record divert port */
- divsrc.sin_port = htons(ip_divert_port);
-
- /* Restore packet header fields */
- ip->ip_len += hlen;
- HTONS(ip->ip_len);
- HTONS(ip->ip_off);
-
- /* Record receive interface address, if any */
- divsrc.sin_addr.s_addr = 0;
- if (hlen) {
- struct ifaddr *ifa;
-
-#ifdef DIAGNOSTIC
- /* Sanity check */
- if (!(m->m_flags & M_PKTHDR))
- panic("div_input: no pkt hdr");
-#endif
-
- /* More fields affected by ip_input() */
- HTONS(ip->ip_id);
-
- /* Find IP address for recieve interface */
- for (ifa = m->m_pkthdr.rcvif->if_addrlist;
- ifa != NULL; ifa = ifa->ifa_next) {
- if (ifa->ifa_addr == NULL)
- continue;
- if (ifa->ifa_addr->sa_family != AF_INET)
- continue;
- divsrc.sin_addr =
- ((struct sockaddr_in *) ifa->ifa_addr)->sin_addr;
- break;
- }
- }
-
- /* Put packet on socket queue, if any */
- sa = NULL;
- for (inp = divcb.lh_first; inp != NULL; inp = inp->inp_list.le_next) {
- if (inp->inp_lport == htons(ip_divert_port))
- sa = inp->inp_socket;
- }
- if (sa) {
- if (sbappendaddr(&sa->so_rcv, (struct sockaddr *)&divsrc,
- m, (struct mbuf *)0) == 0)
- m_freem(m);
- else
- sorwakeup(sa);
- } else {
- m_freem(m);
- ipstat.ips_noproto++;
- ipstat.ips_delivered--;
- }
-}
-
-/*
- * Deliver packet back into the IP processing machinery.
- *
- * If no address specified, or address is 0.0.0.0, send to ip_output();
- * otherwise, send to ip_input() and mark as having been received on
- * the interface with that address.
- *
- * If no address specified, or dest port is 0, allow packet to divert
- * back to this socket; otherwise, don't.
- */
-static int
-div_output(so, m, addr, control)
- struct socket *so;
- register struct mbuf *m;
- struct mbuf *addr, *control;
-{
- register struct inpcb *const inp = sotoinpcb(so);
- register struct ip *const ip = mtod(m, struct ip *);
- struct sockaddr_in *sin = NULL;
- int error = 0;
-
- if (control)
- m_freem(control); /* XXX */
- if (addr)
- sin = mtod(addr, struct sockaddr_in *);
-
- /* Loopback avoidance option */
- ip_divert_ignore = ntohs(inp->inp_lport);
-
- /* Reinject packet into the system as incoming or outgoing */
- if (!sin || sin->sin_addr.s_addr == 0) {
- /* Don't allow both user specified and setsockopt options,
- and don't allow packet length sizes that will crash */
- if (((ip->ip_hl != (sizeof (*ip) >> 2)) && inp->inp_options) ||
- ((u_short)ntohs(ip->ip_len) > m->m_pkthdr.len)) {
- error = EINVAL;
- goto cantsend;
- }
-
- /* Convert fields to host order for ip_output() */
- NTOHS(ip->ip_len);
- NTOHS(ip->ip_off);
-
- /* Send packet to output processing */
- ipstat.ips_rawout++; /* XXX */
- error = ip_output(m, inp->inp_options, &inp->inp_route,
- (so->so_options & SO_DONTROUTE) |
- IP_ALLOWBROADCAST | IP_RAWOUTPUT, inp->inp_moptions);
- } else {
- struct ifaddr *ifa;
-
- /* Find receive interface with the given IP address */
- sin->sin_port = 0;
- if ((ifa = ifa_ifwithaddr((struct sockaddr *) sin)) == 0) {
- error = EADDRNOTAVAIL;
- goto cantsend;
- }
- m->m_pkthdr.rcvif = ifa->ifa_ifp;
-
- /* Send packet to input processing */
- ip_input(m);
- }
-
- /* Reset for next time (and other packets) */
- ip_divert_ignore = 0;
- return error;
-
-cantsend:
- ip_divert_ignore = 0;
- m_freem(m);
- return error;
-}
-
-/*ARGSUSED*/
-int
-div_usrreq(so, req, m, nam, control)
- register struct socket *so;
- int req;
- struct mbuf *m, *nam, *control;
-{
- register int error = 0;
- register struct inpcb *inp = sotoinpcb(so);
- int s;
-
- if (inp == NULL && req != PRU_ATTACH) {
- error = EINVAL;
- goto release;
- }
- switch (req) {
-
- case PRU_ATTACH:
- if (inp)
- panic("div_attach");
- if ((so->so_state & SS_PRIV) == 0) {
- error = EACCES;
- break;
- }
- s = splnet();
- error = in_pcballoc(so, &divcbinfo);
- splx(s);
- if (error)
- break;
- error = soreserve(so, div_sendspace, div_recvspace);
- if (error)
- break;
- inp = (struct inpcb *)so->so_pcb;
- inp->inp_ip_p = (int)nam; /* XXX */
- inp->inp_flags |= INP_HDRINCL;
- /* The socket is always "connected" because
- we always know "where" to send the packet */
- so->so_state |= SS_ISCONNECTED;
- break;
-
- case PRU_DISCONNECT:
- if ((so->so_state & SS_ISCONNECTED) == 0) {
- error = ENOTCONN;
- break;
- }
- /* FALLTHROUGH */
- case PRU_ABORT:
- soisdisconnected(so);
- /* FALLTHROUGH */
- case PRU_DETACH:
- if (inp == 0)
- panic("div_detach");
- in_pcbdetach(inp);
- break;
-
- case PRU_BIND:
- s = splnet();
- error = in_pcbbind(inp, nam);
- splx(s);
- break;
-
- /*
- * Mark the connection as being incapable of further input.
- */
- case PRU_SHUTDOWN:
- socantsendmore(so);
- break;
-
- case PRU_SEND:
- /* Packet must have a header (but that's about it) */
- if (m->m_len < sizeof (struct ip) ||
- (m = m_pullup(m, sizeof (struct ip))) == 0) {
- ipstat.ips_toosmall++;
- error = EINVAL;
- break;
- }
-
- /* Send packet */
- error = div_output(so, m, nam, control);
- m = NULL;
- break;
-
- case PRU_SOCKADDR:
- in_setsockaddr(inp, nam);
- break;
-
- case PRU_SENSE:
- /*
- * stat: don't bother with a blocksize.
- */
- return (0);
-
- /*
- * Not supported.
- */
- case PRU_CONNECT:
- case PRU_CONNECT2:
- case PRU_CONTROL:
- case PRU_RCVOOB:
- case PRU_RCVD:
- case PRU_LISTEN:
- case PRU_ACCEPT:
- case PRU_SENDOOB:
- case PRU_PEERADDR:
- error = EOPNOTSUPP;
- break;
-
- default:
- panic("div_usrreq");
- }
-release:
- if (m)
- m_freem(m);
- return (error);
-}
diff --git a/cpukit/libnetworking/netinet/ip_fw.c b/cpukit/libnetworking/netinet/ip_fw.c
deleted file mode 100644
index aeb09b0bbe..0000000000
--- a/cpukit/libnetworking/netinet/ip_fw.c
+++ /dev/null
@@ -1,1069 +0,0 @@
-/*
- * Copyright (c) 1996 Alex Nash
- * Copyright (c) 1993 Daniel Boulet
- * Copyright (c) 1994 Ugen J.S.Antsilevich
- *
- * Redistribution and use in source forms, with and without modification,
- * are permitted provided that this entire comment appears intact.
- *
- * Redistribution in binary form may occur without any restrictions.
- * Obviously, it would be nice if you gave credit where credit is due
- * but requiring it would be too onerous.
- *
- * This software is provided ``AS IS'' without any warranties of any kind.
- *
- * $Id$
- */
-
-/*
- * Implement IP packet firewall
- */
-
-#ifndef IPFIREWALL_MODULE
-#include "opt_ipfw.h"
-#endif
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/malloc.h>
-#include <sys/mbuf.h>
-#include <sys/queue.h>
-#include <sys/kernel.h>
-#include <sys/socket.h>
-#include <sys/time.h>
-#include <sys/sysctl.h>
-#include <net/if.h>
-#include <net/route.h>
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/ip_var.h>
-#include <netinet/ip_icmp.h>
-#include <netinet/ip_fw.h>
-#include <netinet/tcp.h>
-#include <netinet/tcp_timer.h>
-#include <netinet/tcp_var.h>
-#include <netinet/tcpip.h>
-#include <netinet/udp.h>
-
-static int fw_debug = 1;
-#ifdef IPFIREWALL_VERBOSE
-static int fw_verbose = 1;
-#else
-static int fw_verbose = 0;
-#endif
-#ifdef IPFIREWALL_VERBOSE_LIMIT
-static int fw_verbose_limit = IPFIREWALL_VERBOSE_LIMIT;
-#else
-static int fw_verbose_limit = 0;
-#endif
-
-LIST_HEAD (ip_fw_head, ip_fw_chain) ip_fw_chain;
-
-#ifdef SYSCTL_NODE
-SYSCTL_NODE(_net_inet_ip, OID_AUTO, fw, CTLFLAG_RW, 0, "Firewall");
-SYSCTL_INT(_net_inet_ip_fw, OID_AUTO, debug, CTLFLAG_RW, &fw_debug, 0, "");
-SYSCTL_INT(_net_inet_ip_fw, OID_AUTO, verbose, CTLFLAG_RW, &fw_verbose, 0, "");
-SYSCTL_INT(_net_inet_ip_fw, OID_AUTO, verbose_limit, CTLFLAG_RW, &fw_verbose_limit, 0, "");
-#endif
-
-#define dprintf(a) if (!fw_debug); else printf a
-
-#define print_ip(a) printf("%ld.%ld.%ld.%ld",(ntohl(a.s_addr)>>24)&0xFF,\
- (ntohl(a.s_addr)>>16)&0xFF,\
- (ntohl(a.s_addr)>>8)&0xFF,\
- (ntohl(a.s_addr))&0xFF);
-
-#define dprint_ip(a) if (!fw_debug); else print_ip(a)
-
-static int add_entry __P((struct ip_fw_head *chainptr, struct ip_fw *frwl));
-static int del_entry __P((struct ip_fw_head *chainptr, u_short number));
-static int zero_entry __P((struct mbuf *m));
-static struct ip_fw *check_ipfw_struct __P((struct ip_fw *m));
-static struct ip_fw *check_ipfw_mbuf __P((struct mbuf *fw));
-static int ipopts_match __P((struct ip *ip, struct ip_fw *f));
-static int port_match __P((u_short *portptr, int nports, u_short port,
- int range_flag));
-static int tcpflg_match __P((struct tcphdr *tcp, struct ip_fw *f));
-static int icmptype_match __P((struct icmp * icmp, struct ip_fw * f));
-static void ipfw_report __P((struct ip_fw *f, struct ip *ip,
- struct ifnet *rif, struct ifnet *oif));
-
-#ifdef IPFIREWALL_MODULE
-static ip_fw_chk_t *old_chk_ptr;
-static ip_fw_ctl_t *old_ctl_ptr;
-#endif
-
-static int ip_fw_chk __P((struct ip **pip, int hlen,
- struct ifnet *oif, int ignport, struct mbuf **m));
-static int ip_fw_ctl __P((int stage, struct mbuf **mm));
-
-static char err_prefix[] = "ip_fw_ctl:";
-
-/*
- * Returns 1 if the port is matched by the vector, 0 otherwise
- */
-static inline int
-port_match(u_short *portptr, int nports, u_short port, int range_flag)
-{
- if (!nports)
- return 1;
- if (range_flag) {
- if (portptr[0] <= port && port <= portptr[1]) {
- return 1;
- }
- nports -= 2;
- portptr += 2;
- }
- while (nports-- > 0) {
- if (*portptr++ == port) {
- return 1;
- }
- }
- return 0;
-}
-
-static int
-tcpflg_match(struct tcphdr *tcp, struct ip_fw *f)
-{
- u_char flg_set, flg_clr;
-
- if ((f->fw_tcpf & IP_FW_TCPF_ESTAB) &&
- (tcp->th_flags & (IP_FW_TCPF_RST | IP_FW_TCPF_ACK)))
- return 1;
-
- flg_set = tcp->th_flags & f->fw_tcpf;
- flg_clr = tcp->th_flags & f->fw_tcpnf;
-
- if (flg_set != f->fw_tcpf)
- return 0;
- if (flg_clr)
- return 0;
-
- return 1;
-}
-
-static int
-icmptype_match(struct icmp *icmp, struct ip_fw *f)
-{
- int type;
-
- if (!(f->fw_flg & IP_FW_F_ICMPBIT))
- return(1);
-
- type = icmp->icmp_type;
-
- /* check for matching type in the bitmap */
- if (type < IP_FW_ICMPTYPES_DIM * sizeof(unsigned) * 8 &&
- (f->fw_icmptypes[type / (sizeof(unsigned) * 8)] &
- (1U << (type % (8 * sizeof(unsigned))))))
- return(1);
-
- return(0); /* no match */
-}
-
-static int
-ipopts_match(struct ip *ip, struct ip_fw *f)
-{
- register u_char *cp;
- int opt, optlen, cnt;
- u_char opts, nopts, nopts_sve;
-
- cp = (u_char *)(ip + 1);
- cnt = (ip->ip_hl << 2) - sizeof (struct ip);
- opts = f->fw_ipopt;
- nopts = nopts_sve = f->fw_ipnopt;
-
- for (; cnt > 0; cnt -= optlen, cp += optlen) {
- opt = cp[IPOPT_OPTVAL];
- if (opt == IPOPT_EOL)
- break;
- if (opt == IPOPT_NOP)
- optlen = 1;
- else {
- optlen = cp[IPOPT_OLEN];
- if (optlen <= 0 || optlen > cnt) {
- return 0; /*XXX*/
- }
- }
- switch (opt) {
-
- default:
- break;
-
- case IPOPT_LSRR:
- opts &= ~IP_FW_IPOPT_LSRR;
- nopts &= ~IP_FW_IPOPT_LSRR;
- break;
-
- case IPOPT_SSRR:
- opts &= ~IP_FW_IPOPT_SSRR;
- nopts &= ~IP_FW_IPOPT_SSRR;
- break;
-
- case IPOPT_RR:
- opts &= ~IP_FW_IPOPT_RR;
- nopts &= ~IP_FW_IPOPT_RR;
- break;
- case IPOPT_TS:
- opts &= ~IP_FW_IPOPT_TS;
- nopts &= ~IP_FW_IPOPT_TS;
- break;
- }
- if (opts == nopts)
- break;
- }
- if (opts == 0 && nopts == nopts_sve)
- return 1;
- else
- return 0;
-}
-
-static inline int
-iface_match(struct ifnet *ifp, union ip_fw_if *ifu, int byname)
-{
- /* Check by name or by IP address */
- if (byname) {
- /* Check unit number (-1 is wildcard) */
- if (ifu->fu_via_if.unit != -1
- && ifp->if_unit != ifu->fu_via_if.unit)
- return(0);
- /* Check name */
- if (strncmp(ifp->if_name, ifu->fu_via_if.name, FW_IFNLEN))
- return(0);
- return(1);
- } else if (ifu->fu_via_ip.s_addr != 0) { /* Zero == wildcard */
- struct ifaddr *ia;
-
- for (ia = ifp->if_addrlist; ia; ia = ia->ifa_next) {
- if (ia->ifa_addr == NULL)
- continue;
- if (ia->ifa_addr->sa_family != AF_INET)
- continue;
- if (ifu->fu_via_ip.s_addr != ((struct sockaddr_in *)
- (ia->ifa_addr))->sin_addr.s_addr)
- continue;
- return(1);
- }
- return(0);
- }
- return(1);
-}
-
-static void
-ipfw_report(struct ip_fw *f, struct ip *ip,
- struct ifnet *rif, struct ifnet *oif)
-{
- static int counter;
- struct tcphdr *const tcp = (struct tcphdr *) ((u_long *) ip+ ip->ip_hl);
- struct udphdr *const udp = (struct udphdr *) ((u_long *) ip+ ip->ip_hl);
- struct icmp *const icmp = (struct icmp *) ((u_long *) ip + ip->ip_hl);
- int count;
-
- count = f ? f->fw_pcnt : ++counter;
- if (fw_verbose_limit != 0 && count > fw_verbose_limit)
- return;
-
- /* Print command name */
- printf("ipfw: %d ", f ? f->fw_number : -1);
- if (!f)
- printf("Refuse");
- else
- switch (f->fw_flg & IP_FW_F_COMMAND) {
- case IP_FW_F_DENY:
- printf("Deny");
- break;
- case IP_FW_F_REJECT:
- if (f->fw_reject_code == IP_FW_REJECT_RST)
- printf("Reset");
- else
- printf("Unreach");
- break;
- case IP_FW_F_ACCEPT:
- printf("Accept");
- break;
- case IP_FW_F_COUNT:
- printf("Count");
- break;
- case IP_FW_F_DIVERT:
- printf("Divert %d", f->fw_divert_port);
- break;
- case IP_FW_F_TEE:
- printf("Tee %d", f->fw_divert_port);
- break;
- case IP_FW_F_SKIPTO:
- printf("SkipTo %d", f->fw_skipto_rule);
- break;
- default:
- printf("UNKNOWN");
- break;
- }
- printf(" ");
-
- switch (ip->ip_p) {
- case IPPROTO_TCP:
- printf("TCP ");
- print_ip(ip->ip_src);
- if ((ip->ip_off & IP_OFFMASK) == 0)
- printf(":%d ", ntohs(tcp->th_sport));
- else
- printf(" ");
- print_ip(ip->ip_dst);
- if ((ip->ip_off & IP_OFFMASK) == 0)
- printf(":%d", ntohs(tcp->th_dport));
- break;
- case IPPROTO_UDP:
- printf("UDP ");
- print_ip(ip->ip_src);
- if ((ip->ip_off & IP_OFFMASK) == 0)
- printf(":%d ", ntohs(udp->uh_sport));
- else
- printf(" ");
- print_ip(ip->ip_dst);
- if ((ip->ip_off & IP_OFFMASK) == 0)
- printf(":%d", ntohs(udp->uh_dport));
- break;
- case IPPROTO_ICMP:
- printf("ICMP:%u.%u ", icmp->icmp_type, icmp->icmp_code);
- print_ip(ip->ip_src);
- printf(" ");
- print_ip(ip->ip_dst);
- break;
- default:
- printf("P:%d ", ip->ip_p);
- print_ip(ip->ip_src);
- printf(" ");
- print_ip(ip->ip_dst);
- break;
- }
- if (oif)
- printf(" out via %s%d", oif->if_name, oif->if_unit);
- else if (rif)
- printf(" in via %s%d", rif->if_name, rif->if_unit);
- if ((ip->ip_off & IP_OFFMASK))
- printf(" Fragment = %d",ip->ip_off & IP_OFFMASK);
- printf("\n");
- if (fw_verbose_limit != 0 && count == fw_verbose_limit)
- printf("ipfw: limit reached on rule #%d\n",
- f ? f->fw_number : -1);
-}
-
-/*
- * Parameters:
- *
- * ip Pointer to packet header (struct ip *)
- * hlen Packet header length
- * oif Outgoing interface, or NULL if packet is incoming
- * ignport Ignore all divert/tee rules to this port (if non-zero)
- * *m The packet; we set to NULL when/if we nuke it.
- *
- * Return value:
- *
- * 0 The packet is to be accepted and routed normally OR
- * the packet was denied/rejected and has been dropped;
- * in the latter case, *m is equal to NULL upon return.
- * port Divert the packet to port.
- */
-
-static int
-ip_fw_chk(struct ip **pip, int hlen,
- struct ifnet *oif, int ignport, struct mbuf **m)
-{
- struct ip_fw_chain *chain;
- struct ip_fw *rule = NULL;
- struct ip *ip = *pip;
- struct ifnet *const rif = (*m)->m_pkthdr.rcvif;
- u_short offset = (ip->ip_off & IP_OFFMASK);
- u_short src_port, dst_port;
-
- /*
- * Go down the chain, looking for enlightment
- */
- for (chain=ip_fw_chain.lh_first; chain; chain = chain->chain.le_next) {
- register struct ip_fw *const f = chain->rule;
-
- /* Check direction inbound */
- if (!oif && !(f->fw_flg & IP_FW_F_IN))
- continue;
-
- /* Check direction outbound */
- if (oif && !(f->fw_flg & IP_FW_F_OUT))
- continue;
-
- /* Fragments */
- if ((f->fw_flg & IP_FW_F_FRAG) && !(ip->ip_off & IP_OFFMASK))
- continue;
-
- /* If src-addr doesn't match, not this rule. */
- if (((f->fw_flg & IP_FW_F_INVSRC) != 0) ^ ((ip->ip_src.s_addr
- & f->fw_smsk.s_addr) != f->fw_src.s_addr))
- continue;
-
- /* If dest-addr doesn't match, not this rule. */
- if (((f->fw_flg & IP_FW_F_INVDST) != 0) ^ ((ip->ip_dst.s_addr
- & f->fw_dmsk.s_addr) != f->fw_dst.s_addr))
- continue;
-
- /* Interface check */
- if ((f->fw_flg & IF_FW_F_VIAHACK) == IF_FW_F_VIAHACK) {
- struct ifnet *const iface = oif ? oif : rif;
-
- /* Backwards compatibility hack for "via" */
- if (!iface || !iface_match(iface,
- &f->fw_in_if, f->fw_flg & IP_FW_F_OIFNAME))
- continue;
- } else {
- /* Check receive interface */
- if ((f->fw_flg & IP_FW_F_IIFACE)
- && (!rif || !iface_match(rif,
- &f->fw_in_if, f->fw_flg & IP_FW_F_IIFNAME)))
- continue;
- /* Check outgoing interface */
- if ((f->fw_flg & IP_FW_F_OIFACE)
- && (!oif || !iface_match(oif,
- &f->fw_out_if, f->fw_flg & IP_FW_F_OIFNAME)))
- continue;
- }
-
- /* Check IP options */
- if (f->fw_ipopt != f->fw_ipnopt && !ipopts_match(ip, f))
- continue;
-
- /* Check protocol; if wildcard, match */
- if (f->fw_prot == IPPROTO_IP)
- goto got_match;
-
- /* If different, don't match */
- if (ip->ip_p != f->fw_prot)
- continue;
-
-#define PULLUP_TO(len) do { \
- if ((*m)->m_len < (len) \
- && (*m = m_pullup(*m, (len))) == 0) { \
- goto bogusfrag; \
- } \
- *pip = ip = mtod(*m, struct ip *); \
- offset = (ip->ip_off & IP_OFFMASK); \
- } while (0)
-
- /* Protocol specific checks */
- switch (ip->ip_p) {
- case IPPROTO_TCP:
- {
- struct tcphdr *tcp;
-
- if (offset == 1) /* cf. RFC 1858 */
- goto bogusfrag;
- if (offset != 0) {
- /*
- * TCP flags and ports aren't available in this
- * packet -- if this rule specified either one,
- * we consider the rule a non-match.
- */
- if (f->fw_nports != 0 ||
- f->fw_tcpf != f->fw_tcpnf)
- continue;
-
- break;
- }
- PULLUP_TO(hlen + 14);
- tcp = (struct tcphdr *) ((u_long *)ip + ip->ip_hl);
- if (f->fw_tcpf != f->fw_tcpnf && !tcpflg_match(tcp, f))
- continue;
- src_port = ntohs(tcp->th_sport);
- dst_port = ntohs(tcp->th_dport);
- goto check_ports;
- }
-
- case IPPROTO_UDP:
- {
- struct udphdr *udp;
-
- if (offset != 0) {
- /*
- * Port specification is unavailable -- if this
- * rule specifies a port, we consider the rule
- * a non-match.
- */
- if (f->fw_nports != 0)
- continue;
-
- break;
- }
- PULLUP_TO(hlen + 4);
- udp = (struct udphdr *) ((u_long *)ip + ip->ip_hl);
- src_port = ntohs(udp->uh_sport);
- dst_port = ntohs(udp->uh_dport);
-check_ports:
- if (!port_match(&f->fw_pts[0],
- IP_FW_GETNSRCP(f), src_port,
- f->fw_flg & IP_FW_F_SRNG))
- continue;
- if (!port_match(&f->fw_pts[IP_FW_GETNSRCP(f)],
- IP_FW_GETNDSTP(f), dst_port,
- f->fw_flg & IP_FW_F_DRNG))
- continue;
- break;
- }
-
- case IPPROTO_ICMP:
- {
- struct icmp *icmp;
-
- if (offset != 0) /* Type isn't valid */
- break;
- PULLUP_TO(hlen + 2);
- icmp = (struct icmp *) ((u_long *)ip + ip->ip_hl);
- if (!icmptype_match(icmp, f))
- continue;
- break;
- }
-#undef PULLUP_TO
-
-bogusfrag:
- if (fw_verbose)
- ipfw_report(NULL, ip, rif, oif);
- goto dropit;
- }
-
-got_match:
- /* Ignore divert/tee rule if socket port is "ignport" */
- switch (f->fw_flg & IP_FW_F_COMMAND) {
- case IP_FW_F_DIVERT:
- case IP_FW_F_TEE:
- if (f->fw_divert_port == ignport)
- continue; /* ignore this rule */
- break;
- }
-
- /* Update statistics */
- f->fw_pcnt += 1;
- f->fw_bcnt += ip->ip_len;
- f->timestamp = rtems_bsdnet_seconds_since_boot();
-
- /* Log to console if desired */
- if ((f->fw_flg & IP_FW_F_PRN) && fw_verbose)
- ipfw_report(f, ip, rif, oif);
-
- /* Take appropriate action */
- switch (f->fw_flg & IP_FW_F_COMMAND) {
- case IP_FW_F_ACCEPT:
- return(0);
- case IP_FW_F_COUNT:
- continue;
- case IP_FW_F_DIVERT:
- return(f->fw_divert_port);
- case IP_FW_F_TEE:
- /*
- * XXX someday tee packet here, but beware that you
- * can't use m_copym() or m_copypacket() because
- * the divert input routine modifies the mbuf
- * (and these routines only increment reference
- * counts in the case of mbuf clusters), so need
- * to write custom routine.
- */
- continue;
- case IP_FW_F_SKIPTO:
-#ifdef DIAGNOSTIC
- while (chain->chain.le_next
- && chain->chain.le_next->rule->fw_number
- < f->fw_skipto_rule)
-#else
- while (chain->chain.le_next->rule->fw_number
- < f->fw_skipto_rule)
-#endif
- chain = chain->chain.le_next;
- continue;
- }
-
- /* Deny/reject this packet using this rule */
- rule = f;
- break;
- }
-
-#ifdef DIAGNOSTIC
- /* Rule 65535 should always be there and should always match */
- if (!chain)
- panic("ip_fw: chain");
-#endif
-
- /*
- * At this point, we're going to drop the packet.
- * Send a reject notice if all of the following are true:
- *
- * - The packet matched a reject rule
- * - The packet is not an ICMP packet
- * - The packet is not a multicast or broadcast packet
- */
- if ((rule->fw_flg & IP_FW_F_COMMAND) == IP_FW_F_REJECT
- && ip->ip_p != IPPROTO_ICMP
- && !((*m)->m_flags & (M_BCAST|M_MCAST))
- && !IN_MULTICAST(ntohl(ip->ip_dst.s_addr))) {
- switch (rule->fw_reject_code) {
- case IP_FW_REJECT_RST:
- {
- struct tcphdr *const tcp =
- (struct tcphdr *) ((u_long *)ip + ip->ip_hl);
- struct tcpiphdr ti, *const tip = (struct tcpiphdr *) ip;
-
- if (offset != 0 || (tcp->th_flags & TH_RST))
- break;
- ti.ti_i = *((struct ipovly *) ip);
- ti.ti_t = *tcp;
- bcopy(&ti, ip, sizeof(ti));
- NTOHL(tip->ti_seq);
- NTOHL(tip->ti_ack);
- tip->ti_len = ip->ip_len - hlen - (tip->ti_off << 2);
- if (tcp->th_flags & TH_ACK) {
- tcp_respond(NULL, tip, *m,
- (tcp_seq)0, ntohl(tcp->th_ack), TH_RST);
- } else {
- if (tcp->th_flags & TH_SYN)
- tip->ti_len++;
- tcp_respond(NULL, tip, *m, tip->ti_seq
- + tip->ti_len, (tcp_seq)0, TH_RST|TH_ACK);
- }
- *m = NULL;
- break;
- }
- default: /* Send an ICMP unreachable using code */
- icmp_error(*m, ICMP_UNREACH,
- rule->fw_reject_code, 0L, 0);
- *m = NULL;
- break;
- }
- }
-
-dropit:
- /*
- * Finally, drop the packet.
- */
- if (*m) {
- m_freem(*m);
- *m = NULL;
- }
- return(0);
-}
-
-static int
-add_entry(struct ip_fw_head *chainptr, struct ip_fw *frwl)
-{
- struct ip_fw *ftmp = 0;
- struct ip_fw_chain *fwc = 0, *fcp, *fcpl = 0;
- u_short nbr = 0;
- int s;
-
- fwc = malloc(sizeof *fwc, M_IPFW, M_DONTWAIT);
- ftmp = malloc(sizeof *ftmp, M_IPFW, M_DONTWAIT);
- if (!fwc || !ftmp) {
- dprintf(("%s malloc said no\n", err_prefix));
- if (fwc) free(fwc, M_IPFW);
- if (ftmp) free(ftmp, M_IPFW);
- return (ENOSPC);
- }
-
- bcopy(frwl, ftmp, sizeof(struct ip_fw));
- ftmp->fw_in_if.fu_via_if.name[FW_IFNLEN - 1] = '\0';
- ftmp->fw_pcnt = 0L;
- ftmp->fw_bcnt = 0L;
- fwc->rule = ftmp;
-
- s = splnet();
-
- if (!chainptr->lh_first) {
- LIST_INSERT_HEAD(chainptr, fwc, chain);
- splx(s);
- return(0);
- } else if (ftmp->fw_number == (u_short)-1) {
- if (fwc) free(fwc, M_IPFW);
- if (ftmp) free(ftmp, M_IPFW);
- splx(s);
- dprintf(("%s bad rule number\n", err_prefix));
- return (EINVAL);
- }
-
- /* If entry number is 0, find highest numbered rule and add 100 */
- if (ftmp->fw_number == 0) {
- for (fcp = chainptr->lh_first; fcp; fcp = fcp->chain.le_next) {
- if (fcp->rule->fw_number != (u_short)-1)
- nbr = fcp->rule->fw_number;
- else
- break;
- }
- if (nbr < (u_short)-1 - 100)
- nbr += 100;
- ftmp->fw_number = nbr;
- }
-
- /* Got a valid number; now insert it, keeping the list ordered */
- for (fcp = chainptr->lh_first; fcp; fcp = fcp->chain.le_next) {
- if (fcp->rule->fw_number > ftmp->fw_number) {
- if (fcpl) {
- LIST_INSERT_AFTER(fcpl, fwc, chain);
- } else {
- LIST_INSERT_HEAD(chainptr, fwc, chain);
- }
- break;
- } else {
- fcpl = fcp;
- }
- }
-
- splx(s);
- return (0);
-}
-
-static int
-del_entry(struct ip_fw_head *chainptr, u_short number)
-{
- struct ip_fw_chain *fcp;
- int s;
-
- s = splnet();
-
- fcp = chainptr->lh_first;
- if (number != (u_short)-1) {
- for (; fcp; fcp = fcp->chain.le_next) {
- if (fcp->rule->fw_number == number) {
- LIST_REMOVE(fcp, chain);
- splx(s);
- free(fcp->rule, M_IPFW);
- free(fcp, M_IPFW);
- return 0;
- }
- }
- }
-
- splx(s);
- return (EINVAL);
-}
-
-static int
-zero_entry(struct mbuf *m)
-{
- struct ip_fw *frwl;
- struct ip_fw_chain *fcp;
- int s;
-
- if (m) {
- if (m->m_len != sizeof(struct ip_fw))
- return(EINVAL);
- frwl = mtod(m, struct ip_fw *);
- }
- else
- frwl = NULL;
-
- /*
- * It's possible to insert multiple chain entries with the
- * same number, so we don't stop after finding the first
- * match if zeroing a specific entry.
- */
- s = splnet();
- for (fcp = ip_fw_chain.lh_first; fcp; fcp = fcp->chain.le_next)
- if (!frwl || frwl->fw_number == fcp->rule->fw_number) {
- fcp->rule->fw_bcnt = fcp->rule->fw_pcnt = 0;
- fcp->rule->timestamp = 0;
- }
- splx(s);
-
- if (fw_verbose) {
- if (frwl)
- printf("ipfw: Entry %d cleared.\n", frwl->fw_number);
- else
- printf("ipfw: Accounting cleared.\n");
- }
-
- return(0);
-}
-
-static struct ip_fw *
-check_ipfw_mbuf(struct mbuf *m)
-{
- /* Check length */
- if (m->m_len != sizeof(struct ip_fw)) {
- dprintf(("%s len=%d, want %d\n", err_prefix, m->m_len,
- (int)sizeof(struct ip_fw)));
- return (NULL);
- }
- return(check_ipfw_struct(mtod(m, struct ip_fw *)));
-}
-
-static struct ip_fw *
-check_ipfw_struct(struct ip_fw *frwl)
-{
- /* Check for invalid flag bits */
- if ((frwl->fw_flg & ~IP_FW_F_MASK) != 0) {
- dprintf(("%s undefined flag bits set (flags=%x)\n",
- err_prefix, frwl->fw_flg));
- return (NULL);
- }
- /* Must apply to incoming or outgoing (or both) */
- if (!(frwl->fw_flg & (IP_FW_F_IN | IP_FW_F_OUT))) {
- dprintf(("%s neither in nor out\n", err_prefix));
- return (NULL);
- }
- /* Empty interface name is no good */
- if (((frwl->fw_flg & IP_FW_F_IIFNAME)
- && !*frwl->fw_in_if.fu_via_if.name)
- || ((frwl->fw_flg & IP_FW_F_OIFNAME)
- && !*frwl->fw_out_if.fu_via_if.name)) {
- dprintf(("%s empty interface name\n", err_prefix));
- return (NULL);
- }
- /* Sanity check interface matching */
- if ((frwl->fw_flg & IF_FW_F_VIAHACK) == IF_FW_F_VIAHACK) {
- ; /* allow "via" backwards compatibility */
- } else if ((frwl->fw_flg & IP_FW_F_IN)
- && (frwl->fw_flg & IP_FW_F_OIFACE)) {
- dprintf(("%s outgoing interface check on incoming\n",
- err_prefix));
- return (NULL);
- }
- /* Sanity check port ranges */
- if ((frwl->fw_flg & IP_FW_F_SRNG) && IP_FW_GETNSRCP(frwl) < 2) {
- dprintf(("%s src range set but n_src_p=%d\n",
- err_prefix, IP_FW_GETNSRCP(frwl)));
- return (NULL);
- }
- if ((frwl->fw_flg & IP_FW_F_DRNG) && IP_FW_GETNDSTP(frwl) < 2) {
- dprintf(("%s dst range set but n_dst_p=%d\n",
- err_prefix, IP_FW_GETNDSTP(frwl)));
- return (NULL);
- }
- if (IP_FW_GETNSRCP(frwl) + IP_FW_GETNDSTP(frwl) > IP_FW_MAX_PORTS) {
- dprintf(("%s too many ports (%d+%d)\n",
- err_prefix, IP_FW_GETNSRCP(frwl), IP_FW_GETNDSTP(frwl)));
- return (NULL);
- }
- /*
- * Protocols other than TCP/UDP don't use port range
- */
- if ((frwl->fw_prot != IPPROTO_TCP) &&
- (frwl->fw_prot != IPPROTO_UDP) &&
- (IP_FW_GETNSRCP(frwl) || IP_FW_GETNDSTP(frwl))) {
- dprintf(("%s port(s) specified for non TCP/UDP rule\n",
- err_prefix));
- return(NULL);
- }
-
- /*
- * Rather than modify the entry to make such entries work,
- * we reject this rule and require user level utilities
- * to enforce whatever policy they deem appropriate.
- */
- if ((frwl->fw_src.s_addr & (~frwl->fw_smsk.s_addr)) ||
- (frwl->fw_dst.s_addr & (~frwl->fw_dmsk.s_addr))) {
- dprintf(("%s rule never matches\n", err_prefix));
- return(NULL);
- }
-
- if ((frwl->fw_flg & IP_FW_F_FRAG) &&
- (frwl->fw_prot == IPPROTO_UDP || frwl->fw_prot == IPPROTO_TCP)) {
- if (frwl->fw_nports) {
- dprintf(("%s cannot mix 'frag' and ports\n", err_prefix));
- return(NULL);
- }
- if (frwl->fw_prot == IPPROTO_TCP &&
- frwl->fw_tcpf != frwl->fw_tcpnf) {
- dprintf(("%s cannot mix 'frag' with TCP flags\n", err_prefix));
- return(NULL);
- }
- }
-
- /* Check command specific stuff */
- switch (frwl->fw_flg & IP_FW_F_COMMAND)
- {
- case IP_FW_F_REJECT:
- if (frwl->fw_reject_code >= 0x100
- && !(frwl->fw_prot == IPPROTO_TCP
- && frwl->fw_reject_code == IP_FW_REJECT_RST)) {
- dprintf(("%s unknown reject code\n", err_prefix));
- return(NULL);
- }
- break;
- case IP_FW_F_DIVERT: /* Diverting to port zero is invalid */
- case IP_FW_F_TEE:
- if (frwl->fw_divert_port == 0) {
- dprintf(("%s can't divert to port 0\n", err_prefix));
- return (NULL);
- }
- break;
- case IP_FW_F_DENY:
- case IP_FW_F_ACCEPT:
- case IP_FW_F_COUNT:
- case IP_FW_F_SKIPTO:
- break;
- default:
- dprintf(("%s invalid command\n", err_prefix));
- return(NULL);
- }
-
- return frwl;
-}
-
-static int
-ip_fw_ctl(int stage, struct mbuf **mm)
-{
- int error;
- struct mbuf *m;
-
- if (stage == IP_FW_GET) {
- struct ip_fw_chain *fcp = ip_fw_chain.lh_first;
- *mm = m = m_get(M_WAIT, MT_SOOPTS);
- for (; fcp; fcp = fcp->chain.le_next) {
- memcpy(m->m_data, fcp->rule, sizeof *(fcp->rule));
- m->m_len = sizeof *(fcp->rule);
- m->m_next = m_get(M_WAIT, MT_SOOPTS);
- m = m->m_next;
- m->m_len = 0;
- }
- return (0);
- }
- m = *mm;
- /* only allow get calls if secure mode > 2 */
- if (securelevel > 2) {
- if (m) (void)m_free(m);
- return(EPERM);
- }
- if (stage == IP_FW_FLUSH) {
- while (ip_fw_chain.lh_first != NULL &&
- ip_fw_chain.lh_first->rule->fw_number != (u_short)-1) {
- struct ip_fw_chain *fcp = ip_fw_chain.lh_first;
- int s = splnet();
- LIST_REMOVE(ip_fw_chain.lh_first, chain);
- splx(s);
- free(fcp->rule, M_IPFW);
- free(fcp, M_IPFW);
- }
- if (m) (void)m_free(m);
- return (0);
- }
- if (stage == IP_FW_ZERO) {
- error = zero_entry(m);
- if (m) (void)m_free(m);
- return (error);
- }
- if (m == NULL) {
- printf("%s NULL mbuf ptr\n", err_prefix);
- return (EINVAL);
- }
-
- if (stage == IP_FW_ADD) {
- struct ip_fw *frwl = check_ipfw_mbuf(m);
-
- if (!frwl)
- error = EINVAL;
- else
- error = add_entry(&ip_fw_chain, frwl);
- if (m) (void)m_free(m);
- return error;
- }
- if (stage == IP_FW_DEL) {
- if (m->m_len != sizeof(struct ip_fw)) {
- dprintf(("%s len=%d, want %d\n", err_prefix, m->m_len,
- (int)sizeof(struct ip_fw)));
- error = EINVAL;
- } else if (mtod(m, struct ip_fw *)->fw_number == (u_short)-1) {
- dprintf(("%s can't delete rule 65535\n", err_prefix));
- error = EINVAL;
- } else
- error = del_entry(&ip_fw_chain,
- mtod(m, struct ip_fw *)->fw_number);
- if (m) (void)m_free(m);
- return error;
- }
-
- dprintf(("%s unknown request %d\n", err_prefix, stage));
- if (m) (void)m_free(m);
- return (EINVAL);
-}
-
-void
-ip_fw_init(void)
-{
- struct ip_fw default_rule;
-
- ip_fw_chk_ptr = ip_fw_chk;
- ip_fw_ctl_ptr = ip_fw_ctl;
- LIST_INIT(&ip_fw_chain);
-
- bzero(&default_rule, sizeof default_rule);
- default_rule.fw_prot = IPPROTO_IP;
- default_rule.fw_number = (u_short)-1;
-#ifdef IPFIREWALL_DEFAULT_TO_ACCEPT
- default_rule.fw_flg |= IP_FW_F_ACCEPT;
-#else
- default_rule.fw_flg |= IP_FW_F_DENY;
-#endif
- default_rule.fw_flg |= IP_FW_F_IN | IP_FW_F_OUT;
- if (check_ipfw_struct(&default_rule) == NULL ||
- add_entry(&ip_fw_chain, &default_rule))
- panic(__FUNCTION__);
-
- printf("IP packet filtering initialized, "
-#ifdef IPDIVERT
- "divert enabled, ");
-#else
- "divert disabled, ");
-#endif
-#ifdef IPFIREWALL_DEFAULT_TO_ACCEPT
- printf("default to accept, ");
-#endif
-#ifndef IPFIREWALL_VERBOSE
- printf("logging disabled\n");
-#else
- if (fw_verbose_limit == 0)
- printf("unlimited logging\n");
- else
- printf("logging limited to %d packets/entry\n",
- fw_verbose_limit);
-#endif
-}
-
-#ifdef IPFIREWALL_MODULE
-
-#include <sys/exec.h>
-#include <sys/sysent.h>
-#include <sys/lkm.h>
-
-MOD_MISC(ipfw);
-
-static int
-ipfw_load(struct lkm_table *lkmtp, int cmd)
-{
- int s=splnet();
-
- old_chk_ptr = ip_fw_chk_ptr;
- old_ctl_ptr = ip_fw_ctl_ptr;
-
- ip_fw_init();
- splx(s);
- return 0;
-}
-
-static int
-ipfw_unload(struct lkm_table *lkmtp, int cmd)
-{
- int s=splnet();
-
- ip_fw_chk_ptr = old_chk_ptr;
- ip_fw_ctl_ptr = old_ctl_ptr;
-
- while (ip_fw_chain.lh_first != NULL) {
- struct ip_fw_chain *fcp = ip_fw_chain.lh_first;
- LIST_REMOVE(ip_fw_chain.lh_first, chain);
- free(fcp->rule, M_IPFW);
- free(fcp, M_IPFW);
- }
-
- splx(s);
- printf("IP firewall unloaded\n");
- return 0;
-}
-
-int
-ipfw_mod(struct lkm_table *lkmtp, int cmd, int ver)
-{
- DISPATCH(lkmtp, cmd, ver, ipfw_load, ipfw_unload, lkm_nullcmd);
-}
-#endif
diff --git a/cpukit/libnetworking/netinet/ip_fw.h b/cpukit/libnetworking/netinet/ip_fw.h
deleted file mode 100644
index cab7f4ac93..0000000000
--- a/cpukit/libnetworking/netinet/ip_fw.h
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * Copyright (c) 1993 Daniel Boulet
- * Copyright (c) 1994 Ugen J.S.Antsilevich
- *
- * Redistribution and use in source forms, with and without modification,
- * are permitted provided that this entire comment appears intact.
- *
- * Redistribution in binary form may occur without any restrictions.
- * Obviously, it would be nice if you gave credit where credit is due
- * but requiring it would be too onerous.
- *
- * This software is provided ``AS IS'' without any warranties of any kind.
- *
- * $Id$
- */
-
-#ifndef _IP_FW_H
-#define _IP_FW_H
-
-#include <net/if.h>
-
-/*
- * This union structure identifies an interface, either explicitly
- * by name or implicitly by IP address. The flags IP_FW_F_IIFNAME
- * and IP_FW_F_OIFNAME say how to interpret this structure. An
- * interface unit number of -1 matches any unit number, while an
- * IP address of 0.0.0.0 indicates matches any interface.
- *
- * The receive and transmit interfaces are only compared against the
- * the packet if the corresponding bit (IP_FW_F_IIFACE or IP_FW_F_OIFACE)
- * is set. Note some packets lack a receive or transmit interface
- * (in which case the missing "interface" never matches).
- */
-
-union ip_fw_if {
- struct in_addr fu_via_ip; /* Specified by IP address */
- struct { /* Specified by interface name */
-#define FW_IFNLEN IFNAMSIZ
- char name[FW_IFNLEN];
- short unit; /* -1 means match any unit */
- } fu_via_if;
-};
-
-/*
- * Format of an IP firewall descriptor
- *
- * fw_src, fw_dst, fw_smsk, fw_dmsk are always stored in network byte order.
- * fw_flg and fw_n*p are stored in host byte order (of course).
- * Port numbers are stored in HOST byte order.
- * Warning: setsockopt() will fail if sizeof(struct ip_fw) > MLEN (108)
- */
-
-struct ip_fw {
- u_long fw_pcnt,fw_bcnt; /* Packet and byte counters */
- struct in_addr fw_src, fw_dst; /* Source and destination IP addr */
- struct in_addr fw_smsk, fw_dmsk; /* Mask for src and dest IP addr */
- u_short fw_number; /* Rule number */
- u_short fw_flg; /* Flags word */
-#define IP_FW_MAX_PORTS 10 /* A reasonable maximum */
- u_short fw_pts[IP_FW_MAX_PORTS]; /* Array of port numbers to match */
- u_char fw_ipopt,fw_ipnopt; /* IP options set/unset */
- u_char fw_tcpf,fw_tcpnf; /* TCP flags set/unset */
-#define IP_FW_ICMPTYPES_DIM (32 / (sizeof(unsigned) * 8))
- unsigned fw_icmptypes[IP_FW_ICMPTYPES_DIM]; /* ICMP types bitmap */
- long timestamp; /* timestamp (tv_sec) of last match */
- union ip_fw_if fw_in_if, fw_out_if; /* Incoming and outgoing interfaces */
- union {
- u_short fu_divert_port; /* Divert/tee port (options IPDIVERT) */
- u_short fu_skipto_rule; /* SKIPTO command rule number */
- u_short fu_reject_code; /* REJECT response code */
- } fw_un;
- u_char fw_prot; /* IP protocol */
- u_char fw_nports; /* N'of src ports and # of dst ports */
- /* in ports array (dst ports follow */
- /* src ports; max of 10 ports in all; */
- /* count of 0 means match all ports) */
-};
-
-#define IP_FW_GETNSRCP(rule) ((rule)->fw_nports & 0x0f)
-#define IP_FW_SETNSRCP(rule, n) do { \
- (rule)->fw_nports &= ~0x0f; \
- (rule)->fw_nports |= (n); \
- } while (0)
-#define IP_FW_GETNDSTP(rule) ((rule)->fw_nports >> 4)
-#define IP_FW_SETNDSTP(rule, n) do { \
- (rule)->fw_nports &= ~0xf0; \
- (rule)->fw_nports |= (n) << 4;\
- } while (0)
-
-#define fw_divert_port fw_un.fu_divert_port
-#define fw_skipto_rule fw_un.fu_skipto_rule
-#define fw_reject_code fw_un.fu_reject_code
-
-struct ip_fw_chain {
- LIST_ENTRY(ip_fw_chain) chain;
- struct ip_fw *rule;
-};
-
-/*
- * Values for "flags" field .
- */
-#define IP_FW_F_IN 0x0001 /* Check inbound packets */
-#define IP_FW_F_OUT 0x0002 /* Check outbound packets */
-#define IP_FW_F_IIFACE 0x0004 /* Apply inbound interface test */
-#define IP_FW_F_OIFACE 0x0008 /* Apply outbound interface test */
-
-#define IP_FW_F_COMMAND 0x0070 /* Mask for type of chain entry: */
-#define IP_FW_F_DENY 0x0000 /* This is a deny rule */
-#define IP_FW_F_REJECT 0x0010 /* Deny and send a response packet */
-#define IP_FW_F_ACCEPT 0x0020 /* This is an accept rule */
-#define IP_FW_F_COUNT 0x0030 /* This is a count rule */
-#define IP_FW_F_DIVERT 0x0040 /* This is a divert rule */
-#define IP_FW_F_TEE 0x0050 /* This is a tee rule */
-#define IP_FW_F_SKIPTO 0x0060 /* This is a skipto rule */
-
-#define IP_FW_F_PRN 0x0080 /* Print if this rule matches */
-
-#define IP_FW_F_SRNG 0x0100 /* The first two src ports are a min *
- * and max range (stored in host byte *
- * order). */
-
-#define IP_FW_F_DRNG 0x0200 /* The first two dst ports are a min *
- * and max range (stored in host byte *
- * order). */
-
-#define IP_FW_F_IIFNAME 0x0400 /* In interface by name/unit (not IP) */
-#define IP_FW_F_OIFNAME 0x0800 /* Out interface by name/unit (not IP) */
-
-#define IP_FW_F_INVSRC 0x1000 /* Invert sense of src check */
-#define IP_FW_F_INVDST 0x2000 /* Invert sense of dst check */
-
-#define IP_FW_F_FRAG 0x4000 /* Fragment */
-
-#define IP_FW_F_ICMPBIT 0x8000 /* ICMP type bitmap is valid */
-
-#define IP_FW_F_MASK 0xFFFF /* All possible flag bits mask */
-
-/*
- * For backwards compatibility with rules specifying "via iface" but
- * not restricted to only "in" or "out" packets, we define this combination
- * of bits to represent this configuration.
- */
-
-#define IF_FW_F_VIAHACK (IP_FW_F_IN|IP_FW_F_OUT|IP_FW_F_IIFACE|IP_FW_F_OIFACE)
-
-/*
- * Definitions for REJECT response codes.
- * Values less than 256 correspond to ICMP unreachable codes.
- */
-#define IP_FW_REJECT_RST 0x0100 /* TCP packets: send RST */
-
-/*
- * Definitions for IP option names.
- */
-#define IP_FW_IPOPT_LSRR 0x01
-#define IP_FW_IPOPT_SSRR 0x02
-#define IP_FW_IPOPT_RR 0x04
-#define IP_FW_IPOPT_TS 0x08
-
-/*
- * Definitions for TCP flags.
- */
-#define IP_FW_TCPF_FIN TH_FIN
-#define IP_FW_TCPF_SYN TH_SYN
-#define IP_FW_TCPF_RST TH_RST
-#define IP_FW_TCPF_PSH TH_PUSH
-#define IP_FW_TCPF_ACK TH_ACK
-#define IP_FW_TCPF_URG TH_URG
-#define IP_FW_TCPF_ESTAB 0x40
-
-/*
- * Main firewall chains definitions and global var's definitions.
- */
-#ifdef KERNEL
-
-/*
- * Function definitions.
- */
-void ip_fw_init(void);
-
-#endif /* KERNEL */
-
-#endif /* _IP_FW_H */
diff --git a/cpukit/libnetworking/netinet/ip_icmp.c b/cpukit/libnetworking/netinet/ip_icmp.c
deleted file mode 100644
index 44088ab713..0000000000
--- a/cpukit/libnetworking/netinet/ip_icmp.c
+++ /dev/null
@@ -1,711 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ip_icmp.c 8.2 (Berkeley) 1/4/94
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/malloc.h>
-#include <sys/mbuf.h>
-#include <sys/protosw.h>
-#include <sys/socket.h>
-#include <sys/time.h>
-#include <sys/kernel.h>
-#include <sys/socket.h>
-#include <sys/sysctl.h>
-
-#include <net/if.h>
-#include <net/route.h>
-
-#define _IP_VHL
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/in_var.h>
-#include <netinet/ip.h>
-#include <netinet/ip_icmp.h>
-#include <netinet/ip_var.h>
-#include <netinet/icmp_var.h>
-
-/*
- * ICMP routines: error generation, receive packet processing, and
- * routines to turnaround packets back to the originator, and
- * host table maintenance routines.
- */
-
- struct icmpstat icmpstat;
-SYSCTL_STRUCT(_net_inet_icmp, ICMPCTL_STATS, stats, CTLFLAG_RD,
- &icmpstat, icmpstat, "");
-
-static int icmpmaskrepl = 0;
-SYSCTL_INT(_net_inet_icmp, ICMPCTL_MASKREPL, maskrepl, CTLFLAG_RW,
- &icmpmaskrepl, 0, "");
-
-static int icmpbmcastecho = 1;
-SYSCTL_INT(_net_inet_icmp, OID_AUTO, bmcastecho, CTLFLAG_RW, &icmpbmcastecho,
- 0, "");
-
-/* #define ICMPPRINTFS 1 */
-#ifdef ICMPPRINTFS
-int icmpprintfs = 0;
-#endif
-
-static void icmp_reflect __P((struct mbuf *));
-static void icmp_send __P((struct mbuf *, struct mbuf *));
-static int ip_next_mtu __P((int, int));
-
-extern struct protosw inetsw[];
-
-/*
- * Generate an error packet of type error
- * in response to bad packet ip.
- */
-void
-icmp_error(n, type, code, dest, destifp)
- struct mbuf *n;
- int type, code;
- n_long dest;
- struct ifnet *destifp;
-{
- register struct ip *oip = mtod(n, struct ip *), *nip;
- register unsigned oiplen = IP_VHL_HL(oip->ip_vhl) << 2;
- register struct icmp *icp;
- register struct mbuf *m;
- unsigned icmplen;
-
-#ifdef ICMPPRINTFS
- if (icmpprintfs)
- printf("icmp_error(%p, %x, %d)\n", oip, type, code);
-#endif
- if (type != ICMP_REDIRECT)
- icmpstat.icps_error++;
- /*
- * Don't send error if not the first fragment of message.
- * Don't error if the old packet protocol was ICMP
- * error message, only known informational types.
- */
- if (oip->ip_off &~ (IP_MF|IP_DF))
- goto freeit;
- if (oip->ip_p == IPPROTO_ICMP && type != ICMP_REDIRECT &&
- n->m_len >= oiplen + ICMP_MINLEN &&
- !ICMP_INFOTYPE(((struct icmp *)((caddr_t)oip + oiplen))->icmp_type)) {
- icmpstat.icps_oldicmp++;
- goto freeit;
- }
- /* Don't send error in response to a multicast or broadcast packet */
- if (n->m_flags & (M_BCAST|M_MCAST))
- goto freeit;
- /*
- * First, formulate icmp message
- */
- m = m_gethdr(M_DONTWAIT, MT_HEADER);
- if (m == NULL)
- goto freeit;
- icmplen = oiplen + min(8, oip->ip_len);
- m->m_len = icmplen + ICMP_MINLEN;
- MH_ALIGN(m, m->m_len);
- icp = mtod(m, struct icmp *);
- if ((u_int)type > ICMP_MAXTYPE)
- panic("icmp_error");
- icmpstat.icps_outhist[type]++;
- icp->icmp_type = type;
- if (type == ICMP_REDIRECT)
- icp->icmp_gwaddr.s_addr = dest;
- else {
- icp->icmp_void = 0;
- /*
- * The following assignments assume an overlay with the
- * zeroed icmp_void field.
- */
- if (type == ICMP_PARAMPROB) {
- icp->icmp_pptr = code;
- code = 0;
- } else if (type == ICMP_UNREACH &&
- code == ICMP_UNREACH_NEEDFRAG && destifp) {
- icp->icmp_nextmtu = htons(destifp->if_mtu);
- }
- }
-
- icp->icmp_code = code;
- bcopy((caddr_t)oip, (caddr_t)&icp->icmp_ip, icmplen);
- nip = &icp->icmp_ip;
- nip->ip_len = htons((u_short)(nip->ip_len + oiplen));
-
- /*
- * Now, copy old ip header (without options)
- * in front of icmp message.
- */
- if (m->m_data - sizeof(struct ip) < m->m_pktdat)
- panic("icmp len");
- m->m_data -= sizeof(struct ip);
- m->m_len += sizeof(struct ip);
- m->m_pkthdr.len = m->m_len;
- m->m_pkthdr.rcvif = n->m_pkthdr.rcvif;
- nip = mtod(m, struct ip *);
- bcopy((caddr_t)oip, (caddr_t)nip, sizeof(struct ip));
- nip->ip_len = m->m_len;
- nip->ip_vhl = IP_VHL_BORING;
- nip->ip_p = IPPROTO_ICMP;
- nip->ip_tos = 0;
- icmp_reflect(m);
-
-freeit:
- m_freem(n);
-}
-
-static struct sockaddr_in icmpsrc = { sizeof (struct sockaddr_in), AF_INET };
-static struct sockaddr_in icmpdst = { sizeof (struct sockaddr_in), AF_INET };
-static struct sockaddr_in icmpgw = { sizeof (struct sockaddr_in), AF_INET };
-
-/*
- * Process a received ICMP message.
- */
-void
-icmp_input(m, hlen)
- register struct mbuf *m;
- int hlen;
-{
- register struct icmp *icp;
- register struct ip *ip = mtod(m, struct ip *);
- int icmplen = ip->ip_len;
- register int i;
- struct in_ifaddr *ia;
- void (*ctlfunc) __P((int, struct sockaddr *, void *));
- int code;
-
- /*
- * Locate icmp structure in mbuf, and check
- * that not corrupted and of at least minimum length.
- */
-#ifdef ICMPPRINTFS
- if (icmpprintfs) {
- char buf[4 * sizeof "123"];
- strcpy(buf, inet_ntoa(ip->ip_src));
- printf("icmp_input from %s to %s, len %d\n",
- buf, inet_ntoa(ip->ip_dst), icmplen);
- }
-#endif
- if (icmplen < ICMP_MINLEN) {
- icmpstat.icps_tooshort++;
- goto freeit;
- }
- i = hlen + min(icmplen, ICMP_ADVLENMIN);
- if (m->m_len < i && (m = m_pullup(m, i)) == 0) {
- icmpstat.icps_tooshort++;
- return;
- }
- ip = mtod(m, struct ip *);
- m->m_len -= hlen;
- m->m_data += hlen;
- icp = mtod(m, struct icmp *);
- if (in_cksum(m, icmplen)) {
- icmpstat.icps_checksum++;
- goto freeit;
- }
- m->m_len += hlen;
- m->m_data -= hlen;
-
-#ifdef ICMPPRINTFS
- if (icmpprintfs)
- printf("icmp_input, type %d code %d\n", icp->icmp_type,
- icp->icmp_code);
-#endif
-
- /*
- * Message type specific processing.
- */
- if (icp->icmp_type > ICMP_MAXTYPE)
- goto raw;
- icmpstat.icps_inhist[icp->icmp_type]++;
- code = icp->icmp_code;
- switch (icp->icmp_type) {
-
- case ICMP_UNREACH:
- switch (code) {
- case ICMP_UNREACH_NET:
- case ICMP_UNREACH_HOST:
- case ICMP_UNREACH_PROTOCOL:
- case ICMP_UNREACH_PORT:
- case ICMP_UNREACH_SRCFAIL:
- code += PRC_UNREACH_NET;
- break;
-
- case ICMP_UNREACH_NEEDFRAG:
- code = PRC_MSGSIZE;
- break;
-
- case ICMP_UNREACH_NET_UNKNOWN:
- case ICMP_UNREACH_NET_PROHIB:
- case ICMP_UNREACH_TOSNET:
- code = PRC_UNREACH_NET;
- break;
-
- case ICMP_UNREACH_HOST_UNKNOWN:
- case ICMP_UNREACH_ISOLATED:
- case ICMP_UNREACH_HOST_PROHIB:
- case ICMP_UNREACH_TOSHOST:
- code = PRC_UNREACH_HOST;
- break;
-
- case ICMP_UNREACH_FILTER_PROHIB:
- case ICMP_UNREACH_HOST_PRECEDENCE:
- case ICMP_UNREACH_PRECEDENCE_CUTOFF:
- code = PRC_UNREACH_PORT;
- break;
-
- default:
- goto badcode;
- }
- goto deliver;
-
- case ICMP_TIMXCEED:
- if (code > 1)
- goto badcode;
- code += PRC_TIMXCEED_INTRANS;
- goto deliver;
-
- case ICMP_PARAMPROB:
- if (code > 1)
- goto badcode;
- code = PRC_PARAMPROB;
- goto deliver;
-
- case ICMP_SOURCEQUENCH:
- if (code)
- goto badcode;
- code = PRC_QUENCH;
- deliver:
- /*
- * Problem with datagram; advise higher level routines.
- */
- if (icmplen < ICMP_ADVLENMIN || icmplen < ICMP_ADVLEN(icp) ||
- IP_VHL_HL(icp->icmp_ip.ip_vhl) < (sizeof(struct ip) >> 2)) {
- icmpstat.icps_badlen++;
- goto freeit;
- }
- NTOHS(icp->icmp_ip.ip_len);
- /* Discard ICMP's in response to multicast packets */
- if (IN_MULTICAST(ntohl(icp->icmp_ip.ip_dst.s_addr)))
- goto badcode;
-#ifdef ICMPPRINTFS
- if (icmpprintfs)
- printf("deliver to protocol %d\n", icp->icmp_ip.ip_p);
-#endif
- icmpsrc.sin_addr = icp->icmp_ip.ip_dst;
-#if 1
- /*
- * MTU discovery:
- * If we got a needfrag and there is a host route to the
- * original destination, and the MTU is not locked, then
- * set the MTU in the route to the suggested new value
- * (if given) and then notify as usual. The ULPs will
- * notice that the MTU has changed and adapt accordingly.
- * If no new MTU was suggested, then we guess a new one
- * less than the current value. If the new MTU is
- * unreasonably small (arbitrarily set at 296), then
- * we reset the MTU to the interface value and enable the
- * lock bit, indicating that we are no longer doing MTU
- * discovery.
- */
- if (code == PRC_MSGSIZE) {
- struct rtentry *rt;
- int mtu;
-
- rt = rtalloc1((struct sockaddr *)&icmpsrc, 0,
- RTF_CLONING | RTF_PRCLONING);
- if (rt && (rt->rt_flags & RTF_HOST)
- && !(rt->rt_rmx.rmx_locks & RTV_MTU)) {
- mtu = ntohs(icp->icmp_nextmtu);
- if (!mtu)
- mtu = ip_next_mtu(rt->rt_rmx.rmx_mtu,
- 1);
-#ifdef DEBUG_MTUDISC
- printf("MTU for %s reduced to %d\n",
- inet_ntoa(icmpsrc.sin_addr), mtu);
-#endif
- if (mtu < 296) {
- /* rt->rt_rmx.rmx_mtu =
- rt->rt_ifp->if_mtu; */
- rt->rt_rmx.rmx_locks |= RTV_MTU;
- } else if (rt->rt_rmx.rmx_mtu > mtu) {
- rt->rt_rmx.rmx_mtu = mtu;
- }
- }
- if (rt)
- RTFREE(rt);
- }
-
-#endif
- ctlfunc = inetsw[ip_protox[icp->icmp_ip.ip_p]].pr_ctlinput;
- if (ctlfunc)
- (*ctlfunc)(code, (struct sockaddr *)&icmpsrc,
- (void *)&icp->icmp_ip);
- break;
-
- badcode:
- icmpstat.icps_badcode++;
- break;
-
- case ICMP_ECHO:
- if (!icmpbmcastecho
- && (m->m_flags & (M_MCAST | M_BCAST)) != 0
- && IN_MULTICAST(ntohl(ip->ip_dst.s_addr))) {
- icmpstat.icps_bmcastecho++;
- break;
- }
- icp->icmp_type = ICMP_ECHOREPLY;
- goto reflect;
-
- case ICMP_TSTAMP:
- if (!icmpbmcastecho
- && (m->m_flags & (M_MCAST | M_BCAST)) != 0
- && IN_MULTICAST(ntohl(ip->ip_dst.s_addr))) {
- icmpstat.icps_bmcasttstamp++;
- break;
- }
- if (icmplen < ICMP_TSLEN) {
- icmpstat.icps_badlen++;
- break;
- }
- icp->icmp_type = ICMP_TSTAMPREPLY;
- icp->icmp_rtime = iptime();
- icp->icmp_ttime = icp->icmp_rtime; /* bogus, do later! */
- goto reflect;
-
- case ICMP_MASKREQ:
-#define satosin(sa) ((struct sockaddr_in *)(sa))
- if (icmpmaskrepl == 0)
- break;
- /*
- * We are not able to respond with all ones broadcast
- * unless we receive it over a point-to-point interface.
- */
- if (icmplen < ICMP_MASKLEN)
- break;
- switch (ip->ip_dst.s_addr) {
-
- case INADDR_BROADCAST:
- case INADDR_ANY:
- icmpdst.sin_addr = ip->ip_src;
- break;
-
- default:
- icmpdst.sin_addr = ip->ip_dst;
- }
- ia = (struct in_ifaddr *)ifaof_ifpforaddr(
- (struct sockaddr *)&icmpdst, m->m_pkthdr.rcvif);
- if (ia == 0)
- break;
- if (ia->ia_ifp == 0)
- break;
- icp->icmp_type = ICMP_MASKREPLY;
- icp->icmp_mask = ia->ia_sockmask.sin_addr.s_addr;
- if (ip->ip_src.s_addr == 0) {
- if (ia->ia_ifp->if_flags & IFF_BROADCAST)
- ip->ip_src = satosin(&ia->ia_broadaddr)->sin_addr;
- else if (ia->ia_ifp->if_flags & IFF_POINTOPOINT)
- ip->ip_src = satosin(&ia->ia_dstaddr)->sin_addr;
- }
-reflect:
- ip->ip_len += hlen; /* since ip_input deducts this */
- icmpstat.icps_reflect++;
- icmpstat.icps_outhist[icp->icmp_type]++;
- icmp_reflect(m);
- return;
-
- case ICMP_REDIRECT:
- if (code > 3)
- goto badcode;
- if (icmplen < ICMP_ADVLENMIN || icmplen < ICMP_ADVLEN(icp) ||
- IP_VHL_HL(icp->icmp_ip.ip_vhl) < (sizeof(struct ip) >> 2)) {
- icmpstat.icps_badlen++;
- break;
- }
- /*
- * Short circuit routing redirects to force
- * immediate change in the kernel's routing
- * tables. The message is also handed to anyone
- * listening on a raw socket (e.g. the routing
- * daemon for use in updating its tables).
- */
- icmpgw.sin_addr = ip->ip_src;
- icmpdst.sin_addr = icp->icmp_gwaddr;
-#ifdef ICMPPRINTFS
- if (icmpprintfs) {
- char buf[4 * sizeof "123"];
- strcpy(buf, inet_ntoa(icp->icmp_ip.ip_dst));
-
- printf("redirect dst %s to %s\n",
- buf, inet_ntoa(icp->icmp_gwaddr));
- }
-#endif
- icmpsrc.sin_addr = icp->icmp_ip.ip_dst;
- rtredirect((struct sockaddr *)&icmpsrc,
- (struct sockaddr *)&icmpdst,
- (struct sockaddr *)0, RTF_GATEWAY | RTF_HOST,
- (struct sockaddr *)&icmpgw, (struct rtentry **)0);
- pfctlinput(PRC_REDIRECT_HOST, (struct sockaddr *)&icmpsrc);
- break;
-
- /*
- * No kernel processing for the following;
- * just fall through to send to raw listener.
- */
- case ICMP_ECHOREPLY:
- case ICMP_ROUTERADVERT:
- case ICMP_ROUTERSOLICIT:
- case ICMP_TSTAMPREPLY:
- case ICMP_IREQREPLY:
- case ICMP_MASKREPLY:
- default:
- break;
- }
-
-raw:
- rip_input(m, hlen);
- return;
-
-freeit:
- m_freem(m);
-}
-
-/*
- * Reflect the ip packet back to the source
- */
-static void
-icmp_reflect(m)
- struct mbuf *m;
-{
- register struct ip *ip = mtod(m, struct ip *);
- register struct in_ifaddr *ia;
- struct in_addr t;
- struct mbuf *opts = 0;
- int optlen = (IP_VHL_HL(ip->ip_vhl) << 2) - sizeof(struct ip);
-
- if (!in_canforward(ip->ip_src) &&
- ((ntohl(ip->ip_src.s_addr) & IN_CLASSA_NET) !=
- (IN_LOOPBACKNET << IN_CLASSA_NSHIFT))) {
- m_freem(m); /* Bad return address */
- goto done; /* Ip_output() will check for broadcast */
- }
- t = ip->ip_dst;
- ip->ip_dst = ip->ip_src;
- /*
- * If the incoming packet was addressed directly to us,
- * use dst as the src for the reply. Otherwise (broadcast
- * or anonymous), use the address which corresponds
- * to the incoming interface.
- */
- for (ia = in_ifaddr; ia; ia = ia->ia_next) {
- if (t.s_addr == IA_SIN(ia)->sin_addr.s_addr)
- break;
- if (ia->ia_ifp && (ia->ia_ifp->if_flags & IFF_BROADCAST) &&
- t.s_addr == satosin(&ia->ia_broadaddr)->sin_addr.s_addr)
- break;
- }
- icmpdst.sin_addr = t;
- if ((ia == (struct in_ifaddr *)0) && m->m_pkthdr.rcvif)
- ia = (struct in_ifaddr *)ifaof_ifpforaddr(
- (struct sockaddr *)&icmpdst, m->m_pkthdr.rcvif);
- /*
- * The following happens if the packet was not addressed to us,
- * and was received on an interface with no IP address.
- */
- if (ia == (struct in_ifaddr *)0)
- ia = in_ifaddr;
- t = IA_SIN(ia)->sin_addr;
- ip->ip_src = t;
- ip->ip_ttl = MAXTTL;
-
- if (optlen > 0) {
- register u_char *cp;
- int opt, cnt;
- u_int len;
-
- /*
- * Retrieve any source routing from the incoming packet;
- * add on any record-route or timestamp options.
- */
- cp = (u_char *) (ip + 1);
- if ((opts = ip_srcroute()) == 0 &&
- (opts = m_gethdr(M_DONTWAIT, MT_HEADER))) {
- opts->m_len = sizeof(struct in_addr);
- mtod(opts, struct in_addr *)->s_addr = 0;
- }
- if (opts) {
-#ifdef ICMPPRINTFS
- if (icmpprintfs)
- printf("icmp_reflect optlen %d rt %d => ",
- optlen, opts->m_len);
-#endif
- for (cnt = optlen; cnt > 0; cnt -= len, cp += len) {
- opt = cp[IPOPT_OPTVAL];
- if (opt == IPOPT_EOL)
- break;
- if (opt == IPOPT_NOP)
- len = 1;
- else {
- len = cp[IPOPT_OLEN];
- if (len <= 0 || len > cnt)
- break;
- }
- /*
- * Should check for overflow, but it "can't happen"
- */
- if (opt == IPOPT_RR || opt == IPOPT_TS ||
- opt == IPOPT_SECURITY) {
- bcopy((caddr_t)cp,
- mtod(opts, caddr_t) + opts->m_len, len);
- opts->m_len += len;
- }
- }
- /* Terminate & pad, if necessary */
- cnt = opts->m_len % 4;
- if (cnt) {
- for (; cnt < 4; cnt++) {
- *(mtod(opts, caddr_t) + opts->m_len) =
- IPOPT_EOL;
- opts->m_len++;
- }
- }
-#ifdef ICMPPRINTFS
- if (icmpprintfs)
- printf("%d\n", opts->m_len);
-#endif
- }
- /*
- * Now strip out original options by copying rest of first
- * mbuf's data back, and adjust the IP length.
- */
- ip->ip_len -= optlen;
- ip->ip_vhl = IP_VHL_BORING;
- m->m_len -= optlen;
- if (m->m_flags & M_PKTHDR)
- m->m_pkthdr.len -= optlen;
- optlen += sizeof(struct ip);
- bcopy((caddr_t)ip + optlen, (caddr_t)(ip + 1),
- (unsigned)(m->m_len - sizeof(struct ip)));
- }
- m->m_flags &= ~(M_BCAST|M_MCAST);
- icmp_send(m, opts);
-done:
- if (opts)
- (void)m_free(opts);
-}
-
-/*
- * Send an icmp packet back to the ip level,
- * after supplying a checksum.
- */
-static void
-icmp_send(m, opts)
- register struct mbuf *m;
- struct mbuf *opts;
-{
- register struct ip *ip = mtod(m, struct ip *);
- register int hlen;
- register struct icmp *icp;
- struct route ro;
-
- hlen = IP_VHL_HL(ip->ip_vhl) << 2;
- m->m_data += hlen;
- m->m_len -= hlen;
- icp = mtod(m, struct icmp *);
- icp->icmp_cksum = 0;
- icp->icmp_cksum = in_cksum(m, ip->ip_len - hlen);
- m->m_data -= hlen;
- m->m_len += hlen;
-#ifdef ICMPPRINTFS
- if (icmpprintfs) {
- char buf[4 * sizeof "123"];
- strcpy(buf, inet_ntoa(ip->ip_dst));
- printf("icmp_send dst %s src %s\n",
- buf, inet_ntoa(ip->ip_src));
- }
-#endif
- bzero(&ro, sizeof ro);
- (void) ip_output(m, opts, &ro, 0, NULL);
- if (ro.ro_rt)
- RTFREE(ro.ro_rt);
-}
-
-n_time
-iptime()
-{
- struct timeval atv;
- u_long t;
-
- microtime(&atv);
- t = (atv.tv_sec % (24*60*60)) * 1000 + atv.tv_usec / 1000;
- return (htonl(t));
-}
-
-#if 1
-/*
- * Return the next larger or smaller MTU plateau (table from RFC 1191)
- * given current value MTU. If DIR is less than zero, a larger plateau
- * is returned; otherwise, a smaller value is returned.
- */
-static int
-ip_next_mtu(mtu, dir)
- int mtu;
- int dir;
-{
- static int mtutab[] = {
- 65535, 32000, 17914, 8166, 4352, 2002, 1492, 1006, 508, 296,
- 68, 0
- };
- int i;
-
- for (i = 0; i < (sizeof mtutab) / (sizeof mtutab[0]); i++) {
- if (mtu >= mtutab[i])
- break;
- }
-
- if (dir < 0) {
- if (i == 0) {
- return 0;
- } else {
- return mtutab[i - 1];
- }
- } else {
- if (mtutab[i] == 0) {
- return 0;
- } else if(mtu > mtutab[i]) {
- return mtutab[i];
- } else {
- return mtutab[i + 1];
- }
- }
-}
-#endif
diff --git a/cpukit/libnetworking/netinet/ip_icmp.h b/cpukit/libnetworking/netinet/ip_icmp.h
deleted file mode 100644
index 9d07a682de..0000000000
--- a/cpukit/libnetworking/netinet/ip_icmp.h
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ip_icmp.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _NETINET_IP_ICMP_H_
-#define _NETINET_IP_ICMP_H_
-
-/*
- * Interface Control Message Protocol Definitions.
- * Per RFC 792, September 1981.
- */
-
-/*
- * Internal of an ICMP Router Advertisement
- */
-struct icmp_ra_addr {
- u_int32_t ira_addr;
- u_int32_t ira_preference;
-};
-
-/*
- * Structure of an icmp header.
- */
-struct icmp {
- u_char icmp_type; /* type of message, see below */
- u_char icmp_code; /* type sub code */
- u_short icmp_cksum; /* ones complement cksum of struct */
- union {
- u_char ih_pptr; /* ICMP_PARAMPROB */
- struct in_addr ih_gwaddr; /* ICMP_REDIRECT */
- struct ih_idseq {
- n_short icd_id;
- n_short icd_seq;
- } ih_idseq;
- int ih_void;
-
- /* ICMP_UNREACH_NEEDFRAG -- Path MTU Discovery (RFC1191) */
- struct ih_pmtu {
- n_short ipm_void;
- n_short ipm_nextmtu;
- } ih_pmtu;
-
- struct ih_rtradv {
- u_char irt_num_addrs;
- u_char irt_wpa;
- u_int16_t irt_lifetime;
- } ih_rtradv;
- } icmp_hun;
-#define icmp_pptr icmp_hun.ih_pptr
-#define icmp_gwaddr icmp_hun.ih_gwaddr
-#define icmp_id icmp_hun.ih_idseq.icd_id
-#define icmp_seq icmp_hun.ih_idseq.icd_seq
-#define icmp_void icmp_hun.ih_void
-#define icmp_pmvoid icmp_hun.ih_pmtu.ipm_void
-#define icmp_nextmtu icmp_hun.ih_pmtu.ipm_nextmtu
-#define icmp_num_addrs icmp_hun.ih_rtradv.irt_num_addrs
-#define icmp_wpa icmp_hun.ih_rtradv.irt_wpa
-#define icmp_lifetime icmp_hun.ih_rtradv.irt_lifetime
- union {
- struct id_ts {
- n_time its_otime;
- n_time its_rtime;
- n_time its_ttime;
- } id_ts;
- struct id_ip {
- struct ip idi_ip;
- /* options and then 64 bits of data */
- } id_ip;
- struct icmp_ra_addr id_radv;
- u_long id_mask;
- char id_data[1];
- } icmp_dun;
-#define icmp_otime icmp_dun.id_ts.its_otime
-#define icmp_rtime icmp_dun.id_ts.its_rtime
-#define icmp_ttime icmp_dun.id_ts.its_ttime
-#define icmp_ip icmp_dun.id_ip.idi_ip
-#define icmp_radv icmp_dun.id_radv
-#define icmp_mask icmp_dun.id_mask
-#define icmp_data icmp_dun.id_data
-};
-
-/*
- * Lower bounds on packet lengths for various types.
- * For the error advice packets must first insure that the
- * packet is large enough to contain the returned ip header.
- * Only then can we do the check to see if 64 bits of packet
- * data have been returned, since we need to check the returned
- * ip header length.
- */
-#define ICMP_MINLEN 8 /* abs minimum */
-#define ICMP_TSLEN (8 + 3 * sizeof (n_time)) /* timestamp */
-#define ICMP_MASKLEN 12 /* address mask */
-#define ICMP_ADVLENMIN (8 + sizeof (struct ip) + 8) /* min */
-#ifndef _IP_VHL
-#define ICMP_ADVLEN(p) (8 + ((p)->icmp_ip.ip_hl << 2) + 8)
- /* N.B.: must separately check that ip_hl >= 5 */
-#else
-#define ICMP_ADVLEN(p) (8 + (IP_VHL_HL((p)->icmp_ip.ip_vhl) << 2) + 8)
- /* N.B.: must separately check that header length >= 5 */
-#endif
-
-/*
- * Definition of type and code field values.
- */
-#define ICMP_ECHOREPLY 0 /* echo reply */
-#define ICMP_UNREACH 3 /* dest unreachable, codes: */
-#define ICMP_UNREACH_NET 0 /* bad net */
-#define ICMP_UNREACH_HOST 1 /* bad host */
-#define ICMP_UNREACH_PROTOCOL 2 /* bad protocol */
-#define ICMP_UNREACH_PORT 3 /* bad port */
-#define ICMP_UNREACH_NEEDFRAG 4 /* IP_DF caused drop */
-#define ICMP_UNREACH_SRCFAIL 5 /* src route failed */
-#define ICMP_UNREACH_NET_UNKNOWN 6 /* unknown net */
-#define ICMP_UNREACH_HOST_UNKNOWN 7 /* unknown host */
-#define ICMP_UNREACH_ISOLATED 8 /* src host isolated */
-#define ICMP_UNREACH_NET_PROHIB 9 /* prohibited access */
-#define ICMP_UNREACH_HOST_PROHIB 10 /* ditto */
-#define ICMP_UNREACH_TOSNET 11 /* bad tos for net */
-#define ICMP_UNREACH_TOSHOST 12 /* bad tos for host */
-#define ICMP_UNREACH_FILTER_PROHIB 13 /* admin prohib */
-#define ICMP_UNREACH_HOST_PRECEDENCE 14 /* host prec vio. */
-#define ICMP_UNREACH_PRECEDENCE_CUTOFF 15 /* prec cutoff */
-#define ICMP_SOURCEQUENCH 4 /* packet lost, slow down */
-#define ICMP_REDIRECT 5 /* shorter route, codes: */
-#define ICMP_REDIRECT_NET 0 /* for network */
-#define ICMP_REDIRECT_HOST 1 /* for host */
-#define ICMP_REDIRECT_TOSNET 2 /* for tos and net */
-#define ICMP_REDIRECT_TOSHOST 3 /* for tos and host */
-#define ICMP_ECHO 8 /* echo service */
-#define ICMP_ROUTERADVERT 9 /* router advertisement */
-#define ICMP_ROUTERSOLICIT 10 /* router solicitation */
-#define ICMP_TIMXCEED 11 /* time exceeded, code: */
-#define ICMP_TIMXCEED_INTRANS 0 /* ttl==0 in transit */
-#define ICMP_TIMXCEED_REASS 1 /* ttl==0 in reass */
-#define ICMP_PARAMPROB 12 /* ip header bad */
-#define ICMP_PARAMPROB_OPTABSENT 1 /* req. opt. absent */
-#define ICMP_TSTAMP 13 /* timestamp request */
-#define ICMP_TSTAMPREPLY 14 /* timestamp reply */
-#define ICMP_IREQ 15 /* information request */
-#define ICMP_IREQREPLY 16 /* information reply */
-#define ICMP_MASKREQ 17 /* address mask request */
-#define ICMP_MASKREPLY 18 /* address mask reply */
-
-#define ICMP_MAXTYPE 18
-
-#define ICMP_INFOTYPE(type) \
- ((type) == ICMP_ECHOREPLY || (type) == ICMP_ECHO || \
- (type) == ICMP_ROUTERADVERT || (type) == ICMP_ROUTERSOLICIT || \
- (type) == ICMP_TSTAMP || (type) == ICMP_TSTAMPREPLY || \
- (type) == ICMP_IREQ || (type) == ICMP_IREQREPLY || \
- (type) == ICMP_MASKREQ || (type) == ICMP_MASKREPLY)
-
-#ifdef KERNEL
-void icmp_error __P((struct mbuf *, int, int, n_long, struct ifnet *));
-void icmp_input __P((struct mbuf *, int));
-#endif
-
-#endif
diff --git a/cpukit/libnetworking/netinet/ip_input.c b/cpukit/libnetworking/netinet/ip_input.c
deleted file mode 100644
index 238e10cf6b..0000000000
--- a/cpukit/libnetworking/netinet/ip_input.c
+++ /dev/null
@@ -1,1488 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ip_input.c 8.2 (Berkeley) 1/4/94
- * $Id$
- * $ANA: ip_input.c,v 1.5 1996/09/18 14:34:59 wollman Exp $
- */
-
-#define _IP_VHL
-
-#include "opt_ipfw.h"
-
-#include <stddef.h>
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/malloc.h>
-#include <sys/mbuf.h>
-#include <sys/domain.h>
-#include <sys/protosw.h>
-#include <sys/socket.h>
-#include <sys/errno.h>
-#include <sys/time.h>
-#include <sys/kernel.h>
-#include <sys/syslog.h>
-#include <sys/sysctl.h>
-
-#include <net/if.h>
-#include <net/if_dl.h>
-#include <net/route.h>
-#include <net/netisr.h>
-
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/in_var.h>
-#include <netinet/ip.h>
-#include <netinet/in_pcb.h>
-#include <netinet/in_var.h>
-#include <netinet/ip_var.h>
-#include <netinet/ip_icmp.h>
-#include <machine/in_cksum.h>
-
-#include <sys/socketvar.h>
-
-#ifdef IPFIREWALL
-#include <netinet/ip_fw.h>
-#endif
-
-int rsvp_on = 0;
-static int ip_rsvp_on;
-struct socket *ip_rsvpd;
-
-static int ipforwarding = 0;
-SYSCTL_INT(_net_inet_ip, IPCTL_FORWARDING, forwarding, CTLFLAG_RW,
- &ipforwarding, 0, "");
-
-static int ipsendredirects = 1; /* XXX */
-SYSCTL_INT(_net_inet_ip, IPCTL_SENDREDIRECTS, redirect, CTLFLAG_RW,
- &ipsendredirects, 0, "");
-
-int ip_defttl = IPDEFTTL;
-SYSCTL_INT(_net_inet_ip, IPCTL_DEFTTL, ttl, CTLFLAG_RW,
- &ip_defttl, 0, "");
-
-static int ip_dosourceroute = 0;
-SYSCTL_INT(_net_inet_ip, IPCTL_SOURCEROUTE, sourceroute, CTLFLAG_RW,
- &ip_dosourceroute, 0, "");
-
-static int ip_acceptsourceroute = 0;
-SYSCTL_INT(_net_inet_ip, IPCTL_ACCEPTSOURCEROUTE, accept_sourceroute,
- CTLFLAG_RW, &ip_acceptsourceroute, 0, "");
-#ifdef DIAGNOSTIC
-static int ipprintfs = 0;
-#endif
-
-extern struct domain inetdomain;
-extern struct protosw inetsw[];
-u_char ip_protox[IPPROTO_MAX];
-static int ipqmaxlen = IFQ_MAXLEN;
-struct in_ifaddr *in_ifaddr; /* first inet address */
-struct ifqueue ipintrq;
-SYSCTL_INT(_net_inet_ip, IPCTL_INTRQMAXLEN, intr_queue_maxlen, CTLFLAG_RD,
- &ipintrq.ifq_maxlen, 0, "");
-SYSCTL_INT(_net_inet_ip, IPCTL_INTRQDROPS, intr_queue_drops, CTLFLAG_RD,
- &ipintrq.ifq_drops, 0, "");
-
-struct ipstat ipstat;
-
-/* Packet reassembly stuff */
-#define IPREASS_NHASH_LOG2 6
-#define IPREASS_NHASH (1 << IPREASS_NHASH_LOG2)
-#define IPREASS_HMASK (IPREASS_NHASH - 1)
-#define IPREASS_HASH(x,y) \
- (((((x) & 0xF) | ((((x) >> 8) & 0xF) << 4)) ^ (y)) & IPREASS_HMASK)
-
-static struct ipq ipq[IPREASS_NHASH];
-static int nipq = 0; /* total # of reass queues */
-static int maxnipq;
-
-#ifdef IPCTL_DEFMTU
-SYSCTL_INT(_net_inet_ip, IPCTL_DEFMTU, mtu, CTLFLAG_RW,
- &ip_mtu, 0, "");
-#endif
-
-#if !defined(COMPAT_IPFW) || COMPAT_IPFW == 1
-#undef COMPAT_IPFW
-#define COMPAT_IPFW 1
-#else
-#undef COMPAT_IPFW
-#endif
-
-#ifdef COMPAT_IPFW
-/* Firewall hooks */
-ip_fw_chk_t *ip_fw_chk_ptr;
-ip_fw_ctl_t *ip_fw_ctl_ptr;
-
-/* IP Network Address Translation (NAT) hooks */
-ip_nat_t *ip_nat_ptr;
-ip_nat_ctl_t *ip_nat_ctl_ptr;
-#endif
-
-/*
- * We need to save the IP options in case a protocol wants to respond
- * to an incoming packet over the same route if the packet got here
- * using IP source routing. This allows connection establishment and
- * maintenance when the remote end is on a network that is not known
- * to us.
- */
-static int ip_nhops = 0;
-static struct ip_srcrt {
- struct in_addr dst; /* final destination */
- char nop; /* one NOP to align */
- char srcopt[IPOPT_OFFSET + 1]; /* OPTVAL, OLEN and OFFSET */
- struct in_addr route[MAX_IPOPTLEN/sizeof(struct in_addr)];
-} ip_srcrt;
-
-#ifdef IPDIVERT
-/*
- * Shared variable between ip_input() and ip_reass() to communicate
- * about which packets, once assembled from fragments, get diverted,
- * and to which port.
- */
-static u_short frag_divert_port;
-#endif
-
-static void save_rte __P((u_char *, struct in_addr));
-static void ip_deq __P((struct ipasfrag *));
-static int ip_dooptions __P((struct mbuf *));
-static void ip_enq __P((struct ipasfrag *, struct ipasfrag *));
-static void ip_forward __P((struct mbuf *, int));
-static void ip_freef __P((struct ipq *));
-static struct ip *
- ip_reass __P((struct ipasfrag *, struct ipq *, struct ipq *));
-static struct in_ifaddr *
- ip_rtaddr __P((struct in_addr));
-void ipintr __P((void));
-/*
- * IP initialization: fill in IP protocol switch table.
- * All protocols not implemented in kernel go to raw IP protocol handler.
- */
-void
-ip_init()
-{
- register struct protosw *pr;
- register int i;
-
- pr = pffindproto(PF_INET, IPPROTO_RAW, SOCK_RAW);
- if (pr == 0)
- panic("ip_init");
- for (i = 0; i < IPPROTO_MAX; i++)
- ip_protox[i] = pr - inetsw;
- for (pr = inetdomain.dom_protosw;
- pr < inetdomain.dom_protoswNPROTOSW; pr++)
- if (pr->pr_domain->dom_family == PF_INET &&
- pr->pr_protocol && pr->pr_protocol != IPPROTO_RAW)
- ip_protox[pr->pr_protocol] = pr - inetsw;
-
- for (i = 0; i < IPREASS_NHASH; i++)
- ipq[i].next = ipq[i].prev = &ipq[i];
-
- maxnipq = nmbclusters/4;
-
- ip_id = rtems_bsdnet_seconds_since_boot() & 0xffff;
- ipintrq.ifq_maxlen = ipqmaxlen;
-#ifdef IPFIREWALL
- ip_fw_init();
-#endif
-#ifdef IPNAT
- ip_nat_init();
-#endif
-
-}
-
-static struct sockaddr_in ipaddr = { sizeof(ipaddr), AF_INET };
-static struct route ipforward_rt;
-
-/*
- * Ip input routine. Checksum and byte swap header. If fragmented
- * try to reassemble. Process options. Pass to next level.
- */
-void
-ip_input(struct mbuf *m)
-{
- struct ip *ip;
- struct ipq *fp;
- struct in_ifaddr *ia;
- int i, hlen;
- u_short sum;
-
-#ifdef DIAGNOSTIC
- if ((m->m_flags & M_PKTHDR) == 0)
- panic("ip_input no HDR");
-#endif
- /*
- * If no IP addresses have been set yet but the interfaces
- * are receiving, can't do anything with incoming packets yet.
- */
- if (in_ifaddr == NULL)
- goto bad;
- ipstat.ips_total++;
-
- if (m->m_pkthdr.len < sizeof(struct ip))
- goto tooshort;
-
-#if defined(DIAGNOSTIC) && defined(ORIGINAL_FREEBSD_CODE)
- if (m->m_len < sizeof(struct ip))
- panic("ipintr mbuf too short");
-#endif
-
- if (m->m_len < sizeof (struct ip) &&
- (m = m_pullup(m, sizeof (struct ip))) == 0) {
- ipstat.ips_toosmall++;
- return;
- }
- ip = mtod(m, struct ip *);
-
- if (IP_VHL_V(ip->ip_vhl) != IPVERSION) {
- ipstat.ips_badvers++;
- goto bad;
- }
-
- hlen = IP_VHL_HL(ip->ip_vhl) << 2;
- if (hlen < sizeof(struct ip)) { /* minimum header length */
- ipstat.ips_badhlen++;
- goto bad;
- }
- if (hlen > m->m_len) {
- if ((m = m_pullup(m, hlen)) == 0) {
- ipstat.ips_badhlen++;
- return;
- }
- ip = mtod(m, struct ip *);
- }
- if (hlen == sizeof(struct ip)) {
- sum = in_cksum_hdr(ip);
- } else {
- sum = in_cksum(m, hlen);
- }
- if (sum) {
- ipstat.ips_badsum++;
- goto bad;
- }
-
- /*
- * Convert fields to host representation.
- */
- NTOHS(ip->ip_len);
- if (ip->ip_len < hlen) {
- ipstat.ips_badlen++;
- goto bad;
- }
- NTOHS(ip->ip_id);
- NTOHS(ip->ip_off);
-
- /*
- * Check that the amount of data in the buffers
- * is as at least much as the IP header would have us expect.
- * Trim mbufs if longer than we expect.
- * Drop packet if shorter than we expect.
- */
- if (m->m_pkthdr.len < ip->ip_len) {
-tooshort:
- ipstat.ips_tooshort++;
- goto bad;
- }
- if (m->m_pkthdr.len > ip->ip_len) {
- if (m->m_len == m->m_pkthdr.len) {
- m->m_len = ip->ip_len;
- m->m_pkthdr.len = ip->ip_len;
- } else
- m_adj(m, ip->ip_len - m->m_pkthdr.len);
- }
- /*
- * IpHack's section.
- * Right now when no processing on packet has done
- * and it is still fresh out of network we do our black
- * deals with it.
- * - Firewall: deny/allow/divert
- * - Xlate: translate packet's addr/port (NAT).
- * - Wrap: fake packet's addr/port <unimpl.>
- * - Encapsulate: put it in another IP and send out. <unimp.>
- */
-
-#ifdef COMPAT_IPFW
- if (ip_fw_chk_ptr) {
-#ifdef IPDIVERT
- u_short port;
-
- port = (*ip_fw_chk_ptr)(&ip, hlen, NULL, ip_divert_ignore, &m);
- ip_divert_ignore = 0;
- if (port) { /* Divert packet */
- frag_divert_port = port;
- goto ours;
- }
-#else
- /* If ipfw says divert, we have to just drop packet */
- if ((*ip_fw_chk_ptr)(&ip, hlen, NULL, 0, &m)) {
- m_freem(m);
- m = NULL;
- }
-#endif
- if (!m)
- return;
- }
-
- if (ip_nat_ptr && !(*ip_nat_ptr)(&ip, &m, m->m_pkthdr.rcvif, IP_NAT_IN))
- return;
-#endif
-
- /*
- * Process options and, if not destined for us,
- * ship it on. ip_dooptions returns 1 when an
- * error was detected (causing an icmp message
- * to be sent and the original packet to be freed).
- */
- ip_nhops = 0; /* for source routed packets */
- if (hlen > sizeof (struct ip) && ip_dooptions(m))
- return;
-
- /* greedy RSVP, snatches any PATH packet of the RSVP protocol and no
- * matter if it is destined to another node, or whether it is
- * a multicast one, RSVP wants it! and prevents it from being forwarded
- * anywhere else. Also checks if the rsvp daemon is running before
- * grabbing the packet.
- */
- if (rsvp_on && ip->ip_p==IPPROTO_RSVP)
- goto ours;
-
- /*
- * Check our list of addresses, to see if the packet is for us.
- */
- for (ia = in_ifaddr; ia; ia = ia->ia_next) {
-#define satosin(sa) ((struct sockaddr_in *)(sa))
-
- if (IA_SIN(ia)->sin_addr.s_addr == ip->ip_dst.s_addr)
- goto ours;
-#ifdef BOOTP_COMPAT
- if (IA_SIN(ia)->sin_addr.s_addr == INADDR_ANY)
- goto ours;
-#endif
- if (ia->ia_ifp && ia->ia_ifp->if_flags & IFF_BROADCAST) {
- if (satosin(&ia->ia_broadaddr)->sin_addr.s_addr ==
- ip->ip_dst.s_addr)
- goto ours;
- if (ip->ip_dst.s_addr == ia->ia_netbroadcast.s_addr)
- goto ours;
- }
- }
- if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr))) {
- struct in_multi *inm;
- if (ip_mrouter) {
- /*
- * If we are acting as a multicast router, all
- * incoming multicast packets are passed to the
- * kernel-level multicast forwarding function.
- * The packet is returned (relatively) intact; if
- * ip_mforward() returns a non-zero value, the packet
- * must be discarded, else it may be accepted below.
- *
- * (The IP ident field is put in the same byte order
- * as expected when ip_mforward() is called from
- * ip_output().)
- */
- ip->ip_id = htons(ip->ip_id);
- if (ip_mforward(ip, m->m_pkthdr.rcvif, m, 0) != 0) {
- ipstat.ips_cantforward++;
- m_freem(m);
- return;
- }
- ip->ip_id = ntohs(ip->ip_id);
-
- /*
- * The process-level routing demon needs to receive
- * all multicast IGMP packets, whether or not this
- * host belongs to their destination groups.
- */
- if (ip->ip_p == IPPROTO_IGMP)
- goto ours;
- ipstat.ips_forward++;
- }
- /*
- * See if we belong to the destination multicast group on the
- * arrival interface.
- */
- IN_LOOKUP_MULTI(ip->ip_dst, m->m_pkthdr.rcvif, inm);
- if (inm == NULL) {
- ipstat.ips_cantforward++;
- m_freem(m);
- return;
- }
- goto ours;
- }
- if (ip->ip_dst.s_addr == (u_long)INADDR_BROADCAST)
- goto ours;
- if (ip->ip_dst.s_addr == INADDR_ANY)
- goto ours;
-
- /*
- * Not for us; forward if possible and desirable.
- */
- if (ipforwarding == 0) {
- ipstat.ips_cantforward++;
- m_freem(m);
- } else
- ip_forward(m, 0);
- return;
-
-ours:
-
- /*
- * If offset or IP_MF are set, must reassemble.
- * Otherwise, nothing need be done.
- * (We could look in the reassembly queue to see
- * if the packet was previously fragmented,
- * but it's not worth the time; just let them time out.)
- */
- if (ip->ip_off &~ (IP_DF | IP_RF)) {
- if (m->m_flags & M_EXT) { /* XXX */
- if ((m = m_pullup(m, sizeof (struct ip))) == 0) {
- ipstat.ips_toosmall++;
-#ifdef IPDIVERT
- frag_divert_port = 0;
-#endif
- return;
- }
- ip = mtod(m, struct ip *);
- }
- sum = IPREASS_HASH(ip->ip_src.s_addr, ip->ip_id);
- /*
- * Look for queue of fragments
- * of this datagram.
- */
- for (fp = ipq[sum].next; fp != &ipq[sum]; fp = fp->next)
- if (ip->ip_id == fp->ipq_id &&
- ip->ip_src.s_addr == fp->ipq_src.s_addr &&
- ip->ip_dst.s_addr == fp->ipq_dst.s_addr &&
- ip->ip_p == fp->ipq_p)
- goto found;
-
- fp = 0;
-
- /* check if there's a place for the new queue */
- if (nipq > maxnipq) {
- /*
- * drop something from the tail of the current queue
- * before proceeding further
- */
- if (ipq[sum].prev == &ipq[sum]) { /* gak */
- for (i = 0; i < IPREASS_NHASH; i++) {
- if (ipq[i].prev != &ipq[i]) {
- ip_freef(ipq[i].prev);
- break;
- }
- }
- } else
- ip_freef(ipq[sum].prev);
- }
-found:
- /*
- * Adjust ip_len to not reflect header,
- * set ip_mff if more fragments are expected,
- * convert offset of this to bytes.
- */
- ip->ip_len -= hlen;
- ((struct ipasfrag *)ip)->ipf_mff &= ~1;
- if (ip->ip_off & IP_MF)
- ((struct ipasfrag *)ip)->ipf_mff |= 1;
- ip->ip_off <<= 3;
-
- /*
- * If datagram marked as having more fragments
- * or if this is not the first fragment,
- * attempt reassembly; if it succeeds, proceed.
- */
- if (((struct ipasfrag *)ip)->ipf_mff & 1 || ip->ip_off) {
- ipstat.ips_fragments++;
- ip = ip_reass((struct ipasfrag *)ip, fp, &ipq[sum]);
- if (ip == 0)
- return;
- ipstat.ips_reassembled++;
- m = dtom(ip);
-#ifdef IPDIVERT
- if (frag_divert_port) {
- ip->ip_len += hlen;
- HTONS(ip->ip_len);
- HTONS(ip->ip_off);
- HTONS(ip->ip_id);
- ip->ip_sum = 0;
- ip->ip_sum = in_cksum_hdr(ip);
- NTOHS(ip->ip_id);
- NTOHS(ip->ip_off);
- NTOHS(ip->ip_len);
- ip->ip_len -= hlen;
- }
-#endif
- } else
- if (fp)
- ip_freef(fp);
- } else
- ip->ip_len -= hlen;
-
-#ifdef IPDIVERT
- /*
- * Divert reassembled packets to the divert protocol if required
- */
- if (frag_divert_port) {
- ipstat.ips_delivered++;
- ip_divert_port = frag_divert_port;
- frag_divert_port = 0;
- (*inetsw[ip_protox[IPPROTO_DIVERT]].pr_input)(m, hlen);
- return;
- }
-
- /* Don't let packets divert themselves */
- if (ip->ip_p == IPPROTO_DIVERT) {
- ipstat.ips_noproto++;
- goto bad;
- }
-#endif
-
- /*
- * Switch out to protocol's input routine.
- */
- ipstat.ips_delivered++;
- (*inetsw[ip_protox[ip->ip_p]].pr_input)(m, hlen);
- return;
-bad:
- m_freem(m);
-}
-
-/*
- * IP software interrupt routine - to go away sometime soon
- */
-void
-ipintr(void)
-{
- int s;
- struct mbuf *m;
-
- while(1) {
- s = splimp();
- IF_DEQUEUE(&ipintrq, m);
- splx(s);
- if (m == 0)
- return;
- ip_input(m);
- }
-}
-
-NETISR_SET(NETISR_IP, ipintr);
-
-/*
- * Take incoming datagram fragment and try to
- * reassemble it into whole datagram. If a chain for
- * reassembly of this datagram already exists, then it
- * is given as fp; otherwise have to make a chain.
- */
-static struct ip *
-ip_reass(ip, fp, where)
- register struct ipasfrag *ip;
- register struct ipq *fp;
- struct ipq *where;
-{
- register struct mbuf *m = dtom(ip);
- register struct ipasfrag *q;
- struct mbuf *t;
- int hlen = ip->ip_hl << 2;
- int i, next;
-
- /*
- * Presence of header sizes in mbufs
- * would confuse code below.
- */
- m->m_data += hlen;
- m->m_len -= hlen;
-
- /*
- * If first fragment to arrive, create a reassembly queue.
- */
- if (fp == 0) {
- if ((t = m_get(M_DONTWAIT, MT_FTABLE)) == NULL)
- goto dropfrag;
- fp = mtod(t, struct ipq *);
- insque(fp, where);
- nipq++;
- fp->ipq_ttl = IPFRAGTTL;
- fp->ipq_p = ip->ip_p;
- fp->ipq_id = ip->ip_id;
- fp->ipq_next = fp->ipq_prev = (struct ipasfrag *)fp;
- fp->ipq_src = ((struct ip *)ip)->ip_src;
- fp->ipq_dst = ((struct ip *)ip)->ip_dst;
-#ifdef IPDIVERT
- fp->ipq_divert = 0;
-#endif
- q = (struct ipasfrag *)fp;
- goto insert;
- }
-
- /*
- * Find a segment which begins after this one does.
- */
- for (q = fp->ipq_next; q != (struct ipasfrag *)fp; q = q->ipf_next)
- if (q->ip_off > ip->ip_off)
- break;
-
- /*
- * If there is a preceding segment, it may provide some of
- * our data already. If so, drop the data from the incoming
- * segment. If it provides all of our data, drop us.
- */
- if (q->ipf_prev != (struct ipasfrag *)fp) {
- i = q->ipf_prev->ip_off + q->ipf_prev->ip_len - ip->ip_off;
- if (i > 0) {
- if (i >= ip->ip_len)
- goto dropfrag;
- m_adj(dtom(ip), i);
- ip->ip_off += i;
- ip->ip_len -= i;
- }
- }
-
- /*
- * While we overlap succeeding segments trim them or,
- * if they are completely covered, dequeue them.
- */
- while (q != (struct ipasfrag *)fp && ip->ip_off + ip->ip_len > q->ip_off) {
- struct mbuf *m0;
-
- i = (ip->ip_off + ip->ip_len) - q->ip_off;
- if (i < q->ip_len) {
- q->ip_len -= i;
- q->ip_off += i;
- m_adj(dtom(q), i);
- break;
- }
- m0 = dtom(q);
- q = q->ipf_next;
- ip_deq(q->ipf_prev);
- m_freem(m0);
- }
-
-insert:
-
-#ifdef IPDIVERT
- /*
- * Any fragment diverting causes the whole packet to divert
- */
- if (frag_divert_port != 0)
- fp->ipq_divert = frag_divert_port;
- frag_divert_port = 0;
-#endif
-
- /*
- * Stick new segment in its place;
- * check for complete reassembly.
- */
- ip_enq(ip, q->ipf_prev);
- next = 0;
- for (q = fp->ipq_next; q != (struct ipasfrag *)fp; q = q->ipf_next) {
- if (q->ip_off != next)
- return (0);
- next += q->ip_len;
- }
- if (q->ipf_prev->ipf_mff & 1)
- return (0);
-
- /*
- * Reassembly is complete. Make sure the packet is a sane size.
- */
- if (next + (IP_VHL_HL(((struct ip *)fp->ipq_next)->ip_vhl) << 2)
- > IP_MAXPACKET) {
- ipstat.ips_toolong++;
- ip_freef(fp);
- return (0);
- }
-
- /*
- * Concatenate fragments.
- */
- q = fp->ipq_next;
- m = dtom(q);
- t = m->m_next;
- m->m_next = 0;
- m_cat(m, t);
- q = q->ipf_next;
- while (q != (struct ipasfrag *)fp) {
- t = dtom(q);
- q = q->ipf_next;
- m_cat(m, t);
- }
-
-#ifdef IPDIVERT
- /*
- * Record divert port for packet, if any
- */
- frag_divert_port = fp->ipq_divert;
-#endif
-
- /*
- * Create header for new ip packet by
- * modifying header of first packet;
- * dequeue and discard fragment reassembly header.
- * Make header visible.
- */
- ip = fp->ipq_next;
- ip->ip_len = next;
- ip->ipf_mff &= ~1;
- ((struct ip *)ip)->ip_src = fp->ipq_src;
- ((struct ip *)ip)->ip_dst = fp->ipq_dst;
- remque(fp);
- nipq--;
- (void) m_free(dtom(fp));
- m = dtom(ip);
- m->m_len += (ip->ip_hl << 2);
- m->m_data -= (ip->ip_hl << 2);
- /* some debugging cruft by sklower, below, will go away soon */
- if (m->m_flags & M_PKTHDR) { /* XXX this should be done elsewhere */
- register int plen = 0;
- for (t = m; m; m = m->m_next)
- plen += m->m_len;
- t->m_pkthdr.len = plen;
- }
- return ((struct ip *)ip);
-
-dropfrag:
- ipstat.ips_fragdropped++;
- m_freem(m);
- return (0);
-}
-
-/*
- * Free a fragment reassembly header and all
- * associated datagrams.
- */
-static void
-ip_freef(fp)
- struct ipq *fp;
-{
- register struct ipasfrag *q, *p;
-
- for (q = fp->ipq_next; q != (struct ipasfrag *)fp; q = p) {
- p = q->ipf_next;
- ip_deq(q);
- m_freem(dtom(q));
- }
- remque(fp);
- (void) m_free(dtom(fp));
- nipq--;
-}
-
-/*
- * Put an ip fragment on a reassembly chain.
- * Like insque, but pointers in middle of structure.
- */
-static void
-ip_enq(p, prev)
- register struct ipasfrag *p, *prev;
-{
-
- p->ipf_prev = prev;
- p->ipf_next = prev->ipf_next;
- prev->ipf_next->ipf_prev = p;
- prev->ipf_next = p;
-}
-
-/*
- * To ip_enq as remque is to insque.
- */
-static void
-ip_deq(p)
- register struct ipasfrag *p;
-{
-
- p->ipf_prev->ipf_next = p->ipf_next;
- p->ipf_next->ipf_prev = p->ipf_prev;
-}
-
-/*
- * IP timer processing;
- * if a timer expires on a reassembly
- * queue, discard it.
- */
-void
-ip_slowtimo()
-{
- register struct ipq *fp;
- int s = splnet();
- int i;
-
- for (i = 0; i < IPREASS_NHASH; i++) {
- fp = ipq[i].next;
- if (fp == 0)
- continue;
- while (fp != &ipq[i]) {
- --fp->ipq_ttl;
- fp = fp->next;
- if (fp->prev->ipq_ttl == 0) {
- ipstat.ips_fragtimeout++;
- ip_freef(fp->prev);
- }
- }
- }
- splx(s);
-}
-
-/*
- * Drain off all datagram fragments.
- */
-void
-ip_drain()
-{
- int i;
-
- for (i = 0; i < IPREASS_NHASH; i++) {
- while (ipq[i].next != &ipq[i]) {
- ipstat.ips_fragdropped++;
- ip_freef(ipq[i].next);
- }
- }
- in_rtqdrain();
-}
-
-/*
- * Do option processing on a datagram,
- * possibly discarding it if bad options are encountered,
- * or forwarding it if source-routed.
- * Returns 1 if packet has been forwarded/freed,
- * 0 if the packet should be processed further.
- */
-static int
-ip_dooptions(m)
- struct mbuf *m;
-{
- register struct ip *ip = mtod(m, struct ip *);
- register u_char *cp;
- register struct ip_timestamp *ipt;
- register struct in_ifaddr *ia;
- int opt, optlen, cnt, off, code, type = ICMP_PARAMPROB, forward = 0;
- struct in_addr *sin, dst;
- n_time ntime;
-
- dst = ip->ip_dst;
- cp = (u_char *)(ip + 1);
- cnt = (IP_VHL_HL(ip->ip_vhl) << 2) - sizeof (struct ip);
- for (; cnt > 0; cnt -= optlen, cp += optlen) {
- opt = cp[IPOPT_OPTVAL];
- if (opt == IPOPT_EOL)
- break;
- if (opt == IPOPT_NOP)
- optlen = 1;
- else {
- optlen = cp[IPOPT_OLEN];
- if (optlen <= 0 || optlen > cnt) {
- code = &cp[IPOPT_OLEN] - (u_char *)ip;
- goto bad;
- }
- }
- switch (opt) {
-
- default:
- break;
-
- /*
- * Source routing with record.
- * Find interface with current destination address.
- * If none on this machine then drop if strictly routed,
- * or do nothing if loosely routed.
- * Record interface address and bring up next address
- * component. If strictly routed make sure next
- * address is on directly accessible net.
- */
- case IPOPT_LSRR:
- case IPOPT_SSRR:
- if ((off = cp[IPOPT_OFFSET]) < IPOPT_MINOFF) {
- code = &cp[IPOPT_OFFSET] - (u_char *)ip;
- goto bad;
- }
- ipaddr.sin_addr = ip->ip_dst;
- ia = (struct in_ifaddr *)
- ifa_ifwithaddr((struct sockaddr *)&ipaddr);
- if (ia == 0) {
- if (opt == IPOPT_SSRR) {
- type = ICMP_UNREACH;
- code = ICMP_UNREACH_SRCFAIL;
- goto bad;
- }
- if (!ip_dosourceroute)
- goto nosourcerouting;
- /*
- * Loose routing, and not at next destination
- * yet; nothing to do except forward.
- */
- break;
- }
- off--; /* 0 origin */
- if (off > optlen - sizeof(struct in_addr)) {
- /*
- * End of source route. Should be for us.
- */
- if (!ip_acceptsourceroute)
- goto nosourcerouting;
- save_rte(cp, ip->ip_src);
- break;
- }
-
- if (!ip_dosourceroute) {
- char buf[4*sizeof "123"];
-
-nosourcerouting:
- strcpy(buf, inet_ntoa(ip->ip_dst));
- log(LOG_WARNING,
- "attempted source route from %s to %s\n",
- inet_ntoa(ip->ip_src), buf);
- type = ICMP_UNREACH;
- code = ICMP_UNREACH_SRCFAIL;
- goto bad;
- }
-
- /*
- * locate outgoing interface
- */
- (void)memcpy(&ipaddr.sin_addr, cp + off,
- sizeof(ipaddr.sin_addr));
-
- if (opt == IPOPT_SSRR) {
-#define INA struct in_ifaddr *
-#define SA struct sockaddr *
- if ((ia = (INA)ifa_ifwithdstaddr((SA)&ipaddr)) == 0)
- ia = (INA)ifa_ifwithnet((SA)&ipaddr);
- } else
- ia = ip_rtaddr(ipaddr.sin_addr);
- if (ia == 0) {
- type = ICMP_UNREACH;
- code = ICMP_UNREACH_SRCFAIL;
- goto bad;
- }
- ip->ip_dst = ipaddr.sin_addr;
- (void)memcpy(cp + off, &(IA_SIN(ia)->sin_addr),
- sizeof(struct in_addr));
- cp[IPOPT_OFFSET] += sizeof(struct in_addr);
- /*
- * Let ip_intr's mcast routing check handle mcast pkts
- */
- forward = !IN_MULTICAST(ntohl(ip->ip_dst.s_addr));
- break;
-
- case IPOPT_RR:
- if ((off = cp[IPOPT_OFFSET]) < IPOPT_MINOFF) {
- code = &cp[IPOPT_OFFSET] - (u_char *)ip;
- goto bad;
- }
- /*
- * If no space remains, ignore.
- */
- off--; /* 0 origin */
- if (off > optlen - sizeof(struct in_addr))
- break;
- (void)memcpy(&ipaddr.sin_addr, &ip->ip_dst,
- sizeof(ipaddr.sin_addr));
- /*
- * locate outgoing interface; if we're the destination,
- * use the incoming interface (should be same).
- */
- if ((ia = (INA)ifa_ifwithaddr((SA)&ipaddr)) == 0 &&
- (ia = ip_rtaddr(ipaddr.sin_addr)) == 0) {
- type = ICMP_UNREACH;
- code = ICMP_UNREACH_HOST;
- goto bad;
- }
- (void)memcpy(cp + off, &(IA_SIN(ia)->sin_addr),
- sizeof(struct in_addr));
- cp[IPOPT_OFFSET] += sizeof(struct in_addr);
- break;
-
- case IPOPT_TS:
- code = cp - (u_char *)ip;
- ipt = (struct ip_timestamp *)cp;
- if (ipt->ipt_len < 5)
- goto bad;
- if (ipt->ipt_ptr > ipt->ipt_len - sizeof (long)) {
- if (++ipt->ipt_oflw == 0)
- goto bad;
- break;
- }
- sin = (struct in_addr *)(cp + ipt->ipt_ptr - 1);
- switch (ipt->ipt_flg) {
-
- case IPOPT_TS_TSONLY:
- break;
-
- case IPOPT_TS_TSANDADDR:
- if (ipt->ipt_ptr + sizeof(n_time) +
- sizeof(struct in_addr) > ipt->ipt_len)
- goto bad;
- ipaddr.sin_addr = dst;
- ia = (INA)ifaof_ifpforaddr((SA)&ipaddr,
- m->m_pkthdr.rcvif);
- if (ia == 0)
- continue;
- (void)memcpy(sin, &IA_SIN(ia)->sin_addr,
- sizeof(struct in_addr));
- ipt->ipt_ptr += sizeof(struct in_addr);
- break;
-
- case IPOPT_TS_PRESPEC:
- if (ipt->ipt_ptr + sizeof(n_time) +
- sizeof(struct in_addr) > ipt->ipt_len)
- goto bad;
- (void)memcpy(&ipaddr.sin_addr, sin,
- sizeof(struct in_addr));
- if (ifa_ifwithaddr((SA)&ipaddr) == 0)
- continue;
- ipt->ipt_ptr += sizeof(struct in_addr);
- break;
-
- default:
- goto bad;
- }
- ntime = iptime();
- (void)memcpy(cp + ipt->ipt_ptr - 1, &ntime,
- sizeof(n_time));
- ipt->ipt_ptr += sizeof(n_time);
- }
- }
- if (forward && ipforwarding) {
- ip_forward(m, 1);
- return (1);
- }
- return (0);
-bad:
- ip->ip_len -= IP_VHL_HL(ip->ip_vhl) << 2; /* XXX icmp_error adds in hdr length */
- icmp_error(m, type, code, 0, 0);
- ipstat.ips_badoptions++;
- return (1);
-}
-
-/*
- * Given address of next destination (final or next hop),
- * return internet address info of interface to be used to get there.
- */
-static struct in_ifaddr *
-ip_rtaddr(dst)
- struct in_addr dst;
-{
- register struct sockaddr_in *sin;
-
- sin = (struct sockaddr_in *) &ipforward_rt.ro_dst;
-
- if (ipforward_rt.ro_rt == 0 || dst.s_addr != sin->sin_addr.s_addr) {
- if (ipforward_rt.ro_rt) {
- RTFREE(ipforward_rt.ro_rt);
- ipforward_rt.ro_rt = 0;
- }
- sin->sin_family = AF_INET;
- sin->sin_len = sizeof(*sin);
- sin->sin_addr = dst;
-
- rtalloc_ign(&ipforward_rt, RTF_PRCLONING);
- }
- if (ipforward_rt.ro_rt == 0)
- return ((struct in_ifaddr *)0);
- return ((struct in_ifaddr *) ipforward_rt.ro_rt->rt_ifa);
-}
-
-/*
- * Save incoming source route for use in replies,
- * to be picked up later by ip_srcroute if the receiver is interested.
- */
-void
-save_rte(option, dst)
- u_char *option;
- struct in_addr dst;
-{
- unsigned olen;
-
- olen = option[IPOPT_OLEN];
-#ifdef DIAGNOSTIC
- if (ipprintfs)
- printf("save_rte: olen %d\n", olen);
-#endif
- if (olen > sizeof(ip_srcrt) - (1 + sizeof(dst)))
- return;
- bcopy(option, ip_srcrt.srcopt, olen);
- ip_nhops = (olen - IPOPT_OFFSET - 1) / sizeof(struct in_addr);
- ip_srcrt.dst = dst;
-}
-
-/*
- * Retrieve incoming source route for use in replies,
- * in the same form used by setsockopt.
- * The first hop is placed before the options, will be removed later.
- */
-struct mbuf *
-ip_srcroute()
-{
- register struct in_addr *p, *q;
- register struct mbuf *m;
-
- if (ip_nhops == 0)
- return ((struct mbuf *)0);
- m = m_get(M_DONTWAIT, MT_SOOPTS);
- if (m == 0)
- return ((struct mbuf *)0);
-
-#define OPTSIZ (sizeof(ip_srcrt.nop) + sizeof(ip_srcrt.srcopt))
-
- /* length is (nhops+1)*sizeof(addr) + sizeof(nop + srcrt header) */
- m->m_len = ip_nhops * sizeof(struct in_addr) + sizeof(struct in_addr) +
- OPTSIZ;
-#ifdef DIAGNOSTIC
- if (ipprintfs)
- printf("ip_srcroute: nhops %d mlen %d", ip_nhops, m->m_len);
-#endif
-
- /*
- * First save first hop for return route
- */
- p = &ip_srcrt.route[ip_nhops - 1];
- *(mtod(m, struct in_addr *)) = *p--;
-#ifdef DIAGNOSTIC
- if (ipprintfs)
- printf(" hops %lx", ntohl(mtod(m, struct in_addr *)->s_addr));
-#endif
-
- /*
- * Copy option fields and padding (nop) to mbuf.
- */
- ip_srcrt.nop = IPOPT_NOP;
- ip_srcrt.srcopt[IPOPT_OFFSET] = IPOPT_MINOFF;
- (void)memcpy(mtod(m, caddr_t) + sizeof(struct in_addr),
- &ip_srcrt.nop, OPTSIZ);
- q = (struct in_addr *)(mtod(m, caddr_t) +
- sizeof(struct in_addr) + OPTSIZ);
-#undef OPTSIZ
- /*
- * Record return path as an IP source route,
- * reversing the path (pointers are now aligned).
- */
- while (p >= ip_srcrt.route) {
-#ifdef DIAGNOSTIC
- if (ipprintfs)
- printf(" %lx", ntohl(q->s_addr));
-#endif
- *q++ = *p--;
- }
- /*
- * Last hop goes to final destination.
- */
- *q = ip_srcrt.dst;
-#ifdef DIAGNOSTIC
- if (ipprintfs)
- printf(" %lx\n", ntohl(q->s_addr));
-#endif
- return (m);
-}
-
-/*
- * Strip out IP options, at higher
- * level protocol in the kernel.
- * Second argument is buffer to which options
- * will be moved, and return value is their length.
- * XXX should be deleted; last arg currently ignored.
- */
-void
-ip_stripoptions(m, mopt)
- register struct mbuf *m;
- struct mbuf *mopt;
-{
- register int i;
- struct ip *ip = mtod(m, struct ip *);
- register caddr_t opts;
- int olen;
-
- olen = (IP_VHL_HL(ip->ip_vhl) << 2) - sizeof (struct ip);
- opts = (caddr_t)(ip + 1);
- i = m->m_len - (sizeof (struct ip) + olen);
- bcopy(opts + olen, opts, (unsigned)i);
- m->m_len -= olen;
- if (m->m_flags & M_PKTHDR)
- m->m_pkthdr.len -= olen;
- ip->ip_vhl = IP_MAKE_VHL(IPVERSION, sizeof(struct ip) >> 2);
-}
-
-u_char inetctlerrmap[PRC_NCMDS] = {
- 0, 0, 0, 0,
- 0, EMSGSIZE, EHOSTDOWN, EHOSTUNREACH,
- EHOSTUNREACH, EHOSTUNREACH, ECONNREFUSED, ECONNREFUSED,
- EMSGSIZE, EHOSTUNREACH, 0, 0,
- 0, 0, 0, 0,
- ENOPROTOOPT
-};
-
-/*
- * Forward a packet. If some error occurs return the sender
- * an icmp packet. Note we can't always generate a meaningful
- * icmp message because icmp doesn't have a large enough repertoire
- * of codes and types.
- *
- * If not forwarding, just drop the packet. This could be confusing
- * if ipforwarding was zero but some routing protocol was advancing
- * us as a gateway to somewhere. However, we must let the routing
- * protocol deal with that.
- *
- * The srcrt parameter indicates whether the packet is being forwarded
- * via a source route.
- */
-static void
-ip_forward(m, srcrt)
- struct mbuf *m;
- int srcrt;
-{
- register struct ip *ip = mtod(m, struct ip *);
- register struct sockaddr_in *sin;
- register struct rtentry *rt;
- int error, type = 0, code = 0;
- struct mbuf *mcopy;
- n_long dest;
- struct ifnet *destifp;
-
- dest = 0;
-#ifdef DIAGNOSTIC
- if (ipprintfs)
- printf("forward: src %lx dst %lx ttl %x\n",
- ip->ip_src.s_addr, ip->ip_dst.s_addr, ip->ip_ttl);
-#endif
-
-
- if (m->m_flags & M_BCAST || in_canforward(ip->ip_dst) == 0) {
- ipstat.ips_cantforward++;
- m_freem(m);
- return;
- }
- HTONS(ip->ip_id);
- if (ip->ip_ttl <= IPTTLDEC) {
- icmp_error(m, ICMP_TIMXCEED, ICMP_TIMXCEED_INTRANS, dest, 0);
- return;
- }
- ip->ip_ttl -= IPTTLDEC;
-
- sin = (struct sockaddr_in *)&ipforward_rt.ro_dst;
- if ((rt = ipforward_rt.ro_rt) == 0 ||
- ip->ip_dst.s_addr != sin->sin_addr.s_addr) {
- if (ipforward_rt.ro_rt) {
- RTFREE(ipforward_rt.ro_rt);
- ipforward_rt.ro_rt = 0;
- }
- sin->sin_family = AF_INET;
- sin->sin_len = sizeof(*sin);
- sin->sin_addr = ip->ip_dst;
-
- rtalloc_ign(&ipforward_rt, RTF_PRCLONING);
- if (ipforward_rt.ro_rt == 0) {
- icmp_error(m, ICMP_UNREACH, ICMP_UNREACH_HOST, dest, 0);
- return;
- }
- rt = ipforward_rt.ro_rt;
- }
-
- /*
- * Save at most 64 bytes of the packet in case
- * we need to generate an ICMP message to the src.
- */
- mcopy = m_copy(m, 0, imin((int)ip->ip_len, 64));
-
- /*
- * If forwarding packet using same interface that it came in on,
- * perhaps should send a redirect to sender to shortcut a hop.
- * Only send redirect if source is sending directly to us,
- * and if packet was not source routed (or has any options).
- * Also, don't send redirect if forwarding using a default route
- * or a route modified by a redirect.
- */
-#define satosin(sa) ((struct sockaddr_in *)(sa))
- if (rt->rt_ifp == m->m_pkthdr.rcvif &&
- (rt->rt_flags & (RTF_DYNAMIC|RTF_MODIFIED)) == 0 &&
- satosin(rt_key(rt))->sin_addr.s_addr != 0 &&
- ipsendredirects && !srcrt) {
-#define RTA(rt) ((struct in_ifaddr *)(rt->rt_ifa))
- u_long src = ntohl(ip->ip_src.s_addr);
-
- if (RTA(rt) &&
- (src & RTA(rt)->ia_subnetmask) == RTA(rt)->ia_subnet) {
- if (rt->rt_flags & RTF_GATEWAY)
- dest = satosin(rt->rt_gateway)->sin_addr.s_addr;
- else
- dest = ip->ip_dst.s_addr;
- /* Router requirements says to only send host redirects */
- type = ICMP_REDIRECT;
- code = ICMP_REDIRECT_HOST;
-#ifdef DIAGNOSTIC
- if (ipprintfs)
- printf("redirect (%d) to %lx\n", code, (u_long)dest);
-#endif
- }
- }
-
- error = ip_output(m, (struct mbuf *)0, &ipforward_rt,
- IP_FORWARDING, 0);
- if (error)
- ipstat.ips_cantforward++;
- else {
- ipstat.ips_forward++;
- if (type)
- ipstat.ips_redirectsent++;
- else {
- if (mcopy)
- m_freem(mcopy);
- return;
- }
- }
- if (mcopy == NULL)
- return;
- destifp = NULL;
-
- switch (error) {
-
- case 0: /* forwarded, but need redirect */
- /* type, code set above */
- break;
-
- case ENETUNREACH: /* shouldn't happen, checked above */
- case EHOSTUNREACH:
- case ENETDOWN:
- case EHOSTDOWN:
- default:
- type = ICMP_UNREACH;
- code = ICMP_UNREACH_HOST;
- break;
-
- case EMSGSIZE:
- type = ICMP_UNREACH;
- code = ICMP_UNREACH_NEEDFRAG;
- if (ipforward_rt.ro_rt)
- destifp = ipforward_rt.ro_rt->rt_ifp;
- ipstat.ips_cantfrag++;
- break;
-
- case ENOBUFS:
- type = ICMP_SOURCEQUENCH;
- code = 0;
- break;
- }
- icmp_error(mcopy, type, code, dest, destifp);
-}
-
-void
-ip_savecontrol(inp, mp, ip, m)
- register struct inpcb *inp;
- register struct mbuf **mp;
- register struct ip *ip;
- register struct mbuf *m;
-{
- if (inp->inp_socket->so_options & SO_TIMESTAMP) {
- struct timeval tv;
-
- microtime(&tv);
- *mp = sbcreatecontrol((caddr_t) &tv, sizeof(tv),
- SCM_TIMESTAMP, SOL_SOCKET);
- if (*mp)
- mp = &(*mp)->m_next;
- }
- if (inp->inp_flags & INP_RECVDSTADDR) {
- *mp = sbcreatecontrol((caddr_t) &ip->ip_dst,
- sizeof(struct in_addr), IP_RECVDSTADDR, IPPROTO_IP);
- if (*mp)
- mp = &(*mp)->m_next;
- }
-#ifdef notyet
- /* XXX
- * Moving these out of udp_input() made them even more broken
- * than they already were.
- */
- /* options were tossed already */
- if (inp->inp_flags & INP_RECVOPTS) {
- *mp = sbcreatecontrol((caddr_t) opts_deleted_above,
- sizeof(struct in_addr), IP_RECVOPTS, IPPROTO_IP);
- if (*mp)
- mp = &(*mp)->m_next;
- }
- /* ip_srcroute doesn't do what we want here, need to fix */
- if (inp->inp_flags & INP_RECVRETOPTS) {
- *mp = sbcreatecontrol((caddr_t) ip_srcroute(),
- sizeof(struct in_addr), IP_RECVRETOPTS, IPPROTO_IP);
- if (*mp)
- mp = &(*mp)->m_next;
- }
-#endif
- if (inp->inp_flags & INP_RECVIF) {
- struct sockaddr_dl sdl;
-
- sdl.sdl_len = offsetof(struct sockaddr_dl, sdl_data[0]);
- sdl.sdl_family = AF_LINK;
- sdl.sdl_index = m->m_pkthdr.rcvif ?
- m->m_pkthdr.rcvif->if_index : 0;
- sdl.sdl_nlen = sdl.sdl_alen = sdl.sdl_slen = 0;
- *mp = sbcreatecontrol((caddr_t) &sdl, sdl.sdl_len,
- IP_RECVIF, IPPROTO_IP);
- if (*mp)
- mp = &(*mp)->m_next;
- }
-}
-
-int
-ip_rsvp_init(struct socket *so)
-{
- if (so->so_type != SOCK_RAW ||
- so->so_proto->pr_protocol != IPPROTO_RSVP)
- return EOPNOTSUPP;
-
- if (ip_rsvpd != NULL)
- return EADDRINUSE;
-
- ip_rsvpd = so;
- /*
- * This may seem silly, but we need to be sure we don't over-increment
- * the RSVP counter, in case something slips up.
- */
- if (!ip_rsvp_on) {
- ip_rsvp_on = 1;
- rsvp_on++;
- }
-
- return 0;
-}
-
-int
-ip_rsvp_done(void)
-{
- ip_rsvpd = NULL;
- /*
- * This may seem silly, but we need to be sure we don't over-decrement
- * the RSVP counter, in case something slips up.
- */
- if (ip_rsvp_on) {
- ip_rsvp_on = 0;
- rsvp_on--;
- }
- return 0;
-}
diff --git a/cpukit/libnetworking/netinet/ip_mroute.c b/cpukit/libnetworking/netinet/ip_mroute.c
deleted file mode 100644
index 662d695dfe..0000000000
--- a/cpukit/libnetworking/netinet/ip_mroute.c
+++ /dev/null
@@ -1,2302 +0,0 @@
-/*
- * IP multicast forwarding procedures
- *
- * Written by David Waitzman, BBN Labs, August 1988.
- * Modified by Steve Deering, Stanford, February 1989.
- * Modified by Mark J. Steiglitz, Stanford, May, 1991
- * Modified by Van Jacobson, LBL, January 1993
- * Modified by Ajit Thyagarajan, PARC, August 1993
- * Modified by Bill Fenner, PARC, April 1995
- *
- * MROUTING Revision: 3.5
- * $Id$
- */
-
-#include "opt_mrouting.h"
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/systm.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/protosw.h>
-#include <sys/errno.h>
-#include <sys/time.h>
-#include <sys/kernel.h>
-#include <sys/ioctl.h>
-#include <sys/syslog.h>
-#include <net/if.h>
-#include <net/route.h>
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/ip_var.h>
-#include <netinet/in_pcb.h>
-#include <netinet/in_var.h>
-#include <netinet/igmp.h>
-#include <netinet/igmp_var.h>
-#include <netinet/ip_mroute.h>
-#include <netinet/udp.h>
-
-#ifndef NTOHL
-#if BYTE_ORDER != BIG_ENDIAN
-#define NTOHL(d) ((d) = ntohl((d)))
-#define NTOHS(d) ((d) = ntohs((u_short)(d)))
-#define HTONL(d) ((d) = htonl((d)))
-#define HTONS(d) ((d) = htons((u_short)(d)))
-#else
-#define NTOHL(d)
-#define NTOHS(d)
-#define HTONL(d)
-#define HTONS(d)
-#endif
-#endif
-
-#ifndef MROUTING
-extern u_long _ip_mcast_src __P((int vifi));
-extern int _ip_mforward __P((struct ip *ip, struct ifnet *ifp,
- struct mbuf *m, struct ip_moptions *imo));
-extern int _ip_mrouter_done __P((void));
-extern int _ip_mrouter_get __P((int cmd, struct socket *so,
- struct mbuf **m));
-extern int _ip_mrouter_set __P((int cmd, struct socket *so,
- struct mbuf *m));
-extern int _mrt_ioctl __P((int req, caddr_t data, struct proc *p));
-
-/*
- * Dummy routines and globals used when multicast routing is not compiled in.
- */
-
-struct socket *ip_mrouter = NULL;
-/* static u_int ip_mrtproto = 0; */
-/* static struct mrtstat mrtstat; */
-u_int rsvpdebug = 0;
-
-int
-_ip_mrouter_set(cmd, so, m)
- int cmd;
- struct socket *so;
- struct mbuf *m;
-{
- return(EOPNOTSUPP);
-}
-
-int (*ip_mrouter_set)(int, struct socket *, struct mbuf *) = _ip_mrouter_set;
-
-
-int
-_ip_mrouter_get(cmd, so, m)
- int cmd;
- struct socket *so;
- struct mbuf **m;
-{
- return(EOPNOTSUPP);
-}
-
-int (*ip_mrouter_get)(int, struct socket *, struct mbuf **) = _ip_mrouter_get;
-
-int
-_ip_mrouter_done()
-{
- return(0);
-}
-
-int (*ip_mrouter_done)(void) = _ip_mrouter_done;
-
-int
-_ip_mforward(ip, ifp, m, imo)
- struct ip *ip;
- struct ifnet *ifp;
- struct mbuf *m;
- struct ip_moptions *imo;
-{
- return(0);
-}
-
-int (*ip_mforward)(struct ip *, struct ifnet *, struct mbuf *,
- struct ip_moptions *) = _ip_mforward;
-
-int
-_mrt_ioctl(int req, caddr_t data, struct proc *p)
-{
- return EOPNOTSUPP;
-}
-
-int (*mrt_ioctl)(int, caddr_t, struct proc *) = _mrt_ioctl;
-
-void
-rsvp_input(m, iphlen) /* XXX must fixup manually */
- struct mbuf *m;
- int iphlen;
-{
- /* Can still get packets with rsvp_on = 0 if there is a local member
- * of the group to which the RSVP packet is addressed. But in this
- * case we want to throw the packet away.
- */
- if (!rsvp_on) {
- m_freem(m);
- return;
- }
-
- if (ip_rsvpd != NULL) {
- if (rsvpdebug)
- printf("rsvp_input: Sending packet up old-style socket\n");
- rip_input(m, iphlen);
- return;
- }
- /* Drop the packet */
- m_freem(m);
-}
-
-void ipip_input(struct mbuf *m, int iphlen) { /* XXX must fixup manually */
- rip_input(m, iphlen);
-}
-
-int (*legal_vif_num)(int) = 0;
-
-/*
- * This should never be called, since IP_MULTICAST_VIF should fail, but
- * just in case it does get called, the code a little lower in ip_output
- * will assign the packet a local address.
- */
-u_long
-_ip_mcast_src(int vifi) { return INADDR_ANY; }
-u_long (*ip_mcast_src)(int) = _ip_mcast_src;
-
-int
-ip_rsvp_vif_init(so, m)
- struct socket *so;
- struct mbuf *m;
-{
- return(EINVAL);
-}
-
-int
-ip_rsvp_vif_done(so, m)
- struct socket *so;
- struct mbuf *m;
-{
- return(EINVAL);
-}
-
-void
-ip_rsvp_force_done(so)
- struct socket *so;
-{
- return;
-}
-
-#else /* MROUTING */
-
-#define M_HASCL(m) ((m)->m_flags & M_EXT)
-
-#define INSIZ sizeof(struct in_addr)
-#define same(a1, a2) \
- (bcmp((caddr_t)(a1), (caddr_t)(a2), INSIZ) == 0)
-
-#define MT_MRTABLE MT_RTABLE /* since nothing else uses it */
-
-/*
- * Globals. All but ip_mrouter and ip_mrtproto could be static,
- * except for netstat or debugging purposes.
- */
-#ifndef MROUTE_LKM
-struct socket *ip_mrouter = NULL;
-struct mrtstat mrtstat;
-
-int ip_mrtproto = IGMP_DVMRP; /* for netstat only */
-#else /* MROUTE_LKM */
-extern void X_ipip_input __P((struct mbuf *m, int iphlen));
-extern struct mrtstat mrtstat;
-static int ip_mrtproto;
-#endif
-
-#define NO_RTE_FOUND 0x1
-#define RTE_FOUND 0x2
-
-static struct mbuf *mfctable[MFCTBLSIZ];
-static u_char nexpire[MFCTBLSIZ];
-static struct vif viftable[MAXVIFS];
-static u_int mrtdebug = 0; /* debug level */
-#define DEBUG_MFC 0x02
-#define DEBUG_FORWARD 0x04
-#define DEBUG_EXPIRE 0x08
-#define DEBUG_XMIT 0x10
-static u_int tbfdebug = 0; /* tbf debug level */
-static u_int rsvpdebug = 0; /* rsvp debug level */
-
-#define EXPIRE_TIMEOUT (hz / 4) /* 4x / second */
-#define UPCALL_EXPIRE 6 /* number of timeouts */
-
-/*
- * Define the token bucket filter structures
- * tbftable -> each vif has one of these for storing info
- */
-
-static struct tbf tbftable[MAXVIFS];
-#define TBF_REPROCESS (hz / 100) /* 100x / second */
-
-/*
- * 'Interfaces' associated with decapsulator (so we can tell
- * packets that went through it from ones that get reflected
- * by a broken gateway). These interfaces are never linked into
- * the system ifnet list & no routes point to them. I.e., packets
- * can't be sent this way. They only exist as a placeholder for
- * multicast source verification.
- */
-static struct ifnet multicast_decap_if[MAXVIFS];
-
-#define ENCAP_TTL 64
-#define ENCAP_PROTO IPPROTO_IPIP /* 4 */
-
-/* prototype IP hdr for encapsulated packets */
-static struct ip multicast_encap_iphdr = {
-#if BYTE_ORDER == LITTLE_ENDIAN
- sizeof(struct ip) >> 2, IPVERSION,
-#else
- IPVERSION, sizeof(struct ip) >> 2,
-#endif
- 0, /* tos */
- sizeof(struct ip), /* total length */
- 0, /* id */
- 0, /* frag offset */
- ENCAP_TTL, ENCAP_PROTO,
- 0, /* checksum */
-};
-
-/*
- * Private variables.
- */
-static vifi_t numvifs = 0;
-static int have_encap_tunnel = 0;
-
-/*
- * one-back cache used by ipip_input to locate a tunnel's vif
- * given a datagram's src ip address.
- */
-static u_long last_encap_src;
-static struct vif *last_encap_vif;
-
-static u_long X_ip_mcast_src __P((int vifi));
-static int X_ip_mforward __P((struct ip *ip, struct ifnet *ifp, struct mbuf *m, struct ip_moptions *imo));
-static int X_ip_mrouter_done __P((void));
-static int X_ip_mrouter_get __P((int cmd, struct socket *so, struct mbuf **m));
-static int X_ip_mrouter_set __P((int cmd, struct socket *so, struct mbuf *m));
-static int X_legal_vif_num __P((int vif));
-static int X_mrt_ioctl __P((int cmd, caddr_t data));
-
-static int get_sg_cnt(struct sioc_sg_req *);
-static int get_vif_cnt(struct sioc_vif_req *);
-static int ip_mrouter_init(struct socket *, struct mbuf *);
-static int add_vif(struct vifctl *);
-static int del_vif(vifi_t *);
-static int add_mfc(struct mfcctl *);
-static int del_mfc(struct mfcctl *);
-static int socket_send(struct socket *, struct mbuf *, struct sockaddr_in *);
-static int get_version(struct mbuf *);
-static int get_assert(struct mbuf *);
-static int set_assert(int *);
-static void expire_upcalls(void *);
-static int ip_mdq(struct mbuf *, struct ifnet *, struct mfc *,
- vifi_t);
-static void phyint_send(struct ip *, struct vif *, struct mbuf *);
-static void encap_send(struct ip *, struct vif *, struct mbuf *);
-static void tbf_control(struct vif *, struct mbuf *, struct ip *, u_long);
-static void tbf_queue(struct vif *, struct mbuf *);
-static void tbf_process_q(struct vif *);
-static void tbf_reprocess_q(void *);
-static int tbf_dq_sel(struct vif *, struct ip *);
-static void tbf_send_packet(struct vif *, struct mbuf *);
-static void tbf_update_tokens(struct vif *);
-static int priority(struct vif *, struct ip *);
-void multiencap_decap(struct mbuf *);
-
-/*
- * whether or not special PIM assert processing is enabled.
- */
-static int pim_assert;
-/*
- * Rate limit for assert notification messages, in usec
- */
-#define ASSERT_MSG_TIME 3000000
-
-/*
- * Hash function for a source, group entry
- */
-#define MFCHASH(a, g) MFCHASHMOD(((a) >> 20) ^ ((a) >> 10) ^ (a) ^ \
- ((g) >> 20) ^ ((g) >> 10) ^ (g))
-
-/*
- * Find a route for a given origin IP address and Multicast group address
- * Type of service parameter to be added in the future!!!
- */
-
-#define MFCFIND(o, g, rt) { \
- register struct mbuf *_mb_rt = mfctable[MFCHASH(o,g)]; \
- register struct mfc *_rt = NULL; \
- rt = NULL; \
- ++mrtstat.mrts_mfc_lookups; \
- while (_mb_rt) { \
- _rt = mtod(_mb_rt, struct mfc *); \
- if ((_rt->mfc_origin.s_addr == o) && \
- (_rt->mfc_mcastgrp.s_addr == g) && \
- (_mb_rt->m_act == NULL)) { \
- rt = _rt; \
- break; \
- } \
- _mb_rt = _mb_rt->m_next; \
- } \
- if (rt == NULL) { \
- ++mrtstat.mrts_mfc_misses; \
- } \
-}
-
-
-/*
- * Macros to compute elapsed time efficiently
- * Borrowed from Van Jacobson's scheduling code
- */
-#define TV_DELTA(a, b, delta) { \
- register int xxs; \
- \
- delta = (a).tv_usec - (b).tv_usec; \
- if ((xxs = (a).tv_sec - (b).tv_sec)) { \
- switch (xxs) { \
- case 2: \
- delta += 1000000; \
- /* fall through */ \
- case 1: \
- delta += 1000000; \
- break; \
- default: \
- delta += (1000000 * xxs); \
- } \
- } \
-}
-
-#define TV_LT(a, b) (((a).tv_usec < (b).tv_usec && \
- (a).tv_sec <= (b).tv_sec) || (a).tv_sec < (b).tv_sec)
-
-#ifdef UPCALL_TIMING
-u_long upcall_data[51];
-static void collate(struct timeval *);
-#endif /* UPCALL_TIMING */
-
-
-/*
- * Handle MRT setsockopt commands to modify the multicast routing tables.
- */
-static int
-X_ip_mrouter_set(cmd, so, m)
- int cmd;
- struct socket *so;
- struct mbuf *m;
-{
- if (cmd != MRT_INIT && so != ip_mrouter) return EACCES;
-
- switch (cmd) {
- case MRT_INIT: return ip_mrouter_init(so, m);
- case MRT_DONE: return ip_mrouter_done();
- case MRT_ADD_VIF: return add_vif (mtod(m, struct vifctl *));
- case MRT_DEL_VIF: return del_vif (mtod(m, vifi_t *));
- case MRT_ADD_MFC: return add_mfc (mtod(m, struct mfcctl *));
- case MRT_DEL_MFC: return del_mfc (mtod(m, struct mfcctl *));
- case MRT_ASSERT: return set_assert(mtod(m, int *));
- default: return EOPNOTSUPP;
- }
-}
-
-#ifndef MROUTE_LKM
-int (*ip_mrouter_set)(int, struct socket *, struct mbuf *) = X_ip_mrouter_set;
-#endif
-
-/*
- * Handle MRT getsockopt commands
- */
-static int
-X_ip_mrouter_get(cmd, so, m)
- int cmd;
- struct socket *so;
- struct mbuf **m;
-{
- struct mbuf *mb;
-
- if (so != ip_mrouter) return EACCES;
-
- *m = mb = m_get(M_WAIT, MT_SOOPTS);
-
- switch (cmd) {
- case MRT_VERSION: return get_version(mb);
- case MRT_ASSERT: return get_assert(mb);
- default: return EOPNOTSUPP;
- }
-}
-
-#ifndef MROUTE_LKM
-int (*ip_mrouter_get)(int, struct socket *, struct mbuf **) = X_ip_mrouter_get;
-#endif
-
-/*
- * Handle ioctl commands to obtain information from the cache
- */
-static int
-X_mrt_ioctl(cmd, data)
- int cmd;
- caddr_t data;
-{
- int error = 0;
-
- switch (cmd) {
- case (SIOCGETVIFCNT):
- return (get_vif_cnt((struct sioc_vif_req *)data));
- break;
- case (SIOCGETSGCNT):
- return (get_sg_cnt((struct sioc_sg_req *)data));
- break;
- default:
- return (EINVAL);
- break;
- }
- return error;
-}
-
-#ifndef MROUTE_LKM
-int (*mrt_ioctl)(int, caddr_t) = X_mrt_ioctl;
-#endif
-
-/*
- * returns the packet, byte, rpf-failure count for the source group provided
- */
-static int
-get_sg_cnt(req)
- register struct sioc_sg_req *req;
-{
- register struct mfc *rt;
- int s;
-
- s = splnet();
- MFCFIND(req->src.s_addr, req->grp.s_addr, rt);
- splx(s);
- if (rt != NULL) {
- req->pktcnt = rt->mfc_pkt_cnt;
- req->bytecnt = rt->mfc_byte_cnt;
- req->wrong_if = rt->mfc_wrong_if;
- } else
- req->pktcnt = req->bytecnt = req->wrong_if = 0xffffffff;
-
- return 0;
-}
-
-/*
- * returns the input and output packet and byte counts on the vif provided
- */
-static int
-get_vif_cnt(req)
- register struct sioc_vif_req *req;
-{
- register vifi_t vifi = req->vifi;
-
- if (vifi >= numvifs) return EINVAL;
-
- req->icount = viftable[vifi].v_pkt_in;
- req->ocount = viftable[vifi].v_pkt_out;
- req->ibytes = viftable[vifi].v_bytes_in;
- req->obytes = viftable[vifi].v_bytes_out;
-
- return 0;
-}
-
-/*
- * Enable multicast routing
- */
-static int
-ip_mrouter_init(so, m)
- struct socket *so;
- struct mbuf *m;
-{
- int *v;
-
- if (mrtdebug)
- log(LOG_DEBUG,"ip_mrouter_init: so_type = %d, pr_protocol = %d\n",
- so->so_type, so->so_proto->pr_protocol);
-
- if (so->so_type != SOCK_RAW ||
- so->so_proto->pr_protocol != IPPROTO_IGMP) return EOPNOTSUPP;
-
- if (!m || (m->m_len != sizeof(int *)))
- return ENOPROTOOPT;
-
- v = mtod(m, int *);
- if (*v != 1)
- return ENOPROTOOPT;
-
- if (ip_mrouter != NULL) return EADDRINUSE;
-
- ip_mrouter = so;
-
- bzero((caddr_t)mfctable, sizeof(mfctable));
- bzero((caddr_t)nexpire, sizeof(nexpire));
-
- pim_assert = 0;
-
- timeout(expire_upcalls, (caddr_t)NULL, EXPIRE_TIMEOUT);
-
- if (mrtdebug)
- log(LOG_DEBUG, "ip_mrouter_init\n");
-
- return 0;
-}
-
-/*
- * Disable multicast routing
- */
-static int
-X_ip_mrouter_done()
-{
- vifi_t vifi;
- int i;
- struct ifnet *ifp;
- struct ifreq ifr;
- struct mbuf *mb_rt;
- struct mbuf *m;
- struct rtdetq *rte;
- int s;
-
- s = splnet();
-
- /*
- * For each phyint in use, disable promiscuous reception of all IP
- * multicasts.
- */
- for (vifi = 0; vifi < numvifs; vifi++) {
- if (viftable[vifi].v_lcl_addr.s_addr != 0 &&
- !(viftable[vifi].v_flags & VIFF_TUNNEL)) {
- ((struct sockaddr_in *)&(ifr.ifr_addr))->sin_family = AF_INET;
- ((struct sockaddr_in *)&(ifr.ifr_addr))->sin_addr.s_addr
- = INADDR_ANY;
- ifp = viftable[vifi].v_ifp;
- (*ifp->if_ioctl)(ifp, SIOCDELMULTI, (caddr_t)&ifr);
- }
- }
- bzero((caddr_t)tbftable, sizeof(tbftable));
- bzero((caddr_t)viftable, sizeof(viftable));
- numvifs = 0;
- pim_assert = 0;
-
- untimeout(expire_upcalls, (caddr_t)NULL);
-
- /*
- * Free all multicast forwarding cache entries.
- */
- for (i = 0; i < MFCTBLSIZ; i++) {
- mb_rt = mfctable[i];
- while (mb_rt) {
- if (mb_rt->m_act != NULL) {
- while (mb_rt->m_act) {
- m = mb_rt->m_act;
- mb_rt->m_act = m->m_act;
- rte = mtod(m, struct rtdetq *);
- m_freem(rte->m);
- m_free(m);
- }
- }
- mb_rt = m_free(mb_rt);
- }
- }
-
- bzero((caddr_t)mfctable, sizeof(mfctable));
-
- /*
- * Reset de-encapsulation cache
- */
- last_encap_src = 0;
- last_encap_vif = NULL;
- have_encap_tunnel = 0;
-
- ip_mrouter = NULL;
-
- splx(s);
-
- if (mrtdebug)
- log(LOG_DEBUG, "ip_mrouter_done\n");
-
- return 0;
-}
-
-#ifndef MROUTE_LKM
-int (*ip_mrouter_done)(void) = X_ip_mrouter_done;
-#endif
-
-static int
-get_version(mb)
- struct mbuf *mb;
-{
- int *v;
-
- v = mtod(mb, int *);
-
- *v = 0x0305; /* XXX !!!! */
- mb->m_len = sizeof(int);
-
- return 0;
-}
-
-/*
- * Set PIM assert processing global
- */
-static int
-set_assert(i)
- int *i;
-{
- if ((*i != 1) && (*i != 0))
- return EINVAL;
-
- pim_assert = *i;
-
- return 0;
-}
-
-/*
- * Get PIM assert processing global
- */
-static int
-get_assert(m)
- struct mbuf *m;
-{
- int *i;
-
- i = mtod(m, int *);
-
- *i = pim_assert;
-
- return 0;
-}
-
-/*
- * Add a vif to the vif table
- */
-static int
-add_vif(vifcp)
- register struct vifctl *vifcp;
-{
- register struct vif *vifp = viftable + vifcp->vifc_vifi;
- static struct sockaddr_in sin = {sizeof sin, AF_INET};
- struct ifaddr *ifa;
- struct ifnet *ifp;
- struct ifreq ifr;
- int error, s;
- struct tbf *v_tbf = tbftable + vifcp->vifc_vifi;
-
- if (vifcp->vifc_vifi >= MAXVIFS) return EINVAL;
- if (vifp->v_lcl_addr.s_addr != 0) return EADDRINUSE;
-
- /* Find the interface with an address in AF_INET family */
- sin.sin_addr = vifcp->vifc_lcl_addr;
- ifa = ifa_ifwithaddr((struct sockaddr *)&sin);
- if (ifa == 0) return EADDRNOTAVAIL;
- ifp = ifa->ifa_ifp;
-
- if (vifcp->vifc_flags & VIFF_TUNNEL) {
- if ((vifcp->vifc_flags & VIFF_SRCRT) == 0) {
- /*
- * An encapsulating tunnel is wanted. Tell ipip_input() to
- * start paying attention to encapsulated packets.
- */
- if (have_encap_tunnel == 0) {
- have_encap_tunnel = 1;
- for (s = 0; s < MAXVIFS; ++s) {
- multicast_decap_if[s].if_name = "mdecap";
- multicast_decap_if[s].if_unit = s;
- }
- }
- /*
- * Set interface to fake encapsulator interface
- */
- ifp = &multicast_decap_if[vifcp->vifc_vifi];
- /*
- * Prepare cached route entry
- */
- bzero(&vifp->v_route, sizeof(vifp->v_route));
- } else {
- log(LOG_ERR, "source routed tunnels not supported\n");
- return EOPNOTSUPP;
- }
- } else {
- /* Make sure the interface supports multicast */
- if ((ifp->if_flags & IFF_MULTICAST) == 0)
- return EOPNOTSUPP;
-
- /* Enable promiscuous reception of all IP multicasts from the if */
- ((struct sockaddr_in *)&(ifr.ifr_addr))->sin_family = AF_INET;
- ((struct sockaddr_in *)&(ifr.ifr_addr))->sin_addr.s_addr = INADDR_ANY;
- s = splnet();
- error = (*ifp->if_ioctl)(ifp, SIOCADDMULTI, (caddr_t)&ifr);
- splx(s);
- if (error)
- return error;
- }
-
- s = splnet();
- /* define parameters for the tbf structure */
- vifp->v_tbf = v_tbf;
- GET_TIME(vifp->v_tbf->tbf_last_pkt_t);
- vifp->v_tbf->tbf_n_tok = 0;
- vifp->v_tbf->tbf_q_len = 0;
- vifp->v_tbf->tbf_max_q_len = MAXQSIZE;
- vifp->v_tbf->tbf_q = vifp->v_tbf->tbf_t = NULL;
-
- vifp->v_flags = vifcp->vifc_flags;
- vifp->v_threshold = vifcp->vifc_threshold;
- vifp->v_lcl_addr = vifcp->vifc_lcl_addr;
- vifp->v_rmt_addr = vifcp->vifc_rmt_addr;
- vifp->v_ifp = ifp;
- /* scaling up here allows division by 1024 in critical code */
- vifp->v_rate_limit= vifcp->vifc_rate_limit * 1024 / 1000;
- vifp->v_rsvp_on = 0;
- vifp->v_rsvpd = NULL;
- /* initialize per vif pkt counters */
- vifp->v_pkt_in = 0;
- vifp->v_pkt_out = 0;
- vifp->v_bytes_in = 0;
- vifp->v_bytes_out = 0;
- splx(s);
-
- /* Adjust numvifs up if the vifi is higher than numvifs */
- if (numvifs <= vifcp->vifc_vifi) numvifs = vifcp->vifc_vifi + 1;
-
- if (mrtdebug)
- log(LOG_DEBUG, "add_vif #%d, lcladdr %x, %s %x, thresh %x, rate %d\n",
- vifcp->vifc_vifi,
- ntohl(vifcp->vifc_lcl_addr.s_addr),
- (vifcp->vifc_flags & VIFF_TUNNEL) ? "rmtaddr" : "mask",
- ntohl(vifcp->vifc_rmt_addr.s_addr),
- vifcp->vifc_threshold,
- vifcp->vifc_rate_limit);
-
- return 0;
-}
-
-/*
- * Delete a vif from the vif table
- */
-static int
-del_vif(vifip)
- vifi_t *vifip;
-{
- register struct vif *vifp = viftable + *vifip;
- register vifi_t vifi;
- register struct mbuf *m;
- struct ifnet *ifp;
- struct ifreq ifr;
- int s;
-
- if (*vifip >= numvifs) return EINVAL;
- if (vifp->v_lcl_addr.s_addr == 0) return EADDRNOTAVAIL;
-
- s = splnet();
-
- if (!(vifp->v_flags & VIFF_TUNNEL)) {
- ((struct sockaddr_in *)&(ifr.ifr_addr))->sin_family = AF_INET;
- ((struct sockaddr_in *)&(ifr.ifr_addr))->sin_addr.s_addr = INADDR_ANY;
- ifp = vifp->v_ifp;
- (*ifp->if_ioctl)(ifp, SIOCDELMULTI, (caddr_t)&ifr);
- }
-
- if (vifp == last_encap_vif) {
- last_encap_vif = 0;
- last_encap_src = 0;
- }
-
- /*
- * Free packets queued at the interface
- */
- while (vifp->v_tbf->tbf_q) {
- m = vifp->v_tbf->tbf_q;
- vifp->v_tbf->tbf_q = m->m_act;
- m_freem(m);
- }
-
- bzero((caddr_t)vifp->v_tbf, sizeof(*(vifp->v_tbf)));
- bzero((caddr_t)vifp, sizeof (*vifp));
-
- /* Adjust numvifs down */
- for (vifi = numvifs; vifi > 0; vifi--)
- if (viftable[vifi-1].v_lcl_addr.s_addr != 0) break;
- numvifs = vifi;
-
- splx(s);
-
- if (mrtdebug)
- log(LOG_DEBUG, "del_vif %d, numvifs %d\n", *vifip, numvifs);
-
- return 0;
-}
-
-/*
- * Add an mfc entry
- */
-static int
-add_mfc(mfccp)
- struct mfcctl *mfccp;
-{
- struct mfc *rt;
- register struct mbuf *mb_rt;
- u_long hash;
- struct mbuf *mb_ntry;
- struct rtdetq *rte;
- register u_short nstl;
- int s;
- int i;
-
- MFCFIND(mfccp->mfcc_origin.s_addr, mfccp->mfcc_mcastgrp.s_addr, rt);
-
- /* If an entry already exists, just update the fields */
- if (rt) {
- if (mrtdebug & DEBUG_MFC)
- log(LOG_DEBUG,"add_mfc update o %x g %x p %x\n",
- ntohl(mfccp->mfcc_origin.s_addr),
- ntohl(mfccp->mfcc_mcastgrp.s_addr),
- mfccp->mfcc_parent);
-
- s = splnet();
- rt->mfc_parent = mfccp->mfcc_parent;
- for (i = 0; i < numvifs; i++)
- rt->mfc_ttls[i] = mfccp->mfcc_ttls[i];
- splx(s);
- return 0;
- }
-
- /*
- * Find the entry for which the upcall was made and update
- */
- s = splnet();
- hash = MFCHASH(mfccp->mfcc_origin.s_addr, mfccp->mfcc_mcastgrp.s_addr);
- for (mb_rt = mfctable[hash], nstl = 0; mb_rt; mb_rt = mb_rt->m_next) {
-
- rt = mtod(mb_rt, struct mfc *);
- if ((rt->mfc_origin.s_addr == mfccp->mfcc_origin.s_addr) &&
- (rt->mfc_mcastgrp.s_addr == mfccp->mfcc_mcastgrp.s_addr) &&
- (mb_rt->m_act != NULL)) {
-
- if (nstl++)
- log(LOG_ERR, "add_mfc %s o %x g %x p %x dbx %x\n",
- "multiple kernel entries",
- ntohl(mfccp->mfcc_origin.s_addr),
- ntohl(mfccp->mfcc_mcastgrp.s_addr),
- mfccp->mfcc_parent, mb_rt->m_act);
-
- if (mrtdebug & DEBUG_MFC)
- log(LOG_DEBUG,"add_mfc o %x g %x p %x dbg %x\n",
- ntohl(mfccp->mfcc_origin.s_addr),
- ntohl(mfccp->mfcc_mcastgrp.s_addr),
- mfccp->mfcc_parent, mb_rt->m_act);
-
- rt->mfc_origin = mfccp->mfcc_origin;
- rt->mfc_mcastgrp = mfccp->mfcc_mcastgrp;
- rt->mfc_parent = mfccp->mfcc_parent;
- for (i = 0; i < numvifs; i++)
- rt->mfc_ttls[i] = mfccp->mfcc_ttls[i];
- /* initialize pkt counters per src-grp */
- rt->mfc_pkt_cnt = 0;
- rt->mfc_byte_cnt = 0;
- rt->mfc_wrong_if = 0;
- rt->mfc_last_assert.tv_sec = rt->mfc_last_assert.tv_usec = 0;
-
- rt->mfc_expire = 0; /* Don't clean this guy up */
- nexpire[hash]--;
-
- /* free packets Qed at the end of this entry */
- while (mb_rt->m_act) {
- mb_ntry = mb_rt->m_act;
- rte = mtod(mb_ntry, struct rtdetq *);
-/* #ifdef RSVP_ISI */
- ip_mdq(rte->m, rte->ifp, rt, -1);
-/* #endif */
- mb_rt->m_act = mb_ntry->m_act;
- m_freem(rte->m);
-#ifdef UPCALL_TIMING
- collate(&(rte->t));
-#endif /* UPCALL_TIMING */
- m_free(mb_ntry);
- }
- }
- }
-
- /*
- * It is possible that an entry is being inserted without an upcall
- */
- if (nstl == 0) {
- if (mrtdebug & DEBUG_MFC)
- log(LOG_DEBUG,"add_mfc no upcall h %d o %x g %x p %x\n",
- hash, ntohl(mfccp->mfcc_origin.s_addr),
- ntohl(mfccp->mfcc_mcastgrp.s_addr),
- mfccp->mfcc_parent);
-
- for (mb_rt = mfctable[hash]; mb_rt; mb_rt = mb_rt->m_next) {
-
- rt = mtod(mb_rt, struct mfc *);
- if ((rt->mfc_origin.s_addr == mfccp->mfcc_origin.s_addr) &&
- (rt->mfc_mcastgrp.s_addr == mfccp->mfcc_mcastgrp.s_addr)) {
-
- rt->mfc_origin = mfccp->mfcc_origin;
- rt->mfc_mcastgrp = mfccp->mfcc_mcastgrp;
- rt->mfc_parent = mfccp->mfcc_parent;
- for (i = 0; i < numvifs; i++)
- rt->mfc_ttls[i] = mfccp->mfcc_ttls[i];
- /* initialize pkt counters per src-grp */
- rt->mfc_pkt_cnt = 0;
- rt->mfc_byte_cnt = 0;
- rt->mfc_wrong_if = 0;
- rt->mfc_last_assert.tv_sec = rt->mfc_last_assert.tv_usec = 0;
- if (rt->mfc_expire)
- nexpire[hash]--;
- rt->mfc_expire = 0;
- }
- }
- if (mb_rt == NULL) {
- /* no upcall, so make a new entry */
- MGET(mb_rt, M_DONTWAIT, MT_MRTABLE);
- if (mb_rt == NULL) {
- splx(s);
- return ENOBUFS;
- }
-
- rt = mtod(mb_rt, struct mfc *);
-
- /* insert new entry at head of hash chain */
- rt->mfc_origin = mfccp->mfcc_origin;
- rt->mfc_mcastgrp = mfccp->mfcc_mcastgrp;
- rt->mfc_parent = mfccp->mfcc_parent;
- for (i = 0; i < numvifs; i++)
- rt->mfc_ttls[i] = mfccp->mfcc_ttls[i];
- /* initialize pkt counters per src-grp */
- rt->mfc_pkt_cnt = 0;
- rt->mfc_byte_cnt = 0;
- rt->mfc_wrong_if = 0;
- rt->mfc_last_assert.tv_sec = rt->mfc_last_assert.tv_usec = 0;
- rt->mfc_expire = 0;
-
- /* link into table */
- mb_rt->m_next = mfctable[hash];
- mfctable[hash] = mb_rt;
- mb_rt->m_act = NULL;
- }
- }
- splx(s);
- return 0;
-}
-
-#ifdef UPCALL_TIMING
-/*
- * collect delay statistics on the upcalls
- */
-static void collate(t)
-register struct timeval *t;
-{
- register u_long d;
- register struct timeval tp;
- register u_long delta;
-
- GET_TIME(tp);
-
- if (TV_LT(*t, tp))
- {
- TV_DELTA(tp, *t, delta);
-
- d = delta >> 10;
- if (d > 50)
- d = 50;
-
- ++upcall_data[d];
- }
-}
-#endif /* UPCALL_TIMING */
-
-/*
- * Delete an mfc entry
- */
-static int
-del_mfc(mfccp)
- struct mfcctl *mfccp;
-{
- struct in_addr origin;
- struct in_addr mcastgrp;
- struct mfc *rt;
- struct mbuf *mb_rt;
- struct mbuf **nptr;
- u_long hash;
- int s;
-
- origin = mfccp->mfcc_origin;
- mcastgrp = mfccp->mfcc_mcastgrp;
- hash = MFCHASH(origin.s_addr, mcastgrp.s_addr);
-
- if (mrtdebug & DEBUG_MFC)
- log(LOG_DEBUG,"del_mfc orig %x mcastgrp %x\n",
- ntohl(origin.s_addr), ntohl(mcastgrp.s_addr));
-
- s = splnet();
-
- nptr = &mfctable[hash];
- while ((mb_rt = *nptr) != NULL) {
- rt = mtod(mb_rt, struct mfc *);
- if (origin.s_addr == rt->mfc_origin.s_addr &&
- mcastgrp.s_addr == rt->mfc_mcastgrp.s_addr &&
- mb_rt->m_act == NULL)
- break;
-
- nptr = &mb_rt->m_next;
- }
- if (mb_rt == NULL) {
- splx(s);
- return EADDRNOTAVAIL;
- }
-
- MFREE(mb_rt, *nptr);
-
- splx(s);
-
- return 0;
-}
-
-/*
- * Send a message to mrouted on the multicast routing socket
- */
-static int
-socket_send(s, mm, src)
- struct socket *s;
- struct mbuf *mm;
- struct sockaddr_in *src;
-{
- if (s) {
- if (sbappendaddr(&s->so_rcv,
- (struct sockaddr *)src,
- mm, (struct mbuf *)0) != 0) {
- sorwakeup(s);
- return 0;
- }
- }
- m_freem(mm);
- return -1;
-}
-
-/*
- * IP multicast forwarding function. This function assumes that the packet
- * pointed to by "ip" has arrived on (or is about to be sent to) the interface
- * pointed to by "ifp", and the packet is to be relayed to other networks
- * that have members of the packet's destination IP multicast group.
- *
- * The packet is returned unscathed to the caller, unless it is
- * erroneous, in which case a non-zero return value tells the caller to
- * discard it.
- */
-
-#define IP_HDR_LEN 20 /* # bytes of fixed IP header (excluding options) */
-#define TUNNEL_LEN 12 /* # bytes of IP option for tunnel encapsulation */
-
-static int
-X_ip_mforward(ip, ifp, m, imo)
- register struct ip *ip;
- struct ifnet *ifp;
- struct mbuf *m;
- struct ip_moptions *imo;
-{
- register struct mfc *rt;
- register u_char *ipoptions;
- static struct sockaddr_in k_igmpsrc = { sizeof k_igmpsrc, AF_INET };
- static int srctun = 0;
- register struct mbuf *mm;
- int s;
- vifi_t vifi;
- struct vif *vifp;
-
- if (mrtdebug & DEBUG_FORWARD)
- log(LOG_DEBUG, "ip_mforward: src %x, dst %x, ifp %x\n",
- ntohl(ip->ip_src.s_addr), ntohl(ip->ip_dst.s_addr), ifp);
-
- if (ip->ip_hl < (IP_HDR_LEN + TUNNEL_LEN) >> 2 ||
- (ipoptions = (u_char *)(ip + 1))[1] != IPOPT_LSRR ) {
- /*
- * Packet arrived via a physical interface or
- * an encapsulated tunnel.
- */
- } else {
- /*
- * Packet arrived through a source-route tunnel.
- * Source-route tunnels are no longer supported.
- */
- if ((srctun++ % 1000) == 0)
- log(LOG_ERR, "ip_mforward: received source-routed packet from %x\n",
- ntohl(ip->ip_src.s_addr));
-
- return 1;
- }
-
- if ((imo) && ((vifi = imo->imo_multicast_vif) < numvifs)) {
- if (ip->ip_ttl < 255)
- ip->ip_ttl++; /* compensate for -1 in *_send routines */
- if (rsvpdebug && ip->ip_p == IPPROTO_RSVP) {
- vifp = viftable + vifi;
- printf("Sending IPPROTO_RSVP from %lx to %lx on vif %d (%s%s%d)\n",
- ntohl(ip->ip_src.s_addr), ntohl(ip->ip_dst.s_addr), vifi,
- (vifp->v_flags & VIFF_TUNNEL) ? "tunnel on " : "",
- vifp->v_ifp->if_name, vifp->v_ifp->if_unit);
- }
- return (ip_mdq(m, ifp, NULL, vifi));
- }
- if (rsvpdebug && ip->ip_p == IPPROTO_RSVP) {
- printf("Warning: IPPROTO_RSVP from %lx to %lx without vif option\n",
- ntohl(ip->ip_src.s_addr), ntohl(ip->ip_dst.s_addr));
- if(!imo)
- printf("In fact, no options were specified at all\n");
- }
-
- /*
- * Don't forward a packet with time-to-live of zero or one,
- * or a packet destined to a local-only group.
- */
- if (ip->ip_ttl <= 1 ||
- ntohl(ip->ip_dst.s_addr) <= INADDR_MAX_LOCAL_GROUP)
- return 0;
-
- /*
- * Determine forwarding vifs from the forwarding cache table
- */
- s = splnet();
- MFCFIND(ip->ip_src.s_addr, ip->ip_dst.s_addr, rt);
-
- /* Entry exists, so forward if necessary */
- if (rt != NULL) {
- splx(s);
- return (ip_mdq(m, ifp, rt, -1));
- } else {
- /*
- * If we don't have a route for packet's origin,
- * Make a copy of the packet &
- * send message to routing daemon
- */
-
- register struct mbuf *mb_rt;
- register struct mbuf *mb_ntry;
- register struct mbuf *mb0;
- register struct rtdetq *rte;
- register struct mbuf *rte_m;
- register u_long hash;
- register int npkts;
- int hlen = ip->ip_hl << 2;
-#ifdef UPCALL_TIMING
- struct timeval tp;
-
- GET_TIME(tp);
-#endif
-
- mrtstat.mrts_no_route++;
- if (mrtdebug & (DEBUG_FORWARD | DEBUG_MFC))
- log(LOG_DEBUG, "ip_mforward: no rte s %x g %x\n",
- ntohl(ip->ip_src.s_addr),
- ntohl(ip->ip_dst.s_addr));
-
- /*
- * Allocate mbufs early so that we don't do extra work if we are
- * just going to fail anyway. Make sure to pullup the header so
- * that other people can't step on it.
- */
- MGET(mb_ntry, M_DONTWAIT, MT_DATA);
- if (mb_ntry == NULL) {
- splx(s);
- return ENOBUFS;
- }
- mb0 = m_copy(m, 0, M_COPYALL);
- if (mb0 && (M_HASCL(mb0) || mb0->m_len < hlen))
- mb0 = m_pullup(mb0, hlen);
- if (mb0 == NULL) {
- m_free(mb_ntry);
- splx(s);
- return ENOBUFS;
- }
-
- /* is there an upcall waiting for this packet? */
- hash = MFCHASH(ip->ip_src.s_addr, ip->ip_dst.s_addr);
- for (mb_rt = mfctable[hash]; mb_rt; mb_rt = mb_rt->m_next) {
- rt = mtod(mb_rt, struct mfc *);
- if ((ip->ip_src.s_addr == rt->mfc_origin.s_addr) &&
- (ip->ip_dst.s_addr == rt->mfc_mcastgrp.s_addr) &&
- (mb_rt->m_act != NULL))
- break;
- }
-
- if (mb_rt == NULL) {
- int i;
- struct igmpmsg *im;
-
- /* no upcall, so make a new entry */
- MGET(mb_rt, M_DONTWAIT, MT_MRTABLE);
- if (mb_rt == NULL) {
- m_free(mb_ntry);
- m_freem(mb0);
- splx(s);
- return ENOBUFS;
- }
- /* Make a copy of the header to send to the user level process */
- mm = m_copy(mb0, 0, hlen);
- if (mm == NULL) {
- m_free(mb_ntry);
- m_freem(mb0);
- m_free(mb_rt);
- splx(s);
- return ENOBUFS;
- }
-
- /*
- * Send message to routing daemon to install
- * a route into the kernel table
- */
- k_igmpsrc.sin_addr = ip->ip_src;
-
- im = mtod(mm, struct igmpmsg *);
- im->im_msgtype = IGMPMSG_NOCACHE;
- im->im_mbz = 0;
-
- mrtstat.mrts_upcalls++;
-
- if (socket_send(ip_mrouter, mm, &k_igmpsrc) < 0) {
- log(LOG_WARNING, "ip_mforward: ip_mrouter socket queue full\n");
- ++mrtstat.mrts_upq_sockfull;
- m_free(mb_ntry);
- m_freem(mb0);
- m_free(mb_rt);
- splx(s);
- return ENOBUFS;
- }
-
- rt = mtod(mb_rt, struct mfc *);
-
- /* insert new entry at head of hash chain */
- rt->mfc_origin.s_addr = ip->ip_src.s_addr;
- rt->mfc_mcastgrp.s_addr = ip->ip_dst.s_addr;
- rt->mfc_expire = UPCALL_EXPIRE;
- nexpire[hash]++;
- for (i = 0; i < numvifs; i++)
- rt->mfc_ttls[i] = 0;
- rt->mfc_parent = -1;
-
- /* link into table */
- mb_rt->m_next = mfctable[hash];
- mfctable[hash] = mb_rt;
- mb_rt->m_act = NULL;
-
- rte_m = mb_rt;
- } else {
- /* determine if q has overflowed */
- for (rte_m = mb_rt, npkts = 0; rte_m->m_act; rte_m = rte_m->m_act)
- npkts++;
-
- if (npkts > MAX_UPQ) {
- mrtstat.mrts_upq_ovflw++;
- m_free(mb_ntry);
- m_freem(mb0);
- splx(s);
- return 0;
- }
- }
-
- mb_ntry->m_act = NULL;
- rte = mtod(mb_ntry, struct rtdetq *);
-
- rte->m = mb0;
- rte->ifp = ifp;
-#ifdef UPCALL_TIMING
- rte->t = tp;
-#endif
-
- /* Add this entry to the end of the queue */
- rte_m->m_act = mb_ntry;
-
- splx(s);
-
- return 0;
- }
-}
-
-#ifndef MROUTE_LKM
-int (*ip_mforward)(struct ip *, struct ifnet *, struct mbuf *,
- struct ip_moptions *) = X_ip_mforward;
-#endif
-
-/*
- * Clean up the cache entry if upcall is not serviced
- */
-static void
-expire_upcalls(void *unused)
-{
- struct mbuf *mb_rt, *m, **nptr;
- struct rtdetq *rte;
- struct mfc *mfc;
- int i;
- int s;
-
- s = splnet();
- for (i = 0; i < MFCTBLSIZ; i++) {
- if (nexpire[i] == 0)
- continue;
- nptr = &mfctable[i];
- for (mb_rt = *nptr; mb_rt != NULL; mb_rt = *nptr) {
- mfc = mtod(mb_rt, struct mfc *);
-
- /*
- * Skip real cache entries
- * Make sure it wasn't marked to not expire (shouldn't happen)
- * If it expires now
- */
- if (mb_rt->m_act != NULL &&
- mfc->mfc_expire != 0 &&
- --mfc->mfc_expire == 0) {
- if (mrtdebug & DEBUG_EXPIRE)
- log(LOG_DEBUG, "expire_upcalls: expiring (%x %x)\n",
- ntohl(mfc->mfc_origin.s_addr),
- ntohl(mfc->mfc_mcastgrp.s_addr));
- /*
- * drop all the packets
- * free the mbuf with the pkt, if, timing info
- */
- while (mb_rt->m_act) {
- m = mb_rt->m_act;
- mb_rt->m_act = m->m_act;
-
- rte = mtod(m, struct rtdetq *);
- m_freem(rte->m);
- m_free(m);
- }
- ++mrtstat.mrts_cache_cleanups;
- nexpire[i]--;
-
- MFREE(mb_rt, *nptr);
- } else {
- nptr = &mb_rt->m_next;
- }
- }
- }
- splx(s);
- timeout(expire_upcalls, (caddr_t)NULL, EXPIRE_TIMEOUT);
-}
-
-/*
- * Packet forwarding routine once entry in the cache is made
- */
-static int
-ip_mdq(m, ifp, rt, xmt_vif)
- register struct mbuf *m;
- register struct ifnet *ifp;
- register struct mfc *rt;
- register vifi_t xmt_vif;
-{
- register struct ip *ip = mtod(m, struct ip *);
- register vifi_t vifi;
- register struct vif *vifp;
- register int plen = ntohs(ip->ip_len);
-
-/*
- * Macro to send packet on vif. Since RSVP packets don't get counted on
- * input, they shouldn't get counted on output, so statistics keeping is
- * seperate.
- */
-#define MC_SEND(ip,vifp,m) { \
- if ((vifp)->v_flags & VIFF_TUNNEL) \
- encap_send((ip), (vifp), (m)); \
- else \
- phyint_send((ip), (vifp), (m)); \
-}
-
- /*
- * If xmt_vif is not -1, send on only the requested vif.
- *
- * (since vifi_t is u_short, -1 becomes MAXUSHORT, which > numvifs.)
- */
- if (xmt_vif < numvifs) {
- MC_SEND(ip, viftable + xmt_vif, m);
- return 1;
- }
-
- /*
- * Don't forward if it didn't arrive from the parent vif for its origin.
- */
- vifi = rt->mfc_parent;
- if ((vifi >= numvifs) || (viftable[vifi].v_ifp != ifp)) {
- /* came in the wrong interface */
- if (mrtdebug & DEBUG_FORWARD)
- log(LOG_DEBUG, "wrong if: ifp %x vifi %d vififp %x\n",
- ifp, vifi, viftable[vifi].v_ifp);
- ++mrtstat.mrts_wrong_if;
- ++rt->mfc_wrong_if;
- /*
- * If we are doing PIM assert processing, and we are forwarding
- * packets on this interface, and it is a broadcast medium
- * interface (and not a tunnel), send a message to the routing daemon.
- */
- if (pim_assert && rt->mfc_ttls[vifi] &&
- (ifp->if_flags & IFF_BROADCAST) &&
- !(viftable[vifi].v_flags & VIFF_TUNNEL)) {
- struct sockaddr_in k_igmpsrc;
- struct mbuf *mm;
- struct igmpmsg *im;
- int hlen = ip->ip_hl << 2;
- struct timeval now;
- register u_long delta;
-
- GET_TIME(now);
-
- TV_DELTA(rt->mfc_last_assert, now, delta);
-
- if (delta > ASSERT_MSG_TIME) {
- mm = m_copy(m, 0, hlen);
- if (mm && (M_HASCL(mm) || mm->m_len < hlen))
- mm = m_pullup(mm, hlen);
- if (mm == NULL) {
- return ENOBUFS;
- }
-
- rt->mfc_last_assert = now;
-
- im = mtod(mm, struct igmpmsg *);
- im->im_msgtype = IGMPMSG_WRONGVIF;
- im->im_mbz = 0;
- im->im_vif = vifi;
-
- k_igmpsrc.sin_addr = im->im_src;
-
- socket_send(ip_mrouter, mm, &k_igmpsrc);
- }
- }
- return 0;
- }
-
- /* If I sourced this packet, it counts as output, else it was input. */
- if (ip->ip_src.s_addr == viftable[vifi].v_lcl_addr.s_addr) {
- viftable[vifi].v_pkt_out++;
- viftable[vifi].v_bytes_out += plen;
- } else {
- viftable[vifi].v_pkt_in++;
- viftable[vifi].v_bytes_in += plen;
- }
- rt->mfc_pkt_cnt++;
- rt->mfc_byte_cnt += plen;
-
- /*
- * For each vif, decide if a copy of the packet should be forwarded.
- * Forward if:
- * - the ttl exceeds the vif's threshold
- * - there are group members downstream on interface
- */
- for (vifp = viftable, vifi = 0; vifi < numvifs; vifp++, vifi++)
- if ((rt->mfc_ttls[vifi] > 0) &&
- (ip->ip_ttl > rt->mfc_ttls[vifi])) {
- vifp->v_pkt_out++;
- vifp->v_bytes_out += plen;
- MC_SEND(ip, vifp, m);
- }
-
- return 0;
-}
-
-/*
- * check if a vif number is legal/ok. This is used by ip_output, to export
- * numvifs there,
- */
-static int
-X_legal_vif_num(vif)
- int vif;
-{
- if (vif >= 0 && vif < numvifs)
- return(1);
- else
- return(0);
-}
-
-#ifndef MROUTE_LKM
-int (*legal_vif_num)(int) = X_legal_vif_num;
-#endif
-
-/*
- * Return the local address used by this vif
- */
-static u_long
-X_ip_mcast_src(vifi)
- int vifi;
-{
- if (vifi >= 0 && vifi < numvifs)
- return viftable[vifi].v_lcl_addr.s_addr;
- else
- return INADDR_ANY;
-}
-
-#ifndef MROUTE_LKM
-u_long (*ip_mcast_src)(int) = X_ip_mcast_src;
-#endif
-
-static void
-phyint_send(ip, vifp, m)
- struct ip *ip;
- struct vif *vifp;
- struct mbuf *m;
-{
- register struct mbuf *mb_copy;
- register int hlen = ip->ip_hl << 2;
-
- /*
- * Make a new reference to the packet; make sure that
- * the IP header is actually copied, not just referenced,
- * so that ip_output() only scribbles on the copy.
- */
- mb_copy = m_copy(m, 0, M_COPYALL);
- if (mb_copy && (M_HASCL(mb_copy) || mb_copy->m_len < hlen))
- mb_copy = m_pullup(mb_copy, hlen);
- if (mb_copy == NULL)
- return;
-
- if (vifp->v_rate_limit <= 0)
- tbf_send_packet(vifp, mb_copy);
- else
- tbf_control(vifp, mb_copy, mtod(mb_copy, struct ip *), ip->ip_len);
-}
-
-static void
-encap_send(ip, vifp, m)
- register struct ip *ip;
- register struct vif *vifp;
- register struct mbuf *m;
-{
- register struct mbuf *mb_copy;
- register struct ip *ip_copy;
- register int i, len = ip->ip_len;
-
- /*
- * copy the old packet & pullup it's IP header into the
- * new mbuf so we can modify it. Try to fill the new
- * mbuf since if we don't the ethernet driver will.
- */
- MGETHDR(mb_copy, M_DONTWAIT, MT_HEADER);
- if (mb_copy == NULL)
- return;
- mb_copy->m_data += max_linkhdr;
- mb_copy->m_len = sizeof(multicast_encap_iphdr);
-
- if ((mb_copy->m_next = m_copy(m, 0, M_COPYALL)) == NULL) {
- m_freem(mb_copy);
- return;
- }
- i = MHLEN - M_LEADINGSPACE(mb_copy);
- if (i > len)
- i = len;
- mb_copy = m_pullup(mb_copy, i);
- if (mb_copy == NULL)
- return;
- mb_copy->m_pkthdr.len = len + sizeof(multicast_encap_iphdr);
-
- /*
- * fill in the encapsulating IP header.
- */
- ip_copy = mtod(mb_copy, struct ip *);
- *ip_copy = multicast_encap_iphdr;
- ip_copy->ip_id = htons(ip_id++);
- ip_copy->ip_len += len;
- ip_copy->ip_src = vifp->v_lcl_addr;
- ip_copy->ip_dst = vifp->v_rmt_addr;
-
- /*
- * turn the encapsulated IP header back into a valid one.
- */
- ip = (struct ip *)((caddr_t)ip_copy + sizeof(multicast_encap_iphdr));
- --ip->ip_ttl;
- HTONS(ip->ip_len);
- HTONS(ip->ip_off);
- ip->ip_sum = 0;
- mb_copy->m_data += sizeof(multicast_encap_iphdr);
- ip->ip_sum = in_cksum(mb_copy, ip->ip_hl << 2);
- mb_copy->m_data -= sizeof(multicast_encap_iphdr);
-
- if (vifp->v_rate_limit <= 0)
- tbf_send_packet(vifp, mb_copy);
- else
- tbf_control(vifp, mb_copy, ip, ip_copy->ip_len);
-}
-
-/*
- * De-encapsulate a packet and feed it back through ip input (this
- * routine is called whenever IP gets a packet with proto type
- * ENCAP_PROTO and a local destination address).
- */
-void
-#ifdef MROUTE_LKM
-X_ipip_input(m, iphlen)
-#else
-ipip_input(m, iphlen)
-#endif
- register struct mbuf *m;
- int iphlen;
-{
- struct ifnet *ifp = m->m_pkthdr.rcvif;
- register struct ip *ip = mtod(m, struct ip *);
- register int hlen = ip->ip_hl << 2;
- register int s;
- register struct ifqueue *ifq;
- register struct vif *vifp;
-
- if (!have_encap_tunnel) {
- rip_input(m, iphlen);
- return;
- }
- /*
- * dump the packet if it's not to a multicast destination or if
- * we don't have an encapsulating tunnel with the source.
- * Note: This code assumes that the remote site IP address
- * uniquely identifies the tunnel (i.e., that this site has
- * at most one tunnel with the remote site).
- */
- if (! IN_MULTICAST(ntohl(((struct ip *)((char *)ip + hlen))->ip_dst.s_addr))) {
- ++mrtstat.mrts_bad_tunnel;
- m_freem(m);
- return;
- }
- if (ip->ip_src.s_addr != last_encap_src) {
- register struct vif *vife;
-
- vifp = viftable;
- vife = vifp + numvifs;
- last_encap_src = ip->ip_src.s_addr;
- last_encap_vif = 0;
- for ( ; vifp < vife; ++vifp)
- if (vifp->v_rmt_addr.s_addr == ip->ip_src.s_addr) {
- if ((vifp->v_flags & (VIFF_TUNNEL|VIFF_SRCRT))
- == VIFF_TUNNEL)
- last_encap_vif = vifp;
- break;
- }
- }
- if ((vifp = last_encap_vif) == 0) {
- last_encap_src = 0;
- mrtstat.mrts_cant_tunnel++; /*XXX*/
- m_freem(m);
- if (mrtdebug)
- log(LOG_DEBUG, "ip_mforward: no tunnel with %x\n",
- ntohl(ip->ip_src.s_addr));
- return;
- }
- ifp = vifp->v_ifp;
-
- if (hlen > IP_HDR_LEN)
- ip_stripoptions(m, (struct mbuf *) 0);
- m->m_data += IP_HDR_LEN;
- m->m_len -= IP_HDR_LEN;
- m->m_pkthdr.len -= IP_HDR_LEN;
- m->m_pkthdr.rcvif = ifp;
-
- ifq = &ipintrq;
- s = splimp();
- if (IF_QFULL(ifq)) {
- IF_DROP(ifq);
- m_freem(m);
- } else {
- IF_ENQUEUE(ifq, m);
- /*
- * normally we would need a "schednetisr(NETISR_IP)"
- * here but we were called by ip_input and it is going
- * to loop back & try to dequeue the packet we just
- * queued as soon as we return so we avoid the
- * unnecessary software interrrupt.
- */
- }
- splx(s);
-}
-
-/*
- * Token bucket filter module
- */
-
-static void
-tbf_control(vifp, m, ip, p_len)
- register struct vif *vifp;
- register struct mbuf *m;
- register struct ip *ip;
- register u_long p_len;
-{
- register struct tbf *t = vifp->v_tbf;
-
- if (p_len > MAX_BKT_SIZE) {
- /* drop if packet is too large */
- mrtstat.mrts_pkt2large++;
- m_freem(m);
- return;
- }
-
- tbf_update_tokens(vifp);
-
- /* if there are enough tokens,
- * and the queue is empty,
- * send this packet out
- */
-
- if (t->tbf_q_len == 0) {
- /* queue empty, send packet if enough tokens */
- if (p_len <= t->tbf_n_tok) {
- t->tbf_n_tok -= p_len;
- tbf_send_packet(vifp, m);
- } else {
- /* queue packet and timeout till later */
- tbf_queue(vifp, m);
- timeout(tbf_reprocess_q, (caddr_t)vifp, TBF_REPROCESS);
- }
- } else if (t->tbf_q_len < t->tbf_max_q_len) {
- /* finite queue length, so queue pkts and process queue */
- tbf_queue(vifp, m);
- tbf_process_q(vifp);
- } else {
- /* queue length too much, try to dq and queue and process */
- if (!tbf_dq_sel(vifp, ip)) {
- mrtstat.mrts_q_overflow++;
- m_freem(m);
- return;
- } else {
- tbf_queue(vifp, m);
- tbf_process_q(vifp);
- }
- }
- return;
-}
-
-/*
- * adds a packet to the queue at the interface
- */
-static void
-tbf_queue(vifp, m)
- register struct vif *vifp;
- register struct mbuf *m;
-{
- register int s = splnet();
- register struct tbf *t = vifp->v_tbf;
-
- if (t->tbf_t == NULL) {
- /* Queue was empty */
- t->tbf_q = m;
- } else {
- /* Insert at tail */
- t->tbf_t->m_act = m;
- }
-
- /* Set new tail pointer */
- t->tbf_t = m;
-
-#ifdef DIAGNOSTIC
- /* Make sure we didn't get fed a bogus mbuf */
- if (m->m_act)
- panic("tbf_queue: m_act");
-#endif
- m->m_act = NULL;
-
- t->tbf_q_len++;
-
- splx(s);
-}
-
-
-/*
- * processes the queue at the interface
- */
-static void
-tbf_process_q(vifp)
- register struct vif *vifp;
-{
- register struct mbuf *m;
- register int len;
- register int s = splnet();
- register struct tbf *t = vifp->v_tbf;
-
- /* loop through the queue at the interface and send as many packets
- * as possible
- */
- while (t->tbf_q_len > 0) {
- m = t->tbf_q;
-
- len = mtod(m, struct ip *)->ip_len;
-
- /* determine if the packet can be sent */
- if (len <= t->tbf_n_tok) {
- /* if so,
- * reduce no of tokens, dequeue the packet,
- * send the packet.
- */
- t->tbf_n_tok -= len;
-
- t->tbf_q = m->m_act;
- if (--t->tbf_q_len == 0)
- t->tbf_t = NULL;
-
- m->m_act = NULL;
- tbf_send_packet(vifp, m);
-
- } else break;
- }
- splx(s);
-}
-
-static void
-tbf_reprocess_q(xvifp)
- void *xvifp;
-{
- register struct vif *vifp = xvifp;
- if (ip_mrouter == NULL)
- return;
-
- tbf_update_tokens(vifp);
-
- tbf_process_q(vifp);
-
- if (vifp->v_tbf->tbf_q_len)
- timeout(tbf_reprocess_q, (caddr_t)vifp, TBF_REPROCESS);
-}
-
-/* function that will selectively discard a member of the queue
- * based on the precedence value and the priority
- */
-static int
-tbf_dq_sel(vifp, ip)
- register struct vif *vifp;
- register struct ip *ip;
-{
- register int s = splnet();
- register u_int p;
- register struct mbuf *m, *last;
- register struct mbuf **np;
- register struct tbf *t = vifp->v_tbf;
-
- p = priority(vifp, ip);
-
- np = &t->tbf_q;
- last = NULL;
- while ((m = *np) != NULL) {
- if (p > priority(vifp, mtod(m, struct ip *))) {
- *np = m->m_act;
- /* If we're removing the last packet, fix the tail pointer */
- if (m == t->tbf_t)
- t->tbf_t = last;
- m_freem(m);
- /* it's impossible for the queue to be empty, but
- * we check anyway. */
- if (--t->tbf_q_len == 0)
- t->tbf_t = NULL;
- splx(s);
- mrtstat.mrts_drop_sel++;
- return(1);
- }
- np = &m->m_act;
- last = m;
- }
- splx(s);
- return(0);
-}
-
-static void
-tbf_send_packet(vifp, m)
- register struct vif *vifp;
- register struct mbuf *m;
-{
- struct ip_moptions imo;
- int error;
- static struct route ro;
- int s = splnet();
-
- if (vifp->v_flags & VIFF_TUNNEL) {
- /* If tunnel options */
- ip_output(m, (struct mbuf *)0, &vifp->v_route,
- IP_FORWARDING, (struct ip_moptions *)0);
- } else {
- imo.imo_multicast_ifp = vifp->v_ifp;
- imo.imo_multicast_ttl = mtod(m, struct ip *)->ip_ttl - 1;
- imo.imo_multicast_loop = 1;
- imo.imo_multicast_vif = -1;
-
- /*
- * Re-entrancy should not be a problem here, because
- * the packets that we send out and are looped back at us
- * should get rejected because they appear to come from
- * the loopback interface, thus preventing looping.
- */
- error = ip_output(m, (struct mbuf *)0, &ro,
- IP_FORWARDING, &imo);
-
- if (mrtdebug & DEBUG_XMIT)
- log(LOG_DEBUG, "phyint_send on vif %d err %d\n",
- vifp - viftable, error);
- }
- splx(s);
-}
-
-/* determine the current time and then
- * the elapsed time (between the last time and time now)
- * in milliseconds & update the no. of tokens in the bucket
- */
-static void
-tbf_update_tokens(vifp)
- register struct vif *vifp;
-{
- struct timeval tp;
- register u_long tm;
- register int s = splnet();
- register struct tbf *t = vifp->v_tbf;
-
- GET_TIME(tp);
-
- TV_DELTA(tp, t->tbf_last_pkt_t, tm);
-
- /*
- * This formula is actually
- * "time in seconds" * "bytes/second".
- *
- * (tm / 1000000) * (v_rate_limit * 1000 * (1000/1024) / 8)
- *
- * The (1000/1024) was introduced in add_vif to optimize
- * this divide into a shift.
- */
- t->tbf_n_tok += tm * vifp->v_rate_limit / 1024 / 8;
- t->tbf_last_pkt_t = tp;
-
- if (t->tbf_n_tok > MAX_BKT_SIZE)
- t->tbf_n_tok = MAX_BKT_SIZE;
-
- splx(s);
-}
-
-static int
-priority(vifp, ip)
- register struct vif *vifp;
- register struct ip *ip;
-{
- register int prio;
-
- /* temporary hack; may add general packet classifier some day */
-
- /*
- * The UDP port space is divided up into four priority ranges:
- * [0, 16384) : unclassified - lowest priority
- * [16384, 32768) : audio - highest priority
- * [32768, 49152) : whiteboard - medium priority
- * [49152, 65536) : video - low priority
- */
- if (ip->ip_p == IPPROTO_UDP) {
- struct udphdr *udp = (struct udphdr *)(((char *)ip) + (ip->ip_hl << 2));
- switch (ntohs(udp->uh_dport) & 0xc000) {
- case 0x4000:
- prio = 70;
- break;
- case 0x8000:
- prio = 60;
- break;
- case 0xc000:
- prio = 55;
- break;
- default:
- prio = 50;
- break;
- }
- if (tbfdebug > 1)
- log(LOG_DEBUG, "port %x prio%d\n", ntohs(udp->uh_dport), prio);
- } else {
- prio = 50;
- }
- return prio;
-}
-
-/*
- * End of token bucket filter modifications
- */
-
-int
-ip_rsvp_vif_init(so, m)
- struct socket *so;
- struct mbuf *m;
-{
- int i;
- register int s;
-
- if (rsvpdebug)
- printf("ip_rsvp_vif_init: so_type = %d, pr_protocol = %d\n",
- so->so_type, so->so_proto->pr_protocol);
-
- if (so->so_type != SOCK_RAW || so->so_proto->pr_protocol != IPPROTO_RSVP)
- return EOPNOTSUPP;
-
- /* Check mbuf. */
- if (m == NULL || m->m_len != sizeof(int)) {
- return EINVAL;
- }
- i = *(mtod(m, int *));
-
- if (rsvpdebug)
- printf("ip_rsvp_vif_init: vif = %d rsvp_on = %d\n",i,rsvp_on);
-
- s = splnet();
-
- /* Check vif. */
- if (!legal_vif_num(i)) {
- splx(s);
- return EADDRNOTAVAIL;
- }
-
- /* Check if socket is available. */
- if (viftable[i].v_rsvpd != NULL) {
- splx(s);
- return EADDRINUSE;
- }
-
- viftable[i].v_rsvpd = so;
- /* This may seem silly, but we need to be sure we don't over-increment
- * the RSVP counter, in case something slips up.
- */
- if (!viftable[i].v_rsvp_on) {
- viftable[i].v_rsvp_on = 1;
- rsvp_on++;
- }
-
- splx(s);
- return 0;
-}
-
-int
-ip_rsvp_vif_done(so, m)
- struct socket *so;
- struct mbuf *m;
-{
- int i;
- register int s;
-
- if (rsvpdebug)
- printf("ip_rsvp_vif_done: so_type = %d, pr_protocol = %d\n",
- so->so_type, so->so_proto->pr_protocol);
-
- if (so->so_type != SOCK_RAW || so->so_proto->pr_protocol != IPPROTO_RSVP)
- return EOPNOTSUPP;
-
- /* Check mbuf. */
- if (m == NULL || m->m_len != sizeof(int)) {
- return EINVAL;
- }
- i = *(mtod(m, int *));
-
- s = splnet();
-
- /* Check vif. */
- if (!legal_vif_num(i)) {
- splx(s);
- return EADDRNOTAVAIL;
- }
-
- if (rsvpdebug)
- printf("ip_rsvp_vif_done: v_rsvpd = %p so = %p\n",
- viftable[i].v_rsvpd, so);
-
- viftable[i].v_rsvpd = NULL;
- /* This may seem silly, but we need to be sure we don't over-decrement
- * the RSVP counter, in case something slips up.
- */
- if (viftable[i].v_rsvp_on) {
- viftable[i].v_rsvp_on = 0;
- rsvp_on--;
- }
-
- splx(s);
- return 0;
-}
-
-void
-ip_rsvp_force_done(so)
- struct socket *so;
-{
- int vifi;
- register int s;
-
- /* Don't bother if it is not the right type of socket. */
- if (so->so_type != SOCK_RAW || so->so_proto->pr_protocol != IPPROTO_RSVP)
- return;
-
- s = splnet();
-
- /* The socket may be attached to more than one vif...this
- * is perfectly legal.
- */
- for (vifi = 0; vifi < numvifs; vifi++) {
- if (viftable[vifi].v_rsvpd == so) {
- viftable[vifi].v_rsvpd = NULL;
- /* This may seem silly, but we need to be sure we don't
- * over-decrement the RSVP counter, in case something slips up.
- */
- if (viftable[vifi].v_rsvp_on) {
- viftable[vifi].v_rsvp_on = 0;
- rsvp_on--;
- }
- }
- }
-
- splx(s);
- return;
-}
-
-void
-rsvp_input(m, iphlen)
- struct mbuf *m;
- int iphlen;
-{
- int vifi;
- register struct ip *ip = mtod(m, struct ip *);
- static struct sockaddr_in rsvp_src = { sizeof rsvp_src, AF_INET };
- register int s;
- struct ifnet *ifp;
-
- if (rsvpdebug)
- printf("rsvp_input: rsvp_on %d\n",rsvp_on);
-
- /* Can still get packets with rsvp_on = 0 if there is a local member
- * of the group to which the RSVP packet is addressed. But in this
- * case we want to throw the packet away.
- */
- if (!rsvp_on) {
- m_freem(m);
- return;
- }
-
- /* If the old-style non-vif-associated socket is set, then use
- * it and ignore the new ones.
- */
- if (ip_rsvpd != NULL) {
- if (rsvpdebug)
- printf("rsvp_input: Sending packet up old-style socket\n");
- rip_input(m, iphlen);
- return;
- }
-
- s = splnet();
-
- if (rsvpdebug)
- printf("rsvp_input: check vifs\n");
-
-#ifdef DIAGNOSTIC
- if (!(m->m_flags & M_PKTHDR))
- panic("rsvp_input no hdr");
-#endif
-
- ifp = m->m_pkthdr.rcvif;
- /* Find which vif the packet arrived on. */
- for (vifi = 0; vifi < numvifs; vifi++) {
- if (viftable[vifi].v_ifp == ifp)
- break;
- }
-
- if (vifi == numvifs) {
- /* Can't find vif packet arrived on. Drop packet. */
- if (rsvpdebug)
- printf("rsvp_input: Can't find vif for packet...dropping it.\n");
- m_freem(m);
- splx(s);
- return;
- }
-
- if (rsvpdebug)
- printf("rsvp_input: check socket\n");
-
- if (viftable[vifi].v_rsvpd == NULL) {
- /* drop packet, since there is no specific socket for this
- * interface */
- if (rsvpdebug)
- printf("rsvp_input: No socket defined for vif %d\n",vifi);
- m_freem(m);
- splx(s);
- return;
- }
- rsvp_src.sin_addr = ip->ip_src;
-
- if (rsvpdebug && m)
- printf("rsvp_input: m->m_len = %d, sbspace() = %ld\n",
- m->m_len,sbspace(&(viftable[vifi].v_rsvpd->so_rcv)));
-
- if (socket_send(viftable[vifi].v_rsvpd, m, &rsvp_src) < 0)
- if (rsvpdebug)
- printf("rsvp_input: Failed to append to socket\n");
- else
- if (rsvpdebug)
- printf("rsvp_input: send packet up\n");
-
- splx(s);
-}
-
-#ifdef MROUTE_LKM
-#include <sys/conf.h>
-#include <sys/exec.h>
-#include <sys/sysent.h>
-#include <sys/lkm.h>
-
-MOD_MISC("ip_mroute_mod")
-
-static int
-ip_mroute_mod_handle(struct lkm_table *lkmtp, int cmd)
-{
- int i;
- struct lkm_misc *args = lkmtp->private.lkm_misc;
- int err = 0;
-
- switch(cmd) {
- static int (*old_ip_mrouter_cmd)();
- static int (*old_ip_mrouter_done)();
- static int (*old_ip_mforward)();
- static int (*old_mrt_ioctl)();
- static void (*old_proto4_input)();
- static int (*old_legal_vif_num)();
- extern struct protosw inetsw[];
-
- case LKM_E_LOAD:
- if(lkmexists(lkmtp) || ip_mrtproto)
- return(EEXIST);
- old_ip_mrouter_cmd = ip_mrouter_cmd;
- ip_mrouter_cmd = X_ip_mrouter_cmd;
- old_ip_mrouter_done = ip_mrouter_done;
- ip_mrouter_done = X_ip_mrouter_done;
- old_ip_mforward = ip_mforward;
- ip_mforward = X_ip_mforward;
- old_mrt_ioctl = mrt_ioctl;
- mrt_ioctl = X_mrt_ioctl;
- old_proto4_input = inetsw[ip_protox[ENCAP_PROTO]].pr_input;
- inetsw[ip_protox[ENCAP_PROTO]].pr_input = X_ipip_input;
- old_legal_vif_num = legal_vif_num;
- legal_vif_num = X_legal_vif_num;
- ip_mrtproto = IGMP_DVMRP;
-
- printf("\nIP multicast routing loaded\n");
- break;
-
- case LKM_E_UNLOAD:
- if (ip_mrouter)
- return EINVAL;
-
- ip_mrouter_cmd = old_ip_mrouter_cmd;
- ip_mrouter_done = old_ip_mrouter_done;
- ip_mforward = old_ip_mforward;
- mrt_ioctl = old_mrt_ioctl;
- inetsw[ip_protox[ENCAP_PROTO]].pr_input = old_proto4_input;
- legal_vif_num = old_legal_vif_num;
- ip_mrtproto = 0;
- break;
-
- default:
- err = EINVAL;
- break;
- }
-
- return(err);
-}
-
-int
-ip_mroute_mod(struct lkm_table *lkmtp, int cmd, int ver) {
- DISPATCH(lkmtp, cmd, ver, ip_mroute_mod_handle, ip_mroute_mod_handle,
- nosys);
-}
-
-#endif /* MROUTE_LKM */
-#endif /* MROUTING */
diff --git a/cpukit/libnetworking/netinet/ip_mroute.h b/cpukit/libnetworking/netinet/ip_mroute.h
deleted file mode 100644
index 5ddd6799d2..0000000000
--- a/cpukit/libnetworking/netinet/ip_mroute.h
+++ /dev/null
@@ -1,262 +0,0 @@
-/*
- * Copyright (c) 1989 Stephen Deering.
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Stephen Deering of Stanford University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ip_mroute.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _NETINET_IP_MROUTE_H_
-#define _NETINET_IP_MROUTE_H_
-
-/*
- * Definitions for IP multicast forwarding.
- *
- * Written by David Waitzman, BBN Labs, August 1988.
- * Modified by Steve Deering, Stanford, February 1989.
- * Modified by Ajit Thyagarajan, PARC, August 1993.
- * Modified by Ajit Thyagarajan, PARC, August 1994.
- *
- * MROUTING Revision: 3.3.1.3
- */
-
-
-/*
- * Multicast Routing set/getsockopt commands.
- */
-#define MRT_INIT 100 /* initialize forwarder */
-#define MRT_DONE 101 /* shut down forwarder */
-#define MRT_ADD_VIF 102 /* create virtual interface */
-#define MRT_DEL_VIF 103 /* delete virtual interface */
-#define MRT_ADD_MFC 104 /* insert forwarding cache entry */
-#define MRT_DEL_MFC 105 /* delete forwarding cache entry */
-#define MRT_VERSION 106 /* get kernel version number */
-#define MRT_ASSERT 107 /* enable PIM assert processing */
-
-
-#define GET_TIME(t) microtime(&t)
-
-/*
- * Types and macros for handling bitmaps with one bit per virtual interface.
- */
-#define MAXVIFS 32
-typedef u_long vifbitmap_t;
-typedef u_short vifi_t; /* type of a vif index */
-#define ALL_VIFS (vifi_t)-1
-
-#define VIFM_SET(n, m) ((m) |= (1 << (n)))
-#define VIFM_CLR(n, m) ((m) &= ~(1 << (n)))
-#define VIFM_ISSET(n, m) ((m) & (1 << (n)))
-#define VIFM_CLRALL(m) ((m) = 0x00000000)
-#define VIFM_COPY(mfrom, mto) ((mto) = (mfrom))
-#define VIFM_SAME(m1, m2) ((m1) == (m2))
-
-
-/*
- * Argument structure for MRT_ADD_VIF.
- * (MRT_DEL_VIF takes a single vifi_t argument.)
- */
-struct vifctl {
- vifi_t vifc_vifi; /* the index of the vif to be added */
- u_char vifc_flags; /* VIFF_ flags defined below */
- u_char vifc_threshold; /* min ttl required to forward on vif */
- u_int vifc_rate_limit; /* max rate */
- struct in_addr vifc_lcl_addr; /* local interface address */
- struct in_addr vifc_rmt_addr; /* remote address (tunnels only) */
-};
-
-#define VIFF_TUNNEL 0x1 /* vif represents a tunnel end-point */
-#define VIFF_SRCRT 0x2 /* tunnel uses IP source routing */
-
-/*
- * Argument structure for MRT_ADD_MFC and MRT_DEL_MFC
- * (mfcc_tos to be added at a future point)
- */
-struct mfcctl {
- struct in_addr mfcc_origin; /* ip origin of mcasts */
- struct in_addr mfcc_mcastgrp; /* multicast group associated*/
- vifi_t mfcc_parent; /* incoming vif */
- u_char mfcc_ttls[MAXVIFS]; /* forwarding ttls on vifs */
-};
-
-/*
- * The kernel's multicast routing statistics.
- */
-struct mrtstat {
- u_long mrts_mfc_lookups; /* # forw. cache hash table hits */
- u_long mrts_mfc_misses; /* # forw. cache hash table misses */
- u_long mrts_upcalls; /* # calls to mrouted */
- u_long mrts_no_route; /* no route for packet's origin */
- u_long mrts_bad_tunnel; /* malformed tunnel options */
- u_long mrts_cant_tunnel; /* no room for tunnel options */
- u_long mrts_wrong_if; /* arrived on wrong interface */
- u_long mrts_upq_ovflw; /* upcall Q overflow */
- u_long mrts_cache_cleanups; /* # entries with no upcalls */
- u_long mrts_drop_sel; /* pkts dropped selectively */
- u_long mrts_q_overflow; /* pkts dropped - Q overflow */
- u_long mrts_pkt2large; /* pkts dropped - size > BKT SIZE */
- u_long mrts_upq_sockfull; /* upcalls dropped - socket full */
-};
-
-/*
- * Argument structure used by mrouted to get src-grp pkt counts
- */
-struct sioc_sg_req {
- struct in_addr src;
- struct in_addr grp;
- u_long pktcnt;
- u_long bytecnt;
- u_long wrong_if;
-};
-
-/*
- * Argument structure used by mrouted to get vif pkt counts
- */
-struct sioc_vif_req {
- vifi_t vifi; /* vif number */
- u_long icount; /* Input packet count on vif */
- u_long ocount; /* Output packet count on vif */
- u_long ibytes; /* Input byte count on vif */
- u_long obytes; /* Output byte count on vif */
-};
-
-
-/*
- * The kernel's virtual-interface structure.
- */
-struct vif {
- u_char v_flags; /* VIFF_ flags defined above */
- u_char v_threshold; /* min ttl required to forward on vif*/
- u_int v_rate_limit; /* max rate */
- struct tbf *v_tbf; /* token bucket structure at intf. */
- struct in_addr v_lcl_addr; /* local interface address */
- struct in_addr v_rmt_addr; /* remote address (tunnels only) */
- struct ifnet *v_ifp; /* pointer to interface */
- u_long v_pkt_in; /* # pkts in on interface */
- u_long v_pkt_out; /* # pkts out on interface */
- u_long v_bytes_in; /* # bytes in on interface */
- u_long v_bytes_out; /* # bytes out on interface */
- struct route v_route; /* cached route if this is a tunnel */
- u_int v_rsvp_on; /* RSVP listening on this vif */
- struct socket *v_rsvpd; /* RSVP daemon socket */
-};
-
-/*
- * The kernel's multicast forwarding cache entry structure
- * (A field for the type of service (mfc_tos) is to be added
- * at a future point)
- */
-struct mfc {
- struct in_addr mfc_origin; /* IP origin of mcasts */
- struct in_addr mfc_mcastgrp; /* multicast group associated*/
- vifi_t mfc_parent; /* incoming vif */
- u_char mfc_ttls[MAXVIFS]; /* forwarding ttls on vifs */
- u_long mfc_pkt_cnt; /* pkt count for src-grp */
- u_long mfc_byte_cnt; /* byte count for src-grp */
- u_long mfc_wrong_if; /* wrong if for src-grp */
- int mfc_expire; /* time to clean entry up */
- struct timeval mfc_last_assert; /* last time I sent an assert*/
-};
-
-/*
- * Struct used to communicate from kernel to multicast router
- * note the convenient similarity to an IP packet
- */
-struct igmpmsg {
- u_long unused1;
- u_long unused2;
- u_char im_msgtype; /* what type of message */
-#define IGMPMSG_NOCACHE 1
-#define IGMPMSG_WRONGVIF 2
- u_char im_mbz; /* must be zero */
- u_char im_vif; /* vif rec'd on */
- u_char unused3;
- struct in_addr im_src, im_dst;
-};
-
-/*
- * Argument structure used for pkt info. while upcall is made
- */
-struct rtdetq {
- struct mbuf *m; /* A copy of the packet */
- struct ifnet *ifp; /* Interface pkt came in on */
- vifi_t xmt_vif; /* Saved copy of imo_multicast_vif */
-#ifdef UPCALL_TIMING
- struct timeval t; /* Timestamp */
-#endif /* UPCALL_TIMING */
-};
-
-#define MFCTBLSIZ 256
-#if (MFCTBLSIZ & (MFCTBLSIZ - 1)) == 0 /* from sys:route.h */
-#define MFCHASHMOD(h) ((h) & (MFCTBLSIZ - 1))
-#else
-#define MFCHASHMOD(h) ((h) % MFCTBLSIZ)
-#endif
-
-#define MAX_UPQ 4 /* max. no of pkts in upcall Q */
-
-/*
- * Token Bucket filter code
- */
-#define MAX_BKT_SIZE 10000 /* 10K bytes size */
-#define MAXQSIZE 10 /* max # of pkts in queue */
-
-/*
- * the token bucket filter at each vif
- */
-struct tbf
-{
- struct timeval tbf_last_pkt_t; /* arr. time of last pkt */
- u_long tbf_n_tok; /* no of tokens in bucket */
- u_long tbf_q_len; /* length of queue at this vif */
- u_long tbf_max_q_len; /* max. queue length */
- struct mbuf *tbf_q; /* Packet queue */
- struct mbuf *tbf_t; /* tail-insertion pointer */
-};
-
-#ifdef KERNEL
-
-extern int (*ip_mrouter_set) __P((int, struct socket *, struct mbuf *));
-extern int (*ip_mrouter_get) __P((int, struct socket *, struct mbuf **));
-extern int (*ip_mrouter_done) __P((void));
-#ifdef MROUTING
-extern int (*mrt_ioctl) __P((int, caddr_t));
-#else
-extern int (*mrt_ioctl) __P((int, caddr_t, struct proc *));
-#endif
-
-#endif /* KERNEL */
-
-#endif /* _NETINET_IP_MROUTE_H_ */
diff --git a/cpukit/libnetworking/netinet/ip_output.c b/cpukit/libnetworking/netinet/ip_output.c
deleted file mode 100644
index 810f6c7479..0000000000
--- a/cpukit/libnetworking/netinet/ip_output.c
+++ /dev/null
@@ -1,1307 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1988, 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ip_output.c 8.3 (Berkeley) 1/21/94
- * $Id$
- */
-
-#define _IP_VHL
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/systm.h>
-#include <sys/malloc.h>
-#include <sys/mbuf.h>
-#include <sys/errno.h>
-#include <sys/protosw.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-
-#include <net/if.h>
-#include <net/route.h>
-
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/in_pcb.h>
-#include <netinet/in_var.h>
-#include <netinet/ip_var.h>
-
-#ifdef vax
-#include <machine/mtpr.h>
-#endif
-#include <machine/in_cksum.h>
-
-#if !defined(COMPAT_IPFW) || COMPAT_IPFW == 1
-#undef COMPAT_IPFW
-#define COMPAT_IPFW 1
-#else
-#undef COMPAT_IPFW
-#endif
-
-u_short ip_id;
-
-static struct mbuf *ip_insertoptions __P((struct mbuf *, struct mbuf *, int *));
-static void ip_mloopback
- __P((struct ifnet *, struct mbuf *, struct sockaddr_in *, int));
-static int ip_getmoptions
- __P((int, struct ip_moptions *, struct mbuf **));
-static int ip_optcopy __P((struct ip *, struct ip *));
-static int ip_pcbopts __P((struct mbuf **, struct mbuf *));
-static int ip_setmoptions
- __P((int, struct ip_moptions **, struct mbuf *));
-
-extern struct protosw inetsw[];
-
-/*
- * IP output. The packet in mbuf chain m contains a skeletal IP
- * header (with len, off, ttl, proto, tos, src, dst).
- * The mbuf chain containing the packet will be freed.
- * The mbuf opt, if present, will not be freed.
- */
-int
-ip_output(m0, opt, ro, flags, imo)
- struct mbuf *m0;
- struct mbuf *opt;
- struct route *ro;
- int flags;
- struct ip_moptions *imo;
-{
- struct ip *ip, *mhip;
- struct ifnet *ifp;
- struct mbuf *m = m0;
- int hlen = sizeof (struct ip);
- int len, off, error = 0;
- struct sockaddr_in *dst;
- struct in_ifaddr *ia;
- int isbroadcast;
-
-#ifdef DIAGNOSTIC
- if ((m->m_flags & M_PKTHDR) == 0)
- panic("ip_output no HDR");
- if (!ro)
- panic("ip_output no route, proto = %d",
- mtod(m, struct ip *)->ip_p);
-#endif
- if (opt) {
- m = ip_insertoptions(m, opt, &len);
- hlen = len;
- }
- ip = mtod(m, struct ip *);
- /*
- * Fill in IP header.
- */
- if ((flags & (IP_FORWARDING|IP_RAWOUTPUT)) == 0) {
- ip->ip_vhl = IP_MAKE_VHL(IPVERSION, hlen >> 2);
- ip->ip_off &= IP_DF;
- ip->ip_id = htons(ip_id++);
- ipstat.ips_localout++;
- } else {
- hlen = IP_VHL_HL(ip->ip_vhl) << 2;
- }
-
- dst = (struct sockaddr_in *)&ro->ro_dst;
- /*
- * If there is a cached route,
- * check that it is to the same destination
- * and is still up. If not, free it and try again.
- */
- if (ro->ro_rt && ((ro->ro_rt->rt_flags & RTF_UP) == 0 ||
- dst->sin_addr.s_addr != ip->ip_dst.s_addr)) {
- RTFREE(ro->ro_rt);
- ro->ro_rt = (struct rtentry *)0;
- }
- if (ro->ro_rt == 0) {
- dst->sin_family = AF_INET;
- dst->sin_len = sizeof(*dst);
- dst->sin_addr = ip->ip_dst;
- }
- /*
- * If routing to interface only,
- * short circuit routing lookup.
- */
-#define ifatoia(ifa) ((struct in_ifaddr *)(ifa))
-#define sintosa(sin) ((struct sockaddr *)(sin))
- if (flags & IP_ROUTETOIF) {
- if ((ia = ifatoia(ifa_ifwithdstaddr(sintosa(dst)))) == 0 &&
- (ia = ifatoia(ifa_ifwithnet(sintosa(dst)))) == 0) {
- ipstat.ips_noroute++;
- error = ENETUNREACH;
- goto bad;
- }
- ifp = ia->ia_ifp;
- ip->ip_ttl = 1;
- isbroadcast = in_broadcast(dst->sin_addr, ifp);
- } else {
- /*
- * If this is the case, we probably don't want to allocate
- * a protocol-cloned route since we didn't get one from the
- * ULP. This lets TCP do its thing, while not burdening
- * forwarding or ICMP with the overhead of cloning a route.
- * Of course, we still want to do any cloning requested by
- * the link layer, as this is probably required in all cases
- * for correct operation (as it is for ARP).
- */
- if (ro->ro_rt == 0)
- rtalloc_ign(ro, RTF_PRCLONING);
- if (ro->ro_rt == 0) {
- ipstat.ips_noroute++;
- error = EHOSTUNREACH;
- goto bad;
- }
- ia = ifatoia(ro->ro_rt->rt_ifa);
- ifp = ro->ro_rt->rt_ifp;
- ro->ro_rt->rt_use++;
- if (ro->ro_rt->rt_flags & RTF_GATEWAY)
- dst = (struct sockaddr_in *)ro->ro_rt->rt_gateway;
- if (ro->ro_rt->rt_flags & RTF_HOST)
- isbroadcast = (ro->ro_rt->rt_flags & RTF_BROADCAST);
- else
- isbroadcast = in_broadcast(dst->sin_addr, ifp);
- }
- if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr))) {
- struct in_multi *inm;
-
- m->m_flags |= M_MCAST;
- /*
- * IP destination address is multicast. Make sure "dst"
- * still points to the address in "ro". (It may have been
- * changed to point to a gateway address, above.)
- */
- dst = (struct sockaddr_in *)&ro->ro_dst;
- /*
- * See if the caller provided any multicast options
- */
- if (imo != NULL) {
- ip->ip_ttl = imo->imo_multicast_ttl;
- if (imo->imo_multicast_ifp != NULL)
- ifp = imo->imo_multicast_ifp;
- if (imo->imo_multicast_vif != -1)
- ip->ip_src.s_addr =
- ip_mcast_src(imo->imo_multicast_vif);
- } else
- ip->ip_ttl = IP_DEFAULT_MULTICAST_TTL;
- /*
- * Confirm that the outgoing interface supports multicast.
- */
- if ((imo == NULL) || (imo->imo_multicast_vif == -1)) {
- if ((ifp->if_flags & IFF_MULTICAST) == 0) {
- ipstat.ips_noroute++;
- error = ENETUNREACH;
- goto bad;
- }
- }
- /*
- * If source address not specified yet, use address
- * of outgoing interface.
- */
- if (ip->ip_src.s_addr == INADDR_ANY) {
- register struct in_ifaddr *ia;
-
- for (ia = in_ifaddr; ia; ia = ia->ia_next)
- if (ia->ia_ifp == ifp) {
- ip->ip_src = IA_SIN(ia)->sin_addr;
- break;
- }
- }
-
- IN_LOOKUP_MULTI(ip->ip_dst, ifp, inm);
- if (inm != NULL &&
- (imo == NULL || imo->imo_multicast_loop)) {
- /*
- * If we belong to the destination multicast group
- * on the outgoing interface, and the caller did not
- * forbid loopback, loop back a copy.
- */
- ip_mloopback(ifp, m, dst, hlen);
- }
- else {
- /*
- * If we are acting as a multicast router, perform
- * multicast forwarding as if the packet had just
- * arrived on the interface to which we are about
- * to send. The multicast forwarding function
- * recursively calls this function, using the
- * IP_FORWARDING flag to prevent infinite recursion.
- *
- * Multicasts that are looped back by ip_mloopback(),
- * above, will be forwarded by the ip_input() routine,
- * if necessary.
- */
- if (ip_mrouter && (flags & IP_FORWARDING) == 0) {
- /*
- * Check if rsvp daemon is running. If not, don't
- * set ip_moptions. This ensures that the packet
- * is multicast and not just sent down one link
- * as prescribed by rsvpd.
- */
- if (!rsvp_on)
- imo = NULL;
- if (ip_mforward(ip, ifp, m, imo) != 0) {
- m_freem(m);
- goto done;
- }
- }
- }
-
- /*
- * Multicasts with a time-to-live of zero may be looped-
- * back, above, but must not be transmitted on a network.
- * Also, multicasts addressed to the loopback interface
- * are not sent -- the above call to ip_mloopback() will
- * loop back a copy if this host actually belongs to the
- * destination group on the loopback interface.
- */
- if (ip->ip_ttl == 0 || ifp->if_flags & IFF_LOOPBACK) {
- m_freem(m);
- goto done;
- }
-
- goto sendit;
- }
-#ifndef notdef
- /*
- * If source address not specified yet, use address
- * of outgoing interface.
- */
- if (ip->ip_src.s_addr == INADDR_ANY)
- ip->ip_src = IA_SIN(ia)->sin_addr;
-#endif
- /*
- * Verify that we have any chance at all of being able to queue
- * the packet or packet fragments
- */
- if ((ifp->if_snd.ifq_len + ip->ip_len / ifp->if_mtu + 1) >=
- ifp->if_snd.ifq_maxlen) {
- error = ENOBUFS;
- goto bad;
- }
-
- /*
- * Look for broadcast address and
- * and verify user is allowed to send
- * such a packet.
- */
- if (isbroadcast) {
- if ((ifp->if_flags & IFF_BROADCAST) == 0) {
- error = EADDRNOTAVAIL;
- goto bad;
- }
- if ((flags & IP_ALLOWBROADCAST) == 0) {
- error = EACCES;
- goto bad;
- }
- /* don't allow broadcast messages to be fragmented */
- if ((u_short)ip->ip_len > ifp->if_mtu) {
- error = EMSGSIZE;
- goto bad;
- }
- m->m_flags |= M_BCAST;
- } else {
- m->m_flags &= ~M_BCAST;
- }
-
-sendit:
- /*
- * IpHack's section.
- * - Xlate: translate packet's addr/port (NAT).
- * - Firewall: deny/allow/etc.
- * - Wrap: fake packet's addr/port <unimpl.>
- * - Encapsulate: put it in another IP and send out. <unimp.>
- */
-
-#ifdef COMPAT_IPFW
- if (ip_nat_ptr && !(*ip_nat_ptr)(&ip, &m, ifp, IP_NAT_OUT)) {
- error = EACCES;
- goto done;
- }
-
- /*
- * Check with the firewall...
- */
- if (ip_fw_chk_ptr) {
-#ifdef IPDIVERT
- ip_divert_port = (*ip_fw_chk_ptr)(&ip,
- hlen, ifp, ip_divert_ignore, &m);
- ip_divert_ignore = 0;
- if (ip_divert_port) { /* Divert packet */
- (*inetsw[ip_protox[IPPROTO_DIVERT]].pr_input)(m, 0);
- goto done;
- }
-#else
- /* If ipfw says divert, we have to just drop packet */
- if ((*ip_fw_chk_ptr)(&ip, hlen, ifp, 0, &m)) {
- m_freem(m);
- goto done;
- }
-#endif
- if (!m) {
- error = EACCES;
- goto done;
- }
- }
-#endif /* COMPAT_IPFW */
-
- /*
- * If small enough for interface, can just send directly.
- */
- if ((u_short)ip->ip_len <= ifp->if_mtu) {
- ip->ip_len = htons((u_short)ip->ip_len);
- ip->ip_off = htons((u_short)ip->ip_off);
- ip->ip_sum = 0;
- if (ip->ip_vhl == IP_VHL_BORING) {
- ip->ip_sum = in_cksum_hdr(ip);
- } else {
- ip->ip_sum = in_cksum(m, hlen);
- }
- error = (*ifp->if_output)(ifp, m,
- (struct sockaddr *)dst, ro->ro_rt);
- goto done;
- }
- /*
- * Too large for interface; fragment if possible.
- * Must be able to put at least 8 bytes per fragment.
- */
- if (ip->ip_off & IP_DF) {
- error = EMSGSIZE;
- /*
- * This case can happen if the user changed the MTU
- * of an interface after enabling IP on it. Because
- * most netifs don't keep track of routes pointing to
- * them, there is no way for one to update all its
- * routes when the MTU is changed.
- */
- if ((ro->ro_rt->rt_flags & (RTF_UP | RTF_HOST))
- && !(ro->ro_rt->rt_rmx.rmx_locks & RTV_MTU)
- && (ro->ro_rt->rt_rmx.rmx_mtu > ifp->if_mtu)) {
- ro->ro_rt->rt_rmx.rmx_mtu = ifp->if_mtu;
- }
- ipstat.ips_cantfrag++;
- goto bad;
- }
- len = (ifp->if_mtu - hlen) &~ 7;
- if (len < 8) {
- error = EMSGSIZE;
- goto bad;
- }
-
- {
- int mhlen, firstlen = len;
- struct mbuf **mnext = &m->m_nextpkt;
-
- /*
- * Loop through length of segment after first fragment,
- * make new header and copy data of each part and link onto chain.
- */
- m0 = m;
- mhlen = sizeof (struct ip);
- for (off = hlen + len; off < (u_short)ip->ip_len; off += len) {
- MGETHDR(m, M_DONTWAIT, MT_HEADER);
- if (m == 0) {
- error = ENOBUFS;
- ipstat.ips_odropped++;
- goto sendorfree;
- }
- m->m_data += max_linkhdr;
- mhip = mtod(m, struct ip *);
- *mhip = *ip;
- if (hlen > sizeof (struct ip)) {
- mhlen = ip_optcopy(ip, mhip) + sizeof (struct ip);
- mhip->ip_vhl = IP_MAKE_VHL(IPVERSION, mhlen >> 2);
- }
- m->m_len = mhlen;
- mhip->ip_off = ((off - hlen) >> 3) + (ip->ip_off & ~IP_MF);
- if (ip->ip_off & IP_MF)
- mhip->ip_off |= IP_MF;
- if (off + len >= (u_short)ip->ip_len)
- len = (u_short)ip->ip_len - off;
- else
- mhip->ip_off |= IP_MF;
- mhip->ip_len = htons((u_short)(len + mhlen));
- m->m_next = m_copy(m0, off, len);
- if (m->m_next == 0) {
- (void) m_free(m);
- error = ENOBUFS; /* ??? */
- ipstat.ips_odropped++;
- goto sendorfree;
- }
- m->m_pkthdr.len = mhlen + len;
- m->m_pkthdr.rcvif = (struct ifnet *)0;
- mhip->ip_off = htons((u_short)mhip->ip_off);
- mhip->ip_sum = 0;
- if (mhip->ip_vhl == IP_VHL_BORING) {
- mhip->ip_sum = in_cksum_hdr(mhip);
- } else {
- mhip->ip_sum = in_cksum(m, mhlen);
- }
- *mnext = m;
- mnext = &m->m_nextpkt;
- ipstat.ips_ofragments++;
- }
- /*
- * Update first fragment by trimming what's been copied out
- * and updating header, then send each fragment (in order).
- */
- m = m0;
- m_adj(m, hlen + firstlen - (u_short)ip->ip_len);
- m->m_pkthdr.len = hlen + firstlen;
- ip->ip_len = htons((u_short)m->m_pkthdr.len);
- ip->ip_off = htons((u_short)(ip->ip_off | IP_MF));
- ip->ip_sum = 0;
- if (ip->ip_vhl == IP_VHL_BORING) {
- ip->ip_sum = in_cksum_hdr(ip);
- } else {
- ip->ip_sum = in_cksum(m, hlen);
- }
-sendorfree:
- for (m = m0; m; m = m0) {
- m0 = m->m_nextpkt;
- m->m_nextpkt = 0;
- if (error == 0)
- error = (*ifp->if_output)(ifp, m,
- (struct sockaddr *)dst, ro->ro_rt);
- else
- m_freem(m);
- }
-
- if (error == 0)
- ipstat.ips_fragmented++;
- }
-done:
- return (error);
-bad:
- m_freem(m0);
- goto done;
-}
-
-/*
- * Insert IP options into preformed packet.
- * Adjust IP destination as required for IP source routing,
- * as indicated by a non-zero in_addr at the start of the options.
- *
- * XXX This routine assumes that the packet has no options in place.
- */
-static struct mbuf *
-ip_insertoptions(m, opt, phlen)
- register struct mbuf *m;
- struct mbuf *opt;
- int *phlen;
-{
- register struct ipoption *p = mtod(opt, struct ipoption *);
- struct mbuf *n;
- register struct ip *ip = mtod(m, struct ip *);
- unsigned optlen;
-
- optlen = opt->m_len - sizeof(p->ipopt_dst);
- if (optlen + (u_short)ip->ip_len > IP_MAXPACKET)
- return (m); /* XXX should fail */
- if (p->ipopt_dst.s_addr)
- ip->ip_dst = p->ipopt_dst;
- if (m->m_flags & M_EXT || m->m_data - optlen < m->m_pktdat) {
- MGETHDR(n, M_DONTWAIT, MT_HEADER);
- if (n == 0)
- return (m);
- n->m_pkthdr.len = m->m_pkthdr.len + optlen;
- m->m_len -= sizeof(struct ip);
- m->m_data += sizeof(struct ip);
- n->m_next = m;
- m = n;
- m->m_len = optlen + sizeof(struct ip);
- m->m_data += max_linkhdr;
- (void)memcpy(mtod(m, void *), ip, sizeof(struct ip));
- } else {
- m->m_data -= optlen;
- m->m_len += optlen;
- m->m_pkthdr.len += optlen;
- ovbcopy((caddr_t)ip, mtod(m, caddr_t), sizeof(struct ip));
- }
- ip = mtod(m, struct ip *);
- bcopy(p->ipopt_list, ip + 1, optlen);
- *phlen = sizeof(struct ip) + optlen;
- ip->ip_vhl = IP_MAKE_VHL(IPVERSION, *phlen >> 2);
- ip->ip_len += optlen;
- return (m);
-}
-
-/*
- * Copy options from ip to jp,
- * omitting those not copied during fragmentation.
- */
-static int
-ip_optcopy(ip, jp)
- struct ip *ip, *jp;
-{
- register u_char *cp, *dp;
- int opt, optlen, cnt;
-
- cp = (u_char *)(ip + 1);
- dp = (u_char *)(jp + 1);
- cnt = (IP_VHL_HL(ip->ip_vhl) << 2) - sizeof (struct ip);
- for (; cnt > 0; cnt -= optlen, cp += optlen) {
- opt = cp[0];
- if (opt == IPOPT_EOL)
- break;
- if (opt == IPOPT_NOP) {
- /* Preserve for IP mcast tunnel's LSRR alignment. */
- *dp++ = IPOPT_NOP;
- optlen = 1;
- continue;
- } else
- optlen = cp[IPOPT_OLEN];
- /* bogus lengths should have been caught by ip_dooptions */
- if (optlen > cnt)
- optlen = cnt;
- if (IPOPT_COPIED(opt)) {
- bcopy(cp, dp, optlen);
- dp += optlen;
- }
- }
- for (optlen = dp - (u_char *)(jp+1); optlen & 0x3; optlen++)
- *dp++ = IPOPT_EOL;
- return (optlen);
-}
-
-/*
- * IP socket option processing.
- */
-int
-ip_ctloutput(op, so, level, optname, mp)
- int op;
- struct socket *so;
- int level, optname;
- struct mbuf **mp;
-{
- register struct inpcb *inp = sotoinpcb(so);
- register struct mbuf *m = *mp;
- register int optval = 0;
- int error = 0;
-
- if (level != IPPROTO_IP) {
- error = EINVAL;
- if (op == PRCO_SETOPT && *mp)
- (void) m_free(*mp);
- } else switch (op) {
-
- case PRCO_SETOPT:
- switch (optname) {
- case IP_OPTIONS:
-#ifdef notyet
- case IP_RETOPTS:
- return (ip_pcbopts(optname, &inp->inp_options, m));
-#else
- return (ip_pcbopts(&inp->inp_options, m));
-#endif
-
- case IP_TOS:
- case IP_TTL:
- case IP_RECVOPTS:
- case IP_RECVRETOPTS:
- case IP_RECVDSTADDR:
- case IP_RECVIF:
- if (m == 0 || m->m_len != sizeof(int))
- error = EINVAL;
- else {
- optval = *mtod(m, int *);
- switch (optname) {
-
- case IP_TOS:
- inp->inp_ip_tos = optval;
- break;
-
- case IP_TTL:
- inp->inp_ip_ttl = optval;
- break;
-#define OPTSET(bit) \
- if (optval) \
- inp->inp_flags |= bit; \
- else \
- inp->inp_flags &= ~bit;
-
- case IP_RECVOPTS:
- OPTSET(INP_RECVOPTS);
- break;
-
- case IP_RECVRETOPTS:
- OPTSET(INP_RECVRETOPTS);
- break;
-
- case IP_RECVDSTADDR:
- OPTSET(INP_RECVDSTADDR);
- break;
-
- case IP_RECVIF:
- OPTSET(INP_RECVIF);
- break;
- }
- }
- break;
-#undef OPTSET
-
- case IP_MULTICAST_IF:
- case IP_MULTICAST_VIF:
- case IP_MULTICAST_TTL:
- case IP_MULTICAST_LOOP:
- case IP_ADD_MEMBERSHIP:
- case IP_DROP_MEMBERSHIP:
- error = ip_setmoptions(optname, &inp->inp_moptions, m);
- break;
-
- case IP_PORTRANGE:
- if (m == 0 || m->m_len != sizeof(int))
- error = EINVAL;
- else {
- optval = *mtod(m, int *);
-
- switch (optval) {
-
- case IP_PORTRANGE_DEFAULT:
- inp->inp_flags &= ~(INP_LOWPORT);
- inp->inp_flags &= ~(INP_HIGHPORT);
- break;
-
- case IP_PORTRANGE_HIGH:
- inp->inp_flags &= ~(INP_LOWPORT);
- inp->inp_flags |= INP_HIGHPORT;
- break;
-
- case IP_PORTRANGE_LOW:
- inp->inp_flags &= ~(INP_HIGHPORT);
- inp->inp_flags |= INP_LOWPORT;
- break;
-
- default:
- error = EINVAL;
- break;
- }
- }
- break;
-
- default:
- error = ENOPROTOOPT;
- break;
- }
- if (m)
- (void)m_free(m);
- break;
-
- case PRCO_GETOPT:
- switch (optname) {
- case IP_OPTIONS:
- case IP_RETOPTS:
- *mp = m = m_get(M_WAIT, MT_SOOPTS);
- if (inp->inp_options) {
- m->m_len = inp->inp_options->m_len;
- bcopy(mtod(inp->inp_options, void *),
- mtod(m, void *), m->m_len);
- } else
- m->m_len = 0;
- break;
-
- case IP_TOS:
- case IP_TTL:
- case IP_RECVOPTS:
- case IP_RECVRETOPTS:
- case IP_RECVDSTADDR:
- case IP_RECVIF:
- *mp = m = m_get(M_WAIT, MT_SOOPTS);
- m->m_len = sizeof(int);
- switch (optname) {
-
- case IP_TOS:
- optval = inp->inp_ip_tos;
- break;
-
- case IP_TTL:
- optval = inp->inp_ip_ttl;
- break;
-
-#define OPTBIT(bit) (inp->inp_flags & bit ? 1 : 0)
-
- case IP_RECVOPTS:
- optval = OPTBIT(INP_RECVOPTS);
- break;
-
- case IP_RECVRETOPTS:
- optval = OPTBIT(INP_RECVRETOPTS);
- break;
-
- case IP_RECVDSTADDR:
- optval = OPTBIT(INP_RECVDSTADDR);
- break;
-
- case IP_RECVIF:
- optval = OPTBIT(INP_RECVIF);
- break;
- }
- *mtod(m, int *) = optval;
- break;
-
- case IP_MULTICAST_IF:
- case IP_MULTICAST_VIF:
- case IP_MULTICAST_TTL:
- case IP_MULTICAST_LOOP:
- case IP_ADD_MEMBERSHIP:
- case IP_DROP_MEMBERSHIP:
- error = ip_getmoptions(optname, inp->inp_moptions, mp);
- break;
-
- case IP_PORTRANGE:
- *mp = m = m_get(M_WAIT, MT_SOOPTS);
- m->m_len = sizeof(int);
-
- if (inp->inp_flags & INP_HIGHPORT)
- optval = IP_PORTRANGE_HIGH;
- else if (inp->inp_flags & INP_LOWPORT)
- optval = IP_PORTRANGE_LOW;
- else
- optval = 0;
-
- *mtod(m, int *) = optval;
- break;
-
- default:
- error = ENOPROTOOPT;
- break;
- }
- break;
- }
- return (error);
-}
-
-/*
- * Set up IP options in pcb for insertion in output packets.
- * Store in mbuf with pointer in pcbopt, adding pseudo-option
- * with destination address if source routed.
- */
-static int
-#ifdef notyet
-ip_pcbopts(optname, pcbopt, m)
- int optname;
-#else
-ip_pcbopts(pcbopt, m)
-#endif
- struct mbuf **pcbopt;
- register struct mbuf *m;
-{
- register int cnt, optlen;
- register u_char *cp;
- u_char opt;
-
- /* turn off any old options */
- if (*pcbopt)
- (void)m_free(*pcbopt);
- *pcbopt = 0;
- if (m == (struct mbuf *)0 || m->m_len == 0) {
- /*
- * Only turning off any previous options.
- */
- if (m)
- (void)m_free(m);
- return (0);
- }
-
-#ifndef vax
- if (m->m_len % sizeof(long))
- goto bad;
-#endif
- /*
- * IP first-hop destination address will be stored before
- * actual options; move other options back
- * and clear it when none present.
- */
- if (m->m_data + m->m_len + sizeof(struct in_addr) >= &m->m_dat[MLEN])
- goto bad;
- cnt = m->m_len;
- m->m_len += sizeof(struct in_addr);
- cp = mtod(m, u_char *) + sizeof(struct in_addr);
- ovbcopy(mtod(m, caddr_t), (caddr_t)cp, (unsigned)cnt);
- bzero(mtod(m, caddr_t), sizeof(struct in_addr));
-
- for (; cnt > 0; cnt -= optlen, cp += optlen) {
- opt = cp[IPOPT_OPTVAL];
- if (opt == IPOPT_EOL)
- break;
- if (opt == IPOPT_NOP)
- optlen = 1;
- else {
- optlen = cp[IPOPT_OLEN];
- if (optlen <= IPOPT_OLEN || optlen > cnt)
- goto bad;
- }
- switch (opt) {
-
- default:
- break;
-
- case IPOPT_LSRR:
- case IPOPT_SSRR:
- /*
- * user process specifies route as:
- * ->A->B->C->D
- * D must be our final destination (but we can't
- * check that since we may not have connected yet).
- * A is first hop destination, which doesn't appear in
- * actual IP option, but is stored before the options.
- */
- if (optlen < IPOPT_MINOFF - 1 + sizeof(struct in_addr))
- goto bad;
- m->m_len -= sizeof(struct in_addr);
- cnt -= sizeof(struct in_addr);
- optlen -= sizeof(struct in_addr);
- cp[IPOPT_OLEN] = optlen;
- /*
- * Move first hop before start of options.
- */
- bcopy((caddr_t)&cp[IPOPT_OFFSET+1], mtod(m, caddr_t),
- sizeof(struct in_addr));
- /*
- * Then copy rest of options back
- * to close up the deleted entry.
- */
- ovbcopy((caddr_t)(&cp[IPOPT_OFFSET+1] +
- sizeof(struct in_addr)),
- (caddr_t)&cp[IPOPT_OFFSET+1],
- (unsigned)cnt + sizeof(struct in_addr));
- break;
- }
- }
- if (m->m_len > MAX_IPOPTLEN + sizeof(struct in_addr))
- goto bad;
- *pcbopt = m;
- return (0);
-
-bad:
- (void)m_free(m);
- return (EINVAL);
-}
-
-/*
- * Set the IP multicast options in response to user setsockopt().
- */
-static int
-ip_setmoptions(optname, imop, m)
- int optname;
- struct ip_moptions **imop;
- struct mbuf *m;
-{
- register int error = 0;
- u_char loop;
- register int i;
- struct in_addr addr;
- register struct ip_mreq *mreq;
- register struct ifnet *ifp;
- register struct ip_moptions *imo = *imop;
- struct route ro;
- register struct sockaddr_in *dst;
- int s;
-
- if (imo == NULL) {
- /*
- * No multicast option buffer attached to the pcb;
- * allocate one and initialize to default values.
- */
- imo = (struct ip_moptions*)malloc(sizeof(*imo), M_IPMOPTS,
- M_WAITOK);
-
- if (imo == NULL)
- return (ENOBUFS);
- *imop = imo;
- imo->imo_multicast_ifp = NULL;
- imo->imo_multicast_vif = -1;
- imo->imo_multicast_ttl = IP_DEFAULT_MULTICAST_TTL;
- imo->imo_multicast_loop = IP_DEFAULT_MULTICAST_LOOP;
- imo->imo_num_memberships = 0;
- }
-
- switch (optname) {
- /* store an index number for the vif you wanna use in the send */
- case IP_MULTICAST_VIF:
- if (!legal_vif_num) {
- error = EOPNOTSUPP;
- break;
- }
- if (m == NULL || m->m_len != sizeof(int)) {
- error = EINVAL;
- break;
- }
- i = *(mtod(m, int *));
- if (!legal_vif_num(i) && (i != -1)) {
- error = EINVAL;
- break;
- }
- imo->imo_multicast_vif = i;
- break;
-
- case IP_MULTICAST_IF:
- /*
- * Select the interface for outgoing multicast packets.
- */
- if (m == NULL || m->m_len != sizeof(struct in_addr)) {
- error = EINVAL;
- break;
- }
- addr = *(mtod(m, struct in_addr *));
- /*
- * INADDR_ANY is used to remove a previous selection.
- * When no interface is selected, a default one is
- * chosen every time a multicast packet is sent.
- */
- if (addr.s_addr == INADDR_ANY) {
- imo->imo_multicast_ifp = NULL;
- break;
- }
- /*
- * The selected interface is identified by its local
- * IP address. Find the interface and confirm that
- * it supports multicasting.
- */
- s = splimp();
- INADDR_TO_IFP(addr, ifp);
- if (ifp == NULL || (ifp->if_flags & IFF_MULTICAST) == 0) {
- splx(s);
- error = EADDRNOTAVAIL;
- break;
- }
- imo->imo_multicast_ifp = ifp;
- splx(s);
- break;
-
- case IP_MULTICAST_TTL:
- /*
- * Set the IP time-to-live for outgoing multicast packets.
- */
- if (m == NULL || m->m_len != 1) {
- error = EINVAL;
- break;
- }
- imo->imo_multicast_ttl = *(mtod(m, u_char *));
- break;
-
- case IP_MULTICAST_LOOP:
- /*
- * Set the loopback flag for outgoing multicast packets.
- * Must be zero or one.
- */
- if (m == NULL || m->m_len != 1 ||
- (loop = *(mtod(m, u_char *))) > 1) {
- error = EINVAL;
- break;
- }
- imo->imo_multicast_loop = loop;
- break;
-
- case IP_ADD_MEMBERSHIP:
- /*
- * Add a multicast group membership.
- * Group must be a valid IP multicast address.
- */
- if (m == NULL || m->m_len != sizeof(struct ip_mreq)) {
- error = EINVAL;
- break;
- }
- mreq = mtod(m, struct ip_mreq *);
- if (!IN_MULTICAST(ntohl(mreq->imr_multiaddr.s_addr))) {
- error = EINVAL;
- break;
- }
- s = splimp();
- /*
- * If no interface address was provided, use the interface of
- * the route to the given multicast address.
- */
- if (mreq->imr_interface.s_addr == INADDR_ANY) {
- bzero((caddr_t)&ro, sizeof(ro));
- dst = (struct sockaddr_in *)&ro.ro_dst;
- dst->sin_len = sizeof(*dst);
- dst->sin_family = AF_INET;
- dst->sin_addr = mreq->imr_multiaddr;
- rtalloc(&ro);
- if (ro.ro_rt == NULL) {
- error = EADDRNOTAVAIL;
- splx(s);
- break;
- }
- ifp = ro.ro_rt->rt_ifp;
- rtfree(ro.ro_rt);
- }
- else {
- INADDR_TO_IFP(mreq->imr_interface, ifp);
- }
-
- /*
- * See if we found an interface, and confirm that it
- * supports multicast.
- */
- if (ifp == NULL || (ifp->if_flags & IFF_MULTICAST) == 0) {
- error = EADDRNOTAVAIL;
- splx(s);
- break;
- }
- /*
- * See if the membership already exists or if all the
- * membership slots are full.
- */
- for (i = 0; i < imo->imo_num_memberships; ++i) {
- if (imo->imo_membership[i]->inm_ifp == ifp &&
- imo->imo_membership[i]->inm_addr.s_addr
- == mreq->imr_multiaddr.s_addr)
- break;
- }
- if (i < imo->imo_num_memberships) {
- error = EADDRINUSE;
- splx(s);
- break;
- }
- if (i == IP_MAX_MEMBERSHIPS) {
- error = ETOOMANYREFS;
- splx(s);
- break;
- }
- /*
- * Everything looks good; add a new record to the multicast
- * address list for the given interface.
- */
- if ((imo->imo_membership[i] =
- in_addmulti(&mreq->imr_multiaddr, ifp)) == NULL) {
- error = ENOBUFS;
- splx(s);
- break;
- }
- ++imo->imo_num_memberships;
- splx(s);
- break;
-
- case IP_DROP_MEMBERSHIP:
- /*
- * Drop a multicast group membership.
- * Group must be a valid IP multicast address.
- */
- if (m == NULL || m->m_len != sizeof(struct ip_mreq)) {
- error = EINVAL;
- break;
- }
- mreq = mtod(m, struct ip_mreq *);
- if (!IN_MULTICAST(ntohl(mreq->imr_multiaddr.s_addr))) {
- error = EINVAL;
- break;
- }
-
- s = splimp();
- /*
- * If an interface address was specified, get a pointer
- * to its ifnet structure.
- */
- if (mreq->imr_interface.s_addr == INADDR_ANY)
- ifp = NULL;
- else {
- INADDR_TO_IFP(mreq->imr_interface, ifp);
- if (ifp == NULL) {
- error = EADDRNOTAVAIL;
- splx(s);
- break;
- }
- }
- /*
- * Find the membership in the membership array.
- */
- for (i = 0; i < imo->imo_num_memberships; ++i) {
- if ((ifp == NULL ||
- imo->imo_membership[i]->inm_ifp == ifp) &&
- imo->imo_membership[i]->inm_addr.s_addr ==
- mreq->imr_multiaddr.s_addr)
- break;
- }
- if (i == imo->imo_num_memberships) {
- error = EADDRNOTAVAIL;
- splx(s);
- break;
- }
- /*
- * Give up the multicast address record to which the
- * membership points.
- */
- in_delmulti(imo->imo_membership[i]);
- /*
- * Remove the gap in the membership array.
- */
- for (++i; i < imo->imo_num_memberships; ++i)
- imo->imo_membership[i-1] = imo->imo_membership[i];
- --imo->imo_num_memberships;
- splx(s);
- break;
-
- default:
- error = EOPNOTSUPP;
- break;
- }
-
- /*
- * If all options have default values, no need to keep the mbuf.
- */
- if (imo->imo_multicast_ifp == NULL &&
- imo->imo_multicast_vif == -1 &&
- imo->imo_multicast_ttl == IP_DEFAULT_MULTICAST_TTL &&
- imo->imo_multicast_loop == IP_DEFAULT_MULTICAST_LOOP &&
- imo->imo_num_memberships == 0) {
- free(*imop, M_IPMOPTS);
- *imop = NULL;
- }
-
- return (error);
-}
-
-/*
- * Return the IP multicast options in response to user getsockopt().
- */
-static int
-ip_getmoptions(optname, imo, mp)
- int optname;
- register struct ip_moptions *imo;
- register struct mbuf **mp;
-{
- u_char *ttl;
- u_char *loop;
- struct in_addr *addr;
- struct in_ifaddr *ia;
-
- *mp = m_get(M_WAIT, MT_SOOPTS);
-
- switch (optname) {
-
- case IP_MULTICAST_VIF:
- if (imo != NULL)
- *(mtod(*mp, int *)) = imo->imo_multicast_vif;
- else
- *(mtod(*mp, int *)) = -1;
- (*mp)->m_len = sizeof(int);
- return(0);
-
- case IP_MULTICAST_IF:
- addr = mtod(*mp, struct in_addr *);
- (*mp)->m_len = sizeof(struct in_addr);
- if (imo == NULL || imo->imo_multicast_ifp == NULL)
- addr->s_addr = INADDR_ANY;
- else {
- IFP_TO_IA(imo->imo_multicast_ifp, ia);
- addr->s_addr = (ia == NULL) ? INADDR_ANY
- : IA_SIN(ia)->sin_addr.s_addr;
- }
- return (0);
-
- case IP_MULTICAST_TTL:
- ttl = mtod(*mp, u_char *);
- (*mp)->m_len = 1;
- *ttl = (imo == NULL) ? IP_DEFAULT_MULTICAST_TTL
- : imo->imo_multicast_ttl;
- return (0);
-
- case IP_MULTICAST_LOOP:
- loop = mtod(*mp, u_char *);
- (*mp)->m_len = 1;
- *loop = (imo == NULL) ? IP_DEFAULT_MULTICAST_LOOP
- : imo->imo_multicast_loop;
- return (0);
-
- default:
- return (EOPNOTSUPP);
- }
-}
-
-/*
- * Discard the IP multicast options.
- */
-void
-ip_freemoptions(imo)
- register struct ip_moptions *imo;
-{
- register int i;
-
- if (imo != NULL) {
- for (i = 0; i < imo->imo_num_memberships; ++i)
- in_delmulti(imo->imo_membership[i]);
- free(imo, M_IPMOPTS);
- }
-}
-
-/*
- * Routine called from ip_output() to loop back a copy of an IP multicast
- * packet to the input queue of a specified interface. Note that this
- * calls the output routine of the loopback "driver", but with an interface
- * pointer that might NOT be a loopback interface -- evil, but easier than
- * replicating that code here.
- */
-static void
-ip_mloopback(ifp, m, dst, hlen)
- struct ifnet *ifp;
- register struct mbuf *m;
- register struct sockaddr_in *dst;
- int hlen;
-{
- register struct ip *ip;
- struct mbuf *copym;
-
- copym = m_copy(m, 0, M_COPYALL);
- if (copym != NULL && (copym->m_flags & M_EXT || copym->m_len < hlen))
- copym = m_pullup(copym, hlen);
- if (copym != NULL) {
- /*
- * We don't bother to fragment if the IP length is greater
- * than the interface's MTU. Can this possibly matter?
- */
- ip = mtod(copym, struct ip *);
- ip->ip_len = htons((u_short)ip->ip_len);
- ip->ip_off = htons((u_short)ip->ip_off);
- ip->ip_sum = 0;
- if (ip->ip_vhl == IP_VHL_BORING) {
- ip->ip_sum = in_cksum_hdr(ip);
- } else {
- ip->ip_sum = in_cksum(copym, hlen);
- }
- /*
- * NB:
- * It's not clear whether there are any lingering
- * reentrancy problems in other areas which might
- * be exposed by using ip_input directly (in
- * particular, everything which modifies the packet
- * in-place). Yet another option is using the
- * protosw directly to deliver the looped back
- * packet. For the moment, we'll err on the side
- * of safety by continuing to abuse looutput().
- */
-#ifdef notdef
- copym->m_pkthdr.rcvif = ifp;
- ip_input(copym)
-#else
- (void) looutput(ifp, copym, (struct sockaddr *)dst, NULL);
-#endif
- }
-}
diff --git a/cpukit/libnetworking/netinet/ip_var.h b/cpukit/libnetworking/netinet/ip_var.h
deleted file mode 100644
index cc7908e9a3..0000000000
--- a/cpukit/libnetworking/netinet/ip_var.h
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ip_var.h 8.2 (Berkeley) 1/9/95
- * $Id$
- */
-
-#ifndef _NETINET_IP_VAR_H_
-#define _NETINET_IP_VAR_H_
-
-/*
- * Overlay for ip header used by other protocols (tcp, udp).
- */
-struct ipovly {
- caddr_t ih_next, ih_prev; /* for protocol sequence q's */
- u_char ih_x1; /* (unused) */
- u_char ih_pr; /* protocol */
- u_short ih_len; /* protocol length */
- struct in_addr ih_src; /* source internet address */
- struct in_addr ih_dst; /* destination internet address */
-};
-
-/*
- * Ip reassembly queue structure. Each fragment
- * being reassembled is attached to one of these structures.
- * They are timed out after ipq_ttl drops to 0, and may also
- * be reclaimed if memory becomes tight.
- */
-struct ipq {
- struct ipq *next,*prev; /* to other reass headers */
- u_char ipq_ttl; /* time for reass q to live */
- u_char ipq_p; /* protocol of this fragment */
- u_short ipq_id; /* sequence id for reassembly */
- struct ipasfrag *ipq_next,*ipq_prev;
- /* to ip headers of fragments */
- struct in_addr ipq_src,ipq_dst;
-#ifdef IPDIVERT
- u_short ipq_divert; /* divert protocol port */
-#endif
-};
-
-/*
- * Ip header, when holding a fragment.
- *
- * Note: ipf_next must be at same offset as ipq_next above
- */
-struct ipasfrag {
-#if BYTE_ORDER == LITTLE_ENDIAN
- u_char ip_hl:4,
- ip_v:4;
-#endif
-#if BYTE_ORDER == BIG_ENDIAN
- u_char ip_v:4,
- ip_hl:4;
-#endif
- u_char ipf_mff; /* XXX overlays ip_tos: use low bit
- * to avoid destroying tos;
- * copied from (ip_off&IP_MF) */
- u_short ip_len;
- u_short ip_id;
- u_short ip_off;
- u_char ip_ttl;
- u_char ip_p;
- u_short ip_sum;
- struct ipasfrag *ipf_next; /* next fragment */
- struct ipasfrag *ipf_prev; /* previous fragment */
-};
-
-/*
- * Structure stored in mbuf in inpcb.ip_options
- * and passed to ip_output when ip options are in use.
- * The actual length of the options (including ipopt_dst)
- * is in m_len.
- */
-#define MAX_IPOPTLEN 40
-
-struct ipoption {
- struct in_addr ipopt_dst; /* first-hop dst if source routed */
- char ipopt_list[MAX_IPOPTLEN]; /* options proper */
-};
-
-/*
- * Structure attached to inpcb.ip_moptions and
- * passed to ip_output when IP multicast options are in use.
- */
-struct ip_moptions {
- struct ifnet *imo_multicast_ifp; /* ifp for outgoing multicasts */
- u_char imo_multicast_ttl; /* TTL for outgoing multicasts */
- u_char imo_multicast_loop; /* 1 => hear sends if a member */
- u_short imo_num_memberships; /* no. memberships this socket */
- struct in_multi *imo_membership[IP_MAX_MEMBERSHIPS];
- u_long imo_multicast_vif; /* vif num outgoing multicasts */
-};
-
-struct ipstat {
- u_long ips_total; /* total packets received */
- u_long ips_badsum; /* checksum bad */
- u_long ips_tooshort; /* packet too short */
- u_long ips_toosmall; /* not enough data */
- u_long ips_badhlen; /* ip header length < data size */
- u_long ips_badlen; /* ip length < ip header length */
- u_long ips_fragments; /* fragments received */
- u_long ips_fragdropped; /* frags dropped (dups, out of space) */
- u_long ips_fragtimeout; /* fragments timed out */
- u_long ips_forward; /* packets forwarded */
- u_long ips_cantforward; /* packets rcvd for unreachable dest */
- u_long ips_redirectsent; /* packets forwarded on same net */
- u_long ips_noproto; /* unknown or unsupported protocol */
- u_long ips_delivered; /* datagrams delivered to upper level*/
- u_long ips_localout; /* total ip packets generated here */
- u_long ips_odropped; /* lost packets due to nobufs, etc. */
- u_long ips_reassembled; /* total packets reassembled ok */
- u_long ips_fragmented; /* datagrams successfully fragmented */
- u_long ips_ofragments; /* output fragments created */
- u_long ips_cantfrag; /* don't fragment flag was set, etc. */
- u_long ips_badoptions; /* error in option processing */
- u_long ips_noroute; /* packets discarded due to no route */
- u_long ips_badvers; /* ip version != 4 */
- u_long ips_rawout; /* total raw ip packets generated */
- u_long ips_toolong; /* ip length > max ip packet size */
-};
-
-#ifdef KERNEL
-/* flags passed to ip_output as last parameter */
-#define IP_FORWARDING 0x1 /* most of ip header exists */
-#define IP_RAWOUTPUT 0x2 /* raw ip header exists */
-#define IP_ROUTETOIF SO_DONTROUTE /* bypass routing tables */
-#define IP_ALLOWBROADCAST SO_BROADCAST /* can send broadcast packets */
-
-struct inpcb;
-struct route;
-
-extern struct ipstat ipstat;
-extern u_short ip_id; /* ip packet ctr, for ids */
-extern int ip_defttl; /* default IP ttl */
-extern u_char ip_protox[];
-extern struct socket *ip_rsvpd; /* reservation protocol daemon */
-extern struct socket *ip_mrouter; /* multicast routing daemon */
-extern int (*legal_vif_num) __P((int));
-extern u_long (*ip_mcast_src) __P((int));
-extern int rsvp_on;
-
-int ip_ctloutput __P((int, struct socket *, int, int, struct mbuf **));
-void ip_drain __P((void));
-void ip_freemoptions __P((struct ip_moptions *));
-void ip_init __P((void));
-extern int (*ip_mforward) __P((struct ip *, struct ifnet *, struct mbuf *,
- struct ip_moptions *));
-int ip_output __P((struct mbuf *,
- struct mbuf *, struct route *, int, struct ip_moptions *));
-void ip_savecontrol __P((struct inpcb *, struct mbuf **, struct ip *,
- struct mbuf *));
-void ip_slowtimo __P((void));
-struct mbuf *
- ip_srcroute __P((void));
-void ip_stripoptions __P((struct mbuf *, struct mbuf *));
-int rip_ctloutput __P((int, struct socket *, int, int, struct mbuf **));
-void rip_init __P((void));
-void rip_input __P((struct mbuf *, int));
-int rip_output __P((struct mbuf *, struct socket *, u_long));
-int rip_usrreq __P((struct socket *,
- int, struct mbuf *, struct mbuf *, struct mbuf *));
-void ipip_input __P((struct mbuf *, int));
-void rsvp_input __P((struct mbuf *, int));
-int ip_rsvp_init __P((struct socket *));
-int ip_rsvp_done __P((void));
-int ip_rsvp_vif_init __P((struct socket *, struct mbuf *));
-int ip_rsvp_vif_done __P((struct socket *, struct mbuf *));
-void ip_rsvp_force_done __P((struct socket *));
-
-#ifdef IPDIVERT
-void div_init __P((void));
-void div_input __P((struct mbuf *, int));
-int div_usrreq __P((struct socket *,
- int, struct mbuf *, struct mbuf *, struct mbuf *));
-extern u_short ip_divert_port;
-extern u_short ip_divert_ignore;
-#endif /* IPDIVERT */
-
-#endif /* KERNEL */
-
-#endif /* _NETINET_IP_VAR_H_ */
diff --git a/cpukit/libnetworking/netinet/raw_ip.c b/cpukit/libnetworking/netinet/raw_ip.c
deleted file mode 100644
index 44d58f1844..0000000000
--- a/cpukit/libnetworking/netinet/raw_ip.c
+++ /dev/null
@@ -1,486 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)raw_ip.c 8.7 (Berkeley) 5/15/95
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/malloc.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-#include <sys/protosw.h>
-#include <sys/socketvar.h>
-#include <sys/errno.h>
-#include <sys/systm.h>
-
-#include <net/if.h>
-#include <net/route.h>
-
-#define _IP_VHL
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/in_pcb.h>
-#include <netinet/in_var.h>
-#include <netinet/ip_var.h>
-#include <netinet/ip_mroute.h>
-
-#include <netinet/ip_fw.h>
-
-#if !defined(COMPAT_IPFW) || COMPAT_IPFW == 1
-#undef COMPAT_IPFW
-#define COMPAT_IPFW 1
-#else
-#undef COMPAT_IPFW
-#endif
-
-static struct inpcbhead ripcb;
-static struct inpcbinfo ripcbinfo;
-
-/*
- * Nominal space allocated to a raw ip socket.
- */
-#define RIPSNDQ 8192
-#define RIPRCVQ 8192
-
-/*
- * Raw interface to IP protocol.
- */
-
-/*
- * Initialize raw connection block q.
- */
-void
-rip_init()
-{
- LIST_INIT(&ripcb);
- ripcbinfo.listhead = &ripcb;
- /*
- * XXX We don't use the hash list for raw IP, but it's easier
- * to allocate a one entry hash list than it is to check all
- * over the place for hashbase == NULL.
- */
- ripcbinfo.hashbase = hashinit(1, M_PCB, &ripcbinfo.hashmask);
-}
-
-static struct sockaddr_in ripsrc = { sizeof(ripsrc), AF_INET };
-/*
- * Setup generic address and protocol structures
- * for raw_input routine, then pass them along with
- * mbuf chain.
- */
-void
-rip_input(m, iphlen)
- struct mbuf *m;
- int iphlen;
-{
- register struct ip *ip = mtod(m, struct ip *);
- register struct inpcb *inp;
- struct inpcb *last = 0;
- struct mbuf *opts = 0;
-
- ripsrc.sin_addr = ip->ip_src;
- for (inp = ripcb.lh_first; inp != NULL; inp = inp->inp_list.le_next) {
- if (inp->inp_ip_p && inp->inp_ip_p != ip->ip_p)
- continue;
- if (inp->inp_laddr.s_addr &&
- inp->inp_laddr.s_addr != ip->ip_dst.s_addr)
- continue;
- if (inp->inp_faddr.s_addr &&
- inp->inp_faddr.s_addr != ip->ip_src.s_addr)
- continue;
- if (last) {
- struct mbuf *n = m_copy(m, 0, (int)M_COPYALL);
- if (n) {
- if (last->inp_flags & INP_CONTROLOPTS ||
- last->inp_socket->so_options & SO_TIMESTAMP)
- ip_savecontrol(last, &opts, ip, n);
- if (sbappendaddr(&last->inp_socket->so_rcv,
- (struct sockaddr *)&ripsrc, n,
- opts) == 0) {
- /* should notify about lost packet */
- m_freem(n);
- if (opts)
- m_freem(opts);
- } else
- sorwakeup(last->inp_socket);
- opts = 0;
- }
- }
- last = inp;
- }
- if (last) {
- if (last->inp_flags & INP_CONTROLOPTS ||
- last->inp_socket->so_options & SO_TIMESTAMP)
- ip_savecontrol(last, &opts, ip, m);
- if (sbappendaddr(&last->inp_socket->so_rcv,
- (struct sockaddr *)&ripsrc, m, opts) == 0) {
- m_freem(m);
- if (opts)
- m_freem(opts);
- } else
- sorwakeup(last->inp_socket);
- } else {
- m_freem(m);
- ipstat.ips_noproto++;
- ipstat.ips_delivered--;
- }
-}
-
-/*
- * Generate IP header and pass packet to ip_output.
- * Tack on options user may have setup with control call.
- */
-int
-rip_output(m, so, dst)
- register struct mbuf *m;
- struct socket *so;
- u_long dst;
-{
- register struct ip *ip;
- register struct inpcb *inp = sotoinpcb(so);
- int flags = (so->so_options & SO_DONTROUTE) | IP_ALLOWBROADCAST;
-
- /*
- * If the user handed us a complete IP packet, use it.
- * Otherwise, allocate an mbuf for a header and fill it in.
- */
- if ((inp->inp_flags & INP_HDRINCL) == 0) {
- if (m->m_pkthdr.len + sizeof(struct ip) > IP_MAXPACKET) {
- m_freem(m);
- return(EMSGSIZE);
- }
- M_PREPEND(m, sizeof(struct ip), M_WAIT);
- ip = mtod(m, struct ip *);
- ip->ip_tos = 0;
- ip->ip_off = 0;
- ip->ip_p = inp->inp_ip_p;
- ip->ip_len = m->m_pkthdr.len;
- ip->ip_src = inp->inp_laddr;
- ip->ip_dst.s_addr = dst;
- ip->ip_ttl = MAXTTL;
- } else {
- if (m->m_pkthdr.len > IP_MAXPACKET) {
- m_freem(m);
- return(EMSGSIZE);
- }
- ip = mtod(m, struct ip *);
- /* don't allow both user specified and setsockopt options,
- and don't allow packet length sizes that will crash */
- if (((IP_VHL_HL(ip->ip_vhl) != (sizeof (*ip) >> 2))
- && inp->inp_options)
- || (ip->ip_len > m->m_pkthdr.len)
- || (ip->ip_len < (IP_VHL_HL(ip->ip_vhl) << 2))) {
- m_freem(m);
- return EINVAL;
- }
- if (ip->ip_id == 0)
- ip->ip_id = htons(ip_id++);
- /* XXX prevent ip_output from overwriting header fields */
- flags |= IP_RAWOUTPUT;
- ipstat.ips_rawout++;
- }
- return (ip_output(m, inp->inp_options, &inp->inp_route, flags,
- inp->inp_moptions));
-}
-
-/*
- * Raw IP socket option processing.
- */
-int
-rip_ctloutput(op, so, level, optname, m)
- int op;
- struct socket *so;
- int level, optname;
- struct mbuf **m;
-{
- register struct inpcb *inp = sotoinpcb(so);
- register int error;
-
- if (level != IPPROTO_IP) {
- if (op == PRCO_SETOPT && *m)
- (void)m_free(*m);
- return (EINVAL);
- }
-
- switch (optname) {
-
- case IP_HDRINCL:
- error = 0;
- if (op == PRCO_SETOPT) {
- if (m == 0 || *m == 0 || (*m)->m_len < sizeof (int))
- error = EINVAL;
- else if (*mtod(*m, int *))
- inp->inp_flags |= INP_HDRINCL;
- else
- inp->inp_flags &= ~INP_HDRINCL;
- if (*m)
- (void)m_free(*m);
- } else {
- *m = m_get(M_WAIT, MT_SOOPTS);
- (*m)->m_len = sizeof (int);
- *mtod(*m, int *) = inp->inp_flags & INP_HDRINCL;
- }
- return (error);
-
-#ifdef COMPAT_IPFW
- case IP_FW_GET:
- if (ip_fw_ctl_ptr == NULL || op == PRCO_SETOPT) {
- if (*m) (void)m_free(*m);
- return(EINVAL);
- }
- return (*ip_fw_ctl_ptr)(optname, m);
-
- case IP_FW_ADD:
- case IP_FW_DEL:
- case IP_FW_FLUSH:
- case IP_FW_ZERO:
- if (ip_fw_ctl_ptr == NULL || op != PRCO_SETOPT) {
- if (*m) (void)m_free(*m);
- return(EINVAL);
- }
- return (*ip_fw_ctl_ptr)(optname, m);
-
- case IP_NAT:
- if (ip_nat_ctl_ptr == NULL) {
- if (*m) (void)m_free(*m);
- return(EINVAL);
- }
- return (*ip_nat_ctl_ptr)(op, m);
-
-#endif
- case IP_RSVP_ON:
- return ip_rsvp_init(so);
- break;
-
- case IP_RSVP_OFF:
- return ip_rsvp_done();
- break;
-
- case IP_RSVP_VIF_ON:
- return ip_rsvp_vif_init(so, *m);
-
- case IP_RSVP_VIF_OFF:
- return ip_rsvp_vif_done(so, *m);
-
- case MRT_INIT:
- case MRT_DONE:
- case MRT_ADD_VIF:
- case MRT_DEL_VIF:
- case MRT_ADD_MFC:
- case MRT_DEL_MFC:
- case MRT_VERSION:
- case MRT_ASSERT:
- if (op == PRCO_SETOPT) {
- error = ip_mrouter_set(optname, so, *m);
- if (*m)
- (void)m_free(*m);
- } else if (op == PRCO_GETOPT) {
- error = ip_mrouter_get(optname, so, m);
- } else
- error = EINVAL;
- return (error);
- }
- return (ip_ctloutput(op, so, level, optname, m));
-}
-
-static u_long rip_sendspace = RIPSNDQ; /* XXX sysctl ? */
-static u_long rip_recvspace = RIPRCVQ; /* XXX sysctl ? */
-
-/*ARGSUSED*/
-int
-rip_usrreq(so, req, m, nam, control)
- register struct socket *so;
- int req;
- struct mbuf *m, *nam, *control;
-{
- register int error = 0;
- register struct inpcb *inp = sotoinpcb(so);
- int s;
-
- if (req == PRU_CONTROL)
- return (in_control(so, (u_long)m, (caddr_t)nam,
- (struct ifnet *)control));
-
- switch (req) {
-
- case PRU_ATTACH:
- if (inp)
- panic("rip_attach");
- if ((so->so_state & SS_PRIV) == 0) {
- error = EACCES;
- break;
- }
- s = splnet();
- error = in_pcballoc(so, &ripcbinfo);
- splx(s);
- if (error)
- break;
- error = soreserve(so, rip_sendspace, rip_recvspace);
- if (error)
- break;
- inp = (struct inpcb *)so->so_pcb;
- inp->inp_ip_p = (int)nam;
- break;
-
- case PRU_DISCONNECT:
- if ((so->so_state & SS_ISCONNECTED) == 0) {
- error = ENOTCONN;
- break;
- }
- /* FALLTHROUGH */
- case PRU_ABORT:
- soisdisconnected(so);
- /* FALLTHROUGH */
- case PRU_DETACH:
- if (inp == 0)
- panic("rip_detach");
- if (so == ip_mrouter)
- ip_mrouter_done();
- ip_rsvp_force_done(so);
- if (so == ip_rsvpd)
- ip_rsvp_done();
- in_pcbdetach(inp);
- break;
-
- case PRU_BIND:
- {
- struct sockaddr_in *addr = mtod(nam, struct sockaddr_in *);
-
- if (nam->m_len != sizeof(*addr)) {
- error = EINVAL;
- break;
- }
- if ((ifnet == 0) ||
- ((addr->sin_family != AF_INET) &&
- (addr->sin_family != AF_IMPLINK)) ||
- (addr->sin_addr.s_addr &&
- ifa_ifwithaddr((struct sockaddr *)addr) == 0)) {
- error = EADDRNOTAVAIL;
- break;
- }
- inp->inp_laddr = addr->sin_addr;
- break;
- }
- case PRU_CONNECT:
- {
- struct sockaddr_in *addr = mtod(nam, struct sockaddr_in *);
-
- if (nam->m_len != sizeof(*addr)) {
- error = EINVAL;
- break;
- }
- if (ifnet == 0) {
- error = EADDRNOTAVAIL;
- break;
- }
- if ((addr->sin_family != AF_INET) &&
- (addr->sin_family != AF_IMPLINK)) {
- error = EAFNOSUPPORT;
- break;
- }
- inp->inp_faddr = addr->sin_addr;
- soisconnected(so);
- break;
- }
-
- case PRU_CONNECT2:
- error = EOPNOTSUPP;
- break;
-
- /*
- * Mark the connection as being incapable of further input.
- */
- case PRU_SHUTDOWN:
- socantsendmore(so);
- break;
-
- /*
- * Ship a packet out. The appropriate raw output
- * routine handles any massaging necessary.
- */
- case PRU_SEND:
- {
- register u_long dst;
-
- if (so->so_state & SS_ISCONNECTED) {
- if (nam) {
- error = EISCONN;
- break;
- }
- dst = inp->inp_faddr.s_addr;
- } else {
- if (nam == NULL) {
- error = ENOTCONN;
- break;
- }
- dst = mtod(nam, struct sockaddr_in *)->sin_addr.s_addr;
- }
- error = rip_output(m, so, dst);
- m = NULL;
- break;
- }
-
- case PRU_SENSE:
- /*
- * stat: don't bother with a blocksize.
- */
- return (0);
-
- /*
- * Not supported.
- */
- case PRU_RCVOOB:
- case PRU_RCVD:
- case PRU_LISTEN:
- case PRU_ACCEPT:
- case PRU_SENDOOB:
- error = EOPNOTSUPP;
- break;
-
- case PRU_SOCKADDR:
- in_setsockaddr(inp, nam);
- break;
-
- case PRU_PEERADDR:
- in_setpeeraddr(inp, nam);
- break;
-
- default:
- panic("rip_usrreq");
- }
- if (m != NULL)
- m_freem(m);
- return (error);
-}
diff --git a/cpukit/libnetworking/netinet/tcp.h b/cpukit/libnetworking/netinet/tcp.h
deleted file mode 100644
index 3585917aa3..0000000000
--- a/cpukit/libnetworking/netinet/tcp.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)tcp.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _NETINET_TCP_H_
-#define _NETINET_TCP_H_
-
-typedef u_long tcp_seq;
-typedef u_long tcp_cc; /* connection count per rfc1644 */
-
-/*
- * TCP header.
- * Per RFC 793, September, 1981.
- */
-struct tcphdr {
- u_short th_sport; /* source port */
- u_short th_dport; /* destination port */
- tcp_seq th_seq; /* sequence number */
- tcp_seq th_ack; /* acknowledgement number */
-#if BYTE_ORDER == LITTLE_ENDIAN
- u_char th_x2:4, /* (unused) */
- th_off:4; /* data offset */
-#endif
-#if BYTE_ORDER == BIG_ENDIAN
- u_char th_off:4, /* data offset */
- th_x2:4; /* (unused) */
-#endif
- u_char th_flags;
-#define TH_FIN 0x01
-#define TH_SYN 0x02
-#define TH_RST 0x04
-#define TH_PUSH 0x08
-#define TH_ACK 0x10
-#define TH_URG 0x20
-#define TH_FLAGS (TH_FIN|TH_SYN|TH_RST|TH_ACK|TH_URG)
-
- u_short th_win; /* window */
- u_short th_sum; /* checksum */
- u_short th_urp; /* urgent pointer */
-};
-
-#define TCPOPT_EOL 0
-#define TCPOPT_NOP 1
-#define TCPOPT_MAXSEG 2
-#define TCPOLEN_MAXSEG 4
-#define TCPOPT_WINDOW 3
-#define TCPOLEN_WINDOW 3
-#define TCPOPT_SACK_PERMITTED 4 /* Experimental */
-#define TCPOLEN_SACK_PERMITTED 2
-#define TCPOPT_SACK 5 /* Experimental */
-#define TCPOPT_TIMESTAMP 8
-#define TCPOLEN_TIMESTAMP 10
-#define TCPOLEN_TSTAMP_APPA (TCPOLEN_TIMESTAMP+2) /* appendix A */
-#define TCPOPT_TSTAMP_HDR \
- (TCPOPT_NOP<<24|TCPOPT_NOP<<16|TCPOPT_TIMESTAMP<<8|TCPOLEN_TIMESTAMP)
-
-#define TCPOPT_CC 11 /* CC options: RFC-1644 */
-#define TCPOPT_CCNEW 12
-#define TCPOPT_CCECHO 13
-#define TCPOLEN_CC 6
-#define TCPOLEN_CC_APPA (TCPOLEN_CC+2)
-#define TCPOPT_CC_HDR(ccopt) \
- (TCPOPT_NOP<<24|TCPOPT_NOP<<16|(ccopt)<<8|TCPOLEN_CC)
-
-/*
- * Default maximum segment size for TCP.
- * With an IP MSS of 576, this is 536,
- * but 512 is probably more convenient.
- * This should be defined as MIN(512, IP_MSS - sizeof (struct tcpiphdr)).
- */
-#define TCP_MSS 512
-
-#define TCP_MAXWIN 65535 /* largest value for (unscaled) window */
-#define TTCP_CLIENT_SND_WND 4096 /* dflt send window for T/TCP client */
-
-#define TCP_MAX_WINSHIFT 14 /* maximum window shift */
-
-#define TCP_MAXHLEN (0xf<<2) /* max length of header in bytes */
-#define TCP_MAXOLEN (TCP_MAXHLEN - sizeof(struct tcphdr))
- /* max space left for options */
-
-/*
- * User-settable options (used with setsockopt).
- */
-#define TCP_NODELAY 0x01 /* don't delay send to coalesce packets */
-#define TCP_MAXSEG 0x02 /* set maximum segment size */
-#define TCP_NOPUSH 0x04 /* don't push last block of write */
-#define TCP_NOOPT 0x08 /* don't use TCP options */
-
-#endif
diff --git a/cpukit/libnetworking/netinet/tcp_debug.c b/cpukit/libnetworking/netinet/tcp_debug.c
deleted file mode 100644
index 2f88ae658e..0000000000
--- a/cpukit/libnetworking/netinet/tcp_debug.c
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)tcp_debug.c 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#include "opt_tcpdebug.h"
-
-#ifdef TCPDEBUG
-/* load symbolic names */
-#define PRUREQUESTS
-#define TCPSTATES
-#define TCPTIMERS
-#define TANAMES
-#endif
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/systm.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/protosw.h>
-#include <sys/errno.h>
-
-#include <net/route.h>
-#include <net/if.h>
-
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/in_pcb.h>
-#include <netinet/ip_var.h>
-#include <netinet/tcp.h>
-#include <netinet/tcp_fsm.h>
-#include <netinet/tcp_seq.h>
-#include <netinet/tcp_timer.h>
-#include <netinet/tcp_var.h>
-#include <netinet/tcpip.h>
-#include <netinet/tcp_debug.h>
-
-#ifdef TCPDEBUG
-static int tcpconsdebug = 0; /* set to 1 to enable prints */
-#endif
-
-static struct tcp_debug tcp_debug[TCP_NDEBUG];
-static int tcp_debx;
-
-/*
- * Tcp debug routines
- */
-void
-tcp_trace(act, ostate, tp, ti, req)
- short act, ostate;
- struct tcpcb *tp;
- struct tcpiphdr *ti;
- int req;
-{
-#ifdef TCPDEBUG
- tcp_seq seq, ack;
- int len, flags;
-#endif
- struct tcp_debug *td = &tcp_debug[tcp_debx++];
-
- if (tcp_debx == TCP_NDEBUG)
- tcp_debx = 0;
- td->td_time = iptime();
- td->td_act = act;
- td->td_ostate = ostate;
- td->td_tcb = (caddr_t)tp;
- if (tp)
- td->td_cb = *tp;
- else
- bzero((caddr_t)&td->td_cb, sizeof (*tp));
- if (ti)
- td->td_ti = *ti;
- else
- bzero((caddr_t)&td->td_ti, sizeof (*ti));
- td->td_req = req;
-#ifdef TCPDEBUG
- if (tcpconsdebug == 0)
- return;
- if (tp)
- printf("%p %s:", tp, tcpstates[ostate]);
- else
- printf("???????? ");
- printf("%s ", tanames[act]);
- switch (act) {
-
- case TA_INPUT:
- case TA_OUTPUT:
- case TA_DROP:
- if (ti == 0)
- break;
- seq = ti->ti_seq;
- ack = ti->ti_ack;
- len = ti->ti_len;
- if (act == TA_OUTPUT) {
- seq = ntohl(seq);
- ack = ntohl(ack);
- len = ntohs((u_short)len);
- }
- if (act == TA_OUTPUT)
- len -= sizeof (struct tcphdr);
- if (len)
- printf("[%x..%x)", seq, seq+len);
- else
- printf("%x", seq);
- printf("@%x, urp=%x", ack, ti->ti_urp);
- flags = ti->ti_flags;
- if (flags) {
- char *cp = "<";
-#define pf(f) { \
- if (ti->ti_flags & TH_##f) { \
- printf("%s%s", cp, #f); \
- cp = ","; \
- } \
-}
- pf(SYN); pf(ACK); pf(FIN); pf(RST); pf(PUSH); pf(URG);
- printf(">");
- }
- break;
-
- case TA_USER:
- printf("%s", prurequests[req&0xff]);
- if ((req & 0xff) == PRU_SLOWTIMO)
- printf("<%s>", tcptimers[req>>8]);
- break;
- }
- if (tp)
- printf(" -> %s", tcpstates[tp->t_state]);
- /* print out internal state of tp !?! */
- printf("\n");
- if (tp == 0)
- return;
- printf("\trcv_(nxt,wnd,up) (%x,%x,%x) snd_(una,nxt,max) (%x,%x,%x)\n",
- tp->rcv_nxt, tp->rcv_wnd, tp->rcv_up, tp->snd_una, tp->snd_nxt,
- tp->snd_max);
- printf("\tsnd_(wl1,wl2,wnd) (%x,%x,%x)\n",
- tp->snd_wl1, tp->snd_wl2, tp->snd_wnd);
-#endif /* TCPDEBUG */
-}
diff --git a/cpukit/libnetworking/netinet/tcp_debug.h b/cpukit/libnetworking/netinet/tcp_debug.h
deleted file mode 100644
index a33743b077..0000000000
--- a/cpukit/libnetworking/netinet/tcp_debug.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)tcp_debug.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _NETINET_TCP_DEBUG_H_
-#define _NETINET_TCP_DEBUG_H_
-
-struct tcp_debug {
- n_time td_time;
- short td_act;
- short td_ostate;
- caddr_t td_tcb;
- struct tcpiphdr td_ti;
- short td_req;
- struct tcpcb td_cb;
-};
-
-#define TA_INPUT 0
-#define TA_OUTPUT 1
-#define TA_USER 2
-#define TA_RESPOND 3
-#define TA_DROP 4
-
-#ifdef TANAMES
-static char *tanames[] =
- { "input", "output", "user", "respond", "drop" };
-#endif
-
-#define TCP_NDEBUG 100
-
-#ifndef KERNEL
-/* XXX common variables for broken applications. */
-struct tcp_debug tcp_debug[TCP_NDEBUG];
-int tcp_debx;
-#endif
-
-#endif /* !_NETINET_TCP_DEBUG_H_ */
diff --git a/cpukit/libnetworking/netinet/tcp_fsm.h b/cpukit/libnetworking/netinet/tcp_fsm.h
deleted file mode 100644
index 3f2c12f54f..0000000000
--- a/cpukit/libnetworking/netinet/tcp_fsm.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)tcp_fsm.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _NETINET_TCP_FSM_H_
-#define _NETINET_TCP_FSM_H_
-
-/*
- * TCP FSM state definitions.
- * Per RFC793, September, 1981.
- */
-
-#define TCP_NSTATES 11
-
-#define TCPS_CLOSED 0 /* closed */
-#define TCPS_LISTEN 1 /* listening for connection */
-#define TCPS_SYN_SENT 2 /* active, have sent syn */
-#define TCPS_SYN_RECEIVED 3 /* have send and received syn */
-/* states < TCPS_ESTABLISHED are those where connections not established */
-#define TCPS_ESTABLISHED 4 /* established */
-#define TCPS_CLOSE_WAIT 5 /* rcvd fin, waiting for close */
-/* states > TCPS_CLOSE_WAIT are those where user has closed */
-#define TCPS_FIN_WAIT_1 6 /* have closed, sent fin */
-#define TCPS_CLOSING 7 /* closed xchd FIN; await FIN ACK */
-#define TCPS_LAST_ACK 8 /* had fin and close; await FIN ACK */
-/* states > TCPS_CLOSE_WAIT && < TCPS_FIN_WAIT_2 await ACK of FIN */
-#define TCPS_FIN_WAIT_2 9 /* have closed, fin is acked */
-#define TCPS_TIME_WAIT 10 /* in 2*msl quiet wait after close */
-
-#define TCPS_HAVERCVDSYN(s) ((s) >= TCPS_SYN_RECEIVED)
-#define TCPS_HAVEESTABLISHED(s) ((s) >= TCPS_ESTABLISHED)
-#define TCPS_HAVERCVDFIN(s) ((s) >= TCPS_TIME_WAIT)
-
-#ifdef TCPOUTFLAGS
-/*
- * Flags used when sending segments in tcp_output.
- * Basic flags (TH_RST,TH_ACK,TH_SYN,TH_FIN) are totally
- * determined by state, with the proviso that TH_FIN is sent only
- * if all data queued for output is included in the segment.
- */
-static u_char tcp_outflags[TCP_NSTATES] = {
- TH_RST|TH_ACK, 0, TH_SYN, TH_SYN|TH_ACK,
- TH_ACK, TH_ACK,
- TH_FIN|TH_ACK, TH_FIN|TH_ACK, TH_FIN|TH_ACK, TH_ACK, TH_ACK,
-};
-#endif
-
-#ifdef KPROF
-int tcp_acounts[TCP_NSTATES][PRU_NREQ];
-#endif
-
-#ifdef TCPSTATES
-char *tcpstates[] = {
- "CLOSED", "LISTEN", "SYN_SENT", "SYN_RCVD",
- "ESTABLISHED", "CLOSE_WAIT", "FIN_WAIT_1", "CLOSING",
- "LAST_ACK", "FIN_WAIT_2", "TIME_WAIT",
-};
-#endif
-
-#endif
diff --git a/cpukit/libnetworking/netinet/tcp_input.c b/cpukit/libnetworking/netinet/tcp_input.c
deleted file mode 100644
index 12e4dad03f..0000000000
--- a/cpukit/libnetworking/netinet/tcp_input.c
+++ /dev/null
@@ -1,2150 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1994, 1995
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)tcp_input.c 8.12 (Berkeley) 5/24/95
- * $Id$
- */
-
-#include "opt_tcpdebug.h"
-
-#ifndef TUBA_INCLUDE
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/sysctl.h>
-#include <sys/malloc.h>
-#include <sys/mbuf.h>
-#include <sys/protosw.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/errno.h>
-#include <sys/syslog.h>
-
-#include <machine/cpu.h> /* before tcp_seq.h, for tcp_random18() */
-
-#include <net/if.h>
-#include <net/route.h>
-
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/in_pcb.h>
-#include <netinet/ip_var.h>
-#include <netinet/tcp.h>
-#include <netinet/tcp_fsm.h>
-#include <netinet/tcp_seq.h>
-#include <netinet/tcp_timer.h>
-#include <netinet/tcp_var.h>
-#include <netinet/tcpip.h>
-#ifdef TCPDEBUG
-#include <netinet/tcp_debug.h>
-static struct tcpiphdr tcp_saveti;
-#endif
-
-static int tcprexmtthresh = 3;
-tcp_seq tcp_iss;
-tcp_cc tcp_ccgen;
-
-struct tcpstat tcpstat;
-SYSCTL_STRUCT(_net_inet_tcp, TCPCTL_STATS, stats,
- CTLFLAG_RD, &tcpstat , tcpstat, "");
-
-static int log_in_vain = 0;
-SYSCTL_INT(_net_inet_tcp, OID_AUTO, log_in_vain, CTLFLAG_RW,
- &log_in_vain, 0, "");
-
-u_long tcp_now;
-struct inpcbhead tcb;
-struct inpcbinfo tcbinfo;
-
-static void tcp_dooptions __P((struct tcpcb *,
- u_char *, int, struct tcpiphdr *, struct tcpopt *));
-static void tcp_pulloutofband __P((struct socket *,
- struct tcpiphdr *, struct mbuf *));
-static int tcp_reass __P((struct tcpcb *, struct tcpiphdr *, struct mbuf *));
-static void tcp_xmit_timer __P((struct tcpcb *, int));
-
-#endif /* TUBA_INCLUDE */
-
-/*
- * Insert segment ti into reassembly queue of tcp with
- * control block tp. Return TH_FIN if reassembly now includes
- * a segment with FIN. The macro form does the common case inline
- * (segment is the next to be received on an established connection,
- * and the queue is empty), avoiding linkage into and removal
- * from the queue and repetition of various conversions.
- * Set DELACK for segments received in order, but ack immediately
- * when segments are out of order (so fast retransmit can work).
- */
-#ifdef TCP_ACK_HACK
-#define TCP_REASS(tp, ti, m, so, flags) { \
- if ((ti)->ti_seq == (tp)->rcv_nxt && \
- (tp)->seg_next == (struct tcpiphdr *)(tp) && \
- (tp)->t_state == TCPS_ESTABLISHED) { \
- if (ti->ti_flags & TH_PUSH) \
- tp->t_flags |= TF_ACKNOW; \
- else \
- tp->t_flags |= TF_DELACK; \
- (tp)->rcv_nxt += (ti)->ti_len; \
- flags = (ti)->ti_flags & TH_FIN; \
- tcpstat.tcps_rcvpack++;\
- tcpstat.tcps_rcvbyte += (ti)->ti_len;\
- sbappend(&(so)->so_rcv, (m)); \
- sorwakeup(so); \
- } else { \
- (flags) = tcp_reass((tp), (ti), (m)); \
- tp->t_flags |= TF_ACKNOW; \
- } \
-}
-#else
-#define TCP_REASS(tp, ti, m, so, flags) { \
- if ((ti)->ti_seq == (tp)->rcv_nxt && \
- (tp)->seg_next == (struct tcpiphdr *)(tp) && \
- (tp)->t_state == TCPS_ESTABLISHED) { \
- tp->t_flags |= TF_DELACK; \
- (tp)->rcv_nxt += (ti)->ti_len; \
- flags = (ti)->ti_flags & TH_FIN; \
- tcpstat.tcps_rcvpack++;\
- tcpstat.tcps_rcvbyte += (ti)->ti_len;\
- sbappend(&(so)->so_rcv, (m)); \
- sorwakeup(so); \
- } else { \
- (flags) = tcp_reass((tp), (ti), (m)); \
- tp->t_flags |= TF_ACKNOW; \
- } \
-}
-#endif
-#ifndef TUBA_INCLUDE
-
-static int
-tcp_reass(tp, ti, m)
- register struct tcpcb *tp;
- register struct tcpiphdr *ti;
- struct mbuf *m;
-{
- register struct tcpiphdr *q;
- struct socket *so = tp->t_inpcb->inp_socket;
- int flags;
-
- /*
- * Call with ti==0 after become established to
- * force pre-ESTABLISHED data up to user socket.
- */
- if (ti == 0)
- goto present;
-
- /*
- * Find a segment which begins after this one does.
- */
- for (q = tp->seg_next; q != (struct tcpiphdr *)tp;
- q = (struct tcpiphdr *)q->ti_next)
- if (SEQ_GT(q->ti_seq, ti->ti_seq))
- break;
-
- /*
- * If there is a preceding segment, it may provide some of
- * our data already. If so, drop the data from the incoming
- * segment. If it provides all of our data, drop us.
- */
- if ((struct tcpiphdr *)q->ti_prev != (struct tcpiphdr *)tp) {
- register int i;
- q = (struct tcpiphdr *)q->ti_prev;
- /* conversion to int (in i) handles seq wraparound */
- i = q->ti_seq + q->ti_len - ti->ti_seq;
- if (i > 0) {
- if (i >= ti->ti_len) {
- tcpstat.tcps_rcvduppack++;
- tcpstat.tcps_rcvdupbyte += ti->ti_len;
- m_freem(m);
- /*
- * Try to present any queued data
- * at the left window edge to the user.
- * This is needed after the 3-WHS
- * completes.
- */
- goto present; /* ??? */
- }
- m_adj(m, i);
- ti->ti_len -= i;
- ti->ti_seq += i;
- }
- q = (struct tcpiphdr *)(q->ti_next);
- }
- tcpstat.tcps_rcvoopack++;
- tcpstat.tcps_rcvoobyte += ti->ti_len;
- REASS_MBUF(ti) = m; /* XXX */
-
- /*
- * While we overlap succeeding segments trim them or,
- * if they are completely covered, dequeue them.
- */
- while (q != (struct tcpiphdr *)tp) {
- register int i = (ti->ti_seq + ti->ti_len) - q->ti_seq;
- if (i <= 0)
- break;
- if (i < q->ti_len) {
- q->ti_seq += i;
- q->ti_len -= i;
- m_adj(REASS_MBUF(q), i);
- break;
- }
- q = (struct tcpiphdr *)q->ti_next;
- m = REASS_MBUF((struct tcpiphdr *)q->ti_prev);
- remque(q->ti_prev);
- m_freem(m);
- }
-
- /*
- * Stick new segment in its place.
- */
- insque(ti, q->ti_prev);
-
-present:
- /*
- * Present data to user, advancing rcv_nxt through
- * completed sequence space.
- */
- if (!TCPS_HAVEESTABLISHED(tp->t_state))
- return (0);
- ti = tp->seg_next;
- if (ti == (struct tcpiphdr *)tp || ti->ti_seq != tp->rcv_nxt)
- return (0);
- do {
- tp->rcv_nxt += ti->ti_len;
- flags = ti->ti_flags & TH_FIN;
- remque(ti);
- m = REASS_MBUF(ti);
- ti = (struct tcpiphdr *)ti->ti_next;
- if (so->so_state & SS_CANTRCVMORE)
- m_freem(m);
- else
- sbappend(&so->so_rcv, m);
- } while (ti != (struct tcpiphdr *)tp && ti->ti_seq == tp->rcv_nxt);
- sorwakeup(so);
- return (flags);
-}
-
-/*
- * TCP input routine, follows pages 65-76 of the
- * protocol specification dated September, 1981 very closely.
- */
-void
-tcp_input(m, iphlen)
- register struct mbuf *m;
- int iphlen;
-{
- register struct tcpiphdr *ti;
- register struct inpcb *inp;
- u_char *optp = NULL;
- int optlen = 0;
- int len, tlen, off;
- register struct tcpcb *tp = 0;
- register int tiflags;
- struct socket *so = 0;
- int todrop, acked, ourfinisacked, needoutput = 0;
- struct in_addr laddr;
- int dropsocket = 0;
- int iss = 0;
- u_long tiwin;
- struct tcpopt to; /* options in this segment */
- struct rmxp_tao *taop; /* pointer to our TAO cache entry */
- struct rmxp_tao tao_noncached; /* in case there's no cached entry */
-#ifdef TCPDEBUG
- short ostate = 0;
-#endif
-
- bzero((char *)&to, sizeof(to));
-
- tcpstat.tcps_rcvtotal++;
- /*
- * Get IP and TCP header together in first mbuf.
- * Note: IP leaves IP header in first mbuf.
- */
- ti = mtod(m, struct tcpiphdr *);
- if (iphlen > sizeof (struct ip))
- ip_stripoptions(m, (struct mbuf *)0);
- if (m->m_len < sizeof (struct tcpiphdr)) {
- if ((m = m_pullup(m, sizeof (struct tcpiphdr))) == 0) {
- tcpstat.tcps_rcvshort++;
- return;
- }
- ti = mtod(m, struct tcpiphdr *);
- }
-
- /*
- * Checksum extended TCP header and data.
- */
- tlen = ((struct ip *)ti)->ip_len;
- len = sizeof (struct ip) + tlen;
- ti->ti_next = ti->ti_prev = 0;
- ti->ti_x1 = 0;
- ti->ti_len = (u_short)tlen;
- HTONS(ti->ti_len);
- ti->ti_sum = in_cksum(m, len);
- if (ti->ti_sum) {
- tcpstat.tcps_rcvbadsum++;
- goto drop;
- }
-#endif /* TUBA_INCLUDE */
-
- /*
- * Check that TCP offset makes sense,
- * pull out TCP options and adjust length. XXX
- */
- off = ti->ti_off << 2;
- if (off < sizeof (struct tcphdr) || off > tlen) {
- tcpstat.tcps_rcvbadoff++;
- goto drop;
- }
- tlen -= off;
- ti->ti_len = tlen;
- if (off > sizeof (struct tcphdr)) {
- if (m->m_len < sizeof(struct ip) + off) {
- if ((m = m_pullup(m, sizeof (struct ip) + off)) == 0) {
- tcpstat.tcps_rcvshort++;
- return;
- }
- ti = mtod(m, struct tcpiphdr *);
- }
- optlen = off - sizeof (struct tcphdr);
- optp = mtod(m, u_char *) + sizeof (struct tcpiphdr);
- }
- tiflags = ti->ti_flags;
-
- /*
- * Convert TCP protocol specific fields to host format.
- */
- NTOHL(ti->ti_seq);
- NTOHL(ti->ti_ack);
- NTOHS(ti->ti_win);
- NTOHS(ti->ti_urp);
-
- /*
- * Drop TCP, IP headers and TCP options.
- */
- m->m_data += sizeof(struct tcpiphdr)+off-sizeof(struct tcphdr);
- m->m_len -= sizeof(struct tcpiphdr)+off-sizeof(struct tcphdr);
-
- /*
- * Locate pcb for segment.
- */
-findpcb:
- inp = in_pcblookuphash(&tcbinfo, ti->ti_src, ti->ti_sport,
- ti->ti_dst, ti->ti_dport, 1);
-
- /*
- * If the state is CLOSED (i.e., TCB does not exist) then
- * all data in the incoming segment is discarded.
- * If the TCB exists but is in CLOSED state, it is embryonic,
- * but should either do a listen or a connect soon.
- */
- if (inp == NULL) {
- if (log_in_vain && tiflags & TH_SYN) {
- char buf[4*sizeof "123"];
-
- strcpy(buf, inet_ntoa(ti->ti_dst));
- log(LOG_INFO, "Connection attempt to TCP %s:%d"
- " from %s:%d\n",
- buf, ntohs(ti->ti_dport),
- inet_ntoa(ti->ti_src), ntohs(ti->ti_sport));
- }
- goto dropwithreset;
- }
- tp = intotcpcb(inp);
- if (tp == 0)
- goto dropwithreset;
- if (tp->t_state == TCPS_CLOSED)
- goto drop;
-
- /* Unscale the window into a 32-bit value. */
- if ((tiflags & TH_SYN) == 0)
- tiwin = ti->ti_win << tp->snd_scale;
- else
- tiwin = ti->ti_win;
-
- so = inp->inp_socket;
- if (so->so_options & (SO_DEBUG|SO_ACCEPTCONN)) {
-#ifdef TCPDEBUG
- if (so->so_options & SO_DEBUG) {
- ostate = tp->t_state;
- tcp_saveti = *ti;
- }
-#endif
- if (so->so_options & SO_ACCEPTCONN) {
- register struct tcpcb *tp0 = tp;
- struct socket *so2;
- if ((tiflags & (TH_RST|TH_ACK|TH_SYN)) != TH_SYN) {
- /*
- * Note: dropwithreset makes sure we don't
- * send a RST in response to a RST.
- */
- if (tiflags & TH_ACK) {
- tcpstat.tcps_badsyn++;
- goto dropwithreset;
- }
- goto drop;
- }
- so2 = sonewconn(so, 0);
- if (so2 == 0) {
- tcpstat.tcps_listendrop++;
- so2 = sodropablereq(so);
- if (so2) {
- tcp_drop(sototcpcb(so2), ETIMEDOUT);
- so2 = sonewconn(so, 0);
- }
- if (!so2)
- goto drop;
- }
- so = so2;
- /*
- * This is ugly, but ....
- *
- * Mark socket as temporary until we're
- * committed to keeping it. The code at
- * ``drop'' and ``dropwithreset'' check the
- * flag dropsocket to see if the temporary
- * socket created here should be discarded.
- * We mark the socket as discardable until
- * we're committed to it below in TCPS_LISTEN.
- */
- dropsocket++;
- inp = (struct inpcb *)so->so_pcb;
- inp->inp_laddr = ti->ti_dst;
- inp->inp_lport = ti->ti_dport;
- in_pcbrehash(inp);
-#if BSD>=43
- inp->inp_options = ip_srcroute();
-#endif
- tp = intotcpcb(inp);
- tp->t_state = TCPS_LISTEN;
- tp->t_flags |= tp0->t_flags & (TF_NOPUSH|TF_NOOPT);
-
- /* Compute proper scaling value from buffer space */
- while (tp->request_r_scale < TCP_MAX_WINSHIFT &&
- TCP_MAXWIN << tp->request_r_scale < so->so_rcv.sb_hiwat)
- tp->request_r_scale++;
- }
- }
-
- /*
- * Segment received on connection.
- * Reset idle time and keep-alive timer.
- */
- tp->t_idle = 0;
- if (TCPS_HAVEESTABLISHED(tp->t_state))
- tp->t_timer[TCPT_KEEP] = tcp_keepidle;
-
- /*
- * Process options if not in LISTEN state,
- * else do it below (after getting remote address).
- */
- if (tp->t_state != TCPS_LISTEN)
- tcp_dooptions(tp, optp, optlen, ti, &to);
-
- /*
- * Header prediction: check for the two common cases
- * of a uni-directional data xfer. If the packet has
- * no control flags, is in-sequence, the window didn't
- * change and we're not retransmitting, it's a
- * candidate. If the length is zero and the ack moved
- * forward, we're the sender side of the xfer. Just
- * free the data acked & wake any higher level process
- * that was blocked waiting for space. If the length
- * is non-zero and the ack didn't move, we're the
- * receiver side. If we're getting packets in-order
- * (the reassembly queue is empty), add the data to
- * the socket buffer and note that we need a delayed ack.
- * Make sure that the hidden state-flags are also off.
- * Since we check for TCPS_ESTABLISHED above, it can only
- * be TH_NEEDSYN.
- */
- if (tp->t_state == TCPS_ESTABLISHED &&
- (tiflags & (TH_SYN|TH_FIN|TH_RST|TH_URG|TH_ACK)) == TH_ACK &&
- ((tp->t_flags & (TF_NEEDSYN|TF_NEEDFIN)) == 0) &&
- ((to.to_flag & TOF_TS) == 0 ||
- TSTMP_GEQ(to.to_tsval, tp->ts_recent)) &&
- /*
- * Using the CC option is compulsory if once started:
- * the segment is OK if no T/TCP was negotiated or
- * if the segment has a CC option equal to CCrecv
- */
- ((tp->t_flags & (TF_REQ_CC|TF_RCVD_CC)) != (TF_REQ_CC|TF_RCVD_CC) ||
- ((to.to_flag & TOF_CC) != 0 && to.to_cc == tp->cc_recv)) &&
- ti->ti_seq == tp->rcv_nxt &&
- tiwin && tiwin == tp->snd_wnd &&
- tp->snd_nxt == tp->snd_max) {
-
- /*
- * If last ACK falls within this segment's sequence numbers,
- * record the timestamp.
- * NOTE that the test is modified according to the latest
- * proposal of the tcplw@cray.com list (Braden 1993/04/26).
- */
- if ((to.to_flag & TOF_TS) != 0 &&
- SEQ_LEQ(ti->ti_seq, tp->last_ack_sent)) {
- tp->ts_recent_age = tcp_now;
- tp->ts_recent = to.to_tsval;
- }
-
- if (ti->ti_len == 0) {
- if (SEQ_GT(ti->ti_ack, tp->snd_una) &&
- SEQ_LEQ(ti->ti_ack, tp->snd_max) &&
- tp->snd_cwnd >= tp->snd_wnd &&
- tp->t_dupacks < tcprexmtthresh) {
- /*
- * this is a pure ack for outstanding data.
- */
- ++tcpstat.tcps_predack;
- if ((to.to_flag & TOF_TS) != 0)
- tcp_xmit_timer(tp,
- tcp_now - to.to_tsecr + 1);
- else if (tp->t_rtt &&
- SEQ_GT(ti->ti_ack, tp->t_rtseq))
- tcp_xmit_timer(tp, tp->t_rtt);
- acked = ti->ti_ack - tp->snd_una;
- tcpstat.tcps_rcvackpack++;
- tcpstat.tcps_rcvackbyte += acked;
- sbdrop(&so->so_snd, acked);
- tp->snd_una = ti->ti_ack;
- m_freem(m);
-
- /*
- * If all outstanding data are acked, stop
- * retransmit timer, otherwise restart timer
- * using current (possibly backed-off) value.
- * If process is waiting for space,
- * wakeup/selwakeup/signal. If data
- * are ready to send, let tcp_output
- * decide between more output or persist.
- */
- if (tp->snd_una == tp->snd_max)
- tp->t_timer[TCPT_REXMT] = 0;
- else if (tp->t_timer[TCPT_PERSIST] == 0)
- tp->t_timer[TCPT_REXMT] = tp->t_rxtcur;
-
- if (so->so_snd.sb_flags & SB_NOTIFY)
- sowwakeup(so);
- if (so->so_snd.sb_cc)
- (void) tcp_output(tp);
- return;
- }
- } else if (ti->ti_ack == tp->snd_una &&
- tp->seg_next == (struct tcpiphdr *)tp &&
- ti->ti_len <= sbspace(&so->so_rcv)) {
- /*
- * this is a pure, in-sequence data packet
- * with nothing on the reassembly queue and
- * we have enough buffer space to take it.
- */
- ++tcpstat.tcps_preddat;
- tp->rcv_nxt += ti->ti_len;
- tcpstat.tcps_rcvpack++;
- tcpstat.tcps_rcvbyte += ti->ti_len;
- /*
- * Add data to socket buffer.
- */
- sbappend(&so->so_rcv, m);
- sorwakeup(so);
-#ifdef TCP_ACK_HACK
- /*
- * If this is a short packet, then ACK now - with Nagel
- * congestion avoidance sender won't send more until
- * he gets an ACK.
- */
- if (tiflags & TH_PUSH) {
- tp->t_flags |= TF_ACKNOW;
- tcp_output(tp);
- } else {
- tp->t_flags |= TF_DELACK;
- }
-#else
- tp->t_flags |= TF_DELACK;
-#endif
- return;
- }
- }
-
- /*
- * Calculate amount of space in receive window,
- * and then do TCP input processing.
- * Receive window is amount of space in rcv queue,
- * but not less than advertised window.
- */
- { int win;
-
- win = sbspace(&so->so_rcv);
- if (win < 0)
- win = 0;
- tp->rcv_wnd = imax(win, (int)(tp->rcv_adv - tp->rcv_nxt));
- }
-
- switch (tp->t_state) {
-
- /*
- * If the state is LISTEN then ignore segment if it contains an RST.
- * If the segment contains an ACK then it is bad and send a RST.
- * If it does not contain a SYN then it is not interesting; drop it.
- * If it is from this socket, drop it, it must be forged.
- * Don't bother responding if the destination was a broadcast.
- * Otherwise initialize tp->rcv_nxt, and tp->irs, select an initial
- * tp->iss, and send a segment:
- * <SEQ=ISS><ACK=RCV_NXT><CTL=SYN,ACK>
- * Also initialize tp->snd_nxt to tp->iss+1 and tp->snd_una to tp->iss.
- * Fill in remote peer address fields if not previously specified.
- * Enter SYN_RECEIVED state, and process any other fields of this
- * segment in this state.
- */
- case TCPS_LISTEN: {
- struct mbuf *am;
- register struct sockaddr_in *sin;
-
- if (tiflags & TH_RST)
- goto drop;
- if (tiflags & TH_ACK)
- goto dropwithreset;
- if ((tiflags & TH_SYN) == 0)
- goto drop;
- if ((ti->ti_dport == ti->ti_sport) &&
- (ti->ti_dst.s_addr == ti->ti_src.s_addr))
- goto drop;
- /*
- * RFC1122 4.2.3.10, p. 104: discard bcast/mcast SYN
- * in_broadcast() should never return true on a received
- * packet with M_BCAST not set.
- */
- if (m->m_flags & (M_BCAST|M_MCAST) ||
- IN_MULTICAST(ntohl(ti->ti_dst.s_addr)))
- goto drop;
- am = m_get(M_DONTWAIT, MT_SONAME); /* XXX */
- if (am == NULL)
- goto drop;
- am->m_len = sizeof (struct sockaddr_in);
- sin = mtod(am, struct sockaddr_in *);
- sin->sin_family = AF_INET;
- sin->sin_len = sizeof(*sin);
- sin->sin_addr = ti->ti_src;
- sin->sin_port = ti->ti_sport;
- bzero((caddr_t)sin->sin_zero, sizeof(sin->sin_zero));
- laddr = inp->inp_laddr;
- if (inp->inp_laddr.s_addr == INADDR_ANY)
- inp->inp_laddr = ti->ti_dst;
- if (in_pcbconnect(inp, am)) {
- inp->inp_laddr = laddr;
- (void) m_free(am);
- goto drop;
- }
- (void) m_free(am);
- tp->t_template = tcp_template(tp);
- if (tp->t_template == 0) {
- tp = tcp_drop(tp, ENOBUFS);
- dropsocket = 0; /* socket is already gone */
- goto drop;
- }
- if ((taop = tcp_gettaocache(inp)) == NULL) {
- taop = &tao_noncached;
- bzero(taop, sizeof(*taop));
- }
- tcp_dooptions(tp, optp, optlen, ti, &to);
- if (iss)
- tp->iss = iss;
- else
- tp->iss = tcp_iss;
- tcp_iss += TCP_ISSINCR/4;
- tp->irs = ti->ti_seq;
- tcp_sendseqinit(tp);
- tcp_rcvseqinit(tp);
- /*
- * Initialization of the tcpcb for transaction;
- * set SND.WND = SEG.WND,
- * initialize CCsend and CCrecv.
- */
- tp->snd_wnd = tiwin; /* initial send-window */
- tp->cc_send = CC_INC(tcp_ccgen);
- tp->cc_recv = to.to_cc;
- /*
- * Perform TAO test on incoming CC (SEG.CC) option, if any.
- * - compare SEG.CC against cached CC from the same host,
- * if any.
- * - if SEG.CC > chached value, SYN must be new and is accepted
- * immediately: save new CC in the cache, mark the socket
- * connected, enter ESTABLISHED state, turn on flag to
- * send a SYN in the next segment.
- * A virtual advertised window is set in rcv_adv to
- * initialize SWS prevention. Then enter normal segment
- * processing: drop SYN, process data and FIN.
- * - otherwise do a normal 3-way handshake.
- */
- if ((to.to_flag & TOF_CC) != 0) {
- if (taop->tao_cc != 0 && CC_GT(to.to_cc, taop->tao_cc)) {
- taop->tao_cc = to.to_cc;
- tp->t_state = TCPS_ESTABLISHED;
-
- /*
- * If there is a FIN, or if there is data and the
- * connection is local, then delay SYN,ACK(SYN) in
- * the hope of piggy-backing it on a response
- * segment. Otherwise must send ACK now in case
- * the other side is slow starting.
- */
- if ((tiflags & TH_FIN) || (ti->ti_len != 0 &&
- in_localaddr(inp->inp_faddr)))
- tp->t_flags |= (TF_DELACK | TF_NEEDSYN);
- else
- tp->t_flags |= (TF_ACKNOW | TF_NEEDSYN);
-
- /*
- * Limit the `virtual advertised window' to TCP_MAXWIN
- * here. Even if we requested window scaling, it will
- * become effective only later when our SYN is acked.
- */
- tp->rcv_adv += min(tp->rcv_wnd, TCP_MAXWIN);
- tcpstat.tcps_connects++;
- soisconnected(so);
- tp->t_timer[TCPT_KEEP] = tcp_keepinit;
- dropsocket = 0; /* committed to socket */
- tcpstat.tcps_accepts++;
- goto trimthenstep6;
- }
- /* else do standard 3-way handshake */
- } else {
- /*
- * No CC option, but maybe CC.NEW:
- * invalidate cached value.
- */
- taop->tao_cc = 0;
- }
- /*
- * TAO test failed or there was no CC option,
- * do a standard 3-way handshake.
- */
- tp->t_flags |= TF_ACKNOW;
- tp->t_state = TCPS_SYN_RECEIVED;
- tp->t_timer[TCPT_KEEP] = tcp_keepinit;
- dropsocket = 0; /* committed to socket */
- tcpstat.tcps_accepts++;
- goto trimthenstep6;
- }
-
- /*
- * If the state is SYN_RECEIVED:
- * if seg contains SYN/ACK, send a RST.
- * if seg contains an ACK, but not for our SYN/ACK, send a RST.
- */
- case TCPS_SYN_RECEIVED:
- if (tiflags & TH_ACK) {
- if (tiflags & TH_SYN) {
- tcpstat.tcps_badsyn++;
- goto dropwithreset;
- }
- if (SEQ_LEQ(ti->ti_ack, tp->snd_una) ||
- SEQ_GT(ti->ti_ack, tp->snd_max))
- goto dropwithreset;
- }
- break;
-
- /*
- * If the state is SYN_SENT:
- * if seg contains an ACK, but not for our SYN, drop the input.
- * if seg contains a RST, then drop the connection.
- * if seg does not contain SYN, then drop it.
- * Otherwise this is an acceptable SYN segment
- * initialize tp->rcv_nxt and tp->irs
- * if seg contains ack then advance tp->snd_una
- * if SYN has been acked change to ESTABLISHED else SYN_RCVD state
- * arrange for segment to be acked (eventually)
- * continue processing rest of data/controls, beginning with URG
- */
- case TCPS_SYN_SENT:
- if ((taop = tcp_gettaocache(inp)) == NULL) {
- taop = &tao_noncached;
- bzero(taop, sizeof(*taop));
- }
-
- if ((tiflags & TH_ACK) &&
- (SEQ_LEQ(ti->ti_ack, tp->iss) ||
- SEQ_GT(ti->ti_ack, tp->snd_max))) {
- /*
- * If we have a cached CCsent for the remote host,
- * hence we haven't just crashed and restarted,
- * do not send a RST. This may be a retransmission
- * from the other side after our earlier ACK was lost.
- * Our new SYN, when it arrives, will serve as the
- * needed ACK.
- */
- if (taop->tao_ccsent != 0)
- goto drop;
- else
- goto dropwithreset;
- }
- if (tiflags & TH_RST) {
- if (tiflags & TH_ACK)
- tp = tcp_drop(tp, ECONNREFUSED);
- goto drop;
- }
- if ((tiflags & TH_SYN) == 0)
- goto drop;
- tp->snd_wnd = ti->ti_win; /* initial send window */
- tp->cc_recv = to.to_cc; /* foreign CC */
-
- tp->irs = ti->ti_seq;
- tcp_rcvseqinit(tp);
- if (tiflags & TH_ACK) {
- /*
- * Our SYN was acked. If segment contains CC.ECHO
- * option, check it to make sure this segment really
- * matches our SYN. If not, just drop it as old
- * duplicate, but send an RST if we're still playing
- * by the old rules. If no CC.ECHO option, make sure
- * we don't get fooled into using T/TCP.
- */
- if (to.to_flag & TOF_CCECHO) {
- if (tp->cc_send != to.to_ccecho) {
- if (taop->tao_ccsent != 0)
- goto drop;
- else
- goto dropwithreset;
- }
- } else
- tp->t_flags &= ~TF_RCVD_CC;
- tcpstat.tcps_connects++;
- soisconnected(so);
- /* Do window scaling on this connection? */
- if ((tp->t_flags & (TF_RCVD_SCALE|TF_REQ_SCALE)) ==
- (TF_RCVD_SCALE|TF_REQ_SCALE)) {
- tp->snd_scale = tp->requested_s_scale;
- tp->rcv_scale = tp->request_r_scale;
- }
- /* Segment is acceptable, update cache if undefined. */
- if (taop->tao_ccsent == 0)
- taop->tao_ccsent = to.to_ccecho;
-
- tp->rcv_adv += tp->rcv_wnd;
- tp->snd_una++; /* SYN is acked */
- /*
- * If there's data, delay ACK; if there's also a FIN
- * ACKNOW will be turned on later.
- */
- if (ti->ti_len != 0)
- tp->t_flags |= TF_DELACK;
- else
- tp->t_flags |= TF_ACKNOW;
- /*
- * Received <SYN,ACK> in SYN_SENT[*] state.
- * Transitions:
- * SYN_SENT --> ESTABLISHED
- * SYN_SENT* --> FIN_WAIT_1
- */
- if (tp->t_flags & TF_NEEDFIN) {
- tp->t_state = TCPS_FIN_WAIT_1;
- tp->t_flags &= ~TF_NEEDFIN;
- tiflags &= ~TH_SYN;
- } else {
- tp->t_state = TCPS_ESTABLISHED;
- tp->t_timer[TCPT_KEEP] = tcp_keepidle;
- }
- } else {
- /*
- * Received initial SYN in SYN-SENT[*] state => simul-
- * taneous open. If segment contains CC option and there is
- * a cached CC, apply TAO test; if it succeeds, connection is
- * half-synchronized. Otherwise, do 3-way handshake:
- * SYN-SENT -> SYN-RECEIVED
- * SYN-SENT* -> SYN-RECEIVED*
- * If there was no CC option, clear cached CC value.
- */
- tp->t_flags |= TF_ACKNOW;
- tp->t_timer[TCPT_REXMT] = 0;
- if (to.to_flag & TOF_CC) {
- if (taop->tao_cc != 0 &&
- CC_GT(to.to_cc, taop->tao_cc)) {
- /*
- * update cache and make transition:
- * SYN-SENT -> ESTABLISHED*
- * SYN-SENT* -> FIN-WAIT-1*
- */
- taop->tao_cc = to.to_cc;
- if (tp->t_flags & TF_NEEDFIN) {
- tp->t_state = TCPS_FIN_WAIT_1;
- tp->t_flags &= ~TF_NEEDFIN;
- } else {
- tp->t_state = TCPS_ESTABLISHED;
- tp->t_timer[TCPT_KEEP] = tcp_keepidle;
- }
- tp->t_flags |= TF_NEEDSYN;
- } else
- tp->t_state = TCPS_SYN_RECEIVED;
- } else {
- /* CC.NEW or no option => invalidate cache */
- taop->tao_cc = 0;
- tp->t_state = TCPS_SYN_RECEIVED;
- }
- }
-
-trimthenstep6:
- /*
- * Advance ti->ti_seq to correspond to first data byte.
- * If data, trim to stay within window,
- * dropping FIN if necessary.
- */
- ti->ti_seq++;
- if (ti->ti_len > tp->rcv_wnd) {
- todrop = ti->ti_len - tp->rcv_wnd;
- m_adj(m, -todrop);
- ti->ti_len = tp->rcv_wnd;
- tiflags &= ~TH_FIN;
- tcpstat.tcps_rcvpackafterwin++;
- tcpstat.tcps_rcvbyteafterwin += todrop;
- }
- tp->snd_wl1 = ti->ti_seq - 1;
- tp->rcv_up = ti->ti_seq;
- /*
- * Client side of transaction: already sent SYN and data.
- * If the remote host used T/TCP to validate the SYN,
- * our data will be ACK'd; if so, enter normal data segment
- * processing in the middle of step 5, ack processing.
- * Otherwise, goto step 6.
- */
- if (tiflags & TH_ACK)
- goto process_ACK;
- goto step6;
- /*
- * If the state is LAST_ACK or CLOSING or TIME_WAIT:
- * if segment contains a SYN and CC [not CC.NEW] option:
- * if state == TIME_WAIT and connection duration > MSL,
- * drop packet and send RST;
- *
- * if SEG.CC > CCrecv then is new SYN, and can implicitly
- * ack the FIN (and data) in retransmission queue.
- * Complete close and delete TCPCB. Then reprocess
- * segment, hoping to find new TCPCB in LISTEN state;
- *
- * else must be old SYN; drop it.
- * else do normal processing.
- */
- case TCPS_LAST_ACK:
- case TCPS_CLOSING:
- case TCPS_TIME_WAIT:
- if ((tiflags & TH_SYN) &&
- (to.to_flag & TOF_CC) && tp->cc_recv != 0) {
- if (tp->t_state == TCPS_TIME_WAIT &&
- tp->t_duration > TCPTV_MSL)
- goto dropwithreset;
- if (CC_GT(to.to_cc, tp->cc_recv)) {
- tp = tcp_close(tp);
- goto findpcb;
- }
- else
- goto drop;
- }
- break; /* continue normal processing */
- }
-
- /*
- * States other than LISTEN or SYN_SENT.
- * First check timestamp, if present.
- * Then check the connection count, if present.
- * Then check that at least some bytes of segment are within
- * receive window. If segment begins before rcv_nxt,
- * drop leading data (and SYN); if nothing left, just ack.
- *
- * RFC 1323 PAWS: If we have a timestamp reply on this segment
- * and it's less than ts_recent, drop it.
- */
- if ((to.to_flag & TOF_TS) != 0 && (tiflags & TH_RST) == 0 &&
- tp->ts_recent && TSTMP_LT(to.to_tsval, tp->ts_recent)) {
-
- /* Check to see if ts_recent is over 24 days old. */
- if ((int)(tcp_now - tp->ts_recent_age) > TCP_PAWS_IDLE) {
- /*
- * Invalidate ts_recent. If this segment updates
- * ts_recent, the age will be reset later and ts_recent
- * will get a valid value. If it does not, setting
- * ts_recent to zero will at least satisfy the
- * requirement that zero be placed in the timestamp
- * echo reply when ts_recent isn't valid. The
- * age isn't reset until we get a valid ts_recent
- * because we don't want out-of-order segments to be
- * dropped when ts_recent is old.
- */
- tp->ts_recent = 0;
- } else {
- tcpstat.tcps_rcvduppack++;
- tcpstat.tcps_rcvdupbyte += ti->ti_len;
- tcpstat.tcps_pawsdrop++;
- goto dropafterack;
- }
- }
-
- /*
- * T/TCP mechanism
- * If T/TCP was negotiated and the segment doesn't have CC,
- * or if it's CC is wrong then drop the segment.
- * RST segments do not have to comply with this.
- */
- if ((tp->t_flags & (TF_REQ_CC|TF_RCVD_CC)) == (TF_REQ_CC|TF_RCVD_CC) &&
- ((to.to_flag & TOF_CC) == 0 || tp->cc_recv != to.to_cc) &&
- (tiflags & TH_RST) == 0)
- goto dropafterack;
-
- todrop = tp->rcv_nxt - ti->ti_seq;
- if (todrop > 0) {
- if (tiflags & TH_SYN) {
- tiflags &= ~TH_SYN;
- ti->ti_seq++;
- if (ti->ti_urp > 1)
- ti->ti_urp--;
- else
- tiflags &= ~TH_URG;
- todrop--;
- }
- /*
- * Following if statement from Stevens, vol. 2, p. 960.
- */
- if (todrop > ti->ti_len
- || (todrop == ti->ti_len && (tiflags & TH_FIN) == 0)) {
- /*
- * Any valid FIN must be to the left of the window.
- * At this point the FIN must be a duplicate or out
- * of sequence; drop it.
- */
- tiflags &= ~TH_FIN;
-
- /*
- * Send an ACK to resynchronize and drop any data.
- * But keep on processing for RST or ACK.
- */
- tp->t_flags |= TF_ACKNOW;
- todrop = ti->ti_len;
- tcpstat.tcps_rcvduppack++;
- tcpstat.tcps_rcvdupbyte += todrop;
- } else {
- tcpstat.tcps_rcvpartduppack++;
- tcpstat.tcps_rcvpartdupbyte += todrop;
- }
- m_adj(m, todrop);
- ti->ti_seq += todrop;
- ti->ti_len -= todrop;
- if (ti->ti_urp > todrop)
- ti->ti_urp -= todrop;
- else {
- tiflags &= ~TH_URG;
- ti->ti_urp = 0;
- }
- }
-
- /*
- * If new data are received on a connection after the
- * user processes are gone, then RST the other end.
- */
- if ((so->so_state & SS_NOFDREF) &&
- tp->t_state > TCPS_CLOSE_WAIT && ti->ti_len) {
- tp = tcp_close(tp);
- tcpstat.tcps_rcvafterclose++;
- goto dropwithreset;
- }
-
- /*
- * If segment ends after window, drop trailing data
- * (and PUSH and FIN); if nothing left, just ACK.
- */
- todrop = (ti->ti_seq+ti->ti_len) - (tp->rcv_nxt+tp->rcv_wnd);
- if (todrop > 0) {
- tcpstat.tcps_rcvpackafterwin++;
- if (todrop >= ti->ti_len) {
- tcpstat.tcps_rcvbyteafterwin += ti->ti_len;
- /*
- * If a new connection request is received
- * while in TIME_WAIT, drop the old connection
- * and start over if the sequence numbers
- * are above the previous ones.
- */
- if (tiflags & TH_SYN &&
- tp->t_state == TCPS_TIME_WAIT &&
- SEQ_GT(ti->ti_seq, tp->rcv_nxt)) {
- iss = tp->rcv_nxt + TCP_ISSINCR;
- tp = tcp_close(tp);
- goto findpcb;
- }
- /*
- * If window is closed can only take segments at
- * window edge, and have to drop data and PUSH from
- * incoming segments. Continue processing, but
- * remember to ack. Otherwise, drop segment
- * and ack.
- */
- if (tp->rcv_wnd == 0 && ti->ti_seq == tp->rcv_nxt) {
- tp->t_flags |= TF_ACKNOW;
- tcpstat.tcps_rcvwinprobe++;
- } else
- goto dropafterack;
- } else
- tcpstat.tcps_rcvbyteafterwin += todrop;
- m_adj(m, -todrop);
- ti->ti_len -= todrop;
- tiflags &= ~(TH_PUSH|TH_FIN);
- }
-
- /*
- * If last ACK falls within this segment's sequence numbers,
- * record its timestamp.
- * NOTE that the test is modified according to the latest
- * proposal of the tcplw@cray.com list (Braden 1993/04/26).
- */
- if ((to.to_flag & TOF_TS) != 0 &&
- SEQ_LEQ(ti->ti_seq, tp->last_ack_sent)) {
- tp->ts_recent_age = tcp_now;
- tp->ts_recent = to.to_tsval;
- }
-
- /*
- * If the RST bit is set examine the state:
- * SYN_RECEIVED STATE:
- * If passive open, return to LISTEN state.
- * If active open, inform user that connection was refused.
- * ESTABLISHED, FIN_WAIT_1, FIN_WAIT2, CLOSE_WAIT STATES:
- * Inform user that connection was reset, and close tcb.
- * CLOSING, LAST_ACK, TIME_WAIT STATES
- * Close the tcb.
- */
- if (tiflags&TH_RST) switch (tp->t_state) {
-
- case TCPS_SYN_RECEIVED:
- so->so_error = ECONNREFUSED;
- goto close;
-
- case TCPS_ESTABLISHED:
- case TCPS_FIN_WAIT_1:
- case TCPS_FIN_WAIT_2:
- case TCPS_CLOSE_WAIT:
- so->so_error = ECONNRESET;
- close:
- tp->t_state = TCPS_CLOSED;
- tcpstat.tcps_drops++;
- tp = tcp_close(tp);
- goto drop;
-
- case TCPS_CLOSING:
- case TCPS_LAST_ACK:
- case TCPS_TIME_WAIT:
- tp = tcp_close(tp);
- goto drop;
- }
-
- /*
- * If a SYN is in the window, then this is an
- * error and we send an RST and drop the connection.
- */
- if (tiflags & TH_SYN) {
- tp = tcp_drop(tp, ECONNRESET);
- goto dropwithreset;
- }
-
- /*
- * If the ACK bit is off: if in SYN-RECEIVED state or SENDSYN
- * flag is on (half-synchronized state), then queue data for
- * later processing; else drop segment and return.
- */
- if ((tiflags & TH_ACK) == 0) {
- if (tp->t_state == TCPS_SYN_RECEIVED ||
- (tp->t_flags & TF_NEEDSYN))
- goto step6;
- else
- goto drop;
- }
-
- /*
- * Ack processing.
- */
- switch (tp->t_state) {
-
- /*
- * In SYN_RECEIVED state, the ack ACKs our SYN, so enter
- * ESTABLISHED state and continue processing.
- * The ACK was checked above.
- */
- case TCPS_SYN_RECEIVED:
-
- tcpstat.tcps_connects++;
- soisconnected(so);
- /* Do window scaling? */
- if ((tp->t_flags & (TF_RCVD_SCALE|TF_REQ_SCALE)) ==
- (TF_RCVD_SCALE|TF_REQ_SCALE)) {
- tp->snd_scale = tp->requested_s_scale;
- tp->rcv_scale = tp->request_r_scale;
- }
- /*
- * Upon successful completion of 3-way handshake,
- * update cache.CC if it was undefined, pass any queued
- * data to the user, and advance state appropriately.
- */
- if ((taop = tcp_gettaocache(inp)) != NULL &&
- taop->tao_cc == 0)
- taop->tao_cc = tp->cc_recv;
-
- /*
- * Make transitions:
- * SYN-RECEIVED -> ESTABLISHED
- * SYN-RECEIVED* -> FIN-WAIT-1
- */
- if (tp->t_flags & TF_NEEDFIN) {
- tp->t_state = TCPS_FIN_WAIT_1;
- tp->t_flags &= ~TF_NEEDFIN;
- } else {
- tp->t_state = TCPS_ESTABLISHED;
- tp->t_timer[TCPT_KEEP] = tcp_keepidle;
- }
- /*
- * If segment contains data or ACK, will call tcp_reass()
- * later; if not, do so now to pass queued data to user.
- */
- if (ti->ti_len == 0 && (tiflags & TH_FIN) == 0)
- (void) tcp_reass(tp, (struct tcpiphdr *)0,
- (struct mbuf *)0);
- tp->snd_wl1 = ti->ti_seq - 1;
- /* fall into ... */
-
- /*
- * In ESTABLISHED state: drop duplicate ACKs; ACK out of range
- * ACKs. If the ack is in the range
- * tp->snd_una < ti->ti_ack <= tp->snd_max
- * then advance tp->snd_una to ti->ti_ack and drop
- * data from the retransmission queue. If this ACK reflects
- * more up to date window information we update our window information.
- */
- case TCPS_ESTABLISHED:
- case TCPS_FIN_WAIT_1:
- case TCPS_FIN_WAIT_2:
- case TCPS_CLOSE_WAIT:
- case TCPS_CLOSING:
- case TCPS_LAST_ACK:
- case TCPS_TIME_WAIT:
-
- if (SEQ_LEQ(ti->ti_ack, tp->snd_una)) {
- if (ti->ti_len == 0 && tiwin == tp->snd_wnd) {
- tcpstat.tcps_rcvdupack++;
- /*
- * If we have outstanding data (other than
- * a window probe), this is a completely
- * duplicate ack (ie, window info didn't
- * change), the ack is the biggest we've
- * seen and we've seen exactly our rexmt
- * threshhold of them, assume a packet
- * has been dropped and retransmit it.
- * Kludge snd_nxt & the congestion
- * window so we send only this one
- * packet.
- *
- * We know we're losing at the current
- * window size so do congestion avoidance
- * (set ssthresh to half the current window
- * and pull our congestion window back to
- * the new ssthresh).
- *
- * Dup acks mean that packets have left the
- * network (they're now cached at the receiver)
- * so bump cwnd by the amount in the receiver
- * to keep a constant cwnd packets in the
- * network.
- */
- if (tp->t_timer[TCPT_REXMT] == 0 ||
- ti->ti_ack != tp->snd_una)
- tp->t_dupacks = 0;
- else if (++tp->t_dupacks == tcprexmtthresh) {
- tcp_seq onxt = tp->snd_nxt;
- u_int win =
- min(tp->snd_wnd, tp->snd_cwnd) / 2 /
- tp->t_maxseg;
-
- if (win < 2)
- win = 2;
- tp->snd_ssthresh = win * tp->t_maxseg;
- tp->t_timer[TCPT_REXMT] = 0;
- tp->t_rtt = 0;
- tp->snd_nxt = ti->ti_ack;
- tp->snd_cwnd = tp->t_maxseg;
- (void) tcp_output(tp);
- tp->snd_cwnd = tp->snd_ssthresh +
- tp->t_maxseg * tp->t_dupacks;
- if (SEQ_GT(onxt, tp->snd_nxt))
- tp->snd_nxt = onxt;
- goto drop;
- } else if (tp->t_dupacks > tcprexmtthresh) {
- tp->snd_cwnd += tp->t_maxseg;
- (void) tcp_output(tp);
- goto drop;
- }
- } else
- tp->t_dupacks = 0;
- break;
- }
- /*
- * If the congestion window was inflated to account
- * for the other side's cached packets, retract it.
- */
- if (tp->t_dupacks >= tcprexmtthresh &&
- tp->snd_cwnd > tp->snd_ssthresh)
- tp->snd_cwnd = tp->snd_ssthresh;
- tp->t_dupacks = 0;
- if (SEQ_GT(ti->ti_ack, tp->snd_max)) {
- tcpstat.tcps_rcvacktoomuch++;
- goto dropafterack;
- }
- /*
- * If we reach this point, ACK is not a duplicate,
- * i.e., it ACKs something we sent.
- */
- if (tp->t_flags & TF_NEEDSYN) {
- /*
- * T/TCP: Connection was half-synchronized, and our
- * SYN has been ACK'd (so connection is now fully
- * synchronized). Go to non-starred state,
- * increment snd_una for ACK of SYN, and check if
- * we can do window scaling.
- */
- tp->t_flags &= ~TF_NEEDSYN;
- tp->snd_una++;
- /* Do window scaling? */
- if ((tp->t_flags & (TF_RCVD_SCALE|TF_REQ_SCALE)) ==
- (TF_RCVD_SCALE|TF_REQ_SCALE)) {
- tp->snd_scale = tp->requested_s_scale;
- tp->rcv_scale = tp->request_r_scale;
- }
- }
-
-process_ACK:
- acked = ti->ti_ack - tp->snd_una;
- tcpstat.tcps_rcvackpack++;
- tcpstat.tcps_rcvackbyte += acked;
-
- /*
- * If we have a timestamp reply, update smoothed
- * round trip time. If no timestamp is present but
- * transmit timer is running and timed sequence
- * number was acked, update smoothed round trip time.
- * Since we now have an rtt measurement, cancel the
- * timer backoff (cf., Phil Karn's retransmit alg.).
- * Recompute the initial retransmit timer.
- */
- if (to.to_flag & TOF_TS)
- tcp_xmit_timer(tp, tcp_now - to.to_tsecr + 1);
- else if (tp->t_rtt && SEQ_GT(ti->ti_ack, tp->t_rtseq))
- tcp_xmit_timer(tp,tp->t_rtt);
-
- /*
- * If all outstanding data is acked, stop retransmit
- * timer and remember to restart (more output or persist).
- * If there is more data to be acked, restart retransmit
- * timer, using current (possibly backed-off) value.
- */
- if (ti->ti_ack == tp->snd_max) {
- tp->t_timer[TCPT_REXMT] = 0;
- needoutput = 1;
- } else if (tp->t_timer[TCPT_PERSIST] == 0)
- tp->t_timer[TCPT_REXMT] = tp->t_rxtcur;
-
- /*
- * If no data (only SYN) was ACK'd,
- * skip rest of ACK processing.
- */
- if (acked == 0)
- goto step6;
-
- /*
- * When new data is acked, open the congestion window.
- * If the window gives us less than ssthresh packets
- * in flight, open exponentially (maxseg per packet).
- * Otherwise open linearly: maxseg per window
- * (maxseg^2 / cwnd per packet).
- */
- {
- register u_int cw = tp->snd_cwnd;
- register u_int incr = tp->t_maxseg;
-
- if (cw > tp->snd_ssthresh)
- incr = incr * incr / cw;
- tp->snd_cwnd = min(cw + incr, TCP_MAXWIN<<tp->snd_scale);
- }
- if (acked > so->so_snd.sb_cc) {
- tp->snd_wnd -= so->so_snd.sb_cc;
- sbdrop(&so->so_snd, (int)so->so_snd.sb_cc);
- ourfinisacked = 1;
- } else {
- sbdrop(&so->so_snd, acked);
- tp->snd_wnd -= acked;
- ourfinisacked = 0;
- }
- if (so->so_snd.sb_flags & SB_NOTIFY)
- sowwakeup(so);
- tp->snd_una = ti->ti_ack;
- if (SEQ_LT(tp->snd_nxt, tp->snd_una))
- tp->snd_nxt = tp->snd_una;
-
- switch (tp->t_state) {
-
- /*
- * In FIN_WAIT_1 STATE in addition to the processing
- * for the ESTABLISHED state if our FIN is now acknowledged
- * then enter FIN_WAIT_2.
- */
- case TCPS_FIN_WAIT_1:
- if (ourfinisacked) {
- /*
- * If we can't receive any more
- * data, then closing user can proceed.
- * Starting the timer is contrary to the
- * specification, but if we don't get a FIN
- * we'll hang forever.
- */
- if (so->so_state & SS_CANTRCVMORE) {
- soisdisconnected(so);
- tp->t_timer[TCPT_2MSL] = tcp_maxidle;
- }
- tp->t_state = TCPS_FIN_WAIT_2;
- }
- break;
-
- /*
- * In CLOSING STATE in addition to the processing for
- * the ESTABLISHED state if the ACK acknowledges our FIN
- * then enter the TIME-WAIT state, otherwise ignore
- * the segment.
- */
- case TCPS_CLOSING:
- if (ourfinisacked) {
- tp->t_state = TCPS_TIME_WAIT;
- tcp_canceltimers(tp);
- /* Shorten TIME_WAIT [RFC-1644, p.28] */
- if (tp->cc_recv != 0 &&
- tp->t_duration < TCPTV_MSL)
- tp->t_timer[TCPT_2MSL] =
- tp->t_rxtcur * TCPTV_TWTRUNC;
- else
- tp->t_timer[TCPT_2MSL] = 2 * TCPTV_MSL;
- soisdisconnected(so);
- }
- break;
-
- /*
- * In LAST_ACK, we may still be waiting for data to drain
- * and/or to be acked, as well as for the ack of our FIN.
- * If our FIN is now acknowledged, delete the TCB,
- * enter the closed state and return.
- */
- case TCPS_LAST_ACK:
- if (ourfinisacked) {
- tp = tcp_close(tp);
- goto drop;
- }
- break;
-
- /*
- * In TIME_WAIT state the only thing that should arrive
- * is a retransmission of the remote FIN. Acknowledge
- * it and restart the finack timer.
- */
- case TCPS_TIME_WAIT:
- tp->t_timer[TCPT_2MSL] = 2 * TCPTV_MSL;
- goto dropafterack;
- }
- }
-
-step6:
- /*
- * Update window information.
- * Don't look at window if no ACK: TAC's send garbage on first SYN.
- */
- if ((tiflags & TH_ACK) &&
- (SEQ_LT(tp->snd_wl1, ti->ti_seq) ||
- (tp->snd_wl1 == ti->ti_seq && (SEQ_LT(tp->snd_wl2, ti->ti_ack) ||
- (tp->snd_wl2 == ti->ti_ack && tiwin > tp->snd_wnd))))) {
- /* keep track of pure window updates */
- if (ti->ti_len == 0 &&
- tp->snd_wl2 == ti->ti_ack && tiwin > tp->snd_wnd)
- tcpstat.tcps_rcvwinupd++;
- tp->snd_wnd = tiwin;
- tp->snd_wl1 = ti->ti_seq;
- tp->snd_wl2 = ti->ti_ack;
- if (tp->snd_wnd > tp->max_sndwnd)
- tp->max_sndwnd = tp->snd_wnd;
- needoutput = 1;
- }
-
- /*
- * Process segments with URG.
- */
- if ((tiflags & TH_URG) && ti->ti_urp &&
- TCPS_HAVERCVDFIN(tp->t_state) == 0) {
- /*
- * This is a kludge, but if we receive and accept
- * random urgent pointers, we'll crash in
- * soreceive. It's hard to imagine someone
- * actually wanting to send this much urgent data.
- */
- if (ti->ti_urp + so->so_rcv.sb_cc > sb_max) {
- ti->ti_urp = 0; /* XXX */
- tiflags &= ~TH_URG; /* XXX */
- goto dodata; /* XXX */
- }
- /*
- * If this segment advances the known urgent pointer,
- * then mark the data stream. This should not happen
- * in CLOSE_WAIT, CLOSING, LAST_ACK or TIME_WAIT STATES since
- * a FIN has been received from the remote side.
- * In these states we ignore the URG.
- *
- * According to RFC961 (Assigned Protocols),
- * the urgent pointer points to the last octet
- * of urgent data. We continue, however,
- * to consider it to indicate the first octet
- * of data past the urgent section as the original
- * spec states (in one of two places).
- */
- if (SEQ_GT(ti->ti_seq+ti->ti_urp, tp->rcv_up)) {
- tp->rcv_up = ti->ti_seq + ti->ti_urp;
- so->so_oobmark = so->so_rcv.sb_cc +
- (tp->rcv_up - tp->rcv_nxt) - 1;
- if (so->so_oobmark == 0)
- so->so_state |= SS_RCVATMARK;
- sohasoutofband(so);
- tp->t_oobflags &= ~(TCPOOB_HAVEDATA | TCPOOB_HADDATA);
- }
- /*
- * Remove out of band data so doesn't get presented to user.
- * This can happen independent of advancing the URG pointer,
- * but if two URG's are pending at once, some out-of-band
- * data may creep in... ick.
- */
- if (ti->ti_urp <= (u_long)ti->ti_len
-#ifdef SO_OOBINLINE
- && (so->so_options & SO_OOBINLINE) == 0
-#endif
- )
- tcp_pulloutofband(so, ti, m);
- } else
- /*
- * If no out of band data is expected,
- * pull receive urgent pointer along
- * with the receive window.
- */
- if (SEQ_GT(tp->rcv_nxt, tp->rcv_up))
- tp->rcv_up = tp->rcv_nxt;
-dodata: /* XXX */
-
- /*
- * Process the segment text, merging it into the TCP sequencing queue,
- * and arranging for acknowledgment of receipt if necessary.
- * This process logically involves adjusting tp->rcv_wnd as data
- * is presented to the user (this happens in tcp_usrreq.c,
- * case PRU_RCVD). If a FIN has already been received on this
- * connection then we just ignore the text.
- */
- if ((ti->ti_len || (tiflags&TH_FIN)) &&
- TCPS_HAVERCVDFIN(tp->t_state) == 0) {
- TCP_REASS(tp, ti, m, so, tiflags);
- /*
- * Note the amount of data that peer has sent into
- * our window, in order to estimate the sender's
- * buffer size.
- */
- len = so->so_rcv.sb_hiwat - (tp->rcv_adv - tp->rcv_nxt);
- } else {
- m_freem(m);
- tiflags &= ~TH_FIN;
- }
-
- /*
- * If FIN is received ACK the FIN and let the user know
- * that the connection is closing.
- */
- if (tiflags & TH_FIN) {
- if (TCPS_HAVERCVDFIN(tp->t_state) == 0) {
- socantrcvmore(so);
- /*
- * If connection is half-synchronized
- * (ie NEEDSYN flag on) then delay ACK,
- * so it may be piggybacked when SYN is sent.
- * Otherwise, since we received a FIN then no
- * more input can be expected, send ACK now.
- */
- if (tp->t_flags & TF_NEEDSYN)
- tp->t_flags |= TF_DELACK;
- else
- tp->t_flags |= TF_ACKNOW;
- tp->rcv_nxt++;
- }
- switch (tp->t_state) {
-
- /*
- * In SYN_RECEIVED and ESTABLISHED STATES
- * enter the CLOSE_WAIT state.
- */
- case TCPS_SYN_RECEIVED:
- case TCPS_ESTABLISHED:
- tp->t_state = TCPS_CLOSE_WAIT;
- break;
-
- /*
- * If still in FIN_WAIT_1 STATE FIN has not been acked so
- * enter the CLOSING state.
- */
- case TCPS_FIN_WAIT_1:
- tp->t_state = TCPS_CLOSING;
- break;
-
- /*
- * In FIN_WAIT_2 state enter the TIME_WAIT state,
- * starting the time-wait timer, turning off the other
- * standard timers.
- */
- case TCPS_FIN_WAIT_2:
- tp->t_state = TCPS_TIME_WAIT;
- tcp_canceltimers(tp);
- /* Shorten TIME_WAIT [RFC-1644, p.28] */
- if (tp->cc_recv != 0 &&
- tp->t_duration < TCPTV_MSL) {
- tp->t_timer[TCPT_2MSL] =
- tp->t_rxtcur * TCPTV_TWTRUNC;
- /* For transaction client, force ACK now. */
- tp->t_flags |= TF_ACKNOW;
- }
- else
- tp->t_timer[TCPT_2MSL] = 2 * TCPTV_MSL;
- soisdisconnected(so);
- break;
-
- /*
- * In TIME_WAIT state restart the 2 MSL time_wait timer.
- */
- case TCPS_TIME_WAIT:
- tp->t_timer[TCPT_2MSL] = 2 * TCPTV_MSL;
- break;
- }
- }
-#ifdef TCPDEBUG
- if (so->so_options & SO_DEBUG)
- tcp_trace(TA_INPUT, ostate, tp, &tcp_saveti, 0);
-#endif
-
- /*
- * Return any desired output.
- */
- if (needoutput || (tp->t_flags & TF_ACKNOW))
- (void) tcp_output(tp);
- return;
-
-dropafterack:
- /*
- * Generate an ACK dropping incoming segment if it occupies
- * sequence space, where the ACK reflects our state.
- */
- if (tiflags & TH_RST)
- goto drop;
-#ifdef TCPDEBUG
- if (so->so_options & SO_DEBUG)
- tcp_trace(TA_DROP, ostate, tp, &tcp_saveti, 0);
-#endif
- m_freem(m);
- tp->t_flags |= TF_ACKNOW;
- (void) tcp_output(tp);
- return;
-
-dropwithreset:
- /*
- * Generate a RST, dropping incoming segment.
- * Make ACK acceptable to originator of segment.
- * Don't bother to respond if destination was broadcast/multicast.
- */
- if ((tiflags & TH_RST) || m->m_flags & (M_BCAST|M_MCAST) ||
- IN_MULTICAST(ntohl(ti->ti_dst.s_addr)))
- goto drop;
-#ifdef TCPDEBUG
- if (tp == 0 || (tp->t_inpcb->inp_socket->so_options & SO_DEBUG))
- tcp_trace(TA_DROP, ostate, tp, &tcp_saveti, 0);
-#endif
- if (tiflags & TH_ACK)
- tcp_respond(tp, ti, m, (tcp_seq)0, ti->ti_ack, TH_RST);
- else {
- if (tiflags & TH_SYN)
- ti->ti_len++;
- tcp_respond(tp, ti, m, ti->ti_seq+ti->ti_len, (tcp_seq)0,
- TH_RST|TH_ACK);
- }
- /* destroy temporarily created socket */
- if (dropsocket)
- (void) soabort(so);
- return;
-
-drop:
- /*
- * Drop space held by incoming segment and return.
- */
-#ifdef TCPDEBUG
- if (tp == 0 || (tp->t_inpcb->inp_socket->so_options & SO_DEBUG))
- tcp_trace(TA_DROP, ostate, tp, &tcp_saveti, 0);
-#endif
- m_freem(m);
- /* destroy temporarily created socket */
- if (dropsocket)
- (void) soabort(so);
- return;
-#ifndef TUBA_INCLUDE
-}
-
-static void
-tcp_dooptions(tp, cp, cnt, ti, to)
- struct tcpcb *tp;
- u_char *cp;
- int cnt;
- struct tcpiphdr *ti;
- struct tcpopt *to;
-{
- u_short mss = 0;
- int opt, optlen;
-
- for (; cnt > 0; cnt -= optlen, cp += optlen) {
- opt = cp[0];
- if (opt == TCPOPT_EOL)
- break;
- if (opt == TCPOPT_NOP)
- optlen = 1;
- else {
- optlen = cp[1];
- if (optlen <= 0)
- break;
- }
- switch (opt) {
-
- default:
- continue;
-
- case TCPOPT_MAXSEG:
- if (optlen != TCPOLEN_MAXSEG)
- continue;
- if (!(ti->ti_flags & TH_SYN))
- continue;
- bcopy((char *) cp + 2, (char *) &mss, sizeof(mss));
- NTOHS(mss);
- break;
-
- case TCPOPT_WINDOW:
- if (optlen != TCPOLEN_WINDOW)
- continue;
- if (!(ti->ti_flags & TH_SYN))
- continue;
- tp->t_flags |= TF_RCVD_SCALE;
- tp->requested_s_scale = min(cp[2], TCP_MAX_WINSHIFT);
- break;
-
- case TCPOPT_TIMESTAMP:
- if (optlen != TCPOLEN_TIMESTAMP)
- continue;
- to->to_flag |= TOF_TS;
- bcopy((char *)cp + 2,
- (char *)&to->to_tsval, sizeof(to->to_tsval));
- NTOHL(to->to_tsval);
- bcopy((char *)cp + 6,
- (char *)&to->to_tsecr, sizeof(to->to_tsecr));
- NTOHL(to->to_tsecr);
-
- /*
- * A timestamp received in a SYN makes
- * it ok to send timestamp requests and replies.
- */
- if (ti->ti_flags & TH_SYN) {
- tp->t_flags |= TF_RCVD_TSTMP;
- tp->ts_recent = to->to_tsval;
- tp->ts_recent_age = tcp_now;
- }
- break;
- case TCPOPT_CC:
- if (optlen != TCPOLEN_CC)
- continue;
- to->to_flag |= TOF_CC;
- bcopy((char *)cp + 2,
- (char *)&to->to_cc, sizeof(to->to_cc));
- NTOHL(to->to_cc);
- /*
- * A CC or CC.new option received in a SYN makes
- * it ok to send CC in subsequent segments.
- */
- if (ti->ti_flags & TH_SYN)
- tp->t_flags |= TF_RCVD_CC;
- break;
- case TCPOPT_CCNEW:
- if (optlen != TCPOLEN_CC)
- continue;
- if (!(ti->ti_flags & TH_SYN))
- continue;
- to->to_flag |= TOF_CCNEW;
- bcopy((char *)cp + 2,
- (char *)&to->to_cc, sizeof(to->to_cc));
- NTOHL(to->to_cc);
- /*
- * A CC or CC.new option received in a SYN makes
- * it ok to send CC in subsequent segments.
- */
- tp->t_flags |= TF_RCVD_CC;
- break;
- case TCPOPT_CCECHO:
- if (optlen != TCPOLEN_CC)
- continue;
- if (!(ti->ti_flags & TH_SYN))
- continue;
- to->to_flag |= TOF_CCECHO;
- bcopy((char *)cp + 2,
- (char *)&to->to_ccecho, sizeof(to->to_ccecho));
- NTOHL(to->to_ccecho);
- break;
- }
- }
- if (ti->ti_flags & TH_SYN)
- tcp_mss(tp, mss); /* sets t_maxseg */
-}
-
-/*
- * Pull out of band byte out of a segment so
- * it doesn't appear in the user's data queue.
- * It is still reflected in the segment length for
- * sequencing purposes.
- */
-static void
-tcp_pulloutofband(so, ti, m)
- struct socket *so;
- struct tcpiphdr *ti;
- register struct mbuf *m;
-{
- int cnt = ti->ti_urp - 1;
-
- while (cnt >= 0) {
- if (m->m_len > cnt) {
- char *cp = mtod(m, caddr_t) + cnt;
- struct tcpcb *tp = sototcpcb(so);
-
- tp->t_iobc = *cp;
- tp->t_oobflags |= TCPOOB_HAVEDATA;
- bcopy(cp+1, cp, (unsigned)(m->m_len - cnt - 1));
- m->m_len--;
- return;
- }
- cnt -= m->m_len;
- m = m->m_next;
- if (m == 0)
- break;
- }
- panic("tcp_pulloutofband");
-}
-
-/*
- * Collect new round-trip time estimate
- * and update averages and current timeout.
- */
-static void
-tcp_xmit_timer(tp, rtt)
- register struct tcpcb *tp;
- short rtt;
-{
- register int delta;
-
- tcpstat.tcps_rttupdated++;
- tp->t_rttupdated++;
- if (tp->t_srtt != 0) {
- /*
- * srtt is stored as fixed point with 5 bits after the
- * binary point (i.e., scaled by 8). The following magic
- * is equivalent to the smoothing algorithm in rfc793 with
- * an alpha of .875 (srtt = rtt/8 + srtt*7/8 in fixed
- * point). Adjust rtt to origin 0.
- */
- delta = ((rtt - 1) << TCP_DELTA_SHIFT)
- - (tp->t_srtt >> (TCP_RTT_SHIFT - TCP_DELTA_SHIFT));
-
- if ((tp->t_srtt += delta) <= 0)
- tp->t_srtt = 1;
-
- /*
- * We accumulate a smoothed rtt variance (actually, a
- * smoothed mean difference), then set the retransmit
- * timer to smoothed rtt + 4 times the smoothed variance.
- * rttvar is stored as fixed point with 4 bits after the
- * binary point (scaled by 16). The following is
- * equivalent to rfc793 smoothing with an alpha of .75
- * (rttvar = rttvar*3/4 + |delta| / 4). This replaces
- * rfc793's wired-in beta.
- */
- if (delta < 0)
- delta = -delta;
- delta -= tp->t_rttvar >> (TCP_RTTVAR_SHIFT - TCP_DELTA_SHIFT);
- if ((tp->t_rttvar += delta) <= 0)
- tp->t_rttvar = 1;
- } else {
- /*
- * No rtt measurement yet - use the unsmoothed rtt.
- * Set the variance to half the rtt (so our first
- * retransmit happens at 3*rtt).
- */
- tp->t_srtt = rtt << TCP_RTT_SHIFT;
- tp->t_rttvar = rtt << (TCP_RTTVAR_SHIFT - 1);
- }
- tp->t_rtt = 0;
- tp->t_rxtshift = 0;
-
- /*
- * the retransmit should happen at rtt + 4 * rttvar.
- * Because of the way we do the smoothing, srtt and rttvar
- * will each average +1/2 tick of bias. When we compute
- * the retransmit timer, we want 1/2 tick of rounding and
- * 1 extra tick because of +-1/2 tick uncertainty in the
- * firing of the timer. The bias will give us exactly the
- * 1.5 tick we need. But, because the bias is
- * statistical, we have to test that we don't drop below
- * the minimum feasible timer (which is 2 ticks).
- */
- TCPT_RANGESET(tp->t_rxtcur, TCP_REXMTVAL(tp),
- max(tp->t_rttmin, rtt + 2), TCPTV_REXMTMAX);
-
- /*
- * We received an ack for a packet that wasn't retransmitted;
- * it is probably safe to discard any error indications we've
- * received recently. This isn't quite right, but close enough
- * for now (a route might have failed after we sent a segment,
- * and the return path might not be symmetrical).
- */
- tp->t_softerror = 0;
-}
-
-/*
- * Determine a reasonable value for maxseg size.
- * If the route is known, check route for mtu.
- * If none, use an mss that can be handled on the outgoing
- * interface without forcing IP to fragment; if bigger than
- * an mbuf cluster (MCLBYTES), round down to nearest multiple of MCLBYTES
- * to utilize large mbufs. If no route is found, route has no mtu,
- * or the destination isn't local, use a default, hopefully conservative
- * size (usually 512 or the default IP max size, but no more than the mtu
- * of the interface), as we can't discover anything about intervening
- * gateways or networks. We also initialize the congestion/slow start
- * window to be a single segment if the destination isn't local.
- * While looking at the routing entry, we also initialize other path-dependent
- * parameters from pre-set or cached values in the routing entry.
- *
- * Also take into account the space needed for options that we
- * send regularly. Make maxseg shorter by that amount to assure
- * that we can send maxseg amount of data even when the options
- * are present. Store the upper limit of the length of options plus
- * data in maxopd.
- *
- * NOTE that this routine is only called when we process an incoming
- * segment, for outgoing segments only tcp_mssopt is called.
- *
- * In case of T/TCP, we call this routine during implicit connection
- * setup as well (offer = -1), to initialize maxseg from the cached
- * MSS of our peer.
- */
-void
-tcp_mss(tp, offer)
- struct tcpcb *tp;
- int offer;
-{
- register struct rtentry *rt;
- struct ifnet *ifp;
- register int rtt, mss;
- u_long bufsize;
- struct inpcb *inp;
- struct socket *so;
- struct rmxp_tao *taop;
- int origoffer = offer;
-
- inp = tp->t_inpcb;
- if ((rt = tcp_rtlookup(inp)) == NULL) {
- tp->t_maxopd = tp->t_maxseg = tcp_mssdflt;
- return;
- }
- ifp = rt->rt_ifp;
- so = inp->inp_socket;
-
- taop = rmx_taop(rt->rt_rmx);
- /*
- * Offer == -1 means that we didn't receive SYN yet,
- * use cached value in that case;
- */
- if (offer == -1)
- offer = taop->tao_mssopt;
- /*
- * Offer == 0 means that there was no MSS on the SYN segment,
- * in this case we use tcp_mssdflt.
- */
- if (offer == 0)
- offer = tcp_mssdflt;
- else
- /*
- * Sanity check: make sure that maxopd will be large
- * enough to allow some data on segments even is the
- * all the option space is used (40bytes). Otherwise
- * funny things may happen in tcp_output.
- */
- offer = max(offer, 64);
- taop->tao_mssopt = offer;
-
- /*
- * While we're here, check if there's an initial rtt
- * or rttvar. Convert from the route-table units
- * to scaled multiples of the slow timeout timer.
- */
- if (tp->t_srtt == 0 && (rtt = rt->rt_rmx.rmx_rtt)) {
- /*
- * XXX the lock bit for RTT indicates that the value
- * is also a minimum value; this is subject to time.
- */
- if (rt->rt_rmx.rmx_locks & RTV_RTT)
- tp->t_rttmin = rtt / (RTM_RTTUNIT / PR_SLOWHZ);
- tp->t_srtt = rtt / (RTM_RTTUNIT / (PR_SLOWHZ * TCP_RTT_SCALE));
- tcpstat.tcps_usedrtt++;
- if (rt->rt_rmx.rmx_rttvar) {
- tp->t_rttvar = rt->rt_rmx.rmx_rttvar /
- (RTM_RTTUNIT / (PR_SLOWHZ * TCP_RTTVAR_SCALE));
- tcpstat.tcps_usedrttvar++;
- } else {
- /* default variation is +- 1 rtt */
- tp->t_rttvar =
- tp->t_srtt * TCP_RTTVAR_SCALE / TCP_RTT_SCALE;
- }
- TCPT_RANGESET(tp->t_rxtcur,
- ((tp->t_srtt >> 2) + tp->t_rttvar) >> 1,
- tp->t_rttmin, TCPTV_REXMTMAX);
- }
- /*
- * if there's an mtu associated with the route, use it
- */
- if (rt->rt_rmx.rmx_mtu)
- mss = rt->rt_rmx.rmx_mtu - sizeof(struct tcpiphdr);
- else
- {
- mss = ifp->if_mtu - sizeof(struct tcpiphdr);
- if (!in_localaddr(inp->inp_faddr))
- mss = min(mss, tcp_mssdflt);
- }
- mss = min(mss, offer);
- /*
- * maxopd stores the maximum length of data AND options
- * in a segment; maxseg is the amount of data in a normal
- * segment. We need to store this value (maxopd) apart
- * from maxseg, because now every segment carries options
- * and thus we normally have somewhat less data in segments.
- */
- tp->t_maxopd = mss;
-
- /*
- * In case of T/TCP, origoffer==-1 indicates, that no segments
- * were received yet. In this case we just guess, otherwise
- * we do the same as before T/TCP.
- */
- if ((tp->t_flags & (TF_REQ_TSTMP|TF_NOOPT)) == TF_REQ_TSTMP &&
- (origoffer == -1 ||
- (tp->t_flags & TF_RCVD_TSTMP) == TF_RCVD_TSTMP))
- mss -= TCPOLEN_TSTAMP_APPA;
- if ((tp->t_flags & (TF_REQ_CC|TF_NOOPT)) == TF_REQ_CC &&
- (origoffer == -1 ||
- (tp->t_flags & TF_RCVD_CC) == TF_RCVD_CC))
- mss -= TCPOLEN_CC_APPA;
-
-#if (MCLBYTES & (MCLBYTES - 1)) == 0
- if (mss > MCLBYTES)
- mss &= ~(MCLBYTES-1);
-#else
- if (mss > MCLBYTES)
- mss = mss / MCLBYTES * MCLBYTES;
-#endif
- /*
- * If there's a pipesize, change the socket buffer
- * to that size. Make the socket buffers an integral
- * number of mss units; if the mss is larger than
- * the socket buffer, decrease the mss.
- */
-#ifdef RTV_SPIPE
- if ((bufsize = rt->rt_rmx.rmx_sendpipe) == 0)
-#endif
- bufsize = so->so_snd.sb_hiwat;
- if (bufsize < mss)
- mss = bufsize;
- else {
- bufsize = roundup(bufsize, mss);
- if (bufsize > sb_max)
- bufsize = sb_max;
- (void)sbreserve(&so->so_snd, bufsize);
- }
- tp->t_maxseg = mss;
-
-#ifdef RTV_RPIPE
- if ((bufsize = rt->rt_rmx.rmx_recvpipe) == 0)
-#endif
- bufsize = so->so_rcv.sb_hiwat;
- if (bufsize > mss) {
- bufsize = roundup(bufsize, mss);
- if (bufsize > sb_max)
- bufsize = sb_max;
- (void)sbreserve(&so->so_rcv, bufsize);
- }
- /*
- * Don't force slow-start on local network.
- */
- if (!in_localaddr(inp->inp_faddr))
- tp->snd_cwnd = mss;
-
- if (rt->rt_rmx.rmx_ssthresh) {
- /*
- * There's some sort of gateway or interface
- * buffer limit on the path. Use this to set
- * the slow start threshhold, but set the
- * threshold to no less than 2*mss.
- */
- tp->snd_ssthresh = max(2 * mss, rt->rt_rmx.rmx_ssthresh);
- tcpstat.tcps_usedssthresh++;
- }
-}
-
-/*
- * Determine the MSS option to send on an outgoing SYN.
- */
-int
-tcp_mssopt(tp)
- struct tcpcb *tp;
-{
- struct rtentry *rt;
-
- rt = tcp_rtlookup(tp->t_inpcb);
- if (rt == NULL)
- return tcp_mssdflt;
-
- return rt->rt_ifp->if_mtu - sizeof(struct tcpiphdr);
-}
-#endif /* TUBA_INCLUDE */
diff --git a/cpukit/libnetworking/netinet/tcp_output.c b/cpukit/libnetworking/netinet/tcp_output.c
deleted file mode 100644
index cbb5218dce..0000000000
--- a/cpukit/libnetworking/netinet/tcp_output.c
+++ /dev/null
@@ -1,755 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1995
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)tcp_output.c 8.4 (Berkeley) 5/24/95
- * $Id$
- */
-
-#include "opt_tcpdebug.h"
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/systm.h>
-#include <sys/malloc.h>
-#include <sys/mbuf.h>
-#include <sys/protosw.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/errno.h>
-
-#include <net/route.h>
-
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/in_pcb.h>
-#include <netinet/ip_var.h>
-#include <netinet/tcp.h>
-#define TCPOUTFLAGS
-#include <netinet/tcp_fsm.h>
-#include <netinet/tcp_seq.h>
-#include <netinet/tcp_timer.h>
-#include <netinet/tcp_var.h>
-#include <netinet/tcpip.h>
-#ifdef TCPDEBUG
-#include <netinet/tcp_debug.h>
-#endif
-
-#ifdef notyet
-extern struct mbuf *m_copypack();
-#endif
-
-
-/*
- * Tcp output routine: figure out what should be sent and send it.
- */
-int
-tcp_output(tp)
- register struct tcpcb *tp;
-{
- register struct socket *so = tp->t_inpcb->inp_socket;
- register long len, win;
- int off, flags, error;
- register struct mbuf *m;
- register struct tcpiphdr *ti;
- u_char opt[TCP_MAXOLEN];
- unsigned optlen, hdrlen;
- int idle, sendalot;
- struct rmxp_tao *taop;
- struct rmxp_tao tao_noncached;
-
- /*
- * Determine length of data that should be transmitted,
- * and flags that will be used.
- * If there is some data or critical controls (SYN, RST)
- * to send, then transmit; otherwise, investigate further.
- */
- idle = (tp->snd_max == tp->snd_una);
- if (idle && tp->t_idle >= tp->t_rxtcur)
- /*
- * We have been idle for "a while" and no acks are
- * expected to clock out any data we send --
- * slow start to get ack "clock" running again.
- */
- tp->snd_cwnd = tp->t_maxseg;
-again:
- sendalot = 0;
- off = tp->snd_nxt - tp->snd_una;
- win = min(tp->snd_wnd, tp->snd_cwnd);
-
- flags = tcp_outflags[tp->t_state];
- /*
- * Get standard flags, and add SYN or FIN if requested by 'hidden'
- * state flags.
- */
- if (tp->t_flags & TF_NEEDFIN)
- flags |= TH_FIN;
- if (tp->t_flags & TF_NEEDSYN)
- flags |= TH_SYN;
-
- /*
- * If in persist timeout with window of 0, send 1 byte.
- * Otherwise, if window is small but nonzero
- * and timer expired, we will send what we can
- * and go to transmit state.
- */
- if (tp->t_force) {
- if (win == 0) {
- /*
- * If we still have some data to send, then
- * clear the FIN bit. Usually this would
- * happen below when it realizes that we
- * aren't sending all the data. However,
- * if we have exactly 1 byte of unset data,
- * then it won't clear the FIN bit below,
- * and if we are in persist state, we wind
- * up sending the packet without recording
- * that we sent the FIN bit.
- *
- * We can't just blindly clear the FIN bit,
- * because if we don't have any more data
- * to send then the probe will be the FIN
- * itself.
- */
- if (off < so->so_snd.sb_cc)
- flags &= ~TH_FIN;
- win = 1;
- } else {
- tp->t_timer[TCPT_PERSIST] = 0;
- tp->t_rxtshift = 0;
- }
- }
-
- len = min(so->so_snd.sb_cc, win) - off;
-
- if ((taop = tcp_gettaocache(tp->t_inpcb)) == NULL) {
- taop = &tao_noncached;
- bzero(taop, sizeof(*taop));
- }
-
- /*
- * Lop off SYN bit if it has already been sent. However, if this
- * is SYN-SENT state and if segment contains data and if we don't
- * know that foreign host supports TAO, suppress sending segment.
- */
- if ((flags & TH_SYN) && SEQ_GT(tp->snd_nxt, tp->snd_una)) {
- flags &= ~TH_SYN;
- off--, len++;
- if (len > 0 && tp->t_state == TCPS_SYN_SENT &&
- taop->tao_ccsent == 0)
- return 0;
- }
-
- /*
- * Be careful not to send data and/or FIN on SYN segments
- * in cases when no CC option will be sent.
- * This measure is needed to prevent interoperability problems
- * with not fully conformant TCP implementations.
- */
- if ((flags & TH_SYN) &&
- ((tp->t_flags & TF_NOOPT) || !(tp->t_flags & TF_REQ_CC) ||
- ((flags & TH_ACK) && !(tp->t_flags & TF_RCVD_CC)))) {
- len = 0;
- flags &= ~TH_FIN;
- }
-
- if (len < 0) {
- /*
- * If FIN has been sent but not acked,
- * but we haven't been called to retransmit,
- * len will be -1. Otherwise, window shrank
- * after we sent into it. If window shrank to 0,
- * cancel pending retransmit, pull snd_nxt back
- * to (closed) window, and set the persist timer
- * if it isn't already going. If the window didn't
- * close completely, just wait for an ACK.
- */
- len = 0;
- if (win == 0) {
- tp->t_timer[TCPT_REXMT] = 0;
- tp->t_rxtshift = 0;
- tp->snd_nxt = tp->snd_una;
- if (tp->t_timer[TCPT_PERSIST] == 0)
- tcp_setpersist(tp);
- }
- }
- if (len > tp->t_maxseg) {
- len = tp->t_maxseg;
- sendalot = 1;
- }
- if (SEQ_LT(tp->snd_nxt + len, tp->snd_una + so->so_snd.sb_cc))
- flags &= ~TH_FIN;
-
- win = sbspace(&so->so_rcv);
-
- /*
- * Sender silly window avoidance. If connection is idle
- * and can send all data, a maximum segment,
- * at least a maximum default-size segment do it,
- * or are forced, do it; otherwise don't bother.
- * If peer's buffer is tiny, then send
- * when window is at least half open.
- * If retransmitting (possibly after persist timer forced us
- * to send into a small window), then must resend.
- */
- if (len) {
- if (len == tp->t_maxseg)
- goto send;
- if ((idle || tp->t_flags & TF_NODELAY) &&
- (tp->t_flags & TF_NOPUSH) == 0 &&
- len + off >= so->so_snd.sb_cc)
- goto send;
- if (tp->t_force)
- goto send;
- if (len >= tp->max_sndwnd / 2 && tp->max_sndwnd > 0)
- goto send;
- if (SEQ_LT(tp->snd_nxt, tp->snd_max))
- goto send;
- }
-
- /*
- * Compare available window to amount of window
- * known to peer (as advertised window less
- * next expected input). If the difference is at least two
- * max size segments, or at least 50% of the maximum possible
- * window, then want to send a window update to peer.
- */
- if (win > 0) {
- /*
- * "adv" is the amount we can increase the window,
- * taking into account that we are limited by
- * TCP_MAXWIN << tp->rcv_scale.
- */
- long adv = min(win, (long)TCP_MAXWIN << tp->rcv_scale) -
- (tp->rcv_adv - tp->rcv_nxt);
-
- if (adv >= (long) (2 * tp->t_maxseg))
- goto send;
- if (2 * adv >= (long) so->so_rcv.sb_hiwat)
- goto send;
- }
-
- /*
- * Send if we owe peer an ACK.
- */
- if (tp->t_flags & TF_ACKNOW)
- goto send;
- if ((flags & TH_RST) ||
- ((flags & TH_SYN) && (tp->t_flags & TF_NEEDSYN) == 0))
- goto send;
- if (SEQ_GT(tp->snd_up, tp->snd_una))
- goto send;
- /*
- * If our state indicates that FIN should be sent
- * and we have not yet done so, or we're retransmitting the FIN,
- * then we need to send.
- */
- if (flags & TH_FIN &&
- ((tp->t_flags & TF_SENTFIN) == 0 || tp->snd_nxt == tp->snd_una))
- goto send;
-
- /*
- * TCP window updates are not reliable, rather a polling protocol
- * using ``persist'' packets is used to insure receipt of window
- * updates. The three ``states'' for the output side are:
- * idle not doing retransmits or persists
- * persisting to move a small or zero window
- * (re)transmitting and thereby not persisting
- *
- * tp->t_timer[TCPT_PERSIST]
- * is set when we are in persist state.
- * tp->t_force
- * is set when we are called to send a persist packet.
- * tp->t_timer[TCPT_REXMT]
- * is set when we are retransmitting
- * The output side is idle when both timers are zero.
- *
- * If send window is too small, there is data to transmit, and no
- * retransmit or persist is pending, then go to persist state.
- * If nothing happens soon, send when timer expires:
- * if window is nonzero, transmit what we can,
- * otherwise force out a byte.
- */
- if (so->so_snd.sb_cc && tp->t_timer[TCPT_REXMT] == 0 &&
- tp->t_timer[TCPT_PERSIST] == 0) {
- tp->t_rxtshift = 0;
- tcp_setpersist(tp);
- }
-
- /*
- * No reason to send a segment, just return.
- */
- return (0);
-
-send:
- /*
- * Before ESTABLISHED, force sending of initial options
- * unless TCP set not to do any options.
- * NOTE: we assume that the IP/TCP header plus TCP options
- * always fit in a single mbuf, leaving room for a maximum
- * link header, i.e.
- * max_linkhdr + sizeof (struct tcpiphdr) + optlen <= MHLEN
- */
- optlen = 0;
- hdrlen = sizeof (struct tcpiphdr);
- if (flags & TH_SYN) {
- tp->snd_nxt = tp->iss;
- if ((tp->t_flags & TF_NOOPT) == 0) {
- u_short mss;
-
- opt[0] = TCPOPT_MAXSEG;
- opt[1] = TCPOLEN_MAXSEG;
- mss = htons((u_short) tcp_mssopt(tp));
- (void)memcpy(opt + 2, &mss, sizeof(mss));
- optlen = TCPOLEN_MAXSEG;
-
- if ((tp->t_flags & TF_REQ_SCALE) &&
- ((flags & TH_ACK) == 0 ||
- (tp->t_flags & TF_RCVD_SCALE))) {
- *((u_long *) (opt + optlen)) = htonl(
- TCPOPT_NOP << 24 |
- TCPOPT_WINDOW << 16 |
- TCPOLEN_WINDOW << 8 |
- tp->request_r_scale);
- optlen += 4;
- }
- }
- }
-
- /*
- * Send a timestamp and echo-reply if this is a SYN and our side
- * wants to use timestamps (TF_REQ_TSTMP is set) or both our side
- * and our peer have sent timestamps in our SYN's.
- */
- if ((tp->t_flags & (TF_REQ_TSTMP|TF_NOOPT)) == TF_REQ_TSTMP &&
- (flags & TH_RST) == 0 &&
- ((flags & TH_ACK) == 0 ||
- (tp->t_flags & TF_RCVD_TSTMP))) {
- u_long *lp = (u_long *)(opt + optlen);
-
- /* Form timestamp option as shown in appendix A of RFC 1323. */
- *lp++ = htonl(TCPOPT_TSTAMP_HDR);
- *lp++ = htonl(tcp_now);
- *lp = htonl(tp->ts_recent);
- optlen += TCPOLEN_TSTAMP_APPA;
- }
-
- /*
- * Send `CC-family' options if our side wants to use them (TF_REQ_CC),
- * options are allowed (!TF_NOOPT) and it's not a RST.
- */
- if ((tp->t_flags & (TF_REQ_CC|TF_NOOPT)) == TF_REQ_CC &&
- (flags & TH_RST) == 0) {
- switch (flags & (TH_SYN|TH_ACK)) {
- /*
- * This is a normal ACK, send CC if we received CC before
- * from our peer.
- */
- case TH_ACK:
- if (!(tp->t_flags & TF_RCVD_CC))
- break;
- /*FALLTHROUGH*/
-
- /*
- * We can only get here in T/TCP's SYN_SENT* state, when
- * we're a sending a non-SYN segment without waiting for
- * the ACK of our SYN. A check above assures that we only
- * do this if our peer understands T/TCP.
- */
- case 0:
- opt[optlen++] = TCPOPT_NOP;
- opt[optlen++] = TCPOPT_NOP;
- opt[optlen++] = TCPOPT_CC;
- opt[optlen++] = TCPOLEN_CC;
- *(u_int32_t *)&opt[optlen] = htonl(tp->cc_send);
-
- optlen += 4;
- break;
-
- /*
- * This is our initial SYN, check whether we have to use
- * CC or CC.new.
- */
- case TH_SYN:
- opt[optlen++] = TCPOPT_NOP;
- opt[optlen++] = TCPOPT_NOP;
- opt[optlen++] = tp->t_flags & TF_SENDCCNEW ?
- TCPOPT_CCNEW : TCPOPT_CC;
- opt[optlen++] = TCPOLEN_CC;
- *(u_int32_t *)&opt[optlen] = htonl(tp->cc_send);
- optlen += 4;
- break;
-
- /*
- * This is a SYN,ACK; send CC and CC.echo if we received
- * CC from our peer.
- */
- case (TH_SYN|TH_ACK):
- if (tp->t_flags & TF_RCVD_CC) {
- opt[optlen++] = TCPOPT_NOP;
- opt[optlen++] = TCPOPT_NOP;
- opt[optlen++] = TCPOPT_CC;
- opt[optlen++] = TCPOLEN_CC;
- *(u_int32_t *)&opt[optlen] =
- htonl(tp->cc_send);
- optlen += 4;
- opt[optlen++] = TCPOPT_NOP;
- opt[optlen++] = TCPOPT_NOP;
- opt[optlen++] = TCPOPT_CCECHO;
- opt[optlen++] = TCPOLEN_CC;
- *(u_int32_t *)&opt[optlen] =
- htonl(tp->cc_recv);
- optlen += 4;
- }
- break;
- }
- }
-
- hdrlen += optlen;
-
- /*
- * Adjust data length if insertion of options will
- * bump the packet length beyond the t_maxopd length.
- * Clear the FIN bit because we cut off the tail of
- * the segment.
- */
- if (len + optlen > tp->t_maxopd) {
- /*
- * If there is still more to send, don't close the connection.
- */
- flags &= ~TH_FIN;
- len = tp->t_maxopd - optlen;
- sendalot = 1;
- }
-
-/*#ifdef DIAGNOSTIC*/
- if (max_linkhdr + hdrlen > MHLEN)
- panic("tcphdr too big");
-/*#endif*/
-
- /*
- * Grab a header mbuf, attaching a copy of data to
- * be transmitted, and initialize the header from
- * the template for sends on this connection.
- */
- if (len) {
- if (tp->t_force && len == 1)
- tcpstat.tcps_sndprobe++;
- else if (SEQ_LT(tp->snd_nxt, tp->snd_max)) {
- tcpstat.tcps_sndrexmitpack++;
- tcpstat.tcps_sndrexmitbyte += len;
- } else {
- tcpstat.tcps_sndpack++;
- tcpstat.tcps_sndbyte += len;
- }
-#ifdef notyet
- if ((m = m_copypack(so->so_snd.sb_mb, off,
- (int)len, max_linkhdr + hdrlen)) == 0) {
- error = ENOBUFS;
- goto out;
- }
- /*
- * m_copypack left space for our hdr; use it.
- */
- m->m_len += hdrlen;
- m->m_data -= hdrlen;
-#else
- MGETHDR(m, M_DONTWAIT, MT_HEADER);
- if (m == NULL) {
- error = ENOBUFS;
- goto out;
- }
- m->m_data += max_linkhdr;
- m->m_len = hdrlen;
- if (len <= MHLEN - hdrlen - max_linkhdr) {
- m_copydata(so->so_snd.sb_mb, off, (int) len,
- mtod(m, caddr_t) + hdrlen);
- m->m_len += len;
- } else {
- m->m_next = m_copy(so->so_snd.sb_mb, off, (int) len);
- if (m->m_next == 0) {
- (void) m_free(m);
- error = ENOBUFS;
- goto out;
- }
- }
-#endif
- /*
- * If we're sending everything we've got, set PUSH.
- * (This will keep happy those implementations which only
- * give data to the user when a buffer fills or
- * a PUSH comes in.)
- */
- if (off + len == so->so_snd.sb_cc)
- flags |= TH_PUSH;
- } else {
- if (tp->t_flags & TF_ACKNOW)
- tcpstat.tcps_sndacks++;
- else if (flags & (TH_SYN|TH_FIN|TH_RST))
- tcpstat.tcps_sndctrl++;
- else if (SEQ_GT(tp->snd_up, tp->snd_una))
- tcpstat.tcps_sndurg++;
- else
- tcpstat.tcps_sndwinup++;
-
- MGETHDR(m, M_DONTWAIT, MT_HEADER);
- if (m == NULL) {
- error = ENOBUFS;
- goto out;
- }
- m->m_data += max_linkhdr;
- m->m_len = hdrlen;
- }
- m->m_pkthdr.rcvif = (struct ifnet *)0;
- ti = mtod(m, struct tcpiphdr *);
- if (tp->t_template == 0)
- panic("tcp_output");
- (void)memcpy(ti, tp->t_template, sizeof (struct tcpiphdr));
-
- /*
- * Fill in fields, remembering maximum advertised
- * window for use in delaying messages about window sizes.
- * If resending a FIN, be sure not to use a new sequence number.
- */
- if (flags & TH_FIN && tp->t_flags & TF_SENTFIN &&
- tp->snd_nxt == tp->snd_max)
- tp->snd_nxt--;
- /*
- * If we are doing retransmissions, then snd_nxt will
- * not reflect the first unsent octet. For ACK only
- * packets, we do not want the sequence number of the
- * retransmitted packet, we want the sequence number
- * of the next unsent octet. So, if there is no data
- * (and no SYN or FIN), use snd_max instead of snd_nxt
- * when filling in ti_seq. But if we are in persist
- * state, snd_max might reflect one byte beyond the
- * right edge of the window, so use snd_nxt in that
- * case, since we know we aren't doing a retransmission.
- * (retransmit and persist are mutually exclusive...)
- */
- if (len || (flags & (TH_SYN|TH_FIN)) || tp->t_timer[TCPT_PERSIST])
- ti->ti_seq = htonl(tp->snd_nxt);
- else
- ti->ti_seq = htonl(tp->snd_max);
- ti->ti_ack = htonl(tp->rcv_nxt);
- if (optlen) {
- bcopy(opt, ti + 1, optlen);
- ti->ti_off = (sizeof (struct tcphdr) + optlen) >> 2;
- }
- ti->ti_flags = flags;
- /*
- * Calculate receive window. Don't shrink window,
- * but avoid silly window syndrome.
- */
- if (win < (long)(so->so_rcv.sb_hiwat / 4) && win < (long)tp->t_maxseg)
- win = 0;
- if (win < (long)(tp->rcv_adv - tp->rcv_nxt))
- win = (long)(tp->rcv_adv - tp->rcv_nxt);
- if (win > (long)TCP_MAXWIN << tp->rcv_scale)
- win = (long)TCP_MAXWIN << tp->rcv_scale;
- ti->ti_win = htons((u_short) (win>>tp->rcv_scale));
- if (SEQ_GT(tp->snd_up, tp->snd_nxt)) {
- ti->ti_urp = htons((u_short)(tp->snd_up - tp->snd_nxt));
- ti->ti_flags |= TH_URG;
- } else
- /*
- * If no urgent pointer to send, then we pull
- * the urgent pointer to the left edge of the send window
- * so that it doesn't drift into the send window on sequence
- * number wraparound.
- */
- tp->snd_up = tp->snd_una; /* drag it along */
-
- /*
- * Put TCP length in extended header, and then
- * checksum extended header and data.
- */
- if (len + optlen)
- ti->ti_len = htons((u_short)(sizeof (struct tcphdr) +
- optlen + len));
- ti->ti_sum = in_cksum(m, (int)(hdrlen + len));
-
- /*
- * In transmit state, time the transmission and arrange for
- * the retransmit. In persist state, just set snd_max.
- */
- if (tp->t_force == 0 || tp->t_timer[TCPT_PERSIST] == 0) {
- tcp_seq startseq = tp->snd_nxt;
-
- /*
- * Advance snd_nxt over sequence space of this segment.
- */
- if (flags & (TH_SYN|TH_FIN)) {
- if (flags & TH_SYN)
- tp->snd_nxt++;
- if (flags & TH_FIN) {
- tp->snd_nxt++;
- tp->t_flags |= TF_SENTFIN;
- }
- }
- tp->snd_nxt += len;
- if (SEQ_GT(tp->snd_nxt, tp->snd_max)) {
- tp->snd_max = tp->snd_nxt;
- /*
- * Time this transmission if not a retransmission and
- * not currently timing anything.
- */
- if (tp->t_rtt == 0) {
- tp->t_rtt = 1;
- tp->t_rtseq = startseq;
- tcpstat.tcps_segstimed++;
- }
- }
-
- /*
- * Set retransmit timer if not currently set,
- * and not doing an ack or a keep-alive probe.
- * Initial value for retransmit timer is smoothed
- * round-trip time + 2 * round-trip time variance.
- * Initialize shift counter which is used for backoff
- * of retransmit time.
- */
- if (tp->t_timer[TCPT_REXMT] == 0 &&
- tp->snd_nxt != tp->snd_una) {
- tp->t_timer[TCPT_REXMT] = tp->t_rxtcur;
- if (tp->t_timer[TCPT_PERSIST]) {
- tp->t_timer[TCPT_PERSIST] = 0;
- tp->t_rxtshift = 0;
- }
- }
- } else
- if (SEQ_GT(tp->snd_nxt + len, tp->snd_max))
- tp->snd_max = tp->snd_nxt + len;
-
-#ifdef TCPDEBUG
- /*
- * Trace.
- */
- if (so->so_options & SO_DEBUG)
- tcp_trace(TA_OUTPUT, tp->t_state, tp, ti, 0);
-#endif
-
- /*
- * Fill in IP length and desired time to live and
- * send to IP level. There should be a better way
- * to handle ttl and tos; we could keep them in
- * the template, but need a way to checksum without them.
- */
- m->m_pkthdr.len = hdrlen + len;
-#ifdef TUBA
- if (tp->t_tuba_pcb)
- error = tuba_output(m, tp);
- else
-#endif
- {
-#if 1
- struct rtentry *rt;
-#endif
- ((struct ip *)ti)->ip_len = m->m_pkthdr.len;
- ((struct ip *)ti)->ip_ttl = tp->t_inpcb->inp_ip_ttl; /* XXX */
- ((struct ip *)ti)->ip_tos = tp->t_inpcb->inp_ip_tos; /* XXX */
-#if 1
- /*
- * See if we should do MTU discovery. We do it only if the following
- * are true:
- * 1) we have a valid route to the destination
- * 2) the MTU is not locked (if it is, then discovery has been
- * disabled)
- */
- if ((rt = tp->t_inpcb->inp_route.ro_rt)
- && rt->rt_flags & RTF_UP
- && !(rt->rt_rmx.rmx_locks & RTV_MTU)) {
- ((struct ip *)ti)->ip_off |= IP_DF;
- }
-#endif
- error = ip_output(m, tp->t_inpcb->inp_options, &tp->t_inpcb->inp_route,
- so->so_options & SO_DONTROUTE, 0);
- }
- if (error) {
-out:
- if (error == ENOBUFS) {
- tcp_quench(tp->t_inpcb, 0);
- return (0);
- }
-#if 1
- if (error == EMSGSIZE) {
- /*
- * ip_output() will have already fixed the route
- * for us. tcp_mtudisc() will, as its last action,
- * initiate retransmission, so it is important to
- * not do so here.
- */
- tcp_mtudisc(tp->t_inpcb, 0);
- return 0;
- }
-#endif
- if ((error == EHOSTUNREACH || error == ENETDOWN)
- && TCPS_HAVERCVDSYN(tp->t_state)) {
- tp->t_softerror = error;
- return (0);
- }
- return (error);
- }
- tcpstat.tcps_sndtotal++;
-
- /*
- * Data sent (as far as we can tell).
- * If this advertises a larger window than any other segment,
- * then remember the size of the advertised window.
- * Any pending ACK has now been sent.
- */
- if (win > 0 && SEQ_GT(tp->rcv_nxt+win, tp->rcv_adv))
- tp->rcv_adv = tp->rcv_nxt + win;
- tp->last_ack_sent = tp->rcv_nxt;
- tp->t_flags &= ~(TF_ACKNOW|TF_DELACK);
- if (sendalot)
- goto again;
- return (0);
-}
-
-void
-tcp_setpersist(tp)
- register struct tcpcb *tp;
-{
- register int t = ((tp->t_srtt >> 2) + tp->t_rttvar) >> 1;
-
- if (tp->t_timer[TCPT_REXMT])
- panic("tcp_output REXMT");
- /*
- * Start/restart persistance timer.
- */
- TCPT_RANGESET(tp->t_timer[TCPT_PERSIST],
- t * tcp_backoff[tp->t_rxtshift],
- TCPTV_PERSMIN, TCPTV_PERSMAX);
- if (tp->t_rxtshift < TCP_MAXRXTSHIFT)
- tp->t_rxtshift++;
-}
diff --git a/cpukit/libnetworking/netinet/tcp_seq.h b/cpukit/libnetworking/netinet/tcp_seq.h
deleted file mode 100644
index 8cccf199e1..0000000000
--- a/cpukit/libnetworking/netinet/tcp_seq.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993, 1995
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)tcp_seq.h 8.3 (Berkeley) 6/21/95
- * $Id$
- */
-
-#ifndef _NETINET_TCP_SEQ_H_
-#define _NETINET_TCP_SEQ_H_
-/*
- * TCP sequence numbers are 32 bit integers operated
- * on with modular arithmetic. These macros can be
- * used to compare such integers.
- */
-#define SEQ_LT(a,b) ((int)((a)-(b)) < 0)
-#define SEQ_LEQ(a,b) ((int)((a)-(b)) <= 0)
-#define SEQ_GT(a,b) ((int)((a)-(b)) > 0)
-#define SEQ_GEQ(a,b) ((int)((a)-(b)) >= 0)
-
-/* for modulo comparisons of timestamps */
-#define TSTMP_LT(a,b) ((int)((a)-(b)) < 0)
-#define TSTMP_GEQ(a,b) ((int)((a)-(b)) >= 0)
-
-/*
- * TCP connection counts are 32 bit integers operated
- * on with modular arithmetic. These macros can be
- * used to compare such integers.
- */
-#define CC_LT(a,b) ((int)((a)-(b)) < 0)
-#define CC_LEQ(a,b) ((int)((a)-(b)) <= 0)
-#define CC_GT(a,b) ((int)((a)-(b)) > 0)
-#define CC_GEQ(a,b) ((int)((a)-(b)) >= 0)
-
-/* Macro to increment a CC: skip 0 which has a special meaning */
-#define CC_INC(c) (++(c) == 0 ? ++(c) : (c))
-
-/*
- * Macros to initialize tcp sequence numbers for
- * send and receive from initial send and receive
- * sequence numbers.
- */
-#define tcp_rcvseqinit(tp) \
- (tp)->rcv_adv = (tp)->rcv_nxt = (tp)->irs + 1
-
-#define tcp_sendseqinit(tp) \
- (tp)->snd_una = (tp)->snd_nxt = (tp)->snd_max = (tp)->snd_up = \
- (tp)->iss
-
-#define TCP_PAWS_IDLE (24 * 24 * 60 * 60 * PR_SLOWHZ)
- /* timestamp wrap-around time */
-
-#ifdef KERNEL
-extern tcp_cc tcp_ccgen; /* global connection count */
-
-/*
- * Increment for tcp_iss each second.
- * This is designed to increment at the standard 250 KB/s,
- * but with a random component averaging 128 KB.
- * We also increment tcp_iss by a quarter of this amount
- * each time we use the value for a new connection.
- * If defined, the tcp_random18() macro should produce a
- * number in the range [0-0x3ffff] that is hard to predict.
- */
-#ifndef tcp_random18
-#define tcp_random18() ((random() >> 14) & 0x3ffff)
-#endif
-#define TCP_ISSINCR (122*1024 + tcp_random18())
-
-extern tcp_seq tcp_iss; /* tcp initial send seq # */
-#else
-#define TCP_ISSINCR (250*1024) /* increment for tcp_iss each second */
-#endif /* KERNEL */
-#endif /* _NETINET_TCP_SEQ_H_ */
diff --git a/cpukit/libnetworking/netinet/tcp_subr.c b/cpukit/libnetworking/netinet/tcp_subr.c
deleted file mode 100644
index a9cde3fdf0..0000000000
--- a/cpukit/libnetworking/netinet/tcp_subr.c
+++ /dev/null
@@ -1,634 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1995
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)tcp_subr.c 8.2 (Berkeley) 5/24/95
- * $Id$
- */
-
-#include "opt_tcpdebug.h"
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/proc.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/sysctl.h>
-#include <sys/malloc.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/protosw.h>
-#include <sys/errno.h>
-
-#include <net/route.h>
-#include <net/if.h>
-
-#define _IP_VHL
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/in_pcb.h>
-#include <netinet/in_var.h>
-#include <netinet/ip_var.h>
-#include <netinet/ip_icmp.h>
-#include <netinet/tcp.h>
-#include <netinet/tcp_fsm.h>
-#include <netinet/tcp_seq.h>
-#include <netinet/tcp_timer.h>
-#include <netinet/tcp_var.h>
-#include <netinet/tcpip.h>
-#ifdef TCPDEBUG
-#include <netinet/tcp_debug.h>
-#endif
-
-int tcp_mssdflt = TCP_MSS;
-SYSCTL_INT(_net_inet_tcp, TCPCTL_MSSDFLT, mssdflt,
- CTLFLAG_RW, &tcp_mssdflt , 0, "");
-
-static int tcp_do_rfc1323 = 1;
-static int tcp_do_rfc1644 = 1;
-#if !defined(__rtems__)
-static int tcp_rttdflt = TCPTV_SRTTDFLT / PR_SLOWHZ;
-SYSCTL_INT(_net_inet_tcp, TCPCTL_RTTDFLT, rttdflt,
- CTLFLAG_RW, &tcp_rttdflt , 0, "");
-
-SYSCTL_INT(_net_inet_tcp, TCPCTL_DO_RFC1323, rfc1323,
- CTLFLAG_RW, &tcp_do_rfc1323 , 0, "");
-
-SYSCTL_INT(_net_inet_tcp, TCPCTL_DO_RFC1644, rfc1644,
- CTLFLAG_RW, &tcp_do_rfc1644 , 0, "");
-#endif
-
-static void tcp_cleartaocache(void);
-static void tcp_notify __P((struct inpcb *, int));
-
-/*
- * Target size of TCP PCB hash table. Will be rounded down to a prime
- * number.
- */
-#ifndef TCBHASHSIZE
-#define TCBHASHSIZE 128
-#endif
-
-/*
- * Tcp initialization
- */
-void
-tcp_init()
-{
-
- tcp_iss = random(); /* wrong, but better than a constant */
- tcp_ccgen = 1;
- tcp_cleartaocache();
- LIST_INIT(&tcb);
- tcbinfo.listhead = &tcb;
- tcbinfo.hashbase = hashinit(TCBHASHSIZE, M_PCB, &tcbinfo.hashmask);
- if (max_protohdr < sizeof(struct tcpiphdr))
- max_protohdr = sizeof(struct tcpiphdr);
- if (max_linkhdr + sizeof(struct tcpiphdr) > MHLEN)
- panic("tcp_init");
-}
-
-/*
- * Create template to be used to send tcp packets on a connection.
- * Call after host entry created, allocates an mbuf and fills
- * in a skeletal tcp/ip header, minimizing the amount of work
- * necessary when the connection is used.
- */
-struct tcpiphdr *
-tcp_template(tp)
- struct tcpcb *tp;
-{
- register struct inpcb *inp = tp->t_inpcb;
- register struct mbuf *m;
- register struct tcpiphdr *n;
-
- if ((n = tp->t_template) == 0) {
- m = m_get(M_DONTWAIT, MT_HEADER);
- if (m == NULL)
- return (0);
- m->m_len = sizeof (struct tcpiphdr);
- n = mtod(m, struct tcpiphdr *);
- }
- n->ti_next = n->ti_prev = 0;
- n->ti_x1 = 0;
- n->ti_pr = IPPROTO_TCP;
- n->ti_len = htons(sizeof (struct tcpiphdr) - sizeof (struct ip));
- n->ti_src = inp->inp_laddr;
- n->ti_dst = inp->inp_faddr;
- n->ti_sport = inp->inp_lport;
- n->ti_dport = inp->inp_fport;
- n->ti_seq = 0;
- n->ti_ack = 0;
- n->ti_x2 = 0;
- n->ti_off = 5;
- n->ti_flags = 0;
- n->ti_win = 0;
- n->ti_sum = 0;
- n->ti_urp = 0;
- return (n);
-}
-
-/*
- * Send a single message to the TCP at address specified by
- * the given TCP/IP header. If m == 0, then we make a copy
- * of the tcpiphdr at ti and send directly to the addressed host.
- * This is used to force keep alive messages out using the TCP
- * template for a connection tp->t_template. If flags are given
- * then we send a message back to the TCP which originated the
- * segment ti, and discard the mbuf containing it and any other
- * attached mbufs.
- *
- * In any case the ack and sequence number of the transmitted
- * segment are as specified by the parameters.
- *
- * NOTE: If m != NULL, then ti must point to *inside* the mbuf.
- */
-void
-tcp_respond(tp, ti, m, ack, seq, flags)
- struct tcpcb *tp;
- register struct tcpiphdr *ti;
- register struct mbuf *m;
- tcp_seq ack, seq;
- int flags;
-{
- register int tlen;
- int win = 0;
- struct route *ro = 0;
- struct route sro;
-
- if (tp) {
- win = sbspace(&tp->t_inpcb->inp_socket->so_rcv);
- ro = &tp->t_inpcb->inp_route;
- } else {
- ro = &sro;
- bzero(ro, sizeof *ro);
- }
- if (m == 0) {
- m = m_gethdr(M_DONTWAIT, MT_HEADER);
- if (m == NULL)
- return;
-#ifdef TCP_COMPAT_42
- tlen = 1;
-#else
- tlen = 0;
-#endif
- m->m_data += max_linkhdr;
- *mtod(m, struct tcpiphdr *) = *ti;
- ti = mtod(m, struct tcpiphdr *);
- flags = TH_ACK;
- } else {
- m_freem(m->m_next);
- m->m_next = 0;
- m->m_data = (caddr_t)ti;
- m->m_len = sizeof (struct tcpiphdr);
- tlen = 0;
-#define xchg(a,b,type) { type t; t=a; a=b; b=t; }
- xchg(ti->ti_dst.s_addr, ti->ti_src.s_addr, u_long);
- xchg(ti->ti_dport, ti->ti_sport, u_short);
-#undef xchg
- }
- ti->ti_len = htons((u_short)(sizeof (struct tcphdr) + tlen));
- tlen += sizeof (struct tcpiphdr);
- m->m_len = tlen;
- m->m_pkthdr.len = tlen;
- m->m_pkthdr.rcvif = (struct ifnet *) 0;
- ti->ti_next = ti->ti_prev = 0;
- ti->ti_x1 = 0;
- ti->ti_seq = htonl(seq);
- ti->ti_ack = htonl(ack);
- ti->ti_x2 = 0;
- ti->ti_off = sizeof (struct tcphdr) >> 2;
- ti->ti_flags = flags;
- if (tp)
- ti->ti_win = htons((u_short) (win >> tp->rcv_scale));
- else
- ti->ti_win = htons((u_short)win);
- ti->ti_urp = 0;
- ti->ti_sum = 0;
- ti->ti_sum = in_cksum(m, tlen);
- ((struct ip *)ti)->ip_len = tlen;
- ((struct ip *)ti)->ip_ttl = ip_defttl;
-#ifdef TCPDEBUG
- if (tp == NULL || (tp->t_inpcb->inp_socket->so_options & SO_DEBUG))
- tcp_trace(TA_OUTPUT, 0, tp, ti, 0);
-#endif
- (void) ip_output(m, NULL, ro, 0, NULL);
- if (ro == &sro && ro->ro_rt) {
- RTFREE(ro->ro_rt);
- }
-}
-
-/*
- * Create a new TCP control block, making an
- * empty reassembly queue and hooking it to the argument
- * protocol control block.
- */
-struct tcpcb *
-tcp_newtcpcb(inp)
- struct inpcb *inp;
-{
- register struct tcpcb *tp;
-
- tp = malloc(sizeof(*tp), M_PCB, M_NOWAIT);
- if (tp == NULL)
- return ((struct tcpcb *)0);
- bzero((char *) tp, sizeof(struct tcpcb));
- tp->seg_next = tp->seg_prev = (struct tcpiphdr *)tp;
- tp->t_maxseg = tp->t_maxopd = tcp_mssdflt;
-
- if (tcp_do_rfc1323)
- tp->t_flags = (TF_REQ_SCALE|TF_REQ_TSTMP);
- if (tcp_do_rfc1644)
- tp->t_flags |= TF_REQ_CC;
- tp->t_inpcb = inp;
- /*
- * Init srtt to TCPTV_SRTTBASE (0), so we can tell that we have no
- * rtt estimate. Set rttvar so that srtt + 4 * rttvar gives
- * reasonable initial retransmit time.
- */
- tp->t_srtt = TCPTV_SRTTBASE;
- tp->t_rttvar = ((TCPTV_RTOBASE - TCPTV_SRTTBASE) << TCP_RTTVAR_SHIFT) / 4;
- tp->t_rttmin = TCPTV_MIN;
- tp->t_rxtcur = TCPTV_RTOBASE;
- tp->snd_cwnd = TCP_MAXWIN << TCP_MAX_WINSHIFT;
- tp->snd_ssthresh = TCP_MAXWIN << TCP_MAX_WINSHIFT;
- inp->inp_ip_ttl = ip_defttl;
- inp->inp_ppcb = (caddr_t)tp;
- return (tp);
-}
-
-/*
- * Drop a TCP connection, reporting
- * the specified error. If connection is synchronized,
- * then send a RST to peer.
- */
-struct tcpcb *
-tcp_drop(tp, errnum)
- register struct tcpcb *tp;
- int errnum;
-{
- struct socket *so = tp->t_inpcb->inp_socket;
-
- if (TCPS_HAVERCVDSYN(tp->t_state)) {
- tp->t_state = TCPS_CLOSED;
- (void) tcp_output(tp);
- tcpstat.tcps_drops++;
- } else
- tcpstat.tcps_conndrops++;
- if (errnum == ETIMEDOUT && tp->t_softerror)
- errnum = tp->t_softerror;
- so->so_error = errnum;
- return (tcp_close(tp));
-}
-
-/*
- * Close a TCP control block:
- * discard all space held by the tcp
- * discard internet protocol block
- * wake up any sleepers
- */
-struct tcpcb *
-tcp_close(tp)
- register struct tcpcb *tp;
-{
- register struct tcpiphdr *t;
- struct inpcb *inp = tp->t_inpcb;
- struct socket *so = inp->inp_socket;
- register struct mbuf *m;
- register struct rtentry *rt;
-
- /*
- * If we got enough samples through the srtt filter,
- * save the rtt and rttvar in the routing entry.
- * 'Enough' is arbitrarily defined as the 16 samples.
- * 16 samples is enough for the srtt filter to converge
- * to within 5% of the correct value; fewer samples and
- * we could save a very bogus rtt.
- *
- * Don't update the default route's characteristics and don't
- * update anything that the user "locked".
- */
- if (tp->t_rttupdated >= 16 &&
- (rt = inp->inp_route.ro_rt) &&
- ((struct sockaddr_in *)rt_key(rt))->sin_addr.s_addr != INADDR_ANY) {
- register u_long i = 0;
-
- if ((rt->rt_rmx.rmx_locks & RTV_RTT) == 0) {
- i = tp->t_srtt *
- (RTM_RTTUNIT / (PR_SLOWHZ * TCP_RTT_SCALE));
- if (rt->rt_rmx.rmx_rtt && i)
- /*
- * filter this update to half the old & half
- * the new values, converting scale.
- * See route.h and tcp_var.h for a
- * description of the scaling constants.
- */
- rt->rt_rmx.rmx_rtt =
- (rt->rt_rmx.rmx_rtt + i) / 2;
- else
- rt->rt_rmx.rmx_rtt = i;
- tcpstat.tcps_cachedrtt++;
- }
- if ((rt->rt_rmx.rmx_locks & RTV_RTTVAR) == 0) {
- i = tp->t_rttvar *
- (RTM_RTTUNIT / (PR_SLOWHZ * TCP_RTTVAR_SCALE));
- if (rt->rt_rmx.rmx_rttvar && i)
- rt->rt_rmx.rmx_rttvar =
- (rt->rt_rmx.rmx_rttvar + i) / 2;
- else
- rt->rt_rmx.rmx_rttvar = i;
- tcpstat.tcps_cachedrttvar++;
- }
- /*
- * update the pipelimit (ssthresh) if it has been updated
- * already or if a pipesize was specified & the threshhold
- * got below half the pipesize. I.e., wait for bad news
- * before we start updating, then update on both good
- * and bad news.
- */
- if (((rt->rt_rmx.rmx_locks & RTV_SSTHRESH) == 0 &&
- ((i = tp->snd_ssthresh) != 0) && rt->rt_rmx.rmx_ssthresh) ||
- i < (rt->rt_rmx.rmx_sendpipe / 2)) {
- /*
- * convert the limit from user data bytes to
- * packets then to packet data bytes.
- */
- i = (i + tp->t_maxseg / 2) / tp->t_maxseg;
- if (i < 2)
- i = 2;
- i *= (u_long)(tp->t_maxseg + sizeof (struct tcpiphdr));
- if (rt->rt_rmx.rmx_ssthresh)
- rt->rt_rmx.rmx_ssthresh =
- (rt->rt_rmx.rmx_ssthresh + i) / 2;
- else
- rt->rt_rmx.rmx_ssthresh = i;
- tcpstat.tcps_cachedssthresh++;
- }
- }
- /* free the reassembly queue, if any */
- t = tp->seg_next;
- while (t != (struct tcpiphdr *)tp) {
- t = (struct tcpiphdr *)t->ti_next;
- m = REASS_MBUF((struct tcpiphdr *)t->ti_prev);
- remque(t->ti_prev);
- m_freem(m);
- }
- if (tp->t_template)
- (void) m_free(dtom(tp->t_template));
- free(tp, M_PCB);
- inp->inp_ppcb = 0;
- soisdisconnected(so);
- in_pcbdetach(inp);
- tcpstat.tcps_closed++;
- return ((struct tcpcb *)0);
-}
-
-void
-tcp_drain()
-{
-
-}
-
-/*
- * Notify a tcp user of an asynchronous error;
- * store error as soft error, but wake up user
- * (for now, won't do anything until can select for soft error).
- */
-static void
-tcp_notify(inp, error)
- struct inpcb *inp;
- int error;
-{
- register struct tcpcb *tp = (struct tcpcb *)inp->inp_ppcb;
- register struct socket *so = inp->inp_socket;
-
- /*
- * Ignore some errors if we are hooked up.
- * If connection hasn't completed, has retransmitted several times,
- * and receives a second error, give up now. This is better
- * than waiting a long time to establish a connection that
- * can never complete.
- */
- if (tp->t_state == TCPS_ESTABLISHED &&
- (error == EHOSTUNREACH || error == ENETUNREACH ||
- error == EHOSTDOWN)) {
- return;
- } else if (tp->t_state < TCPS_ESTABLISHED && tp->t_rxtshift > 3 &&
- tp->t_softerror)
- so->so_error = error;
- else
- tp->t_softerror = error;
- soconnwakeup (so);
- sorwakeup(so);
- sowwakeup(so);
-}
-
-void
-tcp_ctlinput(cmd, sa, vip)
- int cmd;
- struct sockaddr *sa;
- void *vip;
-{
- register struct ip *ip = vip;
- register struct tcphdr *th;
- void (*notify) __P((struct inpcb *, int)) = tcp_notify;
-
- if (cmd == PRC_QUENCH)
- notify = tcp_quench;
-#if 1
- else if (cmd == PRC_MSGSIZE)
- notify = tcp_mtudisc;
-#endif
- else if (!PRC_IS_REDIRECT(cmd) &&
- ((unsigned)cmd > PRC_NCMDS || inetctlerrmap[cmd] == 0))
- return;
- if (ip) {
- th = (struct tcphdr *)((caddr_t)ip
- + (IP_VHL_HL(ip->ip_vhl) << 2));
- in_pcbnotify(&tcb, sa, th->th_dport, ip->ip_src, th->th_sport,
- cmd, notify);
- } else
- in_pcbnotify(&tcb, sa, 0, zeroin_addr, 0, cmd, notify);
-}
-
-/*
- * When a source quench is received, close congestion window
- * to one segment. We will gradually open it again as we proceed.
- */
-void
-tcp_quench(inp, errnum)
- struct inpcb *inp;
- int errnum;
-{
- struct tcpcb *tp = intotcpcb(inp);
-
- if (tp)
- tp->snd_cwnd = tp->t_maxseg;
-}
-
-#if 1
-/*
- * When `need fragmentation' ICMP is received, update our idea of the MSS
- * based on the new value in the route. Also nudge TCP to send something,
- * since we know the packet we just sent was dropped.
- * This duplicates some code in the tcp_mss() function in tcp_input.c.
- */
-void
-tcp_mtudisc(inp, errnum)
- struct inpcb *inp;
- int errnum;
-{
- struct tcpcb *tp = intotcpcb(inp);
- struct rtentry *rt;
- struct rmxp_tao *taop;
- struct socket *so = inp->inp_socket;
- int offered;
- int mss;
-
- if (tp) {
- rt = tcp_rtlookup(inp);
- if (!rt || !rt->rt_rmx.rmx_mtu) {
- tp->t_maxopd = tp->t_maxseg = tcp_mssdflt;
- return;
- }
- taop = rmx_taop(rt->rt_rmx);
- offered = taop->tao_mssopt;
- mss = rt->rt_rmx.rmx_mtu - sizeof(struct tcpiphdr);
- if (offered)
- mss = min(mss, offered);
- /*
- * XXX - The above conditional probably violates the TCP
- * spec. The problem is that, since we don't know the
- * other end's MSS, we are supposed to use a conservative
- * default. But, if we do that, then MTU discovery will
- * never actually take place, because the conservative
- * default is much less than the MTUs typically seen
- * on the Internet today. For the moment, we'll sweep
- * this under the carpet.
- *
- * The conservative default might not actually be a problem
- * if the only case this occurs is when sending an initial
- * SYN with options and data to a host we've never talked
- * to before. Then, they will reply with an MSS value which
- * will get recorded and the new parameters should get
- * recomputed. For Further Study.
- */
- if (tp->t_maxopd <= mss)
- return;
- tp->t_maxopd = mss;
-
- if ((tp->t_flags & (TF_REQ_TSTMP|TF_NOOPT)) == TF_REQ_TSTMP &&
- (tp->t_flags & TF_RCVD_TSTMP) == TF_RCVD_TSTMP)
- mss -= TCPOLEN_TSTAMP_APPA;
- if ((tp->t_flags & (TF_REQ_CC|TF_NOOPT)) == TF_REQ_CC &&
- (tp->t_flags & TF_RCVD_CC) == TF_RCVD_CC)
- mss -= TCPOLEN_CC_APPA;
-#if (MCLBYTES & (MCLBYTES - 1)) == 0
- if (mss > MCLBYTES)
- mss &= ~(MCLBYTES-1);
-#else
- if (mss > MCLBYTES)
- mss = mss / MCLBYTES * MCLBYTES;
-#endif
- if (so->so_snd.sb_hiwat < mss)
- mss = so->so_snd.sb_hiwat;
-
- tp->t_maxseg = mss;
-
- tcpstat.tcps_mturesent++;
- tp->t_rtt = 0;
- tp->snd_nxt = tp->snd_una;
- tcp_output(tp);
- }
-}
-#endif
-
-/*
- * Look-up the routing entry to the peer of this inpcb. If no route
- * is found and it cannot be allocated the return NULL. This routine
- * is called by TCP routines that access the rmx structure and by tcp_mss
- * to get the interface MTU.
- */
-struct rtentry *
-tcp_rtlookup(inp)
- struct inpcb *inp;
-{
- struct route *ro;
- struct rtentry *rt;
-
- ro = &inp->inp_route;
- rt = ro->ro_rt;
- if (rt == NULL || !(rt->rt_flags & RTF_UP)) {
- /* No route yet, so try to acquire one */
- if (inp->inp_faddr.s_addr != INADDR_ANY) {
- ro->ro_dst.sa_family = AF_INET;
- ro->ro_dst.sa_len = sizeof(ro->ro_dst);
- ((struct sockaddr_in *) &ro->ro_dst)->sin_addr =
- inp->inp_faddr;
- rtalloc(ro);
- rt = ro->ro_rt;
- }
- }
- return rt;
-}
-
-/*
- * Return a pointer to the cached information about the remote host.
- * The cached information is stored in the protocol specific part of
- * the route metrics.
- */
-struct rmxp_tao *
-tcp_gettaocache(inp)
- struct inpcb *inp;
-{
- struct rtentry *rt = tcp_rtlookup(inp);
-
- /* Make sure this is a host route and is up. */
- if (rt == NULL ||
- (rt->rt_flags & (RTF_UP|RTF_HOST)) != (RTF_UP|RTF_HOST))
- return NULL;
-
- return rmx_taop(rt->rt_rmx);
-}
-
-/*
- * Clear all the TAO cache entries, called from tcp_init.
- *
- * XXX
- * This routine is just an empty one, because we assume that the routing
- * routing tables are initialized at the same time when TCP, so there is
- * nothing in the cache left over.
- */
-static void
-tcp_cleartaocache(void)
-{ }
diff --git a/cpukit/libnetworking/netinet/tcp_timer.c b/cpukit/libnetworking/netinet/tcp_timer.c
deleted file mode 100644
index 04d3d604e2..0000000000
--- a/cpukit/libnetworking/netinet/tcp_timer.c
+++ /dev/null
@@ -1,387 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1995
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)tcp_timer.c 8.2 (Berkeley) 5/24/95
- * $Id$
- */
-
-#include "opt_tcpdebug.h"
-
-#ifndef TUBA_INCLUDE
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/sysctl.h>
-#include <sys/malloc.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/protosw.h>
-#include <sys/errno.h>
-
-#include <machine/cpu.h> /* before tcp_seq.h, for tcp_random18() */
-
-#include <net/if.h>
-#include <net/route.h>
-
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/in_pcb.h>
-#include <netinet/ip_var.h>
-#include <netinet/tcp.h>
-#include <netinet/tcp_fsm.h>
-#include <netinet/tcp_seq.h>
-#include <netinet/tcp_timer.h>
-#include <netinet/tcp_var.h>
-#include <netinet/tcpip.h>
-#ifdef TCPDEBUG
-#include <netinet/tcp_debug.h>
-#endif
-
-int tcp_keepinit = TCPTV_KEEP_INIT;
-SYSCTL_INT(_net_inet_tcp, TCPCTL_KEEPINIT, keepinit,
- CTLFLAG_RW, &tcp_keepinit , 0, "");
-
-int tcp_keepidle = TCPTV_KEEP_IDLE;
-SYSCTL_INT(_net_inet_tcp, TCPCTL_KEEPIDLE, keepidle,
- CTLFLAG_RW, &tcp_keepidle , 0, "");
-
-static int tcp_keepintvl = TCPTV_KEEPINTVL;
-SYSCTL_INT(_net_inet_tcp, TCPCTL_KEEPINTVL, keepintvl,
- CTLFLAG_RW, &tcp_keepintvl , 0, "");
-
-static int always_keepalive = 0;
-SYSCTL_INT(_net_inet_tcp, OID_AUTO, always_keepalive,
- CTLFLAG_RW, &always_keepalive , 0, "");
-
-static int tcp_keepcnt = TCPTV_KEEPCNT;
- /* max idle probes */
-static int tcp_maxpersistidle = TCPTV_KEEP_IDLE;
- /* max idle time in persist */
-int tcp_maxidle;
-#else /* TUBA_INCLUDE */
-
-static int tcp_maxpersistidle;
-#endif /* TUBA_INCLUDE */
-
-/*
- * Fast timeout routine for processing delayed acks
- */
-void
-tcp_fasttimo()
-{
- register struct inpcb *inp;
- register struct tcpcb *tp;
- int s;
-
- s = splnet();
-
- for (inp = tcb.lh_first; inp != NULL; inp = inp->inp_list.le_next) {
- if ((tp = (struct tcpcb *)inp->inp_ppcb) &&
- (tp->t_flags & TF_DELACK)) {
- tp->t_flags &= ~TF_DELACK;
- tp->t_flags |= TF_ACKNOW;
- tcpstat.tcps_delack++;
- (void) tcp_output(tp);
- }
- }
- splx(s);
-}
-
-/*
- * Tcp protocol timeout routine called every 500 ms.
- * Updates the timers in all active tcb's and
- * causes finite state machine actions if timers expire.
- */
-void
-tcp_slowtimo()
-{
- register struct inpcb *ip, *ipnxt;
- register struct tcpcb *tp;
- register int i;
- int s;
-#ifdef TCPDEBUG
- int ostate;
-#endif
-
- s = splnet();
-
- tcp_maxidle = tcp_keepcnt * tcp_keepintvl;
-
- ip = tcb.lh_first;
- if (ip == NULL) {
- splx(s);
- return;
- }
- /*
- * Search through tcb's and update active timers.
- */
- for (; ip != NULL; ip = ipnxt) {
- ipnxt = ip->inp_list.le_next;
- tp = intotcpcb(ip);
- if (tp == 0 || tp->t_state == TCPS_LISTEN)
- continue;
- for (i = 0; i < TCPT_NTIMERS; i++) {
- if (tp->t_timer[i] && --tp->t_timer[i] == 0) {
-#ifdef TCPDEBUG
- ostate = tp->t_state;
-#endif
- tp = tcp_timers(tp, i);
- if (tp == NULL)
- goto tpgone;
-#ifdef TCPDEBUG
- if (tp->t_inpcb->inp_socket->so_options
- & SO_DEBUG)
- tcp_trace(TA_USER, ostate, tp,
- (struct tcpiphdr *)0,
- PRU_SLOWTIMO);
-#endif
- }
- }
- tp->t_idle++;
- tp->t_duration++;
- if (tp->t_rtt)
- tp->t_rtt++;
-tpgone:
- ;
- }
- tcp_iss += TCP_ISSINCR/PR_SLOWHZ; /* increment iss */
-#ifdef TCP_COMPAT_42
- if ((int)tcp_iss < 0)
- tcp_iss = TCP_ISSINCR; /* XXX */
-#endif
- tcp_now++; /* for timestamps */
- splx(s);
-}
-#ifndef TUBA_INCLUDE
-
-/*
- * Cancel all timers for TCP tp.
- */
-void
-tcp_canceltimers(tp)
- struct tcpcb *tp;
-{
- register int i;
-
- for (i = 0; i < TCPT_NTIMERS; i++)
- tp->t_timer[i] = 0;
-}
-
-int tcp_backoff[TCP_MAXRXTSHIFT + 1] =
- { 1, 2, 4, 8, 16, 32, 64, 64, 64, 64, 64, 64, 64 };
-
-static int tcp_totbackoff = 511; /* sum of tcp_backoff[] */
-
-/*
- * TCP timer processing.
- */
-struct tcpcb *
-tcp_timers(tp, timer)
- register struct tcpcb *tp;
- int timer;
-{
- register int rexmt;
-
- switch (timer) {
-
- /*
- * 2 MSL timeout in shutdown went off. If we're closed but
- * still waiting for peer to close and connection has been idle
- * too long, or if 2MSL time is up from TIME_WAIT, delete connection
- * control block. Otherwise, check again in a bit.
- */
- case TCPT_2MSL:
- if (tp->t_state != TCPS_TIME_WAIT &&
- tp->t_idle <= tcp_maxidle)
- tp->t_timer[TCPT_2MSL] = tcp_keepintvl;
- else
- tp = tcp_close(tp);
- break;
-
- /*
- * Retransmission timer went off. Message has not
- * been acked within retransmit interval. Back off
- * to a longer retransmit interval and retransmit one segment.
- */
- case TCPT_REXMT:
- if (++tp->t_rxtshift > TCP_MAXRXTSHIFT) {
- tp->t_rxtshift = TCP_MAXRXTSHIFT;
- tcpstat.tcps_timeoutdrop++;
- tp = tcp_drop(tp, tp->t_softerror ?
- tp->t_softerror : ETIMEDOUT);
- break;
- }
- tcpstat.tcps_rexmttimeo++;
- rexmt = TCP_REXMTVAL(tp) * tcp_backoff[tp->t_rxtshift];
- TCPT_RANGESET(tp->t_rxtcur, rexmt,
- tp->t_rttmin, TCPTV_REXMTMAX);
- tp->t_timer[TCPT_REXMT] = tp->t_rxtcur;
- /*
- * If losing, let the lower level know and try for
- * a better route. Also, if we backed off this far,
- * our srtt estimate is probably bogus. Clobber it
- * so we'll take the next rtt measurement as our srtt;
- * move the current srtt into rttvar to keep the current
- * retransmit times until then.
- */
- if (tp->t_rxtshift > TCP_MAXRXTSHIFT / 4) {
- in_losing(tp->t_inpcb);
- tp->t_rttvar += (tp->t_srtt >> TCP_RTT_SHIFT);
- tp->t_srtt = 0;
- }
- tp->snd_nxt = tp->snd_una;
- /*
- * Force a segment to be sent.
- */
- tp->t_flags |= TF_ACKNOW;
- /*
- * If timing a segment in this window, stop the timer.
- */
- tp->t_rtt = 0;
- /*
- * Close the congestion window down to one segment
- * (we'll open it by one segment for each ack we get).
- * Since we probably have a window's worth of unacked
- * data accumulated, this "slow start" keeps us from
- * dumping all that data as back-to-back packets (which
- * might overwhelm an intermediate gateway).
- *
- * There are two phases to the opening: Initially we
- * open by one mss on each ack. This makes the window
- * size increase exponentially with time. If the
- * window is larger than the path can handle, this
- * exponential growth results in dropped packet(s)
- * almost immediately. To get more time between
- * drops but still "push" the network to take advantage
- * of improving conditions, we switch from exponential
- * to linear window opening at some threshhold size.
- * For a threshhold, we use half the current window
- * size, truncated to a multiple of the mss.
- *
- * (the minimum cwnd that will give us exponential
- * growth is 2 mss. We don't allow the threshhold
- * to go below this.)
- */
- {
- u_int win = min(tp->snd_wnd, tp->snd_cwnd) / 2 / tp->t_maxseg;
- if (win < 2)
- win = 2;
- tp->snd_cwnd = tp->t_maxseg;
- tp->snd_ssthresh = win * tp->t_maxseg;
- tp->t_dupacks = 0;
- }
- (void) tcp_output(tp);
- break;
-
- /*
- * Persistance timer into zero window.
- * Force a byte to be output, if possible.
- */
- case TCPT_PERSIST:
- tcpstat.tcps_persisttimeo++;
- /*
- * Hack: if the peer is dead/unreachable, we do not
- * time out if the window is closed. After a full
- * backoff, drop the connection if the idle time
- * (no responses to probes) reaches the maximum
- * backoff that we would use if retransmitting.
- */
- if (tp->t_rxtshift == TCP_MAXRXTSHIFT) {
- u_long maxidle = TCP_REXMTVAL(tp);
- if (maxidle < tp->t_rttmin)
- maxidle = tp->t_rttmin;
- maxidle *= tcp_totbackoff;
- if (tp->t_idle >= tcp_maxpersistidle ||
- tp->t_idle >= maxidle) {
- tcpstat.tcps_persistdrop++;
- tp = tcp_drop(tp, ETIMEDOUT);
- break;
- }
- }
- tcp_setpersist(tp);
- tp->t_force = 1;
- (void) tcp_output(tp);
- tp->t_force = 0;
- break;
-
- /*
- * Keep-alive timer went off; send something
- * or drop connection if idle for too long.
- */
- case TCPT_KEEP:
- tcpstat.tcps_keeptimeo++;
- if (tp->t_state < TCPS_ESTABLISHED)
- goto dropit;
- if ((always_keepalive ||
- tp->t_inpcb->inp_socket->so_options & SO_KEEPALIVE) &&
- tp->t_state <= TCPS_CLOSING) {
- if (tp->t_idle >= tcp_keepidle + tcp_maxidle)
- goto dropit;
- /*
- * Send a packet designed to force a response
- * if the peer is up and reachable:
- * either an ACK if the connection is still alive,
- * or an RST if the peer has closed the connection
- * due to timeout or reboot.
- * Using sequence number tp->snd_una-1
- * causes the transmitted zero-length segment
- * to lie outside the receive window;
- * by the protocol spec, this requires the
- * correspondent TCP to respond.
- */
- tcpstat.tcps_keepprobe++;
-#ifdef TCP_COMPAT_42
- /*
- * The keepalive packet must have nonzero length
- * to get a 4.2 host to respond.
- */
- tcp_respond(tp, tp->t_template, (struct mbuf *)NULL,
- tp->rcv_nxt - 1, tp->snd_una - 1, 0);
-#else
- tcp_respond(tp, tp->t_template, (struct mbuf *)NULL,
- tp->rcv_nxt, tp->snd_una - 1, 0);
-#endif
- tp->t_timer[TCPT_KEEP] = tcp_keepintvl;
- } else
- tp->t_timer[TCPT_KEEP] = tcp_keepidle;
- break;
- dropit:
- tcpstat.tcps_keepdrops++;
- tp = tcp_drop(tp, ETIMEDOUT);
- break;
- }
- return (tp);
-}
-#endif /* TUBA_INCLUDE */
diff --git a/cpukit/libnetworking/netinet/tcp_timer.h b/cpukit/libnetworking/netinet/tcp_timer.h
deleted file mode 100644
index 38ffac4ee7..0000000000
--- a/cpukit/libnetworking/netinet/tcp_timer.h
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)tcp_timer.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _NETINET_TCP_TIMER_H_
-#define _NETINET_TCP_TIMER_H_
-
-/*
- * Definitions of the TCP timers. These timers are counted
- * down PR_SLOWHZ times a second.
- */
-#define TCPT_NTIMERS 4
-
-#define TCPT_REXMT 0 /* retransmit */
-#define TCPT_PERSIST 1 /* retransmit persistence */
-#define TCPT_KEEP 2 /* keep alive */
-#define TCPT_2MSL 3 /* 2*msl quiet time timer */
-
-/*
- * The TCPT_REXMT timer is used to force retransmissions.
- * The TCP has the TCPT_REXMT timer set whenever segments
- * have been sent for which ACKs are expected but not yet
- * received. If an ACK is received which advances tp->snd_una,
- * then the retransmit timer is cleared (if there are no more
- * outstanding segments) or reset to the base value (if there
- * are more ACKs expected). Whenever the retransmit timer goes off,
- * we retransmit one unacknowledged segment, and do a backoff
- * on the retransmit timer.
- *
- * The TCPT_PERSIST timer is used to keep window size information
- * flowing even if the window goes shut. If all previous transmissions
- * have been acknowledged (so that there are no retransmissions in progress),
- * and the window is too small to bother sending anything, then we start
- * the TCPT_PERSIST timer. When it expires, if the window is nonzero,
- * we go to transmit state. Otherwise, at intervals send a single byte
- * into the peer's window to force him to update our window information.
- * We do this at most as often as TCPT_PERSMIN time intervals,
- * but no more frequently than the current estimate of round-trip
- * packet time. The TCPT_PERSIST timer is cleared whenever we receive
- * a window update from the peer.
- *
- * The TCPT_KEEP timer is used to keep connections alive. If an
- * connection is idle (no segments received) for TCPTV_KEEP_INIT amount of time,
- * but not yet established, then we drop the connection. Once the connection
- * is established, if the connection is idle for TCPTV_KEEP_IDLE time
- * (and keepalives have been enabled on the socket), we begin to probe
- * the connection. We force the peer to send us a segment by sending:
- * <SEQ=SND.UNA-1><ACK=RCV.NXT><CTL=ACK>
- * This segment is (deliberately) outside the window, and should elicit
- * an ack segment in response from the peer. If, despite the TCPT_KEEP
- * initiated segments we cannot elicit a response from a peer in TCPT_MAXIDLE
- * amount of time probing, then we drop the connection.
- */
-
-/*
- * Time constants.
- */
-#define TCPTV_MSL ( 30*PR_SLOWHZ) /* max seg lifetime (hah!) */
-#define TCPTV_SRTTBASE 0 /* base roundtrip time;
- if 0, no idea yet */
-#define TCPTV_RTOBASE ( 3*PR_SLOWHZ) /* assumed RTO if no info */
-#define TCPTV_SRTTDFLT ( 3*PR_SLOWHZ) /* assumed RTT if no info */
-
-#define TCPTV_PERSMIN ( 5*PR_SLOWHZ) /* retransmit persistence */
-#define TCPTV_PERSMAX ( 60*PR_SLOWHZ) /* maximum persist interval */
-
-#define TCPTV_KEEP_INIT ( 75*PR_SLOWHZ) /* initial connect keep alive */
-#define TCPTV_KEEP_IDLE (120*60*PR_SLOWHZ) /* dflt time before probing */
-#define TCPTV_KEEPINTVL ( 75*PR_SLOWHZ) /* default probe interval */
-#define TCPTV_KEEPCNT 8 /* max probes before drop */
-
-#define TCPTV_MIN ( 1*PR_SLOWHZ) /* minimum allowable value */
-#define TCPTV_REXMTMAX ( 64*PR_SLOWHZ) /* max allowable REXMT value */
-
-#define TCPTV_TWTRUNC 8 /* RTO factor to truncate TW */
-
-#define TCP_LINGERTIME 120 /* linger at most 2 minutes */
-
-#define TCP_MAXRXTSHIFT 12 /* maximum retransmits */
-
-#ifdef TCPTIMERS
-static char *tcptimers[] =
- { "REXMT", "PERSIST", "KEEP", "2MSL" };
-#endif
-
-/*
- * Force a time value to be in a certain range.
- */
-#define TCPT_RANGESET(tv, value, tvmin, tvmax) { \
- (tv) = (value); \
- if ((u_long)(tv) < (u_long)(tvmin)) \
- (tv) = (tvmin); \
- else if ((u_long)(tv) > (u_long)(tvmax)) \
- (tv) = (tvmax); \
-}
-
-#ifdef KERNEL
-extern int tcp_keepinit; /* time to establish connection */
-extern int tcp_keepidle; /* time before keepalive probes begin */
-extern int tcp_keepintvl; /* time between keepalive probes */
-extern int tcp_maxidle; /* time to drop after starting probes */
-extern int tcp_ttl; /* time to live for TCP segs */
-extern int tcp_backoff[];
-#endif
-
-#endif
diff --git a/cpukit/libnetworking/netinet/tcp_usrreq.c b/cpukit/libnetworking/netinet/tcp_usrreq.c
deleted file mode 100644
index ecd9d95636..0000000000
--- a/cpukit/libnetworking/netinet/tcp_usrreq.c
+++ /dev/null
@@ -1,840 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * From: @(#)tcp_usrreq.c 8.2 (Berkeley) 1/3/94
- * $Id$
- */
-
-#include "opt_tcpdebug.h"
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/sysctl.h>
-#include <sys/malloc.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/protosw.h>
-#include <sys/errno.h>
-#include <sys/stat.h>
-
-#include <net/if.h>
-#include <net/route.h>
-
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/in_pcb.h>
-#include <netinet/in_var.h>
-#include <netinet/ip_var.h>
-#include <netinet/tcp.h>
-#include <netinet/tcp_fsm.h>
-#include <netinet/tcp_seq.h>
-#include <netinet/tcp_timer.h>
-#include <netinet/tcp_var.h>
-#include <netinet/tcpip.h>
-#ifdef TCPDEBUG
-#include <netinet/tcp_debug.h>
-#endif
-
-/*
- * TCP protocol interface to socket abstraction.
- */
-extern char *tcpstates[];
-
-static int tcp_attach __P((struct socket *));
-static int tcp_connect __P((struct tcpcb *, struct mbuf *));
-static struct tcpcb *
- tcp_disconnect __P((struct tcpcb *));
-static struct tcpcb *
- tcp_usrclosed __P((struct tcpcb *));
-
-#ifdef TCPDEBUG
-#define TCPDEBUG0 int ostate
-#define TCPDEBUG1() ostate = tp ? tp->t_state : 0
-#define TCPDEBUG2(req) if (tp && (so->so_options & SO_DEBUG)) \
- tcp_trace(TA_USER, ostate, tp, 0, req)
-#else
-#define TCPDEBUG0
-#define TCPDEBUG1()
-#define TCPDEBUG2(req)
-#endif
-
-/*
- * TCP attaches to socket via pru_attach(), reserving space,
- * and an internet control block.
- */
-static int
-tcp_usr_attach(struct socket *so, int proto)
-{
- int s = splnet();
- int error;
- struct inpcb *inp = sotoinpcb(so);
- struct tcpcb *tp = 0;
- TCPDEBUG0;
-
- TCPDEBUG1();
- if (inp) {
- error = EISCONN;
- goto out;
- }
-
- error = tcp_attach(so);
- if (error)
- goto out;
-
- if ((so->so_options & SO_LINGER) && so->so_linger == 0)
- so->so_linger = TCP_LINGERTIME * hz;
- tp = sototcpcb(so);
-out:
- TCPDEBUG2(PRU_ATTACH);
- splx(s);
- return error;
-}
-
-/*
- * pru_detach() detaches the TCP protocol from the socket.
- * If the protocol state is non-embryonic, then can't
- * do this directly: have to initiate a pru_disconnect(),
- * which may finish later; embryonic TCB's can just
- * be discarded here.
- */
-static int
-tcp_usr_detach(struct socket *so)
-{
- int s = splnet();
- int error = 0;
- struct inpcb *inp = sotoinpcb(so);
- struct tcpcb *tp;
- TCPDEBUG0;
-
- if (inp == 0) {
- splx(s);
- return EINVAL; /* XXX */
- }
- tp = intotcpcb(inp);
- TCPDEBUG1();
- if (tp->t_state > TCPS_LISTEN)
- tp = tcp_disconnect(tp);
- else
- tp = tcp_close(tp);
-
- TCPDEBUG2(PRU_DETACH);
- splx(s);
- return error;
-}
-
-#define COMMON_START() TCPDEBUG0; \
- do { \
- if (inp == 0) { \
- splx(s); \
- return EINVAL; \
- } \
- tp = intotcpcb(inp); \
- TCPDEBUG1(); \
- } while(0)
-
-#define COMMON_END(req) out: TCPDEBUG2(req); splx(s); return error; goto out
-
-
-/*
- * Give the socket an address.
- */
-static int
-tcp_usr_bind(struct socket *so, struct mbuf *nam)
-{
- int s = splnet();
- int error = 0;
- struct inpcb *inp = sotoinpcb(so);
- struct tcpcb *tp;
- struct sockaddr_in *sinp;
-
- COMMON_START();
-
- /*
- * Must check for multicast addresses and disallow binding
- * to them.
- */
- sinp = mtod(nam, struct sockaddr_in *);
- if (sinp->sin_family == AF_INET &&
- IN_MULTICAST(ntohl(sinp->sin_addr.s_addr))) {
- error = EAFNOSUPPORT;
- goto out;
- }
- error = in_pcbbind(inp, nam);
- if (error)
- goto out;
- COMMON_END(PRU_BIND);
-
-}
-
-/*
- * Prepare to accept connections.
- */
-static int
-tcp_usr_listen(struct socket *so)
-{
- int s = splnet();
- int error = 0;
- struct inpcb *inp = sotoinpcb(so);
- struct tcpcb *tp;
-
- COMMON_START();
- if (inp->inp_lport == 0)
- error = in_pcbbind(inp, NULL);
- if (error == 0)
- tp->t_state = TCPS_LISTEN;
- COMMON_END(PRU_LISTEN);
-}
-
-/*
- * Initiate connection to peer.
- * Create a template for use in transmissions on this connection.
- * Enter SYN_SENT state, and mark socket as connecting.
- * Start keep-alive timer, and seed output sequence space.
- * Send initial segment on connection.
- */
-static int
-tcp_usr_connect(struct socket *so, struct mbuf *nam)
-{
- int s = splnet();
- int error = 0;
- struct inpcb *inp = sotoinpcb(so);
- struct tcpcb *tp;
- struct sockaddr_in *sinp;
-
- COMMON_START();
-
- /*
- * Must disallow TCP ``connections'' to multicast addresses.
- */
- sinp = mtod(nam, struct sockaddr_in *);
- if (sinp->sin_family == AF_INET
- && IN_MULTICAST(ntohl(sinp->sin_addr.s_addr))) {
- error = EAFNOSUPPORT;
- goto out;
- }
-
- if ((error = tcp_connect(tp, nam)) != 0)
- goto out;
- error = tcp_output(tp);
- COMMON_END(PRU_CONNECT);
-}
-
-/*
- * Initiate disconnect from peer.
- * If connection never passed embryonic stage, just drop;
- * else if don't need to let data drain, then can just drop anyways,
- * else have to begin TCP shutdown process: mark socket disconnecting,
- * drain unread data, state switch to reflect user close, and
- * send segment (e.g. FIN) to peer. Socket will be really disconnected
- * when peer sends FIN and acks ours.
- *
- * SHOULD IMPLEMENT LATER PRU_CONNECT VIA REALLOC TCPCB.
- */
-static int
-tcp_usr_disconnect(struct socket *so)
-{
- int s = splnet();
- int error = 0;
- struct inpcb *inp = sotoinpcb(so);
- struct tcpcb *tp;
-
- COMMON_START();
- tp = tcp_disconnect(tp);
- COMMON_END(PRU_DISCONNECT);
-}
-
-/*
- * Accept a connection. Essentially all the work is
- * done at higher levels; just return the address
- * of the peer, storing through addr.
- */
-static int
-tcp_usr_accept(struct socket *so, struct mbuf *nam)
-{
- int s = splnet();
- int error = 0;
- struct inpcb *inp = sotoinpcb(so);
- struct tcpcb *tp;
-
- COMMON_START();
- in_setpeeraddr(inp, nam);
- COMMON_END(PRU_ACCEPT);
-}
-
-/*
- * Mark the connection as being incapable of further output.
- */
-static int
-tcp_usr_shutdown(struct socket *so)
-{
- int s = splnet();
- int error = 0;
- struct inpcb *inp = sotoinpcb(so);
- struct tcpcb *tp;
-
- COMMON_START();
- socantsendmore(so);
- tp = tcp_usrclosed(tp);
- if (tp)
- error = tcp_output(tp);
- COMMON_END(PRU_SHUTDOWN);
-}
-
-/*
- * After a receive, possibly send window update to peer.
- */
-static int
-tcp_usr_rcvd(struct socket *so, int flags)
-{
- int s = splnet();
- int error = 0;
- struct inpcb *inp = sotoinpcb(so);
- struct tcpcb *tp;
-
- COMMON_START();
- tcp_output(tp);
- COMMON_END(PRU_RCVD);
-}
-
-/*
- * Do a send by putting data in output queue and updating urgent
- * marker if URG set. Possibly send more data.
- */
-static int
-tcp_usr_send(struct socket *so, int flags, struct mbuf *m, struct mbuf *nam,
- struct mbuf *control)
-{
- int s = splnet();
- int error = 0;
- struct inpcb *inp = sotoinpcb(so);
- struct tcpcb *tp;
-
- COMMON_START();
- if (control && control->m_len) {
- m_freem(control); /* XXX shouldn't caller do this??? */
- if (m)
- m_freem(m);
- error = EINVAL;
- goto out;
- }
-
- if(!(flags & PRUS_OOB)) {
- sbappend(&so->so_snd, m);
- if (nam && tp->t_state < TCPS_SYN_SENT) {
- /*
- * Do implied connect if not yet connected,
- * initialize window to default value, and
- * initialize maxseg/maxopd using peer's cached
- * MSS.
- */
- error = tcp_connect(tp, nam);
- if (error)
- goto out;
- tp->snd_wnd = TTCP_CLIENT_SND_WND;
- tcp_mss(tp, -1);
- }
-
- if (flags & PRUS_EOF) {
- /*
- * Close the send side of the connection after
- * the data is sent.
- */
- socantsendmore(so);
- tp = tcp_usrclosed(tp);
- }
- if (tp != NULL)
- error = tcp_output(tp);
- } else {
- if (sbspace(&so->so_snd) < -512) {
- m_freem(m);
- error = ENOBUFS;
- goto out;
- }
- /*
- * According to RFC961 (Assigned Protocols),
- * the urgent pointer points to the last octet
- * of urgent data. We continue, however,
- * to consider it to indicate the first octet
- * of data past the urgent section.
- * Otherwise, snd_up should be one lower.
- */
- sbappend(&so->so_snd, m);
- if (nam && tp->t_state < TCPS_SYN_SENT) {
- /*
- * Do implied connect if not yet connected,
- * initialize window to default value, and
- * initialize maxseg/maxopd using peer's cached
- * MSS.
- */
- error = tcp_connect(tp, nam);
- if (error)
- goto out;
- tp->snd_wnd = TTCP_CLIENT_SND_WND;
- tcp_mss(tp, -1);
- }
- tp->snd_up = tp->snd_una + so->so_snd.sb_cc;
- tp->t_force = 1;
- error = tcp_output(tp);
- tp->t_force = 0;
- }
- COMMON_END((flags & PRUS_OOB) ? PRU_SENDOOB :
- ((flags & PRUS_EOF) ? PRU_SEND_EOF : PRU_SEND));
-}
-
-/*
- * Abort the TCP.
- */
-static int
-tcp_usr_abort(struct socket *so)
-{
- int s = splnet();
- int error = 0;
- struct inpcb *inp = sotoinpcb(so);
- struct tcpcb *tp;
-
- COMMON_START();
- tp = tcp_drop(tp, ECONNABORTED);
- COMMON_END(PRU_ABORT);
-}
-
-/*
- * Fill in st_bklsize for fstat() operations on a socket.
- */
-static int
-tcp_usr_sense(struct socket *so, struct stat *sb)
-{
- int s = splnet();
-
- sb->st_blksize = so->so_snd.sb_hiwat;
- splx(s);
- return 0;
-}
-
-/*
- * Receive out-of-band data.
- */
-static int
-tcp_usr_rcvoob(struct socket *so, struct mbuf *m, int flags)
-{
- int s = splnet();
- int error = 0;
- struct inpcb *inp = sotoinpcb(so);
- struct tcpcb *tp;
-
- COMMON_START();
- if ((so->so_oobmark == 0 &&
- (so->so_state & SS_RCVATMARK) == 0) ||
- so->so_options & SO_OOBINLINE ||
- tp->t_oobflags & TCPOOB_HADDATA) {
- error = EINVAL;
- goto out;
- }
- if ((tp->t_oobflags & TCPOOB_HAVEDATA) == 0) {
- error = EWOULDBLOCK;
- goto out;
- }
- m->m_len = 1;
- *mtod(m, caddr_t) = tp->t_iobc;
- if ((flags & MSG_PEEK) == 0)
- tp->t_oobflags ^= (TCPOOB_HAVEDATA | TCPOOB_HADDATA);
- COMMON_END(PRU_RCVOOB);
-}
-
-static int
-tcp_usr_sockaddr(struct socket *so, struct mbuf *nam)
-{
- int s = splnet();
- int error = 0;
- struct inpcb *inp = sotoinpcb(so);
- struct tcpcb *tp;
-
- COMMON_START();
- in_setsockaddr(inp, nam);
- COMMON_END(PRU_SOCKADDR);
-}
-
-static int
-tcp_usr_peeraddr(struct socket *so, struct mbuf *nam)
-{
- int s = splnet();
- int error = 0;
- struct inpcb *inp = sotoinpcb(so);
- struct tcpcb *tp;
-
- COMMON_START();
- in_setpeeraddr(inp, nam);
- COMMON_END(PRU_PEERADDR);
-}
-
-/*
- * XXX - this should just be a call to in_control, but we need to get
- * the types worked out.
- */
-static int
-tcp_usr_control(struct socket *so, int cmd, caddr_t arg, struct ifnet *ifp)
-{
- return in_control(so, cmd, arg, ifp);
-}
-
-/* xxx - should be const */
-struct pr_usrreqs tcp_usrreqs = {
- tcp_usr_abort, tcp_usr_accept, tcp_usr_attach, tcp_usr_bind,
- tcp_usr_connect, pru_connect2_notsupp, tcp_usr_control, tcp_usr_detach,
- tcp_usr_disconnect, tcp_usr_listen, tcp_usr_peeraddr, tcp_usr_rcvd,
- tcp_usr_rcvoob, tcp_usr_send, tcp_usr_sense, tcp_usr_shutdown,
- tcp_usr_sockaddr
-};
-
-/*
- * Common subroutine to open a TCP connection to remote host specified
- * by struct sockaddr_in in mbuf *nam. Call in_pcbbind to assign a local
- * port number if needed. Call in_pcbladdr to do the routing and to choose
- * a local host address (interface). If there is an existing incarnation
- * of the same connection in TIME-WAIT state and if the remote host was
- * sending CC options and if the connection duration was < MSL, then
- * truncate the previous TIME-WAIT state and proceed.
- * Initialize connection parameters and enter SYN-SENT state.
- */
-static int
-tcp_connect(tp, nam)
- register struct tcpcb *tp;
- struct mbuf *nam;
-{
- struct inpcb *inp = tp->t_inpcb, *oinp;
- struct socket *so = inp->inp_socket;
- struct tcpcb *otp;
- struct sockaddr_in *sin = mtod(nam, struct sockaddr_in *);
- struct sockaddr_in *ifaddr;
- int error;
- struct rmxp_tao *taop;
- struct rmxp_tao tao_noncached;
-
- if (inp->inp_lport == 0) {
- error = in_pcbbind(inp, NULL);
- if (error)
- return error;
- }
-
- /*
- * Cannot simply call in_pcbconnect, because there might be an
- * earlier incarnation of this same connection still in
- * TIME_WAIT state, creating an ADDRINUSE error.
- */
- error = in_pcbladdr(inp, nam, &ifaddr);
- if (error)
- return error;
- oinp = in_pcblookuphash(inp->inp_pcbinfo,
- sin->sin_addr, sin->sin_port,
- inp->inp_laddr.s_addr != INADDR_ANY ? inp->inp_laddr
- : ifaddr->sin_addr,
- inp->inp_lport, 0);
- if (oinp) {
- if (oinp != inp && (otp = intotcpcb(oinp)) != NULL &&
- otp->t_state == TCPS_TIME_WAIT &&
- otp->t_duration < TCPTV_MSL &&
- (otp->t_flags & TF_RCVD_CC))
- otp = tcp_close(otp);
- else
- return EADDRINUSE;
- }
- if (inp->inp_laddr.s_addr == INADDR_ANY)
- inp->inp_laddr = ifaddr->sin_addr;
- inp->inp_faddr = sin->sin_addr;
- inp->inp_fport = sin->sin_port;
- in_pcbrehash(inp);
-
- tp->t_template = tcp_template(tp);
- if (tp->t_template == 0) {
- in_pcbdisconnect(inp);
- return ENOBUFS;
- }
-
- /* Compute window scaling to request. */
- while (tp->request_r_scale < TCP_MAX_WINSHIFT &&
- (TCP_MAXWIN << tp->request_r_scale) < so->so_rcv.sb_hiwat)
- tp->request_r_scale++;
-
- soisconnecting(so);
- tcpstat.tcps_connattempt++;
- tp->t_state = TCPS_SYN_SENT;
- tp->t_timer[TCPT_KEEP] = tcp_keepinit;
- tp->iss = tcp_iss; tcp_iss += TCP_ISSINCR/2;
- tcp_sendseqinit(tp);
-
- /*
- * Generate a CC value for this connection and
- * check whether CC or CCnew should be used.
- */
- if ((taop = tcp_gettaocache(tp->t_inpcb)) == NULL) {
- taop = &tao_noncached;
- bzero(taop, sizeof(*taop));
- }
-
- tp->cc_send = CC_INC(tcp_ccgen);
- if (taop->tao_ccsent != 0 &&
- CC_GEQ(tp->cc_send, taop->tao_ccsent)) {
- taop->tao_ccsent = tp->cc_send;
- } else {
- taop->tao_ccsent = 0;
- tp->t_flags |= TF_SENDCCNEW;
- }
-
- return 0;
-}
-
-int
-tcp_ctloutput(op, so, level, optname, mp)
- int op;
- struct socket *so;
- int level, optname;
- struct mbuf **mp;
-{
- int error = 0, s;
- struct inpcb *inp;
- register struct tcpcb *tp;
- register struct mbuf *m;
- register int i;
-
- s = splnet();
- inp = sotoinpcb(so);
- if (inp == NULL) {
- splx(s);
- if (op == PRCO_SETOPT && *mp)
- (void) m_free(*mp);
- return (ECONNRESET);
- }
- if (level != IPPROTO_TCP) {
- error = ip_ctloutput(op, so, level, optname, mp);
- splx(s);
- return (error);
- }
- tp = intotcpcb(inp);
-
- switch (op) {
-
- case PRCO_SETOPT:
- m = *mp;
- switch (optname) {
-
- case TCP_NODELAY:
- if (m == NULL || m->m_len < sizeof (int))
- error = EINVAL;
- else if (*mtod(m, int *))
- tp->t_flags |= TF_NODELAY;
- else
- tp->t_flags &= ~TF_NODELAY;
- break;
-
- case TCP_MAXSEG:
- if (m && (i = *mtod(m, int *)) > 0 && i <= tp->t_maxseg)
- tp->t_maxseg = i;
- else
- error = EINVAL;
- break;
-
- case TCP_NOOPT:
- if (m == NULL || m->m_len < sizeof (int))
- error = EINVAL;
- else if (*mtod(m, int *))
- tp->t_flags |= TF_NOOPT;
- else
- tp->t_flags &= ~TF_NOOPT;
- break;
-
- case TCP_NOPUSH:
- if (m == NULL || m->m_len < sizeof (int))
- error = EINVAL;
- else if (*mtod(m, int *))
- tp->t_flags |= TF_NOPUSH;
- else
- tp->t_flags &= ~TF_NOPUSH;
- break;
-
- default:
- error = ENOPROTOOPT;
- break;
- }
- if (m)
- (void) m_free(m);
- break;
-
- case PRCO_GETOPT:
- *mp = m = m_get(M_WAIT, MT_SOOPTS);
- m->m_len = sizeof(int);
-
- switch (optname) {
- case TCP_NODELAY:
- *mtod(m, int *) = tp->t_flags & TF_NODELAY;
- break;
- case TCP_MAXSEG:
- *mtod(m, int *) = tp->t_maxseg;
- break;
- case TCP_NOOPT:
- *mtod(m, int *) = tp->t_flags & TF_NOOPT;
- break;
- case TCP_NOPUSH:
- *mtod(m, int *) = tp->t_flags & TF_NOPUSH;
- break;
- default:
- error = ENOPROTOOPT;
- break;
- }
- break;
- }
- splx(s);
- return (error);
-}
-
-/*
- * tcp_sendspace and tcp_recvspace are the default send and receive window
- * sizes, respectively. These are obsolescent (this information should
- * be set by the route).
- */
-u_long tcp_sendspace = 1024*16;
-SYSCTL_INT(_net_inet_tcp, TCPCTL_SENDSPACE, sendspace,
- CTLFLAG_RW, &tcp_sendspace , 0, "");
-u_long tcp_recvspace = 1024*16;
-SYSCTL_INT(_net_inet_tcp, TCPCTL_RECVSPACE, recvspace,
- CTLFLAG_RW, &tcp_recvspace , 0, "");
-
-/*
- * Attach TCP protocol to socket, allocating
- * internet protocol control block, tcp control block,
- * bufer space, and entering LISTEN state if to accept connections.
- */
-static int
-tcp_attach(so)
- struct socket *so;
-{
- register struct tcpcb *tp;
- struct inpcb *inp;
- int error;
-
- if (so->so_snd.sb_hiwat == 0 || so->so_rcv.sb_hiwat == 0) {
- error = soreserve(so, tcp_sendspace, tcp_recvspace);
- if (error)
- return (error);
- }
- error = in_pcballoc(so, &tcbinfo);
- if (error)
- return (error);
- inp = sotoinpcb(so);
- tp = tcp_newtcpcb(inp);
- if (tp == 0) {
- int nofd = so->so_state & SS_NOFDREF; /* XXX */
-
- so->so_state &= ~SS_NOFDREF; /* don't free the socket yet */
- in_pcbdetach(inp);
- so->so_state |= nofd;
- return (ENOBUFS);
- }
- tp->t_state = TCPS_CLOSED;
- return (0);
-}
-
-/*
- * Initiate (or continue) disconnect.
- * If embryonic state, just send reset (once).
- * If in ``let data drain'' option and linger null, just drop.
- * Otherwise (hard), mark socket disconnecting and drop
- * current input data; switch states based on user close, and
- * send segment to peer (with FIN).
- */
-static struct tcpcb *
-tcp_disconnect(tp)
- register struct tcpcb *tp;
-{
- struct socket *so = tp->t_inpcb->inp_socket;
-
- if (tp->t_state < TCPS_ESTABLISHED)
- tp = tcp_close(tp);
- else if ((so->so_options & SO_LINGER) && so->so_linger == 0)
- tp = tcp_drop(tp, 0);
- else {
- soisdisconnecting(so);
- sbflush(&so->so_rcv);
- tp = tcp_usrclosed(tp);
- if (tp)
- (void) tcp_output(tp);
- }
- return (tp);
-}
-
-/*
- * User issued close, and wish to trail through shutdown states:
- * if never received SYN, just forget it. If got a SYN from peer,
- * but haven't sent FIN, then go to FIN_WAIT_1 state to send peer a FIN.
- * If already got a FIN from peer, then almost done; go to LAST_ACK
- * state. In all other cases, have already sent FIN to peer (e.g.
- * after PRU_SHUTDOWN), and just have to play tedious game waiting
- * for peer to send FIN or not respond to keep-alives, etc.
- * We can let the user exit from the close as soon as the FIN is acked.
- */
-static struct tcpcb *
-tcp_usrclosed(tp)
- register struct tcpcb *tp;
-{
-
- switch (tp->t_state) {
-
- case TCPS_CLOSED:
- case TCPS_LISTEN:
- tp->t_state = TCPS_CLOSED;
- tp = tcp_close(tp);
- break;
-
- case TCPS_SYN_SENT:
- case TCPS_SYN_RECEIVED:
- tp->t_flags |= TF_NEEDFIN;
- break;
-
- case TCPS_ESTABLISHED:
- tp->t_state = TCPS_FIN_WAIT_1;
- break;
-
- case TCPS_CLOSE_WAIT:
- tp->t_state = TCPS_LAST_ACK;
- break;
- }
- if (tp && tp->t_state >= TCPS_FIN_WAIT_2) {
- soisdisconnected(tp->t_inpcb->inp_socket);
- /* To prevent the connection hanging in FIN_WAIT_2 forever. */
- if (tp->t_state == TCPS_FIN_WAIT_2)
- tp->t_timer[TCPT_2MSL] = tcp_maxidle;
- }
- return (tp);
-}
-
diff --git a/cpukit/libnetworking/netinet/tcp_var.h b/cpukit/libnetworking/netinet/tcp_var.h
deleted file mode 100644
index 8e63a2cafe..0000000000
--- a/cpukit/libnetworking/netinet/tcp_var.h
+++ /dev/null
@@ -1,374 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993, 1994, 1995
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)tcp_var.h 8.4 (Berkeley) 5/24/95
- * $Id$
- */
-
-#ifndef _NETINET_TCP_VAR_H_
-#define _NETINET_TCP_VAR_H_
-/*
- * Kernel variables for tcp.
- */
-
-/*
- * Tcp control block, one per tcp; fields:
- */
-struct tcpcb {
- struct tcpiphdr *seg_next; /* sequencing queue */
- struct tcpiphdr *seg_prev;
- int t_state; /* state of this connection */
- int t_timer[TCPT_NTIMERS]; /* tcp timers */
- int t_rxtshift; /* log(2) of rexmt exp. backoff */
- int t_rxtcur; /* current retransmit value */
- int t_dupacks; /* consecutive dup acks recd */
- u_int t_maxseg; /* maximum segment size */
- u_int t_maxopd; /* mss plus options */
- int t_force; /* 1 if forcing out a byte */
- u_int t_flags;
-#define TF_ACKNOW 0x0001 /* ack peer immediately */
-#define TF_DELACK 0x0002 /* ack, but try to delay it */
-#define TF_NODELAY 0x0004 /* don't delay packets to coalesce */
-#define TF_NOOPT 0x0008 /* don't use tcp options */
-#define TF_SENTFIN 0x0010 /* have sent FIN */
-#define TF_REQ_SCALE 0x0020 /* have/will request window scaling */
-#define TF_RCVD_SCALE 0x0040 /* other side has requested scaling */
-#define TF_REQ_TSTMP 0x0080 /* have/will request timestamps */
-#define TF_RCVD_TSTMP 0x0100 /* a timestamp was received in SYN */
-#define TF_SACK_PERMIT 0x0200 /* other side said I could SACK */
-#define TF_NEEDSYN 0x0400 /* send SYN (implicit state) */
-#define TF_NEEDFIN 0x0800 /* send FIN (implicit state) */
-#define TF_NOPUSH 0x1000 /* don't push */
-#define TF_REQ_CC 0x2000 /* have/will request CC */
-#define TF_RCVD_CC 0x4000 /* a CC was received in SYN */
-#define TF_SENDCCNEW 0x8000 /* send CCnew instead of CC in SYN */
-
- struct tcpiphdr *t_template; /* skeletal packet for transmit */
- struct inpcb *t_inpcb; /* back pointer to internet pcb */
-/*
- * The following fields are used as in the protocol specification.
- * See RFC783, Dec. 1981, page 21.
- */
-/* send sequence variables */
- tcp_seq snd_una; /* send unacknowledged */
- tcp_seq snd_nxt; /* send next */
- tcp_seq snd_up; /* send urgent pointer */
- tcp_seq snd_wl1; /* window update seg seq number */
- tcp_seq snd_wl2; /* window update seg ack number */
- tcp_seq iss; /* initial send sequence number */
- u_long snd_wnd; /* send window */
-/* receive sequence variables */
- u_long rcv_wnd; /* receive window */
- tcp_seq rcv_nxt; /* receive next */
- tcp_seq rcv_up; /* receive urgent pointer */
- tcp_seq irs; /* initial receive sequence number */
-/*
- * Additional variables for this implementation.
- */
-/* receive variables */
- tcp_seq rcv_adv; /* advertised window */
-/* retransmit variables */
- tcp_seq snd_max; /* highest sequence number sent;
- * used to recognize retransmits
- */
-/* congestion control (for slow start, source quench, retransmit after loss) */
- u_long snd_cwnd; /* congestion-controlled window */
- u_long snd_ssthresh; /* snd_cwnd size threshold for
- * for slow start exponential to
- * linear switch
- */
-/*
- * transmit timing stuff. See below for scale of srtt and rttvar.
- * "Variance" is actually smoothed difference.
- */
- u_int t_idle; /* inactivity time */
- int t_rtt; /* round trip time */
- tcp_seq t_rtseq; /* sequence number being timed */
- int t_srtt; /* smoothed round-trip time */
- int t_rttvar; /* variance in round-trip time */
- u_int t_rttmin; /* minimum rtt allowed */
- u_long max_sndwnd; /* largest window peer has offered */
-
-/* out-of-band data */
- char t_oobflags; /* have some */
- char t_iobc; /* input character */
-#define TCPOOB_HAVEDATA 0x01
-#define TCPOOB_HADDATA 0x02
- int t_softerror; /* possible error not yet reported */
-
-/* RFC 1323 variables */
- u_char snd_scale; /* window scaling for send window */
- u_char rcv_scale; /* window scaling for recv window */
- u_char request_r_scale; /* pending window scaling */
- u_char requested_s_scale;
- u_long ts_recent; /* timestamp echo data */
- u_long ts_recent_age; /* when last updated */
- tcp_seq last_ack_sent;
-/* RFC 1644 variables */
- tcp_cc cc_send; /* send connection count */
- tcp_cc cc_recv; /* receive connection count */
- u_long t_duration; /* connection duration */
-
-/* TUBA stuff */
- caddr_t t_tuba_pcb; /* next level down pcb for TCP over z */
-/* More RTT stuff */
- u_long t_rttupdated; /* number of times rtt sampled */
-};
-
-/*
- * Structure to hold TCP options that are only used during segment
- * processing (in tcp_input), but not held in the tcpcb.
- * It's basically used to reduce the number of parameters
- * to tcp_dooptions.
- */
-struct tcpopt {
- u_long to_flag; /* which options are present */
-#define TOF_TS 0x0001 /* timestamp */
-#define TOF_CC 0x0002 /* CC and CCnew are exclusive */
-#define TOF_CCNEW 0x0004
-#define TOF_CCECHO 0x0008
- u_long to_tsval;
- u_long to_tsecr;
- tcp_cc to_cc; /* holds CC or CCnew */
- tcp_cc to_ccecho;
-};
-
-/*
- * The TAO cache entry which is stored in the protocol family specific
- * portion of the route metrics.
- */
-struct rmxp_tao {
- tcp_cc tao_cc; /* latest CC in valid SYN */
- tcp_cc tao_ccsent; /* latest CC sent to peer */
- u_short tao_mssopt; /* peer's cached MSS */
-#ifdef notyet
- u_short tao_flags; /* cache status flags */
-#define TAOF_DONT 0x0001 /* peer doesn't understand rfc1644 */
-#define TAOF_OK 0x0002 /* peer does understand rfc1644 */
-#define TAOF_UNDEF 0 /* we don't know yet */
-#endif /* notyet */
-};
-#define rmx_taop(r) ((struct rmxp_tao *)(r).rmx_filler)
-
-#define intotcpcb(ip) ((struct tcpcb *)(ip)->inp_ppcb)
-#define sototcpcb(so) (intotcpcb(sotoinpcb(so)))
-
-/*
- * The smoothed round-trip time and estimated variance
- * are stored as fixed point numbers scaled by the values below.
- * For convenience, these scales are also used in smoothing the average
- * (smoothed = (1/scale)sample + ((scale-1)/scale)smoothed).
- * With these scales, srtt has 3 bits to the right of the binary point,
- * and thus an "ALPHA" of 0.875. rttvar has 2 bits to the right of the
- * binary point, and is smoothed with an ALPHA of 0.75.
- */
-#define TCP_RTT_SCALE 32 /* multiplier for srtt; 3 bits frac. */
-#define TCP_RTT_SHIFT 5 /* shift for srtt; 3 bits frac. */
-#define TCP_RTTVAR_SCALE 16 /* multiplier for rttvar; 2 bits */
-#define TCP_RTTVAR_SHIFT 4 /* shift for rttvar; 2 bits */
-#define TCP_DELTA_SHIFT 2 /* see tcp_input.c */
-
-/*
- * The initial retransmission should happen at rtt + 4 * rttvar.
- * Because of the way we do the smoothing, srtt and rttvar
- * will each average +1/2 tick of bias. When we compute
- * the retransmit timer, we want 1/2 tick of rounding and
- * 1 extra tick because of +-1/2 tick uncertainty in the
- * firing of the timer. The bias will give us exactly the
- * 1.5 tick we need. But, because the bias is
- * statistical, we have to test that we don't drop below
- * the minimum feasible timer (which is 2 ticks).
- * This version of the macro adapted from a paper by Lawrence
- * Brakmo and Larry Peterson which outlines a problem caused
- * by insufficient precision in the original implementation,
- * which results in inappropriately large RTO values for very
- * fast networks.
- */
-#define TCP_REXMTVAL(tp) \
- ((((tp)->t_srtt >> (TCP_RTT_SHIFT - TCP_DELTA_SHIFT)) \
- + (tp)->t_rttvar) >> TCP_DELTA_SHIFT)
-
-/* XXX
- * We want to avoid doing m_pullup on incoming packets but that
- * means avoiding dtom on the tcp reassembly code. That in turn means
- * keeping an mbuf pointer in the reassembly queue (since we might
- * have a cluster). As a quick hack, the source & destination
- * port numbers (which are no longer needed once we've located the
- * tcpcb) are overlayed with an mbuf pointer.
- */
-#define REASS_MBUF(ti) (*(struct mbuf **)&((ti)->ti_t))
-
-/*
- * TCP statistics.
- * Many of these should be kept per connection,
- * but that's inconvenient at the moment.
- */
-struct tcpstat {
- u_long tcps_connattempt; /* connections initiated */
- u_long tcps_accepts; /* connections accepted */
- u_long tcps_connects; /* connections established */
- u_long tcps_drops; /* connections dropped */
- u_long tcps_conndrops; /* embryonic connections dropped */
- u_long tcps_closed; /* conn. closed (includes drops) */
- u_long tcps_segstimed; /* segs where we tried to get rtt */
- u_long tcps_rttupdated; /* times we succeeded */
- u_long tcps_delack; /* delayed acks sent */
- u_long tcps_timeoutdrop; /* conn. dropped in rxmt timeout */
- u_long tcps_rexmttimeo; /* retransmit timeouts */
- u_long tcps_persisttimeo; /* persist timeouts */
- u_long tcps_keeptimeo; /* keepalive timeouts */
- u_long tcps_keepprobe; /* keepalive probes sent */
- u_long tcps_keepdrops; /* connections dropped in keepalive */
-
- u_long tcps_sndtotal; /* total packets sent */
- u_long tcps_sndpack; /* data packets sent */
- u_long tcps_sndbyte; /* data bytes sent */
- u_long tcps_sndrexmitpack; /* data packets retransmitted */
- u_long tcps_sndrexmitbyte; /* data bytes retransmitted */
- u_long tcps_sndacks; /* ack-only packets sent */
- u_long tcps_sndprobe; /* window probes sent */
- u_long tcps_sndurg; /* packets sent with URG only */
- u_long tcps_sndwinup; /* window update-only packets sent */
- u_long tcps_sndctrl; /* control (SYN|FIN|RST) packets sent */
-
- u_long tcps_rcvtotal; /* total packets received */
- u_long tcps_rcvpack; /* packets received in sequence */
- u_long tcps_rcvbyte; /* bytes received in sequence */
- u_long tcps_rcvbadsum; /* packets received with ccksum errs */
- u_long tcps_rcvbadoff; /* packets received with bad offset */
- u_long tcps_rcvshort; /* packets received too short */
- u_long tcps_rcvduppack; /* duplicate-only packets received */
- u_long tcps_rcvdupbyte; /* duplicate-only bytes received */
- u_long tcps_rcvpartduppack; /* packets with some duplicate data */
- u_long tcps_rcvpartdupbyte; /* dup. bytes in part-dup. packets */
- u_long tcps_rcvoopack; /* out-of-order packets received */
- u_long tcps_rcvoobyte; /* out-of-order bytes received */
- u_long tcps_rcvpackafterwin; /* packets with data after window */
- u_long tcps_rcvbyteafterwin; /* bytes rcvd after window */
- u_long tcps_rcvafterclose; /* packets rcvd after "close" */
- u_long tcps_rcvwinprobe; /* rcvd window probe packets */
- u_long tcps_rcvdupack; /* rcvd duplicate acks */
- u_long tcps_rcvacktoomuch; /* rcvd acks for unsent data */
- u_long tcps_rcvackpack; /* rcvd ack packets */
- u_long tcps_rcvackbyte; /* bytes acked by rcvd acks */
- u_long tcps_rcvwinupd; /* rcvd window update packets */
- u_long tcps_pawsdrop; /* segments dropped due to PAWS */
- u_long tcps_predack; /* times hdr predict ok for acks */
- u_long tcps_preddat; /* times hdr predict ok for data pkts */
- u_long tcps_pcbcachemiss;
- u_long tcps_cachedrtt; /* times cached RTT in route updated */
- u_long tcps_cachedrttvar; /* times cached rttvar updated */
- u_long tcps_cachedssthresh; /* times cached ssthresh updated */
- u_long tcps_usedrtt; /* times RTT initialized from route */
- u_long tcps_usedrttvar; /* times RTTVAR initialized from rt */
- u_long tcps_usedssthresh; /* times ssthresh initialized from rt*/
- u_long tcps_persistdrop; /* timeout in persist state */
- u_long tcps_badsyn; /* bogus SYN, e.g. premature ACK */
- u_long tcps_mturesent; /* resends due to MTU discovery */
- u_long tcps_listendrop; /* listen queue overflows */
-};
-
-/*
- * Names for TCP sysctl objects
- */
-#define TCPCTL_DO_RFC1323 1 /* use RFC-1323 extensions */
-#define TCPCTL_DO_RFC1644 2 /* use RFC-1644 extensions */
-#define TCPCTL_MSSDFLT 3 /* MSS default */
-#define TCPCTL_STATS 4 /* statistics (read-only) */
-#define TCPCTL_RTTDFLT 5 /* default RTT estimate */
-#define TCPCTL_KEEPIDLE 6 /* keepalive idle timer */
-#define TCPCTL_KEEPINTVL 7 /* interval to send keepalives */
-#define TCPCTL_SENDSPACE 8 /* send buffer space */
-#define TCPCTL_RECVSPACE 9 /* receive buffer space */
-#define TCPCTL_KEEPINIT 10 /* receive buffer space */
-#define TCPCTL_MAXID 11
-
-#define TCPCTL_NAMES { \
- { 0, 0 }, \
- { "rfc1323", CTLTYPE_INT }, \
- { "rfc1644", CTLTYPE_INT }, \
- { "mssdflt", CTLTYPE_INT }, \
- { "stats", CTLTYPE_STRUCT }, \
- { "rttdflt", CTLTYPE_INT }, \
- { "keepidle", CTLTYPE_INT }, \
- { "keepintvl", CTLTYPE_INT }, \
- { "sendspace", CTLTYPE_INT }, \
- { "recvspace", CTLTYPE_INT }, \
- { "keepinit", CTLTYPE_INT }, \
-}
-
-#ifdef KERNEL
-extern struct inpcbhead tcb; /* head of queue of active tcpcb's */
-extern struct inpcbinfo tcbinfo;
-extern struct tcpstat tcpstat; /* tcp statistics */
-extern int tcp_mssdflt; /* XXX */
-extern u_long tcp_now; /* for RFC 1323 timestamps */
-
-void tcp_canceltimers __P((struct tcpcb *));
-struct tcpcb *
- tcp_close __P((struct tcpcb *));
-void tcp_ctlinput __P((int, struct sockaddr *, void *));
-int tcp_ctloutput __P((int, struct socket *, int, int, struct mbuf **));
-struct tcpcb *
- tcp_drop __P((struct tcpcb *, int));
-void tcp_drain __P((void));
-void tcp_fasttimo __P((void));
-struct rmxp_tao *
- tcp_gettaocache __P((struct inpcb *));
-void tcp_init __P((void));
-void tcp_input __P((struct mbuf *, int));
-void tcp_mss __P((struct tcpcb *, int));
-int tcp_mssopt __P((struct tcpcb *));
-void tcp_mtudisc __P((struct inpcb *, int));
-struct tcpcb *
- tcp_newtcpcb __P((struct inpcb *));
-int tcp_output __P((struct tcpcb *));
-void tcp_quench __P((struct inpcb *, int));
-void tcp_respond __P((struct tcpcb *,
- struct tcpiphdr *, struct mbuf *, u_long, u_long, int));
-struct rtentry *
- tcp_rtlookup __P((struct inpcb *));
-void tcp_setpersist __P((struct tcpcb *));
-void tcp_slowtimo __P((void));
-struct tcpiphdr *
- tcp_template __P((struct tcpcb *));
-struct tcpcb *
- tcp_timers __P((struct tcpcb *, int));
-void tcp_trace __P((int, int, struct tcpcb *, struct tcpiphdr *, int));
-
-extern struct pr_usrreqs tcp_usrreqs;
-extern u_long tcp_sendspace;
-extern u_long tcp_recvspace;
-
-#endif /* KERNEL */
-
-#endif /* _NETINET_TCP_VAR_H_ */
diff --git a/cpukit/libnetworking/netinet/tcpip.h b/cpukit/libnetworking/netinet/tcpip.h
deleted file mode 100644
index b8634bfd15..0000000000
--- a/cpukit/libnetworking/netinet/tcpip.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)tcpip.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _NETINET_TCPIP_H_
-#define _NETINET_TCPIP_H_
-
-/*
- * Tcp+ip header, after ip options removed.
- */
-struct tcpiphdr {
- struct ipovly ti_i; /* overlaid ip structure */
- struct tcphdr ti_t; /* tcp header */
-};
-#ifdef notyet
-/*
- * Tcp+ip header, after ip options removed but including TCP options.
- */
-struct full_tcpiphdr {
- struct ipovly ti_i; /* overlaid ip structure */
- struct tcphdr ti_t; /* tcp header */
- char ti_o[TCP_MAXOLEN]; /* space for tcp options */
-};
-#endif /* notyet */
-#define ti_next ti_i.ih_next
-#define ti_prev ti_i.ih_prev
-#define ti_x1 ti_i.ih_x1
-#define ti_pr ti_i.ih_pr
-#define ti_len ti_i.ih_len
-#define ti_src ti_i.ih_src
-#define ti_dst ti_i.ih_dst
-#define ti_sport ti_t.th_sport
-#define ti_dport ti_t.th_dport
-#define ti_seq ti_t.th_seq
-#define ti_ack ti_t.th_ack
-#define ti_x2 ti_t.th_x2
-#define ti_off ti_t.th_off
-#define ti_flags ti_t.th_flags
-#define ti_win ti_t.th_win
-#define ti_sum ti_t.th_sum
-#define ti_urp ti_t.th_urp
-
-#endif
diff --git a/cpukit/libnetworking/netinet/udp.h b/cpukit/libnetworking/netinet/udp.h
deleted file mode 100644
index e73e1f4ddb..0000000000
--- a/cpukit/libnetworking/netinet/udp.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)udp.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _NETINET_UDP_H_
-#define _NETINET_UDP_H_
-
-/*
- * Udp protocol header.
- * Per RFC 768, September, 1981.
- */
-struct udphdr {
- u_short uh_sport; /* source port */
- u_short uh_dport; /* destination port */
- u_short uh_ulen; /* udp length */
- u_short uh_sum; /* udp checksum */
-};
-
-#endif
diff --git a/cpukit/libnetworking/netinet/udp_usrreq.c b/cpukit/libnetworking/netinet/udp_usrreq.c
deleted file mode 100644
index 16c5fce2df..0000000000
--- a/cpukit/libnetworking/netinet/udp_usrreq.c
+++ /dev/null
@@ -1,613 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1995
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)udp_usrreq.c 8.6 (Berkeley) 5/23/95
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/systm.h>
-#include <sys/malloc.h>
-#include <sys/mbuf.h>
-#include <sys/protosw.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/errno.h>
-#include <sys/stat.h>
-#include <sys/kernel.h>
-#include <sys/sysctl.h>
-#include <sys/syslog.h>
-
-#include <net/if.h>
-#include <net/route.h>
-
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/in_pcb.h>
-#include <netinet/in_var.h>
-#include <netinet/ip_var.h>
-#include <netinet/ip_icmp.h>
-#include <netinet/udp.h>
-#include <netinet/udp_var.h>
-
-/*
- * UDP protocol implementation.
- * Per RFC 768, August, 1980.
- */
-#ifndef COMPAT_42
-static int udpcksum = 1;
-#else
-static int udpcksum = 0; /* XXX */
-#endif
-SYSCTL_INT(_net_inet_udp, UDPCTL_CHECKSUM, checksum, CTLFLAG_RW,
- &udpcksum, 0, "");
-
-static int log_in_vain = 0;
-SYSCTL_INT(_net_inet_udp, OID_AUTO, log_in_vain, CTLFLAG_RW,
- &log_in_vain, 0, "");
-
-static struct inpcbhead udb; /* from udp_var.h */
-static struct inpcbinfo udbinfo;
-
-#ifndef UDBHASHSIZE
-#define UDBHASHSIZE 64
-#endif
-
- struct udpstat udpstat; /* from udp_var.h */
-SYSCTL_STRUCT(_net_inet_udp, UDPCTL_STATS, stats, CTLFLAG_RD,
- &udpstat, udpstat, "");
-
-static struct sockaddr_in udp_in = { sizeof(udp_in), AF_INET };
-
-static void udp_detach __P((struct inpcb *));
-static int udp_output __P((struct inpcb *, struct mbuf *, struct mbuf *,
- struct mbuf *));
-static void udp_notify __P((struct inpcb *, int));
-
-void
-udp_init()
-{
- LIST_INIT(&udb);
- udbinfo.listhead = &udb;
- udbinfo.hashbase = hashinit(UDBHASHSIZE, M_PCB, &udbinfo.hashmask);
-}
-
-void
-udp_input(m, iphlen)
- register struct mbuf *m;
- int iphlen;
-{
- register struct ip *ip;
- register struct udphdr *uh;
- register struct inpcb *inp;
- struct mbuf *opts = 0;
- int len;
- struct ip save_ip;
-
- udpstat.udps_ipackets++;
-
- /*
- * Strip IP options, if any; should skip this,
- * make available to user, and use on returned packets,
- * but we don't yet have a way to check the checksum
- * with options still present.
- */
- if (iphlen > sizeof (struct ip)) {
- ip_stripoptions(m, (struct mbuf *)0);
- iphlen = sizeof(struct ip);
- }
-
- /*
- * Get IP and UDP header together in first mbuf.
- */
- ip = mtod(m, struct ip *);
- if (m->m_len < iphlen + sizeof(struct udphdr)) {
- if ((m = m_pullup(m, iphlen + sizeof(struct udphdr))) == 0) {
- udpstat.udps_hdrops++;
- return;
- }
- ip = mtod(m, struct ip *);
- }
- uh = (struct udphdr *)((caddr_t)ip + iphlen);
-
- /*
- * Make mbuf data length reflect UDP length.
- * If not enough data to reflect UDP length, drop.
- */
- len = ntohs((u_short)uh->uh_ulen);
- if (ip->ip_len != len) {
- if (len > ip->ip_len || len < sizeof(struct udphdr)) {
- udpstat.udps_badlen++;
- goto bad;
- }
- m_adj(m, len - ip->ip_len);
- /* ip->ip_len = len; */
- }
- /*
- * Save a copy of the IP header in case we want restore it
- * for sending an ICMP error message in response.
- */
- save_ip = *ip;
-
- /*
- * Checksum extended UDP header and data.
- */
- if (uh->uh_sum) {
- ((struct ipovly *)ip)->ih_next = 0;
- ((struct ipovly *)ip)->ih_prev = 0;
- ((struct ipovly *)ip)->ih_x1 = 0;
- ((struct ipovly *)ip)->ih_len = uh->uh_ulen;
- uh->uh_sum = in_cksum(m, len + sizeof (struct ip));
- if (uh->uh_sum) {
- udpstat.udps_badsum++;
- m_freem(m);
- return;
- }
- }
-
- if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr)) ||
- in_broadcast(ip->ip_dst, m->m_pkthdr.rcvif)) {
- struct inpcb *last;
- /*
- * Deliver a multicast or broadcast datagram to *all* sockets
- * for which the local and remote addresses and ports match
- * those of the incoming datagram. This allows more than
- * one process to receive multi/broadcasts on the same port.
- * (This really ought to be done for unicast datagrams as
- * well, but that would cause problems with existing
- * applications that open both address-specific sockets and
- * a wildcard socket listening to the same port -- they would
- * end up receiving duplicates of every unicast datagram.
- * Those applications open the multiple sockets to overcome an
- * inadequacy of the UDP socket interface, but for backwards
- * compatibility we avoid the problem here rather than
- * fixing the interface. Maybe 4.5BSD will remedy this?)
- */
-
- /*
- * Construct sockaddr format source address.
- */
- udp_in.sin_port = uh->uh_sport;
- udp_in.sin_addr = ip->ip_src;
- m->m_len -= sizeof (struct udpiphdr);
- m->m_data += sizeof (struct udpiphdr);
- /*
- * Locate pcb(s) for datagram.
- * (Algorithm copied from raw_intr().)
- */
- last = NULL;
- for (inp = udb.lh_first; inp != NULL; inp = inp->inp_list.le_next) {
- if (inp->inp_lport != uh->uh_dport)
- continue;
- if (inp->inp_laddr.s_addr != INADDR_ANY) {
- if (inp->inp_laddr.s_addr !=
- ip->ip_dst.s_addr)
- continue;
- }
- if (inp->inp_faddr.s_addr != INADDR_ANY) {
- if (inp->inp_faddr.s_addr !=
- ip->ip_src.s_addr ||
- inp->inp_fport != uh->uh_sport)
- continue;
- }
-
- if (last != NULL) {
- struct mbuf *n;
-
- if ((n = m_copy(m, 0, M_COPYALL)) != NULL) {
- if (last->inp_flags & INP_CONTROLOPTS
- || last->inp_socket->so_options & SO_TIMESTAMP)
- ip_savecontrol(last, &opts, ip, n);
- if (sbappendaddr(&last->inp_socket->so_rcv,
- (struct sockaddr *)&udp_in,
- n, opts) == 0) {
- m_freem(n);
- if (opts)
- m_freem(opts);
- udpstat.udps_fullsock++;
- } else
- sorwakeup(last->inp_socket);
- opts = 0;
- }
- }
- last = inp;
- /*
- * Don't look for additional matches if this one does
- * not have either the SO_REUSEPORT or SO_REUSEADDR
- * socket options set. This heuristic avoids searching
- * through all pcbs in the common case of a non-shared
- * port. It * assumes that an application will never
- * clear these options after setting them.
- */
- if (((last->inp_socket->so_options&(SO_REUSEPORT|SO_REUSEADDR)) == 0))
- break;
- }
-
- if (last == NULL) {
- /*
- * No matching pcb found; discard datagram.
- * (No need to send an ICMP Port Unreachable
- * for a broadcast or multicast datgram.)
- */
- udpstat.udps_noportbcast++;
- goto bad;
- }
- if (last->inp_flags & INP_CONTROLOPTS
- || last->inp_socket->so_options & SO_TIMESTAMP)
- ip_savecontrol(last, &opts, ip, m);
- if (sbappendaddr(&last->inp_socket->so_rcv,
- (struct sockaddr *)&udp_in,
- m, opts) == 0) {
- udpstat.udps_fullsock++;
- goto bad;
- }
- sorwakeup(last->inp_socket);
- return;
- }
- /*
- * Locate pcb for datagram.
- */
- inp = in_pcblookuphash(&udbinfo, ip->ip_src, uh->uh_sport,
- ip->ip_dst, uh->uh_dport, 1);
- if (inp == NULL) {
- if (log_in_vain) {
- char buf[4*sizeof "123"];
-
- strcpy(buf, inet_ntoa(ip->ip_dst));
- log(LOG_INFO, "Connection attempt to UDP %s:%d"
- " from %s:%d\n",
- buf, ntohs(uh->uh_dport),
- inet_ntoa(ip->ip_src), ntohs(uh->uh_sport));
- }
- udpstat.udps_noport++;
- if (m->m_flags & (M_BCAST | M_MCAST)) {
- udpstat.udps_noportbcast++;
- goto bad;
- }
- *ip = save_ip;
- icmp_error(m, ICMP_UNREACH, ICMP_UNREACH_PORT, 0, 0);
- return;
- }
-
- /*
- * Construct sockaddr format source address.
- * Stuff source address and datagram in user buffer.
- */
- udp_in.sin_port = uh->uh_sport;
- udp_in.sin_addr = ip->ip_src;
- if (inp->inp_flags & INP_CONTROLOPTS
- || inp->inp_socket->so_options & SO_TIMESTAMP)
- ip_savecontrol(inp, &opts, ip, m);
- iphlen += sizeof(struct udphdr);
- m->m_len -= iphlen;
- m->m_pkthdr.len -= iphlen;
- m->m_data += iphlen;
- if (sbappendaddr(&inp->inp_socket->so_rcv, (struct sockaddr *)&udp_in,
- m, opts) == 0) {
- udpstat.udps_fullsock++;
- goto bad;
- }
- sorwakeup(inp->inp_socket);
- return;
-bad:
- m_freem(m);
- if (opts)
- m_freem(opts);
-}
-
-/*
- * Notify a udp user of an asynchronous error;
- * just wake up so that he can collect error status.
- */
-static void
-udp_notify(inp, errnum)
- register struct inpcb *inp;
- int errnum;
-{
- inp->inp_socket->so_error = errnum;
- sorwakeup(inp->inp_socket);
- sowwakeup(inp->inp_socket);
-}
-
-void
-udp_ctlinput(cmd, sa, vip)
- int cmd;
- struct sockaddr *sa;
- void *vip;
-{
- register struct ip *ip = vip;
- register struct udphdr *uh;
-
- if (!PRC_IS_REDIRECT(cmd) &&
- ((unsigned)cmd >= PRC_NCMDS || inetctlerrmap[cmd] == 0))
- return;
- if (ip) {
- uh = (struct udphdr *)((caddr_t)ip + (ip->ip_hl << 2));
- in_pcbnotify(&udb, sa, uh->uh_dport, ip->ip_src, uh->uh_sport,
- cmd, udp_notify);
- } else
- in_pcbnotify(&udb, sa, 0, zeroin_addr, 0, cmd, udp_notify);
-}
-
-static int
-udp_output(inp, m, addr, control)
- register struct inpcb *inp;
- register struct mbuf *m;
- struct mbuf *addr, *control;
-{
- register struct udpiphdr *ui;
- register int len = m->m_pkthdr.len;
- struct in_addr laddr;
- int s = 0, error = 0;
-
- if (control)
- m_freem(control); /* XXX */
-
- if (len + sizeof(struct udpiphdr) > IP_MAXPACKET) {
- error = EMSGSIZE;
- goto release;
- }
-
- if (addr) {
- laddr = inp->inp_laddr;
- if (inp->inp_faddr.s_addr != INADDR_ANY) {
- error = EISCONN;
- goto release;
- }
- /*
- * Must block input while temporarily connected.
- */
- s = splnet();
- error = in_pcbconnect(inp, addr);
- if (error) {
- splx(s);
- goto release;
- }
- } else {
- if (inp->inp_faddr.s_addr == INADDR_ANY) {
- error = ENOTCONN;
- goto release;
- }
- }
- /*
- * Calculate data length and get a mbuf
- * for UDP and IP headers.
- */
- M_PREPEND(m, sizeof(struct udpiphdr), M_DONTWAIT);
- if (m == 0) {
- error = ENOBUFS;
- if (addr)
- splx(s);
- goto release;
- }
-
- /*
- * Fill in mbuf with extended UDP header
- * and addresses and length put into network format.
- */
- ui = mtod(m, struct udpiphdr *);
- ui->ui_next = ui->ui_prev = 0;
- ui->ui_x1 = 0;
- ui->ui_pr = IPPROTO_UDP;
- ui->ui_len = htons((u_short)len + sizeof (struct udphdr));
- ui->ui_src = inp->inp_laddr;
- ui->ui_dst = inp->inp_faddr;
- ui->ui_sport = inp->inp_lport;
- ui->ui_dport = inp->inp_fport;
- ui->ui_ulen = ui->ui_len;
-
- /*
- * Stuff checksum and output datagram.
- */
- ui->ui_sum = 0;
- if (udpcksum) {
- if ((ui->ui_sum = in_cksum(m, sizeof (struct udpiphdr) + len)) == 0)
- ui->ui_sum = 0xffff;
- }
- ((struct ip *)ui)->ip_len = sizeof (struct udpiphdr) + len;
- ((struct ip *)ui)->ip_ttl = inp->inp_ip_ttl; /* XXX */
- ((struct ip *)ui)->ip_tos = inp->inp_ip_tos; /* XXX */
- udpstat.udps_opackets++;
- error = ip_output(m, inp->inp_options, &inp->inp_route,
- inp->inp_socket->so_options & (SO_DONTROUTE | SO_BROADCAST),
- inp->inp_moptions);
-
- if (addr) {
- in_pcbdisconnect(inp);
- inp->inp_laddr = laddr;
- splx(s);
- }
- return (error);
-
-release:
- m_freem(m);
- return (error);
-}
-
-static u_long udp_sendspace = 9216; /* really max datagram size */
- /* 40 1K datagrams */
-SYSCTL_INT(_net_inet_udp, UDPCTL_MAXDGRAM, maxdgram, CTLFLAG_RW,
- &udp_sendspace, 0, "");
-
-static u_long udp_recvspace = 40 * (1024 + sizeof(struct sockaddr_in));
-SYSCTL_INT(_net_inet_udp, UDPCTL_RECVSPACE, recvspace, CTLFLAG_RW,
- &udp_recvspace, 0, "");
-
-/*ARGSUSED*/
-int
-udp_usrreq(so, req, m, addr, control)
- struct socket *so;
- int req;
- struct mbuf *m, *addr, *control;
-{
- struct inpcb *inp = sotoinpcb(so);
- int error = 0;
- int s;
-
- if (req == PRU_CONTROL)
- return (in_control(so, (u_long)m, (caddr_t)addr,
- (struct ifnet *)control));
- if (inp == NULL && req != PRU_ATTACH) {
- error = EINVAL;
- goto release;
- }
- /*
- * Note: need to block udp_input while changing
- * the udp pcb queue and/or pcb addresses.
- */
- switch (req) {
-
- case PRU_ATTACH:
- if (inp != NULL) {
- error = EINVAL;
- break;
- }
- s = splnet();
- error = in_pcballoc(so, &udbinfo);
- splx(s);
- if (error)
- break;
- error = soreserve(so, udp_sendspace, udp_recvspace);
- if (error)
- break;
- ((struct inpcb *) so->so_pcb)->inp_ip_ttl = ip_defttl;
- break;
-
- case PRU_DETACH:
- udp_detach(inp);
- break;
-
- case PRU_BIND:
- s = splnet();
- error = in_pcbbind(inp, addr);
- splx(s);
- break;
-
- case PRU_LISTEN:
- error = EOPNOTSUPP;
- break;
-
- case PRU_CONNECT:
- if (inp->inp_faddr.s_addr != INADDR_ANY) {
- error = EISCONN;
- break;
- }
- s = splnet();
- error = in_pcbconnect(inp, addr);
- splx(s);
- if (error == 0)
- soisconnected(so);
- break;
-
- case PRU_CONNECT2:
- error = EOPNOTSUPP;
- break;
-
- case PRU_ACCEPT:
- error = EOPNOTSUPP;
- break;
-
- case PRU_DISCONNECT:
- if (inp->inp_faddr.s_addr == INADDR_ANY) {
- error = ENOTCONN;
- break;
- }
- s = splnet();
- in_pcbdisconnect(inp);
- inp->inp_laddr.s_addr = INADDR_ANY;
- splx(s);
- so->so_state &= ~SS_ISCONNECTED; /* XXX */
- break;
-
- case PRU_SHUTDOWN:
- socantsendmore(so);
- break;
-
- case PRU_SEND:
- return (udp_output(inp, m, addr, control));
-
- case PRU_ABORT:
- soisdisconnected(so);
- udp_detach(inp);
- break;
-
- case PRU_SOCKADDR:
- in_setsockaddr(inp, addr);
- break;
-
- case PRU_PEERADDR:
- in_setpeeraddr(inp, addr);
- break;
-
- case PRU_SENSE:
- /*
- * stat: don't bother with a blocksize.
- */
- return (0);
-
- case PRU_SENDOOB:
- case PRU_FASTTIMO:
- case PRU_SLOWTIMO:
- case PRU_PROTORCV:
- case PRU_PROTOSEND:
- error = EOPNOTSUPP;
- break;
-
- case PRU_RCVD:
- case PRU_RCVOOB:
- return (EOPNOTSUPP); /* do not free mbuf's */
-
- default:
- panic("udp_usrreq");
- }
-
-release:
- if (control) {
- printf("udp control data unexpectedly retained\n");
- m_freem(control);
- }
- if (m)
- m_freem(m);
- return (error);
-}
-
-static void
-udp_detach(inp)
- struct inpcb *inp;
-{
- int s = splnet();
-
- in_pcbdetach(inp);
- splx(s);
-}
diff --git a/cpukit/libnetworking/netinet/udp_var.h b/cpukit/libnetworking/netinet/udp_var.h
deleted file mode 100644
index 90785b53de..0000000000
--- a/cpukit/libnetworking/netinet/udp_var.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)udp_var.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _NETINET_UDP_VAR_H_
-#define _NETINET_UDP_VAR_H_
-
-/*
- * UDP kernel structures and variables.
- */
-struct udpiphdr {
- struct ipovly ui_i; /* overlaid ip structure */
- struct udphdr ui_u; /* udp header */
-};
-#define ui_next ui_i.ih_next
-#define ui_prev ui_i.ih_prev
-#define ui_x1 ui_i.ih_x1
-#define ui_pr ui_i.ih_pr
-#define ui_len ui_i.ih_len
-#define ui_src ui_i.ih_src
-#define ui_dst ui_i.ih_dst
-#define ui_sport ui_u.uh_sport
-#define ui_dport ui_u.uh_dport
-#define ui_ulen ui_u.uh_ulen
-#define ui_sum ui_u.uh_sum
-
-struct udpstat {
- /* input statistics: */
- u_long udps_ipackets; /* total input packets */
- u_long udps_hdrops; /* packet shorter than header */
- u_long udps_badsum; /* checksum error */
- u_long udps_badlen; /* data length larger than packet */
- u_long udps_noport; /* no socket on port */
- u_long udps_noportbcast; /* of above, arrived as broadcast */
- u_long udps_fullsock; /* not delivered, input socket full */
- u_long udpps_pcbcachemiss; /* input packets missing pcb cache */
- u_long udpps_pcbhashmiss; /* input packets not for hashed pcb */
- /* output statistics: */
- u_long udps_opackets; /* total output packets */
-};
-
-/*
- * Names for UDP sysctl objects
- */
-#define UDPCTL_CHECKSUM 1 /* checksum UDP packets */
-#define UDPCTL_STATS 2 /* statistics (read-only) */
-#define UDPCTL_MAXDGRAM 3 /* max datagram size */
-#define UDPCTL_RECVSPACE 4 /* default receive buffer space */
-#define UDPCTL_MAXID 5
-
-#define UDPCTL_NAMES { \
- { 0, 0 }, \
- { "checksum", CTLTYPE_INT }, \
- { "stats", CTLTYPE_STRUCT }, \
- { "maxdgram", CTLTYPE_INT }, \
- { "recvspace", CTLTYPE_INT }, \
-}
-
-#ifdef KERNEL
-extern struct inpcbhead udb;
-extern struct inpcbinfo udbinfo;
-extern struct udpstat udpstat;
-
-void udp_ctlinput __P((int, struct sockaddr *, void *));
-void udp_init __P((void));
-void udp_input __P((struct mbuf *, int));
-int udp_usrreq __P((struct socket *,
- int, struct mbuf *, struct mbuf *, struct mbuf *));
-#endif
-
-#endif
diff --git a/cpukit/libnetworking/nfs/Makefile.am b/cpukit/libnetworking/nfs/Makefile.am
deleted file mode 100644
index 51184e47ae..0000000000
--- a/cpukit/libnetworking/nfs/Makefile.am
+++ /dev/null
@@ -1,35 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-LIBNAME = lib.a
-LIB = $(ARCH)/$(LIBNAME)
-
-C_FILES = bootp_subr.c
-C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
-
-OBJS = $(C_O_FILES)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../automake/lib.am
-
-#
-# Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -D_COMPILING_BSD_KERNEL_ -DKERNEL -DINET -DNFS -DDIAGNOSTIC \
- -DBOOTP_COMPAT
-
-$(LIB): $(OBJS)
- $(make-library)
-
-all-local: $(ARCH) $(OBJS) $(LIB)
-
-.PRECIOUS: $(LIB)
-
-EXTRA_DIST = bootp_subr.c krpc.h nfs.h nfsdiskless.h nfsproto.h rpcv2.h \
- xdr_subs.h
-
-include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/libnetworking/nfs/bootp_subr.c b/cpukit/libnetworking/nfs/bootp_subr.c
deleted file mode 100644
index b809143d6d..0000000000
--- a/cpukit/libnetworking/nfs/bootp_subr.c
+++ /dev/null
@@ -1,1036 +0,0 @@
-/* $Id$ */
-
-/*
- * Copyright (c) 1995 Gordon Ross, Adam Glass
- * Copyright (c) 1992 Regents of the University of California.
- * All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Lawrence Berkeley Laboratory and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * based on:
- * nfs/krpc_subr.c
- * $NetBSD: krpc_subr.c,v 1.10 1995/08/08 20:43:43 gwr Exp $
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/conf.h>
-#include <sys/sockio.h>
-#include <sys/proc.h>
-#include <sys/mount.h>
-#include <sys/mbuf.h>
-#include <sys/reboot.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-
-#include <net/if.h>
-#include <net/route.h>
-
-#include <netinet/in.h>
-#include <net/if_types.h>
-#include <net/if_dl.h>
-#include <netinet/if_ether.h>
-
-#include <nfs/rpcv2.h>
-#include <nfs/nfsproto.h>
-#include <nfs/nfs.h>
-#include <nfs/nfsdiskless.h>
-#include <nfs/krpc.h>
-#include <nfs/xdr_subs.h>
-
-#define BOOTP_MIN_LEN 300 /* Minimum size of bootp udp packet */
-
-/*
- * What is the longest we will wait before re-sending a request?
- * Note this is also the frequency of "RPC timeout" messages.
- * The re-send loop count sup linearly to this maximum, so the
- * first complaint will happen after (1+2+3+4+5)=15 seconds.
- */
-#define MAX_RESEND_DELAY 5 /* seconds */
-
-/* Definitions from RFC951 */
-struct bootp_packet {
- u_int8_t op;
- u_int8_t htype;
- u_int8_t hlen;
- u_int8_t hops;
- u_int32_t xid;
- u_int16_t secs;
- u_int16_t flags;
- struct in_addr ciaddr;
- struct in_addr yiaddr;
- struct in_addr siaddr;
- struct in_addr giaddr;
- unsigned char chaddr[16];
- char sname[64];
- char file[128];
- unsigned char vend[256];
-};
-
-#define IPPORT_BOOTPC 68
-#define IPPORT_BOOTPS 67
-
-extern int nfs_diskless_valid;
-extern struct nfsv3_diskless nfsv3_diskless;
-
-/* mountd RPC */
-#if !defined(__rtems__)
-static int md_mount __P((struct sockaddr_in *mdsin, char *path,
- u_char *fhp, int *fhsizep, struct nfs_args *args,struct proc *procp));
-static int md_lookup_swap __P((struct sockaddr_in *mdsin,char *path,
- u_char *fhp, int *fhsizep,
- struct nfs_args *args,
- struct proc *procp));
-static int setfs __P((struct sockaddr_in *addr, char *path, char *p));
-static int getdec __P((char **ptr));
-#endif
-static char *substr __P((char *a,char *b));
-#if !defined(__rtems__)
-static void mountopts __P((struct nfs_args *args, char *p));
-static int xdr_opaque_decode __P((struct mbuf **ptr,u_char *buf,
- int len));
-static int xdr_int_decode __P((struct mbuf **ptr,int *iptr));
-#endif
-static void printip __P((char *prefix,struct in_addr addr));
-
-#ifdef BOOTP_DEBUG
-void bootpboot_p_sa(struct sockaddr *sa,struct sockaddr *ma);
-void bootpboot_p_ma(struct sockaddr *ma);
-void bootpboot_p_rtentry(struct rtentry *rt);
-void bootpboot_p_tree(struct radix_node *rn);
-void bootpboot_p_rtlist(void);
-void bootpboot_p_iflist(void);
-#endif
-
-int bootpc_call(struct bootp_packet *call,
- struct bootp_packet *reply,
- struct proc *procp);
-
-int bootpc_fakeup_interface(struct ifreq *ireq,struct socket *so,
- struct proc *procp);
-
-int
-bootpc_adjust_interface(struct ifreq *ireq,struct socket *so,
- struct sockaddr_in *myaddr,
- struct sockaddr_in *netmask,
- struct sockaddr_in *gw,
- struct proc *procp);
-
-void bootpc_init(void);
-
-#ifdef BOOTP_DEBUG
-void bootpboot_p_sa(sa,ma)
- struct sockaddr *sa;
- struct sockaddr *ma;
-{
- if (!sa) {
- printf("(sockaddr *) <null>");
- return;
- }
- switch (sa->sa_family) {
- case AF_INET:
- {
- struct sockaddr_in *sin = (struct sockaddr_in *) sa;
- printf("inet %x",ntohl(sin->sin_addr.s_addr));
- if (ma) {
- struct sockaddr_in *sin = (struct sockaddr_in *) ma;
- printf(" mask %x",ntohl(sin->sin_addr.s_addr));
- }
- }
- break;
- case AF_LINK:
- {
- struct sockaddr_dl *sli = (struct sockaddr_dl *) sa;
- int i;
- printf("link %.*s ",sli->sdl_nlen,sli->sdl_data);
- for (i=0;i<sli->sdl_alen;i++) {
- if (i>0)
- printf(":");
- printf("%x",(unsigned char) sli->sdl_data[i+sli->sdl_nlen]);
- }
- }
- break;
- default:
- printf("af%d",sa->sa_family);
- }
-}
-
-void bootpboot_p_ma(ma)
- struct sockaddr *ma;
-{
- if (!ma) {
- printf("<null>");
- return;
- }
- printf("%x",*(int*)ma);
-}
-
-void bootpboot_p_rtentry(rt)
- struct rtentry *rt;
-{
- bootpboot_p_sa(rt_key(rt),rt_mask(rt));
- printf(" ");
- bootpboot_p_ma(rt->rt_genmask);
- printf(" ");
- bootpboot_p_sa(rt->rt_gateway,NULL);
- printf(" ");
- printf("flags %x",(unsigned short) rt->rt_flags);
- printf(" %d",rt->rt_rmx.rmx_expire);
- printf(" %s%d\n",rt->rt_ifp->if_name,rt->rt_ifp->if_unit);
-}
-void bootpboot_p_tree(rn)
- struct radix_node *rn;
-{
- while (rn) {
- if (rn->rn_b < 0) {
- if (rn->rn_flags & RNF_ROOT) {
- } else {
- bootpboot_p_rtentry((struct rtentry *) rn);
- }
- rn = rn->rn_dupedkey;
- } else {
- bootpboot_p_tree(rn->rn_l);
- bootpboot_p_tree(rn->rn_r);
- return;
- }
-
- }
-}
-
-void bootpboot_p_rtlist(void)
-{
- printf("Routing table:\n");
- bootpboot_p_tree(rt_tables[AF_INET]->rnh_treetop);
-}
-
-void bootpboot_p_iflist(void)
-{
- struct ifnet *ifp;
- struct ifaddr *ifa;
- printf("Interface list:\n");
- for (ifp = TAILQ_FIRST(&ifnet); ifp != 0; ifp = TAILQ_NEXT(ifp,if_link))
- {
- for (ifa = TAILQ_FIRST(&ifp->if_addrhead) ;ifa;
- ifa=TAILQ_NEXT(ifa,ifa_link))
- if (ifa->ifa_addr->sa_family == AF_INET ) {
- printf("%s%d flags %x, addr %x, bcast %x, net %x\n",
- ifp->if_name,ifp->if_unit,
- (unsigned short) ifp->if_flags,
- ntohl(((struct sockaddr_in *) ifa->ifa_addr)->sin_addr.s_addr),
- ntohl(((struct sockaddr_in *) ifa->ifa_dstaddr)->sin_addr.s_addr),
- ntohl(((struct sockaddr_in *) ifa->ifa_netmask)->sin_addr.s_addr)
- );
- }
- }
-}
-#endif
-
-int
-bootpc_call(call,reply,procp)
- struct bootp_packet *call;
- struct bootp_packet *reply; /* output */
- struct proc *procp;
-{
- struct socket *so;
- struct sockaddr_in *sin;
- struct mbuf *m, *nam;
- struct uio auio;
- struct iovec aio;
- int error, rcvflg, timo, secs, len;
-
- /* Free at end if not null. */
- nam = NULL;
-
- /*
- * Create socket and set its recieve timeout.
- */
- if ((error = socreate(AF_INET, &so, SOCK_DGRAM, 0,procp)))
- goto out;
-
- m = m_get(M_WAIT, MT_SOOPTS);
- if (m == NULL) {
- error = ENOBUFS;
- goto out;
- } else {
- struct timeval *tv;
- tv = mtod(m, struct timeval *);
- m->m_len = sizeof(*tv);
- tv->tv_sec = 1;
- tv->tv_usec = 0;
- if ((error = sosetopt(so, SOL_SOCKET, SO_RCVTIMEO, m)))
- goto out;
- }
-
- /*
- * Enable broadcast.
- */
- {
- int *on;
- m = m_get(M_WAIT, MT_SOOPTS);
- if (m == NULL) {
- error = ENOBUFS;
- goto out;
- }
- on = mtod(m, int *);
- m->m_len = sizeof(*on);
- *on = 1;
- if ((error = sosetopt(so, SOL_SOCKET, SO_BROADCAST, m)))
- goto out;
- }
-
- /*
- * Bind the local endpoint to a bootp client port.
- */
- m = m_getclr(M_WAIT, MT_SONAME);
- sin = mtod(m, struct sockaddr_in *);
- sin->sin_len = m->m_len = sizeof(*sin);
- sin->sin_family = AF_INET;
- sin->sin_addr.s_addr = INADDR_ANY;
- sin->sin_port = htons(IPPORT_BOOTPC);
- error = sobind(so, m);
- m_freem(m);
- if (error) {
- printf("bind failed\n");
- goto out;
- }
-
- /*
- * Setup socket address for the server.
- */
- nam = m_get(M_WAIT, MT_SONAME);
- if (nam == NULL) {
- error = ENOBUFS;
- goto out;
- }
- sin = mtod(nam, struct sockaddr_in *);
- sin-> sin_len = sizeof(*sin);
- sin-> sin_family = AF_INET;
- sin->sin_addr.s_addr = INADDR_BROADCAST;
- sin->sin_port = htons(IPPORT_BOOTPS);
-
- nam->m_len = sizeof(*sin);
-
- /*
- * Send it, repeatedly, until a reply is received,
- * but delay each re-send by an increasing amount.
- * If the delay hits the maximum, start complaining.
- */
- timo = 0;
- for (;;) {
- /* Send BOOTP request (or re-send). */
-
- aio.iov_base = (caddr_t) call;
- aio.iov_len = sizeof(*call);
-
- auio.uio_iov = &aio;
- auio.uio_iovcnt = 1;
- auio.uio_segflg = UIO_SYSSPACE;
- auio.uio_rw = UIO_WRITE;
- auio.uio_offset = 0;
- auio.uio_resid = sizeof(*call);
- auio.uio_procp = procp;
-
- error = sosend(so, nam, &auio, NULL, NULL, 0);
- if (error) {
- printf("bootpc_call: sosend: %d\n", error);
- goto out;
- }
-
- /* Determine new timeout. */
- if (timo < MAX_RESEND_DELAY)
- timo++;
- else
- printf("BOOTP timeout for server 0x%x\n",
- (int)ntohl(sin->sin_addr.s_addr));
-
- /*
- * Wait for up to timo seconds for a reply.
- * The socket receive timeout was set to 1 second.
- */
- secs = timo;
- while (secs > 0) {
- aio.iov_base = (caddr_t) reply;
- aio.iov_len = sizeof(*reply);
-
- auio.uio_iov = &aio;
- auio.uio_iovcnt = 1;
- auio.uio_segflg = UIO_SYSSPACE;
- auio.uio_rw = UIO_READ;
- auio.uio_offset = 0;
- auio.uio_resid = sizeof(*reply);
- auio.uio_procp = procp;
-
- rcvflg = 0;
- error = soreceive(so, NULL, &auio, NULL, NULL, &rcvflg);
- if (error == EWOULDBLOCK) {
- secs--;
- call->secs=htons(ntohs(call->secs)+1);
- continue;
- }
- if (error)
- goto out;
- len = sizeof(*reply) - auio.uio_resid;
-
- /* Do we have the required number of bytes ? */
- if (len < BOOTP_MIN_LEN)
- continue;
-
- /* Is it the right reply? */
- if (reply->op != 2)
- continue;
-
- if (reply->xid != call->xid)
- continue;
-
- if (reply->hlen != call->hlen)
- continue;
-
- if (bcmp(reply->chaddr,call->chaddr,call->hlen))
- continue;
-
- goto gotreply; /* break two levels */
-
- } /* while secs */
- } /* forever send/receive */
-
- error = ETIMEDOUT;
- goto out;
-
- gotreply:
- out:
- if (nam) m_freem(nam);
- soclose(so);
- return error;
-}
-
-int
-bootpc_fakeup_interface(struct ifreq *ireq,struct socket *so,
- struct proc *procp)
-{
- struct sockaddr_in *sin;
- int error;
- struct sockaddr_in dst;
- struct sockaddr_in gw;
- struct sockaddr_in mask;
-
- /*
- * Bring up the interface.
- *
- * Get the old interface flags and or IFF_UP into them; if
- * IFF_UP set blindly, interface selection can be clobbered.
- */
- error = ifioctl(so, SIOCGIFFLAGS, (caddr_t)ireq, procp);
- if (error)
- panic("bootpc_fakeup_interface: GIFFLAGS, error=%d", error);
- ireq->ifr_flags |= IFF_UP;
- error = ifioctl(so, SIOCSIFFLAGS, (caddr_t)ireq, procp);
- if (error)
- panic("bootpc_fakeup_interface: SIFFLAGS, error=%d", error);
-
- /*
- * Do enough of ifconfig(8) so that the chosen interface
- * can talk to the servers. (just set the address)
- */
-
- /* addr is 0.0.0.0 */
-
- sin = (struct sockaddr_in *)&ireq->ifr_addr;
- bzero((caddr_t)sin, sizeof(*sin));
- sin->sin_len = sizeof(*sin);
- sin->sin_family = AF_INET;
- sin->sin_addr.s_addr = INADDR_ANY;
- error = ifioctl(so, SIOCSIFADDR, (caddr_t)ireq, procp);
- if (error)
- panic("bootpc_fakeup_interface: set if addr, error=%d", error);
-
- /* netmask is 0.0.0.0 */
-
- sin = (struct sockaddr_in *)&ireq->ifr_addr;
- bzero((caddr_t)sin, sizeof(*sin));
- sin->sin_len = sizeof(*sin);
- sin->sin_family = AF_INET;
- sin->sin_addr.s_addr = INADDR_ANY;
- error = ifioctl(so, SIOCSIFNETMASK, (caddr_t)ireq, procp);
- if (error)
- panic("bootpc_fakeup_interface: set if net addr, error=%d", error);
-
- /* Broadcast is 255.255.255.255 */
-
- sin = (struct sockaddr_in *)&ireq->ifr_addr;
- bzero((caddr_t)sin, sizeof(*sin));
- sin->sin_len = sizeof(*sin);
- sin->sin_family = AF_INET;
- sin->sin_addr.s_addr = INADDR_BROADCAST;
- error = ifioctl(so, SIOCSIFBRDADDR, (caddr_t)ireq, procp);
- if (error)
- panic("bootpc_fakeup_interface: set if broadcast addr, error=%d", error);
-
- /* Add default route to 0.0.0.0 so we can send data */
-
- bzero((caddr_t) &dst, sizeof(dst));
- dst.sin_len=sizeof(dst);
- dst.sin_family=AF_INET;
- dst.sin_addr.s_addr = htonl(0);
-
- bzero((caddr_t) &gw, sizeof(gw));
- gw.sin_len=sizeof(gw);
- gw.sin_family=AF_INET;
- gw.sin_addr.s_addr = htonl(0x0);
-
- bzero((caddr_t) &mask, sizeof(mask));
- mask.sin_len=sizeof(mask);
- mask.sin_family=AF_INET;
- mask.sin_addr.s_addr = htonl(0);
-
- error = rtrequest(RTM_ADD,
- (struct sockaddr *) &dst,
- (struct sockaddr *) &gw,
- (struct sockaddr *) &mask,
- RTF_UP | RTF_STATIC
- , NULL);
- if (error)
- printf("bootpc_fakeup_interface: add default route, error=%d\n", error);
- return error;
-}
-
-int
-bootpc_adjust_interface(struct ifreq *ireq,struct socket *so,
- struct sockaddr_in *myaddr,
- struct sockaddr_in *netmask,
- struct sockaddr_in *gw,
- struct proc *procp)
-{
- int error;
- struct sockaddr_in oldgw;
- struct sockaddr_in olddst;
- struct sockaddr_in oldmask;
- struct sockaddr_in *sin;
-
- /* Remove old default route to 0.0.0.0 */
-
- bzero((caddr_t) &olddst, sizeof(olddst));
- olddst.sin_len=sizeof(olddst);
- olddst.sin_family=AF_INET;
- olddst.sin_addr.s_addr = INADDR_ANY;
-
- bzero((caddr_t) &oldgw, sizeof(oldgw));
- oldgw.sin_len=sizeof(oldgw);
- oldgw.sin_family=AF_INET;
- oldgw.sin_addr.s_addr = INADDR_ANY;
-
- bzero((caddr_t) &oldmask, sizeof(oldmask));
- oldmask.sin_len=sizeof(oldmask);
- oldmask.sin_family=AF_INET;
- oldmask.sin_addr.s_addr = INADDR_ANY;
-
- error = rtrequest(RTM_DELETE,
- (struct sockaddr *) &olddst,
- (struct sockaddr *) &oldgw,
- (struct sockaddr *) &oldmask,
- (RTF_UP | RTF_STATIC), NULL);
- if (error) {
- printf("nfs_boot: del default route, error=%d\n", error);
- return error;
- }
-
- /*
- * Do enough of ifconfig(8) so that the chosen interface
- * can talk to the servers. (just set the address)
- */
- bcopy(netmask,&ireq->ifr_addr,sizeof(*netmask));
- error = ifioctl(so, SIOCSIFNETMASK, (caddr_t)ireq, procp);
- if (error)
- panic("nfs_boot: set if netmask, error=%d", error);
-
- /* Broadcast is with host part of IP address all 1's */
-
- sin = (struct sockaddr_in *)&ireq->ifr_addr;
- bzero((caddr_t)sin, sizeof(*sin));
- sin->sin_len = sizeof(*sin);
- sin->sin_family = AF_INET;
- sin->sin_addr.s_addr = myaddr->sin_addr.s_addr | ~ netmask->sin_addr.s_addr;
- error = ifioctl(so, SIOCSIFBRDADDR, (caddr_t)ireq, procp);
- if (error)
- panic("bootpc_call: set if broadcast addr, error=%d", error);
-
- bcopy(myaddr,&ireq->ifr_addr,sizeof(*myaddr));
- error = ifioctl(so, SIOCSIFADDR, (caddr_t)ireq, procp);
- if (error)
- panic("nfs_boot: set if addr, error=%d", error);
-
- /* Add new default route */
-
- error = rtrequest(RTM_ADD,
- (struct sockaddr *) &olddst,
- (struct sockaddr *) gw,
- (struct sockaddr *) &oldmask,
- (RTF_UP | RTF_GATEWAY | RTF_STATIC), NULL);
- if (error) {
- printf("nfs_boot: add net route, error=%d\n", error);
- return error;
- }
-
- return 0;
-}
-
-#if !defined(__rtems__)
-static int setfs(addr, path, p)
- struct sockaddr_in *addr;
- char *path;
- char *p;
-{
- unsigned ip = 0;
- int val;
-
- if (((val = getdec(&p)) < 0) || (val > 255)) return(0);
- ip = val << 24;
- if (*p != '.') return(0);
- p++;
- if (((val = getdec(&p)) < 0) || (val > 255)) return(0);
- ip |= (val << 16);
- if (*p != '.') return(0);
- p++;
- if (((val = getdec(&p)) < 0) || (val > 255)) return(0);
- ip |= (val << 8);
- if (*p != '.') return(0);
- p++;
- if (((val = getdec(&p)) < 0) || (val > 255)) return(0);
- ip |= val;
- if (*p != ':') return(0);
- p++;
-
- addr->sin_addr.s_addr = htonl(ip);
- addr->sin_len = sizeof(struct sockaddr_in);
- addr->sin_family = AF_INET;
-
- strncpy(path,p,MNAMELEN-1);
- return(1);
-}
-#endif
-
-static int getdec(ptr)
- char **ptr;
-{
- char *p = *ptr;
- int ret=0;
- if ((*p < '0') || (*p > '9')) return(-1);
- while ((*p >= '0') && (*p <= '9')) {
- ret = ret*10 + (*p - '0');
- p++;
- }
- *ptr = p;
- return(ret);
-}
-
-static char *substr(a,b)
- char *a,*b;
-{
- char *loc1;
- char *loc2;
-
- while (*a != '\0') {
- loc1 = a;
- loc2 = b;
- while (*loc1 == *loc2++) {
- if (*loc1 == '\0') return (0);
- loc1++;
- if (*loc2 == '\0') return (loc1);
- }
- a++;
- }
- return (0);
-}
-
-static void printip(char *prefix,struct in_addr addr)
-{
- unsigned int ip;
-
- ip = ntohl(addr.s_addr);
-
- printf("%s is %d.%d.%d.%d\n",prefix,
- ip >> 24, (ip >> 16) & 255 ,(ip >> 8) & 255 ,ip & 255 );
-}
-
-static int dhcpOptionOverload = 0;
-static char dhcp_gotgw = 0;
-static char dhcp_gotnetmask = 0;
-static char dhcp_gotserver = 0;
-static char dhcp_gotlogserver = 0;
-static struct sockaddr_in dhcp_netmask;
-static struct sockaddr_in dhcp_gw;
-
-static void
-processOptions (unsigned char *optbuf, int optbufSize)
-{
- int j = 0;
- int len;
- int code, ncode;
- char *p;
-
- ncode = optbuf[0];
- while (j < optbufSize) {
- code = optbuf[j] = ncode;
- if (code == 255)
- return;
- if (code == 0) {
- j++;
- continue;
- }
- len = optbuf[j+1];
- j += 2;
- if ((len + j) >= optbufSize) {
- printf ("Truncated field for code %d", code);
- return;
- }
- ncode = optbuf[j+len];
- optbuf[j+len] = '\0';
- p = &optbuf[j];
- j += len;
-
- /*
- * Process the option
- */
- switch (code) {
- case 1:
- /* Subnet mask */
- if (len!=4)
- panic("bootpc: subnet mask len is %d",len);
- bcopy (p, &dhcp_netmask.sin_addr, 4);
- dhcp_gotnetmask = 1;
- break;
-
- case 2:
- /* Time offset */
- if (len!=4)
- panic("bootpc: time offset len is %d",len);
- bcopy (p, &rtems_bsdnet_timeoffset, 4);
- rtems_bsdnet_timeoffset = ntohl (rtems_bsdnet_timeoffset);
- break;
-
- case 3:
- /* Routers */
- if (len % 4)
- panic ("bootpc: Router Len is %d", len);
- if (len > 0) {
- bcopy(p, &dhcp_gw.sin_addr, 4);
- dhcp_gotgw = 1;
- }
- break;
-
- case 42:
- /* NTP servers */
- if (len % 4)
- panic ("bootpc: time server Len is %d", len);
- {
- int tlen = 0;
- while ((tlen < len) &&
- (rtems_bsdnet_ntpserver_count < sizeof rtems_bsdnet_config.ntp_server /
- sizeof rtems_bsdnet_config.ntp_server[0])) {
- bcopy (p+tlen,
- &rtems_bsdnet_ntpserver[rtems_bsdnet_ntpserver_count],
- 4);
- printip("Time Server",
- rtems_bsdnet_ntpserver[rtems_bsdnet_ntpserver_count]);
- rtems_bsdnet_ntpserver_count++;
- tlen += 4;
- }
- }
- break;
-
- case 6:
- /* Domain Name servers */
- if (len % 4)
- panic ("bootpc: DNS Len is %d", len);
- {
- int dlen = 0;
- while ((dlen < len) &&
- (rtems_bsdnet_nameserver_count < sizeof rtems_bsdnet_config.name_server /
- sizeof rtems_bsdnet_config.name_server[0])) {
- bcopy (p+dlen,
- &rtems_bsdnet_nameserver[rtems_bsdnet_nameserver_count],
- 4);
- printip("Domain Name Server",
- rtems_bsdnet_nameserver[rtems_bsdnet_nameserver_count]);
- rtems_bsdnet_nameserver_count++;
- dlen += 4;
- }
- }
- break;
-
- case 12:
- /* Host name */
- if (len>=MAXHOSTNAMELEN)
- panic ("bootpc: hostname >=%d bytes", MAXHOSTNAMELEN);
- if (sethostname (p, len) < 0)
- panic("Can't set host name");
- printf("Hostname is %s\n", p);
- break;
-
- case 7:
- /* Log servers */
- if (len % 4)
- panic ("bootpc: Log server Len is %d", len);
- if (len > 0) {
- bcopy(p, &rtems_bsdnet_log_host_address, 4);
- dhcp_gotlogserver = 1;
- }
- break;
-
- case 15:
- /* Domain name */
- if (p[0]) {
- rtems_bsdnet_domain_name = strdup (p);
- printf("Domain name is %s\n", rtems_bsdnet_domain_name);
- }
- break;
-
- case 16: /* Swap server IP address. unused */
- break;
-
- case 52:
- /* DHCP option override */
- if (len != 1)
- panic ("bootpc: DHCP option overload len is %d", len);
- dhcpOptionOverload = p[0];
- break;
-
- case 128: /* Site-specific option for DHCP servers that
- * a) don't supply tag 54
- * and
- * b) don't supply the server address in siaddr
- * For example, on Solaris 2.6 in.dhcpd, include in the dhcptab:
- * Bootsrv s Site,128,IP,1,1
- * and use that symbol in the macro that defines the client:
- * Bootsrv=<tftp-server-ip-address>
- */
- case 54:
- /* DHCP server */
- if (len != 4)
- panic ("bootpc: DHCP server len is %d", len);
- bcopy(p, &rtems_bsdnet_bootp_server_address, 4);
- dhcp_gotserver = 1;
- break;
-
- case 66:
- /* DHCP server name option */
- if (p[0])
- rtems_bsdnet_bootp_server_name = strdup (p);
- break;
-
- case 67:
- /* DHCP bootfile option */
- if (p[0])
- rtems_bsdnet_bootp_boot_file_name = strdup (p);
- break;
-
- default:
- printf ("Ignoring BOOTP/DHCP option code %d\n", code);
- break;
- }
- }
-}
-
-#define EALEN 6
-
-void
-bootpc_init(void)
-{
- struct bootp_packet call;
- struct bootp_packet reply;
- static u_int32_t xid = ~0xFF;
-
- struct ifreq ireq;
- struct ifnet *ifp;
- struct socket *so;
- int j;
- int error;
- struct sockaddr_in myaddr;
- struct ifaddr *ifa;
- struct sockaddr_dl *sdl = NULL;
- char *delim;
- struct proc *procp = NULL;
-
- /*
- * If already filled in, don't touch it here
- */
- if (nfs_diskless_valid)
- return;
-
- /*
- * Find a network interface.
- */
- for (ifp = ifnet; ifp != 0; ifp = ifp->if_next)
- if ((ifp->if_flags &
- (IFF_LOOPBACK|IFF_POINTOPOINT)) == 0)
- break;
- if (ifp == NULL)
- panic("bootpc_init: no suitable interface");
- bzero(&ireq,sizeof(ireq));
- sprintf(ireq.ifr_name, "%s%d", ifp->if_name,ifp->if_unit);
- printf("bootpc_init: using network interface '%s'\n",
- ireq.ifr_name);
-
- if ((error = socreate(AF_INET, &so, SOCK_DGRAM, 0,procp)) != 0)
- panic("nfs_boot: socreate, error=%d", error);
-
- bootpc_fakeup_interface(&ireq,so,procp);
-
- printf("Bootpc testing starting\n");
-
- /* Get HW address */
-
- for (ifa = ifp->if_addrlist;ifa; ifa = ifa->ifa_next)
- if (ifa->ifa_addr->sa_family == AF_LINK &&
- (sdl = ((struct sockaddr_dl *) ifa->ifa_addr)) &&
- sdl->sdl_type == IFT_ETHER)
- break;
-
- if (!sdl)
- panic("bootpc: Unable to find HW address");
- if (sdl->sdl_alen != EALEN )
- panic("bootpc: HW address len is %d, expected value is %d",
- sdl->sdl_alen,EALEN);
-
- printf("bootpc hw address is ");
- delim="";
- for (j=0;j<sdl->sdl_alen;j++) {
- printf("%s%x",delim,((unsigned char *)LLADDR(sdl))[j]);
- delim=":";
- }
- printf("\n");
-
-#if 0
- bootpboot_p_iflist();
- bootpboot_p_rtlist();
-#endif
-
- bzero((caddr_t) &call, sizeof(call));
-
- /* bootpc part */
- call.op = 1; /* BOOTREQUEST */
- call.htype= 1; /* 10mb ethernet */
- call.hlen=sdl->sdl_alen; /* Hardware address length */
- call.hops=0;
- xid++;
- call.xid = txdr_unsigned(xid);
- bcopy(LLADDR(sdl),&call.chaddr,sdl->sdl_alen);
-
- call.vend[0]=99;
- call.vend[1]=130;
- call.vend[2]=83;
- call.vend[3]=99;
- call.vend[4]=255;
-
- call.secs = 0;
- call.flags = htons(0x8000); /* We need an broadcast answer */
-
- error = bootpc_call(&call,&reply,procp);
-
- if (error)
- panic("BOOTP call failed -- error %d", error);
-
- /*
- * Initialize network address structures
- */
- bzero(&myaddr,sizeof(myaddr));
- bzero(&dhcp_netmask,sizeof(dhcp_netmask));
- bzero(&dhcp_gw,sizeof(dhcp_gw));
- myaddr.sin_len = sizeof(myaddr);
- myaddr.sin_family = AF_INET;
- dhcp_netmask.sin_len = sizeof(dhcp_netmask);
- dhcp_netmask.sin_family = AF_INET;
- dhcp_gw.sin_len = sizeof(dhcp_gw);
- dhcp_gw.sin_family= AF_INET;
-
- /*
- * Set our address
- */
- myaddr.sin_addr = reply.yiaddr;
- printip("My ip address",myaddr.sin_addr);
-
- /*
- * Process BOOTP/DHCP options
- */
- if (reply.vend[0]==99 && reply.vend[1]==130 &&
- reply.vend[2]==83 && reply.vend[3]==99) {
- processOptions (&reply.vend[4], sizeof(reply.vend) - 4);
- }
- if (dhcpOptionOverload & 1) {
- processOptions (reply.file, sizeof reply.file);
- }
- else {
- if (reply.file[0])
- rtems_bsdnet_bootp_boot_file_name = strdup (reply.file);
- }
- if (dhcpOptionOverload & 2) {
- processOptions (reply.sname, sizeof reply.sname);
- }
- else {
- if (reply.sname[0])
- rtems_bsdnet_bootp_server_name = strdup (reply.sname);
- }
- if (rtems_bsdnet_bootp_server_name)
- printf ("Server name is %s\n", rtems_bsdnet_bootp_server_name);
- if (rtems_bsdnet_bootp_boot_file_name)
- printf ("Boot file is %s\n", rtems_bsdnet_bootp_boot_file_name);
-
- /*
- * Use defaults if values were not supplied by BOOTP/DHCP options
- */
- if (!dhcp_gotnetmask) {
- if (IN_CLASSA(ntohl(myaddr.sin_addr.s_addr)))
- dhcp_netmask.sin_addr.s_addr = htonl(IN_CLASSA_NET);
- else if (IN_CLASSB(ntohl(myaddr.sin_addr.s_addr)))
- dhcp_netmask.sin_addr.s_addr = htonl(IN_CLASSB_NET);
- else
- dhcp_netmask.sin_addr.s_addr = htonl(IN_CLASSC_NET);
- }
- printip ("Subnet mask", dhcp_netmask.sin_addr);
- if (!dhcp_gotserver)
- rtems_bsdnet_bootp_server_address = reply.siaddr;
- printip ("Server ip address" ,rtems_bsdnet_bootp_server_address);
- if (!dhcp_gotgw)
- dhcp_gw.sin_addr = reply.giaddr;
- printip ("Gateway ip address", dhcp_gw.sin_addr);
- if (!dhcp_gotlogserver)
- rtems_bsdnet_log_host_address = rtems_bsdnet_bootp_server_address;
- printip ("Log server ip address", rtems_bsdnet_log_host_address);
-
- /*
- * Configure the interface with the new settings
- */
- error = bootpc_adjust_interface(&ireq,so,
- &myaddr,&dhcp_netmask,&dhcp_gw,procp);
- soclose(so);
-}
diff --git a/cpukit/libnetworking/nfs/krpc.h b/cpukit/libnetworking/nfs/krpc.h
deleted file mode 100644
index 8a21392657..0000000000
--- a/cpukit/libnetworking/nfs/krpc.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* $NetBSD: krpc.h,v 1.4 1995/12/19 23:07:11 cgd Exp $ */
-/* $Id$ */
-
-#include <sys/cdefs.h>
-
-int krpc_call __P((struct sockaddr_in *sin,
- u_int prog, u_int vers, u_int func,
- struct mbuf **data, struct mbuf **from, struct proc *procp));
-
-int krpc_portmap __P((struct sockaddr_in *sin,
- u_int prog, u_int vers, u_int16_t *portp, struct proc *procp));
-
-struct mbuf *xdr_string_encode __P((char *str, int len));
-
-/*
- * RPC definitions for the portmapper
- */
-#define PMAPPORT 111
-#define PMAPPROG 100000
-#define PMAPVERS 2
-#define PMAPPROC_NULL 0
-#define PMAPPROC_SET 1
-#define PMAPPROC_UNSET 2
-#define PMAPPROC_GETPORT 3
-#define PMAPPROC_DUMP 4
-#define PMAPPROC_CALLIT 5
diff --git a/cpukit/libnetworking/nfs/nfs.h b/cpukit/libnetworking/nfs/nfs.h
deleted file mode 100644
index 68f206e213..0000000000
--- a/cpukit/libnetworking/nfs/nfs.h
+++ /dev/null
@@ -1,620 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Rick Macklem at The University of Guelph.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)nfs.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _NFS_NFS_H_
-#define _NFS_NFS_H_
-
-#include <nfs/rpcv2.h>
-
-/*
- * Tunable constants for nfs
- */
-
-#define NFS_MAXIOVEC 34
-#define NFS_TICKINTVL 5 /* Desired time for a tick (msec) */
-#define NFS_HZ (hz / nfs_ticks) /* Ticks/sec */
-#define NFS_TIMEO (1 * NFS_HZ) /* Default timeout = 1 second */
-#define NFS_MINTIMEO (1 * NFS_HZ) /* Min timeout to use */
-#define NFS_MAXTIMEO (60 * NFS_HZ) /* Max timeout to backoff to */
-#define NFS_MINIDEMTIMEO (5 * NFS_HZ) /* Min timeout for non-idempotent ops*/
-#define NFS_MAXREXMIT 100 /* Stop counting after this many */
-#define NFS_MAXWINDOW 1024 /* Max number of outstanding requests */
-#define NFS_RETRANS 10 /* Num of retrans for soft mounts */
-#define NFS_MAXGRPS 16 /* Max. size of groups list */
-#ifndef NFS_MINATTRTIMO
-#define NFS_MINATTRTIMO 5 /* Attribute cache timeout in sec */
-#endif
-#ifndef NFS_MAXATTRTIMO
-#define NFS_MAXATTRTIMO 60
-#endif
-#define NFS_WSIZE 8192 /* Def. write data size <= 8192 */
-#define NFS_RSIZE 8192 /* Def. read data size <= 8192 */
-#define NFS_READDIRSIZE 8192 /* Def. readdir size */
-#define NFS_DEFRAHEAD 1 /* Def. read ahead # blocks */
-#define NFS_MAXRAHEAD 4 /* Max. read ahead # blocks */
-#define NFS_MAXUIDHASH 64 /* Max. # of hashed uid entries/mp */
-#define NFS_MAXASYNCDAEMON 20 /* Max. number async_daemons runnable */
-#define NFS_MAXGATHERDELAY 100 /* Max. write gather delay (msec) */
-#ifndef NFS_GATHERDELAY
-#define NFS_GATHERDELAY 10 /* Default write gather delay (msec) */
-#endif
-#define NFS_DIRBLKSIZ 4096 /* Must be a multiple of DIRBLKSIZ */
-
-/*
- * Oddballs
- */
-#define NMOD(a) ((a) % nfs_asyncdaemons)
-#define NFS_CMPFH(n, f, s) \
- ((n)->n_fhsize == (s) && !bcmp((caddr_t)(n)->n_fhp, (caddr_t)(f), (s)))
-#define NFS_ISV3(v) (VFSTONFS((v)->v_mount)->nm_flag & NFSMNT_NFSV3)
-#define NFS_SRVMAXDATA(n) \
- (((n)->nd_flag & ND_NFSV3) ? (((n)->nd_nam2) ? \
- NFS_MAXDGRAMDATA : NFS_MAXDATA) : NFS_V2MAXDATA)
-
-/*
- * XXX
- * sys/buf.h should be edited to change B_APPENDWRITE --> B_NEEDCOMMIT, but
- * until then...
- * Same goes for sys/malloc.h, which needs M_NFSDIROFF,
- * M_NFSRVDESC and M_NFSBIGFH added.
- * The VA_EXCLUSIVE flag should be added for va_vaflags and set for an
- * exclusive create.
- * The B_INVAFTERWRITE flag should be set to whatever is required by the
- * buffer cache code to say "Invalidate the block after it is written back".
- */
-#ifndef B_NEEDCOMMIT
-#define B_NEEDCOMMIT B_APPENDWRITE
-#endif
-#ifndef M_NFSRVDESC
-#define M_NFSRVDESC M_TEMP
-#endif
-#ifndef M_NFSDIROFF
-#define M_NFSDIROFF M_TEMP
-#endif
-#ifndef M_NFSBIGFH
-#define M_NFSBIGFH M_TEMP
-#endif
-#ifndef VA_EXCLUSIVE
-#define VA_EXCLUSIVE 0
-#endif
-#ifdef __FreeBSD__
-#define B_INVAFTERWRITE B_NOCACHE
-#else
-#define B_INVAFTERWRITE B_INVAL
-#endif
-
-/*
- * These ifdefs try to handle the differences between the various 4.4BSD-Lite
- * based vfs interfaces.
- * btw: NetBSD-current does have a VOP_LEASDE(), but I don't know how to
- * differentiate between NetBSD-1.0 and NetBSD-current, so..
- * I also don't know about BSDi's 2.0 release.
- */
-#if !defined(HAS_VOPLEASE) && !defined(__FreeBSD__) && !defined(__NetBSD__)
-#define HAS_VOPLEASE 1
-#endif
-#if !defined(HAS_VOPREVOKE) && !defined(__FreeBSD__) && !defined(__NetBSD__)
-#define HAS_VOPREVOKE 1
-#endif
-
-/*
- * The IO_METASYNC flag should be implemented for local file systems.
- * (Until then, it is nothin at all.)
- */
-#ifndef IO_METASYNC
-#define IO_METASYNC 0
-#endif
-
-/*
- * Set the attribute timeout based on how recently the file has been modified.
- */
-#define NFS_ATTRTIMEO(np) \
- ((((np)->n_flag & NMODIFIED) || \
- (time.tv_sec - (np)->n_mtime) / 10 < NFS_MINATTRTIMO) ? NFS_MINATTRTIMO : \
- ((time.tv_sec - (np)->n_mtime) / 10 > NFS_MAXATTRTIMO ? NFS_MAXATTRTIMO : \
- (time.tv_sec - (np)->n_mtime) / 10))
-
-/*
- * Expected allocation sizes for major data structures. If the actual size
- * of the structure exceeds these sizes, then malloc() will be allocating
- * almost twice the memory required. This is used in nfs_init() to warn
- * the sysadmin that the size of a structure should be reduced.
- * (These sizes are always a power of 2. If the kernel malloc() changes
- * to one that does not allocate space in powers of 2 size, then this all
- * becomes bunk!)
- */
-#define NFS_NODEALLOC 256
-#define NFS_MNTALLOC 512
-#define NFS_SVCALLOC 256
-#define NFS_UIDALLOC 128
-
-/*
- * Structures for the nfssvc(2) syscall. Not that anyone but nfsd and mount_nfs
- * should ever try and use it.
- */
-struct nfsd_args {
- int sock; /* Socket to serve */
- caddr_t name; /* Client address for connection based sockets */
- int namelen; /* Length of name */
-};
-
-struct nfsd_srvargs {
- struct nfsd *nsd_nfsd; /* Pointer to in kernel nfsd struct */
- uid_t nsd_uid; /* Effective uid mapped to cred */
- u_long nsd_haddr; /* Ip address of client */
- struct ucred nsd_cr; /* Cred. uid maps to */
- int nsd_authlen; /* Length of auth string (ret) */
- u_char *nsd_authstr; /* Auth string (ret) */
- int nsd_verflen; /* and the verfier */
- u_char *nsd_verfstr;
- struct timeval nsd_timestamp; /* timestamp from verifier */
- u_long nsd_ttl; /* credential ttl (sec) */
- NFSKERBKEY_T nsd_key; /* Session key */
-};
-
-struct nfsd_cargs {
- char *ncd_dirp; /* Mount dir path */
- uid_t ncd_authuid; /* Effective uid */
- int ncd_authtype; /* Type of authenticator */
- int ncd_authlen; /* Length of authenticator string */
- u_char *ncd_authstr; /* Authenticator string */
- int ncd_verflen; /* and the verifier */
- u_char *ncd_verfstr;
- NFSKERBKEY_T ncd_key; /* Session key */
-};
-
-/*
- * Stats structure
- */
-struct nfsstats {
- int attrcache_hits;
- int attrcache_misses;
- int lookupcache_hits;
- int lookupcache_misses;
- int direofcache_hits;
- int direofcache_misses;
- int biocache_reads;
- int read_bios;
- int read_physios;
- int biocache_writes;
- int write_bios;
- int write_physios;
- int biocache_readlinks;
- int readlink_bios;
- int biocache_readdirs;
- int readdir_bios;
- int rpccnt[NFS_NPROCS];
- int rpcretries;
- int srvrpccnt[NFS_NPROCS];
- int srvrpc_errs;
- int srv_errs;
- int rpcrequests;
- int rpctimeouts;
- int rpcunexpected;
- int rpcinvalid;
- int srvcache_inproghits;
- int srvcache_idemdonehits;
- int srvcache_nonidemdonehits;
- int srvcache_misses;
- int srvnqnfs_leases;
- int srvnqnfs_maxleases;
- int srvnqnfs_getleases;
- int srvvop_writes;
-};
-
-/*
- * Flags for nfssvc() system call.
- */
-#define NFSSVC_BIOD 0x002
-#define NFSSVC_NFSD 0x004
-#define NFSSVC_ADDSOCK 0x008
-#define NFSSVC_AUTHIN 0x010
-#define NFSSVC_GOTAUTH 0x040
-#define NFSSVC_AUTHINFAIL 0x080
-#define NFSSVC_MNTD 0x100
-
-/*
- * fs.nfs sysctl(3) identifiers
- */
-#define NFS_NFSSTATS 1 /* struct: struct nfsstats */
-#define NFS_NFSPRIVPORT 2 /* int: prohibit nfs to resvports */
-
-#define FS_NFS_NAMES { \
- { 0, 0 }, \
- { "nfsstats", CTLTYPE_STRUCT }, \
- { "nfsprivport", CTLTYPE_INT }, \
-}
-
-/*
- * The set of signals the interrupt an I/O in progress for NFSMNT_INT mounts.
- * What should be in this set is open to debate, but I believe that since
- * I/O system calls on ufs are never interrupted by signals the set should
- * be minimal. My reasoning is that many current programs that use signals
- * such as SIGALRM will not expect file I/O system calls to be interrupted
- * by them and break.
- */
-#if defined(KERNEL) || defined(_KERNEL)
-
-struct uio; struct buf; struct vattr; struct nameidata; /* XXX */
-
-#define NFSINT_SIGMASK (sigmask(SIGINT)|sigmask(SIGTERM)|sigmask(SIGKILL)| \
- sigmask(SIGHUP)|sigmask(SIGQUIT))
-
-/*
- * Socket errors ignored for connectionless sockets??
- * For now, ignore them all
- */
-#define NFSIGNORE_SOERROR(s, e) \
- ((e) != EINTR && (e) != ERESTART && (e) != EWOULDBLOCK && \
- ((s) & PR_CONNREQUIRED) == 0)
-
-/*
- * Nfs outstanding request list element
- */
-struct nfsreq {
- TAILQ_ENTRY(nfsreq) r_chain;
- struct mbuf *r_mreq;
- struct mbuf *r_mrep;
- struct mbuf *r_md;
- caddr_t r_dpos;
- struct nfsmount *r_nmp;
- struct vnode *r_vp;
- u_long r_xid;
- int r_flags; /* flags on request, see below */
- int r_retry; /* max retransmission count */
- int r_rexmit; /* current retrans count */
- int r_timer; /* tick counter on reply */
- int r_procnum; /* NFS procedure number */
- int r_rtt; /* RTT for rpc */
- struct proc *r_procp; /* Proc that did I/O system call */
-};
-
-/*
- * Queue head for nfsreq's
- */
-extern TAILQ_HEAD(nfs_reqq, nfsreq) nfs_reqq;
-
-/* Flag values for r_flags */
-#define R_TIMING 0x01 /* timing request (in mntp) */
-#define R_SENT 0x02 /* request has been sent */
-#define R_SOFTTERM 0x04 /* soft mnt, too many retries */
-#define R_INTR 0x08 /* intr mnt, signal pending */
-#define R_SOCKERR 0x10 /* Fatal error on socket */
-#define R_TPRINTFMSG 0x20 /* Did a tprintf msg. */
-#define R_MUSTRESEND 0x40 /* Must resend request */
-#define R_GETONEREP 0x80 /* Probe for one reply only */
-
-/*
- * A list of nfssvc_sock structures is maintained with all the sockets
- * that require service by the nfsd.
- * The nfsuid structs hang off of the nfssvc_sock structs in both lru
- * and uid hash lists.
- */
-#ifndef NFS_UIDHASHSIZ
-#define NFS_UIDHASHSIZ 29 /* Tune the size of nfssvc_sock with this */
-#endif
-#define NUIDHASH(sock, uid) \
- (&(sock)->ns_uidhashtbl[(uid) % NFS_UIDHASHSIZ])
-#ifndef NFS_WDELAYHASHSIZ
-#define NFS_WDELAYHASHSIZ 16 /* and with this */
-#endif
-#define NWDELAYHASH(sock, f) \
- (&(sock)->ns_wdelayhashtbl[(*((u_long *)(f))) % NFS_WDELAYHASHSIZ])
-#ifndef NFS_MUIDHASHSIZ
-#define NFS_MUIDHASHSIZ 63 /* Tune the size of nfsmount with this */
-#endif
-#define NMUIDHASH(nmp, uid) \
- (&(nmp)->nm_uidhashtbl[(uid) % NFS_MUIDHASHSIZ])
-#define NFSNOHASH(fhsum) \
- (&nfsnodehashtbl[(fhsum) & nfsnodehash])
-
-/*
- * Network address hash list element
- */
-union nethostaddr {
- u_long had_inetaddr;
- struct mbuf *had_nam;
-};
-
-struct nfsuid {
- TAILQ_ENTRY(nfsuid) nu_lru; /* LRU chain */
- LIST_ENTRY(nfsuid) nu_hash; /* Hash list */
- int nu_flag; /* Flags */
- union nethostaddr nu_haddr; /* Host addr. for dgram sockets */
- struct ucred nu_cr; /* Cred uid mapped to */
- int nu_expire; /* Expiry time (sec) */
- struct timeval nu_timestamp; /* Kerb. timestamp */
- u_long nu_nickname; /* Nickname on server */
- NFSKERBKEY_T nu_key; /* and session key */
-};
-
-#define nu_inetaddr nu_haddr.had_inetaddr
-#define nu_nam nu_haddr.had_nam
-/* Bits for nu_flag */
-#define NU_INETADDR 0x1
-#define NU_NAM 0x2
-#define NU_NETFAM(u) (((u)->nu_flag & NU_INETADDR) ? AF_INET : AF_ISO)
-
-struct nfssvc_sock {
- TAILQ_ENTRY(nfssvc_sock) ns_chain; /* List of all nfssvc_sock's */
- TAILQ_HEAD(, nfsuid) ns_uidlruhead;
- struct file *ns_fp;
- struct socket *ns_so;
- struct mbuf *ns_nam;
- struct mbuf *ns_raw;
- struct mbuf *ns_rawend;
- struct mbuf *ns_rec;
- struct mbuf *ns_recend;
- struct mbuf *ns_frag;
- int ns_flag;
- int ns_solock;
- int ns_cc;
- int ns_reclen;
- int ns_numuids;
- u_long ns_sref;
- LIST_HEAD(, nfsrv_descript) ns_tq; /* Write gather lists */
- LIST_HEAD(, nfsuid) ns_uidhashtbl[NFS_UIDHASHSIZ];
- LIST_HEAD(nfsrvw_delayhash, nfsrv_descript) ns_wdelayhashtbl[NFS_WDELAYHASHSIZ];
-};
-
-/* Bits for "ns_flag" */
-#define SLP_VALID 0x01
-#define SLP_DOREC 0x02
-#define SLP_NEEDQ 0x04
-#define SLP_DISCONN 0x08
-#define SLP_GETSTREAM 0x10
-#define SLP_LASTFRAG 0x20
-#define SLP_ALLFLAGS 0xff
-
-extern TAILQ_HEAD(nfssvc_sockhead, nfssvc_sock) nfssvc_sockhead;
-extern int nfssvc_sockhead_flag;
-#define SLP_INIT 0x01
-#define SLP_WANTINIT 0x02
-
-/*
- * One of these structures is allocated for each nfsd.
- */
-struct nfsd {
- TAILQ_ENTRY(nfsd) nfsd_chain; /* List of all nfsd's */
- int nfsd_flag; /* NFSD_ flags */
- struct nfssvc_sock *nfsd_slp; /* Current socket */
- int nfsd_authlen; /* Authenticator len */
- u_char nfsd_authstr[RPCAUTH_MAXSIZ]; /* Authenticator data */
- int nfsd_verflen; /* and the Verifier */
- u_char nfsd_verfstr[RPCVERF_MAXSIZ];
- struct proc *nfsd_procp; /* Proc ptr */
- struct nfsrv_descript *nfsd_nd; /* Associated nfsrv_descript */
-};
-
-/* Bits for "nfsd_flag" */
-#define NFSD_WAITING 0x01
-#define NFSD_REQINPROG 0x02
-#define NFSD_NEEDAUTH 0x04
-#define NFSD_AUTHFAIL 0x08
-
-/*
- * This structure is used by the server for describing each request.
- * Some fields are used only when write request gathering is performed.
- */
-struct nfsrv_descript {
- u_quad_t nd_time; /* Write deadline (usec) */
- off_t nd_off; /* Start byte offset */
- off_t nd_eoff; /* and end byte offset */
- LIST_ENTRY(nfsrv_descript) nd_hash; /* Hash list */
- LIST_ENTRY(nfsrv_descript) nd_tq; /* and timer list */
- LIST_HEAD(,nfsrv_descript) nd_coalesce; /* coalesced writes */
- struct mbuf *nd_mrep; /* Request mbuf list */
- struct mbuf *nd_md; /* Current dissect mbuf */
- struct mbuf *nd_mreq; /* Reply mbuf list */
- struct mbuf *nd_nam; /* and socket addr */
- struct mbuf *nd_nam2; /* return socket addr */
- caddr_t nd_dpos; /* Current dissect pos */
- int nd_procnum; /* RPC # */
- int nd_stable; /* storage type */
- int nd_flag; /* nd_flag */
- int nd_len; /* Length of this write */
- int nd_repstat; /* Reply status */
- u_long nd_retxid; /* Reply xid */
- u_long nd_duration; /* Lease duration */
- struct timeval nd_starttime; /* Time RPC initiated */
- fhandle_t nd_fh; /* File handle */
- struct ucred nd_cr; /* Credentials */
-};
-
-/* Bits for "nd_flag" */
-#define ND_READ LEASE_READ
-#define ND_WRITE LEASE_WRITE
-#define ND_CHECK 0x04
-#define ND_LEASE (ND_READ | ND_WRITE | ND_CHECK)
-#define ND_NFSV3 0x08
-#define ND_NQNFS 0x10
-#define ND_KERBNICK 0x20
-#define ND_KERBFULL 0x40
-#define ND_KERBAUTH (ND_KERBNICK | ND_KERBFULL)
-
-extern TAILQ_HEAD(nfsd_head, nfsd) nfsd_head;
-extern int nfsd_head_flag;
-#define NFSD_CHECKSLP 0x01
-
-/*
- * These macros compare nfsrv_descript structures.
- */
-#define NFSW_CONTIG(o, n) \
- ((o)->nd_eoff >= (n)->nd_off && \
- !bcmp((caddr_t)&(o)->nd_fh, (caddr_t)&(n)->nd_fh, NFSX_V3FH))
-
-#define NFSW_SAMECRED(o, n) \
- (((o)->nd_flag & ND_KERBAUTH) == ((n)->nd_flag & ND_KERBAUTH) && \
- !bcmp((caddr_t)&(o)->nd_cr, (caddr_t)&(n)->nd_cr, \
- sizeof (struct ucred)))
-
-int nfs_reply __P((struct nfsreq *));
-int nfs_getreq __P((struct nfsrv_descript *,struct nfsd *,int));
-int nfs_send __P((struct socket *,struct mbuf *,struct mbuf *,struct nfsreq *));
-int nfs_rephead __P((int,struct nfsrv_descript *,struct nfssvc_sock *,int,int,u_quad_t *,struct mbuf **,struct mbuf **,caddr_t *));
-int nfs_sndlock __P((int *,struct nfsreq *));
-void nfs_sndunlock __P((int *flagp));
-int nfs_disct __P((struct mbuf **,caddr_t *,int,int,caddr_t *));
-int nfs_vinvalbuf __P((struct vnode *,int,struct ucred *,struct proc *,int));
-int nfs_readrpc __P((struct vnode *,struct uio *,struct ucred *));
-int nfs_writerpc __P((struct vnode *,struct uio *,struct ucred *,int *,int *));
-int nfs_readdirrpc __P((register struct vnode *,struct uio *,struct ucred *));
-int nfs_asyncio __P((struct buf *,struct ucred *));
-int nfs_doio __P((struct buf *,struct ucred *,struct proc *));
-int nfs_readlinkrpc __P((struct vnode *,struct uio *,struct ucred *));
-int nfs_sigintr __P((struct nfsmount *,struct nfsreq *r,struct proc *));
-int nfs_readdirplusrpc __P((struct vnode *,register struct uio *,struct ucred *));
-int nfsm_disct __P((struct mbuf **,caddr_t *,int,int,caddr_t *));
-void nfsm_srvfattr __P((struct nfsrv_descript *,struct vattr *,struct nfs_fattr *));
-void nfsm_srvwcc __P((struct nfsrv_descript *,int,struct vattr *,int,struct vattr *,struct mbuf **,char **));
-void nfsm_srvpostopattr __P((struct nfsrv_descript *,int,struct vattr *,struct mbuf **,char **));
-int netaddr_match __P((int,union nethostaddr *,struct mbuf *));
-int nfs_request __P((struct vnode *,struct mbuf *,int,struct proc *,struct ucred *,struct mbuf **,struct mbuf **,caddr_t *));
-int nfs_loadattrcache __P((struct vnode **,struct mbuf **,caddr_t *,struct vattr *));
-int nfs_namei __P((struct nameidata *,fhandle_t *,int,struct nfssvc_sock *,struct mbuf *,struct mbuf **,caddr_t *,struct vnode **,struct proc *,int));
-void nfsm_adj __P((struct mbuf *,int,int));
-int nfsm_mbuftouio __P((struct mbuf **,struct uio *,int,caddr_t *));
-void nfsrv_initcache __P((void));
-int nfs_getauth __P((struct nfsmount *,struct nfsreq *,struct ucred *,char **,int *,char *,int *,NFSKERBKEY_T));
-int nfs_getnickauth __P((struct nfsmount *,struct ucred *,char **,int *,char *,int));
-int nfs_savenickauth __P((struct nfsmount *,struct ucred *,int,NFSKERBKEY_T,struct mbuf **,char **,struct mbuf *));
-int nfs_adv __P((struct mbuf **,caddr_t *,int,int));
-void nfs_nhinit __P((void));
-void nfs_timer __P((void*));
-u_long nfs_hash __P((nfsfh_t *,int));
-void nfsrv_slpderef __P((struct nfssvc_sock *slp));
-int nfsrv_dorec __P((struct nfssvc_sock *,struct nfsd *,struct nfsrv_descript **));
-void nfsrv_cleancache __P((void));
-int nfsrv_getcache __P((struct nfsrv_descript *,struct nfssvc_sock *,struct mbuf **));
-int nfs_init __P((void));
-void nfsrv_updatecache __P((struct nfsrv_descript *,int,struct mbuf *));
-int nfs_connect __P((struct nfsmount *,struct nfsreq *));
-void nfs_disconnect __P((struct nfsmount *nmp));
-int nfs_getattrcache __P((struct vnode *,struct vattr *));
-int nfsm_strtmbuf __P((struct mbuf **,char **,char *,long));
-int nfs_bioread __P((struct vnode *,struct uio *,int,struct ucred *, int getpages));
-int nfsm_uiotombuf __P((struct uio *,struct mbuf **,int,caddr_t *));
-void nfsrv_init __P((int));
-void nfs_clearcommit __P((struct mount *));
-int nfsrv_errmap __P((struct nfsrv_descript *, int));
-void nfsrv_rcv __P((struct socket *so, caddr_t arg, int waitflag));
-void nfsrvw_sort __P((gid_t [],int));
-void nfsrv_setcred __P((struct ucred *,struct ucred *));
-int nfs_writebp __P((struct buf *,int));
-int nfsrv_object_create __P(( struct vnode * ));
-void nfsrv_wakenfsd __P((struct nfssvc_sock *slp));
-int nfsrv_writegather __P((struct nfsrv_descript **, struct nfssvc_sock *,
- struct proc *, struct mbuf **));
-int nfs_fsinfo __P((struct nfsmount *, struct vnode *, struct ucred *,
- struct proc *p));
-
-int nfsrv3_access __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
- struct proc *procp, struct mbuf **mrq));
-int nfsrv_commit __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
- struct proc *procp, struct mbuf **mrq));
-int nfsrv_create __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
- struct proc *procp, struct mbuf **mrq));
-int nfsrv_fhtovp __P((fhandle_t *,int,struct vnode **,
- struct ucred *,struct nfssvc_sock *,struct mbuf *,
- int *,int));
-int nfsrv_fsinfo __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
- struct proc *procp, struct mbuf **mrq));
-int nfsrv_getattr __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
- struct proc *procp, struct mbuf **mrq));
-int nfsrv_link __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
- struct proc *procp, struct mbuf **mrq));
-int nfsrv_lookup __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
- struct proc *procp, struct mbuf **mrq));
-int nfsrv_mkdir __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
- struct proc *procp, struct mbuf **mrq));
-int nfsrv_mknod __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
- struct proc *procp, struct mbuf **mrq));
-int nfsrv_noop __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
- struct proc *procp, struct mbuf **mrq));
-int nfsrv_null __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
- struct proc *procp, struct mbuf **mrq));
-int nfsrv_pathconf __P((struct nfsrv_descript *nfsd,
- struct nfssvc_sock *slp, struct proc *procp,
- struct mbuf **mrq));
-int nfsrv_read __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
- struct proc *procp, struct mbuf **mrq));
-int nfsrv_readdir __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
- struct proc *procp, struct mbuf **mrq));
-int nfsrv_readdirplus __P((struct nfsrv_descript *nfsd,
- struct nfssvc_sock *slp, struct proc *procp,
- struct mbuf **mrq));
-int nfsrv_readlink __P((struct nfsrv_descript *nfsd,
- struct nfssvc_sock *slp, struct proc *procp,
- struct mbuf **mrq));
-int nfsrv_remove __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
- struct proc *procp, struct mbuf **mrq));
-int nfsrv_rename __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
- struct proc *procp, struct mbuf **mrq));
-int nfsrv_rmdir __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
- struct proc *procp, struct mbuf **mrq));
-int nfsrv_setattr __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
- struct proc *procp, struct mbuf **mrq));
-int nfsrv_statfs __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
- struct proc *procp, struct mbuf **mrq));
-int nfsrv_symlink __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
- struct proc *procp, struct mbuf **mrq));
-int nfsrv_write __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
- struct proc *procp, struct mbuf **mrq));
-
-#ifdef NFS_DEBUG
-
-extern int nfs_debug;
-#define NFS_DEBUG_ASYNCIO 1 /* asynchronous i/o */
-#define NFS_DEBUG_WG 2 /* server write gathering */
-#define NFS_DEBUG_RC 4 /* server request caching */
-
-#define NFS_DPF(cat, args) \
- do { \
- if (nfs_debug & NFS_DEBUG_##cat) printf args; \
- } while (0)
-
-#else
-
-#define NFS_DPF(cat, args)
-
-#endif
-
-#endif /* KERNEL */
-
-#endif
diff --git a/cpukit/libnetworking/nfs/nfsdiskless.h b/cpukit/libnetworking/nfs/nfsdiskless.h
deleted file mode 100644
index 0ed5c8f6f7..0000000000
--- a/cpukit/libnetworking/nfs/nfsdiskless.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Rick Macklem at The University of Guelph.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)nfsdiskless.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _NFS_NFSDISKLESS_H_
-#define _NFS_NFSDISKLESS_H_
-
-/*
- * Structure that must be initialized for a diskless nfs client.
- * This structure is used by nfs_mountroot() to set up the root and swap
- * vnodes plus do a partial ifconfig(8) and route(8) so that the critical net
- * interface can communicate with the server.
- * The primary bootstrap is expected to fill in the appropriate fields before
- * starting the kernel. Whether or not the swap area is nfs mounted is determined
- * by the value in swdevt[0]. (equal to NODEV --> swap over nfs)
- * Currently only works for AF_INET protocols.
- * NB: All fields are stored in net byte order to avoid hassles with
- * client/server byte ordering differences.
- */
-
-/*
- * I have defined a new structure that can handle an NFS Version 3 file handle
- * but the kernel still expects the old Version 2 one to be provided. The
- * changes required in nfs_vfsops.c for using the new are documented there in
- * comments. (I felt that breaking network booting code by changing this
- * structure would not be prudent at this time, since almost all servers are
- * still Version 2 anyhow.)
- */
-struct nfsv3_diskless {
- struct ifaliasreq myif; /* Default interface */
- struct sockaddr_in mygateway; /* Default gateway */
- struct nfs_args swap_args; /* Mount args for swap file */
- int swap_fhsize; /* Size of file handle */
- u_char swap_fh[NFSX_V3FHMAX]; /* Swap file's file handle */
- struct sockaddr_in swap_saddr; /* Address of swap server */
- char swap_hostnam[MNAMELEN]; /* Host name for mount pt */
- int swap_nblks; /* Size of server swap file */
- struct ucred swap_ucred; /* Swap credentials */
- struct nfs_args root_args; /* Mount args for root fs */
- int root_fhsize; /* Size of root file handle */
- u_char root_fh[NFSX_V3FHMAX]; /* File handle of root dir */
- struct sockaddr_in root_saddr; /* Address of root server */
- char root_hostnam[MNAMELEN]; /* Host name for mount pt */
- long root_time; /* Timestamp of root fs */
- char my_hostnam[MAXHOSTNAMELEN]; /* Client host name */
-};
-
-struct nfs_diskless {
- struct ifaliasreq myif; /* Default interface */
- struct sockaddr_in mygateway; /* Default gateway */
- struct nfs_args swap_args; /* Mount args for swap file */
- u_char swap_fh[NFSX_V2FH]; /* Swap file's file handle */
- struct sockaddr_in swap_saddr; /* Address of swap server */
- char swap_hostnam[MNAMELEN]; /* Host name for mount pt */
- int swap_nblks; /* Size of server swap file */
- struct ucred swap_ucred; /* Swap credentials */
- struct nfs_args root_args; /* Mount args for root fs */
- u_char root_fh[NFSX_V2FH]; /* File handle of root dir */
- struct sockaddr_in root_saddr; /* Address of root server */
- char root_hostnam[MNAMELEN]; /* Host name for mount pt */
- long root_time; /* Timestamp of root fs */
- char my_hostnam[MAXHOSTNAMELEN]; /* Client host name */
-};
-
-#endif
diff --git a/cpukit/libnetworking/nfs/nfsproto.h b/cpukit/libnetworking/nfs/nfsproto.h
deleted file mode 100644
index 6ce7c5b960..0000000000
--- a/cpukit/libnetworking/nfs/nfsproto.h
+++ /dev/null
@@ -1,441 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Rick Macklem at The University of Guelph.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)nfsproto.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _NFS_NFSPROTO_H_
-#define _NFS_NFSPROTO_H_
-
-/*
- * nfs definitions as per the Version 2 and 3 specs
- */
-
-/*
- * Constants as defined in the Sun NFS Version 2 and 3 specs.
- * "NFS: Network File System Protocol Specification" RFC1094
- * and in the "NFS: Network File System Version 3 Protocol
- * Specification"
- */
-
-#define NFS_PORT 2049
-#define NFS_PROG 100003
-#define NFS_VER2 2
-#define NFS_VER3 3
-#define NFS_V2MAXDATA 8192
-#define NFS_MAXDGRAMDATA 16384
-#define NFS_MAXDATA 32768
-#define NFS_MAXPATHLEN 1024
-#define NFS_MAXNAMLEN 255
-#define NFS_MAXPKTHDR 404
-#define NFS_MAXPACKET (NFS_MAXPKTHDR + NFS_MAXDATA)
-#define NFS_MINPACKET 20
-#define NFS_FABLKSIZE 512 /* Size in bytes of a block wrt fa_blocks */
-
-/* Stat numbers for rpc returns (version 2 and 3) */
-#define NFS_OK 0
-#define NFSERR_PERM 1
-#define NFSERR_NOENT 2
-#define NFSERR_IO 5
-#define NFSERR_NXIO 6
-#define NFSERR_ACCES 13
-#define NFSERR_EXIST 17
-#define NFSERR_XDEV 18 /* Version 3 only */
-#define NFSERR_NODEV 19
-#define NFSERR_NOTDIR 20
-#define NFSERR_ISDIR 21
-#define NFSERR_INVAL 22 /* Version 3 only */
-#define NFSERR_FBIG 27
-#define NFSERR_NOSPC 28
-#define NFSERR_ROFS 30
-#define NFSERR_MLINK 31 /* Version 3 only */
-#define NFSERR_NAMETOL 63
-#define NFSERR_NOTEMPTY 66
-#define NFSERR_DQUOT 69
-#define NFSERR_STALE 70
-#define NFSERR_REMOTE 71 /* Version 3 only */
-#define NFSERR_WFLUSH 99 /* Version 2 only */
-#define NFSERR_BADHANDLE 10001 /* The rest Version 3 only */
-#define NFSERR_NOT_SYNC 10002
-#define NFSERR_BAD_COOKIE 10003
-#define NFSERR_NOTSUPP 10004
-#define NFSERR_TOOSMALL 10005
-#define NFSERR_SERVERFAULT 10006
-#define NFSERR_BADTYPE 10007
-#define NFSERR_JUKEBOX 10008
-#define NFSERR_TRYLATER NFSERR_JUKEBOX
-#define NFSERR_STALEWRITEVERF 30001 /* Fake return for nfs_commit() */
-
-#define NFSERR_RETVOID 0x20000000 /* Return void, not error */
-#define NFSERR_AUTHERR 0x40000000 /* Mark an authentication error */
-#define NFSERR_RETERR 0x80000000 /* Mark an error return for V3 */
-
-/* Sizes in bytes of various nfs rpc components */
-#define NFSX_UNSIGNED 4
-
-/* specific to NFS Version 2 */
-#define NFSX_V2FH 32
-#define NFSX_V2FATTR 68
-#define NFSX_V2SATTR 32
-#define NFSX_V2COOKIE 4
-#define NFSX_V2STATFS 20
-
-/* specific to NFS Version 3 */
-#define NFSX_V3FH (sizeof (fhandle_t)) /* size this server uses */
-#define NFSX_V3FHMAX 64 /* max. allowed by protocol */
-#define NFSX_V3FATTR 84
-#define NFSX_V3SATTR 60 /* max. all fields filled in */
-#define NFSX_V3SRVSATTR (sizeof (struct nfsv3_sattr))
-#define NFSX_V3POSTOPATTR (NFSX_V3FATTR + NFSX_UNSIGNED)
-#define NFSX_V3WCCDATA (NFSX_V3POSTOPATTR + 8 * NFSX_UNSIGNED)
-#define NFSX_V3COOKIEVERF 8
-#define NFSX_V3WRITEVERF 8
-#define NFSX_V3CREATEVERF 8
-#define NFSX_V3STATFS 52
-#define NFSX_V3FSINFO 48
-#define NFSX_V3PATHCONF 24
-
-/* variants for both versions */
-#define NFSX_FH(v3) ((v3) ? (NFSX_V3FHMAX + NFSX_UNSIGNED) : \
- NFSX_V2FH)
-#define NFSX_SRVFH(v3) ((v3) ? NFSX_V3FH : NFSX_V2FH)
-#define NFSX_FATTR(v3) ((v3) ? NFSX_V3FATTR : NFSX_V2FATTR)
-#define NFSX_PREOPATTR(v3) ((v3) ? (7 * NFSX_UNSIGNED) : 0)
-#define NFSX_POSTOPATTR(v3) ((v3) ? (NFSX_V3FATTR + NFSX_UNSIGNED) : 0)
-#define NFSX_POSTOPORFATTR(v3) ((v3) ? (NFSX_V3FATTR + NFSX_UNSIGNED) : \
- NFSX_V2FATTR)
-#define NFSX_WCCDATA(v3) ((v3) ? NFSX_V3WCCDATA : 0)
-#define NFSX_WCCORFATTR(v3) ((v3) ? NFSX_V3WCCDATA : NFSX_V2FATTR)
-#define NFSX_SATTR(v3) ((v3) ? NFSX_V3SATTR : NFSX_V2SATTR)
-#define NFSX_COOKIEVERF(v3) ((v3) ? NFSX_V3COOKIEVERF : 0)
-#define NFSX_WRITEVERF(v3) ((v3) ? NFSX_V3WRITEVERF : 0)
-#define NFSX_READDIR(v3) ((v3) ? (5 * NFSX_UNSIGNED) : \
- (2 * NFSX_UNSIGNED))
-#define NFSX_STATFS(v3) ((v3) ? NFSX_V3STATFS : NFSX_V2STATFS)
-
-/* nfs rpc procedure numbers (before version mapping) */
-#define NFSPROC_NULL 0
-#define NFSPROC_GETATTR 1
-#define NFSPROC_SETATTR 2
-#define NFSPROC_LOOKUP 3
-#define NFSPROC_ACCESS 4
-#define NFSPROC_READLINK 5
-#define NFSPROC_READ 6
-#define NFSPROC_WRITE 7
-#define NFSPROC_CREATE 8
-#define NFSPROC_MKDIR 9
-#define NFSPROC_SYMLINK 10
-#define NFSPROC_MKNOD 11
-#define NFSPROC_REMOVE 12
-#define NFSPROC_RMDIR 13
-#define NFSPROC_RENAME 14
-#define NFSPROC_LINK 15
-#define NFSPROC_READDIR 16
-#define NFSPROC_READDIRPLUS 17
-#define NFSPROC_FSSTAT 18
-#define NFSPROC_FSINFO 19
-#define NFSPROC_PATHCONF 20
-#define NFSPROC_COMMIT 21
-
-/* And leasing (nqnfs) procedure numbers (must be last) */
-#define NQNFSPROC_GETLEASE 22
-#define NQNFSPROC_VACATED 23
-#define NQNFSPROC_EVICTED 24
-
-#define NFSPROC_NOOP 25
-#define NFS_NPROCS 26
-
-/* Actual Version 2 procedure numbers */
-#define NFSV2PROC_NULL 0
-#define NFSV2PROC_GETATTR 1
-#define NFSV2PROC_SETATTR 2
-#define NFSV2PROC_NOOP 3
-#define NFSV2PROC_ROOT NFSV2PROC_NOOP /* Obsolete */
-#define NFSV2PROC_LOOKUP 4
-#define NFSV2PROC_READLINK 5
-#define NFSV2PROC_READ 6
-#define NFSV2PROC_WRITECACHE NFSV2PROC_NOOP /* Obsolete */
-#define NFSV2PROC_WRITE 8
-#define NFSV2PROC_CREATE 9
-#define NFSV2PROC_REMOVE 10
-#define NFSV2PROC_RENAME 11
-#define NFSV2PROC_LINK 12
-#define NFSV2PROC_SYMLINK 13
-#define NFSV2PROC_MKDIR 14
-#define NFSV2PROC_RMDIR 15
-#define NFSV2PROC_READDIR 16
-#define NFSV2PROC_STATFS 17
-
-/*
- * Constants used by the Version 3 protocol for various RPCs
- */
-#define NFSV3SATTRTIME_DONTCHANGE 0
-#define NFSV3SATTRTIME_TOSERVER 1
-#define NFSV3SATTRTIME_TOCLIENT 2
-
-#define NFSV3ACCESS_READ 0x01
-#define NFSV3ACCESS_LOOKUP 0x02
-#define NFSV3ACCESS_MODIFY 0x04
-#define NFSV3ACCESS_EXTEND 0x08
-#define NFSV3ACCESS_DELETE 0x10
-#define NFSV3ACCESS_EXECUTE 0x20
-
-#define NFSV3WRITE_UNSTABLE 0
-#define NFSV3WRITE_DATASYNC 1
-#define NFSV3WRITE_FILESYNC 2
-
-#define NFSV3CREATE_UNCHECKED 0
-#define NFSV3CREATE_GUARDED 1
-#define NFSV3CREATE_EXCLUSIVE 2
-
-#define NFSV3FSINFO_LINK 0x01
-#define NFSV3FSINFO_SYMLINK 0x02
-#define NFSV3FSINFO_HOMOGENEOUS 0x08
-#define NFSV3FSINFO_CANSETTIME 0x10
-
-/* Conversion macros */
-#define vtonfsv2_mode(t,m) \
- txdr_unsigned(((t) == VFIFO) ? MAKEIMODE(VCHR, (m)) : \
- MAKEIMODE((t), (m)))
-#define vtonfsv3_mode(m) txdr_unsigned((m) & 07777)
-#define nfstov_mode(a) (fxdr_unsigned(u_short, (a))&07777)
-#define vtonfsv2_type(a) txdr_unsigned(nfsv2_type[((long)(a))])
-#define vtonfsv3_type(a) txdr_unsigned(nfsv3_type[((long)(a))])
-#define nfsv2tov_type(a) nv2tov_type[fxdr_unsigned(u_long,(a))&0x7]
-#define nfsv3tov_type(a) nv3tov_type[fxdr_unsigned(u_long,(a))&0x7]
-
-/* File types */
-typedef enum { NFNON=0, NFREG=1, NFDIR=2, NFBLK=3, NFCHR=4, NFLNK=5,
- NFSOCK=6, NFFIFO=7 } nfstype;
-
-/* Structs for common parts of the rpc's */
-/*
- * File Handle (32 bytes for version 2), variable up to 64 for version 3.
- * File Handles of up to NFS_SMALLFH in size are stored directly in the
- * nfs node, whereas larger ones are malloc'd. (This never happens when
- * NFS_SMALLFH is set to 64.)
- * NFS_SMALLFH should be in the range of 32 to 64 and be divisible by 4.
- */
-#ifndef NFS_SMALLFH
-#define NFS_SMALLFH 64
-#endif
-union nfsfh {
- fhandle_t fh_generic;
- u_char fh_bytes[NFS_SMALLFH];
-};
-typedef union nfsfh nfsfh_t;
-
-struct nfsv2_time {
- u_long nfsv2_sec;
- u_long nfsv2_usec;
-};
-typedef struct nfsv2_time nfstime2;
-
-struct nfsv3_time {
- u_long nfsv3_sec;
- u_long nfsv3_nsec;
-};
-typedef struct nfsv3_time nfstime3;
-
-/*
- * Quads are defined as arrays of 2 longs to ensure dense packing for the
- * protocol and to facilitate xdr conversion.
- */
-struct nfs_uquad {
- u_long nfsuquad[2];
-};
-typedef struct nfs_uquad nfsuint64;
-
-/*
- * Used to convert between two u_longs and a u_quad_t.
- */
-union nfs_quadconvert {
- u_long lval[2];
- u_quad_t qval;
-};
-typedef union nfs_quadconvert nfsquad_t;
-
-/*
- * NFS Version 3 special file number.
- */
-struct nfsv3_spec {
- u_long specdata1;
- u_long specdata2;
-};
-typedef struct nfsv3_spec nfsv3spec;
-
-/*
- * File attributes and setable attributes. These structures cover both
- * NFS version 2 and the version 3 protocol. Note that the union is only
- * used so that one pointer can refer to both variants. These structures
- * go out on the wire and must be densely packed, so no quad data types
- * are used. (all fields are longs or u_longs or structures of same)
- * NB: You can't do sizeof(struct nfs_fattr), you must use the
- * NFSX_FATTR(v3) macro.
- */
-struct nfs_fattr {
- u_long fa_type;
- u_long fa_mode;
- u_long fa_nlink;
- u_long fa_uid;
- u_long fa_gid;
- union {
- struct {
- u_long nfsv2fa_size;
- u_long nfsv2fa_blocksize;
- u_long nfsv2fa_rdev;
- u_long nfsv2fa_blocks;
- u_long nfsv2fa_fsid;
- u_long nfsv2fa_fileid;
- nfstime2 nfsv2fa_atime;
- nfstime2 nfsv2fa_mtime;
- nfstime2 nfsv2fa_ctime;
- } fa_nfsv2;
- struct {
- nfsuint64 nfsv3fa_size;
- nfsuint64 nfsv3fa_used;
- nfsv3spec nfsv3fa_rdev;
- nfsuint64 nfsv3fa_fsid;
- nfsuint64 nfsv3fa_fileid;
- nfstime3 nfsv3fa_atime;
- nfstime3 nfsv3fa_mtime;
- nfstime3 nfsv3fa_ctime;
- } fa_nfsv3;
- } fa_un;
-};
-
-/* and some ugly defines for accessing union components */
-#define fa2_size fa_un.fa_nfsv2.nfsv2fa_size
-#define fa2_blocksize fa_un.fa_nfsv2.nfsv2fa_blocksize
-#define fa2_rdev fa_un.fa_nfsv2.nfsv2fa_rdev
-#define fa2_blocks fa_un.fa_nfsv2.nfsv2fa_blocks
-#define fa2_fsid fa_un.fa_nfsv2.nfsv2fa_fsid
-#define fa2_fileid fa_un.fa_nfsv2.nfsv2fa_fileid
-#define fa2_atime fa_un.fa_nfsv2.nfsv2fa_atime
-#define fa2_mtime fa_un.fa_nfsv2.nfsv2fa_mtime
-#define fa2_ctime fa_un.fa_nfsv2.nfsv2fa_ctime
-#define fa3_size fa_un.fa_nfsv3.nfsv3fa_size
-#define fa3_used fa_un.fa_nfsv3.nfsv3fa_used
-#define fa3_rdev fa_un.fa_nfsv3.nfsv3fa_rdev
-#define fa3_fsid fa_un.fa_nfsv3.nfsv3fa_fsid
-#define fa3_fileid fa_un.fa_nfsv3.nfsv3fa_fileid
-#define fa3_atime fa_un.fa_nfsv3.nfsv3fa_atime
-#define fa3_mtime fa_un.fa_nfsv3.nfsv3fa_mtime
-#define fa3_ctime fa_un.fa_nfsv3.nfsv3fa_ctime
-
-struct nfsv2_sattr {
- u_long sa_mode;
- u_long sa_uid;
- u_long sa_gid;
- u_long sa_size;
- nfstime2 sa_atime;
- nfstime2 sa_mtime;
-};
-
-/*
- * NFS Version 3 sattr structure for the new node creation case.
- */
-struct nfsv3_sattr {
- u_long sa_modetrue;
- u_long sa_mode;
- u_long sa_uidtrue;
- u_long sa_uid;
- u_long sa_gidtrue;
- u_long sa_gid;
- u_long sa_sizefalse;
- u_long sa_atimetype;
- nfstime3 sa_atime;
- u_long sa_mtimetype;
- nfstime3 sa_mtime;
-};
-
-struct nfs_statfs {
- union {
- struct {
- u_long nfsv2sf_tsize;
- u_long nfsv2sf_bsize;
- u_long nfsv2sf_blocks;
- u_long nfsv2sf_bfree;
- u_long nfsv2sf_bavail;
- } sf_nfsv2;
- struct {
- nfsuint64 nfsv3sf_tbytes;
- nfsuint64 nfsv3sf_fbytes;
- nfsuint64 nfsv3sf_abytes;
- nfsuint64 nfsv3sf_tfiles;
- nfsuint64 nfsv3sf_ffiles;
- nfsuint64 nfsv3sf_afiles;
- u_long nfsv3sf_invarsec;
- } sf_nfsv3;
- } sf_un;
-};
-
-#define sf_tsize sf_un.sf_nfsv2.nfsv2sf_tsize
-#define sf_bsize sf_un.sf_nfsv2.nfsv2sf_bsize
-#define sf_blocks sf_un.sf_nfsv2.nfsv2sf_blocks
-#define sf_bfree sf_un.sf_nfsv2.nfsv2sf_bfree
-#define sf_bavail sf_un.sf_nfsv2.nfsv2sf_bavail
-#define sf_tbytes sf_un.sf_nfsv3.nfsv3sf_tbytes
-#define sf_fbytes sf_un.sf_nfsv3.nfsv3sf_fbytes
-#define sf_abytes sf_un.sf_nfsv3.nfsv3sf_abytes
-#define sf_tfiles sf_un.sf_nfsv3.nfsv3sf_tfiles
-#define sf_ffiles sf_un.sf_nfsv3.nfsv3sf_ffiles
-#define sf_afiles sf_un.sf_nfsv3.nfsv3sf_afiles
-#define sf_invarsec sf_un.sf_nfsv3.nfsv3sf_invarsec
-
-struct nfsv3_fsinfo {
- u_long fs_rtmax;
- u_long fs_rtpref;
- u_long fs_rtmult;
- u_long fs_wtmax;
- u_long fs_wtpref;
- u_long fs_wtmult;
- u_long fs_dtpref;
- nfsuint64 fs_maxfilesize;
- nfstime3 fs_timedelta;
- u_long fs_properties;
-};
-
-struct nfsv3_pathconf {
- u_long pc_linkmax;
- u_long pc_namemax;
- u_long pc_notrunc;
- u_long pc_chownrestricted;
- u_long pc_caseinsensitive;
- u_long pc_casepreserving;
-};
-
-#endif
diff --git a/cpukit/libnetworking/nfs/rpcv2.h b/cpukit/libnetworking/nfs/rpcv2.h
deleted file mode 100644
index 5fd6e7febf..0000000000
--- a/cpukit/libnetworking/nfs/rpcv2.h
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Rick Macklem at The University of Guelph.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)rpcv2.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _NFS_RPCV2_H_
-#define _NFS_RPCV2_H_
-
-/*
- * Definitions for Sun RPC Version 2, from
- * "RPC: Remote Procedure Call Protocol Specification" RFC1057
- */
-
-/* Version # */
-#define RPC_VER2 2
-
-/* Authentication */
-#define RPCAUTH_NULL 0
-#define RPCAUTH_UNIX 1
-#define RPCAUTH_SHORT 2
-#define RPCAUTH_KERB4 4
-#define RPCAUTH_NQNFS 300000
-#define RPCAUTH_MAXSIZ 400
-#define RPCVERF_MAXSIZ 12 /* For Kerb, can actually be 400 */
-#define RPCAUTH_UNIXGIDS 16
-
-/*
- * Constants associated with authentication flavours.
- */
-#define RPCAKN_FULLNAME 0
-#define RPCAKN_NICKNAME 1
-
-/* Rpc Constants */
-#define RPC_CALL 0
-#define RPC_REPLY 1
-#define RPC_MSGACCEPTED 0
-#define RPC_MSGDENIED 1
-#define RPC_PROGUNAVAIL 1
-#define RPC_PROGMISMATCH 2
-#define RPC_PROCUNAVAIL 3
-#define RPC_GARBAGE 4 /* I like this one */
-#define RPC_MISMATCH 0
-#define RPC_AUTHERR 1
-
-/* Authentication failures */
-#define AUTH_BADCRED 1
-#define AUTH_REJECTCRED 2
-#define AUTH_BADVERF 3
-#define AUTH_REJECTVERF 4
-#define AUTH_TOOWEAK 5 /* Give em wheaties */
-
-/* Sizes of rpc header parts */
-#define RPC_SIZ 24
-#define RPC_REPLYSIZ 28
-
-/* RPC Prog definitions */
-#define RPCPROG_MNT 100005
-#define RPCMNT_VER1 1
-#define RPCMNT_VER3 3
-#define RPCMNT_MOUNT 1
-#define RPCMNT_DUMP 2
-#define RPCMNT_UMOUNT 3
-#define RPCMNT_UMNTALL 4
-#define RPCMNT_EXPORT 5
-#define RPCMNT_NAMELEN 255
-#define RPCMNT_PATHLEN 1024
-#define RPCPROG_NFS 100003
-
-/*
- * Structures used for RPCAUTH_KERB4.
- */
-struct nfsrpc_fullverf {
- u_long t1;
- u_long t2;
- u_long w2;
-};
-
-struct nfsrpc_fullblock {
- u_long t1;
- u_long t2;
- u_long w1;
- u_long w2;
-};
-
-struct nfsrpc_nickverf {
- u_long kind;
- struct nfsrpc_fullverf verf;
-};
-
-/*
- * and their sizes in bytes.. If sizeof (struct nfsrpc_xx) != these
- * constants, well then things will break in mount_nfs and nfsd.
- */
-#define RPCX_FULLVERF 12
-#define RPCX_FULLBLOCK 16
-#define RPCX_NICKVERF 16
-
-#ifdef NFSKERB
-XXX
-#else
-typedef u_char NFSKERBKEY_T[2];
-typedef u_char NFSKERBKEYSCHED_T[2];
-#endif
-#define NFS_KERBSRV "rcmd" /* Kerberos Service for NFS */
-#define NFS_KERBTTL (30 * 60) /* Credential ttl (sec) */
-#define NFS_KERBCLOCKSKEW (5 * 60) /* Clock skew (sec) */
-#define NFS_KERBW1(t) (*((u_long *)(&((t).dat[((t).length + 3) & ~0x3]))))
-#endif
diff --git a/cpukit/libnetworking/nfs/xdr_subs.h b/cpukit/libnetworking/nfs/xdr_subs.h
deleted file mode 100644
index 874730378f..0000000000
--- a/cpukit/libnetworking/nfs/xdr_subs.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Rick Macklem at The University of Guelph.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)xdr_subs.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _NFS_XDR_SUBS_H_
-#define _NFS_XDR_SUBS_H_
-
-/*
- * Macros used for conversion to/from xdr representation by nfs...
- * These use the MACHINE DEPENDENT routines ntohl, htonl
- * As defined by "XDR: External Data Representation Standard" RFC1014
- *
- * To simplify the implementation, we use ntohl/htonl even on big-endian
- * machines, and count on them being `#define'd away. Some of these
- * might be slightly more efficient as quad_t copies on a big-endian,
- * but we cannot count on their alignment anyway.
- */
-
-#define fxdr_unsigned(t, v) ((t)ntohl((long)(v)))
-#define txdr_unsigned(v) (htonl((long)(v)))
-
-#define fxdr_nfsv2time(f, t) { \
- (t)->tv_sec = ntohl(((struct nfsv2_time *)(f))->nfsv2_sec); \
- if (((struct nfsv2_time *)(f))->nfsv2_usec != 0xffffffff) \
- (t)->tv_nsec = 1000 * ntohl(((struct nfsv2_time *)(f))->nfsv2_usec); \
- else \
- (t)->tv_nsec = 0; \
-}
-#define txdr_nfsv2time(f, t) { \
- ((struct nfsv2_time *)(t))->nfsv2_sec = htonl((f)->tv_sec); \
- if ((f)->tv_nsec != -1) \
- ((struct nfsv2_time *)(t))->nfsv2_usec = htonl((f)->tv_nsec / 1000); \
- else \
- ((struct nfsv2_time *)(t))->nfsv2_usec = 0xffffffff; \
-}
-
-#define fxdr_nfsv3time(f, t) { \
- (t)->tv_sec = ntohl(((struct nfsv3_time *)(f))->nfsv3_sec); \
- (t)->tv_nsec = ntohl(((struct nfsv3_time *)(f))->nfsv3_nsec); \
-}
-#define txdr_nfsv3time(f, t) { \
- ((struct nfsv3_time *)(t))->nfsv3_sec = htonl((f)->tv_sec); \
- ((struct nfsv3_time *)(t))->nfsv3_nsec = htonl((f)->tv_nsec); \
-}
-
-#define fxdr_hyper(f, t) { \
- ((long *)(t))[_QUAD_HIGHWORD] = ntohl(((long *)(f))[0]); \
- ((long *)(t))[_QUAD_LOWWORD] = ntohl(((long *)(f))[1]); \
-}
-#define txdr_hyper(f, t) { \
- ((long *)(t))[0] = htonl(((long *)(f))[_QUAD_HIGHWORD]); \
- ((long *)(t))[1] = htonl(((long *)(f))[_QUAD_LOWWORD]); \
-}
-
-#endif
diff --git a/cpukit/libnetworking/opt_ipfw.h b/cpukit/libnetworking/opt_ipfw.h
deleted file mode 100644
index 5a6ee0337b..0000000000
--- a/cpukit/libnetworking/opt_ipfw.h
+++ /dev/null
@@ -1,6 +0,0 @@
-/*
- * $Id$
- */
-
-/* intentionally empty file */
-
diff --git a/cpukit/libnetworking/opt_mrouting.h b/cpukit/libnetworking/opt_mrouting.h
deleted file mode 100644
index 5a6ee0337b..0000000000
--- a/cpukit/libnetworking/opt_mrouting.h
+++ /dev/null
@@ -1,6 +0,0 @@
-/*
- * $Id$
- */
-
-/* intentionally empty file */
-
diff --git a/cpukit/libnetworking/opt_tcpdebug.h b/cpukit/libnetworking/opt_tcpdebug.h
deleted file mode 100644
index 4c10d1bac2..0000000000
--- a/cpukit/libnetworking/opt_tcpdebug.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * $Id$
- */
-
-/* intentionally empty file */
-
-/*
- * Uncomment the following line to turn on debug code. When you define
- * this symbol, tcp_trace() is called. If you want tcp_trace() to
- * print, then you need to edit netinet/tcp_debug to set the variable
- * "tcpconsdebug" to 1.
- */
-
-/*
-#define TCPDEBUG
-*/
diff --git a/cpukit/libnetworking/poll.h b/cpukit/libnetworking/poll.h
deleted file mode 100644
index 74dfca76c1..0000000000
--- a/cpukit/libnetworking/poll.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/*-
- * Copyright (c) 1997 Peter Wemm <peter@freebsd.org>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#ifndef _SYS_POLL_H_
-#define _SYS_POLL_H_
-
-/*
- * This file is intended to be compatable with the traditional poll.h.
- */
-
-/*
- * This structure is passed as an array to poll(2).
- */
-struct pollfd {
- int fd; /* which file descriptor to poll */
- short events; /* events we are interested in */
- short revents; /* events found on return */
-};
-
-/*
- * Requestable events. If poll(2) finds any of these set, they are
- * copied to revents on return.
- * XXX Note that FreeBSD doesn't make much distinction between POLLPRI
- * and POLLRDBAND since none of the file types have distinct priority
- * bands - and only some have an urgent "mode".
- * XXX Note POLLIN isn't really supported in true SVSV terms. Under SYSV
- * POLLIN includes all of normal, band and urgent data. Most poll handlers
- * on FreeBSD only treat it as "normal" data.
- */
-#define POLLIN 0x0001 /* any readable data available */
-#define POLLPRI 0x0002 /* OOB/Urgent readable data */
-#define POLLOUT 0x0004 /* file descriptor is writeable */
-#define POLLRDNORM 0x0040 /* non-OOB/URG data available */
-#define POLLWRNORM POLLOUT /* no write type differentiation */
-#define POLLRDBAND 0x0080 /* OOB/Urgent readable data */
-#define POLLWRBAND 0x0100 /* OOB/Urgent data can be written */
-
-/*
- * FreeBSD extensions: polling on a regular file might return one
- * of these events (currently only supported on UFS).
- */
-#define POLLEXTEND 0x0200 /* file may have been extended */
-#define POLLATTRIB 0x0400 /* file attributes may have changed */
-#define POLLNLINK 0x0800 /* (un)link/rename may have happened */
-#define POLLWRITE 0x1000 /* file's contents may have changed */
-
-/*
- * These events are set if they occur regardless of whether they were
- * requested.
- */
-#define POLLERR 0x0008 /* some poll error occurred */
-#define POLLHUP 0x0010 /* file descriptor was "hung up" */
-#define POLLNVAL 0x0020 /* requested events "invalid" */
-
-#define POLLSTANDARD (POLLIN|POLLPRI|POLLOUT|POLLRDNORM|POLLRDBAND|\
- POLLWRBAND|POLLERR|POLLHUP|POLLNVAL)
-
-/*
- * Request that poll() wait forever.
- * XXX in SYSV, this is defined in stropts.h, which is not included
- * by poll.h.
- */
-#define INFTIM (-1)
-
-#ifndef KERNEL
-
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-/*
- * XXX logically, poll() should be declared in <poll.h>, but SVR4 at
- * least has it here in <sys/poll.h>.
- * XXX poll() has "unsigned long" nfds on SVR4, not unsigned as on the
- * other BSDs.
- */
-int poll __P((struct pollfd *_pfd, unsigned _nfds, int _timeout));
-__END_DECLS
-
-#endif /* !KERNEL */
-
-#endif /* !_SYS_POLL_H_ */
diff --git a/cpukit/libnetworking/resolv.h b/cpukit/libnetworking/resolv.h
deleted file mode 100644
index 614f204706..0000000000
--- a/cpukit/libnetworking/resolv.h
+++ /dev/null
@@ -1,306 +0,0 @@
-/*-
- * Copyright (c) 1983, 1987, 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Portions Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-/*
- * @(#)resolv.h 8.1 (Berkeley) 6/2/93
- * From Id: resolv.h,v 8.12 1998/04/28 19:36:46 halley Exp $
- * $Id$
- */
-
-#ifndef _RESOLV_H_
-#define _RESOLV_H_
-
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/cdefs.h>
-#include <stdio.h>
-
-/*
- * Revision information. This is the release date in YYYYMMDD format.
- * It can change every day so the right thing to do with it is use it
- * in preprocessor commands such as "#if (__RES > 19931104)". Do not
- * compare for equality; rather, use it to determine whether your resolver
- * is new enough to contain a certain feature.
- */
-
-#define __RES 19960801
-
-/*
- * This used to be defined in res_query.c, now it's in herror.c. It was
- * never extern'd by any *.h file before it was placed here. herror.c is
- * part of libresolv.a even though it might make more sense in libnetdb.a
- * or even libnet.a.
- */
-
-extern int h_errno;
-
-/*
- * Resolver configuration file.
- * Normally not present, but may contain the address of the
- * inital name server(s) to query and the domain search list.
- */
-
-#ifndef _PATH_RESCONF
-#define _PATH_RESCONF "/etc/resolv.conf"
-#endif
-
-/*
- * Global defines and variables for resolver stub.
- */
-#define MAXNS 3 /* max # name servers we'll track */
-#define MAXDFLSRCH 3 /* # default domain levels to try */
-#define MAXDNSRCH 6 /* max # domains in search path */
-#define LOCALDOMAINPARTS 2 /* min levels in name that is "local" */
-
-#define RES_TIMEOUT 5 /* min. seconds between retries */
-#define MAXRESOLVSORT 10 /* number of net to sort on */
-#define RES_MAXNDOTS 15 /* should reflect bit field size */
-
-struct __res_state {
- int retrans; /* retransmition time interval */
- int retry; /* number of times to retransmit */
- u_long options; /* option flags - see below. */
- int nscount; /* number of name servers */
- struct sockaddr_in
- nsaddr_list[MAXNS]; /* address of name server */
-#define nsaddr nsaddr_list[0] /* for backward compatibility */
- u_short id; /* current message id */
- char *dnsrch[MAXDNSRCH+1]; /* components of domain to search */
- char defdname[256]; /* default domain (deprecated) */
- u_long pfcode; /* RES_PRF_ flags - see below. */
- unsigned ndots:4; /* threshold for initial abs. query */
- unsigned nsort:4; /* number of elements in sort_list[] */
- char unused[3];
- struct {
- struct in_addr addr;
- u_int32_t mask;
- } sort_list[MAXRESOLVSORT];
- char pad[72]; /* on an i386 this means 512b total */
-};
-
-/*
- * Resolver options (keep these in synch with res_debug.c, please)
- */
-#define RES_INIT 0x00000001 /* address initialized */
-#define RES_DEBUG 0x00000002 /* print debug messages */
-#define RES_AAONLY 0x00000004 /* authoritative answers only (!IMPL)*/
-#define RES_USEVC 0x00000008 /* use virtual circuit */
-#define RES_PRIMARY 0x00000010 /* query primary server only (!IMPL) */
-#define RES_IGNTC 0x00000020 /* ignore truncation errors */
-#define RES_RECURSE 0x00000040 /* recursion desired */
-#define RES_DEFNAMES 0x00000080 /* use default domain name */
-#define RES_STAYOPEN 0x00000100 /* Keep TCP socket open */
-#define RES_DNSRCH 0x00000200 /* search up local domain tree */
-#define RES_INSECURE1 0x00000400 /* type 1 security disabled */
-#define RES_INSECURE2 0x00000800 /* type 2 security disabled */
-#define RES_NOALIASES 0x00001000 /* shuts off HOSTALIASES feature */
-#define RES_USE_INET6 0x00002000 /* use/map IPv6 in gethostbyname() */
-#define RES_NOTLDQUERY 0x00004000 /* Don't query TLD names */
-
-#define RES_DEFAULT (RES_RECURSE | RES_DEFNAMES | RES_DNSRCH)
-
-/*
- * Resolver "pfcode" values. Used by dig.
- */
-#define RES_PRF_STATS 0x00000001
-#define RES_PRF_UPDATE 0x00000002
-#define RES_PRF_CLASS 0x00000004
-#define RES_PRF_CMD 0x00000008
-#define RES_PRF_QUES 0x00000010
-#define RES_PRF_ANS 0x00000020
-#define RES_PRF_AUTH 0x00000040
-#define RES_PRF_ADD 0x00000080
-#define RES_PRF_HEAD1 0x00000100
-#define RES_PRF_HEAD2 0x00000200
-#define RES_PRF_TTLID 0x00000400
-#define RES_PRF_HEADX 0x00000800
-#define RES_PRF_QUERY 0x00001000
-#define RES_PRF_REPLY 0x00002000
-#define RES_PRF_INIT 0x00004000
-/* 0x00008000 */
-
-typedef enum { res_goahead, res_nextns, res_modified, res_done, res_error }
- res_sendhookact;
-
-typedef res_sendhookact (*res_send_qhook)__P((struct sockaddr_in * const *ns,
- const u_char **query,
- int *querylen,
- u_char *ans,
- int anssiz,
- int *resplen));
-
-typedef res_sendhookact (*res_send_rhook)__P((const struct sockaddr_in *ns,
- const u_char *query,
- int querylen,
- u_char *ans,
- int anssiz,
- int *resplen));
-
-struct res_sym {
- int number; /* Identifying number, like T_MX */
- char * name; /* Its symbolic name, like "MX" */
- char * humanname; /* Its fun name, like "mail exchanger" */
-};
-
-extern struct __res_state _res;
-extern const struct res_sym __p_class_syms[];
-extern const struct res_sym __p_type_syms[];
-
-/* Private routines shared between libc/net, named, nslookup and others. */
-#define res_hnok __res_hnok
-#define res_ownok __res_ownok
-#define res_mailok __res_mailok
-#define res_dnok __res_dnok
-#define sym_ston __sym_ston
-#define sym_ntos __sym_ntos
-#define sym_ntop __sym_ntop
-#define b64_ntop __b64_ntop
-#define b64_pton __b64_pton
-#define loc_ntoa __loc_ntoa
-#define loc_aton __loc_aton
-#define fp_resstat __fp_resstat
-#define p_query __p_query
-#define dn_skipname __dn_skipname
-#define fp_resstat __fp_resstat
-#define fp_query __fp_query
-#define fp_nquery __fp_nquery
-#define hostalias __hostalias
-#define putlong __putlong
-#define putshort __putshort
-#define p_class __p_class
-#define p_time __p_time
-#define p_type __p_type
-#define p_query __p_query
-#define p_cdnname __p_cdnname
-#define p_section __p_section
-#define p_cdname __p_cdname
-#define p_fqnname __p_fqnname
-#define p_fqname __p_fqname
-#define p_option __p_option
-#define p_secstodate __p_secstodate
-#define dn_count_labels __dn_count_labels
-#define dn_comp __dn_comp
-#define dn_expand __dn_expand
-#define res_init __res_init
-#define res_randomid __res_randomid
-#define res_query __res_query
-#define res_search __res_search
-#define res_querydomain __res_querydomain
-#define res_mkquery __res_mkquery
-#define res_send __res_send
-#define res_isourserver __res_isourserver
-#define res_nameinquery __res_nameinquery
-#define res_queriesmatch __res_queriesmatch
-#define res_close __res_close
-#define res_mkupdate __res_mkupdate
-#define res_mkupdrec __res_mkupdrec
-#define res_freeupdrec __res_freeupdrec
-
-__BEGIN_DECLS
-int res_hnok __P((const char *));
-int res_ownok __P((const char *));
-int res_mailok __P((const char *));
-int res_dnok __P((const char *));
-int sym_ston __P((const struct res_sym *, const char *, int *));
-const char * sym_ntos __P((const struct res_sym *, int, int *));
-const char * sym_ntop __P((const struct res_sym *, int, int *));
-int b64_ntop __P((u_char const *, size_t, char *, size_t));
-int b64_pton __P((char const *, u_char *, size_t));
-int loc_aton __P((const char *, u_char *));
-const char * loc_ntoa __P((const u_char *, char *));
-int dn_skipname __P((const u_char *, const u_char *));
-void fp_resstat __P((struct __res_state *, FILE *));
-void fp_query __P((const u_char *, FILE *));
-void fp_nquery __P((const u_char *, int, FILE *));
-const char * hostalias __P((const char *));
-void putlong __P((u_int32_t, u_char *));
-void putshort __P((u_int16_t, u_char *));
-const char * p_class __P((int));
-const char * p_time __P((u_int32_t));
-const char * p_type __P((int));
-void p_query __P((const u_char *));
-const u_char * p_cdnname __P((const u_char *, const u_char *, int, FILE *));
-const u_char * p_cdname __P((const u_char *, const u_char *, FILE *));
-const u_char * p_fqnname __P((const u_char *, const u_char *,
- int, char *, int));
-const u_char * p_fqname __P((const u_char *, const u_char *, FILE *));
-const char * p_option __P((u_long));
-char * p_secstodate __P((u_long));
-int dn_count_labels __P((const char *));
-int dn_comp __P((const char *, u_char *, int,
- u_char **, u_char **));
-int dn_expand __P((const u_char *, const u_char *, const u_char *,
- char *, int));
-int res_init __P((void));
-u_int res_randomid __P((void));
-int res_query __P((const char *, int, int, u_char *, int));
-int res_search __P((const char *, int, int, u_char *, int));
-int res_querydomain __P((const char *, const char *, int, int,
- u_char *, int));
-int res_mkquery __P((int, const char *, int, int, const u_char *,
- int, const u_char *, u_char *, int));
-int res_send __P((const u_char *, int, u_char *, int));
-int res_isourserver __P((const struct sockaddr_in *));
-int res_nameinquery __P((const char *, int, int,
- const u_char *, const u_char *));
-int res_queriesmatch __P((const u_char *, const u_char *,
- const u_char *, const u_char *));
-void res_close __P((void));
-const char * p_section __P((int, int));
-/* XXX The following depend on the ns_updrec typedef in arpa/nameser.h */
-#ifdef _ARPA_NAMESER_H_
-int res_update __P((ns_updrec *));
-int res_mkupdate __P((ns_updrec *, u_char *, int));
-ns_updrec * res_mkupdrec __P((int, const char *, u_int, u_int, u_long));
-void res_freeupdrec __P((ns_updrec *));
-#endif
-__END_DECLS
-
-#endif /* !_RESOLV_H_ */
diff --git a/cpukit/libnetworking/rtems/Makefile.am b/cpukit/libnetworking/rtems/Makefile.am
deleted file mode 100644
index 28df4629c4..0000000000
--- a/cpukit/libnetworking/rtems/Makefile.am
+++ /dev/null
@@ -1,41 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-LIBNAME = lib.a
-LIB = $(ARCH)/$(LIBNAME)
-
-C_FILES = sghostname.c issetugid.c rtems_glue.c rtems_syscall.c \
- rtems_bootp.c rtems_showmbuf.c rtems_showroute.c rtems_showifstat.c \
- rtems_showipstat.c rtems_showicmpstat.c rtems_showtcpstat.c \
- rtems_showudpstat.c rtems_select.c
-C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
-
-OBJS = $(C_O_FILES)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../automake/lib.am
-
-#
-# Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -D_COMPILING_BSD_KERNEL_ -DKERNEL -DINET -DNFS -DDIAGNOSTIC \
- -DBOOTP_COMPAT
-
-$(LIB): $(OBJS)
- $(make-library)
-
-all-local: $(ARCH) $(OBJS) $(LIB)
-
-.PRECIOUS: $(LIB)
-
-EXTRA_DIST = issetugid.c rtems_bootp.c rtems_bsdnet.h \
- rtems_bsdnet_internal.h rtems_glue.c rtems_select.c rtems_showicmpstat.c \
- rtems_showifstat.c rtems_showipstat.c rtems_showmbuf.c rtems_showroute.c \
- rtems_showtcpstat.c rtems_showudpstat.c rtems_syscall.c sghostname.c \
- tftp.h
-
-include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/libnetworking/rtems/issetugid.c b/cpukit/libnetworking/rtems/issetugid.c
deleted file mode 100644
index 3baf0ec88b..0000000000
--- a/cpukit/libnetworking/rtems/issetugid.c
+++ /dev/null
@@ -1,11 +0,0 @@
-/*
- * Dummy version of BSD routine
- *
- * $Id$
- */
-
-int
-issetugid (void)
-{
- return 0;
-}
diff --git a/cpukit/libnetworking/rtems/rtems_bootp.c b/cpukit/libnetworking/rtems/rtems_bootp.c
deleted file mode 100644
index 47e3db758f..0000000000
--- a/cpukit/libnetworking/rtems/rtems_bootp.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * $Id$
- */
-
-#include <rtems.h>
-#include <rtems/error.h>
-#include <sys/types.h>
-#include <rtems/rtems_bsdnet.h>
-
-/*
- * Perform a BOOTP request
- */
-void
-rtems_bsdnet_do_bootp (void)
-{
- rtems_bsdnet_semaphore_obtain ();
- bootpc_init ();
- rtems_bsdnet_semaphore_release ();
-}
diff --git a/cpukit/libnetworking/rtems/rtems_bsdnet.h b/cpukit/libnetworking/rtems/rtems_bsdnet.h
deleted file mode 100644
index 5be2e932f9..0000000000
--- a/cpukit/libnetworking/rtems/rtems_bsdnet.h
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * $Id$
- */
-
-#ifndef _RTEMS_BSDNET_
-#define _RTEMS_BSDNET_
-
-#include <rtems.h>
-
-/*
- * If this file is included from inside the Network Stack proper or
- * a device driver, then __INSIDE_RTEMS_BSD_TCPIP_STACK__ should be
- * defined. This triggers a number of internally used definitions.
- */
-
-#if defined(__INSIDE_RTEMS_BSD_TCPIP_STACK__)
-#undef _COMPILING_BSD_KERNEL_
-#undef KERNEL
-#undef INET
-#undef NFS
-#undef DIAGNOSTIC
-#undef BOOTP_COMPAT
-
-#define _COMPILING_BSD_KERNEL_
-#define KERNEL
-#define INET
-#define NFS
-#define DIAGNOSTIC
-#define BOOTP_COMPAT
-#endif
-
-/*
- * Values that may be obtained by BOOTP
- */
-extern struct in_addr rtems_bsdnet_bootp_server_address;
-extern char *rtems_bsdnet_bootp_server_name;
-extern char *rtems_bsdnet_bootp_boot_file_name;
-extern struct in_addr rtems_bsdnet_ntpserver[];
-extern int rtems_bsdnet_ntpserver_count;
-extern long rtems_bsdnet_timeoffset;
-
-/*
- * Manipulate routing tables
- */
-struct sockaddr;
-struct rtentry;
-int rtems_bsdnet_rtrequest (
- int req,
- struct sockaddr *dst,
- struct sockaddr *gateway,
- struct sockaddr *netmask,
- int flags,
- struct rtentry **net_nrt);
-
-/*
- * Diagnostics
- */
-void rtems_bsdnet_show_inet_routes (void);
-void rtems_bsdnet_show_mbuf_stats (void);
-void rtems_bsdnet_show_if_stats (void);
-void rtems_bsdnet_show_ip_stats (void);
-void rtems_bsdnet_show_icmp_stats (void);
-void rtems_bsdnet_show_udp_stats (void);
-void rtems_bsdnet_show_tcp_stats (void);
-
-/*
- * Network configuration
- */
-struct rtems_bsdnet_ifconfig {
- /*
- * These two entries must be supplied for each interface.
- */
- char *name;
- int (*attach)(struct rtems_bsdnet_ifconfig *conf);
-
- /*
- * Link to next interface
- */
- struct rtems_bsdnet_ifconfig *next;
-
- /*
- * The following entries may be obtained
- * from BOOTP or explicitily supplied.
- */
- char *ip_address;
- char *ip_netmask;
- void *hardware_address;
-
- /*
- * The driver assigns defaults values to the following
- * entries if they are not explicitly supplied.
- */
- int ignore_broadcast;
- int mtu;
- int rbuf_count;
- int xbuf_count;
-
- /*
- * For external ethernet controller board the following
- * parameters are needed
- */
- unsigned int port; /* port of the board */
- unsigned int irno; /* irq of the board */
- unsigned int bpar; /* memory of the board */
-
-};
-
-struct rtems_bsdnet_config {
- /*
- * This entry points to the head of the ifconfig chain.
- */
- struct rtems_bsdnet_ifconfig *ifconfig;
-
- /*
- * This entry should be rtems_bsdnet_do_bootp if BOOTP
- * is being used to configure the network, and NULL
- * if BOOTP is not being used.
- */
- void (*bootp)(void);
-
- /*
- * The remaining items can be initialized to 0, in
- * which case the default value will be used.
- */
- rtems_task_priority network_task_priority; /* 100 */
- unsigned long mbuf_bytecount; /* 64 kbytes */
- unsigned long mbuf_cluster_bytecount; /* 128 kbytes */
- char *hostname; /* BOOTP */
- char *domainname; /* BOOTP */
- char *gateway; /* BOOTP */
- char *log_host; /* BOOTP */
- char *name_server[3]; /* BOOTP */
- char *ntp_server[3]; /* BOOTP */
-};
-extern struct rtems_bsdnet_config rtems_bsdnet_config;
-int rtems_bsdnet_initialize_network (void);
-void rtems_bsdnet_do_bootp (void);
-int rtems_bsdnet_synchronize_ntp (int interval, rtems_task_priority priority);
-
-#endif /* _RTEMS_BSDNET_ */
diff --git a/cpukit/libnetworking/rtems/rtems_bsdnet_internal.h b/cpukit/libnetworking/rtems/rtems_bsdnet_internal.h
deleted file mode 100644
index 51b7b919eb..0000000000
--- a/cpukit/libnetworking/rtems/rtems_bsdnet_internal.h
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * Declarations to fit FreeBSD to RTEMS.
- *
- *******************************************************************
- * WARNING *
- * This file should *never* be included by any application program *
- *******************************************************************
- *
- * $Id$
- */
-
-#ifndef _RTEMS_BSDNET_INTERNAL_H_
-#define _RTEMS_BSDNET_INTERNAL_H_
-
-typedef unsigned int vm_offset_t;
-typedef long long vm_ooffset_t;
-typedef unsigned int vm_pindex_t;
-typedef unsigned int vm_size_t;
-
-#define _BSD_OFF_T_ rtems_signed32
-#define _BSD_PID_T_ rtems_id
-#define _BSD_VA_LIST_ char *
-
-/* make sure we get the network versions of these */
-#include "../machine/types.h"
-#include "../machine/param.h"
-
-#include <sys/time.h>
-struct itimerval {
- struct timeval it_interval;
- struct timeval it_value;
-};
-struct mdproc {
- int md_flags;
- int *md_regs;
-};
-
-#define USHRT_MAX 65535
-
-/*
- * Other RTEMS/BSD glue
- */
-struct socket;
-extern int soconnsleep (struct socket *so);
-extern void soconnwakeup (struct socket *so);
-#define splnet() 0
-#define splimp() 0
-#define splx(_s) do { (_s) = 0; } while(0)
-
-#define ovbcopy(f,t,n) bcopy(f,t,n)
-#define copyout(f,t,n) (memcpy(t,f,n),0)
-#define copyin(f,t,n) (memcpy(t,f,n),0)
-
-#define random() rtems_bsdnet_random()
-#define panic rtems_panic
-#define suser(a,b) 0
-
-void microtime (struct timeval *tv);
-#define hz rtems_bsdnet_ticks_per_second
-#define tick rtems_bsdnet_microseconds_per_tick
-
-#define log rtems_bsdnet_log
-
-/*
- * Since we can't have two sys/types.h files, we'll hack around
- * and copy the contents of the BSD sys/types.h to here....
- */
-#include <sys/cdefs.h>
-
-typedef u_int64_t u_quad_t; /* quads */
-typedef int64_t quad_t;
-typedef quad_t * qaddr_t;
-
-typedef void __sighandler_t __P((int));
-typedef __sighandler_t *sig_t; /* type of pointer to a signal function */
-#define NSIG 32
-struct sigaltstack {
- char *ss_sp; /* signal stack base */
- int ss_size; /* signal stack length */
- int ss_flags; /* SS_DISABLE and/or SS_ONSTACK */
-};
-
-#ifdef KERNEL
-typedef int boolean_t;
-typedef struct vm_page *vm_page_t;
-#endif
-
-#ifndef _POSIX_SOURCE
-/*
- * minor() gives a cookie instead of an index since we don't want to
- * change the meanings of bits 0-15 or waste time and space shifting
- * bits 16-31 for devices that don't use them.
- */
-#define major(x) ((int)(((u_int)(x) >> 8)&0xff)) /* major number */
-#define minor(x) ((int)((x)&0xffff00ff)) /* minor number */
-#define makedev(x,y) ((dev_t)(((x) << 8) | (y))) /* create dev_t */
-#endif
-
-#include <machine/endian.h>
-
-typedef quad_t rlim_t; /* resource limit */
-typedef u_int32_t fixpt_t; /* fixed point number */
-
-/*
- * Forward structure declarations for function prototypes. We include the
- * common structures that cross subsystem boundaries here; others are mostly
- * used in the same place that the structure is defined.
- */
-struct proc;
-struct pgrp;
-struct ucred;
-struct rusage;
-struct file;
-struct buf;
-struct tty;
-struct uio;
-struct rtems_bsdnet_ifconfig;
-
-/*
- * Redo kernel memory allocation
- */
-#define malloc rtems_bsdnet_malloc
-#define free rtems_bsdnet_free
-
-#define M_NOWAIT 0x0001
-void *rtems_bsdnet_malloc (unsigned long size, int type, int flags);
-void rtems_bsdnet_free (void *addr, int type);
-
-void rtems_bsdnet_semaphore_obtain (void);
-void rtems_bsdnet_semaphore_release (void);
-void rtems_bsdnet_schednetisr (int n);
-int rtems_bsdnet_parse_driver_name (const struct rtems_bsdnet_ifconfig *config, char **namep);
-
-unsigned long rtems_bsdnet_seconds_since_boot (void);
-unsigned long rtems_bsdnet_random (void);
-
-rtems_id rtems_bsdnet_newproc (
- char *name,
- int stacksize,
- void (*entry)(void *),
- void *arg
-);
-
-rtems_status_code rtems_bsdnet_event_receive (
- rtems_event_set event_in,
- rtems_option option_set,
- rtems_interval ticks,
- rtems_event_set *event_out
-);
-
-/*
- * Network configuration
- */
-extern int rtems_bsdnet_ticks_per_second;
-extern int rtems_bsdnet_microseconds_per_tick;
-extern struct in_addr rtems_bsdnet_log_host_address;
-extern char *rtems_bsdnet_domain_name;
-extern struct in_addr rtems_bsdnet_nameserver[];
-extern int rtems_bsdnet_nameserver_count;
-
-/*
- * Internal IOCTL command
- */
-#define SIO_RTEMS_SHOW_STATS _IO('i', 250)
-
-/*
- * Some extra prototypes
- */
-int sethostname (char *name, size_t namelen);
-void domaininit (void *);
-void ifinit (void *);
-void ipintr (void);
-void arpintr (void);
-void bootpc_init(void);
-int socket (int, int, int);
-int ioctl (int, int, ...);
-
-/*
- * Events used by networking routines.
- * Everything will break if the application
- * tries to use these events or if the `sleep'
- * events are equal to any of the NETISR * events.
- */
-#define SBWAIT_EVENT RTEMS_EVENT_24
-#define SOSLEEP_EVENT RTEMS_EVENT_25
-#define NETISR_IP_EVENT (1 << NETISR_IP)
-#define NETISR_ARP_EVENT (1 << NETISR_ARP)
-#define NETISR_EVENTS (NETISR_IP_EVENT|NETISR_ARP_EVENT)
-#if (SBWAIT_EVENT & SOSLEEP_EVENT & NETISR_EVENTS)
-# error "Network event conflict"
-#endif
-
-#endif /* _RTEMS_BSDNET_INTERNAL_H_ */
diff --git a/cpukit/libnetworking/rtems/rtems_glue.c b/cpukit/libnetworking/rtems/rtems_glue.c
deleted file mode 100644
index 4213b91a2c..0000000000
--- a/cpukit/libnetworking/rtems/rtems_glue.c
+++ /dev/null
@@ -1,1020 +0,0 @@
-/*
- * $Id$
- */
-
-#include <string.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <errno.h>
-
-#include <rtems.h>
-#include <rtems/libio.h>
-#include <rtems/error.h>
-#include <rtems/rtems_bsdnet.h>
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/domain.h>
-#include <sys/mbuf.h>
-#include <sys/socketvar.h>
-#include <sys/socket.h>
-#include <sys/sockio.h>
-#include <sys/callout.h>
-#include <sys/proc.h>
-#include <sys/ioctl.h>
-#include <net/if.h>
-#include <net/route.h>
-#include <netinet/in.h>
-#include <vm/vm.h>
-#include <arpa/inet.h>
-
-#include <net/netisr.h>
-#include <net/route.h>
-
-/*
- * Memory allocation
- */
-static int nmbuf = (64 * 1024) / MSIZE;
- int nmbclusters = (128 * 1024) / MCLBYTES;
-
-/*
- * Socket buffering parameters
- */
-unsigned long sb_efficiency = 8;
-
-/*
- * Network task synchronization
- */
-static rtems_id networkSemaphore;
-static rtems_id networkDaemonTid;
-static rtems_unsigned32 networkDaemonPriority;
-static void networkDaemon (void *task_argument);
-
-/*
- * Network timing
- */
-int rtems_bsdnet_ticks_per_second;
-int rtems_bsdnet_microseconds_per_tick;
-
-/*
- * Callout processing
- */
-static rtems_interval ticksWhenCalloutsLastChecked;
-static struct callout *callfree, calltodo;
-
-/*
- * FreeBSD variables
- */
-int nfs_diskless_valid;
-
-/*
- * BOOTP values
- */
-struct in_addr rtems_bsdnet_log_host_address;
-struct in_addr rtems_bsdnet_bootp_server_address;
-char *rtems_bsdnet_bootp_boot_file_name;
-char *rtems_bsdnet_bootp_server_name;
-char *rtems_bsdnet_domain_name;
-struct in_addr rtems_bsdnet_nameserver[sizeof rtems_bsdnet_config.name_server /
- sizeof rtems_bsdnet_config.name_server[0]];
-int rtems_bsdnet_nameserver_count;
-struct in_addr rtems_bsdnet_ntpserver[sizeof rtems_bsdnet_config.ntp_server /
- sizeof rtems_bsdnet_config.ntp_server[0]];
-int rtems_bsdnet_ntpserver_count;
-long rtems_bsdnet_timeoffset;
-
-/*
- * Perform FreeBSD memory allocation.
- * FIXME: This should be modified to keep memory allocation statistics.
- */
-#undef malloc
-#undef free
-extern void *malloc (size_t);
-extern void free (void *);
-void *
-rtems_bsdnet_malloc (unsigned long size, int type, int flags)
-{
- void *p;
- int try = 0;
-
- for (;;) {
- p = malloc (size);
- if (p || (flags & M_NOWAIT))
- return p;
- rtems_bsdnet_semaphore_release ();
- if (++try >= 30) {
- printf ("rtems_bsdnet_malloc still waiting.\n");
- try = 0;
- }
- rtems_task_wake_after (rtems_bsdnet_ticks_per_second);
- rtems_bsdnet_semaphore_obtain ();
- }
-}
-
-/*
- * Free FreeBSD memory
- * FIXME: This should be modified to keep memory allocation statistics.
- */
-void
-rtems_bsdnet_free (void *addr, int type)
-{
- free (addr);
-}
-
-/*
- * Do the initializations required by the BSD code
- */
-static int
-bsd_init (void)
-{
- int i;
- char *p;
-
- /*
- * Set up mbuf cluster data strutures
- */
- p = malloc ((nmbclusters*MCLBYTES)+MCLBYTES-1);
- p = (char *)(((unsigned long)p + (MCLBYTES-1)) & ~(MCLBYTES-1));
- if (p == NULL) {
- printf ("Can't get network cluster memory.\n");
- return -1;
- }
- mbutl = (struct mbuf *)p;
- for (i = 0; i < nmbclusters; i++) {
- ((union mcluster *)p)->mcl_next = mclfree;
- mclfree = (union mcluster *)p;
- p += MCLBYTES;
- mbstat.m_clfree++;
- }
- mbstat.m_clusters = nmbclusters;
- mclrefcnt = malloc (nmbclusters);
- if (mclrefcnt == NULL) {
- printf ("Can't get mbuf cluster reference counts memory.\n");
- return -1;
- }
- memset (mclrefcnt, '\0', nmbclusters);
-
- /*
- * Set up mbuf data structures
- */
-
- p = malloc(nmbuf * MSIZE + MSIZE - 1);
- p = (char *)(((unsigned int)p + MSIZE - 1) & ~(MSIZE - 1));
- if (p == NULL) {
- printf ("Can't get network memory.\n");
- return -1;
- }
- for (i = 0; i < nmbuf; i++) {
- ((struct mbuf *)p)->m_next = mmbfree;
- mmbfree = (struct mbuf *)p;
- p += MSIZE;
- }
- mbstat.m_mbufs = nmbuf;
- mbstat.m_mtypes[MT_FREE] = nmbuf;
-
- /*
- * Set up domains
- */
- {
- extern struct domain routedomain;
- extern struct domain inetdomain;
-
- routedomain.dom_next = domains;
- domains = &routedomain;
- inetdomain.dom_next = domains;
- domains = &inetdomain;
- domaininit (NULL);
- }
-
- /*
- * Set up interfaces
- */
- ifinit (NULL);
- return 0;
-}
-
-/*
- * Initialize and start network operations
- */
-static int
-rtems_bsdnet_initialize (void)
-{
- rtems_status_code sc;
-
- /*
- * Set the priority of all network tasks
- */
- if (rtems_bsdnet_config.network_task_priority == 0)
- networkDaemonPriority = 100;
- else
- networkDaemonPriority = rtems_bsdnet_config.network_task_priority;
-
- /*
- * Set the memory allocation limits
- */
- if (rtems_bsdnet_config.mbuf_bytecount)
- nmbuf = rtems_bsdnet_config.mbuf_bytecount / MSIZE;
- if (rtems_bsdnet_config.mbuf_cluster_bytecount)
- nmbclusters = rtems_bsdnet_config.mbuf_cluster_bytecount / MCLBYTES;
-
- /*
- * Create the task-synchronization semaphore
- */
- sc = rtems_semaphore_create (rtems_build_name('B', 'S', 'D', 'n'),
- 0,
- RTEMS_FIFO |
- RTEMS_BINARY_SEMAPHORE |
- RTEMS_NO_INHERIT_PRIORITY |
- RTEMS_NO_PRIORITY_CEILING |
- RTEMS_LOCAL,
- 0,
- &networkSemaphore);
- if (sc != RTEMS_SUCCESSFUL) {
- printf ("Can't create network seamphore: `%s'\n", rtems_status_text (sc));
- return -1;
- }
-
- /*
- * Compute clock tick conversion factors
- */
- rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &rtems_bsdnet_ticks_per_second);
- if (rtems_bsdnet_ticks_per_second <= 0)
- rtems_bsdnet_ticks_per_second = 1;
- rtems_bsdnet_microseconds_per_tick = 1000000 / rtems_bsdnet_ticks_per_second;
-
- /*
- * Ensure that `seconds' is greater than 0
- */
- rtems_task_wake_after (rtems_bsdnet_ticks_per_second);
-
- /*
- * Set up BSD-style sockets
- */
- if (bsd_init () < 0)
- return -1;
-
- /*
- * Start network daemon
- */
- networkDaemonTid = rtems_bsdnet_newproc ("ntwk", 4096, networkDaemon, NULL);
-
- /*
- * Let other network tasks begin
- */
- rtems_bsdnet_semaphore_release ();
- return 0;
-}
-
-/*
- * Obtain network mutex
- */
-void
-rtems_bsdnet_semaphore_obtain (void)
-{
- rtems_status_code sc;
-
- sc = rtems_semaphore_obtain (networkSemaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
- if (sc != RTEMS_SUCCESSFUL)
- rtems_panic ("Can't obtain network semaphore: `%s'\n", rtems_status_text (sc));
-}
-
-/*
- * Release network mutex
- */
-void
-rtems_bsdnet_semaphore_release (void)
-{
- rtems_status_code sc;
-
- sc = rtems_semaphore_release (networkSemaphore);
- if (sc != RTEMS_SUCCESSFUL)
- rtems_panic ("Can't release network semaphore: `%s'\n", rtems_status_text (sc));
- }
-
-/*
- * Wait for something to happen to a socket buffer
- */
-int
-sbwait(sb)
- struct sockbuf *sb;
-{
- rtems_event_set events;
- rtems_id tid;
- rtems_status_code sc;
-
- /*
- * Soak up any pending events.
- * The sleep/wakeup synchronization in the FreeBSD
- * kernel has no memory.
- */
- rtems_event_receive (SBWAIT_EVENT, RTEMS_EVENT_ANY | RTEMS_NO_WAIT, RTEMS_NO_TIMEOUT, &events);
-
- /*
- * Set this task as the target of the wakeup operation.
- */
- rtems_task_ident (RTEMS_SELF, 0, &tid);
- sb->sb_sel.si_pid = tid;
-
- /*
- * Show that socket is waiting
- */
- sb->sb_flags |= SB_WAIT;
-
- /*
- * Release the network semaphore.
- */
- rtems_bsdnet_semaphore_release ();
-
- /*
- * Wait for the wakeup event.
- */
- sc = rtems_event_receive (SBWAIT_EVENT, RTEMS_EVENT_ANY | RTEMS_WAIT, sb->sb_timeo, &events);
-
- /*
- * Reobtain the network semaphore.
- */
- rtems_bsdnet_semaphore_obtain ();
-
- /*
- * Return the status of the wait.
- */
- switch (sc) {
- case RTEMS_SUCCESSFUL: return 0;
- case RTEMS_TIMEOUT: return EWOULDBLOCK;
- default: return ENXIO;
- }
-}
-
-
-/*
- * Wake up the task waiting on a socket buffer.
- */
-void
-sowakeup(so, sb)
- register struct socket *so;
- register struct sockbuf *sb;
-{
- if (sb->sb_flags & SB_WAIT) {
- sb->sb_flags &= ~SB_WAIT;
- rtems_event_send (sb->sb_sel.si_pid, SBWAIT_EVENT);
- }
- if (sb->sb_wakeup) {
- (*sb->sb_wakeup) (so, sb->sb_wakeuparg);
- }
-}
-
-/*
- * For now, a socket can be used by only one task at a time.
- */
-int
-sb_lock(sb)
- register struct sockbuf *sb;
-{
- rtems_panic ("Socket buffer is already in use.");
- return 0;
-}
-void
-wakeup (void *p)
-{
- rtems_panic ("Wakeup called");
-}
-
-/*
- * Wait for a connection/disconnection event.
- */
-int
-soconnsleep (struct socket *so)
-{
- rtems_event_set events;
- rtems_id tid;
- rtems_status_code sc;
-
- /*
- * Soak up any pending events.
- * The sleep/wakeup synchronization in the FreeBSD
- * kernel has no memory.
- */
- rtems_event_receive (SOSLEEP_EVENT, RTEMS_EVENT_ANY | RTEMS_NO_WAIT, RTEMS_NO_TIMEOUT, &events);
-
- /*
- * Set this task as the target of the wakeup operation.
- */
- if (so->so_pgid)
- rtems_panic ("Another task is already sleeping on that socket");
- rtems_task_ident (RTEMS_SELF, 0, &tid);
- so->so_pgid = tid;
-
- /*
- * Wait for the wakeup event.
- */
- sc = rtems_bsdnet_event_receive (SOSLEEP_EVENT, RTEMS_EVENT_ANY | RTEMS_WAIT, so->so_rcv.sb_timeo, &events);
-
- /*
- * Relinquish ownership of the socket.
- */
- so->so_pgid = 0;
-
- switch (sc) {
- case RTEMS_SUCCESSFUL: return 0;
- case RTEMS_TIMEOUT: return EWOULDBLOCK;
- default: return ENXIO;
- }
-}
-
-/*
- * Wake up a task waiting for a connection/disconnection to complete.
- */
-void
-soconnwakeup (struct socket *so)
-{
- if (so->so_pgid)
- rtems_event_send (so->so_pgid, SOSLEEP_EVENT);
-}
-
-/*
- * Send an event to the network daemon.
- * This corresponds to sending a software interrupt in the BSD kernel.
- */
-void
-rtems_bsdnet_schednetisr (int n)
-{
- rtems_event_send (networkDaemonTid, 1 << n);
-}
-
-/*
- * The network daemon
- * This provides a context to run BSD software interrupts
- */
-static void
-networkDaemon (void *task_argument)
-{
- rtems_event_set events;
- rtems_interval now;
- int ticksPassed;
- unsigned32 timeout;
- struct callout *c;
-
- for (;;) {
- c = calltodo.c_next;
- if (c)
- timeout = c->c_time;
- else
- timeout = RTEMS_NO_TIMEOUT;
- rtems_bsdnet_event_receive (NETISR_EVENTS,
- RTEMS_EVENT_ANY | RTEMS_WAIT,
- timeout,
- &events);
- if (events & NETISR_IP_EVENT)
- ipintr ();
- if (events & NETISR_ARP_EVENT)
- arpintr ();
- rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now);
- ticksPassed = now - ticksWhenCalloutsLastChecked;
- if (ticksPassed != 0) {
- ticksWhenCalloutsLastChecked = now;
-
- c = calltodo.c_next;
- if (c) {
- c->c_time -= ticksPassed;
- while ((c = calltodo.c_next) != NULL && c->c_time <= 0) {
- void *arg;
- void (*func) (void *);
-
- func = c->c_func;
- arg = c->c_arg;
- calltodo.c_next = c->c_next;
- c->c_next = callfree;
- callfree = c;
- (*func)(arg);
- }
- }
- }
- }
-}
-
-/*
- * Structure passed to task-start stub
- */
-struct newtask {
- void (*entry)(void *);
- void *arg;
-};
-
-/*
- * Task-start stub
- */
-static void
-taskEntry (rtems_task_argument arg)
-{
- struct newtask t;
-
- /*
- * Pick up task information and free
- * the memory allocated to pass the
- * information to this task.
- */
- t = *(struct newtask *)arg;
- free ((struct newtask *)arg);
-
- /*
- * Enter the competition for the network semaphore
- */
- rtems_bsdnet_semaphore_obtain ();
-
- /*
- * Enter the task
- */
- (*t.entry)(t.arg);
- rtems_panic ("Network task returned!\n");
-}
-
-/*
- * Start a network task
- */
-rtems_id
-rtems_bsdnet_newproc (char *name, int stacksize, void(*entry)(void *), void *arg)
-{
- struct newtask *t;
- char nm[4];
- rtems_id tid;
- rtems_status_code sc;
-
- strncpy (nm, name, 4);
- sc = rtems_task_create (rtems_build_name(nm[0], nm[1], nm[2], nm[3]),
- networkDaemonPriority,
- stacksize,
- RTEMS_PREEMPT|RTEMS_NO_TIMESLICE|RTEMS_NO_ASR|RTEMS_INTERRUPT_LEVEL(0),
- RTEMS_NO_FLOATING_POINT|RTEMS_LOCAL,
- &tid);
- if (sc != RTEMS_SUCCESSFUL)
- rtems_panic ("Can't create network daemon `%s': `%s'\n", name, rtems_status_text (sc));
-
- /*
- * Set up task arguments
- */
- t = malloc (sizeof *t);
- t->entry = entry;
- t->arg = arg;
-
- /*
- * Start the task
- */
- sc = rtems_task_start (tid, taskEntry, (rtems_task_argument)t);
- if (sc != RTEMS_SUCCESSFUL)
- rtems_panic ("Can't start network daemon `%s': `%s'\n", name, rtems_status_text (sc));
-
- /*
- * Let our caller know the i.d. of the new task
- */
- return tid;
-}
-
-rtems_status_code rtems_bsdnet_event_receive (
- rtems_event_set event_in,
- rtems_option option_set,
- rtems_interval ticks,
- rtems_event_set *event_out)
-{
- rtems_status_code sc;
-
- rtems_bsdnet_semaphore_release ();
- sc = rtems_event_receive (event_in, option_set, ticks, event_out);
- rtems_bsdnet_semaphore_obtain ();
- return sc;
-}
-
-/*
- * Return time since startup
- */
-void
-microtime (struct timeval *t)
-{
- rtems_interval now;
-
- rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now);
- t->tv_sec = now / rtems_bsdnet_ticks_per_second;
- t->tv_usec = (now % rtems_bsdnet_ticks_per_second) * rtems_bsdnet_microseconds_per_tick;
-}
-
-unsigned long
-rtems_bsdnet_seconds_since_boot (void)
-{
- rtems_interval now;
-
- rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now);
- return now / rtems_bsdnet_ticks_per_second;
-}
-
-/*
- * Fake random number generator
- */
-unsigned long
-rtems_bsdnet_random (void)
-{
- rtems_interval now;
-
- rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now);
- return (now * 99991);
-}
-
-/*
- * Callout list processing
- */
-void
-timeout(void (*ftn)(void *), void *arg, int ticks)
-{
- register struct callout *new, *p, *t;
-
- if (ticks <= 0)
- ticks = 1;
-
- /* Fill in the next free callout structure. */
- if (callfree == NULL) {
- callfree = malloc (sizeof *callfree);
- if (callfree == NULL)
- rtems_panic ("No memory for timeout table entry");
- callfree->c_next = NULL;
- }
-
- new = callfree;
- callfree = new->c_next;
- new->c_arg = arg;
- new->c_func = ftn;
-
- /*
- * The time for each event is stored as a difference from the time
- * of the previous event on the queue. Walk the queue, correcting
- * the ticks argument for queue entries passed. Correct the ticks
- * value for the queue entry immediately after the insertion point
- * as well. Watch out for negative c_time values; these represent
- * overdue events.
- */
- for (p = &calltodo;
- (t = p->c_next) != NULL && ticks > t->c_time; p = t)
- if (t->c_time > 0)
- ticks -= t->c_time;
- new->c_time = ticks;
- if (t != NULL)
- t->c_time -= ticks;
-
- /* Insert the new entry into the queue. */
- p->c_next = new;
- new->c_next = t;
-}
-
-/*
- * Ticks till specified time
- * XXX: This version worries only about seconds, but that's good
- * enough for the way the network code uses this routine.
- */
-int
-hzto(struct timeval *tv)
-{
- long diff = tv->tv_sec - rtems_bsdnet_seconds_since_boot();
-
- if (diff <= 0)
- return 1;
- return diff * rtems_bsdnet_ticks_per_second;
-}
-
-/*
- * Kernel debugging
- */
-int rtems_bsdnet_log_priority;
-void
-rtems_bsdnet_log (int priority, const char *fmt, ...)
-{
- va_list args;
-
- if (priority & rtems_bsdnet_log_priority) {
- va_start (args, fmt);
- vprintf (fmt, args);
- va_end (args);
- }
-}
-
-/*
- * IP header checksum routine for processors which don't have an inline version
- */
-u_int
-in_cksum_hdr (const void *ip)
-{
- rtems_unsigned32 sum;
- const rtems_unsigned16 *sp;
- int i;
-
- sum = 0;
- sp = (rtems_unsigned16 *)ip;
- for (i = 0 ; i < 10 ; i++)
- sum += *sp++;
- while (sum > 0xFFFF)
- sum = (sum & 0xffff) + (sum >> 16);
- return ~sum & 0xFFFF;
-}
-
-/*
- * Manipulate routing tables
- */
-int rtems_bsdnet_rtrequest (
- int req,
- struct sockaddr *dst,
- struct sockaddr *gateway,
- struct sockaddr *netmask,
- int flags,
- struct rtentry **net_nrt)
-{
- int error;
-
- rtems_bsdnet_semaphore_obtain ();
- error = rtrequest (req, dst, gateway, netmask, flags, net_nrt);
- rtems_bsdnet_semaphore_release ();
- if (error) {
- errno = error;
- return -1;
- }
- return 0;
-}
-
-static int
-rtems_bsdnet_setup (void)
-{
- struct rtems_bsdnet_ifconfig *ifp;
- int s;
- struct ifreq ifreq;
- struct sockaddr_in address;
- struct sockaddr_in netmask;
- struct sockaddr_in broadcast;
- struct sockaddr_in gateway;
- int i;
- extern char *strdup (const char *cp);
-
- /*
- * Set local parameters
- */
- if (rtems_bsdnet_config.hostname)
- sethostname (rtems_bsdnet_config.hostname,
- strlen (rtems_bsdnet_config.hostname));
- if (rtems_bsdnet_config.domainname)
- rtems_bsdnet_domain_name =
- strdup (rtems_bsdnet_config.domainname);
- if (rtems_bsdnet_config.log_host)
- rtems_bsdnet_log_host_address.s_addr =
- inet_addr (rtems_bsdnet_config.log_host);
- for (i = 0 ; i < sizeof rtems_bsdnet_config.name_server /
- sizeof rtems_bsdnet_config.name_server[0] ; i++) {
- if (!rtems_bsdnet_config.name_server[i])
- break;
- rtems_bsdnet_nameserver[rtems_bsdnet_nameserver_count++].s_addr
- = inet_addr (rtems_bsdnet_config.name_server[i]);
- }
- for (i = 0 ; i < sizeof rtems_bsdnet_config.ntp_server /
- sizeof rtems_bsdnet_config.ntp_server[0] ; i++) {
- if (!rtems_bsdnet_config.ntp_server[i])
- break;
- rtems_bsdnet_ntpserver[rtems_bsdnet_ntpserver_count++].s_addr
- = inet_addr (rtems_bsdnet_config.ntp_server[i]);
- }
-
- /*
- * Configure interfaces
- */
- s = socket (AF_INET, SOCK_DGRAM, 0);
- if (s < 0) {
- printf ("Can't create initial socket: %s\n", strerror (errno));
- return -1;
- }
- for (ifp = rtems_bsdnet_config.ifconfig ; ifp ; ifp = ifp->next) {
- if (ifp->ip_address == NULL)
- continue;
-
- /*
- * Get the interface flags
- */
- strcpy (ifreq.ifr_name, ifp->name);
- if (ioctl (s, SIOCGIFFLAGS, &ifreq) < 0) {
- printf ("Can't get %s flags: %s\n", ifp->name, strerror (errno));
- return -1;
- }
-
- /*
- * Bring interface up
- */
- ifreq.ifr_flags |= IFF_UP;
- if (ioctl (s, SIOCSIFFLAGS, &ifreq) < 0) {
- printf ("Can't bring %s up: %s\n", ifp->name, strerror (errno));
- return -1;
- }
-
- /*
- * Set interface netmask
- */
- memset (&netmask, '\0', sizeof netmask);
- netmask.sin_len = sizeof netmask;
- netmask.sin_family = AF_INET;
- netmask.sin_addr.s_addr = inet_addr (ifp->ip_netmask);
- memcpy (&ifreq.ifr_addr, &netmask, sizeof netmask);
- if (ioctl (s, SIOCSIFNETMASK, &ifreq) < 0) {
- printf ("Can't set %s netmask: %s\n", ifp->name, strerror (errno));
- return -1;
- }
-
- /*
- * Set interface address
- */
- memset (&address, '\0', sizeof address);
- address.sin_len = sizeof address;
- address.sin_family = AF_INET;
- address.sin_addr.s_addr = inet_addr (ifp->ip_address);
- memcpy (&ifreq.ifr_addr, &address, sizeof address);
- if (ioctl (s, SIOCSIFADDR, &ifreq) < 0) {
- printf ("Can't set %s address: %s\n", ifp->name, strerror (errno));
- return -1;
- }
-
- /*
- * Set interface broadcast address
- */
- memset (&broadcast, '\0', sizeof broadcast);
- broadcast.sin_len = sizeof broadcast;
- broadcast.sin_family = AF_INET;
- broadcast.sin_addr.s_addr = address.sin_addr.s_addr | ~netmask.sin_addr.s_addr;
- memcpy (&ifreq.ifr_broadaddr, &broadcast, sizeof broadcast);
- if (ioctl (s, SIOCSIFBRDADDR, &ifreq) < 0)
- printf ("Can't set %s broadcast address: %s\n", ifp->name, strerror (errno));
- }
-
- /*
- * We're done with the dummy socket
- */
- close (s);
-
- /*
- * Set default route
- */
- if (rtems_bsdnet_config.gateway) {
- address.sin_addr.s_addr = INADDR_ANY;
- netmask.sin_addr.s_addr = INADDR_ANY;
- memset (&gateway, '\0', sizeof gateway);
- gateway.sin_len = sizeof gateway;
- gateway.sin_family = AF_INET;
- gateway.sin_addr.s_addr = inet_addr (rtems_bsdnet_config.gateway);
- if (rtems_bsdnet_rtrequest (
- RTM_ADD,
- (struct sockaddr *)&address,
- (struct sockaddr *)&gateway,
- (struct sockaddr *)&netmask,
- (RTF_UP | RTF_GATEWAY | RTF_STATIC), NULL) < 0) {
- printf ("Can't set default route: %s\n", strerror (errno));
- return -1;
- }
- }
- return 0;
-}
-
-/*
- * Initialize the network
- */
-int
-rtems_bsdnet_initialize_network (void)
-{
- struct rtems_bsdnet_ifconfig *ifp;
-
- /*
- * Start network tasks.
- * Initialize BSD network data structures.
- */
- if (rtems_bsdnet_initialize () < 0)
- return -1;
-
- /*
- * Attach interfaces
- */
- for (ifp = rtems_bsdnet_config.ifconfig ; ifp ; ifp = ifp->next) {
- rtems_bsdnet_semaphore_obtain ();
- (ifp->attach)(ifp);
- rtems_bsdnet_semaphore_release ();
- }
-
- /*
- * Bring up the network
- */
- if (rtems_bsdnet_setup () < 0)
- return -1;
- if (rtems_bsdnet_config.bootp)
- (*rtems_bsdnet_config.bootp)();
- return 0;
-}
-
-/*
- * Parse a network driver name into a name and a unit number
- */
-int
-rtems_bsdnet_parse_driver_name (const struct rtems_bsdnet_ifconfig *config, char **namep)
-{
- const char *cp = config->name;
- char c;
- int unitNumber = 0;
-
- if (cp == NULL) {
- printf ("No network driver name.\n");
- return -1;
- }
- while ((c = *cp++) != '\0') {
- if ((c >= '0') && (c <= '9')) {
- int len = cp - config->name;
- if ((len < 2) || (len > 50))
- break;
- for (;;) {
- unitNumber = (unitNumber * 10) + (c - '0');
- c = *cp++;
- if (c == '\0') {
- char *unitName = malloc (len);
- if (unitName == NULL) {
- printf ("No memory.\n");
- return -1;
- }
- strncpy (unitName, config->name, len - 1);
- unitName[len-1] = '\0';
- *namep = unitName;
- return unitNumber;
- }
- if ((c < '0') || (c > '9'))
- break;
- }
- break;
- }
- }
- printf ("Bad network driver name `%s'.\n", config->name);
- return -1;
-}
-
-/*
- * Handle requests for more network memory
- * XXX: Another possibility would be to use a semaphore here with
- * a release in the mbuf free macro. I have chosen this `polling'
- * approach because:
- * 1) It is simpler.
- * 2) It adds no complexity to the free macro.
- * 3) Running out of mbufs should be a rare
- * condition -- predeployment testing of
- * an application should indicate the
- * required mbuf pool size.
- * XXX: Should there be a panic if a task is stuck in the loop for
- * more than a minute or so?
- */
-int
-m_mballoc (int nmb, int nowait)
-{
- if (nowait)
- return 0;
- m_reclaim ();
- if (mmbfree == NULL) {
- int try = 0;
- int print_limit = 30 * rtems_bsdnet_ticks_per_second;
-
- mbstat.m_wait++;
- for (;;) {
- rtems_bsdnet_semaphore_release ();
- rtems_task_wake_after (1);
- rtems_bsdnet_semaphore_obtain ();
- if (mmbfree)
- break;
- if (++try >= print_limit) {
- printf ("Still waiting for mbuf.\n");
- try = 0;
- }
- }
- }
- else {
- mbstat.m_drops++;
- }
- return 1;
-}
-
-int
-m_clalloc(ncl, nowait)
-{
- if (nowait)
- return 0;
- m_reclaim ();
- if (mclfree == NULL) {
- int try = 0;
- int print_limit = 30 * rtems_bsdnet_ticks_per_second;
-
- mbstat.m_wait++;
- for (;;) {
- rtems_bsdnet_semaphore_release ();
- rtems_task_wake_after (1);
- rtems_bsdnet_semaphore_obtain ();
- if (mclfree)
- break;
- if (++try >= print_limit) {
- printf ("Still waiting for mbuf cluster.\n");
- try = 0;
- }
- }
- }
- else {
- mbstat.m_drops++;
- }
- return 1;
-}
diff --git a/cpukit/libnetworking/rtems/rtems_select.c b/cpukit/libnetworking/rtems/rtems_select.c
deleted file mode 100644
index 9a58456e00..0000000000
--- a/cpukit/libnetworking/rtems/rtems_select.c
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- * $Id$
- */
-
-#include <string.h>
-#include <stdarg.h>
-/* #include <stdlib.h> */
-#include <stdio.h>
-
-#include <rtems.h>
-#include <rtems/libio.h>
-#include <rtems/error.h>
-#include <rtems/rtems_bsdnet.h>
-
-#include <sys/errno.h>
-#include <sys/fcntl.h>
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/protosw.h>
-#include <sys/proc.h>
-#include <sys/filio.h>
-
-#include <net/if.h>
-#include <net/route.h>
-
-/*
- *********************************************************************
- * RTEMS implementation of select() system call *
- *********************************************************************
- */
-
-/*
- * This implementation is quite restricted:
- * Works on sockets only -- no support for other devices!
- * A given socket can be in a read-select or a read/recv* by only
- * one task at a time.
- * A given socket can be in a write-select or a write/send* by only
- * one task at a time.
- *
- * NOTE - select() is a very expensive system call. It should be avoided
- * if at all possible. In many cases, rewriting the application
- * to use multiple tasks (one per socket) is a better solution.
- */
-
-static __inline int imin(int a, int b) { return (a < b ? a : b); }
-struct socket *rtems_bsdnet_fdToSocket(int fd);
-
-static int
-socket_select (struct socket *so, int which, rtems_id tid)
-{
- switch (which) {
-
- case FREAD:
- if (soreadable(so))
- return (1);
- so->so_rcv.sb_flags |= SB_WAIT;
- so->so_rcv.sb_sel.si_pid = tid;
- break;
-
- case FWRITE:
- if (sowriteable(so))
- return (1);
- so->so_rcv.sb_flags |= SB_WAIT;
- so->so_snd.sb_sel.si_pid = tid;
- break;
-
- case 0:
- if (so->so_oobmark || (so->so_state & SS_RCVATMARK))
- return (1);
- so->so_rcv.sb_sel.si_pid = tid;
- break;
- }
- return (0);
-}
-
-static int
-selscan (rtems_id tid, fd_mask **ibits, fd_mask **obits, int nfd, int *retval)
-{
- struct socket *so;
- int msk, i, fd;
- fd_mask bits, bit;
- int n = 0;
- static int flag[3] = { FREAD, FWRITE, 0 };
-
- for (msk = 0; msk < 3; msk++) {
- if (ibits[msk] == NULL)
- continue;
- for (i = 0; i < nfd; i += NFDBITS) {
- bits = ibits[msk][i/NFDBITS];
- for (fd = i, bit = 1 ; bits && (fd < nfd) ; fd++, bit <<= 1) {
- if ((bits & bit) == 0)
- continue;
- bits &= ~bit;
- so = rtems_bsdnet_fdToSocket (fd);
- if (so == NULL)
- return (EBADF);
- if (socket_select (so, flag[msk], tid)) {
- obits[msk][fd/NFDBITS] |=
- (1 << (fd % NFDBITS));
- n++;
- }
- }
- }
- }
- *retval = n;
- return (0);
-}
-
-int
-select (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *tv)
-{
- fd_mask *ibits[3], *obits[3];
- fd_set ob[3];
- int error, timo;
- int retval;
- rtems_id tid;
- rtems_interval then, now;
- rtems_event_set events;
-
- if (nfds < 0)
- return (EINVAL);
- if (tv) {
- timo = tv->tv_sec * hz + tv->tv_usec / tick;
- if (timo == 0)
- timo = 1;
- rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then);
- }
- else {
- timo = 0;
- }
-
-#define getbits(name,i) if (name) { \
- ibits[i] = &name->fds_bits[0]; \
- obits[i] = &ob[i].fds_bits[0]; \
- FD_ZERO(&ob[i]); \
- } \
- else ibits[i] = NULL
- getbits (readfds, 0);
- getbits (writefds, 1);
- getbits (exceptfds, 2);
-#undef getbits
-
- rtems_task_ident (RTEMS_SELF, 0, &tid);
- rtems_event_receive (SBWAIT_EVENT, RTEMS_EVENT_ANY | RTEMS_NO_WAIT, RTEMS_NO_TIMEOUT, &events);
- for (;;) {
- rtems_bsdnet_semaphore_obtain ();
- error = selscan(tid, ibits, obits, nfds, &retval);
- rtems_bsdnet_semaphore_release ();
- if (error || retval)
- break;
- if (timo) {
- rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now);
- timo -= now - then;
- if (timo <= 0)
- break;
- then = now;
- }
- rtems_event_receive (SBWAIT_EVENT, RTEMS_EVENT_ANY | RTEMS_WAIT, timo, &events);
- }
-
-#define putbits(name,i) if (name) *name = ob[i]
- putbits (readfds, 0);
- putbits (writefds, 1);
- putbits (exceptfds, 2);
-#undef putbits
- if (error) {
- errno = error;
- retval = -1;
- }
- return (retval);
-}
diff --git a/cpukit/libnetworking/rtems/rtems_showicmpstat.c b/cpukit/libnetworking/rtems/rtems_showicmpstat.c
deleted file mode 100644
index 1faea2512b..0000000000
--- a/cpukit/libnetworking/rtems/rtems_showicmpstat.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/sysctl.h>
-#include <sys/proc.h>
-#include <sys/mbuf.h>
-#include <netinet/in_systm.h>
-#include <netinet/in.h>
-#include <netinet/ip.h>
-#include <netinet/ip_icmp.h>
-#include <netinet/icmp_var.h>
-
-/*
- * Display ICMP statistics
- * Don't lock the rest of the network tasks out while printing.
- * It's no big deal if the values change while being printed.
- */
-static void
-showicmpstat (const char *name, unsigned long n)
-{
- if (n)
- printf ("%35s%12lu\n", name, n);
-}
-
-void
-rtems_bsdnet_show_icmp_stats (void)
-{
- int i;
- char cbuf[20];
-
- printf ("************ ICMP Statistics ************\n");
- showicmpstat ("Calls to icmp_error()", icmpstat.icps_error);
- showicmpstat ("Errors not sent -- old was icmp", icmpstat.icps_oldicmp);
- for (i = 0 ; i <= ICMP_MAXTYPE ; i++) {
- if (icmpstat.icps_outhist[i]) {
- sprintf (cbuf, "Type %d sent", i);
- showicmpstat (cbuf, icmpstat.icps_outhist[i]);
- }
- }
- showicmpstat ("icmp_code out of range", icmpstat.icps_badcode);
- showicmpstat ("packet < ICMP_MINLEN", icmpstat.icps_tooshort);
- showicmpstat ("bad checksum", icmpstat.icps_checksum);
- showicmpstat ("calculated bound mismatch", icmpstat.icps_badlen);
- showicmpstat ("number of responses", icmpstat.icps_reflect);
- showicmpstat ("b/mcast echo requests dropped", icmpstat.icps_bmcastecho);
- showicmpstat ("b/mcast tstamp requests dropped", icmpstat.icps_bmcasttstamp);
- for (i = 0 ; i <= ICMP_MAXTYPE ; i++) {
- if (icmpstat.icps_inhist[i]) {
- sprintf (cbuf, "Type %d received", i);
- showicmpstat (cbuf, icmpstat.icps_inhist[i]);
- }
- }
-
- printf ("\n");
-}
diff --git a/cpukit/libnetworking/rtems/rtems_showifstat.c b/cpukit/libnetworking/rtems/rtems_showifstat.c
deleted file mode 100644
index 20055517f6..0000000000
--- a/cpukit/libnetworking/rtems/rtems_showifstat.c
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/sysctl.h>
-#include <sys/proc.h>
-#include <sys/socket.h>
-#include <sys/ioctl.h>
-#include <net/if.h>
-#include <netinet/in.h>
-
-/*
- * Display an address
- */
-static int
-showaddress (char *name, struct sockaddr *a)
-{
- struct sockaddr_in *sa;
-
- if (!a || (a->sa_family != AF_INET))
- return 0;
- printf ("%s:", name);
- sa = (struct sockaddr_in *)a;
- printf ("%-16s", inet_ntoa (sa->sin_addr));
- return 1;
-}
-
-/*
- * Display interface statistics
- */
-void
-rtems_bsdnet_show_if_stats (void)
-{
- struct ifnet *ifp;
- struct ifaddr *ifa;
- unsigned short bit, flags;
- int printed;
-
- printf ("************ INTERFACE STATISTICS ************\n");
- for (ifp = ifnet; ifp; ifp = ifp->if_next) {
- printf ("***** %s%d *****\n", ifp->if_name, ifp->if_unit);
- for (ifa = ifp->if_addrlist ; ifa ; ifa = ifa->ifa_next) {
- printed = showaddress ("Address", ifa->ifa_addr);
- if (ifp->if_flags & IFF_BROADCAST)
- printed |= showaddress ("Broadcast Address", ifa->ifa_broadaddr);
- if (ifp->if_flags & IFF_POINTOPOINT)
- printed |= showaddress ("Destination Address", ifa->ifa_dstaddr);
- printed |= showaddress ("Net mask", ifa->ifa_netmask);
- if (printed)
- printf ("\n");
- }
-
- printf ("Flags:");
- for (bit = 1, flags = ifp->if_flags ; flags ; bit <<= 1) {
- char *cp;
- char xbuf[20];
- switch (flags & bit) {
- case 0: cp = NULL; break;
- case IFF_UP: cp = "Up"; break;
- case IFF_BROADCAST: cp = "Broadcast"; break;
- case IFF_DEBUG: cp = "Debug"; break;
- case IFF_LOOPBACK: cp = "Loopback"; break;
- case IFF_POINTOPOINT: cp = "Point-to-point"; break;
- case IFF_RUNNING: cp = "Running"; break;
- case IFF_NOARP: cp = "No-ARP"; break;
- case IFF_PROMISC: cp = "Promiscuous"; break;
- case IFF_ALLMULTI: cp = "All-multicast"; break;
- case IFF_OACTIVE: cp = "Active"; break;
- case IFF_SIMPLEX: cp = "Simplex"; break;
- case IFF_LINK0: cp = "Link0"; break;
- case IFF_LINK1: cp = "Link1"; break;
- case IFF_LINK2: cp = "Link2"; break;
- case IFF_MULTICAST: cp = "Multicast"; break;
- default: sprintf (xbuf, "%#x", bit); cp = xbuf; break;
- }
- if (cp) {
- flags &= ~bit;
- printf (" %s", cp);
- }
- }
- printf ("\n");
-
- printf ("Send queue limit:%-4d length:%-4d Dropped:%-8d\n",
- ifp->if_snd.ifq_maxlen,
- ifp->if_snd.ifq_len,
- ifp->if_snd.ifq_drops);
-
- /*
- * FIXME: Could print if_data statistics here,
- * but right now the drivers maintain their
- * own statistics.
- */
-
- /*
- * Grab the network semaphore.
- * In most cases this is not necessary, but it's
- * easier to always call the driver ioctl function
- * while holding the semaphore than to try
- * and explain why some ioctl commands are invoked
- * while holding the semaphore and others are
- * invoked while not holding the semaphore.
- */
- rtems_bsdnet_semaphore_obtain ();
- (*ifp->if_ioctl)(ifp, SIO_RTEMS_SHOW_STATS, NULL);
- rtems_bsdnet_semaphore_release ();
- }
- printf ("\n");
-}
diff --git a/cpukit/libnetworking/rtems/rtems_showipstat.c b/cpukit/libnetworking/rtems/rtems_showipstat.c
deleted file mode 100644
index 2dd499a8c0..0000000000
--- a/cpukit/libnetworking/rtems/rtems_showipstat.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/sysctl.h>
-#include <sys/proc.h>
-#include <sys/mbuf.h>
-#include <netinet/in_systm.h>
-#include <netinet/in.h>
-#include <netinet/ip.h>
-#include <netinet/ip_var.h>
-
-/*
- * Display IP statistics
- * Don't lock the rest of the network tasks out while printing.
- * It's no big deal if the values change while being printed.
- */
-static void
-showipstat (const char *name, unsigned long n)
-{
- if (n)
- printf ("%35s%12lu\n", name, n);
-}
-
-void
-rtems_bsdnet_show_ip_stats (void)
-{
- printf ("************ IP Statistics ************\n");
- showipstat ("total packets received", ipstat.ips_total);
- showipstat ("checksum bad", ipstat.ips_badsum);
- showipstat ("packet too short", ipstat.ips_tooshort);
- showipstat ("not enough data", ipstat.ips_toosmall);
- showipstat ("ip header length < data size", ipstat.ips_badhlen);
- showipstat ("ip length < ip header length", ipstat.ips_badlen);
- showipstat ("fragments received", ipstat.ips_fragments);
- showipstat ("frags dropped (dups, out of space)", ipstat.ips_fragdropped);
- showipstat ("fragments timed out", ipstat.ips_fragtimeout);
- showipstat ("packets forwarded", ipstat.ips_forward);
- showipstat ("packets rcvd for unreachable dest", ipstat.ips_cantforward);
- showipstat ("packets forwarded on same net", ipstat.ips_redirectsent);
- showipstat ("unknown or unsupported protocol", ipstat.ips_noproto);
- showipstat ("datagrams delivered to upper level", ipstat.ips_delivered);
- showipstat ("total ip packets generated here", ipstat.ips_localout);
- showipstat ("lost packets due to nobufs, etc.", ipstat.ips_odropped);
- showipstat ("total packets reassembled ok", ipstat.ips_reassembled);
- showipstat ("datagrams successfully fragmented", ipstat.ips_fragmented);
- showipstat ("output fragments created", ipstat.ips_ofragments);
- showipstat ("don't fragment flag was set, etc.", ipstat.ips_cantfrag);
- showipstat ("error in option processing", ipstat.ips_badoptions);
- showipstat ("packets discarded due to no route", ipstat.ips_noroute);
- showipstat ("ip version != 4", ipstat.ips_badvers);
- showipstat ("total raw ip packets generated", ipstat.ips_rawout);
- showipstat ("ip length > max ip packet size", ipstat.ips_toolong);
- printf ("\n");
-}
diff --git a/cpukit/libnetworking/rtems/rtems_showmbuf.c b/cpukit/libnetworking/rtems/rtems_showmbuf.c
deleted file mode 100644
index 39523bd00a..0000000000
--- a/cpukit/libnetworking/rtems/rtems_showmbuf.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/sysctl.h>
-#include <sys/proc.h>
-#include <sys/mbuf.h>
-
-/*
- * Display MBUF statistics
- * Don't lock the rest of the network tasks out while printing.
- * It's no big deal if the values change while being printed.
- */
-void
-rtems_bsdnet_show_mbuf_stats (void)
-{
- int i;
- int printed = 0;
- char *cp;
-
- printf ("************ MBUF STATISTICS ************\n");
- printf ("mbufs:%4lu clusters:%4lu free:%4lu\n",
- mbstat.m_mbufs, mbstat.m_clusters, mbstat.m_clfree);
- printf ("drops:%4lu waits:%4lu drains:%4lu\n",
- mbstat.m_drops, mbstat.m_wait, mbstat.m_drain);
- for (i = 0 ; i < 20 ; i++) {
- switch (i) {
- case MT_FREE: cp = "free"; break;
- case MT_DATA: cp = "data"; break;
- case MT_HEADER: cp = "header"; break;
- case MT_SOCKET: cp = "socket"; break;
- case MT_PCB: cp = "pcb"; break;
- case MT_RTABLE: cp = "rtable"; break;
- case MT_HTABLE: cp = "htable"; break;
- case MT_ATABLE: cp = "atable"; break;
- case MT_SONAME: cp = "soname"; break;
- case MT_SOOPTS: cp = "soopts"; break;
- case MT_FTABLE: cp = "ftable"; break;
- case MT_RIGHTS: cp = "rights"; break;
- case MT_IFADDR: cp = "ifaddr"; break;
- case MT_CONTROL: cp = "control"; break;
- case MT_OOBDATA: cp = "oobdata"; break;
- default: cp = NULL; break;
- }
- if ((cp != NULL) || (mbstat.m_mtypes[i] != 0)) {
- char cbuf[16];
- if (cp == NULL) {
- sprintf (cbuf, "Type %d", i);
- cp = cbuf;
- }
- printf ("%10s:%-8u", cp, mbstat.m_mtypes[i]);
- if (++printed == 4) {
- printf ("\n");
- printed = 0;
- }
- }
- }
- if (printed)
- printf ("\n");
- printf ("\n");
-}
diff --git a/cpukit/libnetworking/rtems/rtems_showroute.c b/cpukit/libnetworking/rtems/rtems_showroute.c
deleted file mode 100644
index c0d0b231e8..0000000000
--- a/cpukit/libnetworking/rtems/rtems_showroute.c
+++ /dev/null
@@ -1,236 +0,0 @@
-/*
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/sysctl.h>
-#include <sys/proc.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/domain.h>
-
-#include <net/if.h>
-#include <net/if_dl.h>
-#include <net/route.h>
-
-#include <netinet/in.h>
-
-#include <arpa/inet.h>
-
-/*
- * We'll use the application versions of realloc and free.
- */
-#undef free
-#undef malloc
-#include <stdlib.h>
-
-/*
- * Information per route
- */
-struct rinfo {
- struct sockaddr dst;
- union {
- struct sockaddr sa;
- struct sockaddr_in sin;
- struct sockaddr_dl sdl;
- } un;
- unsigned long pksent;
- unsigned long expire;
- int flags;
- char ifname[16];
- short ifunit;
- short refcnt;
-};
-
-/*
- * Information per display
- */
-struct dinfo {
- int capacity;
- int count;
- struct rinfo *routes;
-};
-
-/*
- * Copy address
- */
-static void
-copyAddress (void *to, void *from, int tolen)
-{
- int ncopy;
- struct sockaddr dummy;
-
- if (from == NULL) {
- /*
- * Create a fake address of unspecified type
- */
- from = &dummy;
- dummy.sa_len = 4;
- dummy.sa_family = AF_UNSPEC;
- }
- ncopy = ((struct sockaddr *)from)->sa_len;
- if (ncopy > tolen)
- ncopy = tolen;
- memcpy (to, from, ncopy);
-}
-
-/*
- * Package everything up before printing it.
- * We don't want to block all network operations till
- * the printing completes!
- */
-static int
-show_inet_route (rn, vw)
- struct radix_node *rn;
- void *vw;
-{
- struct rtentry *rt = (struct rtentry *)rn;
- struct ifnet *ifp;
- struct dinfo *dp = (struct dinfo *)vw;
- struct rinfo *r;
-
- /*
- * Get a pointer to a new route info structure
- */
- if (dp->count >= dp->capacity) {
- r = realloc (dp->routes, (sizeof *r) * (dp->capacity + 20));
- if (r == 0)
- return ENOMEM;
- dp->capacity += 20;
- dp->routes = r;
- }
- r = dp->routes + dp->count++;
-
- /*
- * Fill in the route info structure
- */
- copyAddress (&r->dst, rt_key(rt), sizeof r->dst);
- if (rt->rt_flags & (RTF_GATEWAY | RTF_HOST)) {
- copyAddress (&r->un, rt->rt_gateway, sizeof r->un);
- }
- else {
- /*
- * Create a fake address to hold the mask
- */
- struct sockaddr_in dummy;
-
- dummy.sin_family = AF_INET;
- dummy.sin_len = sizeof dummy;
- dummy.sin_addr = ((struct sockaddr_in *)rt_mask(rt))->sin_addr;
- copyAddress (&r->un, &dummy, sizeof r->un);
- }
- r->flags = rt->rt_flags;
- r->refcnt = rt->rt_refcnt;
- r->pksent = rt->rt_rmx.rmx_pksent;
- r->expire = rt->rt_rmx.rmx_expire;
- ifp = rt->rt_ifp;
- strncpy (r->ifname, ifp->if_name, sizeof r->ifname);
- r->ifunit = ifp->if_unit;
- return 0;
-}
-
-/*
- * Convert link address to ASCII
- */
-static char *
-link_ascii (struct sockaddr_dl *sdl, char *buf, int bufsize)
-{
- char *cp;
- int i;
- int first = 1;
- int nleft = sdl->sdl_alen;
- unsigned char *ap = LLADDR (sdl);
- static const char hextab[16] = "0123456789ABCDEF";
-
- cp = buf;
- while (nleft && (bufsize > 4)) {
- if (first) {
- first = 0;
- }
- else {
- *cp++ = ':';
- bufsize--;
- }
- i = *ap++;
- *cp++ = hextab[(i >> 4) & 0xf];
- *cp++ = hextab[i & 0xf];
- nleft--;
- bufsize -= 2;
- }
- *cp = '\0';
- return buf;
-}
-
-void
-rtems_bsdnet_show_inet_routes (void)
-{
- struct radix_node_head *rnh;
- struct dinfo d;
- struct rinfo *r;
- int i, error;
-
- /*
- * For now we'll handle only AF_INET
- */
- rnh = rt_tables[AF_INET];
- if (!rnh)
- return;
- d.count = d.capacity = 0;
- d.routes = NULL;
- rtems_bsdnet_semaphore_obtain ();
- error = rnh->rnh_walktree(rnh, show_inet_route, &d);
- rtems_bsdnet_semaphore_release ();
- if (error) {
- printf ("Can't get route info: %s\n", strerror (error));
- return;
- }
- if (d.count == 0) {
- printf ("No routes!\n");
- return;
- }
- printf ("Destination Gateway/Mask/Hw Flags Refs Use Expire Interface\n");
- for (i = 0, r = d.routes ; i < d.count ; i++, r++) {
- char buf[30];
- char *cp, *fc, flagbuf[10];
- const char *addr;
- unsigned long flagbit;
- struct sockaddr_in *sin;
-
- sin = (struct sockaddr_in *)&r->dst;
- if (sin->sin_addr.s_addr == INADDR_ANY)
- addr = "default";
- else
- addr = inet_ntop (AF_INET, &sin->sin_addr, buf, sizeof buf);
- printf ("%-16s", addr);
- switch (r->un.sa.sa_family) {
- case AF_INET:
- addr = inet_ntop (AF_INET, &r->un.sin.sin_addr, buf, sizeof buf);
- break;
-
- case AF_LINK:
- addr = link_ascii (&r->un.sdl, buf, sizeof buf);
- break;
-
- default:
- addr = "";
- break;
- }
- printf ("%-19s", addr);
- fc = "UGHRDM XLS";
- for (flagbit = 0x1, cp = flagbuf ; *fc ; flagbit <<= 1, fc++) {
- if ((r->flags & flagbit) && (*fc != ' '))
- *cp++ = *fc;
- }
- *cp = '\0';
- printf ("%-10s%3d%9ld%7ld %.*s%d\n", flagbuf,
- r->refcnt, r->pksent,
- r->expire,
- (int)sizeof r->ifname, r->ifname,
- r->ifunit);
- }
- free (d.routes);
-}
diff --git a/cpukit/libnetworking/rtems/rtems_showtcpstat.c b/cpukit/libnetworking/rtems/rtems_showtcpstat.c
deleted file mode 100644
index b9a0366819..0000000000
--- a/cpukit/libnetworking/rtems/rtems_showtcpstat.c
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/sysctl.h>
-#include <sys/proc.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-#include <net/if.h>
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/ip_var.h>
-#include <netinet/tcp.h>
-#include <netinet/tcp_timer.h>
-#include <netinet/tcp_seq.h>
-#include <netinet/tcp_var.h>
-
-/*
- * Display TCP statistics
- * Don't lock the rest of the network tasks out while printing.
- * It's no big deal if the values change while being printed.
- */
-static void
-showtcpstat (const char *name, unsigned long n)
-{
- if (n)
- printf ("%35s%12lu\n", name, n);
-}
-
-void
-rtems_bsdnet_show_tcp_stats (void)
-{
- printf ("************ TCP Statistics ************\n");
- showtcpstat ("connections initiated", tcpstat.tcps_connattempt);
- showtcpstat ("connections accepted", tcpstat.tcps_accepts);
- showtcpstat ("connections established", tcpstat.tcps_connects);
- showtcpstat ("connections dropped", tcpstat.tcps_drops);
- showtcpstat ("embryonic connections dropped", tcpstat.tcps_conndrops);
- showtcpstat ("conn. closed (includes drops)", tcpstat.tcps_closed);
- showtcpstat ("segs where we tried to get rtt", tcpstat.tcps_segstimed);
- showtcpstat ("times we succeeded", tcpstat.tcps_rttupdated);
- showtcpstat ("delayed acks sent", tcpstat.tcps_delack);
- showtcpstat ("conn. dropped in rxmt timeout", tcpstat.tcps_timeoutdrop);
- showtcpstat ("retransmit timeouts", tcpstat.tcps_rexmttimeo);
- showtcpstat ("persist timeouts", tcpstat.tcps_persisttimeo);
- showtcpstat ("keepalive timeouts", tcpstat.tcps_keeptimeo);
- showtcpstat ("keepalive probes sent", tcpstat.tcps_keepprobe);
- showtcpstat ("connections dropped in keepalive", tcpstat.tcps_keepdrops);
-
- showtcpstat ("total packets sent", tcpstat.tcps_sndtotal);
- showtcpstat ("data packets sent", tcpstat.tcps_sndpack);
- showtcpstat ("data bytes sent", tcpstat.tcps_sndbyte);
- showtcpstat ("data packets retransmitted", tcpstat.tcps_sndrexmitpack);
- showtcpstat ("data bytes retransmitted", tcpstat.tcps_sndrexmitbyte);
- showtcpstat ("ack-only packets sent", tcpstat.tcps_sndacks);
- showtcpstat ("window probes sent", tcpstat.tcps_sndprobe);
- showtcpstat ("packets sent with URG only", tcpstat.tcps_sndurg);
- showtcpstat ("window update-only packets sent", tcpstat.tcps_sndwinup);
- showtcpstat ("control (SYN|FIN|RST) packets sent", tcpstat.tcps_sndctrl);
-
- showtcpstat ("total packets received", tcpstat.tcps_rcvtotal);
- showtcpstat ("packets received in sequence", tcpstat.tcps_rcvpack);
- showtcpstat ("bytes received in sequence", tcpstat.tcps_rcvbyte);
- showtcpstat ("packets received with ccksum errs", tcpstat.tcps_rcvbadsum);
- showtcpstat ("packets received with bad offset", tcpstat.tcps_rcvbadoff);
- showtcpstat ("packets received too short", tcpstat.tcps_rcvshort);
- showtcpstat ("duplicate-only packets received", tcpstat.tcps_rcvduppack);
- showtcpstat ("duplicate-only bytes received", tcpstat.tcps_rcvdupbyte);
- showtcpstat ("packets with some duplicate data", tcpstat.tcps_rcvpartduppack);
- showtcpstat ("dup. bytes in part-dup. packets", tcpstat.tcps_rcvpartdupbyte);
- showtcpstat ("out-of-order packets received", tcpstat.tcps_rcvoopack);
- showtcpstat ("out-of-order bytes received", tcpstat.tcps_rcvoobyte);
- showtcpstat ("packets with data after window", tcpstat.tcps_rcvpackafterwin);
- showtcpstat ("bytes rcvd after window", tcpstat.tcps_rcvbyteafterwin);
- showtcpstat ("packets rcvd after \"close\"", tcpstat.tcps_rcvafterclose);
- showtcpstat ("rcvd window probe packets", tcpstat.tcps_rcvwinprobe);
- showtcpstat ("rcvd duplicate acks", tcpstat.tcps_rcvdupack);
- showtcpstat ("rcvd acks for unsent data", tcpstat.tcps_rcvacktoomuch);
- showtcpstat ("rcvd ack packets", tcpstat.tcps_rcvackpack);
- showtcpstat ("bytes acked by rcvd acks", tcpstat.tcps_rcvackbyte);
- showtcpstat ("rcvd window update packets", tcpstat.tcps_rcvwinupd);
- showtcpstat ("segments dropped due to PAWS", tcpstat.tcps_pawsdrop);
- showtcpstat ("times hdr predict ok for acks", tcpstat.tcps_predack);
- showtcpstat ("times hdr predict ok for data pkts", tcpstat.tcps_preddat);
- showtcpstat ("pcb cache misses", tcpstat.tcps_pcbcachemiss);
- showtcpstat ("times cached RTT in route updated", tcpstat.tcps_cachedrtt);
- showtcpstat ("times cached rttvar updated", tcpstat.tcps_cachedrttvar);
- showtcpstat ("times cached ssthresh updated", tcpstat.tcps_cachedssthresh);
- showtcpstat ("times RTT initialized from route", tcpstat.tcps_usedrtt);
- showtcpstat ("times RTTVAR initialized from rt", tcpstat.tcps_usedrttvar);
- showtcpstat ("times ssthresh initialized from rt", tcpstat.tcps_usedssthresh);
- showtcpstat ("timeout in persist state", tcpstat.tcps_persistdrop);
- showtcpstat ("bogus SYN, e.g. premature ACK", tcpstat.tcps_badsyn);
- showtcpstat ("resends due to MTU discovery", tcpstat.tcps_mturesent);
- showtcpstat ("listen queue overflows", tcpstat.tcps_listendrop);
- printf ("\n");
-}
diff --git a/cpukit/libnetworking/rtems/rtems_showudpstat.c b/cpukit/libnetworking/rtems/rtems_showudpstat.c
deleted file mode 100644
index 1fc2d15a0b..0000000000
--- a/cpukit/libnetworking/rtems/rtems_showudpstat.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * $Id$
- */
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/sysctl.h>
-#include <sys/proc.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-#include <net/if.h>
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/ip_var.h>
-#include <netinet/udp.h>
-#include <netinet/udp_var.h>
-
-/*
- * Display UDP statistics
- * Don't lock the rest of the network tasks out while printing.
- * It's no big deal if the values change while being printed.
- */
-static void
-showudpstat (const char *name, unsigned long n)
-{
- if (n)
- printf ("%35s%12lu\n", name, n);
-}
-
-void
-rtems_bsdnet_show_udp_stats (void)
-{
- printf ("************ UDP Statistics ************\n");
- showudpstat ("total input packets", udpstat.udps_ipackets);
- showudpstat ("packet shorter than header", udpstat.udps_hdrops);
- showudpstat ("checksum error", udpstat.udps_badsum);
- showudpstat ("data length larger than packet", udpstat.udps_badlen);
- showudpstat ("no socket on port", udpstat.udps_noport);
- showudpstat ("of above, arrived as broadcast", udpstat.udps_noportbcast);
- showudpstat ("not delivered, input socket full", udpstat.udps_fullsock);
- showudpstat ("input packets missing pcb cache", udpstat.udpps_pcbcachemiss);
- showudpstat ("input packets not for hashed pcb", udpstat.udpps_pcbhashmiss);
- showudpstat ("total output packets", udpstat.udps_opackets);
- printf ("\n");
-}
diff --git a/cpukit/libnetworking/rtems/rtems_syscall.c b/cpukit/libnetworking/rtems/rtems_syscall.c
deleted file mode 100644
index 05217f7212..0000000000
--- a/cpukit/libnetworking/rtems/rtems_syscall.c
+++ /dev/null
@@ -1,760 +0,0 @@
-/*
- * $Id$
- */
-
-#include <string.h>
-#include <stdarg.h>
-/* #include <stdlib.h> */
-#include <stdio.h>
-
-#include <rtems.h>
-#include <rtems/libio.h>
-#include <rtems/error.h>
-#include <rtems/rtems_bsdnet.h>
-
-#include <sys/errno.h>
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/protosw.h>
-#include <sys/proc.h>
-#include <sys/fcntl.h>
-#include <sys/filio.h>
-
-#include <net/if.h>
-#include <net/route.h>
-
-/*
- * Hooks to RTEMS I/O system
- */
-static const rtems_filesystem_file_handlers_r socket_handlers;
-int rtems_bsdnet_makeFdForSocket(void *so, const rtems_filesystem_file_handlers_r *h);
-struct socket *rtems_bsdnet_fdToSocket(int fd);
-
-/*
- * Package system call argument into mbuf.
- */
-static int
-sockargstombuf (struct mbuf **mp, const void *buf, int buflen, int type)
-{
- struct mbuf *m;
-
- if ((u_int)buflen > MLEN)
- return (EINVAL);
- m = m_get(M_WAIT, type);
- if (m == NULL)
- return (ENOBUFS);
- m->m_len = buflen;
- memcpy (mtod(m, caddr_t), buf, buflen);
- *mp = m;
- if (type == MT_SONAME) {
- struct sockaddr *sa;
- sa = mtod(m, struct sockaddr *);
- sa->sa_len = buflen;
- }
- return 0;
-}
-
-/*
- *********************************************************************
- * BSD-style entry points *
- *********************************************************************
- */
-int
-socket (int domain, int type, int protocol)
-{
- int fd;
- int error;
- struct socket *so;
-
- rtems_bsdnet_semaphore_obtain ();
- error = socreate(domain, &so, type, protocol, NULL);
- if (error == 0) {
- fd = rtems_bsdnet_makeFdForSocket (so, &socket_handlers);
- if (fd < 0)
- soclose (so);
- }
- else {
- errno = error;
- fd = -1;
- }
- rtems_bsdnet_semaphore_release ();
- return fd;
-}
-
-int
-bind (int s, struct sockaddr *name, int namelen)
-{
- int error;
- int ret = -1;
- struct socket *so;
- struct mbuf *nam;
-
- rtems_bsdnet_semaphore_obtain ();
- if ((so = rtems_bsdnet_fdToSocket (s)) != NULL) {
- error = sockargstombuf (&nam, name, namelen, MT_SONAME);
- if (error == 0) {
- error = sobind (so, nam);
- if (error == 0)
- ret = 0;
- else
- errno = error;
- m_freem (nam);
- }
- else {
- errno = error;
- }
- }
- rtems_bsdnet_semaphore_release ();
- return ret;
-}
-
-int
-connect (int s, struct sockaddr *name, int namelen)
-{
- int error;
- int ret = -1;
- struct socket *so;
- struct mbuf *nam;
-
- rtems_bsdnet_semaphore_obtain ();
- if ((so = rtems_bsdnet_fdToSocket (s)) == NULL) {
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- if ((so->so_state & SS_NBIO) && (so->so_state & SS_ISCONNECTING)) {
- errno = EALREADY;
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- error = sockargstombuf (&nam, name, namelen, MT_SONAME);
- if (error) {
- errno = error;
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- error = soconnect (so, nam);
- if (error) {
- errno = error;
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- if ((so->so_state & SS_NBIO) && (so->so_state & SS_ISCONNECTING)) {
- m_freem(nam);
- errno = EINPROGRESS;
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- while ((so->so_state & SS_ISCONNECTING) && so->so_error == 0) {
- so->so_error = soconnsleep (so);
- }
- if (error == 0) {
- error = so->so_error;
- so->so_error = 0;
- }
- so->so_state &= ~SS_ISCONNECTING;
- m_freem (nam);
- if (error == 0)
- ret = 0;
- rtems_bsdnet_semaphore_release ();
- return ret;
-}
-
-int
-listen (int s, int backlog)
-{
- int error;
- int ret = -1;
- struct socket *so;
-
- rtems_bsdnet_semaphore_obtain ();
- if ((so = rtems_bsdnet_fdToSocket (s)) != NULL) {
- error = solisten (so, backlog);
- if (error == 0)
- ret = 0;
- else
- errno = error;
- }
- rtems_bsdnet_semaphore_release ();
- return ret;
-}
-
-int
-accept (int s, struct sockaddr *name, int *namelen)
-{
- int fd;
- struct socket *head, *so;
- struct mbuf *nam;
-
- rtems_bsdnet_semaphore_obtain ();
- if ((head = rtems_bsdnet_fdToSocket (s)) == NULL) {
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- if ((head->so_options & SO_ACCEPTCONN) == 0) {
- errno = EINVAL;
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- if ((head->so_state & SS_NBIO) && head->so_comp.tqh_first == NULL) {
- errno = EWOULDBLOCK;
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- while (head->so_comp.tqh_first == NULL && head->so_error == 0) {
- if (head->so_state & SS_CANTRCVMORE) {
- head->so_error = ECONNABORTED;
- break;
- }
- head->so_error = soconnsleep (head);
- }
- if (head->so_error) {
- errno = head->so_error;
- head->so_error = 0;
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
-
- so = head->so_comp.tqh_first;
- TAILQ_REMOVE(&head->so_comp, so, so_list);
- head->so_qlen--;
-
- fd = rtems_bsdnet_makeFdForSocket (so, &socket_handlers);
- if (fd < 0) {
- TAILQ_INSERT_HEAD(&head->so_comp, so, so_list);
- head->so_qlen++;
- soconnwakeup (head);
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- so->so_state &= ~SS_COMP;
- so->so_head = NULL;
-
- nam = m_get(M_WAIT, MT_SONAME);
- (void) soaccept(so, nam);
- if (name) {
- /* check length before it is destroyed */
- if (*namelen > nam->m_len)
- *namelen = nam->m_len;
- memcpy (name, mtod(nam, caddr_t), *namelen);
- }
- m_freem(nam);
- rtems_bsdnet_semaphore_release ();
- return (fd);
-
-}
-
-/*
- * Shutdown routine
- */
-
-int
-shutdown (int s, int how)
-{
- struct socket *so;
- int error;
-
- rtems_bsdnet_semaphore_obtain ();
- if ((so = rtems_bsdnet_fdToSocket (s)) == NULL) {
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- error = soshutdown(so, how);
- rtems_bsdnet_semaphore_release ();
- if (error) {
- errno = error;
- return -1;
- }
- return 0;
-}
-
-/*
- * All `transmit' operations end up calling this routine.
- */
-ssize_t
-sendmsg (int s, const struct msghdr *mp, int flags)
-{
- int ret = -1;
- int error;
- struct uio auio;
- struct iovec *iov;
- struct socket *so;
- struct mbuf *to, *control;
- int i;
- int len;
-
- rtems_bsdnet_semaphore_obtain ();
- if ((so = rtems_bsdnet_fdToSocket (s)) == NULL) {
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- auio.uio_iov = mp->msg_iov;
- auio.uio_iovcnt = mp->msg_iovlen;
- auio.uio_segflg = UIO_USERSPACE;
- auio.uio_rw = UIO_WRITE;
- auio.uio_offset = 0;
- auio.uio_resid = 0;
- iov = mp->msg_iov;
- for (i = 0; i < mp->msg_iovlen; i++, iov++) {
- if ((auio.uio_resid += iov->iov_len) < 0) {
- errno = EINVAL;
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- }
- if (mp->msg_name) {
- error = sockargstombuf (&to, mp->msg_name, mp->msg_namelen, MT_SONAME);
- if (error) {
- errno = error;
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- }
- else {
- to = NULL;
- }
- if (mp->msg_control) {
- if (mp->msg_controllen < sizeof (struct cmsghdr)) {
- errno = EINVAL;
- if (to)
- m_freem(to);
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- sockargstombuf (&control, mp->msg_control, mp->msg_controllen, MT_CONTROL);
- }
- else {
- control = NULL;
- }
- len = auio.uio_resid;
- error = sosend (so, to, &auio, (struct mbuf *)0, control, flags);
- if (error) {
- if (auio.uio_resid != len && (error == EINTR || error == EWOULDBLOCK))
- error = 0;
- }
- if (error)
- errno = error;
- else
- ret = len - auio.uio_resid;
- if (to)
- m_freem(to);
- rtems_bsdnet_semaphore_release ();
- return (ret);
-}
-
-/*
- * Send a message to a host
- */
-ssize_t
-sendto (int s, const void *buf, size_t buflen, int flags, const struct sockaddr *to, int tolen)
-{
- struct msghdr msg;
- struct iovec iov;
-
- iov.iov_base = (void *)buf;
- iov.iov_len = buflen;
- msg.msg_name = (caddr_t)to;
- msg.msg_namelen = tolen;
- msg.msg_iov = &iov;
- msg.msg_iovlen = 1;
- msg.msg_control = NULL;
- msg.msg_controllen = 0;
- return sendmsg (s, &msg, flags);
-}
-
-/*
- * Send a message to a connected host
- */
-ssize_t
-send (int s, const void *buf, size_t buflen, int flags)
-{
- return sendto (s, buf, buflen, flags, NULL, 0);
-}
-
-/*
- * All `receive' operations end up calling this routine.
- */
-ssize_t
-recvmsg (int s, struct msghdr *mp, int flags)
-{
- int ret = -1;
- int error;
- struct uio auio;
- struct iovec *iov;
- struct socket *so;
- struct mbuf *from = NULL, *control = NULL;
- int i;
- int len;
-
- rtems_bsdnet_semaphore_obtain ();
- if ((so = rtems_bsdnet_fdToSocket (s)) == NULL) {
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- auio.uio_iov = mp->msg_iov;
- auio.uio_iovcnt = mp->msg_iovlen;
- auio.uio_segflg = UIO_USERSPACE;
- auio.uio_rw = UIO_READ;
- auio.uio_offset = 0;
- auio.uio_resid = 0;
- iov = mp->msg_iov;
- for (i = 0; i < mp->msg_iovlen; i++, iov++) {
- if ((auio.uio_resid += iov->iov_len) < 0) {
- errno = EINVAL;
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- }
- len = auio.uio_resid;
- mp->msg_flags = flags;
- error = soreceive (so, &from, &auio, (struct mbuf **)NULL,
- mp->msg_control ? &control : (struct mbuf **)NULL,
- &mp->msg_flags);
- if (error) {
- if (auio.uio_resid != len && (error == EINTR || error == EWOULDBLOCK))
- error = 0;
- }
- if (error) {
- errno = error;
- }
- else {
- ret = len - auio.uio_resid;
- if (mp->msg_name) {
- len = mp->msg_namelen;
- if ((len <= 0) || (from == NULL)) {
- len = 0;
- }
- else {
- if (len > from->m_len)
- len = from->m_len;
- memcpy (mp->msg_name, mtod(from, caddr_t), len);
- }
- mp->msg_namelen = len;
- }
- if (mp->msg_control) {
- struct mbuf *m;
- caddr_t ctlbuf;
-
- len = mp->msg_controllen;
- m = control;
- mp->msg_controllen = 0;
- ctlbuf = (caddr_t) mp->msg_control;
-
- while (m && (len > 0)) {
- unsigned int tocopy;
-
- if (len >= m->m_len)
- tocopy = m->m_len;
- else {
- mp->msg_flags |= MSG_CTRUNC;
- tocopy = len;
- }
- memcpy(ctlbuf, mtod(m, caddr_t), tocopy);
- ctlbuf += tocopy;
- len -= tocopy;
- m = m->m_next;
- }
- mp->msg_controllen = ctlbuf - mp->msg_control;
- }
- }
- if (from)
- m_freem (from);
- if (control)
- m_freem (control);
- rtems_bsdnet_semaphore_release ();
- return (ret);
-}
-
-/*
- * Receive a message from a host
- */
-ssize_t
-recvfrom (int s, void *buf, size_t buflen, int flags, const struct sockaddr *from, int *fromlen)
-{
- struct msghdr msg;
- struct iovec iov;
- int ret;
-
- iov.iov_base = buf;
- iov.iov_len = buflen;
- msg.msg_name = (caddr_t)from;
- if (fromlen)
- msg.msg_namelen = *fromlen;
- else
- msg.msg_namelen = 0;
- msg.msg_iov = &iov;
- msg.msg_iovlen = 1;
- msg.msg_control = NULL;
- msg.msg_controllen = 0;
- ret = recvmsg (s, &msg, flags);
- if ((from != NULL) && (fromlen != NULL) && (ret >= 0))
- *fromlen = msg.msg_namelen;
- return ret;
-}
-
-/*
- * Receive a message from a connected host
- */
-ssize_t
-recv (int s, void *buf, size_t buflen, int flags)
-{
- return recvfrom (s, buf, buflen, flags, NULL, NULL);
-}
-
-int
-setsockopt (int s, int level, int name, const void *val, int len)
-{
- struct socket *so;
- struct mbuf *m = NULL;
- int error;
-
- rtems_bsdnet_semaphore_obtain ();
- if ((so = rtems_bsdnet_fdToSocket (s)) == NULL) {
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- if (len > MLEN) {
- errno = EINVAL;
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- if (val) {
- error = sockargstombuf (&m, val, len, MT_SOOPTS);
- if (error) {
- errno = error;
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- }
- error = sosetopt(so, level, name, m);
- if (error) {
- errno = error;
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- rtems_bsdnet_semaphore_release ();
- return 0;
-}
-
-int
-getsockopt (int s, int level, int name, void *aval, int *avalsize)
-{
- struct socket *so;
- struct mbuf *m = NULL, *m0;
- char *val = aval;
- int i, op, valsize;
- int error;
-
- rtems_bsdnet_semaphore_obtain ();
- if ((so = rtems_bsdnet_fdToSocket (s)) == NULL) {
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- if (val)
- valsize = *avalsize;
- else
- valsize = 0;
- if (((error = sogetopt(so, level, name, &m)) == 0) && val && valsize && m) {
- op = 0;
- while (m && op < valsize) {
- i = valsize - op;
- if (i > m->m_len)
- i = m->m_len;
- memcpy (val, mtod(m, caddr_t), i);
- op += i;
- val += i;
- m0 = m;
- MFREE (m0, m);
- }
- *avalsize = op;
- }
- if (m != NULL)
- (void) m_free(m);
- if (error) {
- errno = error;
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- rtems_bsdnet_semaphore_release ();
- return 0;
-}
-
-static int
-getpeersockname (int s, struct sockaddr *name, int *namelen, int pflag)
-{
- struct socket *so;
- struct mbuf *m;
- int len = *namelen;
- int error;
-
- rtems_bsdnet_semaphore_obtain ();
- if ((so = rtems_bsdnet_fdToSocket (s)) == NULL) {
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- m = m_getclr(M_WAIT, MT_SONAME);
- if (m == NULL) {
- errno = ENOBUFS;
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- if (pflag)
- error = (*so->so_proto->pr_usrreqs->pru_peeraddr)(so, m);
- else
- error = (*so->so_proto->pr_usrreqs->pru_sockaddr)(so, m);
- if (error) {
- errno = error;
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- if (len > m->m_len) {
- len = m->m_len;
- *namelen = len;
- }
- memcpy (name, mtod(m, caddr_t), len);
- m_freem (m);
- rtems_bsdnet_semaphore_release ();
- return 0;
-}
-
-int
-getpeername (int s, struct sockaddr *name, int *namelen)
-{
- return getpeersockname (s, name, namelen, 1);
-}
-int
-getsockname (int s, struct sockaddr *name, int *namelen)
-{
- return getpeersockname (s, name, namelen, 0);
-}
-
-/*
- ************************************************************************
- * RTEMS I/O HANDLER ROUTINES *
- ************************************************************************
- */
-static int
-rtems_bsdnet_close (rtems_libio_t *iop)
-{
- struct socket *so;
- int error;
-
- rtems_bsdnet_semaphore_obtain ();
- if ((so = iop->data1) == NULL) {
- errno = EBADF;
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- error = soclose (so);
- rtems_bsdnet_semaphore_release ();
- if (error) {
- errno = error;
- return -1;
- }
- return 0;
-}
-
-static int
-rtems_bsdnet_read (rtems_libio_t *iop, void *buffer, unsigned32 count)
-{
- return recv (iop->data0, buffer, count, 0);
-}
-
-static int
-rtems_bsdnet_write (rtems_libio_t *iop, const void *buffer, unsigned32 count)
-{
- return send (iop->data0, buffer, count, 0);
-}
-
-static int
-so_ioctl (rtems_libio_t *iop, struct socket *so, unsigned32 command, void *buffer)
-{
- switch (command) {
- case FIONBIO:
- if (*(int *)buffer) {
- iop->flags |= O_NONBLOCK;
- so->so_state |= SS_NBIO;
- }
- else {
- iop->flags &= ~O_NONBLOCK;
- so->so_state &= ~SS_NBIO;
- }
- return 0;
-
- case FIONREAD:
- *(int *)buffer = so->so_rcv.sb_cc;
- return 0;
- }
-
- if (IOCGROUP(command) == 'i')
- return ifioctl (so, command, buffer, NULL);
- if (IOCGROUP(command) == 'r')
- return rtioctl (command, buffer, NULL);
- return (*so->so_proto->pr_usrreqs->pru_control)(so, command, buffer, 0);
-}
-
-static int
-rtems_bsdnet_ioctl (rtems_libio_t *iop, unsigned32 command, void *buffer)
-{
- struct socket *so;
- int error;
-
- rtems_bsdnet_semaphore_obtain ();
- if ((so = iop->data1) == NULL) {
- errno = EBADF;
- rtems_bsdnet_semaphore_release ();
- return -1;
- }
- error = so_ioctl (iop, so, command, buffer);
- rtems_bsdnet_semaphore_release ();
- if (error) {
- errno = error;
- return -1;
- }
- return 0;
-}
-
-static int
-rtems_bsdnet_fcntl (int cmd, rtems_libio_t *iop)
-{
- struct socket *so;
-
- if (cmd == F_SETFL) {
- rtems_bsdnet_semaphore_obtain ();
- if ((so = iop->data1) == NULL) {
- rtems_bsdnet_semaphore_release ();
- return EBADF;
- }
- if (iop->flags & O_NONBLOCK)
- so->so_state |= SS_NBIO;
- else
- so->so_state &= ~SS_NBIO;
- rtems_bsdnet_semaphore_release ();
- }
- return 0;
-}
-
-static int
-rtems_bsdnet_fstat (rtems_filesystem_location_info_t *loc, struct stat *sp)
-{
- sp->st_mode = S_IFSOCK;
- return 0;
-}
-
-static const rtems_filesystem_file_handlers_r socket_handlers = {
- NULL, /* open */
- rtems_bsdnet_close, /* close */
- rtems_bsdnet_read, /* read */
- rtems_bsdnet_write, /* write */
- rtems_bsdnet_ioctl, /* ioctl */
- NULL, /* lseek */
- rtems_bsdnet_fstat, /* fstat */
- NULL, /* fchmod */
- NULL, /* ftruncate */
- NULL, /* fpathconf */
- NULL, /* fsync */
- NULL, /* fdatasync */
- rtems_bsdnet_fcntl, /* fcntl */
-};
diff --git a/cpukit/libnetworking/rtems/sghostname.c b/cpukit/libnetworking/rtems/sghostname.c
deleted file mode 100644
index 307f045fbd..0000000000
--- a/cpukit/libnetworking/rtems/sghostname.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * RTEMS versions of hostname functions
- * FIXME: Not thread-safe
- *
- * $Id$
- */
-
-#include <string.h>
-#include <errno.h>
-#include <rtems/rtems_bsdnet.h>
-#include <sys/param.h>
-#include <sys/malloc.h>
-#include <sys/kernel.h>
-
-static char *rtems_hostname;
-
-int
-gethostname (char *name, size_t namelen)
-{
- char *cp = rtems_hostname;
-
- if (cp == NULL)
- cp = "";
- strncpy (name, cp, namelen);
- return 0;
-}
-
-int
-sethostname (char *name, size_t namelen)
-{
- char *old, *new;
-
- if (namelen >= MAXHOSTNAMELEN) {
- errno = EINVAL;
- return -1;
- }
- new = malloc (namelen + 1, M_HTABLE, M_NOWAIT);
- if (new == NULL) {
- errno = ENOMEM;
- return -1;
- }
- strncpy (new, name, namelen);
- new[namelen] = '\0';
- old = rtems_hostname;
- rtems_hostname = new;
- if (old)
- free (old, M_HTABLE);
- return 0;
-}
diff --git a/cpukit/libnetworking/rtems/tftp.h b/cpukit/libnetworking/rtems/tftp.h
deleted file mode 100644
index 11882bed1c..0000000000
--- a/cpukit/libnetworking/rtems/tftp.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * $Id$
- */
-
-/*
- * Trivial File Transfer Protocol (TFTP)
- *
- * Transfer file to/from remote host
- *
- * W. Eric Norum
- * Saskatchewan Accelerator Laboratory
- * University of Saskatchewan
- * Saskatoon, Saskatchewan, CANADA
- * eric@skatter.usask.ca
- */
-
-/*
- * Usage:
- *
- * To open `/bootfiles/image' on `hostname' for reading:
- * fd = open ("/TFTP/hostname/bootfiles/image", O_RDONLY);
- *
- * The `hostname' must be four dot-separated decimal values.
- */
-
-#ifndef _TFTP_FILESYSTEM_h
-#define _TFTP_FILESYSTEM_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Filesystem initialization routine
- */
-
-int rtems_bsdnet_initialize_tftp_filesystem( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/cpukit/libnetworking/sys/Makefile.am b/cpukit/libnetworking/sys/Makefile.am
deleted file mode 100644
index 3fe88aff59..0000000000
--- a/cpukit/libnetworking/sys/Makefile.am
+++ /dev/null
@@ -1,13 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-EXTRA_DIST = buf.h callout.h cdefs.h conf.h domain.h filio.h ioccom.h \
- ioctl.h kernel.h libkern.h malloc.h mbuf.h mount.h param.h proc.h \
- protosw.h queue.h reboot.h resourcevar.h rtprio.h select.h signalvar.h \
- socket.h socketvar.h sockio.h sysctl.h syslimits.h syslog.h systm.h \
- ttycom.h ttydefaults.h ucred.h uio.h
-
-include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/libnetworking/sys/buf.h b/cpukit/libnetworking/sys/buf.h
deleted file mode 100644
index 6cca571141..0000000000
--- a/cpukit/libnetworking/sys/buf.h
+++ /dev/null
@@ -1,248 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1989, 1993
- * The Regents of the University of California. All rights reserved.
- * (c) UNIX System Laboratories, Inc.
- * All or some portions of this file are derived from material licensed
- * to the University of California by American Telephone and Telegraph
- * Co. or Unix System Laboratories, Inc. and are reproduced herein with
- * the permission of UNIX System Laboratories, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)buf.h 8.9 (Berkeley) 3/30/95
- * $Id$
- */
-
-#ifndef _SYS_BUF_H_
-#define _SYS_BUF_H_
-
-#include <sys/queue.h>
-
-#define NOLIST ((struct buf *)0x87654321)
-
-struct buf;
-
-struct iodone_chain {
- long ic_prev_flags;
- void (*ic_prev_iodone) __P((struct buf *));
- void *ic_prev_iodone_chain;
- struct {
- long ia_long;
- void *ia_ptr;
- } ic_args[5];
-};
-
-typedef TAILQ_HEAD(buf_queue_head, buf) buf_queue_head, *buf_queue_head_t;
-
-/*
- * The buffer header describes an I/O operation in the kernel.
- */
-struct buf {
- LIST_ENTRY(buf) b_hash; /* Hash chain. */
- LIST_ENTRY(buf) b_vnbufs; /* Buffer's associated vnode. */
- TAILQ_ENTRY(buf) b_freelist; /* Free list position if not active. */
- TAILQ_ENTRY(buf) b_act; /* Device driver queue when active. *new* */
- struct proc *b_proc; /* Associated proc; NULL if kernel. */
- long b_flags; /* B_* flags. */
- unsigned short b_qindex; /* buffer queue index */
- unsigned char b_usecount; /* buffer use count */
- int b_error; /* Errno value. */
- long b_bufsize; /* Allocated buffer size. */
- long b_bcount; /* Valid bytes in buffer. */
- long b_resid; /* Remaining I/O. */
- dev_t b_dev; /* Device associated with buffer. */
- struct {
- caddr_t b_addr; /* Memory, superblocks, indirect etc. */
- } b_un;
- caddr_t b_kvabase; /* base kva for buffer */
- int b_kvasize; /* size of kva for buffer */
- void *b_saveaddr; /* Original b_addr for physio. */
- daddr_t b_lblkno; /* Logical block number. */
- daddr_t b_blkno; /* Underlying physical block number. */
- /* Function to call upon completion. */
- void (*b_iodone) __P((struct buf *));
- /* For nested b_iodone's. */
- struct iodone_chain *b_iodone_chain;
- struct vnode *b_vp; /* Device vnode. */
- int b_dirtyoff; /* Offset in buffer of dirty region. */
- int b_dirtyend; /* Offset of end of dirty region. */
- struct ucred *b_rcred; /* Read credentials reference. */
- struct ucred *b_wcred; /* Write credentials reference. */
- int b_validoff; /* Offset in buffer of valid region. */
- int b_validend; /* Offset of end of valid region. */
- daddr_t b_pblkno; /* physical block number */
- caddr_t b_savekva; /* saved kva for transfer while bouncing */
- void *b_driver1; /* for private use by the driver */
- void *b_driver2; /* for private use by the driver */
- void *b_spc;
- union cluster_info {
- TAILQ_HEAD(cluster_list_head, buf) cluster_head;
- TAILQ_ENTRY(buf) cluster_entry;
- } b_cluster;
- struct vm_page *b_pages[btoc(MAXPHYS)];
- int b_npages;
-};
-
-/* Device driver compatibility definitions. */
-#define b_data b_un.b_addr /* b_un.b_addr is not changeable. */
-
-/*
- * These flags are kept in b_flags.
- */
-#define B_AGE 0x00000001 /* Move to age queue when I/O done. */
-#define B_NEEDCOMMIT 0x00000002 /* Append-write in progress. */
-#define B_ASYNC 0x00000004 /* Start I/O, do not wait. */
-#define B_BAD 0x00000008 /* Bad block revectoring in progress. */
-#define B_BUSY 0x00000010 /* I/O in progress. */
-#define B_CACHE 0x00000020 /* Bread found us in the cache. */
-#define B_CALL 0x00000040 /* Call b_iodone from biodone. */
-#define B_DELWRI 0x00000080 /* Delay I/O until buffer reused. */
-#define B_DIRTY 0x00000100 /* Dirty page to be pushed out async. */
-#define B_DONE 0x00000200 /* I/O completed. */
-#define B_EINTR 0x00000400 /* I/O was interrupted */
-#define B_ERROR 0x00000800 /* I/O error occurred. */
-#define B_GATHERED 0x00001000 /* LFS: already in a segment. */
-#define B_INVAL 0x00002000 /* Does not contain valid info. */
-#define B_LOCKED 0x00004000 /* Locked in core (not reusable). */
-#define B_NOCACHE 0x00008000 /* Do not cache block after use. */
-#define B_MALLOC 0x00010000 /* malloced b_data */
-#define B_CLUSTEROK 0x00020000 /* Pagein op, so swap() can count it. */
-#define B_PHYS 0x00040000 /* I/O to user memory. */
-#define B_RAW 0x00080000 /* Set by physio for raw transfers. */
-#define B_READ 0x00100000 /* Read buffer. */
-#define B_TAPE 0x00200000 /* Magnetic tape I/O. */
-#define B_RELBUF 0x00400000 /* Release VMIO buffer. */
-#define B_WANTED 0x00800000 /* Process wants this buffer. */
-#define B_WRITE 0x00000000 /* Write buffer (pseudo flag). */
-#define B_WRITEINPROG 0x01000000 /* Write in progress. */
-#define B_XXX 0x02000000 /* Debugging flag. */
-#define B_PAGING 0x04000000 /* volatile paging I/O -- bypass VMIO */
-#define B_ORDERED 0x08000000 /* Must guarantee I/O ordering */
-#define B_VMIO 0x20000000 /* VMIO flag */
-#define B_CLUSTER 0x40000000 /* pagein op, so swap() can count it */
-#define B_BOUNCE 0x80000000 /* bounce buffer flag */
-
-/*
- * number of buffer hash entries
- */
-#define BUFHSZ 512
-
-/*
- * buffer hash table calculation, originally by David Greenman
- */
-#define BUFHASH(vnp, bn) \
- (&bufhashtbl[(((unsigned long)(vnp) >> 7)+(int)(bn)) % BUFHSZ])
-
-/*
- * Definitions for the buffer free lists.
- */
-#define BUFFER_QUEUES 6 /* number of free buffer queues */
-
-extern LIST_HEAD(bufhashhdr, buf) bufhashtbl[BUFHSZ], invalhash;
-extern TAILQ_HEAD(bqueues, buf) bufqueues[BUFFER_QUEUES];
-
-#define QUEUE_NONE 0 /* on no queue */
-#define QUEUE_LOCKED 1 /* locked buffers */
-#define QUEUE_LRU 2 /* useful buffers */
-#define QUEUE_VMIO 3 /* VMIO buffers */
-#define QUEUE_AGE 4 /* not-useful buffers */
-#define QUEUE_EMPTY 5 /* empty buffer headers*/
-
-/*
- * Zero out the buffer's data area.
- */
-#define clrbuf(bp) { \
- bzero((bp)->b_data, (u_int)(bp)->b_bcount); \
- (bp)->b_resid = 0; \
-}
-
-/* Flags to low-level allocation routines. */
-#define B_CLRBUF 0x01 /* Request allocated buffer be cleared. */
-#define B_SYNC 0x02 /* Do all allocations synchronously. */
-
-#ifdef KERNEL
-extern int nbuf; /* The number of buffer headers */
-extern struct buf *buf; /* The buffer headers. */
-extern char *buffers; /* The buffer contents. */
-extern int bufpages; /* Number of memory pages in the buffer pool. */
-extern struct buf *swbuf; /* Swap I/O buffer headers. */
-extern int nswbuf; /* Number of swap I/O buffer headers. */
-extern TAILQ_HEAD(swqueue, buf) bswlist;
-
-void bufinit __P((void));
-void bremfree __P((struct buf *));
-int bread __P((struct vnode *, daddr_t, int,
- struct ucred *, struct buf **));
-int breadn __P((struct vnode *, daddr_t, int, daddr_t *, int *, int,
- struct ucred *, struct buf **));
-int bwrite __P((struct buf *));
-void bdwrite __P((struct buf *));
-void bawrite __P((struct buf *));
-int bowrite __P((struct buf *));
-void brelse __P((struct buf *));
-void bqrelse __P((struct buf *));
-int vfs_bio_awrite __P((struct buf *));
-struct buf * getpbuf __P((void));
-struct buf *incore __P((struct vnode *, daddr_t));
-struct buf *gbincore __P((struct vnode *, daddr_t));
-int inmem __P((struct vnode *, daddr_t));
-struct buf *getblk __P((struct vnode *, daddr_t, int, int, int));
-struct buf *geteblk __P((int));
-int allocbuf __P((struct buf *, int));
-int biowait __P((struct buf *));
-void biodone __P((struct buf *));
-
-void cluster_callback __P((struct buf *));
-int cluster_read __P((struct vnode *, u_quad_t, daddr_t, long,
- struct ucred *, struct buf **));
-int cluster_wbuild __P((struct vnode *, long, daddr_t, int));
-void cluster_write __P((struct buf *, u_quad_t));
-int physio __P((void (*)(struct buf *), struct buf *, dev_t,
- int, u_int (*)(struct buf *), struct uio *));
-u_int minphys __P((struct buf *));
-void vfs_bio_clrbuf __P((struct buf *));
-void vfs_busy_pages __P((struct buf *, int clear_modify));
-void vfs_unbusy_pages(struct buf *);
-void vwakeup __P((struct buf *));
-void vmapbuf __P((struct buf *));
-void vunmapbuf __P((struct buf *));
-void relpbuf __P((struct buf *));
-void brelvp __P((struct buf *));
-void bgetvp __P((struct vnode *, struct buf *));
-void pbgetvp __P((struct vnode *, struct buf *));
-void pbrelvp __P((struct buf *));
-void reassignbuf __P((struct buf *, struct vnode *));
-struct buf *trypbuf __P((void));
-void vm_bounce_alloc __P((struct buf *));
-void vm_bounce_free __P((struct buf *));
-vm_offset_t vm_bounce_kva_alloc __P((int));
-void vm_bounce_kva_alloc_free __P((vm_offset_t, int));
-#endif /* KERNEL */
-
-#endif /* !_SYS_BUF_H_ */
diff --git a/cpukit/libnetworking/sys/callout.h b/cpukit/libnetworking/sys/callout.h
deleted file mode 100644
index 5fec98f28b..0000000000
--- a/cpukit/libnetworking/sys/callout.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- * (c) UNIX System Laboratories, Inc.
- * All or some portions of this file are derived from material licensed
- * to the University of California by American Telephone and Telegraph
- * Co. or Unix System Laboratories, Inc. and are reproduced herein with
- * the permission of UNIX System Laboratories, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)callout.h 8.2 (Berkeley) 1/21/94
- * $Id$
- */
-
-#ifndef _SYS_CALLOUT_H_
-#define _SYS_CALLOUT_H_
-
-struct callout {
- struct callout *c_next; /* next callout in queue */
- void *c_arg; /* function argument */
- void (*c_func) __P((void *)); /* function to call */
- int c_time; /* ticks to the event */
-};
-
-#ifdef KERNEL
-extern struct callout *callfree, *callout, calltodo;
-extern int ncallout;
-#endif
-
-#endif
diff --git a/cpukit/libnetworking/sys/conf.h b/cpukit/libnetworking/sys/conf.h
deleted file mode 100644
index 92d99d9d07..0000000000
--- a/cpukit/libnetworking/sys/conf.h
+++ /dev/null
@@ -1,228 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- * (c) UNIX System Laboratories, Inc.
- * All or some portions of this file are derived from material licensed
- * to the University of California by American Telephone and Telegraph
- * Co. or Unix System Laboratories, Inc. and are reproduced herein with
- * the permission of UNIX System Laboratories, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)conf.h 8.5 (Berkeley) 1/9/95
- * $Id$
- */
-
-#ifndef _SYS_CONF_H_
-#define _SYS_CONF_H_
-
-/*
- * Definitions of device driver entry switches
- */
-
-struct buf;
-struct proc;
-struct tty;
-struct uio;
-struct vnode;
-
-typedef int d_open_t __P((dev_t dev, int oflags, int devtype, struct proc *p));
-typedef int d_close_t __P((dev_t dev, int fflag, int devtype, struct proc *p));
-typedef void d_strategy_t __P((struct buf *bp));
-typedef int d_ioctl_t __P((dev_t dev, int cmd, caddr_t data,
- int fflag, struct proc *p));
-typedef int d_dump_t __P((dev_t dev));
-typedef int d_psize_t __P((dev_t dev));
-
-typedef int d_read_t __P((dev_t dev, struct uio *uio, int ioflag));
-typedef int d_write_t __P((dev_t dev, struct uio *uio, int ioflag));
-typedef void d_stop_t __P((struct tty *tp, int rw));
-typedef int d_reset_t __P((dev_t dev));
-typedef struct tty *d_devtotty_t __P((dev_t dev));
-typedef int d_select_t __P((dev_t dev, int which, struct proc *p));
-typedef int d_mmap_t __P((dev_t dev, int offset, int nprot));
-
-typedef int l_open_t __P((dev_t dev, struct tty *tp));
-typedef int l_close_t __P((struct tty *tp, int flag));
-typedef int l_read_t __P((struct tty *tp, struct uio *uio, int flag));
-typedef int l_write_t __P((struct tty *tp, struct uio *uio, int flag));
-typedef int l_ioctl_t __P((struct tty *tp, int cmd, caddr_t data,
- int flag, struct proc *p));
-typedef int l_rint_t __P((int c, struct tty *tp));
-typedef int l_start_t __P((struct tty *tp));
-typedef int l_modem_t __P((struct tty *tp, int flag));
-
-/*
- * Block device switch table
- */
-struct bdevsw {
- d_open_t *d_open;
- d_close_t *d_close;
- d_strategy_t *d_strategy;
- d_ioctl_t *d_ioctl;
- d_dump_t *d_dump;
- d_psize_t *d_psize;
- int d_flags;
- char *d_name; /* name of the driver e.g. audio */
- struct cdevsw *d_cdev; /* cross pointer to the cdev */
- int d_maj; /* the major number we were assigned */
-};
-
-#ifdef KERNEL
-extern struct bdevsw *bdevsw[];
-#endif
-
-/*
- * Character device switch table
- */
-struct cdevsw {
- d_open_t *d_open;
- d_close_t *d_close;
- d_read_t *d_read;
- d_write_t *d_write;
- d_ioctl_t *d_ioctl;
- d_stop_t *d_stop;
- d_reset_t *d_reset; /* XXX not used */
- d_devtotty_t *d_devtotty;
- d_select_t *d_select;
- d_mmap_t *d_mmap;
- d_strategy_t *d_strategy;
- char *d_name; /* see above */
- struct bdevsw *d_bdev;
- int d_maj;
-};
-
-#ifdef KERNEL
-extern struct cdevsw *cdevsw[];
-#endif
-
-/*
- * Line discipline switch table
- */
-struct linesw {
- l_open_t *l_open;
- l_close_t *l_close;
- l_read_t *l_read;
- l_write_t *l_write;
- l_ioctl_t *l_ioctl;
- l_rint_t *l_rint;
- l_start_t *l_start;
- l_modem_t *l_modem;
-};
-
-#ifdef KERNEL
-extern struct linesw linesw[];
-extern int nlinesw;
-
-int ldisc_register __P((int , struct linesw *));
-void ldisc_deregister __P((int));
-#define LDISC_LOAD -1 /* Loadable line discipline */
-#endif
-
-/*
- * Swap device table
- */
-struct swdevt {
- dev_t sw_dev;
- int sw_flags;
- int sw_nblks;
- struct vnode *sw_vp;
-};
-#define SW_FREED 0x01
-#define SW_SEQUENTIAL 0x02
-#define sw_freed sw_flags /* XXX compat */
-
-#ifdef KERNEL
-d_open_t noopen;
-d_close_t noclose;
-d_read_t noread;
-d_write_t nowrite;
-d_ioctl_t noioctl;
-d_stop_t nostop;
-d_reset_t noreset;
-d_devtotty_t nodevtotty;
-d_select_t noselect;
-d_mmap_t nommap;
-
-/* Bogus defines for compatibility. */
-#define noioc noioctl
-#define nostrat nostrategy
-#define zerosize nopsize
-/*
- * XXX d_strategy seems to be unused for cdevs that aren't associated with
- * bdevs and called without checking for it being non-NULL for bdevs.
- */
-#define nostrategy ((d_strategy_t *)NULL)
-
-d_dump_t nodump;
-
-/*
- * nopsize is little used, so not worth having dummy functions for.
- */
-#define nopsize ((d_psize_t *)NULL)
-
-d_open_t nullopen;
-d_close_t nullclose;
-#define nullstop nostop /* one void return is as good as another */
-#define nullreset noreset /* one unused function is as good as another */
-
-d_open_t nxopen;
-d_close_t nxclose;
-d_read_t nxread;
-d_write_t nxwrite;
-d_ioctl_t nxioctl;
-#define nxstop nostop /* one void return is as good as another */
-#define nxreset noreset /* one unused function is as good as another */
-#define nxdevtotty nodevtotty /* one NULL return is as good as another */
-d_select_t nxselect;
-#define nxmmap nommap /* one -1 return is as good as another */
-#define nxstrategy nostrategy /* one NULL value is as good as another */
-d_dump_t nxdump;
-#define nxpsize nopsize /* one NULL value is as good as another */
-
-d_read_t rawread;
-d_write_t rawwrite;
-
-l_read_t l_noread;
-l_write_t l_nowrite;
-
-int bdevsw_add __P((dev_t *descrip,struct bdevsw *new,struct bdevsw **old));
-int cdevsw_add __P((dev_t *descrip,struct cdevsw *new,struct cdevsw **old));
-void cdevsw_make __P((struct bdevsw *from));
-void bdevsw_add_generic __P((int bdev, int cdev, struct bdevsw *bdevsw));
-dev_t chrtoblk __P((dev_t dev));
-int isdisk __P((dev_t dev, int type));
-int iskmemdev __P((dev_t dev));
-int iszerodev __P((dev_t dev));
-void setconf __P((void));
-#endif /* KERNEL */
-
-#include <machine/conf.h>
-
-#endif /* !_SYS_CONF_H_ */
diff --git a/cpukit/libnetworking/sys/domain.h b/cpukit/libnetworking/sys/domain.h
deleted file mode 100644
index 2ec8a5fb05..0000000000
--- a/cpukit/libnetworking/sys/domain.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)domain.h 8.1 (Berkeley) 6/2/93
- * $Id$
- */
-
-#ifndef _SYS_DOMAIN_H_
-#define _SYS_DOMAIN_H_
-
-/*
- * Structure per communications domain.
- */
-
-/*
- * Forward structure declarations for function prototypes [sic].
- */
-struct mbuf;
-
-struct domain {
- int dom_family; /* AF_xxx */
- char *dom_name;
- void (*dom_init) /* initialize domain data structures */
- __P((void));
- int (*dom_externalize) /* externalize access rights */
- __P((struct mbuf *));
- void (*dom_dispose) /* dispose of internalized rights */
- __P((struct mbuf *));
- struct protosw *dom_protosw, *dom_protoswNPROTOSW;
- struct domain *dom_next;
- int (*dom_rtattach) /* initialize routing table */
- __P((void **, int));
- int dom_rtoffset; /* an arg to rtattach, in bits */
- int dom_maxrtkey; /* for routing layer */
-};
-
-#ifdef KERNEL
-extern struct domain *domains;
-extern struct domain localdomain;
-
-#define DOMAIN_SET(name) \
- DATA_SET(domain_set, name ## domain);
-
-#endif
-
-#endif
diff --git a/cpukit/libnetworking/sys/kernel.h b/cpukit/libnetworking/sys/kernel.h
deleted file mode 100644
index 35bce70bd6..0000000000
--- a/cpukit/libnetworking/sys/kernel.h
+++ /dev/null
@@ -1,251 +0,0 @@
-/*-
- * Copyright (c) 1995 Terrence R. Lambert
- * All rights reserved.
- *
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- * (c) UNIX System Laboratories, Inc.
- * All or some portions of this file are derived from material licensed
- * to the University of California by American Telephone and Telegraph
- * Co. or Unix System Laboratories, Inc. and are reproduced herein with
- * the permission of UNIX System Laboratories, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)kernel.h 8.3 (Berkeley) 1/21/94
- * $Id$
- */
-
-#ifndef _SYS_KERNEL_H_
-#define _SYS_KERNEL_H_
-
-/* Global variables for the kernel. */
-
-/* 1.1 */
-extern long hostid;
-extern char hostname[MAXHOSTNAMELEN];
-extern int hostnamelen;
-extern char domainname[MAXHOSTNAMELEN];
-extern int domainnamelen;
-extern char kernelname[MAXPATHLEN];
-
-/* 1.2 */
-extern volatile struct timeval mono_time;
-extern struct timeval boottime;
-extern struct timeval runtime;
-/* extern volatile struct timeval time; */
-extern struct timezone tz; /* XXX */
-
-extern int tick; /* usec per tick (1000000 / hz) */
-extern int hz; /* system clock's frequency */
-extern int psratio; /* ratio: prof / stat */
-extern int stathz; /* statistics clock's frequency */
-extern int profhz; /* profiling clock's frequency */
-extern int ticks;
-extern int lbolt; /* once a second sleep address */
-extern int tickdelta;
-extern long timedelta;
-
-/*
- * The following macros are used to declare global sets of objects, which
- * are collected by the linker into a `struct linker_set' as defined below.
- *
- * NB: the constants defined below must match those defined in
- * ld/ld.h. Since their calculation requires arithmetic, we
- * can't name them symbolically (e.g., 23 is N_SETT | N_EXT).
- */
-#define MAKE_SET(set, sym, type)
-#define TEXT_SET(set, sym) MAKE_SET(set, sym, 23)
-#define DATA_SET(set, sym) MAKE_SET(set, sym, 25)
-#define BSS_SET(set, sym) MAKE_SET(set, sym, 27)
-#define ABS_SET(set, sym) MAKE_SET(set, sym, 21)
-
-
-/*
- * Enumerated types for known system startup interfaces.
- *
- * Startup occurs in ascending numeric order; the list entries are
- * sorted prior to attempting startup to guarantee order. Items
- * of the same level are arbitrated for order based on the 'order'
- * element.
- *
- * These numbers are arbitrary and are chosen ONLY for ordering; the
- * enumeration values are explicit rather than implicit to provide
- * for binary compatibility with inserted elements.
- *
- * The SI_SUB_RUN_SCHEDULER value must have the highest lexical value.
- *
- * The SI_SUB_CONSOLE and SI_SUB_SWAP values represent values used by
- * the BSD 4.4Lite but not by FreeBSD; they are maintained in dependent
- * order to support porting.
- *
- * The SI_SUB_PROTO_BEGIN and SI_SUB_PROTO_END bracket a range of
- * initializations to take place at splimp(). This is a historical
- * wart that should be removed -- probably running everything at
- * splimp() until the first init that doesn't want it is the correct
- * fix. They are currently present to ensure historical behavior.
- */
-enum sysinit_sub_id {
- SI_SUB_DUMMY = 0x00000000, /* not executed; for linker*/
- SI_SUB_CONSOLE = 0x08000000, /* console*/
- SI_SUB_COPYRIGHT = 0x08000001, /* first use of console*/
- SI_SUB_VM = 0x10000000, /* virtual memory system init*/
- SI_SUB_KMEM = 0x18000000, /* kernel memory*/
- SI_SUB_CPU = 0x20000000, /* CPU resource(s)*/
- SI_SUB_DEVFS = 0x22000000, /* get DEVFS ready */
- SI_SUB_DRIVERS = 0x23000000, /* Let Drivers initialize */
- SI_SUB_CONFIGURE = 0x24000000, /* Configure devices */
- SI_SUB_INTRINSIC = 0x28000000, /* proc 0*/
- SI_SUB_RUN_QUEUE = 0x30000000, /* the run queue*/
- SI_SUB_VM_CONF = 0x38000000, /* config VM, set limits*/
- SI_SUB_VFS = 0x40000000, /* virtual file system*/
- SI_SUB_CLOCKS = 0x48000000, /* real time and stat clocks*/
- SI_SUB_MBUF = 0x50000000, /* mbufs*/
- SI_SUB_CLIST = 0x58000000, /* clists*/
- SI_SUB_SYSV_SHM = 0x64000000, /* System V shared memory*/
- SI_SUB_SYSV_SEM = 0x68000000, /* System V semaphores*/
- SI_SUB_SYSV_MSG = 0x6C000000, /* System V message queues*/
- SI_SUB_PSEUDO = 0x70000000, /* pseudo devices*/
- SI_SUB_PROTO_BEGIN = 0x80000000, /* XXX: set splimp (kludge)*/
- SI_SUB_PROTO_IF = 0x84000000, /* interfaces*/
- SI_SUB_PROTO_DOMAIN = 0x88000000, /* domains (address families?)*/
- SI_SUB_PROTO_END = 0x8fffffff, /* XXX: set splx (kludge)*/
- SI_SUB_KPROF = 0x90000000, /* kernel profiling*/
- SI_SUB_KICK_SCHEDULER = 0xa0000000, /* start the timeout events*/
- SI_SUB_ROOT = 0xb0000000, /* root mount*/
- SI_SUB_ROOT_FDTAB = 0xb8000000, /* root vnode in fd table...*/
- SI_SUB_SWAP = 0xc0000000, /* swap*/
- SI_SUB_INTRINSIC_POST = 0xd0000000, /* proc 0 cleanup*/
- SI_SUB_KTHREAD_INIT = 0xe0000000, /* init process*/
- SI_SUB_KTHREAD_PAGE = 0xe4000000, /* pageout daemon*/
- SI_SUB_KTHREAD_VM = 0xe8000000, /* vm daemon*/
- SI_SUB_KTHREAD_UPDATE = 0xec000000, /* update daemon*/
- SI_SUB_RUN_SCHEDULER = 0xffffffff /* scheduler: no return*/
-};
-
-
-/*
- * Some enumerated orders; "ANY" sorts last.
- */
-enum sysinit_elem_order {
- SI_ORDER_FIRST = 0x00000000, /* first*/
- SI_ORDER_SECOND = 0x00000001, /* second*/
- SI_ORDER_THIRD = 0x00000002, /* third*/
- SI_ORDER_MIDDLE = 0x10000000, /* somewhere in the middle */
- SI_ORDER_ANY = 0xffffffff /* last*/
-};
-
-
-/*
- * System initialization call types; currently two are supported... one
- * to do a simple function call and one to cause a process to be started
- * by the kernel on the callers behalf.
- */
-typedef enum sysinit_elem_type {
- SI_TYPE_DEFAULT = 0x00000000, /* No special processing*/
- SI_TYPE_KTHREAD = 0x00000001 /* start kernel thread*/
-} si_elem_t;
-
-
-/*
- * A system initialization call instance
- *
- * The subsystem
- */
-struct sysinit {
- unsigned int subsystem; /* subsystem identifier*/
- unsigned int order; /* init order within subsystem*/
- void (*func) __P((void *)); /* init function*/
- void *udata; /* multiplexer/argument */
- si_elem_t type; /* sysinit_elem_type*/
-};
-
-
-/*
- * Default: no special processing
- */
-#define SYSINIT(uniquifier, subsystem, order, func, ident)
-
-/*
- * Call 'fork()' before calling '(*func)(ident)';
- * for making a kernel 'thread' (or builtin process.)
- */
-#define SYSINIT_KT(uniquifier, subsystem, order, func, ident)
-
-
-/*
- * A kernel process descriptor; used to start "internal" daemons
- *
- * Note: global_procpp may be NULL for no global save area
- */
-struct kproc_desc {
- char *arg0; /* arg 0 (for 'ps' listing)*/
- void (*func) __P((void)); /* "main" for kernel process*/
- struct proc **global_procpp; /* ptr to proc ptr save area*/
-};
-
-void kproc_start __P((void *udata));
-
-#ifdef PSEUDO_LKM
-#include <sys/conf.h>
-#include <sys/exec.h>
-#include <sys/sysent.h>
-#include <sys/lkm.h>
-
-#define PSEUDO_SET(init, name) \
- extern struct linker_set MODVNOPS; \
- MOD_MISC(name); \
- static int \
- name ## _load(struct lkm_table *lkmtp, int cmd) \
- { init((void *)NULL /* XXX unused (?) */); return 0; } \
- static int \
- name ## _unload(struct lkm_table *lkmtp, int cmd) \
- { return EINVAL; } \
- int \
- name ## _mod(struct lkm_table *lkmtp, int cmd, int ver) { \
- DISPATCH(lkmtp, cmd, ver, name ## _load, name ## _unload, \
- lkm_nullcmd); }
-#else /* PSEUDO_LKM */
-
-/*
- * Compatibility. To be deprecated after LKM is updated.
- */
-#define PSEUDO_SET(sym, name) SYSINIT(ps, SI_SUB_PSEUDO, SI_ORDER_ANY, sym, 0)
-
-#endif /* PSEUDO_LKM */
-
-struct linker_set {
- int ls_length;
- const void *ls_items[1]; /* really ls_length of them,
- * trailing NULL */
-};
-
-extern struct linker_set execsw_set;
-
-#endif /* !_SYS_KERNEL_H_*/
diff --git a/cpukit/libnetworking/sys/libkern.h b/cpukit/libnetworking/sys/libkern.h
deleted file mode 100644
index c01e35b273..0000000000
--- a/cpukit/libnetworking/sys/libkern.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)libkern.h 8.1 (Berkeley) 6/10/93
- * $Id$
- */
-
-#ifndef _SYS_LIBKERN_H_
-#define _SYS_LIBKERN_H_
-
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-/* BCD conversions. */
-extern u_char const bcd2bin_data[];
-extern u_char const bin2bcd_data[];
-extern char const hex2ascii_data[];
-
-#define bcd2bin(bcd) (bcd2bin_data[bcd])
-#define bin2bcd(bin) (bin2bcd_data[bin])
-#define hex2ascii(hex) (hex2ascii_data[hex])
-
-static __inline int imax(int a, int b) { return (a > b ? a : b); }
-static __inline int imin(int a, int b) { return (a < b ? a : b); }
-static __inline long lmax(long a, long b) { return (a > b ? a : b); }
-static __inline long lmin(long a, long b) { return (a < b ? a : b); }
-static __inline u_int max(u_int a, u_int b) { return (a > b ? a : b); }
-static __inline u_int min(u_int a, u_int b) { return (a < b ? a : b); }
-static __inline quad_t qmax(quad_t a, quad_t b) { return (a > b ? a : b); }
-static __inline quad_t qmin(quad_t a, quad_t b) { return (a < b ? a : b); }
-static __inline u_long ulmax(u_long a, u_long b) { return (a > b ? a : b); }
-static __inline u_long ulmin(u_long a, u_long b) { return (a < b ? a : b); }
-
-/* Prototypes for non-quad routines. */
-int bcmp __P((const void *, const void *, size_t));
-#ifndef HAVE_INLINE_FFS
-int ffs __P((int));
-#endif
-#ifndef HAVE_INLINE_FLS
-int fls __P((int));
-#endif
-int locc __P((int, char *, u_int));
-void qsort __P((void *base, size_t nmemb, size_t size,
- int (*compar)(const void *, const void *)));
-u_long random __P((void));
-char *index __P((const char *, int));
-char *rindex __P((const char *, int));
-int scanc __P((u_int, const u_char *, const u_char *, int));
-int skpc __P((int, int, char *));
-void srandom __P((u_long));
-char *strcat __P((char *, const char *));
-int strcmp __P((const char *, const char *));
-char *strdup __P((const char *s));
-char *strcpy __P((char *, const char *));
-size_t strlen __P((const char *));
-int strncmp __P((const char *, const char *, size_t));
-char *strncpy __P((char *, const char *, size_t));
-char *strerror __P((int errnum));
-
-#endif /* !_SYS_LIBKERN_H_ */
diff --git a/cpukit/libnetworking/sys/malloc.h b/cpukit/libnetworking/sys/malloc.h
deleted file mode 100644
index ec85c1814d..0000000000
--- a/cpukit/libnetworking/sys/malloc.h
+++ /dev/null
@@ -1,355 +0,0 @@
-/*
- * Copyright (c) 1987, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)malloc.h 8.5 (Berkeley) 5/3/95
- * $Id$
- */
-
-#ifndef _SYS_MALLOC_H_
-#define _SYS_MALLOC_H_
-
-#include <rtems/rtems_bsdnet_internal.h> /* Ensure we get RTEMS malloc hooks */
-#define KMEMSTATS
-
-/*
- * flags to malloc
- */
-#define M_WAITOK 0x0000
-#define M_NOWAIT 0x0001
-#define M_KERNEL 0x0002
-
-/*
- * Types of memory to be allocated
- */
-#define M_FREE 0 /* should be on free list */
-#define M_MBUF 1 /* mbuf */
-#define M_DEVBUF 2 /* device driver memory */
-#define M_SOCKET 3 /* socket structure */
-#define M_PCB 4 /* protocol control block */
-#define M_RTABLE 5 /* routing tables */
-#define M_HTABLE 6 /* IMP host tables */
-#define M_FTABLE 7 /* fragment reassembly header */
-#define M_ZOMBIE 8 /* zombie proc status */
-#define M_IFADDR 9 /* interface address */
-#define M_SOOPTS 10 /* socket options */
-#define M_SONAME 11 /* socket name */
-#define M_NAMEI 12 /* namei path name buffer */
-#define M_GPROF 13 /* kernel profiling buffer */
-#define M_IOCTLOPS 14 /* ioctl data buffer */
-#define M_MAPMEM 15 /* mapped memory descriptors */
-#define M_CRED 16 /* credentials */
-#define M_PGRP 17 /* process group header */
-#define M_SESSION 18 /* session header */
-#define M_IOV 19 /* large iov's */
-#define M_MOUNT 20 /* vfs mount struct */
-#define M_FHANDLE 21 /* network file handle */
-#define M_NFSREQ 22 /* NFS request header */
-#define M_NFSMNT 23 /* NFS mount structure */
-#define M_NFSNODE 24 /* NFS vnode private part */
-#define M_VNODE 25 /* Dynamically allocated vnodes */
-#define M_CACHE 26 /* Dynamically allocated cache entries */
-#define M_DQUOT 27 /* UFS quota entries */
-#define M_UFSMNT 28 /* UFS mount structure */
-#define M_SHM 29 /* SVID compatible shared memory segments */
-#define M_VMMAP 30 /* VM map structures */
-#define M_VMMAPENT 31 /* VM map entry structures */
-#define M_VMOBJ 32 /* VM object structure */
-#define M_VMOBJHASH 33 /* VM object hash structure */
-#define M_VMPMAP 34 /* VM pmap */
-#define M_VMPVENT 35 /* VM phys-virt mapping entry */
-#define M_VMPAGER 36 /* XXX: VM pager struct */
-#define M_VMPGDATA 37 /* XXX: VM pager private data */
-#define M_FILE 38 /* Open file structure */
-#define M_FILEDESC 39 /* Open file descriptor table */
-#define M_LOCKF 40 /* Byte-range locking structures */
-#define M_PROC 41 /* Proc structures */
-#define M_SUBPROC 42 /* Proc sub-structures */
-#define M_SEGMENT 43 /* Segment for LFS */
-#define M_LFSNODE 44 /* LFS vnode private part */
-#define M_FFSNODE 45 /* FFS vnode private part */
-#define M_MFSNODE 46 /* MFS vnode private part */
-#define M_NQLEASE 47 /* Nqnfs lease */
-#define M_NQMHOST 48 /* Nqnfs host address table */
-#define M_NETADDR 49 /* Export host address structure */
-#define M_NFSSVC 50 /* Nfs server structure */
-#define M_NFSUID 51 /* Nfs uid mapping structure */
-#define M_NFSD 52 /* Nfs server daemon structure */
-#define M_IPMOPTS 53 /* internet multicast options */
-#define M_IPMADDR 54 /* internet multicast address */
-#define M_IFMADDR 55 /* link-level multicast address */
-#define M_MRTABLE 56 /* multicast routing tables */
-#define M_ISOFSMNT 57 /* ISOFS mount structure */
-#define M_ISOFSNODE 58 /* ISOFS vnode private part */
-#define M_NFSRVDESC 59 /* NFS server socket descriptor */
-#define M_NFSDIROFF 60 /* NFS directory offset data */
-#define M_NFSBIGFH 61 /* NFS version 3 file handle */
-#define M_MSDOSFSMNT 67 /* MSDOSFS mount structure */
-#define M_MSDOSFSNODE 68 /* MSDOSFS vnode private part */
-#define M_MSDOSFSFAT 69 /* MSDOSFS file allocation table */
-#define M_DEVFSMNT 70 /* DEVFS mount structure */
-#define M_DEVFSBACK 71 /* DEVFS Back node */
-#define M_DEVFSFRONT 72 /* DEVFS Front node */
-#define M_DEVFSNODE 73 /* DEVFS node */
-#define M_TEMP 74 /* misc temporary data buffers */
-#define M_TTYS 75 /* tty data structures */
-#define M_GZIP 76 /* Gzip trees */
-#define M_IPFW 77 /* IpFw/IpAcct chain's */
-#define M_DEVL 78 /* isa_device lists in userconfig() */
-#define M_PKTCLASS 79 /* structures used in packet classifier */
-#define M_SYSCTL 80 /* sysctl internal magic */
-#define M_SECA 81 /* security associations, key management */
-#define M_BIOBUF 82 /* BIO buffer */
-#define M_KTRACE 83 /* KTRACE */
-#define M_SELECT 84 /* select() buffer */
-#define M_CFS 85 /* Coda */
-#define M_LAST 86 /* Must be last type + 1 */
-
-#define INITKMEMNAMES { \
- "free", /* 0 M_FREE */ \
- "mbuf", /* 1 M_MBUF */ \
- "devbuf", /* 2 M_DEVBUF */ \
- "socket", /* 3 M_SOCKET */ \
- "pcb", /* 4 M_PCB */ \
- "routetbl", /* 5 M_RTABLE */ \
- "hosttbl", /* 6 M_HTABLE */ \
- "fragtbl", /* 7 M_FTABLE */ \
- "zombie", /* 8 M_ZOMBIE */ \
- "ifaddr", /* 9 M_IFADDR */ \
- "soopts", /* 10 M_SOOPTS */ \
- "soname", /* 11 M_SONAME */ \
- "namei", /* 12 M_NAMEI */ \
- "gprof", /* 13 M_GPROF */ \
- "ioctlops", /* 14 M_IOCTLOPS */ \
- "mapmem", /* 15 M_MAPMEM */ \
- "cred", /* 16 M_CRED */ \
- "pgrp", /* 17 M_PGRP */ \
- "session", /* 18 M_SESSION */ \
- "iov", /* 19 M_IOV */ \
- "mount", /* 20 M_MOUNT */ \
- "fhandle", /* 21 M_FHANDLE */ \
- "NFS req", /* 22 M_NFSREQ */ \
- "NFS mount", /* 23 M_NFSMNT */ \
- "NFS node", /* 24 M_NFSNODE */ \
- "vnodes", /* 25 M_VNODE */ \
- "namecache", /* 26 M_CACHE */ \
- "UFS quota", /* 27 M_DQUOT */ \
- "UFS mount", /* 28 M_UFSMNT */ \
- "shm", /* 29 M_SHM */ \
- "VM map", /* 30 M_VMMAP */ \
- "VM mapent", /* 31 M_VMMAPENT */ \
- "VM object", /* 32 M_VMOBJ */ \
- "VM objhash", /* 33 M_VMOBJHASH */ \
- "VM pmap", /* 34 M_VMPMAP */ \
- "VM pvmap", /* 35 M_VMPVENT */ \
- "VM pager", /* 36 M_VMPAGER */ \
- "VM pgdata", /* 37 M_VMPGDATA */ \
- "file", /* 38 M_FILE */ \
- "file desc", /* 39 M_FILEDESC */ \
- "lockf", /* 40 M_LOCKF */ \
- "proc", /* 41 M_PROC */ \
- "subproc", /* 42 M_SUBPROC */ \
- "LFS segment", /* 43 M_SEGMENT */ \
- "LFS node", /* 44 M_LFSNODE */ \
- "FFS node", /* 45 M_FFSNODE */ \
- "MFS node", /* 46 M_MFSNODE */ \
- "NQNFS Lease", /* 47 M_NQLEASE */ \
- "NQNFS Host", /* 48 M_NQMHOST */ \
- "Export Host", /* 49 M_NETADDR */ \
- "NFS srvsock", /* 50 M_NFSSVC */ \
- "NFS uid", /* 51 M_NFSUID */ \
- "NFS daemon", /* 52 M_NFSD */ \
- "ip_moptions", /* 53 M_IPMOPTS */ \
- "in_multi", /* 54 M_IPMADDR */ \
- "ether_multi", /* 55 M_IFMADDR */ \
- "mrt", /* 56 M_MRTABLE */ \
- "ISOFS mount", /* 57 M_ISOFSMNT */ \
- "ISOFS node", /* 58 M_ISOFSNODE */ \
- "NFSV3 srvdesc",/* 59 M_NFSRVDESC */ \
- "NFSV3 diroff", /* 60 M_NFSDIROFF */ \
- "NFSV3 bigfh", /* 61 M_NFSBIGFH */ \
- NULL, \
- NULL, NULL, NULL, NULL, \
- "MSDOSFS mount",/* 67 M_MSDOSFSMNT */ \
- "MSDOSFS node", /* 68 M_MSDOSFSNODE */ \
- "MSDOSFS FAT", /* 69 M_MSDOSFSFAR */ \
- "DEVFS mount", /* 70 M_DEVFSMNT */ \
- "DEVFS back", /* 71 M_DEVFSBACK */ \
- "DEVFS front", /* 72 M_DEVFSFRONT */ \
- "DEVFS node", /* 73 M_DEVFSNODE */ \
- "temp", /* 74 M_TEMP */ \
- "ttys", /* 75 M_TTYS */ \
- "Gzip trees", /* 76 M_GZIP */ \
- "IpFw/IpAcct", /* 77 M_IPFW */ \
- "isa_devlist", /* 78 M_DEVL */ \
- "PktClass", /* 79 M_PKTCLASS */ \
- "sysctl", /* 80 M_SYSCTL */ \
- "key mgmt", /* 81 M_SECA */ \
- "BIO buffer", /* 82 M_BIOBUF */ \
- "KTRACE", /* 83 M_KTRACE */ \
- "select", /* 84 M_SELECT */ \
- "Coda", /* 85 M_CFS */ \
-}
-
-struct kmemstats {
- long ks_inuse; /* # of packets of this type currently in use */
- long ks_calls; /* total packets of this type ever allocated */
- long ks_memuse; /* total memory held in bytes */
- u_short ks_limblocks; /* number of times blocked for hitting limit */
- u_short ks_mapblocks; /* number of times blocked for kernel map */
- long ks_maxused; /* maximum number ever used */
- long ks_limit; /* most that are allowed to exist */
- long ks_size; /* sizes of this thing that are allocated */
- long ks_spare;
-};
-
-/*
- * Array of descriptors that describe the contents of each page
- */
-struct kmemusage {
- short ku_indx; /* bucket index */
- union {
- u_short freecnt;/* for small allocations, free pieces in page */
- u_short pagecnt;/* for large allocations, pages alloced */
- } ku_un;
-};
-#define ku_freecnt ku_un.freecnt
-#define ku_pagecnt ku_un.pagecnt
-
-/*
- * Set of buckets for each size of memory block that is retained
- */
-struct kmembuckets {
- caddr_t kb_next; /* list of free blocks */
- caddr_t kb_last; /* last free block */
- long kb_calls; /* total calls to allocate this size */
- long kb_total; /* total number of blocks allocated */
- long kb_totalfree; /* # of free elements in this bucket */
- long kb_elmpercl; /* # of elements in this sized allocation */
- long kb_highwat; /* high water mark */
- long kb_couldfree; /* over high water mark and could free */
-};
-
-#ifdef KERNEL
-#define MINALLOCSIZE (1 << MINBUCKET)
-#define BUCKETINDX(size) \
- ((size) <= (MINALLOCSIZE * 128) \
- ? (size) <= (MINALLOCSIZE * 8) \
- ? (size) <= (MINALLOCSIZE * 2) \
- ? (size) <= (MINALLOCSIZE * 1) \
- ? (MINBUCKET + 0) \
- : (MINBUCKET + 1) \
- : (size) <= (MINALLOCSIZE * 4) \
- ? (MINBUCKET + 2) \
- : (MINBUCKET + 3) \
- : (size) <= (MINALLOCSIZE* 32) \
- ? (size) <= (MINALLOCSIZE * 16) \
- ? (MINBUCKET + 4) \
- : (MINBUCKET + 5) \
- : (size) <= (MINALLOCSIZE * 64) \
- ? (MINBUCKET + 6) \
- : (MINBUCKET + 7) \
- : (size) <= (MINALLOCSIZE * 2048) \
- ? (size) <= (MINALLOCSIZE * 512) \
- ? (size) <= (MINALLOCSIZE * 256) \
- ? (MINBUCKET + 8) \
- : (MINBUCKET + 9) \
- : (size) <= (MINALLOCSIZE * 1024) \
- ? (MINBUCKET + 10) \
- : (MINBUCKET + 11) \
- : (size) <= (MINALLOCSIZE * 8192) \
- ? (size) <= (MINALLOCSIZE * 4096) \
- ? (MINBUCKET + 12) \
- : (MINBUCKET + 13) \
- : (size) <= (MINALLOCSIZE * 16384) \
- ? (MINBUCKET + 14) \
- : (MINBUCKET + 15))
-
-/*
- * Turn virtual addresses into kmem map indices
- */
-#define kmemxtob(alloc) (kmembase + (alloc) * PAGE_SIZE)
-#define btokmemx(addr) (((caddr_t)(addr) - kmembase) / PAGE_SIZE)
-#define btokup(addr) (&kmemusage[(caddr_t)(addr) - kmembase >> PAGE_SHIFT])
-
-/*
- * Macro versions for the usual cases of malloc/free
- */
-#if defined(KMEMSTATS) || defined(DIAGNOSTIC)
-#define MALLOC(space, cast, size, type, flags) \
- (space) = (cast)malloc((u_long)(size), type, flags)
-#define FREE(addr, type) free((addr), type)
-
-#else /* do not collect statistics */
-#define MALLOC(space, cast, size, type, flags) { \
- register struct kmembuckets *kbp = &bucket[BUCKETINDX(size)]; \
- long s = splimp(); \
- if (kbp->kb_next == NULL) { \
- (space) = (cast)malloc((u_long)(size), type, flags); \
- } else { \
- (space) = (cast)kbp->kb_next; \
- kbp->kb_next = *(caddr_t *)(space); \
- } \
- splx(s); \
-}
-
-#define FREE(addr, type) { \
- register struct kmembuckets *kbp; \
- register struct kmemusage *kup = btokup(addr); \
- long s = splimp(); \
- if (1 << kup->ku_indx > MAXALLOCSAVE) { \
- free((addr), type); \
- } else { \
- kbp = &bucket[kup->ku_indx]; \
- if (kbp->kb_next == NULL) \
- kbp->kb_next = (caddr_t)(addr); \
- else \
- *(caddr_t *)(kbp->kb_last) = (caddr_t)(addr); \
- *(caddr_t *)(addr) = NULL; \
- kbp->kb_last = (caddr_t)(addr); \
- } \
- splx(s); \
-}
-#endif /* do not collect statistics */
-
-extern struct kmemstats kmemstats[];
-extern struct kmemusage *kmemusage;
-extern char *kmembase;
-extern struct kmembuckets bucket[];
-
-void *contigmalloc __P((unsigned long size, int type, int flags,
- unsigned long low, unsigned long high,
- unsigned long alignment, unsigned long boundary));
-void free __P((void *addr, int type));
-void *malloc __P((unsigned long size, int type, int flags));
-#endif /* KERNEL */
-
-#endif /* !_SYS_MALLOC_H_ */
diff --git a/cpukit/libnetworking/sys/mbuf.h b/cpukit/libnetworking/sys/mbuf.h
deleted file mode 100644
index 00f8a13a5c..0000000000
--- a/cpukit/libnetworking/sys/mbuf.h
+++ /dev/null
@@ -1,440 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)mbuf.h 8.5 (Berkeley) 2/19/95
- * $Id$
- */
-
-#ifndef _SYS_MBUF_H_
-#define _SYS_MBUF_H_
-
-#ifndef M_WAITOK
-#include <sys/malloc.h>
-#endif
-
-/*
- * Mbufs are of a single size, MSIZE (machine/machparam.h), which
- * includes overhead. An mbuf may add a single "mbuf cluster" of size
- * MCLBYTES (also in machine/machparam.h), which has no additional overhead
- * and is used instead of the internal data area; this is done when
- * at least MINCLSIZE of data must be stored.
- */
-
-#define MLEN (MSIZE - sizeof(struct m_hdr)) /* normal data len */
-#define MHLEN (MLEN - sizeof(struct pkthdr)) /* data len w/pkthdr */
-
-#define MINCLSIZE (MHLEN + MLEN) /* smallest amount to put in cluster */
-#define M_MAXCOMPRESS (MHLEN / 2) /* max amount to copy for compression */
-
-/*
- * Macros for type conversion
- * mtod(m,t) - convert mbuf pointer to data pointer of correct type
- * dtom(x) - convert data pointer within mbuf to mbuf pointer (XXX)
- * mtocl(x) - convert pointer within cluster to cluster index #
- * cltom(x) - convert cluster # to ptr to beginning of cluster
- */
-#define mtod(m,t) ((t)((m)->m_data))
-#define dtom(x) ((struct mbuf *)((long)(x) & ~(MSIZE-1)))
-#define mtocl(x) (((u_long)(x) - (u_long)mbutl) >> MCLSHIFT)
-#define cltom(x) ((caddr_t)((u_long)mbutl + ((u_long)(x) << MCLSHIFT)))
-
-/* header at beginning of each mbuf: */
-struct m_hdr {
- struct mbuf *mh_next; /* next buffer in chain */
- struct mbuf *mh_nextpkt; /* next chain in queue/record */
- caddr_t mh_data; /* location of data */
- int mh_len; /* amount of data in this mbuf */
- short mh_type; /* type of data in this mbuf */
- short mh_flags; /* flags; see below */
-};
-
-/* record/packet header in first mbuf of chain; valid if M_PKTHDR set */
-struct pkthdr {
- struct ifnet *rcvif; /* rcv interface */
- int len; /* total packet length */
-};
-
-/* description of external storage mapped into mbuf, valid if M_EXT set */
-struct m_ext {
- caddr_t ext_buf; /* start of buffer */
- void (*ext_free) /* free routine if not the usual */
- __P((caddr_t, u_int));
- u_int ext_size; /* size of buffer, for ext_free */
- void (*ext_ref) /* add a reference to the ext object */
- __P((caddr_t, u_int));
-};
-
-struct mbuf {
- struct m_hdr m_hdr;
- union {
- struct {
- struct pkthdr MH_pkthdr; /* M_PKTHDR set */
- union {
- struct m_ext MH_ext; /* M_EXT set */
- char MH_databuf[MHLEN];
- } MH_dat;
- } MH;
- char M_databuf[MLEN]; /* !M_PKTHDR, !M_EXT */
- } M_dat;
-};
-#define m_next m_hdr.mh_next
-#define m_len m_hdr.mh_len
-#define m_data m_hdr.mh_data
-#define m_type m_hdr.mh_type
-#define m_flags m_hdr.mh_flags
-#define m_nextpkt m_hdr.mh_nextpkt
-#define m_act m_nextpkt
-#define m_pkthdr M_dat.MH.MH_pkthdr
-#define m_ext M_dat.MH.MH_dat.MH_ext
-#define m_pktdat M_dat.MH.MH_dat.MH_databuf
-#define m_dat M_dat.M_databuf
-
-/* mbuf flags */
-#define M_EXT 0x0001 /* has associated external storage */
-#define M_PKTHDR 0x0002 /* start of record */
-#define M_EOR 0x0004 /* end of record */
-#define M_PROTO1 0x0008 /* protocol-specific */
-
-/* mbuf pkthdr flags, also in m_flags */
-#define M_BCAST 0x0100 /* send/received as link-level broadcast */
-#define M_MCAST 0x0200 /* send/received as link-level multicast */
-
-/* flags copied when copying m_pkthdr */
-#define M_COPYFLAGS (M_PKTHDR|M_EOR|M_PROTO1|M_BCAST|M_MCAST)
-
-/* mbuf types */
-#define MT_FREE 0 /* should be on free list */
-#define MT_DATA 1 /* dynamic (data) allocation */
-#define MT_HEADER 2 /* packet header */
-#define MT_SOCKET 3 /* socket structure */
-#define MT_PCB 4 /* protocol control block */
-#define MT_RTABLE 5 /* routing tables */
-#define MT_HTABLE 6 /* IMP host tables */
-#define MT_ATABLE 7 /* address resolution tables */
-#define MT_SONAME 8 /* socket name */
-#define MT_SOOPTS 10 /* socket options */
-#define MT_FTABLE 11 /* fragment reassembly header */
-#define MT_RIGHTS 12 /* access rights */
-#define MT_IFADDR 13 /* interface address */
-#define MT_CONTROL 14 /* extra-data protocol message */
-#define MT_OOBDATA 15 /* expedited data */
-
-/* flags to m_get/MGET */
-#define M_DONTWAIT M_NOWAIT
-#define M_WAIT M_WAITOK
-
-/* Freelists:
- *
- * Normal mbuf clusters are normally treated as character arrays
- * after allocation, but use the first word of the buffer as a free list
- * pointer while on the free list.
- */
-union mcluster {
- union mcluster *mcl_next;
- char mcl_buf[MCLBYTES];
-};
-
-/*
- * mbuf utility macros:
- *
- * MBUFLOCK(code)
- * prevents a section of code from from being interrupted by network
- * drivers.
- */
-#define MBUFLOCK(code) \
- { int ms = splimp(); \
- { code } \
- splx(ms); \
- }
-
-/*
- * mbuf allocation/deallocation macros:
- *
- * MGET(struct mbuf *m, int how, int type)
- * allocates an mbuf and initializes it to contain internal data.
- *
- * MGETHDR(struct mbuf *m, int how, int type)
- * allocates an mbuf and initializes it to contain a packet header
- * and internal data.
- */
-#define MGET(m, how, type) { \
- int _ms = splimp(); \
- if (mmbfree == 0) \
- (void)m_mballoc(1, (how)); \
- if (((m) = mmbfree) != 0) { \
- mmbfree = (m)->m_next; \
- mbstat.m_mtypes[MT_FREE]--; \
- (m)->m_type = (type); \
- mbstat.m_mtypes[type]++; \
- (m)->m_next = (struct mbuf *)NULL; \
- (m)->m_nextpkt = (struct mbuf *)NULL; \
- (m)->m_data = (m)->m_dat; \
- (m)->m_flags = 0; \
- splx(_ms); \
- } else { \
- splx(_ms); \
- (m) = m_retry((how), (type)); \
- } \
-}
-
-#define MGETHDR(m, how, type) { \
- int _ms = splimp(); \
- if (mmbfree == 0) \
- (void)m_mballoc(1, (how)); \
- if (((m) = mmbfree) != 0) { \
- mmbfree = (m)->m_next; \
- mbstat.m_mtypes[MT_FREE]--; \
- (m)->m_type = (type); \
- mbstat.m_mtypes[type]++; \
- (m)->m_next = (struct mbuf *)NULL; \
- (m)->m_nextpkt = (struct mbuf *)NULL; \
- (m)->m_data = (m)->m_pktdat; \
- (m)->m_flags = M_PKTHDR; \
- splx(_ms); \
- } else { \
- splx(_ms); \
- (m) = m_retryhdr((how), (type)); \
- } \
-}
-
-/*
- * Mbuf cluster macros.
- * MCLALLOC(caddr_t p, int how) allocates an mbuf cluster.
- * MCLGET adds such clusters to a normal mbuf;
- * the flag M_EXT is set upon success.
- * MCLFREE releases a reference to a cluster allocated by MCLALLOC,
- * freeing the cluster if the reference count has reached 0.
- */
-#define MCLALLOC(p, how) \
- MBUFLOCK( \
- if (mclfree == 0) \
- (void)m_clalloc(1, (how)); \
- if (((p) = (caddr_t)mclfree) != 0) { \
- ++mclrefcnt[mtocl(p)]; \
- mbstat.m_clfree--; \
- mclfree = ((union mcluster *)(p))->mcl_next; \
- } \
- )
-
-#define MCLGET(m, how) \
- { MCLALLOC((m)->m_ext.ext_buf, (how)); \
- if ((m)->m_ext.ext_buf != NULL) { \
- (m)->m_data = (m)->m_ext.ext_buf; \
- (m)->m_flags |= M_EXT; \
- (m)->m_ext.ext_free = NULL; \
- (m)->m_ext.ext_ref = NULL; \
- (m)->m_ext.ext_size = MCLBYTES; \
- } \
- }
-
-#define MCLFREE(p) \
- MBUFLOCK ( \
- if (--mclrefcnt[mtocl(p)] == 0) { \
- ((union mcluster *)(p))->mcl_next = mclfree; \
- mclfree = (union mcluster *)(p); \
- mbstat.m_clfree++; \
- } \
- )
-
-/*
- * MFREE(struct mbuf *m, struct mbuf *n)
- * Free a single mbuf and associated external storage.
- * Place the successor, if any, in n.
- */
-#define MFREE(m, n) \
- MBUFLOCK( \
- mbstat.m_mtypes[(m)->m_type]--; \
- if ((m)->m_flags & M_EXT) { \
- if ((m)->m_ext.ext_free) \
- (*((m)->m_ext.ext_free))((m)->m_ext.ext_buf, \
- (m)->m_ext.ext_size); \
- else { \
- char *p = (m)->m_ext.ext_buf; \
- if (--mclrefcnt[mtocl(p)] == 0) { \
- ((union mcluster *)(p))->mcl_next = mclfree; \
- mclfree = (union mcluster *)(p); \
- mbstat.m_clfree++; \
- } \
- } \
- } \
- (n) = (m)->m_next; \
- (m)->m_type = MT_FREE; \
- mbstat.m_mtypes[MT_FREE]++; \
- (m)->m_next = mmbfree; \
- mmbfree = (m); \
- )
-
-/*
- * Copy mbuf pkthdr from from to to.
- * from must have M_PKTHDR set, and to must be empty.
- */
-#define M_COPY_PKTHDR(to, from) { \
- (to)->m_pkthdr = (from)->m_pkthdr; \
- (to)->m_flags = (from)->m_flags & M_COPYFLAGS; \
- (to)->m_data = (to)->m_pktdat; \
-}
-
-/*
- * Set the m_data pointer of a newly-allocated mbuf (m_get/MGET) to place
- * an object of the specified size at the end of the mbuf, longword aligned.
- */
-#define M_ALIGN(m, len) \
- { (m)->m_data += (MLEN - (len)) &~ (sizeof(long) - 1); }
-/*
- * As above, for mbufs allocated with m_gethdr/MGETHDR
- * or initialized by M_COPY_PKTHDR.
- */
-#define MH_ALIGN(m, len) \
- { (m)->m_data += (MHLEN - (len)) &~ (sizeof(long) - 1); }
-
-/*
- * Compute the amount of space available
- * before the current start of data in an mbuf.
- */
-#define M_LEADINGSPACE(m) \
- ((m)->m_flags & M_EXT ? /* (m)->m_data - (m)->m_ext.ext_buf */ 0 : \
- (m)->m_flags & M_PKTHDR ? (m)->m_data - (m)->m_pktdat : \
- (m)->m_data - (m)->m_dat)
-
-/*
- * Compute the amount of space available
- * after the end of data in an mbuf.
- */
-#define M_TRAILINGSPACE(m) \
- ((m)->m_flags & M_EXT ? (m)->m_ext.ext_buf + (m)->m_ext.ext_size - \
- ((m)->m_data + (m)->m_len) : \
- &(m)->m_dat[MLEN] - ((m)->m_data + (m)->m_len))
-
-/*
- * Arrange to prepend space of size plen to mbuf m.
- * If a new mbuf must be allocated, how specifies whether to wait.
- * If how is M_DONTWAIT and allocation fails, the original mbuf chain
- * is freed and m is set to NULL.
- */
-#define M_PREPEND(m, plen, how) { \
- if (M_LEADINGSPACE(m) >= (plen)) { \
- (m)->m_data -= (plen); \
- (m)->m_len += (plen); \
- } else \
- (m) = m_prepend((m), (plen), (how)); \
- if ((m) && (m)->m_flags & M_PKTHDR) \
- (m)->m_pkthdr.len += (plen); \
-}
-
-/* change mbuf to new type */
-#define MCHTYPE(m, t) { \
- MBUFLOCK(mbstat.m_mtypes[(m)->m_type]--; mbstat.m_mtypes[t]++;) \
- (m)->m_type = t;\
-}
-
-/* length to m_copy to copy all */
-#define M_COPYALL 1000000000
-
-/* compatibility with 4.3 */
-#define m_copy(m, o, l) m_copym((m), (o), (l), M_DONTWAIT)
-
-/*
- * Mbuf statistics.
- */
-struct mbstat {
- u_long m_mbufs; /* mbufs obtained from page pool */
- u_long m_clusters; /* clusters obtained from page pool */
- u_long m_spare; /* spare field */
- u_long m_clfree; /* free clusters */
- u_long m_drops; /* times failed to find space */
- u_long m_wait; /* times waited for space */
- u_long m_drain; /* times drained protocols for space */
- u_short m_mtypes[256]; /* type specific mbuf allocations */
-};
-
-#ifdef KERNEL
-extern struct mbuf *mbutl; /* virtual address of mclusters */
-extern char *mclrefcnt; /* cluster reference counts */
-extern struct mbstat mbstat;
-extern int nmbclusters;
-extern int nmbufs;
-extern struct mbuf *mmbfree;
-extern union mcluster *mclfree;
-extern int max_linkhdr; /* largest link-level header */
-extern int max_protohdr; /* largest protocol header */
-extern int max_hdr; /* largest link+protocol header */
-extern int max_datalen; /* MHLEN - max_hdr */
-extern int mbtypes[]; /* XXX */
-
-struct mbuf *m_copym __P((struct mbuf *, int, int, int));
-struct mbuf *m_copypacket __P((struct mbuf *, int));
-struct mbuf *m_devget __P((char *, int, int, struct ifnet *,
- void (*copy)(char *, caddr_t, u_int)));
-struct mbuf *m_free __P((struct mbuf *));
-struct mbuf *m_get __P((int, int));
-struct mbuf *m_getclr __P((int, int));
-struct mbuf *m_gethdr __P((int, int));
-struct mbuf *m_prepend __P((struct mbuf *,int,int));
-struct mbuf *m_pullup __P((struct mbuf *, int));
-struct mbuf *m_retry __P((int, int));
-struct mbuf *m_retryhdr __P((int, int));
-struct mbuf *m_split __P((struct mbuf *,int,int));
-void m_adj __P((struct mbuf *, int));
-void m_cat __P((struct mbuf *,struct mbuf *));
-int m_mballoc __P((int, int));
-int m_clalloc __P((int, int));
-void m_copyback __P((struct mbuf *, int, int, caddr_t));
-void m_copydata __P((struct mbuf *,int,int,caddr_t));
-void m_freem __P((struct mbuf *));
-void m_reclaim __P((void));
-
-#ifdef MBTYPES
-int mbtypes[] = { /* XXX */
- M_FREE, /* MT_FREE 0 should be on free list */
- M_MBUF, /* MT_DATA 1 dynamic (data) allocation */
- M_MBUF, /* MT_HEADER 2 packet header */
- M_SOCKET, /* MT_SOCKET 3 socket structure */
- M_PCB, /* MT_PCB 4 protocol control block */
- M_RTABLE, /* MT_RTABLE 5 routing tables */
- M_HTABLE, /* MT_HTABLE 6 IMP host tables */
- 0, /* MT_ATABLE 7 address resolution tables */
- M_MBUF, /* MT_SONAME 8 socket name */
- 0, /* 9 */
- M_SOOPTS, /* MT_SOOPTS 10 socket options */
- M_FTABLE, /* MT_FTABLE 11 fragment reassembly header */
- M_MBUF, /* MT_RIGHTS 12 access rights */
- M_IFADDR, /* MT_IFADDR 13 interface address */
- M_MBUF, /* MT_CONTROL 14 extra-data protocol message */
- M_MBUF, /* MT_OOBDATA 15 expedited data */
-#ifdef DATAKIT
- 25, 26, 27, 28, 29, 30, 31, 32 /* datakit ugliness */
-#endif
-};
-#endif
-#endif
-
-#endif /* !_SYS_MBUF_H_ */
diff --git a/cpukit/libnetworking/sys/mount.h b/cpukit/libnetworking/sys/mount.h
deleted file mode 100644
index a6254e302d..0000000000
--- a/cpukit/libnetworking/sys/mount.h
+++ /dev/null
@@ -1,531 +0,0 @@
-/*
- * Copyright (c) 1989, 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)mount.h 8.13 (Berkeley) 3/27/94
- * $Id$
- */
-
-#ifndef _SYS_MOUNT_H_
-#define _SYS_MOUNT_H_
-
-#ifndef KERNEL
-#include <sys/ucred.h>
-#endif
-#include <sys/queue.h>
-
-typedef struct fsid { long val[2]; } fsid_t; /* file system id type */
-
-/*
- * File identifier.
- * These are unique per filesystem on a single machine.
- */
-#define MAXFIDSZ 16
-
-struct fid {
- u_short fid_len; /* length of data in bytes */
- u_short fid_reserved; /* force longword alignment */
- char fid_data[MAXFIDSZ]; /* data (variable length) */
-};
-
-/*
- * file system statistics
- */
-
-#define MNAMELEN 90 /* length of buffer for returned name */
-
-struct statfs {
- long f_spare2; /* placeholder */
- long f_bsize; /* fundamental file system block size */
- long f_iosize; /* optimal transfer block size */
- long f_blocks; /* total data blocks in file system */
- long f_bfree; /* free blocks in fs */
- long f_bavail; /* free blocks avail to non-superuser */
- long f_files; /* total file nodes in file system */
- long f_ffree; /* free file nodes in fs */
- fsid_t f_fsid; /* file system id */
- uid_t f_owner; /* user that mounted the filesystem */
- int f_type; /* type of filesystem (see below) */
- int f_flags; /* copy of mount flags */
- long f_spare[6]; /* spare for later */
- char f_mntonname[MNAMELEN]; /* directory on which mounted */
- char f_mntfromname[MNAMELEN];/* mounted filesystem */
-};
-
-/*
- * File system types.
- */
-#define MOUNT_NONE 0
-#define MOUNT_UFS 1 /* Fast Filesystem */
-#define MOUNT_NFS 2 /* Sun-compatible Network Filesystem */
-#define MOUNT_MFS 3 /* Memory-based Filesystem */
-#define MOUNT_MSDOS 4 /* MS/DOS Filesystem */
-#define MOUNT_LFS 5 /* Log-based Filesystem */
-#define MOUNT_LOFS 6 /* Loopback Filesystem */
-#define MOUNT_FDESC 7 /* File Descriptor Filesystem */
-#define MOUNT_PORTAL 8 /* Portal Filesystem */
-#define MOUNT_NULL 9 /* Minimal Filesystem Layer */
-#define MOUNT_UMAP 10 /* User/Group Identifier Remapping Filesystem */
-#define MOUNT_KERNFS 11 /* Kernel Information Filesystem */
-#define MOUNT_PROCFS 12 /* /proc Filesystem */
-#define MOUNT_AFS 13 /* Andrew Filesystem */
-#define MOUNT_CD9660 14 /* ISO9660 (aka CDROM) Filesystem */
-#define MOUNT_UNION 15 /* Union (translucent) Filesystem */
-#define MOUNT_DEVFS 16 /* existing device Filesystem */
-#define MOUNT_EXT2FS 17 /* Linux EXT2FS */
-#define MOUNT_TFS 18 /* Netcon Novell filesystem */
-#define MOUNT_CFS 19 /* Coda filesystem */
-#define MOUNT_MAXTYPE 19
-
-#define INITMOUNTNAMES { \
- "none", /* 0 MOUNT_NONE */ \
- "ufs", /* 1 MOUNT_UFS */ \
- "nfs", /* 2 MOUNT_NFS */ \
- "mfs", /* 3 MOUNT_MFS */ \
- "msdos", /* 4 MOUNT_MSDOS */ \
- "lfs", /* 5 MOUNT_LFS */ \
- "lofs", /* 6 MOUNT_LOFS */ \
- "fdesc", /* 7 MOUNT_FDESC */ \
- "portal", /* 8 MOUNT_PORTAL */ \
- "null", /* 9 MOUNT_NULL */ \
- "umap", /* 10 MOUNT_UMAP */ \
- "kernfs", /* 11 MOUNT_KERNFS */ \
- "procfs", /* 12 MOUNT_PROCFS */ \
- "afs", /* 13 MOUNT_AFS */ \
- "cd9660", /* 14 MOUNT_CD9660 */ \
- "union", /* 15 MOUNT_UNION */ \
- "devfs", /* 16 MOUNT_DEVFS */ \
- "ext2fs", /* 17 MOUNT_EXT2FS */ \
- "tfs", /* 18 MOUNT_TFS */ \
- "cfs", /* 19 MOUNT_CFS */ \
- 0, /* 20 MOUNT_SPARE */ \
-}
-
-/*
- * Structure per mounted file system. Each mounted file system has an
- * array of operations and an instance record. The file systems are
- * put on a doubly linked list.
- */
-LIST_HEAD(vnodelst, vnode);
-
-struct mount {
- CIRCLEQ_ENTRY(mount) mnt_list; /* mount list */
- struct vfsops *mnt_op; /* operations on fs */
- struct vfsconf *mnt_vfc; /* configuration info */
- struct vnode *mnt_vnodecovered; /* vnode we mounted on */
- struct vnodelst mnt_vnodelist; /* list of vnodes this mount */
- int mnt_flag; /* flags */
- int mnt_maxsymlinklen; /* max size of short symlink */
- struct statfs mnt_stat; /* cache of filesystem stats */
- qaddr_t mnt_data; /* private data */
-/* struct vfsconf *mnt_vfc; */ /* configuration info */
- time_t mnt_time; /* last time written*/
-};
-
-/*
- * Mount flags.
- *
- * Unmount uses MNT_FORCE flag.
- */
-#define MNT_RDONLY 0x00000001 /* read only filesystem */
-#define MNT_SYNCHRONOUS 0x00000002 /* file system written synchronously */
-#define MNT_NOEXEC 0x00000004 /* can't exec from filesystem */
-#define MNT_NOSUID 0x00000008 /* don't honor setuid bits on fs */
-#define MNT_NODEV 0x00000010 /* don't interpret special files */
-#define MNT_UNION 0x00000020 /* union with underlying filesystem */
-#define MNT_ASYNC 0x00000040 /* file system written asynchronously */
-#define MNT_NOATIME 0x10000000 /* Disable update of file access times */
-
-/*
- * exported mount flags.
- */
-#define MNT_EXRDONLY 0x00000080 /* exported read only */
-#define MNT_EXPORTED 0x00000100 /* file system is exported */
-#define MNT_DEFEXPORTED 0x00000200 /* exported to the world */
-#define MNT_EXPORTANON 0x00000400 /* use anon uid mapping for everyone */
-#define MNT_EXKERB 0x00000800 /* exported with Kerberos uid mapping */
-
-/*
- * Flags set by internal operations.
- */
-#define MNT_LOCAL 0x00001000 /* filesystem is stored locally */
-#define MNT_QUOTA 0x00002000 /* quotas are enabled on filesystem */
-#define MNT_ROOTFS 0x00004000 /* identifies the root filesystem */
-#define MNT_USER 0x00008000 /* mounted by a user */
-
-/*
- * Mask of flags that are visible to statfs()
- */
-#define MNT_VISFLAGMASK (MNT_RDONLY|MNT_SYNCHRONOUS|MNT_NOEXEC|MNT_NOSUID| \
- MNT_NODEV|MNT_UNION|MNT_ASYNC|MNT_EXRDONLY|MNT_EXPORTED| \
- MNT_DEFEXPORTED|MNT_EXPORTANON|MNT_EXKERB|MNT_LOCAL| \
- MNT_QUOTA|MNT_ROOTFS|MNT_USER|MNT_NOATIME)
-
-/*
- * filesystem control flags.
- *
- * MNT_MLOCK lock the mount entry so that name lookup cannot proceed
- * past the mount point. This keeps the subtree stable during mounts
- * and unmounts.
- */
-#define MNT_UPDATE 0x00010000 /* not a real mount, just an update */
-#define MNT_DELEXPORT 0x00020000 /* delete export host lists */
-#define MNT_RELOAD 0x00040000 /* reload filesystem data */
-#define MNT_FORCE 0x00080000 /* force unmount or readonly change */
-#define MNT_MLOCK 0x00100000 /* lock so that subtree is stable */
-#define MNT_MWAIT 0x00200000 /* someone is waiting for lock */
-#define MNT_MPBUSY 0x00400000 /* scan of mount point in progress */
-#define MNT_MPWANT 0x00800000 /* waiting for mount point */
-#define MNT_UNMOUNT 0x01000000 /* unmount in progress */
-#define MNT_WANTRDWR 0x02000000 /* want upgrade to read/write */
-
-/*
- * used to get configured filesystems information
- */
-#define VFS_MAXNAMELEN 32
-struct vfsconf {
- void *vfc_vfsops;
- char vfc_name[VFS_MAXNAMELEN];
- int vfc_index;
- int vfc_refcount;
- int vfc_flags;
-};
-
-/*
- * NB: these flags refer to IMPLEMENTATION properties, not properties of
- * any actual mounts; i.e., it does not make sense to change the flags.
- */
-#define VFCF_STATIC 0x00000001 /* statically compiled into kernel */
-#define VFCF_NETWORK 0x00000002 /* may get data over the network */
-#define VFCF_READONLY 0x00000004 /* writes are not implemented */
-#define VFCF_SYNTHETIC 0x00000008 /* data does not represent real files */
-#define VFCF_LOOPBACK 0x00000010 /* aliases some other mounted FS */
-#define VFCF_UNICODE 0x00000020 /* stores file names as Unicode*/
-
-/*
- * Operations supported on mounted file system.
- */
-#ifdef KERNEL
-
-extern int doforce; /* Flag to permit forcible unmounting. */
-extern struct vfsconf void_vfsconf;
-extern struct vfsconf *vfsconf[];
-
-#ifdef __STDC__
-struct nameidata;
-struct mbuf;
-#endif
-
-struct vfsops {
- int (*vfs_mount) __P((struct mount *mp, char *path, caddr_t data,
- struct nameidata *ndp, struct proc *p));
- int (*vfs_start) __P((struct mount *mp, int flags,
- struct proc *p));
- int (*vfs_unmount) __P((struct mount *mp, int mntflags,
- struct proc *p));
- int (*vfs_root) __P((struct mount *mp, struct vnode **vpp));
- int (*vfs_quotactl) __P((struct mount *mp, int cmds, uid_t uid,
- caddr_t arg, struct proc *p));
- int (*vfs_statfs) __P((struct mount *mp, struct statfs *sbp,
- struct proc *p));
- int (*vfs_sync) __P((struct mount *mp, int waitfor,
- struct ucred *cred, struct proc *p));
- int (*vfs_vget) __P((struct mount *mp, ino_t ino,
- struct vnode **vpp));
- int (*vfs_fhtovp) __P((struct mount *mp, struct fid *fhp,
- struct mbuf *nam, struct vnode **vpp,
- int *exflagsp, struct ucred **credanonp));
- int (*vfs_vptofh) __P((struct vnode *vp, struct fid *fhp));
- int (*vfs_init) __P((void));
-};
-
-#define VFS_MOUNT(MP, PATH, DATA, NDP, P) \
- (*(MP)->mnt_op->vfs_mount)(MP, PATH, DATA, NDP, P)
-#define VFS_START(MP, FLAGS, P) (*(MP)->mnt_op->vfs_start)(MP, FLAGS, P)
-#define VFS_UNMOUNT(MP, FORCE, P) (*(MP)->mnt_op->vfs_unmount)(MP, FORCE, P)
-#define VFS_ROOT(MP, VPP) (*(MP)->mnt_op->vfs_root)(MP, VPP)
-#define VFS_QUOTACTL(MP,C,U,A,P) (*(MP)->mnt_op->vfs_quotactl)(MP, C, U, A, P)
-#define VFS_STATFS(MP, SBP, P) (*(MP)->mnt_op->vfs_statfs)(MP, SBP, P)
-#define VFS_SYNC(MP, WAIT, C, P) (*(MP)->mnt_op->vfs_sync)(MP, WAIT, C, P)
-#define VFS_VGET(MP, INO, VPP) (*(MP)->mnt_op->vfs_vget)(MP, INO, VPP)
-#define VFS_FHTOVP(MP, FIDP, NAM, VPP, EXFLG, CRED) \
- (*(MP)->mnt_op->vfs_fhtovp)(MP, FIDP, NAM, VPP, EXFLG, CRED)
-#define VFS_VPTOFH(VP, FIDP) (*(VP)->v_mount->mnt_op->vfs_vptofh)(VP, FIDP)
-
-#ifdef VFS_LKM
-#include <sys/conf.h>
-#include <sys/exec.h>
-#include <sys/sysent.h>
-#include <sys/lkm.h>
-
-#define VFS_SET(vfsops, fsname, index, flags) \
- static struct vfsconf _fs_vfsconf = { \
- &vfsops, \
- #fsname, \
- index, \
- 0, \
- flags \
- }; \
- extern struct linker_set MODVNOPS; \
- MOD_VFS(#fsname,index,&MODVNOPS,&_fs_vfsconf); \
- int \
- fsname ## _mod(struct lkm_table *lkmtp, int cmd, int ver) { \
- DISPATCH(lkmtp, cmd, ver, lkm_nullcmd, lkm_nullcmd, lkm_nullcmd); }
-#else
-
-#define VFS_SET(vfsops, fsname, index, flags) \
- static struct vfsconf _fs_vfsconf = { \
- &vfsops, \
- #fsname, \
- index, \
- 0, \
- flags | VFCF_STATIC \
- }; \
- DATA_SET(vfs_set,_fs_vfsconf)
-#endif /* VFS_LKM */
-
-#endif /* KERNEL */
-
-/*
- * Flags for various system call interfaces.
- *
- * waitfor flags to vfs_sync() and getfsstat()
- */
-#define MNT_WAIT 1
-#define MNT_NOWAIT 2
-
-/*
- * Generic file handle
- */
-struct fhandle {
- fsid_t fh_fsid; /* File system id of mount point */
- struct fid fh_fid; /* File sys specific id */
-};
-typedef struct fhandle fhandle_t;
-
-#ifdef KERNEL
-#include <net/radix.h>
-#include <sys/socket.h> /* XXX for AF_MAX */
-
-/*
- * Network address lookup element
- */
-struct netcred {
- struct radix_node netc_rnodes[2];
- int netc_exflags;
- struct ucred netc_anon;
-};
-
-/*
- * Network export information
- */
-struct netexport {
- struct netcred ne_defexported; /* Default export */
- struct radix_node_head *ne_rtable[AF_MAX+1]; /* Individual exports */
-};
-#endif /* KERNEL */
-
-/*
- * Export arguments for local filesystem mount calls.
- */
-struct export_args {
- int ex_flags; /* export related flags */
- uid_t ex_root; /* mapping for root uid */
- struct ucred ex_anon; /* mapping for anonymous user */
- struct sockaddr *ex_addr; /* net address to which exported */
- int ex_addrlen; /* and the net address length */
- struct sockaddr *ex_mask; /* mask of valid bits in saddr */
- int ex_masklen; /* and the smask length */
-};
-
-/*
- * Arguments to mount UFS-based filesystems
- */
-struct ufs_args {
- char *fspec; /* block special device to mount */
- struct export_args export; /* network export information */
-};
-
-#ifdef MFS
-/*
- * Arguments to mount MFS
- */
-struct mfs_args {
- char *fspec; /* name to export for statfs */
- struct export_args export; /* if exported MFSes are supported */
- caddr_t base; /* base of file system in memory */
- u_long size; /* size of file system */
-};
-#endif /* MFS */
-
-#ifdef MSDOSFS
-/*
- * Arguments to mount MSDOS filesystems.
- */
-struct msdosfs_args {
- char *fspec; /* blocks special holding the fs to mount */
- struct export_args export; /* network export information */
- uid_t uid; /* uid that owns msdosfs files */
- gid_t gid; /* gid that owns msdosfs files */
- mode_t mask; /* mask to be applied for msdosfs perms */
-};
-#endif
-
-#ifdef CD9660
-/*
- * Arguments to mount ISO 9660 filesystems.
- */
-struct iso_args {
- char *fspec; /* block special device to mount */
- struct export_args export; /* network export info */
- int flags; /* mounting flags, see below */
- int ssector; /* starting sector */
-
-};
-#define ISOFSMNT_NORRIP 0x00000001 /* disable Rock Ridge Ext.*/
-#define ISOFSMNT_GENS 0x00000002 /* enable generation numbers */
-#define ISOFSMNT_EXTATT 0x00000004 /* enable extended attributes */
-#endif /* CD9660 */
-
-#ifdef NFS
-/*
- * Arguments to mount NFS
- */
-struct nfs_args {
- struct sockaddr *addr; /* file server address */
- int addrlen; /* length of address */
- int sotype; /* Socket type */
- int proto; /* and Protocol */
- u_char *fh; /* File handle to be mounted */
- int fhsize; /* Size, in bytes, of fh */
- int flags; /* flags */
- int wsize; /* write size in bytes */
- int rsize; /* read size in bytes */
- int readdirsize; /* readdir size in bytes */
- int timeo; /* initial timeout in .1 secs */
- int retrans; /* times to retry send */
- int maxgrouplist; /* Max. size of group list */
- int readahead; /* # of blocks to readahead */
- int leaseterm; /* Term (sec) of lease */
- int deadthresh; /* Retrans threshold */
- char *hostname; /* server's name */
-};
-
-/*
- * NFS mount option flags
- */
-#define NFSMNT_SOFT 0x00000001 /* soft mount (hard is default) */
-#define NFSMNT_WSIZE 0x00000002 /* set write size */
-#define NFSMNT_RSIZE 0x00000004 /* set read size */
-#define NFSMNT_TIMEO 0x00000008 /* set initial timeout */
-#define NFSMNT_RETRANS 0x00000010 /* set number of request retrys */
-#define NFSMNT_MAXGRPS 0x00000020 /* set maximum grouplist size */
-#define NFSMNT_INT 0x00000040 /* allow interrupts on hard mount */
-#define NFSMNT_NOCONN 0x00000080 /* Don't Connect the socket */
-#define NFSMNT_NQNFS 0x00000100 /* Use Nqnfs protocol */
-#define NFSMNT_NFSV3 0x00000200 /* Use NFS Version 3 protocol */
-#define NFSMNT_KERB 0x00000400 /* Use Kerberos authentication */
-#define NFSMNT_DUMBTIMR 0x00000800 /* Don't estimate rtt dynamically */
-#define NFSMNT_LEASETERM 0x00001000 /* set lease term (nqnfs) */
-#define NFSMNT_READAHEAD 0x00002000 /* set read ahead */
-#define NFSMNT_DEADTHRESH 0x00004000 /* set dead server retry thresh */
-#define NFSMNT_RESVPORT 0x00008000 /* Allocate a reserved port */
-#define NFSMNT_RDIRPLUS 0x00010000 /* Use Readdirplus for V3 */
-#define NFSMNT_READDIRSIZE 0x00020000 /* Set readdir size */
-#define NFSMNT_INTERNAL 0xfffc0000 /* Bits set internally */
-#define NFSMNT_HASWRITEVERF 0x00040000 /* Has write verifier for V3 */
-#define NFSMNT_GOTPATHCONF 0x00080000 /* Got the V3 pathconf info */
-#define NFSMNT_GOTFSINFO 0x00100000 /* Got the V3 fsinfo */
-#define NFSMNT_MNTD 0x00200000 /* Mnt server for mnt point */
-#define NFSMNT_DISMINPROG 0x00400000 /* Dismount in progress */
-#define NFSMNT_DISMNT 0x00800000 /* Dismounted */
-#define NFSMNT_SNDLOCK 0x01000000 /* Send socket lock */
-#define NFSMNT_WANTSND 0x02000000 /* Want above */
-#define NFSMNT_RCVLOCK 0x04000000 /* Rcv socket lock */
-#define NFSMNT_WANTRCV 0x08000000 /* Want above */
-#define NFSMNT_WAITAUTH 0x10000000 /* Wait for authentication */
-#define NFSMNT_HASAUTH 0x20000000 /* Has authenticator */
-#define NFSMNT_WANTAUTH 0x40000000 /* Wants an authenticator */
-#define NFSMNT_AUTHERR 0x80000000 /* Authentication error */
-#endif /* NFS */
-
-#ifdef KERNEL
-extern int (*mountroot) __P((void *));
-extern struct vfsops *mountrootvfsops;
-
-/*
- * exported vnode operations
- */
-int dounmount __P((struct mount *, int, struct proc *));
-struct mount *getvfs __P((fsid_t *)); /* return vfs given fsid */
-void getnewfsid __P((struct mount *, int));
-int vflush __P((struct mount *, struct vnode *, int));
-int vfs_export /* process mount export info */
- __P((struct mount *, struct netexport *, struct export_args *));
-struct netcred *vfs_export_lookup /* lookup host in fs export list */
- __P((struct mount *, struct netexport *, struct mbuf *));
-int vfs_lock __P((struct mount *)); /* lock a vfs */
-int vfs_mountedon __P((struct vnode *)); /* is a vfs mounted on vp */
-int vfs_mountroot __P((void *)); /* XXX goes away? */
-void vfs_msync __P((struct mount *, int));
-void vfs_unlock __P((struct mount *)); /* unlock a vfs */
-void vfs_unmountall __P((void));
-int vfs_busy __P((struct mount *)); /* mark a vfs busy */
-void vfs_unbusy __P((struct mount *)); /* mark a vfs not busy */
-extern CIRCLEQ_HEAD(mntlist, mount) mountlist; /* mounted filesystem list */
-extern struct vfsops *vfssw[]; /* filesystem type table */
-
-#else /* KERNEL */
-
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-int fstatfs __P((int, struct statfs *));
-int getfh __P((const char *, fhandle_t *));
-int getfsstat __P((struct statfs *, long, int));
-int getmntinfo __P((struct statfs **, int));
-int mount __P((int, const char *, int, void *));
-int statfs __P((const char *, struct statfs *));
-int unmount __P((const char *, int));
-
-/* C library stuff */
-struct vfsconf *getvfsbyname __P((const char *));
-struct vfsconf *getvfsbytype __P((int));
-struct vfsconf *getvfsent __P((void));
-void setvfsent __P((int));
-void endvfsent __P((void));
-int vfsisloadable __P((const char *));
-int vfsload __P((const char *));
-__END_DECLS
-
-#endif /* KERNEL */
-
-#endif /* !_SYS_MOUNT_H_ */
diff --git a/cpukit/libnetworking/sys/param.h b/cpukit/libnetworking/sys/param.h
deleted file mode 100644
index 21a9758520..0000000000
--- a/cpukit/libnetworking/sys/param.h
+++ /dev/null
@@ -1,231 +0,0 @@
-/*-
- * Copyright (c) 1982, 1986, 1989, 1993
- * The Regents of the University of California. All rights reserved.
- * (c) UNIX System Laboratories, Inc.
- * All or some portions of this file are derived from material licensed
- * to the University of California by American Telephone and Telegraph
- * Co. or Unix System Laboratories, Inc. and are reproduced herein with
- * the permission of UNIX System Laboratories, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)param.h 8.3 (Berkeley) 4/4/95
- * $Id$
- */
-
-#ifndef _SYS_PARAM_H_
-#define _SYS_PARAM_H_
-
-#include <unistd.h>
-
-#define BSD 199506 /* System version (year & month). */
-#define BSD4_3 1
-#define BSD4_4 1
-
-#ifndef NULL
-#define NULL 0
-#endif
-
-#ifndef LOCORE
-#include <sys/types.h>
-#endif
-
-/*
- * Machine-independent constants (some used in following include files).
- * Redefined constants are from POSIX 1003.1 limits file.
- *
- * MAXCOMLEN should be >= sizeof(ac_comm) (see <acct.h>)
- * MAXLOGNAME should be >= UT_NAMESIZE (see <utmp.h>)
- */
-#include <sys/syslimits.h>
-
-#define MAXCOMLEN 16 /* max command name remembered */
-#define MAXINTERP 32 /* max interpreter file name length */
-#define MAXLOGNAME 12 /* max login name length */
-#define MAXUPRC CHILD_MAX /* max simultaneous processes */
-#define NCARGS ARG_MAX /* max bytes for an exec function */
-#define NGROUPS NGROUPS_MAX /* max number groups */
-#define NOFILE OPEN_MAX /* max open files per process */
-#define NOGROUP 65535 /* marker for empty group set member */
-#define MAXHOSTNAMELEN 256 /* max hostname size */
-
-/* More types and definitions used throughout the kernel. */
-#ifdef KERNEL
-#include <sys/cdefs.h>
-#include <sys/errno.h>
-#include <sys/time.h>
-#include <sys/resource.h>
-#include <sys/ucred.h>
-#include <sys/uio.h>
-#include <sys/rtprio.h>
-
-#ifndef FALSE
-#define FALSE 0
-#endif
-#ifndef TRUE
-#define TRUE 1
-#endif
-#endif
-
-/* Signals. */
-#include <sys/signal.h>
-
-/* Machine type dependent parameters. */
-#include <machine/param.h>
-#include <machine/limits.h>
-
-/*
- * Priorities. Note that with 32 run queues, differences less than 4 are
- * insignificant.
- */
-#define PSWP 0
-#define PVM 4
-#define PINOD 8
-#define PRIBIO 16
-#define PVFS 20
-#define PZERO 22 /* No longer magic, shouldn't be here. XXX */
-#define PSOCK 24
-#define PWAIT 32
-#define PLOCK 36
-#define PPAUSE 40
-#define PUSER 50
-#define MAXPRI 127 /* Priorities range from 0 through MAXPRI. */
-
-#define PRIMASK 0x0ff
-#define PCATCH 0x100 /* OR'd with pri for tsleep to check signals */
-
-#define NZERO 0 /* default "nice" */
-
-#define NBPW sizeof(int) /* number of bytes per word (integer) */
-
-#define CMASK 022 /* default file mask: S_IWGRP|S_IWOTH */
-#define NODEV (dev_t)(-1) /* non-existent device */
-
-/*
- * Clustering of hardware pages on machines with ridiculously small
- * page sizes is done here. The paging subsystem deals with units of
- * CLSIZE pte's describing PAGE_SIZE (from machine/machparam.h) pages each.
- */
-#if 0
-#define CLBYTES (CLSIZE*PAGE_SIZE)
-#endif
-
-#define CBLOCK 128 /* Clist block size, must be a power of 2. */
-#define CBQSIZE (CBLOCK/NBBY) /* Quote bytes/cblock - can do better. */
- /* Data chars/clist. */
-#define CBSIZE (CBLOCK - sizeof(struct cblock *) - CBQSIZE)
-#define CROUND (CBLOCK - 1) /* Clist rounding. */
-
-/*
- * File system parameters and macros.
- *
- * The file system is made out of blocks of at most MAXBSIZE units, with
- * smaller units (fragments) only in the last direct block. MAXBSIZE
- * primarily determines the size of buffers in the buffer pool. It may be
- * made larger without any effect on existing file systems; however making
- * it smaller make make some file systems unmountable. Also, MAXBSIZE
- * must be less than MAXPHYS!!! DFLTBSIZE is the average amount of
- * memory allocated by vfs_bio per nbuf. BKVASIZE is the average amount
- * of kernel virtual space allocated per nbuf. BKVASIZE should be >=
- * DFLTBSIZE. If it is significantly bigger than DFLTBSIZE, then
- * kva fragmentation causes fewer performance problems.
- */
-#define MAXBSIZE 65536
-#define BKVASIZE 8192
-#define DFLTBSIZE 4096
-#define MAXFRAG 8
-
-/*
- * MAXPATHLEN defines the longest permissible path length after expanding
- * symbolic links. It is used to allocate a temporary buffer from the buffer
- * pool in which to do the name expansion, hence should be a power of two,
- * and must be less than or equal to MAXBSIZE. MAXSYMLINKS defines the
- * maximum number of symbolic links that may be expanded in a path name.
- * It should be set high enough to allow all legitimate uses, but halt
- * infinite loops reasonably quickly.
- */
-#if !defined(__rtems__)
-#define MAXPATHLEN PATH_MAX
-#endif
-#define MAXSYMLINKS 32
-
-/* Bit map related macros. */
-#define setbit(a,i) ((a)[(i)/NBBY] |= 1<<((i)%NBBY))
-#define clrbit(a,i) ((a)[(i)/NBBY] &= ~(1<<((i)%NBBY)))
-#define isset(a,i) ((a)[(i)/NBBY] & (1<<((i)%NBBY)))
-#define isclr(a,i) (((a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0)
-
-/* Macros for counting and rounding. */
-#ifndef howmany
-#define howmany(x, y) (((x)+((y)-1))/(y))
-#endif
-#define rounddown(x, y) (((x)/(y))*(y))
-#define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) /* to any y */
-#define roundup2(x, y) (((x)+((y)-1))&(~((y)-1))) /* if y is powers of two */
-#define powerof2(x) ((((x)-1)&(x))==0)
-
-/* Macros for min/max. */
-#ifndef KERNEL
-#define MIN(a,b) (((a)<(b))?(a):(b))
-#define MAX(a,b) (((a)>(b))?(a):(b))
-#endif
-
-/*
- * Constants for setting the parameters of the kernel memory allocator.
- *
- * 2 ** MINBUCKET is the smallest unit of memory that will be
- * allocated. It must be at least large enough to hold a pointer.
- *
- * Units of memory less or equal to MAXALLOCSAVE will permanently
- * allocate physical memory; requests for these size pieces of
- * memory are quite fast. Allocations greater than MAXALLOCSAVE must
- * always allocate and free physical memory; requests for these
- * size allocations should be done infrequently as they will be slow.
- *
- * Constraints: PAGE_SIZE <= MAXALLOCSAVE <= 2 ** (MINBUCKET + 14), and
- * MAXALLOCSIZE must be a power of two.
- */
-#define MINBUCKET 4 /* 4 => min allocation of 16 bytes */
-#define MAXALLOCSAVE (2 * PAGE_SIZE)
-
-/*
- * Scale factor for scaled integers used to count %cpu time and load avgs.
- *
- * The number of CPU `tick's that map to a unique `%age' can be expressed
- * by the formula (1 / (2 ^ (FSHIFT - 11))). The maximum load average that
- * can be calculated (assuming 32 bits) can be closely approximated using
- * the formula (2 ^ (2 * (16 - FSHIFT))) for (FSHIFT < 15).
- *
- * For the scheduler to maintain a 1:1 mapping of CPU `tick' to `%age',
- * FSHIFT must be at least 11; this gives us a maximum load avg of ~1024.
- */
-#define FSHIFT 11 /* bits to right of fixed binary point */
-#define FSCALE (1<<FSHIFT)
-
-#endif /* _SYS_PARAM_H_ */
diff --git a/cpukit/libnetworking/sys/proc.h b/cpukit/libnetworking/sys/proc.h
deleted file mode 100644
index 2189a33b11..0000000000
--- a/cpukit/libnetworking/sys/proc.h
+++ /dev/null
@@ -1,8 +0,0 @@
-/*
- * Dummy structure
- *
- * $Id$
- */
-struct proc {
- int this_should_never_be_referenced;
-};
diff --git a/cpukit/libnetworking/sys/protosw.h b/cpukit/libnetworking/sys/protosw.h
deleted file mode 100644
index a7aa52feea..0000000000
--- a/cpukit/libnetworking/sys/protosw.h
+++ /dev/null
@@ -1,300 +0,0 @@
-/*-
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)protosw.h 8.1 (Berkeley) 6/2/93
- * $Id$
- */
-
-#ifndef _SYS_PROTOSW_H_
-#define _SYS_PROTOSW_H_
-
-struct ifnet;
-struct mbuf;
-struct sockaddr;
-struct socket;
-struct sockproto;
-struct stat;
-
-/*
- * Protocol switch table.
- *
- * Each protocol has a handle initializing one of these structures,
- * which is used for protocol-protocol and system-protocol communication.
- *
- * A protocol is called through the pr_init entry before any other.
- * Thereafter it is called every 200ms through the pr_fasttimo entry and
- * every 500ms through the pr_slowtimo for timer based actions.
- * The system will call the pr_drain entry if it is low on space and
- * this should throw away any non-critical data.
- *
- * Protocols pass data between themselves as chains of mbufs using
- * the pr_input and pr_output hooks. Pr_input passes data up (towards
- * UNIX) and pr_output passes it down (towards the imps); control
- * information passes up and down on pr_ctlinput and pr_ctloutput.
- * The protocol is responsible for the space occupied by any the
- * arguments to these entries and must dispose it.
- *
- * The userreq routine interfaces protocols to the system and is
- * described below.
- */
-struct protosw {
- short pr_type; /* socket type used for */
- struct domain *pr_domain; /* domain protocol a member of */
- short pr_protocol; /* protocol number */
- short pr_flags; /* see below */
-/* protocol-protocol hooks */
- void (*pr_input) __P((struct mbuf *, int len));
- /* input to protocol (from below) */
- int (*pr_output) __P((struct mbuf *m, struct socket *so));
- /* output to protocol (from above) */
- void (*pr_ctlinput)__P((int, struct sockaddr *, void *));
- /* control input (from below) */
- int (*pr_ctloutput)__P((int, struct socket *, int, int,
- struct mbuf **));
- /* control output (from above) */
-/* user-protocol hook */
- int (*pr_ousrreq) __P((struct socket *, int, struct mbuf *,
- struct mbuf *, struct mbuf *));
- /* user request: see list below */
-/* utility hooks */
- void (*pr_init) __P((void)); /* initialization hook */
- void (*pr_fasttimo) __P((void));
- /* fast timeout (200ms) */
- void (*pr_slowtimo) __P((void));
- /* slow timeout (500ms) */
- void (*pr_drain) __P((void));
- /* flush any excess space possible */
- struct pr_usrreqs *pr_usrreqs; /* supersedes pr_usrreq() */
-};
-
-#define PR_SLOWHZ 2 /* 2 slow timeouts per second */
-#define PR_FASTHZ 5 /* 5 fast timeouts per second */
-
-/*
- * Values for pr_flags.
- * PR_ADDR requires PR_ATOMIC;
- * PR_ADDR and PR_CONNREQUIRED are mutually exclusive.
- * PR_IMPLOPCL means that the protocol allows sendto without prior connect,
- * and the protocol understands the MSG_EOF flag. The first property is
- * is only relevant if PR_CONNREQUIRED is set (otherwise sendto is allowed
- * anyhow).
- */
-#define PR_ATOMIC 0x01 /* exchange atomic messages only */
-#define PR_ADDR 0x02 /* addresses given with messages */
-#define PR_CONNREQUIRED 0x04 /* connection required by protocol */
-#define PR_WANTRCVD 0x08 /* want PRU_RCVD calls */
-#define PR_RIGHTS 0x10 /* passes capabilities */
-#define PR_IMPLOPCL 0x20 /* implied open/close */
-
-/*
- * The arguments to usrreq are:
- * (*protosw[].pr_usrreq)(up, req, m, nam, opt);
- * where up is a (struct socket *), req is one of these requests,
- * m is a optional mbuf chain containing a message,
- * nam is an optional mbuf chain containing an address,
- * and opt is a pointer to a socketopt structure or nil.
- * The protocol is responsible for disposal of the mbuf chain m,
- * the caller is responsible for any space held by nam and opt.
- * A non-zero return from usrreq gives an
- * UNIX error number which should be passed to higher level software.
- */
-#define PRU_ATTACH 0 /* attach protocol to up */
-#define PRU_DETACH 1 /* detach protocol from up */
-#define PRU_BIND 2 /* bind socket to address */
-#define PRU_LISTEN 3 /* listen for connection */
-#define PRU_CONNECT 4 /* establish connection to peer */
-#define PRU_ACCEPT 5 /* accept connection from peer */
-#define PRU_DISCONNECT 6 /* disconnect from peer */
-#define PRU_SHUTDOWN 7 /* won't send any more data */
-#define PRU_RCVD 8 /* have taken data; more room now */
-#define PRU_SEND 9 /* send this data */
-#define PRU_ABORT 10 /* abort (fast DISCONNECT, DETATCH) */
-#define PRU_CONTROL 11 /* control operations on protocol */
-#define PRU_SENSE 12 /* return status into m */
-#define PRU_RCVOOB 13 /* retrieve out of band data */
-#define PRU_SENDOOB 14 /* send out of band data */
-#define PRU_SOCKADDR 15 /* fetch socket's address */
-#define PRU_PEERADDR 16 /* fetch peer's address */
-#define PRU_CONNECT2 17 /* connect two sockets */
-/* begin for protocols internal use */
-#define PRU_FASTTIMO 18 /* 200ms timeout */
-#define PRU_SLOWTIMO 19 /* 500ms timeout */
-#define PRU_PROTORCV 20 /* receive from below */
-#define PRU_PROTOSEND 21 /* send to below */
-/* end for protocol's internal use */
-#define PRU_SEND_EOF 22 /* send and close */
-#define PRU_NREQ 22
-
-#ifdef PRUREQUESTS
-char *prurequests[] = {
- "ATTACH", "DETACH", "BIND", "LISTEN",
- "CONNECT", "ACCEPT", "DISCONNECT", "SHUTDOWN",
- "RCVD", "SEND", "ABORT", "CONTROL",
- "SENSE", "RCVOOB", "SENDOOB", "SOCKADDR",
- "PEERADDR", "CONNECT2", "FASTTIMO", "SLOWTIMO",
- "PROTORCV", "PROTOSEND",
- "SEND_EOF",
-};
-#endif
-
-#ifdef KERNEL /* users shouldn't see this decl */
-struct stat;
-struct ifnet;
-
-/*
- * If the ordering here looks odd, that's because it's alphabetical.
- */
-struct pr_usrreqs {
- int (*pru_abort) __P((struct socket *so));
- int (*pru_accept) __P((struct socket *so, struct mbuf *nam));
- int (*pru_attach) __P((struct socket *so, int proto));
- int (*pru_bind) __P((struct socket *so, struct mbuf *nam));
- int (*pru_connect) __P((struct socket *so, struct mbuf *nam));
- int (*pru_connect2) __P((struct socket *so1, struct socket *so2));
- int (*pru_control) __P((struct socket *so, int cmd, caddr_t data,
- struct ifnet *ifp));
- int (*pru_detach) __P((struct socket *so));
- int (*pru_disconnect) __P((struct socket *so));
- int (*pru_listen) __P((struct socket *so));
- int (*pru_peeraddr) __P((struct socket *so, struct mbuf *nam));
- int (*pru_rcvd) __P((struct socket *so, int flags));
- int (*pru_rcvoob) __P((struct socket *so, struct mbuf *m,
- int flags));
- /*
- * The `m' parameter here is almost certainly going to become a
- * `struct uio' at some point in the future. Similar changes
- * will probably happen for the receive entry points.
- */
- int (*pru_send) __P((struct socket *so, int flags, struct mbuf *m,
- struct mbuf *addr, struct mbuf *control));
-#define PRUS_OOB 0x1
-#define PRUS_EOF 0x2
- int (*pru_sense) __P((struct socket *so, struct stat *sb));
- int (*pru_shutdown) __P((struct socket *so));
- int (*pru_sockaddr) __P((struct socket *so, struct mbuf *nam));
-};
-
-int pru_accept_notsupp __P((struct socket *so, struct mbuf *nam));
-int pru_connect2_notsupp __P((struct socket *so1, struct socket *so2));
-int pru_control_notsupp __P((struct socket *so, int cmd, caddr_t data,
- struct ifnet *ifp));
-int pru_listen_notsupp __P((struct socket *so));
-int pru_rcvd_notsupp __P((struct socket *so, int flags));
-int pru_rcvoob_notsupp __P((struct socket *so, struct mbuf *m, int flags));
-int pru_sense_null __P((struct socket *so, struct stat *sb));
-
-#define PRU_OLDSTYLE
-
-#ifdef PRU_OLDSTYLE
-/*
- * Protocols which don't yet implement pr_usrreqs can point it to this
- * structure, which will call the old pr_usrreq() entry point with the
- * appropriate arguments.
- */
-extern struct pr_usrreqs pru_oldstyle;
-#endif /* PRU_OLDSTYLE */
-
-#endif /* KERNEL */
-
-/*
- * The arguments to the ctlinput routine are
- * (*protosw[].pr_ctlinput)(cmd, sa, arg);
- * where cmd is one of the commands below, sa is a pointer to a sockaddr,
- * and arg is a `void *' argument used within a protocol family.
- */
-#define PRC_IFDOWN 0 /* interface transition */
-#define PRC_ROUTEDEAD 1 /* select new route if possible ??? */
-#define PRC_QUENCH2 3 /* DEC congestion bit says slow down */
-#define PRC_QUENCH 4 /* some one said to slow down */
-#define PRC_MSGSIZE 5 /* message size forced drop */
-#define PRC_HOSTDEAD 6 /* host appears to be down */
-#define PRC_HOSTUNREACH 7 /* deprecated (use PRC_UNREACH_HOST) */
-#define PRC_UNREACH_NET 8 /* no route to network */
-#define PRC_UNREACH_HOST 9 /* no route to host */
-#define PRC_UNREACH_PROTOCOL 10 /* dst says bad protocol */
-#define PRC_UNREACH_PORT 11 /* bad port # */
-/* was PRC_UNREACH_NEEDFRAG 12 (use PRC_MSGSIZE) */
-#define PRC_UNREACH_SRCFAIL 13 /* source route failed */
-#define PRC_REDIRECT_NET 14 /* net routing redirect */
-#define PRC_REDIRECT_HOST 15 /* host routing redirect */
-#define PRC_REDIRECT_TOSNET 16 /* redirect for type of service & net */
-#define PRC_REDIRECT_TOSHOST 17 /* redirect for tos & host */
-#define PRC_TIMXCEED_INTRANS 18 /* packet lifetime expired in transit */
-#define PRC_TIMXCEED_REASS 19 /* lifetime expired on reass q */
-#define PRC_PARAMPROB 20 /* header incorrect */
-
-#define PRC_NCMDS 21
-
-#define PRC_IS_REDIRECT(cmd) \
- ((cmd) >= PRC_REDIRECT_NET && (cmd) <= PRC_REDIRECT_TOSHOST)
-
-#ifdef PRCREQUESTS
-char *prcrequests[] = {
- "IFDOWN", "ROUTEDEAD", "#2", "DEC-BIT-QUENCH2",
- "QUENCH", "MSGSIZE", "HOSTDEAD", "#7",
- "NET-UNREACH", "HOST-UNREACH", "PROTO-UNREACH", "PORT-UNREACH",
- "#12", "SRCFAIL-UNREACH", "NET-REDIRECT", "HOST-REDIRECT",
- "TOSNET-REDIRECT", "TOSHOST-REDIRECT", "TX-INTRANS", "TX-REASS",
- "PARAMPROB"
-};
-#endif
-
-/*
- * The arguments to ctloutput are:
- * (*protosw[].pr_ctloutput)(req, so, level, optname, optval);
- * req is one of the actions listed below, so is a (struct socket *),
- * level is an indication of which protocol layer the option is intended.
- * optname is a protocol dependent socket option request,
- * optval is a pointer to a mbuf-chain pointer, for value-return results.
- * The protocol is responsible for disposal of the mbuf chain *optval
- * if supplied,
- * the caller is responsible for any space held by *optval, when returned.
- * A non-zero return from usrreq gives an
- * UNIX error number which should be passed to higher level software.
- */
-#define PRCO_GETOPT 0
-#define PRCO_SETOPT 1
-
-#define PRCO_NCMDS 2
-
-#ifdef PRCOREQUESTS
-char *prcorequests[] = {
- "GETOPT", "SETOPT",
-};
-#endif
-
-#ifdef KERNEL
-struct protosw *pffindproto __P((int family, int protocol, int type));
-struct protosw *pffindtype __P((int family, int type));
-#endif
-
-#endif
diff --git a/cpukit/libnetworking/sys/queue.h b/cpukit/libnetworking/sys/queue.h
deleted file mode 100644
index e8aa08cf5d..0000000000
--- a/cpukit/libnetworking/sys/queue.h
+++ /dev/null
@@ -1,446 +0,0 @@
-/*
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)queue.h 8.5 (Berkeley) 8/20/94
- * $Id$
- */
-
-#ifndef _SYS_QUEUE_H_
-#define _SYS_QUEUE_H_
-
-/*
- * This file defines five types of data structures: singly-linked lists,
- * slingly-linked tail queues, lists, tail queues, and circular queues.
- *
- * A singly-linked list is headed by a single forward pointer. The elements
- * are singly linked for minimum space and pointer manipulation overhead at
- * the expense of O(n) removal for arbitrary elements. New elements can be
- * added to the list after an existing element or at the head of the list.
- * Elements being removed from the head of the list should use the explicit
- * macro for this purpose for optimum efficiency. A singly-linked list may
- * only be traversed in the forward direction. Singly-linked lists are ideal
- * for applications with large datasets and few or no removals or for
- * implementing a LIFO queue.
- *
- * A singly-linked tail queue is headed by a pair of pointers, one to the
- * head of the list and the other to the tail of the list. The elements are
- * singly linked for minimum space and pointer manipulation overhead at the
- * expense of O(n) removal for arbitrary elements. New elements can be added
- * to the list after an existing element, at the head of the list, or at the
- * end of the list. Elements being removed from the head of the tail queue
- * should use the explicit macro for this purpose for optimum efficiency.
- * A singly-linked tail queue may only be traversed in the forward direction.
- * Singly-linked tail queues are ideal for applications with large datasets
- * and few or no removals or for implementing a FIFO queue.
- *
- * A list is headed by a single forward pointer (or an array of forward
- * pointers for a hash table header). The elements are doubly linked
- * so that an arbitrary element can be removed without a need to
- * traverse the list. New elements can be added to the list before
- * or after an existing element or at the head of the list. A list
- * may only be traversed in the forward direction.
- *
- * A tail queue is headed by a pair of pointers, one to the head of the
- * list and the other to the tail of the list. The elements are doubly
- * linked so that an arbitrary element can be removed without a need to
- * traverse the list. New elements can be added to the list before or
- * after an existing element, at the head of the list, or at the end of
- * the list. A tail queue may only be traversed in the forward direction.
- *
- * A circle queue is headed by a pair of pointers, one to the head of the
- * list and the other to the tail of the list. The elements are doubly
- * linked so that an arbitrary element can be removed without a need to
- * traverse the list. New elements can be added to the list before or after
- * an existing element, at the head of the list, or at the end of the list.
- * A circle queue may be traversed in either direction, but has a more
- * complex end of list detection.
- *
- * For details on the use of these macros, see the queue(3) manual page.
- */
-
-/*
- * Singly-linked List definitions.
- */
-#define SLIST_HEAD(name, type) \
-struct name { \
- struct type *slh_first; /* first element */ \
-}
-
-#define SLIST_ENTRY(type) \
-struct { \
- struct type *sle_next; /* next element */ \
-}
-
-/*
- * Singly-linked List functions.
- */
-#define SLIST_INIT(head) { \
- (head)->slh_first = NULL; \
-}
-
-#define SLIST_INSERT_AFTER(slistelm, elm, field) { \
- (elm)->field.sle_next = (slistelm)->field.sle_next; \
- (slistelm)->field.sle_next = (elm); \
-}
-
-#define SLIST_INSERT_HEAD(head, elm, field) { \
- (elm)->field.sle_next = (head)->slh_first; \
- (head)->slh_first = (elm); \
-}
-
-#define SLIST_REMOVE_HEAD(head, field) { \
- (head)->slh_first = (head)->slh_first->field.sle_next; \
-}
-
-#define SLIST_REMOVE(head, elm, type, field) { \
- if ((head)->slh_first == (elm)) { \
- SLIST_REMOVE_HEAD((head), field); \
- } \
- else { \
- struct type *curelm = (head)->slh_first; \
- while( curelm->field.sle_next != (elm) ) \
- curelm = curelm->field.sle_next; \
- curelm->field.sle_next = \
- curelm->field.sle_next->field.sle_next; \
- } \
-}
-
-/*
- * Singly-linked Tail queue definitions.
- */
-#define STAILQ_HEAD(name, type) \
-struct name { \
- struct type *stqh_first;/* first element */ \
- struct type **stqh_last;/* addr of last next element */ \
-}
-
-#define STAILQ_ENTRY(type) \
-struct { \
- struct type *stqe_next; /* next element */ \
-}
-
-/*
- * Singly-linked Tail queue functions.
- */
-#define STAILQ_INIT(head) { \
- (head)->stqh_first = NULL; \
- (head)->stqh_last = &(head)->stqh_first; \
-}
-
-#define STAILQ_INSERT_HEAD(head, elm, field) { \
- if (((elm)->field.stqe_next = (head)->stqh_first) == NULL) \
- (head)->stqh_last = &(elm)->field.stqe_next; \
- (head)->stqh_first = (elm); \
-}
-
-#define STAILQ_INSERT_TAIL(head, elm, field) { \
- (elm)->field.stqe_next = NULL; \
- *(head)->stqh_last = (elm); \
- (head)->stqh_last = &(elm)->field.stqe_next; \
-}
-
-#define STAILQ_INSERT_AFTER(head, tqelm, elm, field) { \
- if (((elm)->field.stqe_next = (tqelm)->field.stqe_next) == NULL)\
- (head)->stqh_last = &(elm)->field.stqe_next; \
- (tqelm)->field.stqe_next = (elm); \
-}
-
-#define STAILQ_REMOVE_HEAD(head, field) { \
- if (((head)->stqh_first = \
- (head)->stqh_first->field.stqe_next) == NULL) \
- (head)->stqh_last = &(head)->stqh_first; \
-}
-
-#define STAILQ_REMOVE(head, elm, type, field) { \
- if ((head)->stqh_first == (elm)) { \
- STAILQ_REMOVE_HEAD(head, field); \
- } \
- else { \
- struct type *curelm = (head)->stqh_first; \
- while( curelm->field.stqe_next != (elm) ) \
- curelm = curelm->field.stqe_next; \
- if((curelm->field.stqe_next = \
- curelm->field.stqe_next->field.stqe_next) == NULL) \
- (head)->stqh_last = &(curelm)->field.stqe_next; \
- } \
-}
-
-/*
- * List definitions.
- */
-#define LIST_HEAD(name, type) \
-struct name { \
- struct type *lh_first; /* first element */ \
-}
-
-#define LIST_ENTRY(type) \
-struct { \
- struct type *le_next; /* next element */ \
- struct type **le_prev; /* address of previous next element */ \
-}
-
-/*
- * List functions.
- */
-#define LIST_INIT(head) { \
- (head)->lh_first = NULL; \
-}
-
-#define LIST_INSERT_AFTER(listelm, elm, field) { \
- if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \
- (listelm)->field.le_next->field.le_prev = \
- &(elm)->field.le_next; \
- (listelm)->field.le_next = (elm); \
- (elm)->field.le_prev = &(listelm)->field.le_next; \
-}
-
-#define LIST_INSERT_BEFORE(listelm, elm, field) { \
- (elm)->field.le_prev = (listelm)->field.le_prev; \
- (elm)->field.le_next = (listelm); \
- *(listelm)->field.le_prev = (elm); \
- (listelm)->field.le_prev = &(elm)->field.le_next; \
-}
-
-#define LIST_INSERT_HEAD(head, elm, field) { \
- if (((elm)->field.le_next = (head)->lh_first) != NULL) \
- (head)->lh_first->field.le_prev = &(elm)->field.le_next;\
- (head)->lh_first = (elm); \
- (elm)->field.le_prev = &(head)->lh_first; \
-}
-
-#define LIST_REMOVE(elm, field) { \
- if ((elm)->field.le_next != NULL) \
- (elm)->field.le_next->field.le_prev = \
- (elm)->field.le_prev; \
- *(elm)->field.le_prev = (elm)->field.le_next; \
-}
-
-/*
- * Tail queue definitions.
- */
-#define TAILQ_HEAD(name, type) \
-struct name { \
- struct type *tqh_first; /* first element */ \
- struct type **tqh_last; /* addr of last next element */ \
-}
-
-#define TAILQ_HEAD_INITIALIZER(head) \
- { NULL, &(head).tqh_first }
-
-#define TAILQ_ENTRY(type) \
-struct { \
- struct type *tqe_next; /* next element */ \
- struct type **tqe_prev; /* address of previous next element */ \
-}
-
-/*
- * Tail queue functions.
- */
-#define TAILQ_EMPTY(head) ((head)->tqh_first == NULL)
-
-#define TAILQ_FIRST(head) ((head)->tqh_first)
-
-#define TAILQ_LAST(head) ((head)->tqh_last)
-
-#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next)
-
-#define TAILQ_PREV(elm, field) ((elm)->field.tqe_prev)
-
-#define TAILQ_INIT(head) { \
- (head)->tqh_first = NULL; \
- (head)->tqh_last = &(head)->tqh_first; \
-}
-
-#define TAILQ_INSERT_HEAD(head, elm, field) { \
- if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \
- (head)->tqh_first->field.tqe_prev = \
- &(elm)->field.tqe_next; \
- else \
- (head)->tqh_last = &(elm)->field.tqe_next; \
- (head)->tqh_first = (elm); \
- (elm)->field.tqe_prev = &(head)->tqh_first; \
-}
-
-#define TAILQ_INSERT_TAIL(head, elm, field) { \
- (elm)->field.tqe_next = NULL; \
- (elm)->field.tqe_prev = (head)->tqh_last; \
- *(head)->tqh_last = (elm); \
- (head)->tqh_last = &(elm)->field.tqe_next; \
-}
-
-#define TAILQ_INSERT_AFTER(head, listelm, elm, field) { \
- if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\
- (elm)->field.tqe_next->field.tqe_prev = \
- &(elm)->field.tqe_next; \
- else \
- (head)->tqh_last = &(elm)->field.tqe_next; \
- (listelm)->field.tqe_next = (elm); \
- (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \
-}
-
-#define TAILQ_INSERT_BEFORE(listelm, elm, field) { \
- (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \
- (elm)->field.tqe_next = (listelm); \
- *(listelm)->field.tqe_prev = (elm); \
- (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \
-}
-
-#define TAILQ_REMOVE(head, elm, field) { \
- if (((elm)->field.tqe_next) != NULL) \
- (elm)->field.tqe_next->field.tqe_prev = \
- (elm)->field.tqe_prev; \
- else \
- (head)->tqh_last = (elm)->field.tqe_prev; \
- *(elm)->field.tqe_prev = (elm)->field.tqe_next; \
-}
-
-/*
- * Circular queue definitions.
- */
-#define CIRCLEQ_HEAD(name, type) \
-struct name { \
- struct type *cqh_first; /* first element */ \
- struct type *cqh_last; /* last element */ \
-}
-
-#define CIRCLEQ_ENTRY(type) \
-struct { \
- struct type *cqe_next; /* next element */ \
- struct type *cqe_prev; /* previous element */ \
-}
-
-/*
- * Circular queue functions.
- */
-#define CIRCLEQ_INIT(head) { \
- (head)->cqh_first = (void *)(head); \
- (head)->cqh_last = (void *)(head); \
-}
-
-#define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) { \
- (elm)->field.cqe_next = (listelm)->field.cqe_next; \
- (elm)->field.cqe_prev = (listelm); \
- if ((listelm)->field.cqe_next == (void *)(head)) \
- (head)->cqh_last = (elm); \
- else \
- (listelm)->field.cqe_next->field.cqe_prev = (elm); \
- (listelm)->field.cqe_next = (elm); \
-}
-
-#define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) { \
- (elm)->field.cqe_next = (listelm); \
- (elm)->field.cqe_prev = (listelm)->field.cqe_prev; \
- if ((listelm)->field.cqe_prev == (void *)(head)) \
- (head)->cqh_first = (elm); \
- else \
- (listelm)->field.cqe_prev->field.cqe_next = (elm); \
- (listelm)->field.cqe_prev = (elm); \
-}
-
-#define CIRCLEQ_INSERT_HEAD(head, elm, field) { \
- (elm)->field.cqe_next = (head)->cqh_first; \
- (elm)->field.cqe_prev = (void *)(head); \
- if ((head)->cqh_last == (void *)(head)) \
- (head)->cqh_last = (elm); \
- else \
- (head)->cqh_first->field.cqe_prev = (elm); \
- (head)->cqh_first = (elm); \
-}
-
-#define CIRCLEQ_INSERT_TAIL(head, elm, field) { \
- (elm)->field.cqe_next = (void *)(head); \
- (elm)->field.cqe_prev = (head)->cqh_last; \
- if ((head)->cqh_first == (void *)(head)) \
- (head)->cqh_first = (elm); \
- else \
- (head)->cqh_last->field.cqe_next = (elm); \
- (head)->cqh_last = (elm); \
-}
-
-#define CIRCLEQ_REMOVE(head, elm, field) { \
- if ((elm)->field.cqe_next == (void *)(head)) \
- (head)->cqh_last = (elm)->field.cqe_prev; \
- else \
- (elm)->field.cqe_next->field.cqe_prev = \
- (elm)->field.cqe_prev; \
- if ((elm)->field.cqe_prev == (void *)(head)) \
- (head)->cqh_first = (elm)->field.cqe_next; \
- else \
- (elm)->field.cqe_prev->field.cqe_next = \
- (elm)->field.cqe_next; \
-}
-
-#ifdef KERNEL
-
-/*
- * XXX insque() and remque() are an old way of handling certain queues.
- * They bogusly assumes that all queue heads look alike.
- */
-
-struct quehead {
- struct quehead *qh_link;
- struct quehead *qh_rlink;
-};
-
-#ifdef __GNUC__
-
-static __inline void
-insque(void *a, void *b)
-{
- struct quehead *element = a, *head = b;
-
- element->qh_link = head->qh_link;
- element->qh_rlink = head;
- head->qh_link = element;
- element->qh_link->qh_rlink = element;
-}
-
-static __inline void
-remque(void *a)
-{
- struct quehead *element = a;
-
- element->qh_link->qh_rlink = element->qh_rlink;
- element->qh_rlink->qh_link = element->qh_link;
- element->qh_rlink = 0;
-}
-
-#else /* !__GNUC__ */
-
-void insque __P((void *a, void *b));
-void remque __P((void *a));
-
-#endif /* __GNUC__ */
-
-#endif /* KERNEL */
-
-#endif /* !_SYS_QUEUE_H_ */
diff --git a/cpukit/libnetworking/sys/reboot.h b/cpukit/libnetworking/sys/reboot.h
deleted file mode 100644
index 48a7f0f782..0000000000
--- a/cpukit/libnetworking/sys/reboot.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1988, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)reboot.h 8.3 (Berkeley) 12/13/94
- * $Id$
- */
-
-#ifndef _SYS_REBOOT_H_
-#define _SYS_REBOOT_H_
-
-/*
- * Arguments to reboot system call. These are passed to
- * the boot program and on to init.
- */
-#define RB_AUTOBOOT 0 /* flags for system auto-booting itself */
-
-#define RB_ASKNAME 0x001 /* ask for file name to reboot from */
-#define RB_SINGLE 0x002 /* reboot to single user only */
-#define RB_NOSYNC 0x004 /* dont sync before reboot */
-#define RB_HALT 0x008 /* don't reboot, just halt */
-#define RB_INITNAME 0x010 /* name given for /etc/init (unused) */
-#define RB_DFLTROOT 0x020 /* use compiled-in rootdev */
-#define RB_KDB 0x040 /* give control to kernel debugger */
-#define RB_RDONLY 0x080 /* mount root fs read-only */
-#define RB_DUMP 0x100 /* dump kernel memory before reboot */
-#define RB_MINIROOT 0x200 /* mini-root present in memory at boot time */
-#define RB_CONFIG 0x400 /* invoke user configuration routing */
-#define RB_VERBOSE 0x800 /* print all potentially useful info */
-#define RB_SERIAL 0x1000 /* user serial port as console */
-#define RB_CDROM 0x2000 /* use cdrom as root */
-#define RB_POWEROFF 0x4000 /* if you can, turn the power off */
-#define RB_GDB 0x8000 /* use GDB remote debugger instead of DDB */
-#define RB_MUTE 0x10000 /* Come up with the console muted */
-#define RB_SELFTEST 0x20000 /* don't boot to normal operation, do selftest */
-
-#define RB_BOOTINFO 0x80000000 /* have `struct bootinfo *' arg */
-
-/*
- * Constants for converting boot-style device number to type,
- * adaptor (uba, mba, etc), unit number and partition number.
- * Type (== major device number) is in the low byte
- * for backward compatibility. Except for that of the "magic
- * number", each mask applies to the shifted value.
- * Format:
- * (4) (4) (4) (4) (8) (8)
- * --------------------------------
- * |MA | AD| CT| UN| PART | TYPE |
- * --------------------------------
- */
-#define B_ADAPTORSHIFT 24
-#define B_ADAPTORMASK 0x0f
-#define B_ADAPTOR(val) (((val) >> B_ADAPTORSHIFT) & B_ADAPTORMASK)
-#define B_CONTROLLERSHIFT 20
-#define B_CONTROLLERMASK 0xf
-#define B_CONTROLLER(val) (((val)>>B_CONTROLLERSHIFT) & B_CONTROLLERMASK)
-#define B_SLICESHIFT 20
-#define B_SLICEMASK 0xff
-#define B_SLICE(val) (((val)>>B_SLICESHIFT) & B_SLICEMASK)
-#define B_UNITSHIFT 16
-#define B_UNITMASK 0xf
-#define B_UNIT(val) (((val) >> B_UNITSHIFT) & B_UNITMASK)
-#define B_PARTITIONSHIFT 8
-#define B_PARTITIONMASK 0xff
-#define B_PARTITION(val) (((val) >> B_PARTITIONSHIFT) & B_PARTITIONMASK)
-#define B_TYPESHIFT 0
-#define B_TYPEMASK 0xff
-#define B_TYPE(val) (((val) >> B_TYPESHIFT) & B_TYPEMASK)
-
-#define B_MAGICMASK 0xf0000000
-#define B_DEVMAGIC 0xa0000000
-
-#define MAKEBOOTDEV(type, adaptor, controller, unit, partition) \
- (((type) << B_TYPESHIFT) | ((adaptor) << B_ADAPTORSHIFT) | \
- ((controller) << B_CONTROLLERSHIFT) | ((unit) << B_UNITSHIFT) | \
- ((partition) << B_PARTITIONSHIFT) | B_DEVMAGIC)
-
-#endif
diff --git a/cpukit/libnetworking/sys/resourcevar.h b/cpukit/libnetworking/sys/resourcevar.h
deleted file mode 100644
index 2b4c47e48f..0000000000
--- a/cpukit/libnetworking/sys/resourcevar.h
+++ /dev/null
@@ -1,5 +0,0 @@
-/*
- * $Id$
- */
-
-/* intentionally empty file */
diff --git a/cpukit/libnetworking/sys/rtprio.h b/cpukit/libnetworking/sys/rtprio.h
deleted file mode 100644
index dd9521e7c8..0000000000
--- a/cpukit/libnetworking/sys/rtprio.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 1994, Henrik Vestergaard Draboel
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by (name).
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#ifndef _SYS_RTPRIO_H_
-#define _SYS_RTPRIO_H_
-
-/*
- * Process realtime-priority specifications to rtprio.
- */
-
-/* priority types */
-#define RTP_PRIO_REALTIME 0
-#define RTP_PRIO_NORMAL 1
-#define RTP_PRIO_IDLE 2
-
-/* priority range */
-#define RTP_PRIO_MIN 0 /* Highest priority */
-#define RTP_PRIO_MAX 31 /* Lowest priority */
-
-/*
- * rtprio() syscall functions
- */
-#define RTP_LOOKUP 0
-#define RTP_SET 1
-
-#ifndef LOCORE
-struct rtprio {
- u_short type;
- u_short prio;
-};
-#endif
-
-#ifndef KERNEL
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-int rtprio __P((int, pid_t, struct rtprio *));
-__END_DECLS
-#endif /* !KERNEL */
-#endif /* !_SYS_RTPRIO_H_ */
diff --git a/cpukit/libnetworking/sys/select.h b/cpukit/libnetworking/sys/select.h
deleted file mode 100644
index e69971e3b6..0000000000
--- a/cpukit/libnetworking/sys/select.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)select.h 8.2 (Berkeley) 1/4/94
- * $Id$
- */
-
-#ifndef _SYS_SELECT_H_
-#define _SYS_SELECT_H_
-
-/*
- * Used to maintain information about processes that wish to be
- * notified when I/O becomes possible.
- */
-struct selinfo {
- pid_t si_pid; /* process to be notified */
- short si_flags; /* see below */
-};
-#define SI_COLL 0x0001 /* collision occurred */
-
-#ifdef KERNEL
-struct proc;
-
-void selrecord __P((struct proc *selector, struct selinfo *));
-void selwakeup __P((struct selinfo *));
-#endif
-
-#endif /* !_SYS_SELECT_H_ */
diff --git a/cpukit/libnetworking/sys/signalvar.h b/cpukit/libnetworking/sys/signalvar.h
deleted file mode 100644
index 8900458fdb..0000000000
--- a/cpukit/libnetworking/sys/signalvar.h
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)signalvar.h 8.6 (Berkeley) 2/19/95
- * $Id$
- */
-
-#ifndef _SYS_SIGNALVAR_H_ /* tmp for user.h */
-#define _SYS_SIGNALVAR_H_
-
-/*
- * Kernel signal definitions and data structures,
- * not exported to user programs.
- */
-
-/*
- * Process signal actions and state, needed only within the process
- * (not necessarily resident).
- */
-struct sigacts {
- sig_t ps_sigact[NSIG]; /* disposition of signals */
- sigset_t ps_catchmask[NSIG]; /* signals to be blocked */
- sigset_t ps_sigonstack; /* signals to take on sigstack */
- sigset_t ps_sigintr; /* signals that interrupt syscalls */
- sigset_t ps_sigreset; /* signals that reset when caught */
- sigset_t ps_signodefer; /* signals not masked while handled */
- sigset_t ps_oldmask; /* saved mask from before sigpause */
- int ps_flags; /* signal flags, below */
- struct sigaltstack ps_sigstk; /* sp & on stack state variable */
- int ps_sig; /* for core dump/debugger XXX */
- u_long ps_code; /* for core dump/debugger XXX */
- sigset_t ps_usertramp; /* SunOS compat; libc sigtramp XXX */
-};
-
-/* signal flags */
-#define SAS_OLDMASK 0x01 /* need to restore mask before pause */
-#define SAS_ALTSTACK 0x02 /* have alternate signal stack */
-
-/* additional signal action values, used only temporarily/internally */
-#define SIG_CATCH ((__sighandler_t *)2)
-#define SIG_HOLD ((__sighandler_t *)3)
-
-/*
- * get signal action for process and signal; currently only for current process
- */
-#define SIGACTION(p, sig) (p->p_sigacts->ps_sigact[(sig)])
-
-/*
- * Determine signal that should be delivered to process p, the current
- * process, 0 if none. If there is a pending stop signal with default
- * action, the process stops in issignal().
- */
-#define CURSIG(p) \
- (((p)->p_siglist == 0 || \
- (((p)->p_flag & P_TRACED) == 0 && \
- ((p)->p_siglist & ~(p)->p_sigmask) == 0)) ? \
- 0 : issignal(p))
-
-/*
- * Clear a pending signal from a process.
- */
-#define CLRSIG(p, sig) { (p)->p_siglist &= ~sigmask(sig); }
-
-/*
- * Signal properties and actions.
- * The array below categorizes the signals and their default actions
- * according to the following properties:
- */
-#define SA_KILL 0x01 /* terminates process by default */
-#define SA_CORE 0x02 /* ditto and coredumps */
-#define SA_STOP 0x04 /* suspend process */
-#define SA_TTYSTOP 0x08 /* ditto, from tty */
-#define SA_IGNORE 0x10 /* ignore by default */
-#define SA_CONT 0x20 /* continue if suspended */
-#define SA_CANTMASK 0x40 /* non-maskable, catchable */
-
-#ifdef SIGPROP
-static int sigprop[NSIG + 1] = {
- 0, /* unused */
- SA_KILL, /* SIGHUP */
- SA_KILL, /* SIGINT */
- SA_KILL|SA_CORE, /* SIGQUIT */
- SA_KILL|SA_CORE, /* SIGILL */
- SA_KILL|SA_CORE, /* SIGTRAP */
- SA_KILL|SA_CORE, /* SIGABRT */
- SA_KILL|SA_CORE, /* SIGEMT */
- SA_KILL|SA_CORE, /* SIGFPE */
- SA_KILL, /* SIGKILL */
- SA_KILL|SA_CORE, /* SIGBUS */
- SA_KILL|SA_CORE, /* SIGSEGV */
- SA_KILL|SA_CORE, /* SIGSYS */
- SA_KILL, /* SIGPIPE */
- SA_KILL, /* SIGALRM */
- SA_KILL, /* SIGTERM */
- SA_IGNORE, /* SIGURG */
- SA_STOP, /* SIGSTOP */
- SA_STOP|SA_TTYSTOP, /* SIGTSTP */
- SA_IGNORE|SA_CONT, /* SIGCONT */
- SA_IGNORE, /* SIGCHLD */
- SA_STOP|SA_TTYSTOP, /* SIGTTIN */
- SA_STOP|SA_TTYSTOP, /* SIGTTOU */
- SA_IGNORE, /* SIGIO */
- SA_KILL, /* SIGXCPU */
- SA_KILL, /* SIGXFSZ */
- SA_KILL, /* SIGVTALRM */
- SA_KILL, /* SIGPROF */
- SA_IGNORE, /* SIGWINCH */
- SA_IGNORE, /* SIGINFO */
- SA_KILL, /* SIGUSR1 */
- SA_KILL, /* SIGUSR2 */
-};
-
-#define contsigmask (sigmask(SIGCONT))
-#define stopsigmask (sigmask(SIGSTOP) | sigmask(SIGTSTP) | \
- sigmask(SIGTTIN) | sigmask(SIGTTOU))
-
-#endif /* SIGPROP */
-
-#define sigcantmask (sigmask(SIGKILL) | sigmask(SIGSTOP))
-
-#ifdef KERNEL
-/*
- * Machine-independent functions:
- */
-void execsigs __P((struct proc *p));
-void gsignal __P((int pgid, int sig));
-int issignal __P((struct proc *p));
-void killproc __P((struct proc *p, char *why));
-void pgsignal __P((struct pgrp *pgrp, int sig, int checkctty));
-void postsig __P((int sig));
-void psignal __P((struct proc *p, int sig));
-void setsigvec __P((struct proc *p, int signum, struct sigaction *sa));
-void sigexit __P((struct proc *p, int signum));
-void siginit __P((struct proc *p));
-void trapsignal __P((struct proc *p, int sig, u_long code));
-
-/*
- * Machine-dependent functions:
- */
-void sendsig __P((sig_t action, int sig, int returnmask, u_long code));
-#endif /* KERNEL */
-#endif /* !_SYS_SIGNALVAR_H_ */
diff --git a/cpukit/libnetworking/sys/socket.h b/cpukit/libnetworking/sys/socket.h
deleted file mode 100644
index 6442581db6..0000000000
--- a/cpukit/libnetworking/sys/socket.h
+++ /dev/null
@@ -1,371 +0,0 @@
-/*
- * Copyright (c) 1982, 1985, 1986, 1988, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)socket.h 8.4 (Berkeley) 2/21/94
- * $Id$
- */
-
-#ifndef _SYS_SOCKET_H_
-#define _SYS_SOCKET_H_
-
-#include <sys/cdefs.h>
-
-/*
- * Definitions related to sockets: types, address families, options.
- */
-
-/*
- * Types
- */
-#define SOCK_STREAM 1 /* stream socket */
-#define SOCK_DGRAM 2 /* datagram socket */
-#define SOCK_RAW 3 /* raw-protocol interface */
-#define SOCK_RDM 4 /* reliably-delivered message */
-#define SOCK_SEQPACKET 5 /* sequenced packet stream */
-
-/*
- * Option flags per-socket.
- */
-#define SO_DEBUG 0x0001 /* turn on debugging info recording */
-#define SO_ACCEPTCONN 0x0002 /* socket has had listen() */
-#define SO_REUSEADDR 0x0004 /* allow local address reuse */
-#define SO_KEEPALIVE 0x0008 /* keep connections alive */
-#define SO_DONTROUTE 0x0010 /* just use interface addresses */
-#define SO_BROADCAST 0x0020 /* permit sending of broadcast msgs */
-#define SO_USELOOPBACK 0x0040 /* bypass hardware when possible */
-#define SO_LINGER 0x0080 /* linger on close if data present */
-#define SO_OOBINLINE 0x0100 /* leave received OOB data in line */
-#define SO_REUSEPORT 0x0200 /* allow local address & port reuse */
-#define SO_TIMESTAMP 0x0400 /* timestamp received dgram traffic */
-
-/*
- * Additional options, not kept in so_options.
- */
-#define SO_SNDBUF 0x1001 /* send buffer size */
-#define SO_RCVBUF 0x1002 /* receive buffer size */
-#define SO_SNDLOWAT 0x1003 /* send low-water mark */
-#define SO_RCVLOWAT 0x1004 /* receive low-water mark */
-#define SO_SNDTIMEO 0x1005 /* send timeout */
-#define SO_RCVTIMEO 0x1006 /* receive timeout */
-#define SO_ERROR 0x1007 /* get error status and clear */
-#define SO_TYPE 0x1008 /* get socket type */
-#define SO_PRIVSTATE 0x1009 /* get/deny privileged state */
-
-/*
- * RTEMS addition: get and set wakeup functions.
- */
-#define SO_SNDWAKEUP 0x1020 /* wakeup when ready to send */
-#define SO_RCVWAKEUP 0x1021 /* wakeup when ready to receive */
-
-/*
- * Structure used for manipulating linger option.
- */
-struct linger {
- int l_onoff; /* option on/off */
- int l_linger; /* linger time */
-};
-
-/*
- * RTEMS addition: structure used to get and set wakeup function.
- */
-struct socket;
-struct sockwakeup {
- void (*sw_pfn) __P((struct socket *, caddr_t));
- caddr_t sw_arg;
-};
-
-/*
- * Level number for (get/set)sockopt() to apply to socket itself.
- */
-#define SOL_SOCKET 0xffff /* options for socket level */
-
-/*
- * Address families.
- */
-#define AF_UNSPEC 0 /* unspecified */
-#define AF_LOCAL 1 /* local to host (pipes, portals) */
-#define AF_UNIX AF_LOCAL /* backward compatibility */
-#define AF_INET 2 /* internetwork: UDP, TCP, etc. */
-#define AF_IMPLINK 3 /* arpanet imp addresses */
-#define AF_PUP 4 /* pup protocols: e.g. BSP */
-#define AF_CHAOS 5 /* mit CHAOS protocols */
-#define AF_NS 6 /* XEROX NS protocols */
-#define AF_ISO 7 /* ISO protocols */
-#define AF_OSI AF_ISO
-#define AF_ECMA 8 /* European computer manufacturers */
-#define AF_DATAKIT 9 /* datakit protocols */
-#define AF_CCITT 10 /* CCITT protocols, X.25 etc */
-#define AF_SNA 11 /* IBM SNA */
-#define AF_DECnet 12 /* DECnet */
-#define AF_DLI 13 /* DEC Direct data link interface */
-#define AF_LAT 14 /* LAT */
-#define AF_HYLINK 15 /* NSC Hyperchannel */
-#define AF_APPLETALK 16 /* Apple Talk */
-#define AF_ROUTE 17 /* Internal Routing Protocol */
-#define AF_LINK 18 /* Link layer interface */
-#define pseudo_AF_XTP 19 /* eXpress Transfer Protocol (no AF) */
-#define AF_COIP 20 /* connection-oriented IP, aka ST II */
-#define AF_CNT 21 /* Computer Network Technology */
-#define pseudo_AF_RTIP 22 /* Help Identify RTIP packets */
-#define AF_IPX 23 /* Novell Internet Protocol */
-#define AF_SIP 24 /* Simple Internet Protocol */
-#define pseudo_AF_PIP 25 /* Help Identify PIP packets */
-#define AF_ISDN 26 /* Integrated Services Digital Network*/
-#define AF_E164 AF_ISDN /* CCITT E.164 recommendation */
-#define pseudo_AF_KEY 27 /* Internal key-management function */
-#define AF_INET6 28 /* IPv6 */
-
-#define AF_MAX 29
-
-/*
- * Structure used by kernel to store most
- * addresses.
- */
-struct sockaddr {
- u_char sa_len; /* total length */
- u_char sa_family; /* address family */
- char sa_data[14]; /* actually longer; address value */
-};
-
-/*
- * Structure used by kernel to pass protocol
- * information in raw sockets.
- */
-struct sockproto {
- u_short sp_family; /* address family */
- u_short sp_protocol; /* protocol */
-};
-
-/*
- * Protocol families, same as address families for now.
- */
-#define PF_UNSPEC AF_UNSPEC
-#define PF_LOCAL AF_LOCAL
-#define PF_UNIX PF_LOCAL /* backward compatibility */
-#define PF_INET AF_INET
-#define PF_IMPLINK AF_IMPLINK
-#define PF_PUP AF_PUP
-#define PF_CHAOS AF_CHAOS
-#define PF_NS AF_NS
-#define PF_ISO AF_ISO
-#define PF_OSI AF_ISO
-#define PF_ECMA AF_ECMA
-#define PF_DATAKIT AF_DATAKIT
-#define PF_CCITT AF_CCITT
-#define PF_SNA AF_SNA
-#define PF_DECnet AF_DECnet
-#define PF_DLI AF_DLI
-#define PF_LAT AF_LAT
-#define PF_HYLINK AF_HYLINK
-#define PF_APPLETALK AF_APPLETALK
-#define PF_ROUTE AF_ROUTE
-#define PF_LINK AF_LINK
-#define PF_XTP pseudo_AF_XTP /* really just proto family, no AF */
-#define PF_COIP AF_COIP
-#define PF_CNT AF_CNT
-#define PF_SIP AF_SIP
-#define PF_IPX AF_IPX /* same format as AF_NS */
-#define PF_RTIP pseudo_AF_RTIP /* same format as AF_INET */
-#define PF_PIP pseudo_AF_PIP
-#define PF_ISDN AF_ISDN
-#define PF_KEY pseudo_AF_KEY
-#define PF_INET6 AF_INET6
-
-#define PF_MAX AF_MAX
-
-/*
- * Definitions for network related sysctl, CTL_NET.
- *
- * Second level is protocol family.
- * Third level is protocol number.
- *
- * Further levels are defined by the individual families below.
- */
-#define NET_MAXID AF_MAX
-
-#define CTL_NET_NAMES { \
- { 0, 0 }, \
- { "unix", CTLTYPE_NODE }, \
- { "inet", CTLTYPE_NODE }, \
- { "implink", CTLTYPE_NODE }, \
- { "pup", CTLTYPE_NODE }, \
- { "chaos", CTLTYPE_NODE }, \
- { "xerox_ns", CTLTYPE_NODE }, \
- { "iso", CTLTYPE_NODE }, \
- { "emca", CTLTYPE_NODE }, \
- { "datakit", CTLTYPE_NODE }, \
- { "ccitt", CTLTYPE_NODE }, \
- { "ibm_sna", CTLTYPE_NODE }, \
- { "decnet", CTLTYPE_NODE }, \
- { "dec_dli", CTLTYPE_NODE }, \
- { "lat", CTLTYPE_NODE }, \
- { "hylink", CTLTYPE_NODE }, \
- { "appletalk", CTLTYPE_NODE }, \
- { "route", CTLTYPE_NODE }, \
- { "link_layer", CTLTYPE_NODE }, \
- { "xtp", CTLTYPE_NODE }, \
- { "coip", CTLTYPE_NODE }, \
- { "cnt", CTLTYPE_NODE }, \
- { "rtip", CTLTYPE_NODE }, \
- { "ipx", CTLTYPE_NODE }, \
- { "sip", CTLTYPE_NODE }, \
- { "pip", CTLTYPE_NODE }, \
- { "isdn", CTLTYPE_NODE }, \
- { "key", CTLTYPE_NODE }, \
-}
-
-/*
- * PF_ROUTE - Routing table
- *
- * Three additional levels are defined:
- * Fourth: address family, 0 is wildcard
- * Fifth: type of info, defined below
- * Sixth: flag(s) to mask with for NET_RT_FLAGS
- */
-#define NET_RT_DUMP 1 /* dump; may limit to a.f. */
-#define NET_RT_FLAGS 2 /* by flags, e.g. RESOLVING */
-#define NET_RT_IFLIST 3 /* survey interface list */
-#define NET_RT_MAXID 4
-
-#define CTL_NET_RT_NAMES { \
- { 0, 0 }, \
- { "dump", CTLTYPE_STRUCT }, \
- { "flags", CTLTYPE_STRUCT }, \
- { "iflist", CTLTYPE_STRUCT }, \
-}
-
-/*
- * Maximum queue length specifiable by listen.
- */
-#define SOMAXCONN 128
-
-/*
- * Message header for recvmsg and sendmsg calls.
- * Used value-result for recvmsg, value only for sendmsg.
- */
-struct msghdr {
- caddr_t msg_name; /* optional address */
- u_int msg_namelen; /* size of address */
- struct iovec *msg_iov; /* scatter/gather array */
- u_int msg_iovlen; /* # elements in msg_iov */
- caddr_t msg_control; /* ancillary data, see below */
- u_int msg_controllen; /* ancillary data buffer len */
- int msg_flags; /* flags on received message */
-};
-
-#define MSG_OOB 0x1 /* process out-of-band data */
-#define MSG_PEEK 0x2 /* peek at incoming message */
-#define MSG_DONTROUTE 0x4 /* send without using routing tables */
-#define MSG_EOR 0x8 /* data completes record */
-#define MSG_TRUNC 0x10 /* data discarded before delivery */
-#define MSG_CTRUNC 0x20 /* control data lost before delivery */
-#define MSG_WAITALL 0x40 /* wait for full request or error */
-#define MSG_DONTWAIT 0x80 /* this message should be nonblocking */
-#define MSG_EOF 0x100 /* data completes connection */
-#define MSG_COMPAT 0x8000 /* used in sendit() */
-
-/*
- * Header for ancillary data objects in msg_control buffer.
- * Used for additional information with/about a datagram
- * not expressible by flags. The format is a sequence
- * of message elements headed by cmsghdr structures.
- */
-struct cmsghdr {
- u_int cmsg_len; /* data byte count, including hdr */
- int cmsg_level; /* originating protocol */
- int cmsg_type; /* protocol-specific type */
-/* followed by u_char cmsg_data[]; */
-};
-
-/* given pointer to struct cmsghdr, return pointer to data */
-#define CMSG_DATA(cmsg) ((u_char *)((cmsg) + 1))
-
-/* given pointer to struct cmsghdr, return pointer to next cmsghdr */
-#define CMSG_NXTHDR(mhdr, cmsg) \
- (((caddr_t)(cmsg) + (cmsg)->cmsg_len + sizeof(struct cmsghdr) > \
- (mhdr)->msg_control + (mhdr)->msg_controllen) ? \
- (struct cmsghdr *)NULL : \
- (struct cmsghdr *)((caddr_t)(cmsg) + ALIGN((cmsg)->cmsg_len)))
-
-#define CMSG_FIRSTHDR(mhdr) ((struct cmsghdr *)(mhdr)->msg_control)
-
-/* "Socket"-level control message types: */
-#define SCM_RIGHTS 0x01 /* access rights (array of int) */
-#define SCM_TIMESTAMP 0x02 /* timestamp (struct timeval) */
-
-/*
- * 4.3 compat sockaddr, move to compat file later
- */
-struct osockaddr {
- u_short sa_family; /* address family */
- char sa_data[14]; /* up to 14 bytes of direct address */
-};
-
-/*
- * 4.3-compat message header (move to compat file later).
- */
-struct omsghdr {
- caddr_t msg_name; /* optional address */
- int msg_namelen; /* size of address */
- struct iovec *msg_iov; /* scatter/gather array */
- int msg_iovlen; /* # elements in msg_iov */
- caddr_t msg_accrights; /* access rights sent/received */
- int msg_accrightslen;
-};
-
-#ifndef KERNEL
-
-__BEGIN_DECLS
-int accept __P((int, struct sockaddr *, int *));
-int bind __P((int, const struct sockaddr *, int));
-int connect __P((int, const struct sockaddr *, int));
-int getpeername __P((int, struct sockaddr *, int *));
-int getsockname __P((int, struct sockaddr *, int *));
-int getsockopt __P((int, int, int, void *, int *));
-int listen __P((int, int));
-ssize_t recv __P((int, void *, size_t, int));
-ssize_t recvfrom __P((int, void *, size_t, int, struct sockaddr *, int *));
-ssize_t recvmsg __P((int, struct msghdr *, int));
-ssize_t send __P((int, const void *, size_t, int));
-ssize_t sendto __P((int, const void *,
- size_t, int, const struct sockaddr *, int));
-ssize_t sendmsg __P((int, const struct msghdr *, int));
-int setsockopt __P((int, int, int, const void *, int));
-int shutdown __P((int, int));
-int socket __P((int, int, int));
-int socketpair __P((int, int, int, int *));
-__END_DECLS
-
-#else /* KERNEL */
-void pfctlinput __P((int, struct sockaddr *));
-#endif /* !KERNEL */
-#endif /* !_SYS_SOCKET_H_ */
diff --git a/cpukit/libnetworking/sys/socketvar.h b/cpukit/libnetworking/sys/socketvar.h
deleted file mode 100644
index 5690defb43..0000000000
--- a/cpukit/libnetworking/sys/socketvar.h
+++ /dev/null
@@ -1,281 +0,0 @@
-/*-
- * Copyright (c) 1982, 1986, 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)socketvar.h 8.3 (Berkeley) 2/19/95
- * $Id$
- */
-
-#ifndef _SYS_SOCKETVAR_H_
-#define _SYS_SOCKETVAR_H_
-
-#include <sys/queue.h> /* for TAILQ macros */
-#include <sys/select.h> /* for struct selinfo */
-
-/*
- * Kernel structure per socket.
- * Contains send and receive buffer queues,
- * handle on protocol and pointer to protocol
- * private data and error information.
- */
-struct socket {
- short so_type; /* generic type, see socket.h */
- short so_options; /* from socket call, see socket.h */
- short so_linger; /* time to linger while closing */
- short so_state; /* internal state flags SS_*, below */
- caddr_t so_pcb; /* protocol control block */
- struct protosw *so_proto; /* protocol handle */
-/*
- * Variables for connection queuing.
- * Socket where accepts occur is so_head in all subsidiary sockets.
- * If so_head is 0, socket is not related to an accept.
- * For head socket so_q0 queues partially completed connections,
- * while so_q is a queue of connections ready to be accepted.
- * If a connection is aborted and it has so_head set, then
- * it has to be pulled out of either so_q0 or so_q.
- * We allow connections to queue up based on current queue lengths
- * and limit on number of queued connections for this socket.
- */
- struct socket *so_head; /* back pointer to accept socket */
- TAILQ_HEAD(, socket) so_incomp; /* queue of partial unaccepted connections */
- TAILQ_HEAD(, socket) so_comp; /* queue of complete unaccepted connections */
- TAILQ_ENTRY(socket) so_list; /* list of unaccepted connections */
- short so_qlen; /* number of unaccepted connections */
- short so_incqlen; /* number of unaccepted incomplete
- connections */
- short so_qlimit; /* max number queued connections */
- u_long so_timeo; /* connection timeout */
- u_short so_error; /* error affecting connection */
- pid_t so_pgid; /* pgid for signals */
- u_long so_oobmark; /* chars to oob mark */
-/*
- * Variables for socket buffering.
- */
- struct sockbuf {
- u_long sb_cc; /* actual chars in buffer */
- u_long sb_hiwat; /* max actual char count */
- u_long sb_mbcnt; /* chars of mbufs used */
- u_long sb_mbmax; /* max chars of mbufs to use */
- long sb_lowat; /* low water mark */
- struct mbuf *sb_mb; /* the mbuf chain */
- struct selinfo sb_sel; /* process selecting read/write */
- short sb_flags; /* flags, see below */
- u_long sb_timeo; /* timeout for read/write */
- void (*sb_wakeup) __P((struct socket *, caddr_t));
- caddr_t sb_wakeuparg; /* arg for above */
- } so_rcv, so_snd;
-#define SB_MAX (256*1024) /* default for max chars in sockbuf */
-#define SB_LOCK 0x01 /* lock on data queue */
-#define SB_WANT 0x02 /* someone is waiting to lock */
-#define SB_WAIT 0x04 /* someone is waiting for data/space */
-#define SB_SEL 0x08 /* someone is selecting */
-#define SB_ASYNC 0x10 /* ASYNC I/O, need signals */
-#define SB_NOTIFY (SB_WAIT|SB_SEL|SB_ASYNC)
-#define SB_NOINTR 0x40 /* operations not interruptible */
-
- caddr_t so_tpcb; /* Wisc. protocol control block XXX */
- void (*so_upcall) __P((struct socket *so, caddr_t arg, int waitf));
- caddr_t so_upcallarg; /* Arg for above */
- uid_t so_uid; /* who opened the socket */
-};
-
-/*
- * Socket state bits.
- */
-#define SS_NOFDREF 0x0001 /* no file table ref any more */
-#define SS_ISCONNECTED 0x0002 /* socket connected to a peer */
-#define SS_ISCONNECTING 0x0004 /* in process of connecting to peer */
-#define SS_ISDISCONNECTING 0x0008 /* in process of disconnecting */
-#define SS_CANTSENDMORE 0x0010 /* can't send more data to peer */
-#define SS_CANTRCVMORE 0x0020 /* can't receive more data from peer */
-#define SS_RCVATMARK 0x0040 /* at mark on input */
-
-#define SS_PRIV 0x0080 /* privileged for broadcast, raw... */
-#define SS_NBIO 0x0100 /* non-blocking ops */
-#define SS_ASYNC 0x0200 /* async i/o notify */
-#define SS_ISCONFIRMING 0x0400 /* deciding to accept connection req */
-
-#define SS_INCOMP 0x0800 /* unaccepted, incomplete connection */
-#define SS_COMP 0x1000 /* unaccepted, complete connection */
-
-
-/*
- * Macros for sockets and socket buffering.
- */
-
-/*
- * How much space is there in a socket buffer (so->so_snd or so->so_rcv)?
- * This is problematical if the fields are unsigned, as the space might
- * still be negative (cc > hiwat or mbcnt > mbmax). Should detect
- * overflow and return 0. Should use "lmin" but it doesn't exist now.
- */
-#define sbspace(sb) \
- ((long) imin((int)((sb)->sb_hiwat - (sb)->sb_cc), \
- (int)((sb)->sb_mbmax - (sb)->sb_mbcnt)))
-
-/* do we have to send all at once on a socket? */
-#define sosendallatonce(so) \
- ((so)->so_proto->pr_flags & PR_ATOMIC)
-
-/* can we read something from so? */
-#define soreadable(so) \
- ((so)->so_rcv.sb_cc >= (so)->so_rcv.sb_lowat || \
- ((so)->so_state & SS_CANTRCVMORE) || \
- (so)->so_comp.tqh_first || (so)->so_error)
-
-/* can we write something to so? */
-#define sowriteable(so) \
- ((sbspace(&(so)->so_snd) >= (so)->so_snd.sb_lowat && \
- (((so)->so_state&SS_ISCONNECTED) || \
- ((so)->so_proto->pr_flags&PR_CONNREQUIRED)==0)) || \
- ((so)->so_state & SS_CANTSENDMORE) || \
- (so)->so_error)
-
-/* adjust counters in sb reflecting allocation of m */
-#define sballoc(sb, m) { \
- (sb)->sb_cc += (m)->m_len; \
- (sb)->sb_mbcnt += MSIZE; \
- if ((m)->m_flags & M_EXT) \
- (sb)->sb_mbcnt += (m)->m_ext.ext_size; \
-}
-
-/* adjust counters in sb reflecting freeing of m */
-#define sbfree(sb, m) { \
- (sb)->sb_cc -= (m)->m_len; \
- (sb)->sb_mbcnt -= MSIZE; \
- if ((m)->m_flags & M_EXT) \
- (sb)->sb_mbcnt -= (m)->m_ext.ext_size; \
-}
-
-/*
- * Set lock on sockbuf sb; sleep if lock is already held.
- * Unless SB_NOINTR is set on sockbuf, sleep is interruptible.
- * Returns error without lock if sleep is interrupted.
- */
-#define sblock(sb, wf) ((sb)->sb_flags & SB_LOCK ? \
- (((wf) == M_WAITOK) ? sb_lock(sb) : EWOULDBLOCK) : \
- ((sb)->sb_flags |= SB_LOCK), 0)
-
-/* release lock on sockbuf sb */
-#define sbunlock(sb) { \
- (sb)->sb_flags &= ~SB_LOCK; \
- if ((sb)->sb_flags & SB_WANT) { \
- (sb)->sb_flags &= ~SB_WANT; \
- wakeup((caddr_t)&(sb)->sb_flags); \
- } \
-}
-
-#define sorwakeup(so) { sowakeup((so), &(so)->so_rcv); \
- if ((so)->so_upcall) \
- (*((so)->so_upcall))((so), (so)->so_upcallarg, M_DONTWAIT); \
- }
-
-#define sowwakeup(so) sowakeup((so), &(so)->so_snd)
-
-#ifdef KERNEL
-extern u_long sb_max;
-
-/* to catch callers missing new second argument to sonewconn: */
-#define sonewconn(head, connstatus) sonewconn1((head), (connstatus))
-
-struct filedesc;
-struct mbuf;
-struct sockaddr;
-struct stat;
-
-/*
- * File operations on sockets.
- */
-int soo_ioctl __P((struct file *fp, int cmd, caddr_t data,
- struct proc *p));
-int soo_select __P((struct file *fp, int which, struct proc *p));
-int soo_stat __P((struct socket *so, struct stat *ub));
-
-/*
- * From uipc_socket and friends
- */
-int getsock __P((struct filedesc *fdp, int fdes, struct file **fpp));
-int sockargs __P((struct mbuf **mp, caddr_t buf, int buflen, int type));
-void sbappend __P((struct sockbuf *sb, struct mbuf *m));
-int sbappendaddr __P((struct sockbuf *sb, struct sockaddr *asa,
- struct mbuf *m0, struct mbuf *control));
-int sbappendcontrol __P((struct sockbuf *sb, struct mbuf *m0,
- struct mbuf *control));
-void sbappendrecord __P((struct sockbuf *sb, struct mbuf *m0));
-void sbcheck __P((struct sockbuf *sb));
-void sbcompress __P((struct sockbuf *sb, struct mbuf *m, struct mbuf *n));
-struct mbuf *
- sbcreatecontrol __P((caddr_t p, int size, int type, int level));
-void sbdrop __P((struct sockbuf *sb, int len));
-void sbdroprecord __P((struct sockbuf *sb));
-void sbflush __P((struct sockbuf *sb));
-void sbinsertoob __P((struct sockbuf *sb, struct mbuf *m0));
-void sbrelease __P((struct sockbuf *sb));
-int sbreserve __P((struct sockbuf *sb, u_long cc));
-int sbwait __P((struct sockbuf *sb));
-int sb_lock __P((struct sockbuf *sb));
-int soabort __P((struct socket *so));
-int soaccept __P((struct socket *so, struct mbuf *nam));
-int sobind __P((struct socket *so, struct mbuf *nam));
-void socantrcvmore __P((struct socket *so));
-void socantsendmore __P((struct socket *so));
-int soclose __P((struct socket *so));
-int soconnect __P((struct socket *so, struct mbuf *nam));
-int soconnect2 __P((struct socket *so1, struct socket *so2));
-int socreate __P((int dom, struct socket **aso, int type, int proto,
- struct proc *p));
-int sodisconnect __P((struct socket *so));
-void sofree __P((struct socket *so));
-int sogetopt __P((struct socket *so, int level, int optname,
- struct mbuf **mp));
-void sohasoutofband __P((struct socket *so));
-void soisconnected __P((struct socket *so));
-void soisconnecting __P((struct socket *so));
-void soisdisconnected __P((struct socket *so));
-void soisdisconnecting __P((struct socket *so));
-int solisten __P((struct socket *so, int backlog));
-struct socket *
- sodropablereq __P((struct socket *head));
-struct socket *
- sonewconn1 __P((struct socket *head, int connstatus));
-int soreceive __P((struct socket *so, struct mbuf **paddr, struct uio *uio,
- struct mbuf **mp0, struct mbuf **controlp, int *flagsp));
-int soreserve __P((struct socket *so, u_long sndcc, u_long rcvcc));
-void sorflush __P((struct socket *so));
-int sosend __P((struct socket *so, struct mbuf *addr, struct uio *uio,
- struct mbuf *top, struct mbuf *control, int flags));
-int sosetopt __P((struct socket *so, int level, int optname,
- struct mbuf *m0));
-int soshutdown __P((struct socket *so, int how));
-void sowakeup __P((struct socket *so, struct sockbuf *sb));
-#endif /* KERNEL */
-
-#endif /* !_SYS_SOCKETVAR_H_ */
diff --git a/cpukit/libnetworking/sys/sysctl.h b/cpukit/libnetworking/sys/sysctl.h
deleted file mode 100644
index b25ba43c4f..0000000000
--- a/cpukit/libnetworking/sys/sysctl.h
+++ /dev/null
@@ -1,379 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Mike Karels at Berkeley Software Design, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)sysctl.h 8.1 (Berkeley) 6/2/93
- * $Id$
- */
-
-#ifndef _SYS_SYSCTL_H_
-#define _SYS_SYSCTL_H_
-
-/*
- * Definitions for sysctl call. The sysctl call uses a hierarchical name
- * for objects that can be examined or modified. The name is expressed as
- * a sequence of integers. Like a file path name, the meaning of each
- * component depends on its place in the hierarchy. The top-level and kern
- * identifiers are defined here, and other identifiers are defined in the
- * respective subsystem header files.
- */
-
-#define CTL_MAXNAME 12 /* largest number of components supported */
-
-/*
- * Each subsystem defined by sysctl defines a list of variables
- * for that subsystem. Each name is either a node with further
- * levels defined below it, or it is a leaf of some particular
- * type given below. Each sysctl level defines a set of name/type
- * pairs to be used by sysctl(1) in manipulating the subsystem.
- */
-struct ctlname {
- char *ctl_name; /* subsystem name */
- int ctl_type; /* type of name */
-};
-
-#define CTLTYPE 0xf /* Mask for the type */
-#define CTLTYPE_NODE 1 /* name is a node */
-#define CTLTYPE_INT 2 /* name describes an integer */
-#define CTLTYPE_STRING 3 /* name describes a string */
-#define CTLTYPE_QUAD 4 /* name describes a 64-bit number */
-#define CTLTYPE_OPAQUE 5 /* name describes a structure */
-#define CTLTYPE_STRUCT CTLTYPE_OPAQUE /* name describes a structure */
-
-#define CTLFLAG_RD 0x80000000 /* Allow reads of variable */
-#define CTLFLAG_WR 0x40000000 /* Allow writes to the variable */
-#define CTLFLAG_RW (CTLFLAG_RD|CTLFLAG_WR)
-#define CTLFLAG_NOLOCK 0x20000000 /* XXX Don't Lock */
-#define CTLFLAG_ANYBODY 0x10000000 /* All users can set this var */
-
-/*
- * USE THIS instead of a hardwired number from the categories below
- * to get dynamically assigned sysctl entries using the linker-set
- * technology. This is the way nearly all new sysctl variables should
- * be implimented.
- * e.g. SYSCTL_INT(_parent, OID_AUTO, name, CTLFLAG_RW, &variable, 0, "");
- */
-#define OID_AUTO (-1)
-
-#ifdef KERNEL
-#define SYSCTL_HANDLER_ARGS (struct sysctl_oid *oidp, void *arg1, int arg2, \
- struct sysctl_req *req)
-
-/*
- * This describes the access space for a sysctl request. This is needed
- * so that we can use the interface from the kernel or from user-space.
- */
-struct sysctl_req {
- struct proc *p;
- int lock;
- void *oldptr;
- int oldlen;
- int oldidx;
- int (*oldfunc)(struct sysctl_req *, const void *, int);
- void *newptr;
- int newlen;
- int newidx;
- int (*newfunc)(struct sysctl_req *, void *, int);
-};
-
-/*
- * This describes one "oid" in the MIB tree. Potentially more nodes can
- * be hidden behind it, expanded by the handler.
- */
-struct sysctl_oid {
- int oid_number;
- int oid_kind;
- void *oid_arg1;
- int oid_arg2;
- const char *oid_name;
- int (*oid_handler) SYSCTL_HANDLER_ARGS;
- const char *oid_fmt;
-};
-
-#define SYSCTL_IN(r, p, l)
-#define SYSCTL_OUT(r, p, l)
-
-int sysctl_handle_int SYSCTL_HANDLER_ARGS;
-int sysctl_handle_string SYSCTL_HANDLER_ARGS;
-int sysctl_handle_opaque SYSCTL_HANDLER_ARGS;
-
-/* This is the "raw" function for a mib-oid */
-#define SYSCTL_OID(parent, nbr, name, kind, a1, a2, handler, fmt, descr)
-
-/* This makes a node from which other oids can hang */
-#define SYSCTL_NODE(parent, nbr, name, access, handler, descr)
-
-/* This is a string len can be 0 to indicate '\0' termination */
-#define SYSCTL_STRING(parent, nbr, name, access, arg, len, descr)
-
-/* This is a integer, if ptr is NULL, val is returned */
-#define SYSCTL_INT(parent, nbr, name, access, ptr, val, descr)
-
-/* This is anything, specified by a pointer and a lenth */
-#define SYSCTL_OPAQUE(parent, nbr, name, access, ptr, len, fmt, descr)
-
-/* This is a struct, specified by a pointer and type */
-#define SYSCTL_STRUCT(parent, nbr, name, access, ptr, type, descr)
-
-/* Needs a proc. Specify by pointer and arg */
-#define SYSCTL_PROC(parent, nbr, name, access, ptr, arg, handler, fmt, descr)
-#endif /* KERNEL */
-
-/*
- * Top-level identifiers
- */
-#define CTL_UNSPEC 0 /* unused */
-#define CTL_KERN 1 /* "high kernel": proc, limits */
-#define CTL_VM 2 /* virtual memory */
-#define CTL_VFS 3 /* file system, mount type is next */
-#define CTL_NET 4 /* network, see socket.h */
-#define CTL_DEBUG 5 /* debugging parameters */
-#define CTL_HW 6 /* generic cpu/io */
-#define CTL_MACHDEP 7 /* machine dependent */
-#define CTL_USER 8 /* user-level */
-#define CTL_MAXID 9 /* number of valid top-level ids */
-
-#define CTL_NAMES { \
- { 0, 0 }, \
- { "kern", CTLTYPE_NODE }, \
- { "vm", CTLTYPE_NODE }, \
- { "vfs", CTLTYPE_NODE }, \
- { "net", CTLTYPE_NODE }, \
- { "debug", CTLTYPE_NODE }, \
- { "hw", CTLTYPE_NODE }, \
- { "machdep", CTLTYPE_NODE }, \
- { "user", CTLTYPE_NODE }, \
-}
-
-/*
- * CTL_KERN identifiers
- */
-#define KERN_OSTYPE 1 /* string: system version */
-#define KERN_OSRELEASE 2 /* string: system release */
-#define KERN_OSREV 3 /* int: system revision */
-#define KERN_VERSION 4 /* string: compile time info */
-#define KERN_MAXVNODES 5 /* int: max vnodes */
-#define KERN_MAXPROC 6 /* int: max processes */
-#define KERN_MAXFILES 7 /* int: max open files */
-#define KERN_ARGMAX 8 /* int: max arguments to exec */
-#define KERN_SECURELVL 9 /* int: system security level */
-#define KERN_HOSTNAME 10 /* string: hostname */
-#define KERN_HOSTID 11 /* int: host identifier */
-#define KERN_CLOCKRATE 12 /* struct: struct clockrate */
-#define KERN_VNODE 13 /* struct: vnode structures */
-#define KERN_PROC 14 /* struct: process entries */
-#define KERN_FILE 15 /* struct: file entries */
-#define KERN_PROF 16 /* node: kernel profiling info */
-#define KERN_POSIX1 17 /* int: POSIX.1 version */
-#define KERN_NGROUPS 18 /* int: # of supplemental group ids */
-#define KERN_JOB_CONTROL 19 /* int: is job control available */
-#define KERN_SAVED_IDS 20 /* int: saved set-user/group-ID */
-#define KERN_BOOTTIME 21 /* struct: time kernel was booted */
-#define KERN_NISDOMAINNAME 22 /* string: YP domain name */
-#define KERN_UPDATEINTERVAL 23 /* int: update process sleep time */
-#define KERN_OSRELDATE 24 /* int: OS release date */
-#define KERN_NTP_PLL 25 /* node: NTP PLL control */
-#define KERN_BOOTFILE 26 /* string: name of booted kernel */
-#define KERN_MAXFILESPERPROC 27 /* int: max open files per proc */
-#define KERN_MAXPROCPERUID 28 /* int: max processes per uid */
-#define KERN_DUMPDEV 29 /* dev_t: device to dump on */
-#define KERN_SOMAXCONN 30 /* int: max connections in listen q */
-#define KERN_MAXSOCKBUF 31 /* int: max size of a socket buffer */
-#define KERN_PS_STRINGS 32 /* int: address of PS_STRINGS */
-#define KERN_USRSTACK 33 /* int: address of USRSTACK */
-#define KERN_MAXID 34 /* number of valid kern ids */
-
-#define CTL_KERN_NAMES { \
- { 0, 0 }, \
- { "ostype", CTLTYPE_STRING }, \
- { "osrelease", CTLTYPE_STRING }, \
- { "osrevision", CTLTYPE_INT }, \
- { "version", CTLTYPE_STRING }, \
- { "maxvnodes", CTLTYPE_INT }, \
- { "maxproc", CTLTYPE_INT }, \
- { "maxfiles", CTLTYPE_INT }, \
- { "argmax", CTLTYPE_INT }, \
- { "securelevel", CTLTYPE_INT }, \
- { "hostname", CTLTYPE_STRING }, \
- { "hostid", CTLTYPE_INT }, \
- { "clockrate", CTLTYPE_STRUCT }, \
- { "vnode", CTLTYPE_STRUCT }, \
- { "proc", CTLTYPE_STRUCT }, \
- { "file", CTLTYPE_STRUCT }, \
- { "profiling", CTLTYPE_NODE }, \
- { "posix1version", CTLTYPE_INT }, \
- { "ngroups", CTLTYPE_INT }, \
- { "job_control", CTLTYPE_INT }, \
- { "saved_ids", CTLTYPE_INT }, \
- { "boottime", CTLTYPE_STRUCT }, \
- { "nisdomainname", CTLTYPE_STRING }, \
- { "update", CTLTYPE_INT }, \
- { "osreldate", CTLTYPE_INT }, \
- { "ntp_pll", CTLTYPE_NODE }, \
- { "bootfile", CTLTYPE_STRING }, \
- { "maxfilesperproc", CTLTYPE_INT }, \
- { "maxprocperuid", CTLTYPE_INT }, \
- { "dumpdev", CTLTYPE_STRUCT }, /* we lie; don't print as int */ \
- { "somaxconn", CTLTYPE_INT }, \
- { "maxsockbuf", CTLTYPE_INT }, \
- { "ps_strings", CTLTYPE_INT }, \
- { "usrstack", CTLTYPE_INT }, \
-}
-
-/*
- * CTL_VFS identifiers
- */
-#define VFS_VFSCONF 0 /* get configured filesystems */
-#define VFS_MAXID 1 /* number of items */
-
-#define CTL_VFS_NAMES { \
- { "vfsconf", CTLTYPE_STRUCT }, \
-}
-
-/*
- * KERN_PROC subtypes
- */
-#define KERN_PROC_ALL 0 /* everything */
-#define KERN_PROC_PID 1 /* by process id */
-#define KERN_PROC_PGRP 2 /* by process group id */
-#define KERN_PROC_SESSION 3 /* by session of pid */
-#define KERN_PROC_TTY 4 /* by controlling tty */
-#define KERN_PROC_UID 5 /* by effective uid */
-#define KERN_PROC_RUID 6 /* by real uid */
-
-/*
- * CTL_HW identifiers
- */
-#define HW_MACHINE 1 /* string: machine class */
-#define HW_MODEL 2 /* string: specific machine model */
-#define HW_NCPU 3 /* int: number of cpus */
-#define HW_BYTEORDER 4 /* int: machine byte order */
-#define HW_PHYSMEM 5 /* int: total memory */
-#define HW_USERMEM 6 /* int: non-kernel memory */
-#define HW_PAGESIZE 7 /* int: software page size */
-#define HW_DISKNAMES 8 /* strings: disk drive names */
-#define HW_DISKSTATS 9 /* struct: diskstats[] */
-#define HW_FLOATINGPT 10 /* int: has HW floating point? */
-#define HW_MACHINE_ARCH 11 /* string: machine architecture */
-#define HW_MAXID 12 /* number of valid hw ids */
-
-#define CTL_HW_NAMES { \
- { 0, 0 }, \
- { "machine", CTLTYPE_STRING }, \
- { "model", CTLTYPE_STRING }, \
- { "ncpu", CTLTYPE_INT }, \
- { "byteorder", CTLTYPE_INT }, \
- { "physmem", CTLTYPE_INT }, \
- { "usermem", CTLTYPE_INT }, \
- { "pagesize", CTLTYPE_INT }, \
- { "disknames", CTLTYPE_STRUCT }, \
- { "diskstats", CTLTYPE_STRUCT }, \
- { "floatingpoint", CTLTYPE_INT }, \
-}
-
-/*
- * CTL_USER definitions
- */
-#define USER_CS_PATH 1 /* string: _CS_PATH */
-#define USER_BC_BASE_MAX 2 /* int: BC_BASE_MAX */
-#define USER_BC_DIM_MAX 3 /* int: BC_DIM_MAX */
-#define USER_BC_SCALE_MAX 4 /* int: BC_SCALE_MAX */
-#define USER_BC_STRING_MAX 5 /* int: BC_STRING_MAX */
-#define USER_COLL_WEIGHTS_MAX 6 /* int: COLL_WEIGHTS_MAX */
-#define USER_EXPR_NEST_MAX 7 /* int: EXPR_NEST_MAX */
-#define USER_LINE_MAX 8 /* int: LINE_MAX */
-#define USER_RE_DUP_MAX 9 /* int: RE_DUP_MAX */
-#define USER_POSIX2_VERSION 10 /* int: POSIX2_VERSION */
-#define USER_POSIX2_C_BIND 11 /* int: POSIX2_C_BIND */
-#define USER_POSIX2_C_DEV 12 /* int: POSIX2_C_DEV */
-#define USER_POSIX2_CHAR_TERM 13 /* int: POSIX2_CHAR_TERM */
-#define USER_POSIX2_FORT_DEV 14 /* int: POSIX2_FORT_DEV */
-#define USER_POSIX2_FORT_RUN 15 /* int: POSIX2_FORT_RUN */
-#define USER_POSIX2_LOCALEDEF 16 /* int: POSIX2_LOCALEDEF */
-#define USER_POSIX2_SW_DEV 17 /* int: POSIX2_SW_DEV */
-#define USER_POSIX2_UPE 18 /* int: POSIX2_UPE */
-#define USER_STREAM_MAX 19 /* int: POSIX2_STREAM_MAX */
-#define USER_TZNAME_MAX 20 /* int: POSIX2_TZNAME_MAX */
-#define USER_MAXID 21 /* number of valid user ids */
-
-#define CTL_USER_NAMES { \
- { 0, 0 }, \
- { "cs_path", CTLTYPE_STRING }, \
- { "bc_base_max", CTLTYPE_INT }, \
- { "bc_dim_max", CTLTYPE_INT }, \
- { "bc_scale_max", CTLTYPE_INT }, \
- { "bc_string_max", CTLTYPE_INT }, \
- { "coll_weights_max", CTLTYPE_INT }, \
- { "expr_nest_max", CTLTYPE_INT }, \
- { "line_max", CTLTYPE_INT }, \
- { "re_dup_max", CTLTYPE_INT }, \
- { "posix2_version", CTLTYPE_INT }, \
- { "posix2_c_bind", CTLTYPE_INT }, \
- { "posix2_c_dev", CTLTYPE_INT }, \
- { "posix2_char_term", CTLTYPE_INT }, \
- { "posix2_fort_dev", CTLTYPE_INT }, \
- { "posix2_fort_run", CTLTYPE_INT }, \
- { "posix2_localedef", CTLTYPE_INT }, \
- { "posix2_sw_dev", CTLTYPE_INT }, \
- { "posix2_upe", CTLTYPE_INT }, \
- { "stream_max", CTLTYPE_INT }, \
- { "tzname_max", CTLTYPE_INT }, \
-}
-
-#ifdef KERNEL
-
-extern char cpu_model[];
-extern char machine[];
-extern char osrelease[];
-extern char ostype[];
-
-int kernel_sysctl(struct proc *p, int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen, int *retval);
-int userland_sysctl(struct proc *p, int *name, u_int namelen, void *old, size_t *oldlenp, int inkernel, void *new, size_t newlen, int *retval);
-/*
-int sysctl_clockrate __P((char *, size_t*));
-int sysctl_file __P((char *, size_t*));
-int sysctl_doproc __P((int *, u_int, char *, size_t*));
-int sysctl_doprof __P((int *, u_int, void *, size_t *, void *, size_t));
-*/
-
-#else /* !KERNEL */
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-int sysctl __P((int *, u_int, void *, size_t *, void *, size_t));
-int sysctlbyname __P((const char *, void *, size_t *, void *, size_t));
-__END_DECLS
-#endif /* KERNEL */
-
-#endif /* !_SYS_SYSCTL_H_ */
diff --git a/cpukit/libnetworking/sys/syslimits.h b/cpukit/libnetworking/sys/syslimits.h
deleted file mode 100644
index 283a0241e3..0000000000
--- a/cpukit/libnetworking/sys/syslimits.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)syslimits.h 8.1 (Berkeley) 6/2/93
- * $Id$
- */
-
-#ifndef _SYS_SYSLIMITS_H_
-#define _SYS_SYSLIMITS_H_
-
-#if !defined(__rtems__)
-#define ARG_MAX 65536 /* max bytes for an exec function */
-#endif
-
-#if !defined(__rtems__)
-#ifndef CHILD_MAX
-#define CHILD_MAX 40 /* max simultaneous processes */
-#endif
-#endif
-
-#if !defined(__rtems__)
-#define LINK_MAX 32767 /* max file link count */
-#endif
-
-#define MAX_CANON 255 /* max bytes in term canon input line */
-
-#define MAX_INPUT 255 /* max bytes in terminal input */
-
-#if !defined(__rtems__)
-#define NAME_MAX 255 /* max bytes in a file name */
-#endif
-
-#define NGROUPS_MAX 16 /* max supplemental group id's */
-
-#if !defined(__rtems__)
-#ifndef OPEN_MAX
-#define OPEN_MAX 64 /* max open files per process */
-#endif
-#endif
-
-#if !defined(__rtems__)
-#define PATH_MAX 1024 /* max bytes in pathname */
-#endif
-
-#define PIPE_BUF 512 /* max bytes for atomic pipe writes */
-
-#define BC_BASE_MAX 99 /* max ibase/obase values in bc(1) */
-#define BC_DIM_MAX 2048 /* max array elements in bc(1) */
-#define BC_SCALE_MAX 99 /* max scale value in bc(1) */
-#define BC_STRING_MAX 1000 /* max const string length in bc(1) */
-#define COLL_WEIGHTS_MAX 0 /* max weights for order keyword */
-#define EXPR_NEST_MAX 32 /* max expressions nested in expr(1) */
-#define LINE_MAX 2048 /* max bytes in an input line */
-#define RE_DUP_MAX 255 /* max RE's in interval notation */
-
-#endif
diff --git a/cpukit/libnetworking/sys/syslog.h b/cpukit/libnetworking/sys/syslog.h
deleted file mode 100644
index 08a59fa7cc..0000000000
--- a/cpukit/libnetworking/sys/syslog.h
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)syslog.h 8.1 (Berkeley) 6/2/93
- * $Id$
- */
-
-#ifndef _SYS_SYSLOG_H_
-#define _SYS_SYSLOG_H_
-
-#define _PATH_LOG "/var/run/log"
-#define _PATH_OLDLOG "/dev/log" /* backward compatibility */
-
-/*
- * priorities/facilities are encoded into a single 32-bit quantity, where the
- * bottom 3 bits are the priority (0-7) and the top 28 bits are the facility
- * (0-big number). Both the priorities and the facilities map roughly
- * one-to-one to strings in the syslogd(8) source code. This mapping is
- * included in this file.
- *
- * priorities (these are ordered)
- */
-#define LOG_EMERG 0 /* system is unusable */
-#define LOG_ALERT 1 /* action must be taken immediately */
-#define LOG_CRIT 2 /* critical conditions */
-#define LOG_ERR 3 /* error conditions */
-#define LOG_WARNING 4 /* warning conditions */
-#define LOG_NOTICE 5 /* normal but significant condition */
-#define LOG_INFO 6 /* informational */
-#define LOG_DEBUG 7 /* debug-level messages */
-
-#define LOG_PRIMASK 0x07 /* mask to extract priority part (internal) */
- /* extract priority */
-#define LOG_PRI(p) ((p) & LOG_PRIMASK)
-#define LOG_MAKEPRI(fac, pri) ((fac) | (pri))
-
-#ifdef SYSLOG_NAMES
-#define INTERNAL_NOPRI 0x10 /* the "no priority" priority */
- /* mark "facility" */
-#define INTERNAL_MARK LOG_MAKEPRI((LOG_NFACILITIES<<3), 0)
-typedef struct _code {
- char *c_name;
- int c_val;
-} CODE;
-
-CODE prioritynames[] = {
- { "alert", LOG_ALERT, },
- { "crit", LOG_CRIT, },
- { "debug", LOG_DEBUG, },
- { "emerg", LOG_EMERG, },
- { "err", LOG_ERR, },
- { "error", LOG_ERR, }, /* DEPRECATED */
- { "info", LOG_INFO, },
- { "none", INTERNAL_NOPRI, }, /* INTERNAL */
- { "notice", LOG_NOTICE, },
- { "panic", LOG_EMERG, }, /* DEPRECATED */
- { "warn", LOG_WARNING, }, /* DEPRECATED */
- { "warning", LOG_WARNING, },
- { NULL, -1, }
-};
-#endif
-
-/* facility codes */
-#define LOG_KERN (0<<3) /* kernel messages */
-#define LOG_USER (1<<3) /* random user-level messages */
-#define LOG_MAIL (2<<3) /* mail system */
-#define LOG_DAEMON (3<<3) /* system daemons */
-#define LOG_AUTH (4<<3) /* security/authorization messages */
-#define LOG_SYSLOG (5<<3) /* messages generated internally by syslogd */
-#define LOG_LPR (6<<3) /* line printer subsystem */
-#define LOG_NEWS (7<<3) /* network news subsystem */
-#define LOG_UUCP (8<<3) /* UUCP subsystem */
-#define LOG_CRON (9<<3) /* clock daemon */
-#define LOG_AUTHPRIV (10<<3) /* security/authorization messages (private) */
- /* Facility #10 clashes in DEC UNIX, where */
- /* it's defined as LOG_MEGASAFE for AdvFS */
- /* event logging. */
-#define LOG_FTP (11<<3) /* ftp daemon */
-#define LOG_NTP (12<<3) /* NTP subsystem */
-
- /* other codes through 15 reserved for system use */
-#define LOG_LOCAL0 (16<<3) /* reserved for local use */
-#define LOG_LOCAL1 (17<<3) /* reserved for local use */
-#define LOG_LOCAL2 (18<<3) /* reserved for local use */
-#define LOG_LOCAL3 (19<<3) /* reserved for local use */
-#define LOG_LOCAL4 (20<<3) /* reserved for local use */
-#define LOG_LOCAL5 (21<<3) /* reserved for local use */
-#define LOG_LOCAL6 (22<<3) /* reserved for local use */
-#define LOG_LOCAL7 (23<<3) /* reserved for local use */
-
-#define LOG_NFACILITIES 24 /* current number of facilities */
-#define LOG_FACMASK 0x03f8 /* mask to extract facility part */
- /* facility of pri */
-#define LOG_FAC(p) (((p) & LOG_FACMASK) >> 3)
-
-#ifdef SYSLOG_NAMES
-CODE facilitynames[] = {
- { "auth", LOG_AUTH, },
- { "authpriv", LOG_AUTHPRIV, },
- { "cron", LOG_CRON, },
- { "daemon", LOG_DAEMON, },
- { "ftp", LOG_FTP, },
- { "kern", LOG_KERN, },
- { "lpr", LOG_LPR, },
- { "mail", LOG_MAIL, },
- { "mark", INTERNAL_MARK, }, /* INTERNAL */
- { "news", LOG_NEWS, },
- { "ntp", LOG_NTP, },
- { "security", LOG_AUTH, }, /* DEPRECATED */
- { "syslog", LOG_SYSLOG, },
- { "user", LOG_USER, },
- { "uucp", LOG_UUCP, },
- { "local0", LOG_LOCAL0, },
- { "local1", LOG_LOCAL1, },
- { "local2", LOG_LOCAL2, },
- { "local3", LOG_LOCAL3, },
- { "local4", LOG_LOCAL4, },
- { "local5", LOG_LOCAL5, },
- { "local6", LOG_LOCAL6, },
- { "local7", LOG_LOCAL7, },
- { NULL, -1, }
-};
-#endif
-
-#ifdef KERNEL
-#define LOG_PRINTF -1 /* pseudo-priority to indicate use of printf */
-#endif
-
-/*
- * arguments to setlogmask.
- */
-#define LOG_MASK(pri) (1 << (pri)) /* mask for one priority */
-#define LOG_UPTO(pri) ((1 << ((pri)+1)) - 1) /* all priorities through pri */
-
-/*
- * Option flags for openlog.
- *
- * LOG_ODELAY no longer does anything.
- * LOG_NDELAY is the inverse of what it used to be.
- */
-#define LOG_PID 0x01 /* log the pid with each message */
-#define LOG_CONS 0x02 /* log on the console if errors in sending */
-#define LOG_ODELAY 0x04 /* delay open until first syslog() (default) */
-#define LOG_NDELAY 0x08 /* don't delay open */
-#define LOG_NOWAIT 0x10 /* don't wait for console forks: DEPRECATED */
-#define LOG_PERROR 0x20 /* log to stderr as well */
-
-/*
-#ifdef KERNEL
-
-#else not KERNEL */
-
-#include <sys/cdefs.h>
-#include <stdarg.h>
-
-__BEGIN_DECLS
-void closelog __P((void));
-void openlog __P((const char *, int, int));
-int setlogmask __P((int));
-void syslog __P((int, const char *, ...));
-void vsyslog __P((int, const char *, va_list));
-__END_DECLS
-
-/* #endif !KERNEL */
-
-#endif
diff --git a/cpukit/libnetworking/sys/systm.h b/cpukit/libnetworking/sys/systm.h
deleted file mode 100644
index 7e14867e70..0000000000
--- a/cpukit/libnetworking/sys/systm.h
+++ /dev/null
@@ -1,198 +0,0 @@
-/*-
- * Copyright (c) 1982, 1988, 1991, 1993
- * The Regents of the University of California. All rights reserved.
- * (c) UNIX System Laboratories, Inc.
- * All or some portions of this file are derived from material licensed
- * to the University of California by American Telephone and Telegraph
- * Co. or Unix System Laboratories, Inc. and are reproduced herein with
- * the permission of UNIX System Laboratories, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)systm.h 8.7 (Berkeley) 3/29/95
- * $Id$
- */
-
-#ifndef _SYS_SYSTM_H_
-#define _SYS_SYSTM_H_
-
-#include <machine/cpufunc.h>
-
-extern int securelevel; /* system security level (see init(8)) */
-
-extern int cold; /* nonzero if we are doing a cold boot */
-extern const char *panicstr; /* panic message */
-extern char version[]; /* system version */
-extern char copyright[]; /* system copyright */
-
-extern int nblkdev; /* number of entries in bdevsw */
-extern int nchrdev; /* number of entries in cdevsw */
-extern struct swdevt *swdevt; /* swap-device information */
-extern int nswdev; /* number of swap devices */
-extern int nswap; /* size of swap space */
-
-extern int selwait; /* select timeout address */
-
-extern u_char curpriority; /* priority of current process */
-
-extern int physmem; /* physical memory */
-
-extern dev_t dumpdev; /* dump device */
-extern long dumplo; /* offset into dumpdev */
-
-extern dev_t rootdev; /* root device */
-extern struct vnode *rootvp; /* vnode equivalent to above */
-
-extern dev_t swapdev; /* swapping device */
-extern struct vnode *swapdev_vp;/* vnode equivalent to above */
-
-extern int boothowto; /* reboot flags, from console subsystem */
-extern int bootverbose; /* nonzero to print verbose messages */
-
-/*
- * General function declarations.
- */
-void Debugger __P((const char *msg));
-int nullop __P((void));
-int eopnotsupp __P((void));
-int einval __P((void));
-int seltrue __P((dev_t dev, int which, struct proc *p));
-int ureadc __P((int, struct uio *));
-void *hashinit __P((int count, int type, u_long *hashmask));
-void *phashinit __P((int count, int type, u_long *nentries));
-
-void panic __P((const char *, ...)) __dead2;
-void boot __P((int)) __dead2;
-void cpu_boot __P((int));
-void tablefull __P((const char *));
-int addlog __P((const char *, ...));
-int kvprintf __P((char const *, void (*)(int, void*), void *, int,
- _BSD_VA_LIST_));
-void log __P((int, const char *, ...));
-int printf __P((const char *, ...));
-int sprintf __P((char *buf, const char *, ...));
-void uprintf __P((const char *, ...));
-void ttyprintf __P((struct tty *, const char *, ...));
-
-#define bcopy(f,t,n) memcpy((t),(f),(n))
-#define bzero(p,n) memset((p),(0),(n))
-
-int copystr __P((const void *kfaddr, void *kdaddr, size_t len,
- size_t *lencopied));
-int copyinstr __P((const void *udaddr, void *kaddr, size_t len,
- size_t *lencopied));
-int copyin __P((const void *udaddr, void *kaddr, size_t len));
-int copyout __P((const void *kaddr, void *udaddr, size_t len));
-
-int fubyte __P((const void *base));
-int fuibyte __P((const void *base));
-int subyte __P((void *base, int byte));
-int suibyte __P((void *base, int byte));
-int fuword __P((const void *base));
-int suword __P((void *base, int word));
-int susword __P((void *base, int word));
-
-int hzto __P((struct timeval *tv));
-void realitexpire __P((void *));
-
-struct clockframe;
-void hardclock __P((struct clockframe *frame));
-void softclock __P((void));
-void statclock __P((struct clockframe *frame));
-
-void startprofclock __P((struct proc *));
-void stopprofclock __P((struct proc *));
-void setstatclockrate __P((int hzrate));
-
-void hardupdate __P((long));
-void hardpps __P((struct timeval *tvp, long usec));
-
-#include <sys/libkern.h>
-
-/* Initialize the world */
-extern void consinit(void);
-extern void usrinfoinit(void);
-extern void cpu_initclocks(void);
-extern void vntblinit(void);
-extern void nchinit(void);
-
-/* Finalize the world. */
-void shutdown_nice __P((void));
-
-/*
- * Kernel to clock driver interface.
- */
-void inittodr __P((time_t base));
-void resettodr __P((void));
-void startrtclock __P((void));
-
-/* Timeouts */
-typedef void (timeout_t)(void *); /* actual timeout function type */
-typedef timeout_t *timeout_func_t; /* a pointer to this type */
-
-void timeout(timeout_func_t, void *, int);
-void untimeout(timeout_func_t, void *);
-void logwakeup __P((void));
-
-/* Various other callout lists that modules might want to know about */
-/* shutdown callout list definitions */
-typedef void (*bootlist_fn)(int,void *);
-int at_shutdown(bootlist_fn function, void *arg, int);
-int rm_at_shutdown(bootlist_fn function, void *arg);
-#define SHUTDOWN_PRE_SYNC 0
-#define SHUTDOWN_POST_SYNC 1
-
-/* forking */ /* XXX not yet */
-typedef void (*forklist_fn)(struct proc *parent,struct proc *child,int flags);
-int at_fork(forklist_fn function);
-int rm_at_fork(forklist_fn function);
-
-/* exiting */
-typedef void (*exitlist_fn)(struct proc *procp);
-int at_exit(exitlist_fn function);
-int rm_at_exit(exitlist_fn function);
-
-/* Not exactly a callout LIST, but a callout entry.. */
-/* Allow an external module to define a hardware watchdog tickler */
-/* Normally a process would do this, but there are times when the */
-/* kernel needs to be able to hold off the watchdog, when the process */
-/* is not active, e.g. when dumping core. Costs us a whole 4 bytes to */
-/* make this generic. the variable is in kern_shutdown.c */
-typedef void (*watchdog_tickle_fn)(void);
-extern watchdog_tickle_fn wdog_tickler;
-
-
-/*
- * Common `proc' functions are declared here so that proc.h can be included
- * less often.
- */
-int tsleep __P((void *chan, int pri, char *wmesg, int timo));
-void wakeup __P((void *chan));
-
-#endif /* !_SYS_SYSTM_H_ */
diff --git a/cpukit/libnetworking/sys/ttydefaults.h b/cpukit/libnetworking/sys/ttydefaults.h
deleted file mode 100644
index 68f0ddbe77..0000000000
--- a/cpukit/libnetworking/sys/ttydefaults.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/*-
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- * (c) UNIX System Laboratories, Inc.
- * All or some portions of this file are derived from material licensed
- * to the University of California by American Telephone and Telegraph
- * Co. or Unix System Laboratories, Inc. and are reproduced herein with
- * the permission of UNIX System Laboratories, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ttydefaults.h 8.4 (Berkeley) 1/21/94
- * $Id$
- */
-
-/*
- * System wide defaults for terminal state.
- */
-#ifndef _SYS_TTYDEFAULTS_H_
-#define _SYS_TTYDEFAULTS_H_
-
-/*
- * Defaults on "first" open.
- */
-#define TTYDEF_IFLAG (BRKINT | ICRNL | IMAXBEL | IXON | IXANY)
-#define TTYDEF_OFLAG (OPOST | ONLCR)
-#define TTYDEF_LFLAG (ECHO | ICANON | ISIG | IEXTEN | ECHOE|ECHOKE|ECHOCTL)
-#define TTYDEF_CFLAG (CREAD | CS8 | HUPCL)
-#define TTYDEF_SPEED (B9600)
-
-/*
- * Control Character Defaults
- */
-#define CTRL(x) (x&037)
-#define CEOF CTRL('d')
-#define CEOL 0xff /* XXX avoid _POSIX_VDISABLE */
-#define CERASE 0177
-#define CINTR CTRL('c')
-#define CSTATUS CTRL('t')
-#define CKILL CTRL('u')
-#define CMIN 1
-#define CQUIT 034 /* FS, ^\ */
-#define CSUSP CTRL('z')
-#define CTIME 0
-#define CDSUSP CTRL('y')
-#define CSTART CTRL('q')
-#define CSTOP CTRL('s')
-#define CLNEXT CTRL('v')
-#define CDISCARD CTRL('o')
-#define CWERASE CTRL('w')
-#define CREPRINT CTRL('r')
-#define CEOT CEOF
-/* compat */
-#define CBRK CEOL
-#define CRPRNT CREPRINT
-#define CFLUSH CDISCARD
-
-/* PROTECTED INCLUSION ENDS HERE */
-#endif /* !_SYS_TTYDEFAULTS_H_ */
-
-/*
- * #define TTYDEFCHARS to include an array of default control characters.
- */
-#ifdef TTYDEFCHARS
-static cc_t ttydefchars[NCCS] = {
- CEOF, CEOL, CEOL, CERASE, CWERASE, CKILL, CREPRINT,
- _POSIX_VDISABLE, CINTR, CQUIT, CSUSP, CDSUSP, CSTART, CSTOP, CLNEXT,
- CDISCARD, CMIN, CTIME, CSTATUS, _POSIX_VDISABLE
-};
-#undef TTYDEFCHARS
-#endif
diff --git a/cpukit/libnetworking/sys/ucred.h b/cpukit/libnetworking/sys/ucred.h
deleted file mode 100644
index d3899c3b4c..0000000000
--- a/cpukit/libnetworking/sys/ucred.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ucred.h 8.4 (Berkeley) 1/9/95
- * $Id$
- */
-
-#ifndef _SYS_UCRED_H_
-#define _SYS_UCRED_H_
-
-/*
- * Credentials.
- */
-struct ucred {
- u_short cr_ref; /* reference count */
- uid_t cr_uid; /* effective user id */
- short cr_ngroups; /* number of groups */
- gid_t cr_groups[NGROUPS]; /* groups */
-};
-#define cr_gid cr_groups[0]
-#define NOCRED ((struct ucred *)0) /* no credential available */
-#define FSCRED ((struct ucred *)-1) /* filesystem credential */
-
-#ifdef KERNEL
-#define crhold(cr) (cr)->cr_ref++
-
-struct ucred *crcopy __P((struct ucred *cr));
-struct ucred *crdup __P((struct ucred *cr));
-void crfree __P((struct ucred *cr));
-struct ucred *crget __P((void));
-int suser __P((struct ucred *cred, u_short *acflag));
-int groupmember __P((gid_t gid, struct ucred *cred));
-#endif /* KERNEL */
-
-#endif /* !_SYS_UCRED_H_ */
diff --git a/cpukit/libnetworking/sys/uio.h b/cpukit/libnetworking/sys/uio.h
deleted file mode 100644
index 305941500d..0000000000
--- a/cpukit/libnetworking/sys/uio.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)uio.h 8.5 (Berkeley) 2/22/94
- * $Id$
- */
-
-#ifndef _SYS_UIO_H_
-#define _SYS_UIO_H_
-
-/*
- * XXX
- * iov_base should be a void *.
- */
-struct iovec {
- char *iov_base; /* Base address. */
- size_t iov_len; /* Length. */
-};
-
-enum uio_rw { UIO_READ, UIO_WRITE };
-
-/* Segment flag values. */
-enum uio_seg {
- UIO_USERSPACE, /* from user data space */
- UIO_SYSSPACE, /* from system space */
- UIO_USERISPACE, /* from user I space */
- UIO_NOCOPY /* don't copy, already in object */
-};
-
-#ifdef KERNEL
-struct uio {
- struct iovec *uio_iov;
- int uio_iovcnt;
- off_t uio_offset;
- int uio_resid;
- enum uio_seg uio_segflg;
- enum uio_rw uio_rw;
- struct proc *uio_procp;
-};
-
-/*
- * Limits
- */
-#define UIO_MAXIOV 1024 /* max 1K of iov's */
-#define UIO_SMALLIOV 8 /* 8 on stack, else malloc */
-#endif /* KERNEL */
-
-#ifdef KERNEL
-
-int uiomove __P((caddr_t, int, struct uio *));
-
-#else /* !KERNEL */
-
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-ssize_t readv __P((int, const struct iovec *, int));
-ssize_t writev __P((int, const struct iovec *, int));
-__END_DECLS
-
-#endif /* KERNEL */
-
-#endif /* !_SYS_UIO_H_ */
diff --git a/cpukit/libnetworking/syslog.h b/cpukit/libnetworking/syslog.h
deleted file mode 100644
index 6d223d00b7..0000000000
--- a/cpukit/libnetworking/syslog.h
+++ /dev/null
@@ -1,5 +0,0 @@
-/*
- * $Id$
- */
-
-#include <sys/syslog.h>
diff --git a/cpukit/libnetworking/vm/Makefile.am b/cpukit/libnetworking/vm/Makefile.am
deleted file mode 100644
index 3f307c7cfb..0000000000
--- a/cpukit/libnetworking/vm/Makefile.am
+++ /dev/null
@@ -1,9 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-EXTRA_DIST = vm.h vm_extern.h vm_kern.h vm_param.h
-
-include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/libnetworking/vm/vm.h b/cpukit/libnetworking/vm/vm.h
deleted file mode 100644
index 19ea10e5eb..0000000000
--- a/cpukit/libnetworking/vm/vm.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)vm.h 8.2 (Berkeley) 12/13/93
- * $Id$
- */
-
-#ifndef VM_H
-#define VM_H
-
-typedef char vm_inherit_t; /* XXX: inheritance codes */
-typedef u_char vm_prot_t; /* protection codes */
-
-union vm_map_object;
-typedef union vm_map_object vm_map_object_t;
-
-struct vm_map_entry;
-typedef struct vm_map_entry *vm_map_entry_t;
-
-struct vm_map;
-typedef struct vm_map *vm_map_t;
-
-struct vm_object;
-typedef struct vm_object *vm_object_t;
-
-#ifndef KERNEL
-/*
- * This is defined in <sys/types.h> for the kernel so that non-vm kernel
- * sources (mainly Mach-derived ones such as ddb) don't have to include
- * vm stuff. Defining it there for applications might break things.
- * Define it here for "applications" that include vm headers (e.g.,
- * genassym).
- */
-typedef int boolean_t;
-
-/*
- * This is defined in <sys/types.h> for the kernel so that vnode_if.h
- * doesn't have to include <vm/vm.h>.
- */
-struct vm_page;
-typedef struct vm_page *vm_page_t;
-#endif
-
-#endif /* VM_H */
diff --git a/cpukit/libnetworking/vm/vm_extern.h b/cpukit/libnetworking/vm/vm_extern.h
deleted file mode 100644
index 720d42dc28..0000000000
--- a/cpukit/libnetworking/vm/vm_extern.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)vm_extern.h 8.2 (Berkeley) 1/12/94
- * $Id$
- */
-
-#ifndef _VM_EXTERN_H_
-#define _VM_EXTERN_H_
-
-struct buf;
-struct proc;
-struct vmspace;
-struct vmtotal;
-struct mount;
-struct vnode;
-
-#ifdef KERNEL
-
-#ifdef TYPEDEF_FOR_UAP
-int getpagesize __P((struct proc * p, void *, int *));
-int madvise __P((struct proc *, void *, int *));
-int mincore __P((struct proc *, void *, int *));
-int mprotect __P((struct proc *, void *, int *));
-int msync __P((struct proc *, void *, int *));
-int munmap __P((struct proc *, void *, int *));
-int obreak __P((struct proc *, void *, int *));
-int sbrk __P((struct proc *, void *, int *));
-int smmap __P((struct proc *, void *, int *));
-int sstk __P((struct proc *, void *, int *));
-int swapon __P((struct proc *, void *, int *));
-#endif
-
-void faultin __P((struct proc *p));
-int grow __P((struct proc *, u_int));
-int kernacc __P((caddr_t, int, int));
-vm_offset_t kmem_alloc __P((vm_map_t, vm_size_t));
-vm_offset_t kmem_alloc_pageable __P((vm_map_t, vm_size_t));
-vm_offset_t kmem_alloc_wait __P((vm_map_t, vm_size_t));
-void kmem_free __P((vm_map_t, vm_offset_t, vm_size_t));
-void kmem_free_wakeup __P((vm_map_t, vm_offset_t, vm_size_t));
-void kmem_init __P((vm_offset_t, vm_offset_t));
-vm_offset_t kmem_malloc __P((vm_map_t, vm_size_t, boolean_t));
-vm_map_t kmem_suballoc __P((vm_map_t, vm_offset_t *, vm_offset_t *, vm_size_t, boolean_t));
-void munmapfd __P((struct proc *, int));
-int pager_cache __P((vm_object_t, boolean_t));
-int swaponvp __P((struct proc *, struct vnode *, dev_t , u_long));
-void swapout_procs __P((void));
-int useracc __P((caddr_t, int, int));
-int vm_fault __P((vm_map_t, vm_offset_t, vm_prot_t, boolean_t));
-void vm_fault_copy_entry __P((vm_map_t, vm_map_t, vm_map_entry_t, vm_map_entry_t));
-void vm_fault_unwire __P((vm_map_t, vm_offset_t, vm_offset_t));
-int vm_fault_wire __P((vm_map_t, vm_offset_t, vm_offset_t));
-int vm_fault_user_wire __P((vm_map_t, vm_offset_t, vm_offset_t));
-int vm_fork __P((struct proc *, struct proc *));
-int vm_mmap __P((vm_map_t, vm_offset_t *, vm_size_t, vm_prot_t, vm_prot_t, int, caddr_t, vm_ooffset_t));
-vm_offset_t vm_page_alloc_contig __P((vm_offset_t, vm_offset_t, vm_offset_t, vm_offset_t));
-void vm_set_page_size __P((void));
-void vmmeter __P((void));
-struct vmspace *vmspace_alloc __P((vm_offset_t, vm_offset_t, int));
-struct vmspace *vmspace_fork __P((struct vmspace *));
-void vmspace_free __P((struct vmspace *));
-void vnode_pager_setsize __P((struct vnode *, vm_ooffset_t));
-void vnode_pager_umount __P((struct mount *));
-void vnode_pager_uncache __P((struct vnode *));
-void vslock __P((caddr_t, u_int));
-void vsunlock __P((caddr_t, u_int, int));
-void vm_object_print __P((/* db_expr_t */ int, boolean_t, /* db_expr_t */ int,
- char *));
-void vm_fault_quick __P((caddr_t v, int prot));
-
-#endif /* KERNEL */
-
-#endif /* !_VM_EXTERN_H_ */
diff --git a/cpukit/libnetworking/vm/vm_kern.h b/cpukit/libnetworking/vm/vm_kern.h
deleted file mode 100644
index b1e073dd3a..0000000000
--- a/cpukit/libnetworking/vm/vm_kern.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * The Mach Operating System project at Carnegie-Mellon University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * from: @(#)vm_kern.h 8.1 (Berkeley) 6/11/93
- *
- *
- * Copyright (c) 1987, 1990 Carnegie-Mellon University.
- * All rights reserved.
- *
- * Authors: Avadis Tevanian, Jr., Michael Wayne Young
- *
- * Permission to use, copy, modify and distribute this software and
- * its documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
- * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * Carnegie Mellon requests users of this software to return to
- *
- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
- * School of Computer Science
- * Carnegie Mellon University
- * Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie the
- * rights to redistribute these changes.
- *
- * $Id$
- */
-
-#ifndef _VM_VM_KERN_H_
-#define _VM_VM_KERN_H_ 1
-
-/* Kernel memory management definitions. */
-extern vm_map_t buffer_map;
-extern vm_map_t kernel_map;
-extern vm_map_t kmem_map;
-extern vm_map_t mb_map;
-extern int mb_map_full;
-extern vm_map_t io_map;
-extern vm_map_t clean_map;
-extern vm_map_t phys_map;
-extern vm_map_t exec_map;
-extern vm_map_t u_map;
-
-extern vm_offset_t kernel_vm_end;
-
-#endif /* _VM_VM_KERN_H_ */
diff --git a/cpukit/libnetworking/vm/vm_param.h b/cpukit/libnetworking/vm/vm_param.h
deleted file mode 100644
index f1cfca98ec..0000000000
--- a/cpukit/libnetworking/vm/vm_param.h
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * The Mach Operating System project at Carnegie-Mellon University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * from: @(#)vm_param.h 8.1 (Berkeley) 6/11/93
- *
- *
- * Copyright (c) 1987, 1990 Carnegie-Mellon University.
- * All rights reserved.
- *
- * Authors: Avadis Tevanian, Jr., Michael Wayne Young
- *
- * Permission to use, copy, modify and distribute this software and
- * its documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
- * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * Carnegie Mellon requests users of this software to return to
- *
- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
- * School of Computer Science
- * Carnegie Mellon University
- * Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie the
- * rights to redistribute these changes.
- *
- * $Id$
- */
-
-/*
- * Machine independent virtual memory parameters.
- */
-
-#ifndef _VM_PARAM_
-#define _VM_PARAM_
-
-#include <machine/vmparam.h>
-
-/*
- * The machine independent pages are refered to as PAGES. A page
- * is some number of hardware pages, depending on the target machine.
- */
-#define DEFAULT_PAGE_SIZE 4096
-
-#if 0
-
-/*
- * All references to the size of a page should be done with PAGE_SIZE
- * or PAGE_SHIFT. The fact they are variables is hidden here so that
- * we can easily make them constant if we so desire.
- */
-#ifndef PAGE_SIZE
-#define PAGE_SIZE cnt.v_page_size /* size of page */
-#endif
-#ifndef PAGE_MASK
-#define PAGE_MASK page_mask /* size of page - 1 */
-#endif
-#ifndef PAGE_SHIFT
-#define PAGE_SHIFT page_shift /* bits to shift for pages */
-#endif
-
-#endif
-
-#ifdef KERNEL
-extern vm_size_t page_mask;
-extern int page_shift;
-
-#endif
-
-/*
- * CTL_VM identifiers
- */
-#define VM_METER 1 /* struct vmmeter */
-#define VM_LOADAVG 2 /* struct loadavg */
-#define VM_V_FREE_MIN 3 /* cnt.v_free_min */
-#define VM_V_FREE_TARGET 4 /* cnt.v_free_target */
-#define VM_V_FREE_RESERVED 5 /* cnt.v_free_reserved */
-#define VM_V_INACTIVE_TARGET 6 /* cnt.v_inactive_target */
-#define VM_V_CACHE_MIN 7 /* cnt.v_cache_max */
-#define VM_V_CACHE_MAX 8 /* cnt.v_cache_min */
-#define VM_V_PAGEOUT_FREE_MIN 9 /* cnt.v_pageout_free_min */
-#define VM_PAGEOUT_ALGORITHM 10 /* pageout algorithm */
-#define VM_SWAPPING_ENABLED 11 /* swapping enabled */
-#define VM_MAXID 12 /* number of valid vm ids */
-
-#define CTL_VM_NAMES { \
- { 0, 0 }, \
- { "vmmeter", CTLTYPE_STRUCT }, \
- { "loadavg", CTLTYPE_STRUCT }, \
- { "v_free_min", CTLTYPE_INT }, \
- { "v_free_target", CTLTYPE_INT }, \
- { "v_free_reserved", CTLTYPE_INT }, \
- { "v_inactive_target", CTLTYPE_INT }, \
- { "v_cache_min", CTLTYPE_INT }, \
- { "v_cache_max", CTLTYPE_INT }, \
- { "v_pageout_free_min", CTLTYPE_INT}, \
- { "pageout_algorithm", CTLTYPE_INT}, \
- { "swapping_enabled", CTLTYPE_INT},\
-}
-
-/*
- * Return values from the VM routines.
- */
-#define KERN_SUCCESS 0
-#define KERN_INVALID_ADDRESS 1
-#define KERN_PROTECTION_FAILURE 2
-#define KERN_NO_SPACE 3
-#define KERN_INVALID_ARGUMENT 4
-#define KERN_FAILURE 5
-#define KERN_RESOURCE_SHORTAGE 6
-#define KERN_NOT_RECEIVER 7
-#define KERN_NO_ACCESS 8
-
-#ifndef ASSEMBLER
-/*
- * Convert addresses to pages and vice versa.
- * No rounding is used.
- */
-#ifdef KERNEL
-#define num_pages(x) \
- ((vm_offset_t)((((vm_offset_t)(x)) + PAGE_MASK) >> PAGE_SHIFT))
-
-extern vm_size_t mem_size; /* size of physical memory (bytes) */
-extern vm_offset_t first_addr; /* first physical page */
-extern vm_offset_t last_addr; /* last physical page */
-#endif /* KERNEL */
-#endif /* ASSEMBLER */
-#endif /* _VM_PARAM_ */
diff --git a/cpukit/libnetworking/wrapup/Makefile.am b/cpukit/libnetworking/wrapup/Makefile.am
deleted file mode 100644
index 5d2a73a05e..0000000000
--- a/cpukit/libnetworking/wrapup/Makefile.am
+++ /dev/null
@@ -1,35 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-if HAS_POSIX
-POSIX_PIECES = rtems_webserver
-endif
-
-NET_O_PIECES = kern lib libc net netinet nfs rtems rtems_servers pppd \
- $(POSIX_PIECES)
-OBJS = $(foreach piece, $(NET_O_PIECES), ../$(piece)/$(ARCH)/*.o)
-LIB = $(ARCH)/libnetworking.a
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../automake/lib.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-$(LIB): $(OBJS)
- $(make-library)
-
-$(PROJECT_RELEASE)/lib/libnetworking$(LIB_VARIANT).a: $(LIB)
- $(INSTALL_DATA) $< $@
-
-TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/libnetworking$(LIB_VARIANT).a
-
-all-local: $(ARCH) $(OBJS) $(LIB) $(TMPINSTALL_FILES)
-
-.PRECIOUS: $(LIB)
-
-include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/librpc/Makefile.am b/cpukit/librpc/Makefile.am
deleted file mode 100644
index e74c9e748c..0000000000
--- a/cpukit/librpc/Makefile.am
+++ /dev/null
@@ -1,11 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-
-SUBDIRS = include src
-
-include $(top_srcdir)/../../../automake/subdirs.am
-include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/librpc/include/Makefile.am b/cpukit/librpc/include/Makefile.am
deleted file mode 100644
index d5385c1f70..0000000000
--- a/cpukit/librpc/include/Makefile.am
+++ /dev/null
@@ -1,10 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-SUBDIRS = rpc
-
-include $(top_srcdir)/../../../automake/subdirs.am
-include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/librpc/include/rpc/Makefile.am b/cpukit/librpc/include/rpc/Makefile.am
deleted file mode 100644
index 5ca801b3c9..0000000000
--- a/cpukit/librpc/include/rpc/Makefile.am
+++ /dev/null
@@ -1,26 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-H_FILES = auth.h rpc.h svc.h types.h clnt.h rpc_msg.h svc_auth.h xdr.h
-
-noinst_HEADERS = $(H_FILES)
-
-if HAS_NETWORKING
-PREINSTALL_FILES = \
-$(PROJECT_INCLUDE)/rpc \
-$(H_FILES:%=$(PROJECT_INCLUDE)/rpc/%)
-
-$(PROJECT_INCLUDE)/rpc:
- @$(mkinstalldirs) $@
-$(PROJECT_INCLUDE)/rpc/%.h: %.h
- $(INSTALL_DATA) $< $@
-endif
-
-all-am: $(PREINSTALL_FILES)
-debug-am: $(PREINSTALL_FILES)
-profile-am: $(PREINSTALL_FILES)
-
-include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/librpc/include/rpc/auth.h b/cpukit/librpc/include/rpc/auth.h
deleted file mode 100644
index 8f14d144f6..0000000000
--- a/cpukit/librpc/include/rpc/auth.h
+++ /dev/null
@@ -1,167 +0,0 @@
-#ifndef RPC_AUTH_H
-#define RPC_AUTH_H
-
-/* @(#)auth.h 2.3 88/08/07 4.0 RPCSRC; from 1.17 88/02/08 SMI */
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-/*
- * auth.h, Authentication interface.
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- *
- * The data structures are completely opaque to the client. The client
- * is required to pass a AUTH * to routines that create rpc
- * "sessions".
- */
-
-
-#define MAX_AUTH_BYTES 400
-#define MAXNETNAMELEN 255 /* maximum length of network user's name */
-
-/*
- * Status returned from authentication check
- */
-enum auth_stat {
- AUTH_OK=0,
- /*
- * failed at remote end
- */
- AUTH_BADCRED=1, /* bogus credentials (seal broken) */
- AUTH_REJECTEDCRED=2, /* client should begin new session */
- AUTH_BADVERF=3, /* bogus verifier (seal broken) */
- AUTH_REJECTEDVERF=4, /* verifier expired or was replayed */
- AUTH_TOOWEAK=5, /* rejected due to security reasons */
- /*
- * failed locally
- */
- AUTH_INVALIDRESP=6, /* bogus response verifier */
- AUTH_FAILED=7 /* some unknown reason */
-};
-
-union des_block {
- struct {
- u_int32 high;
- u_int32 low;
- } key;
- char c[8];
-};
-typedef union des_block des_block;
-extern bool_t xdr_des_block();
-
-/*
- * Authentication info. Opaque to client.
- */
-struct opaque_auth {
- enum_t oa_flavor; /* flavor of auth */
- caddr_t oa_base; /* address of more auth stuff */
- u_int oa_length; /* not to exceed MAX_AUTH_BYTES */
-};
-
-
-/*
- * Auth handle, interface to client side authenticators.
- */
-typedef struct {
- struct opaque_auth ah_cred;
- struct opaque_auth ah_verf;
- union des_block ah_key;
- struct auth_ops {
- void (*ah_nextverf)();
- int (*ah_marshal)(); /* nextverf & serialize */
- int (*ah_validate)(); /* validate varifier */
- int (*ah_refresh)(); /* refresh credentials */
- void (*ah_destroy)(); /* destroy this structure */
- } *ah_ops;
- caddr_t ah_private;
-} AUTH;
-
-
-/*
- * Authentication ops.
- * The ops and the auth handle provide the interface to the authenticators.
- *
- * AUTH *auth;
- * XDR *xdrs;
- * struct opaque_auth verf;
- */
-#define AUTH_NEXTVERF(auth) \
- ((*((auth)->ah_ops->ah_nextverf))(auth))
-#define auth_nextverf(auth) \
- ((*((auth)->ah_ops->ah_nextverf))(auth))
-
-#define AUTH_MARSHALL(auth, xdrs) \
- ((*((auth)->ah_ops->ah_marshal))(auth, xdrs))
-#define auth_marshall(auth, xdrs) \
- ((*((auth)->ah_ops->ah_marshal))(auth, xdrs))
-
-#define AUTH_VALIDATE(auth, verfp) \
- ((*((auth)->ah_ops->ah_validate))((auth), verfp))
-#define auth_validate(auth, verfp) \
- ((*((auth)->ah_ops->ah_validate))((auth), verfp))
-
-#define AUTH_REFRESH(auth) \
- ((*((auth)->ah_ops->ah_refresh))(auth))
-#define auth_refresh(auth) \
- ((*((auth)->ah_ops->ah_refresh))(auth))
-
-#define AUTH_DESTROY(auth) \
- ((*((auth)->ah_ops->ah_destroy))(auth))
-#define auth_destroy(auth) \
- ((*((auth)->ah_ops->ah_destroy))(auth))
-
-
-extern struct opaque_auth _null_auth;
-
-
-/*
- * These are the various implementations of client side authenticators.
- */
-
-/*
- * Unix style authentication
- * AUTH *authunix_create(machname, uid, gid, len, aup_gids)
- * char *machname;
- * int uid;
- * int gid;
- * int len;
- * int *aup_gids;
- */
-extern AUTH *authunix_create();
-extern AUTH *authunix_create_default(); /* takes no parameters */
-extern AUTH *authnone_create(); /* takes no parameters */
-extern AUTH *authdes_create();
-
-#define AUTH_NONE 0 /* no authentication */
-#define AUTH_NULL 0 /* backward compatibility */
-#define AUTH_UNIX 1 /* unix style (uid, gids) */
-#define AUTH_SHORT 2 /* short hand unix style */
-#define AUTH_DES 3 /* des style (encrypted timestamps) */
-
-#endif /* RPC_AUTH_H */
diff --git a/cpukit/librpc/include/rpc/clnt.h b/cpukit/librpc/include/rpc/clnt.h
deleted file mode 100644
index faefdb5d50..0000000000
--- a/cpukit/librpc/include/rpc/clnt.h
+++ /dev/null
@@ -1,336 +0,0 @@
-#ifndef RPC_CLNT_H
-#define RPC_CLNT_H
-
-/* @(#)clnt.h 2.1 88/07/29 4.0 RPCSRC; from 1.31 88/02/08 SMI*/
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-/*
- * clnt.h - Client side remote procedure call interface.
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-
-#ifndef _CLNT_
-#define _CLNT_
-
-/*
- * Rpc calls return an enum clnt_stat. This should be looked at more,
- * since each implementation is required to live with this (implementation
- * independent) list of errors.
- */
-enum clnt_stat {
- RPC_SUCCESS=0, /* call succeeded */
- /*
- * local errors
- */
- RPC_CANTENCODEARGS=1, /* can't encode arguments */
- RPC_CANTDECODERES=2, /* can't decode results */
- RPC_CANTSEND=3, /* failure in sending call */
- RPC_CANTRECV=4, /* failure in receiving result */
- RPC_TIMEDOUT=5, /* call timed out */
- /*
- * remote errors
- */
- RPC_VERSMISMATCH=6, /* rpc versions not compatible */
- RPC_AUTHERROR=7, /* authentication error */
- RPC_PROGUNAVAIL=8, /* program not available */
- RPC_PROGVERSMISMATCH=9, /* program version mismatched */
- RPC_PROCUNAVAIL=10, /* procedure unavailable */
- RPC_CANTDECODEARGS=11, /* decode arguments error */
- RPC_SYSTEMERROR=12, /* generic "other problem" */
-
- /*
- * callrpc & clnt_create errors
- */
- RPC_UNKNOWNHOST=13, /* unknown host name */
- RPC_UNKNOWNPROTO=17, /* unkown protocol */
-
- /*
- * _ create errors
- */
- RPC_PMAPFAILURE=14, /* the pmapper failed in its call */
- RPC_PROGNOTREGISTERED=15, /* remote program is not registered */
- /*
- * unspecified error
- */
- RPC_FAILED=16
-};
-
-
-/*
- * Error info.
- */
-struct rpc_err {
- enum clnt_stat re_status;
- union {
- int RE_errno; /* realated system error */
- enum auth_stat RE_why; /* why the auth error occurred */
- struct {
- u_long low; /* lowest verion supported */
- u_long high; /* highest verion supported */
- } RE_vers;
- struct { /* maybe meaningful if RPC_FAILED */
- long s1;
- long s2;
- } RE_lb; /* life boot & debugging only */
- } ru;
-#define re_errno ru.RE_errno
-#define re_why ru.RE_why
-#define re_vers ru.RE_vers
-#define re_lb ru.RE_lb
-};
-
-
-/*
- * Client rpc handle.
- * Created by individual implementations, see e.g. rpc_udp.c.
- * Client is responsible for initializing auth, see e.g. auth_none.c.
- */
-typedef struct {
- AUTH *cl_auth; /* authenticator */
- struct clnt_ops {
- enum clnt_stat (*cl_call)(); /* call remote procedure */
- void (*cl_abort)(); /* abort a call */
- void (*cl_geterr)(); /* get specific error code */
- bool_t (*cl_freeres)(); /* frees results */
- void (*cl_destroy)();/* destroy this structure */
- bool_t (*cl_control)();/* the ioctl() of rpc */
- } *cl_ops;
- caddr_t cl_private; /* private stuff */
-} CLIENT;
-
-
-/*
- * client side rpc interface ops
- *
- * Parameter types are:
- *
- */
-
-/*
- * enum clnt_stat
- * CLNT_CALL(rh, proc, xargs, argsp, xres, resp, timeout)
- * CLIENT *rh;
- * u_long proc;
- * xdrproc_t xargs;
- * caddr_t argsp;
- * xdrproc_t xres;
- * caddr_t resp;
- * struct timeval timeout;
- */
-#define CLNT_CALL(rh, proc, xargs, argsp, xres, resp, secs) \
- ((*(rh)->cl_ops->cl_call)(rh, proc, xargs, argsp, xres, resp, secs))
-#define clnt_call(rh, proc, xargs, argsp, xres, resp, secs) \
- ((*(rh)->cl_ops->cl_call)(rh, proc, xargs, argsp, xres, resp, secs))
-
-/*
- * void
- * CLNT_ABORT(rh);
- * CLIENT *rh;
- */
-#define CLNT_ABORT(rh) ((*(rh)->cl_ops->cl_abort)(rh))
-#define clnt_abort(rh) ((*(rh)->cl_ops->cl_abort)(rh))
-
-/*
- * struct rpc_err
- * CLNT_GETERR(rh);
- * CLIENT *rh;
- */
-#define CLNT_GETERR(rh,errp) ((*(rh)->cl_ops->cl_geterr)(rh, errp))
-#define clnt_geterr(rh,errp) ((*(rh)->cl_ops->cl_geterr)(rh, errp))
-
-
-/*
- * bool_t
- * CLNT_FREERES(rh, xres, resp);
- * CLIENT *rh;
- * xdrproc_t xres;
- * caddr_t resp;
- */
-#define CLNT_FREERES(rh,xres,resp) ((*(rh)->cl_ops->cl_freeres)(rh,xres,resp))
-#define clnt_freeres(rh,xres,resp) ((*(rh)->cl_ops->cl_freeres)(rh,xres,resp))
-
-/*
- * bool_t
- * CLNT_CONTROL(cl, request, info)
- * CLIENT *cl;
- * u_int request;
- * char *info;
- */
-#define CLNT_CONTROL(cl,rq,in) ((*(cl)->cl_ops->cl_control)(cl,rq,in))
-#define clnt_control(cl,rq,in) ((*(cl)->cl_ops->cl_control)(cl,rq,in))
-
-/*
- * control operations that apply to both udp and tcp transports
- */
-#define CLSET_TIMEOUT 1 /* set timeout (timeval) */
-#define CLGET_TIMEOUT 2 /* get timeout (timeval) */
-#define CLGET_SERVER_ADDR 3 /* get server's address (sockaddr) */
-/*
- * udp only control operations
- */
-#define CLSET_RETRY_TIMEOUT 4 /* set retry timeout (timeval) */
-#define CLGET_RETRY_TIMEOUT 5 /* get retry timeout (timeval) */
-
-/*
- * void
- * CLNT_DESTROY(rh);
- * CLIENT *rh;
- */
-#define CLNT_DESTROY(rh) ((*(rh)->cl_ops->cl_destroy)(rh))
-#define clnt_destroy(rh) ((*(rh)->cl_ops->cl_destroy)(rh))
-
-
-/*
- * RPCTEST is a test program which is accessable on every rpc
- * transport/port. It is used for testing, performance evaluation,
- * and network administration.
- */
-
-#define RPCTEST_PROGRAM ((u_long)1)
-#define RPCTEST_VERSION ((u_long)1)
-#define RPCTEST_NULL_PROC ((u_long)2)
-#define RPCTEST_NULL_BATCH_PROC ((u_long)3)
-
-/*
- * By convention, procedure 0 takes null arguments and returns them
- */
-
-#define NULLPROC ((u_long)0)
-
-/*
- * Below are the client handle creation routines for the various
- * implementations of client side rpc. They can return NULL if a
- * creation failure occurs.
- */
-
-/*
- * Memory based rpc (for speed check and testing)
- * CLIENT *
- * clntraw_create(prog, vers)
- * u_long prog;
- * u_long vers;
- */
-extern CLIENT *clntraw_create();
-
-
-/*
- * Generic client creation routine. Supported protocols are "udp" and "tcp"
- */
-extern CLIENT *
-clnt_create(/*host, prog, vers, prot*/); /*
- char *host; -- hostname
- u_long prog; -- program number
- u_long vers; -- version number
- char *prot; -- protocol
-*/
-
-
-
-
-/*
- * TCP based rpc
- * CLIENT *
- * clnttcp_create(raddr, prog, vers, sockp, sendsz, recvsz)
- * struct sockaddr_in *raddr;
- * u_long prog;
- * u_long version;
- * register int *sockp;
- * u_int sendsz;
- * u_int recvsz;
- */
-extern CLIENT *clnttcp_create();
-
-/*
- * UDP based rpc.
- * CLIENT *
- * clntudp_create(raddr, program, version, wait, sockp)
- * struct sockaddr_in *raddr;
- * u_long program;
- * u_long version;
- * struct timeval wait;
- * int *sockp;
- *
- * Same as above, but you specify max packet sizes.
- * CLIENT *
- * clntudp_bufcreate(raddr, program, version, wait, sockp, sendsz, recvsz)
- * struct sockaddr_in *raddr;
- * u_long program;
- * u_long version;
- * struct timeval wait;
- * int *sockp;
- * u_int sendsz;
- * u_int recvsz;
- */
-extern CLIENT *clntudp_create();
-extern CLIENT *clntudp_bufcreate();
-
-/*
- * Print why creation failed
- */
-void clnt_pcreateerror(/* char *msg */); /* stderr */
-char *clnt_spcreateerror(/* char *msg */); /* string */
-
-/*
- * Like clnt_perror(), but is more verbose in its output
- */
-void clnt_perrno(/* enum clnt_stat num */); /* stderr */
-
-/*
- * Print an English error message, given the client error code
- */
-void clnt_perror(/* CLIENT *clnt, char *msg */); /* stderr */
-char *clnt_sperror(/* CLIENT *clnt, char *msg */); /* string */
-
-/*
- * If a creation fails, the following allows the user to figure out why.
- */
-struct rpc_createerr {
- enum clnt_stat cf_stat;
- struct rpc_err cf_error; /* useful when cf_stat == RPC_PMAPFAILURE */
-};
-
-extern struct rpc_createerr rpc_createerr;
-
-
-
-/*
- * Copy error message to buffer.
- */
-char *clnt_sperrno(/* enum clnt_stat num */); /* string */
-
-
-
-#define UDPMSGSIZE 8800 /* rpc imposed limit on udp msg size */
-#define RPCSMALLMSGSIZE 400 /* a more reasonable packet size */
-
-#endif /*!_CLNT_*/
-
-#endif /* RPC_CLNT_H */
diff --git a/cpukit/librpc/include/rpc/rpc.h b/cpukit/librpc/include/rpc/rpc.h
deleted file mode 100644
index 0a0affd82a..0000000000
--- a/cpukit/librpc/include/rpc/rpc.h
+++ /dev/null
@@ -1,86 +0,0 @@
-#ifndef RPC_H
-#define RPC_H
-
-/* @(#)rpc.h 2.4 89/07/11 4.0 RPCSRC; from 1.9 88/02/08 SMI */
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-/*
- * rpc.h, Just includes the billions of rpc header files necessary to
- * do remote procedure calling.
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-#ifndef __RPC_HEADER__
-#define __RPC_HEADER__
-
-#include <rpc/types.h> /* some typedefs */
-#include <netinet/in.h>
-#include <sys/socket.h>
-
-/* external data representation interfaces */
-#include <rpc/xdr.h> /* generic (de)serializer */
-
-/* Client side only authentication */
-#include <rpc/auth.h> /* generic authenticator (client side) */
-
-/* Client side (mostly) remote procedure call */
-#include <rpc/clnt.h> /* generic rpc stuff */
-
-/* semi-private protocol headers */
-#include <rpc/rpc_msg.h> /* protocol for rpc messages */
-/*#include "auth_unix.h" * protocol for unix style cred */
-/*
- * Uncomment-out the next line if you are building the rpc library with
- * DES Authentication (see the README file in the secure_rpc/ directory).
- */
-/*#include "auth_des.h" * protocol for des style cred */
-
-/* Server side only remote procedure callee */
-#include <rpc/svc.h> /* service manager and multiplexer */
-#include <rpc/svc_auth.h> /* service side authenticator */
-
-/*
- * COMMENT OUT THE NEXT INCLUDE (or add to the #ifndef) IF RUNNING ON
- * A VERSION OF UNIX THAT USES SUN'S NFS SOURCE. These systems will
- * already have the structures defined by <rpc/netdb.h> included in <netdb.h>.
- */
-/* routines for parsing /etc/rpc */
-
-struct rpcent {
- char *r_name; /* name of server for this rpc program */
- char **r_aliases; /* alias list */
- int r_number; /* rpc program number */
-};
-
-struct rpcent *getrpcbyname(), *getrpcbynumber(), *getrpcent();
-
-#endif /* ndef __RPC_HEADER__ */
-
-#endif /* RPC_H */
diff --git a/cpukit/librpc/include/rpc/rpc_msg.h b/cpukit/librpc/include/rpc/rpc_msg.h
deleted file mode 100644
index 2f34fb614c..0000000000
--- a/cpukit/librpc/include/rpc/rpc_msg.h
+++ /dev/null
@@ -1,192 +0,0 @@
-#ifndef RPC_MSG_H
-#define RPC_MSG_H
-
-/* @(#)rpc_msg.h 2.1 88/07/29 4.0 RPCSRC */
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-/* @(#)rpc_msg.h 1.7 86/07/16 SMI */
-
-/*
- * rpc_msg.h
- * rpc message definition
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-
-#define RPC_MSG_VERSION ((u_long) 2)
-#define RPC_SERVICE_PORT ((u_short) 2048)
-
-/*
- * Bottom up definition of an rpc message.
- * NOTE: call and reply use the same overall stuct but
- * different parts of unions within it.
- */
-
-enum msg_type {
- CALL=0,
- REPLY=1
-};
-
-enum reply_stat {
- MSG_ACCEPTED=0,
- MSG_DENIED=1
-};
-
-enum accept_stat {
- SUCCESS=0,
- PROG_UNAVAIL=1,
- PROG_MISMATCH=2,
- PROC_UNAVAIL=3,
- GARBAGE_ARGS=4,
- SYSTEM_ERR=5
-};
-
-enum reject_stat {
- RPC_MISMATCH=0,
- AUTH_ERROR=1
-};
-
-/*
- * Reply part of an rpc exchange
- */
-
-/*
- * Reply to an rpc request that was accepted by the server.
- * Note: there could be an error even though the request was
- * accepted.
- */
-struct accepted_reply {
- struct opaque_auth ar_verf;
- enum accept_stat ar_stat;
- union {
- struct {
- u_long low;
- u_long high;
- } AR_versions;
- struct {
- caddr_t where;
- xdrproc_t proc;
- } AR_results;
- /* and many other null cases */
- } ru;
-#define ar_results ru.AR_results
-#define ar_vers ru.AR_versions
-};
-
-/*
- * Reply to an rpc request that was rejected by the server.
- */
-struct rejected_reply {
- enum reject_stat rj_stat;
- union {
- struct {
- u_long low;
- u_long high;
- } RJ_versions;
- enum auth_stat RJ_why; /* why authentication did not work */
- } ru;
-#define rj_vers ru.RJ_versions
-#define rj_why ru.RJ_why
-};
-
-/*
- * Body of a reply to an rpc request.
- */
-struct reply_body {
- enum reply_stat rp_stat;
- union {
- struct accepted_reply RP_ar;
- struct rejected_reply RP_dr;
- } ru;
-#define rp_acpt ru.RP_ar
-#define rp_rjct ru.RP_dr
-};
-
-/*
- * Body of an rpc request call.
- */
-struct call_body {
- u_long cb_rpcvers; /* must be equal to two */
- u_long cb_prog;
- u_long cb_vers;
- u_long cb_proc;
- struct opaque_auth cb_cred;
- struct opaque_auth cb_verf; /* protocol specific - provided by client */
-};
-
-/*
- * The rpc message
- */
-struct rpc_msg {
- u_long rm_xid;
- enum msg_type rm_direction;
- union {
- struct call_body RM_cmb;
- struct reply_body RM_rmb;
- } ru;
-#define rm_call ru.RM_cmb
-#define rm_reply ru.RM_rmb
-};
-#define acpted_rply ru.RM_rmb.ru.RP_ar
-#define rjcted_rply ru.RM_rmb.ru.RP_dr
-
-
-/*
- * XDR routine to handle a rpc message.
- * xdr_callmsg(xdrs, cmsg)
- * XDR *xdrs;
- * struct rpc_msg *cmsg;
- */
-extern bool_t xdr_callmsg();
-
-/*
- * XDR routine to pre-serialize the static part of a rpc message.
- * xdr_callhdr(xdrs, cmsg)
- * XDR *xdrs;
- * struct rpc_msg *cmsg;
- */
-extern bool_t xdr_callhdr();
-
-/*
- * XDR routine to handle a rpc reply.
- * xdr_replymsg(xdrs, rmsg)
- * XDR *xdrs;
- * struct rpc_msg *rmsg;
- */
-extern bool_t xdr_replymsg();
-
-/*
- * Fills in the error part of a reply message.
- * _seterr_reply(msg, error)
- * struct rpc_msg *msg;
- * struct rpc_err *error;
- */
-extern void _seterr_reply();
-
-#endif /* RPC_MSG_H */
diff --git a/cpukit/librpc/include/rpc/svc.h b/cpukit/librpc/include/rpc/svc.h
deleted file mode 100644
index c576b5538b..0000000000
--- a/cpukit/librpc/include/rpc/svc.h
+++ /dev/null
@@ -1,291 +0,0 @@
-
-#ifndef RPC_SVC_H
-#define RPC_SVC_H
-
-/* @(#)svc.h 2.2 88/07/29 4.0 RPCSRC; from 1.20 88/02/08 SMI */
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-/*
- * svc.h, Server-side remote procedure call interface.
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-
-#ifndef __SVC_HEADER__
-#define __SVC_HEADER__
-
-/*
- * This interface must manage two items concerning remote procedure calling:
- *
- * 1) An arbitrary number of transport connections upon which rpc requests
- * are received. The two most notable transports are TCP and UDP; they are
- * created and registered by routines in svc_tcp.c and svc_udp.c, respectively;
- * they in turn call xprt_register and xprt_unregister.
- *
- * 2) An arbitrary number of locally registered services. Services are
- * described by the following four data: program number, version number,
- * "service dispatch" function, a transport handle, and a boolean that
- * indicates whether or not the exported program should be registered with a
- * local binder service; if true the program's number and version and the
- * port number from the transport handle are registered with the binder.
- * These data are registered with the rpc svc system via svc_register.
- *
- * A service's dispatch function is called whenever an rpc request comes in
- * on a transport. The request's program and version numbers must match
- * those of the registered service. The dispatch function is passed two
- * parameters, struct svc_req * and SVCXPRT *, defined below.
- */
-
-enum xprt_stat {
- XPRT_DIED,
- XPRT_MOREREQS,
- XPRT_IDLE
-};
-
-/*
- * Server side transport handle
- */
-typedef struct {
- int xp_sock;
- u_short xp_port; /* associated port number */
- struct xp_ops {
- bool_t (*xp_recv)(); /* receive incomming requests */
- enum xprt_stat (*xp_stat)(); /* get transport status */
- bool_t (*xp_getargs)(); /* get arguments */
- bool_t (*xp_reply)(); /* send reply */
- bool_t (*xp_freeargs)();/* free mem allocated for args */
- void (*xp_destroy)(); /* destroy this struct */
- } *xp_ops;
- int xp_addrlen; /* length of remote address */
- struct sockaddr_in xp_raddr; /* remote address */
- struct opaque_auth xp_verf; /* raw response verifier */
- caddr_t xp_p1; /* private */
- caddr_t xp_p2; /* private */
-} SVCXPRT;
-
-/*
- * Approved way of getting address of caller
- */
-#define svc_getcaller(x) (&(x)->xp_raddr)
-
-/*
- * Operations defined on an SVCXPRT handle
- *
- * SVCXPRT *xprt;
- * struct rpc_msg *msg;
- * xdrproc_t xargs;
- * caddr_t argsp;
- */
-#define SVC_RECV(xprt, msg) \
- (*(xprt)->xp_ops->xp_recv)((xprt), (msg))
-#define svc_recv(xprt, msg) \
- (*(xprt)->xp_ops->xp_recv)((xprt), (msg))
-
-#define SVC_STAT(xprt) \
- (*(xprt)->xp_ops->xp_stat)(xprt)
-#define svc_stat(xprt) \
- (*(xprt)->xp_ops->xp_stat)(xprt)
-
-#define SVC_GETARGS(xprt, xargs, argsp) \
- (*(xprt)->xp_ops->xp_getargs)((xprt), (xargs), (argsp))
-#define svc_getargs(xprt, xargs, argsp) \
- (*(xprt)->xp_ops->xp_getargs)((xprt), (xargs), (argsp))
-
-#define SVC_REPLY(xprt, msg) \
- (*(xprt)->xp_ops->xp_reply) ((xprt), (msg))
-#define svc_reply(xprt, msg) \
- (*(xprt)->xp_ops->xp_reply) ((xprt), (msg))
-
-#define SVC_FREEARGS(xprt, xargs, argsp) \
- (*(xprt)->xp_ops->xp_freeargs)((xprt), (xargs), (argsp))
-#define svc_freeargs(xprt, xargs, argsp) \
- (*(xprt)->xp_ops->xp_freeargs)((xprt), (xargs), (argsp))
-
-#define SVC_DESTROY(xprt) \
- (*(xprt)->xp_ops->xp_destroy)(xprt)
-#define svc_destroy(xprt) \
- (*(xprt)->xp_ops->xp_destroy)(xprt)
-
-
-/*
- * Service request
- */
-struct svc_req {
- u_long rq_prog; /* service program number */
- u_long rq_vers; /* service protocol version */
- u_long rq_proc; /* the desired procedure */
- struct opaque_auth rq_cred; /* raw creds from the wire */
- caddr_t rq_clntcred; /* read only cooked cred */
- SVCXPRT *rq_xprt; /* associated transport */
-};
-
-
-/*
- * Service registration
- *
- * svc_register(xprt, prog, vers, dispatch, protocol)
- * SVCXPRT *xprt;
- * u_long prog;
- * u_long vers;
- * void (*dispatch)();
- * int protocol; (like TCP or UDP, zero means do not register)
- */
-extern bool_t svc_register();
-
-/*
- * Service un-registration
- *
- * svc_unregister(prog, vers)
- * u_long prog;
- * u_long vers;
- */
-extern void svc_unregister();
-
-/*
- * Transport registration.
- *
- * xprt_register(xprt)
- * SVCXPRT *xprt;
- */
-extern void xprt_register();
-
-/*
- * Transport un-register
- *
- * xprt_unregister(xprt)
- * SVCXPRT *xprt;
- */
-extern void xprt_unregister();
-
-
-
-
-/*
- * When the service routine is called, it must first check to see if it
- * knows about the procedure; if not, it should call svcerr_noproc
- * and return. If so, it should deserialize its arguments via
- * SVC_GETARGS (defined above). If the deserialization does not work,
- * svcerr_decode should be called followed by a return. Successful
- * decoding of the arguments should be followed the execution of the
- * procedure's code and a call to svc_sendreply.
- *
- * Also, if the service refuses to execute the procedure due to too-
- * weak authentication parameters, svcerr_weakauth should be called.
- * Note: do not confuse access-control failure with weak authentication!
- *
- * NB: In pure implementations of rpc, the caller always waits for a reply
- * msg. This message is sent when svc_sendreply is called.
- * Therefore pure service implementations should always call
- * svc_sendreply even if the function logically returns void; use
- * xdr.h - xdr_void for the xdr routine. HOWEVER, tcp based rpc allows
- * for the abuse of pure rpc via batched calling or pipelining. In the
- * case of a batched call, svc_sendreply should NOT be called since
- * this would send a return message, which is what batching tries to avoid.
- * It is the service/protocol writer's responsibility to know which calls are
- * batched and which are not. Warning: responding to batch calls may
- * deadlock the caller and server processes!
- */
-
-extern bool_t svc_sendreply();
-extern void svcerr_decode();
-extern void svcerr_weakauth();
-extern void svcerr_noproc();
-extern void svcerr_progvers();
-extern void svcerr_auth();
-extern void svcerr_noprog();
-extern void svcerr_systemerr();
-
-/*
- * Lowest level dispatching -OR- who owns this process anyway.
- * Somebody has to wait for incoming requests and then call the correct
- * service routine. The routine svc_run does infinite waiting; i.e.,
- * svc_run never returns.
- * Since another (co-existant) package may wish to selectively wait for
- * incoming calls or other events outside of the rpc architecture, the
- * routine svc_getreq is provided. It must be passed readfds, the
- * "in-place" results of a select system call (see select, section 2).
- */
-
-/*
- * Global keeper of rpc service descriptors in use
- * dynamic; must be inspected before each call to select
- */
-#ifdef FD_SETSIZE
-extern fd_set svc_fdset;
-#define svc_fds svc_fdset.fds_bits[0] /* compatibility */
-#else
-extern int svc_fds;
-#endif /* def FD_SETSIZE */
-
-/*
- * a small program implemented by the svc_rpc implementation itself;
- * also see clnt.h for protocol numbers.
- */
-extern void rpctest_service();
-
-extern void svc_getreq();
-extern void svc_getreqset(); /* takes fdset instead of int */
-extern void svc_run(); /* never returns */
-
-/*
- * Socket to use on svcxxx_create call to get default socket
- */
-#define RPC_ANYSOCK -1
-
-/*
- * These are the existing service side transport implementations
- */
-
-/*
- * Memory based rpc for testing and timing.
- */
-extern SVCXPRT *svcraw_create();
-
-/*
- * Udp based rpc.
- */
-extern SVCXPRT *svcudp_create();
-extern SVCXPRT *svcudp_bufcreate();
-extern int svcudp_enablecache(SVCXPRT *transp, u_long size);
-
-/*
- * Tcp based rpc.
- */
-extern SVCXPRT *svctcp_create();
-
-
-
-#endif /* !__SVC_HEADER__ */
-
-extern int _rpcsvccount;
-extern int _rpcsvcstate;
-extern int _SERVED;
-
-#endif /* RPC_SVC_H */
diff --git a/cpukit/librpc/include/rpc/svc_auth.h b/cpukit/librpc/include/rpc/svc_auth.h
deleted file mode 100644
index 5c233a6a47..0000000000
--- a/cpukit/librpc/include/rpc/svc_auth.h
+++ /dev/null
@@ -1,47 +0,0 @@
-#ifndef RPC_SVC_AUTH_H
-#define RPC_SVC_AUTH_H
-
-/* @(#)svc_auth.h 2.1 88/07/29 4.0 RPCSRC */
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-/* @(#)svc_auth.h 1.6 86/07/16 SMI */
-
-/*
- * svc_auth.h, Service side of rpc authentication.
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-
-
-/*
- * Server side authenticator
- */
-extern enum auth_stat _authenticate();
-
-#endif /* SVC_AUTH_H */
diff --git a/cpukit/librpc/include/rpc/types.h b/cpukit/librpc/include/rpc/types.h
deleted file mode 100644
index b6d7eb3ccc..0000000000
--- a/cpukit/librpc/include/rpc/types.h
+++ /dev/null
@@ -1,75 +0,0 @@
-#ifndef RPC_TYPES_H
-#define RPC_TYPES_H
-
-/* @(#)types.h 2.3 88/08/15 4.0 RPCSRC */
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-/* @(#)types.h 1.18 87/07/24 SMI */
-
-/*
- * Rpc additions to <sys/types.h>
- */
-#ifndef __TYPES_RPC_HEADER__
-#define __TYPES_RPC_HEADER__
-
-/*#include <network/types.h>*/
-typedef unsigned long u_int32; /* 32-bit unsigned integers */
-
-#define bool_t int
-#define enum_t int
-#ifndef FALSE
-# define FALSE (0)
-#endif
-#ifndef TRUE
-# define TRUE (1)
-#endif
-#define __dontcare__ -1
-#ifndef NULL
-# define NULL 0
-#endif
-
-void *malloc();
-#define mem_alloc(bsize) malloc(bsize)
-#define mem_free(ptr, bsize) free(ptr)
-
-#ifndef makedev /* ie, we haven't already included it */
-#include <sys/types.h>
-#endif
-#include <sys/time.h>
-
-#ifndef INADDR_LOOPBACK
-#define INADDR_LOOPBACK (u_long)0x7F000001
-#endif
-#ifndef MAXHOSTNAMELEN
-#define MAXHOSTNAMELEN 64
-#endif
-
-#endif /* ndef __TYPES_RPC_HEADER__ */
-
-#endif /* RPC_TYPES_H */
diff --git a/cpukit/librpc/include/rpc/xdr.h b/cpukit/librpc/include/rpc/xdr.h
deleted file mode 100644
index ef2df51d93..0000000000
--- a/cpukit/librpc/include/rpc/xdr.h
+++ /dev/null
@@ -1,275 +0,0 @@
-#ifndef RPC_XDR_H
-#define RPC_XDR_H
-
-/* @(#)xdr.h 2.2 88/07/29 4.0 RPCSRC */
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-/* @(#)xdr.h 1.19 87/04/22 SMI */
-
-/*
- * xdr.h, External Data Representation Serialization Routines.
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-
-#ifndef __XDR_HEADER__
-#define __XDR_HEADER__
-
-/*
- * XDR provides a conventional way for converting between C data
- * types and an external bit-string representation. Library supplied
- * routines provide for the conversion on built-in C data types. These
- * routines and utility routines defined here are used to help implement
- * a type encode/decode routine for each user-defined type.
- *
- * Each data type provides a single procedure which takes two arguments:
- *
- * bool_t
- * xdrproc(xdrs, argresp)
- * XDR *xdrs;
- * <type> *argresp;
- *
- * xdrs is an instance of a XDR handle, to which or from which the data
- * type is to be converted. argresp is a pointer to the structure to be
- * converted. The XDR handle contains an operation field which indicates
- * which of the operations (ENCODE, DECODE * or FREE) is to be performed.
- *
- * XDR_DECODE may allocate space if the pointer argresp is null. This
- * data can be freed with the XDR_FREE operation.
- *
- * We write only one procedure per data type to make it easy
- * to keep the encode and decode procedures for a data type consistent.
- * In many cases the same code performs all operations on a user defined type,
- * because all the hard work is done in the component type routines.
- * decode as a series of calls on the nested data types.
- */
-
-/*
- * Xdr operations. XDR_ENCODE causes the type to be encoded into the
- * stream. XDR_DECODE causes the type to be extracted from the stream.
- * XDR_FREE can be used to release the space allocated by an XDR_DECODE
- * request.
- */
-enum xdr_op {
- XDR_ENCODE=0,
- XDR_DECODE=1,
- XDR_FREE=2
-};
-
-/*
- * This is the number of bytes per unit of external data.
- */
-#define BYTES_PER_XDR_UNIT (4)
-#define RNDUP(x) ((((x) + BYTES_PER_XDR_UNIT - 1) / BYTES_PER_XDR_UNIT) \
- * BYTES_PER_XDR_UNIT)
-
-/*
- * A xdrproc_t exists for each data type which is to be encoded or decoded.
- *
- * The second argument to the xdrproc_t is a pointer to an opaque pointer.
- * The opaque pointer generally points to a structure of the data type
- * to be decoded. If this pointer is 0, then the type routines should
- * allocate dynamic storage of the appropriate size and return it.
- * bool_t (*xdrproc_t)(XDR *, caddr_t *);
- */
-typedef bool_t (*xdrproc_t)();
-
-/*
- * The XDR handle.
- * Contains operation which is being applied to the stream,
- * an operations vector for the paticular implementation (e.g. see xdr_mem.c),
- * and two private fields for the use of the particular impelementation.
- */
-typedef struct {
- enum xdr_op x_op; /* operation; fast additional param */
- struct xdr_ops {
- bool_t (*x_getlong)(); /* get a long from underlying stream */
- bool_t (*x_putlong)(); /* put a long to " */
- bool_t (*x_getbytes)();/* get some bytes from " */
- bool_t (*x_putbytes)();/* put some bytes to " */
- u_int (*x_getpostn)();/* returns bytes off from beginning */
- bool_t (*x_setpostn)();/* lets you reposition the stream */
- long * (*x_inline)(); /* buf quick ptr to buffered data */
- void (*x_destroy)(); /* free privates of this xdr_stream */
- } *x_ops;
- caddr_t x_public; /* users' data */
- caddr_t x_private; /* pointer to private data */
- caddr_t x_base; /* private used for position info */
- int x_handy; /* extra private word */
-} XDR;
-
-/*
- * Operations defined on a XDR handle
- *
- * XDR *xdrs;
- * long *longp;
- * caddr_t addr;
- * u_int len;
- * u_int pos;
- */
-#define XDR_GETLONG(xdrs, longp) \
- (*(xdrs)->x_ops->x_getlong)(xdrs, longp)
-#define xdr_getlong(xdrs, longp) \
- (*(xdrs)->x_ops->x_getlong)(xdrs, longp)
-
-#define XDR_PUTLONG(xdrs, longp) \
- (*(xdrs)->x_ops->x_putlong)(xdrs, longp)
-#define xdr_putlong(xdrs, longp) \
- (*(xdrs)->x_ops->x_putlong)(xdrs, longp)
-
-#define XDR_GETBYTES(xdrs, addr, len) \
- (*(xdrs)->x_ops->x_getbytes)(xdrs, addr, len)
-#define xdr_getbytes(xdrs, addr, len) \
- (*(xdrs)->x_ops->x_getbytes)(xdrs, addr, len)
-
-#define XDR_PUTBYTES(xdrs, addr, len) \
- (*(xdrs)->x_ops->x_putbytes)(xdrs, addr, len)
-#define xdr_putbytes(xdrs, addr, len) \
- (*(xdrs)->x_ops->x_putbytes)(xdrs, addr, len)
-
-#define XDR_GETPOS(xdrs) \
- (*(xdrs)->x_ops->x_getpostn)(xdrs)
-#define xdr_getpos(xdrs) \
- (*(xdrs)->x_ops->x_getpostn)(xdrs)
-
-#define XDR_SETPOS(xdrs, pos) \
- (*(xdrs)->x_ops->x_setpostn)(xdrs, pos)
-#define xdr_setpos(xdrs, pos) \
- (*(xdrs)->x_ops->x_setpostn)(xdrs, pos)
-
-#define XDR_INLINE(xdrs, len) \
- (*(xdrs)->x_ops->x_inline)(xdrs, len)
-#define xdr_inline(xdrs, len) \
- (*(xdrs)->x_ops->x_inline)(xdrs, len)
-
-#define XDR_DESTROY(xdrs) \
- if ((xdrs)->x_ops->x_destroy) \
- (*(xdrs)->x_ops->x_destroy)(xdrs)
-#define xdr_destroy(xdrs) \
- if ((xdrs)->x_ops->x_destroy) \
- (*(xdrs)->x_ops->x_destroy)(xdrs)
-
-/*
- * Support struct for discriminated unions.
- * You create an array of xdrdiscrim structures, terminated with
- * a entry with a null procedure pointer. The xdr_union routine gets
- * the discriminant value and then searches the array of structures
- * for a matching value. If a match is found the associated xdr routine
- * is called to handle that part of the union. If there is
- * no match, then a default routine may be called.
- * If there is no match and no default routine it is an error.
- */
-#define NULL_xdrproc_t ((xdrproc_t)0)
-struct xdr_discrim {
- int value;
- xdrproc_t proc;
-};
-
-/*
- * In-line routines for fast encode/decode of primitve data types.
- * Caveat emptor: these use single memory cycles to get the
- * data from the underlying buffer, and will fail to operate
- * properly if the data is not aligned. The standard way to use these
- * is to say:
- * if ((buf = XDR_INLINE(xdrs, count)) == NULL)
- * return (FALSE);
- * <<< macro calls >>>
- * where ``count'' is the number of bytes of data occupied
- * by the primitive data types.
- *
- * N.B. and frozen for all time: each data type here uses 4 bytes
- * of external representation.
- */
-#define IXDR_GET_LONG(buf) ((long)ntohl((u_long)*(buf)++))
-#define IXDR_PUT_LONG(buf, v) (*(buf)++ = (long)htonl((u_long)v))
-
-#define IXDR_GET_BOOL(buf) ((bool_t)IXDR_GET_LONG(buf))
-#define IXDR_GET_ENUM(buf, t) ((t)IXDR_GET_LONG(buf))
-#define IXDR_GET_U_LONG(buf) ((u_long)IXDR_GET_LONG(buf))
-#define IXDR_GET_SHORT(buf) ((short)IXDR_GET_LONG(buf))
-#define IXDR_GET_U_SHORT(buf) ((u_short)IXDR_GET_LONG(buf))
-
-#define IXDR_PUT_BOOL(buf, v) IXDR_PUT_LONG((buf), ((long)(v)))
-#define IXDR_PUT_ENUM(buf, v) IXDR_PUT_LONG((buf), ((long)(v)))
-#define IXDR_PUT_U_LONG(buf, v) IXDR_PUT_LONG((buf), ((long)(v)))
-#define IXDR_PUT_SHORT(buf, v) IXDR_PUT_LONG((buf), ((long)(v)))
-#define IXDR_PUT_U_SHORT(buf, v) IXDR_PUT_LONG((buf), ((long)(v)))
-
-/*
- * These are the "generic" xdr routines.
- */
-extern bool_t xdr_void();
-extern bool_t xdr_int();
-extern bool_t xdr_u_int();
-extern bool_t xdr_long();
-extern bool_t xdr_u_long();
-extern bool_t xdr_short();
-extern bool_t xdr_u_short();
-extern bool_t xdr_bool();
-extern bool_t xdr_enum();
-extern bool_t xdr_array();
-extern bool_t xdr_bytes();
-extern bool_t xdr_opaque();
-extern bool_t xdr_string();
-extern bool_t xdr_union();
-extern bool_t xdr_char();
-extern bool_t xdr_u_char();
-extern bool_t xdr_vector();
-extern bool_t xdr_float();
-extern bool_t xdr_double();
-extern bool_t xdr_reference();
-extern bool_t xdr_pointer();
-extern bool_t xdr_wrapstring();
-
-/*
- * Common opaque bytes objects used by many rpc protocols;
- * declared here due to commonality.
- */
-#define MAX_NETOBJ_SZ 1024
-struct netobj {
- u_int n_len;
- char *n_bytes;
-};
-typedef struct netobj netobj;
-extern bool_t xdr_netobj();
-
-/*
- * These are the public routines for the various implementations of
- * xdr streams.
- */
-extern void xdrmem_create(); /* XDR using memory buffers */
-extern void xdrstdio_create(); /* XDR using stdio library */
-extern void xdrrec_create(); /* XDR pseudo records for tcp */
-extern bool_t xdrrec_endofrecord(); /* make end of xdr record */
-extern bool_t xdrrec_skiprecord(); /* move to beginning of next record */
-extern bool_t xdrrec_eof(); /* true if no more input */
-
-#endif /* !__XDR_HEADER__ */
-
-#endif /* RPC_XDR_H */
diff --git a/cpukit/librpc/src/Makefile.am b/cpukit/librpc/src/Makefile.am
deleted file mode 100644
index efa6a1cadb..0000000000
--- a/cpukit/librpc/src/Makefile.am
+++ /dev/null
@@ -1,35 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-LIBNAME = librpc
-LIB = ${ARCH}/${LIBNAME}.a
-
-C_FILES = rpc_callmsg.c rpc_prot.c svc.c svc_auth.c svc_udp.c xdr.c \
- xdr_array.c xdr_mem.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-SRCS = $(C_FILES)
-OBJS = $(C_O_FILES)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../automake/lib.am
-
-AM_CFLAGS += $(LIBC_DEFINES)
-
-TMPINSTALL_FILES += \
-$(PROJECT_RELEASE)/lib/$(LIBNAME)$(LIB_VARIANT).a
-
-$(LIB): ${OBJS}
- $(make-library)
-
-$(PROJECT_RELEASE)/lib/$(LIBNAME)$(LIB_VARIANT).a: $(LIB)
- $(INSTALL_DATA) $< $@
-
-all: ${ARCH} $(PREINSTALL_FILES) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES)
-
-include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/posix/Makefile.am b/cpukit/posix/Makefile.am
deleted file mode 100644
index 81d6737629..0000000000
--- a/cpukit/posix/Makefile.am
+++ /dev/null
@@ -1,11 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-
-SUBDIRS = include inline macros src optman
-
-include $(top_srcdir)/../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/cpukit/posix/include/Makefile.am b/cpukit/posix/include/Makefile.am
deleted file mode 100644
index 4abe5df1ee..0000000000
--- a/cpukit/posix/include/Makefile.am
+++ /dev/null
@@ -1,32 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-## RTEMS unistd.h needs to be checked against newlib's and removed
-UNUSED_H_FILES = devctl.h intr.h unistd.h
-
-H_FILES = pthread.h sched.h aio.h mqueue.h semaphore.h
-
-noinst_HEADERS = $(H_FILES)
-
-PREINSTALL_FILES = \
-$(PROJECT_INCLUDE) \
-$(noinst_HEADERS:%=$(PROJECT_INCLUDE)/%)
-
-$(PROJECT_INCLUDE):
- @$(mkinstalldirs) $@
-$(PROJECT_INCLUDE)/%.h: %.h
- $(INSTALL_DATA) $< $@
-
-all-am: $(PREINSTALL_FILES)
-debug-am: $(PREINSTALL_FILES)
-profile-am: $(PREINSTALL_FILES)
-
-SUBDIRS = rtems sys
-
-EXTRA_DIST = $(UNUSED_H_FILES)
-
-include $(top_srcdir)/../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/cpukit/posix/include/aio.h b/cpukit/posix/include/aio.h
deleted file mode 100644
index 8fc18a59f2..0000000000
--- a/cpukit/posix/include/aio.h
+++ /dev/null
@@ -1,145 +0,0 @@
-/* aio.h
- *
- * $Id$
- */
-
-#ifndef __POSIX_ASYNCHRONOUS_IO_h
-#define __POSIX_ASYNCHRONOUS_IO_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <sys/features.h>
-
-#if defined(_POSIX_ASYNCHRONOUS_IO)
-
-/*
- * 6.7.1 Data Definitions for Asynchronous Input and Output,
- * P1003.1b-1993, p. 151
- */
-
-#include <sys/types.h>
-#include <signal.h>
-#include <time.h>
-#include <fcntl.h>
-
-/*
- * 6.7.1.2 Manifest Constants, P1003.1b-1993, p. 153
- */
-
-#define AIO_CANCELED 0 /* all requested operations have been canceled */
-#define AIO_NOTCANCELED 1 /* some of the operations could not be canceled */
- /* since they are in progress */
-#define AIO_ALLDONE 2 /* none of the requested operations could be */
- /* canceled since they are already complete */
-
-/* lio_listio() options */
-
-#define LIO_WAIT 0 /* calling process is to suspend until the */
- /* operation is complete */
-#define LIO_NOWAIT 1 /* calling process is to continue execution while */
- /* the operation is performed and no notification */
- /* shall be given when the operation is completed */
-#define LIO_READ 2 /* request a read() */
-#define LIO_WRITE 3 /* request a write() */
-#define LIO_NOP 4 /* no transfer is requested */
-
-/*
- * 6.7.1.1 Asynchronous I/O Control Block, P1003.1b-1993, p. 151
- */
-
-struct aiocb {
- int aio_fildes; /* File descriptor */
- off_t aio_offset; /* File offset */
- volatile void *aio_buf; /* Location of buffer */
- size_t aio_nbytes; /* Length of transfer */
- int aio_reqprio; /* Request priority offset */
- struct sigevent aio_sigevent; /* Signal number and value */
- int aoi_lio_opcode; /* Operation to be performed */
-};
-
-/*
- * 6.7.2 Asynchronous Read, P1003.1b-1993, p. 154
- */
-
-int aio_read(
- struct aiocb *aiocbp
-);
-
-/*
- * 6.7.3 Asynchronous Write, P1003.1b-1993, p. 155
- */
-
-int aio_write(
- struct aiocb *aiocbp
-);
-
-/*
- * 6.7.4 List Directed I/O, P1003.1b-1993, p. 158
- */
-
-int lio_listio(
- int mode,
- struct aiocb * const list[],
- int nent,
- struct sigevent *sig
-);
-
-/*
- * 6.7.5 Retrieve Error of Asynchronous I/O Operation, P1003.1b-1993, p. 161
- */
-
-int aio_error(
- const struct aiocb *aiocbp
-);
-
-/*
- * 6.7.6 Retrieve Return Status of Asynchronous I/O Operation,
- * P1003.1b-1993, p. 162
- */
-
-int aio_return(
- const struct aiocb *aiocbp
-);
-
-/*
- * 6.7.7 Cancel Asynchronous I/O Operation, P1003.1b-1993, p. 163
- */
-
-int aio_cancel(
- int filedes,
- struct aiocb *aiocbp
-);
-
-/*
- * 6.7.7 Wait for Asynchronous I/O Request, P1003.1b-1993, p. 164
- */
-
-int aio_suspend(
- struct aiocb * const list[],
- int nent,
- const struct timespec *timeout
-);
-
-#if defined(_POSIX_SYNCHRONIZED_IO)
-
-/*
- * 6.7.9 Asynchronous File Synchronization, P1003.1b-1993, p. 166
- */
-
-int aio_fsync(
- int op,
- struct aiocb *aiocbp
-);
-
-#endif /* _POSIX_SYNCHRONIZED_IO */
-
-#endif /* _POSIX_ASYNCHRONOUS_IO */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/posix/include/devctl.h b/cpukit/posix/include/devctl.h
deleted file mode 100644
index 85fca4cc11..0000000000
--- a/cpukit/posix/include/devctl.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* devctl.h
- *
- * $Id$
- */
-
-#ifndef __POSIX_DEVICE_CONTROL_h
-#define __POSIX_DEVICE_CONTROL_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <sys/features.h>
-
-#if defined(_POSIX_DEVICE_CONTROL)
-
-#include <sys/types.h>
-#include <unistd.h>
-
-/*
- * 21.2.1 Control a Device, P1003.4b/D8, p. 65
- */
-
-int devctl(
- int filedes,
- void *dev_data_ptr,
- size_t nbyte,
- int *dev_info_ptr
-);
-
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/posix/include/intr.h b/cpukit/posix/include/intr.h
deleted file mode 100644
index 48aaf64160..0000000000
--- a/cpukit/posix/include/intr.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/* intr.h
- *
- * XXX: It is unclear if the type "intr_t" should be defined when
- * _POSIX_INTERRUPT_CONTROL is not.
- *
- * $Id$
- */
-
-#ifndef __POSIX_INTERRUPTS_h
-#define __POSIX_INTERRUPTS_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <sys/features.h>
-#include <sys/types.h>
-#include <sys/time.h>
-
-#if defined(_POSIX_INTERRUPT_CONTROL)
-
-/*
- * 22.2 Concepts, P1003.4b/D8, p. 73
- */
-
-typedef int intr_t;
-
-/*
- * 22.3.1 Associate a User-Written ISR with an Interrupt, P1003.4b/D8, p. 74
- */
-
-/*
- * Return codes from an interrupt handler
- */
-
-#define INTR_HANDLED_NOTIFY 0 /* ISR handled this interrupt, notify */
- /* the thread that registered the */
- /* ISR that the interrupt occurred. */
-#define INTR_HANDLED_DO_NOT_NOTIFY 1 /* ISR handled this interrupt, but */
- /* do NOT perform notification. */
-#define INTR_NOT_HANDLED 2 /* ISR did not handle this interrupt, */
- /* let the next handler try. */
-
-int intr_capture(
- intr_t intr,
- int (*intr_handler)( void *area ),
- volatile void *area,
- size_t areasize
-);
-
-int intr_release(
- intr_t intr,
- int (*intr_handler)( void *area )
-);
-
-int intr_lock(
- intr_t intr
-);
-
-int intr_unlock(
- intr_t intr
-);
-
-/*
- * 22.3.2 Await Interrupt Notification, P1003.4b/D8, p. 76
- */
-
-int intr_timed_wait(
- int flags,
- const struct timespec *timeout
-);
-
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/posix/include/mqueue.h b/cpukit/posix/include/mqueue.h
deleted file mode 100644
index 8d117862ea..0000000000
--- a/cpukit/posix/include/mqueue.h
+++ /dev/null
@@ -1,153 +0,0 @@
-/* mqueue.h
- *
- * $Id$
- */
-
-#ifndef __POSIX_MESSAGE_QUEUE_h
-#define __POSIX_MESSAGE_QUEUE_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <sys/features.h>
-
-#if defined(_POSIX_MESSAGE_PASSING)
-
-#include <sys/types.h>
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-
-/*
- * 15.1.1 Data Structures, P1003.1b-1993, p. 271
- */
-
-typedef Objects_Id mqd_t;
-
-struct mq_attr {
- long mq_flags; /* Message queue flags */
- long mq_maxmsg; /* Maximum number of messages */
- long mq_msgsize; /* Maximum message size */
- long mq_curmsgs; /* Number of messages currently queued */
-};
-
-/*
- * 15.2.2 Open a Message Queue, P1003.1b-1993, p. 272
- */
-
-mqd_t mq_open(
- const char *name,
- int oflag,
- ...
-);
-
-/*
- * 15.2.2 Close a Message Queue, P1003.1b-1993, p. 275
- */
-
-int mq_close(
- mqd_t mqdes
-);
-
-/*
- * 15.2.2 Remove a Message Queue, P1003.1b-1993, p. 276
- */
-
-int mq_unlink(
- const char *name
-);
-
-/*
- * 15.2.4 Send a Message to a Message Queue, P1003.1b-1993, p. 277
- *
- * NOTE: P1003.4b/D8, p. 45 adds mq_timedsend().
- */
-
-int mq_send(
- mqd_t mqdes,
- const char *msg_ptr,
- size_t msg_len,
- unsigned int msg_prio
-);
-
-#if defined(_POSIX_TIMEOUTS)
-
-#include <time.h>
-
-int mq_timedsend(
- mqd_t mqdes,
- const char *msg_ptr,
- size_t msg_len,
- unsigned int msg_prio,
- const struct timespec *timeout
-);
-
-#endif /* _POSIX_TIMEOUTS */
-
-/*
- * 15.2.5 Receive a Message From a Message Queue, P1003.1b-1993, p. 279
- *
- * NOTE: P1003.4b/D8, p. 45 adds mq_timedreceive().
- */
-
-ssize_t mq_receive(
- mqd_t mqdes,
- char *msg_ptr,
- size_t msg_len,
- unsigned int *msg_prio
-);
-
-#if defined(_POSIX_TIMEOUTS)
-
-int mq_timedreceive( /* XXX: should this be ssize_t */
- mqd_t mqdes,
- char *msg_ptr,
- size_t msg_len,
- unsigned int *msg_prio,
- const struct timespec *timeout
-);
-
-#endif /* _POSIX_TIMEOUTS */
-
-#if defined(_POSIX_REALTIME_SIGNALS)
-
-/*
- * 15.2.6 Notify Process that a Message is Available on a Queue,
- * P1003.1b-1993, p. 280
- */
-
-int mq_notify(
- mqd_t mqdes,
- const struct sigevent *notification
-);
-
-#endif /* _POSIX_REALTIME_SIGNALS */
-
-/*
- * 15.2.7 Set Message Queue Attributes, P1003.1b-1993, p. 281
- */
-
-int mq_setattr(
- mqd_t mqdes,
- const struct mq_attr *mqstat,
- struct mq_attr *omqstat
-);
-
-/*
- * 15.2.8 Get Message Queue Attributes, P1003.1b-1993, p. 283
- */
-
-int mq_getattr(
- mqd_t mqdes,
- struct mq_attr *mqstat
-);
-
-#endif /* _POSIX_MESSAGE_PASSING */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/posix/include/rtems/posix/cancel.h b/cpukit/posix/include/rtems/posix/cancel.h
deleted file mode 100644
index f50b8c6f06..0000000000
--- a/cpukit/posix/include/rtems/posix/cancel.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* rtems/posix/cancel.h
- *
- * $Id$
- */
-
-#ifndef __RTEMS_POSIX_CANCEL_h
-#define __RTEMS_POSIX_CANCEL_h
-
-typedef struct {
- Chain_Node Node;
- void (*routine)( void * );
- void *arg;
-} POSIX_Cancel_Handler_control;
-
-/*
- * _POSIX_Thread_cancel_run
- *
- * DESCRIPTION:
- *
- * This support routine runs through the chain of cancel handlers that
- * have been registered and executes them.
- */
-
-void _POSIX_Thread_cancel_run(
- Thread_Control *the_thread
-);
-
-#endif
-/* end of include file */
diff --git a/cpukit/posix/include/rtems/posix/cond.h b/cpukit/posix/include/rtems/posix/cond.h
deleted file mode 100644
index c0c5395fd6..0000000000
--- a/cpukit/posix/include/rtems/posix/cond.h
+++ /dev/null
@@ -1,167 +0,0 @@
-/* rtems/posix/cond.h
- *
- * This include file contains all the private support information for
- * POSIX condition variables.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_POSIX_CONDITION_VARIABLES_h
-#define __RTEMS_POSIX_CONDITION_VARIABLES_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/object.h>
-#include <rtems/score/threadq.h>
-
-/*
- * Constant to indicate condition variable does not currently have
- * a mutex assigned to it.
- */
-
-#define POSIX_CONDITION_VARIABLES_NO_MUTEX 0
-
-/*
- * Data Structure used to manage a POSIX condition variable
- */
-
-typedef struct {
- Objects_Control Object;
- int process_shared;
- pthread_mutex_t Mutex;
- Thread_queue_Control Wait_queue;
-} POSIX_Condition_variables_Control;
-
-/*
- * The following defines the information control block used to manage
- * this class of objects.
- */
-
-POSIX_EXTERN Objects_Information _POSIX_Condition_variables_Information;
-
-/*
- * The default condition variable attributes structure.
- */
-
-extern const pthread_condattr_t _POSIX_Condition_variables_Default_attributes;
-
-/*
- * _POSIX_Condition_variables_Manager_initialization
- *
- * DESCRIPTION:
- *
- * This routine performs the initialization necessary for this manager.
- */
-
-void _POSIX_Condition_variables_Manager_initialization(
- unsigned32 maximum_condition_variables
-);
-
-/*
- * _POSIX_Condition_variables_Allocate
- *
- * DESCRIPTION:
- *
- * This function allocates a condition variable control block from
- * the inactive chain of free condition variable control blocks.
- */
-
-RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *
- _POSIX_Condition_variables_Allocate( void );
-
-/*
- * _POSIX_Condition_variables_Free
- *
- * DESCRIPTION:
- *
- * This routine frees a condition variable control block to the
- * inactive chain of free condition variable control blocks.
- */
-
-RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Free (
- POSIX_Condition_variables_Control *the_condition_variable
-);
-
-/*
- * _POSIX_Condition_variables_Get
- *
- * DESCRIPTION:
- *
- * This function maps condition variable IDs to condition variable control
- * blocks. If ID corresponds to a local condition variable, then it returns
- * the_condition variable control pointer which maps to ID and location
- * is set to OBJECTS_LOCAL. if the condition variable ID is global and
- * resides on a remote node, then location is set to OBJECTS_REMOTE,
- * and the_condition variable is undefined. Otherwise, location is set
- * to OBJECTS_ERROR and the_condition variable is undefined.
- */
-
-RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get (
- Objects_Id *id,
- Objects_Locations *location
-);
-
-/*
- * _POSIX_Condition_variables_Is_null
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the_condition variable is NULL
- * and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _POSIX_Condition_variables_Is_null (
- POSIX_Condition_variables_Control *the_condition_variable
-);
-
-/*
- * _POSIX_Condition_variables_Signal_support
- *
- * DESCRIPTION:
- *
- * A support routine which implements guts of the broadcast and single task
- * wake up version of the "signal" operation.
- */
-
-int _POSIX_Condition_variables_Signal_support(
- pthread_cond_t *cond,
- boolean is_broadcast
-);
-
-/*
- * _POSIX_Condition_variables_Wait_support
- *
- * DESCRIPTION:
- *
- * A support routine which implements guts of the blocking, non-blocking, and
- * timed wait version of condition variable wait routines.
- */
-
-int _POSIX_Condition_variables_Wait_support(
- pthread_cond_t *cond,
- pthread_mutex_t *mutex,
- Watchdog_Interval timeout,
- boolean already_timedout
-);
-
-#include <rtems/posix/cond.inl>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/posix/condmp.h>
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/posix/include/rtems/posix/condmp.h b/cpukit/posix/include/rtems/posix/condmp.h
deleted file mode 100644
index dfd10e57a3..0000000000
--- a/cpukit/posix/include/rtems/posix/condmp.h
+++ /dev/null
@@ -1,161 +0,0 @@
-/* condmp.h
- *
- * This include file contains all the constants and structures associated
- * with the Multiprocessing Support in the POSIX Condition Variable Manager.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_POSIX_CONDITION_VARIABLES_MP_h
-#define __RTEMS_POSIX_CONDITION_VARIABLES_MP_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/mppkt.h>
-#include <rtems/score/object.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/watchdog.h>
-
-/*
- * The following enumerated type defines the list of
- * remote condition variable operations.
- */
-
-typedef enum {
- POSIX_CONDITION_VARIABLES_MP_ANNOUNCE_CREATE = 0,
- POSIX_CONDITION_VARIABLES_MP_ANNOUNCE_DELETE = 1,
- POSIX_CONDITION_VARIABLES_MP_EXTRACT_PROXY = 2,
- POSIX_CONDITION_VARIABLES_MP_OBTAIN_REQUEST = 3,
- POSIX_CONDITION_VARIABLES_MP_OBTAIN_RESPONSE = 4,
- POSIX_CONDITION_VARIABLES_MP_RELEASE_REQUEST = 5,
- POSIX_CONDITION_VARIABLES_MP_RELEASE_RESPONSE = 6,
-} POSIX_Condition_variables_MP_Remote_operations;
-
-/*
- * The following data structure defines the packet used to perform
- * remote condition variable operations.
- */
-
-typedef struct {
- MP_packet_Prefix Prefix;
- POSIX_Condition_variables_MP_Remote_operations operation;
- Objects_Name name;
- boolean wait; /* XXX options */
- Objects_Id proxy_id;
-} POSIX_Condition_variables_MP_Packet;
-
-/*
- * _POSIX_Condition_variables_MP_Send_process_packet
- *
- * DESCRIPTION:
- *
- * This routine performs a remote procedure call so that a
- * process operation can be performed on another node.
- */
-
-void _POSIX_Condition_variables_MP_Send_process_packet (
- POSIX_Condition_variables_MP_Remote_operations operation,
- Objects_Id condition_variables_id,
- Objects_Name name,
- Objects_Id proxy_id
-);
-
-/*
- * _POSIX_Condition_variables_MP_Send_request_packet
- *
- * DESCRIPTION:
- *
- * This routine performs a remote procedure call so that a
- * directive operation can be initiated on another node.
- */
-
-int _POSIX_Condition_variables_MP_Send_request_packet (
- POSIX_Condition_variables_MP_Remote_operations operation,
- Objects_Id condition_variables_id,
- boolean wait, /* XXX options */
- Watchdog_Interval timeout
-);
-
-/*
- * _POSIX_Condition_variables_MP_Send_response_packet
- *
- * DESCRIPTION:
- *
- * This routine performs a remote procedure call so that a
- * directive can be performed on another node.
- */
-
-void _POSIX_Condition_variables_MP_Send_response_packet (
- POSIX_Condition_variables_MP_Remote_operations operation,
- Objects_Id condition_variables_id,
- Thread_Control *the_thread
-);
-
-/*
- *
- * _POSIX_Condition_variables_MP_Process_packet
- *
- * DESCRIPTION:
- *
- * This routine performs the actions specific to this package for
- * the request from another node.
- */
-
-void _POSIX_Condition_variables_MP_Process_packet (
- MP_packet_Prefix *the_packet_prefix
-);
-
-/*
- * _POSIX_Condition_variables_MP_Send_object_was_deleted
- *
- * DESCRIPTION:
- *
- * This routine is invoked indirectly by the thread queue
- * when a proxy has been removed from the thread queue and
- * the remote node must be informed of this.
- */
-
-void _POSIX_Condition_variables_MP_Send_object_was_deleted (
- Thread_Control *the_proxy
-);
-
-/*
- * _POSIX_Condition_variables_MP_Send_extract_proxy
- *
- * DESCRIPTION:
- *
- * This routine is invoked when a task is deleted and it
- * has a proxy which must be removed from a thread queue and
- * the remote node must be informed of this.
- */
-
-void _POSIX_Condition_variables_MP_Send_extract_proxy (
- Thread_Control *the_thread
-);
-
-/*
- * _POSIX_Condition_variables_MP_Get_packet
- *
- * DESCRIPTION:
- *
- * This function is used to obtain a condition variable mp packet.
- */
-
-POSIX_Condition_variables_MP_Packet
- *_POSIX_Condition_variables_MP_Get_packet ( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of file */
diff --git a/cpukit/posix/include/rtems/posix/config.h b/cpukit/posix/include/rtems/posix/config.h
deleted file mode 100644
index 6725d12e09..0000000000
--- a/cpukit/posix/include/rtems/posix/config.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* config.h
- *
- * This include file contains the table of user defined configuration
- * parameters specific for the POSIX API.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_POSIX_CONFIGURATION_h
-#define __RTEMS_POSIX_CONFIGURATION_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * XXX
- *
- * The following records define the Configuration Table. The
- * information contained in this table is required in all
- * RTEMS systems, whether single or multiprocessor. This
- * table primarily defines the following:
- *
- * + required number of each object type
- */
-
-/*
- * For now, we are only allowing the user to specify the entry point
- * and stack size for POSIX initialization threads.
- */
-
-typedef struct {
- void *(*thread_entry)(void *);
- int stack_size;
-} posix_initialization_threads_table;
-
-typedef struct {
- int maximum_threads;
- int maximum_mutexes;
- int maximum_condition_variables;
- int maximum_keys;
- int maximum_timers;
- int maximum_queued_signals;
- int maximum_message_queues;
- int maximum_semaphores;
- int number_of_initialization_threads;
- posix_initialization_threads_table *User_initialization_threads_table;
-} posix_api_configuration_table;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/posix/include/rtems/posix/intr.h b/cpukit/posix/include/rtems/posix/intr.h
deleted file mode 100644
index 0dcadd6722..0000000000
--- a/cpukit/posix/include/rtems/posix/intr.h
+++ /dev/null
@@ -1,153 +0,0 @@
-/* rtems/posix/intr.h
- *
- * This include file contains all the private support information for
- * POSIX Interrupt Manager.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_POSIX_KEY_h
-#define __RTEMS_POSIX_KEY_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-
-/*
- * Data Structure used to manage each POSIX Interrupt Vector
- */
-
-typedef struct {
- int number_installed;
- int lock_count;
- int deferred_count;
- Chain_Control Handlers;
-} POSIX_Interrupt_Control;
-
-/*
- * Data Structure used to manage a POSIX Interrupt Handler
- */
-
-typedef struct {
- Objects_Control Object;
- int is_active;
- intr_t vector;
- Thread_Control *server;
- int (*handler)( void *area );
- volatile void *user_data_area;
-} POSIX_Interrupt_Handler_control;
-
-/*
- * The following defines the information control block used to manage
- * this class of objects.
- */
-
-POSIX_EXTERN Objects_Information _POSIX_Interrupt_Handlers_Information;
-
-/*
- * The following is an array which is used to manage the set of
- * interrupt handlers installed on each vector.
- */
-
-POSIX_EXTERN POSIX_Interrupt_Control
- _POSIX_Interrupt_Information[ ISR_NUMBER_OF_VECTORS ];
-
-/*
- * _POSIX_Interrupt_Manager_initialization
- *
- * DESCRIPTION:
- *
- * This routine performs the initialization necessary for this manager.
- */
-
-void _POSIX_Interrupt_Manager_initialization(
- unsigned32 maximum_interrupt_handlers
-);
-
-/*
- * _POSIX_Interrupt_Allocate
- *
- * DESCRIPTION:
- *
- * This function allocates a interrupt handler control block from
- * the inactive chain of free interrupt handler control blocks.
- */
-
-RTEMS_INLINE_ROUTINE POSIX_Interrupt_Handler_control *
- _POSIX_Interrupt_Allocate( void );
-
-/*
- * _POSIX_Interrupt_Free
- *
- * DESCRIPTION:
- *
- * This routine frees a interrupt handler control block to the
- * inactive chain of free interrupt handler control blocks.
- */
-
-RTEMS_INLINE_ROUTINE void _POSIX_Interrupt_Free (
- POSIX_Interrupt_Handler_control *the_intr
-);
-
-/*
- * _POSIX_Interrupt_Get
- *
- * DESCRIPTION:
- *
- * This function maps interrupt handler IDs to interrupt handler control
- * blocks. If ID corresponds to a local interrupt handler, then it returns
- * the_intr control pointer which maps to ID and location
- * is set to OBJECTS_LOCAL. if the interrupt handler ID is global and
- * resides on a remote node, then location is set to OBJECTS_REMOTE,
- * and the_intr is undefined. Otherwise, location is set
- * to OBJECTS_ERROR and the_intr is undefined.
- */
-
-RTEMS_INLINE_ROUTINE POSIX_Interrupt_Control *_POSIX_Interrupt_Get (
- Objects_Id id,
- Objects_Locations *location
-);
-
-/*
- * _POSIX_Interrupt_Is_null
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the_intr is NULL and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _POSIX_Interrupt_Is_null (
- POSIX_Interrupt_Handler_control *the_intr
-);
-
-/*
- * _POSIX_Interrupt_Handler
- *
- * DESCRIPTION:
- *
- * This function XXX.
- */
-
-void _POSIX_Interrupt_Handler(
- ISR_Vector_number vector
-);
-
-#include <rtems/posix/intr.inl>
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/posix/include/rtems/posix/key.h b/cpukit/posix/include/rtems/posix/key.h
deleted file mode 100644
index ddebf6f0ee..0000000000
--- a/cpukit/posix/include/rtems/posix/key.h
+++ /dev/null
@@ -1,135 +0,0 @@
-/* rtems/posix/key.h
- *
- * This include file contains all the private support information for
- * POSIX key.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_POSIX_KEY_h
-#define __RTEMS_POSIX_KEY_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Data Structure used to manage a POSIX key
- *
- * NOTE: The Values is a table indexed by the index portion of the
- * ID of the currently executing thread.
- */
-
-typedef struct {
- Objects_Control Object;
- boolean is_active;
- void (*destructor)( void * );
- void **Values[ OBJECTS_CLASSES_LAST_THREAD_CLASS + 1 ];
-} POSIX_Keys_Control;
-
-/*
- * The following defines the information control block used to manage
- * this class of objects.
- */
-
-POSIX_EXTERN Objects_Information _POSIX_Keys_Information;
-
-/*
- * _POSIX_Keys_Manager_initialization
- *
- * DESCRIPTION:
- *
- * This routine performs the initialization necessary for this manager.
- */
-
-void _POSIX_Key_Manager_initialization(
- unsigned32 maximum_keys
-);
-
-/*
- * _POSIX_Keys_Run_destructors
- *
- * DESCRIPTION:
- *
- * This function executes all the destructors associated with the thread's
- * keys. This function will execute until all values have been set to NULL.
- *
- * NOTE: This is the routine executed when a thread exits to
- * run through all the keys and do the destructor action.
- */
-
-void _POSIX_Keys_Run_destructors(
- Thread_Control *thread
-);
-
-/*
- * _POSIX_Keys_Allocate
- *
- * DESCRIPTION:
- *
- * This function allocates a keys control block from
- * the inactive chain of free keys control blocks.
- */
-
-RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void );
-
-/*
- * _POSIX_Keys_Free
- *
- * DESCRIPTION:
- *
- * This routine frees a keys control block to the
- * inactive chain of free keys control blocks.
- */
-
-RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free (
- POSIX_Keys_Control *the_key
-);
-
-/*
- * _POSIX_Keys_Get
- *
- * DESCRIPTION:
- *
- * This function maps key IDs to key control blocks.
- * If ID corresponds to a local keys, then it returns
- * the_key control pointer which maps to ID and location
- * is set to OBJECTS_LOCAL. if the keys ID is global and
- * resides on a remote node, then location is set to OBJECTS_REMOTE,
- * and the_key is undefined. Otherwise, location is set
- * to OBJECTS_ERROR and the_key is undefined.
- */
-
-RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Get (
- Objects_Id id,
- Objects_Locations *location
-);
-
-/*
- * _POSIX_Keys_Is_null
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the_key is NULL and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _POSIX_Keys_Is_null (
- POSIX_Keys_Control *the_key
-);
-
-#include <rtems/posix/key.inl>
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/posix/include/rtems/posix/mqueue.h b/cpukit/posix/include/rtems/posix/mqueue.h
deleted file mode 100644
index e3f7a2f073..0000000000
--- a/cpukit/posix/include/rtems/posix/mqueue.h
+++ /dev/null
@@ -1,242 +0,0 @@
-/* rtems/posix/mqueue.h
- *
- * This include file contains all the private support information for
- * POSIX Message Queues.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_POSIX_MESSAGE_QUEUE_h
-#define __RTEMS_POSIX_MESSAGE_QUEUE_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <sys/siginfo.h>
-
-#include <rtems/score/coremsg.h>
-#include <rtems/score/object.h>
-
-/*
- * Data Structure used to manage a POSIX message queue
- */
-
-typedef struct {
- Objects_Control Object;
- int process_shared;
- boolean named;
- boolean linked;
- int oflag;
- unsigned32 open_count;
- CORE_message_queue_Control Message_queue;
- struct sigevent notification;
-} POSIX_Message_queue_Control;
-
-/*
- * The following defines the information control block used to manage
- * this class of objects.
- */
-
-POSIX_EXTERN Objects_Information _POSIX_Message_queue_Information;
-
-/*
- * _POSIX_Message_queue_Manager_initialization
- *
- * DESCRIPTION:
- *
- * This routine performs the initialization necessary for this manager.
- */
-
-void _POSIX_Message_queue_Manager_initialization(
- unsigned32 maximum_message_queues
-);
-
-/*
- *
- * _POSIX_Message_queue_Create_support
- *
- * DESCRIPTION:
- *
- * This routine performs the creation of a message queue utilizing the
- * core message queue.
- */
-
-int _POSIX_Message_queue_Create_support(
- const char *name,
- int pshared,
- unsigned int oflag,
- struct mq_attr *attr,
- POSIX_Message_queue_Control **message_queue
-);
-
-/*
- * _POSIX_Message_queue_Delete
- *
- * DESCRIPTION:
- *
- * This routine supports the mq_unlink and mq_close routines by
- * doing most of the work involved with removing a message queue.
- */
-
-void _POSIX_Message_queue_Delete(
- POSIX_Message_queue_Control *the_mq
-);
-
-/*
- * _POSIX_Message_queue_Receive_support
- *
- * DESCRIPTION:
- *
- * This routine supports the various flavors of receiving a message.
- */
-
-ssize_t _POSIX_Message_queue_Receive_support(
- mqd_t mqdes,
- char *msg_ptr,
- size_t msg_len,
- unsigned int *msg_prio,
- Watchdog_Interval timeout
-);
-
-/*
- * _POSIX_Message_queue_Send_support
- *
- * DESCRIPTION:
- *
- * This routine posts a message to a specified message queue.
- */
-
-int _POSIX_Message_queue_Send_support(
- mqd_t mqdes,
- const char *msg_ptr,
- unsigned32 msg_len,
- unsigned32 msg_prio,
- Watchdog_Interval timeout
-);
-
-/*
- * _POSIX_Message_queue_Allocate
- *
- * DESCRIPTION:
- *
- * This function allocates a message queue control block from
- * the inactive chain of free message queue control blocks.
- */
-
-RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void );
-
-/*
- * _POSIX_Message_queue_Free
- *
- * DESCRIPTION:
- *
- * This routine frees a message queue control block to the
- * inactive chain of free message queue control blocks.
- */
-
-RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free (
- POSIX_Message_queue_Control *the_mq
-);
-
-/*
- * _POSIX_Message_queue_Get
- *
- * DESCRIPTION:
- *
- * This function maps message queue IDs to message queue control blocks.
- * If ID corresponds to a local message queue, then it returns
- * the_mq control pointer which maps to ID and location
- * is set to OBJECTS_LOCAL. if the message queue ID is global and
- * resides on a remote node, then location is set to OBJECTS_REMOTE,
- * and the_message queue is undefined. Otherwise, location is set
- * to OBJECTS_ERROR and the_mq is undefined.
- */
-
-RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Get (
- Objects_Id id,
- Objects_Locations *location
-);
-
-/*
- * _POSIX_Message_queue_Is_null
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the_message_queue is NULL and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _POSIX_Message_queue_Is_null (
- POSIX_Message_queue_Control *the_mq
-);
-
-/*
- * _POSIX_Message_queue_Name_to_id
- *
- * DESCRIPTION:
- *
- * XXX
- */
-
-int _POSIX_Message_queue_Name_to_id(
- const char *name,
- Objects_Id *id
-);
-
-/*
- * _POSIX_Message_queue_Priority_to_core
- *
- * DESCRIPTION:
- *
- * XXX
- */
-
-RTEMS_INLINE_ROUTINE CORE_message_queue_Submit_types _POSIX_Message_queue_Priority_to_core(
- unsigned int priority
-);
-
-/*
- * _POSIX_Message_queue_Priority_from_core
- *
- * DESCRIPTION:
- *
- * XXX
- */
-
-RTEMS_INLINE_ROUTINE unsigned int _POSIX_Message_queue_Priority_from_core(
- CORE_message_queue_Submit_types priority
-);
-
-/*PAGE
- *
- * _POSIX_Message_queue_Translate_core_message_queue_return_code
- *
- * DESCRIPTION:
- *
- * XXX
- */
-
-int _POSIX_Message_queue_Translate_core_message_queue_return_code(
- unsigned32 the_message_queue_status
-);
-
-
-#include <rtems/posix/mqueue.inl>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/posix/mqueuemp.h>
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/posix/include/rtems/posix/mqueuemp.h b/cpukit/posix/include/rtems/posix/mqueuemp.h
deleted file mode 100644
index 19fb58ea29..0000000000
--- a/cpukit/posix/include/rtems/posix/mqueuemp.h
+++ /dev/null
@@ -1,160 +0,0 @@
-/* mqueuemp.h
- *
- * This include file contains all the constants and structures associated
- * with the Multiprocessing Support in the POSIX Message Queue Manager.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_POSIX_MESSAGE_QUEUE_MP_h
-#define __RTEMS_POSIX_MESSAGE_QUEUE_MP_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/mppkt.h>
-#include <rtems/score/object.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/watchdog.h>
-
-/*
- * The following enumerated type defines the list of
- * remote message queue operations.
- */
-
-typedef enum {
- POSIX_MESSAGE_QUEUE_MP_ANNOUNCE_CREATE = 0,
- POSIX_MESSAGE_QUEUE_MP_ANNOUNCE_DELETE = 1,
- POSIX_MESSAGE_QUEUE_MP_EXTRACT_PROXY = 2,
- POSIX_MESSAGE_QUEUE_MP_OBTAIN_REQUEST = 3,
- POSIX_MESSAGE_QUEUE_MP_OBTAIN_RESPONSE = 4,
- POSIX_MESSAGE_QUEUE_MP_RELEASE_REQUEST = 5,
- POSIX_MESSAGE_QUEUE_MP_RELEASE_RESPONSE = 6,
-} POSIX_Message_queue_MP_Remote_operations;
-
-/*
- * The following data structure defines the packet used to perform
- * remote message queue operations.
- */
-
-typedef struct {
- MP_packet_Prefix Prefix;
- POSIX_Message_queue_MP_Remote_operations operation;
- Objects_Name name;
- boolean wait; /* XXX options */
- Objects_Id proxy_id;
-} POSIX_Message_queue_MP_Packet;
-
-/*
- * _POSIX_Message_queue_MP_Send_process_packet
- *
- * DESCRIPTION:
- *
- * This routine performs a remote procedure call so that a
- * process operation can be performed on another node.
- */
-
-void _POSIX_Message_queue_MP_Send_process_packet (
- POSIX_Message_queue_MP_Remote_operations operation,
- Objects_Id mq_id,
- Objects_Name name,
- Objects_Id proxy_id
-);
-
-/*
- * _POSIX_Message_queue_MP_Send_request_packet
- *
- * DESCRIPTION:
- *
- * This routine performs a remote procedure call so that a
- * directive operation can be initiated on another node.
- */
-
-int _POSIX_Message_queue_MP_Send_request_packet (
- POSIX_Message_queue_MP_Remote_operations operation,
- Objects_Id mq_id,
- boolean wait, /* XXX options */
- Watchdog_Interval timeout
-);
-
-/*
- * _POSIX_Message_queue_MP_Send_response_packet
- *
- * DESCRIPTION:
- *
- * This routine performs a remote procedure call so that a
- * directive can be performed on another node.
- */
-
-void _POSIX_Message_queue_MP_Send_response_packet (
- POSIX_Message_queue_MP_Remote_operations operation,
- Objects_Id mq_id,
- Thread_Control *the_thread
-);
-
-/*
- *
- * _POSIX_Message_queue_MP_Process_packet
- *
- * DESCRIPTION:
- *
- * This routine performs the actions specific to this package for
- * the request from another node.
- */
-
-void _POSIX_Message_queue_MP_Process_packet (
- MP_packet_Prefix *the_packet_prefix
-);
-
-/*
- * _POSIX_Message_queue_MP_Send_object_was_deleted
- *
- * DESCRIPTION:
- *
- * This routine is invoked indirectly by the thread queue
- * when a proxy has been removed from the thread queue and
- * the remote node must be informed of this.
- */
-
-void _POSIX_Message_queue_MP_Send_object_was_deleted (
- Thread_Control *the_proxy
-);
-
-/*
- * _POSIX_Message_queue_MP_Send_extract_proxy
- *
- * DESCRIPTION:
- *
- * This routine is invoked when a task is deleted and it
- * has a proxy which must be removed from a thread queue and
- * the remote node must be informed of this.
- */
-
-void _POSIX_Message_queue_MP_Send_extract_proxy (
- Thread_Control *the_thread
-);
-
-/*
- * _POSIX_Message_queue_MP_Get_packet
- *
- * DESCRIPTION:
- *
- * This function is used to obtain a message queue mp packet.
- */
-
-POSIX_Message_queue_MP_Packet *_POSIX_Message_queue_MP_Get_packet ( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of file */
diff --git a/cpukit/posix/include/rtems/posix/mutex.h b/cpukit/posix/include/rtems/posix/mutex.h
deleted file mode 100644
index e8338c893f..0000000000
--- a/cpukit/posix/include/rtems/posix/mutex.h
+++ /dev/null
@@ -1,156 +0,0 @@
-/* rtems/posix/mutex.h
- *
- * This include file contains all the private support information for
- * POSIX mutex's.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_POSIX_MUTEX_h
-#define __RTEMS_POSIX_MUTEX_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/coremutex.h>
-#include <pthread.h>
-
-/*
- * Data Structure used to manage a POSIX mutex
- */
-
-typedef struct {
- Objects_Control Object;
- int process_shared;
- CORE_mutex_Control Mutex;
-} POSIX_Mutex_Control;
-
-/*
- * The following defines the information control block used to manage
- * this class of objects.
- */
-
-POSIX_EXTERN Objects_Information _POSIX_Mutex_Information;
-
-/*
- * The default mutex attributes structure.
- */
-
-extern const pthread_mutexattr_t _POSIX_Mutex_Default_attributes;
-
-/*
- * _POSIX_Mutex_Manager_initialization
- *
- * DESCRIPTION:
- *
- * This routine performs the initialization necessary for this manager.
- */
-
-void _POSIX_Mutex_Manager_initialization(
- unsigned32 maximum_mutexes
-);
-
-/*
- * _POSIX_Mutex_Allocate
- *
- * DESCRIPTION:
- *
- * This function allocates a mutexes control block from
- * the inactive chain of free mutexes control blocks.
- */
-
-RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void );
-
-/*
- * _POSIX_Mutex_Free
- *
- * DESCRIPTION:
- *
- * This routine frees a mutexes control block to the
- * inactive chain of free mutexes control blocks.
- */
-
-RTEMS_INLINE_ROUTINE void _POSIX_Mutex_Free (
- POSIX_Mutex_Control *the_mutex
-);
-
-/*
- * _POSIX_Mutex_Get
- *
- * DESCRIPTION:
- *
- * This function maps mutexes IDs to mutexes control blocks.
- * If ID corresponds to a local mutexes, then it returns
- * the_mutex control pointer which maps to ID and location
- * is set to OBJECTS_LOCAL. if the mutexes ID is global and
- * resides on a remote node, then location is set to OBJECTS_REMOTE,
- * and the_mutex is undefined. Otherwise, location is set
- * to OBJECTS_ERROR and the_mutex is undefined.
- */
-
-RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Get (
- Objects_Id *id,
- Objects_Locations *location
-);
-
-/*
- * _POSIX_Mutex_Is_null
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the_mutex is NULL and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _POSIX_Mutex_Is_null (
- POSIX_Mutex_Control *the_mutex
-);
-
-/*
- * _POSIX_Mutex_Lock_support
- *
- * DESCRIPTION:
- *
- * A support routine which implements guts of the blocking, non-blocking, and
- * timed wait version of mutex lock.
- */
-
-int _POSIX_Mutex_Lock_support(
- pthread_mutex_t *mutex,
- boolean blocking,
- Watchdog_Interval timeout
-);
-
-/*
- * _POSIX_Mutex_From_core_mutex_status
- *
- * DESCRIPTION:
- *
- * A support routine which converts core mutex status codes into the
- * appropriate POSIX status values.
- */
-
-int _POSIX_Mutex_From_core_mutex_status(
- CORE_mutex_Status status
-);
-
-
-#include <rtems/posix/mutex.inl>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/posix/mutexmp.h>
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/posix/include/rtems/posix/mutexmp.h b/cpukit/posix/include/rtems/posix/mutexmp.h
deleted file mode 100644
index 4d0f074f98..0000000000
--- a/cpukit/posix/include/rtems/posix/mutexmp.h
+++ /dev/null
@@ -1,173 +0,0 @@
-/* mutexmp.h
- *
- * This include file contains all the constants and structures associated
- * with the Multiprocessing Support in the POSIX Mutex Manager.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_POSIX_MUTEX_MP_h
-#define __RTEMS_POSIX_MUTEX_MP_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/mppkt.h>
-#include <rtems/score/object.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/watchdog.h>
-
-/*
- * The following enumerated type defines the list of
- * remote mutex operations.
- */
-
-typedef enum {
- POSIX_MUTEX_MP_ANNOUNCE_CREATE = 0,
- POSIX_MUTEX_MP_ANNOUNCE_DELETE = 1,
- POSIX_MUTEX_MP_EXTRACT_PROXY = 2,
- POSIX_MUTEX_MP_OBTAIN_REQUEST = 3,
- POSIX_MUTEX_MP_OBTAIN_RESPONSE = 4,
- POSIX_MUTEX_MP_RELEASE_REQUEST = 5,
- POSIX_MUTEX_MP_RELEASE_RESPONSE = 6,
-} POSIX_Mutex_MP_Remote_operations;
-
-/*
- * The following data structure defines the packet used to perform
- * remote mutex operations.
- */
-
-typedef struct {
- MP_packet_Prefix Prefix;
- POSIX_Mutex_MP_Remote_operations operation;
- Objects_Name name;
- boolean wait; /* XXX options */
- Objects_Id proxy_id;
-} POSIX_Mutex_MP_Packet;
-
-/*
- * _POSIX_Mutex_MP_Send_process_packet
- *
- * DESCRIPTION:
- *
- * This routine performs a remote procedure call so that a
- * process operation can be performed on another node.
- */
-
-void _POSIX_Mutex_MP_Send_process_packet (
- POSIX_Mutex_MP_Remote_operations operation,
- Objects_Id mutex_id,
- Objects_Name name,
- Objects_Id proxy_id
-);
-
-/*
- * _POSIX_Mutex_MP_Send_request_packet
- *
- * DESCRIPTION:
- *
- * This routine performs a remote procedure call so that a
- * directive operation can be initiated on another node.
- */
-
-int _POSIX_Mutex_MP_Send_request_packet (
- POSIX_Mutex_MP_Remote_operations operation,
- Objects_Id mutex_id,
- boolean wait, /* XXX options */
- Watchdog_Interval timeout
-);
-
-/*
- * _POSIX_Mutex_MP_Send_response_packet
- *
- * DESCRIPTION:
- *
- * This routine performs a remote procedure call so that a
- * directive can be performed on another node.
- */
-
-void _POSIX_Mutex_MP_Send_response_packet (
- POSIX_Mutex_MP_Remote_operations operation,
- Objects_Id mutex_id,
- Thread_Control *the_thread
-);
-
-/*
- *
- * _POSIX_Mutex_MP_Process_packet
- *
- * DESCRIPTION:
- *
- * This routine performs the actions specific to this package for
- * the request from another node.
- */
-
-void _POSIX_Mutex_MP_Process_packet (
- MP_packet_Prefix *the_packet_prefix
-);
-
-/*
- * _POSIX_Mutex_MP_Send_object_was_deleted
- *
- * DESCRIPTION:
- *
- * This routine is invoked indirectly by the thread queue
- * when a proxy has been removed from the thread queue and
- * the remote node must be informed of this.
- */
-
-void _POSIX_Mutex_MP_Send_object_was_deleted (
- Thread_Control *the_proxy
-);
-
-/*
- * _POSIX_Mutex_MP_Send_extract_proxy
- *
- * DESCRIPTION:
- *
- * This routine is invoked when a task is deleted and it
- * has a proxy which must be removed from a thread queue and
- * the remote node must be informed of this.
- */
-
-void _POSIX_Mutex_MP_Send_extract_proxy (
- Thread_Control *the_thread
-);
-
-/*
- * _POSIX_Threads_mutex_MP_support
- *
- * DESCRIPTION:
- *
- * This routine XXX
- */
-
-void _POSIX_Threads_mutex_MP_support(
- Thread_Control *the_thread,
- Objects_Id id
-);
-
-/*
- * _POSIX_Mutex_MP_Get_packet
- *
- * DESCRIPTION:
- *
- * This function is used to obtain a mutex mp packet.
- */
-
-POSIX_Mutex_MP_Packet *_POSIX_Mutex_MP_Get_packet ( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of file */
diff --git a/cpukit/posix/include/rtems/posix/posixapi.h b/cpukit/posix/include/rtems/posix/posixapi.h
deleted file mode 100644
index 13c416ef90..0000000000
--- a/cpukit/posix/include/rtems/posix/posixapi.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * POSIX API Support
- *
- * NOTE:
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __POSIX_API_h
-#define __POSIX_API_h
-
-#include <rtems/config.h>
-
-/*PAGE
- *
- * _POSIX_API_Initialize
- *
- * XXX
- */
-
-void _POSIX_API_Initialize(
- rtems_configuration_table *configuration_table
-);
-
-#endif
-/* end of include file */
diff --git a/cpukit/posix/include/rtems/posix/priority.h b/cpukit/posix/include/rtems/posix/priority.h
deleted file mode 100644
index c0253f3bab..0000000000
--- a/cpukit/posix/include/rtems/posix/priority.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *
- *
- * $Id$
- */
-
-#ifndef __RTEMS_POSIX_PRIORITY_h
-#define __RTEMS_POSIX_PRIORITY_h
-
-#include <rtems/score/priority.h>
-
-/*
- * 1003.1b-1993,2.2.2.80 definition of priority, p. 19
- *
- * "Numericallly higher values represent higher priorities."
- *
- * Thus, RTEMS Core has priorities run in the opposite sense of the POSIX API.
- *
- * There are only 254 posix priority levels since a task at priority level
- * 255 would never run because of the RTEMS idle task. This is necessary
- * because GNAT maps the lowest Ada task priority to the lowest thread
- * priority. The lowest priority Ada task should get to run, so there is
- * a fundamental conflict with having 255 priorities.
- */
-
-#define POSIX_SCHEDULER_MAXIMUM_PRIORITY (254)
-
-#define POSIX_SCHEDULER_MINIMUM_PRIORITY (1)
-
-RTEMS_INLINE_ROUTINE boolean _POSIX_Priority_Is_valid(
- int priority
-);
-
-RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
- int priority
-);
-
-RTEMS_INLINE_ROUTINE int _POSIX_Priority_From_core(
- Priority_Control priority
-);
-
-#include <rtems/posix/priority.inl>
-
-#endif
diff --git a/cpukit/posix/include/rtems/posix/psignal.h b/cpukit/posix/include/rtems/posix/psignal.h
deleted file mode 100644
index c15ca78d34..0000000000
--- a/cpukit/posix/include/rtems/posix/psignal.h
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * $Id$
- */
-
-#ifndef __RTEMS_POSIX_SIGNALS_h
-#define __RTEMS_POSIX_SIGNALS_h
-
-#include <rtems/posix/pthread.h>
-
-/*
- * Currently 32 signals numbered 1-32 are defined
- */
-
-#define SIGNAL_EMPTY_MASK 0x00000000
-#define SIGNAL_ALL_MASK 0xffffffff
-
-#define signo_to_mask( _sig ) (1 << ((_sig) - 1))
-
-#define is_valid_signo( _sig ) \
- ((_sig) >= 1 && (_sig) <= 32 )
-
-#define _States_Is_interruptible_signal( _states ) \
- ( ((_states) & \
- (STATES_WAITING_FOR_SIGNAL|STATES_INTERRUPTIBLE_BY_SIGNAL)) == \
- (STATES_WAITING_FOR_SIGNAL|STATES_INTERRUPTIBLE_BY_SIGNAL))
-
-#define SIGACTION_TERMINATE \
- { 0, SIGNAL_ALL_MASK, {_POSIX_signals_Abnormal_termination_handler} }
-#define SIGACTION_IGNORE \
- { 0, SIGNAL_ALL_MASK, {SIG_IGN} }
-#define SIGACTION_STOP \
- { 0, SIGNAL_ALL_MASK, {_POSIX_signals_Stop_handler} }
-#define SIGACTION_CONTINUE \
- { 0, SIGNAL_ALL_MASK, {_POSIX_signals_Continue_handler} }
-
-#define SIG_ARRAY_MAX (SIGRTMAX + 1)
-
-/*
- * Variables
- */
-
-extern sigset_t _POSIX_signals_Pending;
-
-extern struct sigaction _POSIX_signals_Default_vectors[ SIG_ARRAY_MAX ];
-
-extern struct sigaction _POSIX_signals_Vectors[ SIG_ARRAY_MAX ];
-
-extern Watchdog_Control _POSIX_signals_Alarm_timer;
-
-extern Thread_queue_Control _POSIX_signals_Wait_queue;
-
-extern Chain_Control _POSIX_signals_Inactive_siginfo;
-
-extern Chain_Control _POSIX_signals_Siginfo[ SIG_ARRAY_MAX ];
-
-/*
- * POSIX internal siginfo structure
- */
-
-typedef struct {
- Chain_Node Node;
- siginfo_t Info;
-} POSIX_signals_Siginfo_node;
-
-/*
- * Internal routines
- */
-
-void _POSIX_signals_Manager_Initialization(
- int maximum_queued_signals
-);
-
-void _POSIX_signals_Post_switch_extension(
- Thread_Control *the_thread
-);
-
-boolean _POSIX_signals_Unblock_thread(
- Thread_Control *the_thread,
- int signo,
- siginfo_t *info
-);
-
-boolean _POSIX_signals_Check_signal(
- POSIX_API_Control *api,
- int signo,
- boolean is_global
-);
-
-boolean _POSIX_signals_Clear_signals(
- POSIX_API_Control *api,
- int signo,
- siginfo_t *info,
- boolean is_global,
- boolean check_blocked
-);
-
-int killinfo(
- pid_t pid,
- int sig,
- const union sigval *value
-);
-
-void _POSIX_signals_Set_process_signals(
- sigset_t mask
-);
-
-void _POSIX_signals_Clear_process_signals(
- sigset_t mask
-);
-
-/*
- * Default signal handlers
- */
-
-#define _POSIX_signals_Stop_handler NULL
-#define _POSIX_signals_Continue_handler NULL
-
-void _POSIX_signals_Abnormal_termination_handler( int signo );
-
-#endif
-/* end of file */
diff --git a/cpukit/posix/include/rtems/posix/pthread.h b/cpukit/posix/include/rtems/posix/pthread.h
deleted file mode 100644
index 10a1b051e1..0000000000
--- a/cpukit/posix/include/rtems/posix/pthread.h
+++ /dev/null
@@ -1,150 +0,0 @@
-/* rtems/posix/pthread.h
- *
- * This include file contains all the private support information for
- * POSIX threads.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_POSIX_THREADS_h
-#define __RTEMS_POSIX_THREADS_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/posix/config.h>
-#include <rtems/posix/threadsup.h>
-
-#define PTHREAD_MINIMUM_STACK_SIZE (STACK_MINIMUM_SIZE * 2)
-
-/*
- * The following defines the information control block used to manage
- * this class of objects.
- */
-
-POSIX_EXTERN Objects_Information _POSIX_Threads_Information;
-
-/*
- * These are used to manage the user initialization threads.
- */
-
-POSIX_EXTERN posix_initialization_threads_table
- *_POSIX_Threads_User_initialization_threads;
-POSIX_EXTERN unsigned32 _POSIX_Threads_Number_of_initialization_threads;
-
-extern const pthread_attr_t _POSIX_Threads_Default_attributes;
-
-/*
- * _POSIX_Threads_Manager_initialization
- *
- * DESCRIPTION:
- *
- * This routine performs the initialization necessary for this manager.
- */
-
-void _POSIX_Threads_Manager_initialization(
- unsigned32 maximum_pthreads,
- unsigned32 number_of_initialization_threads,
- posix_initialization_threads_table *user_threads
-);
-
-/*
- * _POSIX_Threads_Allocate
- *
- * DESCRIPTION:
- *
- * This function allocates a pthread control block from
- * the inactive chain of free pthread control blocks.
- */
-
-RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void );
-
-/*
- * _POSIX_Threads_Free
- *
- * DESCRIPTION:
- *
- * This routine frees a pthread control block to the
- * inactive chain of free pthread control blocks.
- */
-
-RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free(
- Thread_Control *the_pthread
-);
-
-/*
- * _POSIX_Threads_Get
- *
- * DESCRIPTION:
- *
- * This function maps pthread IDs to pthread control blocks.
- * If ID corresponds to a local pthread, then it returns
- * the_pthread control pointer which maps to ID and location
- * is set to OBJECTS_LOCAL. if the pthread ID is global and
- * resides on a remote node, then location is set to OBJECTS_REMOTE,
- * and the_pthread is undefined. Otherwise, location is set
- * to OBJECTS_ERROR and the_pthread is undefined.
- */
-
-RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get(
- pthread_t id,
- Objects_Locations *location
-);
-
-/*
- * _POSIX_Threads_Is_null
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the_pthread is NULL and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _POSIX_Threads_Is_null(
- Thread_Control *the_pthread
-);
-
-/*
- * _POSIX_Threads_Sporadic_budget_callout
- *
- * DESCRIPTION:
- *
- * This routine handles the sporadic scheduling algorithm.
- */
-
-void _POSIX_Threads_Sporadic_budget_callout(
- Thread_Control *the_thread
-);
-
-/*
- * _POSIX_Threads_Sporadic_budget_TSR
- *
- * DESCRIPTION:
- *
- * This routine supports the sporadic scheduling algorithm.
- */
-
-void _POSIX_Threads_Sporadic_budget_TSR(
- Objects_Id id,
- void *argument
-);
-
-#include <rtems/posix/pthread.inl>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/posix/pthreadmp.h>
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/posix/include/rtems/posix/pthreadmp.h b/cpukit/posix/include/rtems/posix/pthreadmp.h
deleted file mode 100644
index 4bd6cc41e8..0000000000
--- a/cpukit/posix/include/rtems/posix/pthreadmp.h
+++ /dev/null
@@ -1,160 +0,0 @@
-/* pthreadmp.h
- *
- * This include file contains all the constants and structures associated
- * with the Multiprocessing Support in the POSIX Threads Manager.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_POSIX_THREADS_MP_h
-#define __RTEMS_POSIX_THREADS_MP_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/mppkt.h>
-#include <rtems/score/object.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/watchdog.h>
-
-/*
- * The following enumerated type defines the list of
- * remote pthread operations.
- */
-
-typedef enum {
- POSIX_THREADS_MP_ANNOUNCE_CREATE = 0,
- POSIX_THREADS_MP_ANNOUNCE_DELETE = 1,
- POSIX_THREADS_MP_EXTRACT_PROXY = 2,
- POSIX_THREADS_MP_OBTAIN_REQUEST = 3,
- POSIX_THREADS_MP_OBTAIN_RESPONSE = 4,
- POSIX_THREADS_MP_RELEASE_REQUEST = 5,
- POSIX_THREADS_MP_RELEASE_RESPONSE = 6
-} POSIX_Threads_MP_Remote_operations;
-
-/*
- * The following data structure defines the packet used to perform
- * remote pthread operations.
- */
-
-typedef struct {
- MP_packet_Prefix Prefix;
- POSIX_Threads_MP_Remote_operations operation;
- Objects_Name name;
- boolean wait;
- Objects_Id proxy_id;
-} POSIX_Threads_MP_Packet;
-
-/*
- * _POSIX_Threads_MP_Send_process_packet
- *
- * DESCRIPTION:
- *
- * This routine performs a remote procedure call so that a
- * process operation can be performed on another node.
- */
-
-void _POSIX_Threads_MP_Send_process_packet (
- POSIX_Threads_MP_Remote_operations operation,
- Objects_Id pthread_id,
- Objects_Name name,
- Objects_Id proxy_id
-);
-
-/*
- * _POSIX_Threads_MP_Send_request_packet
- *
- * DESCRIPTION:
- *
- * This routine performs a remote procedure call so that a
- * directive operation can be initiated on another node.
- */
-
-int _POSIX_Threads_MP_Send_request_packet (
- POSIX_Threads_MP_Remote_operations operation,
- Objects_Id pthread_id,
- boolean wait,
- Watchdog_Interval timeout
-);
-
-/*
- * _POSIX_Threads_MP_Send_response_packet
- *
- * DESCRIPTION:
- *
- * This routine performs a remote procedure call so that a
- * directive can be performed on another node.
- */
-
-void _POSIX_Threads_MP_Send_response_packet (
- POSIX_Threads_MP_Remote_operations operation,
- Objects_Id pthread_id,
- Thread_Control *the_thread
-);
-
-/*
- *
- * _POSIX_Threads_MP_Process_packet
- *
- * DESCRIPTION:
- *
- * This routine performs the actions specific to this package for
- * the request from another node.
- */
-
-void _POSIX_Threads_MP_Process_packet (
- MP_packet_Prefix *the_packet_prefix
-);
-
-/*
- * _POSIX_Threads_MP_Send_object_was_deleted
- *
- * DESCRIPTION:
- *
- * This routine is invoked indirectly by the thread queue
- * when a proxy has been removed from the thread queue and
- * the remote node must be informed of this.
- */
-
-void _POSIX_Threads_MP_Send_object_was_deleted (
- Thread_Control *the_proxy
-);
-
-/*
- * _POSIX_Threads_MP_Send_extract_proxy
- *
- * DESCRIPTION:
- *
- * This routine is invoked when a task is deleted and it
- * has a proxy which must be removed from a thread queue and
- * the remote node must be informed of this.
- */
-
-void _POSIX_Threads_MP_Send_extract_proxy (
- Thread_Control *the_thread
-);
-
-/*
- * _POSIX_Threads_MP_Get_packet
- *
- * DESCRIPTION:
- *
- * This function is used to obtain a pthread mp packet.
- */
-
-POSIX_Threads_MP_Packet *_POSIX_Threads_MP_Get_packet ( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of file */
diff --git a/cpukit/posix/include/rtems/posix/ptimer.h b/cpukit/posix/include/rtems/posix/ptimer.h
deleted file mode 100644
index c19f10c54c..0000000000
--- a/cpukit/posix/include/rtems/posix/ptimer.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/* rtems/posix/ptimer.h
- *
- * This include file contains all the private support information for
- * POSIX timers.
- *
- * COPYRIGHT (c) 1998.
- * Alfonso Escalera Piña
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * ptimer.h,v 1.0 1998/03/31 16:21:16
- */
-
-#ifndef __RTEMS_POSIX_TIMERS_h
-#define __RTEMS_POSIX_TIMERS_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/posix/config.h>
-
-/*
- * _POSIX_Timers_Manager_initialization
- *
- * DESCRIPTION:
- *
- * This routine performs the initialization necessary for this manager.
- */
-
-void _POSIX_Timer_Manager_initialization ( int max_timers );
-
-/*
- * 14.2.2 Create a Per-Process Timer, P1003.1b-1993, p. 264
- *
- * timer_create
- */
-
-int timer_create(
- clockid_t clock_id,
- struct sigevent *evp,
- timer_t *timerid
-);
-
-/*
- * 14.2.3 Delete a Per_process Timer, P1003.1b-1993, p. 266
- */
-
-int timer_delete(
- timer_t timerid
-);
-
-/*
- * 14.2.4 Per-Process Timers, P1003.1b-1993, p. 267
- *
- * timer_settime
- */
-
-int timer_settime(
- timer_t timerid,
- int flags,
- const struct itimerspec *value,
- struct itimerspec *ovalue
-);
-
-/*
- * 14.2.4 Per-Process Timers, P1003.1b-1993, p. 267
- *
- * timer_gettime
- */
-
-int timer_gettime(
- timer_t timerid,
- struct itimerspec *value
-);
-
-/*
- * 14.2.4 Per-Process Timers, P1003.1b-1993, p. 267
- *
- * timer_getoverrun
- *
- */
-
-int timer_getoverrun(
- timer_t timerid
-);
-
-#endif
-
diff --git a/cpukit/posix/include/rtems/posix/semaphore.h b/cpukit/posix/include/rtems/posix/semaphore.h
deleted file mode 100644
index 95a4f9c15a..0000000000
--- a/cpukit/posix/include/rtems/posix/semaphore.h
+++ /dev/null
@@ -1,181 +0,0 @@
-/* rtems/posix/semaphore.h
- *
- * This include file contains all the private support information for
- * POSIX Semaphores.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_POSIX_SEMAPHORE_h
-#define __RTEMS_POSIX_SEMAPHORE_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <semaphore.h>
-#include <rtems/score/coresem.h>
-
-#define SEM_FAILED (sem_t *) -1
-
-/*
- * Data Structure used to manage a POSIX semaphore
- */
-
-typedef struct {
- Objects_Control Object;
- int process_shared;
- boolean named;
- boolean linked;
- unsigned32 open_count;
- CORE_semaphore_Control Semaphore;
-} POSIX_Semaphore_Control;
-
-/*
- * The following defines the information control block used to manage
- * this class of objects.
- */
-
-POSIX_EXTERN Objects_Information _POSIX_Semaphore_Information;
-
-/*
- * _POSIX_Semaphore_Manager_initialization
- *
- * DESCRIPTION:
- *
- * This routine performs the initialization necessary for this manager.
- */
-
-void _POSIX_Semaphore_Manager_initialization(
- unsigned32 maximum_semaphorees
-);
-
-/*
- * _POSIX_Semaphore_Allocate
- *
- * DESCRIPTION:
- *
- * This function allocates a semaphore control block from
- * the inactive chain of free semaphore control blocks.
- */
-
-RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void );
-
-/*
- * _POSIX_Semaphore_Free
- *
- * DESCRIPTION:
- *
- * This routine frees a semaphore control block to the
- * inactive chain of free semaphore control blocks.
- */
-
-RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Free (
- POSIX_Semaphore_Control *the_semaphore
-);
-
-/*
- * _POSIX_Semaphore_Get
- *
- * DESCRIPTION:
- *
- * This function maps semaphore IDs to semaphore control blocks.
- * If ID corresponds to a local semaphore, then it returns
- * the_semaphore control pointer which maps to ID and location
- * is set to OBJECTS_LOCAL. if the semaphore ID is global and
- * resides on a remote node, then location is set to OBJECTS_REMOTE,
- * and the_semaphore is undefined. Otherwise, location is set
- * to OBJECTS_ERROR and the_semaphore is undefined.
- */
-
-RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get (
- Objects_Id *id,
- Objects_Locations *location
-);
-
-/*
- * _POSIX_Semaphore_Is_null
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the_semaphore is NULL and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _POSIX_Semaphore_Is_null (
- POSIX_Semaphore_Control *the_semaphore
-);
-
-/*
- * _POSIX_Semaphore_Create_support
- *
- * DESCRIPTION:
- *
- * This routine supports the sem_init and sem_open routines.
- */
-
-int _POSIX_Semaphore_Create_support(
- const char *name,
- int pshared,
- unsigned int value,
- POSIX_Semaphore_Control **the_sem
-);
-
-/*
- * _POSIX_Semaphore_Delete
- *
- * DESCRIPTION:
- *
- * This routine supports the sem_close and sem_unlink routines.
- */
-
-void _POSIX_Semaphore_Delete(
- POSIX_Semaphore_Control *the_semaphore
-);
-
-/*
- * _POSIX_Semaphore_Wait_support
- *
- * DESCRIPTION:
- *
- * This routine supports the sem_wait, sem_trywait, and sem_timedwait
- * services.
- */
-
-int _POSIX_Semaphore_Wait_support(
- sem_t *sem,
- boolean blocking,
- Watchdog_Interval timeout
-);
-
-/*
- * _POSIX_Semaphore_Name_to_id
- *
- * DESCRIPTION:
- *
- * This routine performs name to id translation.
- */
-
-int _POSIX_Semaphore_Name_to_id(
- const char *name,
- Objects_Id *id
-);
-
-#include <rtems/posix/semaphore.inl>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/posix/semaphoremp.h>
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/posix/include/rtems/posix/semaphoremp.h b/cpukit/posix/include/rtems/posix/semaphoremp.h
deleted file mode 100644
index b56cbb5dac..0000000000
--- a/cpukit/posix/include/rtems/posix/semaphoremp.h
+++ /dev/null
@@ -1,160 +0,0 @@
-/* semaphoremp.h
- *
- * This include file contains all the constants and structures associated
- * with the Multiprocessing Support in the POSIX Semaphore Manager.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_POSIX_SEMAPHORE_MP_h
-#define __RTEMS_POSIX_SEMAPHORE_MP_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/mppkt.h>
-#include <rtems/score/object.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/watchdog.h>
-
-/*
- * The following enumerated type defines the list of
- * remote semaphore operations.
- */
-
-typedef enum {
- POSIX_SEMAPHORE_MP_ANNOUNCE_CREATE = 0,
- POSIX_SEMAPHORE_MP_ANNOUNCE_DELETE = 1,
- POSIX_SEMAPHORE_MP_EXTRACT_PROXY = 2,
- POSIX_SEMAPHORE_MP_OBTAIN_REQUEST = 3,
- POSIX_SEMAPHORE_MP_OBTAIN_RESPONSE = 4,
- POSIX_SEMAPHORE_MP_RELEASE_REQUEST = 5,
- POSIX_SEMAPHORE_MP_RELEASE_RESPONSE = 6,
-} POSIX_Semaphore_MP_Remote_operations;
-
-/*
- * The following data structure defines the packet used to perform
- * remote semaphore operations.
- */
-
-typedef struct {
- MP_packet_Prefix Prefix;
- POSIX_Semaphore_MP_Remote_operations operation;
- Objects_Name name;
- boolean wait; /* XXX options */
- Objects_Id proxy_id;
-} POSIX_Semaphore_MP_Packet;
-
-/*
- * _POSIX_Semaphore_MP_Send_process_packet
- *
- * DESCRIPTION:
- *
- * This routine performs a remote procedure call so that a
- * process operation can be performed on another node.
- */
-
-void _POSIX_Semaphore_MP_Send_process_packet(
- POSIX_Semaphore_MP_Remote_operations operation,
- Objects_Id semaphore_id,
- Objects_Name name,
- Objects_Id proxy_id
-);
-
-/*
- * _POSIX_Semaphore_MP_Send_request_packet
- *
- * DESCRIPTION:
- *
- * This routine performs a remote procedure call so that a
- * directive operation can be initiated on another node.
- */
-
-int _POSIX_Semaphore_MP_Send_request_packet(
- POSIX_Semaphore_MP_Remote_operations operation,
- Objects_Id semaphore_id,
- boolean wait, /* XXX options */
- Watchdog_Interval timeout
-);
-
-/*
- * _POSIX_Semaphore_MP_Send_response_packet
- *
- * DESCRIPTION:
- *
- * This routine performs a remote procedure call so that a
- * directive can be performed on another node.
- */
-
-void _POSIX_Semaphore_MP_Send_response_packet(
- POSIX_Semaphore_MP_Remote_operations operation,
- Objects_Id semaphore_id,
- Thread_Control *the_thread
-);
-
-/*
- *
- * _POSIX_Semaphore_MP_Process_packet
- *
- * DESCRIPTION:
- *
- * This routine performs the actions specific to this package for
- * the request from another node.
- */
-
-void _POSIX_Semaphore_MP_Process_packet(
- MP_packet_Prefix *the_packet_prefix
-);
-
-/*
- * _POSIX_Semaphore_MP_Send_object_was_deleted
- *
- * DESCRIPTION:
- *
- * This routine is invoked indirectly by the thread queue
- * when a proxy has been removed from the thread queue and
- * the remote node must be informed of this.
- */
-
-void _POSIX_Semaphore_MP_Send_object_was_deleted(
- Thread_Control *the_proxy
-);
-
-/*
- * _POSIX_Semaphore_MP_Send_extract_proxy
- *
- * DESCRIPTION:
- *
- * This routine is invoked when a task is deleted and it
- * has a proxy which must be removed from a thread queue and
- * the remote node must be informed of this.
- */
-
-void _POSIX_Semaphore_MP_Send_extract_proxy(
- Thread_Control *the_thread
-);
-
-/*
- * _POSIX_Semaphore_MP_Get_packet
- *
- * DESCRIPTION:
- *
- * This function is used to obtain a semaphore mp packet.
- */
-
-POSIX_Semaphore_MP_Packet *_POSIX_Semaphore_MP_Get_packet( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of file */
diff --git a/cpukit/posix/include/rtems/posix/threadsup.h b/cpukit/posix/include/rtems/posix/threadsup.h
deleted file mode 100644
index ee93f8252c..0000000000
--- a/cpukit/posix/include/rtems/posix/threadsup.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* threadsup.h
- *
- * $Id$
- */
-
-#ifndef __RTEMS_POSIX_THREAD_SUPPORT_h
-#define __RTEMS_POSIX_THREAD_SUPPORT_h
-
-#include <rtems/score/coresem.h>
-#include <rtems/score/tqdata.h>
-
-typedef struct {
- pthread_attr_t Attributes;
- int detachstate;
- Thread_queue_Control Join_List;
- int schedpolicy;
- struct sched_param schedparam;
- int ss_high_priority;
- Watchdog_Control Sporadic_timer;
-
- sigset_t signals_blocked;
- sigset_t signals_pending;
-
-#if 0
- /*
- * POSIX Interrupts
- */
- unsigned32 interrupts_installed;
- CORE_semaphore_Control Interrupt_Semaphore;
-#endif
-
- /*
- * POSIX Cancelability
- */
- int cancelability_state;
- int cancelability_type;
- int cancelation_requested;
- Chain_Control Cancellation_Handlers;
-
-} POSIX_API_Control;
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/posix/include/rtems/posix/time.h b/cpukit/posix/include/rtems/posix/time.h
deleted file mode 100644
index 0e87db388e..0000000000
--- a/cpukit/posix/include/rtems/posix/time.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- *
- *
- * $Id$
- */
-
-#ifndef __RTEMS_POSIX_TIME_h
-#define __RTEMS_POSIX_TIME_h
-
-#include <rtems/score/tod.h>
-
-/*
- * Seconds from January 1, 1970 to January 1, 1988. Used to account for
- * differences between POSIX API and RTEMS core.
- */
-
-#define POSIX_TIME_SECONDS_1970_THROUGH_1988 \
- (((1987 - 1970 + 1) * TOD_SECONDS_PER_NON_LEAP_YEAR) + \
- (4 * TOD_SECONDS_PER_DAY))
-
-/*PAGE
- *
- * _POSIX_Timespec_subtract
- */
-
-void _POSIX_Timespec_subtract(
- const struct timespec *the_start,
- const struct timespec *end,
- struct timespec *result
-);
-
-/*
- * _POSIX_Timespec_to_interval
- */
-
-Watchdog_Interval _POSIX_Timespec_to_interval(
- const struct timespec *time
-);
-
-/*PAGE
- *
- * _POSIX_Interval_to_timespec
- */
-
-void _POSIX_Interval_to_timespec(
- Watchdog_Interval ticks,
- struct timespec *time
-);
-
-#endif
diff --git a/cpukit/posix/include/rtems/posix/timer.h b/cpukit/posix/include/rtems/posix/timer.h
deleted file mode 100644
index f8cbe48b73..0000000000
--- a/cpukit/posix/include/rtems/posix/timer.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * $Id$
- */
-
-#ifndef __RTEMS_POSIX_TIMERS_h
-#define __RTEMS_POSIX_TIMERS_h
-
-/* ************
- * Constants
- * ************/
-
-#define STATE_FREE_C 0x01 /* Free position of the table of timers */
-#define STATE_CREATE_NEW_C 0x02 /* Created timer but not running */
-#define STATE_CREATE_RUN_C 0x03 /* Created timer and running */
-#define STATE_CREATE_STOP_C 0x04 /* Created, ran and stopped timer */
-#define MAX_NSEC_C 1000000000 /* Maximum number of nsec allowed */
-#define MIN_NSEC_C 0 /* Minimum number of nsec allowew */
-#define TIMER_RELATIVE_C 0 /* Indicates that the fire time is
- * relative to the current one */
-#define SEC_TO_TICKS_C _TOD_Ticks_per_second /* Number of ticks in a second*/
-#define NSEC_PER_SEC_C 1000000000 /* Nanoseconds in a second */
-
-#define NO_MORE_TIMERS_C 11 /* There is not available timers */
-#define BAD_TIMER_C 11 /* The timer does not exist in the table */
-
-#define SECONDS_PER_YEAR_C ( 360 * 24 * 60 * 60 )
-#define SECONDS_PER_MONTH_C ( 30 * 24 * 60 * 60 )
-#define SECONDS_PER_DAY_C ( 24 * 60 * 60 )
-#define SECONDS_PER_HOUR_C ( 60 * 60 )
-#define SECONDS_PER_MINUTE_C ( 60 )
-
-
-/*
- * Data for a timer
- */
-
-typedef struct {
- pthread_t thread_id; /* Thread identifier */
- char state; /* State of the timer */
- struct sigevent inf; /* Information associated to the timer */
- timer_t timer_id; /* Created timer identifier */
- struct itimerspec timer_data; /* Timing data of the timer */
- unsigned32 ticks; /* Number of ticks of the initialization */
- unsigned32 overrun; /* Number of expirations of the timer */
- rtems_time_of_day time; /* Time in which the timer was started */
-} timer_alive_t;
-
-/*
- * Array of Timers
- */
-
-extern int timer_max;
-extern timer_alive_t *timer_struct;
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/posix/include/sched.h b/cpukit/posix/include/sched.h
deleted file mode 100644
index ccc42d35e2..0000000000
--- a/cpukit/posix/include/sched.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/* sched.h
- *
- * $Id$
- */
-
-
-#ifndef __POSIX_SCHEDULING_h
-#define __POSIX_SCHEDULING_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <sys/features.h>
-
-#if defined(_POSIX_PRIORITY_SCHEDULING)
-
-#include <sys/types.h>
-#include <time.h>
-#include <sys/sched.h>
-#include <pthread.h>
-
-/*
- * 13.3.1 Set Scheduling Parameters, P1003.1b-1993, p. 252
- *
- */
-
-int sched_setparam(
- pid_t pid,
- const struct sched_param *param
-);
-
-/*
- * 13.3.2 Set Scheduling Parameters, P1003.1b-1993, p. 253
- */
-
-int sched_getparam(
- pid_t pid,
- const struct sched_param *param
-);
-
-/*
- * 13.3.3 Set Scheduling Policy and Scheduling Parameters,
- * P1003.1b-1993, p. 254
- */
-
-int sched_setscheduler(
- pid_t pid,
- int policy,
- const struct sched_param *param
-);
-
-/*
- * 13.3.4 Get Scheduling Policy, P1003.1b-1993, p. 256
- */
-
-int sched_getscheduler(
- pid_t pid
-);
-
-/*
- * 13.3.6 Get Scheduling Parameter Limits, P1003.1b-1993, p. 258
- */
-
-int sched_get_priority_max(
- int policy
-);
-
-int sched_get_priority_min(
- int policy
-);
-
-int sched_rr_get_interval(
- pid_t pid,
- struct timespec *interval
-);
-
-#endif /* _POSIX_PRIORITY_SCHEDULING */
-
-#if defined(_POSIX_THREADS) || defined(_POSIX_PRIORITY_SCHEDULING)
-
-/*
- * 13.3.5 Yield Processor, P1003.1b-1993, p. 257
- */
-
-int sched_yield( void );
-
-#endif /* _POSIX_THREADS or _POSIX_PRIORITY_SCHEDULING */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/posix/include/semaphore.h b/cpukit/posix/include/semaphore.h
deleted file mode 100644
index 79e85f2d6a..0000000000
--- a/cpukit/posix/include/semaphore.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/* semaphore.h
- *
- * $Id$
- */
-
-#ifndef __POSIX_SEMAPHORE_h
-#define __POSIX_SEMAPHORE_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <sys/features.h>
-
-#if defined(_POSIX_SEMAPHORES)
-
-#include <sys/time.h>
-
-/*
- * 11.1 Semaphore Characteristics, P1003.1b-1993, p.219
- */
-
-typedef int sem_t;
-
-/*
- * 11.2.1 Initialize an Unnamed Semaphore, P1003.1b-1993, p.219
- */
-
-int sem_init(
- sem_t *sem,
- int pshared,
- unsigned int value
-);
-
-/*
- * 11.2.2 Destroy an Unnamed Semaphore, P1003.1b-1993, p.220
- */
-
-int sem_destroy(
- sem_t *sem
-);
-
-/*
- * 11.2.3 Initialize/Open a Named Semaphore, P1003.1b-1993, p.221
- *
- * NOTE: Follows open() calling conventions.
- */
-
-sem_t *sem_open(
- const char *name,
- int oflag,
- ...
-);
-
-/*
- * 11.2.4 Close a Named Semaphore, P1003.1b-1993, p.224
- */
-
-int sem_close(
- sem_t *sem
-);
-
-/*
- * 11.2.5 Remove a Named Semaphore, P1003.1b-1993, p.225
- */
-
-int sem_unlink(
- const char *name
-);
-
-/*
- * 11.2.6 Lock a Semaphore, P1003.1b-1993, p.226
- *
- * NOTE: P1003.4b/D8 adds sem_timedwait(), p. 27
- */
-
-int sem_wait(
- sem_t *sem
-);
-
-int sem_trywait(
- sem_t *sem
-);
-
-#if defined(_POSIX_TIMEOUTS)
-int sem_timedwait(
- sem_t *sem,
- const struct timespec *timeout
-);
-#endif
-
-/*
- * 11.2.7 Unlock a Semaphore, P1003.1b-1993, p.227
- */
-
-int sem_post(
- sem_t *sem
-);
-
-/*
- * 11.2.8 Get the Value of a Semaphore, P1003.1b-1993, p.229
- */
-
-int sem_getvalue(
- sem_t *sem,
- int *sval
-);
-
-#endif /* _POSIX_SEMAPHORES */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/posix/inline/Makefile.am b/cpukit/posix/inline/Makefile.am
deleted file mode 100644
index 32269fcdcd..0000000000
--- a/cpukit/posix/inline/Makefile.am
+++ /dev/null
@@ -1,10 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-SUBDIRS = rtems
-
-include $(top_srcdir)/../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/cpukit/posix/inline/rtems/posix/cond.inl b/cpukit/posix/inline/rtems/posix/cond.inl
deleted file mode 100644
index d718ef514f..0000000000
--- a/cpukit/posix/inline/rtems/posix/cond.inl
+++ /dev/null
@@ -1,76 +0,0 @@
-/* rtems/posix/cond.inl
- *
- * This include file contains the static inline implementation of the private
- * inlined routines for POSIX condition variables.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_POSIX_CONDITION_VARIABLES_inl
-#define __RTEMS_POSIX_CONDITION_VARIABLES_inl
-
-/*PAGE
- *
- * _POSIX_Condition_variables_Allocate
- */
-
-RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control
- *_POSIX_Condition_variables_Allocate( void )
-{
- return (POSIX_Condition_variables_Control *)
- _Objects_Allocate( &_POSIX_Condition_variables_Information );
-}
-
-/*PAGE
- *
- * _POSIX_Condition_variables_Free
- */
-
-RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Free (
- POSIX_Condition_variables_Control *the_condition_variable
-)
-{
- _Objects_Free(
- &_POSIX_Condition_variables_Information,
- &the_condition_variable->Object
- );
-}
-
-/*PAGE
- *
- * _POSIX_Condition_variables_Get
- */
-
-RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get (
- Objects_Id *id,
- Objects_Locations *location
-)
-{
-/* XXX really should validate pointer */
-/* XXX should support COND_INITIALIZER */
- return (POSIX_Condition_variables_Control *)
- _Objects_Get( &_POSIX_Condition_variables_Information, *id, location );
-}
-
-/*PAGE
- *
- * _POSIX_Condition_variables_Is_null
- */
-
-RTEMS_INLINE_ROUTINE boolean _POSIX_Condition_variables_Is_null (
- POSIX_Condition_variables_Control *the_condition_variable
-)
-{
- return !the_condition_variable;
-}
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/posix/inline/rtems/posix/intr.inl b/cpukit/posix/inline/rtems/posix/intr.inl
deleted file mode 100644
index 2539719b8c..0000000000
--- a/cpukit/posix/inline/rtems/posix/intr.inl
+++ /dev/null
@@ -1,71 +0,0 @@
-/* rtems/posix/intr.inl
- *
- * This include file contains the static inline implementation of the private
- * inlined routines for POSIX Interrupt Manager
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_POSIX_INTERRUPT_inl
-#define __RTEMS_POSIX_INTERRUPT_inl
-
-/*PAGE
- *
- * _POSIX_Interrupt_Allocate
- */
-
-RTEMS_INLINE_ROUTINE POSIX_Interrupt_Handler_control *
- _POSIX_Interrupt_Allocate( void )
-{
- return (POSIX_Interrupt_Handler_control *)
- _Objects_Allocate( &_POSIX_Interrupt_Handlers_Information );
-}
-
-/*PAGE
- *
- * _POSIX_Interrupt_Free
- */
-
-RTEMS_INLINE_ROUTINE void _POSIX_Interrupt_Free (
- POSIX_Interrupt_Handler_control *the_intr
-)
-{
- _Objects_Free( &_POSIX_Interrupt_Handlers_Information, &the_intr->Object );
-}
-
-/*PAGE
- *
- * _POSIX_Interrupt_Get
- */
-
-RTEMS_INLINE_ROUTINE POSIX_Interrupt_Control *_POSIX_Interrupt_Get (
- Objects_Id id,
- Objects_Locations *location
-)
-{
- return (POSIX_Interrupt_Control *)
- _Objects_Get( &_POSIX_Interrupt_Handlers_Information, id, location );
-}
-
-/*PAGE
- *
- * _POSIX_Interrupt_Is_null
- */
-
-RTEMS_INLINE_ROUTINE boolean _POSIX_Interrupt_Is_null (
- POSIX_Interrupt_Handler_control *the_intr
-)
-{
- return !the_intr;
-}
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/posix/inline/rtems/posix/key.inl b/cpukit/posix/inline/rtems/posix/key.inl
deleted file mode 100644
index 73855ad601..0000000000
--- a/cpukit/posix/inline/rtems/posix/key.inl
+++ /dev/null
@@ -1,69 +0,0 @@
-/* rtems/posix/key.inl
- *
- * This include file contains the static inline implementation of the private
- * inlined routines for POSIX key's.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_POSIX_KEY_inl
-#define __RTEMS_POSIX_KEY_inl
-
-/*PAGE
- *
- * _POSIX_Keys_Allocate
- */
-
-RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void )
-{
- return (POSIX_Keys_Control *) _Objects_Allocate( &_POSIX_Keys_Information );
-}
-
-/*PAGE
- *
- * _POSIX_Keys_Free
- */
-
-RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free (
- POSIX_Keys_Control *the_key
-)
-{
- _Objects_Free( &_POSIX_Keys_Information, &the_key->Object );
-}
-
-/*PAGE
- *
- * _POSIX_Keys_Get
- */
-
-RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Get (
- Objects_Id id,
- Objects_Locations *location
-)
-{
- return (POSIX_Keys_Control *)
- _Objects_Get( &_POSIX_Keys_Information, id, location );
-}
-
-/*PAGE
- *
- * _POSIX_Keys_Is_null
- */
-
-RTEMS_INLINE_ROUTINE boolean _POSIX_Keys_Is_null (
- POSIX_Keys_Control *the_key
-)
-{
- return !the_key;
-}
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/posix/inline/rtems/posix/mqueue.inl b/cpukit/posix/inline/rtems/posix/mqueue.inl
deleted file mode 100644
index e6da6674b4..0000000000
--- a/cpukit/posix/inline/rtems/posix/mqueue.inl
+++ /dev/null
@@ -1,110 +0,0 @@
-/* rtems/posix/mqueue.inl
- *
- * This include file contains the static inline implementation of the private
- * inlined routines for POSIX Message Queue.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_POSIX_MESSAGE_QUEUE_inl
-#define __RTEMS_POSIX_MESSAGE_QUEUE_inl
-
-/*PAGE
- *
- * _POSIX_Message_queue_Allocate
- */
-
-RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void )
-{
- return (POSIX_Message_queue_Control *)
- _Objects_Allocate( &_POSIX_Message_queue_Information );
-}
-
-/*PAGE
- *
- * _POSIX_Message_queue_Free
- */
-
-RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free (
- POSIX_Message_queue_Control *the_mq
-)
-{
- _Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object );
-}
-
-/*PAGE
- *
- * _POSIX_Message_queue_Namespace_remove
- */
-
-RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Namespace_remove (
- POSIX_Message_queue_Control *the_mq
-)
-{
- _Objects_Namespace_remove(
- &_POSIX_Message_queue_Information, &the_mq->Object );
-}
-
-/*PAGE
- *
- * _POSIX_Message_queue_Get
- */
-
-RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Get (
- Objects_Id id,
- Objects_Locations *location
-)
-{
- return (POSIX_Message_queue_Control *)
- _Objects_Get( &_POSIX_Message_queue_Information, id, location );
-}
-
-/*PAGE
- *
- * _POSIX_Message_queue_Is_null
- */
-
-RTEMS_INLINE_ROUTINE boolean _POSIX_Message_queue_Is_null (
- POSIX_Message_queue_Control *the_mq
-)
-{
- return !the_mq;
-}
-
-/*PAGE
- *
- * _POSIX_Message_queue_Priority_to_core
- */
-
-RTEMS_INLINE_ROUTINE CORE_message_queue_Submit_types _POSIX_Message_queue_Priority_to_core(
- unsigned int priority
-)
-{
- return priority * -1;
-}
-
-/*
- * _POSIX_Message_queue_Priority_from_core
- *
- * DESCRIPTION:
- *
- * XXX
- */
-
-RTEMS_INLINE_ROUTINE unsigned int _POSIX_Message_queue_Priority_from_core(
- CORE_message_queue_Submit_types priority
-)
-{
- return abs( priority );
-}
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/posix/inline/rtems/posix/mutex.inl b/cpukit/posix/inline/rtems/posix/mutex.inl
deleted file mode 100644
index 47ff46d507..0000000000
--- a/cpukit/posix/inline/rtems/posix/mutex.inl
+++ /dev/null
@@ -1,92 +0,0 @@
-/* rtems/posix/mutex.inl
- *
- * This include file contains the static inline implementation of the private
- * inlined routines for POSIX mutex's.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_POSIX_MUTEX_inl
-#define __RTEMS_POSIX_MUTEX_inl
-
-/*PAGE
- *
- * _POSIX_Mutex_Allocate
- */
-
-RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void )
-{
- return (POSIX_Mutex_Control *) _Objects_Allocate( &_POSIX_Mutex_Information );
-}
-
-/*PAGE
- *
- * _POSIX_Mutex_Free
- */
-
-RTEMS_INLINE_ROUTINE void _POSIX_Mutex_Free (
- POSIX_Mutex_Control *the_mutex
-)
-{
- _Objects_Free( &_POSIX_Mutex_Information, &the_mutex->Object );
-}
-
-/*PAGE
- *
- * _POSIX_Mutex_Get
- */
-
-RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Get (
- Objects_Id *id,
- Objects_Locations *location
-)
-{
- int status;
-
- if ( !id ) {
- *location = OBJECTS_ERROR;
- return (POSIX_Mutex_Control *) 0;
- }
-
- if ( *id == PTHREAD_MUTEX_INITIALIZER ) {
- /*
- * Do an "auto-create" here.
- */
-
- status = pthread_mutex_init( id, 0 );
- if ( status ) {
- *location = OBJECTS_ERROR;
- return (POSIX_Mutex_Control *) 0;
- }
- }
-
- /*
- * Now call Objects_Get()
- */
-
- return (POSIX_Mutex_Control *)
- _Objects_Get( &_POSIX_Mutex_Information, *id, location );
-}
-
-/*PAGE
- *
- * _POSIX_Mutex_Is_null
- */
-
-RTEMS_INLINE_ROUTINE boolean _POSIX_Mutex_Is_null (
- POSIX_Mutex_Control *the_mutex
-)
-{
- return !the_mutex;
-}
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/posix/inline/rtems/posix/priority.inl b/cpukit/posix/inline/rtems/posix/priority.inl
deleted file mode 100644
index dc8187d4ef..0000000000
--- a/cpukit/posix/inline/rtems/posix/priority.inl
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * $Id$
- */
-
-#ifndef __RTEMS_POSIX_PRIORITY_inl
-#define __RTEMS_POSIX_PRIORITY_inl
-
-/*
- * 1003.1b-1993,2.2.2.80 definition of priority, p. 19
- *
- * "Numericallly higher values represent higher priorities."
- *
- * Thus, RTEMS Core has priorities run in the opposite sense of the POSIX API.
- */
-
-RTEMS_INLINE_ROUTINE boolean _POSIX_Priority_Is_valid(
- int priority
-)
-{
- return (boolean) (priority >= 1 && priority <= 254);
-}
-
-RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
- int priority
-)
-{
- return (Priority_Control) (255 - priority);
-}
-
-RTEMS_INLINE_ROUTINE int _POSIX_Priority_From_core(
- Priority_Control priority
-)
-{
- return 255 - priority;
-}
-
-#endif
diff --git a/cpukit/posix/inline/rtems/posix/pthread.inl b/cpukit/posix/inline/rtems/posix/pthread.inl
deleted file mode 100644
index 9fc32ddff8..0000000000
--- a/cpukit/posix/inline/rtems/posix/pthread.inl
+++ /dev/null
@@ -1,69 +0,0 @@
-/* rtems/posix/pthread.inl
- *
- * This include file contains the static inline implementation of the private
- * inlined routines for POSIX threads.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_POSIX_THREADS_inl
-#define __RTEMS_POSIX_THREADS_inl
-
-/*PAGE
- *
- * _POSIX_Threads_Allocate
- */
-
-RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void )
-{
- return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information );
-}
-
-/*PAGE
- *
- * _POSIX_Threads_Free
- */
-
-RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free (
- Thread_Control *the_pthread
-)
-{
- _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object );
-}
-
-/*PAGE
- *
- * _POSIX_Threads_Get
- */
-
-RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get (
- pthread_t id,
- Objects_Locations *location
-)
-{
- return (Thread_Control *)
- _Objects_Get( &_POSIX_Threads_Information, (Objects_Id)id, location );
-}
-
-/*PAGE
- *
- * _POSIX_Threads_Is_null
- */
-
-RTEMS_INLINE_ROUTINE boolean _POSIX_Threads_Is_null (
- Thread_Control *the_pthread
-)
-{
- return !the_pthread;
-}
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/posix/inline/rtems/posix/semaphore.inl b/cpukit/posix/inline/rtems/posix/semaphore.inl
deleted file mode 100644
index 2d9ad70602..0000000000
--- a/cpukit/posix/inline/rtems/posix/semaphore.inl
+++ /dev/null
@@ -1,85 +0,0 @@
-/* rtems/posix/semaphore.inl
- *
- * This include file contains the static inline implementation of the private
- * inlined routines for POSIX Semaphores.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_POSIX_SEMAPHORE_inl
-#define __RTEMS_POSIX_SEMAPHORE_inl
-
-/*PAGE
- *
- * _POSIX_Semaphore_Allocate
- */
-
-RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void )
-{
- return (POSIX_Semaphore_Control *)
- _Objects_Allocate( &_POSIX_Semaphore_Information );
-}
-
-/*PAGE
- *
- * _POSIX_Semaphore_Free
- */
-
-RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Free (
- POSIX_Semaphore_Control *the_semaphore
-)
-{
- _Objects_Free( &_POSIX_Semaphore_Information, &the_semaphore->Object );
-}
-
-/*PAGE
- *
- * _POSIX_Semaphore_Namespace_remove
- */
-
-RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Namespace_remove (
- POSIX_Semaphore_Control *the_semaphore
-)
-{
- _Objects_Namespace_remove(
- &_POSIX_Semaphore_Information, &the_semaphore->Object );
-}
-
-
-
-/*PAGE
- *
- * _POSIX_Semaphore_Get
- */
-
-RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get (
- Objects_Id *id,
- Objects_Locations *location
-)
-{
- return (POSIX_Semaphore_Control *)
- _Objects_Get( &_POSIX_Semaphore_Information, *id, location );
-}
-
-/*PAGE
- *
- * _POSIX_Semaphore_Is_null
- */
-
-RTEMS_INLINE_ROUTINE boolean _POSIX_Semaphore_Is_null (
- POSIX_Semaphore_Control *the_semaphore
-)
-{
- return !the_semaphore;
-}
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/posix/macros/Makefile.am b/cpukit/posix/macros/Makefile.am
deleted file mode 100644
index 32269fcdcd..0000000000
--- a/cpukit/posix/macros/Makefile.am
+++ /dev/null
@@ -1,10 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-SUBDIRS = rtems
-
-include $(top_srcdir)/../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/cpukit/posix/src/Makefile.am b/cpukit/posix/src/Makefile.am
deleted file mode 100644
index 63fd5adc0f..0000000000
--- a/cpukit/posix/src/Makefile.am
+++ /dev/null
@@ -1,109 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-# following are semi-implemented and untested
-UNUSED_C_FILES = devctl.c intr.c
-
-# These are really in the stand but not really functional
-BUILD_FOR_NOW_C_FILES = aio.c
-
-ENOSYS_C_FILES = execl.c execle.c execlp.c execv.c execve.c execvp.c fork.c \
- pthreadatfork.c wait.c waitpid.c
-
-CANCEL_C_FILES = cancel.c cancelrun.c cleanuppop.c cleanuppush.c \
- setcancelstate.c setcanceltype.c testcancel.c
-
-CONDITION_VARIABLE_C_FILES = cond.c condattrdestroy.c condattrgetpshared.c \
- condattrinit.c condattrsetpshared.c condbroadcast.c \
- conddefaultattributes.c conddestroy.c condinit.c condmp.c condsignal.c \
- condsignalsupp.c condtimedwait.c condwait.c condwaitsupp.c
-
-ID_C_FILES = getegid.c geteuid.c getgid.c getgroups.c getlogin.c getpgrp.c \
- getpid.c getppid.c getuid.c setpgid.c setsid.c
-
-KEY_C_FILES = key.c keycreate.c keydelete.c keygetspecific.c \
- keyrundestructors.c keysetspecific.c
-
-MESSAGE_QUEUE_C_FILES = mqueue.c mqueueclose.c mqueuecreatesupp.c \
- mqueuedeletesupp.c mqueuegetattr.c mqueuenametoid.c mqueuenotify.c \
- mqueueopen.c mqueuereceive.c mqueuerecvsupp.c mqueuesend.c \
- mqueuesendsupp.c mqueuesetattr.c mqueuetimedreceive.c mqueuetimedsend.c \
- mqueuetranslatereturncode.c mqueueunlink.c
-
-MUTEX_C_FILES = mutex.c mutexattrdestroy.c mutexattrgetprioceiling.c \
- mutexattrgetprotocol.c mutexattrgetpshared.c mutexattrinit.c \
- mutexattrsetprioceiling.c mutexattrsetprotocol.c mutexattrsetpshared.c \
- mutexdefaultattributes.c mutexdestroy.c mutexfromcorestatus.c \
- mutexgetprioceiling.c mutexinit.c mutexlock.c mutexlocksupp.c mutexmp.c \
- mutexsetprioceiling.c mutextimedlock.c mutextrylock.c mutexunlock.c
-
-PTHREAD_C_FILES = pthread.c pthreadsetcputime.c pthreadgetcputime.c \
- pthreadgetcpuclockid.c pthreadonce.c pthreadequal.c pthreadself.c \
- pthreadexit.c pthreaddetach.c pthreadjoin.c pthreadcreate.c \
- pthreadattrsetdetachstate.c pthreadattrgetdetachstate.c \
- pthreadattrgetstackaddr.c pthreadattrsetstackaddr.c \
- pthreadattrgetstacksize.c pthreadattrsetstacksize.c pthreadattrinit.c \
- pthreadattrdestroy.c pthreadsetschedparam.c pthreadgetschedparam.c \
- pthreadattrsetschedparam.c pthreadattrgetschedparam.c \
- pthreadattrgetschedpolicy.c pthreadattrsetschedpolicy.c \
- pthreadattrgetinheritsched.c pthreadattrsetinheritsched.c \
- pthreadattrgetscope.c pthreadattrsetscope.c
-
-PSIGNAL_C_FILES = psignal.c alarm.c kill.c killinfo.c pause.c \
- psignalclearprocesssignals.c psignalsetprocesssignals.c \
- psignalchecksignal.c psignalclearsignals.c psignalunblockthread.c \
- pthreadkill.c pthreadsigmask.c sigaction.c sigaddset.c sigdelset.c \
- sigemptyset.c sigfillset.c sigismember.c sigpending.c sigprocmask.c \
- sigqueue.c sigsuspend.c sigtimedwait.c sigwait.c sigwaitinfo.c \
- signal_2.c
-
-SEMAPHORE_C_FILES = semaphore.c semaphorecreatesupp.c semaphoredeletesupp.c \
- semaphoremp.c semaphorenametoid.c semaphorewaitsupp.c semclose.c \
- semdestroy.c semgetvalue.c seminit.c semopen.c sempost.c semtimedwait.c \
- semtrywait.c semunlink.c semwait.c
-
-TIME_C_FILES = time.c posixtimespecsubtract.c posixtimespectointerval.c \
- posixintervaltotimespec.c clockgetcpuclockid.c clockgetenableattr.c \
- clockgetres.c clockgettime.c clocksetenableattr.c clocksettime.c \
- nanosleep.c sleep.c
-
-# the timer manager needs to be split further but only after its
-# dependence on the Classic API Timer Manager is removed.
-TIMER_C_FILES = ptimer.c ptimer1.c
-
-C_FILES = adasupp.c $(CANCEL_C_FILES) $(CONDITION_VARIABLE_C_FILES) \
- $(ID_C_FILES) $(KEY_C_FILES) $(MESSAGE_QUEUE_C_FILES) $(MUTEX_C_FILES) \
- $(PTHREAD_C_FILES) $(PSIGNAL_C_FILES) sched.c $(SEMAPHORE_C_FILES) \
- sysconf.c $(TIME_C_FILES) $(TIMER_C_FILES) types.c $(ENOSYS_C_FILES) \
- $(BUILD_FOR_NOW_C_FILES) utsname.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-OBJS = $(C_O_FILES)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../../automake/lib.am
-
-#
-# Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -D__RTEMS_INSIDE__
-AM_CFLAGS += $(CFLAGS_OS_V)
-
-all: ${ARCH} ${OBJS}
-
-# temporary so we can see how many things are left to implement
-not:
- grep -i NOT_IMPL $(C_FILES) | grep -v MP_NOT_IMPL
- @echo
- @echo
- @echo
- @echo `grep -i NOT_IMPL $(C_FILES) | grep -v MP_NOT_IMPL | wc -l ` places marked not implemented
- @echo `wc -l $(C_FILES) | grep total` lines of C code to test
-
-EXTRA_DIST = $(C_FILES) $(UNUSED_C_FILES)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/cpukit/posix/src/README.mqueue b/cpukit/posix/src/README.mqueue
deleted file mode 100644
index 9912ddd110..0000000000
--- a/cpukit/posix/src/README.mqueue
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# $Id$
-#
-
-This program should print out the default attribute settings for a
-POSIX message queue.
-
-#include <mqueue.h>
-
-main()
-{
- mqd_t mqfd;
- struct mq_attr mqstat;
- int status;
-
- mqfd = mq_open("myipc",O_WRONLY|O_CREAT,NULL);
-
- status = mq_getattr(mqfd, &mqstat);
- printf( "status: %d\n", status );
- if ( !status ) {
- printf( "mq_maxmsg: %d\n", mqstat.mq_maxmsg );
- printf( "mq_msgsize: %d\n", mqstat.mq_msgsize );
- printf( "mq_curmsgs: %d\n", mqstat.mq_curmsgs );
- }
- exit( 0 );
-}
-
diff --git a/cpukit/posix/src/adasupp.c b/cpukit/posix/src/adasupp.c
deleted file mode 100644
index 234b0c2a40..0000000000
--- a/cpukit/posix/src/adasupp.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * $Id$
- */
-
-#include <assert.h>
-#include <errno.h>
-#include <pthread.h>
-
-#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
-
-/*PAGE
- *
- * _ada_pthread_minimum_stack_size
- *
- * This routine returns the minimum stack size so the GNAT RTS can
- * allocate enough stack for Ada tasks.
- */
-
-size_t _ada_pthread_minimum_stack_size( void )
-{
- /*
- * Eventually this may need to include a per cpu family calculation
- * but for now, this will do.
- */
-
- return PTHREAD_MINIMUM_STACK_SIZE * 2;
-}
diff --git a/cpukit/posix/src/aio.c b/cpukit/posix/src/aio.c
deleted file mode 100644
index e57880ff78..0000000000
--- a/cpukit/posix/src/aio.c
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * $Id$
- */
-
-#include <aio.h>
-
-#include <rtems/system.h>
-#include <rtems/posix/seterr.h>
-
-int POSIX_NOT_IMPLEMENTED();
-
-/*PAGE
- *
- * 6.7.2 Asynchronous Read, P1003.1b-1993, p. 154
- */
-
-int aio_read(
- struct aiocb *aiocbp
-)
-{
- return POSIX_NOT_IMPLEMENTED();
-}
-
-/*PAGE
- *
- * 6.7.3 Asynchronous Write, P1003.1b-1993, p. 155
- */
-
-int aio_write(
- struct aiocb *aiocbp
-)
-{
- return POSIX_NOT_IMPLEMENTED();
-}
-
-/*PAGE
- *
- * 6.7.4 List Directed I/O, P1003.1b-1993, p. 158
- */
-
-int lio_listio(
- int mode,
- struct aiocb * const list[],
- int nent,
- struct sigevent *sig
-)
-{
- return POSIX_NOT_IMPLEMENTED();
-}
-
-/*PAGE
- *
- * 6.7.5 Retrieve Error of Asynchronous I/O Operation, P1003.1b-1993, p. 161
- */
-
-int aio_error(
- const struct aiocb *aiocbp
-)
-{
- return POSIX_NOT_IMPLEMENTED();
-}
-
-/*PAGE
- *
- * 6.7.6 Retrieve Return Status of Asynchronous I/O Operation,
- * P1003.1b-1993, p. 162
- */
-
-int aio_return(
- const struct aiocb *aiocbp
-)
-{
- return POSIX_NOT_IMPLEMENTED();
-}
-
-/*PAGE
- *
- * 6.7.7 Cancel Asynchronous I/O Operation, P1003.1b-1993, p. 163
- */
-
-int aio_cancel(
- int filedes,
- struct aiocb *aiocbp
-)
-{
- return POSIX_NOT_IMPLEMENTED();
-}
-
-/*PAGE
- *
- * 6.7.7 Wait for Asynchronous I/O Request, P1003.1b-1993, p. 164
- */
-
-int aio_suspend(
- struct aiocb * const list[],
- int nent,
- const struct timespec *timeout
-)
-{
- return POSIX_NOT_IMPLEMENTED();
-}
-
-/*PAGE
- *
- * 6.7.9 Asynchronous File Synchronization, P1003.1b-1993, p. 166
- */
-
-int aio_fsync(
- int op,
- struct aiocb *aiocbp
-)
-{
- return POSIX_NOT_IMPLEMENTED();
-}
diff --git a/cpukit/posix/src/alarm.c b/cpukit/posix/src/alarm.c
deleted file mode 100644
index bef81d6695..0000000000
--- a/cpukit/posix/src/alarm.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 3.4.1 Schedule Alarm, P1003.1b-1993, p. 79
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <pthread.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
-#include <rtems/posix/psignal.h>
-
-unsigned int alarm(
- unsigned int seconds
-)
-{
- unsigned int remaining = 0;
- Watchdog_Control *the_timer;
-
- the_timer = &_POSIX_signals_Alarm_timer;
-
- switch ( _Watchdog_Remove( the_timer ) ) {
- case WATCHDOG_INACTIVE:
- case WATCHDOG_BEING_INSERTED:
- break;
-
- case WATCHDOG_ACTIVE:
- case WATCHDOG_REMOVE_IT:
- remaining = the_timer->initial -
- (the_timer->stop_time - the_timer->start_time);
- break;
- }
-
- _Watchdog_Insert_seconds( the_timer, seconds );
-
- return remaining;
-}
-
diff --git a/cpukit/posix/src/cancel.c b/cpukit/posix/src/cancel.c
deleted file mode 100644
index e5bd1f2208..0000000000
--- a/cpukit/posix/src/cancel.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * $Id$
- */
-
-#include <pthread.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/posix/cancel.h>
-#include <rtems/posix/pthread.h>
-#include <rtems/posix/threadsup.h>
-
-/*PAGE
- *
- * 18.2.1 Canceling Execution of a Thread, P1003.1c/Draft 10, p. 181
- */
-
-int pthread_cancel(
- pthread_t thread
-)
-{
- Thread_Control *the_thread;
- POSIX_API_Control *thread_support;
- Objects_Locations location;
-
- the_thread = _POSIX_Threads_Get( thread, &location );
- switch ( location ) {
- case OBJECTS_ERROR:
- return EINVAL;
- case OBJECTS_REMOTE:
- return POSIX_MP_NOT_IMPLEMENTED();
- case OBJECTS_LOCAL:
- thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
-
- thread_support->cancelation_requested = 1;
-
- _Thread_Enable_dispatch();
- return 0;
- }
-
- return POSIX_BOTTOM_REACHED();
-}
diff --git a/cpukit/posix/src/cancelrun.c b/cpukit/posix/src/cancelrun.c
deleted file mode 100644
index 9de56f050b..0000000000
--- a/cpukit/posix/src/cancelrun.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * $Id$
- */
-
-#include <pthread.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/posix/cancel.h>
-#include <rtems/posix/pthread.h>
-#include <rtems/posix/threadsup.h>
-
-/*PAGE
- *
- * _POSIX_Thread_cancel_run
- *
- */
-
-void _POSIX_Thread_cancel_run(
- Thread_Control *the_thread
-)
-{
- int old_cancel_state;
- POSIX_Cancel_Handler_control *handler;
- Chain_Control *handler_stack;
- POSIX_API_Control *thread_support;
- ISR_Level level;
-
- thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
-
- handler_stack = &thread_support->Cancellation_Handlers;
-
- old_cancel_state = thread_support->cancelability_state;
-
- thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
-
- while ( !_Chain_Is_empty( handler_stack ) ) {
- _ISR_Disable( level );
- handler = (POSIX_Cancel_Handler_control *) _Chain_Tail( handler_stack );
- _Chain_Extract_unprotected( &handler->Node );
- _ISR_Enable( level );
-
- (*handler->routine)( handler->arg );
-
- _Workspace_Free( handler );
- }
-
- thread_support->cancelation_requested = 0;
-
- thread_support->cancelability_state = old_cancel_state;
-}
diff --git a/cpukit/posix/src/cleanuppop.c b/cpukit/posix/src/cleanuppop.c
deleted file mode 100644
index b9ea66a1cf..0000000000
--- a/cpukit/posix/src/cleanuppop.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * $Id$
- */
-
-#include <pthread.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/posix/cancel.h>
-#include <rtems/posix/pthread.h>
-#include <rtems/posix/threadsup.h>
-
-/*PAGE
- *
- * 18.2.3.1 Establishing Cancellation Handlers, P1003.1c/Draft 10, p. 184
- */
-
-void pthread_cleanup_pop(
- int execute
-)
-{
- POSIX_Cancel_Handler_control *handler;
- Chain_Control *handler_stack;
- POSIX_API_Control *thread_support;
- ISR_Level level;
-
- thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
-
- handler_stack = &thread_support->Cancellation_Handlers;
-
- if ( _Chain_Is_empty( handler_stack ) )
- return;
-
- _ISR_Disable( level );
- handler = (POSIX_Cancel_Handler_control *) _Chain_Tail( handler_stack );
- _Chain_Extract_unprotected( &handler->Node );
- _ISR_Enable( level );
-
- if ( execute )
- (*handler->routine)( handler->arg );
-
- _Workspace_Free( handler );
-}
diff --git a/cpukit/posix/src/cleanuppush.c b/cpukit/posix/src/cleanuppush.c
deleted file mode 100644
index 3dec1e6790..0000000000
--- a/cpukit/posix/src/cleanuppush.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * $Id$
- */
-
-#include <pthread.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/posix/cancel.h>
-#include <rtems/posix/pthread.h>
-#include <rtems/posix/threadsup.h>
-
-/*PAGE
- *
- * 18.2.3.1 Establishing Cancellation Handlers, P1003.1c/Draft 10, p. 184
- */
-
-void pthread_cleanup_push(
- void (*routine)( void * ),
- void *arg
-)
-{
- POSIX_Cancel_Handler_control *handler;
- Chain_Control *handler_stack;
- POSIX_API_Control *thread_support;
-
- if ( !routine )
- return; /* XXX what to do really? */
-
- handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) );
-
- if ( !handler )
- return; /* XXX what to do really? */
-
- thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
-
- handler_stack = &thread_support->Cancellation_Handlers;
-
- handler->routine = routine;
- handler->arg = arg;
-
- _Chain_Append( handler_stack, &handler->Node );
-}
diff --git a/cpukit/posix/src/clockgetcpuclockid.c b/cpukit/posix/src/clockgetcpuclockid.c
deleted file mode 100644
index fc0a3535b0..0000000000
--- a/cpukit/posix/src/clockgetcpuclockid.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * $Id$
- */
-
-#include <assert.h>
-#include <time.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/tod.h>
-
-#include <rtems/posix/seterr.h>
-#include <rtems/posix/time.h>
-
-/*PAGE
- *
- * 20.1.3 Accessing a Process CPU-time CLock, P1003.4b/D8, p. 55
- */
-
-int clock_getcpuclockid(
- pid_t pid,
- clockid_t *clock_id
-)
-{
- return POSIX_NOT_IMPLEMENTED();
-}
diff --git a/cpukit/posix/src/clockgetenableattr.c b/cpukit/posix/src/clockgetenableattr.c
deleted file mode 100644
index 6a7d9c1c46..0000000000
--- a/cpukit/posix/src/clockgetenableattr.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * $Id$
- */
-
-#include <assert.h>
-#include <time.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/tod.h>
-
-#include <rtems/posix/seterr.h>
-#include <rtems/posix/time.h>
-
-/*PAGE
- *
- * 20.1.5 CPU-time Clock Attribute Access, P1003.4b/D8, p. 58
- */
-
-int clock_getenable_attr(
- clockid_t clock_id,
- int *attr
-)
-{
- return POSIX_NOT_IMPLEMENTED();
-}
diff --git a/cpukit/posix/src/clockgetres.c b/cpukit/posix/src/clockgetres.c
deleted file mode 100644
index 3be3439cdb..0000000000
--- a/cpukit/posix/src/clockgetres.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * $Id$
- */
-
-#include <assert.h>
-#include <time.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/tod.h>
-
-#include <rtems/posix/seterr.h>
-#include <rtems/posix/time.h>
-
-/*PAGE
- *
- * 14.2.1 Clocks, P1003.1b-1993, p. 263
- */
-
-int clock_getres(
- clockid_t clock_id,
- struct timespec *res
-)
-{
- if ( !res )
- set_errno_and_return_minus_one( EINVAL );
-
- switch ( clock_id ) {
-
- /*
- * All time in rtems is based on the same clock tick.
- */
-
- case CLOCK_REALTIME:
- case CLOCK_PROCESS_CPUTIME:
- case CLOCK_THREAD_CPUTIME:
- if ( res )
- _POSIX_Interval_to_timespec( _TOD_Microseconds_per_tick, res );
- break;
-
- default:
- set_errno_and_return_minus_one( EINVAL );
-
- }
- return 0;
-}
diff --git a/cpukit/posix/src/clockgettime.c b/cpukit/posix/src/clockgettime.c
deleted file mode 100644
index 806a29caa3..0000000000
--- a/cpukit/posix/src/clockgettime.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * $Id$
- */
-
-#include <assert.h>
-#include <time.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/tod.h>
-
-#include <rtems/posix/seterr.h>
-#include <rtems/posix/time.h>
-
-/*PAGE
- *
- * 14.2.1 Clocks, P1003.1b-1993, p. 263
- */
-
-int clock_gettime(
- clockid_t clock_id,
- struct timespec *tp
-)
-{
- ISR_Level level;
- time_t seconds;
- long ticks;
-
- if ( !tp )
- set_errno_and_return_minus_one( EINVAL );
-
- switch ( clock_id ) {
-
- case CLOCK_REALTIME:
-
- _ISR_Disable( level );
- seconds = _TOD_Seconds_since_epoch;
- ticks = _TOD_Current.ticks;
- _ISR_Enable( level );
-
- tp->tv_sec = seconds + POSIX_TIME_SECONDS_1970_THROUGH_1988;
- tp->tv_nsec = ticks * _TOD_Microseconds_per_tick *
- TOD_NANOSECONDS_PER_MICROSECOND;
- break;
-
-#ifdef _POSIX_CPUTIME
- case CLOCK_PROCESS_CPUTIME:
- /* don't base this on _Watchdog_Ticks_since_boot--duration is too short*/
- return POSIX_NOT_IMPLEMENTED();
- break;
-#endif
-
-#ifdef _POSIX_THREAD_CPUTIME
- case CLOCK_THREAD_CPUTIME:
- return POSIX_NOT_IMPLEMENTED();
- break;
-#endif
- default:
- set_errno_and_return_minus_one( EINVAL );
-
- }
- return 0;
-}
diff --git a/cpukit/posix/src/clocksetenableattr.c b/cpukit/posix/src/clocksetenableattr.c
deleted file mode 100644
index 2ee5a4ef25..0000000000
--- a/cpukit/posix/src/clocksetenableattr.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * $Id$
- */
-
-#include <assert.h>
-#include <time.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/tod.h>
-
-#include <rtems/posix/seterr.h>
-#include <rtems/posix/time.h>
-
-/*PAGE
- *
- * 20.1.5 CPU-time Clock Attribute Access, P1003.4b/D8, p. 58
- */
-
-int clock_setenable_attr(
- clockid_t clock_id,
- int attr
-)
-{
- return POSIX_NOT_IMPLEMENTED();
-}
diff --git a/cpukit/posix/src/clocksettime.c b/cpukit/posix/src/clocksettime.c
deleted file mode 100644
index 8157bdfda5..0000000000
--- a/cpukit/posix/src/clocksettime.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * $Id$
- */
-
-#include <assert.h>
-#include <time.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/tod.h>
-
-#include <rtems/posix/seterr.h>
-#include <rtems/posix/time.h>
-
-/*PAGE
- *
- * 14.2.1 Clocks, P1003.1b-1993, p. 263
- */
-
-int clock_settime(
- clockid_t clock_id,
- const struct timespec *tp
-)
-{
- struct tm split_time;
- TOD_Control tod;
- Watchdog_Interval seconds;
-
- assert( tp );
-
- switch ( clock_id ) {
-
- case CLOCK_REALTIME:
- (void) gmtime_r( &tp->tv_sec, &split_time );
-
- /*
- * Convert the tm structure format to that used by the TOD Handler
- *
- * NOTE: TOD Handler does not honor leap seconds.
- */
-
- tod.year = split_time.tm_year + 1900; /* RHS is years since 1900 */
- tod.month = split_time.tm_mon + 1; /* RHS uses 0-11 */
- tod.day = split_time.tm_mday;
- tod.hour = split_time.tm_hour;
- tod.minute = split_time.tm_min;
- tod.second = split_time.tm_sec; /* RHS allows 0-61 for leap seconds */
-
- tod.ticks = (tp->tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND) /
- _TOD_Microseconds_per_tick;
-
- if ( !_TOD_Validate( &tod ) )
- set_errno_and_return_minus_one( EINVAL );
-
- /*
- * We can't use the tp->tv_sec field because it is based on
- * a different EPOCH.
- */
-
- seconds = _TOD_To_seconds( &tod );
- _Thread_Disable_dispatch();
- _TOD_Set( &tod, seconds );
- _Thread_Enable_dispatch();
- break;
-
-#ifdef _POSIX_CPUTIME
- case CLOCK_PROCESS_CPUTIME:
- return POSIX_NOT_IMPLEMENTED();
- break;
-#endif
-
-#ifdef _POSIX_THREAD_CPUTIME
- case CLOCK_THREAD_CPUTIME:
- return POSIX_NOT_IMPLEMENTED();
- break;
-#endif
- default:
- set_errno_and_return_minus_one( EINVAL );
-
- }
- return 0;
-}
diff --git a/cpukit/posix/src/cond.c b/cpukit/posix/src/cond.c
deleted file mode 100644
index 32a1fea3f5..0000000000
--- a/cpukit/posix/src/cond.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * $Id$
- */
-
-#include <pthread.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/posix/cond.h>
-#include <rtems/posix/time.h>
-#include <rtems/posix/mutex.h>
-
-/*PAGE
- *
- * _POSIX_Condition_variables_Manager_initialization
- *
- * This routine initializes all condition variable manager related data
- * structures.
- *
- * Input parameters:
- * maximum_condition_variables - maximum configured condition_variables
- *
- * Output parameters: NONE
- */
-
-void _POSIX_Condition_variables_Manager_initialization(
- unsigned32 maximum_condition_variables
-)
-{
- _Objects_Initialize_information(
- &_POSIX_Condition_variables_Information,
- OBJECTS_POSIX_CONDITION_VARIABLES,
- TRUE,
- maximum_condition_variables,
- sizeof( POSIX_Condition_variables_Control ),
- FALSE,
- 0,
- FALSE
- );
-}
diff --git a/cpukit/posix/src/condattrdestroy.c b/cpukit/posix/src/condattrdestroy.c
deleted file mode 100644
index f0e58eda06..0000000000
--- a/cpukit/posix/src/condattrdestroy.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * $Id$
- */
-
-#include <pthread.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/posix/cond.h>
-#include <rtems/posix/time.h>
-#include <rtems/posix/mutex.h>
-
-/*PAGE
- *
- * 11.4.1 Condition Variable Initialization Attributes,
- * P1003.1c/Draft 10, p. 96
- */
-
-int pthread_condattr_destroy(
- pthread_condattr_t *attr
-)
-{
- if ( !attr || attr->is_initialized == FALSE )
- return EINVAL;
-
- attr->is_initialized = FALSE;
- return 0;
-}
diff --git a/cpukit/posix/src/condattrgetpshared.c b/cpukit/posix/src/condattrgetpshared.c
deleted file mode 100644
index 7e2e7944a3..0000000000
--- a/cpukit/posix/src/condattrgetpshared.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * $Id$
- */
-
-#include <pthread.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/posix/cond.h>
-#include <rtems/posix/time.h>
-#include <rtems/posix/mutex.h>
-
-/*PAGE
- *
- * 11.4.1 Condition Variable Initialization Attributes,
- * P1003.1c/Draft 10, p. 96
- */
-
-int pthread_condattr_getpshared(
- const pthread_condattr_t *attr,
- int *pshared
-)
-{
- if ( !attr )
- return EINVAL;
-
- *pshared = attr->process_shared;
- return 0;
-}
diff --git a/cpukit/posix/src/condattrinit.c b/cpukit/posix/src/condattrinit.c
deleted file mode 100644
index 891540227f..0000000000
--- a/cpukit/posix/src/condattrinit.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * $Id$
- */
-
-#include <pthread.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/posix/cond.h>
-#include <rtems/posix/time.h>
-#include <rtems/posix/mutex.h>
-
-/*PAGE
- *
- * 11.4.1 Condition Variable Initialization Attributes,
- * P1003.1c/Draft 10, p. 96
- */
-
-int pthread_condattr_init(
- pthread_condattr_t *attr
-)
-{
- if ( !attr )
- return EINVAL;
-
- *attr = _POSIX_Condition_variables_Default_attributes;
- return 0;
-}
diff --git a/cpukit/posix/src/condattrsetpshared.c b/cpukit/posix/src/condattrsetpshared.c
deleted file mode 100644
index 6c5b0e5301..0000000000
--- a/cpukit/posix/src/condattrsetpshared.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * $Id$
- */
-
-#include <pthread.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/posix/cond.h>
-#include <rtems/posix/time.h>
-#include <rtems/posix/mutex.h>
-
-/*PAGE
- *
- * 11.4.1 Condition Variable Initialization Attributes,
- * P1003.1c/Draft 10, p. 96
- */
-
-int pthread_condattr_setpshared(
- pthread_condattr_t *attr,
- int pshared
-)
-{
- if ( !attr )
- return EINVAL;
-
- switch ( pshared ) {
- case PTHREAD_PROCESS_SHARED:
- case PTHREAD_PROCESS_PRIVATE:
- attr->process_shared = pshared;
- return 0;
-
- default:
- return EINVAL;
- }
-}
diff --git a/cpukit/posix/src/condbroadcast.c b/cpukit/posix/src/condbroadcast.c
deleted file mode 100644
index 5a55e75b23..0000000000
--- a/cpukit/posix/src/condbroadcast.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * $Id$
- */
-
-#include <pthread.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/posix/cond.h>
-#include <rtems/posix/time.h>
-#include <rtems/posix/mutex.h>
-
-/*PAGE
- *
- * 11.4.3 Broadcasting and Signaling a Condition, P1003.1c/Draft 10, p. 101
- */
-
-int pthread_cond_broadcast(
- pthread_cond_t *cond
-)
-{
- return _POSIX_Condition_variables_Signal_support( cond, TRUE );
-}
diff --git a/cpukit/posix/src/conddefaultattributes.c b/cpukit/posix/src/conddefaultattributes.c
deleted file mode 100644
index a45b96f3c8..0000000000
--- a/cpukit/posix/src/conddefaultattributes.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * $Id$
- */
-
-#include <pthread.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/posix/cond.h>
-#include <rtems/posix/time.h>
-#include <rtems/posix/mutex.h>
-
-/*PAGE
- *
- * The default condition variable attributes structure.
- */
-
-const pthread_condattr_t _POSIX_Condition_variables_Default_attributes = {
- TRUE, /* is_initialized */
- PTHREAD_PROCESS_PRIVATE /* process_shared */
-};
diff --git a/cpukit/posix/src/conddestroy.c b/cpukit/posix/src/conddestroy.c
deleted file mode 100644
index abfe07fc74..0000000000
--- a/cpukit/posix/src/conddestroy.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * $Id$
- */
-
-#include <pthread.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/posix/cond.h>
-#include <rtems/posix/time.h>
-#include <rtems/posix/mutex.h>
-
-/*PAGE
- *
- * 11.4.2 Initializing and Destroying a Condition Variable,
- * P1003.1c/Draft 10, p. 87
- */
-
-int pthread_cond_destroy(
- pthread_cond_t *cond
-)
-{
- register POSIX_Condition_variables_Control *the_cond;
- Objects_Locations location;
-
- the_cond = _POSIX_Condition_variables_Get( cond, &location );
- switch ( location ) {
- case OBJECTS_REMOTE:
-#if defined(RTEMS_MULTIPROCESSING)
- _Thread_Dispatch();
- return POSIX_MP_NOT_IMPLEMENTED();
- return EINVAL;
-#endif
-
- case OBJECTS_ERROR:
- return EINVAL;
-
-
- case OBJECTS_LOCAL:
-
- if ( _Thread_queue_First( &the_cond->Wait_queue ) ) {
- _Thread_Enable_dispatch();
- return EBUSY;
- }
-
- _Objects_Close(
- &_POSIX_Condition_variables_Information,
- &the_cond->Object
- );
-
- _POSIX_Condition_variables_Free( the_cond );
-
-#if defined(RTEMS_MULTIPROCESSING)
- if ( the_cond->process_shared == PTHREAD_PROCESS_SHARED ) {
-
- _Objects_MP_Close(
- &_POSIX_Condition_variables_Information,
- the_cond->Object.id
- );
-
- _POSIX_Condition_variables_MP_Send_process_packet(
- POSIX_CONDITION_VARIABLES_MP_ANNOUNCE_DELETE,
- the_cond->Object.id,
- 0, /* Not used */
- 0 /* Not used */
- );
- }
-#endif
- _Thread_Enable_dispatch();
- return 0;
- }
- return POSIX_BOTTOM_REACHED();
-}
diff --git a/cpukit/posix/src/condinit.c b/cpukit/posix/src/condinit.c
deleted file mode 100644
index 37b11878b0..0000000000
--- a/cpukit/posix/src/condinit.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * $Id$
- */
-
-#include <pthread.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/posix/cond.h>
-#include <rtems/posix/time.h>
-#include <rtems/posix/mutex.h>
-
-/*PAGE
- *
- * 11.4.2 Initializing and Destroying a Condition Variable,
- * P1003.1c/Draft 10, p. 87
- */
-
-int pthread_cond_init(
- pthread_cond_t *cond,
- const pthread_condattr_t *attr
-)
-{
- POSIX_Condition_variables_Control *the_cond;
- const pthread_condattr_t *the_attr;
-
- if ( attr ) the_attr = attr;
- else the_attr = &_POSIX_Condition_variables_Default_attributes;
-
- /*
- * XXX: Be careful about attributes when global!!!
- */
-
- if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
- return POSIX_MP_NOT_IMPLEMENTED();
-
- if ( !the_attr->is_initialized )
- return EINVAL;
-
- _Thread_Disable_dispatch();
-
- the_cond = _POSIX_Condition_variables_Allocate();
-
- if ( !the_cond ) {
- _Thread_Enable_dispatch();
- return ENOMEM;
- }
-
-#if defined(RTEMS_MULTIPROCESSING)
- if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED &&
- !( _Objects_MP_Allocate_and_open( &_POSIX_Condition_variables_Information,
- 0, the_cond->Object.id, FALSE ) ) ) {
- _POSIX_Condition_variables_Free( the_cond );
- _Thread_Enable_dispatch();
- return EAGAIN;
- }
-#endif
-
- the_cond->process_shared = the_attr->process_shared;
-
- the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
-
-/* XXX some more initialization might need to go here */
- _Thread_queue_Initialize(
- &the_cond->Wait_queue,
- OBJECTS_POSIX_CONDITION_VARIABLES,
- THREAD_QUEUE_DISCIPLINE_FIFO,
- STATES_WAITING_FOR_CONDITION_VARIABLE,
-#if defined(RTEMS_MULTIPROCESSING)
- _POSIX_Condition_variables_MP_Send_extract_proxy,
-#else
- NULL,
-#endif
- ETIMEDOUT
- );
-
- _Objects_Open(
- &_POSIX_Condition_variables_Information,
- &the_cond->Object,
- 0
- );
-
- *cond = the_cond->Object.id;
-
-#if defined(RTEMS_MULTIPROCESSING)
- if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
- _POSIX_Condition_variables_MP_Send_process_packet(
- POSIX_CONDITION_VARIABLES_MP_ANNOUNCE_CREATE,
- the_cond->Object.id,
- 0, /* Name not used */
- 0 /* Not used */
- );
-#endif
-
- _Thread_Enable_dispatch();
-
- return 0;
-}
diff --git a/cpukit/posix/src/condmp.c b/cpukit/posix/src/condmp.c
deleted file mode 100644
index c085ab4976..0000000000
--- a/cpukit/posix/src/condmp.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * $Id$
- */
-
-#include <pthread.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/posix/cond.h>
-#include <rtems/posix/time.h>
-#include <rtems/posix/mutex.h>
-
-/*
- * TEMPORARY
- */
-
-#if defined(RTEMS_MULTIPROCESSING)
-void _POSIX_Condition_variables_MP_Send_process_packet (
- POSIX_Condition_variables_MP_Remote_operations operation,
- Objects_Id condition_variables_id,
- Objects_Name name,
- Objects_Id proxy_id
-)
-{
- (void) POSIX_MP_NOT_IMPLEMENTED();
-}
-
-void _POSIX_Condition_variables_MP_Send_extract_proxy(
- Thread_Control *the_thread
-)
-{
- (void) POSIX_MP_NOT_IMPLEMENTED();
-}
-#endif
-
-/*
- * END OF TEMPORARY
- */
-
diff --git a/cpukit/posix/src/condsignal.c b/cpukit/posix/src/condsignal.c
deleted file mode 100644
index 52fb89e91e..0000000000
--- a/cpukit/posix/src/condsignal.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * $Id$
- */
-
-#include <pthread.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/posix/cond.h>
-#include <rtems/posix/time.h>
-#include <rtems/posix/mutex.h>
-
-/*PAGE
- *
- * 11.4.3 Broadcasting and Signaling a Condition, P1003.1c/Draft 10, p. 101
- */
-
-int pthread_cond_signal(
- pthread_cond_t *cond
-)
-{
- return _POSIX_Condition_variables_Signal_support( cond, FALSE );
-}
diff --git a/cpukit/posix/src/condsignalsupp.c b/cpukit/posix/src/condsignalsupp.c
deleted file mode 100644
index e6b4d6a1a3..0000000000
--- a/cpukit/posix/src/condsignalsupp.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * $Id$
- */
-
-#include <pthread.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/posix/cond.h>
-#include <rtems/posix/time.h>
-#include <rtems/posix/mutex.h>
-
-/*PAGE
- *
- * _POSIX_Condition_variables_Signal_support
- *
- * A support routine which implements guts of the broadcast and single task
- * wake up version of the "signal" operation.
- */
-
-int _POSIX_Condition_variables_Signal_support(
- pthread_cond_t *cond,
- boolean is_broadcast
-)
-{
- register POSIX_Condition_variables_Control *the_cond;
- Objects_Locations location;
- Thread_Control *the_thread;
-
- the_cond = _POSIX_Condition_variables_Get( cond, &location );
- switch ( location ) {
- case OBJECTS_REMOTE:
-#if defined(RTEMS_MULTIPROCESSING)
- _Thread_Dispatch();
- return POSIX_MP_NOT_IMPLEMENTED();
- return EINVAL;
-#endif
-
- case OBJECTS_ERROR:
- return EINVAL;
- case OBJECTS_LOCAL:
-
- do {
- the_thread = _Thread_queue_Dequeue( &the_cond->Wait_queue );
- if ( !the_thread )
- the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
- } while ( is_broadcast && the_thread );
-
- _Thread_Enable_dispatch();
-
- return 0;
- }
- return POSIX_BOTTOM_REACHED();
-}
diff --git a/cpukit/posix/src/condtimedwait.c b/cpukit/posix/src/condtimedwait.c
deleted file mode 100644
index ed6d676293..0000000000
--- a/cpukit/posix/src/condtimedwait.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * $Id$
- */
-
-#include <pthread.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/posix/cond.h>
-#include <rtems/posix/time.h>
-#include <rtems/posix/mutex.h>
-
-/*PAGE
- *
- * 11.4.4 Waiting on a Condition, P1003.1c/Draft 10, p. 105
- */
-
-int pthread_cond_timedwait(
- pthread_cond_t *cond,
- pthread_mutex_t *mutex,
- const struct timespec *abstime
-)
-{
- Watchdog_Interval timeout;
- struct timespec current_time;
- struct timespec difference;
- boolean already_timedout = FALSE;
-
- if ( !abstime )
- return EINVAL;
-
- /*
- * The abstime is a walltime. We turn it into an interval.
- */
-
- (void) clock_gettime( CLOCK_REALTIME, &current_time );
-
- /* XXX probably some error checking should go here */
-
- _POSIX_Timespec_subtract( &current_time, abstime, &difference );
-
- if ( ( difference.tv_sec < 0 ) || ( ( difference.tv_sec == 0 ) &&
- ( difference.tv_nsec < 0 ) ) )
- already_timedout = TRUE;
-
- timeout = _POSIX_Timespec_to_interval( &difference );
-
- return _POSIX_Condition_variables_Wait_support(
- cond,
- mutex,
- timeout,
- already_timedout
- );
-}
diff --git a/cpukit/posix/src/condwait.c b/cpukit/posix/src/condwait.c
deleted file mode 100644
index 74bc0fba0f..0000000000
--- a/cpukit/posix/src/condwait.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * $Id$
- */
-
-#include <pthread.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/posix/cond.h>
-#include <rtems/posix/time.h>
-#include <rtems/posix/mutex.h>
-
-/*PAGE
- *
- * 11.4.4 Waiting on a Condition, P1003.1c/Draft 10, p. 105
- */
-
-int pthread_cond_wait(
- pthread_cond_t *cond,
- pthread_mutex_t *mutex
-)
-{
- return _POSIX_Condition_variables_Wait_support(
- cond,
- mutex,
- THREAD_QUEUE_WAIT_FOREVER,
- FALSE
- );
-}
diff --git a/cpukit/posix/src/condwaitsupp.c b/cpukit/posix/src/condwaitsupp.c
deleted file mode 100644
index 13827aa725..0000000000
--- a/cpukit/posix/src/condwaitsupp.c
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * $Id$
- */
-
-#include <pthread.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/posix/cond.h>
-#include <rtems/posix/time.h>
-#include <rtems/posix/mutex.h>
-
-/*PAGE
- *
- * _POSIX_Condition_variables_Wait_support
- *
- * A support routine which implements guts of the blocking, non-blocking, and
- * timed wait version of condition variable wait routines.
- */
-
-int _POSIX_Condition_variables_Wait_support(
- pthread_cond_t *cond,
- pthread_mutex_t *mutex,
- Watchdog_Interval timeout,
- boolean already_timedout
-)
-{
- register POSIX_Condition_variables_Control *the_cond;
- Objects_Locations location;
- int status;
- int mutex_status;
-
- if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
- return EINVAL;
- }
-
- _Thread_Unnest_dispatch();
-
- the_cond = _POSIX_Condition_variables_Get( cond, &location );
- switch ( location ) {
- case OBJECTS_REMOTE:
-#if defined(RTEMS_MULTIPROCESSING)
- _Thread_Dispatch();
- return POSIX_MP_NOT_IMPLEMENTED();
- return EINVAL;
-#endif
- case OBJECTS_ERROR:
- return EINVAL;
- case OBJECTS_LOCAL:
-
- if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
- _Thread_Enable_dispatch();
- return EINVAL;
- }
-
- (void) pthread_mutex_unlock( mutex );
-/* XXX ignore this for now since behavior is undefined
- if ( mutex_status ) {
- _Thread_Enable_dispatch();
- return EINVAL;
- }
-*/
-
- if ( !already_timedout ) {
- the_cond->Mutex = *mutex;
-
- _Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
- _Thread_Executing->Wait.return_code = 0;
- _Thread_Executing->Wait.queue = &the_cond->Wait_queue;
- _Thread_Executing->Wait.id = *cond;
-
- _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
-
- _Thread_Enable_dispatch();
-
- /*
- * Switch ourself out because we blocked as a result of the
- * _Thread_queue_Enqueue.
- */
-
- status = _Thread_Executing->Wait.return_code;
- if ( status && status != ETIMEDOUT )
- return status;
-
- } else {
- _Thread_Enable_dispatch();
- status = ETIMEDOUT;
- }
-
- /*
- * When we get here the dispatch disable level is 0.
- */
-
- mutex_status = pthread_mutex_lock( mutex );
- if ( mutex_status )
- return EINVAL;
-
- return status;
- }
- return POSIX_BOTTOM_REACHED();
-}
diff --git a/cpukit/posix/src/devctl.c b/cpukit/posix/src/devctl.c
deleted file mode 100644
index 699bc2d228..0000000000
--- a/cpukit/posix/src/devctl.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * $Id$
- */
-
-#include <devctl.h>
-
-#include <rtems/system.h>
-
-/*PAGE
- *
- * 21.2.1 Control a Device, P1003.4b/D8, p. 65
- */
-
-int devctl(
- int filedes,
- void *dev_data_ptr,
- size_t nbyte,
- int *dev_info_ptr
-)
-{
- return POSIX_NOT_IMPLEMENTED();
-}
diff --git a/cpukit/posix/src/execl.c b/cpukit/posix/src/execl.c
deleted file mode 100644
index af26b539d5..0000000000
--- a/cpukit/posix/src/execl.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * execl() - POSIX 1003.1b 3.1.2
- *
- * $Id$
- */
-
-#include <errno.h>
-
-int execl(
- const char *path,
- const char *arg,
- ...
-)
-{
- errno = ENOSYS;
- return -1;
-}
diff --git a/cpukit/posix/src/execle.c b/cpukit/posix/src/execle.c
deleted file mode 100644
index 94b0ede939..0000000000
--- a/cpukit/posix/src/execle.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * execle() - POSIX 1003.1b 3.1.2
- *
- * $Id$
- */
-
-#include <errno.h>
-
-int execle(
- const char *path,
- char const *arg,
- ...
-)
-{
- errno = ENOSYS;
- return -1;
-}
diff --git a/cpukit/posix/src/execlp.c b/cpukit/posix/src/execlp.c
deleted file mode 100644
index 83b6ceba33..0000000000
--- a/cpukit/posix/src/execlp.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * execlp() - POSIX 1003.1b 3.1.2
- *
- * $Id$
- */
-
-#include <errno.h>
-
-int execlp(
- const char *file,
- const char *arg,
- ...
-)
-{
- errno = ENOSYS;
- return -1;
-}
diff --git a/cpukit/posix/src/execv.c b/cpukit/posix/src/execv.c
deleted file mode 100644
index d05f4a2c58..0000000000
--- a/cpukit/posix/src/execv.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * execv() - POSIX 1003.1b 3.1.2
- *
- * $Id$
- */
-
-#include <errno.h>
-
-int execv(
- const char *file,
- char *const argv[],
- ...
-)
-{
- errno = ENOSYS;
- return -1;
-}
diff --git a/cpukit/posix/src/execve.c b/cpukit/posix/src/execve.c
deleted file mode 100644
index 478af706ea..0000000000
--- a/cpukit/posix/src/execve.c
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * execve() - POSIX 1003.1b 3.1.2
- *
- * $Id$
- */
-
-#include <errno.h>
-
-int execve(
- const char *path,
- char *const argv[],
- char *const envp[],
- ...
-)
-{
- errno = ENOSYS;
- return -1;
-}
diff --git a/cpukit/posix/src/execvp.c b/cpukit/posix/src/execvp.c
deleted file mode 100644
index a9d7694fbd..0000000000
--- a/cpukit/posix/src/execvp.c
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * execvp() - POSIX 1003.1b 3.1.2
- *
- * $Id$
- */
-
-#include <errno.h>
-
-int execvp(
- const char *path,
- char const *argv[]
-)
-{
- errno = ENOSYS;
- return -1;
-}
diff --git a/cpukit/posix/src/fork.c b/cpukit/posix/src/fork.c
deleted file mode 100644
index 11cac91bdb..0000000000
--- a/cpukit/posix/src/fork.c
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- * fork() - POSIX 1003.1b 3.1.1
- *
- * $Id$
- */
-
-#include <sys/types.h>
-#include <errno.h>
-
-int fork( void )
-{
- errno = ENOSYS;
- return -1;
-}
diff --git a/cpukit/posix/src/getegid.c b/cpukit/posix/src/getegid.c
deleted file mode 100644
index f1169f14bc..0000000000
--- a/cpukit/posix/src/getegid.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * $Id$
- */
-
-#include <limits.h>
-#include <errno.h>
-#include <string.h>
-#include <sys/types.h>
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/posix/seterr.h>
-
-gid_t _POSIX_types_Egid = 0;
-
-/*PAGE
- *
- * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs,
- * P1003.1b-1993, p. 84
- */
-
-gid_t getegid( void )
-{
- return _POSIX_types_Egid;
-}
-
diff --git a/cpukit/posix/src/geteuid.c b/cpukit/posix/src/geteuid.c
deleted file mode 100644
index f28d9387ae..0000000000
--- a/cpukit/posix/src/geteuid.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * $Id$
- */
-
-#include <limits.h>
-#include <errno.h>
-#include <string.h>
-#include <sys/types.h>
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/posix/seterr.h>
-
-uid_t _POSIX_types_Euid = 0;
-
-/*PAGE
- *
- * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs,
- * P1003.1b-1993, p. 84
- */
-
-uid_t geteuid( void )
-{
- return _POSIX_types_Euid;
-}
diff --git a/cpukit/posix/src/getgid.c b/cpukit/posix/src/getgid.c
deleted file mode 100644
index 6b65d12e99..0000000000
--- a/cpukit/posix/src/getgid.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * $Id$
- */
-
-#include <limits.h>
-#include <errno.h>
-#include <string.h>
-#include <sys/types.h>
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/posix/seterr.h>
-
-gid_t _POSIX_types_Gid = 0;
-
-/*PAGE
- *
- * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs,
- * P1003.1b-1993, p. 84
- */
-
-gid_t getgid( void )
-{
- return _POSIX_types_Gid;
-}
-
-/*PAGE
- *
- * 4.2.2 Set User and Group IDs, P1003.1b-1993, p. 84
- */
-
-int setgid(
- gid_t gid
-)
-{
- _POSIX_types_Gid = gid;
- return 0;
-}
diff --git a/cpukit/posix/src/getgroups.c b/cpukit/posix/src/getgroups.c
deleted file mode 100644
index e055c0bd9f..0000000000
--- a/cpukit/posix/src/getgroups.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * $Id$
- */
-
-#include <limits.h>
-#include <errno.h>
-#include <string.h>
-#include <sys/types.h>
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/posix/seterr.h>
-
-/*PAGE
- *
- * 4.2.3 Get Supplementary IDs, P1003.1b-1993, p. 86
- */
-
-int getgroups(
- int gidsetsize,
- gid_t grouplist[]
-)
-{
- return 0; /* no supplemental group ids */
-}
-
diff --git a/cpukit/posix/src/getlogin.c b/cpukit/posix/src/getlogin.c
deleted file mode 100644
index 729743696a..0000000000
--- a/cpukit/posix/src/getlogin.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * $Id$
- */
-
-#include <limits.h>
-#include <errno.h>
-#include <string.h>
-#include <sys/types.h>
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/posix/seterr.h>
-
-/*PAGE
- *
- * 4.2.4 Get User Name, P1003.1b-1993, p. 87
- *
- * NOTE: P1003.1c/D10, p. 49 adds getlogin_r().
- */
-
-static char _POSIX_types_Getlogin_buffer[ LOGIN_NAME_MAX ];
-
-char *getlogin( void )
-{
- (void) getlogin_r( _POSIX_types_Getlogin_buffer, LOGIN_NAME_MAX );
- return _POSIX_types_Getlogin_buffer;
-}
-
-/*PAGE
- *
- * 4.2.4 Get User Name, P1003.1b-1993, p. 87
- *
- * NOTE: P1003.1c/D10, p. 49 adds getlogin_r().
- */
-
-int getlogin_r(
- char *name,
- size_t namesize
-)
-{
- if ( namesize < LOGIN_NAME_MAX )
- return ERANGE;
-
- strcpy( name, "posixapp" );
- return 0;
-}
diff --git a/cpukit/posix/src/getpgrp.c b/cpukit/posix/src/getpgrp.c
deleted file mode 100644
index 6e69d0f33a..0000000000
--- a/cpukit/posix/src/getpgrp.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * $Id$
- */
-
-#include <limits.h>
-#include <errno.h>
-#include <string.h>
-#include <sys/types.h>
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/posix/seterr.h>
-
-/*PAGE
- *
- * 4.3.1 Get Process Group IDs, P1003.1b-1993, p. 89
- */
-
-pid_t getpgrp( void )
-{
- /*
- * This always succeeds and returns the process group id. For rtems,
- * this will always be the local node;
- */
-
- return _Objects_Local_node;
-}
diff --git a/cpukit/posix/src/getpid.c b/cpukit/posix/src/getpid.c
deleted file mode 100644
index 8e912adf39..0000000000
--- a/cpukit/posix/src/getpid.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * $Id$
- */
-
-#include <limits.h>
-#include <errno.h>
-#include <string.h>
-#include <sys/types.h>
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/posix/seterr.h>
-
-/*PAGE
- *
- * 4.1.1 Get Process and Parent Process IDs, P1003.1b-1993, p. 83
- */
-
-pid_t getpid( void )
-{
- return _Objects_Local_node;
-}
-
-/*
- * _getpid_r
- *
- * This is the Newlib dependent reentrant version of getpid().
- */
-
-#if defined(RTEMS_NEWLIB)
-
-#include <reent.h>
-
-pid_t _getpid_r(
- struct _reent *ptr
-)
-{
- return getpid();
-}
-#endif
-
diff --git a/cpukit/posix/src/getppid.c b/cpukit/posix/src/getppid.c
deleted file mode 100644
index 46e49cd3bf..0000000000
--- a/cpukit/posix/src/getppid.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * $Id$
- */
-
-#include <limits.h>
-#include <errno.h>
-#include <string.h>
-#include <sys/types.h>
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/posix/seterr.h>
-
-pid_t _POSIX_types_Ppid = 0;
-
-/*PAGE
- *
- * 4.1.1 Get Process and Parent Process IDs, P1003.1b-1993, p. 83
- */
-
-pid_t getppid( void )
-{
- return _POSIX_types_Ppid;
-}
-
diff --git a/cpukit/posix/src/getuid.c b/cpukit/posix/src/getuid.c
deleted file mode 100644
index 9c2a3425e2..0000000000
--- a/cpukit/posix/src/getuid.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * $Id$
- */
-
-#include <limits.h>
-#include <errno.h>
-#include <string.h>
-#include <sys/types.h>
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/posix/seterr.h>
-
-uid_t _POSIX_types_Uid = 0;
-
-/*PAGE
- *
- * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs,
- * P1003.1b-1993, p. 84
- */
-
-uid_t getuid( void )
-{
- return _POSIX_types_Uid;
-}
-
-/*PAGE
- *
- * 4.2.2 Set User and Group IDs, P1003.1b-1993, p. 84
- */
-
-int setuid(
- uid_t uid
-)
-{
- _POSIX_types_Uid = uid;
- return 0;
-}
diff --git a/cpukit/posix/src/intr.c b/cpukit/posix/src/intr.c
deleted file mode 100644
index 5d41a5fe52..0000000000
--- a/cpukit/posix/src/intr.c
+++ /dev/null
@@ -1,340 +0,0 @@
-/*
- * NOTE: Each task has an interrupt semaphore associated with it.
- * No matter which interrupt occurs that it has registered,
- * the same semaphore is used.
- *
- * This whole interrupt scheme may have been eliminated in a later draft.
- *
- * $Id$
- */
-
-#include <errno.h>
-#include <intr.h>
-#include <pthread.h>
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/coresem.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/posix/intr.h>
-#include <rtems/posix/time.h>
-#include <rtems/posix/threadsup.h>
-
-/*
- * _POSIX_Interrupt_Manager_initialization
- *
- * DESCRIPTION:
- *
- * This routine performs the initialization necessary for this manager.
- */
-
-void _POSIX_Interrupt_Manager_initialization(
- unsigned32 maximum_interrupt_handlers
-)
-{
- unsigned32 index;
- POSIX_Interrupt_Control *the_vector;
-
- _Objects_Initialize_information(
- &_POSIX_Interrupt_Handlers_Information,
- OBJECTS_POSIX_INTERRUPTS,
- FALSE,
- maximum_interrupt_handlers,
- sizeof( POSIX_Interrupt_Handler_control ),
- FALSE,
- 0,
- FALSE
- );
-
- for ( index=0 ; index < CPU_INTERRUPT_NUMBER_OF_VECTORS ; index++ ) {
- the_vector = &_POSIX_Interrupt_Information[ index ];
-
- the_vector->number_installed = 0;
- the_vector->lock_count = 0;
- the_vector->deferred_count = 0;
- _Chain_Initialize_empty( &the_vector->Handlers );
- }
-}
-
-/*PAGE
- *
- * 22.3.1 Associate a User-Written ISR with an Interrupt, P1003.4b/D8, p. 74
- */
-
-int intr_capture(
- intr_t intr,
- int (*intr_handler)( void *area ),
- volatile void *area,
- size_t areasize
-)
-{
- POSIX_Interrupt_Handler_control *the_intr;
- POSIX_Interrupt_Control *the_vector;
- POSIX_API_Thread_Support_Control *thread_support;
- proc_ptr old_handler;
-
- if ( !_ISR_Is_vector_number_valid( intr ) ||
- !_ISR_Is_valid_user_handler( intr_handler ) )
- return EINVAL;
-
- _Thread_Disable_dispatch();
-
- the_intr = _POSIX_Interrupt_Allocate();
-
- if ( !the_intr ) {
- _Thread_Enable_dispatch();
- return ENOMEM;
- }
-
- the_vector = &_POSIX_Interrupt_Information[ intr ];
-
- the_intr->vector = intr;
- the_intr->handler = intr_handler;
- the_intr->user_data_area = area;
- the_intr->server = _Thread_Executing;
- the_intr->is_active = TRUE;
-
- thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
- thread_support->interrupts_installed++;
-
-/* XXX should we malloc the semaphore on the fly??? if so we probably need to
- release it when the thread has released all interrupts and keep
- a count of how many it has installed. CURRENTLY NO.. ALLOCATED w/TCB
-*/
-
- /*
- * This is sufficient to have the handlers invoked in the opposite
- * order of installation. The loop invoking them can then go from
- * the front of the list to the end.
- */
-
- _Chain_Prepend( &the_vector->Handlers, &the_intr->Object.Node );
-
- if ( !the_vector->number_installed++ )
- _ISR_Install_vector(
- intr,
- (proc_ptr) _POSIX_Interrupt_Handler,
- &old_handler
- );
-
- _Objects_Open( &_POSIX_Interrupt_Handlers_Information, &the_intr->Object, 0 );
-
- /*
- * Normally, an Id would be returned here.
- */
-
- _Thread_Enable_dispatch();
-
- return 0;
-}
-
-/*PAGE
- *
- * 22.3.1 Associate a User-Written ISR with an Interrupt, P1003.4b/D8, p. 74
- */
-
-int intr_release(
- intr_t intr,
- int (*intr_handler)( void *area )
-)
-{
- boolean found;
- POSIX_Interrupt_Handler_control *the_intr;
- POSIX_Interrupt_Control *the_vector;
- POSIX_API_Thread_Support_Control *thread_support;
- Chain_Node *the_node;
-
- if ( !_ISR_Is_valid_user_handler( intr_handler ) )
- return EINVAL;
-
- _Thread_Disable_dispatch();
-
- /*
- * Since interrupt handlers do not have a user visible id, there is
- * no choice but to search the entire set of active interrupt handlers
- * to find this one.
- */
-
- found = FALSE;
-
- the_vector = &_POSIX_Interrupt_Information[ intr ];
-
- the_node = _Chain_Head( &the_vector->Handlers );
-
- for ( ; !_Chain_Is_tail( &the_vector->Handlers, the_node ) ; ) {
- the_intr = (POSIX_Interrupt_Handler_control *) the_node;
-
- if ( the_intr->handler == intr_handler ) {
- found = TRUE;
- break;
- }
- the_node = the_node->next;
- }
-
- if ( !found ) {
- _Thread_Enable_dispatch();
- return EINVAL;
- }
-
- if ( !_Thread_Is_executing( the_intr->server ) ) {
- _Thread_Enable_dispatch();
- return EINVAL; /* XXX should be ENOISR; */
- }
-
- /*
- * OK now we have found the interrupt handler and can do some work.
- */
-
- _Chain_Extract( &the_intr->Object.Node );
-
- the_intr->is_active = FALSE;
-
- the_vector->number_installed -= 1;
-
- thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
- thread_support->interrupts_installed--;
-
- /*
- * It is unnecessary to flush the semaphore since the handler can only
- * be "removed" by the thread which installed it. Thus it cannot be
- * blocked on the semaphore or it would not be executing this routine.
- */
-
- _Objects_Close( &_POSIX_Interrupt_Handlers_Information, &the_intr->Object );
-
- _POSIX_Interrupt_Free( the_intr );
-
- _Thread_Enable_dispatch();
-
- return 0;
-}
-
-/*PAGE
- *
- * 22.3.1 Associate a User-Written ISR with an Interrupt, P1003.4b/D8, p. 74
- */
-
-int intr_lock(
- intr_t intr
-)
-{
- POSIX_Interrupt_Control *the_vector;
-
- _Thread_Disable_dispatch();
-
- the_vector = &_POSIX_Interrupt_Information[ intr ];
-
- the_vector->lock_count++;
-
- _Thread_Enable_dispatch();
-
- return 0;
-}
-
-/*PAGE
- *
- * 22.3.1 Associate a User-Written ISR with an Interrupt, P1003.4b/D8, p. 74
- */
-
-int intr_unlock(
- intr_t intr
-)
-{
- POSIX_Interrupt_Control *the_vector;
-
- _Thread_Disable_dispatch();
-
- the_vector = &_POSIX_Interrupt_Information[ intr ];
-
- if ( !--the_vector->lock_count ) {
- while ( --the_vector->deferred_count ) {
- _POSIX_Interrupt_Handler( intr );
- }
- }
-
- _Thread_Enable_dispatch();
-
- return 0;
-}
-
-/*
- * 22.3.2 Await Interrupt Notification, P1003.4b/D8, p. 76
- */
-
-int intr_timed_wait(
- int flags,
- const struct timespec *timeout
-)
-{
- Watchdog_Interval ticks;
- POSIX_API_Thread_Support_Control *thread_support;
-
- ticks = _POSIX_Timespec_to_interval( timeout );
-
- thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
-
- _Thread_Disable_dispatch();
-
- _CORE_semaphore_Seize(
- &thread_support->Interrupt_Semaphore,
- 0, /* XXX does id=0 hurt in this case? */
- TRUE,
- ticks
- );
- _Thread_Enable_dispatch();
-
- return _Thread_Executing->Wait.return_code; /* XXX should be POSIX */
-}
-
-/*PAGE
- *
- * _POSIX_Interrupt_Handler
- *
- */
-
-void _POSIX_Interrupt_Handler(
- ISR_Vector_number vector
-)
-{
- POSIX_Interrupt_Handler_control *the_intr;
- POSIX_Interrupt_Control *the_vector;
- POSIX_API_Thread_Support_Control *thread_support;
- Chain_Node *the_node;
- int status;
-
- the_vector = &_POSIX_Interrupt_Information[ vector ];
-
- the_node = _Chain_Head( &the_vector->Handlers );
-
- for ( ; !_Chain_Is_tail( &the_vector->Handlers, the_node ) ; ) {
- the_intr = (POSIX_Interrupt_Handler_control *) the_node;
-
- status = (*the_intr->handler)( (void *) the_intr->user_data_area );
-
- switch ( status ) {
- case INTR_HANDLED_NOTIFY:
- thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
-
- _CORE_semaphore_Surrender(
- &thread_support->Interrupt_Semaphore,
- 0, /* XXX is id=0 a problem */
- 0 /* XXX is this a problem (mp support)*/
- );
- return;
-
- case INTR_HANDLED_DO_NOT_NOTIFY:
- return;
-
- case INTR_NOT_HANDLED:
- default: /* this should not happen */
- break;
- }
- the_node = the_node->next;
- }
-
- /* XXX
- *
- * This is an unhandled interrupt!!!
- */
-}
diff --git a/cpukit/posix/src/key.c b/cpukit/posix/src/key.c
deleted file mode 100644
index b61387056f..0000000000
--- a/cpukit/posix/src/key.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * $Id$
- */
-
-#include <errno.h>
-#include <limits.h>
-#include <pthread.h>
-#include <string.h>
-
-#include <rtems/system.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/posix/key.h>
-
-/*
- * _POSIX_Key_Manager_initialization
- *
- * DESCRIPTION:
- *
- * This routine performs the initialization necessary for this manager.
- */
-
-void _POSIX_Key_Manager_initialization(
- unsigned32 maximum_keys
-)
-{
- _Objects_Initialize_information(
- &_POSIX_Keys_Information,
- OBJECTS_POSIX_KEYS,
- FALSE,
- maximum_keys,
- sizeof( POSIX_Keys_Control ),
- FALSE,
- 0,
- FALSE
- );
-}
diff --git a/cpukit/posix/src/keycreate.c b/cpukit/posix/src/keycreate.c
deleted file mode 100644
index f5409b31e9..0000000000
--- a/cpukit/posix/src/keycreate.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * $Id$
- */
-
-#include <errno.h>
-#include <limits.h>
-#include <pthread.h>
-#include <string.h>
-
-#include <rtems/system.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/posix/key.h>
-
-/*PAGE
- *
- * 17.1.1 Thread-Specific Data Key Create, P1003.1c/Draft 10, p. 163
- */
-
-int pthread_key_create(
- pthread_key_t *key,
- void (*destructor)( void * )
-)
-{
- POSIX_Keys_Control *the_key;
- void *table;
- unsigned32 the_class;
- unsigned32 bytes_to_allocate;
-
-
- _Thread_Disable_dispatch();
-
- the_key = _POSIX_Keys_Allocate();
-
- if ( !the_key ) {
- _Thread_Enable_dispatch();
- return EAGAIN;
- }
-
- the_key->destructor = destructor;
-
- /*
- * This is a bit more complex than one might initially expect because
- * APIs are optional. Thus there may be no ITRON tasks to have keys
- * for. [NOTE: Currently RTEMS Classic API tasks are not always enabled.]
- */
-
- for ( the_class = OBJECTS_CLASSES_FIRST_THREAD_CLASS;
- the_class <= OBJECTS_CLASSES_LAST_THREAD_CLASS;
- the_class++ ) {
-
- if ( _Objects_Information_table[ the_class ] ) {
- bytes_to_allocate = sizeof( void * ) *
- (_Objects_Information_table[ the_class ]->maximum + 1);
- table = _Workspace_Allocate( bytes_to_allocate );
- if ( !table ) {
- for ( --the_class;
- the_class >= OBJECTS_CLASSES_FIRST_THREAD_CLASS;
- the_class-- )
- _Workspace_Free( the_key->Values[ the_class ] );
-
- _POSIX_Keys_Free( the_key );
- _Thread_Enable_dispatch();
- return ENOMEM;
- }
-
- the_key->Values[ the_class ] = table;
- memset( table, '\0', bytes_to_allocate );
- } else {
- the_key->Values[ the_class ] = NULL;
- }
-
-
- }
-
- the_key->is_active = TRUE;
-
- _Objects_Open( &_POSIX_Keys_Information, &the_key->Object, 0 );
-
- *key = the_key->Object.id;
-
- _Thread_Enable_dispatch();
-
- return 0;
-}
diff --git a/cpukit/posix/src/keydelete.c b/cpukit/posix/src/keydelete.c
deleted file mode 100644
index 5d4c93ab1d..0000000000
--- a/cpukit/posix/src/keydelete.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * $Id$
- */
-
-#include <errno.h>
-#include <limits.h>
-#include <pthread.h>
-#include <string.h>
-
-#include <rtems/system.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/posix/key.h>
-
-/*PAGE
- *
- * 17.1.3 Thread-Specific Data Key Deletion, P1003.1c/Draft 10, p. 167
- */
-
-int pthread_key_delete(
- pthread_key_t key
-)
-{
- register POSIX_Keys_Control *the_key;
- Objects_Locations location;
- unsigned32 the_class;
-
- the_key = _POSIX_Keys_Get( key, &location );
- switch ( location ) {
- case OBJECTS_ERROR:
- case OBJECTS_REMOTE: /* should never happen */
- return EINVAL;
- case OBJECTS_LOCAL:
- _Objects_Close( &_POSIX_Keys_Information, &the_key->Object );
-
- the_key->is_active = FALSE;
-
- for ( the_class = OBJECTS_CLASSES_FIRST_THREAD_CLASS;
- the_class <= OBJECTS_CLASSES_LAST_THREAD_CLASS;
- the_class++ )
- if ( the_key->Values[ the_class ] )
- _Workspace_Free( the_key->Values[ the_class ] );
-
- /*
- * NOTE: The destructor is not called and it is the responsibility
- * of the application to free the memory.
- */
-
- _POSIX_Keys_Free( the_key );
- _Thread_Enable_dispatch();
- return 0;
- }
- return POSIX_BOTTOM_REACHED();
-}
diff --git a/cpukit/posix/src/keygetspecific.c b/cpukit/posix/src/keygetspecific.c
deleted file mode 100644
index 0ba560feb6..0000000000
--- a/cpukit/posix/src/keygetspecific.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * $Id$
- */
-
-#include <errno.h>
-#include <limits.h>
-#include <pthread.h>
-#include <string.h>
-
-#include <rtems/system.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/posix/key.h>
-
-/*PAGE
- *
- * 17.1.2 Thread-Specific Data Management, P1003.1c/Draft 10, p. 165
- */
-
-void *pthread_getspecific(
- pthread_key_t key
-)
-{
- register POSIX_Keys_Control *the_key;
- unsigned32 index;
- unsigned32 class;
- Objects_Locations location;
- void *key_data;
-
- the_key = _POSIX_Keys_Get( key, &location );
- switch ( location ) {
- case OBJECTS_ERROR:
- case OBJECTS_REMOTE: /* should never happen */
- return NULL;
- case OBJECTS_LOCAL:
- index = _Objects_Get_index( _Thread_Executing->Object.id );
- class = _Objects_Get_class( _Thread_Executing->Object.id );
- key_data = (void *) the_key->Values[ class ][ index ];
- _Thread_Enable_dispatch();
- return key_data;
- }
- return (void *) POSIX_BOTTOM_REACHED();
-}
diff --git a/cpukit/posix/src/keyrundestructors.c b/cpukit/posix/src/keyrundestructors.c
deleted file mode 100644
index b3047f5fe8..0000000000
--- a/cpukit/posix/src/keyrundestructors.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * $Id$
- */
-
-#include <errno.h>
-#include <limits.h>
-#include <pthread.h>
-#include <string.h>
-
-#include <rtems/system.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/posix/key.h>
-
-/*PAGE
- *
- * _POSIX_Keys_Run_destructors
- *
- * 17.1.1 Thread-Specific Data Key Create, P1003.1c/Draft 10, p. 163
- *
- * NOTE: This is the routine executed when a thread exits to
- * run through all the keys and do the destructor action.
- */
-
-void _POSIX_Keys_Run_destructors(
- Thread_Control *thread
-)
-{
- unsigned32 index;
- unsigned32 pthread_index;
- unsigned32 pthread_class;
- unsigned32 iterations;
- boolean are_all_null;
- POSIX_Keys_Control *the_key;
- void *value;
-
- pthread_index = _Objects_Get_index( thread->Object.id );
- pthread_class = _Objects_Get_class( thread->Object.id );
-
- iterations = 0;
-
- for ( ; ; ) {
-
- are_all_null = TRUE;
-
- for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) {
-
- the_key = (POSIX_Keys_Control *)
- _POSIX_Keys_Information.local_table[ index ];
-
- if ( the_key && the_key->is_active && the_key->destructor ) {
- value = the_key->Values[ pthread_class ][ pthread_index ];
- if ( value ) {
- (*the_key->destructor)( value );
- if ( the_key->Values[ pthread_class ][ pthread_index ] )
- are_all_null = FALSE;
- }
- }
- }
-
- if ( are_all_null == TRUE )
- return;
-
- iterations++;
-
- /*
- * The standard allows one to not do this and thus go into an infinite
- * loop. It seems rude to unnecessarily lock up a system.
- *
- * Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99.
- */
-
- if ( iterations >= PTHREAD_DESTRUCTOR_ITERATIONS )
- return;
- }
-}
diff --git a/cpukit/posix/src/keysetspecific.c b/cpukit/posix/src/keysetspecific.c
deleted file mode 100644
index d66771a11a..0000000000
--- a/cpukit/posix/src/keysetspecific.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * $Id$
- */
-
-#include <errno.h>
-#include <limits.h>
-#include <pthread.h>
-#include <string.h>
-
-#include <rtems/system.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/posix/key.h>
-
-/*PAGE
- *
- * 17.1.2 Thread-Specific Data Management, P1003.1c/Draft 10, p. 165
- */
-
-int pthread_setspecific(
- pthread_key_t key,
- const void *value
-)
-{
- register POSIX_Keys_Control *the_key;
- unsigned32 index;
- unsigned32 class;
- Objects_Locations location;
-
- the_key = _POSIX_Keys_Get( key, &location );
- switch ( location ) {
- case OBJECTS_ERROR:
- case OBJECTS_REMOTE: /* should never happen */
- return EINVAL;
- case OBJECTS_LOCAL:
- index = _Objects_Get_index( _Thread_Executing->Object.id );
- class = _Objects_Get_class( _Thread_Executing->Object.id );
- the_key->Values[ class ][ index ] = (void *) value;
- _Thread_Enable_dispatch();
- return 0;
- }
- return POSIX_BOTTOM_REACHED();
-}
diff --git a/cpukit/posix/src/kill.c b/cpukit/posix/src/kill.c
deleted file mode 100644
index 63dff6bb7d..0000000000
--- a/cpukit/posix/src/kill.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * 3.3.2 Send a Signal to a Process, P1003.1b-1993, p. 68
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <pthread.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
-#include <rtems/posix/psignal.h>
-
-int kill(
- pid_t pid,
- int sig
-)
-{
- return killinfo( pid, sig, NULL );
-}
-
-/*
- * _kill_r
- *
- * This is the Newlib dependent reentrant version of kill().
- */
-
-#if defined(RTEMS_NEWLIB)
-
-#include <reent.h>
-
-int _kill_r(
- struct _reent *ptr,
- pid_t pid,
- int sig
-)
-{
- return kill( pid, sig );
-}
-#endif
-
diff --git a/cpukit/posix/src/killinfo.c b/cpukit/posix/src/killinfo.c
deleted file mode 100644
index 1044b50eb3..0000000000
--- a/cpukit/posix/src/killinfo.c
+++ /dev/null
@@ -1,330 +0,0 @@
-/*
- * kill() support routine
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <pthread.h>
-#include <signal.h>
-#include <errno.h>
-#include <assert.h>
-
-#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
-#include <rtems/posix/psignal.h>
-#include <rtems/posix/seterr.h>
-#include <rtems/score/isr.h>
-
-/*PAGE
- *
- * 3.3.2 Send a Signal to a Process, P1003.1b-1993, p. 68
- *
- * NOTE: Behavior of kill() depends on _POSIX_SAVED_IDS.
- */
-
-#define _POSIX_signals_Is_interested( _api, _mask ) \
- ( ~(_api)->signals_blocked & (_mask) )
-
-int killinfo(
- pid_t pid,
- int sig,
- const union sigval *value
-)
-{
- sigset_t mask;
- POSIX_API_Control *api;
- unsigned32 the_class;
- unsigned32 index;
- unsigned32 maximum;
- Objects_Information *the_info;
- Objects_Control **object_table;
- Thread_Control *the_thread;
- Thread_Control *interested_thread;
- Priority_Control interested_priority;
- Chain_Control *the_chain;
- Chain_Node *the_node;
- siginfo_t siginfo_struct;
- siginfo_t *siginfo;
- POSIX_signals_Siginfo_node *psiginfo;
-
- /*
- * Only supported for the "calling process" (i.e. this node).
- */
-
- if ( pid != getpid() )
- set_errno_and_return_minus_one( ESRCH );
-
- /*
- * Validate the signal passed if not 0.
- */
-
- if ( sig && !is_valid_signo(sig) ) {
- set_errno_and_return_minus_one( EINVAL );
- }
-
- /*
- * If the signal is being ignored, then we are out of here.
- */
-
- if ( !sig || _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
- return 0;
- }
-
- /*
- * P1003.1c/Draft 10, p. 33 says that certain signals should always
- * be directed to the executing thread such as those caused by hardware
- * faults.
- */
-
- switch ( sig ) {
- case SIGFPE:
- case SIGILL:
- case SIGSEGV:
- return pthread_kill( pthread_self(), sig );
- default:
- break;
- }
-
- mask = signo_to_mask( sig );
-
- /*
- * Build up a siginfo structure
- */
-
- siginfo = &siginfo_struct;
- siginfo->si_signo = sig;
- siginfo->si_code = SI_USER;
- if ( !value ) {
- siginfo->si_value.sival_int = 0;
- } else {
- siginfo->si_value = *value;
- }
-
- _Thread_Disable_dispatch();
-
- /*
- * Is the currently executing thread interested? If so then it will
- * get it an execute it as soon as the dispatcher executes.
- */
-
- the_thread = _Thread_Executing;
-
- api = the_thread->API_Extensions[ THREAD_API_POSIX ];
- if ( _POSIX_signals_Is_interested( api, mask ) ) {
- goto process_it;
- }
-
- /*
- * Is an interested thread waiting for this signal (sigwait())?
- */
-
- /* XXX violation of visibility -- need to define thread queue support */
-
- for( index=0 ;
- index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
- index++ ) {
-
- the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ];
-
- for ( the_node = the_chain->first ;
- !_Chain_Is_tail( the_chain, the_node ) ;
- the_node = the_node->next ) {
-
- the_thread = (Thread_Control *)the_node;
- api = the_thread->API_Extensions[ THREAD_API_POSIX ];
-
- if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) {
- goto process_it;
- }
-
- }
- }
-
- /*
- * Is any other thread interested? The highest priority interested
- * thread is selected. In the event of a tie, then the following
- * additional criteria is used:
- *
- * + ready thread over blocked
- * + blocked on call interruptible by signal (can return EINTR)
- * + blocked on call not interruptible by signal
- *
- * This looks at every thread in the system regardless of the creating API.
- *
- * NOTES:
- *
- * + rtems internal threads do not receive signals.
- */
-
- interested_thread = NULL;
- interested_priority = PRIORITY_MAXIMUM + 1;
-
- for ( the_class = OBJECTS_CLASSES_FIRST_THREAD_CLASS;
- the_class <= OBJECTS_CLASSES_LAST_THREAD_CLASS;
- the_class++ ) {
-
- if ( the_class == OBJECTS_INTERNAL_THREADS )
- continue;
-
- the_info = _Objects_Information_table[ the_class ];
-
- if ( !the_info ) /* manager not installed */
- continue;
-
- maximum = the_info->maximum;
- object_table = the_info->local_table;
-
- assert( object_table ); /* always at least 1 entry */
-
- for ( index = 1 ; index <= maximum ; index++ ) {
- the_thread = (Thread_Control *) object_table[ index ];
-
- if ( !the_thread )
- continue;
-
- /*
- * If this thread is of lower priority than the interested thread,
- * go on to the next thread.
- */
-
- if ( the_thread->current_priority > interested_priority )
- continue;
-
- /*
- * If this thread is not interested, then go on to the next thread.
- */
-
- api = the_thread->API_Extensions[ THREAD_API_POSIX ];
-
- if ( !api || !_POSIX_signals_Is_interested( api, mask ) )
- continue;
-
- /*
- * Now we know the thread under connsideration is interested.
- * If the thread under consideration is of higher priority, then
- * it becomes the interested thread.
- */
-
- if ( the_thread->current_priority < interested_priority ) {
- interested_thread = the_thread;
- interested_priority = the_thread->current_priority;
- continue;
- }
-
- /*
- * Now the thread and the interested thread have the same priority.
- * If the interested thread is ready, then we don't need to send it
- * to a blocked thread.
- */
-
- if ( _States_Is_ready( interested_thread->current_state ) )
- continue;
-
- /*
- * Now the interested thread is blocked.
- * If the thread we are considering is not, the it becomes the
- * interested thread.
- */
-
- if ( _States_Is_ready( the_thread->current_state ) ) {
- interested_thread = the_thread;
- interested_priority = the_thread->current_priority;
- continue;
- }
-
- /*
- * Now we know both threads are blocked.
- * If the interested thread is interruptible, then just use it.
- */
-
- /* XXX need a new states macro */
- if ( interested_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL )
- continue;
-
- /*
- * Now both threads are blocked and the interested thread is not
- * interruptible.
- * If the thread under consideration is interruptible by a signal,
- * then it becomes the interested thread.
- */
-
- /* XXX need a new states macro */
- if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) {
- interested_thread = the_thread;
- interested_priority = the_thread->current_priority;
- }
- }
- }
-
- if ( interested_thread ) {
- the_thread = interested_thread;
- goto process_it;
- }
-
- /*
- * OK so no threads were interested right now. It will be left on the
- * global pending until a thread receives it. The global set of threads
- * can change interest in this signal in one of the following ways:
- *
- * + a thread is created with the signal unblocked,
- * + pthread_sigmask() unblocks the signal,
- * + sigprocmask() unblocks the signal, OR
- * + sigaction() which changes the handler to SIG_IGN.
- */
-
- the_thread = NULL;
- goto post_process_signal;
-
- /*
- * We found a thread which was interested, so now we mark that this
- * thread needs to do the post context switch extension so it can
- * evaluate the signals pending.
- */
-
-process_it:
-
- the_thread->do_post_task_switch_extension = TRUE;
-
- /*
- * Returns TRUE if the signal was synchronously given to a thread
- * blocked waiting for the signal.
- */
-
- if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) {
- _Thread_Enable_dispatch();
- return 0;
- }
-
-post_process_signal:
-
- /*
- * We may have woken up a thread but we definitely need to post the
- * signal to the process wide information set.
- */
-
- _POSIX_signals_Set_process_signals( mask );
-
- if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
-
- psiginfo = (POSIX_signals_Siginfo_node *)
- _Chain_Get( &_POSIX_signals_Inactive_siginfo );
- if ( !psiginfo ) {
- set_errno_and_return_minus_one( EAGAIN );
- }
-
- psiginfo->Info = *siginfo;
-
- _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
- }
-
- _Thread_Enable_dispatch();
- return 0;
-}
diff --git a/cpukit/posix/src/mqueue.c b/cpukit/posix/src/mqueue.c
deleted file mode 100644
index a9af9423de..0000000000
--- a/cpukit/posix/src/mqueue.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * NOTE: The structure of the routines is identical to that of POSIX
- * Message_queues to leave the option of having unnamed message
- * queues at a future date. They are currently not part of the
- * POSIX standard but unnamed message_queues are. This is also
- * the reason for the apparently unnecessary tracking of
- * the process_shared attribute. [In addition to the fact that
- * it would be trivial to add pshared to the mq_attr structure
- * and have process private message queues.]
- *
- * This code ignores the O_RDONLY/O_WRONLY/O_RDWR flag at open
- * time.
- *
- * $Id$
- */
-
-#include <stdarg.h>
-
-#include <pthread.h>
-#include <limits.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <mqueue.h>
-
-#include <rtems/system.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/posix/seterr.h>
-#include <rtems/posix/mqueue.h>
-#include <rtems/posix/time.h>
-
-/*PAGE
- *
- * _POSIX_Message_queue_Manager_initialization
- *
- * This routine initializes all message_queue manager related data structures.
- *
- * Input parameters:
- * maximum_message_queues - maximum configured message_queues
- *
- * Output parameters: NONE
- */
-
-void _POSIX_Message_queue_Manager_initialization(
- unsigned32 maximum_message_queues
-)
-{
- _Objects_Initialize_information(
- &_POSIX_Message_queue_Information,
- OBJECTS_POSIX_MESSAGE_QUEUES,
- TRUE,
- maximum_message_queues,
- sizeof( POSIX_Message_queue_Control ),
- TRUE,
- _POSIX_PATH_MAX,
- FALSE
- );
-}
diff --git a/cpukit/posix/src/mqueueclose.c b/cpukit/posix/src/mqueueclose.c
deleted file mode 100644
index 3c1c5a325e..0000000000
--- a/cpukit/posix/src/mqueueclose.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * NOTE: The structure of the routines is identical to that of POSIX
- * Message_queues to leave the option of having unnamed message
- * queues at a future date. They are currently not part of the
- * POSIX standard but unnamed message_queues are. This is also
- * the reason for the apparently unnecessary tracking of
- * the process_shared attribute. [In addition to the fact that
- * it would be trivial to add pshared to the mq_attr structure
- * and have process private message queues.]
- *
- * This code ignores the O_RDONLY/O_WRONLY/O_RDWR flag at open
- * time.
- *
- * $Id$
- */
-
-#include <stdarg.h>
-
-#include <pthread.h>
-#include <limits.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <mqueue.h>
-
-#include <rtems/system.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/posix/seterr.h>
-#include <rtems/posix/mqueue.h>
-#include <rtems/posix/time.h>
-
-/*
- *
- * 15.2.2 Close a Message Queue, P1003.1b-1993, p. 275
- */
-
-int mq_close(
- mqd_t mqdes
-)
-{
- register POSIX_Message_queue_Control *the_mq;
- Objects_Locations location;
-
- the_mq = _POSIX_Message_queue_Get( mqdes, &location );
- switch ( location ) {
- case OBJECTS_ERROR:
- set_errno_and_return_minus_one( EBADF );
- case OBJECTS_REMOTE:
- _Thread_Dispatch();
- return POSIX_MP_NOT_IMPLEMENTED();
- set_errno_and_return_minus_one( EINVAL );
- case OBJECTS_LOCAL:
- the_mq->open_count -= 1;
- _POSIX_Message_queue_Delete( the_mq );
- _Thread_Enable_dispatch();
- return 0;
- }
- return POSIX_BOTTOM_REACHED();
-}
diff --git a/cpukit/posix/src/mqueuecreatesupp.c b/cpukit/posix/src/mqueuecreatesupp.c
deleted file mode 100644
index 148f5b54cb..0000000000
--- a/cpukit/posix/src/mqueuecreatesupp.c
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * NOTE: The structure of the routines is identical to that of POSIX
- * Message_queues to leave the option of having unnamed message
- * queues at a future date. They are currently not part of the
- * POSIX standard but unnamed message_queues are. This is also
- * the reason for the apparently unnecessary tracking of
- * the process_shared attribute. [In addition to the fact that
- * it would be trivial to add pshared to the mq_attr structure
- * and have process private message queues.]
- *
- * This code ignores the O_RDONLY/O_WRONLY/O_RDWR flag at open
- * time.
- *
- * $Id$
- */
-
-#include <stdarg.h>
-
-#include <pthread.h>
-#include <limits.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <mqueue.h>
-
-#include <rtems/system.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/posix/seterr.h>
-#include <rtems/posix/mqueue.h>
-#include <rtems/posix/time.h>
-
-/*PAGE
- *
- * _POSIX_Message_queue_Create_support
- *
- * This routine does the actual creation and initialization of
- * a poxix message queue.
- */
-
-int _POSIX_Message_queue_Create_support(
- const char *name,
- int pshared,
- unsigned int oflag,
- struct mq_attr *attr_ptr,
- POSIX_Message_queue_Control **message_queue
-)
-{
- POSIX_Message_queue_Control *the_mq;
- CORE_message_queue_Attributes *the_mq_attr;
- struct mq_attr attr;
-
- _Thread_Disable_dispatch();
-
- /*
- * There is no real basis for the default values. They will work
- * but were not compared against any existing implementation for
- * compatibility. See README.mqueue for an example program we
- * think will print out the defaults. Report anything you find with it.
- */
-
- if ( attr_ptr == NULL ) {
- attr.mq_maxmsg = 10;
- attr.mq_msgsize = 16;
- } else {
- if ( attr_ptr->mq_maxmsg < 0 ){
- _Thread_Enable_dispatch();
- set_errno_and_return_minus_one( EINVAL );
- }
-
- if ( attr_ptr->mq_msgsize < 0 ){
- _Thread_Enable_dispatch();
- set_errno_and_return_minus_one( EINVAL );
- }
-
- attr = *attr_ptr;
- }
-
-#if defined(RTEMS_MULTIPROCESSING)
- if ( pshared == PTHREAD_PROCESS_SHARED &&
- !( _Objects_MP_Allocate_and_open( &_POSIX_Message_queue_Information, 0,
- the_mq->Object.id, FALSE ) ) ) {
- _POSIX_Message_queue_Free( the_mq );
- _Thread_Enable_dispatch();
- set_errno_and_return_minus_one( ENFILE );
- }
-#endif
-
- the_mq = _POSIX_Message_queue_Allocate();
- if ( !the_mq ) {
- _Thread_Enable_dispatch();
- set_errno_and_return_minus_one( ENFILE );
- }
-
- the_mq->process_shared = pshared;
- the_mq->oflag = oflag;
- the_mq->named = TRUE;
- the_mq->open_count = 1;
- the_mq->linked = TRUE;
-
-
- /* XXX
- *
- * Note that thread blocking discipline should be based on the
- * current scheduling policy.
- */
-
- the_mq_attr = &the_mq->Message_queue.Attributes;
- the_mq_attr->discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO;
-
- if ( ! _CORE_message_queue_Initialize(
- &the_mq->Message_queue,
- OBJECTS_POSIX_MESSAGE_QUEUES,
- the_mq_attr,
- attr.mq_maxmsg,
- attr.mq_msgsize,
-#if defined(RTEMS_MULTIPROCESSING)
- _POSIX_Message_queue_MP_Send_extract_proxy
-#else
- NULL
-#endif
- ) ) {
-
-#if defined(RTEMS_MULTIPROCESSING)
- if ( pshared == PTHREAD_PROCESS_SHARED )
- _Objects_MP_Close( &_POSIX_Message_queue_Information, the_mq->Object.id );
-#endif
-
- _POSIX_Message_queue_Free( the_mq );
- _Thread_Enable_dispatch();
- set_errno_and_return_minus_one( ENOSPC );
- }
-
- _Objects_Open(
- &_POSIX_Message_queue_Information,
- &the_mq->Object,
- (char *) name
- );
-
- *message_queue = the_mq;
-
-#if defined(RTEMS_MULTIPROCESSING)
- if ( pshared == PTHREAD_PROCESS_SHARED )
- _POSIX_Message_queue_MP_Send_process_packet(
- POSIX_MESSAGE_QUEUE_MP_ANNOUNCE_CREATE,
- the_mq->Object.id,
- (char *) name,
- 0 /* Not used */
- );
-#endif
-
- _Thread_Enable_dispatch();
- return 0;
-}
-
-
-
-
-
diff --git a/cpukit/posix/src/mqueuedeletesupp.c b/cpukit/posix/src/mqueuedeletesupp.c
deleted file mode 100644
index ec717aedad..0000000000
--- a/cpukit/posix/src/mqueuedeletesupp.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * NOTE: The structure of the routines is identical to that of POSIX
- * Message_queues to leave the option of having unnamed message
- * queues at a future date. They are currently not part of the
- * POSIX standard but unnamed message_queues are. This is also
- * the reason for the apparently unnecessary tracking of
- * the process_shared attribute. [In addition to the fact that
- * it would be trivial to add pshared to the mq_attr structure
- * and have process private message queues.]
- *
- * This code ignores the O_RDONLY/O_WRONLY/O_RDWR flag at open
- * time.
- *
- * $Id$
- */
-
-#include <stdarg.h>
-
-#include <pthread.h>
-#include <limits.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <mqueue.h>
-
-#include <rtems/system.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/posix/seterr.h>
-#include <rtems/posix/mqueue.h>
-#include <rtems/posix/time.h>
-
-/*PAGE
- *
- * _POSIX_Message_queue_Delete
- */
-
-void _POSIX_Message_queue_Delete(
- POSIX_Message_queue_Control *the_mq
-)
-{
- if ( !the_mq->linked && !the_mq->open_count ) {
- _Objects_Close( &_POSIX_Message_queue_Information, &the_mq->Object );
-
- _CORE_message_queue_Close(
- &the_mq->Message_queue,
- NULL, /* no MP support */
- CORE_MESSAGE_QUEUE_STATUS_WAS_DELETED
- );
-
- _POSIX_Message_queue_Free( the_mq );
-
-#if defined(RTEMS_MULTIPROCESSING)
- if ( the_mq->process_shared == PTHREAD_PROCESS_SHARED ) {
-
- _Objects_MP_Close(
- &_POSIX_Message_queue_Information,
- the_mq->Object.id
- );
-
- _POSIX_Message_queue_MP_Send_process_packet(
- POSIX_MESSAGE_QUEUE_MP_ANNOUNCE_DELETE,
- the_mq->Object.id,
- 0, /* Not used */
- 0 /* Not used */
- );
- }
-#endif
-
- }
-}
-
diff --git a/cpukit/posix/src/mqueuegetattr.c b/cpukit/posix/src/mqueuegetattr.c
deleted file mode 100644
index 9b739e36ea..0000000000
--- a/cpukit/posix/src/mqueuegetattr.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * NOTE: The structure of the routines is identical to that of POSIX
- * Message_queues to leave the option of having unnamed message
- * queues at a future date. They are currently not part of the
- * POSIX standard but unnamed message_queues are. This is also
- * the reason for the apparently unnecessary tracking of
- * the process_shared attribute. [In addition to the fact that
- * it would be trivial to add pshared to the mq_attr structure
- * and have process private message queues.]
- *
- * This code ignores the O_RDONLY/O_WRONLY/O_RDWR flag at open
- * time.
- *
- * $Id$
- */
-
-#include <stdarg.h>
-
-#include <pthread.h>
-#include <limits.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <mqueue.h>
-
-#include <rtems/system.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/posix/seterr.h>
-#include <rtems/posix/mqueue.h>
-#include <rtems/posix/time.h>
-
-/*PAGE
- *
- * 15.2.8 Get Message Queue Attributes, P1003.1b-1993, p. 283
- */
-
-int mq_getattr(
- mqd_t mqdes,
- struct mq_attr *mqstat
-)
-{
- register POSIX_Message_queue_Control *the_mq;
- Objects_Locations location;
- CORE_message_queue_Attributes *the_mq_attr;
-
- if ( !mqstat )
- set_errno_and_return_minus_one( EINVAL );
-
- the_mq = _POSIX_Message_queue_Get( mqdes, &location );
- switch ( location ) {
- case OBJECTS_ERROR:
- set_errno_and_return_minus_one( EBADF );
- case OBJECTS_REMOTE:
- _Thread_Dispatch();
- return POSIX_MP_NOT_IMPLEMENTED();
- set_errno_and_return_minus_one( EINVAL );
- case OBJECTS_LOCAL:
- /*
- * Return the old values.
- */
-
- /* XXX this is the same stuff as is in mq_setattr... and probably */
- /* XXX should be in an inlined private routine */
-
- the_mq_attr = &the_mq->Message_queue.Attributes;
-
- mqstat->mq_flags = the_mq->oflag;
- mqstat->mq_msgsize = the_mq->Message_queue.maximum_message_size;
- mqstat->mq_maxmsg = the_mq->Message_queue.maximum_pending_messages;
- mqstat->mq_curmsgs = the_mq->Message_queue.number_of_pending_messages;
-
- _Thread_Enable_dispatch();
- return 0;
- }
- return POSIX_BOTTOM_REACHED();
-}
-
diff --git a/cpukit/posix/src/mqueuenametoid.c b/cpukit/posix/src/mqueuenametoid.c
deleted file mode 100644
index 3d45508bea..0000000000
--- a/cpukit/posix/src/mqueuenametoid.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * NOTE: The structure of the routines is identical to that of POSIX
- * Message_queues to leave the option of having unnamed message
- * queues at a future date. They are currently not part of the
- * POSIX standard but unnamed message_queues are. This is also
- * the reason for the apparently unnecessary tracking of
- * the process_shared attribute. [In addition to the fact that
- * it would be trivial to add pshared to the mq_attr structure
- * and have process private message queues.]
- *
- * This code ignores the O_RDONLY/O_WRONLY/O_RDWR flag at open
- * time.
- *
- * $Id$
- */
-
-#include <stdarg.h>
-
-#include <pthread.h>
-#include <limits.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <mqueue.h>
-
-#include <rtems/system.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/posix/seterr.h>
-#include <rtems/posix/mqueue.h>
-#include <rtems/posix/time.h>
-
-/*PAGE
- *
- * _POSIX_Message_queue_Name_to_id
- *
- * Look up the specified name and attempt to locate the id
- * for the associated message queue.
- */
-
-int _POSIX_Message_queue_Name_to_id(
- const char *name,
- Objects_Id *id
-)
-{
- Objects_Name_to_id_errors status;
-
- if ( !name )
- return EINVAL;
-
- if ( !name[0] )
- return EINVAL;
-
- if( strlen(name) > PATH_MAX )
- return ENAMETOOLONG;
-
- status = _Objects_Name_to_id(
- &_POSIX_Message_queue_Information, (char *)name, 0, id );
-
- if ( status == OBJECTS_SUCCESSFUL )
- return 0;
-
- return ENOENT;
-}
diff --git a/cpukit/posix/src/mqueuenotify.c b/cpukit/posix/src/mqueuenotify.c
deleted file mode 100644
index 36df3fd055..0000000000
--- a/cpukit/posix/src/mqueuenotify.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * NOTE: The structure of the routines is identical to that of POSIX
- * Message_queues to leave the option of having unnamed message
- * queues at a future date. They are currently not part of the
- * POSIX standard but unnamed message_queues are. This is also
- * the reason for the apparently unnecessary tracking of
- * the process_shared attribute. [In addition to the fact that
- * it would be trivial to add pshared to the mq_attr structure
- * and have process private message queues.]
- *
- * This code ignores the O_RDONLY/O_WRONLY/O_RDWR flag at open
- * time.
- *
- * $Id$
- */
-
-#include <stdarg.h>
-
-#include <pthread.h>
-#include <limits.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <mqueue.h>
-#include <sys/types.h>
-#include <signal.h>
-
-#include <rtems/system.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/posix/seterr.h>
-#include <rtems/posix/mqueue.h>
-#include <rtems/posix/time.h>
-
-/*PAGE
- *
- * _POSIX_Message_queue_Notify_handler
- *
- */
-
-void _POSIX_Message_queue_Notify_handler(
- void *user_data
-)
-{
- POSIX_Message_queue_Control *the_mq;
-
- the_mq = user_data;
-
- kill( getpid(), the_mq->notification.sigev_signo );
-
- _CORE_message_queue_Set_notify( &the_mq->Message_queue, NULL, NULL );
-}
-
-/*PAGE
- *
- * 15.2.6 Notify Process that a Message is Available on a Queue,
- * P1003.1b-1993, p. 280
- */
-
-int mq_notify(
- mqd_t mqdes,
- const struct sigevent *notification
-)
-{
- register POSIX_Message_queue_Control *the_mq;
- Objects_Locations location;
-
- the_mq = _POSIX_Message_queue_Get( mqdes, &location );
- switch ( location ) {
- case OBJECTS_ERROR:
- set_errno_and_return_minus_one( EBADF );
- case OBJECTS_REMOTE:
- _Thread_Dispatch();
- return POSIX_MP_NOT_IMPLEMENTED();
- set_errno_and_return_minus_one( EINVAL );
- case OBJECTS_LOCAL:
- if ( notification ) {
- if ( _CORE_message_queue_Is_notify_enabled( &the_mq->Message_queue ) ) {
- _Thread_Enable_dispatch();
- set_errno_and_return_minus_one( EBUSY );
- }
-
- _CORE_message_queue_Set_notify( &the_mq->Message_queue, NULL, NULL );
-
- the_mq->notification = *notification;
-
- _CORE_message_queue_Set_notify(
- &the_mq->Message_queue,
- _POSIX_Message_queue_Notify_handler,
- the_mq
- );
- } else {
-
- _CORE_message_queue_Set_notify( &the_mq->Message_queue, NULL, NULL );
-
- }
-
- _Thread_Enable_dispatch();
- return 0;
- }
- return POSIX_BOTTOM_REACHED();
-}
-
diff --git a/cpukit/posix/src/mqueueopen.c b/cpukit/posix/src/mqueueopen.c
deleted file mode 100644
index c0ae35e465..0000000000
--- a/cpukit/posix/src/mqueueopen.c
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * NOTE: The structure of the routines is identical to that of POSIX
- * Message_queues to leave the option of having unnamed message
- * queues at a future date. They are currently not part of the
- * POSIX standard but unnamed message_queues are. This is also
- * the reason for the apparently unnecessary tracking of
- * the process_shared attribute. [In addition to the fact that
- * it would be trivial to add pshared to the mq_attr structure
- * and have process private message queues.]
- *
- * This code ignores the O_RDONLY/O_WRONLY/O_RDWR flag at open
- * time.
- *
- * $Id$
- */
-
-#include <stdarg.h>
-
-#include <pthread.h>
-#include <limits.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <mqueue.h>
-
-#include <rtems/system.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/posix/seterr.h>
-#include <rtems/posix/mqueue.h>
-#include <rtems/posix/time.h>
-
-/*PAGE
- *
- * 15.2.2 Open a Message Queue, P1003.1b-1993, p. 272
- */
-
-mqd_t mq_open(
- const char *name,
- int oflag,
- ...
- /* mode_t mode, */
- /* struct mq_attr attr */
-)
-{
- va_list arg;
- mode_t mode;
- struct mq_attr *attr = NULL;
- int status;
- Objects_Id the_mq_id;
- POSIX_Message_queue_Control *the_mq;
- Objects_Locations location;
-
- _Thread_Disable_dispatch();
-
- if ( oflag & O_CREAT ) {
- va_start(arg, oflag);
- mode = (mode_t) va_arg( arg, mode_t );
- attr = (struct mq_attr *) va_arg( arg, struct mq_attr * );
- va_end(arg);
- }
-
- status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id );
-
- /*
- * If the name to id translation worked, then the message queue exists
- * and we can just return a pointer to the id. Otherwise we may
- * need to check to see if this is a "message queue does not exist"
- * or some other miscellaneous error on the name.
- */
-
- if ( status ) {
-
- /*
- * Unless provided a valid name that did not already exist
- * and we are willing to create then it is an error.
- */
-
- if ( !( status == ENOENT && (oflag & O_CREAT) ) ) {
- _Thread_Enable_dispatch();
- set_errno_and_return_minus_one_cast( status, mqd_t );
- }
-
- } else { /* name -> ID translation succeeded */
-
- /*
- * Check for existence with creation.
- */
-
- if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
- _Thread_Enable_dispatch();
- set_errno_and_return_minus_one_cast( EEXIST, mqd_t );
- }
-
- /*
- * XXX In this case we need to do an ID->pointer conversion to
- * check the mode. This is probably a good place for a subroutine.
- */
-
- the_mq = _POSIX_Message_queue_Get( the_mq_id, &location );
- the_mq->open_count += 1;
- _Thread_Enable_dispatch();
- _Thread_Enable_dispatch();
- return (mqd_t)the_mq->Object.id;
-
- }
-
- /*
- * At this point, the message queue does not exist and everything has been
- * checked. We should go ahead and create a message queue.
- */
-
- status = _POSIX_Message_queue_Create_support(
- name,
- TRUE, /* shared across processes */
- oflag,
- attr,
- &the_mq
- );
-
- /*
- * errno was set by Create_support, so don't set it again.
- */
-
- _Thread_Enable_dispatch();
-
- if ( status == -1 )
- return (mqd_t) -1;
-
- return (mqd_t) the_mq->Object.id;
-}
-
-
-
-
-
diff --git a/cpukit/posix/src/mqueuereceive.c b/cpukit/posix/src/mqueuereceive.c
deleted file mode 100644
index 964dcfe2b9..0000000000
--- a/cpukit/posix/src/mqueuereceive.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * NOTE: The structure of the routines is identical to that of POSIX
- * Message_queues to leave the option of having unnamed message
- * queues at a future date. They are currently not part of the
- * POSIX standard but unnamed message_queues are. This is also
- * the reason for the apparently unnecessary tracking of
- * the process_shared attribute. [In addition to the fact that
- * it would be trivial to add pshared to the mq_attr structure
- * and have process private message queues.]
- *
- * This code ignores the O_RDONLY/O_WRONLY/O_RDWR flag at open
- * time.
- *
- * $Id$
- */
-
-#include <stdarg.h>
-
-#include <pthread.h>
-#include <limits.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <mqueue.h>
-
-#include <rtems/system.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/posix/seterr.h>
-#include <rtems/posix/mqueue.h>
-#include <rtems/posix/time.h>
-
-/*PAGE
- *
- * 15.2.5 Receive a Message From a Message Queue, P1003.1b-1993, p. 279
- *
- * NOTE: P1003.4b/D8, p. 45 adds mq_timedreceive().
- */
-
-ssize_t mq_receive(
- mqd_t mqdes,
- char *msg_ptr,
- size_t msg_len,
- unsigned int *msg_prio
-)
-{
- return _POSIX_Message_queue_Receive_support(
- mqdes,
- msg_ptr,
- msg_len,
- msg_prio,
- THREAD_QUEUE_WAIT_FOREVER
- );
-}
-
diff --git a/cpukit/posix/src/mqueuerecvsupp.c b/cpukit/posix/src/mqueuerecvsupp.c
deleted file mode 100644
index ff1d897f17..0000000000
--- a/cpukit/posix/src/mqueuerecvsupp.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * NOTE: The structure of the routines is identical to that of POSIX
- * Message_queues to leave the option of having unnamed message
- * queues at a future date. They are currently not part of the
- * POSIX standard but unnamed message_queues are. This is also
- * the reason for the apparently unnecessary tracking of
- * the process_shared attribute. [In addition to the fact that
- * it would be trivial to add pshared to the mq_attr structure
- * and have process private message queues.]
- *
- * This code ignores the O_RDONLY/O_WRONLY/O_RDWR flag at open
- * time.
- *
- * $Id$
- */
-
-#include <stdarg.h>
-
-#include <pthread.h>
-#include <limits.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <mqueue.h>
-
-#include <rtems/system.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/posix/seterr.h>
-#include <rtems/posix/mqueue.h>
-#include <rtems/posix/time.h>
-
-/*PAGE
- *
- * _POSIX_Message_queue_Receive_support
- *
- * NOTE: XXX Document how size, priority, length, and the buffer go
- * through the layers.
- */
-
-ssize_t _POSIX_Message_queue_Receive_support(
- mqd_t mqdes,
- char *msg_ptr,
- size_t msg_len,
- unsigned int *msg_prio,
- Watchdog_Interval timeout
-)
-{
- register POSIX_Message_queue_Control *the_mq;
- Objects_Locations location;
- unsigned32 length_out;
-
- the_mq = _POSIX_Message_queue_Get( mqdes, &location );
- switch ( location ) {
- case OBJECTS_ERROR:
- set_errno_and_return_minus_one( EBADF );
- case OBJECTS_REMOTE:
- _Thread_Dispatch();
- return POSIX_MP_NOT_IMPLEMENTED();
- set_errno_and_return_minus_one( EINVAL );
- case OBJECTS_LOCAL:
- if ( (the_mq->oflag & O_ACCMODE) == O_WRONLY ) {
- _Thread_Enable_dispatch();
- set_errno_and_return_minus_one( EBADF );
- }
-
- if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
- _Thread_Enable_dispatch();
- set_errno_and_return_minus_one( EMSGSIZE );
- }
-
- /*
- * Now if something goes wrong, we return a "length" of -1
- * to indicate an error.
- */
-
- length_out = -1;
-
- _CORE_message_queue_Seize(
- &the_mq->Message_queue,
- mqdes,
- msg_ptr,
- &length_out,
- (the_mq->oflag & O_NONBLOCK) ? FALSE : TRUE,
- timeout
- );
-
- _Thread_Enable_dispatch();
- *msg_prio =
- _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
-
- if ( !_Thread_Executing->Wait.return_code )
- return length_out;
-
- set_errno_and_return_minus_one(
- _POSIX_Message_queue_Translate_core_message_queue_return_code(
- _Thread_Executing->Wait.return_code
- )
- );
- }
- return POSIX_BOTTOM_REACHED();
-}
-
diff --git a/cpukit/posix/src/mqueuesend.c b/cpukit/posix/src/mqueuesend.c
deleted file mode 100644
index 7f236eb590..0000000000
--- a/cpukit/posix/src/mqueuesend.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * NOTE: The structure of the routines is identical to that of POSIX
- * Message_queues to leave the option of having unnamed message
- * queues at a future date. They are currently not part of the
- * POSIX standard but unnamed message_queues are. This is also
- * the reason for the apparently unnecessary tracking of
- * the process_shared attribute. [In addition to the fact that
- * it would be trivial to add pshared to the mq_attr structure
- * and have process private message queues.]
- *
- * This code ignores the O_RDONLY/O_WRONLY/O_RDWR flag at open
- * time.
- *
- * $Id$
- */
-
-#include <stdarg.h>
-
-#include <pthread.h>
-#include <limits.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <mqueue.h>
-
-#include <rtems/system.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/posix/seterr.h>
-#include <rtems/posix/mqueue.h>
-#include <rtems/posix/time.h>
-
-/*PAGE
- *
- * 15.2.4 Send a Message to a Message Queue, P1003.1b-1993, p. 277
- *
- * NOTE: P1003.4b/D8, p. 45 adds mq_timedsend().
- */
-
-int mq_send(
- mqd_t mqdes,
- const char *msg_ptr,
- size_t msg_len,
- unsigned int msg_prio
-)
-{
- return _POSIX_Message_queue_Send_support(
- mqdes,
- msg_ptr,
- msg_len,
- msg_prio,
- THREAD_QUEUE_WAIT_FOREVER
- );
-}
-
diff --git a/cpukit/posix/src/mqueuesendsupp.c b/cpukit/posix/src/mqueuesendsupp.c
deleted file mode 100644
index f456758c83..0000000000
--- a/cpukit/posix/src/mqueuesendsupp.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * NOTE: The structure of the routines is identical to that of POSIX
- * Message_queues to leave the option of having unnamed message
- * queues at a future date. They are currently not part of the
- * POSIX standard but unnamed message_queues are. This is also
- * the reason for the apparently unnecessary tracking of
- * the process_shared attribute. [In addition to the fact that
- * it would be trivial to add pshared to the mq_attr structure
- * and have process private message queues.]
- *
- * This code ignores the O_RDONLY/O_WRONLY/O_RDWR flag at open
- * time.
- *
- * $Id$
- */
-
-#include <stdarg.h>
-
-#include <pthread.h>
-#include <limits.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <mqueue.h>
-
-#include <rtems/system.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/posix/seterr.h>
-#include <rtems/posix/mqueue.h>
-#include <rtems/posix/time.h>
-
-
-/*PAGE
- *
- * _POSIX_Message_queue_Send_support
- */
-
-int _POSIX_Message_queue_Send_support(
- mqd_t mqdes,
- const char *msg_ptr,
- unsigned32 msg_len,
- unsigned32 msg_prio,
- Watchdog_Interval timeout
-)
-{
- register POSIX_Message_queue_Control *the_mq;
- Objects_Locations location;
-
- /*
- * Validate the priority.
- * XXX - Do not validate msg_prio is not less than 0.
- */
-
- if ( msg_prio > MQ_PRIO_MAX )
- set_errno_and_return_minus_one( EINVAL );
-
- the_mq = _POSIX_Message_queue_Get( mqdes, &location );
-
- switch ( location ) {
- case OBJECTS_ERROR:
- set_errno_and_return_minus_one( EBADF );
-
- case OBJECTS_REMOTE:
- _Thread_Dispatch();
- return POSIX_MP_NOT_IMPLEMENTED();
- set_errno_and_return_minus_one( EINVAL );
-
- case OBJECTS_LOCAL:
- if ( (the_mq->oflag & O_ACCMODE) == O_RDONLY ) {
- _Thread_Enable_dispatch();
- set_errno_and_return_minus_one( EBADF );
- }
-
- _CORE_message_queue_Submit(
- &the_mq->Message_queue,
- (void *) msg_ptr,
- msg_len,
- mqdes, /* mqd_t is an object id */
-#if defined(RTEMS_MULTIPROCESSING)
- NULL, /* XXX _POSIX_Message_queue_Core_message_queue_mp_support*/
-#else
- NULL,
-#endif
- _POSIX_Message_queue_Priority_to_core( msg_prio ),
- (the_mq->oflag & O_NONBLOCK) ? FALSE : TRUE,
- timeout /* no timeout */
- );
-
- _Thread_Enable_dispatch();
- if ( !_Thread_Executing->Wait.return_code )
- return 0;
-
- set_errno_and_return_minus_one(
- _POSIX_Message_queue_Translate_core_message_queue_return_code(
- _Thread_Executing->Wait.return_code
- )
- );
- }
- return POSIX_BOTTOM_REACHED();
-}
diff --git a/cpukit/posix/src/mqueuesetattr.c b/cpukit/posix/src/mqueuesetattr.c
deleted file mode 100644
index 6cbdb2a638..0000000000
--- a/cpukit/posix/src/mqueuesetattr.c
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * NOTE: The structure of the routines is identical to that of POSIX
- * Message_queues to leave the option of having unnamed message
- * queues at a future date. They are currently not part of the
- * POSIX standard but unnamed message_queues are. This is also
- * the reason for the apparently unnecessary tracking of
- * the process_shared attribute. [In addition to the fact that
- * it would be trivial to add pshared to the mq_attr structure
- * and have process private message queues.]
- *
- * This code ignores the O_RDONLY/O_WRONLY/O_RDWR flag at open
- * time.
- *
- * $Id$
- */
-
-#include <stdarg.h>
-
-#include <pthread.h>
-#include <limits.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <mqueue.h>
-
-#include <rtems/system.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/posix/seterr.h>
-#include <rtems/posix/mqueue.h>
-#include <rtems/posix/time.h>
-
-/*PAGE
- *
- * 15.2.7 Set Message Queue Attributes, P1003.1b-1993, p. 281
- */
-
-int mq_setattr(
- mqd_t mqdes,
- const struct mq_attr *mqstat,
- struct mq_attr *omqstat
-)
-{
- register POSIX_Message_queue_Control *the_mq;
- CORE_message_queue_Control *the_core_mq;
- Objects_Locations location;
- CORE_message_queue_Attributes *the_mq_attr;
-
- if ( !mqstat )
- set_errno_and_return_minus_one( EINVAL );
-
- the_mq = _POSIX_Message_queue_Get( mqdes, &location );
- switch ( location ) {
- case OBJECTS_ERROR:
- set_errno_and_return_minus_one( EBADF );
- case OBJECTS_REMOTE:
- _Thread_Dispatch();
- return POSIX_MP_NOT_IMPLEMENTED();
- set_errno_and_return_minus_one( EINVAL );
- case OBJECTS_LOCAL:
-
- the_core_mq = &the_mq->Message_queue;
-
- /*
- * Return the old values.
- */
-
- /* XXX this is the same stuff as is in mq_getattr... and probably */
- /* XXX should be in an inlined private routine */
-
- if ( omqstat ) {
- omqstat->mq_flags = the_mq->oflag;
- omqstat->mq_msgsize = the_core_mq->maximum_message_size;
- omqstat->mq_maxmsg = the_core_mq->maximum_pending_messages;
- omqstat->mq_curmsgs = the_core_mq->number_of_pending_messages;
- }
-
- /*
- * If blocking was in effect and is not now, then there
- * may be threads blocked on this message queue which need
- * to be unblocked to make the state of the message queue
- * consistent for future use.
- */
-
- the_mq_attr = &the_core_mq->Attributes;
-
- if ( !(the_mq->oflag & O_NONBLOCK) && /* were blocking */
- (mqstat->mq_flags & O_NONBLOCK) ) { /* and now are not */
- _CORE_message_queue_Flush_waiting_threads( the_core_mq );
- }
-
- the_mq->oflag = mqstat->mq_flags;
-
- _Thread_Enable_dispatch();
- return 0;
- }
- return POSIX_BOTTOM_REACHED();
-}
-
diff --git a/cpukit/posix/src/mqueuetimedreceive.c b/cpukit/posix/src/mqueuetimedreceive.c
deleted file mode 100644
index 7c523faa1d..0000000000
--- a/cpukit/posix/src/mqueuetimedreceive.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * NOTE: The structure of the routines is identical to that of POSIX
- * Message_queues to leave the option of having unnamed message
- * queues at a future date. They are currently not part of the
- * POSIX standard but unnamed message_queues are. This is also
- * the reason for the apparently unnecessary tracking of
- * the process_shared attribute. [In addition to the fact that
- * it would be trivial to add pshared to the mq_attr structure
- * and have process private message queues.]
- *
- * This code ignores the O_RDONLY/O_WRONLY/O_RDWR flag at open
- * time.
- *
- * $Id$
- */
-
-#include <stdarg.h>
-
-#include <pthread.h>
-#include <limits.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <mqueue.h>
-
-#include <rtems/system.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/posix/seterr.h>
-#include <rtems/posix/mqueue.h>
-#include <rtems/posix/time.h>
-
-/*PAGE
- *
- * 15.2.5 Receive a Message From a Message Queue, P1003.1b-1993, p. 279
- *
- * NOTE: P1003.4b/D8, p. 45 adds mq_timedreceive().
- */
-
-int mq_timedreceive( /* XXX: should this be ssize_t */
- mqd_t mqdes,
- char *msg_ptr,
- size_t msg_len,
- unsigned int *msg_prio,
- const struct timespec *timeout
-)
-{
- return _POSIX_Message_queue_Receive_support(
- mqdes,
- msg_ptr,
- msg_len,
- msg_prio,
- _POSIX_Timespec_to_interval( timeout )
- );
-}
-
diff --git a/cpukit/posix/src/mqueuetimedsend.c b/cpukit/posix/src/mqueuetimedsend.c
deleted file mode 100644
index 73c043b21d..0000000000
--- a/cpukit/posix/src/mqueuetimedsend.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * NOTE: The structure of the routines is identical to that of POSIX
- * Message_queues to leave the option of having unnamed message
- * queues at a future date. They are currently not part of the
- * POSIX standard but unnamed message_queues are. This is also
- * the reason for the apparently unnecessary tracking of
- * the process_shared attribute. [In addition to the fact that
- * it would be trivial to add pshared to the mq_attr structure
- * and have process private message queues.]
- *
- * This code ignores the O_RDONLY/O_WRONLY/O_RDWR flag at open
- * time.
- *
- * $Id$
- */
-
-#include <stdarg.h>
-
-#include <pthread.h>
-#include <limits.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <mqueue.h>
-
-#include <rtems/system.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/posix/seterr.h>
-#include <rtems/posix/mqueue.h>
-#include <rtems/posix/time.h>
-
-/*PAGE
- *
- * 15.2.4 Send a Message to a Message Queue, P1003.1b-1993, p. 277
- *
- * NOTE: P1003.4b/D8, p. 45 adds mq_timedsend().
- */
-
-int mq_timedsend(
- mqd_t mqdes,
- const char *msg_ptr,
- size_t msg_len,
- unsigned int msg_prio,
- const struct timespec *timeout
-)
-{
- return _POSIX_Message_queue_Send_support(
- mqdes,
- msg_ptr,
- msg_len,
- msg_prio,
- _POSIX_Timespec_to_interval( timeout )
- );
-}
-
diff --git a/cpukit/posix/src/mqueuetranslatereturncode.c b/cpukit/posix/src/mqueuetranslatereturncode.c
deleted file mode 100644
index 01c832406e..0000000000
--- a/cpukit/posix/src/mqueuetranslatereturncode.c
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * POSIX Message Queue Error Translation
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-#include <limits.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <mqueue.h>
-
-#include <rtems/system.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/posix/seterr.h>
-#include <rtems/posix/mqueue.h>
-#include <rtems/posix/time.h>
-#include <rtems/score/interr.h>
-
-
-/*PAGE
- *
- * _POSIX_Message_queue_Translate_core_message_queue_return_code
- *
- * Input parameters:
- * the_message_queue_status - message_queue status code to translate
- *
- * Output parameters:
- * rtems status code - translated POSIX status code
- *
- */
-
-int _POSIX_Message_queue_Translate_core_message_queue_return_code(
- unsigned32 the_message_queue_status
-)
-{
- switch ( the_message_queue_status ) {
- case CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL:
- return 0;
-
- /*
- * Bad message size
- */
- case CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE:
- return EMSGSIZE;
-
- /*
- * Queue is full of pending messages.
- */
- case CORE_MESSAGE_QUEUE_STATUS_TOO_MANY:
- return EAGAIN;
-
- /*
- * Out of message buffers to queue pending message
- */
- case CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED:
- return ENOMEM;
-
- /*
- * No message available on receive poll
- */
- case CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT:
- return EAGAIN;
-
- /*
- * Queue was deleted while thread blocked on it.
- */
- case CORE_MESSAGE_QUEUE_STATUS_WAS_DELETED:
- return EBADF;
-
- /*
- * POSIX Real-Time Extensions add timeouts to send and receive.
- */
- case CORE_MESSAGE_QUEUE_STATUS_TIMEOUT:
- return ETIMEDOUT;
-
- /*
- * RTEMS POSIX API implementation does not support multiprocessing.
- */
- case THREAD_STATUS_PROXY_BLOCKING:
- return ENOSYS;
- }
- _Internal_error_Occurred(
- INTERNAL_ERROR_POSIX_API,
- TRUE,
- the_message_queue_status
- );
- return POSIX_BOTTOM_REACHED();
-}
diff --git a/cpukit/posix/src/mqueueunlink.c b/cpukit/posix/src/mqueueunlink.c
deleted file mode 100644
index 4c219eecea..0000000000
--- a/cpukit/posix/src/mqueueunlink.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * NOTE: The structure of the routines is identical to that of POSIX
- * Message_queues to leave the option of having unnamed message
- * queues at a future date. They are currently not part of the
- * POSIX standard but unnamed message_queues are. This is also
- * the reason for the apparently unnecessary tracking of
- * the process_shared attribute. [In addition to the fact that
- * it would be trivial to add pshared to the mq_attr structure
- * and have process private message queues.]
- *
- * This code ignores the O_RDONLY/O_WRONLY/O_RDWR flag at open
- * time.
- *
- * $Id$
- */
-
-#include <stdarg.h>
-
-#include <pthread.h>
-#include <limits.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <mqueue.h>
-
-#include <rtems/system.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/posix/seterr.h>
-#include <rtems/posix/mqueue.h>
-#include <rtems/posix/time.h>
-
-/*PAGE
- *
- * 15.2.2 Remove a Message Queue, P1003.1b-1993, p. 276
- */
-
-int mq_unlink(
- const char *name
-)
-{
- int status;
- register POSIX_Message_queue_Control *the_mq;
- Objects_Id the_mq_id;
-
- _Thread_Disable_dispatch();
-
- status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id );
- if ( status != 0 ) {
- _Thread_Enable_dispatch();
- set_errno_and_return_minus_one( status );
- }
-
- /*
- * Don't support unlinking a remote message queue.
- */
-
- if ( !_Objects_Is_local_id(the_mq_id) ) {
- _Thread_Enable_dispatch();
- set_errno_and_return_minus_one( ENOSYS );
- }
-
- the_mq = (POSIX_Message_queue_Control *) _Objects_Get_local_object(
- &_POSIX_Message_queue_Information,
- _Objects_Get_index( the_mq_id )
- );
-
-#if defined(RTEMS_MULTIPROCESSING)
- if ( the_mq->process_shared == PTHREAD_PROCESS_SHARED ) {
- _Objects_MP_Close( &_POSIX_Message_queue_Information, the_mq_id );
- }
-#endif
-
-
- the_mq->linked = FALSE;
- _POSIX_Message_queue_Namespace_remove( the_mq );
- _POSIX_Message_queue_Delete( the_mq );
-
- _Thread_Enable_dispatch();
- return 0;
-}
-
diff --git a/cpukit/posix/src/mutex.c b/cpukit/posix/src/mutex.c
deleted file mode 100644
index 8ffbd225ae..0000000000
--- a/cpukit/posix/src/mutex.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * $Id$
- */
-
-#include <assert.h>
-#include <errno.h>
-#include <pthread.h>
-
-#include <rtems/system.h>
-#include <rtems/score/coremutex.h>
-#include <rtems/score/watchdog.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-#include <rtems/posix/mutex.h>
-#include <rtems/posix/priority.h>
-#include <rtems/posix/time.h>
-
-/*PAGE
- *
- * _POSIX_Mutex_Manager_initialization
- *
- * This routine initializes all mutex manager related data structures.
- *
- * Input parameters:
- * maximum_mutexes - maximum configured mutexes
- *
- * Output parameters: NONE
- */
-
-void _POSIX_Mutex_Manager_initialization(
- unsigned32 maximum_mutexes
-)
-{
- _Objects_Initialize_information(
- &_POSIX_Mutex_Information,
- OBJECTS_POSIX_MUTEXES,
- TRUE,
- maximum_mutexes,
- sizeof( POSIX_Mutex_Control ),
- FALSE,
- 0,
- FALSE
- );
-}
diff --git a/cpukit/posix/src/mutexattrdestroy.c b/cpukit/posix/src/mutexattrdestroy.c
deleted file mode 100644
index 0de7ed2876..0000000000
--- a/cpukit/posix/src/mutexattrdestroy.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * $Id$
- */
-
-#include <assert.h>
-#include <errno.h>
-#include <pthread.h>
-
-#include <rtems/system.h>
-#include <rtems/score/coremutex.h>
-#include <rtems/score/watchdog.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-#include <rtems/posix/mutex.h>
-#include <rtems/posix/priority.h>
-#include <rtems/posix/time.h>
-
-/*PAGE
- *
- * 11.3.1 Mutex Initialization Attributes, P1003.1c/Draft 10, p. 81
- */
-
-int pthread_mutexattr_destroy(
- pthread_mutexattr_t *attr
-)
-{
- if ( !attr || !attr->is_initialized )
- return EINVAL;
-
- attr->is_initialized = FALSE;
- return 0;
-}
-
diff --git a/cpukit/posix/src/mutexattrgetprioceiling.c b/cpukit/posix/src/mutexattrgetprioceiling.c
deleted file mode 100644
index 63181e1764..0000000000
--- a/cpukit/posix/src/mutexattrgetprioceiling.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * $Id$
- */
-
-#include <assert.h>
-#include <errno.h>
-#include <pthread.h>
-
-#include <rtems/system.h>
-#include <rtems/score/coremutex.h>
-#include <rtems/score/watchdog.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-#include <rtems/posix/mutex.h>
-#include <rtems/posix/priority.h>
-#include <rtems/posix/time.h>
-
-/*PAGE
- *
- * 13.6.1 Mutex Initialization Scheduling Attributes, P1003.1c/Draft 10, p. 128
- */
-
-int pthread_mutexattr_getprioceiling(
- const pthread_mutexattr_t *attr,
- int *prioceiling
-)
-{
- if ( !attr || !attr->is_initialized || !prioceiling )
- return EINVAL;
-
- *prioceiling = attr->prio_ceiling;
- return 0;
-}
diff --git a/cpukit/posix/src/mutexattrgetprotocol.c b/cpukit/posix/src/mutexattrgetprotocol.c
deleted file mode 100644
index 6dbb9c2766..0000000000
--- a/cpukit/posix/src/mutexattrgetprotocol.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * $Id$
- */
-
-#include <assert.h>
-#include <errno.h>
-#include <pthread.h>
-
-#include <rtems/system.h>
-#include <rtems/score/coremutex.h>
-#include <rtems/score/watchdog.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-#include <rtems/posix/mutex.h>
-#include <rtems/posix/priority.h>
-#include <rtems/posix/time.h>
-
-/*PAGE
- *
- * 13.6.1 Mutex Initialization Scheduling Attributes, P1003.1c/Draft 10, p. 128
- */
-
-int pthread_mutexattr_getprotocol(
- const pthread_mutexattr_t *attr,
- int *protocol
-)
-{
- if ( !attr || !attr->is_initialized || !protocol )
- return EINVAL;
-
- *protocol = attr->protocol;
- return 0;
-}
diff --git a/cpukit/posix/src/mutexattrgetpshared.c b/cpukit/posix/src/mutexattrgetpshared.c
deleted file mode 100644
index 2a416c72f6..0000000000
--- a/cpukit/posix/src/mutexattrgetpshared.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * $Id$
- */
-
-#include <assert.h>
-#include <errno.h>
-#include <pthread.h>
-
-#include <rtems/system.h>
-#include <rtems/score/coremutex.h>
-#include <rtems/score/watchdog.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-#include <rtems/posix/mutex.h>
-#include <rtems/posix/priority.h>
-#include <rtems/posix/time.h>
-
-/*PAGE
- *
- * 11.3.1 Mutex Initialization Attributes, P1003.1c/Draft 10, p. 81
- */
-
-int pthread_mutexattr_getpshared(
- const pthread_mutexattr_t *attr,
- int *pshared
-)
-{
- if ( !attr || !attr->is_initialized || !pshared )
- return EINVAL;
-
- *pshared = attr->process_shared;
- return 0;
-}
diff --git a/cpukit/posix/src/mutexattrinit.c b/cpukit/posix/src/mutexattrinit.c
deleted file mode 100644
index c437c6c585..0000000000
--- a/cpukit/posix/src/mutexattrinit.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * $Id$
- */
-
-#include <assert.h>
-#include <errno.h>
-#include <pthread.h>
-
-#include <rtems/system.h>
-#include <rtems/score/coremutex.h>
-#include <rtems/score/watchdog.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-#include <rtems/posix/mutex.h>
-#include <rtems/posix/priority.h>
-#include <rtems/posix/time.h>
-
-/*PAGE
- *
- * 11.3.1 Mutex Initialization Attributes, P1003.1c/Draft 10, p. 81
- */
-
-int pthread_mutexattr_init(
- pthread_mutexattr_t *attr
-)
-{
- if ( !attr )
- return EINVAL;
-
- *attr = _POSIX_Mutex_Default_attributes;
- return 0;
-}
diff --git a/cpukit/posix/src/mutexattrsetprioceiling.c b/cpukit/posix/src/mutexattrsetprioceiling.c
deleted file mode 100644
index 559d50852f..0000000000
--- a/cpukit/posix/src/mutexattrsetprioceiling.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * $Id$
- */
-
-#include <assert.h>
-#include <errno.h>
-#include <pthread.h>
-
-#include <rtems/system.h>
-#include <rtems/score/coremutex.h>
-#include <rtems/score/watchdog.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-#include <rtems/posix/mutex.h>
-#include <rtems/posix/priority.h>
-#include <rtems/posix/time.h>
-
-/*PAGE
- *
- * 13.6.1 Mutex Initialization Scheduling Attributes, P1003.1c/Draft 10, p. 128
- */
-
-int pthread_mutexattr_setprioceiling(
- pthread_mutexattr_t *attr,
- int prioceiling
-)
-{
- if ( !attr || !attr->is_initialized )
- return EINVAL;
-
- if ( !_POSIX_Priority_Is_valid( prioceiling ) )
- return EINVAL;
-
- attr->prio_ceiling = prioceiling;
- return 0;
-}
diff --git a/cpukit/posix/src/mutexattrsetprotocol.c b/cpukit/posix/src/mutexattrsetprotocol.c
deleted file mode 100644
index a8e6cdb8ba..0000000000
--- a/cpukit/posix/src/mutexattrsetprotocol.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * $Id$
- */
-
-#include <assert.h>
-#include <errno.h>
-#include <pthread.h>
-
-#include <rtems/system.h>
-#include <rtems/score/coremutex.h>
-#include <rtems/score/watchdog.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-#include <rtems/posix/mutex.h>
-#include <rtems/posix/priority.h>
-#include <rtems/posix/time.h>
-
-/*PAGE
- *
- * 13.6.1 Mutex Initialization Scheduling Attributes, P1003.1c/Draft 10, p. 128
- */
-
-int pthread_mutexattr_setprotocol(
- pthread_mutexattr_t *attr,
- int protocol
-)
-{
- if ( !attr || !attr->is_initialized )
- return EINVAL;
-
- switch ( protocol ) {
- case PTHREAD_PRIO_NONE:
- case PTHREAD_PRIO_INHERIT:
- case PTHREAD_PRIO_PROTECT:
- attr->protocol = protocol;
- return 0;
-
- default:
- return EINVAL;
- }
-}
diff --git a/cpukit/posix/src/mutexattrsetpshared.c b/cpukit/posix/src/mutexattrsetpshared.c
deleted file mode 100644
index 46cb29a63f..0000000000
--- a/cpukit/posix/src/mutexattrsetpshared.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * $Id$
- */
-
-#include <assert.h>
-#include <errno.h>
-#include <pthread.h>
-
-#include <rtems/system.h>
-#include <rtems/score/coremutex.h>
-#include <rtems/score/watchdog.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-#include <rtems/posix/mutex.h>
-#include <rtems/posix/priority.h>
-#include <rtems/posix/time.h>
-
-/*PAGE
- *
- * 11.3.1 Mutex Initialization Attributes, P1003.1c/Draft 10, p. 81
- */
-
-int pthread_mutexattr_setpshared(
- pthread_mutexattr_t *attr,
- int pshared
-)
-{
- if ( !attr || !attr->is_initialized )
- return EINVAL;
-
- switch ( pshared ) {
- case PTHREAD_PROCESS_SHARED:
- case PTHREAD_PROCESS_PRIVATE:
- attr->process_shared = pshared;
- return 0;
-
- default:
- return EINVAL;
- }
-}
-
diff --git a/cpukit/posix/src/mutexdefaultattributes.c b/cpukit/posix/src/mutexdefaultattributes.c
deleted file mode 100644
index 46e8ae5158..0000000000
--- a/cpukit/posix/src/mutexdefaultattributes.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * $Id$
- */
-
-#include <assert.h>
-#include <errno.h>
-#include <pthread.h>
-
-#include <rtems/system.h>
-#include <rtems/score/coremutex.h>
-#include <rtems/score/watchdog.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-#include <rtems/posix/mutex.h>
-#include <rtems/posix/priority.h>
-#include <rtems/posix/time.h>
-
-/*PAGE
- *
- * The default mutex attributes structure.
- */
-
-const pthread_mutexattr_t _POSIX_Mutex_Default_attributes = {
- TRUE, /* is_initialized */
- PTHREAD_PROCESS_PRIVATE, /* process_shared */
- POSIX_SCHEDULER_MAXIMUM_PRIORITY, /* prio_ceiling */
- PTHREAD_PRIO_NONE, /* protocol */
- FALSE /* recursive */
-};
diff --git a/cpukit/posix/src/mutexdestroy.c b/cpukit/posix/src/mutexdestroy.c
deleted file mode 100644
index 33debda77c..0000000000
--- a/cpukit/posix/src/mutexdestroy.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * $Id$
- */
-
-#include <assert.h>
-#include <errno.h>
-#include <pthread.h>
-
-#include <rtems/system.h>
-#include <rtems/score/coremutex.h>
-#include <rtems/score/watchdog.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-#include <rtems/posix/mutex.h>
-#include <rtems/posix/priority.h>
-#include <rtems/posix/time.h>
-
-/*PAGE
- *
- * 11.3.2 Initializing and Destroying a Mutex, P1003.1c/Draft 10, p. 87
- */
-
-int pthread_mutex_destroy(
- pthread_mutex_t *mutex
-)
-{
- register POSIX_Mutex_Control *the_mutex;
- Objects_Locations location;
-
- the_mutex = _POSIX_Mutex_Get( mutex, &location );
- switch ( location ) {
- case OBJECTS_REMOTE:
-#if defined(RTEMS_MULTIPROCESSING)
- _Thread_Dispatch();
- return POSIX_MP_NOT_IMPLEMENTED();
- return EINVAL;
-#endif
- case OBJECTS_ERROR:
- return EINVAL;
- case OBJECTS_LOCAL:
- /*
- * XXX: There is an error for the mutex being locked
- * or being in use by a condition variable.
- */
-
- if ( _CORE_mutex_Is_locked( &the_mutex->Mutex ) ) {
- _Thread_Enable_dispatch();
- return EBUSY;
- }
-
- _Objects_Close( &_POSIX_Mutex_Information, &the_mutex->Object );
-
- _CORE_mutex_Flush(
- &the_mutex->Mutex,
-#if defined(RTEMS_MULTIPROCESSING)
- _POSIX_Mutex_MP_Send_object_was_deleted,
-#else
- NULL,
-#endif
- EINVAL
- );
-
- _POSIX_Mutex_Free( the_mutex );
-
-#if defined(RTEMS_MULTIPROCESSING)
- if ( the_mutex->process_shared == PTHREAD_PROCESS_SHARED ) {
-
- _Objects_MP_Close( &_POSIX_Mutex_Information, the_mutex->Object.id );
-
- _POSIX_Mutex_MP_Send_process_packet(
- POSIX_MUTEX_MP_ANNOUNCE_DELETE,
- the_mutex->Object.id,
- 0, /* Not used */
- 0 /* Not used */
- );
- }
-#endif
- _Thread_Enable_dispatch();
- return 0;
- }
- return POSIX_BOTTOM_REACHED();
-}
diff --git a/cpukit/posix/src/mutexfromcorestatus.c b/cpukit/posix/src/mutexfromcorestatus.c
deleted file mode 100644
index e8c8baa5af..0000000000
--- a/cpukit/posix/src/mutexfromcorestatus.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * $Id$
- */
-
-#include <assert.h>
-#include <errno.h>
-#include <pthread.h>
-
-#include <rtems/system.h>
-#include <rtems/score/coremutex.h>
-#include <rtems/score/watchdog.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-#include <rtems/posix/mutex.h>
-#include <rtems/posix/priority.h>
-#include <rtems/posix/time.h>
-
-/*PAGE
- *
- * _POSIX_Mutex_From_core_mutex_status
- */
-
-int _POSIX_Mutex_From_core_mutex_status(
- CORE_mutex_Status status
-)
-{
- switch ( status ) {
- case CORE_MUTEX_STATUS_SUCCESSFUL:
- return 0;
- case CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT:
- return EBUSY;
- case CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED:
- return EDEADLK;
- case CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE:
- return EPERM;
- case CORE_MUTEX_WAS_DELETED:
- return EINVAL;
- case CORE_MUTEX_TIMEOUT:
- return EAGAIN;
- case CORE_MUTEX_STATUS_CEILING_VIOLATED:
- return EINVAL;
- default:
- break;
- }
- assert( 0 );
- return 0;
-}
diff --git a/cpukit/posix/src/mutexgetprioceiling.c b/cpukit/posix/src/mutexgetprioceiling.c
deleted file mode 100644
index 81fdbeaa9d..0000000000
--- a/cpukit/posix/src/mutexgetprioceiling.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * $Id$
- */
-
-#include <assert.h>
-#include <errno.h>
-#include <pthread.h>
-
-#include <rtems/system.h>
-#include <rtems/score/coremutex.h>
-#include <rtems/score/watchdog.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-#include <rtems/posix/mutex.h>
-#include <rtems/posix/priority.h>
-#include <rtems/posix/time.h>
-
-/*PAGE
- *
- * 13.6.2 Change the Priority Ceiling of a Mutex, P1003.1c/Draft 10, p. 131
- */
-
-int pthread_mutex_getprioceiling(
- pthread_mutex_t *mutex,
- int *prioceiling
-)
-{
- register POSIX_Mutex_Control *the_mutex;
- Objects_Locations location;
-
- if ( !prioceiling )
- return EINVAL;
-
- the_mutex = _POSIX_Mutex_Get( mutex, &location );
- switch ( location ) {
- case OBJECTS_REMOTE:
-#if defined(RTEMS_MULTIPROCESSING)
- return POSIX_MP_NOT_IMPLEMENTED(); /* XXX feels questionable */
-#endif
- case OBJECTS_ERROR:
- return EINVAL;
- case OBJECTS_LOCAL:
- *prioceiling = _POSIX_Priority_From_core(
- the_mutex->Mutex.Attributes.priority_ceiling
- );
- _Thread_Enable_dispatch();
- return 0;
- }
- return POSIX_BOTTOM_REACHED();
-}
diff --git a/cpukit/posix/src/mutexinit.c b/cpukit/posix/src/mutexinit.c
deleted file mode 100644
index f72edf694a..0000000000
--- a/cpukit/posix/src/mutexinit.c
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- * $Id$
- */
-
-#include <assert.h>
-#include <errno.h>
-#include <pthread.h>
-
-#include <rtems/system.h>
-#include <rtems/score/coremutex.h>
-#include <rtems/score/watchdog.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-#include <rtems/posix/mutex.h>
-#include <rtems/posix/priority.h>
-#include <rtems/posix/time.h>
-
-/*PAGE
- *
- * 11.3.2 Initializing and Destroying a Mutex, P1003.1c/Draft 10, p. 87
- *
- * NOTE: XXX Could be optimized so all the attribute error checking
- * is not performed when attr is NULL.
- */
-
-int pthread_mutex_init(
- pthread_mutex_t *mutex,
- const pthread_mutexattr_t *attr
-)
-{
- POSIX_Mutex_Control *the_mutex;
- CORE_mutex_Attributes *the_mutex_attr;
- const pthread_mutexattr_t *the_attr;
- CORE_mutex_Disciplines the_discipline;
-#if 0
- register POSIX_Mutex_Control *mutex_in_use;
- Objects_Locations location;
-#endif
-
- if ( attr ) the_attr = attr;
- else the_attr = &_POSIX_Mutex_Default_attributes;
-
- /* Check for NULL mutex */
-
- if ( !mutex )
- return EINVAL;
-
- /*
- * This code should eventually be removed.
- *
- * Although the POSIX specification says:
- *
- * "Attempting to initialize an already initialized mutex results
- * in undefined behavior."
- *
- * Trying to keep the caller from doing the create when *mutex
- * is actually a valid ID causes grief. All it takes is the wrong
- * value in an uninitialized variable to make this fail. As best
- * I can tell, RTEMS was the only pthread implementation to choose
- * this option for "undefined behavior" and doing so has created
- * portability problems. In particular, Rosimildo DaSilva
- * <rdasilva@connecttel.com> saw seemingly random failures in the
- * RTEMS port of omniORB2 when this code was enabled.
- *
- * Joel Sherrill <joel@OARcorp.com> 14 May 1999
- */
-
-
-#if 0
- /* avoid infinite recursion on call to this routine in _POSIX_Mutex_Get */
-
- if ( *mutex != PTHREAD_MUTEX_INITIALIZER ) {
-
- /* EBUSY if *mutex is a valid id */
-
- mutex_in_use = _POSIX_Mutex_Get( mutex, &location );
- switch ( location ) {
- case OBJECTS_REMOTE:
- case OBJECTS_ERROR:
- break;
- case OBJECTS_LOCAL:
- _Thread_Enable_dispatch();
- return EBUSY;
- }
- }
-#endif
-
- if ( !the_attr->is_initialized )
- return EINVAL;
-
- /*
- * XXX: Be careful about attributes when global!!!
- */
-
- assert( the_attr->process_shared == PTHREAD_PROCESS_PRIVATE );
-
-#if defined(RTEMS_MULTIPROCESSING)
- if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
- return POSIX_MP_NOT_IMPLEMENTED();
-#endif
-
- /*
- * Determine the discipline of the mutex
- */
-
- switch ( the_attr->protocol ) {
- case PTHREAD_PRIO_NONE:
- the_discipline = CORE_MUTEX_DISCIPLINES_FIFO;
- break;
- case PTHREAD_PRIO_INHERIT:
- the_discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
- break;
- case PTHREAD_PRIO_PROTECT:
- the_discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
- break;
- default:
- return EINVAL;
- }
-
- if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) )
- return EINVAL;
-
- _Thread_Disable_dispatch();
-
- the_mutex = _POSIX_Mutex_Allocate();
-
- if ( !the_mutex ) {
- _Thread_Enable_dispatch();
- return EAGAIN;
- }
-
-#if defined(RTEMS_MULTIPROCESSING)
- if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED &&
- !( _Objects_MP_Allocate_and_open( &_POSIX_Mutex_Information, 0,
- the_mutex->Object.id, FALSE ) ) ) {
- _POSIX_Mutex_Free( the_mutex );
- _Thread_Enable_dispatch();
- return EAGAIN;
- }
-#endif
-
- the_mutex->process_shared = the_attr->process_shared;
-
- the_mutex_attr = &the_mutex->Mutex.Attributes;
-
- if ( the_attr->recursive )
- the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
- else
- the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR;
- the_mutex_attr->only_owner_release = TRUE;
- the_mutex_attr->priority_ceiling =
- _POSIX_Priority_To_core( the_attr->prio_ceiling );
- the_mutex_attr->discipline = the_discipline;
-
- /*
- * Must be initialized to unlocked.
- */
-
- _CORE_mutex_Initialize(
- &the_mutex->Mutex,
- OBJECTS_POSIX_MUTEXES,
- the_mutex_attr,
- CORE_MUTEX_UNLOCKED,
- NULL /* proxy_extract_callout */
- );
-
- _Objects_Open( &_POSIX_Mutex_Information, &the_mutex->Object, 0 );
-
- *mutex = the_mutex->Object.id;
-
-#if defined(RTEMS_MULTIPROCESSING)
- if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
- _POSIX_Mutex_MP_Send_process_packet(
- POSIX_MUTEX_MP_ANNOUNCE_CREATE,
- the_mutex->Object.id,
- 0, /* Name not used */
- 0 /* Not used */
- );
-#endif
-
- _Thread_Enable_dispatch();
- return 0;
-}
diff --git a/cpukit/posix/src/mutexlock.c b/cpukit/posix/src/mutexlock.c
deleted file mode 100644
index 45f223b817..0000000000
--- a/cpukit/posix/src/mutexlock.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * $Id$
- */
-
-#include <assert.h>
-#include <errno.h>
-#include <pthread.h>
-
-#include <rtems/system.h>
-#include <rtems/score/coremutex.h>
-#include <rtems/score/watchdog.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-#include <rtems/posix/mutex.h>
-#include <rtems/posix/priority.h>
-#include <rtems/posix/time.h>
-
-/*PAGE
- *
- * 11.3.3 Locking and Unlocking a Mutex, P1003.1c/Draft 10, p. 93
- *
- * NOTE: P1003.4b/D8 adds pthread_mutex_timedlock(), p. 29
- */
-
-int pthread_mutex_lock(
- pthread_mutex_t *mutex
-)
-{
- return _POSIX_Mutex_Lock_support( mutex, TRUE, THREAD_QUEUE_WAIT_FOREVER );
-}
diff --git a/cpukit/posix/src/mutexlocksupp.c b/cpukit/posix/src/mutexlocksupp.c
deleted file mode 100644
index 843156c331..0000000000
--- a/cpukit/posix/src/mutexlocksupp.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * $Id$
- */
-
-#include <assert.h>
-#include <errno.h>
-#include <pthread.h>
-
-#include <rtems/system.h>
-#include <rtems/score/coremutex.h>
-#include <rtems/score/watchdog.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-#include <rtems/posix/mutex.h>
-#include <rtems/posix/priority.h>
-#include <rtems/posix/time.h>
-
-/*PAGE
- *
- * _POSIX_Mutex_Lock_support
- *
- * A support routine which implements guts of the blocking, non-blocking, and
- * timed wait version of mutex lock.
- */
-
-int _POSIX_Mutex_Lock_support(
- pthread_mutex_t *mutex,
- boolean blocking,
- Watchdog_Interval timeout
-)
-{
- register POSIX_Mutex_Control *the_mutex;
- Objects_Locations location;
-
- the_mutex = _POSIX_Mutex_Get( mutex, &location );
- switch ( location ) {
- case OBJECTS_REMOTE:
-#if defined(RTEMS_MULTIPROCESSING)
- return _POSIX_Mutex_MP_Send_request_packet(
- POSIX_MUTEX_MP_OBTAIN_REQUEST,
- *mutex,
- 0, /* must define the option set */
- WATCHDOG_NO_TIMEOUT
- );
-#endif
- case OBJECTS_ERROR:
- return EINVAL;
- case OBJECTS_LOCAL:
- _CORE_mutex_Seize(
- &the_mutex->Mutex,
- the_mutex->Object.id,
- blocking,
- timeout
- );
- _Thread_Enable_dispatch();
- return _POSIX_Mutex_From_core_mutex_status(
- (CORE_mutex_Status) _Thread_Executing->Wait.return_code
- );
- }
- return POSIX_BOTTOM_REACHED();
-}
diff --git a/cpukit/posix/src/mutexmp.c b/cpukit/posix/src/mutexmp.c
deleted file mode 100644
index dbdb44b708..0000000000
--- a/cpukit/posix/src/mutexmp.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * $Id$
- */
-
-#include <assert.h>
-#include <errno.h>
-#include <pthread.h>
-
-#include <rtems/system.h>
-#include <rtems/score/coremutex.h>
-#include <rtems/score/watchdog.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-#include <rtems/posix/mutex.h>
-#include <rtems/posix/priority.h>
-#include <rtems/posix/time.h>
-
-/*
- * TEMPORARY
- */
-
-#if defined(RTEMS_MULTIPROCESSING)
-void _POSIX_Mutex_MP_Send_process_packet (
- POSIX_Mutex_MP_Remote_operations operation,
- Objects_Id mutex_id,
- Objects_Name name,
- Objects_Id proxy_id
-)
-{
- (void) POSIX_MP_NOT_IMPLEMENTED();
-}
-
-void _POSIX_Mutex_MP_Send_object_was_deleted (
- Thread_Control *the_proxy
-)
-{
- (void) POSIX_MP_NOT_IMPLEMENTED();
-}
-
-int _POSIX_Mutex_MP_Send_request_packet (
- POSIX_Mutex_MP_Remote_operations operation,
- Objects_Id mutex_id,
- boolean wait, /* XXX options */
- Watchdog_Interval timeout
-)
-{
- return POSIX_MP_NOT_IMPLEMENTED();
-}
-
-void _POSIX_Threads_mutex_MP_support(
- Thread_Control *the_thread,
- Objects_Id id
-)
-{
- (void) POSIX_MP_NOT_IMPLEMENTED(); /* XXX: should never get here */
-}
-#endif
-
-/*
- * END OF TEMPORARY
- */
diff --git a/cpukit/posix/src/mutexsetprioceiling.c b/cpukit/posix/src/mutexsetprioceiling.c
deleted file mode 100644
index 9d491d438b..0000000000
--- a/cpukit/posix/src/mutexsetprioceiling.c
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * $Id$
- */
-
-#include <assert.h>
-#include <errno.h>
-#include <pthread.h>
-
-#include <rtems/system.h>
-#include <rtems/score/coremutex.h>
-#include <rtems/score/watchdog.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-#include <rtems/posix/mutex.h>
-#include <rtems/posix/priority.h>
-#include <rtems/posix/time.h>
-
-/*PAGE
- *
- * 13.6.2 Change the Priority Ceiling of a Mutex, P1003.1c/Draft 10, p. 131
- */
-
-int pthread_mutex_setprioceiling(
- pthread_mutex_t *mutex,
- int prioceiling,
- int *old_ceiling
-)
-{
- register POSIX_Mutex_Control *the_mutex;
- Objects_Locations location;
- Priority_Control the_priority;
- int status;
-
- if ( !old_ceiling )
- return EINVAL;
-
- if ( !_POSIX_Priority_Is_valid( prioceiling ) )
- return EINVAL;
-
- the_priority = _POSIX_Priority_To_core( prioceiling );
-
- /*
- * Must acquire the mutex before we can change it's ceiling
- */
-
- status = pthread_mutex_lock( mutex );
- if ( status )
- return status;
-
- the_mutex = _POSIX_Mutex_Get( mutex, &location );
- switch ( location ) {
- case OBJECTS_REMOTE:
-#if defined(RTEMS_MULTIPROCESSING)
- /* XXX It feels questionable to set the ceiling on a remote mutex. */
- return EINVAL;
-#endif
- case OBJECTS_ERROR:
- return EINVAL; /* impossible to get here */
- case OBJECTS_LOCAL:
- *old_ceiling = _POSIX_Priority_From_core(
- the_mutex->Mutex.Attributes.priority_ceiling
- );
- the_mutex->Mutex.Attributes.priority_ceiling = the_priority;
- _CORE_mutex_Surrender(
- &the_mutex->Mutex,
- the_mutex->Object.id,
-#if defined(RTEMS_MULTIPROCESSING)
- _POSIX_Threads_mutex_MP_support
-#else
- NULL
-#endif
- );
- _Thread_Enable_dispatch();
- return 0;
- }
- return POSIX_BOTTOM_REACHED();
-}
diff --git a/cpukit/posix/src/mutextimedlock.c b/cpukit/posix/src/mutextimedlock.c
deleted file mode 100644
index db9f598460..0000000000
--- a/cpukit/posix/src/mutextimedlock.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * $Id$
- */
-
-#include <assert.h>
-#include <errno.h>
-#include <pthread.h>
-
-#include <rtems/system.h>
-#include <rtems/score/coremutex.h>
-#include <rtems/score/watchdog.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-#include <rtems/posix/mutex.h>
-#include <rtems/posix/priority.h>
-#include <rtems/posix/time.h>
-
-/*PAGE
- *
- * 11.3.3 Locking and Unlocking a Mutex, P1003.1c/Draft 10, p. 93
- *
- * NOTE: P1003.4b/D8 adds pthread_mutex_timedlock(), p. 29
- */
-
-int pthread_mutex_timedlock(
- pthread_mutex_t *mutex,
- const struct timespec *timeout
-)
-{
- return _POSIX_Mutex_Lock_support(
- mutex,
- TRUE,
- _POSIX_Timespec_to_interval( timeout )
- );
-}
diff --git a/cpukit/posix/src/mutextrylock.c b/cpukit/posix/src/mutextrylock.c
deleted file mode 100644
index cccda832b6..0000000000
--- a/cpukit/posix/src/mutextrylock.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * $Id$
- */
-
-#include <assert.h>
-#include <errno.h>
-#include <pthread.h>
-
-#include <rtems/system.h>
-#include <rtems/score/coremutex.h>
-#include <rtems/score/watchdog.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-#include <rtems/posix/mutex.h>
-#include <rtems/posix/priority.h>
-#include <rtems/posix/time.h>
-
-/*PAGE
- *
- * 11.3.3 Locking and Unlocking a Mutex, P1003.1c/Draft 10, p. 93
- *
- * NOTE: P1003.4b/D8 adds pthread_mutex_timedlock(), p. 29
- */
-
-int pthread_mutex_trylock(
- pthread_mutex_t *mutex
-)
-{
- return _POSIX_Mutex_Lock_support( mutex, FALSE, THREAD_QUEUE_WAIT_FOREVER );
-}
diff --git a/cpukit/posix/src/mutexunlock.c b/cpukit/posix/src/mutexunlock.c
deleted file mode 100644
index 3b6fdcc7e0..0000000000
--- a/cpukit/posix/src/mutexunlock.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * $Id$
- */
-
-#include <assert.h>
-#include <errno.h>
-#include <pthread.h>
-
-#include <rtems/system.h>
-#include <rtems/score/coremutex.h>
-#include <rtems/score/watchdog.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-#include <rtems/posix/mutex.h>
-#include <rtems/posix/priority.h>
-#include <rtems/posix/time.h>
-
-/*PAGE
- *
- * 11.3.3 Locking and Unlocking a Mutex, P1003.1c/Draft 10, p. 93
- *
- * NOTE: P1003.4b/D8 adds pthread_mutex_timedlock(), p. 29
- */
-
-int pthread_mutex_unlock(
- pthread_mutex_t *mutex
-)
-{
- register POSIX_Mutex_Control *the_mutex;
- Objects_Locations location;
- CORE_mutex_Status status;
-
- the_mutex = _POSIX_Mutex_Get( mutex, &location );
- switch ( location ) {
- case OBJECTS_REMOTE:
-#if defined(RTEMS_MULTIPROCESSING)
- return _POSIX_Mutex_MP_Send_request_packet(
- POSIX_MUTEX_MP_RELEASE_REQUEST,
- *mutex,
- 0, /* Not used */
- MPCI_DEFAULT_TIMEOUT
- );
-#endif
- case OBJECTS_ERROR:
- return EINVAL;
- case OBJECTS_LOCAL:
- status = _CORE_mutex_Surrender(
- &the_mutex->Mutex,
- the_mutex->Object.id,
-#if defined(RTEMS_MULTIPROCESSING)
- _POSIX_Threads_mutex_MP_support
-#else
- NULL
-#endif
- );
- _Thread_Enable_dispatch();
- return _POSIX_Mutex_From_core_mutex_status( status );
- break;
- }
- return POSIX_BOTTOM_REACHED();
-}
diff --git a/cpukit/posix/src/nanosleep.c b/cpukit/posix/src/nanosleep.c
deleted file mode 100644
index 7930c016e5..0000000000
--- a/cpukit/posix/src/nanosleep.c
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * $Id$
- */
-
-#include <assert.h>
-#include <time.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/tod.h>
-
-#include <rtems/posix/seterr.h>
-#include <rtems/posix/time.h>
-
-/*PAGE
- *
- * 14.2.5 High Resolution Sleep, P1003.1b-1993, p. 269
- */
-
-int nanosleep(
- const struct timespec *rqtp,
- struct timespec *rmtp
-)
-{
- Watchdog_Interval ticks;
- struct timespec *the_rqtp;
-
- if ( !rqtp )
- set_errno_and_return_minus_one( EINVAL );
-
- the_rqtp = (struct timespec *)rqtp;
-
- /*
- * Return EAGAIN if the delay interval is negative.
- *
- * NOTE: This behavior is beyond the POSIX specification.
- * FSU pthreads shares this behavior.
- */
-
- if ( the_rqtp->tv_sec < 0 )
- the_rqtp->tv_sec = 0;
-
- if ( /* the_rqtp->tv_sec < 0 || */ the_rqtp->tv_nsec < 0 )
- set_errno_and_return_minus_one( EAGAIN );
-
- if ( the_rqtp->tv_nsec >= TOD_NANOSECONDS_PER_SECOND )
- set_errno_and_return_minus_one( EINVAL );
-
- ticks = _POSIX_Timespec_to_interval( the_rqtp );
-
- /*
- * This behavior is also beyond the POSIX specification but is
- * consistent with the RTEMS api and yields desirable behavior.
- */
-
- if ( !ticks ) {
- _Thread_Disable_dispatch();
- _Thread_Yield_processor();
- _Thread_Enable_dispatch();
- if ( rmtp ) {
- rmtp->tv_sec = 0;
- rmtp->tv_nsec = 0;
- }
- return 0;
- }
-
- _Thread_Disable_dispatch();
- _Thread_Set_state(
- _Thread_Executing,
- STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL
- );
- _Watchdog_Initialize(
- &_Thread_Executing->Timer,
- _Thread_Delay_ended,
- _Thread_Executing->Object.id,
- NULL
- );
- _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks );
- _Thread_Enable_dispatch();
-
- /* calculate time remaining */
-
- if ( rmtp ) {
- ticks -=
- _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time;
-
- _POSIX_Interval_to_timespec( ticks, rmtp );
-
- /*
- * If there is time remaining, then we were interrupted by a signal.
- */
-
- if ( ticks )
- set_errno_and_return_minus_one( EINTR );
- }
-
- return 0;
-}
diff --git a/cpukit/posix/src/pause.c b/cpukit/posix/src/pause.c
deleted file mode 100644
index 628908b44d..0000000000
--- a/cpukit/posix/src/pause.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * 3.4.2 Suspend Process Execution, P1003.1b-1993, p. 81
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <pthread.h>
-#include <signal.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
-#include <rtems/posix/psignal.h>
-
-/*
- * 3.4.2 Suspend Process Execution, P1003.1b-1993, p. 81
- */
-
-int pause( void )
-{
- sigset_t all_signals;
- int status;
-
- (void) sigfillset( &all_signals );
-
- status = sigtimedwait( &all_signals, NULL, NULL );
-
- return status;
-}
-
diff --git a/cpukit/posix/src/posixintervaltotimespec.c b/cpukit/posix/src/posixintervaltotimespec.c
deleted file mode 100644
index e5f883095b..0000000000
--- a/cpukit/posix/src/posixintervaltotimespec.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * $Id$
- */
-
-#include <assert.h>
-#include <time.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/tod.h>
-
-#include <rtems/posix/seterr.h>
-#include <rtems/posix/time.h>
-
-/*PAGE
- *
- * _POSIX_Interval_to_timespec
- */
-
-void _POSIX_Interval_to_timespec(
- Watchdog_Interval ticks,
- struct timespec *time
-)
-{
- unsigned32 usecs;
-
- usecs = ticks * _TOD_Microseconds_per_tick;
-
- time->tv_sec = usecs / TOD_MICROSECONDS_PER_SECOND;
- time->tv_nsec = (usecs % TOD_MICROSECONDS_PER_SECOND) *
- TOD_NANOSECONDS_PER_MICROSECOND;
-}
diff --git a/cpukit/posix/src/posixtimespecsubtract.c b/cpukit/posix/src/posixtimespecsubtract.c
deleted file mode 100644
index eb5e21d83a..0000000000
--- a/cpukit/posix/src/posixtimespecsubtract.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * $Id$
- */
-
-#include <assert.h>
-#include <time.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/tod.h>
-
-#include <rtems/posix/seterr.h>
-#include <rtems/posix/time.h>
-
-/*PAGE
- *
- * _POSIX_Timespec_subtract
- */
-
-void _POSIX_Timespec_subtract(
- const struct timespec *the_start,
- const struct timespec *end,
- struct timespec *result
-)
-{
- struct timespec start_struct = *the_start;
- struct timespec *start = &start_struct;
- unsigned int nsecs_per_sec = TOD_NANOSECONDS_PER_SECOND;
-
- if (end->tv_nsec < start->tv_nsec) {
- int seconds = (start->tv_nsec - end->tv_nsec) / nsecs_per_sec + 1;
- start->tv_nsec -= nsecs_per_sec * seconds;
- start->tv_sec += seconds;
- }
-
- if (end->tv_nsec - start->tv_nsec > nsecs_per_sec) {
- int seconds = (start->tv_nsec - end->tv_nsec) / nsecs_per_sec;
- start->tv_nsec += nsecs_per_sec * seconds;
- start->tv_sec -= seconds;
- }
-
- result->tv_sec = end->tv_sec - start->tv_sec;
- result->tv_nsec = end->tv_nsec - start->tv_nsec;
-}
diff --git a/cpukit/posix/src/posixtimespectointerval.c b/cpukit/posix/src/posixtimespectointerval.c
deleted file mode 100644
index 388dd791eb..0000000000
--- a/cpukit/posix/src/posixtimespectointerval.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * $Id$
- */
-
-#include <assert.h>
-#include <time.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/tod.h>
-
-#include <rtems/posix/seterr.h>
-#include <rtems/posix/time.h>
-
-/*PAGE
- *
- * _POSIX_Timespec_to_interval
- */
-
-Watchdog_Interval _POSIX_Timespec_to_interval(
- const struct timespec *time
-)
-{
- Watchdog_Interval ticks;
-
- ticks = (time->tv_sec * TOD_MICROSECONDS_PER_SECOND) /
- _TOD_Microseconds_per_tick;
-
- ticks += (time->tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND) /
- _TOD_Microseconds_per_tick;
-
- if (ticks)
- return ticks;
-
- return 1;
-}
diff --git a/cpukit/posix/src/psignal.c b/cpukit/posix/src/psignal.c
deleted file mode 100644
index 28e1ee8319..0000000000
--- a/cpukit/posix/src/psignal.c
+++ /dev/null
@@ -1,246 +0,0 @@
-/*
- * $Id$
- */
-
-#include <assert.h>
-#include <errno.h>
-#include <pthread.h>
-#include <signal.h>
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/tqdata.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/posix/seterr.h>
-#include <rtems/posix/threadsup.h>
-#include <rtems/posix/psignal.h>
-#include <rtems/posix/pthread.h>
-#include <rtems/posix/time.h>
-#include <stdio.h>
-
-
-/*
- * Currently 32 signals numbered 1-32 are defined
- */
-
-#define SIGNAL_EMPTY_MASK 0x00000000
-#define SIGNAL_ALL_MASK 0xffffffff
-
-#define signo_to_mask( _sig ) (1 << ((_sig) - 1))
-
-#define is_valid_signo( _sig ) \
- ((_sig) >= 1 && (_sig) <= 32 )
-
-/*** PROCESS WIDE STUFF ****/
-
-sigset_t _POSIX_signals_Pending;
-
-void _POSIX_signals_Abnormal_termination_handler( int signo )
-{
- exit( 1 );
-}
-
-#define SIG_ARRAY_MAX (SIGRTMAX + 1)
-struct sigaction _POSIX_signals_Default_vectors[ SIG_ARRAY_MAX ] = {
- /* NO SIGNAL 0 */ SIGACTION_IGNORE,
- /* SIGHUP 1 */ SIGACTION_TERMINATE,
- /* SIGINT 2 */ SIGACTION_TERMINATE,
- /* SIGQUIT 3 */ SIGACTION_TERMINATE,
- /* SIGILL 4 */ SIGACTION_TERMINATE,
- /* SIGTRAP 5 */ SIGACTION_TERMINATE,
- /* SIGIOT 6 */ SIGACTION_TERMINATE,
- /* SIGABRT 6 SIGACTION_TERMINATE, -- alias for SIGIOT */
- /* SIGEMT 7 */ SIGACTION_TERMINATE,
- /* SIGFPE 8 */ SIGACTION_TERMINATE,
- /* SIGKILL 9 */ SIGACTION_TERMINATE,
- /* SIGBUS 10 */ SIGACTION_TERMINATE,
- /* SIGSEGV 11 */ SIGACTION_TERMINATE,
- /* SIGSYS 12 */ SIGACTION_TERMINATE,
- /* SIGPIPE 13 */ SIGACTION_TERMINATE,
- /* SIGALRM 14 */ SIGACTION_TERMINATE,
- /* SIGTERM 15 */ SIGACTION_TERMINATE,
- /* SIGUSR1 16 */ SIGACTION_TERMINATE,
- /* SIGUSR2 17 */ SIGACTION_TERMINATE,
- /* SIGRTMIN 18 */ SIGACTION_TERMINATE,
- /* SIGRT 19 */ SIGACTION_TERMINATE,
- /* SIGRT 20 */ SIGACTION_TERMINATE,
- /* SIGRT 21 */ SIGACTION_TERMINATE,
- /* SIGRT 22 */ SIGACTION_TERMINATE,
- /* SIGRT 23 */ SIGACTION_TERMINATE,
- /* SIGRT 24 */ SIGACTION_TERMINATE,
- /* SIGRT 25 */ SIGACTION_TERMINATE,
- /* SIGRT 26 */ SIGACTION_TERMINATE,
- /* SIGRT 27 */ SIGACTION_TERMINATE,
- /* SIGRT 28 */ SIGACTION_TERMINATE,
- /* SIGRT 29 */ SIGACTION_TERMINATE,
- /* SIGRT 30 */ SIGACTION_TERMINATE,
- /* SIGRT 31 */ SIGACTION_TERMINATE,
- /* SIGRTMAX 32 */ SIGACTION_TERMINATE
-};
-
-struct sigaction _POSIX_signals_Vectors[ SIG_ARRAY_MAX ];
-
-Watchdog_Control _POSIX_signals_Alarm_timer;
-
-Thread_queue_Control _POSIX_signals_Wait_queue;
-
-Chain_Control _POSIX_signals_Inactive_siginfo;
-Chain_Control _POSIX_signals_Siginfo[ SIG_ARRAY_MAX ];
-
-/*PAGE
- *
- * XXX - move these
- */
-
-#define _States_Is_interruptible_signal( _states ) \
- ( ((_states) & \
- (STATES_WAITING_FOR_SIGNAL|STATES_INTERRUPTIBLE_BY_SIGNAL)) == \
- (STATES_WAITING_FOR_SIGNAL|STATES_INTERRUPTIBLE_BY_SIGNAL))
-
-/*
- * _POSIX_signals_Post_switch_extension
- */
-
-void _POSIX_signals_Post_switch_extension(
- Thread_Control *the_thread
-)
-{
- POSIX_API_Control *api;
- int signo;
- ISR_Level level;
-
- api = the_thread->API_Extensions[ THREAD_API_POSIX ];
-
- /*
- * If we invoke any user code, there is the possibility that
- * a new signal has been posted that we should process so we
- * restart the loop if a signal handler was invoked.
- *
- * The first thing done is to check there are any signals to be
- * processed at all. No point in doing this loop otherwise.
- */
-
-restart:
- _ISR_Disable( level );
- if ( !(~api->signals_blocked &
- (api->signals_pending | _POSIX_signals_Pending)) ) {
- _ISR_Enable( level );
- return;
- }
- _ISR_Enable( level );
-
- for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
-
- if ( _POSIX_signals_Check_signal( api, signo, FALSE ) )
- goto restart;
-
- if ( _POSIX_signals_Check_signal( api, signo, TRUE ) )
- goto restart;
-
- }
-
-/* XXX - add __SIGFIRSTNOTRT or something like that to newlib siginfo.h */
-
- for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
-
- if ( _POSIX_signals_Check_signal( api, signo, FALSE ) )
- goto restart;
-
- if ( _POSIX_signals_Check_signal( api, signo, TRUE ) )
- goto restart;
-
- }
-
-}
-
-/*PAGE
- *
- * _POSIX_signals_Alarm_TSR
- */
-
-void _POSIX_signals_Alarm_TSR(
- Objects_Id id,
- void *argument
-)
-{
- int status;
-
- status = kill( getpid(), SIGALRM );
- /* XXX can't print from an ISR, should this be fatal? */
- assert( !status );
-}
-
-/*PAGE
- *
- * _POSIX_signals_Manager_Initialization
- */
-
-void _POSIX_signals_Manager_Initialization(
- int maximum_queued_signals
-)
-{
- unsigned32 signo;
-
- /*
- * Insure we have the same number of vectors and default vector entries
- */
-
- assert(
- sizeof(_POSIX_signals_Vectors) == sizeof(_POSIX_signals_Default_vectors)
- );
-
- memcpy(
- _POSIX_signals_Vectors,
- _POSIX_signals_Default_vectors,
- sizeof( _POSIX_signals_Vectors )
- );
-
- /*
- * Initialize the set of pending signals for the entire process
- */
-
- sigemptyset( &_POSIX_signals_Pending );
-
- /*
- * Initialize the timer used to implement alarm().
- */
-
- _Watchdog_Initialize(
- &_POSIX_signals_Alarm_timer,
- _POSIX_signals_Alarm_TSR,
- 0,
- NULL
- );
-
- /*
- * Initialize the queue we use to block for signals
- */
-
- _Thread_queue_Initialize(
- &_POSIX_signals_Wait_queue,
- OBJECTS_NO_CLASS,
- THREAD_QUEUE_DISCIPLINE_PRIORITY,
- STATES_WAITING_FOR_SIGNAL | STATES_INTERRUPTIBLE_BY_SIGNAL,
- NULL,
- EAGAIN
- );
-
- /* XXX status codes */
-
- /*
- * Allocate the siginfo pools.
- */
-
- for ( signo=1 ; signo<= SIGRTMAX ; signo++ )
- _Chain_Initialize_empty( &_POSIX_signals_Siginfo[ signo ] );
-
- _Chain_Initialize(
- &_POSIX_signals_Inactive_siginfo,
- _Workspace_Allocate_or_fatal_error(
- maximum_queued_signals * sizeof( POSIX_signals_Siginfo_node )
- ),
- maximum_queued_signals,
- sizeof( POSIX_signals_Siginfo_node )
- );
-}
diff --git a/cpukit/posix/src/psignalchecksignal.c b/cpukit/posix/src/psignalchecksignal.c
deleted file mode 100644
index f733994067..0000000000
--- a/cpukit/posix/src/psignalchecksignal.c
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * $Id$
- */
-
-#include <assert.h>
-#include <errno.h>
-#include <pthread.h>
-#include <signal.h>
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/tqdata.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/posix/seterr.h>
-#include <rtems/posix/threadsup.h>
-#include <rtems/posix/psignal.h>
-#include <rtems/posix/pthread.h>
-#include <rtems/posix/time.h>
-#include <stdio.h>
-
-
-/*PAGE
- *
- * _POSIX_signals_Check_signal
- */
-
-boolean _POSIX_signals_Check_signal(
- POSIX_API_Control *api,
- int signo,
- boolean is_global
-)
-{
- siginfo_t siginfo_struct;
- sigset_t saved_signals_blocked;
-
- if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
- is_global, TRUE ) )
- return FALSE;
-
- /*
- * Since we made a union of these, only one test is necessary but this is
- * safer.
- */
-
- assert( _POSIX_signals_Vectors[ signo ].sa_handler ||
- _POSIX_signals_Vectors[ signo ].sa_sigaction );
-
- /*
- * Just to prevent sending a signal which is currently being ignored.
- */
-
- if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN )
- return FALSE;
-
- /*
- * Block the signals requested in sa_mask
- */
-
- saved_signals_blocked = api->signals_blocked;
- api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
-
- /* Here, the signal handler function executes */
-
- switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
- case SA_SIGINFO:
-/*
- *
- * assert( is_global );
- */
- (*_POSIX_signals_Vectors[ signo ].sa_sigaction)(
- signo,
- &siginfo_struct,
- NULL /* context is undefined per 1003.1b-1993, p. 66 */
- );
- break;
- default:
- (*_POSIX_signals_Vectors[ signo ].sa_handler)( signo );
- break;
- }
-
- /*
- * Restore the previous set of blocked signals
- */
-
- api->signals_blocked = saved_signals_blocked;
-
- return TRUE;
-}
-
diff --git a/cpukit/posix/src/psignalclearprocesssignals.c b/cpukit/posix/src/psignalclearprocesssignals.c
deleted file mode 100644
index e182045462..0000000000
--- a/cpukit/posix/src/psignalclearprocesssignals.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * $Id$
- */
-
-#include <assert.h>
-#include <errno.h>
-#include <pthread.h>
-#include <signal.h>
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/tqdata.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/posix/seterr.h>
-#include <rtems/posix/threadsup.h>
-#include <rtems/posix/psignal.h>
-#include <rtems/posix/pthread.h>
-#include <rtems/posix/time.h>
-#include <stdio.h>
-
-/*PAGE
- *
- * _POSIX_signals_Clear_process_signals
- */
-
-void _POSIX_signals_Clear_process_signals(
- sigset_t mask
-)
-{
- ISR_Level level;
-
- _ISR_Disable( level );
- _POSIX_signals_Pending &= ~mask;
- if ( !_POSIX_signals_Pending )
- _Thread_Do_post_task_switch_extension--;
- _ISR_Enable( level );
-}
diff --git a/cpukit/posix/src/psignalclearsignals.c b/cpukit/posix/src/psignalclearsignals.c
deleted file mode 100644
index 4dc7d9cb02..0000000000
--- a/cpukit/posix/src/psignalclearsignals.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * $Id$
- */
-
-#include <assert.h>
-#include <errno.h>
-#include <pthread.h>
-#include <signal.h>
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/tqdata.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/posix/seterr.h>
-#include <rtems/posix/threadsup.h>
-#include <rtems/posix/psignal.h>
-#include <rtems/posix/pthread.h>
-#include <rtems/posix/time.h>
-#include <stdio.h>
-
-/*PAGE
- *
- * _POSIX_signals_Clear_signals
- */
-
-boolean _POSIX_signals_Clear_signals(
- POSIX_API_Control *api,
- int signo,
- siginfo_t *info,
- boolean is_global,
- boolean check_blocked
-)
-{
- sigset_t mask;
- sigset_t signals_blocked;
- ISR_Level level;
- boolean do_callout;
- POSIX_signals_Siginfo_node *psiginfo;
-
- mask = signo_to_mask( signo );
-
- do_callout = FALSE;
-
- /* set blocked signals based on if checking for them, SIGNAL_ALL_MASK
- * insures that no signals are blocked and all are checked.
- */
-
- if ( check_blocked )
- signals_blocked = ~api->signals_blocked;
- else
- signals_blocked = SIGNAL_ALL_MASK;
-
- /* XXX this is not right for siginfo type signals yet */
- /* XXX since they can't be cleared the same way */
-
- _ISR_Disable( level );
- if ( is_global ) {
- if ( mask & (_POSIX_signals_Pending & signals_blocked) ) {
- if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
- psiginfo = (POSIX_signals_Siginfo_node *)
- _Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] );
- if ( _Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
- _POSIX_signals_Clear_process_signals( mask );
- if ( psiginfo ) {
- *info = psiginfo->Info;
- _Chain_Append_unprotected(
- &_POSIX_signals_Inactive_siginfo,
- &psiginfo->Node
- );
- } else
- do_callout = FALSE;
- } else
- _POSIX_signals_Clear_process_signals( mask );
- do_callout = TRUE;
- }
- } else {
- if ( mask & (api->signals_pending & signals_blocked) ) {
- api->signals_pending &= ~mask;
- do_callout = TRUE;
- }
- }
- _ISR_Enable( level );
- return do_callout;
-}
diff --git a/cpukit/posix/src/psignalsetprocesssignals.c b/cpukit/posix/src/psignalsetprocesssignals.c
deleted file mode 100644
index 469735aef1..0000000000
--- a/cpukit/posix/src/psignalsetprocesssignals.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * $Id$
- */
-
-#include <assert.h>
-#include <errno.h>
-#include <pthread.h>
-#include <signal.h>
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/tqdata.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/posix/seterr.h>
-#include <rtems/posix/threadsup.h>
-#include <rtems/posix/psignal.h>
-#include <rtems/posix/pthread.h>
-#include <rtems/posix/time.h>
-#include <stdio.h>
-
-/*PAGE
- *
- * _POSIX_signals_Set_process_signals
- */
-
-void _POSIX_signals_Set_process_signals(
- sigset_t mask
-)
-{
- ISR_Level level;
-
- _ISR_Disable( level );
- if ( !_POSIX_signals_Pending )
- _Thread_Do_post_task_switch_extension++;
- _POSIX_signals_Pending |= mask;
- _ISR_Enable( level );
-}
diff --git a/cpukit/posix/src/psignalunblockthread.c b/cpukit/posix/src/psignalunblockthread.c
deleted file mode 100644
index 916ed4724e..0000000000
--- a/cpukit/posix/src/psignalunblockthread.c
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * $Id$
- */
-
-#include <assert.h>
-#include <errno.h>
-#include <pthread.h>
-#include <signal.h>
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/tqdata.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/posix/seterr.h>
-#include <rtems/posix/threadsup.h>
-#include <rtems/posix/psignal.h>
-#include <rtems/posix/pthread.h>
-#include <rtems/posix/time.h>
-#include <stdio.h>
-
-
-/*PAGE
- *
- * _POSIX_signals_Unblock_thread
- */
-
-/* XXX this routine could probably be cleaned up */
-boolean _POSIX_signals_Unblock_thread(
- Thread_Control *the_thread,
- int signo,
- siginfo_t *info
-)
-{
- POSIX_API_Control *api;
- sigset_t mask;
- siginfo_t *the_info = NULL;
-
- api = the_thread->API_Extensions[ THREAD_API_POSIX ];
-
- mask = signo_to_mask( signo );
-
- /*
- * Is the thread is specifically waiting for a signal?
- */
-
- if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
-
- if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
- the_thread->Wait.return_code = EINTR;
-
- the_info = (siginfo_t *) the_thread->Wait.return_argument;
-
- if ( !info ) {
- the_info->si_signo = signo;
- the_info->si_code = SI_USER;
- the_info->si_value.sival_int = 0;
- } else {
- *the_info = *info;
- }
-
- _Thread_queue_Extract_with_proxy( the_thread );
- return TRUE;
- }
-
- /*
- * This should only be reached via pthread_kill().
- */
-
- return FALSE;
- }
-
- if ( ~api->signals_blocked & mask ) {
- the_thread->do_post_task_switch_extension = TRUE;
-
- if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) {
- the_thread->Wait.return_code = EINTR;
- if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) )
- _Thread_queue_Extract_with_proxy( the_thread );
- else if ( _States_Is_delaying(the_thread->current_state)){
- if ( _Watchdog_Is_active( &the_thread->Timer ) )
- (void) _Watchdog_Remove( &the_thread->Timer );
- _Thread_Unblock( the_thread );
- }
- }
- }
- return FALSE;
-
-}
diff --git a/cpukit/posix/src/pthread.c b/cpukit/posix/src/pthread.c
deleted file mode 100644
index 49f6273a71..0000000000
--- a/cpukit/posix/src/pthread.c
+++ /dev/null
@@ -1,377 +0,0 @@
-/*
- * $Id$
- */
-
-#include <assert.h>
-#include <errno.h>
-#include <pthread.h>
-#include <limits.h>
-
-#include <rtems/system.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/stack.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/posix/cancel.h>
-#include <rtems/posix/pthread.h>
-#include <rtems/posix/priority.h>
-#include <rtems/posix/psignal.h>
-#include <rtems/posix/config.h>
-#include <rtems/posix/key.h>
-#include <rtems/posix/time.h>
-
-/*PAGE
- *
- * The default pthreads attributes structure.
- *
- * NOTE: Be careful .. if the default attribute set changes,
- * _POSIX_Threads_Initialize_user_threads will need to be examined.
- *
- */
-
-const pthread_attr_t _POSIX_Threads_Default_attributes = {
- TRUE, /* is_initialized */
- NULL, /* stackaddr */
- PTHREAD_MINIMUM_STACK_SIZE, /* stacksize */
- PTHREAD_SCOPE_PROCESS, /* contentionscope */
- PTHREAD_INHERIT_SCHED, /* inheritsched */
- SCHED_FIFO, /* schedpolicy */
- { /* schedparam */
- 2, /* sched_priority */
- 0, /* ss_low_priority */
- { 0L, 0 }, /* ss_replenish_period */
- { 0L, 0 } /* ss_initial_budget */
- },
- PTHREAD_CREATE_JOINABLE, /* detachstate */
- 1 /* cputime_clock_allowed */
-};
-
-/*PAGE
- *
- * _POSIX_Threads_Sporadic_budget_TSR
- */
-
-void _POSIX_Threads_Sporadic_budget_TSR(
- Objects_Id id,
- void *argument
-)
-{
- unsigned32 ticks;
- unsigned32 new_priority;
- Thread_Control *the_thread;
- POSIX_API_Control *api;
-
- the_thread = argument;
-
- api = the_thread->API_Extensions[ THREAD_API_POSIX ];
-
- ticks = _POSIX_Timespec_to_interval( &api->schedparam.ss_initial_budget );
-
- if ( !ticks )
- ticks = 1;
-
- the_thread->cpu_time_budget = ticks;
-
- new_priority = _POSIX_Priority_To_core( api->ss_high_priority );
- the_thread->real_priority = new_priority;
-
- if ( the_thread->resource_count == 0 ||
- the_thread->current_priority > new_priority )
- _Thread_Change_priority( the_thread, new_priority, TRUE );
-
- ticks = _POSIX_Timespec_to_interval( &api->schedparam.ss_replenish_period );
-
- if ( !ticks )
- ticks = 1;
-
- _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks );
-}
-
-/*PAGE
- *
- * _POSIX_Threads_Sporadic_budget_callout
- */
-
-void _POSIX_Threads_Sporadic_budget_callout(
- Thread_Control *the_thread
-)
-{
- POSIX_API_Control *api;
- unsigned32 new_priority;
-
- api = the_thread->API_Extensions[ THREAD_API_POSIX ];
-
- /*
- * This will prevent the thread from consuming its entire "budget"
- * while at low priority.
- */
-
-
- the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */
-
- new_priority = _POSIX_Priority_To_core( api->schedparam.ss_low_priority );
- the_thread->real_priority = new_priority;
-
- if ( the_thread->resource_count == 0 ||
- the_thread->current_priority > new_priority )
- _Thread_Change_priority( the_thread, new_priority, TRUE );
-}
-
-/*PAGE
- *
- * _POSIX_Threads_Create_extension
- *
- * XXX
- */
-
-boolean _POSIX_Threads_Create_extension(
- Thread_Control *executing,
- Thread_Control *created
-)
-{
- POSIX_API_Control *api;
- POSIX_API_Control *executing_api;
-
- api = _Workspace_Allocate( sizeof( POSIX_API_Control ) );
-
- if ( !api )
- return FALSE;
-
- created->API_Extensions[ THREAD_API_POSIX ] = api;
-
- /* XXX check all fields are touched */
- api->Attributes = _POSIX_Threads_Default_attributes;
- api->detachstate = _POSIX_Threads_Default_attributes.detachstate;
- api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy;
- api->schedparam = _POSIX_Threads_Default_attributes.schedparam;
- api->schedparam.sched_priority =
- _POSIX_Priority_From_core( created->current_priority );
-
- /*
- * POSIX 1003.1 1996, 18.2.2.2
- */
- api->cancelation_requested = 0;
- api->cancelability_state = PTHREAD_CANCEL_ENABLE;
- api->cancelability_type = PTHREAD_CANCEL_DEFERRED;
- _Chain_Initialize_empty (&api->Cancellation_Handlers);
-
- /*
- * If the thread is not a posix thread, then all posix signals are blocked
- * by default.
- */
-
- /* XXX use signal constants */
- api->signals_pending = 0;
- if ( _Objects_Get_class( created->Object.id ) == OBJECTS_POSIX_THREADS ) {
- executing_api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
- api->signals_blocked = api->signals_blocked;
- } else
- api->signals_blocked = 0xffffffff;
-
-/* XXX set signal parameters -- block all signals for non-posix threads */
-
- _Thread_queue_Initialize(
- &api->Join_List,
- OBJECTS_NO_CLASS, /* only used for proxy operations */
- THREAD_QUEUE_DISCIPLINE_FIFO,
- STATES_WAITING_FOR_JOIN_AT_EXIT,
- NULL, /* no extract proxy handler */
- 0
- );
-
- _Watchdog_Initialize(
- &api->Sporadic_timer,
- _POSIX_Threads_Sporadic_budget_TSR,
- created->Object.id,
- created
- );
-
- return TRUE;
-}
-
-/*PAGE
- *
- * _POSIX_Threads_Delete_extension
- */
-
-User_extensions_routine _POSIX_Threads_Delete_extension(
- Thread_Control *executing,
- Thread_Control *deleted
-)
-{
- Thread_Control *the_thread;
- POSIX_API_Control *api;
- void **value_ptr;
-
- api = deleted->API_Extensions[ THREAD_API_POSIX ];
-
- /* XXX run cancellation handlers */
-
- _POSIX_Keys_Run_destructors( deleted );
-
- /*
- * Wakeup all the tasks which joined with this one
- */
-
- value_ptr = (void **) deleted->Wait.return_argument;
-
- while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
- *(void **)the_thread->Wait.return_argument = value_ptr;
-
- if ( api->schedpolicy == SCHED_SPORADIC )
- (void) _Watchdog_Remove( &api->Sporadic_timer );
-
- deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
-
- (void) _Workspace_Free( api );
-}
-
-/*
- *
- * _POSIX_Threads_Exitted_extension
- */
-
-User_extensions_routine _POSIX_Threads_Exitted_extension(
- Thread_Control *executing
-)
-{
- pthread_exit( executing->Wait.return_argument );
-}
-
-/*PAGE
- *
- * _POSIX_Threads_Initialize_user_threads
- *
- * This routine creates and starts all configured user
- * initialzation threads.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- */
-
-void _POSIX_Threads_Initialize_user_threads( void )
-{
- int status;
- unsigned32 index;
- unsigned32 maximum;
- posix_initialization_threads_table *user_threads;
- pthread_t thread_id;
- pthread_attr_t attr;
-
- user_threads = _POSIX_Threads_User_initialization_threads;
- maximum = _POSIX_Threads_Number_of_initialization_threads;
-
- if ( !user_threads || maximum == 0 )
- return;
-
- /*
- * Be careful .. if the default attribute set changes, this may need to.
- *
- * Setting the attributes explicitly is critical, since we don't want
- * to inherit the idle tasks attributes.
- */
-
- for ( index=0 ; index < maximum ; index++ ) {
- status = pthread_attr_init( &attr );
- assert( !status );
-
- status = pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
- assert( !status );
-
- status = pthread_attr_setstacksize( &attr, user_threads[ index ].stack_size);
- assert( !status );
-
- status = pthread_create(
- &thread_id,
- &attr,
- user_threads[ index ].thread_entry,
- NULL
- );
- assert( !status );
- }
-}
-
-/*PAGE
- *
- * API Extension control structures
- */
-
-API_extensions_Control _POSIX_Threads_API_extensions = {
- { NULL, NULL },
- NULL, /* predriver */
- _POSIX_Threads_Initialize_user_threads, /* postdriver */
- _POSIX_signals_Post_switch_extension, /* post switch */
-};
-
-User_extensions_Control _POSIX_Threads_User_extensions = {
- { NULL, NULL },
- { _POSIX_Threads_Create_extension, /* create */
- NULL, /* start */
- NULL, /* restart */
- _POSIX_Threads_Delete_extension, /* delete */
- NULL, /* switch */
- NULL, /* begin */
- _POSIX_Threads_Exitted_extension, /* exitted */
- NULL /* fatal */
- }
-};
-
-/*PAGE
- *
- * _POSIX_Threads_Manager_initialization
- *
- * This routine initializes all threads manager related data structures.
- *
- * Input parameters:
- * maximum_pthreads - maximum configured pthreads
- *
- * Output parameters: NONE
- */
-
-void _POSIX_Threads_Manager_initialization(
- unsigned32 maximum_pthreads,
- unsigned32 number_of_initialization_threads,
- posix_initialization_threads_table *user_threads
-
-)
-{
- _POSIX_Threads_Number_of_initialization_threads =
- number_of_initialization_threads;
- _POSIX_Threads_User_initialization_threads = user_threads;
-
- /*
- * There may not be any POSIX initialization threads configured.
- */
-
-#if 0
- if ( user_threads == NULL || number_of_initialization_threads == 0 )
- _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, TRUE, EINVAL );
-#endif
-
- _Objects_Initialize_information(
- &_POSIX_Threads_Information,
- OBJECTS_POSIX_THREADS,
- FALSE, /* does not support global */
- maximum_pthreads,
- sizeof( Thread_Control ),
- TRUE,
- 5, /* length is arbitrary for now */
- TRUE /* this class is threads */
- );
-
- /*
- * Add all the extensions for this API
- */
-
- _User_extensions_Add_API_set( &_POSIX_Threads_User_extensions );
-
- _API_extensions_Add( &_POSIX_Threads_API_extensions );
-
- /*
- * If we supported MP, then here we would ...
- * Register the MP Process Packet routine.
- */
-
-}
diff --git a/cpukit/posix/src/pthreadatfork.c b/cpukit/posix/src/pthreadatfork.c
deleted file mode 100644
index 07364b2195..0000000000
--- a/cpukit/posix/src/pthreadatfork.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * pthread_atfork() - POSIX 1003.1b 3.1.3
- *
- * 3.1.3 Register Fork Handlers, P1003.1c/Draft 10, P1003.1c/Draft 10, p. 27
- *
- * RTEMS does not support processes, so we fall under this and do not
- * provide this routine:
- *
- * "Either the implementation shall support the pthread_atfork() function
- * as described above or the pthread_atfork() funciton shall not be
- * provided."
- *
- * $Id$
- */
-
-#include <sys/types.h>
-#include <errno.h>
-
-int pthread_atfork(
- void (*prepare)(void),
- void (*parent)(void),
- void (*child)(void)
-)
-{
- errno = ENOSYS;
- return -1;
-}
diff --git a/cpukit/posix/src/pthreadattrdestroy.c b/cpukit/posix/src/pthreadattrdestroy.c
deleted file mode 100644
index be30152520..0000000000
--- a/cpukit/posix/src/pthreadattrdestroy.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 16.1.1 Thread Creation Attributes, P1003.1c/Draft 10, p, 140
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <pthread.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-
-int pthread_attr_destroy(
- pthread_attr_t *attr
-)
-{
- if ( !attr || !attr->is_initialized )
- return EINVAL;
-
- attr->is_initialized = FALSE;
- return 0;
-}
diff --git a/cpukit/posix/src/pthreadattrgetdetachstate.c b/cpukit/posix/src/pthreadattrgetdetachstate.c
deleted file mode 100644
index 244e902144..0000000000
--- a/cpukit/posix/src/pthreadattrgetdetachstate.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 16.1.1 Thread Creation Attributes, P1003.1c/Draft 10, p, 140
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <pthread.h>
-#include <errno.h>
-
-int pthread_attr_getdetachstate(
- const pthread_attr_t *attr,
- int *detachstate
-)
-{
- if ( !attr || !attr->is_initialized || !detachstate )
- return EINVAL;
-
- *detachstate = attr->detachstate;
- return 0;
-}
-
diff --git a/cpukit/posix/src/pthreadattrgetinheritsched.c b/cpukit/posix/src/pthreadattrgetinheritsched.c
deleted file mode 100644
index 6b68093be2..0000000000
--- a/cpukit/posix/src/pthreadattrgetinheritsched.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 13.5.1 Thread Creation Scheduling Attributes, P1003.1c/Draft 10, p. 120
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <pthread.h>
-#include <errno.h>
-
-int pthread_attr_getinheritsched(
- const pthread_attr_t *attr,
- int *inheritsched
-)
-{
- if ( !attr || !attr->is_initialized || !inheritsched )
- return EINVAL;
-
- *inheritsched = attr->inheritsched;
- return 0;
-}
-
diff --git a/cpukit/posix/src/pthreadattrgetschedparam.c b/cpukit/posix/src/pthreadattrgetschedparam.c
deleted file mode 100644
index 91da6b3c80..0000000000
--- a/cpukit/posix/src/pthreadattrgetschedparam.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * 13.5.1 Thread Creation Scheduling Attributes, P1003.1c/Draft 10, p. 120
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <pthread.h>
-#include <errno.h>
-
-int pthread_attr_getschedparam(
- const pthread_attr_t *attr,
- struct sched_param *param
-)
-{
- if ( !attr || !attr->is_initialized || !param )
- return EINVAL;
-
- *param = attr->schedparam;
- return 0;
-}
diff --git a/cpukit/posix/src/pthreadattrgetschedpolicy.c b/cpukit/posix/src/pthreadattrgetschedpolicy.c
deleted file mode 100644
index 2fd6df4851..0000000000
--- a/cpukit/posix/src/pthreadattrgetschedpolicy.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 13.5.1 Thread Creation Scheduling Parameters, P1003.1c/Draft 10, p. 120
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <pthread.h>
-#include <errno.h>
-
-int pthread_attr_getschedpolicy(
- const pthread_attr_t *attr,
- int *policy
-)
-{
- if ( !attr || !attr->is_initialized || !policy )
- return EINVAL;
-
- *policy = attr->schedpolicy;
- return 0;
-}
-
diff --git a/cpukit/posix/src/pthreadattrgetscope.c b/cpukit/posix/src/pthreadattrgetscope.c
deleted file mode 100644
index 9bf459fdf5..0000000000
--- a/cpukit/posix/src/pthreadattrgetscope.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * 13.5.1 Thread Creation Scheduling Attributes, P1003.1c/Draft 10, p. 120
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <pthread.h>
-#include <errno.h>
-
-int pthread_attr_getscope(
- const pthread_attr_t *attr,
- int *contentionscope
-)
-{
- if ( !attr || !attr->is_initialized || !contentionscope )
- return EINVAL;
-
- *contentionscope = attr->contentionscope;
- return 0;
-}
diff --git a/cpukit/posix/src/pthreadattrgetstackaddr.c b/cpukit/posix/src/pthreadattrgetstackaddr.c
deleted file mode 100644
index 07642796c0..0000000000
--- a/cpukit/posix/src/pthreadattrgetstackaddr.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * 16.1.1 Thread Creation Attributes, P1003.1c/Draft 10, p, 140
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <pthread.h>
-#include <errno.h>
-
-int pthread_attr_getstackaddr(
- const pthread_attr_t *attr,
- void **stackaddr
-)
-{
- if ( !attr || !attr->is_initialized || !stackaddr )
- return EINVAL;
-
- *stackaddr = attr->stackaddr;
- return 0;
-}
diff --git a/cpukit/posix/src/pthreadattrgetstacksize.c b/cpukit/posix/src/pthreadattrgetstacksize.c
deleted file mode 100644
index d160fe51b1..0000000000
--- a/cpukit/posix/src/pthreadattrgetstacksize.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * 16.1.1 Thread Creation Attributes, P1003.1c/Draft 10, p, 140
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <pthread.h>
-#include <errno.h>
-
-int pthread_attr_getstacksize(
- const pthread_attr_t *attr,
- size_t *stacksize
-)
-{
- if ( !attr || !attr->is_initialized || !stacksize )
- return EINVAL;
-
- *stacksize = attr->stacksize;
- return 0;
-}
diff --git a/cpukit/posix/src/pthreadattrinit.c b/cpukit/posix/src/pthreadattrinit.c
deleted file mode 100644
index a70bd97eaf..0000000000
--- a/cpukit/posix/src/pthreadattrinit.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * 16.1.1 Thread Creation Attributes, P1003.1c/Draft 10, p, 140
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <pthread.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
-
-int pthread_attr_init(
- pthread_attr_t *attr
-)
-{
- if ( !attr )
- return EINVAL;
-
- *attr = _POSIX_Threads_Default_attributes;
- return 0;
-}
diff --git a/cpukit/posix/src/pthreadattrsetdetachstate.c b/cpukit/posix/src/pthreadattrsetdetachstate.c
deleted file mode 100644
index 74482d2507..0000000000
--- a/cpukit/posix/src/pthreadattrsetdetachstate.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * 16.1.1 Thread Creation Attributes, P1003.1c/Draft 10, p, 140
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <pthread.h>
-#include <errno.h>
-
-int pthread_attr_setdetachstate(
- pthread_attr_t *attr,
- int detachstate
-)
-{
- if ( !attr || !attr->is_initialized )
- return EINVAL;
-
- switch ( detachstate ) {
- case PTHREAD_CREATE_DETACHED:
- case PTHREAD_CREATE_JOINABLE:
- attr->detachstate = detachstate;
- return 0;
-
- default:
- return EINVAL;
- }
-}
diff --git a/cpukit/posix/src/pthreadattrsetinheritsched.c b/cpukit/posix/src/pthreadattrsetinheritsched.c
deleted file mode 100644
index a44f887cde..0000000000
--- a/cpukit/posix/src/pthreadattrsetinheritsched.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * 13.5.1 Thread Creation Scheduling Attributes, P1003.1c/Draft 10, p. 120
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <pthread.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
-
-int pthread_attr_setinheritsched(
- pthread_attr_t *attr,
- int inheritsched
-)
-{
- if ( !attr || !attr->is_initialized )
- return EINVAL;
-
- switch ( inheritsched ) {
- case PTHREAD_INHERIT_SCHED:
- case PTHREAD_EXPLICIT_SCHED:
- attr->inheritsched = inheritsched;
- return 0;
-
- default:
- return ENOTSUP;
- }
-}
diff --git a/cpukit/posix/src/pthreadattrsetschedparam.c b/cpukit/posix/src/pthreadattrsetschedparam.c
deleted file mode 100644
index 3c9a3c0644..0000000000
--- a/cpukit/posix/src/pthreadattrsetschedparam.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * 13.5.1 Thread Creation Scheduling Parameters, P1003.1c/Draft 10, p. 120
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <pthread.h>
-#include <errno.h>
-
-int pthread_attr_setschedparam(
- pthread_attr_t *attr,
- const struct sched_param *param
-)
-{
- if ( !attr || !attr->is_initialized || !param )
- return EINVAL;
-
- attr->schedparam = *param;
- return 0;
-}
diff --git a/cpukit/posix/src/pthreadattrsetschedpolicy.c b/cpukit/posix/src/pthreadattrsetschedpolicy.c
deleted file mode 100644
index e13ef77263..0000000000
--- a/cpukit/posix/src/pthreadattrsetschedpolicy.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * 13.5.1 Thread Creation Scheduling Attributes, P1003.1c/Draft 10, p. 120
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <pthread.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
-
-int pthread_attr_setschedpolicy(
- pthread_attr_t *attr,
- int policy
-)
-{
- if ( !attr || !attr->is_initialized )
- return EINVAL;
-
- switch ( policy ) {
- case SCHED_OTHER:
- case SCHED_FIFO:
- case SCHED_RR:
- case SCHED_SPORADIC:
- attr->schedpolicy = policy;
- return 0;
-
- default:
- return ENOTSUP;
- }
-}
diff --git a/cpukit/posix/src/pthreadattrsetscope.c b/cpukit/posix/src/pthreadattrsetscope.c
deleted file mode 100644
index 0adc6181f7..0000000000
--- a/cpukit/posix/src/pthreadattrsetscope.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * 13.5.1 Thread Creation Scheduling Attributes, P1003.1c/Draft 10, p. 120
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <pthread.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
-
-int pthread_attr_setscope(
- pthread_attr_t *attr,
- int contentionscope
-)
-{
- if ( !attr || !attr->is_initialized )
- return EINVAL;
-
- switch ( contentionscope ) {
- case PTHREAD_SCOPE_PROCESS:
- attr->contentionscope = contentionscope;
- return 0;
-
- case PTHREAD_SCOPE_SYSTEM:
- return ENOTSUP;
-
- default:
- return EINVAL;
- }
-}
diff --git a/cpukit/posix/src/pthreadattrsetstackaddr.c b/cpukit/posix/src/pthreadattrsetstackaddr.c
deleted file mode 100644
index d8cf5fd807..0000000000
--- a/cpukit/posix/src/pthreadattrsetstackaddr.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * 16.1.1 Thread Creation Attributes, P1003.1c/Draft 10, p, 140
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <pthread.h>
-#include <errno.h>
-
-int pthread_attr_setstackaddr(
- pthread_attr_t *attr,
- void *stackaddr
-)
-{
- if ( !attr || !attr->is_initialized )
- return EINVAL;
-
- attr->stackaddr = stackaddr;
- return 0;
-}
diff --git a/cpukit/posix/src/pthreadattrsetstacksize.c b/cpukit/posix/src/pthreadattrsetstacksize.c
deleted file mode 100644
index 19696fd664..0000000000
--- a/cpukit/posix/src/pthreadattrsetstacksize.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * 16.1.1 Thread Creation Attributes, P1003.1c/Draft 10, p, 140
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
-
-int pthread_attr_setstacksize(
- pthread_attr_t *attr,
- size_t stacksize
-)
-{
- if ( !attr || !attr->is_initialized )
- return EINVAL;
-
- if (stacksize < PTHREAD_MINIMUM_STACK_SIZE)
- attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE;
- else
- attr->stacksize = stacksize;
- return 0;
-}
diff --git a/cpukit/posix/src/pthreadcreate.c b/cpukit/posix/src/pthreadcreate.c
deleted file mode 100644
index b4e4788f2e..0000000000
--- a/cpukit/posix/src/pthreadcreate.c
+++ /dev/null
@@ -1,249 +0,0 @@
-/*
- * 16.1.2 Thread Creation, P1003.1c/Draft 10, p. 144
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/score/thread.h>
-#include <rtems/posix/pthread.h>
-#include <rtems/posix/priority.h>
-#include <rtems/posix/time.h>
-
-int pthread_create(
- pthread_t *thread,
- const pthread_attr_t *attr,
- void *(*start_routine)( void * ),
- void *arg
-)
-{
- const pthread_attr_t *the_attr;
- Priority_Control core_priority;
- Thread_CPU_budget_algorithms budget_algorithm;
- Thread_CPU_budget_algorithm_callout budget_callout;
- boolean is_fp;
- boolean status;
- Thread_Control *the_thread;
- char *default_name = "psx";
- POSIX_API_Control *api;
- int schedpolicy = SCHED_RR;
- struct sched_param schedparam;
-
- the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
-
- if ( !the_attr->is_initialized )
- return EINVAL;
-
- /*
- * Core Thread Initialize insures we get the minimum amount of
- * stack space if it is allowed to allocate it itself.
- */
-
- if ( the_attr->stackaddr && !_Stack_Is_enough( the_attr->stacksize ) )
- return EINVAL;
-
-#if 0
- int cputime_clock_allowed; /* see time.h */
- POSIX_NOT_IMPLEMENTED();
-#endif
-
- /*
- * P1003.1c/Draft 10, p. 121.
- *
- * If inheritsched is set to PTHREAD_INHERIT_SCHED, then this thread
- * inherits scheduling attributes from the creating thread. If it is
- * PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the
- * attributes structure.
- */
-
- switch ( the_attr->inheritsched ) {
- case PTHREAD_INHERIT_SCHED:
- api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
- schedpolicy = api->schedpolicy;
- schedparam = api->schedparam;
- break;
-
- case PTHREAD_EXPLICIT_SCHED:
- schedpolicy = the_attr->schedpolicy;
- schedparam = the_attr->schedparam;
- break;
-
- default:
- return EINVAL;
- }
-
- /*
- * Check the contentionscope since rtems only supports PROCESS wide
- * contention (i.e. no system wide contention).
- */
-
- if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS )
- return ENOTSUP;
-
- /*
- * Interpret the scheduling parameters.
- */
-
- if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
- return EINVAL;
-
- core_priority = _POSIX_Priority_To_core( schedparam.sched_priority );
-
- /*
- * Set the core scheduling policy information.
- */
-
- budget_callout = NULL;
- budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
-
- switch ( schedpolicy ) {
- case SCHED_OTHER:
- budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
- break;
-
- case SCHED_FIFO:
- budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
- break;
-
- case SCHED_RR:
- budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
- break;
-
- case SCHED_SPORADIC:
- budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
- budget_callout = _POSIX_Threads_Sporadic_budget_callout;
-
- if ( _POSIX_Timespec_to_interval( &schedparam.ss_replenish_period ) <
- _POSIX_Timespec_to_interval( &schedparam.ss_initial_budget ) )
- return EINVAL;
-
- if ( !_POSIX_Priority_Is_valid( schedparam.ss_low_priority ) )
- return EINVAL;
-
- break;
-
- default:
- return EINVAL;
- }
-
- /*
- * Currently all POSIX threads are floating point if the hardware
- * supports it.
- */
-
- is_fp = CPU_HARDWARE_FP;
-
- /*
- * Disable dispatch for protection
- */
-
- _Thread_Disable_dispatch();
-
- /*
- * Allocate the thread control block.
- *
- * NOTE: Global threads are not currently supported.
- */
-
- the_thread = _POSIX_Threads_Allocate();
-
- if ( !the_thread ) {
- _Thread_Enable_dispatch();
- return EAGAIN;
- }
-
- /*
- * Initialize the core thread for this task.
- */
-
- status = _Thread_Initialize(
- &_POSIX_Threads_Information,
- the_thread,
- the_attr->stackaddr,
- the_attr->stacksize,
- is_fp,
- core_priority,
- TRUE, /* preemptible */
- budget_algorithm,
- budget_callout,
- 0, /* isr level */
- &default_name /* posix threads don't have a name */
- );
-
- if ( !status ) {
- _POSIX_Threads_Free( the_thread );
- _Thread_Enable_dispatch();
- return EAGAIN;
- }
-
- /*
- * finish initializing the per API structure
- */
-
-
- api = the_thread->API_Extensions[ THREAD_API_POSIX ];
-
- api->Attributes = *the_attr;
- api->detachstate = the_attr->detachstate;
- api->schedpolicy = schedpolicy;
- api->schedparam = schedparam;
-
- /*
- * This insures we evaluate the process-wide signals pending when we
- * first run.
- *
- * NOTE: Since the thread starts with all unblocked, this is necessary.
- */
-
- the_thread->do_post_task_switch_extension = TRUE;
-
- /*
- * POSIX threads are allocated and started in one operation.
- */
-
- status = _Thread_Start(
- the_thread,
- THREAD_START_POINTER,
- start_routine,
- arg,
- 0 /* unused */
- );
-
- if ( schedpolicy == SCHED_SPORADIC ) {
- _Watchdog_Insert_ticks(
- &api->Sporadic_timer,
- _POSIX_Timespec_to_interval( &api->schedparam.ss_replenish_period )
- );
- }
-
- /*
- * _Thread_Start only fails if the thread was in the incorrect state
- */
-
- if ( !status ) {
- _POSIX_Threads_Free( the_thread );
- _Thread_Enable_dispatch();
- return EINVAL;
- }
-
- /*
- * Return the id and indicate we successfully created the thread
- */
-
- *thread = the_thread->Object.id;
-
- _Thread_Enable_dispatch();
-
- return 0;
-}
-
diff --git a/cpukit/posix/src/pthreaddetach.c b/cpukit/posix/src/pthreaddetach.c
deleted file mode 100644
index aa3e2054d5..0000000000
--- a/cpukit/posix/src/pthreaddetach.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * 16.1.4 Detaching a Thread, P1003.1c/Draft 10, p. 149
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <pthread.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/score/thread.h>
-#include <rtems/posix/pthread.h>
-
-int pthread_detach(
- pthread_t thread
-)
-{
- register Thread_Control *the_thread;
- POSIX_API_Control *api;
- Objects_Locations location;
-
- the_thread = _POSIX_Threads_Get( thread, &location );
- switch ( location ) {
- case OBJECTS_ERROR:
- case OBJECTS_REMOTE:
- return ESRCH;
- case OBJECTS_LOCAL:
-
- api = the_thread->API_Extensions[ THREAD_API_POSIX ];
- api->detachstate = PTHREAD_CREATE_DETACHED;
- _Thread_Enable_dispatch();
- return 0;
- }
-
- return POSIX_BOTTOM_REACHED();
-}
-
diff --git a/cpukit/posix/src/pthreadequal.c b/cpukit/posix/src/pthreadequal.c
deleted file mode 100644
index 60bd0ba2ad..0000000000
--- a/cpukit/posix/src/pthreadequal.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * 16.1.7 Compare Thread IDs, p1003.1c/Draft 10, p. 153
- *
- * NOTE: POSIX does not define the behavior when either thread id is invalid.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
-#include <rtems/score/thread.h>
-
-int pthread_equal(
- pthread_t t1,
- pthread_t t2
-)
-{
- /*
- * If the system is configured for debug, then we will do everything we
- * can to insure that both ids are valid. Otherwise, we will do the
- * cheapest possible thing to determine if they are equal.
- */
-
-#ifndef RTEMS_DEBUG
- return _Objects_Are_ids_equal( t1, t2 );
-#else
- int status;
- Objects_Locations location;
-
- /*
- * By default this is not a match.
- */
-
- status = 0;
-
- /*
- * Validate the first id and return 0 if it is not valid
- */
-
- (void) _POSIX_Threads_Get( t1, &location );
- switch ( location ) {
- case OBJECTS_ERROR:
- case OBJECTS_REMOTE:
- break;
-
- case OBJECTS_LOCAL:
-
- /*
- * Validate the second id and return 0 if it is not valid
- */
-
- (void) _POSIX_Threads_Get( t2, &location );
- switch ( location ) {
- case OBJECTS_ERROR:
- case OBJECTS_REMOTE:
- break;
- case OBJECTS_LOCAL:
- status = _Objects_Are_ids_equal( t1, t2 );
- break;
- }
- _Thread_Unnest_dispatch();
- break;
- }
-
- _Thread_Enable_dispatch();
- return status;
-#endif
-}
-
diff --git a/cpukit/posix/src/pthreadexit.c b/cpukit/posix/src/pthreadexit.c
deleted file mode 100644
index a4a2281e16..0000000000
--- a/cpukit/posix/src/pthreadexit.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 16.1.5.1 Thread Termination, p1003.1c/Draft 10, p. 150
- *
- * NOTE: Key destructors are executed in the POSIX api delete extension.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <pthread.h>
-#include <errno.h>
-#include <assert.h>
-
-#include <rtems/system.h>
-#include <rtems/score/thread.h>
-#include <rtems/posix/pthread.h>
-
-void pthread_exit(
- void *value_ptr
-)
-{
- Objects_Information *the_information;
-
- the_information = _Objects_Get_information( _Thread_Executing->Object.id );
-
- /* This should never happen if _Thread_Get() works right */
- assert( the_information );
-
- _Thread_Disable_dispatch();
-
- _Thread_Executing->Wait.return_argument = (unsigned32 *)value_ptr;
-
- _Thread_Close( the_information, _Thread_Executing );
-
- _POSIX_Threads_Free( _Thread_Executing );
-
- _Thread_Enable_dispatch();
-}
-
diff --git a/cpukit/posix/src/pthreadgetcpuclockid.c b/cpukit/posix/src/pthreadgetcpuclockid.c
deleted file mode 100644
index f7d9553522..0000000000
--- a/cpukit/posix/src/pthreadgetcpuclockid.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * 20.1.6 Accessing a Thread CPU-time Clock, P1003.4b/Draft 8, p. 58
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-#include <errno.h>
-
-int pthread_getcpuclockid(
- pthread_t pid,
- clockid_t *clock_id
-)
-{
- return POSIX_NOT_IMPLEMENTED();
-}
-
diff --git a/cpukit/posix/src/pthreadgetcputime.c b/cpukit/posix/src/pthreadgetcputime.c
deleted file mode 100644
index 2dc56a2526..0000000000
--- a/cpukit/posix/src/pthreadgetcputime.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * 20.1.7 CPU-time Clock Thread Creation Attribute, P1003.4b/Draft 8, p. 59
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-#include <errno.h>
-
-int pthread_attr_getcputime(
- pthread_attr_t *attr,
- int *clock_allowed
-)
-{
- if ( !attr || !attr->is_initialized || !clock_allowed )
- return EINVAL;
-
- *clock_allowed = attr->cputime_clock_allowed;
- return 0;
-}
-
diff --git a/cpukit/posix/src/pthreadgetschedparam.c b/cpukit/posix/src/pthreadgetschedparam.c
deleted file mode 100644
index 258734bc5d..0000000000
--- a/cpukit/posix/src/pthreadgetschedparam.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * 13.5.2 Dynamic Thread Scheduling Parameters Access,
- * P1003.1c/Draft 10, p. 124
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <pthread.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
-#include <rtems/posix/priority.h>
-
-int pthread_getschedparam(
- pthread_t thread,
- int *policy,
- struct sched_param *param
-)
-{
- Objects_Locations location;
- POSIX_API_Control *api;
- register Thread_Control *the_thread;
-
- if ( !policy || !param )
- return EINVAL;
-
- the_thread = _POSIX_Threads_Get( thread, &location );
- switch ( location ) {
- case OBJECTS_ERROR:
- case OBJECTS_REMOTE:
- return ESRCH;
- case OBJECTS_LOCAL:
- api = the_thread->API_Extensions[ THREAD_API_POSIX ];
- *policy = api->schedpolicy;
- *param = api->schedparam;
- param->sched_priority =
- _POSIX_Priority_From_core( the_thread->current_priority );
- _Thread_Enable_dispatch();
- return 0;
- }
-
- return POSIX_BOTTOM_REACHED();
-
-}
diff --git a/cpukit/posix/src/pthreadjoin.c b/cpukit/posix/src/pthreadjoin.c
deleted file mode 100644
index 491e2406e6..0000000000
--- a/cpukit/posix/src/pthreadjoin.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * 16.1.3 Wait for Thread Termination, P1003.1c/Draft 10, p. 147
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <pthread.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/score/thread.h>
-#include <rtems/posix/pthread.h>
-
-int pthread_join(
- pthread_t thread,
- void **value_ptr
-)
-{
- register Thread_Control *the_thread;
- POSIX_API_Control *api;
- Objects_Locations location;
- void *return_pointer;
-
- the_thread = _POSIX_Threads_Get( thread, &location );
- switch ( location ) {
- case OBJECTS_ERROR:
- case OBJECTS_REMOTE:
- return ESRCH;
- case OBJECTS_LOCAL:
- api = the_thread->API_Extensions[ THREAD_API_POSIX ];
-
- if ( api->detachstate == PTHREAD_CREATE_DETACHED ) {
- _Thread_Enable_dispatch();
- return EINVAL;
- }
-
- if ( _Thread_Is_executing( the_thread ) ) {
- _Thread_Enable_dispatch();
- return EDEADLK;
- }
-
- /*
- * Put ourself on the threads join list
- */
-
- _Thread_Executing->Wait.return_argument = (unsigned32 *) &return_pointer;
-
- _Thread_queue_Enter_critical_section( &api->Join_List );
-
- _Thread_queue_Enqueue( &api->Join_List, WATCHDOG_NO_TIMEOUT );
-
- _Thread_Enable_dispatch();
-
- if ( value_ptr )
- *value_ptr = return_pointer;
- return 0;
- }
-
- return POSIX_BOTTOM_REACHED();
-}
-
diff --git a/cpukit/posix/src/pthreadkill.c b/cpukit/posix/src/pthreadkill.c
deleted file mode 100644
index 6ddd1d6138..0000000000
--- a/cpukit/posix/src/pthreadkill.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * 3.3.10 Send a Signal to a Thread, P1003.1c/D10, p. 43
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <pthread.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
-#include <rtems/posix/psignal.h>
-#include <rtems/score/isr.h>
-#include <rtems/posix/seterr.h>
-
-int pthread_kill(
- pthread_t thread,
- int sig
-)
-{
- POSIX_API_Control *api;
- Thread_Control *the_thread;
- Objects_Locations location;
-
- if ( sig && !is_valid_signo(sig) )
- set_errno_and_return_minus_one( EINVAL );
-
-/* commented out when posix timers added
- if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO )
- set_errno_and_return_minus_one( ENOSYS );
-*/
-
- the_thread = _POSIX_Threads_Get( thread, &location );
- switch ( location ) {
- case OBJECTS_ERROR:
- case OBJECTS_REMOTE:
- set_errno_and_return_minus_one( ESRCH );
- case OBJECTS_LOCAL:
- /*
- * If sig == 0 then just validate arguments
- */
-
- api = the_thread->API_Extensions[ THREAD_API_POSIX ];
-
- if ( sig ) {
-
- if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
- _Thread_Enable_dispatch();
- return 0;
- }
-
- /* XXX critical section */
-
- api->signals_pending |= signo_to_mask( sig );
-
- (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
-
- the_thread->do_post_task_switch_extension = TRUE;
-
- if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
- _ISR_Signals_to_thread_executing = TRUE;
- }
- _Thread_Enable_dispatch();
- return 0;
- }
-
- return POSIX_BOTTOM_REACHED();
-}
diff --git a/cpukit/posix/src/pthreadonce.c b/cpukit/posix/src/pthreadonce.c
deleted file mode 100644
index 49b3f31bc4..0000000000
--- a/cpukit/posix/src/pthreadonce.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * 16.1.8 Dynamic Package Initialization, P1003.1c/Draft 10, p. 154
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/score/thread.h>
-
-int pthread_once(
- pthread_once_t *once_control,
- void (*init_routine)(void)
-)
-{
- if ( !once_control || !init_routine )
- return EINVAL;
-
- _Thread_Disable_dispatch();
-
- if ( !once_control->init_executed ) {
- once_control->is_initialized = TRUE;
- once_control->init_executed = TRUE;
- (*init_routine)();
- }
-
- _Thread_Enable_dispatch();
- return 0;
-}
-
diff --git a/cpukit/posix/src/pthreadself.c b/cpukit/posix/src/pthreadself.c
deleted file mode 100644
index 838a7d3b8c..0000000000
--- a/cpukit/posix/src/pthreadself.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * 16.1.6 Get Calling Thread's ID, p1003.1c/Draft 10, p. 152
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <pthread.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/score/thread.h>
-
-pthread_t pthread_self( void )
-{
- return _Thread_Executing->Object.id;
-}
diff --git a/cpukit/posix/src/pthreadsetcputime.c b/cpukit/posix/src/pthreadsetcputime.c
deleted file mode 100644
index 866a324f0e..0000000000
--- a/cpukit/posix/src/pthreadsetcputime.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * 20.1.7 CPU-time Clock Thread Creation Attribute, P1003.4b/Draft 8, p. 59
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-#include <errno.h>
-
-int pthread_attr_setcputime(
- pthread_attr_t *attr,
- int clock_allowed
-)
-{
- if ( !attr || !attr->is_initialized )
- return EINVAL;
-
- switch ( clock_allowed ) {
- case CLOCK_ENABLED:
- case CLOCK_DISABLED:
- attr->cputime_clock_allowed = clock_allowed;
- return 0;
-
- default:
- return EINVAL;
- }
-}
-
diff --git a/cpukit/posix/src/pthreadsetschedparam.c b/cpukit/posix/src/pthreadsetschedparam.c
deleted file mode 100644
index 62ec3d888d..0000000000
--- a/cpukit/posix/src/pthreadsetschedparam.c
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * 13.5.2 Dynamic Thread Scheduling Parameters Access,
- * P1003.1c/Draft 10, p. 124
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <pthread.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
-#include <rtems/posix/priority.h>
-#include <rtems/posix/time.h>
-
-int pthread_setschedparam(
- pthread_t thread,
- int policy,
- struct sched_param *param
-)
-{
- register Thread_Control *the_thread;
- POSIX_API_Control *api;
- Thread_CPU_budget_algorithms budget_algorithm;
- Thread_CPU_budget_algorithm_callout budget_callout;
- Objects_Locations location;
-
- /*
- * Check all the parameters
- */
-
- if ( !param )
- return EINVAL;
-
- if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
- return EINVAL;
-
- budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
- budget_callout = NULL;
-
- switch ( policy ) {
- case SCHED_OTHER:
- budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
- break;
-
- case SCHED_FIFO:
- budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
- break;
-
- case SCHED_RR:
- budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
- break;
-
- case SCHED_SPORADIC:
- budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
- budget_callout = _POSIX_Threads_Sporadic_budget_callout;
-
- if ( _POSIX_Timespec_to_interval( &param->ss_replenish_period ) <
- _POSIX_Timespec_to_interval( &param->ss_initial_budget ) )
- return EINVAL;
-
- if ( !_POSIX_Priority_Is_valid( param->ss_low_priority ) )
- return EINVAL;
-
- break;
-
- default:
- return EINVAL;
- }
-
- /*
- * Actually change the scheduling policy and parameters
- */
-
- the_thread = _POSIX_Threads_Get( thread, &location );
- switch ( location ) {
- case OBJECTS_ERROR:
- case OBJECTS_REMOTE:
- return ESRCH;
- case OBJECTS_LOCAL:
- api = the_thread->API_Extensions[ THREAD_API_POSIX ];
-
- if ( api->schedpolicy == SCHED_SPORADIC )
- (void) _Watchdog_Remove( &api->Sporadic_timer );
-
- api->schedpolicy = policy;
- api->schedparam = *param;
- the_thread->budget_algorithm = budget_algorithm;
- the_thread->budget_callout = budget_callout;
-
- switch ( api->schedpolicy ) {
- case SCHED_OTHER:
- case SCHED_FIFO:
- case SCHED_RR:
- the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
-
- the_thread->real_priority =
- _POSIX_Priority_To_core( api->schedparam.sched_priority );
-
- _Thread_Change_priority(
- the_thread,
- the_thread->real_priority,
- TRUE
- );
- break;
-
- case SCHED_SPORADIC:
- api->ss_high_priority = api->schedparam.sched_priority;
- _Watchdog_Remove( &api->Sporadic_timer );
- _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
- break;
- }
-
- _Thread_Enable_dispatch();
- return 0;
- }
- return POSIX_BOTTOM_REACHED();
-}
diff --git a/cpukit/posix/src/pthreadsigmask.c b/cpukit/posix/src/pthreadsigmask.c
deleted file mode 100644
index 7511de17f8..0000000000
--- a/cpukit/posix/src/pthreadsigmask.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * 3.3.5 Examine and Change Blocked Signals, P1003.1b-1993, p. 73
- *
- * NOTE: P1003.1c/D10, p. 37 adds pthread_sigmask().
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <pthread.h>
-#include <signal.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
-#include <rtems/posix/psignal.h>
-#include <rtems/posix/seterr.h>
-
-int pthread_sigmask(
- int how,
- const sigset_t *set,
- sigset_t *oset
-)
-{
- POSIX_API_Control *api;
-
- if ( !set && !oset )
- set_errno_and_return_minus_one( EINVAL );
-
- api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
-
- if ( oset )
- *oset = api->signals_blocked;
-
- if ( !set )
- return 0;
-
- switch ( how ) {
- case SIG_BLOCK:
- api->signals_blocked |= *set;
- break;
- case SIG_UNBLOCK:
- api->signals_blocked &= ~*set;
- break;
- case SIG_SETMASK:
- api->signals_blocked = *set;
- break;
- default:
- set_errno_and_return_minus_one( EINVAL );
- }
-
- /* XXX are there critical section problems here? */
-
- /* XXX evaluate the new set */
-
- if ( ~api->signals_blocked &
- (api->signals_pending | _POSIX_signals_Pending) ) {
- _Thread_Executing->do_post_task_switch_extension = TRUE;
- _Thread_Dispatch();
- }
-
- return 0;
-}
diff --git a/cpukit/posix/src/ptimer.c b/cpukit/posix/src/ptimer.c
deleted file mode 100644
index d8733e8bfa..0000000000
--- a/cpukit/posix/src/ptimer.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * ptimer.c,v 1.1 1996/06/03 16:29:58 joel Exp
- */
-
-#include <assert.h>
-#include <time.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/tod.h>
-
-#include <rtems/posix/time.h>
-
-/************************************/
-/* These includes are now necessary */
-/************************************/
-
-#include <sys/features.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/types.h>
-#include <rtems/rtems/timer.h>
-#include <rtems/rtems/clock.h>
-#include <rtems/posix/psignal.h>
-#include <rtems/score/wkspace.h>
-#include <pthread.h>
-#include <stdio.h>
-#include <signal.h>
-
-/*****************************/
-/* End of necessary includes */
-/*****************************/
-
-#include <rtems/posix/timer.h>
-
-/* ***************************************************************************
- * TIMER_INITIALIZE_S
- *
- * Description: Initialize the data of a timer
- * ***************************************************************************/
-
-void TIMER_INITIALIZE_S ( int timer_pos )
-{
-
- /*
- * Indicates that the position in the table is free
- */
-
- timer_struct[timer_pos].state = STATE_FREE_C;
-
- /*
- * The initial data of timing are set with null value
- */
-
- timer_struct[timer_pos].timer_data.it_value.tv_sec = 0;
- timer_struct[timer_pos].timer_data.it_value.tv_nsec = 0;
- timer_struct[timer_pos].timer_data.it_interval.tv_sec = 0;
- timer_struct[timer_pos].timer_data.it_interval.tv_nsec = 0;
-
- /*
- * The count of expirations is 0
- */
-
- timer_struct[timer_pos].overrun = 0;
-
-}
-
-/* ***************************************************************************
- * _POSIX_Timer_Manager_initialization
- *
- * Description: Initialize the internal structure in which the data of all
- * the timers are stored
- * ***************************************************************************/
-
-int timer_max;
-timer_alive_t *timer_struct;
-
-
-void _POSIX_Timer_Manager_initialization ( int max_timers )
-{
- int index;
-
- timer_struct = _Workspace_Allocate_or_fatal_error(
- max_timers * sizeof(timer_alive_t) );
-
- /*
- * Initialize all the timers
- */
-
- timer_max = max_timers;
-
- for (index=0; index<max_timers; index++)
- TIMER_INITIALIZE_S( index );
-
- timer_max = max_timers;
-}
-
diff --git a/cpukit/posix/src/ptimer1.c b/cpukit/posix/src/ptimer1.c
deleted file mode 100644
index b29654e6d5..0000000000
--- a/cpukit/posix/src/ptimer1.c
+++ /dev/null
@@ -1,897 +0,0 @@
-/*
- * ptimer.c,v 1.1 1996/06/03 16:29:58 joel Exp
- */
-
-#include <assert.h>
-#include <time.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/tod.h>
-
-#include <rtems/posix/time.h>
-
-/************************************/
-/* These includes are now necessary */
-/************************************/
-
-#include <sys/features.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/types.h>
-#include <rtems/rtems/timer.h>
-#include <rtems/rtems/clock.h>
-#include <rtems/posix/psignal.h>
-#include <rtems/score/wkspace.h>
-#include <pthread.h>
-#include <stdio.h>
-#include <signal.h>
-
-#include <rtems/posix/timer.h>
-
-/*****************************/
-/* End of necessary includes */
-/*****************************/
-
-/* ************
- * Constants
- * ************/
-
-/*
-#define DEBUG_MESSAGES
- */
-
-/*
- * Data for the signals
- */
-
-struct sigaction signal_inf[SIGRTMAX];
-
-/***********************************
- * Definition of Internal Functions
- ***********************************/
-
-/* ***************************************************************************
- * PRINT_MSG_S
- *
- * Description: This function write a message in the display.
- * It is used for debugging and all the calls must be deleted
- * when the tests finish
- * ***************************************************************************/
-
-static void PRINT_MSG_S ( char *msg )
-{
-
-#ifdef DEBUG_MESSAGES
- printf("%s\n", msg);
-#endif
-
-}
-
-/* ***************************************************************************
- * PRINT_ERRNO_S
- *
- * Description: Print the value of the global variable errno in the display
- * ***************************************************************************/
-
-static void PRINT_ERRNO_S ()
-{
-#ifdef DEBUG_MESSAGES
- switch (errno)
- {
- case EINVAL:
- PRINT_MSG_S ( "errno EINVAL"); break;
- case EPERM:
- PRINT_MSG_S ( "errno EPERM"); break;
- case ESRCH:
- PRINT_MSG_S ( "errno ESRCH"); break;
- case EAGAIN:
- PRINT_MSG_S ( "errno EAGAIN"); break;
- default :
- printf ("errno: %d\n", errno);
- break;
- }
-#endif
-}
-
-/* ***************************************************************************
- * TIMER_INITIALIZE_S
- *
- * Description: Initialize the data of a timer
- * ***************************************************************************/
-
-extern void TIMER_INITIALIZE_S ( int timer_pos );
-
-/* ***************************************************************************
- * _POSIX_Timer_Manager_initialization
- *
- * Description: Initialize the internal structure in which the data of all
- * the timers are stored
- * ***************************************************************************/
-
-/* split to reduce minimum size */
-
-/* ***************************************************************************
- * FIRST_FREE_POSITION_F
- *
- * Description: Returns the first free position in the table of timers.
- * If there is not a free position, it returns NO_MORE_TIMERS_C
- * ***************************************************************************/
-
-int FIRST_FREE_POSITION_F ()
-{
- int index;
-
- for (index=0; index<timer_max; index++) {
- if ( timer_struct[index].state == STATE_FREE_C ) {
- return index;
- }
- }
-
- /* The function reaches this point only if all the position are occupied */
-
- return NO_MORE_TIMERS_C;
-}
-
-/* ***************************************************************************
- * TIMER_POSITION_F
- *
- * Description: Returns the position in the table of timers in which the
- * data of the timer are stored.
- * If the timer identifier does not exist, it returns
- * BAD_TIMER_C
- * ***************************************************************************/
-
-int TIMER_POSITION_F ( timer_t timer_id )
-{
- int index;
-
- for (index=0; index<timer_max; index++ ) {
-
- /* Looks for the position of the timer. The timer must exist and the
- * position can not be free */
- if ( ( timer_struct[index].timer_id == timer_id ) &&
- ( timer_struct[index].state != STATE_FREE_C ) ) {
- return index;
- }
- }
-
- /* If the function reaches this point is because the timer identifier
- * is not correct */
-
- return BAD_TIMER_C;
-
-}
-
-/* ***************************************************************************
- * COPY_ITIMERSPEC_S
- *
- * Description: Does a copy of a variable of type struct itimerspec
- * ***************************************************************************/
-
-void COPY_ITIMERSPEC_S ( const struct itimerspec *source,
- struct itimerspec *target )
-{
-
- target->it_value.tv_sec = source->it_value.tv_sec;
- target->it_value.tv_nsec = source->it_value.tv_nsec;
- target->it_interval.tv_sec = source->it_interval.tv_sec;
- target->it_interval.tv_nsec = source->it_interval.tv_nsec;
-
-}
-
-/* ***************************************************************************
- * ITIMERSPEC_TO_RTEMS_TIME_OF_DAY_S
- *
- * Description: This function converts the data of a structure itimerspec
- * into structure rtems_time_of_day
- * ***************************************************************************/
-
-void ITIMERSPEC_TO_RTEMS_TIME_OF_DAY_S
- ( const struct itimerspec *itimer, rtems_time_of_day *rtems_time )
-{
- unsigned long int seconds;
-
- /* The leap years and the months with 28, 29 or 31 days have not been
- * considerated. It will be made in the future */
-
- seconds = itimer->it_value.tv_sec;
-
- rtems_time->year = seconds / SECONDS_PER_YEAR_C;
- seconds = seconds % SECONDS_PER_YEAR_C;
-
- rtems_time->month = seconds / SECONDS_PER_MONTH_C;
- seconds = seconds % SECONDS_PER_MONTH_C;
-
- rtems_time->day = seconds / SECONDS_PER_DAY_C;
- seconds = seconds % SECONDS_PER_DAY_C;
-
- rtems_time->hour = seconds / SECONDS_PER_HOUR_C;
- seconds = seconds % SECONDS_PER_HOUR_C;
-
- rtems_time->minute = seconds / SECONDS_PER_MINUTE_C;
- seconds = seconds % SECONDS_PER_MINUTE_C;
-
- rtems_time->second = seconds;
-
- rtems_time->ticks = ( itimer->it_value.tv_nsec * SEC_TO_TICKS_C ) /
- NSEC_PER_SEC_C;
-
-}
-
-
-/* ***************************************************************************
- * FIRE_TIMER_S
- *
- * Description: This is the operation that is ran when a timer expires
- * ***************************************************************************/
-
-
-rtems_timer_service_routine FIRE_TIMER_S (rtems_id timer, void *data)
-{
- int timer_pos; /* Position in the table of the timer that
- * has expirated */
- rtems_status_code return_v; /* Return value of rtems_timer_fire_after */
- int sig_number; /* Number of the signal to send */
-
-
- /* The position of the table of timers that contains the data of the
- * expired timer will be stored in "timer_pos". In theory a timer can not
- * expire if it has not been created or has been deleted */
-
- PRINT_MSG_S ("FIRE_TIMER_S");
-
- timer_pos = TIMER_POSITION_F(timer);
-
- /* Increases the number of expiration of the timer in one unit. */
- timer_struct[timer_pos].overrun = timer_struct[timer_pos].overrun + 1;
-
-
- if ( ( timer_struct[timer_pos].timer_data.it_interval.tv_sec != 0 ) ||
- ( timer_struct[timer_pos].timer_data.it_interval.tv_nsec != 0 ) ) {
-
- /* The timer must be reprogrammed */
-
- return_v = rtems_timer_fire_after ( timer,
- timer_struct[timer_pos].ticks,
- FIRE_TIMER_S,
- NULL );
-
- /* Stores the time when the timer was started again */
-
- return_v = rtems_clock_get ( RTEMS_CLOCK_GET_TOD,
- &timer_struct[timer_pos].time );
-
- /* The state has not to be actualized, because nothing modifies it */
-
- timer_struct[timer_pos].state = STATE_CREATE_RUN_C;
-
- } else {
- /* Indicates that the timer is stopped */
-
- timer_struct[timer_pos].state = STATE_CREATE_STOP_C;
-
- }
-
- /*
- * The sending of the signal to the process running the handling function
- * specified for that signal is simulated
- */
-
- sig_number = timer_struct[timer_pos].inf.sigev_signo;
-
- if( pthread_kill ( timer_struct[timer_pos].thread_id ,
- timer_struct[timer_pos].inf.sigev_signo ) ) {
- PRINT_MSG_S ("ERROR_PTHREAD_KILL");
- } else {
- PRINT_MSG_S ("SUCCESS_PTHREAD_KILL");
- }
-
- /*
- * After the signal handler returns, the count of expirations of the
- * timer must be set to 0.
- */
-
- timer_struct[timer_pos].overrun = 0;
-
-}
-
-/* *********************************************************************
- * 14.2.2 Create a Per-Process Timer, P1003.1b-1993, p. 264
- * ********************************************************************/
-
-/* **************
- * timer_create
- * **************/
-
-int timer_create(
- clockid_t clock_id,
- struct sigevent *evp,
- timer_t *timerid
-)
-{
-
- rtems_status_code return_v; /* return value of the operation */
- rtems_id timer_id; /* created timer identifier */
- int timer_pos; /* Position in the table of timers */
-
- /*
- * The data of the structure evp are checked in order to verify if they
- * are coherent.
- */
-
- if (evp != NULL) {
- /* The structure has data */
-
- if ( ( evp->sigev_notify != SIGEV_NONE ) &&
- ( evp->sigev_notify != SIGEV_SIGNAL ) ) {
- /* The value of the field sigev_notify is not valid */
-
- return (-1);
-
- }
- }
-
- /*
- * A timer is created using the primitive rtems_timer_create
- */
-
- return_v = rtems_timer_create ( clock_id, &timer_id );
-
- switch (return_v) {
- case RTEMS_SUCCESSFUL :
-
- PRINT_MSG_S("SUCCESS: rtems create timer RTEMS_SUCCESSFUL");
-
- /*
- * The timer has been created properly
- */
-
- /* Obtains the first free position in the table of timers */
-
- timer_pos = FIRST_FREE_POSITION_F();
-
- if ( timer_pos == NO_MORE_TIMERS_C ) {
- /* There is not position for another timers in spite of RTEMS
- * supports it. It will necessaty to increase the structure used */
-
- errno = EAGAIN;
-
- return -1;
- }
-
- /* Exit parameter */
-
- *timerid = timer_id;
-
- /* The data of the created timer are stored to use them later */
-
- timer_struct[timer_pos].state = STATE_CREATE_NEW_C;
-
- /* NEW VERSION*/
- timer_struct[timer_pos].thread_id = pthread_self ();
-
-
- if ( evp != NULL ) {
-
- timer_struct[timer_pos].inf.sigev_notify = evp->sigev_notify;
- timer_struct[timer_pos].inf.sigev_signo = evp->sigev_signo;
- timer_struct[timer_pos].inf.sigev_value = evp->sigev_value;
-
- }
-
-
- timer_struct[timer_pos].timer_id = timer_id;
-
- timer_struct[timer_pos].overrun = 0;
-
- timer_struct[timer_pos].timer_data.it_value.tv_sec = 0;
- timer_struct[timer_pos].timer_data.it_value.tv_nsec = 0;
- timer_struct[timer_pos].timer_data.it_interval.tv_sec = 0;
- timer_struct[timer_pos].timer_data.it_interval.tv_nsec = 0;
-
- return 0;
-
-
- case RTEMS_INVALID_NAME : /* The assigned name is not valid*/
-
- PRINT_MSG_S ("ERROR: rtems create timer RTEMS_INVALID_NAME");
-
- errno = EINVAL;
-
- return (-1);
-
-
- case RTEMS_TOO_MANY :
-
- PRINT_MSG_S ("ERROR: rtems create timer RTEMS_TOO_MANY ");
-
- /* There has been created too much timers for the same process */
-
- errno = EAGAIN;
-
- return (-1);
-
- default :
-
- /*
- * Does nothing. It only returns the error without assigning a value
- * to errno. In theory, it can not happen because the call to
- * rtems_timer_create can not return other different value.
- */
-
- return (-1);
-
- }
-
- /*
- * The next sentence is used to avoid singular situations
- */
-
- return (-1);
-
-}
-
-/*
- * 14.2.3 Delete a Per_process Timer, P1003.1b-1993, p. 266
- */
-
-int timer_delete(
- timer_t timerid
-)
-{
-
- /*
- * IDEA: This function must probably stop the timer first and then delete it
- *
- * It will have to do a call to rtems_timer_cancel and then another
- * call to rtems_timer_delete.
- * The call to rtems_timer_delete will be probably unnecessary,
- * because rtems_timer_delete stops the timer before deleting it.
- */
-
- int timer_pos;
- rtems_status_code status;
-
-
- /* First the position in the table of timers is obtained */
-
- timer_pos = TIMER_POSITION_F ( timerid );
-
- if ( timer_pos == BAD_TIMER_C ) {
- /* The timer identifier is erroneus */
-
- errno = EINVAL;
- return -1;
- }
-
- /* The timer is deleted */
-
- status = rtems_timer_delete ( timerid );
-
- if ( status == RTEMS_INVALID_ID ) {
- /* The timer identifier is erroneus */
-
- errno = EINVAL;
- return -1;
- }
-
- /* Initializes the data of the timer */
-
- TIMER_INITIALIZE_S ( timer_pos );
-
- return 0;
-}
-
-/*
- * 14.2.4 Per-Process Timers, P1003.1b-1993, p. 267
- */
-
-/* **************
- * timer_settime
- * **************/
-
-
-int timer_settime(
- timer_t timerid,
- int flags,
- const struct itimerspec *value,
- struct itimerspec *ovalue
-)
-{
-
- rtems_status_code return_v; /* Return of the calls to RTEMS */
- int timer_pos; /* Position of the timer in the table */
- rtems_time_of_day rtems_time; /* Time in RTEMS */
-
-
- /* First the position in the table of timers is obtained */
-
- timer_pos = TIMER_POSITION_F ( timerid );
-
- if ( timer_pos == BAD_TIMER_C ) {
- /* The timer identifier is erroneus */
-
- errno = EINVAL;
- return -1;
- }
-
- if ( value == NULL ) {
- /* The stucture of times of the timer is free, and then returns an
- error but the variable errno is not actualized */
-
- /* errno = ?????? */
-
- return -1;
- }
-
- /* If the function reaches this point, then it will be necessary to do
- * something with the structure of times of the timer: to stop, start
- * or start it again */
-
- /* First, it verifies if the timer must be stopped */
-
- if ( value->it_value.tv_sec == 0 && value->it_value.tv_nsec == 0 ) {
- /* The timer is stopped */
-
- return_v = rtems_timer_cancel ( timerid );
-
- /* The old data of the timer are returned */
-
- if ( ovalue )
- COPY_ITIMERSPEC_S ( &timer_struct[timer_pos].timer_data, ovalue );
-
- /* The new data are set */
-
- COPY_ITIMERSPEC_S ( value, &timer_struct[timer_pos].timer_data );
-
- /* Indicates that the timer is created and stopped */
-
- timer_struct[timer_pos].state = STATE_CREATE_STOP_C;
-
- /* Returns with success */
-
- return 0;
- }
-
- /*
- * If the function reaches this point, then the timer will have to be
- * initialized with new values: to start it or start it again
- */
-
- /* First, it verifies if the structure "value" is correct */
-
- if ( ( value->it_value.tv_nsec > MAX_NSEC_C ) ||
- ( value->it_value.tv_nsec < MIN_NSEC_C ) ) {
- /* The number of nanoseconds is not correct */
-
- errno = EINVAL;
-
- return -1;
- }
-
- /* Then, "value" must be converted from seconds and nanoseconds to clock
- * ticks, to use it in the calls to RTEMS */
-
- /* It is also necessary to take in account if the time is absolute
- * or relative */
-
- switch (flags) {
- case TIMER_ABSTIME:
-
- /* The fire time is absolute:
- * It has to use "rtems_time_fire_when" */
-
- /* First, it converts from struct itimerspec to rtems_time_of_day */
-
- ITIMERSPEC_TO_RTEMS_TIME_OF_DAY_S ( value, &rtems_time );
-
- return_v = rtems_timer_fire_when ( timerid, &rtems_time, FIRE_TIMER_S, NULL);
-
- switch ( return_v ) {
- case RTEMS_SUCCESSFUL:
-
- PRINT_MSG_S ("SUCCESS: timer_settime RTEMS_SUCCESSFUL");
-
- /* The timer has been started and is running */
-
- /* Actualizes the data of the structure and
- * returns the old ones in "ovalue" */
-
- if ( ovalue )
- COPY_ITIMERSPEC_S ( &timer_struct[timer_pos].timer_data, ovalue );
-
- COPY_ITIMERSPEC_S ( value, &timer_struct[timer_pos].timer_data );
-
- /* It indicates that the time is running */
-
- timer_struct[timer_pos].state = STATE_CREATE_RUN_C;
-
- /* Stores the time in which the timer was started again */
-
- return_v = rtems_clock_get ( RTEMS_CLOCK_GET_TOD,
- &timer_struct[timer_pos].time );
-
- return 0;
-
- break;
-
- case RTEMS_INVALID_ID:
-
- PRINT_MSG_S ("ERROR: timer_settime RTEMS_INVALID_ID");
- break;
-
- case RTEMS_NOT_DEFINED:
-
- PRINT_MSG_S ("ERROR: timer_settime RTEMS_NOT_DEFINED");
- break;
-
- case RTEMS_INVALID_CLOCK:
-
- PRINT_MSG_S ("ERROR: timer_settime RTEMS_INVALID_CLOCK");
- break;
-
- default:
-
-
- }
-
- break;
-
- case TIMER_RELATIVE_C:
-
- /* The fire time is relative:
- * It has to use "rtems_time_fire_after" */
-
- /* First, it converts from seconds and nanoseconds to ticks */
-
- /* The form in which this operation is done can produce a lost
- * of precision of 1 second */
-
-/* This is the process to convert from nanoseconds to ticks
- *
- * There is a tick every 10 miliseconds, then the nanoseconds are
- * divided between 10**7. The result of this operation will be the
- * number of ticks
- */
-
- timer_struct[timer_pos].ticks =
- ( SEC_TO_TICKS_C * value->it_value.tv_sec ) +
- ( value->it_value.tv_nsec / ( 1000 * 1000 * 10 ) );
-
- return_v = rtems_timer_fire_after ( timerid,
- timer_struct[timer_pos].ticks,
- FIRE_TIMER_S,
- NULL );
-
- switch (return_v) {
- case RTEMS_SUCCESSFUL:
-
- PRINT_MSG_S ( "SUCCESS: timer_settime RTEMS_SUCCESSFUL");
-
- /* The timer has been started and is running */
-
- /* Actualizes the data of the structure and
- * returns the old ones in "ovalue" */
-
- if ( ovalue )
- COPY_ITIMERSPEC_S ( &timer_struct[timer_pos].timer_data, ovalue );
-
- COPY_ITIMERSPEC_S ( value, &timer_struct[timer_pos].timer_data );
-
- /* It indicates that the time is running */
-
- timer_struct[timer_pos].state = STATE_CREATE_RUN_C;
-
- /* Stores the time in which the timer was started again */
-
- return_v = rtems_clock_get ( RTEMS_CLOCK_GET_TOD,
- &timer_struct[timer_pos].time );
-
- return 0;
-
- break;
-
- case RTEMS_INVALID_ID:
-
- PRINT_MSG_S ( "ERROR: timer_settime RTEMS_INVALID_ID");
-
- /* The timer identifier is not correct. In theory, this
- * situation can not occur, but the solution is easy */
-
- errno = EINVAL;
-
- return -1;
-
- break;
-
- case RTEMS_INVALID_NUMBER:
-
- PRINT_MSG_S ( "ERROR: timer_settime RTEMS_INVALID_NUMBER");
-
- /* In this case, RTEMS fails because the values of timing
- * are incorrect */
-
- /*
- * I do not know if errno must be actualized
- *
- * errno = EINVAL;
- */
-
- return -1;
-
- break;
-
- default:
- }
-
- break;
-
- default:
-
- /* It does nothing, although it will be probably necessary to
- * return an error */
-
- }
-
- /* To avoid problems */
-
- return 0;
-
-}
-
-
-/*
- * 14.2.4 Per-Process Timers, P1003.1b-1993, p. 267
- */
-
-/* **************
- * timer_gettime
- * **************/
-
-int timer_gettime(
- timer_t timerid,
- struct itimerspec *value
-)
-{
-
- /*
- * IDEA: This function does not use functions of RTEMS to the handle
- * of timers. It uses some functions for managing the time.
- *
- * A possible form to do this is the following:
- *
- * - When a timer is initialized, the value of the time in
- * that moment is stored.
- * - When this function is called, it returns the difference
- * between the current time and the initialization time.
- */
-
- rtems_time_of_day current_time;
- rtems_status_code return_v;
- int timer_pos;
- unsigned32 hours;
- unsigned32 minutes;
- unsigned32 seconds;
- unsigned32 ticks;
- unsigned32 nanosec;
-
-
- /* Reads the current time */
-
- return_v = rtems_clock_get ( RTEMS_CLOCK_GET_TOD, &current_time );
-
- timer_pos = TIMER_POSITION_F ( timerid );
-
- if ( timer_pos == BAD_TIMER_C ) {
-
- /* The timer identifier is erroneus */
-
- errno = EINVAL;
-
- return (-1);
-
- }
-
- /* Calculates the difference between the start time of the timer and
- * the current one */
-
- hours = current_time.hour - timer_struct[timer_pos].time.hour;
-
- if ( current_time.minute < timer_struct[timer_pos].time.minute ) {
- minutes = 60 - timer_struct[timer_pos].time.minute + current_time.minute;
- hours--;
- } else {
- minutes = current_time.minute - timer_struct[timer_pos].time.minute;
- }
-
- if ( current_time.second < timer_struct[timer_pos].time.second ) {
- seconds = 60 - timer_struct[timer_pos].time.second + current_time.second;
- minutes--;
- } else {
- seconds = current_time.second - timer_struct[timer_pos].time.second;
- }
-
- if ( current_time.ticks < timer_struct[timer_pos].time.ticks ) {
- ticks = 100 - timer_struct[timer_pos].time.ticks + current_time.ticks;
- seconds--;
- } else {
- ticks = current_time.ticks - timer_struct[timer_pos].time.ticks;
- }
-
- /* The time that the timer is running is calculated */
- seconds = hours * 60 * 60 +
- minutes * 60 +
- seconds;
-
- nanosec = ticks * 10 * /* msec */
- 1000 * /* microsec */
- 1000; /* nanosec */
-
-
- /* Calculates the time left before the timer finishes */
-
- value->it_value.tv_sec =
- timer_struct[timer_pos].timer_data.it_value.tv_sec - seconds;
-
- value->it_value.tv_nsec =
- timer_struct[timer_pos].timer_data.it_value.tv_nsec - nanosec;
-
-
- value->it_interval.tv_sec =
- timer_struct[timer_pos].timer_data.it_interval.tv_sec;
- value->it_interval.tv_nsec =
- timer_struct[timer_pos].timer_data.it_interval.tv_nsec;
-
-
- return 0;
-
-}
-
-/*
- * 14.2.4 Per-Process Timers, P1003.1b-1993, p. 267
- */
-
-/* *****************
- * timer_getoverrun
- * *****************/
-
-int timer_getoverrun(
- timer_t timerid
-)
-{
-
- /*
- * IDEA: This function must count the times the timer expires.
- *
- * The expiration of a timer must increase by one a counter.
- * After the signal handler associated to the timer finishs
- * its execution, FIRE_TIMER_S will have to set this counter to 0.
- */
-
- int timer_pos; /* Position of the timer in the structure */
- int overrun; /* Overflow count */
-
-
- timer_pos = TIMER_POSITION_F ( timerid );
-
- if ( timer_pos == BAD_TIMER_C ) {
- /* The timer identifier is erroneus */
-
- errno = EINVAL;
-
- return -1;
- }
-
- /* The overflow count of the timer is stored in "overrun" */
-
- overrun = timer_struct[timer_pos].overrun;
-
- /* It is set to 0 */
-
- timer_struct[timer_pos].overrun = 0;
-
- return overrun;
-
-}
diff --git a/cpukit/posix/src/sched.c b/cpukit/posix/src/sched.c
deleted file mode 100644
index 30c58ca8a5..0000000000
--- a/cpukit/posix/src/sched.c
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * $Id$
- */
-
-#include <assert.h>
-#include <sched.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/score/tod.h>
-#include <rtems/score/thread.h>
-#include <rtems/posix/seterr.h>
-#include <rtems/posix/priority.h>
-#include <rtems/posix/time.h>
-
-/*PAGE
- *
- * 13.3.1 Set Scheduling Parameters, P1003.1b-1993, p. 252
- *
- */
-
-int sched_setparam(
- pid_t pid,
- const struct sched_param *param
-)
-{
- set_errno_and_return_minus_one( ENOSYS );
-}
-
-/*PAGE
- *
- * 13.3.2 Set Scheduling Parameters, P1003.1b-1993, p. 253
- */
-
-int sched_getparam(
- pid_t pid,
- const struct sched_param *param
-)
-{
- set_errno_and_return_minus_one( ENOSYS );
-}
-
-/*PAGE
- *
- * 13.3.3 Set Scheduling Policy and Scheduling Parameters,
- * P1003.1b-1993, p. 254
- */
-
-int sched_setscheduler(
- pid_t pid,
- int policy,
- const struct sched_param *param
-)
-{
- set_errno_and_return_minus_one( ENOSYS );
-}
-
-/*PAGE
- *
- * 13.3.4 Get Scheduling Policy, P1003.1b-1993, p. 256
- */
-
-int sched_getscheduler(
- pid_t pid
-)
-{
- set_errno_and_return_minus_one( ENOSYS );
-}
-
-/*PAGE
- *
- * 13.3.6 Get Scheduling Parameter Limits, P1003.1b-1993, p. 258
- */
-
-int sched_get_priority_max(
- int policy
-)
-{
- switch ( policy ) {
- case SCHED_OTHER:
- case SCHED_FIFO:
- case SCHED_RR:
- case SCHED_SPORADIC:
- break;
-
- default:
- set_errno_and_return_minus_one( EINVAL );
- }
-
- return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
-}
-
-/*PAGE
- *
- * 13.3.6 Get Scheduling Parameter Limits, P1003.1b-1993, p. 258
- */
-
-int sched_get_priority_min(
- int policy
-)
-{
- switch ( policy ) {
- case SCHED_OTHER:
- case SCHED_FIFO:
- case SCHED_RR:
- case SCHED_SPORADIC:
- break;
-
- default:
- set_errno_and_return_minus_one( EINVAL );
- }
-
- return POSIX_SCHEDULER_MINIMUM_PRIORITY;
-}
-
-/*PAGE
- *
- * 13.3.6 Get Scheduling Parameter Limits, P1003.1b-1993, p. 258
- */
-
-int sched_rr_get_interval(
- pid_t pid,
- struct timespec *interval
-)
-{
- /* XXX do we need to support different time quantums per thread */
-
- /*
- * Only supported for the "calling process" (i.e. this node).
- */
-
- if ( pid && pid != getpid() )
- set_errno_and_return_minus_one( ESRCH );
-
- if ( !interval )
- set_errno_and_return_minus_one( EINVAL );
-
- _POSIX_Interval_to_timespec( _Thread_Ticks_per_timeslice, interval );
- return 0;
-}
-
-/*PAGE
- *
- * 13.3.5 Yield Processor, P1003.1b-1993, p. 257
- */
-
-int sched_yield( void )
-{
- _Thread_Disable_dispatch();
- _Thread_Yield_processor();
- _Thread_Enable_dispatch();
- return 0;
-}
diff --git a/cpukit/posix/src/semaphore.c b/cpukit/posix/src/semaphore.c
deleted file mode 100644
index eb9664534a..0000000000
--- a/cpukit/posix/src/semaphore.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * $Id$
- */
-
-#include <stdarg.h>
-
-#include <errno.h>
-#include <fcntl.h>
-#include <pthread.h>
-#include <semaphore.h>
-#include <limits.h>
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/posix/semaphore.h>
-#include <rtems/posix/time.h>
-#include <rtems/posix/seterr.h>
-
-/*PAGE
- *
- * _POSIX_Semaphore_Manager_initialization
- *
- * This routine initializes all semaphore manager related data structures.
- *
- * Input parameters:
- * maximum_semaphores - maximum configured semaphores
- *
- * Output parameters: NONE
- */
-
-void _POSIX_Semaphore_Manager_initialization(
- unsigned32 maximum_semaphores
-)
-{
- _Objects_Initialize_information(
- &_POSIX_Semaphore_Information,
- OBJECTS_POSIX_SEMAPHORES,
- TRUE,
- maximum_semaphores,
- sizeof( POSIX_Semaphore_Control ),
- TRUE,
- _POSIX_PATH_MAX,
- FALSE
- );
-}
diff --git a/cpukit/posix/src/semaphorecreatesupp.c b/cpukit/posix/src/semaphorecreatesupp.c
deleted file mode 100644
index 448a658bab..0000000000
--- a/cpukit/posix/src/semaphorecreatesupp.c
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * $Id$
- */
-
-#include <stdarg.h>
-
-#include <errno.h>
-#include <fcntl.h>
-#include <pthread.h>
-#include <semaphore.h>
-#include <limits.h>
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/posix/semaphore.h>
-#include <rtems/posix/time.h>
-#include <rtems/posix/seterr.h>
-
-/*PAGE
- *
- * _POSIX_Semaphore_Create_support
- *
- * This routine does the actual creation and initialization of
- * a poxix semaphore. It is a support routine for sem_init and
- * sem_open.
- */
-
-int _POSIX_Semaphore_Create_support(
- const char *name,
- int pshared,
- unsigned int value,
- POSIX_Semaphore_Control **the_sem
-)
-{
- POSIX_Semaphore_Control *the_semaphore;
- CORE_semaphore_Attributes *the_sem_attr;
-
- _Thread_Disable_dispatch();
-
- /* Sharing semaphores among processes is not currently supported */
- if (pshared != 0) {
- _Thread_Enable_dispatch();
- set_errno_and_return_minus_one( ENOSYS );
- }
-
- if ( name ) {
- if( strlen(name) > PATH_MAX ) {
- _Thread_Enable_dispatch();
- set_errno_and_return_minus_one( ENAMETOOLONG );
- }
- }
-
- the_semaphore = _POSIX_Semaphore_Allocate();
-
- if ( !the_semaphore ) {
- _Thread_Enable_dispatch();
- set_errno_and_return_minus_one( ENOSPC );
- }
-
-#if defined(RTEMS_MULTIPROCESSING)
- if ( pshared == PTHREAD_PROCESS_SHARED &&
- !( _Objects_MP_Allocate_and_open( &_POSIX_Semaphore_Information, 0,
- the_semaphore->Object.id, FALSE ) ) ) {
- _POSIX_Semaphore_Free( the_semaphore );
- _Thread_Enable_dispatch();
- set_errno_and_return_minus_one( EAGAIN );
- }
-#endif
-
- the_semaphore->process_shared = pshared;
-
- if ( name ) {
- the_semaphore->named = TRUE;
- the_semaphore->open_count = 1;
- the_semaphore->linked = TRUE;
- }
- else
- the_semaphore->named = FALSE;
-
- the_sem_attr = &the_semaphore->Semaphore.Attributes;
-
- /*
- * POSIX does not appear to specify what the discipline for
- * blocking tasks on this semaphore should be. It could somehow
- * be derived from the current scheduling policy. One
- * thing is certain, no matter what we decide, it won't be
- * the same as all other POSIX implementations. :)
- */
-
- the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO;
-
- /*
- * This effectively disables limit checking.
- */
-
- the_sem_attr->maximum_count = 0xFFFFFFFF;
-
- _CORE_semaphore_Initialize(
- &the_semaphore->Semaphore,
- OBJECTS_POSIX_SEMAPHORES,
- the_sem_attr,
- value,
- NULL /* multiprocessing is not supported */
- );
-
- /*
- * Make the semaphore available for use.
- */
-
- _Objects_Open(
- &_POSIX_Semaphore_Information,
- &the_semaphore->Object,
- (char *) name
- );
-
- *the_sem = the_semaphore;
-
-#if defined(RTEMS_MULTIPROCESSING)
- if ( pshared == PTHREAD_PROCESS_SHARED )
- _POSIX_Semaphore_MP_Send_process_packet(
- POSIX_SEMAPHORE_MP_ANNOUNCE_CREATE,
- the_semaphore->Object.id,
- (char *) name,
- 0 /* proxy id - Not used */
- );
-#endif
-
- _Thread_Enable_dispatch();
- return 0;
-}
diff --git a/cpukit/posix/src/semaphoredeletesupp.c b/cpukit/posix/src/semaphoredeletesupp.c
deleted file mode 100644
index 9e136b7f37..0000000000
--- a/cpukit/posix/src/semaphoredeletesupp.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * $Id$
- */
-
-#include <stdarg.h>
-
-#include <errno.h>
-#include <fcntl.h>
-#include <pthread.h>
-#include <semaphore.h>
-#include <limits.h>
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/posix/semaphore.h>
-#include <rtems/posix/time.h>
-#include <rtems/posix/seterr.h>
-
-/*PAGE
- *
- * _POSIX_Semaphore_Delete
- */
-
-void _POSIX_Semaphore_Delete(
- POSIX_Semaphore_Control *the_semaphore
-)
-{
- if ( !the_semaphore->linked && !the_semaphore->open_count ) {
- _Objects_Close( &_POSIX_Semaphore_Information, &the_semaphore->Object );
-
- _CORE_semaphore_Flush(
- &the_semaphore->Semaphore,
-#if defined(RTEMS_MULTIPROCESSING)
- _POSIX_Semaphore_MP_Send_object_was_deleted,
-#else
- NULL,
-#endif
- -1 /* XXX should also seterrno -> EINVAL */
- );
-
- _POSIX_Semaphore_Free( the_semaphore );
-
-#if defined(RTEMS_MULTIPROCESSING)
- if ( the_semaphore->process_shared == PTHREAD_PROCESS_SHARED ) {
-
- _Objects_MP_Close(
- &_POSIX_Semaphore_Information,
- the_semaphore->Object.id
- );
-
- _POSIX_Semaphore_MP_Send_process_packet(
- POSIX_SEMAPHORE_MP_ANNOUNCE_DELETE,
- the_semaphore->Object.id,
- 0, /* Not used */
- 0 /* Not used */
- );
- }
-#endif
-
- }
-}
diff --git a/cpukit/posix/src/semaphoremp.c b/cpukit/posix/src/semaphoremp.c
deleted file mode 100644
index 9eed7d67d6..0000000000
--- a/cpukit/posix/src/semaphoremp.c
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * $Id$
- */
-
-#include <stdarg.h>
-
-#include <errno.h>
-#include <fcntl.h>
-#include <pthread.h>
-#include <semaphore.h>
-#include <limits.h>
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/posix/semaphore.h>
-#include <rtems/posix/time.h>
-#include <rtems/posix/seterr.h>
-
-#if defined(RTEMS_MULTIPROCESSING)
-/*
- * _POSIX_Semaphore_MP_Send_process_packet
- *
- * DESCRIPTION:
- *
- * This routine performs a remote procedure call so that a
- * process operation can be performed on another node.
- */
-
-void _POSIX_Semaphore_MP_Send_process_packet(
- POSIX_Semaphore_MP_Remote_operations operation,
- Objects_Id semaphore_id,
- Objects_Name name,
- Objects_Id proxy_id
-)
-{
- POSIX_MP_NOT_IMPLEMENTED();
-}
-
-/*
- * _POSIX_Semaphore_MP_Send_request_packet
- *
- * DESCRIPTION:
- *
- * This routine performs a remote procedure call so that a
- * directive operation can be initiated on another node.
- */
-
-int _POSIX_Semaphore_MP_Send_request_packet(
- POSIX_Semaphore_MP_Remote_operations operation,
- Objects_Id semaphore_id,
- boolean wait, /* XXX options */
- Watchdog_Interval timeout
-)
-{
- POSIX_MP_NOT_IMPLEMENTED();
- return 0;
-}
-
-/*
- * _POSIX_Semaphore_MP_Send_response_packet
- *
- * DESCRIPTION:
- *
- * This routine performs a remote procedure call so that a
- * directive can be performed on another node.
- */
-
-void _POSIX_Semaphore_MP_Send_response_packet(
- POSIX_Semaphore_MP_Remote_operations operation,
- Objects_Id semaphore_id,
- Thread_Control *the_thread
-)
-{
- POSIX_MP_NOT_IMPLEMENTED();
-}
-
-/*
- *
- * _POSIX_Semaphore_MP_Process_packet
- *
- * DESCRIPTION:
- *
- * This routine performs the actions specific to this package for
- * the request from another node.
- */
-
-void _POSIX_Semaphore_MP_Process_packet(
- MP_packet_Prefix *the_packet_prefix
-)
-{
- POSIX_MP_NOT_IMPLEMENTED();
-}
-
-/*
- * _POSIX_Semaphore_MP_Send_object_was_deleted
- *
- * DESCRIPTION:
- *
- * This routine is invoked indirectly by the thread queue
- * when a proxy has been removed from the thread queue and
- * the remote node must be informed of this.
- */
-
-void _POSIX_Semaphore_MP_Send_object_was_deleted(
- Thread_Control *the_proxy
-)
-{
- POSIX_MP_NOT_IMPLEMENTED();
-}
-
-/*
- * _POSIX_Semaphore_MP_Send_extract_proxy
- *
- * DESCRIPTION:
- *
- * This routine is invoked when a task is deleted and it
- * has a proxy which must be removed from a thread queue and
- * the remote node must be informed of this.
- */
-
-void _POSIX_Semaphore_MP_Send_extract_proxy(
- Thread_Control *the_thread
-)
-{
- POSIX_MP_NOT_IMPLEMENTED();
-}
-
-/*
- * _POSIX_Semaphore_MP_Get_packet
- *
- * DESCRIPTION:
- *
- * This function is used to obtain a semaphore mp packet.
- */
-
-POSIX_Semaphore_MP_Packet *_POSIX_Semaphore_MP_Get_packet( void )
-{
- POSIX_MP_NOT_IMPLEMENTED();
- return NULL;
-}
-
-#endif /* endif RTEMS_MULTIPROCESSING */
diff --git a/cpukit/posix/src/semaphorenametoid.c b/cpukit/posix/src/semaphorenametoid.c
deleted file mode 100644
index 47879402cc..0000000000
--- a/cpukit/posix/src/semaphorenametoid.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * $Id$
- */
-
-#include <stdarg.h>
-
-#include <errno.h>
-#include <fcntl.h>
-#include <pthread.h>
-#include <semaphore.h>
-#include <limits.h>
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/posix/semaphore.h>
-#include <rtems/posix/time.h>
-#include <rtems/posix/seterr.h>
-
-/*PAGE
- *
- * _POSIX_Semaphore_Name_to_id
- *
- * Look up the specified name and attempt to locate the id
- * for the associated semaphore.
- */
-
-int _POSIX_Semaphore_Name_to_id(
- const char *name,
- Objects_Id *id
-)
-{
- Objects_Name_to_id_errors status;
-
- if ( !name )
- return EINVAL;
-
- if ( !name[0] )
- return EINVAL;
-
- status = _Objects_Name_to_id(
- &_POSIX_Semaphore_Information, (char *)name, 0, id );
-
- if ( status == OBJECTS_SUCCESSFUL )
- return 0;
-
- return ENOENT;
-}
-
diff --git a/cpukit/posix/src/semaphorewaitsupp.c b/cpukit/posix/src/semaphorewaitsupp.c
deleted file mode 100644
index c3aba8c90d..0000000000
--- a/cpukit/posix/src/semaphorewaitsupp.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * $Id$
- */
-
-#include <stdarg.h>
-
-#include <errno.h>
-#include <fcntl.h>
-#include <pthread.h>
-#include <semaphore.h>
-#include <limits.h>
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/posix/semaphore.h>
-#include <rtems/posix/time.h>
-#include <rtems/posix/seterr.h>
-
-/*PAGE
- *
- * _POSIX_Semaphore_Wait_support
- */
-
-int _POSIX_Semaphore_Wait_support(
- sem_t *sem,
- boolean blocking,
- Watchdog_Interval timeout
-)
-{
- register POSIX_Semaphore_Control *the_semaphore;
- Objects_Locations location;
-
- the_semaphore = _POSIX_Semaphore_Get( sem, &location );
- switch ( location ) {
- case OBJECTS_ERROR:
- set_errno_and_return_minus_one( EINVAL );
- case OBJECTS_REMOTE:
- _Thread_Dispatch();
- set_errno_and_return_minus_one( EINVAL );
- case OBJECTS_LOCAL:
- _CORE_semaphore_Seize(
- &the_semaphore->Semaphore,
- the_semaphore->Object.id,
- blocking,
- timeout
- );
- _Thread_Enable_dispatch();
- switch ( _Thread_Executing->Wait.return_code ) {
- case CORE_SEMAPHORE_STATUS_SUCCESSFUL:
- break;
- case CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT:
- set_errno_and_return_minus_one( EAGAIN );
- case CORE_SEMAPHORE_WAS_DELETED:
- set_errno_and_return_minus_one( EAGAIN );
- case CORE_SEMAPHORE_TIMEOUT:
- set_errno_and_return_minus_one( ETIMEDOUT );
- break;
- case CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED:
- /*
- * This error can not occur since we set the maximum
- * count to the largest value the count can hold.
- */
- break;
- }
- }
- return 0;
-}
diff --git a/cpukit/posix/src/semclose.c b/cpukit/posix/src/semclose.c
deleted file mode 100644
index 999dd85cfa..0000000000
--- a/cpukit/posix/src/semclose.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * $Id$
- */
-
-#include <stdarg.h>
-
-#include <errno.h>
-#include <fcntl.h>
-#include <pthread.h>
-#include <semaphore.h>
-#include <limits.h>
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/posix/semaphore.h>
-#include <rtems/posix/time.h>
-#include <rtems/posix/seterr.h>
-
-
-/*PAGE
- *
- * sem_close
- *
- * Routine to close a semaphore that has been opened or initialized.
- *
- * 11.2.4 Close a Named Semaphore, P1003.1b-1993, p.224
- */
-
-int sem_close(
- sem_t *sem
-)
-{
- register POSIX_Semaphore_Control *the_semaphore;
- Objects_Locations location;
-
- the_semaphore = _POSIX_Semaphore_Get( sem, &location );
- switch ( location ) {
- case OBJECTS_ERROR:
- set_errno_and_return_minus_one( EINVAL );
- case OBJECTS_REMOTE:
- _Thread_Dispatch();
- return POSIX_MP_NOT_IMPLEMENTED();
- set_errno_and_return_minus_one( EINVAL );
- case OBJECTS_LOCAL:
- the_semaphore->open_count -= 1;
- _POSIX_Semaphore_Delete( the_semaphore );
- _Thread_Enable_dispatch();
- return 0;
- }
- return POSIX_BOTTOM_REACHED();
-}
diff --git a/cpukit/posix/src/semdestroy.c b/cpukit/posix/src/semdestroy.c
deleted file mode 100644
index 8f3d41cfa8..0000000000
--- a/cpukit/posix/src/semdestroy.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * $Id$
- */
-
-#include <stdarg.h>
-
-#include <errno.h>
-#include <fcntl.h>
-#include <pthread.h>
-#include <semaphore.h>
-#include <limits.h>
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/posix/semaphore.h>
-#include <rtems/posix/time.h>
-#include <rtems/posix/seterr.h>
-
-/*PAGE
- *
- * 11.2.2 Destroy an Unnamed Semaphore, P1003.1b-1993, p.220
- */
-
-int sem_destroy(
- sem_t *sem
-)
-{
- register POSIX_Semaphore_Control *the_semaphore;
- Objects_Locations location;
-
- the_semaphore = _POSIX_Semaphore_Get( sem, &location );
- switch ( location ) {
- case OBJECTS_ERROR:
- set_errno_and_return_minus_one( EINVAL );
- case OBJECTS_REMOTE:
- _Thread_Dispatch();
- return POSIX_MP_NOT_IMPLEMENTED();
- set_errno_and_return_minus_one( EINVAL );
- case OBJECTS_LOCAL:
- /*
- * Undefined operation on a named semaphore.
- */
-
- if ( the_semaphore->named == TRUE ) {
- _Thread_Enable_dispatch();
- set_errno_and_return_minus_one( EINVAL );
- }
-
- _POSIX_Semaphore_Delete( the_semaphore );
- _Thread_Enable_dispatch();
- return 0;
- }
- return POSIX_BOTTOM_REACHED();
-}
diff --git a/cpukit/posix/src/semgetvalue.c b/cpukit/posix/src/semgetvalue.c
deleted file mode 100644
index 25d8c8d8d4..0000000000
--- a/cpukit/posix/src/semgetvalue.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * $Id$
- */
-
-#include <stdarg.h>
-
-#include <errno.h>
-#include <fcntl.h>
-#include <pthread.h>
-#include <semaphore.h>
-#include <limits.h>
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/posix/semaphore.h>
-#include <rtems/posix/time.h>
-#include <rtems/posix/seterr.h>
-
-/*PAGE
- *
- * 11.2.8 Get the Value of a Semaphore, P1003.1b-1993, p.229
- */
-
-int sem_getvalue(
- sem_t *sem,
- int *sval
-)
-{
- register POSIX_Semaphore_Control *the_semaphore;
- Objects_Locations location;
-
- the_semaphore = _POSIX_Semaphore_Get( sem, &location );
- switch ( location ) {
- case OBJECTS_ERROR:
- set_errno_and_return_minus_one( EINVAL );
- case OBJECTS_REMOTE:
- _Thread_Dispatch();
- return POSIX_MP_NOT_IMPLEMENTED();
- set_errno_and_return_minus_one( EINVAL );
- case OBJECTS_LOCAL:
- *sval = _CORE_semaphore_Get_count( &the_semaphore->Semaphore );
- _Thread_Enable_dispatch();
- return 0;
- }
- return POSIX_BOTTOM_REACHED();
-}
diff --git a/cpukit/posix/src/seminit.c b/cpukit/posix/src/seminit.c
deleted file mode 100644
index bcff1b0f32..0000000000
--- a/cpukit/posix/src/seminit.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * $Id$
- */
-
-#include <stdarg.h>
-
-#include <errno.h>
-#include <fcntl.h>
-#include <pthread.h>
-#include <semaphore.h>
-#include <limits.h>
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/posix/semaphore.h>
-#include <rtems/posix/time.h>
-#include <rtems/posix/seterr.h>
-
-/*PAGE
- *
- * 11.2.1 Initialize an Unnamed Semaphore, P1003.1b-1993, p.219
- */
-
-int sem_init(
- sem_t *sem,
- int pshared,
- unsigned int value
-)
-{
- int status;
- POSIX_Semaphore_Control *the_semaphore;
-
- if ( !sem )
- set_errno_and_return_minus_one( EINVAL );
-
- status = _POSIX_Semaphore_Create_support(
- NULL,
- pshared,
- value,
- &the_semaphore
- );
-
- if ( status != -1 )
- *sem = the_semaphore->Object.id;
-
- return status;
-}
diff --git a/cpukit/posix/src/semopen.c b/cpukit/posix/src/semopen.c
deleted file mode 100644
index 8bcf4fccf1..0000000000
--- a/cpukit/posix/src/semopen.c
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * $Id$
- */
-
-#include <stdarg.h>
-
-#include <errno.h>
-#include <fcntl.h>
-#include <pthread.h>
-#include <semaphore.h>
-#include <limits.h>
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/posix/semaphore.h>
-#include <rtems/posix/time.h>
-#include <rtems/posix/seterr.h>
-
-/*PAGE
- *
- * sem_open
- *
- * Opens a named semaphore. Used in conjunction with the sem_close
- * and sem_unlink commands.
- *
- * 11.2.3 Initialize/Open a Named Semaphore, P1003.1b-1993, p.221
- *
- * NOTE: When oflag is O_CREAT, then optional third and fourth
- * parameters must be present.
- */
-
-sem_t *sem_open(
- const char *name,
- int oflag,
- ...
- /* mode_t mode, */
- /* unsigned int value */
-)
-{
- va_list arg;
- mode_t mode;
- unsigned int value = 0;
- int status;
- Objects_Id the_semaphore_id;
- POSIX_Semaphore_Control *the_semaphore;
- Objects_Locations location;
-
- _Thread_Disable_dispatch();
-
- if ( oflag & O_CREAT ) {
- va_start(arg, oflag);
- mode = va_arg( arg, mode_t );
- value = va_arg( arg, unsigned int );
- va_end(arg);
- }
-
- status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id );
-
- /*
- * If the name to id translation worked, then the semaphore exists
- * and we can just return a pointer to the id. Otherwise we may
- * need to check to see if this is a "semaphore does not exist"
- * or some other miscellaneous error on the name.
- */
-
- if ( status ) {
-
- /*
- * Unless provided a valid name that did not already exist
- * and we are willing to create then it is an error.
- */
-
- if ( !( status == ENOENT && (oflag & O_CREAT) ) ) {
- _Thread_Enable_dispatch();
- set_errno_and_return_minus_one_cast( status, sem_t * );
- }
- } else {
-
- /*
- * Check for existence with creation.
- */
-
- if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
- _Thread_Enable_dispatch();
- set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
- }
-
- the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location );
- the_semaphore->open_count += 1;
- _Thread_Enable_dispatch();
- _Thread_Enable_dispatch();
- return (sem_t *)&the_semaphore->Object.id;
-
- }
-
- /*
- * At this point, the semaphore does not exist and everything has been
- * checked. We should go ahead and create a semaphore.
- */
-
- status =_POSIX_Semaphore_Create_support(
- name,
- FALSE, /* not shared across processes */
- value,
- &the_semaphore
- );
-
- /*
- * errno was set by Create_support, so don't set it again.
- */
-
- _Thread_Enable_dispatch();
-
- if ( status == -1 )
- return SEM_FAILED;
-
- return (sem_t *) &the_semaphore->Object.id;
-}
-
-
diff --git a/cpukit/posix/src/sempost.c b/cpukit/posix/src/sempost.c
deleted file mode 100644
index 5a646eee82..0000000000
--- a/cpukit/posix/src/sempost.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * $Id$
- */
-
-#include <stdarg.h>
-
-#include <errno.h>
-#include <fcntl.h>
-#include <pthread.h>
-#include <semaphore.h>
-#include <limits.h>
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/posix/semaphore.h>
-#include <rtems/posix/time.h>
-#include <rtems/posix/seterr.h>
-
-/*PAGE
- *
- * 11.2.7 Unlock a Semaphore, P1003.1b-1993, p.227
- */
-
-int sem_post(
- sem_t *sem
-)
-{
- register POSIX_Semaphore_Control *the_semaphore;
- Objects_Locations location;
-
- the_semaphore = _POSIX_Semaphore_Get( sem, &location );
- switch ( location ) {
- case OBJECTS_ERROR:
- set_errno_and_return_minus_one( EINVAL );
- case OBJECTS_REMOTE:
- _Thread_Dispatch();
- return POSIX_MP_NOT_IMPLEMENTED();
- set_errno_and_return_minus_one( EINVAL );
- case OBJECTS_LOCAL:
- _CORE_semaphore_Surrender(
- &the_semaphore->Semaphore,
- the_semaphore->Object.id,
-#if defined(RTEMS_MULTIPROCESSING)
- NULL /* XXX need to define a routine to handle this case */
-#else
- NULL
-#endif
- );
- _Thread_Enable_dispatch();
- return 0;
- }
- return POSIX_BOTTOM_REACHED();
-}
diff --git a/cpukit/posix/src/semtimedwait.c b/cpukit/posix/src/semtimedwait.c
deleted file mode 100644
index e237749ff7..0000000000
--- a/cpukit/posix/src/semtimedwait.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * $Id$
- */
-
-#include <stdarg.h>
-
-#include <errno.h>
-#include <fcntl.h>
-#include <pthread.h>
-#include <semaphore.h>
-#include <limits.h>
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/posix/semaphore.h>
-#include <rtems/posix/time.h>
-#include <rtems/posix/seterr.h>
-
-/*PAGE
- *
- * 11.2.6 Lock a Semaphore, P1003.1b-1993, p.226
- *
- * NOTE: P1003.4b/D8 adds sem_timedwait(), p. 27
- */
-
-int sem_timedwait(
- sem_t *sem,
- const struct timespec *timeout
-)
-{
- return _POSIX_Semaphore_Wait_support(
- sem,
- TRUE,
- _POSIX_Timespec_to_interval( timeout )
- );
-}
diff --git a/cpukit/posix/src/semtrywait.c b/cpukit/posix/src/semtrywait.c
deleted file mode 100644
index c29a2f3dde..0000000000
--- a/cpukit/posix/src/semtrywait.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * $Id$
- */
-
-#include <stdarg.h>
-
-#include <errno.h>
-#include <fcntl.h>
-#include <pthread.h>
-#include <semaphore.h>
-#include <limits.h>
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/posix/semaphore.h>
-#include <rtems/posix/time.h>
-#include <rtems/posix/seterr.h>
-
-/*PAGE
- *
- * 11.2.6 Lock a Semaphore, P1003.1b-1993, p.226
- *
- * NOTE: P1003.4b/D8 adds sem_timedwait(), p. 27
- */
-
-int sem_trywait(
- sem_t *sem
-)
-{
- return _POSIX_Semaphore_Wait_support( sem, FALSE, THREAD_QUEUE_WAIT_FOREVER );
-}
diff --git a/cpukit/posix/src/semunlink.c b/cpukit/posix/src/semunlink.c
deleted file mode 100644
index d687629e46..0000000000
--- a/cpukit/posix/src/semunlink.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * $Id$
- */
-
-#include <stdarg.h>
-
-#include <errno.h>
-#include <fcntl.h>
-#include <pthread.h>
-#include <semaphore.h>
-#include <limits.h>
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/posix/semaphore.h>
-#include <rtems/posix/time.h>
-#include <rtems/posix/seterr.h>
-
-/*PAGE
- *
- * sem_unlink
- *
- * Unlinks a named semaphore, sem_close must also be called to remove
- * the semaphore.
- *
- * 11.2.5 Remove a Named Semaphore, P1003.1b-1993, p.225
- */
-
-int sem_unlink(
- const char *name
-)
-{
- int status;
- register POSIX_Semaphore_Control *the_semaphore;
- Objects_Id the_semaphore_id;
-
- _Thread_Disable_dispatch();
-
- status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id );
- if ( status != 0 ) {
- _Thread_Enable_dispatch();
- set_errno_and_return_minus_one( status );
- }
-
- /*
- * Don't support unlinking a remote semaphore.
- */
-
- if ( !_Objects_Is_local_id(the_semaphore_id) ) {
- _Thread_Enable_dispatch();
- set_errno_and_return_minus_one( ENOSYS );
- }
-
- the_semaphore = (POSIX_Semaphore_Control *) _Objects_Get_local_object(
- &_POSIX_Semaphore_Information,
- _Objects_Get_index( the_semaphore_id )
- );
-
-#if defined(RTEMS_MULTIPROCESSING)
- if ( the_semaphore->process_shared == PTHREAD_PROCESS_SHARED ) {
- _Objects_MP_Close( &_POSIX_Semaphore_Information, the_semaphore_id );
- }
-#endif
-
- the_semaphore->linked = FALSE;
- _POSIX_Semaphore_Namespace_remove( the_semaphore );
- _POSIX_Semaphore_Delete( the_semaphore );
-
- _Thread_Enable_dispatch();
- return 0;
-}
diff --git a/cpukit/posix/src/semwait.c b/cpukit/posix/src/semwait.c
deleted file mode 100644
index f46db81852..0000000000
--- a/cpukit/posix/src/semwait.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * $Id$
- */
-
-#include <stdarg.h>
-
-#include <errno.h>
-#include <fcntl.h>
-#include <pthread.h>
-#include <semaphore.h>
-#include <limits.h>
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/posix/semaphore.h>
-#include <rtems/posix/time.h>
-#include <rtems/posix/seterr.h>
-
-/*PAGE
- *
- * 11.2.6 Lock a Semaphore, P1003.1b-1993, p.226
- *
- * NOTE: P1003.4b/D8 adds sem_timedwait(), p. 27
- */
-
-int sem_wait(
- sem_t *sem
-)
-{
- return _POSIX_Semaphore_Wait_support( sem, TRUE, THREAD_QUEUE_WAIT_FOREVER );
-}
diff --git a/cpukit/posix/src/setcancelstate.c b/cpukit/posix/src/setcancelstate.c
deleted file mode 100644
index 407a76dfb7..0000000000
--- a/cpukit/posix/src/setcancelstate.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * $Id$
- */
-
-#include <pthread.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/posix/cancel.h>
-#include <rtems/posix/pthread.h>
-#include <rtems/posix/threadsup.h>
-
-/*PAGE
- *
- * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183
- */
-
-int pthread_setcancelstate(
- int state,
- int *oldstate
-)
-{
- POSIX_API_Control *thread_support;
-
- if ( !oldstate )
- return EINVAL;
-
- if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE )
- return EINVAL;
-
- thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
-
- *oldstate = thread_support->cancelability_state;
- thread_support->cancelability_state = state;
-
- if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
- thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
- thread_support->cancelation_requested )
- _POSIX_Thread_cancel_run( _Thread_Executing );
-
- return 0;
-}
diff --git a/cpukit/posix/src/setcanceltype.c b/cpukit/posix/src/setcanceltype.c
deleted file mode 100644
index 6c09836700..0000000000
--- a/cpukit/posix/src/setcanceltype.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * $Id$
- */
-
-#include <pthread.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/posix/cancel.h>
-#include <rtems/posix/pthread.h>
-#include <rtems/posix/threadsup.h>
-
-/*PAGE
- *
- * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183
- */
-
-int pthread_setcanceltype(
- int type,
- int *oldtype
-)
-{
- POSIX_API_Control *thread_support;
-
- if ( !oldtype )
- return EINVAL;
-
- if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS )
- return EINVAL;
-
- thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
-
- *oldtype = thread_support->cancelability_type;
- thread_support->cancelability_type = type;
-
- if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
- thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
- thread_support->cancelation_requested )
- _POSIX_Thread_cancel_run( _Thread_Executing );
-
- return 0;
-}
diff --git a/cpukit/posix/src/setpgid.c b/cpukit/posix/src/setpgid.c
deleted file mode 100644
index 46db5b29ed..0000000000
--- a/cpukit/posix/src/setpgid.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * $Id$
- */
-
-#include <limits.h>
-#include <errno.h>
-#include <string.h>
-#include <sys/types.h>
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/posix/seterr.h>
-
-/*PAGE
- *
- * 4.3.3 Set Process Group ID for Job Control, P1003.1b-1993, p. 89
- */
-
-int setpgid(
- pid_t pid,
- pid_t pgid
-)
-{
- set_errno_and_return_minus_one( ENOSYS );
-}
diff --git a/cpukit/posix/src/setsid.c b/cpukit/posix/src/setsid.c
deleted file mode 100644
index 8d56ea6e72..0000000000
--- a/cpukit/posix/src/setsid.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * $Id$
- */
-
-#include <limits.h>
-#include <errno.h>
-#include <string.h>
-#include <sys/types.h>
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/posix/seterr.h>
-
-/*PAGE
- *
- * 4.3.2 Create Session and Set Process Group ID, P1003.1b-1993, p. 88
- */
-
-pid_t setsid( void )
-{
- set_errno_and_return_minus_one( EPERM );
-}
-
-
diff --git a/cpukit/posix/src/sigaction.c b/cpukit/posix/src/sigaction.c
deleted file mode 100644
index 11bbc358de..0000000000
--- a/cpukit/posix/src/sigaction.c
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * 3.3.4 Examine and Change Signal Action, P1003.1b-1993, p. 70
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <pthread.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
-#include <rtems/posix/psignal.h>
-#include <rtems/posix/seterr.h>
-#include <rtems/score/isr.h>
-
-/*
- * PARAMETERS_PASSING_S is defined in ptimer.c
- */
-
-extern void PARAMETERS_PASSING_S (int num_signal, const struct sigaction inf);
-
-int sigaction(
- int sig,
- const struct sigaction *act,
- struct sigaction *oact
-)
-{
- ISR_Level level;
-
- if ( oact )
- *oact = _POSIX_signals_Vectors[ sig ];
-
- if ( !sig )
- return 0;
-
- if ( !is_valid_signo(sig) )
- set_errno_and_return_minus_one( EINVAL );
-
- /*
- * Some signals cannot be ignored (P1003.1b-1993, pp. 70-72 and references.
- *
- * NOTE: Solaris documentation claims to "silently enforce" this which
- * contradicts the POSIX specification.
- */
-
- if ( sig == SIGKILL )
- set_errno_and_return_minus_one( EINVAL );
-
- /*
- * Evaluate the new action structure and set the global signal vector
- * appropriately.
- */
-
- if ( act ) {
-
- /*
- * Unless the user is installing the default signal actions, then
- * we can just copy the provided sigaction structure into the vectors.
- */
-
- _ISR_Disable( level );
- if ( act->sa_handler == SIG_DFL ) {
- _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
- } else {
- _POSIX_signals_Clear_process_signals( signo_to_mask(sig) );
- _POSIX_signals_Vectors[ sig ] = *act;
- }
- _ISR_Enable( level );
- }
-
- /*
- * No need to evaluate or dispatch because:
- *
- * + If we were ignoring the signal before, none could be pending
- * now (signals not posted when SIG_IGN).
- * + If we are now ignoring a signal that was previously pending,
- * we clear the pending signal indicator.
- */
-
- return 0;
-}
-
diff --git a/cpukit/posix/src/sigaddset.c b/cpukit/posix/src/sigaddset.c
deleted file mode 100644
index 202116a1d1..0000000000
--- a/cpukit/posix/src/sigaddset.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * 3.3.3 Manipulate Signal Sets, P1003.1b-1993, p. 69
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <pthread.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
-#include <rtems/posix/psignal.h>
-#include <rtems/posix/seterr.h>
-
-int sigaddset(
- sigset_t *set,
- int signo
-)
-{
- if ( !set )
- set_errno_and_return_minus_one( EINVAL );
-
- if ( !signo )
- return 0;
-
- if ( !is_valid_signo(signo) )
- set_errno_and_return_minus_one( EINVAL );
-
- *set |= signo_to_mask(signo);
- return 0;
-}
diff --git a/cpukit/posix/src/sigdelset.c b/cpukit/posix/src/sigdelset.c
deleted file mode 100644
index ac5e1adfa6..0000000000
--- a/cpukit/posix/src/sigdelset.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * 3.3.3 Manipulate Signal Sets, P1003.1b-1993, p. 69
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <pthread.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
-#include <rtems/posix/psignal.h>
-#include <rtems/posix/seterr.h>
-
-/*
- * 3.3.3 Manipulate Signal Sets, P1003.1b-1993, p. 69
- */
-
-int sigdelset(
- sigset_t *set,
- int signo
-)
-{
- if ( !set )
- set_errno_and_return_minus_one( EINVAL );
-
- if ( !signo )
- return 0;
-
- if ( !is_valid_signo(signo) )
- set_errno_and_return_minus_one( EINVAL );
-
- *set &= ~signo_to_mask(signo);
- return 0;
-}
-
diff --git a/cpukit/posix/src/sigemptyset.c b/cpukit/posix/src/sigemptyset.c
deleted file mode 100644
index d771f3ede2..0000000000
--- a/cpukit/posix/src/sigemptyset.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * 3.3.3 Manipulate Signal Sets, P1003.1b-1993, p. 69
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <pthread.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
-#include <rtems/posix/psignal.h>
-#include <rtems/posix/seterr.h>
-
-int sigemptyset(
- sigset_t *set
-)
-{
- if ( !set )
- set_errno_and_return_minus_one( EINVAL );
-
- *set = 0;
- return 0;
-}
-
diff --git a/cpukit/posix/src/sigfillset.c b/cpukit/posix/src/sigfillset.c
deleted file mode 100644
index b3a0447602..0000000000
--- a/cpukit/posix/src/sigfillset.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * 3.3.3 Manipulate Signal Sets, P1003.1b-1993, p. 69
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <pthread.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
-#include <rtems/posix/psignal.h>
-#include <rtems/posix/seterr.h>
-
-int sigfillset(
- sigset_t *set
-)
-{
- if ( !set )
- set_errno_and_return_minus_one( EINVAL );
-
- *set = SIGNAL_ALL_MASK;
- return 0;
-}
-
diff --git a/cpukit/posix/src/sigismember.c b/cpukit/posix/src/sigismember.c
deleted file mode 100644
index df617ad0bc..0000000000
--- a/cpukit/posix/src/sigismember.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * 3.3.3 Manipulate Signal Sets, P1003.1b-1993, p. 69
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <pthread.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
-#include <rtems/posix/psignal.h>
-#include <rtems/posix/seterr.h>
-
-int sigismember(
- const sigset_t *set,
- int signo
-)
-{
- if ( !set )
- set_errno_and_return_minus_one( EINVAL );
-
- if ( !signo )
- return 0;
-
- if ( !is_valid_signo(signo) )
- set_errno_and_return_minus_one( EINVAL );
-
- if ( *set & signo_to_mask(signo) )
- return 1;
-
- return 0;
-}
-
diff --git a/cpukit/posix/src/signal_2.c b/cpukit/posix/src/signal_2.c
deleted file mode 100644
index 2134339e76..0000000000
--- a/cpukit/posix/src/signal_2.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * signal(2) - Install signal handler
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <signal.h>
-#include <errno.h>
-
-typedef void (*sighandler_t)(int);
-
-sighandler_t signal(
- int signum,
- sighandler_t handler
-)
-{
- struct sigaction s;
- struct sigaction old;
-
- s.sa_handler = handler ;
- sigemptyset(&s.sa_mask);
-
- /*
- * Depending on which system we want to behave like, one of
- * the following versions should be chosen.
- */
-
-/* #define signal_like_linux */
-
-#if defined(signal_like_linux)
- s.sa_flags = SA_RESTART | SA_INTERRUPT | SA_NOMASK;
- s.sa_restorer= NULL ;
-#elif defined(signal_like_SVR4)
- s.sa_flags = SA_RESTART;
-#else
- s.sa_flags = 0;
-#endif
-
- sigaction( signum, &s, &old );
- return (sighandler_t) old.sa_handler;
-}
diff --git a/cpukit/posix/src/sigpending.c b/cpukit/posix/src/sigpending.c
deleted file mode 100644
index 2699645150..0000000000
--- a/cpukit/posix/src/sigpending.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * 3.3.6 Examine Pending Signals, P1003.1b-1993, p. 75
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <signal.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
-#include <rtems/posix/psignal.h>
-#include <rtems/posix/seterr.h>
-
-int sigpending(
- sigset_t *set
-)
-{
- POSIX_API_Control *api;
-
- if ( !set )
- set_errno_and_return_minus_one( EINVAL );
-
- api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
-
- *set = api->signals_pending | _POSIX_signals_Pending;
-
- return 0;
-}
diff --git a/cpukit/posix/src/sigprocmask.c b/cpukit/posix/src/sigprocmask.c
deleted file mode 100644
index 530975c6b6..0000000000
--- a/cpukit/posix/src/sigprocmask.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * 3.3.5 Examine and Change Blocked Signals, P1003.1b-1993, p. 73
- *
- * NOTE: P1003.1c/D10, p. 37 adds pthread_sigmask().
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <pthread.h>
-#include <signal.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
-#include <rtems/posix/psignal.h>
-
-int sigprocmask(
- int how,
- const sigset_t *set,
- sigset_t *oset
-)
-{
- /*
- * P1003.1c/Draft 10, p. 38 maps sigprocmask to pthread_sigmask.
- */
-
- return pthread_sigmask( how, set, oset );
-}
diff --git a/cpukit/posix/src/sigqueue.c b/cpukit/posix/src/sigqueue.c
deleted file mode 100644
index 7e901565e0..0000000000
--- a/cpukit/posix/src/sigqueue.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * 3.3.9 Queue a Signal to a Process, P1003.1b-1993, p. 78
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <pthread.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
-#include <rtems/posix/psignal.h>
-
-int sigqueue(
- pid_t pid,
- int signo,
- const union sigval value
-)
-{
- return killinfo( pid, signo, &value );
-}
-
diff --git a/cpukit/posix/src/sigsuspend.c b/cpukit/posix/src/sigsuspend.c
deleted file mode 100644
index 898f1d0ced..0000000000
--- a/cpukit/posix/src/sigsuspend.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * 3.3.7 Wait for a Signal, P1003.1b-1993, p. 75
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <signal.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
-#include <rtems/posix/psignal.h>
-
-int sigsuspend(
- const sigset_t *sigmask
-)
-{
- sigset_t saved_signals_blocked;
- sigset_t all_signals;
- int status;
- POSIX_API_Control *api;
-
- api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
-
- status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked );
-
- (void) sigfillset( &all_signals );
-
- status = sigtimedwait( &all_signals, NULL, NULL );
-
- (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL );
-
- return status;
-}
diff --git a/cpukit/posix/src/sigtimedwait.c b/cpukit/posix/src/sigtimedwait.c
deleted file mode 100644
index b3b2de247d..0000000000
--- a/cpukit/posix/src/sigtimedwait.c
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * 3.3.8 Synchronously Accept a Signal, P1003.1b-1993, p. 76
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <pthread.h>
-#include <signal.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
-#include <rtems/posix/psignal.h>
-#include <rtems/posix/seterr.h>
-#include <rtems/posix/time.h>
-
-int _POSIX_signals_Get_highest(
- sigset_t set
-)
-{
- int signo;
-
- for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
- if ( set & signo_to_mask( signo ) )
- return signo;
- }
-
-/* XXX - add __SIGFIRSTNOTRT or something like that to newlib siginfo.h */
-
- for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
- if ( set & signo_to_mask( signo ) )
- return signo;
- }
-
- return 0;
-}
-
-int sigtimedwait(
- const sigset_t *set,
- siginfo_t *info,
- const struct timespec *timeout
-)
-{
- Thread_Control *the_thread;
- POSIX_API_Control *api;
- Watchdog_Interval interval;
- siginfo_t signal_information;
- siginfo_t *the_info;
- int signo;
-
- the_info = ( info ) ? info : &signal_information;
-
- the_thread = _Thread_Executing;
-
- api = the_thread->API_Extensions[ THREAD_API_POSIX ];
-
- /*
- * What if they are already pending?
- */
-
- /* API signals pending? */
-
- if ( *set & api->signals_pending ) {
- /* XXX real info later */
- the_info->si_signo = _POSIX_signals_Get_highest( api->signals_pending );
- _POSIX_signals_Clear_signals( api, the_info->si_signo, the_info,
- FALSE, FALSE );
- the_info->si_code = SI_USER;
- the_info->si_value.sival_int = 0;
- return the_info->si_signo;
- }
-
- /* Process pending signals? */
-
- if ( *set & _POSIX_signals_Pending ) {
- signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending );
- _POSIX_signals_Clear_signals( api, signo, the_info, TRUE, FALSE );
-
- the_info->si_signo = signo;
- the_info->si_code = SI_USER;
- the_info->si_value.sival_int = 0;
- return signo;
- }
-
- interval = 0;
- if ( timeout ) {
-
- if (timeout->tv_nsec < 0 || timeout->tv_nsec >= TOD_NANOSECONDS_PER_SECOND)
- set_errno_and_return_minus_one( EINVAL );
-
- interval = _POSIX_Timespec_to_interval( timeout );
- }
-
- the_info->si_signo = -1;
-
- _Thread_Disable_dispatch();
- the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
- the_thread->Wait.return_code = EINTR;
- the_thread->Wait.option = *set;
- the_thread->Wait.return_argument = (void *) the_info;
- _Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue );
- _Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval );
- _Thread_Enable_dispatch();
-
- /*
- * When the thread is set free by a signal, it is need to eliminate
- * the signal.
- */
-
- _POSIX_signals_Clear_signals( api, the_info->si_signo, the_info,
- FALSE, FALSE );
-
- errno = _Thread_Executing->Wait.return_code;
- return the_info->si_signo;
-}
diff --git a/cpukit/posix/src/sigwait.c b/cpukit/posix/src/sigwait.c
deleted file mode 100644
index 8270fb90ed..0000000000
--- a/cpukit/posix/src/sigwait.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * 3.3.8 Synchronously Accept a Signal, P1003.1b-1993, p. 76
- *
- * NOTE: P1003.1c/D10, p. 39 adds sigwait().
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <pthread.h>
-#include <signal.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
-#include <rtems/posix/psignal.h>
-
-int sigwait(
- const sigset_t *set,
- int *sig
-)
-{
- int status;
-
- status = sigtimedwait( set, NULL, NULL );
-
- if ( status != -1 ) {
- if ( sig )
- *sig = status;
- return 0;
- }
-
- return errno;
-}
-
diff --git a/cpukit/posix/src/sigwaitinfo.c b/cpukit/posix/src/sigwaitinfo.c
deleted file mode 100644
index b91952ee9b..0000000000
--- a/cpukit/posix/src/sigwaitinfo.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * 3.3.8 Synchronously Accept a Signal, P1003.1b-1993, p. 76
- *
- * NOTE: P1003.1c/D10, p. 39 adds sigwait().
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <signal.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
-#include <rtems/posix/psignal.h>
-
-int sigwaitinfo(
- const sigset_t *set,
- siginfo_t *info
-)
-{
- return sigtimedwait( set, info, NULL );
-}
-
diff --git a/cpukit/posix/src/sleep.c b/cpukit/posix/src/sleep.c
deleted file mode 100644
index dec0ed0a54..0000000000
--- a/cpukit/posix/src/sleep.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * 3.4.3 Delay Process Execution, P1003.1b-1993, p. 81
- *
- * $Id$
- */
-
-#include <time.h>
-#include <unistd.h>
-
-#include <rtems/system.h>
-
-
-unsigned int sleep(
- unsigned int seconds
-)
-{
- /* XXX can we get away with this implementation? */
- struct timespec tp;
- struct timespec tm;
-
- tp.tv_sec = seconds;
- tp.tv_nsec = 0;
-
- nanosleep( &tp, &tm );
-
- return tm.tv_sec; /* seconds remaining */
-}
diff --git a/cpukit/posix/src/sysconf.c b/cpukit/posix/src/sysconf.c
deleted file mode 100644
index c8b82b65c8..0000000000
--- a/cpukit/posix/src/sysconf.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * $Id$
- */
-
-#include <time.h>
-#include <unistd.h>
-
-#include <rtems/system.h>
-
-/*PAGE
- *
- * 4.8.1 Get Configurable System Variables, P1003.1b-1993, p. 95
- */
-
-long sysconf(
- int name
-)
-{
- return POSIX_NOT_IMPLEMENTED();
-}
diff --git a/cpukit/posix/src/testcancel.c b/cpukit/posix/src/testcancel.c
deleted file mode 100644
index 40717c5ab0..0000000000
--- a/cpukit/posix/src/testcancel.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * $Id$
- */
-
-#include <pthread.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/posix/cancel.h>
-#include <rtems/posix/pthread.h>
-#include <rtems/posix/threadsup.h>
-
-/*PAGE
- *
- * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183
- */
-
-void pthread_testcancel( void )
-{
- POSIX_API_Control *thread_support;
-
- thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
-
- if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
- thread_support->cancelation_requested )
- _POSIX_Thread_cancel_run( _Thread_Executing );
-}
diff --git a/cpukit/posix/src/time.c b/cpukit/posix/src/time.c
deleted file mode 100644
index 1eb96d5264..0000000000
--- a/cpukit/posix/src/time.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * $Id$
- */
-
-#include <assert.h>
-#include <time.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/tod.h>
-
-#include <rtems/posix/seterr.h>
-#include <rtems/posix/time.h>
-
-/*PAGE
- *
- * 4.5.1 Get System Time, P1003.1b-1993, p. 91
- */
-
-/* Using the implementation in newlib */
-#if 0
-time_t time(
- time_t *tloc
-)
-{
- time_t seconds_since_epoch;
-
- /*
- * No error is the time of day is not set. For RTEMS the system time
- * starts out at the rtems epoch.
- */
-
- /*
- * Internally the RTEMS epoch is 1988. This must be taken into account.
- */
-
- seconds_since_epoch = _TOD_Seconds_since_epoch;
-
- seconds_since_epoch += POSIX_TIME_SECONDS_1970_THROUGH_1988;
-
- if ( tloc )
- *tloc = seconds_since_epoch;
-
- return seconds_since_epoch;
-}
-#endif
diff --git a/cpukit/posix/src/types.c b/cpukit/posix/src/types.c
deleted file mode 100644
index 88fc0f5af4..0000000000
--- a/cpukit/posix/src/types.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * This file is the shell of what it initially was and is now misnamed.
- *
- * $Id$
- */
-
-#include <limits.h>
-#include <errno.h>
-#include <string.h>
-#include <sys/types.h>
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/posix/seterr.h>
-
-/*
- * TEMPORARY
- */
-
-#include <assert.h>
-
-int POSIX_MP_NOT_IMPLEMENTED()
-{
- assert( 0 );
- return 0;
-}
-
-int POSIX_BOTTOM_REACHED()
-{
- assert( 0 );
- return 0;
-}
-
-int POSIX_NOT_IMPLEMENTED()
-{
- assert( 0 );
- return 0;
-}
-
-/*
- * END OF TEMPORARY
- */
-
diff --git a/cpukit/posix/src/wait.c b/cpukit/posix/src/wait.c
deleted file mode 100644
index bbef04a2eb..0000000000
--- a/cpukit/posix/src/wait.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * waitpid() - POSIX 1003.1b 3.2.1
- *
- * $Id$
- */
-
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <errno.h>
-
-int wait(
- int *stat_loc
-)
-{
- errno = ENOSYS;
- return -1;
-}
diff --git a/cpukit/posix/src/waitpid.c b/cpukit/posix/src/waitpid.c
deleted file mode 100644
index f20161b5a9..0000000000
--- a/cpukit/posix/src/waitpid.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * wait() - POSIX 1003.1b 3.2.1
- *
- * $Id$
- */
-
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <errno.h>
-
-int wait(
- int *stat_loc
-)
-{
- errno = ENOSYS;
- return -1;
-}
diff --git a/cpukit/pppd/Makefile.am b/cpukit/pppd/Makefile.am
deleted file mode 100644
index 1c860d5a14..0000000000
--- a/cpukit/pppd/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-LIBNAME = lib.a
-LIB = $(ARCH)/$(LIBNAME)
-
-# What to do about main.c?
-C_FILES = auth.c cbcp.c ccp.c chap.c chap_ms.c chat.c demand.c fsm.c ipcp.c \
- ipxcp.c lcp.c magic.c options.c upap.c md4.c md5.c rtems-ppp.c
-C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
-
-OBJS = $(C_O_FILES)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../automake/lib.am
-
-#
-# Add local stuff here using +=
-#
-
-# DEFINES += -D_COMPILING_BSD_KERNEL_ -DKERNEL -DINET -DNFS -DDIAGNOSTIC \
-# -DBOOTP_COMPAT
-
-$(LIB): $(OBJS)
- $(make-library)
-
-EXTRA_FILES = modem_example/16550.h modem_example/README \
- modem_example/modem.c modem_example/modem.h modem_example/ppp.c \
- modem_example/ppp.h modem_example/pppcompress.c
-
-all-local: $(ARCH) $(OBJS) $(LIB)
-
-.PRECIOUS: $(LIB)
-
-EXTRA_DIST = README STATUS auth.c cbcp.c cbcp.h ccp.c ccp.h chap.c chap.h \
- chap_ms.c chap_ms.h chat.c demand.c fsm.c fsm.h ipcp.c ipcp.h ipxcp.c \
- ipxcp.h lcp.c lcp.h magic.c magic.h main.c md4.c md4.h md5.c md5.h \
- options.c patchlevel.h pathnames.h ppp_tty.c pppd.h rtems-ppp.c upap.c \
- upap.h $(EXTRA_FILES)
-
-include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/pppd/README b/cpukit/pppd/README
deleted file mode 100644
index 8002d3e280..0000000000
--- a/cpukit/pppd/README
+++ /dev/null
@@ -1,58 +0,0 @@
-#
-# $Id$
-#
-
-This directory contains a port of ppp-2.3.5. The official site for
-the original source for this PPP implementation is:
-
-ftp://cs.anu.edu.au/pub/software/ppp
-
-NOTE: As of 11/30/1999, the current version of this source is 2.3.10.
-
-The port was performed by Tomasz Domin <dot@comarch.pl> of ComArch SA
-and has only been tested on the mpc823. The modem driver should
-work with minor modifications on other systems.
-=================================================================
-Some comments:
-
-+ "SetStatusInfo is a function which displays given message on
- bottom side of the screen."
-
- The issue of how to deal with SetStatusInfo in a generic, portable
- fashion is still open.
-
-+ "Dialer returns positive integer when an error occurs, and negative one
- which is parsed from modem aswer, when connection is done (for example
- -28000 if connection speed is 28000 baud ...)"
-
-+ PPP_User/PPP_Password
- "When this field is set, it is sent to the server when there is need
- to login ....
- When it is blank - it is using other method of authentification ... or
- none ...
- PPP_Password is also used in CHAT and PAP - because there is no
- configuration files in RTEMS ..."
-
- This falls into the general question of how to generally configure this.
-
-+ ConnectionStatus
-
- This is the method of synchronization between pppd task and others.
- ConnectionStatus field is set by pppd - when connection occurs it`s state
- is set to Connected. WantConnection is set by client application (and
- the appriopriate event is sent then) so pppd knows what user wants to do ...
-
-+ Around line 270 of main.c, there is code to change the default
- nameserver... why?
-
- Becouse in my application user can change it anytime ... - without need of
- rebooting the system
- When PPP connection is configured there is needed additional info about
- nameservers - PPP layer cant discover them itself
-
-
-
-
-
-
-
diff --git a/cpukit/pppd/STATUS b/cpukit/pppd/STATUS
deleted file mode 100644
index 95ef16cefc..0000000000
--- a/cpukit/pppd/STATUS
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# $Id$
-#
-
-Overall, this code should still be considered in its early stages. It
-works but has some distance to go before it is fully documented and
-easily configurable.
-
-+ Compare the code to the original 2.3.5 and eliminate spurious changes.
-
-+ Update the code to 2.3.10.
-
-+ Eliminate items specific to Tomasz' system. In particular, the
- code reports status and gets configuration information in a system
- specific manner. main.c is particularly guilty of this although
- other files suffer from this also.
-
-+ Find comments in Polish and get Tomasz to translate them. :)
-
-+ Add netdemo showing configuration and initialization.
-
-+ Get feature list.
-
-+ Document dialer setup.
-
-+ Only modem driver is system specific so there is the possibility
- that shareable code exists in it.
diff --git a/cpukit/pppd/auth.c b/cpukit/pppd/auth.c
deleted file mode 100644
index f5cff9ac3d..0000000000
--- a/cpukit/pppd/auth.c
+++ /dev/null
@@ -1,843 +0,0 @@
-/*
- * auth.c - PPP authentication and phase control.
- *
- * Copyright (c) 1993 The Australian National University.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by the Australian National University. The name of the University
- * may not be used to endorse or promote products derived from this
- * software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Copyright (c) 1989 Carnegie Mellon University.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by Carnegie Mellon University. The name of the
- * University may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#ifndef lint
-/* static char rcsid[] = "$Id$"; */
-#endif
-
-#include <stdio.h>
-#include <stddef.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <syslog.h>
-#include <pwd.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/socket.h>
-
-#include <fcntl.h>
-#if defined(_PATH_LASTLOG) && defined(_linux_)
-#include <lastlog.h>
-#endif
-
-#include <netdb.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-/* #include <stbconfig.h> */
-
-#include "pppd.h"
-#include "fsm.h"
-#include "lcp.h"
-#include "ipcp.h"
-#include "upap.h"
-#include "chap.h"
-#ifdef CBCP_SUPPORT
-#include "cbcp.h"
-#endif
-#include "pathnames.h"
-
-/* Used for storing a sequence of words. Usually malloced. */
-struct wordlist {
- struct wordlist *next;
- char word[1];
-};
-
-/* Bits in scan_authfile return value */
-#define NONWILD_SERVER 1
-#define NONWILD_CLIENT 2
-
-#define ISWILD(word) (word[0] == '*' && word[1] == 0)
-
-#define FALSE 0
-#define TRUE 1
-
-/* The name by which the peer authenticated itself to us. */
-char peer_authname[MAXNAMELEN];
-
-/* Records which authentication operations haven't completed yet. */
-static int auth_pending[NUM_PPP];
-
-/* Set if we have successfully called plogin() */
-static int logged_in;
-
-/* Set if we have run the /etc/ppp/auth-up script. */
-static int did_authup;
-
-/* List of addresses which the peer may use. */
-static struct wordlist *addresses[NUM_PPP];
-
-/* Number of network protocols which we have opened. */
-static int num_np_open;
-
-/* Number of network protocols which have come up. */
-static int num_np_up;
-
-/* Set if we got the contents of passwd[] from the pap-secrets file. */
-static int passwd_from_file;
-
-/* Bits in auth_pending[] */
-#define PAP_WITHPEER 1
-#define PAP_PEER 2
-#define CHAP_WITHPEER 4
-#define CHAP_PEER 8
-
-extern char *crypt __P((const char *, const char *));
-
-/* Prototypes for procedures local to this file. */
-
-static void network_phase __P((int));
-static void check_idle __P((void *));
-static void connect_time_expired __P((void *));
-static int plogin __P((char *, char *, char **, int *));
-static void plogout __P((void));
-static int null_login __P((int));
-static int get_pap_passwd __P((char *));
-static int have_pap_secret __P((void));
-static int have_chap_secret __P((char *, char *, u_int32_t));
-static int ip_addr_check __P((u_int32_t, struct wordlist *));
-static int scan_authfile __P((FILE *, char *, char *, u_int32_t, char *,
- struct wordlist **, char *));
-static void free_wordlist __P((struct wordlist *));
-static void auth_script __P((char *));
-static void set_allowed_addrs __P((int, struct wordlist *));
-
-/*
- * An Open on LCP has requested a change from Dead to Establish phase.
- * Do what's necessary to bring the physical layer up.
- */
-void
-link_required(unit)
- int unit;
-{
-}
-
-/*
- * LCP has terminated the link; go to the Dead phase and take the
- * physical layer down.
- */
-void
-link_terminated(unit)
- int unit;
-{
- if (phase == PHASE_DEAD)
- return;
- if (logged_in)
- plogout();
- phase = PHASE_DEAD;
- syslog(LOG_NOTICE, "Connection terminated.");
-}
-
-/*
- * LCP has gone down; it will either die or try to re-establish.
- */
-void
-link_down(unit)
- int unit;
-{
- int i;
- struct protent *protp;
-
- did_authup = 0;
- for (i = 0; (protp = protocols[i]) != NULL; ++i) {
- if (!protp->enabled_flag)
- continue;
- if (protp->protocol != PPP_LCP && protp->lowerdown != NULL)
- (*protp->lowerdown)(unit);
- if (protp->protocol < 0xC000 && protp->close != NULL)
- (*protp->close)(unit, "LCP down");
- }
- num_np_open = 0;
- num_np_up = 0;
- if (phase != PHASE_DEAD)
- phase = PHASE_TERMINATE;
-}
-
-/*
- * The link is established.
- * Proceed to the Dead, Authenticate or Network phase as appropriate.
- */
-void
-link_established(unit)
- int unit;
-{
- int auth;
- lcp_options *wo = &lcp_wantoptions[unit];
- lcp_options *go = &lcp_gotoptions[unit];
- lcp_options *ho = &lcp_hisoptions[unit];
- int i;
- struct protent *protp;
-
- /*
- * Tell higher-level protocols that LCP is up.
- */
- for (i = 0; (protp = protocols[i]) != NULL; ++i)
- if (protp->protocol != PPP_LCP && protp->enabled_flag
- && protp->lowerup != NULL)
- (*protp->lowerup)(unit);
-
- if (auth_required && !(go->neg_chap || go->neg_upap)) {
- /*
- * We wanted the peer to authenticate itself, and it refused:
- * treat it as though it authenticated with PAP using a username
- * of "" and a password of "". If that's not OK, boot it out.
- */
- if (!wo->neg_upap || !null_login(unit)) {
- lcp_close(unit, "peer refused to authenticate");
- return;
- }
- }
-
- phase = PHASE_AUTHENTICATE;
- auth = 0;
- if (go->neg_chap) {
- ChapAuthPeer(unit, our_name, go->chap_mdtype);
- auth |= CHAP_PEER;
- } else if (go->neg_upap) {
- upap_authpeer(unit);
- auth |= PAP_PEER;
- }
- if (ho->neg_chap) {
- ChapAuthWithPeer(unit, user, ho->chap_mdtype);
- auth |= CHAP_WITHPEER;
- } else if (ho->neg_upap) {
- if (passwd[0] == 0) {
- passwd_from_file = 1;
- get_pap_passwd(passwd);
- }
- upap_authwithpeer(unit, user, passwd);
- auth |= PAP_WITHPEER;
- }
- auth_pending[unit] = auth;
-
- if (!auth)
- network_phase(unit);
-}
-
-/*
- * Proceed to the network phase.
- */
-static void
-network_phase(unit)
- int unit;
-{
- int i;
- struct protent *protp;
- lcp_options *go = &lcp_gotoptions[unit];
-
- /*
- * If the peer had to authenticate, run the auth-up script now.
- */
- if ((go->neg_chap || go->neg_upap) && !did_authup) {
- auth_script(_PATH_AUTHUP);
- did_authup = 1;
- }
-
-#ifdef CBCP_SUPPORT
- /*
- * If we negotiated callback, do it now.
- */
- if (go->neg_cbcp) {
- phase = PHASE_CALLBACK;
- (*cbcp_protent.open)(unit);
- return;
- }
-#endif
-
- phase = PHASE_NETWORK;
-
- for (i = 0; (protp = protocols[i]) != NULL; ++i)
- if (protp->protocol < 0xC000 && protp->enabled_flag
- && protp->open != NULL) {
- (*protp->open)(unit);
- if (protp->protocol != PPP_CCP)
- ++num_np_open;
- }
-
- if (num_np_open == 0)
- /* nothing to do */
- lcp_close(0, "No network protocols running");
-}
-
-/*
- * The peer has failed to authenticate himself using `protocol'.
- */
-void
-auth_peer_fail(unit, protocol)
- int unit, protocol;
-{
- /*
- * Authentication failure: take the link down
- */
- lcp_close(unit, "Authentication failed");
-}
-
-/*
- * The peer has been successfully authenticated using `protocol'.
- */
-void
-auth_peer_success(unit, protocol, name, namelen)
- int unit, protocol;
- char *name;
- int namelen;
-{
- int bit;
-
- switch (protocol) {
- case PPP_CHAP:
- bit = CHAP_PEER;
- break;
- case PPP_PAP:
- bit = PAP_PEER;
- break;
- default:
- syslog(LOG_WARNING, "auth_peer_success: unknown protocol %x",
- protocol);
- return;
- }
-
- /*
- * Save the authenticated name of the peer for later.
- */
- if (namelen > sizeof(peer_authname) - 1)
- namelen = sizeof(peer_authname) - 1;
- BCOPY(name, peer_authname, namelen);
- peer_authname[namelen] = 0;
- /*
- * If there is no more authentication still to be done,
- * proceed to the network (or callback) phase.
- */
- if ((auth_pending[unit] &= ~bit) == 0)
- network_phase(unit);
-}
-
-/*
- * We have failed to authenticate ourselves to the peer using `protocol'.
- */
-void
-auth_withpeer_fail(unit, protocol)
- int unit, protocol;
-{
- if (passwd_from_file)
- BZERO(passwd, MAXSECRETLEN);
- /*
- * We've failed to authenticate ourselves to our peer.
- * He'll probably take the link down, and there's not much
- * we can do except wait for that.
- */
-}
-
-/*
- * We have successfully authenticated ourselves with the peer using `protocol'.
- */
-void
-auth_withpeer_success(unit, protocol)
- int unit, protocol;
-{
- int bit;
-
- switch (protocol) {
- case PPP_CHAP:
- bit = CHAP_WITHPEER;
- break;
- case PPP_PAP:
- if (passwd_from_file)
- BZERO(passwd, MAXSECRETLEN);
- bit = PAP_WITHPEER;
- break;
- default:
-
- bit = 0;
- }
-
- /*
- * If there is no more authentication still being done,
- * proceed to the network (or callback) phase.
- */
- if ((auth_pending[unit] &= ~bit) == 0)
- network_phase(unit);
-}
-
-
-/*
- * np_up - a network protocol has come up.
- */
-void
-np_up(unit, proto)
- int unit, proto;
-{
- if (num_np_up == 0) {
- /*
- * At this point we consider that the link has come up successfully.
- */
- need_holdoff = 0;
-
- if (idle_time_limit > 0)
- TIMEOUT(check_idle, NULL, idle_time_limit);
-
- /*
- * Set a timeout to close the connection once the maximum
- * connect time has expired.
- */
- if (maxconnect > 0)
- TIMEOUT(connect_time_expired, 0, maxconnect);
-
- /*
- * Detach now, if the updetach option was given.
- */
- if (nodetach == -1)
- detach();
- }
- ++num_np_up;
-}
-
-/*
- * np_down - a network protocol has gone down.
- */
-void
-np_down(unit, proto)
- int unit, proto;
-{
- if (--num_np_up == 0 && idle_time_limit > 0) {
- UNTIMEOUT(check_idle, NULL);
- }
-}
-
-/*
- * np_finished - a network protocol has finished using the link.
- */
-void
-np_finished(unit, proto)
- int unit, proto;
-{
- if (--num_np_open <= 0) {
- /* no further use for the link: shut up shop. */
- lcp_close(0, "No network protocols running");
- }
-}
-
-/*
- * check_idle - check whether the link has been idle for long
- * enough that we can shut it down.
- */
-static void
-check_idle(arg)
- void *arg;
-{
- struct ppp_idle idle;
- time_t itime;
-
- if (!get_idle_time(0, &idle))
- return;
- itime = MIN(idle.xmit_idle, idle.recv_idle);
- if (itime >= idle_time_limit) {
- /* link is idle: shut it down. */
- syslog(LOG_INFO, "Terminating connection due to lack of activity.");
- lcp_close(0, "Link inactive");
- } else {
- TIMEOUT(check_idle, NULL, idle_time_limit - itime);
- }
-}
-
-/*
- * connect_time_expired - log a message and close the connection.
- */
-static void
-connect_time_expired(arg)
- void *arg;
-{
- syslog(LOG_INFO, "Connect time expired");
- lcp_close(0, "Connect time expired"); /* Close connection */
-}
-
-/*
- * auth_check_options - called to check authentication options.
- */
-void
-auth_check_options()
-{
- lcp_options *wo = &lcp_wantoptions[0];
- int can_auth;
- ipcp_options *ipwo = &ipcp_wantoptions[0];
- u_int32_t remote;
-
- /* Default our_name to hostname, and user to our_name */
- if (our_name[0] == 0 || usehostname)
- strcpy(our_name, hostname);
- if (user[0] == 0)
- strcpy(user, our_name);
-
- /* If authentication is required, ask peer for CHAP or PAP. */
- if (auth_required && !wo->neg_chap && !wo->neg_upap) {
- wo->neg_chap = 1;
- wo->neg_upap = 1;
- }
-
- /*
- * Check whether we have appropriate secrets to use
- * to authenticate the peer.
- */
- can_auth = wo->neg_upap && (uselogin || have_pap_secret());
- if (!can_auth && wo->neg_chap) {
- remote = ipwo->accept_remote? 0: ipwo->hisaddr;
- can_auth = have_chap_secret(remote_name, our_name, remote);
- }
-
- if (auth_required && !can_auth) {
- option_error("peer authentication required but no suitable secret(s) found\n");
- if (remote_name[0] == 0)
- option_error("for authenticating any peer to us (%s)\n", our_name);
- else
- option_error("for authenticating peer %s to us (%s)\n",
- remote_name, our_name);
- exit(1);
- }
-
- /*
- * Check whether the user tried to override certain values
- * set by root.
- */
- if (!auth_required && auth_req_info.priv > 0) {
- if (!default_device && devnam_info.priv == 0) {
- option_error("can't override device name when noauth option used");
- exit(1);
- }
- if ((connector != NULL && connector_info.priv == 0)
- || (disconnector != NULL && disconnector_info.priv == 0)
- || (welcomer != NULL && welcomer_info.priv == 0)) {
- option_error("can't override connect, disconnect or welcome");
- option_error("option values when noauth option used");
- exit(1);
- }
- }
-}
-
-/*
- * auth_reset - called when LCP is starting negotiations to recheck
- * authentication options, i.e. whether we have appropriate secrets
- * to use for authenticating ourselves and/or the peer.
- */
-void
-auth_reset(unit)
- int unit;
-{
- lcp_options *go = &lcp_gotoptions[unit];
- lcp_options *ao = &lcp_allowoptions[0];
- ipcp_options *ipwo = &ipcp_wantoptions[0];
- u_int32_t remote;
-
- ao->neg_upap = !refuse_pap /*&& (passwd[0] != 0 || get_pap_passwd(NULL))*/;
- ao->neg_chap = !refuse_chap
- && have_chap_secret(user, remote_name, (u_int32_t)0);
-
- if (go->neg_upap && !uselogin && !have_pap_secret())
- go->neg_upap = 0;
- if (go->neg_chap) {
- remote = ipwo->accept_remote? 0: ipwo->hisaddr;
- if (!have_chap_secret(remote_name, our_name, remote))
- go->neg_chap = 0;
- }
-}
-
-
-/*
- * check_passwd - Check the user name and passwd against the PAP secrets
- * file. If requested, also check against the system password database,
- * and login the user if OK.
- *
- * returns:
- * UPAP_AUTHNAK: Authentication failed.
- * UPAP_AUTHACK: Authentication succeeded.
- * In either case, msg points to an appropriate message.
- */
-int
-check_passwd(unit, auser, userlen, apasswd, passwdlen, msg, msglen)
- int unit;
- char *auser;
- int userlen;
- char *apasswd;
- int passwdlen;
- char **msg;
- int *msglen;
-{
-
-
- return UPAP_AUTHNAK;
-}
-
-
-/*
- * plogin - Check the user name and password against the system
- * password database, and login the user if OK.
- *
- * returns:
- * UPAP_AUTHNAK: Login failed.
- * UPAP_AUTHACK: Login succeeded.
- * In either case, msg points to an appropriate message.
- */
-
-static int
-plogin(user, passwd, msg, msglen)
- char *user;
- char *passwd;
- char **msg;
- int *msglen;
-{
- syslog(LOG_INFO, "user %s logged in", user);
- logged_in = TRUE;
-
- return (UPAP_AUTHACK);
-}
-
-/*
- * plogout - Logout the user.
- */
-static void
-plogout()
-{
-
- logged_in = FALSE;
-}
-
-
-/*
- * null_login - Check if a username of "" and a password of "" are
- * acceptable, and iff so, set the list of acceptable IP addresses
- * and return 1.
- */
-static int
-null_login(unit)
- int unit;
-{
- return 1;
-}
-
-
-/*
- * get_pap_passwd - get a password for authenticating ourselves with
- * our peer using PAP. Returns 1 on success, 0 if no suitable password
- * could be found.
- */
-
-static int
-get_pap_passwd(passwd)
- char *passwd;
-{
-#if 0
-/* XXX PPPConfiguration */
- GlobalSystemStatus *stat;
- stat=LockSTBSystemParam();
- strncpy(passwd, stat->PPP_Password, MAXSECRETLEN);
- UnlockSTBSystemParam();
-#endif
- return 1;
-}
-
-
-/*
- * have_pap_secret - check whether we have a PAP file with any
- * secrets that we could possibly use for authenticating the peer.
- */
-static int
-have_pap_secret()
-{
- return 1;
-}
-
-
-/*
- * have_chap_secret - check whether we have a CHAP file with a
- * secret that we could possibly use for authenticating `client'
- * on `server'. Either can be the null string, meaning we don't
- * know the identity yet.
- */
-static int
-have_chap_secret(client, server, remote)
- char *client;
- char *server;
- u_int32_t remote;
-{
-
- return 1;
-}
-
-
-/*
- * get_secret - open the CHAP secret file and return the secret
- * for authenticating the given client on the given server.
- * (We could be either client or server).
- */
-int
-get_secret(unit, client, server, secret, secret_len, save_addrs)
- int unit;
- char *client;
- char *server;
- char *secret;
- int *secret_len;
- int save_addrs;
-{
-#if 0
-/* XXX PPPConfiguration */
- int len;
- GlobalSystemStatus *stat;
- stat=LockSTBSystemParam();
- len=strlen(stat->PPP_Password);
- strcpy( secret,stat->PPP_Password);
- UnlockSTBSystemParam();
-
- *secret_len = len;
-#endif
- return 1;
-}
-
-/*
- * set_allowed_addrs() - set the list of allowed addresses.
- */
-static void
-set_allowed_addrs(unit, addrs)
- int unit;
- struct wordlist *addrs;
-{
-
-}
-
-/*
- * auth_ip_addr - check whether the peer is authorized to use
- * a given IP address. Returns 1 if authorized, 0 otherwise.
- */
-int
-auth_ip_addr(unit, addr)
- int unit;
- u_int32_t addr;
-{
- return ip_addr_check(addr, addresses[unit]);
-}
-
-static int
-ip_addr_check(addr, addrs)
- u_int32_t addr;
- struct wordlist *addrs;
-{
-#if 0
- u_int32_t a, mask, ah;
- int accept;
- char *ptr_word, *ptr_mask;
- struct hostent *hp;
- struct netent *np;
-#endif
-
- /* don't allow loopback or multicast address */
- if (bad_ip_adrs(addr))
- return 0;
-
- if (addrs == NULL)
- return !auth_required; /* no addresses authorized */
-
- return 1;
-}
-
-/*
- * bad_ip_adrs - return 1 if the IP address is one we don't want
- * to use, such as an address in the loopback net or a multicast address.
- * addr is in network byte order.
- */
-int
-bad_ip_adrs(addr)
- u_int32_t addr;
-{
- addr = ntohl(addr);
- return (addr >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET
- || IN_MULTICAST(addr) || IN_BADCLASS(addr);
-}
-
-/*
- * check_access - complain if a secret file has too-liberal permissions.
- */
-void
-check_access(f, filename)
- FILE *f;
- char *filename;
-{
-
-}
-
-
-/*
- * scan_authfile - Scan an authorization file for a secret suitable
- * for authenticating `client' on `server'. The return value is -1
- * if no secret is found, otherwise >= 0. The return value has
- * NONWILD_CLIENT set if the secret didn't have "*" for the client, and
- * NONWILD_SERVER set if the secret didn't have "*" for the server.
- * Any following words on the line (i.e. address authorization
- * info) are placed in a wordlist and returned in *addrs.
- */
-static int
-scan_authfile(f, client, server, ipaddr, secret, addrs, filename)
- FILE *f;
- char *client;
- char *server;
- u_int32_t ipaddr;
- char *secret;
- struct wordlist **addrs;
- char *filename;
-{
-
- return -1;
-}
-
-/*
- * free_wordlist - release memory allocated for a wordlist.
- */
-static void
-free_wordlist(wp)
- struct wordlist *wp;
-{
- struct wordlist *next;
-
- while (wp != NULL) {
- next = wp->next;
- free(wp);
- wp = next;
- }
-}
-
-/*
- * auth_script - execute a script with arguments
- * interface-name peer-name real-user tty speed
- */
-static void
-auth_script(script)
- char *script;
-{
-}
diff --git a/cpukit/pppd/cbcp.c b/cpukit/pppd/cbcp.c
deleted file mode 100644
index 147e56a07b..0000000000
--- a/cpukit/pppd/cbcp.c
+++ /dev/null
@@ -1,431 +0,0 @@
-/*
- * cbcp - Call Back Configuration Protocol.
- *
- * Copyright (c) 1995 Pedro Roque Marques
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by Pedro Roque Marques. The name of the author may not be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#ifndef lint
-/* static char rcsid[] = "$Id$"; */
-#endif
-
-#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#include <syslog.h>
-
-#include "pppd.h"
-#include "cbcp.h"
-#include "fsm.h"
-#include "lcp.h"
-#include "ipcp.h"
-
-/*
- * Protocol entry points.
- */
-static void cbcp_init __P((int unit));
-static void cbcp_open __P((int unit));
-static void cbcp_lowerup __P((int unit));
-static void cbcp_input __P((int unit, u_char *pkt, int len));
-static void cbcp_protrej __P((int unit));
-static int cbcp_printpkt __P((u_char *pkt, int len,
- void (*printer) __P((void *, char *, ...)),
- void *arg));
-
-struct protent cbcp_protent = {
- PPP_CBCP,
- cbcp_init,
- cbcp_input,
- cbcp_protrej,
- cbcp_lowerup,
- NULL,
- cbcp_open,
- NULL,
- cbcp_printpkt,
- NULL,
- 0,
- "CBCP",
- NULL,
- NULL,
- NULL
-};
-
-cbcp_state cbcp[NUM_PPP];
-
-/* internal prototypes */
-
-static void cbcp_recvreq __P((cbcp_state *us, char *pckt, int len));
-static void cbcp_resp __P((cbcp_state *us));
-static void cbcp_up __P((cbcp_state *us));
-static void cbcp_recvack __P((cbcp_state *us, char *pckt, int len));
-static void cbcp_send __P((cbcp_state *us, u_char code, u_char *buf, int len));
-
-/* init state */
-static void
-cbcp_init(iface)
- int iface;
-{
- cbcp_state *us;
-
- us = &cbcp[iface];
- memset(us, 0, sizeof(cbcp_state));
- us->us_unit = iface;
- us->us_type |= (1 << CB_CONF_NO);
-}
-
-/* lower layer is up */
-static void
-cbcp_lowerup(iface)
- int iface;
-{
- cbcp_state *us = &cbcp[iface];
-
-
- syslog(LOG_DEBUG, "cbcp_lowerup");
- syslog(LOG_DEBUG, "want: %d", us->us_type);
-
- if (us->us_type == CB_CONF_USER)
- syslog(LOG_DEBUG, "phone no: %s", us->us_number);
-}
-
-static void
-cbcp_open(unit)
- int unit;
-{
- syslog(LOG_DEBUG, "cbcp_open");
-}
-
-/* process an incomming packet */
-static void
-cbcp_input(unit, inpacket, pktlen)
- int unit;
- u_char *inpacket;
- int pktlen;
-{
- u_char *inp;
- u_char code, id;
- u_short len;
-
- cbcp_state *us = &cbcp[unit];
-
- inp = inpacket;
-
- if (pktlen < CBCP_MINLEN) {
- syslog(LOG_ERR, "CBCP packet is too small");
- return;
- }
-
- GETCHAR(code, inp);
- GETCHAR(id, inp);
- GETSHORT(len, inp);
-
-#if 0
- if (len > pktlen) {
- syslog(LOG_ERR, "CBCP packet: invalid length");
- return;
- }
-#endif
-
- len -= CBCP_MINLEN;
-
- switch(code) {
- case CBCP_REQ:
- us->us_id = id;
- cbcp_recvreq(us, inp, len);
- break;
-
- case CBCP_RESP:
- syslog(LOG_DEBUG, "CBCP_RESP received");
- break;
-
- case CBCP_ACK:
- if (id != us->us_id)
- syslog(LOG_DEBUG, "id doesn't match: expected %d recv %d",
- us->us_id, id);
-
- cbcp_recvack(us, inp, len);
- break;
-
- default:
- break;
- }
-}
-
-/* protocol was rejected by foe */
-void cbcp_protrej(int iface)
-{
-}
-
-char *cbcp_codenames[] = {
- "Request", "Response", "Ack"
-};
-
-char *cbcp_optionnames[] = {
- "NoCallback",
- "UserDefined",
- "AdminDefined",
- "List"
-};
-
-/* pretty print a packet */
-static int
-cbcp_printpkt(p, plen, printer, arg)
- u_char *p;
- int plen;
- void (*printer) __P((void *, char *, ...));
- void *arg;
-{
- int code, opt, id, len, olen, delay;
- u_char *pstart;
-
- if (plen < HEADERLEN)
- return 0;
- pstart = p;
- GETCHAR(code, p);
- GETCHAR(id, p);
- GETSHORT(len, p);
- if (len < HEADERLEN || len > plen)
- return 0;
-
- if (code >= 1 && code <= sizeof(cbcp_codenames) / sizeof(char *))
- printer(arg, " %s", cbcp_codenames[code-1]);
- else
- printer(arg, " code=0x%x", code);
-
- printer(arg, " id=0x%x", id);
- len -= HEADERLEN;
-
- switch (code) {
- case CBCP_REQ:
- case CBCP_RESP:
- case CBCP_ACK:
- while(len >= 2) {
- GETCHAR(opt, p);
- GETCHAR(olen, p);
-
- if (olen < 2 || olen > len) {
- break;
- }
-
- printer(arg, " <");
- len -= olen;
-
- if (opt >= 1 && opt <= sizeof(cbcp_optionnames) / sizeof(char *))
- printer(arg, " %s", cbcp_optionnames[opt-1]);
- else
- printer(arg, " option=0x%x", opt);
-
- if (olen > 2) {
- GETCHAR(delay, p);
- printer(arg, " delay = %d", delay);
- }
-
- if (olen > 3) {
- int addrt;
- char str[256];
-
- GETCHAR(addrt, p);
- memcpy(str, p, olen - 4);
- str[olen - 4] = 0;
- printer(arg, " number = %s", str);
- }
- printer(arg, ">");
- break;
- }
-
- default:
- break;
- }
-
- for (; len > 0; --len) {
- GETCHAR(code, p);
- printer(arg, " %.2x", code);
- }
-
- return p - pstart;
-}
-
-/* received CBCP request */
-static void
-cbcp_recvreq(us, pckt, pcktlen)
- cbcp_state *us;
- char *pckt;
- int pcktlen;
-{
- u_char type, opt_len, delay, addr_type;
- char address[256];
- int len = pcktlen;
-
- address[0] = 0;
-
- while (len) {
- syslog(LOG_DEBUG, "length: %d", len);
-
- GETCHAR(type, pckt);
- GETCHAR(opt_len, pckt);
-
- if (opt_len > 2)
- GETCHAR(delay, pckt);
-
- us->us_allowed |= (1 << type);
-
- switch(type) {
- case CB_CONF_NO:
- syslog(LOG_DEBUG, "no callback allowed");
- break;
-
- case CB_CONF_USER:
- syslog(LOG_DEBUG, "user callback allowed");
- if (opt_len > 4) {
- GETCHAR(addr_type, pckt);
- memcpy(address, pckt, opt_len - 4);
- address[opt_len - 4] = 0;
- if (address[0])
- syslog(LOG_DEBUG, "address: %s", address);
- }
- break;
-
- case CB_CONF_ADMIN:
- syslog(LOG_DEBUG, "user admin defined allowed");
- break;
-
- case CB_CONF_LIST:
- break;
- }
- len -= opt_len;
- }
-
- cbcp_resp(us);
-}
-
-static void
-cbcp_resp(us)
- cbcp_state *us;
-{
- u_char cb_type;
- u_char buf[256];
- u_char *bufp = buf;
- int len = 0;
-
- cb_type = us->us_allowed & us->us_type;
- syslog(LOG_DEBUG, "cbcp_resp cb_type=%d", cb_type);
-
-#if 0
- if (!cb_type)
- lcp_down(us->us_unit);
-#endif
-
- if (cb_type & ( 1 << CB_CONF_USER ) ) {
- syslog(LOG_DEBUG, "cbcp_resp CONF_USER");
- PUTCHAR(CB_CONF_USER, bufp);
- len = 3 + 1 + strlen(us->us_number) + 1;
- PUTCHAR(len , bufp);
- PUTCHAR(5, bufp); /* delay */
- PUTCHAR(1, bufp);
- BCOPY(us->us_number, bufp, strlen(us->us_number) + 1);
- cbcp_send(us, CBCP_RESP, buf, len);
- return;
- }
-
- if (cb_type & ( 1 << CB_CONF_ADMIN ) ) {
- syslog(LOG_DEBUG, "cbcp_resp CONF_ADMIN");
- PUTCHAR(CB_CONF_ADMIN, bufp);
- len = 3 + 1;
- PUTCHAR(len , bufp);
- PUTCHAR(5, bufp); /* delay */
- PUTCHAR(0, bufp);
- cbcp_send(us, CBCP_RESP, buf, len);
- return;
- }
-
- if (cb_type & ( 1 << CB_CONF_NO ) ) {
- syslog(LOG_DEBUG, "cbcp_resp CONF_NO");
- PUTCHAR(CB_CONF_NO, bufp);
- len = 3;
- PUTCHAR(len , bufp);
- PUTCHAR(0, bufp);
- cbcp_send(us, CBCP_RESP, buf, len);
- (*ipcp_protent.open)(us->us_unit);
- return;
- }
-}
-
-static void
-cbcp_send(us, code, buf, len)
- cbcp_state *us;
- u_char code;
- u_char *buf;
- int len;
-{
- u_char *outp;
- int outlen;
-
- outp = outpacket_buf;
-
- outlen = 4 + len;
-
- MAKEHEADER(outp, PPP_CBCP);
-
- PUTCHAR(code, outp);
- PUTCHAR(us->us_id, outp);
- PUTSHORT(outlen, outp);
-
- if (len)
- BCOPY(buf, outp, len);
-
- output(us->us_unit, outpacket_buf, outlen + PPP_HDRLEN);
-}
-
-static void
-cbcp_recvack(us, pckt, len)
- cbcp_state *us;
- char *pckt;
- int len;
-{
- u_char type, delay, addr_type;
- int opt_len;
- char address[256];
-
- if (len) {
- GETCHAR(type, pckt);
- GETCHAR(opt_len, pckt);
-
- if (opt_len > 2)
- GETCHAR(delay, pckt);
-
- if (opt_len > 4) {
- GETCHAR(addr_type, pckt);
- memcpy(address, pckt, opt_len - 4);
- address[opt_len - 4] = 0;
- if (address[0])
- syslog(LOG_DEBUG, "peer will call: %s", address);
- }
- }
-
- cbcp_up(us);
-}
-
-extern int persist;
-
-/* ok peer will do callback */
-static void
-cbcp_up(us)
- cbcp_state *us;
-{
- persist = 0;
- lcp_close(0, "Call me back, please");
-}
diff --git a/cpukit/pppd/cbcp.h b/cpukit/pppd/cbcp.h
deleted file mode 100644
index c2ab3f6899..0000000000
--- a/cpukit/pppd/cbcp.h
+++ /dev/null
@@ -1,26 +0,0 @@
-#ifndef CBCP_H
-#define CBCP_H
-
-typedef struct cbcp_state {
- int us_unit; /* Interface unit number */
- u_char us_id; /* Current id */
- u_char us_allowed;
- int us_type;
- char *us_number; /* Telefone Number */
-} cbcp_state;
-
-extern cbcp_state cbcp[];
-
-extern struct protent cbcp_protent;
-
-#define CBCP_MINLEN 4
-
-#define CBCP_REQ 1
-#define CBCP_RESP 2
-#define CBCP_ACK 3
-
-#define CB_CONF_NO 1
-#define CB_CONF_USER 2
-#define CB_CONF_ADMIN 3
-#define CB_CONF_LIST 4
-#endif
diff --git a/cpukit/pppd/ccp.c b/cpukit/pppd/ccp.c
deleted file mode 100644
index 1467c6e411..0000000000
--- a/cpukit/pppd/ccp.c
+++ /dev/null
@@ -1,1117 +0,0 @@
-/*
- * ccp.c - PPP Compression Control Protocol.
- *
- * Copyright (c) 1994 The Australian National University.
- * All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation is hereby granted, provided that the above copyright
- * notice appears in all copies. This software is provided without any
- * warranty, express or implied. The Australian National University
- * makes no representations about the suitability of this software for
- * any purpose.
- *
- * IN NO EVENT SHALL THE AUSTRALIAN NATIONAL UNIVERSITY BE LIABLE TO ANY
- * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
- * THE AUSTRALIAN NATIONAL UNIVERSITY HAVE BEEN ADVISED OF THE POSSIBILITY
- * OF SUCH DAMAGE.
- *
- * THE AUSTRALIAN NATIONAL UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE AUSTRALIAN NATIONAL UNIVERSITY HAS NO
- * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,
- * OR MODIFICATIONS.
- */
-
-#ifndef lint
-/* static char rcsid[] = "$Id$"; */
-#endif
-
-#include <string.h>
-#include <syslog.h>
-#include <sys/ioctl.h>
-#include <sys/types.h>
-
-#include "pppd.h"
-#include "fsm.h"
-#include "ccp.h"
-#include <net/ppp-comp.h>
-
-/*
- * Protocol entry points from main code.
- */
-static void ccp_init __P((int unit));
-static void ccp_open __P((int unit));
-static void ccp_close __P((int unit, char *));
-static void ccp_lowerup __P((int unit));
-static void ccp_lowerdown __P((int));
-static void ccp_input __P((int unit, u_char *pkt, int len));
-static void ccp_protrej __P((int unit));
-static int ccp_printpkt __P((u_char *pkt, int len,
- void (*printer) __P((void *, char *, ...)),
- void *arg));
-static void ccp_datainput __P((int unit, u_char *pkt, int len));
-
-struct protent ccp_protent = {
- PPP_CCP,
- ccp_init,
- ccp_input,
- ccp_protrej,
- ccp_lowerup,
- ccp_lowerdown,
- ccp_open,
- ccp_close,
- ccp_printpkt,
- ccp_datainput,
- 1,
- "CCP",
- NULL,
- NULL,
- NULL
-};
-
-fsm ccp_fsm[NUM_PPP];
-ccp_options ccp_wantoptions[NUM_PPP]; /* what to request the peer to use */
-ccp_options ccp_gotoptions[NUM_PPP]; /* what the peer agreed to do */
-ccp_options ccp_allowoptions[NUM_PPP]; /* what we'll agree to do */
-ccp_options ccp_hisoptions[NUM_PPP]; /* what we agreed to do */
-
-/*
- * Callbacks for fsm code.
- */
-static void ccp_resetci __P((fsm *));
-static int ccp_cilen __P((fsm *));
-static void ccp_addci __P((fsm *, u_char *, int *));
-static int ccp_ackci __P((fsm *, u_char *, int));
-static int ccp_nakci __P((fsm *, u_char *, int));
-static int ccp_rejci __P((fsm *, u_char *, int));
-static int ccp_reqci __P((fsm *, u_char *, int *, int));
-static void ccp_up __P((fsm *));
-static void ccp_down __P((fsm *));
-static int ccp_extcode __P((fsm *, int, int, u_char *, int));
-static void ccp_rack_timeout __P((void *));
-static char *method_name __P((ccp_options *, ccp_options *));
-
-static fsm_callbacks ccp_callbacks = {
- ccp_resetci,
- ccp_cilen,
- ccp_addci,
- ccp_ackci,
- ccp_nakci,
- ccp_rejci,
- ccp_reqci,
- ccp_up,
- ccp_down,
- NULL,
- NULL,
- NULL,
- NULL,
- ccp_extcode,
- "CCP"
-};
-
-/*
- * Do we want / did we get any compression?
- */
-#define ANY_COMPRESS(opt) ((opt).deflate || (opt).bsd_compress \
- || (opt).predictor_1 || (opt).predictor_2)
-
-/*
- * Local state (mainly for handling reset-reqs and reset-acks).
- */
-static int ccp_localstate[NUM_PPP];
-#define RACK_PENDING 1 /* waiting for reset-ack */
-#define RREQ_REPEAT 2 /* send another reset-req if no reset-ack */
-
-#define RACKTIMEOUT 1 /* second */
-
-static int all_rejected[NUM_PPP]; /* we rejected all peer's options */
-
-/*
- * ccp_init - initialize CCP.
- */
-static void
-ccp_init(unit)
- int unit;
-{
- fsm *f = &ccp_fsm[unit];
-
- f->unit = unit;
- f->protocol = PPP_CCP;
- f->callbacks = &ccp_callbacks;
- fsm_init(f);
-
- memset(&ccp_wantoptions[unit], 0, sizeof(ccp_options));
- memset(&ccp_gotoptions[unit], 0, sizeof(ccp_options));
- memset(&ccp_allowoptions[unit], 0, sizeof(ccp_options));
- memset(&ccp_hisoptions[unit], 0, sizeof(ccp_options));
-
- ccp_wantoptions[0].deflate = 1;
- ccp_wantoptions[0].deflate_size = DEFLATE_MAX_SIZE;
- ccp_wantoptions[0].deflate_correct = 1;
- ccp_wantoptions[0].deflate_draft = 1;
- ccp_allowoptions[0].deflate = 1;
- ccp_allowoptions[0].deflate_size = DEFLATE_MAX_SIZE;
- ccp_allowoptions[0].deflate_correct = 1;
- ccp_allowoptions[0].deflate_draft = 1;
-
- ccp_wantoptions[0].bsd_compress = 1;
- ccp_wantoptions[0].bsd_bits = BSD_MAX_BITS;
- ccp_allowoptions[0].bsd_compress = 1;
- ccp_allowoptions[0].bsd_bits = BSD_MAX_BITS;
-
- ccp_allowoptions[0].predictor_1 = 1;
-}
-
-/*
- * ccp_open - CCP is allowed to come up.
- */
-static void
-ccp_open(unit)
- int unit;
-{
- fsm *f = &ccp_fsm[unit];
-
- if (f->state != OPENED)
- ccp_flags_set(unit, 1, 0);
-
- /*
- * Find out which compressors the kernel supports before
- * deciding whether to open in silent mode.
- */
- ccp_resetci(f);
- if (!ANY_COMPRESS(ccp_gotoptions[unit]))
- f->flags |= OPT_SILENT;
-
- fsm_open(f);
-}
-
-/*
- * ccp_close - Terminate CCP.
- */
-static void
-ccp_close(unit, reason)
- int unit;
- char *reason;
-{
- ccp_flags_set(unit, 0, 0);
- fsm_close(&ccp_fsm[unit], reason);
-}
-
-/*
- * ccp_lowerup - we may now transmit CCP packets.
- */
-static void
-ccp_lowerup(unit)
- int unit;
-{
- fsm_lowerup(&ccp_fsm[unit]);
-}
-
-/*
- * ccp_lowerdown - we may not transmit CCP packets.
- */
-static void
-ccp_lowerdown(unit)
- int unit;
-{
- fsm_lowerdown(&ccp_fsm[unit]);
-}
-
-/*
- * ccp_input - process a received CCP packet.
- */
-static void
-ccp_input(unit, p, len)
- int unit;
- u_char *p;
- int len;
-{
- fsm *f = &ccp_fsm[unit];
- int oldstate;
-
- /*
- * Check for a terminate-request so we can print a message.
- */
- oldstate = f->state;
- fsm_input(f, p, len);
- if (oldstate == OPENED && p[0] == TERMREQ && f->state != OPENED);
- syslog(LOG_NOTICE, "Compression disabled by peer.");
-
- /*
- * If we get a terminate-ack and we're not asking for compression,
- * close CCP.
- */
- if (oldstate == REQSENT && p[0] == TERMACK
- && !ANY_COMPRESS(ccp_gotoptions[unit]))
- ccp_close(unit, "No compression negotiated");
-}
-
-/*
- * Handle a CCP-specific code.
- */
-static int
-ccp_extcode(f, code, id, p, len)
- fsm *f;
- int code, id;
- u_char *p;
- int len;
-{
- switch (code) {
- case CCP_RESETREQ:
- if (f->state != OPENED)
- break;
- /* send a reset-ack, which the transmitter will see and
- reset its compression state. */
- fsm_sdata(f, CCP_RESETACK, id, NULL, 0);
- break;
-
- case CCP_RESETACK:
- if (ccp_localstate[f->unit] & RACK_PENDING && id == f->reqid) {
- ccp_localstate[f->unit] &= ~(RACK_PENDING | RREQ_REPEAT);
- UNTIMEOUT(ccp_rack_timeout, f);
- }
- break;
-
- default:
- return 0;
- }
-
- return 1;
-}
-
-/*
- * ccp_protrej - peer doesn't talk CCP.
- */
-static void
-ccp_protrej(unit)
- int unit;
-{
- ccp_flags_set(unit, 0, 0);
- fsm_lowerdown(&ccp_fsm[unit]);
-}
-
-/*
- * ccp_resetci - initialize at start of negotiation.
- */
-static void
-ccp_resetci(f)
- fsm *f;
-{
- ccp_options *go = &ccp_gotoptions[f->unit];
- u_char opt_buf[16];
-
- *go = ccp_wantoptions[f->unit];
- all_rejected[f->unit] = 0;
-
- /*
- * Check whether the kernel knows about the various
- * compression methods we might request.
- */
- if (go->bsd_compress) {
- opt_buf[0] = CI_BSD_COMPRESS;
- opt_buf[1] = CILEN_BSD_COMPRESS;
- opt_buf[2] = BSD_MAKE_OPT(BSD_CURRENT_VERSION, BSD_MIN_BITS);
- if (ccp_test(f->unit, opt_buf, CILEN_BSD_COMPRESS, 0) <= 0)
- go->bsd_compress = 0;
- }
- if (go->deflate) {
- if (go->deflate_correct) {
- opt_buf[0] = CI_DEFLATE;
- opt_buf[1] = CILEN_DEFLATE;
- opt_buf[2] = DEFLATE_MAKE_OPT(DEFLATE_MIN_SIZE);
- opt_buf[3] = DEFLATE_CHK_SEQUENCE;
- if (ccp_test(f->unit, opt_buf, CILEN_DEFLATE, 0) <= 0)
- go->deflate_correct = 0;
- }
- if (go->deflate_draft) {
- opt_buf[0] = CI_DEFLATE_DRAFT;
- opt_buf[1] = CILEN_DEFLATE;
- opt_buf[2] = DEFLATE_MAKE_OPT(DEFLATE_MIN_SIZE);
- opt_buf[3] = DEFLATE_CHK_SEQUENCE;
- if (ccp_test(f->unit, opt_buf, CILEN_DEFLATE, 0) <= 0)
- go->deflate_draft = 0;
- }
- if (!go->deflate_correct && !go->deflate_draft)
- go->deflate = 0;
- }
- if (go->predictor_1) {
- opt_buf[0] = CI_PREDICTOR_1;
- opt_buf[1] = CILEN_PREDICTOR_1;
- if (ccp_test(f->unit, opt_buf, CILEN_PREDICTOR_1, 0) <= 0)
- go->predictor_1 = 0;
- }
- if (go->predictor_2) {
- opt_buf[0] = CI_PREDICTOR_2;
- opt_buf[1] = CILEN_PREDICTOR_2;
- if (ccp_test(f->unit, opt_buf, CILEN_PREDICTOR_2, 0) <= 0)
- go->predictor_2 = 0;
- }
-}
-
-/*
- * ccp_cilen - Return total length of our configuration info.
- */
-static int
-ccp_cilen(f)
- fsm *f;
-{
- ccp_options *go = &ccp_gotoptions[f->unit];
-
- return (go->bsd_compress? CILEN_BSD_COMPRESS: 0)
- + (go->deflate? CILEN_DEFLATE: 0)
- + (go->predictor_1? CILEN_PREDICTOR_1: 0)
- + (go->predictor_2? CILEN_PREDICTOR_2: 0);
-}
-
-/*
- * ccp_addci - put our requests in a packet.
- */
-static void
-ccp_addci(f, p, lenp)
- fsm *f;
- u_char *p;
- int *lenp;
-{
- int res;
- ccp_options *go = &ccp_gotoptions[f->unit];
- u_char *p0 = p;
-
- /*
- * Add the compression types that we can receive, in decreasing
- * preference order. Get the kernel to allocate the first one
- * in case it gets Acked.
- */
- if (go->deflate) {
- p[0] = go->deflate_correct? CI_DEFLATE: CI_DEFLATE_DRAFT;
- p[1] = CILEN_DEFLATE;
- p[2] = DEFLATE_MAKE_OPT(go->deflate_size);
- p[3] = DEFLATE_CHK_SEQUENCE;
- for (;;) {
- res = ccp_test(f->unit, p, CILEN_DEFLATE, 0);
- if (res > 0) {
- p += CILEN_DEFLATE;
- break;
- }
- if (res < 0 || go->deflate_size <= DEFLATE_MIN_SIZE) {
- go->deflate = 0;
- break;
- }
- --go->deflate_size;
- p[2] = DEFLATE_MAKE_OPT(go->deflate_size);
- }
- if (p != p0 && go->deflate_correct && go->deflate_draft) {
- p[0] = CI_DEFLATE_DRAFT;
- p[1] = CILEN_DEFLATE;
- p[2] = p[2 - CILEN_DEFLATE];
- p[3] = DEFLATE_CHK_SEQUENCE;
- p += CILEN_DEFLATE;
- }
- }
- if (go->bsd_compress) {
- p[0] = CI_BSD_COMPRESS;
- p[1] = CILEN_BSD_COMPRESS;
- p[2] = BSD_MAKE_OPT(BSD_CURRENT_VERSION, go->bsd_bits);
- if (p != p0) {
- p += CILEN_BSD_COMPRESS; /* not the first option */
- } else {
- for (;;) {
- res = ccp_test(f->unit, p, CILEN_BSD_COMPRESS, 0);
- if (res > 0) {
- p += CILEN_BSD_COMPRESS;
- break;
- }
- if (res < 0 || go->bsd_bits <= BSD_MIN_BITS) {
- go->bsd_compress = 0;
- break;
- }
- --go->bsd_bits;
- p[2] = BSD_MAKE_OPT(BSD_CURRENT_VERSION, go->bsd_bits);
- }
- }
- }
- /* XXX Should Predictor 2 be preferable to Predictor 1? */
- if (go->predictor_1) {
- p[0] = CI_PREDICTOR_1;
- p[1] = CILEN_PREDICTOR_1;
- if (p == p0 && ccp_test(f->unit, p, CILEN_PREDICTOR_1, 0) <= 0) {
- go->predictor_1 = 0;
- } else {
- p += CILEN_PREDICTOR_1;
- }
- }
- if (go->predictor_2) {
- p[0] = CI_PREDICTOR_2;
- p[1] = CILEN_PREDICTOR_2;
- if (p == p0 && ccp_test(f->unit, p, CILEN_PREDICTOR_2, 0) <= 0) {
- go->predictor_2 = 0;
- } else {
- p += CILEN_PREDICTOR_2;
- }
- }
-
- go->method = (p > p0)? p0[0]: -1;
-
- *lenp = p - p0;
-}
-
-/*
- * ccp_ackci - process a received configure-ack, and return
- * 1 iff the packet was OK.
- */
-static int
-ccp_ackci(f, p, len)
- fsm *f;
- u_char *p;
- int len;
-{
- ccp_options *go = &ccp_gotoptions[f->unit];
- u_char *p0 = p;
-
- if (go->deflate) {
- if (len < CILEN_DEFLATE
- || p[0] != (go->deflate_correct? CI_DEFLATE: CI_DEFLATE_DRAFT)
- || p[1] != CILEN_DEFLATE
- || p[2] != DEFLATE_MAKE_OPT(go->deflate_size)
- || p[3] != DEFLATE_CHK_SEQUENCE)
- return 0;
- p += CILEN_DEFLATE;
- len -= CILEN_DEFLATE;
- /* XXX Cope with first/fast ack */
- if (len == 0)
- return 1;
- if (go->deflate_correct && go->deflate_draft) {
- if (len < CILEN_DEFLATE
- || p[0] != CI_DEFLATE_DRAFT
- || p[1] != CILEN_DEFLATE
- || p[2] != DEFLATE_MAKE_OPT(go->deflate_size)
- || p[3] != DEFLATE_CHK_SEQUENCE)
- return 0;
- p += CILEN_DEFLATE;
- len -= CILEN_DEFLATE;
- }
- }
- if (go->bsd_compress) {
- if (len < CILEN_BSD_COMPRESS
- || p[0] != CI_BSD_COMPRESS || p[1] != CILEN_BSD_COMPRESS
- || p[2] != BSD_MAKE_OPT(BSD_CURRENT_VERSION, go->bsd_bits))
- return 0;
- p += CILEN_BSD_COMPRESS;
- len -= CILEN_BSD_COMPRESS;
- /* XXX Cope with first/fast ack */
- if (p == p0 && len == 0)
- return 1;
- }
- if (go->predictor_1) {
- if (len < CILEN_PREDICTOR_1
- || p[0] != CI_PREDICTOR_1 || p[1] != CILEN_PREDICTOR_1)
- return 0;
- p += CILEN_PREDICTOR_1;
- len -= CILEN_PREDICTOR_1;
- /* XXX Cope with first/fast ack */
- if (p == p0 && len == 0)
- return 1;
- }
- if (go->predictor_2) {
- if (len < CILEN_PREDICTOR_2
- || p[0] != CI_PREDICTOR_2 || p[1] != CILEN_PREDICTOR_2)
- return 0;
- p += CILEN_PREDICTOR_2;
- len -= CILEN_PREDICTOR_2;
- /* XXX Cope with first/fast ack */
- if (p == p0 && len == 0)
- return 1;
- }
-
- if (len != 0)
- return 0;
- return 1;
-}
-
-/*
- * ccp_nakci - process received configure-nak.
- * Returns 1 iff the nak was OK.
- */
-static int
-ccp_nakci(f, p, len)
- fsm *f;
- u_char *p;
- int len;
-{
- ccp_options *go = &ccp_gotoptions[f->unit];
- ccp_options no; /* options we've seen already */
- ccp_options try; /* options to ask for next time */
-
- memset(&no, 0, sizeof(no));
- try = *go;
-
- if (go->deflate && len >= CILEN_DEFLATE
- && p[0] == (go->deflate_correct? CI_DEFLATE: CI_DEFLATE_DRAFT)
- && p[1] == CILEN_DEFLATE) {
- no.deflate = 1;
- /*
- * Peer wants us to use a different code size or something.
- * Stop asking for Deflate if we don't understand his suggestion.
- */
- if (DEFLATE_METHOD(p[2]) != DEFLATE_METHOD_VAL
- || DEFLATE_SIZE(p[2]) < DEFLATE_MIN_SIZE
- || p[3] != DEFLATE_CHK_SEQUENCE)
- try.deflate = 0;
- else if (DEFLATE_SIZE(p[2]) < go->deflate_size)
- try.deflate_size = DEFLATE_SIZE(p[2]);
- p += CILEN_DEFLATE;
- len -= CILEN_DEFLATE;
- if (go->deflate_correct && go->deflate_draft
- && len >= CILEN_DEFLATE && p[0] == CI_DEFLATE_DRAFT
- && p[1] == CILEN_DEFLATE) {
- p += CILEN_DEFLATE;
- len -= CILEN_DEFLATE;
- }
- }
-
- if (go->bsd_compress && len >= CILEN_BSD_COMPRESS
- && p[0] == CI_BSD_COMPRESS && p[1] == CILEN_BSD_COMPRESS) {
- no.bsd_compress = 1;
- /*
- * Peer wants us to use a different number of bits
- * or a different version.
- */
- if (BSD_VERSION(p[2]) != BSD_CURRENT_VERSION)
- try.bsd_compress = 0;
- else if (BSD_NBITS(p[2]) < go->bsd_bits)
- try.bsd_bits = BSD_NBITS(p[2]);
- p += CILEN_BSD_COMPRESS;
- len -= CILEN_BSD_COMPRESS;
- }
-
- /*
- * Predictor-1 and 2 have no options, so they can't be Naked.
- *
- * XXX What should we do with any remaining options?
- */
-
- if (len != 0)
- return 0;
-
- if (f->state != OPENED)
- *go = try;
- return 1;
-}
-
-/*
- * ccp_rejci - reject some of our suggested compression methods.
- */
-static int
-ccp_rejci(f, p, len)
- fsm *f;
- u_char *p;
- int len;
-{
- ccp_options *go = &ccp_gotoptions[f->unit];
- ccp_options try; /* options to request next time */
-
- try = *go;
-
- /*
- * Cope with empty configure-rejects by ceasing to send
- * configure-requests.
- */
- if (len == 0 && all_rejected[f->unit])
- return -1;
-
- if (go->deflate && len >= CILEN_DEFLATE
- && p[0] == (go->deflate_correct? CI_DEFLATE: CI_DEFLATE_DRAFT)
- && p[1] == CILEN_DEFLATE) {
- if (p[2] != DEFLATE_MAKE_OPT(go->deflate_size)
- || p[3] != DEFLATE_CHK_SEQUENCE)
- return 0; /* Rej is bad */
- if (go->deflate_correct)
- try.deflate_correct = 0;
- else
- try.deflate_draft = 0;
- p += CILEN_DEFLATE;
- len -= CILEN_DEFLATE;
- if (go->deflate_correct && go->deflate_draft
- && len >= CILEN_DEFLATE && p[0] == CI_DEFLATE_DRAFT
- && p[1] == CILEN_DEFLATE) {
- if (p[2] != DEFLATE_MAKE_OPT(go->deflate_size)
- || p[3] != DEFLATE_CHK_SEQUENCE)
- return 0; /* Rej is bad */
- try.deflate_draft = 0;
- p += CILEN_DEFLATE;
- len -= CILEN_DEFLATE;
- }
- if (!try.deflate_correct && !try.deflate_draft)
- try.deflate = 0;
- }
- if (go->bsd_compress && len >= CILEN_BSD_COMPRESS
- && p[0] == CI_BSD_COMPRESS && p[1] == CILEN_BSD_COMPRESS) {
- if (p[2] != BSD_MAKE_OPT(BSD_CURRENT_VERSION, go->bsd_bits))
- return 0;
- try.bsd_compress = 0;
- p += CILEN_BSD_COMPRESS;
- len -= CILEN_BSD_COMPRESS;
- }
- if (go->predictor_1 && len >= CILEN_PREDICTOR_1
- && p[0] == CI_PREDICTOR_1 && p[1] == CILEN_PREDICTOR_1) {
- try.predictor_1 = 0;
- p += CILEN_PREDICTOR_1;
- len -= CILEN_PREDICTOR_1;
- }
- if (go->predictor_2 && len >= CILEN_PREDICTOR_2
- && p[0] == CI_PREDICTOR_2 && p[1] == CILEN_PREDICTOR_2) {
- try.predictor_2 = 0;
- p += CILEN_PREDICTOR_2;
- len -= CILEN_PREDICTOR_2;
- }
-
- if (len != 0)
- return 0;
-
- if (f->state != OPENED)
- *go = try;
-
- return 1;
-}
-
-/*
- * ccp_reqci - processed a received configure-request.
- * Returns CONFACK, CONFNAK or CONFREJ and the packet modified
- * appropriately.
- */
-static int
-ccp_reqci(f, p, lenp, dont_nak)
- fsm *f;
- u_char *p;
- int *lenp;
- int dont_nak;
-{
- int ret, newret, res;
- u_char *p0, *retp;
- int len, clen, type, nb;
- ccp_options *ho = &ccp_hisoptions[f->unit];
- ccp_options *ao = &ccp_allowoptions[f->unit];
-
- ret = CONFACK;
- retp = p0 = p;
- len = *lenp;
-
- memset(ho, 0, sizeof(ccp_options));
- ho->method = (len > 0)? p[0]: -1;
-
- while (len > 0) {
- newret = CONFACK;
- if (len < 2 || p[1] < 2 || p[1] > len) {
- /* length is bad */
- clen = len;
- newret = CONFREJ;
-
- } else {
- type = p[0];
- clen = p[1];
-
- switch (type) {
- case CI_DEFLATE:
- case CI_DEFLATE_DRAFT:
- if (!ao->deflate || clen != CILEN_DEFLATE
- || (!ao->deflate_correct && type == CI_DEFLATE)
- || (!ao->deflate_draft && type == CI_DEFLATE_DRAFT)) {
- newret = CONFREJ;
- break;
- }
-
- ho->deflate = 1;
- ho->deflate_size = nb = DEFLATE_SIZE(p[2]);
- if (DEFLATE_METHOD(p[2]) != DEFLATE_METHOD_VAL
- || p[3] != DEFLATE_CHK_SEQUENCE
- || nb > ao->deflate_size || nb < DEFLATE_MIN_SIZE) {
- newret = CONFNAK;
- if (!dont_nak) {
- p[2] = DEFLATE_MAKE_OPT(ao->deflate_size);
- p[3] = DEFLATE_CHK_SEQUENCE;
- /* fall through to test this #bits below */
- } else
- break;
- }
-
- /*
- * Check whether we can do Deflate with the window
- * size they want. If the window is too big, reduce
- * it until the kernel can cope and nak with that.
- * We only check this for the first option.
- */
- if (p == p0) {
- for (;;) {
- res = ccp_test(f->unit, p, CILEN_DEFLATE, 1);
- if (res > 0)
- break; /* it's OK now */
- if (res < 0 || nb == DEFLATE_MIN_SIZE || dont_nak) {
- newret = CONFREJ;
- p[2] = DEFLATE_MAKE_OPT(ho->deflate_size);
- break;
- }
- newret = CONFNAK;
- --nb;
- p[2] = DEFLATE_MAKE_OPT(nb);
- }
- }
- break;
-
- case CI_BSD_COMPRESS:
- if (!ao->bsd_compress || clen != CILEN_BSD_COMPRESS) {
- newret = CONFREJ;
- break;
- }
-
- ho->bsd_compress = 1;
- ho->bsd_bits = nb = BSD_NBITS(p[2]);
- if (BSD_VERSION(p[2]) != BSD_CURRENT_VERSION
- || nb > ao->bsd_bits || nb < BSD_MIN_BITS) {
- newret = CONFNAK;
- if (!dont_nak) {
- p[2] = BSD_MAKE_OPT(BSD_CURRENT_VERSION, ao->bsd_bits);
- /* fall through to test this #bits below */
- } else
- break;
- }
-
- /*
- * Check whether we can do BSD-Compress with the code
- * size they want. If the code size is too big, reduce
- * it until the kernel can cope and nak with that.
- * We only check this for the first option.
- */
- if (p == p0) {
- for (;;) {
- res = ccp_test(f->unit, p, CILEN_BSD_COMPRESS, 1);
- if (res > 0)
- break;
- if (res < 0 || nb == BSD_MIN_BITS || dont_nak) {
- newret = CONFREJ;
- p[2] = BSD_MAKE_OPT(BSD_CURRENT_VERSION,
- ho->bsd_bits);
- break;
- }
- newret = CONFNAK;
- --nb;
- p[2] = BSD_MAKE_OPT(BSD_CURRENT_VERSION, nb);
- }
- }
- break;
-
- case CI_PREDICTOR_1:
- if (!ao->predictor_1 || clen != CILEN_PREDICTOR_1) {
- newret = CONFREJ;
- break;
- }
-
- ho->predictor_1 = 1;
- if (p == p0
- && ccp_test(f->unit, p, CILEN_PREDICTOR_1, 1) <= 0) {
- newret = CONFREJ;
- }
- break;
-
- case CI_PREDICTOR_2:
- if (!ao->predictor_2 || clen != CILEN_PREDICTOR_2) {
- newret = CONFREJ;
- break;
- }
-
- ho->predictor_2 = 1;
- if (p == p0
- && ccp_test(f->unit, p, CILEN_PREDICTOR_2, 1) <= 0) {
- newret = CONFREJ;
- }
- break;
-
- default:
- newret = CONFREJ;
- }
- }
-
- if (newret == CONFNAK && dont_nak)
- newret = CONFREJ;
- if (!(newret == CONFACK || (newret == CONFNAK && ret == CONFREJ))) {
- /* we're returning this option */
- if (newret == CONFREJ && ret == CONFNAK)
- retp = p0;
- ret = newret;
- if (p != retp)
- BCOPY(p, retp, clen);
- retp += clen;
- }
-
- p += clen;
- len -= clen;
- }
-
- if (ret != CONFACK) {
- if (ret == CONFREJ && *lenp == retp - p0)
- all_rejected[f->unit] = 1;
- else
- *lenp = retp - p0;
- }
- return ret;
-}
-
-/*
- * Make a string name for a compression method (or 2).
- */
-static char *
-method_name(opt, opt2)
- ccp_options *opt, *opt2;
-{
- static char result[64];
-
- if (!ANY_COMPRESS(*opt))
- return "(none)";
- switch (opt->method) {
- case CI_DEFLATE:
- case CI_DEFLATE_DRAFT:
- if (opt2 != NULL && opt2->deflate_size != opt->deflate_size)
- sprintf(result, "Deflate%s (%d/%d)",
- (opt->method == CI_DEFLATE_DRAFT? "(old#)": ""),
- opt->deflate_size, opt2->deflate_size);
- else
- sprintf(result, "Deflate%s (%d)",
- (opt->method == CI_DEFLATE_DRAFT? "(old#)": ""),
- opt->deflate_size);
- break;
- case CI_BSD_COMPRESS:
- if (opt2 != NULL && opt2->bsd_bits != opt->bsd_bits)
- sprintf(result, "BSD-Compress (%d/%d)", opt->bsd_bits,
- opt2->bsd_bits);
- else
- sprintf(result, "BSD-Compress (%d)", opt->bsd_bits);
- break;
- case CI_PREDICTOR_1:
- return "Predictor 1";
- case CI_PREDICTOR_2:
- return "Predictor 2";
- default:
- sprintf(result, "Method %d", opt->method);
- }
- return result;
-}
-
-/*
- * CCP has come up - inform the kernel driver and log a message.
- */
-static void
-ccp_up(f)
- fsm *f;
-{
- ccp_options *go = &ccp_gotoptions[f->unit];
- ccp_options *ho = &ccp_hisoptions[f->unit];
- char method1[64];
-
- ccp_flags_set(f->unit, 1, 1);
- if (ANY_COMPRESS(*go)) {
- if (ANY_COMPRESS(*ho)) {
- if (go->method == ho->method) {
- syslog(LOG_NOTICE, "%s compression enabled",
- method_name(go, ho))
-;
- } else {
- strcpy(method1, method_name(go, NULL));
- syslog(LOG_NOTICE, "%s / %s compression enabled",
- method1, method_name(ho, NULL))
-;
- }
- } else
- syslog(LOG_NOTICE, "%s receive compression enabled",
- method_name(go, NULL))
-;
- } else if (ANY_COMPRESS(*ho))
- syslog(LOG_NOTICE, "%s transmit compression enabled",
- method_name(ho, NULL))
-;
-}
-
-/*
- * CCP has gone down - inform the kernel driver.
- */
-static void
-ccp_down(f)
- fsm *f;
-{
- if (ccp_localstate[f->unit] & RACK_PENDING)
- UNTIMEOUT(ccp_rack_timeout, f);
- ccp_localstate[f->unit] = 0;
- ccp_flags_set(f->unit, 1, 0);
-}
-
-/*
- * Print the contents of a CCP packet.
- */
-static char *ccp_codenames[] = {
- "ConfReq", "ConfAck", "ConfNak", "ConfRej",
- "TermReq", "TermAck", "CodeRej",
- NULL, NULL, NULL, NULL, NULL, NULL,
- "ResetReq", "ResetAck",
-};
-
-static int
-ccp_printpkt(p, plen, printer, arg)
- u_char *p;
- int plen;
- void (*printer) __P((void *, char *, ...));
- void *arg;
-{
- u_char *p0, *optend;
- int code, id, len;
- int optlen;
-
- p0 = p;
- if (plen < HEADERLEN)
- return 0;
- code = p[0];
- id = p[1];
- len = (p[2] << 8) + p[3];
- if (len < HEADERLEN || len > plen)
- return 0;
-
- if (code >= 1 && code <= sizeof(ccp_codenames) / sizeof(char *)
- && ccp_codenames[code-1] != NULL)
- printer(arg, " %s", ccp_codenames[code-1]);
- else
- printer(arg, " code=0x%x", code);
- printer(arg, " id=0x%x", id);
- len -= HEADERLEN;
- p += HEADERLEN;
-
- switch (code) {
- case CONFREQ:
- case CONFACK:
- case CONFNAK:
- case CONFREJ:
- /* print list of possible compression methods */
- while (len >= 2) {
- code = p[0];
- optlen = p[1];
- if (optlen < 2 || optlen > len)
- break;
- printer(arg, " <");
- len -= optlen;
- optend = p + optlen;
- switch (code) {
- case CI_DEFLATE:
- case CI_DEFLATE_DRAFT:
- if (optlen >= CILEN_DEFLATE) {
- printer(arg, "deflate%s %d",
- (code == CI_DEFLATE_DRAFT? "(old#)": ""),
- DEFLATE_SIZE(p[2]));
- if (DEFLATE_METHOD(p[2]) != DEFLATE_METHOD_VAL)
- printer(arg, " method %d", DEFLATE_METHOD(p[2]));
- if (p[3] != DEFLATE_CHK_SEQUENCE)
- printer(arg, " check %d", p[3]);
- p += CILEN_DEFLATE;
- }
- break;
- case CI_BSD_COMPRESS:
- if (optlen >= CILEN_BSD_COMPRESS) {
- printer(arg, "bsd v%d %d", BSD_VERSION(p[2]),
- BSD_NBITS(p[2]));
- p += CILEN_BSD_COMPRESS;
- }
- break;
- case CI_PREDICTOR_1:
- if (optlen >= CILEN_PREDICTOR_1) {
- printer(arg, "predictor 1");
- p += CILEN_PREDICTOR_1;
- }
- break;
- case CI_PREDICTOR_2:
- if (optlen >= CILEN_PREDICTOR_2) {
- printer(arg, "predictor 2");
- p += CILEN_PREDICTOR_2;
- }
- break;
- }
-/* while (p < optend)
- printer(arg, " %.2x", *p++);
- printer(arg, ">");
-*/ }
- break;
-
- case TERMACK:
- case TERMREQ:
-/* if (len > 0 && *p >= ' ' && *p < 0x7f) {
- print_string(p, len, printer, arg);
- p += len;
- len = 0;
- }
-*/ break;
- }
-
- /* dump out the rest of the packet in hex */
-/* while (--len >= 0)
- printer(arg, " %.2x", *p++);
-*/
- return p - p0;
-}
-
-/*
- * We have received a packet that the decompressor failed to
- * decompress. Here we would expect to issue a reset-request, but
- * Motorola has a patent on resetting the compressor as a result of
- * detecting an error in the decompressed data after decompression.
- * (See US patent 5,130,993; international patent publication number
- * WO 91/10289; Australian patent 73296/91.)
- *
- * So we ask the kernel whether the error was detected after
- * decompression; if it was, we take CCP down, thus disabling
- * compression :-(, otherwise we issue the reset-request.
- */
-static void
-ccp_datainput(unit, pkt, len)
- int unit;
- u_char *pkt;
- int len;
-{
- fsm *f;
-
- f = &ccp_fsm[unit];
- if (f->state == OPENED) {
- if (ccp_fatal_error(unit)) {
- /*
- * Disable compression by taking CCP down.
- */
- syslog(LOG_ERR, "Lost compression sync: disabling compression");
- ccp_close(unit, "Lost compression sync");
- } else {
- /*
- * Send a reset-request to reset the peer's compressor.
- * We don't do that if we are still waiting for an
- * acknowledgement to a previous reset-request.
- */
- if (!(ccp_localstate[f->unit] & RACK_PENDING)) {
- fsm_sdata(f, CCP_RESETREQ, f->reqid = ++f->id, NULL, 0);
- TIMEOUT(ccp_rack_timeout, f, RACKTIMEOUT);
- ccp_localstate[f->unit] |= RACK_PENDING;
- } else
- ccp_localstate[f->unit] |= RREQ_REPEAT;
- }
- }
-}
-
-/*
- * Timeout waiting for reset-ack.
- */
-static void
-ccp_rack_timeout(arg)
- void *arg;
-{
- fsm *f = arg;
-
- if (f->state == OPENED && ccp_localstate[f->unit] & RREQ_REPEAT) {
- fsm_sdata(f, CCP_RESETREQ, f->reqid, NULL, 0);
- TIMEOUT(ccp_rack_timeout, f, RACKTIMEOUT);
- ccp_localstate[f->unit] &= ~RREQ_REPEAT;
- } else
- ccp_localstate[f->unit] &= ~RACK_PENDING;
-}
-
diff --git a/cpukit/pppd/ccp.h b/cpukit/pppd/ccp.h
deleted file mode 100644
index af421d48c3..0000000000
--- a/cpukit/pppd/ccp.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * ccp.h - Definitions for PPP Compression Control Protocol.
- *
- * Copyright (c) 1994 The Australian National University.
- * All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation is hereby granted, provided that the above copyright
- * notice appears in all copies. This software is provided without any
- * warranty, express or implied. The Australian National University
- * makes no representations about the suitability of this software for
- * any purpose.
- *
- * IN NO EVENT SHALL THE AUSTRALIAN NATIONAL UNIVERSITY BE LIABLE TO ANY
- * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
- * THE AUSTRALIAN NATIONAL UNIVERSITY HAVE BEEN ADVISED OF THE POSSIBILITY
- * OF SUCH DAMAGE.
- *
- * THE AUSTRALIAN NATIONAL UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE AUSTRALIAN NATIONAL UNIVERSITY HAS NO
- * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,
- * OR MODIFICATIONS.
- *
- * $Id$
- */
-
-typedef struct ccp_options {
- u_int bsd_compress: 1; /* do BSD Compress? */
- u_int deflate: 1; /* do Deflate? */
- u_int predictor_1: 1; /* do Predictor-1? */
- u_int predictor_2: 1; /* do Predictor-2? */
- u_int deflate_correct: 1; /* use correct code for deflate? */
- u_int deflate_draft: 1; /* use draft RFC code for deflate? */
- u_short bsd_bits; /* # bits/code for BSD Compress */
- u_short deflate_size; /* lg(window size) for Deflate */
- short method; /* code for chosen compression method */
-} ccp_options;
-
-extern fsm ccp_fsm[];
-extern ccp_options ccp_wantoptions[];
-extern ccp_options ccp_gotoptions[];
-extern ccp_options ccp_allowoptions[];
-extern ccp_options ccp_hisoptions[];
-
-extern struct protent ccp_protent;
diff --git a/cpukit/pppd/chap.c b/cpukit/pppd/chap.c
deleted file mode 100644
index de80fdf666..0000000000
--- a/cpukit/pppd/chap.c
+++ /dev/null
@@ -1,872 +0,0 @@
-/*
- * chap.c - Challenge Handshake Authentication Protocol.
- *
- * Copyright (c) 1993 The Australian National University.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by the Australian National University. The name of the University
- * may not be used to endorse or promote products derived from this
- * software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Copyright (c) 1991 Gregory M. Christy.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by Gregory M. Christy. The name of the author may not be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#ifndef lint
-/* static char rcsid[] = "$Id$"; */
-#endif
-
-/*
- * TODO:
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#include <syslog.h>
-
-#include "pppd.h"
-#include "chap.h"
-#include "md5.h"
-#ifdef CHAPMS
-#include "chap_ms.h"
-#endif
-
-/*
- * Protocol entry points.
- */
-static void ChapInit __P((int));
-static void ChapLowerUp __P((int));
-static void ChapLowerDown __P((int));
-static void ChapInput __P((int, u_char *, int));
-static void ChapProtocolReject __P((int));
-static int ChapPrintPkt __P((u_char *, int,
- void (*) __P((void *, char *, ...)), void *));
-
-struct protent chap_protent = {
- PPP_CHAP,
- ChapInit,
- ChapInput,
- ChapProtocolReject,
- ChapLowerUp,
- ChapLowerDown,
- NULL,
- NULL,
- ChapPrintPkt,
- NULL,
- 1,
- "CHAP",
- NULL,
- NULL,
- NULL
-};
-
-chap_state chap[NUM_PPP]; /* CHAP state; one for each unit */
-
-static void ChapChallengeTimeout __P((void *));
-static void ChapResponseTimeout __P((void *));
-static void ChapReceiveChallenge __P((chap_state *, u_char *, int, int));
-static void ChapRechallenge __P((void *));
-static void ChapReceiveResponse __P((chap_state *, u_char *, int, int));
-static void ChapReceiveSuccess __P((chap_state *, u_char *, int, int));
-static void ChapReceiveFailure __P((chap_state *, u_char *, int, int));
-static void ChapSendStatus __P((chap_state *, int));
-static void ChapSendChallenge __P((chap_state *));
-static void ChapSendResponse __P((chap_state *));
-static void ChapGenChallenge __P((chap_state *));
-/* #include <stdlib.h> */
-
-extern double drand48 __P((void));
-/*{
- return (((double)rand())/RAND_MAX);
-}
-*/
-extern void srand48 __P((long));
-
-/*
- * ChapInit - Initialize a CHAP unit.
- */
-static void
-ChapInit(unit)
- int unit;
-{
- chap_state *cstate = &chap[unit];
-
- BZERO(cstate, sizeof(*cstate));
- cstate->unit = unit;
- cstate->clientstate = CHAPCS_INITIAL;
- cstate->serverstate = CHAPSS_INITIAL;
- cstate->timeouttime = CHAP_DEFTIMEOUT;
- cstate->max_transmits = CHAP_DEFTRANSMITS;
- /* random number generator is initialized in magic_init */
-}
-
-
-/*
- * ChapAuthWithPeer - Authenticate us with our peer (start client).
- *
- */
-void
-ChapAuthWithPeer(unit, our_name, digest)
- int unit;
- char *our_name;
- int digest;
-{
- chap_state *cstate = &chap[unit];
-
- cstate->resp_name = our_name;
- cstate->resp_type = digest;
-
- if (cstate->clientstate == CHAPCS_INITIAL ||
- cstate->clientstate == CHAPCS_PENDING) {
- /* lower layer isn't up - wait until later */
- cstate->clientstate = CHAPCS_PENDING;
- return;
- }
-
- /*
- * We get here as a result of LCP coming up.
- * So even if CHAP was open before, we will
- * have to re-authenticate ourselves.
- */
- cstate->clientstate = CHAPCS_LISTEN;
-}
-
-
-/*
- * ChapAuthPeer - Authenticate our peer (start server).
- */
-void
-ChapAuthPeer(unit, our_name, digest)
- int unit;
- char *our_name;
- int digest;
-{
- chap_state *cstate = &chap[unit];
-
- cstate->chal_name = our_name;
- cstate->chal_type = digest;
-
- if (cstate->serverstate == CHAPSS_INITIAL ||
- cstate->serverstate == CHAPSS_PENDING) {
- /* lower layer isn't up - wait until later */
- cstate->serverstate = CHAPSS_PENDING;
- return;
- }
-
- ChapGenChallenge(cstate);
- ChapSendChallenge(cstate); /* crank it up dude! */
- cstate->serverstate = CHAPSS_INITIAL_CHAL;
-}
-
-
-/*
- * ChapChallengeTimeout - Timeout expired on sending challenge.
- */
-static void
-ChapChallengeTimeout(arg)
- void *arg;
-{
- chap_state *cstate = (chap_state *) arg;
-
- /* if we aren't sending challenges, don't worry. then again we */
- /* probably shouldn't be here either */
- if (cstate->serverstate != CHAPSS_INITIAL_CHAL &&
- cstate->serverstate != CHAPSS_RECHALLENGE)
- return;
-
- if (cstate->chal_transmits >= cstate->max_transmits) {
- /* give up on peer */
- syslog(LOG_ERR, "Peer failed to respond to CHAP challenge");
- cstate->serverstate = CHAPSS_BADAUTH;
- auth_peer_fail(cstate->unit, PPP_CHAP);
- return;
- }
-
- ChapSendChallenge(cstate); /* Re-send challenge */
-}
-
-
-/*
- * ChapResponseTimeout - Timeout expired on sending response.
- */
-static void
-ChapResponseTimeout(arg)
- void *arg;
-{
- chap_state *cstate = (chap_state *) arg;
-
- /* if we aren't sending a response, don't worry. */
- if (cstate->clientstate != CHAPCS_RESPONSE)
- return;
-
- ChapSendResponse(cstate); /* re-send response */
-}
-
-
-/*
- * ChapRechallenge - Time to challenge the peer again.
- */
-static void
-ChapRechallenge(arg)
- void *arg;
-{
- chap_state *cstate = (chap_state *) arg;
-
- /* if we aren't sending a response, don't worry. */
- if (cstate->serverstate != CHAPSS_OPEN)
- return;
-
- ChapGenChallenge(cstate);
- ChapSendChallenge(cstate);
- cstate->serverstate = CHAPSS_RECHALLENGE;
-}
-
-
-/*
- * ChapLowerUp - The lower layer is up.
- *
- * Start up if we have pending requests.
- */
-static void
-ChapLowerUp(unit)
- int unit;
-{
- chap_state *cstate = &chap[unit];
-
- if (cstate->clientstate == CHAPCS_INITIAL)
- cstate->clientstate = CHAPCS_CLOSED;
- else if (cstate->clientstate == CHAPCS_PENDING)
- cstate->clientstate = CHAPCS_LISTEN;
-
- if (cstate->serverstate == CHAPSS_INITIAL)
- cstate->serverstate = CHAPSS_CLOSED;
- else if (cstate->serverstate == CHAPSS_PENDING) {
- ChapGenChallenge(cstate);
- ChapSendChallenge(cstate);
- cstate->serverstate = CHAPSS_INITIAL_CHAL;
- }
-}
-
-
-/*
- * ChapLowerDown - The lower layer is down.
- *
- * Cancel all timeouts.
- */
-static void
-ChapLowerDown(unit)
- int unit;
-{
- chap_state *cstate = &chap[unit];
-
- /* Timeout(s) pending? Cancel if so. */
- if (cstate->serverstate == CHAPSS_INITIAL_CHAL ||
- cstate->serverstate == CHAPSS_RECHALLENGE)
- UNTIMEOUT(ChapChallengeTimeout, cstate);
- else if (cstate->serverstate == CHAPSS_OPEN
- && cstate->chal_interval != 0)
- UNTIMEOUT(ChapRechallenge, cstate);
- if (cstate->clientstate == CHAPCS_RESPONSE)
- UNTIMEOUT(ChapResponseTimeout, cstate);
-
- cstate->clientstate = CHAPCS_INITIAL;
- cstate->serverstate = CHAPSS_INITIAL;
-}
-
-
-/*
- * ChapProtocolReject - Peer doesn't grok CHAP.
- */
-static void
-ChapProtocolReject(unit)
- int unit;
-{
- chap_state *cstate = &chap[unit];
-
- if (cstate->serverstate != CHAPSS_INITIAL &&
- cstate->serverstate != CHAPSS_CLOSED)
- auth_peer_fail(unit, PPP_CHAP);
- if (cstate->clientstate != CHAPCS_INITIAL &&
- cstate->clientstate != CHAPCS_CLOSED)
- auth_withpeer_fail(unit, PPP_CHAP);
- ChapLowerDown(unit); /* shutdown chap */
-}
-
-
-/*
- * ChapInput - Input CHAP packet.
- */
-static void
-ChapInput(unit, inpacket, packet_len)
- int unit;
- u_char *inpacket;
- int packet_len;
-{
- chap_state *cstate = &chap[unit];
- u_char *inp;
- u_char code, id;
- int len;
-
- /*
- * Parse header (code, id and length).
- * If packet too short, drop it.
- */
- inp = inpacket;
- if (packet_len < CHAP_HEADERLEN) {
- CHAPDEBUG((LOG_INFO, "ChapInput: rcvd short header."));
- return;
- }
- GETCHAR(code, inp);
- GETCHAR(id, inp);
- GETSHORT(len, inp);
- if (len < CHAP_HEADERLEN) {
- CHAPDEBUG((LOG_INFO, "ChapInput: rcvd illegal length."));
- return;
- }
- if (len > packet_len) {
- CHAPDEBUG((LOG_INFO, "ChapInput: rcvd short packet."));
- return;
- }
- len -= CHAP_HEADERLEN;
-
- /*
- * Action depends on code (as in fact it usually does :-).
- */
- switch (code) {
- case CHAP_CHALLENGE:
- ChapReceiveChallenge(cstate, inp, id, len);
- break;
-
- case CHAP_RESPONSE:
- ChapReceiveResponse(cstate, inp, id, len);
- break;
-
- case CHAP_FAILURE:
- ChapReceiveFailure(cstate, inp, id, len);
- break;
-
- case CHAP_SUCCESS:
- ChapReceiveSuccess(cstate, inp, id, len);
- break;
-
- default: /* Need code reject? */
- syslog(LOG_WARNING, "Unknown CHAP code (%d) received.", code);
- break;
- }
-}
-
-
-/*
- * ChapReceiveChallenge - Receive Challenge and send Response.
- */
-static void
-ChapReceiveChallenge(cstate, inp, id, len)
- chap_state *cstate;
- u_char *inp;
- int id;
- int len;
-{
- int rchallenge_len;
- u_char *rchallenge;
- int secret_len;
- char secret[MAXSECRETLEN];
- char rhostname[256];
- MD5_CTX mdContext;
- u_char hash[MD5_SIGNATURE_SIZE];
-
- CHAPDEBUG((LOG_INFO, "ChapReceiveChallenge: Rcvd id %d.", id));
- if (cstate->clientstate == CHAPCS_CLOSED ||
- cstate->clientstate == CHAPCS_PENDING) {
- CHAPDEBUG((LOG_INFO, "ChapReceiveChallenge: in state %d",
- cstate->clientstate));
- return;
- }
-
- if (len < 2) {
- CHAPDEBUG((LOG_INFO, "ChapReceiveChallenge: rcvd short packet."));
- return;
- }
-
- GETCHAR(rchallenge_len, inp);
- len -= sizeof (u_char) + rchallenge_len; /* now name field length */
- if (len < 0) {
- CHAPDEBUG((LOG_INFO, "ChapReceiveChallenge: rcvd short packet."));
- return;
- }
- rchallenge = inp;
- INCPTR(rchallenge_len, inp);
-
- if (len >= sizeof(rhostname))
- len = sizeof(rhostname) - 1;
- BCOPY(inp, rhostname, len);
- rhostname[len] = '\000';
-
- CHAPDEBUG((LOG_INFO, "ChapReceiveChallenge: received name field '%s'",
- rhostname));
-
- /* Microsoft doesn't send their name back in the PPP packet */
- if (remote_name[0] != 0 && (explicit_remote || rhostname[0] == 0)) {
- strncpy(rhostname, remote_name, sizeof(rhostname));
- rhostname[sizeof(rhostname) - 1] = 0;
- CHAPDEBUG((LOG_INFO, "ChapReceiveChallenge: using '%s' as remote name",
- rhostname));
- }
-
- /* get secret for authenticating ourselves with the specified host */
- if (!get_secret(cstate->unit, cstate->resp_name, rhostname,
- secret, &secret_len, 0)) {
- secret_len = 0; /* assume null secret if can't find one */
- syslog(LOG_WARNING, "No CHAP secret found for authenticating us to %s",
- rhostname);
- }
-
- /* cancel response send timeout if necessary */
- if (cstate->clientstate == CHAPCS_RESPONSE)
- UNTIMEOUT(ChapResponseTimeout, cstate);
-
- cstate->resp_id = id;
- cstate->resp_transmits = 0;
-
- /* generate MD based on negotiated type */
- switch (cstate->resp_type) {
-
- case CHAP_DIGEST_MD5:
- MD5Init(&mdContext);
- MD5Update(&mdContext, &cstate->resp_id, 1);
- MD5Update(&mdContext, secret, secret_len);
- MD5Update(&mdContext, rchallenge, rchallenge_len);
- MD5Final(hash, &mdContext);
- BCOPY(hash, cstate->response, MD5_SIGNATURE_SIZE);
- cstate->resp_length = MD5_SIGNATURE_SIZE;
- break;
-
-#ifdef CHAPMS
- case CHAP_MICROSOFT:
- ChapMS(cstate, rchallenge, rchallenge_len, secret, secret_len);
- break;
-#endif
-
- default:
- CHAPDEBUG((LOG_INFO, "unknown digest type %d", cstate->resp_type));
- return;
- }
-
- BZERO(secret, sizeof(secret));
- ChapSendResponse(cstate);
-}
-
-
-/*
- * ChapReceiveResponse - Receive and process response.
- */
-static void
-ChapReceiveResponse(cstate, inp, id, len)
- chap_state *cstate;
- u_char *inp;
- int id;
- int len;
-{
- u_char *remmd, remmd_len;
- int secret_len, old_state;
- int code;
- char rhostname[256];
- MD5_CTX mdContext;
- char secret[MAXSECRETLEN];
- u_char hash[MD5_SIGNATURE_SIZE];
-
- CHAPDEBUG((LOG_INFO, "ChapReceiveResponse: Rcvd id %d.", id));
-
- if (cstate->serverstate == CHAPSS_CLOSED ||
- cstate->serverstate == CHAPSS_PENDING) {
- CHAPDEBUG((LOG_INFO, "ChapReceiveResponse: in state %d",
- cstate->serverstate));
- return;
- }
-
- if (id != cstate->chal_id)
- return; /* doesn't match ID of last challenge */
-
- /*
- * If we have received a duplicate or bogus Response,
- * we have to send the same answer (Success/Failure)
- * as we did for the first Response we saw.
- */
- if (cstate->serverstate == CHAPSS_OPEN) {
- ChapSendStatus(cstate, CHAP_SUCCESS);
- return;
- }
- if (cstate->serverstate == CHAPSS_BADAUTH) {
- ChapSendStatus(cstate, CHAP_FAILURE);
- return;
- }
-
- if (len < 2) {
- CHAPDEBUG((LOG_INFO, "ChapReceiveResponse: rcvd short packet."));
- return;
- }
- GETCHAR(remmd_len, inp); /* get length of MD */
- remmd = inp; /* get pointer to MD */
- INCPTR(remmd_len, inp);
-
- len -= sizeof (u_char) + remmd_len;
- if (len < 0) {
- CHAPDEBUG((LOG_INFO, "ChapReceiveResponse: rcvd short packet."));
- return;
- }
-
- UNTIMEOUT(ChapChallengeTimeout, cstate);
-
- if (len >= sizeof(rhostname))
- len = sizeof(rhostname) - 1;
- BCOPY(inp, rhostname, len);
- rhostname[len] = '\000';
-
- CHAPDEBUG((LOG_INFO, "ChapReceiveResponse: received name field: %s",
- rhostname));
-
- /*
- * Get secret for authenticating them with us,
- * do the hash ourselves, and compare the result.
- */
- code = CHAP_FAILURE;
- if (!get_secret(cstate->unit, rhostname, cstate->chal_name,
- secret, &secret_len, 1)) {
- syslog(LOG_WARNING, "No CHAP secret found for authenticating %s",
- rhostname);
- } else {
-
- /* generate MD based on negotiated type */
- switch (cstate->chal_type) {
-
- case CHAP_DIGEST_MD5: /* only MD5 is defined for now */
- if (remmd_len != MD5_SIGNATURE_SIZE)
- break; /* it's not even the right length */
- MD5Init(&mdContext);
- MD5Update(&mdContext, &cstate->chal_id, 1);
- MD5Update(&mdContext, secret, secret_len);
- MD5Update(&mdContext, cstate->challenge, cstate->chal_len);
- MD5Final(hash, &mdContext);
-
- /* compare local and remote MDs and send the appropriate status */
- if (memcmp (hash, remmd, MD5_SIGNATURE_SIZE) == 0)
- code = CHAP_SUCCESS; /* they are the same! */
- break;
-
- default:
- CHAPDEBUG((LOG_INFO, "unknown digest type %d", cstate->chal_type));
- }
- }
-
- BZERO(secret, sizeof(secret));
- ChapSendStatus(cstate, code);
-
- if (code == CHAP_SUCCESS) {
- old_state = cstate->serverstate;
- cstate->serverstate = CHAPSS_OPEN;
- if (old_state == CHAPSS_INITIAL_CHAL) {
- auth_peer_success(cstate->unit, PPP_CHAP, rhostname, len);
- }
- if (cstate->chal_interval != 0)
- TIMEOUT(ChapRechallenge, cstate, cstate->chal_interval);
- syslog(LOG_NOTICE, "CHAP peer authentication succeeded for %s",
- rhostname);
-
- } else {
- syslog(LOG_ERR, "CHAP peer authentication failed for remote host %s",
- rhostname);
- cstate->serverstate = CHAPSS_BADAUTH;
- auth_peer_fail(cstate->unit, PPP_CHAP);
- }
-}
-
-/*
- * ChapReceiveSuccess - Receive Success
- */
-static void
-ChapReceiveSuccess(cstate, inp, id, len)
- chap_state *cstate;
- u_char *inp;
- int id; /* was u_char id */
- int len;
-{
-
- CHAPDEBUG((LOG_INFO, "ChapReceiveSuccess: Rcvd id %d.", id));
-
- if (cstate->clientstate == CHAPCS_OPEN)
- /* presumably an answer to a duplicate response */
- return;
-
- if (cstate->clientstate != CHAPCS_RESPONSE) {
- /* don't know what this is */
- CHAPDEBUG((LOG_INFO, "ChapReceiveSuccess: in state %d\n",
- cstate->clientstate));
- return;
- }
-
- UNTIMEOUT(ChapResponseTimeout, cstate);
-
- /*
- * Print message.
- */
- if (len > 0)
- PRINTMSG(inp, len);
-
- cstate->clientstate = CHAPCS_OPEN;
-
- auth_withpeer_success(cstate->unit, PPP_CHAP);
-}
-
-
-/*
- * ChapReceiveFailure - Receive failure.
- */
-static void
-ChapReceiveFailure(cstate, inp, id, len)
- chap_state *cstate;
- u_char *inp;
- int id; /* was u_char id; */
- int len;
-{
- CHAPDEBUG((LOG_INFO, "ChapReceiveFailure: Rcvd id %d.", id));
-
- if (cstate->clientstate != CHAPCS_RESPONSE) {
- /* don't know what this is */
- CHAPDEBUG((LOG_INFO, "ChapReceiveFailure: in state %d\n",
- cstate->clientstate));
- return;
- }
-
- UNTIMEOUT(ChapResponseTimeout, cstate);
-
- /*
- * Print message.
- */
- if (len > 0)
- PRINTMSG(inp, len);
-
- syslog(LOG_ERR, "CHAP authentication failed");
- auth_withpeer_fail(cstate->unit, PPP_CHAP);
-}
-
-
-/*
- * ChapSendChallenge - Send an Authenticate challenge.
- */
-static void
-ChapSendChallenge(cstate)
- chap_state *cstate;
-{
- u_char *outp;
- int chal_len, name_len;
- int outlen;
-
- chal_len = cstate->chal_len;
- name_len = strlen(cstate->chal_name);
- outlen = CHAP_HEADERLEN + sizeof (u_char) + chal_len + name_len;
- outp = outpacket_buf;
-
- MAKEHEADER(outp, PPP_CHAP); /* paste in a CHAP header */
-
- PUTCHAR(CHAP_CHALLENGE, outp);
- PUTCHAR(cstate->chal_id, outp);
- PUTSHORT(outlen, outp);
-
- PUTCHAR(chal_len, outp); /* put length of challenge */
- BCOPY(cstate->challenge, outp, chal_len);
- INCPTR(chal_len, outp);
-
- BCOPY(cstate->chal_name, outp, name_len); /* append hostname */
-
- output(cstate->unit, outpacket_buf, outlen + PPP_HDRLEN);
-
- CHAPDEBUG((LOG_INFO, "ChapSendChallenge: Sent id %d.", cstate->chal_id));
-
- TIMEOUT(ChapChallengeTimeout, cstate, cstate->timeouttime);
- ++cstate->chal_transmits;
-}
-
-
-/*
- * ChapSendStatus - Send a status response (ack or nak).
- */
-static void
-ChapSendStatus(cstate, code)
- chap_state *cstate;
- int code;
-{
- u_char *outp;
- int outlen, msglen;
- char msg[256];
-
- if (code == CHAP_SUCCESS)
- sprintf(msg, "Welcome to %s.", hostname);
- else
- sprintf(msg, "I don't like you. Go 'way.");
- msglen = strlen(msg);
-
- outlen = CHAP_HEADERLEN + msglen;
- outp = outpacket_buf;
-
- MAKEHEADER(outp, PPP_CHAP); /* paste in a header */
-
- PUTCHAR(code, outp);
- PUTCHAR(cstate->chal_id, outp);
- PUTSHORT(outlen, outp);
- BCOPY(msg, outp, msglen);
- output(cstate->unit, outpacket_buf, outlen + PPP_HDRLEN);
-
- CHAPDEBUG((LOG_INFO, "ChapSendStatus: Sent code %d, id %d.", code,
- cstate->chal_id));
-}
-
-/*
- * ChapGenChallenge is used to generate a pseudo-random challenge string of
- * a pseudo-random length between min_len and max_len. The challenge
- * string and its length are stored in *cstate, and various other fields of
- * *cstate are initialized.
- */
-
-static void
-ChapGenChallenge(cstate)
- chap_state *cstate;
-{
- int chal_len;
- u_char *ptr = cstate->challenge;
- unsigned int i;
-
- /* pick a random challenge length between MIN_CHALLENGE_LENGTH and
- MAX_CHALLENGE_LENGTH */
- chal_len = (unsigned) ((drand48() *
- (MAX_CHALLENGE_LENGTH - MIN_CHALLENGE_LENGTH)) +
- MIN_CHALLENGE_LENGTH);
- cstate->chal_len = chal_len;
- cstate->chal_id = ++cstate->id;
- cstate->chal_transmits = 0;
-
- /* generate a random string */
- for (i = 0; i < chal_len; i++ )
- *ptr++ = (char) (drand48() * 0xff);
-}
-
-/*
- * ChapSendResponse - send a response packet with values as specified
- * in *cstate.
- */
-/* ARGSUSED */
-static void
-ChapSendResponse(cstate)
- chap_state *cstate;
-{
- u_char *outp;
- int outlen, md_len, name_len;
-
- md_len = cstate->resp_length;
- name_len = strlen(cstate->resp_name);
- outlen = CHAP_HEADERLEN + sizeof (u_char) + md_len + name_len;
- outp = outpacket_buf;
-
- MAKEHEADER(outp, PPP_CHAP);
-
- PUTCHAR(CHAP_RESPONSE, outp); /* we are a response */
- PUTCHAR(cstate->resp_id, outp); /* copy id from challenge packet */
- PUTSHORT(outlen, outp); /* packet length */
-
- PUTCHAR(md_len, outp); /* length of MD */
- BCOPY(cstate->response, outp, md_len); /* copy MD to buffer */
- INCPTR(md_len, outp);
-
- BCOPY(cstate->resp_name, outp, name_len); /* append our name */
-
- /* send the packet */
- output(cstate->unit, outpacket_buf, outlen + PPP_HDRLEN);
-
- cstate->clientstate = CHAPCS_RESPONSE;
- TIMEOUT(ChapResponseTimeout, cstate, cstate->timeouttime);
- ++cstate->resp_transmits;
-}
-
-/*
- * ChapPrintPkt - print the contents of a CHAP packet.
- */
-static char *ChapCodenames[] = {
- "Challenge", "Response", "Success", "Failure"
-};
-
-static int
-ChapPrintPkt(p, plen, printer, arg)
- u_char *p;
- int plen;
- void (*printer) __P((void *, char *, ...));
- void *arg;
-{
- int code, id, len;
- int clen, nlen;
- u_char x;
- if (plen < CHAP_HEADERLEN)
- return 0;
- GETCHAR(code, p);
- GETCHAR(id, p);
- GETSHORT(len, p);
- if (len < CHAP_HEADERLEN || len > plen)
- return 0;
-
- if (code >= 1 && code <= sizeof(ChapCodenames) / sizeof(char *))
- printer(arg, " %s", ChapCodenames[code-1]);
- else
- printer(arg, " code=0x%x", code);
- printer(arg, " id=0x%x", id);
- len -= CHAP_HEADERLEN;
- switch (code) {
- case CHAP_CHALLENGE:
- case CHAP_RESPONSE:
- if (len < 1)
- break;
- clen = p[0];
- if (len < clen + 1)
- break;
- ++p;
- nlen = len - clen - 1;
- printer(arg, " <");
- for (; clen > 0; --clen) {
- GETCHAR(x, p);
- printer(arg, "%.2x", x);
- }
- printer(arg, ">, name = ");
- print_string((char *)p, nlen, printer, arg);
- break;
- case CHAP_FAILURE:
- case CHAP_SUCCESS:
- printer(arg, " ");
- print_string((char *)p, len, printer, arg);
- break;
- default:
- for (clen = len; clen > 0; --clen) {
- GETCHAR(x, p);
- printer(arg, " %.2x", x);
- }
- }
- return len + CHAP_HEADERLEN;
-}
diff --git a/cpukit/pppd/chap.h b/cpukit/pppd/chap.h
deleted file mode 100644
index 6e2cc45e89..0000000000
--- a/cpukit/pppd/chap.h
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * chap.h - Challenge Handshake Authentication Protocol definitions.
- *
- * Copyright (c) 1993 The Australian National University.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by the Australian National University. The name of the University
- * may not be used to endorse or promote products derived from this
- * software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Copyright (c) 1991 Gregory M. Christy
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by the author.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Id$
- */
-
-#ifndef __CHAP_INCLUDE__
-
-/* Code + ID + length */
-#define CHAP_HEADERLEN 4
-
-/*
- * CHAP codes.
- */
-
-#define CHAP_DIGEST_MD5 5 /* use MD5 algorithm */
-#define MD5_SIGNATURE_SIZE 16 /* 16 bytes in a MD5 message digest */
-#define CHAP_MICROSOFT 0x80 /* use Microsoft-compatible alg. */
-#define MS_CHAP_RESPONSE_LEN 49 /* Response length for MS-CHAP */
-
-#define CHAP_CHALLENGE 1
-#define CHAP_RESPONSE 2
-#define CHAP_SUCCESS 3
-#define CHAP_FAILURE 4
-
-/*
- * Challenge lengths (for challenges we send) and other limits.
- */
-#define MIN_CHALLENGE_LENGTH 32
-#define MAX_CHALLENGE_LENGTH 64
-#define MAX_RESPONSE_LENGTH 64 /* sufficient for MD5 or MS-CHAP */
-
-/*
- * Each interface is described by a chap structure.
- */
-
-typedef struct chap_state {
- int unit; /* Interface unit number */
- int clientstate; /* Client state */
- int serverstate; /* Server state */
- u_char challenge[MAX_CHALLENGE_LENGTH]; /* last challenge string sent */
- u_char chal_len; /* challenge length */
- u_char chal_id; /* ID of last challenge */
- u_char chal_type; /* hash algorithm for challenges */
- u_char id; /* Current id */
- char *chal_name; /* Our name to use with challenge */
- int chal_interval; /* Time until we challenge peer again */
- int timeouttime; /* Timeout time in seconds */
- int max_transmits; /* Maximum # of challenge transmissions */
- int chal_transmits; /* Number of transmissions of challenge */
- int resp_transmits; /* Number of transmissions of response */
- u_char response[MAX_RESPONSE_LENGTH]; /* Response to send */
- u_char resp_length; /* length of response */
- u_char resp_id; /* ID for response messages */
- u_char resp_type; /* hash algorithm for responses */
- char *resp_name; /* Our name to send with response */
-} chap_state;
-
-
-/*
- * Client (peer) states.
- */
-#define CHAPCS_INITIAL 0 /* Lower layer down, not opened */
-#define CHAPCS_CLOSED 1 /* Lower layer up, not opened */
-#define CHAPCS_PENDING 2 /* Auth us to peer when lower up */
-#define CHAPCS_LISTEN 3 /* Listening for a challenge */
-#define CHAPCS_RESPONSE 4 /* Sent response, waiting for status */
-#define CHAPCS_OPEN 5 /* We've received Success */
-
-/*
- * Server (authenticator) states.
- */
-#define CHAPSS_INITIAL 0 /* Lower layer down, not opened */
-#define CHAPSS_CLOSED 1 /* Lower layer up, not opened */
-#define CHAPSS_PENDING 2 /* Auth peer when lower up */
-#define CHAPSS_INITIAL_CHAL 3 /* We've sent the first challenge */
-#define CHAPSS_OPEN 4 /* We've sent a Success msg */
-#define CHAPSS_RECHALLENGE 5 /* We've sent another challenge */
-#define CHAPSS_BADAUTH 6 /* We've sent a Failure msg */
-
-/*
- * Timeouts.
- */
-#define CHAP_DEFTIMEOUT 3 /* Timeout time in seconds */
-#define CHAP_DEFTRANSMITS 10 /* max # times to send challenge */
-
-extern chap_state chap[];
-
-void ChapAuthWithPeer __P((int, char *, int));
-void ChapAuthPeer __P((int, char *, int));
-
-extern struct protent chap_protent;
-
-#define __CHAP_INCLUDE__
-#endif /* __CHAP_INCLUDE__ */
diff --git a/cpukit/pppd/chap_ms.c b/cpukit/pppd/chap_ms.c
deleted file mode 100644
index 2de98dbb66..0000000000
--- a/cpukit/pppd/chap_ms.c
+++ /dev/null
@@ -1,335 +0,0 @@
-/*
- * chap_ms.c - Microsoft MS-CHAP compatible implementation.
- *
- * Copyright (c) 1995 Eric Rosenquist, Strata Software Limited.
- * http://www.strataware.com/
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by Eric Rosenquist. The name of the author may not be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-/*
- * Modifications by Lauri Pesonen / lpesonen@clinet.fi, april 1997
- *
- * Implemented LANManager type password response to MS-CHAP challenges.
- * Now pppd provides both NT style and LANMan style blocks, and the
- * prefered is set by option "ms-lanman". Default is to use NT.
- * The hash text (StdText) was taken from Win95 RASAPI32.DLL.
- *
- * You should also use DOMAIN\\USERNAME as described in README.MSCHAP80
- */
-
-#ifndef lint
-/* static char rcsid[] = "$Id$"; */
-#endif
-
-#ifdef CHAPMS
-
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#include <syslog.h>
-#include <unistd.h>
-#ifdef HAVE_CRYPT_H
-#include <crypt.h>
-#endif
-
-#include "pppd.h"
-#include "chap.h"
-#include "chap_ms.h"
-#include "md4.h"
-
-#ifndef USE_CRYPT
-#include <des.h>
-#endif
-
-typedef struct {
- u_char LANManResp[24];
- u_char NTResp[24];
- u_char UseNT; /* If 1, ignore the LANMan response field */
-} MS_ChapResponse;
-/* We use MS_CHAP_RESPONSE_LEN, rather than sizeof(MS_ChapResponse),
- in case this struct gets padded. */
-
-
-static void ChallengeResponse __P((u_char *, u_char *, u_char *));
-static void DesEncrypt __P((u_char *, u_char *, u_char *));
-static void MakeKey __P((u_char *, u_char *));
-static u_char Get7Bits __P((u_char *, int));
-static void ChapMS_NT __P((char *, int, char *, int, MS_ChapResponse *));
-#ifdef MSLANMAN
-static void ChapMS_LANMan __P((char *, int, char *, int, MS_ChapResponse *));
-#endif
-
-#ifdef USE_CRYPT
-static void Expand __P((u_char *, u_char *));
-static void Collapse __P((u_char *, u_char *));
-#endif
-
-static void
-ChallengeResponse(challenge, pwHash, response)
- u_char *challenge; /* IN 8 octets */
- u_char *pwHash; /* IN 16 octets */
- u_char *response; /* OUT 24 octets */
-{
- char ZPasswordHash[21];
-
- BZERO(ZPasswordHash, sizeof(ZPasswordHash));
- BCOPY(pwHash, ZPasswordHash, MD4_SIGNATURE_SIZE);
-
-#if 0
- log_packet(ZPasswordHash, sizeof(ZPasswordHash), "ChallengeResponse - ZPasswordHash", LOG_DEBUG);
-#endif
-
- DesEncrypt(challenge, ZPasswordHash + 0, response + 0);
- DesEncrypt(challenge, ZPasswordHash + 7, response + 8);
- DesEncrypt(challenge, ZPasswordHash + 14, response + 16);
-
-#if 0
- log_packet(response, 24, "ChallengeResponse - response", LOG_DEBUG);
-#endif
-}
-
-
-#ifdef USE_CRYPT
-static void
-DesEncrypt(clear, key, cipher)
- u_char *clear; /* IN 8 octets */
- u_char *key; /* IN 7 octets */
- u_char *cipher; /* OUT 8 octets */
-{
- u_char des_key[8];
- u_char crypt_key[66];
- u_char des_input[66];
-
- MakeKey(key, des_key);
-
- Expand(des_key, crypt_key);
- setkey(crypt_key);
-
-#if 0
- CHAPDEBUG((LOG_INFO, "DesEncrypt: 8 octet input : %02X%02X%02X%02X%02X%02X%02X%02X",
- clear[0], clear[1], clear[2], clear[3], clear[4], clear[5], clear[6], clear[7]));
-#endif
-
- Expand(clear, des_input);
- encrypt(des_input, 0);
- Collapse(des_input, cipher);
-
-#if 0
- CHAPDEBUG((LOG_INFO, "DesEncrypt: 8 octet output: %02X%02X%02X%02X%02X%02X%02X%02X",
- cipher[0], cipher[1], cipher[2], cipher[3], cipher[4], cipher[5], cipher[6], cipher[7]));
-#endif
-}
-
-#else /* USE_CRYPT */
-
-static void
-DesEncrypt(clear, key, cipher)
- u_char *clear; /* IN 8 octets */
- u_char *key; /* IN 7 octets */
- u_char *cipher; /* OUT 8 octets */
-{
- des_cblock des_key;
- des_key_schedule key_schedule;
-
- MakeKey(key, des_key);
-
- des_set_key(&des_key, key_schedule);
-
-#if 0
- CHAPDEBUG((LOG_INFO, "DesEncrypt: 8 octet input : %02X%02X%02X%02X%02X%02X%02X%02X",
- clear[0], clear[1], clear[2], clear[3], clear[4], clear[5], clear[6], clear[7]));
-#endif
-
- des_ecb_encrypt((des_cblock *)clear, (des_cblock *)cipher, key_schedule, 1);
-
-#if 0
- CHAPDEBUG((LOG_INFO, "DesEncrypt: 8 octet output: %02X%02X%02X%02X%02X%02X%02X%02X",
- cipher[0], cipher[1], cipher[2], cipher[3], cipher[4], cipher[5], cipher[6], cipher[7]));
-#endif
-}
-
-#endif /* USE_CRYPT */
-
-
-static u_char Get7Bits(input, startBit)
- u_char *input;
- int startBit;
-{
- register unsigned int word;
-
- word = (unsigned)input[startBit / 8] << 8;
- word |= (unsigned)input[startBit / 8 + 1];
-
- word >>= 15 - (startBit % 8 + 7);
-
- return word & 0xFE;
-}
-
-#ifdef USE_CRYPT
-
-/* in == 8-byte string (expanded version of the 56-bit key)
- * out == 64-byte string where each byte is either 1 or 0
- * Note that the low-order "bit" is always ignored by by setkey()
- */
-static void Expand(in, out)
- u_char *in;
- u_char *out;
-{
- int j, c;
- int i;
-
- for(i = 0; i < 64; in++){
- c = *in;
- for(j = 7; j >= 0; j--)
- *out++ = (c >> j) & 01;
- i += 8;
- }
-}
-
-/* The inverse of Expand
- */
-static void Collapse(in, out)
- u_char *in;
- u_char *out;
-{
- int j;
- int i;
- unsigned int c;
-
- for (i = 0; i < 64; i += 8, out++) {
- c = 0;
- for (j = 7; j >= 0; j--, in++)
- c |= *in << j;
- *out = c & 0xff;
- }
-}
-#endif
-
-static void MakeKey(key, des_key)
- u_char *key; /* IN 56 bit DES key missing parity bits */
- u_char *des_key; /* OUT 64 bit DES key with parity bits added */
-{
- des_key[0] = Get7Bits(key, 0);
- des_key[1] = Get7Bits(key, 7);
- des_key[2] = Get7Bits(key, 14);
- des_key[3] = Get7Bits(key, 21);
- des_key[4] = Get7Bits(key, 28);
- des_key[5] = Get7Bits(key, 35);
- des_key[6] = Get7Bits(key, 42);
- des_key[7] = Get7Bits(key, 49);
-
-#ifndef USE_CRYPT
- des_set_odd_parity((des_cblock *)des_key);
-#endif
-
-#if 0
- CHAPDEBUG((LOG_INFO, "MakeKey: 56-bit input : %02X%02X%02X%02X%02X%02X%02X",
- key[0], key[1], key[2], key[3], key[4], key[5], key[6]));
- CHAPDEBUG((LOG_INFO, "MakeKey: 64-bit output: %02X%02X%02X%02X%02X%02X%02X%02X",
- des_key[0], des_key[1], des_key[2], des_key[3], des_key[4], des_key[5], des_key[6], des_key[7]));
-#endif
-}
-
-static void
-ChapMS_NT(rchallenge, rchallenge_len, secret, secret_len, response)
- char *rchallenge;
- int rchallenge_len;
- char *secret;
- int secret_len;
- MS_ChapResponse *response;
-{
- int i;
- MD4_CTX md4Context;
- u_char hash[MD4_SIGNATURE_SIZE];
- u_char unicodePassword[MAX_NT_PASSWORD * 2];
-
- /* Initialize the Unicode version of the secret (== password). */
- /* This implicitly supports 8-bit ISO8859/1 characters. */
- BZERO(unicodePassword, sizeof(unicodePassword));
- for (i = 0; i < secret_len; i++)
- unicodePassword[i * 2] = (u_char)secret[i];
-
- MD4Init(&md4Context);
- MD4Update(&md4Context, unicodePassword, secret_len * 2 * 8); /* Unicode is 2 bytes/char, *8 for bit count */
-
- MD4Final(hash, &md4Context); /* Tell MD4 we're done */
-
- ChallengeResponse(rchallenge, hash, response->NTResp);
-}
-
-#ifdef MSLANMAN
-static u_char *StdText = (u_char *)"KGS!@#$%"; /* key from rasapi32.dll */
-
-static void
-ChapMS_LANMan(rchallenge, rchallenge_len, secret, secret_len, response)
- char *rchallenge;
- int rchallenge_len;
- char *secret;
- int secret_len;
- MS_ChapResponse *response;
-{
- int i;
- u_char UcasePassword[MAX_NT_PASSWORD]; /* max is actually 14 */
- u_char PasswordHash[MD4_SIGNATURE_SIZE];
-
- /* LANMan password is case insensitive */
- BZERO(UcasePassword, sizeof(UcasePassword));
- for (i = 0; i < secret_len; i++)
- UcasePassword[i] = (u_char)toupper(secret[i]);
- DesEncrypt( StdText, UcasePassword + 0, PasswordHash + 0 );
- DesEncrypt( StdText, UcasePassword + 7, PasswordHash + 8 );
- ChallengeResponse(rchallenge, PasswordHash, response->LANManResp);
-}
-#endif
-
-void
-ChapMS(cstate, rchallenge, rchallenge_len, secret, secret_len)
- chap_state *cstate;
- char *rchallenge;
- int rchallenge_len;
- char *secret;
- int secret_len;
-{
- MS_ChapResponse response;
-#ifdef MSLANMAN
- extern int ms_lanman;
-#endif
-
-#if 0
- CHAPDEBUG((LOG_INFO, "ChapMS: secret is '%.*s'", secret_len, secret));
-#endif
- BZERO(&response, sizeof(response));
-
- /* Calculate both always */
- ChapMS_NT(rchallenge, rchallenge_len, secret, secret_len, &response);
-
-#ifdef MSLANMAN
- ChapMS_LANMan(rchallenge, rchallenge_len, secret, secret_len, &response);
-
- /* prefered method is set by option */
- response.UseNT = !ms_lanman;
-#else
- response.UseNT = 1;
-#endif
-
- BCOPY(&response, cstate->response, MS_CHAP_RESPONSE_LEN);
- cstate->resp_length = MS_CHAP_RESPONSE_LEN;
-}
-
-#endif /* CHAPMS */
diff --git a/cpukit/pppd/chap_ms.h b/cpukit/pppd/chap_ms.h
deleted file mode 100644
index fad2755c86..0000000000
--- a/cpukit/pppd/chap_ms.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * chap.h - Challenge Handshake Authentication Protocol definitions.
- *
- * Copyright (c) 1995 Eric Rosenquist, Strata Software Limited.
- * http://www.strataware.com/
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by Eric Rosenquist. The name of the author may not be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Id$
- */
-
-#ifndef __CHAPMS_INCLUDE__
-
-#define MD4_SIGNATURE_SIZE 16 /* 16 bytes in a MD4 message digest */
-#define MAX_NT_PASSWORD 256 /* Maximum number of (Unicode) chars in an NT password */
-
-void ChapMS __P((chap_state *, char *, int, char *, int));
-
-#define __CHAPMS_INCLUDE__
-#endif /* __CHAPMS_INCLUDE__ */
diff --git a/cpukit/pppd/chat.c b/cpukit/pppd/chat.c
deleted file mode 100644
index ad4c0c932e..0000000000
--- a/cpukit/pppd/chat.c
+++ /dev/null
@@ -1,1004 +0,0 @@
-/*
- * Chat -- a program for automatic session establishment (i.e. dial
- * the phone and log in).
- *
- * Standard termination codes:
- * 0 - successful completion of the script
- * 1 - invalid argument, expect string too large, etc.
- * 2 - error on an I/O operation or fatal error condition.
- * 3 - timeout waiting for a simple string.
- * 4 - the first string declared as "ABORT"
- * 5 - the second string declared as "ABORT"
- * 6 - ... and so on for successive ABORT strings.
- *
- * This software is in the public domain.
- *
- * -----------------
- * added -T and -U option and \T and \U substitution to pass a phone
- * number into chat script. Two are needed for some ISDN TA applications.
- * Keith Dart <kdart@cisco.com>
- *
- *
- * Added SAY keyword to send output to stderr.
- * This allows to turn ECHO OFF and to output specific, user selected,
- * text to give progress messages. This best works when stderr
- * exists (i.e.: pppd in nodetach mode).
- *
- * Added HANGUP directives to allow for us to be called
- * back. When HANGUP is set to NO, chat will not hangup at HUP signal.
- * We rely on timeouts in that case.
- *
- * Added CLR_ABORT to clear previously set ABORT string. This has been
- * dictated by the HANGUP above as "NO CARRIER" (for example) must be
- * an ABORT condition until we know the other host is going to close
- * the connection for call back. As soon as we have completed the
- * first stage of the call back sequence, "NO CARRIER" is a valid, non
- * fatal string. As soon as we got called back (probably get "CONNECT"),
- * we should re-arm the ABORT "NO CARRIER". Hence the CLR_ABORT command.
- * Note that CLR_ABORT packs the abort_strings[] array so that we do not
- * have unused entries not being reclaimed.
- *
- * In the same vein as above, added CLR_REPORT keyword.
- *
- * Allow for comments. Line starting with '#' are comments and are
- * ignored. If a '#' is to be expected as the first character, the
- * expect string must be quoted.
- *
- *
- * Francis Demierre <Francis@SwissMail.Com>
- * Thu May 15 17:15:40 MET DST 1997
- *
- *
- * Added -r "report file" switch & REPORT keyword.
- * Robert Geer <bgeer@xmission.com>
- *
- * Added -s "use stderr" and -S "don't use syslog" switches.
- * June 18, 1997
- * Karl O. Pinc <kop@meme.com>
- *
- *
- * Added -e "echo" switch & ECHO keyword
- * Dick Streefland <dicks@tasking.nl>
- *
- *
- * Considerable updates and modifications by
- * Al Longyear <longyear@pobox.com>
- * Paul Mackerras <paulus@cs.anu.edu.au>
- *
- *
- * The original author is:
- *
- * Karl Fox <karl@MorningStar.Com>
- * Morning Star Technologies, Inc.
- * 1760 Zollinger Road
- * Columbus, OH 43221
- * (614)451-1883
- *
- *
- */
-
-#ifndef lint
-/* static char rcsid[] = ""; */
-#endif
-
-#include <stdio.h>
-#include <ctype.h>
-#include <time.h>
-#include <fcntl.h>
-#include <signal.h>
-#include <errno.h>
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <syslog.h>
-
-#undef TERMIOS
-#define TERMIOS
-
-
-#include <termios.h>
-
-#define STR_LEN 1024
-char temp2[STR_LEN];
-
-#ifndef SIGTYPE
-#define SIGTYPE void
-#endif
-
-#undef __P
-#undef __V
-
-#ifdef __STDC__
-#include <stdarg.h>
-#define __V(x) x
-#define __P(x) x
-#else
-#include <varargs.h>
-#define __V(x) (va_alist) va_dcl
-#define __P(x) ()
-#define const
-#endif
-
-#ifndef O_NONBLOCK
-#define O_NONBLOCK O_NDELAY
-#endif
-
-
-/*************** Micro getopt() *********************************************/
-#define OPTION(c,v) (_O&2&&**v?*(*v)++:!c||_O&4?0:(!(_O&1)&& \
- (--c,++v),_O=4,c&&**v=='-'&&v[0][1]?*++*v=='-'\
- &&!v[0][1]?(--c,++v,0):(_O=2,*(*v)++):0))
-#define OPTARG(c,v) (_O&2?**v||(++v,--c)?(_O=1,--c,*v++): \
- (_O=4,(char*)0):(char*)0)
-#define OPTONLYARG(c,v) (_O&2&&**v?(_O=1,--c,*v++):(char*)0)
-#define ARG(c,v) (c?(--c,*v++):(char*)0)
-
-#if 0
-static int _O = 0; /* Internal state */
-#endif
-/*************** Micro getopt() *********************************************/
-
-char *program_name;
-
-#define MAX_ABORTS 5
-#define MAX_REPORTS 5
-#define DEFAULT_CHAT_TIMEOUT 45
-#define fcntl(a, b,c ) 0
-#define MAX_TIMEOUTS 10
-
-int echo = 0;
-int verbose = 0;
-int to_log = 1;
-int to_stderr = 0;
-int Verbose = 0;
-int quiet = 0;
-int report = 0;
-int exit_code = 0;
-static int speed=0;
-char *report_file = (char *) 0;
-char *chat_file = (char *) 0;
-char *phone_num = (char *) 0;
-char *phone_num2 = (char *) 0;
-int chat_timeout = DEFAULT_CHAT_TIMEOUT;
-static int timeout = DEFAULT_CHAT_TIMEOUT;
-int have_tty_parameters = 0;
-
-#ifdef TERMIOS
-#define term_parms struct termios
-#define get_term_param(param) tcgetattr(modem_fd, param)
-#define set_term_param(param) tcsetattr(modem_fd, TCSANOW, param)
-struct termios saved_tty_parameters;
-#endif
-
-char *abort_string[MAX_ABORTS]={"BUSY","NO DIALTONE","NO CARRIER","NO ASWER","RINGING\r\n\r\nRINGING"};
-char *fail_reason = (char *)0,
- fail_buffer[50];
-int n_aborts = MAX_ABORTS, abort_next = 0, timeout_next = 0, echo_next = 0;
-int clear_abort_next = 0;
-
-char *report_string[MAX_REPORTS] ;
-char report_buffer[50] ;
-int n_reports = 0, report_next = 0, report_gathering = 0 ;
-int clear_report_next = 0;
-
-int say_next = 0, hup_next = 0;
-
-void *dup_mem __P((void *b, size_t c));
-void *copy_of __P((char *s));
-/*
-SIGTYPE sigalrm __P((int signo));
-SIGTYPE sigint __P((int signo));
-SIGTYPE sigterm __P((int signo));
-SIGTYPE sighup __P((int signo));
-*/
-void unalarm __P((void));
-void init __P((void));
-void set_tty_parameters __P((void));
-void echo_stderr __P((int));
-void break_sequence __P((void));
-void terminate __P((int status));
-void do_file __P((char *chat_file));
-int get_string __P((register char *string));
-int put_string __P((register char *s));
-int write_char __P((int c));
-int put_char __P((int c));
-int get_char __P((void));
-void chat_send __P((register char *s));
-char *character __P((int c));
-void chat_expect __P((register char *s));
-char *clean __P((register char *s, int sending));
-void break_sequence __P((void));
-void terminate __P((int status));
-void pack_array __P((char **array, int end));
-char *expect_strtok __P((char *, char *));
-int vfmtmsg __P((char *, int, const char *, va_list)); /* vsprintf++ */
-
-#if 0
-int usleep( long usec ); /* returns 0 if ok, else -1 */
-#endif
-
-extern int input_fd,output_fd;
-
-int main __P((int, char *[]));
-
-void *dup_mem(b, c)
-void *b;
-size_t c;
-{
- void *ans = malloc (c);
- if (!ans)
- return NULL;
-
- memcpy (ans, b, c);
- return ans;
-}
-
-void *copy_of (s)
-char *s;
-{
- return dup_mem (s, strlen (s) + 1);
-}
-
-/*
- * chat [ -v ] [-T number] [-U number] [ -t timeout ] [ -f chat-file ] \
- * [ -r report-file ] \
- * [...[[expect[-say[-expect...]] say expect[-say[-expect]] ...]]]
- *
- * Perform a UUCP-dialer-like chat script on stdin and stdout.
- */
-char *getnextcommand(char **string)
-{
- char *buf=*string,*res;
- res=strchr(buf,'@');
- if (res==NULL)
- return NULL;
- *res='\0';
- *string=res+1;
- return buf;
-}
-
-
-extern int modem_fd;
-int
- chatmain(argv)
- char *argv;
-{
- char *arg;
- int i;
- char *t;
- exit_code=0;
- speed=0;
-/*
- * Default the report file to the stderr location
- */
-/* if (report_fp == NULL)
- report_fp = stderr;
-*/
- init();
- while ( (arg = getnextcommand(&argv)) != NULL) {
- chat_expect(arg);
- if (exit_code>0) break;
- t=temp2;
-
- while(*t)
- {
- if (strncmp("CARRIER",t,7)==0)
- {/* parse speed information */
- i=0;
- while(!isdigit(t[i]))
- i++;
- t=&t[i];
- i=0;
- while(isdigit(t[i]))
- i++;
- t[i]=0;
- sscanf(t,"%d",&speed);
- break;
- }
- t++;
- }
- if ((arg = getnextcommand(&argv)) != NULL)
- chat_send(arg);
- if (exit_code>0) break;
- }
-
- if (exit_code) return exit_code;
- return -speed;
-}
-
-
-
-/*
- * Print an error message and terminate.
- */
-
-void init()
-{
- set_tty_parameters();
- speed=0;
-}
-
-void set_tty_parameters()
-{
- term_parms t;
-
- if (get_term_param (&t) < 0)
- syslog(LOG_NOTICE,"Can't get terminal parameters:")
- ;
-
- saved_tty_parameters = t;
- have_tty_parameters = 1;
- t.c_iflag |= IGNBRK | ISTRIP | IGNPAR;
- t.c_oflag = 0;
- t.c_lflag = 0;
- t.c_cc[VERASE] =
- t.c_cc[VKILL] = 0;
- t.c_cc[VMIN] = 0;
- t.c_cc[VTIME] = 1;
- if (set_term_param (&t) < 0)
- syslog(LOG_NOTICE,"Can't set terminal parameters:")
- ;
-}
-
-void break_sequence()
-{
-
-/* tcsendbreak (0, 0);*/
-}
-
-/*void terminate(status)
-int status;
-{
- echo_stderr(-1);
-
- if (have_tty_parameters) {
- if (set_term_param (&saved_tty_parameters) < 0)
- fatal(2, "Can't restore terminal parameters: %m");
- }
-}
-*/
-/*
- * 'Clean up' this string.
- */
-char *clean(s, sending)
-register char *s;
-int sending; /* set to 1 when sending (putting) this string. */
-{
- char temp[STR_LEN], cur_chr;
- register char *s1, *phchar;
- int add_return = sending;
-#define isoctal(chr) (((chr) >= '0') && ((chr) <= '7'))
-
- s1 = temp;
- while (*s) {
- cur_chr = *s++;
- if (cur_chr == '^') {
- cur_chr = *s++;
- if (cur_chr == '\0') {
- *s1++ = '^';
- break;
- }
- cur_chr &= 0x1F;
- if (cur_chr != 0) {
- *s1++ = cur_chr;
- }
- continue;
- }
-
- if (cur_chr != '\\') {
- *s1++ = cur_chr;
- continue;
- }
-
- cur_chr = *s++;
- if (cur_chr == '\0') {
- if (sending) {
- *s1++ = '\\';
- *s1++ = '\\';
- }
- break;
- }
-
- switch (cur_chr) {
- case 'b':
- *s1++ = '\b';
- break;
-
- case 'c':
- if (sending && *s == '\0')
- add_return = 0;
- else
- *s1++ = cur_chr;
- break;
-
- case '\\':
- case 'K':
- case 'p':
- case 'd':
- if (sending)
- *s1++ = '\\';
-
- *s1++ = cur_chr;
- break;
-
- case 'T':
- if (sending && phone_num) {
- for ( phchar = phone_num; *phchar != '\0'; phchar++)
- *s1++ = *phchar;
- }
- else {
- *s1++ = '\\';
- *s1++ = 'T';
- }
- break;
-
- case 'U':
- if (sending && phone_num2) {
- for ( phchar = phone_num2; *phchar != '\0'; phchar++)
- *s1++ = *phchar;
- }
- else {
- *s1++ = '\\';
- *s1++ = 'U';
- }
- break;
-
- case 'q':
- quiet = 1;
- break;
-
- case 'r':
- *s1++ = '\r';
- break;
-
- case 'n':
- *s1++ = '\n';
- break;
-
- case 's':
- *s1++ = ' ';
- break;
-
- case 't':
- *s1++ = '\t';
- break;
-
- case 'N':
- if (sending) {
- *s1++ = '\\';
- *s1++ = '\0';
- }
- else
- *s1++ = 'N';
- break;
-
- default:
- if (isoctal (cur_chr)) {
- cur_chr &= 0x07;
- if (isoctal (*s)) {
- cur_chr <<= 3;
- cur_chr |= *s++ - '0';
- if (isoctal (*s)) {
- cur_chr <<= 3;
- cur_chr |= *s++ - '0';
- }
- }
-
- if (cur_chr != 0 || sending) {
- if (sending && (cur_chr == '\\' || cur_chr == 0))
- *s1++ = '\\';
- *s1++ = cur_chr;
- }
- break;
- }
-
- if (sending)
- *s1++ = '\\';
- *s1++ = cur_chr;
- break;
- }
- }
-
- if (add_return)
- *s1++ = '\r';
-
- *s1++ = '\0'; /* guarantee closure */
- *s1++ = '\0'; /* terminate the string */
- return dup_mem (temp, (size_t) (s1 - temp)); /* may have embedded nuls */
-}
-
-/*
- * A modified version of 'strtok'. This version skips \ sequences.
- */
-
-char *expect_strtok (s, term)
- char *s, *term;
-{
- static char *str = "";
- int escape_flag = 0;
- char *result;
-
-/*
- * If a string was specified then do initial processing.
- */
- if (s)
- str = s;
-
-/*
- * If this is the escape flag then reset it and ignore the character.
- */
- if (*str)
- result = str;
- else
- result = (char *) 0;
-
- while (*str) {
- if (escape_flag) {
- escape_flag = 0;
- ++str;
- continue;
- }
-
- if (*str == '\\') {
- ++str;
- escape_flag = 1;
- continue;
- }
-
-/*
- * If this is not in the termination string, continue.
- */
- if (strchr (term, *str) == (char *) 0) {
- ++str;
- continue;
- }
-
-/*
- * This is the terminator. Mark the end of the string and stop.
- */
- *str++ = '\0';
- break;
- }
- return (result);
-}
-
-/*
- * Process the expect string
- */
-
-void chat_expect (s)
-char *s;
-{
- char *expect;
- char *reply;
-
- if (strcmp(s, "HANGUP") == 0) {
- ++hup_next;
- return ;
- }
-
- if (strcmp(s, "ABORT") == 0) {
- ++abort_next;
- return ;
- }
-
- if (strcmp(s, "CLR_ABORT") == 0) {
- ++clear_abort_next;
- return ;
- }
-
- if (strcmp(s, "REPORT") == 0) {
- ++report_next;
- return ;
- }
-
- if (strcmp(s, "CLR_REPORT") == 0) {
- ++clear_report_next;
- return ;
- }
-
- if (strcmp(s, "TIMEOUT") == 0) {
- ++timeout_next;
- return ;
- }
-
- if (strcmp(s, "ECHO") == 0) {
- ++echo_next;
- return ;
- }
-
- if (strcmp(s, "SAY") == 0) {
- ++say_next;
- return ;
- }
-
-/*
- * Fetch the expect and reply string.
- */
- for (;;) {
- expect = expect_strtok (s, "-");
- s = (char *)0 ;
-
- if (expect == (char *) 0)
- return ;
-
- reply = expect_strtok (s, "-");
-
-/*
- * Handle the expect string. If successful then exit.
- */
- if (get_string (expect))
- return;
-
-/*
- * If there is a sub-reply string then send it. Otherwise any condition
- * is terminal.
- */
- if (reply == (char *) 0 || exit_code != 3)
- break;
-
- chat_send (reply);
- }
-
-/*
- * The expectation did not occur. This is terminal.
- */
- return ;
-}
-
-/*
- * process the reply string
- */
-void chat_send (s)
-register char *s;
-{
- if (say_next) {
- say_next = 0;
- s = clean(s,0);
- write(modem_fd, s, strlen(s));
- free(s);
- return;
- }
-
- if (hup_next) {
- hup_next = 0;
- }
-
- if (echo_next) {
- echo_next = 0;
- echo = (strcmp(s, "ON") == 0);
- return;
- }
-
- if (abort_next) {
- /* char *s1; */
-
-
- ;
-
-
- return;
- }
-
-
-/* if (report_next) {
- char *s1;
-
- report_next = 0;
- if (n_reports >= MAX_REPORTS)
- {
- exit_code=2;
- return;
- }
-
- s1 = clean(s, 0);
-
- if (strlen(s1) > strlen(s) || strlen(s1) > sizeof fail_buffer - 1)
- {
- exit_code=1;
- return;
- }
-
- report_string[n_reports++] = s1;
-
- return;
- }
-*/
-/* if (clear_report_next) {
- char *s1;
- int i;
- int old_max;
- int pack = 0;
-
- clear_report_next = 0;
-
- s1 = clean(s, 0);
-
- if (strlen(s1) > strlen(s) || strlen(s1) > sizeof fail_buffer - 1)
- {
- exit_code=1;
- return;
- }
-
- old_max = n_reports;
- for (i=0; i < n_reports; i++) {
- if ( strcmp(s1,report_string[i]) == 0 ) {
- free(report_string[i]);
- report_string[i] = NULL;
- pack++;
- n_reports--;
- }
- }
- free(s1);
- if (pack)
- pack_array(report_string,old_max);
-
- return;
- }
-*/
-
- if (timeout_next) {
- timeout=atoi(s);
- timeout_next = 0;
- chat_timeout = atoi(s);
-
- if (chat_timeout <= 0)
- chat_timeout = DEFAULT_CHAT_TIMEOUT;
-
-
- return;
- }
- if (strcmp(s, "EOT") == 0)
- s = "^D\\c";
- else if (strcmp(s, "BREAK") == 0)
- s = "\\K\\c";
-
- if (!put_string(s))
- {
- exit_code=1;
- return;
- }
-}
-
-int get_char()
-{
- int status;
- char c;
- int tries=MAX_TIMEOUTS;
-
- while(tries)
- {
- status = read(modem_fd, &c, 1);
- switch (status) {
- case 1:
- return ((int)c & 0x7F);
- default:
- tries--;
- }
- }
- return -1;
-}
-
-int put_char(c)
-int c;
-{
- int status;
- char ch = c;
-
- /* inter-character typing delay (?) */
-
- status = write(modem_fd, &ch, 1);
-
- switch (status) {
- case 1:
- return (0);
-
- default:
-
-
- }
- return 0;
-}
-
-int write_char (c)
-int c;
-{
- if (put_char(c) < 0) {
- return (0);
- }
- return (1);
-}
-
-int put_string (s)
-register char *s;
-{
-
-
- quiet = 0;
- s = clean(s, 1);
- while (*s) {
- register char c = *s++;
-
- if (c != '\\') {
- if (!write_char (c))
- return 0;
- continue;
- }
-
- c = *s++;
- switch (c) {
- case 'd':
- sleep(1);
- break;
-
- case 'K':
- break_sequence();
- break;
-
- case 'p':
- usleep(10000); /* 1/100th of a second (arg is microseconds) */
- break;
-
- default:
- if (!write_char (c))
- return 0;
- break;
- }
- }
-
- /* alarm(0);*/
- return (1);
-}
-
-/*
- * Echo a character to stderr.
- * When called with -1, a '\n' character is generated when
- * the cursor is not at the beginning of a line.
- */
-void echo_stderr(n)
-int n;
-{
-/* static int need_lf;
- char *s;
-
- switch (n) {
- case '\r':
- break;
- case -1:
- if (need_lf == 0)
- break;
-
- case '\n':
- write(2, "\n", 1);
- need_lf = 0;
- break;
- default:
- s = character(n);
- write(2, s, strlen(s));
- need_lf = 1;
- break;
- }*/
-}
-
-/*
- * 'Wait for' this string to appear on this file descriptor.
- */
-
-int get_string(string)
-register char *string;
-{
- int c, len, minlen;
- register char *s = temp2, *end = s + STR_LEN;
- char *logged = temp2;
- struct termios tios;
-
- tcgetattr(modem_fd, &tios);
- tios.c_cc[VMIN] = 0;
- tios.c_cc[VTIME] = timeout*10/MAX_TIMEOUTS;
- tcsetattr(modem_fd, TCSANOW, &tios);
-
- string = clean(string, 0);
- len = strlen(string);
- minlen = (len > sizeof(fail_buffer)? len: sizeof(fail_buffer)) - 1;
-
- if (len > STR_LEN) {
- exit_code = 1;
- return 0;
- }
-
- if (len == 0) {
- return (1);
- }
-
-
- while ( (c = get_char()) >= 0) {
- int n, abort_len;
-
- *s++ = c;
- *s=0;
-
- if (s - temp2 >= len &&
- c == string[len - 1] &&
- strncmp(s - len, string, len) == 0) {
- return (1);
- }
-
- for (n = 0; n < n_aborts; ++n) {
- if (s - temp2 >= (abort_len = strlen(abort_string[n])) &&
- strncmp(s - abort_len, abort_string[n], abort_len) == 0) {
-
- exit_code = n + 4;
- strcpy(fail_reason = fail_buffer, abort_string[n]);
- return (0);
- }
- }
-
- if (s >= end) {
- if (logged < s - minlen) {
- logged = s;
- }
- s -= minlen;
- memmove(temp2, s, minlen);
- logged = temp2 + (logged - s);
- s = temp2 + minlen;
- }
- }
- exit_code = 3;
- return (0);
-}
-
-/*
- * Gross kludge to handle Solaris versions >= 2.6 having usleep.
- */
-
-/*
- usleep -- support routine for 4.2BSD system call emulations
- last edit: 29-Oct-1984 D A Gwyn
- */
-
-
-#if 0
-int
-usleep( usec ) /* returns 0 if ok, else -1 */
- long usec; /* delay in microseconds */
-{
- rtems_status_code status;
- rtems_interval ticks_per_second;
- rtems_interval ticks;
- status = rtems_clock_get(
- RTEMS_CLOCK_GET_TICKS_PER_SECOND,
- &ticks_per_second);
- ticks = (usec * (ticks_per_second/1000))/1000;
- status = rtems_task_wake_after( ticks );
- return 0;
-}
-#endif
-
-void pack_array (array, end)
- char **array; /* The address of the array of string pointers */
- int end; /* The index of the next free entry before CLR_ */
-{
- int i, j;
-
- for (i = 0; i < end; i++) {
- if (array[i] == NULL) {
- for (j = i+1; j < end; ++j)
- if (array[j] != NULL)
- array[i++] = array[j];
- for (; i < end; ++i)
- array[i] = NULL;
- break;
- }
- }
-}
-
-/*
- * vfmtmsg - format a message into a buffer. Like vsprintf except we
- * also specify the length of the output buffer, and we handle the
- * %m (error message) format.
- * Doesn't do floating-point formats.
- * Returns the number of chars put into buf.
- */
-#define OUTCHAR(c) (buflen > 0? (--buflen, *buf++ = (c)): 0)
diff --git a/cpukit/pppd/demand.c b/cpukit/pppd/demand.c
deleted file mode 100644
index a1910f258f..0000000000
--- a/cpukit/pppd/demand.c
+++ /dev/null
@@ -1,348 +0,0 @@
-/*
- * demand.c - Support routines for demand-dialling.
- *
- * Copyright (c) 1993 The Australian National University.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by the Australian National University. The name of the University
- * may not be used to endorse or promote products derived from this
- * software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#ifndef lint
-/* static char rcsid[] = "$Id$"; */
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <syslog.h>
-#include <netdb.h>
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <sys/time.h>
-#include <sys/resource.h>
-#include <sys/stat.h>
-#include <sys/socket.h>
-#ifdef PPP_FILTER
-#include <net/if.h>
-#include <net/bpf.h>
-#include <pcap.h>
-#endif
-
-#include "pppd.h"
-#include "fsm.h"
-#include "ipcp.h"
-#include "lcp.h"
-
-char *frame;
-int framelen;
-int framemax;
-int escape_flag;
-int flush_flag;
-int fcs;
-
-struct packet {
- int length;
- struct packet *next;
- unsigned char data[1];
-};
-
-struct packet *pend_q;
-struct packet *pend_qtail;
-
-static int active_packet __P((unsigned char *, int));
-
-/*
- * demand_conf - configure the interface for doing dial-on-demand.
- */
-void
-demand_conf()
-{
- int i;
- struct protent *protp;
-
-/* framemax = lcp_allowoptions[0].mru;
- if (framemax < PPP_MRU) */
- framemax = PPP_MRU;
- framemax += PPP_HDRLEN + PPP_FCSLEN;
- frame = malloc(framemax);
- if (frame == NULL)
- novm("demand frame");
- framelen = 0;
- pend_q = NULL;
- escape_flag = 0;
- flush_flag = 0;
- fcs = PPP_INITFCS;
-
- ppp_send_config(0, PPP_MRU, (u_int32_t) 0, 0, 0);
- ppp_recv_config(0, PPP_MRU, (u_int32_t) 0, 0, 0);
-
-#ifdef PPP_FILTER
- set_filters(&pass_filter, &active_filter);
-#endif
-
- /*
- * Call the demand_conf procedure for each protocol that's got one.
- */
- for (i = 0; (protp = protocols[i]) != NULL; ++i)
- if (protp->enabled_flag && protp->demand_conf != NULL)
- if (!((*protp->demand_conf)(0)))
- die(1);
-}
-
-
-/*
- * demand_block - set each network protocol to block further packets.
- */
-void
-demand_block()
-{
- int i;
- struct protent *protp;
-
- for (i = 0; (protp = protocols[i]) != NULL; ++i)
- if (protp->enabled_flag && protp->demand_conf != NULL)
- sifnpmode(0, protp->protocol & ~0x8000, NPMODE_QUEUE);
- get_loop_output();
-}
-
-/*
- * demand_discard - set each network protocol to discard packets
- * with an error.
- */
-void
-demand_discard()
-{
- struct packet *pkt, *nextpkt;
- int i;
- struct protent *protp;
-
- for (i = 0; (protp = protocols[i]) != NULL; ++i)
- if (protp->enabled_flag && protp->demand_conf != NULL)
- sifnpmode(0, protp->protocol & ~0x8000, NPMODE_ERROR);
- get_loop_output();
-
- /* discard all saved packets */
- for (pkt = pend_q; pkt != NULL; pkt = nextpkt) {
- nextpkt = pkt->next;
- free(pkt);
- }
- pend_q = NULL;
- framelen = 0;
- flush_flag = 0;
- escape_flag = 0;
- fcs = PPP_INITFCS;
-}
-
-/*
- * demand_unblock - set each enabled network protocol to pass packets.
- */
-void
-demand_unblock()
-{
- int i;
- struct protent *protp;
-
- for (i = 0; (protp = protocols[i]) != NULL; ++i)
- if (protp->enabled_flag && protp->demand_conf != NULL)
- sifnpmode(0, protp->protocol & ~0x8000, NPMODE_PASS);
-}
-
-/*
- * FCS lookup table as calculated by genfcstab.
- */
-static u_short fcstab[256] = {
- 0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf,
- 0x8c48, 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5, 0xe97e, 0xf8f7,
- 0x1081, 0x0108, 0x3393, 0x221a, 0x56a5, 0x472c, 0x75b7, 0x643e,
- 0x9cc9, 0x8d40, 0xbfdb, 0xae52, 0xdaed, 0xcb64, 0xf9ff, 0xe876,
- 0x2102, 0x308b, 0x0210, 0x1399, 0x6726, 0x76af, 0x4434, 0x55bd,
- 0xad4a, 0xbcc3, 0x8e58, 0x9fd1, 0xeb6e, 0xfae7, 0xc87c, 0xd9f5,
- 0x3183, 0x200a, 0x1291, 0x0318, 0x77a7, 0x662e, 0x54b5, 0x453c,
- 0xbdcb, 0xac42, 0x9ed9, 0x8f50, 0xfbef, 0xea66, 0xd8fd, 0xc974,
- 0x4204, 0x538d, 0x6116, 0x709f, 0x0420, 0x15a9, 0x2732, 0x36bb,
- 0xce4c, 0xdfc5, 0xed5e, 0xfcd7, 0x8868, 0x99e1, 0xab7a, 0xbaf3,
- 0x5285, 0x430c, 0x7197, 0x601e, 0x14a1, 0x0528, 0x37b3, 0x263a,
- 0xdecd, 0xcf44, 0xfddf, 0xec56, 0x98e9, 0x8960, 0xbbfb, 0xaa72,
- 0x6306, 0x728f, 0x4014, 0x519d, 0x2522, 0x34ab, 0x0630, 0x17b9,
- 0xef4e, 0xfec7, 0xcc5c, 0xddd5, 0xa96a, 0xb8e3, 0x8a78, 0x9bf1,
- 0x7387, 0x620e, 0x5095, 0x411c, 0x35a3, 0x242a, 0x16b1, 0x0738,
- 0xffcf, 0xee46, 0xdcdd, 0xcd54, 0xb9eb, 0xa862, 0x9af9, 0x8b70,
- 0x8408, 0x9581, 0xa71a, 0xb693, 0xc22c, 0xd3a5, 0xe13e, 0xf0b7,
- 0x0840, 0x19c9, 0x2b52, 0x3adb, 0x4e64, 0x5fed, 0x6d76, 0x7cff,
- 0x9489, 0x8500, 0xb79b, 0xa612, 0xd2ad, 0xc324, 0xf1bf, 0xe036,
- 0x18c1, 0x0948, 0x3bd3, 0x2a5a, 0x5ee5, 0x4f6c, 0x7df7, 0x6c7e,
- 0xa50a, 0xb483, 0x8618, 0x9791, 0xe32e, 0xf2a7, 0xc03c, 0xd1b5,
- 0x2942, 0x38cb, 0x0a50, 0x1bd9, 0x6f66, 0x7eef, 0x4c74, 0x5dfd,
- 0xb58b, 0xa402, 0x9699, 0x8710, 0xf3af, 0xe226, 0xd0bd, 0xc134,
- 0x39c3, 0x284a, 0x1ad1, 0x0b58, 0x7fe7, 0x6e6e, 0x5cf5, 0x4d7c,
- 0xc60c, 0xd785, 0xe51e, 0xf497, 0x8028, 0x91a1, 0xa33a, 0xb2b3,
- 0x4a44, 0x5bcd, 0x6956, 0x78df, 0x0c60, 0x1de9, 0x2f72, 0x3efb,
- 0xd68d, 0xc704, 0xf59f, 0xe416, 0x90a9, 0x8120, 0xb3bb, 0xa232,
- 0x5ac5, 0x4b4c, 0x79d7, 0x685e, 0x1ce1, 0x0d68, 0x3ff3, 0x2e7a,
- 0xe70e, 0xf687, 0xc41c, 0xd595, 0xa12a, 0xb0a3, 0x8238, 0x93b1,
- 0x6b46, 0x7acf, 0x4854, 0x59dd, 0x2d62, 0x3ceb, 0x0e70, 0x1ff9,
- 0xf78f, 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330,
- 0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78
-};
-
-/*
- * loop_chars - process characters received from the loopback.
- * Calls loop_frame when a complete frame has been accumulated.
- * Return value is 1 if we need to bring up the link, 0 otherwise.
- */
-int
-loop_chars(p, n)
- unsigned char *p;
- int n;
-{
- int c, rv;
-
- rv = 0;
- for (; n > 0; --n) {
- c = *p++;
- if (c == PPP_FLAG) {
- if (!escape_flag && !flush_flag
- && framelen > 2 && fcs == PPP_GOODFCS) {
- framelen -= 2;
- if (loop_frame(frame, framelen))
- rv = 1;
- }
- framelen = 0;
- flush_flag = 0;
- escape_flag = 0;
- fcs = PPP_INITFCS;
- continue;
- }
- if (flush_flag)
- continue;
- if (escape_flag) {
- c ^= PPP_TRANS;
- escape_flag = 0;
- } else if (c == PPP_ESCAPE) {
- escape_flag = 1;
- continue;
- }
- if (framelen >= framemax) {
- flush_flag = 1;
- continue;
- }
- frame[framelen++] = c;
- fcs = PPP_FCS(fcs, c);
- }
- return rv;
-}
-
-/*
- * loop_frame - given a frame obtained from the loopback,
- * decide whether to bring up the link or not, and, if we want
- * to transmit this frame later, put it on the pending queue.
- * Return value is 1 if we need to bring up the link, 0 otherwise.
- * We assume that the kernel driver has already applied the
- * pass_filter, so we won't get packets it rejected.
- * We apply the active_filter to see if we want this packet to
- * bring up the link.
- */
-int
-loop_frame(frame, len)
- unsigned char *frame;
- int len;
-{
- struct packet *pkt;
-
- /* log_packet(frame, len, "from loop: ", LOG_DEBUG); */
- if (len < PPP_HDRLEN)
- return 0;
- if ((PPP_PROTOCOL(frame) & 0x8000) != 0)
- return 0; /* shouldn't get any of these anyway */
- if (!active_packet(frame, len))
- return 0;
-
- pkt = (struct packet *) malloc(sizeof(struct packet) + len);
- if (pkt != NULL) {
- pkt->length = len;
- pkt->next = NULL;
- memcpy(pkt->data, frame, len);
- if (pend_q == NULL)
- pend_q = pkt;
- else
- pend_qtail->next = pkt;
- pend_qtail = pkt;
- }
- return 1;
-}
-
-/*
- * demand_rexmit - Resend all those frames which we got via the
- * loopback, now that the real serial link is up.
- */
-void
-demand_rexmit(proto)
- int proto;
-{
- struct packet *pkt, *prev, *nextpkt;
-
- prev = NULL;
- pkt = pend_q;
- pend_q = NULL;
- for (; pkt != NULL; pkt = nextpkt) {
- nextpkt = pkt->next;
- if (PPP_PROTOCOL(pkt->data) == proto) {
- output(0, pkt->data, pkt->length);
- free(pkt);
- } else {
- if (prev == NULL)
- pend_q = pkt;
- else
- prev->next = pkt;
- prev = pkt;
- }
- }
- pend_qtail = prev;
- if (prev != NULL)
- prev->next = NULL;
-}
-
-/*
- * Scan a packet to decide whether it is an "active" packet,
- * that is, whether it is worth bringing up the link for.
- */
-static int
-active_packet(p, len)
- unsigned char *p;
- int len;
-{
- int proto, i;
- struct protent *protp;
-
- if (len < PPP_HDRLEN)
- return 0;
- proto = PPP_PROTOCOL(p);
-#ifdef PPP_FILTER
- if (active_filter.bf_len != 0
- && bpf_filter(active_filter.bf_insns, frame, len, len) == 0)
- return 0;
-#endif
- for (i = 0; (protp = protocols[i]) != NULL; ++i) {
- if (protp->protocol < 0xC000 && (protp->protocol & ~0x8000) == proto) {
- if (!protp->enabled_flag)
- return 0;
- if (protp->active_pkt == NULL)
- return 1;
- return (*protp->active_pkt)(p, len);
- }
- }
- return 0; /* not a supported protocol !!?? */
-}
diff --git a/cpukit/pppd/fsm.c b/cpukit/pppd/fsm.c
deleted file mode 100644
index aeb4564b98..0000000000
--- a/cpukit/pppd/fsm.c
+++ /dev/null
@@ -1,798 +0,0 @@
-/*
- * fsm.c - {Link, IP} Control Protocol Finite State Machine.
- *
- * Copyright (c) 1989 Carnegie Mellon University.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by Carnegie Mellon University. The name of the
- * University may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#ifndef lint
-/* static char rcsid[] = "$Id$"; */
-#endif
-#define log_packet(p, len, prefix, level)
-/*
- * TODO:
- * Randomize fsm id on link/init.
- * Deal with variable outgoing MTU.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <syslog.h>
-
-#include "pppd.h"
-#include "fsm.h"
-
-static void fsm_timeout __P((void *));
-static void fsm_rconfreq __P((fsm *, int, u_char *, int));
-static void fsm_rconfack __P((fsm *, int, u_char *, int));
-static void fsm_rconfnakrej __P((fsm *, int, int, u_char *, int));
-static void fsm_rtermreq __P((fsm *, int, u_char *, int));
-static void fsm_rtermack __P((fsm *));
-static void fsm_rcoderej __P((fsm *, u_char *, int));
-static void fsm_sconfreq __P((fsm *, int));
-
-#define PROTO_NAME(f) ((f)->callbacks->proto_name)
-
-int peer_mru[NUM_PPP];
-
-
-/*
- * fsm_init - Initialize fsm.
- *
- * Initialize fsm state.
- */
-void
-fsm_init(f)
- fsm *f;
-{
- f->state = INITIAL;
- f->flags = 0;
- f->id = 0; /* XXX Start with random id? */
- f->timeouttime = DEFTIMEOUT;
- f->maxconfreqtransmits = DEFMAXCONFREQS;
- f->maxtermtransmits = DEFMAXTERMREQS;
- f->maxnakloops = DEFMAXNAKLOOPS;
- f->term_reason_len = 0;
-}
-
-
-/*
- * fsm_lowerup - The lower layer is up.
- */
-void
-fsm_lowerup(f)
- fsm *f;
-{
- switch( f->state ){
- case INITIAL:
- f->state = CLOSED;
- break;
-
- case STARTING:
- if( f->flags & OPT_SILENT )
- f->state = STOPPED;
- else {
- /* Send an initial configure-request */
- fsm_sconfreq(f, 0);
- f->state = REQSENT;
- }
- break;
-
- default:
- FSMDEBUG((LOG_INFO, "%s: Up event in state %d!",
- PROTO_NAME(f), f->state));
- }
-}
-
-
-/*
- * fsm_lowerdown - The lower layer is down.
- *
- * Cancel all timeouts and inform upper layers.
- */
-void
-fsm_lowerdown(f)
- fsm *f;
-{
- switch( f->state ){
- case CLOSED:
- f->state = INITIAL;
- break;
-
- case STOPPED:
- f->state = STARTING;
- if( f->callbacks->starting )
- (*f->callbacks->starting)(f);
- break;
-
- case CLOSING:
- f->state = INITIAL;
- UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */
- break;
-
- case STOPPING:
- case REQSENT:
- case ACKRCVD:
- case ACKSENT:
- f->state = STARTING;
- UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */
- break;
-
- case OPENED:
- if( f->callbacks->down )
- (*f->callbacks->down)(f);
- f->state = STARTING;
- break;
-
- default:
- FSMDEBUG((LOG_INFO, "%s: Down event in state %d!",
- PROTO_NAME(f), f->state));
- }
-}
-
-
-/*
- * fsm_open - Link is allowed to come up.
- */
-void
-fsm_open(f)
- fsm *f;
-{
- switch( f->state ){
- case INITIAL:
- f->state = STARTING;
- if( f->callbacks->starting )
- (*f->callbacks->starting)(f);
- break;
-
- case CLOSED:
- if( f->flags & OPT_SILENT )
- f->state = STOPPED;
- else {
- /* Send an initial configure-request */
- fsm_sconfreq(f, 0);
- f->state = REQSENT;
- }
- break;
-
- case CLOSING:
- f->state = STOPPING;
- /* fall through */
- case STOPPED:
- case OPENED:
- if( f->flags & OPT_RESTART ){
- fsm_lowerdown(f);
- fsm_lowerup(f);
- }
- break;
- }
-}
-
-
-/*
- * fsm_close - Start closing connection.
- *
- * Cancel timeouts and either initiate close or possibly go directly to
- * the CLOSED state.
- */
-void
-fsm_close(f, reason)
- fsm *f;
- char *reason;
-{
- f->term_reason = reason;
- f->term_reason_len = (reason == NULL? 0: strlen(reason));
- switch( f->state ){
- case STARTING:
- f->state = INITIAL;
- break;
- case STOPPED:
- f->state = CLOSED;
- break;
- case STOPPING:
- f->state = CLOSING;
- break;
-
- case REQSENT:
- case ACKRCVD:
- case ACKSENT:
- case OPENED:
- if( f->state != OPENED )
- UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */
- else if( f->callbacks->down )
- (*f->callbacks->down)(f); /* Inform upper layers we're down */
-
- /* Init restart counter, send Terminate-Request */
- f->retransmits = f->maxtermtransmits;
- fsm_sdata(f, TERMREQ, f->reqid = ++f->id,
- (u_char *) f->term_reason, f->term_reason_len);
- TIMEOUT(fsm_timeout, f, f->timeouttime);
- --f->retransmits;
-
- f->state = CLOSING;
- break;
- }
-}
-
-
-/*
- * fsm_timeout - Timeout expired.
- */
-static void
-fsm_timeout(arg)
- void *arg;
-{
- fsm *f = (fsm *) arg;
-
- switch (f->state) {
- case CLOSING:
- case STOPPING:
- if( f->retransmits <= 0 ){
- /*
- * We've waited for an ack long enough. Peer probably heard us.
- */
- f->state = (f->state == CLOSING)? CLOSED: STOPPED;
- if( f->callbacks->finished )
- (*f->callbacks->finished)(f);
- } else {
- /* Send Terminate-Request */
- fsm_sdata(f, TERMREQ, f->reqid = ++f->id,
- (u_char *) f->term_reason, f->term_reason_len);
- TIMEOUT(fsm_timeout, f, f->timeouttime);
- --f->retransmits;
- }
- break;
-
- case REQSENT:
- case ACKRCVD:
- case ACKSENT:
- if (f->retransmits <= 0) {
- syslog(LOG_WARNING, "%s: timeout sending Config-Requests",
- PROTO_NAME(f));
- f->state = STOPPED;
- if( (f->flags & OPT_PASSIVE) == 0 && f->callbacks->finished )
- (*f->callbacks->finished)(f);
-
- } else {
- /* Retransmit the configure-request */
- if (f->callbacks->retransmit)
- (*f->callbacks->retransmit)(f);
- fsm_sconfreq(f, 1); /* Re-send Configure-Request */
- if( f->state == ACKRCVD )
- f->state = REQSENT;
- }
- break;
-
- default:
- FSMDEBUG((LOG_INFO, "%s: Timeout event in state %d!",
- PROTO_NAME(f), f->state));
- }
-}
-
-
-/*
- * fsm_input - Input packet.
- */
-void
-fsm_input(f, inpacket, l)
- fsm *f;
- u_char *inpacket;
- int l;
-{
- u_char *inp;
- u_char code, id;
- int len;
-
- /*
- * Parse header (code, id and length).
- * If packet too short, drop it.
- */
- inp = inpacket;
- if (l < HEADERLEN) {
- FSMDEBUG((LOG_WARNING, "fsm_input(%x): Rcvd short header.",
- f->protocol));
- return;
- }
- GETCHAR(code, inp);
- GETCHAR(id, inp);
- GETSHORT(len, inp);
- if (len < HEADERLEN) {
- FSMDEBUG((LOG_INFO, "fsm_input(%x): Rcvd illegal length.",
- f->protocol));
- return;
- }
- if (len > l) {
- FSMDEBUG((LOG_INFO, "fsm_input(%x): Rcvd short packet.",
- f->protocol));
- return;
- }
- len -= HEADERLEN; /* subtract header length */
-
- if( f->state == INITIAL || f->state == STARTING ){
- FSMDEBUG((LOG_INFO, "fsm_input(%x): Rcvd packet in state %d.",
- f->protocol, f->state));
- return;
- }
-
- /*
- * Action depends on code.
- */
- switch (code) {
- case CONFREQ:
- fsm_rconfreq(f, id, inp, len);
- break;
-
- case CONFACK:
- fsm_rconfack(f, id, inp, len);
- break;
-
- case CONFNAK:
- case CONFREJ:
- fsm_rconfnakrej(f, code, id, inp, len);
- break;
-
- case TERMREQ:
- fsm_rtermreq(f, id, inp, len);
- break;
-
- case TERMACK:
- fsm_rtermack(f);
- break;
-
- case CODEREJ:
- fsm_rcoderej(f, inp, len);
- break;
-
- default:
- if( !f->callbacks->extcode
- || !(*f->callbacks->extcode)(f, code, id, inp, len) )
- fsm_sdata(f, CODEREJ, ++f->id, inpacket, len + HEADERLEN);
- break;
- }
-}
-
-
-/*
- * fsm_rconfreq - Receive Configure-Request.
- */
-static void
-fsm_rconfreq(f, id, inp, len)
- fsm *f;
- u_char id;
- u_char *inp;
- int len;
-{
- int code, reject_if_disagree;
-
- FSMDEBUG((LOG_INFO, "fsm_rconfreq(%s): Rcvd id %d.", PROTO_NAME(f), id));
- switch( f->state ){
- case CLOSED:
- /* Go away, we're closed */
- fsm_sdata(f, TERMACK, id, NULL, 0);
- return;
- case CLOSING:
- case STOPPING:
- return;
-
- case OPENED:
- /* Go down and restart negotiation */
- if( f->callbacks->down )
- (*f->callbacks->down)(f); /* Inform upper layers */
- fsm_sconfreq(f, 0); /* Send initial Configure-Request */
- break;
-
- case STOPPED:
- /* Negotiation started by our peer */
- fsm_sconfreq(f, 0); /* Send initial Configure-Request */
- f->state = REQSENT;
- break;
- }
-
- /*
- * Pass the requested configuration options
- * to protocol-specific code for checking.
- */
- if (f->callbacks->reqci){ /* Check CI */
- reject_if_disagree = (f->nakloops >= f->maxnakloops);
- code = (*f->callbacks->reqci)(f, inp, &len, reject_if_disagree);
- } else if (len)
- code = CONFREJ; /* Reject all CI */
- else
- code = CONFACK;
-
- /* send the Ack, Nak or Rej to the peer */
- fsm_sdata(f, code, id, inp, len);
-
- if (code == CONFACK) {
- if (f->state == ACKRCVD) {
- UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */
- f->state = OPENED;
- if (f->callbacks->up)
- (*f->callbacks->up)(f); /* Inform upper layers */
- } else
- f->state = ACKSENT;
- f->nakloops = 0;
-
- } else {
- /* we sent CONFACK or CONFREJ */
- if (f->state != ACKRCVD)
- f->state = REQSENT;
- if( code == CONFNAK )
- ++f->nakloops;
- }
-}
-
-
-/*
- * fsm_rconfack - Receive Configure-Ack.
- */
-static void
-fsm_rconfack(f, id, inp, len)
- fsm *f;
- int id;
- u_char *inp;
- int len;
-{
- FSMDEBUG((LOG_INFO, "fsm_rconfack(%s): Rcvd id %d.",
- PROTO_NAME(f), id));
-
- if (id != f->reqid || f->seen_ack) /* Expected id? */
- return; /* Nope, toss... */
- if( !(f->callbacks->ackci? (*f->callbacks->ackci)(f, inp, len):
- (len == 0)) ){
- /* Ack is bad - ignore it */
- log_packet(inp, len, "Received bad configure-ack: ", LOG_ERR);
- FSMDEBUG((LOG_INFO, "%s: received bad Ack (length %d)",
- PROTO_NAME(f), len));
- return;
- }
- f->seen_ack = 1;
-
- switch (f->state) {
- case CLOSED:
- case STOPPED:
- fsm_sdata(f, TERMACK, id, NULL, 0);
- break;
-
- case REQSENT:
- f->state = ACKRCVD;
- f->retransmits = f->maxconfreqtransmits;
- break;
-
- case ACKRCVD:
- /* Huh? an extra valid Ack? oh well... */
- UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */
- fsm_sconfreq(f, 0);
- f->state = REQSENT;
- break;
-
- case ACKSENT:
- UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */
- f->state = OPENED;
- f->retransmits = f->maxconfreqtransmits;
- if (f->callbacks->up)
- (*f->callbacks->up)(f); /* Inform upper layers */
- break;
-
- case OPENED:
- /* Go down and restart negotiation */
- if (f->callbacks->down)
- (*f->callbacks->down)(f); /* Inform upper layers */
- fsm_sconfreq(f, 0); /* Send initial Configure-Request */
- f->state = REQSENT;
- break;
- }
-}
-
-
-/*
- * fsm_rconfnakrej - Receive Configure-Nak or Configure-Reject.
- */
-static void
-fsm_rconfnakrej(f, code, id, inp, len)
- fsm *f;
- int code, id;
- u_char *inp;
- int len;
-{
- int (*proc) __P((fsm *, u_char *, int));
- int ret;
-
- FSMDEBUG((LOG_INFO, "fsm_rconfnakrej(%s): Rcvd id %d.",
- PROTO_NAME(f), id));
-
- if (id != f->reqid || f->seen_ack) /* Expected id? */
- return; /* Nope, toss... */
- proc = (code == CONFNAK)? f->callbacks->nakci: f->callbacks->rejci;
- if (!proc || !(ret = proc(f, inp, len))) {
- /* Nak/reject is bad - ignore it */
- log_packet(inp, len, "Received bad configure-nak/rej: ", LOG_ERR);
- FSMDEBUG((LOG_INFO, "%s: received bad %s (length %d)",
- PROTO_NAME(f), (code==CONFNAK? "Nak": "reject"), len));
- return;
- }
- f->seen_ack = 1;
-
- switch (f->state) {
- case CLOSED:
- case STOPPED:
- fsm_sdata(f, TERMACK, id, NULL, 0);
- break;
-
- case REQSENT:
- case ACKSENT:
- /* They didn't agree to what we wanted - try another request */
- UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */
- if (ret < 0)
- f->state = STOPPED; /* kludge for stopping CCP */
- else
- fsm_sconfreq(f, 0); /* Send Configure-Request */
- break;
-
- case ACKRCVD:
- /* Got a Nak/reject when we had already had an Ack?? oh well... */
- UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */
- fsm_sconfreq(f, 0);
- f->state = REQSENT;
- break;
-
- case OPENED:
- /* Go down and restart negotiation */
- if (f->callbacks->down)
- (*f->callbacks->down)(f); /* Inform upper layers */
- fsm_sconfreq(f, 0); /* Send initial Configure-Request */
- f->state = REQSENT;
- break;
- }
-}
-
-
-/*
- * fsm_rtermreq - Receive Terminate-Req.
- */
-static void
-fsm_rtermreq(f, id, p, len)
- fsm *f;
- int id;
- u_char *p;
- int len;
-{
- char str[80];
-
- FSMDEBUG((LOG_INFO, "fsm_rtermreq(%s): Rcvd id %d.",
- PROTO_NAME(f), id));
-
- switch (f->state) {
- case ACKRCVD:
- case ACKSENT:
- f->state = REQSENT; /* Start over but keep trying */
- break;
-
- case OPENED:
- if (len > 0) {
- fmtmsg(str, sizeof(str), "%0.*v", len, p);
- syslog(LOG_INFO, "%s terminated by peer (%s)", PROTO_NAME(f), str);
- } else
- syslog(LOG_INFO, "%s terminated by peer", PROTO_NAME(f));
- if (f->callbacks->down)
- (*f->callbacks->down)(f); /* Inform upper layers */
- f->retransmits = 0;
- f->state = STOPPING;
- TIMEOUT(fsm_timeout, f, f->timeouttime);
- break;
- }
-
- fsm_sdata(f, TERMACK, id, NULL, 0);
-}
-
-
-/*
- * fsm_rtermack - Receive Terminate-Ack.
- */
-static void
-fsm_rtermack(f)
- fsm *f;
-{
- FSMDEBUG((LOG_INFO, "fsm_rtermack(%s).", PROTO_NAME(f)));
-
- switch (f->state) {
- case CLOSING:
- UNTIMEOUT(fsm_timeout, f);
- f->state = CLOSED;
- if( f->callbacks->finished )
- (*f->callbacks->finished)(f);
- break;
- case STOPPING:
- UNTIMEOUT(fsm_timeout, f);
- f->state = STOPPED;
- if( f->callbacks->finished )
- (*f->callbacks->finished)(f);
- break;
-
- case ACKRCVD:
- f->state = REQSENT;
- break;
-
- case OPENED:
- if (f->callbacks->down)
- (*f->callbacks->down)(f); /* Inform upper layers */
- fsm_sconfreq(f, 0);
- break;
- }
-}
-
-
-/*
- * fsm_rcoderej - Receive an Code-Reject.
- */
-static void
-fsm_rcoderej(f, inp, len)
- fsm *f;
- u_char *inp;
- int len;
-{
- u_char code, id;
-
- FSMDEBUG((LOG_INFO, "fsm_rcoderej(%s).", PROTO_NAME(f)));
-
- if (len < HEADERLEN) {
- FSMDEBUG((LOG_INFO, "fsm_rcoderej: Rcvd short Code-Reject packet!"));
- return;
- }
- GETCHAR(code, inp);
- GETCHAR(id, inp);
- syslog(LOG_WARNING, "%s: Rcvd Code-Reject for code %d, id %d",
- PROTO_NAME(f), code, id);
-
- if( f->state == ACKRCVD )
- f->state = REQSENT;
-}
-
-
-/*
- * fsm_protreject - Peer doesn't speak this protocol.
- *
- * Treat this as a catastrophic error (RXJ-).
- */
-void
-fsm_protreject(f)
- fsm *f;
-{
- switch( f->state ){
- case CLOSING:
- UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */
- /* fall through */
- case CLOSED:
- f->state = CLOSED;
- if( f->callbacks->finished )
- (*f->callbacks->finished)(f);
- break;
-
- case STOPPING:
- case REQSENT:
- case ACKRCVD:
- case ACKSENT:
- UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */
- /* fall through */
- case STOPPED:
- f->state = STOPPED;
- if( f->callbacks->finished )
- (*f->callbacks->finished)(f);
- break;
-
- case OPENED:
- if( f->callbacks->down )
- (*f->callbacks->down)(f);
-
- /* Init restart counter, send Terminate-Request */
- f->retransmits = f->maxtermtransmits;
- fsm_sdata(f, TERMREQ, f->reqid = ++f->id,
- (u_char *) f->term_reason, f->term_reason_len);
- TIMEOUT(fsm_timeout, f, f->timeouttime);
- --f->retransmits;
-
- f->state = STOPPING;
- break;
-
- default:
- FSMDEBUG((LOG_INFO, "%s: Protocol-reject event in state %d!",
- PROTO_NAME(f), f->state));
- }
-}
-
-
-/*
- * fsm_sconfreq - Send a Configure-Request.
- */
-static void
-fsm_sconfreq(f, retransmit)
- fsm *f;
- int retransmit;
-{
- u_char *outp;
- int cilen;
-
- if( f->state != REQSENT && f->state != ACKRCVD && f->state != ACKSENT ){
- /* Not currently negotiating - reset options */
- if( f->callbacks->resetci )
- (*f->callbacks->resetci)(f);
- f->nakloops = 0;
- }
-
- if( !retransmit ){
- /* New request - reset retransmission counter, use new ID */
- f->retransmits = f->maxconfreqtransmits;
- f->reqid = ++f->id;
- }
-
- f->seen_ack = 0;
-
- /*
- * Make up the request packet
- */
- outp = outpacket_buf + PPP_HDRLEN + HEADERLEN;
- if( f->callbacks->cilen && f->callbacks->addci ){
- cilen = (*f->callbacks->cilen)(f);
- if( cilen > peer_mru[f->unit] - HEADERLEN )
- cilen = peer_mru[f->unit] - HEADERLEN;
- if (f->callbacks->addci)
- (*f->callbacks->addci)(f, outp, &cilen);
- } else
- cilen = 0;
-
- /* send the request to our peer */
- fsm_sdata(f, CONFREQ, f->reqid, outp, cilen);
-
- /* start the retransmit timer */
- --f->retransmits;
- TIMEOUT(fsm_timeout, f, f->timeouttime);
-
- FSMDEBUG((LOG_INFO, "%s: sending Configure-Request, id %d",
- PROTO_NAME(f), f->reqid));
-}
-
-
-/*
- * fsm_sdata - Send some data.
- *
- * Used for all packets sent to our peer by this module.
- */
-void
-fsm_sdata(f, code, id, data, datalen)
- fsm *f;
- u_char code, id;
- u_char *data;
- int datalen;
-{
- u_char *outp;
- int outlen;
-
- /* Adjust length to be smaller than MTU */
- outp = outpacket_buf;
- if (datalen > peer_mru[f->unit] - HEADERLEN)
- datalen = peer_mru[f->unit] - HEADERLEN;
- if (datalen && data != outp + PPP_HDRLEN + HEADERLEN)
- BCOPY(data, outp + PPP_HDRLEN + HEADERLEN, datalen);
- outlen = datalen + HEADERLEN;
- MAKEHEADER(outp, f->protocol);
- PUTCHAR(code, outp);
- PUTCHAR(id, outp);
- PUTSHORT(outlen, outp);
- output(f->unit, outpacket_buf, outlen + PPP_HDRLEN);
-
- FSMDEBUG((LOG_INFO, "fsm_sdata(%s): Sent code %d, id %d.",
- PROTO_NAME(f), code, id));
-}
diff --git a/cpukit/pppd/fsm.h b/cpukit/pppd/fsm.h
deleted file mode 100644
index f289429fdc..0000000000
--- a/cpukit/pppd/fsm.h
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * fsm.h - {Link, IP} Control Protocol Finite State Machine definitions.
- *
- * Copyright (c) 1989 Carnegie Mellon University.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by Carnegie Mellon University. The name of the
- * University may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Id$
- */
-
-/*
- * Packet header = Code, id, length.
- */
-#define HEADERLEN (sizeof (u_char) + sizeof (u_char) + sizeof (u_short))
-
-
-/*
- * CP (LCP, IPCP, etc.) codes.
- */
-#define CONFREQ 1 /* Configuration Request */
-#define CONFACK 2 /* Configuration Ack */
-#define CONFNAK 3 /* Configuration Nak */
-#define CONFREJ 4 /* Configuration Reject */
-#define TERMREQ 5 /* Termination Request */
-#define TERMACK 6 /* Termination Ack */
-#define CODEREJ 7 /* Code Reject */
-
-
-/*
- * Each FSM is described by an fsm structure and fsm callbacks.
- */
-typedef struct fsm {
- int unit; /* Interface unit number */
- int protocol; /* Data Link Layer Protocol field value */
- int state; /* State */
- int flags; /* Contains option bits */
- u_char id; /* Current id */
- u_char reqid; /* Current request id */
- u_char seen_ack; /* Have received valid Ack/Nak/Rej to Req */
- int timeouttime; /* Timeout time in milliseconds */
- int maxconfreqtransmits; /* Maximum Configure-Request transmissions */
- int retransmits; /* Number of retransmissions left */
- int maxtermtransmits; /* Maximum Terminate-Request transmissions */
- int nakloops; /* Number of nak loops since last ack */
- int maxnakloops; /* Maximum number of nak loops tolerated */
- struct fsm_callbacks *callbacks; /* Callback routines */
- char *term_reason; /* Reason for closing protocol */
- int term_reason_len; /* Length of term_reason */
-} fsm;
-
-
-typedef struct fsm_callbacks {
- void (*resetci) /* Reset our Configuration Information */
- __P((fsm *));
- int (*cilen) /* Length of our Configuration Information */
- __P((fsm *));
- void (*addci) /* Add our Configuration Information */
- __P((fsm *, u_char *, int *));
- int (*ackci) /* ACK our Configuration Information */
- __P((fsm *, u_char *, int));
- int (*nakci) /* NAK our Configuration Information */
- __P((fsm *, u_char *, int));
- int (*rejci) /* Reject our Configuration Information */
- __P((fsm *, u_char *, int));
- int (*reqci) /* Request peer's Configuration Information */
- __P((fsm *, u_char *, int *, int));
- void (*up) /* Called when fsm reaches OPENED state */
- __P((fsm *));
- void (*down) /* Called when fsm leaves OPENED state */
- __P((fsm *));
- void (*starting) /* Called when we want the lower layer */
- __P((fsm *));
- void (*finished) /* Called when we don't want the lower layer */
- __P((fsm *));
- void (*protreject) /* Called when Protocol-Reject received */
- __P((int));
- void (*retransmit) /* Retransmission is necessary */
- __P((fsm *));
- int (*extcode) /* Called when unknown code received */
- __P((fsm *, int, int, u_char *, int));
- char *proto_name; /* String name for protocol (for messages) */
-} fsm_callbacks;
-
-
-/*
- * Link states.
- */
-#define INITIAL 0 /* Down, hasn't been opened */
-#define STARTING 1 /* Down, been opened */
-#define CLOSED 2 /* Up, hasn't been opened */
-#define STOPPED 3 /* Open, waiting for down event */
-#define CLOSING 4 /* Terminating the connection, not open */
-#define STOPPING 5 /* Terminating, but open */
-#define REQSENT 6 /* We've sent a Config Request */
-#define ACKRCVD 7 /* We've received a Config Ack */
-#define ACKSENT 8 /* We've sent a Config Ack */
-#define OPENED 9 /* Connection available */
-
-
-/*
- * Flags - indicate options controlling FSM operation
- */
-#define OPT_PASSIVE 1 /* Don't die if we don't get a response */
-#define OPT_RESTART 2 /* Treat 2nd OPEN as DOWN, UP */
-#define OPT_SILENT 4 /* Wait for peer to speak first */
-
-
-/*
- * Timeouts.
- */
-#define DEFTIMEOUT 3 /* Timeout time in seconds */
-#define DEFMAXTERMREQS 2 /* Maximum Terminate-Request transmissions */
-#define DEFMAXCONFREQS 10 /* Maximum Configure-Request transmissions */
-#define DEFMAXNAKLOOPS 5 /* Maximum number of nak loops */
-
-
-/*
- * Prototypes
- */
-void fsm_init __P((fsm *));
-void fsm_lowerup __P((fsm *));
-void fsm_lowerdown __P((fsm *));
-void fsm_open __P((fsm *));
-void fsm_close __P((fsm *, char *));
-void fsm_input __P((fsm *, u_char *, int));
-void fsm_protreject __P((fsm *));
-void fsm_sdata __P((fsm *, int, int, u_char *, int));
-
-
-/*
- * Variables
- */
-extern int peer_mru[]; /* currently negotiated peer MRU (per unit) */
diff --git a/cpukit/pppd/ipcp.c b/cpukit/pppd/ipcp.c
deleted file mode 100644
index 5553d3194d..0000000000
--- a/cpukit/pppd/ipcp.c
+++ /dev/null
@@ -1,1506 +0,0 @@
-/*
- * ipcp.c - PPP IP Control Protocol.
- *
- * Copyright (c) 1989 Carnegie Mellon University.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by Carnegie Mellon University. The name of the
- * University may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#ifndef lint
-/* static char rcsid[] = "$Id$"; */
-#endif
-
-/*
- * TODO:
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <syslog.h>
-#include <netdb.h>
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-/* #include <stbconfig.h> */
-
-#include "pppd.h"
-#include "fsm.h"
-#include "ipcp.h"
-#include "pathnames.h"
-
-/* global vars */
-ipcp_options ipcp_wantoptions[NUM_PPP]; /* Options that we want to request */
-ipcp_options ipcp_gotoptions[NUM_PPP]; /* Options that peer ack'd */
-ipcp_options ipcp_allowoptions[NUM_PPP]; /* Options we allow peer to request */
-ipcp_options ipcp_hisoptions[NUM_PPP]; /* Options that we ack'd */
-
-/* local vars */
-static int cis_received[NUM_PPP]; /* # Conf-Reqs received */
-static int default_route_set[NUM_PPP]; /* Have set up a default route */
-static int proxy_arp_set[NUM_PPP]; /* Have created proxy arp entry */
-
-/*
- * Callbacks for fsm code. (CI = Configuration Information)
- */
-static void ipcp_resetci __P((fsm *)); /* Reset our CI */
-static int ipcp_cilen __P((fsm *)); /* Return length of our CI */
-static void ipcp_addci __P((fsm *, u_char *, int *)); /* Add our CI */
-static int ipcp_ackci __P((fsm *, u_char *, int)); /* Peer ack'd our CI */
-static int ipcp_nakci __P((fsm *, u_char *, int)); /* Peer nak'd our CI */
-static int ipcp_rejci __P((fsm *, u_char *, int)); /* Peer rej'd our CI */
-static int ipcp_reqci __P((fsm *, u_char *, int *, int)); /* Rcv CI */
-static void ipcp_up __P((fsm *)); /* We're UP */
-static void ipcp_down __P((fsm *)); /* We're DOWN */
-#if 0
-static void ipcp_script __P((fsm *, char *)); /* Run an up/down script */
-#endif
-static void ipcp_finished __P((fsm *)); /* Don't need lower layer */
-
-fsm ipcp_fsm[NUM_PPP]; /* IPCP fsm structure */
-
-static fsm_callbacks ipcp_callbacks = { /* IPCP callback routines */
- ipcp_resetci, /* Reset our Configuration Information */
- ipcp_cilen, /* Length of our Configuration Information */
- ipcp_addci, /* Add our Configuration Information */
- ipcp_ackci, /* ACK our Configuration Information */
- ipcp_nakci, /* NAK our Configuration Information */
- ipcp_rejci, /* Reject our Configuration Information */
- ipcp_reqci, /* Request peer's Configuration Information */
- ipcp_up, /* Called when fsm reaches OPENED state */
- ipcp_down, /* Called when fsm leaves OPENED state */
- NULL, /* Called when we want the lower layer up */
- ipcp_finished, /* Called when we want the lower layer down */
- NULL, /* Called when Protocol-Reject received */
- NULL, /* Retransmission is necessary */
- NULL, /* Called to handle protocol-specific codes */
- "IPCP" /* String name of protocol */
-};
-
-/*
- * Protocol entry points from main code.
- */
-static void ipcp_init __P((int));
-static void ipcp_open __P((int));
-static void ipcp_close __P((int, char *));
-static void ipcp_lowerup __P((int));
-static void ipcp_lowerdown __P((int));
-static void ipcp_input __P((int, u_char *, int));
-static void ipcp_protrej __P((int));
-static int ipcp_printpkt __P((u_char *, int,
- void (*) __P((void *, char *, ...)), void *));
-static void ip_check_options __P((void));
-static int ip_demand_conf __P((int));
-static int ip_active_pkt __P((u_char *, int));
-
-struct protent ipcp_protent = {
- PPP_IPCP,
- ipcp_init,
- ipcp_input,
- ipcp_protrej,
- ipcp_lowerup,
- ipcp_lowerdown,
- ipcp_open,
- ipcp_close,
- ipcp_printpkt,
- NULL,
- 1,
- "IPCP",
- ip_check_options,
- ip_demand_conf,
- ip_active_pkt
-};
-
-static void ipcp_clear_addrs __P((int));
-
-/*
- * Lengths of configuration options.
- */
-#define CILEN_VOID 2
-#define CILEN_COMPRESS 4 /* min length for compression protocol opt. */
-#define CILEN_VJ 6 /* length for RFC1332 Van-Jacobson opt. */
-#define CILEN_ADDR 6 /* new-style single address option */
-#define CILEN_ADDRS 10 /* old-style dual address option */
-
-
-#define CODENAME(x) ((x) == CONFACK ? "ACK" : \
- (x) == CONFNAK ? "NAK" : "REJ")
-
-
-/*
- * Make a string representation of a network IP address.
- */
-char *
-ip_ntoa(ipaddr)
-u_int32_t ipaddr;
-{
- static char b[64];
-
- ipaddr = ntohl(ipaddr);
-
- sprintf(b, "%d.%d.%d.%d",
- (u_char)(ipaddr >> 24),
- (u_char)(ipaddr >> 16),
- (u_char)(ipaddr >> 8),
- (u_char)(ipaddr));
- return b;
-}
-
-
-/*
- * ipcp_init - Initialize IPCP.
- */
-static void
-ipcp_init(unit)
- int unit;
-{
- fsm *f = &ipcp_fsm[unit];
- ipcp_options *wo = &ipcp_wantoptions[unit];
- ipcp_options *ao = &ipcp_allowoptions[unit];
-
- f->unit = unit;
- f->protocol = PPP_IPCP;
- f->callbacks = &ipcp_callbacks;
- fsm_init(&ipcp_fsm[unit]);
-
- memset(wo, 0, sizeof(*wo));
- memset(ao, 0, sizeof(*ao));
-
- wo->neg_addr = 1;
- wo->neg_vj = 1;
- wo->vj_protocol = IPCP_VJ_COMP;
- wo->maxslotindex = MAX_STATES - 1; /* really max index */
- wo->cflag = 1;
- ipcp_wantoptions[0].default_route = 1;
- /* max slots and slot-id compression are currently hardwired in */
- /* ppp_if.c to 16 and 1, this needs to be changed (among other */
- /* things) gmc */
-
- ao->neg_addr = 1;
- ao->neg_vj = 1;
- ao->maxslotindex = MAX_STATES - 1;
- ao->cflag = 1;
-
- /*
- * XXX These control whether the user may use the proxyarp
- * and defaultroute options.
- */
- ao->proxy_arp = 1;
- ao->default_route = 1;
-}
-
-
-/*
- * ipcp_open - IPCP is allowed to come up.
- */
-static void
-ipcp_open(unit)
- int unit;
-{
- fsm_open(&ipcp_fsm[unit]);
-}
-
-
-/*
- * ipcp_close - Take IPCP down.
- */
-static void
-ipcp_close(unit, reason)
- int unit;
- char *reason;
-{
- fsm_close(&ipcp_fsm[unit], reason);
-}
-
-
-/*
- * ipcp_lowerup - The lower layer is up.
- */
-static void
-ipcp_lowerup(unit)
- int unit;
-{
- fsm_lowerup(&ipcp_fsm[unit]);
-}
-
-
-/*
- * ipcp_lowerdown - The lower layer is down.
- */
-static void
-ipcp_lowerdown(unit)
- int unit;
-{
- fsm_lowerdown(&ipcp_fsm[unit]);
-}
-
-
-/*
- * ipcp_input - Input IPCP packet.
- */
-static void
-ipcp_input(unit, p, len)
- int unit;
- u_char *p;
- int len;
-{
- fsm_input(&ipcp_fsm[unit], p, len);
-}
-
-
-/*
- * ipcp_protrej - A Protocol-Reject was received for IPCP.
- *
- * Pretend the lower layer went down, so we shut up.
- */
-static void
-ipcp_protrej(unit)
- int unit;
-{
- fsm_lowerdown(&ipcp_fsm[unit]);
-}
-
-
-/*
- * ipcp_resetci - Reset our CI.
- */
-static void
-ipcp_resetci(f)
- fsm *f;
-{
- ipcp_options *wo = &ipcp_wantoptions[f->unit];
-
- wo->req_addr = wo->neg_addr && ipcp_allowoptions[f->unit].neg_addr;
- if (wo->ouraddr == 0)
- wo->accept_local = 1;
- if (wo->hisaddr == 0)
- wo->accept_remote = 1;
- ipcp_gotoptions[f->unit] = *wo;
- cis_received[f->unit] = 0;
-}
-
-
-/*
- * ipcp_cilen - Return length of our CI.
- */
-static int
-ipcp_cilen(f)
- fsm *f;
-{
- ipcp_options *go = &ipcp_gotoptions[f->unit];
- ipcp_options *wo = &ipcp_wantoptions[f->unit];
- ipcp_options *ho = &ipcp_hisoptions[f->unit];
-
-#define LENCIVJ(neg, old) (neg ? (old? CILEN_COMPRESS : CILEN_VJ) : 0)
-#define LENCIADDR(neg, old) (neg ? (old? CILEN_ADDRS : CILEN_ADDR) : 0)
-
- /*
- * First see if we want to change our options to the old
- * forms because we have received old forms from the peer.
- */
- if (wo->neg_addr && !go->neg_addr && !go->old_addrs) {
- /* use the old style of address negotiation */
- go->neg_addr = 1;
- go->old_addrs = 1;
- }
- if (wo->neg_vj && !go->neg_vj && !go->old_vj) {
- /* try an older style of VJ negotiation */
- if (cis_received[f->unit] == 0) {
- /* keep trying the new style until we see some CI from the peer */
- go->neg_vj = 1;
- } else {
- /* use the old style only if the peer did */
- if (ho->neg_vj && ho->old_vj) {
- go->neg_vj = 1;
- go->old_vj = 1;
- go->vj_protocol = ho->vj_protocol;
- }
- }
- }
-
- return (LENCIADDR(go->neg_addr, go->old_addrs) +
- LENCIVJ(go->neg_vj, go->old_vj));
-}
-
-
-/*
- * ipcp_addci - Add our desired CIs to a packet.
- */
-static void
-ipcp_addci(f, ucp, lenp)
- fsm *f;
- u_char *ucp;
- int *lenp;
-{
- ipcp_options *go = &ipcp_gotoptions[f->unit];
- int len = *lenp;
-
-#define ADDCIVJ(opt, neg, val, old, maxslotindex, cflag) \
- if (neg) { \
- int vjlen = old? CILEN_COMPRESS : CILEN_VJ; \
- if (len >= vjlen) { \
- PUTCHAR(opt, ucp); \
- PUTCHAR(vjlen, ucp); \
- PUTSHORT(val, ucp); \
- if (!old) { \
- PUTCHAR(maxslotindex, ucp); \
- PUTCHAR(cflag, ucp); \
- } \
- len -= vjlen; \
- } else \
- neg = 0; \
- }
-
-#define ADDCIADDR(opt, neg, old, val1, val2) \
- if (neg) { \
- int addrlen = (old? CILEN_ADDRS: CILEN_ADDR); \
- if (len >= addrlen) { \
- u_int32_t l; \
- PUTCHAR(opt, ucp); \
- PUTCHAR(addrlen, ucp); \
- l = ntohl(val1); \
- PUTLONG(l, ucp); \
- if (old) { \
- l = ntohl(val2); \
- PUTLONG(l, ucp); \
- } \
- len -= addrlen; \
- } else \
- neg = 0; \
- }
-
- ADDCIADDR((go->old_addrs? CI_ADDRS: CI_ADDR), go->neg_addr,
- go->old_addrs, go->ouraddr, go->hisaddr);
-
- ADDCIVJ(CI_COMPRESSTYPE, go->neg_vj, go->vj_protocol, go->old_vj,
- go->maxslotindex, go->cflag);
-
- *lenp -= len;
-}
-
-
-/*
- * ipcp_ackci - Ack our CIs.
- *
- * Returns:
- * 0 - Ack was bad.
- * 1 - Ack was good.
- */
-static int
-ipcp_ackci(f, p, len)
- fsm *f;
- u_char *p;
- int len;
-{
- ipcp_options *go = &ipcp_gotoptions[f->unit];
- u_short cilen, citype, cishort;
- u_int32_t cilong;
- u_char cimaxslotindex, cicflag;
-
- /*
- * CIs must be in exactly the same order that we sent...
- * Check packet length and CI length at each step.
- * If we find any deviations, then this packet is bad.
- */
-
-#define ACKCIVJ(opt, neg, val, old, maxslotindex, cflag) \
- if (neg) { \
- int vjlen = old? CILEN_COMPRESS : CILEN_VJ; \
- if ((len -= vjlen) < 0) \
- goto bad; \
- GETCHAR(citype, p); \
- GETCHAR(cilen, p); \
- if (cilen != vjlen || \
- citype != opt) \
- goto bad; \
- GETSHORT(cishort, p); \
- if (cishort != val) \
- goto bad; \
- if (!old) { \
- GETCHAR(cimaxslotindex, p); \
- if (cimaxslotindex != maxslotindex) \
- goto bad; \
- GETCHAR(cicflag, p); \
- if (cicflag != cflag) \
- goto bad; \
- } \
- }
-
-#define ACKCIADDR(opt, neg, old, val1, val2) \
- if (neg) { \
- int addrlen = (old? CILEN_ADDRS: CILEN_ADDR); \
- u_int32_t l; \
- if ((len -= addrlen) < 0) \
- goto bad; \
- GETCHAR(citype, p); \
- GETCHAR(cilen, p); \
- if (cilen != addrlen || \
- citype != opt) \
- goto bad; \
- GETLONG(l, p); \
- cilong = htonl(l); \
- if (val1 != cilong) \
- goto bad; \
- if (old) { \
- GETLONG(l, p); \
- cilong = htonl(l); \
- if (val2 != cilong) \
- goto bad; \
- } \
- }
-
- ACKCIADDR((go->old_addrs? CI_ADDRS: CI_ADDR), go->neg_addr,
- go->old_addrs, go->ouraddr, go->hisaddr);
-
- ACKCIVJ(CI_COMPRESSTYPE, go->neg_vj, go->vj_protocol, go->old_vj,
- go->maxslotindex, go->cflag);
-
- /*
- * If there are any remaining CIs, then this packet is bad.
- */
- if (len != 0)
- goto bad;
- return (1);
-
-bad:
- IPCPDEBUG((LOG_INFO, "ipcp_ackci: received bad Ack!"));
- return (0);
-}
-
-/*
- * ipcp_nakci - Peer has sent a NAK for some of our CIs.
- * This should not modify any state if the Nak is bad
- * or if IPCP is in the OPENED state.
- *
- * Returns:
- * 0 - Nak was bad.
- * 1 - Nak was good.
- */
-static int
-ipcp_nakci(f, p, len)
- fsm *f;
- u_char *p;
- int len;
-{
- ipcp_options *go = &ipcp_gotoptions[f->unit];
- u_char cimaxslotindex, cicflag;
- u_char citype, cilen, *next;
- u_short cishort;
- u_int32_t ciaddr1, ciaddr2, l;
- ipcp_options no; /* options we've seen Naks for */
- ipcp_options try; /* options to request next time */
-
- BZERO(&no, sizeof(no));
- try = *go;
-
- /*
- * Any Nak'd CIs must be in exactly the same order that we sent.
- * Check packet length and CI length at each step.
- * If we find any deviations, then this packet is bad.
- */
-#define NAKCIADDR(opt, neg, old, code) \
- if (go->neg && \
- len >= (cilen = (old? CILEN_ADDRS: CILEN_ADDR)) && \
- p[1] == cilen && \
- p[0] == opt) { \
- len -= cilen; \
- INCPTR(2, p); \
- GETLONG(l, p); \
- ciaddr1 = htonl(l); \
- if (old) { \
- GETLONG(l, p); \
- ciaddr2 = htonl(l); \
- no.old_addrs = 1; \
- } else \
- ciaddr2 = 0; \
- no.neg = 1; \
- code \
- }
-
-#define NAKCIVJ(opt, neg, code) \
- if (go->neg && \
- ((cilen = p[1]) == CILEN_COMPRESS || cilen == CILEN_VJ) && \
- len >= cilen && \
- p[0] == opt) { \
- len -= cilen; \
- INCPTR(2, p); \
- GETSHORT(cishort, p); \
- no.neg = 1; \
- code \
- }
-
- /*
- * Accept the peer's idea of {our,his} address, if different
- * from our idea, only if the accept_{local,remote} flag is set.
- */
- NAKCIADDR((go->old_addrs? CI_ADDRS: CI_ADDR), neg_addr, go->old_addrs,
- if (go->accept_local && ciaddr1) { /* Do we know our address? */
- try.ouraddr = ciaddr1;
- IPCPDEBUG((LOG_INFO, "local IP address %s",
- ip_ntoa(ciaddr1)));
- }
- if (go->accept_remote && ciaddr2) { /* Does he know his? */
- try.hisaddr = ciaddr2;
- IPCPDEBUG((LOG_INFO, "remote IP address %s",
- ip_ntoa(ciaddr2)));
- }
- );
-
- /*
- * Accept the peer's value of maxslotindex provided that it
- * is less than what we asked for. Turn off slot-ID compression
- * if the peer wants. Send old-style compress-type option if
- * the peer wants.
- */
- NAKCIVJ(CI_COMPRESSTYPE, neg_vj,
- if (cilen == CILEN_VJ) {
- GETCHAR(cimaxslotindex, p);
- GETCHAR(cicflag, p);
- if (cishort == IPCP_VJ_COMP) {
- try.old_vj = 0;
- if (cimaxslotindex < go->maxslotindex)
- try.maxslotindex = cimaxslotindex;
- if (!cicflag)
- try.cflag = 0;
- } else {
- try.neg_vj = 0;
- }
- } else {
- if (cishort == IPCP_VJ_COMP || cishort == IPCP_VJ_COMP_OLD) {
- try.old_vj = 1;
- try.vj_protocol = cishort;
- } else {
- try.neg_vj = 0;
- }
- }
- );
-
- /*
- * There may be remaining CIs, if the peer is requesting negotiation
- * on an option that we didn't include in our request packet.
- * If they want to negotiate about IP addresses, we comply.
- * If they want us to ask for compression, we refuse.
- */
- while (len > CILEN_VOID) {
- GETCHAR(citype, p);
- GETCHAR(cilen, p);
- if( (len -= cilen) < 0 )
- goto bad;
- next = p + cilen - 2;
-
- switch (citype) {
- case CI_COMPRESSTYPE:
- if (go->neg_vj || no.neg_vj ||
- (cilen != CILEN_VJ && cilen != CILEN_COMPRESS))
- goto bad;
- no.neg_vj = 1;
- break;
- case CI_ADDRS:
- if ((go->neg_addr && go->old_addrs) || no.old_addrs
- || cilen != CILEN_ADDRS)
- goto bad;
- try.neg_addr = 1;
- try.old_addrs = 1;
- GETLONG(l, p);
- ciaddr1 = htonl(l);
- if (ciaddr1 && go->accept_local)
- try.ouraddr = ciaddr1;
- GETLONG(l, p);
- ciaddr2 = htonl(l);
- if (ciaddr2 && go->accept_remote)
- try.hisaddr = ciaddr2;
- no.old_addrs = 1;
- break;
- case CI_ADDR:
- if (go->neg_addr || no.neg_addr || cilen != CILEN_ADDR)
- goto bad;
- try.old_addrs = 0;
- GETLONG(l, p);
- ciaddr1 = htonl(l);
- if (ciaddr1 && go->accept_local)
- try.ouraddr = ciaddr1;
- if (try.ouraddr != 0)
- try.neg_addr = 1;
- no.neg_addr = 1;
- break;
- }
- p = next;
- }
-
- /* If there is still anything left, this packet is bad. */
- if (len != 0)
- goto bad;
-
- /*
- * OK, the Nak is good. Now we can update state.
- */
- if (f->state != OPENED)
- *go = try;
-
- return 1;
-
-bad:
- IPCPDEBUG((LOG_INFO, "ipcp_nakci: received bad Nak!"));
- return 0;
-}
-
-
-/*
- * ipcp_rejci - Reject some of our CIs.
- */
-static int
-ipcp_rejci(f, p, len)
- fsm *f;
- u_char *p;
- int len;
-{
- ipcp_options *go = &ipcp_gotoptions[f->unit];
- u_char cimaxslotindex, ciflag, cilen;
- u_short cishort;
- u_int32_t cilong;
- ipcp_options try; /* options to request next time */
-
- try = *go;
- /*
- * Any Rejected CIs must be in exactly the same order that we sent.
- * Check packet length and CI length at each step.
- * If we find any deviations, then this packet is bad.
- */
-#define REJCIADDR(opt, neg, old, val1, val2) \
- if (go->neg && \
- len >= (cilen = old? CILEN_ADDRS: CILEN_ADDR) && \
- p[1] == cilen && \
- p[0] == opt) { \
- u_int32_t l; \
- len -= cilen; \
- INCPTR(2, p); \
- GETLONG(l, p); \
- cilong = htonl(l); \
- /* Check rejected value. */ \
- if (cilong != val1) \
- goto bad; \
- if (old) { \
- GETLONG(l, p); \
- cilong = htonl(l); \
- /* Check rejected value. */ \
- if (cilong != val2) \
- goto bad; \
- } \
- try.neg = 0; \
- }
-
-#define REJCIVJ(opt, neg, val, old, maxslot, cflag) \
- if (go->neg && \
- p[1] == (old? CILEN_COMPRESS : CILEN_VJ) && \
- len >= p[1] && \
- p[0] == opt) { \
- len -= p[1]; \
- INCPTR(2, p); \
- GETSHORT(cishort, p); \
- /* Check rejected value. */ \
- if (cishort != val) \
- goto bad; \
- if (!old) { \
- GETCHAR(cimaxslotindex, p); \
- if (cimaxslotindex != maxslot) \
- goto bad; \
- GETCHAR(ciflag, p); \
- if (ciflag != cflag) \
- goto bad; \
- } \
- try.neg = 0; \
- }
-
- REJCIADDR((go->old_addrs? CI_ADDRS: CI_ADDR), neg_addr,
- go->old_addrs, go->ouraddr, go->hisaddr);
-
- REJCIVJ(CI_COMPRESSTYPE, neg_vj, go->vj_protocol, go->old_vj,
- go->maxslotindex, go->cflag);
-
- /*
- * If there are any remaining CIs, then this packet is bad.
- */
- if (len != 0)
- goto bad;
- /*
- * Now we can update state.
- */
- if (f->state != OPENED)
- *go = try;
- return 1;
-
-bad:
- IPCPDEBUG((LOG_INFO, "ipcp_rejci: received bad Reject!"));
- return 0;
-}
-
-
-/*
- * ipcp_reqci - Check the peer's requested CIs and send appropriate response.
- *
- * Returns: CONFACK, CONFNAK or CONFREJ and input packet modified
- * appropriately. If reject_if_disagree is non-zero, doesn't return
- * CONFNAK; returns CONFREJ if it can't return CONFACK.
- */
-static int
-ipcp_reqci(f, inp, len, reject_if_disagree)
- fsm *f;
- u_char *inp; /* Requested CIs */
- int *len; /* Length of requested CIs */
- int reject_if_disagree;
-{
- ipcp_options *wo = &ipcp_wantoptions[f->unit];
- ipcp_options *ho = &ipcp_hisoptions[f->unit];
- ipcp_options *ao = &ipcp_allowoptions[f->unit];
- ipcp_options *go = &ipcp_gotoptions[f->unit];
- u_char *cip, *next; /* Pointer to current and next CIs */
- u_short cilen, citype; /* Parsed len, type */
- u_short cishort; /* Parsed short value */
- u_int32_t tl, ciaddr1, ciaddr2;/* Parsed address values */
- int rc = CONFACK; /* Final packet return code */
- int orc; /* Individual option return code */
- u_char *p; /* Pointer to next char to parse */
- u_char *ucp = inp; /* Pointer to current output char */
- int l = *len; /* Length left */
- u_char maxslotindex, cflag;
- int d;
-
- cis_received[f->unit] = 1;
-
- /*
- * Reset all his options.
- */
- BZERO(ho, sizeof(*ho));
-
- /*
- * Process all his options.
- */
- next = inp;
- while (l) {
- orc = CONFACK; /* Assume success */
- cip = p = next; /* Remember begining of CI */
- if (l < 2 || /* Not enough data for CI header or */
- p[1] < 2 || /* CI length too small or */
- p[1] > l) { /* CI length too big? */
- IPCPDEBUG((LOG_INFO, "ipcp_reqci: bad CI length!"));
- orc = CONFREJ; /* Reject bad CI */
- cilen = l; /* Reject till end of packet */
- l = 0; /* Don't loop again */
- goto endswitch;
- }
- GETCHAR(citype, p); /* Parse CI type */
- GETCHAR(cilen, p); /* Parse CI length */
- l -= cilen; /* Adjust remaining length */
- next += cilen; /* Step to next CI */
-
- switch (citype) { /* Check CI type */
- case CI_ADDRS:
- IPCPDEBUG((LOG_INFO, "ipcp: received ADDRS "));
- if (!ao->neg_addr ||
- cilen != CILEN_ADDRS) { /* Check CI length */
- orc = CONFREJ; /* Reject CI */
- break;
- }
-
- /*
- * If he has no address, or if we both have his address but
- * disagree about it, then NAK it with our idea.
- * In particular, if we don't know his address, but he does,
- * then accept it.
- */
- GETLONG(tl, p); /* Parse source address (his) */
- ciaddr1 = htonl(tl);
- IPCPDEBUG((LOG_INFO, "(%s:", ip_ntoa(ciaddr1)));
- if (ciaddr1 != wo->hisaddr
- && (ciaddr1 == 0 || !wo->accept_remote)) {
- orc = CONFNAK;
- if (!reject_if_disagree) {
- DECPTR(sizeof(u_int32_t), p);
- tl = ntohl(wo->hisaddr);
- PUTLONG(tl, p);
- }
- } else if (ciaddr1 == 0 && wo->hisaddr == 0) {
- /*
- * If neither we nor he knows his address, reject the option.
- */
- orc = CONFREJ;
- wo->req_addr = 0; /* don't NAK with 0.0.0.0 later */
- break;
- }
-
- /*
- * If he doesn't know our address, or if we both have our address
- * but disagree about it, then NAK it with our idea.
- */
- GETLONG(tl, p); /* Parse desination address (ours) */
- ciaddr2 = htonl(tl);
- IPCPDEBUG((LOG_INFO, "%s)", ip_ntoa(ciaddr2)));
- if (ciaddr2 != wo->ouraddr) {
- if (ciaddr2 == 0 || !wo->accept_local) {
- orc = CONFNAK;
- if (!reject_if_disagree) {
- DECPTR(sizeof(u_int32_t), p);
- tl = ntohl(wo->ouraddr);
- PUTLONG(tl, p);
- }
- } else {
- go->ouraddr = ciaddr2; /* accept peer's idea */
- }
- }
-
- ho->neg_addr = 1;
- ho->old_addrs = 1;
- ho->hisaddr = ciaddr1;
- ho->ouraddr = ciaddr2;
- break;
-
- case CI_ADDR:
- IPCPDEBUG((LOG_INFO, "ipcp: received ADDR "));
-
- if (!ao->neg_addr ||
- cilen != CILEN_ADDR) { /* Check CI length */
- orc = CONFREJ; /* Reject CI */
- break;
- }
-
- /*
- * If he has no address, or if we both have his address but
- * disagree about it, then NAK it with our idea.
- * In particular, if we don't know his address, but he does,
- * then accept it.
- */
- GETLONG(tl, p); /* Parse source address (his) */
- ciaddr1 = htonl(tl);
- IPCPDEBUG((LOG_INFO, "(%s)", ip_ntoa(ciaddr1)));
- if (ciaddr1 != wo->hisaddr
- && (ciaddr1 == 0 || !wo->accept_remote)) {
- orc = CONFNAK;
- if (!reject_if_disagree) {
- DECPTR(sizeof(u_int32_t), p);
- tl = ntohl(wo->hisaddr);
- PUTLONG(tl, p);
- }
- } else if (ciaddr1 == 0 && wo->hisaddr == 0) {
- /*
- * Don't ACK an address of 0.0.0.0 - reject it instead.
- */
- orc = CONFREJ;
- wo->req_addr = 0; /* don't NAK with 0.0.0.0 later */
- break;
- }
-
- ho->neg_addr = 1;
- ho->hisaddr = ciaddr1;
- break;
-
- case CI_MS_DNS1:
- case CI_MS_DNS2:
- /* Microsoft primary or secondary DNS request */
- d = citype == CI_MS_DNS2;
- IPCPDEBUG((LOG_INFO, "ipcp: received DNS%d Request ", d+1));
-
- /* If we do not have a DNS address then we cannot send it */
- if (ao->dnsaddr[d] == 0 ||
- cilen != CILEN_ADDR) { /* Check CI length */
- orc = CONFREJ; /* Reject CI */
- break;
- }
- GETLONG(tl, p);
- if (htonl(tl) != ao->dnsaddr[d]) {
- DECPTR(sizeof(u_int32_t), p);
- tl = ntohl(ao->dnsaddr[d]);
- PUTLONG(tl, p);
- orc = CONFNAK;
- }
- break;
-
- case CI_MS_WINS1:
- case CI_MS_WINS2:
- /* Microsoft primary or secondary WINS request */
- d = citype == CI_MS_WINS2;
- IPCPDEBUG((LOG_INFO, "ipcp: received WINS%d Request ", d+1));
-
- /* If we do not have a DNS address then we cannot send it */
- if (ao->winsaddr[d] == 0 ||
- cilen != CILEN_ADDR) { /* Check CI length */
- orc = CONFREJ; /* Reject CI */
- break;
- }
- GETLONG(tl, p);
- if (htonl(tl) != ao->winsaddr[d]) {
- DECPTR(sizeof(u_int32_t), p);
- tl = ntohl(ao->winsaddr[d]);
- PUTLONG(tl, p);
- orc = CONFNAK;
- }
- break;
-
- case CI_COMPRESSTYPE:
- IPCPDEBUG((LOG_INFO, "ipcp: received COMPRESSTYPE "));
- if (!ao->neg_vj ||
- (cilen != CILEN_VJ && cilen != CILEN_COMPRESS)) {
- orc = CONFREJ;
- break;
- }
- GETSHORT(cishort, p);
- IPCPDEBUG((LOG_INFO, "(%d)", cishort));
-
- if (!(cishort == IPCP_VJ_COMP ||
- (cishort == IPCP_VJ_COMP_OLD && cilen == CILEN_COMPRESS))) {
- orc = CONFREJ;
- break;
- }
-
- ho->neg_vj = 1;
- ho->vj_protocol = cishort;
- if (cilen == CILEN_VJ) {
- GETCHAR(maxslotindex, p);
- if (maxslotindex > ao->maxslotindex) {
- orc = CONFNAK;
- if (!reject_if_disagree){
- DECPTR(1, p);
- PUTCHAR(ao->maxslotindex, p);
- }
- }
- GETCHAR(cflag, p);
- if (cflag && !ao->cflag) {
- orc = CONFNAK;
- if (!reject_if_disagree){
- DECPTR(1, p);
- PUTCHAR(wo->cflag, p);
- }
- }
- ho->maxslotindex = maxslotindex;
- ho->cflag = cflag;
- } else {
- ho->old_vj = 1;
- ho->maxslotindex = MAX_STATES - 1;
- ho->cflag = 1;
- }
- break;
-
- default:
- orc = CONFREJ;
- break;
- }
-
-endswitch:
- IPCPDEBUG((LOG_INFO, " (%s)\n", CODENAME(orc)));
-
- if (orc == CONFACK && /* Good CI */
- rc != CONFACK) /* but prior CI wasnt? */
- continue; /* Don't send this one */
-
- if (orc == CONFNAK) { /* Nak this CI? */
- if (reject_if_disagree) /* Getting fed up with sending NAKs? */
- orc = CONFREJ; /* Get tough if so */
- else {
- if (rc == CONFREJ) /* Rejecting prior CI? */
- continue; /* Don't send this one */
- if (rc == CONFACK) { /* Ack'd all prior CIs? */
- rc = CONFNAK; /* Not anymore... */
- ucp = inp; /* Backup */
- }
- }
- }
-
- if (orc == CONFREJ && /* Reject this CI */
- rc != CONFREJ) { /* but no prior ones? */
- rc = CONFREJ;
- ucp = inp; /* Backup */
- }
-
- /* Need to move CI? */
- if (ucp != cip)
- BCOPY(cip, ucp, cilen); /* Move it */
-
- /* Update output pointer */
- INCPTR(cilen, ucp);
- }
-
- /*
- * If we aren't rejecting this packet, and we want to negotiate
- * their address, and they didn't send their address, then we
- * send a NAK with a CI_ADDR option appended. We assume the
- * input buffer is long enough that we can append the extra
- * option safely.
- */
- if (rc != CONFREJ && !ho->neg_addr &&
- wo->req_addr && !reject_if_disagree) {
- if (rc == CONFACK) {
- rc = CONFNAK;
- ucp = inp; /* reset pointer */
- wo->req_addr = 0; /* don't ask again */
- }
- PUTCHAR(CI_ADDR, ucp);
- PUTCHAR(CILEN_ADDR, ucp);
- tl = ntohl(wo->hisaddr);
- PUTLONG(tl, ucp);
- }
-
- *len = ucp - inp; /* Compute output length */
- IPCPDEBUG((LOG_INFO, "ipcp: returning Configure-%s", CODENAME(rc)));
- return (rc); /* Return final code */
-}
-
-
-/*
- * ip_check_options - check that any IP-related options are OK,
- * and assign appropriate defaults.
- */
-static void
-ip_check_options()
-{
- struct hostent *hp;
- u_int32_t local;
- ipcp_options *wo = &ipcp_wantoptions[0];
-
- /*
- * Default our local IP address based on our hostname.
- * If local IP address already given, don't bother.
- */
- if (wo->ouraddr == 0 && !disable_defaultip) {
- /*
- * Look up our hostname (possibly with domain name appended)
- * and take the first IP address as our local IP address.
- * If there isn't an IP address for our hostname, too bad.
- */
- wo->accept_local = 1; /* don't insist on this default value */
- if ((hp = gethostbyname(hostname)) != NULL) {
- local = *(u_int32_t *)hp->h_addr;
- if (local != 0 && !bad_ip_adrs(local))
- wo->ouraddr = local;
- }
- }
-
-}
-
-
-/*
- * ip_demand_conf - configure the interface as though
- * IPCP were up, for use with dial-on-demand.
- */
-static int
-ip_demand_conf(u)
- int u;
-{
- ipcp_options *wo = &ipcp_wantoptions[u];
-
- if (!sifaddr(u, wo->ouraddr, wo->hisaddr, GetMask(wo->ouraddr)))
- return 0;
- if (!sifup(u))
- return 0;
- if (!sifnpmode(u, PPP_IP, NPMODE_QUEUE))
- return 0;
- if (wo->default_route)
- if (sifdefaultroute(u, wo->ouraddr, wo->hisaddr))
- default_route_set[u] = 1;
- if (wo->proxy_arp)
- if (sifproxyarp(u, wo->hisaddr))
- proxy_arp_set[u] = 1;
-
- syslog(LOG_NOTICE, "local IP address %s", ip_ntoa(wo->ouraddr));
- syslog(LOG_NOTICE, "remote IP address %s", ip_ntoa(wo->hisaddr));
-
- return 1;
-}
-
-
-/*
- * ipcp_up - IPCP has come UP.
- *
- * Configure the IP network interface appropriately and bring it up.
- */
-#define script_setenv(a,b)
-
-
-static void
-ipcp_up(f)
- fsm *f;
-{
- u_int32_t mask;
- ipcp_options *ho = &ipcp_hisoptions[f->unit];
- ipcp_options *go = &ipcp_gotoptions[f->unit];
- ipcp_options *wo = &ipcp_wantoptions[f->unit];
-
- np_up(f->unit, PPP_IP);
- IPCPDEBUG((LOG_INFO, "ipcp: up"));
-
- /*
- * We must have a non-zero IP address for both ends of the link.
- */
- if (!ho->neg_addr)
- ho->hisaddr = wo->hisaddr;
-
- if (ho->hisaddr == 0) {
- syslog(LOG_ERR, "Could not determine remote IP address");
- ipcp_close(f->unit, "Could not determine remote IP address");
- return;
- }
- if (go->ouraddr == 0) {
- syslog(LOG_ERR, "Could not determine local IP address");
- ipcp_close(f->unit, "Could not determine local IP address");
- return;
- }
-/* script_setenv("IPLOCAL", ip_ntoa(go->ouraddr));
- script_setenv("IPREMOTE", ip_ntoa(ho->hisaddr));
-*/
- /*
- * Check that the peer is allowed to use the IP address it wants.
- */
- if (!auth_ip_addr(f->unit, ho->hisaddr)) {
- syslog(LOG_ERR, "Peer is not authorized to use remote address %s",
- ip_ntoa(ho->hisaddr));
- ipcp_close(f->unit, "Unauthorized remote IP address");
- return;
- }
-
- /* set tcp compression */
- sifvjcomp(f->unit, ho->neg_vj, ho->cflag, ho->maxslotindex);
-
- /*
- * If we are doing dial-on-demand, the interface is already
- * configured, so we put out any saved-up packets, then set the
- * interface to pass IP packets.
- */
- {
- /*
- * Set IP addresses and (if specified) netmask.
- */
- mask = GetMask(go->ouraddr);
-
-#if !(defined(SVR4) && (defined(SNI) || defined(__USLC__)))
- if (!sifaddr(f->unit, go->ouraddr, ho->hisaddr, mask)) {
- IPCPDEBUG((LOG_WARNING, "sifaddr failed"));
- ipcp_close(f->unit, "Interface configuration failed");
- return;
- }
-#endif
-
- /* bring the interface up for IP */
- if (!sifup(f->unit)) {
- IPCPDEBUG((LOG_WARNING, "sifup failed"));
- ipcp_close(f->unit, "Interface configuration failed");
- return;
- }
-
-#if (defined(SVR4) && (defined(SNI) || defined(__USLC__)))
- if (!sifaddr(f->unit, go->ouraddr, ho->hisaddr, mask)) {
- IPCPDEBUG((LOG_WARNING, "sifaddr failed"));
- ipcp_close(f->unit, "Interface configuration failed");
- return;
- }
-#endif
- sifnpmode(f->unit, PPP_IP, NPMODE_PASS);
-
- /* assign a default route through the interface if required */
- if (ipcp_wantoptions[f->unit].default_route)
- if (sifdefaultroute(f->unit, go->ouraddr, ho->hisaddr))
- default_route_set[f->unit] = 1;
-
- /* Make a proxy ARP entry if requested. */
- if (ipcp_wantoptions[f->unit].proxy_arp)
- if (sifproxyarp(f->unit, ho->hisaddr))
- proxy_arp_set[f->unit] = 1;
-
- syslog(LOG_NOTICE, "local IP address %s", ip_ntoa(go->ouraddr));
- syslog(LOG_NOTICE, "remote IP address %s", ip_ntoa(ho->hisaddr));
- }
-
- /*
- * Execute the ip-up script, like this:
- * /etc/ppp/ip-up interface tty speed local-IP remote-IP
- */
- {
-#if 0
-/* XXX PPPConfiguration */
- GlobalSystemStatus *stat;
- stat=LockSTBSystemParam();
- stat->ConnectionStatus=Connected;
- UnlockSTBSystemParam();
-#endif
- }
-}
-
-
-/*
- * ipcp_down - IPCP has gone DOWN.
- *
- * Take the IP network interface down, clear its addresses
- * and delete routes through it.
- */
-static void
-ipcp_down(f)
- fsm *f;
-{
- IPCPDEBUG((LOG_INFO, "ipcp: down"));
- np_down(f->unit, PPP_IP);
- sifvjcomp(f->unit, 0, 0, 0);
-
- /*
- * If we are doing dial-on-demand, set the interface
- * to queue up outgoing packets (for now).
- */
- sifdown(f->unit);
- ipcp_clear_addrs(f->unit);
-
- /* Execute the ip-down script */
- {
-#if 0
-/* XXX PPPConfiguration */
- GlobalSystemStatus *stat;
- stat=LockSTBSystemParam();
- stat->ConnectionStatus=NotConnected;
- UnlockSTBSystemParam();
-#endif
- }
-}
-
-
-/*
- * ipcp_clear_addrs() - clear the interface addresses, routes,
- * proxy arp entries, etc.
- */
-static void
-ipcp_clear_addrs(unit)
- int unit;
-{
- u_int32_t ouraddr, hisaddr;
-
- ouraddr = ipcp_gotoptions[unit].ouraddr;
- hisaddr = ipcp_hisoptions[unit].hisaddr;
- if (proxy_arp_set[unit]) {
- cifproxyarp(unit, hisaddr);
- proxy_arp_set[unit] = 0;
- }
- if (default_route_set[unit]) {
- cifdefaultroute(unit, ouraddr, hisaddr);
- default_route_set[unit] = 0;
- }
- cifaddr(unit, ouraddr, hisaddr);
-}
-
-
-/*
- * ipcp_finished - possibly shut down the lower layers.
- */
-static void
-ipcp_finished(f)
- fsm *f;
-{
- np_finished(f->unit, PPP_IP);
-}
-
-
-#if 0
-/*
- * ipcp_script - Execute a script with arguments
- * interface-name tty-name speed local-IP remote-IP.
- */
-static void
-ipcp_script(f, script)
- fsm *f;
- char *script;
-{
- char strspeed[32], strlocal[32], strremote[32];
- char *argv[8];
-
- sprintf(strspeed, "%d", baud_rate);
- strcpy(strlocal, ip_ntoa(ipcp_gotoptions[f->unit].ouraddr));
- strcpy(strremote, ip_ntoa(ipcp_hisoptions[f->unit].hisaddr));
-
- argv[0] = script;
- argv[1] = ifname;
- argv[2] = devnam;
- argv[3] = strspeed;
- argv[4] = strlocal;
- argv[5] = strremote;
- argv[6] = ipparam;
- argv[7] = NULL;
- run_program(script, argv, 0);
-}
-#endif
-
-/*
- * ipcp_printpkt - print the contents of an IPCP packet.
- */
-static char *ipcp_codenames[] = {
- "ConfReq", "ConfAck", "ConfNak", "ConfRej",
- "TermReq", "TermAck", "CodeRej"
-};
-
-static int
-ipcp_printpkt(p, plen, printer, arg)
- u_char *p;
- int plen;
- void (*printer) __P((void *, char *, ...));
- void *arg;
-{
- int code, id, len, olen;
- u_char *pstart, *optend;
- u_short cishort;
- u_int32_t cilong;
-
- if (plen < HEADERLEN)
- return 0;
- pstart = p;
- GETCHAR(code, p);
- GETCHAR(id, p);
- GETSHORT(len, p);
- if (len < HEADERLEN || len > plen)
- return 0;
-
- if (code >= 1 && code <= sizeof(ipcp_codenames) / sizeof(char *))
- printer(arg, " %s", ipcp_codenames[code-1]);
- else
- printer(arg, " code=0x%x", code);
- printer(arg, " id=0x%x", id);
- len -= HEADERLEN;
- switch (code) {
- case CONFREQ:
- case CONFACK:
- case CONFNAK:
- case CONFREJ:
-
- while (len >= 2) {
- GETCHAR(code, p);
- GETCHAR(olen, p);
- p -= 2;
- if (olen < 2 || olen > len) {
- break;
- }
- printer(arg, " <");
- len -= olen;
- optend = p + olen;
- switch (code) {
- case CI_ADDRS:
- if (olen == CILEN_ADDRS) {
- p += 2;
- GETLONG(cilong, p);
- printer(arg, "addrs %I", htonl(cilong));
- GETLONG(cilong, p);
- printer(arg, " %I", htonl(cilong));
- }
- break;
- case CI_COMPRESSTYPE:
- if (olen >= CILEN_COMPRESS) {
- p += 2;
- GETSHORT(cishort, p);
- printer(arg, "compress ");
- switch (cishort) {
- case IPCP_VJ_COMP:
- printer(arg, "VJ");
- break;
- case IPCP_VJ_COMP_OLD:
- printer(arg, "old-VJ");
- break;
- default:
- printer(arg, "0x%x", cishort);
- }
- }
- break;
- case CI_ADDR:
- if (olen == CILEN_ADDR) {
- p += 2;
- GETLONG(cilong, p);
- printer(arg, "addr %I", htonl(cilong));
- }
- break;
- case CI_MS_DNS1:
- case CI_MS_DNS2:
- p += 2;
- GETLONG(cilong, p);
- printer(arg, "ms-dns %I", htonl(cilong));
- break;
- case CI_MS_WINS1:
- case CI_MS_WINS2:
- p += 2;
- GETLONG(cilong, p);
- printer(arg, "ms-wins %I", htonl(cilong));
- break;
- }
- while (p < optend) {
- GETCHAR(code, p);
- printer(arg, " %.2x", code);
- }
- printer(arg, ">");
- }
- break;
-
- case TERMACK:
- case TERMREQ:
- if (len > 0 && *p >= ' ' && *p < 0x7f) {
- printer(arg, " ");
- print_string(p, len, printer, arg);
- p += len;
- len = 0;
- }
- break;
- }
-
- for (; len > 0; --len) {
- GETCHAR(code, p);
- printer(arg, " %.2x", code);
- }
-
- return p - pstart;
-}
-
-/*
- * ip_active_pkt - see if this IP packet is worth bringing the link up for.
- * We don't bring the link up for IP fragments or for TCP FIN packets
- * with no data.
- */
-#define IP_HDRLEN 20 /* bytes */
-#define IP_OFFMASK 0x1fff
-#define IPPROTO_TCP 6
-#define TCP_HDRLEN 20
-#define TH_FIN 0x01
-
-/*
- * We use these macros because the IP header may be at an odd address,
- * and some compilers might use word loads to get th_off or ip_hl.
- */
-
-#define net_short(x) (((x)[0] << 8) + (x)[1])
-#define get_iphl(x) (((unsigned char *)(x))[0] & 0xF)
-#define get_ipoff(x) net_short((unsigned char *)(x) + 6)
-#define get_ipproto(x) (((unsigned char *)(x))[9])
-#define get_tcpoff(x) (((unsigned char *)(x))[12] >> 4)
-#define get_tcpflags(x) (((unsigned char *)(x))[13])
-
-static int
-ip_active_pkt(pkt, len)
- u_char *pkt;
- int len;
-{
- u_char *tcp;
- int hlen;
-
- len -= PPP_HDRLEN;
- pkt += PPP_HDRLEN;
- if (len < IP_HDRLEN)
- return 0;
- if ((get_ipoff(pkt) & IP_OFFMASK) != 0)
- return 0;
- if (get_ipproto(pkt) != IPPROTO_TCP)
- return 1;
- hlen = get_iphl(pkt) * 4;
- if (len < hlen + TCP_HDRLEN)
- return 0;
- tcp = pkt + hlen;
- if ((get_tcpflags(tcp) & TH_FIN) != 0 && len == hlen + get_tcpoff(tcp) * 4)
- return 0;
- return 1;
-}
diff --git a/cpukit/pppd/ipcp.h b/cpukit/pppd/ipcp.h
deleted file mode 100644
index e2c7eb44db..0000000000
--- a/cpukit/pppd/ipcp.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * ipcp.h - IP Control Protocol definitions.
- *
- * Copyright (c) 1989 Carnegie Mellon University.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by Carnegie Mellon University. The name of the
- * University may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Id$
- */
-
-/*
- * Options.
- */
-#define CI_ADDRS 1 /* IP Addresses */
-#define CI_COMPRESSTYPE 2 /* Compression Type */
-#define CI_ADDR 3
-
-#define CI_MS_DNS1 129 /* Primary DNS value */
-#define CI_MS_WINS1 130 /* Primary WINS value */
-#define CI_MS_DNS2 131 /* Secondary DNS value */
-#define CI_MS_WINS2 132 /* Secondary WINS value */
-
-#define MAX_STATES 16 /* from slcompress.h */
-
-#define IPCP_VJMODE_OLD 1 /* "old" mode (option # = 0x0037) */
-#define IPCP_VJMODE_RFC1172 2 /* "old-rfc"mode (option # = 0x002d) */
-#define IPCP_VJMODE_RFC1332 3 /* "new-rfc"mode (option # = 0x002d, */
- /* maxslot and slot number compression) */
-
-#define IPCP_VJ_COMP 0x002d /* current value for VJ compression option*/
-#define IPCP_VJ_COMP_OLD 0x0037 /* "old" (i.e, broken) value for VJ */
- /* compression option*/
-
-typedef struct ipcp_options {
- int neg_addr : 1; /* Negotiate IP Address? */
- int old_addrs : 1; /* Use old (IP-Addresses) option? */
- int req_addr : 1; /* Ask peer to send IP address? */
- int default_route : 1; /* Assign default route through interface? */
- int proxy_arp : 1; /* Make proxy ARP entry for peer? */
- int neg_vj : 1; /* Van Jacobson Compression? */
- int old_vj : 1; /* use old (short) form of VJ option? */
- int accept_local : 1; /* accept peer's value for ouraddr */
- int accept_remote : 1; /* accept peer's value for hisaddr */
- u_short vj_protocol; /* protocol value to use in VJ option */
- u_char maxslotindex, cflag; /* values for RFC1332 VJ compression neg. */
- u_int32_t ouraddr, hisaddr; /* Addresses in NETWORK BYTE ORDER */
- u_int32_t dnsaddr[2]; /* Primary and secondary MS DNS entries */
- u_int32_t winsaddr[2]; /* Primary and secondary MS WINS entries */
-} ipcp_options;
-
-extern fsm ipcp_fsm[];
-extern ipcp_options ipcp_wantoptions[];
-extern ipcp_options ipcp_gotoptions[];
-extern ipcp_options ipcp_allowoptions[];
-extern ipcp_options ipcp_hisoptions[];
-
-char *ip_ntoa __P((u_int32_t));
-
-extern struct protent ipcp_protent;
diff --git a/cpukit/pppd/ipxcp.c b/cpukit/pppd/ipxcp.c
deleted file mode 100644
index be85f31231..0000000000
--- a/cpukit/pppd/ipxcp.c
+++ /dev/null
@@ -1,1399 +0,0 @@
-/*
- * ipxcp.c - PPP IPX Control Protocol.
- *
- * Copyright (c) 1989 Carnegie Mellon University.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by Carnegie Mellon University. The name of the
- * University may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#ifdef IPX_CHANGE
-#ifndef lint
-/* static char rcsid[] = "$Id$"; */
-#endif
-
-/*
- * TODO:
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <syslog.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-
-#include "pppd.h"
-#include "fsm.h"
-#include "ipxcp.h"
-#include "pathnames.h"
-
-/* global vars */
-ipxcp_options ipxcp_wantoptions[NUM_PPP]; /* Options that we want to request */
-ipxcp_options ipxcp_gotoptions[NUM_PPP]; /* Options that peer ack'd */
-ipxcp_options ipxcp_allowoptions[NUM_PPP]; /* Options we allow peer to request */
-ipxcp_options ipxcp_hisoptions[NUM_PPP]; /* Options that we ack'd */
-
-#define wo (&ipxcp_wantoptions[0])
-#define ao (&ipxcp_allowoptions[0])
-#define go (&ipxcp_gotoptions[0])
-#define ho (&ipxcp_hisoptions[0])
-
-/*
- * Callbacks for fsm code. (CI = Configuration Information)
- */
-static void ipxcp_resetci __P((fsm *)); /* Reset our CI */
-static int ipxcp_cilen __P((fsm *)); /* Return length of our CI */
-static void ipxcp_addci __P((fsm *, u_char *, int *)); /* Add our CI */
-static int ipxcp_ackci __P((fsm *, u_char *, int)); /* Peer ack'd our CI */
-static int ipxcp_nakci __P((fsm *, u_char *, int)); /* Peer nak'd our CI */
-static int ipxcp_rejci __P((fsm *, u_char *, int)); /* Peer rej'd our CI */
-static int ipxcp_reqci __P((fsm *, u_char *, int *, int)); /* Rcv CI */
-static void ipxcp_up __P((fsm *)); /* We're UP */
-static void ipxcp_down __P((fsm *)); /* We're DOWN */
-static void ipxcp_script __P((fsm *, char *)); /* Run an up/down script */
-
-fsm ipxcp_fsm[NUM_PPP]; /* IPXCP fsm structure */
-
-static fsm_callbacks ipxcp_callbacks = { /* IPXCP callback routines */
- ipxcp_resetci, /* Reset our Configuration Information */
- ipxcp_cilen, /* Length of our Configuration Information */
- ipxcp_addci, /* Add our Configuration Information */
- ipxcp_ackci, /* ACK our Configuration Information */
- ipxcp_nakci, /* NAK our Configuration Information */
- ipxcp_rejci, /* Reject our Configuration Information */
- ipxcp_reqci, /* Request peer's Configuration Information */
- ipxcp_up, /* Called when fsm reaches OPENED state */
- ipxcp_down, /* Called when fsm leaves OPENED state */
- NULL, /* Called when we want the lower layer up */
- NULL, /* Called when we want the lower layer down */
- NULL, /* Called when Protocol-Reject received */
- NULL, /* Retransmission is necessary */
- NULL, /* Called to handle protocol-specific codes */
- "IPXCP" /* String name of protocol */
-};
-
-/*
- * Protocol entry points.
- */
-
-static void ipxcp_init __P((int));
-static void ipxcp_open __P((int));
-static void ipxcp_close __P((int, char *));
-static void ipxcp_lowerup __P((int));
-static void ipxcp_lowerdown __P((int));
-static void ipxcp_input __P((int, u_char *, int));
-static void ipxcp_protrej __P((int));
-static int ipxcp_printpkt __P((u_char *, int,
- void (*) __P((void *, char *, ...)), void *));
-
-struct protent ipxcp_protent = {
- PPP_IPXCP,
- ipxcp_init,
- ipxcp_input,
- ipxcp_protrej,
- ipxcp_lowerup,
- ipxcp_lowerdown,
- ipxcp_open,
- ipxcp_close,
- ipxcp_printpkt,
- NULL,
- 0,
- "IPXCP",
- NULL,
- NULL,
- NULL
-};
-
-/*
- * Lengths of configuration options.
- */
-
-#define CILEN_VOID 2
-#define CILEN_COMPLETE 2 /* length of complete option */
-#define CILEN_NETN 6 /* network number length option */
-#define CILEN_NODEN 8 /* node number length option */
-#define CILEN_PROTOCOL 4 /* Minimum length of routing protocol */
-#define CILEN_NAME 3 /* Minimum length of router name */
-#define CILEN_COMPRESS 4 /* Minimum length of compression protocol */
-
-#define CODENAME(x) ((x) == CONFACK ? "ACK" : \
- (x) == CONFNAK ? "NAK" : "REJ")
-
-/* Used in printing the node number */
-#define NODE(base) base[0], base[1], base[2], base[3], base[4], base[5]
-
-/* Used to generate the proper bit mask */
-#define BIT(num) (1 << (num))
-
-/*
- * Convert from internal to external notation
- */
-
-static short int
-to_external(internal)
-short int internal;
-{
- short int external;
-
- if (internal & IPX_NONE)
- external = IPX_NONE;
- else
- external = RIP_SAP;
-
- return external;
-}
-
-/*
- * Make a string representation of a network IP address.
- */
-
-char *
-ipx_ntoa(ipxaddr)
-u_int32_t ipxaddr;
-{
- static char b[64];
- sprintf(b, "%x", ipxaddr);
- return b;
-}
-
-
-/*
- * ipxcp_init - Initialize IPXCP.
- */
-static void
-ipxcp_init(unit)
- int unit;
-{
- fsm *f = &ipxcp_fsm[unit];
-
- f->unit = unit;
- f->protocol = PPP_IPXCP;
- f->callbacks = &ipxcp_callbacks;
- fsm_init(&ipxcp_fsm[unit]);
-
- memset (wo->name, 0, sizeof (wo->name));
- memset (wo->our_node, 0, sizeof (wo->our_node));
- memset (wo->his_node, 0, sizeof (wo->his_node));
-
- wo->neg_nn = 1;
- wo->neg_complete = 1;
- wo->network = 0;
-
- ao->neg_node = 1;
- ao->neg_nn = 1;
- ao->neg_name = 1;
- ao->neg_complete = 1;
- ao->neg_router = 1;
-
- ao->accept_local = 0;
- ao->accept_remote = 0;
- ao->accept_network = 0;
-
- wo->tried_rip = 0;
- wo->tried_nlsp = 0;
-}
-
-/*
- * Copy the node number
- */
-
-static void
-copy_node (src, dst)
-u_char *src, *dst;
-{
- memcpy (dst, src, sizeof (ipxcp_wantoptions[0].our_node));
-}
-
-/*
- * Compare node numbers
- */
-
-static int
-compare_node (src, dst)
-u_char *src, *dst;
-{
- return memcmp (dst, src, sizeof (ipxcp_wantoptions[0].our_node)) == 0;
-}
-
-/*
- * Is the node number zero?
- */
-
-static int
-zero_node (node)
-u_char *node;
-{
- int indx;
- for (indx = 0; indx < sizeof (ipxcp_wantoptions[0].our_node); ++indx)
- if (node [indx] != 0)
- return 0;
- return 1;
-}
-
-/*
- * Increment the node number
- */
-
-static void
-inc_node (node)
-u_char *node;
-{
- u_char *outp;
- u_int32_t magic_num;
-
- outp = node;
- magic_num = magic();
- *outp++ = '\0';
- *outp++ = '\0';
- PUTLONG (magic_num, outp);
-}
-
-/*
- * ipxcp_open - IPXCP is allowed to come up.
- */
-static void
-ipxcp_open(unit)
- int unit;
-{
- fsm_open(&ipxcp_fsm[unit]);
-}
-
-/*
- * ipxcp_close - Take IPXCP down.
- */
-static void
-ipxcp_close(unit, reason)
- int unit;
- char *reason;
-{
- fsm_close(&ipxcp_fsm[unit], reason);
-}
-
-
-/*
- * ipxcp_lowerup - The lower layer is up.
- */
-static void
-ipxcp_lowerup(unit)
- int unit;
-{
- fsm_lowerup(&ipxcp_fsm[unit]);
-}
-
-
-/*
- * ipxcp_lowerdown - The lower layer is down.
- */
-static void
-ipxcp_lowerdown(unit)
- int unit;
-{
- fsm_lowerdown(&ipxcp_fsm[unit]);
-}
-
-
-/*
- * ipxcp_input - Input IPXCP packet.
- */
-static void
-ipxcp_input(unit, p, len)
- int unit;
- u_char *p;
- int len;
-{
- fsm_input(&ipxcp_fsm[unit], p, len);
-}
-
-
-/*
- * ipxcp_protrej - A Protocol-Reject was received for IPXCP.
- *
- * Pretend the lower layer went down, so we shut up.
- */
-static void
-ipxcp_protrej(unit)
- int unit;
-{
- fsm_lowerdown(&ipxcp_fsm[unit]);
-}
-
-
-/*
- * ipxcp_resetci - Reset our CI.
- */
-static void
-ipxcp_resetci(f)
- fsm *f;
-{
- wo->req_node = wo->neg_node && ao->neg_node;
- wo->req_nn = wo->neg_nn && ao->neg_nn;
-
- if (wo->our_network == 0) {
- wo->neg_node = 1;
- ao->accept_network = 1;
- }
-/*
- * If our node number is zero then change it.
- */
- if (zero_node (wo->our_node)) {
- inc_node (wo->our_node);
- ao->accept_local = 1;
- wo->neg_node = 1;
- }
-/*
- * If his node number is zero then change it.
- */
- if (zero_node (wo->his_node)) {
- inc_node (wo->his_node);
- ao->accept_remote = 1;
- }
-/*
- * If no routing agent was specified then we do RIP/SAP according to the
- * RFC documents. If you have specified something then OK. Otherwise, we
- * do RIP/SAP.
- */
- if (ao->router == 0) {
- ao->router |= BIT(RIP_SAP);
- wo->router |= BIT(RIP_SAP);
- }
-
- /* Always specify a routing protocol unless it was REJected. */
- wo->neg_router = 1;
-/*
- * Start with these default values
- */
- *go = *wo;
-}
-
-/*
- * ipxcp_cilen - Return length of our CI.
- */
-
-static int
-ipxcp_cilen(f)
- fsm *f;
-{
- int len;
-
- len = go->neg_nn ? CILEN_NETN : 0;
- len += go->neg_node ? CILEN_NODEN : 0;
- len += go->neg_name ? CILEN_NAME + strlen (go->name) - 1 : 0;
-
- /* RFC says that defaults should not be included. */
- if (go->neg_router && to_external(go->router) != RIP_SAP)
- len += CILEN_PROTOCOL;
-
- return (len);
-}
-
-
-/*
- * ipxcp_addci - Add our desired CIs to a packet.
- */
-static void
-ipxcp_addci(f, ucp, lenp)
- fsm *f;
- u_char *ucp;
- int *lenp;
-{
-/*
- * Add the options to the record.
- */
- if (go->neg_nn) {
- PUTCHAR (IPX_NETWORK_NUMBER, ucp);
- PUTCHAR (CILEN_NETN, ucp);
- PUTLONG (go->our_network, ucp);
- }
-
- if (go->neg_node) {
- int indx;
- PUTCHAR (IPX_NODE_NUMBER, ucp);
- PUTCHAR (CILEN_NODEN, ucp);
- for (indx = 0; indx < sizeof (go->our_node); ++indx)
- PUTCHAR (go->our_node[indx], ucp);
- }
-
- if (go->neg_name) {
- int cilen = strlen (go->name);
- int indx;
- PUTCHAR (IPX_ROUTER_NAME, ucp);
- PUTCHAR (CILEN_NAME + cilen - 1, ucp);
- for (indx = 0; indx < cilen; ++indx)
- PUTCHAR (go->name [indx], ucp);
- }
-
- if (go->neg_router) {
- short external = to_external (go->router);
- if (external != RIP_SAP) {
- PUTCHAR (IPX_ROUTER_PROTOCOL, ucp);
- PUTCHAR (CILEN_PROTOCOL, ucp);
- PUTSHORT (external, ucp);
- }
- }
-}
-
-/*
- * ipxcp_ackci - Ack our CIs.
- *
- * Returns:
- * 0 - Ack was bad.
- * 1 - Ack was good.
- */
-static int
-ipxcp_ackci(f, p, len)
- fsm *f;
- u_char *p;
- int len;
-{
- u_short cilen, citype, cishort;
- u_char cichar;
- u_int32_t cilong;
-
-#define ACKCIVOID(opt, neg) \
- if (neg) { \
- if ((len -= CILEN_VOID) < 0) \
- break; \
- GETCHAR(citype, p); \
- GETCHAR(cilen, p); \
- if (cilen != CILEN_VOID || \
- citype != opt) \
- break; \
- }
-
-#define ACKCICOMPLETE(opt,neg) ACKCIVOID(opt, neg)
-
-#define ACKCICHARS(opt, neg, val, cnt) \
- if (neg) { \
- int indx, count = cnt; \
- len -= (count + 2); \
- if (len < 0) \
- break; \
- GETCHAR(citype, p); \
- GETCHAR(cilen, p); \
- if (cilen != (count + 2) || \
- citype != opt) \
- break; \
- for (indx = 0; indx < count; ++indx) {\
- GETCHAR(cichar, p); \
- if (cichar != ((u_char *) &val)[indx]) \
- break; \
- }\
- if (indx != count) \
- break; \
- }
-
-#define ACKCINODE(opt,neg,val) ACKCICHARS(opt,neg,val,sizeof(val))
-#define ACKCINAME(opt,neg,val) ACKCICHARS(opt,neg,val,strlen(val))
-
-#define ACKCINETWORK(opt, neg, val) \
- if (neg) { \
- if ((len -= CILEN_NETN) < 0) \
- break; \
- GETCHAR(citype, p); \
- GETCHAR(cilen, p); \
- if (cilen != CILEN_NETN || \
- citype != opt) \
- break; \
- GETLONG(cilong, p); \
- if (cilong != val) \
- break; \
- }
-
-#define ACKCIPROTO(opt, neg, val) \
- if (neg) { \
- if (len < 2) \
- break; \
- GETCHAR(citype, p); \
- GETCHAR(cilen, p); \
- if (cilen != CILEN_PROTOCOL || citype != opt) \
- break; \
- len -= cilen; \
- if (len < 0) \
- break; \
- GETSHORT(cishort, p); \
- if (cishort != to_external (val) || cishort == RIP_SAP) \
- break; \
- }
-/*
- * Process the ACK frame in the order in which the frame was assembled
- */
- do {
- ACKCINETWORK (IPX_NETWORK_NUMBER, go->neg_nn, go->our_network);
- ACKCINODE (IPX_NODE_NUMBER, go->neg_node, go->our_node);
- ACKCINAME (IPX_ROUTER_NAME, go->neg_name, go->name);
- ACKCIPROTO (IPX_ROUTER_PROTOCOL, go->neg_router, go->router);
- ACKCIPROTO (IPX_ROUTER_PROTOCOL, go->neg_router, go->router);
- ACKCIPROTO (IPX_ROUTER_PROTOCOL, go->neg_router, go->router);
-/*
- * This is the end of the record.
- */
- if (len == 0)
- return (1);
- } while (0);
-/*
- * The frame is invalid
- */
- IPXCPDEBUG((LOG_INFO, "ipxcp_ackci: received bad Ack!"));
- return (0);
-}
-
-/*
- * ipxcp_nakci - Peer has sent a NAK for some of our CIs.
- * This should not modify any state if the Nak is bad
- * or if IPXCP is in the OPENED state.
- *
- * Returns:
- * 0 - Nak was bad.
- * 1 - Nak was good.
- */
-
-static int
-ipxcp_nakci(f, p, len)
- fsm *f;
- u_char *p;
- int len;
-{
- u_char citype, cilen, *next;
- u_short s;
- u_int32_t l;
- ipxcp_options no; /* options we've seen Naks for */
- ipxcp_options try; /* options to request next time */
-
- BZERO(&no, sizeof(no));
- try = *go;
-
- while (len > CILEN_VOID) {
- GETCHAR (citype, p);
- GETCHAR (cilen, p);
- len -= cilen;
- if (len < 0)
- goto bad;
- next = &p [cilen - CILEN_VOID];
-
- switch (citype) {
- case IPX_NETWORK_NUMBER:
- if (!go->neg_nn || no.neg_nn || (cilen != CILEN_NETN))
- goto bad;
- no.neg_nn = 1;
-
- GETLONG(l, p);
- IPXCPDEBUG((LOG_INFO, "local IP address %d", l));
- if (l && ao->accept_network)
- try.our_network = l;
- break;
-
- case IPX_NODE_NUMBER:
- if (!go->neg_node || no.neg_node || (cilen != CILEN_NODEN))
- goto bad;
- no.neg_node = 1;
-
- IPXCPDEBUG((LOG_INFO,
- "local node number %02X%02X%02X%02X%02X%02X",
- NODE(p)));
-
- if (!zero_node (p) && ao->accept_local &&
- ! compare_node (p, ho->his_node))
- copy_node (p, try.our_node);
- break;
-
- /* This has never been sent. Ignore the NAK frame */
- case IPX_COMPRESSION_PROTOCOL:
- goto bad;
-
- case IPX_ROUTER_PROTOCOL:
- if (!go->neg_router || (cilen < CILEN_PROTOCOL))
- goto bad;
-
- GETSHORT (s, p);
- if (s > 15) /* This is just bad, but ignore for now. */
- break;
-
- s = BIT(s);
- if (no.router & s) /* duplicate NAKs are always bad */
- goto bad;
-
- if (no.router == 0) /* Reset on first NAK only */
- try.router = 0;
-
- no.router |= s;
- try.router |= s;
- try.neg_router = 1;
-
- IPXCPDEBUG((LOG_INFO, "Router protocol number %d", s));
- break;
-
- /* These, according to the RFC, must never be NAKed. */
- case IPX_ROUTER_NAME:
- case IPX_COMPLETE:
- goto bad;
-
- /* These are for options which we have not seen. */
- default:
- break;
- }
- p = next;
- }
-
- /* If there is still anything left, this packet is bad. */
- if (len != 0)
- goto bad;
-
- /*
- * Do not permit the peer to force a router protocol which we do not
- * support. However, default to the condition that will accept "NONE".
- */
- try.router &= (ao->router | BIT(IPX_NONE));
- if (try.router == 0 && ao->router != 0)
- try.router = BIT(IPX_NONE);
-
- if (try.router != 0)
- try.neg_router = 1;
-
- /*
- * OK, the Nak is good. Now we can update state.
- */
- if (f->state != OPENED)
- *go = try;
-
- return 1;
-
-bad:
- IPXCPDEBUG((LOG_INFO, "ipxcp_nakci: received bad Nak!"));
- return 0;
-}
-
-/*
- * ipxcp_rejci - Reject some of our CIs.
- */
-static int
-ipxcp_rejci(f, p, len)
- fsm *f;
- u_char *p;
- int len;
-{
- u_short cilen, citype, cishort;
- u_char cichar;
- u_int32_t cilong;
- ipxcp_options try; /* options to request next time */
-
-#define REJCINETWORK(opt, neg, val) \
- if (neg && p[0] == opt) { \
- if ((len -= CILEN_NETN) < 0) \
- break; \
- GETCHAR(citype, p); \
- GETCHAR(cilen, p); \
- if (cilen != CILEN_NETN || \
- citype != opt) \
- break; \
- GETLONG(cilong, p); \
- if (cilong != val) \
- break; \
- IPXCPDEBUG((LOG_INFO,"ipxcp_rejci rejected long opt %d", opt)); \
- neg = 0; \
- }
-
-#define REJCICHARS(opt, neg, val, cnt) \
- if (neg && p[0] == opt) { \
- int indx, count = cnt; \
- len -= (count + 2); \
- if (len < 0) \
- break; \
- GETCHAR(citype, p); \
- GETCHAR(cilen, p); \
- if (cilen != (count + 2) || \
- citype != opt) \
- break; \
- for (indx = 0; indx < count; ++indx) {\
- GETCHAR(cichar, p); \
- if (cichar != ((u_char *) &val)[indx]) \
- break; \
- }\
- if (indx != count) \
- break; \
- IPXCPDEBUG((LOG_INFO,"ipxcp_rejci rejected opt %d", opt)); \
- neg = 0; \
- }
-
-#define REJCINODE(opt,neg,val) REJCICHARS(opt,neg,val,sizeof(val))
-#define REJCINAME(opt,neg,val) REJCICHARS(opt,neg,val,strlen(val))
-
-#define REJCIVOID(gpt, neg! \
- if (neg && p[0] == opt) { \
- if ((len -= CILEN_VOID) < 0) \
- break; \
- GETCHAR(citype, p); \
- GETCHAR(cilen, p); \
- if (cilen != CILEN_VOID || citype != opt) \
- break; \
- IPXCPDEBUG((LOG_INFO, "ipxcp_rejci rejected void opt %d", opt)); \
- neg = 0; \
- }
-
-/* a reject for RIP/SAP is invalid since we don't send it and you can't
- reject something which is not sent. (You can NAK, but you can't REJ.) */
-#define REJCIPROTO(opt, neg, val, bit) \
- if (neg && p[0] == opt) { \
- if ((len -= CILEN_PROTOCOL) < 0) \
- break; \
- GETCHAR(citype, p); \
- GETCHAR(cilen, p); \
- if (cilen != CILEN_PROTOCOL) \
- break; \
- GETSHORT(cishort, p); \
- if (cishort != to_external (val) || cishort == RIP_SAP) \
- break; \
- IPXCPDEBUG((LOG_INFO, "ipxcp_rejci short opt %d", opt)); \
- neg = 0; \
- }
-/*
- * Any Rejected CIs must be in exactly the same order that we sent.
- * Check packet length and CI length at each step.
- * If we find any deviations, then this packet is bad.
- */
- try = *go;
-
- do {
- REJCINETWORK (IPX_NETWORK_NUMBER, try.neg_nn, try.our_network);
- REJCINODE (IPX_NODE_NUMBER, try.neg_node, try.our_node);
- REJCINAME (IPX_ROUTER_NAME, try.neg_name, try.name);
- REJCIPROTO (IPX_ROUTER_PROTOCOL, try.neg_router, try.router, 0);
-/*
- * This is the end of the record.
- */
- if (len == 0) {
- if (f->state != OPENED)
- *go = try;
- return (1);
- }
- } while (0);
-/*
- * The frame is invalid at this point.
- */
- IPXCPDEBUG((LOG_INFO, "ipxcp_rejci: received bad Reject!"));
- return 0;
-}
-
-/*
- * ipxcp_reqci - Check the peer's requested CIs and send appropriate response.
- *
- * Returns: CONFACK, CONFNAK or CONFREJ and input packet modified
- * appropriately. If reject_if_disagree is non-zero, doesn't return
- * CONFNAK; returns CONFREJ if it can't return CONFACK.
- */
-static int
-ipxcp_reqci(f, inp, len, reject_if_disagree)
- fsm *f;
- u_char *inp; /* Requested CIs */
- int *len; /* Length of requested CIs */
- int reject_if_disagree;
-{
- u_char *cip, *next; /* Pointer to current and next CIs */
- u_short cilen, citype; /* Parsed len, type */
- u_short cishort; /* Parsed short value */
- u_int32_t cinetwork; /* Parsed address values */
- int rc = CONFACK; /* Final packet return code */
- int orc; /* Individual option return code */
- u_char *p; /* Pointer to next char to parse */
- u_char *ucp = inp; /* Pointer to current output char */
- int l = *len; /* Length left */
-
- /*
- * Reset all his options.
- */
- BZERO(ho, sizeof(*ho));
-
- /*
- * Process all his options.
- */
- next = inp;
- while (l) {
- orc = CONFACK; /* Assume success */
- cip = p = next; /* Remember begining of CI */
- if (l < 2 || /* Not enough data for CI header or */
- p[1] < 2 || /* CI length too small or */
- p[1] > l) { /* CI length too big? */
- IPXCPDEBUG((LOG_INFO, "ipxcp_reqci: bad CI length!"));
- orc = CONFREJ; /* Reject bad CI */
- cilen = l; /* Reject till end of packet */
- l = 0; /* Don't loop again */
- goto endswitch;
- }
- GETCHAR(citype, p); /* Parse CI type */
- GETCHAR(cilen, p); /* Parse CI length */
- l -= cilen; /* Adjust remaining length */
- next += cilen; /* Step to next CI */
-
- switch (citype) { /* Check CI type */
-/*
- * The network number must match. Choose the larger of the two.
- */
- case IPX_NETWORK_NUMBER:
- IPXCPDEBUG((LOG_INFO, "ipxcp: received Network Number request"));
-
- /* if we wont negotiate the network number or the length is wrong
- then reject the option */
- if ( !ao->neg_nn || cilen != CILEN_NETN ) {
- orc = CONFREJ;
- break;
- }
- GETLONG(cinetwork, p);
- IPXCPDEBUG((LOG_INFO,"Remote proposed IPX network number is %8Lx",tl));
-
- /* If the network numbers match then acknowledge them. */
- if (cinetwork != 0) {
- ho->his_network = cinetwork;
- ho->neg_nn = 1;
- if (wo->our_network == cinetwork)
- break;
-/*
- * If the network number is not given or we don't accept their change or
- * the network number is too small then NAK it.
- */
- if (! ao->accept_network || cinetwork < wo->our_network) {
- DECPTR (sizeof (u_int32_t), p);
- PUTLONG (wo->our_network, p);
- orc = CONFNAK;
- }
- break;
- }
-/*
- * The peer sent '0' for the network. Give it ours if we have one.
- */
- if (go->our_network != 0) {
- DECPTR (sizeof (u_int32_t), p);
- PUTLONG (wo->our_network, p);
- orc = CONFNAK;
-/*
- * We don't have one. Reject the value.
- */
- } else
- orc = CONFREJ;
-
- break;
-/*
- * The node number is required
- */
- case IPX_NODE_NUMBER:
- IPXCPDEBUG((LOG_INFO, "ipxcp: received Node Number request"));
-
- /* if we wont negotiate the node number or the length is wrong
- then reject the option */
- if ( cilen != CILEN_NODEN ) {
- orc = CONFREJ;
- break;
- }
-
- copy_node (p, ho->his_node);
- ho->neg_node = 1;
-/*
- * If the remote does not have a number and we do then NAK it with the value
- * which we have for it. (We never have a default value of zero.)
- */
- if (zero_node (ho->his_node)) {
- orc = CONFNAK;
- copy_node (wo->his_node, p);
- INCPTR (sizeof (wo->his_node), p);
- break;
- }
-/*
- * If you have given me the expected network node number then I'll accept
- * it now.
- */
- if (compare_node (wo->his_node, ho->his_node)) {
- orc = CONFACK;
- ho->neg_node = 1;
- INCPTR (sizeof (wo->his_node), p);
- break;
- }
-/*
- * If his node number is the same as ours then ask him to try the next
- * value.
- */
- if (compare_node (ho->his_node, go->our_node)) {
- inc_node (ho->his_node);
- orc = CONFNAK;
- copy_node (ho->his_node, p);
- INCPTR (sizeof (wo->his_node), p);
- break;
- }
-/*
- * If we don't accept a new value then NAK it.
- */
- if (! ao->accept_remote) {
- copy_node (wo->his_node, p);
- INCPTR (sizeof (wo->his_node), p);
- orc = CONFNAK;
- break;
- }
- orc = CONFACK;
- ho->neg_node = 1;
- INCPTR (sizeof (wo->his_node), p);
- break;
-/*
- * Compression is not desired at this time. It is always rejected.
- */
- case IPX_COMPRESSION_PROTOCOL:
- IPXCPDEBUG((LOG_INFO, "ipxcp: received Compression Protocol request "));
- orc = CONFREJ;
- break;
-/*
- * The routing protocol is a bitmask of various types. Any combination
- * of the values RIP_SAP and NLSP are permissible. 'IPX_NONE' for no
- * routing protocol must be specified only once.
- */
- case IPX_ROUTER_PROTOCOL:
- if ( !ao->neg_router || cilen < CILEN_PROTOCOL ) {
- orc = CONFREJ;
- break;
- }
-
- GETSHORT (cishort, p);
- IPXCPDEBUG((LOG_INFO,
- "Remote router protocol number 0x%04x",
- cishort));
-
- if (wo->neg_router == 0) {
- wo->neg_router = 1;
- wo->router = BIT(IPX_NONE);
- }
-
- if ((cishort == IPX_NONE && ho->router != 0) ||
- (ho->router & BIT(IPX_NONE))) {
- orc = CONFREJ;
- break;
- }
-
- cishort = BIT(cishort);
- if (ho->router & cishort) {
- orc = CONFREJ;
- break;
- }
-
- ho->router |= cishort;
- ho->neg_router = 1;
-
- /* Finally do not allow a router protocol which we do not
- support. */
-
- if ((cishort & (ao->router | BIT(IPX_NONE))) == 0) {
- int protocol;
-
- if (cishort == BIT(NLSP) &&
- (ao->router & BIT(RIP_SAP)) &&
- !wo->tried_rip) {
- protocol = RIP_SAP;
- wo->tried_rip = 1;
- } else
- protocol = IPX_NONE;
-
- DECPTR (sizeof (u_int16_t), p);
- PUTSHORT (protocol, p);
- orc = CONFNAK;
- }
- break;
-/*
- * The router name is advisorary. Just accept it if it is not too large.
- */
- case IPX_ROUTER_NAME:
- IPXCPDEBUG((LOG_INFO, "ipxcp: received Router Name request"));
- if (cilen >= CILEN_NAME) {
- int name_size = cilen - CILEN_NAME;
- if (name_size > sizeof (ho->name))
- name_size = sizeof (ho->name) - 1;
- memset (ho->name, 0, sizeof (ho->name));
- memcpy (ho->name, p, name_size);
- ho->name [name_size] = '\0';
- ho->neg_name = 1;
- orc = CONFACK;
- break;
- }
- orc = CONFREJ;
- break;
-/*
- * This is advisorary.
- */
- case IPX_COMPLETE:
- IPXCPDEBUG((LOG_INFO, "ipxcp: received Complete request"));
- if (cilen != CILEN_COMPLETE)
- orc = CONFREJ;
- else {
- ho->neg_complete = 1;
- orc = CONFACK;
- }
- break;
-/*
- * All other entries are not known at this time.
- */
- default:
- IPXCPDEBUG((LOG_INFO, "ipxcp: received Complete request"));
- orc = CONFREJ;
- break;
- }
-
-endswitch:
- IPXCPDEBUG((LOG_INFO, " (%s)\n", CODENAME(orc)));
-
- if (orc == CONFACK && /* Good CI */
- rc != CONFACK) /* but prior CI wasnt? */
- continue; /* Don't send this one */
-
- if (orc == CONFNAK) { /* Nak this CI? */
- if (reject_if_disagree) /* Getting fed up with sending NAKs? */
- orc = CONFREJ; /* Get tough if so */
- if (rc == CONFREJ) /* Rejecting prior CI? */
- continue; /* Don't send this one */
- if (rc == CONFACK) { /* Ack'd all prior CIs? */
- rc = CONFNAK; /* Not anymore... */
- ucp = inp; /* Backup */
- }
- }
-
- if (orc == CONFREJ && /* Reject this CI */
- rc != CONFREJ) { /* but no prior ones? */
- rc = CONFREJ;
- ucp = inp; /* Backup */
- }
-
- /* Need to move CI? */
- if (ucp != cip)
- BCOPY(cip, ucp, cilen); /* Move it */
-
- /* Update output pointer */
- INCPTR(cilen, ucp);
- }
-
- /*
- * If we aren't rejecting this packet, and we want to negotiate
- * their address, and they didn't send their address, then we
- * send a NAK with a IPX_NODE_NUMBER option appended. We assume the
- * input buffer is long enough that we can append the extra
- * option safely.
- */
-
- if (rc != CONFREJ && !ho->neg_node &&
- wo->req_nn && !reject_if_disagree) {
- if (rc == CONFACK) {
- rc = CONFNAK;
- wo->req_nn = 0; /* don't ask again */
- ucp = inp; /* reset pointer */
- }
-
- if (zero_node (wo->his_node))
- inc_node (wo->his_node);
-
- PUTCHAR (IPX_NODE_NUMBER, ucp);
- PUTCHAR (CILEN_NODEN, ucp);
- copy_node (wo->his_node, ucp);
- INCPTR (sizeof (wo->his_node), ucp);
- }
-
- *len = ucp - inp; /* Compute output length */
- IPXCPDEBUG((LOG_INFO, "ipxcp: returning Configure-%s", CODENAME(rc)));
- return (rc); /* Return final code */
-}
-
-/*
- * ipxcp_up - IPXCP has come UP.
- *
- * Configure the IP network interface appropriately and bring it up.
- */
-
-static void
-ipxcp_up(f)
- fsm *f;
-{
- int unit = f->unit;
-
- IPXCPDEBUG((LOG_INFO, "ipxcp: up"));
-
- /* The default router protocol is RIP/SAP. */
- if (ho->router == 0)
- ho->router = BIT(RIP_SAP);
-
- if (go->router == 0)
- go->router = BIT(RIP_SAP);
-
- /* Fetch the network number */
- if (!ho->neg_nn)
- ho->his_network = wo->his_network;
-
- if (!ho->neg_node)
- copy_node (wo->his_node, ho->his_node);
-
- if (!wo->neg_node && !go->neg_node)
- copy_node (wo->our_node, go->our_node);
-
- if (zero_node (go->our_node)) {
- static char errmsg[] = "Could not determine local IPX node address";
- IPXCPDEBUG((LOG_ERR, errmsg));
- ipxcp_close(f->unit, errmsg);
- return;
- }
-
- go->network = go->our_network;
- if (ho->his_network != 0 && ho->his_network > go->network)
- go->network = ho->his_network;
-
- if (go->network == 0) {
- static char errmsg[] = "Can not determine network number";
- IPXCPDEBUG((LOG_ERR, errmsg));
- ipxcp_close (unit, errmsg);
- return;
- }
-
- /* bring the interface up */
- if (!sifup(unit)) {
- IPXCPDEBUG((LOG_WARNING, "sifup failed"));
- ipxcp_close(unit, "Interface configuration failed");
- return;
- }
-
- /* set the network number for IPX */
- if (!sipxfaddr(unit, go->network, go->our_node)) {
- IPXCPDEBUG((LOG_WARNING, "sipxfaddr failed"));
- ipxcp_close(unit, "Interface configuration failed");
- return;
- }
-
- /*
- * Execute the ipx-up script, like this:
- * /etc/ppp/ipx-up interface tty speed local-IPX remote-IPX
- */
-
- ipxcp_script (f, _PATH_IPXUP);
-}
-
-/*
- * ipxcp_down - IPXCP has gone DOWN.
- *
- * Take the IP network interface down, clear its addresses
- * and delete routes through it.
- */
-
-static void
-ipxcp_down(f)
- fsm *f;
-{
- IPXCPDEBUG((LOG_INFO, "ipxcp: down"));
-
- cipxfaddr (f->unit);
- sifdown(f->unit);
- ipxcp_script (f, _PATH_IPXDOWN);
-}
-
-
-/*
- * ipxcp_script - Execute a script with arguments
- * interface-name tty-name speed local-IPX remote-IPX networks.
- */
-static void
-ipxcp_script(f, script)
- fsm *f;
- char *script;
-{
- char strspeed[32], strlocal[32], strremote[32];
- char strnetwork[32], strpid[32];
- char *argv[14], strproto_lcl[32], strproto_rmt[32];
-
- sprintf (strpid, "%d", getpid());
- sprintf (strspeed, "%d", baud_rate);
-
- strproto_lcl[0] = '\0';
- if (go->neg_router && ((go->router & BIT(IPX_NONE)) == 0)) {
- if (go->router & BIT(RIP_SAP))
- strcpy (strproto_lcl, "RIP ");
- if (go->router & BIT(NLSP))
- strcat (strproto_lcl, "NLSP ");
- }
-
- if (strproto_lcl[0] == '\0')
- strcpy (strproto_lcl, "NONE ");
-
- strproto_lcl[strlen (strproto_lcl)-1] = '\0';
-
- strproto_rmt[0] = '\0';
- if (ho->neg_router && ((ho->router & BIT(IPX_NONE)) == 0)) {
- if (ho->router & BIT(RIP_SAP))
- strcpy (strproto_rmt, "RIP ");
- if (ho->router & BIT(NLSP))
- strcat (strproto_rmt, "NLSP ");
- }
-
- if (strproto_rmt[0] == '\0')
- strcpy (strproto_rmt, "NONE ");
-
- strproto_rmt[strlen (strproto_rmt)-1] = '\0';
-
- strcpy (strnetwork, ipx_ntoa (go->network));
-
- sprintf (strlocal,
- "%02X%02X%02X%02X%02X%02X",
- NODE(go->our_node));
-
- sprintf (strremote,
- "%02X%02X%02X%02X%02X%02X",
- NODE(ho->his_node));
-
- argv[0] = script;
- argv[1] = ifname;
- argv[2] = devnam;
- argv[3] = strspeed;
- argv[4] = strnetwork;
- argv[5] = strlocal;
- argv[6] = strremote;
- argv[7] = strproto_lcl;
- argv[8] = strproto_rmt;
- argv[9] = go->name;
- argv[10] = ho->name;
- argv[11] = ipparam;
- argv[12] = strpid;
- argv[13] = NULL;
- run_program(script, argv, 0);
-}
-
-/*
- * ipxcp_printpkt - print the contents of an IPXCP packet.
- */
-static char *ipxcp_codenames[] = {
- "ConfReq", "ConfAck", "ConfNak", "ConfRej",
- "TermReq", "TermAck", "CodeRej"
-};
-
-static int
-ipxcp_printpkt(p, plen, printer, arg)
- u_char *p;
- int plen;
- void (*printer) __P((void *, char *, ...));
- void *arg;
-{
- int code, id, len, olen;
- u_char *pstart, *optend;
- u_short cishort;
- u_int32_t cilong;
-
- if (plen < HEADERLEN)
- return 0;
- pstart = p;
- GETCHAR(code, p);
- GETCHAR(id, p);
- GETSHORT(len, p);
- if (len < HEADERLEN || len > plen)
- return 0;
-
- if (code >= 1 && code <= sizeof(ipxcp_codenames) / sizeof(char *))
- printer(arg, " %s", ipxcp_codenames[code-1]);
- else
- printer(arg, " code=0x%x", code);
- printer(arg, " id=0x%x", id);
- len -= HEADERLEN;
- switch (code) {
- case CONFREQ:
- case CONFACK:
- case CONFNAK:
- case CONFREJ:
- /* print option list */
- while (len >= 2) {
- GETCHAR(code, p);
- GETCHAR(olen, p);
- p -= 2;
- if (olen < CILEN_VOID || olen > len) {
- break;
- }
- printer(arg, " <");
- len -= olen;
- optend = p + olen;
- switch (code) {
- case IPX_NETWORK_NUMBER:
- if (olen == CILEN_NETN) {
- p += 2;
- GETLONG(cilong, p);
- printer (arg, "network %s", ipx_ntoa (cilong));
- }
- break;
- case IPX_NODE_NUMBER:
- if (olen == CILEN_NODEN) {
- p += 2;
- printer (arg, "node ");
- while (p < optend) {
- GETCHAR(code, p);
- printer(arg, "%.2x", (int) (unsigned int) (unsigned char) code);
- }
- }
- break;
- case IPX_COMPRESSION_PROTOCOL:
- if (olen == CILEN_COMPRESS) {
- p += 2;
- GETSHORT (cishort, p);
- printer (arg, "compression %d", (int) cishort);
- }
- break;
- case IPX_ROUTER_PROTOCOL:
- if (olen == CILEN_PROTOCOL) {
- p += 2;
- GETSHORT (cishort, p);
- printer (arg, "router proto %d", (int) cishort);
- }
- break;
- case IPX_ROUTER_NAME:
- if (olen >= CILEN_NAME) {
- p += 2;
- printer (arg, "router name \"");
- while (p < optend) {
- GETCHAR(code, p);
- if (code >= 0x20 && code <= 0x7E)
- printer (arg, "%c", (int) (unsigned int) (unsigned char) code);
- else
- printer (arg, " \\%.2x", (int) (unsigned int) (unsigned char) code);
- }
- printer (arg, "\"");
- }
- break;
- case IPX_COMPLETE:
- if (olen == CILEN_COMPLETE) {
- p += 2;
- printer (arg, "complete");
- }
- break;
- default:
- break;
- }
-
- while (p < optend) {
- GETCHAR(code, p);
- printer(arg, " %.2x", (int) (unsigned int) (unsigned char) code);
- }
- printer(arg, ">");
- }
- break;
-
- case TERMACK:
- case TERMREQ:
- if (len > 0 && *p >= ' ' && *p < 0x7f) {
- printer(arg, " ");
- print_string(p, len, printer, arg);
- p += len;
- len = 0;
- }
- break;
- }
-
- /* print the rest of the bytes in the packet */
- for (; len > 0; --len) {
- GETCHAR(code, p);
- printer(arg, " %.2x", (int) (unsigned int) (unsigned char) code);
- }
-
- return p - pstart;
-}
-#endif /* ifdef IPX_CHANGE */
diff --git a/cpukit/pppd/ipxcp.h b/cpukit/pppd/ipxcp.h
deleted file mode 100644
index 139a7260b3..0000000000
--- a/cpukit/pppd/ipxcp.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * ipxcp.h - IPX Control Protocol definitions.
- *
- * Copyright (c) 1989 Carnegie Mellon University.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by Carnegie Mellon University. The name of the
- * University may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Id$
- */
-
-/*
- * Options.
- */
-#define IPX_NETWORK_NUMBER 1 /* IPX Network Number */
-#define IPX_NODE_NUMBER 2
-#define IPX_COMPRESSION_PROTOCOL 3
-#define IPX_ROUTER_PROTOCOL 4
-#define IPX_ROUTER_NAME 5
-#define IPX_COMPLETE 6
-
-/* Values for the router protocol */
-#define IPX_NONE 0
-#define RIP_SAP 2
-#define NLSP 4
-
-typedef struct ipxcp_options {
- int neg_node : 1; /* Negotiate IPX node number? */
- int req_node : 1; /* Ask peer to send IPX node number? */
-
- int neg_nn : 1; /* Negotiate IPX network number? */
- int req_nn : 1; /* Ask peer to send IPX network number */
-
- int neg_name : 1; /* Negotiate IPX router name */
- int neg_complete : 1; /* Negotiate completion */
- int neg_router : 1; /* Negotiate IPX router number */
-
- int accept_local : 1; /* accept peer's value for ournode */
- int accept_remote : 1; /* accept peer's value for hisnode */
- int accept_network : 1; /* accept network number */
-
- int tried_nlsp : 1; /* I have suggested NLSP already */
- int tried_rip : 1; /* I have suggested RIP/SAP already */
-
- u_int32_t his_network; /* base network number */
- u_int32_t our_network; /* our value for network number */
- u_int32_t network; /* the final network number */
-
- u_char his_node[6]; /* peer's node number */
- u_char our_node[6]; /* our node number */
- u_char name [48]; /* name of the router */
- int router; /* routing protocol */
-} ipxcp_options;
-
-extern fsm ipxcp_fsm[];
-extern ipxcp_options ipxcp_wantoptions[];
-extern ipxcp_options ipxcp_gotoptions[];
-extern ipxcp_options ipxcp_allowoptions[];
-extern ipxcp_options ipxcp_hisoptions[];
-
-extern struct protent ipxcp_protent;
diff --git a/cpukit/pppd/lcp.c b/cpukit/pppd/lcp.c
deleted file mode 100644
index e58b3dcba2..0000000000
--- a/cpukit/pppd/lcp.c
+++ /dev/null
@@ -1,1858 +0,0 @@
-/*
- * lcp.c - PPP Link Control Protocol.
- *
- * Copyright (c) 1989 Carnegie Mellon University.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by Carnegie Mellon University. The name of the
- * University may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#ifndef lint
-/* static char rcsid[] = "$Id$"; */
-#endif
-
-/*
- * TODO:
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <syslog.h>
-#include <assert.h>
-#include <sys/ioctl.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/time.h>
-#include <netinet/in.h>
-
-#include "pppd.h"
-#include "fsm.h"
-#include "lcp.h"
-#include "chap.h"
-#include "magic.h"
-
-/* global vars */
-fsm lcp_fsm[NUM_PPP]; /* LCP fsm structure (global)*/
-lcp_options lcp_wantoptions[NUM_PPP]; /* Options that we want to request */
-lcp_options lcp_gotoptions[NUM_PPP]; /* Options that peer ack'd */
-lcp_options lcp_allowoptions[NUM_PPP]; /* Options we allow peer to request */
-lcp_options lcp_hisoptions[NUM_PPP]; /* Options that we ack'd */
-u_int32_t xmit_accm[NUM_PPP][8]; /* extended transmit ACCM */
-
-static u_int32_t lcp_echos_pending = 0; /* Number of outstanding echo msgs */
-static u_int32_t lcp_echo_number = 0; /* ID number of next echo frame */
-static u_int32_t lcp_echo_timer_running = 0; /* TRUE if a timer is running */
-
-static u_char nak_buffer[PPP_MRU]; /* where we construct a nak packet */
-
-/*
- * Callbacks for fsm code. (CI = Configuration Information)
- */
-static void lcp_resetci __P((fsm *)); /* Reset our CI */
-static int lcp_cilen __P((fsm *)); /* Return length of our CI */
-static void lcp_addci __P((fsm *, u_char *, int *)); /* Add our CI to pkt */
-static int lcp_ackci __P((fsm *, u_char *, int)); /* Peer ack'd our CI */
-static int lcp_nakci __P((fsm *, u_char *, int)); /* Peer nak'd our CI */
-static int lcp_rejci __P((fsm *, u_char *, int)); /* Peer rej'd our CI */
-static int lcp_reqci __P((fsm *, u_char *, int *, int)); /* Rcv peer CI */
-static void lcp_up __P((fsm *)); /* We're UP */
-static void lcp_down __P((fsm *)); /* We're DOWN */
-static void lcp_starting __P((fsm *)); /* We need lower layer up */
-static void lcp_finished __P((fsm *)); /* We need lower layer down */
-static int lcp_extcode __P((fsm *, int, int, u_char *, int));
-static void lcp_rprotrej __P((fsm *, u_char *, int));
-
-/*
- * routines to send LCP echos to peer
- */
-
-static void lcp_echo_lowerup __P((int));
-static void lcp_echo_lowerdown __P((int));
-static void LcpEchoTimeout __P((void *));
-static void lcp_received_echo_reply __P((fsm *, int, u_char *, int));
-static void LcpSendEchoRequest __P((fsm *));
-static void LcpLinkFailure __P((fsm *));
-static void LcpEchoCheck __P((fsm *));
-
-static fsm_callbacks lcp_callbacks = { /* LCP callback routines */
- lcp_resetci, /* Reset our Configuration Information */
- lcp_cilen, /* Length of our Configuration Information */
- lcp_addci, /* Add our Configuration Information */
- lcp_ackci, /* ACK our Configuration Information */
- lcp_nakci, /* NAK our Configuration Information */
- lcp_rejci, /* Reject our Configuration Information */
- lcp_reqci, /* Request peer's Configuration Information */
- lcp_up, /* Called when fsm reaches OPENED state */
- lcp_down, /* Called when fsm leaves OPENED state */
- lcp_starting, /* Called when we want the lower layer up */
- lcp_finished, /* Called when we want the lower layer down */
- NULL, /* Called when Protocol-Reject received */
- NULL, /* Retransmission is necessary */
- lcp_extcode, /* Called to handle LCP-specific codes */
- "LCP" /* String name of protocol */
-};
-
-/*
- * Protocol entry points.
- * Some of these are called directly.
- */
-
-static void lcp_init __P((int));
-static void lcp_input __P((int, u_char *, int));
-static void lcp_protrej __P((int));
-static int lcp_printpkt __P((u_char *, int,
- void (*) __P((void *, char *, ...)), void *));
-
-struct protent lcp_protent = {
- PPP_LCP,
- lcp_init,
- lcp_input,
- lcp_protrej,
- lcp_lowerup,
- lcp_lowerdown,
- lcp_open,
- lcp_close,
- lcp_printpkt,
- NULL,
- 1,
- "LCP",
- NULL,
- NULL,
- NULL
-};
-
-int lcp_loopbackfail = DEFLOOPBACKFAIL;
-
-/*
- * Length of each type of configuration option (in octets)
- */
-#define CILEN_VOID 2
-#define CILEN_CHAR 3
-#define CILEN_SHORT 4 /* CILEN_VOID + sizeof(short) */
-#define CILEN_CHAP 5 /* CILEN_VOID + sizeof(short) + 1 */
-#define CILEN_LONG 6 /* CILEN_VOID + sizeof(long) */
-#define CILEN_LQR 8 /* CILEN_VOID + sizeof(short) + sizeof(long) */
-#define CILEN_CBCP 3
-
-#define CODENAME(x) ((x) == CONFACK ? "ACK" : \
- (x) == CONFNAK ? "NAK" : "REJ")
-
-
-/*
- * lcp_init - Initialize LCP.
- */
-static void
-lcp_init(unit)
- int unit;
-{
- fsm *f = &lcp_fsm[unit];
- lcp_options *wo = &lcp_wantoptions[unit];
- lcp_options *ao = &lcp_allowoptions[unit];
-
- f->unit = unit;
- f->protocol = PPP_LCP;
- f->callbacks = &lcp_callbacks;
-
- fsm_init(f);
-
- wo->passive = 0;
- wo->silent = 0;
- wo->restart = 0; /* Set to 1 in kernels or multi-line
- implementations */
- wo->neg_mru = 1;
- wo->mru = DEFMRU;
- wo->neg_asyncmap = 0;
- wo->asyncmap = 0;
- wo->neg_chap = 0; /* Set to 1 on server */
- wo->neg_upap = 0; /* Set to 1 on server */
- wo->chap_mdtype = CHAP_DIGEST_MD5;
- wo->neg_magicnumber = 1;
- wo->neg_pcompression = 1;
- wo->neg_accompression = 1;
- wo->neg_lqr = 0; /* no LQR implementation yet */
- wo->neg_cbcp = 0;
-
- ao->neg_mru = 1;
- ao->mru = MAXMRU;
- ao->neg_asyncmap = 1;
- ao->asyncmap = 0;
- ao->neg_chap = 1;
- ao->chap_mdtype = CHAP_DIGEST_MD5;
- ao->neg_upap = 1;
- ao->neg_magicnumber = 1;
- ao->neg_pcompression = 1;
- ao->neg_accompression = 1;
- ao->neg_lqr = 0; /* no LQR implementation yet */
-#ifdef CBCP_SUPPORT
- ao->neg_cbcp = 1;
-#else
- ao->neg_cbcp = 0;
-#endif
-
- memset(xmit_accm[unit], 0, sizeof(xmit_accm[0]));
- xmit_accm[unit][3] = 0x60000000;
-}
-
-
-/*
- * lcp_open - LCP is allowed to come up.
- */
-void
-lcp_open(unit)
- int unit;
-{
- fsm *f = &lcp_fsm[unit];
- lcp_options *wo = &lcp_wantoptions[unit];
-
- f->flags = 0;
- if (wo->passive)
- f->flags |= OPT_PASSIVE;
- if (wo->silent)
- f->flags |= OPT_SILENT;
- fsm_open(f);
-}
-
-
-/*
- * lcp_close - Take LCP down.
- */
-void
-lcp_close(unit, reason)
- int unit;
- char *reason;
-{
- fsm *f = &lcp_fsm[unit];
-
- if (phase != PHASE_DEAD)
- phase = PHASE_TERMINATE;
- if (f->state == STOPPED && f->flags & (OPT_PASSIVE|OPT_SILENT)) {
- /*
- * This action is not strictly according to the FSM in RFC1548,
- * but it does mean that the program terminates if you do a
- * lcp_close() in passive/silent mode when a connection hasn't
- * been established.
- */
- f->state = CLOSED;
- lcp_finished(f);
-
- } else
- fsm_close(&lcp_fsm[unit], reason);
-}
-
-
-/*
- * lcp_lowerup - The lower layer is up.
- */
-void
-lcp_lowerup(unit)
- int unit;
-{
- lcp_options *wo = &lcp_wantoptions[unit];
-
- /*
- * Don't use A/C or protocol compression on transmission,
- * but accept A/C and protocol compressed packets
- * if we are going to ask for A/C and protocol compression.
- */
- ppp_set_xaccm(unit, xmit_accm[unit]);
- ppp_send_config(unit, PPP_MRU, 0xffffffff, 0, 0);
- ppp_recv_config(unit, PPP_MRU, 0xffffffff,
- wo->neg_pcompression, wo->neg_accompression);
- peer_mru[unit] = PPP_MRU;
- lcp_allowoptions[unit].asyncmap = xmit_accm[unit][0];
-
- fsm_lowerup(&lcp_fsm[unit]);
-}
-
-
-/*
- * lcp_lowerdown - The lower layer is down.
- */
-void
-lcp_lowerdown(unit)
- int unit;
-{
- fsm_lowerdown(&lcp_fsm[unit]);
-}
-
-
-/*
- * lcp_input - Input LCP packet.
- */
-static void
-lcp_input(unit, p, len)
- int unit;
- u_char *p;
- int len;
-{
- fsm *f = &lcp_fsm[unit];
-
- fsm_input(f, p, len);
-}
-
-
-/*
- * lcp_extcode - Handle a LCP-specific code.
- */
-static int
-lcp_extcode(f, code, id, inp, len)
- fsm *f;
- int code, id;
- u_char *inp;
- int len;
-{
- u_char *magp;
-
- switch( code ){
- case PROTREJ:
- lcp_rprotrej(f, inp, len);
- break;
-
- case ECHOREQ:
- if (f->state != OPENED)
- break;
- LCPDEBUG((LOG_INFO, "lcp: Echo-Request, Rcvd id %d", id));
- magp = inp;
- PUTLONG(lcp_gotoptions[f->unit].magicnumber, magp);
- fsm_sdata(f, ECHOREP, id, inp, len);
- break;
-
- case ECHOREP:
- lcp_received_echo_reply(f, id, inp, len);
- break;
-
- case DISCREQ:
- break;
-
- default:
- return 0;
- }
- return 1;
-}
-
-
-/*
- * lcp_rprotrej - Receive an Protocol-Reject.
- *
- * Figure out which protocol is rejected and inform it.
- */
-static void
-lcp_rprotrej(f, inp, len)
- fsm *f;
- u_char *inp;
- int len;
-{
- int i;
- struct protent *protp;
- u_short prot;
-
- LCPDEBUG((LOG_INFO, "lcp_rprotrej."));
-
- if (len < sizeof (u_short)) {
- LCPDEBUG((LOG_INFO,
- "lcp_rprotrej: Rcvd short Protocol-Reject packet!"));
- return;
- }
-
- GETSHORT(prot, inp);
-
- LCPDEBUG((LOG_INFO,
- "lcp_rprotrej: Rcvd Protocol-Reject packet for %x!",
- prot));
-
- /*
- * Protocol-Reject packets received in any state other than the LCP
- * OPENED state SHOULD be silently discarded.
- */
- if( f->state != OPENED ){
- LCPDEBUG((LOG_INFO, "Protocol-Reject discarded: LCP in state %d",
- f->state));
- return;
- }
-
- /*
- * Upcall the proper Protocol-Reject routine.
- */
- for (i = 0; (protp = protocols[i]) != NULL; ++i)
- if (protp->protocol == prot && protp->enabled_flag) {
- (*protp->protrej)(f->unit);
- return;
- }
-
- syslog(LOG_WARNING, "Protocol-Reject for unsupported protocol 0x%x",
- prot);
-}
-
-
-/*
- * lcp_protrej - A Protocol-Reject was received.
- */
-/*ARGSUSED*/
-static void
-lcp_protrej(unit)
- int unit;
-{
- /*
- * Can't reject LCP!
- */
- LCPDEBUG((LOG_WARNING,
- "lcp_protrej: Received Protocol-Reject for LCP!"));
- fsm_protreject(&lcp_fsm[unit]);
-}
-
-
-/*
- * lcp_sprotrej - Send a Protocol-Reject for some protocol.
- */
-void
-lcp_sprotrej(unit, p, len)
- int unit;
- u_char *p;
- int len;
-{
- /*
- * Send back the protocol and the information field of the
- * rejected packet. We only get here if LCP is in the OPENED state.
- */
- p += 2;
- len -= 2;
-
- fsm_sdata(&lcp_fsm[unit], PROTREJ, ++lcp_fsm[unit].id,
- p, len);
-}
-
-
-/*
- * lcp_resetci - Reset our CI.
- */
-static void
-lcp_resetci(f)
- fsm *f;
-{
- lcp_wantoptions[f->unit].magicnumber = magic();
- lcp_wantoptions[f->unit].numloops = 0;
- lcp_gotoptions[f->unit] = lcp_wantoptions[f->unit];
- peer_mru[f->unit] = PPP_MRU;
- auth_reset(f->unit);
-}
-
-
-/*
- * lcp_cilen - Return length of our CI.
- */
-static int
-lcp_cilen(f)
- fsm *f;
-{
- lcp_options *go = &lcp_gotoptions[f->unit];
-
-#define LENCIVOID(neg) ((neg) ? CILEN_VOID : 0)
-#define LENCICHAP(neg) ((neg) ? CILEN_CHAP : 0)
-#define LENCISHORT(neg) ((neg) ? CILEN_SHORT : 0)
-#define LENCILONG(neg) ((neg) ? CILEN_LONG : 0)
-#define LENCILQR(neg) ((neg) ? CILEN_LQR: 0)
-#define LENCICBCP(neg) ((neg) ? CILEN_CBCP: 0)
- /*
- * NB: we only ask for one of CHAP and UPAP, even if we will
- * accept either.
- */
- return (LENCISHORT(go->neg_mru && go->mru != DEFMRU) +
- LENCILONG(go->neg_asyncmap && go->asyncmap != 0xFFFFFFFF) +
- LENCICHAP(go->neg_chap) +
- LENCISHORT(!go->neg_chap && go->neg_upap) +
- LENCILQR(go->neg_lqr) +
- LENCICBCP(go->neg_cbcp) +
- LENCILONG(go->neg_magicnumber) +
- LENCIVOID(go->neg_pcompression) +
- LENCIVOID(go->neg_accompression));
-}
-
-
-/*
- * lcp_addci - Add our desired CIs to a packet.
- */
-static void
-lcp_addci(f, ucp, lenp)
- fsm *f;
- u_char *ucp;
- int *lenp;
-{
- lcp_options *go = &lcp_gotoptions[f->unit];
- u_char *start_ucp = ucp;
-
-#define ADDCIVOID(opt, neg) \
- if (neg) { \
- PUTCHAR(opt, ucp); \
- PUTCHAR(CILEN_VOID, ucp); \
- }
-#define ADDCISHORT(opt, neg, val) \
- if (neg) { \
- PUTCHAR(opt, ucp); \
- PUTCHAR(CILEN_SHORT, ucp); \
- PUTSHORT(val, ucp); \
- }
-#define ADDCICHAP(opt, neg, val, digest) \
- if (neg) { \
- PUTCHAR(opt, ucp); \
- PUTCHAR(CILEN_CHAP, ucp); \
- PUTSHORT(val, ucp); \
- PUTCHAR(digest, ucp); \
- }
-#define ADDCILONG(opt, neg, val) \
- if (neg) { \
- PUTCHAR(opt, ucp); \
- PUTCHAR(CILEN_LONG, ucp); \
- PUTLONG(val, ucp); \
- }
-#define ADDCILQR(opt, neg, val) \
- if (neg) { \
- PUTCHAR(opt, ucp); \
- PUTCHAR(CILEN_LQR, ucp); \
- PUTSHORT(PPP_LQR, ucp); \
- PUTLONG(val, ucp); \
- }
-#define ADDCICHAR(opt, neg, val) \
- if (neg) { \
- PUTCHAR(opt, ucp); \
- PUTCHAR(CILEN_CHAR, ucp); \
- PUTCHAR(val, ucp); \
- }
-
- ADDCISHORT(CI_MRU, go->neg_mru && go->mru != DEFMRU, go->mru);
- ADDCILONG(CI_ASYNCMAP, go->neg_asyncmap && go->asyncmap != 0xFFFFFFFF,
- go->asyncmap);
- ADDCICHAP(CI_AUTHTYPE, go->neg_chap, PPP_CHAP, go->chap_mdtype);
- ADDCISHORT(CI_AUTHTYPE, !go->neg_chap && go->neg_upap, PPP_PAP);
- ADDCILQR(CI_QUALITY, go->neg_lqr, go->lqr_period);
- ADDCICHAR(CI_CALLBACK, go->neg_cbcp, CBCP_OPT);
- ADDCILONG(CI_MAGICNUMBER, go->neg_magicnumber, go->magicnumber);
- ADDCIVOID(CI_PCOMPRESSION, go->neg_pcompression);
- ADDCIVOID(CI_ACCOMPRESSION, go->neg_accompression);
-
- if (ucp - start_ucp != *lenp) {
- /* this should never happen, because peer_mtu should be 1500 */
- syslog(LOG_ERR, "Bug in lcp_addci: wrong length")
-;
- }
-}
-
-
-/*
- * lcp_ackci - Ack our CIs.
- * This should not modify any state if the Ack is bad.
- *
- * Returns:
- * 0 - Ack was bad.
- * 1 - Ack was good.
- */
-static int
-lcp_ackci(f, p, len)
- fsm *f;
- u_char *p;
- int len;
-{
- lcp_options *go = &lcp_gotoptions[f->unit];
- u_char cilen, citype, cichar;
- u_short cishort;
- u_int32_t cilong;
-
- /*
- * CIs must be in exactly the same order that we sent.
- * Check packet length and CI length at each step.
- * If we find any deviations, then this packet is bad.
- */
-#define ACKCIVOID(opt, neg) \
- if (neg) { \
- if ((len -= CILEN_VOID) < 0) \
- goto bad; \
- GETCHAR(citype, p); \
- GETCHAR(cilen, p); \
- if (cilen != CILEN_VOID || \
- citype != opt) \
- goto bad; \
- }
-#define ACKCISHORT(opt, neg, val) \
- if (neg) { \
- if ((len -= CILEN_SHORT) < 0) \
- goto bad; \
- GETCHAR(citype, p); \
- GETCHAR(cilen, p); \
- if (cilen != CILEN_SHORT || \
- citype != opt) \
- goto bad; \
- GETSHORT(cishort, p); \
- if (cishort != val) \
- goto bad; \
- }
-#define ACKCICHAR(opt, neg, val) \
- if (neg) { \
- if ((len -= CILEN_CHAR) < 0) \
- goto bad; \
- GETCHAR(citype, p); \
- GETCHAR(cilen, p); \
- if (cilen != CILEN_CHAR || \
- citype != opt) \
- goto bad; \
- GETCHAR(cichar, p); \
- if (cichar != val) \
- goto bad; \
- }
-#define ACKCICHAP(opt, neg, val, digest) \
- if (neg) { \
- if ((len -= CILEN_CHAP) < 0) \
- goto bad; \
- GETCHAR(citype, p); \
- GETCHAR(cilen, p); \
- if (cilen != CILEN_CHAP || \
- citype != opt) \
- goto bad; \
- GETSHORT(cishort, p); \
- if (cishort != val) \
- goto bad; \
- GETCHAR(cichar, p); \
- if (cichar != digest) \
- goto bad; \
- }
-#define ACKCILONG(opt, neg, val) \
- if (neg) { \
- if ((len -= CILEN_LONG) < 0) \
- goto bad; \
- GETCHAR(citype, p); \
- GETCHAR(cilen, p); \
- if (cilen != CILEN_LONG || \
- citype != opt) \
- goto bad; \
- GETLONG(cilong, p); \
- if (cilong != val) \
- goto bad; \
- }
-#define ACKCILQR(opt, neg, val) \
- if (neg) { \
- if ((len -= CILEN_LQR) < 0) \
- goto bad; \
- GETCHAR(citype, p); \
- GETCHAR(cilen, p); \
- if (cilen != CILEN_LQR || \
- citype != opt) \
- goto bad; \
- GETSHORT(cishort, p); \
- if (cishort != PPP_LQR) \
- goto bad; \
- GETLONG(cilong, p); \
- if (cilong != val) \
- goto bad; \
- }
-
- ACKCISHORT(CI_MRU, go->neg_mru && go->mru != DEFMRU, go->mru);
- ACKCILONG(CI_ASYNCMAP, go->neg_asyncmap && go->asyncmap != 0xFFFFFFFF,
- go->asyncmap);
- ACKCICHAP(CI_AUTHTYPE, go->neg_chap, PPP_CHAP, go->chap_mdtype);
- ACKCISHORT(CI_AUTHTYPE, !go->neg_chap && go->neg_upap, PPP_PAP);
- ACKCILQR(CI_QUALITY, go->neg_lqr, go->lqr_period);
- ACKCICHAR(CI_CALLBACK, go->neg_cbcp, CBCP_OPT);
- ACKCILONG(CI_MAGICNUMBER, go->neg_magicnumber, go->magicnumber);
- ACKCIVOID(CI_PCOMPRESSION, go->neg_pcompression);
- ACKCIVOID(CI_ACCOMPRESSION, go->neg_accompression);
-
- /*
- * If there are any remaining CIs, then this packet is bad.
- */
- if (len != 0)
- goto bad;
- return (1);
-bad:
- LCPDEBUG((LOG_WARNING, "lcp_acki: received bad Ack!"));
- return (0);
-}
-
-
-/*
- * lcp_nakci - Peer has sent a NAK for some of our CIs.
- * This should not modify any state if the Nak is bad
- * or if LCP is in the OPENED state.
- *
- * Returns:
- * 0 - Nak was bad.
- * 1 - Nak was good.
- */
-static int
-lcp_nakci(f, p, len)
- fsm *f;
- u_char *p;
- int len;
-{
- lcp_options *go = &lcp_gotoptions[f->unit];
- lcp_options *wo = &lcp_wantoptions[f->unit];
- u_char citype, cichar, *next;
- u_short cishort;
- u_int32_t cilong;
- lcp_options no; /* options we've seen Naks for */
- lcp_options try; /* options to request next time */
- int looped_back = 0;
- int cilen;
-
- BZERO(&no, sizeof(no));
- try = *go;
-
- /*
- * Any Nak'd CIs must be in exactly the same order that we sent.
- * Check packet length and CI length at each step.
- * If we find any deviations, then this packet is bad.
- */
-#define NAKCIVOID(opt, neg, code) \
- if (go->neg && \
- len >= CILEN_VOID && \
- p[1] == CILEN_VOID && \
- p[0] == opt) { \
- len -= CILEN_VOID; \
- INCPTR(CILEN_VOID, p); \
- no.neg = 1; \
- code \
- }
-#define NAKCICHAP(opt, neg, code) \
- if (go->neg && \
- len >= CILEN_CHAP && \
- p[1] == CILEN_CHAP && \
- p[0] == opt) { \
- len -= CILEN_CHAP; \
- INCPTR(2, p); \
- GETSHORT(cishort, p); \
- GETCHAR(cichar, p); \
- no.neg = 1; \
- code \
- }
-#define NAKCICHAR(opt, neg, code) \
- if (go->neg && \
- len >= CILEN_CHAR && \
- p[1] == CILEN_CHAR && \
- p[0] == opt) { \
- len -= CILEN_CHAR; \
- INCPTR(2, p); \
- GETCHAR(cichar, p); \
- no.neg = 1; \
- code \
- }
-#define NAKCISHORT(opt, neg, code) \
- if (go->neg && \
- len >= CILEN_SHORT && \
- p[1] == CILEN_SHORT && \
- p[0] == opt) { \
- len -= CILEN_SHORT; \
- INCPTR(2, p); \
- GETSHORT(cishort, p); \
- no.neg = 1; \
- code \
- }
-#define NAKCILONG(opt, neg, code) \
- if (go->neg && \
- len >= CILEN_LONG && \
- p[1] == CILEN_LONG && \
- p[0] == opt) { \
- len -= CILEN_LONG; \
- INCPTR(2, p); \
- GETLONG(cilong, p); \
- no.neg = 1; \
- code \
- }
-#define NAKCILQR(opt, neg, code) \
- if (go->neg && \
- len >= CILEN_LQR && \
- p[1] == CILEN_LQR && \
- p[0] == opt) { \
- len -= CILEN_LQR; \
- INCPTR(2, p); \
- GETSHORT(cishort, p); \
- GETLONG(cilong, p); \
- no.neg = 1; \
- code \
- }
-
- /*
- * We don't care if they want to send us smaller packets than
- * we want. Therefore, accept any MRU less than what we asked for,
- * but then ignore the new value when setting the MRU in the kernel.
- * If they send us a bigger MRU than what we asked, accept it, up to
- * the limit of the default MRU we'd get if we didn't negotiate.
- */
- if (go->neg_mru && go->mru != DEFMRU) {
- NAKCISHORT(CI_MRU, neg_mru,
- if (cishort <= wo->mru || cishort <= DEFMRU)
- try.mru = cishort;
- );
- }
-
- /*
- * Add any characters they want to our (receive-side) asyncmap.
- */
- if (go->neg_asyncmap && go->asyncmap != 0xFFFFFFFF) {
- NAKCILONG(CI_ASYNCMAP, neg_asyncmap,
- try.asyncmap = go->asyncmap | cilong;
- );
- }
-
- /*
- * If they've nak'd our authentication-protocol, check whether
- * they are proposing a different protocol, or a different
- * hash algorithm for CHAP.
- */
- if ((go->neg_chap || go->neg_upap)
- && len >= CILEN_SHORT
- && p[0] == CI_AUTHTYPE && p[1] >= CILEN_SHORT && p[1] <= len) {
- cilen = p[1];
- len -= cilen;
- no.neg_chap = go->neg_chap;
- no.neg_upap = go->neg_upap;
- INCPTR(2, p);
- GETSHORT(cishort, p);
- if (cishort == PPP_PAP && cilen == CILEN_SHORT) {
- /*
- * If we were asking for CHAP, they obviously don't want to do it.
- * If we weren't asking for CHAP, then we were asking for PAP,
- * in which case this Nak is bad.
- */
- if (!go->neg_chap)
- goto bad;
- try.neg_chap = 0;
-
- } else if (cishort == PPP_CHAP && cilen == CILEN_CHAP) {
- GETCHAR(cichar, p);
- if (go->neg_chap) {
- /*
- * We were asking for CHAP/MD5; they must want a different
- * algorithm. If they can't do MD5, we'll have to stop
- * asking for CHAP.
- */
- if (cichar != go->chap_mdtype)
- try.neg_chap = 0;
- } else {
- /*
- * Stop asking for PAP if we were asking for it.
- */
- try.neg_upap = 0;
- }
-
- } else {
- /*
- * We don't recognize what they're suggesting.
- * Stop asking for what we were asking for.
- */
- if (go->neg_chap)
- try.neg_chap = 0;
- else
- try.neg_upap = 0;
- p += cilen - CILEN_SHORT;
- }
- }
-
- /*
- * If they can't cope with our link quality protocol, we'll have
- * to stop asking for LQR. We haven't got any other protocol.
- * If they Nak the reporting period, take their value XXX ?
- */
- NAKCILQR(CI_QUALITY, neg_lqr,
- if (cishort != PPP_LQR)
- try.neg_lqr = 0;
- else
- try.lqr_period = cilong;
- );
-
- /*
- * Only implementing CBCP...not the rest of the callback options
- */
- NAKCICHAR(CI_CALLBACK, neg_cbcp,
- try.neg_cbcp = 0;
- );
-
- /*
- * Check for a looped-back line.
- */
- NAKCILONG(CI_MAGICNUMBER, neg_magicnumber,
- try.magicnumber = magic();
- looped_back = 1;
- );
-
- /*
- * Peer shouldn't send Nak for protocol compression or
- * address/control compression requests; they should send
- * a Reject instead. If they send a Nak, treat it as a Reject.
- */
- NAKCIVOID(CI_PCOMPRESSION, neg_pcompression,
- try.neg_pcompression = 0;
- );
- NAKCIVOID(CI_ACCOMPRESSION, neg_accompression,
- try.neg_accompression = 0;
- );
-
- /*
- * There may be remaining CIs, if the peer is requesting negotiation
- * on an option that we didn't include in our request packet.
- * If we see an option that we requested, or one we've already seen
- * in this packet, then this packet is bad.
- * If we wanted to respond by starting to negotiate on the requested
- * option(s), we could, but we don't, because except for the
- * authentication type and quality protocol, if we are not negotiating
- * an option, it is because we were told not to.
- * For the authentication type, the Nak from the peer means
- * `let me authenticate myself with you' which is a bit pointless.
- * For the quality protocol, the Nak means `ask me to send you quality
- * reports', but if we didn't ask for them, we don't want them.
- * An option we don't recognize represents the peer asking to
- * negotiate some option we don't support, so ignore it.
- */
- while (len > CILEN_VOID) {
- GETCHAR(citype, p);
- GETCHAR(cilen, p);
- if (cilen < CILEN_VOID || (len -= cilen) < 0)
- goto bad;
- next = p + cilen - 2;
-
- switch (citype) {
- case CI_MRU:
- if ((go->neg_mru && go->mru != DEFMRU)
- || no.neg_mru || cilen != CILEN_SHORT)
- goto bad;
- GETSHORT(cishort, p);
- if (cishort < DEFMRU)
- try.mru = cishort;
- break;
- case CI_ASYNCMAP:
- if ((go->neg_asyncmap && go->asyncmap != 0xFFFFFFFF)
- || no.neg_asyncmap || cilen != CILEN_LONG)
- goto bad;
- break;
- case CI_AUTHTYPE:
- if (go->neg_chap || no.neg_chap || go->neg_upap || no.neg_upap)
- goto bad;
- break;
- case CI_MAGICNUMBER:
- if (go->neg_magicnumber || no.neg_magicnumber ||
- cilen != CILEN_LONG)
- goto bad;
- break;
- case CI_PCOMPRESSION:
- if (go->neg_pcompression || no.neg_pcompression
- || cilen != CILEN_VOID)
- goto bad;
- break;
- case CI_ACCOMPRESSION:
- if (go->neg_accompression || no.neg_accompression
- || cilen != CILEN_VOID)
- goto bad;
- break;
- case CI_QUALITY:
- if (go->neg_lqr || no.neg_lqr || cilen != CILEN_LQR)
- goto bad;
- break;
- }
- p = next;
- }
-
- /* If there is still anything left, this packet is bad. */
- if (len != 0)
- goto bad;
-
- /*
- * OK, the Nak is good. Now we can update state.
- */
- if (f->state != OPENED) {
- if (looped_back) {
- if (++try.numloops >= lcp_loopbackfail) {
- syslog(LOG_NOTICE, "Serial line is looped back.");
- lcp_close(f->unit, "Loopback detected");
- }
- } else
- try.numloops = 0;
- *go = try;
- }
-
- return 1;
-
-bad:
- LCPDEBUG((LOG_WARNING, "lcp_nakci: received bad Nak!"));
- return 0;
-}
-
-
-/*
- * lcp_rejci - Peer has Rejected some of our CIs.
- * This should not modify any state if the Reject is bad
- * or if LCP is in the OPENED state.
- *
- * Returns:
- * 0 - Reject was bad.
- * 1 - Reject was good.
- */
-static int
-lcp_rejci(f, p, len)
- fsm *f;
- u_char *p;
- int len;
-{
- lcp_options *go = &lcp_gotoptions[f->unit];
- u_char cichar;
- u_short cishort;
- u_int32_t cilong;
- lcp_options try; /* options to request next time */
-
- try = *go;
-
- /*
- * Any Rejected CIs must be in exactly the same order that we sent.
- * Check packet length and CI length at each step.
- * If we find any deviations, then this packet is bad.
- */
-#define REJCIVOID(opt, neg) \
- if (go->neg && \
- len >= CILEN_VOID && \
- p[1] == CILEN_VOID && \
- p[0] == opt) { \
- len -= CILEN_VOID; \
- INCPTR(CILEN_VOID, p); \
- try.neg = 0; \
- LCPDEBUG((LOG_INFO, "lcp_rejci rejected void opt %d", opt)); \
- }
-#define REJCISHORT(opt, neg, val) \
- if (go->neg && \
- len >= CILEN_SHORT && \
- p[1] == CILEN_SHORT && \
- p[0] == opt) { \
- len -= CILEN_SHORT; \
- INCPTR(2, p); \
- GETSHORT(cishort, p); \
- /* Check rejected value. */ \
- if (cishort != val) \
- goto bad; \
- try.neg = 0; \
- LCPDEBUG((LOG_INFO,"lcp_rejci rejected short opt %d", opt)); \
- }
-#define REJCICHAP(opt, neg, val, digest) \
- if (go->neg && \
- len >= CILEN_CHAP && \
- p[1] == CILEN_CHAP && \
- p[0] == opt) { \
- len -= CILEN_CHAP; \
- INCPTR(2, p); \
- GETSHORT(cishort, p); \
- GETCHAR(cichar, p); \
- /* Check rejected value. */ \
- if (cishort != val || cichar != digest) \
- goto bad; \
- try.neg = 0; \
- try.neg_upap = 0; \
- LCPDEBUG((LOG_INFO,"lcp_rejci rejected chap opt %d", opt)); \
- }
-#define REJCILONG(opt, neg, val) \
- if (go->neg && \
- len >= CILEN_LONG && \
- p[1] == CILEN_LONG && \
- p[0] == opt) { \
- len -= CILEN_LONG; \
- INCPTR(2, p); \
- GETLONG(cilong, p); \
- /* Check rejected value. */ \
- if (cilong != val) \
- goto bad; \
- try.neg = 0; \
- LCPDEBUG((LOG_INFO,"lcp_rejci rejected long opt %d", opt)); \
- }
-#define REJCILQR(opt, neg, val) \
- if (go->neg && \
- len >= CILEN_LQR && \
- p[1] == CILEN_LQR && \
- p[0] == opt) { \
- len -= CILEN_LQR; \
- INCPTR(2, p); \
- GETSHORT(cishort, p); \
- GETLONG(cilong, p); \
- /* Check rejected value. */ \
- if (cishort != PPP_LQR || cilong != val) \
- goto bad; \
- try.neg = 0; \
- LCPDEBUG((LOG_INFO,"lcp_rejci rejected LQR opt %d", opt)); \
- }
-#define REJCICBCP(opt, neg, val) \
- if (go->neg && \
- len >= CILEN_CBCP && \
- p[1] == CILEN_CBCP && \
- p[0] == opt) { \
- len -= CILEN_CBCP; \
- INCPTR(2, p); \
- GETCHAR(cichar, p); \
- /* Check rejected value. */ \
- if (cichar != val) \
- goto bad; \
- try.neg = 0; \
- LCPDEBUG((LOG_INFO,"lcp_rejci rejected Callback opt %d", opt)); \
- }
-
- REJCISHORT(CI_MRU, neg_mru, go->mru);
- REJCILONG(CI_ASYNCMAP, neg_asyncmap, go->asyncmap);
- REJCICHAP(CI_AUTHTYPE, neg_chap, PPP_CHAP, go->chap_mdtype);
- if (!go->neg_chap) {
- REJCISHORT(CI_AUTHTYPE, neg_upap, PPP_PAP);
- }
- REJCILQR(CI_QUALITY, neg_lqr, go->lqr_period);
- REJCICBCP(CI_CALLBACK, neg_cbcp, CBCP_OPT);
- REJCILONG(CI_MAGICNUMBER, neg_magicnumber, go->magicnumber);
- REJCIVOID(CI_PCOMPRESSION, neg_pcompression);
- REJCIVOID(CI_ACCOMPRESSION, neg_accompression);
-
- /*
- * If there are any remaining CIs, then this packet is bad.
- */
- if (len != 0)
- goto bad;
- /*
- * Now we can update state.
- */
- if (f->state != OPENED)
- *go = try;
- return 1;
-
-bad:
- LCPDEBUG((LOG_WARNING, "lcp_rejci: received bad Reject!"));
- return 0;
-}
-
-
-/*
- * lcp_reqci - Check the peer's requested CIs and send appropriate response.
- *
- * Returns: CONFACK, CONFNAK or CONFREJ and input packet modified
- * appropriately. If reject_if_disagree is non-zero, doesn't return
- * CONFNAK; returns CONFREJ if it can't return CONFACK.
- */
-static int
-lcp_reqci(f, inp, lenp, reject_if_disagree)
- fsm *f;
- u_char *inp; /* Requested CIs */
- int *lenp; /* Length of requested CIs */
- int reject_if_disagree;
-{
- lcp_options *go = &lcp_gotoptions[f->unit];
- lcp_options *ho = &lcp_hisoptions[f->unit];
- lcp_options *ao = &lcp_allowoptions[f->unit];
- u_char *cip, *next; /* Pointer to current and next CIs */
- int cilen, citype, cichar; /* Parsed len, type, char value */
- u_short cishort; /* Parsed short value */
- u_int32_t cilong; /* Parse long value */
- int rc = CONFACK; /* Final packet return code */
- int orc; /* Individual option return code */
- u_char *p; /* Pointer to next char to parse */
- u_char *rejp; /* Pointer to next char in reject frame */
- u_char *nakp; /* Pointer to next char in Nak frame */
- int l = *lenp; /* Length left */
-
- /*
- * Reset all his options.
- */
- BZERO(ho, sizeof(*ho));
-
- /*
- * Process all his options.
- */
- next = inp;
- nakp = nak_buffer;
- rejp = inp;
- while (l) {
- orc = CONFACK; /* Assume success */
- cip = p = next; /* Remember begining of CI */
- if (l < 2 || /* Not enough data for CI header or */
- p[1] < 2 || /* CI length too small or */
- p[1] > l) { /* CI length too big? */
- LCPDEBUG((LOG_WARNING, "lcp_reqci: bad CI length!"));
- orc = CONFREJ; /* Reject bad CI */
- cilen = l; /* Reject till end of packet */
- l = 0; /* Don't loop again */
- citype = 0;
- goto endswitch;
- }
- GETCHAR(citype, p); /* Parse CI type */
- GETCHAR(cilen, p); /* Parse CI length */
- l -= cilen; /* Adjust remaining length */
- next += cilen; /* Step to next CI */
-
- switch (citype) { /* Check CI type */
- case CI_MRU:
- LCPDEBUG((LOG_INFO, "lcp_reqci: rcvd MRU"));
- if (!ao->neg_mru || /* Allow option? */
- cilen != CILEN_SHORT) { /* Check CI length */
- orc = CONFREJ; /* Reject CI */
- break;
- }
- GETSHORT(cishort, p); /* Parse MRU */
- LCPDEBUG((LOG_INFO, "(%d)", cishort));
-
- /*
- * He must be able to receive at least our minimum.
- * No need to check a maximum. If he sends a large number,
- * we'll just ignore it.
- */
- if (cishort < MINMRU) {
- orc = CONFNAK; /* Nak CI */
- PUTCHAR(CI_MRU, nakp);
- PUTCHAR(CILEN_SHORT, nakp);
- PUTSHORT(MINMRU, nakp); /* Give him a hint */
- break;
- }
- ho->neg_mru = 1; /* Remember he sent MRU */
- ho->mru = cishort; /* And remember value */
- break;
-
- case CI_ASYNCMAP:
- LCPDEBUG((LOG_INFO, "lcp_reqci: rcvd ASYNCMAP"));
- if (!ao->neg_asyncmap ||
- cilen != CILEN_LONG) {
- orc = CONFREJ;
- break;
- }
- GETLONG(cilong, p);
- LCPDEBUG((LOG_INFO, "(%x)", (unsigned int) cilong));
-
- /*
- * Asyncmap must have set at least the bits
- * which are set in lcp_allowoptions[unit].asyncmap.
- */
- if ((ao->asyncmap & ~cilong) != 0) {
- orc = CONFNAK;
- PUTCHAR(CI_ASYNCMAP, nakp);
- PUTCHAR(CILEN_LONG, nakp);
- PUTLONG(ao->asyncmap | cilong, nakp);
- break;
- }
- ho->neg_asyncmap = 1;
- ho->asyncmap = cilong;
- break;
-
- case CI_AUTHTYPE:
- LCPDEBUG((LOG_INFO, "lcp_reqci: rcvd AUTHTYPE"));
- if (cilen < CILEN_SHORT ||
- !(ao->neg_upap || ao->neg_chap)) {
- /*
- * Reject the option if we're not willing to authenticate.
- */
- orc = CONFREJ;
- break;
- }
- GETSHORT(cishort, p);
- LCPDEBUG((LOG_INFO, "(%x)", cishort));
-
- /*
- * Authtype must be UPAP or CHAP.
- *
- * Note: if both ao->neg_upap and ao->neg_chap are set,
- * and the peer sends a Configure-Request with two
- * authenticate-protocol requests, one for CHAP and one
- * for UPAP, then we will reject the second request.
- * Whether we end up doing CHAP or UPAP depends then on
- * the ordering of the CIs in the peer's Configure-Request.
- */
-
- if (cishort == PPP_PAP) {
- if (ho->neg_chap || /* we've already accepted CHAP */
- cilen != CILEN_SHORT) {
- LCPDEBUG((LOG_WARNING,
- "lcp_reqci: rcvd AUTHTYPE PAP, rejecting..."));
- orc = CONFREJ;
- break;
- }
- if (!ao->neg_upap) { /* we don't want to do PAP */
- orc = CONFNAK; /* NAK it and suggest CHAP */
- PUTCHAR(CI_AUTHTYPE, nakp);
- PUTCHAR(CILEN_CHAP, nakp);
- PUTSHORT(PPP_CHAP, nakp);
- PUTCHAR(ao->chap_mdtype, nakp);
- break;
- }
- ho->neg_upap = 1;
- break;
- }
- if (cishort == PPP_CHAP) {
- if (ho->neg_upap || /* we've already accepted PAP */
- cilen != CILEN_CHAP) {
- LCPDEBUG((LOG_INFO,
- "lcp_reqci: rcvd AUTHTYPE CHAP, rejecting..."));
- orc = CONFREJ;
- break;
- }
- if (!ao->neg_chap) { /* we don't want to do CHAP */
- orc = CONFNAK; /* NAK it and suggest PAP */
- PUTCHAR(CI_AUTHTYPE, nakp);
- PUTCHAR(CILEN_SHORT, nakp);
- PUTSHORT(PPP_PAP, nakp);
- break;
- }
- GETCHAR(cichar, p); /* get digest type*/
- if (cichar != CHAP_DIGEST_MD5
-#ifdef CHAPMS
- && cichar != CHAP_MICROSOFT
-#endif
- ) {
- orc = CONFNAK;
- PUTCHAR(CI_AUTHTYPE, nakp);
- PUTCHAR(CILEN_CHAP, nakp);
- PUTSHORT(PPP_CHAP, nakp);
- PUTCHAR(ao->chap_mdtype, nakp);
- break;
- }
- ho->chap_mdtype = cichar; /* save md type */
- ho->neg_chap = 1;
- break;
- }
-
- /*
- * We don't recognize the protocol they're asking for.
- * Nak it with something we're willing to do.
- * (At this point we know ao->neg_upap || ao->neg_chap.)
- */
- orc = CONFNAK;
- PUTCHAR(CI_AUTHTYPE, nakp);
- if (ao->neg_chap) {
- PUTCHAR(CILEN_CHAP, nakp);
- PUTSHORT(PPP_CHAP, nakp);
- PUTCHAR(ao->chap_mdtype, nakp);
- } else {
- PUTCHAR(CILEN_SHORT, nakp);
- PUTSHORT(PPP_PAP, nakp);
- }
- break;
-
- case CI_QUALITY:
- LCPDEBUG((LOG_INFO, "lcp_reqci: rcvd QUALITY"));
- if (!ao->neg_lqr ||
- cilen != CILEN_LQR) {
- orc = CONFREJ;
- break;
- }
-
- GETSHORT(cishort, p);
- GETLONG(cilong, p);
- LCPDEBUG((LOG_INFO, "(%x %x)", cishort, (unsigned int) cilong));
-
- /*
- * Check the protocol and the reporting period.
- * XXX When should we Nak this, and what with?
- */
- if (cishort != PPP_LQR) {
- orc = CONFNAK;
- PUTCHAR(CI_QUALITY, nakp);
- PUTCHAR(CILEN_LQR, nakp);
- PUTSHORT(PPP_LQR, nakp);
- PUTLONG(ao->lqr_period, nakp);
- break;
- }
- break;
-
- case CI_MAGICNUMBER:
- LCPDEBUG((LOG_INFO, "lcp_reqci: rcvd MAGICNUMBER"));
- if (!(ao->neg_magicnumber || go->neg_magicnumber) ||
- cilen != CILEN_LONG) {
- orc = CONFREJ;
- break;
- }
- GETLONG(cilong, p);
- LCPDEBUG((LOG_INFO, "(%x)", (unsigned int) cilong));
-
- /*
- * He must have a different magic number.
- */
- if (go->neg_magicnumber &&
- cilong == go->magicnumber) {
- cilong = magic(); /* Don't put magic() inside macro! */
- orc = CONFNAK;
- PUTCHAR(CI_MAGICNUMBER, nakp);
- PUTCHAR(CILEN_LONG, nakp);
- PUTLONG(cilong, nakp);
- break;
- }
- ho->neg_magicnumber = 1;
- ho->magicnumber = cilong;
- break;
-
-
- case CI_PCOMPRESSION:
- LCPDEBUG((LOG_INFO, "lcp_reqci: rcvd PCOMPRESSION"));
- if (!ao->neg_pcompression ||
- cilen != CILEN_VOID) {
- orc = CONFREJ;
- break;
- }
- ho->neg_pcompression = 1;
- break;
-
- case CI_ACCOMPRESSION:
- LCPDEBUG((LOG_INFO, "lcp_reqci: rcvd ACCOMPRESSION"));
- if (!ao->neg_accompression ||
- cilen != CILEN_VOID) {
- orc = CONFREJ;
- break;
- }
- ho->neg_accompression = 1;
- break;
-
- default:
- LCPDEBUG((LOG_INFO, "lcp_reqci: rcvd unknown option %d",
- citype));
- orc = CONFREJ;
- break;
- }
-
-endswitch:
- LCPDEBUG((LOG_INFO, " (%s)", CODENAME(orc)));
- if (orc == CONFACK && /* Good CI */
- rc != CONFACK) /* but prior CI wasnt? */
- continue; /* Don't send this one */
-
- if (orc == CONFNAK) { /* Nak this CI? */
- if (reject_if_disagree /* Getting fed up with sending NAKs? */
- && citype != CI_MAGICNUMBER) {
- orc = CONFREJ; /* Get tough if so */
- } else {
- if (rc == CONFREJ) /* Rejecting prior CI? */
- continue; /* Don't send this one */
- rc = CONFNAK;
- }
- }
- if (orc == CONFREJ) { /* Reject this CI */
- rc = CONFREJ;
- if (cip != rejp) /* Need to move rejected CI? */
- BCOPY(cip, rejp, cilen); /* Move it */
- INCPTR(cilen, rejp); /* Update output pointer */
- }
- }
-
- /*
- * If we wanted to send additional NAKs (for unsent CIs), the
- * code would go here. The extra NAKs would go at *nakp.
- * At present there are no cases where we want to ask the
- * peer to negotiate an option.
- */
-
- switch (rc) {
- case CONFACK:
- *lenp = next - inp;
- break;
- case CONFNAK:
- /*
- * Copy the Nak'd options from the nak_buffer to the caller's buffer.
- */
- *lenp = nakp - nak_buffer;
- BCOPY(nak_buffer, inp, *lenp);
- break;
- case CONFREJ:
- *lenp = rejp - inp;
- break;
- }
-
- LCPDEBUG((LOG_INFO, "lcp_reqci: returning CONF%s.", CODENAME(rc)));
- return (rc); /* Return final code */
-}
-
-
-/*
- * lcp_up - LCP has come UP.
- */
-static void
-lcp_up(f)
- fsm *f;
-{
- lcp_options *wo = &lcp_wantoptions[f->unit];
- lcp_options *ho = &lcp_hisoptions[f->unit];
- lcp_options *go = &lcp_gotoptions[f->unit];
- lcp_options *ao = &lcp_allowoptions[f->unit];
-
- if (!go->neg_magicnumber)
- go->magicnumber = 0;
- if (!ho->neg_magicnumber)
- ho->magicnumber = 0;
-
- /*
- * Set our MTU to the smaller of the MTU we wanted and
- * the MRU our peer wanted. If we negotiated an MRU,
- * set our MRU to the larger of value we wanted and
- * the value we got in the negotiation.
- */
- ppp_send_config(f->unit, MIN(ao->mru, (ho->neg_mru? ho->mru: PPP_MRU)),
- (ho->neg_asyncmap? ho->asyncmap: 0xffffffff),
- ho->neg_pcompression, ho->neg_accompression);
- ppp_recv_config(f->unit, (go->neg_mru? MAX(wo->mru, go->mru): PPP_MRU),
- (go->neg_asyncmap? go->asyncmap: 0xffffffff),
- go->neg_pcompression, go->neg_accompression);
-
- if (ho->neg_mru)
- peer_mru[f->unit] = ho->mru;
-
- lcp_echo_lowerup(f->unit); /* Enable echo messages */
-
- link_established(f->unit);
-}
-
-
-/*
- * lcp_down - LCP has gone DOWN.
- *
- * Alert other protocols.
- */
-static void
-lcp_down(f)
- fsm *f;
-{
- lcp_options *go = &lcp_gotoptions[f->unit];
-
- lcp_echo_lowerdown(f->unit);
-
- link_down(f->unit);
-
- ppp_send_config(f->unit, PPP_MRU, 0xffffffff, 0, 0);
- ppp_recv_config(f->unit, PPP_MRU,
- (go->neg_asyncmap? go->asyncmap: 0xffffffff),
- go->neg_pcompression, go->neg_accompression);
- peer_mru[f->unit] = PPP_MRU;
-}
-
-
-/*
- * lcp_starting - LCP needs the lower layer up.
- */
-static void
-lcp_starting(f)
- fsm *f;
-{
- link_required(f->unit);
-}
-
-
-/*
- * lcp_finished - LCP has finished with the lower layer.
- */
-static void
-lcp_finished(f)
- fsm *f;
-{
- link_terminated(f->unit);
-}
-
-
-/*
- * lcp_printpkt - print the contents of an LCP packet.
- */
-static char *lcp_codenames[] = {
- "ConfReq", "ConfAck", "ConfNak", "ConfRej",
- "TermReq", "TermAck", "CodeRej", "ProtRej",
- "EchoReq", "EchoRep", "DiscReq"
-};
-
-static int
-lcp_printpkt(p, plen, printer, arg)
- u_char *p;
- int plen;
- void (*printer) __P((void *, char *, ...));
- void *arg;
-{
- int code, id, len, olen;
- u_char *pstart, *optend;
- u_short cishort;
- u_int32_t cilong;
-
- if (plen < HEADERLEN)
- return 0;
- pstart = p;
- GETCHAR(code, p);
- GETCHAR(id, p);
- GETSHORT(len, p);
- if (len < HEADERLEN || len > plen)
- return 0;
-
- if (code >= 1 && code <= sizeof(lcp_codenames) / sizeof(char *))
- printer(arg, " %s", lcp_codenames[code-1]);
- else
- printer(arg, " code=0x%x", code);
- printer(arg, " id=0x%x", id);
- len -= HEADERLEN;
- switch (code) {
- case CONFREQ:
- case CONFACK:
- case CONFNAK:
- case CONFREJ:
-
- while (len >= 2) {
- GETCHAR(code, p);
- GETCHAR(olen, p);
- p -= 2;
- if (olen < 2 || olen > len) {
- break;
- }
- printer(arg, " <");
- len -= olen;
- optend = p + olen;
- switch (code) {
- case CI_MRU:
- if (olen == CILEN_SHORT) {
- p += 2;
- GETSHORT(cishort, p);
- printer(arg, "mru %d", cishort);
- }
- break;
- case CI_ASYNCMAP:
- if (olen == CILEN_LONG) {
- p += 2;
- GETLONG(cilong, p);
- printer(arg, "asyncmap 0x%x", cilong);
- }
- break;
- case CI_AUTHTYPE:
- if (olen >= CILEN_SHORT) {
- p += 2;
- printer(arg, "auth ");
- GETSHORT(cishort, p);
- switch (cishort) {
- case PPP_PAP:
- printer(arg, "pap");
- break;
- case PPP_CHAP:
- printer(arg, "chap");
- break;
- default:
- printer(arg, "0x%x", cishort);
- }
- }
- break;
- case CI_QUALITY:
- if (olen >= CILEN_SHORT) {
- p += 2;
- printer(arg, "quality ");
- GETSHORT(cishort, p);
- switch (cishort) {
- case PPP_LQR:
- printer(arg, "lqr");
- break;
- default:
- printer(arg, "0x%x", cishort);
- }
- }
- break;
- case CI_CALLBACK:
- if (olen >= CILEN_CHAR) {
- p += 2;
- printer(arg, "callback ");
- GETSHORT(cishort, p);
- switch (cishort) {
- case CBCP_OPT:
- printer(arg, "CBCP");
- break;
- default:
- printer(arg, "0x%x", cishort);
- }
- }
- break;
- case CI_MAGICNUMBER:
- if (olen == CILEN_LONG) {
- p += 2;
- GETLONG(cilong, p);
- printer(arg, "magic 0x%x", cilong);
- }
- break;
- case CI_PCOMPRESSION:
- if (olen == CILEN_VOID) {
- p += 2;
- printer(arg, "pcomp");
- }
- break;
- case CI_ACCOMPRESSION:
- if (olen == CILEN_VOID) {
- p += 2;
- printer(arg, "accomp");
- }
- break;
- }
- while (p < optend) {
- GETCHAR(code, p);
- printer(arg, " %.2x", code);
- }
- printer(arg, ">");
- }
- break;
-
- case TERMACK:
- case TERMREQ:
- if (len > 0 && *p >= ' ' && *p < 0x7f) {
- printer(arg, " ");
- print_string(p, len, printer, arg);
- p += len;
- len = 0;
- }
- break;
-
- case ECHOREQ:
- case ECHOREP:
- case DISCREQ:
- if (len >= 4) {
- GETLONG(cilong, p);
- printer(arg, " magic=0x%x", cilong);
- p += 4;
- len -= 4;
- }
- break;
- }
-
-
- for (; len > 0; --len) {
- GETCHAR(code, p);
- printer(arg, " %.2x", code);
- }
-
- return p - pstart;
-}
-
-/*
- * Time to shut down the link because there is nothing out there.
- */
-
-static
-void LcpLinkFailure (f)
- fsm *f;
-{
- if (f->state == OPENED) {
- syslog(LOG_INFO, "No response to %d echo-requests", lcp_echos_pending);
- syslog(LOG_NOTICE, "Serial link appears to be disconnected.");
- lcp_close(f->unit, "Peer not responding");
- }
-}
-
-/*
- * Timer expired for the LCP echo requests from this process.
- */
-
-static void
-LcpEchoCheck (f)
- fsm *f;
-{
- LcpSendEchoRequest (f);
-
- /*
- * Start the timer for the next interval.
- */
- assert (lcp_echo_timer_running==0);
- TIMEOUT (LcpEchoTimeout, f, lcp_echo_interval);
- lcp_echo_timer_running = 1;
-}
-
-/*
- * LcpEchoTimeout - Timer expired on the LCP echo
- */
-
-static void
-LcpEchoTimeout (arg)
- void *arg;
-{
- if (lcp_echo_timer_running != 0) {
- lcp_echo_timer_running = 0;
- LcpEchoCheck ((fsm *) arg);
- }
-}
-
-/*
- * LcpEchoReply - LCP has received a reply to the echo
- */
-
-static void
-lcp_received_echo_reply (f, id, inp, len)
- fsm *f;
- int id; u_char *inp; int len;
-{
- u_int32_t magic;
-
- /* Check the magic number - don't count replies from ourselves. */
- if (len < 4) {
- syslog(LOG_DEBUG, "lcp: received short Echo-Reply, length %d", len);
- return;
- }
- GETLONG(magic, inp);
- if (lcp_gotoptions[f->unit].neg_magicnumber
- && magic == lcp_gotoptions[f->unit].magicnumber) {
- syslog(LOG_WARNING, "appear to have received our own echo-reply!");
- return;
- }
-
- /* Reset the number of outstanding echo frames */
- lcp_echos_pending = 0;
-}
-
-/*
- * LcpSendEchoRequest - Send an echo request frame to the peer
- */
-
-static void
-LcpSendEchoRequest (f)
- fsm *f;
-{
- u_int32_t lcp_magic;
- u_char pkt[4], *pktp;
-
- /*
- * Detect the failure of the peer at this point.
- */
- if (lcp_echo_fails != 0) {
- if (lcp_echos_pending >= lcp_echo_fails) {
- LcpLinkFailure(f);
- lcp_echos_pending = 0;
- }
- }
-
- /*
- * Make and send the echo request frame.
- */
- if (f->state == OPENED) {
- lcp_magic = lcp_gotoptions[f->unit].magicnumber;
- pktp = pkt;
- PUTLONG(lcp_magic, pktp);
- fsm_sdata(f, ECHOREQ, lcp_echo_number++ & 0xFF, pkt, pktp - pkt);
- ++lcp_echos_pending;
- }
-}
-
-/*
- * lcp_echo_lowerup - Start the timer for the LCP frame
- */
-
-static void
-lcp_echo_lowerup (unit)
- int unit;
-{
- fsm *f = &lcp_fsm[unit];
-
- /* Clear the parameters for generating echo frames */
- lcp_echos_pending = 0;
- lcp_echo_number = 0;
- lcp_echo_timer_running = 0;
-
- /* If a timeout interval is specified then start the timer */
- if (lcp_echo_interval != 0)
- LcpEchoCheck (f);
-}
-
-/*
- * lcp_echo_lowerdown - Stop the timer for the LCP frame
- */
-
-static void
-lcp_echo_lowerdown (unit)
- int unit;
-{
- fsm *f = &lcp_fsm[unit];
-
- if (lcp_echo_timer_running != 0) {
- UNTIMEOUT (LcpEchoTimeout, f);
- lcp_echo_timer_running = 0;
- }
-}
diff --git a/cpukit/pppd/lcp.h b/cpukit/pppd/lcp.h
deleted file mode 100644
index 42260f3a63..0000000000
--- a/cpukit/pppd/lcp.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * lcp.h - Link Control Protocol definitions.
- *
- * Copyright (c) 1989 Carnegie Mellon University.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by Carnegie Mellon University. The name of the
- * University may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Id$
- */
-
-/*
- * Options.
- */
-#define CI_MRU 1 /* Maximum Receive Unit */
-#define CI_ASYNCMAP 2 /* Async Control Character Map */
-#define CI_AUTHTYPE 3 /* Authentication Type */
-#define CI_QUALITY 4 /* Quality Protocol */
-#define CI_MAGICNUMBER 5 /* Magic Number */
-#define CI_PCOMPRESSION 7 /* Protocol Field Compression */
-#define CI_ACCOMPRESSION 8 /* Address/Control Field Compression */
-#define CI_CALLBACK 13 /* callback */
-
-/*
- * LCP-specific packet types.
- */
-#define PROTREJ 8 /* Protocol Reject */
-#define ECHOREQ 9 /* Echo Request */
-#define ECHOREP 10 /* Echo Reply */
-#define DISCREQ 11 /* Discard Request */
-#define CBCP_OPT 6 /* Use callback control protocol */
-
-/*
- * The state of options is described by an lcp_options structure.
- */
-typedef struct lcp_options {
- int passive : 1; /* Don't die if we don't get a response */
- int silent : 1; /* Wait for the other end to start first */
- int restart : 1; /* Restart vs. exit after close */
- int neg_mru : 1; /* Negotiate the MRU? */
- int neg_asyncmap : 1; /* Negotiate the async map? */
- int neg_upap : 1; /* Ask for UPAP authentication? */
- int neg_chap : 1; /* Ask for CHAP authentication? */
- int neg_magicnumber : 1; /* Ask for magic number? */
- int neg_pcompression : 1; /* HDLC Protocol Field Compression? */
- int neg_accompression : 1; /* HDLC Address/Control Field Compression? */
- int neg_lqr : 1; /* Negotiate use of Link Quality Reports */
- int neg_cbcp : 1; /* Negotiate use of CBCP */
- u_short mru; /* Value of MRU */
- u_char chap_mdtype; /* which MD type (hashing algorithm) */
- u_int32_t asyncmap; /* Value of async map */
- u_int32_t magicnumber;
- int numloops; /* Number of loops during magic number neg. */
- u_int32_t lqr_period; /* Reporting period for LQR 1/100ths second */
-} lcp_options;
-
-extern fsm lcp_fsm[];
-extern lcp_options lcp_wantoptions[];
-extern lcp_options lcp_gotoptions[];
-extern lcp_options lcp_allowoptions[];
-extern lcp_options lcp_hisoptions[];
-extern u_int32_t xmit_accm[][8];
-
-#define DEFMRU 1500 /* Try for this */
-#define MINMRU 128 /* No MRUs below this */
-#define MAXMRU 16384 /* Normally limit MRU to this */
-
-void lcp_open __P((int));
-void lcp_close __P((int, char *));
-void lcp_lowerup __P((int));
-void lcp_lowerdown __P((int));
-void lcp_sprotrej __P((int, u_char *, int)); /* send protocol reject */
-
-extern struct protent lcp_protent;
-
-/* Default number of times we receive our magic number from the peer
- before deciding the link is looped-back. */
-#define DEFLOOPBACKFAIL 10
diff --git a/cpukit/pppd/magic.c b/cpukit/pppd/magic.c
deleted file mode 100644
index 67d6b6ca90..0000000000
--- a/cpukit/pppd/magic.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * magic.c - PPP Magic Number routines.
- *
- * Copyright (c) 1989 Carnegie Mellon University.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by Carnegie Mellon University. The name of the
- * University may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#ifndef lint
-/* static char rcsid[] = "$Id$"; */
-#endif
-
-#include <stdio.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <sys/time.h>
-
-#include "pppd.h"
-#include "magic.h"
-
-extern long mrand48 __P((void));
-extern void srand48 __P((long));
-
-/*
- * magic_init - Initialize the magic number generator.
- *
- * Attempts to compute a random number seed which will not repeat.
- * The current method uses the current hostid, current process ID
- * and current time, currently.
- */
-void
-magic_init()
-{
- long seed;
- struct timeval t;
-
- gettimeofday(&t, NULL);
- seed = get_host_seed() ^ t.tv_sec ^ t.tv_usec ^ getpid();
- srand48(seed);
-}
-
-/*
- * magic - Returns the next magic number.
- */
-u_int32_t
-magic()
-{
- return (u_int32_t) mrand48();
-}
-
-/*
- * Substitute procedures for those systems which don't have
- * drand48 et al.
- */
-/* #include <stdlib.h> */
-double
-drand48()
-{
- return (double)rand() / (double)0x7fffffffL; /* 2**31-1 */
-}
-
-long
-mrand48()
-{
- return rand();
-}
-
-void
-srand48(seedval)
-long seedval;
-{
- srand((int)seedval);
-}
-
diff --git a/cpukit/pppd/magic.h b/cpukit/pppd/magic.h
deleted file mode 100644
index 1344626a38..0000000000
--- a/cpukit/pppd/magic.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * magic.h - PPP Magic Number definitions.
- *
- * Copyright (c) 1989 Carnegie Mellon University.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by Carnegie Mellon University. The name of the
- * University may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Id$
- */
-
-void magic_init __P((void)); /* Initialize the magic number generator */
-u_int32_t magic __P((void)); /* Returns the next magic number */
diff --git a/cpukit/pppd/md4.c b/cpukit/pppd/md4.c
deleted file mode 100644
index cda9f943d0..0000000000
--- a/cpukit/pppd/md4.c
+++ /dev/null
@@ -1,298 +0,0 @@
-/*
-** ********************************************************************
-** md4.c -- Implementation of MD4 Message Digest Algorithm **
-** Updated: 2/16/90 by Ronald L. Rivest **
-** (C) 1990 RSA Data Security, Inc. **
-** ********************************************************************
-*/
-
-/*
-** To use MD4:
-** -- Include md4.h in your program
-** -- Declare an MDstruct MD to hold the state of the digest
-** computation.
-** -- Initialize MD using MDbegin(&MD)
-** -- For each full block (64 bytes) X you wish to process, call
-** MD4Update(&MD,X,512)
-** (512 is the number of bits in a full block.)
-** -- For the last block (less than 64 bytes) you wish to process,
-** MD4Update(&MD,X,n)
-** where n is the number of bits in the partial block. A partial
-** block terminates the computation, so every MD computation
-** should terminate by processing a partial block, even if it
-** has n = 0.
-** -- The message digest is available in MD.buffer[0] ...
-** MD.buffer[3]. (Least-significant byte of each word
-** should be output first.)
-** -- You can print out the digest using MDprint(&MD)
-*/
-
-/* Implementation notes:
-** This implementation assumes that ints are 32-bit quantities.
-*/
-
-#define TRUE 1
-#define FALSE 0
-
-/* Compile-time includes
-*/
-#include <stdio.h>
-#include "md4.h"
-#include "pppd.h"
-
-/* Compile-time declarations of MD4 "magic constants".
-*/
-#define I0 0x67452301 /* Initial values for MD buffer */
-#define I1 0xefcdab89
-#define I2 0x98badcfe
-#define I3 0x10325476
-#define C2 013240474631 /* round 2 constant = sqrt(2) in octal */
-#define C3 015666365641 /* round 3 constant = sqrt(3) in octal */
-/* C2 and C3 are from Knuth, The Art of Programming, Volume 2
-** (Seminumerical Algorithms), Second Edition (1981), Addison-Wesley.
-** Table 2, page 660.
-*/
-
-#define fs1 3 /* round 1 shift amounts */
-#define fs2 7
-#define fs3 11
-#define fs4 19
-#define gs1 3 /* round 2 shift amounts */
-#define gs2 5
-#define gs3 9
-#define gs4 13
-#define hs1 3 /* round 3 shift amounts */
-#define hs2 9
-#define hs3 11
-#define hs4 15
-
-/* Compile-time macro declarations for MD4.
-** Note: The "rot" operator uses the variable "tmp".
-** It assumes tmp is declared as unsigned int, so that the >>
-** operator will shift in zeros rather than extending the sign bit.
-*/
-#define f(X,Y,Z) ((X&Y) | ((~X)&Z))
-#define g(X,Y,Z) ((X&Y) | (X&Z) | (Y&Z))
-#define h(X,Y,Z) (X^Y^Z)
-#define rot(X,S) (tmp=X,(tmp<<S) | (tmp>>(32-S)))
-#define ff(A,B,C,D,i,s) A = rot((A + f(B,C,D) + X[i]),s)
-#define gg(A,B,C,D,i,s) A = rot((A + g(B,C,D) + X[i] + C2),s)
-#define hh(A,B,C,D,i,s) A = rot((A + h(B,C,D) + X[i] + C3),s)
-
-/* MD4print(MDp)
-** Print message digest buffer MDp as 32 hexadecimal digits.
-** Order is from low-order byte of buffer[0] to high-order byte of
-** buffer[3].
-** Each byte is printed with high-order hexadecimal digit first.
-** This is a user-callable routine.
-*/
-void
-MD4Print(MDp)
-MD4_CTX *MDp;
-{
- int i,j;
- for (i=0;i<4;i++)
- for (j=0;j<32;j=j+8)
- printf("%02x",(MDp->buffer[i]>>j) & 0xFF);
-}
-
-/* MD4Init(MDp)
-** Initialize message digest buffer MDp.
-** This is a user-callable routine.
-*/
-void
-MD4Init(MDp)
-MD4_CTX *MDp;
-{
- int i;
- MDp->buffer[0] = I0;
- MDp->buffer[1] = I1;
- MDp->buffer[2] = I2;
- MDp->buffer[3] = I3;
- for (i=0;i<8;i++) MDp->count[i] = 0;
- MDp->done = 0;
-}
-
-/* MDblock(MDp,X)
-** Update message digest buffer MDp->buffer using 16-word data block X.
-** Assumes all 16 words of X are full of data.
-** Does not update MDp->count.
-** This routine is not user-callable.
-*/
-static void
-MDblock(MDp,Xb)
-MD4_CTX *MDp;
-unsigned char *Xb;
-{
- register unsigned int tmp, A, B, C, D;
- unsigned int X[16];
- int i;
-
- for (i = 0; i < 16; ++i) {
- X[i] = Xb[0] + (Xb[1] << 8) + (Xb[2] << 16) + (Xb[3] << 24);
- Xb += 4;
- }
-
- A = MDp->buffer[0];
- B = MDp->buffer[1];
- C = MDp->buffer[2];
- D = MDp->buffer[3];
- /* Update the message digest buffer */
- ff(A , B , C , D , 0 , fs1); /* Round 1 */
- ff(D , A , B , C , 1 , fs2);
- ff(C , D , A , B , 2 , fs3);
- ff(B , C , D , A , 3 , fs4);
- ff(A , B , C , D , 4 , fs1);
- ff(D , A , B , C , 5 , fs2);
- ff(C , D , A , B , 6 , fs3);
- ff(B , C , D , A , 7 , fs4);
- ff(A , B , C , D , 8 , fs1);
- ff(D , A , B , C , 9 , fs2);
- ff(C , D , A , B , 10 , fs3);
- ff(B , C , D , A , 11 , fs4);
- ff(A , B , C , D , 12 , fs1);
- ff(D , A , B , C , 13 , fs2);
- ff(C , D , A , B , 14 , fs3);
- ff(B , C , D , A , 15 , fs4);
- gg(A , B , C , D , 0 , gs1); /* Round 2 */
- gg(D , A , B , C , 4 , gs2);
- gg(C , D , A , B , 8 , gs3);
- gg(B , C , D , A , 12 , gs4);
- gg(A , B , C , D , 1 , gs1);
- gg(D , A , B , C , 5 , gs2);
- gg(C , D , A , B , 9 , gs3);
- gg(B , C , D , A , 13 , gs4);
- gg(A , B , C , D , 2 , gs1);
- gg(D , A , B , C , 6 , gs2);
- gg(C , D , A , B , 10 , gs3);
- gg(B , C , D , A , 14 , gs4);
- gg(A , B , C , D , 3 , gs1);
- gg(D , A , B , C , 7 , gs2);
- gg(C , D , A , B , 11 , gs3);
- gg(B , C , D , A , 15 , gs4);
- hh(A , B , C , D , 0 , hs1); /* Round 3 */
- hh(D , A , B , C , 8 , hs2);
- hh(C , D , A , B , 4 , hs3);
- hh(B , C , D , A , 12 , hs4);
- hh(A , B , C , D , 2 , hs1);
- hh(D , A , B , C , 10 , hs2);
- hh(C , D , A , B , 6 , hs3);
- hh(B , C , D , A , 14 , hs4);
- hh(A , B , C , D , 1 , hs1);
- hh(D , A , B , C , 9 , hs2);
- hh(C , D , A , B , 5 , hs3);
- hh(B , C , D , A , 13 , hs4);
- hh(A , B , C , D , 3 , hs1);
- hh(D , A , B , C , 11 , hs2);
- hh(C , D , A , B , 7 , hs3);
- hh(B , C , D , A , 15 , hs4);
- MDp->buffer[0] += A;
- MDp->buffer[1] += B;
- MDp->buffer[2] += C;
- MDp->buffer[3] += D;
-}
-
-/* MD4Update(MDp,X,count)
-** Input: X -- a pointer to an array of unsigned characters.
-** count -- the number of bits of X to use.
-** (if not a multiple of 8, uses high bits of last byte.)
-** Update MDp using the number of bits of X given by count.
-** This is the basic input routine for an MD4 user.
-** The routine completes the MD computation when count < 512, so
-** every MD computation should end with one call to MD4Update with a
-** count less than 512. A call with count 0 will be ignored if the
-** MD has already been terminated (done != 0), so an extra call with
-** count 0 can be given as a "courtesy close" to force termination
-** if desired.
-*/
-void
-MD4Update(MDp,X,count)
-MD4_CTX *MDp;
-unsigned char *X;
-unsigned int count;
-{
- unsigned int i, tmp, bit, byte, mask;
- unsigned char XX[64];
- unsigned char *p;
-
- /* return with no error if this is a courtesy close with count
- ** zero and MDp->done is true.
- */
- if (count == 0 && MDp->done) return;
- /* check to see if MD is already done and report error */
- if (MDp->done)
- { printf("\nError: MD4Update MD already done."); return; }
-
- /* Add count to MDp->count */
- tmp = count;
- p = MDp->count;
- while (tmp)
- { tmp += *p;
- *p++ = tmp;
- tmp = tmp >> 8;
- }
-
- /* Process data */
- if (count == 512)
- { /* Full block of data to handle */
- MDblock(MDp,X);
- }
- else if (count > 512) /* Check for count too large */
- {
- printf("\nError: MD4Update called with illegal count value %d.",
- count);
- return;
- }
- else /* partial block -- must be last block so finish up */
- {
- /* Find out how many bytes and residual bits there are */
- byte = count >> 3;
- bit = count & 7;
- /* Copy X into XX since we need to modify it */
- for (i=0;i<=byte;i++) XX[i] = X[i];
- for (i=byte+1;i<64;i++) XX[i] = 0;
- /* Add padding '1' bit and low-order zeros in last byte */
- mask = 1 << (7 - bit);
- XX[byte] = (XX[byte] | mask) & ~( mask - 1);
- /* If room for bit count, finish up with this block */
- if (byte <= 55)
- {
- for (i=0;i<8;i++) XX[56+i] = MDp->count[i];
- MDblock(MDp,XX);
- }
- else /* need to do two blocks to finish up */
- {
- MDblock(MDp,XX);
- for (i=0;i<56;i++) XX[i] = 0;
- for (i=0;i<8;i++) XX[56+i] = MDp->count[i];
- MDblock(MDp,XX);
- }
- /* Set flag saying we're done with MD computation */
- MDp->done = 1;
- }
-}
-
-/*
-** Finish up MD4 computation and return message digest.
-*/
-void
-MD4Final(buf, MD)
-unsigned char *buf;
-MD4_CTX *MD;
-{
- int i, j;
- unsigned int w;
-
- MD4Update(MD, NULL, 0);
- for (i = 0; i < 4; ++i) {
- w = MD->buffer[i];
- for (j = 0; j < 4; ++j) {
- *buf++ = w;
- w >>= 8;
- }
- }
-}
-
-/*
-** End of md4.c
-****************************(cut)***********************************/
diff --git a/cpukit/pppd/md4.h b/cpukit/pppd/md4.h
deleted file mode 100644
index 80e8f9a2ac..0000000000
--- a/cpukit/pppd/md4.h
+++ /dev/null
@@ -1,64 +0,0 @@
-
-/*
-** ********************************************************************
-** md4.h -- Header file for implementation of **
-** MD4 Message Digest Algorithm **
-** Updated: 2/13/90 by Ronald L. Rivest **
-** (C) 1990 RSA Data Security, Inc. **
-** ********************************************************************
-*/
-
-#ifndef __P
-# if defined(__STDC__) || defined(__GNUC__)
-# define __P(x) x
-# else
-# define __P(x) ()
-# endif
-#endif
-
-
-/* MDstruct is the data structure for a message digest computation.
-*/
-typedef struct {
- unsigned int buffer[4]; /* Holds 4-word result of MD computation */
- unsigned char count[8]; /* Number of bits processed so far */
- unsigned int done; /* Nonzero means MD computation finished */
-} MD4_CTX;
-
-/* MD4Init(MD4_CTX *)
-** Initialize the MD4_CTX prepatory to doing a message digest
-** computation.
-*/
-extern void MD4Init __P((MD4_CTX *MD));
-
-/* MD4Update(MD,X,count)
-** Input: X -- a pointer to an array of unsigned characters.
-** count -- the number of bits of X to use (an unsigned int).
-** Updates MD using the first "count" bits of X.
-** The array pointed to by X is not modified.
-** If count is not a multiple of 8, MD4Update uses high bits of
-** last byte.
-** This is the basic input routine for a user.
-** The routine terminates the MD computation when count < 512, so
-** every MD computation should end with one call to MD4Update with a
-** count less than 512. Zero is OK for a count.
-*/
-extern void MD4Update __P((MD4_CTX *MD, unsigned char *X, unsigned int count));
-
-/* MD4Print(MD)
-** Prints message digest buffer MD as 32 hexadecimal digits.
-** Order is from low-order byte of buffer[0] to high-order byte
-** of buffer[3].
-** Each byte is printed with high-order hexadecimal digit first.
-*/
-extern void MD4Print __P((MD4_CTX *));
-
-/* MD4Final(buf, MD)
-** Returns message digest from MD and terminates the message
-** digest computation.
-*/
-extern void MD4Final __P((unsigned char *, MD4_CTX *));
-
-/*
-** End of md4.h
-****************************(cut)***********************************/
diff --git a/cpukit/pppd/md5.c b/cpukit/pppd/md5.c
deleted file mode 100644
index db48023c5b..0000000000
--- a/cpukit/pppd/md5.c
+++ /dev/null
@@ -1,306 +0,0 @@
-
-
-/*
- ***********************************************************************
- ** md5.c -- the source code for MD5 routines **
- ** RSA Data Security, Inc. MD5 Message-Digest Algorithm **
- ** Created: 2/17/90 RLR **
- ** Revised: 1/91 SRD,AJ,BSK,JT Reference C ver., 7/10 constant corr. **
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- ** Copyright (C) 1990, RSA Data Security, Inc. All rights reserved. **
- ** **
- ** License to copy and use this software is granted provided that **
- ** it is identified as the "RSA Data Security, Inc. MD5 Message- **
- ** Digest Algorithm" in all material mentioning or referencing this **
- ** software or this function. **
- ** **
- ** License is also granted to make and use derivative works **
- ** provided that such works are identified as "derived from the RSA **
- ** Data Security, Inc. MD5 Message-Digest Algorithm" in all **
- ** material mentioning or referencing the derived work. **
- ** **
- ** RSA Data Security, Inc. makes no representations concerning **
- ** either the merchantability of this software or the suitability **
- ** of this software for any particular purpose. It is provided "as **
- ** is" without express or implied warranty of any kind. **
- ** **
- ** These notices must be retained in any copies of any part of this **
- ** documentation and/or software. **
- ***********************************************************************
- */
-
-#include "md5.h"
-
-/*
- ***********************************************************************
- ** Message-digest routines: **
- ** To form the message digest for a message M **
- ** (1) Initialize a context buffer mdContext using MD5Init **
- ** (2) Call MD5Update on mdContext and M **
- ** (3) Call MD5Final on mdContext **
- ** The message digest is now in mdContext->digest[0...15] **
- ***********************************************************************
- */
-
-/* forward declaration */
-static void Transform ();
-
-static unsigned char PADDING[64] = {
- 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
-};
-
-/* F, G, H and I are basic MD5 functions */
-#define F(x, y, z) (((x) & (y)) | ((~x) & (z)))
-#define G(x, y, z) (((x) & (z)) | ((y) & (~z)))
-#define H(x, y, z) ((x) ^ (y) ^ (z))
-#define I(x, y, z) ((y) ^ ((x) | (~z)))
-
-/* ROTATE_LEFT rotates x left n bits */
-#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n))))
-
-/* FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4 */
-/* Rotation is separate from addition to prevent recomputation */
-#define FF(a, b, c, d, x, s, ac) \
- {(a) += F ((b), (c), (d)) + (x) + (UINT4)(ac); \
- (a) = ROTATE_LEFT ((a), (s)); \
- (a) += (b); \
- }
-#define GG(a, b, c, d, x, s, ac) \
- {(a) += G ((b), (c), (d)) + (x) + (UINT4)(ac); \
- (a) = ROTATE_LEFT ((a), (s)); \
- (a) += (b); \
- }
-#define HH(a, b, c, d, x, s, ac) \
- {(a) += H ((b), (c), (d)) + (x) + (UINT4)(ac); \
- (a) = ROTATE_LEFT ((a), (s)); \
- (a) += (b); \
- }
-#define II(a, b, c, d, x, s, ac) \
- {(a) += I ((b), (c), (d)) + (x) + (UINT4)(ac); \
- (a) = ROTATE_LEFT ((a), (s)); \
- (a) += (b); \
- }
-
-#ifdef __STDC__
-#define UL(x) x##U
-#else
-#define UL(x) x
-#endif
-
-/* The routine MD5Init initializes the message-digest context
- mdContext. All fields are set to zero.
- */
-void MD5Init (mdContext)
-MD5_CTX *mdContext;
-{
- mdContext->i[0] = mdContext->i[1] = (UINT4)0;
-
- /* Load magic initialization constants.
- */
- mdContext->buf[0] = (UINT4)0x67452301;
- mdContext->buf[1] = (UINT4)0xefcdab89;
- mdContext->buf[2] = (UINT4)0x98badcfe;
- mdContext->buf[3] = (UINT4)0x10325476;
-}
-
-/* The routine MD5Update updates the message-digest context to
- account for the presence of each of the characters inBuf[0..inLen-1]
- in the message whose digest is being computed.
- */
-void MD5Update (mdContext, inBuf, inLen)
-MD5_CTX *mdContext;
-unsigned char *inBuf;
-unsigned int inLen;
-{
- UINT4 in[16];
- int mdi;
- unsigned int i, ii;
-
- /* compute number of bytes mod 64 */
- mdi = (int)((mdContext->i[0] >> 3) & 0x3F);
-
- /* update number of bits */
- if ((mdContext->i[0] + ((UINT4)inLen << 3)) < mdContext->i[0])
- mdContext->i[1]++;
- mdContext->i[0] += ((UINT4)inLen << 3);
- mdContext->i[1] += ((UINT4)inLen >> 29);
-
- while (inLen--) {
- /* add new character to buffer, increment mdi */
- mdContext->in[mdi++] = *inBuf++;
-
- /* transform if necessary */
- if (mdi == 0x40) {
- for (i = 0, ii = 0; i < 16; i++, ii += 4)
- in[i] = (((UINT4)mdContext->in[ii+3]) << 24) |
- (((UINT4)mdContext->in[ii+2]) << 16) |
- (((UINT4)mdContext->in[ii+1]) << 8) |
- ((UINT4)mdContext->in[ii]);
- Transform (mdContext->buf, in);
- mdi = 0;
- }
- }
-}
-
-/* The routine MD5Final terminates the message-digest computation and
- ends with the desired message digest in mdContext->digest[0...15].
- */
-void MD5Final (hash, mdContext)
-unsigned char hash[];
-MD5_CTX *mdContext;
-{
- UINT4 in[16];
- int mdi;
- unsigned int i, ii;
- unsigned int padLen;
-
- /* save number of bits */
- in[14] = mdContext->i[0];
- in[15] = mdContext->i[1];
-
- /* compute number of bytes mod 64 */
- mdi = (int)((mdContext->i[0] >> 3) & 0x3F);
-
- /* pad out to 56 mod 64 */
- padLen = (mdi < 56) ? (56 - mdi) : (120 - mdi);
- MD5Update (mdContext, PADDING, padLen);
-
- /* append length in bits and transform */
- for (i = 0, ii = 0; i < 14; i++, ii += 4)
- in[i] = (((UINT4)mdContext->in[ii+3]) << 24) |
- (((UINT4)mdContext->in[ii+2]) << 16) |
- (((UINT4)mdContext->in[ii+1]) << 8) |
- ((UINT4)mdContext->in[ii]);
- Transform (mdContext->buf, in);
-
- /* store buffer in digest */
- for (i = 0, ii = 0; i < 4; i++, ii += 4) {
- mdContext->digest[ii] = (unsigned char)(mdContext->buf[i] & 0xFF);
- mdContext->digest[ii+1] =
- (unsigned char)((mdContext->buf[i] >> 8) & 0xFF);
- mdContext->digest[ii+2] =
- (unsigned char)((mdContext->buf[i] >> 16) & 0xFF);
- mdContext->digest[ii+3] =
- (unsigned char)((mdContext->buf[i] >> 24) & 0xFF);
- }
- memcpy(hash, mdContext->digest, 16);
-}
-
-/* Basic MD5 step. Transforms buf based on in.
- */
-static void Transform (buf, in)
-UINT4 *buf;
-UINT4 *in;
-{
- UINT4 a = buf[0], b = buf[1], c = buf[2], d = buf[3];
-
- /* Round 1 */
-#define S11 7
-#define S12 12
-#define S13 17
-#define S14 22
- FF ( a, b, c, d, in[ 0], S11, UL(3614090360)); /* 1 */
- FF ( d, a, b, c, in[ 1], S12, UL(3905402710)); /* 2 */
- FF ( c, d, a, b, in[ 2], S13, UL( 606105819)); /* 3 */
- FF ( b, c, d, a, in[ 3], S14, UL(3250441966)); /* 4 */
- FF ( a, b, c, d, in[ 4], S11, UL(4118548399)); /* 5 */
- FF ( d, a, b, c, in[ 5], S12, UL(1200080426)); /* 6 */
- FF ( c, d, a, b, in[ 6], S13, UL(2821735955)); /* 7 */
- FF ( b, c, d, a, in[ 7], S14, UL(4249261313)); /* 8 */
- FF ( a, b, c, d, in[ 8], S11, UL(1770035416)); /* 9 */
- FF ( d, a, b, c, in[ 9], S12, UL(2336552879)); /* 10 */
- FF ( c, d, a, b, in[10], S13, UL(4294925233)); /* 11 */
- FF ( b, c, d, a, in[11], S14, UL(2304563134)); /* 12 */
- FF ( a, b, c, d, in[12], S11, UL(1804603682)); /* 13 */
- FF ( d, a, b, c, in[13], S12, UL(4254626195)); /* 14 */
- FF ( c, d, a, b, in[14], S13, UL(2792965006)); /* 15 */
- FF ( b, c, d, a, in[15], S14, UL(1236535329)); /* 16 */
-
- /* Round 2 */
-#define S21 5
-#define S22 9
-#define S23 14
-#define S24 20
- GG ( a, b, c, d, in[ 1], S21, UL(4129170786)); /* 17 */
- GG ( d, a, b, c, in[ 6], S22, UL(3225465664)); /* 18 */
- GG ( c, d, a, b, in[11], S23, UL( 643717713)); /* 19 */
- GG ( b, c, d, a, in[ 0], S24, UL(3921069994)); /* 20 */
- GG ( a, b, c, d, in[ 5], S21, UL(3593408605)); /* 21 */
- GG ( d, a, b, c, in[10], S22, UL( 38016083)); /* 22 */
- GG ( c, d, a, b, in[15], S23, UL(3634488961)); /* 23 */
- GG ( b, c, d, a, in[ 4], S24, UL(3889429448)); /* 24 */
- GG ( a, b, c, d, in[ 9], S21, UL( 568446438)); /* 25 */
- GG ( d, a, b, c, in[14], S22, UL(3275163606)); /* 26 */
- GG ( c, d, a, b, in[ 3], S23, UL(4107603335)); /* 27 */
- GG ( b, c, d, a, in[ 8], S24, UL(1163531501)); /* 28 */
- GG ( a, b, c, d, in[13], S21, UL(2850285829)); /* 29 */
- GG ( d, a, b, c, in[ 2], S22, UL(4243563512)); /* 30 */
- GG ( c, d, a, b, in[ 7], S23, UL(1735328473)); /* 31 */
- GG ( b, c, d, a, in[12], S24, UL(2368359562)); /* 32 */
-
- /* Round 3 */
-#define S31 4
-#define S32 11
-#define S33 16
-#define S34 23
- HH ( a, b, c, d, in[ 5], S31, UL(4294588738)); /* 33 */
- HH ( d, a, b, c, in[ 8], S32, UL(2272392833)); /* 34 */
- HH ( c, d, a, b, in[11], S33, UL(1839030562)); /* 35 */
- HH ( b, c, d, a, in[14], S34, UL(4259657740)); /* 36 */
- HH ( a, b, c, d, in[ 1], S31, UL(2763975236)); /* 37 */
- HH ( d, a, b, c, in[ 4], S32, UL(1272893353)); /* 38 */
- HH ( c, d, a, b, in[ 7], S33, UL(4139469664)); /* 39 */
- HH ( b, c, d, a, in[10], S34, UL(3200236656)); /* 40 */
- HH ( a, b, c, d, in[13], S31, UL( 681279174)); /* 41 */
- HH ( d, a, b, c, in[ 0], S32, UL(3936430074)); /* 42 */
- HH ( c, d, a, b, in[ 3], S33, UL(3572445317)); /* 43 */
- HH ( b, c, d, a, in[ 6], S34, UL( 76029189)); /* 44 */
- HH ( a, b, c, d, in[ 9], S31, UL(3654602809)); /* 45 */
- HH ( d, a, b, c, in[12], S32, UL(3873151461)); /* 46 */
- HH ( c, d, a, b, in[15], S33, UL( 530742520)); /* 47 */
- HH ( b, c, d, a, in[ 2], S34, UL(3299628645)); /* 48 */
-
- /* Round 4 */
-#define S41 6
-#define S42 10
-#define S43 15
-#define S44 21
- II ( a, b, c, d, in[ 0], S41, UL(4096336452)); /* 49 */
- II ( d, a, b, c, in[ 7], S42, UL(1126891415)); /* 50 */
- II ( c, d, a, b, in[14], S43, UL(2878612391)); /* 51 */
- II ( b, c, d, a, in[ 5], S44, UL(4237533241)); /* 52 */
- II ( a, b, c, d, in[12], S41, UL(1700485571)); /* 53 */
- II ( d, a, b, c, in[ 3], S42, UL(2399980690)); /* 54 */
- II ( c, d, a, b, in[10], S43, UL(4293915773)); /* 55 */
- II ( b, c, d, a, in[ 1], S44, UL(2240044497)); /* 56 */
- II ( a, b, c, d, in[ 8], S41, UL(1873313359)); /* 57 */
- II ( d, a, b, c, in[15], S42, UL(4264355552)); /* 58 */
- II ( c, d, a, b, in[ 6], S43, UL(2734768916)); /* 59 */
- II ( b, c, d, a, in[13], S44, UL(1309151649)); /* 60 */
- II ( a, b, c, d, in[ 4], S41, UL(4149444226)); /* 61 */
- II ( d, a, b, c, in[11], S42, UL(3174756917)); /* 62 */
- II ( c, d, a, b, in[ 2], S43, UL( 718787259)); /* 63 */
- II ( b, c, d, a, in[ 9], S44, UL(3951481745)); /* 64 */
-
- buf[0] += a;
- buf[1] += b;
- buf[2] += c;
- buf[3] += d;
-}
-
-/*
- ***********************************************************************
- ** End of md5.c **
- ******************************** (cut) ********************************
- */
diff --git a/cpukit/pppd/md5.h b/cpukit/pppd/md5.h
deleted file mode 100644
index 7492b2228e..0000000000
--- a/cpukit/pppd/md5.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- ***********************************************************************
- ** md5.h -- header file for implementation of MD5 **
- ** RSA Data Security, Inc. MD5 Message-Digest Algorithm **
- ** Created: 2/17/90 RLR **
- ** Revised: 12/27/90 SRD,AJ,BSK,JT Reference C version **
- ** Revised (for MD5): RLR 4/27/91 **
- ** -- G modified to have y&~z instead of y&z **
- ** -- FF, GG, HH modified to add in last register done **
- ** -- Access pattern: round 2 works mod 5, round 3 works mod 3 **
- ** -- distinct additive constant for each step **
- ** -- round 4 added, working mod 7 **
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- ** Copyright (C) 1990, RSA Data Security, Inc. All rights reserved. **
- ** **
- ** License to copy and use this software is granted provided that **
- ** it is identified as the "RSA Data Security, Inc. MD5 Message- **
- ** Digest Algorithm" in all material mentioning or referencing this **
- ** software or this function. **
- ** **
- ** License is also granted to make and use derivative works **
- ** provided that such works are identified as "derived from the RSA **
- ** Data Security, Inc. MD5 Message-Digest Algorithm" in all **
- ** material mentioning or referencing the derived work. **
- ** **
- ** RSA Data Security, Inc. makes no representations concerning **
- ** either the merchantability of this software or the suitability **
- ** of this software for any particular purpose. It is provided "as **
- ** is" without express or implied warranty of any kind. **
- ** **
- ** These notices must be retained in any copies of any part of this **
- ** documentation and/or software. **
- ***********************************************************************
- */
-
-#ifndef __MD5_INCLUDE__
-
-/* typedef a 32-bit type */
-typedef unsigned int UINT4;
-
-/* Data structure for MD5 (Message-Digest) computation */
-typedef struct {
- UINT4 i[2]; /* number of _bits_ handled mod 2^64 */
- UINT4 buf[4]; /* scratch buffer */
- unsigned char in[64]; /* input buffer */
- unsigned char digest[16]; /* actual digest after MD5Final call */
-} MD5_CTX;
-
-void MD5Init ();
-void MD5Update ();
-void MD5Final ();
-
-#define __MD5_INCLUDE__
-#endif /* __MD5_INCLUDE__ */
diff --git a/cpukit/pppd/options.c b/cpukit/pppd/options.c
deleted file mode 100644
index 6eafb89eca..0000000000
--- a/cpukit/pppd/options.c
+++ /dev/null
@@ -1,393 +0,0 @@
-/*
- * options.c - handles option processing for PPP.
- *
- * Copyright (c) 1989 Carnegie Mellon University.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by Carnegie Mellon University. The name of the
- * University may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#ifndef lint
-/* static char rcsid[] = "$Id$"; */
-#endif
-
-#include <ctype.h>
-#include <stdio.h>
-#include <errno.h>
-#include <unistd.h>
-#include <limits.h>
-/* #include <stdlib.h> */
-#include <termios.h>
-#include <syslog.h>
-#include <string.h>
-#include <netdb.h>
-#include <pwd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#ifdef PPP_FILTER
-#include <pcap.h>
-#include <pcap-int.h> /* XXX: To get struct pcap */
-#endif
-
-#include "pppd.h"
-#include "pathnames.h"
-#include "patchlevel.h"
-#include "fsm.h"
-#include "lcp.h"
-#include "ipcp.h"
-#include "upap.h"
-#include "chap.h"
-#include "ccp.h"
-#ifdef CBCP_SUPPORT
-#include "cbcp.h"
-#endif
-
-#ifdef IPX_CHANGE
-#include "ipxcp.h"
-#endif /* IPX_CHANGE */
-
-#include <net/ppp-comp.h>
-
-#define FALSE 0
-#define TRUE 1
-
-
-#ifndef GIDSET_TYPE
-#define GIDSET_TYPE gid_t
-#endif
-#if 0
-static int privileged_option; /* set iff the current option came from root */
-static char *option_source; /* string saying where the option came from */
-#endif
-
-/*
- * Option variables and default values.
- */
-#ifdef PPP_FILTER
-int dflag = 0; /* Tell libpcap we want debugging */
-#endif
-int debug = 1; /* Debug flag */
-int kdebugflag = 1; /* Tell kernel to print debug messages */
-int default_device = 1; /* Using /dev/tty or equivalent */
-char devnam[MAXPATHLEN] = "/dev/sccppp"; /* Device name */
-int crtscts = 0; /* Use hardware flow control */
-int modem = 0; /* Use modem control lines */
-int inspeed = B115200; /* Input/Output speed requested */
-u_int32_t netmask = 0; /* IP netmask to set on interface */
-int lockflag = 0; /* Create lock file to lock the serial dev */
-int nodetach = 0; /* Don't detach from controlling tty */
-char *connector[]={"TIMEOUT","3","ABORT","\nBUSY\r","ABORT","\nNO DIALTONE\r","ABORT","\nNO CARRIER\r","ABORT","\nNO ANSWER\r","ABORT","\nRINGING\r\n\r\nRINGING\r",
- "","\rAT","OK-+++\\c-OK","ATH0","TIMEOUT","30","OK","ATDT13","CONNECT",""};
-/*char *connector[]={"TIMEOUT","3","ABORT","\nBUSY\r","ABORT","\nNO DIALTONE\r","ABORT","\nNO CARRIER\r","ABORT","\nNO ANSWER\r","ABORT","\nRINGING\r\n\r\nRINGING\r",
- "","\rAT","OK-+++\\c-OK","ATH0","TIMEOUT","30","OK","ATDT0202122","CONNECT","","ppp","","Username:","ppp","Password:","ppp"};
-*/
-char *disconnector []; /* Script to disestablish physical link */
-char *welcomer []; /* Script to run after phys link estab. */
-int maxconnect = 0; /* Maximum connect time */
-char user[MAXNAMELEN]="stb"; /* Username for PAP */
-char passwd[MAXSECRETLEN]="stb"; /* Password for PAP */
-int auth_required = 0; /* Peer is required to authenticate */
-int defaultroute = 1; /* assign default route through interface */
-int proxyarp = 0; /* Set up proxy ARP entry for peer */
-int persist = 1; /* Reopen link after it goes down */
-int uselogin = 0; /* Use /etc/passwd for checking PAP */
-int lcp_echo_interval = 0; /* Interval between LCP echo-requests */
-int lcp_echo_fails = 0; /* Tolerance to unanswered echo-requests */
-char our_name[MAXNAMELEN]="infotel"; /* Our name for authentication purposes */
-char remote_name[MAXNAMELEN]; /* Peer's name for authentication */
-int explicit_remote = 0; /* User specified explicit remote name */
-int usehostname = 0; /* Use hostname for our_name */
-int disable_defaultip = 1; /* Don't use hostname for default IP adrs */
-int demand = 0; /* do dial-on-demand */
-char *ipparam = NULL; /* Extra parameter for ip up/down scripts */
-int cryptpap; /* Passwords in pap-secrets are encrypted */
-int idle_time_limit = 0; /* Disconnect if idle for this many seconds */
-int holdoff = 30; /* # seconds to pause before reconnecting */
-int refuse_pap = 0; /* Set to say we won't do PAP */
-int refuse_chap = 1; /* Set to say we won't do CHAP */
-
-#ifdef MSLANMAN
-int ms_lanman = 0; /* Nonzero if use LanMan password instead of NT */
- /* Has meaning only with MS-CHAP challenges */
-#endif
-
-struct option_info auth_req_info;
-struct option_info connector_info;
-struct option_info disconnector_info;
-struct option_info welcomer_info;
-struct option_info devnam_info;
-#ifdef PPP_FILTER
-struct bpf_program pass_filter;/* Filter program for packets to pass */
-struct bpf_program active_filter; /* Filter program for link-active pkts */
-pcap_t pc; /* Fake struct pcap so we can compile expr */
-#endif
-
-/*
- * Prototypes
- */
-#if 0
-static int setdevname __P((char *, int));
-static int setipaddr __P((char *));
-static int setspeed __P((char *));
-static int setdebug __P((char **));
-static int setkdebug __P((char **));
-static int setpassive __P((char **));
-static int setsilent __P((char **));
-static int noopt __P((char **));
-static int setnovj __P((char **));
-static int setnovjccomp __P((char **));
-static int setvjslots __P((char **));
-static int reqpap __P((char **));
-static int nopap __P((char **));
-#ifdef OLD_OPTIONS
-static int setupapfile __P((char **));
-#endif
-static int nochap __P((char **));
-static int reqchap __P((char **));
-static int noaccomp __P((char **));
-static int noasyncmap __P((char **));
-static int noip __P((char **));
-static int nomagicnumber __P((char **));
-static int setasyncmap __P((char **));
-static int setescape __P((char **));
-static int setmru __P((char **));
-static int setmtu __P((char **));
-#ifdef CBCP_SUPPORT
-static int setcbcp __P((char **));
-#endif
-static int nomru __P((char **));
-static int nopcomp __P((char **));
-static int setconnector __P((char **));
-static int setdisconnector __P((char **));
-static int setwelcomer __P((char **));
-static int setmaxconnect __P((char **));
-static int setdomain __P((char **));
-static int setnetmask __P((char **));
-static int setcrtscts __P((char **));
-static int setnocrtscts __P((char **));
-static int setxonxoff __P((char **));
-static int setnodetach __P((char **));
-static int setupdetach __P((char **));
-static int setmodem __P((char **));
-static int setlocal __P((char **));
-static int setlock __P((char **));
-static int setname __P((char **));
-static int setuser __P((char **));
-static int setremote __P((char **));
-static int setauth __P((char **));
-static int setnoauth __P((char **));
-static int readfile __P((char **));
-static int callfile __P((char **));
-static int setdefaultroute __P((char **));
-static int setnodefaultroute __P((char **));
-static int setproxyarp __P((char **));
-static int setnoproxyarp __P((char **));
-static int setpersist __P((char **));
-static int setnopersist __P((char **));
-static int setdologin __P((char **));
-static int setusehostname __P((char **));
-static int setnoipdflt __P((char **));
-static int setlcptimeout __P((char **));
-static int setlcpterm __P((char **));
-static int setlcpconf __P((char **));
-static int setlcpfails __P((char **));
-static int setipcptimeout __P((char **));
-static int setipcpterm __P((char **));
-static int setipcpconf __P((char **));
-static int setipcpfails __P((char **));
-static int setpaptimeout __P((char **));
-static int setpapreqs __P((char **));
-static int setpapreqtime __P((char **));
-static int setchaptimeout __P((char **));
-static int setchapchal __P((char **));
-static int setchapintv __P((char **));
-static int setipcpaccl __P((char **));
-static int setipcpaccr __P((char **));
-static int setlcpechointv __P((char **));
-static int setlcpechofails __P((char **));
-static int noccp __P((char **));
-static int setbsdcomp __P((char **));
-static int setnobsdcomp __P((char **));
-static int setdeflate __P((char **));
-static int setnodeflate __P((char **));
-static int setnodeflatedraft __P((char **));
-static int setdemand __P((char **));
-static int setpred1comp __P((char **));
-static int setnopred1comp __P((char **));
-static int setipparam __P((char **));
-static int setpapcrypt __P((char **));
-static int setidle __P((char **));
-static int setholdoff __P((char **));
-static int setdnsaddr __P((char **));
-static int resetipxproto __P((char **));
-static int setwinsaddr __P((char **));
-static int showversion __P((char **));
-static int showhelp __P((char **));
-
-#ifdef PPP_FILTER
-static int setpdebug __P((char **));
-static int setpassfilter __P((char **));
-static int setactivefilter __P((char **));
-#endif
-
-#ifdef IPX_CHANGE
-static int setipxproto __P((char **));
-static int setipxanet __P((char **));
-static int setipxalcl __P((char **));
-static int setipxarmt __P((char **));
-static int setipxnetwork __P((char **));
-static int setipxnode __P((char **));
-static int setipxrouter __P((char **));
-static int setipxname __P((char **));
-static int setipxcptimeout __P((char **));
-static int setipxcpterm __P((char **));
-static int setipxcpconf __P((char **));
-static int setipxcpfails __P((char **));
-#endif /* IPX_CHANGE */
-
-#ifdef MSLANMAN
-static int setmslanman __P((char **));
-#endif
-
-static int number_option __P((char *, u_int32_t *, int));
-static int int_option __P((char *, int *));
-static int readable __P((int fd));
-#endif
-
-/*
- * Valid arguments.
- */
-
-/*
- * parse_args - parse a string of arguments from the command line.
- */
-int
-parse_args(argc, argv)
- int argc;
- char **argv;
-{
-
-
-return 0;
-}
-
-/*
- * scan_args - scan the command line arguments to get the tty name,
- * if specified.
- */
-
-/*
- * usage - print out a message telling how to use the program.
- */
-void
-usage()
-{
- }
-
-/*
- * showhelp - print out usage message and exit.
- */
-static int
-showhelp(argv)
- char **argv;
-{
- return 0;
-}
-
-/*
- * showversion - print out the version number and exit.
- */
-static int
-showversion(argv)
- char **argv;
-{
- return 0;
-}
-
-void
-option_error __V((char *fmt, ...))
-{
-}
-/*
- * readable - check if a file is readable by the real user.
- */
-/*static int
-readable(fd)
- int fd;
-{
- uid_t uid;
- int ngroups, i;
- struct stat sbuf;
- GIDSET_TYPE groups[NGROUPS_MAX];
-
- uid = getuid();
- if (uid == 0)
- return 1;
- if (fstat(fd, &sbuf) != 0)
- return 0;
- if (sbuf.st_uid == uid)
- return sbuf.st_mode & S_IRUSR;
- if (sbuf.st_gid == getgid())
- return sbuf.st_mode & S_IRGRP;
- ngroups = getgroups(NGROUPS_MAX, groups);
- for (i = 0; i < ngroups; ++i)
- if (sbuf.st_gid == groups[i])
- return sbuf.st_mode & S_IRGRP;
- return sbuf.st_mode & S_IROTH;
-}
-*/
-/*
- * Read a word from a file.
- * Words are delimited by white-space or by quotes (" or ').
- * Quotes, white-space and \ may be escaped with \.
- * \<newline> is ignored.
- */
-
- /*
- * The following procedures parse options.
- */
-
-/*
- * readfile - take commands from a file.
- */
-
-/*
- * callfile - take commands from /etc/ppp/peers/<name>.
- * Name may not contain /../, start with / or ../, or end in /..
- */
- /*
- * setdebug - Set debug (command line argument).
- */
-
-
-/*
- * noopt - Disable all options.
- */
-static int
-noopt(argv)
- char **argv;
-{
- BZERO((char *) &lcp_wantoptions[0], sizeof (struct lcp_options));
- BZERO((char *) &lcp_allowoptions[0], sizeof (struct lcp_options));
- BZERO((char *) &ipcp_wantoptions[0], sizeof (struct ipcp_options));
- BZERO((char *) &ipcp_allowoptions[0], sizeof (struct ipcp_options));
-
-#ifdef IPX_CHANGE
- BZERO((char *) &ipxcp_wantoptions[0], sizeof (struct ipxcp_options));
- BZERO((char *) &ipxcp_allowoptions[0], sizeof (struct ipxcp_options));
-#endif /* IPX_CHANGE */
-
- return (1);
-}
diff --git a/cpukit/pppd/patchlevel.h b/cpukit/pppd/patchlevel.h
deleted file mode 100644
index 02bf115c52..0000000000
--- a/cpukit/pppd/patchlevel.h
+++ /dev/null
@@ -1,6 +0,0 @@
-/* $Id$ */
-#define PATCHLEVEL 5
-
-#define VERSION "2.3"
-#define IMPLEMENTATION ""
-#define DATE "4 May 1998"
diff --git a/cpukit/pppd/pathnames.h b/cpukit/pppd/pathnames.h
deleted file mode 100644
index b954204f5c..0000000000
--- a/cpukit/pppd/pathnames.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * define path names
- *
- * $Id$
- */
-
-#ifdef HAVE_PATHS_H
-#include <paths.h>
-
-#else
-#define _PATH_VARRUN "/etc/ppp/"
-#define _PATH_DEVNULL "/dev/null"
-#endif
-
-#define _PATH_UPAPFILE "/etc/ppp/pap-secrets"
-#define _PATH_CHAPFILE "/etc/ppp/chap-secrets"
-#define _PATH_SYSOPTIONS "/etc/ppp/options"
-#define _PATH_IPUP "/etc/ppp/ip-up"
-#define _PATH_IPDOWN "/etc/ppp/ip-down"
-#define _PATH_AUTHUP "/etc/ppp/auth-up"
-#define _PATH_AUTHDOWN "/etc/ppp/auth-down"
-#define _PATH_TTYOPT "/etc/ppp/options."
-#define _PATH_CONNERRS "/etc/ppp/connect-errors"
-#define _PATH_USEROPT ".ppprc"
-#define _PATH_PEERFILES "/etc/ppp/peers/"
-
-#ifdef IPX_CHANGE
-#define _PATH_IPXUP "/etc/ppp/ipx-up"
-#define _PATH_IPXDOWN "/etc/ppp/ipx-down"
-#endif /* IPX_CHANGE */
diff --git a/cpukit/pppd/pppd.h b/cpukit/pppd/pppd.h
deleted file mode 100644
index 7c12e38ae5..0000000000
--- a/cpukit/pppd/pppd.h
+++ /dev/null
@@ -1,497 +0,0 @@
-/*
- * pppd.h - PPP daemon global declarations.
- *
- * Copyright (c) 1989 Carnegie Mellon University.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by Carnegie Mellon University. The name of the
- * University may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Id$
- */
-
-/*
- * TODO:
- */
-
-#ifndef __PPPD_H__
-#define __PPPD_H__
-
-#include <stdio.h> /* for FILE */
-#include <sys/param.h> /* for MAXPATHLEN and BSD4_4, if defined */
-#include <sys/types.h> /* for u_int32_t, if defined */
-#include <sys/time.h> /* for struct timeval */
-#include <net/ppp_defs.h>
-
-#if __STDC__
-#include <stdarg.h>
-#define __V(x) x
-#else
-#include <varargs.h>
-#define __V(x) (va_alist) va_dcl
-#define const
-#endif
-
-/*
- * Limits.
- */
-
-#define NUM_PPP 1 /* One PPP interface supported (per process) */
-#define MAXWORDLEN 1024 /* max length of word in file (incl null) */
-#define MAXARGS 1 /* max # args to a command */
-#define MAXNAMELEN 256 /* max length of hostname or name for auth */
-#define MAXSECRETLEN 256 /* max length of password or secret */
-
-/*
- * Global variables.
- */
-
-extern int hungup; /* Physical layer has disconnected */
-extern int interfunit; /* Interface unit number */
-extern char ifname[]; /* Interface name */
-extern int ttyfd; /* Serial device file descriptor */
-extern char hostname[]; /* Our hostname */
-extern u_char outpacket_buf[]; /* Buffer for outgoing packets */
-extern int phase; /* Current state of link - see values below */
-extern int baud_rate; /* Current link speed in bits/sec */
-extern char *progname; /* Name of this program */
-extern int redirect_stderr;/* Connector's stderr should go to file */
-extern char peer_authname[];/* Authenticated name of peer */
-extern int privileged; /* We were run by real-uid root */
-extern int need_holdoff; /* Need holdoff period after link terminates */
-extern char **script_env; /* Environment variables for scripts */
-extern int detached; /* Have detached from controlling tty */
-
-/*
- * Variables set by command-line options.
- */
-
-extern int debug; /* Debug flag */
-extern int kdebugflag; /* Tell kernel to print debug messages */
-extern int default_device; /* Using /dev/tty or equivalent */
-extern char devnam[]; /* Device name */
-extern int crtscts; /* Use hardware flow control */
-extern int modem; /* Use modem control lines */
-extern int inspeed; /* Input/Output speed requested */
-extern u_int32_t netmask; /* IP netmask to set on interface */
-extern int lockflag; /* Create lock file to lock the serial dev */
-extern int nodetach; /* Don't detach from controlling tty */
-extern char *connector[]; /* Script to establish physical link */
-extern char *disconnector[]; /* Script to disestablish physical link */
-extern char *welcomer[]; /* Script to welcome client after connection */
-extern int maxconnect; /* Maximum connect time (seconds) */
-extern char user[]; /* Our name for authenticating ourselves */
-extern char passwd[]; /* Password for PAP */
-extern int auth_required; /* Peer is required to authenticate */
-extern int proxyarp; /* Set up proxy ARP entry for peer */
-extern int persist; /* Reopen link after it goes down */
-extern int uselogin; /* Use /etc/passwd for checking PAP */
-extern int lcp_echo_interval; /* Interval between LCP echo-requests */
-extern int lcp_echo_fails; /* Tolerance to unanswered echo-requests */
-extern char our_name[]; /* Our name for authentication purposes */
-extern char remote_name[]; /* Peer's name for authentication */
-extern int explicit_remote;/* remote_name specified with remotename opt */
-extern int usehostname; /* Use hostname for our_name */
-extern int disable_defaultip; /* Don't use hostname for default IP adrs */
-extern int demand; /* Do dial-on-demand */
-extern char *ipparam; /* Extra parameter for ip up/down scripts */
-extern int cryptpap; /* Others' PAP passwords are encrypted */
-extern int idle_time_limit;/* Shut down link if idle for this long */
-extern int holdoff; /* Dead time before restarting */
-extern int refuse_pap; /* Don't wanna auth. ourselves with PAP */
-extern int refuse_chap; /* Don't wanna auth. ourselves with CHAP */
-#ifdef PPP_FILTER
-extern struct bpf_program pass_filter; /* Filter for pkts to pass */
-extern struct bpf_program active_filter; /* Filter for link-active pkts */
-#endif
-
-
-#ifdef MSLANMAN
-extern int ms_lanman; /* Nonzero if use LanMan password instead of NT */
- /* Has meaning only with MS-CHAP challenges */
-#endif
-
-/*
- * Values for phase.
- */
-#define PHASE_DEAD 0
-#define PHASE_INITIALIZE 1
-#define PHASE_DORMANT 2
-#define PHASE_ESTABLISH 3
-#define PHASE_AUTHENTICATE 4
-#define PHASE_CALLBACK 5
-#define PHASE_NETWORK 6
-#define PHASE_TERMINATE 7
-#define PHASE_HOLDOFF 8
-
-/*
- * The following struct gives the addresses of procedures to call
- * for a particular protocol.
- */
-struct protent {
- u_short protocol; /* PPP protocol number */
- /* Initialization procedure */
- void (*init) __P((int unit));
- /* Process a received packet */
- void (*input) __P((int unit, u_char *pkt, int len));
- /* Process a received protocol-reject */
- void (*protrej) __P((int unit));
- /* Lower layer has come up */
- void (*lowerup) __P((int unit));
- /* Lower layer has gone down */
- void (*lowerdown) __P((int unit));
- /* Open the protocol */
- void (*open) __P((int unit));
- /* Close the protocol */
- void (*close) __P((int unit, char *reason));
- /* Print a packet in readable form */
- int (*printpkt) __P((u_char *pkt, int len,
- void (*printer) __P((void *, char *, ...)),
- void *arg));
- /* Process a received data packet */
- void (*datainput) __P((int unit, u_char *pkt, int len));
- int enabled_flag; /* 0 iff protocol is disabled */
- char *name; /* Text name of protocol */
- /* Check requested options, assign defaults */
- void (*check_options) __P((void));
- /* Configure interface for demand-dial */
- int (*demand_conf) __P((int unit));
- /* Say whether to bring up link for this pkt */
- int (*active_pkt) __P((u_char *pkt, int len));
-};
-
-/* Table of pointers to supported protocols */
-extern struct protent *protocols[];
-
-/*
- * Prototypes.
- */
-
-/* Procedures exported from main.c. */
-void detach __P((void)); /* Detach from controlling tty */
-void die __P((int)); /* Cleanup and exit */
-void quit __P((void)); /* like die(1) */
-void novm __P((char *)); /* Say we ran out of memory, and die */
-void my_timeout __P((void (*func)(void *), void *arg, int t));
- /* Call func(arg) after t seconds */
-void untimeout __P((void (*func)(void *), void *arg));
- /* Cancel call to func(arg) */
-int run_program __P((char *prog, char **args, int must_exist));
- /* Run program prog with args in child */
-void demuxprotrej __P((int, int));
- /* Demultiplex a Protocol-Reject */
-void format_packet __P((u_char *, int, void (*) (void *, char *, ...),
- void *)); /* Format a packet in human-readable form */
-void log_packet __P((u_char *, int, char *, int));
- /* Format a packet and log it with syslog */
-void print_string __P((char *, int, void (*) (void *, char *, ...),
- void *)); /* Format a string for output */
-int fmtmsg __P((char *, int, char *, ...)); /* sprintf++ */
-int vfmtmsg __P((char *, int, char *, va_list)); /* vsprintf++ */
-void script_setenv __P((char *, char *)); /* set script env var */
-void script_unsetenv __P((char *)); /* unset script env var */
-/* My procedures */
-int connect_stb();
-int disconnect_stb();
-int pppdmain(int, char*[]);
-int chatmain(char*);
-
-/* Procedures exported from auth.c */
-
-void link_required __P((int)); /* we are starting to use the link */
-void link_terminated __P((int)); /* we are finished with the link */
-void link_down __P((int)); /* the LCP layer has left the Opened state */
-void link_established __P((int)); /* the link is up; authenticate now */
-void np_up __P((int, int)); /* a network protocol has come up */
-void np_down __P((int, int)); /* a network protocol has gone down */
-void np_finished __P((int, int)); /* a network protocol no longer needs link */
-void auth_peer_fail __P((int, int));
- /* peer failed to authenticate itself */
-void auth_peer_success __P((int, int, char *, int));
- /* peer successfully authenticated itself */
-void auth_withpeer_fail __P((int, int));
- /* we failed to authenticate ourselves */
-void auth_withpeer_success __P((int, int));
- /* we successfully authenticated ourselves */
-void auth_check_options __P((void));
- /* check authentication options supplied */
-void auth_reset __P((int)); /* check what secrets we have */
-int check_passwd __P((int, char *, int, char *, int, char **, int *));
- /* Check peer-supplied username/password */
-int get_secret __P((int, char *, char *, char *, int *, int));
- /* get "secret" for chap */
-int auth_ip_addr __P((int, u_int32_t));
- /* check if IP address is authorized */
-int bad_ip_adrs __P((u_int32_t));
- /* check if IP address is unreasonable */
-void check_access __P((FILE *, char *));
- /* check permissions on secrets file */
-
-/* Procedures exported from demand.c */
-void demand_conf __P((void)); /* config interface(s) for demand-dial */
-void demand_block __P((void)); /* set all NPs to queue up packets */
-void demand_unblock __P((void)); /* set all NPs to pass packets */
-void demand_discard __P((void)); /* set all NPs to discard packets */
-void demand_rexmit __P((int)); /* retransmit saved frames for an NP */
-int loop_chars __P((unsigned char *, int)); /* process chars from loopback */
-int loop_frame __P((unsigned char *, int)); /* process frame from loopback */
-
-/* Procedures exported from sys-*.c */
-void sys_init __P((void)); /* Do system-dependent initialization */
-void sys_cleanup __P((void)); /* Restore system state before exiting */
-void sys_check_options __P((void)); /* Check options specified */
-void sys_close __P((void)); /* Clean up in a child before execing */
-int ppp_available __P((void)); /* Test whether ppp kernel support exists */
-void open_ppp_loopback __P((void)); /* Open loopback for demand-dialling */
-void establish_ppp __P((int)); /* Turn serial port into a ppp interface */
-void restore_loop __P((void)); /* Transfer ppp unit back to loopback */
-void disestablish_ppp __P((int)); /* Restore port to normal operation */
-void clean_check __P((void)); /* Check if line was 8-bit clean */
-void set_up_tty __P((int, int)); /* Set up port's speed, parameters, etc. */
-void restore_tty __P((int)); /* Restore port's original parameters */
-void setdtr __P((int, int)); /* Raise or lower port's DTR line */
-void output __P((int, u_char *, int)); /* Output a PPP packet */
-void wait_input __P((struct timeval *));
- /* Wait for input, with timeout */
-void wait_loop_output __P((struct timeval *));
- /* Wait for pkt from loopback, with timeout */
-void wait_time __P((struct timeval *)); /* Wait for given length of time */
-int read_packet __P((u_char *)); /* Read PPP packet */
-int get_loop_output __P((void)); /* Read pkts from loopback */
-void ppp_send_config __P((int, int, u_int32_t, int, int));
- /* Configure i/f transmit parameters */
-void ppp_set_xaccm __P((int, ext_accm));
- /* Set extended transmit ACCM */
-void ppp_recv_config __P((int, int, u_int32_t, int, int));
- /* Configure i/f receive parameters */
-int ccp_test __P((int, u_char *, int, int));
- /* Test support for compression scheme */
-void ccp_flags_set __P((int, int, int));
- /* Set kernel CCP state */
-int ccp_fatal_error __P((int)); /* Test for fatal decomp error in kernel */
-int get_idle_time __P((int, struct ppp_idle *));
- /* Find out how long link has been idle */
-int sifvjcomp __P((int, int, int, int));
- /* Configure VJ TCP header compression */
-int sifup __P((int)); /* Configure i/f up (for IP) */
-int sifnpmode __P((int u, int proto, enum NPmode mode));
- /* Set mode for handling packets for proto */
-int sifdown __P((int)); /* Configure i/f down (for IP) */
-int sifaddr __P((int, u_int32_t, u_int32_t, u_int32_t));
- /* Configure IP addresses for i/f */
-int cifaddr __P((int, u_int32_t, u_int32_t));
- /* Reset i/f IP addresses */
-int sifdefaultroute __P((int, u_int32_t, u_int32_t));
- /* Create default route through i/f */
-int cifdefaultroute __P((int, u_int32_t, u_int32_t));
- /* Delete default route through i/f */
-int sifproxyarp __P((int, u_int32_t));
- /* Add proxy ARP entry for peer */
-int cifproxyarp __P((int, u_int32_t));
- /* Delete proxy ARP entry for peer */
-u_int32_t GetMask __P((u_int32_t)); /* Get appropriate netmask for address */
-int lock __P((char *)); /* Create lock file for device */
-void unlock __P((void)); /* Delete previously-created lock file */
-int daemon __P((int, int)); /* Detach us from terminal session */
-void logwtmp __P((const char *, const char *, const char *));
- /* Write entry to wtmp file */
-int get_host_seed __P((void)); /* Get host-dependent random number seed */
-#ifdef PPP_FILTER
-int set_filters __P((struct bpf_program *pass, struct bpf_program *active));
- /* Set filter programs in kernel */
-#endif
-
-/* Procedures exported from options.c */
-int parse_args __P((int argc, char **argv));
- /* Parse options from arguments given */
-void usage __P((void)); /* Print a usage message */
-int options_from_file __P((char *filename, int must_exist, int check_prot,
- int privileged));
- /* Parse options from an options file */
-int options_from_user __P((void)); /* Parse options from user's .ppprc */
-int options_for_tty __P((void)); /* Parse options from /etc/ppp/options.tty */
-void scan_args __P((int argc, char **argv));
- /* Look for tty name in command-line args */
-int getword __P((FILE *f, char *word, int *newlinep, char *filename));
- /* Read a word from a file */
-void option_error __P((char *fmt, ...));
- /* Print an error message about an option */
-
-/*
- * This structure is used to store information about certain
- * options, such as where the option value came from (/etc/ppp/options,
- * command line, etc.) and whether it came from a privileged source.
- */
-
-struct option_info {
- int priv; /* was value set by sysadmin? */
- char *source; /* where option came from */
-};
-
-extern struct option_info auth_req_info;
-extern struct option_info connector_info;
-extern struct option_info disconnector_info;
-extern struct option_info welcomer_info;
-extern struct option_info devnam_info;
-
-/*
- * Inline versions of get/put char/short/long.
- * Pointer is advanced; we assume that both arguments
- * are lvalues and will already be in registers.
- * cp MUST be u_char *.
- */
-#define GETCHAR(c, cp) { \
- (c) = *(cp)++; \
-}
-#define PUTCHAR(c, cp) { \
- *(cp)++ = (u_char) (c); \
-}
-
-
-#define GETSHORT(s, cp) { \
- (s) = *(cp)++ << 8; \
- (s) |= *(cp)++; \
-}
-#define PUTSHORT(s, cp) { \
- *(cp)++ = (u_char) ((s) >> 8); \
- *(cp)++ = (u_char) (s); \
-}
-
-#define GETLONG(l, cp) { \
- (l) = *(cp)++ << 8; \
- (l) |= *(cp)++; (l) <<= 8; \
- (l) |= *(cp)++; (l) <<= 8; \
- (l) |= *(cp)++; \
-}
-#define PUTLONG(l, cp) { \
- *(cp)++ = (u_char) ((l) >> 24); \
- *(cp)++ = (u_char) ((l) >> 16); \
- *(cp)++ = (u_char) ((l) >> 8); \
- *(cp)++ = (u_char) (l); \
-}
-
-#define INCPTR(n, cp) ((cp) += (n))
-#define DECPTR(n, cp) ((cp) -= (n))
-
-#undef FALSE
-#define FALSE 0
-#undef TRUE
-#define TRUE 1
-
-/*
- * System dependent definitions for user-level 4.3BSD UNIX implementation.
- */
-
-#define DEMUXPROTREJ(u, p) demuxprotrej(u, p)
-
-#define TIMEOUT(r, f, t) my_timeout((r), (f), (t))
-#define UNTIMEOUT(r, f) untimeout((r), (f))
-
-#define BCOPY(s, d, l) memcpy(d, s, l)
-#define BZERO(s, n) memset(s, 0, n)
-#define EXIT(u) quit()
-
-#define PRINTMSG(m, l) { m[l] = '\0'; syslog(LOG_INFO, "Remote message: %s", m); }
-
-/*
- * MAKEHEADER - Add Header fields to a packet.
- */
-#define MAKEHEADER(p, t) { \
- PUTCHAR(PPP_ALLSTATIONS, p); \
- PUTCHAR(PPP_UI, p); \
- PUTSHORT(t, p); }
-
-/* #define DEBUGALL */
-
-#ifdef DEBUGALL
-#define DEBUGMAIN 1
-#define DEBUGFSM 1
-#define DEBUGLCP 1
-#define DEBUGIPCP 1
-#define DEBUGUPAP 1
-#define DEBUGCHAP 1
-#endif
-
-#ifndef LOG_PPP /* we use LOG_LOCAL2 for syslog by default */
-#if defined(DEBUGMAIN) || defined(DEBUGFSM) || defined(DEBUGSYS) \
- || defined(DEBUGLCP) || defined(DEBUGIPCP) || defined(DEBUGUPAP) \
- || defined(DEBUGCHAP) || defined(DEBUG)
-#define LOG_PPP LOG_LOCAL2
-#else
-#define LOG_PPP LOG_DAEMON
-#endif
-#endif /* LOG_PPP */
-extern rtems_id pppdaemon_tid;
-#ifdef DEBUGMAIN
-#define MAINDEBUG(x) if (debug) syslog x
-#else
-#define MAINDEBUG(x)
-#endif
-
-#ifdef DEBUGSYS
-#define SYSDEBUG(x) if (debug) syslog x
-#else
-#define SYSDEBUG(x)
-#endif
-
-#ifdef DEBUGFSM
-#define FSMDEBUG(x) if (debug) syslog x
-#else
-#define FSMDEBUG(x)
-#endif
-
-#ifdef DEBUGLCP
-#define LCPDEBUG(x) if (debug) syslog x
-#else
-#define LCPDEBUG(x)
-#endif
-
-#ifdef DEBUGIPCP
-#define IPCPDEBUG(x) if (debug) syslog x
-#else
-#define IPCPDEBUG(x)
-#endif
-
-#ifdef DEBUGUPAP
-#define UPAPDEBUG(x) if (debug) syslog x
-#else
-#define UPAPDEBUG(x)
-#endif
-
-#ifdef DEBUGCHAP
-#define CHAPDEBUG(x) if (debug) syslog x
-#else
-#define CHAPDEBUG(x)
-#endif
-
-#ifdef DEBUGIPXCP
-#define IPXCPDEBUG(x) if (debug) syslog x
-#else
-#define IPXCPDEBUG(x)
-#endif
-
-#ifndef SIGTYPE
-#if defined(sun) || defined(SYSV) || defined(POSIX_SOURCE)
-#define SIGTYPE void
-#else
-#define SIGTYPE int
-#endif /* defined(sun) || defined(SYSV) || defined(POSIX_SOURCE) */
-#endif /* SIGTYPE */
-
-#ifndef MIN
-#define MIN(a, b) ((a) < (b)? (a): (b))
-#endif
-#ifndef MAX
-#define MAX(a, b) ((a) > (b)? (a): (b))
-#endif
-
-#endif /* __PPP_H__ */
diff --git a/cpukit/pppd/upap.c b/cpukit/pppd/upap.c
deleted file mode 100644
index f2cdb921c5..0000000000
--- a/cpukit/pppd/upap.c
+++ /dev/null
@@ -1,619 +0,0 @@
-/*
- * upap.c - User/Password Authentication Protocol.
- *
- * Copyright (c) 1989 Carnegie Mellon University.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by Carnegie Mellon University. The name of the
- * University may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#ifndef lint
-/* static char rcsid[] = "$Id$"; */
-#endif
-
-/*
- * TODO:
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#include <syslog.h>
-
-#include "pppd.h"
-#include "upap.h"
-#define print_string(user, ulen, printer, arg)
-
-/*
- * Protocol entry points.
- */
-static void upap_init __P((int));
-static void upap_lowerup __P((int));
-static void upap_lowerdown __P((int));
-static void upap_input __P((int, u_char *, int));
-static void upap_protrej __P((int));
-static int upap_printpkt __P((u_char *, int,
- void (*) __P((void *, char *, ...)), void *));
-
-struct protent pap_protent = {
- PPP_PAP,
- upap_init,
- upap_input,
- upap_protrej,
- upap_lowerup,
- upap_lowerdown,
- NULL,
- NULL,
- upap_printpkt,
- NULL,
- 1,
- "PAP",
- NULL,
- NULL,
- NULL
-};
-
-upap_state upap[NUM_PPP]; /* UPAP state; one for each unit */
-
-static void upap_timeout __P((void *));
-static void upap_reqtimeout __P((void *));
-static void upap_rauthreq __P((upap_state *, u_char *, int, int));
-static void upap_rauthack __P((upap_state *, u_char *, int, int));
-static void upap_rauthnak __P((upap_state *, u_char *, int, int));
-static void upap_sauthreq __P((upap_state *));
-static void upap_sresp __P((upap_state *, int, int, char *, int));
-
-
-/*
- * upap_init - Initialize a UPAP unit.
- */
-static void
-upap_init(unit)
- int unit;
-{
- upap_state *u = &upap[unit];
-
- u->us_unit = unit;
- u->us_user = NULL;
- u->us_userlen = 0;
- u->us_passwd = NULL;
- u->us_passwdlen = 0;
- u->us_clientstate = UPAPCS_INITIAL;
- u->us_serverstate = UPAPSS_INITIAL;
- u->us_id = 0;
- u->us_timeouttime = UPAP_DEFTIMEOUT;
- u->us_maxtransmits = 10;
- u->us_reqtimeout = UPAP_DEFREQTIME;
-}
-
-
-/*
- * upap_authwithpeer - Authenticate us with our peer (start client).
- *
- * Set new state and send authenticate's.
- */
-void
-upap_authwithpeer(unit, user, password)
- int unit;
- char *user, *password;
-{
- upap_state *u = &upap[unit];
-
- /* Save the username and password we're given */
- u->us_user = user;
- u->us_userlen = strlen(user);
- u->us_passwd = password;
- u->us_passwdlen = strlen(password);
- u->us_transmits = 0;
-
- /* Lower layer up yet? */
- if (u->us_clientstate == UPAPCS_INITIAL ||
- u->us_clientstate == UPAPCS_PENDING) {
- u->us_clientstate = UPAPCS_PENDING;
- return;
- }
-
- upap_sauthreq(u); /* Start protocol */
-}
-
-
-/*
- * upap_authpeer - Authenticate our peer (start server).
- *
- * Set new state.
- */
-void
-upap_authpeer(unit)
- int unit;
-{
- upap_state *u = &upap[unit];
-
- /* Lower layer up yet? */
- if (u->us_serverstate == UPAPSS_INITIAL ||
- u->us_serverstate == UPAPSS_PENDING) {
- u->us_serverstate = UPAPSS_PENDING;
- return;
- }
-
- u->us_serverstate = UPAPSS_LISTEN;
- if (u->us_reqtimeout > 0)
- TIMEOUT(upap_reqtimeout, u, u->us_reqtimeout);
-}
-
-
-/*
- * upap_timeout - Retransmission timer for sending auth-reqs expired.
- */
-static void
-upap_timeout(arg)
- void *arg;
-{
- upap_state *u = (upap_state *) arg;
-
- if (u->us_clientstate != UPAPCS_AUTHREQ)
- return;
-
- if (u->us_transmits >= u->us_maxtransmits) {
- /* give up in disgust */
- syslog(LOG_ERR, "No response to PAP authenticate-requests");
- u->us_clientstate = UPAPCS_BADAUTH;
- auth_withpeer_fail(u->us_unit, PPP_PAP);
- return;
- }
-
- upap_sauthreq(u); /* Send Authenticate-Request */
-}
-
-
-/*
- * upap_reqtimeout - Give up waiting for the peer to send an auth-req.
- */
-static void
-upap_reqtimeout(arg)
- void *arg;
-{
- upap_state *u = (upap_state *) arg;
-
- if (u->us_serverstate != UPAPSS_LISTEN)
- return; /* huh?? */
-
- auth_peer_fail(u->us_unit, PPP_PAP);
- u->us_serverstate = UPAPSS_BADAUTH;
-}
-
-
-/*
- * upap_lowerup - The lower layer is up.
- *
- * Start authenticating if pending.
- */
-static void
-upap_lowerup(unit)
- int unit;
-{
- upap_state *u = &upap[unit];
-
- if (u->us_clientstate == UPAPCS_INITIAL)
- u->us_clientstate = UPAPCS_CLOSED;
- else if (u->us_clientstate == UPAPCS_PENDING) {
- upap_sauthreq(u); /* send an auth-request */
- }
-
- if (u->us_serverstate == UPAPSS_INITIAL)
- u->us_serverstate = UPAPSS_CLOSED;
- else if (u->us_serverstate == UPAPSS_PENDING) {
- u->us_serverstate = UPAPSS_LISTEN;
- if (u->us_reqtimeout > 0)
- TIMEOUT(upap_reqtimeout, u, u->us_reqtimeout);
- }
-}
-
-
-/*
- * upap_lowerdown - The lower layer is down.
- *
- * Cancel all timeouts.
- */
-static void
-upap_lowerdown(unit)
- int unit;
-{
- upap_state *u = &upap[unit];
-
- if (u->us_clientstate == UPAPCS_AUTHREQ) /* Timeout pending? */
- UNTIMEOUT(upap_timeout, u); /* Cancel timeout */
- if (u->us_serverstate == UPAPSS_LISTEN && u->us_reqtimeout > 0)
- UNTIMEOUT(upap_reqtimeout, u);
-
- u->us_clientstate = UPAPCS_INITIAL;
- u->us_serverstate = UPAPSS_INITIAL;
-}
-
-
-/*
- * upap_protrej - Peer doesn't speak this protocol.
- *
- * This shouldn't happen. In any case, pretend lower layer went down.
- */
-static void
-upap_protrej(unit)
- int unit;
-{
- upap_state *u = &upap[unit];
-
- if (u->us_clientstate == UPAPCS_AUTHREQ) {
- syslog(LOG_ERR, "PAP authentication failed due to protocol-reject");
- auth_withpeer_fail(unit, PPP_PAP);
- }
- if (u->us_serverstate == UPAPSS_LISTEN) {
- syslog(LOG_ERR, "PAP authentication of peer failed (protocol-reject)");
- auth_peer_fail(unit, PPP_PAP);
- }
- upap_lowerdown(unit);
-}
-
-
-/*
- * upap_input - Input UPAP packet.
- */
-static void
-upap_input(unit, inpacket, l)
- int unit;
- u_char *inpacket;
- int l;
-{
- upap_state *u = &upap[unit];
- u_char *inp;
- u_char code, id;
- int len;
-
- /*
- * Parse header (code, id and length).
- * If packet too short, drop it.
- */
- inp = inpacket;
- if (l < UPAP_HEADERLEN) {
- UPAPDEBUG((LOG_INFO, "pap_input: rcvd short header."));
- return;
- }
- GETCHAR(code, inp);
- GETCHAR(id, inp);
- GETSHORT(len, inp);
- if (len < UPAP_HEADERLEN) {
- UPAPDEBUG((LOG_INFO, "pap_input: rcvd illegal length."));
- return;
- }
- if (len > l) {
- UPAPDEBUG((LOG_INFO, "pap_input: rcvd short packet."));
- return;
- }
- len -= UPAP_HEADERLEN;
-
- /*
- * Action depends on code.
- */
- switch (code) {
- case UPAP_AUTHREQ:
- upap_rauthreq(u, inp, id, len);
- break;
-
- case UPAP_AUTHACK:
- upap_rauthack(u, inp, id, len);
- break;
-
- case UPAP_AUTHNAK:
- upap_rauthnak(u, inp, id, len);
- break;
-
- default: /* XXX Need code reject */
- break;
- }
-}
-
-
-/*
- * upap_rauth - Receive Authenticate.
- */
-static void
-upap_rauthreq(u, inp, id, len)
- upap_state *u;
- u_char *inp;
- int id;
- int len;
-{
- u_char ruserlen, rpasswdlen;
- char *ruser, *rpasswd;
- int retcode;
- char *msg;
- int msglen;
-
- UPAPDEBUG((LOG_INFO, "pap_rauth: Rcvd id %d.", id));
-
- if (u->us_serverstate < UPAPSS_LISTEN)
- return;
-
- /*
- * If we receive a duplicate authenticate-request, we are
- * supposed to return the same status as for the first request.
- */
- if (u->us_serverstate == UPAPSS_OPEN) {
- upap_sresp(u, UPAP_AUTHACK, id, "", 0); /* return auth-ack */
- return;
- }
- if (u->us_serverstate == UPAPSS_BADAUTH) {
- upap_sresp(u, UPAP_AUTHNAK, id, "", 0); /* return auth-nak */
- return;
- }
-
- /*
- * Parse user/passwd.
- */
- if (len < sizeof (u_char)) {
- UPAPDEBUG((LOG_INFO, "pap_rauth: rcvd short packet."));
- return;
- }
- GETCHAR(ruserlen, inp);
- len -= sizeof (u_char) + ruserlen + sizeof (u_char);
- if (len < 0) {
- UPAPDEBUG((LOG_INFO, "pap_rauth: rcvd short packet."));
- return;
- }
- ruser = (char *) inp;
- INCPTR(ruserlen, inp);
- GETCHAR(rpasswdlen, inp);
- if (len < rpasswdlen) {
- UPAPDEBUG((LOG_INFO, "pap_rauth: rcvd short packet."));
- return;
- }
- rpasswd = (char *) inp;
-
- /*
- * Check the username and password given.
- */
- retcode = check_passwd(u->us_unit, ruser, ruserlen, rpasswd,
- rpasswdlen, &msg, &msglen);
- BZERO(rpasswd, rpasswdlen);
-
- upap_sresp(u, retcode, id, msg, msglen);
-
- if (retcode == UPAP_AUTHACK) {
- u->us_serverstate = UPAPSS_OPEN;
- auth_peer_success(u->us_unit, PPP_PAP, ruser, ruserlen);
- } else {
- u->us_serverstate = UPAPSS_BADAUTH;
- auth_peer_fail(u->us_unit, PPP_PAP);
- }
-
- if (u->us_reqtimeout > 0)
- UNTIMEOUT(upap_reqtimeout, u);
-}
-
-
-/*
- * upap_rauthack - Receive Authenticate-Ack.
- */
-static void
-upap_rauthack(u, inp, id, len)
- upap_state *u;
- u_char *inp;
- int id;
- int len;
-{
- u_char msglen;
- char *msg;
-
- UPAPDEBUG((LOG_INFO, "pap_rauthack: Rcvd id %d.", id));
- if (u->us_clientstate != UPAPCS_AUTHREQ) /* XXX */
- return;
-
- /*
- * Parse message.
- */
- if (len < sizeof (u_char)) {
- UPAPDEBUG((LOG_INFO, "pap_rauthack: rcvd short packet."));
- return;
- }
- GETCHAR(msglen, inp);
- len -= sizeof (u_char);
- if (len < msglen) {
- UPAPDEBUG((LOG_INFO, "pap_rauthack: rcvd short packet."));
- return;
- }
- msg = (char *) inp;
- PRINTMSG(msg, msglen);
-
- u->us_clientstate = UPAPCS_OPEN;
-
- auth_withpeer_success(u->us_unit, PPP_PAP);
-}
-
-
-/*
- * upap_rauthnak - Receive Authenticate-Nakk.
- */
-static void
-upap_rauthnak(u, inp, id, len)
- upap_state *u;
- u_char *inp;
- int id;
- int len;
-{
- u_char msglen;
- char *msg;
-
- UPAPDEBUG((LOG_INFO, "pap_rauthnak: Rcvd id %d.", id));
- if (u->us_clientstate != UPAPCS_AUTHREQ) /* XXX */
- return;
-
- /*
- * Parse message.
- */
- if (len < sizeof (u_char)) {
- UPAPDEBUG((LOG_INFO, "pap_rauthnak: rcvd short packet."));
- return;
- }
- GETCHAR(msglen, inp);
- len -= sizeof (u_char);
- if (len < msglen) {
- UPAPDEBUG((LOG_INFO, "pap_rauthnak: rcvd short packet."));
- return;
- }
- msg = (char *) inp;
- PRINTMSG(msg, msglen);
-
- u->us_clientstate = UPAPCS_BADAUTH;
-
- syslog(LOG_ERR, "PAP authentication failed");
- auth_withpeer_fail(u->us_unit, PPP_PAP);
-}
-
-
-/*
- * upap_sauthreq - Send an Authenticate-Request.
- */
-static void
-upap_sauthreq(u)
- upap_state *u;
-{
- u_char *outp;
- int outlen;
-
- outlen = UPAP_HEADERLEN + 2 * sizeof (u_char) +
- u->us_userlen + u->us_passwdlen;
- outp = outpacket_buf;
-
- MAKEHEADER(outp, PPP_PAP);
-
- PUTCHAR(UPAP_AUTHREQ, outp);
- PUTCHAR(++u->us_id, outp);
- PUTSHORT(outlen, outp);
- PUTCHAR(u->us_userlen, outp);
- BCOPY(u->us_user, outp, u->us_userlen);
- INCPTR(u->us_userlen, outp);
- PUTCHAR(u->us_passwdlen, outp);
- BCOPY(u->us_passwd, outp, u->us_passwdlen);
-
- output(u->us_unit, outpacket_buf, outlen + PPP_HDRLEN);
-
- UPAPDEBUG((LOG_INFO, "pap_sauth: Sent id %d.", u->us_id));
-
- TIMEOUT(upap_timeout, u, u->us_timeouttime);
- ++u->us_transmits;
- u->us_clientstate = UPAPCS_AUTHREQ;
-}
-
-
-/*
- * upap_sresp - Send a response (ack or nak).
- */
-static void
-upap_sresp(u, code, id, msg, msglen)
- upap_state *u;
- u_char code, id;
- char *msg;
- int msglen;
-{
- u_char *outp;
- int outlen;
-
- outlen = UPAP_HEADERLEN + sizeof (u_char) + msglen;
- outp = outpacket_buf;
- MAKEHEADER(outp, PPP_PAP);
-
- PUTCHAR(code, outp);
- PUTCHAR(id, outp);
- PUTSHORT(outlen, outp);
- PUTCHAR(msglen, outp);
- BCOPY(msg, outp, msglen);
- output(u->us_unit, outpacket_buf, outlen + PPP_HDRLEN);
-
- UPAPDEBUG((LOG_INFO, "pap_sresp: Sent code %d, id %d.", code, id));
-}
-
-/*
- * upap_printpkt - print the contents of a PAP packet.
- */
-static char *upap_codenames[] = {
- "AuthReq", "AuthAck", "AuthNak"
-};
-
-static int
-upap_printpkt(p, plen, printer, arg)
- u_char *p;
- int plen;
- void (*printer) __P((void *, char *, ...));
- void *arg;
-{
- int code, id, len;
- int mlen, ulen, wlen;
- char *user, *pwd, *msg;
- u_char *pstart;
-
- if (plen < UPAP_HEADERLEN)
- return 0;
- pstart = p;
- GETCHAR(code, p);
- GETCHAR(id, p);
- GETSHORT(len, p);
- if (len < UPAP_HEADERLEN || len > plen)
- return 0;
-
- if (code >= 1 && code <= sizeof(upap_codenames) / sizeof(char *))
- printer(arg, " %s", upap_codenames[code-1]);
- else
- printer(arg, " code=0x%x", code);
- printer(arg, " id=0x%x", id);
- len -= UPAP_HEADERLEN;
- switch (code) {
- case UPAP_AUTHREQ:
- if (len < 1)
- break;
- ulen = p[0];
- if (len < ulen + 2)
- break;
- wlen = p[ulen + 1];
- if (len < ulen + wlen + 2)
- break;
- user = (char *) (p + 1);
- pwd = (char *) (p + ulen + 2);
- p += ulen + wlen + 2;
- len -= ulen + wlen + 2;
- printer(arg, " user=");
- print_string(user, ulen, printer, arg);
- printer(arg, " password=");
- print_string(pwd, wlen, printer, arg);
- break;
- case UPAP_AUTHACK:
- case UPAP_AUTHNAK:
- if (len < 1)
- break;
- mlen = p[0];
- if (len < mlen + 1)
- break;
- msg = (char *) (p + 1);
- p += mlen + 1;
- len -= mlen + 1;
- printer(arg, " ");
- print_string(msg, mlen, printer, arg);
- break;
- }
-
- /* print the rest of the bytes in the packet */
- for (; len > 0; --len) {
- GETCHAR(code, p);
- printer(arg, " %.2x", code);
- }
-
- return p - pstart;
-}
diff --git a/cpukit/pppd/upap.h b/cpukit/pppd/upap.h
deleted file mode 100644
index 510efa3151..0000000000
--- a/cpukit/pppd/upap.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * upap.h - User/Password Authentication Protocol definitions.
- *
- * Copyright (c) 1989 Carnegie Mellon University.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by Carnegie Mellon University. The name of the
- * University may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Id$
- */
-
-/*
- * Packet header = Code, id, length.
- */
-#define UPAP_HEADERLEN (sizeof (u_char) + sizeof (u_char) + sizeof (u_short))
-
-
-/*
- * UPAP codes.
- */
-#define UPAP_AUTHREQ 1 /* Authenticate-Request */
-#define UPAP_AUTHACK 2 /* Authenticate-Ack */
-#define UPAP_AUTHNAK 3 /* Authenticate-Nak */
-
-
-/*
- * Each interface is described by upap structure.
- */
-typedef struct upap_state {
- int us_unit; /* Interface unit number */
- char *us_user; /* User */
- int us_userlen; /* User length */
- char *us_passwd; /* Password */
- int us_passwdlen; /* Password length */
- int us_clientstate; /* Client state */
- int us_serverstate; /* Server state */
- u_char us_id; /* Current id */
- int us_timeouttime; /* Timeout (seconds) for auth-req retrans. */
- int us_transmits; /* Number of auth-reqs sent */
- int us_maxtransmits; /* Maximum number of auth-reqs to send */
- int us_reqtimeout; /* Time to wait for auth-req from peer */
-} upap_state;
-
-
-/*
- * Client states.
- */
-#define UPAPCS_INITIAL 0 /* Connection down */
-#define UPAPCS_CLOSED 1 /* Connection up, haven't requested auth */
-#define UPAPCS_PENDING 2 /* Connection down, have requested auth */
-#define UPAPCS_AUTHREQ 3 /* We've sent an Authenticate-Request */
-#define UPAPCS_OPEN 4 /* We've received an Ack */
-#define UPAPCS_BADAUTH 5 /* We've received a Nak */
-
-/*
- * Server states.
- */
-#define UPAPSS_INITIAL 0 /* Connection down */
-#define UPAPSS_CLOSED 1 /* Connection up, haven't requested auth */
-#define UPAPSS_PENDING 2 /* Connection down, have requested auth */
-#define UPAPSS_LISTEN 3 /* Listening for an Authenticate */
-#define UPAPSS_OPEN 4 /* We've sent an Ack */
-#define UPAPSS_BADAUTH 5 /* We've sent a Nak */
-
-
-/*
- * Timeouts.
- */
-#define UPAP_DEFTIMEOUT 3 /* Timeout (seconds) for retransmitting req */
-#define UPAP_DEFREQTIME 30 /* Time to wait for auth-req from peer */
-
-extern upap_state upap[];
-
-void upap_authwithpeer __P((int, char *, char *));
-void upap_authpeer __P((int));
-
-extern struct protent pap_protent;
diff --git a/cpukit/rtems/Makefile.am b/cpukit/rtems/Makefile.am
deleted file mode 100644
index 242daede4e..0000000000
--- a/cpukit/rtems/Makefile.am
+++ /dev/null
@@ -1,10 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-SUBDIRS = include inline macros optman src
-
-include $(top_srcdir)/../../../automake/subdirs.am
-include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/rtems/include/Makefile.am b/cpukit/rtems/include/Makefile.am
deleted file mode 100644
index 8935b30100..0000000000
--- a/cpukit/rtems/include/Makefile.am
+++ /dev/null
@@ -1,27 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-H_FILES = rtems.h
-
-noinst_HEADERS = $(H_FILES)
-
-PREINSTALL_FILES = \
-$(PROJECT_INCLUDE) \
-$(noinst_HEADERS:%=$(PROJECT_INCLUDE)/%)
-
-$(PROJECT_INCLUDE):
- @$(mkinstalldirs) $@
-$(PROJECT_INCLUDE)/%.h: %.h
- $(INSTALL_DATA) $< $@
-
-all-am: $(PREINSTALL_FILES)
-debug-am: $(PREINSTALL_FILES)
-profile-am: $(PREINSTALL_FILES)
-
-SUBDIRS = rtems
-
-include $(top_srcdir)/../../../automake/subdirs.am
-include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/rtems/include/rtems.h b/cpukit/rtems/include/rtems.h
deleted file mode 100644
index 0d82b3d4d0..0000000000
--- a/cpukit/rtems/include/rtems.h
+++ /dev/null
@@ -1,121 +0,0 @@
-/* rtems.h
- *
- * This include file contains information about RTEMS executive that
- * is required by the application and is CPU independent. It includes
- * two (2) CPU dependent files to tailor its data structures for a
- * particular processor.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_RTEMS_GENERIC_h
-#define __RTEMS_RTEMS_GENERIC_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Unless told otherwise, the RTEMS include files will hide some stuff
- * from normal application code. Defining this crosses a boundary which
- * is undesirable since it means your application is using RTEMS features
- * which are not included in the formally defined and supported API.
- * Define this at your own risk.
- */
-
-#if !defined(__RTEMS_VIOLATE_KERNEL_VISIBILITY__) && !defined(__RTEMS_INSIDE__)
-#define __RTEMS_APPLICATION__
-#endif
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/types.h>
-
-#include <rtems/config.h>
-#include <rtems/init.h>
-#include <rtems/rtems/tasks.h>
-#include <rtems/rtems/intr.h>
-#include <rtems/rtems/clock.h>
-#include <rtems/extension.h>
-#include <rtems/rtems/timer.h>
-#include <rtems/rtems/sem.h>
-#include <rtems/rtems/message.h>
-#include <rtems/rtems/event.h>
-#include <rtems/rtems/signal.h>
-#include <rtems/rtems/event.h>
-#include <rtems/rtems/part.h>
-#include <rtems/rtems/region.h>
-#include <rtems/rtems/dpmem.h>
-#include <rtems/io.h>
-#include <rtems/fatal.h>
-#include <rtems/rtems/ratemon.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/rtems/mp.h>
-#endif
-
-#include <rtems/rtems/support.h>
-#include <rtems/score/sysstate.h>
-
-#define RTEMS_HAS_HARDWARE_FP CPU_HARDWARE_FP
-
-/*
- * The following define the constants which may be used in name searches.
- */
-
-#define RTEMS_SEARCH_ALL_NODES OBJECTS_SEARCH_ALL_NODES
-#define RTEMS_SEARCH_OTHER_NODES OBJECTS_SEARCH_OTHER_NODES
-#define RTEMS_SEARCH_LOCAL_NODE OBJECTS_SEARCH_LOCAL_NODE
-#define RTEMS_WHO_AM_I OBJECTS_WHO_AM_I
-
-/*
- * Parameters and return id's for _Objects_Get_next
- */
-
-#define RTEMS_OBJECT_ID_INITIAL_INDEX OBJECTS_ID_INITIAL_INDEX
-#define RTEMS_OBJECT_ID_FINAL_INDEX OBJECTS_ID_FINAL_INDEX
-
-#define RTEMS_OBJECT_ID_INITIAL(class, node) OBJECTS_ID_INITIAL(class, node)
-#define RTEMS_OBJECT_ID_FINAL OBJECTS_ID_FINAL
-
-/*
- * The following constant defines the minimum stack size which every
- * thread must exceed.
- */
-
-#define RTEMS_MINIMUM_STACK_SIZE STACK_MINIMUM_SIZE
-
-/*
- * Constant for indefinite wait. (actually an illegal interval)
- */
-
-#define RTEMS_NO_TIMEOUT WATCHDOG_NO_TIMEOUT
-
-/*
- * An MPCI must support packets of at least this size.
- */
-
-#define RTEMS_MINIMUM_PACKET_SIZE MP_PACKET_MINIMUM_PACKET_SIZE
-
-/*
- * The following constant defines the number of unsigned32's
- * in a packet which must be converted to native format in a
- * heterogeneous system. In packets longer than
- * MP_PACKET_MINIMUN_HETERO_CONVERSION unsigned32's, some of the "extra" data
- * may a user message buffer which is not automatically endian swapped.
- */
-
-#define RTEMS_MINIMUN_HETERO_CONVERSION MP_PACKET_MINIMUN_HETERO_CONVERSION
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/include/rtems/rtems/asr.h b/cpukit/rtems/include/rtems/rtems/asr.h
deleted file mode 100644
index 4a0f01e758..0000000000
--- a/cpukit/rtems/include/rtems/rtems/asr.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/* asr.h
- *
- * This include file contains all the constants and structures associated
- * with the Asynchronous Signal Handler. This Handler provides the low-level
- * support required by the Signal Manager.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_ASR_h
-#define __RTEMS_ASR_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/rtems/modes.h>
-
-/*
- *
- * The following type defines the control block used to manage
- * each signal set.
- */
-
-typedef unsigned32 rtems_signal_set;
-
-/*
- * Return type for ASR Handler
- */
-
-typedef void rtems_asr;
-
-/*
- * The following type corresponds to the applications asynchronous
- * signal processing routine.
- */
-
-typedef rtems_asr ( *rtems_asr_entry )(
- rtems_signal_set
- );
-
-/*
- *
- * The following defines the control structure used to manage
- * signals. Each thread has a copy of this record.
- */
-
-typedef struct {
- boolean is_enabled; /* are ASRs enabled currently? */
- rtems_asr_entry handler; /* address of RTEMS_ASR */
- Modes_Control mode_set; /* RTEMS_ASR mode */
- rtems_signal_set signals_posted; /* signal set */
- rtems_signal_set signals_pending; /* pending signal set */
- unsigned32 nest_level; /* nest level of RTEMS_ASR */
-} ASR_Information;
-
-/*
- * The following constants define the individual signals which may
- * be used to compose a signal set.
- */
-
-#define RTEMS_SIGNAL_0 0x00000001
-#define RTEMS_SIGNAL_1 0x00000002
-#define RTEMS_SIGNAL_2 0x00000004
-#define RTEMS_SIGNAL_3 0x00000008
-#define RTEMS_SIGNAL_4 0x00000010
-#define RTEMS_SIGNAL_5 0x00000020
-#define RTEMS_SIGNAL_6 0x00000040
-#define RTEMS_SIGNAL_7 0x00000080
-#define RTEMS_SIGNAL_8 0x00000100
-#define RTEMS_SIGNAL_9 0x00000200
-#define RTEMS_SIGNAL_10 0x00000400
-#define RTEMS_SIGNAL_11 0x00000800
-#define RTEMS_SIGNAL_12 0x00001000
-#define RTEMS_SIGNAL_13 0x00002000
-#define RTEMS_SIGNAL_14 0x00004000
-#define RTEMS_SIGNAL_15 0x00008000
-#define RTEMS_SIGNAL_16 0x00010000
-#define RTEMS_SIGNAL_17 0x00020000
-#define RTEMS_SIGNAL_18 0x00040000
-#define RTEMS_SIGNAL_19 0x00080000
-#define RTEMS_SIGNAL_20 0x00100000
-#define RTEMS_SIGNAL_21 0x00200000
-#define RTEMS_SIGNAL_22 0x00400000
-#define RTEMS_SIGNAL_23 0x00800000
-#define RTEMS_SIGNAL_24 0x01000000
-#define RTEMS_SIGNAL_25 0x02000000
-#define RTEMS_SIGNAL_26 0x04000000
-#define RTEMS_SIGNAL_27 0x08000000
-#define RTEMS_SIGNAL_28 0x10000000
-#define RTEMS_SIGNAL_29 0x20000000
-#define RTEMS_SIGNAL_30 0x40000000
-#define RTEMS_SIGNAL_31 0x80000000
-
-#ifndef __RTEMS_APPLICATION__
-#include <rtems/rtems/asr.inl>
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/include/rtems/rtems/attr.h b/cpukit/rtems/include/rtems/rtems/attr.h
deleted file mode 100644
index b054bd6684..0000000000
--- a/cpukit/rtems/include/rtems/rtems/attr.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/* attr.h
- *
- * This include file contains all information about the Object Attributes
- * Handler.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_ATTRIBUTES_h
-#define __RTEMS_ATTRIBUTES_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* types */
-
-typedef unsigned32 rtems_attribute;
-
-/* constants */
-
-#define RTEMS_DEFAULT_ATTRIBUTES 0x00000000
-
-#define RTEMS_NO_FLOATING_POINT 0x00000000 /* don't use FP HW */
-#define RTEMS_FLOATING_POINT 0x00000001 /* utilize coprocessor */
-
-#define RTEMS_LOCAL 0x00000000 /* local resource */
-#define RTEMS_GLOBAL 0x00000002 /* global resource */
-
-#define RTEMS_FIFO 0x00000000 /* process RTEMS_FIFO */
-#define RTEMS_PRIORITY 0x00000004 /* process by priority */
-
-#define RTEMS_SEMAPHORE_CLASS 0x00000030 /* mask */
-#define RTEMS_COUNTING_SEMAPHORE 0x00000000
-#define RTEMS_BINARY_SEMAPHORE 0x00000010
-#define RTEMS_SIMPLE_BINARY_SEMAPHORE 0x00000020
-
-#define RTEMS_NO_INHERIT_PRIORITY 0x00000000
-#define RTEMS_INHERIT_PRIORITY 0x00000040
-
-#define RTEMS_NO_PRIORITY_CEILING 0x00000000
-#define RTEMS_PRIORITY_CEILING 0x00000080
-
-#define RTEMS_APPLICATION_TASK 0x00000000
-#define RTEMS_SYSTEM_TASK 0x00000100
-
-
-#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
-#define ATTRIBUTES_NOT_SUPPORTED 0
-#else
-#define ATTRIBUTES_NOT_SUPPORTED RTEMS_FLOATING_POINT
-#endif
-
-#if ( CPU_ALL_TASKS_ARE_FP == TRUE )
-#define ATTRIBUTES_REQUIRED RTEMS_FLOATING_POINT
-#else
-#define ATTRIBUTES_REQUIRED 0
-#endif
-
-/*
- * _Attributes_Handler_initialization
- *
- * DESCRIPTION:
- *
- * This routine performs initialization for this handler.
- *
- * NOTE: There is no initialization required in C. Conditional compilation
- * takes care of this in C.
- */
-
-#define _Attributes_Handler_initialization()
-
-#ifndef __RTEMS_APPLICATION__
-#include <rtems/rtems/attr.inl>
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/include/rtems/rtems/clock.h b/cpukit/rtems/include/rtems/rtems/clock.h
deleted file mode 100644
index 1d51e8c481..0000000000
--- a/cpukit/rtems/include/rtems/rtems/clock.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/* clock.h
- *
- * This include file contains all the constants and structures associated
- * with the Clock Manager. This manager provides facilities to set, obtain,
- * and continually update the current date and time.
- *
- * This manager provides directives to:
- *
- * + set the current date and time
- * + obtain the current date and time
- * + announce a clock tick
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_CLOCK_h
-#define __RTEMS_CLOCK_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/tod.h>
-#include <rtems/rtems/types.h>
-
-/*
- * List of things which can be returned by the rtems_clock_get directive.
- */
-
-typedef enum {
- RTEMS_CLOCK_GET_TOD,
- RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH,
- RTEMS_CLOCK_GET_TICKS_SINCE_BOOT,
- RTEMS_CLOCK_GET_TICKS_PER_SECOND,
- RTEMS_CLOCK_GET_TIME_VALUE
-} rtems_clock_get_options;
-
-/*
- * Standard flavor style to return TOD in for a rtems_clock_get option.
- */
-
-typedef struct {
- unsigned32 seconds;
- unsigned32 microseconds;
-} rtems_clock_time_value;
-
-/*
- * rtems_clock_get
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_clock_get directive. It returns
- * one of the following:
- * + current time of day
- * + seconds since epoch
- * + ticks since boot
- * + ticks per second
- */
-
-rtems_status_code rtems_clock_get(
- rtems_clock_get_options option,
- void *time_buffer
-);
-
-/*
- * rtems_clock_set
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_clock_set directive. It sets
- * the current time of day to that in the time_buffer record.
- */
-
-rtems_status_code rtems_clock_set(
- rtems_time_of_day *time_buffer
-);
-
-/*
- * rtems_clock_tick
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_clock_tick directive. It is invoked
- * to inform RTEMS of the occurrence of a clock tick.
- */
-
-rtems_status_code rtems_clock_tick( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/include/rtems/rtems/config.h b/cpukit/rtems/include/rtems/rtems/config.h
deleted file mode 100644
index 4905d06c22..0000000000
--- a/cpukit/rtems/include/rtems/rtems/config.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* config.h
- *
- * This include file contains the table of user defined configuration
- * parameters specific for the RTEMS API.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_RTEMS_CONFIGURATION_h
-#define __RTEMS_RTEMS_CONFIGURATION_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/rtems/types.h>
-#include <rtems/rtems/tasks.h>
-
-/*
- * The following records define the Configuration Table. The
- * information contained in this table is required in all
- * RTEMS systems, whether single or multiprocessor. This
- * table primarily defines the following:
- *
- * + required number of each object type
- */
-
-typedef struct {
- unsigned32 maximum_tasks;
- unsigned32 maximum_timers;
- unsigned32 maximum_semaphores;
- unsigned32 maximum_message_queues;
- unsigned32 maximum_partitions;
- unsigned32 maximum_regions;
- unsigned32 maximum_ports;
- unsigned32 maximum_periods;
- unsigned32 number_of_initialization_tasks;
- rtems_initialization_tasks_table *User_initialization_tasks_table;
-} rtems_api_configuration_table;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/include/rtems/rtems/dpmem.h b/cpukit/rtems/include/rtems/rtems/dpmem.h
deleted file mode 100644
index 9f2f1468cd..0000000000
--- a/cpukit/rtems/include/rtems/rtems/dpmem.h
+++ /dev/null
@@ -1,156 +0,0 @@
-/* dpmem.h
- *
- * This include file contains all the constants and structures associated
- * with the Dual Ported Memory Manager. This manager provides a mechanism
- * for converting addresses between internal and external representations
- * for multiple dual-ported memory areas.
- *
- * Directives provided are:
- *
- * + create a port
- * + get ID of a port
- * + delete a port
- * + convert external to internal address
- * + convert internal to external address
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_DUAL_PORTED_MEMORY_h
-#define __RTEMS_DUAL_PORTED_MEMORY_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/object.h>
-
-/*
- * The following structure defines the port control block. Each port
- * has a control block associated with it. This control block contains
- * all information required to support the port related operations.
- */
-
-typedef struct {
- Objects_Control Object;
- void *internal_base; /* base internal address */
- void *external_base; /* base external address */
- unsigned32 length; /* length of dual-ported area */
-} Dual_ported_memory_Control;
-
-/*
- * The following define the internal Dual Ported Memory information.
- */
-
-RTEMS_EXTERN Objects_Information _Dual_ported_memory_Information;
-
-/*
- * _Dual_ported_memory_Manager_initialization
- *
- * DESCRIPTION:
- *
- * This routine performs the initialization necessary for this manager.
- */
-
-void _Dual_ported_memory_Manager_initialization(
- unsigned32 maximum_ports
-);
-
-/*
- * rtems_port_create
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_port_create directive. The port
- * will have the name name. The port maps onto an area of dual ported
- * memory of length bytes which has internal_start and external_start
- * as the internal and external starting addresses, respectively.
- * It returns the id of the created port in ID.
- */
-
-rtems_status_code rtems_port_create(
- rtems_name name,
- void *internal_start,
- void *external_start,
- unsigned32 length,
- Objects_Id *id
-);
-
-/*
- * rtems_port_ident
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_port_ident directive. This directive
- * returns the port ID associated with name. If more than one port is
- * named name, then the port to which the ID belongs is arbitrary.
- */
-
-rtems_status_code rtems_port_ident(
- rtems_name name,
- Objects_Id *id
-);
-
-/*
- * rtems_port_delete
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_port_delete directive. It deletes
- * the port associated with ID.
- */
-
-rtems_status_code rtems_port_delete(
- Objects_Id id
-);
-
-/*
- * rtems_port_external_to_internal
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_port_external_to_internal directive.
- * It returns the internal port address which maps to the provided
- * external port address for the specified port ID.
- */
-
-rtems_status_code rtems_port_external_to_internal(
- Objects_Id id,
- void *external,
- void **internal
-);
-
-/*
- * rtems_port_internal_to_external
- *
- * DESCRIPTION:
- *
- * This routine implements the Port_internal_to_external directive.
- * It returns the external port address which maps to the provided
- * internal port address for the specified port ID.
- */
-
-rtems_status_code rtems_port_internal_to_external(
- Objects_Id id,
- void *internal,
- void **external
-);
-
-#ifndef __RTEMS_APPLICATION__
-#include <rtems/rtems/dpmem.inl>
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/include/rtems/rtems/event.h b/cpukit/rtems/include/rtems/rtems/event.h
deleted file mode 100644
index 17b655d7d5..0000000000
--- a/cpukit/rtems/include/rtems/rtems/event.h
+++ /dev/null
@@ -1,175 +0,0 @@
-/* event.h
- *
- * This include file contains the information pertaining to the Event
- * Manager. This manager provides a high performance method of communication
- * and synchronization.
- *
- * Directives provided are:
- *
- * + send an event set to a task
- * + receive event condition
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_EVENT_h
-#define __RTEMS_EVENT_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/object.h>
-#include <rtems/rtems/types.h>
-#include <rtems/rtems/options.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/rtems/eventset.h>
-
-/*
- * This constant is passed as the event_in to the
- * rtems_event_receive directive to determine which events are pending.
- */
-
-#define EVENT_CURRENT 0
-
-/*
- * The following enumerated types indicate what happened while the event
- * manager was in the synchronization window.
- */
-
-typedef enum {
- EVENT_SYNC_SYNCHRONIZED,
- EVENT_SYNC_NOTHING_HAPPENED,
- EVENT_SYNC_TIMEOUT,
- EVENT_SYNC_SATISFIED
-} Event_Sync_states;
-
-/*
- * Event_Manager_initialization
- *
- * DESCRIPTION:
- *
- * This routine performs the initialization necessary for this manager.
- */
-
-void _Event_Manager_initialization( void );
-
-/*
- * rtems_event_send
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_event_send directive. It sends
- * event_in to the task specified by ID. If the task is blocked
- * waiting to receive events and the posting of event_in satisfies
- * the task's event condition, then it is unblocked.
- */
-
-rtems_status_code rtems_event_send (
- Objects_Id id,
- rtems_event_set event_in
-);
-
-/*
- * rtems_event_receive
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_event_receive directive. This
- * directive is invoked when the calling task wishes to receive
- * the event_in event condition. One of the fields in the option_set
- * parameter determines whether the receive request is satisfied if
- * any or all of the events are pending. If the event condition
- * is not satisfied immediately, then the task may block with an
- * optional timeout of TICKS clock ticks or return immediately.
- * This determination is based on another field in the option_set
- * parameter. This directive returns the events received in the
- * event_out parameter.
- */
-
-rtems_status_code rtems_event_receive (
- rtems_event_set event_in,
- rtems_option option_set,
- rtems_interval ticks,
- rtems_event_set *event_out
-);
-
-/*
- * _Event_Seize
- *
- * DESCRIPTION:
- *
- * This routine determines if the event condition event_in is
- * satisfied. If so or if the no_wait option is enabled in option_set,
- * then the procedure returns immediately. If neither of these
- * conditions is true, then the calling task is blocked with an
- * optional timeout of ticks clock ticks.
- */
-
-void _Event_Seize (
- rtems_event_set event_in,
- rtems_option option_set,
- rtems_interval ticks,
- rtems_event_set *event_out
-);
-
-/*
- * _Event_Surrender
- *
- * DESCRIPTION:
- *
- * This routine determines if the event condition of the_thread
- * has been satisfied. If so, it unblocks the_thread.
- */
-
-void _Event_Surrender (
- Thread_Control *the_thread
-);
-
-/*
- * _Event_Timeout
- *
- * DESCRIPTION:
- *
- * This routine is invoked when a task's event receive request
- * has not been satisfied after the specified timeout interval.
- * The task represented by ID will be unblocked and its status
- * code will be set in it's control block to indicate that a timeout
- * has occurred.
- */
-
-void _Event_Timeout (
- Objects_Id id,
- void *ignored
-);
-
-/*
- * The following defines the synchronization flag used by the
- * Event Manager to insure that signals sent to the currently
- * executing thread are received properly.
- */
-
-RTEMS_EXTERN volatile Event_Sync_states _Event_Sync_state;
-
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/rtems/eventmp.h>
-#endif
-#ifndef __RTEMS_APPLICATION__
-#include <rtems/rtems/event.inl>
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/include/rtems/rtems/eventmp.h b/cpukit/rtems/include/rtems/rtems/eventmp.h
deleted file mode 100644
index 73611d94f0..0000000000
--- a/cpukit/rtems/include/rtems/rtems/eventmp.h
+++ /dev/null
@@ -1,146 +0,0 @@
-/* eventmp.h
- *
- * This include file contains all the constants and structures associated
- * with the Multiprocessing Support in the Event Manager.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_EVENT_MP_h
-#define __RTEMS_EVENT_MP_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/rtems/event.h>
-#include <rtems/score/mppkt.h>
-#include <rtems/score/object.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/watchdog.h>
-
-/*
- * The following enumerated type defines the list of
- * remote event operations.
- */
-
-typedef enum {
- EVENT_MP_SEND_REQUEST = 0,
- EVENT_MP_SEND_RESPONSE = 1
-} Event_MP_Remote_operations;
-
-/*
- * The following data structure defines the packet used to perform
- * remote event operations.
- */
-
-typedef struct {
- rtems_packet_prefix Prefix;
- Event_MP_Remote_operations operation;
- rtems_event_set event_in;
-} Event_MP_Packet;
-
-/*
- * _Event_MP_Send_process_packet
- *
- * DESCRIPTION:
- *
- * This routine performs a remote procedure call so that a
- * process operation can be performed on another node.
- *
- * This routine is not needed since there are no process
- * packets to be sent by this manager.
- */
-
-/*
- * _Event_MP_Send_request_packet
- *
- * DESCRIPTION:
- *
- * This routine performs a remote procedure call so that a
- * directive operation can be initiated on another node.
- */
-
-rtems_status_code _Event_MP_Send_request_packet (
- Event_MP_Remote_operations operation,
- Objects_Id event_id,
- rtems_event_set event_in
-);
-
-/*
- * _Event_MP_Send_response_packet
- *
- * DESCRIPTION:
- *
- * This routine performs a remote procedure call so that a
- * directive can be performed on another node.
- */
-
-void _Event_MP_Send_response_packet (
- Event_MP_Remote_operations operation,
- Thread_Control *the_thread
-);
-
-/*
- *
- * _Event_MP_Process_packet
- *
- * DESCRIPTION:
- *
- * This routine performs the actions specific to this package for
- * the request from another node.
- */
-
-void _Event_MP_Process_packet (
- rtems_packet_prefix *the_packet_prefix
-);
-
-/*
- * _Event_MP_Send_object_was_deleted
- *
- * DESCRIPTION:
- *
- * This routine is invoked indirectly by the thread queue
- * when a proxy has been removed from the thread queue and
- * the remote node must be informed of this.
- *
- * This routine is not needed since there are no objects
- * deleted by this manager.
- */
-
-/*
- * _Event_MP_Send_extract_proxy
- *
- * DESCRIPTION:
- *
- * This routine is invoked when a task is deleted and it
- * has a proxy which must be removed from a thread queue and
- * the remote node must be informed of this.
- *
- * This routine is not needed since there are no objects
- * deleted by this manager.
- */
-
-/*
- * _Event_MP_Get_packet
- *
- * DESCRIPTION:
- *
- * This function is used to obtain a event mp packet.
- */
-
-Event_MP_Packet *_Event_MP_Get_packet ( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of file */
diff --git a/cpukit/rtems/include/rtems/rtems/eventset.h b/cpukit/rtems/include/rtems/rtems/eventset.h
deleted file mode 100644
index 5b6d5e4409..0000000000
--- a/cpukit/rtems/include/rtems/rtems/eventset.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/* eventset.h
- *
- * This include file contains the information pertaining to the
- * Event Sets Handler. This handler provides methods for the manipulation
- * of event sets which will be sent and received by tasks.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_EVENT_SET_h
-#define __RTEMS_EVENT_SET_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * The following defines the type used to control event sets.
- */
-
-typedef unsigned32 rtems_event_set;
-
-/*
- * The following constants define the individual events which may
- * be used to compose an event set.
- */
-
-#define RTEMS_PENDING_EVENTS 0 /* receive pending events */
-#define RTEMS_ALL_EVENTS 0xFFFFFFFF
-
-#define RTEMS_EVENT_0 0x00000001
-#define RTEMS_EVENT_1 0x00000002
-#define RTEMS_EVENT_2 0x00000004
-#define RTEMS_EVENT_3 0x00000008
-#define RTEMS_EVENT_4 0x00000010
-#define RTEMS_EVENT_5 0x00000020
-#define RTEMS_EVENT_6 0x00000040
-#define RTEMS_EVENT_7 0x00000080
-#define RTEMS_EVENT_8 0x00000100
-#define RTEMS_EVENT_9 0x00000200
-#define RTEMS_EVENT_10 0x00000400
-#define RTEMS_EVENT_11 0x00000800
-#define RTEMS_EVENT_12 0x00001000
-#define RTEMS_EVENT_13 0x00002000
-#define RTEMS_EVENT_14 0x00004000
-#define RTEMS_EVENT_15 0x00008000
-#define RTEMS_EVENT_16 0x00010000
-#define RTEMS_EVENT_17 0x00020000
-#define RTEMS_EVENT_18 0x00040000
-#define RTEMS_EVENT_19 0x00080000
-#define RTEMS_EVENT_20 0x00100000
-#define RTEMS_EVENT_21 0x00200000
-#define RTEMS_EVENT_22 0x00400000
-#define RTEMS_EVENT_23 0x00800000
-#define RTEMS_EVENT_24 0x01000000
-#define RTEMS_EVENT_25 0x02000000
-#define RTEMS_EVENT_26 0x04000000
-#define RTEMS_EVENT_27 0x08000000
-#define RTEMS_EVENT_28 0x10000000
-#define RTEMS_EVENT_29 0x20000000
-#define RTEMS_EVENT_30 0x40000000
-#define RTEMS_EVENT_31 0x80000000
-
-
-/*
- * The following constant is the value of an event set which
- * has no events pending.
- */
-
-#define EVENT_SETS_NONE_PENDING 0
-
-#ifndef __RTEMS_APPLICATION__
-#include <rtems/rtems/eventset.inl>
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/include/rtems/rtems/intr.h b/cpukit/rtems/include/rtems/rtems/intr.h
deleted file mode 100644
index db8cdbf360..0000000000
--- a/cpukit/rtems/include/rtems/rtems/intr.h
+++ /dev/null
@@ -1,159 +0,0 @@
-/* intr.h
- *
- * This include file contains all the constants and structures associated
- * with the Interrupt Manager.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_INTERRUPT_h
-#define __RTEMS_INTERRUPT_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/isr.h>
-
-/*
- * Interrupt level type
- */
-
-typedef ISR_Level rtems_interrupt_level;
-
-/*
- * The following type defines the control block used to manage
- * the vectors.
- */
-
-typedef ISR_Vector_number rtems_vector_number;
-
-/*
- * Return type for ISR Handler
- */
-
-typedef void rtems_isr;
-
-/*
- * Pointer to an ISR Handler
- */
-
-typedef rtems_isr ( *rtems_isr_entry )(
- rtems_vector_number
- );
-
-/*
- * _Interrupt_Manager_initialization
- *
- * DESCRIPTION:
- *
- * This routine initializes the interrupt manager.
- *
- */
-
-void _Interrupt_Manager_initialization( void );
-
-/*
- * rtems_interrupt_catch
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_interrupt_catch directive. This
- * directive installs new_isr_handler as the RTEMS interrupt service
- * routine for vector. The previous RTEMS interrupt service
- * routine is returned in old_isr_handler.
- */
-
-rtems_status_code rtems_interrupt_catch(
- rtems_isr_entry new_isr_handler,
- rtems_vector_number vector,
- rtems_isr_entry *old_isr_handler
-);
-
-/*
- * rtems_interrupt_disable
- *
- * DESCRIPTION:
- *
- * This routine disables all maskable interrupts and returns the
- * previous level in _isr_cookie.
- */
-
-#define rtems_interrupt_disable( _isr_cookie ) \
- _ISR_Disable(_isr_cookie)
-
-/*
- * rtems_interrupt_enable
- *
- * DESCRIPTION:
- *
- * This routine enables maskable interrupts to the level indicated
- * _isr_cookie.
- */
-
-#define rtems_interrupt_enable( _isr_cookie ) \
- _ISR_Enable(_isr_cookie)
-
-/*
- * rtems_interrupt_flash
- *
- * DESCRIPTION:
- *
- * This routine temporarily enables maskable interrupts to the
- * level in _isr_cookie before redisabling them.
- */
-
-#define rtems_interrupt_flash( _isr_cookie ) \
- _ISR_Flash(_isr_cookie)
-
-/*
- * rtems_interrupt_is_in_progress
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the processor is currently servicing
- * an interrupt and FALSE otherwise. A return value of TRUE indicates
- * that the caller is an interrupt service routine, NOT a thread. The
- * directives available to an interrupt service routine are restricted.
- */
-
-#define rtems_interrupt_is_in_progress() \
- _ISR_Is_in_progress()
-
-/*
- * rtems_interrupt_cause
- *
- * DESCRIPTION:
- *
- * This routine generates an interrupt.
- *
- * NOTE: No implementation.
- */
-
-#define rtems_interrupt_cause( _interrupt_to_cause )
-
-/*
- * rtems_interrupt_cause
- *
- * DESCRIPTION:
- *
- * This routine clears the specified interrupt.
- *
- * NOTE: No implementation.
- */
-
-#define rtems_interrupt_clear( _interrupt_to_clear )
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/include/rtems/rtems/message.h b/cpukit/rtems/include/rtems/rtems/message.h
deleted file mode 100644
index 485fe03fc5..0000000000
--- a/cpukit/rtems/include/rtems/rtems/message.h
+++ /dev/null
@@ -1,328 +0,0 @@
-/* message.h
- *
- * This include file contains all the constants and structures associated
- * with the Message Queue Manager. This manager provides a mechanism for
- * communication and synchronization between tasks using messages.
- *
- * Directives provided are:
- *
- * + create a queue
- * + get ID of a queue
- * + delete a queue
- * + put a message at the rear of a queue
- * + put a message at the front of a queue
- * + broadcast N messages to a queue
- * + receive message from a queue
- * + flush all messages on a queue
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_MESSAGE_QUEUE_h
-#define __RTEMS_MESSAGE_QUEUE_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/rtems/types.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/attr.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/coremsg.h>
-
-/*
- * The following enumerated type details the modes in which a message
- * may be submitted to a message queue. The message may be posted
- * in a send or urgent fashion.
- */
-
-typedef enum {
- MESSAGE_QUEUE_SEND_REQUEST = 0,
- MESSAGE_QUEUE_URGENT_REQUEST = 1
-} Message_queue_Submit_types;
-
-/*
- * The following records define the control block used to manage
- * each message queue.
- */
-
-typedef struct {
- Objects_Control Object;
- rtems_attribute attribute_set;
- CORE_message_queue_Control message_queue;
-} Message_queue_Control;
-
-/*
- * The following defines the information control block used to
- * manage this class of objects.
- */
-
-RTEMS_EXTERN Objects_Information _Message_queue_Information;
-
-/*
- * _Message_queue_Manager_initialization
- *
- * DESCRIPTION:
- *
- * This routine performs the initialization necessary for this manager.
- */
-
-void _Message_queue_Manager_initialization(
- unsigned32 maximum_message_queues
-);
-
-/*
- * rtems_message_queue_create
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_message_queue_create directive. The
- * message queue will have the name name. If the attribute_set indicates
- * that the message queue is to be limited in the number of messages
- * that can be outstanding, then count indicates the maximum number of
- * messages that will be held. It returns the id of the created
- * message queue in ID.
- */
-
-rtems_status_code rtems_message_queue_create(
- rtems_name name,
- unsigned32 count,
- unsigned32 max_message_size,
- rtems_attribute attribute_set,
- Objects_Id *id
-);
-
-/*
- * rtems_message_queue_ident
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_message_queue_ident directive.
- * This directive returns the message queue ID associated with NAME.
- * If more than one message queue is named name, then the message
- * queue to which the ID belongs is arbitrary. node indicates the
- * extent of the search for the ID of the message queue named name.
- * The search can be limited to a particular node or allowed to
- * encompass all nodes.
- */
-
-rtems_status_code rtems_message_queue_ident(
- rtems_name name,
- unsigned32 node,
- Objects_Id *id
-);
-
-/*
- * rtems_message_queue_delete
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_message_queue_delete directive. The
- * message queue indicated by ID is deleted.
- */
-
-rtems_status_code rtems_message_queue_delete(
- Objects_Id id
-);
-
-/*
- * rtems_message_queue_send
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_message_queue_send directive.
- * This directive sends the message buffer to the message queue
- * indicated by ID. If one or more tasks is blocked waiting
- * to receive a message from this message queue, then one will
- * receive the message. The task selected to receive the
- * message is based on the task queue discipline algorithm in
- * use by this particular message queue. If no tasks are waiting,
- * then the message buffer will be placed at the REAR of the
- * chain of pending messages for this message queue.
- */
-
-rtems_status_code rtems_message_queue_send(
- Objects_Id id,
- void *buffer,
- unsigned32 size
-);
-
-/*
- * rtems_message_queue_urgent
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_message_queue_urgent directive.
- * This directive has the same behavior as rtems_message_queue_send
- * except that if no tasks are waiting, the message buffer will
- * be placed at the FRONT of the chain of pending messages rather
- * than at the REAR.
- */
-
-rtems_status_code rtems_message_queue_urgent(
- Objects_Id id,
- void *buffer,
- unsigned32 size
-);
-
-/*
- * rtems_message_queue_broadcast
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_message_queue_broadcast directive.
- * This directive sends the message buffer to all of the tasks blocked
- * waiting for a message on the message queue indicated by ID.
- * If no tasks are waiting, then the message buffer will not be queued.
- */
-
-rtems_status_code rtems_message_queue_broadcast(
- Objects_Id id,
- void *buffer,
- unsigned32 size,
- unsigned32 *count
-);
-
-/*
- * rtems_message_queue_receive
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_message_queue_receive directive.
- * This directive is invoked when the calling task wishes to receive
- * a message from the message queue indicated by ID. The received
- * message is to be placed in buffer. If no messages are outstanding
- * and the option_set indicates that the task is willing to block,
- * then the task will be blocked until a message arrives or until,
- * optionally, timeout clock ticks have passed.
- */
-
-rtems_status_code rtems_message_queue_receive(
- Objects_Id id,
- void *buffer,
- unsigned32 *size,
- unsigned32 option_set,
- rtems_interval timeout
-);
-
-/*
- * rtems_message_queue_flush
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_message_queue_flush directive.
- * This directive takes all outstanding messages for the message
- * queue indicated by ID and returns them to the inactive message
- * chain. The number of messages flushed is returned in COUNT.
- */
-
-rtems_status_code rtems_message_queue_flush(
- Objects_Id id,
- unsigned32 *count
-);
-
-/*
- * rtems_message_queue_get_number_pending
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_message_queue_get_number_pending
- * directive. This directive returns the number of pending
- * messages for the message queue indicated by ID
- * chain. The number of messages pending is returned in COUNT.
- */
-
-rtems_status_code rtems_message_queue_get_number_pending(
- Objects_Id id,
- unsigned32 *count
-);
-
-
-/*
- * _Message_queue_Submit
- *
- * DESCRIPTION:
- *
- * This routine implements the directives rtems_message_queue_send
- * and rtems_message_queue_urgent. It processes a message that is
- * to be submitted to the designated message queue. The message will
- * either be processed as a send send message which it will be inserted
- * at the rear of the queue or it will be processed as an urgent message
- * which will be inserted at the front of the queue.
- */
-
-rtems_status_code _Message_queue_Submit(
- Objects_Id id,
- void *buffer,
- unsigned32 size,
- Message_queue_Submit_types submit_type
-);
-
-/*
- * _Message_queue_Allocate
- *
- * DESCRIPTION:
- *
- * This function allocates a message queue control block from
- * the inactive chain of free message queue control blocks.
- */
-
-Message_queue_Control *_Message_queue_Allocate (
- unsigned32 count,
- unsigned32 max_message_size
-);
-
-/*
- * _Message_queue_Translate_core_message_queue_return_code
- *
- * DESCRIPTION:
- *
- * This function returns a RTEMS status code based on the core message queue
- * status code specified.
- */
-
-rtems_status_code _Message_queue_Translate_core_message_queue_return_code (
- unsigned32 the_message_queue_status
-);
-
-/*
- *
- * _Message_queue_Core_message_queue_mp_support
- *
- * Input parameters:
- * the_thread - the remote thread the message was submitted to
- * id - id of the message queue
- *
- * Output parameters: NONE
- */
-
-#if defined(RTEMS_MULTIPROCESSING)
-void _Message_queue_Core_message_queue_mp_support (
- Thread_Control *the_thread,
- Objects_Id id
-);
-#endif
-
-#ifndef __RTEMS_APPLICATION__
-#include <rtems/rtems/message.inl>
-#endif
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/rtems/msgmp.h>
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/include/rtems/rtems/modes.h b/cpukit/rtems/include/rtems/rtems/modes.h
deleted file mode 100644
index eed979721d..0000000000
--- a/cpukit/rtems/include/rtems/rtems/modes.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/* modes.h
- *
- * This include file contains all constants and structures associated
- * with the RTEMS thread and RTEMS_ASR modes.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_MODES_h
-#define __RTEMS_MODES_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/isr.h>
-
-/*
- * The following type defines the control block used to manage
- * each a mode set.
- */
-
-typedef unsigned32 Modes_Control;
-
-/*
- * The following constants define the individual modes and masks
- * which may be used to compose a mode set and to alter modes.
- */
-
-#define RTEMS_ALL_MODE_MASKS 0x0000ffff
-
-#define RTEMS_DEFAULT_MODES 0x00000000
-#define RTEMS_CURRENT_MODE 0
-
-#define RTEMS_PREEMPT_MASK 0x00000100 /* preemption bit */
-#define RTEMS_TIMESLICE_MASK 0x00000200 /* timeslice bit */
-#define RTEMS_ASR_MASK 0x00000400 /* RTEMS_ASR enable bit */
-#define RTEMS_INTERRUPT_MASK CPU_MODES_INTERRUPT_MASK
-
-#define RTEMS_PREEMPT 0x00000000 /* enable preemption */
-#define RTEMS_NO_PREEMPT 0x00000100 /* disable preemption */
-
-#define RTEMS_NO_TIMESLICE 0x00000000 /* disable timeslicing */
-#define RTEMS_TIMESLICE 0x00000200 /* enable timeslicing */
-
-#define RTEMS_ASR 0x00000000 /* enable RTEMS_ASR */
-#define RTEMS_NO_ASR 0x00000400 /* disable RTEMS_ASR */
-
-/*
- * The number of bits for interrupt levels is CPU dependent.
- * RTEMS supports 0 to 256 levels in bits 0-7 of the mode.
- */
-
-/*PAGE
- *
- * RTEMS_INTERRUPT_LEVEL
- *
- * DESCRIPTION:
- *
- * This function returns the processor dependent interrupt
- * level which corresponds to the requested interrupt level.
- *
- * NOTE: RTEMS supports 256 interrupt levels using the least
- * significant eight bits of MODES.CONTROL. On any
- * particular CPU, fewer than 256 levels may be supported.
- */
-
-#define RTEMS_INTERRUPT_LEVEL( _mode_set ) \
- ( (_mode_set) & RTEMS_INTERRUPT_MASK )
-
-
-#ifndef __RTEMS_APPLICATION__
-#include <rtems/rtems/modes.inl>
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/include/rtems/rtems/mp.h b/cpukit/rtems/include/rtems/rtems/mp.h
deleted file mode 100644
index 1e6c95e218..0000000000
--- a/cpukit/rtems/include/rtems/rtems/mp.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/* mp.h
- *
- * This include file contains all the constants and structures associated
- * with the Multiprocessing Manager.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_MP_h
-#define __RTEMS_MP_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- *
- * _Multiprocessing_Manager_initialization
- *
- * DESCRIPTION:
- *
- * This routine performs the initialization necessary for this manager.
- */
-
-void _Multiprocessing_Manager_initialization ( void );
-
-/*
- *
- * rtems_multiprocessing_announce
- *
- * DESCRIPTION:
- *
- * This routine implements the MULTIPROCESSING_ANNOUNCE directive.
- * It is invoked by the MPCI layer to indicate that an MPCI packet
- * has been received.
- */
-
-void rtems_multiprocessing_announce ( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/include/rtems/rtems/msgmp.h b/cpukit/rtems/include/rtems/rtems/msgmp.h
deleted file mode 100644
index 19b52bbcc4..0000000000
--- a/cpukit/rtems/include/rtems/rtems/msgmp.h
+++ /dev/null
@@ -1,176 +0,0 @@
-/* msgmp.h
- *
- * This include file contains all the constants and structures associated
- * with the Multiprocessing Support in the Message Manager.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_MESSAGE_QUEUE_MP_h
-#define __RTEMS_MESSAGE_QUEUE_MP_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/rtems/message.h>
-#include <rtems/score/mppkt.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/watchdog.h>
-
-/*
- * The following enumerated type defines the list of
- * remote message queue operations.
- */
-
-typedef enum {
- MESSAGE_QUEUE_MP_ANNOUNCE_CREATE = 0,
- MESSAGE_QUEUE_MP_ANNOUNCE_DELETE = 1,
- MESSAGE_QUEUE_MP_EXTRACT_PROXY = 2,
- MESSAGE_QUEUE_MP_RECEIVE_REQUEST = 3,
- MESSAGE_QUEUE_MP_RECEIVE_RESPONSE = 4,
- MESSAGE_QUEUE_MP_SEND_REQUEST = 5,
- MESSAGE_QUEUE_MP_SEND_RESPONSE = 6,
- MESSAGE_QUEUE_MP_URGENT_REQUEST = 7,
- MESSAGE_QUEUE_MP_URGENT_RESPONSE = 8,
- MESSAGE_QUEUE_MP_BROADCAST_REQUEST = 9,
- MESSAGE_QUEUE_MP_BROADCAST_RESPONSE = 10,
- MESSAGE_QUEUE_MP_FLUSH_REQUEST = 11,
- MESSAGE_QUEUE_MP_FLUSH_RESPONSE = 12,
- MESSAGE_QUEUE_MP_GET_NUMBER_PENDING_REQUEST = 13,
- MESSAGE_QUEUE_MP_GET_NUMBER_PENDING_RESPONSE = 14
-} Message_queue_MP_Remote_operations;
-
-/*
- * The following data structure defines the packet used to perform
- * remote message queue operations.
- */
-
-typedef struct {
- rtems_packet_prefix Prefix;
- Message_queue_MP_Remote_operations operation;
- rtems_name name;
- rtems_option option_set;
- Objects_Id proxy_id;
- unsigned32 count;
- unsigned32 size;
- unsigned32 pad0;
- CORE_message_queue_Buffer Buffer;
-} Message_queue_MP_Packet;
-
-/*
- * _Message_queue_MP_Send_process_packet
- *
- * DESCRIPTION:
- *
- * This routine performs a remote procedure call so that a
- * process operation can be performed on another node.
- */
-
-void _Message_queue_MP_Send_process_packet (
- Message_queue_MP_Remote_operations operation,
- Objects_Id message_queue_id,
- rtems_name name,
- Objects_Id proxy_id
-);
-
-/*
- * _Message_queue_MP_Send_request_packet
- *
- * DESCRIPTION:
- *
- * This routine performs a remote procedure call so that a
- * directive operation can be initiated on another node.
- */
-
-rtems_status_code _Message_queue_MP_Send_request_packet (
- Message_queue_MP_Remote_operations operation,
- Objects_Id message_queue_id,
- void *buffer,
- unsigned32 *size_p,
- rtems_option option_set,
- Watchdog_Interval timeout
-);
-
-/*
- * _Message_queue_MP_Send_response_packet
- *
- * DESCRIPTION:
- *
- * This routine performs a remote procedure call so that a
- * directive can be performed on another node.
- */
-
-void _Message_queue_MP_Send_response_packet (
- Message_queue_MP_Remote_operations operation,
- Objects_Id message_queue_id,
- Thread_Control *the_thread
-);
-
-/*
- *
- * _Message_queue_MP_Process_packet
- *
- * DESCRIPTION:
- *
- * This routine performs the actions specific to this package for
- * the request from another node.
- */
-
-void _Message_queue_MP_Process_packet (
- rtems_packet_prefix *the_packet_prefix
-);
-
-/*
- * _Message_queue_MP_Send_object_was_deleted
- *
- * DESCRIPTION:
- *
- * This routine is invoked indirectly by the thread queue
- * when a proxy has been removed from the thread queue and
- * the remote node must be informed of this.
- */
-
-void _Message_queue_MP_Send_object_was_deleted (
- Thread_Control *the_proxy
-);
-
-/*
- * _Message_queue_MP_Send_extract_proxy
- *
- * DESCRIPTION:
- *
- * This routine is invoked when a task is deleted and it
- * has a proxy which must be removed from a thread queue and
- * the remote node must be informed of this.
- */
-
-void _Message_queue_MP_Send_extract_proxy (
- Thread_Control *the_thread
-);
-
-/*
- * _Message_queue_MP_Get_packet
- *
- * DESCRIPTION:
- *
- * This function is used to obtain a message queue mp packet.
- */
-
-Message_queue_MP_Packet *_Message_queue_MP_Get_packet ( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of file */
diff --git a/cpukit/rtems/include/rtems/rtems/options.h b/cpukit/rtems/include/rtems/rtems/options.h
deleted file mode 100644
index b65ce127b3..0000000000
--- a/cpukit/rtems/include/rtems/rtems/options.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/* options.h
- *
- * This include file contains information which defines the
- * options available on many directives.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_OPTIONS_h
-#define __RTEMS_OPTIONS_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * The following type defines the control block used to manage
- * option sets.
- */
-
-typedef unsigned32 rtems_option;
-
-/*
- * The following constants define the individual options which may
- * be used to compose an option set.
- */
-
-#define RTEMS_DEFAULT_OPTIONS 0x00000000
-
-#define RTEMS_WAIT 0x00000000 /* wait on resource */
-#define RTEMS_NO_WAIT 0x00000001 /* do not wait on resource */
-
-#define RTEMS_EVENT_ALL 0x00000000 /* wait for all events */
-#define RTEMS_EVENT_ANY 0x00000002 /* wait on any event */
-
-#ifndef __RTEMS_APPLICATION__
-#include <rtems/rtems/options.inl>
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/include/rtems/rtems/part.h b/cpukit/rtems/include/rtems/rtems/part.h
deleted file mode 100644
index 1369e475e7..0000000000
--- a/cpukit/rtems/include/rtems/rtems/part.h
+++ /dev/null
@@ -1,169 +0,0 @@
-/* partition.h
- *
- * This include file contains all the constants and structures associated
- * with the Partition Manager. This manager provides facilities to
- * dynamically allocate memory in fixed-sized units which are returned
- * as buffers.
- *
- * Directives provided are:
- *
- * + create a partition
- * + get an ID of a partition
- * + delete a partition
- * + get a buffer from a partition
- * + return a buffer to a partition
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_PARTITION_h
-#define __RTEMS_PARTITION_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/address.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/attr.h>
-#include <rtems/rtems/types.h>
-
-/*
- * The following defines the control block used to manage each partition.
- */
-
-typedef struct {
- Objects_Control Object;
- void *starting_address; /* physical address */
- unsigned32 length; /* in bytes */
- unsigned32 buffer_size; /* in bytes */
- rtems_attribute attribute_set; /* attributes */
- unsigned32 number_of_used_blocks; /* or allocated buffers */
- Chain_Control Memory; /* buffer chain */
-} Partition_Control;
-
-/*
- * The following defines the information control block used to
- * manage this class of objects.
- */
-
-RTEMS_EXTERN Objects_Information _Partition_Information;
-
-/*
- * _Partition_Manager_initialization
- *
- * DESCRIPTION:
- *
- * This routine performs the initialization necessary for this manager.
- */
-
-void _Partition_Manager_initialization(
- unsigned32 maximum_partitions
-);
-
-/*
- * rtems_partition_create
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_partition_create directive. The
- * partition will have the name name. The memory area managed by
- * the partition is of length bytes and starts at starting_address.
- * The memory area will be divided into as many buffers of
- * buffer_size bytes as possible. The attribute_set determines if
- * the partition is global or local. It returns the id of the
- * created partition in ID.
- */
-
-rtems_status_code rtems_partition_create(
- rtems_name name,
- void *starting_address,
- unsigned32 length,
- unsigned32 buffer_size,
- rtems_attribute attribute_set,
- Objects_Id *id
-);
-
-/*
- * rtems_partition_ident
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_partition_ident directive.
- * This directive returns the partition ID associated with name.
- * If more than one partition is named name, then the partition
- * to which the ID belongs is arbitrary. node indicates the
- * extent of the search for the ID of the partition named name.
- * The search can be limited to a particular node or allowed to
- * encompass all nodes.
- */
-
-rtems_status_code rtems_partition_ident(
- rtems_name name,
- unsigned32 node,
- Objects_Id *id
-);
-
-/*
- * rtems_partition_delete
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_partition_delete directive. The
- * partition indicated by ID is deleted.
- */
-
-rtems_status_code rtems_partition_delete(
- Objects_Id id
-);
-
-/*
- * rtems_partition_get_buffer
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_partition_get_buffer directive. It
- * attempts to allocate a buffer from the partition associated with ID.
- * If a buffer is allocated, its address is returned in buffer.
- */
-
-rtems_status_code rtems_partition_get_buffer(
- Objects_Id id,
- void **buffer
-);
-
-/*
- * rtems_partition_return_buffer
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_partition_return_buffer directive. It
- * frees the buffer to the partition associated with ID. The buffer must
- * have been previously allocated from the same partition.
- */
-
-rtems_status_code rtems_partition_return_buffer(
- Objects_Id id,
- void *buffer
-);
-
-#ifndef __RTEMS_APPLICATION__
-#include <rtems/rtems/part.inl>
-#endif
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/rtems/partmp.h>
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/include/rtems/rtems/partmp.h b/cpukit/rtems/include/rtems/rtems/partmp.h
deleted file mode 100644
index bec116367c..0000000000
--- a/cpukit/rtems/include/rtems/rtems/partmp.h
+++ /dev/null
@@ -1,160 +0,0 @@
-/* partmp.h
- *
- * This include file contains all the constants and structures associated
- * with the Multiprocessing Support in the Partition Manager.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_PARTITION_MP_h
-#define __RTEMS_PARTITION_MP_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/mppkt.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
-#include <rtems/score/thread.h>
-
-#include <rtems/rtems/part.h>
-
-/*
- * The following enumerated type defines the list of
- * remote partition operations.
- */
-
-typedef enum {
- PARTITION_MP_ANNOUNCE_CREATE = 0,
- PARTITION_MP_ANNOUNCE_DELETE = 1,
- PARTITION_MP_EXTRACT_PROXY = 2,
- PARTITION_MP_GET_BUFFER_REQUEST = 3,
- PARTITION_MP_GET_BUFFER_RESPONSE = 4,
- PARTITION_MP_RETURN_BUFFER_REQUEST = 5,
- PARTITION_MP_RETURN_BUFFER_RESPONSE = 6
-} Partition_MP_Remote_operations;
-
-/*
- * The following data structure defines the packet used to perform
- * remote partition operations.
- */
-
-typedef struct {
- rtems_packet_prefix Prefix;
- Partition_MP_Remote_operations operation;
- rtems_name name;
- void *buffer;
- Objects_Id proxy_id;
-} Partition_MP_Packet;
-
-/*
- * _Partition_MP_Send_process_packet
- *
- * DESCRIPTION:
- *
- * This routine performs a remote procedure call so that a
- * process operation can be performed on another node.
- */
-
-void _Partition_MP_Send_process_packet (
- Partition_MP_Remote_operations operation,
- Objects_Id partition_id,
- rtems_name name,
- Objects_Id proxy_id
-);
-
-/*
- * _Partition_MP_Send_request_packet
- *
- * DESCRIPTION:
- *
- * This routine performs a remote procedure call so that a
- * directive operation can be initiated on another node.
- */
-
-rtems_status_code _Partition_MP_Send_request_packet (
- Partition_MP_Remote_operations operation,
- Objects_Id partition_id,
- void *buffer
-);
-
-/*
- * _Partition_MP_Send_response_packet
- *
- * DESCRIPTION:
- *
- * This routine performs a remote procedure call so that a
- * directive can be performed on another node.
- */
-
-void _Partition_MP_Send_response_packet (
- Partition_MP_Remote_operations operation,
- Objects_Id partition_id,
- Thread_Control *the_thread
-);
-
-/*
- *
- * _Partition_MP_Process_packet
- *
- * DESCRIPTION:
- *
- * This routine performs the actions specific to this package for
- * the request from another node.
- */
-
-void _Partition_MP_Process_packet (
- rtems_packet_prefix *the_packet_prefix
-);
-
-/*
- * _Partition_MP_Send_object_was_deleted
- *
- * DESCRIPTION:
- *
- * This routine is invoked indirectly by the thread queue
- * when a proxy has been removed from the thread queue and
- * the remote node must be informed of this.
- *
- * This routine is not needed by the Partition since a partition
- * cannot be deleted when buffers are in use.
- */
-
-/*
- * _Partition_MP_Send_extract_proxy
- *
- * DESCRIPTION:
- *
- * This routine is invoked when a task is deleted and it
- * has a proxy which must be removed from a thread queue and
- * the remote node must be informed of this.
- */
-
-void _Partition_MP_Send_extract_proxy (
- Thread_Control *the_thread
-);
-
-/*
- * _Partition_MP_Get_packet
- *
- * DESCRIPTION:
- *
- * This function is used to obtain a partition mp packet.
- */
-
-Partition_MP_Packet *_Partition_MP_Get_packet ( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of file */
diff --git a/cpukit/rtems/include/rtems/rtems/ratemon.h b/cpukit/rtems/include/rtems/rtems/ratemon.h
deleted file mode 100644
index bc1036043f..0000000000
--- a/cpukit/rtems/include/rtems/rtems/ratemon.h
+++ /dev/null
@@ -1,212 +0,0 @@
-/* ratemon.h
- *
- * This include file contains all the constants, structures, and
- * prototypes associated with the Rate Monotonic Manager. This manager
- * provides facilities to implement tasks which execute in a periodic fashion.
- *
- * Directives provided are:
- *
- * + create a rate monotonic timer
- * + cancel a period
- * + delete a rate monotonic timer
- * + conclude current and start the next period
- * + obtain status information on a period
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_RATE_MONOTONIC_h
-#define __RTEMS_RATE_MONOTONIC_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/object.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/watchdog.h>
-
-/*
- * The following enumerated type defines the states in which a
- * period may be.
- */
-
-typedef enum {
- RATE_MONOTONIC_INACTIVE, /* off chain, never initialized */
- RATE_MONOTONIC_OWNER_IS_BLOCKING, /* on chain, owner is blocking on it */
- RATE_MONOTONIC_ACTIVE, /* on chain, running continuously */
- RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING, /* on chain, expired while owner was */
- /* was blocking on it */
- RATE_MONOTONIC_EXPIRED /* off chain, will be reset by next */
- /* rtems_rate_monotonic_period */
-} rtems_rate_monotonic_period_states;
-
-/*
- * The following constant is the interval passed to the rate_monontonic_period
- * directive to obtain status information.
- */
-
-#define RTEMS_PERIOD_STATUS WATCHDOG_NO_TIMEOUT
-
-/*
- * The following defines the period status structure.
- */
-
-typedef struct {
- rtems_rate_monotonic_period_states state;
- unsigned32 ticks_since_last_period;
- unsigned32 ticks_executed_since_last_period;
-} rtems_rate_monotonic_period_status;
-
-/*
- * The following structure defines the control block used to manage
- * each period.
- */
-
-typedef struct {
- Objects_Control Object;
- Watchdog_Control Timer;
- rtems_rate_monotonic_period_states state;
- unsigned32 owner_ticks_executed_at_period;
- unsigned32 time_at_period;
- Thread_Control *owner;
-} Rate_monotonic_Control;
-
-RTEMS_EXTERN Objects_Information _Rate_monotonic_Information;
-
-/*
- * _Rate_monotonic_Manager_initialization
- *
- * DESCRIPTION:
- *
- * This routine performs the initialization necessary for this manager.
- */
-
-void _Rate_monotonic_Manager_initialization(
- unsigned32 maximum_periods
-);
-
-/*
- * rtems_rate_monotonic_create
- *
- * DESCRIPTION:
- *
- * This routine implements the rate_monotonic_create directive. The
- * period will have the name name. It returns the id of the
- * created period in ID.
- */
-
-rtems_status_code rtems_rate_monotonic_create(
- rtems_name name,
- Objects_Id *id
-);
-
-/*
- * rtems_rate_monotonic_ident
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_rate_monotonic_ident directive.
- * This directive returns the period ID associated with name.
- * If more than one period is named name, then the period
- * to which the ID belongs is arbitrary.
- */
-
-rtems_status_code rtems_rate_monotonic_ident(
- rtems_name name,
- Objects_Id *id
-);
-
-/*
- * rtems_rate_monotonic_cancel
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_rate_monotonic_cancel directive. This
- * directive stops the period associated with ID from continuing to
- * run.
- */
-
-rtems_status_code rtems_rate_monotonic_cancel(
- Objects_Id id
-);
-
-/*
- * rtems_rate_monotonic_delete
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_rate_monotonic_delete directive. The
- * period indicated by ID is deleted.
- */
-
-rtems_status_code rtems_rate_monotonic_delete(
- Objects_Id id
-);
-
-/*
- * rtems_rate_monotonic_get_status
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_rate_monotonic_get_status directive.
- * Information about the period indicated by ID is returned.
- *
- */
-
-rtems_status_code rtems_rate_monotonic_get_status(
- Objects_Id id,
- rtems_rate_monotonic_period_status *status
-);
-
-/*
- * rtems_rate_monotonic_period
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_rate_monotonic_period directive. When
- * length is non-zero, this directive initiates the period associated with
- * ID from continuing for a period of length. If length is zero, then
- * result is set to indicate the current state of the period.
- */
-
-rtems_status_code rtems_rate_monotonic_period(
- Objects_Id id,
- rtems_interval length
-);
-
-/*
- * _Rate_monotonic_Timeout
- *
- * DESCRIPTION:
- *
- * This routine is invoked when the period represented
- * by ID expires. If the task which owns this period is blocked
- * waiting for the period to expire, then it is readied and the
- * period is restarted. If the owning task is not waiting for the
- * period to expire, then the period is placed in the EXPIRED
- * state and not restarted.
- */
-
-void _Rate_monotonic_Timeout (
- Objects_Id id,
- void *ignored
-);
-
-#ifndef __RTEMS_APPLICATION__
-#include <rtems/rtems/ratemon.inl>
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/include/rtems/rtems/region.h b/cpukit/rtems/include/rtems/rtems/region.h
deleted file mode 100644
index f8e4bd6512..0000000000
--- a/cpukit/rtems/include/rtems/rtems/region.h
+++ /dev/null
@@ -1,235 +0,0 @@
-/* region.h
- *
- * This include file contains all the constants and structures associated
- * with the Region Manager. This manager provides facilities to dynamically
- * allocate memory in variable sized units which are returned as segments.
- *
- * Directives provided are:
- *
- * + create a region
- * + get an ID of a region
- * + delete a region
- * + get a segment from a region
- * + return a segment to a region
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_REGION_h
-#define __RTEMS_REGION_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/object.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/heap.h>
-#include <rtems/debug.h>
-#include <rtems/rtems/attr.h>
-#include <rtems/rtems/types.h>
-
-/*
- * The following records define the control block used to manage
- * each region.
- */
-
-typedef struct {
- Objects_Control Object;
- Thread_queue_Control Wait_queue; /* waiting threads */
- void *starting_address; /* physical start addr */
- unsigned32 length; /* physical length(bytes) */
- unsigned32 page_size; /* in bytes */
- unsigned32 maximum_segment_size; /* in bytes */
- rtems_attribute attribute_set;
- unsigned32 number_of_used_blocks; /* blocks allocated */
- Heap_Control Memory;
-} Region_Control;
-
-/*
- * The following defines the information control block used to
- * manage this class of objects.
- */
-
-RTEMS_EXTERN Objects_Information _Region_Information;
-
-/*
- * _Region_Manager_initialization
- *
- * DESCRIPTION:
- *
- * This routine performs the initialization necessary for this manager.
- */
-
-void _Region_Manager_initialization(
- unsigned32 maximum_regions
-);
-
-/*
- * rtems_region_create
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_region_create directive. The
- * region will have the name name. The memory area managed by
- * the region is of length bytes and starts at starting_address.
- * The memory area will be divided into as many allocatable units of
- * page_size bytes as possible. The attribute_set determines which
- * thread queue discipline is used by the region. It returns the
- * id of the created region in ID.
- */
-
-rtems_status_code rtems_region_create(
- rtems_name name,
- void *starting_address,
- unsigned32 length,
- unsigned32 page_size,
- rtems_attribute attribute_set,
- Objects_Id *id
-);
-
-/*
- * rtems_region_extend
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_region_extend directive. The
- * region will have the name name. The memory area managed by
- * the region will be attempted to be grown by length bytes using
- * the memory starting at starting_address.
- */
-
-rtems_status_code rtems_region_extend(
- Objects_Id id,
- void *starting_address,
- unsigned32 length
-);
-
-/*
- * rtems_region_ident
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_region_ident directive.
- * This directive returns the region ID associated with name.
- * If more than one region is named name, then the region
- * to which the ID belongs is arbitrary.
- */
-
-rtems_status_code rtems_region_ident(
- rtems_name name,
- Objects_Id *id
-);
-
-/*
- * rtems_region_delete
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_region_delete directive. The
- * region indicated by ID is deleted.
- */
-
-rtems_status_code rtems_region_delete(
- Objects_Id id
-);
-
-/*
- * rtems_region_get_segment
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_region_get_segment directive. It
- * attempts to allocate a segment from the region associated with ID.
- * If a segment of the requested size can be allocated, its address
- * is returned in segment. If no segment is available, then the task
- * may return immediately or block waiting for a segment with an optional
- * timeout of timeout clock ticks. Whether the task blocks or returns
- * immediately is based on the no_wait option in the option_set.
- */
-
-rtems_status_code rtems_region_get_segment(
- Objects_Id id,
- unsigned32 size,
- rtems_option option_set,
- rtems_interval timeout,
- void **segment
-);
-
-/*
- * rtems_region_get_segment_size
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_region_get_segment_size directive. It
- * returns the size in bytes of the specified user memory area.
- */
-
-rtems_status_code rtems_region_get_segment_size(
- Objects_Id id,
- void *segment,
- unsigned32 *size
-);
-
-/*
- * rtems_region_return_segment
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_region_return_segment directive. It
- * frees the segment to the region associated with ID. The segment must
- * have been previously allocated from the same region. If freeing the
- * segment results in enough memory being available to satisfy the
- * rtems_region_get_segment of the first blocked task, then that task and as
- * many subsequent tasks as possible will be unblocked with their requests
- * satisfied.
- */
-
-rtems_status_code rtems_region_return_segment(
- Objects_Id id,
- void *segment
-);
-
-#ifndef __RTEMS_APPLICATION__
-#include <rtems/rtems/region.inl>
-#endif
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/rtems/regionmp.h>
-#endif
-
-/*
- * _Region_Debug_Walk
- *
- * DESCRIPTION:
- *
- * This routine is invoked to verify the integrity of a heap associated
- * with the_region.
- */
-
-#ifdef RTEMS_DEBUG
-
-#define _Region_Debug_Walk( _the_region, _source ) \
- do { \
- if ( _Debug_Is_enabled( RTEMS_DEBUG_REGION ) ) \
- _Heap_Walk( &(_the_region)->Memory, _source, FALSE ); \
- } while ( 0 )
-
-#else
-
-#define _Region_Debug_Walk( _the_region, _source )
-
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/include/rtems/rtems/regionmp.h b/cpukit/rtems/include/rtems/rtems/regionmp.h
deleted file mode 100644
index 0743f7b057..0000000000
--- a/cpukit/rtems/include/rtems/rtems/regionmp.h
+++ /dev/null
@@ -1,165 +0,0 @@
-/* regionmp.h
- *
- * This include file contains all the constants and structures associated
- * with the Multiprocessing Support in the Region Manager.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_REGION_MP_h
-#define __RTEMS_REGION_MP_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/mppkt.h>
-#include <rtems/score/object.h>
-#include <rtems/score/thread.h>
-
-#include <rtems/rtems/options.h>
-#include <rtems/rtems/region.h>
-
-/*
- * The following enumerated type defines the list of
- * remote region operations.
- */
-
-typedef enum {
- REGION_MP_ANNOUNCE_CREATE = 0,
- REGION_MP_ANNOUNCE_DELETE = 1,
- REGION_MP_EXTRACT_PROXY = 2,
- REGION_MP_GET_SEGMENT_REQUEST = 3,
- REGION_MP_GET_SEGMENT_RESPONSE = 4,
- REGION_MP_RETURN_SEGMENT_REQUEST = 5,
- REGION_MP_RETURN_SEGMENT_RESPONSE = 6
-} Region_MP_Remote_operations;
-
-/*
- * The following data structure defines the packet used to perform
- * remote region operations.
- */
-
-typedef struct {
- rtems_packet_prefix Prefix;
- Region_MP_Remote_operations operation;
- rtems_name name;
- rtems_option option_set;
- unsigned32 size;
- Objects_Id proxy_id;
- void *segment;
-} Region_MP_Packet;
-
-/*
- * _Region_MP_Send_process_packet
- *
- * DESCRIPTION:
- *
- * This routine performs a remote procedure call so that a
- * process operation can be performed on another node.
- */
-
-void _Region_MP_Send_process_packet (
- Region_MP_Remote_operations operation,
- Objects_Id region_id,
- rtems_name name,
- Objects_Id proxy_id
-);
-
-/*
- * _Region_MP_Send_request_packet
- *
- * DESCRIPTION:
- *
- * This routine performs a remote procedure call so that a
- * directive operation can be initiated on another node.
- */
-
-rtems_status_code _Region_MP_Send_request_packet (
- Region_MP_Remote_operations operation,
- Objects_Id region_id,
- void *segment,
- unsigned32 size,
- rtems_option option_set,
- rtems_interval timeout
-);
-
-/*
- * _Region_MP_Send_response_packet
- *
- * DESCRIPTION:
- *
- * This routine performs a remote procedure call so that a
- * directive can be performed on another node.
- */
-
-void _Region_MP_Send_response_packet (
- Region_MP_Remote_operations operation,
- Objects_Id region_id,
- Thread_Control *the_thread
-);
-
-/*
- *
- * _Region_MP_Process_packet
- *
- * DESCRIPTION:
- *
- * This routine performs the actions specific to this package for
- * the request from another node.
- */
-
-void _Region_MP_Process_packet (
- rtems_packet_prefix *the_packet_prefix
-);
-
-/*
- * _Region_MP_Send_object_was_deleted
- *
- * DESCRIPTION:
- *
- * This routine is invoked indirectly by the thread queue
- * when a proxy has been removed from the thread queue and
- * the remote node must be informed of this.
- *
- * This routine is not needed by the Region since a region
- * cannot be deleted when segments are in use.
- */
-
-/*
- * _Region_MP_Send_extract_proxy
- *
- * DESCRIPTION:
- *
- * This routine is invoked when a task is deleted and it
- * has a proxy which must be removed from a thread queue and
- * the remote node must be informed of this.
- */
-
-void _Region_MP_Send_extract_proxy (
- Thread_Control *the_thread
-);
-
-/*
- * _Region_MP_Get_packet
- *
- * DESCRIPTION:
- *
- * This function is used to obtain a region mp packet.
- */
-
-Region_MP_Packet *_Region_MP_Get_packet ( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of file */
diff --git a/cpukit/rtems/include/rtems/rtems/rtemsapi.h b/cpukit/rtems/include/rtems/rtems/rtemsapi.h
deleted file mode 100644
index 6b1cfd8d05..0000000000
--- a/cpukit/rtems/include/rtems/rtems/rtemsapi.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * RTEMS API Support
- *
- * NOTE:
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_API_h
-#define __RTEMS_API_h
-
-#include <rtems/config.h>
-
-/*PAGE
- *
- * _RTEMS_API_Initialize
- *
- * XXX
- */
-
-void _RTEMS_API_Initialize(
- rtems_configuration_table *configuration_table
-);
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/include/rtems/rtems/sem.h b/cpukit/rtems/include/rtems/rtems/sem.h
deleted file mode 100644
index 0ce79dcecc..0000000000
--- a/cpukit/rtems/include/rtems/rtems/sem.h
+++ /dev/null
@@ -1,276 +0,0 @@
-/* semaphore.h
- *
- * This include file contains all the constants and structures associated
- * with the Semaphore Manager. This manager utilizes standard Dijkstra
- * counting semaphores to provide synchronization and mutual exclusion
- * capabilities.
- *
- * Directives provided are:
- *
- * + create a semaphore
- * + get an ID of a semaphore
- * + delete a semaphore
- * + acquire a semaphore
- * + release a semaphore
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_SEMAPHORE_h
-#define __RTEMS_SEMAPHORE_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/rtems/types.h>
-#include <rtems/rtems/support.h>
-#include <rtems/rtems/tasks.h>
-#include <rtems/rtems/attr.h>
-#include <rtems/score/coremutex.h>
-#include <rtems/score/object.h>
-#include <rtems/score/coresem.h>
-#include <rtems/score/threadq.h>
-
-/*
- * The following defines the control block used to manage each semaphore.
- */
-
-typedef struct {
- Objects_Control Object;
- rtems_attribute attribute_set;
- union {
- CORE_mutex_Control mutex;
- CORE_semaphore_Control semaphore;
- } Core_control;
-} Semaphore_Control;
-
-/*
- * The following defines the information control block used to manage
- * this class of objects.
- */
-
-RTEMS_EXTERN Objects_Information _Semaphore_Information;
-
-/*
- * _Semaphore_Manager_initialization
- *
- * DESCRIPTION:
- *
- * This routine performs the initialization necessary for this manager.
- */
-
-void _Semaphore_Manager_initialization(
- unsigned32 maximum_semaphores
-);
-
-/*
- * rtems_semaphore_create
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_semaphore_create directive. The
- * semaphore will have the name name. The starting count for
- * the semaphore is count. The attribute_set determines if
- * the semaphore is global or local and the thread queue
- * discipline. It returns the id of the created semaphore in ID.
- */
-
-rtems_status_code rtems_semaphore_create(
- rtems_name name,
- unsigned32 count,
- rtems_attribute attribute_set,
- rtems_task_priority priority_ceiling,
- rtems_id *id
-);
-
-/*
- * rtems_semaphore_ident
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_semaphore_ident directive.
- * This directive returns the semaphore ID associated with name.
- * If more than one semaphore is named name, then the semaphore
- * to which the ID belongs is arbitrary. node indicates the
- * extent of the search for the ID of the semaphore named name.
- * The search can be limited to a particular node or allowed to
- * encompass all nodes.
- */
-
-rtems_status_code rtems_semaphore_ident(
- rtems_name name,
- unsigned32 node,
- rtems_id *id
-);
-
-/*
- * rtems_semaphore_delete
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_semaphore_delete directive. The
- * semaphore indicated by ID is deleted.
- */
-
-rtems_status_code rtems_semaphore_delete(
- rtems_id id
-);
-
-/*
- * rtems_semaphore_obtain
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_semaphore_obtain directive. It
- * attempts to obtain a unit from the semaphore associated with ID.
- * If a unit can be allocated, the calling task will return immediately.
- * If no unit is available, then the task may return immediately or
- * block waiting for a unit with an optional timeout of timeout
- * clock ticks. Whether the task blocks or returns immediately
- * is based on the RTEMS_NO_WAIT option in the option_set.
- */
-
-rtems_status_code rtems_semaphore_obtain(
- rtems_id id,
- unsigned32 option_set,
- rtems_interval timeout
-);
-
-/*
- * rtems_semaphore_release
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_semaphore_release directive. It
- * frees a unit to the semaphore associated with ID. If a task was
- * blocked waiting for a unit from this semaphore, then that task will
- * be readied and the unit given to that task. Otherwise, the unit
- * will be returned to the semaphore.
- */
-
-rtems_status_code rtems_semaphore_release(
- rtems_id id
-);
-
-/*
- * rtems_semaphore_flush
- *
- * This directive allows a thread to flush the threads
- * pending on the semaphore.
- */
-
-rtems_status_code rtems_semaphore_flush(
- Objects_Id id
-);
-
-/*
- * _Semaphore_Seize
- *
- * DESCRIPTION:
- *
- * This routine attempts to receive a unit from the_semaphore.
- * If a unit is available or if the RTEMS_NO_WAIT option is enabled in
- * option_set, then the routine returns. Otherwise, the calling task
- * is blocked until a unit becomes available.
- */
-
-boolean _Semaphore_Seize(
- Semaphore_Control *the_semaphore,
- unsigned32 option_set
-);
-
-/*
- * _Semaphore_Translate_core_mutex_return_code
- *
- * DESCRIPTION:
- *
- * This function returns a RTEMS status code based on the mutex
- * status code specified.
- */
-
-rtems_status_code _Semaphore_Translate_core_mutex_return_code (
- unsigned32 the_mutex_status
-);
-
-/*
- * _Semaphore_Translate_core_semaphore_return_code
- *
- * DESCRIPTION:
- *
- * This function returns a RTEMS status code based on the semaphore
- * status code specified.
- */
-
-rtems_status_code _Semaphore_Translate_core_semaphore_return_code (
- unsigned32 the_mutex_status
-);
-
-/*PAGE
- *
- * _Semaphore_Core_mutex_mp_support
- *
- * DESCRIPTION:
- *
- * This function processes the global actions necessary for remote
- * accesses to a global semaphore based on a core mutex. This function
- * is called by the core.
- */
-
-#if defined(RTEMS_MULTIPROCESSING)
-void _Semaphore_Core_mutex_mp_support (
- Thread_Control *the_thread,
- rtems_id id
-);
-#endif
-
-/*PAGE
- *
- * _Semaphore_Core_mp_support
- *
- * DESCRIPTION:
- *
- * This function processes the global actions necessary for remote
- * accesses to a global semaphore based on a core semaphore. This function
- * is called by the core.
- */
-
-void _Semaphore_Core_semaphore_mp_support (
- Thread_Control *the_thread,
- rtems_id id
-);
-
-/*PAGE
- *
- * _POSIX_Semaphore_MP_support
- *
- * DESCRIPTION:
- *
- * XXX
- */
-
-void _POSIX_Semaphore_MP_support(
- Thread_Control *the_thread,
- Objects_Id id
-);
-
-#ifndef __RTEMS_APPLICATION__
-#include <rtems/rtems/sem.inl>
-#endif
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/rtems/semmp.h>
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/include/rtems/rtems/semmp.h b/cpukit/rtems/include/rtems/rtems/semmp.h
deleted file mode 100644
index e299e33c77..0000000000
--- a/cpukit/rtems/include/rtems/rtems/semmp.h
+++ /dev/null
@@ -1,162 +0,0 @@
-/* semmp.h
- *
- * This include file contains all the constants and structures associated
- * with the Multiprocessing Support in the Semaphore Manager.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_SEMAPHORE_MP_h
-#define __RTEMS_SEMAPHORE_MP_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/mppkt.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
-#include <rtems/rtems/sem.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/watchdog.h>
-
-/*
- * The following enumerated type defines the list of
- * remote semaphore operations.
- */
-
-typedef enum {
- SEMAPHORE_MP_ANNOUNCE_CREATE = 0,
- SEMAPHORE_MP_ANNOUNCE_DELETE = 1,
- SEMAPHORE_MP_EXTRACT_PROXY = 2,
- SEMAPHORE_MP_OBTAIN_REQUEST = 3,
- SEMAPHORE_MP_OBTAIN_RESPONSE = 4,
- SEMAPHORE_MP_RELEASE_REQUEST = 5,
- SEMAPHORE_MP_RELEASE_RESPONSE = 6
-} Semaphore_MP_Remote_operations;
-
-/*
- * The following data structure defines the packet used to perform
- * remote semaphore operations.
- */
-
-typedef struct {
- rtems_packet_prefix Prefix;
- Semaphore_MP_Remote_operations operation;
- rtems_name name;
- rtems_option option_set;
- Objects_Id proxy_id;
-} Semaphore_MP_Packet;
-
-/*
- * _Semaphore_MP_Send_process_packet
- *
- * DESCRIPTION:
- *
- * This routine performs a remote procedure call so that a
- * process operation can be performed on another node.
- */
-
-void _Semaphore_MP_Send_process_packet (
- Semaphore_MP_Remote_operations operation,
- Objects_Id semaphore_id,
- rtems_name name,
- Objects_Id proxy_id
-);
-
-/*
- * _Semaphore_MP_Send_request_packet
- *
- * DESCRIPTION:
- *
- * This routine performs a remote procedure call so that a
- * directive operation can be initiated on another node.
- */
-
-rtems_status_code _Semaphore_MP_Send_request_packet (
- Semaphore_MP_Remote_operations operation,
- Objects_Id semaphore_id,
- rtems_option option_set,
- rtems_interval timeout
-);
-
-/*
- * _Semaphore_MP_Send_response_packet
- *
- * DESCRIPTION:
- *
- * This routine performs a remote procedure call so that a
- * directive can be performed on another node.
- */
-
-void _Semaphore_MP_Send_response_packet (
- Semaphore_MP_Remote_operations operation,
- Objects_Id semaphore_id,
- Thread_Control *the_thread
-);
-
-/*
- *
- * _Semaphore_MP_Process_packet
- *
- * DESCRIPTION:
- *
- * This routine performs the actions specific to this package for
- * the request from another node.
- */
-
-void _Semaphore_MP_Process_packet (
- rtems_packet_prefix *the_packet_prefix
-);
-
-/*
- * _Semaphore_MP_Send_object_was_deleted
- *
- * DESCRIPTION:
- *
- * This routine is invoked indirectly by the thread queue
- * when a proxy has been removed from the thread queue and
- * the remote node must be informed of this.
- */
-
-void _Semaphore_MP_Send_object_was_deleted (
- Thread_Control *the_proxy
-);
-
-/*
- * _Semaphore_MP_Send_extract_proxy
- *
- * DESCRIPTION:
- *
- * This routine is invoked when a task is deleted and it
- * has a proxy which must be removed from a thread queue and
- * the remote node must be informed of this.
- */
-
-void _Semaphore_MP_Send_extract_proxy (
- Thread_Control *the_thread
-);
-
-/*
- * _Semaphore_MP_Get_packet
- *
- * DESCRIPTION:
- *
- * This function is used to obtain a semaphore mp packet.
- */
-
-Semaphore_MP_Packet *_Semaphore_MP_Get_packet ( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of file */
diff --git a/cpukit/rtems/include/rtems/rtems/signal.h b/cpukit/rtems/include/rtems/rtems/signal.h
deleted file mode 100644
index 51b837f745..0000000000
--- a/cpukit/rtems/include/rtems/rtems/signal.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/* signal.h
- *
- * This include file contains all the constants and structures associated
- * with the Signal Manager. This manager provides capabilities required
- * for asynchronous communication between tasks via signal sets.
- *
- * Directives provided are:
- *
- * + establish an asynchronous signal routine
- * + send a signal set to a task
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_SIGNAL_h
-#define __RTEMS_SIGNAL_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/rtems/asr.h>
-#include <rtems/rtems/modes.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/types.h>
-
-/*
- * _Signal_Manager_initialization
- *
- * DESCRIPTION:
- *
- * This routine performs the initialization necessary for this manager.
- */
-
-void _Signal_Manager_initialization( void );
-
-/*
- * rtems_signal_catch
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_signal_catch directive. This directive
- * is used to establish asr_handler as the Asynchronous Signal Routine
- * (RTEMS_ASR) for the calling task. The asr_handler will execute with a
- * mode of mode_set.
- */
-
-rtems_status_code rtems_signal_catch(
- rtems_asr_entry asr_handler,
- rtems_mode mode_set
-);
-
-/*
- * rtems_signal_send
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_signal_send directive. This directive
- * sends the signal_set to the task specified by ID.
- */
-
-rtems_status_code rtems_signal_send(
- Objects_Id id,
- rtems_signal_set signal_set
-);
-
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/rtems/signalmp.h>
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/include/rtems/rtems/signalmp.h b/cpukit/rtems/include/rtems/rtems/signalmp.h
deleted file mode 100644
index e37a8ce3a6..0000000000
--- a/cpukit/rtems/include/rtems/rtems/signalmp.h
+++ /dev/null
@@ -1,146 +0,0 @@
-/* signalmp.h
- *
- * This include file contains all the constants and structures associated
- * with the Multiprocessing Support in the Signal Manager.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_SIGNAL_MP_h
-#define __RTEMS_SIGNAL_MP_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/rtems/asr.h>
-#include <rtems/score/mppkt.h>
-#include <rtems/score/object.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/watchdog.h>
-
-/*
- * The following enumerated type defines the list of
- * remote signal operations.
- */
-
-typedef enum {
- SIGNAL_MP_SEND_REQUEST = 0,
- SIGNAL_MP_SEND_RESPONSE = 1
-} Signal_MP_Remote_operations;
-
-/*
- * The following data structure defines the packet used to perform
- * remote signal operations.
- */
-
-typedef struct {
- rtems_packet_prefix Prefix;
- Signal_MP_Remote_operations operation;
- rtems_signal_set signal_in;
-} Signal_MP_Packet;
-
-/*
- * _Signal_MP_Send_process_packet
- *
- * DESCRIPTION:
- *
- * This routine performs a remote procedure call so that a
- * process operation can be performed on another node.
- *
- * This routine is not needed since there are no process
- * packets to be sent by this manager.
- */
-
-/*
- * _Signal_MP_Send_request_packet
- *
- * DESCRIPTION:
- *
- * This routine performs a remote procedure call so that a
- * directive operation can be initiated on another node.
- */
-
-rtems_status_code _Signal_MP_Send_request_packet (
- Signal_MP_Remote_operations operation,
- Objects_Id task_id,
- rtems_signal_set signal_in
-);
-
-/*
- * _Signal_MP_Send_response_packet
- *
- * DESCRIPTION:
- *
- * This routine performs a remote procedure call so that a
- * directive can be performed on another node.
- */
-
-void _Signal_MP_Send_response_packet (
- Signal_MP_Remote_operations operation,
- Thread_Control *the_thread
-);
-
-/*
- *
- * _Signal_MP_Process_packet
- *
- * DESCRIPTION:
- *
- * This routine performs the actions specific to this package for
- * the request from another node.
- */
-
-void _Signal_MP_Process_packet (
- rtems_packet_prefix *the_packet_prefix
-);
-
-/*
- * _Signal_MP_Send_object_was_deleted
- *
- * DESCRIPTION:
- *
- * This routine is invoked indirectly by the thread queue
- * when a proxy has been removed from the thread queue and
- * the remote node must be informed of this.
- *
- * This routine is not needed since there are no objects
- * deleted by this manager.
- */
-
-/*
- * _Signal_MP_Send_extract_proxy
- *
- * DESCRIPTION:
- *
- * This routine is invoked when a task is deleted and it
- * has a proxy which must be removed from a thread queue and
- * the remote node must be informed of this.
- *
- * This routine is not needed since there are no objects
- * deleted by this manager.
- */
-
-/*
- * _Signal_MP_Get_packet
- *
- * DESCRIPTION:
- *
- * This function is used to obtain a signal mp packet.
- */
-
-Signal_MP_Packet *_Signal_MP_Get_packet ( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of file */
diff --git a/cpukit/rtems/include/rtems/rtems/status.h b/cpukit/rtems/include/rtems/rtems/status.h
deleted file mode 100644
index 831039b1c1..0000000000
--- a/cpukit/rtems/include/rtems/rtems/status.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* status.h
- *
- * This include file contains the status codes returned from the
- * executive directives.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_STATUS_h
-#define __RTEMS_STATUS_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* types */
-
-/* enumerated constants */
-
-typedef enum {
- RTEMS_SUCCESSFUL = 0, /* successful completion */
- RTEMS_TASK_EXITTED = 1, /* returned from a thread */
- RTEMS_MP_NOT_CONFIGURED = 2, /* multiprocessing not configured */
- RTEMS_INVALID_NAME = 3, /* invalid object name */
- RTEMS_INVALID_ID = 4, /* invalid object id */
- RTEMS_TOO_MANY = 5, /* too many */
- RTEMS_TIMEOUT = 6, /* timed out waiting */
- RTEMS_OBJECT_WAS_DELETED = 7, /* object deleted while waiting */
- RTEMS_INVALID_SIZE = 8, /* specified size was invalid */
- RTEMS_INVALID_ADDRESS = 9, /* address specified is invalid */
- RTEMS_INVALID_NUMBER = 10, /* number was invalid */
- RTEMS_NOT_DEFINED = 11, /* item has not been initialized */
- RTEMS_RESOURCE_IN_USE = 12, /* resources still outstanding */
- RTEMS_UNSATISFIED = 13, /* request not satisfied */
- RTEMS_INCORRECT_STATE = 14, /* thread is in wrong state */
- RTEMS_ALREADY_SUSPENDED = 15, /* thread already in state */
- RTEMS_ILLEGAL_ON_SELF = 16, /* illegal on calling thread */
- RTEMS_ILLEGAL_ON_REMOTE_OBJECT = 17, /* illegal for remote object */
- RTEMS_CALLED_FROM_ISR = 18, /* called from wrong environment */
- RTEMS_INVALID_PRIORITY = 19, /* invalid thread priority */
- RTEMS_INVALID_CLOCK = 20, /* invalid date/time */
- RTEMS_INVALID_NODE = 21, /* invalid node id */
- RTEMS_NOT_CONFIGURED = 22, /* directive not configured */
- RTEMS_NOT_OWNER_OF_RESOURCE = 23, /* not owner of resource */
- RTEMS_NOT_IMPLEMENTED = 24, /* directive not implemented */
- RTEMS_INTERNAL_ERROR = 25, /* RTEMS inconsistency detected */
- RTEMS_NO_MEMORY = 26, /* could not get enough memory */
- RTEMS_IO_ERROR = 27, /* driver IO error */
- RTEMS_PROXY_BLOCKING = 28 /* internal error only */
-} rtems_status_code;
-
-#define RTEMS_STATUS_CODES_FIRST RTEMS_SUCCESSFUL
-#define RTEMS_STATUS_CODES_LAST RTEMS_PROXY_BLOCKING
-
-extern rtems_status_code _Status_Object_name_errors_to_status[];
-
-#ifdef RTEMS_API_INIT
-rtems_status_code _Status_Object_name_errors_to_status[] = {
- RTEMS_SUCCESSFUL, /* OBJECTS_SUCCESSFUL */
- RTEMS_INVALID_NAME, /* OBJECTS_INVALID_NAME */
- RTEMS_INVALID_NODE /* OBJECTS_INVALID_NODE */
-};
-#endif
-
-/*
- * Applications are allowed to use the macros to compare status codes.
- */
-
-#include <rtems/rtems/status.inl>
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/include/rtems/rtems/support.h b/cpukit/rtems/include/rtems/rtems/support.h
deleted file mode 100644
index c162a92d4f..0000000000
--- a/cpukit/rtems/include/rtems/rtems/support.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/* support.h
- *
- * This include file contains information about support functions for
- * the RTEMS API.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_RTEMS_SUPPORT_h
-#define __RTEMS_RTEMS_SUPPORT_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/rtems/types.h>
-
-/*
- * rtems_build_name
- *
- * DESCRIPTION:
- *
- * This function returns an object name composed of the four characters
- * C1, C2, C3, and C4.
- *
- * NOTE:
- *
- * This must be implemented as a macro for use in Configuration Tables.
- *
- */
-
-#define rtems_build_name( _C1, _C2, _C3, _C4 ) \
- ( (_C1) << 24 | (_C2) << 16 | (_C3) << 8 | (_C4) )
-
-/*
- * rtems_get_class
- *
- * DESCRIPTION:
- *
- * This function returns the class portion of the ID.
- *
- */
-
-#define rtems_get_class( _id ) \
- _Objects_Get_class( _id )
-
-/*
- * rtems_get_node
- *
- * DESCRIPTION:
- *
- * This function returns the node portion of the ID.
- *
- */
-
-#define rtems_get_node( _id ) \
- _Objects_Get_node( _id )
-
-/*
- * rtems_get_index
- *
- * DESCRIPTION:
- *
- * This function returns the index portion of the ID.
- *
- */
-
-#define rtems_get_index( _id ) \
- _Objects_Get_index( _id )
-
-/*
- * Time related
- */
-
-#define RTEMS_MILLISECONDS_TO_MICROSECONDS(_ms) \
- TOD_MILLISECONDS_TO_MICROSECONDS(_ms)
-#define RTEMS_MILLISECONDS_TO_TICKS(_ms) \
- TOD_MILLISECONDS_TO_TICKS(_ms)
-#define RTEMS_MICROSECONDS_TO_TICKS(_ms) \
- TOD_MICROSECONDS_TO_TICKS(_ms)
-
-#ifndef __RTEMS_APPLICATION__
-#include <rtems/rtems/support.inl>
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/include/rtems/rtems/taskmp.h b/cpukit/rtems/include/rtems/rtems/taskmp.h
deleted file mode 100644
index 755493de5e..0000000000
--- a/cpukit/rtems/include/rtems/rtems/taskmp.h
+++ /dev/null
@@ -1,166 +0,0 @@
-/* taskmp.h
- *
- * This include file contains all the constants and structures associated
- * with the multiprocessing support in the task manager.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_RTEMS_TASKS_MP_h
-#define __RTEMS_RTEMS_TASKS_MP_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/mppkt.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
-#include <rtems/score/priority.h>
-#include <rtems/rtems/tasks.h>
-#include <rtems/score/thread.h>
-
-/*
- * The following enumerated type defines the list of
- * remote task operations.
- */
-
-typedef enum {
- RTEMS_TASKS_MP_ANNOUNCE_CREATE = 0,
- RTEMS_TASKS_MP_ANNOUNCE_DELETE = 1,
- RTEMS_TASKS_MP_SUSPEND_REQUEST = 2,
- RTEMS_TASKS_MP_SUSPEND_RESPONSE = 3,
- RTEMS_TASKS_MP_RESUME_REQUEST = 4,
- RTEMS_TASKS_MP_RESUME_RESPONSE = 5,
- RTEMS_TASKS_MP_SET_PRIORITY_REQUEST = 6,
- RTEMS_TASKS_MP_SET_PRIORITY_RESPONSE = 7,
- RTEMS_TASKS_MP_GET_NOTE_REQUEST = 8,
- RTEMS_TASKS_MP_GET_NOTE_RESPONSE = 9,
- RTEMS_TASKS_MP_SET_NOTE_REQUEST = 10,
- RTEMS_TASKS_MP_SET_NOTE_RESPONSE = 11
-} RTEMS_tasks_MP_Remote_operations;
-
-/*
- * The following data structure defines the packet used to perform
- * remote task operations.
- */
-
-typedef struct {
- rtems_packet_prefix Prefix;
- RTEMS_tasks_MP_Remote_operations operation;
- rtems_name name;
- rtems_task_priority the_priority;
- unsigned32 notepad;
- unsigned32 note;
-} RTEMS_tasks_MP_Packet;
-
-/*
- * _RTEMS_tasks_MP_Send_process_packet
- *
- * DESCRIPTION:
- *
- * This routine performs a remote procedure call so that a
- * process operation can be performed on another node.
- */
-
-void _RTEMS_tasks_MP_Send_process_packet (
- RTEMS_tasks_MP_Remote_operations operation,
- Objects_Id task_id,
- rtems_name name
-);
-
-/*
- * _RTEMS_tasks_MP_Send_request_packet
- *
- * DESCRIPTION:
- *
- * This routine performs a remote procedure call so that a
- * directive operation can be initiated on another node.
- */
-
-rtems_status_code _RTEMS_tasks_MP_Send_request_packet (
- RTEMS_tasks_MP_Remote_operations operation,
- Objects_Id task_id,
- rtems_task_priority the_priority,
- unsigned32 notepad,
- unsigned32 note
-);
-
-/*
- * _RTEMS_tasks_MP_Send_response_packet
- *
- * DESCRIPTION:
- *
- * This routine performs a remote procedure call so that a
- * directive can be performed on another node.
- */
-
-void _RTEMS_tasks_MP_Send_response_packet (
- RTEMS_tasks_MP_Remote_operations operation,
- Thread_Control *the_thread
-);
-
-/*
- *
- * _RTEMS_tasks_MP_Process_packet
- *
- * DESCRIPTION:
- *
- * This routine performs the actions specific to this package for
- * the request from another node.
- */
-
-void _RTEMS_tasks_MP_Process_packet (
- rtems_packet_prefix *the_packet_prefix
-);
-
-/*
- * _RTEMS_tasks_MP_Send_object_was_deleted
- *
- * DESCRIPTION:
- *
- * This routine is invoked indirectly by the thread queue
- * when a proxy has been removed from the thread queue and
- * the remote node must be informed of this.
- *
- * This routine is not needed by RTEMS_tasks since a task
- * cannot be deleted when segments are in use.
- */
-
-/*
- * _RTEMS_tasks_MP_Send_extract_proxy
- *
- * DESCRIPTION:
- *
- * This routine is invoked when a task is deleted and it
- * has a proxy which must be removed from a thread queue and
- * the remote node must be informed of this.
- *
- * This routine is not needed since there are no objects
- * deleted by this manager.
- *
- */
-
-/*
- * _RTEMS_tasks_MP_Get_packet
- *
- * DESCRIPTION:
- *
- * This function is used to obtain a task mp packet.
- */
-
-RTEMS_tasks_MP_Packet *_RTEMS_tasks_MP_Get_packet ( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of file */
diff --git a/cpukit/rtems/include/rtems/rtems/tasks.h b/cpukit/rtems/include/rtems/rtems/tasks.h
deleted file mode 100644
index 10938376e2..0000000000
--- a/cpukit/rtems/include/rtems/rtems/tasks.h
+++ /dev/null
@@ -1,467 +0,0 @@
-/* tasks.h
- *
- * This include file contains all constants and structures associated
- * with RTEMS tasks. This manager provides a comprehensive set of directives
- * to create, delete, and administer tasks.
- *
- * Directives provided are:
- *
- * + create a task
- * + get an ID of a task
- * + start a task
- * + restart a task
- * + delete a task
- * + suspend a task
- * + resume a task
- * + set a task's priority
- * + change the current task's mode
- * + get a task notepad entry
- * + set a task notepad entry
- * + wake up after interval
- * + wake up when specified
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_RTEMS_TASKS_h
-#define __RTEMS_RTEMS_TASKS_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/rtems/types.h>
-#include <rtems/rtems/eventset.h>
-#include <rtems/rtems/asr.h>
-#include <rtems/rtems/attr.h>
-#include <rtems/rtems/status.h>
-
-/*
- * Constant to be used as the ID of current task
- */
-
-#define RTEMS_SELF OBJECTS_ID_OF_SELF
-
-/*
- * This constant is passed to the rtems_task_wake_after directive as the
- * interval when a task wishes to yield the CPU.
- */
-
-#define RTEMS_YIELD_PROCESSOR WATCHDOG_NO_TIMEOUT
-
-/*
- * Define the type for an RTEMS API task priority.
- */
-
-typedef Priority_Control rtems_task_priority;
-
-#define RTEMS_NO_PRIORITY RTEMS_CURRENT_PRIORITY
-
-#define RTEMS_MINIMUM_PRIORITY (PRIORITY_MINIMUM + 1)
-#define RTEMS_MAXIMUM_PRIORITY PRIORITY_MAXIMUM
-
-/*
- * The following constant is passed to rtems_task_set_priority when the
- * caller wants to obtain the current priority.
- */
-
-#define RTEMS_CURRENT_PRIORITY PRIORITY_MINIMUM
-
-/*
- * Notepads constants (indices into notepad array)
- */
-
-#define RTEMS_NOTEPAD_FIRST 0 /* lowest numbered notepad */
-#define RTEMS_NOTEPAD_0 0 /* notepad location 0 */
-#define RTEMS_NOTEPAD_1 1 /* notepad location 1 */
-#define RTEMS_NOTEPAD_2 2 /* notepad location 2 */
-#define RTEMS_NOTEPAD_3 3 /* notepad location 3 */
-#define RTEMS_NOTEPAD_4 4 /* notepad location 4 */
-#define RTEMS_NOTEPAD_5 5 /* notepad location 5 */
-#define RTEMS_NOTEPAD_6 6 /* notepad location 6 */
-#define RTEMS_NOTEPAD_7 7 /* notepad location 7 */
-#define RTEMS_NOTEPAD_8 8 /* notepad location 8 */
-#define RTEMS_NOTEPAD_9 9 /* notepad location 9 */
-#define RTEMS_NOTEPAD_10 10 /* notepad location 10 */
-#define RTEMS_NOTEPAD_11 11 /* notepad location 11 */
-#define RTEMS_NOTEPAD_12 12 /* notepad location 12 */
-#define RTEMS_NOTEPAD_13 13 /* notepad location 13 */
-#define RTEMS_NOTEPAD_14 14 /* notepad location 14 */
-#define RTEMS_NOTEPAD_15 15 /* notepad location 15 */
-#define RTEMS_NOTEPAD_LAST RTEMS_NOTEPAD_15 /* highest numbered notepad */
-
-#define RTEMS_NUMBER_NOTEPADS (RTEMS_NOTEPAD_LAST+1)
-
-/*
- * External API name for Thread_Control
- */
-
-typedef Thread_Control rtems_tcb;
-
-/*
- * The following defines the "return type" of an RTEMS task.
- */
-
-typedef void rtems_task;
-
-/*
- * The following defines the argument to an RTEMS task.
- */
-
-typedef unsigned32 rtems_task_argument;
-
-/*
- * The following defines the type for the entry point of an RTEMS task.
- */
-
-typedef rtems_task ( *rtems_task_entry )(
- rtems_task_argument
- );
-
-/*
- * The following records define the Initialization Tasks Table.
- * Each entry contains the information required by RTEMS to
- * create and start a user task automatically at executive
- * initialization time.
- */
-
-typedef struct {
- rtems_name name; /* task name */
- unsigned32 stack_size; /* task stack size */
- rtems_task_priority initial_priority; /* task priority */
- rtems_attribute attribute_set; /* task attributes */
- rtems_task_entry entry_point; /* task entry point */
- rtems_mode mode_set; /* task initial mode */
- unsigned32 argument; /* task argument */
-} rtems_initialization_tasks_table;
-
-/*
- * This is the API specific information required by each thread for
- * the RTEMS API to function correctly.
- */
-
-
-typedef struct {
- unsigned32 Notepads[ RTEMS_NUMBER_NOTEPADS ];
- rtems_event_set pending_events;
- rtems_event_set event_condition;
- ASR_Information Signal;
-} RTEMS_API_Control;
-
-/*
- * The following defines the information control block used to
- * manage this class of objects.
- */
-
-RTEMS_EXTERN Objects_Information _RTEMS_tasks_Information;
-
-/*
- * These are used to manage the user initialization tasks.
- */
-
-RTEMS_EXTERN rtems_initialization_tasks_table
- *_RTEMS_tasks_User_initialization_tasks;
-RTEMS_EXTERN unsigned32 _RTEMS_tasks_Number_of_initialization_tasks;
-
-/*
- * _RTEMS_tasks_Manager_initialization
- *
- * DESCRIPTION:
- *
- * This routine initializes all Task Manager related data structures.
- */
-
-void _RTEMS_tasks_Manager_initialization(
- unsigned32 maximum_tasks,
- unsigned32 number_of_initialization_tasks,
- rtems_initialization_tasks_table *user_tasks
-);
-
-/*
- * rtems_task_create
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_task_create directive. The task
- * will have the name name. The attribute_set can be used to indicate
- * that the task will be globally accessible or utilize floating point.
- * The task's stack will be stack_size bytes. The task will begin
- * execution with initial_priority and initial_modes. It returns the
- * id of the created task in ID.
- */
-
-rtems_status_code rtems_task_create(
- rtems_name name,
- rtems_task_priority initial_priority,
- unsigned32 stack_size,
- rtems_mode initial_modes,
- rtems_attribute attribute_set,
- Objects_Id *id
-);
-
-/*
- * rtems_task_ident
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_task_ident directive.
- * This directive returns the task ID associated with name.
- * If more than one task is named name, then the task to
- * which the ID belongs is arbitrary. node indicates the
- * extent of the search for the ID of the task named name.
- * The search can be limited to a particular node or allowed to
- * encompass all nodes.
- */
-
-rtems_status_code rtems_task_ident(
- rtems_name name,
- unsigned32 node,
- Objects_Id *id
-);
-
-/*
- * rtems_task_delete
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_task_delete directive. The
- * task indicated by ID is deleted.
- */
-
-rtems_status_code rtems_task_delete(
- Objects_Id id
-);
-
-/*
- * rtems_task_get_note
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_task_get_note directive. The
- * value of the indicated notepad for the task associated with ID
- * is returned in note.
- */
-
-rtems_status_code rtems_task_get_note(
- Objects_Id id,
- unsigned32 notepad,
- unsigned32 *note
-);
-
-/*
- * rtems_task_set_note
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_task_set_note directive. The
- * value of the indicated notepad for the task associated with ID
- * is returned in note.
- */
-
-rtems_status_code rtems_task_set_note(
- Objects_Id id,
- unsigned32 notepad,
- unsigned32 note
-);
-
-/*
- * rtems_task_mode
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_task_mode directive. The current
- * values of the modes indicated by mask of the calling task are changed
- * to that indicated in mode_set. The former mode of the task is
- * returned in mode_set.
- */
-
-rtems_status_code rtems_task_mode(
- rtems_mode mode_set,
- rtems_mode mask,
- rtems_mode *previous_mode_set
-);
-
-/*
- * rtems_task_restart
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_task_restart directive. The
- * task associated with ID is restarted at its initial entry
- * point with the new argument.
- */
-
-rtems_status_code rtems_task_restart(
- Objects_Id id,
- unsigned32 arg
-);
-
-/*
- * rtems_task_suspend
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_task_suspend directive. The
- * SUSPENDED state is set for task associated with ID.
- */
-
-rtems_status_code rtems_task_suspend(
- Objects_Id id
-);
-
-/*
- * rtems_task_resume
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_task_resume Directive. The
- * SUSPENDED state is cleared for task associated with ID.
- */
-
-rtems_status_code rtems_task_resume(
- Objects_Id id
-);
-
-/*
- * rtems_task_set_priority
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_task_set_priority directive. The
- * current priority of the task associated with ID is set to
- * new_priority. The former priority of that task is returned
- * in old_priority.
- */
-
-rtems_status_code rtems_task_set_priority(
- Objects_Id id,
- rtems_task_priority new_priority,
- rtems_task_priority *old_priority
-);
-
-/*
- * rtems_task_start
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_task_start directive. The
- * starting execution point of the task associated with ID is
- * set to entry_point with the initial argument.
- */
-
-rtems_status_code rtems_task_start(
- Objects_Id id,
- rtems_task_entry entry_point,
- unsigned32 argument
-);
-
-/*
- * rtems_task_wake_when
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_task_wake_when directive. The
- * calling task is blocked until the current time of day is
- * equal to that indicated by time_buffer.
- */
-
-rtems_status_code rtems_task_wake_when(
- rtems_time_of_day *time_buffer
-);
-
-/*
- * rtems_task_wake_after
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_task_wake_after directive. The
- * calling task is blocked until the indicated number of clock
- * ticks have occurred.
- */
-
-rtems_status_code rtems_task_wake_after(
- rtems_interval ticks
-);
-
-/*
- * rtems_task_is_suspended
- *
- * This directive returns a status indicating whether or not
- * the specified task is suspended.
- */
-
-rtems_status_code rtems_task_is_suspended(
- Objects_Id id
-);
-
-/*
- * rtems_task_variable_add
- *
- * This directive adds a per task variable.
- */
-
-rtems_status_code rtems_task_variable_add(
- rtems_id tid,
- void **ptr,
- void (*dtor)(void *)
-);
-
-/*
- * rtems_task_variable_get
- *
- * This directive gets the value of a task variable.
- */
-
-rtems_status_code rtems_task_variable_get(
- rtems_id tid,
- void **ptr,
- void **result
-);
-
-/*
- * rtems_task_variable_delete
- *
- * This directive removes a per task variable.
- */
-
-rtems_status_code rtems_task_variable_delete(
- rtems_id tid,
- void **ptr
-);
-
-/*
- * _RTEMS_tasks_Initialize_user_tasks
- *
- * This routine creates and starts all configured user
- * initialzation threads.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- */
-
-void _RTEMS_tasks_Initialize_user_tasks( void );
-
-#ifndef __RTEMS_APPLICATION__
-#include <rtems/rtems/tasks.inl>
-#endif
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/rtems/taskmp.h>
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/include/rtems/rtems/timer.h b/cpukit/rtems/include/rtems/rtems/timer.h
deleted file mode 100644
index 87e21d3228..0000000000
--- a/cpukit/rtems/include/rtems/rtems/timer.h
+++ /dev/null
@@ -1,206 +0,0 @@
-/* timer.h
- *
- * This include file contains all the constants, structures, and
- * prototypes associated with the Timer Manager. This manager provides
- * facilities to configure, initiate, cancel, and delete timers which will
- * fire at specified intervals of time.
- *
- * Directives provided are:
- *
- * + create a timer
- * + get an ID of a timer
- * + delete a timer
- * + set a timer to fire after a number of ticks have passed
- * + set a timer to fire when a specified date and time has been reached
- * + reset a timer
- * + cancel a time
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_TIMER_h
-#define __RTEMS_TIMER_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/object.h>
-#include <rtems/score/tod.h>
-#include <rtems/score/watchdog.h>
-
-/*
- * The following enumerated type details the classes to which a timer
- * may belong.
- */
-
-typedef enum {
- TIMER_INTERVAL,
- TIMER_TIME_OF_DAY,
- TIMER_DORMANT
-} Timer_Classes;
-
-/*
- * The following types define a pointer to a timer service routine.
- */
-
-typedef void rtems_timer_service_routine;
-
-typedef rtems_timer_service_routine ( *rtems_timer_service_routine_entry )(
- rtems_id,
- void *
- );
-
-/*
- * The following defines the information control block used to manage
- * this class of objects.
- */
-
-RTEMS_EXTERN Objects_Information _Timer_Information;
-
-/*
- * The following records define the control block used to manage
- * each timer.
- */
-
-typedef struct {
- Objects_Control Object;
- Watchdog_Control Ticker;
- Timer_Classes the_class;
-} Timer_Control;
-
-/*
- * _Timer_Manager_initialization
- *
- * DESCRIPTION:
- *
- * This routine performs the initialization necessary for this manager.
- */
-
-void _Timer_Manager_initialization(
- unsigned32 maximum_timers
-);
-
-/*
- * rtems_timer_create
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_timer_create directive. The
- * timer will have the name name. It returns the id of the
- * created timer in ID.
- */
-
-rtems_status_code rtems_timer_create(
- rtems_name name,
- Objects_Id *id
-);
-
-/*
- * rtems_timer_ident
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_timer_ident directive.
- * This directive returns the timer ID associated with name.
- * If more than one timer is named name, then the timer
- * to which the ID belongs is arbitrary.
- */
-
-rtems_status_code rtems_timer_ident(
- rtems_name name,
- Objects_Id *id
-);
-
-/*
- * rtems_timer_cancel
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_timer_cancel directive. It is used
- * to stop the timer associated with ID from firing.
- */
-
-rtems_status_code rtems_timer_cancel(
- Objects_Id id
-);
-
-/*
- * rtems_timer_delete
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_timer_delete directive. The
- * timer indicated by ID is deleted.
- */
-
-rtems_status_code rtems_timer_delete(
- Objects_Id id
-);
-
-/*
- * rtems_timer_fire_after
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_timer_fire_after directive. It
- * initiates the timer associated with ID to fire in ticks clock
- * ticks. When the timer fires, the routine will be invoked.
- */
-
-rtems_status_code rtems_timer_fire_after(
- Objects_Id id,
- rtems_interval ticks,
- rtems_timer_service_routine_entry routine,
- void *user_data
-);
-
-/*
- * rtems_timer_fire_when
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_timer_fire_when directive. It
- * initiates the timer associated with ID to fire at wall_time
- * When the timer fires, the routine will be invoked.
- */
-
-rtems_status_code rtems_timer_fire_when(
- Objects_Id id,
- rtems_time_of_day *wall_time,
- rtems_timer_service_routine_entry routine,
- void *user_data
-);
-
-/*
- * rtems_timer_reset
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_timer_reset directive. It is used
- * to reinitialize the interval timer associated with ID just as if
- * rtems_timer_fire_after were re-invoked with the same arguments that
- * were used to initiate this timer.
- */
-
-rtems_status_code rtems_timer_reset(
- Objects_Id id
-);
-
-#ifndef __RTEMS_APPLICATION__
-#include <rtems/rtems/timer.inl>
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/include/rtems/rtems/types.h b/cpukit/rtems/include/rtems/rtems/types.h
deleted file mode 100644
index dbaabe5f1d..0000000000
--- a/cpukit/rtems/include/rtems/rtems/types.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/* types.h
- *
- * This include file defines the types used by the RTEMS API.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_RTEMS_TYPES_h
-#define __RTEMS_RTEMS_TYPES_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/tod.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/rtems/modes.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#include <rtems/score/mppkt.h>
-#endif
-
-/*
- * RTEMS basic type definitions
- */
-
-typedef unsigned8 rtems_unsigned8; /* unsigned 8-bit value */
-typedef unsigned16 rtems_unsigned16; /* unsigned 16-bit value */
-typedef unsigned32 rtems_unsigned32; /* unsigned 32-bit value */
-
-typedef signed8 rtems_signed8; /* signed 8-bit value */
-typedef signed16 rtems_signed16; /* signed 16-bit value */
-typedef signed32 rtems_signed32; /* signed 32-bit value */
-
-/*
- * some C++ compilers (eg: HP's) don't do 'long long'
- */
-#if defined(__GNUC__)
-typedef unsigned64 rtems_unsigned64; /* unsigned 64-bit value */
-typedef signed64 rtems_signed64; /* signed 64-bit value */
-#endif
-
-typedef single_precision rtems_single; /* single precision float */
-typedef double_precision rtems_double; /* double precision float */
-
-typedef boolean rtems_boolean;
-
-typedef unsigned32 rtems_name;
-typedef Objects_Id rtems_id;
-
-typedef Context_Control rtems_context;
-typedef Context_Control_fp rtems_context_fp;
-typedef CPU_Interrupt_frame rtems_interrupt_frame;
-
-/*
- * Time related
- */
-
-typedef Watchdog_Interval rtems_interval;
-typedef TOD_Control rtems_time_of_day;
-
-/*
- * Define the type for an RTEMS API task mode.
- */
-
-typedef Modes_Control rtems_mode;
-
-/*
- * MPCI related entries
- */
-
-#if defined(RTEMS_MULTIPROCESSING)
-typedef MP_packet_Classes rtems_mp_packet_classes;
-typedef MP_packet_Prefix rtems_packet_prefix;
-
-typedef MPCI_initialization_entry rtems_mpci_initialization_entry;
-typedef MPCI_get_packet_entry rtems_mpci_get_packet_entry;
-typedef MPCI_return_packet_entry rtems_mpci_return_packet_entry;
-typedef MPCI_send_entry rtems_mpci_send_packet_entry;
-typedef MPCI_receive_entry rtems_mpci_receive_packet_entry;
-
-typedef MPCI_Entry rtems_mpci_entry;
-
-typedef MPCI_Control rtems_mpci_table;
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/inline/Makefile.am b/cpukit/rtems/inline/Makefile.am
deleted file mode 100644
index 0c97211587..0000000000
--- a/cpukit/rtems/inline/Makefile.am
+++ /dev/null
@@ -1,10 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-SUBDIRS = rtems
-
-include $(top_srcdir)/../../../automake/subdirs.am
-include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/rtems/inline/rtems/rtems/asr.inl b/cpukit/rtems/inline/rtems/rtems/asr.inl
deleted file mode 100644
index 6e4f977495..0000000000
--- a/cpukit/rtems/inline/rtems/rtems/asr.inl
+++ /dev/null
@@ -1,127 +0,0 @@
-/* inline/asr.inl
- *
- * This include file contains the implemenation of all routines
- * associated with the asynchronous signal handler which are inlined.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __INLINE_ASR_inl
-#define __INLINE_ASR_inl
-
-#include <rtems/score/isr.h>
-
-/*PAGE
- *
- * _ASR_Initialize
- *
- * DESCRIPTION:
- *
- * This routine initializes the given RTEMS_ASR information record.
- */
-
-RTEMS_INLINE_ROUTINE void _ASR_Initialize (
- ASR_Information *information
-)
-{
- information->is_enabled = TRUE;
- information->handler = NULL;
- information->mode_set = RTEMS_DEFAULT_MODES;
- information->signals_posted = 0;
- information->signals_pending = 0;
- information->nest_level = 0;
-}
-
-/*PAGE
- *
- * _ASR_Swap_signals
- *
- * DESCRIPTION:
- *
- * This routine atomically swaps the pending and posted signal
- * sets. This is done when the thread alters its mode in such a
- * way that the RTEMS_ASR disable/enable flag changes.
- */
-
-RTEMS_INLINE_ROUTINE void _ASR_Swap_signals (
- ASR_Information *information
-)
-{
- rtems_signal_set _signals;
- ISR_Level _level;
-
- _ISR_Disable( _level );
- _signals = information->signals_pending;
- information->signals_pending = information->signals_posted;
- information->signals_posted = _signals;
- _ISR_Enable( _level );
-}
-
-/*PAGE
- *
- * _ASR_Is_null_handler
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the given asr_handler is NULL and
- * FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _ASR_Is_null_handler (
- rtems_asr_entry asr_handler
-)
-{
- return asr_handler == NULL;
-}
-
-/*PAGE
- *
- * _ASR_Are_signals_pending
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if there are signals pending in the
- * given RTEMS_ASR information record and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _ASR_Are_signals_pending (
- ASR_Information *information
-)
-{
- return information->signals_posted != 0;
-}
-
-/*PAGE
- *
- * _ASR_Post_signals
- *
- * DESCRIPTION:
- *
- * This routine posts the given signals into the signal_set
- * passed in. The result is returned to the user in signal_set.
- *
- * NOTE: This must be implemented as a macro.
- */
-
-RTEMS_INLINE_ROUTINE void _ASR_Post_signals(
- rtems_signal_set signals,
- rtems_signal_set *signal_set
-)
-{
- ISR_Level _level;
-
- _ISR_Disable( _level );
- *signal_set |= signals;
- _ISR_Enable( _level );
-}
-
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/inline/rtems/rtems/attr.inl b/cpukit/rtems/inline/rtems/rtems/attr.inl
deleted file mode 100644
index d35be0dca4..0000000000
--- a/cpukit/rtems/inline/rtems/rtems/attr.inl
+++ /dev/null
@@ -1,212 +0,0 @@
-/* inline/attr.inl
- *
- * This include file contains all of the inlined routines associated
- * with attributes.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __INLINE_ATTRIBUTES_inl
-#define __INLINE_ATTRIBUTES_inl
-
-/*PAGE
- *
- * _Attributes_Set
- *
- * DESCRIPTION:
- *
- * This function sets the requested new_attributes in the attribute_set
- * passed in. The result is returned to the user.
- */
-
-RTEMS_INLINE_ROUTINE rtems_attribute _Attributes_Set (
- rtems_attribute new_attributes,
- rtems_attribute attribute_set
-)
-{
- return attribute_set | new_attributes;
-}
-
-/*PAGE
- *
- * _Attributes_Clear
- *
- * DESCRIPTION:
- *
- * This function clears the requested new_attributes in the attribute_set
- * passed in. The result is returned to the user.
- */
-
-RTEMS_INLINE_ROUTINE rtems_attribute _Attributes_Clear (
- rtems_attribute attribute_set,
- rtems_attribute mask
-)
-{
- return attribute_set & ~mask;
-}
-
-/*PAGE
- *
- * _Attributes_Is_floating_point
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the floating point attribute is
- * enabled in the attribute_set and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Attributes_Is_floating_point(
- rtems_attribute attribute_set
-)
-{
- return ( attribute_set & RTEMS_FLOATING_POINT );
-}
-
-/*PAGE
- *
- * _Attributes_Is_global
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the global object attribute is
- * enabled in the attribute_set and FALSE otherwise.
- */
-
-#if defined(RTEMS_MULTIPROCESSING)
-RTEMS_INLINE_ROUTINE boolean _Attributes_Is_global(
- rtems_attribute attribute_set
-)
-{
- return ( attribute_set & RTEMS_GLOBAL );
-}
-#endif
-
-/*PAGE
- *
- * _Attributes_Is_priority
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the priority attribute is
- * enabled in the attribute_set and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Attributes_Is_priority(
- rtems_attribute attribute_set
-)
-{
- return ( attribute_set & RTEMS_PRIORITY );
-}
-
-/*PAGE
- *
- * _Attributes_Is_binary_semaphore
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the binary semaphore attribute is
- * enabled in the attribute_set and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Attributes_Is_binary_semaphore(
- rtems_attribute attribute_set
-)
-{
- return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_BINARY_SEMAPHORE);
-}
-
-/*PAGE
- *
- * _Attributes_Is_simple_binary_semaphore
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the simple binary semaphore attribute is
- * enabled in the attribute_set and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Attributes_Is_simple_binary_semaphore(
- rtems_attribute attribute_set
-)
-{
- return
- ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_SIMPLE_BINARY_SEMAPHORE);
-}
-
-/*PAGE
- *
- * _Attributes_Is_counting_semaphore
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the counting semaphore attribute is
- * enabled in the attribute_set and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Attributes_Is_counting_semaphore(
- rtems_attribute attribute_set
-)
-{
- return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE);
-}
-
-/*PAGE
- *
- * _Attributes_Is_inherit_priority
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the priority inheritance attribute
- * is enabled in the attribute_set and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Attributes_Is_inherit_priority(
- rtems_attribute attribute_set
-)
-{
- return ( attribute_set & RTEMS_INHERIT_PRIORITY );
-}
-
-/*PAGE
- *
- * _Attributes_Is_priority_ceiling
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the priority ceiling attribute
- * is enabled in the attribute_set and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Attributes_Is_priority_ceiling(
- rtems_attribute attribute_set
-)
-{
- return ( attribute_set & RTEMS_PRIORITY_CEILING );
-}
-
-/*PAGE
- *
- * _Attributes_Is_system_task
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the system task attribute
- * is enabled in the attribute_set and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Attributes_Is_system_task(
- rtems_attribute attribute_set
-)
-{
- return ( attribute_set & RTEMS_PRIORITY_CEILING );
-}
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/inline/rtems/rtems/dpmem.inl b/cpukit/rtems/inline/rtems/rtems/dpmem.inl
deleted file mode 100644
index 6d3cb9cd95..0000000000
--- a/cpukit/rtems/inline/rtems/rtems/dpmem.inl
+++ /dev/null
@@ -1,94 +0,0 @@
-/* inline/dpmem.inl
- *
- * This include file contains the inline routine used in conjunction
- * with the Dual Ported Memory Manager
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __INLINE_DPMEM_inl
-#define __INLINE_DPMEM_inl
-
-
-/*PAGE
- *
- * _Dual_ported_memory_Allocate
- *
- * DESCRIPTION:
- *
- * This routine allocates a port control block from the inactive chain
- * of free port control blocks.
- */
-
-RTEMS_INLINE_ROUTINE Dual_ported_memory_Control
- *_Dual_ported_memory_Allocate ( void )
-{
- return (Dual_ported_memory_Control *)
- _Objects_Allocate( &_Dual_ported_memory_Information );
-}
-
-/*PAGE
- *
- * _Dual_ported_memory_Free
- *
- * DESCRIPTION:
- *
- * This routine frees a port control block to the inactive chain
- * of free port control blocks.
- */
-
-RTEMS_INLINE_ROUTINE void _Dual_ported_memory_Free (
- Dual_ported_memory_Control *the_port
-)
-{
- _Objects_Free( &_Dual_ported_memory_Information, &the_port->Object );
-}
-
-/*PAGE
- *
- * _Dual_ported_memory_Get
- *
- * DESCRIPTION:
- *
- * This function maps port IDs to port control blocks. If ID
- * corresponds to a local port, then it returns the_port control
- * pointer which maps to ID and location is set to OBJECTS_LOCAL.
- * Global ports are not supported, thus if ID does not map to a
- * local port, location is set to OBJECTS_ERROR and the_port is
- * undefined.
- */
-
-RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get (
- Objects_Id id,
- Objects_Locations *location
-)
-{
- return (Dual_ported_memory_Control *)
- _Objects_Get( &_Dual_ported_memory_Information, id, location );
-}
-
-/*PAGE
- *
- * _Dual_ported_memory_Is_null
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the_port is NULL and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Dual_ported_memory_Is_null(
- Dual_ported_memory_Control *the_port
-)
-{
- return ( the_port == NULL );
-}
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/inline/rtems/rtems/event.inl b/cpukit/rtems/inline/rtems/rtems/event.inl
deleted file mode 100644
index 56e9810626..0000000000
--- a/cpukit/rtems/inline/rtems/rtems/event.inl
+++ /dev/null
@@ -1,20 +0,0 @@
-/* inline/event.inl
- *
- * This include file contains the static inline implementation of
- * macros for the Event Manager.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __MACROS_EVENT_inl
-#define __MACROS_EVENT_inl
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/inline/rtems/rtems/eventset.inl b/cpukit/rtems/inline/rtems/rtems/eventset.inl
deleted file mode 100644
index 7f2757a3da..0000000000
--- a/cpukit/rtems/inline/rtems/rtems/eventset.inl
+++ /dev/null
@@ -1,94 +0,0 @@
-/* inline/eventset.inl
- *
- * This include file contains the information pertaining to event sets.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __INLINE_EVENT_SET_inl
-#define __INLINE_EVENT_SET_inl
-
-/*PAGE
- *
- * _Event_sets_Is_empty
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if on events are posted in the event_set,
- * and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Event_sets_Is_empty(
- rtems_event_set the_event_set
-)
-{
- return ( the_event_set == 0 );
-}
-
-/*PAGE
- *
- * _Event_sets_Post
- *
- * DESCRIPTION:
- *
- * This routine posts the given new_events into the event_set
- * passed in. The result is returned to the user in event_set.
- */
-
-RTEMS_INLINE_ROUTINE void _Event_sets_Post(
- rtems_event_set the_new_events,
- rtems_event_set *the_event_set
-)
-{
- ISR_Level level;
-
- _ISR_Disable( level );
- *the_event_set |= the_new_events;
- _ISR_Enable( level );
-}
-
-/*PAGE
- *
- * _Event_sets_Get
- *
- * DESCRIPTION:
- *
- * This function returns the events in event_condition which are
- * set in event_set.
- */
-
-RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Get(
- rtems_event_set the_event_set,
- rtems_event_set the_event_condition
-)
-{
- return ( the_event_set & the_event_condition );
-}
-
-/*PAGE
- *
- * _Event_sets_Clear
- *
- * DESCRIPTION:
- *
- * This function removes the events in mask from the event_set
- * passed in. The result is returned to the user in event_set.
- */
-
-RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear(
- rtems_event_set the_event_set,
- rtems_event_set the_mask
-)
-{
- return ( the_event_set & ~(the_mask) );
-}
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/inline/rtems/rtems/message.inl b/cpukit/rtems/inline/rtems/rtems/message.inl
deleted file mode 100644
index ef874b7943..0000000000
--- a/cpukit/rtems/inline/rtems/rtems/message.inl
+++ /dev/null
@@ -1,82 +0,0 @@
-/* message.inl
- *
- * This include file contains the static inline implementation of all
- * inlined routines in the Message Manager.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __MESSAGE_QUEUE_inl
-#define __MESSAGE_QUEUE_inl
-
-#include <rtems/score/wkspace.h>
-
-/*PAGE
- *
- * _Message_queue_Is_null
- *
- * DESCRIPTION:
- *
- * This function places the_message at the rear of the outstanding
- * messages on the_message_queue.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Message_queue_Is_null (
- Message_queue_Control *the_message_queue
-)
-{
- return ( the_message_queue == NULL );
-}
-
-
-/*PAGE
- *
- * _Message_queue_Free
- *
- * DESCRIPTION:
- *
- * This routine deallocates a message queue control block into
- * the inactive chain of free message queue control blocks.
- */
-
-RTEMS_INLINE_ROUTINE void _Message_queue_Free (
- Message_queue_Control *the_message_queue
-)
-{
- _Objects_Free( &_Message_queue_Information, &the_message_queue->Object );
-}
-
-/*PAGE
- *
- * _Message_queue_Get
- *
- * DESCRIPTION:
- *
- * This function maps message queue IDs to message queue control
- * blocks. If ID corresponds to a local message queue, then it
- * returns the_message_queue control pointer which maps to ID
- * and location is set to OBJECTS_LOCAL. If the message queue ID is
- * global and resides on a remote node, then location is set
- * to OBJECTS_REMOTE, and the_message_queue is undefined.
- * Otherwise, location is set to OBJECTS_ERROR and
- * the_message_queue is undefined.
- */
-
-RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get (
- Objects_Id id,
- Objects_Locations *location
-)
-{
- return (Message_queue_Control *)
- _Objects_Get( &_Message_queue_Information, id, location );
-}
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/inline/rtems/rtems/modes.inl b/cpukit/rtems/inline/rtems/rtems/modes.inl
deleted file mode 100644
index 81848712da..0000000000
--- a/cpukit/rtems/inline/rtems/rtems/modes.inl
+++ /dev/null
@@ -1,151 +0,0 @@
-/* modes.inl
- *
- * This include file contains the static inline implementation of the
- * inlined routines in the Mode Handler
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __MODES_inl
-#define __MODES_inl
-
-/*PAGE
- *
- * _Modes_Mask_changed
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if any of the mode flags in mask
- * are set in mode_set, and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Modes_Mask_changed (
- Modes_Control mode_set,
- Modes_Control masks
-)
-{
- return ( mode_set & masks );
-}
-
-/*PAGE
- *
- * _Modes_Is_asr_disabled
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if mode_set indicates that Asynchronous
- * Signal Processing is disabled, and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Modes_Is_asr_disabled (
- Modes_Control mode_set
-)
-{
- return (mode_set & RTEMS_ASR_MASK) == RTEMS_NO_ASR;
-}
-
-/*PAGE
- *
- * _Modes_Is_preempt
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if mode_set indicates that preemption
- * is enabled, and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Modes_Is_preempt (
- Modes_Control mode_set
-)
-{
- return (mode_set & RTEMS_PREEMPT_MASK) == RTEMS_PREEMPT;
-}
-
-/*PAGE
- *
- * _Modes_Is_timeslice
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if mode_set indicates that timeslicing
- * is enabled, and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Modes_Is_timeslice (
- Modes_Control mode_set
-)
-{
- return (mode_set & RTEMS_TIMESLICE_MASK) == RTEMS_TIMESLICE;
-}
-
-/*PAGE
- *
- * _Modes_Get_interrupt_level
- *
- * DESCRIPTION:
- *
- * This function returns the interrupt level portion of the mode_set.
- */
-
-RTEMS_INLINE_ROUTINE ISR_Level _Modes_Get_interrupt_level (
- Modes_Control mode_set
-)
-{
- return ( mode_set & RTEMS_INTERRUPT_MASK );
-}
-
-/*PAGE
- *
- * _Modes_Set_interrupt_level
- *
- * DESCRIPTION:
- *
- * This routine sets the current interrupt level to that specified
- * in the mode_set.
- */
-
-RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
- Modes_Control mode_set
-)
-{
- _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
-}
-
-/*PAGE
- *
- * _Modes_Change
- *
- * DESCRIPTION:
- *
- * This routine changes the modes in old_mode_set indicated by
- * mask to the requested values in new_mode_set. The resulting
- * mode set is returned in out_mode_set and the modes that changed
- * is returned in changed.
- */
-
-RTEMS_INLINE_ROUTINE void _Modes_Change (
- Modes_Control old_mode_set,
- Modes_Control new_mode_set,
- Modes_Control mask,
- Modes_Control *out_mode_set,
- Modes_Control *changed
-)
-{
- Modes_Control _out_mode;
-
- _out_mode = old_mode_set;
- _out_mode &= ~mask;
- _out_mode |= new_mode_set & mask;
- *changed = _out_mode ^ old_mode_set;
- *out_mode_set = _out_mode;
-}
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/inline/rtems/rtems/options.inl b/cpukit/rtems/inline/rtems/rtems/options.inl
deleted file mode 100644
index 568a897cec..0000000000
--- a/cpukit/rtems/inline/rtems/rtems/options.inl
+++ /dev/null
@@ -1,54 +0,0 @@
-/* options.inl
- *
- * This file contains the static inline implementation of the inlined
- * routines from the Options Handler.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __OPTIONS_inl
-#define __OPTIONS_inl
-
-/*PAGE
- *
- * _Options_Is_no_wait
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the RTEMS_NO_WAIT option is enabled in
- * option_set, and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Options_Is_no_wait (
- rtems_option option_set
-)
-{
- return (option_set & RTEMS_NO_WAIT);
-}
-
-/*PAGE
- *
- * _Options_Is_any
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the RTEMS_EVENT_ANY option is enabled in
- * OPTION_SET, and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Options_Is_any (
- rtems_option option_set
-)
-{
- return (option_set & RTEMS_EVENT_ANY);
-}
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/inline/rtems/rtems/part.inl b/cpukit/rtems/inline/rtems/rtems/part.inl
deleted file mode 100644
index 9054be3415..0000000000
--- a/cpukit/rtems/inline/rtems/rtems/part.inl
+++ /dev/null
@@ -1,198 +0,0 @@
-/* part.inl
- *
- * This file contains the macro implementation of all inlined routines
- * in the Partition Manager.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __PARTITION_inl
-#define __PARTITION_inl
-
-/*PAGE
- *
- * _Partition_Allocate_buffer
- *
- * DESCRIPTION:
- *
- * This function attempts to allocate a buffer from the_partition.
- * If successful, it returns the address of the allocated buffer.
- * Otherwise, it returns NULL.
- */
-
-RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer (
- Partition_Control *the_partition
-)
-{
- return _Chain_Get( &the_partition->Memory );
-}
-
-/*PAGE
- *
- * _Partition_Free_buffer
- *
- * DESCRIPTION:
- *
- * This routine frees the_buffer to the_partition.
- */
-
-RTEMS_INLINE_ROUTINE void _Partition_Free_buffer (
- Partition_Control *the_partition,
- Chain_Node *the_buffer
-)
-{
- _Chain_Append( &the_partition->Memory, the_buffer );
-}
-
-/*PAGE
- *
- * _Partition_Is_buffer_on_boundary
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the_buffer is on a valid buffer
- * boundary for the_partition, and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Partition_Is_buffer_on_boundary (
- void *the_buffer,
- Partition_Control *the_partition
-)
-{
- unsigned32 offset;
-
- offset = (unsigned32) _Addresses_Subtract(
- the_buffer,
- the_partition->starting_address
- );
-
- return ((offset % the_partition->buffer_size) == 0);
-}
-
-/*PAGE
- *
- * _Partition_Is_buffer_valid
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the_buffer is a valid buffer from
- * the_partition, otherwise FALSE is returned.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Partition_Is_buffer_valid (
- Chain_Node *the_buffer,
- Partition_Control *the_partition
-)
-{
- void *starting;
- void *ending;
-
- starting = the_partition->starting_address;
- ending = _Addresses_Add_offset( starting, the_partition->length );
-
- return (
- _Addresses_Is_in_range( the_buffer, starting, ending ) &&
- _Partition_Is_buffer_on_boundary( the_buffer, the_partition )
- );
-}
-
-/*PAGE
- *
- * _Partition_Is_buffer_size_aligned
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the use of the specified buffer_size
- * will result in the allocation of buffers whose first byte is
- * properly aligned, and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Partition_Is_buffer_size_aligned (
- unsigned32 buffer_size
-)
-{
- return ((buffer_size % CPU_PARTITION_ALIGNMENT) == 0);
-}
-
-/*PAGE
- *
- * _Partition_Allocate
- *
- * DESCRIPTION:
- *
- * This function allocates a partition control block from
- * the inactive chain of free partition control blocks.
- */
-
-RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void )
-{
- return (Partition_Control *) _Objects_Allocate( &_Partition_Information );
-}
-
-/*PAGE
- *
- * _Partition_Free
- *
- * DESCRIPTION:
- *
- * This routine frees a partition control block to the
- * inactive chain of free partition control blocks.
- */
-
-RTEMS_INLINE_ROUTINE void _Partition_Free (
- Partition_Control *the_partition
-)
-{
- _Objects_Free( &_Partition_Information, &the_partition->Object );
-}
-
-/*PAGE
- *
- * _Partition_Get
- *
- * DESCRIPTION:
- *
- * This function maps partition IDs to partition control blocks.
- * If ID corresponds to a local partition, then it returns
- * the_partition control pointer which maps to ID and location
- * is set to OBJECTS_LOCAL. If the partition ID is global and
- * resides on a remote node, then location is set to OBJECTS_REMOTE,
- * and the_partition is undefined. Otherwise, location is set
- * to OBJECTS_ERROR and the_partition is undefined.
- */
-
-RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get (
- Objects_Id id,
- Objects_Locations *location
-)
-{
- return (Partition_Control *)
- _Objects_Get( &_Partition_Information, id, location );
-}
-
-/*PAGE
- *
- * _Partition_Is_null
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the_partition is NULL
- * and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Partition_Is_null (
- Partition_Control *the_partition
-)
-{
- return ( the_partition == NULL );
-}
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/inline/rtems/rtems/ratemon.inl b/cpukit/rtems/inline/rtems/rtems/ratemon.inl
deleted file mode 100644
index 2d0216e2ca..0000000000
--- a/cpukit/rtems/inline/rtems/rtems/ratemon.inl
+++ /dev/null
@@ -1,142 +0,0 @@
-/* ratemon.inl
- *
- * This file contains the static inline implementation of the inlined
- * routines in the Rate Monotonic Manager.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RATE_MONOTONIC_inl
-#define __RATE_MONOTONIC_inl
-
-/*PAGE
- *
- * _Rate_monotonic_Allocate
- *
- * DESCRIPTION:
- *
- * This function allocates a period control block from
- * the inactive chain of free period control blocks.
- */
-
-RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Allocate( void )
-{
- return (Rate_monotonic_Control *)
- _Objects_Allocate( &_Rate_monotonic_Information );
-}
-
-/*PAGE
- *
- * _Rate_monotonic_Free
- *
- * DESCRIPTION:
- *
- * This routine allocates a period control block from
- * the inactive chain of free period control blocks.
- */
-
-RTEMS_INLINE_ROUTINE void _Rate_monotonic_Free (
- Rate_monotonic_Control *the_period
-)
-{
- _Objects_Free( &_Rate_monotonic_Information, &the_period->Object );
-}
-
-/*PAGE
- *
- * _Rate_monotonic_Get
- *
- * DESCRIPTION:
- *
- * This function maps period IDs to period control blocks.
- * If ID corresponds to a local period, then it returns
- * the_period control pointer which maps to ID and location
- * is set to OBJECTS_LOCAL. Otherwise, location is set
- * to OBJECTS_ERROR and the_period is undefined.
- */
-
-RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get (
- Objects_Id id,
- Objects_Locations *location
-)
-{
- return (Rate_monotonic_Control *)
- _Objects_Get( &_Rate_monotonic_Information, id, location );
-}
-
-/*PAGE
- *
- * _Rate_monotonic_Is_active
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the_period is in the ACTIVE state,
- * and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Rate_monotonic_Is_active (
- Rate_monotonic_Control *the_period
-)
-{
- return (the_period->state == RATE_MONOTONIC_ACTIVE);
-}
-
-/*PAGE
- *
- * _Rate_monotonic_Is_inactive
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the_period is in the ACTIVE state,
- * and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Rate_monotonic_Is_inactive (
- Rate_monotonic_Control *the_period
-)
-{
- return (the_period->state == RATE_MONOTONIC_INACTIVE);
-}
-
-/*PAGE
- *
- * _Rate_monotonic_Is_expired
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the_period is in the EXPIRED state,
- * and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Rate_monotonic_Is_expired (
- Rate_monotonic_Control *the_period
-)
-{
- return (the_period->state == RATE_MONOTONIC_EXPIRED);
-}
-
-/*PAGE
- *
- * _Rate_monotonic_Is_null
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the_period is NULL and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Rate_monotonic_Is_null (
- Rate_monotonic_Control *the_period
-)
-{
- return (the_period == NULL);
-}
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/inline/rtems/rtems/region.inl b/cpukit/rtems/inline/rtems/rtems/region.inl
deleted file mode 100644
index 1f2b8f766c..0000000000
--- a/cpukit/rtems/inline/rtems/rtems/region.inl
+++ /dev/null
@@ -1,126 +0,0 @@
-/* region.inl
- *
- * This file contains the macro implementation of the inlined
- * routines from the Region Manager.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __REGION_inl
-#define __REGION_inl
-
-/*PAGE
- *
- * _Region_Allocate
- *
- * DESCRIPTION:
- *
- * This function allocates a region control block from
- * the inactive chain of free region control blocks.
- */
-
-RTEMS_INLINE_ROUTINE Region_Control *_Region_Allocate( void )
-{
- return (Region_Control *) _Objects_Allocate( &_Region_Information );
-}
-
-/*PAGE
- *
- * _Region_Free
- *
- * DESCRIPTION:
- *
- * This routine frees a region control block to the
- * inactive chain of free region control blocks.
- */
-
-RTEMS_INLINE_ROUTINE void _Region_Free (
- Region_Control *the_region
-)
-{
- _Objects_Free( &_Region_Information, &the_region->Object );
-}
-
-/*PAGE
- *
- * _Region_Get
- *
- * DESCRIPTION:
- *
- * This function maps region IDs to region control blocks.
- * If ID corresponds to a local region, then it returns
- * the_region control pointer which maps to ID and location
- * is set to OBJECTS_LOCAL. Otherwise, location is set
- * to OBJECTS_ERROR and the_region is undefined.
- */
-
-RTEMS_INLINE_ROUTINE Region_Control *_Region_Get (
- Objects_Id id,
- Objects_Locations *location
-)
-{
- return (Region_Control *)
- _Objects_Get( &_Region_Information, id, location );
-}
-
-/*PAGE
- *
- * _Region_Allocate_segment
- *
- * DESCRIPTION:
- *
- * This function attempts to allocate a segment from the_region.
- * If successful, it returns the address of the allocated segment.
- * Otherwise, it returns NULL.
- */
-
-RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment (
- Region_Control *the_region,
- unsigned32 size
-)
-{
- return _Heap_Allocate( &the_region->Memory, size );
-}
-
-/*PAGE
- *
- * _Region_Free_segment
- *
- * DESCRIPTION:
- *
- * This function frees the_segment to the_region.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Region_Free_segment (
- Region_Control *the_region,
- void *the_segment
-)
-{
- return _Heap_Free( &the_region->Memory, the_segment );
-}
-
-/*PAGE
- *
- * _Region_Is_null
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the_region is NULL and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Region_Is_null (
- Region_Control *the_region
-)
-{
- return ( the_region == NULL );
-}
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/inline/rtems/rtems/sem.inl b/cpukit/rtems/inline/rtems/rtems/sem.inl
deleted file mode 100644
index 4c5d1d63f8..0000000000
--- a/cpukit/rtems/inline/rtems/rtems/sem.inl
+++ /dev/null
@@ -1,92 +0,0 @@
-/* sem.inl
- *
- * This file contains the static inlin implementation of the inlined
- * routines from the Semaphore Manager.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __SEMAPHORE_inl
-#define __SEMAPHORE_inl
-
-/*PAGE
- *
- * _Semaphore_Allocate
- *
- * DESCRIPTION:
- *
- * This function allocates a semaphore control block from
- * the inactive chain of free semaphore control blocks.
- */
-
-RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Allocate( void )
-{
- return (Semaphore_Control *) _Objects_Allocate( &_Semaphore_Information );
-}
-
-/*PAGE
- *
- * _Semaphore_Free
- *
- * DESCRIPTION:
- *
- * This routine frees a semaphore control block to the
- * inactive chain of free semaphore control blocks.
- */
-
-RTEMS_INLINE_ROUTINE void _Semaphore_Free (
- Semaphore_Control *the_semaphore
-)
-{
- _Objects_Free( &_Semaphore_Information, &the_semaphore->Object );
-}
-
-/*PAGE
- *
- * _Semaphore_Get
- *
- * DESCRIPTION:
- *
- * This function maps semaphore IDs to semaphore control blocks.
- * If ID corresponds to a local semaphore, then it returns
- * the_semaphore control pointer which maps to ID and location
- * is set to OBJECTS_LOCAL. if the semaphore ID is global and
- * resides on a remote node, then location is set to OBJECTS_REMOTE,
- * and the_semaphore is undefined. Otherwise, location is set
- * to OBJECTS_ERROR and the_semaphore is undefined.
- */
-
-RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get (
- Objects_Id id,
- Objects_Locations *location
-)
-{
- return (Semaphore_Control *)
- _Objects_Get( &_Semaphore_Information, id, location );
-}
-
-/*PAGE
- *
- * _Semaphore_Is_null
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the_semaphore is NULL and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Semaphore_Is_null (
- Semaphore_Control *the_semaphore
-)
-{
- return ( the_semaphore == NULL );
-}
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/inline/rtems/rtems/status.inl b/cpukit/rtems/inline/rtems/rtems/status.inl
deleted file mode 100644
index c67719c82f..0000000000
--- a/cpukit/rtems/inline/rtems/rtems/status.inl
+++ /dev/null
@@ -1,55 +0,0 @@
-/* inline/status.inl
- *
- * This include file contains the implementations of the inlined
- * routines for the status package.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __INLINE_STATUS_inl
-#define __INLINE_STATUS_inl
-
-/*PAGE
- *
- * rtems_is_status_successful
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the status code is equal to RTEMS_SUCCESSFUL,
- * and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean rtems_is_status_successful(
- rtems_status_code code
-)
-{
- return (code == RTEMS_SUCCESSFUL);
-}
-
-/*PAGE
- *
- * rtems_are_statuses_equal
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the status code1 is equal to code2,
- * and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean rtems_are_statuses_equal(
- rtems_status_code code1,
- rtems_status_code code2
-)
-{
- return (code1 == code2);
-}
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/inline/rtems/rtems/support.inl b/cpukit/rtems/inline/rtems/rtems/support.inl
deleted file mode 100644
index 4ab212ee49..0000000000
--- a/cpukit/rtems/inline/rtems/rtems/support.inl
+++ /dev/null
@@ -1,60 +0,0 @@
-/* support.inl
- *
- * This include file contains the static inline implementation of all
- * of the inlined routines specific to the RTEMS API.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_SUPPORT_inl
-#define __RTEMS_SUPPORT_inl
-
-/*PAGE
- *
- * rtems_is_name_valid
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the name is valid, and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE rtems_boolean rtems_is_name_valid (
- rtems_name name
-)
-{
- return ( name != 0 );
-}
-
-/*PAGE
- *
- * rtems_name_to_characters
- *
- * DESCRIPTION:
- *
- * This function breaks the object name into the four component
- * characters C1, C2, C3, and C4.
- */
-
-RTEMS_INLINE_ROUTINE void rtems_name_to_characters(
- rtems_name name,
- char *c1,
- char *c2,
- char *c3,
- char *c4
-)
-{
- *c1 = (name >> 24) & 0xff;
- *c2 = (name >> 16) & 0xff;
- *c3 = (name >> 8) & 0xff;
- *c4 = name & 0xff;
-}
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/inline/rtems/rtems/tasks.inl b/cpukit/rtems/inline/rtems/rtems/tasks.inl
deleted file mode 100644
index 5313a3ae7e..0000000000
--- a/cpukit/rtems/inline/rtems/rtems/tasks.inl
+++ /dev/null
@@ -1,89 +0,0 @@
-/* tasks.inl
- *
- * This file contains the static inline implementation of all inlined
- * routines in the with RTEMS Tasks Manager.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_TASKS_inl
-#define __RTEMS_TASKS_inl
-
-/*PAGE
- *
- * _RTEMS_tasks_Allocate
- *
- * DESCRIPTION:
- *
- * This function allocates a task control block from
- * the inactive chain of free task control blocks.
- */
-
-RTEMS_INLINE_ROUTINE Thread_Control *_RTEMS_tasks_Allocate( void )
-{
- return (Thread_Control *) _Objects_Allocate( &_RTEMS_tasks_Information );
-}
-
-/*PAGE
- *
- * _RTEMS_tasks_Free
- *
- * DESCRIPTION:
- *
- * This routine frees a task control block to the
- * inactive chain of free task control blocks.
- */
-
-RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free (
- Thread_Control *the_task
-)
-{
- _Objects_Free(
- _Objects_Get_information( the_task->Object.id ),
- &the_task->Object
- );
-}
-
-/*PAGE
- *
- * _RTEMS_tasks_Priority_to_Core
- *
- * DESCRIPTION:
- *
- * This function converts an RTEMS API priority into a core priority.
- */
-
-RTEMS_INLINE_ROUTINE Priority_Control _RTEMS_tasks_Priority_to_Core(
- rtems_task_priority priority
-)
-{
- return (Priority_Control) priority;
-}
-
-/*PAGE
- *
- * _RTEMS_tasks_Priority_is_valid
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the_priority is a valid user task priority
- * and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _RTEMS_tasks_Priority_is_valid (
- rtems_task_priority the_priority
-)
-{
- return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
- ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) );
-}
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/inline/rtems/rtems/timer.inl b/cpukit/rtems/inline/rtems/rtems/timer.inl
deleted file mode 100644
index a887553ce4..0000000000
--- a/cpukit/rtems/inline/rtems/rtems/timer.inl
+++ /dev/null
@@ -1,141 +0,0 @@
-/* timer.inl
- *
- * This file contains the static inline implementation of the inlined routines
- * from the Timer Manager.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __TIMER_inl
-#define __TIMER_inl
-
-/*PAGE
- *
- * _Timer_Allocate
- *
- * DESCRIPTION:
- *
- * This function allocates a timer control block from
- * the inactive chain of free timer control blocks.
- */
-
-RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Allocate( void )
-{
- return (Timer_Control *) _Objects_Allocate( &_Timer_Information );
-}
-
-/*PAGE
- *
- * _Timer_Free
- *
- * DESCRIPTION:
- *
- * This routine frees a timer control block to the
- * inactive chain of free timer control blocks.
- */
-
-RTEMS_INLINE_ROUTINE void _Timer_Free (
- Timer_Control *the_timer
-)
-{
- _Objects_Free( &_Timer_Information, &the_timer->Object );
-}
-
-/*PAGE
- *
- * _Timer_Get
- *
- * DESCRIPTION:
- *
- * This function maps timer IDs to timer control blocks.
- * If ID corresponds to a local timer, then it returns
- * the timer control pointer which maps to ID and location
- * is set to OBJECTS_LOCAL. Otherwise, location is set
- * to OBJECTS_ERROR and the returned value is undefined.
- */
-
-RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
- Objects_Id id,
- Objects_Locations *location
-)
-{
- return (Timer_Control *)
- _Objects_Get( &_Timer_Information, id, location );
-}
-
-/*PAGE
- *
- * _Timer_Is_interval_class
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the class is that of an INTERVAL
- * timer, and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Timer_Is_interval_class (
- Timer_Classes the_class
-)
-{
- return ( the_class == TIMER_INTERVAL );
-}
-
-/*PAGE
- *
- * _Timer_Is_time_of_day_class
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the class is that of an INTERVAL
- * timer, and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Timer_Is_timer_of_day_class (
- Timer_Classes the_class
-)
-{
- return ( the_class == TIMER_TIME_OF_DAY );
-}
-
-/*PAGE
- *
- * _Timer_Is_dormant_class
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the class is that of a DORMANT
- * timer, and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Timer_Is_dormant_class (
- Timer_Classes the_class
-)
-{
- return ( the_class == TIMER_DORMANT );
-}
-
-/*PAGE
- *
- * _Timer_Is_null
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the_timer is NULL and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Timer_Is_null (
- Timer_Control *the_timer
-)
-{
- return ( the_timer == NULL );
-}
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/macros/Makefile.am b/cpukit/rtems/macros/Makefile.am
deleted file mode 100644
index 0c97211587..0000000000
--- a/cpukit/rtems/macros/Makefile.am
+++ /dev/null
@@ -1,10 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-SUBDIRS = rtems
-
-include $(top_srcdir)/../../../automake/subdirs.am
-include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/rtems/macros/rtems/rtems/asr.inl b/cpukit/rtems/macros/rtems/rtems/asr.inl
deleted file mode 100644
index f2943078da..0000000000
--- a/cpukit/rtems/macros/rtems/rtems/asr.inl
+++ /dev/null
@@ -1,89 +0,0 @@
-/* macros/asr.h
- *
- * This include file contains the implemenation of all routines
- * associated with the asynchronous signal handler which are inlined.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __INLINE_ASR_h
-#define __INLINE_ASR_h
-
-#include <rtems/score/isr.h>
-
-/*PAGE
- *
- * _ASR_Initialize
- *
- */
-
-#define _ASR_Initialize( _information ) \
-{ \
- (_information)->is_enabled = TRUE; \
- (_information)->handler = NULL; \
- (_information)->mode_set = RTEMS_DEFAULT_MODES; \
- (_information)->signals_posted = 0; \
- (_information)->signals_pending = 0; \
- (_information)->nest_level = 0; \
-}
-
-/*PAGE
- *
- * _ASR_Swap_signals
- *
- */
-
-#define _ASR_Swap_signals( _information ) \
-{ \
- rtems_signal_set _signals; \
- ISR_Level _level; \
- \
- _ISR_Disable( _level ); \
- _signals = (_information)->signals_pending; \
- (_information)->signals_pending = (_information)->signals_posted; \
- (_information)->signals_posted = _signals; \
- _ISR_Enable( _level ); \
-}
-
-/*PAGE
- *
- * _ASR_Is_null_handler
- *
- */
-
-#define _ASR_Is_null_handler( _asr_handler ) \
- ( (_asr_handler) == NULL )
-
-/*PAGE
- *
- * _ASR_Are_signals_pending
- *
- */
-
-#define _ASR_Are_signals_pending( _information ) \
- ( (_information)->signals_posted != 0 )
-
-/*PAGE
- *
- * _ASR_Post_signals
- *
- */
-
-#define _ASR_Post_signals( _signals, _signal_set ) \
- do { \
- ISR_Level _level; \
- \
- _ISR_Disable( _level ); \
- *(_signal_set) |= (_signals); \
- _ISR_Enable( _level ); \
- } while ( 0 )
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/macros/rtems/rtems/attr.inl b/cpukit/rtems/macros/rtems/rtems/attr.inl
deleted file mode 100644
index 56ccac6657..0000000000
--- a/cpukit/rtems/macros/rtems/rtems/attr.inl
+++ /dev/null
@@ -1,119 +0,0 @@
-/* macros/attr.h
- *
- * This include file contains all of the inlined routines associated
- * with attributes.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __MACROS_ATTRIBUTES_h
-#define __MACROS_ATTRIBUTES_h
-
-/*PAGE
- *
- * _Attributes_Set
- */
-
-#define _Attributes_Set( _new_attributes, _attribute_set ) \
- ( (_attribute_set) | (_new_attributes) )
-
-/*PAGE
- *
- * _Attributes_Clear
- */
-
-#define _Attributes_Clear( _attribute_set, _mask ) \
- ( (_attribute_set) & ~(_mask) )
-
-/*PAGE
- *
- * _Attributes_Is_floating_point
- *
- */
-
-#define _Attributes_Is_floating_point( _attribute_set ) \
- ( (_attribute_set) & RTEMS_FLOATING_POINT )
-
-/*PAGE
- *
- * _Attributes_Is_global
- *
- */
-
-#if defined(RTEMS_MULTIPROCESSING)
-#define _Attributes_Is_global( _attribute_set ) \
- ( (_attribute_set) & RTEMS_GLOBAL )
-#endif
-
-/*PAGE
- *
- * _Attributes_Is_priority
- *
- */
-
-#define _Attributes_Is_priority( _attribute_set ) \
- ( (_attribute_set) & RTEMS_PRIORITY )
-
-/*PAGE
- *
- * _Attributes_Is_binary_semaphore
- *
- */
-
-#define _Attributes_Is_binary_semaphore( _attribute_set ) \
- (((_attribute_set) & RTEMS_SEMAPHORE_CLASS) == RTEMS_BINARY_SEMAPHORE)
-
-/*PAGE
- *
- * _Attributes_Is_simple_binary_semaphore
- *
- */
-
-#define _Attributes_Is_simple_binary_semaphore( _attribute_set ) \
- (((_attribute_set) & RTEMS_SEMAPHORE_CLASS) == RTEMS_SIMPLE_BINARY_SEMAPHORE)
-
-/*PAGE
- *
- * _Attributes_Is_counting_semaphore
- *
- */
-
-#define _Attributes_Is_counting_semaphore( _attribute_set ) \
- (((_attribute_set) & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE)
-
-/*PAGE
- *
- * _Attributes_Is_inherit_priority
- *
- */
-
-#define _Attributes_Is_inherit_priority( _attribute_set ) \
- ( (_attribute_set) & RTEMS_INHERIT_PRIORITY )
-
-/*PAGE
- *
- * _Attributes_Is_priority_ceiling
- *
- */
-
-#define _Attributes_Is_priority_ceiling( _attribute_set ) \
- ( (_attribute_set) & RTEMS_PRIORITY_CEILING )
-
-/*PAGE
- *
- * _Attributes_Is_system_task
- *
- */
-
-#define _Attributes_Is_system_task( _attribute_set ) \
- ( (_attribute_set) & RTEMS_SYSTEM_TASK )
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/macros/rtems/rtems/dpmem.inl b/cpukit/rtems/macros/rtems/rtems/dpmem.inl
deleted file mode 100644
index 590bb0f71a..0000000000
--- a/cpukit/rtems/macros/rtems/rtems/dpmem.inl
+++ /dev/null
@@ -1,58 +0,0 @@
-/* macros/dpmem.h
- *
- * This include file contains the inline routine used in conjunction
- * with the Dual Ported Memory Manager
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __MACROS_DPMEM_h
-#define __MACROS_DPMEM_h
-
-/*PAGE
- *
- * _Dual_ported_memory_Allocate
- *
- */
-
-#define _Dual_ported_memory_Allocate() \
- (Dual_ported_memory_Control *) \
- _Objects_Allocate( &_Dual_ported_memory_Information )
-
-/*PAGE
- *
- * _Dual_ported_memory_Free
- *
- */
-
-#define _Dual_ported_memory_Free( _the_port ) \
- _Objects_Free( &_Dual_ported_memory_Information, &(_the_port)->Object )
-
-/*PAGE
- *
- * _Dual_ported_memory_Get
- *
- */
-
-#define _Dual_ported_memory_Get( _id, _location ) \
- (Dual_ported_memory_Control *) \
- _Objects_Get( &_Dual_ported_memory_Information, (_id), (_location) )
-
-
-/*PAGE
- *
- * _Dual_ported_memory_Is_null
- */
-
-#define _Dual_ported_memory_Is_null( _the_port ) \
- ( (_the_port) == NULL )
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/macros/rtems/rtems/event.inl b/cpukit/rtems/macros/rtems/rtems/event.inl
deleted file mode 100644
index 5ca092bee0..0000000000
--- a/cpukit/rtems/macros/rtems/rtems/event.inl
+++ /dev/null
@@ -1,20 +0,0 @@
-/* macros/event.h
- *
- * This include file contains the implementation of macros for
- * the Event Manager.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __MACROS_EVENT_h
-#define __MACROS_EVENT_h
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/macros/rtems/rtems/eventset.inl b/cpukit/rtems/macros/rtems/rtems/eventset.inl
deleted file mode 100644
index 364887bd44..0000000000
--- a/cpukit/rtems/macros/rtems/rtems/eventset.inl
+++ /dev/null
@@ -1,58 +0,0 @@
-/* eventset.inl
- *
- * This include file contains the macro implementation of inlined
- * routines in the event set object.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __EVENT_SET_inl
-#define __EVENT_SET_inl
-
-/*PAGE
- *
- * _Event_sets_Is_empty
- */
-
-#define _Event_sets_Is_empty( _the_event_set ) \
- ((_the_event_set) == 0 )
-
-/*PAGE
- *
- * _Event_sets_Is_empty
- */
-
-#define _Event_sets_Post( _the_new_events, _the_event_set ) \
- do { \
- ISR_Level level; \
- \
- _ISR_Disable( level ); \
- *(_the_event_set) |= (_the_new_events); \
- _ISR_Enable( level ); \
- } while (0);
-
-/*PAGE
- *
- * _Event_sets_Is_empty
- */
-
-#define _Event_sets_Get( _the_event_set, _the_event_condition ) \
- ((_the_event_set) & (_the_event_condition))
-
-/*PAGE
- *
- * _Event_sets_Clear
- */
-
-#define _Event_sets_Clear( _the_event_set, _the_mask ) \
- ((_the_event_set) & ~(_the_mask))
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/macros/rtems/rtems/message.inl b/cpukit/rtems/macros/rtems/rtems/message.inl
deleted file mode 100644
index ff087b96b9..0000000000
--- a/cpukit/rtems/macros/rtems/rtems/message.inl
+++ /dev/null
@@ -1,48 +0,0 @@
-/* message.inl
- *
- * This include file contains the macro implementation of all
- * inlined routines in the Message Manager.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __MESSAGE_QUEUE_inl
-#define __MESSAGE_QUEUE_inl
-
-/*PAGE
- *
- * _Message_queue_Is_null
- *
- */
-
-#define _Message_queue_Is_null( _the_message_queue ) \
- ( (_the_message_queue) == NULL )
-
-/*PAGE
- *
- * _Message_queue_Free
- *
- */
-
-#define _Message_queue_Free( _the_message_queue ) \
- _Objects_Free( &_Message_queue_Information, &(_the_message_queue)->Object )
-
-/*PAGE
- *
- * _Message_queue_Get
- *
- */
-
-#define _Message_queue_Get( _id, _location ) \
- (Message_queue_Control *) \
- _Objects_Get( &_Message_queue_Information, (_id), (_location) )
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/macros/rtems/rtems/modes.inl b/cpukit/rtems/macros/rtems/rtems/modes.inl
deleted file mode 100644
index 6e0920838a..0000000000
--- a/cpukit/rtems/macros/rtems/rtems/modes.inl
+++ /dev/null
@@ -1,91 +0,0 @@
-/* modes.inl
- *
- * This include file contains the macro implementation of the
- * inlined routines in the Mode Handler.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __MODES_inl
-#define __MODES_inl
-
-/*PAGE
- *
- * _Modes_Mask_changed
- *
- */
-
-#define _Modes_Mask_changed( _mode_set, _masks ) \
- ( (_mode_set) & (_masks) )
-
-/*PAGE
- *
- * _Modes_Is_asr_disabled
- *
- */
-
-#define _Modes_Is_asr_disabled( _mode_set ) \
- (((_mode_set) & RTEMS_ASR_MASK) == RTEMS_NO_ASR)
-
-/*PAGE
- *
- * _Modes_Is_preempt
- *
- */
-
-#define _Modes_Is_preempt( _mode_set ) \
- ( ( (_mode_set) & RTEMS_PREEMPT_MASK ) == RTEMS_PREEMPT )
-
-/*PAGE
- *
- * _Modes_Is_timeslice
- *
- */
-
-#define _Modes_Is_timeslice( _mode_set ) \
- (((_mode_set) & RTEMS_TIMESLICE_MASK) == RTEMS_TIMESLICE)
-
-/*PAGE
- *
- * _Modes_Get_interrupt_level
- *
- */
-
-#define _Modes_Get_interrupt_level( _mode_set ) \
- ( (_mode_set) & RTEMS_INTERRUPT_MASK )
-
-/*PAGE
- *
- * _Modes_Set_interrupt_level
- *
- */
-
-#define _Modes_Set_interrupt_level( _mode_set ) \
- _ISR_Set_level( _Modes_Get_interrupt_level( (_mode_set) ) )
-
-/*PAGE
- *
- * _Modes_Change
- *
- */
-
-#define _Modes_Change( _old_mode_set, _new_mode_set, \
- _mask, _out_mode_set, _changed ) \
- { Modes_Control _out_mode; \
- \
- _out_mode = (_old_mode_set); \
- _out_mode &= ~(_mask); \
- _out_mode |= (_new_mode_set) & (_mask); \
- *(_changed) = _out_mode ^ (_old_mode_set); \
- *(_out_mode_set) = _out_mode; \
- }
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/macros/rtems/rtems/options.inl b/cpukit/rtems/macros/rtems/rtems/options.inl
deleted file mode 100644
index b0d816ed6d..0000000000
--- a/cpukit/rtems/macros/rtems/rtems/options.inl
+++ /dev/null
@@ -1,38 +0,0 @@
-/* options.inl
- *
- * This file contains the macro implementation of the inlined
- * routines from the Options Handler.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __OPTIONS_inl
-#define __OPTIONS_inl
-
-/*PAGE
- *
- * _Options_Is_no_wait
- *
- */
-
-#define _Options_Is_no_wait( _option_set ) \
- ( (_option_set) & RTEMS_NO_WAIT )
-
-/*PAGE
- *
- * _Options_Is_any
- *
- */
-
-#define _Options_Is_any( _option_set ) \
- ( (_option_set) & RTEMS_EVENT_ANY )
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/macros/rtems/rtems/part.inl b/cpukit/rtems/macros/rtems/rtems/part.inl
deleted file mode 100644
index 050b350b05..0000000000
--- a/cpukit/rtems/macros/rtems/rtems/part.inl
+++ /dev/null
@@ -1,116 +0,0 @@
-/* part.inl
- *
- * This file contains the macro implementation of all inlined routines
- * in the Partition Manager.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __PARTITION_inl
-#define __PARTITION_inl
-
-/*PAGE
- *
- * _Partition_Allocate_buffer
- *
- */
-
-#define _Partition_Allocate_buffer( _the_partition ) \
- _Chain_Get( &(_the_partition)->Memory )
-
-/*PAGE
- *
- * _Partition_Free_buffer
- *
- */
-
-#define _Partition_Free_buffer( _the_partition, _the_buffer ) \
- _Chain_Append( &(_the_partition)->Memory, (_the_buffer) )
-
-/*PAGE
- *
- * _Partition_Is_buffer_on_boundary
- *
- */
-
-#define _Partition_Is_buffer_on_boundary( _the_buffer, _the_partition ) \
- ((((unsigned32) _Addresses_Subtract( \
- (_the_buffer), \
- (_the_partition)->starting_address ) \
- ) % \
- (_the_partition)->buffer_size) == 0)
-
-/*PAGE
- *
- * _Partition_Is_buffer_valid
- *
- */
-
-#define _Partition_Is_buffer_valid( _the_buffer, _the_partition ) \
- ( \
- _Addresses_Is_in_range( \
- (_the_buffer), \
- (_the_partition)->starting_address, \
- _Addresses_Add_offset( \
- (_the_partition)->starting_address, \
- (_the_partition)->length \
- ) \
- ) && \
- _Partition_Is_buffer_on_boundary( (_the_buffer), (_the_partition) ) \
- )
-
-/*PAGE
- *
- * _Partition_Is_buffer_size_aligned
- *
- */
-
-#define _Partition_Is_buffer_size_aligned( _buffer_size ) \
- ((_buffer_size) % CPU_PARTITION_ALIGNMENT == 0)
-
-/*PAGE
- *
- * _Partition_Allocate
- *
- */
-
-#define _Partition_Allocate() \
- (Partition_Control *) _Objects_Allocate( &_Partition_Information )
-
-/*PAGE
- *
- * _Partition_Free
- *
- */
-
-#define _Partition_Free( _the_partition ) \
- _Objects_Free( &_Partition_Information, &(_the_partition)->Object )
-
-/*PAGE
- *
- * _Partition_Get
- *
- */
-
-#define _Partition_Get( _id, _location ) \
- (Partition_Control *) \
- _Objects_Get( &_Partition_Information, (_id), (_location) )
-
-/*PAGE
- *
- * _Partition_Is_null
- *
- */
-
-#define _Partition_Is_null( _the_partition ) \
- ( (_the_partition) == NULL )
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/macros/rtems/rtems/ratemon.inl b/cpukit/rtems/macros/rtems/rtems/ratemon.inl
deleted file mode 100644
index c177b6a862..0000000000
--- a/cpukit/rtems/macros/rtems/rtems/ratemon.inl
+++ /dev/null
@@ -1,84 +0,0 @@
-/* ratemon.inl
- *
- * This file contains the macro implementation of the inlined
- * routines in the Rate Monotonic Manager.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RATE_MONOTONIC_inl
-#define __RATE_MONOTONIC_inl
-
-/*PAGE
- *
- * _Rate_monotonic_Allocate
- *
- */
-
-#define _Rate_monotonic_Allocate() \
- (Rate_monotonic_Control *) \
- _Objects_Allocate( &_Rate_monotonic_Information )
-
-/*PAGE
- *
- * _Rate_monotonic_Free
- *
- */
-
-#define _Rate_monotonic_Free( _the_period ) \
- _Objects_Free( &_Rate_monotonic_Information, &(_the_period)->Object )
-
-/*PAGE
- *
- * _Rate_monotonic_Get
- *
- */
-
-#define _Rate_monotonic_Get( _id, _location ) \
- (Rate_monotonic_Control *) \
- _Objects_Get( &_Rate_monotonic_Information, (_id), (_location) )
-
-/*PAGE
- *
- * _Rate_monotonic_Is_active
- *
- */
-
-#define _Rate_monotonic_Is_active( _the_period ) \
- ((_the_period)->state == RATE_MONOTONIC_ACTIVE)
-
-/*PAGE
- *
- * _Rate_monotonic_Is_inactive
- *
- */
-
-#define _Rate_monotonic_Is_inactive( _the_period ) \
- ((_the_period)->state == RATE_MONOTONIC_INACTIVE)
-
-/*PAGE
- *
- * _Rate_monotonic_Is_expired
- *
- */
-
-#define _Rate_monotonic_Is_expired( _the_period ) \
- ((_the_period)->state == RATE_MONOTONIC_EXPIRED)
-
-/*PAGE
- *
- * _Rate_monotonic_Is_null
- *
- */
-
-#define _Rate_monotonic_Is_null( _the_period ) ( (_the_period) == NULL )
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/macros/rtems/rtems/region.inl b/cpukit/rtems/macros/rtems/rtems/region.inl
deleted file mode 100644
index 2576a08bec..0000000000
--- a/cpukit/rtems/macros/rtems/rtems/region.inl
+++ /dev/null
@@ -1,74 +0,0 @@
-/* region.inl
- *
- * This file contains the macro implementation of the inlined
- * routines from the Region Manager.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __REGION_inl
-#define __REGION_inl
-
-/*PAGE
- *
- * _Region_Allocate
- *
- */
-
-#define _Region_Allocate() \
- (Region_Control *) _Objects_Allocate( &_Region_Information )
-
-/*PAGE
- *
- * _Region_Free
- *
- */
-
-#define _Region_Free( _the_region ) \
- _Objects_Free( &_Region_Information, &(_the_region)->Object )
-
-/*PAGE
- *
- * _Region_Get
- *
- */
-
-#define _Region_Get( _id, _location ) \
- (Region_Control *) \
- _Objects_Get( &_Region_Information, (_id), (_location) )
-
-/*PAGE
- *
- * _Region_Allocate_segment
- *
- */
-
-#define _Region_Allocate_segment( _the_region, _size ) \
- _Heap_Allocate( &(_the_region)->Memory, (_size) )
-
-/*PAGE
- *
- * _Region_Free_segment
- *
- */
-
-#define _Region_Free_segment( _the_region, _the_segment ) \
- _Heap_Free( &(_the_region)->Memory, (_the_segment) )
-
-/*PAGE
- *
- * _Region_Is_null
- *
- */
-
-#define _Region_Is_null( _the_region ) ( (_the_region) == NULL )
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/macros/rtems/rtems/sem.inl b/cpukit/rtems/macros/rtems/rtems/sem.inl
deleted file mode 100644
index 31009ddb68..0000000000
--- a/cpukit/rtems/macros/rtems/rtems/sem.inl
+++ /dev/null
@@ -1,57 +0,0 @@
-/* sem.inl
- *
- * This file contains the macro implementation of the inlined
- * routines from the Semaphore Manager.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __SEMAPHORE_inl
-#define __SEMAPHORE_inl
-
-/*PAGE
- *
- * _Semaphore_Allocate
- *
- */
-
-#define _Semaphore_Allocate() \
- (Semaphore_Control *) _Objects_Allocate( &_Semaphore_Information )
-
-/*PAGE
- *
- * _Semaphore_Free
- *
- */
-
-#define _Semaphore_Free( _the_semaphore ) \
- _Objects_Free( &_Semaphore_Information, &(_the_semaphore)->Object )
-
-/*PAGE
- *
- * _Semaphore_Get
- *
- */
-
-#define _Semaphore_Get( _id, _location ) \
- (Semaphore_Control *) \
- _Objects_Get( &_Semaphore_Information, (_id), (_location) )
-
-/*PAGE
- *
- * _Semaphore_Is_null
- *
- */
-
-#define _Semaphore_Is_null( _the_semaphore ) \
- ( (_the_semaphore) == NULL )
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/macros/rtems/rtems/status.inl b/cpukit/rtems/macros/rtems/rtems/status.inl
deleted file mode 100644
index 6559d04bb3..0000000000
--- a/cpukit/rtems/macros/rtems/rtems/status.inl
+++ /dev/null
@@ -1,38 +0,0 @@
-/* macros/status.h
- *
- * This include file contains the implementations of the inlined
- * routines for the status package.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __MACROS_STATUS_h
-#define __MACROS_STATUS_h
-
-/*PAGE
- *
- * rtems_is_status_successful
- *
- */
-
-#define rtems_is_status_successful( _code ) \
- ( (_code) == RTEMS_SUCCESSFUL )
-
-/*PAGE
- *
- * rtems_are_statuses_equal
- *
- */
-
-#define rtems_are_statuses_equal( _code1, _code2 ) \
- ((_code1) == (_code2))
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/macros/rtems/rtems/support.inl b/cpukit/rtems/macros/rtems/rtems/support.inl
deleted file mode 100644
index b62b545a8d..0000000000
--- a/cpukit/rtems/macros/rtems/rtems/support.inl
+++ /dev/null
@@ -1,43 +0,0 @@
-/* support.inl
- *
- * This include file contains the macros implementation of all
- * of the inlined routines specific to the RTEMS API.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_SUPPORT_inl
-#define __RTEMS_SUPPORT_inl
-
-/*PAGE
- *
- * rtems_is_name_valid
- *
- */
-
-#define rtems_is_name_valid( _name ) \
- ( (_name) != 0 )
-
-/*PAGE
- *
- * rtems_name_to_characters
- *
- */
-
-#define rtems_name_to_characters( _name, _c1, _c2, _c3, _c4 ) \
- { \
- (*(_c1) = ((_name) >> 24) & 0xff; \
- (*(_c2) = ((_name) >> 16) & 0xff; \
- (*(_c3) = ((_name) >> 8) & 0xff; \
- (*(_c4) = ((_name)) & 0xff; \
- }
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/macros/rtems/rtems/tasks.inl b/cpukit/rtems/macros/rtems/rtems/tasks.inl
deleted file mode 100644
index a30247b12a..0000000000
--- a/cpukit/rtems/macros/rtems/rtems/tasks.inl
+++ /dev/null
@@ -1,57 +0,0 @@
-/* tasks.inl
- *
- * This file contains the macro implementation of all inlined
- * routines in the with RTEMS Tasks Manager.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_TASKS_inl
-#define __RTEMS_TASKS_inl
-
-/*PAGE
- *
- * _RTEMS_tasks_Allocate
- *
- */
-
-#define _RTEMS_tasks_Allocate() \
- (Thread_Control *) _Objects_Allocate( &_RTEMS_tasks_Information )
-
-/*PAGE
- *
- * _RTEMS_tasks_Free
- *
- */
-
-#define _RTEMS_tasks_Free( _the_task ) \
- _Objects_Free( &_RTEMS_tasks_Information, &(_the_task)->Object )
-
-/*PAGE
- *
- * _RTEMS_tasks_Priority_to_Core
- */
-
-#define _RTEMS_tasks_Priority_to_Core( _priority ) \
- ((Priority_Control) (_priority))
-
-/*PAGE
- *
- * _RTEMS_tasks_Priority_is_valid
- *
- */
-
-#define _RTEMS_tasks_Priority_is_valid( _the_priority ) \
- ( ((_the_priority) >= RTEMS_MINIMUM_PRIORITY) && \
- ((_the_priority) <= RTEMS_MAXIMUM_PRIORITY) )
-
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/macros/rtems/rtems/timer.inl b/cpukit/rtems/macros/rtems/rtems/timer.inl
deleted file mode 100644
index 36b0fdfe85..0000000000
--- a/cpukit/rtems/macros/rtems/rtems/timer.inl
+++ /dev/null
@@ -1,84 +0,0 @@
-/* timer.inl
- *
- * This file contains the macro implementation of the inlined routines
- * from the Timer Manager.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __TIMER_inl
-#define __TIMER_inl
-
-/*PAGE
- *
- * _Timer_Allocate
- *
- */
-
-#define _Timer_Allocate() \
- (Timer_Control *) _Objects_Allocate( &_Timer_Information )
-
-/*PAGE
- *
- * _Timer_Free
- *
- */
-
-#define _Timer_Free( _the_timer ) \
- _Objects_Free( &_Timer_Information, &(_the_timer)->Object )
-
-/*PAGE
- *
- * _Timer_Get
- *
- */
-
-#define _Timer_Get( _id, _location ) \
- (Timer_Control *) \
- _Objects_Get( &_Timer_Information, (_id), (_location) )
-
-/*PAGE
- *
- * _Timer_Is_interval_class
- *
- */
-
-#define _Timer_Is_interval_class( _the_class ) \
- ( (_the_class) == TIMER_INTERVAL )
-
-/*PAGE
- *
- * _Timer_Is_time_of_day_class
- *
- */
-
-#define _Timer_Is_time_of_day_class( _the_class ) \
- ( (_the_class) == TIMER_TIME_OF_DAY )
-
-/*PAGE
- *
- * _Timer_Is_dormant_class
- *
- */
-
-#define _Timer_Is_dormant_class( _the_class ) \
- ( (_the_class) == TIMER_DORMANT )
-
-/*PAGE
- *
- * _Timer_Is_null
- *
- */
-
-#define _Timer_Is_null( _the_timer ) \
- ( (_the_timer) == NULL )
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/src/Makefile.am b/cpukit/rtems/src/Makefile.am
deleted file mode 100644
index 16d932dc9d..0000000000
--- a/cpukit/rtems/src/Makefile.am
+++ /dev/null
@@ -1,79 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../automake/lib.am
-
-# We only build multiprocessing related files if HAS_MP was defined
-MP_C_FILES = eventmp.c mp.c msgmp.c partmp.c regionmp.c semmp.c signalmp.c \
- taskmp.c
-
-TASK_C_FILES = tasks.c taskcreate.c taskdelete.c taskgetnote.c taskident.c \
- taskinitusers.c taskissuspended.c taskmode.c taskrestart.c taskresume.c \
- tasksetnote.c tasksetpriority.c taskstart.c tasksuspend.c \
- taskwakeafter.c taskwakewhen.c taskvariableadd.c taskvariabledelete.c \
- taskvariableget.c
-
-RATEMON_C_FILES = ratemon.c ratemoncancel.c ratemoncreate.c ratemondelete.c \
- ratemongetstatus.c ratemonident.c ratemonperiod.c ratemontimeout.c
-
-INTR_C_FILES = intr.c intrbody.c intrcatch.c
-
-CLOCK_C_FILES = rtclock.c clockget.c clockset.c clocktick.c
-
-TIMER_C_FILES = rtemstimer.c timercancel.c timercreate.c timerdelete.c \
- timerfireafter.c timerfirewhen.c timerident.c timerreset.c
-
-MESSAGE_QUEUE_C_FILES = msg.c msgqallocate.c msgqbroadcast.c msgqcreate.c \
- msgqdelete.c msgqflush.c msgqgetnumberpending.c msgqident.c \
- msgqreceive.c msgqsend.c msgqsubmit.c msgqtranslatereturncode.c \
- msgqurgent.c
-
-SEMAPHORE_C_FILES = sem.c semcreate.c semdelete.c semident.c semobtain.c \
- semrelease.c semflush.c semtranslatereturncode.c
-
-EVENT_C_FILES = event.c eventreceive.c eventseize.c eventsend.c \
- eventsurrender.c eventtimeout.c
-
-SIGNAL_C_FILES = signal.c signalcatch.c signalsend.c
-
-REGION_C_FILES = region.c regioncreate.c regiondelete.c regionextend.c \
- regiongetsegment.c regiongetsegmentsize.c regionident.c \
- regionreturnsegment.c regionreturnsegment.c
-
-PARTITION_C_FILES = part.c partcreate.c partdelete.c partgetbuffer.c \
- partident.c partreturnbuffer.c
-
-DPMEM_C_FILES = dpmem.c dpmemcreate.c dpmemdelete.c dpmemexternal2internal.c \
- dpmemident.c dpmeminternal2external.c
-
-STD_C_FILES = attr.c $(TASK_C_FILES) $(RATEMON_C_FILES) $(INTR_C_FILES) \
- $(CLOCK_C_FILES) $(TIMER_C_FILES) $(SEMAPHORE_C_FILES) \
- $(MESSAGE_QUEUE_C_FILES) $(EVENT_C_FILES) $(SIGNAL_C_FILES) \
- $(PARTITION_C_FILES) $(REGION_C_FILES) $(DPMEM_C_FILES)
-
-if HAS_MP
-C_FILES = $(STD_C_FILES) $(MP_C_FILES)
-else
-C_FILES = $(STD_C_FILES)
-endif
-
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-OBJS = $(C_O_FILES)
-
-#
-# Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -D__RTEMS_INSIDE__
-AM_CFLAGS += $(CFLAGS_OS_V)
-
-all: ${ARCH} ${OBJS}
-
-EXTRA_DIST = $(STD_C_FILES) $(MP_C_FILES)
-
-include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/rtems/src/attr.c b/cpukit/rtems/src/attr.c
deleted file mode 100644
index bff1e61a16..0000000000
--- a/cpukit/rtems/src/attr.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Body for Attribute Routines
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/tasks.h>
-#include <rtems/score/stack.h>
-#include <rtems/rtems/modes.h>
-
-rtems_unsigned32 rtems_minimum_stack_size = STACK_MINIMUM_SIZE;
-rtems_unsigned32 rtems_interrupt_mask = RTEMS_INTERRUPT_MASK;
-
-rtems_attribute rtems_interrupt_level_attribute(
- unsigned32 level
-)
-{
- return RTEMS_INTERRUPT_LEVEL(level);
-}
-
diff --git a/cpukit/rtems/src/clockget.c b/cpukit/rtems/src/clockget.c
deleted file mode 100644
index e143aba213..0000000000
--- a/cpukit/rtems/src/clockget.c
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Clock Manager
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/clock.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/tod.h>
-#include <rtems/score/watchdog.h>
-
-/*PAGE
- *
- * rtems_clock_get
- *
- * This directive returns the current date and time. If the time has
- * not been set by a tm_set then an error is returned.
- *
- * Input parameters:
- * option - which value to return
- * time_buffer - pointer to output buffer (a time and date structure
- * or an interval)
- *
- * Output parameters:
- * time_buffer - output filled in
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_clock_get(
- rtems_clock_get_options option,
- void *time_buffer
-)
-{
- ISR_Level level;
- rtems_interval tmp;
-
- switch ( option ) {
- case RTEMS_CLOCK_GET_TOD:
- if ( !_TOD_Is_set )
- return RTEMS_NOT_DEFINED;
-
- *(rtems_time_of_day *)time_buffer = _TOD_Current;
- return RTEMS_SUCCESSFUL;
-
- case RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH:
- if ( !_TOD_Is_set )
- return RTEMS_NOT_DEFINED;
-
- *(rtems_interval *)time_buffer = _TOD_Seconds_since_epoch;
- return RTEMS_SUCCESSFUL;
-
- case RTEMS_CLOCK_GET_TICKS_SINCE_BOOT:
- *(rtems_interval *)time_buffer = _Watchdog_Ticks_since_boot;
- return RTEMS_SUCCESSFUL;
-
- case RTEMS_CLOCK_GET_TICKS_PER_SECOND:
- *(rtems_interval *)time_buffer = _TOD_Ticks_per_second;
- return RTEMS_SUCCESSFUL;
-
- case RTEMS_CLOCK_GET_TIME_VALUE:
- if ( !_TOD_Is_set )
- return RTEMS_NOT_DEFINED;
-
- _ISR_Disable( level );
- ((rtems_clock_time_value *)time_buffer)->seconds =
- _TOD_Seconds_since_epoch;
- tmp = _TOD_Current.ticks;
- _ISR_Enable( level );
-
- tmp *= _TOD_Microseconds_per_tick;
- ((rtems_clock_time_value *)time_buffer)->microseconds = tmp;
-
- return RTEMS_SUCCESSFUL;
- }
-
- return RTEMS_INTERNAL_ERROR; /* should never get here */
-
-}
diff --git a/cpukit/rtems/src/clockset.c b/cpukit/rtems/src/clockset.c
deleted file mode 100644
index cc2d2c68d9..0000000000
--- a/cpukit/rtems/src/clockset.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Clock Manager
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/clock.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/tod.h>
-#include <rtems/score/watchdog.h>
-
-/*PAGE
- *
- * rtems_clock_set
- *
- * This directive sets the date and time for this node.
- *
- * Input parameters:
- * time_buffer - pointer to the time and date structure
- *
- * Output parameters:
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_clock_set(
- rtems_time_of_day *time_buffer
-)
-{
- rtems_interval seconds;
-
- if ( _TOD_Validate( time_buffer ) ) {
- seconds = _TOD_To_seconds( time_buffer );
- _Thread_Disable_dispatch();
- _TOD_Set( time_buffer, seconds );
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
- }
- return RTEMS_INVALID_CLOCK;
-}
diff --git a/cpukit/rtems/src/clocktick.c b/cpukit/rtems/src/clocktick.c
deleted file mode 100644
index d80725a1b2..0000000000
--- a/cpukit/rtems/src/clocktick.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Clock Manager
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/clock.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/tod.h>
-#include <rtems/score/watchdog.h>
-
-/*PAGE
- *
- * rtems_clock_tick
- *
- * This directive notifies the executve that a tick has occurred.
- * When the tick occurs the time manager updates and maintains
- * the calendar time, timeslicing, and any timeout delays.
- *
- * Input parameters: NONE
- *
- * Output parameters:
- * RTEMS_SUCCESSFUL - always succeeds
- *
- * NOTE: This routine only works for leap-years through 2099.
- */
-
-rtems_status_code rtems_clock_tick( void )
-{
- _TOD_Tickle_ticks();
-
- _Watchdog_Tickle_ticks();
-
- _Thread_Tickle_timeslice();
-
- if ( _Thread_Is_context_switch_necessary() &&
- _Thread_Is_dispatching_enabled() )
- _Thread_Dispatch();
-
- return RTEMS_SUCCESSFUL;
-}
diff --git a/cpukit/rtems/src/clocktodtoseconds.c b/cpukit/rtems/src/clocktodtoseconds.c
deleted file mode 100644
index 16e9d24a1e..0000000000
--- a/cpukit/rtems/src/clocktodtoseconds.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Time of Day (TOD) Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/tod.h>
-#include <rtems/score/watchdog.h>
-
-/*PAGE
- *
- * _TOD_To_seconds
- *
- * This routine returns the seconds from the epoch until the
- * current date and time.
- *
- * Input parameters:
- * the_tod - pointer to the time and date structure
- *
- * Output parameters:
- * returns - seconds since epoch until the_tod
- */
-
-unsigned32 _TOD_To_seconds(
- TOD_Control *the_tod
-)
-{
- unsigned32 time;
- unsigned32 year_mod_4;
-
- time = the_tod->day - 1;
- year_mod_4 = the_tod->year & 3;
-
- if ( year_mod_4 == 0 )
- time += _TOD_Days_to_date[ 1 ][ the_tod->month ];
- else
- time += _TOD_Days_to_date[ 0 ][ the_tod->month ];
-
- time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) *
- ( (TOD_DAYS_PER_YEAR * 4) + 1);
-
- time += _TOD_Days_since_last_leap_year[ year_mod_4 ];
-
- time *= TOD_SECONDS_PER_DAY;
-
- time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute)
- * TOD_SECONDS_PER_MINUTE;
-
- time += the_tod->second;
-
- return( time );
-}
-
diff --git a/cpukit/rtems/src/clocktodvalidate.c b/cpukit/rtems/src/clocktodvalidate.c
deleted file mode 100644
index 18f377e500..0000000000
--- a/cpukit/rtems/src/clocktodvalidate.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Time of Day (TOD) Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/tod.h>
-#include <rtems/score/watchdog.h>
-
-/*PAGE
- *
- * _TOD_Validate
- *
- * This kernel routine checks the validity of a date and time structure.
- *
- * Input parameters:
- * the_tod - pointer to a time and date structure
- *
- * Output parameters:
- * TRUE - if the date, time, and tick are valid
- * FALSE - if the the_tod is invalid
- *
- * NOTE: This routine only works for leap-years through 2099.
- */
-
-boolean _TOD_Validate(
- TOD_Control *the_tod
-)
-{
- unsigned32 days_in_month;
-
- if ((the_tod->ticks >= _TOD_Ticks_per_second) ||
- (the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
- (the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
- (the_tod->hour >= TOD_HOURS_PER_DAY) ||
- (the_tod->month == 0) ||
- (the_tod->month > TOD_MONTHS_PER_YEAR) ||
- (the_tod->year < TOD_BASE_YEAR) ||
- (the_tod->day == 0) )
- return FALSE;
-
- if ( (the_tod->year % 4) == 0 )
- days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
- else
- days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
-
- if ( the_tod->day > days_in_month )
- return FALSE;
-
- return TRUE;
-}
-
diff --git a/cpukit/rtems/src/dpmem.c b/cpukit/rtems/src/dpmem.c
deleted file mode 100644
index 38ca108a1a..0000000000
--- a/cpukit/rtems/src/dpmem.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Dual Port Memory Manager
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/score/address.h>
-#include <rtems/rtems/dpmem.h>
-#include <rtems/score/object.h>
-#include <rtems/score/thread.h>
-#include <rtems/rtems/dpmem.h>
-
-/*PAGE
- *
- * _Dual_ported_memory_Manager_initialization
- *
- * This routine initializes all dual-ported memory manager related
- * data structures.
- *
- * Input parameters:
- * maximum_ports - number of ports to initialize
- *
- * Output parameters: NONE
- */
-
-void _Dual_ported_memory_Manager_initialization(
- unsigned32 maximum_ports
-)
-{
- _Objects_Initialize_information(
- &_Dual_ported_memory_Information,
- OBJECTS_RTEMS_PORTS,
- FALSE,
- maximum_ports,
- sizeof( Dual_ported_memory_Control ),
- FALSE,
- RTEMS_MAXIMUM_NAME_LENGTH,
- FALSE
- );
-}
diff --git a/cpukit/rtems/src/dpmemcreate.c b/cpukit/rtems/src/dpmemcreate.c
deleted file mode 100644
index 8d4bdbdb10..0000000000
--- a/cpukit/rtems/src/dpmemcreate.c
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Dual Port Memory Manager
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/score/address.h>
-#include <rtems/rtems/dpmem.h>
-#include <rtems/score/object.h>
-#include <rtems/score/thread.h>
-#include <rtems/rtems/dpmem.h>
-
-/*PAGE
- *
- * rtems_port_create
- *
- * This directive creates a port into a dual-ported memory area.
- *
- * Input parameters:
- * name - user defined port name
- * internal_start - internal start address of port
- * external_start - external start address of port
- * length - physical length in bytes
- * id - address of port id to set
- *
- * Output parameters:
- * id - port id
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_port_create(
- rtems_name name,
- void *internal_start,
- void *external_start,
- unsigned32 length,
- Objects_Id *id
-)
-{
- register Dual_ported_memory_Control *the_port;
-
- if ( !rtems_is_name_valid( name) )
- return RTEMS_INVALID_NAME;
-
- if ( !_Addresses_Is_aligned( internal_start ) ||
- !_Addresses_Is_aligned( external_start ) )
- return RTEMS_INVALID_ADDRESS;
-
- _Thread_Disable_dispatch(); /* to prevent deletion */
-
- the_port = _Dual_ported_memory_Allocate();
-
- if ( !the_port ) {
- _Thread_Enable_dispatch();
- return RTEMS_TOO_MANY;
- }
-
- the_port->internal_base = internal_start;
- the_port->external_base = external_start;
- the_port->length = length - 1;
-
- _Objects_Open(
- &_Dual_ported_memory_Information,
- &the_port->Object,
- &name
- );
-
- *id = the_port->Object.id;
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
-}
diff --git a/cpukit/rtems/src/dpmemdelete.c b/cpukit/rtems/src/dpmemdelete.c
deleted file mode 100644
index 872e2626f0..0000000000
--- a/cpukit/rtems/src/dpmemdelete.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Dual Port Memory Manager
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/score/address.h>
-#include <rtems/rtems/dpmem.h>
-#include <rtems/score/object.h>
-#include <rtems/score/thread.h>
-#include <rtems/rtems/dpmem.h>
-
-/*PAGE
- *
- * rtems_port_delete
- *
- * This directive allows a thread to delete a dual-ported memory area
- * specified by the dual-ported memory identifier.
- *
- * Input parameters:
- * id - dual-ported memory area id
- *
- * Output parameters:
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_port_delete(
- Objects_Id id
-)
-{
- register Dual_ported_memory_Control *the_port;
- Objects_Locations location;
-
- the_port = _Dual_ported_memory_Get( id, &location );
- switch ( location ) {
- case OBJECTS_REMOTE: /* this error cannot be returned */
- return RTEMS_INTERNAL_ERROR;
-
- case OBJECTS_ERROR:
- return RTEMS_INVALID_ID;
-
- case OBJECTS_LOCAL:
- _Objects_Close( &_Dual_ported_memory_Information, &the_port->Object );
- _Dual_ported_memory_Free( the_port );
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
- }
-
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
-}
diff --git a/cpukit/rtems/src/dpmemexternal2internal.c b/cpukit/rtems/src/dpmemexternal2internal.c
deleted file mode 100644
index 92407a3b55..0000000000
--- a/cpukit/rtems/src/dpmemexternal2internal.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Dual Port Memory Manager
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/score/address.h>
-#include <rtems/rtems/dpmem.h>
-#include <rtems/score/object.h>
-#include <rtems/score/thread.h>
-#include <rtems/rtems/dpmem.h>
-
-/*PAGE
- *
- * rtems_port_external_to_internal
- *
- * This directive converts an external dual-ported memory address to an
- * internal dual-ported memory address. If the given external address
- * is an invalid dual-ported address, then the internal address is set
- * to the given external address.
- *
- * Input parameters:
- * id - id of dp memory object
- * external - external address
- * internal - pointer of internal address to set
- *
- * Output parameters:
- * internal - internal address
- * RTEMS_SUCCESSFUL - always succeeds
- */
-
-rtems_status_code rtems_port_external_to_internal(
- Objects_Id id,
- void *external,
- void **internal
-)
-{
- register Dual_ported_memory_Control *the_port;
- Objects_Locations location;
- unsigned32 ending;
-
- the_port = _Dual_ported_memory_Get( id, &location );
- switch ( location ) {
- case OBJECTS_REMOTE: /* this error cannot be returned */
- return RTEMS_INTERNAL_ERROR;
-
- case OBJECTS_ERROR:
- return RTEMS_INVALID_ID;
-
- case OBJECTS_LOCAL:
- ending = _Addresses_Subtract( external, the_port->external_base );
- if ( ending > the_port->length )
- *internal = external;
- else
- *internal = _Addresses_Add_offset( the_port->internal_base,
- ending );
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
- }
-
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
-}
diff --git a/cpukit/rtems/src/dpmemident.c b/cpukit/rtems/src/dpmemident.c
deleted file mode 100644
index cdfd42abd1..0000000000
--- a/cpukit/rtems/src/dpmemident.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Dual Port Memory Manager
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/score/address.h>
-#include <rtems/rtems/dpmem.h>
-#include <rtems/score/object.h>
-#include <rtems/score/thread.h>
-#include <rtems/rtems/dpmem.h>
-
-/*PAGE
- *
- * rtems_port_ident
- *
- * This directive returns the system ID associated with
- * the port name.
- *
- * Input parameters:
- * name - user defined port name
- * id - pointer to port id
- *
- * Output parameters:
- * *id - port id
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_port_ident(
- rtems_name name,
- Objects_Id *id
-)
-{
- Objects_Name_to_id_errors status;
-
- status = _Objects_Name_to_id(
- &_Dual_ported_memory_Information,
- &name,
- OBJECTS_SEARCH_ALL_NODES,
- id
- );
-
- return _Status_Object_name_errors_to_status[ status ];
-}
diff --git a/cpukit/rtems/src/dpmeminternal2external.c b/cpukit/rtems/src/dpmeminternal2external.c
deleted file mode 100644
index 23bc02e43f..0000000000
--- a/cpukit/rtems/src/dpmeminternal2external.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Dual Port Memory Manager
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/score/address.h>
-#include <rtems/rtems/dpmem.h>
-#include <rtems/score/object.h>
-#include <rtems/score/thread.h>
-#include <rtems/rtems/dpmem.h>
-
-/*PAGE
- *
- * rtems_port_internal_to_external
- *
- * This directive converts an internal dual-ported memory address to an
- * external dual-ported memory address. If the given internal address
- * is an invalid dual-ported address, then the external address is set
- * to the given internal address.
- *
- * Input parameters:
- * id - id of dual-ported memory object
- * internal - internal address to set
- * external - pointer to external address
- *
- * Output parameters:
- * external - external address
- * RTEMS_SUCCESSFUL - always succeeds
- */
-
-rtems_status_code rtems_port_internal_to_external(
- Objects_Id id,
- void *internal,
- void **external
-)
-{
- register Dual_ported_memory_Control *the_port;
- Objects_Locations location;
- unsigned32 ending;
-
- the_port = _Dual_ported_memory_Get( id, &location );
- switch ( location ) {
- case OBJECTS_REMOTE: /* this error cannot be returned */
- return RTEMS_INTERNAL_ERROR;
-
- case OBJECTS_ERROR:
- return RTEMS_INVALID_ID;
-
- case OBJECTS_LOCAL:
- ending = _Addresses_Subtract( internal, the_port->internal_base );
- if ( ending > the_port->length )
- *external = internal;
- else
- *external = _Addresses_Add_offset( the_port->external_base,
- ending );
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
- }
-
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
-}
diff --git a/cpukit/rtems/src/event.c b/cpukit/rtems/src/event.c
deleted file mode 100644
index f11cd8c167..0000000000
--- a/cpukit/rtems/src/event.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Event Manager
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/event.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/rtems/tasks.h>
-
-/*PAGE
- *
- * _Event_Manager_initialization
- *
- * DESCRIPTION:
- *
- * This routine performs the initialization necessary for this manager.
- */
-
-void _Event_Manager_initialization( void )
-{
- _Event_Sync_state = EVENT_SYNC_SYNCHRONIZED;
-
- /*
- * Register the MP Process Packet routine.
- */
-
-#if defined(RTEMS_MULTIPROCESSING)
- _MPCI_Register_packet_processor( MP_PACKET_EVENT, _Event_MP_Process_packet );
-#endif
-}
diff --git a/cpukit/rtems/src/eventmp.c b/cpukit/rtems/src/eventmp.c
deleted file mode 100644
index 13fb4f7abd..0000000000
--- a/cpukit/rtems/src/eventmp.c
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- * Multiprocessing Support for the Event Manager
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/event.h>
-#include <rtems/score/mpci.h>
-#include <rtems/score/mppkt.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/rtems/support.h>
-
-/*PAGE
- *
- * _Event_MP_Send_process_packet
- *
- * This subprogram is not needed since there are no process
- * packets to be sent by this manager.
- *
- */
-
-/*PAGE
- *
- * _Event_MP_Send_request_packet
- *
- */
-
-rtems_status_code _Event_MP_Send_request_packet (
- Event_MP_Remote_operations operation,
- Objects_Id event_id,
- rtems_event_set event_in
-)
-{
- Event_MP_Packet *the_packet;
-
- switch ( operation ) {
-
- case EVENT_MP_SEND_REQUEST:
-
- the_packet = _Event_MP_Get_packet();
- the_packet->Prefix.the_class = MP_PACKET_EVENT;
- the_packet->Prefix.length = sizeof ( Event_MP_Packet );
- the_packet->Prefix.to_convert = sizeof ( Event_MP_Packet );
- the_packet->operation = operation;
- the_packet->Prefix.id = event_id;
- the_packet->event_in = event_in;
-
- return (rtems_status_code)
- _MPCI_Send_request_packet(
- rtems_get_node( event_id ),
- &the_packet->Prefix,
- STATES_READY
- );
-
- break;
-
- case EVENT_MP_SEND_RESPONSE:
- break;
-
- }
- /*
- * The following line is included to satisfy compilers which
- * produce warnings when a function does not end with a return.
- */
- return RTEMS_SUCCESSFUL;
-}
-
-/*PAGE
- *
- * _Event_MP_Send_response_packet
- *
- */
-
-void _Event_MP_Send_response_packet (
- Event_MP_Remote_operations operation,
- Thread_Control *the_thread
-)
-{
- Event_MP_Packet *the_packet;
-
- switch ( operation ) {
-
- case EVENT_MP_SEND_RESPONSE:
-
- the_packet = ( Event_MP_Packet *) the_thread->receive_packet;
-
-/*
- * The packet being returned already contains the class, length, and
- * to_convert fields, therefore they are not set in this routine.
- */
- the_packet->operation = operation;
- the_packet->Prefix.id = the_packet->Prefix.source_tid;
-
- _MPCI_Send_response_packet(
- rtems_get_node( the_packet->Prefix.source_tid ),
- &the_packet->Prefix
- );
- break;
-
- case EVENT_MP_SEND_REQUEST:
- break;
-
- }
-}
-
-/*PAGE
- *
- *
- * _Event_MP_Process_packet
- *
- */
-
-void _Event_MP_Process_packet (
- rtems_packet_prefix *the_packet_prefix
-)
-{
- Event_MP_Packet *the_packet;
- Thread_Control *the_thread;
-
- the_packet = (Event_MP_Packet *) the_packet_prefix;
-
- switch ( the_packet->operation ) {
-
- case EVENT_MP_SEND_REQUEST:
-
- the_packet->Prefix.return_code = rtems_event_send(
- the_packet->Prefix.id,
- the_packet->event_in
- );
-
- _Event_MP_Send_response_packet(
- EVENT_MP_SEND_RESPONSE,
- _Thread_Executing
- );
- break;
-
- case EVENT_MP_SEND_RESPONSE:
-
- the_thread = _MPCI_Process_response( the_packet_prefix );
-
- _MPCI_Return_packet( the_packet_prefix );
-
- break;
-
- }
-}
-
-/*PAGE
- *
- * _Event_MP_Send_object_was_deleted
- *
- * This subprogram is not needed since there are no objects
- * deleted by this manager.
- *
- */
-
-/*PAGE
- *
- * _Event_MP_Send_extract_proxy
- *
- * This subprogram is not needed since there are no objects
- * deleted by this manager.
- *
- */
-
-/*PAGE
- *
- * _Event_MP_Get_packet
- *
- */
-
-Event_MP_Packet *_Event_MP_Get_packet ( void )
-{
- return ( (Event_MP_Packet *) _MPCI_Get_packet() );
-}
-
-/* end of file */
diff --git a/cpukit/rtems/src/eventreceive.c b/cpukit/rtems/src/eventreceive.c
deleted file mode 100644
index 7b8f477ea0..0000000000
--- a/cpukit/rtems/src/eventreceive.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Event Manager
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/event.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/rtems/tasks.h>
-
-/*PAGE
- *
- * rtems_event_receive
- *
- * This directive allows a thread to receive a set of events.
- *
- * Input parameters:
- * event_in - input event condition
- * option_set - options
- * ticks - number of ticks to wait (0 means wait forever)
- * event_out - pointer to output event set
- *
- * Output parameters:
- * event out - event set
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_event_receive(
- rtems_event_set event_in,
- rtems_option option_set,
- rtems_interval ticks,
- rtems_event_set *event_out
-)
-{
- RTEMS_API_Control *api;
-
- api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
-
- if ( _Event_sets_Is_empty( event_in ) ) {
- *event_out = api->pending_events;
- return RTEMS_SUCCESSFUL;
- }
-
- _Thread_Disable_dispatch();
- _Event_Seize( event_in, option_set, ticks, event_out );
- _Thread_Enable_dispatch();
- return( _Thread_Executing->Wait.return_code );
-}
diff --git a/cpukit/rtems/src/eventseize.c b/cpukit/rtems/src/eventseize.c
deleted file mode 100644
index ca41c65b6a..0000000000
--- a/cpukit/rtems/src/eventseize.c
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Event Manager
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/event.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/rtems/tasks.h>
-
-/*PAGE
- *
- * _Event_Seize
- *
- * This routine attempts to satisfy the requested event condition
- * for the running thread.
- *
- * Input parameters:
- * event_in - the event condition to satisfy
- * option_set - acquire event options
- * ticks - interval to wait
- * event_out - pointer to event set output area
- *
- * Output parameters: NONE
- * *event_out - event set output area filled in
- *
- * INTERRUPT LATENCY:
- * available
- * wait
- * check sync
- */
-
-void _Event_Seize(
- rtems_event_set event_in,
- rtems_option option_set,
- rtems_interval ticks,
- rtems_event_set *event_out
-)
-{
- Thread_Control *executing;
- rtems_event_set seized_events;
- rtems_event_set pending_events;
- ISR_Level level;
- RTEMS_API_Control *api;
- Event_Sync_states sync_state;
-
- executing = _Thread_Executing;
- executing->Wait.return_code = RTEMS_SUCCESSFUL;
-
- api = executing->API_Extensions[ THREAD_API_RTEMS ];
-
- _ISR_Disable( level );
- pending_events = api->pending_events;
- seized_events = _Event_sets_Get( pending_events, event_in );
-
- if ( !_Event_sets_Is_empty( seized_events ) &&
- (seized_events == event_in || _Options_Is_any( option_set )) ) {
- api->pending_events =
- _Event_sets_Clear( pending_events, seized_events );
- _ISR_Enable( level );
- *event_out = seized_events;
- return;
- }
-
- if ( _Options_Is_no_wait( option_set ) ) {
- _ISR_Enable( level );
- executing->Wait.return_code = RTEMS_UNSATISFIED;
- *event_out = seized_events;
- return;
- }
-
- _Event_Sync_state = EVENT_SYNC_NOTHING_HAPPENED;
-
- executing->Wait.option = (unsigned32) option_set;
- executing->Wait.count = (unsigned32) event_in;
- executing->Wait.return_argument = event_out;
-
- _ISR_Enable( level );
-
- if ( ticks ) {
- _Watchdog_Initialize(
- &executing->Timer,
- _Event_Timeout,
- executing->Object.id,
- NULL
- );
- _Watchdog_Insert_ticks( &executing->Timer, ticks );
- }
-
- _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
-
- _ISR_Disable( level );
-
- sync_state = _Event_Sync_state;
- _Event_Sync_state = EVENT_SYNC_SYNCHRONIZED;
-
- switch ( sync_state ) {
- case EVENT_SYNC_SYNCHRONIZED:
- /*
- * This cannot happen. It indicates that this routine did not
- * enter the synchronization states above.
- */
- return;
-
- case EVENT_SYNC_NOTHING_HAPPENED:
- _ISR_Enable( level );
- return;
-
- case EVENT_SYNC_TIMEOUT:
- executing->Wait.return_code = RTEMS_TIMEOUT;
- _ISR_Enable( level );
- _Thread_Unblock( executing );
- return;
-
- case EVENT_SYNC_SATISFIED:
- if ( _Watchdog_Is_active( &executing->Timer ) ) {
- _Watchdog_Deactivate( &executing->Timer );
- _ISR_Enable( level );
- (void) _Watchdog_Remove( &executing->Timer );
- } else
- _ISR_Enable( level );
- _Thread_Unblock( executing );
- return;
- }
-}
diff --git a/cpukit/rtems/src/eventsend.c b/cpukit/rtems/src/eventsend.c
deleted file mode 100644
index 62a5b48162..0000000000
--- a/cpukit/rtems/src/eventsend.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Event Manager
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/event.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/rtems/tasks.h>
-
-/*PAGE
- *
- * rtems_event_send
- *
- * This directive allows a thread send an event set to another thread.
- *
- * Input parameters:
- * id - thread id
- * event - event set
- *
- * Output parameters:
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_event_send(
- Objects_Id id,
- rtems_event_set event_in
-)
-{
- register Thread_Control *the_thread;
- Objects_Locations location;
- RTEMS_API_Control *api;
-
- the_thread = _Thread_Get( id, &location );
- switch ( location ) {
- case OBJECTS_REMOTE:
-#if defined(RTEMS_MULTIPROCESSING)
- return(
- _Event_MP_Send_request_packet(
- EVENT_MP_SEND_REQUEST,
- id,
- event_in
- )
- );
-#endif
- case OBJECTS_ERROR:
- return RTEMS_INVALID_ID;
- case OBJECTS_LOCAL:
- api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
- _Event_sets_Post( event_in, &api->pending_events );
- _Event_Surrender( the_thread );
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
- }
-
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
-}
diff --git a/cpukit/rtems/src/eventsurrender.c b/cpukit/rtems/src/eventsurrender.c
deleted file mode 100644
index 7785bb6395..0000000000
--- a/cpukit/rtems/src/eventsurrender.c
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Event Manager
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/event.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/rtems/tasks.h>
-
-/*PAGE
- *
- * _Event_Surrender
- *
- * This routines remove a thread from the specified threadq.
- *
- * Input parameters:
- * the_thread - pointer to thread to be dequeued
- *
- * Output parameters: NONE
- *
- * INTERRUPT LATENCY:
- * before flash
- * after flash
- * check sync
- */
-
-void _Event_Surrender(
- Thread_Control *the_thread
-)
-{
- ISR_Level level;
- rtems_event_set pending_events;
- rtems_event_set event_condition;
- rtems_event_set seized_events;
- rtems_option option_set;
- RTEMS_API_Control *api;
-
- api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
-
- option_set = (rtems_option) the_thread->Wait.option;
-
- _ISR_Disable( level );
- pending_events = api->pending_events;
- event_condition = (rtems_event_set) the_thread->Wait.count;
-
- seized_events = _Event_sets_Get( pending_events, event_condition );
-
- if ( !_Event_sets_Is_empty( seized_events ) ) {
- if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
- if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
- api->pending_events =
- _Event_sets_Clear( pending_events, seized_events );
- *(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
-
- _ISR_Flash( level );
-
- if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
- _ISR_Enable( level );
- _Thread_Unblock( the_thread );
- }
- else {
- _Watchdog_Deactivate( &the_thread->Timer );
- _ISR_Enable( level );
- (void) _Watchdog_Remove( &the_thread->Timer );
- _Thread_Unblock( the_thread );
- }
- return;
- }
- }
-
- switch ( _Event_Sync_state ) {
- case EVENT_SYNC_SYNCHRONIZED:
- case EVENT_SYNC_SATISFIED:
- break;
-
- case EVENT_SYNC_NOTHING_HAPPENED:
- case EVENT_SYNC_TIMEOUT:
- if ( !_Thread_Is_executing( the_thread ) )
- break;
-
- if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
- api->pending_events =
- _Event_sets_Clear( pending_events,seized_events );
- *(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
- _Event_Sync_state = EVENT_SYNC_SATISFIED;
- }
- break;
- }
- }
- _ISR_Enable( level );
-}
diff --git a/cpukit/rtems/src/eventtimeout.c b/cpukit/rtems/src/eventtimeout.c
deleted file mode 100644
index bb5eaa403c..0000000000
--- a/cpukit/rtems/src/eventtimeout.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Event Manager
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/event.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/rtems/tasks.h>
-
-/*PAGE
- *
- * _Event_Timeout
- *
- * This routine processes a thread which timeouts while waiting to
- * receive an event_set. It is called by the watchdog handler.
- *
- * Input parameters:
- * id - thread id
- *
- * Output parameters: NONE
- */
-
-void _Event_Timeout(
- Objects_Id id,
- void *ignored
-)
-{
- Thread_Control *the_thread;
- Objects_Locations location;
-
- the_thread = _Thread_Get( id, &location );
- switch ( location ) {
- case OBJECTS_REMOTE: /* impossible */
- case OBJECTS_ERROR:
- break;
- case OBJECTS_LOCAL:
-
- /*
- * If the event manager is not synchronized, then it is either
- * "nothing happened", "timeout", or "satisfied". If the_thread
- * is the executing thread, then it is in the process of blocking
- * and it is the thread which is responsible for the synchronization
- * process.
- *
- * If it is not satisfied, then it is "nothing happened" and
- * this is the "timeout" transition. After a request is satisfied,
- * a timeout is not allowed to occur.
- */
-
- if ( _Event_Sync_state != EVENT_SYNC_SYNCHRONIZED &&
- _Thread_Is_executing( the_thread ) ) {
- if ( _Event_Sync_state != EVENT_SYNC_SATISFIED )
- _Event_Sync_state = EVENT_SYNC_TIMEOUT;
- } else {
- the_thread->Wait.return_code = RTEMS_TIMEOUT;
- _Thread_Unblock( the_thread );
- }
- _Thread_Unnest_dispatch();
- break;
- }
-}
diff --git a/cpukit/rtems/src/intr.c b/cpukit/rtems/src/intr.c
deleted file mode 100644
index 9663e7cfb0..0000000000
--- a/cpukit/rtems/src/intr.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Interrupt Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/score/isr.h>
-#include <rtems/rtems/intr.h>
-
-/* _Interrupt_Manager_initialization
- *
- * This routine initializes the interrupt manager.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- */
-
-void _Interrupt_Manager_initialization( void )
-{
-}
diff --git a/cpukit/rtems/src/intrbody.c b/cpukit/rtems/src/intrbody.c
deleted file mode 100644
index 4a265d5c1f..0000000000
--- a/cpukit/rtems/src/intrbody.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Bodies for Inlined Interrupt Manager Routines
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/score/isr.h>
-#include <rtems/rtems/intr.h>
-
-/*
- * Real body for rtems_interrupt_disable
- */
-
-#undef rtems_interrupt_disable
-
-rtems_interrupt_level rtems_interrupt_disable( void )
-{
- rtems_interrupt_level previous_level;
-
- _ISR_Disable( previous_level );
-
- return previous_level;
-}
-
-/*
- * Real body for rtems_interrupt_enable
- */
-
-#undef rtems_interrupt_enable
-
-void rtems_interrupt_enable(
- rtems_interrupt_level previous_level
-)
-{
- _ISR_Enable( previous_level );
-}
-
-/*
- * Real body for rtems_interrupt_flash
- */
-
-#undef rtems_interrupt_flash
-
-void rtems_interrupt_flash(
- rtems_interrupt_level previous_level
-)
-{
- _ISR_Flash( previous_level );
-}
-
-/*
- * Real body for rtems_interrupt_is_in_progress
- */
-
-#undef rtems_interrupt_is_in_progress
-
-boolean rtems_interrupt_is_in_progress( void )
-{
- return _ISR_Is_in_progress();
-}
diff --git a/cpukit/rtems/src/intrcatch.c b/cpukit/rtems/src/intrcatch.c
deleted file mode 100644
index 4b68d5dbfd..0000000000
--- a/cpukit/rtems/src/intrcatch.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Interrupt Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/score/isr.h>
-#include <rtems/rtems/intr.h>
-
-/* rtems_interrupt_catch
- *
- * This directive allows a thread to specify what action to take when
- * catching signals.
- *
- * Input parameters:
- * new_isr_handler - address of interrupt service routine (isr)
- * vector - interrupt vector number
- * old_isr_handler - address at which to store previous ISR address
- *
- * Output parameters:
- * RTEMS_SUCCESSFUL - always succeeds
- * *old_isr_handler - previous ISR address
- */
-
-rtems_status_code rtems_interrupt_catch(
- rtems_isr_entry new_isr_handler,
- rtems_vector_number vector,
- rtems_isr_entry *old_isr_handler
-)
-{
- if ( !_ISR_Is_vector_number_valid( vector ) )
- return RTEMS_INVALID_NUMBER;
-
- if ( !_ISR_Is_valid_user_handler( (void *) new_isr_handler ) )
- return RTEMS_INVALID_ADDRESS;
-
- if ( !_ISR_Is_valid_user_handler( (void *) old_isr_handler ) )
- return RTEMS_INVALID_ADDRESS;
-
- _ISR_Install_vector(
- vector, (proc_ptr)new_isr_handler, (proc_ptr *)old_isr_handler );
-
- return RTEMS_SUCCESSFUL;
-}
diff --git a/cpukit/rtems/src/mp.c b/cpukit/rtems/src/mp.c
deleted file mode 100644
index d6e575cfc0..0000000000
--- a/cpukit/rtems/src/mp.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Multiprocessing Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/mp.h>
-#include <rtems/score/mpci.h>
-
-/*PAGE
- *
- * _Multiprocessing_Manager_initialization
- *
- */
-
-void _Multiprocessing_Manager_initialization ( void )
-{
-}
-
-/*PAGE
- *
- * rtems_multiprocessing_announce
- *
- */
-
-void rtems_multiprocessing_announce ( void )
-{
- _MPCI_Announce();
-}
-
-/* end of file */
diff --git a/cpukit/rtems/src/msg.c b/cpukit/rtems/src/msg.c
deleted file mode 100644
index 4e68b175b3..0000000000
--- a/cpukit/rtems/src/msg.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Message Queue Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/coremsg.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/attr.h>
-#include <rtems/rtems/message.h>
-#include <rtems/rtems/options.h>
-#include <rtems/rtems/support.h>
-
-/*PAGE
- *
- * _Message_queue_Manager_initialization
- *
- * This routine initializes all message queue manager related
- * data structures.
- *
- * Input parameters:
- * maximum_message_queues - number of message queues to initialize
- *
- * Output parameters: NONE
- */
-
-void _Message_queue_Manager_initialization(
- unsigned32 maximum_message_queues
-)
-{
- _Objects_Initialize_information(
- &_Message_queue_Information,
- OBJECTS_RTEMS_MESSAGE_QUEUES,
- TRUE,
- maximum_message_queues,
- sizeof( Message_queue_Control ),
- FALSE,
- RTEMS_MAXIMUM_NAME_LENGTH,
- FALSE
- );
-
- /*
- * Register the MP Process Packet routine.
- */
-
-#if defined(RTEMS_MULTIPROCESSING)
- _MPCI_Register_packet_processor(
- MP_PACKET_MESSAGE_QUEUE,
- _Message_queue_MP_Process_packet
- );
-#endif
-
-}
diff --git a/cpukit/rtems/src/msgmp.c b/cpukit/rtems/src/msgmp.c
deleted file mode 100644
index 6d48ff4955..0000000000
--- a/cpukit/rtems/src/msgmp.c
+++ /dev/null
@@ -1,504 +0,0 @@
-/*
- * Multiprocessing Support for the Message Queue Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/message.h>
-#include <rtems/score/mpci.h>
-#include <rtems/rtems/msgmp.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/rtems/support.h>
-
-/*PAGE
- *
- * _Message_queue_MP_Send_process_packet
- *
- */
-
-void _Message_queue_MP_Send_process_packet (
- Message_queue_MP_Remote_operations operation,
- Objects_Id message_queue_id,
- rtems_name name,
- Objects_Id proxy_id
-)
-{
- Message_queue_MP_Packet *the_packet;
- unsigned32 node;
-
- switch ( operation ) {
-
- case MESSAGE_QUEUE_MP_ANNOUNCE_CREATE:
- case MESSAGE_QUEUE_MP_ANNOUNCE_DELETE:
- case MESSAGE_QUEUE_MP_EXTRACT_PROXY:
-
- the_packet = _Message_queue_MP_Get_packet();
- the_packet->Prefix.the_class = MP_PACKET_MESSAGE_QUEUE;
- the_packet->Prefix.length = sizeof ( Message_queue_MP_Packet );
- the_packet->Prefix.to_convert = sizeof ( Message_queue_MP_Packet );
- the_packet->operation = operation;
- the_packet->Prefix.id = message_queue_id;
- the_packet->name = name;
- the_packet->proxy_id = proxy_id;
-
- if ( operation == MESSAGE_QUEUE_MP_EXTRACT_PROXY )
- node = rtems_get_node( message_queue_id );
- else
- node = MPCI_ALL_NODES;
-
- _MPCI_Send_process_packet( node, &the_packet->Prefix );
- break;
-
- case MESSAGE_QUEUE_MP_RECEIVE_REQUEST:
- case MESSAGE_QUEUE_MP_RECEIVE_RESPONSE:
- case MESSAGE_QUEUE_MP_SEND_REQUEST:
- case MESSAGE_QUEUE_MP_SEND_RESPONSE:
- case MESSAGE_QUEUE_MP_URGENT_REQUEST:
- case MESSAGE_QUEUE_MP_URGENT_RESPONSE:
- case MESSAGE_QUEUE_MP_BROADCAST_REQUEST:
- case MESSAGE_QUEUE_MP_BROADCAST_RESPONSE:
- case MESSAGE_QUEUE_MP_FLUSH_REQUEST:
- case MESSAGE_QUEUE_MP_FLUSH_RESPONSE:
- case MESSAGE_QUEUE_MP_GET_NUMBER_PENDING_REQUEST:
- case MESSAGE_QUEUE_MP_GET_NUMBER_PENDING_RESPONSE:
- break;
-
- }
-}
-
-/*PAGE
- *
- * _Message_queue_MP_Send_request_packet
- *
- */
-
-rtems_status_code _Message_queue_MP_Send_request_packet (
- Message_queue_MP_Remote_operations operation,
- Objects_Id message_queue_id,
- void *buffer,
- unsigned32 *size_p,
- rtems_option option_set,
- rtems_interval timeout
-)
-{
- Message_queue_MP_Packet *the_packet;
-
- switch ( operation ) {
-
- case MESSAGE_QUEUE_MP_SEND_REQUEST:
- case MESSAGE_QUEUE_MP_URGENT_REQUEST:
- case MESSAGE_QUEUE_MP_BROADCAST_REQUEST:
- case MESSAGE_QUEUE_MP_FLUSH_REQUEST:
- case MESSAGE_QUEUE_MP_GET_NUMBER_PENDING_REQUEST:
-
- the_packet = _Message_queue_MP_Get_packet();
- the_packet->Prefix.the_class = MP_PACKET_MESSAGE_QUEUE;
- the_packet->Prefix.length = sizeof(Message_queue_MP_Packet);
- if ( size_p )
- the_packet->Prefix.length += *size_p;
- the_packet->Prefix.to_convert = sizeof(Message_queue_MP_Packet);
-
- /*
- * make sure message is not too big for our MPCI driver
- * We have to check it here instead of waiting for MPCI because
- * we are about to slam in the payload
- */
-
- if (the_packet->Prefix.length > _MPCI_table->maximum_packet_size) {
- _Thread_Enable_dispatch();
- return RTEMS_INVALID_SIZE;
- }
-
- if (! _Options_Is_no_wait(option_set))
- the_packet->Prefix.timeout = timeout;
-
- the_packet->operation = operation;
- the_packet->Prefix.id = message_queue_id;
- the_packet->option_set = option_set;
-
- /*
- * Copy the data into place if needed
- */
-
- if (buffer) {
- the_packet->Buffer.size = *size_p;
- _CORE_message_queue_Copy_buffer(
- buffer,
- the_packet->Buffer.buffer,
- *size_p
- );
- }
-
- return (rtems_status_code) _MPCI_Send_request_packet(
- rtems_get_node(message_queue_id),
- &the_packet->Prefix,
- STATES_WAITING_FOR_MESSAGE
- );
- break;
-
- case MESSAGE_QUEUE_MP_RECEIVE_REQUEST:
-
- the_packet = _Message_queue_MP_Get_packet();
- the_packet->Prefix.the_class = MP_PACKET_MESSAGE_QUEUE;
- the_packet->Prefix.length = sizeof(Message_queue_MP_Packet);
- the_packet->Prefix.to_convert = sizeof(Message_queue_MP_Packet);
-
- if (! _Options_Is_no_wait(option_set))
- the_packet->Prefix.timeout = timeout;
-
- the_packet->operation = MESSAGE_QUEUE_MP_RECEIVE_REQUEST;
- the_packet->Prefix.id = message_queue_id;
- the_packet->option_set = option_set;
- the_packet->size = 0; /* just in case of an error */
-
- _Thread_Executing->Wait.return_argument = (unsigned32 *)buffer;
- _Thread_Executing->Wait.return_argument_1 = size_p;
-
- return (rtems_status_code) _MPCI_Send_request_packet(
- rtems_get_node(message_queue_id),
- &the_packet->Prefix,
- STATES_WAITING_FOR_MESSAGE
- );
- break;
-
- case MESSAGE_QUEUE_MP_ANNOUNCE_CREATE:
- case MESSAGE_QUEUE_MP_ANNOUNCE_DELETE:
- case MESSAGE_QUEUE_MP_EXTRACT_PROXY:
- case MESSAGE_QUEUE_MP_RECEIVE_RESPONSE:
- case MESSAGE_QUEUE_MP_SEND_RESPONSE:
- case MESSAGE_QUEUE_MP_URGENT_RESPONSE:
- case MESSAGE_QUEUE_MP_BROADCAST_RESPONSE:
- case MESSAGE_QUEUE_MP_FLUSH_RESPONSE:
- case MESSAGE_QUEUE_MP_GET_NUMBER_PENDING_RESPONSE:
- break;
- }
-
- return RTEMS_SUCCESSFUL;
-}
-
-/*PAGE
- *
- * _Message_queue_MP_Send_response_packet
- *
- */
-
-void _Message_queue_MP_Send_response_packet (
- Message_queue_MP_Remote_operations operation,
- Objects_Id message_queue_id,
- Thread_Control *the_thread
-)
-{
- Message_queue_MP_Packet *the_packet;
-
- switch ( operation ) {
-
- case MESSAGE_QUEUE_MP_RECEIVE_RESPONSE:
- case MESSAGE_QUEUE_MP_SEND_RESPONSE:
- case MESSAGE_QUEUE_MP_URGENT_RESPONSE:
- case MESSAGE_QUEUE_MP_BROADCAST_RESPONSE:
- case MESSAGE_QUEUE_MP_FLUSH_RESPONSE:
- case MESSAGE_QUEUE_MP_GET_NUMBER_PENDING_RESPONSE:
-
- the_packet = ( Message_queue_MP_Packet *) the_thread->receive_packet;
-
-/*
- * The packet being returned already contains the class, length, and
- * to_convert fields, therefore they are not set in this routine.
- *
- * Exception: MESSAGE_QUEUE_MP_RECEIVE_RESPONSE needs payload length
- * added to 'length'
- */
- the_packet->operation = operation;
- the_packet->Prefix.id = the_packet->Prefix.source_tid;
-
- if (operation == MESSAGE_QUEUE_MP_RECEIVE_RESPONSE)
- the_packet->Prefix.length += the_packet->size;
-
- _MPCI_Send_response_packet(
- rtems_get_node( the_packet->Prefix.source_tid ),
- &the_packet->Prefix
- );
- break;
-
- case MESSAGE_QUEUE_MP_ANNOUNCE_CREATE:
- case MESSAGE_QUEUE_MP_ANNOUNCE_DELETE:
- case MESSAGE_QUEUE_MP_EXTRACT_PROXY:
- case MESSAGE_QUEUE_MP_RECEIVE_REQUEST:
- case MESSAGE_QUEUE_MP_SEND_REQUEST:
- case MESSAGE_QUEUE_MP_URGENT_REQUEST:
- case MESSAGE_QUEUE_MP_BROADCAST_REQUEST:
- case MESSAGE_QUEUE_MP_FLUSH_REQUEST:
- case MESSAGE_QUEUE_MP_GET_NUMBER_PENDING_REQUEST:
- break;
-
- }
-}
-
-/*PAGE
- *
- *
- * _Message_queue_MP_Process_packet
- *
- */
-
-void _Message_queue_MP_Process_packet (
- rtems_packet_prefix *the_packet_prefix
-)
-{
- Message_queue_MP_Packet *the_packet;
- Thread_Control *the_thread;
- boolean ignored;
-
- the_packet = (Message_queue_MP_Packet *) the_packet_prefix;
-
- switch ( the_packet->operation ) {
-
- case MESSAGE_QUEUE_MP_ANNOUNCE_CREATE:
-
- ignored = _Objects_MP_Allocate_and_open(
- &_Message_queue_Information,
- the_packet->name,
- the_packet->Prefix.id,
- TRUE
- );
-
- _MPCI_Return_packet( the_packet_prefix );
- break;
-
- case MESSAGE_QUEUE_MP_ANNOUNCE_DELETE:
-
- _Objects_MP_Close( &_Message_queue_Information, the_packet->Prefix.id );
-
- _MPCI_Return_packet( the_packet_prefix );
- break;
-
- case MESSAGE_QUEUE_MP_EXTRACT_PROXY:
-
- the_thread = _Thread_MP_Find_proxy( the_packet->proxy_id );
-
- if (! _Thread_Is_null( the_thread ) )
- _Thread_queue_Extract( the_thread->Wait.queue, the_thread );
-
- _MPCI_Return_packet( the_packet_prefix );
- break;
-
- case MESSAGE_QUEUE_MP_RECEIVE_REQUEST:
-
- the_packet->Prefix.return_code = rtems_message_queue_receive(
- the_packet->Prefix.id,
- the_packet->Buffer.buffer,
- &the_packet->size,
- the_packet->option_set,
- the_packet->Prefix.timeout
- );
-
- if (! _Thread_Is_proxy_blocking( the_packet->Prefix.return_code ) )
- _Message_queue_MP_Send_response_packet(
- MESSAGE_QUEUE_MP_RECEIVE_RESPONSE,
- the_packet->Prefix.id,
- _Thread_Executing
- );
- break;
-
- case MESSAGE_QUEUE_MP_RECEIVE_RESPONSE:
-
- the_thread = _MPCI_Process_response( the_packet_prefix );
-
- if (the_packet->Prefix.return_code == RTEMS_SUCCESSFUL) {
- *(rtems_unsigned32 *)the_thread->Wait.return_argument_1 =
- the_packet->size;
-
- _CORE_message_queue_Copy_buffer(
- the_packet->Buffer.buffer,
- the_thread->Wait.return_argument,
- the_packet->size
- );
- }
-
- _MPCI_Return_packet( the_packet_prefix );
- break;
-
- case MESSAGE_QUEUE_MP_SEND_REQUEST:
-
- the_packet->Prefix.return_code = rtems_message_queue_send(
- the_packet->Prefix.id,
- the_packet->Buffer.buffer,
- the_packet->Buffer.size
- );
-
- _Message_queue_MP_Send_response_packet(
- MESSAGE_QUEUE_MP_SEND_RESPONSE,
- the_packet->Prefix.id,
- _Thread_Executing
- );
- break;
-
- case MESSAGE_QUEUE_MP_SEND_RESPONSE:
- case MESSAGE_QUEUE_MP_URGENT_RESPONSE:
-
- the_thread = _MPCI_Process_response( the_packet_prefix );
-
- _MPCI_Return_packet( the_packet_prefix );
- break;
-
- case MESSAGE_QUEUE_MP_URGENT_REQUEST:
-
- the_packet->Prefix.return_code = rtems_message_queue_urgent(
- the_packet->Prefix.id,
- the_packet->Buffer.buffer,
- the_packet->Buffer.size
- );
-
- _Message_queue_MP_Send_response_packet(
- MESSAGE_QUEUE_MP_URGENT_RESPONSE,
- the_packet->Prefix.id,
- _Thread_Executing
- );
- break;
-
- case MESSAGE_QUEUE_MP_BROADCAST_REQUEST:
-
- the_packet->Prefix.return_code = rtems_message_queue_broadcast(
- the_packet->Prefix.id,
- the_packet->Buffer.buffer,
- the_packet->Buffer.size,
- &the_packet->count
- );
-
- _Message_queue_MP_Send_response_packet(
- MESSAGE_QUEUE_MP_BROADCAST_RESPONSE,
- the_packet->Prefix.id,
- _Thread_Executing
- );
- break;
-
- case MESSAGE_QUEUE_MP_BROADCAST_RESPONSE:
- case MESSAGE_QUEUE_MP_FLUSH_RESPONSE:
- case MESSAGE_QUEUE_MP_GET_NUMBER_PENDING_RESPONSE:
-
- the_thread = _MPCI_Process_response( the_packet_prefix );
-
- *(unsigned32 *)the_thread->Wait.return_argument = the_packet->count;
-
- _MPCI_Return_packet( the_packet_prefix );
- break;
-
- case MESSAGE_QUEUE_MP_FLUSH_REQUEST:
-
- the_packet->Prefix.return_code = rtems_message_queue_flush(
- the_packet->Prefix.id,
- &the_packet->count
- );
-
- _Message_queue_MP_Send_response_packet(
- MESSAGE_QUEUE_MP_FLUSH_RESPONSE,
- the_packet->Prefix.id,
- _Thread_Executing
- );
- break;
-
- case MESSAGE_QUEUE_MP_GET_NUMBER_PENDING_REQUEST:
-
- the_packet->Prefix.return_code = rtems_message_queue_get_number_pending(
- the_packet->Prefix.id,
- &the_packet->count
- );
-
- _Message_queue_MP_Send_response_packet(
- MESSAGE_QUEUE_MP_GET_NUMBER_PENDING_RESPONSE,
- the_packet->Prefix.id,
- _Thread_Executing
- );
- break;
-
- }
-}
-
-/*PAGE
- *
- * _Message_queue_MP_Send_object_was_deleted
- *
- */
-
-void _Message_queue_MP_Send_object_was_deleted (
- Thread_Control *the_proxy
-)
-{
- the_proxy->receive_packet->return_code = RTEMS_OBJECT_WAS_DELETED;
-
- _Message_queue_MP_Send_response_packet(
- MESSAGE_QUEUE_MP_RECEIVE_RESPONSE,
- the_proxy->Wait.id,
- the_proxy
- );
-}
-
-/*PAGE
- *
- * _Message_queue_MP_Send_extract_proxy
- *
- */
-
-void _Message_queue_MP_Send_extract_proxy (
- Thread_Control *the_thread
-)
-{
- _Message_queue_MP_Send_process_packet(
- MESSAGE_QUEUE_MP_EXTRACT_PROXY,
- the_thread->Wait.id,
- (rtems_name) 0,
- the_thread->Object.id
- );
-}
-
-/*PAGE
- *
- * _Message_queue_MP_Get_packet
- *
- */
-
-Message_queue_MP_Packet *_Message_queue_MP_Get_packet ( void )
-{
- return ( (Message_queue_MP_Packet *) _MPCI_Get_packet() );
-}
-
-
-/*PAGE
- *
- * _Message_queue_Core_message_queue_mp_support
- *
- * Input parameters:
- * the_thread - the remote thread the message was submitted to
- * id - id of the message queue
- *
- * Output parameters: NONE
- */
-
-void _Message_queue_Core_message_queue_mp_support (
- Thread_Control *the_thread,
- Objects_Id id
-)
-{
- the_thread->receive_packet->return_code = RTEMS_SUCCESSFUL;
-
- _Message_queue_MP_Send_response_packet(
- MESSAGE_QUEUE_MP_RECEIVE_RESPONSE,
- id,
- the_thread
- );
-}
-
-/* end of file */
diff --git a/cpukit/rtems/src/msgqallocate.c b/cpukit/rtems/src/msgqallocate.c
deleted file mode 100644
index 6945a13415..0000000000
--- a/cpukit/rtems/src/msgqallocate.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Message Queue Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/coremsg.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/attr.h>
-#include <rtems/rtems/message.h>
-#include <rtems/rtems/options.h>
-#include <rtems/rtems/support.h>
-
-/*PAGE
- *
- * _Message_queue_Allocate
- *
- * Allocate a message queue and the space for its messages
- *
- * Input parameters:
- * the_message_queue - the message queue to allocate message buffers
- * count - maximum message and reserved buffer count
- * max_message_size - maximum size of each message
- *
- * Output parameters:
- * the_message_queue - set if successful, NULL otherwise
- */
-
-Message_queue_Control *_Message_queue_Allocate (
- unsigned32 count,
- unsigned32 max_message_size
-)
-{
- return
- (Message_queue_Control *)_Objects_Allocate(&_Message_queue_Information);
-
-}
diff --git a/cpukit/rtems/src/msgqbroadcast.c b/cpukit/rtems/src/msgqbroadcast.c
deleted file mode 100644
index bd79602b6b..0000000000
--- a/cpukit/rtems/src/msgqbroadcast.c
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Message Queue Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/coremsg.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/attr.h>
-#include <rtems/rtems/message.h>
-#include <rtems/rtems/options.h>
-#include <rtems/rtems/support.h>
-
-/*PAGE
- *
- * rtems_message_queue_broadcast
- *
- * This directive sends a message for every thread waiting on the queue
- * designated by id.
- *
- * Input parameters:
- * id - pointer to message queue
- * buffer - pointer to message buffer
- * size - size of message to broadcast
- * count - pointer to area to store number of threads made ready
- *
- * Output parameters:
- * count - number of threads made ready
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_message_queue_broadcast(
- Objects_Id id,
- void *buffer,
- unsigned32 size,
- unsigned32 *count
-)
-{
- register Message_queue_Control *the_message_queue;
- Objects_Locations location;
- CORE_message_queue_Status core_status;
-
- the_message_queue = _Message_queue_Get( id, &location );
- switch ( location ) {
- case OBJECTS_REMOTE:
-#if defined(RTEMS_MULTIPROCESSING)
- _Thread_Executing->Wait.return_argument = count;
-
- return
- _Message_queue_MP_Send_request_packet(
- MESSAGE_QUEUE_MP_BROADCAST_REQUEST,
- id,
- buffer,
- &size,
- 0, /* option_set not used */
- MPCI_DEFAULT_TIMEOUT
- );
-#endif
-
- case OBJECTS_ERROR:
- return RTEMS_INVALID_ID;
-
- case OBJECTS_LOCAL:
- core_status = _CORE_message_queue_Broadcast(
- &the_message_queue->message_queue,
- buffer,
- size,
- id,
-#if defined(RTEMS_MULTIPROCESSING)
- _Message_queue_Core_message_queue_mp_support,
-#else
- NULL,
-#endif
- count
- );
-
- _Thread_Enable_dispatch();
- return
- _Message_queue_Translate_core_message_queue_return_code( core_status );
-
- }
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
-}
diff --git a/cpukit/rtems/src/msgqcreate.c b/cpukit/rtems/src/msgqcreate.c
deleted file mode 100644
index 24bc35993d..0000000000
--- a/cpukit/rtems/src/msgqcreate.c
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * Message Queue Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/coremsg.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/attr.h>
-#include <rtems/rtems/message.h>
-#include <rtems/rtems/options.h>
-#include <rtems/rtems/support.h>
-
-/*PAGE
- *
- * rtems_message_queue_create
- *
- * This directive creates a message queue by allocating and initializing
- * a message queue data structure.
- *
- * Input parameters:
- * name - user defined queue name
- * count - maximum message and reserved buffer count
- * max_message_size - maximum size of each message
- * attribute_set - process method
- * id - pointer to queue
- *
- * Output parameters:
- * id - queue id
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_message_queue_create(
- rtems_name name,
- unsigned32 count,
- unsigned32 max_message_size,
- rtems_attribute attribute_set,
- Objects_Id *id
-)
-{
- register Message_queue_Control *the_message_queue;
- CORE_message_queue_Attributes the_msgq_attributes;
- void *handler;
-#if defined(RTEMS_MULTIPROCESSING)
- boolean is_global;
-#endif
-
- if ( !rtems_is_name_valid( name ) )
- return RTEMS_INVALID_NAME;
-
-#if defined(RTEMS_MULTIPROCESSING)
- if ( (is_global = _Attributes_Is_global( attribute_set ) ) &&
- !_System_state_Is_multiprocessing )
- return RTEMS_MP_NOT_CONFIGURED;
-#endif
-
- if ( count == 0 )
- return RTEMS_INVALID_NUMBER;
-
- if ( max_message_size == 0 )
- return RTEMS_INVALID_SIZE;
-
-#if defined(RTEMS_MULTIPROCESSING)
-#if 1
- /*
- * I am not 100% sure this should be an error.
- * It seems reasonable to create a que with a large max size,
- * and then just send smaller msgs from remote (or all) nodes.
- */
-
- if ( is_global && (_MPCI_table->maximum_packet_size < max_message_size) )
- return RTEMS_INVALID_SIZE;
-#endif
-#endif
-
- _Thread_Disable_dispatch(); /* protects object pointer */
-
- the_message_queue = _Message_queue_Allocate( count, max_message_size );
-
- if ( !the_message_queue ) {
- _Thread_Enable_dispatch();
- return RTEMS_TOO_MANY;
- }
-
-#if defined(RTEMS_MULTIPROCESSING)
- if ( is_global &&
- !( _Objects_MP_Allocate_and_open( &_Message_queue_Information,
- name, the_message_queue->Object.id, FALSE ) ) ) {
- _Message_queue_Free( the_message_queue );
- _Thread_Enable_dispatch();
- return RTEMS_TOO_MANY;
- }
-#endif
-
- the_message_queue->attribute_set = attribute_set;
-
- if (_Attributes_Is_priority( attribute_set ) )
- the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY;
- else
- the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO;
-
- handler = NULL;
-#if defined(RTEMS_MULTIPROCESSING)
- handler = _Message_queue_MP_Send_extract_proxy;
-#endif
-
- if ( ! _CORE_message_queue_Initialize(
- &the_message_queue->message_queue,
- OBJECTS_RTEMS_MESSAGE_QUEUES,
- &the_msgq_attributes,
- count,
- max_message_size,
- handler ) ) {
-#if defined(RTEMS_MULTIPROCESSING)
- if ( is_global )
- _Objects_MP_Close(
- &_Message_queue_Information, the_message_queue->Object.id);
-#endif
-
- _Message_queue_Free( the_message_queue );
- _Thread_Enable_dispatch();
- return RTEMS_TOO_MANY;
- }
-
- _Objects_Open(
- &_Message_queue_Information,
- &the_message_queue->Object,
- &name
- );
-
- *id = the_message_queue->Object.id;
-
-#if defined(RTEMS_MULTIPROCESSING)
- if ( is_global )
- _Message_queue_MP_Send_process_packet(
- MESSAGE_QUEUE_MP_ANNOUNCE_CREATE,
- the_message_queue->Object.id,
- name,
- 0
- );
-#endif
-
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
-}
diff --git a/cpukit/rtems/src/msgqdelete.c b/cpukit/rtems/src/msgqdelete.c
deleted file mode 100644
index 715fb7bced..0000000000
--- a/cpukit/rtems/src/msgqdelete.c
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Message Queue Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/coremsg.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/attr.h>
-#include <rtems/rtems/message.h>
-#include <rtems/rtems/options.h>
-#include <rtems/rtems/support.h>
-
-/*PAGE
- *
- * rtems_message_queue_delete
- *
- * This directive allows a thread to delete the message queue specified
- * by the given queue identifier.
- *
- * Input parameters:
- * id - queue id
- *
- * Output parameters:
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_message_queue_delete(
- Objects_Id id
-)
-{
- register Message_queue_Control *the_message_queue;
- Objects_Locations location;
-
- the_message_queue = _Message_queue_Get( id, &location );
- switch ( location ) {
-
- case OBJECTS_REMOTE:
-#if defined(RTEMS_MULTIPROCESSING)
- _Thread_Dispatch();
- return RTEMS_ILLEGAL_ON_REMOTE_OBJECT;
-#endif
-
- case OBJECTS_ERROR:
- return RTEMS_INVALID_ID;
-
- case OBJECTS_LOCAL:
- _Objects_Close( &_Message_queue_Information,
- &the_message_queue->Object );
-
- _CORE_message_queue_Close(
- &the_message_queue->message_queue,
-#if defined(RTEMS_MULTIPROCESSING)
- _Message_queue_MP_Send_object_was_deleted,
-#else
- NULL,
-#endif
- CORE_MESSAGE_QUEUE_STATUS_WAS_DELETED
- );
-
- _Message_queue_Free( the_message_queue );
-
-#if defined(RTEMS_MULTIPROCESSING)
- if ( _Attributes_Is_global( the_message_queue->attribute_set ) ) {
- _Objects_MP_Close(
- &_Message_queue_Information,
- the_message_queue->Object.id
- );
-
- _Message_queue_MP_Send_process_packet(
- MESSAGE_QUEUE_MP_ANNOUNCE_DELETE,
- the_message_queue->Object.id,
- 0, /* Not used */
- 0
- );
- }
-#endif
-
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
- }
-
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
-}
diff --git a/cpukit/rtems/src/msgqflush.c b/cpukit/rtems/src/msgqflush.c
deleted file mode 100644
index b4ce3ae375..0000000000
--- a/cpukit/rtems/src/msgqflush.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Message Queue Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/coremsg.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/attr.h>
-#include <rtems/rtems/message.h>
-#include <rtems/rtems/options.h>
-#include <rtems/rtems/support.h>
-
-/*PAGE
- *
- * rtems_message_queue_flush
- *
- * This directive removes all pending messages from a queue and returns
- * the number of messages removed. If no messages were present then
- * a count of zero is returned.
- *
- * Input parameters:
- * id - queue id
- * count - return area for count
- *
- * Output parameters:
- * count - number of messages removed ( 0 = empty queue )
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_message_queue_flush(
- Objects_Id id,
- unsigned32 *count
-)
-{
- register Message_queue_Control *the_message_queue;
- Objects_Locations location;
-
- the_message_queue = _Message_queue_Get( id, &location );
- switch ( location ) {
- case OBJECTS_REMOTE:
-#if defined(RTEMS_MULTIPROCESSING)
- _Thread_Executing->Wait.return_argument = count;
-
- return
- _Message_queue_MP_Send_request_packet(
- MESSAGE_QUEUE_MP_FLUSH_REQUEST,
- id,
- 0, /* buffer not used */
- 0, /* size */
- 0, /* option_set not used */
- MPCI_DEFAULT_TIMEOUT
- );
-#endif
-
- case OBJECTS_ERROR:
- return RTEMS_INVALID_ID;
-
- case OBJECTS_LOCAL:
- *count = _CORE_message_queue_Flush( &the_message_queue->message_queue );
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
- }
-
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
-}
diff --git a/cpukit/rtems/src/msgqgetnumberpending.c b/cpukit/rtems/src/msgqgetnumberpending.c
deleted file mode 100644
index c2cad97198..0000000000
--- a/cpukit/rtems/src/msgqgetnumberpending.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Message Queue Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/coremsg.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/attr.h>
-#include <rtems/rtems/message.h>
-#include <rtems/rtems/options.h>
-#include <rtems/rtems/support.h>
-
-/*PAGE
- *
- * rtems_message_queue_get_number_pending
- *
- * This directive returns the number of messages pending.
- *
- * Input parameters:
- * id - queue id
- * count - return area for count
- *
- * Output parameters:
- * count - number of messages removed ( 0 = empty queue )
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_message_queue_get_number_pending(
- Objects_Id id,
- unsigned32 *count
-)
-{
- register Message_queue_Control *the_message_queue;
- Objects_Locations location;
-
- the_message_queue = _Message_queue_Get( id, &location );
- switch ( location ) {
- case OBJECTS_REMOTE:
-#if defined(RTEMS_MULTIPROCESSING)
- _Thread_Executing->Wait.return_argument = count;
-
- return _Message_queue_MP_Send_request_packet(
- MESSAGE_QUEUE_MP_GET_NUMBER_PENDING_REQUEST,
- id,
- 0, /* buffer not used */
- 0, /* size */
- 0, /* option_set not used */
- MPCI_DEFAULT_TIMEOUT
- );
-#endif
-
- case OBJECTS_ERROR:
- return RTEMS_INVALID_ID;
-
- case OBJECTS_LOCAL:
- *count = the_message_queue->message_queue.number_of_pending_messages;
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
- }
-
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
-}
diff --git a/cpukit/rtems/src/msgqident.c b/cpukit/rtems/src/msgqident.c
deleted file mode 100644
index eb04c28c55..0000000000
--- a/cpukit/rtems/src/msgqident.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Message Queue Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/coremsg.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/attr.h>
-#include <rtems/rtems/message.h>
-#include <rtems/rtems/options.h>
-#include <rtems/rtems/support.h>
-
-/*PAGE
- *
- * rtems_message_queue_ident
- *
- * This directive returns the system ID associated with
- * the message queue name.
- *
- * Input parameters:
- * name - user defined message queue name
- * node - node(s) to be searched
- * id - pointer to message queue id
- *
- * Output parameters:
- * *id - message queue id
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_message_queue_ident(
- rtems_name name,
- unsigned32 node,
- Objects_Id *id
-)
-{
- Objects_Name_to_id_errors status;
-
- status = _Objects_Name_to_id(
- &_Message_queue_Information,
- &name,
- node,
- id
- );
-
- return _Status_Object_name_errors_to_status[ status ];
-}
diff --git a/cpukit/rtems/src/msgqreceive.c b/cpukit/rtems/src/msgqreceive.c
deleted file mode 100644
index 27e66a4a49..0000000000
--- a/cpukit/rtems/src/msgqreceive.c
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Message Queue Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/coremsg.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/attr.h>
-#include <rtems/rtems/message.h>
-#include <rtems/rtems/options.h>
-#include <rtems/rtems/support.h>
-
-/*PAGE
- *
- * rtems_message_queue_receive
- *
- * This directive dequeues a message from the designated message queue
- * and copies it into the requesting thread's buffer.
- *
- * Input parameters:
- * id - queue id
- * buffer - pointer to message buffer
- * size - size of message receive
- * option_set - options on receive
- * timeout - number of ticks to wait
- *
- * Output parameters:
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_message_queue_receive(
- Objects_Id id,
- void *buffer,
- unsigned32 *size,
- unsigned32 option_set,
- rtems_interval timeout
-)
-{
- register Message_queue_Control *the_message_queue;
- Objects_Locations location;
- boolean wait;
-
- the_message_queue = _Message_queue_Get( id, &location );
- switch ( location ) {
-
- case OBJECTS_REMOTE:
-#if defined(RTEMS_MULTIPROCESSING)
- return _Message_queue_MP_Send_request_packet(
- MESSAGE_QUEUE_MP_RECEIVE_REQUEST,
- id,
- buffer,
- size,
- option_set,
- timeout
- );
-#endif
-
- case OBJECTS_ERROR:
- return RTEMS_INVALID_ID;
-
- case OBJECTS_LOCAL:
- if ( _Options_Is_no_wait( option_set ) )
- wait = FALSE;
- else
- wait = TRUE;
-
- _CORE_message_queue_Seize(
- &the_message_queue->message_queue,
- the_message_queue->Object.id,
- buffer,
- size,
- wait,
- timeout
- );
- _Thread_Enable_dispatch();
- return _Message_queue_Translate_core_message_queue_return_code(
- _Thread_Executing->Wait.return_code
- );
-
- }
-
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
-}
diff --git a/cpukit/rtems/src/msgqsend.c b/cpukit/rtems/src/msgqsend.c
deleted file mode 100644
index 2010e4a6b9..0000000000
--- a/cpukit/rtems/src/msgqsend.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Message Queue Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/coremsg.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/attr.h>
-#include <rtems/rtems/message.h>
-#include <rtems/rtems/options.h>
-#include <rtems/rtems/support.h>
-
-/*PAGE
- *
- * rtems_message_queue_send
- *
- * This routine implements the directives q_send. It sends a
- * message to the specified message queue.
- *
- * Input parameters:
- * id - pointer to message queue
- * buffer - pointer to message buffer
- * size - size of message to sent urgently
- *
- * Output parameters:
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_message_queue_send(
- Objects_Id id,
- void *buffer,
- unsigned32 size
-)
-{
- return( _Message_queue_Submit(id, buffer, size, MESSAGE_QUEUE_SEND_REQUEST) );
-}
diff --git a/cpukit/rtems/src/msgqsubmit.c b/cpukit/rtems/src/msgqsubmit.c
deleted file mode 100644
index 16f1c50266..0000000000
--- a/cpukit/rtems/src/msgqsubmit.c
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Message Queue Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/coremsg.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/attr.h>
-#include <rtems/rtems/message.h>
-#include <rtems/rtems/options.h>
-#include <rtems/rtems/support.h>
-
-/*PAGE
- *
- * _Message_queue_Submit
- *
- * This routine implements the directives rtems_message_queue_send
- * and rtems_message_queue_urgent. It processes a message that is
- * to be submitted to the designated message queue. The message will
- * either be processed as a send send message which it will be inserted
- * at the rear of the queue or it will be processed as an urgent message
- * which will be inserted at the front of the queue.
- *
- * Input parameters:
- * id - pointer to message queue
- * buffer - pointer to message buffer
- * size - size in bytes of message to send
- * submit_type - send or urgent message
- *
- * Output parameters:
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code _Message_queue_Submit(
- Objects_Id id,
- void *buffer,
- unsigned32 size,
- Message_queue_Submit_types submit_type
-)
-{
- register Message_queue_Control *the_message_queue;
- Objects_Locations location;
-
- the_message_queue = _Message_queue_Get( id, &location );
- switch ( location )
- {
- case OBJECTS_REMOTE:
-#if defined(RTEMS_MULTIPROCESSING)
- switch ( submit_type ) {
- case MESSAGE_QUEUE_SEND_REQUEST:
- return _Message_queue_MP_Send_request_packet(
- MESSAGE_QUEUE_MP_SEND_REQUEST,
- id,
- buffer,
- &size,
- 0, /* option_set */
- MPCI_DEFAULT_TIMEOUT
- );
-
- case MESSAGE_QUEUE_URGENT_REQUEST:
- return _Message_queue_MP_Send_request_packet(
- MESSAGE_QUEUE_MP_URGENT_REQUEST,
- id,
- buffer,
- &size,
- 0, /* option_set */
- MPCI_DEFAULT_TIMEOUT
- );
- }
- break;
-#endif
-
- case OBJECTS_ERROR:
- return RTEMS_INVALID_ID;
-
- case OBJECTS_LOCAL:
- switch ( submit_type ) {
- case MESSAGE_QUEUE_SEND_REQUEST:
- _CORE_message_queue_Send(
- &the_message_queue->message_queue,
- buffer,
- size,
- id,
-#if defined(RTEMS_MULTIPROCESSING)
- _Message_queue_Core_message_queue_mp_support,
-#else
- NULL,
-#endif
- FALSE, /* sender does not block */
- 0 /* no timeout */
- );
- break;
- case MESSAGE_QUEUE_URGENT_REQUEST:
- _CORE_message_queue_Urgent(
- &the_message_queue->message_queue,
- buffer,
- size,
- id,
-#if defined(RTEMS_MULTIPROCESSING)
- _Message_queue_Core_message_queue_mp_support,
-#else
- NULL,
-#endif
- FALSE, /* sender does not block */
- 0 /* no timeout */
- );
- break;
- default:
- return RTEMS_INTERNAL_ERROR; /* should never get here */
- }
-
- _Thread_Enable_dispatch();
- return _Message_queue_Translate_core_message_queue_return_code(
- _Thread_Executing->Wait.return_code
- );
-
- }
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
-}
diff --git a/cpukit/rtems/src/msgqtranslatereturncode.c b/cpukit/rtems/src/msgqtranslatereturncode.c
deleted file mode 100644
index 34c818a145..0000000000
--- a/cpukit/rtems/src/msgqtranslatereturncode.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Message Queue Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/coremsg.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/attr.h>
-#include <rtems/rtems/message.h>
-#include <rtems/rtems/options.h>
-#include <rtems/rtems/support.h>
-
-/*PAGE
- *
- * _Message_queue_Translate_core_message_queue_return_code
- *
- * Input parameters:
- * the_message_queue_status - message_queue status code to translate
- *
- * Output parameters:
- * rtems status code - translated RTEMS status code
- *
- */
-
-rtems_status_code _Message_queue_Translate_core_message_queue_return_code (
- unsigned32 the_message_queue_status
-)
-{
- switch ( the_message_queue_status ) {
- case CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL:
- return RTEMS_SUCCESSFUL;
- case CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE:
- return RTEMS_INVALID_SIZE;
- case CORE_MESSAGE_QUEUE_STATUS_TOO_MANY:
- return RTEMS_TOO_MANY;
- case CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED:
- return RTEMS_UNSATISFIED;
- case CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT:
- return RTEMS_UNSATISFIED;
- case CORE_MESSAGE_QUEUE_STATUS_WAS_DELETED:
- return RTEMS_OBJECT_WAS_DELETED;
- case CORE_MESSAGE_QUEUE_STATUS_TIMEOUT:
- return RTEMS_TIMEOUT;
- case THREAD_STATUS_PROXY_BLOCKING:
- return RTEMS_PROXY_BLOCKING;
- }
- _Internal_error_Occurred( /* XXX */
- INTERNAL_ERROR_RTEMS_API,
- TRUE,
- the_message_queue_status
- );
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
-}
diff --git a/cpukit/rtems/src/msgqurgent.c b/cpukit/rtems/src/msgqurgent.c
deleted file mode 100644
index ddff018b13..0000000000
--- a/cpukit/rtems/src/msgqurgent.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Message Queue Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/coremsg.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/attr.h>
-#include <rtems/rtems/message.h>
-#include <rtems/rtems/options.h>
-#include <rtems/rtems/support.h>
-
-/*PAGE
- *
- * rtems_message_queue_urgent
- *
- * This routine implements the directives q_urgent. It urgents a
- * message to the specified message queue.
- *
- * Input parameters:
- * id - pointer to message queue
- * buffer - pointer to message buffer
- * size - size of message to sent urgently
- *
- * Output parameters:
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_message_queue_urgent(
- Objects_Id id,
- void *buffer,
- unsigned32 size
-)
-{
- return(_Message_queue_Submit(id, buffer, size, MESSAGE_QUEUE_URGENT_REQUEST));
-}
diff --git a/cpukit/rtems/src/part.c b/cpukit/rtems/src/part.c
deleted file mode 100644
index 7e13628450..0000000000
--- a/cpukit/rtems/src/part.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Partition Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/score/address.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/part.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/sysstate.h>
-
-/*PAGE
- *
- * _Partition_Manager_initialization
- *
- * This routine initializes all partition manager related
- * data structures.
- *
- * Input parameters:
- * maximum_partitions - number of partitions to initialize
- *
- * Output parameters: NONE
- */
-
-void _Partition_Manager_initialization(
- unsigned32 maximum_partitions
-)
-{
- _Objects_Initialize_information(
- &_Partition_Information,
- OBJECTS_RTEMS_PARTITIONS,
- TRUE,
- maximum_partitions,
- sizeof( Partition_Control ),
- FALSE,
- RTEMS_MAXIMUM_NAME_LENGTH,
- FALSE
- );
-
- /*
- * Register the MP Process Packet routine.
- */
-
-#if defined(RTEMS_MULTIPROCESSING)
- _MPCI_Register_packet_processor(
- MP_PACKET_PARTITION,
- _Partition_MP_Process_packet
- );
-#endif
-
-}
diff --git a/cpukit/rtems/src/partcreate.c b/cpukit/rtems/src/partcreate.c
deleted file mode 100644
index 70b0585df7..0000000000
--- a/cpukit/rtems/src/partcreate.c
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Partition Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/score/address.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/part.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/sysstate.h>
-
-/*PAGE
- *
- * rtems_partition_create
- *
- * This directive creates a partiton of fixed sized buffers from the
- * given contiguous memory area.
- *
- * Input parameters:
- * name - user defined partition name
- * starting_address - physical start address of partition
- * length - physical length in bytes
- * buffer_size - size of buffers in bytes
- * attribute_set - partition attributes
- * id - pointer to partition id
- *
- * Output parameters:
- * id - partition id
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_partition_create(
- rtems_name name,
- void *starting_address,
- unsigned32 length,
- unsigned32 buffer_size,
- rtems_attribute attribute_set,
- Objects_Id *id
-)
-{
- register Partition_Control *the_partition;
-
- if ( !rtems_is_name_valid( name ) )
- return RTEMS_INVALID_NAME;
-
- if ( length == 0 || buffer_size == 0 || length < buffer_size ||
- !_Partition_Is_buffer_size_aligned( buffer_size ) )
- return RTEMS_INVALID_SIZE;
-
- if ( !_Addresses_Is_aligned( starting_address ) )
- return RTEMS_INVALID_ADDRESS;
-
-#if defined(RTEMS_MULTIPROCESSING)
- if ( _Attributes_Is_global( attribute_set ) &&
- !_System_state_Is_multiprocessing )
- return RTEMS_MP_NOT_CONFIGURED;
-#endif
-
- _Thread_Disable_dispatch(); /* prevents deletion */
-
- the_partition = _Partition_Allocate();
-
- if ( !the_partition ) {
- _Thread_Enable_dispatch();
- return RTEMS_TOO_MANY;
- }
-
-#if defined(RTEMS_MULTIPROCESSING)
- if ( _Attributes_Is_global( attribute_set ) &&
- !( _Objects_MP_Allocate_and_open( &_Partition_Information, name,
- the_partition->Object.id, FALSE ) ) ) {
- _Partition_Free( the_partition );
- _Thread_Enable_dispatch();
- return RTEMS_TOO_MANY;
- }
-#endif
-
- the_partition->starting_address = starting_address;
- the_partition->length = length;
- the_partition->buffer_size = buffer_size;
- the_partition->attribute_set = attribute_set;
- the_partition->number_of_used_blocks = 0;
-
- _Chain_Initialize( &the_partition->Memory, starting_address,
- length / buffer_size, buffer_size );
-
- _Objects_Open( &_Partition_Information, &the_partition->Object, &name );
-
- *id = the_partition->Object.id;
-#if defined(RTEMS_MULTIPROCESSING)
- if ( _Attributes_Is_global( attribute_set ) )
- _Partition_MP_Send_process_packet(
- PARTITION_MP_ANNOUNCE_CREATE,
- the_partition->Object.id,
- name,
- 0 /* Not used */
- );
-#endif
-
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
-}
diff --git a/cpukit/rtems/src/partdelete.c b/cpukit/rtems/src/partdelete.c
deleted file mode 100644
index 2872c19991..0000000000
--- a/cpukit/rtems/src/partdelete.c
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Partition Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/score/address.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/part.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/sysstate.h>
-
-/*PAGE
- *
- * rtems_partition_delete
- *
- * This directive allows a thread to delete a partition specified by
- * the partition identifier, provided that none of its buffers are
- * still allocated.
- *
- * Input parameters:
- * id - partition id
- *
- * Output parameters:
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_partition_delete(
- Objects_Id id
-)
-{
- register Partition_Control *the_partition;
- Objects_Locations location;
-
- the_partition = _Partition_Get( id, &location );
- switch ( location ) {
- case OBJECTS_REMOTE:
-#if defined(RTEMS_MULTIPROCESSING)
- _Thread_Dispatch();
- return RTEMS_ILLEGAL_ON_REMOTE_OBJECT;
-#endif
-
- case OBJECTS_ERROR:
- return RTEMS_INVALID_ID;
-
- case OBJECTS_LOCAL:
- if ( the_partition->number_of_used_blocks == 0 ) {
- _Objects_Close( &_Partition_Information, &the_partition->Object );
- _Partition_Free( the_partition );
-#if defined(RTEMS_MULTIPROCESSING)
- if ( _Attributes_Is_global( the_partition->attribute_set ) ) {
-
- _Objects_MP_Close(
- &_Partition_Information,
- the_partition->Object.id
- );
-
- _Partition_MP_Send_process_packet(
- PARTITION_MP_ANNOUNCE_DELETE,
- the_partition->Object.id,
- 0, /* Not used */
- 0 /* Not used */
- );
- }
-#endif
-
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
- }
- _Thread_Enable_dispatch();
- return RTEMS_RESOURCE_IN_USE;
- }
-
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
-}
diff --git a/cpukit/rtems/src/partgetbuffer.c b/cpukit/rtems/src/partgetbuffer.c
deleted file mode 100644
index 761add6727..0000000000
--- a/cpukit/rtems/src/partgetbuffer.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Partition Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/score/address.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/part.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/sysstate.h>
-
-/*PAGE
- *
- * rtems_partition_get_buffer
- *
- * This directive will obtain a buffer from a buffer partition.
- *
- * Input parameters:
- * id - partition id
- * buffer - pointer to buffer address
- *
- * Output parameters:
- * buffer - pointer to buffer address filled in
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_partition_get_buffer(
- Objects_Id id,
- void **buffer
-)
-{
- register Partition_Control *the_partition;
- Objects_Locations location;
- void *the_buffer;
-
- the_partition = _Partition_Get( id, &location );
- switch ( location ) {
- case OBJECTS_REMOTE:
-#if defined(RTEMS_MULTIPROCESSING)
- _Thread_Executing->Wait.return_argument = buffer;
- return(
- _Partition_MP_Send_request_packet(
- PARTITION_MP_GET_BUFFER_REQUEST,
- id,
- 0 /* Not used */
- )
- );
-#endif
-
- case OBJECTS_ERROR:
- return RTEMS_INVALID_ID;
-
- case OBJECTS_LOCAL:
- the_buffer = _Partition_Allocate_buffer( the_partition );
- if ( the_buffer ) {
- the_partition->number_of_used_blocks += 1;
- _Thread_Enable_dispatch();
- *buffer = the_buffer;
- return RTEMS_SUCCESSFUL;
- }
- _Thread_Enable_dispatch();
- return RTEMS_UNSATISFIED;
- }
-
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
-}
diff --git a/cpukit/rtems/src/partident.c b/cpukit/rtems/src/partident.c
deleted file mode 100644
index 2f7029cd63..0000000000
--- a/cpukit/rtems/src/partident.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Partition Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/score/address.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/part.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/sysstate.h>
-
-/*PAGE
- *
- * rtems_partition_ident
- *
- * This directive returns the system ID associated with
- * the partition name.
- *
- * Input parameters:
- * name - user defined partition name
- * node - node(s) to be searched
- * id - pointer to partition id
- *
- * Output parameters:
- * *id - partition id
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_partition_ident(
- rtems_name name,
- unsigned32 node,
- Objects_Id *id
-)
-{
- Objects_Name_to_id_errors status;
-
- status = _Objects_Name_to_id( &_Partition_Information, &name, node, id );
-
- return _Status_Object_name_errors_to_status[ status ];
-}
diff --git a/cpukit/rtems/src/partmp.c b/cpukit/rtems/src/partmp.c
deleted file mode 100644
index 88838f86b3..0000000000
--- a/cpukit/rtems/src/partmp.c
+++ /dev/null
@@ -1,301 +0,0 @@
-/*
- * Multiprocessing Support for the Partition Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/score/mpci.h>
-#include <rtems/score/mppkt.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
-#include <rtems/rtems/part.h>
-#include <rtems/score/thread.h>
-#include <rtems/rtems/support.h>
-
-/*PAGE
- *
- * _Partition_MP_Send_process_packet
- *
- */
-
-void _Partition_MP_Send_process_packet (
- Partition_MP_Remote_operations operation,
- Objects_Id partition_id,
- rtems_name name,
- Objects_Id proxy_id
-)
-{
- Partition_MP_Packet *the_packet;
- unsigned32 node;
-
- switch ( operation ) {
-
- case PARTITION_MP_ANNOUNCE_CREATE:
- case PARTITION_MP_ANNOUNCE_DELETE:
- case PARTITION_MP_EXTRACT_PROXY:
-
- the_packet = _Partition_MP_Get_packet();
- the_packet->Prefix.the_class = MP_PACKET_PARTITION;
- the_packet->Prefix.length = sizeof ( Partition_MP_Packet );
- the_packet->Prefix.to_convert = sizeof ( Partition_MP_Packet );
- the_packet->operation = operation;
- the_packet->Prefix.id = partition_id;
- the_packet->name = name;
- the_packet->proxy_id = proxy_id;
-
- if ( operation == PARTITION_MP_EXTRACT_PROXY )
- node = rtems_get_node( partition_id );
- else
- node = MPCI_ALL_NODES;
-
- _MPCI_Send_process_packet( node, &the_packet->Prefix );
- break;
-
- case PARTITION_MP_GET_BUFFER_REQUEST:
- case PARTITION_MP_GET_BUFFER_RESPONSE:
- case PARTITION_MP_RETURN_BUFFER_REQUEST:
- case PARTITION_MP_RETURN_BUFFER_RESPONSE:
- break;
- }
-}
-
-/*PAGE
- *
- * _Partition_MP_Send_request_packet
- *
- */
-
-rtems_status_code _Partition_MP_Send_request_packet (
- Partition_MP_Remote_operations operation,
- Objects_Id partition_id,
- void *buffer
-)
-{
- Partition_MP_Packet *the_packet;
-
- switch ( operation ) {
-
- case PARTITION_MP_GET_BUFFER_REQUEST:
- case PARTITION_MP_RETURN_BUFFER_REQUEST:
-
- the_packet = _Partition_MP_Get_packet();
- the_packet->Prefix.the_class = MP_PACKET_PARTITION;
- the_packet->Prefix.length = sizeof ( Partition_MP_Packet );
- the_packet->Prefix.to_convert = sizeof ( Partition_MP_Packet );
- the_packet->operation = operation;
- the_packet->Prefix.id = partition_id;
- the_packet->buffer = buffer;
-
- return
- _MPCI_Send_request_packet(
- rtems_get_node( partition_id ),
- &the_packet->Prefix,
- STATES_READY /* Not used */
- );
-
- break;
-
- case PARTITION_MP_ANNOUNCE_CREATE:
- case PARTITION_MP_ANNOUNCE_DELETE:
- case PARTITION_MP_EXTRACT_PROXY:
- case PARTITION_MP_GET_BUFFER_RESPONSE:
- case PARTITION_MP_RETURN_BUFFER_RESPONSE:
- break;
-
- }
- /*
- * The following line is included to satisfy compilers which
- * produce warnings when a function does not end with a return.
- */
- return RTEMS_SUCCESSFUL;
-}
-
-/*PAGE
- *
- * _Partition_MP_Send_response_packet
- *
- */
-
-void _Partition_MP_Send_response_packet (
- Partition_MP_Remote_operations operation,
- Objects_Id partition_id,
- Thread_Control *the_thread
-)
-{
- Partition_MP_Packet *the_packet;
-
- switch ( operation ) {
-
- case PARTITION_MP_GET_BUFFER_RESPONSE:
- case PARTITION_MP_RETURN_BUFFER_RESPONSE:
-
- the_packet = ( Partition_MP_Packet *) the_thread->receive_packet;
-
-/*
- * The packet being returned already contains the class, length, and
- * to_convert fields, therefore they are not set in this routine.
- */
- the_packet->operation = operation;
- the_packet->Prefix.id = the_packet->Prefix.source_tid;
-
- _MPCI_Send_response_packet(
- rtems_get_node( the_packet->Prefix.source_tid ),
- &the_packet->Prefix
- );
- break;
-
- case PARTITION_MP_ANNOUNCE_CREATE:
- case PARTITION_MP_ANNOUNCE_DELETE:
- case PARTITION_MP_EXTRACT_PROXY:
- case PARTITION_MP_GET_BUFFER_REQUEST:
- case PARTITION_MP_RETURN_BUFFER_REQUEST:
- break;
-
- }
-}
-
-/*PAGE
- *
- *
- * _Partition_MP_Process_packet
- *
- */
-
-void _Partition_MP_Process_packet (
- rtems_packet_prefix *the_packet_prefix
-)
-{
- Partition_MP_Packet *the_packet;
- Thread_Control *the_thread;
- boolean ignored;
-
- the_packet = (Partition_MP_Packet *) the_packet_prefix;
-
- switch ( the_packet->operation ) {
-
- case PARTITION_MP_ANNOUNCE_CREATE:
-
- ignored = _Objects_MP_Allocate_and_open(
- &_Partition_Information,
- the_packet->name,
- the_packet->Prefix.id,
- TRUE
- );
-
- _MPCI_Return_packet( the_packet_prefix );
- break;
-
- case PARTITION_MP_ANNOUNCE_DELETE:
-
- _Objects_MP_Close( &_Partition_Information, the_packet->Prefix.id );
-
- _MPCI_Return_packet( the_packet_prefix );
- break;
-
- case PARTITION_MP_EXTRACT_PROXY:
-
- the_thread = _Thread_MP_Find_proxy( the_packet->proxy_id );
-
- if ( ! _Thread_Is_null( the_thread ) )
- _Thread_queue_Extract( the_thread->Wait.queue, the_thread );
-
- _MPCI_Return_packet( the_packet_prefix );
- break;
-
- case PARTITION_MP_GET_BUFFER_REQUEST:
-
- the_packet->Prefix.return_code = rtems_partition_get_buffer(
- the_packet->Prefix.id,
- &the_packet->buffer
- );
-
- _Partition_MP_Send_response_packet(
- PARTITION_MP_GET_BUFFER_RESPONSE,
- the_packet->Prefix.id,
- _Thread_Executing
- );
- break;
-
- case PARTITION_MP_GET_BUFFER_RESPONSE:
-
- the_thread = _MPCI_Process_response( the_packet_prefix );
-
- *(void **)the_thread->Wait.return_argument = the_packet->buffer;
-
- _MPCI_Return_packet( the_packet_prefix );
- break;
-
- case PARTITION_MP_RETURN_BUFFER_REQUEST:
-
- the_packet->Prefix.return_code = rtems_partition_return_buffer(
- the_packet->Prefix.id,
- the_packet->buffer
- );
-
- _Partition_MP_Send_response_packet(
- PARTITION_MP_RETURN_BUFFER_RESPONSE,
- the_packet->Prefix.id,
- _Thread_Executing
- );
- break;
-
- case PARTITION_MP_RETURN_BUFFER_RESPONSE:
-
- the_thread = _MPCI_Process_response( the_packet_prefix );
-
- _MPCI_Return_packet( the_packet_prefix );
- break;
-
- }
-}
-
-/*PAGE
- *
- * _Partition_MP_Send_object_was_deleted
- *
- * This routine is not needed by the Partition since a partition
- * cannot be deleted when buffers are in use.
- *
- */
-
-/*PAGE
- *
- * _Partition_MP_Send_extract_proxy
- *
- */
-
-void _Partition_MP_Send_extract_proxy (
- Thread_Control *the_thread
-)
-{
- _Partition_MP_Send_process_packet(
- PARTITION_MP_EXTRACT_PROXY,
- the_thread->Wait.id,
- (rtems_name) 0,
- the_thread->Object.id
- );
-
-}
-
-/*PAGE
- *
- * _Partition_MP_Get_packet
- *
- */
-
-Partition_MP_Packet *_Partition_MP_Get_packet ( void )
-{
- return ( (Partition_MP_Packet *) _MPCI_Get_packet() );
-}
-
-/* end of file */
diff --git a/cpukit/rtems/src/partreturnbuffer.c b/cpukit/rtems/src/partreturnbuffer.c
deleted file mode 100644
index 2e8008c146..0000000000
--- a/cpukit/rtems/src/partreturnbuffer.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Partition Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/score/address.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/part.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/sysstate.h>
-
-/*PAGE
- *
- * rtems_partition_return_buffer
- *
- * This directive will return the given buffer to the specified
- * buffer partition.
- *
- * Input parameters:
- * id - partition id
- * buffer - pointer to buffer address
- *
- * Output parameters:
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_partition_return_buffer(
- Objects_Id id,
- void *buffer
-)
-{
- register Partition_Control *the_partition;
- Objects_Locations location;
-
- the_partition = _Partition_Get( id, &location );
- switch ( location ) {
-
- case OBJECTS_REMOTE:
-#if defined(RTEMS_MULTIPROCESSING)
- return _Partition_MP_Send_request_packet(
- PARTITION_MP_RETURN_BUFFER_REQUEST,
- id,
- buffer
- );
-#endif
-
- case OBJECTS_ERROR:
- return RTEMS_INVALID_ID;
-
- case OBJECTS_LOCAL:
- if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) {
- _Partition_Free_buffer( the_partition, buffer );
- the_partition->number_of_used_blocks -= 1;
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
- }
- _Thread_Enable_dispatch();
- return RTEMS_INVALID_ADDRESS;
- }
-
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
-}
diff --git a/cpukit/rtems/src/ratemon.c b/cpukit/rtems/src/ratemon.c
deleted file mode 100644
index 29ded58b6a..0000000000
--- a/cpukit/rtems/src/ratemon.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Rate Monotonic Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/ratemon.h>
-#include <rtems/score/thread.h>
-
-/*PAGE
- *
- * _Rate_monotonic_Manager_initialization
- *
- * This routine initializes all Rate Monotonic Manager related
- * data structures.
- *
- * Input parameters:
- * maximum_periods - number of periods timers to initialize
- *
- * Output parameters: NONE
- *
- * NOTE: The Rate Monotonic Manager is built on top of the Watchdog
- * Handler.
- */
-
-void _Rate_monotonic_Manager_initialization(
- unsigned32 maximum_periods
-)
-{
- _Objects_Initialize_information(
- &_Rate_monotonic_Information,
- OBJECTS_RTEMS_PERIODS,
- FALSE,
- maximum_periods,
- sizeof( Rate_monotonic_Control ),
- FALSE,
- RTEMS_MAXIMUM_NAME_LENGTH,
- FALSE
- );
-}
diff --git a/cpukit/rtems/src/ratemoncancel.c b/cpukit/rtems/src/ratemoncancel.c
deleted file mode 100644
index 6281b6527e..0000000000
--- a/cpukit/rtems/src/ratemoncancel.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Rate Monotonic Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/ratemon.h>
-#include <rtems/score/thread.h>
-
-/*PAGE
- *
- * rtems_rate_monotonic_cancel
- *
- * This directive allows a thread to cancel a rate monotonic timer.
- *
- * Input parameters:
- * id - rate monotonic id
- *
- * Output parameters:
- * RTEMS_SUCCESSFUL - if successful and caller is not the owning thread
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_rate_monotonic_cancel(
- Objects_Id id
-)
-{
- Rate_monotonic_Control *the_period;
- Objects_Locations location;
-
- the_period = _Rate_monotonic_Get( id, &location );
- switch ( location ) {
- case OBJECTS_REMOTE:
- return RTEMS_INTERNAL_ERROR; /* should never return this */
-
- case OBJECTS_ERROR:
- return RTEMS_INVALID_ID;
-
- case OBJECTS_LOCAL:
- if ( !_Thread_Is_executing( the_period->owner ) ) {
- _Thread_Enable_dispatch();
- return RTEMS_NOT_OWNER_OF_RESOURCE;
- }
- (void) _Watchdog_Remove( &the_period->Timer );
- the_period->state = RATE_MONOTONIC_INACTIVE;
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
- }
-
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
-}
diff --git a/cpukit/rtems/src/ratemoncreate.c b/cpukit/rtems/src/ratemoncreate.c
deleted file mode 100644
index 1fb4a9d466..0000000000
--- a/cpukit/rtems/src/ratemoncreate.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Rate Monotonic Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/ratemon.h>
-#include <rtems/score/thread.h>
-
-/*PAGE
- *
- * rtems_rate_monotonic_create
- *
- * This directive creates a rate monotonic timer and performs
- * some initialization.
- *
- * Input parameters:
- * name - name of period
- * id - pointer to rate monotonic id
- *
- * Output parameters:
- * id - rate monotonic id
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_rate_monotonic_create(
- rtems_name name,
- Objects_Id *id
-)
-{
- Rate_monotonic_Control *the_period;
-
- if ( !rtems_is_name_valid( name ) )
- return RTEMS_INVALID_NAME;
-
- _Thread_Disable_dispatch(); /* to prevent deletion */
-
- the_period = _Rate_monotonic_Allocate();
-
- if ( !the_period ) {
- _Thread_Enable_dispatch();
- return RTEMS_TOO_MANY;
- }
-
- the_period->owner = _Thread_Executing;
- the_period->state = RATE_MONOTONIC_INACTIVE;
-
- _Objects_Open( &_Rate_monotonic_Information, &the_period->Object, &name );
-
- *id = the_period->Object.id;
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
-}
diff --git a/cpukit/rtems/src/ratemondelete.c b/cpukit/rtems/src/ratemondelete.c
deleted file mode 100644
index 8d144e1b09..0000000000
--- a/cpukit/rtems/src/ratemondelete.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Rate Monotonic Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/ratemon.h>
-#include <rtems/score/thread.h>
-
-/*PAGE
- *
- * rtems_rate_monotonic_delete
- *
- * This directive allows a thread to delete a rate monotonic timer.
- *
- * Input parameters:
- * id - rate monotonic id
- *
- * Output parameters:
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_rate_monotonic_delete(
- Objects_Id id
-)
-{
- Rate_monotonic_Control *the_period;
- Objects_Locations location;
-
- the_period = _Rate_monotonic_Get( id, &location );
- switch ( location ) {
- case OBJECTS_REMOTE: /* should never return this */
- return RTEMS_INTERNAL_ERROR;
-
- case OBJECTS_ERROR:
- return RTEMS_INVALID_ID;
-
- case OBJECTS_LOCAL:
- _Objects_Close( &_Rate_monotonic_Information, &the_period->Object );
- (void) _Watchdog_Remove( &the_period->Timer );
- the_period->state = RATE_MONOTONIC_INACTIVE;
- _Rate_monotonic_Free( the_period );
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
- }
-
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
-}
diff --git a/cpukit/rtems/src/ratemongetstatus.c b/cpukit/rtems/src/ratemongetstatus.c
deleted file mode 100644
index a53a586974..0000000000
--- a/cpukit/rtems/src/ratemongetstatus.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Rate Monotonic Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/ratemon.h>
-#include <rtems/score/thread.h>
-
-/*PAGE
- *
- * rtems_rate_monotonic_get_status
- *
- * This directive allows a thread to obtain status information on a
- * period.
- *
- * Input parameters:
- * id - rate monotonic id
- * status - pointer to status control block
- *
- * Output parameters:
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- *
- */
-
-rtems_status_code rtems_rate_monotonic_get_status(
- Objects_Id id,
- rtems_rate_monotonic_period_status *status
-)
-{
- Objects_Locations location;
- Rate_monotonic_Control *the_period;
-
- if ( status == NULL )
- return RTEMS_INVALID_ADDRESS;
-
- the_period = _Rate_monotonic_Get( id, &location );
- switch ( location ) {
- case OBJECTS_REMOTE: /* should never return this */
- return RTEMS_INTERNAL_ERROR;
-
- case OBJECTS_ERROR:
- return RTEMS_INVALID_ID;
-
- case OBJECTS_LOCAL:
- status->state = the_period->state;
-
- if ( status->state == RATE_MONOTONIC_INACTIVE ) {
- status->ticks_since_last_period = 0;
- status->ticks_executed_since_last_period = 0;
- } else {
- status->ticks_since_last_period =
- _Watchdog_Ticks_since_boot - the_period->time_at_period;
-
- status->ticks_executed_since_last_period =
- the_period->owner->ticks_executed -
- the_period->owner_ticks_executed_at_period;
- }
-
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
- }
-
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
-}
diff --git a/cpukit/rtems/src/ratemonident.c b/cpukit/rtems/src/ratemonident.c
deleted file mode 100644
index 8c18975009..0000000000
--- a/cpukit/rtems/src/ratemonident.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Rate Monotonic Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/ratemon.h>
-#include <rtems/score/thread.h>
-
-/*PAGE
- *
- * rtems_rate_monotonic_ident
- *
- * This directive returns the system ID associated with
- * the rate monotonic period name.
- *
- * Input parameters:
- * name - user defined period name
- * id - pointer to period id
- *
- * Output parameters:
- * *id - region id
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_rate_monotonic_ident(
- rtems_name name,
- Objects_Id *id
-)
-{
- Objects_Name_to_id_errors status;
-
- status = _Objects_Name_to_id(
- &_Rate_monotonic_Information,
- &name,
- OBJECTS_SEARCH_LOCAL_NODE,
- id
- );
-
- return _Status_Object_name_errors_to_status[ status ];
-}
diff --git a/cpukit/rtems/src/ratemonperiod.c b/cpukit/rtems/src/ratemonperiod.c
deleted file mode 100644
index 6d031cf218..0000000000
--- a/cpukit/rtems/src/ratemonperiod.c
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Rate Monotonic Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/ratemon.h>
-#include <rtems/score/thread.h>
-
-/*PAGE
- *
- * rtems_rate_monotonic_period
- *
- * This directive allows a thread to manipulate a rate monotonic timer.
- *
- * Input parameters:
- * id - rate monotonic id
- * length - length of period (in ticks)
- *
- * Output parameters:
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_rate_monotonic_period(
- Objects_Id id,
- rtems_interval length
-)
-{
- Rate_monotonic_Control *the_period;
- Objects_Locations location;
- rtems_status_code return_value;
- rtems_rate_monotonic_period_states local_state;
- ISR_Level level;
-
- the_period = _Rate_monotonic_Get( id, &location );
- switch ( location ) {
- case OBJECTS_REMOTE: /* should never return this */
- return RTEMS_INTERNAL_ERROR;
-
- case OBJECTS_ERROR:
- return RTEMS_INVALID_ID;
-
- case OBJECTS_LOCAL:
- if ( !_Thread_Is_executing( the_period->owner ) ) {
- _Thread_Enable_dispatch();
- return RTEMS_NOT_OWNER_OF_RESOURCE;
- }
-
- if ( length == RTEMS_PERIOD_STATUS ) {
- switch ( the_period->state ) {
- case RATE_MONOTONIC_INACTIVE:
- return_value = RTEMS_NOT_DEFINED;
- break;
- case RATE_MONOTONIC_ACTIVE:
- return_value = RTEMS_SUCCESSFUL;
- break;
- case RATE_MONOTONIC_EXPIRED:
- return_value = RTEMS_TIMEOUT;
- break;
- default: /* unreached -- only to remove warnings */
- return_value = RTEMS_INTERNAL_ERROR;
- break;
- }
- _Thread_Enable_dispatch();
- return( return_value );
- }
-
- _ISR_Disable( level );
- switch ( the_period->state ) {
- case RATE_MONOTONIC_INACTIVE:
- _ISR_Enable( level );
- the_period->state = RATE_MONOTONIC_ACTIVE;
- _Watchdog_Initialize(
- &the_period->Timer,
- _Rate_monotonic_Timeout,
- id,
- NULL
- );
-
- the_period->owner_ticks_executed_at_period =
- _Thread_Executing->ticks_executed;
-
- the_period->time_at_period = _Watchdog_Ticks_since_boot;
-
- _Watchdog_Insert_ticks( &the_period->Timer, length );
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
-
- case RATE_MONOTONIC_ACTIVE:
- /*
- * This tells the _Rate_monotonic_Timeout that this task is
- * in the process of blocking on the period.
- */
-
- the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING;
- _ISR_Enable( level );
-
- _Thread_Executing->Wait.id = the_period->Object.id;
- _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
-
- /*
- * Did the watchdog timer expire while we were actually blocking
- * on it?
- */
-
- _ISR_Disable( level );
- local_state = the_period->state;
- the_period->state = RATE_MONOTONIC_ACTIVE;
- _ISR_Enable( level );
-
- /*
- * If it did, then we want to unblock ourself and continue as
- * if nothing happen. The period was reset in the timeout routine.
- */
-
- if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING )
- _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
-
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
- break;
-
- case RATE_MONOTONIC_EXPIRED:
- _ISR_Enable( level );
- the_period->state = RATE_MONOTONIC_ACTIVE;
- the_period->owner_ticks_executed_at_period =
- _Thread_Executing->ticks_executed;
- the_period->time_at_period = _Watchdog_Ticks_since_boot;
-
- _Watchdog_Insert_ticks( &the_period->Timer, length );
- _Thread_Enable_dispatch();
- return RTEMS_TIMEOUT;
-
- case RATE_MONOTONIC_OWNER_IS_BLOCKING:
- case RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING:
- /*
- * These should never happen.
- */
- break;
- }
- }
-
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
-}
diff --git a/cpukit/rtems/src/ratemontimeout.c b/cpukit/rtems/src/ratemontimeout.c
deleted file mode 100644
index 0a53059d1b..0000000000
--- a/cpukit/rtems/src/ratemontimeout.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Rate Monotonic Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/ratemon.h>
-#include <rtems/score/thread.h>
-
-/*PAGE
- *
- * _Rate_monotonic_Timeout
- *
- * This routine processes a period ending. If the owning thread
- * is waiting for the period, that thread is unblocked and the
- * period reinitiated. Otherwise, the period is expired.
- * This routine is called by the watchdog handler.
- *
- * Input parameters:
- * id - period id
- *
- * Output parameters: NONE
- */
-
-void _Rate_monotonic_Timeout(
- Objects_Id id,
- void *ignored
-)
-{
- Rate_monotonic_Control *the_period;
- Objects_Locations location;
- Thread_Control *the_thread;
-
- the_period = _Rate_monotonic_Get( id, &location );
- switch ( location ) {
- case OBJECTS_REMOTE: /* impossible */
- case OBJECTS_ERROR:
- break;
-
- case OBJECTS_LOCAL:
- the_thread = the_period->owner;
- if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
- the_thread->Wait.id == the_period->Object.id ) {
- _Thread_Unblock( the_thread );
- the_period->owner_ticks_executed_at_period =
- the_thread->ticks_executed;
-
- the_period->time_at_period = _Watchdog_Ticks_since_boot;
-
- _Watchdog_Reset( &the_period->Timer );
- } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
- the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
- the_period->owner_ticks_executed_at_period =
- the_thread->ticks_executed;
-
- the_period->time_at_period = _Watchdog_Ticks_since_boot;
- _Watchdog_Reset( &the_period->Timer );
- } else
- the_period->state = RATE_MONOTONIC_EXPIRED;
- _Thread_Unnest_dispatch();
- break;
- }
-}
diff --git a/cpukit/rtems/src/region.c b/cpukit/rtems/src/region.c
deleted file mode 100644
index b00ba8bf52..0000000000
--- a/cpukit/rtems/src/region.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Region Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
-#include <rtems/rtems/region.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-
-/*PAGE
- *
- * _Region_Manager_initialization
- *
- * This routine initializes all region manager related data structures.
- *
- * Input parameters:
- * maximum_regions - number of regions to initialize
- *
- * Output parameters: NONE
- */
-
-void _Region_Manager_initialization(
- unsigned32 maximum_regions
-)
-{
- _Objects_Initialize_information(
- &_Region_Information,
- OBJECTS_RTEMS_REGIONS,
- FALSE,
- maximum_regions,
- sizeof( Region_Control ),
- FALSE,
- RTEMS_MAXIMUM_NAME_LENGTH,
- FALSE
- );
-
- /*
- * Register the MP Process Packet routine.
- */
-
-#if defined(RTEMS_MULTIPROCESSING)
- _MPCI_Register_packet_processor(
- MP_PACKET_REGION,
- 0 /* XXX _Region_MP_Process_packet */
- );
-#endif
-
-}
-
diff --git a/cpukit/rtems/src/regioncreate.c b/cpukit/rtems/src/regioncreate.c
deleted file mode 100644
index cacef3fe0b..0000000000
--- a/cpukit/rtems/src/regioncreate.c
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Region Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
-#include <rtems/rtems/region.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-
-/*PAGE
- *
- * rtems_region_create
- *
- * This directive creates a region of physical contiguous memory area
- * from which variable sized segments can be allocated.
- *
- * Input parameters:
- * name - user defined region name
- * starting_address - physical start address of region
- * length - physical length in bytes
- * page_size - page size in bytes
- * attribute_set - region attributes
- * id - address of region id to set
- *
- * Output parameters:
- * id - region id
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_region_create(
- rtems_name name,
- void *starting_address,
- unsigned32 length,
- unsigned32 page_size,
- rtems_attribute attribute_set,
- Objects_Id *id
-)
-{
- Region_Control *the_region;
-
- if ( !rtems_is_name_valid( name ) )
- return RTEMS_INVALID_NAME;
-
- if ( !_Addresses_Is_aligned( starting_address ) )
- return RTEMS_INVALID_ADDRESS;
-
- _Thread_Disable_dispatch(); /* to prevent deletion */
-
- the_region = _Region_Allocate();
-
- if ( !the_region ) {
- _Thread_Enable_dispatch();
- return RTEMS_TOO_MANY;
- }
-
- the_region->maximum_segment_size =
- _Heap_Initialize(&the_region->Memory, starting_address, length, page_size);
-
- if ( !the_region->maximum_segment_size ) {
- _Region_Free( the_region );
- _Thread_Enable_dispatch();
- return RTEMS_INVALID_SIZE;
- }
-
- the_region->starting_address = starting_address;
- the_region->length = length;
- the_region->page_size = page_size;
- the_region->attribute_set = attribute_set;
- the_region->number_of_used_blocks = 0;
-
- _Thread_queue_Initialize(
- &the_region->Wait_queue,
- OBJECTS_RTEMS_REGIONS,
- _Attributes_Is_priority( attribute_set ) ?
- THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
- STATES_WAITING_FOR_SEGMENT,
-#if defined(RTEMS_MULTIPROCESSING)
- _Region_MP_Send_extract_proxy,
-#else
- NULL,
-#endif
- RTEMS_TIMEOUT
- );
-
- _Objects_Open( &_Region_Information, &the_region->Object, &name );
-
- *id = the_region->Object.id;
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
-}
diff --git a/cpukit/rtems/src/regiondelete.c b/cpukit/rtems/src/regiondelete.c
deleted file mode 100644
index 669923c2e7..0000000000
--- a/cpukit/rtems/src/regiondelete.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Region Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
-#include <rtems/rtems/region.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-
-/*PAGE
- *
- * rtems_region_delete
- *
- * This directive allows a thread to delete a region specified by
- * the region identifier, provided that none of its segments are
- * still allocated.
- *
- * Input parameters:
- * id - region id
- *
- * Output parameters:
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_region_delete(
- Objects_Id id
-)
-{
- register Region_Control *the_region;
- Objects_Locations location;
-
- the_region = _Region_Get( id, &location );
- switch ( location ) {
- case OBJECTS_REMOTE: /* this error cannot be returned */
- return RTEMS_INTERNAL_ERROR;
-
- case OBJECTS_ERROR:
- return RTEMS_INVALID_ID;
-
- case OBJECTS_LOCAL:
- _Region_Debug_Walk( the_region, 5 );
- if ( the_region->number_of_used_blocks == 0 ) {
- _Objects_Close( &_Region_Information, &the_region->Object );
- _Region_Free( the_region );
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
- }
- _Thread_Enable_dispatch();
- return RTEMS_RESOURCE_IN_USE;
- }
-
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
-}
diff --git a/cpukit/rtems/src/regionextend.c b/cpukit/rtems/src/regionextend.c
deleted file mode 100644
index 0bbfac73b4..0000000000
--- a/cpukit/rtems/src/regionextend.c
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Region Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
-#include <rtems/rtems/region.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-
-/*PAGE
- *
- * rtems_region_extend
- *
- * This directive attempts to grow a region of physical contiguous memory area
- * from which variable sized segments can be allocated.
- *
- * Input parameters:
- * id - id of region to grow
- * start - starting address of memory area for extension
- * length - physical length in bytes to grow the region
- *
- * Output parameters:
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_region_extend(
- Objects_Id id,
- void *starting_address,
- unsigned32 length
-)
-{
- Region_Control *the_region;
- Objects_Locations location;
- unsigned32 amount_extended;
- Heap_Extend_status heap_status;
- rtems_status_code status;
-
- status = RTEMS_SUCCESSFUL;
-
- the_region = _Region_Get( id, &location );
- switch ( location ) {
- case OBJECTS_REMOTE: /* this error cannot be returned */
- return RTEMS_INTERNAL_ERROR;
-
- case OBJECTS_ERROR:
- return RTEMS_INVALID_ID;
-
- case OBJECTS_LOCAL:
-
- heap_status = _Heap_Extend(
- &the_region->Memory,
- starting_address,
- length,
- &amount_extended
- );
-
- switch ( heap_status ) {
- case HEAP_EXTEND_SUCCESSFUL:
- the_region->length += amount_extended;
- the_region->maximum_segment_size += amount_extended;
- break;
- case HEAP_EXTEND_ERROR:
- status = RTEMS_INVALID_ADDRESS;
- break;
- case HEAP_EXTEND_NOT_IMPLEMENTED:
- status = RTEMS_NOT_IMPLEMENTED;
- break;
- }
- _Thread_Enable_dispatch();
- return( status );
- }
-
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
-}
diff --git a/cpukit/rtems/src/regiongetsegment.c b/cpukit/rtems/src/regiongetsegment.c
deleted file mode 100644
index 07a31c011e..0000000000
--- a/cpukit/rtems/src/regiongetsegment.c
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Region Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
-#include <rtems/rtems/region.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-
-/*PAGE
- *
- * rtems_region_get_segment
- *
- * This directive will obtain a segment from the given region.
- *
- * Input parameters:
- * id - region id
- * size - segment size in bytes
- * option_set - wait option
- * timeout - number of ticks to wait (0 means wait forever)
- * segment - pointer to segment address
- *
- * Output parameters:
- * segment - pointer to segment address filled in
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_region_get_segment(
- Objects_Id id,
- unsigned32 size,
- rtems_option option_set,
- rtems_interval timeout,
- void **segment
-)
-{
- register Region_Control *the_region;
- Objects_Locations location;
- Thread_Control *executing;
- void *the_segment;
-
- *segment = NULL;
-
- if ( size == 0 )
- return RTEMS_INVALID_SIZE;
-
- executing = _Thread_Executing;
- the_region = _Region_Get( id, &location );
- switch ( location ) {
- case OBJECTS_REMOTE: /* this error cannot be returned */
- return RTEMS_INTERNAL_ERROR;
-
- case OBJECTS_ERROR:
- return RTEMS_INVALID_ID;
-
- case OBJECTS_LOCAL:
- if ( size > the_region->maximum_segment_size ) {
- _Thread_Enable_dispatch();
- return RTEMS_INVALID_SIZE;
- }
-
- _Region_Debug_Walk( the_region, 1 );
-
- the_segment = _Region_Allocate_segment( the_region, size );
-
- _Region_Debug_Walk( the_region, 2 );
-
- if ( the_segment ) {
- the_region->number_of_used_blocks += 1;
- _Thread_Enable_dispatch();
- *segment = the_segment;
- return RTEMS_SUCCESSFUL;
- }
-
- if ( _Options_Is_no_wait( option_set ) ) {
- _Thread_Enable_dispatch();
- return RTEMS_UNSATISFIED;
- }
-
- executing->Wait.queue = &the_region->Wait_queue;
- executing->Wait.id = id;
- executing->Wait.count = size;
- executing->Wait.return_argument = (unsigned32 *) segment;
-
- _Thread_queue_Enter_critical_section( &the_region->Wait_queue );
-
- _Thread_queue_Enqueue( &the_region->Wait_queue, timeout );
-
- _Thread_Enable_dispatch();
- return (rtems_status_code) executing->Wait.return_code;
- }
-
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
-}
diff --git a/cpukit/rtems/src/regiongetsegmentsize.c b/cpukit/rtems/src/regiongetsegmentsize.c
deleted file mode 100644
index 63d8c96b1c..0000000000
--- a/cpukit/rtems/src/regiongetsegmentsize.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Region Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
-#include <rtems/rtems/region.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-
-/*PAGE
- *
- * rtems_region_get_segment_size
- *
- * This directive will return the size of the segment indicated
- *
- * Input parameters:
- * id - region id
- * segment - segment address
- * size - pointer to segment size in bytes
- *
- * Output parameters:
- * size - segment size in bytes filled in
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_region_get_segment_size(
- Objects_Id id,
- void *segment,
- unsigned32 *size
-)
-{
- register Region_Control *the_region;
- Objects_Locations location;
- Thread_Control *executing;
-
- executing = _Thread_Executing;
- the_region = _Region_Get( id, &location );
- switch ( location ) {
- case OBJECTS_REMOTE: /* this error cannot be returned */
- return RTEMS_INTERNAL_ERROR;
-
- case OBJECTS_ERROR:
- return RTEMS_INVALID_ID;
-
- case OBJECTS_LOCAL:
-
- if ( _Heap_Size_of_user_area( &the_region->Memory, segment, size ) ) {
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
- }
- _Thread_Enable_dispatch();
- return RTEMS_INVALID_ADDRESS;
- }
-
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
-}
diff --git a/cpukit/rtems/src/regionident.c b/cpukit/rtems/src/regionident.c
deleted file mode 100644
index 57ca7638ed..0000000000
--- a/cpukit/rtems/src/regionident.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Region Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
-#include <rtems/rtems/region.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-
-/*PAGE
- *
- * rtems_region_ident
- *
- * This directive returns the system ID associated with
- * the region name.
- *
- * Input parameters:
- * name - user defined region name
- * id - pointer to region id
- *
- * Output parameters:
- * *id - region id
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_region_ident(
- rtems_name name,
- Objects_Id *id
-)
-{
- Objects_Name_to_id_errors status;
-
- status = _Objects_Name_to_id(
- &_Region_Information,
- &name,
- OBJECTS_SEARCH_LOCAL_NODE,
- id
- );
-
- return _Status_Object_name_errors_to_status[ status ];
-}
diff --git a/cpukit/rtems/src/regionmp.c b/cpukit/rtems/src/regionmp.c
deleted file mode 100644
index bd19e43ad0..0000000000
--- a/cpukit/rtems/src/regionmp.c
+++ /dev/null
@@ -1,309 +0,0 @@
-/*
- * Multiprocessing Support for the Region Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/score/mpci.h>
-#include <rtems/score/mppkt.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
-#include <rtems/rtems/region.h>
-#include <rtems/score/thread.h>
-#include <rtems/rtems/support.h>
-
-/*PAGE
- *
- * _Region_MP_Send_process_packet
- *
- */
-
-void _Region_MP_Send_process_packet (
- Region_MP_Remote_operations operation,
- Objects_Id region_id,
- rtems_name name,
- Objects_Id proxy_id
-)
-{
- Region_MP_Packet *the_packet;
- unsigned32 node;
-
- switch ( operation ) {
-
- case REGION_MP_ANNOUNCE_CREATE:
- case REGION_MP_ANNOUNCE_DELETE:
- case REGION_MP_EXTRACT_PROXY:
-
- the_packet = _Region_MP_Get_packet();
- the_packet->Prefix.the_class = MP_PACKET_REGION;
- the_packet->Prefix.length = sizeof ( Region_MP_Packet );
- the_packet->Prefix.to_convert = sizeof ( Region_MP_Packet );
- the_packet->operation = operation;
- the_packet->Prefix.id = region_id;
- the_packet->name = name;
- the_packet->proxy_id = proxy_id;
-
- if ( operation == REGION_MP_EXTRACT_PROXY )
- node = rtems_get_node( region_id );
- else
- node = MPCI_ALL_NODES;
-
- _MPCI_Send_process_packet( node, &the_packet->Prefix );
- break;
-
- case REGION_MP_GET_SEGMENT_REQUEST:
- case REGION_MP_GET_SEGMENT_RESPONSE:
- case REGION_MP_RETURN_SEGMENT_REQUEST:
- case REGION_MP_RETURN_SEGMENT_RESPONSE:
- break;
- }
-}
-
-/*PAGE
- *
- * _Region_MP_Send_request_packet
- *
- */
-
-rtems_status_code _Region_MP_Send_request_packet (
- Region_MP_Remote_operations operation,
- Objects_Id region_id,
- void *segment,
- unsigned32 size,
- rtems_option option_set,
- rtems_interval timeout
-)
-{
- Region_MP_Packet *the_packet;
-
- switch ( operation ) {
-
- case REGION_MP_GET_SEGMENT_REQUEST:
- case REGION_MP_RETURN_SEGMENT_REQUEST:
-
- the_packet = _Region_MP_Get_packet();
- the_packet->Prefix.the_class = MP_PACKET_REGION;
- the_packet->Prefix.length = sizeof ( Region_MP_Packet );
- the_packet->Prefix.to_convert = sizeof ( Region_MP_Packet );
- if ( ! _Options_Is_no_wait(option_set))
- the_packet->Prefix.timeout = timeout;
-
- the_packet->operation = operation;
- the_packet->Prefix.id = region_id;
- the_packet->segment = segment;
- the_packet->size = size;
- the_packet->option_set = option_set;
-
- return (rtems_status_code) _MPCI_Send_request_packet(
- rtems_get_node( region_id ),
- &the_packet->Prefix,
- STATES_READY /* Not used */
- );
- break;
-
- case REGION_MP_ANNOUNCE_CREATE:
- case REGION_MP_ANNOUNCE_DELETE:
- case REGION_MP_EXTRACT_PROXY:
- case REGION_MP_GET_SEGMENT_RESPONSE:
- case REGION_MP_RETURN_SEGMENT_RESPONSE:
- break;
-
- }
- /*
- * The following line is included to satisfy compilers which
- * produce warnings when a function does not end with a return.
- */
- return RTEMS_INTERNAL_ERROR;
-}
-
-/*PAGE
- *
- * _Region_MP_Send_response_packet
- *
- */
-
-void _Region_MP_Send_response_packet (
- Region_MP_Remote_operations operation,
- Objects_Id region_id,
- Thread_Control *the_thread
-)
-{
- Region_MP_Packet *the_packet;
-
- switch ( operation ) {
-
- case REGION_MP_GET_SEGMENT_RESPONSE:
- case REGION_MP_RETURN_SEGMENT_RESPONSE:
-
- the_packet = ( Region_MP_Packet *) the_thread->receive_packet;
-
-/*
- * The packet being returned already contains the class, length, and
- * to_convert fields, therefore they are not set in this routine.
- */
- the_packet->operation = operation;
- the_packet->Prefix.id = the_packet->Prefix.source_tid;
-
- _MPCI_Send_response_packet(
- rtems_get_node( the_packet->Prefix.source_tid ),
- &the_packet->Prefix
- );
- break;
-
- case REGION_MP_ANNOUNCE_CREATE:
- case REGION_MP_ANNOUNCE_DELETE:
- case REGION_MP_EXTRACT_PROXY:
- case REGION_MP_GET_SEGMENT_REQUEST:
- case REGION_MP_RETURN_SEGMENT_REQUEST:
- break;
-
- }
-}
-
-/*PAGE
- *
- *
- * _Region_MP_Process_packet
- *
- */
-
-void _Region_MP_Process_packet (
- rtems_packet_prefix *the_packet_prefix
-)
-{
- Region_MP_Packet *the_packet;
- Thread_Control *the_thread;
- boolean ignored;
-
- the_packet = (Region_MP_Packet *) the_packet_prefix;
-
- switch ( the_packet->operation ) {
-
- case REGION_MP_ANNOUNCE_CREATE:
-
- ignored = _Objects_MP_Allocate_and_open(
- &_Region_Information,
- the_packet->name,
- the_packet->Prefix.id,
- TRUE
- );
-
- _MPCI_Return_packet( the_packet_prefix );
- break;
-
- case REGION_MP_ANNOUNCE_DELETE:
-
- _Objects_MP_Close( &_Region_Information, the_packet->Prefix.id );
-
- _MPCI_Return_packet( the_packet_prefix );
- break;
-
- case REGION_MP_EXTRACT_PROXY:
-
- the_thread = _Thread_MP_Find_proxy( the_packet->proxy_id );
-
- if ( ! _Thread_Is_null( the_thread ) )
- _Thread_queue_Extract( the_thread->Wait.queue, the_thread );
-
- _MPCI_Return_packet( the_packet_prefix );
- break;
-
- case REGION_MP_GET_SEGMENT_REQUEST:
-
- the_packet->Prefix.return_code = rtems_region_get_segment(
- the_packet->Prefix.id,
- the_packet->size,
- the_packet->option_set,
- the_packet->Prefix.timeout,
- &the_packet->segment
- );
-
- _Region_MP_Send_response_packet(
- REGION_MP_GET_SEGMENT_RESPONSE,
- the_packet->Prefix.id,
- _Thread_Executing
- );
- break;
-
- case REGION_MP_GET_SEGMENT_RESPONSE:
-
- the_thread = _MPCI_Process_response( the_packet_prefix );
-
- *(void **)the_thread->Wait.return_argument = the_packet->segment;
-
- _MPCI_Return_packet( the_packet_prefix );
- break;
-
- case REGION_MP_RETURN_SEGMENT_REQUEST:
-
- the_packet->Prefix.return_code = rtems_region_return_segment(
- the_packet->Prefix.id,
- the_packet->segment
- );
-
- _Region_MP_Send_response_packet(
- REGION_MP_RETURN_SEGMENT_RESPONSE,
- the_packet->Prefix.id,
- _Thread_Executing
- );
- break;
-
- case REGION_MP_RETURN_SEGMENT_RESPONSE:
-
- the_thread = _MPCI_Process_response( the_packet_prefix );
-
- _MPCI_Return_packet( the_packet_prefix );
- break;
-
- }
-}
-
-/*PAGE
- *
- * _Region_MP_Send_object_was_deleted
- *
- * This routine is not needed by the Region since a region
- * cannot be deleted when segments are in use.
- *
- */
-
-/*PAGE
- *
- * _Region_MP_Send_extract_proxy
- *
- */
-
-void _Region_MP_Send_extract_proxy (
- Thread_Control *the_thread
-)
-{
- _Region_MP_Send_process_packet(
- REGION_MP_EXTRACT_PROXY,
- the_thread->Wait.id,
- (rtems_name) 0,
- the_thread->Object.id
- );
-}
-
-/*PAGE
- *
- * _Region_MP_Get_packet
- *
- */
-
-Region_MP_Packet *_Region_MP_Get_packet ( void )
-{
- return ( (Region_MP_Packet *) _MPCI_Get_packet() );
-}
-
-/* end of file */
diff --git a/cpukit/rtems/src/regionreturnsegment.c b/cpukit/rtems/src/regionreturnsegment.c
deleted file mode 100644
index e5174e578b..0000000000
--- a/cpukit/rtems/src/regionreturnsegment.c
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Region Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifdef RTEMS_REGION_SHRED_ON_FREE
-#include <string.h>
-
-#ifndef RTEMS_REGION_FREE_SHRED_PATTERN
-#define RTEMS_REGION_FREE_SHRED_PATTERN 0x00
-#endif
-#endif
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
-#include <rtems/rtems/region.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-
-/*PAGE
- *
- * rtems_region_return_segment
- *
- * This directive will return a segment to its region.
- *
- * Input parameters:
- * id - region id
- * segment - pointer to segment address
- *
- * Output parameters:
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_region_return_segment(
- Objects_Id id,
- void *segment
-)
-{
- register Region_Control *the_region;
- Thread_Control *the_thread;
- Objects_Locations location;
- void **the_segment;
-#ifdef RTEMS_REGION_FREE_SHRED_PATTERN
- unsigned32 size;
-#endif
- int status;
-
- the_region = _Region_Get( id, &location );
- switch ( location ) {
-
- case OBJECTS_REMOTE: /* this error cannot be returned */
- return RTEMS_INTERNAL_ERROR;
-
- case OBJECTS_ERROR:
- return RTEMS_INVALID_ID;
-
- case OBJECTS_LOCAL:
-
- _Region_Debug_Walk( the_region, 3 );
-
-#ifdef RTEMS_REGION_FREE_SHRED_PATTERN
- if ( _Heap_Size_of_user_area( &the_region->Memory, segment, size ) ) {
- memset(segment, (RTEMS_REGION_FREE_SHRED_PATTERN & 0xFF), size);
- } else {
- _Thread_Enable_dispatch();
- return RTEMS_INVALID_ADDRESS;
- }
-#endif
-
- status = _Region_Free_segment( the_region, segment );
-
- _Region_Debug_Walk( the_region, 4 );
-
- if ( !status ) {
- _Thread_Enable_dispatch();
- return RTEMS_INVALID_ADDRESS;
- }
-
- the_region->number_of_used_blocks -= 1;
- for ( ; ; ) {
- the_thread = _Thread_queue_First( &the_region->Wait_queue );
-
- if ( the_thread == NULL )
- break;
-
- the_segment = (void **) _Region_Allocate_segment(
- the_region,
- the_thread->Wait.count
- );
-
- if ( the_segment == NULL )
- break;
-
- *(void **)the_thread->Wait.return_argument = the_segment;
- the_region->number_of_used_blocks += 1;
- _Thread_queue_Extract( &the_region->Wait_queue, the_thread );
- the_thread->Wait.return_code = RTEMS_SUCCESSFUL;
- }
-
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
- }
-
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
-}
diff --git a/cpukit/rtems/src/rtclock.c b/cpukit/rtems/src/rtclock.c
deleted file mode 100644
index 7c5967f895..0000000000
--- a/cpukit/rtems/src/rtclock.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Clock Manager
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/clock.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/tod.h>
-#include <rtems/score/watchdog.h>
-
-/* No initialization routine */
diff --git a/cpukit/rtems/src/rtemstimer.c b/cpukit/rtems/src/rtemstimer.c
deleted file mode 100644
index e413681549..0000000000
--- a/cpukit/rtems/src/rtemstimer.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Timer Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/score/object.h>
-#include <rtems/score/thread.h>
-#include <rtems/rtems/timer.h>
-#include <rtems/score/tod.h>
-#include <rtems/score/watchdog.h>
-
-/*PAGE
- *
- * _Timer_Manager_initialization
- *
- * This routine initializes all timer manager related data structures.
- *
- * Input parameters:
- * maximum_timers - number of timers to initialize
- *
- * Output parameters: NONE
- */
-
-void _Timer_Manager_initialization(
- unsigned32 maximum_timers
-)
-{
- _Objects_Initialize_information(
- &_Timer_Information,
- OBJECTS_RTEMS_TIMERS,
- FALSE,
- maximum_timers,
- sizeof( Timer_Control ),
- FALSE,
- RTEMS_MAXIMUM_NAME_LENGTH,
- FALSE
- );
-}
diff --git a/cpukit/rtems/src/sem.c b/cpukit/rtems/src/sem.c
deleted file mode 100644
index 6f2db08ded..0000000000
--- a/cpukit/rtems/src/sem.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Semaphore Manager
- *
- * DESCRIPTION:
- *
- * This package is the implementation of the Semaphore Manager.
- * This manager utilizes standard Dijkstra counting semaphores to provide
- * synchronization and mutual exclusion capabilities.
- *
- * Directives provided are:
- *
- * + create a semaphore
- * + get an ID of a semaphore
- * + delete a semaphore
- * + acquire a semaphore
- * + release a semaphore
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/rtems/attr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
-#include <rtems/rtems/sem.h>
-#include <rtems/score/coremutex.h>
-#include <rtems/score/coresem.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-#include <rtems/score/sysstate.h>
-
-#include <rtems/score/interr.h>
-
-/*PAGE
- *
- * _Semaphore_Manager_initialization
- *
- * This routine initializes all semaphore manager related data structures.
- *
- * Input parameters:
- * maximum_semaphores - maximum configured semaphores
- *
- * Output parameters: NONE
- */
-
-void _Semaphore_Manager_initialization(
- unsigned32 maximum_semaphores
-)
-{
- _Objects_Initialize_information(
- &_Semaphore_Information,
- OBJECTS_RTEMS_SEMAPHORES,
- TRUE,
- maximum_semaphores,
- sizeof( Semaphore_Control ),
- FALSE,
- RTEMS_MAXIMUM_NAME_LENGTH,
- FALSE
- );
-
- /*
- * Register the MP Process Packet routine.
- */
-
-#if defined(RTEMS_MULTIPROCESSING)
- _MPCI_Register_packet_processor(
- MP_PACKET_SEMAPHORE,
- _Semaphore_MP_Process_packet
- );
-#endif
-
-}
diff --git a/cpukit/rtems/src/semcreate.c b/cpukit/rtems/src/semcreate.c
deleted file mode 100644
index a0c015cde4..0000000000
--- a/cpukit/rtems/src/semcreate.c
+++ /dev/null
@@ -1,231 +0,0 @@
-/*
- * Semaphore Manager
- *
- * DESCRIPTION:
- *
- * This package is the implementation of the Semaphore Manager.
- * This manager utilizes standard Dijkstra counting semaphores to provide
- * synchronization and mutual exclusion capabilities.
- *
- * Directives provided are:
- *
- * + create a semaphore
- * + get an ID of a semaphore
- * + delete a semaphore
- * + acquire a semaphore
- * + release a semaphore
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/rtems/attr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
-#include <rtems/rtems/sem.h>
-#include <rtems/score/coremutex.h>
-#include <rtems/score/coresem.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-#include <rtems/score/sysstate.h>
-
-#include <rtems/score/interr.h>
-
-/*PAGE
- *
- * rtems_semaphore_create
- *
- * This directive creates a semaphore and sets the initial value based
- * on the given count. A semaphore id is returned.
- *
- * Input parameters:
- * name - user defined semaphore name
- * count - initial count of semaphore
- * attribute_set - semaphore attributes
- * priority_ceiling - semaphore's ceiling priority
- * id - pointer to semaphore id
- *
- * Output parameters:
- * id - semaphore id
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_semaphore_create(
- rtems_name name,
- unsigned32 count,
- rtems_attribute attribute_set,
- rtems_task_priority priority_ceiling,
- Objects_Id *id
-)
-{
- register Semaphore_Control *the_semaphore;
- CORE_mutex_Attributes the_mutex_attributes;
- CORE_semaphore_Attributes the_semaphore_attributes;
- unsigned32 lock;
-
- if ( !rtems_is_name_valid( name ) )
- return RTEMS_INVALID_NAME;
-
-#if defined(RTEMS_MULTIPROCESSING)
- if ( _Attributes_Is_global( attribute_set ) ) {
-
- if ( !_System_state_Is_multiprocessing )
- return RTEMS_MP_NOT_CONFIGURED;
-
- if ( _Attributes_Is_inherit_priority( attribute_set ) )
- return RTEMS_NOT_DEFINED;
-
- } else
-#endif
-
- if ( _Attributes_Is_inherit_priority( attribute_set ) ||
- _Attributes_Is_priority_ceiling( attribute_set ) ) {
-
- if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) ||
- _Attributes_Is_simple_binary_semaphore( attribute_set )) &&
-
- _Attributes_Is_priority( attribute_set ) ) )
- return RTEMS_NOT_DEFINED;
-
- }
-
- if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) )
- return RTEMS_INVALID_NUMBER;
-
- _Thread_Disable_dispatch(); /* prevents deletion */
-
- the_semaphore = _Semaphore_Allocate();
-
- if ( !the_semaphore ) {
- _Thread_Enable_dispatch();
- return RTEMS_TOO_MANY;
- }
-
-#if defined(RTEMS_MULTIPROCESSING)
- if ( _Attributes_Is_global( attribute_set ) &&
- ! ( _Objects_MP_Allocate_and_open( &_Semaphore_Information, name,
- the_semaphore->Object.id, FALSE ) ) ) {
- _Semaphore_Free( the_semaphore );
- _Thread_Enable_dispatch();
- return RTEMS_TOO_MANY;
- }
-#endif
-
- the_semaphore->attribute_set = attribute_set;
-
- /*
- * If it is not a counting semaphore, then it is either a
- * simple binary semaphore or a more powerful mutex style binary
- * semaphore.
- */
-
- if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) {
- if ( _Attributes_Is_inherit_priority( attribute_set ) )
- the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
- else if ( _Attributes_Is_priority_ceiling( attribute_set ) )
- the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
- else if ( _Attributes_Is_priority( attribute_set ) )
- the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY;
- else
- the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
-
-
- if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
- the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
-
- switch ( the_mutex_attributes.discipline ) {
- case CORE_MUTEX_DISCIPLINES_FIFO:
- case CORE_MUTEX_DISCIPLINES_PRIORITY:
- the_mutex_attributes.only_owner_release = FALSE;
- break;
- case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING:
- case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT:
- the_mutex_attributes.only_owner_release = TRUE;
- break;
- }
- } else {
- the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS;
- the_mutex_attributes.only_owner_release = FALSE;
- }
-
- the_mutex_attributes.priority_ceiling = priority_ceiling;
-
- if ( count == 1 )
- lock = CORE_MUTEX_UNLOCKED;
- else
- lock = CORE_MUTEX_LOCKED;
-
- _CORE_mutex_Initialize(
- &the_semaphore->Core_control.mutex,
- OBJECTS_RTEMS_SEMAPHORES,
- &the_mutex_attributes,
- lock,
-#if defined(RTEMS_MULTIPROCESSING)
- _Semaphore_MP_Send_extract_proxy
-#else
- NULL
-#endif
- );
- } else {
- if ( _Attributes_Is_priority( attribute_set ) )
- the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY;
- else
- the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO;
-
- /*
- * This effectively disables limit checking.
- */
-
- the_semaphore_attributes.maximum_count = 0xFFFFFFFF;
-
- /*
- * The following are just to make Purify happy.
- */
-
- the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
- the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM;
-
- _CORE_semaphore_Initialize(
- &the_semaphore->Core_control.semaphore,
- OBJECTS_RTEMS_SEMAPHORES,
- &the_semaphore_attributes,
- count,
-#if defined(RTEMS_MULTIPROCESSING)
- _Semaphore_MP_Send_extract_proxy
-#else
- NULL
-#endif
- );
- }
-
- _Objects_Open( &_Semaphore_Information, &the_semaphore->Object, &name );
-
- *id = the_semaphore->Object.id;
-
-#if defined(RTEMS_MULTIPROCESSING)
- if ( _Attributes_Is_global( attribute_set ) )
- _Semaphore_MP_Send_process_packet(
- SEMAPHORE_MP_ANNOUNCE_CREATE,
- the_semaphore->Object.id,
- name,
- 0 /* Not used */
- );
-#endif
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
-}
diff --git a/cpukit/rtems/src/semdelete.c b/cpukit/rtems/src/semdelete.c
deleted file mode 100644
index 1e9b165c71..0000000000
--- a/cpukit/rtems/src/semdelete.c
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Semaphore Manager
- *
- * DESCRIPTION:
- *
- * This package is the implementation of the Semaphore Manager.
- * This manager utilizes standard Dijkstra counting semaphores to provide
- * synchronization and mutual exclusion capabilities.
- *
- * Directives provided are:
- *
- * + create a semaphore
- * + get an ID of a semaphore
- * + delete a semaphore
- * + acquire a semaphore
- * + release a semaphore
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/rtems/attr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
-#include <rtems/rtems/sem.h>
-#include <rtems/score/coremutex.h>
-#include <rtems/score/coresem.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-#include <rtems/score/sysstate.h>
-
-#include <rtems/score/interr.h>
-
-/*PAGE
- *
- * rtems_semaphore_delete
- *
- * This directive allows a thread to delete a semaphore specified by
- * the semaphore id. The semaphore is freed back to the inactive
- * semaphore chain.
- *
- * Input parameters:
- * id - semaphore id
- *
- * Output parameters:
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_semaphore_delete(
- Objects_Id id
-)
-{
- register Semaphore_Control *the_semaphore;
- Objects_Locations location;
-
- the_semaphore = _Semaphore_Get( id, &location );
- switch ( location ) {
-
- case OBJECTS_REMOTE:
-#if defined(RTEMS_MULTIPROCESSING)
- _Thread_Dispatch();
- return RTEMS_ILLEGAL_ON_REMOTE_OBJECT;
-#endif
-
- case OBJECTS_ERROR:
- return RTEMS_INVALID_ID;
-
- case OBJECTS_LOCAL:
- if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
- if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) ) {
- _Thread_Enable_dispatch();
- return RTEMS_RESOURCE_IN_USE;
- }
- else
- _CORE_mutex_Flush(
- &the_semaphore->Core_control.mutex,
-#if defined(RTEMS_MULTIPROCESSING)
- _Semaphore_MP_Send_object_was_deleted,
-#else
- NULL,
-#endif
- CORE_MUTEX_WAS_DELETED
- );
- }
- else
- _CORE_semaphore_Flush(
- &the_semaphore->Core_control.semaphore,
-#if defined(RTEMS_MULTIPROCESSING)
- _Semaphore_MP_Send_object_was_deleted,
-#else
- NULL,
-#endif
- CORE_SEMAPHORE_WAS_DELETED
- );
-
- _Objects_Close( &_Semaphore_Information, &the_semaphore->Object );
-
- _Semaphore_Free( the_semaphore );
-
-#if defined(RTEMS_MULTIPROCESSING)
- if ( _Attributes_Is_global( the_semaphore->attribute_set ) ) {
-
- _Objects_MP_Close( &_Semaphore_Information, the_semaphore->Object.id );
-
- _Semaphore_MP_Send_process_packet(
- SEMAPHORE_MP_ANNOUNCE_DELETE,
- the_semaphore->Object.id,
- 0, /* Not used */
- 0 /* Not used */
- );
- }
-#endif
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
- }
-
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
-}
diff --git a/cpukit/rtems/src/semflush.c b/cpukit/rtems/src/semflush.c
deleted file mode 100644
index dcdd8b1b34..0000000000
--- a/cpukit/rtems/src/semflush.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * rtems_semaphore_flush
- *
- * DESCRIPTION:
- *
- * This package is the implementation of the flush directive
- * of the Semaphore Manager.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/rtems/attr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
-#include <rtems/rtems/sem.h>
-#include <rtems/score/coremutex.h>
-#include <rtems/score/coresem.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-#include <rtems/score/sysstate.h>
-
-#include <rtems/score/interr.h>
-
-/*PAGE
- *
- * rtems_semaphore_flush
- *
- * This directive allows a thread to flush the threads
- * pending on the semaphore.
- *
- * Input parameters:
- * id - semaphore id
- *
- * Output parameters:
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-#if defined(RTEMS_MULTIPROCESSING)
-#define SEND_OBJECT_WAS_DELETED _Semaphore_MP_Send_object_was_deleted
-#else
-#define SEND_OBJECT_WAS_DELETED NULL
-#endif
-
-rtems_status_code rtems_semaphore_flush(
- Objects_Id id
-)
-{
- register Semaphore_Control *the_semaphore;
- Objects_Locations location;
-
- the_semaphore = _Semaphore_Get( id, &location );
- switch ( location ) {
-
- case OBJECTS_REMOTE:
-#if defined(RTEMS_MULTIPROCESSING)
- _Thread_Dispatch();
- return RTEMS_ILLEGAL_ON_REMOTE_OBJECT;
-#endif
-
- case OBJECTS_ERROR:
- return RTEMS_INVALID_ID;
-
- case OBJECTS_LOCAL:
- if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
- _CORE_mutex_Flush(
- &the_semaphore->Core_control.mutex,
- SEND_OBJECT_WAS_DELETED,
- CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT
- );
- } else {
- _CORE_semaphore_Flush(
- &the_semaphore->Core_control.semaphore,
- SEND_OBJECT_WAS_DELETED,
- CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT
- );
- }
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
- }
-
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
-}
diff --git a/cpukit/rtems/src/semident.c b/cpukit/rtems/src/semident.c
deleted file mode 100644
index 638cda505e..0000000000
--- a/cpukit/rtems/src/semident.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Semaphore Manager
- *
- * DESCRIPTION:
- *
- * This package is the implementation of the Semaphore Manager.
- * This manager utilizes standard Dijkstra counting semaphores to provide
- * synchronization and mutual exclusion capabilities.
- *
- * Directives provided are:
- *
- * + create a semaphore
- * + get an ID of a semaphore
- * + delete a semaphore
- * + acquire a semaphore
- * + release a semaphore
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/rtems/attr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
-#include <rtems/rtems/sem.h>
-#include <rtems/score/coremutex.h>
-#include <rtems/score/coresem.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-#include <rtems/score/sysstate.h>
-
-#include <rtems/score/interr.h>
-
-/*PAGE
- *
- * rtems_semaphore_ident
- *
- * This directive returns the system ID associated with
- * the semaphore name.
- *
- * Input parameters:
- * name - user defined semaphore name
- * node - node(s) to be searched
- * id - pointer to semaphore id
- *
- * Output parameters:
- * *id - semaphore id
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_semaphore_ident(
- rtems_name name,
- unsigned32 node,
- Objects_Id *id
-)
-{
- Objects_Name_to_id_errors status;
-
- status = _Objects_Name_to_id( &_Semaphore_Information, &name, node, id );
-
- return _Status_Object_name_errors_to_status[ status ];
-}
diff --git a/cpukit/rtems/src/semmp.c b/cpukit/rtems/src/semmp.c
deleted file mode 100644
index f479467bc9..0000000000
--- a/cpukit/rtems/src/semmp.c
+++ /dev/null
@@ -1,361 +0,0 @@
-/*
- * Multiprocessing Support for the Semaphore Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/score/mpci.h>
-#include <rtems/score/mppkt.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
-#include <rtems/rtems/sem.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/rtems/support.h>
-
-/*PAGE
- *
- * _Semaphore_MP_Send_process_packet
- *
- */
-
-void _Semaphore_MP_Send_process_packet (
- Semaphore_MP_Remote_operations operation,
- Objects_Id semaphore_id,
- rtems_name name,
- Objects_Id proxy_id
-)
-{
- Semaphore_MP_Packet *the_packet;
- unsigned32 node;
-
- switch ( operation ) {
-
- case SEMAPHORE_MP_ANNOUNCE_CREATE:
- case SEMAPHORE_MP_ANNOUNCE_DELETE:
- case SEMAPHORE_MP_EXTRACT_PROXY:
-
- the_packet = _Semaphore_MP_Get_packet();
- the_packet->Prefix.the_class = MP_PACKET_SEMAPHORE;
- the_packet->Prefix.length = sizeof ( Semaphore_MP_Packet );
- the_packet->Prefix.to_convert = sizeof ( Semaphore_MP_Packet );
- the_packet->operation = operation;
- the_packet->Prefix.id = semaphore_id;
- the_packet->name = name;
- the_packet->proxy_id = proxy_id;
-
- if ( operation == SEMAPHORE_MP_EXTRACT_PROXY )
- node = rtems_get_node( semaphore_id );
- else
- node = MPCI_ALL_NODES;
-
- _MPCI_Send_process_packet( node, &the_packet->Prefix );
- break;
-
- case SEMAPHORE_MP_OBTAIN_REQUEST:
- case SEMAPHORE_MP_OBTAIN_RESPONSE:
- case SEMAPHORE_MP_RELEASE_REQUEST:
- case SEMAPHORE_MP_RELEASE_RESPONSE:
- break;
- }
-}
-
-/*PAGE
- *
- * _Semaphore_MP_Send_request_packet
- *
- */
-
-rtems_status_code _Semaphore_MP_Send_request_packet (
- Semaphore_MP_Remote_operations operation,
- Objects_Id semaphore_id,
- rtems_option option_set,
- rtems_interval timeout
-)
-{
- Semaphore_MP_Packet *the_packet;
-
- switch ( operation ) {
-
- case SEMAPHORE_MP_OBTAIN_REQUEST:
- case SEMAPHORE_MP_RELEASE_REQUEST:
-
- the_packet = _Semaphore_MP_Get_packet();
- the_packet->Prefix.the_class = MP_PACKET_SEMAPHORE;
- the_packet->Prefix.length = sizeof ( Semaphore_MP_Packet );
- the_packet->Prefix.to_convert = sizeof ( Semaphore_MP_Packet );
- if ( ! _Options_Is_no_wait(option_set))
- the_packet->Prefix.timeout = timeout;
-
- the_packet->operation = operation;
- the_packet->Prefix.id = semaphore_id;
- the_packet->option_set = option_set;
-
- return _MPCI_Send_request_packet(
- rtems_get_node( semaphore_id ),
- &the_packet->Prefix,
- STATES_WAITING_FOR_SEMAPHORE
- );
- break;
-
- case SEMAPHORE_MP_ANNOUNCE_CREATE:
- case SEMAPHORE_MP_ANNOUNCE_DELETE:
- case SEMAPHORE_MP_EXTRACT_PROXY:
- case SEMAPHORE_MP_OBTAIN_RESPONSE:
- case SEMAPHORE_MP_RELEASE_RESPONSE:
- break;
-
- }
- /*
- * The following line is included to satisfy compilers which
- * produce warnings when a function does not end with a return.
- */
- return RTEMS_SUCCESSFUL;
-}
-
-/*PAGE
- *
- * _Semaphore_MP_Send_response_packet
- *
- */
-
-void _Semaphore_MP_Send_response_packet (
- Semaphore_MP_Remote_operations operation,
- Objects_Id semaphore_id,
- Thread_Control *the_thread
-)
-{
- Semaphore_MP_Packet *the_packet;
-
- switch ( operation ) {
-
- case SEMAPHORE_MP_OBTAIN_RESPONSE:
- case SEMAPHORE_MP_RELEASE_RESPONSE:
-
- the_packet = ( Semaphore_MP_Packet *) the_thread->receive_packet;
-
-/*
- * The packet being returned already contains the class, length, and
- * to_convert fields, therefore they are not set in this routine.
- */
- the_packet->operation = operation;
- the_packet->Prefix.id = the_packet->Prefix.source_tid;
-
- _MPCI_Send_response_packet(
- rtems_get_node( the_packet->Prefix.source_tid ),
- &the_packet->Prefix
- );
- break;
-
- case SEMAPHORE_MP_ANNOUNCE_CREATE:
- case SEMAPHORE_MP_ANNOUNCE_DELETE:
- case SEMAPHORE_MP_EXTRACT_PROXY:
- case SEMAPHORE_MP_OBTAIN_REQUEST:
- case SEMAPHORE_MP_RELEASE_REQUEST:
- break;
-
- }
-}
-
-/*PAGE
- *
- *
- * _Semaphore_MP_Process_packet
- *
- */
-
-void _Semaphore_MP_Process_packet (
- rtems_packet_prefix *the_packet_prefix
-)
-{
- Semaphore_MP_Packet *the_packet;
- Thread_Control *the_thread;
- boolean ignored;
-
- the_packet = (Semaphore_MP_Packet *) the_packet_prefix;
-
- switch ( the_packet->operation ) {
-
- case SEMAPHORE_MP_ANNOUNCE_CREATE:
-
- ignored = _Objects_MP_Allocate_and_open(
- &_Semaphore_Information,
- the_packet->name,
- the_packet->Prefix.id,
- TRUE
- );
-
- _MPCI_Return_packet( the_packet_prefix );
- break;
-
- case SEMAPHORE_MP_ANNOUNCE_DELETE:
-
- _Objects_MP_Close( &_Semaphore_Information, the_packet->Prefix.id );
-
- _MPCI_Return_packet( the_packet_prefix );
- break;
-
- case SEMAPHORE_MP_EXTRACT_PROXY:
-
- the_thread = _Thread_MP_Find_proxy( the_packet->proxy_id );
-
- if ( ! _Thread_Is_null( the_thread ) )
- _Thread_queue_Extract( the_thread->Wait.queue, the_thread );
-
- _MPCI_Return_packet( the_packet_prefix );
- break;
-
- case SEMAPHORE_MP_OBTAIN_REQUEST:
-
- the_packet->Prefix.return_code = rtems_semaphore_obtain(
- the_packet->Prefix.id,
- the_packet->option_set,
- the_packet->Prefix.timeout
- );
-
- if ( ! _Thread_Is_proxy_blocking( the_packet->Prefix.return_code ) )
- _Semaphore_MP_Send_response_packet(
- SEMAPHORE_MP_OBTAIN_RESPONSE,
- the_packet->Prefix.id,
- _Thread_Executing
- );
- break;
-
- case SEMAPHORE_MP_OBTAIN_RESPONSE:
- case SEMAPHORE_MP_RELEASE_RESPONSE:
-
- the_thread = _MPCI_Process_response( the_packet_prefix );
-
- _MPCI_Return_packet( the_packet_prefix );
- break;
-
- case SEMAPHORE_MP_RELEASE_REQUEST:
-
- the_packet->Prefix.return_code = rtems_semaphore_release(
- the_packet->Prefix.id
- );
-
- _Semaphore_MP_Send_response_packet(
- SEMAPHORE_MP_RELEASE_RESPONSE,
- the_packet->Prefix.id,
- _Thread_Executing
- );
- break;
- }
-}
-
-/*PAGE
- *
- * _Semaphore_MP_Send_object_was_deleted
- *
- */
-
-void _Semaphore_MP_Send_object_was_deleted (
- Thread_Control *the_proxy
-)
-{
- the_proxy->receive_packet->return_code = RTEMS_OBJECT_WAS_DELETED;
-
- _Semaphore_MP_Send_response_packet(
- SEMAPHORE_MP_OBTAIN_RESPONSE,
- the_proxy->Wait.id,
- the_proxy
- );
-
-}
-
-/*PAGE
- *
- * _Semaphore_MP_Send_extract_proxy
- *
- */
-
-void _Semaphore_MP_Send_extract_proxy (
- Thread_Control *the_thread
-)
-{
- _Semaphore_MP_Send_process_packet(
- SEMAPHORE_MP_EXTRACT_PROXY,
- the_thread->Wait.id,
- (rtems_name) 0,
- the_thread->Object.id
- );
-
-}
-
-/*PAGE
- *
- * _Semaphore_MP_Get_packet
- *
- */
-
-Semaphore_MP_Packet *_Semaphore_MP_Get_packet ( void )
-{
- return ( (Semaphore_MP_Packet *) _MPCI_Get_packet() );
-}
-
-/*PAGE
- *
- * _Semaphore_Core_mutex_mp_support
- *
- * Input parameters:
- * the_thread - the remote thread the semaphore was surrendered to
- * id - id of the surrendered semaphore
- *
- * Output parameters: NONE
- */
-
-#if defined(RTEMS_MULTIPROCESSING)
-void _Semaphore_Core_mutex_mp_support (
- Thread_Control *the_thread,
- Objects_Id id
-)
-{
- the_thread->receive_packet->return_code = RTEMS_SUCCESSFUL;
-
- _Semaphore_MP_Send_response_packet(
- SEMAPHORE_MP_OBTAIN_RESPONSE,
- id,
- the_thread
- );
-}
-#endif
-
-
-/*PAGE
- *
- * _Semaphore_Core_semaphore_mp_support
- *
- * Input parameters:
- * the_thread - the remote thread the semaphore was surrendered to
- * id - id of the surrendered semaphore
- *
- * Output parameters: NONE
- */
-
-#if defined(RTEMS_MULTIPROCESSING)
-void _Semaphore_Core_semaphore_mp_support (
- Thread_Control *the_thread,
- Objects_Id id
-)
-{
- the_thread->receive_packet->return_code = RTEMS_SUCCESSFUL;
-
- _Semaphore_MP_Send_response_packet(
- SEMAPHORE_MP_OBTAIN_RESPONSE,
- id,
- the_thread
- );
-}
-#endif
-/* end of file */
diff --git a/cpukit/rtems/src/semobtain.c b/cpukit/rtems/src/semobtain.c
deleted file mode 100644
index fef659d3cb..0000000000
--- a/cpukit/rtems/src/semobtain.c
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Semaphore Manager
- *
- * DESCRIPTION:
- *
- * This package is the implementation of the Semaphore Manager.
- * This manager utilizes standard Dijkstra counting semaphores to provide
- * synchronization and mutual exclusion capabilities.
- *
- * Directives provided are:
- *
- * + create a semaphore
- * + get an ID of a semaphore
- * + delete a semaphore
- * + acquire a semaphore
- * + release a semaphore
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/rtems/attr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
-#include <rtems/rtems/sem.h>
-#include <rtems/score/coremutex.h>
-#include <rtems/score/coresem.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-#include <rtems/score/sysstate.h>
-
-#include <rtems/score/interr.h>
-
-/*PAGE
- *
- * rtems_semaphore_obtain
- *
- * This directive allows a thread to acquire a semaphore.
- *
- * Input parameters:
- * id - semaphore id
- * option_set - wait option
- * timeout - number of ticks to wait (0 means wait forever)
- *
- * Output parameters:
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_semaphore_obtain(
- Objects_Id id,
- unsigned32 option_set,
- rtems_interval timeout
-)
-{
- register Semaphore_Control *the_semaphore;
- Objects_Locations location;
- boolean wait;
-
- the_semaphore = _Semaphore_Get( id, &location );
- switch ( location ) {
- case OBJECTS_REMOTE:
-#if defined(RTEMS_MULTIPROCESSING)
- return _Semaphore_MP_Send_request_packet(
- SEMAPHORE_MP_OBTAIN_REQUEST,
- id,
- option_set,
- timeout
- );
-#endif
-
- case OBJECTS_ERROR:
- return RTEMS_INVALID_ID;
-
- case OBJECTS_LOCAL:
- if ( _Options_Is_no_wait( option_set ) )
- wait = FALSE;
- else
- wait = TRUE;
-
- if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
- _CORE_mutex_Seize(
- &the_semaphore->Core_control.mutex,
- id,
- wait,
- timeout
- );
- _Thread_Enable_dispatch();
- return _Semaphore_Translate_core_mutex_return_code(
- _Thread_Executing->Wait.return_code );
- } else {
- _CORE_semaphore_Seize(
- &the_semaphore->Core_control.semaphore,
- id,
- wait,
- timeout
- );
- _Thread_Enable_dispatch();
- return _Semaphore_Translate_core_semaphore_return_code(
- _Thread_Executing->Wait.return_code );
- }
- }
-
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
-}
diff --git a/cpukit/rtems/src/semrelease.c b/cpukit/rtems/src/semrelease.c
deleted file mode 100644
index 2f05b6503f..0000000000
--- a/cpukit/rtems/src/semrelease.c
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Semaphore Manager
- *
- * DESCRIPTION:
- *
- * This package is the implementation of the Semaphore Manager.
- * This manager utilizes standard Dijkstra counting semaphores to provide
- * synchronization and mutual exclusion capabilities.
- *
- * Directives provided are:
- *
- * + create a semaphore
- * + get an ID of a semaphore
- * + delete a semaphore
- * + acquire a semaphore
- * + release a semaphore
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/rtems/attr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
-#include <rtems/rtems/sem.h>
-#include <rtems/score/coremutex.h>
-#include <rtems/score/coresem.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-#include <rtems/score/sysstate.h>
-
-#include <rtems/score/interr.h>
-
-/*PAGE
- *
- * rtems_semaphore_release
- *
- * This directive allows a thread to release a semaphore.
- *
- * Input parameters:
- * id - semaphore id
- *
- * Output parameters:
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_semaphore_release(
- Objects_Id id
-)
-{
- register Semaphore_Control *the_semaphore;
- Objects_Locations location;
- CORE_mutex_Status mutex_status;
- CORE_semaphore_Status semaphore_status;
-
- the_semaphore = _Semaphore_Get( id, &location );
- switch ( location ) {
-
- case OBJECTS_REMOTE:
-#if defined(RTEMS_MULTIPROCESSING)
- return _Semaphore_MP_Send_request_packet(
- SEMAPHORE_MP_RELEASE_REQUEST,
- id,
- 0, /* Not used */
- MPCI_DEFAULT_TIMEOUT
- );
-#endif
-
- case OBJECTS_ERROR:
- return RTEMS_INVALID_ID;
-
- case OBJECTS_LOCAL:
- if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
- mutex_status = _CORE_mutex_Surrender(
- &the_semaphore->Core_control.mutex,
- id,
-#if defined(RTEMS_MULTIPROCESSING)
- _Semaphore_Core_mutex_mp_support
-#else
- NULL
-#endif
- );
- _Thread_Enable_dispatch();
- return _Semaphore_Translate_core_mutex_return_code( mutex_status );
- }
- else
- semaphore_status = _CORE_semaphore_Surrender(
- &the_semaphore->Core_control.semaphore,
- id,
-#if defined(RTEMS_MULTIPROCESSING)
- _Semaphore_Core_semaphore_mp_support
-#else
- NULL
-#endif
- );
- _Thread_Enable_dispatch();
- return
- _Semaphore_Translate_core_semaphore_return_code( semaphore_status );
- }
-
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
-}
diff --git a/cpukit/rtems/src/semtranslatereturncode.c b/cpukit/rtems/src/semtranslatereturncode.c
deleted file mode 100644
index 19d2ce09d7..0000000000
--- a/cpukit/rtems/src/semtranslatereturncode.c
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Semaphore Manager
- *
- * DESCRIPTION:
- *
- * This package is the implementation of the Semaphore Manager.
- * This manager utilizes standard Dijkstra counting semaphores to provide
- * synchronization and mutual exclusion capabilities.
- *
- * Directives provided are:
- *
- * + create a semaphore
- * + get an ID of a semaphore
- * + delete a semaphore
- * + acquire a semaphore
- * + release a semaphore
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/rtems/attr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
-#include <rtems/rtems/sem.h>
-#include <rtems/score/coremutex.h>
-#include <rtems/score/coresem.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-#include <rtems/score/sysstate.h>
-
-#include <rtems/score/interr.h>
-
-/*PAGE
- *
- * _Semaphore_Translate_core_mutex_return_code
- *
- * Input parameters:
- * the_mutex_status - mutex status code to translate
- *
- * Output parameters:
- * rtems status code - translated RTEMS status code
- *
- */
-
-rtems_status_code _Semaphore_Translate_core_mutex_return_code (
- unsigned32 the_mutex_status
-)
-{
- switch ( the_mutex_status ) {
- case CORE_MUTEX_STATUS_SUCCESSFUL:
- return RTEMS_SUCCESSFUL;
- case CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT:
- return RTEMS_UNSATISFIED;
- case CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED:
- return RTEMS_UNSATISFIED;
- case CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE:
- return RTEMS_NOT_OWNER_OF_RESOURCE;
- case CORE_MUTEX_WAS_DELETED:
- return RTEMS_OBJECT_WAS_DELETED;
- case CORE_MUTEX_TIMEOUT:
- return RTEMS_TIMEOUT;
- case THREAD_STATUS_PROXY_BLOCKING:
- return RTEMS_PROXY_BLOCKING;
- }
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
-}
-
-/*PAGE
- *
- * _Semaphore_Translate_core_semaphore_return_code
- *
- * Input parameters:
- * the_semaphore_status - semaphore status code to translate
- *
- * Output parameters:
- * rtems status code - translated RTEMS status code
- *
- */
-
-rtems_status_code _Semaphore_Translate_core_semaphore_return_code (
- unsigned32 the_semaphore_status
-)
-{
- switch ( the_semaphore_status ) {
- case CORE_SEMAPHORE_STATUS_SUCCESSFUL:
- return RTEMS_SUCCESSFUL;
- case CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT:
- return RTEMS_UNSATISFIED;
- case CORE_SEMAPHORE_WAS_DELETED:
- return RTEMS_OBJECT_WAS_DELETED;
- case CORE_SEMAPHORE_TIMEOUT:
- return RTEMS_TIMEOUT;
-
- /*
- * An overflow should not occur in the Classic API.
- */
-
- case CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED:
- return RTEMS_INTERNAL_ERROR;
-
- case THREAD_STATUS_PROXY_BLOCKING:
- return RTEMS_PROXY_BLOCKING;
- }
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
-}
diff --git a/cpukit/rtems/src/signal.c b/cpukit/rtems/src/signal.c
deleted file mode 100644
index 618eb22824..0000000000
--- a/cpukit/rtems/src/signal.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Signal Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/asr.h>
-#include <rtems/score/isr.h>
-#include <rtems/rtems/modes.h>
-#include <rtems/rtems/signal.h>
-#include <rtems/score/thread.h>
-#include <rtems/rtems/tasks.h>
-
-/*PAGE
- *
- * _Signal_Manager_initialization
- *
- * This routine initializes all signal manager related data structures.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- */
-
-void _Signal_Manager_initialization( void )
-{
- /*
- * Register the MP Process Packet routine.
- */
-
-#if defined(RTEMS_MULTIPROCESSING)
- _MPCI_Register_packet_processor(
- MP_PACKET_SIGNAL,
- _Signal_MP_Process_packet
- );
-#endif
-}
diff --git a/cpukit/rtems/src/signalcatch.c b/cpukit/rtems/src/signalcatch.c
deleted file mode 100644
index d07d1d5fca..0000000000
--- a/cpukit/rtems/src/signalcatch.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Signal Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/asr.h>
-#include <rtems/score/isr.h>
-#include <rtems/rtems/modes.h>
-#include <rtems/rtems/signal.h>
-#include <rtems/score/thread.h>
-#include <rtems/rtems/tasks.h>
-
-/*PAGE
- *
- * rtems_signal_catch
- *
- * This directive allows a thread to specify what action to take when
- * catching signals.
- *
- * Input parameters:
- * handler - address of asynchronous signal routine (asr)
- * ( NULL indicates asr is invalid )
- * mode_set - mode value for asr
- *
- * Output parameters:
- * RTEMS_SUCCESSFUL - always succeeds
- */
-
-rtems_status_code rtems_signal_catch(
- rtems_asr_entry asr_handler,
- rtems_mode mode_set
-)
-{
- Thread_Control *executing;
- RTEMS_API_Control *api;
- ASR_Information *asr;
-
-/* XXX normalize mode */
- executing = _Thread_Executing;
- api = executing->API_Extensions[ THREAD_API_RTEMS ];
- asr = &api->Signal;
-
- _Thread_Disable_dispatch(); /* cannot reschedule while */
- /* the thread is inconsistent */
-
- if ( !_ASR_Is_null_handler( asr_handler ) ) {
- asr->mode_set = mode_set;
- asr->handler = asr_handler;
- }
- else
- _ASR_Initialize( asr );
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
-}
diff --git a/cpukit/rtems/src/signalmp.c b/cpukit/rtems/src/signalmp.c
deleted file mode 100644
index e50f9ea6da..0000000000
--- a/cpukit/rtems/src/signalmp.c
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * Multiprocessing Support for the Signal Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/score/mpci.h>
-#include <rtems/score/mppkt.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
-#include <rtems/rtems/signal.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/rtems/support.h>
-
-/*PAGE
- *
- * _Signal_MP_Send_process_packet
- *
- * This subprogram is not needed since there are no process
- * packets to be sent by this manager.
- *
- */
-
-/*PAGE
- *
- * _Signal_MP_Send_request_packet
- *
- */
-
-rtems_status_code _Signal_MP_Send_request_packet (
- Signal_MP_Remote_operations operation,
- Objects_Id task_id,
- rtems_signal_set signal_in
-)
-{
- Signal_MP_Packet *the_packet;
-
- switch ( operation ) {
-
- case SIGNAL_MP_SEND_REQUEST:
-
- the_packet = _Signal_MP_Get_packet();
- the_packet->Prefix.the_class = MP_PACKET_SIGNAL;
- the_packet->Prefix.length = sizeof ( Signal_MP_Packet );
- the_packet->Prefix.to_convert = sizeof ( Signal_MP_Packet );
- the_packet->operation = operation;
- the_packet->Prefix.id = task_id;
- the_packet->signal_in = signal_in;
-
- return _MPCI_Send_request_packet(
- rtems_get_node( task_id ),
- &the_packet->Prefix,
- STATES_READY /* Not used */
- );
- break;
-
- case SIGNAL_MP_SEND_RESPONSE:
- break;
-
- }
- /*
- * The following line is included to satisfy compilers which
- * produce warnings when a function does not end with a return.
- */
- return RTEMS_INTERNAL_ERROR;
-}
-
-/*PAGE
- *
- * _Signal_MP_Send_response_packet
- *
- */
-
-void _Signal_MP_Send_response_packet (
- Signal_MP_Remote_operations operation,
- Thread_Control *the_thread
-)
-{
- Signal_MP_Packet *the_packet;
-
- switch ( operation ) {
-
- case SIGNAL_MP_SEND_RESPONSE:
-
- the_packet = ( Signal_MP_Packet *) the_thread->receive_packet;
-
-/*
- * The packet being returned already contains the class, length, and
- * to_convert fields, therefore they are not set in this routine.
- */
- the_packet->operation = operation;
- the_packet->Prefix.id = the_packet->Prefix.source_tid;
-
- _MPCI_Send_response_packet(
- rtems_get_node( the_packet->Prefix.source_tid ),
- &the_packet->Prefix
- );
- break;
-
- case SIGNAL_MP_SEND_REQUEST:
- break;
-
- }
-}
-
-/*PAGE
- *
- *
- * _Signal_MP_Process_packet
- *
- */
-
-void _Signal_MP_Process_packet (
- rtems_packet_prefix *the_packet_prefix
-)
-{
- Signal_MP_Packet *the_packet;
- Thread_Control *the_thread;
-
- the_packet = (Signal_MP_Packet *) the_packet_prefix;
-
- switch ( the_packet->operation ) {
-
- case SIGNAL_MP_SEND_REQUEST:
-
- the_packet->Prefix.return_code = rtems_signal_send(
- the_packet->Prefix.id,
- the_packet->signal_in
- );
-
- _Signal_MP_Send_response_packet(
- SIGNAL_MP_SEND_RESPONSE,
- _Thread_Executing
- );
- break;
-
- case SIGNAL_MP_SEND_RESPONSE:
-
- the_thread = _MPCI_Process_response( the_packet_prefix );
-
- _MPCI_Return_packet( the_packet_prefix );
- break;
-
- }
-}
-
-/*PAGE
- *
- * _Signal_MP_Send_object_was_deleted
- *
- * This subprogram is not needed since there are no objects
- * deleted by this manager.
- *
- */
-
-/*PAGE
- *
- * _Signal_MP_Send_extract_proxy
- *
- * This subprogram is not needed since there are no objects
- * deleted by this manager.
- *
- */
-
-/*PAGE
- *
- * _Signal_MP_Get_packet
- *
- */
-
-Signal_MP_Packet *_Signal_MP_Get_packet ( void )
-{
- return ( (Signal_MP_Packet *) _MPCI_Get_packet() );
-}
-
-/* end of file */
diff --git a/cpukit/rtems/src/signalsend.c b/cpukit/rtems/src/signalsend.c
deleted file mode 100644
index cb808dc8fb..0000000000
--- a/cpukit/rtems/src/signalsend.c
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Signal Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/asr.h>
-#include <rtems/score/isr.h>
-#include <rtems/rtems/modes.h>
-#include <rtems/rtems/signal.h>
-#include <rtems/score/thread.h>
-#include <rtems/rtems/tasks.h>
-
-/*PAGE
- *
- * rtems_signal_send
- *
- * This directive allows a thread to send signals to a thread.
- *
- * Input parameters:
- * id - thread id
- * signal_set - signal set
- *
- * Output parameters:
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_signal_send(
- Objects_Id id,
- rtems_signal_set signal_set
-)
-{
- register Thread_Control *the_thread;
- Objects_Locations location;
- RTEMS_API_Control *api;
- ASR_Information *asr;
-
- the_thread = _Thread_Get( id, &location );
- switch ( location ) {
-
- case OBJECTS_REMOTE:
-#if defined(RTEMS_MULTIPROCESSING)
- return _Signal_MP_Send_request_packet(
- SIGNAL_MP_SEND_REQUEST,
- id,
- signal_set
- );
-#endif
-
- case OBJECTS_ERROR:
- return RTEMS_INVALID_ID;
-
- case OBJECTS_LOCAL:
- api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
- asr = &api->Signal;
-
- if ( ! _ASR_Is_null_handler( asr->handler ) ) {
- if ( asr->is_enabled ) {
- _ASR_Post_signals( signal_set, &asr->signals_posted );
-
- the_thread->do_post_task_switch_extension = TRUE;
-
- if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
- _ISR_Signals_to_thread_executing = TRUE;
- } else {
- _ASR_Post_signals( signal_set, &asr->signals_pending );
- }
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
- }
- _Thread_Enable_dispatch();
- return RTEMS_NOT_DEFINED;
- }
-
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
-}
diff --git a/cpukit/rtems/src/taskcreate.c b/cpukit/rtems/src/taskcreate.c
deleted file mode 100644
index 6183079c66..0000000000
--- a/cpukit/rtems/src/taskcreate.c
+++ /dev/null
@@ -1,228 +0,0 @@
-/*
- * RTEMS Task Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/rtems/modes.h>
-#include <rtems/score/object.h>
-#include <rtems/score/stack.h>
-#include <rtems/score/states.h>
-#include <rtems/rtems/tasks.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/tod.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/sysstate.h>
-
-/*PAGE
- *
- * rtems_task_create
- *
- * This directive creates a thread by allocating and initializing a
- * thread control block and a stack. The newly created thread is
- * placed in the dormant state.
- *
- * Input parameters:
- * name - user defined thread name
- * initial_priority - thread priority
- * stack_size - stack size in bytes
- * initial_modes - initial thread mode
- * attribute_set - thread attributes
- * id - pointer to thread id
- *
- * Output parameters:
- * id - thread id
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_task_create(
- rtems_name name,
- rtems_task_priority initial_priority,
- unsigned32 stack_size,
- rtems_mode initial_modes,
- rtems_attribute attribute_set,
- Objects_Id *id
-)
-{
- register Thread_Control *the_thread;
- boolean is_fp;
-#if defined(RTEMS_MULTIPROCESSING)
- Objects_MP_Control *the_global_object = NULL;
- boolean is_global;
-#endif
- boolean status;
- rtems_attribute the_attribute_set;
- Priority_Control core_priority;
- RTEMS_API_Control *api;
- ASR_Information *asr;
-
-
- if ( !rtems_is_name_valid( name ) )
- return RTEMS_INVALID_NAME;
-
- /*
- * Core Thread Initialize insures we get the minimum amount of
- * stack space.
- */
-
-#if 0
- if ( !_Stack_Is_enough( stack_size ) )
- return RTEMS_INVALID_SIZE;
-#endif
-
- /*
- * Fix the attribute set to match the attributes which
- * this processor (1) requires and (2) is able to support.
- * First add in the required flags for attribute_set
- * Typically this might include FP if the platform
- * or application required all tasks to be fp aware.
- * Then turn off the requested bits which are not supported.
- */
-
- the_attribute_set = _Attributes_Set( attribute_set, ATTRIBUTES_REQUIRED );
- the_attribute_set =
- _Attributes_Clear( the_attribute_set, ATTRIBUTES_NOT_SUPPORTED );
-
- if ( _Attributes_Is_floating_point( the_attribute_set ) )
- is_fp = TRUE;
- else
- is_fp = FALSE;
-
- /*
- * Validate the RTEMS API priority and convert it to the core priority range.
- */
-
- if ( !_Attributes_Is_system_task( the_attribute_set ) ) {
- if ( !_RTEMS_tasks_Priority_is_valid( initial_priority ) )
- return RTEMS_INVALID_PRIORITY;
- }
-
- core_priority = _RTEMS_tasks_Priority_to_Core( initial_priority );
-
-#if defined(RTEMS_MULTIPROCESSING)
- if ( _Attributes_Is_global( the_attribute_set ) ) {
-
- is_global = TRUE;
-
- if ( !_System_state_Is_multiprocessing )
- return RTEMS_MP_NOT_CONFIGURED;
-
- } else
- is_global = FALSE;
-#endif
-
- /*
- * Make sure system is MP if this task is global
- */
-
- /*
- * Disable dispatch for protection
- */
-
- _Thread_Disable_dispatch();
-
- /*
- * Allocate the thread control block and -- if the task is global --
- * allocate a global object control block.
- *
- * NOTE: This routine does not use the combined allocate and open
- * global object routine because this results in a lack of
- * control over when memory is allocated and can be freed in
- * the event of an error.
- */
-
- the_thread = _RTEMS_tasks_Allocate();
-
- if ( !the_thread ) {
- _Thread_Enable_dispatch();
- return RTEMS_TOO_MANY;
- }
-
-#if defined(RTEMS_MULTIPROCESSING)
- if ( is_global ) {
- the_global_object = _Objects_MP_Allocate_global_object();
-
- if ( _Objects_MP_Is_null_global_object( the_global_object ) ) {
- _RTEMS_tasks_Free( the_thread );
- _Thread_Enable_dispatch();
- return RTEMS_TOO_MANY;
- }
- }
-#endif
-
- /*
- * Initialize the core thread for this task.
- */
-
- status = _Thread_Initialize(
- &_RTEMS_tasks_Information,
- the_thread,
- NULL,
- stack_size,
- is_fp,
- core_priority,
- _Modes_Is_preempt(initial_modes) ? TRUE : FALSE,
- _Modes_Is_timeslice(initial_modes) ?
- THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE :
- THREAD_CPU_BUDGET_ALGORITHM_NONE,
- NULL, /* no budget algorithm callout */
- _Modes_Get_interrupt_level(initial_modes),
- &name
- );
-
- if ( !status ) {
-#if defined(RTEMS_MULTIPROCESSING)
- if ( is_global )
- _Objects_MP_Free_global_object( the_global_object );
-#endif
- _RTEMS_tasks_Free( the_thread );
- _Thread_Enable_dispatch();
- return RTEMS_UNSATISFIED;
- }
-
- api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
- asr = &api->Signal;
-
- asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? FALSE : TRUE;
-
- *id = the_thread->Object.id;
-
-#if defined(RTEMS_MULTIPROCESSING)
- if ( is_global ) {
-
- the_thread->is_global = TRUE;
-
- _Objects_MP_Open(
- &_RTEMS_tasks_Information,
- the_global_object,
- name,
- the_thread->Object.id
- );
-
- _RTEMS_tasks_MP_Send_process_packet(
- RTEMS_TASKS_MP_ANNOUNCE_CREATE,
- the_thread->Object.id,
- name
- );
-
- }
-#endif
-
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
-}
diff --git a/cpukit/rtems/src/taskdelete.c b/cpukit/rtems/src/taskdelete.c
deleted file mode 100644
index a5d09d2749..0000000000
--- a/cpukit/rtems/src/taskdelete.c
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * RTEMS Task Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/rtems/modes.h>
-#include <rtems/score/object.h>
-#include <rtems/score/stack.h>
-#include <rtems/score/states.h>
-#include <rtems/rtems/tasks.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/tod.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/sysstate.h>
-
-/*PAGE
- *
- * rtems_task_delete
- *
- * This directive allows a thread to delete itself or the thread
- * identified in the id field. The executive halts execution
- * of the thread and frees the thread control block.
- *
- * Input parameters:
- * id - thread id
- *
- * Output parameters:
- * nothing - if id is the requesting thread (always succeeds)
- * RTEMS_SUCCESSFUL - if successful and id is
- * not the requesting thread
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_task_delete(
- Objects_Id id
-)
-{
- register Thread_Control *the_thread;
- Objects_Locations location;
- Objects_Information *the_information;
-
- the_thread = _Thread_Get( id, &location );
- switch ( location ) {
-
- case OBJECTS_REMOTE:
-#if defined(RTEMS_MULTIPROCESSING)
- _Thread_Dispatch();
- return RTEMS_ILLEGAL_ON_REMOTE_OBJECT;
-#endif
-
- case OBJECTS_ERROR:
- return RTEMS_INVALID_ID;
-
- case OBJECTS_LOCAL:
- the_information = _Objects_Get_information( the_thread->Object.id );
-
- if ( !the_information ) {
- _Thread_Enable_dispatch();
- return RTEMS_INVALID_ID;
- /* This should never happen if _Thread_Get() works right */
- }
-
- _Thread_Close( the_information, the_thread );
-
- _RTEMS_tasks_Free( the_thread );
-
-#if defined(RTEMS_MULTIPROCESSING)
- if ( the_thread->is_global ) {
-
- _Objects_MP_Close( &_RTEMS_tasks_Information, the_thread->Object.id );
-
- _RTEMS_tasks_MP_Send_process_packet(
- RTEMS_TASKS_MP_ANNOUNCE_DELETE,
- the_thread->Object.id,
- 0 /* Not used */
- );
- }
-#endif
-
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
- }
-
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
-}
diff --git a/cpukit/rtems/src/taskgetnote.c b/cpukit/rtems/src/taskgetnote.c
deleted file mode 100644
index 47e6c24bef..0000000000
--- a/cpukit/rtems/src/taskgetnote.c
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * RTEMS Task Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/rtems/modes.h>
-#include <rtems/score/object.h>
-#include <rtems/score/stack.h>
-#include <rtems/score/states.h>
-#include <rtems/rtems/tasks.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/tod.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/sysstate.h>
-
-/*PAGE
- *
- * rtems_task_get_note
- *
- * This directive obtains the note from the specified notepad
- * of the specified thread.
- *
- * Input parameters:
- * id - thread id
- * notepad - notepad number
- * note - pointer to note
- *
- * Output parameters:
- * note - filled in if successful
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_task_get_note(
- Objects_Id id,
- unsigned32 notepad,
- unsigned32 *note
-)
-{
- register Thread_Control *the_thread;
- Objects_Locations location;
- RTEMS_API_Control *api;
-
- /*
- * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would
- * be checking an unsigned number for being negative.
- */
-
- if ( notepad > RTEMS_NOTEPAD_LAST )
- return RTEMS_INVALID_NUMBER;
-
- /*
- * Optimize the most likely case to avoid the Thread_Dispatch.
- */
-
- if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
- _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
- api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
- *note = api->Notepads[ notepad ];
- return RTEMS_SUCCESSFUL;
- }
-
- the_thread = _Thread_Get( id, &location );
- switch ( location ) {
-
- case OBJECTS_REMOTE:
-#if defined(RTEMS_MULTIPROCESSING)
- _Thread_Executing->Wait.return_argument = note;
-
- return _RTEMS_tasks_MP_Send_request_packet(
- RTEMS_TASKS_MP_GET_NOTE_REQUEST,
- id,
- 0, /* Not used */
- notepad,
- 0 /* Not used */
- );
-#endif
-
- case OBJECTS_ERROR:
- return RTEMS_INVALID_ID;
-
- case OBJECTS_LOCAL:
- api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
- *note = api->Notepads[ notepad ];
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
- }
-
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
-}
diff --git a/cpukit/rtems/src/taskident.c b/cpukit/rtems/src/taskident.c
deleted file mode 100644
index 7d6baff020..0000000000
--- a/cpukit/rtems/src/taskident.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * RTEMS Task Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/rtems/modes.h>
-#include <rtems/score/object.h>
-#include <rtems/score/stack.h>
-#include <rtems/score/states.h>
-#include <rtems/rtems/tasks.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/tod.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/sysstate.h>
-
-/*PAGE
- *
- * rtems_task_ident
- *
- * This directive returns the system ID associated with
- * the thread name.
- *
- * Input parameters:
- * name - user defined thread name
- * node - node(s) to be searched
- * id - pointer to thread id
- *
- * Output parameters:
- * *id - thread id
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_task_ident(
- rtems_name name,
- unsigned32 node,
- Objects_Id *id
-)
-{
- Objects_Name_to_id_errors status;
-
- if ( name == OBJECTS_ID_OF_SELF ) {
- *id = _Thread_Executing->Object.id;
- return RTEMS_SUCCESSFUL;
- }
-
- status = _Objects_Name_to_id( &_RTEMS_tasks_Information, &name, node, id );
-
- return _Status_Object_name_errors_to_status[ status ];
-}
diff --git a/cpukit/rtems/src/taskinitusers.c b/cpukit/rtems/src/taskinitusers.c
deleted file mode 100644
index dceb32a194..0000000000
--- a/cpukit/rtems/src/taskinitusers.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * RTEMS Task Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/rtems/modes.h>
-#include <rtems/score/object.h>
-#include <rtems/score/stack.h>
-#include <rtems/score/states.h>
-#include <rtems/rtems/tasks.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/tod.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/sysstate.h>
-
-/*PAGE
- *
- * _RTEMS_tasks_Initialize_user_tasks
- *
- * This routine creates and starts all configured user
- * initialzation threads.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- */
-
-void _RTEMS_tasks_Initialize_user_tasks( void )
-{
- unsigned32 index;
- unsigned32 maximum;
- rtems_id id;
- rtems_status_code return_value;
- rtems_initialization_tasks_table *user_tasks;
-
- /*
- * NOTE: This is slightly different from the Ada implementation.
- */
-
- user_tasks = _RTEMS_tasks_User_initialization_tasks;
- maximum = _RTEMS_tasks_Number_of_initialization_tasks;
-
- if ( !user_tasks || maximum == 0 )
- return;
-
- for ( index=0 ; index < maximum ; index++ ) {
- return_value = rtems_task_create(
- user_tasks[ index ].name,
- user_tasks[ index ].initial_priority,
- user_tasks[ index ].stack_size,
- user_tasks[ index ].mode_set,
- user_tasks[ index ].attribute_set,
- &id
- );
-
- if ( !rtems_is_status_successful( return_value ) )
- _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value );
-
- return_value = rtems_task_start(
- id,
- user_tasks[ index ].entry_point,
- user_tasks[ index ].argument
- );
-
- if ( !rtems_is_status_successful( return_value ) )
- _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value );
- }
-}
diff --git a/cpukit/rtems/src/taskissuspended.c b/cpukit/rtems/src/taskissuspended.c
deleted file mode 100644
index bea81e8126..0000000000
--- a/cpukit/rtems/src/taskissuspended.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * RTEMS Task Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/rtems/modes.h>
-#include <rtems/score/object.h>
-#include <rtems/score/stack.h>
-#include <rtems/score/states.h>
-#include <rtems/rtems/tasks.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/tod.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/sysstate.h>
-
-/*PAGE
- *
- * rtems_task_is_suspended
- *
- * This directive returns a status indicating whether or not
- * the specified task is suspended.
- *
- * Input parameters:
- * id - thread id
- *
- * Output parameters:
- * RTEMS_SUCCESSFUL - if successful and not suspended
- * RTEMS_ALREADY_SUSPENDED - if successful and suspended
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_task_is_suspended(
- Objects_Id id
-)
-{
- register Thread_Control *the_thread;
- Objects_Locations location;
-
- the_thread = _Thread_Get( id, &location );
- switch ( location ) {
-
- case OBJECTS_REMOTE:
-
-#if defined(RTEMS_MULTIPROCESSING)
- _Thread_Dispatch();
- return RTEMS_ILLEGAL_ON_REMOTE_OBJECT;
-#endif
-
- case OBJECTS_ERROR:
- return RTEMS_INVALID_ID;
-
- case OBJECTS_LOCAL:
- if ( !_States_Is_suspended( the_thread->current_state ) ) {
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
- }
- _Thread_Enable_dispatch();
- return RTEMS_ALREADY_SUSPENDED;
- }
-
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
-}
diff --git a/cpukit/rtems/src/taskmode.c b/cpukit/rtems/src/taskmode.c
deleted file mode 100644
index 008447c42c..0000000000
--- a/cpukit/rtems/src/taskmode.c
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * RTEMS Task Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/rtems/modes.h>
-#include <rtems/score/object.h>
-#include <rtems/score/stack.h>
-#include <rtems/score/states.h>
-#include <rtems/rtems/tasks.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/tod.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/sysstate.h>
-
-/*PAGE
- *
- * rtems_task_mode
- *
- * This directive enables and disables several modes of
- * execution for the requesting thread.
- *
- * Input parameters:
- * mode_set - new mode
- * mask - mask
- * previous_mode_set - address of previous mode set
- *
- * Output:
- * *previous_mode_set - previous mode set
- * always return RTEMS_SUCCESSFUL;
- */
-
-rtems_status_code rtems_task_mode(
- rtems_mode mode_set,
- rtems_mode mask,
- rtems_mode *previous_mode_set
-)
-{
- Thread_Control *executing;
- RTEMS_API_Control *api;
- ASR_Information *asr;
- boolean is_asr_enabled = FALSE;
- boolean needs_asr_dispatching = FALSE;
- rtems_mode old_mode;
-
- executing = _Thread_Executing;
- api = executing->API_Extensions[ THREAD_API_RTEMS ];
- asr = &api->Signal;
-
- old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
-
- if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
- old_mode |= RTEMS_NO_TIMESLICE;
- else
- old_mode |= RTEMS_TIMESLICE;
-
- old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
- old_mode |= _ISR_Get_level();
-
- *previous_mode_set = old_mode;
-
- /*
- * These are generic thread scheduling characteristics.
- */
-
- if ( mask & RTEMS_PREEMPT_MASK )
- executing->is_preemptible = _Modes_Is_preempt(mode_set) ? TRUE : FALSE;
-
- if ( mask & RTEMS_TIMESLICE_MASK ) {
- if ( _Modes_Is_timeslice(mode_set) )
- executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
- else
- executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
- }
-
- /*
- * Set the new interrupt level
- */
-
- if ( mask & RTEMS_INTERRUPT_MASK )
- _Modes_Set_interrupt_level( mode_set );
-
- /*
- * This is specific to the RTEMS API
- */
-
- is_asr_enabled = FALSE;
- needs_asr_dispatching = FALSE;
-
- if ( mask & RTEMS_ASR_MASK ) {
- is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? FALSE : TRUE;
- if ( is_asr_enabled != asr->is_enabled ) {
- asr->is_enabled = is_asr_enabled;
- _ASR_Swap_signals( asr );
- if ( _ASR_Are_signals_pending( asr ) ) {
- needs_asr_dispatching = TRUE;
- executing->do_post_task_switch_extension = TRUE;
- }
- }
- }
-
- if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
- _Thread_Dispatch();
-
- return RTEMS_SUCCESSFUL;
-}
diff --git a/cpukit/rtems/src/taskmp.c b/cpukit/rtems/src/taskmp.c
deleted file mode 100644
index 7e5baca9a3..0000000000
--- a/cpukit/rtems/src/taskmp.c
+++ /dev/null
@@ -1,339 +0,0 @@
-/*
- * Multiprocessing Support for the RTEMS Task Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/score/mpci.h>
-#include <rtems/score/mppkt.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
-#include <rtems/rtems/tasks.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/rtems/support.h>
-
-/*PAGE
- *
- * _RTEMS_tasks_MP_Send_process_packet
- *
- */
-
-void _RTEMS_tasks_MP_Send_process_packet (
- RTEMS_tasks_MP_Remote_operations operation,
- Objects_Id task_id,
- rtems_name name
-)
-{
- RTEMS_tasks_MP_Packet *the_packet;
-
- switch ( operation ) {
-
- case RTEMS_TASKS_MP_ANNOUNCE_CREATE:
- case RTEMS_TASKS_MP_ANNOUNCE_DELETE:
-
- the_packet = _RTEMS_tasks_MP_Get_packet();
- the_packet->Prefix.the_class = MP_PACKET_TASKS;
- the_packet->Prefix.length = sizeof ( RTEMS_tasks_MP_Packet );
- the_packet->Prefix.to_convert = sizeof ( RTEMS_tasks_MP_Packet );
- the_packet->operation = operation;
- the_packet->Prefix.id = task_id;
- the_packet->name = name;
-
- _MPCI_Send_process_packet( MPCI_ALL_NODES, &the_packet->Prefix );
- break;
-
- case RTEMS_TASKS_MP_SUSPEND_REQUEST:
- case RTEMS_TASKS_MP_SUSPEND_RESPONSE:
- case RTEMS_TASKS_MP_RESUME_REQUEST:
- case RTEMS_TASKS_MP_RESUME_RESPONSE:
- case RTEMS_TASKS_MP_SET_PRIORITY_REQUEST:
- case RTEMS_TASKS_MP_SET_PRIORITY_RESPONSE:
- case RTEMS_TASKS_MP_GET_NOTE_REQUEST:
- case RTEMS_TASKS_MP_GET_NOTE_RESPONSE:
- case RTEMS_TASKS_MP_SET_NOTE_REQUEST:
- case RTEMS_TASKS_MP_SET_NOTE_RESPONSE:
- break;
- }
-}
-
-/*PAGE
- *
- * _RTEMS_tasks_MP_Send_request_packet
- *
- */
-
-rtems_status_code _RTEMS_tasks_MP_Send_request_packet (
- RTEMS_tasks_MP_Remote_operations operation,
- Objects_Id task_id,
- rtems_task_priority new_priority,
- unsigned32 notepad,
- unsigned32 note
-)
-{
- RTEMS_tasks_MP_Packet *the_packet;
-
- switch ( operation ) {
-
- case RTEMS_TASKS_MP_SUSPEND_REQUEST:
- case RTEMS_TASKS_MP_RESUME_REQUEST:
- case RTEMS_TASKS_MP_SET_PRIORITY_REQUEST:
- case RTEMS_TASKS_MP_GET_NOTE_REQUEST:
- case RTEMS_TASKS_MP_SET_NOTE_REQUEST:
-
- the_packet = _RTEMS_tasks_MP_Get_packet();
- the_packet->Prefix.the_class = MP_PACKET_TASKS;
- the_packet->Prefix.length = sizeof ( RTEMS_tasks_MP_Packet );
- the_packet->Prefix.to_convert = sizeof ( RTEMS_tasks_MP_Packet );
- the_packet->operation = operation;
- the_packet->Prefix.id = task_id;
- the_packet->the_priority = new_priority;
- the_packet->notepad = notepad;
- the_packet->note = note;
-
- return _MPCI_Send_request_packet(
- rtems_get_node( task_id ),
- &the_packet->Prefix,
- STATES_READY /* Not used */
- );
- break;
-
- case RTEMS_TASKS_MP_ANNOUNCE_CREATE:
- case RTEMS_TASKS_MP_ANNOUNCE_DELETE:
- case RTEMS_TASKS_MP_SUSPEND_RESPONSE:
- case RTEMS_TASKS_MP_RESUME_RESPONSE:
- case RTEMS_TASKS_MP_SET_PRIORITY_RESPONSE:
- case RTEMS_TASKS_MP_GET_NOTE_RESPONSE:
- case RTEMS_TASKS_MP_SET_NOTE_RESPONSE:
- break;
-
- }
- /*
- * The following line is included to satisfy compilers which
- * produce warnings when a function does not end with a return.
- */
- return RTEMS_SUCCESSFUL;
-}
-
-/*PAGE
- *
- * _RTEMS_tasks_MP_Send_response_packet
- *
- */
-
-void _RTEMS_tasks_MP_Send_response_packet (
- RTEMS_tasks_MP_Remote_operations operation,
- Thread_Control *the_thread
-)
-{
- RTEMS_tasks_MP_Packet *the_packet;
-
- switch ( operation ) {
-
- case RTEMS_TASKS_MP_SUSPEND_RESPONSE:
- case RTEMS_TASKS_MP_RESUME_RESPONSE:
- case RTEMS_TASKS_MP_SET_PRIORITY_RESPONSE:
- case RTEMS_TASKS_MP_GET_NOTE_RESPONSE:
- case RTEMS_TASKS_MP_SET_NOTE_RESPONSE:
-
- the_packet = (RTEMS_tasks_MP_Packet *) the_thread->receive_packet;
-
-/*
- * The packet being returned already contains the class, length, and
- * to_convert fields, therefore they are not set in this routine.
- */
- the_packet->operation = operation;
- the_packet->Prefix.id = the_packet->Prefix.source_tid;
-
- _MPCI_Send_response_packet(
- rtems_get_node( the_packet->Prefix.source_tid ),
- &the_packet->Prefix
- );
- break;
-
- case RTEMS_TASKS_MP_ANNOUNCE_CREATE:
- case RTEMS_TASKS_MP_ANNOUNCE_DELETE:
- case RTEMS_TASKS_MP_SUSPEND_REQUEST:
- case RTEMS_TASKS_MP_RESUME_REQUEST:
- case RTEMS_TASKS_MP_SET_PRIORITY_REQUEST:
- case RTEMS_TASKS_MP_GET_NOTE_REQUEST:
- case RTEMS_TASKS_MP_SET_NOTE_REQUEST:
- break;
-
- }
-}
-
-/*PAGE
- *
- *
- * _RTEMS_tasks_MP_Process_packet
- *
- */
-
-void _RTEMS_tasks_MP_Process_packet (
- rtems_packet_prefix *the_packet_prefix
-)
-{
- RTEMS_tasks_MP_Packet *the_packet;
- Thread_Control *the_thread;
- boolean ignored;
-
- the_packet = (RTEMS_tasks_MP_Packet *) the_packet_prefix;
-
- switch ( the_packet->operation ) {
-
- case RTEMS_TASKS_MP_ANNOUNCE_CREATE:
-
- ignored = _Objects_MP_Allocate_and_open(
- &_RTEMS_tasks_Information,
- the_packet->name,
- the_packet->Prefix.id,
- TRUE
- );
-
- _MPCI_Return_packet( the_packet_prefix );
- break;
-
- case RTEMS_TASKS_MP_ANNOUNCE_DELETE:
-
- _Objects_MP_Close( &_RTEMS_tasks_Information, the_packet->Prefix.id );
-
- _MPCI_Return_packet( the_packet_prefix );
- break;
-
- case RTEMS_TASKS_MP_SUSPEND_REQUEST:
-
- the_packet->Prefix.return_code = rtems_task_suspend(
- the_packet->Prefix.id
- );
-
- _RTEMS_tasks_MP_Send_response_packet(
- RTEMS_TASKS_MP_SUSPEND_RESPONSE,
- _Thread_Executing
- );
- break;
-
- case RTEMS_TASKS_MP_SUSPEND_RESPONSE:
- case RTEMS_TASKS_MP_RESUME_RESPONSE:
- case RTEMS_TASKS_MP_SET_NOTE_RESPONSE:
-
- the_thread = _MPCI_Process_response( the_packet_prefix );
-
- _MPCI_Return_packet( the_packet_prefix );
- break;
-
- case RTEMS_TASKS_MP_RESUME_REQUEST:
-
- the_packet->Prefix.return_code = rtems_task_resume(
- the_packet->Prefix.id
- );
-
- _RTEMS_tasks_MP_Send_response_packet(
- RTEMS_TASKS_MP_RESUME_RESPONSE,
- _Thread_Executing
- );
- break;
-
- case RTEMS_TASKS_MP_SET_PRIORITY_REQUEST:
-
- the_packet->Prefix.return_code = rtems_task_set_priority(
- the_packet->Prefix.id,
- the_packet->the_priority,
- &the_packet->the_priority
- );
-
- _RTEMS_tasks_MP_Send_response_packet(
- RTEMS_TASKS_MP_SET_PRIORITY_RESPONSE,
- _Thread_Executing
- );
- break;
-
- case RTEMS_TASKS_MP_SET_PRIORITY_RESPONSE:
-
- the_thread = _MPCI_Process_response( the_packet_prefix );
-
- *(rtems_task_priority *)the_thread->Wait.return_argument =
- the_packet->the_priority;
-
- _MPCI_Return_packet( the_packet_prefix );
- break;
-
- case RTEMS_TASKS_MP_GET_NOTE_REQUEST:
-
- the_packet->Prefix.return_code = rtems_task_get_note(
- the_packet->Prefix.id,
- the_packet->notepad,
- &the_packet->note
- );
-
- _RTEMS_tasks_MP_Send_response_packet(
- RTEMS_TASKS_MP_GET_NOTE_RESPONSE,
- _Thread_Executing
- );
- break;
-
- case RTEMS_TASKS_MP_GET_NOTE_RESPONSE:
-
- the_thread = _MPCI_Process_response( the_packet_prefix );
-
- *(unsigned32 *)the_thread->Wait.return_argument = the_packet->note;
-
- _MPCI_Return_packet( the_packet_prefix );
- break;
-
- case RTEMS_TASKS_MP_SET_NOTE_REQUEST:
-
- the_packet->Prefix.return_code = rtems_task_set_note(
- the_packet->Prefix.id,
- the_packet->notepad,
- the_packet->note
- );
-
- _RTEMS_tasks_MP_Send_response_packet(
- RTEMS_TASKS_MP_SET_NOTE_RESPONSE,
- _Thread_Executing
- );
- break;
- }
-}
-
-/*PAGE
- *
- * _RTEMS_tasks_MP_Send_object_was_deleted
- *
- * This routine is not neededby the Tasks since a task
- * cannot be globally deleted.
- *
- */
-
-/*PAGE
- *
- * _RTEMS_tasks_MP_Send_extract_proxy
- *
- * This routine is not neededby the Tasks since a task
- * cannot be globally deleted.
- *
- */
-
-/*PAGE
- *
- * _RTEMS_tasks_MP_Get_packet
- *
- */
-
-RTEMS_tasks_MP_Packet *_RTEMS_tasks_MP_Get_packet ( void )
-{
- return (RTEMS_tasks_MP_Packet *) _MPCI_Get_packet();
-}
-
-/* end of file */
diff --git a/cpukit/rtems/src/taskrestart.c b/cpukit/rtems/src/taskrestart.c
deleted file mode 100644
index f7f14efaef..0000000000
--- a/cpukit/rtems/src/taskrestart.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * RTEMS Task Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/rtems/modes.h>
-#include <rtems/score/object.h>
-#include <rtems/score/stack.h>
-#include <rtems/score/states.h>
-#include <rtems/rtems/tasks.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/tod.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/sysstate.h>
-
-/*PAGE
- *
- * rtems_task_restart
- *
- * This directive readies the specified thread. It restores
- * the thread environment to the original values established
- * at thread creation and start time. A thread can be restarted
- * from any state except the dormant state.
- *
- * Input parameters:
- * id - thread id
- * argument - thread argument
- *
- * Output parameters:
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_task_restart(
- Objects_Id id,
- unsigned32 argument
-)
-{
- register Thread_Control *the_thread;
- Objects_Locations location;
-
- the_thread = _Thread_Get( id, &location );
- switch ( location ) {
-
- case OBJECTS_REMOTE:
-#if defined(RTEMS_MULTIPROCESSING)
- _Thread_Dispatch();
- return RTEMS_ILLEGAL_ON_REMOTE_OBJECT;
-#endif
-
- case OBJECTS_ERROR:
- return RTEMS_INVALID_ID;
-
- case OBJECTS_LOCAL:
- if ( _Thread_Restart( the_thread, NULL, argument ) ) {
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
- }
- _Thread_Enable_dispatch();
- return RTEMS_INCORRECT_STATE;
- }
-
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
-}
diff --git a/cpukit/rtems/src/taskresume.c b/cpukit/rtems/src/taskresume.c
deleted file mode 100644
index 226c6942fe..0000000000
--- a/cpukit/rtems/src/taskresume.c
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * RTEMS Task Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/rtems/modes.h>
-#include <rtems/score/object.h>
-#include <rtems/score/stack.h>
-#include <rtems/score/states.h>
-#include <rtems/rtems/tasks.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/tod.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/sysstate.h>
-
-/*PAGE
- *
- * rtems_task_resume
- *
- * This directive will remove the specified thread
- * from the suspended state.
- *
- * Input parameters:
- * id - thread id
- *
- * Output parameters:
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_task_resume(
- Objects_Id id
-)
-{
- register Thread_Control *the_thread;
- Objects_Locations location;
-
- the_thread = _Thread_Get( id, &location );
- switch ( location ) {
-
- case OBJECTS_REMOTE:
-#if defined(RTEMS_MULTIPROCESSING)
- return _RTEMS_tasks_MP_Send_request_packet(
- RTEMS_TASKS_MP_RESUME_REQUEST,
- id,
- 0, /* Not used */
- 0, /* Not used */
- 0 /* Not used */
- );
-#endif
-
- case OBJECTS_ERROR:
- return RTEMS_INVALID_ID;
-
- case OBJECTS_LOCAL:
- if ( _States_Is_suspended( the_thread->current_state ) ) {
- _Thread_Resume( the_thread, TRUE );
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
- }
- _Thread_Enable_dispatch();
- return RTEMS_INCORRECT_STATE;
- }
-
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
-}
diff --git a/cpukit/rtems/src/tasks.c b/cpukit/rtems/src/tasks.c
deleted file mode 100644
index 5fdff2db18..0000000000
--- a/cpukit/rtems/src/tasks.c
+++ /dev/null
@@ -1,277 +0,0 @@
-/*
- * RTEMS Task Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/rtems/modes.h>
-#include <rtems/score/object.h>
-#include <rtems/score/stack.h>
-#include <rtems/score/states.h>
-#include <rtems/rtems/tasks.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/tod.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/sysstate.h>
-
-/*PAGE
- *
- * _RTEMS_tasks_Create_extension
- *
- * This routine is an extension routine that is invoked as part
- * of creating any type of task or thread in the system. If the
- * task is created via another API, then this routine is invoked
- * and this API given the opportunity to initialize its extension
- * area.
- */
-
-boolean _RTEMS_tasks_Create_extension(
- Thread_Control *executing,
- Thread_Control *created
-)
-{
- RTEMS_API_Control *api;
-
- api = _Workspace_Allocate( sizeof( RTEMS_API_Control ) );
-
- if ( !api )
- return FALSE;
-
- created->API_Extensions[ THREAD_API_RTEMS ] = api;
-
- api->pending_events = EVENT_SETS_NONE_PENDING;
- _ASR_Initialize( &api->Signal );
- created->task_variables = NULL;
- return TRUE;
-}
-
-/*PAGE
- *
- * _RTEMS_tasks_Start_extension
- *
- * This extension routine is invoked when a task is started for the
- * first time.
- */
-
-User_extensions_routine _RTEMS_tasks_Start_extension(
- Thread_Control *executing,
- Thread_Control *started
-)
-{
- RTEMS_API_Control *api;
-
- api = started->API_Extensions[ THREAD_API_RTEMS ];
-
- api->pending_events = EVENT_SETS_NONE_PENDING;
-
- _ASR_Initialize( &api->Signal );
-}
-
-/*PAGE
- *
- * _RTEMS_tasks_Delete_extension
- *
- * This extension routine is invoked when a task is deleted.
- */
-
-User_extensions_routine _RTEMS_tasks_Delete_extension(
- Thread_Control *executing,
- Thread_Control *deleted
-)
-{
- rtems_task_variable_t *tvp, *next;
-
- /*
- * Free per task variable memory
- */
-
- tvp = deleted->task_variables;
- deleted->task_variables = NULL;
- while (tvp) {
- next = tvp->next;
- if (tvp->dtor)
- (*tvp->dtor)( tvp->ptr );
- _Workspace_Free( tvp );
- tvp = next;
- }
-
- /*
- * Free API specific memory
- */
-
- (void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_RTEMS ] );
- deleted->API_Extensions[ THREAD_API_RTEMS ] = NULL;
-}
-
-/*PAGE
- *
- * _RTEMS_tasks_Switch_extension
- *
- * This extension routine is invoked at each context switch.
- */
-
-void _RTEMS_tasks_Switch_extension(
- Thread_Control *executing,
- Thread_Control *heir
-)
-{
- rtems_task_variable_t *tvp;
-
- /*
- * Per Task Variables
- */
-
- tvp = executing->task_variables;
- while (tvp) {
- tvp->var = *tvp->ptr;
- tvp = tvp->next;
- }
-
- tvp = heir->task_variables;
- while (tvp) {
- *tvp->ptr = tvp->var;
- tvp = tvp->next;
- }
-}
-
-/*PAGE
- *
- * _RTEMS_tasks_Post_switch_extension
- *
- * This extension routine is invoked at each context switch.
- */
-
-void _RTEMS_tasks_Post_switch_extension(
- Thread_Control *executing
-)
-{
- ISR_Level level;
- RTEMS_API_Control *api;
- ASR_Information *asr;
- rtems_signal_set signal_set;
- Modes_Control prev_mode;
-
- api = executing->API_Extensions[ THREAD_API_RTEMS ];
-
- /*
- * Signal Processing
- */
-
- asr = &api->Signal;
-
- _ISR_Disable( level );
- signal_set = asr->signals_posted;
- asr->signals_posted = 0;
- _ISR_Enable( level );
-
-
- if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
- return;
-
- asr->nest_level += 1;
- rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
-
- (*asr->handler)( signal_set );
-
- asr->nest_level -= 1;
- rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
-
-}
-
-API_extensions_Control _RTEMS_tasks_API_extensions = {
- { NULL, NULL },
- NULL, /* predriver */
- _RTEMS_tasks_Initialize_user_tasks, /* postdriver */
- _RTEMS_tasks_Post_switch_extension /* post switch */
-};
-
-User_extensions_Control _RTEMS_tasks_User_extensions = {
- { NULL, NULL },
- { _RTEMS_tasks_Create_extension, /* create */
- _RTEMS_tasks_Start_extension, /* start */
- _RTEMS_tasks_Start_extension, /* restart */
- _RTEMS_tasks_Delete_extension, /* delete */
- _RTEMS_tasks_Switch_extension, /* switch */
- NULL, /* begin */
- NULL, /* exitted */
- NULL /* fatal */
- }
-};
-
-/*PAGE
- *
- * _RTEMS_tasks_Manager_initialization
- *
- * This routine initializes all Task Manager related data structures.
- *
- * Input parameters:
- * maximum_tasks - number of tasks to initialize
- *
- * Output parameters: NONE
- */
-
-void _RTEMS_tasks_Manager_initialization(
- unsigned32 maximum_tasks,
- unsigned32 number_of_initialization_tasks,
- rtems_initialization_tasks_table *user_tasks
-)
-{
-
- _RTEMS_tasks_Number_of_initialization_tasks = number_of_initialization_tasks;
- _RTEMS_tasks_User_initialization_tasks = user_tasks;
-
- /*
- * There may not be any RTEMS initialization tasks configured.
- */
-
-#if 0
- if ( user_tasks == NULL || number_of_initialization_tasks == 0 )
- _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, RTEMS_TOO_MANY );
-#endif
-
- _Objects_Initialize_information(
- &_RTEMS_tasks_Information,
- OBJECTS_RTEMS_TASKS,
- TRUE,
- maximum_tasks,
- sizeof( Thread_Control ),
- FALSE,
- RTEMS_MAXIMUM_NAME_LENGTH,
- TRUE
- );
-
- /*
- * Add all the extensions for this API
- */
-
- _User_extensions_Add_API_set( &_RTEMS_tasks_User_extensions );
-
- _API_extensions_Add( &_RTEMS_tasks_API_extensions );
-
- /*
- * Register the MP Process Packet routine.
- */
-
-#if defined(RTEMS_MULTIPROCESSING)
- _MPCI_Register_packet_processor(
- MP_PACKET_TASKS,
- _RTEMS_tasks_MP_Process_packet
- );
-#endif
-
-}
-
diff --git a/cpukit/rtems/src/tasksetnote.c b/cpukit/rtems/src/tasksetnote.c
deleted file mode 100644
index d992bf48ca..0000000000
--- a/cpukit/rtems/src/tasksetnote.c
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * RTEMS Task Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/rtems/modes.h>
-#include <rtems/score/object.h>
-#include <rtems/score/stack.h>
-#include <rtems/score/states.h>
-#include <rtems/rtems/tasks.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/tod.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/sysstate.h>
-
-/*PAGE
- *
- * rtems_task_set_note
- *
- * This directive sets the specified notepad contents to the given
- * note.
- *
- * Input parameters:
- * id - thread id
- * notepad - notepad number
- * note - note value
- *
- * Output parameters:
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_task_set_note(
- Objects_Id id,
- unsigned32 notepad,
- unsigned32 note
-)
-{
- register Thread_Control *the_thread;
- Objects_Locations location;
- RTEMS_API_Control *api;
-
- /*
- * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would
- * be checking an unsigned number for being negative.
- */
-
- if ( notepad > RTEMS_NOTEPAD_LAST )
- return RTEMS_INVALID_NUMBER;
-
- /*
- * Optimize the most likely case to avoid the Thread_Dispatch.
- */
-
- if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
- _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
- api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
- api->Notepads[ notepad ] = note;
- return RTEMS_SUCCESSFUL;
- }
-
- the_thread = _Thread_Get( id, &location );
- switch ( location ) {
-
- case OBJECTS_REMOTE:
-#if defined(RTEMS_MULTIPROCESSING)
- return _RTEMS_tasks_MP_Send_request_packet(
- RTEMS_TASKS_MP_SET_NOTE_REQUEST,
- id,
- 0, /* Not used */
- notepad,
- note
- );
-#endif
-
- case OBJECTS_ERROR:
- return RTEMS_INVALID_ID;
-
- case OBJECTS_LOCAL:
- api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
- api->Notepads[ notepad ] = note;
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
- }
-
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
-}
diff --git a/cpukit/rtems/src/tasksetpriority.c b/cpukit/rtems/src/tasksetpriority.c
deleted file mode 100644
index 426d9dc123..0000000000
--- a/cpukit/rtems/src/tasksetpriority.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * RTEMS Task Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/rtems/modes.h>
-#include <rtems/score/object.h>
-#include <rtems/score/stack.h>
-#include <rtems/score/states.h>
-#include <rtems/rtems/tasks.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/tod.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/sysstate.h>
-
-/*PAGE
- *
- * rtems_task_set_priority
- *
- * This directive changes the priority of the specified thread.
- * The specified thread can be any thread in the system including
- * the requesting thread.
- *
- * Input parameters:
- * id - thread id (0 indicates requesting thread)
- * new_priority - thread priority (0 indicates current priority)
- * old_priority - pointer to previous priority
- *
- * Output parameters:
- * old_priority - previous priority
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_task_set_priority(
- Objects_Id id,
- rtems_task_priority new_priority,
- rtems_task_priority *old_priority
-)
-{
- register Thread_Control *the_thread;
- Objects_Locations location;
-
- if ( new_priority != RTEMS_CURRENT_PRIORITY &&
- !_RTEMS_tasks_Priority_is_valid( new_priority ) )
- return RTEMS_INVALID_PRIORITY;
-
- if ( !old_priority )
- return RTEMS_INVALID_ADDRESS;
-
- the_thread = _Thread_Get( id, &location );
- switch ( location ) {
-
- case OBJECTS_REMOTE:
-#if defined(RTEMS_MULTIPROCESSING)
- _Thread_Executing->Wait.return_argument = old_priority;
- return _RTEMS_tasks_MP_Send_request_packet(
- RTEMS_TASKS_MP_SET_PRIORITY_REQUEST,
- id,
- new_priority,
- 0, /* Not used */
- 0 /* Not used */
- );
-#endif
-
- case OBJECTS_ERROR:
- return RTEMS_INVALID_ID;
-
- case OBJECTS_LOCAL:
- /* XXX convert from core priority */
- *old_priority = the_thread->current_priority;
- if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
- the_thread->real_priority = new_priority;
- if ( the_thread->resource_count == 0 ||
- the_thread->current_priority > new_priority )
- _Thread_Change_priority( the_thread, new_priority, FALSE );
- }
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
- }
-
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
-}
diff --git a/cpukit/rtems/src/taskstart.c b/cpukit/rtems/src/taskstart.c
deleted file mode 100644
index 6764333d87..0000000000
--- a/cpukit/rtems/src/taskstart.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * RTEMS Task Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/rtems/modes.h>
-#include <rtems/score/object.h>
-#include <rtems/score/stack.h>
-#include <rtems/score/states.h>
-#include <rtems/rtems/tasks.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/tod.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/sysstate.h>
-
-/*PAGE
- *
- * rtems_task_start
- *
- * This directive readies the thread identified by the "id"
- * based on its current priorty, to await execution. A thread
- * can be started only from the dormant state.
- *
- * Input parameters:
- * id - thread id
- * entry_point - start execution address of thread
- * argument - thread argument
- *
- * Output parameters:
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_task_start(
- rtems_id id,
- rtems_task_entry entry_point,
- unsigned32 argument
-)
-{
- register Thread_Control *the_thread;
- Objects_Locations location;
-
- if ( entry_point == NULL )
- return RTEMS_INVALID_ADDRESS;
-
- the_thread = _Thread_Get( id, &location );
- switch ( location ) {
-
- case OBJECTS_REMOTE:
-#if defined(RTEMS_MULTIPROCESSING)
- _Thread_Dispatch();
- return RTEMS_ILLEGAL_ON_REMOTE_OBJECT;
-#endif
-
- case OBJECTS_ERROR:
- return RTEMS_INVALID_ID;
-
- case OBJECTS_LOCAL:
- if ( _Thread_Start(
- the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) {
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
- }
- _Thread_Enable_dispatch();
- return RTEMS_INCORRECT_STATE;
- }
-
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
-}
diff --git a/cpukit/rtems/src/tasksuspend.c b/cpukit/rtems/src/tasksuspend.c
deleted file mode 100644
index a0ff597c8d..0000000000
--- a/cpukit/rtems/src/tasksuspend.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * RTEMS Task Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/rtems/modes.h>
-#include <rtems/score/object.h>
-#include <rtems/score/stack.h>
-#include <rtems/score/states.h>
-#include <rtems/rtems/tasks.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/tod.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/sysstate.h>
-
-/*PAGE
- *
- * rtems_task_suspend
- *
- * This directive will place the specified thread in the "suspended"
- * state. Note that the suspended state can be in addition to
- * other waiting states.
- *
- * Input parameters:
- * id - thread id
- *
- * Output parameters:
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_task_suspend(
- Objects_Id id
-)
-{
- register Thread_Control *the_thread;
- Objects_Locations location;
-
- the_thread = _Thread_Get( id, &location );
- switch ( location ) {
-
- case OBJECTS_REMOTE:
-#if defined(RTEMS_MULTIPROCESSING)
- return _RTEMS_tasks_MP_Send_request_packet(
- RTEMS_TASKS_MP_SUSPEND_REQUEST,
- id,
- 0, /* Not used */
- 0, /* Not used */
- 0 /* Not used */
- );
-#endif
-
- case OBJECTS_ERROR:
- return RTEMS_INVALID_ID;
-
- case OBJECTS_LOCAL:
- if ( !_States_Is_suspended( the_thread->current_state ) ) {
- _Thread_Suspend( the_thread );
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
- }
- _Thread_Enable_dispatch();
- return RTEMS_ALREADY_SUSPENDED;
- }
-
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
-}
diff --git a/cpukit/rtems/src/taskvariableadd.c b/cpukit/rtems/src/taskvariableadd.c
deleted file mode 100644
index 0f1ae0895e..0000000000
--- a/cpukit/rtems/src/taskvariableadd.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * rtems_task_variable_add - Add a per-task variable
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/tasks.h>
-#include <rtems/score/wkspace.h>
-
-/*
- * rtems_task_variable_add
- *
- * This directive registers a task variable.
- */
-
-rtems_status_code rtems_task_variable_add(
- rtems_id tid,
- void **ptr,
- void (*dtor)(void *)
-)
-{
- Thread_Control *the_thread;
- Objects_Locations location;
- rtems_task_variable_t *tvp, *new;
-
- the_thread = _Thread_Get (tid, &location);
- switch (location) {
- case OBJECTS_REMOTE:
-#if defined(RTEMS_MULTIPROCESSING)
- _Thread_Dispatch();
- return RTEMS_ILLEGAL_ON_REMOTE_OBJECT;
-#endif
-
- case OBJECTS_ERROR:
- return RTEMS_INVALID_ID;
-
- default:
- return RTEMS_INTERNAL_ERROR;
-
- case OBJECTS_LOCAL:
-
- /*
- * Figure out if the variable is already in this task's list.
- */
-
- tvp = the_thread->task_variables;
- while (tvp) {
- if (tvp->ptr == ptr) {
- tvp->dtor = dtor;
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
- }
- tvp = tvp->next;
- }
-
- /*
- * Now allocate memory for this task variable.
- */
-
- new = (rtems_task_variable_t *)
- _Workspace_Allocate(sizeof(rtems_task_variable_t));
- if (new == NULL) {
- _Thread_Enable_dispatch();
- return RTEMS_NO_MEMORY;
- }
- new->var = 0;
- new->ptr = ptr;
- new->dtor = dtor;
-
- new->next = the_thread->task_variables;
- the_thread->task_variables = new;
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
- }
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
-}
diff --git a/cpukit/rtems/src/taskvariabledelete.c b/cpukit/rtems/src/taskvariabledelete.c
deleted file mode 100644
index c760f9ba39..0000000000
--- a/cpukit/rtems/src/taskvariabledelete.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * rtems_task_variable_delete - Delete a per-task variable
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/tasks.h>
-#include <rtems/score/wkspace.h>
-
-/*
- * rtems_task_variable_delete
- *
- * This directive removes a task variable.
- */
-
-rtems_status_code rtems_task_variable_delete(
- rtems_id tid,
- void **ptr
-)
-{
- Thread_Control *the_thread;
- Objects_Locations location;
- rtems_task_variable_t *tvp, *prev;
-
- prev = NULL;
-
- the_thread = _Thread_Get (tid, &location);
- switch (location) {
- case OBJECTS_REMOTE:
-#if defined(RTEMS_MULTIPROCESSING)
- _Thread_Dispatch();
- return RTEMS_ILLEGAL_ON_REMOTE_OBJECT;
-#endif
-
- case OBJECTS_ERROR:
- return RTEMS_INVALID_ID;
-
- default:
- return RTEMS_INTERNAL_ERROR;
-
- case OBJECTS_LOCAL:
- tvp = the_thread->task_variables;
- while (tvp) {
- if (tvp->ptr == ptr) {
- if (prev) prev->next = tvp->next;
- else the_thread->task_variables = tvp->next;
- _Thread_Enable_dispatch();
- _Workspace_Free(tvp);
- return RTEMS_SUCCESSFUL;
- }
- prev = tvp;
- tvp = tvp->next;
- }
- _Thread_Enable_dispatch();
- return RTEMS_INVALID_ADDRESS;
- }
-
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
-}
diff --git a/cpukit/rtems/src/taskvariableget.c b/cpukit/rtems/src/taskvariableget.c
deleted file mode 100644
index 9beb0c4045..0000000000
--- a/cpukit/rtems/src/taskvariableget.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * rtems_task_variable_get - Get a per-task variable
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/tasks.h>
-#include <rtems/score/wkspace.h>
-
-/*
- * rtems_task_variable_get
- *
- * This directive gets the value of a task variable.
- */
-
-rtems_status_code rtems_task_variable_get(
- rtems_id tid,
- void **ptr,
- void **result
-)
-{
- Thread_Control *the_thread;
- Objects_Locations location;
- rtems_task_variable_t *tvp;
-
- the_thread = _Thread_Get (tid, &location);
- switch (location) {
- case OBJECTS_REMOTE:
-#if defined(RTEMS_MULTIPROCESSING)
- _Thread_Dispatch();
- return RTEMS_ILLEGAL_ON_REMOTE_OBJECT;
-#endif
-
- case OBJECTS_ERROR:
- return RTEMS_INVALID_ID;
-
- default:
- return RTEMS_INTERNAL_ERROR;
-
- case OBJECTS_LOCAL:
-
- /*
- * Figure out if the variable is in this task's list.
- */
-
- tvp = the_thread->task_variables;
- while (tvp) {
- if (tvp->ptr == ptr) {
- /*
- * Should this return the current (i.e not the
- * saved) value if `tid' is the current task?
- */
- *result = tvp->var;
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
- }
- tvp = tvp->next;
- }
- _Thread_Enable_dispatch();
- return RTEMS_INVALID_ADDRESS;
- }
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
-}
diff --git a/cpukit/rtems/src/taskwakeafter.c b/cpukit/rtems/src/taskwakeafter.c
deleted file mode 100644
index 65ecfa64d2..0000000000
--- a/cpukit/rtems/src/taskwakeafter.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * RTEMS Task Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/rtems/modes.h>
-#include <rtems/score/object.h>
-#include <rtems/score/stack.h>
-#include <rtems/score/states.h>
-#include <rtems/rtems/tasks.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/tod.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/sysstate.h>
-
-/*PAGE
- *
- * rtems_task_wake_after
- *
- * This directive suspends the requesting thread for the given amount
- * of ticks.
- *
- * Input parameters:
- * ticks - number of ticks to wait
- *
- * Output parameters:
- * RTEMS_SUCCESSFUL - always successful
- */
-
-rtems_status_code rtems_task_wake_after(
- rtems_interval ticks
-)
-{
- _Thread_Disable_dispatch();
- if ( ticks == 0 ) {
- _Thread_Yield_processor();
- } else {
- _Thread_Set_state( _Thread_Executing, STATES_DELAYING );
- _Watchdog_Initialize(
- &_Thread_Executing->Timer,
- _Thread_Delay_ended,
- _Thread_Executing->Object.id,
- NULL
- );
- _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks );
- }
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
-}
diff --git a/cpukit/rtems/src/taskwakewhen.c b/cpukit/rtems/src/taskwakewhen.c
deleted file mode 100644
index 3469b7ee17..0000000000
--- a/cpukit/rtems/src/taskwakewhen.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * RTEMS Task Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/rtems/modes.h>
-#include <rtems/score/object.h>
-#include <rtems/score/stack.h>
-#include <rtems/score/states.h>
-#include <rtems/rtems/tasks.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/tod.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/sysstate.h>
-
-/*PAGE
- *
- * rtems_task_wake_when
- *
- * This directive blocks the requesting thread until the given date and
- * time is reached.
- *
- * Input parameters:
- * time_buffer - pointer to the time and date structure
- *
- * Output parameters:
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_task_wake_when(
-rtems_time_of_day *time_buffer
-)
-{
- Watchdog_Interval seconds;
-
- if ( !_TOD_Is_set )
- return RTEMS_NOT_DEFINED;
-
- time_buffer->ticks = 0;
-
- if ( !_TOD_Validate( time_buffer ) )
- return RTEMS_INVALID_CLOCK;
-
- seconds = _TOD_To_seconds( time_buffer );
-
- if ( seconds <= _TOD_Seconds_since_epoch )
- return RTEMS_INVALID_CLOCK;
-
- _Thread_Disable_dispatch();
- _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME );
- _Watchdog_Initialize(
- &_Thread_Executing->Timer,
- _Thread_Delay_ended,
- _Thread_Executing->Object.id,
- NULL
- );
- _Watchdog_Insert_seconds(
- &_Thread_Executing->Timer,
- seconds - _TOD_Seconds_since_epoch
- );
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
-}
diff --git a/cpukit/rtems/src/timercancel.c b/cpukit/rtems/src/timercancel.c
deleted file mode 100644
index 9db829d717..0000000000
--- a/cpukit/rtems/src/timercancel.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Timer Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/score/object.h>
-#include <rtems/score/thread.h>
-#include <rtems/rtems/timer.h>
-#include <rtems/score/tod.h>
-#include <rtems/score/watchdog.h>
-
-/*PAGE
- *
- * rtems_timer_cancel
- *
- * This directive allows a thread to cancel a timer.
- *
- * Input parameters:
- * id - timer id
- *
- * Output parameters:
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_timer_cancel(
- Objects_Id id
-)
-{
- Timer_Control *the_timer;
- Objects_Locations location;
-
- the_timer = _Timer_Get( id, &location );
- switch ( location ) {
- case OBJECTS_REMOTE: /* should never return this */
- return RTEMS_INTERNAL_ERROR;
-
- case OBJECTS_ERROR:
- return RTEMS_INVALID_ID;
-
- case OBJECTS_LOCAL:
- if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
- (void) _Watchdog_Remove( &the_timer->Ticker );
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
- }
-
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
-}
diff --git a/cpukit/rtems/src/timercreate.c b/cpukit/rtems/src/timercreate.c
deleted file mode 100644
index 33e7f00d79..0000000000
--- a/cpukit/rtems/src/timercreate.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Timer Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/score/object.h>
-#include <rtems/score/thread.h>
-#include <rtems/rtems/timer.h>
-#include <rtems/score/tod.h>
-#include <rtems/score/watchdog.h>
-
-/*PAGE
- *
- * rtems_timer_create
- *
- * This directive creates a timer and performs some initialization.
- *
- * Input parameters:
- * name - timer name
- * id - pointer to timer id
- *
- * Output parameters:
- * id - timer id
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_timer_create(
- rtems_name name,
- Objects_Id *id
-)
-{
- Timer_Control *the_timer;
-
- if ( !rtems_is_name_valid( name ) )
- return RTEMS_INVALID_NAME;
-
- _Thread_Disable_dispatch(); /* to prevent deletion */
-
- the_timer = _Timer_Allocate();
-
- if ( !the_timer ) {
- _Thread_Enable_dispatch();
- return RTEMS_TOO_MANY;
- }
-
- the_timer->the_class = TIMER_DORMANT;
-
- _Objects_Open( &_Timer_Information, &the_timer->Object, &name );
-
- *id = the_timer->Object.id;
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
-}
diff --git a/cpukit/rtems/src/timerdelete.c b/cpukit/rtems/src/timerdelete.c
deleted file mode 100644
index c207cb0ab7..0000000000
--- a/cpukit/rtems/src/timerdelete.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Timer Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/score/object.h>
-#include <rtems/score/thread.h>
-#include <rtems/rtems/timer.h>
-#include <rtems/score/tod.h>
-#include <rtems/score/watchdog.h>
-
-/*PAGE
- *
- * rtems_timer_delete
- *
- * This directive allows a thread to delete a timer.
- *
- * Input parameters:
- * id - timer id
- *
- * Output parameters:
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_timer_delete(
- Objects_Id id
-)
-{
- Timer_Control *the_timer;
- Objects_Locations location;
-
- the_timer = _Timer_Get( id, &location );
- switch ( location ) {
- case OBJECTS_REMOTE: /* should never return this */
- return RTEMS_INTERNAL_ERROR;
-
- case OBJECTS_ERROR:
- return RTEMS_INVALID_ID;
-
- case OBJECTS_LOCAL:
- _Objects_Close( &_Timer_Information, &the_timer->Object );
- (void) _Watchdog_Remove( &the_timer->Ticker );
- _Timer_Free( the_timer );
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
- }
-
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
-}
diff --git a/cpukit/rtems/src/timerfireafter.c b/cpukit/rtems/src/timerfireafter.c
deleted file mode 100644
index f31b63ae92..0000000000
--- a/cpukit/rtems/src/timerfireafter.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Timer Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/score/object.h>
-#include <rtems/score/thread.h>
-#include <rtems/rtems/timer.h>
-#include <rtems/score/tod.h>
-#include <rtems/score/watchdog.h>
-
-/*PAGE
- *
- * rtems_timer_fire_after
- *
- * This directive allows a thread to start a timer.
- *
- * Input parameters:
- * id - timer id
- * ticks - interval until routine is fired
- * routine - routine to schedule
- *
- * Output parameters:
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_timer_fire_after(
- Objects_Id id,
- rtems_interval ticks,
- rtems_timer_service_routine_entry routine,
- void *user_data
-)
-{
- Timer_Control *the_timer;
- Objects_Locations location;
-
- if ( ticks == 0 )
- return RTEMS_INVALID_NUMBER;
-
- the_timer = _Timer_Get( id, &location );
- switch ( location ) {
- case OBJECTS_REMOTE: /* should never return this */
- return RTEMS_INTERNAL_ERROR;
-
- case OBJECTS_ERROR:
- return RTEMS_INVALID_ID;
-
- case OBJECTS_LOCAL:
- (void) _Watchdog_Remove( &the_timer->Ticker );
- the_timer->the_class = TIMER_INTERVAL;
- _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
- _Watchdog_Insert_ticks( &the_timer->Ticker, ticks );
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
- }
-
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
-}
diff --git a/cpukit/rtems/src/timerfirewhen.c b/cpukit/rtems/src/timerfirewhen.c
deleted file mode 100644
index 309261351a..0000000000
--- a/cpukit/rtems/src/timerfirewhen.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Timer Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/score/object.h>
-#include <rtems/score/thread.h>
-#include <rtems/rtems/timer.h>
-#include <rtems/score/tod.h>
-#include <rtems/score/watchdog.h>
-
-/*PAGE
- *
- * rtems_timer_fire_when
- *
- * This directive allows a thread to start a timer.
- *
- * Input parameters:
- * id - timer id
- * wall_time - time of day to fire timer
- * routine - routine to schedule
- *
- * Output parameters:
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_timer_fire_when(
- Objects_Id id,
- rtems_time_of_day *wall_time,
- rtems_timer_service_routine_entry routine,
- void *user_data
-)
-{
- Timer_Control *the_timer;
- Objects_Locations location;
- rtems_interval seconds;
-
- if ( !_TOD_Is_set )
- return RTEMS_NOT_DEFINED;
-
- if ( !_TOD_Validate( wall_time ) )
- return RTEMS_INVALID_CLOCK;
-
- seconds = _TOD_To_seconds( wall_time );
- if ( seconds <= _TOD_Seconds_since_epoch )
- return RTEMS_INVALID_CLOCK;
-
- the_timer = _Timer_Get( id, &location );
- switch ( location ) {
- case OBJECTS_REMOTE: /* should never return this */
- return RTEMS_INTERNAL_ERROR;
-
- case OBJECTS_ERROR:
- return RTEMS_INVALID_ID;
-
- case OBJECTS_LOCAL:
- (void) _Watchdog_Remove( &the_timer->Ticker );
- the_timer->the_class = TIMER_TIME_OF_DAY;
- _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
- _Watchdog_Insert_seconds(
- &the_timer->Ticker,
- seconds - _TOD_Seconds_since_epoch
- );
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
- }
-
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
-}
diff --git a/cpukit/rtems/src/timerident.c b/cpukit/rtems/src/timerident.c
deleted file mode 100644
index 492f55c6ac..0000000000
--- a/cpukit/rtems/src/timerident.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Timer Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/score/object.h>
-#include <rtems/score/thread.h>
-#include <rtems/rtems/timer.h>
-#include <rtems/score/tod.h>
-#include <rtems/score/watchdog.h>
-
-/*PAGE
- *
- * rtems_timer_ident
- *
- * This directive returns the system ID associated with
- * the timer name.
- *
- * Input parameters:
- * name - user defined message queue name
- * id - pointer to timer id
- *
- * Output parameters:
- * *id - message queue id
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_timer_ident(
- rtems_name name,
- Objects_Id *id
-)
-{
- Objects_Name_to_id_errors status;
-
- status = _Objects_Name_to_id(
- &_Timer_Information,
- &name,
- OBJECTS_SEARCH_LOCAL_NODE,
- id
- );
-
- return _Status_Object_name_errors_to_status[ status ];
-}
diff --git a/cpukit/rtems/src/timerreset.c b/cpukit/rtems/src/timerreset.c
deleted file mode 100644
index f538098b1e..0000000000
--- a/cpukit/rtems/src/timerreset.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Timer Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-#include <rtems/score/object.h>
-#include <rtems/score/thread.h>
-#include <rtems/rtems/timer.h>
-#include <rtems/score/tod.h>
-#include <rtems/score/watchdog.h>
-
-/*PAGE
- *
- * rtems_timer_reset
- *
- * This directive allows a thread to reset a timer.
- *
- * Input parameters:
- * id - timer id
- *
- * Output parameters:
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_timer_reset(
- Objects_Id id
-)
-{
- Timer_Control *the_timer;
- Objects_Locations location;
-
- the_timer = _Timer_Get( id, &location );
- switch ( location ) {
- case OBJECTS_REMOTE: /* should never return this */
- return RTEMS_INTERNAL_ERROR;
-
- case OBJECTS_ERROR:
- return RTEMS_INVALID_ID;
-
- case OBJECTS_LOCAL:
- if ( _Timer_Is_interval_class( the_timer->the_class ) ) {
- _Watchdog_Reset( &the_timer->Ticker );
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
- }
- _Thread_Enable_dispatch();
- return RTEMS_NOT_DEFINED;
- }
-
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
-}
diff --git a/cpukit/sapi/Makefile.am b/cpukit/sapi/Makefile.am
deleted file mode 100644
index 242daede4e..0000000000
--- a/cpukit/sapi/Makefile.am
+++ /dev/null
@@ -1,10 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-SUBDIRS = include inline macros optman src
-
-include $(top_srcdir)/../../../automake/subdirs.am
-include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/sapi/include/Makefile.am b/cpukit/sapi/include/Makefile.am
deleted file mode 100644
index 5391ab5d89..0000000000
--- a/cpukit/sapi/include/Makefile.am
+++ /dev/null
@@ -1,27 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-H_FILES = confdefs.h
-
-noinst_HEADERS = $(H_FILES)
-
-PREINSTALL_FILES = \
-$(PROJECT_INCLUDE) \
-$(noinst_HEADERS:%=$(PROJECT_INCLUDE)/%)
-
-$(PROJECT_INCLUDE):
- @$(mkinstalldirs) $@
-$(PROJECT_INCLUDE)/%.h: %.h
- $(INSTALL_DATA) $< $@
-
-all-am: $(PREINSTALL_FILES)
-debug-am: $(PREINSTALL_FILES)
-profile-am: $(PREINSTALL_FILES)
-
-SUBDIRS = rtems
-
-include $(top_srcdir)/../../../automake/subdirs.am
-include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/sapi/include/confdefs.h b/cpukit/sapi/include/confdefs.h
deleted file mode 100644
index 8e2e876aad..0000000000
--- a/cpukit/sapi/include/confdefs.h
+++ /dev/null
@@ -1,933 +0,0 @@
-/* confdefs.h
- *
- * This include file contains the configuration table template that will
- * be used by the single processor tests to define its default configuration
- * parameters.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __CONFIGURATION_TEMPLATE_h
-#define __CONFIGURATION_TEMPLATE_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-extern rtems_initialization_tasks_table Initialization_tasks[];
-extern rtems_driver_address_table Device_drivers[];
-extern rtems_configuration_table Configuration;
-extern rtems_multiprocessing_table Multiprocessing_configuration;
-#ifdef RTEMS_POSIX_API
-extern posix_api_configuration_table Configuration_POSIX_API;
-#endif
-#ifdef RTEMS_ITRON_API
-extern itron_api_configuration_table Configuration_ITRON_API;
-#endif
-
-/*
- * RTEMS C Library and Newlib support
- *
- * NOTE: This ends up defining these even when newlib is not used.
- */
-
-#define CONFIGURE_NEWLIB_EXTENSION 1
-#define CONFIGURE_MALLOC_REGION 1
-
-#ifndef CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS
-#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20
-#endif
-
-#define CONFIGURE_LIBIO_SEMAPHORES \
- (CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS + 1)
-
-#ifdef CONFIGURE_INIT
-unsigned32 rtems_libio_number_iops = CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS;
-#endif
-
-/*
- * Mount Table Configuration
- */
-
-#include <imfs.h>
-
-#ifdef CONFIGURE_INIT
-
-#ifndef CONFIGURE_HAS_OWN_MOUNT_TABLE
-rtems_filesystem_mount_table_t configuration_mount_table = {
-#ifdef CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM
- &miniIMFS_ops,
-#else /* using IMFS as base filesystem */
- &IMFS_ops,
-#endif
- RTEMS_FILESYSTEM_READ_WRITE,
- NULL,
- NULL
-};
-
-rtems_filesystem_mount_table_t
- *rtems_filesystem_mount_table = &configuration_mount_table;
-int rtems_filesystem_mount_table_size = 1;
-#endif
-
-#endif
-
-
-/*
- * Stack Checker Requirements
- *
- * NOTE: This does not automatically enable reporting at program exit.
- */
-
-#ifdef STACK_CHECKER_ON
-#define CONFIGURE_STACK_CHECKER_EXTENSION 1
-#else
-#define CONFIGURE_STACK_CHECKER_EXTENSION 0
-#endif
-
-/*
- * Interrupt Stack Space
- */
-
-#if (CPU_ALLOCATE_INTERRUPT_STACK == 0)
-#define CONFIGURE_INTERRUPT_STACK_MEMORY 0
-#else
- #ifndef CONFIGURE_INTERRUPT_STACK_MEMORY
- #define CONFIGURE_INTERRUPT_STACK_MEMORY RTEMS_MINIMUM_STACK_SIZE
- #else
- #define CONFIGURE_INTERRUPT_STACK_MEMORY 0
- #endif
-#endif
-
-/*
- * Default User Initialization Task Table. This table guarantees that
- * one user initialization table is defined.
- */
-
-#ifdef CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#ifdef CONFIGURE_HAS_OWN_INIT_TASK_TABLE
-
-/*
- * The user is defining their own table information and setting the
- * appropriate variables.
- */
-
-#else
-
-#ifndef CONFIGURE_INIT_TASK_NAME
-#define CONFIGURE_INIT_TASK_NAME rtems_build_name( 'U', 'I', '1', ' ' )
-#endif
-
-#ifndef CONFIGURE_INIT_TASK_STACK_SIZE
-#define CONFIGURE_INIT_TASK_STACK_SIZE RTEMS_MINIMUM_STACK_SIZE
-#endif
-
-#ifndef CONFIGURE_INIT_TASK_PRIORITY
-#define CONFIGURE_INIT_TASK_PRIORITY 1
-#endif
-
-#ifndef CONFIGURE_INIT_TASK_ATTRIBUTES
-#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_DEFAULT_ATTRIBUTES
-#endif
-
-#ifndef CONFIGURE_INIT_TASK_ENTRY_POINT
-#define CONFIGURE_INIT_TASK_ENTRY_POINT Init
-#endif
-
-#ifndef CONFIGURE_INIT_TASK_INITIAL_MODES
-#define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_NO_PREEMPT
-#endif
-
-#ifndef CONFIGURE_INIT_TASK_ARGUMENTS
-#define CONFIGURE_INIT_TASK_ARGUMENTS 0
-#endif
-
-#ifdef CONFIGURE_INIT
-rtems_initialization_tasks_table Initialization_tasks[] = {
- { CONFIGURE_INIT_TASK_NAME,
- CONFIGURE_INIT_TASK_STACK_SIZE,
- CONFIGURE_INIT_TASK_PRIORITY,
- CONFIGURE_INIT_TASK_ATTRIBUTES,
- CONFIGURE_INIT_TASK_ENTRY_POINT,
- CONFIGURE_INIT_TASK_INITIAL_MODES,
- CONFIGURE_INIT_TASK_ARGUMENTS
- }
-};
-#endif
-
-#define CONFIGURE_INIT_TASK_TABLE Initialization_tasks
-
-#define CONFIGURE_INIT_TASK_TABLE_SIZE \
- sizeof(CONFIGURE_INIT_TASK_TABLE) / sizeof(rtems_initialization_tasks_table)
-
-#endif /* CONFIGURE_HAS_OWN_INIT_TASK_TABLE */
-
-#else /* CONFIGURE_RTEMS_INIT_TASKS_TABLE */
-
-#define CONFIGURE_INIT_TASK_TABLE NULL
-#define CONFIGURE_INIT_TASK_TABLE_SIZE 0
-
-#endif
-
-/*
- * Default Device Driver Table. Each driver needed by the test is explicitly
- * choosen by that test. There is always a null driver entry.
- */
-
-#define NULL_DRIVER_TABLE_ENTRY \
- { NULL, NULL, NULL, NULL, NULL, NULL }
-
-#ifdef CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-#include <timerdrv.h>
-#endif
-
-#ifdef CONFIGURE_TEST_NEEDS_STUB_DRIVER
-#include <stubdrv.h>
-#endif
-
-#ifndef CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE
-
-#ifdef CONFIGURE_INIT
-rtems_driver_address_table Device_drivers[] = {
-#ifdef CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
- CONSOLE_DRIVER_TABLE_ENTRY,
-#endif
-#ifdef CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
- CLOCK_DRIVER_TABLE_ENTRY,
-#endif
-#ifdef CONFIGURE_TEST_NEEDS_STUB_DRIVER
- STUB_DRIVER_TABLE_ENTRY,
-#endif
- NULL_DRIVER_TABLE_ENTRY
-};
-#endif
-
-#endif /* CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE */
-
-/*
- * Default the number of devices per device driver. This value may be
- * overridden by the user.
- */
-
-#ifndef CONFIGURE_HAS_OWN_NUMBER_OF_DEVICES
-
-#ifndef CONFIGURE_MAXIMUM_DEVICES
-#define CONFIGURE_MAXIMUM_DEVICES 20
-#endif
-
-#endif /* CONFIGURE_HAS_OWN_NUMBER_OF_DEVICES */
-
-/*
- * Default Configuration Table. This table contains the most values set in
- * the RTEMS Test Suite. Each value may be overridden within each test to
- * customize the environment.
- */
-
-#ifdef CONFIGURE_MPTEST
-#ifndef CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE
-
-#ifndef CONFIGURE_MP_NODE_NUMBER
-#define CONFIGURE_MP_NODE_NUMBER NODE_NUMBER
-#endif
-
-#ifndef CONFIGURE_MP_MAXIMUM_NODES
-#define CONFIGURE_MP_MAXIMUM_NODES 2
-#endif
-
-#ifndef CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS
-#define CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS 32
-#endif
-
-#ifndef CONFIGURE_MP_MAXIMUM_PROXIES
-#define CONFIGURE_MP_MAXIMUM_PROXIES 32
-#endif
-
-#ifndef CONFIGURE_MP_MPCI_TABLE_POINTER
-#include <mpci.h>
-#define CONFIGURE_MP_MPCI_TABLE_POINTER &MPCI_table
-#endif
-
-#ifdef CONFIGURE_INIT
-rtems_multiprocessing_table Multiprocessing_configuration = {
- CONFIGURE_MP_NODE_NUMBER, /* local node number */
- CONFIGURE_MP_MAXIMUM_NODES, /* maximum # nodes in system */
- CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS, /* maximum # global objects */
- CONFIGURE_MP_MAXIMUM_PROXIES, /* maximum # proxies */
- CONFIGURE_MP_MPCI_TABLE_POINTER /* pointer to MPCI config table */
-};
-#endif
-
-#define CONFIGURE_MULTIPROCESSING_TABLE &Multiprocessing_configuration
-
-#endif /* CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE */
-
-#else
-
-#define CONFIGURE_MULTIPROCESSING_TABLE NULL
-
-#endif /* CONFIGURE_MPTEST */
-
-/*
- * Default Configuration Table. This table contains the most values set in
- * the RTEMS Test Suite. Each value may be overridden within each test to
- * customize the environment.
- */
-
-#ifndef CONFIGURE_HAS_OWN_CONFIGURATION_TABLE
-
-#ifndef CONFIGURE_EXECUTIVE_RAM_WORK_AREA
-#define CONFIGURE_EXECUTIVE_RAM_WORK_AREA NULL
-#endif
-
-#ifndef CONFIGURE_MAXIMUM_TASKS
-#define CONFIGURE_MAXIMUM_TASKS 10
-#endif
-
-#ifndef CONFIGURE_MAXIMUM_TIMERS
-#define CONFIGURE_MAXIMUM_TIMERS 0
-#endif
-
-#ifndef CONFIGURE_MAXIMUM_SEMAPHORES
-#define CONFIGURE_MAXIMUM_SEMAPHORES 0
-#endif
-
-#ifndef CONFIGURE_MAXIMUM_MESSAGE_QUEUES
-#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 0
-#endif
-
-#ifndef CONFIGURE_MAXIMUM_PARTITIONS
-#define CONFIGURE_MAXIMUM_PARTITIONS 0
-#endif
-
-#ifndef CONFIGURE_MAXIMUM_REGIONS
-#define CONFIGURE_MAXIMUM_REGIONS 0
-#endif
-
-#ifndef CONFIGURE_MAXIMUM_PORTS
-#define CONFIGURE_MAXIMUM_PORTS 0
-#endif
-
-#ifndef CONFIGURE_MAXIMUM_PERIODS
-#define CONFIGURE_MAXIMUM_PERIODS 0
-#endif
-
-#ifndef CONFIGURE_MAXIMUM_USER_EXTENSIONS
-#define CONFIGURE_MAXIMUM_USER_EXTENSIONS 0
-#endif
-
-#ifndef CONFIGURE_MICROSECONDS_PER_TICK
-#define CONFIGURE_MICROSECONDS_PER_TICK RTEMS_MILLISECONDS_TO_MICROSECONDS(10)
-#endif
-
-#ifndef CONFIGURE_TICKS_PER_TIMESLICE
-#define CONFIGURE_TICKS_PER_TIMESLICE 50
-#endif
-
-/*
- * Initial Extension Set
- */
-
-#ifdef CONFIGURE_INIT
-#ifdef STACK_CHECKER_ON
-#include <rtems/stackchk.h>
-#endif
-
-rtems_extensions_table Configuration_Initial_Extensions[] = {
-#ifdef CONFIGURE_INITIAL_EXTENSIONS
- CONFIGURE_INITIAL_EXTENSIONS,
-#endif
-#ifdef STACK_CHECKER_ON
- STACK_CHECKER_EXTENSION,
-#endif
- { NULL, NULL, NULL, NULL, NULL, NULL, NULL }
-};
-
-#define CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS \
- ((sizeof(Configuration_Initial_Extensions) / \
- sizeof(rtems_extensions_table)) - 1)
-
-#endif
-
-/*
- * POSIX API Configuration Parameters
- */
-
-#ifdef RTEMS_POSIX_API
-
-#include <sys/types.h>
-#include <sys/siginfo.h>
-#include <mqueue.h>
-#include <rtems/posix/cond.h>
-#include <rtems/posix/mqueue.h>
-#include <rtems/posix/mutex.h>
-#include <rtems/posix/key.h>
-#include <rtems/posix/psignal.h>
-#include <rtems/posix/semaphore.h>
-#include <rtems/posix/threadsup.h>
-
-#ifndef CONFIGURE_MAXIMUM_POSIX_THREADS
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
-#endif
-
-#ifndef CONFIGURE_MAXIMUM_POSIX_MUTEXES
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 0
-#endif
-
-#ifndef CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 0
-#endif
-
-#ifndef CONFIGURE_MAXIMUM_POSIX_KEYS
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 0
-#endif
-
-#ifndef CONFIGURE_MAXIMUM_POSIX_TIMERS
-#define CONFIGURE_MAXIMUM_POSIX_TIMERS 0
-#endif
-
-#ifndef CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS
-#define CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS 0
-#endif
-
-#ifndef CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES
-#define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES 0
-#endif
-
-#ifndef CONFIGURE_MAXIMUM_POSIX_SEMAPHORES
-#define CONFIGURE_MAXIMUM_POSIX_SEMAPHORES 0
-#endif
-
-#ifdef CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#ifdef CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE
-
-/*
- * The user is defining their own table information and setting the
- * appropriate variables.
- */
-
-#else
-
-#ifndef CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT
-#define CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT POSIX_Init
-#endif
-
-#ifndef CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE
-#define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE (RTEMS_MINIMUM_STACK_SIZE * 2)
-#endif
-
-#ifdef CONFIGURE_INIT
-posix_initialization_threads_table POSIX_Initialization_threads[] = {
- { CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT, \
- CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE }
-};
-#endif
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME POSIX_Initialization_threads
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE \
- sizeof(CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME) / \
- sizeof(posix_initialization_threads_table)
-
-#endif /* CONFIGURE_POSIX_HAS_OWN_INIT_TASK_TABLE */
-
-#else /* CONFIGURE_POSIX_INIT_THREAD_TABLE */
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME NULL
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE 0
-
-#endif
-
-#define CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API \
- ( \
- sizeof (POSIX_API_Control) + \
- (sizeof (void *) * (CONFIGURE_GNAT_KEYS + CONFIGURE_MAXIMUM_POSIX_KEYS)) \
- )
-
-#define CONFIGURE_MEMORY_FOR_POSIX_MUTEXES(_mutexes) \
- ((_mutexes) * \
- ( sizeof(POSIX_Mutex_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
-
-#define CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES(_condition_variables) \
- ((_condition_variables) * \
- ( sizeof(POSIX_Condition_variables_Control) + \
- CONFIGURE_OBJECT_TABLE_STUFF ) )
-
-#define CONFIGURE_MEMORY_FOR_POSIX_KEYS(_keys) \
- ((_keys) * \
- ( sizeof(POSIX_Keys_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
-
-#define CONFIGURE_MEMORY_FOR_POSIX_TIMERS(_timers) \
- ((_timers) * \
- ( 0 ) )
-
-#define CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS(_queued_signals) \
- ((_queued_signals) * \
- ( sizeof(POSIX_signals_Siginfo_node) + CONFIGURE_OBJECT_TABLE_STUFF ) )
-
-#define CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES(_message_queues) \
- ((_message_queues) * \
- ( sizeof( POSIX_Message_queue_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
-#define CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES(_semaphores) \
- ((_semaphores) * \
- ( sizeof( POSIX_Semaphore_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
-
-
-#define CONFIGURE_MEMORY_FOR_POSIX \
- ( \
- CONFIGURE_MEMORY_FOR_POSIX_MUTEXES( CONFIGURE_MAXIMUM_POSIX_MUTEXES ) + \
- CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES( \
- CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES ) + \
- CONFIGURE_MEMORY_FOR_POSIX_KEYS( CONFIGURE_MAXIMUM_POSIX_KEYS ) + \
- CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS( \
- CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS ) + \
- CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES( \
- CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES ) + \
- CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES( \
- CONFIGURE_MAXIMUM_POSIX_SEMAPHORES ) + \
- (CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE) \
- )
-
-
-#else
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 0
-#define CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API 0
-#define CONFIGURE_MEMORY_FOR_POSIX 0
-
-
-#endif /* RTEMS_POSIX_API */
-
-#ifndef CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE
-#define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE 0
-#endif
-
-/*
- * ITRON API Configuration Parameters
- */
-
-#ifdef RTEMS_ITRON_API
-
-#include <itron.h>
-#include <rtems/itron/config.h>
-#include <rtems/itron/eventflags.h>
-#include <rtems/itron/fmempool.h>
-#include <rtems/itron/mbox.h>
-#include <rtems/itron/msgbuffer.h>
-#include <rtems/itron/port.h>
-#include <rtems/itron/semaphore.h>
-#include <rtems/itron/task.h>
-#include <rtems/itron/vmempool.h>
-
-#ifndef CONFIGURE_MAXIMUM_ITRON_TASKS
-#define CONFIGURE_MAXIMUM_ITRON_TASKS 10
-#endif
-
-#ifndef CONFIGURE_MAXIMUM_ITRON_SEMAPHORES
-#define CONFIGURE_MAXIMUM_ITRON_SEMAPHORES 0
-#endif
-
-#ifndef CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS
-#define CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS 0
-#endif
-
-#ifndef CONFIGURE_MAXIMUM_ITRON_MAILBOXES
-#define CONFIGURE_MAXIMUM_ITRON_MAILBOXES 0
-#endif
-
-#ifndef CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS
-#define CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS 0
-#endif
-
-#ifndef CONFIGURE_MAXIMUM_ITRON_PORTS
-#define CONFIGURE_MAXIMUM_ITRON_PORTS 0
-#endif
-
-#ifndef CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS
-#define CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS 0
-#endif
-
-#ifndef CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS
-#define CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS 0
-#endif
-
-#ifdef CONFIGURE_ITRON_INIT_TASK_TABLE
-
-#ifdef CONFIGURE_ITRON_HAS_OWN_INIT_TASK_TABLE
-
-/*
- * The user is defining their own table information and setting the
- * appropriate variables.
- */
-
-#else
-
-#ifndef CONFIGURE_ITRON_INIT_TASK_ENTRY_POINT
-#define CONFIGURE_ITRON_INIT_TASK_ENTRY_POINT ITRON_Init
-#endif
-
-#ifndef CONFIGURE_ITRON_INIT_TASK_ATTRIBUTES
-#define CONFIGURE_ITRON_INIT_TASK_ATTRIBUTES TA_HLNG
-#endif
-
-#ifndef CONFIGURE_ITRON_INIT_TASK_PRIORITY
-#define CONFIGURE_ITRON_INIT_TASK_PRIORITY 1
-#endif
-
-#ifndef CONFIGURE_ITRON_INIT_TASK_STACK_SIZE
-#define CONFIGURE_ITRON_INIT_TASK_STACK_SIZE RTEMS_MINIMUM_STACK_SIZE
-#endif
-
-#ifdef CONFIGURE_INIT
-itron_initialization_tasks_table ITRON_Initialization_tasks[] = {
- { 1, /* ID */
- { (VP) 0, /* exinfo */
- CONFIGURE_ITRON_INIT_TASK_ATTRIBUTES, /* task attributes */
- CONFIGURE_ITRON_INIT_TASK_ENTRY_POINT, /* task start address */
- CONFIGURE_ITRON_INIT_TASK_PRIORITY, /* initial task priority */
- CONFIGURE_ITRON_INIT_TASK_STACK_SIZE /* stack size */
- }
- }
-};
-#endif
-
-#define CONFIGURE_ITRON_INIT_TASK_TABLE_NAME ITRON_Initialization_tasks
-
-#define CONFIGURE_ITRON_INIT_TASK_TABLE_SIZE \
- sizeof(CONFIGURE_ITRON_INIT_TASK_TABLE_NAME) / \
- sizeof(itron_initialization_tasks_table)
-
-#endif /* CONFIGURE_ITRON_HAS_OWN_INIT_TASK_TABLE */
-
-#else /* CONFIGURE_ITRON_INIT_TASK_TABLE */
-
-#define CONFIGURE_ITRON_INIT_TASK_TABLE_NAME NULL
-#define CONFIGURE_ITRON_INIT_TASK_TABLE_SIZE 0
-
-#endif
-
-#define CONFIGURE_MEMORY_PER_TASK_FOR_ITRON_API \
- ( \
- sizeof (ITRON_API_Control) \
- )
-
-#define CONFIGURE_MEMORY_FOR_ITRON_SEMAPHORES(_semaphores) \
- ((_semaphores) * \
- ( sizeof(ITRON_Semaphore_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
-
-#define CONFIGURE_MEMORY_FOR_ITRON_EVENTFLAGS(_eventflags) \
- ((_eventflags) * \
- ( sizeof(ITRON_Eventflags_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
-
-#define CONFIGURE_MEMORY_FOR_ITRON_MAILBOXES(_mailboxes) \
- ((_mailboxes) * \
- ( sizeof(ITRON_Mailbox_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
-
-#define CONFIGURE_MEMORY_FOR_ITRON_MESSAGE_BUFFERS(_message_buffers) \
- ((_message_buffers) * \
- ( sizeof(ITRON_Message_buffer_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
-
-#define CONFIGURE_MEMORY_FOR_ITRON_PORTS(_ports) \
- ((_ports) * \
- ( sizeof(ITRON_Port_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
-
-#define CONFIGURE_MEMORY_FOR_ITRON_MEMORY_POOLS(_memory_pools) \
- ((_memory_pools) * \
- (sizeof(ITRON_Variable_memory_pool_Control) + CONFIGURE_OBJECT_TABLE_STUFF))
-
-#define CONFIGURE_MEMORY_FOR_ITRON_FIXED_MEMORY_POOLS(_fixed_memory_pools) \
- ((_fixed_memory_pools) * \
- ( sizeof(ITRON_Fixed_memory_pool_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
-
-#ifndef CONFIGURE_ITRON_INIT_TASK_STACK_SIZES
-#define CONFIGURE_ITRON_INIT_TASK_STACK_SIZES (RTEMS_MINIMUM_STACK_SIZE * 2)
-#endif
-
-
-#define CONFIGURE_MEMORY_FOR_ITRON \
- ( \
- CONFIGURE_MEMORY_FOR_ITRON_SEMAPHORES( \
- CONFIGURE_MAXIMUM_ITRON_SEMAPHORES ) + \
- CONFIGURE_MEMORY_FOR_ITRON_EVENTFLAGS( \
- CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS ) + \
- CONFIGURE_MEMORY_FOR_ITRON_MAILBOXES( \
- CONFIGURE_MAXIMUM_ITRON_MAILBOXES ) + \
- CONFIGURE_MEMORY_FOR_ITRON_MESSAGE_BUFFERS( \
- CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS ) + \
- CONFIGURE_MEMORY_FOR_ITRON_PORTS( \
- CONFIGURE_MAXIMUM_ITRON_PORTS ) + \
- CONFIGURE_MEMORY_FOR_ITRON_MEMORY_POOLS( \
- CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS ) + \
- CONFIGURE_MEMORY_FOR_ITRON_FIXED_MEMORY_POOLS( \
- CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS ) + \
- CONFIGURE_ITRON_INIT_TASK_STACK_SIZES \
- )
-
-
-#else
-
-#define CONFIGURE_MAXIMUM_ITRON_TASKS 0
-#define CONFIGURE_MAXIMUM_ITRON_SEMAPHORES 0
-#define CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS 0
-#define CONFIGURE_MAXIMUM_ITRON_MAILBOXES 0
-#define CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS 0
-#define CONFIGURE_MAXIMUM_ITRON_PORTS 0
-#define CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS 0
-#define CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS 0
-#define CONFIGURE_MEMORY_PER_TASK_FOR_ITRON_API 0
-#define CONFIGURE_MEMORY_FOR_ITRON 0
-
-#endif /* RTEMS_ITRON_API */
-
-
-/*
- * Calculate the RAM size based on the maximum number of objects configured.
- * The model is to estimate the memory required for each configured item,
- * sum the memory requirements and insure that there is at least 32K greater
- * than that for things not directly addressed such as:
- *
- * + stacks greater than minimum size
- * + FP contexts
- * + API areas (should be optional)
- * + messages
- * + object name and local pointer table overhead
- * + per node memory requirements
- * + executive fixed requirements (including at least internal threads
- * and the Ready chains)
- *
- * NOTE: Eventually this should take into account some of the above.
- * Basically, this is a "back of the envelope" estimate for
- * memory requirements. It could be more accurate.
- */
-
-#ifndef CONFIGURE_EXECUTIVE_RAM_SIZE
-
-#define CONFIGURE_OBJECT_TABLE_STUFF \
- ( sizeof(Objects_Control *) + sizeof(rtems_name *) + sizeof(rtems_name) )
-
-#define CONFIGURE_MEMORY_FOR_TASKS(_tasks) \
- (((_tasks) + 1 ) * \
- ((sizeof(Thread_Control) + CONTEXT_FP_SIZE + \
- STACK_MINIMUM_SIZE + sizeof( RTEMS_API_Control ) + \
- CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API + \
- CONFIGURE_MEMORY_PER_TASK_FOR_ITRON_API + \
- CONFIGURE_OBJECT_TABLE_STUFF)) \
- )
-
-#define CONFIGURE_MEMORY_FOR_TIMERS(_timers) \
- ((_timers) * ( sizeof(Timer_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
-
-#define CONFIGURE_MEMORY_FOR_SEMAPHORES(_semaphores) \
- ((_semaphores) * \
- ( sizeof(Semaphore_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
-
-#define CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(_queues) \
- ( (_queues) * \
- ( sizeof(Message_queue_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
-
-#define CONFIGURE_MEMORY_FOR_PARTITIONS(_partitions) \
- ( (_partitions) * \
- ( sizeof(Partition_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
-
-#define CONFIGURE_MEMORY_FOR_REGIONS(_regions) \
- ( (_regions) * \
- ( sizeof(Region_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
-
-#define CONFIGURE_MEMORY_FOR_PORTS(_ports) \
- ( (_ports) * \
- ( sizeof(Dual_ported_memory_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
-
-#define CONFIGURE_MEMORY_FOR_PERIODS(_periods) \
- ( (_periods) * \
- ( sizeof(Rate_monotonic_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
-
-#define CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(_extensions) \
- ( (_extensions) * \
- ( sizeof(Extension_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
-
-#define CONFIGURE_MEMORY_FOR_DEVICES(_devices) \
- (((_devices) + 1) * ( sizeof(rtems_driver_name_t) ) )
-
-#ifdef CONFIGURE_MPTEST
-
-#ifndef CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE
-
-#define CONFIGURE_MEMORY_FOR_PROXIES(_proxies) \
- ( ((_proxies) + 1) * ( sizeof(Thread_Proxy_control) ) )
-
-#define CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS(_global_objects) \
- ((_global_objects) * ( sizeof(Objects_MP_Control) ) )
-
-#define CONFIGURE_MEMORY_FOR_MP \
- ( CONFIGURE_MEMORY_FOR_PROXIES(CONFIGURE_MP_MAXIMUM_PROXIES) + \
- CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS(CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS) + \
- CONFIGURE_MEMORY_FOR_TASKS(1) \
- )
-
-#endif /* CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE */
-
-#else
-
-#define CONFIGURE_MEMORY_FOR_MP 0
-
-#endif
-
-#ifndef CONFIGURE_MEMORY_OVERHEAD
-#define CONFIGURE_MEMORY_OVERHEAD 0
-#endif
-
-#ifndef CONFIGURE_EXTRA_TASK_STACKS
-#define CONFIGURE_EXTRA_TASK_STACKS 0
-#endif
-
-#define CONFIGURE_MEMORY_FOR_SYSTEM_OVEREHAD \
- ( CONFIGURE_MEMORY_FOR_TASKS(1) + /* IDLE */ \
- (256 * 12) + /* Ready chains */ \
- 256 + /* name/ptr table overhead */ \
- CONFIGURE_INTERRUPT_STACK_MEMORY /* interrupt stack */ \
- )
-
-#define CONFIGURE_EXECUTIVE_RAM_SIZE \
-(( CONFIGURE_MEMORY_FOR_POSIX + \
- CONFIGURE_MEMORY_FOR_ITRON + \
- CONFIGURE_MEMORY_FOR_TASKS(CONFIGURE_MAXIMUM_TASKS + \
- CONFIGURE_MAXIMUM_POSIX_THREADS + CONFIGURE_MAXIMUM_ADA_TASKS + \
- CONFIGURE_MAXIMUM_ITRON_TASKS ) + \
- CONFIGURE_MEMORY_FOR_TIMERS(CONFIGURE_MAXIMUM_TIMERS) + \
- CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_MAXIMUM_SEMAPHORES + \
- CONFIGURE_LIBIO_SEMAPHORES) + \
- CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(CONFIGURE_MAXIMUM_MESSAGE_QUEUES) + \
- CONFIGURE_MEMORY_FOR_PARTITIONS(CONFIGURE_MAXIMUM_PARTITIONS) + \
- CONFIGURE_MEMORY_FOR_REGIONS( \
- CONFIGURE_MAXIMUM_REGIONS + CONFIGURE_MALLOC_REGION ) + \
- CONFIGURE_MEMORY_FOR_PORTS(CONFIGURE_MAXIMUM_PORTS) + \
- CONFIGURE_MEMORY_FOR_PERIODS(CONFIGURE_MAXIMUM_PERIODS) + \
- CONFIGURE_MEMORY_FOR_USER_EXTENSIONS( \
- CONFIGURE_MAXIMUM_USER_EXTENSIONS + CONFIGURE_NEWLIB_EXTENSION + \
- CONFIGURE_STACK_CHECKER_EXTENSION ) + \
- CONFIGURE_MEMORY_FOR_DEVICES(CONFIGURE_MAXIMUM_DEVICES) + \
- CONFIGURE_MEMORY_FOR_MP + \
- CONFIGURE_MEMORY_FOR_SYSTEM_OVEREHAD + \
- (((CONFIGURE_MEMORY_OVERHEAD)+1) * 1024) + \
- (CONFIGURE_EXTRA_TASK_STACKS) + (CONFIGURE_ADA_TASKS_STACK) \
-) & 0xfffffc00)
-#endif
-
-#ifdef CONFIGURE_GNAT_RTEMS
-#define CONFIGURE_GNAT_MUTEXES 10
-#define CONFIGURE_GNAT_KEYS 1
-
-/* 20 are required to run all tests in the ACVC */
-#ifndef CONFIGURE_MAXIMUM_ADA_TASKS
-#define CONFIGURE_MAXIMUM_ADA_TASKS 20
-#endif
-
-/* This is the number of non-Ada tasks which invoked Ada code. */
-#ifndef CONFIGURE_MAXIMUM_FAKE_ADA_TASKS
-#define CONFIGURE_MAXIMUM_FAKE_ADA_TASKS 0
-#endif
-
-/* Ada tasks are allocated twice the minimum stack space */
-#define CONFIGURE_ADA_TASKS_STACK \
- (CONFIGURE_MAXIMUM_ADA_TASKS * (RTEMS_MINIMUM_STACK_SIZE + (6 * 1024)))
-
-#else
-#define CONFIGURE_GNAT_MUTEXES 0
-#define CONFIGURE_GNAT_KEYS 0
-#define CONFIGURE_MAXIMUM_ADA_TASKS 0
-#define CONFIGURE_MAXIMUM_FAKE_ADA_TASKS 0
-#define CONFIGURE_ADA_TASKS_STACK 0
-#endif
-
-
-#ifdef CONFIGURE_INIT
-
-rtems_api_configuration_table Configuration_RTEMS_API = {
- CONFIGURE_MAXIMUM_TASKS,
- CONFIGURE_MAXIMUM_TIMERS,
- CONFIGURE_MAXIMUM_SEMAPHORES + CONFIGURE_LIBIO_SEMAPHORES,
- CONFIGURE_MAXIMUM_MESSAGE_QUEUES,
- CONFIGURE_MAXIMUM_PARTITIONS,
- CONFIGURE_MAXIMUM_REGIONS + CONFIGURE_MALLOC_REGION,
- CONFIGURE_MAXIMUM_PORTS,
- CONFIGURE_MAXIMUM_PERIODS,
- CONFIGURE_INIT_TASK_TABLE_SIZE,
- CONFIGURE_INIT_TASK_TABLE
-};
-
-#ifdef RTEMS_POSIX_API
-posix_api_configuration_table Configuration_POSIX_API = {
- CONFIGURE_MAXIMUM_POSIX_THREADS + CONFIGURE_MAXIMUM_ADA_TASKS,
- CONFIGURE_MAXIMUM_POSIX_MUTEXES + CONFIGURE_GNAT_MUTEXES +
- CONFIGURE_MAXIMUM_ADA_TASKS + CONFIGURE_MAXIMUM_FAKE_ADA_TASKS,
- CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES +
- CONFIGURE_MAXIMUM_ADA_TASKS + CONFIGURE_MAXIMUM_FAKE_ADA_TASKS,
- CONFIGURE_MAXIMUM_POSIX_KEYS + CONFIGURE_GNAT_KEYS,
- CONFIGURE_MAXIMUM_POSIX_TIMERS,
- CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS,
- CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES,
- CONFIGURE_MAXIMUM_POSIX_SEMAPHORES,
- CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE,
- CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME
-};
-#endif
-
-#ifdef RTEMS_ITRON_API
-itron_api_configuration_table Configuration_ITRON_API = {
- CONFIGURE_MAXIMUM_ITRON_TASKS,
- CONFIGURE_MAXIMUM_ITRON_SEMAPHORES,
- CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS,
- CONFIGURE_MAXIMUM_ITRON_MAILBOXES,
- CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS,
- CONFIGURE_MAXIMUM_ITRON_PORTS,
- CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS,
- CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS,
- CONFIGURE_ITRON_INIT_TASK_TABLE_SIZE,
- CONFIGURE_ITRON_INIT_TASK_TABLE_NAME
-};
-#endif
-
-rtems_configuration_table Configuration = {
- CONFIGURE_EXECUTIVE_RAM_WORK_AREA,
- CONFIGURE_EXECUTIVE_RAM_SIZE,
- CONFIGURE_MAXIMUM_USER_EXTENSIONS + CONFIGURE_NEWLIB_EXTENSION +
- CONFIGURE_STACK_CHECKER_EXTENSION,
- CONFIGURE_MICROSECONDS_PER_TICK,
- CONFIGURE_TICKS_PER_TIMESLICE,
- CONFIGURE_MAXIMUM_DEVICES,
- sizeof (Device_drivers)/
- sizeof(rtems_driver_address_table), /* number of device drivers */
- Device_drivers, /* pointer to driver table */
- CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS, /* number of initial extensions */
- Configuration_Initial_Extensions, /* pointer to initial extensions */
- CONFIGURE_MULTIPROCESSING_TABLE, /* pointer to MP config table */
- &Configuration_RTEMS_API, /* pointer to RTEMS API config */
-#ifdef RTEMS_POSIX_API
- &Configuration_POSIX_API, /* pointer to POSIX API config */
-#else
- NULL, /* pointer to POSIX API config */
-#endif
-#ifdef RTEMS_ITRON_API
- &Configuration_ITRON_API /* pointer to ITRON API config */
-#else
- NULL /* pointer to ITRON API config */
-#endif
-};
-#endif
-
-#endif /* CONFIGURE_HAS_OWN_CONFIGURATION_TABLE */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/sapi/include/rtems/README b/cpukit/sapi/include/rtems/README
deleted file mode 100644
index 5fcc0d14c7..0000000000
--- a/cpukit/sapi/include/rtems/README
+++ /dev/null
@@ -1,135 +0,0 @@
-#
-# $Id$
-#
-
-Configuring a System Using the Template in confdefs.h
-=====================================================
-
-The file confdefs.h is a Configuration Template file which can be
-used to greatly simplify the creation and maintenance of RTEMS
-Configuration Tables. The basic concepts are:
-
- + confdefs.h provides defaults for all configuration parameters
-
- + applications specify only those values they wish to override
-
- + confdefs.h can be the only file which knows the precise layout
- of the RTEMS Configuration Tables.
-
-The Configuration Template setup is used by all RTEMS tests to
-simplify the maintenance of the tests.
-
-Here is the section from the system.h file from test tm21 from
-the Timing Test Suite:
-
- /* configuration information */
-
- #define CONFIGURE_TMTEST
-
- #define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
- #define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
- #define CONFIGURE_MAXIMUM_TASKS 102
- #define CONFIGURE_MAXIMUM_TIMERS 100
- #define CONFIGURE_MAXIMUM_SEMAPHORES 100
- #define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 100
- #define CONFIGURE_MAXIMUM_PARTITIONS 100
- #define CONFIGURE_MAXIMUM_REGIONS 100
- #define CONFIGURE_MAXIMUM_PORTS 100
- #define CONFIGURE_MAXIMUM_PERIODS 100
-
- #define CONFIGURE_TICKS_PER_TIMESLICE 0
-
- #include <confdefs.h>
-
-
-The above example overrides a number of the configuration parameters.
-It informs the template that it is a member of the Timing Suite,
-requires a console and timer driver, and that it needs 102 tasks,
-100 timers, 100 semaphores, 100 message queues, 100 partitions,
-100 regions, 100 ports, and 100 periods. By default, the test
-would have gotten no drivers, 10 tasks, and no other RTEMS objects.
-
-The following shows the configuration tables generated by the
-template by default.
-
-
-#include <bsp.h>
-
-#define NULL_DRIVER_TABLE_ENTRY \
- { NULL, NULL, NULL, NULL, NULL, NULL }
-
-rtems_driver_address_table Device_drivers[] = {
-#ifdef CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
- CONSOLE_DRIVER_TABLE_ENTRY,
-#endif
-#ifdef CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
- CLOCK_DRIVER_TABLE_ENTRY,
-#endif
-#ifdef CONFIGURE_TEST_NEEDS_STUB_DRIVER
- STUB_DRIVER_TABLE_ENTRY,
-#endif
- NULL_DRIVER_TABLE_ENTRY,
-};
-
-rtems_initialization_tasks_table Initialization_tasks[] = {
- { rtems_build_name( 'U', 'I', '1', ' ' ), /* init task name */
- RTEMS_MINIMUM_STACK_SIZE, /* init task stack size */
- 1, /* init task priority */
- RTEMS_DEFAULT_ATTRIBUTES, /* init task attributes */
- Init, /* init task entry point */
- RTEMS_NO_PREEMPT, /* init task initial mode */
- 0 /* init task argument list */
- }
-};
-
-#ifdef CONFIGURE_MPTEST
-/*
- * NODE_NUMBER is assumed to be set on the compile line.
- */
-
-rtems_multiprocessing_table Multiprocessing_configuration = {
- NODE_NUMBER, /* local node number */
- 2, /* maximum # nodes in system */
- 32, /* maximum # global objects */
- 32, /* maximum # proxies */
- &MPCI_table /* pointer to MPCI config table */
-};
-#endif
-
-/*
- * CONFIGURE_EXECUTIVE_RAM_SIZE is a rough guess based on the number of
- * tasks in the system plus enough extra to get a whole 64K extra.
- *
- * The NULL address for the workspace area is assumed to be assigned
- * at startup time by the BSP.
- */
-
-rtems_configuration_table Configuration = {
- NULL, /* executive RAM work area */
- CONFIGURE_EXECUTIVE_RAM_SIZE, /* executive RAM size */
- 10, /* maximum # tasks */
- 0, /* maximum # timers */
- 0, /* maximum # semaphores */
- 0, /* maximum # message queues */
- 0, /* maximum # messages */
- 0, /* maximum # partitions */
- 0, /* maximum # regions */
- 0, /* maximum # dp memory areas */
- 0, /* maximum # periods */
- 0, /* maximum # user extensions */
- RTEMS_MILLISECONDS_TO_MICROSECONDS(10), /* # us in a tick */
- 50, /* # ticks in a timeslice */
- sizeof (Initialization_tasks) / sizeof(rtems_initialization_tasks_table),
- /* number of init tasks */
- Initialization_tasks, /* init task(s) table */
- sizeof (Device_drivers) / sizeof(rtems_driver_address_table),
- /* number of device drivers */
- Device_drivers, /* pointer to driver address table */
- NULL, /* pointer to initial extensions */
-#ifdef CONFIGURE_MPTEST
- &Multiprocessing_configuration
-#else
- NULL /* ptr to MP config table */
-#endif
-};
diff --git a/cpukit/sapi/include/rtems/config.h b/cpukit/sapi/include/rtems/config.h
deleted file mode 100644
index bd8d972fc2..0000000000
--- a/cpukit/sapi/include/rtems/config.h
+++ /dev/null
@@ -1,182 +0,0 @@
-/* config.h
- *
- * This include file contains the table of user defined configuration
- * parameters.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_CONFIGURATION_h
-#define __RTEMS_CONFIGURATION_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Unlimited object support. Changes the configuration table entry for POSIX
- * or RTEMS APIs to bounded only by the memory of the work-space.
- *
- * Use the macro to define the resource unlimited before placing in
- * the configuration table.
- */
-
-#include <rtems/score/object.h>
-#define RTEMS_UNLIMITED_OBJECTS OBJECTS_UNLIMITED_OBJECTS
-
-#define rtems_resource_unlimited(resource) \
- ( resource | RTEMS_UNLIMITED_OBJECTS )
-
-/*
- * This is kind of kludgy but it allows targets to totally ignore the
- * optional APIs like POSIX and ITRON safely.
- */
-
-#ifdef RTEMS_POSIX_API
-#include <rtems/posix/config.h>
-#else
-typedef void *posix_api_configuration_table;
-#endif
-
-#ifdef RTEMS_ITRON_API
-#include <itron.h>
-#include <rtems/itron/config.h>
-#else
-typedef void *itron_api_configuration_table;
-#endif
-
-#include <rtems/rtems/config.h>
-
-/* XXX <rtems/rtems/config.h> should cover these
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/types.h>
-#include <rtems/rtems/tasks.h>
-*/
-
-#include <rtems/extension.h>
-#include <rtems/io.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-
-/*
- * The following records define the Multiprocessor Configuration
- * Table. This table defines the multiprocessor system
- * characteristics which must be known by RTEMS in a multiprocessor
- * system.
- */
-
-typedef struct {
- unsigned32 node; /* local node number */
- unsigned32 maximum_nodes; /* maximum # nodes in system */
- unsigned32 maximum_global_objects; /* maximum # global objects */
- unsigned32 maximum_proxies; /* maximum # proxies */
-#if defined(RTEMS_MULTIPROCESSING)
- MPCI_Control *User_mpci_table; /* pointer to MPCI table */
-#else
- void *User_mpci_table; /* pointer to MPCI table */
-#endif
-} rtems_multiprocessing_table;
-
-/*
- * The following records define the Configuration Table. The
- * information contained in this table is required in all
- * RTEMS systems, whether single or multiprocessor. This
- * table primarily defines the following:
- *
- * + location and size of the RTEMS Workspace
- * + microseconds per clock tick
- * + clock ticks per task timeslice
- * + required number of each object type for each API configured
- */
-
-typedef struct {
- void *work_space_start;
- unsigned32 work_space_size;
- unsigned32 maximum_extensions;
- unsigned32 microseconds_per_tick;
- unsigned32 ticks_per_timeslice;
- unsigned32 maximum_devices;
- unsigned32 number_of_device_drivers;
- rtems_driver_address_table *Device_driver_table;
- unsigned32 number_of_initial_extensions;
- rtems_extensions_table *User_extension_table;
- rtems_multiprocessing_table *User_multiprocessing_table;
- rtems_api_configuration_table *RTEMS_api_configuration;
- posix_api_configuration_table *POSIX_api_configuration;
- itron_api_configuration_table *ITRON_api_configuration;
-} rtems_configuration_table;
-
-/*
- * The following are provided strictly for the convenience of
- * the user. They are not used in RTEMS itself.
- */
-
-SAPI_EXTERN rtems_configuration_table *_Configuration_Table;
-SAPI_EXTERN rtems_multiprocessing_table *_Configuration_MP_table;
-
-/*
- * Some handy macros to avoid dependencies on either the BSP
- * or the exact format of the configuration table.
- */
-
-#define rtems_configuration_get_table() \
- (&_Configuration_Table)
-
-#define rtems_configuration_get_work_space_start() \
- (_Configuration_Table->work_space_start)
-
-#define rtems_configuration_get_work_space_size() \
- (_Configuration_Table->work_space_size)
-
-#define rtems_configuration_get_maximum_extensions() \
- (_Configuration_Table->maximum_extensions)
-
-#define rtems_configuration_get_microseconds_per_tick() \
- (_Configuration_Table->microseconds_per_tick)
-#define rtems_configuration_get_milliseconds_per_tick() \
- (_Configuration_Table->microseconds_per_tick / 1000)
-
-#define rtems_configuration_get_ticks_per_timeslice() \
- (_Configuration_Table->ticks_per_timeslice)
-
-#define rtems_configuration_get_maximum_devices() \
- (_Configuration_Table->maximum_devices)
-
-#define rtems_configuration_get_number_of_device_drivers() \
- (_Configuration_Table->number_of_device_drivers)
-
-#define rtems_configuration_get_device_driver_table() \
- (_Configuration_Table->device_driver_table)
-
-#define rtems_configuration_get_number_of_initial_extensions() \
- (_Configuration_Table->number_of_initial_extensions)
-
-#define rtems_configuration_get_user_extension_table() \
- (_Configuration_Table->user_extension_table)
-
-#define rtems_configuration_get_user_multiprocessing_table() \
- (_Configuration_Table->User_multiprocessing_table)
-
-#define rtems_configuration_get_rtems_api_configuration() \
- (_Configuration_Table->RTEMS_api_configuration)
-
-#define rtems_configuration_get_posix_api_configuration() \
- (_Configuration_Table->POSIX_api_configuration)
-
-#define rtems_configuration_get_itron_api_configuration() \
- (_Configuration_Table->ITRON_api_configuration)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/sapi/include/rtems/extension.h b/cpukit/sapi/include/rtems/extension.h
deleted file mode 100644
index ed532658f2..0000000000
--- a/cpukit/sapi/include/rtems/extension.h
+++ /dev/null
@@ -1,137 +0,0 @@
-/* extension.h
- *
- * This include file contains all the constants, structures, and
- * prototypes associated with the User Extension Manager. This manager
- * provides a mechanism for manipulating sets of user-defined extensions.
- *
- * Directives provided are:
- *
- * + create user extension set
- * + get ID of user extension set
- * + delete user extension set
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_EXTENSION_MANAGER_h
-#define __RTEMS_EXTENSION_MANAGER_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/object.h>
-#include <rtems/score/userext.h>
-#include <rtems/rtems/status.h> /* XXX */
-#include <rtems/rtems/types.h> /* XXX */
-
-/*
- * Extension related types
- */
-
-typedef User_extensions_routine rtems_extension;
-typedef User_extensions_thread_create_extension rtems_task_create_extension;
-typedef User_extensions_thread_delete_extension rtems_task_delete_extension;
-typedef User_extensions_thread_start_extension rtems_task_start_extension;
-typedef User_extensions_thread_restart_extension rtems_task_restart_extension;
-typedef User_extensions_thread_switch_extension rtems_task_switch_extension;
-typedef User_extensions_thread_post_switch_extension
- rtems_task_post_switch_extension;
-typedef User_extensions_thread_begin_extension rtems_task_begin_extension;
-typedef User_extensions_thread_exitted_extension rtems_task_exitted_extension;
-typedef User_extensions_fatal_extension rtems_fatal_extension;
-
-typedef User_extensions_Table rtems_extensions_table;
-
-/*
- * The following defines the information control block used to manage
- * this class of objects.
- */
-
-SAPI_EXTERN Objects_Information _Extension_Information;
-
-/*
- * The following records define the control block used to manage
- * each extension.
- */
-
-typedef struct {
- Objects_Control Object;
- User_extensions_Control Extension;
-} Extension_Control;
-
-/*
- * _Extension_Manager_initialization
- *
- * DESCRIPTION:
- *
- * This routine performs the initialization necessary for this manager.
- */
-
-void _Extension_Manager_initialization(
- unsigned32 maximum_extensions
-);
-
-/*
- * rtems_extension_create
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_extension_create directive. The
- * extension will have the name name. The entry points of the
- * routines which constitute this extension set are in EXTENSION_TABLE.
- * It returns the id of the created extension in ID.
- */
-
-rtems_status_code rtems_extension_create(
- rtems_name name,
- rtems_extensions_table *extension_table,
- Objects_Id *id
-);
-
-/*
- * rtems_extension_ident
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_extension_ident directive.
- * This directive returns the extension ID associated with name.
- * If more than one extension is named name, then the extension
- * to which the ID belongs is arbitrary.
- */
-
-rtems_status_code rtems_extension_ident(
- rtems_name name,
- Objects_Id *id
-);
-
-/*
- * rtems_extension_delete
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_extension_delete directive. The
- * extension indicated by ID is deleted.
- */
-
-rtems_status_code rtems_extension_delete(
- Objects_Id id
-);
-
-#ifndef __RTEMS_APPLICATION__
-#include <rtems/extension.inl>
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/sapi/include/rtems/fatal.h b/cpukit/sapi/include/rtems/fatal.h
deleted file mode 100644
index fd50518aef..0000000000
--- a/cpukit/sapi/include/rtems/fatal.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* fatal.h
- *
- * This include file contains constants and prototypes related
- * to the Fatal Error Manager. This manager processes all fatal or
- * irrecoverable errors.
- *
- * This manager provides directives to:
- *
- * + announce a fatal error has occurred
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_FATAL_h
-#define __RTEMS_FATAL_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * rtems_fatal_error_occurred
- *
- * DESCRIPTION:
- *
- * This is the routine which implements the rtems_fatal_error_occurred
- * directive. It is invoked when the application or RTEMS
- * determines that a fatal error has occurred.
- */
-
-void volatile rtems_fatal_error_occurred(
- unsigned32 the_error
-);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/sapi/include/rtems/init.h b/cpukit/sapi/include/rtems/init.h
deleted file mode 100644
index 0aa86a29ef..0000000000
--- a/cpukit/sapi/include/rtems/init.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/* init.h
- *
- * This include file contains all the constants and structures associated
- * with the Initialization Manager. This manager is responsible for
- * initializing RTEMS, creating and starting all configured initialization
- * tasks, invoking the initialization routine for each user-supplied device
- * driver, and initializing the optional multiprocessor layer.
- *
- * This manager provides directives to:
- *
- * + initialize the RTEMS executive
- * + shutdown the RTEMS executive
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_INIT_h
-#define __RTEMS_INIT_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/rtems/types.h>
-#include <rtems/config.h>
-#include <rtems/rtems/intr.h>
-
-/*
- * The following defines the default Multiprocessing Configuration
- * Table. This table is used in a single processor system.
- */
-
-extern const rtems_multiprocessing_table
- _Initialization_Default_multiprocessing_table;
-
-/*
- * rtems_initialize_executive
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_initialize_executive directive. This
- * directive is invoked at system startup to initialize the RTEMS
- * multitasking environment.
- */
-
-void rtems_initialize_executive(
- rtems_configuration_table *configuration_table,
- rtems_cpu_table *cpu_table
-);
-
-/*
- * rtems_initialize_executive_early
- *
- * DESCRIPTION:
- *
- * This routine implements the early portion of rtems_initialize_executive
- * directive up to the pretasking hook. This directive is invoked at system
- * startup to initialize the RTEMS multitasking environment.
- */
-
-rtems_interrupt_level rtems_initialize_executive_early(
- rtems_configuration_table *configuration_table,
- rtems_cpu_table *cpu_table
-);
-
-/*
- * rtems_initialize_executive_late
- *
- * DESCRIPTION:
- *
- * This routine implements the early portion of rtems_initialize_executive
- * directive up to the pretasking hook. This directive is invoked at system
- * startup to initialize the RTEMS multitasking environment.
- */
-
-void rtems_initialize_executive_late(
- rtems_interrupt_level bsp_level
-);
-
-/*
- * rtems_shutdown_executive
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_shutdown_executive directive. The
- * invocation of this directive results in the RTEMS environment being
- * shutdown and multitasking halted. From the application's perspective,
- * invocation of this directive results in the rtems_initialize_executive
- * directive exitting to the startup code which invoked it.
- */
-
-void rtems_shutdown_executive(
- unsigned32 result
-);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/sapi/include/rtems/io.h b/cpukit/sapi/include/rtems/io.h
deleted file mode 100644
index 55a9aac7b4..0000000000
--- a/cpukit/sapi/include/rtems/io.h
+++ /dev/null
@@ -1,243 +0,0 @@
-/* io.h
- *
- * This include file contains all the constants and structures associated
- * with the Input/Output Manager. This manager provides a well defined
- * mechanism for accessing device drivers and a structured methodology for
- * organizing device drivers.
- *
- * Directives provided are:
- *
- * + initialize a device driver
- * + open a device driver
- * + close a device driver
- * + read from a device driver
- * + write to a device driver
- * + special device services
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_IO_h
-#define __RTEMS_IO_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/rtems/status.h>
-
-/*
- *
- * The following defines the types for:
- *
- * + major and minor numbers
- * + the return type of a device driver entry
- * + a pointer to a device driver entry
- * + an entry in the the Device Driver Address Table. Each entry in this
- * table corresponds to an application provided device driver and
- * defines the entry points for that device driver.
- */
-
-typedef unsigned32 rtems_device_major_number;
-typedef unsigned32 rtems_device_minor_number;
-
-typedef rtems_status_code rtems_device_driver;
-
-typedef rtems_device_driver ( *rtems_device_driver_entry )(
- rtems_device_major_number,
- rtems_device_minor_number,
- void *
- );
-
-typedef struct {
- rtems_device_driver_entry initialization; /* initialization procedure */
- rtems_device_driver_entry open; /* open request procedure */
- rtems_device_driver_entry close; /* close request procedure */
- rtems_device_driver_entry read; /* read request procedure */
- rtems_device_driver_entry write; /* write request procedure */
- rtems_device_driver_entry control; /* special functions procedure */
-} rtems_driver_address_table;
-
-/*
- * Table for the io device names
- */
-
-typedef struct {
- char *device_name;
- unsigned32 device_name_length;
- rtems_device_major_number major;
- rtems_device_minor_number minor;
-} rtems_driver_name_t;
-
-/*
- * This is the table of device names.
- */
-
-/*
- * The following declare the data required to manage the Driver
- * Address Table and Device Name Table.
- */
-
-SAPI_EXTERN unsigned32 _IO_Number_of_drivers;
-SAPI_EXTERN rtems_driver_address_table *_IO_Driver_address_table;
-SAPI_EXTERN unsigned32 _IO_Number_of_devices;
-SAPI_EXTERN rtems_driver_name_t *_IO_Driver_name_table;
-
-/*
- * _IO_Manager_initialization
- *
- * DESCRIPTION:
- *
- * This routine performs the initialization necessary for this manager.
- */
-
-void _IO_Manager_initialization(
- rtems_driver_address_table *driver_table,
- unsigned32 number_of_drivers,
- unsigned32 number_of_devices
-);
-
-/*
- * rtems_io_register_name
- *
- * DESCRIPTION:
- *
- * Associate a name with a driver.
- *
- */
-
-rtems_status_code rtems_io_register_name(
- char *device_name,
- rtems_device_major_number major,
- rtems_device_minor_number minor
-);
-
-
-/*
- * rtems_io_lookup_name
- *
- * DESCRIPTION:
- *
- * Find what driver "owns" this name
- */
-
-rtems_status_code rtems_io_lookup_name(
- const char *name,
- rtems_driver_name_t **device_info
-);
-
-
-/*
- * rtems_io_initialize
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_io_initialize directive. It is invoked
- * to initialize a device driver or an individual device.
- */
-
-rtems_status_code rtems_io_initialize(
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void *argument
-);
-
-/*
- * rtems_io_open
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_io_open directive. It is invoked
- * to open a device.
- */
-
-rtems_status_code rtems_io_open(
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void *argument
-);
-
-/*
- * rtems_io_close
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_io_close directive. It is invoked
- * to close a device.
- */
-
-rtems_status_code rtems_io_close(
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void *argument
-);
-
-/*
- * rtems_io_read
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_io_read directive. It is invoked
- * to read from a device.
- */
-
-rtems_status_code rtems_io_read(
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void *argument
-);
-
-/*
- * rtems_io_write
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_io_write directive. It is invoked
- * to write to a device.
- */
-
-rtems_status_code rtems_io_write(
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void *argument
-);
-
-/*
- * rtems_io_control
- *
- * DESCRIPTION:
- *
- * This routine implements the rtems_io_control directive. It is invoked
- * to perform a device specific operation on a device.
- */
-
-rtems_status_code rtems_io_control(
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void *argument
-);
-
-/*
- * _IO_Initialize_all_drivers
- *
- * DESCRIPTION:
- *
- * This routine initializes all of the device drivers configured
- * in the Device Driver Address Table.
- */
-
-void _IO_Initialize_all_drivers( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/sapi/include/rtems/mptables.h b/cpukit/sapi/include/rtems/mptables.h
deleted file mode 100644
index f1e7435442..0000000000
--- a/cpukit/sapi/include/rtems/mptables.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* mptables.h
- *
- * This include file contains the executive's pre-initialized tables
- * used in a multiprocessor configuration.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_MPTABLES_h
-#define __RTEMS_MPTABLES_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/sapi/include/rtems/sptables.h.in b/cpukit/sapi/include/rtems/sptables.h.in
deleted file mode 100644
index 4d1425120b..0000000000
--- a/cpukit/sapi/include/rtems/sptables.h.in
+++ /dev/null
@@ -1,85 +0,0 @@
-/* sptables.h
- *
- * This include file contains the executive's pre-initialized tables
- * used when in a single processor configuration.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_SPTABLES_h
-#define __RTEMS_SPTABLES_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/config.h>
-
-#include <rtems/debug.h>
-#include <rtems/fatal.h>
-#include <rtems/init.h>
-#include <rtems/io.h>
-#include <rtems/score/sysstate.h>
-
-#include <rtems/rtems/intr.h>
-#include <rtems/rtems/clock.h>
-#include <rtems/rtems/tasks.h>
-#include <rtems/rtems/dpmem.h>
-#include <rtems/rtems/event.h>
-#include <rtems/rtems/message.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/rtems/mp.h>
-#endif
-#include <rtems/rtems/part.h>
-#include <rtems/rtems/ratemon.h>
-#include <rtems/rtems/region.h>
-#include <rtems/rtems/sem.h>
-#include <rtems/rtems/signal.h>
-#include <rtems/rtems/timer.h>
-
-/*
- * This is the default Multiprocessing Configuration Table.
- * It is used in single processor configurations.
- */
-
-#if defined(SAPI_INIT)
-const rtems_multiprocessing_table
- _Initialization_Default_multiprocessing_table = {
- 1, /* local node number */
- 1, /* maximum number nodes in system */
- 0, /* maximum number global objects */
- 0, /* maximum number proxies */
- NULL, /* pointer to MPCI address table */
-};
-#else
-extern const rtems_multiprocessing_table
- _Initialization_Default_multiprocessing_table;
-#endif
-
-/*
- * This is the version string.
- */
-
-#define RTEMS_VERSION "rtems-@RTEMS_VERSION@"
-
-#if defined(SAPI_INIT)
-const char _RTEMS_version[] =
- "RTEMS RELEASE " RTEMS_VERSION
- "(" CPU_NAME "/" CPU_MODEL_NAME "/@RTEMS_BSP@)";
-#else
-extern const char _RTEMS_version[];
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/sapi/inline/Makefile.am b/cpukit/sapi/inline/Makefile.am
deleted file mode 100644
index 0c97211587..0000000000
--- a/cpukit/sapi/inline/Makefile.am
+++ /dev/null
@@ -1,10 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-SUBDIRS = rtems
-
-include $(top_srcdir)/../../../automake/subdirs.am
-include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/sapi/inline/rtems/extension.inl b/cpukit/sapi/inline/rtems/extension.inl
deleted file mode 100644
index 01bb1e7dbe..0000000000
--- a/cpukit/sapi/inline/rtems/extension.inl
+++ /dev/null
@@ -1,90 +0,0 @@
-/* extension.inl
- *
- * This file contains the static inline implementation of the inlined routines
- * from the Extension Manager.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __EXTENSION_MANAGER_inl
-#define __EXTENSION_MANAGER_inl
-
-/*PAGE
- *
- * _Extension_Allocate
- *
- * DESCRIPTION:
- *
- * This function allocates a extension control block from
- * the inactive chain of free extension control blocks.
- */
-
-RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void )
-{
- return (Extension_Control *) _Objects_Allocate( &_Extension_Information );
-}
-
-/*PAGE
- *
- * _Extension_Free
- *
- * DESCRIPTION:
- *
- * This routine frees a extension control block to the
- * inactive chain of free extension control blocks.
- */
-
-RTEMS_INLINE_ROUTINE void _Extension_Free (
- Extension_Control *the_extension
-)
-{
- _Objects_Free( &_Extension_Information, &the_extension->Object );
-}
-
-/*PAGE
- *
- * _Extension_Get
- *
- * DESCRIPTION:
- *
- * This function maps extension IDs to extension control blocks.
- * If ID corresponds to a local extension, then it returns
- * the extension control pointer which maps to ID and location
- * is set to OBJECTS_LOCAL. Otherwise, location is set
- * to OBJECTS_ERROR and the returned value is undefined.
- */
-
-RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Get (
- Objects_Id id,
- Objects_Locations *location
-)
-{
- return (Extension_Control *)
- _Objects_Get( &_Extension_Information, id, location );
-}
-
-/*PAGE
- *
- * _Extension_Is_null
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the_extension is NULL and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Extension_Is_null (
- Extension_Control *the_extension
-)
-{
- return ( the_extension == NULL );
-}
-
-#endif
-/* end of include file */
diff --git a/cpukit/sapi/macros/Makefile.am b/cpukit/sapi/macros/Makefile.am
deleted file mode 100644
index 0c97211587..0000000000
--- a/cpukit/sapi/macros/Makefile.am
+++ /dev/null
@@ -1,10 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-SUBDIRS = rtems
-
-include $(top_srcdir)/../../../automake/subdirs.am
-include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/sapi/macros/rtems/extension.inl b/cpukit/sapi/macros/rtems/extension.inl
deleted file mode 100644
index 5501e1e3f6..0000000000
--- a/cpukit/sapi/macros/rtems/extension.inl
+++ /dev/null
@@ -1,57 +0,0 @@
-/* extension.inl
- *
- * This file contains the macro implementation of the inlined routines
- * from the Extension Manager.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __EXTENSION_inl
-#define __EXTENSION_inl
-
-/*PAGE
- *
- * _Extension_Allocate
- *
- */
-
-#define _Extension_Allocate() \
- (Extension_Control *) _Objects_Allocate( &_Extension_Information )
-
-/*PAGE
- *
- * _Extension_Free
- *
- */
-
-#define _Extension_Free( _the_extension ) \
- _Objects_Free( &_Extension_Information, &(_the_extension)->Object )
-
-/*PAGE
- *
- * _Extension_Get
- *
- */
-
-#define _Extension_Get( _id, _location ) \
- (Extension_Control *) \
- _Objects_Get( &_Extension_Information, (_id), (_location) )
-
-/*PAGE
- *
- * _Extension_Is_null
- *
- */
-
-#define _Extension_Is_null( _the_extension ) \
- ( (_the_extension) == NULL )
-
-#endif
-/* end of include file */
diff --git a/cpukit/sapi/src/Makefile.am b/cpukit/sapi/src/Makefile.am
deleted file mode 100644
index 91d461279c..0000000000
--- a/cpukit/sapi/src/Makefile.am
+++ /dev/null
@@ -1,27 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-C_FILES = debug.c entrytable.c extension.c fatal.c exinit.c io.c itronapi.c \
- posixapi.c rtemsapi.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-OBJS = $(C_O_FILES)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../automake/lib.am
-
-#
-# Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -D__RTEMS_INSIDE__
-AM_CFLAGS += $(CFLAGS_OS_V)
-
-all: ${ARCH} ${OBJS}
-
-EXTRA_DIST = $(C_FILES)
-
-include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/sapi/src/debug.c b/cpukit/sapi/src/debug.c
deleted file mode 100644
index e58a7219c2..0000000000
--- a/cpukit/sapi/src/debug.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Debug Manager
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/debug.h>
-
-/*PAGE
- *
- * _Debug_Manager_initialization
- */
-
-void _Debug_Manager_initialization( void )
-{
- rtems_debug_disable( RTEMS_DEBUG_ALL_MASK );
-}
-
-/*PAGE
- *
- * rtems_debug_enable
- */
-
-void rtems_debug_enable (
- rtems_debug_control to_be_enabled
-)
-{
- _Debug_Level |= to_be_enabled;
-}
-
-/*PAGE
- *
- * rtems_debug_disable
- */
-
-void rtems_debug_disable (
- rtems_debug_control to_be_disabled
-)
-{
- _Debug_Level &= ~to_be_disabled;
-}
-
-/*PAGE
- *
- * _Debug_Is_enabled
- */
-
-boolean _Debug_Is_enabled(
- rtems_debug_control level
-)
-{
- return (_Debug_Level & level);
-}
diff --git a/cpukit/sapi/src/exinit.c b/cpukit/sapi/src/exinit.c
deleted file mode 100644
index 034b3ce4ab..0000000000
--- a/cpukit/sapi/src/exinit.c
+++ /dev/null
@@ -1,320 +0,0 @@
-/*
- * Initialization Manager
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-/*
- * SCORE_INIT and SAPI_INIT are defined so all of the super core and
- * super API data will be included in this object file.
- */
-
-#define SAPI_INIT
-#define SCORE_INIT
-
-#include <rtems/system.h>
-#include <rtems/config.h>
-#include <rtems/debug.h>
-#include <rtems/extension.h>
-#include <rtems/fatal.h>
-#include <rtems/init.h>
-#include <rtems/io.h>
-#include <rtems/score/sysstate.h>
-
-#include <rtems/score/apiext.h>
-#include <rtems/score/copyrt.h>
-#include <rtems/score/heap.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-#include <rtems/score/priority.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/tod.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/score/wkspace.h>
-
-#include <rtems/directives.h>
-#include <rtems/sptables.h>
-
-
-#include <rtems/rtems/rtemsapi.h>
-#ifdef RTEMS_POSIX_API
-#include <rtems/posix/posixapi.h>
-#endif
-#ifdef RTEMS_ITRON_API
-#include <rtems/itron/itronapi.h>
-#endif
-
-
-/*PAGE
- *
- * rtems_initialize_executive
- *
- * This directive initializes all the kernels data structures
- * to the states necessary for the kernel to begin execution. All
- * include files that contain global variable definitions should be
- * included in this file. The system threads and initialization threads
- * are created and started by this routine. This routine then
- * initiates multithreading.
- *
- * Input parameters:
- * configuration_table - pointer to the user's configuration table
- * cpu_table - pointer to the user's CPU configuration table
- *
- * Output parameters: NONE
- */
-
-void rtems_initialize_executive(
- rtems_configuration_table *configuration_table,
- rtems_cpu_table *cpu_table
-)
-{
- rtems_interrupt_level bsp_level;
-
- bsp_level = rtems_initialize_executive_early(configuration_table, cpu_table);
- rtems_initialize_executive_late( bsp_level );
-}
-
-rtems_interrupt_level rtems_initialize_executive_early(
- rtems_configuration_table *configuration_table,
- rtems_cpu_table *cpu_table
-)
-{
- rtems_interrupt_level bsp_level;
- rtems_multiprocessing_table *multiprocessing_table;
-
- /*
- * Dispatching and interrupts are disabled until the end of the
- * initialization sequence. This prevents an inadvertent context
- * switch before the executive is initialized.
- */
-
- _ISR_Disable( bsp_level );
-
- if ( configuration_table == NULL )
- _Internal_error_Occurred(
- INTERNAL_ERROR_CORE,
- TRUE,
- INTERNAL_ERROR_NO_CONFIGURATION_TABLE
- );
-
- /*
- * Initialize the system state based on whether this is an MP system.
- */
-
-#if defined(RTEMS_MULTIPROCESSING)
- multiprocessing_table = configuration_table->User_multiprocessing_table;
-
- _System_state_Handler_initialization(
- (multiprocessing_table) ? TRUE : FALSE
- );
-#else
- multiprocessing_table = NULL;
-
- _System_state_Handler_initialization( FALSE );
-
-#endif
-
- /*
- * Provided just for user convenience.
- */
-
- _Configuration_Table = configuration_table;
- _Configuration_MP_table = multiprocessing_table;
-
- /*
- * Internally we view single processor systems as a very restricted
- * multiprocessor system.
- */
-
- if ( multiprocessing_table == NULL )
- multiprocessing_table =
- (void *)&_Initialization_Default_multiprocessing_table;
-
- if ( cpu_table == NULL )
- _Internal_error_Occurred(
- INTERNAL_ERROR_CORE,
- TRUE,
- INTERNAL_ERROR_NO_CPU_TABLE
- );
-
- _CPU_Initialize( cpu_table, _Thread_Dispatch );
-
- /*
- * Do this as early as possible to insure no debugging output
- * is even attempted to be printed.
- */
-
- _Debug_Manager_initialization();
-
- _API_extensions_Initialization();
-
- _Thread_Dispatch_initialization();
-
- _Workspace_Handler_initialization(
- (void *)configuration_table->work_space_start,
- configuration_table->work_space_size
- );
-
- _User_extensions_Handler_initialization(
- configuration_table->number_of_initial_extensions,
- configuration_table->User_extension_table
- );
-
- _ISR_Handler_initialization();
-
- _Objects_Handler_initialization(
- multiprocessing_table->node,
- multiprocessing_table->maximum_nodes,
- multiprocessing_table->maximum_global_objects
- );
-
- _Priority_Handler_initialization();
-
- _Watchdog_Handler_initialization();
-
- _TOD_Handler_initialization( configuration_table->microseconds_per_tick );
-
- _Thread_Handler_initialization(
- configuration_table->ticks_per_timeslice,
- configuration_table->maximum_extensions,
- multiprocessing_table->maximum_proxies
- );
-
-#if defined(RTEMS_MULTIPROCESSING)
- _MPCI_Handler_initialization(
- multiprocessing_table->User_mpci_table,
- RTEMS_TIMEOUT
- );
-#endif
-
-/* MANAGERS */
-
- _Extension_Manager_initialization( configuration_table->maximum_extensions );
-
- _IO_Manager_initialization(
- configuration_table->Device_driver_table,
- configuration_table->number_of_device_drivers,
- configuration_table->maximum_devices
- );
-
- _RTEMS_API_Initialize( configuration_table );
-
-#ifdef RTEMS_POSIX_API
- _POSIX_API_Initialize( configuration_table );
-#endif
-
-#ifdef RTEMS_ITRON_API
- _ITRON_API_Initialize( configuration_table );
-#endif
-
- _System_state_Set( SYSTEM_STATE_BEFORE_MULTITASKING );
-
- if ( cpu_table->pretasking_hook )
- (*cpu_table->pretasking_hook)();
-
- /*
- * No threads should be created before this point!!!
- *
- * At this point all API extensions are in place. After the call to
- * _Thread_Create_idle() _Thread_Executing will be set.
- * and _Thread_Heir are not set yet.
- */
-
- _Thread_Create_idle();
-
-#if defined(RTEMS_MULTIPROCESSING)
- _MPCI_Create_server();
-#endif
-
- /*
- * Run the API and BSPs predriver hook.
- */
-
- _API_extensions_Run_predriver();
-
- if ( _CPU_Table.predriver_hook )
- (*_CPU_Table.predriver_hook)();
-
- /*
- * Initialize all the device drivers and initialize the MPCI layer.
- *
- * NOTE: The MPCI may be build upon a device driver.
- */
-
- _IO_Initialize_all_drivers();
-
-#if defined(RTEMS_MULTIPROCESSING)
- if ( _System_state_Is_multiprocessing ) {
- _MPCI_Initialization();
- _MPCI_Internal_packets_Send_process_packet(
- MPCI_PACKETS_SYSTEM_VERIFY
- );
- }
-#endif
-
- /*
- * Run the APIs and BSPs postdriver hooks.
- *
- * The API extensions are supposed to create user initialization tasks.
- */
-
- _API_extensions_Run_postdriver();
-
- if ( _CPU_Table.postdriver_hook )
- (*_CPU_Table.postdriver_hook)();
-
- return bsp_level;
-}
-
-void rtems_initialize_executive_late(
- rtems_interrupt_level bsp_level
-)
-{
-
- _System_state_Set( SYSTEM_STATE_BEGIN_MULTITASKING );
-
- _Thread_Start_multitasking();
-
- /*
- * Restore the interrupt level to what the BSP had. Technically,
- * this is unnecessary since the BSP should have all interrupts
- * disabled when rtems_initialize_executive is invoked. But this keeps
- * the ISR Disable/Enable calls paired.
- */
-
- _ISR_Enable( bsp_level );
-}
-
-/*PAGE
- *
- * rtems_shutdown_executive
- *
- * This kernel routine shutdowns the executive. It halts multitasking
- * and returns control to the application execution "thread" which
- * initialially invoked the rtems_initialize_executive directive.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- */
-
-void rtems_shutdown_executive(
- unsigned32 result
-)
-{
- if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) {
- _System_state_Set( SYSTEM_STATE_SHUTDOWN );
- _Thread_Stop_multitasking();
- }
-}
diff --git a/cpukit/sapi/src/extension.c b/cpukit/sapi/src/extension.c
deleted file mode 100644
index fccbb47274..0000000000
--- a/cpukit/sapi/src/extension.c
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * Extension Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/rtems/support.h>
-#include <rtems/score/object.h>
-#include <rtems/score/thread.h>
-#include <rtems/extension.h>
-
-/*PAGE
- *
- * _Extension_Manager_initialization
- *
- * This routine initializes all extension manager related data structures.
- *
- * Input parameters:
- * maximum_extensions - number of extensions to initialize
- *
- * Output parameters: NONE
- */
-
-void _Extension_Manager_initialization(
- unsigned32 maximum_extensions
-)
-{
- _Objects_Initialize_information(
- &_Extension_Information,
- OBJECTS_RTEMS_EXTENSIONS,
- FALSE,
- maximum_extensions,
- sizeof( Extension_Control ),
- FALSE,
- RTEMS_MAXIMUM_NAME_LENGTH,
- FALSE
- );
-}
-
-/*PAGE
- *
- * rtems_extension_create
- *
- * This directive creates a extension and performs some initialization.
- *
- * Input parameters:
- * name - extension name
- * extension_table - pointer to extension set information
- * id - pointer to extension id
- *
- * Output parameters:
- * id - extension id
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_extension_create(
- rtems_name name,
- rtems_extensions_table *extension_table,
- Objects_Id *id
-)
-{
- Extension_Control *the_extension;
-
- if ( !rtems_is_name_valid( name ) )
- return RTEMS_INVALID_NAME;
-
- _Thread_Disable_dispatch(); /* to prevent deletion */
-
- the_extension = _Extension_Allocate();
-
- if ( !the_extension ) {
- _Thread_Enable_dispatch();
- return RTEMS_TOO_MANY;
- }
-
- _User_extensions_Add_set( &the_extension->Extension, extension_table );
-
- _Objects_Open( &_Extension_Information, &the_extension->Object, &name );
-
- *id = the_extension->Object.id;
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
-}
-
-/*PAGE
- *
- * rtems_extension_ident
- *
- * This directive returns the system ID associated with
- * the extension name.
- *
- * Input parameters:
- * name - user defined message queue name
- * id - pointer to extension id
- *
- * Output parameters:
- * *id - message queue id
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_extension_ident(
- rtems_name name,
- Objects_Id *id
-)
-{
- Objects_Name_to_id_errors status;
-
- status = _Objects_Name_to_id(
- &_Extension_Information,
- &name,
- OBJECTS_SEARCH_LOCAL_NODE,
- id
- );
-
- return _Status_Object_name_errors_to_status[ status ];
-}
-
-/*PAGE
- *
- * rtems_extension_delete
- *
- * This directive allows a thread to delete a extension.
- *
- * Input parameters:
- * id - extension id
- *
- * Output parameters:
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-rtems_status_code rtems_extension_delete(
- Objects_Id id
-)
-{
- Extension_Control *the_extension;
- Objects_Locations location;
-
- the_extension = _Extension_Get( id, &location );
- switch ( location ) {
- case OBJECTS_ERROR:
- case OBJECTS_REMOTE: /* should never return this */
- return RTEMS_INVALID_ID;
- case OBJECTS_LOCAL:
- _User_extensions_Remove_set( &the_extension->Extension );
- _Objects_Close( &_Extension_Information, &the_extension->Object );
- _Extension_Free( the_extension );
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
- }
-
- return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
-}
diff --git a/cpukit/sapi/src/fatal.c b/cpukit/sapi/src/fatal.c
deleted file mode 100644
index 8a0e3cedf0..0000000000
--- a/cpukit/sapi/src/fatal.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Fatal Error Manager
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/fatal.h>
-#include <rtems/score/interr.h>
-
-/*PAGE
- *
- * rtems_fatal_error_occurred
- *
- * This directive will invoke the internal fatal error handler.
- *
- * Input parameters:
- * the_error - fatal error status code
- *
- * Output parameters: NONE
- */
-
-void volatile rtems_fatal_error_occurred(
- unsigned32 the_error
-)
-{
- _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, FALSE, the_error );
-
-/* will not return from this routine */
-}
diff --git a/cpukit/sapi/src/io.c b/cpukit/sapi/src/io.c
deleted file mode 100644
index f79189f060..0000000000
--- a/cpukit/sapi/src/io.c
+++ /dev/null
@@ -1,348 +0,0 @@
-/*
- * Input/Output Manager
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/io.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-
-#include <string.h>
-
-/*PAGE
- *
- * _IO_Manager_initialization
- *
- */
-
-void _IO_Manager_initialization(
- rtems_driver_address_table *driver_table,
- unsigned32 number_of_drivers,
- unsigned32 number_of_devices
-)
-{
- void *tmp;
- unsigned32 index;
- rtems_driver_name_t *np;
-
- _IO_Driver_address_table = driver_table;
- _IO_Number_of_drivers = number_of_drivers;
- _IO_Number_of_devices = number_of_devices;
-
- tmp = _Workspace_Allocate_or_fatal_error(
- sizeof( rtems_driver_name_t ) * ( number_of_devices + 1 )
- );
-
- _IO_Driver_name_table = (rtems_driver_name_t *) tmp;
-
- for( index=0, np = _IO_Driver_name_table ;
- index < _IO_Number_of_devices ;
- index++, np++ ) {
- np->device_name = 0;
- np->device_name_length = 0;
- np->major = 0;
- np->minor = 0;
- }
-}
-
-/*PAGE
- *
- * _IO_Initialize_all_drivers
- *
- * This routine initializes all device drivers
- *
- * Input Paramters: NONE
- *
- * Output Parameters: NONE
- */
-
-void _IO_Initialize_all_drivers( void )
-{
- rtems_device_major_number major;
-
- for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
- (void) rtems_io_initialize( major, 0, NULL);
-}
-
-/*PAGE
- *
- * rtems_io_register_name
- *
- * Associate a name with a driver
- *
- * Input Paramters:
- * device_name - pointer to name string to associate with device
- * major - device major number to receive name
- * minor - device minor number to receive name
- *
- * Output Parameters:
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-#if 0
-rtems_status_code rtems_io_register_name(
- char *device_name,
- rtems_device_major_number major,
- rtems_device_minor_number minor
- )
-{
- rtems_driver_name_t *np;
- unsigned32 level;
- unsigned32 index;
-
- /* find an empty slot */
- for( index=0, np = _IO_Driver_name_table ;
- index < _IO_Number_of_devices ;
- index++, np++ )
- {
-
- _ISR_Disable(level);
- if (np->device_name == 0)
- {
- np->device_name = device_name;
- np->device_name_length = strlen(device_name);
- np->major = major;
- np->minor = minor;
- _ISR_Enable(level);
-
- return RTEMS_SUCCESSFUL;
- }
- _ISR_Enable(level);
- }
-
- return RTEMS_TOO_MANY;
-}
-#endif
-
-/*PAGE
- *
- * rtems_io_lookup_name
- *
- * Find what driver "owns" this name
- *
- * Input Paramters:
- * name - name to lookup the associated device
- *
- * Output Parameters:
- * device_info - device associate with name
- * RTEMS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-#if 0
-rtems_status_code rtems_io_lookup_name(
- const char *name,
- rtems_driver_name_t **device_info
-)
-{
- rtems_driver_name_t *np;
- unsigned32 index;
-
- for( index=0, np = _IO_Driver_name_table ;
- index < _IO_Number_of_devices ;
- index++, np++ )
- if (np->device_name)
- if (strncmp(np->device_name, name, np->device_name_length) == 0)
- {
- *device_info = np;
- return RTEMS_SUCCESSFUL;
- }
-
- *device_info = 0;
- return RTEMS_UNSATISFIED;
-}
-#endif
-
-
-/*PAGE
- *
- * rtems_io_initialize
- *
- * This routine is the initialization directive of the IO manager.
- *
- * Input Paramters:
- * major - device driver number
- * minor - device number
- * argument - pointer to argument(s)
- *
- * Output Parameters:
- * returns - return code
- */
-
-rtems_status_code rtems_io_initialize(
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void *argument
-)
-{
- rtems_device_driver_entry callout;
-
- if ( major >= _IO_Number_of_drivers )
- return RTEMS_INVALID_NUMBER;
-
- callout = _IO_Driver_address_table[major].initialization;
- return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
-}
-
-/*PAGE
- *
- * rtems_io_open
- *
- * This routine is the open directive of the IO manager.
- *
- * Input Paramters:
- * major - device driver number
- * minor - device number
- * argument - pointer to argument(s)
- *
- * Output Parameters:
- * returns - return code
- */
-
-rtems_status_code rtems_io_open(
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void *argument
-)
-{
- rtems_device_driver_entry callout;
-
- if ( major >= _IO_Number_of_drivers )
- return RTEMS_INVALID_NUMBER;
-
- callout = _IO_Driver_address_table[major].open;
- return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
-}
-
-/*PAGE
- *
- * rtems_io_close
- *
- * This routine is the close directive of the IO manager.
- *
- * Input Paramters:
- * major - device driver number
- * minor - device number
- * argument - pointer to argument(s)
- *
- * Output Parameters:
- * returns - return code
- */
-
-rtems_status_code rtems_io_close(
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void *argument
-)
-{
- rtems_device_driver_entry callout;
-
- if ( major >= _IO_Number_of_drivers )
- return RTEMS_INVALID_NUMBER;
-
- callout = _IO_Driver_address_table[major].close;
- return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
-}
-
-/*PAGE
- *
- * rtems_io_read
- *
- * This routine is the read directive of the IO manager.
- *
- * Input Paramters:
- * major - device driver number
- * minor - device number
- * argument - pointer to argument(s)
- *
- * Output Parameters:
- * returns - return code
- */
-
-rtems_status_code rtems_io_read(
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void *argument
-)
-{
- rtems_device_driver_entry callout;
-
- if ( major >= _IO_Number_of_drivers )
- return RTEMS_INVALID_NUMBER;
-
- callout = _IO_Driver_address_table[major].read;
- return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
-}
-
-/*PAGE
- *
- * rtems_io_write
- *
- * This routine is the write directive of the IO manager.
- *
- * Input Paramters:
- * major - device driver number
- * minor - device number
- * argument - pointer to argument(s)
- *
- * Output Parameters:
- * returns - return code
- */
-
-rtems_status_code rtems_io_write(
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void *argument
-)
-{
- rtems_device_driver_entry callout;
-
- if ( major >= _IO_Number_of_drivers )
- return RTEMS_INVALID_NUMBER;
-
- callout = _IO_Driver_address_table[major].write;
- return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
-}
-
-/*PAGE
- *
- * rtems_io_control
- *
- * This routine is the control directive of the IO manager.
- *
- * Input Paramters:
- * major - device driver number
- * minor - device number
- * argument - pointer to argument(s)
- *
- * Output Parameters:
- * returns - return code
- */
-
-rtems_status_code rtems_io_control(
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void *argument
-)
-{
- rtems_device_driver_entry callout;
-
- if ( major >= _IO_Number_of_drivers )
- return RTEMS_INVALID_NUMBER;
-
- callout = _IO_Driver_address_table[major].control;
- return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
-}
-
diff --git a/cpukit/sapi/src/itronapi.c b/cpukit/sapi/src/itronapi.c
deleted file mode 100644
index 98475c6fc3..0000000000
--- a/cpukit/sapi/src/itronapi.c
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * ITRON API Initialization Support
- *
- * NOTE:
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <assert.h>
-
-/*
- * ITRON_API_INIT is defined so all of the ITRON API
- * data will be included in this object file.
- */
-
-#define ITRON_API_INIT
-
-#include <rtems/system.h> /* include this before checking RTEMS_ITRON_API */
-#ifdef RTEMS_ITRON_API
-
-#include <itron.h>
-
-#include <sys/types.h>
-#include <rtems/config.h>
-#include <rtems/score/object.h>
-
-#include <rtems/itron/eventflags.h>
-#include <rtems/itron/fmempool.h>
-#include <rtems/itron/mbox.h>
-#include <rtems/itron/msgbuffer.h>
-#include <rtems/itron/port.h>
-#include <rtems/itron/semaphore.h>
-#include <rtems/itron/task.h>
-#include <rtems/itron/vmempool.h>
-
-/*PAGE
- *
- * _ITRON_API_Initialize
- *
- * XXX
- */
-
-itron_api_configuration_table _ITRON_Default_configuration = {
- 0, /* maximum_tasks */
- 0, /* maximum_semaphores */
- 0, /* maximum_eventflags */
- 0, /* maximum_mailboxes */
- 0, /* maximum_message_buffers */
- 0, /* maximum_ports */
- 0, /* maximum_memory_pools */
- 0, /* maximum_fixed_memory_pools */
- 0, /* number_of_initialization_tasks */
- NULL /* User_initialization_tasks_table */
-};
-
-
-void _ITRON_API_Initialize(
- rtems_configuration_table *configuration_table
-)
-{
- itron_api_configuration_table *api_configuration;
-
- /* XXX need to assert here based on size assumptions */
-
- assert( sizeof(ID) == sizeof(Objects_Id) );
-
- api_configuration = configuration_table->ITRON_api_configuration;
- if ( !api_configuration )
- api_configuration = &_ITRON_Default_configuration;
-
- _ITRON_Task_Manager_initialization(
- api_configuration->maximum_tasks,
- api_configuration->number_of_initialization_tasks,
- api_configuration->User_initialization_tasks_table
- );
-
- _ITRON_Semaphore_Manager_initialization(
- api_configuration->maximum_semaphores
- );
-
- _ITRON_Eventflags_Manager_initialization(
- api_configuration->maximum_eventflags
- );
-
- _ITRON_Fixed_memory_pool_Manager_initialization(
- api_configuration->maximum_fixed_memory_pools
- );
-
- _ITRON_Mailbox_Manager_initialization(
- api_configuration->maximum_mailboxes
- );
-
- _ITRON_Message_buffer_Manager_initialization(
- api_configuration->maximum_message_buffers
- );
-
- _ITRON_Port_Manager_initialization(
- api_configuration->maximum_ports
- );
-
- _ITRON_Variable_memory_pool_Manager_initialization(
- api_configuration->maximum_memory_pools
- );
-
-
-}
-
-#endif
-/* end of file */
diff --git a/cpukit/sapi/src/posixapi.c b/cpukit/sapi/src/posixapi.c
deleted file mode 100644
index 18de12faf8..0000000000
--- a/cpukit/sapi/src/posixapi.c
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * RTEMS API Initialization Support
- *
- * NOTE:
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <assert.h>
-
-/*
- * POSIX_API_INIT is defined so all of the POSIX API
- * data will be included in this object file.
- */
-
-#define POSIX_API_INIT
-
-#include <rtems/system.h> /* include this before checking RTEMS_POSIX_API */
-#ifdef RTEMS_POSIX_API
-
-#include <sys/types.h>
-#include <mqueue.h>
-#include <rtems/config.h>
-#include <rtems/score/object.h>
-#include <rtems/posix/cond.h>
-#include <rtems/posix/config.h>
-#include <rtems/posix/key.h>
-#include <rtems/posix/mqueue.h>
-#include <rtems/posix/mutex.h>
-#include <rtems/posix/priority.h>
-#include <rtems/posix/psignal.h>
-#include <rtems/posix/pthread.h>
-#include <rtems/posix/ptimer.h>
-#include <rtems/posix/semaphore.h>
-#include <rtems/posix/time.h>
-
-/*PAGE
- *
- * _POSIX_API_Initialize
- *
- * XXX
- */
-
-posix_api_configuration_table _POSIX_Default_configuration = {
- 0, /* maximum_threads */
- 0, /* maximum_mutexes */
- 0, /* maximum_condition_variables */
- 0, /* maximum_keys */
- 0, /* maximum_timers */
- 0, /* maximum_queued_signals */
- 0, /* number_of_initialization_threads */
- 0, /* maximum_message_queues */
- 0, /* maximum_semaphores */
- NULL /* User_initialization_threads_table */
-};
-
-
-void _POSIX_API_Initialize(
- rtems_configuration_table *configuration_table
-)
-{
- posix_api_configuration_table *api_configuration;
-
- /* XXX need to assert here based on size assumptions */
-
- assert( sizeof(pthread_t) == sizeof(Objects_Id) );
-
- api_configuration = configuration_table->POSIX_api_configuration;
- if ( !api_configuration )
- api_configuration = &_POSIX_Default_configuration;
-
- _POSIX_signals_Manager_Initialization(
- api_configuration->maximum_queued_signals
- );
-
- _POSIX_Threads_Manager_initialization(
- api_configuration->maximum_threads,
- api_configuration->number_of_initialization_threads,
- api_configuration->User_initialization_threads_table
- );
-
- _POSIX_Condition_variables_Manager_initialization(
- api_configuration->maximum_condition_variables
- );
-
- _POSIX_Key_Manager_initialization( api_configuration->maximum_keys );
-
- _POSIX_Mutex_Manager_initialization(
- api_configuration->maximum_mutexes
- );
-
- _POSIX_Message_queue_Manager_initialization(
- api_configuration->maximum_message_queues
- );
-
- _POSIX_Semaphore_Manager_initialization(
- api_configuration->maximum_semaphores
- );
-
- _POSIX_Timer_Manager_initialization ( api_configuration->maximum_timers );
-}
-
-#endif
-/* end of file */
diff --git a/cpukit/sapi/src/rtemsapi.c b/cpukit/sapi/src/rtemsapi.c
deleted file mode 100644
index 58953117c3..0000000000
--- a/cpukit/sapi/src/rtemsapi.c
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * POSIX API Initialization Support
- *
- * NOTE:
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-/*
- * RTEMS_API_INIT is defined so all of the RTEMS API
- * data will be included in this object file.
- */
-
-#define RTEMS_API_INIT
-
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/rtemsapi.h>
-
-#include <rtems/rtems/intr.h>
-#include <rtems/rtems/clock.h>
-#include <rtems/rtems/tasks.h>
-#include <rtems/rtems/dpmem.h>
-#include <rtems/rtems/event.h>
-#include <rtems/rtems/message.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/rtems/mp.h>
-#endif
-#include <rtems/rtems/part.h>
-#include <rtems/rtems/ratemon.h>
-#include <rtems/rtems/region.h>
-#include <rtems/rtems/sem.h>
-#include <rtems/rtems/signal.h>
-#include <rtems/rtems/timer.h>
-
-/*PAGE
- *
- * _RTEMS_API_Initialize
- *
- * XXX
- */
-
-void _RTEMS_API_Initialize(
- rtems_configuration_table *configuration_table
-)
-{
- rtems_api_configuration_table *api_configuration;
-
- api_configuration = configuration_table->RTEMS_api_configuration;
-
- _Attributes_Handler_initialization();
-
- _Interrupt_Manager_initialization();
-
-#if defined(RTEMS_MULTIPROCESSING)
- _Multiprocessing_Manager_initialization();
-#endif
-
- _RTEMS_tasks_Manager_initialization(
- api_configuration->maximum_tasks,
- api_configuration->number_of_initialization_tasks,
- api_configuration->User_initialization_tasks_table
- );
-
- _Timer_Manager_initialization( api_configuration->maximum_timers );
-
- _Signal_Manager_initialization();
-
- _Event_Manager_initialization();
-
- _Message_queue_Manager_initialization(
- api_configuration->maximum_message_queues
- );
-
- _Semaphore_Manager_initialization( api_configuration->maximum_semaphores );
-
- _Partition_Manager_initialization( api_configuration->maximum_partitions );
-
- _Region_Manager_initialization( api_configuration->maximum_regions );
-
- _Dual_ported_memory_Manager_initialization( api_configuration->maximum_ports);
-
- _Rate_monotonic_Manager_initialization( api_configuration->maximum_periods );
-}
-
-/* end of file */
diff --git a/cpukit/score/Makefile.am b/cpukit/score/Makefile.am
deleted file mode 100644
index 411e001881..0000000000
--- a/cpukit/score/Makefile.am
+++ /dev/null
@@ -1,10 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-SUBDIRS = include inline macros cpu src
-
-include $(top_srcdir)/../../../automake/subdirs.am
-include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/score/cpu/Makefile.am b/cpukit/score/cpu/Makefile.am
deleted file mode 100644
index b619a70f04..0000000000
--- a/cpukit/score/cpu/Makefile.am
+++ /dev/null
@@ -1,14 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-SUBDIRS = $(RTEMS_CPU)
-
-## FIXME: this does not work
-## DIST_SUBDIRS = \
-## a29k hppa1.1 i386 i960 m68k mips64orion no_cpu powerpc sh sparc unix
-
-include $(top_srcdir)/../../../automake/subdirs.am
-include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/score/cpu/a29k/Makefile.am b/cpukit/score/cpu/a29k/Makefile.am
deleted file mode 100644
index a740e396a3..0000000000
--- a/cpukit/score/cpu/a29k/Makefile.am
+++ /dev/null
@@ -1,52 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../../../../automake/lib.am
-
-SUBDIRS = rtems
-
-C_FILES = cpu.c
-C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
-
-H_FILES = amd.ah asm.h cpu_asm.h pswmacro.ah register.ah
-
-S_FILES = cpu_asm.S sig.S
-S_O_FILES = $(S_FILES:%.S=$(ARCH)/%.o)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../../../../automake/lib.am
-
-$(PROJECT_INCLUDE):
- $(mkinstalldirs) $@
-
-$(PROJECT_INCLUDE)/%.h: %.h
- $(INSTALL_DATA) $< $@
-
-$(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o: $(ARCH)/rtems.o
- $(INSTALL_DATA) $< $@
-
-REL = $(ARCH)/rtems-cpu.rel
-
-rtems_cpu_rel_OBJECTS = $(C_O_FILES) $(S_O_FILES)
-
-$(REL): $(rtems_cpu_rel_OBJECTS)
- $(make-rel)
-
-PREINSTALL_FILES += $(PROJECT_INCLUDE) $(H_FILES:%=$(PROJECT_INCLUDE)/%)
-
-TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o
-
-all-local: $(ARCH) $(PREINSTALL_FILES) $(rtems_cpu_rel_OBJECTS) $(REL) $(TMPINSTALL_FILES)
-
-.PRECIOUS: $(REL)
-
-EXTRA_DIST = amd.ah asm.h cpu.c cpu_asm.S pswmacro.ah register.ah rtems.c \
- sig.S
-
-include $(top_srcdir)/../../../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/cpukit/score/cpu/a29k/amd.ah b/cpukit/score/cpu/a29k/amd.ah
deleted file mode 100644
index 006e7e15e7..0000000000
--- a/cpukit/score/cpu/a29k/amd.ah
+++ /dev/null
@@ -1,531 +0,0 @@
-; /* @(#)amd.ah 1.1 96/05/23 08:56:58, TEI */
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Initialization values for registers after RESET
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;
-: /* $Id$ */
-;* File information and includes.
-
- .file "amd.ah"
- .ident "@(#)amd.ah 1.1 96/05/23 08:56:58, TEI"
-
-
-
-;
-;* AMD PROCESSOR SPECIFIC VALUES...
-;
-
-;
-;* Processor revision levels...
-;
-
-; PRL values: 31-28 27-24
-; Am29000 0 x
-; Am29005 1 x
-; Am29050 2 x
-; Am29035 3 x
-; Am29030 4 x
-; Am29200 5 x
-; Am29205 5 1x
-; Am29240 6 0
-; Manx 7 0
-; Cougar 8 0
-
-
- .equ AM29000_PRL, 0x00
-
- .equ AM29005_PRL, 0x10
-
- .equ AM29050_PRL, 0x20
-
- .equ AM29035_PRL, 0x30
-
- .equ AM29030_PRL, 0x40
-
- .equ AM29200_PRL, 0x50
-
- .equ AM29205_PRL, 0x58
-
- .equ AM29240_PRL, 0x60
-
- .equ AM29040_PRL, 0x70
-
- .equ MANX_PRL, 0x70
-
- .equ COUGAR_PRL, 0x80
-
-;
-;* data structures sizes.
-;
- .equ CFGINFO_SIZE, 16*4
-
- .equ PGMINFO_SIZE, 16*4
-
- .equ VARARGS_SPACE, 16*4
-
- .equ WINDOWSIZE, 0x80
-;
-;* Am29027 Mode registers
-;
-
- .equ Am29027Mode1, 0x0fc00820
-
- .equ Am29027Mode2, 0x00001375
-
-
-
-;* Processor Based Equates and Defines
-
- .equ SIG_SYNC, -1
-
- .equ ENABLE, (SM)
-
- .equ DISABLE, (ENABLE | DI | DA)
-
- .equ DISABLE_FZ, (FZ | ENABLE | DI | DA)
-
- .equ CLR_TRAP, (FZ | DA)
-
- .equ InitOPS, (TD | SM | (3<<IMShift) | DI | DA)
-
- .equ InitCPS, (TD | SM | (0<<IMShift) | DI | DA)
-
- .equ InitCPS1, (TD | SM | (0<<IMShift) | DI )
-
- .equ CPS_TMR, (SM | (0<<IMShift) | DI)
-
- .equ CPS_INT0, (TD | SM | (0<<IMShift))
-
- .equ CPS_TMRINT0, (SM | (0<<IMShift))
-
- .equ InitCFG, 0x0
-
- .equ InitRBP, (B0|B1|B2|B3|B4|B5)
-
- .equ TMC_VALUE, 0xFFFFFF
-
- .equ TMR_VALUE, (IE | TMC_VALUE)
-
-
-
-
-
-
-;* 29205 specific (internal) peripheral initialization constants.
-
-; Current Processor Status (CPS) Register.
-; Old Processor Status Register (OPS).
-
- .equ DA, 0x00001
- .equ DI, 0x00002
- .equ IMShift,0x2
- .equ SM, 0x00010
- .equ PI, 0x00020
- .equ PD, 0x00040
- .equ WM, 0x00080
- .equ RE, 0x00100
- .equ LK, 0x00200
- .equ FZ, 0x00400
- .equ TU, 0x00800
- .equ TP, 0x01000
- .equ TE, 0x02000
- .equ IP, 0x04000
- .equ CA, 0x08000
- .equ MM, 0x10000
- .equ TD, 0x20000
-
-; Configuration Register (CFG)
-
- .equ CD, 0x01
- .equ CP, 0x02
- .equ BO, 0x04
- .equ RV, 0x08
- .equ VF, 0x10
- .equ DW, 0x20
- .equ CO, 0x40
- .equ EE, 0x80
- .equ IDShift, 8
- .equ CFG_ID, 0x100
- .equ ILShift, 9
- .equ CFG_ILMask, 0x600
- .equ DDShift, 11
- .equ CFG_DD, 0x800
- .equ DLShift, 12
- .equ CFG_DLMask, 0x3000
- .equ PCEShift, 14
- .equ CFG_PCE, 0x4000
- .equ PMBShift, 16
- .equ D16, 0x8000
- .equ TBOShift, 23
- .equ PRLShift, 24
-
-; Channel Control Register (CHC)
-
- .equ CV, 0x1
- .equ NN, 0x2
- .equ TRShift, 2
- .equ TF, 0x400
- .equ PER, 0x800
- .equ LA, 0x1000
- .equ ST, 0x2000
- .equ ML, 0x4000
- .equ LS, 0x8000
- .equ CRShift, 16
- .equ CNTLShift, 24
- .equ CEShift, 31
- .equ WBERShift, 31
-
-; Register Bank Protect (RBP)
- .equ B0, 0x1
- .equ B1, 0x2
- .equ B2, 0x4
- .equ B3, 0x8
- .equ B4, 0x10
- .equ B5, 0x20
- .equ B6, 0x40
- .equ B7, 0x80
- .equ B8, 0x100
- .equ B9, 0x200
- .equ B10, 0x400
- .equ B11, 0x800
- .equ B12, 0x1000
- .equ B13, 0x2000
- .equ B14, 0x4000
- .equ B15, 0x8000
-
-; Timer Counter
-
- .equ TCVMask, 0xffffff
-
-; Timer Reload Register
-
- .equ IE, 0x1000000
- .equ IN, 0x2000000
- .equ OV, 0x4000000
- .equ TRVMAsk, 0xffffff
-
-; MMU Configuration
-
- .equ PSShift, 8
- .equ PS0Shift, 8
- .equ PS1Shift, 12
-
-; LRU Recommendation (LRU)
- .equ LRUMask, 0xff
-
-; Reason Vector (RSN)
- .equ RSNMask, 0xff
-
-; Region Mapping Address (RMA0 | RMA1)
- .equ PBAMask,0xffff
- .equ VBAShift, 16
-
-; Region Mapping Control (RMC0 | RMC1)
- .equ TIDMask, 0xff
- .equ RMC_UE, 0x100
- .equ RMC_UW, 0x200
- .equ RMC_UR, 0x400
- .equ RMC_SE, 0x800
- .equ RMC_SW, 0x1000
- .equ RMC_SR, 0x2000
- .equ RMC_VE, 0x4000
- .equ RMC_IO, 0x10000
- .equ RGSShift, 17
- .equ RMC_PGMShift, 22
-
-; Instruction breakpoint Control (IBC0 | IBC1)
- .equ BPIDMask, 0xff
- .equ BTE, 0x100
- .equ BRM, 0x200
- .equ IBC_BSY, 0x400
- .equ BEN, 0x800
- .equ BHO, 0x1000
-
-; Cache Data Register (CDR)
- .equ CDR_US, 0x1
- .equ P, 0x2
- .equ CDR_V, 0x4
- .equ IATAGShift, 20
-
-; Cache Interface Register (CIR)
- .equ CPTRShift, 2
- .equ CIR_RW, 0x1000000
- .equ FSELShift, 28
-
-; Indirect Pointer A, B, C (IPA, IPB, IPC)
- .equ IPShift, 2
-
-; ALU Status (ALU)
- .equ FCMask, 0x1F
- .equ BPShift, 5
- .equ C, 0x80
- .equ Z, 0x100
- .equ N, 0x200
- .equ ALU_V, 0x400
- .equ DF, 0x800
-
-; Byte Pointer
- .equ BPMask, 0x3
-
-; Load/Store Count Remaining (CR)
- .equ CRMask, 0xff
-
-; Floating Point Environment (FPE)
- .equ NM, 0x1
- .equ RM, 0x2
- .equ VM, 0x4
- .equ UM, 0x8
- .equ XM, 0x10
- .equ DM, 0x20
- .equ FRMShift, 6
- .equ FF, 0x100
- .equ ACFShift, 9
-
-; Integer Environment (INTE)
- .equ MO, 0x1
- .equ DO, 0x2
-
-; Floating Point Status (FPS)
- .equ NS, 0x1
- .equ RS, 0x2
- .equ VS, 0x4
- .equ FPS_US, 0x8
- .equ XS, 0x10
- .equ DS, 0x20
- .equ NT, 0x100
- .equ RT, 0x200
- .equ VT, 0x400
- .equ UT, 0x800
- .equ XT, 0x1000
- .equ DT, 0x2000
-
-; Exception Opcode (EXOP)
- .equ IOPMask, 0xff
-
-; TLB Entry Word 0
-; .equ TIDMask, 0xff already defined above
- .equ TLB_UE, 0x100
- .equ TLB_UW, 0x200
- .equ TLB_UR, 0x400
- .equ TLB_SE, 0x800
- .equ TLB_SW, 0x1000
- .equ TLB_SR, 0x2000
- .equ TLB_VE, 0x4000
- .equ VTAGShift, 15
-
-; TLB Entry Word 1
- .equ TLB_IO, 0x1
- .equ U, 0x2
- .equ TLB_PGMShift, 6
- .equ RPNShift, 10
-
-; Am29200 ROM Control bits.
- .equ RMCT_DW0Shift, 29
- .equ RMCT_DW1Shift, 21
- .equ RMCT_DW2Shift, 13
- .equ RMCT_DW3Shift, 5
-
-; Am29200 DRAM Control bits.
- .equ DW3, (1<<18)
- .equ DW2, (1<<22)
- .equ DW1, (1<<26)
- .equ DW0, (1<<30)
-
- ; Internal peripheral address assignments.
- .equ RMCT, 0x80000000
- .equ RMCF, 0x80000004
- .equ DRCT, 0x80000008
- .equ DRCF, 0x8000000C
- .equ DRM0, 0x80000010
- .equ DRM1, 0x80000014
- .equ DRM2, 0x80000018
- .equ DRM3, 0x8000001C
- .equ PIACT0, 0x80000020
- .equ PIACT1, 0x80000020
- .equ ICT, 0x80000028
- .equ DMCT0, 0x80000030
- .equ DMAD0, 0x80000034
- .ifdef revA
- .equ TAD0, 0x80000036
- .equ TCN0, 0x8000003A
- .else
- .equ TAD0, 0x80000070 ; default
- .equ TCN0, 0x8000003C ; default
- .endif
- .equ DMCN0, 0x80000038
- .equ DMCT1, 0x80000040
- .equ DMAD1, 0x80000044
- .equ DMCN1, 0x80000048
- .equ SPCT, 0x80000080
- .equ SPST, 0x80000084
- .equ SPTH, 0x80000088
- .equ SPRB, 0x8000008C
- .equ BAUD, 0x80000090
- .equ PPCT, 0x800000C0
- .equ PPST, 0x800000C1
- .equ PPDT, 0x800000C4
- .equ POCT, 0x800000D0
- .equ PIN, 0x800000D4
- .equ POUT, 0x800000D8
- .equ POEN, 0x800000DC
- .equ VCT, 0x800000E0
- .equ TOP, 0x800000E4
- .equ SIDE, 0x800000E8
- .equ VDT, 0x800000EC
-
- ; Interrupt Controller Register bits.
- .equ TXDI, (1<<5)
- .equ RXDI, (1<<6)
- .equ RXSI, (1<<7)
- .equ PPI, (1<<11)
- .equ DMA1I, (1<<13)
- .equ DMA0I, (1<<14)
- .equ IOPIMask, (0xFF<<16)
- .equ VDI, (1<<27)
- .equ ICT200_I, (TXDI|RXDI|RXSI|PPI|DMA1I|DMA0I|IOPIMask|VDI)
- .equ ICT205_I, (TXDI|RXDI|RXSI|PPI|DMA1I|DMA0I|IOPIMask|VDI)
-
- ; Serial port Initialization bits
- .equ NO_PARITY, 0
-
-
- ; SPST bits
- .equ THREShift, 22
-
-;* REGISTER Addresses
-
- .equ ROMCntlRegAddr, 0x80000000
-
- .equ ROMCfgRegAddr, 0x80000004
-
- .equ DRAMCntlRegAddr, 0x80000008
-
- .equ DRAMCfgRegAddr, 0x8000000C
-
- .equ DRAMMap0RegAddr, 0x80000010
-
- .equ DRAMMap1RegAddr, 0x80000014
-
- .equ DRAMMap2RegAddr, 0x80000018
-
- .equ DRAMMap3RegAddr, 0x8000001C
-
- .equ PIACntl0RegAddr, 0x80000020
-
- .equ PIACntl1RegAddr, 0x80000024
-
- .equ INTRCntlRegAddr, 0x80000028
-
- .equ DMACntl0RegAddr, 0x80000030
-
- .equ DMACntl1RegAddr, 0x80000040
-
- .equ SERPortCntlRegAddr, 0x80000080
-
- .equ SERPortStatRegAddr, 0x80000084
-
- .equ SERPortTHLDRegAddr, 0x80000088
-
- .equ SERPortRbufRegAddr, 0x8000008C
-
- .equ SERPortBaudRegAddr, 0x80000090
-
- .equ PARPortCntlRegAddr, 0x800000C0
-
- .equ PIOCntlRegAddr, 0x800000D0
-
- .equ PIOInpRegAddr, 0x800000D4
-
- .equ PIOOutRegAddr, 0x800000D8
-
- .equ PIOOutEnaRegAddr, 0x800000DC
-
- .equ VCTCntlRegAddr, 0x800000E0
-
-;
-;* Control constants
-;
-
-;* AM29030 Timer related constants.
-
- .equ TMR_IE, 0x01000000
-
- .equ TMR_IN, 0x02000000
-
- .equ TMR_OV, 0x04000000
-
- .equ TMC_INITCNT, 1613
-
-;
-;* System initialization values.
-;
-
- .equ __os_version, 0x0001 ;
-
- .equ STACKSize, 0x8000 ;
-
- .equ PGMExecMode, 0x0000 ;
-
- .equ TSTCK_OFST, 28 * 4
-
- .equ CSTCK_OFST, 29 * 4
-
- .equ TMSTCK_OFST, 30 * 4
-
- .equ CMSTCK_OFST, 31 * 4
-
- .equ CTXSW_OK, 0xA55A ; ctx switch ok
-
- .set NV_STARTOFST, 0x20 ; 32 bytes
-
- .set NV_BAUDOFST, 0x00 ; 00 bytes
-
- .set reg_cir, 29
-
- .set reg_cdr, 30
-
- .equ MSG_BUFSIZE, 0x1000 ; serial buffer size
-
- .equ ILLOPTRAP, 0
-
- .equ UATRAP, 1
-
- .equ PVTRAP, 5
-
- .equ UITLBMISSTRAP, 8
-
- .equ UDTLBMISSTRAP, 9
-
- .equ TIMERTRAP, 14
-
- .equ TRACETRAP, 15
-
- .equ XLINXTRAP, 16
-
- .equ SERIALTRAP, 17
-
- .equ SLOWTMRTRAP, 18
-
- .equ PORTTRAP, 19
-
- .equ SVSCTRAP, 80
-
- .equ SVSCTRAP1, 81
-
- .equ V_CACHETRAP, 66 ;
-
- .equ V_SETSERVICE, 67 ;
-
- .equ INIT_TIMER, 100
-
- .equ DISABLE_TIMER, 101
-
- .equ GET_TIMER, 102
-
- .equ CLEAR_TIMER, 103
-
- .equ V_SPILL, 64
-
- .equ V_FILL, 65
-
- .equ SIGDFL, 105
diff --git a/cpukit/score/cpu/a29k/asm.h b/cpukit/score/cpu/a29k/asm.h
deleted file mode 100644
index 5622b124ce..0000000000
--- a/cpukit/score/cpu/a29k/asm.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/* asm.h
- *
- * This include file attempts to address the problems
- * caused by incompatible flavors of assemblers and
- * toolsets. It primarily addresses variations in the
- * use of leading underscores on symbols and the requirement
- * that register names be preceded by a %.
- *
- *
- * NOTE: The spacing in the use of these macros
- * is critical to them working as advertised.
- *
- * !!! THIS FILE DOES NOT APPEAR TO HAVE BEEN USED IN THE 29K PORT !!!
- *
- * COPYRIGHT:
- *
- * This file is based on similar code found in newlib available
- * from ftp.cygnus.com. The file which was used had no copyright
- * notice. This file is freely distributable as long as the source
- * of the file is noted. This file is:
- *
- * COPYRIGHT (c) 1989-1997
- * On-Line Applications Research Corporation (OAR).
- *
- * $Id$
- */
-
-#ifndef __A29K_ASM_h
-#define __A29K_ASM_h
-
-/*
- * Indicate we are in an assembly file and get the basic CPU definitions.
- */
-
-#ifndef ASM
-#define ASM
-#endif
-#include <rtems/score/targopts.h>
-#include <rtems/score/asm.h>
-
-/*
- * Recent versions of GNU cpp define variables which indicate the
- * need for underscores and percents. If not using GNU cpp or
- * the version does not support this, then you will obviously
- * have to define these as appropriate.
- */
-
-#ifndef __USER_LABEL_PREFIX__
-#define __USER_LABEL_PREFIX__ _
-#endif
-
-#ifndef __REGISTER_PREFIX__
-#define __REGISTER_PREFIX__
-#endif
-
-/* ANSI concatenation macros. */
-
-#define CONCAT1(a, b) CONCAT2(a, b)
-#define CONCAT2(a, b) a ## b
-
-/* Use the right prefix for global labels. */
-
-#define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
-
-/* Use the right prefix for registers. */
-
-#define REG(x) CONCAT1 (__REGISTER_PREFIX__, x)
-
-/*
- * define macros for all of the registers on this CPU
- *
- * EXAMPLE: #define d0 REG (d0)
- */
-
-/*
- * Define macros to handle section beginning and ends.
- */
-
-
-#define BEGIN_CODE_DCL .text
-#define END_CODE_DCL
-#define BEGIN_DATA_DCL .data
-#define END_DATA_DCL
-#define BEGIN_CODE .text
-#define END_CODE
-#define BEGIN_DATA
-#define END_DATA
-#define BEGIN_BSS
-#define END_BSS
-#define END
-
-/*
- * Following must be tailor for a particular flavor of the C compiler.
- * They may need to put underscores in front of the symbols.
- */
-
-#define PUBLIC(sym) .globl SYM (sym)
-#define EXTERN(sym) .globl SYM (sym)
-
-#endif
-/* end of include file */
-
-
diff --git a/cpukit/score/cpu/a29k/cpu.c b/cpukit/score/cpu/a29k/cpu.c
deleted file mode 100644
index 0485714062..0000000000
--- a/cpukit/score/cpu/a29k/cpu.c
+++ /dev/null
@@ -1,262 +0,0 @@
-/*
- * AMD 29K CPU Dependent Source
- *
- * Author: Craig Lebakken <craigl@transition.com>
- *
- * COPYRIGHT (c) 1996 by Transition Networks Inc.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Transition Networks not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * Transition Networks makes no representations about the suitability
- * of this software for any purpose.
- *
- * Derived from c/src/exec/score/cpu/no_cpu/cpu.c:
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-#ifndef lint
-static char _sccsid[] = "@(#)cpu.c 10/21/96 1.8\n";
-#endif
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/thread.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-void a29k_ISR_Handler(unsigned32 vector);
-
-/* _CPU_Initialize
- *
- * This routine performs processor dependent initialization.
- *
- * INPUT PARAMETERS:
- * cpu_table - CPU table to initialize
- * thread_dispatch - address of disptaching routine
- */
-
-
-void _CPU_Initialize(
- rtems_cpu_table *cpu_table,
- void (*thread_dispatch)() /* ignored on this CPU */
-)
-{
- unsigned int i;
- /*
- * The thread_dispatch argument is the address of the entry point
- * for the routine called at the end of an ISR once it has been
- * decided a context switch is necessary. On some compilation
- * systems it is difficult to call a high-level language routine
- * from assembly. This allows us to trick these systems.
- *
- * If you encounter this problem save the entry point in a CPU
- * dependent variable.
- */
-
- _CPU_Thread_dispatch_pointer = thread_dispatch;
-
- /*
- * If there is not an easy way to initialize the FP context
- * during Context_Initialize, then it is usually easier to
- * save an "uninitialized" FP context here and copy it to
- * the task's during Context_Initialize.
- */
-
- /* FP context initialization support goes here */
-
- _CPU_Table = *cpu_table;
-
- for ( i = 0; i < ISR_NUMBER_OF_VECTORS; i++ )
- {
- _ISR_Vector_table[i] = (proc_ptr)NULL;
- }
-}
-
-/*PAGE
- *
- * _CPU_ISR_Get_level
- */
-
-unsigned32 _CPU_ISR_Get_level( void )
-{
- unsigned32 cps;
-
- /*
- * This routine returns the current interrupt level.
- */
- cps = a29k_getops();
- if (cps & (TD|DI))
- return 1;
- else
- return 0;
-}
-
-/*PAGE
- *
- * _CPU_ISR_install_raw_handler
- */
-
-extern void intr14( void );
-extern void intr18( void );
-extern void intr19( void );
-
-void _CPU_ISR_install_raw_handler(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-)
-{
- /*
- * This is where we install the interrupt handler into the "raw" interrupt
- * table used by the CPU to dispatch interrupt handlers.
- */
- switch( vector )
- {
- case 14:
- _settrap( vector, intr14 );
- break;
- case 18:
- _settrap( vector, intr18 );
- break;
- case 19:
- _settrap( vector, intr19 );
- break;
-
- default:
- break;
- }
-}
-
-
-/*PAGE
- *
- * _CPU_ISR_install_vector
- *
- * This kernel routine installs the RTEMS handler for the
- * specified vector.
- *
- * Input parameters:
- * vector - interrupt vector number
- * old_handler - former ISR for this vector number
- * new_handler - replacement ISR for this vector number
- *
- * Output parameters: NONE
- *
- */
-
-void _CPU_ISR_install_vector(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-)
-{
- *old_handler = _ISR_Vector_table[ vector ];
-
- /*
- * If the interrupt vector table is a table of pointer to isr entry
- * points, then we need to install the appropriate RTEMS interrupt
- * handler for this vector number.
- */
-
- _CPU_ISR_install_raw_handler( vector, new_handler, old_handler );
-
- /*
- * We put the actual user ISR address in '_ISR_vector_table'. This will
- * be used by the _ISR_Handler so the user gets control.
- */
-
- _ISR_Vector_table[ vector ] = new_handler;
-}
-
-/*PAGE
- *
- * _CPU_Install_interrupt_stack
- */
-
-void _CPU_Install_interrupt_stack( void )
-{
-}
-
-/*PAGE
- *
- * _CPU_Internal_threads_Idle_thread_body
- *
- * NOTES:
- *
- * 1. This is the same as the regular CPU independent algorithm.
- *
- * 2. If you implement this using a "halt", "idle", or "shutdown"
- * instruction, then don't forget to put it in an infinite loop.
- *
- * 3. Be warned. Some processors with onboard DMA have been known
- * to stop the DMA if the CPU were put in IDLE mode. This might
- * also be a problem with other on-chip peripherals. So use this
- * hook with caution.
- */
-
-void _CPU_Internal_threads_Idle_thread_body( void )
-{
-
- for( ; ; )
- {
- }
- /* insert your "halt" instruction here */ ;
-}
-
-void a29k_fatal_error( unsigned32 error )
-{
- printf("\n\nfatal error %d, rebooting!!!\n",error );
- exit(error);
-}
-
- /*
- * This discussion ignores a lot of the ugly details in a real
- * implementation such as saving enough registers/state to be
- * able to do something real. Keep in mind that the goal is
- * to invoke a user's ISR handler which is written in C and
- * uses a certain set of registers.
- *
- * Also note that the exact order is to a large extent flexible.
- * Hardware will dictate a sequence for a certain subset of
- * _ISR_Handler while requirements for setting
- */
-
- /*
- * At entry to "common" _ISR_Handler, the vector number must be
- * available. On some CPUs the hardware puts either the vector
- * number or the offset into the vector table for this ISR in a
- * known place. If the hardware does not give us this information,
- * then the assembly portion of RTEMS for this port will contain
- * a set of distinct interrupt entry points which somehow place
- * the vector number in a known place (which is safe if another
- * interrupt nests this one) and branches to _ISR_Handler.
- *
- */
-
-void a29k_ISR_Handler(unsigned32 vector)
-{
- _ISR_Nest_level++;
- _Thread_Dispatch_disable_level++;
- if ( _ISR_Vector_table[ vector ] )
- (*_ISR_Vector_table[ vector ])( vector );
- --_Thread_Dispatch_disable_level;
- --_ISR_Nest_level;
- if ( !_Thread_Dispatch_disable_level && !_ISR_Nest_level &&
- (_Context_Switch_necessary || _ISR_Signals_to_thread_executing ))
- _Thread_Dispatch();
- return;
-}
diff --git a/cpukit/score/cpu/a29k/cpu_asm.S b/cpukit/score/cpu/a29k/cpu_asm.S
deleted file mode 100644
index bfa7444f35..0000000000
--- a/cpukit/score/cpu/a29k/cpu_asm.S
+++ /dev/null
@@ -1,490 +0,0 @@
-;/* cpu_asm.c ===> cpu_asm.S or cpu_asm.s
-; *
-; * Author: Craig Lebakken <craigl@transition.com>
-; *
-; * COPYRIGHT (c) 1996 by Transition Networks Inc.
-; *
-; * To anyone who acknowledges that this file is provided "AS IS"
-; * without any express or implied warranty:
-; * permission to use, copy, modify, and distribute this file
-; * for any purpose is hereby granted without fee, provided that
-; * the above copyright notice and this notice appears in all
-; * copies, and that the name of Transition Networks not be used in
-; * advertising or publicity pertaining to distribution of the
-; * software without specific, written prior permission.
-; * Transition Networks makes no representations about the suitability
-; * of this software for any purpose.
-; *
-; *
-; * This file contains the basic algorithms for all assembly code used
-; * in an specific CPU port of RTEMS. These algorithms must be implemented
-; * in assembly language
-; *
-; * NOTE: This is supposed to be a .S or .s file NOT a C file.
-; *
-; * COPYRIGHT (c) 1989-1999.
-; * On-Line Applications Research Corporation (OAR).
-; *
-; * The license and distribution terms for this file may be
-; * found in the file LICENSE in this distribution or at
-; * http://www.OARcorp.com/rtems/license.html.
-; *
-; * $Id$
-; */
-
-;/*
-; * This is supposed to be an assembly file. This means that system.h
-; * and cpu.h should not be included in a "real" cpu_asm file. An
-; * implementation in assembly should include "cpu_asm.h>
-; */
-
-;#include <cpu_asm.h>
- .include "register.ah"
- .include "amd.ah"
- .include "pswmacro.ah"
-; .extern _bsp_exit
-;
-; push a register onto the struct
- .macro spush, sp, reg
- store 0, 0, reg, sp ; push register
- add sp, sp, 4 ; adjust stack pointer
- .endm
-; push a register onto the struct
- .macro spushsr, sp, reg, sr
- mfsr reg, sr
- store 0, 0, reg, sp ; push register
- add sp, sp, 4 ; adjust stack pointer
- .endm
-; pop a register from the struct
- .macro spop, reg, sp
- load 0, 0, reg, sp
- add sp,sp,4
- .endm
-; pop a special register from the struct
- .macro spopsr, sreg, reg, sp
- load 0, 0, reg, sp
- mtsr sreg, reg
- add sp,sp,4
- .endm
-;
-;/*
-; * _CPU_Context_save_fp_context
-; *
-; * This routine is responsible for saving the FP context
-; * at *fp_context_ptr. If the point to load the FP context
-; * from is changed then the pointer is modified by this routine.
-; *
-; * Sometimes a macro implementation of this is in cpu.h which dereferences
-; * the ** and a similarly named routine in this file is passed something
-; * like a (Context_Control_fp *). The general rule on making this decision
-; * is to avoid writing assembly language.
-; */
-
-;#if 0
-;void _CPU_Context_save_fp(
-; void **fp_context_ptr
-;)
-;{
-;}
-;#endif
- .global _CPU_Context_save_fp
-_CPU_Context_save_fp:
- jmpi lr0
- nop
-
-;/*
-; * _CPU_Context_restore_fp_context
-; *
-; * This routine is responsible for restoring the FP context
-; * at *fp_context_ptr. If the point to load the FP context
-; * from is changed then the pointer is modified by this routine.
-; *
-; * Sometimes a macro implementation of this is in cpu.h which dereferences
-; * the ** and a similarly named routine in this file is passed something
-; * like a (Context_Control_fp *). The general rule on making this decision
-; * is to avoid writing assembly language.
-; */
-
-;#if 0
-;void _CPU_Context_restore_fp(
-; void **fp_context_ptr
-;)
-;{
-;}
-;#endif
- .global __CPU_Context_restore_fp
-__CPU_Context_restore_fp:
- jmpi lr0
- nop
-
-;/* _CPU_Context_switch
-; *
-; * This routine performs a normal non-FP context switch.
-; */
-;#if 0
-;void _CPU_Context_switch(
-; Context_Control *run,
-; Context_Control *heir
-;)
-;{
-;}
-;#endif
- .global __CPU_Context_switch
-__CPU_Context_switch:
- asneq 106, gr1, gr1 ; syscall
- jmpi lr0 ;
- nop ;
-
-
-
- .global _a29k_context_switch_sup
-_a29k_context_switch_sup:
- add pcb,lr2,0
- add kt1,lr3,0 ;move heir pointer to safe location
- constn it0,SIG_SYNC
- spush pcb,it0
- spush pcb,gr1
- spush pcb,rab ;push rab
- spushsr pcb,it0,pc0 ;push specials
- spushsr pcb,it0,pc1
- add pcb,pcb,1*4 ;space pc2
- spushsr pcb,it0,CHA ;push CHA
- spushsr pcb,it0,CHD ;push CHD
- spushsr pcb,it0,CHC ;push CHC
- add pcb,pcb,1*4 ;space for alu
- spushsr pcb,it0,ops ;push OPS
- mfsr kt0,cps ;current status
- const it1,FZ ;FZ constant
- andn it1,kt0,it1 ;clear FZ bit
- mtsr cps,it1 ;cps without FZ
- add pcb,pcb,1*4 ;space for tav
- mtsrim chc,0 ;possible DERR
-;
- spush pcb,lr1 ;push R-stack
- spush pcb,rfb ; support
- spush pcb,msp ;push M-stack pnt.
-;
- add pcb,pcb,3*4 ;space for floating point
-; spush pcb,FPStat0 ;floating point
-; spush pcb,FPStat1
-; spush pcb,FPStat2
-;
- add pcb,pcb,4*4 ;space for IPA..Q
-;
- mtsrim cr,29-1
- storem 0,0,gr96,pcb ;push gr96-124, optional
- add pcb,pcb,29*4 ;space for gr96-124
-;
- sub it0,rfb,gr1 ;get bytes in cache
- srl it0,it0,2 ;adjust to words
- sub it0,it0,1
- spush pcb,it0
- mtsr cr,it0
- storem 0,0,lr0,pcb ;save lr0-rfb
-;
-context_restore:
- add pcb,kt1,0 ;pcb=heir
- add pcb,pcb,4 ;space for signal num
- spop gr1,pcb ;restore freeze registers
- add gr1,gr1,0 ;alu op
- add pcb,pcb,9*4 ;move past freeze registers
- add pcb,pcb,1*4 ;space for tav
- spop lr1,pcb
- spop rfb,pcb
- spop msp,pcb
-; spop FPStat0,pcb
-; spop FPStat1,pcb
-; spop FPStat2,pcb
- add pcb,pcb,3*4 ;space for floating point
- add pcb,pcb,4*4 ;space for IPA..Q
- mtsrim cr,29-1
- loadm 0,0,gr96,pcb ;pop gr96-gr124
- add pcb,pcb,29*4 ;space for gr96-124
-
- spop it1,pcb ;pop locals count
- mtsr cr,it1
- loadm 0,0,lr0,pcb ;load locals
-
- add pcb,kt1,0 ;pcb=heir
- mtsr cps,kt0 ;cps with FZ
- nop
- add pcb,pcb,4 ;space for signal num
- spop gr1,pcb ;restore freeze registers
- add gr1,gr1,0 ;alu op
- spop rab,pcb
- spopsr pc0,it1,pcb
- spopsr pc1,it1,pcb
- add pcb,pcb,4 ;space for pc2
- spopsr CHA,it1,pcb
- spopsr CHD,it1,pcb
- spopsr CHC,it1,pcb
- add pcb,pcb,4 ;space for alu
- spopsr ops,it1,pcb
- nop
- iret
-
-
-;/*
-; * _CPU_Context_restore
-; *
-; * This routine is generally used only to restart self in an
-; * efficient manner. It may simply be a label in _CPU_Context_switch.
-; *
-; * NOTE: May be unnecessary to reload some registers.
-; */
-;#if 0
-;void _CPU_Context_restore(
-; Context_Control *new_context
-;)
-;{
-;}
-;#endif
-
- .global __CPU_Context_restore
-__CPU_Context_restore:
- asneq 107, gr1, gr1 ; syscall
- jmpi lr0 ;
- nop ;
-
- .global _a29k_context_restore_sup
-_a29k_context_restore_sup:
- add kt1,lr2,0 ;kt1 = restore context
- mfsr kt0,cps ;current status
- const it1,FZ ;FZ constant
- andn it1,kt0,it1 ;clear FZ bit
- mtsr cps,it1 ;cps without FZ
- jmp context_restore
- nop
-
- .global _a29k_context_save_sup
-_a29k_context_save_sup:
- add pcb,lr2,0
- constn it0,SIG_SYNC
- spush pcb,it0
- spush pcb,gr1
- spush pcb,rab ;push rab
- spushsr pcb,it0,pc0 ;push specials
- spushsr pcb,it0,pc1
- add pcb,pcb,1*4 ;space pc2
- spushsr pcb,it0,CHA ;push CHA
- spushsr pcb,it0,CHD ;push CHD
- spushsr pcb,it0,CHC ;push CHC
- add pcb,pcb,1*4 ;space for alu
- spushsr pcb,it0,ops ;push OPS
- mfsr it0,cps ;current status
-SaveFZState it1,it2
- add pcb,pcb,1*4 ;space for tav
- mtsrim chc,0 ;possible DERR
-;
- spush pcb,lr1 ;push R-stack
- spush pcb,rfb ; support
- spush pcb,msp ;push M-stack pnt.
-;
- spush pcb,FPStat0 ;floating point
- spush pcb,FPStat1
- spush pcb,FPStat2
-;
- add pcb,pcb,4*4 ;space for IPA..Q
-;
- mtsrim cr,29-1
- storem 0,0,gr96,pcb ;push gr96-124, optional
- add pcb,pcb,29*4 ;space for gr96-124
-;
- sub kt0,rfb,gr1 ;get bytes in cache
- srl kt0,kt0,2 ;adjust to words
- sub kt0,kt0,1
- spush pcb,kt0 ;push number of words
- mtsr cr,kt0
- storem 0,0,lr0,pcb ;save lr0-rfb
-;
- mtsr cps,it0 ;cps with FZ
-RestoreFZState it1,it2
-
- nop
- nop
- nop
-;
- iret
-;
-
- .global __CPU_Context_save
-__CPU_Context_save:
- asneq 108, gr1, gr1 ; syscall
- jmpi lr0 ;
- nop ;
-
-
-;/* void __ISR_Handler()
-; *
-; * This routine provides the RTEMS interrupt management.
-; *
-; */
-
-;#if 0
-;void _ISR_Handler()
-;{
-; /*
-; * This discussion ignores a lot of the ugly details in a real
-; * implementation such as saving enough registers/state to be
-; * able to do something real. Keep in mind that the goal is
-; * to invoke a user's ISR handler which is written in C and
-; * uses a certain set of registers.
-; *
-; * Also note that the exact order is to a large extent flexible.
-; * Hardware will dictate a sequence for a certain subset of
-; * _ISR_Handler while requirements for setting
-; */
-
-; /*
-; * At entry to "common" _ISR_Handler, the vector number must be
-; * available. On some CPUs the hardware puts either the vector
-; * number or the offset into the vector table for this ISR in a
-; * known place. If the hardware does not give us this information,
-; * then the assembly portion of RTEMS for this port will contain
-; * a set of distinct interrupt entry points which somehow place
-; * the vector number in a known place (which is safe if another
-; * interrupt nests this one) and branches to _ISR_Handler.
-; *
-; * save some or all context on stack
-; * may need to save some special interrupt information for exit
-; *
-; * #if ( CPU_HAS_SOFTWARE_INTERRUPT_STACK == TRUE )
-; * if ( _ISR_Nest_level == 0 )
-; * switch to software interrupt stack
-; * #endif
-; *
-; * _ISR_Nest_level++;
-; *
-; * _Thread_Dispatch_disable_level++;
-; *
-; * (*_ISR_Vector_table[ vector ])( vector );
-; *
-; * --_ISR_Nest_level;
-; *
-; * if ( _ISR_Nest_level )
-; * goto the label "exit interrupt (simple case)"
-; *
-; * #if ( CPU_HAS_SOFTWARE_INTERRUPT_STACK == TRUE )
-; * restore stack
-; * #endif
-; *
-; * if ( !_Context_Switch_necessary )
-; * goto the label "exit interrupt (simple case)"
-; *
-; * if ( !_ISR_Signals_to_thread_executing )
-; * goto the label "exit interrupt (simple case)"
-; *
-; * call _Thread_Dispatch() or prepare to return to _ISR_Dispatch
-; *
-; * prepare to get out of interrupt
-; * return from interrupt (maybe to _ISR_Dispatch)
-; *
-; * LABEL "exit interrupt (simple case):
-; * prepare to get out of interrupt
-; * return from interrupt
-; */
-;}
-;#endif
-; .global __ISR_Handler
-;__ISR_Handler:
-; jmpi lr0
-; nop
-
- .global _a29k_getops
-_a29k_getops:
- asneq 113, gr96, gr96
- jmpi lr0
- nop
-
- .global _a29k_getops_sup
-_a29k_getops_sup:
- mfsr gr96, ops ; caller wants ops
- iret
- nop
-
- .global _a29k_disable
-_a29k_disable:
- asneq 110, gr96, gr96
- jmpi lr0
- nop
-
- .global _a29k_disable_sup
-_a29k_disable_sup:
- mfsr kt0, ops
- add gr96, kt0, 0 ; return ops to caller
- const kt1, (DI | TD)
- consth kt1, (DI | TD)
- or kt1, kt0, kt1
- mtsr ops, kt1
- iret
- nop
-
- .global _a29k_disable_all
-_a29k_disable_all:
- asneq 112, gr96, gr96
- jmpi lr0
- nop
-
- .global _a29k_disable_all_sup
-_a29k_disable_all_sup:
- mfsr kt0, ops
- const kt1, (DI | TD)
- consth kt1, (DI | TD)
- or kt1, kt0, kt1
- mtsr ops, kt1
- iret
- nop
-
- .global _a29k_enable_all
-_a29k_enable_all:
- asneq 111, gr96, gr96
- jmpi lr0
- nop
-
- .global _a29k_enable_all_sup
-_a29k_enable_all_sup:
- mfsr kt0, ops
- const kt1, (DI | TD)
- consth kt1, (DI | TD)
- andn kt1, kt0, kt1
- mtsr ops, kt1
- iret
- nop
-
- .global _a29k_enable
-_a29k_enable:
- asneq 109, gr96, gr96
- jmpi lr0
- nop
-
- .global _a29k_enable_sup
-_a29k_enable_sup:
- mfsr kt0, ops
- const kt1, (DI | TD)
- consth kt1, (DI | TD)
- and kt3, lr2, kt1
- andn kt0, kt0, kt1
- or kt1, kt0, kt3
- mtsr ops, kt1
- iret
- nop
-
- .global _a29k_halt
-_a29k_halt:
- halt
- jmp _a29k_halt
- nop
-
- .global _a29k_super_mode
-_a29k_super_mode:
- mfsr gr96, ops
- or gr96, gr96, 0x10
- mtsr ops, gr96
- iret
- nop
-
- .global _a29k_as70
-_a29k_as70:
- asneq 70,gr96,gr96
- jmpi lr0
- nop
diff --git a/cpukit/score/cpu/a29k/pswmacro.ah b/cpukit/score/cpu/a29k/pswmacro.ah
deleted file mode 100644
index c21eee4f35..0000000000
--- a/cpukit/score/cpu/a29k/pswmacro.ah
+++ /dev/null
@@ -1,442 +0,0 @@
-; /* @(#)pswmacro.ah 1.1 96/05/23 08:56:58, TEI */
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; macros: Do_install and init_TLB
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; /* $Id$ */
-
-;* File information and includes.
-
- .file "macro.ah"
- .ident "@(#)pswmacro.ah 1.1 96/05/23 08:56:58, TEI"
-
-
- .macro CONST32, RegName, RegValue
- const RegName, RegValue
- consth RegName, RegValue
- .endm
-
- .macro CONSTX, RegName, RegValue
- .if (RegValue) <= 0x0000ffff
- const RegName, RegValue
- .else
- const RegName, RegValue
- consth RegName, RegValue
- .endif
- .endm
-
- .macro PRODEV, RegName
- srl RegName, RegName, 24
- .endm
-
-;
-;* MACRO TO INSTALL VECTOR TABLE ENTRIES
-;
-
-;* Assumes vector table address in v0
-
- .macro _setvec, trapnum, trapaddr
- mfsr v0, vab ;
- const v2, trapnum ;
- sll v1, v2, 2 ;
- add v1, v1, v0 ; v0 has location of vector tab
-
- const v2, trapaddr ;
- consth v2, trapaddr ;
- store 0, 0, v2, v1 ;
- nop ;
- .endm
-
- .macro syscall, name
- const tav, HIF_@name ;
- asneq V_SYSCALL, gr1, gr1 ;
- nop ;
- nop ;
- .endm
-
-
-
-;* MACRO TO INSTALL VECTOR TABLE ENTRIES
-
- .macro Do_Install, V_Number, V_Address
- const lr4, V_Address
- consth lr4, V_Address
- const lr3, V_Number * 4
- consth lr3, V_Number * 4
- call lr0, V_Install
- nop
- .endm
-
- .macro Do_InstallX, V_Number, V_Address
- const lr4, V_Address
- consth lr4, V_Address
- const lr3, V_Number * 4
- consth lr3, V_Number * 4
- call lr0, V_InstallX
- nop
- .endm
-
-
-
-; push a register onto the stack
- .macro pushreg, reg, sp
- sub sp, sp, 4 ; adjust stack pointer
- store 0, 0, reg, sp ; push register
- .endm
-
- .macro push, sp, reg
- sub sp, sp, 4
- store 0, 0, reg, sp
- .endm
-
-; pop the register from stack
- .macro popreg, reg, sp
- load 0, 0, reg, sp ; pop register
- add sp, sp, 4 ; adjust stack pointer
- .endm
- .macro pop, reg, sp
- load 0, 0, reg, sp
- add sp, sp, 4
- .endm
-
-; push a special register onto stack
- .macro pushspcl, spcl, tmpreg, sp
- sub sp, sp, 4 ; adjust stack pointer
- mfsr tmpreg, spcl ; get spcl reg
- store 0, 0, tmpreg, sp ; push onto stack
- .endm
-
- .macro pushsr, sp, reg, sreg
- mfsr reg, sreg
- sub sp, sp, 4
- store 0, 0, reg, sp
- .endm
-
-; pop a special register from stack
- .macro popspcl, spcl, tmpreg, sp
- load 0, 0, tmpreg, sp ; pop from stack
- add sp, sp, 4 ; adjust stack pointer
- mtsr spcl, tmpreg ; set spcl reg
- .endm
-
- .macro popsr, sreg, reg, sp
- load 0, 0, reg, sp
- add sp, sp, 4
- mtsr sreg, reg
- .endm
-
-;
-; save freeze mode registers on memory stack.
-;
-
- .macro SaveFZState, tmp1, tmp2
-
- ; save freeze mode registers.
-
- pushspcl pc0, tmp1, msp
- pushspcl pc1, tmp1, msp
- pushspcl alu, tmp1, msp
-
- pushspcl cha, tmp1, msp
- pushspcl chd, tmp1, msp
- pushspcl chc, tmp1, msp
-
- pushspcl ops, tmp1, msp
-
- ; turn freeze off
-
- const tmp2, FZ
- mfsr tmp1, cps
- andn tmp1, tmp1, tmp2
- mtsr cps, tmp1
- .endm
-
-; restore freeze mode registers from memory stack.
-
- .macro RestoreFZState, tmp1, tmp2
-
- ; turn freeze on
-
- const tmp2, (FZ|DI|DA)
- mfsr tmp1, cps
- or tmp1, tmp1, tmp2
- mtsr cps, tmp1
-
- ; restore freeze mode registers.
-
- popspcl ops, tmp1, msp
- popspcl chc, tmp1, msp
- popspcl chd, tmp1, msp
- popspcl cha, tmp1, msp
- popspcl alu, tmp1, msp
- popspcl pc1, tmp1, msp
- popspcl pc0, tmp1, msp
- .endm
-
-;
-;*
-;
- .equ WS, 512 ; window size
- .equ RALLOC, 4 * 4 ; stack alloc for C
- .equ SIGCTX_UM_SIZE, 40 * 4 ;
- .equ SIGCTX_RFB, (38) * 4 ; user mode saved
- .equ SIGCTX_SM_SIZE, 12 * 4 ;
- .equ SIGCTX_SIG, (11)*4 + SIGCTX_UM_SIZE ;
- .equ SIGCTX_GR1, (10)*4 + SIGCTX_UM_SIZE ;
- .equ SIGCTX_RAB, (9)*4 + SIGCTX_UM_SIZE ;
- .equ SIGCTX_PC0, (8)*4 + SIGCTX_UM_SIZE ;
- .equ SIGCTX_PC1, (7)*4 + SIGCTX_UM_SIZE ;
- .equ SIGCTX_PC2, (6)*4 + SIGCTX_UM_SIZE ;
- .equ SIGCTX_CHC, (3)*4 + SIGCTX_UM_SIZE ;
- .equ SIGCTX_OPS, (1)*4 + SIGCTX_UM_SIZE ;
- .equ SIGCTX_TAV, (0)*4 + SIGCTX_UM_SIZE ;
-
- .macro sup_sv
- add it2, trapreg, 0 ; transfer signal #
- sub msp, msp, 4 ;
- store 0, 0, it2, msp ; save signal number
- sub msp, msp, 4 ; push gr1
-
- store 0, 0, gr1, msp ;
- sub msp, msp, 4 ; push rab
- store 0, 0, rab, msp ;
- const it0, WS ; Window size
-
- sub rab, rfb, it0 ; set rab = rfb-512
- pushsr msp, it0, PC0 ; save program counter0
- pushsr msp, it0, PC1 ; save program counter1
- pushsr msp, it0, PC2 ; save program counter2
-
- pushsr msp, it0, CHA ; save channel address
- pushsr msp, it0, CHD ; save channel data
- pushsr msp, it0, CHC ; save channel control
- pushsr msp, it0, ALU ; save alu
-
- pushsr msp, it0, OPS ; save ops
- sub msp, msp, 4 ;
- store 0, 0, tav, msp ; push tav
- mtsrim chc, 0 ; no loadm/storem
-
- mfsr it0, ops ; get ops value
- const it1, (TD | DI) ; disable interrupts
- consth it1, (TD | DI) ; disable interrupts
- or it0, it0, it1 ; set bits
-
- mtsr ops, it0 ; set new ops
- const it0, _sigcode ; signal handler
- consth it0, _sigcode ; signal handler
- mtsr pc1, it0 ; store pc1
-
- add it1, it0, 4 ; next addr
- mtsr pc0, it1 ; store pc1 location
- iret ; return
- nop ; ALIGN
- .endm
-
- .macro sig_return
- mfsr it0, cps ; get processor status
- const it1, FZ|DA ; Freeze + traps disable
- or it0, it0, it1 ; to set FZ+DA
- mtsr cps, it0 ; in freeze mode
-
- load 0, 0, tav, msp ; restore tav
- add msp, msp, 4 ;
-
- popsr OPS,it0, msp ;
- popsr ALU,it0, msp ;
- popsr CHC,it0, msp ;
- popsr CHD,it0, msp ;
-
- popsr CHA,it0, msp ;
- popsr PC2,it0, msp ;
- popsr PC1,it0, msp ;
- popsr PC0,it0, msp ;
-
- load 0, 0, rab, msp ;
- add msp, msp, 4 ;
- load 0, 0, it0, msp ;
- add gr1, it0, 0 ; pop rsp
-
- add msp, msp, 8 ; discount signal #
- iret
- .endm
-
- .macro repair_R_stack
- add v0, msp, SIGCTX_GR1 ; interrupted gr1
- load 0, 0, v2, v0 ;
- add v0, msp, SIGCTX_RFB ;
- load 0, 0, v3, v0 ; interupted rfb
-
- const v1, WS ;
- sub v1, v3, v1 ; rfb-512
- cpltu v0, v2, v1 ; test gr1 < rfb-512
- jmpf v0, $1 ;
-
- add gr1, rab, 0 ;
- add v2, v1, 0 ; set LB = rfb-512
-$1:
-;* if gr1 < rfb-512 yes LB = rfb-512 signalled during spill
-;* if no, LB=gr1 interrupted cache < 126 registers
- cpleu v0, v2, rfb ; test LB<=rfb
- jmpf v0, $2 ;
- nop ;
- add v2, rfb, 0 ;
-$2:
- cpeq v0, v3, rfb ; fill rfb->'rfb
- jmpt v0, $3 ; if rfb==rfb'
- const tav, (0x80<<2) ; prepare for fill
- or tav, tav, v2 ;
-
- mtsr IPA, tav ; IPA=LA<<2
- sub tav, v3, gr98 ; cache fill LA->rfb
- srl tav, tav, 2 ; convert to words
- sub tav, tav, 1 ;
-
- mtsr cr, tav ;
- loadm 0, 0, gr0, v2 ; fill from LA->rfb
-$3:
- add rfb, v3, 0 ; move rfb upto 'rfb
- sub rab, v1, 0 ; assign rab to rfb-512
-
- add v0, msp, SIGCTX_GR1 ;
- load 0, 0, v2, v0 ; v0 = interrupted gr1
- add gr1, v2, 0 ; move gr1 upto 'gr1
- nop ;
- .endm
-
- .macro repair_regs
- mtsrim cr, 29 - 1 ; to restore locals
- loadm 0, 0, v0, msp ;
- add msp, msp, 29*4 ;
- popsr Q, tav, msp ;
-
- popsr IPC, tav, msp ;
- popsr IPB, tav, msp ;
- popsr IPA, tav, msp ;
- pop FPStat3, msp ; floating point regs
-
- pop FPStat2, msp ; floating point regs
- pop FPStat1, msp ; floating point regs
- pop FPStat0, msp ; floating point regs
-
- add msp, msp, 3*4 ; R-stack repaired
- .endm
-
-;
-;*HIF related...
-;
-
-
-
-
-; send the message in bufaddr to Montip.
- .macro SendMessageToMontip, bufaddr
- const lr2, bufaddr
-$1:
- call lr0, _msg_send
- consth lr2, bufaddr
- cpeq gr96, gr96, 0
- jmpf gr96, $1
- const lr2, bufaddr
- .endm
-
-; build a HIF_CALL message in bufaddr to send to montip.
- .macro BuildHIFCALLMsg, bufaddr, tmp1, tmp2
- const tmp1, bufaddr
- consth tmp1, bufaddr
- const tmp2, HIF_CALL_MSGCODE
- store 0, 0, tmp2, tmp1 ; msg code
- add tmp1, tmp1, 4
- const tmp2, HIF_CALL_MSGLEN
- store 0, 0, tmp2, tmp1 ; msg len
- add tmp1, tmp1, 4
- store 0, 0, gr121, tmp1 ; service number
- add tmp1, tmp1, 4
- store 0, 0, lr2, tmp1 ; lr2
- add tmp1, tmp1, 4
- store 0, 0, lr3, tmp1 ; lr3
- add tmp1, tmp1, 4
- store 0, 0, lr4, tmp1 ; lr4
- .endm
-
-;
-;*
-;* All the funky AMD style macros go in here...simply for
-;* compatility
-;
-;
- .macro IMPORT, symbol
- .extern symbol
- .endm
-
- .macro GLOBAL, symbol
- .global symbol
- .endm
-
- .macro USESECT, name, type
- .sect name, type
- .use name
- .endm
-
- .macro SECTION, name, type
- .sect name, type
- .endm
-
- .macro FUNC, fname, lineno
- .global fname
-fname:
- .endm
-
- .macro ENDFUNC, fname, lineno
- .endm
-
-;*************************************LONG
- .macro LONG, varname
-varname:
- .block 4
- .endm
-
-;*************************************UNSIGNED LONG
- .macro ULONG, varname
-varname:
- .block 4
- .endm
-
-;*************************************SHORT
- .macro SHORT, varname
-varname:
- .block 2
- .endm
-
-;*************************************CHAR
- .macro CHAR, varname
-varname:
- .block 1
- .endm
-
-;*************************************LONGARRAY
- .macro LONGARRAY, name, count
-name:
- .block count*4
- .endm
-
-;*************************************SHORTARRAY
-
- .macro SHORTARRAY, name, count
-name:
- .block count*2
- .endm
-
-;*************************************CHARARRAY
-
- .macro CHARARRAY, name, count
-name:
- .block count
- .endm
-
-
-;*************************************VOID_FPTR
-
- .macro VOID_FPTR, name
-name:
- .block 4
- .endm
diff --git a/cpukit/score/cpu/a29k/register.ah b/cpukit/score/cpu/a29k/register.ah
deleted file mode 100644
index 35142b508f..0000000000
--- a/cpukit/score/cpu/a29k/register.ah
+++ /dev/null
@@ -1,214 +0,0 @@
-; /* @(#)register.ah 1.1 96/05/23 08:56:57, TEI */
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; naming of various registers
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; /* $Id$ */
-
-;* File information and includes.
-
- .file "register.ah"
- .ident "@(#)register.ah 1.1 96/05/23 08:56:57, TEI\n"
-
-;* Register Stack pointer and frame pointer registers.
-
- .extern Rrsp, Rfp
-
- .reg regsp, %%Rrsp
- .reg fp, %%Rfp
-
-
- .extern RTrapReg
- .extern Rtrapreg
-
- .reg TrapReg, %%RTrapReg
- .reg trapreg, %%Rtrapreg
-
-
-;* Operating system Interrupt handler registers (gr64-gr67)
-
- .extern ROSint0, ROSint1, ROSint2, ROSint3
-
- .reg OSint0, %%ROSint0
- .reg OSint1, %%ROSint1
- .reg OSint2, %%ROSint2
- .reg OSint3, %%ROSint3
-
- .reg it0, %%ROSint0
- .reg it1, %%ROSint1
- .reg it2, %%ROSint2
- .reg it3, %%ROSint3
-
-
-
-;* Operating system temporary (or scratch) registers (gr68-gr79)
-
- .extern ROStmp0, ROStmp1, ROStmp2, ROStmp3
- .extern ROStmp4, ROStmp5, ROStmp6, ROStmp7
- .extern ROStmp8, ROStmp9, ROStmp10, ROStmp11
-
- .reg OStmp0, %%ROStmp0
- .reg OStmp1, %%ROStmp1
- .reg OStmp2, %%ROStmp2
- .reg OStmp3, %%ROStmp3
-
- .reg OStmp4, %%ROStmp4
- .reg OStmp5, %%ROStmp5
- .reg OStmp6, %%ROStmp6
- .reg OStmp7, %%ROStmp7
-
- .reg OStmp8, %%ROStmp8
- .reg OStmp9, %%ROStmp9
- .reg OStmp10, %%ROStmp10
- .reg OStmp11, %%ROStmp11
-
-
- .reg kt0, %%ROStmp0
- .reg kt1, %%ROStmp1
- .reg kt2, %%ROStmp2
- .reg kt3, %%ROStmp3
-
- .reg kt4, %%ROStmp4
- .reg kt5, %%ROStmp5
- .reg kt6, %%ROStmp6
- .reg kt7, %%ROStmp7
-
- .reg kt8, %%ROStmp8
- .reg kt9, %%ROStmp9
- .reg kt10, %%ROStmp10
- .reg kt11, %%ROStmp11
-
-
- .reg TempReg0, %%ROSint0
- .reg TempReg1, %%ROSint1
- .reg TempReg2, %%ROSint2
- .reg TempReg3, %%ROSint3
-
- .reg TempReg4, %%ROStmp0
- .reg TempReg5, %%ROStmp1
- .reg TempReg6, %%ROStmp2
- .reg TempReg7, %%ROStmp3
-
- .reg TempReg8, %%ROStmp4
- .reg TempReg9, %%ROStmp5
- .reg TempReg10, %%ROStmp6
- .reg TempReg11, %%ROStmp7
-
- .reg TempReg12, %%ROStmp8
- .reg TempReg13, %%ROStmp9
- .reg TempReg14, %%ROStmp10
- .reg TempReg15, %%ROStmp11
-
-
-;* Assigned static registers
-
- .extern RSpillAddrReg, RFillAddrReg, RSignalAddrReg
- .extern Rpcb, Retc
- .extern RTimerExt, RTimerUtil, RLEDReg, RERRReg
- .extern Ret0, Ret1, Ret2, Ret3, Ret4, Ret5, Ret6, Ret7, Reta, Retb
- .extern Retx, Rety, Retz
-
-
- .reg SpillAddrReg, %%RSpillAddrReg
- .reg FillAddrReg, %%RFillAddrReg
- .reg SignalAddrReg, %%RSignalAddrReg
- .reg pcb, %%Rpcb
-
- .reg etx, %%Retx
- .reg ety, %%Rety
- .reg etz, %%Retz
- .reg eta, %%Reta
-
- .reg etb, %%Retb
- .reg etc, %%Retc
- .reg TimerExt, %%RTimerExt
- .reg TimerUtil, %%RTimerUtil
-
- .reg LEDReg, %%RLEDReg
- .reg ERRReg, %%RERRReg
-
-
- .reg et0, %%Ret0
- .reg et1, %%Ret1
- .reg et2, %%Ret2
- .reg et3, %%Ret3
-
- .reg et4, %%Ret4
- .reg et5, %%Ret5
- .reg et6, %%Ret6
- .reg et7, %%Ret7
-
-;
- .equ SCB1REG_NUM, 88
- .reg SCB1REG_PTR, %%Ret0
-
-; The floating point trap handlers need a few static registers
-
- .extern RFPStat0, RFPStat1, RFPStat2, RFPStat3
- .extern Rheapptr, RHeapPtr, RArgvPtr
-
- .reg FPStat0, %%RFPStat0
- .reg FPStat1, %%RFPStat1
- .reg FPStat2, %%RFPStat2
- .reg FPStat3, %%RFPStat3
-
- .reg heapptr, %%Rheapptr
- .reg HeapPtr, %%RHeapPtr
- .reg ArgvPtr, %%RArgvPtr
-
- .extern RXLINXReg, RVMBCReg, RUARTReg, RETHERReg
-
- .reg XLINXReg, %%RXLINXReg
- .reg VMBCReg, %%RVMBCReg
- .reg UARTReg, %%RUARTReg
- .reg ETHERReg, %%RXLINXReg
-
-;* Compiler and programmer registers. (gr96-gr127)
-
- .extern Rv0, Rv1, Rv2, Rv3, Rv4, Rv5, Rv6, Rv7, Rv8, Rv9
- .extern Rv10, Rv11, Rv12, Rv13, Rv14, Rv15
-
- .reg v0, %%Rv0
- .reg v1, %%Rv1
- .reg v2, %%Rv2
- .reg v3, %%Rv3
-
- .reg v4, %%Rv4
- .reg v5, %%Rv5
- .reg v6, %%Rv6
- .reg v7, %%Rv7
-
- .reg v8, %%Rv8
- .reg v9, %%Rv9
- .reg v10, %%Rv10
- .reg v11, %%Rv11
-
- .reg v12, %%Rv12
- .reg v13, %%Rv13
- .reg v14, %%Rv14
- .reg v15, %%Rv15
-
- .extern Rtv0, Rtv1, Rtv2, Rtv3, Rtv4
-
- .reg tv0, %%Rtv0
- .reg tv1, %%Rtv1
- .reg tv2, %%Rtv2
- .reg tv3, %%Rtv3
- .reg tv4, %%Rtv4
-
-; ****************************************************************************
-; For uatrap
-; register definitions -- since this trap handler must allow for
-; nested traps and interrupts such as TLB miss, protection violation,
-; or Data Access Exception, and these trap handlers use the shared
-; Temp registers, we must maintain our own that are safe over user-
-; mode loads and stores. The following must be assigned global
-; registers which are not used in INTR[0-3], TRAP[0-1], TLB miss,
-; TLB protection violation, or data exception trap handlers.
-
-; .reg cha_cpy, OStmp4 ; copy of CHA
-; .reg chd_cpy, OStmp5 ; copy of CHD
-; .reg chc_cpy, OStmp6 ; copy of CHC
-; .reg LTemp0, OStmp7 ; local temp 0
-; .reg LTemp1, OStmp8 ; local temp 1
-
-; ****************************************************************************
diff --git a/cpukit/score/cpu/a29k/rtems/score/a29k.h b/cpukit/score/cpu/a29k/rtems/score/a29k.h
deleted file mode 100644
index 7dd9030609..0000000000
--- a/cpukit/score/cpu/a29k/rtems/score/a29k.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* a29k.h
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- *
- */
-/* @(#)a29k.h 10/21/96 1.3 */
-
-#ifndef _INCLUDE_A29K_h
-#define _INCLUDE_A29K_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This file contains the information required to build
- * RTEMS for a particular member of the "no cpu"
- * family when executing in protected mode. It does
- * this by setting variables to indicate which implementation
- * dependent features are present in a particular member
- * of the family.
- */
-
-#if defined(a29205)
-
-#define CPU_MODEL_NAME "a29205"
-#define A29K_HAS_FPU 0
-
-#else
-
-#error "Unsupported CPU Model"
-
-#endif
-
-/*
- * Define the name of the CPU family.
- */
-
-#define CPU_NAME "AMD 29K"
-
-/*
- * Some bits in the CPS:
- */
-#define TD 0x20000
-#define DI 0x00002
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* ! _INCLUDE_A29K_h */
-/* end of include file */
diff --git a/cpukit/score/cpu/a29k/rtems/score/cpu.h b/cpukit/score/cpu/a29k/rtems/score/cpu.h
deleted file mode 100644
index c65c628979..0000000000
--- a/cpukit/score/cpu/a29k/rtems/score/cpu.h
+++ /dev/null
@@ -1,992 +0,0 @@
-/* cpu.h
- *
- * This include file contains information pertaining to the AMD 29K
- * processor.
- *
- * Author: Craig Lebakken <craigl@transition.com>
- *
- * COPYRIGHT (c) 1996 by Transition Networks Inc.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Transition Networks not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * Transition Networks makes no representations about the suitability
- * of this software for any purpose.
- *
- * Derived from c/src/exec/score/cpu/no_cpu/cpu_asm.c:
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-/* @(#)cpu.h 10/21/96 1.11 */
-
-#ifndef __CPU_h
-#define __CPU_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/a29k.h> /* pick up machine definitions */
-#ifndef ASM
-#include <rtems/score/a29ktypes.h>
-#endif
-
-extern unsigned int a29k_disable( void );
-extern void a29k_enable( unsigned int cookie );
-extern unsigned int a29k_getops( void );
-extern void a29k_getops_sup( void );
-extern void a29k_disable_sup( void );
-extern void a29k_enable_sup( void );
-extern void a29k_disable_all( void );
-extern void a29k_disable_all_sup( void );
-extern void a29k_enable_all( void );
-extern void a29k_enable_all_sup( void );
-extern void a29k_halt( void );
-extern void a29k_fatal_error( unsigned32 error );
-extern void a29k_as70( void );
-extern void a29k_super_mode( void );
-extern void a29k_context_switch_sup(void);
-extern void a29k_context_restore_sup(void);
-extern void a29k_context_save_sup(void);
-extern void a29k_sigdfl_sup(void);
-
-/* conditional compilation parameters */
-
-/*
- * Should the calls to _Thread_Enable_dispatch be inlined?
- *
- * If TRUE, then they are inlined.
- * If FALSE, then a subroutine call is made.
- *
- * Basically this is an example of the classic trade-off of size
- * versus speed. Inlining the call (TRUE) typically increases the
- * size of RTEMS while speeding up the enabling of dispatching.
- * [NOTE: In general, the _Thread_Dispatch_disable_level will
- * only be 0 or 1 unless you are in an interrupt handler and that
- * interrupt handler invokes the executive.] When not inlined
- * something calls _Thread_Enable_dispatch which in turns calls
- * _Thread_Dispatch. If the enable dispatch is inlined, then
- * one subroutine call is avoided entirely.]
- */
-
-#define CPU_INLINE_ENABLE_DISPATCH TRUE
-
-/*
- * Should the body of the search loops in _Thread_queue_Enqueue_priority
- * be unrolled one time? In unrolled each iteration of the loop examines
- * two "nodes" on the chain being searched. Otherwise, only one node
- * is examined per iteration.
- *
- * If TRUE, then the loops are unrolled.
- * If FALSE, then the loops are not unrolled.
- *
- * The primary factor in making this decision is the cost of disabling
- * and enabling interrupts (_ISR_Flash) versus the cost of rest of the
- * body of the loop. On some CPUs, the flash is more expensive than
- * one iteration of the loop body. In this case, it might be desirable
- * to unroll the loop. It is important to note that on some CPUs, this
- * code is the longest interrupt disable period in RTEMS. So it is
- * necessary to strike a balance when setting this parameter.
- */
-
-#define CPU_UNROLL_ENQUEUE_PRIORITY TRUE
-
-/*
- * Does RTEMS manage a dedicated interrupt stack in software?
- *
- * If TRUE, then a stack is allocated in _Interrupt_Manager_initialization.
- * If FALSE, nothing is done.
- *
- * If the CPU supports a dedicated interrupt stack in hardware,
- * then it is generally the responsibility of the BSP to allocate it
- * and set it up.
- *
- * If the CPU does not support a dedicated interrupt stack, then
- * the porter has two options: (1) execute interrupts on the
- * stack of the interrupted task, and (2) have RTEMS manage a dedicated
- * interrupt stack.
- *
- * If this is TRUE, CPU_ALLOCATE_INTERRUPT_STACK should also be TRUE.
- *
- * Only one of CPU_HAS_SOFTWARE_INTERRUPT_STACK and
- * CPU_HAS_HARDWARE_INTERRUPT_STACK should be set to TRUE. It is
- * possible that both are FALSE for a particular CPU. Although it
- * is unclear what that would imply about the interrupt processing
- * procedure on that CPU.
- */
-
-#define CPU_HAS_SOFTWARE_INTERRUPT_STACK FALSE
-
-/*
- * Does this CPU have hardware support for a dedicated interrupt stack?
- *
- * If TRUE, then it must be installed during initialization.
- * If FALSE, then no installation is performed.
- *
- * If this is TRUE, CPU_ALLOCATE_INTERRUPT_STACK should also be TRUE.
- *
- * Only one of CPU_HAS_SOFTWARE_INTERRUPT_STACK and
- * CPU_HAS_HARDWARE_INTERRUPT_STACK should be set to TRUE. It is
- * possible that both are FALSE for a particular CPU. Although it
- * is unclear what that would imply about the interrupt processing
- * procedure on that CPU.
- */
-
-#define CPU_HAS_HARDWARE_INTERRUPT_STACK FALSE
-
-/*
- * Does RTEMS allocate a dedicated interrupt stack in the Interrupt Manager?
- *
- * If TRUE, then the memory is allocated during initialization.
- * If FALSE, then the memory is allocated during initialization.
- *
- * This should be TRUE is CPU_HAS_SOFTWARE_INTERRUPT_STACK is TRUE
- * or CPU_INSTALL_HARDWARE_INTERRUPT_STACK is TRUE.
- */
-
-#define CPU_ALLOCATE_INTERRUPT_STACK FALSE
-
-/*
- * Does the RTEMS invoke the user's ISR with the vector number and
- * a pointer to the saved interrupt frame (1) or just the vector
- * number (0)?
- */
-
-#define CPU_ISR_PASSES_FRAME_POINTER 0
-
-/*
- * Does the CPU have hardware floating point?
- *
- * If TRUE, then the RTEMS_FLOATING_POINT task attribute is supported.
- * If FALSE, then the RTEMS_FLOATING_POINT task attribute is ignored.
- *
- * If there is a FP coprocessor such as the i387 or mc68881, then
- * the answer is TRUE.
- *
- * The macro name "NO_CPU_HAS_FPU" should be made CPU specific.
- * It indicates whether or not this CPU model has FP support. For
- * example, it would be possible to have an i386_nofp CPU model
- * which set this to false to indicate that you have an i386 without
- * an i387 and wish to leave floating point support out of RTEMS.
- */
-
-#if ( A29K_HAS_FPU == 1 )
-#define CPU_HARDWARE_FP TRUE
-#else
-#define CPU_HARDWARE_FP FALSE
-#endif
-
-/*
- * Are all tasks RTEMS_FLOATING_POINT tasks implicitly?
- *
- * If TRUE, then the RTEMS_FLOATING_POINT task attribute is assumed.
- * If FALSE, then the RTEMS_FLOATING_POINT task attribute is followed.
- *
- * So far, the only CPU in which this option has been used is the
- * HP PA-RISC. The HP C compiler and gcc both implicitly use the
- * floating point registers to perform integer multiplies. If
- * a function which you would not think utilize the FP unit DOES,
- * then one can not easily predict which tasks will use the FP hardware.
- * In this case, this option should be TRUE.
- *
- * If CPU_HARDWARE_FP is FALSE, then this should be FALSE as well.
- */
-
-#define CPU_ALL_TASKS_ARE_FP FALSE
-
-/*
- * Should the IDLE task have a floating point context?
- *
- * If TRUE, then the IDLE task is created as a RTEMS_FLOATING_POINT task
- * and it has a floating point context which is switched in and out.
- * If FALSE, then the IDLE task does not have a floating point context.
- *
- * Setting this to TRUE negatively impacts the time required to preempt
- * the IDLE task from an interrupt because the floating point context
- * must be saved as part of the preemption.
- */
-
-#define CPU_IDLE_TASK_IS_FP FALSE
-
-/*
- * Should the saving of the floating point registers be deferred
- * until a context switch is made to another different floating point
- * task?
- *
- * If TRUE, then the floating point context will not be stored until
- * necessary. It will remain in the floating point registers and not
- * disturned until another floating point task is switched to.
- *
- * If FALSE, then the floating point context is saved when a floating
- * point task is switched out and restored when the next floating point
- * task is restored. The state of the floating point registers between
- * those two operations is not specified.
- *
- * If the floating point context does NOT have to be saved as part of
- * interrupt dispatching, then it should be safe to set this to TRUE.
- *
- * Setting this flag to TRUE results in using a different algorithm
- * for deciding when to save and restore the floating point context.
- * The deferred FP switch algorithm minimizes the number of times
- * the FP context is saved and restored. The FP context is not saved
- * until a context switch is made to another, different FP task.
- * Thus in a system with only one FP task, the FP context will never
- * be saved or restored.
- */
-
-#define CPU_USE_DEFERRED_FP_SWITCH TRUE
-
-/*
- * Does this port provide a CPU dependent IDLE task implementation?
- *
- * If TRUE, then the routine _CPU_Internal_threads_Idle_thread_body
- * must be provided and is the default IDLE thread body instead of
- * _Internal_threads_Idle_thread_body.
- *
- * If FALSE, then use the generic IDLE thread body if the BSP does
- * not provide one.
- *
- * This is intended to allow for supporting processors which have
- * a low power or idle mode. When the IDLE thread is executed, then
- * the CPU can be powered down.
- *
- * The order of precedence for selecting the IDLE thread body is:
- *
- * 1. BSP provided
- * 2. CPU dependent (if provided)
- * 3. generic (if no BSP and no CPU dependent)
- */
-
-#define CPU_PROVIDES_IDLE_THREAD_BODY TRUE
-
-/*
- * Does the stack grow up (toward higher addresses) or down
- * (toward lower addresses)?
- *
- * If TRUE, then the grows upward.
- * If FALSE, then the grows toward smaller addresses.
- */
-
-#define CPU_STACK_GROWS_UP FALSE
-
-/*
- * The following is the variable attribute used to force alignment
- * of critical RTEMS structures. On some processors it may make
- * sense to have these aligned on tighter boundaries than
- * the minimum requirements of the compiler in order to have as
- * much of the critical data area as possible in a cache line.
- *
- * The placement of this macro in the declaration of the variables
- * is based on the syntactically requirements of the GNU C
- * "__attribute__" extension. For example with GNU C, use
- * the following to force a structures to a 32 byte boundary.
- *
- * __attribute__ ((aligned (32)))
- *
- * NOTE: Currently only the Priority Bit Map table uses this feature.
- * To benefit from using this, the data must be heavily
- * used so it will stay in the cache and used frequently enough
- * in the executive to justify turning this on.
- */
-
-#define CPU_STRUCTURE_ALIGNMENT
-
-/*
- * Define what is required to specify how the network to host conversion
- * routines are handled.
- *
- */
-
-#error "Check these definitions!!!"
-
-#define CPU_HAS_OWN_HOST_TO_NETWORK_ROUTINES FALSE
-#define CPU_BIG_ENDIAN TRUE
-#define CPU_LITTLE_ENDIAN FALSE
-
-/*
- * The following defines the number of bits actually used in the
- * interrupt field of the task mode. How those bits map to the
- * CPU interrupt levels is defined by the routine _CPU_ISR_Set_level().
- */
-
-#define CPU_MODES_INTERRUPT_MASK 0x00000001
-
-/*
- * Processor defined structures
- *
- * Examples structures include the descriptor tables from the i386
- * and the processor control structure on the i960ca.
- */
-
-/* may need to put some structures here. */
-
-/*
- * Contexts
- *
- * Generally there are 2 types of context to save.
- * 1. Interrupt registers to save
- * 2. Task level registers to save
- *
- * This means we have the following 3 context items:
- * 1. task level context stuff:: Context_Control
- * 2. floating point task stuff:: Context_Control_fp
- * 3. special interrupt level context :: Context_Control_interrupt
- *
- * On some processors, it is cost-effective to save only the callee
- * preserved registers during a task context switch. This means
- * that the ISR code needs to save those registers which do not
- * persist across function calls. It is not mandatory to make this
- * distinctions between the caller/callee saves registers for the
- * purpose of minimizing context saved during task switch and on interrupts.
- * If the cost of saving extra registers is minimal, simplicity is the
- * choice. Save the same context on interrupt entry as for tasks in
- * this case.
- *
- * Additionally, if gdb is to be made aware of RTEMS tasks for this CPU, then
- * care should be used in designing the context area.
- *
- * On some CPUs with hardware floating point support, the Context_Control_fp
- * structure will not be used or it simply consist of an array of a
- * fixed number of bytes. This is done when the floating point context
- * is dumped by a "FP save context" type instruction and the format
- * is not really defined by the CPU. In this case, there is no need
- * to figure out the exact format -- only the size. Of course, although
- * this is enough information for RTEMS, it is probably not enough for
- * a debugger such as gdb. But that is another problem.
- */
-
-typedef struct {
- unsigned32 signal;
- unsigned32 gr1;
- unsigned32 rab;
- unsigned32 PC0;
- unsigned32 PC1;
- unsigned32 PC2;
- unsigned32 CHA;
- unsigned32 CHD;
- unsigned32 CHC;
- unsigned32 ALU;
- unsigned32 OPS;
- unsigned32 tav;
- unsigned32 lr1;
- unsigned32 rfb;
- unsigned32 msp;
-
- unsigned32 FPStat0;
- unsigned32 FPStat1;
- unsigned32 FPStat2;
- unsigned32 IPA;
- unsigned32 IPB;
- unsigned32 IPC;
- unsigned32 Q;
-
- unsigned32 gr96;
- unsigned32 gr97;
- unsigned32 gr98;
- unsigned32 gr99;
- unsigned32 gr100;
- unsigned32 gr101;
- unsigned32 gr102;
- unsigned32 gr103;
- unsigned32 gr104;
- unsigned32 gr105;
- unsigned32 gr106;
- unsigned32 gr107;
- unsigned32 gr108;
- unsigned32 gr109;
- unsigned32 gr110;
- unsigned32 gr111;
-
- unsigned32 gr112;
- unsigned32 gr113;
- unsigned32 gr114;
- unsigned32 gr115;
-
- unsigned32 gr116;
- unsigned32 gr117;
- unsigned32 gr118;
- unsigned32 gr119;
- unsigned32 gr120;
- unsigned32 gr121;
- unsigned32 gr122;
- unsigned32 gr123;
- unsigned32 gr124;
-
- unsigned32 local_count;
-
- unsigned32 locals[128];
-} Context_Control;
-
-typedef struct {
- double some_float_register;
-} Context_Control_fp;
-
-typedef struct {
- unsigned32 special_interrupt_register;
-} CPU_Interrupt_frame;
-
-
-/*
- * The following table contains the information required to configure
- * the XXX processor specific parameters.
- *
- * NOTE: The interrupt_stack_size field is required if
- * CPU_ALLOCATE_INTERRUPT_STACK is defined as TRUE.
- *
- * The pretasking_hook, predriver_hook, and postdriver_hook,
- * and the do_zero_of_workspace fields are required on ALL CPUs.
- */
-
-typedef struct {
- void (*pretasking_hook)( void );
- void (*predriver_hook)( void );
- void (*postdriver_hook)( void );
- void (*idle_task)( void );
- boolean do_zero_of_workspace;
- unsigned32 idle_task_stack_size;
- unsigned32 interrupt_stack_size;
- unsigned32 extra_system_initialization_stack;
-} rtems_cpu_table;
-
-/*
- * Macros to access required entires in the CPU Table are in
- * the file rtems/system.h.
- */
-
-/*
- * Macros to access AMD A29K specific additions to the CPU Table
- */
-
-/* There are no CPU specific additions to the CPU Table for this port. */
-
-/*
- * This variable is optional. It is used on CPUs on which it is difficult
- * to generate an "uninitialized" FP context. It is filled in by
- * _CPU_Initialize and copied into the task's FP context area during
- * _CPU_Context_Initialize.
- */
-
-EXTERN Context_Control_fp _CPU_Null_fp_context;
-
-/*
- * On some CPUs, RTEMS supports a software managed interrupt stack.
- * This stack is allocated by the Interrupt Manager and the switch
- * is performed in _ISR_Handler. These variables contain pointers
- * to the lowest and highest addresses in the chunk of memory allocated
- * for the interrupt stack. Since it is unknown whether the stack
- * grows up or down (in general), this give the CPU dependent
- * code the option of picking the version it wants to use.
- *
- * NOTE: These two variables are required if the macro
- * CPU_HAS_SOFTWARE_INTERRUPT_STACK is defined as TRUE.
- */
-
-EXTERN void *_CPU_Interrupt_stack_low;
-EXTERN void *_CPU_Interrupt_stack_high;
-
-/*
- * With some compilation systems, it is difficult if not impossible to
- * call a high-level language routine from assembly language. This
- * is especially true of commercial Ada compilers and name mangling
- * C++ ones. This variable can be optionally defined by the CPU porter
- * and contains the address of the routine _Thread_Dispatch. This
- * can make it easier to invoke that routine at the end of the interrupt
- * sequence (if a dispatch is necessary).
- */
-
-EXTERN void (*_CPU_Thread_dispatch_pointer)();
-
-/*
- * Nothing prevents the porter from declaring more CPU specific variables.
- */
-
-/* XXX: if needed, put more variables here */
-
-/*
- * The size of the floating point context area. On some CPUs this
- * will not be a "sizeof" because the format of the floating point
- * area is not defined -- only the size is. This is usually on
- * CPUs with a "floating point save context" instruction.
- */
-
-#define CPU_CONTEXT_FP_SIZE sizeof( Context_Control_fp )
-
-/*
- * Amount of extra stack (above minimum stack size) required by
- * system initialization thread. Remember that in a multiprocessor
- * system the system intialization thread becomes the MP server thread.
- */
-
-#define CPU_SYSTEM_INITIALIZATION_THREAD_EXTRA_STACK 0
-
-/*
- * This defines the number of entries in the ISR_Vector_table managed
- * by RTEMS.
- */
-
-#define CPU_INTERRUPT_NUMBER_OF_VECTORS 256
-#define CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER (CPU_INTERRUPT_NUMBER_OF_VECTORS - 1)
-
-/*
- * Should be large enough to run all RTEMS tests. This insures
- * that a "reasonable" small application should not have any problems.
- */
-
-#define CPU_STACK_MINIMUM_SIZE (8192)
-
-/*
- * CPU's worst alignment requirement for data types on a byte boundary. This
- * alignment does not take into account the requirements for the stack.
- */
-
-#define CPU_ALIGNMENT 4
-
-/*
- * This number corresponds to the byte alignment requirement for the
- * heap handler. This alignment requirement may be stricter than that
- * for the data types alignment specified by CPU_ALIGNMENT. It is
- * common for the heap to follow the same alignment requirement as
- * CPU_ALIGNMENT. If the CPU_ALIGNMENT is strict enough for the heap,
- * then this should be set to CPU_ALIGNMENT.
- *
- * NOTE: This does not have to be a power of 2. It does have to
- * be greater or equal to than CPU_ALIGNMENT.
- */
-
-#define CPU_HEAP_ALIGNMENT CPU_ALIGNMENT
-
-/*
- * This number corresponds to the byte alignment requirement for memory
- * buffers allocated by the partition manager. This alignment requirement
- * may be stricter than that for the data types alignment specified by
- * CPU_ALIGNMENT. It is common for the partition to follow the same
- * alignment requirement as CPU_ALIGNMENT. If the CPU_ALIGNMENT is strict
- * enough for the partition, then this should be set to CPU_ALIGNMENT.
- *
- * NOTE: This does not have to be a power of 2. It does have to
- * be greater or equal to than CPU_ALIGNMENT.
- */
-
-#define CPU_PARTITION_ALIGNMENT CPU_ALIGNMENT
-
-/*
- * This number corresponds to the byte alignment requirement for the
- * stack. This alignment requirement may be stricter than that for the
- * data types alignment specified by CPU_ALIGNMENT. If the CPU_ALIGNMENT
- * is strict enough for the stack, then this should be set to 0.
- *
- * NOTE: This must be a power of 2 either 0 or greater than CPU_ALIGNMENT.
- */
-
-#define CPU_STACK_ALIGNMENT 0
-
-/* ISR handler macros */
-
-/*
- * Disable all interrupts for an RTEMS critical section. The previous
- * level is returned in _level.
- */
-
-#define _CPU_ISR_Disable( _isr_cookie ) \
- do{ _isr_cookie = a29k_disable(); }while(0)
-
-/*
- * Enable interrupts to the previous level (returned by _CPU_ISR_Disable).
- * This indicates the end of an RTEMS critical section. The parameter
- * _level is not modified.
- */
-
-#define _CPU_ISR_Enable( _isr_cookie ) \
- do{ a29k_enable(_isr_cookie) ; }while(0)
-
-/*
- * This temporarily restores the interrupt to _level before immediately
- * disabling them again. This is used to divide long RTEMS critical
- * sections into two or more parts. The parameter _level is not
- * modified.
- */
-
-#define _CPU_ISR_Flash( _isr_cookie ) \
- do{ \
- _CPU_ISR_Enable( _isr_cookie ); \
- _CPU_ISR_Disable( _isr_cookie ); \
- }while(0)
-
-/*
- * Map interrupt level in task mode onto the hardware that the CPU
- * actually provides. Currently, interrupt levels which do not
- * map onto the CPU in a generic fashion are undefined. Someday,
- * it would be nice if these were "mapped" by the application
- * via a callout. For example, m68k has 8 levels 0 - 7, levels
- * 8 - 255 would be available for bsp/application specific meaning.
- * This could be used to manage a programmable interrupt controller
- * via the rtems_task_mode directive.
- */
-
-#define _CPU_ISR_Set_level( new_level ) \
- do{ \
- if ( new_level ) a29k_disable_all(); \
- else a29k_enable_all(); \
- }while(0);
-
-/* end of ISR handler macros */
-
-/* Context handler macros */
-
-extern void _CPU_Context_save(
- Context_Control *new_context
-);
-
-/*
- * Initialize the context to a state suitable for starting a
- * task after a context restore operation. Generally, this
- * involves:
- *
- * - setting a starting address
- * - preparing the stack
- * - preparing the stack and frame pointers
- * - setting the proper interrupt level in the context
- * - initializing the floating point context
- *
- * This routine generally does not set any unnecessary register
- * in the context. The state of the "general data" registers is
- * undefined at task start time.
- *
- * NOTE: This is_fp parameter is TRUE if the thread is to be a floating
- * point thread. This is typically only used on CPUs where the
- * FPU may be easily disabled by software such as on the SPARC
- * where the PSR contains an enable FPU bit.
- */
-
-#define _CPU_Context_Initialize( _the_context, _stack_base, _size, \
- _isr, _entry_point, _is_fp ) \
- do{ /* allocate 1/4 of stack for memory stack, 3/4 of stack for register stack */ \
- unsigned32 _mem_stack_tmp = (unsigned32)(_stack_base) + (_size); \
- unsigned32 _reg_stack_tmp = (unsigned32)(_stack_base) + (((_size)*3)/4); \
- _mem_stack_tmp &= ~(CPU_ALIGNMENT-1); \
- _reg_stack_tmp &= ~(CPU_ALIGNMENT-1); \
- _CPU_Context_save(_the_context); \
- (_the_context)->msp = _mem_stack_tmp; /* gr125 */ \
- (_the_context)->lr1 = \
- (_the_context)->locals[1] = \
- (_the_context)->rfb = _reg_stack_tmp; /* gr127 */ \
- (_the_context)->gr1 = _reg_stack_tmp - 4 * 4; \
- (_the_context)->rab = _reg_stack_tmp - 128 * 4; /* gr126 */ \
- (_the_context)->local_count = 1-1; \
- (_the_context)->PC1 = _entry_point; \
- (_the_context)->PC0 = (unsigned32)((char *)_entry_point + 4); \
- if (_isr) { (_the_context)->OPS |= (TD | DI); } \
- else \
- { (_the_context)->OPS &= ~(TD | DI); } \
- }while(0)
-
-/*
- * This routine is responsible for somehow restarting the currently
- * executing task. If you are lucky, then all that is necessary
- * is restoring the context. Otherwise, there will need to be
- * a special assembly routine which does something special in this
- * case. Context_Restore should work most of the time. It will
- * not work if restarting self conflicts with the stack frame
- * assumptions of restoring a context.
- */
-
-#define _CPU_Context_Restart_self( _the_context ) \
- _CPU_Context_restore( (_the_context) )
-
-/*
- * The purpose of this macro is to allow the initial pointer into
- * a floating point context area (used to save the floating point
- * context) to be at an arbitrary place in the floating point
- * context area.
- *
- * This is necessary because some FP units are designed to have
- * their context saved as a stack which grows into lower addresses.
- * Other FP units can be saved by simply moving registers into offsets
- * from the base of the context area. Finally some FP units provide
- * a "dump context" instruction which could fill in from high to low
- * or low to high based on the whim of the CPU designers.
- */
-
-#define _CPU_Context_Fp_start( _base, _offset ) \
- ( (char *) (_base) + (_offset) )
-
-/*
- * This routine initializes the FP context area passed to it to.
- * There are a few standard ways in which to initialize the
- * floating point context. The code included for this macro assumes
- * that this is a CPU in which a "initial" FP context was saved into
- * _CPU_Null_fp_context and it simply copies it to the destination
- * context passed to it.
- *
- * Other models include (1) not doing anything, and (2) putting
- * a "null FP status word" in the correct place in the FP context.
- */
-
-#define _CPU_Context_Initialize_fp( _destination ) \
- do { \
- *((Context_Control_fp *) *((void **) _destination)) = _CPU_Null_fp_context; \
- } while(0)
-
-/* end of Context handler macros */
-
-/* Fatal Error manager macros */
-
-/*
- * This routine copies _error into a known place -- typically a stack
- * location or a register, optionally disables interrupts, and
- * halts/stops the CPU.
- */
-
-#define _CPU_Fatal_halt( _error ) \
- a29k_fatal_error(_error)
-
-/* end of Fatal Error manager macros */
-
-/* Bitfield handler macros */
-
-/*
- * This routine sets _output to the bit number of the first bit
- * set in _value. _value is of CPU dependent type Priority_Bit_map_control.
- * This type may be either 16 or 32 bits wide although only the 16
- * least significant bits will be used.
- *
- * There are a number of variables in using a "find first bit" type
- * instruction.
- *
- * (1) What happens when run on a value of zero?
- * (2) Bits may be numbered from MSB to LSB or vice-versa.
- * (3) The numbering may be zero or one based.
- * (4) The "find first bit" instruction may search from MSB or LSB.
- *
- * RTEMS guarantees that (1) will never happen so it is not a concern.
- * (2),(3), (4) are handled by the macros _CPU_Priority_mask() and
- * _CPU_Priority_bits_index(). These three form a set of routines
- * which must logically operate together. Bits in the _value are
- * set and cleared based on masks built by _CPU_Priority_mask().
- * The basic major and minor values calculated by _Priority_Major()
- * and _Priority_Minor() are "massaged" by _CPU_Priority_bits_index()
- * to properly range between the values returned by the "find first bit"
- * instruction. This makes it possible for _Priority_Get_highest() to
- * calculate the major and directly index into the minor table.
- * This mapping is necessary to ensure that 0 (a high priority major/minor)
- * is the first bit found.
- *
- * This entire "find first bit" and mapping process depends heavily
- * on the manner in which a priority is broken into a major and minor
- * components with the major being the 4 MSB of a priority and minor
- * the 4 LSB. Thus (0 << 4) + 0 corresponds to priority 0 -- the highest
- * priority. And (15 << 4) + 14 corresponds to priority 254 -- the next
- * to the lowest priority.
- *
- * If your CPU does not have a "find first bit" instruction, then
- * there are ways to make do without it. Here are a handful of ways
- * to implement this in software:
- *
- * - a series of 16 bit test instructions
- * - a "binary search using if's"
- * - _number = 0
- * if _value > 0x00ff
- * _value >>=8
- * _number = 8;
- *
- * if _value > 0x0000f
- * _value >=8
- * _number += 4
- *
- * _number += bit_set_table[ _value ]
- *
- * where bit_set_table[ 16 ] has values which indicate the first
- * bit set
- */
-
-#define CPU_USE_GENERIC_BITFIELD_CODE TRUE
-#define CPU_USE_GENERIC_BITFIELD_DATA TRUE
-
-#if (CPU_USE_GENERIC_BITFIELD_CODE == FALSE)
-
-#define _CPU_Bitfield_Find_first_bit( _value, _output ) \
- { \
- (_output) = 0; /* do something to prevent warnings */ \
- }
-
-#endif
-
-/* end of Bitfield handler macros */
-
-/*
- * This routine builds the mask which corresponds to the bit fields
- * as searched by _CPU_Bitfield_Find_first_bit(). See the discussion
- * for that routine.
- */
-
-#if (CPU_USE_GENERIC_BITFIELD_CODE == FALSE)
-
-#define _CPU_Priority_Mask( _bit_number ) \
- ( 1 << (_bit_number) )
-
-#endif
-
-/*
- * This routine translates the bit numbers returned by
- * _CPU_Bitfield_Find_first_bit() into something suitable for use as
- * a major or minor component of a priority. See the discussion
- * for that routine.
- */
-
-#if (CPU_USE_GENERIC_BITFIELD_CODE == FALSE)
-
-#define _CPU_Priority_bits_index( _priority ) \
- (_priority)
-
-#endif
-
-/* end of Priority handler macros */
-
-/* functions */
-
-/*
- * _CPU_Initialize
- *
- * This routine performs CPU dependent initialization.
- */
-
-void _CPU_Initialize(
- rtems_cpu_table *cpu_table,
- void (*thread_dispatch)()
-);
-
-/*
- * _CPU_ISR_install_raw_handler
- *
- * This routine installs a "raw" interrupt handler directly into the
- * processor's vector table.
- */
-
-void _CPU_ISR_install_raw_handler(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-);
-
-/*
- * _CPU_ISR_install_vector
- *
- * This routine installs an interrupt vector.
- */
-
-void _CPU_ISR_install_vector(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-);
-
-/*
- * _CPU_Install_interrupt_stack
- *
- * This routine installs the hardware interrupt stack pointer.
- *
- * NOTE: It need only be provided if CPU_HAS_HARDWARE_INTERRUPT_STACK
- * is TRUE.
- */
-
-void _CPU_Install_interrupt_stack( void );
-
-/*
- * _CPU_Internal_threads_Idle_thread_body
- *
- * This routine is the CPU dependent IDLE thread body.
- *
- * NOTE: It need only be provided if CPU_PROVIDES_IDLE_THREAD_BODY
- * is TRUE.
- */
-
-void _CPU_Internal_threads_Idle_thread_body( void );
-
-/*
- * _CPU_Context_switch
- *
- * This routine switches from the run context to the heir context.
- */
-
-void _CPU_Context_switch(
- Context_Control *run,
- Context_Control *heir
-);
-
-/*
- * _CPU_Context_restore
- *
- * This routine is generally used only to restart self in an
- * efficient manner. It may simply be a label in _CPU_Context_switch.
- *
- * NOTE: May be unnecessary to reload some registers.
- */
-
-void _CPU_Context_restore(
- Context_Control *new_context
-);
-
-/*
- * _CPU_Context_save_fp
- *
- * This routine saves the floating point context passed to it.
- */
-
-void _CPU_Context_save_fp(
- void **fp_context_ptr
-);
-
-/*
- * _CPU_Context_restore_fp
- *
- * This routine restores the floating point context passed to it.
- */
-
-void _CPU_Context_restore_fp(
- void **fp_context_ptr
-);
-
-/* The following routine swaps the endian format of an unsigned int.
- * It must be static because it is referenced indirectly.
- *
- * This version will work on any processor, but if there is a better
- * way for your CPU PLEASE use it. The most common way to do this is to:
- *
- * swap least significant two bytes with 16-bit rotate
- * swap upper and lower 16-bits
- * swap most significant two bytes with 16-bit rotate
- *
- * Some CPUs have special instructions which swap a 32-bit quantity in
- * a single instruction (e.g. i486). It is probably best to avoid
- * an "endian swapping control bit" in the CPU. One good reason is
- * that interrupts would probably have to be disabled to insure that
- * an interrupt does not try to access the same "chunk" with the wrong
- * endian. Another good reason is that on some CPUs, the endian bit
- * endianness for ALL fetches -- both code and data -- so the code
- * will be fetched incorrectly.
- */
-
-#define CPU_swap_u32( value ) \
- ((value&0xff) << 24) | (((value >> 8)&0xff) << 16) | \
- (((value >> 16)&0xff) << 8) | ((value>>24)&0xff)
-
-#define CPU_swap_u16( value ) \
- (((value&0xff) << 8) | ((value >> 8)&0xff))
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/cpukit/score/cpu/a29k/rtems/score/cpu_asm.h b/cpukit/score/cpu/a29k/rtems/score/cpu_asm.h
deleted file mode 100644
index d2c09fa103..0000000000
--- a/cpukit/score/cpu/a29k/rtems/score/cpu_asm.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * cpu_asm.h
- *
- * Very loose template for an include file for the cpu_asm.? file
- * if it is implemented as a ".S" file (preprocessed by cpp) instead
- * of a ".s" file (preprocessed by gm4 or gasp).
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- *
- */
-/* @(#)cpu_asm.h 06/08/96 1.2 */
-
-#ifndef __CPU_ASM_h
-#define __CPU_ASM_h
-
-/* pull in the generated offsets */
-
-/* #include <rtems/score/offsets.h> */
-
-/*
- * Hardware General Registers
- */
-
-/* put something here */
-
-/*
- * Hardware Floating Point Registers
- */
-
-/* put something here */
-
-/*
- * Hardware Control Registers
- */
-
-/* put something here */
-
-/*
- * Calling Convention
- */
-
-/* put something here */
-
-/*
- * Temporary registers
- */
-
-/* put something here */
-
-/*
- * Floating Point Registers - SW Conventions
- */
-
-/* put something here */
-
-/*
- * Temporary floating point registers
- */
-
-/* put something here */
-
-#endif
-
-/* end of file */
diff --git a/cpukit/score/cpu/a29k/rtems/score/types.h b/cpukit/score/cpu/a29k/rtems/score/types.h
deleted file mode 100644
index 130fd30dd4..0000000000
--- a/cpukit/score/cpu/a29k/rtems/score/types.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* no_cputypes.h
- *
- * This include file contains type definitions pertaining to the Intel
- * no_cpu processor family.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __NO_CPU_TYPES_h
-#define __NO_CPU_TYPES_h
-
-#ifndef ASM
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This section defines the basic types for this processor.
- */
-
-typedef unsigned char unsigned8; /* unsigned 8-bit integer */
-typedef unsigned short unsigned16; /* unsigned 16-bit integer */
-typedef unsigned int unsigned32; /* unsigned 32-bit integer */
-typedef unsigned long unsigned64; /* unsigned 64-bit integer */
-
-typedef unsigned16 Priority_Bit_map_control;
-
-typedef signed char signed8; /* 8-bit signed integer */
-typedef signed short signed16; /* 16-bit signed integer */
-typedef signed int signed32; /* 32-bit signed integer */
-typedef signed long signed64; /* 64 bit signed integer */
-
-typedef unsigned32 boolean; /* Boolean value */
-
-typedef float single_precision; /* single precision float */
-typedef double double_precision; /* double precision float */
-
-typedef void no_cpu_isr;
-typedef void ( *no_cpu_isr_entry )( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !ASM */
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/cpu/a29k/sig.S b/cpukit/score/cpu/a29k/sig.S
deleted file mode 100644
index 245570ffcb..0000000000
--- a/cpukit/score/cpu/a29k/sig.S
+++ /dev/null
@@ -1,197 +0,0 @@
-;/*
-; * $Id$
-; */
-
-; .include "register.ah"
- .include "amd.ah"
- .include "pswmacro.ah"
- .comm WindowSize,4
- .text
- .reg it0,gr64
- .reg it1,gr65
- .reg it2,gr66
- .reg it3,gr67
- .reg v0,gr96
- .reg v1,gr97
- .reg v2,gr98
- .reg v3,gr99
- .reg trapreg,it0
- .reg FPStat0,gr79
- .reg FPStat1,gr79
- .reg FPStat2,gr79
- .reg FPStat3,gr79
-
- .global _intr14
-_intr14:
- const it3,14
- sup_sv
- jmp interrupt
- nop
-
- .global _intr18
-_intr18:
- const it3,18
- sup_sv
- jmp interrupt
- nop
-
- .global _intr19
-_intr19:
- const it3,19
- sup_sv
- jmp interrupt
- nop
-
-interrupt:
- push msp,it3
- push msp,gr1
- push msp,rab
- const it0,512
- sub rab,rfb,it0 ;set rab = rfb-512
- pushsr msp,it0,pc0
- pushsr msp,it0,pc1
- pushsr msp,it0,pc2
- pushsr msp,it0,cha
- pushsr msp,it0,chd
- pushsr msp,it0,chc
- pushsr msp,it0,alu
- pushsr msp,it0,ops
- push msp,tav
-;
-;now come off freeze, and go to user-mode code.
-;ensure load/store does not restart
-;
- mtsrim chc,0
-
- mfsr it0, cps
- const it1, FZ
- consth it1, FZ
- andn it0, it0, it1
- const it1,(DI|TD)
- consth it1,(DI|TD)
- or it0,it1,it0
- mtsr cps, it0
-; fall through to _sigcode
-
- .extern _a29k_ISR_Handler
- .global _sigcode
-_sigcode:
-
- push msp, lr1 ; R stack support
- push msp, rfb ; support
- push msp, msp ; M stack support
-
-; push msp, FPStat0 ; Floating point 0
-; push msp, FPStat1 ; Floating point 1
-; push msp, FPStat2 ; Floating point 2
-; push msp, FPStat3 ; Floating point 3
- sub msp,msp,4*4
-
- pushsr msp, tav, IPA ; save user mode special
- pushsr msp, tav, IPB ; save user mode special
- pushsr msp, tav, IPC ; save user mode special
- pushsr msp, tav, Q ; save user mode special
-
- sub msp, msp, 29*4 ; gr96-gr124
- mtsrim cr, 29-1 ;
- storem 0, 0, gr96, msp ;
-
-
- const v0, WindowSize ; Window Size value
- consth v0, WindowSize ; Window Size value
- load 0, 0, v0, v0 ; load Window size
- add v2, msp, SIGCTX_RAB ; intr RAB value
-
- load 0, 0, v2, v2 ; rab value
-
- sub v1, rfb, v2 ;
- cpgeu v1, v1, v0 ;
- jmpt v1, nfill ; jmp if spill
- add v1, gr1, 8 ;
-
- cpgtu v1, v1, rfb ; longjump test
- jmpt v1, nfill ;
- nop ;
-
-ifill:
- add v0, msp, SIGCTX_RAB+4 ;
- push v0, rab ;
- const v2, fill+4 ;
- consth v2, fill+4 ;
-
- push v0, v2 ; resave PC0
- sub v2, v2, 4 ;
- push v0, v2 ; resave PC1
- const v2, 0 ;
-
- sub v0, v0, 3*4 ;
- push v0, v2 ;
-
-nfill:
- cpgtu v0, gr1, rfb ; if gr1>rfb -> gr1=rfb
- jmpt v0, lower ;
- cpltu v0, gr1, rab ;
- jmpt v0, raise ; gr1<rab then gr1=rab
- nop ;
-
-sendsig:
- sub gr1, gr1, RALLOC ;
- asgeu V_SPILL, gr1, rab ;
- add lr1, rfb, 0 ;
- add v1, msp, SIGCTX_SIG ;
-
-cont:
- add lr2,it3,0 ; signal #
- call lr0, _a29k_ISR_Handler ; call the handler
- nop
-
- nop ; WASTE
- jmp _a29k_sigdfl ; return code
- nop ; WASTE
- nop ; ALIGN
-
-lower:
- jmp sendsig ;
- add gr1, rfb, 0 ;
-raise:
- jmp sendsig ;
- add gr1, rab, 0 ;
-
-
- .global _a29k_sigdfl_sup
-_a29k_sigdfl_sup:
- repair_R_stack ;
- repair_regs ;
- sig_return ; return
- halt ; never executes
-
-
- .global _sigret
-_sigret:
-;assume msp points to tav
- mfsr it0,cps
- const it1,FZ
- or it1,it0,it1
- mtsr cps,it1
- nop
- nop
-_sigret1:
- pop tav,msp
- popsr ops,it0,msp
- popsr alu,it0,msp
- popsr chc,it0,msp
- popsr chd,it0,msp
- popsr cha,it0,msp
- popsr pc2,it0,msp
- popsr pc1,it0,msp
- popsr pc0,it0,msp
- pop rab,msp
- pop it0,msp
- add gr1,it0,0
- add msp,msp,4 ;discount signal
- iret
-
-_a29k_sigdfl:
- asneq SIGDFL,gr1,gr1
- jmpi lr0
- nop
diff --git a/cpukit/score/cpu/hppa1.1/Makefile.am b/cpukit/score/cpu/hppa1.1/Makefile.am
deleted file mode 100644
index 882f9ca597..0000000000
--- a/cpukit/score/cpu/hppa1.1/Makefile.am
+++ /dev/null
@@ -1,46 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-
-SUBDIRS = rtems
-
-C_FILES = cpu.c
-C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
-
-S_FILES = cpu_asm.S
-S_O_FILES = $(S_FILES:%.S=$(ARCH)/%.o)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../../../../automake/lib.am
-
-$(PROJECT_INCLUDE):
- $(mkinstalldirs) $@
-
-$(PROJECT_INCLUDE)/%.h: %.h
- $(INSTALL_DATA) $< $@
-
-$(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o: $(ARCH)/rtems.o
- $(INSTALL_DATA) $< $@
-
-REL = $(ARCH)/rtems-cpu.rel
-
-rtems_cpu_rel_OBJECTS = $(C_O_FILES) $(S_O_FILES)
-
-$(REL): $(rtems_cpu_rel_OBJECTS)
- $(make-rel)
-
-PREINSTALL_FILES += $(PROJECT_INCLUDE) $(H_FILES:%=$(PROJECT_INCLUDE)/%)
-
-TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o
-
-all-local: $(ARCH) $(PREINSTALL_FILES) $(rtems_cpu_rel_OBJECTS) $(REL) $(TMPINSTALL_FILES)
-
-.PRECIOUS: $(REL)
-
-EXTRA_DIST = cpu.c cpu_asm.S rtems.S
-
-include $(top_srcdir)/../../../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/cpukit/score/cpu/hppa1.1/cpu.c b/cpukit/score/cpu/hppa1.1/cpu.c
deleted file mode 100644
index 282e0e53b6..0000000000
--- a/cpukit/score/cpu/hppa1.1/cpu.c
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- * HP PA-RISC Dependent Source
- *
- * COPYRIGHT (c) 1994 by Division Incorporated
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-void hppa_cpu_halt(unsigned32 the_error);
-
-
-/*PAGE
- *
- * _CPU_ISR_install_raw_handler
- */
-
-void _CPU_ISR_install_raw_handler(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-)
-{
- /*
- * This is unsupported. For HPPA this function is handled by BSP
- */
-
- _CPU_Fatal_halt( 0xdeaddead );
-}
-
-
-
-/*
- * This is the default handler which is called if
- * _CPU_ISR_install_vector() has not been called for the
- * specified vector. It simply forwards onto the spurious
- * handler defined in the cpu-table.
- */
-
-static ISR_Handler
-hppa_interrupt_report_spurious(ISR_Vector_number vector,
- void* rtems_isr_frame) /* HPPA extension */
-{
-
- /*
- * If the CPU table defines a spurious_handler, then
- * call it. If the handler returns halt.
- */
- if ( _CPU_Table.spurious_handler )
- _CPU_Table.spurious_handler(vector, rtems_isr_frame);
-
- hppa_cpu_halt(vector);
-}
-
-
-/*PAGE
- *
- * _CPU_ISR_Get_level
- */
-
-unsigned32 _CPU_ISR_Get_level(void)
-{
- int level;
- HPPA_ASM_SSM(0, level); /* change no bits; just get copy */
- if (level & HPPA_PSW_I)
- return 0;
- return 1;
-}
-
-/*PAGE
- *
- * _CPU_ISR_install_vector
- *
- * This kernel routine installs the RTEMS handler for the
- * specified vector. The handler is a C callable routine.
- *
- * Input parameters:
- * vector - interrupt vector number
- * old_handler - former ISR for this vector number
- * new_handler - replacement ISR for this vector number
- *
- * Output parameters: NONE
- *
- */
-
-void _CPU_ISR_install_vector(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-)
-{
- *old_handler = _ISR_Vector_table[vector];
-
- _ISR_Vector_table[vector] = new_handler;
-}
-
-/* _CPU_Initialize
- *
- * This routine performs processor dependent initialization.
- *
- * INPUT PARAMETERS:
- * cpu_table - CPU table to initialize
- * thread_dispatch - address of disptaching routine
- *
- */
-
-void _CPU_Initialize(
- rtems_cpu_table *cpu_table,
- void (*thread_dispatch) /* ignored on this CPU */
-)
-{
- register unsigned8 *fp_context;
- unsigned32 i;
- proc_ptr old_handler;
-
- /*
- * This is the default fp context for all tasks
- * Set it up so that denormalized results go to zero.
- */
-
- fp_context = (unsigned8*) &_CPU_Null_fp_context;
- for (i=0 ; i<sizeof(Context_Control_fp); i++)
- *fp_context++ = 0;
- *((unsigned32 *) &_CPU_Null_fp_context) = HPPA_FPSTATUS_D;
-
- /*
- * Save r27 into _CPU_Default_gr27 so it will hopefully be the correct
- * global data pointer for the entire system.
- */
-
- asm volatile( "stw %%r27,%0" : "=m" (_CPU_Default_gr27): );
-
- /*
- * Init the 2nd level interrupt handlers
- */
-
- for (i=0; i < CPU_INTERRUPT_NUMBER_OF_VECTORS; i++)
- _CPU_ISR_install_vector(i,
- hppa_interrupt_report_spurious,
- &old_handler);
-
- _CPU_Table = *cpu_table;
-
-}
-
-
-/*
- * Halt the system.
- * Called by the _CPU_Fatal_halt macro
- *
- * XXX
- * Later on, this will allow us to return to the prom.
- * For now, we just ignore 'type_of_halt'
- *
- * XXX
- * NOTE: for gcc, this function must be at the bottom
- * of the file, that is because if it is at the top
- * of the file, gcc will inline it's calls. Since
- * the function uses the HPPA_ASM_LABEL() macro, when
- * gcc inlines it, you get two definitions of the same
- * label name, which is an assembly error.
- */
-
-
-void
-hppa_cpu_halt(unsigned32 the_error)
-{
- unsigned32 isrlevel;
-
- _CPU_ISR_Disable(isrlevel);
-
- /*
- * XXXXX NOTE: This label is only needed that that when
- * the simulator stops, it shows the label name specified
- */
- HPPA_ASM_LABEL("_hppa_cpu_halt");
- HPPA_ASM_BREAK(0, 0);
-}
-
diff --git a/cpukit/score/cpu/hppa1.1/cpu_asm.S b/cpukit/score/cpu/hppa1.1/cpu_asm.S
deleted file mode 100644
index e6d9fd08d8..0000000000
--- a/cpukit/score/cpu/hppa1.1/cpu_asm.S
+++ /dev/null
@@ -1,778 +0,0 @@
-/*
- * TODO:
- * Context_switch needs to only save callee save registers
- * I think this means can skip: r1, r2, r19-29, r31
- * Ref: p 3-2 of Procedure Calling Conventions Manual
- * This should be #ifndef DEBUG so that debugger has
- * accurate visibility into all registers
- *
- * This file contains the assembly code for the HPPA implementation
- * of RTEMS.
- *
- * COPYRIGHT (c) 1994,95 by Division Incorporated
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/score/hppa.h>
-#include <rtems/score/cpu_asm.h>
-#include <rtems/score/cpu.h>
-#include <rtems/score/offsets.h>
-
- .SPACE $PRIVATE$
- .SUBSPA $DATA$,QUAD=1,ALIGN=8,ACCESS=31
- .SUBSPA $BSS$,QUAD=1,ALIGN=8,ACCESS=31,ZERO,SORT=82
- .SPACE $TEXT$
- .SUBSPA $LIT$,QUAD=0,ALIGN=8,ACCESS=44
- .SUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY
- .SPACE $TEXT$
- .SUBSPA $CODE$
-
-/*
- * Special register usage for context switch and interrupts
- * Stay away from %cr28 which is used for TLB misses on 72000
- */
-
-isr_arg0 .reg %cr24
-isr_r9 .reg %cr25
-isr_r8 .reg %cr26
-
-/*
- * Interrupt stack frame looks like this
- *
- * offset item
- * -----------------------------------------------------------------
- * INTEGER_CONTEXT_OFFSET Context_Control
- * FP_CONTEXT_OFFSET Context_Control_fp
- *
- * It is padded out to a multiple of 64
- */
-
-
-/*PAGE^L
- * void _Generic_ISR_Handler()
- *
- * This routine provides the RTEMS interrupt management.
- *
- * We jump here from the interrupt vector.
- * The HPPA hardware has done some stuff for us:
- * PSW saved in IPSW
- * PSW set to 0
- * PSW[E] set to default (0)
- * PSW[M] set to 1 iff this is HPMC
- *
- * IIA queue is frozen (since PSW[Q] is now 0)
- * privilege level promoted to 0
- * IIR, ISR, IOR potentially updated if PSW[Q] was 1 at trap
- * registers GR 1,8,9,16,17,24,25 copied to shadow regs
- * SHR 0 1 2 3 4 5 6
- *
- * Our vector stub (in the BSP) MUST have done the following:
- *
- * a) Saved the original %r9 into %isr_r9 (%cr25)
- * b) Placed the vector number in %r9
- * c) Was allowed to also destroy $isr_r8 (%cr26),
- * but the stub was NOT allowed to destroy any other registers.
- *
- * The typical stub sequence (in the BSP) should look like this:
- *
- * a) mtctl %r9,isr_r9 ; (save r9 in cr25)
- * b) ldi vector,%r9 ; (load constant vector number in r9)
- * c) mtctl %r8,isr_r8 ; (save r8 in cr26)
- * d) ldil L%MY_BSP_first_level_interrupt_handler,%r8
- * e) ldo R%MY_BSP_first_level_interrupt_handler(%r8),%r8
- * ; (point to BSP raw handler table)
- * f) ldwx,s %r9(%r8),%r8 ; (load value from raw handler table)
- * g) bv 0(%r8) ; (call raw handler: _Generic_ISR_Handler)
- * h) mfctl isr_r8,%r8 ; (restore r8 from cr26 in delay slot)
- *
- * Optionally, steps (c) thru (h) _could_ be replaced with a single
- * bl,n _Generic_ISR_Handler,%r0
- *
- *
- */
- .EXPORT _Generic_ISR_Handler,ENTRY,PRIV_LEV=0
-_Generic_ISR_Handler:
- .PROC
- .CALLINFO FRAME=0,NO_CALLS
- .ENTRY
-
- mtctl arg0, isr_arg0
-
-/*
- * save interrupt state
- */
- mfctl ipsw, arg0
- stw arg0, IPSW_OFFSET(sp)
-
- mfctl iir, arg0
- stw arg0, IIR_OFFSET(sp)
-
- mfctl ior, arg0
- stw arg0, IOR_OFFSET(sp)
-
- mfctl pcoq, arg0
- stw arg0, PCOQFRONT_OFFSET(sp)
-
- mtctl %r0, pcoq
- mfctl pcoq, arg0
- stw arg0, PCOQBACK_OFFSET(sp)
-
- mfctl %sar, arg0
- stw arg0, SAR_OFFSET(sp)
-
-/*
- * Build an interrupt frame to hold the contexts we will need.
- * We have already saved the interrupt items on the stack
- *
- * At this point the following registers are damaged wrt the interrupt
- * reg current value saved value
- * ------------------------------------------------
- * arg0 scratch isr_arg0 (cr24)
- * r9 vector number isr_r9 (cr25)
- *
- * Point to beginning of integer context and
- * save the integer context
- */
- stw %r1,R1_OFFSET(sp)
- stw %r2,R2_OFFSET(sp)
- stw %r3,R3_OFFSET(sp)
- stw %r4,R4_OFFSET(sp)
- stw %r5,R5_OFFSET(sp)
- stw %r6,R6_OFFSET(sp)
- stw %r7,R7_OFFSET(sp)
- stw %r8,R8_OFFSET(sp)
-/*
- * skip r9
- */
- stw %r10,R10_OFFSET(sp)
- stw %r11,R11_OFFSET(sp)
- stw %r12,R12_OFFSET(sp)
- stw %r13,R13_OFFSET(sp)
- stw %r14,R14_OFFSET(sp)
- stw %r15,R15_OFFSET(sp)
- stw %r16,R16_OFFSET(sp)
- stw %r17,R17_OFFSET(sp)
- stw %r18,R18_OFFSET(sp)
- stw %r19,R19_OFFSET(sp)
- stw %r20,R20_OFFSET(sp)
- stw %r21,R21_OFFSET(sp)
- stw %r22,R22_OFFSET(sp)
- stw %r23,R23_OFFSET(sp)
- stw %r24,R24_OFFSET(sp)
- stw %r25,R25_OFFSET(sp)
-/*
- * skip arg0
- */
- stw %r27,R27_OFFSET(sp)
- stw %r28,R28_OFFSET(sp)
- stw %r29,R29_OFFSET(sp)
- stw %r30,R30_OFFSET(sp)
- stw %r31,R31_OFFSET(sp)
-
-/* Now most registers are available since they have been saved
- *
- * The following items are currently wrong in the integer context
- * reg current value saved value
- * ------------------------------------------------
- * arg0 scratch isr_arg0 (cr24)
- * r9 vector number isr_r9 (cr25)
- *
- * Fix them
- */
-
- mfctl isr_arg0,%r3
- stw %r3,ARG0_OFFSET(sp)
-
- mfctl isr_r9,%r3
- stw %r3,R9_OFFSET(sp)
-
-/*
- * At this point we are done with isr_arg0, and isr_r9 control registers
- *
- * Prepare to re-enter virtual mode
- * We need Q in case the interrupt handler enables interrupts
- */
-
- ldil L%CPU_PSW_DEFAULT, arg0
- ldo R%CPU_PSW_DEFAULT(arg0), arg0
- mtctl arg0, ipsw
-
-/*
- * Now jump to "rest_of_isr_handler" with the rfi
- * We are assuming the space queues are all correct already
- */
-
- ldil L%rest_of_isr_handler, arg0
- ldo R%rest_of_isr_handler(arg0), arg0
- mtctl arg0, pcoq
- ldo 4(arg0), arg0
- mtctl arg0, pcoq
-
- rfi
- nop
-
-/*
- * At this point we are back in virtual mode and all our
- * normal addressing is once again ok.
- *
- * It is now ok to take an exception or trap
- */
-
-rest_of_isr_handler:
-
-/*
- * Point to beginning of float context and
- * save the floating point context -- doing whatever patches are necessary
- */
-
- .call ARGW0=GR
- bl _CPU_Save_float_context,%r2
- ldo FP_CONTEXT_OFFSET(sp),arg0
-
-/*
- * save the ptr to interrupt frame as an argument for the interrupt handler
- */
-
- copy sp, arg1
-
-/*
- * Advance the frame to point beyond all interrupt contexts (integer & float)
- * this also includes the pad to align to 64byte stack boundary
- */
- ldo CPU_INTERRUPT_FRAME_SIZE(sp), sp
-
-/*
- * r3 -- &_ISR_Nest_level
- * r5 -- value _ISR_Nest_level
- * r4 -- &_Thread_Dispatch_disable_level
- * r6 -- value _Thread_Dispatch_disable_level
- * r9 -- vector number
- */
-
- .import _ISR_Nest_level,data
- ldil L%_ISR_Nest_level,%r3
- ldo R%_ISR_Nest_level(%r3),%r3
- ldw 0(%r3),%r5
-
- .import _Thread_Dispatch_disable_level,data
- ldil L%_Thread_Dispatch_disable_level,%r4
- ldo R%_Thread_Dispatch_disable_level(%r4),%r4
- ldw 0(%r4),%r6
-
-/*
- * increment interrupt nest level counter. If outermost interrupt
- * switch the stack and squirrel away the previous sp.
- */
- addi 1,%r5,%r5
- stw %r5, 0(%r3)
-
-/*
- * compute and save new stack (with frame)
- * just in case we are nested -- simpler this way
- */
- comibf,= 1,%r5,stack_done
- ldo 128(sp),%r7
-
-/*
- * Switch to interrupt stack allocated by the interrupt manager (intr.c)
- */
- .import _CPU_Interrupt_stack_low,data
- ldil L%_CPU_Interrupt_stack_low,%r7
- ldw R%_CPU_Interrupt_stack_low(%r7),%r7
- ldo 128(%r7),%r7
-
-stack_done:
-/*
- * save our current stack pointer where the "old sp" is supposed to be
- */
- stw sp, -4(%r7)
-/*
- * and switch stacks (or advance old stack in nested case)
- */
- copy %r7, sp
-
-/*
- * increment the dispatch disable level counter.
- */
- addi 1,%r6,%r6
- stw %r6, 0(%r4)
-
-/*
- * load address of user handler
- * Note: No error checking is done, it is assumed that the
- * vector table contains a valid address or a stub
- * spurious handler.
- */
- .import _ISR_Vector_table,data
- ldil L%_ISR_Vector_table,%r8
- ldo R%_ISR_Vector_table(%r8),%r8
- ldwx,s %r9(%r8),%r8
-
-/*
- * invoke user interrupt handler
- * Interrupts are currently disabled, as per RTEMS convention
- * The handler has the option of re-enabling interrupts
- * NOTE: can not use 'bl' since it uses "pc-relative" addressing
- * and we are using a hard coded address from a table
- * So... we fudge r2 ourselves (ala dynacall)
- * arg0 = vector number, arg1 = ptr to rtems_interrupt_frame
- */
- copy %r9, %r26
- .call ARGW0=GR, ARGW1=GR
- blr %r0, rp
- bv,n 0(%r8)
-
-post_user_interrupt_handler:
-
-/*
- * Back from user handler(s)
- * Disable external interrupts (since the interrupt handler could
- * have turned them on) and return to the interrupted task stack (assuming
- * (_ISR_Nest_level == 0)
- */
-
- rsm HPPA_PSW_I + HPPA_PSW_R, %r0
- ldw -4(sp), sp
-
-/*
- * r3 -- (most of) &_ISR_Nest_level
- * r5 -- value _ISR_Nest_level
- * r4 -- (most of) &_Thread_Dispatch_disable_level
- * r6 -- value _Thread_Dispatch_disable_level
- * r7 -- (most of) &_ISR_Signals_to_thread_executing
- * r8 -- value _ISR_Signals_to_thread_executing
- */
-
- .import _ISR_Nest_level,data
- ldil L%_ISR_Nest_level,%r3
- ldw R%_ISR_Nest_level(%r3),%r5
-
- .import _Thread_Dispatch_disable_level,data
- ldil L%_Thread_Dispatch_disable_level,%r4
- ldw R%_Thread_Dispatch_disable_level(%r4),%r6
-
- .import _ISR_Signals_to_thread_executing,data
- ldil L%_ISR_Signals_to_thread_executing,%r7
-
-/*
- * decrement isr nest level
- */
- addi -1, %r5, %r5
- stw %r5, R%_ISR_Nest_level(%r3)
-
-/*
- * decrement dispatch disable level counter and, if not 0, go on
- */
- addi -1,%r6,%r6
- comibf,= 0,%r6,isr_restore
- stw %r6, R%_Thread_Dispatch_disable_level(%r4)
-
-/*
- * check whether or not a context switch is necessary
- */
- .import _Context_Switch_necessary,data
- ldil L%_Context_Switch_necessary,%r8
- ldw R%_Context_Switch_necessary(%r8),%r8
- comibf,=,n 0,%r8,ISR_dispatch
-
-/*
- * check whether or not a context switch is necessary because an ISR
- * sent signals to the interrupted task
- */
- ldw R%_ISR_Signals_to_thread_executing(%r7),%r8
- comibt,=,n 0,%r8,isr_restore
-
-
-/*
- * OK, something happened while in ISR and we need to switch to a task
- * other than the one which was interrupted or the
- * ISR_Signals_to_thread_executing case
- * We also turn on interrupts, since the interrupted task had them
- * on (obviously :-) and Thread_Dispatch is happy to leave ints on.
- */
-
-ISR_dispatch:
- stw %r0, R%_ISR_Signals_to_thread_executing(%r7)
-
- ssm HPPA_PSW_I, %r0
-
- .import _Thread_Dispatch,code
- .call
- bl _Thread_Dispatch,%r2
- ldo 128(sp),sp
-
- ldo -128(sp),sp
-
-isr_restore:
-
-/*
- * enable interrupts during most of restore
- */
- ssm HPPA_PSW_I, %r0
-
-/*
- * Get a pointer to beginning of our stack frame
- */
- ldo -CPU_INTERRUPT_FRAME_SIZE(sp), %arg1
-
-/*
- * restore float
- */
- .call ARGW0=GR
- bl _CPU_Restore_float_context,%r2
- ldo FP_CONTEXT_OFFSET(%arg1), arg0
-
- copy %arg1, %arg0
-
-/*
- * ********** FALL THRU **********
- */
-
-/*
- * Jump here from bottom of Context_Switch
- * Also called directly by _CPU_Context_Restart_self via _Thread_Restart_self
- * restore interrupt state
- */
-
- .EXPORT _CPU_Context_restore
-_CPU_Context_restore:
-
-/*
- * restore integer state
- */
- ldw R1_OFFSET(arg0),%r1
- ldw R2_OFFSET(arg0),%r2
- ldw R3_OFFSET(arg0),%r3
- ldw R4_OFFSET(arg0),%r4
- ldw R5_OFFSET(arg0),%r5
- ldw R6_OFFSET(arg0),%r6
- ldw R7_OFFSET(arg0),%r7
- ldw R8_OFFSET(arg0),%r8
- ldw R9_OFFSET(arg0),%r9
- ldw R10_OFFSET(arg0),%r10
- ldw R11_OFFSET(arg0),%r11
- ldw R12_OFFSET(arg0),%r12
- ldw R13_OFFSET(arg0),%r13
- ldw R14_OFFSET(arg0),%r14
- ldw R15_OFFSET(arg0),%r15
- ldw R16_OFFSET(arg0),%r16
- ldw R17_OFFSET(arg0),%r17
- ldw R18_OFFSET(arg0),%r18
- ldw R19_OFFSET(arg0),%r19
- ldw R20_OFFSET(arg0),%r20
- ldw R21_OFFSET(arg0),%r21
- ldw R22_OFFSET(arg0),%r22
- ldw R23_OFFSET(arg0),%r23
- ldw R24_OFFSET(arg0),%r24
-/*
- * skipping r25; used as scratch register below
- * skipping r26 (arg0) until we are done with it
- */
- ldw R27_OFFSET(arg0),%r27
- ldw R28_OFFSET(arg0),%r28
- ldw R29_OFFSET(arg0),%r29
-/*
- * skipping r30 (sp) until we turn off interrupts
- */
- ldw R31_OFFSET(arg0),%r31
-
-/*
- * Turn off Q & R & I so we can write r30 and interrupt control registers
- */
- rsm HPPA_PSW_Q + HPPA_PSW_R + HPPA_PSW_I, %r0
-
-/*
- * now safe to restore r30
- */
- ldw R30_OFFSET(arg0),%r30
-
- ldw IPSW_OFFSET(arg0), %r25
- mtctl %r25, ipsw
-
- ldw SAR_OFFSET(arg0), %r25
- mtctl %r25, sar
-
- ldw PCOQFRONT_OFFSET(arg0), %r25
- mtctl %r25, pcoq
-
- ldw PCOQBACK_OFFSET(arg0), %r25
- mtctl %r25, pcoq
-
-/*
- * Load r25 with interrupts off
- */
- ldw R25_OFFSET(arg0),%r25
-/*
- * Must load r26 (arg0) last
- */
- ldw R26_OFFSET(arg0),%r26
-
-isr_exit:
- rfi
- .EXIT
- .PROCEND
-
-/*
- * This section is used to context switch floating point registers.
- * Ref: 6-35 of Architecture 1.1
- *
- * NOTE: since integer multiply uses the floating point unit,
- * we have to save/restore fp on every trap. We cannot
- * just try to keep track of fp usage.
- */
-
- .align 32
- .EXPORT _CPU_Save_float_context,ENTRY,PRIV_LEV=0
-_CPU_Save_float_context:
- .PROC
- .CALLINFO FRAME=0,NO_CALLS
- .ENTRY
- fstds,ma %fr0,8(%arg0)
- fstds,ma %fr1,8(%arg0)
- fstds,ma %fr2,8(%arg0)
- fstds,ma %fr3,8(%arg0)
- fstds,ma %fr4,8(%arg0)
- fstds,ma %fr5,8(%arg0)
- fstds,ma %fr6,8(%arg0)
- fstds,ma %fr7,8(%arg0)
- fstds,ma %fr8,8(%arg0)
- fstds,ma %fr9,8(%arg0)
- fstds,ma %fr10,8(%arg0)
- fstds,ma %fr11,8(%arg0)
- fstds,ma %fr12,8(%arg0)
- fstds,ma %fr13,8(%arg0)
- fstds,ma %fr14,8(%arg0)
- fstds,ma %fr15,8(%arg0)
- fstds,ma %fr16,8(%arg0)
- fstds,ma %fr17,8(%arg0)
- fstds,ma %fr18,8(%arg0)
- fstds,ma %fr19,8(%arg0)
- fstds,ma %fr20,8(%arg0)
- fstds,ma %fr21,8(%arg0)
- fstds,ma %fr22,8(%arg0)
- fstds,ma %fr23,8(%arg0)
- fstds,ma %fr24,8(%arg0)
- fstds,ma %fr25,8(%arg0)
- fstds,ma %fr26,8(%arg0)
- fstds,ma %fr27,8(%arg0)
- fstds,ma %fr28,8(%arg0)
- fstds,ma %fr29,8(%arg0)
- fstds,ma %fr30,8(%arg0)
- fstds %fr31,0(%arg0)
- bv 0(%r2)
- addi -(31*8), %arg0, %arg0 ; restore arg0 just for fun
- .EXIT
- .PROCEND
-
- .align 32
- .EXPORT _CPU_Restore_float_context,ENTRY,PRIV_LEV=0
-_CPU_Restore_float_context:
- .PROC
- .CALLINFO FRAME=0,NO_CALLS
- .ENTRY
- addi (31*8), %arg0, %arg0 ; point at last double
- fldds 0(%arg0),%fr31
- fldds,mb -8(%arg0),%fr30
- fldds,mb -8(%arg0),%fr29
- fldds,mb -8(%arg0),%fr28
- fldds,mb -8(%arg0),%fr27
- fldds,mb -8(%arg0),%fr26
- fldds,mb -8(%arg0),%fr25
- fldds,mb -8(%arg0),%fr24
- fldds,mb -8(%arg0),%fr23
- fldds,mb -8(%arg0),%fr22
- fldds,mb -8(%arg0),%fr21
- fldds,mb -8(%arg0),%fr20
- fldds,mb -8(%arg0),%fr19
- fldds,mb -8(%arg0),%fr18
- fldds,mb -8(%arg0),%fr17
- fldds,mb -8(%arg0),%fr16
- fldds,mb -8(%arg0),%fr15
- fldds,mb -8(%arg0),%fr14
- fldds,mb -8(%arg0),%fr13
- fldds,mb -8(%arg0),%fr12
- fldds,mb -8(%arg0),%fr11
- fldds,mb -8(%arg0),%fr10
- fldds,mb -8(%arg0),%fr9
- fldds,mb -8(%arg0),%fr8
- fldds,mb -8(%arg0),%fr7
- fldds,mb -8(%arg0),%fr6
- fldds,mb -8(%arg0),%fr5
- fldds,mb -8(%arg0),%fr4
- fldds,mb -8(%arg0),%fr3
- fldds,mb -8(%arg0),%fr2
- fldds,mb -8(%arg0),%fr1
- bv 0(%r2)
- fldds,mb -8(%arg0),%fr0
- .EXIT
- .PROCEND
-
-/*
- * These 2 small routines are unused right now.
- * Normally we just go thru _CPU_Save_float_context (and Restore)
- *
- * Here we just deref the ptr and jump up, letting _CPU_Save_float_context
- * do the return for us.
- */
-
- .EXPORT _CPU_Context_save_fp,ENTRY,PRIV_LEV=0
-_CPU_Context_save_fp:
- .PROC
- .CALLINFO FRAME=0,NO_CALLS
- .ENTRY
- bl _CPU_Save_float_context, %r0
- ldw 0(%arg0), %arg0
- .EXIT
- .PROCEND
-
- .EXPORT _CPU_Context_restore_fp,ENTRY,PRIV_LEV=0
-_CPU_Context_restore_fp:
- .PROC
- .CALLINFO FRAME=0,NO_CALLS
- .ENTRY
- bl _CPU_Restore_float_context, %r0
- ldw 0(%arg0), %arg0
- .EXIT
- .PROCEND
-
-
-/*
- * void _CPU_Context_switch( run_context, heir_context )
- *
- * This routine performs a normal non-FP context switch.
- */
-
- .align 32
- .EXPORT _CPU_Context_switch,ENTRY,PRIV_LEV=0,ARGW0=GR,ARGW1=GR
-_CPU_Context_switch:
- .PROC
- .CALLINFO FRAME=64
- .ENTRY
-
-/*
- * Save the integer context
- */
- stw %r1,R1_OFFSET(arg0)
- stw %r2,R2_OFFSET(arg0)
- stw %r3,R3_OFFSET(arg0)
- stw %r4,R4_OFFSET(arg0)
- stw %r5,R5_OFFSET(arg0)
- stw %r6,R6_OFFSET(arg0)
- stw %r7,R7_OFFSET(arg0)
- stw %r8,R8_OFFSET(arg0)
- stw %r9,R9_OFFSET(arg0)
- stw %r10,R10_OFFSET(arg0)
- stw %r11,R11_OFFSET(arg0)
- stw %r12,R12_OFFSET(arg0)
- stw %r13,R13_OFFSET(arg0)
- stw %r14,R14_OFFSET(arg0)
- stw %r15,R15_OFFSET(arg0)
- stw %r16,R16_OFFSET(arg0)
- stw %r17,R17_OFFSET(arg0)
- stw %r18,R18_OFFSET(arg0)
- stw %r19,R19_OFFSET(arg0)
- stw %r20,R20_OFFSET(arg0)
- stw %r21,R21_OFFSET(arg0)
- stw %r22,R22_OFFSET(arg0)
- stw %r23,R23_OFFSET(arg0)
- stw %r24,R24_OFFSET(arg0)
- stw %r25,R25_OFFSET(arg0)
- stw %r26,R26_OFFSET(arg0)
- stw %r27,R27_OFFSET(arg0)
- stw %r28,R28_OFFSET(arg0)
- stw %r29,R29_OFFSET(arg0)
- stw %r30,R30_OFFSET(arg0)
- stw %r31,R31_OFFSET(arg0)
-
-/*
- * fill in interrupt context section
- */
- stw %r2, PCOQFRONT_OFFSET(%arg0)
- ldo 4(%r2), %r2
- stw %r2, PCOQBACK_OFFSET(%arg0)
-
-/*
- * Generate a suitable IPSW by using the system default psw
- * with the current low bits added in.
- */
-
- ldil L%CPU_PSW_DEFAULT, %r2
- ldo R%CPU_PSW_DEFAULT(%r2), %r2
- ssm 0, %arg2
- dep %arg2, 31, 8, %r2
- stw %r2, IPSW_OFFSET(%arg0)
-
-/*
- * at this point, the running task context is completely saved
- * Now jump to the bottom of the interrupt handler to load the
- * heirs context
- */
-
- b _CPU_Context_restore
- copy %arg1, %arg0
-
- .EXIT
- .PROCEND
-
-
-/*
- * Find first bit
- * NOTE:
- * This is used (and written) only for the ready chain code and
- * priority bit maps.
- * Any other use constitutes fraud.
- * Returns first bit from the least significant side.
- * Eg: if input is 0x8001
- * output will indicate the '1' bit and return 0.
- * This is counter to HPPA bit numbering which calls this
- * bit 31. This way simplifies the macros _CPU_Priority_Mask
- * and _CPU_Priority_Bits_index.
- *
- * NOTE:
- * We just use 16 bit version
- * does not handle zero case
- *
- * Based on the UTAH Mach libc version of ffs.
- */
-
- .align 32
- .EXPORT hppa_rtems_ffs,ENTRY,PRIV_LEV=0,ARGW0=GR
-hppa_rtems_ffs:
- .PROC
- .CALLINFO FRAME=0,NO_CALLS
- .ENTRY
-
-#ifdef RETURN_ERROR_ON_ZERO
- comb,= %arg0,%r0,ffsdone ; If arg0 is 0
- ldi -1,%ret0 ; return -1
-#endif
-
-#if BITFIELD_SIZE == 32
- ldi 31,%ret0 ; Set return to high bit
- extru,= %arg0,31,16,%r0 ; If low 16 bits are non-zero
- addi,tr -16,%ret0,%ret0 ; subtract 16 from bitpos
- shd %r0,%arg0,16,%arg0 ; else shift right 16 bits
-#else
- ldi 15,%ret0 ; Set return to high bit
-#endif
- extru,= %arg0,31,8,%r0 ; If low 8 bits are non-zero
- addi,tr -8,%ret0,%ret0 ; subtract 8 from bitpos
- shd %r0,%arg0,8,%arg0 ; else shift right 8 bits
- extru,= %arg0,31,4,%r0 ; If low 4 bits are non-zero
- addi,tr -4,%ret0,%ret0 ; subtract 4 from bitpos
- shd %r0,%arg0,4,%arg0 ; else shift right 4 bits
- extru,= %arg0,31,2,%r0 ; If low 2 bits are non-zero
- addi,tr -2,%ret0,%ret0 ; subtract 2 from bitpos
- shd %r0,%arg0,2,%arg0 ; else shift right 2 bits
- extru,= %arg0,31,1,%r0 ; If low bit is non-zero
- addi -1,%ret0,%ret0 ; subtract 1 from bitpos
-ffsdone:
- bv,n 0(%r2)
- nop
- .EXIT
- .PROCEND
diff --git a/cpukit/score/cpu/hppa1.1/rtems/score/cpu.h b/cpukit/score/cpu/hppa1.1/rtems/score/cpu.h
deleted file mode 100644
index e5db793923..0000000000
--- a/cpukit/score/cpu/hppa1.1/rtems/score/cpu.h
+++ /dev/null
@@ -1,635 +0,0 @@
-/* cpu.h
- *
- * This include file contains information pertaining to the HP
- * PA-RISC processor (Level 1.1).
- *
- * COPYRIGHT (c) 1994 by Division Incorporated
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * Note:
- * This file is included by both C and assembler code ( -DASM )
- *
- * $Id$
- */
-
-#ifndef __CPU_h
-#define __CPU_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/hppa.h> /* pick up machine definitions */
-#ifndef ASM
-#include <rtems/score/hppatypes.h>
-#endif
-
-/* conditional compilation parameters */
-
-#define CPU_INLINE_ENABLE_DISPATCH FALSE
-#define CPU_UNROLL_ENQUEUE_PRIORITY TRUE
-
-/*
- * RTEMS manages an interrupt stack in software for the HPPA.
- */
-
-#define CPU_HAS_SOFTWARE_INTERRUPT_STACK TRUE
-#define CPU_HAS_HARDWARE_INTERRUPT_STACK FALSE
-#define CPU_ALLOCATE_INTERRUPT_STACK TRUE
-
-/*
- * Does the RTEMS invoke the user's ISR with the vector number and
- * a pointer to the saved interrupt frame (1) or just the vector
- * number (0)?
- */
-
-#define CPU_ISR_PASSES_FRAME_POINTER 0
-
-/*
- * HPPA has hardware FP, it is assumed to exist by GCC so all tasks
- * may implicitly use it (especially for integer multiplies). Because
- * the FP context is technically part of the basic integer context
- * on this CPU, we cannot use the deferred FP context switch algorithm.
- */
-
-#define CPU_HARDWARE_FP TRUE
-#define CPU_ALL_TASKS_ARE_FP TRUE
-#define CPU_IDLE_TASK_IS_FP FALSE
-#define CPU_USE_DEFERRED_FP_SWITCH FALSE
-
-#define CPU_PROVIDES_IDLE_THREAD_BODY FALSE
-#define CPU_STACK_GROWS_UP TRUE
-#define CPU_STRUCTURE_ALIGNMENT __attribute__ ((__aligned__ (32)))
-
-/*
- * Define what is required to specify how the network to host conversion
- * routines are handled.
- */
-
-#define CPU_HAS_OWN_HOST_TO_NETWORK_ROUTINES FALSE
-#define CPU_BIG_ENDIAN TRUE
-#define CPU_LITTLE_ENDIAN FALSE
-
-/* constants */
-
-#define CPU_MODES_INTERRUPT_LEVEL 0x00000001 /* interrupt level in mode */
-#define CPU_MODES_INTERRUPT_MASK 0x00000001 /* interrupt level in mode */
-
-/*
- * PSW contstants
- */
-
-#define CPU_PSW_BASE (HPPA_PSW_C | HPPA_PSW_Q | HPPA_PSW_P | HPPA_PSW_D)
-#define CPU_PSW_INTERRUPTS_ON (CPU_PSW_BASE | HPPA_PSW_I)
-#define CPU_PSW_INTERRUPTS_OFF (CPU_PSW_BASE)
-
-#define CPU_PSW_DEFAULT CPU_PSW_BASE
-
-
-#ifndef ASM
-
-/*
- * Contexts
- *
- * This means we have the following context items:
- * 1. task level context stuff:: Context_Control
- * 2. floating point task stuff:: Context_Control_fp
- *
- * The PA-RISC is very fast so the expense of saving an extra register
- * or two is not of great concern at the present. So we are not making
- * a distinction between what is saved during a task switch and what is
- * saved at each interrupt. Plus saving the entire context should make
- * it easier to make gdb aware of RTEMS tasks.
- */
-
-typedef struct {
- unsigned32 flags; /* whatever */
- unsigned32 gr1; /* scratch -- caller saves */
- unsigned32 gr2; /* RP -- return pointer */
- unsigned32 gr3; /* scratch -- callee saves */
- unsigned32 gr4; /* scratch -- callee saves */
- unsigned32 gr5; /* scratch -- callee saves */
- unsigned32 gr6; /* scratch -- callee saves */
- unsigned32 gr7; /* scratch -- callee saves */
- unsigned32 gr8; /* scratch -- callee saves */
- unsigned32 gr9; /* scratch -- callee saves */
- unsigned32 gr10; /* scratch -- callee saves */
- unsigned32 gr11; /* scratch -- callee saves */
- unsigned32 gr12; /* scratch -- callee saves */
- unsigned32 gr13; /* scratch -- callee saves */
- unsigned32 gr14; /* scratch -- callee saves */
- unsigned32 gr15; /* scratch -- callee saves */
- unsigned32 gr16; /* scratch -- callee saves */
- unsigned32 gr17; /* scratch -- callee saves */
- unsigned32 gr18; /* scratch -- callee saves */
- unsigned32 gr19; /* scratch -- caller saves */
- unsigned32 gr20; /* scratch -- caller saves */
- unsigned32 gr21; /* scratch -- caller saves */
- unsigned32 gr22; /* scratch -- caller saves */
- unsigned32 gr23; /* argument 3 */
- unsigned32 gr24; /* argument 2 */
- unsigned32 gr25; /* argument 1 */
- unsigned32 gr26; /* argument 0 */
- unsigned32 gr27; /* DP -- global data pointer */
- unsigned32 gr28; /* return values -- caller saves */
- unsigned32 gr29; /* return values -- caller saves */
- unsigned32 sp; /* gr30 */
- unsigned32 gr31;
-
- /* Various control registers */
-
- unsigned32 sar; /* cr11 */
- unsigned32 ipsw; /* cr22; full 32 bits of psw */
- unsigned32 iir; /* cr19; interrupt instruction register */
- unsigned32 ior; /* cr21; interrupt offset register */
- unsigned32 isr; /* cr20; interrupt space register (not used) */
- unsigned32 pcoqfront; /* cr18; front que offset */
- unsigned32 pcoqback; /* cr18; back que offset */
- unsigned32 pcsqfront; /* cr17; front que space (not used) */
- unsigned32 pcsqback; /* cr17; back que space (not used) */
- unsigned32 itimer; /* cr16; itimer value */
-
-} Context_Control;
-
-
-/* Must be double word aligned.
- * This will be ok since our allocator returns 8 byte aligned chunks
- */
-
-typedef struct {
- double fr0; /* status */
- double fr1; /* exception information */
- double fr2; /* exception information */
- double fr3; /* exception information */
- double fr4; /* argument */
- double fr5; /* argument */
- double fr6; /* argument */
- double fr7; /* argument */
- double fr8; /* scratch -- caller saves */
- double fr9; /* scratch -- caller saves */
- double fr10; /* scratch -- caller saves */
- double fr11; /* scratch -- caller saves */
- double fr12; /* callee saves -- (PA-RISC 1.1 CPUs) */
- double fr13; /* callee saves -- (PA-RISC 1.1 CPUs) */
- double fr14; /* callee saves -- (PA-RISC 1.1 CPUs) */
- double fr15; /* callee saves -- (PA-RISC 1.1 CPUs) */
- double fr16; /* callee saves -- (PA-RISC 1.1 CPUs) */
- double fr17; /* callee saves -- (PA-RISC 1.1 CPUs) */
- double fr18; /* callee saves -- (PA-RISC 1.1 CPUs) */
- double fr19; /* callee saves -- (PA-RISC 1.1 CPUs) */
- double fr20; /* callee saves -- (PA-RISC 1.1 CPUs) */
- double fr21; /* callee saves -- (PA-RISC 1.1 CPUs) */
- double fr22; /* caller saves -- (PA-RISC 1.1 CPUs) */
- double fr23; /* caller saves -- (PA-RISC 1.1 CPUs) */
- double fr24; /* caller saves -- (PA-RISC 1.1 CPUs) */
- double fr25; /* caller saves -- (PA-RISC 1.1 CPUs) */
- double fr26; /* caller saves -- (PA-RISC 1.1 CPUs) */
- double fr27; /* caller saves -- (PA-RISC 1.1 CPUs) */
- double fr28; /* caller saves -- (PA-RISC 1.1 CPUs) */
- double fr29; /* caller saves -- (PA-RISC 1.1 CPUs) */
- double fr30; /* caller saves -- (PA-RISC 1.1 CPUs) */
- double fr31; /* caller saves -- (PA-RISC 1.1 CPUs) */
-} Context_Control_fp;
-
-/*
- * The following structure defines the set of information saved
- * on the current stack by RTEMS upon receipt of each interrupt.
- */
-
-typedef struct {
- Context_Control Integer;
- Context_Control_fp Floating_Point;
-} CPU_Interrupt_frame;
-
-/*
- * Our interrupt handlers take a 2nd argument:
- * a pointer to a CPU_Interrupt_frame
- * So we use our own prototype instead of rtems_isr_entry
- */
-
-typedef void ( *hppa_rtems_isr_entry )(
- unsigned32,
- CPU_Interrupt_frame *
- );
-
-/*
- * The following table contains the information required to configure
- * the HPPA specific parameters.
- */
-
-typedef struct {
- void (*pretasking_hook)( void );
- void (*predriver_hook)( void );
- void (*postdriver_hook)( void );
- void (*idle_task)( void );
- boolean do_zero_of_workspace;
- unsigned32 idle_task_stack_size;
- unsigned32 interrupt_stack_size;
- unsigned32 extra_mpci_receive_server_stack;
- void * (*stack_allocate_hook)( unsigned32 );
- void (*stack_free_hook)( void * );
- /* end of fields required on all CPUs */
-
- hppa_rtems_isr_entry spurious_handler;
-
- unsigned32 itimer_clicks_per_microsecond; /* for use by Clock driver */
-} rtems_cpu_table;
-
-/*
- * Macros to access required entires in the CPU Table are in
- * the file rtems/system.h.
- */
-
-/*
- * Macros to access HPPA specific additions to the CPU Table
- */
-
-#define rtems_cpu_configuration_get_spurious_handler() \
- (_CPU_Table.spurious_handler)
-
-#define rtems_cpu_configuration_get_itimer_clicks_per_microsecond() \
- (_CPU_Table.itimer_clicks_per_microsecond)
-
-/* variables */
-
-SCORE_EXTERN Context_Control_fp _CPU_Null_fp_context;
-SCORE_EXTERN unsigned32 _CPU_Default_gr27;
-SCORE_EXTERN void *_CPU_Interrupt_stack_low;
-SCORE_EXTERN void *_CPU_Interrupt_stack_high;
-
-#endif /* ! ASM */
-
-/*
- * context sizes
- */
-
-#ifndef ASM
-#define CPU_CONTEXT_SIZE sizeof( Context_Control )
-#define CPU_CONTEXT_FP_SIZE sizeof( Context_Control_fp )
-#endif
-
-/*
- * size of a frame on the stack
- */
-
-#define CPU_FRAME_SIZE (16 * 4)
-
-/*
- * (Optional) # of bytes for libmisc/stackchk to check
- * If not specifed, then it defaults to something reasonable
- * for most architectures.
- */
-
-#define CPU_STACK_CHECK_SIZE (CPU_FRAME_SIZE * 2)
-
-/*
- * extra stack required by the MPCI receive server thread
- */
-
-#define CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK 0
-
-/*
- * HPPA has 32 traps, then 32 external interrupts
- * Rtems (_ISR_Vector_Table) is aware ONLY of the first 32
- * The BSP is aware of the external interrupts and possibly more.
- *
- */
-
-#define CPU_INTERRUPT_NUMBER_OF_VECTORS (HPPA_INTERNAL_TRAPS)
-#define CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER (CPU_INTERRUPT_NUMBER_OF_VECTORS - 1)
-
-/*
- * Don't be chintzy here; we don't want to debug these problems
- * Some of the tests eat almost 4k.
- * Plus, the HPPA always allocates chunks of 64 bytes for stack
- * growth.
- */
-
-#define CPU_STACK_MINIMUM_SIZE (8 * 1024)
-
-/*
- * HPPA double's must be on 8 byte boundary
- */
-
-#define CPU_ALIGNMENT 8
-
-/*
- * just follow the basic HPPA alignment for the heap and partition
- */
-
-#define CPU_HEAP_ALIGNMENT CPU_ALIGNMENT
-#define CPU_PARTITION_ALIGNMENT CPU_ALIGNMENT
-
-/*
- * HPPA stack is best when 64 byte aligned.
- */
-
-#define CPU_STACK_ALIGNMENT 64
-
-#ifndef ASM
-
-/* macros */
-
-/*
- * ISR handler macros
- *
- * These macros perform the following functions:
- * + disable all maskable CPU interrupts
- * + restore previous interrupt level (enable)
- * + temporarily restore interrupts (flash)
- * + set a particular level
- */
-
-/* Disable interrupts; returning previous psw bits in _isr_level */
-#define _CPU_ISR_Disable( _isr_level ) \
- do { \
- HPPA_ASM_RSM(HPPA_PSW_I, _isr_level); \
- if (_isr_level & HPPA_PSW_I) _isr_level = 0; \
- else _isr_level = 1; \
- } while(0)
-
-/* Enable interrupts to previous level from _CPU_ISR_Disable
- * does not change 'level' */
-#define _CPU_ISR_Enable( _isr_level ) \
- { \
- register int _ignore; \
- if (_isr_level == 0) HPPA_ASM_SSM(HPPA_PSW_I, _ignore); \
- else HPPA_ASM_RSM(HPPA_PSW_I, _ignore); \
- }
-
-/* restore, then disable interrupts; does not change level */
-#define _CPU_ISR_Flash( _isr_level ) \
- { \
- if (_isr_level == 0) \
- { \
- register int _ignore; \
- HPPA_ASM_SSM(HPPA_PSW_I, _ignore); \
- HPPA_ASM_RSM(HPPA_PSW_I, _ignore); \
- } \
- }
-
-/*
- * Interrupt task levels
- *
- * Future scheme proposal
- * level will be an index into a array.
- * Each entry of array will be the interrupt bits
- * enabled for that level. There will be 32 bits of external
- * interrupts (to be placed in EIEM) and some (optional) bsp
- * specific bits
- *
- * For pixel flow this *may* mean something like:
- * level 0: all interrupts enabled (external + rhino)
- * level 1: rhino disabled
- * level 2: all io interrupts disabled (timer still enabled)
- * level 7: *ALL* disabled (timer disabled)
- */
-
-/* set interrupts on or off; does not return new level */
-#define _CPU_ISR_Set_level( new_level ) \
- { \
- volatile int ignore; \
- if ( new_level ) HPPA_ASM_RSM(HPPA_PSW_I, ignore); \
- else HPPA_ASM_SSM(HPPA_PSW_I, ignore); \
- }
-
-/* return current level */
-unsigned32 _CPU_ISR_Get_level( void );
-
-/* end of ISR handler macros */
-
-/*
- * Context handler macros
- *
- * These macros perform the following functions:
- * + initialize a context area
- * + restart the current thread
- * + calculate the initial pointer into a FP context area
- * + initialize an FP context area
- *
- * HPPA port adds two macros which hide the "indirectness" of the
- * pointer passed the save/restore FP context assembly routines.
- */
-
-#define _CPU_Context_Initialize( _the_context, _stack_base, _size, \
- _new_level, _entry_point, _is_fp ) \
- do { \
- unsigned32 _stack; \
- \
- (_the_context)->flags = 0xfeedf00d; \
- (_the_context)->pcoqfront = (unsigned32)(_entry_point); \
- (_the_context)->pcoqback = (unsigned32)(_entry_point) + 4; \
- (_the_context)->pcsqfront = 0; \
- (_the_context)->pcsqback = 0; \
- if ( (_new_level) ) \
- (_the_context)->ipsw = CPU_PSW_INTERRUPTS_OFF; \
- else \
- (_the_context)->ipsw = CPU_PSW_INTERRUPTS_ON; \
- \
- _stack = ((unsigned32)(_stack_base) + (CPU_STACK_ALIGNMENT - 1)); \
- _stack &= ~(CPU_STACK_ALIGNMENT - 1); \
- if ((_stack - (unsigned32) (_stack_base)) < CPU_FRAME_SIZE) \
- _stack += CPU_FRAME_SIZE; \
- \
- (_the_context)->sp = (_stack); \
- (_the_context)->gr27 = _CPU_Default_gr27; \
- } while (0)
-
-#define _CPU_Context_Restart_self( _the_context ) \
- do { \
- _CPU_Context_restore( (_the_context) ); \
- } while (0)
-
-#define _CPU_Context_Fp_start( _base, _offset ) \
- ( (void *) _Addresses_Add_offset( (_base), (_offset) ) )
-
-#define _CPU_Context_Initialize_fp( _destination ) \
- do { \
- *((Context_Control_fp *) *((void **) _destination)) = _CPU_Null_fp_context;\
- } while(0)
-
-#define _CPU_Context_save_fp( _fp_context ) \
- _CPU_Save_float_context( *(Context_Control_fp **)(_fp_context) )
-
-#define _CPU_Context_restore_fp( _fp_context ) \
- _CPU_Restore_float_context( *(Context_Control_fp **)(_fp_context) )
-
-/* end of Context handler macros */
-
-/*
- * Fatal Error manager macros
- *
- * These macros perform the following functions:
- * + disable interrupts and halt the CPU
- */
-
-void hppa_cpu_halt(unsigned32 the_error);
-#define _CPU_Fatal_halt( _error ) \
- hppa_cpu_halt(_error)
-
-/* end of Fatal Error manager macros */
-
-/*
- * Bitfield handler macros
- *
- * These macros perform the following functions:
- * + scan for the highest numbered (MSB) set in a 16 bit bitfield
- *
- * NOTE:
- *
- * The HPPA does not have a scan instruction. This functionality
- * is implemented in software.
- */
-
-#define CPU_USE_GENERIC_BITFIELD_CODE FALSE
-#define CPU_USE_GENERIC_BITFIELD_DATA FALSE
-
-int hppa_rtems_ffs(unsigned int value);
-#define _CPU_Bitfield_Find_first_bit( _value, _output ) \
- _output = hppa_rtems_ffs(_value)
-
-/* end of Bitfield handler macros */
-
-/*
- * Priority handler macros
- *
- * These macros perform the following functions:
- * + return a mask with the bit for this major/minor portion of
- * of thread priority set.
- * + translate the bit number returned by "Bitfield_find_first_bit"
- * into an index into the thread ready chain bit maps
- *
- * Note: 255 is the lowest priority
- */
-
-#define _CPU_Priority_Mask( _bit_number ) \
- ( 1 << (_bit_number) )
-
-#define _CPU_Priority_bits_index( _priority ) \
- (_priority)
-
-/* end of Priority handler macros */
-
-/* functions */
-
-/*
- * _CPU_Initialize
- *
- * This routine performs CPU dependent initialization.
- */
-
-void _CPU_Initialize(
- rtems_cpu_table *cpu_table,
- void (*thread_dispatch)
-);
-
-/*
- * _CPU_ISR_install_raw_handler
- *
- * This routine installs a "raw" interrupt handler directly into the
- * processor's vector table.
- */
-
-void _CPU_ISR_install_raw_handler(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-);
-
-/*
- * _CPU_ISR_install_vector
- *
- * This routine installs an interrupt vector.
- */
-
-void _CPU_ISR_install_vector(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-);
-
-/*
- * _CPU_Context_switch
- *
- * This routine switches from the run context to the heir context.
- */
-
-void _CPU_Context_switch(
- Context_Control *run,
- Context_Control *heir
-);
-
-/*
- * _CPU_Context_restore
- *
- * This routine is generally used only to restart self in an
- * efficient manner and avoid stack conflicts.
- */
-
-void _CPU_Context_restore(
- Context_Control *new_context
-);
-
-/*
- * _CPU_Save_float_context
- *
- * This routine saves the floating point context passed to it.
- *
- * NOTE: _CPU_Context_save_fp is implemented as a macro on the HPPA
- * which dereferences the pointer before calling this.
- */
-
-void _CPU_Save_float_context(
- Context_Control_fp *fp_context
-);
-
-/*
- * _CPU_Restore_float_context
- *
- * This routine restores the floating point context passed to it.
- *
- * NOTE: _CPU_Context_save_fp is implemented as a macro on the HPPA
- * which dereferences the pointer before calling this.
- */
-
-void _CPU_Restore_float_context(
- Context_Control_fp *fp_context
-);
-
-
-/*
- * The raw interrupt handler for external interrupts
- */
-
-extern void _Generic_ISR_Handler(
- void
-);
-
-
-/* The following routine swaps the endian format of an unsigned int.
- * It must be static so it can be referenced indirectly.
- */
-
-static inline unsigned int
-CPU_swap_u32(unsigned32 value)
-{
- unsigned32 swapped;
-
- HPPA_ASM_SWAPBYTES(value, swapped);
-
- return( swapped );
-}
-
-#define CPU_swap_u16( value ) \
- (((value&0xff) << 8) | ((value >> 8)&0xff))
-
-#endif /* ! ASM */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* ! __CPU_h */
diff --git a/cpukit/score/cpu/hppa1.1/rtems/score/cpu_asm.h b/cpukit/score/cpu/hppa1.1/rtems/score/cpu_asm.h
deleted file mode 100644
index 951f80dcf0..0000000000
--- a/cpukit/score/cpu/hppa1.1/rtems/score/cpu_asm.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 1990,1991 The University of Utah and
- * the Center for Software Science (CSS). All rights reserved.
- *
- * Permission to use, copy, modify and distribute this software is hereby
- * granted provided that (1) source code retains these copyright, permission,
- * and disclaimer notices, and (2) redistributions including binaries
- * reproduce the notices in supporting documentation, and (3) all advertising
- * materials mentioning features or use of this software display the following
- * acknowledgement: ``This product includes software developed by the Center
- * for Software Science at the University of Utah.''
- *
- * THE UNIVERSITY OF UTAH AND CSS ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
- * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSS DISCLAIM ANY LIABILITY OF
- * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * CSS requests users of this software to return to css-dist@cs.utah.edu any
- * improvements that they make and grant CSS redistribution rights.
- *
- * Utah $Hdr: asm.h 1.6 91/12/03$
- *
- * $Id$
- */
-
-/*
- * Hardware Space Registers
- */
-sr0 .reg %sr0
-sr1 .reg %sr1
-sr2 .reg %sr2
-sr3 .reg %sr3
-sr4 .reg %sr4
-sr5 .reg %sr5
-sr6 .reg %sr6
-sr7 .reg %sr7
-
-/*
- * Control register aliases
- */
-
-rctr .reg %cr0
-pidr1 .reg %cr8
-pidr2 .reg %cr9
-ccr .reg %cr10
-sar .reg %cr11
-pidr3 .reg %cr12
-pidr4 .reg %cr13
-iva .reg %cr14
-eiem .reg %cr15
-itmr .reg %cr16
-pcsq .reg %cr17
-pcoq .reg %cr18
-iir .reg %cr19
-isr .reg %cr20
-ior .reg %cr21
-ipsw .reg %cr22
-eirr .reg %cr23
-
-/*
- * Calling Convention
- */
-rp .reg %r2
-arg3 .reg %r23
-arg2 .reg %r24
-arg1 .reg %r25
-arg0 .reg %r26
-dp .reg %r27
-ret0 .reg %r28
-ret1 .reg %r29
-sl .reg %r29
-sp .reg %r30
-
-
diff --git a/cpukit/score/cpu/hppa1.1/rtems/score/hppa.h b/cpukit/score/cpu/hppa1.1/rtems/score/hppa.h
deleted file mode 100644
index 049981ea84..0000000000
--- a/cpukit/score/cpu/hppa1.1/rtems/score/hppa.h
+++ /dev/null
@@ -1,716 +0,0 @@
-/*
- * Description:
- *
- * Definitions for HP PA Risc
- * ref: PA RISC 1.1 Architecture and Instruction Set Reference Manual
- *
- * COPYRIGHT (c) 1994 by Division Incorporated
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * Note:
- * This file is included by both C and assembler code ( -DASM )
- *
- * $Id$
- */
-
-#ifndef _INCLUDE_HPPA_H
-#define _INCLUDE_HPPA_H
-
-#ifdef ASM
-#include <rtems/score/targopts.h>
-#endif
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-/*
- * This section contains the information required to build
- * RTEMS for a particular member of the Hewlett Packard
- * PA-RISC family. It does this by setting variables to
- * indicate which implementation dependent features are
- * present in a particular member of the family.
- */
-
-#if defined(hppa7100)
-
-#define CPU_MODEL_NAME "hppa 7100"
-
-#elif defined(hppa7200)
-
-#define CPU_MODEL_NAME "hppa 7200"
-
-#else
-
-#error "Unsupported CPU Model"
-
-#endif
-
-/*
- * Define the name of the CPU family.
- */
-
-#if !defined(CPU_NAME)
-#define CPU_NAME "HP PA-RISC 1.1"
-#endif
-
-/*
- * Processor Status Word (PSW) Masks
- */
-
-
-#define HPPA_PSW_Y 0x80000000 /* Data Debug Trap Disable */
-#define HPPA_PSW_Z 0x40000000 /* Instruction Debug Trap Disable */
-#define HPPA_PSW_r2 0x20000000 /* reserved */
-#define HPPA_PSW_r3 0x10000000 /* reserved */
-#define HPPA_PSW_r4 0x08000000 /* reserved */
-#define HPPA_PSW_E 0x04000000 /* Little Endian on Memory References */
-#define HPPA_PSW_S 0x02000000 /* Secure Interval Timer */
-#define HPPA_PSW_T 0x01000000 /* Taken Branch Trap Enable */
-#define HPPA_PSW_H 0x00800000 /* Higher-Privilege Transfer Trap Enable*/
-#define HPPA_PSW_L 0x00400000 /* Lower-Privilege Transfer Trap Enable */
-#define HPPA_PSW_N 0x00200000 /* PC Queue Front Instruction Nullified */
-#define HPPA_PSW_X 0x00100000 /* Data Memory Break Disable */
-#define HPPA_PSW_B 0x00080000 /* Taken Branch in Previous Cycle */
-#define HPPA_PSW_C 0x00040000 /* Code Address Translation Enable */
-#define HPPA_PSW_V 0x00020000 /* Divide Step Correction */
-#define HPPA_PSW_M 0x00010000 /* High-Priority Machine Check Disable */
-#define HPPA_PSW_CB 0x0000ff00 /* Carry/Borrow Bits */
-#define HPPA_PSW_r24 0x00000080 /* reserved */
-#define HPPA_PSW_G 0x00000040 /* Debug trap Enable */
-#define HPPA_PSW_F 0x00000020 /* Performance monitor interrupt unmask */
-#define HPPA_PSW_R 0x00000010 /* Recovery Counter Enable */
-#define HPPA_PSW_Q 0x00000008 /* Interruption State Collection Enable */
-#define HPPA_PSW_P 0x00000004 /* Protection ID Validation Enable */
-#define HPPA_PSW_D 0x00000002 /* Data Address Translation Enable */
-#define HPPA_PSW_I 0x00000001 /* External, Power Failure, */
- /* Low-Priority Machine Check */
- /* Interruption Enable */
-
-/*
- * HPPA traps and interrupts
- * basic layout. Note numbers do not denote priority
- *
- * 0-31 basic traps and interrupts defined by HPPA architecture
- * 0-31 32 external interrupts
- * 32-... bsp defined
- */
-
-#define HPPA_TRAP_NON_EXISTENT 0
-/* group 1 */
-#define HPPA_TRAP_HIGH_PRIORITY_MACHINE_CHECK 1
-/* group 2 */
-#define HPPA_TRAP_POWER_FAIL 2
-#define HPPA_TRAP_RECOVERY_COUNTER 3
-#define HPPA_TRAP_EXTERNAL_INTERRUPT 4
-#define HPPA_TRAP_LOW_PRIORITY_MACHINE_CHECK 5
-#define HPPA_TRAP_PERFORMANCE_MONITOR 29
-/* group 3 */
-#define HPPA_TRAP_INSTRUCTION_TLB_MISS 6
-#define HPPA_TRAP_INSTRUCTION_MEMORY_PROTECTION 7
-#define HPPA_TRAP_INSTRUCTION_DEBUG 30
-#define HPPA_TRAP_ILLEGAL_INSTRUCTION 8
-#define HPPA_TRAP_BREAK_INSTRUCTION 9
-#define HPPA_TRAP_PRIVILEGED_OPERATION 10
-#define HPPA_TRAP_PRIVILEGED_REGISTER 11
-#define HPPA_TRAP_OVERFLOW 12
-#define HPPA_TRAP_CONDITIONAL 13
-#define HPPA_TRAP_ASSIST_EXCEPTION 14
-#define HPPA_TRAP_DATA_TLB_MISS 15
-#define HPPA_TRAP_NON_ACCESS_INSTRUCTION_TLB_MISS 16
-#define HPPA_TRAP_NON_ACCESS_DATA_TLB_MISS 17
-#define HPPA_TRAP_DATA_MEMORY_ACCESS_RIGHTS 26
-#define HPPA_TRAP_DATA_MEMORY_PROTECTION_ID 27
-#define HPPA_TRAP_UNALIGNED_DATA_REFERENCE 28
-#define HPPA_TRAP_DATA_MEMORY_PROTECTION 18
-#define HPPA_TRAP_DATA_MEMORY_BREAK 19
-#define HPPA_TRAP_TLB_DIRTY_BIT 20
-#define HPPA_TRAP_PAGE_REFERENCE 21
-#define HPPA_TRAP_DATA_DEBUG 31
-#define HPPA_TRAP_ASSIST_EMULATION 22
-/* group 4 */
-#define HPPA_TRAP_HIGHER_PRIVILEGE_TRANSFER 23
-#define HPPA_TRAP_LOWER_PRIVILEGE_TRANSFER 24
-#define HPPA_TRAP_TAKEN_BRANCH 25
-
-#define HPPA_INTERNAL_TRAPS 32
-
-/* External Interrupts via interrupt 4 */
-
-#define HPPA_INTERRUPT_EXTERNAL_0 0
-#define HPPA_INTERRUPT_EXTERNAL_1 1
-#define HPPA_INTERRUPT_EXTERNAL_2 2
-#define HPPA_INTERRUPT_EXTERNAL_3 3
-#define HPPA_INTERRUPT_EXTERNAL_4 4
-#define HPPA_INTERRUPT_EXTERNAL_5 5
-#define HPPA_INTERRUPT_EXTERNAL_6 6
-#define HPPA_INTERRUPT_EXTERNAL_7 7
-#define HPPA_INTERRUPT_EXTERNAL_8 8
-#define HPPA_INTERRUPT_EXTERNAL_9 9
-#define HPPA_INTERRUPT_EXTERNAL_10 10
-#define HPPA_INTERRUPT_EXTERNAL_11 11
-#define HPPA_INTERRUPT_EXTERNAL_12 12
-#define HPPA_INTERRUPT_EXTERNAL_13 13
-#define HPPA_INTERRUPT_EXTERNAL_14 14
-#define HPPA_INTERRUPT_EXTERNAL_15 15
-#define HPPA_INTERRUPT_EXTERNAL_16 16
-#define HPPA_INTERRUPT_EXTERNAL_17 17
-#define HPPA_INTERRUPT_EXTERNAL_18 18
-#define HPPA_INTERRUPT_EXTERNAL_19 19
-#define HPPA_INTERRUPT_EXTERNAL_20 20
-#define HPPA_INTERRUPT_EXTERNAL_21 21
-#define HPPA_INTERRUPT_EXTERNAL_22 22
-#define HPPA_INTERRUPT_EXTERNAL_23 23
-#define HPPA_INTERRUPT_EXTERNAL_24 24
-#define HPPA_INTERRUPT_EXTERNAL_25 25
-#define HPPA_INTERRUPT_EXTERNAL_26 26
-#define HPPA_INTERRUPT_EXTERNAL_27 27
-#define HPPA_INTERRUPT_EXTERNAL_28 28
-#define HPPA_INTERRUPT_EXTERNAL_29 29
-#define HPPA_INTERRUPT_EXTERNAL_30 30
-#define HPPA_INTERRUPT_EXTERNAL_31 31
-
-#define HPPA_INTERRUPT_EXTERNAL_INTERVAL_TIMER HPPA_INTERRUPT_EXTERNAL_0
-#define HPPA_EXTERNAL_INTERRUPTS 32
-
-/* BSP defined interrupts begin here */
-
-#define HPPA_INTERRUPT_MAX 32
-
-/*
- * Cache characteristics
- */
-
-#define HPPA_CACHELINE_SIZE 32
-#define HPPA_CACHELINE_MASK (HPPA_CACHELINE_SIZE - 1)
-
-/*
- * page size characteristics
- */
-
-#define HPPA_PAGE_SIZE 4096
-#define HPPA_PAGE_MASK (0xfffff000)
-
-
-/*
- * TLB characteristics
- *
- * Flags and Access Control layout for using TLB protection insertion
- *
- * 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3
- * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- * |?|?|T|D|B|type |PL1|Pl2|U| access id |?|
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- *
- */
-
-/*
- * Access rights (type + PL1 + PL2)
- */
-#define HPPA_PROT_R 0x00c00000 /* Read Only, no Write, no Execute */
-#define HPPA_PROT_RW 0x01c00000 /* Read & Write Only, no Execute */
-#define HPPA_PROT_RX 0x02c00000 /* Read & Execute Only, no Write */
-#define HPPA_PROT_RWX 0x03c00000 /* Read, Write, Execute */
-#define HPPA_PROT_X0 0x04c00000 /* Execute Only, Promote to Level 0 */
-#define HPPA_PROT_X1 0x05c00000 /* Execute Only, Promote to Level 1 */
-#define HPPA_PROT_X2 0x06c00000 /* Execute Only, Promote to Level 2 */
-#define HPPA_PROT_X3 0x07c00000 /* Execute Only, Promote to Level 3 */
-
-/*
- * Floating point status register definitions
- */
-
-#define HPPA_FPSTATUS_ENABLE_I 0x00000001 /* inexact operation */
-#define HPPA_FPSTATUS_ENABLE_U 0x00000002 /* underflow */
-#define HPPA_FPSTATUS_ENABLE_O 0x00000004 /* overflow */
-#define HPPA_FPSTATUS_ENABLE_Z 0x00000008 /* division by zero */
-#define HPPA_FPSTATUS_ENABLE_V 0x00000010 /* invalid operation */
-#define HPPA_FPSTATUS_D 0x00000020 /* denormalize as zero */
-#define HPPA_FPSTATUS_T 0x00000040 /* delayed trap */
-#define HPPA_FPSTATUS_RM_MASK 0x00000600 /* rounding mode */
-#define HPPA_FPSTATUS_RM_SHIFT 9
-#define HPPA_FPSTATUS_CQ_MASK 0x001FFC00 /* compare queue */
-#define HPPA_FPSTATUS_CQ_SHIFT 13
-#define HPPA_FPSTATUS_C 0x04000000 /* most recent ompare bit */
-#define HPPA_FPSTATUS_FLAG_I 0x08000000 /* inexact */
-#define HPPA_FPSTATUS_FLAG_U 0x10000000 /* underflow */
-#define HPPA_FPSTATUS_FLAG_O 0x20000000 /* overflow */
-#define HPPA_FPSTATUS_FLAG_Z 0x40000000 /* division by zero */
-#define HPPA_FPSTATUS_FLAG_V 0x80000000 /* invalid operation */
-
-
-/*
- * Inline macros for misc. interesting opcodes
- */
-
-/* generate a global label */
-#define HPPA_ASM_LABEL(label) \
- asm(".export " label ", ! .label " label);
-
-/* Return From Interrupt RFI */
-#define HPPA_ASM_RFI() asm volatile ("rfi")
-
-/* Set System Mask SSM i,t */
-#define HPPA_ASM_SSM(i,gr) asm volatile ("ssm %1, %0" \
- : "=r" (gr) \
- : "i" (i))
-/* Reset System Mask RSM i,t */
-#define HPPA_ASM_RSM(i,gr) asm volatile ("rsm %1, %0" \
- : "=r" (gr) \
- : "i" (i))
-/* Move To System Mask MTSM r */
-#define HPPA_ASM_MTSM(gr) asm volatile ("mtsm %0" \
- : : "r" (gr))
-
-/* Load Space Identifier LDSID (s,b),t */
-#define HPPA_ASM_LDSID(sr,grb,grt) asm volatile ("ldsid (%1,%2),%0" \
- : "=r" (grt) \
- : "i" (sr), \
- "r" (grb))
-
-/*
- * Gcc extended asm doesn't really allow for treatment of space registers
- * as "registers", so we have to use "i" format.
- * Unfortunately this means that the "=" constraint is not available.
- */
-
-/* Move To Space Register MTSP r,sr */
-#define HPPA_ASM_MTSP(gr,sr) asm volatile ("mtsp %1,%0" \
- : : "i" (sr), \
- "r" (gr))
-
-/* Move From Space Register MFSP sr,t */
-#define HPPA_ASM_MFSP(sr,gr) asm volatile ("mfsp %1,%0" \
- : "=r" (gr) \
- : "i" (sr))
-
-/* Move To Control register MTCTL r,t */
-#define HPPA_ASM_MTCTL(gr,cr) asm volatile ("mtctl %1,%0" \
- : : "i" (cr), \
- "r" (gr))
-
-/* Move From Control register MFCTL r,t */
-#define HPPA_ASM_MFCTL(cr,gr) asm volatile ("mfctl %1,%0" \
- : "=r" (gr) \
- : "i" (cr))
-
-/* Synchronize caches SYNC */
-#define HPPA_ASM_SYNC() asm volatile ("sync")
-
-/* Probe Read Access PROBER (s,b),r,t */
-#define HPPA_ASM_PROBER(sr,groff,gracc,grt) \
- asm volatile ("prober (%1,%2),%3,%0" \
- : "=r" (grt) \
- : "i" (sr), \
- "r" (groff), \
- "r" (gracc))
-
-/* Probe Read Access Immediate PROBERI (s,b),i,t*/
-#define HPPA_ASM_PROBERI(sr,groff,iacc,grt) \
- asm volatile ("proberi (%1,%2),%3,%0" \
- : "=r" (grt) \
- : "i" (sr), \
- "r" (groff), \
- "i" (iacc))
-
-/* Probe Write Access PROBEW (s,b),r,t */
-#define HPPA_ASM_PROBEW(sr,groff,gracc,grt) \
- asm volatile ("probew (%1,%2),%3,%0" \
- : "=r" (grt) \
- : "i" (sr), \
- "r" (groff), \
- "r" (gracc))
-
-/* Probe Write Access Immediate PROBEWI (s,b),i,t */
-#define HPPA_ASM_PROBEWI(sr,groff,iacc,grt) \
- asm volatile ("probewi (%1,%2),%3,%0" \
- : "=r" (grt) \
- : "i" (sr), \
- "r" (groff), \
- "i" (iacc))
-
-/* Load Physical Address LPA x(s,b),t */
-#define HPPA_ASM_LPA(sr,grb,grt) asm volatile ("lpa %%r0(%1,%2),%0" \
- : "=r" (grt) \
- : "i" (sr), \
- "r" (grb))
-
-/* Load Coherence Index LCI x(s,b),t */
-/* AKA: Load Hash Address LHA x(s,b),t */
-#define HPPA_ASM_LCI(grx,sr,grb,grt) asm volatile ("lha %1(%2,%3),%0" \
- : "=r" (grt) \
- : "r" (grx),\
- "i" (sr), \
- "r" (grb))
-#define HPPA_ASM_LHA(grx,sr,grb,grt) HPPA_ASM_LCI(grx,sr,grb,grt)
-
-/* Purge Data Tlb PDTLB x(s,b) */
-#define HPPA_ASM_PDTLB(grx,sr,grb) asm volatile ("pdtlb %0(%1,%2)" \
- : : "r" (grx), \
- "i" (sr), \
- "r" (grb))
-
-/* Purge Instruction Tlb PITLB x(s,b) */
-#define HPPA_ASM_PITLB(grx,sr,grb) asm volatile ("pitlb %0(%1,%2)" \
- : : "r" (grx), \
- "i" (sr), \
- "r" (grb))
-
-/* Purge Data Tlb Entry PDTLBE x(s,b) */
-#define HPPA_ASM_PDTLBE(grx,sr,grb) asm volatile ("pdtlbe %0(%1,%2)" \
- : : "r" (grx), \
- "i" (sr), \
- "r" (grb))
-
-/* Purge Instruction Tlb Entry PITLBE x(s,b) */
-#define HPPA_ASM_PITLBE(grx,sr,grb) asm volatile ("pitlbe %0(%1,%2)" \
- : : "r" (grx), \
- "i" (sr), \
- "r" (grb))
-
-
-/* Insert Data TLB Address IDTLBA r,(s,b) */
-#define HPPA_ASM_IDTLBA(gr,sr,grb) asm volatile ("idtlba %0,(%1,%2)" \
- : : "r" (gr), \
- "i" (sr), \
- "r" (grb))
-
-/* Insert Instruction TLB Address IITLBA r,(s,b) */
-#define HPPA_ASM_IITLBA(gr,sr,grb) asm volatile ("iitlba %0,(%1,%2)" \
- : : "r" (gr), \
- "i" (sr), \
- "r" (grb))
-
-/* Insert Data TLB Protection IDTLBP r,(s,b) */
-#define HPPA_ASM_IDTLBP(gr,sr,grb) asm volatile ("idtlbp %0,(%1,%2)" \
- : : "r" (gr), \
- "i" (sr), \
- "r" (grb))
-
-/* Insert Instruction TLB Protection IITLBP r,(s,b) */
-#define HPPA_ASM_IITLBP(gr,sr,grb) asm volatile ("iitlbp %0,(%1,%2)" \
- : : "r" (gr), \
- "i" (sr), \
- "r" (grb))
-
-/* Purge Data Cache PDC x(s,b) */
-#define HPPA_ASM_PDC(grx,sr,grb) asm volatile ("pdc %0(%1,%2)" \
- : : "r" (grx), \
- "i" (sr), \
- "r" (grb))
-
-/* Flush Data Cache FDC x(s,b) */
-#define HPPA_ASM_FDC(grx,sr,grb) asm volatile ("fdc %0(%1,%2)" \
- : : "r" (grx), \
- "i" (sr), \
- "r" (grb))
-
-/* Flush Instruction Cache FDC x(s,b) */
-#define HPPA_ASM_FIC(grx,sr,grb) asm volatile ("fic %0(%1,%2)" \
- : : "r" (grx), \
- "i" (sr), \
- "r" (grb))
-
-/* Flush Data Cache Entry FDCE x(s,b) */
-#define HPPA_ASM_FDCE(grx,sr,grb) asm volatile ("fdce %0(%1,%2)" \
- : : "r" (grx), \
- "i" (sr), \
- "r" (grb))
-
-/* Flush Instruction Cache Entry FICE x(s,b) */
-#define HPPA_ASM_FICE(grx,sr,grb) asm volatile ("fice %0(%1,%2)" \
- : : "r" (grx), \
- "i" (sr), \
- "r" (grb))
-
-/* Break BREAK i5,i13 */
-#define HPPA_ASM_BREAK(i5,i13) asm volatile ("break %0,%1" \
- : : "i" (i5), \
- "i" (i13))
-
-/* Load and Clear Word Short LDCWS d(s,b),t */
-#define HPPA_ASM_LDCWS(i,sr,grb,grt) asm volatile ("ldcws %1(%2,%3),%0" \
- : "=r" (grt) \
- : "i" (i), \
- "i" (sr), \
- "r" (grb))
-
-/* Load and Clear Word Indexed LDCWX x(s,b),t */
-#define HPPA_ASM_LDCWX(grx,sr,grb,grt) asm volatile ("ldcwx %1(%2,%3),%0" \
- : "=r" (grt) \
- : "r" (grx), \
- "i" (sr), \
- "r" (grb))
-
-/* Load Word Absolute Short LDWAS d(b),t */
-/* NOTE: "short" here means "short displacement" */
-#define HPPA_ASM_LDWAS(disp,grbase,gr) asm volatile("ldwas %1(%2),%0" \
- : "=r" (gr) \
- : "i" (disp), \
- "r" (grbase))
-
-/* Store Word Absolute Short STWAS r,d(b) */
-/* NOTE: "short" here means "short displacement" */
-#define HPPA_ASM_STWAS(gr,disp,grbase) asm volatile("stwas %0,%1(%2)" \
- : : "r" (gr), \
- "i" (disp), \
- "r" (grbase))
-
-/*
- * Swap bytes
- * REFERENCE: PA72000 TRM -- Appendix C
- */
-#define HPPA_ASM_SWAPBYTES(value, swapped) asm volatile( \
- " shd %1,%1,16,%0 \n\
- dep %0,15,8,%0 \n\
- shd %1,%0,8,%0" \
- : "=r" (swapped) \
- : "r" (value) \
- )
-
-
-/* 72000 Diagnose instructions follow
- * These macros assume gas knows about these instructions.
- * gas2.2.u1 did not.
- * I added them to my copy and installed it locally.
- *
- * There are *very* special requirements for these guys
- * ref: TRM 6.1.3 Programming Constraints
- *
- * The macros below handle the following rules
- *
- * Except for WIT, WDT, WDD, WIDO, WIDE, all DIAGNOSE must be doubled.
- * Must never be nullified (hence the leading nop)
- * NOP must preced every RDD,RDT,WDD,WDT,RDTLB
- * Instruction preceeding GR_SHDW must not set any of the GR's saved
- *
- * The macros do *NOT* deal with the following problems
- * doubled DIAGNOSE instructions must not straddle a page boundary
- * if code translation enabled. (since 2nd could trap on ITLB)
- * If you care about DHIT and DPE bits of DR0, then
- * No store instruction in the 2 insn window before RDD
- */
-
-
-/* Move To CPU/DIAG register MTCPU r,t */
-#define HPPA_ASM_MTCPU(gr,dr) asm volatile (" nop \n" \
- " mtcpu %1,%0 \n" \
- " mtcpu %1,%0" \
- : : "i" (dr), \
- "r" (gr))
-
-/* Move From CPU/DIAG register MFCPU r,t */
-#define HPPA_ASM_MFCPU(dr,gr) asm volatile (" nop \n" \
- " mfcpu %1,%0\n" \
- " mfcpu %1,%0" \
- : "=r" (gr) \
- : "i" (dr))
-
-/* Transfer of Control Enable TOC_EN */
-#define HPPA_ASM_TOC_EN() asm volatile (" tocen \n" \
- " tocen")
-
-/* Transfer of Control Disable TOC_DIS */
-#define HPPA_ASM_TOC_DIS() asm volatile (" tocdis \n" \
- " tocdis")
-
-/* Shadow Registers to General Register SHDW_GR */
-#define HPPA_ASM_SHDW_GR() asm volatile (" shdwgr \n" \
- " shdwgr" \
- ::: "r1" "r8" "r9" "r16" \
- "r17" "r24" "r25")
-
-/* General Registers to Shadow Register GR_SHDW */
-#define HPPA_ASM_GR_SHDW() asm volatile (" nop \n" \
- " grshdw \n" \
- " grshdw")
-
-/*
- * Definitions of special registers for use by the above macros.
- */
-
-/* Hardware Space Registers */
-#define HPPA_SR0 0
-#define HPPA_SR1 1
-#define HPPA_SR2 2
-#define HPPA_SR3 3
-#define HPPA_SR4 4
-#define HPPA_SR5 5
-#define HPPA_SR6 6
-#define HPPA_SR7 7
-
-/* Hardware Control Registers */
-#define HPPA_CR0 0
-#define HPPA_RCTR 0 /* Recovery Counter Register */
-
-#define HPPA_CR8 8 /* Protection ID 1 */
-#define HPPA_PIDR1 8
-
-#define HPPA_CR9 9 /* Protection ID 2 */
-#define HPPA_PIDR2 9
-
-#define HPPA_CR10 10
-#define HPPA_CCR 10 /* Coprocessor Confiquration Register */
-
-#define HPPA_CR11 11
-#define HPPA_SAR 11 /* Shift Amount Register */
-
-#define HPPA_CR12 12
-#define HPPA_PIDR3 12 /* Protection ID 3 */
-
-#define HPPA_CR13 13
-#define HPPA_PIDR4 13 /* Protection ID 4 */
-
-#define HPPA_CR14 14
-#define HPPA_IVA 14 /* Interrupt Vector Address */
-
-#define HPPA_CR15 15
-#define HPPA_EIEM 15 /* External Interrupt Enable Mask */
-
-#define HPPA_CR16 16
-#define HPPA_ITMR 16 /* Interval Timer */
-
-#define HPPA_CR17 17
-#define HPPA_PCSQ 17 /* Program Counter Space queue */
-
-#define HPPA_CR18 18
-#define HPPA_PCOQ 18 /* Program Counter Offset queue */
-
-#define HPPA_CR19 19
-#define HPPA_IIR 19 /* Interruption Instruction Register */
-
-#define HPPA_CR20 20
-#define HPPA_ISR 20 /* Interruption Space Register */
-
-#define HPPA_CR21 21
-#define HPPA_IOR 21 /* Interruption Offset Register */
-
-#define HPPA_CR22 22
-#define HPPA_IPSW 22 /* Interrpution Processor Status Word */
-
-#define HPPA_CR23 23
-#define HPPA_EIRR 23 /* External Interrupt Request */
-
-#define HPPA_CR24 24
-#define HPPA_PPDA 24 /* Physcial Page Directory Address */
-#define HPPA_TR0 24 /* Temporary register 0 */
-
-#define HPPA_CR25 25
-#define HPPA_HTA 25 /* Hash Table Address */
-#define HPPA_TR1 25 /* Temporary register 1 */
-
-#define HPPA_CR26 26
-#define HPPA_TR2 26 /* Temporary register 2 */
-
-#define HPPA_CR27 27
-#define HPPA_TR3 27 /* Temporary register 3 */
-
-#define HPPA_CR28 28
-#define HPPA_TR4 28 /* Temporary register 4 */
-
-#define HPPA_CR29 29
-#define HPPA_TR5 29 /* Temporary register 5 */
-
-#define HPPA_CR30 30
-#define HPPA_TR6 30 /* Temporary register 6 */
-
-#define HPPA_CR31 31
-#define HPPA_CPUID 31 /* MP identifier */
-
-/*
- * Diagnose registers
- */
-
-#define HPPA_DR0 0
-#define HPPA_DR1 1
-#define HPPA_DR8 8
-#define HPPA_DR24 24
-#define HPPA_DR25 25
-
-/*
- * Tear apart a break instruction to find its type.
- */
-#define HPPA_BREAK5(x) ((x) & 0x1F)
-#define HPPA_BREAK13(x) (((x) >> 13) & 0x1FFF)
-
-/* assemble a break instruction */
-#define HPPA_BREAK(i5,i13) (((i5) & 0x1F) | (((i13) & 0x1FFF) << 13))
-
-
-/*
- * this won't work in ASM or non-GNU compilers
- */
-
-#if !defined(ASM) && defined(__GNUC__)
-
-/*
- * static inline utility functions to get at control registers
- */
-
-#define EMIT_GET_CONTROL(name, reg) \
-static __inline__ unsigned int \
-get_ ## name (void) \
-{ \
- unsigned int value; \
- HPPA_ASM_MFCTL(reg, value); \
- return value; \
-}
-
-#define EMIT_SET_CONTROL(name, reg) \
-static __inline__ void \
-set_ ## name (unsigned int new_value) \
-{ \
- HPPA_ASM_MTCTL(new_value, reg); \
-}
-
-#define EMIT_CONTROLS(name, reg) \
- EMIT_GET_CONTROL(name, reg) \
- EMIT_SET_CONTROL(name, reg)
-
-EMIT_CONTROLS(recovery, HPPA_RCTR); /* CR0 */
-EMIT_CONTROLS(pid1, HPPA_PIDR1); /* CR8 */
-EMIT_CONTROLS(pid2, HPPA_PIDR2); /* CR9 */
-EMIT_CONTROLS(ccr, HPPA_CCR); /* CR10; CCR and SCR share CR10 */
-EMIT_CONTROLS(scr, HPPA_CCR); /* CR10; CCR and SCR share CR10 */
-EMIT_CONTROLS(sar, HPPA_SAR); /* CR11 */
-EMIT_CONTROLS(pid3, HPPA_PIDR3); /* CR12 */
-EMIT_CONTROLS(pid4, HPPA_PIDR4); /* CR13 */
-EMIT_CONTROLS(iva, HPPA_IVA); /* CR14 */
-EMIT_CONTROLS(eiem, HPPA_EIEM); /* CR15 */
-EMIT_CONTROLS(itimer, HPPA_ITMR); /* CR16 */
-EMIT_CONTROLS(pcsq, HPPA_PCSQ); /* CR17 */
-EMIT_CONTROLS(pcoq, HPPA_PCOQ); /* CR18 */
-EMIT_CONTROLS(iir, HPPA_IIR); /* CR19 */
-EMIT_CONTROLS(isr, HPPA_ISR); /* CR20 */
-EMIT_CONTROLS(ior, HPPA_IOR); /* CR21 */
-EMIT_CONTROLS(ipsw, HPPA_IPSW); /* CR22 */
-EMIT_CONTROLS(eirr, HPPA_EIRR); /* CR23 */
-EMIT_CONTROLS(tr0, HPPA_TR0); /* CR24 */
-EMIT_CONTROLS(tr1, HPPA_TR1); /* CR25 */
-EMIT_CONTROLS(tr2, HPPA_TR2); /* CR26 */
-EMIT_CONTROLS(tr3, HPPA_TR3); /* CR27 */
-EMIT_CONTROLS(tr4, HPPA_TR4); /* CR28 */
-EMIT_CONTROLS(tr5, HPPA_TR5); /* CR29 */
-EMIT_CONTROLS(tr6, HPPA_TR6); /* CR30 */
-EMIT_CONTROLS(tr7, HPPA_CR31); /* CR31 */
-
-#endif /* ASM and GNU */
-
-/*
- * If and How to invoke the debugger (a ROM debugger generally)
- */
-#define CPU_INVOKE_DEBUGGER \
- do { \
- HPPA_ASM_BREAK(1,1); \
- } while (0)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* ! _INCLUDE_HPPA_H */
-
diff --git a/cpukit/score/cpu/hppa1.1/rtems/score/types.h b/cpukit/score/cpu/hppa1.1/rtems/score/types.h
deleted file mode 100644
index 512323819b..0000000000
--- a/cpukit/score/cpu/hppa1.1/rtems/score/types.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* hppatypes.h
- *
- * This include file contains type definitions pertaining to the Hewlett
- * Packard PA-RISC processor family.
- *
- * $Id$
- */
-
-#ifndef _INCLUDE_HPPATYPES_H
-#define _INCLUDE_HPPATYPES_H
-
-#ifndef ASM
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This section defines the basic types for this processor.
- */
-
-typedef unsigned char unsigned8; /* 8-bit unsigned integer */
-typedef unsigned short unsigned16; /* 16-bit unsigned integer */
-typedef unsigned int unsigned32; /* 32-bit unsigned integer */
-typedef unsigned long long unsigned64; /* 64-bit unsigned integer */
-
-typedef unsigned16 Priority_Bit_map_control;
-
-typedef signed char signed8; /* 8-bit signed integer */
-typedef signed short signed16; /* 16-bit signed integer */
-typedef signed int signed32; /* 32-bit signed integer */
-typedef signed long long signed64; /* 64 bit signed integer */
-
-typedef unsigned32 boolean; /* Boolean value */
-
-typedef float single_precision; /* single precision float */
-typedef double double_precision; /* double precision float */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !ASM */
-
-#endif /* _INCLUDE_HPPATYPES_H */
-/* end of include file */
diff --git a/cpukit/score/cpu/i386/Makefile.am b/cpukit/score/cpu/i386/Makefile.am
deleted file mode 100644
index ff1f7dd610..0000000000
--- a/cpukit/score/cpu/i386/Makefile.am
+++ /dev/null
@@ -1,48 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-
-SUBDIRS = rtems
-
-REL = $(ARCH)/rtems-cpu.rel
-
-C_FILES = cpu.c
-C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
-
-H_FILES = asm.h
-
-S_FILES = cpu_asm.S
-S_O_FILES = $(S_FILES:%.S=$(ARCH)/%.o)
-
-rtems_cpu_rel_OBJECTS = $(C_O_FILES) $(S_O_FILES)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../../../../automake/lib.am
-
-$(PROJECT_INCLUDE):
- $(mkinstalldirs) $@
-
-$(PROJECT_INCLUDE)/%.h: %.h
- $(INSTALL_DATA) $< $@
-
-$(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o: $(ARCH)/rtems.o
- $(INSTALL_DATA) $< $@
-
-$(REL): $(rtems_cpu_rel_OBJECTS)
- $(make-rel)
-
-PREINSTALL_FILES += $(PROJECT_INCLUDE) $(H_FILES:%=$(PROJECT_INCLUDE)/%)
-
-TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o
-
-all-local: $(ARCH) $(PREINSTALL_FILES) $(rtems_cpu_rel_OBJECTS) $(REL) $(TMPINSTALL_FILES)
-
-.PRECIOUS: $(REL)
-
-EXTRA_DIST = asm.h cpu.c cpu_asm.S rtems.S
-
-include $(top_srcdir)/../../../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/cpukit/score/cpu/i386/asm.h b/cpukit/score/cpu/i386/asm.h
deleted file mode 100644
index 3fbaa4cbd9..0000000000
--- a/cpukit/score/cpu/i386/asm.h
+++ /dev/null
@@ -1,138 +0,0 @@
-/* asm.h
- *
- * This include file attempts to address the problems
- * caused by incompatible flavors of assemblers and
- * toolsets. It primarily addresses variations in the
- * use of leading underscores on symbols and the requirement
- * that register names be preceded by a %.
- *
- *
- * NOTE: The spacing in the use of these macros
- * is critical to them working as advertised.
- *
- * COPYRIGHT:
- *
- * This file is based on similar code found in newlib available
- * from ftp.cygnus.com. The file which was used had no copyright
- * notice. This file is freely distributable as long as the source
- * of the file is noted. This file is:
- *
- * COPYRIGHT (c) 1994-1997.
- * On-Line Applications Research Corporation (OAR).
- *
- * $Id$
- */
-
-#ifndef __i386_ASM_h
-#define __i386_ASM_h
-
-/*
- * Indicate we are in an assembly file and get the basic CPU definitions.
- */
-
-#ifndef ASM
-#define ASM
-#endif
-#include <rtems/score/targopts.h>
-#include <rtems/score/i386.h>
-
-/*
- * Recent versions of GNU cpp define variables which indicate the
- * need for underscores and percents. If not using GNU cpp or
- * the version does not support this, then you will obviously
- * have to define these as appropriate.
- */
-
-/*
- * Looks like there is a bug in gcc 2.6.2 where this is not
- * defined correctly when configured as i386-coff and
- * i386-aout.
- */
-
-#undef __REGISTER_PREFIX__
-#define __REGISTER_PREFIX__ %
-
-/*
-#ifndef __REGISTER_PREFIX__
-#define __REGISTER_PREFIX__
-#endif
-*/
-
-/* ANSI concatenation macros. */
-
-#define CONCAT1(a, b) CONCAT2(a, b)
-#define CONCAT2(a, b) a ## b
-
-/* Use the right prefix for global labels. */
-
-#define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
-
-/* Use the right prefix for registers. */
-
-#define REG(x) CONCAT1 (__REGISTER_PREFIX__, x)
-
-#define eax REG (eax)
-#define ebx REG (ebx)
-#define ecx REG (ecx)
-#define edx REG (edx)
-#define esi REG (esi)
-#define edi REG (edi)
-#define esp REG (esp)
-#define ebp REG (ebp)
-#define cr0 REG (cr0)
-
-#define ax REG (ax)
-#define bx REG (bx)
-#define cx REG (cx)
-#define dx REG (dx)
-#define si REG (si)
-#define di REG (di)
-#define sp REG (sp)
-#define bp REG (bp)
-
-#define ah REG (ah)
-#define bh REG (bh)
-#define ch REG (ch)
-#define dh REG (dh)
-
-#define al REG (al)
-#define bl REG (bl)
-#define cl REG (cl)
-#define dl REG (dl)
-
-#define cs REG (cs)
-#define ds REG (ds)
-#define es REG (es)
-#define fs REG (fs)
-#define gs REG (gs)
-#define ss REG (ss)
-
-/*
- * Define macros to handle section beginning and ends.
- */
-
-
-#define BEGIN_CODE_DCL .text
-#define END_CODE_DCL
-#define BEGIN_DATA_DCL .data
-#define END_DATA_DCL
-#define BEGIN_CODE .text
-#define END_CODE
-#define BEGIN_DATA .data
-#define END_DATA
-#define BEGIN_BSS .bss
-#define END_BSS
-#define END
-
-/*
- * Following must be tailor for a particular flavor of the C compiler.
- * They may need to put underscores in front of the symbols.
- */
-
-#define PUBLIC(sym) .globl SYM (sym)
-#define EXTERN(sym) .globl SYM (sym)
-
-#endif
-/* end of include file */
-
-
diff --git a/cpukit/score/cpu/i386/cpu.c b/cpukit/score/cpu/i386/cpu.c
deleted file mode 100644
index e9b1b8dafa..0000000000
--- a/cpukit/score/cpu/i386/cpu.c
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
- * Intel i386 Dependent Source
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <bspIo.h>
-#include <rtems/score/thread.h>
-#include <libcpu/cpuModel.h>
-
-
-/* _CPU_Initialize
- *
- * This routine performs processor dependent initialization.
- *
- * INPUT PARAMETERS:
- * cpu_table - CPU table to initialize
- * thread_dispatch - address of disptaching routine
- */
-
-
-void _CPU_Initialize(
- rtems_cpu_table *cpu_table,
- void (*thread_dispatch) /* ignored on this CPU */
-)
-{
-#if CPU_HARDWARE_FP
- register unsigned16 fp_status asm ("ax");
- register void *fp_context;
-#endif
-
- _CPU_Table = *cpu_table;
-
- /*
- * The following code saves a NULL i387 context which is given
- * to each task at start and restart time. The following code
- * is based upon that provided in the i386 Programmer's
- * Manual and should work on any coprocessor greater than
- * the i80287.
- *
- * NOTE: The NO WAIT form of the coprocessor instructions
- * MUST be used in case there is not a coprocessor
- * to wait for.
- */
-
-#if CPU_HARDWARE_FP
- fp_status = 0xa5a5;
- asm volatile( "fninit" );
- asm volatile( "fnstsw %0" : "=a" (fp_status) : "0" (fp_status) );
-
- if ( fp_status == 0 ) {
-
- fp_context = &_CPU_Null_fp_context;
-
- asm volatile( "fsave (%0)" : "=r" (fp_context)
- : "0" (fp_context)
- );
- }
-#endif
-
-}
-
-/*PAGE
- *
- * _CPU_ISR_Get_level
- */
-
-unsigned32 _CPU_ISR_Get_level( void )
-{
- unsigned32 level;
-
- i386_get_interrupt_level( level );
-
- return level;
-}
-
-void _CPU_Thread_Idle_body ()
-{
- while(1){
- asm volatile ("hlt");
- }
-}
-
-void _defaultExcHandler (CPU_Exception_frame *ctx)
-{
- unsigned int faultAddr = 0;
- printk("----------------------------------------------------------\n");
- printk("Exception %d caught at PC %x by thread %d\n",
- ctx->idtIndex,
- ctx->eip,
- _Thread_Executing->Object.id);
- printk("----------------------------------------------------------\n");
- printk("Processor execution context at time of the fault was :\n");
- printk("----------------------------------------------------------\n");
- printk(" EAX = %x EBX = %x ECX = %x EDX = %x\n",
- ctx->eax, ctx->ebx, ctx->ecx, ctx->edx);
- printk(" ESI = %x EDI = %x EBP = %x ESP = %x\n",
- ctx->esi, ctx->edi, ctx->ebp, ctx->esp0);
- printk("----------------------------------------------------------\n");
- printk("Error code pushed by processor itself (if not 0) = %x\n",
- ctx->faultCode);
- printk("----------------------------------------------------------\n");
- if (ctx->idtIndex == I386_EXCEPTION_PAGE_FAULT){
- faultAddr = i386_get_cr2();
- printk("Page fault linear address (CR2) = %x\n", faultAddr);
- printk("----------------------------------------------------------\n\n");
- }
- if (_ISR_Nest_level > 0) {
- /*
- * In this case we shall not delete the task interrupted as
- * it has nothing to do with the fault. We cannot return either
- * because the eip points to the faulty instruction so...
- */
- printk("Exception while executing ISR!!!. System locked\n");
- _CPU_Fatal_halt(faultAddr);
- }
- else {
- /*
- * OK I could probably use a simplified version but at least this
- * should work.
- */
- printk(" ************ FAULTY THREAD WILL BE DELETED **************\n");
- rtems_task_delete(_Thread_Executing->Object.id);
- }
-}
-
-cpuExcHandlerType _currentExcHandler = _defaultExcHandler;
-
-extern void rtems_exception_prologue_0();
-extern void rtems_exception_prologue_1();
-extern void rtems_exception_prologue_2();
-extern void rtems_exception_prologue_3();
-extern void rtems_exception_prologue_4();
-extern void rtems_exception_prologue_5();
-extern void rtems_exception_prologue_6();
-extern void rtems_exception_prologue_7();
-extern void rtems_exception_prologue_8();
-extern void rtems_exception_prologue_9();
-extern void rtems_exception_prologue_10();
-extern void rtems_exception_prologue_11();
-extern void rtems_exception_prologue_12();
-extern void rtems_exception_prologue_13();
-extern void rtems_exception_prologue_14();
-extern void rtems_exception_prologue_16();
-extern void rtems_exception_prologue_17();
-extern void rtems_exception_prologue_18();
-
-static rtems_raw_irq_hdl tbl[] = {
- rtems_exception_prologue_0,
- rtems_exception_prologue_1,
- rtems_exception_prologue_2,
- rtems_exception_prologue_3,
- rtems_exception_prologue_4,
- rtems_exception_prologue_5,
- rtems_exception_prologue_6,
- rtems_exception_prologue_7,
- rtems_exception_prologue_8,
- rtems_exception_prologue_9,
- rtems_exception_prologue_10,
- rtems_exception_prologue_11,
- rtems_exception_prologue_12,
- rtems_exception_prologue_13,
- rtems_exception_prologue_14,
- rtems_exception_prologue_16,
- rtems_exception_prologue_17,
- rtems_exception_prologue_18,
-};
-
-void rtems_exception_init_mngt()
-{
- unsigned int i,j;
- interrupt_gate_descriptor *currentIdtEntry;
- unsigned limit;
- unsigned level;
-
- i = sizeof(tbl) / sizeof (rtems_raw_irq_hdl);
-
- i386_get_info_from_IDTR (&currentIdtEntry, &limit);
-
- _CPU_ISR_Disable(level);
- for (j = 0; j < i; j++) {
- create_interrupt_gate_descriptor (&currentIdtEntry[j], tbl[j]);
- }
- _CPU_ISR_Enable(level);
-}
-
diff --git a/cpukit/score/cpu/i386/cpu_asm.S b/cpukit/score/cpu/i386/cpu_asm.S
deleted file mode 100644
index 85316e357a..0000000000
--- a/cpukit/score/cpu/i386/cpu_asm.S
+++ /dev/null
@@ -1,274 +0,0 @@
-/* cpu_asm.s
- *
- * This file contains all assembly code for the Intel i386 implementation
- * of RTEMS.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <asm.h>
-
-/*
- * Format of i386 Register structure
- */
-
-.set REG_EFLAGS, 0
-.set REG_ESP, REG_EFLAGS + 4
-.set REG_EBP, REG_ESP + 4
-.set REG_EBX, REG_EBP + 4
-.set REG_ESI, REG_EBX + 4
-.set REG_EDI, REG_ESI + 4
-.set SIZE_REGS, REG_EDI + 4
-
- BEGIN_CODE
-
-/*
- * void _CPU_Context_switch( run_context, heir_context )
- *
- * This routine performs a normal non-FP context.
- */
-
- .p2align 1
- PUBLIC (_CPU_Context_switch)
-
-.set RUNCONTEXT_ARG, 4 # save context argument
-.set HEIRCONTEXT_ARG, 8 # restore context argument
-
-SYM (_CPU_Context_switch):
- movl RUNCONTEXT_ARG(esp),eax # eax = running threads context
- pushf # push eflags
- popl REG_EFLAGS(eax) # save eflags
- movl esp,REG_ESP(eax) # save stack pointer
- movl ebp,REG_EBP(eax) # save base pointer
- movl ebx,REG_EBX(eax) # save ebx
- movl esi,REG_ESI(eax) # save source register
- movl edi,REG_EDI(eax) # save destination register
-
- movl HEIRCONTEXT_ARG(esp),eax # eax = heir threads context
-
-restore:
- pushl REG_EFLAGS(eax) # push eflags
- popf # restore eflags
- movl REG_ESP(eax),esp # restore stack pointer
- movl REG_EBP(eax),ebp # restore base pointer
- movl REG_EBX(eax),ebx # restore ebx
- movl REG_ESI(eax),esi # restore source register
- movl REG_EDI(eax),edi # restore destination register
- ret
-
-/*
- * NOTE: May be unnecessary to reload some registers.
- */
-
-/*
- * void _CPU_Context_restore( new_context )
- *
- * This routine performs a normal non-FP context.
- */
-
- PUBLIC (_CPU_Context_restore)
-
-.set NEWCONTEXT_ARG, 4 # context to restore argument
-
-SYM (_CPU_Context_restore):
-
- movl NEWCONTEXT_ARG(esp),eax # eax = running threads context
- jmp restore
-
-/*PAGE
- * void _CPU_Context_save_fp_context( &fp_context_ptr )
- * void _CPU_Context_restore_fp_context( &fp_context_ptr )
- *
- * This section is used to context switch an i80287, i80387,
- * the built-in coprocessor or the i80486 or compatible.
- */
-
-.set FPCONTEXT_ARG, 4 # FP context argument
-
- .p2align 1
- PUBLIC (_CPU_Context_save_fp)
-SYM (_CPU_Context_save_fp):
- movl FPCONTEXT_ARG(esp),eax # eax = &ptr to FP context area
- movl (eax),eax # eax = FP context area
- fsave (eax) # save FP context
- ret
-
- .p2align 1
- PUBLIC (_CPU_Context_restore_fp)
-SYM (_CPU_Context_restore_fp):
- movl FPCONTEXT_ARG(esp),eax # eax = &ptr to FP context area
- movl (eax),eax # eax = FP context area
- frstor (eax) # restore FP context
- ret
-
- PUBLIC (_Exception_Handler)
-SYM (_Exception_Handler):
- pusha # Push general purpose registers
- pushl esp # Push exception frame address
- movl _currentExcHandler, eax # Call function storead in _currentExcHandler
- call * eax
- addl $4, esp
- popa # restore general purpose registers
- addl $8, esp # skill vector number and faultCode
- iret
-
-#define DISTINCT_EXCEPTION_WITH_FAULTCODE_ENTRY(_vector) \
- .p2align 4 ; \
- PUBLIC (rtems_exception_prologue_ ## _vector ) ; \
-SYM (rtems_exception_prologue_ ## _vector ): \
- pushl $ _vector ; \
- jmp SYM (_Exception_Handler) ;
-
-#define DISTINCT_EXCEPTION_WITHOUT_FAULTCODE_ENTRY(_vector) \
- .p2align 4 ; \
- PUBLIC (rtems_exception_prologue_ ## _vector ) ; \
-SYM (rtems_exception_prologue_ ## _vector ): \
- pushl $ 0 ; \
- pushl $ _vector ; \
- jmp SYM (_Exception_Handler) ;
-
-/*
- * Divide Error
- */
-DISTINCT_EXCEPTION_WITHOUT_FAULTCODE_ENTRY (0)
-/*
- * Debug Exception
- */
-DISTINCT_EXCEPTION_WITHOUT_FAULTCODE_ENTRY (1)
-/*
- * NMI
- */
-DISTINCT_EXCEPTION_WITHOUT_FAULTCODE_ENTRY (2)
-/*
- * Breakpoint
- */
-DISTINCT_EXCEPTION_WITHOUT_FAULTCODE_ENTRY (3)
-/*
- * Overflow
- */
-DISTINCT_EXCEPTION_WITHOUT_FAULTCODE_ENTRY (4)
-/*
- * Bound Range Exceeded
- */
-DISTINCT_EXCEPTION_WITHOUT_FAULTCODE_ENTRY (5)
-/*
- * Invalid Opcode
- */
-DISTINCT_EXCEPTION_WITHOUT_FAULTCODE_ENTRY (6)
-/*
- * No Math Coproc
- */
-DISTINCT_EXCEPTION_WITHOUT_FAULTCODE_ENTRY (7)
-/*
- * Double Fault
- */
-DISTINCT_EXCEPTION_WITH_FAULTCODE_ENTRY (8)
-/*
- * Coprocessor segment overrun
- */
-DISTINCT_EXCEPTION_WITHOUT_FAULTCODE_ENTRY (9)
-/*
- * Invalid TSS
- */
-DISTINCT_EXCEPTION_WITH_FAULTCODE_ENTRY (10)
-/*
- * Segment Not Present
- */
-DISTINCT_EXCEPTION_WITH_FAULTCODE_ENTRY (11)
-/*
- * Stack segment Fault
- */
-DISTINCT_EXCEPTION_WITH_FAULTCODE_ENTRY (12)
-/*
- * General Protection Fault
- */
-DISTINCT_EXCEPTION_WITH_FAULTCODE_ENTRY (13)
-/*
- * Page Fault
- */
-DISTINCT_EXCEPTION_WITH_FAULTCODE_ENTRY (14)
-/*
- * Floating point error (NB 15 is reserved it is therefor skipped)
- */
-DISTINCT_EXCEPTION_WITHOUT_FAULTCODE_ENTRY (16)
-/*
- * Aligment Check
- */
-DISTINCT_EXCEPTION_WITH_FAULTCODE_ENTRY (17)
-/*
- * Machine Check
- */
-DISTINCT_EXCEPTION_WITH_FAULTCODE_ENTRY (18)
-
-
-/*
- * void *i386_Logical_to_physical(
- * rtems_unsigned16 segment,
- * void *address
- * );
- *
- * Returns thirty-two bit physical address for segment:address.
- */
-
-.set SEGMENT_ARG, 4
-.set ADDRESS_ARG, 8
-
- PUBLIC (i386_Logical_to_physical)
-
-SYM (i386_Logical_to_physical):
-
- xorl eax,eax # clear eax
- movzwl SEGMENT_ARG(esp),ecx # ecx = segment value
- movl $ SYM (_Global_descriptor_table),edx
- # edx = address of our GDT
- addl ecx,edx # edx = address of desired entry
- movb 7(edx),ah # ah = base 31:24
- movb 4(edx),al # al = base 23:16
- shll $16,eax # move ax into correct bits
- movw 2(edx),ax # ax = base 0:15
- movl ADDRESS_ARG(esp),ecx # ecx = address to convert
- addl eax,ecx # ecx = physical address equivalent
- movl ecx,eax # eax = ecx
- ret
-
-/*
- * void *i386_Physical_to_logical(
- * rtems_unsigned16 segment,
- * void *address
- * );
- *
- * Returns thirty-two bit physical address for segment:address.
- */
-
-/*
- *.set SEGMENT_ARG, 4
- *.set ADDRESS_ARG, 8 -- use sets from above
- */
-
- PUBLIC (i386_Physical_to_logical)
-
-SYM (i386_Physical_to_logical):
- xorl eax,eax # clear eax
- movzwl SEGMENT_ARG(esp),ecx # ecx = segment value
- movl $ SYM (_Global_descriptor_table),edx
- # edx = address of our GDT
- addl ecx,edx # edx = address of desired entry
- movb 7(edx),ah # ah = base 31:24
- movb 4(edx),al # al = base 23:16
- shll $16,eax # move ax into correct bits
- movw 2(edx),ax # ax = base 0:15
- movl ADDRESS_ARG(esp),ecx # ecx = address to convert
- subl eax,ecx # ecx = logical address equivalent
- movl ecx,eax # eax = ecx
- ret
-
-END_CODE
-
-END
diff --git a/cpukit/score/cpu/i386/rtems/asm.h b/cpukit/score/cpu/i386/rtems/asm.h
deleted file mode 100644
index 3fbaa4cbd9..0000000000
--- a/cpukit/score/cpu/i386/rtems/asm.h
+++ /dev/null
@@ -1,138 +0,0 @@
-/* asm.h
- *
- * This include file attempts to address the problems
- * caused by incompatible flavors of assemblers and
- * toolsets. It primarily addresses variations in the
- * use of leading underscores on symbols and the requirement
- * that register names be preceded by a %.
- *
- *
- * NOTE: The spacing in the use of these macros
- * is critical to them working as advertised.
- *
- * COPYRIGHT:
- *
- * This file is based on similar code found in newlib available
- * from ftp.cygnus.com. The file which was used had no copyright
- * notice. This file is freely distributable as long as the source
- * of the file is noted. This file is:
- *
- * COPYRIGHT (c) 1994-1997.
- * On-Line Applications Research Corporation (OAR).
- *
- * $Id$
- */
-
-#ifndef __i386_ASM_h
-#define __i386_ASM_h
-
-/*
- * Indicate we are in an assembly file and get the basic CPU definitions.
- */
-
-#ifndef ASM
-#define ASM
-#endif
-#include <rtems/score/targopts.h>
-#include <rtems/score/i386.h>
-
-/*
- * Recent versions of GNU cpp define variables which indicate the
- * need for underscores and percents. If not using GNU cpp or
- * the version does not support this, then you will obviously
- * have to define these as appropriate.
- */
-
-/*
- * Looks like there is a bug in gcc 2.6.2 where this is not
- * defined correctly when configured as i386-coff and
- * i386-aout.
- */
-
-#undef __REGISTER_PREFIX__
-#define __REGISTER_PREFIX__ %
-
-/*
-#ifndef __REGISTER_PREFIX__
-#define __REGISTER_PREFIX__
-#endif
-*/
-
-/* ANSI concatenation macros. */
-
-#define CONCAT1(a, b) CONCAT2(a, b)
-#define CONCAT2(a, b) a ## b
-
-/* Use the right prefix for global labels. */
-
-#define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
-
-/* Use the right prefix for registers. */
-
-#define REG(x) CONCAT1 (__REGISTER_PREFIX__, x)
-
-#define eax REG (eax)
-#define ebx REG (ebx)
-#define ecx REG (ecx)
-#define edx REG (edx)
-#define esi REG (esi)
-#define edi REG (edi)
-#define esp REG (esp)
-#define ebp REG (ebp)
-#define cr0 REG (cr0)
-
-#define ax REG (ax)
-#define bx REG (bx)
-#define cx REG (cx)
-#define dx REG (dx)
-#define si REG (si)
-#define di REG (di)
-#define sp REG (sp)
-#define bp REG (bp)
-
-#define ah REG (ah)
-#define bh REG (bh)
-#define ch REG (ch)
-#define dh REG (dh)
-
-#define al REG (al)
-#define bl REG (bl)
-#define cl REG (cl)
-#define dl REG (dl)
-
-#define cs REG (cs)
-#define ds REG (ds)
-#define es REG (es)
-#define fs REG (fs)
-#define gs REG (gs)
-#define ss REG (ss)
-
-/*
- * Define macros to handle section beginning and ends.
- */
-
-
-#define BEGIN_CODE_DCL .text
-#define END_CODE_DCL
-#define BEGIN_DATA_DCL .data
-#define END_DATA_DCL
-#define BEGIN_CODE .text
-#define END_CODE
-#define BEGIN_DATA .data
-#define END_DATA
-#define BEGIN_BSS .bss
-#define END_BSS
-#define END
-
-/*
- * Following must be tailor for a particular flavor of the C compiler.
- * They may need to put underscores in front of the symbols.
- */
-
-#define PUBLIC(sym) .globl SYM (sym)
-#define EXTERN(sym) .globl SYM (sym)
-
-#endif
-/* end of include file */
-
-
diff --git a/cpukit/score/cpu/i386/rtems/score/cpu.h b/cpukit/score/cpu/i386/rtems/score/cpu.h
deleted file mode 100644
index ab256cfa57..0000000000
--- a/cpukit/score/cpu/i386/rtems/score/cpu.h
+++ /dev/null
@@ -1,501 +0,0 @@
-/* cpu.h
- *
- * This include file contains information pertaining to the Intel
- * i386 processor.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __CPU_h
-#define __CPU_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/i386.h> /* pick up machine definitions */
-#include <libcpu/cpu.h>
-
-#ifndef ASM
-#include <rtems/score/i386types.h>
-#endif
-
-/* conditional compilation parameters */
-
-#define CPU_INLINE_ENABLE_DISPATCH TRUE
-#define CPU_UNROLL_ENQUEUE_PRIORITY FALSE
-
-/*
- * i386 has an RTEMS allocated and managed interrupt stack.
- */
-
-#define CPU_HAS_SOFTWARE_INTERRUPT_STACK TRUE
-#define CPU_HAS_HARDWARE_INTERRUPT_STACK FALSE
-#define CPU_ALLOCATE_INTERRUPT_STACK TRUE
-
-/*
- * Does the RTEMS invoke the user's ISR with the vector number and
- * a pointer to the saved interrupt frame (1) or just the vector
- * number (0)?
- */
-
-#define CPU_ISR_PASSES_FRAME_POINTER 0
-
-/*
- * Some family members have no FP, some have an FPU such as the i387
- * for the i386, others have it built in (i486DX, Pentium).
- */
-
-#if ( I386_HAS_FPU == 1 )
-#define CPU_HARDWARE_FP TRUE /* i387 for i386 */
-#else
-#define CPU_HARDWARE_FP FALSE
-#endif
-
-#define CPU_ALL_TASKS_ARE_FP FALSE
-#define CPU_IDLE_TASK_IS_FP FALSE
-#define CPU_USE_DEFERRED_FP_SWITCH TRUE
-
-#define CPU_STACK_GROWS_UP FALSE
-#define CPU_STRUCTURE_ALIGNMENT
-
-/*
- * Does this port provide a CPU dependent IDLE task implementation?
- *
- * If TRUE, then the routine _CPU_Thread_Idle_body
- * must be provided and is the default IDLE thread body instead of
- * _CPU_Thread_Idle_body.
- *
- * If FALSE, then use the generic IDLE thread body if the BSP does
- * not provide one.
- */
-
-#define CPU_PROVIDES_IDLE_THREAD_BODY TRUE
-
-/*
- * Define what is required to specify how the network to host conversion
- * routines are handled.
- */
-
-#define CPU_HAS_OWN_HOST_TO_NETWORK_ROUTINES FALSE
-#define CPU_BIG_ENDIAN FALSE
-#define CPU_LITTLE_ENDIAN TRUE
-
-/* structures */
-
-/*
- * Basic integer context for the i386 family.
- */
-
-typedef struct {
- unsigned32 eflags; /* extended flags register */
- void *esp; /* extended stack pointer register */
- void *ebp; /* extended base pointer register */
- unsigned32 ebx; /* extended bx register */
- unsigned32 esi; /* extended source index register */
- unsigned32 edi; /* extended destination index flags register */
-} Context_Control;
-
-/*
- * FP context save area for the i387 numeric coprocessors.
- */
-
-typedef struct {
- unsigned8 fp_save_area[108]; /* context size area for I80387 */
- /* 28 bytes for environment */
-} Context_Control_fp;
-
-
-/*
- * The following structure defines the set of information saved
- * on the current stack by RTEMS upon receipt of execptions.
- *
- * idtIndex is either the interrupt number or the trap/exception number.
- * faultCode is the code pushed by the processor on some exceptions.
- */
-
-typedef struct {
- unsigned32 edi;
- unsigned32 esi;
- unsigned32 ebp;
- unsigned32 esp0;
- unsigned32 ebx;
- unsigned32 edx;
- unsigned32 ecx;
- unsigned32 eax;
- unsigned32 idtIndex;
- unsigned32 faultCode;
- unsigned32 eip;
- unsigned32 cs;
- unsigned32 eflags;
-} CPU_Exception_frame;
-
-typedef void (*cpuExcHandlerType) (CPU_Exception_frame*);
-extern cpuExcHandlerType _currentExcHandler;
-extern void rtems_exception_init_mngt();
-
-/*
- * The following structure defines the set of information saved
- * on the current stack by RTEMS upon receipt of each interrupt
- * that will lead to re-enter the kernel to signal the thread.
- */
-
-typedef CPU_Exception_frame CPU_Interrupt_frame;
-
-typedef enum {
- I386_EXCEPTION_DIVIDE_BY_ZERO = 0,
- I386_EXCEPTION_DEBUG = 1,
- I386_EXCEPTION_NMI = 2,
- I386_EXCEPTION_BREAKPOINT = 3,
- I386_EXCEPTION_OVERFLOW = 4,
- I386_EXCEPTION_BOUND = 5,
- I386_EXCEPTION_ILLEGAL_INSTR = 6,
- I386_EXCEPTION_MATH_COPROC_UNAVAIL = 7,
- I386_EXCEPTION_DOUBLE_FAULT = 8,
- I386_EXCEPTION_I386_COPROC_SEG_ERR = 9,
- I386_EXCEPTION_INVALID_TSS = 10,
- I386_EXCEPTION_SEGMENT_NOT_PRESENT = 11,
- I386_EXCEPTION_STACK_SEGMENT_FAULT = 12,
- I386_EXCEPTION_GENERAL_PROT_ERR = 13,
- I386_EXCEPTION_PAGE_FAULT = 14,
- I386_EXCEPTION_INTEL_RES15 = 15,
- I386_EXCEPTION_FLOAT_ERROR = 16,
- I386_EXCEPTION_ALIGN_CHECK = 17,
- I386_EXCEPTION_MACHINE_CHECK = 18,
- I386_EXCEPTION_ENTER_RDBG = 50 /* to enter manually RDBG */
-
-} Intel_symbolic_exception_name;
-
-
-/*
- * The following table contains the information required to configure
- * the i386 specific parameters.
- */
-
-typedef struct {
- void (*pretasking_hook)( void );
- void (*predriver_hook)( void );
- void (*postdriver_hook)( void );
- void (*idle_task)( void );
- boolean do_zero_of_workspace;
- unsigned32 idle_task_stack_size;
- unsigned32 interrupt_stack_size;
- unsigned32 extra_mpci_receive_server_stack;
- void * (*stack_allocate_hook)( unsigned32 );
- void (*stack_free_hook)( void* );
- /* end of fields required on all CPUs */
-
- unsigned32 interrupt_table_segment;
- void *interrupt_table_offset;
-} rtems_cpu_table;
-
-/*
- * Macros to access required entires in the CPU Table are in
- * the file rtems/system.h.
- */
-
-/*
- * Macros to access i386 specific additions to the CPU Table
- */
-
-#define rtems_cpu_configuration_get_interrupt_table_segment() \
- (_CPU_Table.interrupt_table_segment)
-
-#define rtems_cpu_configuration_get_interrupt_table_offset() \
- (_CPU_Table.interrupt_table_offset)
-
-/*
- * context size area for floating point
- *
- * NOTE: This is out of place on the i386 to avoid a forward reference.
- */
-
-#define CPU_CONTEXT_FP_SIZE sizeof( Context_Control_fp )
-
-/* variables */
-
-SCORE_EXTERN Context_Control_fp _CPU_Null_fp_context;
-SCORE_EXTERN void *_CPU_Interrupt_stack_low;
-SCORE_EXTERN void *_CPU_Interrupt_stack_high;
-
-/* constants */
-
-/*
- * This defines the number of levels and the mask used to pick those
- * bits out of a thread mode.
- */
-
-#define CPU_MODES_INTERRUPT_LEVEL 0x00000001 /* interrupt level in mode */
-#define CPU_MODES_INTERRUPT_MASK 0x00000001 /* interrupt level in mode */
-
-/*
- * extra stack required by the MPCI receive server thread
- */
-
-#define CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK 1024
-
-/*
- * i386 family supports 256 distinct vectors.
- */
-
-#define CPU_INTERRUPT_NUMBER_OF_VECTORS 256
-#define CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER (CPU_INTERRUPT_NUMBER_OF_VECTORS - 1)
-
-/*
- * Minimum size of a thread's stack.
- */
-
-#define CPU_STACK_MINIMUM_SIZE 1024
-
-/*
- * i386 is pretty tolerant of alignment. Just put things on 4 byte boundaries.
- */
-
-#define CPU_ALIGNMENT 4
-#define CPU_HEAP_ALIGNMENT CPU_ALIGNMENT
-#define CPU_PARTITION_ALIGNMENT CPU_ALIGNMENT
-
-/*
- * On i386 thread stacks require no further alignment after allocation
- * from the Workspace.
- */
-
-#define CPU_STACK_ALIGNMENT 0
-
-/* macros */
-
-/*
- * ISR handler macros
- *
- * These macros perform the following functions:
- * + disable all maskable CPU interrupts
- * + restore previous interrupt level (enable)
- * + temporarily restore interrupts (flash)
- * + set a particular level
- */
-
-#define _CPU_ISR_Disable( _level ) i386_disable_interrupts( _level )
-
-#define _CPU_ISR_Enable( _level ) i386_enable_interrupts( _level )
-
-#define _CPU_ISR_Flash( _level ) i386_flash_interrupts( _level )
-
-#define _CPU_ISR_Set_level( _new_level ) \
- { \
- if ( _new_level ) asm volatile ( "cli" ); \
- else asm volatile ( "sti" ); \
- }
-
-unsigned32 _CPU_ISR_Get_level( void );
-
-/* end of ISR handler macros */
-
-/*
- * Context handler macros
- *
- * These macros perform the following functions:
- * + initialize a context area
- * + restart the current thread
- * + calculate the initial pointer into a FP context area
- * + initialize an FP context area
- */
-
-#define CPU_EFLAGS_INTERRUPTS_ON 0x00003202
-#define CPU_EFLAGS_INTERRUPTS_OFF 0x00003002
-
-#define _CPU_Context_Initialize( _the_context, _stack_base, _size, \
- _isr, _entry_point, _is_fp ) \
- do { \
- unsigned32 _stack; \
- \
- if ( (_isr) ) (_the_context)->eflags = CPU_EFLAGS_INTERRUPTS_OFF; \
- else (_the_context)->eflags = CPU_EFLAGS_INTERRUPTS_ON; \
- \
- _stack = ((unsigned32)(_stack_base)) + (_size) - 4; \
- \
- *((proc_ptr *)(_stack)) = (_entry_point); \
- (_the_context)->ebp = (void *) _stack; \
- (_the_context)->esp = (void *) _stack; \
- } while (0)
-
-#define _CPU_Context_Restart_self( _the_context ) \
- _CPU_Context_restore( (_the_context) );
-
-#define _CPU_Context_Fp_start( _base, _offset ) \
- ( (void *) _Addresses_Add_offset( (_base), (_offset) ) )
-
-#define _CPU_Context_Initialize_fp( _fp_area ) \
- { \
- unsigned32 *_source = (unsigned32 *) &_CPU_Null_fp_context; \
- unsigned32 *_destination = *(_fp_area); \
- unsigned32 _index; \
- \
- for ( _index=0 ; _index < CPU_CONTEXT_FP_SIZE/4 ; _index++ ) \
- *_destination++ = *_source++; \
- }
-
-/* end of Context handler macros */
-
-/*
- * Fatal Error manager macros
- *
- * These macros perform the following functions:
- * + disable interrupts and halt the CPU
- */
-
-#define _CPU_Fatal_halt( _error ) \
- { \
- asm volatile ( "cli ; \
- movl %0,%%eax ; \
- hlt" \
- : "=r" ((_error)) : "0" ((_error)) \
- ); \
- }
-
-/* end of Fatal Error manager macros */
-
-/*
- * Bitfield handler macros
- *
- * These macros perform the following functions:
- * + scan for the highest numbered (MSB) set in a 16 bit bitfield
- */
-
-#define CPU_USE_GENERIC_BITFIELD_CODE FALSE
-#define CPU_USE_GENERIC_BITFIELD_DATA FALSE
-
-#define _CPU_Bitfield_Find_first_bit( _value, _output ) \
- { \
- register unsigned16 __value_in_register = (_value); \
- \
- _output = 0; \
- \
- asm volatile ( "bsfw %0,%1 " \
- : "=r" (__value_in_register), "=r" (_output) \
- : "0" (__value_in_register), "1" (_output) \
- ); \
- }
-
-/* end of Bitfield handler macros */
-
-/*
- * Priority handler macros
- *
- * These macros perform the following functions:
- * + return a mask with the bit for this major/minor portion of
- * of thread priority set.
- * + translate the bit number returned by "Bitfield_find_first_bit"
- * into an index into the thread ready chain bit maps
- */
-
-#define _CPU_Priority_Mask( _bit_number ) \
- ( 1 << (_bit_number) )
-
-#define _CPU_Priority_bits_index( _priority ) \
- (_priority)
-
-/* functions */
-
-/*
- * _CPU_Initialize
- *
- * This routine performs CPU dependent initialization.
- */
-
-void _CPU_Initialize(
- rtems_cpu_table *cpu_table,
- void (*thread_dispatch)
-);
-
-/*
- * _CPU_ISR_install_raw_handler
- *
- * This routine installs a "raw" interrupt handler directly into the
- * processor's vector table.
- */
-
-void _CPU_ISR_install_raw_handler(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-);
-
-/*
- * _CPU_ISR_install_vector
- *
- * This routine installs an interrupt vector.
- */
-
-void _CPU_ISR_install_vector(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-);
-
-/*
- * _CPU_Thread_Idle_body
- *
- * Use the halt instruction of low power mode of a particular i386 model.
- */
-
-#if (CPU_PROVIDES_IDLE_THREAD_BODY == TRUE)
-
-void _CPU_Thread_Idle_body( void );
-
-#endif /* CPU_PROVIDES_IDLE_THREAD_BODY */
-
-/*
- * _CPU_Context_switch
- *
- * This routine switches from the run context to the heir context.
- */
-
-void _CPU_Context_switch(
- Context_Control *run,
- Context_Control *heir
-);
-
-/*
- * _CPU_Context_restore
- *
- * This routine is generally used only to restart self in an
- * efficient manner and avoid stack conflicts.
- */
-
-void _CPU_Context_restore(
- Context_Control *new_context
-);
-
-/*
- * _CPU_Context_save_fp
- *
- * This routine saves the floating point context passed to it.
- */
-
-void _CPU_Context_save_fp(
- void **fp_context_ptr
-);
-
-/*
- * _CPU_Context_restore_fp
- *
- * This routine restores the floating point context passed to it.
- */
-
-void _CPU_Context_restore_fp(
- void **fp_context_ptr
-);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/cpu/i386/rtems/score/i386.h b/cpukit/score/cpu/i386/rtems/score/i386.h
deleted file mode 100644
index 977670a75b..0000000000
--- a/cpukit/score/cpu/i386/rtems/score/i386.h
+++ /dev/null
@@ -1,195 +0,0 @@
-/* i386.h
- *
- * This include file contains information pertaining to the Intel
- * i386 processor.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __i386_h
-#define __i386_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This section contains the information required to build
- * RTEMS for a particular member of the Intel i386
- * family when executing in protected mode. It does
- * this by setting variables to indicate which implementation
- * dependent features are present in a particular member
- * of the family.
- *
- * Currently recognized:
- * i386_fp (i386 DX or SX w/i387)
- * i386_nofp (i386 DX or SX w/o i387)
- * i486dx
- * i486sx
- * pentium
- * pentiumpro
- *
- * CPU Model Feature Flags:
- *
- * I386_HAS_BSWAP: Defined to "1" if the instruction for endian swapping
- * (bswap) should be used. This instruction appears to
- * be present in all i486's and above.
- *
- * I386_HAS_FPU: Defined to "1" if the CPU has an FPU.
- *
- */
-
-#if defined(i386_fp)
-
-#define CPU_MODEL_NAME "i386 with i387"
-#define I386_HAS_BSWAP 0
-
-#elif defined(i386_nofp)
-
-#define CPU_MODEL_NAME "i386 w/o i387"
-#define I386_HAS_FPU 0
-#define I386_HAS_BSWAP 0
-
-#elif defined(i486dx)
-
-#define CPU_MODEL_NAME "i486dx"
-
-#elif defined(i486sx)
-
-#define CPU_MODEL_NAME "i486sx"
-#define I386_HAS_FPU 0
-
-#elif defined(pentium)
-
-#define CPU_MODEL_NAME "Pentium"
-
-#elif defined(pentiumpro)
-
-#define CPU_MODEL_NAME "Pentium Pro"
-
-#else
-
-#error "Unsupported CPU Model"
-
-#endif
-
-/*
- * Set default values for CPU model feature flags
- *
- * NOTE: These settings are chosen to reflect most of the family members.
- */
-
-#ifndef I386_HAS_FPU
-#define I386_HAS_FPU 1
-#endif
-
-#ifndef I386_HAS_BSWAP
-#define I386_HAS_BSWAP 1
-#endif
-
-/*
- * Define the name of the CPU family.
- */
-
-#define CPU_NAME "Intel i386"
-
-#ifndef ASM
-
-/*
- * The following routine swaps the endian format of an unsigned int.
- * It must be static so it can be referenced indirectly.
- */
-
-static inline unsigned int i386_swap_U32(
- unsigned int value
-)
-{
- unsigned long lout;
-
-#if (I386_HAS_BSWAP == 0)
- asm volatile( "rorw $8,%%ax;"
- "rorl $16,%0;"
- "rorw $8,%%ax" : "=a" (lout) : "0" (value) );
-#else
- __asm__ volatile( "bswap %0" : "=r" (lout) : "0" (value));
-#endif
- return( lout );
-}
-
-static inline unsigned int i386_swap_U16(
- unsigned int value
-)
-{
- unsigned short sout;
-
- __asm__ volatile( "rorw $8,%0" : "=r" (sout) : "0" (value));
- return (sout);
-}
-
-
-/* routines */
-
-/*
- * i386_Logical_to_physical
- *
- * Converts logical address to physical address.
- */
-
-void *i386_Logical_to_physical(
- unsigned short segment,
- void *address
-);
-
-/*
- * i386_Physical_to_logical
- *
- * Converts physical address to logical address.
- */
-
-void *i386_Physical_to_logical(
- unsigned short segment,
- void *address
-);
-
-
-/*
- * "Simpler" names for a lot of the things defined in this file
- */
-
-/* segment access routines */
-
-#define get_cs() i386_get_cs()
-#define get_ds() i386_get_ds()
-#define get_es() i386_get_es()
-#define get_ss() i386_get_ss()
-#define get_fs() i386_get_fs()
-#define get_gs() i386_get_gs()
-
-#define CPU_swap_u32( _value ) i386_swap_U32( _value )
-#define CPU_swap_u16( _value ) i386_swap_U16( _value )
-
-/* i80x86 I/O instructions */
-
-#define outport_byte( _port, _value ) i386_outport_byte( _port, _value )
-#define outport_word( _port, _value ) i386_outport_word( _port, _value )
-#define outport_long( _port, _value ) i386_outport_long( _port, _value )
-#define inport_byte( _port, _value ) i386_inport_byte( _port, _value )
-#define inport_word( _port, _value ) i386_inport_word( _port, _value )
-#define inport_long( _port, _value ) i386_inport_long( _port, _value )
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !ASM */
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/cpu/i386/rtems/score/types.h b/cpukit/score/cpu/i386/rtems/score/types.h
deleted file mode 100644
index 1b9091f501..0000000000
--- a/cpukit/score/cpu/i386/rtems/score/types.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* i386types.h
- *
- * This include file contains type definitions pertaining to the Intel
- * i386 processor family.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __i386_TYPES_h
-#define __i386_TYPES_h
-
-#ifndef ASM
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This section defines the basic types for this processor.
- */
-
-typedef unsigned char unsigned8; /* unsigned 8-bit integer */
-typedef unsigned short unsigned16; /* unsigned 16-bit integer */
-typedef unsigned int unsigned32; /* unsigned 32-bit integer */
-typedef unsigned long long unsigned64; /* unsigned 64-bit integer */
-
-typedef unsigned16 Priority_Bit_map_control;
-
-typedef signed char signed8; /* 8-bit signed integer */
-typedef signed short signed16; /* 16-bit signed integer */
-typedef signed int signed32; /* 32-bit signed integer */
-typedef signed long long signed64; /* 64 bit signed integer */
-
-typedef unsigned32 boolean; /* Boolean value */
-
-typedef float single_precision; /* single precision float */
-typedef double double_precision; /* double precision float */
-
-typedef void i386_isr;
-
-typedef i386_isr ( *i386_isr_entry )( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !ASM */
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/cpu/i960/Makefile.am b/cpukit/score/cpu/i960/Makefile.am
deleted file mode 100644
index 9e45e1dcd4..0000000000
--- a/cpukit/score/cpu/i960/Makefile.am
+++ /dev/null
@@ -1,48 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-
-SUBDIRS = rtems
-
-C_FILES = cpu.c
-C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
-
-H_FILES = asm.h i960RP.h
-
-S_FILES = cpu_asm.S
-S_O_FILES = $(S_FILES:%.S=$(ARCH)/%.o)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../../../../automake/lib.am
-
-$(PROJECT_INCLUDE):
- $(mkinstalldirs) $@
-
-$(PROJECT_INCLUDE)/%.h: %.h
- $(INSTALL_DATA) $< $@
-
-$(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o: $(ARCH)/rtems.o
- $(INSTALL_DATA) $< $@
-
-REL = $(ARCH)/rtems-cpu.rel
-
-rtems_cpu_rel_OBJECTS = $(C_O_FILES) $(S_O_FILES)
-
-$(REL): $(rtems_cpu_rel_OBJECTS)
- $(make-rel)
-
-PREINSTALL_FILES += $(PROJECT_INCLUDE) $(H_FILES:%=$(PROJECT_INCLUDE)/%)
-
-TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o
-
-all-local: $(ARCH) $(PREINSTALL_FILES) $(rtems_cpu_rel_OBJECTS) $(REL) $(TMPINSTALL_FILES)
-
-.PRECIOUS: $(REL)
-
-EXTRA_DIST = asm.h cpu.c cpu_asm.S i960RP.h rtems.S
-
-include $(top_srcdir)/../../../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/cpukit/score/cpu/i960/asm.h b/cpukit/score/cpu/i960/asm.h
deleted file mode 100644
index a9a0788925..0000000000
--- a/cpukit/score/cpu/i960/asm.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/* asm.h
- *
- * This include file attempts to address the problems
- * caused by incompatible flavors of assemblers and
- * toolsets. It primarily addresses variations in the
- * use of leading underscores on symbols and the requirement
- * that register names be preceded by a %.
- *
- *
- * NOTE: The spacing in the use of these macros
- * is critical to them working as advertised.
- *
- * COPYRIGHT:
- *
- * This file is based on similar code found in newlib available
- * from ftp.cygnus.com. The file which was used had no copyright
- * notice. This file is freely distributable as long as the source
- * of the file is noted. This file is:
- *
- * COPYRIGHT (c) 1994-1997.
- * On-Line Applications Research Corporation (OAR).
- *
- * $Id$
- */
-
-#ifndef __i960_ASM_h
-#define __i960_ASM_h
-
-/*
- * Indicate we are in an assembly file and get the basic CPU definitions.
- */
-
-#ifndef ASM
-#define ASM
-#endif
-#include <rtems/score/targopts.h>
-#include <rtems/score/i960.h>
-
-/*
- * Recent versions of GNU cpp define variables which indicate the
- * need for underscores and percents. If not using GNU cpp or
- * the version does not support this, then you will obviously
- * have to define these as appropriate.
- */
-
-#ifndef __USER_LABEL_PREFIX__
-#define __USER_LABEL_PREFIX__ _
-#endif
-
-#ifndef __REGISTER_PREFIX__
-#define __REGISTER_PREFIX__
-#endif
-
-/* ANSI concatenation macros. */
-
-#define CONCAT1(a, b) CONCAT2(a, b)
-#define CONCAT2(a, b) a ## b
-
-/* Use the right prefix for global labels. */
-
-#define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
-
-/* Use the right prefix for registers. */
-
-#define REG(x) CONCAT1 (__REGISTER_PREFIX__, x)
-
-#define g0 REG (g0)
-#define g1 REG (g1)
-#define g2 REG (g2)
-#define g3 REG (g3)
-#define g4 REG (g4)
-#define g5 REG (g5)
-#define g6 REG (g6)
-#define g7 REG (g7)
-#define g8 REG (g8)
-#define g9 REG (g9)
-#define g10 REG (g10)
-#define g11 REG (g11)
-#define g12 REG (g12)
-#define g13 REG (g13)
-#define g14 REG (g14)
-#define g15 REG (g15)
-
-/*
- * Define macros to handle section beginning and ends.
- */
-
-
-#define BEGIN_CODE_DCL .text
-#define END_CODE_DCL
-#define BEGIN_DATA_DCL .data
-#define END_DATA_DCL
-#define BEGIN_CODE .text
-#define END_CODE
-#define BEGIN_DATA
-#define END_DATA
-#define BEGIN_BSS
-#define END_BSS
-#define END
-
-/*
- * Following must be tailor for a particular flavor of the C compiler.
- * They may need to put underscores in front of the symbols.
- */
-
-#define PUBLIC(sym) .globl SYM (sym)
-#define EXTERN(sym) .globl SYM (sym)
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/cpu/i960/cpu.c b/cpukit/score/cpu/i960/cpu.c
deleted file mode 100644
index b33d8e1b03..0000000000
--- a/cpukit/score/cpu/i960/cpu.c
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
- * Intel i960CA Dependent Source
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-/*
- * 1999/04/26: added support for Intel i960RP
- */
-
-#if defined(__i960CA__) || defined(__i960_CA__) || defined(__i960CA)
-#elif defined(__i960RP__)
-#else
-#warning "*** ENTIRE FILE IMPLEMENTED & TESTED FOR CA & RP ONLY ***"
-#warning "*** THIS FILE WILL NOT COMPILE ON ANOTHER FAMILY MEMBER ***"
-#endif
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-
-/* _CPU_Initialize
- *
- * This routine performs processor dependent initialization.
- *
- * INPUT PARAMETERS:
- * cpu_table - CPU table to initialize
- * thread_dispatch - address of disptaching routine
- *
- * OUTPUT PARAMETERS: NONE
- */
-
-void _CPU_Initialize(
- rtems_cpu_table *cpu_table,
- void (*thread_dispatch) /* ignored on this CPU */
-)
-{
-
- _CPU_Table = *cpu_table;
-
-}
-
-/*PAGE
- *
- * _CPU_ISR_Get_level
- */
-
-unsigned32 _CPU_ISR_Get_level( void )
-{
- unsigned32 level;
-
- i960_get_interrupt_level( level );
-
- return level;
-}
-
-/*PAGE
- *
- * _CPU_ISR_install_raw_handler
- */
-
-#if defined(__i960CA__) || defined(__i960_CA__) || defined(__i960CA)
-#define i960_vector_caching_enabled( _prcb ) \
- ((_prcb)->control_tbl->icon & 0x2000)
-#elif defined(__i960RP__)
-#define i960_vector_caching_enabled( _prcb ) \
- ((*((unsigned int *) ICON_ADDR)) & 0x2000)
-#endif
-
-void _CPU_ISR_install_raw_handler(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-)
-{
- i960_PRCB *prcb = _CPU_Table.Prcb;
- proc_ptr *cached_intr_tbl = NULL;
-
- /* The i80960CA does not support vectors 0-7. The first 9 entries
- * in the Interrupt Table are used to manage pending interrupts.
- * Thus vector 8, the first valid vector number, is actually in
- * slot 9 in the table.
- */
-
- *old_handler = prcb->intr_tbl[ vector + 1 ];
-
- prcb->intr_tbl[ vector + 1 ] = new_handler;
-
- if ( i960_vector_caching_enabled( prcb ) )
- if ( (vector & 0xf) == 0x2 ) /* cacheable? */
- cached_intr_tbl[ vector >> 4 ] = new_handler;
-}
-
-/*PAGE
- *
- * _CPU__ISR_install_vector
- *
- * Install the RTEMS vector wrapper in the CPU's interrupt table.
- *
- * Input parameters:
- * vector - interrupt vector number
- * old_handler - former ISR for this vector number
- * new_handler - replacement ISR for this vector number
- *
- * Output parameters: NONE
- *
- */
-
-void _CPU_ISR_install_vector(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-)
-{
- proc_ptr ignored;
-
- *old_handler = _ISR_Vector_table[ vector ];
-
- _CPU_ISR_install_raw_handler( vector, _ISR_Handler, &ignored );
-
- _ISR_Vector_table[ vector ] = new_handler;
-}
-
-/*PAGE
- *
- * _CPU_Install_interrupt_stack
- */
-
-#if defined(__i960CA__) || defined(__i960_CA__) || defined(__i960CA)
-#define soft_reset( prcb ) \
- { register i960_PRCB *_prcb = (prcb); \
- register unsigned32 *_next=0; \
- register unsigned32 _cmd = 0x30000; \
- asm volatile( "lda next,%1; \
- sysctl %0,%1,%2; \
- next: mov g0,g0" \
- : "=d" (_cmd), "=d" (_next), "=d" (_prcb) \
- : "0" (_cmd), "1" (_next), "2" (_prcb) ); \
- }
-#else
-#if defined(__i960RP__) || defined(__i960_RP__) || defined(__i960RP)
-#define soft_reset( prcb ) \
- { register i960_PRCB *_prcb = (prcb); \
- register unsigned32 *_next=0; \
- register unsigned32 _cmd = 0x300; \
- asm volatile( "lda next,%1; \
- sysctl %0,%1,%2; \
- next: mov g0,g0" \
- : "=d" (_cmd), "=d" (_next), "=d" (_prcb) \
- : "0" (_cmd), "1" (_next), "2" (_prcb) ); \
- }
-#endif
-#endif
-
-void _CPU_Install_interrupt_stack( void )
-{
- i960_PRCB *prcb = _CPU_Table.Prcb;
- unsigned32 level;
-#if defined(__i960RP__) || defined(__i960_RP__)
- unsigned32 *isp = (int *) ISP_ADDR;
-#endif
-
- /*
- * Set the Interrupt Stack in the PRCB and force a reload of it.
- * Interrupts are disabled for safety.
- */
-
- _CPU_ISR_Disable( level );
-
- prcb->intr_stack = _CPU_Interrupt_stack_low;
-
-#if defined(__i960CA__) || defined(__i960_CA__) || defined(__i960CA)
- soft_reset( prcb );
-#elif defined(__i960RP__) || defined(__i960_RP__) || defined(__i960RP)
- *isp = (unsigned32) prcb->intr_stack;
-#endif
-
- _CPU_ISR_Enable( level );
-}
diff --git a/cpukit/score/cpu/i960/cpu_asm.S b/cpukit/score/cpu/i960/cpu_asm.S
deleted file mode 100644
index e990b7a799..0000000000
--- a/cpukit/score/cpu/i960/cpu_asm.S
+++ /dev/null
@@ -1,244 +0,0 @@
-/* cpu_asm.s
- *
- * This file contains all assembly code for the i960CA implementation
- * of RTEMS.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
- .data
- .align 4
-_soft_reset_reg_save:
- .word 0
- .word 0
- .word 0
- .word 0
-_ISR_reg_save:
- .word 0
- .word 0
- .word 0
- .word 0
- .word 0
- .word 0
-
- .text
-/*
- * Format of i960ca Register structure
- */
-
-.set REG_R0_PFP , 0 # (r0) Previous Frame Pointer
-.set REG_R1_SP , REG_R0_PFP+4 # (r1) Stack Pointer
-.set REG_PC , REG_R1_SP+4 # (pc) Processor Controls
-.set REG_G8 , REG_PC+4 # (g8) Global Register 8
-.set REG_G9 , REG_G8+4 # (g9) Global Register 9
-.set REG_G10 , REG_G9+4 # (g10) Global Register 10
-.set REG_G11 , REG_G10+4 # (g11) Global Register 11
-.set REG_G12 , REG_G11+4 # (g12) Global Register 12
-.set REG_G13 , REG_G12+4 # (g13) Global Register 13
-.set REG_G14 , REG_G13+4 # (g14) Global Register 14
-.set REG_G15_FP , REG_G14+4 # (g15) Global Register 15
-.set SIZE_REGS , REG_G15_FP+4 # size of cpu_context_registers
- # structure
-
-/*
- * void _CPU_Context_switch( run_context, heir_context )
- *
- * This routine performs a normal non-FP context.
- */
- .align 4
- .globl __CPU_Context_switch
-
-__CPU_Context_switch:
- modpc 0,0,g2 # get old intr level (PC)
- st g2,REG_PC(g0) # save pc
- stq g8,REG_G8(g0) # save g8-g11
- stq g12,REG_G12(g0) # save g12-g15
- stl pfp,REG_R0_PFP(g0) # save pfp, sp
-
-restore: flushreg # flush register cache
- ldconst 0x001f0000,g2 # g2 = PC mask
- ld REG_PC(g1),g3 # thread->Regs.pc = pc;
- ldq REG_G12(g1),g12 # restore g12-g15
- ldl REG_R0_PFP(g1),pfp # restore pfp, sp
- ldq REG_G8(g1),g8 # restore g8-g11
- modpc 0,g2,g3 # restore PC register
- ret
-
-/*
- * void _CPU_Context_restore( new_context )
- *
- * This routine performs a normal non-FP context.
- */
-
- .globl __CPU_Context_restore
-__CPU_Context_restore:
- mov g0,g1 # g0 = _Thread_executing
- b restore
-
-/*PAGE
- * void _CPU_Context_save_fp_context( &fp_context_ptr )
- * void _CPU_Context_restore_fp_context( &fp_context_ptr )
- *
- * There is currently no hardware floating point for the i960.
- */
-
- .globl __CPU_Context_save_fp
- .globl __CPU_Context_restore_fp
-__CPU_Context_save_fp:
-__CPU_Context_restore_fp:
-#if ( I960_HAS_FPU == 1 )
-#error "Floating point support for i960 family has been implemented!!!"
-#endif
- ret
-
-/*PAGE
- * void __ISR_Handler()
- *
- * This routine provides the RTEMS interrupt management.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * NOTE:
- * Upon entry, the supervisor stack will contain a stack frame
- * back to the interrupted thread and the interrupt stack will contain
- * an interrupt stack frame. If dispatching is enabled, this
- * is the outer most interrupt, and (a context switch is necessary or
- * the current thread has signals), then set up the supervisor stack to
- * transfer control to the interrupt dispatcher.
- */
-
- .globl __ISR_Handler
-__ISR_Handler:
- #ldconst 1,r8
- #modpc 0,r8,r8 # enable tracing
-
- # r4 = &_Thread_Dispatch_disable_level
- ld __Thread_Dispatch_disable_level,r4
- movl g0,r8 # save g0-g1
-
- ld -16+8(fp),g0 # g0 = vector number
- movl g2,r10 # save g2-g3
-
- ld __ISR_Nest_level,r5 # r5 = &_Isr_nest_level
- mov g14,r7 # save g14
-
- lda 0,g14 # NOT Branch and Link
- movl g4,r12 # save g4-g5
-
- lda 1(r4),r4 # increment dispatch disable level
- movl g6,r14 # save g6-g7
-
- stq g8, _ISR_reg_save # save g8-g11
- stl g12, _ISR_reg_save+16 # save g12-g13
-
- ld __ISR_Vector_table[g0*4],g1 # g1 = Users handler
- addo 1,r5,r5 # increment ISR level
-
- st r4,__Thread_Dispatch_disable_level
- # one ISR nest level deeper
- subo 1,r4,r4 # decrement dispatch disable level
-
- st r5,__ISR_Nest_level # disable multitasking
- subo 1,r5,r5 # decrement ISR nest level
-
- callx (g1) # invoke user ISR
-
- # unnest multitasking
- st r5,__ISR_Nest_level # one less ISR nest level
- cmpobne.f 0,r4,exit # If dispatch disabled, exit
- ldl -16(fp),g0 # g0 = threads PC reg
- # g1 = threads AC reg
- ld __Context_Switch_necessary,r6
- # r6 = Is thread switch necessary?
- bbs.f 13,g0,exit # not outer level, then exit
- cmpobne.f 0,r6,bframe # Switch necessary?
-
- ld __ISR_Signals_to_thread_executing,g2
- # signals sent to Run_thread
- # while in interrupt handler?
- cmpobe.f 0,g2,exit # No, then exit
-
-bframe: mov 0,g2
- st g2,__ISR_Signals_to_thread_executing
-
- ldconst 0x1f0000,g2 # g2 = intr disable mask
- mov g2,g3 # g3 = new intr level
- modpc 0,g2,g3 # set new level
-
- andnot 7,pfp,r4 # r4 = pfp without ret type
- flushreg # flush registers
- # push _Isr_dispatch ret frame
- # build ISF in r4-r6
- ldconst 64,g2 # g2 = size of stack frame
- ld 4(r4),g3 # g3 = previous sp
- addo g2,g3,r5 # r5 = _Isr_dispatch SP
- lda __ISR_Dispatch,r6 # r6 = _Isr_dispatch entry
- stt r4,(g3) # set _Isr_dispatch ret info
- st g1,16(g3) # set r4 = AC for ISR disp
- or 7,g3,pfp # pfp to _Isr_dispatch
- flushreg
- b exit1
-exit: st r4,__Thread_Dispatch_disable_level
-exit1: mov r7,g14 # restore g14
- movq r8,g0 # restore g0-g3
- movq r12,g4 # restore g4-g7
- ldq _ISR_reg_save, g8 # restore g8-g11
- ldl _ISR_reg_save+16, g12 # restore g12-g13
- ret
-
-
-/*PAGE
- *
- * void __ISR_Dispatch()
- *
- * Entry point from the outermost interrupt service routine exit.
- * The current stack is the supervisor mode stack.
- */
-
-__ISR_Dispatch:
- mov g14,r7
- mov 0,g14
- movq g0,r8
- movq g4,r12
- call __Thread_Dispatch
-
- ldconst -1,r5 # r5 = reload mask
- modac r5,r4,r4 # restore threads AC register
- mov r7,g14
- movq r8,g0
- movq r12,g4
- ret
-
-
-/*PAGE
- *
- * void __i960_soft_reset_asm
- *
- * Flush the register cache and save the important (fp, pfp, sp) registers,
- * which are clobbered by the reinit operation. (Not documented, but it happens).
- */
-
- .globl __i960_soft_reset_asm
-__i960_soft_reset_asm:
- flushreg # flush register cache
- mov fp, r4
- mov pfp, r5
- mov sp, r6
- stt r4, _soft_reset_reg_save # save fp, pfp, sp
- lda __i960_reset_done, r4
- ldconst 0x300, r5
- sysctl r5, r4, g0 # reinit: clobbers almost all registers
-__i960_reset_done:
- ldt _soft_reset_reg_save, r4 # restore fp, pfp, sp
- mov r4, fp
- mov r5, pfp
- mov r6, sp
- ret
diff --git a/cpukit/score/cpu/i960/rtems/score/cpu.h b/cpukit/score/cpu/i960/rtems/score/cpu.h
deleted file mode 100644
index ef7c3ad968..0000000000
--- a/cpukit/score/cpu/i960/rtems/score/cpu.h
+++ /dev/null
@@ -1,479 +0,0 @@
-/* cpu.h
- *
- * This include file contains information pertaining to the Intel
- * i960 processor family.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __CPU_h
-#define __CPU_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#pragma align 4 /* for GNU C structure alignment */
-
-#include <rtems/score/i960.h> /* pick up machine definitions */
-#ifndef ASM
-#include <rtems/score/i960types.h>
-#endif
-
-#define CPU_INLINE_ENABLE_DISPATCH FALSE
-#define CPU_UNROLL_ENQUEUE_PRIORITY FALSE
-
-/*
- * Use the i960's hardware interrupt stack support and have the
- * interrupt manager allocate the memory for it.
- */
-
-#define CPU_HAS_SOFTWARE_INTERRUPT_STACK FALSE
-#define CPU_HAS_HARDWARE_INTERRUPT_STACK TRUE
-#define CPU_ALLOCATE_INTERRUPT_STACK TRUE
-
-/*
- * Does the RTEMS invoke the user's ISR with the vector number and
- * a pointer to the saved interrupt frame (1) or just the vector
- * number (0)?
- */
-
-#define CPU_ISR_PASSES_FRAME_POINTER 0
-
-/*
- * Some family members have no FP (SA/KA/CA/CF), others have it built in
- * (KB/MC/MX). There does not appear to be an external coprocessor
- * for this family.
- */
-
-#if ( I960_HAS_FPU == 1 )
-#define CPU_HARDWARE_FP TRUE
-#error "Floating point support for i960 family has been implemented!!!"
-#else
-#define CPU_HARDWARE_FP FALSE
-#endif
-
-#define CPU_ALL_TASKS_ARE_FP FALSE
-#define CPU_IDLE_TASK_IS_FP FALSE
-#define CPU_USE_DEFERRED_FP_SWITCH TRUE
-
-#define CPU_PROVIDES_IDLE_THREAD_BODY FALSE
-#define CPU_STACK_GROWS_UP TRUE
-#define CPU_STRUCTURE_ALIGNMENT /* __attribute__ ((aligned (16))) */
-
-/*
- * Define what is required to specify how the network to host conversion
- * routines are handled.
- */
-
-#define CPU_HAS_OWN_HOST_TO_NETWORK_ROUTINES FALSE
-#define CPU_BIG_ENDIAN TRUE
-#define CPU_LITTLE_ENDIAN FALSE
-
-
-/* structures */
-
-/*
- * Basic integer context for the i960 family.
- */
-
-typedef struct {
- void *r0_pfp; /* (r0) Previous Frame Pointer */
- void *r1_sp; /* (r1) Stack Pointer */
- unsigned32 pc; /* (pc) Processor Control */
- void *g8; /* (g8) Global Register 8 */
- void *g9; /* (g9) Global Register 9 */
- void *g10; /* (g10) Global Register 10 */
- void *g11; /* (g11) Global Register 11 */
- void *g12; /* (g12) Global Register 12 */
- void *g13; /* (g13) Global Register 13 */
- unsigned32 g14; /* (g14) Global Register 14 */
- void *g15_fp; /* (g15) Frame Pointer */
-} Context_Control;
-
-/*
- * FP context save area for the i960 Numeric Extension
- */
-
-typedef struct {
- unsigned32 fp0_1; /* (fp0) first word */
- unsigned32 fp0_2; /* (fp0) second word */
- unsigned32 fp0_3; /* (fp0) third word */
- unsigned32 fp1_1; /* (fp1) first word */
- unsigned32 fp1_2; /* (fp1) second word */
- unsigned32 fp1_3; /* (fp1) third word */
- unsigned32 fp2_1; /* (fp2) first word */
- unsigned32 fp2_2; /* (fp2) second word */
- unsigned32 fp2_3; /* (fp2) third word */
- unsigned32 fp3_1; /* (fp3) first word */
- unsigned32 fp3_2; /* (fp3) second word */
- unsigned32 fp3_3; /* (fp3) third word */
-} Context_Control_fp;
-
-/*
- * The following structure defines the set of information saved
- * on the current stack by RTEMS upon receipt of each interrupt.
- */
-
-typedef struct {
- unsigned32 TBD; /* XXX Fix for this CPU */
-} CPU_Interrupt_frame;
-
-/*
- * Call frame for the i960 family.
- */
-
-typedef struct {
- void *r0_pfp; /* (r0) Previous Frame Pointer */
- void *r1_sp; /* (r1) Stack Pointer */
- void *r2_rip; /* (r2) Return Instruction Pointer */
- void *r3; /* (r3) Local Register 3 */
- void *r4; /* (r4) Local Register 4 */
- void *r5; /* (r5) Local Register 5 */
- void *r6; /* (r6) Local Register 6 */
- void *r7; /* (r7) Local Register 7 */
- void *r8; /* (r8) Local Register 8 */
- void *r9; /* (r9) Local Register 9 */
- void *r10; /* (r10) Local Register 10 */
- void *r11; /* (r11) Local Register 11 */
- void *r12; /* (r12) Local Register 12 */
- void *r13; /* (r13) Local Register 13 */
- void *r14; /* (r14) Local Register 14 */
- void *r15; /* (r15) Local Register 15 */
- /* XXX Looks like sometimes there is FP stuff here (MC manual)? */
-} CPU_Call_frame;
-
-/*
- * The following table contains the information required to configure
- * the i960 specific parameters.
- */
-
-typedef struct {
- void (*pretasking_hook)( void );
- void (*predriver_hook)( void );
- void (*postdriver_hook)( void );
- void (*idle_task)( void );
- boolean do_zero_of_workspace;
- unsigned32 idle_task_stack_size;
- unsigned32 interrupt_stack_size;
- unsigned32 extra_mpci_receive_server_stack;
- void * (*stack_allocate_hook)( unsigned32 );
- void (*stack_free_hook)( void* );
- /* end of fields required on all CPUs */
-
- i960_PRCB *Prcb;
-} rtems_cpu_table;
-
-/*
- * Macros to access required entires in the CPU Table are in
- * the file rtems/system.h.
- */
-
-/*
- * Macros to access i960 specific additions to the CPU Table
- */
-
-#define rtems_cpu_configuration_get_prcb() \
- (_CPU_Table.Prcb)
-
-/* variables */
-
-SCORE_EXTERN void *_CPU_Interrupt_stack_low;
-SCORE_EXTERN void *_CPU_Interrupt_stack_high;
-
-/* constants */
-
-/*
- * This defines the number of levels and the mask used to pick those
- * bits out of a thread mode.
- */
-
-#define CPU_MODES_INTERRUPT_LEVEL 0x0000001f /* interrupt level in mode */
-#define CPU_MODES_INTERRUPT_MASK 0x0000001f /* interrupt level in mode */
-
-/*
- * context size area for floating point
- */
-
-#define CPU_CONTEXT_FP_SIZE sizeof( Context_Control_fp )
-
-/*
- * extra stack required by the MPCI receive server thread
- */
-
-#define CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK (CPU_STACK_MINIMUM_SIZE)
-
-/*
- * i960 family supports 256 distinct vectors.
- */
-
-#define CPU_INTERRUPT_NUMBER_OF_VECTORS 256
-#define CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER (CPU_INTERRUPT_NUMBER_OF_VECTORS - 1)
-
-/*
- * Minimum size of a thread's stack.
- *
- * NOTE: See CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK
- */
-
-#define CPU_STACK_MINIMUM_SIZE 2048
-
-/*
- * i960 is pretty tolerant of alignment but some CPU models do
- * better with different default aligments so we use what the
- * CPU model selected in rtems/score/i960.h.
- */
-
-#define CPU_ALIGNMENT I960_CPU_ALIGNMENT
-#define CPU_HEAP_ALIGNMENT CPU_ALIGNMENT
-#define CPU_PARTITION_ALIGNMENT CPU_ALIGNMENT
-
-/*
- * i960ca stack requires 16 byte alignment
- *
- * NOTE: This factor may need to be family member dependent.
- */
-
-#define CPU_STACK_ALIGNMENT 16
-
-/* macros */
-
-/*
- * ISR handler macros
- *
- * These macros perform the following functions:
- * + disable all maskable CPU interrupts
- * + restore previous interrupt level (enable)
- * + temporarily restore interrupts (flash)
- * + set a particular level
- */
-
-#define _CPU_ISR_Disable( _level ) i960_disable_interrupts( _level )
-#define _CPU_ISR_Enable( _level ) i960_enable_interrupts( _level )
-#define _CPU_ISR_Flash( _level ) i960_flash_interrupts( _level )
-
-#define _CPU_ISR_Set_level( newlevel ) \
- { \
- unsigned32 _mask = 0; \
- unsigned32 _level = (newlevel); \
- \
- __asm__ volatile ( "ldconst 0x1f0000,%0; \
- modpc 0,%0,%1" : "=d" (_mask), "=d" (_level) \
- : "0" (_mask), "1" (_level) \
- ); \
- }
-
-unsigned32 _CPU_ISR_Get_level( void );
-
-/* ISR handler section macros */
-
-/*
- * Context handler macros
- *
- * These macros perform the following functions:
- * + initialize a context area
- * + restart the current thread
- * + calculate the initial pointer into a FP context area
- * + initialize an FP context area
- */
-
-#define _CPU_Context_Initialize( _the_context, _stack_base, _size, \
- _isr, _entry, _is_fp ) \
- { CPU_Call_frame *_texit_frame; \
- unsigned32 _mask; \
- unsigned32 _base_pc; \
- unsigned32 _stack_tmp; \
- void *_stack; \
- \
- _stack_tmp = (unsigned32)(_stack_base) + CPU_STACK_ALIGNMENT; \
- _stack_tmp &= ~(CPU_STACK_ALIGNMENT - 1); \
- _stack = (void *) _stack_tmp; \
- \
- __asm__ volatile ( "flushreg" : : ); /* flush register cache */ \
- \
- (_the_context)->r0_pfp = _stack; \
- (_the_context)->g15_fp = _stack + (1 * sizeof(CPU_Call_frame)); \
- (_the_context)->r1_sp = _stack + (2 * sizeof(CPU_Call_frame)); \
- __asm__ volatile ( "ldconst 0x1f0000,%0 ; " \
- "modpc 0,0,%1 ; " \
- "andnot %0,%1,%1 ; " \
- : "=d" (_mask), "=d" (_base_pc) : ); \
- (_the_context)->pc = _base_pc | ((_isr) << 16); \
- (_the_context)->g14 = 0; \
- \
- _texit_frame = (CPU_Call_frame *)_stack; \
- _texit_frame->r0_pfp = NULL; \
- _texit_frame->r1_sp = (_the_context)->g15_fp; \
- _texit_frame->r2_rip = (_entry); \
- }
-
-#define _CPU_Context_Restart_self( _the_context ) \
- _CPU_Context_restore( (_the_context) );
-
-#define _CPU_Context_Fp_start( _base, _offset ) NULL
-
-#define _CPU_Context_Initialize_fp( _fp_area )
-
-/* end of Context handler macros */
-
-/*
- * Fatal Error manager macros
- *
- * These macros perform the following functions:
- * + disable interrupts and halt the CPU
- */
-
-#define _CPU_Fatal_halt( _errorcode ) \
- { unsigned32 _mask, _level; \
- unsigned32 _error = (_errorcode); \
- \
- __asm__ volatile ( "ldconst 0x1f0000,%0 ; \
- mov %0,%1 ; \
- modpc 0,%0,%1 ; \
- mov %2,g0 ; \
- self: b self " \
- : "=d" (_mask), "=d" (_level), "=d" (_error) : ); \
- }
-
-/* end of Fatal Error Manager macros */
-
-/*
- * Bitfield handler macros
- *
- * These macros perform the following functions:
- * + scan for the highest numbered (MSB) set in a 16 bit bitfield
- */
-
-#define CPU_USE_GENERIC_BITFIELD_CODE FALSE
-#define CPU_USE_GENERIC_BITFIELD_DATA FALSE
-
-#define _CPU_Bitfield_Find_first_bit( _value, _output ) \
- { unsigned32 _search = (_value); \
- \
- (_output) = 0; /* to prevent warnings */ \
- __asm__ volatile ( "scanbit %0,%1 " \
- : "=d" (_search), "=d" (_output) \
- : "0" (_search), "1" (_output) ); \
- }
-
-/* end of Bitfield handler macros */
-
-/*
- * Priority handler macros
- *
- * These macros perform the following functions:
- * + return a mask with the bit for this major/minor portion of
- * of thread priority set.
- * + translate the bit number returned by "Bitfield_find_first_bit"
- * into an index into the thread ready chain bit maps
- */
-
-#define _CPU_Priority_Mask( _bit_number ) \
- ( 0x8000 >> (_bit_number) )
-
-#define _CPU_Priority_bits_index( _priority ) \
- ( 15 - (_priority) )
-
-/* end of Priority handler macros */
-
-/* functions */
-
-/*
- * _CPU_Initialize
- *
- * This routine performs CPU dependent initialization.
- */
-
-void _CPU_Initialize(
- rtems_cpu_table *cpu_table,
- void (*thread_dispatch)
-);
-
-/*
- * _CPU_ISR_install_raw_handler
- *
- * This routine installs a "raw" interrupt handler directly into the
- * processor's vector table.
- */
-
-void _CPU_ISR_install_raw_handler(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-);
-
-/*
- * _CPU_ISR_install_vector
- *
- * This routine installs an interrupt vector.
- */
-
-void _CPU_ISR_install_vector(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-);
-
-/*
- * _CPU_Install_interrupt_stack
- *
- * This routine installs the hardware interrupt stack pointer.
- */
-
-void _CPU_Install_interrupt_stack( void );
-
-/*
- * _CPU_Context_switch
- *
- * This routine switches from the run context to the heir context.
- */
-
-void _CPU_Context_switch(
- Context_Control *run,
- Context_Control *heir
-);
-
-/*
- * _CPU_Context_restore
- *
- * This routine is generally used only to restart self in an
- * efficient manner and avoid stack conflicts.
- */
-
-void _CPU_Context_restore(
- Context_Control *new_context
-);
-
-/*
- * _CPU_Context_save_fp
- *
- * This routine saves the floating point context passed to it.
- */
-
-void _CPU_Context_save_fp(
- void **fp_context_ptr
-);
-
-/*
- * _CPU_Context_restore_fp
- *
- * This routine restores the floating point context passed to it.
- */
-
-void _CPU_Context_restore_fp(
- void **fp_context_ptr
-);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/cpu/i960/rtems/score/i960.h b/cpukit/score/cpu/i960/rtems/score/i960.h
deleted file mode 100644
index ae9a073aff..0000000000
--- a/cpukit/score/cpu/i960/rtems/score/i960.h
+++ /dev/null
@@ -1,513 +0,0 @@
-/* i960.h
- *
- * This include file contains information pertaining to the Intel
- * i960 processor family.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __i960_h
-#define __i960_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This file contains the information required to build
- * RTEMS for a particular member of the Intel i960
- * family. It does this by setting variables to indicate
- * which implementation dependent features are present
- * in a particular member of the family.
- *
- * NOTE: For now i960 support is for models without an FPU.
- * The stubs for FP routines are in place so only need to be filled in.
- *
- * NOTE: RTEMS defines a canonical name for each cpu model.
- */
-
-#if defined(__i960CA__) || defined(__i960_CA__) || defined(__i960CA)
-
-#define CPU_MODEL_NAME "i960ca"
-#define __RTEMS_I960CA__
-
-#elif defined(__i960HA__) || defined(__i960_HA__) || defined(__i960HA)
-
-#define CPU_MODEL_NAME "i960ha"
-#define __RTEMS_I960HA__
-
-#elif defined(__i960RP__)
-
-#include <i960RP.h>
-#define CPU_MODEL_NAME "i960rp"
-#define __RTEMS_I960RP__
-#define I960_CPU_ALIGNMENT 8
-#define I960_SOFT_RESET_COMMAND 0x300
-
-#else
-
-#error "Unsupported CPU Model"
-
-#endif
-
-/*
- * Now default some CPU model variation parameters
- */
-
-#ifndef I960_HAS_FPU
-#define I960_HAS_FPU 0
-#endif
-
-#ifndef I960_CPU_ALIGNMENT
-#define I960_CPU_ALIGNMENT 4
-#endif
-
-#ifndef I960_SOFT_RESET_COMMAND
-#define I960_SOFT_RESET_COMMAND 0x30000
-#endif
-
-/*
- * Define the name of the CPU family.
- */
-
-#define CPU_NAME "Intel i960"
-
-#ifndef ASM
-
-/*
- * XXX should have an ifdef here and have stuff for the other
- * XXX family members...
- */
-
-#if defined(__RTEMS_I960CA__)
-/*
- * Now default some CPU model variation parameters
- */
-
-#ifndef I960_HAS_FPU
-#define I960_HAS_FPU 0
-#endif
-
-#ifndef I960_CPU_ALIGNMENT
-#define I960_CPU_ALIGNMENT 4
-#endif
-
-
-/* i960CA control structures */
-
-/* Intel i960CA Control Table */
-
-typedef struct {
- /* Control Group 0 */
- unsigned int ipb0; /* IP breakpoint 0 */
- unsigned int ipb1; /* IP breakpoint 1 */
- unsigned int dab0; /* data address breakpoint 0 */
- unsigned int dab1; /* data address breakpoint 1 */
- /* Control Group 1 */
- unsigned int imap0; /* interrupt map 0 */
- unsigned int imap1; /* interrupt map 1 */
- unsigned int imap2; /* interrupt map 2 */
- unsigned int icon; /* interrupt control */
- /* Control Group 2 */
- unsigned int mcon0; /* memory region 0 configuration */
- unsigned int mcon1; /* memory region 1 configuration */
- unsigned int mcon2; /* memory region 2 configuration */
- unsigned int mcon3; /* memory region 3 configuration */
- /* Control Group 3 */
- unsigned int mcon4; /* memory region 4 configuration */
- unsigned int mcon5; /* memory region 5 configuration */
- unsigned int mcon6; /* memory region 6 configuration */
- unsigned int mcon7; /* memory region 7 configuration */
- /* Control Group 4 */
- unsigned int mcon8; /* memory region 8 configuration */
- unsigned int mcon9; /* memory region 9 configuration */
- unsigned int mcon10; /* memory region 10 configuration */
- unsigned int mcon11; /* memory region 11 configuration */
- /* Control Group 5 */
- unsigned int mcon12; /* memory region 12 configuration */
- unsigned int mcon13; /* memory region 13 configuration */
- unsigned int mcon14; /* memory region 14 configuration */
- unsigned int mcon15; /* memory region 15 configuration */
- /* Control Group 6 */
- unsigned int reserved; /* reserved */
- unsigned int bpcon; /* breakpoint control */
- unsigned int tc; /* trace control */
- unsigned int bcon; /* bus configuration control */
-} i960ca_control_table;
-
-/* Intel i960CA Processor Control Block */
-
-typedef struct {
- unsigned int *fault_tbl; /* fault table base address */
- i960ca_control_table
- *control_tbl; /* control table base address */
- unsigned int initial_ac; /* AC register initial value */
- unsigned int fault_config; /* fault configuration word */
- void **intr_tbl; /* interrupt table base address */
- void *sys_proc_tbl; /* system procedure table
- base address */
- unsigned int reserved; /* reserved */
- unsigned int *intr_stack; /* interrupt stack pointer */
- unsigned int ins_cache_cfg; /* instruction cache
- configuration word */
- unsigned int reg_cache_cfg; /* register cache configuration word */
-} i960ca_PRCB;
-
-typedef i960ca_control_table i960_control_table;
-typedef i960ca_PRCB i960_PRCB;
-
-#elif defined(__RTEMS_I960HA__)
-
-/* i960HA control structures */
-
-/* Intel i960HA Control Table */
-
-typedef struct {
- /* Control Group 0 */
- unsigned int ipb0; /* IP breakpoint 0 */
- unsigned int ipb1; /* IP breakpoint 1 */
- unsigned int dab0; /* data address breakpoint 0 */
- unsigned int dab1; /* data address breakpoint 1 */
- /* Control Group 1 */
- unsigned int imap0; /* interrupt map 0 */
- unsigned int imap1; /* interrupt map 1 */
- unsigned int imap2; /* interrupt map 2 */
- unsigned int icon; /* interrupt control */
- /* Control Group 2 */
- unsigned int mcon0; /* memory region 0 configuration */
- unsigned int mcon1; /* memory region 1 configuration */
- unsigned int mcon2; /* memory region 2 configuration */
- unsigned int mcon3; /* memory region 3 configuration */
- /* Control Group 3 */
- unsigned int mcon4; /* memory region 4 configuration */
- unsigned int mcon5; /* memory region 5 configuration */
- unsigned int mcon6; /* memory region 6 configuration */
- unsigned int mcon7; /* memory region 7 configuration */
- /* Control Group 4 */
- unsigned int mcon8; /* memory region 8 configuration */
- unsigned int mcon9; /* memory region 9 configuration */
- unsigned int mcon10; /* memory region 10 configuration */
- unsigned int mcon11; /* memory region 11 configuration */
- /* Control Group 5 */
- unsigned int mcon12; /* memory region 12 configuration */
- unsigned int mcon13; /* memory region 13 configuration */
- unsigned int mcon14; /* memory region 14 configuration */
- unsigned int mcon15; /* memory region 15 configuration */
- /* Control Group 6 */
- unsigned int reserved; /* reserved */
- unsigned int bpcon; /* breakpoint control */
- unsigned int tc; /* trace control */
- unsigned int bcon; /* bus configuration control */
-} i960ha_control_table;
-
-/* Intel i960HA Processor Control Block */
-
-typedef struct {
- unsigned int *fault_tbl; /* fault table base address */
- i960ha_control_table
- *control_tbl; /* control table base address */
- unsigned int initial_ac; /* AC register initial value */
- unsigned int fault_config; /* fault configuration word */
- void **intr_tbl; /* interrupt table base address */
- void *sys_proc_tbl; /* system procedure table
- base address */
- unsigned int reserved; /* reserved */
- unsigned int *intr_stack; /* interrupt stack pointer */
- unsigned int ins_cache_cfg; /* instruction cache
- configuration word */
- unsigned int reg_cache_cfg; /* register cache configuration word */
-} i960ha_PRCB;
-
-typedef i960ha_control_table i960_control_table;
-typedef i960ha_PRCB i960_PRCB;
-
-#elif defined(__RTEMS_I960RP__)
-
-/* i960RP control structures */
-
-/* Intel i960RP Control Table */
-
-typedef struct {
- /* Control Group 0 */
- unsigned int rsvd00;
- unsigned int rsvd01;
- unsigned int rsvd02;
- unsigned int rsvd03;
- /* Control Group 1 */
- unsigned int imap0; /* interrupt map 0 */
- unsigned int imap1; /* interrupt map 1 */
- unsigned int imap2; /* interrupt map 2 */
- unsigned int icon; /* interrupt control */
- /* Control Group 2 */
- unsigned int pmcon0; /* memory region 0 configuration */
- unsigned int rsvd1;
- unsigned int pmcon2; /* memory region 2 configuration */
- unsigned int rsvd2;
- /* Control Group 3 */
- unsigned int pmcon4; /* memory region 4 configuration */
- unsigned int rsvd3;
- unsigned int pmcon6; /* memory region 6 configuration */
- unsigned int rsvd4;
- /* Control Group 4 */
- unsigned int pmcon8; /* memory region 8 configuration */
- unsigned int rsvd5;
- unsigned int pmcon10; /* memory region 10 configuration */
- unsigned int rsvd6;
- /* Control Group 5 */
- unsigned int pmcon12; /* memory region 12 configuration */
- unsigned int rsvd7;
- unsigned int pmcon14; /* memory region 14 configuration */
- unsigned int rsvd8;
- /* Control Group 6 */
- unsigned int rsvd9;
- unsigned int rsvd10;
- unsigned int tc; /* trace control */
- unsigned int bcon; /* bus configuration control */
-} i960rp_control_table;
-
-/* Intel i960RP Processor Control Block */
-
-typedef struct {
- unsigned int *fault_tbl; /* fault table base address */
- i960rp_control_table
- *control_tbl; /* control table base address */
- unsigned int initial_ac; /* AC register initial value */
- unsigned int fault_config; /* fault configuration word */
- void **intr_tbl; /* interrupt table base address */
- void *sys_proc_tbl; /* system procedure table
- base address */
- unsigned int reserved; /* reserved */
- unsigned int *intr_stack; /* interrupt stack pointer */
- unsigned int ins_cache_cfg; /* instruction cache
- configuration word */
- unsigned int reg_cache_cfg; /* register cache configuration word */
-} i960rp_PRCB;
-
-typedef i960rp_control_table i960_control_table;
-typedef i960rp_PRCB i960_PRCB;
-
-#else
-#error "invalid processor selection!"
-#endif
-
-/*
- * Miscellaneous Support Routines
- */
-
-#define i960_reload_ctl_group( group ) \
- { register int _cmd = ((group)|0x400) ; \
- asm volatile( "sysctl %0,%0,%0" : "=d" (_cmd) : "0" (_cmd) ); \
- }
-
-#define i960_atomic_modify( mask, addr, prev ) \
- { register unsigned int _mask = (mask); \
- register unsigned int *_addr = (unsigned int *)(addr); \
- asm volatile( "atmod %0,%1,%1" \
- : "=d" (_addr), "=d" (_mask) \
- : "0" (_addr), "1" (_mask) ); \
- (prev) = _mask; \
- }
-
-#define atomic_modify( _mask, _address, _previous ) \
- i960_atomic_modify( _mask, _address, _previous )
-
-#define i960_enable_tracing() \
- { register unsigned int _pc = 0x1; \
- asm volatile( "modpc 0,%0,%0" : "=d" (_pc) : "0" (_pc) ); \
- }
-
-/*
- * Interrupt Level Routines
- */
-
-#define i960_disable_interrupts( oldlevel ) \
- { (oldlevel) = 0x1f0000; \
- asm volatile ( "modpc 0,%1,%1" \
- : "=d" ((oldlevel)) \
- : "0" ((oldlevel)) ); \
- }
-
-#define i960_enable_interrupts( oldlevel ) \
- { unsigned int _mask = 0x1f0000; \
- asm volatile ( "modpc 0,%0,%1" \
- : "=d" (_mask), "=d" ((oldlevel)) \
- : "0" (_mask), "1" ((oldlevel)) ); \
- }
-
-#define i960_flash_interrupts( oldlevel ) \
- { unsigned int _mask = 0x1f0000; \
- asm volatile ( "modpc 0,%0,%1 ; \
- mov %0,%1 ; \
- modpc 0,%0,%1" \
- : "=d" (_mask), "=d" ((oldlevel)) \
- : "0" (_mask), "1" ((oldlevel)) ); \
- }
-
-#define i960_get_interrupt_level( _level ) \
- { \
- i960_disable_interrupts( _level ); \
- i960_enable_interrupts( _level ); \
- (_level) = ((_level) & 0x1f0000) >> 16; \
- } while ( 0 )
-
-#define i960_cause_intr( intr ) \
- { register int _intr = (intr); \
- asm volatile( "sysctl %0,%0,%0" : "=d" (_intr) : "0" (_intr) ); \
- }
-
-/*
- * Interrupt Masking Routines
- */
-
-#if defined(__RTEMS_I960CA__) || defined(__RTEMS_I960HA__)
-
-#define i960_unmask_intr( xint ) \
- { register unsigned int _mask= (1<<(xint)); \
- asm volatile( "or sf1,%0,sf1" : "=d" (_mask) : "0" (_mask) ); \
- }
-
-#define i960_mask_intr( xint ) \
- { register unsigned int _mask= (1<<(xint)); \
- asm volatile( "andnot %0,sf1,sf1" : "=d" (_mask) : "0" (_mask) ); \
- }
-
-#define i960_clear_intr( xint ) \
- { register unsigned int _xint=(xint); \
-asm volatile( "loop_til_cleared: clrbit %0,sf0,sf0 ; \
- bbs %0,sf0, loop_til_cleared" \
- : "=d" (_xint) : "0" (_xint) ); \
- }
-
-static inline unsigned int i960_pend_intrs()
-{ register unsigned int _intr=0;
- asm volatile( "mov sf0,%0" : "=d" (_intr) : "0" (_intr) );
- return ( _intr );
-}
-
-static inline unsigned int i960_mask_intrs()
-{ register unsigned int _intr=0;
- asm volatile( "mov sf1,%0" : "=d" (_intr) : "0" (_intr) );
- return( _intr );
-}
-
-#elif defined(__RTEMS_I960RP__)
-
-#define i960_unmask_intr( xint ) \
- { register unsigned int _mask= (1<<(xint)); \
- register unsigned int *_imsk = (int * ) IMSK_ADDR; \
- register unsigned int _val= *_imsk; \
- asm volatile( "or %0,%2,%0; \
- st %0,(%1)" \
- : "=d" (_val), "=d" (_imsk), "=d" (_mask) \
- : "0" (_val), "1" (_imsk), "2" (_mask) ); \
- }
-
-#define i960_mask_intr( xint ) \
- { register unsigned int _mask= (1<<(xint)); \
- register unsigned int *_imsk = (int * ) IMSK_ADDR; \
- register unsigned int _val = *_imsk; \
- asm volatile( "andnot %2,%0,%0; \
- st %0,(%1)" \
- : "=d" (_val), "=d" (_imsk), "=d" (_mask) \
- : "0" (_val), "1" (_imsk), "2" (_mask) ); \
- }
-#define i960_clear_intr( xint ) \
- { register unsigned int _xint=xint; \
- register unsigned int _mask=(1<<(xint)); \
- register unsigned int *_ipnd = (int * ) IPND_ADDR; \
- register unsigned int _rslt = 0; \
-asm volatile( "loop_til_cleared: mov 0, %0; \
- atmod %1, %2, %0; \
- bbs %3,%0, loop_til_cleared" \
- : "=d" (_rslt), "=d" (_ipnd), "=d" (_mask), "=d" (_xint) \
- : "0" (_rslt), "1" (_ipnd), "2" (_mask), "3" (_xint) ); \
- }
-
-static inline unsigned int i960_pend_intrs()
-{ register unsigned int _intr= *(unsigned int *) IPND_ADDR;
- /*register unsigned int *_ipnd = (int * ) IPND_ADDR; \
- asm volatile( "mov (%0),%1" \
- : "=d" (_ipnd), "=d" (_mask) \
- : "0" (_ipnd), "1" (_mask) ); \ */
- return ( _intr );
-}
-
-static inline unsigned int i960_mask_intrs()
-{ register unsigned int _intr= *(unsigned int *) IMSK_ADDR;
- /*asm volatile( "mov sf1,%0" : "=d" (_intr) : "0" (_intr) );*/
- return( _intr );
-}
-#endif
-
-static inline unsigned int i960_get_fp()
-{ register unsigned int _fp=0;
- asm volatile( "mov fp,%0" : "=d" (_fp) : "0" (_fp) );
- return ( _fp );
-}
-
-/*
- * Soft Reset
- */
-
-#if defined(I960_SOFT_RESET_COMMAND)
-
-#define i960_soft_reset( prcb ) \
- { register i960_PRCB *_prcb = (prcb); \
- register unsigned int *_next=0; \
- register unsigned int _cmd = I960_SOFT_RESET_COMMAND; \
- asm volatile( "lda next,%1; \
- sysctl %0,%1,%2; \
- next: mov g0,g0" \
- : "=d" (_cmd), "=d" (_next), "=d" (_prcb) \
- : "0" (_cmd), "1" (_next), "2" (_prcb) ); \
- }
-
-#else
-#warning "I960_SOFT_RESET_COMMAND is not defined"
-#endif
-
-/*
- * The following routine swaps the endian format of an unsigned int.
- * It must be static because it is referenced indirectly.
- *
- * This version is based on code presented in Vol. 4, No. 4 of
- * Insight 960. It is certainly something you wouldn't think
- * of on your own.
- */
-
-static inline unsigned int CPU_swap_u32(
- unsigned int value
-)
-{
- register unsigned int to_swap = value;
- register unsigned int temp = 0xFF00FF00;
- register unsigned int swapped = 0;
-
- /* to_swap swapped */
- asm volatile ( "rotate 16,%0,%2 ;" /* 0x12345678 0x56781234 */
- "modify %1,%0,%2 ;" /* 0x12345678 0x12785634 */
- "rotate 8,%2,%2" /* 0x12345678 0x78563412 */
- : "=r" (to_swap), "=r" (temp), "=r" (swapped)
- : "0" (to_swap), "1" (temp), "2" (swapped)
- );
- return( swapped );
-}
-
-#define CPU_swap_u16( value ) \
- (((value&0xff) << 8) | ((value >> 8)&0xff))
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !ASM */
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/cpu/i960/rtems/score/types.h b/cpukit/score/cpu/i960/rtems/score/types.h
deleted file mode 100644
index 81deddaa1f..0000000000
--- a/cpukit/score/cpu/i960/rtems/score/types.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* i960types.h
- *
- * This include file contains type definitions pertaining to the Intel
- * i960 processor family.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __i960_TYPES_h
-#define __i960_TYPES_h
-
-#ifndef ASM
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This section defines the basic types for this processor.
- */
-
-typedef unsigned char unsigned8; /* unsigned 8-bit integer */
-typedef unsigned short unsigned16; /* unsigned 16-bit integer */
-typedef unsigned int unsigned32; /* unsigned 32-bit integer */
-typedef unsigned long long unsigned64; /* unsigned 64-bit integer */
-
-typedef unsigned32 Priority_Bit_map_control;
-
-typedef signed char signed8; /* 8-bit signed integer */
-typedef signed short signed16; /* 16-bit signed integer */
-typedef signed int signed32; /* 32-bit signed integer */
-typedef signed long long signed64; /* 64 bit signed integer */
-
-typedef unsigned32 boolean; /* Boolean value */
-
-typedef float single_precision; /* single precision float */
-typedef double double_precision; /* double precision float */
-
-typedef void i960_isr;
-
-typedef void ( *i960_isr_entry )( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !ASM */
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/cpu/m68k/Makefile.am b/cpukit/score/cpu/m68k/Makefile.am
deleted file mode 100644
index 4ff7a91ff7..0000000000
--- a/cpukit/score/cpu/m68k/Makefile.am
+++ /dev/null
@@ -1,49 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-
-SUBDIRS = rtems
-
-C_FILES = cpu.c memcpy.c
-C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
-
-H_FILES = asm.h m68302.h m68360.h qsm.h sim.h
-
-S_FILES = cpu_asm.S
-S_O_FILES = $(S_FILES:%.S=$(ARCH)/%.o)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../../../../automake/lib.am
-
-$(PROJECT_INCLUDE):
- $(mkinstalldirs) $@
-
-$(PROJECT_INCLUDE)/%.h: %.h
- $(INSTALL_DATA) $< $@
-
-$(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o: $(ARCH)/rtems.o
- $(INSTALL_DATA) $< $@
-
-REL = $(ARCH)/rtems-cpu.rel
-
-rtems_cpu_rel_OBJECTS = $(C_O_FILES) $(S_O_FILES)
-
-$(REL): $(rtems_cpu_rel_OBJECTS)
- $(make-rel)
-
-PREINSTALL_FILES += $(PROJECT_INCLUDE) $(H_FILES:%=$(PROJECT_INCLUDE)/%)
-
-TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o
-
-all-local: $(ARCH) $(PREINSTALL_FILES) $(rtems_cpu_rel_OBJECTS) $(REL) $(TMPINSTALL_FILES)
-
-.PRECIOUS: $(REL)
-
-EXTRA_DIST = asm.h cpu.c cpu_asm.S m68302.h m68360.h memcpy.c qsm.h rtems.S \
- sim.h
-
-include $(top_srcdir)/../../../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/cpukit/score/cpu/m68k/asm.h b/cpukit/score/cpu/m68k/asm.h
deleted file mode 100644
index 456b213cb2..0000000000
--- a/cpukit/score/cpu/m68k/asm.h
+++ /dev/null
@@ -1,144 +0,0 @@
-/* asm.h
- *
- * This include file attempts to address the problems
- * caused by incompatible flavors of assemblers and
- * toolsets. It primarily addresses variations in the
- * use of leading underscores on symbols and the requirement
- * that register names be preceded by a %.
- *
- *
- * NOTE: The spacing in the use of these macros
- * is critical to them working as advertised.
- *
- * COPYRIGHT:
- *
- * This file is based on similar code found in newlib available
- * from ftp.cygnus.com. The file which was used had no copyright
- * notice. This file is freely distributable as long as the source
- * of the file is noted. This file is:
- *
- * COPYRIGHT (c) 1994-1997.
- * On-Line Applications Research Corporation (OAR).
- *
- * $Id$
- */
-
-#ifndef __M68k_ASM_h
-#define __M68k_ASM_h
-
-/*
- * Indicate we are in an assembly file and get the basic CPU definitions.
- */
-
-#ifndef ASM
-#define ASM
-#endif
-#include <rtems/score/targopts.h>
-#include <rtems/score/cpu.h>
-
-/*
- * Recent versions of GNU cpp define variables which indicate the
- * need for underscores and percents. If not using GNU cpp or
- * the version does not support this, then you will obviously
- * have to define these as appropriate.
- */
-
-#ifndef __USER_LABEL_PREFIX__
-#define __USER_LABEL_PREFIX__ _
-#endif
-
-#ifndef __REGISTER_PREFIX__
-#define __REGISTER_PREFIX__
-#endif
-
-/* ANSI concatenation macros. */
-
-#define CONCAT1(a, b) CONCAT2(a, b)
-#define CONCAT2(a, b) a ## b
-
-/* Use the right prefix for global labels. */
-
-#define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
-
-/* Use the right prefix for registers. */
-
-#define REG(x) CONCAT1 (__REGISTER_PREFIX__, x)
-
-#define d0 REG (d0)
-#define d1 REG (d1)
-#define d2 REG (d2)
-#define d3 REG (d3)
-#define d4 REG (d4)
-#define d5 REG (d5)
-#define d6 REG (d6)
-#define d7 REG (d7)
-#define a0 REG (a0)
-#define a1 REG (a1)
-#define a2 REG (a2)
-#define a3 REG (a3)
-#define a4 REG (a4)
-#define a5 REG (a5)
-#define a6 REG (a6)
-#define a7 REG (a7)
-#define sp REG (sp)
-
-#define msp REG (msp)
-#define usp REG (usp)
-#define isp REG (isp)
-#define sr REG (sr)
-#define vbr REG (vbr)
-#define dfc REG (dfc)
-#define sfc REG (sfc)
-
-/* mcf52xx special regs */
-#define cacr REG (cacr)
-#define acr0 REG (acr0)
-#define acr1 REG (acr1)
-#define rambar0 REG (rambar0)
-#define mbar REG (mbar)
-
-
-#define fp0 REG (fp0)
-#define fp1 REG (fp1)
-#define fp2 REG (fp2)
-#define fp3 REG (fp3)
-#define fp4 REG (fp4)
-#define fp5 REG (fp5)
-#define fp6 REG (fp6)
-#define fp7 REG (fp7)
-
-#define fpc REG (fpc)
-#define fpi REG (fpi)
-#define fps REG (fps)
-#define fpsr REG (fpsr)
-
-
-/*
- * Define macros to handle section beginning and ends.
- */
-
-
-#define BEGIN_CODE_DCL .text
-#define END_CODE_DCL
-#define BEGIN_DATA_DCL .data
-#define END_DATA_DCL
-#define BEGIN_CODE .text
-#define END_CODE
-#define BEGIN_DATA .data
-#define END_DATA
-#define BEGIN_BSS .bss
-#define END_BSS
-#define END
-
-/*
- * Following must be tailor for a particular flavor of the C compiler.
- * They may need to put underscores in front of the symbols.
- */
-
-#define PUBLIC(sym) .globl SYM (sym)
-#define EXTERN(sym) .globl SYM (sym)
-
-#endif
-/* end of include file */
-
-
diff --git a/cpukit/score/cpu/m68k/cpu.c b/cpukit/score/cpu/m68k/cpu.c
deleted file mode 100644
index f1ffe31fe0..0000000000
--- a/cpukit/score/cpu/m68k/cpu.c
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- * Motorola MC68xxx Dependent Source
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-
-/* _CPU_Initialize
- *
- * This routine performs processor dependent initialization.
- *
- * INPUT PARAMETERS:
- * cpu_table - CPU table to initialize
- * thread_dispatch - entry pointer to thread dispatcher
- *
- * OUTPUT PARAMETERS: NONE
- */
-
-void _CPU_Initialize(
- rtems_cpu_table *cpu_table,
- void (*thread_dispatch) /* ignored on this CPU */
-)
-{
-#if ( M68K_HAS_VBR == 0 )
- /* fill the isr redirect table with the code to place the format/id
- onto the stack */
-
- unsigned32 slot;
-
- for (slot = 0; slot < CPU_INTERRUPT_NUMBER_OF_VECTORS; slot++)
- {
- _CPU_ISR_jump_table[slot].move_a7 = M68K_MOVE_A7;
- _CPU_ISR_jump_table[slot].format_id = slot << 2;
- _CPU_ISR_jump_table[slot].jmp = M68K_JMP;
- _CPU_ISR_jump_table[slot].isr_handler = (unsigned32) 0xDEADDEAD;
- }
-#endif /* M68K_HAS_VBR */
-
- _CPU_Table = *cpu_table;
-}
-
-/*PAGE
- *
- * _CPU_ISR_Get_level
- */
-
-unsigned32 _CPU_ISR_Get_level( void )
-{
- unsigned32 level;
-
- m68k_get_interrupt_level( level );
-
- return level;
-}
-
-/*PAGE
- *
- * _CPU_ISR_install_raw_handler
- */
-
-void _CPU_ISR_install_raw_handler(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-)
-{
- proc_ptr *interrupt_table = NULL;
-
-#if (M68K_HAS_FPSP_PACKAGE == 1)
- /*
- * If this vector being installed is one related to FP, then the
- * FPSP will install the handler itself and handle it completely
- * with no intervention from RTEMS.
- */
-
- if (*_FPSP_install_raw_handler &&
- (*_FPSP_install_raw_handler)(vector, new_handler, *old_handler))
- return;
-#endif
-
-
- /*
- * On CPU models without a VBR, it is necessary for there to be some
- * header code for each ISR which saves a register, loads the vector
- * number, and jumps to _ISR_Handler.
- */
-
- m68k_get_vbr( interrupt_table );
- *old_handler = interrupt_table[ vector ];
-#if ( M68K_HAS_VBR == 1 )
- interrupt_table[ vector ] = new_handler;
-#else
- _CPU_ISR_jump_table[vector].isr_handler = (unsigned32) new_handler;
- interrupt_table[ vector ] = (proc_ptr) &_CPU_ISR_jump_table[vector];
-#endif /* M68K_HAS_VBR */
-}
-
-/*PAGE
- *
- * _CPU_ISR_install_vector
- *
- * This kernel routine installs the RTEMS handler for the
- * specified vector.
- *
- * Input parameters:
- * vector - interrupt vector number
- * new_handler - replacement ISR for this vector number
- * old_handler - former ISR for this vector number
- *
- * Output parameters: NONE
- */
-
-void _CPU_ISR_install_vector(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-)
-{
- proc_ptr ignored;
-
- *old_handler = _ISR_Vector_table[ vector ];
-
- _CPU_ISR_install_raw_handler( vector, _ISR_Handler, &ignored );
-
- _ISR_Vector_table[ vector ] = new_handler;
-}
-
-
-/*PAGE
- *
- * _CPU_Install_interrupt_stack
- */
-
-void _CPU_Install_interrupt_stack( void )
-{
-#if ( M68K_HAS_SEPARATE_STACKS == 1 )
- void *isp = _CPU_Interrupt_stack_high;
-
- asm volatile ( "movec %0,%%isp" : "=r" (isp) : "0" (isp) );
-#endif
-}
-
-#if ( M68K_HAS_BFFFO != 1 )
-/*
- * Returns table for duplication of the BFFFO instruction (16 bits only)
- */
-const unsigned char __BFFFOtable[256] = {
- 8, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-};
-#endif
-
-/*PAGE
- *
- * The following code context switches the software FPU emulation
- * code provided with GCC.
- */
-
-#if (CPU_SOFTWARE_FP == TRUE)
-extern Context_Control_fp _fpCCR;
-
-void CPU_Context_save_fp (void **fp_context_ptr)
-{
- Context_Control_fp *fp;
-
- fp = (Context_Control_fp *) *fp_context_ptr;
-
- *fp = _fpCCR;
-}
-
-void CPU_Context_restore_fp (void **fp_context_ptr)
-{
- Context_Control_fp *fp;
-
- fp = (Context_Control_fp *) *fp_context_ptr;
-
- _fpCCR = *fp;
-}
-#endif
-
diff --git a/cpukit/score/cpu/m68k/cpu_asm.S b/cpukit/score/cpu/m68k/cpu_asm.S
deleted file mode 100644
index 3d663372a0..0000000000
--- a/cpukit/score/cpu/m68k/cpu_asm.S
+++ /dev/null
@@ -1,290 +0,0 @@
-/* cpu_asm.s
- *
- * This file contains all assembly code for the MC68020 implementation
- * of RTEMS.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <asm.h>
-
- .text
-
-/* void _CPU_Context_switch( run_context, heir_context )
- *
- * This routine performs a normal non-FP context.
- */
-
- .align 4
- .global SYM (_CPU_Context_switch)
-
-.set RUNCONTEXT_ARG, 4 | save context argument
-.set HEIRCONTEXT_ARG, 8 | restore context argument
-
-SYM (_CPU_Context_switch):
- moval a7@(RUNCONTEXT_ARG),a0| a0 = running thread context
- movw sr,d1 | d1 = status register
- movml d1-d7/a2-a7,a0@ | save context
-
- moval a7@(HEIRCONTEXT_ARG),a0| a0 = heir thread context
-restore: movml a0@,d1-d7/a2-a7 | restore context
- movw d1,sr | restore status register
- rts
-
-/*PAGE
- * void __CPU_Context_save_fp_context( &fp_context_ptr )
- * void __CPU_Context_restore_fp_context( &fp_context_ptr )
- *
- * These routines are used to context switch a MC68881 or MC68882.
- *
- * NOTE: Context save and restore code is based upon the code shown
- * on page 6-38 of the MC68881/68882 Users Manual (rev 1).
- *
- * CPU_FP_CONTEXT_SIZE is higher than expected to account for the
- * -1 pushed at end of this sequence.
- *
- * Neither of these entries is required if we have software FPU
- * emulation. But if we don't have an FPU or emulation, then
- * we need the stub versions of these routines.
- */
-
-#if (CPU_SOFTWARE_FP == FALSE)
-
-.set FPCONTEXT_ARG, 4 | save FP context argument
-
- .align 4
- .global SYM (_CPU_Context_save_fp)
-SYM (_CPU_Context_save_fp):
-#if ( M68K_HAS_FPU == 1 )
- moval a7@(FPCONTEXT_ARG),a1 | a1 = &ptr to context area
- moval a1@,a0 | a0 = Save context area
- fsave a0@- | save 68881/68882 state frame
- tstb a0@ | check for a null frame
- beq nosv | Yes, skip save of user model
- fmovem fp0-fp7,a0@- | save data registers (fp0-fp7)
- fmovem fpc/fps/fpi,a0@- | and save control registers
- movl #-1,a0@- | place not-null flag on stack
-nosv: movl a0,a1@ | save pointer to saved context
-#endif
- rts
-
- .align 4
- .global SYM (_CPU_Context_restore_fp)
-SYM (_CPU_Context_restore_fp):
-#if ( M68K_HAS_FPU == 1 )
- moval a7@(FPCONTEXT_ARG),a1 | a1 = &ptr to context area
- moval a1@,a0 | a0 = address of saved context
- tstb a0@ | Null context frame?
- beq norst | Yes, skip fp restore
- addql #4,a0 | throwaway non-null flag
- fmovem a0@+,fpc/fps/fpi | restore control registers
- fmovem a0@+,fp0-fp7 | restore data regs (fp0-fp7)
-norst: frestore a0@+ | restore the fp state frame
- movl a0,a1@ | save pointer to saved context
-#endif
- rts
-#endif
-
-/*PAGE
- * void _ISR_Handler()
- *
- * This routine provides the RTEMS interrupt management.
- *
- * NOTE:
- * Upon entry, the master stack will contain an interrupt stack frame
- * back to the interrupted thread and the interrupt stack will contain
- * a throwaway interrupt stack frame. If dispatching is enabled, this
- * is the outer most interrupt, and (a context switch is necessary or
- * the current thread has signals), then set up the master stack to
- * transfer control to the interrupt dispatcher.
- */
-
-/*
- * With this approach, lower priority interrupts may
- * execute twice if a higher priority interrupt is
- * acknowledged before _Thread_Dispatch_disable is
- * incremented and the higher priority interrupt
- * performs a context switch after executing. The lower
- * priority interrupt will execute (1) at the end of the
- * higher priority interrupt in the new context if
- * permitted by the new interrupt level mask, and (2) when
- * the original context regains the cpu.
- */
-
-#if ( M68K_COLDFIRE_ARCH == 1 )
-.set SR_OFFSET, 2 | Status register offset
-.set PC_OFFSET, 4 | Program Counter offset
-.set FVO_OFFSET, 0 | Format/vector offset
-#elif ( M68K_HAS_VBR == 1)
-.set SR_OFFSET, 0 | Status register offset
-.set PC_OFFSET, 2 | Program Counter offset
-.set FVO_OFFSET, 6 | Format/vector offset
-#else
-.set SR_OFFSET, 2 | Status register offset
-.set PC_OFFSET, 4 | Program Counter offset
-.set FVO_OFFSET, 0 | Format/vector offset placed in the stack
-#endif /* M68K_HAS_VBR */
-
-.set SAVED, 16 | space for saved registers
-
- .align 4
- .global SYM (_ISR_Handler)
-
-SYM (_ISR_Handler):
- addql #1,SYM (_Thread_Dispatch_disable_level) | disable multitasking
-#if ( M68K_COLDFIRE_ARCH == 0 )
- moveml d0-d1/a0-a1,a7@- | save d0-d1,a0-a1
- movew a7@(SAVED+FVO_OFFSET),d0 | d0 = F/VO
- andl #0x0fff,d0 | d0 = vector offset in vbr
-#else
- lea a7@(-SAVED),a7
- movm.l d0-d1/a0-a1,a7@ | save d0-d1,a0-a1
- movew a7@(SAVED+FVO_OFFSET),d0 | d0 = F/VO
- andl #0x0ffc,d0 | d0 = vector offset in vbr
-#endif
-
-
-#if ( CPU_HAS_SOFTWARE_INTERRUPT_STACK == 1 )
- #if ( M68K_COLDFIRE_ARCH == 0 )
- movew sr,d1 | Save status register
- oriw #0x700,sr | Disable interrupts
- #else
- move.l d0,a7@- | Save d0 value
- move.l #0x700,d0 | Load in disable ints value
- move.w sr,d1 | Grab SR
- or.l d1,d0 | Create new SR
- move.w d0,sr | Disable interrupts
- move.l a7@+,d0 | Restore d0 value
- #endif
-
- tstl SYM (_ISR_Nest_level) | Interrupting an interrupt handler?
- bne 1f | Yes, just skip over stack switch code
- movel SYM(_CPU_Interrupt_stack_high),a0 | End of interrupt stack
- movel a7,a0@- | Save task stack pointer
- movel a0,a7 | Switch to interrupt stack
-1:
- addql #1,SYM(_ISR_Nest_level) | one nest level deeper
- movew d1,sr | Restore status register
-#else
- addql #1,SYM (_ISR_Nest_level) | one nest level deeper
-#endif /* CPU_HAS_SOFTWARE_INTERRUPT_STACK == 1 */
-
-#if ( M68K_HAS_PREINDEXING == 1 )
- movel @( SYM (_ISR_Vector_table),d0:w:1),a0| fetch the ISR
-#else
- movel # SYM (_ISR_Vector_table),a0 | a0 = base of RTEMS table
- addal d0,a0 | a0 = address of vector
- movel (a0),a0 | a0 = address of user routine
-#endif
-
- lsrl #2,d0 | d0 = vector number
- movel d0,a7@- | push vector number
- jbsr a0@ | invoke the user ISR
- addql #4,a7 | remove vector number
-
-#if ( CPU_HAS_SOFTWARE_INTERRUPT_STACK == 1 )
- #if ( M68K_COLDFIRE_ARCH == 0 )
- movew sr,d0 | Save status register
- oriw #0x700,sr | Disable interrupts
- #else
- move.l #0x700,d1 | Load in disable int value
- move.w sr,d0 | Grab SR
- or.l d0,d1 | Create new SR
- move.w d1,sr | Load to disable interrupts
- #endif
-
- subql #1,SYM(_ISR_Nest_level) | Reduce interrupt-nesting count
- bne 1f | Skip if return to interrupt
- movel (a7),a7 | Restore task stack pointer
-1:
- movew d0,sr | Restore status register
-#else
- subql #1,SYM (_ISR_Nest_level) | one less nest level
-#endif /* CPU_HAS_SOFTWARE_INTERRUPT_STACK == 1 */
-
- subql #1,SYM (_Thread_Dispatch_disable_level)
- | unnest multitasking
- bne exit | If dispatch disabled, exit
-
-#if ( M68K_HAS_SEPARATE_STACKS == 1 )
- movew #0xf000,d0 | isolate format nibble
- andw a7@(SAVED+FVO_OFFSET),d0 | get F/VO
- cmpiw #0x1000,d0 | is it a throwaway isf?
- bne exit | NOT outer level, so branch
-#endif
-
- tstl SYM (_Context_Switch_necessary)
- | Is thread switch necessary?
- bne bframe | Yes, invoke dispatcher
-
- tstl SYM (_ISR_Signals_to_thread_executing)
- | signals sent to Run_thread
- | while in interrupt handler?
- beq exit | No, then exit
-
-
-bframe: clrl SYM (_ISR_Signals_to_thread_executing)
- | If sent, will be processed
-#if ( M68K_HAS_SEPARATE_STACKS == 1 )
- movec msp,a0 | a0 = master stack pointer
- movew #0,a0@- | push format word
- movel #SYM(_ISR_Dispatch),a0@- | push return addr
- movew a0@(6),a0@- | push saved sr
- movec a0,msp | set master stack pointer
-#else
- jsr SYM (_Thread_Dispatch) | Perform context switch
-#endif
-
-#if ( M68K_COLDFIRE_ARCH == 0 )
-exit: moveml a7@+,d0-d1/a0-a1 | restore d0-d1,a0-a1
-#else
-exit: moveml a7@,d0-d1/a0-a1 | restore d0-d1,a0-a1
- lea a7@(SAVED),a7
-#endif
-
-#if ( M68K_HAS_VBR == 0 )
- addql #2,a7 | pop format/id
-#endif /* M68K_HAS_VBR */
- rte | return to thread
- | OR _Isr_dispatch
-
-/*PAGE
- * void _ISR_Dispatch()
- *
- * Entry point from the outermost interrupt service routine exit.
- * The current stack is the supervisor mode stack if this processor
- * has separate stacks.
- *
- * 1. save all registers not preserved across C calls.
- * 2. invoke the _Thread_Dispatch routine to switch tasks
- * or a signal to the currently executing task.
- * 3. restore all registers not preserved across C calls.
- * 4. return from interrupt
- */
-
- .global SYM (_ISR_Dispatch)
-SYM (_ISR_Dispatch):
-#if ( M68K_COLDFIRE_ARCH == 0 )
- movml d0-d1/a0-a1,a7@-
- jsr SYM (_Thread_Dispatch)
- movml a7@+,d0-d1/a0-a1
-#else
- lea a7@(-SAVED),a7
- movml d0-d1/a0-a1,a7@
- jsr SYM (_Thread_Dispatch)
- movml a7@,d0-d1/a0-a1
- lea a7@(SAVED),a7
-#endif
-
-#if ( M68K_HAS_VBR == 0 )
- addql #2,a7 | pop format/id
-#endif /* M68K_HAS_VBR */
- rte
diff --git a/cpukit/score/cpu/m68k/m68302.h b/cpukit/score/cpu/m68k/m68302.h
deleted file mode 100644
index 084ceac034..0000000000
--- a/cpukit/score/cpu/m68k/m68302.h
+++ /dev/null
@@ -1,661 +0,0 @@
-/*
- *------------------------------------------------------------------
- *
- * m68302.h - Definitions for Motorola MC68302 processor.
- *
- * Section references in this file refer to revision 2 of Motorola's
- * "MC68302 Integrated Multiprotocol Processor User's Manual".
- * (Motorola document MC68302UM/AD REV 2.)
- *
- * Based on Don Meyer's cpu68302.h that was posted in comp.sys.m68k
- * on 17 February, 1993.
- *
- * Copyright 1995 David W. Glessner.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the following conditions are met:
- * 1. Redistribution of source code and documentation must retain
- * the above copyright notice, this list of conditions and the
- * following disclaimer.
- * 2. The name of the author may not be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * This software is provided "AS IS" without warranty of any kind,
- * either expressed or implied, including, but not limited to, the
- * implied warranties of merchantability, title and fitness for a
- * particular purpose.
- *
- *
- * $Id$
- *
- *------------------------------------------------------------------
- */
-
-#ifndef __MOTOROLA_MC68302_DEFINITIONS_h
-#define __MOTOROLA_MC68302_DEFINITIONS_h
-
-/*
- * BAR - Base Address Register
- * Section 2.7
- */
-#define M302_BAR (*((volatile rtems_unsigned16 *) 0xf2))
-
-/*
- * SCR - System Control Register
- * Section 3.8.1
- */
-#define M302_SCR (*((volatile rtems_unsigned32 *) 0xf4))
-/*
- * SCR bits
- */
-#define RBIT_SCR_IPA 0x08000000
-#define RBIT_SCR_HWT 0x04000000
-#define RBIT_SCR_WPV 0x02000000
-#define RBIT_SCR_ADC 0x01000000
-
-#define RBIT_SCR_ERRE 0x00400000
-#define RBIT_SCR_VGE 0x00200000
-#define RBIT_SCR_WPVE 0x00100000
-#define RBIT_SCR_RMCST 0x00080000
-#define RBIT_SCR_EMWS 0x00040000
-#define RBIT_SCR_ADCE 0x00020000
-#define RBIT_SCR_BCLM 0x00010000
-
-#define RBIT_SCR_FRZW 0x00008000
-#define RBIT_SCR_FRZ2 0x00004000
-#define RBIT_SCR_FRZ1 0x00002000
-#define RBIT_SCR_SAM 0x00001000
-#define RBIT_SCR_HWDEN 0x00000800
-#define RBIT_SCR_HWDCN2 0x00000400
-#define RBIT_SCR_HWDCN1 0x00000200 /* 512 clocks */
-#define RBIT_SCR_HWDCN0 0x00000100 /* 128 clocks */
-
-#define RBIT_SCR_LPREC 0x00000080
-#define RBIT_SCR_LPP16 0x00000040
-#define RBIT_SCR_LPEN 0x00000020
-#define RBIT_SCR_LPCLKDIV 0x0000001f
-
-
-/*
- * 68000 interrupt and trap vector numbers
- */
-#define M68K_IVEC_BUS_ERROR 2
-#define M68K_IVEC_ADDRESS_ERROR 3
-#define M68K_IVEC_ILLEGAL_OPCODE 4
-#define M68K_IVEC_ZERO_DIVIDE 5
-#define M68K_IVEC_CHK 6
-#define M68K_IVEC_TRAPV 7
-#define M68K_IVEC_PRIVILEGE 8
-#define M68K_IVEC_TRACE 9
-#define M68K_IVEC_LINE_A 10
-#define M68K_IVEC_LINE_F 11
-/* Unassigned, Reserved 12-14 */
-#define M68K_IVEC_UNINITIALIZED_INT 15
-/* Unassigned, Reserved 16-23 */
-#define M68K_IVEC_SPURIOUS_INT 24
-
-#define M68K_IVEC_LEVEL1_AUTOVECTOR 25
-#define M68K_IVEC_LEVEL2_AUTOVECTOR 26
-#define M68K_IVEC_LEVEL3_AUTOVECTOR 27
-#define M68K_IVEC_LEVEL4_AUTOVECTOR 28
-#define M68K_IVEC_LEVEL5_AUTOVECTOR 29
-#define M68K_IVEC_LEVEL6_AUTOVECTOR 30
-#define M68K_IVEC_LEVEL7_AUTOVECTOR 31
-
-#define M68K_IVEC_TRAP0 32
-#define M68K_IVEC_TRAP1 33
-#define M68K_IVEC_TRAP2 34
-#define M68K_IVEC_TRAP3 35
-#define M68K_IVEC_TRAP4 36
-#define M68K_IVEC_TRAP5 37
-#define M68K_IVEC_TRAP6 38
-#define M68K_IVEC_TRAP7 39
-#define M68K_IVEC_TRAP8 40
-#define M68K_IVEC_TRAP9 41
-#define M68K_IVEC_TRAP10 42
-#define M68K_IVEC_TRAP11 43
-#define M68K_IVEC_TRAP12 44
-#define M68K_IVEC_TRAP13 45
-#define M68K_IVEC_TRAP14 46
-#define M68K_IVEC_TRAP15 47
-/*
- * Unassigned, Reserved 48-59
- *
- * Note: Vectors 60-63 are used by the MC68302 (e.g. BAR, SCR).
- */
-
-/*
- * MC68302 Interrupt Vectors
- * Section 3.2
- */
-enum m68302_ivec_e {
- M302_IVEC_ERR =0,
- M302_IVEC_PB8 =1, /* General-Purpose Interrupt 0 */
- M302_IVEC_SMC2 =2,
- M302_IVEC_SMC1 =3,
- M302_IVEC_TIMER3 =4,
- M302_IVEC_SCP =5,
- M302_IVEC_TIMER2 =6,
- M302_IVEC_PB9 =7, /* General-Purpose Interrupt 1 */
- M302_IVEC_SCC3 =8,
- M302_IVEC_TIMER1 =9,
- M302_IVEC_SCC2 =10,
- M302_IVEC_IDMA =11,
- M302_IVEC_SDMA =12, /* SDMA Channels Bus Error */
- M302_IVEC_SCC1 =13,
- M302_IVEC_PB10 =14, /* General-Purpose Interrupt 2 */
- M302_IVEC_PB11 =15, /* General-Purpose Interrupt 3 */
- M302_IVEC_IRQ1 =17, /* External Device */
- M302_IVEC_IRQ6 =22, /* External Device */
- M302_IVEC_IRQ7 =23 /* External Device */
-};
-
-
-/*
- * GIMR - Global Interrupt Mode Register
- * Section 3.2.5.1
- */
-#define RBIT_GIMR_MOD (1<<15)
-#define RBIT_GIMR_IV7 (1<<14)
-#define RBIT_GIMR_IV6 (1<<13)
-#define RBIT_GIMR_IV1 (1<<12)
-#define RBIT_GIMR_ET7 (1<<10)
-#define RBIT_GIMR_ET6 (1<<9)
-#define RBIT_GIMR_ET1 (1<<8)
-#define RBIT_GIMR_VECTOR (7<<5)
-
-/*
- * IPR - Interrupt Pending Register (Section 3.2.5.2)
- * IMR - Interrupt Mask Register (Section 3.2.5.3)
- * ISR - Interrupt In-Service Register (Section 3.2.5.4)
- */
-#define RBIT_IPR_PB11 (1<<15)
-#define RBIT_IPR_PB10 (1<<14)
-#define RBIT_IPR_SCC1 (1<<13)
-#define RBIT_IPR_SDMA (1<<12)
-#define RBIT_IPR_IDMA (1<<11)
-#define RBIT_IPR_SCC2 (1<<10)
-#define RBIT_IPR_TIMER1 (1<<9)
-#define RBIT_IPR_SCC3 (1<<8)
-#define RBIT_IPR_PB9 (1<<7)
-#define RBIT_IPR_TIMER2 (1<<6)
-#define RBIT_IPR_SCP (1<<5)
-#define RBIT_IPR_TIMER3 (1<<4)
-#define RBIT_IPR_SMC1 (1<<3)
-#define RBIT_IPR_SMC2 (1<<2)
-#define RBIT_IPR_PB8 (1<<1)
-#define RBIT_IPR_ERR (1<<0)
-
-#define RBIT_ISR_PB11 (1<<15)
-#define RBIT_ISR_PB10 (1<<14)
-#define RBIT_ISR_SCC1 (1<<13)
-#define RBIT_ISR_SDMA (1<<12)
-#define RBIT_ISR_IDMA (1<<11)
-#define RBIT_ISR_SCC2 (1<<10)
-#define RBIT_ISR_TIMER1 (1<<9)
-#define RBIT_ISR_SCC3 (1<<8)
-#define RBIT_ISR_PB9 (1<<7)
-#define RBIT_ISR_TIMER2 (1<<6)
-#define RBIT_ISR_SCP (1<<5)
-#define RBIT_ISR_TIMER3 (1<<4)
-#define RBIT_ISR_SMC1 (1<<3)
-#define RBIT_ISR_SMC2 (1<<2)
-#define RBIT_ISR_PB8 (1<<1)
-
-#define RBIT_IMR_PB11 (1<<15) /* PB11 Interrupt Mask */
-#define RBIT_IMR_PB10 (1<<14) /* PB10 Interrupt Mask */
-#define RBIT_IMR_SCC1 (1<<13) /* SCC1 Interrupt Mask */
-#define RBIT_IMR_SDMA (1<<12) /* SDMA Interrupt Mask */
-#define RBIT_IMR_IDMA (1<<11) /* IDMA Interrupt Mask */
-#define RBIT_IMR_SCC2 (1<<10) /* SCC2 Interrupt Mask */
-#define RBIT_IMR_TIMER1 (1<<9) /* TIMER1 Interrupt Mask */
-#define RBIT_IMR_SCC3 (1<<8) /* SCC3 Interrupt Mask */
-#define RBIT_IMR_PB9 (1<<7) /* PB9 Interrupt Mask */
-#define RBIT_IMR_TIMER2 (1<<6) /* TIMER2 Interrupt Mask */
-#define RBIT_IMR_SCP (1<<5) /* SCP Interrupt Mask */
-#define RBIT_IMR_TIMER3 (1<<4) /* TIMER3 Interrupt Mask */
-#define RBIT_IMR_SMC1 (1<<3) /* SMC1 Interrupt Mask */
-#define RBIT_IMR_SMC2 (1<<2) /* SMC2 Interrupt Mask */
-#define RBIT_IMR_PB8 (1<<1) /* PB8 Interrupt Mask */
-
-
-/*
- * DRAM Refresh
- * Section 3.9
- *
- * The DRAM refresh memory map replaces the SCC2 Tx BD 6 and Tx BD 7
- * structures in the parameter RAM.
- *
- * Access to the DRAM registers can be accomplished by
- * the following approach:
- *
- * volatile m302_DRAM_refresh_t *dram;
- * dram = (volatile m302_DRAM_refresh_t *) &m302.scc2.bd.tx[6];
- *
- * Then simply use pointer references (e.g. dram->count = 3).
- */
-typedef struct {
- rtems_unsigned16 dram_high; /* DRAM high address and FC */
- rtems_unsigned16 dram_low; /* DRAM low address */
- rtems_unsigned16 increment; /* increment step (bytes/row) */
- rtems_unsigned16 count; /* RAM refresh cycle count (#rows) */
- rtems_unsigned16 t_ptr_h; /* temporary refresh high addr & FC */
- rtems_unsigned16 t_ptr_l; /* temporary refresh low address */
- rtems_unsigned16 t_count; /* temporary refresh cycles count */
- rtems_unsigned16 res; /* reserved */
-} m302_DRAM_refresh_t;
-
-
-/*
- * TMR - Timer Mode Register (for timers 1 and 2)
- * Section 3.5.2.1
- */
-#define RBIT_TMR_ICLK_STOP (0<<1)
-#define RBIT_TMR_ICLK_MASTER (1<<1)
-#define RBIT_TMR_ICLK_MASTER16 (2<<1)
-#define RBIT_TMR_ICLK_TIN (3<<1)
-
-#define RBIT_TMR_OM (1<<5)
-#define RBIT_TMR_ORI (1<<4)
-#define RBIT_TMR_FRR (1<<3)
-#define RBIT_TMR_RST (1<<0)
-
-
-/*
- * TER - Timer Event Register (for timers 1 and 2)
- * Section 3.5.2.5
- */
-#define RBIT_TER_REF (1<<1) /* Output Reference Event */
-#define RBIT_TER_CAP (1<<0) /* Capture Event */
-
-
-/*
- * SCC Buffer Descriptors and Buffer Descriptors Table
- * Section 4.5.5
- */
-typedef struct m302_SCC_bd {
- rtems_unsigned16 status; /* status and control */
- rtems_unsigned16 length; /* data length */
- rtems_unsigned8 *buffer; /* data buffer pointer */
-} m302_SCC_bd_t;
-
-typedef struct {
- m302_SCC_bd_t rx[8]; /* receive buffer descriptors */
- m302_SCC_bd_t tx[8]; /* transmit buffer descriptors */
-} m302_SCC_bd_table_t;
-
-
-/*
- * SCC Parameter RAM (offset 0x080 from an SCC Base)
- * Section 4.5.6
- *
- * Each SCC parameter RAM area begins at offset 0x80 from each SCC base
- * area (0x400, 0x500, or 0x600 from the dual-port RAM base).
- *
- * Offsets 0x9c-0xbf from each SCC base area compose the protocol-specific
- * portion of the SCC parameter RAM.
- */
-typedef struct {
- rtems_unsigned8 rfcr; /* Rx Function Code */
- rtems_unsigned8 tfcr; /* Tx Function Code */
- rtems_unsigned16 mrblr; /* Maximum Rx Buffer Length */
- rtems_unsigned16 _rstate; /* Rx Internal State */
- rtems_unsigned8 res2;
- rtems_unsigned8 rbd; /* Rx Internal Buffer Number */
- rtems_unsigned32 _rdptr; /* Rx Internal Data Pointer */
- rtems_unsigned16 _rcount; /* Rx Internal Byte Count */
- rtems_unsigned16 _rtmp; /* Rx Temp */
- rtems_unsigned16 _tstate; /* Tx Internal State */
- rtems_unsigned8 res7;
- rtems_unsigned8 tbd; /* Tx Internal Buffer Number */
- rtems_unsigned32 _tdptr; /* Tx Internal Data Pointer */
- rtems_unsigned16 _tcount; /* Tx Internal Byte Count */
- rtems_unsigned16 _ttmp; /* Tx Temp */
-} m302_SCC_parameters_t;
-
-/*
- * UART-Specific SCC Parameter RAM
- * Section 4.5.11.3
- */
-typedef struct {
- rtems_unsigned16 max_idl; /* Maximum IDLE Characters (rx) */
- rtems_unsigned16 idlc; /* Temporary rx IDLE counter */
- rtems_unsigned16 brkcr; /* Break Count Register (tx) */
- rtems_unsigned16 parec; /* Receive Parity Error Counter */
- rtems_unsigned16 frmec; /* Receive Framing Error Counter */
- rtems_unsigned16 nosec; /* Receive Noise Counter */
- rtems_unsigned16 brkec; /* Receive Break Condition Counter */
- rtems_unsigned16 uaddr1; /* UART ADDRESS Character 1 */
- rtems_unsigned16 uaddr2; /* UART ADDRESS Character 2 */
- rtems_unsigned16 rccr; /* Receive Control Character Register */
- rtems_unsigned16 character[8]; /* Control Characters 1 through 8*/
-} m302_SCC_UartSpecific_t;
-/*
- * This definition allows for the checking of receive buffers
- * for errors.
- */
-
-#define RCV_ERR 0x003F
-
-/*
- * UART receive buffer descriptor bit definitions.
- * Section 4.5.11.14
- */
-#define RBIT_UART_CTRL (1<<11) /* buffer contains a control char */
-#define RBIT_UART_ADDR (1<<10) /* first byte contains an address */
-#define RBIT_UART_MATCH (1<<9) /* indicates which addr char matched */
-#define RBIT_UART_IDLE (1<<8) /* buffer closed due to IDLE sequence */
-#define RBIT_UART_BR (1<<5) /* break sequence was received */
-#define RBIT_UART_FR (1<<4) /* framing error was received */
-#define RBIT_UART_PR (1<<3) /* parity error was received */
-#define RBIT_UART_OV (1<<1) /* receiver overrun occurred */
-#define RBIT_UART_CD (1<<0) /* carrier detect lost */
-#define RBIT_UART_STATUS 0x003B /* all status bits */
-
-/*
- * UART transmit buffer descriptor bit definitions.
- * Section 4.5.11.15
- */
-#define RBIT_UART_CR (1<<11) /* clear-to-send report
- * this results in two idle bits
- * between back-to-back frames
- */
-#define RBIT_UART_A (1<<10) /* buffer contains address characters
- * only valid in multidrop mode (UM0=1)
- */
-#define RBIT_UART_PREAMBLE (1<<9) /* send preamble before data */
-#define RBIT_UART_CTS_LOST (1<<0) /* CTS lost */
-
-/*
- * UART event register
- * Section 4.5.11.16
- */
-#define M302_UART_EV_CTS (1<<7) /* CTS status changed */
-#define M302_UART_EV_CD (1<<6) /* carrier detect status changed */
-#define M302_UART_EV_IDL (1<<5) /* IDLE sequence status changed */
-#define M302_UART_EV_BRK (1<<4) /* break character was received */
-#define M302_UART_EV_CCR (1<<3) /* control character received */
-#define M302_UART_EV_TX (1<<1) /* buffer has been transmitted */
-#define M302_UART_EV_RX (1<<0) /* buffer has been received */
-
-
-/*
- * HDLC-Specific SCC Parameter RAM
- * Section 4.5.12.3
- *
- * c_mask_l should be 0xF0B8 for 16-bit CRC, 0xdebb for 32-bit CRC
- * c_mask_h is a don't care for 16-bit CRC, 0x20E2 for 32-bit CRC
- */
-typedef struct {
- rtems_unsigned16 rcrc_l; /* Temp Receive CRC Low */
- rtems_unsigned16 rcrc_h; /* Temp Receive CRC High */
- rtems_unsigned16 c_mask_l; /* CRC Mask Low */
- rtems_unsigned16 c_mask_h; /* CRC Mask High */
- rtems_unsigned16 tcrc_l; /* Temp Transmit CRC Low */
- rtems_unsigned16 tcrc_h; /* Temp Transmit CRC High */
-
- rtems_unsigned16 disfc; /* Discard Frame Counter */
- rtems_unsigned16 crcec; /* CRC Error Counter */
- rtems_unsigned16 abtsc; /* Abort Sequence Counter */
- rtems_unsigned16 nmarc; /* Nonmatching Address Received Cntr */
- rtems_unsigned16 retrc; /* Frame Retransmission Counter */
-
- rtems_unsigned16 mflr; /* Maximum Frame Length Register */
- rtems_unsigned16 max_cnt; /* Maximum_Length Counter */
-
- rtems_unsigned16 hmask; /* User Defined Frame Address Mask */
- rtems_unsigned16 haddr1; /* User Defined Frame Address */
- rtems_unsigned16 haddr2; /* " */
- rtems_unsigned16 haddr3; /* " */
- rtems_unsigned16 haddr4; /* " */
-} m302_SCC_HdlcSpecific_t;
-/*
- * HDLC receiver buffer descriptor bit definitions
- * Section 4.5.12.10
- */
-#define RBIT_HDLC_EMPTY_BIT 0x8000 /* buffer associated with BD is empty */
-#define RBIT_HDLC_LAST_BIT 0x0800 /* buffer is last in a frame */
-#define RBIT_HDLC_FIRST_BIT 0x0400 /* buffer is first in a frame */
-#define RBIT_HDLC_FRAME_LEN 0x0020 /* receiver frame length violation */
-#define RBIT_HDLC_NONOCT_Rx 0x0010 /* received non-octet aligned frame */
-#define RBIT_HDLC_ABORT_SEQ 0x0008 /* received abort sequence */
-#define RBIT_HDLC_CRC_ERROR 0x0004 /* frame contains a CRC error */
-#define RBIT_HDLC_OVERRUN 0x0002 /* receiver overrun occurred */
-#define RBIT_HDLC_CD_LOST 0x0001 /* carrier detect lost */
-
-/*
- * HDLC transmit buffer descriptor bit definitions
- * Section 4.5.12.11
- */
-#define RBIT_HDLC_READY_BIT 0x8000 /* buffer is ready to transmit */
-#define RBIT_HDLC_EXT_BUFFER 0x4000 /* buffer is in external memory */
-#define RBIT_HDLC_WRAP_BIT 0x2000 /* last buffer in bd table, so wrap */
-#define RBIT_HDLC_WAKE_UP 0x1000 /* interrupt when buffer serviced */
-#define RBIT_HDLC_LAST_BIT 0x0800 /* buffer is last in the frame */
-#define RBIT_HDLC_TxCRC_BIT 0x0400 /* transmit a CRC sequence */
-#define RBIT_HDLC_UNDERRUN 0x0002 /* transmitter underrun */
-#define RBIT_HDLC_CTS_LOST 0x0001 /* CTS lost */
-
-/*
- * HDLC event register bit definitions
- * Section 4.5.12.12
- */
-#define RBIT_HDLC_CTS 0x80 /* CTS status changed */
-#define RBIT_HDLC_CD 0x40 /* carrier detect status changed */
-#define RBIT_HDLC_IDL 0x20 /* IDLE sequence status changed */
-#define RBIT_HDLC_TXE 0x10 /* transmit error */
-#define RBIT_HDLC_RXF 0x08 /* received frame */
-#define RBIT_HDLC_BSY 0x04 /* frame rcvd and discarded due to
- * lack of buffers
- */
-#define RBIT_HDLC_TXB 0x02 /* buffer has been transmitted */
-#define RBIT_HDLC_RXB 0x01 /* received buffer */
-
-
-
-typedef struct {
- m302_SCC_bd_table_t bd; /* +000 Buffer Descriptor Table */
- m302_SCC_parameters_t parm; /* +080 Common Parameter RAM */
- union { /* +09C Protocol-Specific Parm RAM */
- m302_SCC_UartSpecific_t uart;
- m302_SCC_HdlcSpecific_t hdlc;
- } prot;
- rtems_unsigned8 res[0x040]; /* +0C0 reserved, (not implemented) */
-} m302_SCC_t;
-
-
-/*
- * Common SCC Registers
- */
-typedef struct {
- rtems_unsigned16 res1;
- rtems_unsigned16 scon; /* SCC Configuration Register 4.5.2 */
- rtems_unsigned16 scm; /* SCC Mode Register 4.5.3 */
- rtems_unsigned16 dsr; /* SCC Data Synchronization Register 4.5.4 */
- rtems_unsigned8 scce; /* SCC Event Register 4.5.8.1 */
- rtems_unsigned8 res2;
- rtems_unsigned8 sccm; /* SCC Mask Register 4.5.8.2 */
- rtems_unsigned8 res3;
- rtems_unsigned8 sccs; /* SCC Status Register 4.5.8.3 */
- rtems_unsigned8 res4;
- rtems_unsigned16 res5;
-} m302_SCC_Registers_t;
-
-/*
- * SCON - SCC Configuration Register
- * Section 4.5.2
- */
-#define RBIT_SCON_WOMS (1<<15) /* Wired-OR Mode Select (NMSI mode only)
- * When set, the TXD driver is an
- * open-drain output */
-#define RBIT_SCON_EXTC (1<<14) /* External Clock Source */
-#define RBIT_SCON_TCS (1<<13) /* Transmit Clock Source */
-#define RBIT_SCON_RCS (1<<12) /* Receive Clock Source */
-
-/*
- * SCM - SCC Mode Register bit definitions
- * Section 4.5.3
- * The parameter-specific mode bits occupy bits 15 through 6.
- */
-#define RBIT_SCM_ENR (1<<3) /* Enable receiver */
-#define RBIT_SCM_ENT (1<<2) /* Enable transmitter */
-
-
-/*
- * Internal MC68302 Registers
- * starts at offset 0x800 from dual-port RAM base
- * Section 2.8
- */
-typedef struct {
- /* offset +800 */
- rtems_unsigned16 res0;
- rtems_unsigned16 cmr; /* IDMA Channel Mode Register */
- rtems_unsigned32 sapr; /* IDMA Source Address Pointer */
- rtems_unsigned32 dapr; /* IDMA Destination Address Pointer */
- rtems_unsigned16 bcr; /* IDMA Byte Count Register */
- rtems_unsigned8 csr; /* IDMA Channel Status Register */
- rtems_unsigned8 res1;
- rtems_unsigned8 fcr; /* IDMA Function Code Register */
- rtems_unsigned8 res2;
-
- /* offset +812 */
- rtems_unsigned16 gimr; /* Global Interrupt Mode Register */
- rtems_unsigned16 ipr; /* Interrupt Pending Register */
- rtems_unsigned16 imr; /* Interrupt Mask Register */
- rtems_unsigned16 isr; /* Interrupt In-Service Register */
- rtems_unsigned16 res3;
- rtems_unsigned16 res4;
-
- /* offset +81e */
- rtems_unsigned16 pacnt; /* Port A Control Register */
- rtems_unsigned16 paddr; /* Port A Data Direction Register */
- rtems_unsigned16 padat; /* Port A Data Register */
- rtems_unsigned16 pbcnt; /* Port B Control Register */
- rtems_unsigned16 pbddr; /* Port B Data Direction Register */
- rtems_unsigned16 pbdat; /* Port B Data Register */
- rtems_unsigned16 res5;
-
- /* offset +82c */
- rtems_unsigned16 res6;
- rtems_unsigned16 res7;
-
- rtems_unsigned16 br0; /* Base Register (CS0) */
- rtems_unsigned16 or0; /* Option Register (CS0) */
- rtems_unsigned16 br1; /* Base Register (CS1) */
- rtems_unsigned16 or1; /* Option Register (CS1) */
- rtems_unsigned16 br2; /* Base Register (CS2) */
- rtems_unsigned16 or2; /* Option Register (CS2) */
- rtems_unsigned16 br3; /* Base Register (CS3) */
- rtems_unsigned16 or3; /* Option Register (CS3) */
-
- /* offset +840 */
- rtems_unsigned16 tmr1; /* Timer Unit 1 Mode Register */
- rtems_unsigned16 trr1; /* Timer Unit 1 Reference Register */
- rtems_unsigned16 tcr1; /* Timer Unit 1 Capture Register */
- rtems_unsigned16 tcn1; /* Timer Unit 1 Counter */
- rtems_unsigned8 res8;
- rtems_unsigned8 ter1; /* Timer Unit 1 Event Register */
- rtems_unsigned16 wrr; /* Watchdog Reference Register */
- rtems_unsigned16 wcn; /* Watchdog Counter */
- rtems_unsigned16 res9;
- rtems_unsigned16 tmr2; /* Timer Unit 2 Mode Register */
- rtems_unsigned16 trr2; /* Timer Unit 2 Reference Register */
- rtems_unsigned16 tcr2; /* Timer Unit 2 Capture Register */
- rtems_unsigned16 tcn2; /* Timer Unit 2 Counter */
- rtems_unsigned8 resa;
- rtems_unsigned8 ter2; /* Timer Unit 2 Event Register */
- rtems_unsigned16 resb;
- rtems_unsigned16 resc;
- rtems_unsigned16 resd;
-
- /* offset +860 */
- rtems_unsigned8 cr; /* Command Register */
- rtems_unsigned8 rese[0x1f];
-
- /* offset +880, +890, +8a0 */
- m302_SCC_Registers_t scc[3]; /* SCC1, SCC2, SCC3 Registers */
-
- /* offset +8b0 */
- rtems_unsigned16 spmode; /* SCP,SMC Mode and Clock Cntrl Reg */
- rtems_unsigned16 simask; /* Serial Interface Mask Register */
- rtems_unsigned16 simode; /* Serial Interface Mode Register */
-} m302_internalReg_t ;
-
-
-/*
- * MC68302 dual-port RAM structure.
- * (Includes System RAM, Parameter RAM, and Internal Registers).
- * Section 2.8
- */
-typedef struct {
- rtems_unsigned8 mem[0x240]; /* +000 User Data Memory */
- rtems_unsigned8 res1[0x1c0]; /* +240 reserved, (not implemented) */
- m302_SCC_t scc1; /* +400 SCC1 */
- m302_SCC_t scc2; /* +500 SCC2 */
- m302_SCC_t scc3; /* +600 SCC3 */
- rtems_unsigned8 res2[0x100]; /* +700 reserved, (not implemented) */
- m302_internalReg_t reg; /* +800 68302 Internal Registers */
-} m302_dualPortRAM_t;
-
-/* some useful defines the some of the registers above */
-
-
-/* ----
- MC68302 Chip Select Registers
- p3-46 2nd Edition
-
- */
-#define BR_ENABLED 1
-#define BR_DISABLED 0
-#define BR_FC_NULL 0
-#define BR_READ_ONLY 0
-#define BR_READ_WRITE 2
-#define OR_DTACK_0 0x0000
-#define OR_DTACK_1 0x2000
-#define OR_DTACK_2 0x4000
-#define OR_DTACK_3 0x6000
-#define OR_DTACK_4 0x8000
-#define OR_DTACK_5 0xA000
-#define OR_DTACK_6 0xC000
-#define OR_DTACK_EXT 0xE000
-#define OR_SIZE_64K 0x1FE0
-#define OR_SIZE_128K 0x1FC0
-#define OR_SIZE_256K 0x1F80
-#define OR_SIZE_512K 0x1F00
-#define OR_SIZE_1M 0x1E00
-#define OR_SIZE_2M 0x1C00
-#define OR_MASK_RW 0x0000
-#define OR_NO_MASK_RW 0x0002
-#define OR_MASK_FC 0x0000
-#define OR_NO_MASK_FC 0x0001
-
-#define MAKE_BR(base_address, enable, rw, fc) \
- ((base_address >> 11) | fc | rw | enable)
-
-#define MAKE_OR(bsize, DtAck, RW_Mask, FC_Mask) \
- (DtAck | ((~(bsize - 1) & 0x00FFFFFF) >> 11) | FC_Mask | RW_Mask)
-
-#define __REG_CAT(r, n) r ## n
-#define WRITE_BR(csel, base_address, enable, rw, fc) \
- __REG_CAT(m302.reg.br, csel) = MAKE_BR(base_address, enable, rw, fc)
-#define WRITE_OR(csel, bsize, DtAck, RW_Mask, FC_Mask) \
- __REG_CAT(m302.reg.or, csel) = MAKE_OR(bsize, DtAck, RW_Mask, FC_Mask)
-
-/* ----
- MC68302 Watchdog Timer Enable Bit
-
- */
-#define WATCHDOG_ENABLE (1)
-#define WATCHDOG_TRIGGER() (m302.reg.wrr = 0x10 | WATCHDOG_ENABLE, m302.reg.wcn = 0)
-#define WATCHDOG_TOGGLE() (m302.reg.wcn = WATCHDOG_TIMEOUT_PERIOD)
-#define DISABLE_WATCHDOG() (m302.reg.wrr = 0)
-
-/*
- * Declare the variable that's used to reference the variables in
- * the dual-port RAM.
- */
-extern volatile m302_dualPortRAM_t m302;
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/cpu/m68k/m68360.h b/cpukit/score/cpu/m68k/m68360.h
deleted file mode 100644
index fd78fa1104..0000000000
--- a/cpukit/score/cpu/m68k/m68360.h
+++ /dev/null
@@ -1,889 +0,0 @@
-/*
- **************************************************************************
- **************************************************************************
- ** **
- ** MOTOROLA MC68360 QUAD INTEGRATED COMMUNICATIONS CONTROLLER (QUICC) **
- ** **
- ** HARDWARE DECLARATIONS **
- ** **
- ** **
- ** Submitted By: **
- ** **
- ** W. Eric Norum **
- ** Saskatchewan Accelerator Laboratory **
- ** University of Saskatchewan **
- ** 107 North Road **
- ** Saskatoon, Saskatchewan, CANADA **
- ** S7N 5C6 **
- ** **
- ** eric@skatter.usask.ca **
- ** **
- ** $Id$ **
- ** **
- **************************************************************************
- **************************************************************************
- */
-
-#ifndef __MC68360_h
-#define __MC68360_h
-
-/*
- *************************************************************************
- * REGISTER SUBBLOCKS *
- *************************************************************************
- */
-
-/*
- * Memory controller registers
- */
-typedef struct m360MEMCRegisters_ {
- unsigned long br;
- unsigned long or;
- unsigned long _pad[2];
-} m360MEMCRegisters_t;
-
-/*
- * Serial Communications Controller registers
- */
-typedef struct m360SCCRegisters_ {
- unsigned long gsmr_l;
- unsigned long gsmr_h;
- unsigned short psmr;
- unsigned short _pad0;
- unsigned short todr;
- unsigned short dsr;
- unsigned short scce;
- unsigned short _pad1;
- unsigned short sccm;
- unsigned char _pad2;
- unsigned char sccs;
- unsigned long _pad3[2];
-} m360SCCRegisters_t;
-
-/*
- * Serial Management Controller registers
- */
-typedef struct m360SMCRegisters_ {
- unsigned short _pad0;
- unsigned short smcmr;
- unsigned short _pad1;
- unsigned char smce;
- unsigned char _pad2;
- unsigned short _pad3;
- unsigned char smcm;
- unsigned char _pad4;
- unsigned long _pad5;
-} m360SMCRegisters_t;
-
-
-/*
- *************************************************************************
- * Miscellaneous Parameters *
- *************************************************************************
- */
-typedef struct m360MiscParms_ {
- unsigned short rev_num;
- unsigned short _res1;
- unsigned long _res2;
- unsigned long _res3;
-} m360MiscParms_t;
-
-/*
- *************************************************************************
- * RISC Timers *
- *************************************************************************
- */
-typedef struct m360TimerParms_ {
- unsigned short tm_base;
- unsigned short _tm_ptr;
- unsigned short _r_tmr;
- unsigned short _r_tmv;
- unsigned long tm_cmd;
- unsigned long tm_cnt;
-} m360TimerParms_t;
-
-/*
- * RISC Controller Configuration Register (RCCR)
- * All other bits in this register are either reserved or
- * used only with a Motorola-supplied RAM microcode packge.
- */
-#define M360_RCCR_TIME (1<<15) /* Enable timer */
-#define M360_RCCR_TIMEP(x) ((x)<<8) /* Timer period */
-
-/*
- * Command register
- * Set up this register before issuing a M360_CR_OP_SET_TIMER command.
- */
-#define M360_TM_CMD_V (1<<31) /* Set to enable timer */
-#define M360_TM_CMD_R (1<<30) /* Set for automatic restart */
-#define M360_TM_CMD_TIMER(x) ((x)<<16) /* Select timer */
-#define M360_TM_CMD_PERIOD(x) (x) /* Timer period (16 bits) */
-
-/*
- *************************************************************************
- * DMA Controllers *
- *************************************************************************
- */
-typedef struct m360IDMAparms_ {
- unsigned short ibase;
- unsigned short ibptr;
- unsigned long _istate;
- unsigned long _itemp;
-} m360IDMAparms_t;
-
-/*
- *************************************************************************
- * Serial Communication Controllers *
- *************************************************************************
- */
-typedef struct m360SCCparms_ {
- unsigned short rbase;
- unsigned short tbase;
- unsigned char rfcr;
- unsigned char tfcr;
- unsigned short mrblr;
- unsigned long _rstate;
- unsigned long _pad0;
- unsigned short _rbptr;
- unsigned short _pad1;
- unsigned long _pad2;
- unsigned long _tstate;
- unsigned long _pad3;
- unsigned short _tbptr;
- unsigned short _pad4;
- unsigned long _pad5;
- unsigned long _rcrc;
- unsigned long _tcrc;
- union {
- struct {
- unsigned long _res0;
- unsigned long _res1;
- unsigned short max_idl;
- unsigned short _idlc;
- unsigned short brkcr;
- unsigned short parec;
- unsigned short frmec;
- unsigned short nosec;
- unsigned short brkec;
- unsigned short brklen;
- unsigned short uaddr[2];
- unsigned short _rtemp;
- unsigned short toseq;
- unsigned short character[8];
- unsigned short rccm;
- unsigned short rccr;
- unsigned short rlbc;
- } uart;
- struct {
- unsigned long crc_p;
- unsigned long crc_c;
- } transparent;
-
- } un;
-} m360SCCparms_t;
-
-typedef struct m360SCCENparms_ {
- unsigned short rbase;
- unsigned short tbase;
- unsigned char rfcr;
- unsigned char tfcr;
- unsigned short mrblr;
- unsigned long _rstate;
- unsigned long _pad0;
- unsigned short _rbptr;
- unsigned short _pad1;
- unsigned long _pad2;
- unsigned long _tstate;
- unsigned long _pad3;
- unsigned short _tbptr;
- unsigned short _pad4;
- unsigned long _pad5;
- unsigned long _rcrc;
- unsigned long _tcrc;
- union {
- struct {
- unsigned long _res0;
- unsigned long _res1;
- unsigned short max_idl;
- unsigned short _idlc;
- unsigned short brkcr;
- unsigned short parec;
- unsigned short frmec;
- unsigned short nosec;
- unsigned short brkec;
- unsigned short brklen;
- unsigned short uaddr[2];
- unsigned short _rtemp;
- unsigned short toseq;
- unsigned short character[8];
- unsigned short rccm;
- unsigned short rccr;
- unsigned short rlbc;
- } uart;
- struct {
- unsigned long c_pres;
- unsigned long c_mask;
- unsigned long crcec;
- unsigned long alec;
- unsigned long disfc;
- unsigned short pads;
- unsigned short ret_lim;
- unsigned short _ret_cnt;
- unsigned short mflr;
- unsigned short minflr;
- unsigned short maxd1;
- unsigned short maxd2;
- unsigned short _maxd;
- unsigned short dma_cnt;
- unsigned short _max_b;
- unsigned short gaddr1;
- unsigned short gaddr2;
- unsigned short gaddr3;
- unsigned short gaddr4;
- unsigned long _tbuf0data0;
- unsigned long _tbuf0data1;
- unsigned long _tbuf0rba0;
- unsigned long _tbuf0crc;
- unsigned short _tbuf0bcnt;
- unsigned short paddr_h;
- unsigned short paddr_m;
- unsigned short paddr_l;
- unsigned short p_per;
- unsigned short _rfbd_ptr;
- unsigned short _tfbd_ptr;
- unsigned short _tlbd_ptr;
- unsigned long _tbuf1data0;
- unsigned long _tbuf1data1;
- unsigned long _tbuf1rba0;
- unsigned long _tbuf1crc;
- unsigned short _tbuf1bcnt;
- unsigned short _tx_len;
- unsigned short iaddr1;
- unsigned short iaddr2;
- unsigned short iaddr3;
- unsigned short iaddr4;
- unsigned short _boff_cnt;
- unsigned short taddr_l;
- unsigned short taddr_m;
- unsigned short taddr_h;
- } ethernet;
- struct {
- unsigned long crc_p;
- unsigned long crc_c;
- } transparent;
- } un;
-} m360SCCENparms_t;
-
-/*
- * Receive and transmit function code register bits
- * These apply to the function code registers of all devices, not just SCC.
- */
-#define M360_RFCR_MOT (1<<4)
-#define M360_RFCR_DMA_SPACE 0x8
-#define M360_TFCR_MOT (1<<4)
-#define M360_TFCR_DMA_SPACE 0x8
-
-/*
- *************************************************************************
- * Serial Management Controllers *
- *************************************************************************
- */
-typedef struct m360SMCparms_ {
- unsigned short rbase;
- unsigned short tbase;
- unsigned char rfcr;
- unsigned char tfcr;
- unsigned short mrblr;
- unsigned long _rstate;
- unsigned long _pad0;
- unsigned short _rbptr;
- unsigned short _pad1;
- unsigned long _pad2;
- unsigned long _tstate;
- unsigned long _pad3;
- unsigned short _tbptr;
- unsigned short _pad4;
- unsigned long _pad5;
- union {
- struct {
- unsigned short max_idl;
- unsigned short _pad0;
- unsigned short brklen;
- unsigned short brkec;
- unsigned short brkcr;
- unsigned short _r_mask;
- } uart;
- struct {
- unsigned short _pad0[5];
- } transparent;
- } un;
-} m360SMCparms_t;
-
-/*
- * Mode register
- */
-#define M360_SMCMR_CLEN(x) ((x)<<11) /* Character length */
-#define M360_SMCMR_2STOP (1<<10) /* 2 stop bits */
-#define M360_SMCMR_PARITY (1<<9) /* Enable parity */
-#define M360_SMCMR_EVEN (1<<8) /* Even parity */
-#define M360_SMCMR_SM_GCI (0<<4) /* GCI Mode */
-#define M360_SMCMR_SM_UART (2<<4) /* UART Mode */
-#define M360_SMCMR_SM_TRANSPARENT (3<<4) /* Transparent Mode */
-#define M360_SMCMR_DM_LOOPBACK (1<<2) /* Local loopback mode */
-#define M360_SMCMR_DM_ECHO (2<<2) /* Echo mode */
-#define M360_SMCMR_TEN (1<<1) /* Enable transmitter */
-#define M360_SMCMR_REN (1<<0) /* Enable receiver */
-
-/*
- * Event and mask registers (SMCE, SMCM)
- */
-#define M360_SMCE_BRK (1<<4)
-#define M360_SMCE_BSY (1<<2)
-#define M360_SMCE_TX (1<<1)
-#define M360_SMCE_RX (1<<0)
-
-/*
- *************************************************************************
- * Serial Peripheral Interface *
- *************************************************************************
- */
-typedef struct m360SPIparms_ {
- unsigned short rbase;
- unsigned short tbase;
- unsigned char rfcr;
- unsigned char tfcr;
- unsigned short mrblr;
- unsigned long _rstate;
- unsigned long _pad0;
- unsigned short _rbptr;
- unsigned short _pad1;
- unsigned long _pad2;
- unsigned long _tstate;
- unsigned long _pad3;
- unsigned short _tbptr;
- unsigned short _pad4;
- unsigned long _pad5;
-} m360SPIparms_t;
-
-/*
- * Mode register (SPMODE)
- */
-#define M360_SPMODE_LOOP (1<<14) /* Local loopback mode */
-#define M360_SPMODE_CI (1<<13) /* Clock invert */
-#define M360_SPMODE_CP (1<<12) /* Clock phase */
-#define M360_SPMODE_DIV16 (1<<11) /* Divide BRGCLK by 16 */
-#define M360_SPMODE_REV (1<<10) /* Reverse data */
-#define M360_SPMODE_MASTER (1<<9) /* SPI is master */
-#define M360_SPMODE_EN (1<<8) /* Enable SPI */
-#define M360_SPMODE_CLEN(x) ((x)<<4) /* Character length */
-#define M360_SPMODE_PM(x) (x) /* Prescaler modulus */
-
-/*
- * Mode register (SPCOM)
- */
-#define M360_SPCOM_STR (1<<7) /* Start transmit */
-
-/*
- * Event and mask registers (SPIE, SPIM)
- */
-#define M360_SPIE_MME (1<<5) /* Multi-master error */
-#define M360_SPIE_TXE (1<<4) /* Tx error */
-#define M360_SPIE_BSY (1<<2) /* Busy condition*/
-#define M360_SPIE_TXB (1<<1) /* Tx buffer */
-#define M360_SPIE_RXB (1<<0) /* Rx buffer */
-
-/*
- *************************************************************************
- * SDMA (SCC, SMC, SPI) Buffer Descriptors *
- *************************************************************************
- */
-typedef struct m360BufferDescriptor_ {
- unsigned short status;
- unsigned short length;
- volatile void *buffer;
-} m360BufferDescriptor_t;
-
-/*
- * Bits in receive buffer descriptor status word
- */
-#define M360_BD_EMPTY (1<<15) /* Ethernet, SCC UART, SMC UART, SPI */
-#define M360_BD_WRAP (1<<13) /* Ethernet, SCC UART, SMC UART, SPI */
-#define M360_BD_INTERRUPT (1<<12) /* Ethernet, SCC UART, SMC UART, SPI */
-#define M360_BD_LAST (1<<11) /* Ethernet, SPI */
-#define M360_BD_CONTROL_CHAR (1<<11) /* SCC UART */
-#define M360_BD_FIRST_IN_FRAME (1<<10) /* Ethernet */
-#define M360_BD_ADDRESS (1<<10) /* SCC UART */
-#define M360_BD_CONTINUOUS (1<<9) /* SCC UART, SMC UART, SPI */
-#define M360_BD_MISS (1<<8) /* Ethernet */
-#define M360_BD_IDLE (1<<8) /* SCC UART, SMC UART */
-#define M360_BD_ADDRSS_MATCH (1<<7) /* SCC UART */
-#define M360_BD_LONG (1<<5) /* Ethernet */
-#define M360_BD_BREAK (1<<5) /* SCC UART, SMC UART */
-#define M360_BD_NONALIGNED (1<<4) /* Ethernet */
-#define M360_BD_FRAMING_ERROR (1<<4) /* SCC UART, SMC UART */
-#define M360_BD_SHORT (1<<3) /* Ethernet */
-#define M360_BD_PARITY_ERROR (1<<3) /* SCC UART, SMC UART */
-#define M360_BD_CRC_ERROR (1<<2) /* Ethernet */
-#define M360_BD_OVERRUN (1<<1) /* Ethernet, SCC UART, SMC UART, SPI */
-#define M360_BD_COLLISION (1<<0) /* Ethernet */
-#define M360_BD_CARRIER_LOST (1<<0) /* SCC UART */
-#define M360_BD_MASTER_ERROR (1<<0) /* SPI */
-
-/*
- * Bits in transmit buffer descriptor status word
- * Many bits have the same meaning as those in receiver buffer descriptors.
- */
-#define M360_BD_READY (1<<15) /* Ethernet, SCC UART, SMC UART, SPI */
-#define M360_BD_PAD (1<<14) /* Ethernet */
-#define M360_BD_CTS_REPORT (1<<11) /* SCC UART */
-#define M360_BD_TX_CRC (1<<10) /* Ethernet */
-#define M360_BD_DEFER (1<<9) /* Ethernet */
-#define M360_BD_HEARTBEAT (1<<8) /* Ethernet */
-#define M360_BD_PREAMBLE (1<<8) /* SCC UART, SMC UART */
-#define M360_BD_LATE_COLLISION (1<<7) /* Ethernet */
-#define M360_BD_NO_STOP_BIT (1<<7) /* SCC UART */
-#define M360_BD_RETRY_LIMIT (1<<6) /* Ethernet */
-#define M360_BD_RETRY_COUNT(x) (((x)&0x3C)>>2) /* Ethernet */
-#define M360_BD_UNDERRUN (1<<1) /* Ethernet, SPI */
-#define M360_BD_CARRIER_LOST (1<<0) /* Ethernet */
-#define M360_BD_CTS_LOST (1<<0) /* SCC UART */
-
-/*
- *************************************************************************
- * IDMA Buffer Descriptors *
- *************************************************************************
- */
-typedef struct m360IDMABufferDescriptor_ {
- unsigned short status;
- unsigned short _pad;
- unsigned long length;
- void *source;
- void *destination;
-} m360IDMABufferDescriptor_t;
-
-/*
- *************************************************************************
- * RISC Communication Processor Module Command Register (CR) *
- *************************************************************************
- */
-#define M360_CR_RST (1<<15) /* Reset communication processor */
-#define M360_CR_OP_INIT_RX_TX (0<<8) /* SCC, SMC UART, SMC GCI, SPI */
-#define M360_CR_OP_INIT_RX (1<<8) /* SCC, SMC UART, SPI */
-#define M360_CR_OP_INIT_TX (2<<8) /* SCC, SMC UART, SPI */
-#define M360_CR_OP_INIT_HUNT (3<<8) /* SCC, SMC UART */
-#define M360_CR_OP_STOP_TX (4<<8) /* SCC, SMC UART */
-#define M360_CR_OP_GR_STOP_TX (5<<8) /* SCC */
-#define M360_CR_OP_INIT_IDMA (5<<8) /* IDMA */
-#define M360_CR_OP_RESTART_TX (6<<8) /* SCC, SMC UART */
-#define M360_CR_OP_CLOSE_RX_BD (7<<8) /* SCC, SMC UART, SPI */
-#define M360_CR_OP_SET_GRP_ADDR (8<<8) /* SCC */
-#define M360_CR_OP_SET_TIMER (8<<8) /* Timer */
-#define M360_CR_OP_GCI_TIMEOUT (9<<8) /* SMC GCI */
-#define M360_CR_OP_RESERT_BCS (10<<8) /* SCC */
-#define M360_CR_OP_GCI_ABORT (10<<8) /* SMC GCI */
-#define M360_CR_CHAN_SCC1 (0<<4) /* Channel selection */
-#define M360_CR_CHAN_SCC2 (4<<4)
-#define M360_CR_CHAN_SPI (5<<4)
-#define M360_CR_CHAN_TIMER (5<<4)
-#define M360_CR_CHAN_SCC3 (8<<4)
-#define M360_CR_CHAN_SMC1 (9<<4)
-#define M360_CR_CHAN_IDMA1 (9<<4)
-#define M360_CR_CHAN_SCC4 (12<<4)
-#define M360_CR_CHAN_SMC2 (13<<4)
-#define M360_CR_CHAN_IDMA2 (13<<4)
-#define M360_CR_FLG (1<<0) /* Command flag */
-
-/*
- *************************************************************************
- * System Protection Control Register (SYPCR) *
- *************************************************************************
- */
-#define M360_SYPCR_SWE (1<<7) /* Software watchdog enable */
-#define M360_SYPCR_SWRI (1<<6) /* Software watchdog reset select */
-#define M360_SYPCR_SWT1 (1<<5) /* Software watchdog timing bit 1 */
-#define M360_SYPCR_SWT0 (1<<4) /* Software watchdog timing bit 0 */
-#define M360_SYPCR_DBFE (1<<3) /* Double bus fault monitor enable */
-#define M360_SYPCR_BME (1<<2) /* Bus monitor external enable */
-#define M360_SYPCR_BMT1 (1<<1) /* Bus monitor timing bit 1 */
-#define M360_SYPCR_BMT0 (1<<0) /* Bus monitor timing bit 0 */
-
-/*
- *************************************************************************
- * Memory Control Registers *
- *************************************************************************
- */
-#define M360_GMR_RCNT(x) ((x)<<24) /* Refresh count */
-#define M360_GMR_RFEN (1<<23) /* Refresh enable */
-#define M360_GMR_RCYC(x) ((x)<<21) /* Refresh cycle length */
-#define M360_GMR_PGS(x) ((x)<<18) /* Page size */
-#define M360_GMR_DPS_32BIT (0<<16) /* DRAM port size */
-#define M360_GMR_DPS_16BIT (1<<16)
-#define M360_GMR_DPS_8BIT (2<<16)
-#define M360_GMR_DPS_DSACK (3<<16)
-#define M360_GMR_WBT40 (1<<15) /* Wait between 040 transfers */
-#define M360_GMR_WBTQ (1<<14) /* Wait between 360 transfers */
-#define M360_GMR_SYNC (1<<13) /* Synchronous external access */
-#define M360_GMR_EMWS (1<<12) /* External master wait state */
-#define M360_GMR_OPAR (1<<11) /* Odd parity */
-#define M360_GMR_PBEE (1<<10) /* Parity bus error enable */
-#define M360_GMR_TSS40 (1<<9) /* TS* sample for 040 */
-#define M360_GMR_NCS (1<<8) /* No CPU space */
-#define M360_GMR_DWQ (1<<7) /* Delay write for 360 */
-#define M360_GMR_DW40 (1<<6) /* Delay write for 040 */
-#define M360_GMR_GAMX (1<<5) /* Global address mux enable */
-
-#define M360_MEMC_BR_FC(x) ((x)<<7) /* Function code limit */
-#define M360_MEMC_BR_TRLXQ (1<<6) /* Relax timing requirements */
-#define M360_MEMC_BR_BACK40 (1<<5) /* Burst acknowledge to 040 */
-#define M360_MEMC_BR_CSNT40 (1<<4) /* CS* negate timing for 040 */
-#define M360_MEMC_BR_CSNTQ (1<<3) /* CS* negate timing for 360 */
-#define M360_MEMC_BR_PAREN (1<<2) /* Enable parity checking */
-#define M360_MEMC_BR_WP (1<<1) /* Write Protect */
-#define M360_MEMC_BR_V (1<<0) /* Base/Option register are valid */
-
-#define M360_MEMC_OR_TCYC(x) ((x)<<28) /* Cycle length (clocks) */
-#define M360_MEMC_OR_WAITS(x) M360_MEMC_OR_TCYC((x)+1)
-#define M360_MEMC_OR_2KB 0x0FFFF800 /* Address range */
-#define M360_MEMC_OR_4KB 0x0FFFF000
-#define M360_MEMC_OR_8KB 0x0FFFE000
-#define M360_MEMC_OR_16KB 0x0FFFC000
-#define M360_MEMC_OR_32KB 0x0FFF8000
-#define M360_MEMC_OR_64KB 0x0FFF0000
-#define M360_MEMC_OR_128KB 0x0FFE0000
-#define M360_MEMC_OR_256KB 0x0FFC0000
-#define M360_MEMC_OR_512KB 0x0FF80000
-#define M360_MEMC_OR_1MB 0x0FF00000
-#define M360_MEMC_OR_2MB 0x0FE00000
-#define M360_MEMC_OR_4MB 0x0FC00000
-#define M360_MEMC_OR_8MB 0x0F800000
-#define M360_MEMC_OR_16MB 0x0F000000
-#define M360_MEMC_OR_32MB 0x0E000000
-#define M360_MEMC_OR_64MB 0x0C000000
-#define M360_MEMC_OR_128MB 0x08000000
-#define M360_MEMC_OR_256MB 0x00000000
-#define M360_MEMC_OR_FCMC(x) ((x)<<7) /* Function code mask */
-#define M360_MEMC_OR_BCYC(x) ((x)<<5) /* Burst cycle length (clocks) */
-#define M360_MEMC_OR_PGME (1<<3) /* Page mode enable */
-#define M360_MEMC_OR_32BIT (0<<1) /* Port size */
-#define M360_MEMC_OR_16BIT (1<<1)
-#define M360_MEMC_OR_8BIT (2<<1)
-#define M360_MEMC_OR_DSACK (3<<1)
-#define M360_MEMC_OR_DRAM (1<<0) /* Dynamic RAM select */
-
-/*
- *************************************************************************
- * SI Mode Register (SIMODE) *
- *************************************************************************
- */
-#define M360_SI_SMC2_BITS 0xFFFF0000 /* All SMC2 bits */
-#define M360_SI_SMC2_TDM (1<<31) /* Multiplexed SMC2 */
-#define M360_SI_SMC2_BRG1 (0<<28) /* SMC2 clock souce */
-#define M360_SI_SMC2_BRG2 (1<<28)
-#define M360_SI_SMC2_BRG3 (2<<28)
-#define M360_SI_SMC2_BRG4 (3<<28)
-#define M360_SI_SMC2_CLK5 (0<<28)
-#define M360_SI_SMC2_CLK6 (1<<28)
-#define M360_SI_SMC2_CLK7 (2<<28)
-#define M360_SI_SMC2_CLK8 (3<<28)
-#define M360_SI_SMC1_BITS 0x0000FFFF /* All SMC1 bits */
-#define M360_SI_SMC1_TDM (1<<15) /* Multiplexed SMC1 */
-#define M360_SI_SMC1_BRG1 (0<<12) /* SMC1 clock souce */
-#define M360_SI_SMC1_BRG2 (1<<12)
-#define M360_SI_SMC1_BRG3 (2<<12)
-#define M360_SI_SMC1_BRG4 (3<<12)
-#define M360_SI_SMC1_CLK1 (0<<12)
-#define M360_SI_SMC1_CLK2 (1<<12)
-#define M360_SI_SMC1_CLK3 (2<<12)
-#define M360_SI_SMC1_CLK4 (3<<12)
-
-/*
- *************************************************************************
- * SDMA Configuration Register (SDMA) *
- *************************************************************************
- */
-#define M360_SDMA_FREEZE (2<<13) /* Freeze on next bus cycle */
-#define M360_SDMA_SISM_7 (7<<8) /* Normal interrupt service mask */
-#define M360_SDMA_SAID_4 (4<<4) /* Normal arbitration ID */
-#define M360_SDMA_INTE (1<<1) /* SBER interrupt enable */
-#define M360_SDMA_INTB (1<<0) /* SBKP interrupt enable */
-
-/*
- *************************************************************************
- * Baud (sic) Rate Generators *
- *************************************************************************
- */
-#define M360_BRG_RST (1<<17) /* Reset generator */
-#define M360_BRG_EN (1<<16) /* Enable generator */
-#define M360_BRG_EXTC_BRGCLK (0<<14) /* Source is BRGCLK */
-#define M360_BRG_EXTC_CLK2 (1<<14) /* Source is CLK2 pin */
-#define M360_BRG_EXTC_CLK6 (2<<14) /* Source is CLK6 pin */
-#define M360_BRG_ATB (1<<13) /* Autobaud */
-#define M360_BRG_115200 (13<<1) /* Assume 25 MHz clock */
-#define M360_BRG_57600 (26<<1)
-#define M360_BRG_38400 (40<<1)
-#define M360_BRG_19200 (80<<1)
-#define M360_BRG_9600 (162<<1)
-#define M360_BRG_4800 (324<<1)
-#define M360_BRG_2400 (650<<1)
-#define M360_BRG_1200 (1301<<1)
-#define M360_BRG_600 (2603<<1)
-#define M360_BRG_300 ((324<<1) | 1)
-#define M360_BRG_150 ((650<<1) | 1)
-#define M360_BRG_75 ((1301<<1) | 1)
-
-/*
- *************************************************************************
- * MC68360 DUAL-PORT RAM AND REGISTERS *
- *************************************************************************
- */
-typedef struct m360_ {
- /*
- * Dual-port RAM
- */
- unsigned char dpram0[0x400]; /* Microcode program */
- unsigned char dpram1[0x200];
- unsigned char dpram2[0x100]; /* Microcode scratch */
- unsigned char dpram3[0x100]; /* Not on REV A or B masks */
- unsigned char _rsv0[0xC00-0x800];
- m360SCCENparms_t scc1p;
- unsigned char _rsv1[0xCB0-0xC00-sizeof(m360SCCENparms_t)];
- m360MiscParms_t miscp;
- unsigned char _rsv2[0xD00-0xCB0-sizeof(m360MiscParms_t)];
- m360SCCparms_t scc2p;
- unsigned char _rsv3[0xD80-0xD00-sizeof(m360SCCparms_t)];
- m360SPIparms_t spip;
- unsigned char _rsv4[0xDB0-0xD80-sizeof(m360SPIparms_t)];
- m360TimerParms_t tmp;
- unsigned char _rsv5[0xE00-0xDB0-sizeof(m360TimerParms_t)];
- m360SCCparms_t scc3p;
- unsigned char _rsv6[0xE70-0xE00-sizeof(m360SCCparms_t)];
- m360IDMAparms_t idma1p;
- unsigned char _rsv7[0xE80-0xE70-sizeof(m360IDMAparms_t)];
- m360SMCparms_t smc1p;
- unsigned char _rsv8[0xF00-0xE80-sizeof(m360SMCparms_t)];
- m360SCCparms_t scc4p;
- unsigned char _rsv9[0xF70-0xF00-sizeof(m360SCCparms_t)];
- m360IDMAparms_t idma2p;
- unsigned char _rsv10[0xF80-0xF70-sizeof(m360IDMAparms_t)];
- m360SMCparms_t smc2p;
- unsigned char _rsv11[0x1000-0xF80-sizeof(m360SMCparms_t)];
-
- /*
- * SIM Block
- */
- unsigned long mcr;
- unsigned long _pad00;
- unsigned char avr;
- unsigned char rsr;
- unsigned short _pad01;
- unsigned char clkocr;
- unsigned char _pad02;
- unsigned short _pad03;
- unsigned short pllcr;
- unsigned short _pad04;
- unsigned short cdvcr;
- unsigned short pepar;
- unsigned long _pad05[2];
- unsigned short _pad06;
- unsigned char sypcr;
- unsigned char swiv;
- unsigned short _pad07;
- unsigned short picr;
- unsigned short _pad08;
- unsigned short pitr;
- unsigned short _pad09;
- unsigned char _pad10;
- unsigned char swsr;
- unsigned long bkar;
- unsigned long bcar;
- unsigned long _pad11[2];
-
- /*
- * MEMC Block
- */
- unsigned long gmr;
- unsigned short mstat;
- unsigned short _pad12;
- unsigned long _pad13[2];
- m360MEMCRegisters_t memc[8];
- unsigned char _pad14[0xF0-0xD0];
- unsigned char _pad15[0x100-0xF0];
- unsigned char _pad16[0x500-0x100];
-
- /*
- * IDMA1 Block
- */
- unsigned short iccr;
- unsigned short _pad17;
- unsigned short cmr1;
- unsigned short _pad18;
- unsigned long sapr1;
- unsigned long dapr1;
- unsigned long bcr1;
- unsigned char fcr1;
- unsigned char _pad19;
- unsigned char cmar1;
- unsigned char _pad20;
- unsigned char csr1;
- unsigned char _pad21;
- unsigned short _pad22;
-
- /*
- * SDMA Block
- */
- unsigned char sdsr;
- unsigned char _pad23;
- unsigned short sdcr;
- unsigned long sdar;
-
- /*
- * IDMA2 Block
- */
- unsigned short _pad24;
- unsigned short cmr2;
- unsigned long sapr2;
- unsigned long dapr2;
- unsigned long bcr2;
- unsigned char fcr2;
- unsigned char _pad26;
- unsigned char cmar2;
- unsigned char _pad27;
- unsigned char csr2;
- unsigned char _pad28;
- unsigned short _pad29;
- unsigned long _pad30;
-
- /*
- * CPIC Block
- */
- unsigned long cicr;
- unsigned long cipr;
- unsigned long cimr;
- unsigned long cisr;
-
- /*
- * Parallel I/O Block
- */
- unsigned short padir;
- unsigned short papar;
- unsigned short paodr;
- unsigned short padat;
- unsigned long _pad31[2];
- unsigned short pcdir;
- unsigned short pcpar;
- unsigned short pcso;
- unsigned short pcdat;
- unsigned short pcint;
- unsigned short _pad32;
- unsigned long _pad33[5];
-
- /*
- * TIMER Block
- */
- unsigned short tgcr;
- unsigned short _pad34;
- unsigned long _pad35[3];
- unsigned short tmr1;
- unsigned short tmr2;
- unsigned short trr1;
- unsigned short trr2;
- unsigned short tcr1;
- unsigned short tcr2;
- unsigned short tcn1;
- unsigned short tcn2;
- unsigned short tmr3;
- unsigned short tmr4;
- unsigned short trr3;
- unsigned short trr4;
- unsigned short tcr3;
- unsigned short tcr4;
- unsigned short tcn3;
- unsigned short tcn4;
- unsigned short ter1;
- unsigned short ter2;
- unsigned short ter3;
- unsigned short ter4;
- unsigned long _pad36[2];
-
- /*
- * CP Block
- */
- unsigned short cr;
- unsigned short _pad37;
- unsigned short rccr;
- unsigned short _pad38;
- unsigned long _pad39[3];
- unsigned short _pad40;
- unsigned short rter;
- unsigned short _pad41;
- unsigned short rtmr;
- unsigned long _pad42[5];
-
- /*
- * BRG Block
- */
- unsigned long brgc1;
- unsigned long brgc2;
- unsigned long brgc3;
- unsigned long brgc4;
-
- /*
- * SCC Block
- */
- m360SCCRegisters_t scc1;
- m360SCCRegisters_t scc2;
- m360SCCRegisters_t scc3;
- m360SCCRegisters_t scc4;
-
- /*
- * SMC Block
- */
- m360SMCRegisters_t smc1;
- m360SMCRegisters_t smc2;
-
- /*
- * SPI Block
- */
- unsigned short spmode;
- unsigned short _pad43[2];
- unsigned char spie;
- unsigned char _pad44;
- unsigned short _pad45;
- unsigned char spim;
- unsigned char _pad46[2];
- unsigned char spcom;
- unsigned short _pad47[2];
-
- /*
- * PIP Block
- */
- unsigned short pipc;
- unsigned short _pad48;
- unsigned short ptpr;
- unsigned long pbdir;
- unsigned long pbpar;
- unsigned short _pad49;
- unsigned short pbodr;
- unsigned long pbdat;
- unsigned long _pad50[6];
-
- /*
- * SI Block
- */
- unsigned long simode;
- unsigned char sigmr;
- unsigned char _pad51;
- unsigned char sistr;
- unsigned char sicmr;
- unsigned long _pad52;
- unsigned long sicr;
- unsigned short _pad53;
- unsigned short sirp[2];
- unsigned short _pad54;
- unsigned long _pad55[2];
- unsigned char siram[256];
-} m360_t;
-
-extern volatile m360_t m360;
-
-#endif /* __MC68360_h */
diff --git a/cpukit/score/cpu/m68k/memcpy.c b/cpukit/score/cpu/m68k/memcpy.c
deleted file mode 100644
index 3948411f4b..0000000000
--- a/cpukit/score/cpu/m68k/memcpy.c
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * C library memcpy routine
- *
- * This routine has code to optimize performance on the CPU32+
- * and another version for other 68k machines.
- *
- * It could be optimized more for machines with MOVE16 instructions.
- *
- * The routine is placed in this source directory to ensure that it
- * is picked up by all applications.
- *
- * W. Eric Norum
- * Saskatchewan Accelerator Laboratory
- * University of Saskatchewan
- * Saskatoon, Saskatchewan, CANADA
- * eric@skatter.usask.ca
- */
-
-#include <string.h>
-#include <rtems/score/m68k.h>
-
-#if defined(__mcpu32__)
-#define COPYSETUP(n) n--
-#define COPY(to,from,n,size) \
- asm volatile ("1:\n" \
- "\tmove." size " (%0)+,(%1)+\n" \
- "\tdbf %2,1b\n" \
- "\tsub.l #0x10000,%2\n" \
- "\tbpl.b 1b\n" : \
- "=a" (from), "=a" (to), "=d" (n) :\
- "0" (from), "1" (to), "2" (n) : \
- "cc", "memory")
-#else
-#define COPYSETUP(n)
-#define COPY(to,from,n,size) \
- asm volatile ("1:\n" \
- "\tmove." size " (%0)+,(%1)+\n" \
- "\tsubq.l #1,%2\n\tbne.b 1b\n" : \
- "=a" (from), "=a" (to), "=d" (n) :\
- "0" (from), "1" (to), "2" (n) : \
- "cc", "memory")
-#endif
-
-void *
-memcpy(void *s1, const void *s2, size_t n)
-{
- char *p1 = s1;
- const char *p2 = s2;
-
- if (n) {
- if (n < 16) {
- COPYSETUP (n);
- COPY (p1, p2, n, "b");
- }
- else {
- int nbyte;
- int nl;
- nbyte = (int)p1 & 0x3;
- if (nbyte) {
- nbyte = 4 - nbyte;
- n -= nbyte;
- COPYSETUP (nbyte);
- COPY (p1, p2, nbyte, "b");
- }
-#if (M68K_HAS_MISALIGNED == 0)
- /*
- * Take care of machines that can't
- * handle misaligned references.
- */
- if ((int)p2 & 0x1) {
- COPYSETUP (n);
- COPY (p1, p2, n, "b");
- return s1;
- }
-#endif
- nl = (unsigned int)n >> 2;
- COPYSETUP (nl);
- COPY (p1, p2, nl, "l");
- nbyte = (int)n & 0x3;
- if (nbyte) {
- COPYSETUP (nbyte);
- COPY (p1, p2, nbyte, "b");
- }
- }
- }
- return s1;
-}
diff --git a/cpukit/score/cpu/m68k/qsm.h b/cpukit/score/cpu/m68k/qsm.h
deleted file mode 100644
index e1bf33bc12..0000000000
--- a/cpukit/score/cpu/m68k/qsm.h
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
- *-------------------------------------------------------------------
- *
- * QSM -- Queued Serial Module
- *
- * The QSM contains two serial interfaces: (a) the queued serial
- * peripheral interface (QSPI) and the serial communication interface
- * (SCI). The QSPI provides peripheral expansion and/or interprocessor
- * communication through a full-duplex, synchronous, three-wire bus. A
- * self contained RAM queue permits serial data transfers without CPU
- * intervention and automatic continuous sampling. The SCI provides a
- * standard non-return to zero mark/space format with wakeup functions
- * to allow the CPU to run uninterrupted until woken
- *
- * For more information, refer to Motorola's "Modular Microcontroller
- * Family Queued Serial Module Reference Manual" (Motorola document
- * QSMRM/AD).
- *
- * This file has been created by John S. Gwynne for support of
- * Motorola's 68332 MCU in the efi332 project.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the following conditions are met:
- * 1. Redistribution of source code and documentation must retain
- * the above authorship, this list of conditions and the
- * following disclaimer.
- * 2. The name of the author may not be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * This software is provided "AS IS" without warranty of any kind,
- * either expressed or implied, including, but not limited to, the
- * implied warranties of merchantability, title and fitness for a
- * particular purpose.
- *
- *------------------------------------------------------------------
- *
- * $Id$
- */
-
-#ifndef _QSM_H_
-#define _QSM_H_
-
-
-#include <efi332.h>
-
-
-/* SAM-- shift and mask */
-#undef SAM
-#define SAM(a,b,c) ((a << b) & c)
-
-
-/* QSM_CRB (QSM Control Register Block) base address of the QSM
- control registers */
-#if SIM_MM == 0
-#define QSM_CRB 0x7ffc00
-#else
-#undef SIM_MM
-#define SIM_MM 1
-#define QSM_CRB 0xfffc00
-#endif
-
-
-#define QSMCR (volatile unsigned short int * const)(0x00 + QSM_CRB)
- /* QSM Configuration Register */
-#define STOP 0x8000 /* Stop Enable */
-#define FRZ 0x6000 /* Freeze Control */
-#define SUPV 0x0080 /* Supervisor/Unrestricted */
-#define IARB 0x000f /* Inerrupt Arbitration */
-
-
-#define QTEST (volatile unsigned short int * const)(0x02 + QSM_CRB)
- /* QSM Test Register */
-/* Used only for factor testing */
-
-
-#define QILR (volatile unsigned char * const)(0x04 + QSM_CRB)
- /* QSM Interrupt Level Register */
-#define ILQSPI 0x38 /* Interrupt Level for QSPI */
-#define ILSCI 0x07 /* Interrupt Level for SCI */
-
-
-#define QIVR (volatile unsigned char * const)(0x05 + QSM_CRB)
- /* QSM Interrupt Vector Register */
-#define INTV 0xff /* Interrupt Vector Number */
-
-
-#define SCCR0 (volatile unsigned short int * const)(0x08 + QSM_CRB)
- /* SCI Control Register 0 */
-#define SCBR 0x1fff /* SCI Baud Rate */
-
-
-#define SCCR1 (volatile unsigned short int * const)(0x0a + QSM_CRB)
- /* SCI Control Register 1 */
-#define LOOPS 0x4000 /* Loop Mode */
-#define WOMS 0x2000 /* Wired-OR Mode for SCI Pins */
-#define ILT 0x1000 /* Idle-Line Detect Type */
-#define PT 0x0800 /* Parity Type */
-#define PE 0x0400 /* Parity Enable */
-#define M 0x0200 /* Mode Select */
-#define WAKE 0x0100 /* Wakeup by Address Mark */
-#define TIE 0x0080 /* Transmit Complete Interrupt Enable */
-#define TCIE 0x0040 /* Transmit Complete Interrupt Enable */
-#define RIE 0x0020 /* Receiver Interrupt Enable */
-#define ILIE 0x0010 /* Idle-Line Interrupt Enable */
-#define TE 0x0008 /* Transmitter Enable */
-#define RE 0x0004 /* Receiver Enable */
-#define RWU 0x0002 /* Receiver Wakeup */
-#define SBK 0x0001 /* Send Break */
-
-
-#define SCSR (volatile unsigned short int * const)(0x0c + QSM_CRB)
- /* SCI Status Register */
-#define TDRE 0x0100 /* Transmit Data Register Empty */
-#define TC 0x0080 /* Transmit Complete */
-#define RDRF 0x0040 /* Receive Data Register Full */
-#define RAF 0x0020 /* Receiver Active */
-#define IDLE 0x0010 /* Idle-Line Detected */
-#define OR 0x0008 /* Overrun Error */
-#define NF 0x0004 /* Noise Error Flag */
-#define FE 0x0002 /* Framing Error */
-#define PF 0x0001 /* Parity Error */
-
-
-#define SCDR (volatile unsigned short int * const)(0x0e + QSM_CRB)
- /* SCI Data Register */
-
-
-#define PORTQS (volatile unsigned char * const)(0x15 + QSM_CRB)
- /* Port QS Data Register */
-
-#define PQSPAR (volatile unsigned char * const)(0x16 + QSM_CRB)
- /* PORT QS Pin Assignment Rgister */
-/* Any bit cleared (zero) defines the corresponding pin to be an I/O
- pin. Any bit set defines the corresponding pin to be a QSPI
- signal. */
-/* note: PQS2 is a digital I/O pin unless the SPI is enabled in which
- case it becomes the SPI serial clock SCK. */
-/* note: PQS7 is a digital I/O pin unless the SCI transmitter is
- enabled in which case it becomes the SCI serial output TxD. */
-#define QSMFun 0x0
-#define QSMDis 0x1
-/*
- * PQSPAR Field | QSM Function | Discrete I/O pin
- *------------------+--------------+------------------ */
-#define PQSPA0 0 /* MISO | PQS0 */
-#define PQSPA1 1 /* MOSI | PQS1 */
-#define PQSPA2 2 /* SCK | PQS2 (see note)*/
-#define PQSPA3 3 /* PCSO/!SS | PQS3 */
-#define PQSPA4 4 /* PCS1 | PQS4 */
-#define PQSPA5 5 /* PCS2 | PQS5 */
-#define PQSPA6 6 /* PCS3 | PQS6 */
-#define PQSPA7 7 /* TxD | PQS7 (see note)*/
-
-
-#define DDRQS (volatile unsigned char * const)(0x17 + QSM_CRB)
- /* PORT QS Data Direction Register */
-/* Clearing a bit makes the corresponding pin an input; setting a bit
- makes the pin an output. */
-
-
-#define SPCR0 (volatile unsigned short int * const)(0x18 + QSM_CRB)
- /* QSPI Control Register 0 */
-#define MSTR 0x8000 /* Master/Slave Mode Select */
-#define WOMQ 0x4000 /* Wired-OR Mode for QSPI Pins */
-#define BITS 0x3c00 /* Bits Per Transfer */
-#define CPOL 0x0200 /* Clock Polarity */
-#define CPHA 0x0100 /* Clock Phase */
-#define SPBR 0x00ff /* Serial Clock Baud Rate */
-
-
-#define SPCR1 (volatile unsigned short int * const)(0x1a + QSM_CRB)
- /* QSPI Control Register 1 */
-#define SPE 0x8000 /* QSPI Enable */
-#define DSCKL 0x7f00 /* Delay before SCK */
-#define DTL 0x00ff /* Length of Delay after Transfer */
-
-
-#define SPCR2 (volatile unsigned short int * const)(0x1c + QSM_CRB)
- /* QSPI Control Register 2 */
-#define SPIFIE 0x8000 /* SPI Finished Interrupt Enable */
-#define WREN 0x4000 /* Wrap Enable */
-#define WRTO 0x2000 /* Wrap To */
-#define ENDQP 0x0f00 /* Ending Queue Pointer */
-#define NEWQP 0x000f /* New Queue Pointer Value */
-
-
-#define SPCR3 (volatile unsigned char * const)(0x1e + QSM_CRB)
- /* QSPI Control Register 3 */
-#define LOOPQ 0x0400 /* QSPI Loop Mode */
-#define HMIE 0x0200 /* HALTA and MODF Interrupt Enable */
-#define HALT 0x0100 /* Halt */
-
-
-#define SPSR (volatile unsigned char * const)(0x1f + QSM_CRB)
- /* QSPI Status Register */
-#define SPIF 0x0080 /* QSPI Finished Flag */
-#define MODF 0x0040 /* Mode Fault Flag */
-#define HALTA 0x0020 /* Halt Acknowlwdge Flag */
-#define CPTQP x0000f /* Completed Queue Pointer */
-
-#define QSPIRR (volatile unsigned char * const)(0x100 + QSM_CRB)
- /* QSPI Receive Data RAM */
-#define QSPITR (volatile unsigned char * const)(0x120 + QSM_CRB)
- /* QSPI Transmit Data RAM */
-#define QSPIcR (volatile unsigned char * const)(0x140 + QSM_CRB)
- /* QSPI Command RAM */
-
-#endif /* _QSM_H_ */
diff --git a/cpukit/score/cpu/m68k/rtems/asm.h b/cpukit/score/cpu/m68k/rtems/asm.h
deleted file mode 100644
index 456b213cb2..0000000000
--- a/cpukit/score/cpu/m68k/rtems/asm.h
+++ /dev/null
@@ -1,144 +0,0 @@
-/* asm.h
- *
- * This include file attempts to address the problems
- * caused by incompatible flavors of assemblers and
- * toolsets. It primarily addresses variations in the
- * use of leading underscores on symbols and the requirement
- * that register names be preceded by a %.
- *
- *
- * NOTE: The spacing in the use of these macros
- * is critical to them working as advertised.
- *
- * COPYRIGHT:
- *
- * This file is based on similar code found in newlib available
- * from ftp.cygnus.com. The file which was used had no copyright
- * notice. This file is freely distributable as long as the source
- * of the file is noted. This file is:
- *
- * COPYRIGHT (c) 1994-1997.
- * On-Line Applications Research Corporation (OAR).
- *
- * $Id$
- */
-
-#ifndef __M68k_ASM_h
-#define __M68k_ASM_h
-
-/*
- * Indicate we are in an assembly file and get the basic CPU definitions.
- */
-
-#ifndef ASM
-#define ASM
-#endif
-#include <rtems/score/targopts.h>
-#include <rtems/score/cpu.h>
-
-/*
- * Recent versions of GNU cpp define variables which indicate the
- * need for underscores and percents. If not using GNU cpp or
- * the version does not support this, then you will obviously
- * have to define these as appropriate.
- */
-
-#ifndef __USER_LABEL_PREFIX__
-#define __USER_LABEL_PREFIX__ _
-#endif
-
-#ifndef __REGISTER_PREFIX__
-#define __REGISTER_PREFIX__
-#endif
-
-/* ANSI concatenation macros. */
-
-#define CONCAT1(a, b) CONCAT2(a, b)
-#define CONCAT2(a, b) a ## b
-
-/* Use the right prefix for global labels. */
-
-#define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
-
-/* Use the right prefix for registers. */
-
-#define REG(x) CONCAT1 (__REGISTER_PREFIX__, x)
-
-#define d0 REG (d0)
-#define d1 REG (d1)
-#define d2 REG (d2)
-#define d3 REG (d3)
-#define d4 REG (d4)
-#define d5 REG (d5)
-#define d6 REG (d6)
-#define d7 REG (d7)
-#define a0 REG (a0)
-#define a1 REG (a1)
-#define a2 REG (a2)
-#define a3 REG (a3)
-#define a4 REG (a4)
-#define a5 REG (a5)
-#define a6 REG (a6)
-#define a7 REG (a7)
-#define sp REG (sp)
-
-#define msp REG (msp)
-#define usp REG (usp)
-#define isp REG (isp)
-#define sr REG (sr)
-#define vbr REG (vbr)
-#define dfc REG (dfc)
-#define sfc REG (sfc)
-
-/* mcf52xx special regs */
-#define cacr REG (cacr)
-#define acr0 REG (acr0)
-#define acr1 REG (acr1)
-#define rambar0 REG (rambar0)
-#define mbar REG (mbar)
-
-
-#define fp0 REG (fp0)
-#define fp1 REG (fp1)
-#define fp2 REG (fp2)
-#define fp3 REG (fp3)
-#define fp4 REG (fp4)
-#define fp5 REG (fp5)
-#define fp6 REG (fp6)
-#define fp7 REG (fp7)
-
-#define fpc REG (fpc)
-#define fpi REG (fpi)
-#define fps REG (fps)
-#define fpsr REG (fpsr)
-
-
-/*
- * Define macros to handle section beginning and ends.
- */
-
-
-#define BEGIN_CODE_DCL .text
-#define END_CODE_DCL
-#define BEGIN_DATA_DCL .data
-#define END_DATA_DCL
-#define BEGIN_CODE .text
-#define END_CODE
-#define BEGIN_DATA .data
-#define END_DATA
-#define BEGIN_BSS .bss
-#define END_BSS
-#define END
-
-/*
- * Following must be tailor for a particular flavor of the C compiler.
- * They may need to put underscores in front of the symbols.
- */
-
-#define PUBLIC(sym) .globl SYM (sym)
-#define EXTERN(sym) .globl SYM (sym)
-
-#endif
-/* end of include file */
-
-
diff --git a/cpukit/score/cpu/m68k/rtems/m68k/m68302.h b/cpukit/score/cpu/m68k/rtems/m68k/m68302.h
deleted file mode 100644
index 084ceac034..0000000000
--- a/cpukit/score/cpu/m68k/rtems/m68k/m68302.h
+++ /dev/null
@@ -1,661 +0,0 @@
-/*
- *------------------------------------------------------------------
- *
- * m68302.h - Definitions for Motorola MC68302 processor.
- *
- * Section references in this file refer to revision 2 of Motorola's
- * "MC68302 Integrated Multiprotocol Processor User's Manual".
- * (Motorola document MC68302UM/AD REV 2.)
- *
- * Based on Don Meyer's cpu68302.h that was posted in comp.sys.m68k
- * on 17 February, 1993.
- *
- * Copyright 1995 David W. Glessner.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the following conditions are met:
- * 1. Redistribution of source code and documentation must retain
- * the above copyright notice, this list of conditions and the
- * following disclaimer.
- * 2. The name of the author may not be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * This software is provided "AS IS" without warranty of any kind,
- * either expressed or implied, including, but not limited to, the
- * implied warranties of merchantability, title and fitness for a
- * particular purpose.
- *
- *
- * $Id$
- *
- *------------------------------------------------------------------
- */
-
-#ifndef __MOTOROLA_MC68302_DEFINITIONS_h
-#define __MOTOROLA_MC68302_DEFINITIONS_h
-
-/*
- * BAR - Base Address Register
- * Section 2.7
- */
-#define M302_BAR (*((volatile rtems_unsigned16 *) 0xf2))
-
-/*
- * SCR - System Control Register
- * Section 3.8.1
- */
-#define M302_SCR (*((volatile rtems_unsigned32 *) 0xf4))
-/*
- * SCR bits
- */
-#define RBIT_SCR_IPA 0x08000000
-#define RBIT_SCR_HWT 0x04000000
-#define RBIT_SCR_WPV 0x02000000
-#define RBIT_SCR_ADC 0x01000000
-
-#define RBIT_SCR_ERRE 0x00400000
-#define RBIT_SCR_VGE 0x00200000
-#define RBIT_SCR_WPVE 0x00100000
-#define RBIT_SCR_RMCST 0x00080000
-#define RBIT_SCR_EMWS 0x00040000
-#define RBIT_SCR_ADCE 0x00020000
-#define RBIT_SCR_BCLM 0x00010000
-
-#define RBIT_SCR_FRZW 0x00008000
-#define RBIT_SCR_FRZ2 0x00004000
-#define RBIT_SCR_FRZ1 0x00002000
-#define RBIT_SCR_SAM 0x00001000
-#define RBIT_SCR_HWDEN 0x00000800
-#define RBIT_SCR_HWDCN2 0x00000400
-#define RBIT_SCR_HWDCN1 0x00000200 /* 512 clocks */
-#define RBIT_SCR_HWDCN0 0x00000100 /* 128 clocks */
-
-#define RBIT_SCR_LPREC 0x00000080
-#define RBIT_SCR_LPP16 0x00000040
-#define RBIT_SCR_LPEN 0x00000020
-#define RBIT_SCR_LPCLKDIV 0x0000001f
-
-
-/*
- * 68000 interrupt and trap vector numbers
- */
-#define M68K_IVEC_BUS_ERROR 2
-#define M68K_IVEC_ADDRESS_ERROR 3
-#define M68K_IVEC_ILLEGAL_OPCODE 4
-#define M68K_IVEC_ZERO_DIVIDE 5
-#define M68K_IVEC_CHK 6
-#define M68K_IVEC_TRAPV 7
-#define M68K_IVEC_PRIVILEGE 8
-#define M68K_IVEC_TRACE 9
-#define M68K_IVEC_LINE_A 10
-#define M68K_IVEC_LINE_F 11
-/* Unassigned, Reserved 12-14 */
-#define M68K_IVEC_UNINITIALIZED_INT 15
-/* Unassigned, Reserved 16-23 */
-#define M68K_IVEC_SPURIOUS_INT 24
-
-#define M68K_IVEC_LEVEL1_AUTOVECTOR 25
-#define M68K_IVEC_LEVEL2_AUTOVECTOR 26
-#define M68K_IVEC_LEVEL3_AUTOVECTOR 27
-#define M68K_IVEC_LEVEL4_AUTOVECTOR 28
-#define M68K_IVEC_LEVEL5_AUTOVECTOR 29
-#define M68K_IVEC_LEVEL6_AUTOVECTOR 30
-#define M68K_IVEC_LEVEL7_AUTOVECTOR 31
-
-#define M68K_IVEC_TRAP0 32
-#define M68K_IVEC_TRAP1 33
-#define M68K_IVEC_TRAP2 34
-#define M68K_IVEC_TRAP3 35
-#define M68K_IVEC_TRAP4 36
-#define M68K_IVEC_TRAP5 37
-#define M68K_IVEC_TRAP6 38
-#define M68K_IVEC_TRAP7 39
-#define M68K_IVEC_TRAP8 40
-#define M68K_IVEC_TRAP9 41
-#define M68K_IVEC_TRAP10 42
-#define M68K_IVEC_TRAP11 43
-#define M68K_IVEC_TRAP12 44
-#define M68K_IVEC_TRAP13 45
-#define M68K_IVEC_TRAP14 46
-#define M68K_IVEC_TRAP15 47
-/*
- * Unassigned, Reserved 48-59
- *
- * Note: Vectors 60-63 are used by the MC68302 (e.g. BAR, SCR).
- */
-
-/*
- * MC68302 Interrupt Vectors
- * Section 3.2
- */
-enum m68302_ivec_e {
- M302_IVEC_ERR =0,
- M302_IVEC_PB8 =1, /* General-Purpose Interrupt 0 */
- M302_IVEC_SMC2 =2,
- M302_IVEC_SMC1 =3,
- M302_IVEC_TIMER3 =4,
- M302_IVEC_SCP =5,
- M302_IVEC_TIMER2 =6,
- M302_IVEC_PB9 =7, /* General-Purpose Interrupt 1 */
- M302_IVEC_SCC3 =8,
- M302_IVEC_TIMER1 =9,
- M302_IVEC_SCC2 =10,
- M302_IVEC_IDMA =11,
- M302_IVEC_SDMA =12, /* SDMA Channels Bus Error */
- M302_IVEC_SCC1 =13,
- M302_IVEC_PB10 =14, /* General-Purpose Interrupt 2 */
- M302_IVEC_PB11 =15, /* General-Purpose Interrupt 3 */
- M302_IVEC_IRQ1 =17, /* External Device */
- M302_IVEC_IRQ6 =22, /* External Device */
- M302_IVEC_IRQ7 =23 /* External Device */
-};
-
-
-/*
- * GIMR - Global Interrupt Mode Register
- * Section 3.2.5.1
- */
-#define RBIT_GIMR_MOD (1<<15)
-#define RBIT_GIMR_IV7 (1<<14)
-#define RBIT_GIMR_IV6 (1<<13)
-#define RBIT_GIMR_IV1 (1<<12)
-#define RBIT_GIMR_ET7 (1<<10)
-#define RBIT_GIMR_ET6 (1<<9)
-#define RBIT_GIMR_ET1 (1<<8)
-#define RBIT_GIMR_VECTOR (7<<5)
-
-/*
- * IPR - Interrupt Pending Register (Section 3.2.5.2)
- * IMR - Interrupt Mask Register (Section 3.2.5.3)
- * ISR - Interrupt In-Service Register (Section 3.2.5.4)
- */
-#define RBIT_IPR_PB11 (1<<15)
-#define RBIT_IPR_PB10 (1<<14)
-#define RBIT_IPR_SCC1 (1<<13)
-#define RBIT_IPR_SDMA (1<<12)
-#define RBIT_IPR_IDMA (1<<11)
-#define RBIT_IPR_SCC2 (1<<10)
-#define RBIT_IPR_TIMER1 (1<<9)
-#define RBIT_IPR_SCC3 (1<<8)
-#define RBIT_IPR_PB9 (1<<7)
-#define RBIT_IPR_TIMER2 (1<<6)
-#define RBIT_IPR_SCP (1<<5)
-#define RBIT_IPR_TIMER3 (1<<4)
-#define RBIT_IPR_SMC1 (1<<3)
-#define RBIT_IPR_SMC2 (1<<2)
-#define RBIT_IPR_PB8 (1<<1)
-#define RBIT_IPR_ERR (1<<0)
-
-#define RBIT_ISR_PB11 (1<<15)
-#define RBIT_ISR_PB10 (1<<14)
-#define RBIT_ISR_SCC1 (1<<13)
-#define RBIT_ISR_SDMA (1<<12)
-#define RBIT_ISR_IDMA (1<<11)
-#define RBIT_ISR_SCC2 (1<<10)
-#define RBIT_ISR_TIMER1 (1<<9)
-#define RBIT_ISR_SCC3 (1<<8)
-#define RBIT_ISR_PB9 (1<<7)
-#define RBIT_ISR_TIMER2 (1<<6)
-#define RBIT_ISR_SCP (1<<5)
-#define RBIT_ISR_TIMER3 (1<<4)
-#define RBIT_ISR_SMC1 (1<<3)
-#define RBIT_ISR_SMC2 (1<<2)
-#define RBIT_ISR_PB8 (1<<1)
-
-#define RBIT_IMR_PB11 (1<<15) /* PB11 Interrupt Mask */
-#define RBIT_IMR_PB10 (1<<14) /* PB10 Interrupt Mask */
-#define RBIT_IMR_SCC1 (1<<13) /* SCC1 Interrupt Mask */
-#define RBIT_IMR_SDMA (1<<12) /* SDMA Interrupt Mask */
-#define RBIT_IMR_IDMA (1<<11) /* IDMA Interrupt Mask */
-#define RBIT_IMR_SCC2 (1<<10) /* SCC2 Interrupt Mask */
-#define RBIT_IMR_TIMER1 (1<<9) /* TIMER1 Interrupt Mask */
-#define RBIT_IMR_SCC3 (1<<8) /* SCC3 Interrupt Mask */
-#define RBIT_IMR_PB9 (1<<7) /* PB9 Interrupt Mask */
-#define RBIT_IMR_TIMER2 (1<<6) /* TIMER2 Interrupt Mask */
-#define RBIT_IMR_SCP (1<<5) /* SCP Interrupt Mask */
-#define RBIT_IMR_TIMER3 (1<<4) /* TIMER3 Interrupt Mask */
-#define RBIT_IMR_SMC1 (1<<3) /* SMC1 Interrupt Mask */
-#define RBIT_IMR_SMC2 (1<<2) /* SMC2 Interrupt Mask */
-#define RBIT_IMR_PB8 (1<<1) /* PB8 Interrupt Mask */
-
-
-/*
- * DRAM Refresh
- * Section 3.9
- *
- * The DRAM refresh memory map replaces the SCC2 Tx BD 6 and Tx BD 7
- * structures in the parameter RAM.
- *
- * Access to the DRAM registers can be accomplished by
- * the following approach:
- *
- * volatile m302_DRAM_refresh_t *dram;
- * dram = (volatile m302_DRAM_refresh_t *) &m302.scc2.bd.tx[6];
- *
- * Then simply use pointer references (e.g. dram->count = 3).
- */
-typedef struct {
- rtems_unsigned16 dram_high; /* DRAM high address and FC */
- rtems_unsigned16 dram_low; /* DRAM low address */
- rtems_unsigned16 increment; /* increment step (bytes/row) */
- rtems_unsigned16 count; /* RAM refresh cycle count (#rows) */
- rtems_unsigned16 t_ptr_h; /* temporary refresh high addr & FC */
- rtems_unsigned16 t_ptr_l; /* temporary refresh low address */
- rtems_unsigned16 t_count; /* temporary refresh cycles count */
- rtems_unsigned16 res; /* reserved */
-} m302_DRAM_refresh_t;
-
-
-/*
- * TMR - Timer Mode Register (for timers 1 and 2)
- * Section 3.5.2.1
- */
-#define RBIT_TMR_ICLK_STOP (0<<1)
-#define RBIT_TMR_ICLK_MASTER (1<<1)
-#define RBIT_TMR_ICLK_MASTER16 (2<<1)
-#define RBIT_TMR_ICLK_TIN (3<<1)
-
-#define RBIT_TMR_OM (1<<5)
-#define RBIT_TMR_ORI (1<<4)
-#define RBIT_TMR_FRR (1<<3)
-#define RBIT_TMR_RST (1<<0)
-
-
-/*
- * TER - Timer Event Register (for timers 1 and 2)
- * Section 3.5.2.5
- */
-#define RBIT_TER_REF (1<<1) /* Output Reference Event */
-#define RBIT_TER_CAP (1<<0) /* Capture Event */
-
-
-/*
- * SCC Buffer Descriptors and Buffer Descriptors Table
- * Section 4.5.5
- */
-typedef struct m302_SCC_bd {
- rtems_unsigned16 status; /* status and control */
- rtems_unsigned16 length; /* data length */
- rtems_unsigned8 *buffer; /* data buffer pointer */
-} m302_SCC_bd_t;
-
-typedef struct {
- m302_SCC_bd_t rx[8]; /* receive buffer descriptors */
- m302_SCC_bd_t tx[8]; /* transmit buffer descriptors */
-} m302_SCC_bd_table_t;
-
-
-/*
- * SCC Parameter RAM (offset 0x080 from an SCC Base)
- * Section 4.5.6
- *
- * Each SCC parameter RAM area begins at offset 0x80 from each SCC base
- * area (0x400, 0x500, or 0x600 from the dual-port RAM base).
- *
- * Offsets 0x9c-0xbf from each SCC base area compose the protocol-specific
- * portion of the SCC parameter RAM.
- */
-typedef struct {
- rtems_unsigned8 rfcr; /* Rx Function Code */
- rtems_unsigned8 tfcr; /* Tx Function Code */
- rtems_unsigned16 mrblr; /* Maximum Rx Buffer Length */
- rtems_unsigned16 _rstate; /* Rx Internal State */
- rtems_unsigned8 res2;
- rtems_unsigned8 rbd; /* Rx Internal Buffer Number */
- rtems_unsigned32 _rdptr; /* Rx Internal Data Pointer */
- rtems_unsigned16 _rcount; /* Rx Internal Byte Count */
- rtems_unsigned16 _rtmp; /* Rx Temp */
- rtems_unsigned16 _tstate; /* Tx Internal State */
- rtems_unsigned8 res7;
- rtems_unsigned8 tbd; /* Tx Internal Buffer Number */
- rtems_unsigned32 _tdptr; /* Tx Internal Data Pointer */
- rtems_unsigned16 _tcount; /* Tx Internal Byte Count */
- rtems_unsigned16 _ttmp; /* Tx Temp */
-} m302_SCC_parameters_t;
-
-/*
- * UART-Specific SCC Parameter RAM
- * Section 4.5.11.3
- */
-typedef struct {
- rtems_unsigned16 max_idl; /* Maximum IDLE Characters (rx) */
- rtems_unsigned16 idlc; /* Temporary rx IDLE counter */
- rtems_unsigned16 brkcr; /* Break Count Register (tx) */
- rtems_unsigned16 parec; /* Receive Parity Error Counter */
- rtems_unsigned16 frmec; /* Receive Framing Error Counter */
- rtems_unsigned16 nosec; /* Receive Noise Counter */
- rtems_unsigned16 brkec; /* Receive Break Condition Counter */
- rtems_unsigned16 uaddr1; /* UART ADDRESS Character 1 */
- rtems_unsigned16 uaddr2; /* UART ADDRESS Character 2 */
- rtems_unsigned16 rccr; /* Receive Control Character Register */
- rtems_unsigned16 character[8]; /* Control Characters 1 through 8*/
-} m302_SCC_UartSpecific_t;
-/*
- * This definition allows for the checking of receive buffers
- * for errors.
- */
-
-#define RCV_ERR 0x003F
-
-/*
- * UART receive buffer descriptor bit definitions.
- * Section 4.5.11.14
- */
-#define RBIT_UART_CTRL (1<<11) /* buffer contains a control char */
-#define RBIT_UART_ADDR (1<<10) /* first byte contains an address */
-#define RBIT_UART_MATCH (1<<9) /* indicates which addr char matched */
-#define RBIT_UART_IDLE (1<<8) /* buffer closed due to IDLE sequence */
-#define RBIT_UART_BR (1<<5) /* break sequence was received */
-#define RBIT_UART_FR (1<<4) /* framing error was received */
-#define RBIT_UART_PR (1<<3) /* parity error was received */
-#define RBIT_UART_OV (1<<1) /* receiver overrun occurred */
-#define RBIT_UART_CD (1<<0) /* carrier detect lost */
-#define RBIT_UART_STATUS 0x003B /* all status bits */
-
-/*
- * UART transmit buffer descriptor bit definitions.
- * Section 4.5.11.15
- */
-#define RBIT_UART_CR (1<<11) /* clear-to-send report
- * this results in two idle bits
- * between back-to-back frames
- */
-#define RBIT_UART_A (1<<10) /* buffer contains address characters
- * only valid in multidrop mode (UM0=1)
- */
-#define RBIT_UART_PREAMBLE (1<<9) /* send preamble before data */
-#define RBIT_UART_CTS_LOST (1<<0) /* CTS lost */
-
-/*
- * UART event register
- * Section 4.5.11.16
- */
-#define M302_UART_EV_CTS (1<<7) /* CTS status changed */
-#define M302_UART_EV_CD (1<<6) /* carrier detect status changed */
-#define M302_UART_EV_IDL (1<<5) /* IDLE sequence status changed */
-#define M302_UART_EV_BRK (1<<4) /* break character was received */
-#define M302_UART_EV_CCR (1<<3) /* control character received */
-#define M302_UART_EV_TX (1<<1) /* buffer has been transmitted */
-#define M302_UART_EV_RX (1<<0) /* buffer has been received */
-
-
-/*
- * HDLC-Specific SCC Parameter RAM
- * Section 4.5.12.3
- *
- * c_mask_l should be 0xF0B8 for 16-bit CRC, 0xdebb for 32-bit CRC
- * c_mask_h is a don't care for 16-bit CRC, 0x20E2 for 32-bit CRC
- */
-typedef struct {
- rtems_unsigned16 rcrc_l; /* Temp Receive CRC Low */
- rtems_unsigned16 rcrc_h; /* Temp Receive CRC High */
- rtems_unsigned16 c_mask_l; /* CRC Mask Low */
- rtems_unsigned16 c_mask_h; /* CRC Mask High */
- rtems_unsigned16 tcrc_l; /* Temp Transmit CRC Low */
- rtems_unsigned16 tcrc_h; /* Temp Transmit CRC High */
-
- rtems_unsigned16 disfc; /* Discard Frame Counter */
- rtems_unsigned16 crcec; /* CRC Error Counter */
- rtems_unsigned16 abtsc; /* Abort Sequence Counter */
- rtems_unsigned16 nmarc; /* Nonmatching Address Received Cntr */
- rtems_unsigned16 retrc; /* Frame Retransmission Counter */
-
- rtems_unsigned16 mflr; /* Maximum Frame Length Register */
- rtems_unsigned16 max_cnt; /* Maximum_Length Counter */
-
- rtems_unsigned16 hmask; /* User Defined Frame Address Mask */
- rtems_unsigned16 haddr1; /* User Defined Frame Address */
- rtems_unsigned16 haddr2; /* " */
- rtems_unsigned16 haddr3; /* " */
- rtems_unsigned16 haddr4; /* " */
-} m302_SCC_HdlcSpecific_t;
-/*
- * HDLC receiver buffer descriptor bit definitions
- * Section 4.5.12.10
- */
-#define RBIT_HDLC_EMPTY_BIT 0x8000 /* buffer associated with BD is empty */
-#define RBIT_HDLC_LAST_BIT 0x0800 /* buffer is last in a frame */
-#define RBIT_HDLC_FIRST_BIT 0x0400 /* buffer is first in a frame */
-#define RBIT_HDLC_FRAME_LEN 0x0020 /* receiver frame length violation */
-#define RBIT_HDLC_NONOCT_Rx 0x0010 /* received non-octet aligned frame */
-#define RBIT_HDLC_ABORT_SEQ 0x0008 /* received abort sequence */
-#define RBIT_HDLC_CRC_ERROR 0x0004 /* frame contains a CRC error */
-#define RBIT_HDLC_OVERRUN 0x0002 /* receiver overrun occurred */
-#define RBIT_HDLC_CD_LOST 0x0001 /* carrier detect lost */
-
-/*
- * HDLC transmit buffer descriptor bit definitions
- * Section 4.5.12.11
- */
-#define RBIT_HDLC_READY_BIT 0x8000 /* buffer is ready to transmit */
-#define RBIT_HDLC_EXT_BUFFER 0x4000 /* buffer is in external memory */
-#define RBIT_HDLC_WRAP_BIT 0x2000 /* last buffer in bd table, so wrap */
-#define RBIT_HDLC_WAKE_UP 0x1000 /* interrupt when buffer serviced */
-#define RBIT_HDLC_LAST_BIT 0x0800 /* buffer is last in the frame */
-#define RBIT_HDLC_TxCRC_BIT 0x0400 /* transmit a CRC sequence */
-#define RBIT_HDLC_UNDERRUN 0x0002 /* transmitter underrun */
-#define RBIT_HDLC_CTS_LOST 0x0001 /* CTS lost */
-
-/*
- * HDLC event register bit definitions
- * Section 4.5.12.12
- */
-#define RBIT_HDLC_CTS 0x80 /* CTS status changed */
-#define RBIT_HDLC_CD 0x40 /* carrier detect status changed */
-#define RBIT_HDLC_IDL 0x20 /* IDLE sequence status changed */
-#define RBIT_HDLC_TXE 0x10 /* transmit error */
-#define RBIT_HDLC_RXF 0x08 /* received frame */
-#define RBIT_HDLC_BSY 0x04 /* frame rcvd and discarded due to
- * lack of buffers
- */
-#define RBIT_HDLC_TXB 0x02 /* buffer has been transmitted */
-#define RBIT_HDLC_RXB 0x01 /* received buffer */
-
-
-
-typedef struct {
- m302_SCC_bd_table_t bd; /* +000 Buffer Descriptor Table */
- m302_SCC_parameters_t parm; /* +080 Common Parameter RAM */
- union { /* +09C Protocol-Specific Parm RAM */
- m302_SCC_UartSpecific_t uart;
- m302_SCC_HdlcSpecific_t hdlc;
- } prot;
- rtems_unsigned8 res[0x040]; /* +0C0 reserved, (not implemented) */
-} m302_SCC_t;
-
-
-/*
- * Common SCC Registers
- */
-typedef struct {
- rtems_unsigned16 res1;
- rtems_unsigned16 scon; /* SCC Configuration Register 4.5.2 */
- rtems_unsigned16 scm; /* SCC Mode Register 4.5.3 */
- rtems_unsigned16 dsr; /* SCC Data Synchronization Register 4.5.4 */
- rtems_unsigned8 scce; /* SCC Event Register 4.5.8.1 */
- rtems_unsigned8 res2;
- rtems_unsigned8 sccm; /* SCC Mask Register 4.5.8.2 */
- rtems_unsigned8 res3;
- rtems_unsigned8 sccs; /* SCC Status Register 4.5.8.3 */
- rtems_unsigned8 res4;
- rtems_unsigned16 res5;
-} m302_SCC_Registers_t;
-
-/*
- * SCON - SCC Configuration Register
- * Section 4.5.2
- */
-#define RBIT_SCON_WOMS (1<<15) /* Wired-OR Mode Select (NMSI mode only)
- * When set, the TXD driver is an
- * open-drain output */
-#define RBIT_SCON_EXTC (1<<14) /* External Clock Source */
-#define RBIT_SCON_TCS (1<<13) /* Transmit Clock Source */
-#define RBIT_SCON_RCS (1<<12) /* Receive Clock Source */
-
-/*
- * SCM - SCC Mode Register bit definitions
- * Section 4.5.3
- * The parameter-specific mode bits occupy bits 15 through 6.
- */
-#define RBIT_SCM_ENR (1<<3) /* Enable receiver */
-#define RBIT_SCM_ENT (1<<2) /* Enable transmitter */
-
-
-/*
- * Internal MC68302 Registers
- * starts at offset 0x800 from dual-port RAM base
- * Section 2.8
- */
-typedef struct {
- /* offset +800 */
- rtems_unsigned16 res0;
- rtems_unsigned16 cmr; /* IDMA Channel Mode Register */
- rtems_unsigned32 sapr; /* IDMA Source Address Pointer */
- rtems_unsigned32 dapr; /* IDMA Destination Address Pointer */
- rtems_unsigned16 bcr; /* IDMA Byte Count Register */
- rtems_unsigned8 csr; /* IDMA Channel Status Register */
- rtems_unsigned8 res1;
- rtems_unsigned8 fcr; /* IDMA Function Code Register */
- rtems_unsigned8 res2;
-
- /* offset +812 */
- rtems_unsigned16 gimr; /* Global Interrupt Mode Register */
- rtems_unsigned16 ipr; /* Interrupt Pending Register */
- rtems_unsigned16 imr; /* Interrupt Mask Register */
- rtems_unsigned16 isr; /* Interrupt In-Service Register */
- rtems_unsigned16 res3;
- rtems_unsigned16 res4;
-
- /* offset +81e */
- rtems_unsigned16 pacnt; /* Port A Control Register */
- rtems_unsigned16 paddr; /* Port A Data Direction Register */
- rtems_unsigned16 padat; /* Port A Data Register */
- rtems_unsigned16 pbcnt; /* Port B Control Register */
- rtems_unsigned16 pbddr; /* Port B Data Direction Register */
- rtems_unsigned16 pbdat; /* Port B Data Register */
- rtems_unsigned16 res5;
-
- /* offset +82c */
- rtems_unsigned16 res6;
- rtems_unsigned16 res7;
-
- rtems_unsigned16 br0; /* Base Register (CS0) */
- rtems_unsigned16 or0; /* Option Register (CS0) */
- rtems_unsigned16 br1; /* Base Register (CS1) */
- rtems_unsigned16 or1; /* Option Register (CS1) */
- rtems_unsigned16 br2; /* Base Register (CS2) */
- rtems_unsigned16 or2; /* Option Register (CS2) */
- rtems_unsigned16 br3; /* Base Register (CS3) */
- rtems_unsigned16 or3; /* Option Register (CS3) */
-
- /* offset +840 */
- rtems_unsigned16 tmr1; /* Timer Unit 1 Mode Register */
- rtems_unsigned16 trr1; /* Timer Unit 1 Reference Register */
- rtems_unsigned16 tcr1; /* Timer Unit 1 Capture Register */
- rtems_unsigned16 tcn1; /* Timer Unit 1 Counter */
- rtems_unsigned8 res8;
- rtems_unsigned8 ter1; /* Timer Unit 1 Event Register */
- rtems_unsigned16 wrr; /* Watchdog Reference Register */
- rtems_unsigned16 wcn; /* Watchdog Counter */
- rtems_unsigned16 res9;
- rtems_unsigned16 tmr2; /* Timer Unit 2 Mode Register */
- rtems_unsigned16 trr2; /* Timer Unit 2 Reference Register */
- rtems_unsigned16 tcr2; /* Timer Unit 2 Capture Register */
- rtems_unsigned16 tcn2; /* Timer Unit 2 Counter */
- rtems_unsigned8 resa;
- rtems_unsigned8 ter2; /* Timer Unit 2 Event Register */
- rtems_unsigned16 resb;
- rtems_unsigned16 resc;
- rtems_unsigned16 resd;
-
- /* offset +860 */
- rtems_unsigned8 cr; /* Command Register */
- rtems_unsigned8 rese[0x1f];
-
- /* offset +880, +890, +8a0 */
- m302_SCC_Registers_t scc[3]; /* SCC1, SCC2, SCC3 Registers */
-
- /* offset +8b0 */
- rtems_unsigned16 spmode; /* SCP,SMC Mode and Clock Cntrl Reg */
- rtems_unsigned16 simask; /* Serial Interface Mask Register */
- rtems_unsigned16 simode; /* Serial Interface Mode Register */
-} m302_internalReg_t ;
-
-
-/*
- * MC68302 dual-port RAM structure.
- * (Includes System RAM, Parameter RAM, and Internal Registers).
- * Section 2.8
- */
-typedef struct {
- rtems_unsigned8 mem[0x240]; /* +000 User Data Memory */
- rtems_unsigned8 res1[0x1c0]; /* +240 reserved, (not implemented) */
- m302_SCC_t scc1; /* +400 SCC1 */
- m302_SCC_t scc2; /* +500 SCC2 */
- m302_SCC_t scc3; /* +600 SCC3 */
- rtems_unsigned8 res2[0x100]; /* +700 reserved, (not implemented) */
- m302_internalReg_t reg; /* +800 68302 Internal Registers */
-} m302_dualPortRAM_t;
-
-/* some useful defines the some of the registers above */
-
-
-/* ----
- MC68302 Chip Select Registers
- p3-46 2nd Edition
-
- */
-#define BR_ENABLED 1
-#define BR_DISABLED 0
-#define BR_FC_NULL 0
-#define BR_READ_ONLY 0
-#define BR_READ_WRITE 2
-#define OR_DTACK_0 0x0000
-#define OR_DTACK_1 0x2000
-#define OR_DTACK_2 0x4000
-#define OR_DTACK_3 0x6000
-#define OR_DTACK_4 0x8000
-#define OR_DTACK_5 0xA000
-#define OR_DTACK_6 0xC000
-#define OR_DTACK_EXT 0xE000
-#define OR_SIZE_64K 0x1FE0
-#define OR_SIZE_128K 0x1FC0
-#define OR_SIZE_256K 0x1F80
-#define OR_SIZE_512K 0x1F00
-#define OR_SIZE_1M 0x1E00
-#define OR_SIZE_2M 0x1C00
-#define OR_MASK_RW 0x0000
-#define OR_NO_MASK_RW 0x0002
-#define OR_MASK_FC 0x0000
-#define OR_NO_MASK_FC 0x0001
-
-#define MAKE_BR(base_address, enable, rw, fc) \
- ((base_address >> 11) | fc | rw | enable)
-
-#define MAKE_OR(bsize, DtAck, RW_Mask, FC_Mask) \
- (DtAck | ((~(bsize - 1) & 0x00FFFFFF) >> 11) | FC_Mask | RW_Mask)
-
-#define __REG_CAT(r, n) r ## n
-#define WRITE_BR(csel, base_address, enable, rw, fc) \
- __REG_CAT(m302.reg.br, csel) = MAKE_BR(base_address, enable, rw, fc)
-#define WRITE_OR(csel, bsize, DtAck, RW_Mask, FC_Mask) \
- __REG_CAT(m302.reg.or, csel) = MAKE_OR(bsize, DtAck, RW_Mask, FC_Mask)
-
-/* ----
- MC68302 Watchdog Timer Enable Bit
-
- */
-#define WATCHDOG_ENABLE (1)
-#define WATCHDOG_TRIGGER() (m302.reg.wrr = 0x10 | WATCHDOG_ENABLE, m302.reg.wcn = 0)
-#define WATCHDOG_TOGGLE() (m302.reg.wcn = WATCHDOG_TIMEOUT_PERIOD)
-#define DISABLE_WATCHDOG() (m302.reg.wrr = 0)
-
-/*
- * Declare the variable that's used to reference the variables in
- * the dual-port RAM.
- */
-extern volatile m302_dualPortRAM_t m302;
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/cpu/m68k/rtems/m68k/m68360.h b/cpukit/score/cpu/m68k/rtems/m68k/m68360.h
deleted file mode 100644
index fd78fa1104..0000000000
--- a/cpukit/score/cpu/m68k/rtems/m68k/m68360.h
+++ /dev/null
@@ -1,889 +0,0 @@
-/*
- **************************************************************************
- **************************************************************************
- ** **
- ** MOTOROLA MC68360 QUAD INTEGRATED COMMUNICATIONS CONTROLLER (QUICC) **
- ** **
- ** HARDWARE DECLARATIONS **
- ** **
- ** **
- ** Submitted By: **
- ** **
- ** W. Eric Norum **
- ** Saskatchewan Accelerator Laboratory **
- ** University of Saskatchewan **
- ** 107 North Road **
- ** Saskatoon, Saskatchewan, CANADA **
- ** S7N 5C6 **
- ** **
- ** eric@skatter.usask.ca **
- ** **
- ** $Id$ **
- ** **
- **************************************************************************
- **************************************************************************
- */
-
-#ifndef __MC68360_h
-#define __MC68360_h
-
-/*
- *************************************************************************
- * REGISTER SUBBLOCKS *
- *************************************************************************
- */
-
-/*
- * Memory controller registers
- */
-typedef struct m360MEMCRegisters_ {
- unsigned long br;
- unsigned long or;
- unsigned long _pad[2];
-} m360MEMCRegisters_t;
-
-/*
- * Serial Communications Controller registers
- */
-typedef struct m360SCCRegisters_ {
- unsigned long gsmr_l;
- unsigned long gsmr_h;
- unsigned short psmr;
- unsigned short _pad0;
- unsigned short todr;
- unsigned short dsr;
- unsigned short scce;
- unsigned short _pad1;
- unsigned short sccm;
- unsigned char _pad2;
- unsigned char sccs;
- unsigned long _pad3[2];
-} m360SCCRegisters_t;
-
-/*
- * Serial Management Controller registers
- */
-typedef struct m360SMCRegisters_ {
- unsigned short _pad0;
- unsigned short smcmr;
- unsigned short _pad1;
- unsigned char smce;
- unsigned char _pad2;
- unsigned short _pad3;
- unsigned char smcm;
- unsigned char _pad4;
- unsigned long _pad5;
-} m360SMCRegisters_t;
-
-
-/*
- *************************************************************************
- * Miscellaneous Parameters *
- *************************************************************************
- */
-typedef struct m360MiscParms_ {
- unsigned short rev_num;
- unsigned short _res1;
- unsigned long _res2;
- unsigned long _res3;
-} m360MiscParms_t;
-
-/*
- *************************************************************************
- * RISC Timers *
- *************************************************************************
- */
-typedef struct m360TimerParms_ {
- unsigned short tm_base;
- unsigned short _tm_ptr;
- unsigned short _r_tmr;
- unsigned short _r_tmv;
- unsigned long tm_cmd;
- unsigned long tm_cnt;
-} m360TimerParms_t;
-
-/*
- * RISC Controller Configuration Register (RCCR)
- * All other bits in this register are either reserved or
- * used only with a Motorola-supplied RAM microcode packge.
- */
-#define M360_RCCR_TIME (1<<15) /* Enable timer */
-#define M360_RCCR_TIMEP(x) ((x)<<8) /* Timer period */
-
-/*
- * Command register
- * Set up this register before issuing a M360_CR_OP_SET_TIMER command.
- */
-#define M360_TM_CMD_V (1<<31) /* Set to enable timer */
-#define M360_TM_CMD_R (1<<30) /* Set for automatic restart */
-#define M360_TM_CMD_TIMER(x) ((x)<<16) /* Select timer */
-#define M360_TM_CMD_PERIOD(x) (x) /* Timer period (16 bits) */
-
-/*
- *************************************************************************
- * DMA Controllers *
- *************************************************************************
- */
-typedef struct m360IDMAparms_ {
- unsigned short ibase;
- unsigned short ibptr;
- unsigned long _istate;
- unsigned long _itemp;
-} m360IDMAparms_t;
-
-/*
- *************************************************************************
- * Serial Communication Controllers *
- *************************************************************************
- */
-typedef struct m360SCCparms_ {
- unsigned short rbase;
- unsigned short tbase;
- unsigned char rfcr;
- unsigned char tfcr;
- unsigned short mrblr;
- unsigned long _rstate;
- unsigned long _pad0;
- unsigned short _rbptr;
- unsigned short _pad1;
- unsigned long _pad2;
- unsigned long _tstate;
- unsigned long _pad3;
- unsigned short _tbptr;
- unsigned short _pad4;
- unsigned long _pad5;
- unsigned long _rcrc;
- unsigned long _tcrc;
- union {
- struct {
- unsigned long _res0;
- unsigned long _res1;
- unsigned short max_idl;
- unsigned short _idlc;
- unsigned short brkcr;
- unsigned short parec;
- unsigned short frmec;
- unsigned short nosec;
- unsigned short brkec;
- unsigned short brklen;
- unsigned short uaddr[2];
- unsigned short _rtemp;
- unsigned short toseq;
- unsigned short character[8];
- unsigned short rccm;
- unsigned short rccr;
- unsigned short rlbc;
- } uart;
- struct {
- unsigned long crc_p;
- unsigned long crc_c;
- } transparent;
-
- } un;
-} m360SCCparms_t;
-
-typedef struct m360SCCENparms_ {
- unsigned short rbase;
- unsigned short tbase;
- unsigned char rfcr;
- unsigned char tfcr;
- unsigned short mrblr;
- unsigned long _rstate;
- unsigned long _pad0;
- unsigned short _rbptr;
- unsigned short _pad1;
- unsigned long _pad2;
- unsigned long _tstate;
- unsigned long _pad3;
- unsigned short _tbptr;
- unsigned short _pad4;
- unsigned long _pad5;
- unsigned long _rcrc;
- unsigned long _tcrc;
- union {
- struct {
- unsigned long _res0;
- unsigned long _res1;
- unsigned short max_idl;
- unsigned short _idlc;
- unsigned short brkcr;
- unsigned short parec;
- unsigned short frmec;
- unsigned short nosec;
- unsigned short brkec;
- unsigned short brklen;
- unsigned short uaddr[2];
- unsigned short _rtemp;
- unsigned short toseq;
- unsigned short character[8];
- unsigned short rccm;
- unsigned short rccr;
- unsigned short rlbc;
- } uart;
- struct {
- unsigned long c_pres;
- unsigned long c_mask;
- unsigned long crcec;
- unsigned long alec;
- unsigned long disfc;
- unsigned short pads;
- unsigned short ret_lim;
- unsigned short _ret_cnt;
- unsigned short mflr;
- unsigned short minflr;
- unsigned short maxd1;
- unsigned short maxd2;
- unsigned short _maxd;
- unsigned short dma_cnt;
- unsigned short _max_b;
- unsigned short gaddr1;
- unsigned short gaddr2;
- unsigned short gaddr3;
- unsigned short gaddr4;
- unsigned long _tbuf0data0;
- unsigned long _tbuf0data1;
- unsigned long _tbuf0rba0;
- unsigned long _tbuf0crc;
- unsigned short _tbuf0bcnt;
- unsigned short paddr_h;
- unsigned short paddr_m;
- unsigned short paddr_l;
- unsigned short p_per;
- unsigned short _rfbd_ptr;
- unsigned short _tfbd_ptr;
- unsigned short _tlbd_ptr;
- unsigned long _tbuf1data0;
- unsigned long _tbuf1data1;
- unsigned long _tbuf1rba0;
- unsigned long _tbuf1crc;
- unsigned short _tbuf1bcnt;
- unsigned short _tx_len;
- unsigned short iaddr1;
- unsigned short iaddr2;
- unsigned short iaddr3;
- unsigned short iaddr4;
- unsigned short _boff_cnt;
- unsigned short taddr_l;
- unsigned short taddr_m;
- unsigned short taddr_h;
- } ethernet;
- struct {
- unsigned long crc_p;
- unsigned long crc_c;
- } transparent;
- } un;
-} m360SCCENparms_t;
-
-/*
- * Receive and transmit function code register bits
- * These apply to the function code registers of all devices, not just SCC.
- */
-#define M360_RFCR_MOT (1<<4)
-#define M360_RFCR_DMA_SPACE 0x8
-#define M360_TFCR_MOT (1<<4)
-#define M360_TFCR_DMA_SPACE 0x8
-
-/*
- *************************************************************************
- * Serial Management Controllers *
- *************************************************************************
- */
-typedef struct m360SMCparms_ {
- unsigned short rbase;
- unsigned short tbase;
- unsigned char rfcr;
- unsigned char tfcr;
- unsigned short mrblr;
- unsigned long _rstate;
- unsigned long _pad0;
- unsigned short _rbptr;
- unsigned short _pad1;
- unsigned long _pad2;
- unsigned long _tstate;
- unsigned long _pad3;
- unsigned short _tbptr;
- unsigned short _pad4;
- unsigned long _pad5;
- union {
- struct {
- unsigned short max_idl;
- unsigned short _pad0;
- unsigned short brklen;
- unsigned short brkec;
- unsigned short brkcr;
- unsigned short _r_mask;
- } uart;
- struct {
- unsigned short _pad0[5];
- } transparent;
- } un;
-} m360SMCparms_t;
-
-/*
- * Mode register
- */
-#define M360_SMCMR_CLEN(x) ((x)<<11) /* Character length */
-#define M360_SMCMR_2STOP (1<<10) /* 2 stop bits */
-#define M360_SMCMR_PARITY (1<<9) /* Enable parity */
-#define M360_SMCMR_EVEN (1<<8) /* Even parity */
-#define M360_SMCMR_SM_GCI (0<<4) /* GCI Mode */
-#define M360_SMCMR_SM_UART (2<<4) /* UART Mode */
-#define M360_SMCMR_SM_TRANSPARENT (3<<4) /* Transparent Mode */
-#define M360_SMCMR_DM_LOOPBACK (1<<2) /* Local loopback mode */
-#define M360_SMCMR_DM_ECHO (2<<2) /* Echo mode */
-#define M360_SMCMR_TEN (1<<1) /* Enable transmitter */
-#define M360_SMCMR_REN (1<<0) /* Enable receiver */
-
-/*
- * Event and mask registers (SMCE, SMCM)
- */
-#define M360_SMCE_BRK (1<<4)
-#define M360_SMCE_BSY (1<<2)
-#define M360_SMCE_TX (1<<1)
-#define M360_SMCE_RX (1<<0)
-
-/*
- *************************************************************************
- * Serial Peripheral Interface *
- *************************************************************************
- */
-typedef struct m360SPIparms_ {
- unsigned short rbase;
- unsigned short tbase;
- unsigned char rfcr;
- unsigned char tfcr;
- unsigned short mrblr;
- unsigned long _rstate;
- unsigned long _pad0;
- unsigned short _rbptr;
- unsigned short _pad1;
- unsigned long _pad2;
- unsigned long _tstate;
- unsigned long _pad3;
- unsigned short _tbptr;
- unsigned short _pad4;
- unsigned long _pad5;
-} m360SPIparms_t;
-
-/*
- * Mode register (SPMODE)
- */
-#define M360_SPMODE_LOOP (1<<14) /* Local loopback mode */
-#define M360_SPMODE_CI (1<<13) /* Clock invert */
-#define M360_SPMODE_CP (1<<12) /* Clock phase */
-#define M360_SPMODE_DIV16 (1<<11) /* Divide BRGCLK by 16 */
-#define M360_SPMODE_REV (1<<10) /* Reverse data */
-#define M360_SPMODE_MASTER (1<<9) /* SPI is master */
-#define M360_SPMODE_EN (1<<8) /* Enable SPI */
-#define M360_SPMODE_CLEN(x) ((x)<<4) /* Character length */
-#define M360_SPMODE_PM(x) (x) /* Prescaler modulus */
-
-/*
- * Mode register (SPCOM)
- */
-#define M360_SPCOM_STR (1<<7) /* Start transmit */
-
-/*
- * Event and mask registers (SPIE, SPIM)
- */
-#define M360_SPIE_MME (1<<5) /* Multi-master error */
-#define M360_SPIE_TXE (1<<4) /* Tx error */
-#define M360_SPIE_BSY (1<<2) /* Busy condition*/
-#define M360_SPIE_TXB (1<<1) /* Tx buffer */
-#define M360_SPIE_RXB (1<<0) /* Rx buffer */
-
-/*
- *************************************************************************
- * SDMA (SCC, SMC, SPI) Buffer Descriptors *
- *************************************************************************
- */
-typedef struct m360BufferDescriptor_ {
- unsigned short status;
- unsigned short length;
- volatile void *buffer;
-} m360BufferDescriptor_t;
-
-/*
- * Bits in receive buffer descriptor status word
- */
-#define M360_BD_EMPTY (1<<15) /* Ethernet, SCC UART, SMC UART, SPI */
-#define M360_BD_WRAP (1<<13) /* Ethernet, SCC UART, SMC UART, SPI */
-#define M360_BD_INTERRUPT (1<<12) /* Ethernet, SCC UART, SMC UART, SPI */
-#define M360_BD_LAST (1<<11) /* Ethernet, SPI */
-#define M360_BD_CONTROL_CHAR (1<<11) /* SCC UART */
-#define M360_BD_FIRST_IN_FRAME (1<<10) /* Ethernet */
-#define M360_BD_ADDRESS (1<<10) /* SCC UART */
-#define M360_BD_CONTINUOUS (1<<9) /* SCC UART, SMC UART, SPI */
-#define M360_BD_MISS (1<<8) /* Ethernet */
-#define M360_BD_IDLE (1<<8) /* SCC UART, SMC UART */
-#define M360_BD_ADDRSS_MATCH (1<<7) /* SCC UART */
-#define M360_BD_LONG (1<<5) /* Ethernet */
-#define M360_BD_BREAK (1<<5) /* SCC UART, SMC UART */
-#define M360_BD_NONALIGNED (1<<4) /* Ethernet */
-#define M360_BD_FRAMING_ERROR (1<<4) /* SCC UART, SMC UART */
-#define M360_BD_SHORT (1<<3) /* Ethernet */
-#define M360_BD_PARITY_ERROR (1<<3) /* SCC UART, SMC UART */
-#define M360_BD_CRC_ERROR (1<<2) /* Ethernet */
-#define M360_BD_OVERRUN (1<<1) /* Ethernet, SCC UART, SMC UART, SPI */
-#define M360_BD_COLLISION (1<<0) /* Ethernet */
-#define M360_BD_CARRIER_LOST (1<<0) /* SCC UART */
-#define M360_BD_MASTER_ERROR (1<<0) /* SPI */
-
-/*
- * Bits in transmit buffer descriptor status word
- * Many bits have the same meaning as those in receiver buffer descriptors.
- */
-#define M360_BD_READY (1<<15) /* Ethernet, SCC UART, SMC UART, SPI */
-#define M360_BD_PAD (1<<14) /* Ethernet */
-#define M360_BD_CTS_REPORT (1<<11) /* SCC UART */
-#define M360_BD_TX_CRC (1<<10) /* Ethernet */
-#define M360_BD_DEFER (1<<9) /* Ethernet */
-#define M360_BD_HEARTBEAT (1<<8) /* Ethernet */
-#define M360_BD_PREAMBLE (1<<8) /* SCC UART, SMC UART */
-#define M360_BD_LATE_COLLISION (1<<7) /* Ethernet */
-#define M360_BD_NO_STOP_BIT (1<<7) /* SCC UART */
-#define M360_BD_RETRY_LIMIT (1<<6) /* Ethernet */
-#define M360_BD_RETRY_COUNT(x) (((x)&0x3C)>>2) /* Ethernet */
-#define M360_BD_UNDERRUN (1<<1) /* Ethernet, SPI */
-#define M360_BD_CARRIER_LOST (1<<0) /* Ethernet */
-#define M360_BD_CTS_LOST (1<<0) /* SCC UART */
-
-/*
- *************************************************************************
- * IDMA Buffer Descriptors *
- *************************************************************************
- */
-typedef struct m360IDMABufferDescriptor_ {
- unsigned short status;
- unsigned short _pad;
- unsigned long length;
- void *source;
- void *destination;
-} m360IDMABufferDescriptor_t;
-
-/*
- *************************************************************************
- * RISC Communication Processor Module Command Register (CR) *
- *************************************************************************
- */
-#define M360_CR_RST (1<<15) /* Reset communication processor */
-#define M360_CR_OP_INIT_RX_TX (0<<8) /* SCC, SMC UART, SMC GCI, SPI */
-#define M360_CR_OP_INIT_RX (1<<8) /* SCC, SMC UART, SPI */
-#define M360_CR_OP_INIT_TX (2<<8) /* SCC, SMC UART, SPI */
-#define M360_CR_OP_INIT_HUNT (3<<8) /* SCC, SMC UART */
-#define M360_CR_OP_STOP_TX (4<<8) /* SCC, SMC UART */
-#define M360_CR_OP_GR_STOP_TX (5<<8) /* SCC */
-#define M360_CR_OP_INIT_IDMA (5<<8) /* IDMA */
-#define M360_CR_OP_RESTART_TX (6<<8) /* SCC, SMC UART */
-#define M360_CR_OP_CLOSE_RX_BD (7<<8) /* SCC, SMC UART, SPI */
-#define M360_CR_OP_SET_GRP_ADDR (8<<8) /* SCC */
-#define M360_CR_OP_SET_TIMER (8<<8) /* Timer */
-#define M360_CR_OP_GCI_TIMEOUT (9<<8) /* SMC GCI */
-#define M360_CR_OP_RESERT_BCS (10<<8) /* SCC */
-#define M360_CR_OP_GCI_ABORT (10<<8) /* SMC GCI */
-#define M360_CR_CHAN_SCC1 (0<<4) /* Channel selection */
-#define M360_CR_CHAN_SCC2 (4<<4)
-#define M360_CR_CHAN_SPI (5<<4)
-#define M360_CR_CHAN_TIMER (5<<4)
-#define M360_CR_CHAN_SCC3 (8<<4)
-#define M360_CR_CHAN_SMC1 (9<<4)
-#define M360_CR_CHAN_IDMA1 (9<<4)
-#define M360_CR_CHAN_SCC4 (12<<4)
-#define M360_CR_CHAN_SMC2 (13<<4)
-#define M360_CR_CHAN_IDMA2 (13<<4)
-#define M360_CR_FLG (1<<0) /* Command flag */
-
-/*
- *************************************************************************
- * System Protection Control Register (SYPCR) *
- *************************************************************************
- */
-#define M360_SYPCR_SWE (1<<7) /* Software watchdog enable */
-#define M360_SYPCR_SWRI (1<<6) /* Software watchdog reset select */
-#define M360_SYPCR_SWT1 (1<<5) /* Software watchdog timing bit 1 */
-#define M360_SYPCR_SWT0 (1<<4) /* Software watchdog timing bit 0 */
-#define M360_SYPCR_DBFE (1<<3) /* Double bus fault monitor enable */
-#define M360_SYPCR_BME (1<<2) /* Bus monitor external enable */
-#define M360_SYPCR_BMT1 (1<<1) /* Bus monitor timing bit 1 */
-#define M360_SYPCR_BMT0 (1<<0) /* Bus monitor timing bit 0 */
-
-/*
- *************************************************************************
- * Memory Control Registers *
- *************************************************************************
- */
-#define M360_GMR_RCNT(x) ((x)<<24) /* Refresh count */
-#define M360_GMR_RFEN (1<<23) /* Refresh enable */
-#define M360_GMR_RCYC(x) ((x)<<21) /* Refresh cycle length */
-#define M360_GMR_PGS(x) ((x)<<18) /* Page size */
-#define M360_GMR_DPS_32BIT (0<<16) /* DRAM port size */
-#define M360_GMR_DPS_16BIT (1<<16)
-#define M360_GMR_DPS_8BIT (2<<16)
-#define M360_GMR_DPS_DSACK (3<<16)
-#define M360_GMR_WBT40 (1<<15) /* Wait between 040 transfers */
-#define M360_GMR_WBTQ (1<<14) /* Wait between 360 transfers */
-#define M360_GMR_SYNC (1<<13) /* Synchronous external access */
-#define M360_GMR_EMWS (1<<12) /* External master wait state */
-#define M360_GMR_OPAR (1<<11) /* Odd parity */
-#define M360_GMR_PBEE (1<<10) /* Parity bus error enable */
-#define M360_GMR_TSS40 (1<<9) /* TS* sample for 040 */
-#define M360_GMR_NCS (1<<8) /* No CPU space */
-#define M360_GMR_DWQ (1<<7) /* Delay write for 360 */
-#define M360_GMR_DW40 (1<<6) /* Delay write for 040 */
-#define M360_GMR_GAMX (1<<5) /* Global address mux enable */
-
-#define M360_MEMC_BR_FC(x) ((x)<<7) /* Function code limit */
-#define M360_MEMC_BR_TRLXQ (1<<6) /* Relax timing requirements */
-#define M360_MEMC_BR_BACK40 (1<<5) /* Burst acknowledge to 040 */
-#define M360_MEMC_BR_CSNT40 (1<<4) /* CS* negate timing for 040 */
-#define M360_MEMC_BR_CSNTQ (1<<3) /* CS* negate timing for 360 */
-#define M360_MEMC_BR_PAREN (1<<2) /* Enable parity checking */
-#define M360_MEMC_BR_WP (1<<1) /* Write Protect */
-#define M360_MEMC_BR_V (1<<0) /* Base/Option register are valid */
-
-#define M360_MEMC_OR_TCYC(x) ((x)<<28) /* Cycle length (clocks) */
-#define M360_MEMC_OR_WAITS(x) M360_MEMC_OR_TCYC((x)+1)
-#define M360_MEMC_OR_2KB 0x0FFFF800 /* Address range */
-#define M360_MEMC_OR_4KB 0x0FFFF000
-#define M360_MEMC_OR_8KB 0x0FFFE000
-#define M360_MEMC_OR_16KB 0x0FFFC000
-#define M360_MEMC_OR_32KB 0x0FFF8000
-#define M360_MEMC_OR_64KB 0x0FFF0000
-#define M360_MEMC_OR_128KB 0x0FFE0000
-#define M360_MEMC_OR_256KB 0x0FFC0000
-#define M360_MEMC_OR_512KB 0x0FF80000
-#define M360_MEMC_OR_1MB 0x0FF00000
-#define M360_MEMC_OR_2MB 0x0FE00000
-#define M360_MEMC_OR_4MB 0x0FC00000
-#define M360_MEMC_OR_8MB 0x0F800000
-#define M360_MEMC_OR_16MB 0x0F000000
-#define M360_MEMC_OR_32MB 0x0E000000
-#define M360_MEMC_OR_64MB 0x0C000000
-#define M360_MEMC_OR_128MB 0x08000000
-#define M360_MEMC_OR_256MB 0x00000000
-#define M360_MEMC_OR_FCMC(x) ((x)<<7) /* Function code mask */
-#define M360_MEMC_OR_BCYC(x) ((x)<<5) /* Burst cycle length (clocks) */
-#define M360_MEMC_OR_PGME (1<<3) /* Page mode enable */
-#define M360_MEMC_OR_32BIT (0<<1) /* Port size */
-#define M360_MEMC_OR_16BIT (1<<1)
-#define M360_MEMC_OR_8BIT (2<<1)
-#define M360_MEMC_OR_DSACK (3<<1)
-#define M360_MEMC_OR_DRAM (1<<0) /* Dynamic RAM select */
-
-/*
- *************************************************************************
- * SI Mode Register (SIMODE) *
- *************************************************************************
- */
-#define M360_SI_SMC2_BITS 0xFFFF0000 /* All SMC2 bits */
-#define M360_SI_SMC2_TDM (1<<31) /* Multiplexed SMC2 */
-#define M360_SI_SMC2_BRG1 (0<<28) /* SMC2 clock souce */
-#define M360_SI_SMC2_BRG2 (1<<28)
-#define M360_SI_SMC2_BRG3 (2<<28)
-#define M360_SI_SMC2_BRG4 (3<<28)
-#define M360_SI_SMC2_CLK5 (0<<28)
-#define M360_SI_SMC2_CLK6 (1<<28)
-#define M360_SI_SMC2_CLK7 (2<<28)
-#define M360_SI_SMC2_CLK8 (3<<28)
-#define M360_SI_SMC1_BITS 0x0000FFFF /* All SMC1 bits */
-#define M360_SI_SMC1_TDM (1<<15) /* Multiplexed SMC1 */
-#define M360_SI_SMC1_BRG1 (0<<12) /* SMC1 clock souce */
-#define M360_SI_SMC1_BRG2 (1<<12)
-#define M360_SI_SMC1_BRG3 (2<<12)
-#define M360_SI_SMC1_BRG4 (3<<12)
-#define M360_SI_SMC1_CLK1 (0<<12)
-#define M360_SI_SMC1_CLK2 (1<<12)
-#define M360_SI_SMC1_CLK3 (2<<12)
-#define M360_SI_SMC1_CLK4 (3<<12)
-
-/*
- *************************************************************************
- * SDMA Configuration Register (SDMA) *
- *************************************************************************
- */
-#define M360_SDMA_FREEZE (2<<13) /* Freeze on next bus cycle */
-#define M360_SDMA_SISM_7 (7<<8) /* Normal interrupt service mask */
-#define M360_SDMA_SAID_4 (4<<4) /* Normal arbitration ID */
-#define M360_SDMA_INTE (1<<1) /* SBER interrupt enable */
-#define M360_SDMA_INTB (1<<0) /* SBKP interrupt enable */
-
-/*
- *************************************************************************
- * Baud (sic) Rate Generators *
- *************************************************************************
- */
-#define M360_BRG_RST (1<<17) /* Reset generator */
-#define M360_BRG_EN (1<<16) /* Enable generator */
-#define M360_BRG_EXTC_BRGCLK (0<<14) /* Source is BRGCLK */
-#define M360_BRG_EXTC_CLK2 (1<<14) /* Source is CLK2 pin */
-#define M360_BRG_EXTC_CLK6 (2<<14) /* Source is CLK6 pin */
-#define M360_BRG_ATB (1<<13) /* Autobaud */
-#define M360_BRG_115200 (13<<1) /* Assume 25 MHz clock */
-#define M360_BRG_57600 (26<<1)
-#define M360_BRG_38400 (40<<1)
-#define M360_BRG_19200 (80<<1)
-#define M360_BRG_9600 (162<<1)
-#define M360_BRG_4800 (324<<1)
-#define M360_BRG_2400 (650<<1)
-#define M360_BRG_1200 (1301<<1)
-#define M360_BRG_600 (2603<<1)
-#define M360_BRG_300 ((324<<1) | 1)
-#define M360_BRG_150 ((650<<1) | 1)
-#define M360_BRG_75 ((1301<<1) | 1)
-
-/*
- *************************************************************************
- * MC68360 DUAL-PORT RAM AND REGISTERS *
- *************************************************************************
- */
-typedef struct m360_ {
- /*
- * Dual-port RAM
- */
- unsigned char dpram0[0x400]; /* Microcode program */
- unsigned char dpram1[0x200];
- unsigned char dpram2[0x100]; /* Microcode scratch */
- unsigned char dpram3[0x100]; /* Not on REV A or B masks */
- unsigned char _rsv0[0xC00-0x800];
- m360SCCENparms_t scc1p;
- unsigned char _rsv1[0xCB0-0xC00-sizeof(m360SCCENparms_t)];
- m360MiscParms_t miscp;
- unsigned char _rsv2[0xD00-0xCB0-sizeof(m360MiscParms_t)];
- m360SCCparms_t scc2p;
- unsigned char _rsv3[0xD80-0xD00-sizeof(m360SCCparms_t)];
- m360SPIparms_t spip;
- unsigned char _rsv4[0xDB0-0xD80-sizeof(m360SPIparms_t)];
- m360TimerParms_t tmp;
- unsigned char _rsv5[0xE00-0xDB0-sizeof(m360TimerParms_t)];
- m360SCCparms_t scc3p;
- unsigned char _rsv6[0xE70-0xE00-sizeof(m360SCCparms_t)];
- m360IDMAparms_t idma1p;
- unsigned char _rsv7[0xE80-0xE70-sizeof(m360IDMAparms_t)];
- m360SMCparms_t smc1p;
- unsigned char _rsv8[0xF00-0xE80-sizeof(m360SMCparms_t)];
- m360SCCparms_t scc4p;
- unsigned char _rsv9[0xF70-0xF00-sizeof(m360SCCparms_t)];
- m360IDMAparms_t idma2p;
- unsigned char _rsv10[0xF80-0xF70-sizeof(m360IDMAparms_t)];
- m360SMCparms_t smc2p;
- unsigned char _rsv11[0x1000-0xF80-sizeof(m360SMCparms_t)];
-
- /*
- * SIM Block
- */
- unsigned long mcr;
- unsigned long _pad00;
- unsigned char avr;
- unsigned char rsr;
- unsigned short _pad01;
- unsigned char clkocr;
- unsigned char _pad02;
- unsigned short _pad03;
- unsigned short pllcr;
- unsigned short _pad04;
- unsigned short cdvcr;
- unsigned short pepar;
- unsigned long _pad05[2];
- unsigned short _pad06;
- unsigned char sypcr;
- unsigned char swiv;
- unsigned short _pad07;
- unsigned short picr;
- unsigned short _pad08;
- unsigned short pitr;
- unsigned short _pad09;
- unsigned char _pad10;
- unsigned char swsr;
- unsigned long bkar;
- unsigned long bcar;
- unsigned long _pad11[2];
-
- /*
- * MEMC Block
- */
- unsigned long gmr;
- unsigned short mstat;
- unsigned short _pad12;
- unsigned long _pad13[2];
- m360MEMCRegisters_t memc[8];
- unsigned char _pad14[0xF0-0xD0];
- unsigned char _pad15[0x100-0xF0];
- unsigned char _pad16[0x500-0x100];
-
- /*
- * IDMA1 Block
- */
- unsigned short iccr;
- unsigned short _pad17;
- unsigned short cmr1;
- unsigned short _pad18;
- unsigned long sapr1;
- unsigned long dapr1;
- unsigned long bcr1;
- unsigned char fcr1;
- unsigned char _pad19;
- unsigned char cmar1;
- unsigned char _pad20;
- unsigned char csr1;
- unsigned char _pad21;
- unsigned short _pad22;
-
- /*
- * SDMA Block
- */
- unsigned char sdsr;
- unsigned char _pad23;
- unsigned short sdcr;
- unsigned long sdar;
-
- /*
- * IDMA2 Block
- */
- unsigned short _pad24;
- unsigned short cmr2;
- unsigned long sapr2;
- unsigned long dapr2;
- unsigned long bcr2;
- unsigned char fcr2;
- unsigned char _pad26;
- unsigned char cmar2;
- unsigned char _pad27;
- unsigned char csr2;
- unsigned char _pad28;
- unsigned short _pad29;
- unsigned long _pad30;
-
- /*
- * CPIC Block
- */
- unsigned long cicr;
- unsigned long cipr;
- unsigned long cimr;
- unsigned long cisr;
-
- /*
- * Parallel I/O Block
- */
- unsigned short padir;
- unsigned short papar;
- unsigned short paodr;
- unsigned short padat;
- unsigned long _pad31[2];
- unsigned short pcdir;
- unsigned short pcpar;
- unsigned short pcso;
- unsigned short pcdat;
- unsigned short pcint;
- unsigned short _pad32;
- unsigned long _pad33[5];
-
- /*
- * TIMER Block
- */
- unsigned short tgcr;
- unsigned short _pad34;
- unsigned long _pad35[3];
- unsigned short tmr1;
- unsigned short tmr2;
- unsigned short trr1;
- unsigned short trr2;
- unsigned short tcr1;
- unsigned short tcr2;
- unsigned short tcn1;
- unsigned short tcn2;
- unsigned short tmr3;
- unsigned short tmr4;
- unsigned short trr3;
- unsigned short trr4;
- unsigned short tcr3;
- unsigned short tcr4;
- unsigned short tcn3;
- unsigned short tcn4;
- unsigned short ter1;
- unsigned short ter2;
- unsigned short ter3;
- unsigned short ter4;
- unsigned long _pad36[2];
-
- /*
- * CP Block
- */
- unsigned short cr;
- unsigned short _pad37;
- unsigned short rccr;
- unsigned short _pad38;
- unsigned long _pad39[3];
- unsigned short _pad40;
- unsigned short rter;
- unsigned short _pad41;
- unsigned short rtmr;
- unsigned long _pad42[5];
-
- /*
- * BRG Block
- */
- unsigned long brgc1;
- unsigned long brgc2;
- unsigned long brgc3;
- unsigned long brgc4;
-
- /*
- * SCC Block
- */
- m360SCCRegisters_t scc1;
- m360SCCRegisters_t scc2;
- m360SCCRegisters_t scc3;
- m360SCCRegisters_t scc4;
-
- /*
- * SMC Block
- */
- m360SMCRegisters_t smc1;
- m360SMCRegisters_t smc2;
-
- /*
- * SPI Block
- */
- unsigned short spmode;
- unsigned short _pad43[2];
- unsigned char spie;
- unsigned char _pad44;
- unsigned short _pad45;
- unsigned char spim;
- unsigned char _pad46[2];
- unsigned char spcom;
- unsigned short _pad47[2];
-
- /*
- * PIP Block
- */
- unsigned short pipc;
- unsigned short _pad48;
- unsigned short ptpr;
- unsigned long pbdir;
- unsigned long pbpar;
- unsigned short _pad49;
- unsigned short pbodr;
- unsigned long pbdat;
- unsigned long _pad50[6];
-
- /*
- * SI Block
- */
- unsigned long simode;
- unsigned char sigmr;
- unsigned char _pad51;
- unsigned char sistr;
- unsigned char sicmr;
- unsigned long _pad52;
- unsigned long sicr;
- unsigned short _pad53;
- unsigned short sirp[2];
- unsigned short _pad54;
- unsigned long _pad55[2];
- unsigned char siram[256];
-} m360_t;
-
-extern volatile m360_t m360;
-
-#endif /* __MC68360_h */
diff --git a/cpukit/score/cpu/m68k/rtems/m68k/qsm.h b/cpukit/score/cpu/m68k/rtems/m68k/qsm.h
deleted file mode 100644
index e1bf33bc12..0000000000
--- a/cpukit/score/cpu/m68k/rtems/m68k/qsm.h
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
- *-------------------------------------------------------------------
- *
- * QSM -- Queued Serial Module
- *
- * The QSM contains two serial interfaces: (a) the queued serial
- * peripheral interface (QSPI) and the serial communication interface
- * (SCI). The QSPI provides peripheral expansion and/or interprocessor
- * communication through a full-duplex, synchronous, three-wire bus. A
- * self contained RAM queue permits serial data transfers without CPU
- * intervention and automatic continuous sampling. The SCI provides a
- * standard non-return to zero mark/space format with wakeup functions
- * to allow the CPU to run uninterrupted until woken
- *
- * For more information, refer to Motorola's "Modular Microcontroller
- * Family Queued Serial Module Reference Manual" (Motorola document
- * QSMRM/AD).
- *
- * This file has been created by John S. Gwynne for support of
- * Motorola's 68332 MCU in the efi332 project.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the following conditions are met:
- * 1. Redistribution of source code and documentation must retain
- * the above authorship, this list of conditions and the
- * following disclaimer.
- * 2. The name of the author may not be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * This software is provided "AS IS" without warranty of any kind,
- * either expressed or implied, including, but not limited to, the
- * implied warranties of merchantability, title and fitness for a
- * particular purpose.
- *
- *------------------------------------------------------------------
- *
- * $Id$
- */
-
-#ifndef _QSM_H_
-#define _QSM_H_
-
-
-#include <efi332.h>
-
-
-/* SAM-- shift and mask */
-#undef SAM
-#define SAM(a,b,c) ((a << b) & c)
-
-
-/* QSM_CRB (QSM Control Register Block) base address of the QSM
- control registers */
-#if SIM_MM == 0
-#define QSM_CRB 0x7ffc00
-#else
-#undef SIM_MM
-#define SIM_MM 1
-#define QSM_CRB 0xfffc00
-#endif
-
-
-#define QSMCR (volatile unsigned short int * const)(0x00 + QSM_CRB)
- /* QSM Configuration Register */
-#define STOP 0x8000 /* Stop Enable */
-#define FRZ 0x6000 /* Freeze Control */
-#define SUPV 0x0080 /* Supervisor/Unrestricted */
-#define IARB 0x000f /* Inerrupt Arbitration */
-
-
-#define QTEST (volatile unsigned short int * const)(0x02 + QSM_CRB)
- /* QSM Test Register */
-/* Used only for factor testing */
-
-
-#define QILR (volatile unsigned char * const)(0x04 + QSM_CRB)
- /* QSM Interrupt Level Register */
-#define ILQSPI 0x38 /* Interrupt Level for QSPI */
-#define ILSCI 0x07 /* Interrupt Level for SCI */
-
-
-#define QIVR (volatile unsigned char * const)(0x05 + QSM_CRB)
- /* QSM Interrupt Vector Register */
-#define INTV 0xff /* Interrupt Vector Number */
-
-
-#define SCCR0 (volatile unsigned short int * const)(0x08 + QSM_CRB)
- /* SCI Control Register 0 */
-#define SCBR 0x1fff /* SCI Baud Rate */
-
-
-#define SCCR1 (volatile unsigned short int * const)(0x0a + QSM_CRB)
- /* SCI Control Register 1 */
-#define LOOPS 0x4000 /* Loop Mode */
-#define WOMS 0x2000 /* Wired-OR Mode for SCI Pins */
-#define ILT 0x1000 /* Idle-Line Detect Type */
-#define PT 0x0800 /* Parity Type */
-#define PE 0x0400 /* Parity Enable */
-#define M 0x0200 /* Mode Select */
-#define WAKE 0x0100 /* Wakeup by Address Mark */
-#define TIE 0x0080 /* Transmit Complete Interrupt Enable */
-#define TCIE 0x0040 /* Transmit Complete Interrupt Enable */
-#define RIE 0x0020 /* Receiver Interrupt Enable */
-#define ILIE 0x0010 /* Idle-Line Interrupt Enable */
-#define TE 0x0008 /* Transmitter Enable */
-#define RE 0x0004 /* Receiver Enable */
-#define RWU 0x0002 /* Receiver Wakeup */
-#define SBK 0x0001 /* Send Break */
-
-
-#define SCSR (volatile unsigned short int * const)(0x0c + QSM_CRB)
- /* SCI Status Register */
-#define TDRE 0x0100 /* Transmit Data Register Empty */
-#define TC 0x0080 /* Transmit Complete */
-#define RDRF 0x0040 /* Receive Data Register Full */
-#define RAF 0x0020 /* Receiver Active */
-#define IDLE 0x0010 /* Idle-Line Detected */
-#define OR 0x0008 /* Overrun Error */
-#define NF 0x0004 /* Noise Error Flag */
-#define FE 0x0002 /* Framing Error */
-#define PF 0x0001 /* Parity Error */
-
-
-#define SCDR (volatile unsigned short int * const)(0x0e + QSM_CRB)
- /* SCI Data Register */
-
-
-#define PORTQS (volatile unsigned char * const)(0x15 + QSM_CRB)
- /* Port QS Data Register */
-
-#define PQSPAR (volatile unsigned char * const)(0x16 + QSM_CRB)
- /* PORT QS Pin Assignment Rgister */
-/* Any bit cleared (zero) defines the corresponding pin to be an I/O
- pin. Any bit set defines the corresponding pin to be a QSPI
- signal. */
-/* note: PQS2 is a digital I/O pin unless the SPI is enabled in which
- case it becomes the SPI serial clock SCK. */
-/* note: PQS7 is a digital I/O pin unless the SCI transmitter is
- enabled in which case it becomes the SCI serial output TxD. */
-#define QSMFun 0x0
-#define QSMDis 0x1
-/*
- * PQSPAR Field | QSM Function | Discrete I/O pin
- *------------------+--------------+------------------ */
-#define PQSPA0 0 /* MISO | PQS0 */
-#define PQSPA1 1 /* MOSI | PQS1 */
-#define PQSPA2 2 /* SCK | PQS2 (see note)*/
-#define PQSPA3 3 /* PCSO/!SS | PQS3 */
-#define PQSPA4 4 /* PCS1 | PQS4 */
-#define PQSPA5 5 /* PCS2 | PQS5 */
-#define PQSPA6 6 /* PCS3 | PQS6 */
-#define PQSPA7 7 /* TxD | PQS7 (see note)*/
-
-
-#define DDRQS (volatile unsigned char * const)(0x17 + QSM_CRB)
- /* PORT QS Data Direction Register */
-/* Clearing a bit makes the corresponding pin an input; setting a bit
- makes the pin an output. */
-
-
-#define SPCR0 (volatile unsigned short int * const)(0x18 + QSM_CRB)
- /* QSPI Control Register 0 */
-#define MSTR 0x8000 /* Master/Slave Mode Select */
-#define WOMQ 0x4000 /* Wired-OR Mode for QSPI Pins */
-#define BITS 0x3c00 /* Bits Per Transfer */
-#define CPOL 0x0200 /* Clock Polarity */
-#define CPHA 0x0100 /* Clock Phase */
-#define SPBR 0x00ff /* Serial Clock Baud Rate */
-
-
-#define SPCR1 (volatile unsigned short int * const)(0x1a + QSM_CRB)
- /* QSPI Control Register 1 */
-#define SPE 0x8000 /* QSPI Enable */
-#define DSCKL 0x7f00 /* Delay before SCK */
-#define DTL 0x00ff /* Length of Delay after Transfer */
-
-
-#define SPCR2 (volatile unsigned short int * const)(0x1c + QSM_CRB)
- /* QSPI Control Register 2 */
-#define SPIFIE 0x8000 /* SPI Finished Interrupt Enable */
-#define WREN 0x4000 /* Wrap Enable */
-#define WRTO 0x2000 /* Wrap To */
-#define ENDQP 0x0f00 /* Ending Queue Pointer */
-#define NEWQP 0x000f /* New Queue Pointer Value */
-
-
-#define SPCR3 (volatile unsigned char * const)(0x1e + QSM_CRB)
- /* QSPI Control Register 3 */
-#define LOOPQ 0x0400 /* QSPI Loop Mode */
-#define HMIE 0x0200 /* HALTA and MODF Interrupt Enable */
-#define HALT 0x0100 /* Halt */
-
-
-#define SPSR (volatile unsigned char * const)(0x1f + QSM_CRB)
- /* QSPI Status Register */
-#define SPIF 0x0080 /* QSPI Finished Flag */
-#define MODF 0x0040 /* Mode Fault Flag */
-#define HALTA 0x0020 /* Halt Acknowlwdge Flag */
-#define CPTQP x0000f /* Completed Queue Pointer */
-
-#define QSPIRR (volatile unsigned char * const)(0x100 + QSM_CRB)
- /* QSPI Receive Data RAM */
-#define QSPITR (volatile unsigned char * const)(0x120 + QSM_CRB)
- /* QSPI Transmit Data RAM */
-#define QSPIcR (volatile unsigned char * const)(0x140 + QSM_CRB)
- /* QSPI Command RAM */
-
-#endif /* _QSM_H_ */
diff --git a/cpukit/score/cpu/m68k/rtems/m68k/sim.h b/cpukit/score/cpu/m68k/rtems/m68k/sim.h
deleted file mode 100644
index e1c637f9bd..0000000000
--- a/cpukit/score/cpu/m68k/rtems/m68k/sim.h
+++ /dev/null
@@ -1,342 +0,0 @@
-/*
- *-------------------------------------------------------------------
- *
- * SIM -- System Integration Module
- *
- * The system integration module (SIM) is used on many Motorola 16-
- * and 32-bit MCUs for the following functions:
- *
- * () System configuration and protection. Bus and software watchdog
- * monitors are provided in addition to periodic interrupt generators.
- *
- * () Clock signal generation for other intermodule bus (IMB) members
- * and external devices.
- *
- * () The generation of chip-select signals that simplify external
- * circuitry interface.
- *
- * () Data ports that are available for general purpose input and
- * output.
- *
- * () A system test block that is intended only for factory tests.
- *
- * For more information, refer to Motorola's "Modular Microcontroller
- * Family System Integration Module Reference Manual" (Motorola document
- * SIMRM/AD).
- *
- * This file has been created by John S. Gwynne for support of
- * Motorola's 68332 MCU in the efi332 project.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the following conditions are met:
- * 1. Redistribution of source code and documentation must retain
- * the above authorship, this list of conditions and the
- * following disclaimer.
- * 2. The name of the author may not be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * This software is provided "AS IS" without warranty of any kind,
- * either expressed or implied, including, but not limited to, the
- * implied warranties of merchantability, title and fitness for a
- * particular purpose.
- *
- *------------------------------------------------------------------
- *
- * $Id$
- */
-
-#ifndef _SIM_H_
-#define _SIM_H_
-
-
-/*
- * XXX Why is a generic file like this including a bsp specific file?
-
-#include <efi332.h>
- */
-
-
-/* SAM-- shift and mask */
-#undef SAM
-#define SAM(a,b,c) ((a << b) & c)
-
-/*
- * These macros make this file usable from assembly.
- */
-
-#ifdef ASM
-#define SIM_VOLATILE_USHORT_POINTER
-#define SIM_VOLATILE_UCHAR_POINTER
-#else
-#define SIM_VOLATILE_USHORT_POINTER (volatile unsigned short int * const)
-#define SIM_VOLATILE_UCHAR_POINTER (volatile unsigned char * const)
-#endif
-
-/* SIM_CRB (SIM Control Register Block) base address of the SIM
- control registers */
-/* not included in ram_init.h */
-#if SIM_MM == 0
-#define SIM_CRB 0x7ffa00
-#else
-#undef SIM_MM
-#define SIM_MM 1
-#define SIM_CRB 0xfffa00
-#endif
-/* end not included in ram_init.h */
-
-
-
-#define SIMCR SIM_VOLATILE_USHORT_POINTER(0x00 + SIM_CRB)
- /* Module Configuration Register */
-#define EXOFF 0x8000 /* External Clock Off */
-#define FRZSW 0x4000 /* Freeze Software Enable */
-#define FRZBM 0x2000 /* Freeze Bus Monitor Enable */
-#define SLVEN 0x0800 /* Factory Test Model Enabled (ro)*/
-#define SHEN 0x0300 /* Show Cycle Enable */
-#define SUPV 0x0080 /* Supervisor/Unrestricted Data Space */
-#define MM 0x0040 /* Module Mapping */
-#define IARB 0x000f /* Interrupt Arbitration Field */
-
-
-
-#define SIMTR SIM_VOLATILE_USHORT_POINTER(0x02 + SIM_CRB)
- /* SIM Test Register */
-/* Used only for factor testing */
-
-
-
-#define SYNCR SIM_VOLATILE_USHORT_POINTER(0x04 + SIM_CRB)
- /* Clock Synthesizer Control Register */
-#define VCO 0x8000 /* Frequency Control (VCO) */
-#define PRESCALE 0x4000 /* Frequency Control Bit (Prescale) */
-#define COUNTER 0x3f00 /* Frequency Control Counter */
-#define EDIV 0x0080 /* ECLK Divide Rate */
-#define SLIMP 0x0010 /* Limp Mode Status */
-#define SLOCK 0x0008 /* Synthesizer Lock */
-#define RSTEN 0x0004 /* Reset Enable */
-#define STSIM 0x0002 /* Stop Mode SIM Clock */
-#define STEXT 0x0001 /* Stop Mode External Clock */
-
-
-
-#define RSR SIM_VOLATILE_UCHAR_POINTER(0x07 + SIM_CRB)
- /* Reset Status Register */
-#define EXT 0x0080 /* External Reset */
-#define POW 0x0040 /* Power-On Reset */
-#define SW 0x0020 /* Software Watchdog Reset */
-#define DBF 0x0010 /* Double Bus Fault Reset */
-#define LOC 0x0004 /* Loss of Clock Reset */
-#define SYS 0x0002 /* System Reset */
-#define TST 0x0001 /* Test Submodule Reset */
-
-
-
-#define SIMTRE SIM_VOLATILE_USHORT_POINTER(0x08 + SIM_CRB)
- /* System Integration Test Register */
-/* Used only for factor testing */
-
-
-
-#define PORTE0 SIM_VOLATILE_UCHAR_POINTER(0x11 + SIM_CRB)
-#define PORTE1 SIM_VOLATILE_UCHAR_POINTER(0x13 + SIM_CRB)
- /* Port E Data Register */
-#define DDRE SIM_VOLATILE_UCHAR_POINTER(0x15 + SIM_CRB)
- /* Port E Data Direction Register */
-#define PEPAR SIM_VOLATILE_UCHAR_POINTER(0x17 + SIM_CRB)
- /* Port E Pin Assignment Register */
-/* Any bit cleared (zero) defines the corresponding pin to be an I/O
- pin. Any bit set defines the corresponding pin to be a bus control
- signal. */
-
-
-
-#define PORTF0 SIM_VOLATILE_UCHAR_POINTER(0x19 + SIM_CRB)
-#define PORTF1 SIM_VOLATILE_UCHAR_POINTER(0x1b + SIM_CRB)
- /* Port F Data Register */
-#define DDRF SIM_VOLATILE_UCHAR_POINTER(0x1d + SIM_CRB)
- /* Port E Data Direction Register */
-#define PFPAR SIM_VOLATILE_UCHAR_POINTER(0x1f + SIM_CRB)
-/* Any bit cleared (zero) defines the corresponding pin to be an I/O
- pin. Any bit set defines the corresponding pin to be a bus control
- signal. */
-
-
-
-#define SYPCR SIM_VOLATILE_UCHAR_POINTER(0x21 + SIM_CRB)
-/* !!! can write to only once after reset !!! */
- /* System Protection Control Register */
-#define SWE 0x80 /* Software Watch Enable */
-#define SWP 0x40 /* Software Watchdog Prescale */
-#define SWT 0x30 /* Software Watchdog Timing */
-#define HME 0x08 /* Halt Monitor Enable */
-#define BME 0x04 /* Bus Monitor External Enable */
-#define BMT 0x03 /* Bus Monitor Timing */
-
-
-
-#define PICR SIM_VOLATILE_USHORT_POINTER(0x22 + SIM_CRB)
- /* Periodic Interrupt Control Reg. */
-#define PIRQL 0x0700 /* Periodic Interrupt Request Level */
-#define PIV 0x00ff /* Periodic Interrupt Level */
-
-
-
-#define PITR SIM_VOLATILE_USHORT_POINTER(0x24 + SIM_CRB)
- /* Periodic Interrupt Timer Register */
-#define PTP 0x0100 /* Periodic Timer Prescaler Control */
-#define PITM 0x00ff /* Periodic Interrupt Timing Modulus */
-
-
-
-#define SWSR SIM_VOLATILE_UCHAR_POINTER(0x27 + SIM_CRB)
- /* Software Service Register */
-/* write 0x55 then 0xaa to service the software watchdog */
-
-
-
-#define TSTMSRA SIM_VOLATILE_USHORT_POINTER(0x30 + SIM_CRB)
- /* Test Module Master Shift A */
-#define TSTMSRB SIM_VOLATILE_USHORT_POINTER(0x32 + SIM_CRB)
- /* Test Module Master Shift A */
-#define TSTSC SIM_VOLATILE_USHORT_POINTER(0x34 + SIM_CRB)
- /* Test Module Shift Count */
-#define TSTRC SIM_VOLATILE_USHORT_POINTER(0x36 + SIM_CRB)
- /* Test Module Repetition Counter */
-#define CREG SIM_VOLATILE_USHORT_POINTER(0x38 + SIM_CRB)
- /* Test Module Control */
-#define DREG SIM_VOLATILE_USHORT_POINTER(0x3a + SIM_CRB)
- /* Test Module Distributed */
-/* Used only for factor testing */
-
-
-
-#define PORTC SIM_VOLATILE_UCHAR_POINTER(0x41 + SIM_CRB)
- /* Port C Data */
-
-
-
-#define CSPAR0 SIM_VOLATILE_USHORT_POINTER(0x44 + SIM_CRB)
- /* Chip Select Pin Assignment
- Resgister 0 */
-/* CSPAR0 contains seven two-bit fields that determine the functions
- of corresponding chip-select pins. CSPAR0[15:14] are not
- used. These bits always read zero; write have no effect. CSPAR0 bit
- 1 always reads one; writes to CSPAR0 bit 1 have no effect. */
-#define CSPAR1 SIM_VOLATILE_USHORT_POINTER(0x46 + SIM_CRB)
- /* Chip Select Pin Assignment
- Register 1 */
-/* CSPAR1 contains five two-bit fields that determine the finctions of
- corresponding chip-select pins. CSPAR1[15:10] are not used. These
- bits always read zero; writes have no effect. */
-/*
- *
- * Bit Field | Description
- * ------------+---------------
- * 00 | Discrete Output
- * 01 | Alternate Function
- * 10 | Chip Select (8-bit port)
- * 11 | Chip Select (16-bit port)
- */
-#define DisOut 0x0
-#define AltFun 0x1
-#define CS8bit 0x2
-#define CS16bit 0x3
-/*
- *
- * CSPARx Field |Chip Select Signal | Alternate Signal | Discrete Output
- *-----------------+--------------------+--------------------+---------------*/
-#define CS_5 12 /* !CS5 | FC2 | PC2 */
-#define CS_4 10 /* !CS4 | FC1 | PC1 */
-#define CS_3 8 /* !CS3 | FC0 | PC0 */
-#define CS_2 6 /* !CS2 | !BGACK | */
-#define CS_1 4 /* !CS1 | !BG | */
-#define CS_0 2 /* !CS0 | !BR | */
-#define CSBOOT 0 /* !CSBOOT | | */
-/* | | | */
-#define CS_10 8 /* !CS10 | ADDR23 | ECLK */
-#define CS_9 6 /* !CS9 | ADDR22 | PC6 */
-#define CS_8 4 /* !CS8 | ADDR21 | PC5 */
-#define CS_7 2 /* !CS7 | ADDR20 | PC4 */
-#define CS_6 0 /* !CS6 | ADDR19 | PC3 */
-
-#define BS_2K 0x0
-#define BS_8K 0x1
-#define BS_16K 0x2
-#define BS_64K 0x3
-#define BS_128K 0x4
-#define BS_256K 0x5
-#define BS_512K 0x6
-#define BS_1M 0x7
-
-#define CSBARBT SIM_VOLATILE_USHORT_POINTER(0x48 + SIM_CRB)
-#define CSBAR0 SIM_VOLATILE_USHORT_POINTER(0x4c + SIM_CRB)
-#define CSBAR1 SIM_VOLATILE_USHORT_POINTER(0x50 + SIM_CRB)
-#define CSBAR2 SIM_VOLATILE_USHORT_POINTER(0x54 + SIM_CRB)
-#define CSBAR3 SIM_VOLATILE_USHORT_POINTER(0x58 + SIM_CRB)
-#define CSBAR4 SIM_VOLATILE_USHORT_POINTER(0x5c + SIM_CRB)
-#define CSBAR5 SIM_VOLATILE_USHORT_POINTER(0x60 + SIM_CRB)
-#define CSBAR6 SIM_VOLATILE_USHORT_POINTER(0x64 + SIM_CRB)
-#define CSBAR7 SIM_VOLATILE_USHORT_POINTER(0x68 + SIM_CRB)
-#define CSBAR8 SIM_VOLATILE_USHORT_POINTER(0x6c + SIM_CRB)
-#define CSBAR9 SIM_VOLATILE_USHORT_POINTER(0x70 + SIM_CRB)
-#define CSBAR10 SIM_VOLATILE_USHORT_POINTER(0x74 + SIM_CRB)
-
-#define MODE 0x8000
-#define Disable 0
-#define LowerByte 0x2000
-#define UpperByte 0x4000
-#define BothBytes 0x6000
-#define ReadOnly 0x0800
-#define WriteOnly 0x1000
-#define ReadWrite 0x1800
-#define SyncAS 0x0
-#define SyncDS 0x0400
-
-#define WaitStates_0 (0x0 << 6)
-#define WaitStates_1 (0x1 << 6)
-#define WaitStates_2 (0x2 << 6)
-#define WaitStates_3 (0x3 << 6)
-#define WaitStates_4 (0x4 << 6)
-#define WaitStates_5 (0x5 << 6)
-#define WaitStates_6 (0x6 << 6)
-#define WaitStates_7 (0x7 << 6)
-#define WaitStates_8 (0x8 << 6)
-#define WaitStates_9 (0x9 << 6)
-#define WaitStates_10 (0xa << 6)
-#define WaitStates_11 (0xb << 6)
-#define WaitStates_12 (0xc << 6)
-#define WaitStates_13 (0xd << 6)
-#define FastTerm (0xe << 6)
-#define External (0xf << 6)
-
-#define CPUSpace (0x0 << 4)
-#define UserSpace (0x1 << 4)
-#define SupSpace (0x2 << 4)
-#define UserSupSpace (0x3 << 4)
-
-#define IPLevel_any 0x0
-#define IPLevel_1 0x2
-#define IPLevel_2 0x4
-#define IPLevel_3 0x6
-#define IPLevel_4 0x8
-#define IPLevel_5 0xa
-#define IPLevel_6 0xc
-#define IPLevel_7 0xe
-
-#define AVEC 1
-
-#define CSORBT SIM_VOLATILE_USHORT_POINTER(0x4a + SIM_CRB)
-#define CSOR0 SIM_VOLATILE_USHORT_POINTER(0x4e + SIM_CRB)
-#define CSOR1 SIM_VOLATILE_USHORT_POINTER(0x52 + SIM_CRB)
-#define CSOR2 SIM_VOLATILE_USHORT_POINTER(0x56 + SIM_CRB)
-#define CSOR3 SIM_VOLATILE_USHORT_POINTER(0x5a + SIM_CRB)
-#define CSOR4 SIM_VOLATILE_USHORT_POINTER(0x5e + SIM_CRB)
-#define CSOR5 SIM_VOLATILE_USHORT_POINTER(0x62 + SIM_CRB)
-#define CSOR6 SIM_VOLATILE_USHORT_POINTER(0x66 + SIM_CRB)
-#define CSOR7 SIM_VOLATILE_USHORT_POINTER(0x6a + SIM_CRB)
-#define CSOR8 SIM_VOLATILE_USHORT_POINTER(0x6e + SIM_CRB)
-#define CSOR9 SIM_VOLATILE_USHORT_POINTER(0x72 + SIM_CRB)
-#define CSOR10 SIM_VOLATILE_USHORT_POINTER(0x76 + SIM_CRB)
-
-#endif /* _SIM_h_ */
diff --git a/cpukit/score/cpu/m68k/rtems/score/cpu.h b/cpukit/score/cpu/m68k/rtems/score/cpu.h
deleted file mode 100644
index a9a152cd2e..0000000000
--- a/cpukit/score/cpu/m68k/rtems/score/cpu.h
+++ /dev/null
@@ -1,658 +0,0 @@
-/* cpu.h
- *
- * This include file contains information pertaining to the Motorola
- * m68xxx processor family.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __CPU_h
-#define __CPU_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/m68k.h> /* pick up machine definitions */
-#ifndef ASM
-#include <rtems/score/m68ktypes.h>
-#endif
-
-/* conditional compilation parameters */
-
-#define CPU_INLINE_ENABLE_DISPATCH TRUE
-#define CPU_UNROLL_ENQUEUE_PRIORITY FALSE
-
-/*
- * Use the m68k's hardware interrupt stack support and have the
- * interrupt manager allocate the memory for it.
- */
-
-#if ( M68K_HAS_SEPARATE_STACKS == 1)
-#define CPU_HAS_SOFTWARE_INTERRUPT_STACK 0
-#define CPU_HAS_HARDWARE_INTERRUPT_STACK 1
-#else
-#define CPU_HAS_SOFTWARE_INTERRUPT_STACK 1
-#define CPU_HAS_HARDWARE_INTERRUPT_STACK 0
-#endif
-#define CPU_ALLOCATE_INTERRUPT_STACK 1
-
-/*
- * Does the RTEMS invoke the user's ISR with the vector number and
- * a pointer to the saved interrupt frame (1) or just the vector
- * number (0)?
- */
-
-#define CPU_ISR_PASSES_FRAME_POINTER 0
-
-/*
- * Some family members have no FP, some have an FPU such as the
- * MC68881/MC68882 for the MC68020, others have it built in (MC68030, 040).
- *
- * NOTE: If on a CPU without hardware FP, then one can use software
- * emulation. The gcc software FP emulation code has data which
- * must be contexted switched on a per task basis.
- */
-
-#if ( M68K_HAS_FPU == 1 )
-#define CPU_HARDWARE_FP TRUE
-#define CPU_SOFTWARE_FP FALSE
-#else
-#define CPU_HARDWARE_FP FALSE
-#if defined(__GNUC__)
-#define CPU_SOFTWARE_FP TRUE
-#else
-#define CPU_SOFTWARE_FP FALSE
-#endif
-#endif
-
-/*
- * All tasks are not by default floating point tasks on this CPU.
- * The IDLE task does not have a floating point context on this CPU.
- * It is safe to use the deferred floating point context switch
- * algorithm on this CPU.
- */
-
-#define CPU_ALL_TASKS_ARE_FP FALSE
-#define CPU_IDLE_TASK_IS_FP FALSE
-#define CPU_USE_DEFERRED_FP_SWITCH TRUE
-
-#define CPU_PROVIDES_IDLE_THREAD_BODY FALSE
-#define CPU_STACK_GROWS_UP FALSE
-#define CPU_STRUCTURE_ALIGNMENT
-
-/*
- * Define what is required to specify how the network to host conversion
- * routines are handled.
- */
-
-#define CPU_HAS_OWN_HOST_TO_NETWORK_ROUTINES FALSE
-#define CPU_BIG_ENDIAN TRUE
-#define CPU_LITTLE_ENDIAN FALSE
-
-#ifndef ASM
-/* structures */
-
-/*
- * Basic integer context for the m68k family.
- */
-
-typedef struct {
- unsigned32 sr; /* (sr) status register */
- unsigned32 d2; /* (d2) data register 2 */
- unsigned32 d3; /* (d3) data register 3 */
- unsigned32 d4; /* (d4) data register 4 */
- unsigned32 d5; /* (d5) data register 5 */
- unsigned32 d6; /* (d6) data register 6 */
- unsigned32 d7; /* (d7) data register 7 */
- void *a2; /* (a2) address register 2 */
- void *a3; /* (a3) address register 3 */
- void *a4; /* (a4) address register 4 */
- void *a5; /* (a5) address register 5 */
- void *a6; /* (a6) address register 6 */
- void *a7_msp; /* (a7) master stack pointer */
-} Context_Control;
-
-/*
- * Floating point context ares
- */
-
-#if (CPU_SOFTWARE_FP == TRUE)
-
-/*
- * This is the same as gcc's view of the software FP condition code
- * register _fpCCR. The implementation of the emulation code is
- * in the gcc-VERSION/config/m68k directory. This structure is
- * correct as of gcc 2.7.2.2.
- */
-
-typedef struct {
- unsigned16 _exception_bits;
- unsigned16 _trap_enable_bits;
- unsigned16 _sticky_bits;
- unsigned16 _rounding_mode;
- unsigned16 _format;
- unsigned16 _last_operation;
- union {
- float sf;
- double df;
- } _operand1;
- union {
- float sf;
- double df;
- } _operand2;
-} Context_Control_fp;
-
-#else
-
-/*
- * FP context save area for the M68881/M68882 numeric coprocessors.
- */
-
-typedef struct {
- unsigned8 fp_save_area[332]; /* 216 bytes for FSAVE/FRESTORE */
- /* 96 bytes for FMOVEM FP0-7 */
- /* 12 bytes for FMOVEM CREGS */
- /* 4 bytes for non-null flag */
-} Context_Control_fp;
-#endif
-
-/*
- * The following structure defines the set of information saved
- * on the current stack by RTEMS upon receipt of each interrupt.
- */
-
-typedef struct {
- unsigned32 TBD; /* XXX Fix for this CPU */
-} CPU_Interrupt_frame;
-
-/*
- * The following table contains the information required to configure
- * the m68k specific parameters.
- */
-
-typedef struct {
- void (*pretasking_hook)( void );
- void (*predriver_hook)( void );
- void (*postdriver_hook)( void );
- void (*idle_task)( void );
- boolean do_zero_of_workspace;
- unsigned32 idle_task_stack_size;
- unsigned32 interrupt_stack_size;
- unsigned32 extra_mpci_receive_server_stack;
- void * (*stack_allocate_hook)( unsigned32 );
- void (*stack_free_hook)( void* );
- /* end of fields required on all CPUs */
-
- m68k_isr *interrupt_vector_table;
-} rtems_cpu_table;
-
-/*
- * Macros to access required entires in the CPU Table are in
- * the file rtems/system.h.
- */
-
-/*
- * Macros to access M68K specific additions to the CPU Table
- */
-
-#define rtems_cpu_configuration_get_interrupt_vector_table() \
- (_CPU_Table.interrupt_vector_table)
-
-/* variables */
-
-SCORE_EXTERN void *_CPU_Interrupt_stack_low;
-SCORE_EXTERN void *_CPU_Interrupt_stack_high;
-
-extern char _VBR[];
-
-#if ( M68K_HAS_VBR == 0 )
-
-/*
- * Table of ISR handler entries that resides in RAM. The FORMAT/ID is
- * pushed onto the stack. This is not is the same order as VBR processors.
- * The ISR handler takes the format and uses it for dispatching the user
- * handler.
- *
- * FIXME : should be moved to below CPU_INTERRUPT_NUMBER_OF_VECTORS
- *
- */
-
-typedef struct {
- unsigned16 move_a7; /* move #FORMAT_ID,%a7@- */
- unsigned16 format_id;
- unsigned16 jmp; /* jmp _ISR_Handlers */
- unsigned32 isr_handler;
-} _CPU_ISR_handler_entry;
-
-#define M68K_MOVE_A7 0x3F3C
-#define M68K_JMP 0x4EF9
-
- /* points to jsr-exception-table in targets wo/ VBR register */
-SCORE_EXTERN _CPU_ISR_handler_entry _CPU_ISR_jump_table[256];
-
-#endif /* M68K_HAS_VBR */
-#endif /* ASM */
-
-/* constants */
-
-/*
- * This defines the number of levels and the mask used to pick those
- * bits out of a thread mode.
- */
-
-#define CPU_MODES_INTERRUPT_LEVEL 0x00000007 /* interrupt level in mode */
-#define CPU_MODES_INTERRUPT_MASK 0x00000007 /* interrupt level in mode */
-
-/*
- * context size area for floating point
- */
-
-#define CPU_CONTEXT_FP_SIZE sizeof( Context_Control_fp )
-
-/*
- * extra stack required by the MPCI receive server thread
- */
-
-#define CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK 1024
-
-/*
- * m68k family supports 256 distinct vectors.
- */
-
-#define CPU_INTERRUPT_NUMBER_OF_VECTORS 256
-#define CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER (CPU_INTERRUPT_NUMBER_OF_VECTORS - 1)
-
-/*
- * Minimum size of a thread's stack.
- */
-
-#define CPU_STACK_MINIMUM_SIZE 4096
-
-/*
- * m68k is pretty tolerant of alignment. Just put things on 4 byte boundaries.
- */
-
-#define CPU_ALIGNMENT 4
-#define CPU_HEAP_ALIGNMENT CPU_ALIGNMENT
-#define CPU_PARTITION_ALIGNMENT CPU_ALIGNMENT
-
-/*
- * On m68k thread stacks require no further alignment after allocation
- * from the Workspace.
- */
-
-#define CPU_STACK_ALIGNMENT 0
-
-#ifndef ASM
-
-/* macros */
-
-/*
- * ISR handler macros
- *
- * These macros perform the following functions:
- * + disable all maskable CPU interrupts
- * + restore previous interrupt level (enable)
- * + temporarily restore interrupts (flash)
- * + set a particular level
- */
-
-#define _CPU_ISR_Disable( _level ) \
- m68k_disable_interrupts( _level )
-
-#define _CPU_ISR_Enable( _level ) \
- m68k_enable_interrupts( _level )
-
-#define _CPU_ISR_Flash( _level ) \
- m68k_flash_interrupts( _level )
-
-#define _CPU_ISR_Set_level( _newlevel ) \
- m68k_set_interrupt_level( _newlevel )
-
-unsigned32 _CPU_ISR_Get_level( void );
-
-/* end of ISR handler macros */
-
-/*
- * Context handler macros
- *
- * These macros perform the following functions:
- * + initialize a context area
- * + restart the current thread
- * + calculate the initial pointer into a FP context area
- * + initialize an FP context area
- */
-
-#define _CPU_Context_Initialize( _the_context, _stack_base, _size, \
- _isr, _entry_point, _is_fp ) \
- do { \
- unsigned32 _stack; \
- \
- (_the_context)->sr = 0x3000 | ((_isr) << 8); \
- _stack = (unsigned32)(_stack_base) + (_size) - 4; \
- (_the_context)->a7_msp = (void *)_stack; \
- *(void **)_stack = (void *)(_entry_point); \
- } while ( 0 )
-
-#define _CPU_Context_Restart_self( _the_context ) \
- { asm volatile( "movew %0,%%sr ; " \
- "moval %1,%%a7 ; " \
- "rts" \
- : "=d" ((_the_context)->sr), "=d" ((_the_context)->a7_msp) \
- : "0" ((_the_context)->sr), "1" ((_the_context)->a7_msp) ); \
- }
-
-/*
- * Floating Point Context Area Support routines
- */
-
-#if (CPU_SOFTWARE_FP == TRUE)
-
-/*
- * This software FP implementation is only for GCC.
- */
-
-#define _CPU_Context_Fp_start( _base, _offset ) \
- ((void *) _Addresses_Add_offset( (_base), (_offset) ) )
-
-
-#define _CPU_Context_Initialize_fp( _fp_area ) \
- { \
- Context_Control_fp *_fp; \
- _fp = *(Context_Control_fp **)_fp_area; \
- _fp->_exception_bits = 0; \
- _fp->_trap_enable_bits = 0; \
- _fp->_sticky_bits = 0; \
- _fp->_rounding_mode = 0; /* ROUND_TO_NEAREST */ \
- _fp->_format = 0; /* NIL */ \
- _fp->_last_operation = 0; /* NOOP */ \
- _fp->_operand1.df = 0; \
- _fp->_operand2.df = 0; \
- }
-#else
-#define _CPU_Context_Fp_start( _base, _offset ) \
- ((void *) \
- _Addresses_Add_offset( \
- (_base), \
- (_offset) + CPU_CONTEXT_FP_SIZE - 4 \
- ) \
- )
-
-#define _CPU_Context_Initialize_fp( _fp_area ) \
- { unsigned32 *_fp_context = (unsigned32 *)*(_fp_area); \
- \
- *(--(_fp_context)) = 0; \
- *(_fp_area) = (unsigned8 *)(_fp_context); \
- }
-#endif
-
-/* end of Context handler macros */
-
-/*
- * Fatal Error manager macros
- *
- * These macros perform the following functions:
- * + disable interrupts and halt the CPU
- */
-
-#if ( M68K_COLDFIRE_ARCH == 1 )
-#define _CPU_Fatal_halt( _error ) \
- { asm volatile( "move.w %%sr,%%d0\n\t" \
- "or.l %2,%%d0\n\t" \
- "move.w %%d0,%%sr\n\t" \
- "move.l %1,%%d0\n\t" \
- "move.l #0xDEADBEEF,%%d1\n\t" \
- "halt" \
- : "=g" (_error) \
- : "0" (_error), "d"(0x0700) \
- : "d0", "d1" ); \
- }
-#else
-#define _CPU_Fatal_halt( _error ) \
- { asm volatile( "movl %0,%%d0; " \
- "orw #0x0700,%%sr; " \
- "stop #0x2700" : "=d" ((_error)) : "0" ((_error)) ); \
- }
-#endif
-
-/* end of Fatal Error manager macros */
-
-/*
- * Bitfield handler macros
- *
- * These macros perform the following functions:
- * + scan for the highest numbered (MSB) set in a 16 bit bitfield
- *
- * NOTE:
- *
- * It appears that on the M68020 bitfield are always 32 bits wide
- * when in a register. This code forces the bitfield to be in
- * memory (it really always is anyway). This allows us to
- * have a real 16 bit wide bitfield which operates "correctly."
- */
-
-#define CPU_USE_GENERIC_BITFIELD_CODE FALSE
-#define CPU_USE_GENERIC_BITFIELD_DATA FALSE
-
-#if ( M68K_HAS_BFFFO == 1 )
-
-#define _CPU_Bitfield_Find_first_bit( _value, _output ) \
- asm volatile( "bfffo (%1),#0,#16,%0" : "=d" (_output) : "a" (&_value));
-#else
-
-/* duplicates BFFFO results for 16 bits (i.e., 15-(_priority) in
- _CPU_Priority_bits_index is not needed), handles the 0 case, and
- does not molest _value -- jsg */
-#if ( M68K_COLDFIRE_ARCH == 1 )
-#define _CPU_Bitfield_Find_first_bit( _value, _output ) \
- { \
- extern const unsigned char __BFFFOtable[256]; \
- register int dumby; \
- \
- asm volatile ( \
- " clr.l %1\n" \
- " move.w %2,%1\n" \
- " lsr.l #8,%1\n" \
- " beq.s 1f\n" \
- " move.b (%3,%1),%0\n" \
- " bra.s 0f\n" \
- "1: move.w %2,%1\n" \
- " move.b (%3,%1),%0\n" \
- " addq.l #8,%0\n" \
- "0: and.l #0xff,%0\n" \
- : "=&d" ((_output)), "=&d" ((dumby)) \
- : "d" ((_value)), "ao" ((__BFFFOtable)) \
- : "cc" ) ; \
- }
-#elif ( M68K_HAS_EXTB_L == 1 )
-#define _CPU_Bitfield_Find_first_bit( _value, _output ) \
- { \
- extern const unsigned char __BFFFOtable[256]; \
- register int dumby; \
- \
- asm volatile ( " move.w %2,%1\n" \
- " lsr.w #8,%1\n" \
- " beq.s 1f\n" \
- " move.b (%3,%1.w),%0\n" \
- " extb.l %0\n" \
- " bra.s 0f\n" \
- "1: moveq.l #8,%0\n" \
- " add.b (%3,%2.w),%0\n" \
- "0:\n" \
- : "=&d" ((_output)), "=&d" ((dumby)) \
- : "d" ((_value)), "ao" ((__BFFFOtable)) \
- : "cc" ) ; \
- }
-#else
-#define _CPU_Bitfield_Find_first_bit( _value, _output ) \
- { \
- extern const unsigned char __BFFFOtable[256]; \
- register int dumby; \
- \
- asm volatile ( " move.w %2,%1\n" \
- " lsr.w #8,%1\n" \
- " beq.s 1f\n" \
- " move.b (%3,%1.w),%0\n" \
- " and.l #0x000000ff,%0\n"\
- " bra.s 0f\n" \
- "1: moveq.l #8,%0\n" \
- " add.b (%3,%2.w),%0\n" \
- "0:\n" \
- : "=&d" ((_output)), "=&d" ((dumby)) \
- : "d" ((_value)), "ao" ((__BFFFOtable)) \
- : "cc" ) ; \
- }
-#endif
-
-#endif
-
-/* end of Bitfield handler macros */
-
-/*
- * Priority handler macros
- *
- * These macros perform the following functions:
- * + return a mask with the bit for this major/minor portion of
- * of thread priority set.
- * + translate the bit number returned by "Bitfield_find_first_bit"
- * into an index into the thread ready chain bit maps
- */
-
-#define _CPU_Priority_Mask( _bit_number ) \
- ( 0x8000 >> (_bit_number) )
-
-#define _CPU_Priority_bits_index( _priority ) \
- (_priority)
-
-/* end of Priority handler macros */
-
-/* functions */
-
-/*
- * _CPU_Initialize
- *
- * This routine performs CPU dependent initialization.
- */
-
-void _CPU_Initialize(
- rtems_cpu_table *cpu_table,
- void (*thread_dispatch)
-);
-
-/*
- * _CPU_ISR_install_raw_handler
- *
- * This routine installs a "raw" interrupt handler directly into the
- * processor's vector table.
- */
-
-void _CPU_ISR_install_raw_handler(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-);
-
-/*
- * _CPU_ISR_install_vector
- *
- * This routine installs an interrupt vector.
- */
-
-void _CPU_ISR_install_vector(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-);
-
-/*
- * _CPU_Install_interrupt_stack
- *
- * This routine installs the hardware interrupt stack pointer.
- */
-
-void _CPU_Install_interrupt_stack( void );
-
-/*
- * _CPU_Context_switch
- *
- * This routine switches from the run context to the heir context.
- */
-
-void _CPU_Context_switch(
- Context_Control *run,
- Context_Control *heir
-);
-
-/*
- * _CPU_Context_save_fp
- *
- * This routine saves the floating point context passed to it.
- */
-
-void _CPU_Context_save_fp(
- void **fp_context_ptr
-);
-
-/*
- * _CPU_Context_restore_fp
- *
- * This routine restores the floating point context passed to it.
- */
-
-void _CPU_Context_restore_fp(
- void **fp_context_ptr
-);
-
-#if (M68K_HAS_FPSP_PACKAGE == 1)
-/*
- * Hooks for the Floating Point Support Package (FPSP) provided by Motorola
- *
- * NOTES:
- *
- * Motorola 68k family CPU's before the 68040 used a coprocessor
- * (68881 or 68882) to handle floating point. The 68040 has internal
- * floating point support -- but *not* the complete support provided by
- * the 68881 or 68882. The leftover functions are taken care of by the
- * M68040 Floating Point Support Package. Quoting from the MC68040
- * Microprocessors User's Manual, Section 9, Floating-Point Unit (MC68040):
- *
- * "When used with the M68040FPSP, the MC68040 FPU is fully
- * compliant with IEEE floating-point standards."
- *
- * M68KFPSPInstallExceptionHandlers is in libcpu/m68k/MODEL/fpsp and
- * is invoked early in the application code to insure that proper FP
- * behavior is installed. This is not left to the BSP to call, since
- * this would force all applications using that BSP to use FPSP which
- * is not necessarily desirable.
- *
- * There is a similar package for the 68060 but RTEMS does not yet
- * support the 68060.
- */
-
-void M68KFPSPInstallExceptionHandlers (void);
-
-SCORE_EXTERN int (*_FPSP_install_raw_handler)(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-);
-
-#endif
-
-
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/cpu/m68k/rtems/score/m68k.h b/cpukit/score/cpu/m68k/rtems/score/m68k.h
deleted file mode 100644
index 7408aae231..0000000000
--- a/cpukit/score/cpu/m68k/rtems/score/m68k.h
+++ /dev/null
@@ -1,362 +0,0 @@
-/* m68k.h
- *
- * This include file contains information pertaining to the Motorola
- * m68xxx processor family.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __M68k_h
-#define __M68k_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This section contains the information required to build
- * RTEMS for a particular member of the Motorola MC68xxx
- * family. It does this by setting variables to indicate
- * which implementation dependent features are present in
- * a particular member of the family.
- *
- * Currently recognized:
- * -m68000
- * -m68000 -msoft-float
- * -m68020
- * -m68020 -msoft-float
- * -m68030
- * -m68040 -msoft-float
- * -m68040
- * -m68040 -msoft-float
- * -m68060
- * -m68060 -msoft-float
- * -m68302 (no FP) (deprecated, use -m68000)
- * -m68332 (no FP) (deprecated, use -mcpu32)
- * -mcpu32 (no FP)
- * -m5200 (no FP)
- *
- * As of gcc 2.8.1 and egcs 1.1, there is no distinction made between
- * the CPU32 and CPU32+. The option -mcpu32 generates code which can
- * be run on either core. RTEMS distinguishes between these two cores
- * because they have different alignment rules which impact performance.
- * If you are using a CPU32+, then the symbol RTEMS__mcpu32p__ should
- * be defined in your custom file (see make/custom/gen68360.cfg for an
- * example of how to do this. If gcc ever distinguishes between these
- * two cores, then RTEMS__mcpu32p__ usage will be replaced with the
- * appropriate compiler defined predefine.
- *
- * Here is some information on the 040 variants (courtesy of Doug McBride,
- * mcbride@rodin.colorado.edu):
- *
- * "The 68040 is a superset of the 68EC040 and the 68LC040. The
- * 68EC040 and 68LC040 do not have FPU's. The 68LC040 and the
- * 68EC040 have renamed the DLE pin as JS0 which must be tied to
- * Gnd or Vcc. The 68EC040 has renamed the MDIS pin as JS1. The
- * 68EC040 has access control units instead of memory management units.
- * The 68EC040 should not have the PFLUSH or PTEST instructions executed
- * (cause an indeterminate result). The 68EC040 and 68LC040 do not
- * implement the DLE or multiplexed bus modes. The 68EC040 does not
- * implement the output buffer impedance selection mode of operation."
- *
- * M68K_HAS_EXTB_L is used to enable/disable usage of the extb.l instruction
- * which is not available for 68000 or 68ec000 cores (68000, 68001, 68008,
- * 68010, 68302, 68306, 68307). This instruction is available on the 68020
- * up and the cpu32 based models.
- *
- * M68K_HAS_MISALIGNED is non-zero if the CPU allows byte-misaligned
- * data access (68020, 68030, 68040, 68060, CPU32+).
- *
- * NOTE:
- * Eventually it would be nice to evaluate doing a lot of this section
- * by having each model specify which core it uses and then go from there.
- */
-
-#if defined(__mc68020__)
-
-#define CPU_MODEL_NAME "m68020"
-#define M68K_HAS_VBR 1
-#define M68K_HAS_SEPARATE_STACKS 1
-#define M68K_HAS_BFFFO 1
-#define M68K_HAS_PREINDEXING 1
-#define M68K_HAS_EXTB_L 1
-#define M68K_HAS_MISALIGNED 1
-# if defined (__HAVE_68881__)
-# define M68K_HAS_FPU 1
-# define M68K_HAS_FPSP_PACKAGE 0
-# else
-# define M68K_HAS_FPU 0
-# define M68K_HAS_FPSP_PACKAGE 0
-# endif
-
-#elif defined(__mc68030__)
-
-#define CPU_MODEL_NAME "m68030"
-#define M68K_HAS_VBR 1
-#define M68K_HAS_SEPARATE_STACKS 1
-#define M68K_HAS_BFFFO 1
-#define M68K_HAS_PREINDEXING 1
-#define M68K_HAS_EXTB_L 1
-#define M68K_HAS_MISALIGNED 1
-# if defined (__HAVE_68881__)
-# define M68K_HAS_FPU 1
-# define M68K_HAS_FPSP_PACKAGE 0
-# else
-# define M68K_HAS_FPU 0
-# define M68K_HAS_FPSP_PACKAGE 0
-# endif
-
-#elif defined(__mc68040__)
-
-#define CPU_MODEL_NAME "m68040"
-#define M68K_HAS_VBR 1
-#define M68K_HAS_SEPARATE_STACKS 1
-#define M68K_HAS_BFFFO 1
-#define M68K_HAS_PREINDEXING 1
-#define M68K_HAS_EXTB_L 1
-#define M68K_HAS_MISALIGNED 1
-# if defined (__HAVE_68881__)
-# define M68K_HAS_FPU 1
-# define M68K_HAS_FPSP_PACKAGE 1
-# else
-# define M68K_HAS_FPU 0
-# define M68K_HAS_FPSP_PACKAGE 0
-# endif
-
-#elif defined(__mc68060__)
-
-#define CPU_MODEL_NAME "m68060"
-#define M68K_HAS_VBR 1
-#define M68K_HAS_SEPARATE_STACKS 0
-#define M68K_HAS_BFFFO 1
-#define M68K_HAS_PREINDEXING 1
-#define M68K_HAS_EXTB_L 1
-#define M68K_HAS_MISALIGNED 1
-# if defined (__HAVE_68881__)
-# define M68K_HAS_FPU 1
-# define M68K_HAS_FPSP_PACKAGE 1
-# else
-# define M68K_HAS_FPU 0
-# define M68K_HAS_FPSP_PACKAGE 0
-# endif
-
-#elif defined(__mc68302__)
-#define CPU_MODEL_NAME "m68302"
-#define M68K_HAS_VBR 0
-#define M68K_HAS_SEPARATE_STACKS 0
-#define M68K_HAS_BFFFO 0
-#define M68K_HAS_PREINDEXING 0
-#define M68K_HAS_EXTB_L 0
-#define M68K_HAS_MISALIGNED 0
-#define M68K_HAS_FPU 0
-#define M68K_HAS_FPSP_PACKAGE 0
-
- /* gcc and egcs do not distinguish between CPU32 and CPU32+ */
-#elif defined(RTEMS__mcpu32p__)
-
-#define CPU_MODEL_NAME "mcpu32+"
-#define M68K_HAS_VBR 1
-#define M68K_HAS_SEPARATE_STACKS 0
-#define M68K_HAS_BFFFO 0
-#define M68K_HAS_PREINDEXING 1
-#define M68K_HAS_EXTB_L 1
-#define M68K_HAS_MISALIGNED 1
-#define M68K_HAS_FPU 0
-#define M68K_HAS_FPSP_PACKAGE 0
-
-#elif defined(__mcpu32__)
-
-#define CPU_MODEL_NAME "mcpu32"
-#define M68K_HAS_VBR 1
-#define M68K_HAS_SEPARATE_STACKS 0
-#define M68K_HAS_BFFFO 0
-#define M68K_HAS_PREINDEXING 1
-#define M68K_HAS_EXTB_L 1
-#define M68K_HAS_MISALIGNED 0
-#define M68K_HAS_FPU 0
-#define M68K_HAS_FPSP_PACKAGE 0
-
-#elif defined(__mcf5200__)
-/* Motorola ColdFire V2 core - RISC/68020 hybrid */
-#define CPU_MODEL_NAME "m5200"
-#define M68K_HAS_VBR 1
-#define M68K_HAS_BFFFO 0
-#define M68K_HAS_SEPARATE_STACKS 0
-#define M68K_HAS_PREINDEXING 0
-#define M68K_HAS_EXTB_L 1
-#define M68K_HAS_MISALIGNED 1
-#define M68K_HAS_FPU 0
-#define M68K_HAS_FPSP_PACKAGE 0
-#define M68K_COLDFIRE_ARCH 1
-
-#elif defined(__mc68000__)
-
-#define CPU_MODEL_NAME "m68000"
-#define M68K_HAS_VBR 0
-#define M68K_HAS_SEPARATE_STACKS 0
-#define M68K_HAS_BFFFO 0
-#define M68K_HAS_PREINDEXING 0
-#define M68K_HAS_EXTB_L 0
-#define M68K_HAS_MISALIGNED 0
-# if defined (__HAVE_68881__)
-# define M68K_HAS_FPU 1
-# define M68K_HAS_FPSP_PACKAGE 0
-# else
-# define M68K_HAS_FPU 0
-# define M68K_HAS_FPSP_PACKAGE 0
-# endif
-
-#else
-
-#error "Unsupported CPU model -- are you sure you're running a 68k compiler?"
-
-#endif
-
-/*
- * If the above did not specify a ColdFire architecture, then set
- * this flag to indicate that it is not a ColdFire CPU.
- */
-
-#if !defined(M68K_COLDFIRE_ARCH)
-#define M68K_COLDFIRE_ARCH 0
-#endif
-
-/*
- * Define the name of the CPU family.
- */
-
-#if ( M68K_COLDFIRE_ARCH == 1 )
- #define CPU_NAME "Motorola ColdFire"
-#else
- #define CPU_NAME "Motorola MC68xxx"
-#endif
-
-#ifndef ASM
-
-#if ( M68K_COLDFIRE_ARCH == 1 )
-#define m68k_disable_interrupts( _level ) \
- do { register unsigned32 _tmpsr = 0x0700; \
- asm volatile ( "move.w %%sr,%0\n\t" \
- "or.l %0,%1\n\t" \
- "move.w %1,%%sr" \
- : "=d" (_level), "=d"(_tmpsr) : "1"(_tmpsr) ); \
- } while( 0 )
-#else
-#define m68k_disable_interrupts( _level ) \
- asm volatile ( "move.w %%sr,%0\n\t" \
- "or.w #0x0700,%%sr" \
- : "=d" (_level))
-#endif
-
-#define m68k_enable_interrupts( _level ) \
- asm volatile ( "move.w %0,%%sr " : : "d" (_level));
-
-#if ( M68K_COLDFIRE_ARCH == 1 )
-#define m68k_flash_interrupts( _level ) \
- do { register unsigned32 _tmpsr = 0x0700; \
- asm volatile ( "move.w %2,%%sr\n\t" \
- "or.l %2,%1\n\t" \
- "move.w %1,%%sr" \
- : "=d"(_tmpsr) : "0"(_tmpsr), "d"(_level) ); \
- } while( 0 )
-#else
-#define m68k_flash_interrupts( _level ) \
- asm volatile ( "move.w %0,%%sr\n\t" \
- "or.w #0x0700,%%sr" \
- : : "d" (_level))
-#endif
-
-#define m68k_get_interrupt_level( _level ) \
- do { \
- register unsigned32 _tmpsr; \
- \
- asm volatile( "move.w %%sr,%0" : "=d" (_tmpsr)); \
- _level = (_tmpsr & 0x0700) >> 8; \
- } while (0)
-
-#define m68k_set_interrupt_level( _newlevel ) \
- do { \
- register unsigned32 _tmpsr; \
- \
- asm volatile( "move.w %%sr,%0" : "=d" (_tmpsr)); \
- _tmpsr = (_tmpsr & 0xf8ff) | ((_newlevel) << 8); \
- asm volatile( "move.w %0,%%sr" : : "d" (_tmpsr)); \
- } while (0)
-
-#if ( M68K_HAS_VBR == 1 && M68K_COLDFIRE_ARCH == 0 )
-#define m68k_get_vbr( vbr ) \
- asm volatile ( "movec %%vbr,%0 " : "=r" (vbr))
-
-#define m68k_set_vbr( vbr ) \
- asm volatile ( "movec %0,%%vbr " : : "r" (vbr))
-
-#elif ( M68K_COLDFIRE_ARCH == 1 )
-#define m68k_get_vbr( _vbr ) _vbr = (void *)_VBR
-
-#define m68k_set_vbr( _vbr ) \
- asm volatile ("move.l %%a7,%%d1 \n\t" \
- "move.l %0,%%a7\n\t" \
- "movec %%a7,%%vbr\n\t" \
- "move.l %%d1,%%a7\n\t" \
- : : "d" (_vbr) : "d1" );
-
-#else
-#define m68k_get_vbr( _vbr ) _vbr = (void *)_VBR
-#define m68k_set_vbr( _vbr )
-#endif
-
-/*
- * The following routine swaps the endian format of an unsigned int.
- * It must be static because it is referenced indirectly.
- */
-
-static inline unsigned int m68k_swap_u32(
- unsigned int value
-)
-{
- unsigned int swapped = value;
-
- asm volatile( "rorw #8,%0" : "=d" (swapped) : "0" (swapped) );
- asm volatile( "swap %0" : "=d" (swapped) : "0" (swapped) );
- asm volatile( "rorw #8,%0" : "=d" (swapped) : "0" (swapped) );
-
- return( swapped );
-}
-
-static inline unsigned int m68k_swap_u16(
- unsigned int value
-)
-{
- unsigned short swapped = value;
-
- asm volatile( "rorw #8,%0" : "=d" (swapped) : "0" (swapped) );
-
- return( swapped );
-}
-
-/* XXX this is only valid for some m68k family members and should be fixed */
-
-#define m68k_enable_caching() \
- { register unsigned32 _ctl=0x01; \
- asm volatile ( "movec %0,%%cacr" \
- : "=d" (_ctl) : "0" (_ctl) ); \
- }
-
-#define CPU_swap_u32( value ) m68k_swap_u32( value )
-#define CPU_swap_u16( value ) m68k_swap_u16( value )
-
-#endif /* !ASM */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/cpu/m68k/rtems/score/types.h b/cpukit/score/cpu/m68k/rtems/score/types.h
deleted file mode 100644
index 7b1a1c643e..0000000000
--- a/cpukit/score/cpu/m68k/rtems/score/types.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* m68ktypes.h
- *
- * This include file contains type definitions pertaining to the Motorola
- * m68xxx processor family.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __M68k_TYPES_h
-#define __M68k_TYPES_h
-
-#ifndef ASM
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This section defines the basic types for this processor.
- */
-
-typedef unsigned char unsigned8; /* unsigned 8-bit integer */
-typedef unsigned short unsigned16; /* unsigned 16-bit integer */
-typedef unsigned int unsigned32; /* unsigned 32-bit integer */
-typedef unsigned long long unsigned64; /* unsigned 64-bit integer */
-
-typedef unsigned16 Priority_Bit_map_control;
-
-typedef signed char signed8; /* 8-bit signed integer */
-typedef signed short signed16; /* 16-bit signed integer */
-typedef signed int signed32; /* 32-bit signed integer */
-typedef signed long long signed64; /* 64 bit signed integer */
-
-typedef unsigned32 boolean; /* Boolean value */
-
-typedef float single_precision; /* single precision float */
-typedef double double_precision; /* double precision float */
-
-typedef void m68k_isr;
-
-typedef void ( *m68k_isr_entry )( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !ASM */
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/cpu/m68k/sim.h b/cpukit/score/cpu/m68k/sim.h
deleted file mode 100644
index e1c637f9bd..0000000000
--- a/cpukit/score/cpu/m68k/sim.h
+++ /dev/null
@@ -1,342 +0,0 @@
-/*
- *-------------------------------------------------------------------
- *
- * SIM -- System Integration Module
- *
- * The system integration module (SIM) is used on many Motorola 16-
- * and 32-bit MCUs for the following functions:
- *
- * () System configuration and protection. Bus and software watchdog
- * monitors are provided in addition to periodic interrupt generators.
- *
- * () Clock signal generation for other intermodule bus (IMB) members
- * and external devices.
- *
- * () The generation of chip-select signals that simplify external
- * circuitry interface.
- *
- * () Data ports that are available for general purpose input and
- * output.
- *
- * () A system test block that is intended only for factory tests.
- *
- * For more information, refer to Motorola's "Modular Microcontroller
- * Family System Integration Module Reference Manual" (Motorola document
- * SIMRM/AD).
- *
- * This file has been created by John S. Gwynne for support of
- * Motorola's 68332 MCU in the efi332 project.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the following conditions are met:
- * 1. Redistribution of source code and documentation must retain
- * the above authorship, this list of conditions and the
- * following disclaimer.
- * 2. The name of the author may not be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * This software is provided "AS IS" without warranty of any kind,
- * either expressed or implied, including, but not limited to, the
- * implied warranties of merchantability, title and fitness for a
- * particular purpose.
- *
- *------------------------------------------------------------------
- *
- * $Id$
- */
-
-#ifndef _SIM_H_
-#define _SIM_H_
-
-
-/*
- * XXX Why is a generic file like this including a bsp specific file?
-
-#include <efi332.h>
- */
-
-
-/* SAM-- shift and mask */
-#undef SAM
-#define SAM(a,b,c) ((a << b) & c)
-
-/*
- * These macros make this file usable from assembly.
- */
-
-#ifdef ASM
-#define SIM_VOLATILE_USHORT_POINTER
-#define SIM_VOLATILE_UCHAR_POINTER
-#else
-#define SIM_VOLATILE_USHORT_POINTER (volatile unsigned short int * const)
-#define SIM_VOLATILE_UCHAR_POINTER (volatile unsigned char * const)
-#endif
-
-/* SIM_CRB (SIM Control Register Block) base address of the SIM
- control registers */
-/* not included in ram_init.h */
-#if SIM_MM == 0
-#define SIM_CRB 0x7ffa00
-#else
-#undef SIM_MM
-#define SIM_MM 1
-#define SIM_CRB 0xfffa00
-#endif
-/* end not included in ram_init.h */
-
-
-
-#define SIMCR SIM_VOLATILE_USHORT_POINTER(0x00 + SIM_CRB)
- /* Module Configuration Register */
-#define EXOFF 0x8000 /* External Clock Off */
-#define FRZSW 0x4000 /* Freeze Software Enable */
-#define FRZBM 0x2000 /* Freeze Bus Monitor Enable */
-#define SLVEN 0x0800 /* Factory Test Model Enabled (ro)*/
-#define SHEN 0x0300 /* Show Cycle Enable */
-#define SUPV 0x0080 /* Supervisor/Unrestricted Data Space */
-#define MM 0x0040 /* Module Mapping */
-#define IARB 0x000f /* Interrupt Arbitration Field */
-
-
-
-#define SIMTR SIM_VOLATILE_USHORT_POINTER(0x02 + SIM_CRB)
- /* SIM Test Register */
-/* Used only for factor testing */
-
-
-
-#define SYNCR SIM_VOLATILE_USHORT_POINTER(0x04 + SIM_CRB)
- /* Clock Synthesizer Control Register */
-#define VCO 0x8000 /* Frequency Control (VCO) */
-#define PRESCALE 0x4000 /* Frequency Control Bit (Prescale) */
-#define COUNTER 0x3f00 /* Frequency Control Counter */
-#define EDIV 0x0080 /* ECLK Divide Rate */
-#define SLIMP 0x0010 /* Limp Mode Status */
-#define SLOCK 0x0008 /* Synthesizer Lock */
-#define RSTEN 0x0004 /* Reset Enable */
-#define STSIM 0x0002 /* Stop Mode SIM Clock */
-#define STEXT 0x0001 /* Stop Mode External Clock */
-
-
-
-#define RSR SIM_VOLATILE_UCHAR_POINTER(0x07 + SIM_CRB)
- /* Reset Status Register */
-#define EXT 0x0080 /* External Reset */
-#define POW 0x0040 /* Power-On Reset */
-#define SW 0x0020 /* Software Watchdog Reset */
-#define DBF 0x0010 /* Double Bus Fault Reset */
-#define LOC 0x0004 /* Loss of Clock Reset */
-#define SYS 0x0002 /* System Reset */
-#define TST 0x0001 /* Test Submodule Reset */
-
-
-
-#define SIMTRE SIM_VOLATILE_USHORT_POINTER(0x08 + SIM_CRB)
- /* System Integration Test Register */
-/* Used only for factor testing */
-
-
-
-#define PORTE0 SIM_VOLATILE_UCHAR_POINTER(0x11 + SIM_CRB)
-#define PORTE1 SIM_VOLATILE_UCHAR_POINTER(0x13 + SIM_CRB)
- /* Port E Data Register */
-#define DDRE SIM_VOLATILE_UCHAR_POINTER(0x15 + SIM_CRB)
- /* Port E Data Direction Register */
-#define PEPAR SIM_VOLATILE_UCHAR_POINTER(0x17 + SIM_CRB)
- /* Port E Pin Assignment Register */
-/* Any bit cleared (zero) defines the corresponding pin to be an I/O
- pin. Any bit set defines the corresponding pin to be a bus control
- signal. */
-
-
-
-#define PORTF0 SIM_VOLATILE_UCHAR_POINTER(0x19 + SIM_CRB)
-#define PORTF1 SIM_VOLATILE_UCHAR_POINTER(0x1b + SIM_CRB)
- /* Port F Data Register */
-#define DDRF SIM_VOLATILE_UCHAR_POINTER(0x1d + SIM_CRB)
- /* Port E Data Direction Register */
-#define PFPAR SIM_VOLATILE_UCHAR_POINTER(0x1f + SIM_CRB)
-/* Any bit cleared (zero) defines the corresponding pin to be an I/O
- pin. Any bit set defines the corresponding pin to be a bus control
- signal. */
-
-
-
-#define SYPCR SIM_VOLATILE_UCHAR_POINTER(0x21 + SIM_CRB)
-/* !!! can write to only once after reset !!! */
- /* System Protection Control Register */
-#define SWE 0x80 /* Software Watch Enable */
-#define SWP 0x40 /* Software Watchdog Prescale */
-#define SWT 0x30 /* Software Watchdog Timing */
-#define HME 0x08 /* Halt Monitor Enable */
-#define BME 0x04 /* Bus Monitor External Enable */
-#define BMT 0x03 /* Bus Monitor Timing */
-
-
-
-#define PICR SIM_VOLATILE_USHORT_POINTER(0x22 + SIM_CRB)
- /* Periodic Interrupt Control Reg. */
-#define PIRQL 0x0700 /* Periodic Interrupt Request Level */
-#define PIV 0x00ff /* Periodic Interrupt Level */
-
-
-
-#define PITR SIM_VOLATILE_USHORT_POINTER(0x24 + SIM_CRB)
- /* Periodic Interrupt Timer Register */
-#define PTP 0x0100 /* Periodic Timer Prescaler Control */
-#define PITM 0x00ff /* Periodic Interrupt Timing Modulus */
-
-
-
-#define SWSR SIM_VOLATILE_UCHAR_POINTER(0x27 + SIM_CRB)
- /* Software Service Register */
-/* write 0x55 then 0xaa to service the software watchdog */
-
-
-
-#define TSTMSRA SIM_VOLATILE_USHORT_POINTER(0x30 + SIM_CRB)
- /* Test Module Master Shift A */
-#define TSTMSRB SIM_VOLATILE_USHORT_POINTER(0x32 + SIM_CRB)
- /* Test Module Master Shift A */
-#define TSTSC SIM_VOLATILE_USHORT_POINTER(0x34 + SIM_CRB)
- /* Test Module Shift Count */
-#define TSTRC SIM_VOLATILE_USHORT_POINTER(0x36 + SIM_CRB)
- /* Test Module Repetition Counter */
-#define CREG SIM_VOLATILE_USHORT_POINTER(0x38 + SIM_CRB)
- /* Test Module Control */
-#define DREG SIM_VOLATILE_USHORT_POINTER(0x3a + SIM_CRB)
- /* Test Module Distributed */
-/* Used only for factor testing */
-
-
-
-#define PORTC SIM_VOLATILE_UCHAR_POINTER(0x41 + SIM_CRB)
- /* Port C Data */
-
-
-
-#define CSPAR0 SIM_VOLATILE_USHORT_POINTER(0x44 + SIM_CRB)
- /* Chip Select Pin Assignment
- Resgister 0 */
-/* CSPAR0 contains seven two-bit fields that determine the functions
- of corresponding chip-select pins. CSPAR0[15:14] are not
- used. These bits always read zero; write have no effect. CSPAR0 bit
- 1 always reads one; writes to CSPAR0 bit 1 have no effect. */
-#define CSPAR1 SIM_VOLATILE_USHORT_POINTER(0x46 + SIM_CRB)
- /* Chip Select Pin Assignment
- Register 1 */
-/* CSPAR1 contains five two-bit fields that determine the finctions of
- corresponding chip-select pins. CSPAR1[15:10] are not used. These
- bits always read zero; writes have no effect. */
-/*
- *
- * Bit Field | Description
- * ------------+---------------
- * 00 | Discrete Output
- * 01 | Alternate Function
- * 10 | Chip Select (8-bit port)
- * 11 | Chip Select (16-bit port)
- */
-#define DisOut 0x0
-#define AltFun 0x1
-#define CS8bit 0x2
-#define CS16bit 0x3
-/*
- *
- * CSPARx Field |Chip Select Signal | Alternate Signal | Discrete Output
- *-----------------+--------------------+--------------------+---------------*/
-#define CS_5 12 /* !CS5 | FC2 | PC2 */
-#define CS_4 10 /* !CS4 | FC1 | PC1 */
-#define CS_3 8 /* !CS3 | FC0 | PC0 */
-#define CS_2 6 /* !CS2 | !BGACK | */
-#define CS_1 4 /* !CS1 | !BG | */
-#define CS_0 2 /* !CS0 | !BR | */
-#define CSBOOT 0 /* !CSBOOT | | */
-/* | | | */
-#define CS_10 8 /* !CS10 | ADDR23 | ECLK */
-#define CS_9 6 /* !CS9 | ADDR22 | PC6 */
-#define CS_8 4 /* !CS8 | ADDR21 | PC5 */
-#define CS_7 2 /* !CS7 | ADDR20 | PC4 */
-#define CS_6 0 /* !CS6 | ADDR19 | PC3 */
-
-#define BS_2K 0x0
-#define BS_8K 0x1
-#define BS_16K 0x2
-#define BS_64K 0x3
-#define BS_128K 0x4
-#define BS_256K 0x5
-#define BS_512K 0x6
-#define BS_1M 0x7
-
-#define CSBARBT SIM_VOLATILE_USHORT_POINTER(0x48 + SIM_CRB)
-#define CSBAR0 SIM_VOLATILE_USHORT_POINTER(0x4c + SIM_CRB)
-#define CSBAR1 SIM_VOLATILE_USHORT_POINTER(0x50 + SIM_CRB)
-#define CSBAR2 SIM_VOLATILE_USHORT_POINTER(0x54 + SIM_CRB)
-#define CSBAR3 SIM_VOLATILE_USHORT_POINTER(0x58 + SIM_CRB)
-#define CSBAR4 SIM_VOLATILE_USHORT_POINTER(0x5c + SIM_CRB)
-#define CSBAR5 SIM_VOLATILE_USHORT_POINTER(0x60 + SIM_CRB)
-#define CSBAR6 SIM_VOLATILE_USHORT_POINTER(0x64 + SIM_CRB)
-#define CSBAR7 SIM_VOLATILE_USHORT_POINTER(0x68 + SIM_CRB)
-#define CSBAR8 SIM_VOLATILE_USHORT_POINTER(0x6c + SIM_CRB)
-#define CSBAR9 SIM_VOLATILE_USHORT_POINTER(0x70 + SIM_CRB)
-#define CSBAR10 SIM_VOLATILE_USHORT_POINTER(0x74 + SIM_CRB)
-
-#define MODE 0x8000
-#define Disable 0
-#define LowerByte 0x2000
-#define UpperByte 0x4000
-#define BothBytes 0x6000
-#define ReadOnly 0x0800
-#define WriteOnly 0x1000
-#define ReadWrite 0x1800
-#define SyncAS 0x0
-#define SyncDS 0x0400
-
-#define WaitStates_0 (0x0 << 6)
-#define WaitStates_1 (0x1 << 6)
-#define WaitStates_2 (0x2 << 6)
-#define WaitStates_3 (0x3 << 6)
-#define WaitStates_4 (0x4 << 6)
-#define WaitStates_5 (0x5 << 6)
-#define WaitStates_6 (0x6 << 6)
-#define WaitStates_7 (0x7 << 6)
-#define WaitStates_8 (0x8 << 6)
-#define WaitStates_9 (0x9 << 6)
-#define WaitStates_10 (0xa << 6)
-#define WaitStates_11 (0xb << 6)
-#define WaitStates_12 (0xc << 6)
-#define WaitStates_13 (0xd << 6)
-#define FastTerm (0xe << 6)
-#define External (0xf << 6)
-
-#define CPUSpace (0x0 << 4)
-#define UserSpace (0x1 << 4)
-#define SupSpace (0x2 << 4)
-#define UserSupSpace (0x3 << 4)
-
-#define IPLevel_any 0x0
-#define IPLevel_1 0x2
-#define IPLevel_2 0x4
-#define IPLevel_3 0x6
-#define IPLevel_4 0x8
-#define IPLevel_5 0xa
-#define IPLevel_6 0xc
-#define IPLevel_7 0xe
-
-#define AVEC 1
-
-#define CSORBT SIM_VOLATILE_USHORT_POINTER(0x4a + SIM_CRB)
-#define CSOR0 SIM_VOLATILE_USHORT_POINTER(0x4e + SIM_CRB)
-#define CSOR1 SIM_VOLATILE_USHORT_POINTER(0x52 + SIM_CRB)
-#define CSOR2 SIM_VOLATILE_USHORT_POINTER(0x56 + SIM_CRB)
-#define CSOR3 SIM_VOLATILE_USHORT_POINTER(0x5a + SIM_CRB)
-#define CSOR4 SIM_VOLATILE_USHORT_POINTER(0x5e + SIM_CRB)
-#define CSOR5 SIM_VOLATILE_USHORT_POINTER(0x62 + SIM_CRB)
-#define CSOR6 SIM_VOLATILE_USHORT_POINTER(0x66 + SIM_CRB)
-#define CSOR7 SIM_VOLATILE_USHORT_POINTER(0x6a + SIM_CRB)
-#define CSOR8 SIM_VOLATILE_USHORT_POINTER(0x6e + SIM_CRB)
-#define CSOR9 SIM_VOLATILE_USHORT_POINTER(0x72 + SIM_CRB)
-#define CSOR10 SIM_VOLATILE_USHORT_POINTER(0x76 + SIM_CRB)
-
-#endif /* _SIM_h_ */
diff --git a/cpukit/score/cpu/mips/Makefile.am b/cpukit/score/cpu/mips/Makefile.am
deleted file mode 100644
index b54cb49ded..0000000000
--- a/cpukit/score/cpu/mips/Makefile.am
+++ /dev/null
@@ -1,49 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-
-SUBDIRS = rtems
-
-C_FILES = cpu.c
-C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
-
-H_FILES = asm.h cpu_asm.h idtcpu.h idtmon.h iregdef.h
-
-S_FILES = cpu_asm.S
-S_O_FILES = $(S_FILES:%.S=$(ARCH)/%.o)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../../../../automake/lib.am
-
-$(PROJECT_INCLUDE):
- $(mkinstalldirs) $@
-
-$(PROJECT_INCLUDE)/%.h: %.h
- $(INSTALL_DATA) $< $@
-
-$(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o: $(ARCH)/rtems.o
- $(INSTALL_DATA) $< $@
-
-REL = $(ARCH)/rtems-cpu.rel
-
-rtems_cpu_rel_OBJECTS = $(C_O_FILES) $(S_O_FILES)
-
-$(REL): $(rtems_cpu_rel_OBJECTS)
- $(make-rel)
-
-PREINSTALL_FILES += $(PROJECT_INCLUDE) $(H_FILES:%=$(PROJECT_INCLUDE)/%)
-
-TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o
-
-all-local: $(ARCH) $(PREINSTALL_FILES) $(rtems_cpu_rel_OBJECTS) $(REL) $(TMPINSTALL_FILES)
-
-.PRECIOUS: $(REL)
-
-EXTRA_DIST = asm.h cpu.c cpu_asm.S cpu_asm.h idtcpu.h idtmon.h iregdef.h \
- rtems.c
-
-include $(top_srcdir)/../../../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/cpukit/score/cpu/mips/asm.h b/cpukit/score/cpu/mips/asm.h
deleted file mode 100644
index 2d322c2339..0000000000
--- a/cpukit/score/cpu/mips/asm.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/* asm.h
- *
- * This include file attempts to address the problems
- * caused by incompatible flavors of assemblers and
- * toolsets. It primarily addresses variations in the
- * use of leading underscores on symbols and the requirement
- * that register names be preceded by a %.
- *
- *
- * NOTE: The spacing in the use of these macros
- * is critical to them working as advertised.
- *
- * COPYRIGHT:
- *
- * This file is based on similar code found in newlib available
- * from ftp.cygnus.com. The file which was used had no copyright
- * notice. This file is freely distributable as long as the source
- * of the file is noted. This file is:
- *
- * COPYRIGHT (c) 1994-1997.
- * On-Line Applications Research Corporation (OAR).
- *
- * $Id$
- */
-/* @(#)asm.h 03/15/96 1.1 */
-
-#ifndef __NO_CPU_ASM_h
-#define __NO_CPU_ASM_h
-
-/*
- * Indicate we are in an assembly file and get the basic CPU definitions.
- */
-
-#ifndef ASM
-#define ASM
-#endif
-#include <rtems/score/targopts.h>
-#include <rtems/score/mips64orion.h>
-
-/*
- * Recent versions of GNU cpp define variables which indicate the
- * need for underscores and percents. If not using GNU cpp or
- * the version does not support this, then you will obviously
- * have to define these as appropriate.
- */
-
-#ifndef __USER_LABEL_PREFIX__
-#define __USER_LABEL_PREFIX__ _
-#endif
-
-#ifndef __REGISTER_PREFIX__
-#define __REGISTER_PREFIX__
-#endif
-
-/* ANSI concatenation macros. */
-
-#define CONCAT1(a, b) CONCAT2(a, b)
-#define CONCAT2(a, b) a ## b
-
-/* Use the right prefix for global labels. */
-
-#define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
-
-/* Use the right prefix for registers. */
-
-#define REG(x) CONCAT1 (__REGISTER_PREFIX__, x)
-
-/*
- * define macros for all of the registers on this CPU
- *
- * EXAMPLE: #define d0 REG (d0)
- */
-
-/*
- * Define macros to handle section beginning and ends.
- */
-
-
-#define BEGIN_CODE_DCL .text
-#define END_CODE_DCL
-#define BEGIN_DATA_DCL .data
-#define END_DATA_DCL
-#define BEGIN_CODE .text
-#define END_CODE
-#define BEGIN_DATA
-#define END_DATA
-#define BEGIN_BSS
-#define END_BSS
-#define END
-
-/*
- * Following must be tailor for a particular flavor of the C compiler.
- * They may need to put underscores in front of the symbols.
- */
-
-#define PUBLIC(sym) .globl SYM (sym)
-#define EXTERN(sym) .globl SYM (sym)
-
-#endif
-/* end of include file */
-
-
diff --git a/cpukit/score/cpu/mips/cpu.c b/cpukit/score/cpu/mips/cpu.c
deleted file mode 100644
index 8d05c336c4..0000000000
--- a/cpukit/score/cpu/mips/cpu.c
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- * Mips CPU Dependent Source
- *
- * Author: Craig Lebakken <craigl@transition.com>
- *
- * COPYRIGHT (c) 1996 by Transition Networks Inc.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Transition Networks not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * Transition Networks makes no representations about the suitability
- * of this software for any purpose.
- *
- * Derived from c/src/exec/score/cpu/no_cpu/cpu.c:
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-/*
- * Rather than deleting this, it is commented out to (hopefully) help
- * the submitter send updates.
- *
- * static char _sccsid[] = "@(#)cpu.c 08/20/96 1.5\n";
- */
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/wkspace.h>
-
-
-ISR_Handler_entry _ISR_Vector_table[ ISR_NUMBER_OF_VECTORS ];
-
-/* _CPU_Initialize
- *
- * This routine performs processor dependent initialization.
- *
- * INPUT PARAMETERS:
- * cpu_table - CPU table to initialize
- * thread_dispatch - address of disptaching routine
- */
-
-
-void null_handler( void )
-{
-}
-
-
-void _CPU_Initialize(
- rtems_cpu_table *cpu_table,
- void (*thread_dispatch) /* ignored on this CPU */
-)
-{
- unsigned int i = ISR_NUMBER_OF_VECTORS;
-
- while ( i-- )
- {
- _ISR_Vector_table[i] = (ISR_Handler_entry)null_handler;
- }
-
- /*
- * The thread_dispatch argument is the address of the entry point
- * for the routine called at the end of an ISR once it has been
- * decided a context switch is necessary. On some compilation
- * systems it is difficult to call a high-level language routine
- * from assembly. This allows us to trick these systems.
- *
- * If you encounter this problem save the entry point in a CPU
- * dependent variable.
- */
-
- _CPU_Thread_dispatch_pointer = thread_dispatch;
-
- /*
- * If there is not an easy way to initialize the FP context
- * during Context_Initialize, then it is usually easier to
- * save an "uninitialized" FP context here and copy it to
- * the task's during Context_Initialize.
- */
-
- /* FP context initialization support goes here */
-
- _CPU_Table = *cpu_table;
-
-}
-
-/*PAGE
- *
- * _CPU_ISR_Get_level
- */
-
-#if 0 /* located in cpu_asm.S */
-unsigned32 _CPU_ISR_Get_level( void )
-{
- /*
- * This routine returns the current interrupt level.
- */
-}
-#endif
-
-/*PAGE
- *
- * _CPU_ISR_install_raw_handler
- */
-
-void _CPU_ISR_install_raw_handler(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-)
-{
- /*
- * This is where we install the interrupt handler into the "raw" interrupt
- * table used by the CPU to dispatch interrupt handlers.
- */
-
-#if 0 /* not necessary */
-/* use IDT/Sim to set interrupt vector. Needed to co-exist with debugger. */
- add_ext_int_func( vector, new_handler );
-#endif
-}
-
-/*PAGE
- *
- * _CPU_ISR_install_vector
- *
- * This kernel routine installs the RTEMS handler for the
- * specified vector.
- *
- * Input parameters:
- * vector - interrupt vector number
- * old_handler - former ISR for this vector number
- * new_handler - replacement ISR for this vector number
- *
- * Output parameters: NONE
- *
- */
-
-void _CPU_ISR_install_vector(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-)
-{
- *old_handler = _ISR_Vector_table[ vector ];
-
- /*
- * If the interrupt vector table is a table of pointer to isr entry
- * points, then we need to install the appropriate RTEMS interrupt
- * handler for this vector number.
- */
-
- _CPU_ISR_install_raw_handler( vector, _ISR_Handler, old_handler );
-
- /*
- * We put the actual user ISR address in '_ISR_vector_table'. This will
- * be used by the _ISR_Handler so the user gets control.
- */
-
- _ISR_Vector_table[ vector ] = new_handler;
-}
-
-/*PAGE
- *
- * _CPU_Install_interrupt_stack
- */
-
-void _CPU_Install_interrupt_stack( void )
-{
-/* we don't support this yet */
-}
-
-/*PAGE
- *
- * _CPU_Internal_threads_Idle_thread_body
- *
- * NOTES:
- *
- * 1. This is the same as the regular CPU independent algorithm.
- *
- * 2. If you implement this using a "halt", "idle", or "shutdown"
- * instruction, then don't forget to put it in an infinite loop.
- *
- * 3. Be warned. Some processors with onboard DMA have been known
- * to stop the DMA if the CPU were put in IDLE mode. This might
- * also be a problem with other on-chip peripherals. So use this
- * hook with caution.
- */
-
-#if 0 /* located in cpu_asm.S */
-void _CPU_Thread_Idle_body( void )
-{
-
- for( ; ; )
- /* insert your "halt" instruction here */ ;
-}
-#endif
-
-extern void mips_break( int error );
-
-#include <stdio.h>
-
-void mips_fatal_error( int error )
-{
- printf("fatal error 0x%x %d\n",error,error);
- mips_break( error );
-}
diff --git a/cpukit/score/cpu/mips/cpu_asm.S b/cpukit/score/cpu/mips/cpu_asm.S
deleted file mode 100644
index 4acebc663e..0000000000
--- a/cpukit/score/cpu/mips/cpu_asm.S
+++ /dev/null
@@ -1,971 +0,0 @@
-/* cpu_asm.S
- *
- * This file contains the basic algorithms for all assembly code used
- * in an specific CPU port of RTEMS. These algorithms must be implemented
- * in assembly language
- *
- * Author: Craig Lebakken <craigl@transition.com>
- *
- * COPYRIGHT (c) 1996 by Transition Networks Inc.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Transition Networks not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * Transition Networks makes no representations about the suitability
- * of this software for any purpose.
- *
- * Derived from c/src/exec/score/cpu/no_cpu/cpu_asm.s:
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-/* @(#)cpu_asm.S 08/20/96 1.15 */
-
-#include "cpu_asm.h"
-
-#include "iregdef.h"
-#include "idtcpu.h"
-
-#define FRAME(name,frm_reg,offset,ret_reg) \
- .globl name; \
- .ent name; \
-name:; \
- .frame frm_reg,offset,ret_reg
-#define ENDFRAME(name) \
- .end name
-
-
-#define EXCP_STACK_SIZE (NREGS*R_SZ)
-
-#if __ghs__
-#define sd sw
-#define ld lw
-#define dmtc0 mtc0
-#define dsll sll
-#define dmfc0 mfc0
-#endif
-
-#if 1 /* 32 bit unsigned32 types */
-#define sint sw
-#define lint lw
-#define stackadd addiu
-#define intadd addu
-#define SZ_INT 4
-#define SZ_INT_POW2 2
-#else /* 64 bit unsigned32 types */
-#define sint dw
-#define lint dw
-#define stackadd daddiu
-#define intadd daddu
-#define SZ_INT 8
-#define SZ_INT_POW2 3
-#endif
-
-#ifdef __GNUC__
-#define EXTERN(x,size) .extern x,size
-#else
-#define EXTERN(x,size)
-#endif
-
-/* NOTE: these constants must match the Context_Control structure in cpu.h */
-#define S0_OFFSET 0
-#define S1_OFFSET 1
-#define S2_OFFSET 2
-#define S3_OFFSET 3
-#define S4_OFFSET 4
-#define S5_OFFSET 5
-#define S6_OFFSET 6
-#define S7_OFFSET 7
-#define SP_OFFSET 8
-#define FP_OFFSET 9
-#define RA_OFFSET 10
-#define C0_SR_OFFSET 11
-#define C0_EPC_OFFSET 12
-
-/* NOTE: these constants must match the Context_Control_fp structure in cpu.h */
-#define FP0_OFFSET 0
-#define FP1_OFFSET 1
-#define FP2_OFFSET 2
-#define FP3_OFFSET 3
-#define FP4_OFFSET 4
-#define FP5_OFFSET 5
-#define FP6_OFFSET 6
-#define FP7_OFFSET 7
-#define FP8_OFFSET 8
-#define FP9_OFFSET 9
-#define FP10_OFFSET 10
-#define FP11_OFFSET 11
-#define FP12_OFFSET 12
-#define FP13_OFFSET 13
-#define FP14_OFFSET 14
-#define FP15_OFFSET 15
-#define FP16_OFFSET 16
-#define FP17_OFFSET 17
-#define FP18_OFFSET 18
-#define FP19_OFFSET 19
-#define FP20_OFFSET 20
-#define FP21_OFFSET 21
-#define FP22_OFFSET 22
-#define FP23_OFFSET 23
-#define FP24_OFFSET 24
-#define FP25_OFFSET 25
-#define FP26_OFFSET 26
-#define FP27_OFFSET 27
-#define FP28_OFFSET 28
-#define FP29_OFFSET 29
-#define FP30_OFFSET 30
-#define FP31_OFFSET 31
-
-
-/*PAGE
- *
- * _CPU_ISR_Get_level
- */
-
-#if 0
-unsigned32 _CPU_ISR_Get_level( void )
-{
- /*
- * This routine returns the current interrupt level.
- */
-}
-#endif
-/* return the current exception level for the 4650 */
-FRAME(_CPU_ISR_Get_level,sp,0,ra)
- mfc0 v0,C0_SR
- nop
- andi v0,SR_EXL
- srl v0,1
- j ra
-ENDFRAME(_CPU_ISR_Get_level)
-
-FRAME(_CPU_ISR_Set_level,sp,0,ra)
- nop
- mfc0 v0,C0_SR
- nop
- andi v0,SR_EXL
- beqz v0,_CPU_ISR_Set_1 /* normalize v0 */
- nop
- li v0,1
-_CPU_ISR_Set_1:
- beq v0,a0,_CPU_ISR_Set_exit /* if (current_level != new_level ) */
- nop
- bnez a0,_CPU_ISR_Set_2
- nop
- nop
- mfc0 t0,C0_SR
- nop
- li t1,~SR_EXL
- and t0,t1
- nop
- mtc0 t0,C0_SR /* disable exception level */
- nop
- j ra
- nop
-_CPU_ISR_Set_2:
- nop
- mfc0 t0,C0_SR
- nop
- li t1,~SR_IE
- and t0,t1
- nop
- mtc0 t0,C0_SR /* first disable ie bit (recommended) */
- nop
- ori t0,SR_EXL|SR_IE /* enable exception level */
- nop
- mtc0 t0,C0_SR
- nop
-_CPU_ISR_Set_exit:
- j ra
- nop
-ENDFRAME(_CPU_ISR_Set_level)
-
-/*
- * _CPU_Context_save_fp_context
- *
- * This routine is responsible for saving the FP context
- * at *fp_context_ptr. If the point to load the FP context
- * from is changed then the pointer is modified by this routine.
- *
- * Sometimes a macro implementation of this is in cpu.h which dereferences
- * the ** and a similarly named routine in this file is passed something
- * like a (Context_Control_fp *). The general rule on making this decision
- * is to avoid writing assembly language.
- */
-
-/* void _CPU_Context_save_fp(
- * void **fp_context_ptr
- * )
- * {
- * }
- */
-
-FRAME(_CPU_Context_save_fp,sp,0,ra)
- .set noat
- ld a1,(a0)
- swc1 $f0,FP0_OFFSET*4(a1)
- swc1 $f1,FP1_OFFSET*4(a1)
- swc1 $f2,FP2_OFFSET*4(a1)
- swc1 $f3,FP3_OFFSET*4(a1)
- swc1 $f4,FP4_OFFSET*4(a1)
- swc1 $f5,FP5_OFFSET*4(a1)
- swc1 $f6,FP6_OFFSET*4(a1)
- swc1 $f7,FP7_OFFSET*4(a1)
- swc1 $f8,FP8_OFFSET*4(a1)
- swc1 $f9,FP9_OFFSET*4(a1)
- swc1 $f10,FP10_OFFSET*4(a1)
- swc1 $f11,FP11_OFFSET*4(a1)
- swc1 $f12,FP12_OFFSET*4(a1)
- swc1 $f13,FP13_OFFSET*4(a1)
- swc1 $f14,FP14_OFFSET*4(a1)
- swc1 $f15,FP15_OFFSET*4(a1)
- swc1 $f16,FP16_OFFSET*4(a1)
- swc1 $f17,FP17_OFFSET*4(a1)
- swc1 $f18,FP18_OFFSET*4(a1)
- swc1 $f19,FP19_OFFSET*4(a1)
- swc1 $f20,FP20_OFFSET*4(a1)
- swc1 $f21,FP21_OFFSET*4(a1)
- swc1 $f22,FP22_OFFSET*4(a1)
- swc1 $f23,FP23_OFFSET*4(a1)
- swc1 $f24,FP24_OFFSET*4(a1)
- swc1 $f25,FP25_OFFSET*4(a1)
- swc1 $f26,FP26_OFFSET*4(a1)
- swc1 $f27,FP27_OFFSET*4(a1)
- swc1 $f28,FP28_OFFSET*4(a1)
- swc1 $f29,FP29_OFFSET*4(a1)
- swc1 $f30,FP30_OFFSET*4(a1)
- swc1 $f31,FP31_OFFSET*4(a1)
- j ra
- nop
- .set at
-ENDFRAME(_CPU_Context_save_fp)
-
-/*
- * _CPU_Context_restore_fp_context
- *
- * This routine is responsible for restoring the FP context
- * at *fp_context_ptr. If the point to load the FP context
- * from is changed then the pointer is modified by this routine.
- *
- * Sometimes a macro implementation of this is in cpu.h which dereferences
- * the ** and a similarly named routine in this file is passed something
- * like a (Context_Control_fp *). The general rule on making this decision
- * is to avoid writing assembly language.
- */
-
-/* void _CPU_Context_restore_fp(
- * void **fp_context_ptr
- * )
- * {
- * }
- */
-
-FRAME(_CPU_Context_restore_fp,sp,0,ra)
- .set noat
- ld a1,(a0)
- lwc1 $f0,FP0_OFFSET*4(a1)
- lwc1 $f1,FP1_OFFSET*4(a1)
- lwc1 $f2,FP2_OFFSET*4(a1)
- lwc1 $f3,FP3_OFFSET*4(a1)
- lwc1 $f4,FP4_OFFSET*4(a1)
- lwc1 $f5,FP5_OFFSET*4(a1)
- lwc1 $f6,FP6_OFFSET*4(a1)
- lwc1 $f7,FP7_OFFSET*4(a1)
- lwc1 $f8,FP8_OFFSET*4(a1)
- lwc1 $f9,FP9_OFFSET*4(a1)
- lwc1 $f10,FP10_OFFSET*4(a1)
- lwc1 $f11,FP11_OFFSET*4(a1)
- lwc1 $f12,FP12_OFFSET*4(a1)
- lwc1 $f13,FP13_OFFSET*4(a1)
- lwc1 $f14,FP14_OFFSET*4(a1)
- lwc1 $f15,FP15_OFFSET*4(a1)
- lwc1 $f16,FP16_OFFSET*4(a1)
- lwc1 $f17,FP17_OFFSET*4(a1)
- lwc1 $f18,FP18_OFFSET*4(a1)
- lwc1 $f19,FP19_OFFSET*4(a1)
- lwc1 $f20,FP20_OFFSET*4(a1)
- lwc1 $f21,FP21_OFFSET*4(a1)
- lwc1 $f22,FP22_OFFSET*4(a1)
- lwc1 $f23,FP23_OFFSET*4(a1)
- lwc1 $f24,FP24_OFFSET*4(a1)
- lwc1 $f25,FP25_OFFSET*4(a1)
- lwc1 $f26,FP26_OFFSET*4(a1)
- lwc1 $f27,FP27_OFFSET*4(a1)
- lwc1 $f28,FP28_OFFSET*4(a1)
- lwc1 $f29,FP29_OFFSET*4(a1)
- lwc1 $f30,FP30_OFFSET*4(a1)
- lwc1 $f31,FP31_OFFSET*4(a1)
- j ra
- nop
- .set at
-ENDFRAME(_CPU_Context_restore_fp)
-
-/* _CPU_Context_switch
- *
- * This routine performs a normal non-FP context switch.
- */
-
-/* void _CPU_Context_switch(
- * Context_Control *run,
- * Context_Control *heir
- * )
- * {
- * }
- */
-
-FRAME(_CPU_Context_switch,sp,0,ra)
-
- mfc0 t0,C0_SR
- li t1,~SR_IE
- sd t0,C0_SR_OFFSET*8(a0) /* save status register */
- and t0,t1
- mtc0 t0,C0_SR /* first disable ie bit (recommended) */
- ori t0,SR_EXL|SR_IE /* enable exception level to disable interrupts */
- mtc0 t0,C0_SR
-
- sd ra,RA_OFFSET*8(a0) /* save current context */
- sd sp,SP_OFFSET*8(a0)
- sd fp,FP_OFFSET*8(a0)
- sd s0,S0_OFFSET*8(a0)
- sd s1,S1_OFFSET*8(a0)
- sd s2,S2_OFFSET*8(a0)
- sd s3,S3_OFFSET*8(a0)
- sd s4,S4_OFFSET*8(a0)
- sd s5,S5_OFFSET*8(a0)
- sd s6,S6_OFFSET*8(a0)
- sd s7,S7_OFFSET*8(a0)
- dmfc0 t0,C0_EPC
- sd t0,C0_EPC_OFFSET*8(a0)
-
-_CPU_Context_switch_restore:
- ld s0,S0_OFFSET*8(a1) /* restore context */
- ld s1,S1_OFFSET*8(a1)
- ld s2,S2_OFFSET*8(a1)
- ld s3,S3_OFFSET*8(a1)
- ld s4,S4_OFFSET*8(a1)
- ld s5,S5_OFFSET*8(a1)
- ld s6,S6_OFFSET*8(a1)
- ld s7,S7_OFFSET*8(a1)
- ld fp,FP_OFFSET*8(a1)
- ld sp,SP_OFFSET*8(a1)
- ld ra,RA_OFFSET*8(a1)
- ld t0,C0_EPC_OFFSET*8(a1)
- dmtc0 t0,C0_EPC
- ld t0,C0_SR_OFFSET*8(a1)
- andi t0,SR_EXL
- bnez t0,_CPU_Context_1 /* set exception level from restore context */
- li t0,~SR_EXL
- mfc0 t1,C0_SR
- nop
- and t1,t0
- mtc0 t1,C0_SR
-_CPU_Context_1:
- j ra
- nop
-ENDFRAME(_CPU_Context_switch)
-
-/*
- * _CPU_Context_restore
- *
- * This routine is generally used only to restart self in an
- * efficient manner. It may simply be a label in _CPU_Context_switch.
- *
- * NOTE: May be unnecessary to reload some registers.
- */
-
-#if 0
-void _CPU_Context_restore(
- Context_Control *new_context
-)
-{
-}
-#endif
-
-FRAME(_CPU_Context_restore,sp,0,ra)
- dadd a1,a0,zero
- j _CPU_Context_switch_restore
- nop
-ENDFRAME(_CPU_Context_restore)
-
-EXTERN(_ISR_Nest_level, SZ_INT)
-EXTERN(_Thread_Dispatch_disable_level,SZ_INT)
-EXTERN(_Context_Switch_necessary,SZ_INT)
-EXTERN(_ISR_Signals_to_thread_executing,SZ_INT)
-.extern _Thread_Dispatch
-.extern _ISR_Vector_table
-
-/* void __ISR_Handler()
- *
- * This routine provides the RTEMS interrupt management.
- *
- */
-
-#if 0
-void _ISR_Handler()
-{
- /*
- * This discussion ignores a lot of the ugly details in a real
- * implementation such as saving enough registers/state to be
- * able to do something real. Keep in mind that the goal is
- * to invoke a user's ISR handler which is written in C and
- * uses a certain set of registers.
- *
- * Also note that the exact order is to a large extent flexible.
- * Hardware will dictate a sequence for a certain subset of
- * _ISR_Handler while requirements for setting
- */
-
- /*
- * At entry to "common" _ISR_Handler, the vector number must be
- * available. On some CPUs the hardware puts either the vector
- * number or the offset into the vector table for this ISR in a
- * known place. If the hardware does not give us this information,
- * then the assembly portion of RTEMS for this port will contain
- * a set of distinct interrupt entry points which somehow place
- * the vector number in a known place (which is safe if another
- * interrupt nests this one) and branches to _ISR_Handler.
- *
- */
-#endif
-FRAME(_ISR_Handler,sp,0,ra)
-.set noreorder
-#if USE_IDTKIT
-/* IDT/Kit incorrectly adds 4 to EPC before returning. This compensates */
- lreg k0, R_EPC*R_SZ(sp)
- daddiu k0,k0,-4
- sreg k0, R_EPC*R_SZ(sp)
- lreg k0, R_CAUSE*R_SZ(sp)
- li k1, ~CAUSE_BD
- and k0, k1
- sreg k0, R_CAUSE*R_SZ(sp)
-#endif
-
-/* save registers not already saved by IDT/sim */
- stackadd sp,sp,-EXCP_STACK_SIZE /* store ra on the stack */
-
- sreg ra, R_RA*R_SZ(sp)
- sreg v0, R_V0*R_SZ(sp)
- sreg v1, R_V1*R_SZ(sp)
- sreg a0, R_A0*R_SZ(sp)
- sreg a1, R_A1*R_SZ(sp)
- sreg a2, R_A2*R_SZ(sp)
- sreg a3, R_A3*R_SZ(sp)
- sreg t0, R_T0*R_SZ(sp)
- sreg t1, R_T1*R_SZ(sp)
- sreg t2, R_T2*R_SZ(sp)
- sreg t3, R_T3*R_SZ(sp)
- sreg t4, R_T4*R_SZ(sp)
- sreg t5, R_T5*R_SZ(sp)
- sreg t6, R_T6*R_SZ(sp)
- sreg t7, R_T7*R_SZ(sp)
- mflo k0
- sreg t8, R_T8*R_SZ(sp)
- sreg k0, R_MDLO*R_SZ(sp)
- sreg t9, R_T9*R_SZ(sp)
- mfhi k0
- sreg gp, R_GP*R_SZ(sp)
- sreg fp, R_FP*R_SZ(sp)
- sreg k0, R_MDHI*R_SZ(sp)
- .set noat
- sreg AT, R_AT*R_SZ(sp)
- .set at
-
- stackadd sp,sp,-40 /* store ra on the stack */
- sd ra,32(sp)
-
-/* determine if an interrupt generated this exception */
- mfc0 k0,C0_CAUSE
- and k1,k0,CAUSE_EXCMASK
- bnez k1,_ISR_Handler_prom_exit /* not an external interrupt, pass exception to Monitor */
- mfc0 k1,C0_SR
- and k0,k1
- and k0,CAUSE_IPMASK
- beq k0,zero,_ISR_Handler_quick_exit /* external interrupt not enabled, ignore */
- nop
-
- /*
- * save some or all context on stack
- * may need to save some special interrupt information for exit
- *
- * #if ( CPU_HAS_SOFTWARE_INTERRUPT_STACK == TRUE )
- * if ( _ISR_Nest_level == 0 )
- * switch to software interrupt stack
- * #endif
- */
-#if ( CPU_HAS_SOFTWARE_INTERRUPT_STACK == TRUE )
- lint t0,_ISR_Nest_level
- beq t0, zero, _ISR_Handler_1
- nop
- /* switch stacks */
-_ISR_Handler_1:
-#else
- lint t0,_ISR_Nest_level
-#endif
- /*
- * _ISR_Nest_level++;
- */
- addi t0,t0,1
- sint t0,_ISR_Nest_level
- /*
- * _Thread_Dispatch_disable_level++;
- */
- lint t1,_Thread_Dispatch_disable_level
- addi t1,t1,1
- sint t1,_Thread_Dispatch_disable_level
-#if 0
- nop
- j _ISR_Handler_4
- nop
- /*
- * while ( interrupts_pending(cause_reg) ) {
- * vector = BITFIELD_TO_INDEX(cause_reg);
- * (*_ISR_Vector_table[ vector ])( vector );
- * }
- */
-_ISR_Handler_2:
-/* software interrupt priorities can be applied here */
- li t1,-1
-/* convert bit field into interrupt index */
-_ISR_Handler_3:
- andi t2,t0,1
- addi t1,1
- beql t2,zero,_ISR_Handler_3
- dsrl t0,1
- li t1,7
- dsll t1,3 /* convert index to byte offset (*8) */
- la t3,_ISR_Vector_table
- intadd t1,t3
- lint t1,(t1)
- jalr t1
- nop
- j _ISR_Handler_5
- nop
-_ISR_Handler_4:
- mfc0 t0,C0_CAUSE
- andi t0,CAUSE_IPMASK
- bne t0,zero,_ISR_Handler_2
- dsrl t0,t0,8
-_ISR_Handler_5:
-#else
- nop
- li t1,7
- dsll t1,t1,SZ_INT_POW2
- la t3,_ISR_Vector_table
- intadd t1,t3
- lint t1,(t1)
- jalr t1
- nop
-#endif
- /*
- * --_ISR_Nest_level;
- */
- lint t2,_ISR_Nest_level
- addi t2,t2,-1
- sint t2,_ISR_Nest_level
- /*
- * --_Thread_Dispatch_disable_level;
- */
- lint t1,_Thread_Dispatch_disable_level
- addi t1,t1,-1
- sint t1,_Thread_Dispatch_disable_level
- /*
- * if ( _Thread_Dispatch_disable_level || _ISR_Nest_level )
- * goto the label "exit interrupt (simple case)"
- */
- or t0,t2,t1
- bne t0,zero,_ISR_Handler_exit
- nop
- /*
- * #if ( CPU_HAS_SOFTWARE_INTERRUPT_STACK == TRUE )
- * restore stack
- * #endif
- *
- * if ( !_Context_Switch_necessary && !_ISR_Signals_to_thread_executing )
- * goto the label "exit interrupt (simple case)"
- */
- lint t0,_Context_Switch_necessary
- lint t1,_ISR_Signals_to_thread_executing
- or t0,t0,t1
- beq t0,zero,_ISR_Handler_exit
- nop
-
- /*
- * call _Thread_Dispatch() or prepare to return to _ISR_Dispatch
- */
- jal _Thread_Dispatch
- nop
- /*
- * prepare to get out of interrupt
- * return from interrupt (maybe to _ISR_Dispatch)
- *
- * LABEL "exit interrupt (simple case):
- * prepare to get out of interrupt
- * return from interrupt
- */
-_ISR_Handler_exit:
- ld ra,32(sp)
- stackadd sp,sp,40
-
-/* restore interrupt context from stack */
- lreg k0, R_MDLO*R_SZ(sp)
- mtlo k0
- lreg k0, R_MDHI*R_SZ(sp)
- lreg a2, R_A2*R_SZ(sp)
- mthi k0
- lreg a3, R_A3*R_SZ(sp)
- lreg t0, R_T0*R_SZ(sp)
- lreg t1, R_T1*R_SZ(sp)
- lreg t2, R_T2*R_SZ(sp)
- lreg t3, R_T3*R_SZ(sp)
- lreg t4, R_T4*R_SZ(sp)
- lreg t5, R_T5*R_SZ(sp)
- lreg t6, R_T6*R_SZ(sp)
- lreg t7, R_T7*R_SZ(sp)
- lreg t8, R_T8*R_SZ(sp)
- lreg t9, R_T9*R_SZ(sp)
- lreg gp, R_GP*R_SZ(sp)
- lreg fp, R_FP*R_SZ(sp)
- lreg ra, R_RA*R_SZ(sp)
- lreg a0, R_A0*R_SZ(sp)
- lreg a1, R_A1*R_SZ(sp)
- lreg v1, R_V1*R_SZ(sp)
- lreg v0, R_V0*R_SZ(sp)
- .set noat
- lreg AT, R_AT*R_SZ(sp)
- .set at
-
- stackadd sp,sp,EXCP_STACK_SIZE /* store ra on the stack */
-
-#if USE_IDTKIT
-/* we handled exception, so return non-zero value */
- li v0,1
-#endif
-
-_ISR_Handler_quick_exit:
-#ifdef USE_IDTKIT
- j ra
-#else
- eret
-#endif
- nop
-
-_ISR_Handler_prom_exit:
-#ifdef CPU_R3000
- la k0, (R_VEC+((48)*8))
-#endif
-
-#ifdef CPU_R4000
- la k0, (R_VEC+((112)*8)) /* R4000 Sim's location is different */
-#endif
- j k0
- nop
-
- .set reorder
-
-ENDFRAME(_ISR_Handler)
-
-
-FRAME(mips_enable_interrupts,sp,0,ra)
- mfc0 t0,C0_SR /* get status reg */
- nop
- or t0,t0,a0
- mtc0 t0,C0_SR /* save updated status reg */
- j ra
- nop
-ENDFRAME(mips_enable_interrupts)
-
-FRAME(mips_disable_interrupts,sp,0,ra)
- mfc0 v0,C0_SR /* get status reg */
- li t1,SR_IMASK /* t1 = load interrupt mask word */
- not t0,t1 /* t0 = ~t1 */
- and t0,v0 /* clear imask bits */
- mtc0 t0,C0_SR /* save status reg */
- and v0,t1 /* mask return value (only return imask bits) */
- jr ra
- nop
-ENDFRAME(mips_disable_interrupts)
-
-FRAME(mips_enable_global_interrupts,sp,0,ra)
- mfc0 t0,C0_SR /* get status reg */
- nop
- ori t0,SR_IE
- mtc0 t0,C0_SR /* save updated status reg */
- j ra
- nop
-ENDFRAME(mips_enable_global_interrupts)
-
-FRAME(mips_disable_global_interrupts,sp,0,ra)
- li t1,SR_IE
- mfc0 t0,C0_SR /* get status reg */
- not t1
- and t0,t1
- mtc0 t0,C0_SR /* save updated status reg */
- j ra
- nop
-ENDFRAME(mips_disable_global_interrupts)
-
-/* return the value of the status register in v0. Used for debugging */
-FRAME(mips_get_sr,sp,0,ra)
- mfc0 v0,C0_SR
- j ra
- nop
-ENDFRAME(mips_get_sr)
-
-FRAME(mips_break,sp,0,ra)
-#if 1
- break 0x0
- j mips_break
-#else
- j ra
-#endif
- nop
-ENDFRAME(mips_break)
-
-/*PAGE
- *
- * _CPU_Internal_threads_Idle_thread_body
- *
- * NOTES:
- *
- * 1. This is the same as the regular CPU independent algorithm.
- *
- * 2. If you implement this using a "halt", "idle", or "shutdown"
- * instruction, then don't forget to put it in an infinite loop.
- *
- * 3. Be warned. Some processors with onboard DMA have been known
- * to stop the DMA if the CPU were put in IDLE mode. This might
- * also be a problem with other on-chip peripherals. So use this
- * hook with caution.
- */
-
-FRAME(_CPU_Thread_Idle_body,sp,0,ra)
- wait /* enter low power mode */
- j _CPU_Thread_Idle_body
- nop
-ENDFRAME(_CPU_Thread_Idle_body)
-
-#define VEC_CODE_LENGTH 10*4
-
-/**************************************************************************
-**
-** init_exc_vecs() - moves the exception code into the addresses
-** reserved for exception vectors
-**
-** UTLB Miss exception vector at address 0x80000000
-**
-** General exception vector at address 0x80000080
-**
-** RESET exception vector is at address 0xbfc00000
-**
-***************************************************************************/
-
-#define INITEXCFRM ((2*4)+4) /* ra + 2 arguments */
-FRAME(init_exc_vecs,sp,0,ra)
-/* This code yanked from SIM */
-#if defined(CPU_R3000)
- .set noreorder
- la t1,exc_utlb_code
- la t2,exc_norm_code
- li t3,UT_VEC
- li t4,E_VEC
- li t5,VEC_CODE_LENGTH
-1:
- lw t6,0(t1)
- lw t7,0(t2)
- sw t6,0(t3)
- sw t7,0(t4)
- addiu t1,4
- addiu t3,4
- addiu t4,4
- subu t5,4
- bne t5,zero,1b
- addiu t2,4
- move t5,ra # assumes clear_cache doesnt use t5
- li a0,UT_VEC
- jal clear_cache
- li a1,VEC_CODE_LENGTH
- nop
- li a0,E_VEC
- jal clear_cache
- li a1,VEC_CODE_LENGTH
- move ra,t5 # restore ra
- j ra
- nop
- .set reorder
-#endif
-#if defined(CPU_R4000)
- .set reorder
- move t5,ra # assumes clear_cache doesnt use t5
-
- /* TLB exception vector */
- la t1,exc_tlb_code
- li t2,T_VEC |K1BASE
- li t3,VEC_CODE_LENGTH
-1:
- lw t6,0(t1)
- addiu t1,4
- subu t3,4
- sw t6,0(t2)
- addiu t2,4
- bne t3,zero,1b
-
- li a0,T_VEC
- li a1,VEC_CODE_LENGTH
- jal clear_cache
-
- la t1,exc_xtlb_code
- li t2,X_VEC |K1BASE
- li t3,VEC_CODE_LENGTH
-1:
- lw t6,0(t1)
- addiu t1,4
- subu t3,4
- sw t6,0(t2)
- addiu t2,4
- bne t3,zero,1b
-
- /* extended TLB exception vector */
- li a0,X_VEC
- li a1,VEC_CODE_LENGTH
- jal clear_cache
-
- /* cache error exception vector */
- la t1,exc_cache_code
- li t2,C_VEC |K1BASE
- li t3,VEC_CODE_LENGTH
-1:
- lw t6,0(t1)
- addiu t1,4
- subu t3,4
- sw t6,0(t2)
- addiu t2,4
- bne t3,zero,1b
-
- li a0,C_VEC
- li a1,VEC_CODE_LENGTH
- jal clear_cache
-
- /* normal exception vector */
- la t1,exc_norm_code
- li t2,E_VEC |K1BASE
- li t3,VEC_CODE_LENGTH
-1:
- lw t6,0(t1)
- addiu t1,4
- subu t3,4
- sw t6,0(t2)
- addiu t2,4
- bne t3,zero,1b
-
- li a0,E_VEC
- li a1,VEC_CODE_LENGTH
- jal clear_cache
-
- move ra,t5 # restore ra
- j ra
-#endif
-ENDFRAME(init_exc_vecs)
-
-
-#if defined(CPU_R4000)
-FRAME(exc_tlb_code,sp,0,ra)
-#ifdef CPU_R3000
- la k0, (R_VEC+((48)*8))
-#endif
-
-#ifdef CPU_R4000
- la k0, (R_VEC+((112)*8)) /* R4000 Sim's location is different */
-#endif
- j k0
- nop
-
-ENDFRAME(exc_tlb_code)
-
-
-FRAME(exc_xtlb_code,sp,0,ra)
-#ifdef CPU_R3000
- la k0, (R_VEC+((48)*8))
-#endif
-
-#ifdef CPU_R4000
- la k0, (R_VEC+((112)*8)) /* R4000 Sim's location is different */
-#endif
- j k0
- nop
-
-ENDFRAME(exc_xtlb_code)
-
-
-FRAME(exc_cache_code,sp,0,ra)
-#ifdef CPU_R3000
- la k0, (R_VEC+((48)*8))
-#endif
-
-#ifdef CPU_R4000
- la k0, (R_VEC+((112)*8)) /* R4000 Sim's location is different */
-#endif
- j k0
- nop
-
-ENDFRAME(exc_cache_code)
-
-
-FRAME(exc_norm_code,sp,0,ra)
- la k0, _ISR_Handler /* generic external int hndlr */
- j k0
- nop
- subu sp, EXCP_STACK_SIZE /* set up local stack frame */
-ENDFRAME(exc_norm_code)
-#endif
-
-/**************************************************************************
-**
-** enable_int(mask) - enables interrupts - mask is positioned so it only
-** needs to be or'ed into the status reg. This
-** also does some other things !!!! caution should
-** be used if invoking this while in the middle
-** of a debugging session where the client may have
-** nested interrupts.
-**
-****************************************************************************/
-FRAME(enable_int,sp,0,ra)
- .set noreorder
- mfc0 t0,C0_SR
- or a0,1
- or t0,a0
- mtc0 t0,C0_SR
- j ra
- nop
- .set reorder
-ENDFRAME(enable_int)
-
-
-/***************************************************************************
-**
-** disable_int(mask) - disable the interrupt - mask is the complement
-** of the bits to be cleared - i.e. to clear ext int
-** 5 the mask would be - 0xffff7fff
-**
-****************************************************************************/
-FRAME(disable_int,sp,0,ra)
- .set noreorder
- mfc0 t0,C0_SR
- nop
- and t0,a0
- mtc0 t0,C0_SR
- j ra
- nop
-ENDFRAME(disable_int)
-
-
diff --git a/cpukit/score/cpu/mips/idtcpu.h b/cpukit/score/cpu/mips/idtcpu.h
deleted file mode 100644
index f921e85ef6..0000000000
--- a/cpukit/score/cpu/mips/idtcpu.h
+++ /dev/null
@@ -1,440 +0,0 @@
-/*
-
-Based upon IDT provided code with the following release:
-
-This source code has been made available to you by IDT on an AS-IS
-basis. Anyone receiving this source is licensed under IDT copyrights
-to use it in any way he or she deems fit, including copying it,
-modifying it, compiling it, and redistributing it either with or
-without modifications. No license under IDT patents or patent
-applications is to be implied by the copyright license.
-
-Any user of this software should understand that IDT cannot provide
-technical support for this software and will not be responsible for
-any consequences resulting from the use of this software.
-
-Any person who transfers this source code or any derivative work must
-include the IDT copyright notice, this paragraph, and the preceeding
-two paragraphs in the transferred software.
-
-COPYRIGHT IDT CORPORATION 1996
-LICENSED MATERIAL - PROGRAM PROPERTY OF IDT
-
- $Id$
-*/
-
-/*
-** idtcpu.h -- cpu related defines
-*/
-
-#ifndef _IDTCPU_H__
-#define _IDTCPU_H__
-
-/*
- * 950313: Ketan added Register definition for XContext reg.
- * added define for WAIT instruction.
- * 950421: Ketan added Register definition for Config reg (R3081)
- */
-
-/*
-** memory configuration and mapping
-*/
-#define K0BASE 0x80000000
-#define K0SIZE 0x20000000
-#define K1BASE 0xa0000000
-#define K1SIZE 0x20000000
-#define K2BASE 0xc0000000
-#define K2SIZE 0x20000000
-#if defined(CPU_R4000)
-#define KSBASE 0xe0000000
-#define KSSIZE 0x20000000
-#endif
-
-#define KUBASE 0
-#define KUSIZE 0x80000000
-
-/*
-** Exception Vectors
-*/
-#if defined(CPU_R3000)
-#define UT_VEC K0BASE /* utlbmiss vector */
-#define E_VEC (K0BASE+0x80) /* exception vevtor */
-#endif
-#if defined(CPU_R4000)
-#define T_VEC (K0BASE+0x000) /* tlbmiss vector */
-#define X_VEC (K0BASE+0x080) /* xtlbmiss vector */
-#define C_VEC (K0BASE+0x100) /* cache error vector */
-#define E_VEC (K0BASE+0x180) /* exception vector */
-#endif
-#define R_VEC (K1BASE+0x1fc00000) /* reset vector */
-
-/*
-** Address conversion macros
-*/
-#ifdef CLANGUAGE
-#define CAST(as) (as)
-#else
-#define CAST(as)
-#endif
-#define K0_TO_K1(x) (CAST(unsigned)(x)|0xA0000000) /* kseg0 to kseg1 */
-#define K1_TO_K0(x) (CAST(unsigned)(x)&0x9FFFFFFF) /* kseg1 to kseg0 */
-#define K0_TO_PHYS(x) (CAST(unsigned)(x)&0x1FFFFFFF) /* kseg0 to physical */
-#define K1_TO_PHYS(x) (CAST(unsigned)(x)&0x1FFFFFFF) /* kseg1 to physical */
-#define PHYS_TO_K0(x) (CAST(unsigned)(x)|0x80000000) /* physical to kseg0 */
-#define PHYS_TO_K1(x) (CAST(unsigned)(x)|0xA0000000) /* physical to kseg1 */
-
-/*
-** Cache size constants
-*/
-#define MINCACHE 0x200 /* 512 For 3041. */
-#define MAXCACHE 0x40000 /* 256*1024 256k */
-
-#if defined(CPU_R4000)
-/* R4000 configuration register definitions */
-#define CFG_CM 0x80000000 /* Master-Checker mode */
-#define CFG_ECMASK 0x70000000 /* System Clock Ratio */
-#define CFG_ECBY2 0x00000000 /* divide by 2 */
-#define CFG_ECBY3 0x10000000 /* divide by 3 */
-#define CFG_ECBY4 0x20000000 /* divide by 4 */
-#define CFG_EPMASK 0x0f000000 /* Transmit data pattern */
-#define CFG_EPD 0x00000000 /* D */
-#define CFG_EPDDX 0x01000000 /* DDX */
-#define CFG_EPDDXX 0x02000000 /* DDXX */
-#define CFG_EPDXDX 0x03000000 /* DXDX */
-#define CFG_EPDDXXX 0x04000000 /* DDXXX */
-#define CFG_EPDDXXXX 0x05000000 /* DDXXXX */
-#define CFG_EPDXXDXX 0x06000000 /* DXXDXX */
-#define CFG_EPDDXXXXX 0x07000000 /* DDXXXXX */
-#define CFG_EPDXXXDXXX 0x08000000 /* DXXXDXXX */
-#define CFG_SBMASK 0x00c00000 /* Secondary cache block size */
-#define CFG_SBSHIFT 22
-#define CFG_SB4 0x00000000 /* 4 words */
-#define CFG_SB8 0x00400000 /* 8 words */
-#define CFG_SB16 0x00800000 /* 16 words */
-#define CFG_SB32 0x00c00000 /* 32 words */
-#define CFG_SS 0x00200000 /* Split secondary cache */
-#define CFG_SW 0x00100000 /* Secondary cache port width */
-#define CFG_EWMASK 0x000c0000 /* System port width */
-#define CFG_EWSHIFT 18
-#define CFG_EW64 0x00000000 /* 64 bit */
-#define CFG_EW32 0x00010000 /* 32 bit */
-#define CFG_SC 0x00020000 /* Secondary cache absent */
-#define CFG_SM 0x00010000 /* Dirty Shared mode disabled */
-#define CFG_BE 0x00008000 /* Big Endian */
-#define CFG_EM 0x00004000 /* ECC mode enable */
-#define CFG_EB 0x00002000 /* Block ordering */
-#define CFG_ICMASK 0x00000e00 /* Instruction cache size */
-#define CFG_ICSHIFT 9
-#define CFG_DCMASK 0x000001c0 /* Data cache size */
-#define CFG_DCSHIFT 6
-#define CFG_IB 0x00000020 /* Instruction cache block size */
-#define CFG_DB 0x00000010 /* Data cache block size */
-#define CFG_CU 0x00000008 /* Update on Store Conditional */
-#define CFG_K0MASK 0x00000007 /* KSEG0 coherency algorithm */
-
-/*
- * R4000 primary cache mode
- */
-#define CFG_C_UNCACHED 2
-#define CFG_C_NONCOHERENT 3
-#define CFG_C_COHERENTXCL 4
-#define CFG_C_COHERENTXCLW 5
-#define CFG_C_COHERENTUPD 6
-
-/*
- * R4000 cache operations (should be in assembler...?)
- */
-#define Index_Invalidate_I 0x0 /* 0 0 */
-#define Index_Writeback_Inv_D 0x1 /* 0 1 */
-#define Index_Invalidate_SI 0x2 /* 0 2 */
-#define Index_Writeback_Inv_SD 0x3 /* 0 3 */
-#define Index_Load_Tag_I 0x4 /* 1 0 */
-#define Index_Load_Tag_D 0x5 /* 1 1 */
-#define Index_Load_Tag_SI 0x6 /* 1 2 */
-#define Index_Load_Tag_SD 0x7 /* 1 3 */
-#define Index_Store_Tag_I 0x8 /* 2 0 */
-#define Index_Store_Tag_D 0x9 /* 2 1 */
-#define Index_Store_Tag_SI 0xA /* 2 2 */
-#define Index_Store_Tag_SD 0xB /* 2 3 */
-#define Create_Dirty_Exc_D 0xD /* 3 1 */
-#define Create_Dirty_Exc_SD 0xF /* 3 3 */
-#define Hit_Invalidate_I 0x10 /* 4 0 */
-#define Hit_Invalidate_D 0x11 /* 4 1 */
-#define Hit_Invalidate_SI 0x12 /* 4 2 */
-#define Hit_Invalidate_SD 0x13 /* 4 3 */
-#define Hit_Writeback_Inv_D 0x15 /* 5 1 */
-#define Hit_Writeback_Inv_SD 0x17 /* 5 3 */
-#define Fill_I 0x14 /* 5 0 */
-#define Hit_Writeback_D 0x19 /* 6 1 */
-#define Hit_Writeback_SD 0x1B /* 6 3 */
-#define Hit_Writeback_I 0x18 /* 6 0 */
-#define Hit_Set_Virtual_SI 0x1E /* 7 2 */
-#define Hit_Set_Virtual_SD 0x1F /* 7 3 */
-
-#ifndef WAIT
-#define WAIT .word 0x42000020
-#endif WAIT
-
-#ifndef wait
-#define wait .word 0x42000020
-#endif wait
-
-#endif
-
-/*
-** TLB resource defines
-*/
-#if defined(CPU_R3000)
-#define N_TLB_ENTRIES 64
-#define TLB_PGSIZE 0x1000
-#define RANDBASE 8
-#define TLBLO_PFNMASK 0xfffff000
-#define TLBLO_PFNSHIFT 12
-#define TLBLO_N 0x800 /* non-cacheable */
-#define TLBLO_D 0x400 /* writeable */
-#define TLBLO_V 0x200 /* valid bit */
-#define TLBLO_G 0x100 /* global access bit */
-
-#define TLBHI_VPNMASK 0xfffff000
-#define TLBHI_VPNSHIFT 12
-#define TLBHI_PIDMASK 0xfc0
-#define TLBHI_PIDSHIFT 6
-#define TLBHI_NPID 64
-
-#define TLBINX_PROBE 0x80000000
-#define TLBINX_INXMASK 0x00003f00
-#define TLBINX_INXSHIFT 8
-
-#define TLBRAND_RANDMASK 0x00003f00
-#define TLBRAND_RANDSHIFT 8
-
-#define TLBCTXT_BASEMASK 0xffe00000
-#define TLBCTXT_BASESHIFT 21
-
-#define TLBCTXT_VPNMASK 0x001ffffc
-#define TLBCTXT_VPNSHIFT 2
-#endif
-#if defined(CPU_R4000)
-#define N_TLB_ENTRIES 48
-
-#define TLBHI_VPN2MASK 0xffffe000
-#define TLBHI_PIDMASK 0x000000ff
-#define TLBHI_NPID 256
-
-#define TLBLO_PFNMASK 0x3fffffc0
-#define TLBLO_PFNSHIFT 6
-#define TLBLO_D 0x00000004 /* writeable */
-#define TLBLO_V 0x00000002 /* valid bit */
-#define TLBLO_G 0x00000001 /* global access bit */
-#define TLBLO_CMASK 0x00000038 /* cache algorithm mask */
-#define TLBLO_CSHIFT 3
-
-#define TLBLO_UNCACHED (CFG_C_UNCACHED<<TLBLO_CSHIFT)
-#define TLBLO_NONCOHERENT (CFG_C_NONCOHERENT<<TLBLO_CSHIFT)
-#define TLBLO_COHERENTXCL (CFG_C_COHERENTXCL<<TLBLO_CSHIFT)
-#define TLBLO_COHERENTXCLW (CFG_C_COHERENTXCLW<<TLBLO_CSHIFT)
-#define TLBLO_COHERENTUPD (CFG_C_COHERENTUPD<<TLBLO_CSHIFT)
-
-#define TLBINX_PROBE 0x80000000
-#define TLBINX_INXMASK 0x0000003f
-
-#define TLBRAND_RANDMASK 0x0000003f
-
-#define TLBCTXT_BASEMASK 0xff800000
-#define TLBCTXT_BASESHIFT 23
-
-#define TLBCTXT_VPN2MASK 0x007ffff0
-#define TLBCTXT_VPN2SHIFT 4
-
-#define TLBPGMASK_MASK 0x01ffe000
-#endif
-
-#if defined(CPU_R3000)
-#define SR_CUMASK 0xf0000000 /* coproc usable bits */
-#define SR_CU3 0x80000000 /* Coprocessor 3 usable */
-#define SR_CU2 0x40000000 /* Coprocessor 2 usable */
-#define SR_CU1 0x20000000 /* Coprocessor 1 usable */
-#define SR_CU0 0x10000000 /* Coprocessor 0 usable */
-
-#define SR_BEV 0x00400000 /* use boot exception vectors */
-
-/* Cache control bits */
-#define SR_TS 0x00200000 /* TLB shutdown */
-#define SR_PE 0x00100000 /* cache parity error */
-#define SR_CM 0x00080000 /* cache miss */
-#define SR_PZ 0x00040000 /* cache parity zero */
-#define SR_SWC 0x00020000 /* swap cache */
-#define SR_ISC 0x00010000 /* Isolate data cache */
-
-/*
-** status register interrupt masks and bits
-*/
-
-#define SR_IMASK 0x0000ff00 /* Interrupt mask */
-#define SR_IMASK8 0x00000000 /* mask level 8 */
-#define SR_IMASK7 0x00008000 /* mask level 7 */
-#define SR_IMASK6 0x0000c000 /* mask level 6 */
-#define SR_IMASK5 0x0000e000 /* mask level 5 */
-#define SR_IMASK4 0x0000f000 /* mask level 4 */
-#define SR_IMASK3 0x0000f800 /* mask level 3 */
-#define SR_IMASK2 0x0000fc00 /* mask level 2 */
-#define SR_IMASK1 0x0000fe00 /* mask level 1 */
-#define SR_IMASK0 0x0000ff00 /* mask level 0 */
-
-#define SR_IMASKSHIFT 8
-
-#define SR_IBIT8 0x00008000 /* bit level 8 */
-#define SR_IBIT7 0x00004000 /* bit level 7 */
-#define SR_IBIT6 0x00002000 /* bit level 6 */
-#define SR_IBIT5 0x00001000 /* bit level 5 */
-#define SR_IBIT4 0x00000800 /* bit level 4 */
-#define SR_IBIT3 0x00000400 /* bit level 3 */
-#define SR_IBIT2 0x00000200 /* bit level 2 */
-#define SR_IBIT1 0x00000100 /* bit level 1 */
-
-#define SR_KUO 0x00000020 /* old kernel/user, 0 => k, 1 => u */
-#define SR_IEO 0x00000010 /* old interrupt enable, 1 => enable */
-#define SR_KUP 0x00000008 /* prev kernel/user, 0 => k, 1 => u */
-#define SR_IEP 0x00000004 /* prev interrupt enable, 1 => enable */
-#define SR_KUC 0x00000002 /* cur kernel/user, 0 => k, 1 => u */
-#define SR_IEC 0x00000001 /* cur interrupt enable, 1 => enable */
-#endif
-
-#if defined(CPU_R4000)
-#define SR_CUMASK 0xf0000000 /* coproc usable bits */
-#define SR_CU3 0x80000000 /* Coprocessor 3 usable */
-#define SR_CU2 0x40000000 /* Coprocessor 2 usable */
-#define SR_CU1 0x20000000 /* Coprocessor 1 usable */
-#define SR_CU0 0x10000000 /* Coprocessor 0 usable */
-
-#define SR_RP 0x08000000 /* Reduced power operation */
-#define SR_FR 0x04000000 /* Additional floating point registers */
-#define SR_RE 0x02000000 /* Reverse endian in user mode */
-
-#define SR_BEV 0x00400000 /* Use boot exception vectors */
-#define SR_TS 0x00200000 /* TLB shutdown */
-#define SR_SR 0x00100000 /* Soft reset */
-#define SR_CH 0x00040000 /* Cache hit */
-#define SR_CE 0x00020000 /* Use cache ECC */
-#define SR_DE 0x00010000 /* Disable cache exceptions */
-
-/*
-** status register interrupt masks and bits
-*/
-
-#define SR_IMASK 0x0000ff00 /* Interrupt mask */
-#define SR_IMASK8 0x00000000 /* mask level 8 */
-#define SR_IMASK7 0x00008000 /* mask level 7 */
-#define SR_IMASK6 0x0000c000 /* mask level 6 */
-#define SR_IMASK5 0x0000e000 /* mask level 5 */
-#define SR_IMASK4 0x0000f000 /* mask level 4 */
-#define SR_IMASK3 0x0000f800 /* mask level 3 */
-#define SR_IMASK2 0x0000fc00 /* mask level 2 */
-#define SR_IMASK1 0x0000fe00 /* mask level 1 */
-#define SR_IMASK0 0x0000ff00 /* mask level 0 */
-
-#define SR_IMASKSHIFT 8
-
-#define SR_IBIT8 0x00008000 /* bit level 8 */
-#define SR_IBIT7 0x00004000 /* bit level 7 */
-#define SR_IBIT6 0x00002000 /* bit level 6 */
-#define SR_IBIT5 0x00001000 /* bit level 5 */
-#define SR_IBIT4 0x00000800 /* bit level 4 */
-#define SR_IBIT3 0x00000400 /* bit level 3 */
-#define SR_IBIT2 0x00000200 /* bit level 2 */
-#define SR_IBIT1 0x00000100 /* bit level 1 */
-
-#define SR_KSMASK 0x00000018 /* Kernel mode mask */
-#define SR_KSUSER 0x00000010 /* User mode */
-#define SR_KSSUPER 0x00000008 /* Supervisor mode */
-#define SR_KSKERNEL 0x00000000 /* Kernel mode */
-#define SR_ERL 0x00000004 /* Error level */
-#define SR_EXL 0x00000002 /* Exception level */
-#define SR_IE 0x00000001 /* Interrupts enabled */
-#endif
-
-
-
-/*
- * Cause Register
- */
-#define CAUSE_BD 0x80000000 /* Branch delay slot */
-#define CAUSE_CEMASK 0x30000000 /* coprocessor error */
-#define CAUSE_CESHIFT 28
-
-
-#define CAUSE_IPMASK 0x0000FF00 /* Pending interrupt mask */
-#define CAUSE_IPSHIFT 8
-
-#define CAUSE_EXCMASK 0x0000003C /* Cause code bits */
-#define CAUSE_EXCSHIFT 2
-
-#ifndef XDS
-/*
-** Coprocessor 0 registers
-*/
-#define C0_INX $0 /* tlb index */
-#define C0_RAND $1 /* tlb random */
-#if defined(CPU_R3000)
-#define C0_TLBLO $2 /* tlb entry low */
-#endif
-#if defined(CPU_R4000)
-#define C0_TLBLO0 $2 /* tlb entry low 0 */
-#define C0_TLBLO1 $3 /* tlb entry low 1 */
-#endif
-
-#define C0_CTXT $4 /* tlb context */
-
-#if defined(CPU_R4000)
-#define C0_PAGEMASK $5 /* tlb page mask */
-#define C0_WIRED $6 /* number of wired tlb entries */
-#endif
-
-#define C0_BADVADDR $8 /* bad virtual address */
-
-#if defined(CPU_R4000)
-#define C0_COUNT $9 /* cycle count */
-#endif
-
-#define C0_TLBHI $10 /* tlb entry hi */
-
-#if defined(CPU_R4000)
-#define C0_COMPARE $11 /* cyccle count comparator */
-#endif
-
-#define C0_SR $12 /* status register */
-#define C0_CAUSE $13 /* exception cause */
-#define C0_EPC $14 /* exception pc */
-#define C0_PRID $15 /* revision identifier */
-
-#if defined(CPU_R3000)
-#define C0_CONFIG $3 /* configuration register R3081*/
-#endif
-
-#if defined(CPU_R4000)
-#define C0_CONFIG $16 /* configuration register */
-#define C0_LLADDR $17 /* linked load address */
-#define C0_WATCHLO $18 /* watchpoint trap register */
-#define C0_WATCHHI $19 /* watchpoint trap register */
-#define C0_XCTXT $20 /* extended tlb context */
-#define C0_ECC $26 /* secondary cache ECC control */
-#define C0_CACHEERR $27 /* cache error status */
-#define C0_TAGLO $28 /* cache tag lo */
-#define C0_TAGHI $29 /* cache tag hi */
-#define C0_ERRPC $30 /* cache error pc */
-#endif
-
-#endif XDS
-
-#ifdef R4650
-#define IWATCH $18
-#define DWATCH $19
-#define IBASE $0
-#define IBOUND $1
-#define DBASE $2
-#define DBOUND $3
-#define CALG $17
-#endif
-
-#endif /* _IDTCPU_H__ */
-
diff --git a/cpukit/score/cpu/mips/iregdef.h b/cpukit/score/cpu/mips/iregdef.h
deleted file mode 100644
index f0953da852..0000000000
--- a/cpukit/score/cpu/mips/iregdef.h
+++ /dev/null
@@ -1,325 +0,0 @@
-/*
-
-Based upon IDT provided code with the following release:
-
-This source code has been made available to you by IDT on an AS-IS
-basis. Anyone receiving this source is licensed under IDT copyrights
-to use it in any way he or she deems fit, including copying it,
-modifying it, compiling it, and redistributing it either with or
-without modifications. No license under IDT patents or patent
-applications is to be implied by the copyright license.
-
-Any user of this software should understand that IDT cannot provide
-technical support for this software and will not be responsible for
-any consequences resulting from the use of this software.
-
-Any person who transfers this source code or any derivative work must
-include the IDT copyright notice, this paragraph, and the preceeding
-two paragraphs in the transferred software.
-
-COPYRIGHT IDT CORPORATION 1996
-LICENSED MATERIAL - PROGRAM PROPERTY OF IDT
-
- $Id$
-*/
-
-/*
-** iregdef.h - IDT R3000 register structure header file
-**
-** Copyright 1989 Integrated Device Technology, Inc
-** All Rights Reserved
-**
-*/
-#ifndef __IREGDEF_H__
-#define __IREGDEF_H__
-
-/*
- * 950313: Ketan added sreg/lreg and R_SZ for 64-bit saves
- * added Register definition for XContext reg.
- * Look towards end of this file.
- */
-/*
-** register names
-*/
-#define r0 $0
-#define r1 $1
-#define r2 $2
-#define r3 $3
-#define r4 $4
-#define r5 $5
-#define r6 $6
-#define r7 $7
-#define r8 $8
-#define r9 $9
-#define r10 $10
-#define r11 $11
-#define r12 $12
-#define r13 $13
-
-#define r14 $14
-#define r15 $15
-#define r16 $16
-#define r17 $17
-#define r18 $18
-#define r19 $19
-#define r20 $20
-#define r21 $21
-#define r22 $22
-#define r23 $23
-#define r24 $24
-#define r25 $25
-#define r26 $26
-#define r27 $27
-#define r28 $28
-#define r29 $29
-#define r30 $30
-#define r31 $31
-
-#define fp0 $f0
-#define fp1 $f1
-#define fp2 $f2
-#define fp3 $f3
-#define fp4 $f4
-#define fp5 $f5
-#define fp6 $f6
-#define fp7 $f7
-#define fp8 $f8
-#define fp9 $f9
-#define fp10 $f10
-#define fp11 $f11
-#define fp12 $f12
-#define fp13 $f13
-#define fp14 $f14
-#define fp15 $f15
-#define fp16 $f16
-#define fp17 $f17
-#define fp18 $f18
-#define fp19 $f19
-#define fp20 $f20
-#define fp21 $f21
-#define fp22 $f22
-#define fp23 $f23
-#define fp24 $f24
-#define fp25 $f25
-#define fp26 $f26
-#define fp27 $f27
-#define fp28 $f28
-#define fp29 $f29
-#define fp30 $f30
-#define fp31 $f31
-
-#define fcr0 $0
-#define fcr30 $30
-#define fcr31 $31
-
-#define zero $0 /* wired zero */
-#define AT $at /* assembler temp */
-#define v0 $2 /* return value */
-#define v1 $3
-#define a0 $4 /* argument registers a0-a3 */
-#define a1 $5
-#define a2 $6
-#define a3 $7
-#define t0 $8 /* caller saved t0-t9 */
-#define t1 $9
-#define t2 $10
-#define t3 $11
-#define t4 $12
-#define t5 $13
-#define t6 $14
-#define t7 $15
-#define s0 $16 /* callee saved s0-s8 */
-#define s1 $17
-#define s2 $18
-#define s3 $19
-#define s4 $20
-#define s5 $21
-#define s6 $22
-#define s7 $23
-#define t8 $24
-#define t9 $25
-#define k0 $26 /* kernel usage */
-#define k1 $27 /* kernel usage */
-#define gp $28 /* sdata pointer */
-#define sp $29 /* stack pointer */
-#define s8 $30 /* yet another saved reg for the callee */
-#define fp $30 /* frame pointer - this is being phased out by MIPS */
-#define ra $31 /* return address */
-
-
-/*
-** relative position of registers in save reg area
-*/
-#define R_R0 0
-#define R_R1 1
-#define R_R2 2
-#define R_R3 3
-#define R_R4 4
-#define R_R5 5
-#define R_R6 6
-#define R_R7 7
-#define R_R8 8
-#define R_R9 9
-#define R_R10 10
-#define R_R11 11
-#define R_R12 12
-#define R_R13 13
-#define R_R14 14
-#define R_R15 15
-#define R_R16 16
-#define R_R17 17
-#define R_R18 18
-#define R_R19 19
-#define R_R20 20
-#define R_R21 21
-#define R_R22 22
-#define R_R23 23
-#define R_R24 24
-#define R_R25 25
-#define R_R26 26
-#define R_R27 27
-#define R_R28 28
-#define R_R29 29
-#define R_R30 30
-#define R_R31 31
-#define R_F0 32
-#define R_F1 33
-#define R_F2 34
-#define R_F3 35
-#define R_F4 36
-#define R_F5 37
-#define R_F6 38
-#define R_F7 39
-#define R_F8 40
-#define R_F9 41
-#define R_F10 42
-#define R_F11 43
-#define R_F12 44
-#define R_F13 45
-#define R_F14 46
-#define R_F15 47
-#define R_F16 48
-#define R_F17 49
-#define R_F18 50
-#define R_F19 51
-#define R_F20 52
-#define R_F21 53
-#define R_F22 54
-#define R_F23 55
-#define R_F24 56
-#define R_F25 57
-#define R_F26 58
-#define R_F27 59
-#define R_F28 60
-#define R_F29 61
-#define R_F30 62
-#define R_F31 63
-#define NCLIENTREGS 64
-#define R_EPC 64
-#define R_MDHI 65
-#define R_MDLO 66
-#define R_SR 67
-#define R_CAUSE 68
-#define R_TLBHI 69
-#if defined(CPU_R3000)
-#define R_TLBLO 70
-#endif
-#if defined(CPU_R4000)
-#define R_TLBLO0 70
-#endif
-#define R_BADVADDR 71
-#define R_INX 72
-#define R_RAND 73
-#define R_CTXT 74
-#define R_EXCTYPE 75
-#define R_MODE 76
-#define R_PRID 77
-#define R_FCSR 78
-#define R_FEIR 79
-#if defined(CPU_R3000)
-#define NREGS 80
-#endif
-#if defined(CPU_R4000)
-#define R_TLBLO1 80
-#define R_PAGEMASK 81
-#define R_WIRED 82
-#define R_COUNT 83
-#define R_COMPARE 84
-#define R_CONFIG 85
-#define R_LLADDR 86
-#define R_WATCHLO 87
-#define R_WATCHHI 88
-#define R_ECC 89
-#define R_CACHEERR 90
-#define R_TAGLO 91
-#define R_TAGHI 92
-#define R_ERRPC 93
-#define R_XCTXT 94 /* Ketan added from SIM64bit */
-
-#define NREGS 95
-#endif
-
-/*
-** For those who like to think in terms of the compiler names for the regs
-*/
-#define R_ZERO R_R0
-#define R_AT R_R1
-#define R_V0 R_R2
-#define R_V1 R_R3
-#define R_A0 R_R4
-#define R_A1 R_R5
-#define R_A2 R_R6
-#define R_A3 R_R7
-#define R_T0 R_R8
-#define R_T1 R_R9
-#define R_T2 R_R10
-#define R_T3 R_R11
-#define R_T4 R_R12
-#define R_T5 R_R13
-#define R_T6 R_R14
-#define R_T7 R_R15
-#define R_S0 R_R16
-#define R_S1 R_R17
-#define R_S2 R_R18
-#define R_S3 R_R19
-#define R_S4 R_R20
-#define R_S5 R_R21
-#define R_S6 R_R22
-#define R_S7 R_R23
-#define R_T8 R_R24
-#define R_T9 R_R25
-#define R_K0 R_R26
-#define R_K1 R_R27
-#define R_GP R_R28
-#define R_SP R_R29
-#define R_FP R_R30
-#define R_RA R_R31
-
-/* Ketan added the following */
-#ifdef CPU_R3000
-#define sreg sw
-#define lreg lw
-#define rmfc0 mfc0
-#define rmtc0 mtc0
-#define R_SZ 4
-#endif CPU_R3000
-
-#ifdef CPU_R4000
-#if __mips < 3
-#define sreg sw
-#define lreg lw
-#define rmfc0 mfc0
-#define rmtc0 mtc0
-#define R_SZ 4
-#else
-#define sreg sd
-#define lreg ld
-#define rmfc0 dmfc0
-#define rmtc0 dmtc0
-#define R_SZ 8
-#endif
-#endif CPU_R4000
-/* Ketan till here */
-
-#endif /* __IREGDEF_H__ */
-
diff --git a/cpukit/score/cpu/mips/rtems/asm.h b/cpukit/score/cpu/mips/rtems/asm.h
deleted file mode 100644
index 2d322c2339..0000000000
--- a/cpukit/score/cpu/mips/rtems/asm.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/* asm.h
- *
- * This include file attempts to address the problems
- * caused by incompatible flavors of assemblers and
- * toolsets. It primarily addresses variations in the
- * use of leading underscores on symbols and the requirement
- * that register names be preceded by a %.
- *
- *
- * NOTE: The spacing in the use of these macros
- * is critical to them working as advertised.
- *
- * COPYRIGHT:
- *
- * This file is based on similar code found in newlib available
- * from ftp.cygnus.com. The file which was used had no copyright
- * notice. This file is freely distributable as long as the source
- * of the file is noted. This file is:
- *
- * COPYRIGHT (c) 1994-1997.
- * On-Line Applications Research Corporation (OAR).
- *
- * $Id$
- */
-/* @(#)asm.h 03/15/96 1.1 */
-
-#ifndef __NO_CPU_ASM_h
-#define __NO_CPU_ASM_h
-
-/*
- * Indicate we are in an assembly file and get the basic CPU definitions.
- */
-
-#ifndef ASM
-#define ASM
-#endif
-#include <rtems/score/targopts.h>
-#include <rtems/score/mips64orion.h>
-
-/*
- * Recent versions of GNU cpp define variables which indicate the
- * need for underscores and percents. If not using GNU cpp or
- * the version does not support this, then you will obviously
- * have to define these as appropriate.
- */
-
-#ifndef __USER_LABEL_PREFIX__
-#define __USER_LABEL_PREFIX__ _
-#endif
-
-#ifndef __REGISTER_PREFIX__
-#define __REGISTER_PREFIX__
-#endif
-
-/* ANSI concatenation macros. */
-
-#define CONCAT1(a, b) CONCAT2(a, b)
-#define CONCAT2(a, b) a ## b
-
-/* Use the right prefix for global labels. */
-
-#define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
-
-/* Use the right prefix for registers. */
-
-#define REG(x) CONCAT1 (__REGISTER_PREFIX__, x)
-
-/*
- * define macros for all of the registers on this CPU
- *
- * EXAMPLE: #define d0 REG (d0)
- */
-
-/*
- * Define macros to handle section beginning and ends.
- */
-
-
-#define BEGIN_CODE_DCL .text
-#define END_CODE_DCL
-#define BEGIN_DATA_DCL .data
-#define END_DATA_DCL
-#define BEGIN_CODE .text
-#define END_CODE
-#define BEGIN_DATA
-#define END_DATA
-#define BEGIN_BSS
-#define END_BSS
-#define END
-
-/*
- * Following must be tailor for a particular flavor of the C compiler.
- * They may need to put underscores in front of the symbols.
- */
-
-#define PUBLIC(sym) .globl SYM (sym)
-#define EXTERN(sym) .globl SYM (sym)
-
-#endif
-/* end of include file */
-
-
diff --git a/cpukit/score/cpu/mips/rtems/mips/idtcpu.h b/cpukit/score/cpu/mips/rtems/mips/idtcpu.h
deleted file mode 100644
index f921e85ef6..0000000000
--- a/cpukit/score/cpu/mips/rtems/mips/idtcpu.h
+++ /dev/null
@@ -1,440 +0,0 @@
-/*
-
-Based upon IDT provided code with the following release:
-
-This source code has been made available to you by IDT on an AS-IS
-basis. Anyone receiving this source is licensed under IDT copyrights
-to use it in any way he or she deems fit, including copying it,
-modifying it, compiling it, and redistributing it either with or
-without modifications. No license under IDT patents or patent
-applications is to be implied by the copyright license.
-
-Any user of this software should understand that IDT cannot provide
-technical support for this software and will not be responsible for
-any consequences resulting from the use of this software.
-
-Any person who transfers this source code or any derivative work must
-include the IDT copyright notice, this paragraph, and the preceeding
-two paragraphs in the transferred software.
-
-COPYRIGHT IDT CORPORATION 1996
-LICENSED MATERIAL - PROGRAM PROPERTY OF IDT
-
- $Id$
-*/
-
-/*
-** idtcpu.h -- cpu related defines
-*/
-
-#ifndef _IDTCPU_H__
-#define _IDTCPU_H__
-
-/*
- * 950313: Ketan added Register definition for XContext reg.
- * added define for WAIT instruction.
- * 950421: Ketan added Register definition for Config reg (R3081)
- */
-
-/*
-** memory configuration and mapping
-*/
-#define K0BASE 0x80000000
-#define K0SIZE 0x20000000
-#define K1BASE 0xa0000000
-#define K1SIZE 0x20000000
-#define K2BASE 0xc0000000
-#define K2SIZE 0x20000000
-#if defined(CPU_R4000)
-#define KSBASE 0xe0000000
-#define KSSIZE 0x20000000
-#endif
-
-#define KUBASE 0
-#define KUSIZE 0x80000000
-
-/*
-** Exception Vectors
-*/
-#if defined(CPU_R3000)
-#define UT_VEC K0BASE /* utlbmiss vector */
-#define E_VEC (K0BASE+0x80) /* exception vevtor */
-#endif
-#if defined(CPU_R4000)
-#define T_VEC (K0BASE+0x000) /* tlbmiss vector */
-#define X_VEC (K0BASE+0x080) /* xtlbmiss vector */
-#define C_VEC (K0BASE+0x100) /* cache error vector */
-#define E_VEC (K0BASE+0x180) /* exception vector */
-#endif
-#define R_VEC (K1BASE+0x1fc00000) /* reset vector */
-
-/*
-** Address conversion macros
-*/
-#ifdef CLANGUAGE
-#define CAST(as) (as)
-#else
-#define CAST(as)
-#endif
-#define K0_TO_K1(x) (CAST(unsigned)(x)|0xA0000000) /* kseg0 to kseg1 */
-#define K1_TO_K0(x) (CAST(unsigned)(x)&0x9FFFFFFF) /* kseg1 to kseg0 */
-#define K0_TO_PHYS(x) (CAST(unsigned)(x)&0x1FFFFFFF) /* kseg0 to physical */
-#define K1_TO_PHYS(x) (CAST(unsigned)(x)&0x1FFFFFFF) /* kseg1 to physical */
-#define PHYS_TO_K0(x) (CAST(unsigned)(x)|0x80000000) /* physical to kseg0 */
-#define PHYS_TO_K1(x) (CAST(unsigned)(x)|0xA0000000) /* physical to kseg1 */
-
-/*
-** Cache size constants
-*/
-#define MINCACHE 0x200 /* 512 For 3041. */
-#define MAXCACHE 0x40000 /* 256*1024 256k */
-
-#if defined(CPU_R4000)
-/* R4000 configuration register definitions */
-#define CFG_CM 0x80000000 /* Master-Checker mode */
-#define CFG_ECMASK 0x70000000 /* System Clock Ratio */
-#define CFG_ECBY2 0x00000000 /* divide by 2 */
-#define CFG_ECBY3 0x10000000 /* divide by 3 */
-#define CFG_ECBY4 0x20000000 /* divide by 4 */
-#define CFG_EPMASK 0x0f000000 /* Transmit data pattern */
-#define CFG_EPD 0x00000000 /* D */
-#define CFG_EPDDX 0x01000000 /* DDX */
-#define CFG_EPDDXX 0x02000000 /* DDXX */
-#define CFG_EPDXDX 0x03000000 /* DXDX */
-#define CFG_EPDDXXX 0x04000000 /* DDXXX */
-#define CFG_EPDDXXXX 0x05000000 /* DDXXXX */
-#define CFG_EPDXXDXX 0x06000000 /* DXXDXX */
-#define CFG_EPDDXXXXX 0x07000000 /* DDXXXXX */
-#define CFG_EPDXXXDXXX 0x08000000 /* DXXXDXXX */
-#define CFG_SBMASK 0x00c00000 /* Secondary cache block size */
-#define CFG_SBSHIFT 22
-#define CFG_SB4 0x00000000 /* 4 words */
-#define CFG_SB8 0x00400000 /* 8 words */
-#define CFG_SB16 0x00800000 /* 16 words */
-#define CFG_SB32 0x00c00000 /* 32 words */
-#define CFG_SS 0x00200000 /* Split secondary cache */
-#define CFG_SW 0x00100000 /* Secondary cache port width */
-#define CFG_EWMASK 0x000c0000 /* System port width */
-#define CFG_EWSHIFT 18
-#define CFG_EW64 0x00000000 /* 64 bit */
-#define CFG_EW32 0x00010000 /* 32 bit */
-#define CFG_SC 0x00020000 /* Secondary cache absent */
-#define CFG_SM 0x00010000 /* Dirty Shared mode disabled */
-#define CFG_BE 0x00008000 /* Big Endian */
-#define CFG_EM 0x00004000 /* ECC mode enable */
-#define CFG_EB 0x00002000 /* Block ordering */
-#define CFG_ICMASK 0x00000e00 /* Instruction cache size */
-#define CFG_ICSHIFT 9
-#define CFG_DCMASK 0x000001c0 /* Data cache size */
-#define CFG_DCSHIFT 6
-#define CFG_IB 0x00000020 /* Instruction cache block size */
-#define CFG_DB 0x00000010 /* Data cache block size */
-#define CFG_CU 0x00000008 /* Update on Store Conditional */
-#define CFG_K0MASK 0x00000007 /* KSEG0 coherency algorithm */
-
-/*
- * R4000 primary cache mode
- */
-#define CFG_C_UNCACHED 2
-#define CFG_C_NONCOHERENT 3
-#define CFG_C_COHERENTXCL 4
-#define CFG_C_COHERENTXCLW 5
-#define CFG_C_COHERENTUPD 6
-
-/*
- * R4000 cache operations (should be in assembler...?)
- */
-#define Index_Invalidate_I 0x0 /* 0 0 */
-#define Index_Writeback_Inv_D 0x1 /* 0 1 */
-#define Index_Invalidate_SI 0x2 /* 0 2 */
-#define Index_Writeback_Inv_SD 0x3 /* 0 3 */
-#define Index_Load_Tag_I 0x4 /* 1 0 */
-#define Index_Load_Tag_D 0x5 /* 1 1 */
-#define Index_Load_Tag_SI 0x6 /* 1 2 */
-#define Index_Load_Tag_SD 0x7 /* 1 3 */
-#define Index_Store_Tag_I 0x8 /* 2 0 */
-#define Index_Store_Tag_D 0x9 /* 2 1 */
-#define Index_Store_Tag_SI 0xA /* 2 2 */
-#define Index_Store_Tag_SD 0xB /* 2 3 */
-#define Create_Dirty_Exc_D 0xD /* 3 1 */
-#define Create_Dirty_Exc_SD 0xF /* 3 3 */
-#define Hit_Invalidate_I 0x10 /* 4 0 */
-#define Hit_Invalidate_D 0x11 /* 4 1 */
-#define Hit_Invalidate_SI 0x12 /* 4 2 */
-#define Hit_Invalidate_SD 0x13 /* 4 3 */
-#define Hit_Writeback_Inv_D 0x15 /* 5 1 */
-#define Hit_Writeback_Inv_SD 0x17 /* 5 3 */
-#define Fill_I 0x14 /* 5 0 */
-#define Hit_Writeback_D 0x19 /* 6 1 */
-#define Hit_Writeback_SD 0x1B /* 6 3 */
-#define Hit_Writeback_I 0x18 /* 6 0 */
-#define Hit_Set_Virtual_SI 0x1E /* 7 2 */
-#define Hit_Set_Virtual_SD 0x1F /* 7 3 */
-
-#ifndef WAIT
-#define WAIT .word 0x42000020
-#endif WAIT
-
-#ifndef wait
-#define wait .word 0x42000020
-#endif wait
-
-#endif
-
-/*
-** TLB resource defines
-*/
-#if defined(CPU_R3000)
-#define N_TLB_ENTRIES 64
-#define TLB_PGSIZE 0x1000
-#define RANDBASE 8
-#define TLBLO_PFNMASK 0xfffff000
-#define TLBLO_PFNSHIFT 12
-#define TLBLO_N 0x800 /* non-cacheable */
-#define TLBLO_D 0x400 /* writeable */
-#define TLBLO_V 0x200 /* valid bit */
-#define TLBLO_G 0x100 /* global access bit */
-
-#define TLBHI_VPNMASK 0xfffff000
-#define TLBHI_VPNSHIFT 12
-#define TLBHI_PIDMASK 0xfc0
-#define TLBHI_PIDSHIFT 6
-#define TLBHI_NPID 64
-
-#define TLBINX_PROBE 0x80000000
-#define TLBINX_INXMASK 0x00003f00
-#define TLBINX_INXSHIFT 8
-
-#define TLBRAND_RANDMASK 0x00003f00
-#define TLBRAND_RANDSHIFT 8
-
-#define TLBCTXT_BASEMASK 0xffe00000
-#define TLBCTXT_BASESHIFT 21
-
-#define TLBCTXT_VPNMASK 0x001ffffc
-#define TLBCTXT_VPNSHIFT 2
-#endif
-#if defined(CPU_R4000)
-#define N_TLB_ENTRIES 48
-
-#define TLBHI_VPN2MASK 0xffffe000
-#define TLBHI_PIDMASK 0x000000ff
-#define TLBHI_NPID 256
-
-#define TLBLO_PFNMASK 0x3fffffc0
-#define TLBLO_PFNSHIFT 6
-#define TLBLO_D 0x00000004 /* writeable */
-#define TLBLO_V 0x00000002 /* valid bit */
-#define TLBLO_G 0x00000001 /* global access bit */
-#define TLBLO_CMASK 0x00000038 /* cache algorithm mask */
-#define TLBLO_CSHIFT 3
-
-#define TLBLO_UNCACHED (CFG_C_UNCACHED<<TLBLO_CSHIFT)
-#define TLBLO_NONCOHERENT (CFG_C_NONCOHERENT<<TLBLO_CSHIFT)
-#define TLBLO_COHERENTXCL (CFG_C_COHERENTXCL<<TLBLO_CSHIFT)
-#define TLBLO_COHERENTXCLW (CFG_C_COHERENTXCLW<<TLBLO_CSHIFT)
-#define TLBLO_COHERENTUPD (CFG_C_COHERENTUPD<<TLBLO_CSHIFT)
-
-#define TLBINX_PROBE 0x80000000
-#define TLBINX_INXMASK 0x0000003f
-
-#define TLBRAND_RANDMASK 0x0000003f
-
-#define TLBCTXT_BASEMASK 0xff800000
-#define TLBCTXT_BASESHIFT 23
-
-#define TLBCTXT_VPN2MASK 0x007ffff0
-#define TLBCTXT_VPN2SHIFT 4
-
-#define TLBPGMASK_MASK 0x01ffe000
-#endif
-
-#if defined(CPU_R3000)
-#define SR_CUMASK 0xf0000000 /* coproc usable bits */
-#define SR_CU3 0x80000000 /* Coprocessor 3 usable */
-#define SR_CU2 0x40000000 /* Coprocessor 2 usable */
-#define SR_CU1 0x20000000 /* Coprocessor 1 usable */
-#define SR_CU0 0x10000000 /* Coprocessor 0 usable */
-
-#define SR_BEV 0x00400000 /* use boot exception vectors */
-
-/* Cache control bits */
-#define SR_TS 0x00200000 /* TLB shutdown */
-#define SR_PE 0x00100000 /* cache parity error */
-#define SR_CM 0x00080000 /* cache miss */
-#define SR_PZ 0x00040000 /* cache parity zero */
-#define SR_SWC 0x00020000 /* swap cache */
-#define SR_ISC 0x00010000 /* Isolate data cache */
-
-/*
-** status register interrupt masks and bits
-*/
-
-#define SR_IMASK 0x0000ff00 /* Interrupt mask */
-#define SR_IMASK8 0x00000000 /* mask level 8 */
-#define SR_IMASK7 0x00008000 /* mask level 7 */
-#define SR_IMASK6 0x0000c000 /* mask level 6 */
-#define SR_IMASK5 0x0000e000 /* mask level 5 */
-#define SR_IMASK4 0x0000f000 /* mask level 4 */
-#define SR_IMASK3 0x0000f800 /* mask level 3 */
-#define SR_IMASK2 0x0000fc00 /* mask level 2 */
-#define SR_IMASK1 0x0000fe00 /* mask level 1 */
-#define SR_IMASK0 0x0000ff00 /* mask level 0 */
-
-#define SR_IMASKSHIFT 8
-
-#define SR_IBIT8 0x00008000 /* bit level 8 */
-#define SR_IBIT7 0x00004000 /* bit level 7 */
-#define SR_IBIT6 0x00002000 /* bit level 6 */
-#define SR_IBIT5 0x00001000 /* bit level 5 */
-#define SR_IBIT4 0x00000800 /* bit level 4 */
-#define SR_IBIT3 0x00000400 /* bit level 3 */
-#define SR_IBIT2 0x00000200 /* bit level 2 */
-#define SR_IBIT1 0x00000100 /* bit level 1 */
-
-#define SR_KUO 0x00000020 /* old kernel/user, 0 => k, 1 => u */
-#define SR_IEO 0x00000010 /* old interrupt enable, 1 => enable */
-#define SR_KUP 0x00000008 /* prev kernel/user, 0 => k, 1 => u */
-#define SR_IEP 0x00000004 /* prev interrupt enable, 1 => enable */
-#define SR_KUC 0x00000002 /* cur kernel/user, 0 => k, 1 => u */
-#define SR_IEC 0x00000001 /* cur interrupt enable, 1 => enable */
-#endif
-
-#if defined(CPU_R4000)
-#define SR_CUMASK 0xf0000000 /* coproc usable bits */
-#define SR_CU3 0x80000000 /* Coprocessor 3 usable */
-#define SR_CU2 0x40000000 /* Coprocessor 2 usable */
-#define SR_CU1 0x20000000 /* Coprocessor 1 usable */
-#define SR_CU0 0x10000000 /* Coprocessor 0 usable */
-
-#define SR_RP 0x08000000 /* Reduced power operation */
-#define SR_FR 0x04000000 /* Additional floating point registers */
-#define SR_RE 0x02000000 /* Reverse endian in user mode */
-
-#define SR_BEV 0x00400000 /* Use boot exception vectors */
-#define SR_TS 0x00200000 /* TLB shutdown */
-#define SR_SR 0x00100000 /* Soft reset */
-#define SR_CH 0x00040000 /* Cache hit */
-#define SR_CE 0x00020000 /* Use cache ECC */
-#define SR_DE 0x00010000 /* Disable cache exceptions */
-
-/*
-** status register interrupt masks and bits
-*/
-
-#define SR_IMASK 0x0000ff00 /* Interrupt mask */
-#define SR_IMASK8 0x00000000 /* mask level 8 */
-#define SR_IMASK7 0x00008000 /* mask level 7 */
-#define SR_IMASK6 0x0000c000 /* mask level 6 */
-#define SR_IMASK5 0x0000e000 /* mask level 5 */
-#define SR_IMASK4 0x0000f000 /* mask level 4 */
-#define SR_IMASK3 0x0000f800 /* mask level 3 */
-#define SR_IMASK2 0x0000fc00 /* mask level 2 */
-#define SR_IMASK1 0x0000fe00 /* mask level 1 */
-#define SR_IMASK0 0x0000ff00 /* mask level 0 */
-
-#define SR_IMASKSHIFT 8
-
-#define SR_IBIT8 0x00008000 /* bit level 8 */
-#define SR_IBIT7 0x00004000 /* bit level 7 */
-#define SR_IBIT6 0x00002000 /* bit level 6 */
-#define SR_IBIT5 0x00001000 /* bit level 5 */
-#define SR_IBIT4 0x00000800 /* bit level 4 */
-#define SR_IBIT3 0x00000400 /* bit level 3 */
-#define SR_IBIT2 0x00000200 /* bit level 2 */
-#define SR_IBIT1 0x00000100 /* bit level 1 */
-
-#define SR_KSMASK 0x00000018 /* Kernel mode mask */
-#define SR_KSUSER 0x00000010 /* User mode */
-#define SR_KSSUPER 0x00000008 /* Supervisor mode */
-#define SR_KSKERNEL 0x00000000 /* Kernel mode */
-#define SR_ERL 0x00000004 /* Error level */
-#define SR_EXL 0x00000002 /* Exception level */
-#define SR_IE 0x00000001 /* Interrupts enabled */
-#endif
-
-
-
-/*
- * Cause Register
- */
-#define CAUSE_BD 0x80000000 /* Branch delay slot */
-#define CAUSE_CEMASK 0x30000000 /* coprocessor error */
-#define CAUSE_CESHIFT 28
-
-
-#define CAUSE_IPMASK 0x0000FF00 /* Pending interrupt mask */
-#define CAUSE_IPSHIFT 8
-
-#define CAUSE_EXCMASK 0x0000003C /* Cause code bits */
-#define CAUSE_EXCSHIFT 2
-
-#ifndef XDS
-/*
-** Coprocessor 0 registers
-*/
-#define C0_INX $0 /* tlb index */
-#define C0_RAND $1 /* tlb random */
-#if defined(CPU_R3000)
-#define C0_TLBLO $2 /* tlb entry low */
-#endif
-#if defined(CPU_R4000)
-#define C0_TLBLO0 $2 /* tlb entry low 0 */
-#define C0_TLBLO1 $3 /* tlb entry low 1 */
-#endif
-
-#define C0_CTXT $4 /* tlb context */
-
-#if defined(CPU_R4000)
-#define C0_PAGEMASK $5 /* tlb page mask */
-#define C0_WIRED $6 /* number of wired tlb entries */
-#endif
-
-#define C0_BADVADDR $8 /* bad virtual address */
-
-#if defined(CPU_R4000)
-#define C0_COUNT $9 /* cycle count */
-#endif
-
-#define C0_TLBHI $10 /* tlb entry hi */
-
-#if defined(CPU_R4000)
-#define C0_COMPARE $11 /* cyccle count comparator */
-#endif
-
-#define C0_SR $12 /* status register */
-#define C0_CAUSE $13 /* exception cause */
-#define C0_EPC $14 /* exception pc */
-#define C0_PRID $15 /* revision identifier */
-
-#if defined(CPU_R3000)
-#define C0_CONFIG $3 /* configuration register R3081*/
-#endif
-
-#if defined(CPU_R4000)
-#define C0_CONFIG $16 /* configuration register */
-#define C0_LLADDR $17 /* linked load address */
-#define C0_WATCHLO $18 /* watchpoint trap register */
-#define C0_WATCHHI $19 /* watchpoint trap register */
-#define C0_XCTXT $20 /* extended tlb context */
-#define C0_ECC $26 /* secondary cache ECC control */
-#define C0_CACHEERR $27 /* cache error status */
-#define C0_TAGLO $28 /* cache tag lo */
-#define C0_TAGHI $29 /* cache tag hi */
-#define C0_ERRPC $30 /* cache error pc */
-#endif
-
-#endif XDS
-
-#ifdef R4650
-#define IWATCH $18
-#define DWATCH $19
-#define IBASE $0
-#define IBOUND $1
-#define DBASE $2
-#define DBOUND $3
-#define CALG $17
-#endif
-
-#endif /* _IDTCPU_H__ */
-
diff --git a/cpukit/score/cpu/mips/rtems/mips/iregdef.h b/cpukit/score/cpu/mips/rtems/mips/iregdef.h
deleted file mode 100644
index f0953da852..0000000000
--- a/cpukit/score/cpu/mips/rtems/mips/iregdef.h
+++ /dev/null
@@ -1,325 +0,0 @@
-/*
-
-Based upon IDT provided code with the following release:
-
-This source code has been made available to you by IDT on an AS-IS
-basis. Anyone receiving this source is licensed under IDT copyrights
-to use it in any way he or she deems fit, including copying it,
-modifying it, compiling it, and redistributing it either with or
-without modifications. No license under IDT patents or patent
-applications is to be implied by the copyright license.
-
-Any user of this software should understand that IDT cannot provide
-technical support for this software and will not be responsible for
-any consequences resulting from the use of this software.
-
-Any person who transfers this source code or any derivative work must
-include the IDT copyright notice, this paragraph, and the preceeding
-two paragraphs in the transferred software.
-
-COPYRIGHT IDT CORPORATION 1996
-LICENSED MATERIAL - PROGRAM PROPERTY OF IDT
-
- $Id$
-*/
-
-/*
-** iregdef.h - IDT R3000 register structure header file
-**
-** Copyright 1989 Integrated Device Technology, Inc
-** All Rights Reserved
-**
-*/
-#ifndef __IREGDEF_H__
-#define __IREGDEF_H__
-
-/*
- * 950313: Ketan added sreg/lreg and R_SZ for 64-bit saves
- * added Register definition for XContext reg.
- * Look towards end of this file.
- */
-/*
-** register names
-*/
-#define r0 $0
-#define r1 $1
-#define r2 $2
-#define r3 $3
-#define r4 $4
-#define r5 $5
-#define r6 $6
-#define r7 $7
-#define r8 $8
-#define r9 $9
-#define r10 $10
-#define r11 $11
-#define r12 $12
-#define r13 $13
-
-#define r14 $14
-#define r15 $15
-#define r16 $16
-#define r17 $17
-#define r18 $18
-#define r19 $19
-#define r20 $20
-#define r21 $21
-#define r22 $22
-#define r23 $23
-#define r24 $24
-#define r25 $25
-#define r26 $26
-#define r27 $27
-#define r28 $28
-#define r29 $29
-#define r30 $30
-#define r31 $31
-
-#define fp0 $f0
-#define fp1 $f1
-#define fp2 $f2
-#define fp3 $f3
-#define fp4 $f4
-#define fp5 $f5
-#define fp6 $f6
-#define fp7 $f7
-#define fp8 $f8
-#define fp9 $f9
-#define fp10 $f10
-#define fp11 $f11
-#define fp12 $f12
-#define fp13 $f13
-#define fp14 $f14
-#define fp15 $f15
-#define fp16 $f16
-#define fp17 $f17
-#define fp18 $f18
-#define fp19 $f19
-#define fp20 $f20
-#define fp21 $f21
-#define fp22 $f22
-#define fp23 $f23
-#define fp24 $f24
-#define fp25 $f25
-#define fp26 $f26
-#define fp27 $f27
-#define fp28 $f28
-#define fp29 $f29
-#define fp30 $f30
-#define fp31 $f31
-
-#define fcr0 $0
-#define fcr30 $30
-#define fcr31 $31
-
-#define zero $0 /* wired zero */
-#define AT $at /* assembler temp */
-#define v0 $2 /* return value */
-#define v1 $3
-#define a0 $4 /* argument registers a0-a3 */
-#define a1 $5
-#define a2 $6
-#define a3 $7
-#define t0 $8 /* caller saved t0-t9 */
-#define t1 $9
-#define t2 $10
-#define t3 $11
-#define t4 $12
-#define t5 $13
-#define t6 $14
-#define t7 $15
-#define s0 $16 /* callee saved s0-s8 */
-#define s1 $17
-#define s2 $18
-#define s3 $19
-#define s4 $20
-#define s5 $21
-#define s6 $22
-#define s7 $23
-#define t8 $24
-#define t9 $25
-#define k0 $26 /* kernel usage */
-#define k1 $27 /* kernel usage */
-#define gp $28 /* sdata pointer */
-#define sp $29 /* stack pointer */
-#define s8 $30 /* yet another saved reg for the callee */
-#define fp $30 /* frame pointer - this is being phased out by MIPS */
-#define ra $31 /* return address */
-
-
-/*
-** relative position of registers in save reg area
-*/
-#define R_R0 0
-#define R_R1 1
-#define R_R2 2
-#define R_R3 3
-#define R_R4 4
-#define R_R5 5
-#define R_R6 6
-#define R_R7 7
-#define R_R8 8
-#define R_R9 9
-#define R_R10 10
-#define R_R11 11
-#define R_R12 12
-#define R_R13 13
-#define R_R14 14
-#define R_R15 15
-#define R_R16 16
-#define R_R17 17
-#define R_R18 18
-#define R_R19 19
-#define R_R20 20
-#define R_R21 21
-#define R_R22 22
-#define R_R23 23
-#define R_R24 24
-#define R_R25 25
-#define R_R26 26
-#define R_R27 27
-#define R_R28 28
-#define R_R29 29
-#define R_R30 30
-#define R_R31 31
-#define R_F0 32
-#define R_F1 33
-#define R_F2 34
-#define R_F3 35
-#define R_F4 36
-#define R_F5 37
-#define R_F6 38
-#define R_F7 39
-#define R_F8 40
-#define R_F9 41
-#define R_F10 42
-#define R_F11 43
-#define R_F12 44
-#define R_F13 45
-#define R_F14 46
-#define R_F15 47
-#define R_F16 48
-#define R_F17 49
-#define R_F18 50
-#define R_F19 51
-#define R_F20 52
-#define R_F21 53
-#define R_F22 54
-#define R_F23 55
-#define R_F24 56
-#define R_F25 57
-#define R_F26 58
-#define R_F27 59
-#define R_F28 60
-#define R_F29 61
-#define R_F30 62
-#define R_F31 63
-#define NCLIENTREGS 64
-#define R_EPC 64
-#define R_MDHI 65
-#define R_MDLO 66
-#define R_SR 67
-#define R_CAUSE 68
-#define R_TLBHI 69
-#if defined(CPU_R3000)
-#define R_TLBLO 70
-#endif
-#if defined(CPU_R4000)
-#define R_TLBLO0 70
-#endif
-#define R_BADVADDR 71
-#define R_INX 72
-#define R_RAND 73
-#define R_CTXT 74
-#define R_EXCTYPE 75
-#define R_MODE 76
-#define R_PRID 77
-#define R_FCSR 78
-#define R_FEIR 79
-#if defined(CPU_R3000)
-#define NREGS 80
-#endif
-#if defined(CPU_R4000)
-#define R_TLBLO1 80
-#define R_PAGEMASK 81
-#define R_WIRED 82
-#define R_COUNT 83
-#define R_COMPARE 84
-#define R_CONFIG 85
-#define R_LLADDR 86
-#define R_WATCHLO 87
-#define R_WATCHHI 88
-#define R_ECC 89
-#define R_CACHEERR 90
-#define R_TAGLO 91
-#define R_TAGHI 92
-#define R_ERRPC 93
-#define R_XCTXT 94 /* Ketan added from SIM64bit */
-
-#define NREGS 95
-#endif
-
-/*
-** For those who like to think in terms of the compiler names for the regs
-*/
-#define R_ZERO R_R0
-#define R_AT R_R1
-#define R_V0 R_R2
-#define R_V1 R_R3
-#define R_A0 R_R4
-#define R_A1 R_R5
-#define R_A2 R_R6
-#define R_A3 R_R7
-#define R_T0 R_R8
-#define R_T1 R_R9
-#define R_T2 R_R10
-#define R_T3 R_R11
-#define R_T4 R_R12
-#define R_T5 R_R13
-#define R_T6 R_R14
-#define R_T7 R_R15
-#define R_S0 R_R16
-#define R_S1 R_R17
-#define R_S2 R_R18
-#define R_S3 R_R19
-#define R_S4 R_R20
-#define R_S5 R_R21
-#define R_S6 R_R22
-#define R_S7 R_R23
-#define R_T8 R_R24
-#define R_T9 R_R25
-#define R_K0 R_R26
-#define R_K1 R_R27
-#define R_GP R_R28
-#define R_SP R_R29
-#define R_FP R_R30
-#define R_RA R_R31
-
-/* Ketan added the following */
-#ifdef CPU_R3000
-#define sreg sw
-#define lreg lw
-#define rmfc0 mfc0
-#define rmtc0 mtc0
-#define R_SZ 4
-#endif CPU_R3000
-
-#ifdef CPU_R4000
-#if __mips < 3
-#define sreg sw
-#define lreg lw
-#define rmfc0 mfc0
-#define rmtc0 mtc0
-#define R_SZ 4
-#else
-#define sreg sd
-#define lreg ld
-#define rmfc0 dmfc0
-#define rmtc0 dmtc0
-#define R_SZ 8
-#endif
-#endif CPU_R4000
-/* Ketan till here */
-
-#endif /* __IREGDEF_H__ */
-
diff --git a/cpukit/score/cpu/mips/rtems/score/cpu.h b/cpukit/score/cpu/mips/rtems/score/cpu.h
deleted file mode 100644
index 96eb34292a..0000000000
--- a/cpukit/score/cpu/mips/rtems/score/cpu.h
+++ /dev/null
@@ -1,980 +0,0 @@
-/* cpu.h
- *
- * This include file contains information pertaining to the IDT 4650
- * processor.
- *
- * Author: Craig Lebakken <craigl@transition.com>
- *
- * COPYRIGHT (c) 1996 by Transition Networks Inc.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Transition Networks not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * Transition Networks makes no representations about the suitability
- * of this software for any purpose.
- *
- * Derived from c/src/exec/score/cpu/no_cpu/cpu.h:
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-/* @(#)cpu.h 08/29/96 1.7 */
-
-#ifndef __CPU_h
-#define __CPU_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/mips64orion.h> /* pick up machine definitions */
-#ifndef ASM
-#include <rtems/score/mipstypes.h>
-#endif
-
-extern int mips_disable_interrupts( void );
-extern void mips_enable_interrupts( int _level );
-extern int mips_disable_global_interrupts( void );
-extern void mips_enable_global_interrupts( void );
-extern void mips_fatal_error ( int error );
-
-/* conditional compilation parameters */
-
-/*
- * Should the calls to _Thread_Enable_dispatch be inlined?
- *
- * If TRUE, then they are inlined.
- * If FALSE, then a subroutine call is made.
- *
- * Basically this is an example of the classic trade-off of size
- * versus speed. Inlining the call (TRUE) typically increases the
- * size of RTEMS while speeding up the enabling of dispatching.
- * [NOTE: In general, the _Thread_Dispatch_disable_level will
- * only be 0 or 1 unless you are in an interrupt handler and that
- * interrupt handler invokes the executive.] When not inlined
- * something calls _Thread_Enable_dispatch which in turns calls
- * _Thread_Dispatch. If the enable dispatch is inlined, then
- * one subroutine call is avoided entirely.]
- */
-
-#define CPU_INLINE_ENABLE_DISPATCH TRUE
-
-/*
- * Should the body of the search loops in _Thread_queue_Enqueue_priority
- * be unrolled one time? In unrolled each iteration of the loop examines
- * two "nodes" on the chain being searched. Otherwise, only one node
- * is examined per iteration.
- *
- * If TRUE, then the loops are unrolled.
- * If FALSE, then the loops are not unrolled.
- *
- * The primary factor in making this decision is the cost of disabling
- * and enabling interrupts (_ISR_Flash) versus the cost of rest of the
- * body of the loop. On some CPUs, the flash is more expensive than
- * one iteration of the loop body. In this case, it might be desirable
- * to unroll the loop. It is important to note that on some CPUs, this
- * code is the longest interrupt disable period in RTEMS. So it is
- * necessary to strike a balance when setting this parameter.
- */
-
-#define CPU_UNROLL_ENQUEUE_PRIORITY TRUE
-
-/*
- * Does RTEMS manage a dedicated interrupt stack in software?
- *
- * If TRUE, then a stack is allocated in _Interrupt_Manager_initialization.
- * If FALSE, nothing is done.
- *
- * If the CPU supports a dedicated interrupt stack in hardware,
- * then it is generally the responsibility of the BSP to allocate it
- * and set it up.
- *
- * If the CPU does not support a dedicated interrupt stack, then
- * the porter has two options: (1) execute interrupts on the
- * stack of the interrupted task, and (2) have RTEMS manage a dedicated
- * interrupt stack.
- *
- * If this is TRUE, CPU_ALLOCATE_INTERRUPT_STACK should also be TRUE.
- *
- * Only one of CPU_HAS_SOFTWARE_INTERRUPT_STACK and
- * CPU_HAS_HARDWARE_INTERRUPT_STACK should be set to TRUE. It is
- * possible that both are FALSE for a particular CPU. Although it
- * is unclear what that would imply about the interrupt processing
- * procedure on that CPU.
- */
-
-#define CPU_HAS_SOFTWARE_INTERRUPT_STACK FALSE
-
-/*
- * Does this CPU have hardware support for a dedicated interrupt stack?
- *
- * If TRUE, then it must be installed during initialization.
- * If FALSE, then no installation is performed.
- *
- * If this is TRUE, CPU_ALLOCATE_INTERRUPT_STACK should also be TRUE.
- *
- * Only one of CPU_HAS_SOFTWARE_INTERRUPT_STACK and
- * CPU_HAS_HARDWARE_INTERRUPT_STACK should be set to TRUE. It is
- * possible that both are FALSE for a particular CPU. Although it
- * is unclear what that would imply about the interrupt processing
- * procedure on that CPU.
- */
-
-#define CPU_HAS_HARDWARE_INTERRUPT_STACK FALSE
-
-/*
- * Does RTEMS allocate a dedicated interrupt stack in the Interrupt Manager?
- *
- * If TRUE, then the memory is allocated during initialization.
- * If FALSE, then the memory is allocated during initialization.
- *
- * This should be TRUE is CPU_HAS_SOFTWARE_INTERRUPT_STACK is TRUE
- * or CPU_INSTALL_HARDWARE_INTERRUPT_STACK is TRUE.
- */
-
-#define CPU_ALLOCATE_INTERRUPT_STACK FALSE
-
-/*
- * Does the RTEMS invoke the user's ISR with the vector number and
- * a pointer to the saved interrupt frame (1) or just the vector
- * number (0)?
- */
-
-#define CPU_ISR_PASSES_FRAME_POINTER 0
-
-/*
- * Does the CPU have hardware floating point?
- *
- * If TRUE, then the RTEMS_FLOATING_POINT task attribute is supported.
- * If FALSE, then the RTEMS_FLOATING_POINT task attribute is ignored.
- *
- * If there is a FP coprocessor such as the i387 or mc68881, then
- * the answer is TRUE.
- *
- * The macro name "MIPS64ORION_HAS_FPU" should be made CPU specific.
- * It indicates whether or not this CPU model has FP support. For
- * example, it would be possible to have an i386_nofp CPU model
- * which set this to false to indicate that you have an i386 without
- * an i387 and wish to leave floating point support out of RTEMS.
- */
-
-#if ( MIPS64ORION_HAS_FPU == 1 )
-#define CPU_HARDWARE_FP TRUE
-#else
-#define CPU_HARDWARE_FP FALSE
-#endif
-
-/*
- * Are all tasks RTEMS_FLOATING_POINT tasks implicitly?
- *
- * If TRUE, then the RTEMS_FLOATING_POINT task attribute is assumed.
- * If FALSE, then the RTEMS_FLOATING_POINT task attribute is followed.
- *
- * So far, the only CPU in which this option has been used is the
- * HP PA-RISC. The HP C compiler and gcc both implicitly use the
- * floating point registers to perform integer multiplies. If
- * a function which you would not think utilize the FP unit DOES,
- * then one can not easily predict which tasks will use the FP hardware.
- * In this case, this option should be TRUE.
- *
- * If CPU_HARDWARE_FP is FALSE, then this should be FALSE as well.
- */
-
-#define CPU_ALL_TASKS_ARE_FP FALSE
-
-/*
- * Should the IDLE task have a floating point context?
- *
- * If TRUE, then the IDLE task is created as a RTEMS_FLOATING_POINT task
- * and it has a floating point context which is switched in and out.
- * If FALSE, then the IDLE task does not have a floating point context.
- *
- * Setting this to TRUE negatively impacts the time required to preempt
- * the IDLE task from an interrupt because the floating point context
- * must be saved as part of the preemption.
- */
-
-#define CPU_IDLE_TASK_IS_FP FALSE
-
-/*
- * Should the saving of the floating point registers be deferred
- * until a context switch is made to another different floating point
- * task?
- *
- * If TRUE, then the floating point context will not be stored until
- * necessary. It will remain in the floating point registers and not
- * disturned until another floating point task is switched to.
- *
- * If FALSE, then the floating point context is saved when a floating
- * point task is switched out and restored when the next floating point
- * task is restored. The state of the floating point registers between
- * those two operations is not specified.
- *
- * If the floating point context does NOT have to be saved as part of
- * interrupt dispatching, then it should be safe to set this to TRUE.
- *
- * Setting this flag to TRUE results in using a different algorithm
- * for deciding when to save and restore the floating point context.
- * The deferred FP switch algorithm minimizes the number of times
- * the FP context is saved and restored. The FP context is not saved
- * until a context switch is made to another, different FP task.
- * Thus in a system with only one FP task, the FP context will never
- * be saved or restored.
- */
-
-#define CPU_USE_DEFERRED_FP_SWITCH TRUE
-
-/*
- * Does this port provide a CPU dependent IDLE task implementation?
- *
- * If TRUE, then the routine _CPU_Internal_threads_Idle_thread_body
- * must be provided and is the default IDLE thread body instead of
- * _Internal_threads_Idle_thread_body.
- *
- * If FALSE, then use the generic IDLE thread body if the BSP does
- * not provide one.
- *
- * This is intended to allow for supporting processors which have
- * a low power or idle mode. When the IDLE thread is executed, then
- * the CPU can be powered down.
- *
- * The order of precedence for selecting the IDLE thread body is:
- *
- * 1. BSP provided
- * 2. CPU dependent (if provided)
- * 3. generic (if no BSP and no CPU dependent)
- */
-
-/* we can use the low power wait instruction for the IDLE thread */
-#define CPU_PROVIDES_IDLE_THREAD_BODY TRUE
-
-/*
- * Does the stack grow up (toward higher addresses) or down
- * (toward lower addresses)?
- *
- * If TRUE, then the grows upward.
- * If FALSE, then the grows toward smaller addresses.
- */
-
-/* our stack grows down */
-#define CPU_STACK_GROWS_UP FALSE
-
-/*
- * The following is the variable attribute used to force alignment
- * of critical RTEMS structures. On some processors it may make
- * sense to have these aligned on tighter boundaries than
- * the minimum requirements of the compiler in order to have as
- * much of the critical data area as possible in a cache line.
- *
- * The placement of this macro in the declaration of the variables
- * is based on the syntactically requirements of the GNU C
- * "__attribute__" extension. For example with GNU C, use
- * the following to force a structures to a 32 byte boundary.
- *
- * __attribute__ ((aligned (32)))
- *
- * NOTE: Currently only the Priority Bit Map table uses this feature.
- * To benefit from using this, the data must be heavily
- * used so it will stay in the cache and used frequently enough
- * in the executive to justify turning this on.
- */
-
-/* our cache line size is 16 bytes */
-#if __GNUC__
-#define CPU_STRUCTURE_ALIGNMENT __attribute__ ((aligned (16)))
-#else
-#define CPU_STRUCTURE_ALIGNMENT
-#endif
-
-/*
- * Define what is required to specify how the network to host conversion
- * routines are handled.
- */
-
-#define CPU_HAS_OWN_HOST_TO_NETWORK_ROUTINES FALSE
-#define CPU_BIG_ENDIAN TRUE
-#define CPU_LITTLE_ENDIAN FALSE
-
-/*
- * The following defines the number of bits actually used in the
- * interrupt field of the task mode. How those bits map to the
- * CPU interrupt levels is defined by the routine _CPU_ISR_Set_level().
- */
-
-#define CPU_MODES_INTERRUPT_MASK 0x00000001
-
-/*
- * Processor defined structures
- *
- * Examples structures include the descriptor tables from the i386
- * and the processor control structure on the i960ca.
- */
-
-/* may need to put some structures here. */
-
-/*
- * Contexts
- *
- * Generally there are 2 types of context to save.
- * 1. Interrupt registers to save
- * 2. Task level registers to save
- *
- * This means we have the following 3 context items:
- * 1. task level context stuff:: Context_Control
- * 2. floating point task stuff:: Context_Control_fp
- * 3. special interrupt level context :: Context_Control_interrupt
- *
- * On some processors, it is cost-effective to save only the callee
- * preserved registers during a task context switch. This means
- * that the ISR code needs to save those registers which do not
- * persist across function calls. It is not mandatory to make this
- * distinctions between the caller/callee saves registers for the
- * purpose of minimizing context saved during task switch and on interrupts.
- * If the cost of saving extra registers is minimal, simplicity is the
- * choice. Save the same context on interrupt entry as for tasks in
- * this case.
- *
- * Additionally, if gdb is to be made aware of RTEMS tasks for this CPU, then
- * care should be used in designing the context area.
- *
- * On some CPUs with hardware floating point support, the Context_Control_fp
- * structure will not be used or it simply consist of an array of a
- * fixed number of bytes. This is done when the floating point context
- * is dumped by a "FP save context" type instruction and the format
- * is not really defined by the CPU. In this case, there is no need
- * to figure out the exact format -- only the size. Of course, although
- * this is enough information for RTEMS, it is probably not enough for
- * a debugger such as gdb. But that is another problem.
- */
-
-/* WARNING: If this structure is modified, the constants in cpu.h must be updated. */
-typedef struct {
- unsigned64 s0;
- unsigned64 s1;
- unsigned64 s2;
- unsigned64 s3;
- unsigned64 s4;
- unsigned64 s5;
- unsigned64 s6;
- unsigned64 s7;
- unsigned64 sp;
- unsigned64 fp;
- unsigned64 ra;
- unsigned64 c0_sr;
- unsigned64 c0_epc;
-} Context_Control;
-
-/* WARNING: If this structure is modified, the constants in cpu.h must be updated. */
-typedef struct {
- unsigned32 fp0;
- unsigned32 fp1;
- unsigned32 fp2;
- unsigned32 fp3;
- unsigned32 fp4;
- unsigned32 fp5;
- unsigned32 fp6;
- unsigned32 fp7;
- unsigned32 fp8;
- unsigned32 fp9;
- unsigned32 fp10;
- unsigned32 fp11;
- unsigned32 fp12;
- unsigned32 fp13;
- unsigned32 fp14;
- unsigned32 fp15;
- unsigned32 fp16;
- unsigned32 fp17;
- unsigned32 fp18;
- unsigned32 fp19;
- unsigned32 fp20;
- unsigned32 fp21;
- unsigned32 fp22;
- unsigned32 fp23;
- unsigned32 fp24;
- unsigned32 fp25;
- unsigned32 fp26;
- unsigned32 fp27;
- unsigned32 fp28;
- unsigned32 fp29;
- unsigned32 fp30;
- unsigned32 fp31;
-} Context_Control_fp;
-
-typedef struct {
- unsigned32 special_interrupt_register;
-} CPU_Interrupt_frame;
-
-
-/*
- * The following table contains the information required to configure
- * the mips processor specific parameters.
- */
-
-typedef struct {
- void (*pretasking_hook)( void );
- void (*predriver_hook)( void );
- void (*postdriver_hook)( void );
- void (*idle_task)( void );
- boolean do_zero_of_workspace;
- unsigned32 idle_task_stack_size;
- unsigned32 interrupt_stack_size;
- unsigned32 extra_mpci_receive_server_stack;
- void * (*stack_allocate_hook)( unsigned32 );
- void (*stack_free_hook)( void* );
- /* end of fields required on all CPUs */
-
- unsigned32 clicks_per_microsecond;
-} rtems_cpu_table;
-
-/*
- * Macros to access required entires in the CPU Table are in
- * the file rtems/system.h.
- */
-
-/*
- * Macros to access MIPS64ORION specific additions to the CPU Table
- */
-
-#define rtems_cpu_configuration_get_clicks_per_microsecond() \
- (_CPU_Table.clicks_per_microsecond)
-
-/*
- * This variable is optional. It is used on CPUs on which it is difficult
- * to generate an "uninitialized" FP context. It is filled in by
- * _CPU_Initialize and copied into the task's FP context area during
- * _CPU_Context_Initialize.
- */
-
-SCORE_EXTERN Context_Control_fp _CPU_Null_fp_context;
-
-/*
- * On some CPUs, RTEMS supports a software managed interrupt stack.
- * This stack is allocated by the Interrupt Manager and the switch
- * is performed in _ISR_Handler. These variables contain pointers
- * to the lowest and highest addresses in the chunk of memory allocated
- * for the interrupt stack. Since it is unknown whether the stack
- * grows up or down (in general), this give the CPU dependent
- * code the option of picking the version it wants to use.
- *
- * NOTE: These two variables are required if the macro
- * CPU_HAS_SOFTWARE_INTERRUPT_STACK is defined as TRUE.
- */
-
-SCORE_EXTERN void *_CPU_Interrupt_stack_low;
-SCORE_EXTERN void *_CPU_Interrupt_stack_high;
-
-/*
- * With some compilation systems, it is difficult if not impossible to
- * call a high-level language routine from assembly language. This
- * is especially true of commercial Ada compilers and name mangling
- * C++ ones. This variable can be optionally defined by the CPU porter
- * and contains the address of the routine _Thread_Dispatch. This
- * can make it easier to invoke that routine at the end of the interrupt
- * sequence (if a dispatch is necessary).
- */
-
-SCORE_EXTERN void (*_CPU_Thread_dispatch_pointer)();
-
-/*
- * Nothing prevents the porter from declaring more CPU specific variables.
- */
-
-/* XXX: if needed, put more variables here */
-
-/*
- * The size of the floating point context area. On some CPUs this
- * will not be a "sizeof" because the format of the floating point
- * area is not defined -- only the size is. This is usually on
- * CPUs with a "floating point save context" instruction.
- */
-
-#define CPU_CONTEXT_FP_SIZE sizeof( Context_Control_fp )
-
-/*
- * Amount of extra stack (above minimum stack size) required by
- * system initialization thread. Remember that in a multiprocessor
- * system the system intialization thread becomes the MP server thread.
- */
-
-#define CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK 0
-
-/*
- * This defines the number of entries in the ISR_Vector_table managed
- * by RTEMS.
- */
-
-#define CPU_INTERRUPT_NUMBER_OF_VECTORS 8
-#define CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER (CPU_INTERRUPT_NUMBER_OF_VECTORS - 1)
-
-/*
- * Should be large enough to run all RTEMS tests. This insures
- * that a "reasonable" small application should not have any problems.
- */
-
-#define CPU_STACK_MINIMUM_SIZE (2048*sizeof(unsigned32))
-
-/*
- * CPU's worst alignment requirement for data types on a byte boundary. This
- * alignment does not take into account the requirements for the stack.
- */
-
-#define CPU_ALIGNMENT 8
-
-/*
- * This number corresponds to the byte alignment requirement for the
- * heap handler. This alignment requirement may be stricter than that
- * for the data types alignment specified by CPU_ALIGNMENT. It is
- * common for the heap to follow the same alignment requirement as
- * CPU_ALIGNMENT. If the CPU_ALIGNMENT is strict enough for the heap,
- * then this should be set to CPU_ALIGNMENT.
- *
- * NOTE: This does not have to be a power of 2. It does have to
- * be greater or equal to than CPU_ALIGNMENT.
- */
-
-#define CPU_HEAP_ALIGNMENT CPU_ALIGNMENT
-
-/*
- * This number corresponds to the byte alignment requirement for memory
- * buffers allocated by the partition manager. This alignment requirement
- * may be stricter than that for the data types alignment specified by
- * CPU_ALIGNMENT. It is common for the partition to follow the same
- * alignment requirement as CPU_ALIGNMENT. If the CPU_ALIGNMENT is strict
- * enough for the partition, then this should be set to CPU_ALIGNMENT.
- *
- * NOTE: This does not have to be a power of 2. It does have to
- * be greater or equal to than CPU_ALIGNMENT.
- */
-
-#define CPU_PARTITION_ALIGNMENT CPU_ALIGNMENT
-
-/*
- * This number corresponds to the byte alignment requirement for the
- * stack. This alignment requirement may be stricter than that for the
- * data types alignment specified by CPU_ALIGNMENT. If the CPU_ALIGNMENT
- * is strict enough for the stack, then this should be set to 0.
- *
- * NOTE: This must be a power of 2 either 0 or greater than CPU_ALIGNMENT.
- */
-
-#define CPU_STACK_ALIGNMENT CPU_ALIGNMENT
-
-/* ISR handler macros */
-
-/*
- * Disable all interrupts for an RTEMS critical section. The previous
- * level is returned in _level.
- */
-
-#define _CPU_ISR_Disable( _int_level ) \
- do{ \
- _int_level = mips_disable_interrupts(); \
- }while(0)
-
-/*
- * Enable interrupts to the previous level (returned by _CPU_ISR_Disable).
- * This indicates the end of an RTEMS critical section. The parameter
- * _level is not modified.
- */
-
-#define _CPU_ISR_Enable( _level ) \
- do{ \
- mips_enable_interrupts(_level); \
- }while(0)
-
-/*
- * This temporarily restores the interrupt to _level before immediately
- * disabling them again. This is used to divide long RTEMS critical
- * sections into two or more parts. The parameter _level is not
- * modified.
- */
-
-#define _CPU_ISR_Flash( _xlevel ) \
- do{ \
- int _scratch; \
- _CPU_ISR_Enable( _xlevel ); \
- _CPU_ISR_Disable( _scratch ); \
- }while(0)
-
-/*
- * Map interrupt level in task mode onto the hardware that the CPU
- * actually provides. Currently, interrupt levels which do not
- * map onto the CPU in a generic fashion are undefined. Someday,
- * it would be nice if these were "mapped" by the application
- * via a callout. For example, m68k has 8 levels 0 - 7, levels
- * 8 - 255 would be available for bsp/application specific meaning.
- * This could be used to manage a programmable interrupt controller
- * via the rtems_task_mode directive.
- */
-extern void _CPU_ISR_Set_level( unsigned32 _new_level );
-
-unsigned32 _CPU_ISR_Get_level( void );
-
-/* end of ISR handler macros */
-
-/* Context handler macros */
-
-/*
- * Initialize the context to a state suitable for starting a
- * task after a context restore operation. Generally, this
- * involves:
- *
- * - setting a starting address
- * - preparing the stack
- * - preparing the stack and frame pointers
- * - setting the proper interrupt level in the context
- * - initializing the floating point context
- *
- * This routine generally does not set any unnecessary register
- * in the context. The state of the "general data" registers is
- * undefined at task start time.
- *
- * NOTE: This is_fp parameter is TRUE if the thread is to be a floating
- * point thread. This is typically only used on CPUs where the
- * FPU may be easily disabled by software such as on the SPARC
- * where the PSR contains an enable FPU bit.
- */
-
-#define _CPU_Context_Initialize( _the_context, _stack_base, _size, \
- _isr, _entry_point, _is_fp ) \
- { \
- unsigned32 _stack_tmp = (unsigned32)(_stack_base) + (_size) - CPU_STACK_ALIGNMENT; \
- _stack_tmp &= ~(CPU_STACK_ALIGNMENT - 1); \
- (_the_context)->sp = _stack_tmp; \
- (_the_context)->fp = _stack_tmp; \
- (_the_context)->ra = (unsigned64)_entry_point; \
- (_the_context)->c0_sr = 0; \
- }
-
-/*
- * This routine is responsible for somehow restarting the currently
- * executing task. If you are lucky, then all that is necessary
- * is restoring the context. Otherwise, there will need to be
- * a special assembly routine which does something special in this
- * case. Context_Restore should work most of the time. It will
- * not work if restarting self conflicts with the stack frame
- * assumptions of restoring a context.
- */
-
-#define _CPU_Context_Restart_self( _the_context ) \
- _CPU_Context_restore( (_the_context) );
-
-/*
- * The purpose of this macro is to allow the initial pointer into
- * A floating point context area (used to save the floating point
- * context) to be at an arbitrary place in the floating point
- * context area.
- *
- * This is necessary because some FP units are designed to have
- * their context saved as a stack which grows into lower addresses.
- * Other FP units can be saved by simply moving registers into offsets
- * from the base of the context area. Finally some FP units provide
- * a "dump context" instruction which could fill in from high to low
- * or low to high based on the whim of the CPU designers.
- */
-
-#define _CPU_Context_Fp_start( _base, _offset ) \
- ( (void *) _Addresses_Add_offset( (_base), (_offset) ) )
-
-/*
- * This routine initializes the FP context area passed to it to.
- * There are a few standard ways in which to initialize the
- * floating point context. The code included for this macro assumes
- * that this is a CPU in which a "initial" FP context was saved into
- * _CPU_Null_fp_context and it simply copies it to the destination
- * context passed to it.
- *
- * Other models include (1) not doing anything, and (2) putting
- * a "null FP status word" in the correct place in the FP context.
- */
-
-#define _CPU_Context_Initialize_fp( _destination ) \
- { \
- *((Context_Control_fp *) *((void **) _destination)) = _CPU_Null_fp_context; \
- }
-
-/* end of Context handler macros */
-
-/* Fatal Error manager macros */
-
-/*
- * This routine copies _error into a known place -- typically a stack
- * location or a register, optionally disables interrupts, and
- * halts/stops the CPU.
- */
-
-#define _CPU_Fatal_halt( _error ) \
- { \
- mips_disable_global_interrupts(); \
- mips_fatal_error(_error); \
- }
-
-/* end of Fatal Error manager macros */
-
-/* Bitfield handler macros */
-
-/*
- * This routine sets _output to the bit number of the first bit
- * set in _value. _value is of CPU dependent type Priority_Bit_map_control.
- * This type may be either 16 or 32 bits wide although only the 16
- * least significant bits will be used.
- *
- * There are a number of variables in using a "find first bit" type
- * instruction.
- *
- * (1) What happens when run on a value of zero?
- * (2) Bits may be numbered from MSB to LSB or vice-versa.
- * (3) The numbering may be zero or one based.
- * (4) The "find first bit" instruction may search from MSB or LSB.
- *
- * RTEMS guarantees that (1) will never happen so it is not a concern.
- * (2),(3), (4) are handled by the macros _CPU_Priority_mask() and
- * _CPU_Priority_bits_index(). These three form a set of routines
- * which must logically operate together. Bits in the _value are
- * set and cleared based on masks built by _CPU_Priority_mask().
- * The basic major and minor values calculated by _Priority_Major()
- * and _Priority_Minor() are "massaged" by _CPU_Priority_bits_index()
- * to properly range between the values returned by the "find first bit"
- * instruction. This makes it possible for _Priority_Get_highest() to
- * calculate the major and directly index into the minor table.
- * This mapping is necessary to ensure that 0 (a high priority major/minor)
- * is the first bit found.
- *
- * This entire "find first bit" and mapping process depends heavily
- * on the manner in which a priority is broken into a major and minor
- * components with the major being the 4 MSB of a priority and minor
- * the 4 LSB. Thus (0 << 4) + 0 corresponds to priority 0 -- the highest
- * priority. And (15 << 4) + 14 corresponds to priority 254 -- the next
- * to the lowest priority.
- *
- * If your CPU does not have a "find first bit" instruction, then
- * there are ways to make do without it. Here are a handful of ways
- * to implement this in software:
- *
- * - a series of 16 bit test instructions
- * - a "binary search using if's"
- * - _number = 0
- * if _value > 0x00ff
- * _value >>=8
- * _number = 8;
- *
- * if _value > 0x0000f
- * _value >=8
- * _number += 4
- *
- * _number += bit_set_table[ _value ]
- *
- * where bit_set_table[ 16 ] has values which indicate the first
- * bit set
- */
-
-#define CPU_USE_GENERIC_BITFIELD_CODE TRUE
-#define CPU_USE_GENERIC_BITFIELD_DATA TRUE
-
-#if (CPU_USE_GENERIC_BITFIELD_CODE == FALSE)
-
-#define _CPU_Bitfield_Find_first_bit( _value, _output ) \
- { \
- (_output) = 0; /* do something to prevent warnings */ \
- }
-
-#endif
-
-/* end of Bitfield handler macros */
-
-/*
- * This routine builds the mask which corresponds to the bit fields
- * as searched by _CPU_Bitfield_Find_first_bit(). See the discussion
- * for that routine.
- */
-
-#if (CPU_USE_GENERIC_BITFIELD_CODE == FALSE)
-
-#define _CPU_Priority_Mask( _bit_number ) \
- ( 1 << (_bit_number) )
-
-#endif
-
-/*
- * This routine translates the bit numbers returned by
- * _CPU_Bitfield_Find_first_bit() into something suitable for use as
- * a major or minor component of a priority. See the discussion
- * for that routine.
- */
-
-#if (CPU_USE_GENERIC_BITFIELD_CODE == FALSE)
-
-#define _CPU_Priority_bits_index( _priority ) \
- (_priority)
-
-#endif
-
-/* end of Priority handler macros */
-
-/* functions */
-
-/*
- * _CPU_Initialize
- *
- * This routine performs CPU dependent initialization.
- */
-
-void _CPU_Initialize(
- rtems_cpu_table *cpu_table,
- void (*thread_dispatch)
-);
-
-/*
- * _CPU_ISR_install_raw_handler
- *
- * This routine installs a "raw" interrupt handler directly into the
- * processor's vector table.
- */
-
-void _CPU_ISR_install_raw_handler(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-);
-
-/*
- * _CPU_ISR_install_vector
- *
- * This routine installs an interrupt vector.
- */
-
-void _CPU_ISR_install_vector(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-);
-
-/*
- * _CPU_Install_interrupt_stack
- *
- * This routine installs the hardware interrupt stack pointer.
- *
- * NOTE: It need only be provided if CPU_HAS_HARDWARE_INTERRUPT_STACK
- * is TRUE.
- */
-
-void _CPU_Install_interrupt_stack( void );
-
-/*
- * _CPU_Internal_threads_Idle_thread_body
- *
- * This routine is the CPU dependent IDLE thread body.
- *
- * NOTE: It need only be provided if CPU_PROVIDES_IDLE_THREAD_BODY
- * is TRUE.
- */
-
-void _CPU_Thread_Idle_body( void );
-
-/*
- * _CPU_Context_switch
- *
- * This routine switches from the run context to the heir context.
- */
-
-void _CPU_Context_switch(
- Context_Control *run,
- Context_Control *heir
-);
-
-/*
- * _CPU_Context_restore
- *
- * This routine is generally used only to restart self in an
- * efficient manner. It may simply be a label in _CPU_Context_switch.
- *
- * NOTE: May be unnecessary to reload some registers.
- */
-
-void _CPU_Context_restore(
- Context_Control *new_context
-);
-
-/*
- * _CPU_Context_save_fp
- *
- * This routine saves the floating point context passed to it.
- */
-
-void _CPU_Context_save_fp(
- void **fp_context_ptr
-);
-
-/*
- * _CPU_Context_restore_fp
- *
- * This routine restores the floating point context passed to it.
- */
-
-void _CPU_Context_restore_fp(
- void **fp_context_ptr
-);
-
-/* The following routine swaps the endian format of an unsigned int.
- * It must be static because it is referenced indirectly.
- *
- * This version will work on any processor, but if there is a better
- * way for your CPU PLEASE use it. The most common way to do this is to:
- *
- * swap least significant two bytes with 16-bit rotate
- * swap upper and lower 16-bits
- * swap most significant two bytes with 16-bit rotate
- *
- * Some CPUs have special instructions which swap a 32-bit quantity in
- * a single instruction (e.g. i486). It is probably best to avoid
- * an "endian swapping control bit" in the CPU. One good reason is
- * that interrupts would probably have to be disabled to insure that
- * an interrupt does not try to access the same "chunk" with the wrong
- * endian. Another good reason is that on some CPUs, the endian bit
- * endianness for ALL fetches -- both code and data -- so the code
- * will be fetched incorrectly.
- */
-
-static inline unsigned int CPU_swap_u32(
- unsigned int value
-)
-{
- unsigned32 byte1, byte2, byte3, byte4, swapped;
-
- byte4 = (value >> 24) & 0xff;
- byte3 = (value >> 16) & 0xff;
- byte2 = (value >> 8) & 0xff;
- byte1 = value & 0xff;
-
- swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
- return( swapped );
-}
-
-#define CPU_swap_u16( value ) \
- (((value&0xff) << 8) | ((value >> 8)&0xff))
-
-/*
- * Miscellaneous prototypes
- *
- * NOTE: The names should have mips64orion in them.
- */
-
-void disable_int( unsigned32 mask );
-void enable_int( unsigned32 mask );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/cpukit/score/cpu/mips/rtems/score/mips.h b/cpukit/score/cpu/mips/rtems/score/mips.h
deleted file mode 100644
index 1ff139f604..0000000000
--- a/cpukit/score/cpu/mips/rtems/score/mips.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/* mips64orion.h
- *
- * Author: Craig Lebakken <craigl@transition.com>
- *
- * COPYRIGHT (c) 1996 by Transition Networks Inc.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Transition Networks not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * Transition Networks makes no representations about the suitability
- * of this software for any purpose.
- *
- * Derived from c/src/exec/score/cpu/no_cpu/no_cpu.h:
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-/* @(#)mips64orion.h 08/29/96 1.3 */
-
-#ifndef _INCLUDE_MIPS64ORION_h
-#define _INCLUDE_MIPS64ORION_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This file contains the information required to build
- * RTEMS for a particular member of the "no cpu"
- * family when executing in protected mode. It does
- * this by setting variables to indicate which implementation
- * dependent features are present in a particular member
- * of the family.
- */
-
-#if defined(R4650)
-
-#define CPU_MODEL_NAME "R4650"
-#define MIPS64ORION_HAS_FPU 1
-
-#elif defined(R4600)
-
-#define CPU_MODEL_NAME "R4600"
-#define MIPS64ORION_HAS_FPU 1
-
-#else
-
-#error "Unsupported CPU Model"
-
-#endif
-
-/*
- * Define the name of the CPU family.
- */
-
-#define CPU_NAME "MIPS R46xxx"
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* ! _INCLUDE_MIPS64ORION_h */
-/* end of include file */
diff --git a/cpukit/score/cpu/mips/rtems/score/types.h b/cpukit/score/cpu/mips/rtems/score/types.h
deleted file mode 100644
index 9d82f2a5d0..0000000000
--- a/cpukit/score/cpu/mips/rtems/score/types.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* mipstypes.h
- *
- * This include file contains type definitions pertaining to the IDT 4650
- * processor family.
- *
- * Author: Craig Lebakken <craigl@transition.com>
- *
- * COPYRIGHT (c) 1996 by Transition Networks Inc.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Transition Networks not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * Transition Networks makes no representations about the suitability
- * of this software for any purpose.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-/* @(#)mipstypes.h 08/20/96 1.4 */
-
-#ifndef __MIPS_TYPES_h
-#define __MIPS_TYPES_h
-
-#ifndef ASM
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This section defines the basic types for this processor.
- */
-
-typedef unsigned char unsigned8; /* unsigned 8-bit integer */
-typedef unsigned short unsigned16; /* unsigned 16-bit integer */
-typedef unsigned int unsigned32; /* unsigned 32-bit integer */
-typedef unsigned long long unsigned64; /* unsigned 64-bit integer */
-
-typedef unsigned16 Priority_Bit_map_control;
-
-typedef signed char signed8; /* 8-bit signed integer */
-typedef signed short signed16; /* 16-bit signed integer */
-typedef signed int signed32; /* 32-bit signed integer */
-typedef signed long long signed64; /* 64 bit signed integer */
-
-typedef unsigned32 boolean; /* Boolean value */
-
-typedef float single_precision; /* single precision float */
-typedef double double_precision; /* double precision float */
-
-typedef void mips_isr;
-typedef void ( *mips_isr_entry )( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !ASM */
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/cpu/mips64orion/Makefile.am b/cpukit/score/cpu/mips64orion/Makefile.am
deleted file mode 100644
index b54cb49ded..0000000000
--- a/cpukit/score/cpu/mips64orion/Makefile.am
+++ /dev/null
@@ -1,49 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-
-SUBDIRS = rtems
-
-C_FILES = cpu.c
-C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
-
-H_FILES = asm.h cpu_asm.h idtcpu.h idtmon.h iregdef.h
-
-S_FILES = cpu_asm.S
-S_O_FILES = $(S_FILES:%.S=$(ARCH)/%.o)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../../../../automake/lib.am
-
-$(PROJECT_INCLUDE):
- $(mkinstalldirs) $@
-
-$(PROJECT_INCLUDE)/%.h: %.h
- $(INSTALL_DATA) $< $@
-
-$(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o: $(ARCH)/rtems.o
- $(INSTALL_DATA) $< $@
-
-REL = $(ARCH)/rtems-cpu.rel
-
-rtems_cpu_rel_OBJECTS = $(C_O_FILES) $(S_O_FILES)
-
-$(REL): $(rtems_cpu_rel_OBJECTS)
- $(make-rel)
-
-PREINSTALL_FILES += $(PROJECT_INCLUDE) $(H_FILES:%=$(PROJECT_INCLUDE)/%)
-
-TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o
-
-all-local: $(ARCH) $(PREINSTALL_FILES) $(rtems_cpu_rel_OBJECTS) $(REL) $(TMPINSTALL_FILES)
-
-.PRECIOUS: $(REL)
-
-EXTRA_DIST = asm.h cpu.c cpu_asm.S cpu_asm.h idtcpu.h idtmon.h iregdef.h \
- rtems.c
-
-include $(top_srcdir)/../../../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/cpukit/score/cpu/mips64orion/asm.h b/cpukit/score/cpu/mips64orion/asm.h
deleted file mode 100644
index 2d322c2339..0000000000
--- a/cpukit/score/cpu/mips64orion/asm.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/* asm.h
- *
- * This include file attempts to address the problems
- * caused by incompatible flavors of assemblers and
- * toolsets. It primarily addresses variations in the
- * use of leading underscores on symbols and the requirement
- * that register names be preceded by a %.
- *
- *
- * NOTE: The spacing in the use of these macros
- * is critical to them working as advertised.
- *
- * COPYRIGHT:
- *
- * This file is based on similar code found in newlib available
- * from ftp.cygnus.com. The file which was used had no copyright
- * notice. This file is freely distributable as long as the source
- * of the file is noted. This file is:
- *
- * COPYRIGHT (c) 1994-1997.
- * On-Line Applications Research Corporation (OAR).
- *
- * $Id$
- */
-/* @(#)asm.h 03/15/96 1.1 */
-
-#ifndef __NO_CPU_ASM_h
-#define __NO_CPU_ASM_h
-
-/*
- * Indicate we are in an assembly file and get the basic CPU definitions.
- */
-
-#ifndef ASM
-#define ASM
-#endif
-#include <rtems/score/targopts.h>
-#include <rtems/score/mips64orion.h>
-
-/*
- * Recent versions of GNU cpp define variables which indicate the
- * need for underscores and percents. If not using GNU cpp or
- * the version does not support this, then you will obviously
- * have to define these as appropriate.
- */
-
-#ifndef __USER_LABEL_PREFIX__
-#define __USER_LABEL_PREFIX__ _
-#endif
-
-#ifndef __REGISTER_PREFIX__
-#define __REGISTER_PREFIX__
-#endif
-
-/* ANSI concatenation macros. */
-
-#define CONCAT1(a, b) CONCAT2(a, b)
-#define CONCAT2(a, b) a ## b
-
-/* Use the right prefix for global labels. */
-
-#define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
-
-/* Use the right prefix for registers. */
-
-#define REG(x) CONCAT1 (__REGISTER_PREFIX__, x)
-
-/*
- * define macros for all of the registers on this CPU
- *
- * EXAMPLE: #define d0 REG (d0)
- */
-
-/*
- * Define macros to handle section beginning and ends.
- */
-
-
-#define BEGIN_CODE_DCL .text
-#define END_CODE_DCL
-#define BEGIN_DATA_DCL .data
-#define END_DATA_DCL
-#define BEGIN_CODE .text
-#define END_CODE
-#define BEGIN_DATA
-#define END_DATA
-#define BEGIN_BSS
-#define END_BSS
-#define END
-
-/*
- * Following must be tailor for a particular flavor of the C compiler.
- * They may need to put underscores in front of the symbols.
- */
-
-#define PUBLIC(sym) .globl SYM (sym)
-#define EXTERN(sym) .globl SYM (sym)
-
-#endif
-/* end of include file */
-
-
diff --git a/cpukit/score/cpu/mips64orion/cpu.c b/cpukit/score/cpu/mips64orion/cpu.c
deleted file mode 100644
index 8d05c336c4..0000000000
--- a/cpukit/score/cpu/mips64orion/cpu.c
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- * Mips CPU Dependent Source
- *
- * Author: Craig Lebakken <craigl@transition.com>
- *
- * COPYRIGHT (c) 1996 by Transition Networks Inc.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Transition Networks not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * Transition Networks makes no representations about the suitability
- * of this software for any purpose.
- *
- * Derived from c/src/exec/score/cpu/no_cpu/cpu.c:
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-/*
- * Rather than deleting this, it is commented out to (hopefully) help
- * the submitter send updates.
- *
- * static char _sccsid[] = "@(#)cpu.c 08/20/96 1.5\n";
- */
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/wkspace.h>
-
-
-ISR_Handler_entry _ISR_Vector_table[ ISR_NUMBER_OF_VECTORS ];
-
-/* _CPU_Initialize
- *
- * This routine performs processor dependent initialization.
- *
- * INPUT PARAMETERS:
- * cpu_table - CPU table to initialize
- * thread_dispatch - address of disptaching routine
- */
-
-
-void null_handler( void )
-{
-}
-
-
-void _CPU_Initialize(
- rtems_cpu_table *cpu_table,
- void (*thread_dispatch) /* ignored on this CPU */
-)
-{
- unsigned int i = ISR_NUMBER_OF_VECTORS;
-
- while ( i-- )
- {
- _ISR_Vector_table[i] = (ISR_Handler_entry)null_handler;
- }
-
- /*
- * The thread_dispatch argument is the address of the entry point
- * for the routine called at the end of an ISR once it has been
- * decided a context switch is necessary. On some compilation
- * systems it is difficult to call a high-level language routine
- * from assembly. This allows us to trick these systems.
- *
- * If you encounter this problem save the entry point in a CPU
- * dependent variable.
- */
-
- _CPU_Thread_dispatch_pointer = thread_dispatch;
-
- /*
- * If there is not an easy way to initialize the FP context
- * during Context_Initialize, then it is usually easier to
- * save an "uninitialized" FP context here and copy it to
- * the task's during Context_Initialize.
- */
-
- /* FP context initialization support goes here */
-
- _CPU_Table = *cpu_table;
-
-}
-
-/*PAGE
- *
- * _CPU_ISR_Get_level
- */
-
-#if 0 /* located in cpu_asm.S */
-unsigned32 _CPU_ISR_Get_level( void )
-{
- /*
- * This routine returns the current interrupt level.
- */
-}
-#endif
-
-/*PAGE
- *
- * _CPU_ISR_install_raw_handler
- */
-
-void _CPU_ISR_install_raw_handler(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-)
-{
- /*
- * This is where we install the interrupt handler into the "raw" interrupt
- * table used by the CPU to dispatch interrupt handlers.
- */
-
-#if 0 /* not necessary */
-/* use IDT/Sim to set interrupt vector. Needed to co-exist with debugger. */
- add_ext_int_func( vector, new_handler );
-#endif
-}
-
-/*PAGE
- *
- * _CPU_ISR_install_vector
- *
- * This kernel routine installs the RTEMS handler for the
- * specified vector.
- *
- * Input parameters:
- * vector - interrupt vector number
- * old_handler - former ISR for this vector number
- * new_handler - replacement ISR for this vector number
- *
- * Output parameters: NONE
- *
- */
-
-void _CPU_ISR_install_vector(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-)
-{
- *old_handler = _ISR_Vector_table[ vector ];
-
- /*
- * If the interrupt vector table is a table of pointer to isr entry
- * points, then we need to install the appropriate RTEMS interrupt
- * handler for this vector number.
- */
-
- _CPU_ISR_install_raw_handler( vector, _ISR_Handler, old_handler );
-
- /*
- * We put the actual user ISR address in '_ISR_vector_table'. This will
- * be used by the _ISR_Handler so the user gets control.
- */
-
- _ISR_Vector_table[ vector ] = new_handler;
-}
-
-/*PAGE
- *
- * _CPU_Install_interrupt_stack
- */
-
-void _CPU_Install_interrupt_stack( void )
-{
-/* we don't support this yet */
-}
-
-/*PAGE
- *
- * _CPU_Internal_threads_Idle_thread_body
- *
- * NOTES:
- *
- * 1. This is the same as the regular CPU independent algorithm.
- *
- * 2. If you implement this using a "halt", "idle", or "shutdown"
- * instruction, then don't forget to put it in an infinite loop.
- *
- * 3. Be warned. Some processors with onboard DMA have been known
- * to stop the DMA if the CPU were put in IDLE mode. This might
- * also be a problem with other on-chip peripherals. So use this
- * hook with caution.
- */
-
-#if 0 /* located in cpu_asm.S */
-void _CPU_Thread_Idle_body( void )
-{
-
- for( ; ; )
- /* insert your "halt" instruction here */ ;
-}
-#endif
-
-extern void mips_break( int error );
-
-#include <stdio.h>
-
-void mips_fatal_error( int error )
-{
- printf("fatal error 0x%x %d\n",error,error);
- mips_break( error );
-}
diff --git a/cpukit/score/cpu/mips64orion/cpu_asm.S b/cpukit/score/cpu/mips64orion/cpu_asm.S
deleted file mode 100644
index 4acebc663e..0000000000
--- a/cpukit/score/cpu/mips64orion/cpu_asm.S
+++ /dev/null
@@ -1,971 +0,0 @@
-/* cpu_asm.S
- *
- * This file contains the basic algorithms for all assembly code used
- * in an specific CPU port of RTEMS. These algorithms must be implemented
- * in assembly language
- *
- * Author: Craig Lebakken <craigl@transition.com>
- *
- * COPYRIGHT (c) 1996 by Transition Networks Inc.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Transition Networks not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * Transition Networks makes no representations about the suitability
- * of this software for any purpose.
- *
- * Derived from c/src/exec/score/cpu/no_cpu/cpu_asm.s:
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-/* @(#)cpu_asm.S 08/20/96 1.15 */
-
-#include "cpu_asm.h"
-
-#include "iregdef.h"
-#include "idtcpu.h"
-
-#define FRAME(name,frm_reg,offset,ret_reg) \
- .globl name; \
- .ent name; \
-name:; \
- .frame frm_reg,offset,ret_reg
-#define ENDFRAME(name) \
- .end name
-
-
-#define EXCP_STACK_SIZE (NREGS*R_SZ)
-
-#if __ghs__
-#define sd sw
-#define ld lw
-#define dmtc0 mtc0
-#define dsll sll
-#define dmfc0 mfc0
-#endif
-
-#if 1 /* 32 bit unsigned32 types */
-#define sint sw
-#define lint lw
-#define stackadd addiu
-#define intadd addu
-#define SZ_INT 4
-#define SZ_INT_POW2 2
-#else /* 64 bit unsigned32 types */
-#define sint dw
-#define lint dw
-#define stackadd daddiu
-#define intadd daddu
-#define SZ_INT 8
-#define SZ_INT_POW2 3
-#endif
-
-#ifdef __GNUC__
-#define EXTERN(x,size) .extern x,size
-#else
-#define EXTERN(x,size)
-#endif
-
-/* NOTE: these constants must match the Context_Control structure in cpu.h */
-#define S0_OFFSET 0
-#define S1_OFFSET 1
-#define S2_OFFSET 2
-#define S3_OFFSET 3
-#define S4_OFFSET 4
-#define S5_OFFSET 5
-#define S6_OFFSET 6
-#define S7_OFFSET 7
-#define SP_OFFSET 8
-#define FP_OFFSET 9
-#define RA_OFFSET 10
-#define C0_SR_OFFSET 11
-#define C0_EPC_OFFSET 12
-
-/* NOTE: these constants must match the Context_Control_fp structure in cpu.h */
-#define FP0_OFFSET 0
-#define FP1_OFFSET 1
-#define FP2_OFFSET 2
-#define FP3_OFFSET 3
-#define FP4_OFFSET 4
-#define FP5_OFFSET 5
-#define FP6_OFFSET 6
-#define FP7_OFFSET 7
-#define FP8_OFFSET 8
-#define FP9_OFFSET 9
-#define FP10_OFFSET 10
-#define FP11_OFFSET 11
-#define FP12_OFFSET 12
-#define FP13_OFFSET 13
-#define FP14_OFFSET 14
-#define FP15_OFFSET 15
-#define FP16_OFFSET 16
-#define FP17_OFFSET 17
-#define FP18_OFFSET 18
-#define FP19_OFFSET 19
-#define FP20_OFFSET 20
-#define FP21_OFFSET 21
-#define FP22_OFFSET 22
-#define FP23_OFFSET 23
-#define FP24_OFFSET 24
-#define FP25_OFFSET 25
-#define FP26_OFFSET 26
-#define FP27_OFFSET 27
-#define FP28_OFFSET 28
-#define FP29_OFFSET 29
-#define FP30_OFFSET 30
-#define FP31_OFFSET 31
-
-
-/*PAGE
- *
- * _CPU_ISR_Get_level
- */
-
-#if 0
-unsigned32 _CPU_ISR_Get_level( void )
-{
- /*
- * This routine returns the current interrupt level.
- */
-}
-#endif
-/* return the current exception level for the 4650 */
-FRAME(_CPU_ISR_Get_level,sp,0,ra)
- mfc0 v0,C0_SR
- nop
- andi v0,SR_EXL
- srl v0,1
- j ra
-ENDFRAME(_CPU_ISR_Get_level)
-
-FRAME(_CPU_ISR_Set_level,sp,0,ra)
- nop
- mfc0 v0,C0_SR
- nop
- andi v0,SR_EXL
- beqz v0,_CPU_ISR_Set_1 /* normalize v0 */
- nop
- li v0,1
-_CPU_ISR_Set_1:
- beq v0,a0,_CPU_ISR_Set_exit /* if (current_level != new_level ) */
- nop
- bnez a0,_CPU_ISR_Set_2
- nop
- nop
- mfc0 t0,C0_SR
- nop
- li t1,~SR_EXL
- and t0,t1
- nop
- mtc0 t0,C0_SR /* disable exception level */
- nop
- j ra
- nop
-_CPU_ISR_Set_2:
- nop
- mfc0 t0,C0_SR
- nop
- li t1,~SR_IE
- and t0,t1
- nop
- mtc0 t0,C0_SR /* first disable ie bit (recommended) */
- nop
- ori t0,SR_EXL|SR_IE /* enable exception level */
- nop
- mtc0 t0,C0_SR
- nop
-_CPU_ISR_Set_exit:
- j ra
- nop
-ENDFRAME(_CPU_ISR_Set_level)
-
-/*
- * _CPU_Context_save_fp_context
- *
- * This routine is responsible for saving the FP context
- * at *fp_context_ptr. If the point to load the FP context
- * from is changed then the pointer is modified by this routine.
- *
- * Sometimes a macro implementation of this is in cpu.h which dereferences
- * the ** and a similarly named routine in this file is passed something
- * like a (Context_Control_fp *). The general rule on making this decision
- * is to avoid writing assembly language.
- */
-
-/* void _CPU_Context_save_fp(
- * void **fp_context_ptr
- * )
- * {
- * }
- */
-
-FRAME(_CPU_Context_save_fp,sp,0,ra)
- .set noat
- ld a1,(a0)
- swc1 $f0,FP0_OFFSET*4(a1)
- swc1 $f1,FP1_OFFSET*4(a1)
- swc1 $f2,FP2_OFFSET*4(a1)
- swc1 $f3,FP3_OFFSET*4(a1)
- swc1 $f4,FP4_OFFSET*4(a1)
- swc1 $f5,FP5_OFFSET*4(a1)
- swc1 $f6,FP6_OFFSET*4(a1)
- swc1 $f7,FP7_OFFSET*4(a1)
- swc1 $f8,FP8_OFFSET*4(a1)
- swc1 $f9,FP9_OFFSET*4(a1)
- swc1 $f10,FP10_OFFSET*4(a1)
- swc1 $f11,FP11_OFFSET*4(a1)
- swc1 $f12,FP12_OFFSET*4(a1)
- swc1 $f13,FP13_OFFSET*4(a1)
- swc1 $f14,FP14_OFFSET*4(a1)
- swc1 $f15,FP15_OFFSET*4(a1)
- swc1 $f16,FP16_OFFSET*4(a1)
- swc1 $f17,FP17_OFFSET*4(a1)
- swc1 $f18,FP18_OFFSET*4(a1)
- swc1 $f19,FP19_OFFSET*4(a1)
- swc1 $f20,FP20_OFFSET*4(a1)
- swc1 $f21,FP21_OFFSET*4(a1)
- swc1 $f22,FP22_OFFSET*4(a1)
- swc1 $f23,FP23_OFFSET*4(a1)
- swc1 $f24,FP24_OFFSET*4(a1)
- swc1 $f25,FP25_OFFSET*4(a1)
- swc1 $f26,FP26_OFFSET*4(a1)
- swc1 $f27,FP27_OFFSET*4(a1)
- swc1 $f28,FP28_OFFSET*4(a1)
- swc1 $f29,FP29_OFFSET*4(a1)
- swc1 $f30,FP30_OFFSET*4(a1)
- swc1 $f31,FP31_OFFSET*4(a1)
- j ra
- nop
- .set at
-ENDFRAME(_CPU_Context_save_fp)
-
-/*
- * _CPU_Context_restore_fp_context
- *
- * This routine is responsible for restoring the FP context
- * at *fp_context_ptr. If the point to load the FP context
- * from is changed then the pointer is modified by this routine.
- *
- * Sometimes a macro implementation of this is in cpu.h which dereferences
- * the ** and a similarly named routine in this file is passed something
- * like a (Context_Control_fp *). The general rule on making this decision
- * is to avoid writing assembly language.
- */
-
-/* void _CPU_Context_restore_fp(
- * void **fp_context_ptr
- * )
- * {
- * }
- */
-
-FRAME(_CPU_Context_restore_fp,sp,0,ra)
- .set noat
- ld a1,(a0)
- lwc1 $f0,FP0_OFFSET*4(a1)
- lwc1 $f1,FP1_OFFSET*4(a1)
- lwc1 $f2,FP2_OFFSET*4(a1)
- lwc1 $f3,FP3_OFFSET*4(a1)
- lwc1 $f4,FP4_OFFSET*4(a1)
- lwc1 $f5,FP5_OFFSET*4(a1)
- lwc1 $f6,FP6_OFFSET*4(a1)
- lwc1 $f7,FP7_OFFSET*4(a1)
- lwc1 $f8,FP8_OFFSET*4(a1)
- lwc1 $f9,FP9_OFFSET*4(a1)
- lwc1 $f10,FP10_OFFSET*4(a1)
- lwc1 $f11,FP11_OFFSET*4(a1)
- lwc1 $f12,FP12_OFFSET*4(a1)
- lwc1 $f13,FP13_OFFSET*4(a1)
- lwc1 $f14,FP14_OFFSET*4(a1)
- lwc1 $f15,FP15_OFFSET*4(a1)
- lwc1 $f16,FP16_OFFSET*4(a1)
- lwc1 $f17,FP17_OFFSET*4(a1)
- lwc1 $f18,FP18_OFFSET*4(a1)
- lwc1 $f19,FP19_OFFSET*4(a1)
- lwc1 $f20,FP20_OFFSET*4(a1)
- lwc1 $f21,FP21_OFFSET*4(a1)
- lwc1 $f22,FP22_OFFSET*4(a1)
- lwc1 $f23,FP23_OFFSET*4(a1)
- lwc1 $f24,FP24_OFFSET*4(a1)
- lwc1 $f25,FP25_OFFSET*4(a1)
- lwc1 $f26,FP26_OFFSET*4(a1)
- lwc1 $f27,FP27_OFFSET*4(a1)
- lwc1 $f28,FP28_OFFSET*4(a1)
- lwc1 $f29,FP29_OFFSET*4(a1)
- lwc1 $f30,FP30_OFFSET*4(a1)
- lwc1 $f31,FP31_OFFSET*4(a1)
- j ra
- nop
- .set at
-ENDFRAME(_CPU_Context_restore_fp)
-
-/* _CPU_Context_switch
- *
- * This routine performs a normal non-FP context switch.
- */
-
-/* void _CPU_Context_switch(
- * Context_Control *run,
- * Context_Control *heir
- * )
- * {
- * }
- */
-
-FRAME(_CPU_Context_switch,sp,0,ra)
-
- mfc0 t0,C0_SR
- li t1,~SR_IE
- sd t0,C0_SR_OFFSET*8(a0) /* save status register */
- and t0,t1
- mtc0 t0,C0_SR /* first disable ie bit (recommended) */
- ori t0,SR_EXL|SR_IE /* enable exception level to disable interrupts */
- mtc0 t0,C0_SR
-
- sd ra,RA_OFFSET*8(a0) /* save current context */
- sd sp,SP_OFFSET*8(a0)
- sd fp,FP_OFFSET*8(a0)
- sd s0,S0_OFFSET*8(a0)
- sd s1,S1_OFFSET*8(a0)
- sd s2,S2_OFFSET*8(a0)
- sd s3,S3_OFFSET*8(a0)
- sd s4,S4_OFFSET*8(a0)
- sd s5,S5_OFFSET*8(a0)
- sd s6,S6_OFFSET*8(a0)
- sd s7,S7_OFFSET*8(a0)
- dmfc0 t0,C0_EPC
- sd t0,C0_EPC_OFFSET*8(a0)
-
-_CPU_Context_switch_restore:
- ld s0,S0_OFFSET*8(a1) /* restore context */
- ld s1,S1_OFFSET*8(a1)
- ld s2,S2_OFFSET*8(a1)
- ld s3,S3_OFFSET*8(a1)
- ld s4,S4_OFFSET*8(a1)
- ld s5,S5_OFFSET*8(a1)
- ld s6,S6_OFFSET*8(a1)
- ld s7,S7_OFFSET*8(a1)
- ld fp,FP_OFFSET*8(a1)
- ld sp,SP_OFFSET*8(a1)
- ld ra,RA_OFFSET*8(a1)
- ld t0,C0_EPC_OFFSET*8(a1)
- dmtc0 t0,C0_EPC
- ld t0,C0_SR_OFFSET*8(a1)
- andi t0,SR_EXL
- bnez t0,_CPU_Context_1 /* set exception level from restore context */
- li t0,~SR_EXL
- mfc0 t1,C0_SR
- nop
- and t1,t0
- mtc0 t1,C0_SR
-_CPU_Context_1:
- j ra
- nop
-ENDFRAME(_CPU_Context_switch)
-
-/*
- * _CPU_Context_restore
- *
- * This routine is generally used only to restart self in an
- * efficient manner. It may simply be a label in _CPU_Context_switch.
- *
- * NOTE: May be unnecessary to reload some registers.
- */
-
-#if 0
-void _CPU_Context_restore(
- Context_Control *new_context
-)
-{
-}
-#endif
-
-FRAME(_CPU_Context_restore,sp,0,ra)
- dadd a1,a0,zero
- j _CPU_Context_switch_restore
- nop
-ENDFRAME(_CPU_Context_restore)
-
-EXTERN(_ISR_Nest_level, SZ_INT)
-EXTERN(_Thread_Dispatch_disable_level,SZ_INT)
-EXTERN(_Context_Switch_necessary,SZ_INT)
-EXTERN(_ISR_Signals_to_thread_executing,SZ_INT)
-.extern _Thread_Dispatch
-.extern _ISR_Vector_table
-
-/* void __ISR_Handler()
- *
- * This routine provides the RTEMS interrupt management.
- *
- */
-
-#if 0
-void _ISR_Handler()
-{
- /*
- * This discussion ignores a lot of the ugly details in a real
- * implementation such as saving enough registers/state to be
- * able to do something real. Keep in mind that the goal is
- * to invoke a user's ISR handler which is written in C and
- * uses a certain set of registers.
- *
- * Also note that the exact order is to a large extent flexible.
- * Hardware will dictate a sequence for a certain subset of
- * _ISR_Handler while requirements for setting
- */
-
- /*
- * At entry to "common" _ISR_Handler, the vector number must be
- * available. On some CPUs the hardware puts either the vector
- * number or the offset into the vector table for this ISR in a
- * known place. If the hardware does not give us this information,
- * then the assembly portion of RTEMS for this port will contain
- * a set of distinct interrupt entry points which somehow place
- * the vector number in a known place (which is safe if another
- * interrupt nests this one) and branches to _ISR_Handler.
- *
- */
-#endif
-FRAME(_ISR_Handler,sp,0,ra)
-.set noreorder
-#if USE_IDTKIT
-/* IDT/Kit incorrectly adds 4 to EPC before returning. This compensates */
- lreg k0, R_EPC*R_SZ(sp)
- daddiu k0,k0,-4
- sreg k0, R_EPC*R_SZ(sp)
- lreg k0, R_CAUSE*R_SZ(sp)
- li k1, ~CAUSE_BD
- and k0, k1
- sreg k0, R_CAUSE*R_SZ(sp)
-#endif
-
-/* save registers not already saved by IDT/sim */
- stackadd sp,sp,-EXCP_STACK_SIZE /* store ra on the stack */
-
- sreg ra, R_RA*R_SZ(sp)
- sreg v0, R_V0*R_SZ(sp)
- sreg v1, R_V1*R_SZ(sp)
- sreg a0, R_A0*R_SZ(sp)
- sreg a1, R_A1*R_SZ(sp)
- sreg a2, R_A2*R_SZ(sp)
- sreg a3, R_A3*R_SZ(sp)
- sreg t0, R_T0*R_SZ(sp)
- sreg t1, R_T1*R_SZ(sp)
- sreg t2, R_T2*R_SZ(sp)
- sreg t3, R_T3*R_SZ(sp)
- sreg t4, R_T4*R_SZ(sp)
- sreg t5, R_T5*R_SZ(sp)
- sreg t6, R_T6*R_SZ(sp)
- sreg t7, R_T7*R_SZ(sp)
- mflo k0
- sreg t8, R_T8*R_SZ(sp)
- sreg k0, R_MDLO*R_SZ(sp)
- sreg t9, R_T9*R_SZ(sp)
- mfhi k0
- sreg gp, R_GP*R_SZ(sp)
- sreg fp, R_FP*R_SZ(sp)
- sreg k0, R_MDHI*R_SZ(sp)
- .set noat
- sreg AT, R_AT*R_SZ(sp)
- .set at
-
- stackadd sp,sp,-40 /* store ra on the stack */
- sd ra,32(sp)
-
-/* determine if an interrupt generated this exception */
- mfc0 k0,C0_CAUSE
- and k1,k0,CAUSE_EXCMASK
- bnez k1,_ISR_Handler_prom_exit /* not an external interrupt, pass exception to Monitor */
- mfc0 k1,C0_SR
- and k0,k1
- and k0,CAUSE_IPMASK
- beq k0,zero,_ISR_Handler_quick_exit /* external interrupt not enabled, ignore */
- nop
-
- /*
- * save some or all context on stack
- * may need to save some special interrupt information for exit
- *
- * #if ( CPU_HAS_SOFTWARE_INTERRUPT_STACK == TRUE )
- * if ( _ISR_Nest_level == 0 )
- * switch to software interrupt stack
- * #endif
- */
-#if ( CPU_HAS_SOFTWARE_INTERRUPT_STACK == TRUE )
- lint t0,_ISR_Nest_level
- beq t0, zero, _ISR_Handler_1
- nop
- /* switch stacks */
-_ISR_Handler_1:
-#else
- lint t0,_ISR_Nest_level
-#endif
- /*
- * _ISR_Nest_level++;
- */
- addi t0,t0,1
- sint t0,_ISR_Nest_level
- /*
- * _Thread_Dispatch_disable_level++;
- */
- lint t1,_Thread_Dispatch_disable_level
- addi t1,t1,1
- sint t1,_Thread_Dispatch_disable_level
-#if 0
- nop
- j _ISR_Handler_4
- nop
- /*
- * while ( interrupts_pending(cause_reg) ) {
- * vector = BITFIELD_TO_INDEX(cause_reg);
- * (*_ISR_Vector_table[ vector ])( vector );
- * }
- */
-_ISR_Handler_2:
-/* software interrupt priorities can be applied here */
- li t1,-1
-/* convert bit field into interrupt index */
-_ISR_Handler_3:
- andi t2,t0,1
- addi t1,1
- beql t2,zero,_ISR_Handler_3
- dsrl t0,1
- li t1,7
- dsll t1,3 /* convert index to byte offset (*8) */
- la t3,_ISR_Vector_table
- intadd t1,t3
- lint t1,(t1)
- jalr t1
- nop
- j _ISR_Handler_5
- nop
-_ISR_Handler_4:
- mfc0 t0,C0_CAUSE
- andi t0,CAUSE_IPMASK
- bne t0,zero,_ISR_Handler_2
- dsrl t0,t0,8
-_ISR_Handler_5:
-#else
- nop
- li t1,7
- dsll t1,t1,SZ_INT_POW2
- la t3,_ISR_Vector_table
- intadd t1,t3
- lint t1,(t1)
- jalr t1
- nop
-#endif
- /*
- * --_ISR_Nest_level;
- */
- lint t2,_ISR_Nest_level
- addi t2,t2,-1
- sint t2,_ISR_Nest_level
- /*
- * --_Thread_Dispatch_disable_level;
- */
- lint t1,_Thread_Dispatch_disable_level
- addi t1,t1,-1
- sint t1,_Thread_Dispatch_disable_level
- /*
- * if ( _Thread_Dispatch_disable_level || _ISR_Nest_level )
- * goto the label "exit interrupt (simple case)"
- */
- or t0,t2,t1
- bne t0,zero,_ISR_Handler_exit
- nop
- /*
- * #if ( CPU_HAS_SOFTWARE_INTERRUPT_STACK == TRUE )
- * restore stack
- * #endif
- *
- * if ( !_Context_Switch_necessary && !_ISR_Signals_to_thread_executing )
- * goto the label "exit interrupt (simple case)"
- */
- lint t0,_Context_Switch_necessary
- lint t1,_ISR_Signals_to_thread_executing
- or t0,t0,t1
- beq t0,zero,_ISR_Handler_exit
- nop
-
- /*
- * call _Thread_Dispatch() or prepare to return to _ISR_Dispatch
- */
- jal _Thread_Dispatch
- nop
- /*
- * prepare to get out of interrupt
- * return from interrupt (maybe to _ISR_Dispatch)
- *
- * LABEL "exit interrupt (simple case):
- * prepare to get out of interrupt
- * return from interrupt
- */
-_ISR_Handler_exit:
- ld ra,32(sp)
- stackadd sp,sp,40
-
-/* restore interrupt context from stack */
- lreg k0, R_MDLO*R_SZ(sp)
- mtlo k0
- lreg k0, R_MDHI*R_SZ(sp)
- lreg a2, R_A2*R_SZ(sp)
- mthi k0
- lreg a3, R_A3*R_SZ(sp)
- lreg t0, R_T0*R_SZ(sp)
- lreg t1, R_T1*R_SZ(sp)
- lreg t2, R_T2*R_SZ(sp)
- lreg t3, R_T3*R_SZ(sp)
- lreg t4, R_T4*R_SZ(sp)
- lreg t5, R_T5*R_SZ(sp)
- lreg t6, R_T6*R_SZ(sp)
- lreg t7, R_T7*R_SZ(sp)
- lreg t8, R_T8*R_SZ(sp)
- lreg t9, R_T9*R_SZ(sp)
- lreg gp, R_GP*R_SZ(sp)
- lreg fp, R_FP*R_SZ(sp)
- lreg ra, R_RA*R_SZ(sp)
- lreg a0, R_A0*R_SZ(sp)
- lreg a1, R_A1*R_SZ(sp)
- lreg v1, R_V1*R_SZ(sp)
- lreg v0, R_V0*R_SZ(sp)
- .set noat
- lreg AT, R_AT*R_SZ(sp)
- .set at
-
- stackadd sp,sp,EXCP_STACK_SIZE /* store ra on the stack */
-
-#if USE_IDTKIT
-/* we handled exception, so return non-zero value */
- li v0,1
-#endif
-
-_ISR_Handler_quick_exit:
-#ifdef USE_IDTKIT
- j ra
-#else
- eret
-#endif
- nop
-
-_ISR_Handler_prom_exit:
-#ifdef CPU_R3000
- la k0, (R_VEC+((48)*8))
-#endif
-
-#ifdef CPU_R4000
- la k0, (R_VEC+((112)*8)) /* R4000 Sim's location is different */
-#endif
- j k0
- nop
-
- .set reorder
-
-ENDFRAME(_ISR_Handler)
-
-
-FRAME(mips_enable_interrupts,sp,0,ra)
- mfc0 t0,C0_SR /* get status reg */
- nop
- or t0,t0,a0
- mtc0 t0,C0_SR /* save updated status reg */
- j ra
- nop
-ENDFRAME(mips_enable_interrupts)
-
-FRAME(mips_disable_interrupts,sp,0,ra)
- mfc0 v0,C0_SR /* get status reg */
- li t1,SR_IMASK /* t1 = load interrupt mask word */
- not t0,t1 /* t0 = ~t1 */
- and t0,v0 /* clear imask bits */
- mtc0 t0,C0_SR /* save status reg */
- and v0,t1 /* mask return value (only return imask bits) */
- jr ra
- nop
-ENDFRAME(mips_disable_interrupts)
-
-FRAME(mips_enable_global_interrupts,sp,0,ra)
- mfc0 t0,C0_SR /* get status reg */
- nop
- ori t0,SR_IE
- mtc0 t0,C0_SR /* save updated status reg */
- j ra
- nop
-ENDFRAME(mips_enable_global_interrupts)
-
-FRAME(mips_disable_global_interrupts,sp,0,ra)
- li t1,SR_IE
- mfc0 t0,C0_SR /* get status reg */
- not t1
- and t0,t1
- mtc0 t0,C0_SR /* save updated status reg */
- j ra
- nop
-ENDFRAME(mips_disable_global_interrupts)
-
-/* return the value of the status register in v0. Used for debugging */
-FRAME(mips_get_sr,sp,0,ra)
- mfc0 v0,C0_SR
- j ra
- nop
-ENDFRAME(mips_get_sr)
-
-FRAME(mips_break,sp,0,ra)
-#if 1
- break 0x0
- j mips_break
-#else
- j ra
-#endif
- nop
-ENDFRAME(mips_break)
-
-/*PAGE
- *
- * _CPU_Internal_threads_Idle_thread_body
- *
- * NOTES:
- *
- * 1. This is the same as the regular CPU independent algorithm.
- *
- * 2. If you implement this using a "halt", "idle", or "shutdown"
- * instruction, then don't forget to put it in an infinite loop.
- *
- * 3. Be warned. Some processors with onboard DMA have been known
- * to stop the DMA if the CPU were put in IDLE mode. This might
- * also be a problem with other on-chip peripherals. So use this
- * hook with caution.
- */
-
-FRAME(_CPU_Thread_Idle_body,sp,0,ra)
- wait /* enter low power mode */
- j _CPU_Thread_Idle_body
- nop
-ENDFRAME(_CPU_Thread_Idle_body)
-
-#define VEC_CODE_LENGTH 10*4
-
-/**************************************************************************
-**
-** init_exc_vecs() - moves the exception code into the addresses
-** reserved for exception vectors
-**
-** UTLB Miss exception vector at address 0x80000000
-**
-** General exception vector at address 0x80000080
-**
-** RESET exception vector is at address 0xbfc00000
-**
-***************************************************************************/
-
-#define INITEXCFRM ((2*4)+4) /* ra + 2 arguments */
-FRAME(init_exc_vecs,sp,0,ra)
-/* This code yanked from SIM */
-#if defined(CPU_R3000)
- .set noreorder
- la t1,exc_utlb_code
- la t2,exc_norm_code
- li t3,UT_VEC
- li t4,E_VEC
- li t5,VEC_CODE_LENGTH
-1:
- lw t6,0(t1)
- lw t7,0(t2)
- sw t6,0(t3)
- sw t7,0(t4)
- addiu t1,4
- addiu t3,4
- addiu t4,4
- subu t5,4
- bne t5,zero,1b
- addiu t2,4
- move t5,ra # assumes clear_cache doesnt use t5
- li a0,UT_VEC
- jal clear_cache
- li a1,VEC_CODE_LENGTH
- nop
- li a0,E_VEC
- jal clear_cache
- li a1,VEC_CODE_LENGTH
- move ra,t5 # restore ra
- j ra
- nop
- .set reorder
-#endif
-#if defined(CPU_R4000)
- .set reorder
- move t5,ra # assumes clear_cache doesnt use t5
-
- /* TLB exception vector */
- la t1,exc_tlb_code
- li t2,T_VEC |K1BASE
- li t3,VEC_CODE_LENGTH
-1:
- lw t6,0(t1)
- addiu t1,4
- subu t3,4
- sw t6,0(t2)
- addiu t2,4
- bne t3,zero,1b
-
- li a0,T_VEC
- li a1,VEC_CODE_LENGTH
- jal clear_cache
-
- la t1,exc_xtlb_code
- li t2,X_VEC |K1BASE
- li t3,VEC_CODE_LENGTH
-1:
- lw t6,0(t1)
- addiu t1,4
- subu t3,4
- sw t6,0(t2)
- addiu t2,4
- bne t3,zero,1b
-
- /* extended TLB exception vector */
- li a0,X_VEC
- li a1,VEC_CODE_LENGTH
- jal clear_cache
-
- /* cache error exception vector */
- la t1,exc_cache_code
- li t2,C_VEC |K1BASE
- li t3,VEC_CODE_LENGTH
-1:
- lw t6,0(t1)
- addiu t1,4
- subu t3,4
- sw t6,0(t2)
- addiu t2,4
- bne t3,zero,1b
-
- li a0,C_VEC
- li a1,VEC_CODE_LENGTH
- jal clear_cache
-
- /* normal exception vector */
- la t1,exc_norm_code
- li t2,E_VEC |K1BASE
- li t3,VEC_CODE_LENGTH
-1:
- lw t6,0(t1)
- addiu t1,4
- subu t3,4
- sw t6,0(t2)
- addiu t2,4
- bne t3,zero,1b
-
- li a0,E_VEC
- li a1,VEC_CODE_LENGTH
- jal clear_cache
-
- move ra,t5 # restore ra
- j ra
-#endif
-ENDFRAME(init_exc_vecs)
-
-
-#if defined(CPU_R4000)
-FRAME(exc_tlb_code,sp,0,ra)
-#ifdef CPU_R3000
- la k0, (R_VEC+((48)*8))
-#endif
-
-#ifdef CPU_R4000
- la k0, (R_VEC+((112)*8)) /* R4000 Sim's location is different */
-#endif
- j k0
- nop
-
-ENDFRAME(exc_tlb_code)
-
-
-FRAME(exc_xtlb_code,sp,0,ra)
-#ifdef CPU_R3000
- la k0, (R_VEC+((48)*8))
-#endif
-
-#ifdef CPU_R4000
- la k0, (R_VEC+((112)*8)) /* R4000 Sim's location is different */
-#endif
- j k0
- nop
-
-ENDFRAME(exc_xtlb_code)
-
-
-FRAME(exc_cache_code,sp,0,ra)
-#ifdef CPU_R3000
- la k0, (R_VEC+((48)*8))
-#endif
-
-#ifdef CPU_R4000
- la k0, (R_VEC+((112)*8)) /* R4000 Sim's location is different */
-#endif
- j k0
- nop
-
-ENDFRAME(exc_cache_code)
-
-
-FRAME(exc_norm_code,sp,0,ra)
- la k0, _ISR_Handler /* generic external int hndlr */
- j k0
- nop
- subu sp, EXCP_STACK_SIZE /* set up local stack frame */
-ENDFRAME(exc_norm_code)
-#endif
-
-/**************************************************************************
-**
-** enable_int(mask) - enables interrupts - mask is positioned so it only
-** needs to be or'ed into the status reg. This
-** also does some other things !!!! caution should
-** be used if invoking this while in the middle
-** of a debugging session where the client may have
-** nested interrupts.
-**
-****************************************************************************/
-FRAME(enable_int,sp,0,ra)
- .set noreorder
- mfc0 t0,C0_SR
- or a0,1
- or t0,a0
- mtc0 t0,C0_SR
- j ra
- nop
- .set reorder
-ENDFRAME(enable_int)
-
-
-/***************************************************************************
-**
-** disable_int(mask) - disable the interrupt - mask is the complement
-** of the bits to be cleared - i.e. to clear ext int
-** 5 the mask would be - 0xffff7fff
-**
-****************************************************************************/
-FRAME(disable_int,sp,0,ra)
- .set noreorder
- mfc0 t0,C0_SR
- nop
- and t0,a0
- mtc0 t0,C0_SR
- j ra
- nop
-ENDFRAME(disable_int)
-
-
diff --git a/cpukit/score/cpu/mips64orion/cpu_asm.h b/cpukit/score/cpu/mips64orion/cpu_asm.h
deleted file mode 100644
index 287b881068..0000000000
--- a/cpukit/score/cpu/mips64orion/cpu_asm.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * cpu_asm.h
- *
- * Author: Craig Lebakken <craigl@transition.com>
- *
- * COPYRIGHT (c) 1996 by Transition Networks Inc.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Transition Networks not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * Transition Networks makes no representations about the suitability
- * of this software for any purpose.
- *
- * Derived from c/src/exec/score/cpu/no_cpu/cpu_asm.h:
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- *
- */
-/* @(#)cpu_asm.h 08/20/96 1.2 */
-
-#ifndef __CPU_ASM_h
-#define __CPU_ASM_h
-
-/* pull in the generated offsets */
-
-/* #include <rtems/score/offsets.h> */
-
-/*
- * Hardware General Registers
- */
-
-/* put something here */
-
-/*
- * Hardware Floating Point Registers
- */
-
-#define R_FP0 0
-#define R_FP1 1
-#define R_FP2 2
-#define R_FP3 3
-#define R_FP4 4
-#define R_FP5 5
-#define R_FP6 6
-#define R_FP7 7
-#define R_FP8 8
-#define R_FP9 9
-#define R_FP10 10
-#define R_FP11 11
-#define R_FP12 12
-#define R_FP13 13
-#define R_FP14 14
-#define R_FP15 15
-#define R_FP16 16
-#define R_FP17 17
-#define R_FP18 18
-#define R_FP19 19
-#define R_FP20 20
-#define R_FP21 21
-#define R_FP22 22
-#define R_FP23 23
-#define R_FP24 24
-#define R_FP25 25
-#define R_FP26 26
-#define R_FP27 27
-#define R_FP28 28
-#define R_FP29 29
-#define R_FP30 30
-#define R_FP31 31
-
-/*
- * Hardware Control Registers
- */
-
-/* put something here */
-
-/*
- * Calling Convention
- */
-
-/* put something here */
-
-/*
- * Temporary registers
- */
-
-/* put something here */
-
-/*
- * Floating Point Registers - SW Conventions
- */
-
-/* put something here */
-
-/*
- * Temporary floating point registers
- */
-
-/* put something here */
-
-#endif
-
-/* end of file */
diff --git a/cpukit/score/cpu/mips64orion/idtcpu.h b/cpukit/score/cpu/mips64orion/idtcpu.h
deleted file mode 100644
index f921e85ef6..0000000000
--- a/cpukit/score/cpu/mips64orion/idtcpu.h
+++ /dev/null
@@ -1,440 +0,0 @@
-/*
-
-Based upon IDT provided code with the following release:
-
-This source code has been made available to you by IDT on an AS-IS
-basis. Anyone receiving this source is licensed under IDT copyrights
-to use it in any way he or she deems fit, including copying it,
-modifying it, compiling it, and redistributing it either with or
-without modifications. No license under IDT patents or patent
-applications is to be implied by the copyright license.
-
-Any user of this software should understand that IDT cannot provide
-technical support for this software and will not be responsible for
-any consequences resulting from the use of this software.
-
-Any person who transfers this source code or any derivative work must
-include the IDT copyright notice, this paragraph, and the preceeding
-two paragraphs in the transferred software.
-
-COPYRIGHT IDT CORPORATION 1996
-LICENSED MATERIAL - PROGRAM PROPERTY OF IDT
-
- $Id$
-*/
-
-/*
-** idtcpu.h -- cpu related defines
-*/
-
-#ifndef _IDTCPU_H__
-#define _IDTCPU_H__
-
-/*
- * 950313: Ketan added Register definition for XContext reg.
- * added define for WAIT instruction.
- * 950421: Ketan added Register definition for Config reg (R3081)
- */
-
-/*
-** memory configuration and mapping
-*/
-#define K0BASE 0x80000000
-#define K0SIZE 0x20000000
-#define K1BASE 0xa0000000
-#define K1SIZE 0x20000000
-#define K2BASE 0xc0000000
-#define K2SIZE 0x20000000
-#if defined(CPU_R4000)
-#define KSBASE 0xe0000000
-#define KSSIZE 0x20000000
-#endif
-
-#define KUBASE 0
-#define KUSIZE 0x80000000
-
-/*
-** Exception Vectors
-*/
-#if defined(CPU_R3000)
-#define UT_VEC K0BASE /* utlbmiss vector */
-#define E_VEC (K0BASE+0x80) /* exception vevtor */
-#endif
-#if defined(CPU_R4000)
-#define T_VEC (K0BASE+0x000) /* tlbmiss vector */
-#define X_VEC (K0BASE+0x080) /* xtlbmiss vector */
-#define C_VEC (K0BASE+0x100) /* cache error vector */
-#define E_VEC (K0BASE+0x180) /* exception vector */
-#endif
-#define R_VEC (K1BASE+0x1fc00000) /* reset vector */
-
-/*
-** Address conversion macros
-*/
-#ifdef CLANGUAGE
-#define CAST(as) (as)
-#else
-#define CAST(as)
-#endif
-#define K0_TO_K1(x) (CAST(unsigned)(x)|0xA0000000) /* kseg0 to kseg1 */
-#define K1_TO_K0(x) (CAST(unsigned)(x)&0x9FFFFFFF) /* kseg1 to kseg0 */
-#define K0_TO_PHYS(x) (CAST(unsigned)(x)&0x1FFFFFFF) /* kseg0 to physical */
-#define K1_TO_PHYS(x) (CAST(unsigned)(x)&0x1FFFFFFF) /* kseg1 to physical */
-#define PHYS_TO_K0(x) (CAST(unsigned)(x)|0x80000000) /* physical to kseg0 */
-#define PHYS_TO_K1(x) (CAST(unsigned)(x)|0xA0000000) /* physical to kseg1 */
-
-/*
-** Cache size constants
-*/
-#define MINCACHE 0x200 /* 512 For 3041. */
-#define MAXCACHE 0x40000 /* 256*1024 256k */
-
-#if defined(CPU_R4000)
-/* R4000 configuration register definitions */
-#define CFG_CM 0x80000000 /* Master-Checker mode */
-#define CFG_ECMASK 0x70000000 /* System Clock Ratio */
-#define CFG_ECBY2 0x00000000 /* divide by 2 */
-#define CFG_ECBY3 0x10000000 /* divide by 3 */
-#define CFG_ECBY4 0x20000000 /* divide by 4 */
-#define CFG_EPMASK 0x0f000000 /* Transmit data pattern */
-#define CFG_EPD 0x00000000 /* D */
-#define CFG_EPDDX 0x01000000 /* DDX */
-#define CFG_EPDDXX 0x02000000 /* DDXX */
-#define CFG_EPDXDX 0x03000000 /* DXDX */
-#define CFG_EPDDXXX 0x04000000 /* DDXXX */
-#define CFG_EPDDXXXX 0x05000000 /* DDXXXX */
-#define CFG_EPDXXDXX 0x06000000 /* DXXDXX */
-#define CFG_EPDDXXXXX 0x07000000 /* DDXXXXX */
-#define CFG_EPDXXXDXXX 0x08000000 /* DXXXDXXX */
-#define CFG_SBMASK 0x00c00000 /* Secondary cache block size */
-#define CFG_SBSHIFT 22
-#define CFG_SB4 0x00000000 /* 4 words */
-#define CFG_SB8 0x00400000 /* 8 words */
-#define CFG_SB16 0x00800000 /* 16 words */
-#define CFG_SB32 0x00c00000 /* 32 words */
-#define CFG_SS 0x00200000 /* Split secondary cache */
-#define CFG_SW 0x00100000 /* Secondary cache port width */
-#define CFG_EWMASK 0x000c0000 /* System port width */
-#define CFG_EWSHIFT 18
-#define CFG_EW64 0x00000000 /* 64 bit */
-#define CFG_EW32 0x00010000 /* 32 bit */
-#define CFG_SC 0x00020000 /* Secondary cache absent */
-#define CFG_SM 0x00010000 /* Dirty Shared mode disabled */
-#define CFG_BE 0x00008000 /* Big Endian */
-#define CFG_EM 0x00004000 /* ECC mode enable */
-#define CFG_EB 0x00002000 /* Block ordering */
-#define CFG_ICMASK 0x00000e00 /* Instruction cache size */
-#define CFG_ICSHIFT 9
-#define CFG_DCMASK 0x000001c0 /* Data cache size */
-#define CFG_DCSHIFT 6
-#define CFG_IB 0x00000020 /* Instruction cache block size */
-#define CFG_DB 0x00000010 /* Data cache block size */
-#define CFG_CU 0x00000008 /* Update on Store Conditional */
-#define CFG_K0MASK 0x00000007 /* KSEG0 coherency algorithm */
-
-/*
- * R4000 primary cache mode
- */
-#define CFG_C_UNCACHED 2
-#define CFG_C_NONCOHERENT 3
-#define CFG_C_COHERENTXCL 4
-#define CFG_C_COHERENTXCLW 5
-#define CFG_C_COHERENTUPD 6
-
-/*
- * R4000 cache operations (should be in assembler...?)
- */
-#define Index_Invalidate_I 0x0 /* 0 0 */
-#define Index_Writeback_Inv_D 0x1 /* 0 1 */
-#define Index_Invalidate_SI 0x2 /* 0 2 */
-#define Index_Writeback_Inv_SD 0x3 /* 0 3 */
-#define Index_Load_Tag_I 0x4 /* 1 0 */
-#define Index_Load_Tag_D 0x5 /* 1 1 */
-#define Index_Load_Tag_SI 0x6 /* 1 2 */
-#define Index_Load_Tag_SD 0x7 /* 1 3 */
-#define Index_Store_Tag_I 0x8 /* 2 0 */
-#define Index_Store_Tag_D 0x9 /* 2 1 */
-#define Index_Store_Tag_SI 0xA /* 2 2 */
-#define Index_Store_Tag_SD 0xB /* 2 3 */
-#define Create_Dirty_Exc_D 0xD /* 3 1 */
-#define Create_Dirty_Exc_SD 0xF /* 3 3 */
-#define Hit_Invalidate_I 0x10 /* 4 0 */
-#define Hit_Invalidate_D 0x11 /* 4 1 */
-#define Hit_Invalidate_SI 0x12 /* 4 2 */
-#define Hit_Invalidate_SD 0x13 /* 4 3 */
-#define Hit_Writeback_Inv_D 0x15 /* 5 1 */
-#define Hit_Writeback_Inv_SD 0x17 /* 5 3 */
-#define Fill_I 0x14 /* 5 0 */
-#define Hit_Writeback_D 0x19 /* 6 1 */
-#define Hit_Writeback_SD 0x1B /* 6 3 */
-#define Hit_Writeback_I 0x18 /* 6 0 */
-#define Hit_Set_Virtual_SI 0x1E /* 7 2 */
-#define Hit_Set_Virtual_SD 0x1F /* 7 3 */
-
-#ifndef WAIT
-#define WAIT .word 0x42000020
-#endif WAIT
-
-#ifndef wait
-#define wait .word 0x42000020
-#endif wait
-
-#endif
-
-/*
-** TLB resource defines
-*/
-#if defined(CPU_R3000)
-#define N_TLB_ENTRIES 64
-#define TLB_PGSIZE 0x1000
-#define RANDBASE 8
-#define TLBLO_PFNMASK 0xfffff000
-#define TLBLO_PFNSHIFT 12
-#define TLBLO_N 0x800 /* non-cacheable */
-#define TLBLO_D 0x400 /* writeable */
-#define TLBLO_V 0x200 /* valid bit */
-#define TLBLO_G 0x100 /* global access bit */
-
-#define TLBHI_VPNMASK 0xfffff000
-#define TLBHI_VPNSHIFT 12
-#define TLBHI_PIDMASK 0xfc0
-#define TLBHI_PIDSHIFT 6
-#define TLBHI_NPID 64
-
-#define TLBINX_PROBE 0x80000000
-#define TLBINX_INXMASK 0x00003f00
-#define TLBINX_INXSHIFT 8
-
-#define TLBRAND_RANDMASK 0x00003f00
-#define TLBRAND_RANDSHIFT 8
-
-#define TLBCTXT_BASEMASK 0xffe00000
-#define TLBCTXT_BASESHIFT 21
-
-#define TLBCTXT_VPNMASK 0x001ffffc
-#define TLBCTXT_VPNSHIFT 2
-#endif
-#if defined(CPU_R4000)
-#define N_TLB_ENTRIES 48
-
-#define TLBHI_VPN2MASK 0xffffe000
-#define TLBHI_PIDMASK 0x000000ff
-#define TLBHI_NPID 256
-
-#define TLBLO_PFNMASK 0x3fffffc0
-#define TLBLO_PFNSHIFT 6
-#define TLBLO_D 0x00000004 /* writeable */
-#define TLBLO_V 0x00000002 /* valid bit */
-#define TLBLO_G 0x00000001 /* global access bit */
-#define TLBLO_CMASK 0x00000038 /* cache algorithm mask */
-#define TLBLO_CSHIFT 3
-
-#define TLBLO_UNCACHED (CFG_C_UNCACHED<<TLBLO_CSHIFT)
-#define TLBLO_NONCOHERENT (CFG_C_NONCOHERENT<<TLBLO_CSHIFT)
-#define TLBLO_COHERENTXCL (CFG_C_COHERENTXCL<<TLBLO_CSHIFT)
-#define TLBLO_COHERENTXCLW (CFG_C_COHERENTXCLW<<TLBLO_CSHIFT)
-#define TLBLO_COHERENTUPD (CFG_C_COHERENTUPD<<TLBLO_CSHIFT)
-
-#define TLBINX_PROBE 0x80000000
-#define TLBINX_INXMASK 0x0000003f
-
-#define TLBRAND_RANDMASK 0x0000003f
-
-#define TLBCTXT_BASEMASK 0xff800000
-#define TLBCTXT_BASESHIFT 23
-
-#define TLBCTXT_VPN2MASK 0x007ffff0
-#define TLBCTXT_VPN2SHIFT 4
-
-#define TLBPGMASK_MASK 0x01ffe000
-#endif
-
-#if defined(CPU_R3000)
-#define SR_CUMASK 0xf0000000 /* coproc usable bits */
-#define SR_CU3 0x80000000 /* Coprocessor 3 usable */
-#define SR_CU2 0x40000000 /* Coprocessor 2 usable */
-#define SR_CU1 0x20000000 /* Coprocessor 1 usable */
-#define SR_CU0 0x10000000 /* Coprocessor 0 usable */
-
-#define SR_BEV 0x00400000 /* use boot exception vectors */
-
-/* Cache control bits */
-#define SR_TS 0x00200000 /* TLB shutdown */
-#define SR_PE 0x00100000 /* cache parity error */
-#define SR_CM 0x00080000 /* cache miss */
-#define SR_PZ 0x00040000 /* cache parity zero */
-#define SR_SWC 0x00020000 /* swap cache */
-#define SR_ISC 0x00010000 /* Isolate data cache */
-
-/*
-** status register interrupt masks and bits
-*/
-
-#define SR_IMASK 0x0000ff00 /* Interrupt mask */
-#define SR_IMASK8 0x00000000 /* mask level 8 */
-#define SR_IMASK7 0x00008000 /* mask level 7 */
-#define SR_IMASK6 0x0000c000 /* mask level 6 */
-#define SR_IMASK5 0x0000e000 /* mask level 5 */
-#define SR_IMASK4 0x0000f000 /* mask level 4 */
-#define SR_IMASK3 0x0000f800 /* mask level 3 */
-#define SR_IMASK2 0x0000fc00 /* mask level 2 */
-#define SR_IMASK1 0x0000fe00 /* mask level 1 */
-#define SR_IMASK0 0x0000ff00 /* mask level 0 */
-
-#define SR_IMASKSHIFT 8
-
-#define SR_IBIT8 0x00008000 /* bit level 8 */
-#define SR_IBIT7 0x00004000 /* bit level 7 */
-#define SR_IBIT6 0x00002000 /* bit level 6 */
-#define SR_IBIT5 0x00001000 /* bit level 5 */
-#define SR_IBIT4 0x00000800 /* bit level 4 */
-#define SR_IBIT3 0x00000400 /* bit level 3 */
-#define SR_IBIT2 0x00000200 /* bit level 2 */
-#define SR_IBIT1 0x00000100 /* bit level 1 */
-
-#define SR_KUO 0x00000020 /* old kernel/user, 0 => k, 1 => u */
-#define SR_IEO 0x00000010 /* old interrupt enable, 1 => enable */
-#define SR_KUP 0x00000008 /* prev kernel/user, 0 => k, 1 => u */
-#define SR_IEP 0x00000004 /* prev interrupt enable, 1 => enable */
-#define SR_KUC 0x00000002 /* cur kernel/user, 0 => k, 1 => u */
-#define SR_IEC 0x00000001 /* cur interrupt enable, 1 => enable */
-#endif
-
-#if defined(CPU_R4000)
-#define SR_CUMASK 0xf0000000 /* coproc usable bits */
-#define SR_CU3 0x80000000 /* Coprocessor 3 usable */
-#define SR_CU2 0x40000000 /* Coprocessor 2 usable */
-#define SR_CU1 0x20000000 /* Coprocessor 1 usable */
-#define SR_CU0 0x10000000 /* Coprocessor 0 usable */
-
-#define SR_RP 0x08000000 /* Reduced power operation */
-#define SR_FR 0x04000000 /* Additional floating point registers */
-#define SR_RE 0x02000000 /* Reverse endian in user mode */
-
-#define SR_BEV 0x00400000 /* Use boot exception vectors */
-#define SR_TS 0x00200000 /* TLB shutdown */
-#define SR_SR 0x00100000 /* Soft reset */
-#define SR_CH 0x00040000 /* Cache hit */
-#define SR_CE 0x00020000 /* Use cache ECC */
-#define SR_DE 0x00010000 /* Disable cache exceptions */
-
-/*
-** status register interrupt masks and bits
-*/
-
-#define SR_IMASK 0x0000ff00 /* Interrupt mask */
-#define SR_IMASK8 0x00000000 /* mask level 8 */
-#define SR_IMASK7 0x00008000 /* mask level 7 */
-#define SR_IMASK6 0x0000c000 /* mask level 6 */
-#define SR_IMASK5 0x0000e000 /* mask level 5 */
-#define SR_IMASK4 0x0000f000 /* mask level 4 */
-#define SR_IMASK3 0x0000f800 /* mask level 3 */
-#define SR_IMASK2 0x0000fc00 /* mask level 2 */
-#define SR_IMASK1 0x0000fe00 /* mask level 1 */
-#define SR_IMASK0 0x0000ff00 /* mask level 0 */
-
-#define SR_IMASKSHIFT 8
-
-#define SR_IBIT8 0x00008000 /* bit level 8 */
-#define SR_IBIT7 0x00004000 /* bit level 7 */
-#define SR_IBIT6 0x00002000 /* bit level 6 */
-#define SR_IBIT5 0x00001000 /* bit level 5 */
-#define SR_IBIT4 0x00000800 /* bit level 4 */
-#define SR_IBIT3 0x00000400 /* bit level 3 */
-#define SR_IBIT2 0x00000200 /* bit level 2 */
-#define SR_IBIT1 0x00000100 /* bit level 1 */
-
-#define SR_KSMASK 0x00000018 /* Kernel mode mask */
-#define SR_KSUSER 0x00000010 /* User mode */
-#define SR_KSSUPER 0x00000008 /* Supervisor mode */
-#define SR_KSKERNEL 0x00000000 /* Kernel mode */
-#define SR_ERL 0x00000004 /* Error level */
-#define SR_EXL 0x00000002 /* Exception level */
-#define SR_IE 0x00000001 /* Interrupts enabled */
-#endif
-
-
-
-/*
- * Cause Register
- */
-#define CAUSE_BD 0x80000000 /* Branch delay slot */
-#define CAUSE_CEMASK 0x30000000 /* coprocessor error */
-#define CAUSE_CESHIFT 28
-
-
-#define CAUSE_IPMASK 0x0000FF00 /* Pending interrupt mask */
-#define CAUSE_IPSHIFT 8
-
-#define CAUSE_EXCMASK 0x0000003C /* Cause code bits */
-#define CAUSE_EXCSHIFT 2
-
-#ifndef XDS
-/*
-** Coprocessor 0 registers
-*/
-#define C0_INX $0 /* tlb index */
-#define C0_RAND $1 /* tlb random */
-#if defined(CPU_R3000)
-#define C0_TLBLO $2 /* tlb entry low */
-#endif
-#if defined(CPU_R4000)
-#define C0_TLBLO0 $2 /* tlb entry low 0 */
-#define C0_TLBLO1 $3 /* tlb entry low 1 */
-#endif
-
-#define C0_CTXT $4 /* tlb context */
-
-#if defined(CPU_R4000)
-#define C0_PAGEMASK $5 /* tlb page mask */
-#define C0_WIRED $6 /* number of wired tlb entries */
-#endif
-
-#define C0_BADVADDR $8 /* bad virtual address */
-
-#if defined(CPU_R4000)
-#define C0_COUNT $9 /* cycle count */
-#endif
-
-#define C0_TLBHI $10 /* tlb entry hi */
-
-#if defined(CPU_R4000)
-#define C0_COMPARE $11 /* cyccle count comparator */
-#endif
-
-#define C0_SR $12 /* status register */
-#define C0_CAUSE $13 /* exception cause */
-#define C0_EPC $14 /* exception pc */
-#define C0_PRID $15 /* revision identifier */
-
-#if defined(CPU_R3000)
-#define C0_CONFIG $3 /* configuration register R3081*/
-#endif
-
-#if defined(CPU_R4000)
-#define C0_CONFIG $16 /* configuration register */
-#define C0_LLADDR $17 /* linked load address */
-#define C0_WATCHLO $18 /* watchpoint trap register */
-#define C0_WATCHHI $19 /* watchpoint trap register */
-#define C0_XCTXT $20 /* extended tlb context */
-#define C0_ECC $26 /* secondary cache ECC control */
-#define C0_CACHEERR $27 /* cache error status */
-#define C0_TAGLO $28 /* cache tag lo */
-#define C0_TAGHI $29 /* cache tag hi */
-#define C0_ERRPC $30 /* cache error pc */
-#endif
-
-#endif XDS
-
-#ifdef R4650
-#define IWATCH $18
-#define DWATCH $19
-#define IBASE $0
-#define IBOUND $1
-#define DBASE $2
-#define DBOUND $3
-#define CALG $17
-#endif
-
-#endif /* _IDTCPU_H__ */
-
diff --git a/cpukit/score/cpu/mips64orion/idtmon.h b/cpukit/score/cpu/mips64orion/idtmon.h
deleted file mode 100644
index 2dacfe052e..0000000000
--- a/cpukit/score/cpu/mips64orion/idtmon.h
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
-
-Based upon IDT provided code with the following release:
-
-This source code has been made available to you by IDT on an AS-IS
-basis. Anyone receiving this source is licensed under IDT copyrights
-to use it in any way he or she deems fit, including copying it,
-modifying it, compiling it, and redistributing it either with or
-without modifications. No license under IDT patents or patent
-applications is to be implied by the copyright license.
-
-Any user of this software should understand that IDT cannot provide
-technical support for this software and will not be responsible for
-any consequences resulting from the use of this software.
-
-Any person who transfers this source code or any derivative work must
-include the IDT copyright notice, this paragraph, and the preceeding
-two paragraphs in the transferred software.
-
-COPYRIGHT IDT CORPORATION 1996
-LICENSED MATERIAL - PROGRAM PROPERTY OF IDT
-
- $Id$
-*/
-
-/*
-** idtmon.h - General header file for the IDT Prom Monitor
-**
-** Copyright 1989 Integrated Device Technology, Inc.
-** All Rights Reserved.
-**
-** June 1989 - D.Cahoon
-*/
-#ifndef __IDTMON_H__
-#define __IDTMON_H__
-
-/*
-** P_STACKSIZE is the size of the Prom Stack.
-** the prom stack grows downward
-*/
-#define P_STACKSIZE 0x2000 /* sets stack size to 8k */
-
-/*
-** M_BUSWIDTH
-** Memory bus width (including bank interleaving) in bytes
-** used when doing memory sizing to prevent bus capacitance
-** reporting ghost memory locations
-*/
-#if defined(CPU_R3000)
-#define M_BUSWIDTH 8 /* 32bit memory bank interleaved */
-#endif
-#if defined(CPU_R4000)
-#define M_BUSWIDTH 16 /* 64 bit memory bank interleaved */
-#endif
-
-/*
-** this is the default value for the number of bytes to add in calculating
-** the checksums in the checksum command
-*/
-#define CHK_SUM_CNT 0x20000 /* number of bytes to calc chksum for */
-
-/*
-** Monitor modes
-*/
-#define MODE_MONITOR 5 /* IDT Prom Monitor is executing */
-#define MODE_USER 0xa /* USER is executing */
-
-/*
-** memory reference widths
-*/
-#define SW_BYTE 1
-#define SW_HALFWORD 2
-#define SW_WORD 4
-#define SW_TRIBYTEL 12
-#define SW_TRIBYTER 20
-
-#ifdef CPU_R4000
-/*
-** definitions for select_cache call
-*/
-#define DCACHE 0
-#define ICACHE 1
-#define SCACHE 2
-
-#endif
-
-#ifndef ASM
-typedef struct {
- unsigned int mem_size;
- unsigned int icache_size;
- unsigned int dcache_size;
-#ifdef CPU_R4000
- unsigned int scache_size;
-#endif
-
- } mem_config;
-
-#endif
-
-/*
-** general equates for diagnostics and boolean functions
-*/
-#define PASS 0
-#define FAIL 1
-
-#ifndef TRUE
-#define TRUE 1
-#endif TRUE
-#ifndef NULL
-#define NULL 0
-#endif NULL
-
-#ifndef FALSE
-#define FALSE 0
-#endif FALSE
-
-
-/*
-** portablility equates
-*/
-
-#ifndef BOOL
-#define BOOL unsigned int
-#endif BOOL
-
-#ifndef GLOBAL
-#define GLOBAL /**/
-#endif GLOBAL
-
-#ifndef MLOCAL
-#define MLOCAL static
-#endif MLOCAL
-
-
-#ifdef XDS
-#define CONST const
-#else
-#define CONST
-#endif XDS
-
-#define u_char unsigned char
-#define u_short unsigned short
-#define u_int unsigned int
-/*
-** assembly instructions for compatability between xds and mips
-*/
-#ifndef XDS
-#define sllv sll
-#define srlv srl
-#endif XDS
-/*
-** debugger macros for assembly language routines. Allows the
-** programmer to set up the necessary stack frame info
-** required by debuggers to do stack traces.
-*/
-
-#ifndef XDS
-#define FRAME(name,frm_reg,offset,ret_reg) \
- .globl name; \
- .ent name; \
-name:; \
- .frame frm_reg,offset,ret_reg
-#define ENDFRAME(name) \
- .end name
-#else
-#define FRAME(name,frm_reg,offset,ret_reg) \
- .globl _##name;\
-_##name:
-#define ENDFRAME(name)
-#endif XDS
-#endif /* __IDTMON_H__ */
diff --git a/cpukit/score/cpu/mips64orion/iregdef.h b/cpukit/score/cpu/mips64orion/iregdef.h
deleted file mode 100644
index f0953da852..0000000000
--- a/cpukit/score/cpu/mips64orion/iregdef.h
+++ /dev/null
@@ -1,325 +0,0 @@
-/*
-
-Based upon IDT provided code with the following release:
-
-This source code has been made available to you by IDT on an AS-IS
-basis. Anyone receiving this source is licensed under IDT copyrights
-to use it in any way he or she deems fit, including copying it,
-modifying it, compiling it, and redistributing it either with or
-without modifications. No license under IDT patents or patent
-applications is to be implied by the copyright license.
-
-Any user of this software should understand that IDT cannot provide
-technical support for this software and will not be responsible for
-any consequences resulting from the use of this software.
-
-Any person who transfers this source code or any derivative work must
-include the IDT copyright notice, this paragraph, and the preceeding
-two paragraphs in the transferred software.
-
-COPYRIGHT IDT CORPORATION 1996
-LICENSED MATERIAL - PROGRAM PROPERTY OF IDT
-
- $Id$
-*/
-
-/*
-** iregdef.h - IDT R3000 register structure header file
-**
-** Copyright 1989 Integrated Device Technology, Inc
-** All Rights Reserved
-**
-*/
-#ifndef __IREGDEF_H__
-#define __IREGDEF_H__
-
-/*
- * 950313: Ketan added sreg/lreg and R_SZ for 64-bit saves
- * added Register definition for XContext reg.
- * Look towards end of this file.
- */
-/*
-** register names
-*/
-#define r0 $0
-#define r1 $1
-#define r2 $2
-#define r3 $3
-#define r4 $4
-#define r5 $5
-#define r6 $6
-#define r7 $7
-#define r8 $8
-#define r9 $9
-#define r10 $10
-#define r11 $11
-#define r12 $12
-#define r13 $13
-
-#define r14 $14
-#define r15 $15
-#define r16 $16
-#define r17 $17
-#define r18 $18
-#define r19 $19
-#define r20 $20
-#define r21 $21
-#define r22 $22
-#define r23 $23
-#define r24 $24
-#define r25 $25
-#define r26 $26
-#define r27 $27
-#define r28 $28
-#define r29 $29
-#define r30 $30
-#define r31 $31
-
-#define fp0 $f0
-#define fp1 $f1
-#define fp2 $f2
-#define fp3 $f3
-#define fp4 $f4
-#define fp5 $f5
-#define fp6 $f6
-#define fp7 $f7
-#define fp8 $f8
-#define fp9 $f9
-#define fp10 $f10
-#define fp11 $f11
-#define fp12 $f12
-#define fp13 $f13
-#define fp14 $f14
-#define fp15 $f15
-#define fp16 $f16
-#define fp17 $f17
-#define fp18 $f18
-#define fp19 $f19
-#define fp20 $f20
-#define fp21 $f21
-#define fp22 $f22
-#define fp23 $f23
-#define fp24 $f24
-#define fp25 $f25
-#define fp26 $f26
-#define fp27 $f27
-#define fp28 $f28
-#define fp29 $f29
-#define fp30 $f30
-#define fp31 $f31
-
-#define fcr0 $0
-#define fcr30 $30
-#define fcr31 $31
-
-#define zero $0 /* wired zero */
-#define AT $at /* assembler temp */
-#define v0 $2 /* return value */
-#define v1 $3
-#define a0 $4 /* argument registers a0-a3 */
-#define a1 $5
-#define a2 $6
-#define a3 $7
-#define t0 $8 /* caller saved t0-t9 */
-#define t1 $9
-#define t2 $10
-#define t3 $11
-#define t4 $12
-#define t5 $13
-#define t6 $14
-#define t7 $15
-#define s0 $16 /* callee saved s0-s8 */
-#define s1 $17
-#define s2 $18
-#define s3 $19
-#define s4 $20
-#define s5 $21
-#define s6 $22
-#define s7 $23
-#define t8 $24
-#define t9 $25
-#define k0 $26 /* kernel usage */
-#define k1 $27 /* kernel usage */
-#define gp $28 /* sdata pointer */
-#define sp $29 /* stack pointer */
-#define s8 $30 /* yet another saved reg for the callee */
-#define fp $30 /* frame pointer - this is being phased out by MIPS */
-#define ra $31 /* return address */
-
-
-/*
-** relative position of registers in save reg area
-*/
-#define R_R0 0
-#define R_R1 1
-#define R_R2 2
-#define R_R3 3
-#define R_R4 4
-#define R_R5 5
-#define R_R6 6
-#define R_R7 7
-#define R_R8 8
-#define R_R9 9
-#define R_R10 10
-#define R_R11 11
-#define R_R12 12
-#define R_R13 13
-#define R_R14 14
-#define R_R15 15
-#define R_R16 16
-#define R_R17 17
-#define R_R18 18
-#define R_R19 19
-#define R_R20 20
-#define R_R21 21
-#define R_R22 22
-#define R_R23 23
-#define R_R24 24
-#define R_R25 25
-#define R_R26 26
-#define R_R27 27
-#define R_R28 28
-#define R_R29 29
-#define R_R30 30
-#define R_R31 31
-#define R_F0 32
-#define R_F1 33
-#define R_F2 34
-#define R_F3 35
-#define R_F4 36
-#define R_F5 37
-#define R_F6 38
-#define R_F7 39
-#define R_F8 40
-#define R_F9 41
-#define R_F10 42
-#define R_F11 43
-#define R_F12 44
-#define R_F13 45
-#define R_F14 46
-#define R_F15 47
-#define R_F16 48
-#define R_F17 49
-#define R_F18 50
-#define R_F19 51
-#define R_F20 52
-#define R_F21 53
-#define R_F22 54
-#define R_F23 55
-#define R_F24 56
-#define R_F25 57
-#define R_F26 58
-#define R_F27 59
-#define R_F28 60
-#define R_F29 61
-#define R_F30 62
-#define R_F31 63
-#define NCLIENTREGS 64
-#define R_EPC 64
-#define R_MDHI 65
-#define R_MDLO 66
-#define R_SR 67
-#define R_CAUSE 68
-#define R_TLBHI 69
-#if defined(CPU_R3000)
-#define R_TLBLO 70
-#endif
-#if defined(CPU_R4000)
-#define R_TLBLO0 70
-#endif
-#define R_BADVADDR 71
-#define R_INX 72
-#define R_RAND 73
-#define R_CTXT 74
-#define R_EXCTYPE 75
-#define R_MODE 76
-#define R_PRID 77
-#define R_FCSR 78
-#define R_FEIR 79
-#if defined(CPU_R3000)
-#define NREGS 80
-#endif
-#if defined(CPU_R4000)
-#define R_TLBLO1 80
-#define R_PAGEMASK 81
-#define R_WIRED 82
-#define R_COUNT 83
-#define R_COMPARE 84
-#define R_CONFIG 85
-#define R_LLADDR 86
-#define R_WATCHLO 87
-#define R_WATCHHI 88
-#define R_ECC 89
-#define R_CACHEERR 90
-#define R_TAGLO 91
-#define R_TAGHI 92
-#define R_ERRPC 93
-#define R_XCTXT 94 /* Ketan added from SIM64bit */
-
-#define NREGS 95
-#endif
-
-/*
-** For those who like to think in terms of the compiler names for the regs
-*/
-#define R_ZERO R_R0
-#define R_AT R_R1
-#define R_V0 R_R2
-#define R_V1 R_R3
-#define R_A0 R_R4
-#define R_A1 R_R5
-#define R_A2 R_R6
-#define R_A3 R_R7
-#define R_T0 R_R8
-#define R_T1 R_R9
-#define R_T2 R_R10
-#define R_T3 R_R11
-#define R_T4 R_R12
-#define R_T5 R_R13
-#define R_T6 R_R14
-#define R_T7 R_R15
-#define R_S0 R_R16
-#define R_S1 R_R17
-#define R_S2 R_R18
-#define R_S3 R_R19
-#define R_S4 R_R20
-#define R_S5 R_R21
-#define R_S6 R_R22
-#define R_S7 R_R23
-#define R_T8 R_R24
-#define R_T9 R_R25
-#define R_K0 R_R26
-#define R_K1 R_R27
-#define R_GP R_R28
-#define R_SP R_R29
-#define R_FP R_R30
-#define R_RA R_R31
-
-/* Ketan added the following */
-#ifdef CPU_R3000
-#define sreg sw
-#define lreg lw
-#define rmfc0 mfc0
-#define rmtc0 mtc0
-#define R_SZ 4
-#endif CPU_R3000
-
-#ifdef CPU_R4000
-#if __mips < 3
-#define sreg sw
-#define lreg lw
-#define rmfc0 mfc0
-#define rmtc0 mtc0
-#define R_SZ 4
-#else
-#define sreg sd
-#define lreg ld
-#define rmfc0 dmfc0
-#define rmtc0 dmtc0
-#define R_SZ 8
-#endif
-#endif CPU_R4000
-/* Ketan till here */
-
-#endif /* __IREGDEF_H__ */
-
diff --git a/cpukit/score/cpu/mips64orion/rtems/score/cpu.h b/cpukit/score/cpu/mips64orion/rtems/score/cpu.h
deleted file mode 100644
index 96eb34292a..0000000000
--- a/cpukit/score/cpu/mips64orion/rtems/score/cpu.h
+++ /dev/null
@@ -1,980 +0,0 @@
-/* cpu.h
- *
- * This include file contains information pertaining to the IDT 4650
- * processor.
- *
- * Author: Craig Lebakken <craigl@transition.com>
- *
- * COPYRIGHT (c) 1996 by Transition Networks Inc.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Transition Networks not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * Transition Networks makes no representations about the suitability
- * of this software for any purpose.
- *
- * Derived from c/src/exec/score/cpu/no_cpu/cpu.h:
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-/* @(#)cpu.h 08/29/96 1.7 */
-
-#ifndef __CPU_h
-#define __CPU_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/mips64orion.h> /* pick up machine definitions */
-#ifndef ASM
-#include <rtems/score/mipstypes.h>
-#endif
-
-extern int mips_disable_interrupts( void );
-extern void mips_enable_interrupts( int _level );
-extern int mips_disable_global_interrupts( void );
-extern void mips_enable_global_interrupts( void );
-extern void mips_fatal_error ( int error );
-
-/* conditional compilation parameters */
-
-/*
- * Should the calls to _Thread_Enable_dispatch be inlined?
- *
- * If TRUE, then they are inlined.
- * If FALSE, then a subroutine call is made.
- *
- * Basically this is an example of the classic trade-off of size
- * versus speed. Inlining the call (TRUE) typically increases the
- * size of RTEMS while speeding up the enabling of dispatching.
- * [NOTE: In general, the _Thread_Dispatch_disable_level will
- * only be 0 or 1 unless you are in an interrupt handler and that
- * interrupt handler invokes the executive.] When not inlined
- * something calls _Thread_Enable_dispatch which in turns calls
- * _Thread_Dispatch. If the enable dispatch is inlined, then
- * one subroutine call is avoided entirely.]
- */
-
-#define CPU_INLINE_ENABLE_DISPATCH TRUE
-
-/*
- * Should the body of the search loops in _Thread_queue_Enqueue_priority
- * be unrolled one time? In unrolled each iteration of the loop examines
- * two "nodes" on the chain being searched. Otherwise, only one node
- * is examined per iteration.
- *
- * If TRUE, then the loops are unrolled.
- * If FALSE, then the loops are not unrolled.
- *
- * The primary factor in making this decision is the cost of disabling
- * and enabling interrupts (_ISR_Flash) versus the cost of rest of the
- * body of the loop. On some CPUs, the flash is more expensive than
- * one iteration of the loop body. In this case, it might be desirable
- * to unroll the loop. It is important to note that on some CPUs, this
- * code is the longest interrupt disable period in RTEMS. So it is
- * necessary to strike a balance when setting this parameter.
- */
-
-#define CPU_UNROLL_ENQUEUE_PRIORITY TRUE
-
-/*
- * Does RTEMS manage a dedicated interrupt stack in software?
- *
- * If TRUE, then a stack is allocated in _Interrupt_Manager_initialization.
- * If FALSE, nothing is done.
- *
- * If the CPU supports a dedicated interrupt stack in hardware,
- * then it is generally the responsibility of the BSP to allocate it
- * and set it up.
- *
- * If the CPU does not support a dedicated interrupt stack, then
- * the porter has two options: (1) execute interrupts on the
- * stack of the interrupted task, and (2) have RTEMS manage a dedicated
- * interrupt stack.
- *
- * If this is TRUE, CPU_ALLOCATE_INTERRUPT_STACK should also be TRUE.
- *
- * Only one of CPU_HAS_SOFTWARE_INTERRUPT_STACK and
- * CPU_HAS_HARDWARE_INTERRUPT_STACK should be set to TRUE. It is
- * possible that both are FALSE for a particular CPU. Although it
- * is unclear what that would imply about the interrupt processing
- * procedure on that CPU.
- */
-
-#define CPU_HAS_SOFTWARE_INTERRUPT_STACK FALSE
-
-/*
- * Does this CPU have hardware support for a dedicated interrupt stack?
- *
- * If TRUE, then it must be installed during initialization.
- * If FALSE, then no installation is performed.
- *
- * If this is TRUE, CPU_ALLOCATE_INTERRUPT_STACK should also be TRUE.
- *
- * Only one of CPU_HAS_SOFTWARE_INTERRUPT_STACK and
- * CPU_HAS_HARDWARE_INTERRUPT_STACK should be set to TRUE. It is
- * possible that both are FALSE for a particular CPU. Although it
- * is unclear what that would imply about the interrupt processing
- * procedure on that CPU.
- */
-
-#define CPU_HAS_HARDWARE_INTERRUPT_STACK FALSE
-
-/*
- * Does RTEMS allocate a dedicated interrupt stack in the Interrupt Manager?
- *
- * If TRUE, then the memory is allocated during initialization.
- * If FALSE, then the memory is allocated during initialization.
- *
- * This should be TRUE is CPU_HAS_SOFTWARE_INTERRUPT_STACK is TRUE
- * or CPU_INSTALL_HARDWARE_INTERRUPT_STACK is TRUE.
- */
-
-#define CPU_ALLOCATE_INTERRUPT_STACK FALSE
-
-/*
- * Does the RTEMS invoke the user's ISR with the vector number and
- * a pointer to the saved interrupt frame (1) or just the vector
- * number (0)?
- */
-
-#define CPU_ISR_PASSES_FRAME_POINTER 0
-
-/*
- * Does the CPU have hardware floating point?
- *
- * If TRUE, then the RTEMS_FLOATING_POINT task attribute is supported.
- * If FALSE, then the RTEMS_FLOATING_POINT task attribute is ignored.
- *
- * If there is a FP coprocessor such as the i387 or mc68881, then
- * the answer is TRUE.
- *
- * The macro name "MIPS64ORION_HAS_FPU" should be made CPU specific.
- * It indicates whether or not this CPU model has FP support. For
- * example, it would be possible to have an i386_nofp CPU model
- * which set this to false to indicate that you have an i386 without
- * an i387 and wish to leave floating point support out of RTEMS.
- */
-
-#if ( MIPS64ORION_HAS_FPU == 1 )
-#define CPU_HARDWARE_FP TRUE
-#else
-#define CPU_HARDWARE_FP FALSE
-#endif
-
-/*
- * Are all tasks RTEMS_FLOATING_POINT tasks implicitly?
- *
- * If TRUE, then the RTEMS_FLOATING_POINT task attribute is assumed.
- * If FALSE, then the RTEMS_FLOATING_POINT task attribute is followed.
- *
- * So far, the only CPU in which this option has been used is the
- * HP PA-RISC. The HP C compiler and gcc both implicitly use the
- * floating point registers to perform integer multiplies. If
- * a function which you would not think utilize the FP unit DOES,
- * then one can not easily predict which tasks will use the FP hardware.
- * In this case, this option should be TRUE.
- *
- * If CPU_HARDWARE_FP is FALSE, then this should be FALSE as well.
- */
-
-#define CPU_ALL_TASKS_ARE_FP FALSE
-
-/*
- * Should the IDLE task have a floating point context?
- *
- * If TRUE, then the IDLE task is created as a RTEMS_FLOATING_POINT task
- * and it has a floating point context which is switched in and out.
- * If FALSE, then the IDLE task does not have a floating point context.
- *
- * Setting this to TRUE negatively impacts the time required to preempt
- * the IDLE task from an interrupt because the floating point context
- * must be saved as part of the preemption.
- */
-
-#define CPU_IDLE_TASK_IS_FP FALSE
-
-/*
- * Should the saving of the floating point registers be deferred
- * until a context switch is made to another different floating point
- * task?
- *
- * If TRUE, then the floating point context will not be stored until
- * necessary. It will remain in the floating point registers and not
- * disturned until another floating point task is switched to.
- *
- * If FALSE, then the floating point context is saved when a floating
- * point task is switched out and restored when the next floating point
- * task is restored. The state of the floating point registers between
- * those two operations is not specified.
- *
- * If the floating point context does NOT have to be saved as part of
- * interrupt dispatching, then it should be safe to set this to TRUE.
- *
- * Setting this flag to TRUE results in using a different algorithm
- * for deciding when to save and restore the floating point context.
- * The deferred FP switch algorithm minimizes the number of times
- * the FP context is saved and restored. The FP context is not saved
- * until a context switch is made to another, different FP task.
- * Thus in a system with only one FP task, the FP context will never
- * be saved or restored.
- */
-
-#define CPU_USE_DEFERRED_FP_SWITCH TRUE
-
-/*
- * Does this port provide a CPU dependent IDLE task implementation?
- *
- * If TRUE, then the routine _CPU_Internal_threads_Idle_thread_body
- * must be provided and is the default IDLE thread body instead of
- * _Internal_threads_Idle_thread_body.
- *
- * If FALSE, then use the generic IDLE thread body if the BSP does
- * not provide one.
- *
- * This is intended to allow for supporting processors which have
- * a low power or idle mode. When the IDLE thread is executed, then
- * the CPU can be powered down.
- *
- * The order of precedence for selecting the IDLE thread body is:
- *
- * 1. BSP provided
- * 2. CPU dependent (if provided)
- * 3. generic (if no BSP and no CPU dependent)
- */
-
-/* we can use the low power wait instruction for the IDLE thread */
-#define CPU_PROVIDES_IDLE_THREAD_BODY TRUE
-
-/*
- * Does the stack grow up (toward higher addresses) or down
- * (toward lower addresses)?
- *
- * If TRUE, then the grows upward.
- * If FALSE, then the grows toward smaller addresses.
- */
-
-/* our stack grows down */
-#define CPU_STACK_GROWS_UP FALSE
-
-/*
- * The following is the variable attribute used to force alignment
- * of critical RTEMS structures. On some processors it may make
- * sense to have these aligned on tighter boundaries than
- * the minimum requirements of the compiler in order to have as
- * much of the critical data area as possible in a cache line.
- *
- * The placement of this macro in the declaration of the variables
- * is based on the syntactically requirements of the GNU C
- * "__attribute__" extension. For example with GNU C, use
- * the following to force a structures to a 32 byte boundary.
- *
- * __attribute__ ((aligned (32)))
- *
- * NOTE: Currently only the Priority Bit Map table uses this feature.
- * To benefit from using this, the data must be heavily
- * used so it will stay in the cache and used frequently enough
- * in the executive to justify turning this on.
- */
-
-/* our cache line size is 16 bytes */
-#if __GNUC__
-#define CPU_STRUCTURE_ALIGNMENT __attribute__ ((aligned (16)))
-#else
-#define CPU_STRUCTURE_ALIGNMENT
-#endif
-
-/*
- * Define what is required to specify how the network to host conversion
- * routines are handled.
- */
-
-#define CPU_HAS_OWN_HOST_TO_NETWORK_ROUTINES FALSE
-#define CPU_BIG_ENDIAN TRUE
-#define CPU_LITTLE_ENDIAN FALSE
-
-/*
- * The following defines the number of bits actually used in the
- * interrupt field of the task mode. How those bits map to the
- * CPU interrupt levels is defined by the routine _CPU_ISR_Set_level().
- */
-
-#define CPU_MODES_INTERRUPT_MASK 0x00000001
-
-/*
- * Processor defined structures
- *
- * Examples structures include the descriptor tables from the i386
- * and the processor control structure on the i960ca.
- */
-
-/* may need to put some structures here. */
-
-/*
- * Contexts
- *
- * Generally there are 2 types of context to save.
- * 1. Interrupt registers to save
- * 2. Task level registers to save
- *
- * This means we have the following 3 context items:
- * 1. task level context stuff:: Context_Control
- * 2. floating point task stuff:: Context_Control_fp
- * 3. special interrupt level context :: Context_Control_interrupt
- *
- * On some processors, it is cost-effective to save only the callee
- * preserved registers during a task context switch. This means
- * that the ISR code needs to save those registers which do not
- * persist across function calls. It is not mandatory to make this
- * distinctions between the caller/callee saves registers for the
- * purpose of minimizing context saved during task switch and on interrupts.
- * If the cost of saving extra registers is minimal, simplicity is the
- * choice. Save the same context on interrupt entry as for tasks in
- * this case.
- *
- * Additionally, if gdb is to be made aware of RTEMS tasks for this CPU, then
- * care should be used in designing the context area.
- *
- * On some CPUs with hardware floating point support, the Context_Control_fp
- * structure will not be used or it simply consist of an array of a
- * fixed number of bytes. This is done when the floating point context
- * is dumped by a "FP save context" type instruction and the format
- * is not really defined by the CPU. In this case, there is no need
- * to figure out the exact format -- only the size. Of course, although
- * this is enough information for RTEMS, it is probably not enough for
- * a debugger such as gdb. But that is another problem.
- */
-
-/* WARNING: If this structure is modified, the constants in cpu.h must be updated. */
-typedef struct {
- unsigned64 s0;
- unsigned64 s1;
- unsigned64 s2;
- unsigned64 s3;
- unsigned64 s4;
- unsigned64 s5;
- unsigned64 s6;
- unsigned64 s7;
- unsigned64 sp;
- unsigned64 fp;
- unsigned64 ra;
- unsigned64 c0_sr;
- unsigned64 c0_epc;
-} Context_Control;
-
-/* WARNING: If this structure is modified, the constants in cpu.h must be updated. */
-typedef struct {
- unsigned32 fp0;
- unsigned32 fp1;
- unsigned32 fp2;
- unsigned32 fp3;
- unsigned32 fp4;
- unsigned32 fp5;
- unsigned32 fp6;
- unsigned32 fp7;
- unsigned32 fp8;
- unsigned32 fp9;
- unsigned32 fp10;
- unsigned32 fp11;
- unsigned32 fp12;
- unsigned32 fp13;
- unsigned32 fp14;
- unsigned32 fp15;
- unsigned32 fp16;
- unsigned32 fp17;
- unsigned32 fp18;
- unsigned32 fp19;
- unsigned32 fp20;
- unsigned32 fp21;
- unsigned32 fp22;
- unsigned32 fp23;
- unsigned32 fp24;
- unsigned32 fp25;
- unsigned32 fp26;
- unsigned32 fp27;
- unsigned32 fp28;
- unsigned32 fp29;
- unsigned32 fp30;
- unsigned32 fp31;
-} Context_Control_fp;
-
-typedef struct {
- unsigned32 special_interrupt_register;
-} CPU_Interrupt_frame;
-
-
-/*
- * The following table contains the information required to configure
- * the mips processor specific parameters.
- */
-
-typedef struct {
- void (*pretasking_hook)( void );
- void (*predriver_hook)( void );
- void (*postdriver_hook)( void );
- void (*idle_task)( void );
- boolean do_zero_of_workspace;
- unsigned32 idle_task_stack_size;
- unsigned32 interrupt_stack_size;
- unsigned32 extra_mpci_receive_server_stack;
- void * (*stack_allocate_hook)( unsigned32 );
- void (*stack_free_hook)( void* );
- /* end of fields required on all CPUs */
-
- unsigned32 clicks_per_microsecond;
-} rtems_cpu_table;
-
-/*
- * Macros to access required entires in the CPU Table are in
- * the file rtems/system.h.
- */
-
-/*
- * Macros to access MIPS64ORION specific additions to the CPU Table
- */
-
-#define rtems_cpu_configuration_get_clicks_per_microsecond() \
- (_CPU_Table.clicks_per_microsecond)
-
-/*
- * This variable is optional. It is used on CPUs on which it is difficult
- * to generate an "uninitialized" FP context. It is filled in by
- * _CPU_Initialize and copied into the task's FP context area during
- * _CPU_Context_Initialize.
- */
-
-SCORE_EXTERN Context_Control_fp _CPU_Null_fp_context;
-
-/*
- * On some CPUs, RTEMS supports a software managed interrupt stack.
- * This stack is allocated by the Interrupt Manager and the switch
- * is performed in _ISR_Handler. These variables contain pointers
- * to the lowest and highest addresses in the chunk of memory allocated
- * for the interrupt stack. Since it is unknown whether the stack
- * grows up or down (in general), this give the CPU dependent
- * code the option of picking the version it wants to use.
- *
- * NOTE: These two variables are required if the macro
- * CPU_HAS_SOFTWARE_INTERRUPT_STACK is defined as TRUE.
- */
-
-SCORE_EXTERN void *_CPU_Interrupt_stack_low;
-SCORE_EXTERN void *_CPU_Interrupt_stack_high;
-
-/*
- * With some compilation systems, it is difficult if not impossible to
- * call a high-level language routine from assembly language. This
- * is especially true of commercial Ada compilers and name mangling
- * C++ ones. This variable can be optionally defined by the CPU porter
- * and contains the address of the routine _Thread_Dispatch. This
- * can make it easier to invoke that routine at the end of the interrupt
- * sequence (if a dispatch is necessary).
- */
-
-SCORE_EXTERN void (*_CPU_Thread_dispatch_pointer)();
-
-/*
- * Nothing prevents the porter from declaring more CPU specific variables.
- */
-
-/* XXX: if needed, put more variables here */
-
-/*
- * The size of the floating point context area. On some CPUs this
- * will not be a "sizeof" because the format of the floating point
- * area is not defined -- only the size is. This is usually on
- * CPUs with a "floating point save context" instruction.
- */
-
-#define CPU_CONTEXT_FP_SIZE sizeof( Context_Control_fp )
-
-/*
- * Amount of extra stack (above minimum stack size) required by
- * system initialization thread. Remember that in a multiprocessor
- * system the system intialization thread becomes the MP server thread.
- */
-
-#define CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK 0
-
-/*
- * This defines the number of entries in the ISR_Vector_table managed
- * by RTEMS.
- */
-
-#define CPU_INTERRUPT_NUMBER_OF_VECTORS 8
-#define CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER (CPU_INTERRUPT_NUMBER_OF_VECTORS - 1)
-
-/*
- * Should be large enough to run all RTEMS tests. This insures
- * that a "reasonable" small application should not have any problems.
- */
-
-#define CPU_STACK_MINIMUM_SIZE (2048*sizeof(unsigned32))
-
-/*
- * CPU's worst alignment requirement for data types on a byte boundary. This
- * alignment does not take into account the requirements for the stack.
- */
-
-#define CPU_ALIGNMENT 8
-
-/*
- * This number corresponds to the byte alignment requirement for the
- * heap handler. This alignment requirement may be stricter than that
- * for the data types alignment specified by CPU_ALIGNMENT. It is
- * common for the heap to follow the same alignment requirement as
- * CPU_ALIGNMENT. If the CPU_ALIGNMENT is strict enough for the heap,
- * then this should be set to CPU_ALIGNMENT.
- *
- * NOTE: This does not have to be a power of 2. It does have to
- * be greater or equal to than CPU_ALIGNMENT.
- */
-
-#define CPU_HEAP_ALIGNMENT CPU_ALIGNMENT
-
-/*
- * This number corresponds to the byte alignment requirement for memory
- * buffers allocated by the partition manager. This alignment requirement
- * may be stricter than that for the data types alignment specified by
- * CPU_ALIGNMENT. It is common for the partition to follow the same
- * alignment requirement as CPU_ALIGNMENT. If the CPU_ALIGNMENT is strict
- * enough for the partition, then this should be set to CPU_ALIGNMENT.
- *
- * NOTE: This does not have to be a power of 2. It does have to
- * be greater or equal to than CPU_ALIGNMENT.
- */
-
-#define CPU_PARTITION_ALIGNMENT CPU_ALIGNMENT
-
-/*
- * This number corresponds to the byte alignment requirement for the
- * stack. This alignment requirement may be stricter than that for the
- * data types alignment specified by CPU_ALIGNMENT. If the CPU_ALIGNMENT
- * is strict enough for the stack, then this should be set to 0.
- *
- * NOTE: This must be a power of 2 either 0 or greater than CPU_ALIGNMENT.
- */
-
-#define CPU_STACK_ALIGNMENT CPU_ALIGNMENT
-
-/* ISR handler macros */
-
-/*
- * Disable all interrupts for an RTEMS critical section. The previous
- * level is returned in _level.
- */
-
-#define _CPU_ISR_Disable( _int_level ) \
- do{ \
- _int_level = mips_disable_interrupts(); \
- }while(0)
-
-/*
- * Enable interrupts to the previous level (returned by _CPU_ISR_Disable).
- * This indicates the end of an RTEMS critical section. The parameter
- * _level is not modified.
- */
-
-#define _CPU_ISR_Enable( _level ) \
- do{ \
- mips_enable_interrupts(_level); \
- }while(0)
-
-/*
- * This temporarily restores the interrupt to _level before immediately
- * disabling them again. This is used to divide long RTEMS critical
- * sections into two or more parts. The parameter _level is not
- * modified.
- */
-
-#define _CPU_ISR_Flash( _xlevel ) \
- do{ \
- int _scratch; \
- _CPU_ISR_Enable( _xlevel ); \
- _CPU_ISR_Disable( _scratch ); \
- }while(0)
-
-/*
- * Map interrupt level in task mode onto the hardware that the CPU
- * actually provides. Currently, interrupt levels which do not
- * map onto the CPU in a generic fashion are undefined. Someday,
- * it would be nice if these were "mapped" by the application
- * via a callout. For example, m68k has 8 levels 0 - 7, levels
- * 8 - 255 would be available for bsp/application specific meaning.
- * This could be used to manage a programmable interrupt controller
- * via the rtems_task_mode directive.
- */
-extern void _CPU_ISR_Set_level( unsigned32 _new_level );
-
-unsigned32 _CPU_ISR_Get_level( void );
-
-/* end of ISR handler macros */
-
-/* Context handler macros */
-
-/*
- * Initialize the context to a state suitable for starting a
- * task after a context restore operation. Generally, this
- * involves:
- *
- * - setting a starting address
- * - preparing the stack
- * - preparing the stack and frame pointers
- * - setting the proper interrupt level in the context
- * - initializing the floating point context
- *
- * This routine generally does not set any unnecessary register
- * in the context. The state of the "general data" registers is
- * undefined at task start time.
- *
- * NOTE: This is_fp parameter is TRUE if the thread is to be a floating
- * point thread. This is typically only used on CPUs where the
- * FPU may be easily disabled by software such as on the SPARC
- * where the PSR contains an enable FPU bit.
- */
-
-#define _CPU_Context_Initialize( _the_context, _stack_base, _size, \
- _isr, _entry_point, _is_fp ) \
- { \
- unsigned32 _stack_tmp = (unsigned32)(_stack_base) + (_size) - CPU_STACK_ALIGNMENT; \
- _stack_tmp &= ~(CPU_STACK_ALIGNMENT - 1); \
- (_the_context)->sp = _stack_tmp; \
- (_the_context)->fp = _stack_tmp; \
- (_the_context)->ra = (unsigned64)_entry_point; \
- (_the_context)->c0_sr = 0; \
- }
-
-/*
- * This routine is responsible for somehow restarting the currently
- * executing task. If you are lucky, then all that is necessary
- * is restoring the context. Otherwise, there will need to be
- * a special assembly routine which does something special in this
- * case. Context_Restore should work most of the time. It will
- * not work if restarting self conflicts with the stack frame
- * assumptions of restoring a context.
- */
-
-#define _CPU_Context_Restart_self( _the_context ) \
- _CPU_Context_restore( (_the_context) );
-
-/*
- * The purpose of this macro is to allow the initial pointer into
- * A floating point context area (used to save the floating point
- * context) to be at an arbitrary place in the floating point
- * context area.
- *
- * This is necessary because some FP units are designed to have
- * their context saved as a stack which grows into lower addresses.
- * Other FP units can be saved by simply moving registers into offsets
- * from the base of the context area. Finally some FP units provide
- * a "dump context" instruction which could fill in from high to low
- * or low to high based on the whim of the CPU designers.
- */
-
-#define _CPU_Context_Fp_start( _base, _offset ) \
- ( (void *) _Addresses_Add_offset( (_base), (_offset) ) )
-
-/*
- * This routine initializes the FP context area passed to it to.
- * There are a few standard ways in which to initialize the
- * floating point context. The code included for this macro assumes
- * that this is a CPU in which a "initial" FP context was saved into
- * _CPU_Null_fp_context and it simply copies it to the destination
- * context passed to it.
- *
- * Other models include (1) not doing anything, and (2) putting
- * a "null FP status word" in the correct place in the FP context.
- */
-
-#define _CPU_Context_Initialize_fp( _destination ) \
- { \
- *((Context_Control_fp *) *((void **) _destination)) = _CPU_Null_fp_context; \
- }
-
-/* end of Context handler macros */
-
-/* Fatal Error manager macros */
-
-/*
- * This routine copies _error into a known place -- typically a stack
- * location or a register, optionally disables interrupts, and
- * halts/stops the CPU.
- */
-
-#define _CPU_Fatal_halt( _error ) \
- { \
- mips_disable_global_interrupts(); \
- mips_fatal_error(_error); \
- }
-
-/* end of Fatal Error manager macros */
-
-/* Bitfield handler macros */
-
-/*
- * This routine sets _output to the bit number of the first bit
- * set in _value. _value is of CPU dependent type Priority_Bit_map_control.
- * This type may be either 16 or 32 bits wide although only the 16
- * least significant bits will be used.
- *
- * There are a number of variables in using a "find first bit" type
- * instruction.
- *
- * (1) What happens when run on a value of zero?
- * (2) Bits may be numbered from MSB to LSB or vice-versa.
- * (3) The numbering may be zero or one based.
- * (4) The "find first bit" instruction may search from MSB or LSB.
- *
- * RTEMS guarantees that (1) will never happen so it is not a concern.
- * (2),(3), (4) are handled by the macros _CPU_Priority_mask() and
- * _CPU_Priority_bits_index(). These three form a set of routines
- * which must logically operate together. Bits in the _value are
- * set and cleared based on masks built by _CPU_Priority_mask().
- * The basic major and minor values calculated by _Priority_Major()
- * and _Priority_Minor() are "massaged" by _CPU_Priority_bits_index()
- * to properly range between the values returned by the "find first bit"
- * instruction. This makes it possible for _Priority_Get_highest() to
- * calculate the major and directly index into the minor table.
- * This mapping is necessary to ensure that 0 (a high priority major/minor)
- * is the first bit found.
- *
- * This entire "find first bit" and mapping process depends heavily
- * on the manner in which a priority is broken into a major and minor
- * components with the major being the 4 MSB of a priority and minor
- * the 4 LSB. Thus (0 << 4) + 0 corresponds to priority 0 -- the highest
- * priority. And (15 << 4) + 14 corresponds to priority 254 -- the next
- * to the lowest priority.
- *
- * If your CPU does not have a "find first bit" instruction, then
- * there are ways to make do without it. Here are a handful of ways
- * to implement this in software:
- *
- * - a series of 16 bit test instructions
- * - a "binary search using if's"
- * - _number = 0
- * if _value > 0x00ff
- * _value >>=8
- * _number = 8;
- *
- * if _value > 0x0000f
- * _value >=8
- * _number += 4
- *
- * _number += bit_set_table[ _value ]
- *
- * where bit_set_table[ 16 ] has values which indicate the first
- * bit set
- */
-
-#define CPU_USE_GENERIC_BITFIELD_CODE TRUE
-#define CPU_USE_GENERIC_BITFIELD_DATA TRUE
-
-#if (CPU_USE_GENERIC_BITFIELD_CODE == FALSE)
-
-#define _CPU_Bitfield_Find_first_bit( _value, _output ) \
- { \
- (_output) = 0; /* do something to prevent warnings */ \
- }
-
-#endif
-
-/* end of Bitfield handler macros */
-
-/*
- * This routine builds the mask which corresponds to the bit fields
- * as searched by _CPU_Bitfield_Find_first_bit(). See the discussion
- * for that routine.
- */
-
-#if (CPU_USE_GENERIC_BITFIELD_CODE == FALSE)
-
-#define _CPU_Priority_Mask( _bit_number ) \
- ( 1 << (_bit_number) )
-
-#endif
-
-/*
- * This routine translates the bit numbers returned by
- * _CPU_Bitfield_Find_first_bit() into something suitable for use as
- * a major or minor component of a priority. See the discussion
- * for that routine.
- */
-
-#if (CPU_USE_GENERIC_BITFIELD_CODE == FALSE)
-
-#define _CPU_Priority_bits_index( _priority ) \
- (_priority)
-
-#endif
-
-/* end of Priority handler macros */
-
-/* functions */
-
-/*
- * _CPU_Initialize
- *
- * This routine performs CPU dependent initialization.
- */
-
-void _CPU_Initialize(
- rtems_cpu_table *cpu_table,
- void (*thread_dispatch)
-);
-
-/*
- * _CPU_ISR_install_raw_handler
- *
- * This routine installs a "raw" interrupt handler directly into the
- * processor's vector table.
- */
-
-void _CPU_ISR_install_raw_handler(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-);
-
-/*
- * _CPU_ISR_install_vector
- *
- * This routine installs an interrupt vector.
- */
-
-void _CPU_ISR_install_vector(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-);
-
-/*
- * _CPU_Install_interrupt_stack
- *
- * This routine installs the hardware interrupt stack pointer.
- *
- * NOTE: It need only be provided if CPU_HAS_HARDWARE_INTERRUPT_STACK
- * is TRUE.
- */
-
-void _CPU_Install_interrupt_stack( void );
-
-/*
- * _CPU_Internal_threads_Idle_thread_body
- *
- * This routine is the CPU dependent IDLE thread body.
- *
- * NOTE: It need only be provided if CPU_PROVIDES_IDLE_THREAD_BODY
- * is TRUE.
- */
-
-void _CPU_Thread_Idle_body( void );
-
-/*
- * _CPU_Context_switch
- *
- * This routine switches from the run context to the heir context.
- */
-
-void _CPU_Context_switch(
- Context_Control *run,
- Context_Control *heir
-);
-
-/*
- * _CPU_Context_restore
- *
- * This routine is generally used only to restart self in an
- * efficient manner. It may simply be a label in _CPU_Context_switch.
- *
- * NOTE: May be unnecessary to reload some registers.
- */
-
-void _CPU_Context_restore(
- Context_Control *new_context
-);
-
-/*
- * _CPU_Context_save_fp
- *
- * This routine saves the floating point context passed to it.
- */
-
-void _CPU_Context_save_fp(
- void **fp_context_ptr
-);
-
-/*
- * _CPU_Context_restore_fp
- *
- * This routine restores the floating point context passed to it.
- */
-
-void _CPU_Context_restore_fp(
- void **fp_context_ptr
-);
-
-/* The following routine swaps the endian format of an unsigned int.
- * It must be static because it is referenced indirectly.
- *
- * This version will work on any processor, but if there is a better
- * way for your CPU PLEASE use it. The most common way to do this is to:
- *
- * swap least significant two bytes with 16-bit rotate
- * swap upper and lower 16-bits
- * swap most significant two bytes with 16-bit rotate
- *
- * Some CPUs have special instructions which swap a 32-bit quantity in
- * a single instruction (e.g. i486). It is probably best to avoid
- * an "endian swapping control bit" in the CPU. One good reason is
- * that interrupts would probably have to be disabled to insure that
- * an interrupt does not try to access the same "chunk" with the wrong
- * endian. Another good reason is that on some CPUs, the endian bit
- * endianness for ALL fetches -- both code and data -- so the code
- * will be fetched incorrectly.
- */
-
-static inline unsigned int CPU_swap_u32(
- unsigned int value
-)
-{
- unsigned32 byte1, byte2, byte3, byte4, swapped;
-
- byte4 = (value >> 24) & 0xff;
- byte3 = (value >> 16) & 0xff;
- byte2 = (value >> 8) & 0xff;
- byte1 = value & 0xff;
-
- swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
- return( swapped );
-}
-
-#define CPU_swap_u16( value ) \
- (((value&0xff) << 8) | ((value >> 8)&0xff))
-
-/*
- * Miscellaneous prototypes
- *
- * NOTE: The names should have mips64orion in them.
- */
-
-void disable_int( unsigned32 mask );
-void enable_int( unsigned32 mask );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/cpukit/score/cpu/mips64orion/rtems/score/mips64orion.h b/cpukit/score/cpu/mips64orion/rtems/score/mips64orion.h
deleted file mode 100644
index 1ff139f604..0000000000
--- a/cpukit/score/cpu/mips64orion/rtems/score/mips64orion.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/* mips64orion.h
- *
- * Author: Craig Lebakken <craigl@transition.com>
- *
- * COPYRIGHT (c) 1996 by Transition Networks Inc.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Transition Networks not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * Transition Networks makes no representations about the suitability
- * of this software for any purpose.
- *
- * Derived from c/src/exec/score/cpu/no_cpu/no_cpu.h:
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-/* @(#)mips64orion.h 08/29/96 1.3 */
-
-#ifndef _INCLUDE_MIPS64ORION_h
-#define _INCLUDE_MIPS64ORION_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This file contains the information required to build
- * RTEMS for a particular member of the "no cpu"
- * family when executing in protected mode. It does
- * this by setting variables to indicate which implementation
- * dependent features are present in a particular member
- * of the family.
- */
-
-#if defined(R4650)
-
-#define CPU_MODEL_NAME "R4650"
-#define MIPS64ORION_HAS_FPU 1
-
-#elif defined(R4600)
-
-#define CPU_MODEL_NAME "R4600"
-#define MIPS64ORION_HAS_FPU 1
-
-#else
-
-#error "Unsupported CPU Model"
-
-#endif
-
-/*
- * Define the name of the CPU family.
- */
-
-#define CPU_NAME "MIPS R46xxx"
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* ! _INCLUDE_MIPS64ORION_h */
-/* end of include file */
diff --git a/cpukit/score/cpu/mips64orion/rtems/score/types.h b/cpukit/score/cpu/mips64orion/rtems/score/types.h
deleted file mode 100644
index 9d82f2a5d0..0000000000
--- a/cpukit/score/cpu/mips64orion/rtems/score/types.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* mipstypes.h
- *
- * This include file contains type definitions pertaining to the IDT 4650
- * processor family.
- *
- * Author: Craig Lebakken <craigl@transition.com>
- *
- * COPYRIGHT (c) 1996 by Transition Networks Inc.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Transition Networks not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * Transition Networks makes no representations about the suitability
- * of this software for any purpose.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-/* @(#)mipstypes.h 08/20/96 1.4 */
-
-#ifndef __MIPS_TYPES_h
-#define __MIPS_TYPES_h
-
-#ifndef ASM
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This section defines the basic types for this processor.
- */
-
-typedef unsigned char unsigned8; /* unsigned 8-bit integer */
-typedef unsigned short unsigned16; /* unsigned 16-bit integer */
-typedef unsigned int unsigned32; /* unsigned 32-bit integer */
-typedef unsigned long long unsigned64; /* unsigned 64-bit integer */
-
-typedef unsigned16 Priority_Bit_map_control;
-
-typedef signed char signed8; /* 8-bit signed integer */
-typedef signed short signed16; /* 16-bit signed integer */
-typedef signed int signed32; /* 32-bit signed integer */
-typedef signed long long signed64; /* 64 bit signed integer */
-
-typedef unsigned32 boolean; /* Boolean value */
-
-typedef float single_precision; /* single precision float */
-typedef double double_precision; /* double precision float */
-
-typedef void mips_isr;
-typedef void ( *mips_isr_entry )( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !ASM */
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/cpu/no_cpu/Makefile.am b/cpukit/score/cpu/no_cpu/Makefile.am
deleted file mode 100644
index 29ff8e77ff..0000000000
--- a/cpukit/score/cpu/no_cpu/Makefile.am
+++ /dev/null
@@ -1,45 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-
-SUBDIRS = rtems
-
-C_FILES = cpu.c cpu_asm.c
-C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
-
-H_FILES = asm.h
-
-REL = $(ARCH)/rtems-cpu.rel
-
-rtems_cpu_rel_OBJECTS = $(C_O_FILES)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../../../../automake/lib.am
-
-$(PROJECT_INCLUDE):
- $(mkinstalldirs) $@
-
-$(PROJECT_INCLUDE)/%.h: %.h
- $(INSTALL_DATA) $< $@
-
-$(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o: $(ARCH)/rtems.o
- $(INSTALL_DATA) $< $@
-
-$(REL): $(rtems_cpu_rel_OBJECTS)
- $(make-rel)
-
-PREINSTALL_FILES += $(PROJECT_INCLUDE) $(H_FILES:%=$(PROJECT_INCLUDE)/%)
-
-TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o
-
-all-local: $(ARCH) $(PREINSTALL_FILES) $(rtems_cpu_rel_OBJECTS) $(REL) $(TMPINSTALL_FILES)
-
-.PRECIOUS: $(REL)
-
-EXTRA_DIST = asm.h cpu.c cpu_asm.c rtems.c
-
-include $(top_srcdir)/../../../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/cpukit/score/cpu/no_cpu/asm.h b/cpukit/score/cpu/no_cpu/asm.h
deleted file mode 100644
index 1ca7fd435b..0000000000
--- a/cpukit/score/cpu/no_cpu/asm.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/* asm.h
- *
- * This include file attempts to address the problems
- * caused by incompatible flavors of assemblers and
- * toolsets. It primarily addresses variations in the
- * use of leading underscores on symbols and the requirement
- * that register names be preceded by a %.
- *
- *
- * NOTE: The spacing in the use of these macros
- * is critical to them working as advertised.
- *
- * COPYRIGHT:
- *
- * This file is based on similar code found in newlib available
- * from ftp.cygnus.com. The file which was used had no copyright
- * notice. This file is freely distributable as long as the source
- * of the file is noted. This file is:
- *
- * COPYRIGHT (c) 1994-1997.
- * On-Line Applications Research Corporation (OAR).
- *
- * $Id$
- */
-
-#ifndef __NO_CPU_ASM_h
-#define __NO_CPU_ASM_h
-
-/*
- * Indicate we are in an assembly file and get the basic CPU definitions.
- */
-
-#ifndef ASM
-#define ASM
-#endif
-#include <rtems/score/targopts.h>
-#include <rtems/score/no_cpu.h>
-
-/*
- * Recent versions of GNU cpp define variables which indicate the
- * need for underscores and percents. If not using GNU cpp or
- * the version does not support this, then you will obviously
- * have to define these as appropriate.
- */
-
-#ifndef __USER_LABEL_PREFIX__
-#define __USER_LABEL_PREFIX__ _
-#endif
-
-#ifndef __REGISTER_PREFIX__
-#define __REGISTER_PREFIX__
-#endif
-
-/* ANSI concatenation macros. */
-
-#define CONCAT1(a, b) CONCAT2(a, b)
-#define CONCAT2(a, b) a ## b
-
-/* Use the right prefix for global labels. */
-
-#define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
-
-/* Use the right prefix for registers. */
-
-#define REG(x) CONCAT1 (__REGISTER_PREFIX__, x)
-
-/*
- * define macros for all of the registers on this CPU
- *
- * EXAMPLE: #define d0 REG (d0)
- */
-
-/*
- * Define macros to handle section beginning and ends.
- */
-
-
-#define BEGIN_CODE_DCL .text
-#define END_CODE_DCL
-#define BEGIN_DATA_DCL .data
-#define END_DATA_DCL
-#define BEGIN_CODE .text
-#define END_CODE
-#define BEGIN_DATA
-#define END_DATA
-#define BEGIN_BSS
-#define END_BSS
-#define END
-
-/*
- * Following must be tailor for a particular flavor of the C compiler.
- * They may need to put underscores in front of the symbols.
- */
-
-#define PUBLIC(sym) .globl SYM (sym)
-#define EXTERN(sym) .globl SYM (sym)
-
-#endif
-/* end of include file */
-
-
diff --git a/cpukit/score/cpu/no_cpu/cpu.c b/cpukit/score/cpu/no_cpu/cpu.c
deleted file mode 100644
index 4711eb6703..0000000000
--- a/cpukit/score/cpu/no_cpu/cpu.c
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * XXX CPU Dependent Source
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/wkspace.h>
-
-/* _CPU_Initialize
- *
- * This routine performs processor dependent initialization.
- *
- * INPUT PARAMETERS:
- * cpu_table - CPU table to initialize
- * thread_dispatch - address of disptaching routine
- */
-
-
-void _CPU_Initialize(
- rtems_cpu_table *cpu_table,
- void (*thread_dispatch) /* ignored on this CPU */
-)
-{
- /*
- * The thread_dispatch argument is the address of the entry point
- * for the routine called at the end of an ISR once it has been
- * decided a context switch is necessary. On some compilation
- * systems it is difficult to call a high-level language routine
- * from assembly. This allows us to trick these systems.
- *
- * If you encounter this problem save the entry point in a CPU
- * dependent variable.
- */
-
- _CPU_Thread_dispatch_pointer = thread_dispatch;
-
- /*
- * If there is not an easy way to initialize the FP context
- * during Context_Initialize, then it is usually easier to
- * save an "uninitialized" FP context here and copy it to
- * the task's during Context_Initialize.
- */
-
- /* FP context initialization support goes here */
-
- _CPU_Table = *cpu_table;
-}
-
-/*PAGE
- *
- * _CPU_ISR_Get_level
- */
-
-unsigned32 _CPU_ISR_Get_level( void )
-{
- /*
- * This routine returns the current interrupt level.
- */
-
- return 0;
-}
-
-/*PAGE
- *
- * _CPU_ISR_install_raw_handler
- */
-
-void _CPU_ISR_install_raw_handler(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-)
-{
- /*
- * This is where we install the interrupt handler into the "raw" interrupt
- * table used by the CPU to dispatch interrupt handlers.
- */
-}
-
-/*PAGE
- *
- * _CPU_ISR_install_vector
- *
- * This kernel routine installs the RTEMS handler for the
- * specified vector.
- *
- * Input parameters:
- * vector - interrupt vector number
- * old_handler - former ISR for this vector number
- * new_handler - replacement ISR for this vector number
- *
- * Output parameters: NONE
- *
- */
-
-void _CPU_ISR_install_vector(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-)
-{
- *old_handler = _ISR_Vector_table[ vector ];
-
- /*
- * If the interrupt vector table is a table of pointer to isr entry
- * points, then we need to install the appropriate RTEMS interrupt
- * handler for this vector number.
- */
-
- _CPU_ISR_install_raw_handler( vector, new_handler, old_handler );
-
- /*
- * We put the actual user ISR address in '_ISR_vector_table'. This will
- * be used by the _ISR_Handler so the user gets control.
- */
-
- _ISR_Vector_table[ vector ] = new_handler;
-}
-
-/*PAGE
- *
- * _CPU_Install_interrupt_stack
- */
-
-void _CPU_Install_interrupt_stack( void )
-{
-}
-
-/*PAGE
- *
- * _CPU_Thread_Idle_body
- *
- * NOTES:
- *
- * 1. This is the same as the regular CPU independent algorithm.
- *
- * 2. If you implement this using a "halt", "idle", or "shutdown"
- * instruction, then don't forget to put it in an infinite loop.
- *
- * 3. Be warned. Some processors with onboard DMA have been known
- * to stop the DMA if the CPU were put in IDLE mode. This might
- * also be a problem with other on-chip peripherals. So use this
- * hook with caution.
- */
-
-void _CPU_Thread_Idle_body( void )
-{
-
- for( ; ; )
- /* insert your "halt" instruction here */ ;
-}
diff --git a/cpukit/score/cpu/no_cpu/cpu_asm.c b/cpukit/score/cpu/no_cpu/cpu_asm.c
deleted file mode 100644
index 5a5728a2f8..0000000000
--- a/cpukit/score/cpu/no_cpu/cpu_asm.c
+++ /dev/null
@@ -1,164 +0,0 @@
-/* cpu_asm.c ===> cpu_asm.S or cpu_asm.s
- *
- * This file contains the basic algorithms for all assembly code used
- * in an specific CPU port of RTEMS. These algorithms must be implemented
- * in assembly language
- *
- * NOTE: This is supposed to be a .S or .s file NOT a C file.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-/*
- * This is supposed to be an assembly file. This means that system.h
- * and cpu.h should not be included in a "real" cpu_asm file. An
- * implementation in assembly should include "cpu_asm.h>
- */
-
-#include <rtems/system.h>
-#include <rtems/score/cpu.h>
-/* #include "cpu_asm.h> */
-
-/*
- * _CPU_Context_save_fp_context
- *
- * This routine is responsible for saving the FP context
- * at *fp_context_ptr. If the point to load the FP context
- * from is changed then the pointer is modified by this routine.
- *
- * Sometimes a macro implementation of this is in cpu.h which dereferences
- * the ** and a similarly named routine in this file is passed something
- * like a (Context_Control_fp *). The general rule on making this decision
- * is to avoid writing assembly language.
- */
-
-void _CPU_Context_save_fp(
- void **fp_context_ptr
-)
-{
-}
-
-/*
- * _CPU_Context_restore_fp_context
- *
- * This routine is responsible for restoring the FP context
- * at *fp_context_ptr. If the point to load the FP context
- * from is changed then the pointer is modified by this routine.
- *
- * Sometimes a macro implementation of this is in cpu.h which dereferences
- * the ** and a similarly named routine in this file is passed something
- * like a (Context_Control_fp *). The general rule on making this decision
- * is to avoid writing assembly language.
- */
-
-void _CPU_Context_restore_fp(
- void **fp_context_ptr
-)
-{
-}
-
-/* _CPU_Context_switch
- *
- * This routine performs a normal non-FP context switch.
- */
-
-void _CPU_Context_switch(
- Context_Control *run,
- Context_Control *heir
-)
-{
-}
-
-/*
- * _CPU_Context_restore
- *
- * This routine is generally used only to restart self in an
- * efficient manner. It may simply be a label in _CPU_Context_switch.
- *
- * NOTE: May be unnecessary to reload some registers.
- */
-
-void _CPU_Context_restore(
- Context_Control *new_context
-)
-{
-}
-
-/* void __ISR_Handler()
- *
- * This routine provides the RTEMS interrupt management.
- *
- */
-
-void _ISR_Handler()
-{
- /*
- * This discussion ignores a lot of the ugly details in a real
- * implementation such as saving enough registers/state to be
- * able to do something real. Keep in mind that the goal is
- * to invoke a user's ISR handler which is written in C and
- * uses a certain set of registers.
- *
- * Also note that the exact order is to a large extent flexible.
- * Hardware will dictate a sequence for a certain subset of
- * _ISR_Handler while requirements for setting
- */
-
- /*
- * At entry to "common" _ISR_Handler, the vector number must be
- * available. On some CPUs the hardware puts either the vector
- * number or the offset into the vector table for this ISR in a
- * known place. If the hardware does not give us this information,
- * then the assembly portion of RTEMS for this port will contain
- * a set of distinct interrupt entry points which somehow place
- * the vector number in a known place (which is safe if another
- * interrupt nests this one) and branches to _ISR_Handler.
- *
- * save some or all context on stack
- * may need to save some special interrupt information for exit
- *
- * #if ( CPU_HAS_SOFTWARE_INTERRUPT_STACK == TRUE )
- * if ( _ISR_Nest_level == 0 )
- * switch to software interrupt stack
- * #endif
- *
- * _ISR_Nest_level++;
- *
- * _Thread_Dispatch_disable_level++;
- *
- * (*_ISR_Vector_table[ vector ])( vector );
- *
- * --_ISR_Nest_level;
- *
- * if ( _ISR_Nest_level )
- * goto the label "exit interrupt (simple case)"
- *
- * #if ( CPU_HAS_SOFTWARE_INTERRUPT_STACK == TRUE )
- * restore stack
- * #endif
- *
- * if ( !_Context_Switch_necessary )
- * goto the label "exit interrupt (simple case)"
- *
- * if ( !_ISR_Signals_to_thread_executing )
- * _ISR_Signals_to_thread_executing = FALSE;
- * goto the label "exit interrupt (simple case)"
- *
- * call _Thread_Dispatch() or prepare to return to _ISR_Dispatch
- *
- * prepare to get out of interrupt
- * return from interrupt (maybe to _ISR_Dispatch)
- *
- * LABEL "exit interrupt (simple case):
- * prepare to get out of interrupt
- * return from interrupt
- */
-}
-
diff --git a/cpukit/score/cpu/no_cpu/rtems/asm.h b/cpukit/score/cpu/no_cpu/rtems/asm.h
deleted file mode 100644
index 1ca7fd435b..0000000000
--- a/cpukit/score/cpu/no_cpu/rtems/asm.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/* asm.h
- *
- * This include file attempts to address the problems
- * caused by incompatible flavors of assemblers and
- * toolsets. It primarily addresses variations in the
- * use of leading underscores on symbols and the requirement
- * that register names be preceded by a %.
- *
- *
- * NOTE: The spacing in the use of these macros
- * is critical to them working as advertised.
- *
- * COPYRIGHT:
- *
- * This file is based on similar code found in newlib available
- * from ftp.cygnus.com. The file which was used had no copyright
- * notice. This file is freely distributable as long as the source
- * of the file is noted. This file is:
- *
- * COPYRIGHT (c) 1994-1997.
- * On-Line Applications Research Corporation (OAR).
- *
- * $Id$
- */
-
-#ifndef __NO_CPU_ASM_h
-#define __NO_CPU_ASM_h
-
-/*
- * Indicate we are in an assembly file and get the basic CPU definitions.
- */
-
-#ifndef ASM
-#define ASM
-#endif
-#include <rtems/score/targopts.h>
-#include <rtems/score/no_cpu.h>
-
-/*
- * Recent versions of GNU cpp define variables which indicate the
- * need for underscores and percents. If not using GNU cpp or
- * the version does not support this, then you will obviously
- * have to define these as appropriate.
- */
-
-#ifndef __USER_LABEL_PREFIX__
-#define __USER_LABEL_PREFIX__ _
-#endif
-
-#ifndef __REGISTER_PREFIX__
-#define __REGISTER_PREFIX__
-#endif
-
-/* ANSI concatenation macros. */
-
-#define CONCAT1(a, b) CONCAT2(a, b)
-#define CONCAT2(a, b) a ## b
-
-/* Use the right prefix for global labels. */
-
-#define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
-
-/* Use the right prefix for registers. */
-
-#define REG(x) CONCAT1 (__REGISTER_PREFIX__, x)
-
-/*
- * define macros for all of the registers on this CPU
- *
- * EXAMPLE: #define d0 REG (d0)
- */
-
-/*
- * Define macros to handle section beginning and ends.
- */
-
-
-#define BEGIN_CODE_DCL .text
-#define END_CODE_DCL
-#define BEGIN_DATA_DCL .data
-#define END_DATA_DCL
-#define BEGIN_CODE .text
-#define END_CODE
-#define BEGIN_DATA
-#define END_DATA
-#define BEGIN_BSS
-#define END_BSS
-#define END
-
-/*
- * Following must be tailor for a particular flavor of the C compiler.
- * They may need to put underscores in front of the symbols.
- */
-
-#define PUBLIC(sym) .globl SYM (sym)
-#define EXTERN(sym) .globl SYM (sym)
-
-#endif
-/* end of include file */
-
-
diff --git a/cpukit/score/cpu/no_cpu/rtems/score/cpu.h b/cpukit/score/cpu/no_cpu/rtems/score/cpu.h
deleted file mode 100644
index da99e163cc..0000000000
--- a/cpukit/score/cpu/no_cpu/rtems/score/cpu.h
+++ /dev/null
@@ -1,887 +0,0 @@
-/* cpu.h
- *
- * This include file contains information pertaining to the XXX
- * processor.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __CPU_h
-#define __CPU_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/no_cpu.h> /* pick up machine definitions */
-#ifndef ASM
-#include <rtems/score/no_cputypes.h>
-#endif
-
-/* conditional compilation parameters */
-
-/*
- * Should the calls to _Thread_Enable_dispatch be inlined?
- *
- * If TRUE, then they are inlined.
- * If FALSE, then a subroutine call is made.
- *
- * Basically this is an example of the classic trade-off of size
- * versus speed. Inlining the call (TRUE) typically increases the
- * size of RTEMS while speeding up the enabling of dispatching.
- * [NOTE: In general, the _Thread_Dispatch_disable_level will
- * only be 0 or 1 unless you are in an interrupt handler and that
- * interrupt handler invokes the executive.] When not inlined
- * something calls _Thread_Enable_dispatch which in turns calls
- * _Thread_Dispatch. If the enable dispatch is inlined, then
- * one subroutine call is avoided entirely.]
- */
-
-#define CPU_INLINE_ENABLE_DISPATCH FALSE
-
-/*
- * Should the body of the search loops in _Thread_queue_Enqueue_priority
- * be unrolled one time? In unrolled each iteration of the loop examines
- * two "nodes" on the chain being searched. Otherwise, only one node
- * is examined per iteration.
- *
- * If TRUE, then the loops are unrolled.
- * If FALSE, then the loops are not unrolled.
- *
- * The primary factor in making this decision is the cost of disabling
- * and enabling interrupts (_ISR_Flash) versus the cost of rest of the
- * body of the loop. On some CPUs, the flash is more expensive than
- * one iteration of the loop body. In this case, it might be desirable
- * to unroll the loop. It is important to note that on some CPUs, this
- * code is the longest interrupt disable period in RTEMS. So it is
- * necessary to strike a balance when setting this parameter.
- */
-
-#define CPU_UNROLL_ENQUEUE_PRIORITY TRUE
-
-/*
- * Does RTEMS manage a dedicated interrupt stack in software?
- *
- * If TRUE, then a stack is allocated in _Interrupt_Manager_initialization.
- * If FALSE, nothing is done.
- *
- * If the CPU supports a dedicated interrupt stack in hardware,
- * then it is generally the responsibility of the BSP to allocate it
- * and set it up.
- *
- * If the CPU does not support a dedicated interrupt stack, then
- * the porter has two options: (1) execute interrupts on the
- * stack of the interrupted task, and (2) have RTEMS manage a dedicated
- * interrupt stack.
- *
- * If this is TRUE, CPU_ALLOCATE_INTERRUPT_STACK should also be TRUE.
- *
- * Only one of CPU_HAS_SOFTWARE_INTERRUPT_STACK and
- * CPU_HAS_HARDWARE_INTERRUPT_STACK should be set to TRUE. It is
- * possible that both are FALSE for a particular CPU. Although it
- * is unclear what that would imply about the interrupt processing
- * procedure on that CPU.
- */
-
-#define CPU_HAS_SOFTWARE_INTERRUPT_STACK FALSE
-
-/*
- * Does this CPU have hardware support for a dedicated interrupt stack?
- *
- * If TRUE, then it must be installed during initialization.
- * If FALSE, then no installation is performed.
- *
- * If this is TRUE, CPU_ALLOCATE_INTERRUPT_STACK should also be TRUE.
- *
- * Only one of CPU_HAS_SOFTWARE_INTERRUPT_STACK and
- * CPU_HAS_HARDWARE_INTERRUPT_STACK should be set to TRUE. It is
- * possible that both are FALSE for a particular CPU. Although it
- * is unclear what that would imply about the interrupt processing
- * procedure on that CPU.
- */
-
-#define CPU_HAS_HARDWARE_INTERRUPT_STACK TRUE
-
-/*
- * Does RTEMS allocate a dedicated interrupt stack in the Interrupt Manager?
- *
- * If TRUE, then the memory is allocated during initialization.
- * If FALSE, then the memory is allocated during initialization.
- *
- * This should be TRUE is CPU_HAS_SOFTWARE_INTERRUPT_STACK is TRUE
- * or CPU_INSTALL_HARDWARE_INTERRUPT_STACK is TRUE.
- */
-
-#define CPU_ALLOCATE_INTERRUPT_STACK TRUE
-
-/*
- * Does the RTEMS invoke the user's ISR with the vector number and
- * a pointer to the saved interrupt frame (1) or just the vector
- * number (0)?
- */
-
-#define CPU_ISR_PASSES_FRAME_POINTER 0
-
-/*
- * Does the CPU have hardware floating point?
- *
- * If TRUE, then the RTEMS_FLOATING_POINT task attribute is supported.
- * If FALSE, then the RTEMS_FLOATING_POINT task attribute is ignored.
- *
- * If there is a FP coprocessor such as the i387 or mc68881, then
- * the answer is TRUE.
- *
- * The macro name "NO_CPU_HAS_FPU" should be made CPU specific.
- * It indicates whether or not this CPU model has FP support. For
- * example, it would be possible to have an i386_nofp CPU model
- * which set this to false to indicate that you have an i386 without
- * an i387 and wish to leave floating point support out of RTEMS.
- */
-
-#if ( NO_CPU_HAS_FPU == 1 )
-#define CPU_HARDWARE_FP TRUE
-#else
-#define CPU_HARDWARE_FP FALSE
-#endif
-
-/*
- * Are all tasks RTEMS_FLOATING_POINT tasks implicitly?
- *
- * If TRUE, then the RTEMS_FLOATING_POINT task attribute is assumed.
- * If FALSE, then the RTEMS_FLOATING_POINT task attribute is followed.
- *
- * So far, the only CPU in which this option has been used is the
- * HP PA-RISC. The HP C compiler and gcc both implicitly use the
- * floating point registers to perform integer multiplies. If
- * a function which you would not think utilize the FP unit DOES,
- * then one can not easily predict which tasks will use the FP hardware.
- * In this case, this option should be TRUE.
- *
- * If CPU_HARDWARE_FP is FALSE, then this should be FALSE as well.
- */
-
-#define CPU_ALL_TASKS_ARE_FP TRUE
-
-/*
- * Should the IDLE task have a floating point context?
- *
- * If TRUE, then the IDLE task is created as a RTEMS_FLOATING_POINT task
- * and it has a floating point context which is switched in and out.
- * If FALSE, then the IDLE task does not have a floating point context.
- *
- * Setting this to TRUE negatively impacts the time required to preempt
- * the IDLE task from an interrupt because the floating point context
- * must be saved as part of the preemption.
- */
-
-#define CPU_IDLE_TASK_IS_FP FALSE
-
-/*
- * Should the saving of the floating point registers be deferred
- * until a context switch is made to another different floating point
- * task?
- *
- * If TRUE, then the floating point context will not be stored until
- * necessary. It will remain in the floating point registers and not
- * disturned until another floating point task is switched to.
- *
- * If FALSE, then the floating point context is saved when a floating
- * point task is switched out and restored when the next floating point
- * task is restored. The state of the floating point registers between
- * those two operations is not specified.
- *
- * If the floating point context does NOT have to be saved as part of
- * interrupt dispatching, then it should be safe to set this to TRUE.
- *
- * Setting this flag to TRUE results in using a different algorithm
- * for deciding when to save and restore the floating point context.
- * The deferred FP switch algorithm minimizes the number of times
- * the FP context is saved and restored. The FP context is not saved
- * until a context switch is made to another, different FP task.
- * Thus in a system with only one FP task, the FP context will never
- * be saved or restored.
- */
-
-#define CPU_USE_DEFERRED_FP_SWITCH TRUE
-
-/*
- * Does this port provide a CPU dependent IDLE task implementation?
- *
- * If TRUE, then the routine _CPU_Thread_Idle_body
- * must be provided and is the default IDLE thread body instead of
- * _CPU_Thread_Idle_body.
- *
- * If FALSE, then use the generic IDLE thread body if the BSP does
- * not provide one.
- *
- * This is intended to allow for supporting processors which have
- * a low power or idle mode. When the IDLE thread is executed, then
- * the CPU can be powered down.
- *
- * The order of precedence for selecting the IDLE thread body is:
- *
- * 1. BSP provided
- * 2. CPU dependent (if provided)
- * 3. generic (if no BSP and no CPU dependent)
- */
-
-#define CPU_PROVIDES_IDLE_THREAD_BODY TRUE
-
-/*
- * Does the stack grow up (toward higher addresses) or down
- * (toward lower addresses)?
- *
- * If TRUE, then the grows upward.
- * If FALSE, then the grows toward smaller addresses.
- */
-
-#define CPU_STACK_GROWS_UP TRUE
-
-/*
- * The following is the variable attribute used to force alignment
- * of critical RTEMS structures. On some processors it may make
- * sense to have these aligned on tighter boundaries than
- * the minimum requirements of the compiler in order to have as
- * much of the critical data area as possible in a cache line.
- *
- * The placement of this macro in the declaration of the variables
- * is based on the syntactically requirements of the GNU C
- * "__attribute__" extension. For example with GNU C, use
- * the following to force a structures to a 32 byte boundary.
- *
- * __attribute__ ((aligned (32)))
- *
- * NOTE: Currently only the Priority Bit Map table uses this feature.
- * To benefit from using this, the data must be heavily
- * used so it will stay in the cache and used frequently enough
- * in the executive to justify turning this on.
- */
-
-#define CPU_STRUCTURE_ALIGNMENT
-
-/*
- * Define what is required to specify how the network to host conversion
- * routines are handled.
- */
-
-#define CPU_HAS_OWN_HOST_TO_NETWORK_ROUTINES FALSE
-#define CPU_BIG_ENDIAN TRUE
-#define CPU_LITTLE_ENDIAN FALSE
-
-/*
- * The following defines the number of bits actually used in the
- * interrupt field of the task mode. How those bits map to the
- * CPU interrupt levels is defined by the routine _CPU_ISR_Set_level().
- */
-
-#define CPU_MODES_INTERRUPT_MASK 0x00000001
-
-/*
- * Processor defined structures
- *
- * Examples structures include the descriptor tables from the i386
- * and the processor control structure on the i960ca.
- */
-
-/* may need to put some structures here. */
-
-/*
- * Contexts
- *
- * Generally there are 2 types of context to save.
- * 1. Interrupt registers to save
- * 2. Task level registers to save
- *
- * This means we have the following 3 context items:
- * 1. task level context stuff:: Context_Control
- * 2. floating point task stuff:: Context_Control_fp
- * 3. special interrupt level context :: Context_Control_interrupt
- *
- * On some processors, it is cost-effective to save only the callee
- * preserved registers during a task context switch. This means
- * that the ISR code needs to save those registers which do not
- * persist across function calls. It is not mandatory to make this
- * distinctions between the caller/callee saves registers for the
- * purpose of minimizing context saved during task switch and on interrupts.
- * If the cost of saving extra registers is minimal, simplicity is the
- * choice. Save the same context on interrupt entry as for tasks in
- * this case.
- *
- * Additionally, if gdb is to be made aware of RTEMS tasks for this CPU, then
- * care should be used in designing the context area.
- *
- * On some CPUs with hardware floating point support, the Context_Control_fp
- * structure will not be used or it simply consist of an array of a
- * fixed number of bytes. This is done when the floating point context
- * is dumped by a "FP save context" type instruction and the format
- * is not really defined by the CPU. In this case, there is no need
- * to figure out the exact format -- only the size. Of course, although
- * this is enough information for RTEMS, it is probably not enough for
- * a debugger such as gdb. But that is another problem.
- */
-
-typedef struct {
- unsigned32 some_integer_register;
- unsigned32 some_system_register;
-} Context_Control;
-
-typedef struct {
- double some_float_register;
-} Context_Control_fp;
-
-typedef struct {
- unsigned32 special_interrupt_register;
-} CPU_Interrupt_frame;
-
-
-/*
- * The following table contains the information required to configure
- * the XXX processor specific parameters.
- */
-
-typedef struct {
- void (*pretasking_hook)( void );
- void (*predriver_hook)( void );
- void (*postdriver_hook)( void );
- void (*idle_task)( void );
- boolean do_zero_of_workspace;
- unsigned32 idle_task_stack_size;
- unsigned32 interrupt_stack_size;
- unsigned32 extra_mpci_receive_server_stack;
- void * (*stack_allocate_hook)( unsigned32 );
- void (*stack_free_hook)( void* );
- /* end of fields required on all CPUs */
-
-} rtems_cpu_table;
-
-/*
- * Macros to access required entires in the CPU Table are in
- * the file rtems/system.h.
- */
-
-/*
- * Macros to access NO_CPU specific additions to the CPU Table
- */
-
-/* There are no CPU specific additions to the CPU Table for this port. */
-
-/*
- * This variable is optional. It is used on CPUs on which it is difficult
- * to generate an "uninitialized" FP context. It is filled in by
- * _CPU_Initialize and copied into the task's FP context area during
- * _CPU_Context_Initialize.
- */
-
-SCORE_EXTERN Context_Control_fp _CPU_Null_fp_context;
-
-/*
- * On some CPUs, RTEMS supports a software managed interrupt stack.
- * This stack is allocated by the Interrupt Manager and the switch
- * is performed in _ISR_Handler. These variables contain pointers
- * to the lowest and highest addresses in the chunk of memory allocated
- * for the interrupt stack. Since it is unknown whether the stack
- * grows up or down (in general), this give the CPU dependent
- * code the option of picking the version it wants to use.
- *
- * NOTE: These two variables are required if the macro
- * CPU_HAS_SOFTWARE_INTERRUPT_STACK is defined as TRUE.
- */
-
-SCORE_EXTERN void *_CPU_Interrupt_stack_low;
-SCORE_EXTERN void *_CPU_Interrupt_stack_high;
-
-/*
- * With some compilation systems, it is difficult if not impossible to
- * call a high-level language routine from assembly language. This
- * is especially true of commercial Ada compilers and name mangling
- * C++ ones. This variable can be optionally defined by the CPU porter
- * and contains the address of the routine _Thread_Dispatch. This
- * can make it easier to invoke that routine at the end of the interrupt
- * sequence (if a dispatch is necessary).
- */
-
-SCORE_EXTERN void (*_CPU_Thread_dispatch_pointer)();
-
-/*
- * Nothing prevents the porter from declaring more CPU specific variables.
- */
-
-/* XXX: if needed, put more variables here */
-
-/*
- * The size of the floating point context area. On some CPUs this
- * will not be a "sizeof" because the format of the floating point
- * area is not defined -- only the size is. This is usually on
- * CPUs with a "floating point save context" instruction.
- */
-
-#define CPU_CONTEXT_FP_SIZE sizeof( Context_Control_fp )
-
-/*
- * Amount of extra stack (above minimum stack size) required by
- * MPCI receive server thread. Remember that in a multiprocessor
- * system this thread must exist and be able to process all directives.
- */
-
-#define CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK 0
-
-/*
- * This defines the number of entries in the ISR_Vector_table managed
- * by RTEMS.
- */
-
-#define CPU_INTERRUPT_NUMBER_OF_VECTORS 32
-#define CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER (CPU_INTERRUPT_NUMBER_OF_VECTORS - 1)
-
-/*
- * Should be large enough to run all RTEMS tests. This insures
- * that a "reasonable" small application should not have any problems.
- */
-
-#define CPU_STACK_MINIMUM_SIZE (1024*4)
-
-/*
- * CPU's worst alignment requirement for data types on a byte boundary. This
- * alignment does not take into account the requirements for the stack.
- */
-
-#define CPU_ALIGNMENT 8
-
-/*
- * This number corresponds to the byte alignment requirement for the
- * heap handler. This alignment requirement may be stricter than that
- * for the data types alignment specified by CPU_ALIGNMENT. It is
- * common for the heap to follow the same alignment requirement as
- * CPU_ALIGNMENT. If the CPU_ALIGNMENT is strict enough for the heap,
- * then this should be set to CPU_ALIGNMENT.
- *
- * NOTE: This does not have to be a power of 2. It does have to
- * be greater or equal to than CPU_ALIGNMENT.
- */
-
-#define CPU_HEAP_ALIGNMENT CPU_ALIGNMENT
-
-/*
- * This number corresponds to the byte alignment requirement for memory
- * buffers allocated by the partition manager. This alignment requirement
- * may be stricter than that for the data types alignment specified by
- * CPU_ALIGNMENT. It is common for the partition to follow the same
- * alignment requirement as CPU_ALIGNMENT. If the CPU_ALIGNMENT is strict
- * enough for the partition, then this should be set to CPU_ALIGNMENT.
- *
- * NOTE: This does not have to be a power of 2. It does have to
- * be greater or equal to than CPU_ALIGNMENT.
- */
-
-#define CPU_PARTITION_ALIGNMENT CPU_ALIGNMENT
-
-/*
- * This number corresponds to the byte alignment requirement for the
- * stack. This alignment requirement may be stricter than that for the
- * data types alignment specified by CPU_ALIGNMENT. If the CPU_ALIGNMENT
- * is strict enough for the stack, then this should be set to 0.
- *
- * NOTE: This must be a power of 2 either 0 or greater than CPU_ALIGNMENT.
- */
-
-#define CPU_STACK_ALIGNMENT 0
-
-/* ISR handler macros */
-
-/*
- * Disable all interrupts for an RTEMS critical section. The previous
- * level is returned in _level.
- */
-
-#define _CPU_ISR_Disable( _isr_cookie ) \
- { \
- (_isr_cookie) = 0; /* do something to prevent warnings */ \
- }
-
-/*
- * Enable interrupts to the previous level (returned by _CPU_ISR_Disable).
- * This indicates the end of an RTEMS critical section. The parameter
- * _level is not modified.
- */
-
-#define _CPU_ISR_Enable( _isr_cookie ) \
- { \
- }
-
-/*
- * This temporarily restores the interrupt to _level before immediately
- * disabling them again. This is used to divide long RTEMS critical
- * sections into two or more parts. The parameter _level is not
- * modified.
- */
-
-#define _CPU_ISR_Flash( _isr_cookie ) \
- { \
- }
-
-/*
- * Map interrupt level in task mode onto the hardware that the CPU
- * actually provides. Currently, interrupt levels which do not
- * map onto the CPU in a generic fashion are undefined. Someday,
- * it would be nice if these were "mapped" by the application
- * via a callout. For example, m68k has 8 levels 0 - 7, levels
- * 8 - 255 would be available for bsp/application specific meaning.
- * This could be used to manage a programmable interrupt controller
- * via the rtems_task_mode directive.
- *
- * The get routine usually must be implemented as a subroutine.
- */
-
-#define _CPU_ISR_Set_level( new_level ) \
- { \
- }
-
-unsigned32 _CPU_ISR_Get_level( void );
-
-/* end of ISR handler macros */
-
-/* Context handler macros */
-
-/*
- * Initialize the context to a state suitable for starting a
- * task after a context restore operation. Generally, this
- * involves:
- *
- * - setting a starting address
- * - preparing the stack
- * - preparing the stack and frame pointers
- * - setting the proper interrupt level in the context
- * - initializing the floating point context
- *
- * This routine generally does not set any unnecessary register
- * in the context. The state of the "general data" registers is
- * undefined at task start time.
- *
- * NOTE: This is_fp parameter is TRUE if the thread is to be a floating
- * point thread. This is typically only used on CPUs where the
- * FPU may be easily disabled by software such as on the SPARC
- * where the PSR contains an enable FPU bit.
- */
-
-#define _CPU_Context_Initialize( _the_context, _stack_base, _size, \
- _isr, _entry_point, _is_fp ) \
- { \
- }
-
-/*
- * This routine is responsible for somehow restarting the currently
- * executing task. If you are lucky, then all that is necessary
- * is restoring the context. Otherwise, there will need to be
- * a special assembly routine which does something special in this
- * case. Context_Restore should work most of the time. It will
- * not work if restarting self conflicts with the stack frame
- * assumptions of restoring a context.
- */
-
-#define _CPU_Context_Restart_self( _the_context ) \
- _CPU_Context_restore( (_the_context) );
-
-/*
- * The purpose of this macro is to allow the initial pointer into
- * a floating point context area (used to save the floating point
- * context) to be at an arbitrary place in the floating point
- * context area.
- *
- * This is necessary because some FP units are designed to have
- * their context saved as a stack which grows into lower addresses.
- * Other FP units can be saved by simply moving registers into offsets
- * from the base of the context area. Finally some FP units provide
- * a "dump context" instruction which could fill in from high to low
- * or low to high based on the whim of the CPU designers.
- */
-
-#define _CPU_Context_Fp_start( _base, _offset ) \
- ( (void *) _Addresses_Add_offset( (_base), (_offset) ) )
-
-/*
- * This routine initializes the FP context area passed to it to.
- * There are a few standard ways in which to initialize the
- * floating point context. The code included for this macro assumes
- * that this is a CPU in which a "initial" FP context was saved into
- * _CPU_Null_fp_context and it simply copies it to the destination
- * context passed to it.
- *
- * Other models include (1) not doing anything, and (2) putting
- * a "null FP status word" in the correct place in the FP context.
- */
-
-#define _CPU_Context_Initialize_fp( _destination ) \
- { \
- *((Context_Control_fp *) *((void **) _destination)) = _CPU_Null_fp_context; \
- }
-
-/* end of Context handler macros */
-
-/* Fatal Error manager macros */
-
-/*
- * This routine copies _error into a known place -- typically a stack
- * location or a register, optionally disables interrupts, and
- * halts/stops the CPU.
- */
-
-#define _CPU_Fatal_halt( _error ) \
- { \
- }
-
-/* end of Fatal Error manager macros */
-
-/* Bitfield handler macros */
-
-/*
- * This routine sets _output to the bit number of the first bit
- * set in _value. _value is of CPU dependent type Priority_Bit_map_control.
- * This type may be either 16 or 32 bits wide although only the 16
- * least significant bits will be used.
- *
- * There are a number of variables in using a "find first bit" type
- * instruction.
- *
- * (1) What happens when run on a value of zero?
- * (2) Bits may be numbered from MSB to LSB or vice-versa.
- * (3) The numbering may be zero or one based.
- * (4) The "find first bit" instruction may search from MSB or LSB.
- *
- * RTEMS guarantees that (1) will never happen so it is not a concern.
- * (2),(3), (4) are handled by the macros _CPU_Priority_mask() and
- * _CPU_Priority_bits_index(). These three form a set of routines
- * which must logically operate together. Bits in the _value are
- * set and cleared based on masks built by _CPU_Priority_mask().
- * The basic major and minor values calculated by _Priority_Major()
- * and _Priority_Minor() are "massaged" by _CPU_Priority_bits_index()
- * to properly range between the values returned by the "find first bit"
- * instruction. This makes it possible for _Priority_Get_highest() to
- * calculate the major and directly index into the minor table.
- * This mapping is necessary to ensure that 0 (a high priority major/minor)
- * is the first bit found.
- *
- * This entire "find first bit" and mapping process depends heavily
- * on the manner in which a priority is broken into a major and minor
- * components with the major being the 4 MSB of a priority and minor
- * the 4 LSB. Thus (0 << 4) + 0 corresponds to priority 0 -- the highest
- * priority. And (15 << 4) + 14 corresponds to priority 254 -- the next
- * to the lowest priority.
- *
- * If your CPU does not have a "find first bit" instruction, then
- * there are ways to make do without it. Here are a handful of ways
- * to implement this in software:
- *
- * - a series of 16 bit test instructions
- * - a "binary search using if's"
- * - _number = 0
- * if _value > 0x00ff
- * _value >>=8
- * _number = 8;
- *
- * if _value > 0x0000f
- * _value >=8
- * _number += 4
- *
- * _number += bit_set_table[ _value ]
- *
- * where bit_set_table[ 16 ] has values which indicate the first
- * bit set
- */
-
-#define CPU_USE_GENERIC_BITFIELD_CODE TRUE
-#define CPU_USE_GENERIC_BITFIELD_DATA TRUE
-
-#if (CPU_USE_GENERIC_BITFIELD_CODE == FALSE)
-
-#define _CPU_Bitfield_Find_first_bit( _value, _output ) \
- { \
- (_output) = 0; /* do something to prevent warnings */ \
- }
-
-#endif
-
-/* end of Bitfield handler macros */
-
-/*
- * This routine builds the mask which corresponds to the bit fields
- * as searched by _CPU_Bitfield_Find_first_bit(). See the discussion
- * for that routine.
- */
-
-#if (CPU_USE_GENERIC_BITFIELD_CODE == FALSE)
-
-#define _CPU_Priority_Mask( _bit_number ) \
- ( 1 << (_bit_number) )
-
-#endif
-
-/*
- * This routine translates the bit numbers returned by
- * _CPU_Bitfield_Find_first_bit() into something suitable for use as
- * a major or minor component of a priority. See the discussion
- * for that routine.
- */
-
-#if (CPU_USE_GENERIC_BITFIELD_CODE == FALSE)
-
-#define _CPU_Priority_bits_index( _priority ) \
- (_priority)
-
-#endif
-
-/* end of Priority handler macros */
-
-/* functions */
-
-/*
- * _CPU_Initialize
- *
- * This routine performs CPU dependent initialization.
- */
-
-void _CPU_Initialize(
- rtems_cpu_table *cpu_table,
- void (*thread_dispatch)
-);
-
-/*
- * _CPU_ISR_install_raw_handler
- *
- * This routine installs a "raw" interrupt handler directly into the
- * processor's vector table.
- */
-
-void _CPU_ISR_install_raw_handler(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-);
-
-/*
- * _CPU_ISR_install_vector
- *
- * This routine installs an interrupt vector.
- */
-
-void _CPU_ISR_install_vector(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-);
-
-/*
- * _CPU_Install_interrupt_stack
- *
- * This routine installs the hardware interrupt stack pointer.
- *
- * NOTE: It need only be provided if CPU_HAS_HARDWARE_INTERRUPT_STACK
- * is TRUE.
- */
-
-void _CPU_Install_interrupt_stack( void );
-
-/*
- * _CPU_Thread_Idle_body
- *
- * This routine is the CPU dependent IDLE thread body.
- *
- * NOTE: It need only be provided if CPU_PROVIDES_IDLE_THREAD_BODY
- * is TRUE.
- */
-
-void _CPU_Thread_Idle_body( void );
-
-/*
- * _CPU_Context_switch
- *
- * This routine switches from the run context to the heir context.
- */
-
-void _CPU_Context_switch(
- Context_Control *run,
- Context_Control *heir
-);
-
-/*
- * _CPU_Context_restore
- *
- * This routine is generally used only to restart self in an
- * efficient manner. It may simply be a label in _CPU_Context_switch.
- *
- * NOTE: May be unnecessary to reload some registers.
- */
-
-void _CPU_Context_restore(
- Context_Control *new_context
-);
-
-/*
- * _CPU_Context_save_fp
- *
- * This routine saves the floating point context passed to it.
- */
-
-void _CPU_Context_save_fp(
- void **fp_context_ptr
-);
-
-/*
- * _CPU_Context_restore_fp
- *
- * This routine restores the floating point context passed to it.
- */
-
-void _CPU_Context_restore_fp(
- void **fp_context_ptr
-);
-
-/* The following routine swaps the endian format of an unsigned int.
- * It must be static because it is referenced indirectly.
- *
- * This version will work on any processor, but if there is a better
- * way for your CPU PLEASE use it. The most common way to do this is to:
- *
- * swap least significant two bytes with 16-bit rotate
- * swap upper and lower 16-bits
- * swap most significant two bytes with 16-bit rotate
- *
- * Some CPUs have special instructions which swap a 32-bit quantity in
- * a single instruction (e.g. i486). It is probably best to avoid
- * an "endian swapping control bit" in the CPU. One good reason is
- * that interrupts would probably have to be disabled to insure that
- * an interrupt does not try to access the same "chunk" with the wrong
- * endian. Another good reason is that on some CPUs, the endian bit
- * endianness for ALL fetches -- both code and data -- so the code
- * will be fetched incorrectly.
- */
-
-static inline unsigned int CPU_swap_u32(
- unsigned int value
-)
-{
- unsigned32 byte1, byte2, byte3, byte4, swapped;
-
- byte4 = (value >> 24) & 0xff;
- byte3 = (value >> 16) & 0xff;
- byte2 = (value >> 8) & 0xff;
- byte1 = value & 0xff;
-
- swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
- return( swapped );
-}
-
-#define CPU_swap_u16( value ) \
- (((value&0xff) << 8) | ((value >> 8)&0xff))
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/cpukit/score/cpu/no_cpu/rtems/score/cpu_asm.h b/cpukit/score/cpu/no_cpu/rtems/score/cpu_asm.h
deleted file mode 100644
index b5f3673d61..0000000000
--- a/cpukit/score/cpu/no_cpu/rtems/score/cpu_asm.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * cpu_asm.h
- *
- * Very loose template for an include file for the cpu_asm.? file
- * if it is implemented as a ".S" file (preprocessed by cpp) instead
- * of a ".s" file (preprocessed by gm4 or gasp).
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- *
- */
-
-#ifndef __CPU_ASM_h
-#define __CPU_ASM_h
-
-/* pull in the generated offsets */
-
-#include <rtems/score/offsets.h>
-
-/*
- * Hardware General Registers
- */
-
-/* put something here */
-
-/*
- * Hardware Floating Point Registers
- */
-
-/* put something here */
-
-/*
- * Hardware Control Registers
- */
-
-/* put something here */
-
-/*
- * Calling Convention
- */
-
-/* put something here */
-
-/*
- * Temporary registers
- */
-
-/* put something here */
-
-/*
- * Floating Point Registers - SW Conventions
- */
-
-/* put something here */
-
-/*
- * Temporary floating point registers
- */
-
-/* put something here */
-
-#endif
-
-/* end of file */
diff --git a/cpukit/score/cpu/no_cpu/rtems/score/no_cpu.h b/cpukit/score/cpu/no_cpu/rtems/score/no_cpu.h
deleted file mode 100644
index 3f374d5500..0000000000
--- a/cpukit/score/cpu/no_cpu/rtems/score/no_cpu.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* no_cpu.h
- *
- * This file is an example (i.e. "no CPU") of the file which is
- * created for each CPU family port of RTEMS.
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- *
- */
-
-#ifndef _INCLUDE_NO_CPU_h
-#define _INCLUDE_NO_CPU_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This file contains the information required to build
- * RTEMS for a particular member of the "no cpu"
- * family when executing in protected mode. It does
- * this by setting variables to indicate which implementation
- * dependent features are present in a particular member
- * of the family.
- */
-
-#if defined(no_cpu)
-
-#define CPU_MODEL_NAME "no_cpu"
-#define NOCPU_HAS_FPU 1
-
-#else
-
-#error "Unsupported CPU Model"
-
-#endif
-
-/*
- * Define the name of the CPU family.
- */
-
-#define CPU_NAME "NO CPU"
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* ! _INCLUDE_NO_CPU_h */
-/* end of include file */
diff --git a/cpukit/score/cpu/no_cpu/rtems/score/types.h b/cpukit/score/cpu/no_cpu/rtems/score/types.h
deleted file mode 100644
index 6dea57ebf3..0000000000
--- a/cpukit/score/cpu/no_cpu/rtems/score/types.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* no_cputypes.h
- *
- * This include file contains type definitions pertaining to the Intel
- * no_cpu processor family.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __NO_CPU_TYPES_h
-#define __NO_CPU_TYPES_h
-
-#ifndef ASM
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This section defines the basic types for this processor.
- */
-
-typedef unsigned char unsigned8; /* unsigned 8-bit integer */
-typedef unsigned short unsigned16; /* unsigned 16-bit integer */
-typedef unsigned int unsigned32; /* unsigned 32-bit integer */
-typedef unsigned long long unsigned64; /* unsigned 64-bit integer */
-
-typedef unsigned16 Priority_Bit_map_control;
-
-typedef signed char signed8; /* 8-bit signed integer */
-typedef signed short signed16; /* 16-bit signed integer */
-typedef signed int signed32; /* 32-bit signed integer */
-typedef signed long long signed64; /* 64 bit signed integer */
-
-typedef unsigned32 boolean; /* Boolean value */
-
-typedef float single_precision; /* single precision float */
-typedef double double_precision; /* double precision float */
-
-typedef void no_cpu_isr;
-typedef void ( *no_cpu_isr_entry )( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !ASM */
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/cpu/powerpc/Makefile.am b/cpukit/score/cpu/powerpc/Makefile.am
deleted file mode 100644
index db1cf0888a..0000000000
--- a/cpukit/score/cpu/powerpc/Makefile.am
+++ /dev/null
@@ -1,17 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-
-if PPC_NEW_EXCEPTION_PROCESSING
-CPUDIR = new_exception_processing
-else
-CPUDIR = old_exception_processing
-endif
-
-SUBDIRS = shared $(CPUDIR)
-
-include $(top_srcdir)/../../../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/cpukit/score/cpu/powerpc/asm.h b/cpukit/score/cpu/powerpc/asm.h
deleted file mode 100644
index af14c95665..0000000000
--- a/cpukit/score/cpu/powerpc/asm.h
+++ /dev/null
@@ -1,275 +0,0 @@
-/* asm.h
- *
- * This include file attempts to address the problems
- * caused by incompatible flavors of assemblers and
- * toolsets. It primarily addresses variations in the
- * use of leading underscores on symbols and the requirement
- * that register names be preceded by a %.
- *
- *
- * NOTE: The spacing in the use of these macros
- * is critical to them working as advertised.
- *
- * COPYRIGHT:
- *
- * This file is based on similar code found in newlib available
- * from ftp.cygnus.com. The file which was used had no copyright
- * notice. This file is freely distributable as long as the source
- * of the file is noted. This file is:
- *
- * COPYRIGHT (c) 1995.
- * i-cubed ltd.
- *
- * COPYRIGHT (c) 1994.
- * On-Line Applications Research Corporation (OAR).
- *
- * $Id$
- */
-
-#ifndef __PPC_ASM_h
-#define __PPC_ASM_h
-
-/*
- * Indicate we are in an assembly file and get the basic CPU definitions.
- */
-
-#ifndef ASM
-#define ASM
-#endif
-#include <rtems/score/targopts.h>
-#include <rtems/score/ppc.h>
-
-/*
- * Recent versions of GNU cpp define variables which indicate the
- * need for underscores and percents. If not using GNU cpp or
- * the version does not support this, then you will obviously
- * have to define these as appropriate.
- */
-
-#ifndef __USER_LABEL_PREFIX__
-#define __USER_LABEL_PREFIX__
-#endif
-
-#ifndef __REGISTER_PREFIX__
-#define __REGISTER_PREFIX__
-#endif
-
-#ifndef __FLOAT_REGISTER_PREFIX__
-#define __FLOAT_REGISTER_PREFIX__ __REGISTER_PREFIX__
-#endif
-
-#if (PPC_ABI == PPC_ABI_POWEROPEN)
-#ifndef __PROC_LABEL_PREFIX__
-#define __PROC_LABEL_PREFIX__ .
-#endif
-#endif
-
-#ifndef __PROC_LABEL_PREFIX__
-#define __PROC_LABEL_PREFIX__ __USER_LABEL_PREFIX__
-#endif
-
-/* ANSI concatenation macros. */
-
-#define CONCAT1(a, b) CONCAT2(a, b)
-#define CONCAT2(a, b) a ## b
-
-/* Use the right prefix for global labels. */
-
-#define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
-
-/* Use the right prefix for procedure labels. */
-
-#define PROC(x) CONCAT1 (__PROC_LABEL_PREFIX__, x)
-
-/* Use the right prefix for registers. */
-
-#define REG(x) CONCAT1 (__REGISTER_PREFIX__, x)
-
-/* Use the right prefix for floating point registers. */
-
-#define FREG(x) CONCAT1 (__FLOAT_REGISTER_PREFIX__, x)
-
-/*
- * define macros for all of the registers on this CPU
- *
- * EXAMPLE: #define d0 REG (d0)
- */
-#define r0 REG(0)
-#define r1 REG(1)
-#define r2 REG(2)
-#define r3 REG(3)
-#define r4 REG(4)
-#define r5 REG(5)
-#define r6 REG(6)
-#define r7 REG(7)
-#define r8 REG(8)
-#define r9 REG(9)
-#define r10 REG(10)
-#define r11 REG(11)
-#define r12 REG(12)
-#define r13 REG(13)
-#define r14 REG(14)
-#define r15 REG(15)
-#define r16 REG(16)
-#define r17 REG(17)
-#define r18 REG(18)
-#define r19 REG(19)
-#define r20 REG(20)
-#define r21 REG(21)
-#define r22 REG(22)
-#define r23 REG(23)
-#define r24 REG(24)
-#define r25 REG(25)
-#define r26 REG(26)
-#define r27 REG(27)
-#define r28 REG(28)
-#define r29 REG(29)
-#define r30 REG(30)
-#define r31 REG(31)
-#define f0 FREG(0)
-#define f1 FREG(1)
-#define f2 FREG(2)
-#define f3 FREG(3)
-#define f4 FREG(4)
-#define f5 FREG(5)
-#define f6 FREG(6)
-#define f7 FREG(7)
-#define f8 FREG(8)
-#define f9 FREG(9)
-#define f10 FREG(10)
-#define f11 FREG(11)
-#define f12 FREG(12)
-#define f13 FREG(13)
-#define f14 FREG(14)
-#define f15 FREG(15)
-#define f16 FREG(16)
-#define f17 FREG(17)
-#define f18 FREG(18)
-#define f19 FREG(19)
-#define f20 FREG(20)
-#define f21 FREG(21)
-#define f22 FREG(22)
-#define f23 FREG(23)
-#define f24 FREG(24)
-#define f25 FREG(25)
-#define f26 FREG(26)
-#define f27 FREG(27)
-#define f28 FREG(28)
-#define f29 FREG(29)
-#define f30 FREG(30)
-#define f31 FREG(31)
-
-/*
- * Some special purpose registers (SPRs).
- */
-#define srr0 0x01a
-#define srr1 0x01b
-#define srr2 0x3de /* IBM 400 series only */
-#define srr3 0x3df /* IBM 400 series only */
-#define sprg0 0x110
-#define sprg1 0x111
-#define sprg2 0x112
-#define sprg3 0x113
-
-
-/* the following SPR/DCR registers exist only in IBM 400 series */
-#define dear 0x3d5
-#define evpr 0x3d6 /* SPR: exception vector prefix register */
-#define iccr 0x3fb /* SPR: instruction cache control reg. */
-#define dccr 0x3fa /* SPR: data cache control reg. */
-
-#define exisr 0x040 /* DCR: external interrupt status register */
-#define exier 0x042 /* DCR: external interrupt enable register */
-#define br0 0x080 /* DCR: memory bank register 0 */
-#define br1 0x081 /* DCR: memory bank register 1 */
-#define br2 0x082 /* DCR: memory bank register 2 */
-#define br3 0x083 /* DCR: memory bank register 3 */
-#define br4 0x084 /* DCR: memory bank register 4 */
-#define br5 0x085 /* DCR: memory bank register 5 */
-#define br6 0x086 /* DCR: memory bank register 6 */
-#define br7 0x087 /* DCR: memory bank register 7 */
-/* end of IBM400 series register definitions */
-
-/* The following registers are for the MPC8x0 */
-#define der 0x095 /* Debug Enable Register */
-/* end of MPC8x0 registers */
-
-/*
- * Following must be tailor for a particular flavor of the C compiler.
- * They may need to put underscores in front of the symbols.
- */
-
-#define PUBLIC_VAR(sym) .globl SYM (sym)
-#define EXTERN_VAR(sym) .extern SYM (sym)
-#define PUBLIC_PROC(sym) .globl PROC (sym)
-#define EXTERN_PROC(sym) .extern PROC (sym)
-
-/* Other potentially assembler specific operations */
-#if PPC_ASM == PPC_ASM_ELF
-#define ALIGN(n,p) .align p
-#define DESCRIPTOR(x) \
- .section .descriptors,"aw"; \
- PUBLIC_VAR (x); \
-SYM (x):; \
- .long PROC (x); \
- .long s.got; \
- .long 0
-
-#define EXT_SYM_REF(x) .long x
-#define EXT_PROC_REF(x) .long x
-
-/*
- * Define macros to handle section beginning and ends.
- */
-
-#define BEGIN_CODE_DCL .text
-#define END_CODE_DCL
-#define BEGIN_DATA_DCL .data
-#define END_DATA_DCL
-#define BEGIN_CODE .text
-#define END_CODE
-#define BEGIN_DATA .data
-#define END_DATA
-#define BEGIN_BSS .bss
-#define END_BSS
-#define END
-
-#elif PPC_ASM == PPC_ASM_XCOFF
-#define ALIGN(n,p) .align p
-#define DESCRIPTOR(x) \
- .csect x[DS]; \
- .globl x[DS]; \
- .long PROC (x)[PR]; \
- .long TOC[tc0]
-
-#define EXT_SYM_REF(x) .long x[RW]
-#define EXT_PROC_REF(x) .long x[DS]
-
-/*
- * Define macros to handle section beginning and ends.
- */
-
-#define BEGIN_CODE_DCL .csect .text[PR]
-#define END_CODE_DCL
-#define BEGIN_DATA_DCL .csect .data[RW]
-#define END_DATA_DCL
-#define BEGIN_CODE .csect .text[PR]
-#define END_CODE
-#define BEGIN_DATA .csect .data[RW]
-#define END_DATA
-#define BEGIN_BSS .bss
-#define END_BSS
-#define END
-
-#else
-#error "PPC_ASM_TYPE is not properly defined"
-#endif
-#ifndef PPC_ASM
-#error "PPC_ASM_TYPE is not properly defined"
-#endif
-
-
-#endif
-/* end of include file */
-
-
diff --git a/cpukit/score/cpu/powerpc/rtems/asm.h b/cpukit/score/cpu/powerpc/rtems/asm.h
deleted file mode 100644
index af14c95665..0000000000
--- a/cpukit/score/cpu/powerpc/rtems/asm.h
+++ /dev/null
@@ -1,275 +0,0 @@
-/* asm.h
- *
- * This include file attempts to address the problems
- * caused by incompatible flavors of assemblers and
- * toolsets. It primarily addresses variations in the
- * use of leading underscores on symbols and the requirement
- * that register names be preceded by a %.
- *
- *
- * NOTE: The spacing in the use of these macros
- * is critical to them working as advertised.
- *
- * COPYRIGHT:
- *
- * This file is based on similar code found in newlib available
- * from ftp.cygnus.com. The file which was used had no copyright
- * notice. This file is freely distributable as long as the source
- * of the file is noted. This file is:
- *
- * COPYRIGHT (c) 1995.
- * i-cubed ltd.
- *
- * COPYRIGHT (c) 1994.
- * On-Line Applications Research Corporation (OAR).
- *
- * $Id$
- */
-
-#ifndef __PPC_ASM_h
-#define __PPC_ASM_h
-
-/*
- * Indicate we are in an assembly file and get the basic CPU definitions.
- */
-
-#ifndef ASM
-#define ASM
-#endif
-#include <rtems/score/targopts.h>
-#include <rtems/score/ppc.h>
-
-/*
- * Recent versions of GNU cpp define variables which indicate the
- * need for underscores and percents. If not using GNU cpp or
- * the version does not support this, then you will obviously
- * have to define these as appropriate.
- */
-
-#ifndef __USER_LABEL_PREFIX__
-#define __USER_LABEL_PREFIX__
-#endif
-
-#ifndef __REGISTER_PREFIX__
-#define __REGISTER_PREFIX__
-#endif
-
-#ifndef __FLOAT_REGISTER_PREFIX__
-#define __FLOAT_REGISTER_PREFIX__ __REGISTER_PREFIX__
-#endif
-
-#if (PPC_ABI == PPC_ABI_POWEROPEN)
-#ifndef __PROC_LABEL_PREFIX__
-#define __PROC_LABEL_PREFIX__ .
-#endif
-#endif
-
-#ifndef __PROC_LABEL_PREFIX__
-#define __PROC_LABEL_PREFIX__ __USER_LABEL_PREFIX__
-#endif
-
-/* ANSI concatenation macros. */
-
-#define CONCAT1(a, b) CONCAT2(a, b)
-#define CONCAT2(a, b) a ## b
-
-/* Use the right prefix for global labels. */
-
-#define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
-
-/* Use the right prefix for procedure labels. */
-
-#define PROC(x) CONCAT1 (__PROC_LABEL_PREFIX__, x)
-
-/* Use the right prefix for registers. */
-
-#define REG(x) CONCAT1 (__REGISTER_PREFIX__, x)
-
-/* Use the right prefix for floating point registers. */
-
-#define FREG(x) CONCAT1 (__FLOAT_REGISTER_PREFIX__, x)
-
-/*
- * define macros for all of the registers on this CPU
- *
- * EXAMPLE: #define d0 REG (d0)
- */
-#define r0 REG(0)
-#define r1 REG(1)
-#define r2 REG(2)
-#define r3 REG(3)
-#define r4 REG(4)
-#define r5 REG(5)
-#define r6 REG(6)
-#define r7 REG(7)
-#define r8 REG(8)
-#define r9 REG(9)
-#define r10 REG(10)
-#define r11 REG(11)
-#define r12 REG(12)
-#define r13 REG(13)
-#define r14 REG(14)
-#define r15 REG(15)
-#define r16 REG(16)
-#define r17 REG(17)
-#define r18 REG(18)
-#define r19 REG(19)
-#define r20 REG(20)
-#define r21 REG(21)
-#define r22 REG(22)
-#define r23 REG(23)
-#define r24 REG(24)
-#define r25 REG(25)
-#define r26 REG(26)
-#define r27 REG(27)
-#define r28 REG(28)
-#define r29 REG(29)
-#define r30 REG(30)
-#define r31 REG(31)
-#define f0 FREG(0)
-#define f1 FREG(1)
-#define f2 FREG(2)
-#define f3 FREG(3)
-#define f4 FREG(4)
-#define f5 FREG(5)
-#define f6 FREG(6)
-#define f7 FREG(7)
-#define f8 FREG(8)
-#define f9 FREG(9)
-#define f10 FREG(10)
-#define f11 FREG(11)
-#define f12 FREG(12)
-#define f13 FREG(13)
-#define f14 FREG(14)
-#define f15 FREG(15)
-#define f16 FREG(16)
-#define f17 FREG(17)
-#define f18 FREG(18)
-#define f19 FREG(19)
-#define f20 FREG(20)
-#define f21 FREG(21)
-#define f22 FREG(22)
-#define f23 FREG(23)
-#define f24 FREG(24)
-#define f25 FREG(25)
-#define f26 FREG(26)
-#define f27 FREG(27)
-#define f28 FREG(28)
-#define f29 FREG(29)
-#define f30 FREG(30)
-#define f31 FREG(31)
-
-/*
- * Some special purpose registers (SPRs).
- */
-#define srr0 0x01a
-#define srr1 0x01b
-#define srr2 0x3de /* IBM 400 series only */
-#define srr3 0x3df /* IBM 400 series only */
-#define sprg0 0x110
-#define sprg1 0x111
-#define sprg2 0x112
-#define sprg3 0x113
-
-
-/* the following SPR/DCR registers exist only in IBM 400 series */
-#define dear 0x3d5
-#define evpr 0x3d6 /* SPR: exception vector prefix register */
-#define iccr 0x3fb /* SPR: instruction cache control reg. */
-#define dccr 0x3fa /* SPR: data cache control reg. */
-
-#define exisr 0x040 /* DCR: external interrupt status register */
-#define exier 0x042 /* DCR: external interrupt enable register */
-#define br0 0x080 /* DCR: memory bank register 0 */
-#define br1 0x081 /* DCR: memory bank register 1 */
-#define br2 0x082 /* DCR: memory bank register 2 */
-#define br3 0x083 /* DCR: memory bank register 3 */
-#define br4 0x084 /* DCR: memory bank register 4 */
-#define br5 0x085 /* DCR: memory bank register 5 */
-#define br6 0x086 /* DCR: memory bank register 6 */
-#define br7 0x087 /* DCR: memory bank register 7 */
-/* end of IBM400 series register definitions */
-
-/* The following registers are for the MPC8x0 */
-#define der 0x095 /* Debug Enable Register */
-/* end of MPC8x0 registers */
-
-/*
- * Following must be tailor for a particular flavor of the C compiler.
- * They may need to put underscores in front of the symbols.
- */
-
-#define PUBLIC_VAR(sym) .globl SYM (sym)
-#define EXTERN_VAR(sym) .extern SYM (sym)
-#define PUBLIC_PROC(sym) .globl PROC (sym)
-#define EXTERN_PROC(sym) .extern PROC (sym)
-
-/* Other potentially assembler specific operations */
-#if PPC_ASM == PPC_ASM_ELF
-#define ALIGN(n,p) .align p
-#define DESCRIPTOR(x) \
- .section .descriptors,"aw"; \
- PUBLIC_VAR (x); \
-SYM (x):; \
- .long PROC (x); \
- .long s.got; \
- .long 0
-
-#define EXT_SYM_REF(x) .long x
-#define EXT_PROC_REF(x) .long x
-
-/*
- * Define macros to handle section beginning and ends.
- */
-
-#define BEGIN_CODE_DCL .text
-#define END_CODE_DCL
-#define BEGIN_DATA_DCL .data
-#define END_DATA_DCL
-#define BEGIN_CODE .text
-#define END_CODE
-#define BEGIN_DATA .data
-#define END_DATA
-#define BEGIN_BSS .bss
-#define END_BSS
-#define END
-
-#elif PPC_ASM == PPC_ASM_XCOFF
-#define ALIGN(n,p) .align p
-#define DESCRIPTOR(x) \
- .csect x[DS]; \
- .globl x[DS]; \
- .long PROC (x)[PR]; \
- .long TOC[tc0]
-
-#define EXT_SYM_REF(x) .long x[RW]
-#define EXT_PROC_REF(x) .long x[DS]
-
-/*
- * Define macros to handle section beginning and ends.
- */
-
-#define BEGIN_CODE_DCL .csect .text[PR]
-#define END_CODE_DCL
-#define BEGIN_DATA_DCL .csect .data[RW]
-#define END_DATA_DCL
-#define BEGIN_CODE .csect .text[PR]
-#define END_CODE
-#define BEGIN_DATA .csect .data[RW]
-#define END_DATA
-#define BEGIN_BSS .bss
-#define END_BSS
-#define END
-
-#else
-#error "PPC_ASM_TYPE is not properly defined"
-#endif
-#ifndef PPC_ASM
-#error "PPC_ASM_TYPE is not properly defined"
-#endif
-
-
-#endif
-/* end of include file */
-
-
diff --git a/cpukit/score/cpu/powerpc/rtems/score/ppc.h b/cpukit/score/cpu/powerpc/rtems/score/ppc.h
deleted file mode 100644
index ff93f9b1b3..0000000000
--- a/cpukit/score/cpu/powerpc/rtems/score/ppc.h
+++ /dev/null
@@ -1,632 +0,0 @@
-/* ppc.h
- *
- * This file contains definitions for the IBM/Motorola PowerPC
- * family members.
- *
- * Author: Andrew Bray <andy@i-cubed.co.uk>
- *
- * COPYRIGHT (c) 1995 by i-cubed ltd.
- *
- * MPC860 support code was added by Jay Monkman <jmonkman@frasca.com>
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of i-cubed limited not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * i-cubed limited makes no representations about the suitability
- * of this software for any purpose.
- *
- * Derived from c/src/exec/cpu/no_cpu/no_cpu.h:
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- *
- * Note:
- * This file is included by both C and assembler code ( -DASM )
- *
- * $Id$
- */
-
-
-#ifndef _INCLUDE_PPC_h
-#define _INCLUDE_PPC_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Define the name of the CPU family.
- */
-
-#define CPU_NAME "PowerPC"
-
-/*
- * This file contains the information required to build
- * RTEMS for a particular member of the PowerPC family. It does
- * this by setting variables to indicate which implementation
- * dependent features are present in a particular member
- * of the family.
- *
- * The following architectural feature definitions are defaulted
- * unless specifically set by the model definition:
- *
- * + PPC_DEBUG_MODEL - PPC_DEBUG_MODEL_STANDARD
- * + PPC_INTERRUPT_MAX - 16
- * + PPC_CACHE_ALIGNMENT - 32
- * + PPC_LOW_POWER_MODE - PPC_LOW_POWER_MODE_NONE
- * + PPC_HAS_EXCEPTION_PREFIX - 1
- * + PPC_HAS_FPU - 1
- * + PPC_HAS_DOUBLE - 1 if PPC_HAS_FPU,
- * - 0 otherwise
- * + PPC_USE_MULTIPLE - 0
- */
-
-/*
- * Define the debugging assistance models found in the PPC family.
- *
- * Standard: single step and branch trace
- * Single Step Only: single step only
- * IBM 4xx: debug exception
- */
-
-#define PPC_DEBUG_MODEL_STANDARD 1
-#define PPC_DEBUG_MODEL_SINGLE_STEP_ONLY 2
-#define PPC_DEBUG_MODEL_IBM4xx 3
-
-/*
- * Define the low power mode models
- *
- * Standard: as defined for 603e
- * Nap Mode: nap mode only (604)
- * XXX 403GB, 603, 603e, 604, 821
- */
-
-#define PPC_LOW_POWER_MODE_NONE 0
-#define PPC_LOW_POWER_MODE_STANDARD 1
-
-#if defined(ppc403)
-/*
- * IBM 403
- *
- * Developed for 403GA. Book checked for 403GB.
- *
- * Does not have user mode.
- */
-
-#define CPU_MODEL_NAME "PowerPC 403"
-#define PPC_ALIGNMENT 4
-#define PPC_CACHE_ALIGNMENT 16
-#define PPC_HAS_RFCI 1
-#define PPC_HAS_FPU 0
-#define PPC_USE_MULTIPLE 1
-#define PPC_I_CACHE 2048
-#define PPC_D_CACHE 1024
-
-#define PPC_DEBUG_MODEL PPC_DEBUG_MODEL_IBM4xx
-#define PPC_HAS_EXCEPTION_PREFIX 0
-#define PPC_HAS_EVPR 1
-
-
-#elif defined(mpc505) || defined(mpc509)
-/*
- * Submitted by Sergei Organov <osv@Javad.RU> as a patch against
- * 3.6.0 long after 4.0 was released. This is just an attempt
- * to get the setting correct.
- */
-
-#define CPU_MODEL_NAME "PowerPC 505/509"
-
-#define PPC_ALIGNMENT 4
-#define PPC_CACHE_ALIGNMENT 16
-#define PPC_I_CACHE 4096
-#define PPC_I_CACHE 0
-
-
-#elif defined(ppc601)
-
-/*
- * Submitted with original port -- book checked only.
- */
-
-#define CPU_MODEL_NAME "PowerPC 601"
-
-#define PPC_ALIGNMENT 8
-#define PPC_USE_MULTIPLE 1
-#define PPC_I_CACHE 0
-#define PPC_D_CACHE 32768
-
-#define PPC_DEBUG_MODEL PPC_DEBUG_MODEL_SINGLE_STEP_ONLY
-
-#elif defined(ppc602)
-/*
- * Submitted with original port -- book checked only.
- */
-
-#define CPU_MODEL_NAME "PowerPC 602"
-
-#define PPC_ALIGNMENT 4
-#define PPC_HAS_DOUBLE 0
-#define PPC_I_CACHE 4096
-#define PPC_D_CACHE 4096
-
-#elif defined(ppc603)
-/*
- * Submitted with original port -- book checked only.
- */
-
-#define CPU_MODEL_NAME "PowerPC 603"
-
-#define PPC_ALIGNMENT 8
-#define PPC_I_CACHE 8192
-#define PPC_D_CACHE 8192
-
-#elif defined(ppc603e)
-
-#define CPU_MODEL_NAME "PowerPC 603e"
-/*
- * Submitted with original port.
- *
- * Known to work on real hardware.
- */
-
-#define PPC_ALIGNMENT 8
-#define PPC_I_CACHE 16384
-#define PPC_D_CACHE 16384
-
-#define PPC_LOW_POWER_MODE PPC_LOW_POWER_MODE_STANDARD
-
-#elif defined(mpc604)
-/*
- * Submitted with original port -- book checked only.
- */
-
-#define CPU_MODEL_NAME "PowerPC 604"
-
-#define PPC_ALIGNMENT 8
-#define PPC_I_CACHE 16384
-#define PPC_D_CACHE 16384
-
-#elif defined(mpc860)
-/*
- * Added by Jay Monkman (jmonkman@frasca.com) 6/28/98
- */
-#define CPU_MODEL_NAME "PowerPC MPC860"
-
-#define PPC_ALIGNMENT 4
-#define PPC_I_CACHE 4096
-#define PPC_D_CACHE 4096
-#define PPC_CACHE_ALIGNMENT 16
-#define PPC_INTERRUPT_MAX 71
-#define PPC_HAS_FPU 0
-#define PPC_HAS_DOUBLE 0
-#define PPC_USE_MULTIPLE 1
-#define PPC_USE_SPRG 1
-
-#define PPC_MSR_0 0x00009000
-#define PPC_MSR_1 0x00001000
-#define PPC_MSR_2 0x00001000
-#define PPC_MSR_3 0x00000000
-
-#elif defined(mpc821)
-/*
- * Added by Andrew Bray <andy@chaos.org.uk> 6/April/1999
- */
-#define CPU_MODEL_NAME "PowerPC MPC821"
-
-#define PPC_ALIGNMENT 4
-#define PPC_I_CACHE 4096
-#define PPC_D_CACHE 4096
-#define PPC_CACHE_ALIGNMENT 16
-#define PPC_INTERRUPT_MAX 71
-#define PPC_HAS_FPU 0
-#define PPC_HAS_DOUBLE 0
-
-#define PPC_MSR_0 0x00009000
-#define PPC_MSR_1 0x00001000
-#define PPC_MSR_2 0x00001000
-#define PPC_MSR_3 0x00000000
-
-#elif defined(mpc750)
-
-#define CPU_MODEL_NAME "PowerPC 750"
-
-#define PPC_ALIGNMENT 8
-#define PPC_I_CACHE 16384
-#define PPC_D_CACHE 16384
-
-#else
-
-#error "Unsupported CPU Model"
-
-#endif
-
-/*
- * Application binary interfaces.
- *
- * PPC_ABI MUST be defined as one of these.
- * Only PPC_ABI_POWEROPEN is currently fully supported.
- * Only EABI will be supported in the end when
- * the tools are there.
- * Only big endian is currently supported.
- */
-/*
- * PowerOpen ABI. This is Andy's hack of the
- * PowerOpen ABI to ELF. ELF rather than a
- * XCOFF assembler is used. This may work
- * if PPC_ASM == PPC_ASM_XCOFF is defined.
- */
-#define PPC_ABI_POWEROPEN 0
-/*
- * GCC 2.7.0 munched version of EABI, with
- * PowerOpen calling convention and stack frames,
- * but EABI style indirect function calls.
- */
-#define PPC_ABI_GCC27 1
-/*
- * SVR4 ABI
- */
-#define PPC_ABI_SVR4 2
-/*
- * Embedded ABI
- */
-#define PPC_ABI_EABI 3
-
-#if (PPC_ABI == PPC_ABI_POWEROPEN)
-#define PPC_STACK_ALIGNMENT 8
-#elif (PPC_ABI == PPC_ABI_GCC27)
-#define PPC_STACK_ALIGNMENT 8
-#elif (PPC_ABI == PPC_ABI_SVR4)
-#define PPC_STACK_ALIGNMENT 16
-#elif (PPC_ABI == PPC_ABI_EABI)
-#define PPC_STACK_ALIGNMENT 8
-#else
-#error "PPC_ABI is not properly defined"
-#endif
-#ifndef PPC_ABI
-#error "PPC_ABI is not properly defined"
-#endif
-
-/*
- * Assemblers.
- * PPC_ASM MUST be defined as one of these.
- *
- * PPC_ASM_ELF: ELF assembler. Currently used for all ABIs.
- * PPC_ASM_XCOFF: XCOFF assembler. May be needed for PowerOpen ABI.
- *
- * NOTE: Only PPC_ABI_ELF is currently fully supported.
- */
-
-#define PPC_ASM_ELF 0
-#define PPC_ASM_XCOFF 1
-
-/*
- * Use the default debug scheme defined in the architectural specification
- * if another model has not been specified.
- */
-
-#ifndef PPC_DEBUG_MODEL
-#define PPC_DEBUG_MODEL PPC_DEBUG_MODEL_STANDARD
-#endif
-
-/*
- * If the maximum number of exception sources has not been defined,
- * then default it to 16.
- */
-
-#ifndef PPC_INTERRUPT_MAX
-#define PPC_INTERRUPT_MAX 16
-#endif
-
-/*
- * Unless specified otherwise, the cache line size is defaulted to 32.
- *
- * The derive the power of 2 the cache line is.
- */
-
-#ifndef PPC_CACHE_ALIGNMENT
-#define PPC_CACHE_ALIGNMENT 32
-#endif
-
-#if (PPC_CACHE_ALIGNMENT == 16)
-#define PPC_CACHE_ALIGN_POWER 4
-#elif (PPC_CACHE_ALIGNMENT == 32)
-#define PPC_CACHE_ALIGN_POWER 5
-#else
-#error "Undefined power of 2 for PPC_CACHE_ALIGNMENT"
-#endif
-
-/*
- * Unless otherwise specified, assume the model has an IP/EP bit to
- * set the exception address prefix.
- */
-
-#ifndef PPC_HAS_EXCEPTION_PREFIX
-#define PPC_HAS_EXCEPTION_PREFIX 1
-#endif
-
-/*
- * Unless otherwise specified, assume the model does NOT have
- * 403 style EVPR register to set the exception address prefix.
- */
-
-#ifndef PPC_HAS_EVPR
-#define PPC_HAS_EVPR 0
-#endif
-
-/*
- * If no low power mode model was specified, then assume there is none.
- */
-
-#ifndef PPC_LOW_POWER_MODE
-#define PPC_LOW_POWER_MODE PPC_LOW_POWER_MODE_NONE
-#endif
-
-/*
- * Unless specified above, then assume the model has FP support.
- */
-
-#ifndef PPC_HAS_FPU
-#define PPC_HAS_FPU 1
-#endif
-
-/*
- * Unless specified above, If the model has FP support, it is assumed to
- * support doubles (8-byte floating point numbers).
- *
- * If the model does NOT have FP support, then the model does
- * NOT have double length FP registers.
- */
-
-#ifndef PPC_HAS_DOUBLE
-#if (PPC_HAS_FPU)
-#define PPC_HAS_DOUBLE 1
-#else
-#define PPC_HAS_DOUBLE 0
-#endif
-#endif
-
-/*
- * Unless specified above, then assume the model does NOT have critical
- * interrupt support.
- */
-
-#ifndef PPC_HAS_RFCI
-#define PPC_HAS_RFCI 0
-#endif
-
-/*
- * Unless specified above, do not use the load/store multiple instructions
- * in a context switch.
- */
-
-#ifndef PPC_USE_MULTIPLE
-#define PPC_USE_MULTIPLE 0
-#endif
-
-/*
- * The following exceptions are not maskable, and are not
- * necessarily predictable, so cannot be offered to RTEMS:
- * Alignment exception - handled by the CPU module
- * Data exceptions.
- * Instruction exceptions.
- */
-
-/*
- * Base Interrupt vectors supported on all models.
- */
-#define PPC_IRQ_SYSTEM_RESET 0 /* 0x00100 - System reset. */
-#define PPC_IRQ_MCHECK 1 /* 0x00200 - Machine check */
-#define PPC_IRQ_PROTECT 2 /* 0x00300 - Protection violation */
-#define PPC_IRQ_ISI 3 /* 0x00400 - Instruction Fetch error */
-#define PPC_IRQ_EXTERNAL 4 /* 0x00500 - External interrupt */
-#define PPC_IRQ_ALIGNMENT 5 /* 0X00600 - Alignment exception */
-#define PPC_IRQ_PROGRAM 6 /* 0x00700 - Program exception */
-#define PPC_IRQ_NOFP 7 /* 0x00800 - Floating point unavailable */
-#define PPC_IRQ_DECREMENTER 8 /* 0x00900 - Decrementer interrupt */
-#define PPC_IRQ_RESERVED_A 9 /* 0x00a00 - Implementation Reserved */
-#define PPC_IRQ_RESERVED_B 10 /* 0x00a00 - Implementation Reserved */
-#define PPC_IRQ_SCALL 11 /* 0x00c00 - System call */
-#define PPC_IRQ_TRACE 12 /* 0x00d00 - Trace Exception */
-#define PPC_IRQ_FP_ASST 13 /* ox00e00 - Floating point assist */
-#define PPC_STD_IRQ_LAST PPC_IRQ_FP_ASST
-
-#define PPC_IRQ_FIRST PPC_IRQ_SYSTEM_RESET
-
-#if defined(ppc403)
-
-#define PPC_IRQ_CRIT PPC_IRQ_SYSTEM_RESET /*0x00100- Critical int. pin */
-#define PPC_IRQ_PIT (PPC_STD_IRQ_LAST+1) /*0x01000- Pgm interval timer*/
-#define PPC_IRQ_FIT (PPC_STD_IRQ_LAST+2) /*0x01010- Fixed int. timer */
-#define PPC_IRQ_WATCHDOG (PPC_STD_IRQ_LAST+3) /*0x01020- Watchdog timer */
-#define PPC_IRQ_DEBUG (PPC_STD_IRQ_LAST+4) /*0x02000- Debug exceptions */
-#define PPC_IRQ_LAST PPC_IRQ_DEBUG
-
-#elif defined(ppc601)
-#define PPC_IRQ_TRACE (PPC_STD_IRQ_LAST+1) /*0x02000-Run/Trace Exception*/
-#define PPC_IRQ_LAST PPC_IRQ_TRACE
-
-#elif defined(ppc602)
-#define PPC_IRQ_LAST (PPC_STD_IRQ_LAST)
-
-#elif defined(ppc603)
-#define PPC_IRQ_TRANS_MISS (PPC_STD_IRQ_LAST+1) /*0x1000-Ins Translation Miss*/
-#define PPC_IRQ_DATA_LOAD (PPC_STD_IRQ_LAST+2) /*0x1100-Data Load Trans Miss*/
-#define PPC_IRQ_DATA_STORE (PPC_STD_IRQ_LAST+3) /*0x1200-Data Store Miss */
-#define PPC_IRQ_ADDR_BRK (PPC_STD_IRQ_LAST+4) /*0x1300-Instruction Bkpoint */
-#define PPC_IRQ_SYS_MGT (PPC_STD_IRQ_LAST+5) /*0x1400-System Management */
-#define PPC_IRQ_LAST PPC_IRQ_SYS_MGT
-
-#elif defined(ppc603e)
-#define PPC_TLB_INST_MISS (PPC_STD_IRQ_LAST+1) /*0x1000-Instruction TLB Miss*/
-#define PPC_TLB_LOAD_MISS (PPC_STD_IRQ_LAST+2) /*0x1100-TLB miss on load */
-#define PPC_TLB_STORE_MISS (PPC_STD_IRQ_LAST+3) /*0x1200-TLB Miss on store */
-#define PPC_IRQ_ADDRBRK (PPC_STD_IRQ_LAST+4) /*0x1300-Instruct addr break */
-#define PPC_IRQ_SYS_MGT (PPC_STD_IRQ_LAST+5) /*0x1400-System Management */
-#define PPC_IRQ_LAST PPC_IRQ_SYS_MGT
-
-
-#elif defined(mpc604)
-#define PPC_IRQ_ADDR_BRK (PPC_STD_IRQ_LAST+1) /*0x1300- Inst. addr break */
-#define PPC_IRQ_SYS_MGT (PPC_STD_IRQ_LAST+2) /*0x1400- System Management */
-#define PPC_IRQ_LAST PPC_IRQ_SYS_MGT
-
-#elif defined(mpc860) || defined(mpc821)
-#define PPC_IRQ_EMULATE (PPC_STD_IRQ_LAST+1) /*0x1000-Software emulation */
-#define PPC_IRQ_INST_MISS (PPC_STD_IRQ_LAST+2) /*0x1100-Instruction TLB miss*/
-#define PPC_IRQ_DATA_MISS (PPC_STD_IRQ_LAST+3) /*0x1200-Data TLB miss */
-#define PPC_IRQ_INST_ERR (PPC_STD_IRQ_LAST+4) /*0x1300-Instruction TLB err */
-#define PPC_IRQ_DATA_ERR (PPC_STD_IRQ_LAST+5) /*0x1400-Data TLB error */
-#define PPC_IRQ_DATA_BPNT (PPC_STD_IRQ_LAST+6) /*0x1C00-Data breakpoint */
-#define PPC_IRQ_INST_BPNT (PPC_STD_IRQ_LAST+7) /*0x1D00-Inst breakpoint */
-#define PPC_IRQ_IO_BPNT (PPC_STD_IRQ_LAST+8) /*0x1E00-Peripheral breakpnt */
-#define PPC_IRQ_DEV_PORT (PPC_STD_IRQ_LAST+9) /*0x1F00-Development port */
-#define PPC_IRQ_IRQ0 (PPC_STD_IRQ_LAST + 10)
-#define PPC_IRQ_LVL0 (PPC_STD_IRQ_LAST + 11)
-#define PPC_IRQ_IRQ1 (PPC_STD_IRQ_LAST + 12)
-#define PPC_IRQ_LVL1 (PPC_STD_IRQ_LAST + 13)
-#define PPC_IRQ_IRQ2 (PPC_STD_IRQ_LAST + 14)
-#define PPC_IRQ_LVL2 (PPC_STD_IRQ_LAST + 15)
-#define PPC_IRQ_IRQ3 (PPC_STD_IRQ_LAST + 16)
-#define PPC_IRQ_LVL3 (PPC_STD_IRQ_LAST + 17)
-#define PPC_IRQ_IRQ4 (PPC_STD_IRQ_LAST + 18)
-#define PPC_IRQ_LVL4 (PPC_STD_IRQ_LAST + 19)
-#define PPC_IRQ_IRQ5 (PPC_STD_IRQ_LAST + 20)
-#define PPC_IRQ_LVL5 (PPC_STD_IRQ_LAST + 21)
-#define PPC_IRQ_IRQ6 (PPC_STD_IRQ_LAST + 22)
-#define PPC_IRQ_LVL6 (PPC_STD_IRQ_LAST + 23)
-#define PPC_IRQ_IRQ7 (PPC_STD_IRQ_LAST + 24)
-#define PPC_IRQ_LVL7 (PPC_STD_IRQ_LAST + 25)
-#define PPC_IRQ_CPM_RESERVED_0 (PPC_STD_IRQ_LAST + 26)
-#define PPC_IRQ_CPM_PC4 (PPC_STD_IRQ_LAST + 27)
-#define PPC_IRQ_CPM_PC5 (PPC_STD_IRQ_LAST + 28)
-#define PPC_IRQ_CPM_SMC2 (PPC_STD_IRQ_LAST + 29)
-#define PPC_IRQ_CPM_SMC1 (PPC_STD_IRQ_LAST + 30)
-#define PPC_IRQ_CPM_SPI (PPC_STD_IRQ_LAST + 31)
-#define PPC_IRQ_CPM_PC6 (PPC_STD_IRQ_LAST + 32)
-#define PPC_IRQ_CPM_TIMER4 (PPC_STD_IRQ_LAST + 33)
-#define PPC_IRQ_CPM_RESERVED_8 (PPC_STD_IRQ_LAST + 34)
-#define PPC_IRQ_CPM_PC7 (PPC_STD_IRQ_LAST + 35)
-#define PPC_IRQ_CPM_PC8 (PPC_STD_IRQ_LAST + 36)
-#define PPC_IRQ_CPM_PC9 (PPC_STD_IRQ_LAST + 37)
-#define PPC_IRQ_CPM_TIMER3 (PPC_STD_IRQ_LAST + 38)
-#define PPC_IRQ_CPM_RESERVED_D (PPC_STD_IRQ_LAST + 39)
-#define PPC_IRQ_CPM_PC10 (PPC_STD_IRQ_LAST + 40)
-#define PPC_IRQ_CPM_PC11 (PPC_STD_IRQ_LAST + 41)
-#define PPC_IRQ_CPM_I2C (PPC_STD_IRQ_LAST + 42)
-#define PPC_IRQ_CPM_RISC_TIMER (PPC_STD_IRQ_LAST + 43)
-#define PPC_IRQ_CPM_TIMER2 (PPC_STD_IRQ_LAST + 44)
-#define PPC_IRQ_CPM_RESERVED_13 (PPC_STD_IRQ_LAST + 45)
-#define PPC_IRQ_CPM_IDMA2 (PPC_STD_IRQ_LAST + 46)
-#define PPC_IRQ_CPM_IDMA1 (PPC_STD_IRQ_LAST + 47)
-#define PPC_IRQ_CPM_SDMA_ERROR (PPC_STD_IRQ_LAST + 48)
-#define PPC_IRQ_CPM_PC12 (PPC_STD_IRQ_LAST + 49)
-#define PPC_IRQ_CPM_PC13 (PPC_STD_IRQ_LAST + 50)
-#define PPC_IRQ_CPM_TIMER1 (PPC_STD_IRQ_LAST + 51)
-#define PPC_IRQ_CPM_PC14 (PPC_STD_IRQ_LAST + 52)
-#define PPC_IRQ_CPM_SCC4 (PPC_STD_IRQ_LAST + 53)
-#define PPC_IRQ_CPM_SCC3 (PPC_STD_IRQ_LAST + 54)
-#define PPC_IRQ_CPM_SCC2 (PPC_STD_IRQ_LAST + 55)
-#define PPC_IRQ_CPM_SCC1 (PPC_STD_IRQ_LAST + 56)
-#define PPC_IRQ_CPM_PC15 (PPC_STD_IRQ_LAST + 57)
-
-#define PPC_IRQ_LAST PPC_IRQ_CPM_PC15
-
-#endif
-
-/*
- * If the maximum number of exception sources is too low,
- * then fix it
- */
-
-#if PPC_INTERRUPT_MAX <= PPC_IRQ_LAST
-#undef PPC_INTERRUPT_MAX
-#define PPC_INTERRUPT_MAX ((PPC_IRQ_LAST) + 1)
-#endif
-
-/*
- * Machine Status Register (MSR) Constants Used by RTEMS
- */
-
-/*
- * Some PPC model manuals refer to the Exception Prefix (EP) bit as
- * IP for no apparent reason.
- */
-
-#define PPC_MSR_RI 0x000000002 /* bit 30 - recoverable exception */
-#define PPC_MSR_DR 0x000000010 /* bit 27 - data address translation */
-#define PPC_MSR_IR 0x000000020 /* bit 26 - instruction addr translation*/
-
-#if (PPC_HAS_EXCEPTION_PREFIX)
-#define PPC_MSR_EP 0x000000040 /* bit 25 - exception prefix */
-#else
-#define PPC_MSR_EP 0x000000000 /* bit 25 - exception prefix */
-#endif
-
-#if (PPC_HAS_FPU)
-#define PPC_MSR_FP 0x000002000 /* bit 18 - floating point enable */
-#else
-#define PPC_MSR_FP 0x000000000 /* bit 18 - floating point enable */
-#endif
-
-#if (PPC_LOW_POWER_MODE == PPC_LOW_POWER_MODE_NONE)
-#define PPC_MSR_POW 0x000000000 /* bit 13 - power management enable */
-#else
-#define PPC_MSR_POW 0x000040000 /* bit 13 - power management enable */
-#endif
-
-/*
- * Interrupt/exception MSR bits set as defined on p. 2-20 in "The Programming
- * Environments" and the manuals for various PPC models.
- */
-
-#if (PPC_DEBUG_MODEL == PPC_DEBUG_MODEL_STANDARD)
-#define PPC_MSR_DE 0x000000000 /* bit 22 - debug exception enable */
-#define PPC_MSR_BE 0x000000200 /* bit 22 - branch trace enable */
-#define PPC_MSR_SE 0x000000400 /* bit 21 - single step trace enable */
-#elif (PPC_DEBUG_MODEL == PPC_DEBUG_MODEL_SINGLE_STEP_ONLY)
-#define PPC_MSR_DE 0x000000000 /* bit 22 - debug exception enable */
-#define PPC_MSR_BE 0x000000200 /* bit 22 - branch trace enable */
-#define PPC_MSR_SE 0x000000000 /* bit 21 - single step trace enable */
-#elif (PPC_DEBUG_MODEL == PPC_DEBUG_MODEL_IBM4xx)
-#define PPC_MSR_DE 0x000000200 /* bit 22 - debug exception enable */
-#define PPC_MSR_BE 0x000000000 /* bit 22 - branch trace enable */
-#define PPC_MSR_SE 0x000000000 /* bit 21 - single step trace enable */
-#else
-#error "MSR constants -- unknown PPC_DEBUG_MODEL!!"
-#endif
-
-#define PPC_MSR_ME 0x000001000 /* bit 19 - machine check enable */
-#define PPC_MSR_EE 0x000008000 /* bit 16 - external interrupt enable */
-
-#if (PPC_HAS_RFCI)
-#define PPC_MSR_CE 0x000020000 /* bit 14 - critical interrupt enable */
-#else
-#define PPC_MSR_CE 0x000000000 /* bit 14 - critical interrupt enable */
-#endif
-
-#define PPC_MSR_DISABLE_MASK (PPC_MSR_ME|PPC_MSR_EE|PPC_MSR_CE)
-
-/*
- * Initial value for the FPSCR register
- */
-
-#define PPC_INIT_FPSCR 0x000000f8
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* ! _INCLUDE_PPC_h */
-/* end of include file */
-
-
diff --git a/cpukit/score/cpu/powerpc/rtems/score/types.h b/cpukit/score/cpu/powerpc/rtems/score/types.h
deleted file mode 100644
index 62bdb35d10..0000000000
--- a/cpukit/score/cpu/powerpc/rtems/score/types.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/* ppctypes.h
- *
- * This include file contains type definitions pertaining to the PowerPC
- * processor family.
- *
- * Author: Andrew Bray <andy@i-cubed.co.uk>
- *
- * COPYRIGHT (c) 1995 by i-cubed ltd.
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of i-cubed limited not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * i-cubed limited makes no representations about the suitability
- * of this software for any purpose.
- *
- * Derived from c/src/exec/cpu/no_cpu/no_cputypes.h:
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __PPC_TYPES_h
-#define __PPC_TYPES_h
-
-#ifndef ASM
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This section defines the basic types for this processor.
- */
-
-typedef unsigned char unsigned8; /* unsigned 8-bit integer */
-typedef unsigned short unsigned16; /* unsigned 16-bit integer */
-typedef unsigned int unsigned32; /* unsigned 32-bit integer */
-typedef unsigned long long unsigned64; /* unsigned 64-bit integer */
-
-typedef unsigned32 Priority_Bit_map_control;
-
-typedef signed char signed8; /* 8-bit signed integer */
-typedef signed short signed16; /* 16-bit signed integer */
-typedef signed int signed32; /* 32-bit signed integer */
-typedef signed long long signed64; /* 64 bit signed integer */
-
-typedef unsigned32 boolean; /* Boolean value */
-
-typedef float single_precision; /* single precision float */
-typedef double double_precision; /* double precision float */
-
-typedef void ppc_isr;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !ASM */
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/cpu/sh/Makefile.am b/cpukit/score/cpu/sh/Makefile.am
deleted file mode 100644
index 680b7151dc..0000000000
--- a/cpukit/score/cpu/sh/Makefile.am
+++ /dev/null
@@ -1,45 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../../../../automake/lib.am
-
-SUBDIRS = rtems
-
-H_FILES = asm.h
-
-$(PROJECT_INCLUDE):
- $(mkinstalldirs) $@
-
-$(PROJECT_INCLUDE)/%.h: %.h
- $(INSTALL_DATA) $< $@
-
-$(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o: $(ARCH)/rtems.o
- $(INSTALL_DATA) $< $@
-
-C_FILES = cpu.c cpu_asm.c isp$(RTEMS_CPU_MODEL).c
-C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
-
-REL = $(ARCH)/rtems-cpu.rel
-
-rtems_cpu_rel_OBJECTS = $(C_O_FILES)
-
-$(REL): $(rtems_cpu_rel_OBJECTS)
- $(make-rel)
-
-PREINSTALL_FILES += $(PROJECT_INCLUDE) $(H_FILES:%=$(PROJECT_INCLUDE)/%)
-
-TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o
-
-all-local: $(ARCH) $(PREINSTALL_FILES) $(rtems_cpu_rel_OBJECTS) $(REL) $(TMPINSTALL_FILES)
-
-.PRECIOUS: $(REL)
-
-EXTRA_DIST = asm.h cpu.c cpu_asm.c ispsh7032.c ispsh7045.c rtems.c
-
-include $(top_srcdir)/../../../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/cpukit/score/cpu/sh/asm.h b/cpukit/score/cpu/sh/asm.h
deleted file mode 100644
index f6fff9f40e..0000000000
--- a/cpukit/score/cpu/sh/asm.h
+++ /dev/null
@@ -1,137 +0,0 @@
-/* asm.h
- *
- * This include file attempts to address the problems
- * caused by incompatible flavors of assemblers and
- * toolsets. It primarily addresses variations in the
- * use of leading underscores on symbols and the requirement
- * that register names be preceded by a %.
- *
- * Authors: Ralf Corsepius (corsepiu@faw.uni-ulm.de) and
- * Bernd Becker (becker@faw.uni-ulm.de)
- *
- * NOTE: The spacing in the use of these macros
- * is critical to them working as advertised.
- *
- * COPYRIGHT:
- *
- * This file is based on similar code found in newlib available
- * from ftp.cygnus.com. The file which was used had no copyright
- * notice. This file is freely distributable as long as the source
- * of the file is noted. This file is:
- *
- *
- * COPYRIGHT (c) 1997-1998, FAW Ulm, Germany
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- *
- * COPYRIGHT (c) 1998.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __CPU_SH_ASM_h
-#define __CPU_SH_ASM_h
-
-/*
- * Indicate we are in an assembly file and get the basic CPU definitions.
- */
-
-#ifndef ASM
-#define ASM
-#endif
-
-#include <rtems/score/targopts.h>
-#include <rtems/score/sh.h>
-
-/*
- * Recent versions of GNU cpp define variables which indicate the
- * need for underscores and percents. If not using GNU cpp or
- * the version does not support this, then you will obviously
- * have to define these as appropriate.
- */
-
-#ifndef __USER_LABEL_PREFIX__
-#define __USER_LABEL_PREFIX__ _
-#endif
-
-#ifndef __REGISTER_PREFIX__
-#define __REGISTER_PREFIX__
-#endif
-
-/* ANSI concatenation macros. */
-
-#define CONCAT1(a, b) CONCAT2(a, b)
-#define CONCAT2(a, b) a ## b
-
-/* Use the right prefix for global labels. */
-
-#define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
-
-/* Use the right prefix for registers. */
-
-#define REG(x) CONCAT1 (__REGISTER_PREFIX__, x)
-
-/*
- * define macros for all of the registers on this CPU
- *
- * EXAMPLE: #define d0 REG (d0)
- */
-#define r0 REG (r0)
-#define r1 REG (r1)
-#define r2 REG (r2)
-#define r3 REG (r3)
-#define r4 REG (r4)
-#define r5 REG (r5)
-#define r6 REG (r6)
-#define r7 REG (r7)
-#define r8 REG (r8)
-#define r9 REG (r9)
-#define r10 REG (r10)
-#define r11 REG (r11)
-#define r12 REG (r12)
-#define r13 REG (r13)
-#define r14 REG (r14)
-#define r15 REG (r15)
-#define vbr REG (vbr)
-#define gbr REG (gbr)
-#define pr REG (pr)
-#define mach REG (mach)
-#define macl REG (macl)
-#define sr REG (sr)
-#define pc REG (pc)
-
-/*
- * Define macros to handle section beginning and ends.
- */
-
-
-#define BEGIN_CODE_DCL .text
-#define END_CODE_DCL
-#define BEGIN_DATA_DCL .data
-#define END_DATA_DCL
-#define BEGIN_CODE .text
-#define END_CODE
-#define BEGIN_DATA
-#define END_DATA
-#define BEGIN_BSS
-#define END_BSS
-#define END
-
-/*
- * Following must be tailor for a particular flavor of the C compiler.
- * They may need to put underscores in front of the symbols.
- */
-
-#define PUBLIC(sym) .global SYM (sym)
-#define EXTERN(sym) .global SYM (sym)
-
-#endif
diff --git a/cpukit/score/cpu/sh/cpu.c b/cpukit/score/cpu/sh/cpu.c
deleted file mode 100644
index 06f7b9c3d7..0000000000
--- a/cpukit/score/cpu/sh/cpu.c
+++ /dev/null
@@ -1,232 +0,0 @@
-/*
- * This file contains information pertaining to the Hitachi SH
- * processor.
- *
- * Authors: Ralf Corsepius (corsepiu@faw.uni-ulm.de) and
- * Bernd Becker (becker@faw.uni-ulm.de)
- *
- * COPYRIGHT (c) 1997-1998, FAW Ulm, Germany
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- *
- * COPYRIGHT (c) 1998.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/sh_io.h>
-#include <rtems/score/cpu.h>
-#include <rtems/score/sh.h>
-
-
-/* referenced in start.S */
-extern proc_ptr vectab[] ;
-
-proc_ptr vectab[256] ;
-
-extern proc_ptr _Hardware_isr_Table[];
-
-/* _CPU_Initialize
- *
- * This routine performs processor dependent initialization.
- *
- * INPUT PARAMETERS:
- * cpu_table - CPU table to initialize
- * thread_dispatch - address of disptaching routine
- */
-
-
-void _CPU_Initialize(
- rtems_cpu_table *cpu_table,
- void (*thread_dispatch) /* ignored on this CPU */
-)
-{
- register unsigned32 level = 0;
-
- /*
- * The thread_dispatch argument is the address of the entry point
- * for the routine called at the end of an ISR once it has been
- * decided a context switch is necessary. On some compilation
- * systems it is difficult to call a high-level language routine
- * from assembly. This allows us to trick these systems.
- *
- * If you encounter this problem save the entry point in a CPU
- * dependent variable.
- */
-
- _CPU_Thread_dispatch_pointer = thread_dispatch;
-
- /*
- * If there is not an easy way to initialize the FP context
- * during Context_Initialize, then it is usually easier to
- * save an "uninitialized" FP context here and copy it to
- * the task's during Context_Initialize.
- */
-
- /* FP context initialization support goes here */
-
- _CPU_Table = *cpu_table;
-
- /* enable interrupts */
- _CPU_ISR_Set_level( level);
-}
-
-/*PAGE
- *
- * _CPU_ISR_Get_level
- */
-
-unsigned32 _CPU_ISR_Get_level( void )
-{
- /*
- * This routine returns the current interrupt level.
- */
-
- register unsigned32 _mask ;
-
- sh_get_interrupt_level( _mask );
-
- return ( _mask);
-}
-
-/*PAGE
- *
- * _CPU_ISR_install_raw_handler
- */
-
-void _CPU_ISR_install_raw_handler(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-)
-{
- /*
- * This is where we install the interrupt handler into the "raw" interrupt
- * table used by the CPU to dispatch interrupt handlers.
- */
- volatile proc_ptr *vbr ;
-
-#if SH_PARANOID_ISR
- unsigned32 level ;
-
- sh_disable_interrupts( level );
-#endif
-
- /* get vbr */
- asm ( "stc vbr,%0" : "=r" (vbr) );
-
- *old_handler = vbr[vector] ;
- vbr[vector] = new_handler ;
-
-#if SH_PARANOID_ISR
- sh_enable_interrupts( level );
-#endif
-}
-
-
-/*PAGE
- *
- * _CPU_ISR_install_vector
- *
- * This kernel routine installs the RTEMS handler for the
- * specified vector.
- *
- * Input parameters:
- * vector - interrupt vector number
- * old_handler - former ISR for this vector number
- * new_handler - replacement ISR for this vector number
- *
- * Output parameters: NONE
- *
- */
-
-void _CPU_ISR_install_vector(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-)
-{
- proc_ptr ignored ;
-
- if(( vector <= 113) && ( vector >= 11))
- {
- *old_handler = _ISR_Vector_table[ vector ];
-
- /*
- * If the interrupt vector table is a table of pointer to isr entry
- * points, then we need to install the appropriate RTEMS interrupt
- * handler for this vector number.
- */
- _CPU_ISR_install_raw_handler(vector,
- _Hardware_isr_Table[vector],
- &ignored );
-
- /*
- * We put the actual user ISR address in '_ISR_Vector_table'.
- * This will be used by __ISR_Handler so the user gets control.
- */
-
- _ISR_Vector_table[ vector ] = new_handler;
- }
-}
-
-/*PAGE
- *
- * _CPU_Thread_Idle_body
- *
- * NOTES:
- *
- * 1. This is the same as the regular CPU independent algorithm.
- *
- * 2. If you implement this using a "halt", "idle", or "shutdown"
- * instruction, then don't forget to put it in an infinite loop.
- *
- * 3. Be warned. Some processors with onboard DMA have been known
- * to stop the DMA if the CPU were put in IDLE mode. This might
- * also be a problem with other on-chip peripherals. So use this
- * hook with caution.
- */
-
-#if (CPU_PROVIDES_IDLE_THREAD_BODY == TRUE)
-void _CPU_Thread_Idle_body( void )
-{
-
- for( ; ; )
- {
- asm volatile("nop");
- }
- /* insert your "halt" instruction here */ ;
-}
-#endif
-
-#if (CPU_USE_GENERIC_BITFIELD_CODE == FALSE)
-
-unsigned8 _bit_set_table[16] =
- { 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 2, 2, 1,0};
-
-
-#endif
-
-void _CPU_Context_Initialize(
- Context_Control *_the_context,
- void *_stack_base,
- unsigned32 _size,
- unsigned32 _isr,
- void (*_entry_point)(void),
- int _is_fp )
-{
- _the_context->r15 = (unsigned32*) ((unsigned32) (_stack_base) + (_size) );
- _the_context->sr = (_isr << 4) & 0x00f0 ;
- _the_context->pr = (unsigned32*) _entry_point ;
-}
diff --git a/cpukit/score/cpu/sh/rtems/asm.h b/cpukit/score/cpu/sh/rtems/asm.h
deleted file mode 100644
index f6fff9f40e..0000000000
--- a/cpukit/score/cpu/sh/rtems/asm.h
+++ /dev/null
@@ -1,137 +0,0 @@
-/* asm.h
- *
- * This include file attempts to address the problems
- * caused by incompatible flavors of assemblers and
- * toolsets. It primarily addresses variations in the
- * use of leading underscores on symbols and the requirement
- * that register names be preceded by a %.
- *
- * Authors: Ralf Corsepius (corsepiu@faw.uni-ulm.de) and
- * Bernd Becker (becker@faw.uni-ulm.de)
- *
- * NOTE: The spacing in the use of these macros
- * is critical to them working as advertised.
- *
- * COPYRIGHT:
- *
- * This file is based on similar code found in newlib available
- * from ftp.cygnus.com. The file which was used had no copyright
- * notice. This file is freely distributable as long as the source
- * of the file is noted. This file is:
- *
- *
- * COPYRIGHT (c) 1997-1998, FAW Ulm, Germany
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- *
- * COPYRIGHT (c) 1998.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __CPU_SH_ASM_h
-#define __CPU_SH_ASM_h
-
-/*
- * Indicate we are in an assembly file and get the basic CPU definitions.
- */
-
-#ifndef ASM
-#define ASM
-#endif
-
-#include <rtems/score/targopts.h>
-#include <rtems/score/sh.h>
-
-/*
- * Recent versions of GNU cpp define variables which indicate the
- * need for underscores and percents. If not using GNU cpp or
- * the version does not support this, then you will obviously
- * have to define these as appropriate.
- */
-
-#ifndef __USER_LABEL_PREFIX__
-#define __USER_LABEL_PREFIX__ _
-#endif
-
-#ifndef __REGISTER_PREFIX__
-#define __REGISTER_PREFIX__
-#endif
-
-/* ANSI concatenation macros. */
-
-#define CONCAT1(a, b) CONCAT2(a, b)
-#define CONCAT2(a, b) a ## b
-
-/* Use the right prefix for global labels. */
-
-#define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
-
-/* Use the right prefix for registers. */
-
-#define REG(x) CONCAT1 (__REGISTER_PREFIX__, x)
-
-/*
- * define macros for all of the registers on this CPU
- *
- * EXAMPLE: #define d0 REG (d0)
- */
-#define r0 REG (r0)
-#define r1 REG (r1)
-#define r2 REG (r2)
-#define r3 REG (r3)
-#define r4 REG (r4)
-#define r5 REG (r5)
-#define r6 REG (r6)
-#define r7 REG (r7)
-#define r8 REG (r8)
-#define r9 REG (r9)
-#define r10 REG (r10)
-#define r11 REG (r11)
-#define r12 REG (r12)
-#define r13 REG (r13)
-#define r14 REG (r14)
-#define r15 REG (r15)
-#define vbr REG (vbr)
-#define gbr REG (gbr)
-#define pr REG (pr)
-#define mach REG (mach)
-#define macl REG (macl)
-#define sr REG (sr)
-#define pc REG (pc)
-
-/*
- * Define macros to handle section beginning and ends.
- */
-
-
-#define BEGIN_CODE_DCL .text
-#define END_CODE_DCL
-#define BEGIN_DATA_DCL .data
-#define END_DATA_DCL
-#define BEGIN_CODE .text
-#define END_CODE
-#define BEGIN_DATA
-#define END_DATA
-#define BEGIN_BSS
-#define END_BSS
-#define END
-
-/*
- * Following must be tailor for a particular flavor of the C compiler.
- * They may need to put underscores in front of the symbols.
- */
-
-#define PUBLIC(sym) .global SYM (sym)
-#define EXTERN(sym) .global SYM (sym)
-
-#endif
diff --git a/cpukit/score/cpu/sh/rtems/score/cpu.h b/cpukit/score/cpu/sh/rtems/score/cpu.h
deleted file mode 100644
index dedd11c055..0000000000
--- a/cpukit/score/cpu/sh/rtems/score/cpu.h
+++ /dev/null
@@ -1,889 +0,0 @@
-/*
- * This include file contains information pertaining to the Hitachi SH
- * processor.
- *
- * Authors: Ralf Corsepius (corsepiu@faw.uni-ulm.de) and
- * Bernd Becker (becker@faw.uni-ulm.de)
- *
- * COPYRIGHT (c) 1997-1998, FAW Ulm, Germany
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- *
- * COPYRIGHT (c) 1998.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef _SH_CPU_h
-#define _SH_CPU_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/sh.h> /* pick up machine definitions */
-#ifndef ASM
-#include <rtems/score/shtypes.h>
-#endif
-
-/* conditional compilation parameters */
-
-/*
- * Should the calls to _Thread_Enable_dispatch be inlined?
- *
- * If TRUE, then they are inlined.
- * If FALSE, then a subroutine call is made.
- *
- * Basically this is an example of the classic trade-off of size
- * versus speed. Inlining the call (TRUE) typically increases the
- * size of RTEMS while speeding up the enabling of dispatching.
- * [NOTE: In general, the _Thread_Dispatch_disable_level will
- * only be 0 or 1 unless you are in an interrupt handler and that
- * interrupt handler invokes the executive.] When not inlined
- * something calls _Thread_Enable_dispatch which in turns calls
- * _Thread_Dispatch. If the enable dispatch is inlined, then
- * one subroutine call is avoided entirely.]
- */
-
-#define CPU_INLINE_ENABLE_DISPATCH FALSE
-
-/*
- * Should the body of the search loops in _Thread_queue_Enqueue_priority
- * be unrolled one time? In unrolled each iteration of the loop examines
- * two "nodes" on the chain being searched. Otherwise, only one node
- * is examined per iteration.
- *
- * If TRUE, then the loops are unrolled.
- * If FALSE, then the loops are not unrolled.
- *
- * The primary factor in making this decision is the cost of disabling
- * and enabling interrupts (_ISR_Flash) versus the cost of rest of the
- * body of the loop. On some CPUs, the flash is more expensive than
- * one iteration of the loop body. In this case, it might be desirable
- * to unroll the loop. It is important to note that on some CPUs, this
- * code is the longest interrupt disable period in RTEMS. So it is
- * necessary to strike a balance when setting this parameter.
- */
-
-#define CPU_UNROLL_ENQUEUE_PRIORITY TRUE
-
-/*
- * Does RTEMS manage a dedicated interrupt stack in software?
- *
- * If TRUE, then a stack is allocated in _Interrupt_Manager_initialization.
- * If FALSE, nothing is done.
- *
- * If the CPU supports a dedicated interrupt stack in hardware,
- * then it is generally the responsibility of the BSP to allocate it
- * and set it up.
- *
- * If the CPU does not support a dedicated interrupt stack, then
- * the porter has two options: (1) execute interrupts on the
- * stack of the interrupted task, and (2) have RTEMS manage a dedicated
- * interrupt stack.
- *
- * If this is TRUE, CPU_ALLOCATE_INTERRUPT_STACK should also be TRUE.
- *
- * Only one of CPU_HAS_SOFTWARE_INTERRUPT_STACK and
- * CPU_HAS_HARDWARE_INTERRUPT_STACK should be set to TRUE. It is
- * possible that both are FALSE for a particular CPU. Although it
- * is unclear what that would imply about the interrupt processing
- * procedure on that CPU.
- */
-
-#define CPU_HAS_SOFTWARE_INTERRUPT_STACK TRUE
-#define CPU_HAS_HARDWARE_INTERRUPT_STACK FALSE
-
-/*
- * We define the interrupt stack in the linker script
- */
-#define CPU_ALLOCATE_INTERRUPT_STACK FALSE
-
-/*
- * Does the RTEMS invoke the user's ISR with the vector number and
- * a pointer to the saved interrupt frame (1) or just the vector
- * number (0)?
- */
-
-#define CPU_ISR_PASSES_FRAME_POINTER 0
-
-/*
- * Does the CPU have hardware floating point?
- *
- * If TRUE, then the RTEMS_FLOATING_POINT task attribute is supported.
- * If FALSE, then the RTEMS_FLOATING_POINT task attribute is ignored.
- *
- * We currently support sh1 only, which has no FPU, other SHes have an FPU
- *
- * The macro name "NO_CPU_HAS_FPU" should be made CPU specific.
- * It indicates whether or not this CPU model has FP support. For
- * example, it would be possible to have an i386_nofp CPU model
- * which set this to false to indicate that you have an i386 without
- * an i387 and wish to leave floating point support out of RTEMS.
- */
-
-#define CPU_HARDWARE_FP FALSE
-
-/*
- * Are all tasks RTEMS_FLOATING_POINT tasks implicitly?
- *
- * If TRUE, then the RTEMS_FLOATING_POINT task attribute is assumed.
- * If FALSE, then the RTEMS_FLOATING_POINT task attribute is followed.
- *
- * So far, the only CPU in which this option has been used is the
- * HP PA-RISC. The HP C compiler and gcc both implicitly use the
- * floating point registers to perform integer multiplies. If
- * a function which you would not think utilize the FP unit DOES,
- * then one can not easily predict which tasks will use the FP hardware.
- * In this case, this option should be TRUE.
- *
- * If CPU_HARDWARE_FP is FALSE, then this should be FALSE as well.
- */
-
-#define CPU_ALL_TASKS_ARE_FP FALSE
-
-/*
- * Should the IDLE task have a floating point context?
- *
- * If TRUE, then the IDLE task is created as a RTEMS_FLOATING_POINT task
- * and it has a floating point context which is switched in and out.
- * If FALSE, then the IDLE task does not have a floating point context.
- *
- * Setting this to TRUE negatively impacts the time required to preempt
- * the IDLE task from an interrupt because the floating point context
- * must be saved as part of the preemption.
- */
-
-#define CPU_IDLE_TASK_IS_FP FALSE
-
-/*
- * Should the saving of the floating point registers be deferred
- * until a context switch is made to another different floating point
- * task?
- *
- * If TRUE, then the floating point context will not be stored until
- * necessary. It will remain in the floating point registers and not
- * disturned until another floating point task is switched to.
- *
- * If FALSE, then the floating point context is saved when a floating
- * point task is switched out and restored when the next floating point
- * task is restored. The state of the floating point registers between
- * those two operations is not specified.
- *
- * If the floating point context does NOT have to be saved as part of
- * interrupt dispatching, then it should be safe to set this to TRUE.
- *
- * Setting this flag to TRUE results in using a different algorithm
- * for deciding when to save and restore the floating point context.
- * The deferred FP switch algorithm minimizes the number of times
- * the FP context is saved and restored. The FP context is not saved
- * until a context switch is made to another, different FP task.
- * Thus in a system with only one FP task, the FP context will never
- * be saved or restored.
- */
-
-#define CPU_USE_DEFERRED_FP_SWITCH TRUE
-
-/*
- * Does this port provide a CPU dependent IDLE task implementation?
- *
- * If TRUE, then the routine _CPU_Thread_Idle_body
- * must be provided and is the default IDLE thread body instead of
- * _CPU_Thread_Idle_body.
- *
- * If FALSE, then use the generic IDLE thread body if the BSP does
- * not provide one.
- *
- * This is intended to allow for supporting processors which have
- * a low power or idle mode. When the IDLE thread is executed, then
- * the CPU can be powered down.
- *
- * The order of precedence for selecting the IDLE thread body is:
- *
- * 1. BSP provided
- * 2. CPU dependent (if provided)
- * 3. generic (if no BSP and no CPU dependent)
- */
-
-#define CPU_PROVIDES_IDLE_THREAD_BODY TRUE
-
-/*
- * Does the stack grow up (toward higher addresses) or down
- * (toward lower addresses)?
- *
- * If TRUE, then the grows upward.
- * If FALSE, then the grows toward smaller addresses.
- */
-
-#define CPU_STACK_GROWS_UP FALSE
-
-/*
- * The following is the variable attribute used to force alignment
- * of critical RTEMS structures. On some processors it may make
- * sense to have these aligned on tighter boundaries than
- * the minimum requirements of the compiler in order to have as
- * much of the critical data area as possible in a cache line.
- *
- * The placement of this macro in the declaration of the variables
- * is based on the syntactically requirements of the GNU C
- * "__attribute__" extension. For example with GNU C, use
- * the following to force a structures to a 32 byte boundary.
- *
- * __attribute__ ((aligned (32)))
- *
- * NOTE: Currently only the Priority Bit Map table uses this feature.
- * To benefit from using this, the data must be heavily
- * used so it will stay in the cache and used frequently enough
- * in the executive to justify turning this on.
- */
-
-#define CPU_STRUCTURE_ALIGNMENT __attribute__ ((aligned(16)))
-
-/*
- * Define what is required to specify how the network to host conversion
- * routines are handled.
- *
- * NOTE: SHes can be big or little endian, the default is big endian
- */
-
-#define CPU_HAS_OWN_HOST_TO_NETWORK_ROUTINES FALSE
-
-/* __LITTLE_ENDIAN__ is defined if -ml is given to gcc */
-#if defined(__LITTLE_ENDIAN__)
-#define CPU_BIG_ENDIAN FALSE
-#define CPU_LITTLE_ENDIAN TRUE
-#else
-#define CPU_BIG_ENDIAN TRUE
-#define CPU_LITTLE_ENDIAN FALSE
-#endif
-
-/*
- * The following defines the number of bits actually used in the
- * interrupt field of the task mode. How those bits map to the
- * CPU interrupt levels is defined by the routine _CPU_ISR_Set_level().
- */
-
-#define CPU_MODES_INTERRUPT_MASK 0x0000000f
-
-/*
- * Processor defined structures
- *
- * Examples structures include the descriptor tables from the i386
- * and the processor control structure on the i960ca.
- */
-
-/* may need to put some structures here. */
-
-/*
- * Contexts
- *
- * Generally there are 2 types of context to save.
- * 1. Interrupt registers to save
- * 2. Task level registers to save
- *
- * This means we have the following 3 context items:
- * 1. task level context stuff:: Context_Control
- * 2. floating point task stuff:: Context_Control_fp
- * 3. special interrupt level context :: Context_Control_interrupt
- *
- * On some processors, it is cost-effective to save only the callee
- * preserved registers during a task context switch. This means
- * that the ISR code needs to save those registers which do not
- * persist across function calls. It is not mandatory to make this
- * distinctions between the caller/callee saves registers for the
- * purpose of minimizing context saved during task switch and on interrupts.
- * If the cost of saving extra registers is minimal, simplicity is the
- * choice. Save the same context on interrupt entry as for tasks in
- * this case.
- *
- * Additionally, if gdb is to be made aware of RTEMS tasks for this CPU, then
- * care should be used in designing the context area.
- *
- * On some CPUs with hardware floating point support, the Context_Control_fp
- * structure will not be used or it simply consist of an array of a
- * fixed number of bytes. This is done when the floating point context
- * is dumped by a "FP save context" type instruction and the format
- * is not really defined by the CPU. In this case, there is no need
- * to figure out the exact format -- only the size. Of course, although
- * this is enough information for RTEMS, it is probably not enough for
- * a debugger such as gdb. But that is another problem.
- */
-
-typedef struct {
- unsigned32 *r15; /* stack pointer */
-
- unsigned32 macl;
- unsigned32 mach;
- unsigned32 *pr;
-
- unsigned32 *r14; /* frame pointer/call saved */
-
- unsigned32 r13; /* call saved */
- unsigned32 r12; /* call saved */
- unsigned32 r11; /* call saved */
- unsigned32 r10; /* call saved */
- unsigned32 r9; /* call saved */
- unsigned32 r8; /* call saved */
-
- unsigned32 *r7; /* arg in */
- unsigned32 *r6; /* arg in */
-
-#if 0
- unsigned32 *r5; /* arg in */
- unsigned32 *r4; /* arg in */
-#endif
-
- unsigned32 *r3; /* scratch */
- unsigned32 *r2; /* scratch */
- unsigned32 *r1; /* scratch */
-
- unsigned32 *r0; /* arg return */
-
- unsigned32 gbr;
- unsigned32 sr;
-
-} Context_Control;
-
-typedef struct {
-} Context_Control_fp;
-
-typedef struct {
-} CPU_Interrupt_frame;
-
-
-/*
- * The following table contains the information required to configure
- * the SH processor specific parameters.
- */
-
-typedef struct {
- void (*pretasking_hook)( void );
- void (*predriver_hook)( void );
- void (*postdriver_hook)( void );
- void (*idle_task)( void );
- boolean do_zero_of_workspace;
- unsigned32 idle_task_stack_size;
- unsigned32 interrupt_stack_size;
- unsigned32 extra_mpci_receive_server_stack;
- void * (*stack_allocate_hook)( unsigned32 );
- void (*stack_free_hook)( void* );
- /* end of fields required on all CPUs */
- unsigned32 clicks_per_second ; /* cpu frequency in Hz */
-} rtems_cpu_table;
-
-/*
- * Macros to access required entires in the CPU Table are in
- * the file rtems/system.h.
- */
-
-/*
- * Macros to access SH specific additions to the CPU Table
- */
-
-#define rtems_cpu_configuration_get_clicks_per_second() \
- (_CPU_Table.clicks_per_second)
-
-/*
- * This variable is optional. It is used on CPUs on which it is difficult
- * to generate an "uninitialized" FP context. It is filled in by
- * _CPU_Initialize and copied into the task's FP context area during
- * _CPU_Context_Initialize.
- */
-
-/*
-SCORE_EXTERN Context_Control_fp _CPU_Null_fp_context;
-*/
-
-/*
- * On some CPUs, RTEMS supports a software managed interrupt stack.
- * This stack is allocated by the Interrupt Manager and the switch
- * is performed in _ISR_Handler. These variables contain pointers
- * to the lowest and highest addresses in the chunk of memory allocated
- * for the interrupt stack. Since it is unknown whether the stack
- * grows up or down (in general), this give the CPU dependent
- * code the option of picking the version it wants to use.
- *
- * NOTE: These two variables are required if the macro
- * CPU_HAS_SOFTWARE_INTERRUPT_STACK is defined as TRUE.
- */
-
-SCORE_EXTERN void *_CPU_Interrupt_stack_low;
-SCORE_EXTERN void *_CPU_Interrupt_stack_high;
-
-/*
- * With some compilation systems, it is difficult if not impossible to
- * call a high-level language routine from assembly language. This
- * is especially true of commercial Ada compilers and name mangling
- * C++ ones. This variable can be optionally defined by the CPU porter
- * and contains the address of the routine _Thread_Dispatch. This
- * can make it easier to invoke that routine at the end of the interrupt
- * sequence (if a dispatch is necessary).
- */
-
-SCORE_EXTERN void (*_CPU_Thread_dispatch_pointer)();
-
-/*
- * Nothing prevents the porter from declaring more CPU specific variables.
- */
-
-/* XXX: if needed, put more variables here */
-SCORE_EXTERN void CPU_delay( unsigned32 microseconds );
-
-/*
- * The size of the floating point context area. On some CPUs this
- * will not be a "sizeof" because the format of the floating point
- * area is not defined -- only the size is. This is usually on
- * CPUs with a "floating point save context" instruction.
- */
-
-#define CPU_CONTEXT_FP_SIZE sizeof( Context_Control_fp )
-
-/*
- * Amount of extra stack (above minimum stack size) required by
- * MPCI receive server thread. Remember that in a multiprocessor
- * system this thread must exist and be able to process all directives.
- */
-
-#define CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK 0
-
-/*
- * This defines the number of entries in the ISR_Vector_table managed
- * by RTEMS.
- */
-
-#define CPU_INTERRUPT_NUMBER_OF_VECTORS 256
-#define CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER (CPU_INTERRUPT_NUMBER_OF_VECTORS - 1)
-
-/*
- * Should be large enough to run all RTEMS tests. This insures
- * that a "reasonable" small application should not have any problems.
- *
- * We have been able to run the sptests with this value, but have not
- * been able to run the tmtest suite.
- */
-
-#define CPU_STACK_MINIMUM_SIZE 4096
-
-/*
- * CPU's worst alignment requirement for data types on a byte boundary. This
- * alignment does not take into account the requirements for the stack.
- */
-
-#define CPU_ALIGNMENT 4
-
-/*
- * This number corresponds to the byte alignment requirement for the
- * heap handler. This alignment requirement may be stricter than that
- * for the data types alignment specified by CPU_ALIGNMENT. It is
- * common for the heap to follow the same alignment requirement as
- * CPU_ALIGNMENT. If the CPU_ALIGNMENT is strict enough for the heap,
- * then this should be set to CPU_ALIGNMENT.
- *
- * NOTE: This does not have to be a power of 2. It does have to
- * be greater or equal to than CPU_ALIGNMENT.
- */
-
-#define CPU_HEAP_ALIGNMENT CPU_ALIGNMENT
-
-/*
- * This number corresponds to the byte alignment requirement for memory
- * buffers allocated by the partition manager. This alignment requirement
- * may be stricter than that for the data types alignment specified by
- * CPU_ALIGNMENT. It is common for the partition to follow the same
- * alignment requirement as CPU_ALIGNMENT. If the CPU_ALIGNMENT is strict
- * enough for the partition, then this should be set to CPU_ALIGNMENT.
- *
- * NOTE: This does not have to be a power of 2. It does have to
- * be greater or equal to than CPU_ALIGNMENT.
- */
-
-#define CPU_PARTITION_ALIGNMENT CPU_ALIGNMENT
-
-/*
- * This number corresponds to the byte alignment requirement for the
- * stack. This alignment requirement may be stricter than that for the
- * data types alignment specified by CPU_ALIGNMENT. If the CPU_ALIGNMENT
- * is strict enough for the stack, then this should be set to 0.
- *
- * NOTE: This must be a power of 2 either 0 or greater than CPU_ALIGNMENT.
- */
-
-#define CPU_STACK_ALIGNMENT CPU_ALIGNMENT
-
-/* ISR handler macros */
-
-/*
- * Disable all interrupts for an RTEMS critical section. The previous
- * level is returned in _level.
- */
-
-#define _CPU_ISR_Disable( _level) \
- sh_disable_interrupts( _level )
-
-/*
- * Enable interrupts to the previous level (returned by _CPU_ISR_Disable).
- * This indicates the end of an RTEMS critical section. The parameter
- * _level is not modified.
- */
-
-#define _CPU_ISR_Enable( _level) \
- sh_enable_interrupts( _level)
-
-/*
- * This temporarily restores the interrupt to _level before immediately
- * disabling them again. This is used to divide long RTEMS critical
- * sections into two or more parts. The parameter _level is not
- * modified.
- */
-
-#define _CPU_ISR_Flash( _level) \
- sh_flash_interrupts( _level)
-
-/*
- * Map interrupt level in task mode onto the hardware that the CPU
- * actually provides. Currently, interrupt levels which do not
- * map onto the CPU in a generic fashion are undefined. Someday,
- * it would be nice if these were "mapped" by the application
- * via a callout. For example, m68k has 8 levels 0 - 7, levels
- * 8 - 255 would be available for bsp/application specific meaning.
- * This could be used to manage a programmable interrupt controller
- * via the rtems_task_mode directive.
- */
-
-#define _CPU_ISR_Set_level( _newlevel) \
- sh_set_interrupt_level(_newlevel)
-
-unsigned32 _CPU_ISR_Get_level( void );
-
-/* end of ISR handler macros */
-
-/* Context handler macros */
-
-/*
- * Initialize the context to a state suitable for starting a
- * task after a context restore operation. Generally, this
- * involves:
- *
- * - setting a starting address
- * - preparing the stack
- * - preparing the stack and frame pointers
- * - setting the proper interrupt level in the context
- * - initializing the floating point context
- *
- * This routine generally does not set any unnecessary register
- * in the context. The state of the "general data" registers is
- * undefined at task start time.
- *
- * NOTE: This is_fp parameter is TRUE if the thread is to be a floating
- * point thread. This is typically only used on CPUs where the
- * FPU may be easily disabled by software such as on the SPARC
- * where the PSR contains an enable FPU bit.
- */
-
-/*
- * FIXME: defined as a function for debugging - should be a macro
- */
-SCORE_EXTERN void _CPU_Context_Initialize(
- Context_Control *_the_context,
- void *_stack_base,
- unsigned32 _size,
- unsigned32 _isr,
- void (*_entry_point)(void),
- int _is_fp );
-
-/*
- * This routine is responsible for somehow restarting the currently
- * executing task. If you are lucky, then all that is necessary
- * is restoring the context. Otherwise, there will need to be
- * a special assembly routine which does something special in this
- * case. Context_Restore should work most of the time. It will
- * not work if restarting self conflicts with the stack frame
- * assumptions of restoring a context.
- */
-
-#define _CPU_Context_Restart_self( _the_context ) \
- _CPU_Context_restore( (_the_context) );
-
-/*
- * The purpose of this macro is to allow the initial pointer into
- * a floating point context area (used to save the floating point
- * context) to be at an arbitrary place in the floating point
- * context area.
- *
- * This is necessary because some FP units are designed to have
- * their context saved as a stack which grows into lower addresses.
- * Other FP units can be saved by simply moving registers into offsets
- * from the base of the context area. Finally some FP units provide
- * a "dump context" instruction which could fill in from high to low
- * or low to high based on the whim of the CPU designers.
- */
-
-#define _CPU_Context_Fp_start( _base, _offset ) \
- ( (void *) _Addresses_Add_offset( (_base), (_offset) ) )
-
-/*
- * This routine initializes the FP context area passed to it to.
- * There are a few standard ways in which to initialize the
- * floating point context. The code included for this macro assumes
- * that this is a CPU in which a "initial" FP context was saved into
- * _CPU_Null_fp_context and it simply copies it to the destination
- * context passed to it.
- *
- * Other models include (1) not doing anything, and (2) putting
- * a "null FP status word" in the correct place in the FP context.
- * SH1, SH2, SH3 have no FPU, but the SH3e and SH4 have.
- */
-
-#define _CPU_Context_Initialize_fp( _destination ) \
- { }
-
-/* end of Context handler macros */
-
-/* Fatal Error manager macros */
-
-/*
- * FIXME: Trap32 ???
- *
- * This routine copies _error into a known place -- typically a stack
- * location or a register, optionally disables interrupts, and
- * invokes a Trap32 Instruction which returns to the breakpoint
- * routine of cmon.
- */
-
-#ifdef BSP_FATAL_HALT
- /* we manage the fatal error in the board support package */
- void bsp_fatal_halt( unsigned32 _error);
-#define _CPU_Fatal_halt( _error ) bsp_fatal_halt( _error)
-#else
-#define _CPU_Fatal_halt( _error)\
-{ \
- asm volatile("mov.l %0,r0"::"m" (_error)); \
- asm volatile("trapa #34"); \
-}
-#endif
-
-/* end of Fatal Error manager macros */
-
-/* Bitfield handler macros */
-
-/*
- * This routine sets _output to the bit number of the first bit
- * set in _value. _value is of CPU dependent type Priority_Bit_map_control.
- * This type may be either 16 or 32 bits wide although only the 16
- * least significant bits will be used.
- *
- * There are a number of variables in using a "find first bit" type
- * instruction.
- *
- * (1) What happens when run on a value of zero?
- * (2) Bits may be numbered from MSB to LSB or vice-versa.
- * (3) The numbering may be zero or one based.
- * (4) The "find first bit" instruction may search from MSB or LSB.
- *
- * RTEMS guarantees that (1) will never happen so it is not a concern.
- * (2),(3), (4) are handled by the macros _CPU_Priority_mask() and
- * _CPU_Priority_bits_index(). These three form a set of routines
- * which must logically operate together. Bits in the _value are
- * set and cleared based on masks built by _CPU_Priority_mask().
- * The basic major and minor values calculated by _Priority_Major()
- * and _Priority_Minor() are "massaged" by _CPU_Priority_bits_index()
- * to properly range between the values returned by the "find first bit"
- * instruction. This makes it possible for _Priority_Get_highest() to
- * calculate the major and directly index into the minor table.
- * This mapping is necessary to ensure that 0 (a high priority major/minor)
- * is the first bit found.
- *
- * This entire "find first bit" and mapping process depends heavily
- * on the manner in which a priority is broken into a major and minor
- * components with the major being the 4 MSB of a priority and minor
- * the 4 LSB. Thus (0 << 4) + 0 corresponds to priority 0 -- the highest
- * priority. And (15 << 4) + 14 corresponds to priority 254 -- the next
- * to the lowest priority.
- *
- * If your CPU does not have a "find first bit" instruction, then
- * there are ways to make do without it. Here are a handful of ways
- * to implement this in software:
- *
- * - a series of 16 bit test instructions
- * - a "binary search using if's"
- * - _number = 0
- * if _value > 0x00ff
- * _value >>=8
- * _number = 8;
- *
- * if _value > 0x0000f
- * _value >=8
- * _number += 4
- *
- * _number += bit_set_table[ _value ]
- *
- * where bit_set_table[ 16 ] has values which indicate the first
- * bit set
- */
-
-#define CPU_USE_GENERIC_BITFIELD_CODE TRUE
-#define CPU_USE_GENERIC_BITFIELD_DATA TRUE
-
-#if (CPU_USE_GENERIC_BITFIELD_CODE == FALSE)
-
-extern unsigned8 _bit_set_table[];
-
-#define _CPU_Bitfield_Find_first_bit( _value, _output ) \
- { \
- _output = 0;\
- if(_value > 0x00ff) \
- { _value >>= 8; _output = 8; } \
- if(_value > 0x000f) \
- { _output += 4; _value >>= 4; } \
- _output += _bit_set_table[ _value]; }
-
-#endif
-
-/* end of Bitfield handler macros */
-
-/*
- * This routine builds the mask which corresponds to the bit fields
- * as searched by _CPU_Bitfield_Find_first_bit(). See the discussion
- * for that routine.
- */
-
-#if (CPU_USE_GENERIC_BITFIELD_CODE == FALSE)
-
-#define _CPU_Priority_Mask( _bit_number ) \
- ( 1 << (_bit_number) )
-
-#endif
-
-/*
- * This routine translates the bit numbers returned by
- * _CPU_Bitfield_Find_first_bit() into something suitable for use as
- * a major or minor component of a priority. See the discussion
- * for that routine.
- */
-
-#if (CPU_USE_GENERIC_BITFIELD_CODE == FALSE)
-
-#define _CPU_Priority_bits_index( _priority ) \
- (_priority)
-
-#endif
-
-/* end of Priority handler macros */
-
-/* functions */
-
-/*
- * _CPU_Initialize
- *
- * This routine performs CPU dependent initialization.
- */
-
-void _CPU_Initialize(
- rtems_cpu_table *cpu_table,
- void (*thread_dispatch)
-);
-
-/*
- * _CPU_ISR_install_raw_handler
- *
- * This routine installs a "raw" interrupt handler directly into the
- * processor's vector table.
- */
-
-void _CPU_ISR_install_raw_handler(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-);
-
-/*
- * _CPU_ISR_install_vector
- *
- * This routine installs an interrupt vector.
- */
-
-void _CPU_ISR_install_vector(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-);
-
-/*
- * _CPU_Install_interrupt_stack
- *
- * This routine installs the hardware interrupt stack pointer.
- *
- * NOTE: It needs only be provided if CPU_HAS_HARDWARE_INTERRUPT_STACK
- * is TRUE.
- */
-
-void _CPU_Install_interrupt_stack( void );
-
-/*
- * _CPU_Thread_Idle_body
- *
- * This routine is the CPU dependent IDLE thread body.
- *
- * NOTE: It need only be provided if CPU_PROVIDES_IDLE_THREAD_BODY
- * is TRUE.
- */
-
-void _CPU_Thread_Idle_body( void );
-
-/*
- * _CPU_Context_switch
- *
- * This routine switches from the run context to the heir context.
- */
-
-void _CPU_Context_switch(
- Context_Control *run,
- Context_Control *heir
-);
-
-/*
- * _CPU_Context_restore
- *
- * This routine is generally used only to restart self in an
- * efficient manner. It may simply be a label in _CPU_Context_switch.
- */
-
-void _CPU_Context_restore(
- Context_Control *new_context
-);
-
-/*
- * _CPU_Context_save_fp
- *
- * This routine saves the floating point context passed to it.
- */
-
-void _CPU_Context_save_fp(
- void **fp_context_ptr
-);
-
-/*
- * _CPU_Context_restore_fp
- *
- * This routine restores the floating point context passed to it.
- */
-
-void _CPU_Context_restore_fp(
- void **fp_context_ptr
-);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/cpukit/score/cpu/sh/rtems/score/sh.h b/cpukit/score/cpu/sh/rtems/score/sh.h
deleted file mode 100644
index 4417e6a99d..0000000000
--- a/cpukit/score/cpu/sh/rtems/score/sh.h
+++ /dev/null
@@ -1,165 +0,0 @@
-/* sh.h
- *
- * This include file contains information pertaining to the Hitachi SH
- * processor.
- *
- * Authors: Ralf Corsepius (corsepiu@faw.uni-ulm.de) and
- * Bernd Becker (becker@faw.uni-ulm.de)
- *
- * COPYRIGHT (c) 1997-1998, FAW Ulm, Germany
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
- *
- *
- * COPYRIGHT (c) 1998.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef _sh_h
-#define _sh_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This file contains the information required to build
- * RTEMS for a particular member of the "SH" family.
- *
- * It does this by setting variables to indicate which implementation
- * dependent features are present in a particular member of the family.
- */
-
-#if defined(sh7032)
-#define CPU_MODEL_NAME "SH7032"
-#define SH_HAS_FPU 0
-
-#elif defined (sh7045)
-#define CPU_MODEL_NAME "SH7045"
-#define SH_HAS_FPU 0
-
-#else
-#error "Unsupported CPU Model"
-
-#endif
-
-/*
- * If the following macro is set to 0 there will be no software irq stack
- */
-
-#ifndef SH_HAS_SEPARATE_STACKS
-#define SH_HAS_SEPARATE_STACKS 1
-#endif
-
-/*
- * Define the name of the CPU family.
- */
-
-#define CPU_NAME "Hitachi SH"
-
-#ifndef ASM
-
-/*
- * Mask for disabling interrupts
- */
-#define SH_IRQDIS_VALUE 0xf0
-
-#define sh_disable_interrupts( _level ) \
- asm volatile ( \
- "stc sr,%0\n\t" \
- "ldc %1,sr\n\t"\
- : "=&r" (_level ) \
- : "r" (SH_IRQDIS_VALUE) );
-
-#define sh_enable_interrupts( _level ) \
- asm volatile( "ldc %0,sr\n\t" \
- "nop\n\t" \
- :: "r" (_level) );
-
-/*
- * This temporarily restores the interrupt to _level before immediately
- * disabling them again. This is used to divide long RTEMS critical
- * sections into two or more parts. The parameter _level is not
- * modified.
- */
-
-#define sh_flash_interrupts( _level ) \
- asm volatile( \
- "ldc %1,sr\n\t" \
- "nop\n\t" \
- "ldc %0,sr\n\t" \
- "nop\n\t" \
- : : "r" (SH_IRQDIS_VALUE), "r" (_level) );
-
-#define sh_get_interrupt_level( _level ) \
-{ \
- register unsigned32 _tmpsr ; \
- \
- asm volatile( "stc sr, %0" : "=r" (_tmpsr) ); \
- _level = (_tmpsr & 0xf0) >> 4 ; \
-}
-
-#define sh_set_interrupt_level( _newlevel ) \
-{ \
- register unsigned32 _tmpsr; \
- \
- asm volatile ( "stc sr, %0" : "=r" (_tmpsr) ); \
- _tmpsr = ( _tmpsr & ~0xf0 ) | ((_newlevel) << 4) ; \
- asm volatile( "ldc %0,sr" :: "r" (_tmpsr) ); \
-}
-
-/*
- * The following routine swaps the endian format of an unsigned int.
- * It must be static because it is referenced indirectly.
- */
-
-static inline unsigned int sh_swap_u32(
- unsigned int value
-)
-{
- register unsigned int swapped;
-
- asm volatile (
- "swap.b %1,%0; "
- "swap.w %0,%0; "
- "swap.b %0,%0"
- : "=r" (swapped)
- : "r" (value) );
-
- return( swapped );
-}
-
-static inline unsigned int sh_swap_u16(
- unsigned int value
-)
-{
- register unsigned int swapped ;
-
- asm volatile ( "swap.b %1,%0" : "=r" (swapped) : "r" (value) );
-
- return( swapped );
-}
-
-#define CPU_swap_u32( value ) sh_swap_u32( value )
-#define CPU_swap_u16( value ) sh_swap_u16( value )
-
-extern unsigned int sh_set_irq_priority(
- unsigned int irq,
- unsigned int prio );
-
-#endif /* !ASM */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/cpukit/score/cpu/sh/rtems/score/sh_io.h b/cpukit/score/cpu/sh/rtems/score/sh_io.h
deleted file mode 100644
index 2a9111e307..0000000000
--- a/cpukit/score/cpu/sh/rtems/score/sh_io.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * These are some macros to access memory mapped devices
- * on the SH7000-architecture.
- *
- * Inspired from the linux kernel's include/asm/io.h
- *
- * Authors: Ralf Corsepius (corsepiu@faw.uni-ulm.de) and
- * Bernd Becker (becker@faw.uni-ulm.de)
- *
- * COPYRIGHT (c) 1996-1998, FAW Ulm, Germany
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- *
- * COPYRIGHT (c) 1998.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef _asm_io_h
-#define _asm_io_h
-
-#define readb(addr) (*(volatile unsigned char *) (addr))
-#define readw(addr) (*(volatile unsigned short *) (addr))
-#define readl(addr) (*(volatile unsigned int *) (addr))
-#define read8(addr) (*(volatile unsigned8 *) (addr))
-#define read16(addr) (*(volatile unsigned16 *) (addr))
-#define read32(addr) (*(volatile unsigned32 *) (addr))
-
-#define writeb(b,addr) ((*(volatile unsigned char *) (addr)) = (b))
-#define writew(b,addr) ((*(volatile unsigned short *) (addr)) = (b))
-#define writel(b,addr) ((*(volatile unsigned int *) (addr)) = (b))
-#define write8(b,addr) ((*(volatile unsigned8 *) (addr)) = (b))
-#define write16(b,addr) ((*(volatile unsigned16 *) (addr)) = (b))
-#define write32(b,addr) ((*(volatile unsigned32 *) (addr)) = (b))
-
-#define inb(addr) readb(addr)
-#define outb(b,addr) writeb(b,addr)
-
-#endif
diff --git a/cpukit/score/cpu/sh/rtems/score/types.h b/cpukit/score/cpu/sh/rtems/score/types.h
deleted file mode 100644
index 853479c13b..0000000000
--- a/cpukit/score/cpu/sh/rtems/score/types.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * This include file contains information pertaining to the Hitachi SH
- * processor.
- *
- * Authors: Ralf Corsepius (corsepiu@faw.uni-ulm.de) and
- * Bernd Becker (becker@faw.uni-ulm.de)
- *
- * COPYRIGHT (c) 1997-1998, FAW Ulm, Germany
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- *
- * COPYRIGHT (c) 1998.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __CPU_SH_TYPES_h
-#define __CPU_SH_TYPES_h
-
-#ifndef ASM
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This section defines the basic types for this processor.
- */
-
-typedef unsigned char unsigned8; /* unsigned 8-bit integer */
-typedef unsigned short unsigned16; /* unsigned 16-bit integer */
-typedef unsigned int unsigned32; /* unsigned 32-bit integer */
-typedef unsigned long long unsigned64; /* unsigned 64-bit integer */
-
-typedef unsigned16 Priority_Bit_map_control;
-
-typedef signed char signed8; /* 8-bit signed integer */
-typedef signed short signed16; /* 16-bit signed integer */
-typedef signed int signed32; /* 32-bit signed integer */
-typedef signed long long signed64; /* 64 bit signed integer */
-
-typedef unsigned16 boolean; /* Boolean value, external */
- /* data bus has 16 bits */
-
-typedef float single_precision; /* single precision float */
-typedef double double_precision; /* double precision float */
-
-typedef void sh_isr;
-typedef void ( *sh_isr_entry )( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !ASM */
-
-#endif
-
diff --git a/cpukit/score/cpu/sparc/Makefile.am b/cpukit/score/cpu/sparc/Makefile.am
deleted file mode 100644
index 6ae4472920..0000000000
--- a/cpukit/score/cpu/sparc/Makefile.am
+++ /dev/null
@@ -1,48 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-
-SUBDIRS = rtems
-
-C_FILES = cpu.c
-C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
-
-H_FILES = asm.h erc32.h
-
-S_FILES = cpu_asm.S
-S_O_FILES = $(S_FILES:%.S=$(ARCH)/%.o)
-
-REL = $(ARCH)/rtems-cpu.rel
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../../../../automake/lib.am
-
-rtems_cpu_rel_OBJECTS = $(C_O_FILES) $(S_O_FILES)
-
-$(PROJECT_INCLUDE):
- $(mkinstalldirs) $@
-
-$(PROJECT_INCLUDE)/%.h: %.h
- $(INSTALL_DATA) $< $@
-
-$(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o: $(ARCH)/rtems.o
- $(INSTALL_DATA) $< $@
-
-$(REL): $(rtems_cpu_rel_OBJECTS)
- $(make-rel)
-
-PREINSTALL_FILES += $(PROJECT_INCLUDE) $(H_FILES:%=$(PROJECT_INCLUDE)/%)
-
-TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o
-
-all-local: $(ARCH) $(PREINSTALL_FILES) $(rtems_cpu_rel_OBJECTS) $(REL) $(TMPINSTALL_FILES)
-
-.PRECIOUS: $(REL)
-
-EXTRA_DIST = asm.h cpu.c cpu_asm.S erc32.h rtems.S
-
-include $(top_srcdir)/../../../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/cpukit/score/cpu/sparc/README b/cpukit/score/cpu/sparc/README
deleted file mode 100644
index c4c2200075..0000000000
--- a/cpukit/score/cpu/sparc/README
+++ /dev/null
@@ -1,110 +0,0 @@
-#
-# $Id$
-#
-
-This file discusses SPARC specific issues which are important to
-this port. The primary topics in this file are:
-
- + Global Register Usage
- + Stack Frame
- + EF bit in the PSR
-
-
-Global Register Usage
-=====================
-
-This information on register usage is based heavily on a comment in the
-file gcc-2.7.0/config/sparc/sparc.h in the the gcc 2.7.0 source.
-
- + g0 is hardwired to 0
- + On non-v9 systems:
- - g1 is free to use as temporary.
- - g2-g4 are reserved for applications. Gcc normally uses them as
- temporaries, but this can be disabled via the -mno-app-regs option.
- - g5 through g7 are reserved for the operating system.
- + On v9 systems:
- - g1 and g5 are free to use as temporaries.
- - g2-g4 are reserved for applications (the compiler will not normally use
- them, but they can be used as temporaries with -mapp-regs).
- - g6-g7 are reserved for the operating system.
-
- NOTE: As of gcc 2.7.0 register g1 was used in the following scenarios:
-
- + as a temporary by the 64 bit sethi pattern
- + when restoring call-preserved registers in large stack frames
-
-RTEMS places no constraints on the usage of the global registers. Although
-gcc assumes that either g5-g7 (non-V9) or g6-g7 (V9) are reserved for the
-operating system, RTEMS does not assume any special use for them.
-
-
-
-Stack Frame
-===========
-
-The stack grows downward (i.e. to lower addresses) on the SPARC architecture.
-
-The following is the organization of the stack frame:
-
-
-
- | ............... |
- fp | |
- +-------------------------------+
- | |
- | Local registers, temporaries, |
- | and saved floats | x bytes
- | |
- sp + x +-------------------------------+
- | |
- | outgoing parameters past |
- | the sixth one | x bytes
- | |
- sp + 92 +-------------------------------+ *
- | | *
- | area for callee to save | *
- | register arguments | * 24 bytes
- | | *
- sp + 68 +-------------------------------+ *
- | | *
- | structure return pointer | * 4 bytes
- | | *
- sp + 64 +-------------------------------+ *
- | | *
- | local register set | * 32 bytes
- | | *
- sp + 32 +-------------------------------+ *
- | | *
- | input register set | * 32 bytes
- | | *
- sp +-------------------------------+ *
-
-
-* = minimal stack frame
-
-x = optional components
-
-EF bit in the PSR
-=================
-
-The EF (enable floating point unit) in the PSR is utilized in this port to
-prevent non-floating point tasks from performing floating point
-operations. This bit is maintained as part of the integer context.
-However, the floating point context is switched BEFORE the integer
-context. Thus the EF bit in place at the time of the FP switch may
-indicate that FP operations are disabled. This occurs on certain task
-switches, when the EF bit will be 0 for the outgoing task and thus a fault
-will be generated on the first FP operation of the FP context save.
-
-The remedy for this is to enable FP access as the first step in both the
-save and restore of the FP context area. This bit will be subsequently
-reloaded by the integer context switch.
-
-Two of the scenarios which demonstrate this problem are outlined below:
-
-1. When the first FP task is switched to. The system tasks are not FP and
-thus would be unable to restore the FP context of the incoming task.
-
-2. On a deferred FP context switch. In this case, the system might switch
-from FP Task A to non-FP Task B and then to FP Task C. In this scenario,
-the floating point state must technically be saved by a non-FP task.
diff --git a/cpukit/score/cpu/sparc/asm.h b/cpukit/score/cpu/sparc/asm.h
deleted file mode 100644
index cdb906af58..0000000000
--- a/cpukit/score/cpu/sparc/asm.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/* asm.h
- *
- * This include file attempts to address the problems
- * caused by incompatible flavors of assemblers and
- * toolsets. It primarily addresses variations in the
- * use of leading underscores on symbols and the requirement
- * that register names be preceded by a %.
- *
- *
- * NOTE: The spacing in the use of these macros
- * is critical to them working as advertised.
- *
- * COPYRIGHT:
- *
- * This file is based on similar code found in newlib available
- * from ftp.cygnus.com. The file which was used had no copyright
- * notice. This file is freely distributable as long as the source
- * of the file is noted.
- *
- * $Id$
- */
-
-#ifndef __SPARC_ASM_h
-#define __SPARC_ASM_h
-
-/*
- * Indicate we are in an assembly file and get the basic CPU definitions.
- */
-
-#ifndef ASM
-#define ASM
-#endif
-
-#include <rtems/score/targopts.h>
-#include <rtems/score/cpu.h>
-
-/*
- * Recent versions of GNU cpp define variables which indicate the
- * need for underscores and percents. If not using GNU cpp or
- * the version does not support this, then you will obviously
- * have to define these as appropriate.
- */
-
-/* XXX __USER_LABEL_PREFIX__ and __REGISTER_PREFIX__ do not work on gcc 2.7.0 */
-/* XXX The following ifdef magic fixes the problem but results in a warning */
-/* XXX when compiling assembly code. */
-
-#ifndef __USER_LABEL_PREFIX__
-#define __USER_LABEL_PREFIX__ _
-#endif
-
-#ifndef __REGISTER_PREFIX__
-#define __REGISTER_PREFIX__
-#endif
-
-/* ANSI concatenation macros. */
-
-#define CONCAT1(a, b) CONCAT2(a, b)
-#define CONCAT2(a, b) a ## b
-
-/* Use the right prefix for global labels. */
-
-#define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
-
-/* Use the right prefix for registers. */
-
-#define REG(x) CONCAT1 (__REGISTER_PREFIX__, x)
-
-/*
- * define macros for all of the registers on this CPU
- *
- * EXAMPLE: #define d0 REG (d0)
- */
-
-/*
- * Define macros to handle section beginning and ends.
- */
-
-
-#define BEGIN_CODE_DCL .text
-#define END_CODE_DCL
-#define BEGIN_DATA_DCL .data
-#define END_DATA_DCL
-#define BEGIN_CODE .text
-#define END_CODE
-#define BEGIN_DATA
-#define END_DATA
-#define BEGIN_BSS
-#define END_BSS
-#define END
-
-/*
- * Following must be tailor for a particular flavor of the C compiler.
- * They may need to put underscores in front of the symbols.
- */
-
-#define PUBLIC(sym) .globl SYM (sym)
-#define EXTERN(sym) .globl SYM (sym)
-
-/*
- * Entry for traps which jump to a programmer-specified trap handler.
- */
-
-#define TRAP(_vector, _handler) \
- mov %psr, %l0 ; \
- sethi %hi(_handler), %l4 ; \
- jmp %l4+%lo(_handler); \
- mov _vector, %l3
-
-/*
- * Used for the reset trap for ERC32 to avoid a supervisor instruction
- */
-
-#define RTRAP(_vector, _handler) \
- mov %g0, %l0 ; \
- sethi %hi(_handler), %l4 ; \
- jmp %l4+%lo(_handler); \
- mov _vector, %l3
-
-#endif
-/* end of include file */
-
-
diff --git a/cpukit/score/cpu/sparc/cpu.c b/cpukit/score/cpu/sparc/cpu.c
deleted file mode 100644
index 9a78a0fc96..0000000000
--- a/cpukit/score/cpu/sparc/cpu.c
+++ /dev/null
@@ -1,408 +0,0 @@
-/*
- * SPARC Dependent Source
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * Ported to ERC32 implementation of the SPARC by On-Line Applications
- * Research Corporation (OAR) under contract to the European Space
- * Agency (ESA).
- *
- * ERC32 modifications of respective RTEMS file: COPYRIGHT (c) 1995.
- * European Space Agency.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-
-#if defined(erc32)
-#include <erc32.h>
-#endif
-
-/*
- * This initializes the set of opcodes placed in each trap
- * table entry. The routine which installs a handler is responsible
- * for filling in the fields for the _handler address and the _vector
- * trap type.
- *
- * The constants following this structure are masks for the fields which
- * must be filled in when the handler is installed.
- */
-
-const CPU_Trap_table_entry _CPU_Trap_slot_template = {
- 0xa1480000, /* mov %psr, %l0 */
- 0x29000000, /* sethi %hi(_handler), %l4 */
- 0x81c52000, /* jmp %l4 + %lo(_handler) */
- 0xa6102000 /* mov _vector, %l3 */
-};
-
-/*PAGE
- *
- * _CPU_Initialize
- *
- * This routine performs processor dependent initialization.
- *
- * Input Parameters:
- * cpu_table - CPU table to initialize
- * thread_dispatch - address of disptaching routine
- *
- * Output Parameters: NONE
- *
- * NOTE: There is no need to save the pointer to the thread dispatch routine.
- * The SPARC's assembly code can reference it directly with no problems.
- */
-
-void _CPU_Initialize(
- rtems_cpu_table *cpu_table,
- void (*thread_dispatch) /* ignored on this CPU */
-)
-{
- void *pointer;
-
-#ifndef NO_TABLE_MOVE
- unsigned32 trap_table_start;
- unsigned32 tbr_value;
- CPU_Trap_table_entry *old_tbr;
- CPU_Trap_table_entry *trap_table;
-
- /*
- * Install the executive's trap table. All entries from the original
- * trap table are copied into the executive's trap table. This is essential
- * since this preserves critical trap handlers such as the window underflow
- * and overflow handlers. It is the responsibility of the BSP to provide
- * install these in the initial trap table.
- */
-
-
- trap_table_start = (unsigned32) &_CPU_Trap_Table_area;
- if (trap_table_start & (SPARC_TRAP_TABLE_ALIGNMENT-1))
- trap_table_start = (trap_table_start + SPARC_TRAP_TABLE_ALIGNMENT) &
- ~(SPARC_TRAP_TABLE_ALIGNMENT-1);
-
- trap_table = (CPU_Trap_table_entry *) trap_table_start;
-
- sparc_get_tbr( tbr_value );
-
- old_tbr = (CPU_Trap_table_entry *) (tbr_value & 0xfffff000);
-
- memcpy( trap_table, (void *) old_tbr, 256 * sizeof( CPU_Trap_table_entry ) );
-
- sparc_set_tbr( trap_table_start );
-
-#endif
-
- /*
- * This seems to be the most appropriate way to obtain an initial
- * FP context on the SPARC. The NULL fp context is copied it to
- * the task's FP context during Context_Initialize.
- */
-
- pointer = &_CPU_Null_fp_context;
- _CPU_Context_save_fp( &pointer );
-
- /*
- * Grab our own copy of the user's CPU table.
- */
-
- _CPU_Table = *cpu_table;
-
-#if defined(erc32)
-
- /*
- * ERC32 specific initialization
- */
-
- _ERC32_MEC_Timer_Control_Mirror = 0;
- ERC32_MEC.Timer_Control = 0;
-
- ERC32_MEC.Control |= ERC32_CONFIGURATION_POWER_DOWN_ALLOWED;
-
-#endif
-
-}
-
-/*PAGE
- *
- * _CPU_ISR_Get_level
- *
- * Input Parameters: NONE
- *
- * Output Parameters:
- * returns the current interrupt level (PIL field of the PSR)
- */
-
-unsigned32 _CPU_ISR_Get_level( void )
-{
- unsigned32 level;
-
- sparc_get_interrupt_level( level );
-
- return level;
-}
-
-/*PAGE
- *
- * _CPU_ISR_install_raw_handler
- *
- * This routine installs the specified handler as a "raw" non-executive
- * supported trap handler (a.k.a. interrupt service routine).
- *
- * Input Parameters:
- * vector - trap table entry number plus synchronous
- * vs. asynchronous information
- * new_handler - address of the handler to be installed
- * old_handler - pointer to an address of the handler previously installed
- *
- * Output Parameters: NONE
- * *new_handler - address of the handler previously installed
- *
- * NOTE:
- *
- * On the SPARC, there are really only 256 vectors. However, the executive
- * has no easy, fast, reliable way to determine which traps are synchronous
- * and which are asynchronous. By default, synchronous traps return to the
- * instruction which caused the interrupt. So if you install a software
- * trap handler as an executive interrupt handler (which is desirable since
- * RTEMS takes care of window and register issues), then the executive needs
- * to know that the return address is to the trap rather than the instruction
- * following the trap.
- *
- * So vectors 0 through 255 are treated as regular asynchronous traps which
- * provide the "correct" return address. Vectors 256 through 512 are assumed
- * by the executive to be synchronous and to require that the return address
- * be fudged.
- *
- * If you use this mechanism to install a trap handler which must reexecute
- * the instruction which caused the trap, then it should be installed as
- * an asynchronous trap. This will avoid the executive changing the return
- * address.
- */
-
-void _CPU_ISR_install_raw_handler(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-)
-{
- unsigned32 real_vector;
- CPU_Trap_table_entry *tbr;
- CPU_Trap_table_entry *slot;
- unsigned32 u32_tbr;
- unsigned32 u32_handler;
-
- /*
- * Get the "real" trap number for this vector ignoring the synchronous
- * versus asynchronous indicator included with our vector numbers.
- */
-
- real_vector = SPARC_REAL_TRAP_NUMBER( vector );
-
- /*
- * Get the current base address of the trap table and calculate a pointer
- * to the slot we are interested in.
- */
-
- sparc_get_tbr( u32_tbr );
-
- u32_tbr &= 0xfffff000;
-
- tbr = (CPU_Trap_table_entry *) u32_tbr;
-
- slot = &tbr[ real_vector ];
-
- /*
- * Get the address of the old_handler from the trap table.
- *
- * NOTE: The old_handler returned will be bogus if it does not follow
- * the RTEMS model.
- */
-
-#define HIGH_BITS_MASK 0xFFFFFC00
-#define HIGH_BITS_SHIFT 10
-#define LOW_BITS_MASK 0x000003FF
-
- if ( slot->mov_psr_l0 == _CPU_Trap_slot_template.mov_psr_l0 ) {
- u32_handler =
- ((slot->sethi_of_handler_to_l4 & HIGH_BITS_MASK) << HIGH_BITS_SHIFT) |
- (slot->jmp_to_low_of_handler_plus_l4 & LOW_BITS_MASK);
- *old_handler = (proc_ptr) u32_handler;
- } else
- *old_handler = 0;
-
- /*
- * Copy the template to the slot and then fix it.
- */
-
- *slot = _CPU_Trap_slot_template;
-
- u32_handler = (unsigned32) new_handler;
-
- slot->mov_vector_l3 |= vector;
- slot->sethi_of_handler_to_l4 |=
- (u32_handler & HIGH_BITS_MASK) >> HIGH_BITS_SHIFT;
- slot->jmp_to_low_of_handler_plus_l4 |= (u32_handler & LOW_BITS_MASK);
-}
-
-/*PAGE
- *
- * _CPU_ISR_install_vector
- *
- * This kernel routine installs the RTEMS handler for the
- * specified vector.
- *
- * Input parameters:
- * vector - interrupt vector number
- * new_handler - replacement ISR for this vector number
- * old_handler - pointer to former ISR for this vector number
- *
- * Output parameters:
- * *old_handler - former ISR for this vector number
- *
- */
-
-void _CPU_ISR_install_vector(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-)
-{
- unsigned32 real_vector;
- proc_ptr ignored;
-
- /*
- * Get the "real" trap number for this vector ignoring the synchronous
- * versus asynchronous indicator included with our vector numbers.
- */
-
- real_vector = SPARC_REAL_TRAP_NUMBER( vector );
-
- /*
- * Return the previous ISR handler.
- */
-
- *old_handler = _ISR_Vector_table[ real_vector ];
-
- /*
- * Install the wrapper so this ISR can be invoked properly.
- */
-
- _CPU_ISR_install_raw_handler( vector, _ISR_Handler, &ignored );
-
- /*
- * We put the actual user ISR address in '_ISR_vector_table'. This will
- * be used by the _ISR_Handler so the user gets control.
- */
-
- _ISR_Vector_table[ real_vector ] = new_handler;
-}
-
-/*PAGE
- *
- * _CPU_Context_Initialize
- *
- * This kernel routine initializes the basic non-FP context area associated
- * with each thread.
- *
- * Input parameters:
- * the_context - pointer to the context area
- * stack_base - address of memory for the SPARC
- * size - size in bytes of the stack area
- * new_level - interrupt level for this context area
- * entry_point - the starting execution point for this this context
- * is_fp - TRUE if this context is associated with an FP thread
- *
- * Output parameters: NONE
- */
-
-void _CPU_Context_Initialize(
- Context_Control *the_context,
- unsigned32 *stack_base,
- unsigned32 size,
- unsigned32 new_level,
- void *entry_point,
- boolean is_fp
-)
-{
- unsigned32 stack_high; /* highest "stack aligned" address */
- unsigned32 the_size;
- unsigned32 tmp_psr;
-
- /*
- * On CPUs with stacks which grow down (i.e. SPARC), we build the stack
- * based on the stack_high address.
- */
-
- stack_high = ((unsigned32)(stack_base) + size);
- stack_high &= ~(CPU_STACK_ALIGNMENT - 1);
-
- the_size = size & ~(CPU_STACK_ALIGNMENT - 1);
-
- /*
- * See the README in this directory for a diagram of the stack.
- */
-
- the_context->o7 = ((unsigned32) entry_point) - 8;
- the_context->o6_sp = stack_high - CPU_MINIMUM_STACK_FRAME_SIZE;
- the_context->i6_fp = stack_high;
-
- /*
- * Build the PSR for the task. Most everything can be 0 and the
- * CWP is corrected during the context switch.
- *
- * The EF bit determines if the floating point unit is available.
- * The FPU is ONLY enabled if the context is associated with an FP task
- * and this SPARC model has an FPU.
- */
-
- sparc_get_psr( tmp_psr );
- tmp_psr &= ~SPARC_PSR_PIL_MASK;
- tmp_psr |= (new_level << 8) & SPARC_PSR_PIL_MASK;
- tmp_psr &= ~SPARC_PSR_EF_MASK; /* disabled by default */
-
-#if (SPARC_HAS_FPU == 1)
- /*
- * If this bit is not set, then a task gets a fault when it accesses
- * a floating point register. This is a nice way to detect floating
- * point tasks which are not currently declared as such.
- */
-
- if ( is_fp )
- tmp_psr |= SPARC_PSR_EF_MASK;
-#endif
- the_context->psr = tmp_psr;
-}
-
-/*PAGE
- *
- * _CPU_Thread_Idle_body
- *
- * Some SPARC implementations have low power, sleep, or idle modes. This
- * tries to take advantage of those models.
- */
-
-#if (CPU_PROVIDES_IDLE_THREAD_BODY == TRUE)
-
-/*
- * This is the implementation for the erc32.
- *
- * NOTE: Low power mode was enabled at initialization time.
- */
-
-#if defined(erc32)
-
-void _CPU_Thread_Idle_body( void )
-{
- while (1) {
- ERC32_MEC.Power_Down = 0; /* value is irrelevant */
- }
-}
-
-#endif
-
-#endif /* CPU_PROVIDES_IDLE_THREAD_BODY */
diff --git a/cpukit/score/cpu/sparc/cpu_asm.S b/cpukit/score/cpu/sparc/cpu_asm.S
deleted file mode 100644
index af7df160ef..0000000000
--- a/cpukit/score/cpu/sparc/cpu_asm.S
+++ /dev/null
@@ -1,795 +0,0 @@
-/* cpu_asm.s
- *
- * This file contains the basic algorithms for all assembly code used
- * in an specific CPU port of RTEMS. These algorithms must be implemented
- * in assembly language.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * Ported to ERC32 implementation of the SPARC by On-Line Applications
- * Research Corporation (OAR) under contract to the European Space
- * Agency (ESA).
- *
- * ERC32 modifications of respective RTEMS file: COPYRIGHT (c) 1995.
- * European Space Agency.
- *
- * $Id$
- */
-
-#include <asm.h>
-
-#if (SPARC_HAS_FPU == 1)
-
-/*
- * void _CPU_Context_save_fp(
- * void **fp_context_ptr
- * )
- *
- * This routine is responsible for saving the FP context
- * at *fp_context_ptr. If the point to load the FP context
- * from is changed then the pointer is modified by this routine.
- *
- * NOTE: See the README in this directory for information on the
- * management of the "EF" bit in the PSR.
- */
-
- .align 4
- PUBLIC(_CPU_Context_save_fp)
-SYM(_CPU_Context_save_fp):
- save %sp, -CPU_MINIMUM_STACK_FRAME_SIZE, %sp
-
- /*
- * The following enables the floating point unit.
- */
-
- mov %psr, %l0
- sethi %hi(SPARC_PSR_EF_MASK), %l1
- or %l1, %lo(SPARC_PSR_EF_MASK), %l1
- or %l0, %l1, %l0
- mov %l0, %psr ! **** ENABLE FLOAT ACCESS ****
-
- ld [%i0], %l0
- std %f0, [%l0 + FO_F1_OFFSET]
- std %f2, [%l0 + F2_F3_OFFSET]
- std %f4, [%l0 + F4_F5_OFFSET]
- std %f6, [%l0 + F6_F7_OFFSET]
- std %f8, [%l0 + F8_F9_OFFSET]
- std %f10, [%l0 + F1O_F11_OFFSET]
- std %f12, [%l0 + F12_F13_OFFSET]
- std %f14, [%l0 + F14_F15_OFFSET]
- std %f16, [%l0 + F16_F17_OFFSET]
- std %f18, [%l0 + F18_F19_OFFSET]
- std %f20, [%l0 + F2O_F21_OFFSET]
- std %f22, [%l0 + F22_F23_OFFSET]
- std %f24, [%l0 + F24_F25_OFFSET]
- std %f26, [%l0 + F26_F27_OFFSET]
- std %f28, [%l0 + F28_F29_OFFSET]
- std %f30, [%l0 + F3O_F31_OFFSET]
- st %fsr, [%l0 + FSR_OFFSET]
- ret
- restore
-
-/*
- * void _CPU_Context_restore_fp(
- * void **fp_context_ptr
- * )
- *
- * This routine is responsible for restoring the FP context
- * at *fp_context_ptr. If the point to load the FP context
- * from is changed then the pointer is modified by this routine.
- *
- * NOTE: See the README in this directory for information on the
- * management of the "EF" bit in the PSR.
- */
-
- .align 4
- PUBLIC(_CPU_Context_restore_fp)
-SYM(_CPU_Context_restore_fp):
- save %sp, -CPU_MINIMUM_STACK_FRAME_SIZE , %sp
-
- /*
- * The following enables the floating point unit.
- */
-
- mov %psr, %l0
- sethi %hi(SPARC_PSR_EF_MASK), %l1
- or %l1, %lo(SPARC_PSR_EF_MASK), %l1
- or %l0, %l1, %l0
- mov %l0, %psr ! **** ENABLE FLOAT ACCESS ****
-
- ld [%i0], %l0
- ldd [%l0 + FO_F1_OFFSET], %f0
- ldd [%l0 + F2_F3_OFFSET], %f2
- ldd [%l0 + F4_F5_OFFSET], %f4
- ldd [%l0 + F6_F7_OFFSET], %f6
- ldd [%l0 + F8_F9_OFFSET], %f8
- ldd [%l0 + F1O_F11_OFFSET], %f10
- ldd [%l0 + F12_F13_OFFSET], %f12
- ldd [%l0 + F14_F15_OFFSET], %f14
- ldd [%l0 + F16_F17_OFFSET], %f16
- ldd [%l0 + F18_F19_OFFSET], %f18
- ldd [%l0 + F2O_F21_OFFSET], %f20
- ldd [%l0 + F22_F23_OFFSET], %f22
- ldd [%l0 + F24_F25_OFFSET], %f24
- ldd [%l0 + F26_F27_OFFSET], %f26
- ldd [%l0 + F28_F29_OFFSET], %f28
- ldd [%l0 + F3O_F31_OFFSET], %f30
- ld [%l0 + FSR_OFFSET], %fsr
- ret
- restore
-
-#endif /* SPARC_HAS_FPU */
-
-/*
- * void _CPU_Context_switch(
- * Context_Control *run,
- * Context_Control *heir
- * )
- *
- * This routine performs a normal non-FP context switch.
- */
-
- .align 4
- PUBLIC(_CPU_Context_switch)
-SYM(_CPU_Context_switch):
- ! skip g0
- st %g1, [%o0 + G1_OFFSET] ! save the global registers
- std %g2, [%o0 + G2_OFFSET]
- std %g4, [%o0 + G4_OFFSET]
- std %g6, [%o0 + G6_OFFSET]
-
- std %l0, [%o0 + L0_OFFSET] ! save the local registers
- std %l2, [%o0 + L2_OFFSET]
- std %l4, [%o0 + L4_OFFSET]
- std %l6, [%o0 + L6_OFFSET]
-
- std %i0, [%o0 + I0_OFFSET] ! save the input registers
- std %i2, [%o0 + I2_OFFSET]
- std %i4, [%o0 + I4_OFFSET]
- std %i6, [%o0 + I6_FP_OFFSET]
-
- std %o0, [%o0 + O0_OFFSET] ! save the output registers
- std %o2, [%o0 + O2_OFFSET]
- std %o4, [%o0 + O4_OFFSET]
- std %o6, [%o0 + O6_SP_OFFSET]
-
- rd %psr, %o2
- st %o2, [%o0 + PSR_OFFSET] ! save status register
-
- /*
- * This is entered from _CPU_Context_restore with:
- * o1 = context to restore
- * o2 = psr
- */
-
- PUBLIC(_CPU_Context_restore_heir)
-SYM(_CPU_Context_restore_heir):
- /*
- * Flush all windows with valid contents except the current one.
- * In examining the set register windows, one may logically divide
- * the windows into sets (some of which may be empty) based on their
- * current status:
- *
- * + current (i.e. in use),
- * + used (i.e. a restore would not trap)
- * + invalid (i.e. 1 in corresponding bit in WIM)
- * + unused
- *
- * Either the used or unused set of windows may be empty.
- *
- * NOTE: We assume only one bit is set in the WIM at a time.
- *
- * Given a CWP of 5 and a WIM of 0x1, the registers are divided
- * into sets as follows:
- *
- * + 0 - invalid
- * + 1-4 - unused
- * + 5 - current
- * + 6-7 - used
- *
- * In this case, we only would save the used windows -- 6 and 7.
- *
- * Traps are disabled for the same logical period as in a
- * flush all windows trap handler.
- *
- * Register Usage while saving the windows:
- * g1 = current PSR
- * g2 = current wim
- * g3 = CWP
- * g4 = wim scratch
- * g5 = scratch
- */
-
- ld [%o1 + PSR_OFFSET], %g1 ! g1 = saved psr
-
- and %o2, SPARC_PSR_CWP_MASK, %g3 ! g3 = CWP
- ! g1 = psr w/o cwp
- andn %g1, SPARC_PSR_ET_MASK | SPARC_PSR_CWP_MASK, %g1
- or %g1, %g3, %g1 ! g1 = heirs psr
- mov %g1, %psr ! restore status register and
- ! **** DISABLE TRAPS ****
- mov %wim, %g2 ! g2 = wim
- mov 1, %g4
- sll %g4, %g3, %g4 ! g4 = WIM mask for CW invalid
-
-save_frame_loop:
- sll %g4, 1, %g5 ! rotate the "wim" left 1
- srl %g4, SPARC_NUMBER_OF_REGISTER_WINDOWS - 1, %g4
- or %g4, %g5, %g4 ! g4 = wim if we do one restore
-
- /*
- * If a restore would not underflow, then continue.
- */
-
- andcc %g4, %g2, %g0 ! Any windows to flush?
- bnz done_flushing ! No, then continue
- nop
-
- restore ! back one window
-
- /*
- * Now save the window just as if we overflowed to it.
- */
-
- std %l0, [%sp + CPU_STACK_FRAME_L0_OFFSET]
- std %l2, [%sp + CPU_STACK_FRAME_L2_OFFSET]
- std %l4, [%sp + CPU_STACK_FRAME_L4_OFFSET]
- std %l6, [%sp + CPU_STACK_FRAME_L6_OFFSET]
-
- std %i0, [%sp + CPU_STACK_FRAME_I0_OFFSET]
- std %i2, [%sp + CPU_STACK_FRAME_I2_OFFSET]
- std %i4, [%sp + CPU_STACK_FRAME_I4_OFFSET]
- std %i6, [%sp + CPU_STACK_FRAME_I6_FP_OFFSET]
-
- ba save_frame_loop
- nop
-
-done_flushing:
-
- add %g3, 1, %g3 ! calculate desired WIM
- and %g3, SPARC_NUMBER_OF_REGISTER_WINDOWS - 1, %g3
- mov 1, %g4
- sll %g4, %g3, %g4 ! g4 = new WIM
- mov %g4, %wim
-
- or %g1, SPARC_PSR_ET_MASK, %g1
- mov %g1, %psr ! **** ENABLE TRAPS ****
- ! and restore CWP
- nop
- nop
- nop
-
- ! skip g0
- ld [%o1 + G1_OFFSET], %g1 ! restore the global registers
- ldd [%o1 + G2_OFFSET], %g2
- ldd [%o1 + G4_OFFSET], %g4
- ldd [%o1 + G6_OFFSET], %g6
-
- ldd [%o1 + L0_OFFSET], %l0 ! restore the local registers
- ldd [%o1 + L2_OFFSET], %l2
- ldd [%o1 + L4_OFFSET], %l4
- ldd [%o1 + L6_OFFSET], %l6
-
- ldd [%o1 + I0_OFFSET], %i0 ! restore the output registers
- ldd [%o1 + I2_OFFSET], %i2
- ldd [%o1 + I4_OFFSET], %i4
- ldd [%o1 + I6_FP_OFFSET], %i6
-
- ldd [%o1 + O2_OFFSET], %o2 ! restore the output registers
- ldd [%o1 + O4_OFFSET], %o4
- ldd [%o1 + O6_SP_OFFSET], %o6
- ! do o0/o1 last to avoid destroying heir context pointer
- ldd [%o1 + O0_OFFSET], %o0 ! overwrite heir pointer
-
- jmp %o7 + 8 ! return
- nop ! delay slot
-
-/*
- * void _CPU_Context_restore(
- * Context_Control *new_context
- * )
- *
- * This routine is generally used only to perform restart self.
- *
- * NOTE: It is unnecessary to reload some registers.
- */
-
- .align 4
- PUBLIC(_CPU_Context_restore)
-SYM(_CPU_Context_restore):
- save %sp, -CPU_MINIMUM_STACK_FRAME_SIZE, %sp
- rd %psr, %o2
- ba SYM(_CPU_Context_restore_heir)
- mov %i0, %o1 ! in the delay slot
-
-/*
- * void _ISR_Handler()
- *
- * This routine provides the RTEMS interrupt management.
- *
- * We enter this handler from the 4 instructions in the trap table with
- * the following registers assumed to be set as shown:
- *
- * l0 = PSR
- * l1 = PC
- * l2 = nPC
- * l3 = trap type
- *
- * NOTE: By an executive defined convention, trap type is between 0 and 255 if
- * it is an asynchonous trap and 256 and 511 if it is synchronous.
- */
-
- .align 4
- PUBLIC(_ISR_Handler)
-SYM(_ISR_Handler):
- /*
- * Fix the return address for synchronous traps.
- */
-
- andcc %l3, SPARC_SYNCHRONOUS_TRAP_BIT_MASK, %g0
- ! Is this a synchronous trap?
- be,a win_ovflow ! No, then skip the adjustment
- nop ! DELAY
- mov %l1, %l6 ! save trapped pc for debug info
- mov %l2, %l1 ! do not return to the instruction
- add %l2, 4, %l2 ! indicated
-
-win_ovflow:
- /*
- * Save the globals this block uses.
- *
- * These registers are not restored from the locals. Their contents
- * are saved directly from the locals into the ISF below.
- */
-
- mov %g4, %l4 ! save the globals this block uses
- mov %g5, %l5
-
- /*
- * When at a "window overflow" trap, (wim == (1 << cwp)).
- * If we get here like that, then process a window overflow.
- */
-
- rd %wim, %g4
- srl %g4, %l0, %g5 ! g5 = win >> cwp ; shift count and CWP
- ! are LS 5 bits ; how convenient :)
- cmp %g5, 1 ! Is this an invalid window?
- bne dont_do_the_window ! No, then skip all this stuff
- ! we are using the delay slot
-
- /*
- * The following is same as a 1 position right rotate of WIM
- */
-
- srl %g4, 1, %g5 ! g5 = WIM >> 1
- sll %g4, SPARC_NUMBER_OF_REGISTER_WINDOWS-1 , %g4
- ! g4 = WIM << (Number Windows - 1)
- or %g4, %g5, %g4 ! g4 = (WIM >> 1) |
- ! (WIM << (Number Windows - 1))
-
- /*
- * At this point:
- *
- * g4 = the new WIM
- * g5 is free
- */
-
- /*
- * Since we are tinkering with the register windows, we need to
- * make sure that all the required information is in global registers.
- */
-
- save ! Save into the window
- wr %g4, 0, %wim ! WIM = new WIM
- nop ! delay slots
- nop
- nop
-
- /*
- * Now save the window just as if we overflowed to it.
- */
-
- std %l0, [%sp + CPU_STACK_FRAME_L0_OFFSET]
- std %l2, [%sp + CPU_STACK_FRAME_L2_OFFSET]
- std %l4, [%sp + CPU_STACK_FRAME_L4_OFFSET]
- std %l6, [%sp + CPU_STACK_FRAME_L6_OFFSET]
-
- std %i0, [%sp + CPU_STACK_FRAME_I0_OFFSET]
- std %i2, [%sp + CPU_STACK_FRAME_I2_OFFSET]
- std %i4, [%sp + CPU_STACK_FRAME_I4_OFFSET]
- std %i6, [%sp + CPU_STACK_FRAME_I6_FP_OFFSET]
-
- restore
- nop
-
-dont_do_the_window:
- /*
- * Global registers %g4 and %g5 are saved directly from %l4 and
- * %l5 directly into the ISF below.
- */
-
-save_isf:
-
- /*
- * Save the state of the interrupted task -- especially the global
- * registers -- in the Interrupt Stack Frame. Note that the ISF
- * includes a regular minimum stack frame which will be used if
- * needed by register window overflow and underflow handlers.
- *
- * REGISTERS SAME AS AT _ISR_Handler
- */
-
- sub %fp, CONTEXT_CONTROL_INTERRUPT_FRAME_SIZE, %sp
- ! make space for ISF
-
- std %l0, [%sp + ISF_PSR_OFFSET] ! save psr, PC
- st %l2, [%sp + ISF_NPC_OFFSET] ! save nPC
- st %g1, [%sp + ISF_G1_OFFSET] ! save g1
- std %g2, [%sp + ISF_G2_OFFSET] ! save g2, g3
- std %l4, [%sp + ISF_G4_OFFSET] ! save g4, g5 -- see above
- std %g6, [%sp + ISF_G6_OFFSET] ! save g6, g7
-
- std %i0, [%sp + ISF_I0_OFFSET] ! save i0, i1
- std %i2, [%sp + ISF_I2_OFFSET] ! save i2, i3
- std %i4, [%sp + ISF_I4_OFFSET] ! save i4, i5
- std %i6, [%sp + ISF_I6_FP_OFFSET] ! save i6/fp, i7
-
- rd %y, %g1
- st %g1, [%sp + ISF_Y_OFFSET] ! save y
- st %l6, [%sp + ISF_TPC_OFFSET] ! save real trapped pc
-
- mov %sp, %o1 ! 2nd arg to ISR Handler
-
- /*
- * Increment ISR nest level and Thread dispatch disable level.
- *
- * Register usage for this section:
- *
- * l4 = _Thread_Dispatch_disable_level pointer
- * l5 = _ISR_Nest_level pointer
- * l6 = _Thread_Dispatch_disable_level value
- * l7 = _ISR_Nest_level value
- *
- * NOTE: It is assumed that l4 - l7 will be preserved until the ISR
- * nest and thread dispatch disable levels are unnested.
- */
-
- sethi %hi(SYM(_Thread_Dispatch_disable_level)), %l4
- ld [%l4 + %lo(SYM(_Thread_Dispatch_disable_level))], %l6
- sethi %hi(SYM(_ISR_Nest_level)), %l5
- ld [%l5 + %lo(SYM(_ISR_Nest_level))], %l7
-
- add %l6, 1, %l6
- st %l6, [%l4 + %lo(SYM(_Thread_Dispatch_disable_level))]
-
- add %l7, 1, %l7
- st %l7, [%l5 + %lo(SYM(_ISR_Nest_level))]
-
- /*
- * If ISR nest level was zero (now 1), then switch stack.
- */
-
- mov %sp, %fp
- subcc %l7, 1, %l7 ! outermost interrupt handler?
- bnz dont_switch_stacks ! No, then do not switch stacks
-
- sethi %hi(SYM(_CPU_Interrupt_stack_high)), %g4
- ld [%g4 + %lo(SYM(_CPU_Interrupt_stack_high))], %sp
-
-dont_switch_stacks:
- /*
- * Make sure we have a place on the stack for the window overflow
- * trap handler to write into. At this point it is safe to
- * enable traps again.
- */
-
- sub %sp, CPU_MINIMUM_STACK_FRAME_SIZE, %sp
-
- /*
- * Check if we have an external interrupt (trap 0x11 - 0x1f). If so,
- * set the PIL in the %psr to mask off interrupts with lower priority.
- * The original %psr in %l0 is not modified since it will be restored
- * when the interrupt handler returns.
- */
-
-/* This is a fix for ERC32 with FPU rev.B or rev.C */
-
-#if defined(FPU_REVB)
-
-
- mov %l0, %g5
- and %l3, 0x0ff, %g4
- subcc %g4, 0x08, %g0
- be fpu_revb
- subcc %g4, 0x11, %g0
- bl dont_fix_pil
- subcc %g4, 0x1f, %g0
- bg dont_fix_pil
- sll %g4, 8, %g4
- and %g4, SPARC_PSR_PIL_MASK, %g4
- andn %l0, SPARC_PSR_PIL_MASK, %g5
- or %g4, %g5, %g5
- srl %l0, 12, %g4
- andcc %g4, 1, %g0
- be dont_fix_pil
- nop
- ba,a enable_irq
-
-
-fpu_revb:
- srl %l0, 12, %g4 ! check if EF is set in %psr
- andcc %g4, 1, %g0
- be dont_fix_pil ! if FPU disabled than continue as normal
- and %l3, 0xff, %g4
- subcc %g4, 0x08, %g0
- bne enable_irq ! if not a FPU exception then do two fmovs
- set __sparc_fq, %g4
- st %fsr, [%g4] ! if FQ is not empty and FQ[1] = fmovs
- ld [%g4], %g4 ! than this is bug 3.14
- srl %g4, 13, %g4
- andcc %g4, 1, %g0
- be dont_fix_pil
- set __sparc_fq, %g4
- std %fq, [%g4]
- ld [%g4+4], %g4
- set 0x81a00020, %g5
- subcc %g4, %g5, %g0
- bne,a dont_fix_pil2
- wr %l0, SPARC_PSR_ET_MASK, %psr ! **** ENABLE TRAPS ****
- ba,a simple_return
-
-enable_irq:
- or %g5, SPARC_PSR_PIL_MASK, %g4
- wr %g4, SPARC_PSR_ET_MASK, %psr ! **** ENABLE TRAPS ****
- nop; nop; nop
- fmovs %f0, %f0
- ba dont_fix_pil
- fmovs %f0, %f0
-
- .data
- .global __sparc_fq
- .align 8
-__sparc_fq:
- .word 0,0
-
- .text
-/* end of ERC32 FPU rev.B/C fix */
-
-#else
-
- mov %l0, %g5
- subcc %g4, 0x11, %g0
- bl dont_fix_pil
- subcc %g4, 0x1f, %g0
- bg dont_fix_pil
- sll %g4, 8, %g4
- and %g4, SPARC_PSR_PIL_MASK, %g4
- andn %l0, SPARC_PSR_PIL_MASK, %g5
- or %g4, %g5, %g5
-#endif
-
-dont_fix_pil:
- wr %g5, SPARC_PSR_ET_MASK, %psr ! **** ENABLE TRAPS ****
-dont_fix_pil2:
-
- /*
- * Vector to user's handler.
- *
- * NOTE: TBR may no longer have vector number in it since
- * we just enabled traps. It is definitely in l3.
- */
-
- sethi %hi(SYM(_ISR_Vector_table)), %g4
- or %g4, %lo(SYM(_ISR_Vector_table)), %g4
- and %l3, 0xFF, %g5 ! remove synchronous trap indicator
- sll %g5, 2, %g5 ! g5 = offset into table
- ld [%g4 + %g5], %g4 ! g4 = _ISR_Vector_table[ vector ]
-
-
- ! o1 = 2nd arg = address of the ISF
- ! WAS LOADED WHEN ISF WAS SAVED!!!
- mov %l3, %o0 ! o0 = 1st arg = vector number
- call %g4, 0
- nop ! delay slot
-
- /*
- * Redisable traps so we can finish up the interrupt processing.
- * This is a VERY conservative place to do this.
- *
- * NOTE: %l0 has the PSR which was in place when we took the trap.
- */
-
- mov %l0, %psr ! **** DISABLE TRAPS ****
-
- /*
- * Decrement ISR nest level and Thread dispatch disable level.
- *
- * Register usage for this section:
- *
- * l4 = _Thread_Dispatch_disable_level pointer
- * l5 = _ISR_Nest_level pointer
- * l6 = _Thread_Dispatch_disable_level value
- * l7 = _ISR_Nest_level value
- */
-
- sub %l6, 1, %l6
- st %l6, [%l4 + %lo(SYM(_Thread_Dispatch_disable_level))]
-
- st %l7, [%l5 + %lo(SYM(_ISR_Nest_level))]
-
- /*
- * If dispatching is disabled (includes nested interrupt case),
- * then do a "simple" exit.
- */
-
- orcc %l6, %g0, %g0 ! Is dispatching disabled?
- bnz simple_return ! Yes, then do a "simple" exit
- nop ! delay slot
-
- /*
- * If a context switch is necessary, then do fudge stack to
- * return to the interrupt dispatcher.
- */
-
- sethi %hi(SYM(_Context_Switch_necessary)), %l4
- ld [%l4 + %lo(SYM(_Context_Switch_necessary))], %l5
-
- orcc %l5, %g0, %g0 ! Is thread switch necessary?
- bnz SYM(_ISR_Dispatch) ! yes, then invoke the dispatcher
- nop ! delay slot
-
- /*
- * Finally, check to see if signals were sent to the currently
- * executing task. If so, we need to invoke the interrupt dispatcher.
- */
-
- sethi %hi(SYM(_ISR_Signals_to_thread_executing)), %l6
- ld [%l6 + %lo(SYM(_ISR_Signals_to_thread_executing))], %l7
-
- orcc %l7, %g0, %g0 ! Were signals sent to the currently
- ! executing thread?
- bz simple_return ! yes, then invoke the dispatcher
- ! use the delay slot to clear the signals
- ! to the currently executing task flag
- st %g0, [%l6 + %lo(SYM(_ISR_Signals_to_thread_executing))]
-
-
- /*
- * Invoke interrupt dispatcher.
- */
-
- PUBLIC(_ISR_Dispatch)
-SYM(_ISR_Dispatch):
-
- /*
- * The following subtract should get us back on the interrupted
- * tasks stack and add enough room to invoke the dispatcher.
- * When we enable traps, we are mostly back in the context
- * of the task and subsequent interrupts can operate normally.
- */
-
- sub %fp, CPU_MINIMUM_STACK_FRAME_SIZE, %sp
-
- or %l0, SPARC_PSR_ET_MASK, %l7 ! l7 = PSR with ET=1
- mov %l7, %psr ! **** ENABLE TRAPS ****
- nop
- nop
- nop
-
- call SYM(_Thread_Dispatch), 0
- nop
-
- /*
- * The CWP in place at this point may be different from
- * that which was in effect at the beginning of the ISR if we
- * have been context switched between the beginning of this invocation
- * of _ISR_Handler and this point. Thus the CWP and WIM should
- * not be changed back to their values at ISR entry time. Any
- * changes to the PSR must preserve the CWP.
- */
-
-simple_return:
- ld [%fp + ISF_Y_OFFSET], %l5 ! restore y
- wr %l5, 0, %y
-
- ldd [%fp + ISF_PSR_OFFSET], %l0 ! restore psr, PC
- ld [%fp + ISF_NPC_OFFSET], %l2 ! restore nPC
- rd %psr, %l3
- and %l3, SPARC_PSR_CWP_MASK, %l3 ! want "current" CWP
- andn %l0, SPARC_PSR_CWP_MASK, %l0 ! want rest from task
- or %l3, %l0, %l0 ! install it later...
- andn %l0, SPARC_PSR_ET_MASK, %l0
-
- /*
- * Restore tasks global and out registers
- */
-
- mov %fp, %g1
-
- ! g1 is restored later
- ldd [%fp + ISF_G2_OFFSET], %g2 ! restore g2, g3
- ldd [%fp + ISF_G4_OFFSET], %g4 ! restore g4, g5
- ldd [%fp + ISF_G6_OFFSET], %g6 ! restore g6, g7
-
- ldd [%fp + ISF_I0_OFFSET], %i0 ! restore i0, i1
- ldd [%fp + ISF_I2_OFFSET], %i2 ! restore i2, i3
- ldd [%fp + ISF_I4_OFFSET], %i4 ! restore i4, i5
- ldd [%fp + ISF_I6_FP_OFFSET], %i6 ! restore i6/fp, i7
-
- /*
- * Registers:
- *
- * ALL global registers EXCEPT G1 and the input registers have
- * already been restored and thuse off limits.
- *
- * The following is the contents of the local registers:
- *
- * l0 = original psr
- * l1 = return address (i.e. PC)
- * l2 = nPC
- * l3 = CWP
- */
-
- /*
- * if (CWP + 1) is an invalid window then we need to reload it.
- *
- * WARNING: Traps should now be disabled
- */
-
- mov %l0, %psr ! **** DISABLE TRAPS ****
- nop
- nop
- nop
- rd %wim, %l4
- add %l0, 1, %l6 ! l6 = cwp + 1
- and %l6, SPARC_PSR_CWP_MASK, %l6 ! do the modulo on it
- srl %l4, %l6, %l5 ! l5 = win >> cwp + 1 ; shift count
- ! and CWP are conveniently LS 5 bits
- cmp %l5, 1 ! Is tasks window invalid?
- bne good_task_window
-
- /*
- * The following code is the same as a 1 position left rotate of WIM.
- */
-
- sll %l4, 1, %l5 ! l5 = WIM << 1
- srl %l4, SPARC_NUMBER_OF_REGISTER_WINDOWS-1 , %l4
- ! l4 = WIM >> (Number Windows - 1)
- or %l4, %l5, %l4 ! l4 = (WIM << 1) |
- ! (WIM >> (Number Windows - 1))
-
- /*
- * Now restore the window just as if we underflowed to it.
- */
-
- wr %l4, 0, %wim ! WIM = new WIM
- nop ! must delay after writing WIM
- nop
- nop
- restore ! now into the tasks window
-
- ldd [%g1 + CPU_STACK_FRAME_L0_OFFSET], %l0
- ldd [%g1 + CPU_STACK_FRAME_L2_OFFSET], %l2
- ldd [%g1 + CPU_STACK_FRAME_L4_OFFSET], %l4
- ldd [%g1 + CPU_STACK_FRAME_L6_OFFSET], %l6
- ldd [%g1 + CPU_STACK_FRAME_I0_OFFSET], %i0
- ldd [%g1 + CPU_STACK_FRAME_I2_OFFSET], %i2
- ldd [%g1 + CPU_STACK_FRAME_I4_OFFSET], %i4
- ldd [%g1 + CPU_STACK_FRAME_I6_FP_OFFSET], %i6
- ! reload of sp clobbers ISF
- save ! Back to ISR dispatch window
-
-good_task_window:
-
- mov %l0, %psr ! **** DISABLE TRAPS ****
- ! and restore condition codes.
- ld [%g1 + ISF_G1_OFFSET], %g1 ! restore g1
- jmp %l1 ! transfer control and
- rett %l2 ! go back to tasks window
-
-/* end of file */
diff --git a/cpukit/score/cpu/sparc/rtems/asm.h b/cpukit/score/cpu/sparc/rtems/asm.h
deleted file mode 100644
index cdb906af58..0000000000
--- a/cpukit/score/cpu/sparc/rtems/asm.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/* asm.h
- *
- * This include file attempts to address the problems
- * caused by incompatible flavors of assemblers and
- * toolsets. It primarily addresses variations in the
- * use of leading underscores on symbols and the requirement
- * that register names be preceded by a %.
- *
- *
- * NOTE: The spacing in the use of these macros
- * is critical to them working as advertised.
- *
- * COPYRIGHT:
- *
- * This file is based on similar code found in newlib available
- * from ftp.cygnus.com. The file which was used had no copyright
- * notice. This file is freely distributable as long as the source
- * of the file is noted.
- *
- * $Id$
- */
-
-#ifndef __SPARC_ASM_h
-#define __SPARC_ASM_h
-
-/*
- * Indicate we are in an assembly file and get the basic CPU definitions.
- */
-
-#ifndef ASM
-#define ASM
-#endif
-
-#include <rtems/score/targopts.h>
-#include <rtems/score/cpu.h>
-
-/*
- * Recent versions of GNU cpp define variables which indicate the
- * need for underscores and percents. If not using GNU cpp or
- * the version does not support this, then you will obviously
- * have to define these as appropriate.
- */
-
-/* XXX __USER_LABEL_PREFIX__ and __REGISTER_PREFIX__ do not work on gcc 2.7.0 */
-/* XXX The following ifdef magic fixes the problem but results in a warning */
-/* XXX when compiling assembly code. */
-
-#ifndef __USER_LABEL_PREFIX__
-#define __USER_LABEL_PREFIX__ _
-#endif
-
-#ifndef __REGISTER_PREFIX__
-#define __REGISTER_PREFIX__
-#endif
-
-/* ANSI concatenation macros. */
-
-#define CONCAT1(a, b) CONCAT2(a, b)
-#define CONCAT2(a, b) a ## b
-
-/* Use the right prefix for global labels. */
-
-#define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
-
-/* Use the right prefix for registers. */
-
-#define REG(x) CONCAT1 (__REGISTER_PREFIX__, x)
-
-/*
- * define macros for all of the registers on this CPU
- *
- * EXAMPLE: #define d0 REG (d0)
- */
-
-/*
- * Define macros to handle section beginning and ends.
- */
-
-
-#define BEGIN_CODE_DCL .text
-#define END_CODE_DCL
-#define BEGIN_DATA_DCL .data
-#define END_DATA_DCL
-#define BEGIN_CODE .text
-#define END_CODE
-#define BEGIN_DATA
-#define END_DATA
-#define BEGIN_BSS
-#define END_BSS
-#define END
-
-/*
- * Following must be tailor for a particular flavor of the C compiler.
- * They may need to put underscores in front of the symbols.
- */
-
-#define PUBLIC(sym) .globl SYM (sym)
-#define EXTERN(sym) .globl SYM (sym)
-
-/*
- * Entry for traps which jump to a programmer-specified trap handler.
- */
-
-#define TRAP(_vector, _handler) \
- mov %psr, %l0 ; \
- sethi %hi(_handler), %l4 ; \
- jmp %l4+%lo(_handler); \
- mov _vector, %l3
-
-/*
- * Used for the reset trap for ERC32 to avoid a supervisor instruction
- */
-
-#define RTRAP(_vector, _handler) \
- mov %g0, %l0 ; \
- sethi %hi(_handler), %l4 ; \
- jmp %l4+%lo(_handler); \
- mov _vector, %l3
-
-#endif
-/* end of include file */
-
-
diff --git a/cpukit/score/cpu/sparc/rtems/score/cpu.h b/cpukit/score/cpu/sparc/rtems/score/cpu.h
deleted file mode 100644
index fe482d4a7c..0000000000
--- a/cpukit/score/cpu/sparc/rtems/score/cpu.h
+++ /dev/null
@@ -1,1027 +0,0 @@
-/* cpu.h
- *
- * This include file contains information pertaining to the port of
- * the executive to the SPARC processor.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * Ported to ERC32 implementation of the SPARC by On-Line Applications
- * Research Corporation (OAR) under contract to the European Space
- * Agency (ESA).
- *
- * ERC32 modifications of respective RTEMS file: COPYRIGHT (c) 1995.
- * European Space Agency.
- *
- * $Id$
- */
-
-#ifndef __CPU_h
-#define __CPU_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/sparc.h> /* pick up machine definitions */
-#ifndef ASM
-#include <rtems/score/sparctypes.h>
-#endif
-
-/* conditional compilation parameters */
-
-/*
- * Should the calls to _Thread_Enable_dispatch be inlined?
- *
- * If TRUE, then they are inlined.
- * If FALSE, then a subroutine call is made.
- */
-
-#define CPU_INLINE_ENABLE_DISPATCH TRUE
-
-/*
- * Should the body of the search loops in _Thread_queue_Enqueue_priority
- * be unrolled one time? In unrolled each iteration of the loop examines
- * two "nodes" on the chain being searched. Otherwise, only one node
- * is examined per iteration.
- *
- * If TRUE, then the loops are unrolled.
- * If FALSE, then the loops are not unrolled.
- *
- * This parameter could go either way on the SPARC. The interrupt flash
- * code is relatively lengthy given the requirements for nops following
- * writes to the psr. But if the clock speed were high enough, this would
- * not represent a great deal of time.
- */
-
-#define CPU_UNROLL_ENQUEUE_PRIORITY TRUE
-
-/*
- * Does the executive manage a dedicated interrupt stack in software?
- *
- * If TRUE, then a stack is allocated in _Interrupt_Manager_initialization.
- * If FALSE, nothing is done.
- *
- * The SPARC does not have a dedicated HW interrupt stack and one has
- * been implemented in SW.
- */
-
-#define CPU_HAS_SOFTWARE_INTERRUPT_STACK TRUE
-
-/*
- * Does this CPU have hardware support for a dedicated interrupt stack?
- *
- * If TRUE, then it must be installed during initialization.
- * If FALSE, then no installation is performed.
- *
- * The SPARC does not have a dedicated HW interrupt stack.
- */
-
-#define CPU_HAS_HARDWARE_INTERRUPT_STACK FALSE
-
-/*
- * Do we allocate a dedicated interrupt stack in the Interrupt Manager?
- *
- * If TRUE, then the memory is allocated during initialization.
- * If FALSE, then the memory is allocated during initialization.
- */
-
-#define CPU_ALLOCATE_INTERRUPT_STACK TRUE
-
-/*
- * Does the RTEMS invoke the user's ISR with the vector number and
- * a pointer to the saved interrupt frame (1) or just the vector
- * number (0)?
- */
-
-#define CPU_ISR_PASSES_FRAME_POINTER 0
-
-/*
- * Does the CPU have hardware floating point?
- *
- * If TRUE, then the FLOATING_POINT task attribute is supported.
- * If FALSE, then the FLOATING_POINT task attribute is ignored.
- */
-
-#if ( SPARC_HAS_FPU == 1 )
-#define CPU_HARDWARE_FP TRUE
-#else
-#define CPU_HARDWARE_FP FALSE
-#endif
-
-/*
- * Are all tasks FLOATING_POINT tasks implicitly?
- *
- * If TRUE, then the FLOATING_POINT task attribute is assumed.
- * If FALSE, then the FLOATING_POINT task attribute is followed.
- */
-
-#define CPU_ALL_TASKS_ARE_FP FALSE
-
-/*
- * Should the IDLE task have a floating point context?
- *
- * If TRUE, then the IDLE task is created as a FLOATING_POINT task
- * and it has a floating point context which is switched in and out.
- * If FALSE, then the IDLE task does not have a floating point context.
- */
-
-#define CPU_IDLE_TASK_IS_FP FALSE
-
-/*
- * Should the saving of the floating point registers be deferred
- * until a context switch is made to another different floating point
- * task?
- *
- * If TRUE, then the floating point context will not be stored until
- * necessary. It will remain in the floating point registers and not
- * disturned until another floating point task is switched to.
- *
- * If FALSE, then the floating point context is saved when a floating
- * point task is switched out and restored when the next floating point
- * task is restored. The state of the floating point registers between
- * those two operations is not specified.
- */
-
-#define CPU_USE_DEFERRED_FP_SWITCH TRUE
-
-/*
- * Does this port provide a CPU dependent IDLE task implementation?
- *
- * If TRUE, then the routine _CPU_Thread_Idle_body
- * must be provided and is the default IDLE thread body instead of
- * _CPU_Thread_Idle_body.
- *
- * If FALSE, then use the generic IDLE thread body if the BSP does
- * not provide one.
- */
-
-#if (SPARC_HAS_LOW_POWER_MODE == 1)
-#define CPU_PROVIDES_IDLE_THREAD_BODY TRUE
-#else
-#define CPU_PROVIDES_IDLE_THREAD_BODY FALSE
-#endif
-
-/*
- * Does the stack grow up (toward higher addresses) or down
- * (toward lower addresses)?
- *
- * If TRUE, then the grows upward.
- * If FALSE, then the grows toward smaller addresses.
- *
- * The stack grows to lower addresses on the SPARC.
- */
-
-#define CPU_STACK_GROWS_UP FALSE
-
-/*
- * The following is the variable attribute used to force alignment
- * of critical data structures. On some processors it may make
- * sense to have these aligned on tighter boundaries than
- * the minimum requirements of the compiler in order to have as
- * much of the critical data area as possible in a cache line.
- *
- * The SPARC does not appear to have particularly strict alignment
- * requirements. This value was chosen to take advantages of caches.
- */
-
-#define CPU_STRUCTURE_ALIGNMENT __attribute__ ((aligned (16)))
-
-/*
- * Define what is required to specify how the network to host conversion
- * routines are handled.
- */
-
-#define CPU_HAS_OWN_HOST_TO_NETWORK_ROUTINES FALSE
-#define CPU_BIG_ENDIAN TRUE
-#define CPU_LITTLE_ENDIAN FALSE
-
-/*
- * The following defines the number of bits actually used in the
- * interrupt field of the task mode. How those bits map to the
- * CPU interrupt levels is defined by the routine _CPU_ISR_Set_level().
- *
- * The SPARC has 16 interrupt levels in the PIL field of the PSR.
- */
-
-#define CPU_MODES_INTERRUPT_MASK 0x0000000F
-
-/*
- * This structure represents the organization of the minimum stack frame
- * for the SPARC. More framing information is required in certain situaions
- * such as when there are a large number of out parameters or when the callee
- * must save floating point registers.
- */
-
-#ifndef ASM
-
-typedef struct {
- unsigned32 l0;
- unsigned32 l1;
- unsigned32 l2;
- unsigned32 l3;
- unsigned32 l4;
- unsigned32 l5;
- unsigned32 l6;
- unsigned32 l7;
- unsigned32 i0;
- unsigned32 i1;
- unsigned32 i2;
- unsigned32 i3;
- unsigned32 i4;
- unsigned32 i5;
- unsigned32 i6_fp;
- unsigned32 i7;
- void *structure_return_address;
- /*
- * The following are for the callee to save the register arguments in
- * should this be necessary.
- */
- unsigned32 saved_arg0;
- unsigned32 saved_arg1;
- unsigned32 saved_arg2;
- unsigned32 saved_arg3;
- unsigned32 saved_arg4;
- unsigned32 saved_arg5;
- unsigned32 pad0;
-} CPU_Minimum_stack_frame;
-
-#endif /* ASM */
-
-#define CPU_STACK_FRAME_L0_OFFSET 0x00
-#define CPU_STACK_FRAME_L1_OFFSET 0x04
-#define CPU_STACK_FRAME_L2_OFFSET 0x08
-#define CPU_STACK_FRAME_L3_OFFSET 0x0c
-#define CPU_STACK_FRAME_L4_OFFSET 0x10
-#define CPU_STACK_FRAME_L5_OFFSET 0x14
-#define CPU_STACK_FRAME_L6_OFFSET 0x18
-#define CPU_STACK_FRAME_L7_OFFSET 0x1c
-#define CPU_STACK_FRAME_I0_OFFSET 0x20
-#define CPU_STACK_FRAME_I1_OFFSET 0x24
-#define CPU_STACK_FRAME_I2_OFFSET 0x28
-#define CPU_STACK_FRAME_I3_OFFSET 0x2c
-#define CPU_STACK_FRAME_I4_OFFSET 0x30
-#define CPU_STACK_FRAME_I5_OFFSET 0x34
-#define CPU_STACK_FRAME_I6_FP_OFFSET 0x38
-#define CPU_STACK_FRAME_I7_OFFSET 0x3c
-#define CPU_STRUCTURE_RETURN_ADDRESS_OFFSET 0x40
-#define CPU_STACK_FRAME_SAVED_ARG0_OFFSET 0x44
-#define CPU_STACK_FRAME_SAVED_ARG1_OFFSET 0x48
-#define CPU_STACK_FRAME_SAVED_ARG2_OFFSET 0x4c
-#define CPU_STACK_FRAME_SAVED_ARG3_OFFSET 0x50
-#define CPU_STACK_FRAME_SAVED_ARG4_OFFSET 0x54
-#define CPU_STACK_FRAME_SAVED_ARG5_OFFSET 0x58
-#define CPU_STACK_FRAME_PAD0_OFFSET 0x5c
-
-#define CPU_MINIMUM_STACK_FRAME_SIZE 0x60
-
-/*
- * Contexts
- *
- * Generally there are 2 types of context to save.
- * 1. Interrupt registers to save
- * 2. Task level registers to save
- *
- * This means we have the following 3 context items:
- * 1. task level context stuff:: Context_Control
- * 2. floating point task stuff:: Context_Control_fp
- * 3. special interrupt level context :: Context_Control_interrupt
- *
- * On the SPARC, we are relatively conservative in that we save most
- * of the CPU state in the context area. The ET (enable trap) bit and
- * the CWP (current window pointer) fields of the PSR are considered
- * system wide resources and are not maintained on a per-thread basis.
- */
-
-#ifndef ASM
-
-typedef struct {
- /*
- * Using a double g0_g1 will put everything in this structure on a
- * double word boundary which allows us to use double word loads
- * and stores safely in the context switch.
- */
- double g0_g1;
- unsigned32 g2;
- unsigned32 g3;
- unsigned32 g4;
- unsigned32 g5;
- unsigned32 g6;
- unsigned32 g7;
-
- unsigned32 l0;
- unsigned32 l1;
- unsigned32 l2;
- unsigned32 l3;
- unsigned32 l4;
- unsigned32 l5;
- unsigned32 l6;
- unsigned32 l7;
-
- unsigned32 i0;
- unsigned32 i1;
- unsigned32 i2;
- unsigned32 i3;
- unsigned32 i4;
- unsigned32 i5;
- unsigned32 i6_fp;
- unsigned32 i7;
-
- unsigned32 o0;
- unsigned32 o1;
- unsigned32 o2;
- unsigned32 o3;
- unsigned32 o4;
- unsigned32 o5;
- unsigned32 o6_sp;
- unsigned32 o7;
-
- unsigned32 psr;
-} Context_Control;
-
-#endif /* ASM */
-
-/*
- * Offsets of fields with Context_Control for assembly routines.
- */
-
-#define G0_OFFSET 0x00
-#define G1_OFFSET 0x04
-#define G2_OFFSET 0x08
-#define G3_OFFSET 0x0C
-#define G4_OFFSET 0x10
-#define G5_OFFSET 0x14
-#define G6_OFFSET 0x18
-#define G7_OFFSET 0x1C
-
-#define L0_OFFSET 0x20
-#define L1_OFFSET 0x24
-#define L2_OFFSET 0x28
-#define L3_OFFSET 0x2C
-#define L4_OFFSET 0x30
-#define L5_OFFSET 0x34
-#define L6_OFFSET 0x38
-#define L7_OFFSET 0x3C
-
-#define I0_OFFSET 0x40
-#define I1_OFFSET 0x44
-#define I2_OFFSET 0x48
-#define I3_OFFSET 0x4C
-#define I4_OFFSET 0x50
-#define I5_OFFSET 0x54
-#define I6_FP_OFFSET 0x58
-#define I7_OFFSET 0x5C
-
-#define O0_OFFSET 0x60
-#define O1_OFFSET 0x64
-#define O2_OFFSET 0x68
-#define O3_OFFSET 0x6C
-#define O4_OFFSET 0x70
-#define O5_OFFSET 0x74
-#define O6_SP_OFFSET 0x78
-#define O7_OFFSET 0x7C
-
-#define PSR_OFFSET 0x80
-
-#define CONTEXT_CONTROL_SIZE 0x84
-
-/*
- * The floating point context area.
- */
-
-#ifndef ASM
-
-typedef struct {
- double f0_f1;
- double f2_f3;
- double f4_f5;
- double f6_f7;
- double f8_f9;
- double f10_f11;
- double f12_f13;
- double f14_f15;
- double f16_f17;
- double f18_f19;
- double f20_f21;
- double f22_f23;
- double f24_f25;
- double f26_f27;
- double f28_f29;
- double f30_f31;
- unsigned32 fsr;
-} Context_Control_fp;
-
-#endif /* ASM */
-
-/*
- * Offsets of fields with Context_Control_fp for assembly routines.
- */
-
-#define FO_F1_OFFSET 0x00
-#define F2_F3_OFFSET 0x08
-#define F4_F5_OFFSET 0x10
-#define F6_F7_OFFSET 0x18
-#define F8_F9_OFFSET 0x20
-#define F1O_F11_OFFSET 0x28
-#define F12_F13_OFFSET 0x30
-#define F14_F15_OFFSET 0x38
-#define F16_F17_OFFSET 0x40
-#define F18_F19_OFFSET 0x48
-#define F2O_F21_OFFSET 0x50
-#define F22_F23_OFFSET 0x58
-#define F24_F25_OFFSET 0x60
-#define F26_F27_OFFSET 0x68
-#define F28_F29_OFFSET 0x70
-#define F3O_F31_OFFSET 0x78
-#define FSR_OFFSET 0x80
-
-#define CONTEXT_CONTROL_FP_SIZE 0x84
-
-#ifndef ASM
-
-/*
- * Context saved on stack for an interrupt.
- *
- * NOTE: The PSR, PC, and NPC are only saved in this structure for the
- * benefit of the user's handler.
- */
-
-typedef struct {
- CPU_Minimum_stack_frame Stack_frame;
- unsigned32 psr;
- unsigned32 pc;
- unsigned32 npc;
- unsigned32 g1;
- unsigned32 g2;
- unsigned32 g3;
- unsigned32 g4;
- unsigned32 g5;
- unsigned32 g6;
- unsigned32 g7;
- unsigned32 i0;
- unsigned32 i1;
- unsigned32 i2;
- unsigned32 i3;
- unsigned32 i4;
- unsigned32 i5;
- unsigned32 i6_fp;
- unsigned32 i7;
- unsigned32 y;
- unsigned32 tpc;
-} CPU_Interrupt_frame;
-
-#endif /* ASM */
-
-/*
- * Offsets of fields with CPU_Interrupt_frame for assembly routines.
- */
-
-#define ISF_STACK_FRAME_OFFSET 0x00
-#define ISF_PSR_OFFSET CPU_MINIMUM_STACK_FRAME_SIZE + 0x00
-#define ISF_PC_OFFSET CPU_MINIMUM_STACK_FRAME_SIZE + 0x04
-#define ISF_NPC_OFFSET CPU_MINIMUM_STACK_FRAME_SIZE + 0x08
-#define ISF_G1_OFFSET CPU_MINIMUM_STACK_FRAME_SIZE + 0x0c
-#define ISF_G2_OFFSET CPU_MINIMUM_STACK_FRAME_SIZE + 0x10
-#define ISF_G3_OFFSET CPU_MINIMUM_STACK_FRAME_SIZE + 0x14
-#define ISF_G4_OFFSET CPU_MINIMUM_STACK_FRAME_SIZE + 0x18
-#define ISF_G5_OFFSET CPU_MINIMUM_STACK_FRAME_SIZE + 0x1c
-#define ISF_G6_OFFSET CPU_MINIMUM_STACK_FRAME_SIZE + 0x20
-#define ISF_G7_OFFSET CPU_MINIMUM_STACK_FRAME_SIZE + 0x24
-#define ISF_I0_OFFSET CPU_MINIMUM_STACK_FRAME_SIZE + 0x28
-#define ISF_I1_OFFSET CPU_MINIMUM_STACK_FRAME_SIZE + 0x2c
-#define ISF_I2_OFFSET CPU_MINIMUM_STACK_FRAME_SIZE + 0x30
-#define ISF_I3_OFFSET CPU_MINIMUM_STACK_FRAME_SIZE + 0x34
-#define ISF_I4_OFFSET CPU_MINIMUM_STACK_FRAME_SIZE + 0x38
-#define ISF_I5_OFFSET CPU_MINIMUM_STACK_FRAME_SIZE + 0x3c
-#define ISF_I6_FP_OFFSET CPU_MINIMUM_STACK_FRAME_SIZE + 0x40
-#define ISF_I7_OFFSET CPU_MINIMUM_STACK_FRAME_SIZE + 0x44
-#define ISF_Y_OFFSET CPU_MINIMUM_STACK_FRAME_SIZE + 0x48
-#define ISF_TPC_OFFSET CPU_MINIMUM_STACK_FRAME_SIZE + 0x4c
-
-#define CONTEXT_CONTROL_INTERRUPT_FRAME_SIZE CPU_MINIMUM_STACK_FRAME_SIZE + 0x50
-#ifndef ASM
-
-/*
- * The following table contains the information required to configure
- * the processor specific parameters.
- */
-
-typedef struct {
- void (*pretasking_hook)( void );
- void (*predriver_hook)( void );
- void (*postdriver_hook)( void );
- void (*idle_task)( void );
- boolean do_zero_of_workspace;
- unsigned32 idle_task_stack_size;
- unsigned32 interrupt_stack_size;
- unsigned32 extra_mpci_receive_server_stack;
- void * (*stack_allocate_hook)( unsigned32 );
- void (*stack_free_hook)( void* );
- /* end of fields required on all CPUs */
-
-} rtems_cpu_table;
-
-/*
- * Macros to access required entires in the CPU Table are in
- * the file rtems/system.h.
- */
-
-/*
- * Macros to access SPARC specific additions to the CPU Table
- */
-
-/* There are no CPU specific additions to the CPU Table for this port. */
-
-/*
- * This variable is contains the initialize context for the FP unit.
- * It is filled in by _CPU_Initialize and copied into the task's FP
- * context area during _CPU_Context_Initialize.
- */
-
-SCORE_EXTERN Context_Control_fp _CPU_Null_fp_context CPU_STRUCTURE_ALIGNMENT;
-
-/*
- * This stack is allocated by the Interrupt Manager and the switch
- * is performed in _ISR_Handler. These variables contain pointers
- * to the lowest and highest addresses in the chunk of memory allocated
- * for the interrupt stack. Since it is unknown whether the stack
- * grows up or down (in general), this give the CPU dependent
- * code the option of picking the version it wants to use. Thus
- * both must be present if either is.
- *
- * The SPARC supports a software based interrupt stack and these
- * are required.
- */
-
-SCORE_EXTERN void *_CPU_Interrupt_stack_low;
-SCORE_EXTERN void *_CPU_Interrupt_stack_high;
-
-#if defined(erc32)
-
-/*
- * ERC32 Specific Variables
- */
-
-SCORE_EXTERN unsigned32 _ERC32_MEC_Timer_Control_Mirror;
-
-#endif
-
-/*
- * The following type defines an entry in the SPARC's trap table.
- *
- * NOTE: The instructions chosen are RTEMS dependent although one is
- * obligated to use two of the four instructions to perform a
- * long jump. The other instructions load one register with the
- * trap type (a.k.a. vector) and another with the psr.
- */
-
-typedef struct {
- unsigned32 mov_psr_l0; /* mov %psr, %l0 */
- unsigned32 sethi_of_handler_to_l4; /* sethi %hi(_handler), %l4 */
- unsigned32 jmp_to_low_of_handler_plus_l4; /* jmp %l4 + %lo(_handler) */
- unsigned32 mov_vector_l3; /* mov _vector, %l3 */
-} CPU_Trap_table_entry;
-
-/*
- * This is the set of opcodes for the instructions loaded into a trap
- * table entry. The routine which installs a handler is responsible
- * for filling in the fields for the _handler address and the _vector
- * trap type.
- *
- * The constants following this structure are masks for the fields which
- * must be filled in when the handler is installed.
- */
-
-extern const CPU_Trap_table_entry _CPU_Trap_slot_template;
-
-/*
- * This is the executive's trap table which is installed into the TBR
- * register.
- *
- * NOTE: Unfortunately, this must be aligned on a 4096 byte boundary.
- * The GNU tools as of binutils 2.5.2 and gcc 2.7.0 would not
- * align an entity to anything greater than a 512 byte boundary.
- *
- * Because of this, we pull a little bit of a trick. We allocate
- * enough memory so we can grab an address on a 4096 byte boundary
- * from this area.
- */
-
-#define SPARC_TRAP_TABLE_ALIGNMENT 4096
-
-#ifndef NO_TABLE_MOVE
-
-SCORE_EXTERN unsigned8 _CPU_Trap_Table_area[ 8192 ]
- __attribute__ ((aligned (SPARC_TRAP_TABLE_ALIGNMENT)));
-#endif
-
-
-/*
- * The size of the floating point context area.
- */
-
-#define CPU_CONTEXT_FP_SIZE sizeof( Context_Control_fp )
-
-#endif
-
-/*
- * Amount of extra stack (above minimum stack size) required by
- * MPCI receive server thread. Remember that in a multiprocessor
- * system this thread must exist and be able to process all directives.
- */
-
-#define CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK 1024
-
-/*
- * This defines the number of entries in the ISR_Vector_table managed
- * by the executive.
- *
- * On the SPARC, there are really only 256 vectors. However, the executive
- * has no easy, fast, reliable way to determine which traps are synchronous
- * and which are asynchronous. By default, synchronous traps return to the
- * instruction which caused the interrupt. So if you install a software
- * trap handler as an executive interrupt handler (which is desirable since
- * RTEMS takes care of window and register issues), then the executive needs
- * to know that the return address is to the trap rather than the instruction
- * following the trap.
- *
- * So vectors 0 through 255 are treated as regular asynchronous traps which
- * provide the "correct" return address. Vectors 256 through 512 are assumed
- * by the executive to be synchronous and to require that the return address
- * be fudged.
- *
- * If you use this mechanism to install a trap handler which must reexecute
- * the instruction which caused the trap, then it should be installed as
- * an asynchronous trap. This will avoid the executive changing the return
- * address.
- */
-
-#define CPU_INTERRUPT_NUMBER_OF_VECTORS 256
-#define CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER 511
-
-#define SPARC_SYNCHRONOUS_TRAP_BIT_MASK 0x100
-#define SPARC_ASYNCHRONOUS_TRAP( _trap ) (_trap)
-#define SPARC_SYNCHRONOUS_TRAP( _trap ) ((_trap) + 256 )
-
-#define SPARC_REAL_TRAP_NUMBER( _trap ) ((_trap) % 256)
-
-/*
- * Should be large enough to run all tests. This insures
- * that a "reasonable" small application should not have any problems.
- *
- * This appears to be a fairly generous number for the SPARC since
- * represents a call depth of about 20 routines based on the minimum
- * stack frame.
- */
-
-#define CPU_STACK_MINIMUM_SIZE (1024*4)
-
-/*
- * CPU's worst alignment requirement for data types on a byte boundary. This
- * alignment does not take into account the requirements for the stack.
- *
- * On the SPARC, this is required for double word loads and stores.
- */
-
-#define CPU_ALIGNMENT 8
-
-/*
- * This number corresponds to the byte alignment requirement for the
- * heap handler. This alignment requirement may be stricter than that
- * for the data types alignment specified by CPU_ALIGNMENT. It is
- * common for the heap to follow the same alignment requirement as
- * CPU_ALIGNMENT. If the CPU_ALIGNMENT is strict enough for the heap,
- * then this should be set to CPU_ALIGNMENT.
- *
- * NOTE: This does not have to be a power of 2. It does have to
- * be greater or equal to than CPU_ALIGNMENT.
- */
-
-#define CPU_HEAP_ALIGNMENT CPU_ALIGNMENT
-
-/*
- * This number corresponds to the byte alignment requirement for memory
- * buffers allocated by the partition manager. This alignment requirement
- * may be stricter than that for the data types alignment specified by
- * CPU_ALIGNMENT. It is common for the partition to follow the same
- * alignment requirement as CPU_ALIGNMENT. If the CPU_ALIGNMENT is strict
- * enough for the partition, then this should be set to CPU_ALIGNMENT.
- *
- * NOTE: This does not have to be a power of 2. It does have to
- * be greater or equal to than CPU_ALIGNMENT.
- */
-
-#define CPU_PARTITION_ALIGNMENT CPU_ALIGNMENT
-
-/*
- * This number corresponds to the byte alignment requirement for the
- * stack. This alignment requirement may be stricter than that for the
- * data types alignment specified by CPU_ALIGNMENT. If the CPU_ALIGNMENT
- * is strict enough for the stack, then this should be set to 0.
- *
- * NOTE: This must be a power of 2 either 0 or greater than CPU_ALIGNMENT.
- *
- * The alignment restrictions for the SPARC are not that strict but this
- * should unsure that the stack is always sufficiently alignment that the
- * window overflow, underflow, and flush routines can use double word loads
- * and stores.
- */
-
-#define CPU_STACK_ALIGNMENT 16
-
-#ifndef ASM
-
-extern unsigned int sparc_disable_interrupts();
-extern void sparc_enable_interrupts();
-
-/* ISR handler macros */
-
-/*
- * Disable all interrupts for a critical section. The previous
- * level is returned in _level.
- */
-
-#define _CPU_ISR_Disable( _level ) \
- (_level) = sparc_disable_interrupts()
-
-/*
- * Enable interrupts to the previous level (returned by _CPU_ISR_Disable).
- * This indicates the end of a critical section. The parameter
- * _level is not modified.
- */
-
-#define _CPU_ISR_Enable( _level ) \
- sparc_enable_interrupts( _level )
-/*
- * This temporarily restores the interrupt to _level before immediately
- * disabling them again. This is used to divide long critical
- * sections into two or more parts. The parameter _level is not
- * modified.
- */
-
-#define _CPU_ISR_Flash( _level ) \
- sparc_flash_interrupts( _level )
-
-/*
- * Map interrupt level in task mode onto the hardware that the CPU
- * actually provides. Currently, interrupt levels which do not
- * map onto the CPU in a straight fashion are undefined.
- */
-
-#define _CPU_ISR_Set_level( _newlevel ) \
- sparc_enable_interrupts( _newlevel << 8)
-
-unsigned32 _CPU_ISR_Get_level( void );
-
-/* end of ISR handler macros */
-
-/* Context handler macros */
-
-/*
- * Initialize the context to a state suitable for starting a
- * task after a context restore operation. Generally, this
- * involves:
- *
- * - setting a starting address
- * - preparing the stack
- * - preparing the stack and frame pointers
- * - setting the proper interrupt level in the context
- * - initializing the floating point context
- *
- * NOTE: Implemented as a subroutine for the SPARC port.
- */
-
-void _CPU_Context_Initialize(
- Context_Control *the_context,
- unsigned32 *stack_base,
- unsigned32 size,
- unsigned32 new_level,
- void *entry_point,
- boolean is_fp
-);
-
-/*
- * This routine is responsible for somehow restarting the currently
- * executing task.
- *
- * On the SPARC, this is is relatively painless but requires a small
- * amount of wrapper code before using the regular restore code in
- * of the context switch.
- */
-
-#define _CPU_Context_Restart_self( _the_context ) \
- _CPU_Context_restore( (_the_context) );
-
-/*
- * The FP context area for the SPARC is a simple structure and nothing
- * special is required to find the "starting load point"
- */
-
-#define _CPU_Context_Fp_start( _base, _offset ) \
- ( (void *) _Addresses_Add_offset( (_base), (_offset) ) )
-
-/*
- * This routine initializes the FP context area passed to it to.
- *
- * The SPARC allows us to use the simple initialization model
- * in which an "initial" FP context was saved into _CPU_Null_fp_context
- * at CPU initialization and it is simply copied into the destination
- * context.
- */
-
-#define _CPU_Context_Initialize_fp( _destination ) \
- do { \
- *((Context_Control_fp *) *((void **) _destination)) = _CPU_Null_fp_context; \
- } while (0)
-
-/* end of Context handler macros */
-
-/* Fatal Error manager macros */
-
-/*
- * This routine copies _error into a known place -- typically a stack
- * location or a register, optionally disables interrupts, and
- * halts/stops the CPU.
- */
-
-#define _CPU_Fatal_halt( _error ) \
- do { \
- unsigned32 level; \
- \
- level = sparc_disable_interrupts(); \
- asm volatile ( "mov %0, %%g1 " : "=r" (level) : "0" (level) ); \
- while (1); /* loop forever */ \
- } while (0)
-
-/* end of Fatal Error manager macros */
-
-/* Bitfield handler macros */
-
-/*
- * The SPARC port uses the generic C algorithm for bitfield scan if the
- * CPU model does not have a scan instruction.
- */
-
-#if ( SPARC_HAS_BITSCAN == 0 )
-#define CPU_USE_GENERIC_BITFIELD_CODE TRUE
-#define CPU_USE_GENERIC_BITFIELD_DATA TRUE
-#else
-#error "scan instruction not currently supported by RTEMS!!"
-#endif
-
-/* end of Bitfield handler macros */
-
-/* Priority handler handler macros */
-
-/*
- * The SPARC port uses the generic C algorithm for bitfield scan if the
- * CPU model does not have a scan instruction.
- */
-
-#if ( SPARC_HAS_BITSCAN == 1 )
-#error "scan instruction not currently supported by RTEMS!!"
-#endif
-
-/* end of Priority handler macros */
-
-/* functions */
-
-/*
- * _CPU_Initialize
- *
- * This routine performs CPU dependent initialization.
- */
-
-void _CPU_Initialize(
- rtems_cpu_table *cpu_table,
- void (*thread_dispatch)
-);
-
-/*
- * _CPU_ISR_install_raw_handler
- *
- * This routine installs new_handler to be directly called from the trap
- * table.
- */
-
-void _CPU_ISR_install_raw_handler(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-);
-
-/*
- * _CPU_ISR_install_vector
- *
- * This routine installs an interrupt vector.
- */
-
-void _CPU_ISR_install_vector(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-);
-
-#if (CPU_PROVIDES_IDLE_THREAD_BODY == TRUE)
-
-/*
- * _CPU_Thread_Idle_body
- *
- * Some SPARC implementations have low power, sleep, or idle modes. This
- * tries to take advantage of those models.
- */
-
-void _CPU_Thread_Idle_body( void );
-
-#endif /* CPU_PROVIDES_IDLE_THREAD_BODY */
-
-/*
- * _CPU_Context_switch
- *
- * This routine switches from the run context to the heir context.
- */
-
-void _CPU_Context_switch(
- Context_Control *run,
- Context_Control *heir
-);
-
-/*
- * _CPU_Context_restore
- *
- * This routine is generally used only to restart self in an
- * efficient manner.
- */
-
-void _CPU_Context_restore(
- Context_Control *new_context
-);
-
-/*
- * _CPU_Context_save_fp
- *
- * This routine saves the floating point context passed to it.
- */
-
-void _CPU_Context_save_fp(
- void **fp_context_ptr
-);
-
-/*
- * _CPU_Context_restore_fp
- *
- * This routine restores the floating point context passed to it.
- */
-
-void _CPU_Context_restore_fp(
- void **fp_context_ptr
-);
-
-/*
- * CPU_swap_u32
- *
- * The following routine swaps the endian format of an unsigned int.
- * It must be static because it is referenced indirectly.
- *
- * This version will work on any processor, but if you come across a better
- * way for the SPARC PLEASE use it. The most common way to swap a 32-bit
- * entity as shown below is not any more efficient on the SPARC.
- *
- * swap least significant two bytes with 16-bit rotate
- * swap upper and lower 16-bits
- * swap most significant two bytes with 16-bit rotate
- *
- * It is not obvious how the SPARC can do significantly better than the
- * generic code. gcc 2.7.0 only generates about 12 instructions for the
- * following code at optimization level four (i.e. -O4).
- */
-
-static inline unsigned int CPU_swap_u32(
- unsigned int value
-)
-{
- unsigned32 byte1, byte2, byte3, byte4, swapped;
-
- byte4 = (value >> 24) & 0xff;
- byte3 = (value >> 16) & 0xff;
- byte2 = (value >> 8) & 0xff;
- byte1 = value & 0xff;
-
- swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
- return( swapped );
-}
-
-#define CPU_swap_u16( value ) \
- (((value&0xff) << 8) | ((value >> 8)&0xff))
-
-#endif ASM
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/cpukit/score/cpu/sparc/rtems/score/sparc.h b/cpukit/score/cpu/sparc/rtems/score/sparc.h
deleted file mode 100644
index 0cb44c2df9..0000000000
--- a/cpukit/score/cpu/sparc/rtems/score/sparc.h
+++ /dev/null
@@ -1,256 +0,0 @@
-/* sparc.h
- *
- * This include file contains information pertaining to the SPARC
- * processor family.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * Ported to ERC32 implementation of the SPARC by On-Line Applications
- * Research Corporation (OAR) under contract to the European Space
- * Agency (ESA).
- *
- * ERC32 modifications of respective RTEMS file: COPYRIGHT (c) 1995.
- * European Space Agency.
- *
- * $Id$
- */
-
-#ifndef _INCLUDE_SPARC_h
-#define _INCLUDE_SPARC_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This file contains the information required to build
- * RTEMS for a particular member of the "sparc" family. It does
- * this by setting variables to indicate which implementation
- * dependent features are present in a particular member
- * of the family.
- *
- * Currently recognized feature flags:
- *
- * + SPARC_HAS_FPU
- * 0 - no HW FPU
- * 1 - has HW FPU (assumed to be compatible w/90C602)
- *
- * + SPARC_HAS_BITSCAN
- * 0 - does not have scan instructions
- * 1 - has scan instruction (not currently implemented)
- *
- * + SPARC_NUMBER_OF_REGISTER_WINDOWS
- * 8 is the most common number supported by SPARC implementations.
- * SPARC_PSR_CWP_MASK is derived from this value.
- *
- * + SPARC_HAS_LOW_POWER_MODE
- * 0 - does not have low power mode support (or not supported)
- * 1 - has low power mode and thus a CPU model dependent idle task.
- *
- */
-
-#if defined(erc32)
-
-#define CPU_MODEL_NAME "erc32"
-#define SPARC_HAS_FPU 1
-#define SPARC_HAS_BITSCAN 0
-#define SPARC_NUMBER_OF_REGISTER_WINDOWS 8
-#define SPARC_HAS_LOW_POWER_MODE 1
-
-#else
-
-#error "Unsupported CPU Model"
-
-#endif
-
-/*
- * Define the name of the CPU family.
- */
-
-#define CPU_NAME "SPARC"
-
-/*
- * Miscellaneous constants
- */
-
-/*
- * PSR masks and starting bit positions
- *
- * NOTE: Reserved bits are ignored.
- */
-
-#if (SPARC_NUMBER_OF_REGISTER_WINDOWS == 8)
-#define SPARC_PSR_CWP_MASK 0x07 /* bits 0 - 4 */
-#elif (SPARC_NUMBER_OF_REGISTER_WINDOWS == 16)
-#define SPARC_PSR_CWP_MASK 0x0F /* bits 0 - 4 */
-#elif (SPARC_NUMBER_OF_REGISTER_WINDOWS == 32)
-#define SPARC_PSR_CWP_MASK 0x1F /* bits 0 - 4 */
-#else
-#error "Unsupported number of register windows for this cpu"
-#endif
-
-#define SPARC_PSR_ET_MASK 0x00000020 /* bit 5 */
-#define SPARC_PSR_PS_MASK 0x00000040 /* bit 6 */
-#define SPARC_PSR_S_MASK 0x00000080 /* bit 7 */
-#define SPARC_PSR_PIL_MASK 0x00000F00 /* bits 8 - 11 */
-#define SPARC_PSR_EF_MASK 0x00001000 /* bit 12 */
-#define SPARC_PSR_EC_MASK 0x00002000 /* bit 13 */
-#define SPARC_PSR_ICC_MASK 0x00F00000 /* bits 20 - 23 */
-#define SPARC_PSR_VER_MASK 0x0F000000 /* bits 24 - 27 */
-#define SPARC_PSR_IMPL_MASK 0xF0000000 /* bits 28 - 31 */
-
-#define SPARC_PSR_CWP_BIT_POSITION 0 /* bits 0 - 4 */
-#define SPARC_PSR_ET_BIT_POSITION 5 /* bit 5 */
-#define SPARC_PSR_PS_BIT_POSITION 6 /* bit 6 */
-#define SPARC_PSR_S_BIT_POSITION 7 /* bit 7 */
-#define SPARC_PSR_PIL_BIT_POSITION 8 /* bits 8 - 11 */
-#define SPARC_PSR_EF_BIT_POSITION 12 /* bit 12 */
-#define SPARC_PSR_EC_BIT_POSITION 13 /* bit 13 */
-#define SPARC_PSR_ICC_BIT_POSITION 20 /* bits 20 - 23 */
-#define SPARC_PSR_VER_BIT_POSITION 24 /* bits 24 - 27 */
-#define SPARC_PSR_IMPL_BIT_POSITION 28 /* bits 28 - 31 */
-
-#ifndef ASM
-
-/*
- * Standard nop
- */
-
-#define nop() \
- do { \
- asm volatile ( "nop" ); \
- } while ( 0 )
-
-/*
- * Get and set the PSR
- */
-
-#define sparc_get_psr( _psr ) \
- do { \
- (_psr) = 0; \
- asm volatile( "rd %%psr, %0" : "=r" (_psr) : "0" (_psr) ); \
- } while ( 0 )
-
-#define sparc_set_psr( _psr ) \
- do { \
- asm volatile ( "mov %0, %%psr " : "=r" ((_psr)) : "0" ((_psr)) ); \
- nop(); \
- nop(); \
- nop(); \
- } while ( 0 )
-
-/*
- * Get and set the TBR
- */
-
-#define sparc_get_tbr( _tbr ) \
- do { \
- (_tbr) = 0; /* to avoid unitialized warnings */ \
- asm volatile( "rd %%tbr, %0" : "=r" (_tbr) : "0" (_tbr) ); \
- } while ( 0 )
-
-#define sparc_set_tbr( _tbr ) \
- do { \
- asm volatile( "wr %0, 0, %%tbr" : "=r" (_tbr) : "0" (_tbr) ); \
- } while ( 0 )
-
-/*
- * Get and set the WIM
- */
-
-#define sparc_get_wim( _wim ) \
- do { \
- asm volatile( "rd %%wim, %0" : "=r" (_wim) : "0" (_wim) ); \
- } while ( 0 )
-
-#define sparc_set_wim( _wim ) \
- do { \
- asm volatile( "wr %0, %%wim" : "=r" (_wim) : "0" (_wim) ); \
- nop(); \
- nop(); \
- nop(); \
- } while ( 0 )
-
-/*
- * Get and set the Y
- */
-
-#define sparc_get_y( _y ) \
- do { \
- asm volatile( "rd %%y, %0" : "=r" (_y) : "0" (_y) ); \
- } while ( 0 )
-
-#define sparc_set_y( _y ) \
- do { \
- asm volatile( "wr %0, %%y" : "=r" (_y) : "0" (_y) ); \
- } while ( 0 )
-
-/*
- * Manipulate the interrupt level in the psr
- *
- */
-
-/*
-#define sparc_disable_interrupts( _level ) \
- do { \
- register unsigned int _newlevel; \
- \
- sparc_get_psr( _level ); \
- (_newlevel) = (_level) | SPARC_PSR_PIL_MASK; \
- sparc_set_psr( _newlevel ); \
- } while ( 0 )
-
-#define sparc_enable_interrupts( _level ) \
- do { \
- unsigned int _tmp; \
- \
- sparc_get_psr( _tmp ); \
- _tmp &= ~SPARC_PSR_PIL_MASK; \
- _tmp |= (_level) & SPARC_PSR_PIL_MASK; \
- sparc_set_psr( _tmp ); \
- } while ( 0 )
-*/
-
-#define sparc_flash_interrupts( _level ) \
- do { \
- register unsigned32 _ignored = 0; \
- \
- sparc_enable_interrupts( (_level) ); \
- sparc_disable_interrupts( _ignored ); \
- } while ( 0 )
-
-/*
-#define sparc_set_interrupt_level( _new_level ) \
- do { \
- register unsigned32 _new_psr_level = 0; \
- \
- sparc_get_psr( _new_psr_level ); \
- _new_psr_level &= ~SPARC_PSR_PIL_MASK; \
- _new_psr_level |= \
- (((_new_level) << SPARC_PSR_PIL_BIT_POSITION) & SPARC_PSR_PIL_MASK); \
- sparc_set_psr( _new_psr_level ); \
- } while ( 0 )
-*/
-
-#define sparc_get_interrupt_level( _level ) \
- do { \
- register unsigned32 _psr_level = 0; \
- \
- sparc_get_psr( _psr_level ); \
- (_level) = \
- (_psr_level & SPARC_PSR_PIL_MASK) >> SPARC_PSR_PIL_BIT_POSITION; \
- } while ( 0 )
-
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* ! _INCLUDE_SPARC_h */
-/* end of include file */
diff --git a/cpukit/score/cpu/sparc/rtems/score/types.h b/cpukit/score/cpu/sparc/rtems/score/types.h
deleted file mode 100644
index 1621d6fd5c..0000000000
--- a/cpukit/score/cpu/sparc/rtems/score/types.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* sparctypes.h
- *
- * This include file contains type definitions pertaining to the
- * SPARC processor family.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * Ported to ERC32 implementation of the SPARC by On-Line Applications
- * Research Corporation (OAR) under contract to the European Space
- * Agency (ESA).
- *
- * ERC32 modifications of respective RTEMS file: COPYRIGHT (c) 1995.
- * European Space Agency.
- *
- * $Id$
- */
-
-#ifndef __SPARC_TYPES_h
-#define __SPARC_TYPES_h
-
-#ifndef ASM
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This section defines the basic types for this processor.
- */
-
-typedef unsigned char unsigned8; /* unsigned 8-bit integer */
-typedef unsigned short unsigned16; /* unsigned 16-bit integer */
-typedef unsigned int unsigned32; /* unsigned 32-bit integer */
-typedef unsigned long long unsigned64; /* unsigned 64-bit integer */
-
-typedef unsigned16 Priority_Bit_map_control;
-
-typedef signed char signed8; /* 8-bit signed integer */
-typedef signed short signed16; /* 16-bit signed integer */
-typedef signed int signed32; /* 32-bit signed integer */
-typedef signed long long signed64; /* 64 bit signed integer */
-
-typedef unsigned32 boolean; /* Boolean value */
-
-typedef float single_precision; /* single precision float */
-typedef double double_precision; /* double precision float */
-
-typedef void sparc_isr;
-typedef void ( *sparc_isr_entry )( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !ASM */
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/cpu/unix/Makefile.am b/cpukit/score/cpu/unix/Makefile.am
deleted file mode 100644
index e619852a38..0000000000
--- a/cpukit/score/cpu/unix/Makefile.am
+++ /dev/null
@@ -1,32 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../../../../automake/lib.am
-
-SUBDIRS = rtems
-
-AM_CPPFLAGS = -DCPU_SYNC_IO $(LIBC_DEFINES)
-
-C_FILES = cpu.c
-C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
-
-REL = $(ARCH)/rtems-cpu.rel
-
-rtems_cpu_rel_OBJECTS = $(C_O_FILES)
-
-$(REL): $(rtems_cpu_rel_OBJECTS)
- $(make-rel)
-
-all-local: $(ARCH) $(rtems_cpu_rel_OBJECTS) $(REL)
-
-.PRECIOUS: $(REL)
-
-EXTRA_DIST = cpu.c
-
-include $(top_srcdir)/../../../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/cpukit/score/cpu/unix/cpu.c b/cpukit/score/cpu/unix/cpu.c
deleted file mode 100644
index 7f9f9c8047..0000000000
--- a/cpukit/score/cpu/unix/cpu.c
+++ /dev/null
@@ -1,1117 +0,0 @@
-/*
- * UNIX Simulator Dependent Source
- *
- * COPYRIGHT (c) 1994,95 by Division Incorporated
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/interr.h>
-
-#if defined(__linux__)
-#define _XOPEN_SOURCE
-#define MALLOC_0_RETURNS_NULL
-#endif
-
-#include <sys/types.h>
-#include <sys/times.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <setjmp.h>
-#include <signal.h>
-#include <time.h>
-#include <sys/time.h>
-#include <errno.h>
-#include <unistd.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <sys/ipc.h>
-#include <sys/shm.h>
-#include <sys/sem.h>
-#endif
-#include <string.h> /* memset */
-
-#ifndef SA_RESTART
-#define SA_RESTART 0
-#endif
-
-typedef struct {
- jmp_buf regs;
- int isr_level;
-} Context_Control_overlay;
-
-void _CPU_Signal_initialize(void);
-void _CPU_Stray_signal(int);
-void _CPU_ISR_Handler(int);
-
-static sigset_t _CPU_Signal_mask;
-static Context_Control_overlay
- _CPU_Context_Default_with_ISRs_enabled CPU_STRUCTURE_ALIGNMENT;
-static Context_Control_overlay
- _CPU_Context_Default_with_ISRs_disabled CPU_STRUCTURE_ALIGNMENT;
-
-/*
- * Sync IO support, an entry for each fd that can be set
- */
-
-void _CPU_Sync_io_Init();
-
-static rtems_sync_io_handler _CPU_Sync_io_handlers[FD_SETSIZE];
-static int sync_io_nfds;
-static fd_set sync_io_readfds;
-static fd_set sync_io_writefds;
-static fd_set sync_io_exceptfds;
-
-/*
- * Which cpu are we? Used by libcpu and libbsp.
- */
-
-int cpu_number;
-
-/*PAGE
- *
- * _CPU_ISR_From_CPU_Init
- */
-
-sigset_t posix_empty_mask;
-
-void _CPU_ISR_From_CPU_Init()
-{
- unsigned32 i;
- proc_ptr old_handler;
-
- /*
- * Generate an empty mask to be used by disable_support
- */
-
- sigemptyset(&posix_empty_mask);
-
- /*
- * Block all the signals except SIGTRAP for the debugger
- * and fatal error signals.
- */
-
- (void) sigfillset(&_CPU_Signal_mask);
- (void) sigdelset(&_CPU_Signal_mask, SIGTRAP);
- (void) sigdelset(&_CPU_Signal_mask, SIGABRT);
- (void) sigdelset(&_CPU_Signal_mask, SIGIOT);
- (void) sigdelset(&_CPU_Signal_mask, SIGCONT);
- (void) sigdelset(&_CPU_Signal_mask, SIGSEGV);
- (void) sigdelset(&_CPU_Signal_mask, SIGBUS);
- (void) sigdelset(&_CPU_Signal_mask, SIGFPE);
-
- _CPU_ISR_Enable(1);
-
- /*
- * Set the handler for all signals to be signal_handler
- * which will then vector out to the correct handler
- * for whichever signal actually happened. Initially
- * set the vectors to the stray signal handler.
- */
-
- for (i = 0; i < CPU_INTERRUPT_NUMBER_OF_VECTORS; i++)
- (void)_CPU_ISR_install_vector(i, _CPU_Stray_signal, &old_handler);
-
- _CPU_Signal_initialize();
-}
-
-void _CPU_Signal_initialize( void )
-{
- struct sigaction act;
- sigset_t mask;
-
- /* mark them all active except for TraceTrap and Abort */
-
- mask = _CPU_Signal_mask;
- sigprocmask(SIG_UNBLOCK, &mask, 0);
-
- act.sa_handler = _CPU_ISR_Handler;
- act.sa_mask = mask;
- act.sa_flags = SA_RESTART;
-
- sigaction(SIGHUP, &act, 0);
- sigaction(SIGINT, &act, 0);
- sigaction(SIGQUIT, &act, 0);
- sigaction(SIGILL, &act, 0);
-#ifdef SIGEMT
- sigaction(SIGEMT, &act, 0);
-#endif
- sigaction(SIGFPE, &act, 0);
- sigaction(SIGKILL, &act, 0);
- sigaction(SIGBUS, &act, 0);
- sigaction(SIGSEGV, &act, 0);
-#ifdef SIGSYS
- sigaction(SIGSYS, &act, 0);
-#endif
- sigaction(SIGPIPE, &act, 0);
- sigaction(SIGALRM, &act, 0);
- sigaction(SIGTERM, &act, 0);
- sigaction(SIGUSR1, &act, 0);
- sigaction(SIGUSR2, &act, 0);
- sigaction(SIGCHLD, &act, 0);
-#ifdef SIGCLD
- sigaction(SIGCLD, &act, 0);
-#endif
-#ifdef SIGPWR
- sigaction(SIGPWR, &act, 0);
-#endif
- sigaction(SIGVTALRM, &act, 0);
- sigaction(SIGPROF, &act, 0);
- sigaction(SIGIO, &act, 0);
- sigaction(SIGWINCH, &act, 0);
- sigaction(SIGSTOP, &act, 0);
- sigaction(SIGTTIN, &act, 0);
- sigaction(SIGTTOU, &act, 0);
- sigaction(SIGURG, &act, 0);
-#ifdef SIGLOST
- sigaction(SIGLOST, &act, 0);
-#endif
-}
-
-/*PAGE
- *
- * _CPU_Context_From_CPU_Init
- */
-
-void _CPU_Context_From_CPU_Init()
-{
-
-#if defined(__hppa__) && defined(RTEMS_UNIXLIB_SETJMP)
- /*
- * HACK - set the _SYSTEM_ID to 0x20c so that setjmp/longjmp
- * will handle the full 32 floating point registers.
- */
-
- {
- extern unsigned32 _SYSTEM_ID;
-
- _SYSTEM_ID = 0x20c;
- }
-#endif
-
- /*
- * get default values to use in _CPU_Context_Initialize()
- */
-
-
- (void) memset(
- &_CPU_Context_Default_with_ISRs_enabled,
- 0,
- sizeof(Context_Control)
- );
- (void) memset(
- &_CPU_Context_Default_with_ISRs_disabled,
- 0,
- sizeof(Context_Control)
- );
-
- _CPU_ISR_Set_level( 0 );
- _CPU_Context_switch(
- (Context_Control *) &_CPU_Context_Default_with_ISRs_enabled,
- (Context_Control *) &_CPU_Context_Default_with_ISRs_enabled
- );
-
- _CPU_ISR_Set_level( 1 );
- _CPU_Context_switch(
- (Context_Control *) &_CPU_Context_Default_with_ISRs_disabled,
- (Context_Control *) &_CPU_Context_Default_with_ISRs_disabled
- );
-}
-
-/*PAGE
- *
- * _CPU_Sync_io_Init
- */
-
-void _CPU_Sync_io_Init()
-{
- int fd;
-
- for (fd = 0; fd < FD_SETSIZE; fd++)
- _CPU_Sync_io_handlers[fd] = NULL;
-
- sync_io_nfds = 0;
- FD_ZERO(&sync_io_readfds);
- FD_ZERO(&sync_io_writefds);
- FD_ZERO(&sync_io_exceptfds);
-}
-
-/*PAGE
- *
- * _CPU_ISR_Get_level
- */
-
-unsigned32 _CPU_ISR_Get_level( void )
-{
- sigset_t old_mask;
-
- sigemptyset( &old_mask );
- sigprocmask(SIG_BLOCK, 0, &old_mask);
-
- if (memcmp((void *)&posix_empty_mask, (void *)&old_mask, sizeof(sigset_t)))
- return 1;
-
- return 0;
-}
-
-/* _CPU_Initialize
- *
- * This routine performs processor dependent initialization.
- *
- * INPUT PARAMETERS:
- * cpu_table - CPU table to initialize
- * thread_dispatch - address of disptaching routine
- */
-
-
-void _CPU_Initialize(
- rtems_cpu_table *cpu_table,
- void (*thread_dispatch) /* ignored on this CPU */
-)
-{
- /*
- * The thread_dispatch argument is the address of the entry point
- * for the routine called at the end of an ISR once it has been
- * decided a context switch is necessary. On some compilation
- * systems it is difficult to call a high-level language routine
- * from assembly. This allows us to trick these systems.
- *
- * If you encounter this problem save the entry point in a CPU
- * dependent variable.
- */
-
- _CPU_Thread_dispatch_pointer = thread_dispatch;
-
- /*
- * XXX; If there is not an easy way to initialize the FP context
- * during Context_Initialize, then it is usually easier to
- * save an "uninitialized" FP context here and copy it to
- * the task's during Context_Initialize.
- */
-
- /* XXX: FP context initialization support */
-
- _CPU_Table = *cpu_table;
-
- _CPU_ISR_From_CPU_Init();
-
- _CPU_Sync_io_Init();
-
- _CPU_Context_From_CPU_Init();
-
-}
-
-/*PAGE
- *
- * _CPU_ISR_install_raw_handler
- */
-
-void _CPU_ISR_install_raw_handler(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-)
-{
- _CPU_Fatal_halt( 0xdeaddead );
-}
-
-/*PAGE
- *
- * _CPU_ISR_install_vector
- *
- * This kernel routine installs the RTEMS handler for the
- * specified vector.
- *
- * Input parameters:
- * vector - interrupt vector number
- * old_handler - former ISR for this vector number
- * new_handler - replacement ISR for this vector number
- *
- * Output parameters: NONE
- *
- */
-
-
-void _CPU_ISR_install_vector(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-)
-{
- *old_handler = _ISR_Vector_table[ vector ];
-
- /*
- * If the interrupt vector table is a table of pointer to isr entry
- * points, then we need to install the appropriate RTEMS interrupt
- * handler for this vector number.
- */
-
- /*
- * We put the actual user ISR address in '_ISR_vector_table'. This will
- * be used by the _CPU_ISR_Handler so the user gets control.
- */
-
- _ISR_Vector_table[ vector ] = new_handler;
-}
-
-/*PAGE
- *
- * _CPU_Install_interrupt_stack
- */
-
-void _CPU_Install_interrupt_stack( void )
-{
-}
-
-/*PAGE
- *
- * _CPU_Thread_Idle_body
- *
- * Stop until we get a signal which is the logically the same thing
- * entering low-power or sleep mode on a real processor and waiting for
- * an interrupt. This significantly reduces the consumption of host
- * CPU cycles which is again similar to low power mode.
- */
-
-void _CPU_Thread_Idle_body( void )
-{
-#if CPU_SYNC_IO
- extern void _Thread_Dispatch(void);
- int fd;
-#endif
-
- while (1) {
-#ifdef RTEMS_DEBUG
- /* interrupts had better be enabled at this point! */
- if (_CPU_ISR_Get_level() != 0)
- abort();
-#endif
-
- /*
- * Block on a select statement, the CPU interface added allow the
- * user to add new descriptors which are to be blocked on
- */
-
-#if CPU_SYNC_IO
- if (sync_io_nfds) {
- int result;
- fd_set readfds, writefds, exceptfds;
-
- readfds = sync_io_readfds;
- writefds = sync_io_writefds;
- exceptfds = sync_io_exceptfds;
- result = select(sync_io_nfds,
- &readfds,
- &writefds,
- &exceptfds,
- NULL);
-
- if (result < 0) {
- if (errno != EINTR)
- _CPU_Fatal_error(0x200); /* FIXME : what number should go here !! */
- _Thread_Dispatch();
- continue;
- }
-
- for (fd = 0; fd < sync_io_nfds; fd++) {
- boolean read = FD_ISSET(fd, &readfds);
- boolean write = FD_ISSET(fd, &writefds);
- boolean except = FD_ISSET(fd, &exceptfds);
-
- if (_CPU_Sync_io_handlers[fd] && (read || write || except))
- _CPU_Sync_io_handlers[fd](fd, read, write, except);
- }
-
- _Thread_Dispatch();
- } else
- pause();
-#else
- pause();
-#endif
-
- }
-
-}
-
-/*PAGE
- *
- * _CPU_Context_Initialize
- */
-
-void _CPU_Context_Initialize(
- Context_Control *_the_context,
- unsigned32 *_stack_base,
- unsigned32 _size,
- unsigned32 _new_level,
- void *_entry_point,
- boolean _is_fp
-)
-{
- unsigned32 *addr;
- unsigned32 jmp_addr;
- unsigned32 _stack_low; /* lowest "stack aligned" address */
- unsigned32 _stack_high; /* highest "stack aligned" address */
- unsigned32 _the_size;
-
- jmp_addr = (unsigned32) _entry_point;
-
- /*
- * On CPUs with stacks which grow down, we build the stack
- * based on the _stack_high address. On CPUs with stacks which
- * grow up, we build the stack based on the _stack_low address.
- */
-
- _stack_low = (unsigned32)(_stack_base) + CPU_STACK_ALIGNMENT - 1;
- _stack_low &= ~(CPU_STACK_ALIGNMENT - 1);
-
- _stack_high = (unsigned32)(_stack_base) + _size;
- _stack_high &= ~(CPU_STACK_ALIGNMENT - 1);
-
- if (_stack_high > _stack_low)
- _the_size = _stack_high - _stack_low;
- else
- _the_size = _stack_low - _stack_high;
-
- /*
- * Slam our jmp_buf template into the context we are creating
- */
-
- if ( _new_level == 0 )
- *_the_context = *(Context_Control *)
- &_CPU_Context_Default_with_ISRs_enabled;
- else
- *_the_context = *(Context_Control *)
- &_CPU_Context_Default_with_ISRs_disabled;
-
- addr = (unsigned32 *)_the_context;
-
-#if defined(__hppa__)
- *(addr + RP_OFF) = jmp_addr;
- *(addr + SP_OFF) = (unsigned32)(_stack_low + CPU_FRAME_SIZE);
-
- /*
- * See if we are using shared libraries by checking
- * bit 30 in 24 off of newp. If bit 30 is set then
- * we are using shared libraries and the jump address
- * points to the pointer, so we put that into rp instead.
- */
-
- if (jmp_addr & 0x40000000) {
- jmp_addr &= 0xfffffffc;
- *(addr + RP_OFF) = *(unsigned32 *)jmp_addr;
- }
-#elif defined(__sparc__)
-
- /*
- * See /usr/include/sys/stack.h in Solaris 2.3 for a nice
- * diagram of the stack.
- */
-
- asm ("ta 0x03"); /* flush registers */
-
- *(addr + RP_OFF) = jmp_addr + ADDR_ADJ_OFFSET;
- *(addr + SP_OFF) = (unsigned32)(_stack_high - CPU_FRAME_SIZE);
- *(addr + FP_OFF) = (unsigned32)(_stack_high);
-
-#elif defined(__i386__)
-
- /*
- * This information was gathered by disassembling setjmp().
- */
-
- {
- unsigned32 stack_ptr;
-
- stack_ptr = _stack_high - CPU_FRAME_SIZE;
-
- *(addr + EBX_OFF) = 0xFEEDFEED;
- *(addr + ESI_OFF) = 0xDEADDEAD;
- *(addr + EDI_OFF) = 0xDEAFDEAF;
- *(addr + EBP_OFF) = stack_ptr;
- *(addr + ESP_OFF) = stack_ptr;
- *(addr + RET_OFF) = jmp_addr;
-
- addr = (unsigned32 *) stack_ptr;
-
- addr[ 0 ] = jmp_addr;
- addr[ 1 ] = (unsigned32) stack_ptr;
- addr[ 2 ] = (unsigned32) stack_ptr;
- }
-
-#else
-#error "UNKNOWN CPU!!!"
-#endif
-
-}
-
-/*PAGE
- *
- * _CPU_Context_restore
- */
-
-void _CPU_Context_restore(
- Context_Control *next
-)
-{
- Context_Control_overlay *nextp = (Context_Control_overlay *)next;
-
- _CPU_ISR_Enable(nextp->isr_level);
- longjmp( nextp->regs, 0 );
-}
-
-/*PAGE
- *
- * _CPU_Context_switch
- */
-
-static void do_jump(
- Context_Control_overlay *currentp,
- Context_Control_overlay *nextp
-);
-
-void _CPU_Context_switch(
- Context_Control *current,
- Context_Control *next
-)
-{
- Context_Control_overlay *currentp = (Context_Control_overlay *)current;
- Context_Control_overlay *nextp = (Context_Control_overlay *)next;
-#if 0
- int status;
-#endif
-
- currentp->isr_level = _CPU_ISR_Disable_support();
-
- do_jump( currentp, nextp );
-
-#if 0
- if (sigsetjmp(currentp->regs, 1) == 0) { /* Save the current context */
- siglongjmp(nextp->regs, 0); /* Switch to the new context */
- _Internal_error_Occurred(
- INTERNAL_ERROR_CORE,
- TRUE,
- status
- );
- }
-#endif
-
-#ifdef RTEMS_DEBUG
- if (_CPU_ISR_Get_level() == 0)
- abort();
-#endif
-
- _CPU_ISR_Enable(currentp->isr_level);
-}
-
-static void do_jump(
- Context_Control_overlay *currentp,
- Context_Control_overlay *nextp
-)
-{
- int status;
-
- if (setjmp(currentp->regs) == 0) { /* Save the current context */
- longjmp(nextp->regs, 0); /* Switch to the new context */
- _Internal_error_Occurred(
- INTERNAL_ERROR_CORE,
- TRUE,
- status
- );
- }
-}
-
-/*PAGE
- *
- * _CPU_Save_float_context
- */
-
-void _CPU_Save_float_context(
- Context_Control_fp *fp_context
-)
-{
-}
-
-/*PAGE
- *
- * _CPU_Restore_float_context
- */
-
-void _CPU_Restore_float_context(
- Context_Control_fp *fp_context
-)
-{
-}
-
-/*PAGE
- *
- * _CPU_ISR_Disable_support
- */
-
-unsigned32 _CPU_ISR_Disable_support(void)
-{
- int status;
- sigset_t old_mask;
-
- sigemptyset( &old_mask );
- status = sigprocmask(SIG_BLOCK, &_CPU_Signal_mask, &old_mask);
- if ( status )
- _Internal_error_Occurred(
- INTERNAL_ERROR_CORE,
- TRUE,
- status
- );
-
- if (memcmp((void *)&posix_empty_mask, (void *)&old_mask, sizeof(sigset_t)))
- return 1;
-
- return 0;
-}
-
-/*PAGE
- *
- * _CPU_ISR_Enable
- */
-
-void _CPU_ISR_Enable(
- unsigned32 level
-)
-{
- int status;
-
- if (level == 0)
- status = sigprocmask(SIG_UNBLOCK, &_CPU_Signal_mask, 0);
- else
- status = sigprocmask(SIG_BLOCK, &_CPU_Signal_mask, 0);
-
- if ( status )
- _Internal_error_Occurred(
- INTERNAL_ERROR_CORE,
- TRUE,
- status
- );
-}
-
-/*PAGE
- *
- * _CPU_ISR_Handler
- *
- * External interrupt handler.
- * This is installed as a UNIX signal handler.
- * It vectors out to specific user interrupt handlers.
- */
-
-void _CPU_ISR_Handler(int vector)
-{
- extern void _Thread_Dispatch(void);
- extern unsigned32 _Thread_Dispatch_disable_level;
- extern boolean _Context_Switch_necessary;
-
- if (_ISR_Nest_level++ == 0) {
- /* switch to interrupt stack */
- }
-
- _Thread_Dispatch_disable_level++;
-
- if (_ISR_Vector_table[vector]) {
- _ISR_Vector_table[vector](vector);
- } else {
- _CPU_Stray_signal(vector);
- }
-
- if (_ISR_Nest_level-- == 0) {
- /* switch back to original stack */
- }
-
- _Thread_Dispatch_disable_level--;
-
- if (_Thread_Dispatch_disable_level == 0 &&
- (_Context_Switch_necessary || _ISR_Signals_to_thread_executing)) {
- _ISR_Signals_to_thread_executing = FALSE;
- _CPU_ISR_Enable(0);
- _Thread_Dispatch();
- }
-}
-
-/*PAGE
- *
- * _CPU_Stray_signal
- */
-
-void _CPU_Stray_signal(int sig_num)
-{
- char buffer[ 4 ];
-
- /*
- * print "stray" msg about ones which that might mean something
- * Avoid using the stdio section of the library.
- * The following is generally safe.
- */
-
- switch (sig_num)
- {
-#ifdef SIGCLD
- case SIGCLD:
- break;
-#endif
- default:
- {
- /*
- * We avoid using the stdio section of the library.
- * The following is generally safe
- */
-
- int digit;
- int number = sig_num;
- int len = 0;
-
- digit = number / 100;
- number %= 100;
- if (digit) buffer[len++] = '0' + digit;
-
- digit = number / 10;
- number %= 10;
- if (digit || len) buffer[len++] = '0' + digit;
-
- digit = number;
- buffer[len++] = '0' + digit;
-
- buffer[ len++ ] = '\n';
-
- write( 2, "Stray signal ", 13 );
- write( 2, buffer, len );
-
- }
- }
-
- /*
- * If it was a "fatal" signal, then exit here
- * If app code has installed a hander for one of these, then
- * we won't call _CPU_Stray_signal, so this is ok.
- */
-
- switch (sig_num) {
- case SIGINT:
- case SIGHUP:
- case SIGQUIT:
- case SIGILL:
-#ifdef SIGEMT
- case SIGEMT:
-#endif
- case SIGKILL:
- case SIGBUS:
- case SIGSEGV:
- case SIGTERM:
- case SIGIOT:
- _CPU_Fatal_error(0x100 + sig_num);
- }
-}
-
-/*PAGE
- *
- * _CPU_Fatal_error
- */
-
-void _CPU_Fatal_error(unsigned32 error)
-{
- setitimer(ITIMER_REAL, 0, 0);
-
- if ( error ) {
-#ifdef RTEMS_DEBUG
- abort();
-#endif
- if (getenv("RTEMS_DEBUG"))
- abort();
- }
-
- _exit(error);
-}
-
-/*
- * Special Purpose Routines to hide the use of UNIX system calls.
- */
-
-int _CPU_Set_sync_io_handler(
- int fd,
- boolean read,
- boolean write,
- boolean except,
- rtems_sync_io_handler handler
-)
-{
- if ((fd < FD_SETSIZE) && (_CPU_Sync_io_handlers[fd] == NULL)) {
- if (read)
- FD_SET(fd, &sync_io_readfds);
- else
- FD_CLR(fd, &sync_io_readfds);
- if (write)
- FD_SET(fd, &sync_io_writefds);
- else
- FD_CLR(fd, &sync_io_writefds);
- if (except)
- FD_SET(fd, &sync_io_exceptfds);
- else
- FD_CLR(fd, &sync_io_exceptfds);
- _CPU_Sync_io_handlers[fd] = handler;
- if ((fd + 1) > sync_io_nfds)
- sync_io_nfds = fd + 1;
- return 0;
- }
- return -1;
-}
-
-int _CPU_Clear_sync_io_handler(
- int fd
-)
-{
- if ((fd < FD_SETSIZE) && _CPU_Sync_io_handlers[fd]) {
- FD_CLR(fd, &sync_io_readfds);
- FD_CLR(fd, &sync_io_writefds);
- FD_CLR(fd, &sync_io_exceptfds);
- _CPU_Sync_io_handlers[fd] = NULL;
- sync_io_nfds = 0;
- for (fd = 0; fd < FD_SETSIZE; fd++)
- if (FD_ISSET(fd, &sync_io_readfds) ||
- FD_ISSET(fd, &sync_io_writefds) ||
- FD_ISSET(fd, &sync_io_exceptfds))
- sync_io_nfds = fd + 1;
- return 0;
- }
- return -1;
-}
-
-int _CPU_Get_clock_vector( void )
-{
- return SIGALRM;
-}
-
-void _CPU_Start_clock(
- int microseconds
-)
-{
- struct itimerval new;
-
- new.it_value.tv_sec = 0;
- new.it_value.tv_usec = microseconds;
- new.it_interval.tv_sec = 0;
- new.it_interval.tv_usec = microseconds;
-
- setitimer(ITIMER_REAL, &new, 0);
-}
-
-void _CPU_Stop_clock( void )
-{
- struct itimerval new;
- struct sigaction act;
-
- /*
- * Set the SIGALRM signal to ignore any last
- * signals that might come in while we are
- * disarming the timer and removing the interrupt
- * vector.
- */
-
- (void) memset(&act, 0, sizeof(act));
- act.sa_handler = SIG_IGN;
-
- sigaction(SIGALRM, &act, 0);
-
- (void) memset(&new, 0, sizeof(new));
- setitimer(ITIMER_REAL, &new, 0);
-}
-
-extern void fix_syscall_errno( void );
-
-#if defined(RTEMS_MULTIPROCESSING)
-int _CPU_SHM_Semid;
-
-void _CPU_SHM_Init(
- unsigned32 maximum_nodes,
- boolean is_master_node,
- void **shm_address,
- unsigned32 *shm_length
-)
-{
- int i;
- int shmid;
- char *shm_addr;
- key_t shm_key;
- key_t sem_key;
- int status = 0; /* to avoid unitialized warnings */
- int shm_size;
-
- if (getenv("RTEMS_SHM_KEY"))
- shm_key = strtol(getenv("RTEMS_SHM_KEY"), 0, 0);
- else
-#ifdef RTEMS_SHM_KEY
- shm_key = RTEMS_SHM_KEY;
-#else
- shm_key = 0xa000;
-#endif
-
- if (getenv("RTEMS_SHM_SIZE"))
- shm_size = strtol(getenv("RTEMS_SHM_SIZE"), 0, 0);
- else
-#ifdef RTEMS_SHM_SIZE
- shm_size = RTEMS_SHM_SIZE;
-#else
- shm_size = 64 * 1024;
-#endif
-
- if (getenv("RTEMS_SHM_SEMAPHORE_KEY"))
- sem_key = strtol(getenv("RTEMS_SHM_SEMAPHORE_KEY"), 0, 0);
- else
-#ifdef RTEMS_SHM_SEMAPHORE_KEY
- sem_key = RTEMS_SHM_SEMAPHORE_KEY;
-#else
- sem_key = 0xa001;
-#endif
-
- shmid = shmget(shm_key, shm_size, IPC_CREAT | 0660);
- if ( shmid == -1 ) {
- fix_syscall_errno(); /* in case of newlib */
- perror( "shmget" );
- _CPU_Fatal_halt( 0xdead0001 );
- }
-
- shm_addr = shmat(shmid, (char *)0, SHM_RND);
- if ( shm_addr == (void *)-1 ) {
- fix_syscall_errno(); /* in case of newlib */
- perror( "shmat" );
- _CPU_Fatal_halt( 0xdead0002 );
- }
-
- _CPU_SHM_Semid = semget(sem_key, maximum_nodes + 1, IPC_CREAT | 0660);
- if ( _CPU_SHM_Semid == -1 ) {
- fix_syscall_errno(); /* in case of newlib */
- perror( "semget" );
- _CPU_Fatal_halt( 0xdead0003 );
- }
-
- if ( is_master_node ) {
- for ( i=0 ; i <= maximum_nodes ; i++ ) {
-#if !HAS_UNION_SEMUN
- union semun {
- int val;
- struct semid_ds *buf;
- unsigned short int *array;
-#if defined(__linux__)
- struct seminfo *__buf;
-#endif
- } ;
-#endif
- union semun help ;
- help.val = 1;
- status = semctl( _CPU_SHM_Semid, i, SETVAL, help );
-
- fix_syscall_errno(); /* in case of newlib */
- if ( status == -1 ) {
- _CPU_Fatal_halt( 0xdead0004 );
- }
- }
- }
-
- *shm_address = shm_addr;
- *shm_length = shm_size;
-
-}
-#endif
-
-int _CPU_Get_pid( void )
-{
- return getpid();
-}
-
-#if defined(RTEMS_MULTIPROCESSING)
-/*
- * Define this to use signals for MPCI shared memory driver.
- * If undefined, the shared memory driver will poll from the
- * clock interrupt.
- * Ref: ../shmsupp/getcfg.c
- *
- * BEWARE:: many UN*X kernels and debuggers become severely confused when
- * debugging programs which use signals. The problem is *much*
- * worse when using multiple signals, since ptrace(2) tends to
- * drop all signals except 1 in the case of multiples.
- * On hpux9, this problem was so bad, we couldn't use interrupts
- * with the shared memory driver if we ever hoped to debug
- * RTEMS programs.
- * Maybe systems that use /proc don't have this problem...
- */
-
-
-int _CPU_SHM_Get_vector( void )
-{
-#ifdef CPU_USE_SHM_INTERRUPTS
- return SIGUSR1;
-#else
- return 0;
-#endif
-}
-
-void _CPU_SHM_Send_interrupt(
- int pid,
- int vector
-)
-{
- kill((pid_t) pid, vector);
-}
-
-void _CPU_SHM_Lock(
- int semaphore
-)
-{
- struct sembuf sb;
-
- sb.sem_num = semaphore;
- sb.sem_op = -1;
- sb.sem_flg = 0;
-
- while (1) {
- int status = -1;
-
- status = semop(_CPU_SHM_Semid, &sb, 1);
- if ( status >= 0 )
- break;
- if ( status == -1 ) {
- fix_syscall_errno(); /* in case of newlib */
- if (errno == EINTR)
- continue;
- perror("shm lock");
- _CPU_Fatal_halt( 0xdead0005 );
- }
- }
-
-}
-
-void _CPU_SHM_Unlock(
- int semaphore
-)
-{
- struct sembuf sb;
- int status;
-
- sb.sem_num = semaphore;
- sb.sem_op = 1;
- sb.sem_flg = 0;
-
- while (1) {
- status = semop(_CPU_SHM_Semid, &sb, 1);
- if ( status >= 0 )
- break;
-
- if ( status == -1 ) {
- fix_syscall_errno(); /* in case of newlib */
- if (errno == EINTR)
- continue;
- perror("shm unlock");
- _CPU_Fatal_halt( 0xdead0006 );
- }
- }
-
-}
-#endif
diff --git a/cpukit/score/cpu/unix/rtems/score/cpu.h b/cpukit/score/cpu/unix/rtems/score/cpu.h
deleted file mode 100644
index 75eb07af74..0000000000
--- a/cpukit/score/cpu/unix/rtems/score/cpu.h
+++ /dev/null
@@ -1,1095 +0,0 @@
-/* cpu.h
- *
- * This include file contains information pertaining to the HP
- * PA-RISC processor (Level 1.1).
- *
- * COPYRIGHT (c) 1994 by Division Incorporated
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __CPU_h
-#define __CPU_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/unix.h> /* pick up machine definitions */
-#ifndef ASM
-#include <rtems/score/unixtypes.h>
-#endif
-
-#include <rtems/score/unixsize.h>
-
-#if defined(solaris2)
-#undef _POSIX_C_SOURCE
-#define _POSIX_C_SOURCE 3
-#undef __STRICT_ANSI__
-#define __STRICT_ANSI__
-#endif
-
-#if defined(linux)
-#define MALLOC_0_RETURNS_NULL
-#endif
-
-/* conditional compilation parameters */
-
-/*
- * Should the calls to _Thread_Enable_dispatch be inlined?
- *
- * If TRUE, then they are inlined.
- * If FALSE, then a subroutine call is made.
- *
- * Basically this is an example of the classic trade-off of size
- * versus speed. Inlining the call (TRUE) typically increases the
- * size of RTEMS while speeding up the enabling of dispatching.
- * [NOTE: In general, the _Thread_Dispatch_disable_level will
- * only be 0 or 1 unless you are in an interrupt handler and that
- * interrupt handler invokes the executive.] When not inlined
- * something calls _Thread_Enable_dispatch which in turns calls
- * _Thread_Dispatch. If the enable dispatch is inlined, then
- * one subroutine call is avoided entirely.]
- */
-
-#define CPU_INLINE_ENABLE_DISPATCH FALSE
-
-/*
- * Should the body of the search loops in _Thread_queue_Enqueue_priority
- * be unrolled one time? In unrolled each iteration of the loop examines
- * two "nodes" on the chain being searched. Otherwise, only one node
- * is examined per iteration.
- *
- * If TRUE, then the loops are unrolled.
- * If FALSE, then the loops are not unrolled.
- *
- * The primary factor in making this decision is the cost of disabling
- * and enabling interrupts (_ISR_Flash) versus the cost of rest of the
- * body of the loop. On some CPUs, the flash is more expensive than
- * one iteration of the loop body. In this case, it might be desirable
- * to unroll the loop. It is important to note that on some CPUs, this
- * code is the longest interrupt disable period in RTEMS. So it is
- * necessary to strike a balance when setting this parameter.
- */
-
-#define CPU_UNROLL_ENQUEUE_PRIORITY TRUE
-
-/*
- * Does RTEMS manage a dedicated interrupt stack in software?
- *
- * If TRUE, then a stack is allocated in _Interrupt_Manager_initialization.
- * If FALSE, nothing is done.
- *
- * If the CPU supports a dedicated interrupt stack in hardware,
- * then it is generally the responsibility of the BSP to allocate it
- * and set it up.
- *
- * If the CPU does not support a dedicated interrupt stack, then
- * the porter has two options: (1) execute interrupts on the
- * stack of the interrupted task, and (2) have RTEMS manage a dedicated
- * interrupt stack.
- *
- * If this is TRUE, CPU_ALLOCATE_INTERRUPT_STACK should also be TRUE.
- *
- * Only one of CPU_HAS_SOFTWARE_INTERRUPT_STACK and
- * CPU_HAS_HARDWARE_INTERRUPT_STACK should be set to TRUE. It is
- * possible that both are FALSE for a particular CPU. Although it
- * is unclear what that would imply about the interrupt processing
- * procedure on that CPU.
- */
-
-#define CPU_HAS_SOFTWARE_INTERRUPT_STACK FALSE
-
-/*
- * Does this CPU have hardware support for a dedicated interrupt stack?
- *
- * If TRUE, then it must be installed during initialization.
- * If FALSE, then no installation is performed.
- *
- * If this is TRUE, CPU_ALLOCATE_INTERRUPT_STACK should also be TRUE.
- *
- * Only one of CPU_HAS_SOFTWARE_INTERRUPT_STACK and
- * CPU_HAS_HARDWARE_INTERRUPT_STACK should be set to TRUE. It is
- * possible that both are FALSE for a particular CPU. Although it
- * is unclear what that would imply about the interrupt processing
- * procedure on that CPU.
- */
-
-#define CPU_HAS_HARDWARE_INTERRUPT_STACK TRUE
-
-/*
- * Does RTEMS allocate a dedicated interrupt stack in the Interrupt Manager?
- *
- * If TRUE, then the memory is allocated during initialization.
- * If FALSE, then the memory is allocated during initialization.
- *
- * This should be TRUE if CPU_HAS_SOFTWARE_INTERRUPT_STACK is TRUE
- * or CPU_INSTALL_HARDWARE_INTERRUPT_STACK is TRUE.
- */
-
-#define CPU_ALLOCATE_INTERRUPT_STACK FALSE
-
-/*
- * Does the RTEMS invoke the user's ISR with the vector number and
- * a pointer to the saved interrupt frame (1) or just the vector
- * number (0)?
- */
-
-#define CPU_ISR_PASSES_FRAME_POINTER 0
-
-/*
- * Does the CPU have hardware floating point?
- *
- * If TRUE, then the RTEMS_FLOATING_POINT task attribute is supported.
- * If FALSE, then the RTEMS_FLOATING_POINT task attribute is ignored.
- *
- * If there is a FP coprocessor such as the i387 or mc68881, then
- * the answer is TRUE.
- *
- * The macro name "NO_CPU_HAS_FPU" should be made CPU specific.
- * It indicates whether or not this CPU model has FP support. For
- * example, it would be possible to have an i386_nofp CPU model
- * which set this to false to indicate that you have an i386 without
- * an i387 and wish to leave floating point support out of RTEMS.
- */
-
-#define CPU_HARDWARE_FP TRUE
-
-/*
- * Are all tasks RTEMS_FLOATING_POINT tasks implicitly?
- *
- * If TRUE, then the RTEMS_FLOATING_POINT task attribute is assumed.
- * If FALSE, then the RTEMS_FLOATING_POINT task attribute is followed.
- *
- * So far, the only CPU in which this option has been used is the
- * HP PA-RISC. The HP C compiler and gcc both implicitly use the
- * floating point registers to perform integer multiplies. If
- * a function which you would not think utilize the FP unit DOES,
- * then one can not easily predict which tasks will use the FP hardware.
- * In this case, this option should be TRUE.
- *
- * If CPU_HARDWARE_FP is FALSE, then this should be FALSE as well.
- */
-
-#define CPU_ALL_TASKS_ARE_FP FALSE
-
-/*
- * Should the IDLE task have a floating point context?
- *
- * If TRUE, then the IDLE task is created as a RTEMS_FLOATING_POINT task
- * and it has a floating point context which is switched in and out.
- * If FALSE, then the IDLE task does not have a floating point context.
- *
- * Setting this to TRUE negatively impacts the time required to preempt
- * the IDLE task from an interrupt because the floating point context
- * must be saved as part of the preemption.
- */
-
-#define CPU_IDLE_TASK_IS_FP FALSE
-
-/*
- * Should the saving of the floating point registers be deferred
- * until a context switch is made to another different floating point
- * task?
- *
- * If TRUE, then the floating point context will not be stored until
- * necessary. It will remain in the floating point registers and not
- * disturned until another floating point task is switched to.
- *
- * If FALSE, then the floating point context is saved when a floating
- * point task is switched out and restored when the next floating point
- * task is restored. The state of the floating point registers between
- * those two operations is not specified.
- *
- * If the floating point context does NOT have to be saved as part of
- * interrupt dispatching, then it should be safe to set this to TRUE.
- *
- * Setting this flag to TRUE results in using a different algorithm
- * for deciding when to save and restore the floating point context.
- * The deferred FP switch algorithm minimizes the number of times
- * the FP context is saved and restored. The FP context is not saved
- * until a context switch is made to another, different FP task.
- * Thus in a system with only one FP task, the FP context will never
- * be saved or restored.
- */
-
-#define CPU_USE_DEFERRED_FP_SWITCH TRUE
-
-/*
- * Does this port provide a CPU dependent IDLE task implementation?
- *
- * If TRUE, then the routine _CPU_Thread_Idle_body
- * must be provided and is the default IDLE thread body instead of
- * _CPU_Thread_Idle_body.
- *
- * If FALSE, then use the generic IDLE thread body if the BSP does
- * not provide one.
- *
- * This is intended to allow for supporting processors which have
- * a low power or idle mode. When the IDLE thread is executed, then
- * the CPU can be powered down.
- *
- * The order of precedence for selecting the IDLE thread body is:
- *
- * 1. BSP provided
- * 2. CPU dependent (if provided)
- * 3. generic (if no BSP and no CPU dependent)
- */
-
-#define CPU_PROVIDES_IDLE_THREAD_BODY TRUE
-
-/*
- * Does the stack grow up (toward higher addresses) or down
- * (toward lower addresses)?
- *
- * If TRUE, then the grows upward.
- * If FALSE, then the grows toward smaller addresses.
- */
-
-#if defined(__hppa__)
-#define CPU_STACK_GROWS_UP TRUE
-#elif defined(__sparc__) || defined(__i386__)
-#define CPU_STACK_GROWS_UP FALSE
-#else
-#error "unknown CPU!!"
-#endif
-
-
-/*
- * The following is the variable attribute used to force alignment
- * of critical RTEMS structures. On some processors it may make
- * sense to have these aligned on tighter boundaries than
- * the minimum requirements of the compiler in order to have as
- * much of the critical data area as possible in a cache line.
- *
- * The placement of this macro in the declaration of the variables
- * is based on the syntactically requirements of the GNU C
- * "__attribute__" extension. For example with GNU C, use
- * the following to force a structures to a 32 byte boundary.
- *
- * __attribute__ ((aligned (32)))
- *
- * NOTE: Currently only the Priority Bit Map table uses this feature.
- * To benefit from using this, the data must be heavily
- * used so it will stay in the cache and used frequently enough
- * in the executive to justify turning this on.
- */
-
-#ifdef __GNUC__
-#define CPU_STRUCTURE_ALIGNMENT __attribute__ ((aligned (32)))
-#else
-#define CPU_STRUCTURE_ALIGNMENT
-#endif
-
-/*
- * Define what is required to specify how the network to host conversion
- * routines are handled.
- */
-
-#if defined(__hppa__) || defined(__sparc__)
-#define CPU_HAS_OWN_HOST_TO_NETWORK_ROUTINES FALSE
-#define CPU_BIG_ENDIAN TRUE
-#define CPU_LITTLE_ENDIAN FALSE
-#elif defined(__i386__)
-#define CPU_HAS_OWN_HOST_TO_NETWORK_ROUTINES FALSE
-#define CPU_BIG_ENDIAN FALSE
-#define CPU_LITTLE_ENDIAN TRUE
-#else
-#error "Unknown CPU!!!"
-#endif
-
-/*
- * The following defines the number of bits actually used in the
- * interrupt field of the task mode. How those bits map to the
- * CPU interrupt levels is defined by the routine _CPU_ISR_Set_level().
- */
-
-#define CPU_MODES_INTERRUPT_MASK 0x00000001
-
-#define CPU_NAME "UNIX"
-
-/*
- * Processor defined structures
- *
- * Examples structures include the descriptor tables from the i386
- * and the processor control structure on the i960ca.
- */
-
-/* may need to put some structures here. */
-
-#if defined(__hppa__)
-/*
- * Word indices within a jmp_buf structure
- */
-
-#ifdef RTEMS_NEWLIB_SETJMP
-#define RP_OFF 6
-#define SP_OFF 2
-#define R3_OFF 10
-#define R4_OFF 11
-#define R5_OFF 12
-#define R6_OFF 13
-#define R7_OFF 14
-#define R8_OFF 15
-#define R9_OFF 16
-#define R10_OFF 17
-#define R11_OFF 18
-#define R12_OFF 19
-#define R13_OFF 20
-#define R14_OFF 21
-#define R15_OFF 22
-#define R16_OFF 23
-#define R17_OFF 24
-#define R18_OFF 25
-#define DP_OFF 26
-#endif
-
-#ifdef RTEMS_UNIXLIB_SETJMP
-#define RP_OFF 0
-#define SP_OFF 1
-#define R3_OFF 4
-#define R4_OFF 5
-#define R5_OFF 6
-#define R6_OFF 7
-#define R7_OFF 8
-#define R8_OFF 9
-#define R9_OFF 10
-#define R10_OFF 11
-#define R11_OFF 12
-#define R12_OFF 13
-#define R13_OFF 14
-#define R14_OFF 15
-#define R15_OFF 16
-#define R16_OFF 17
-#define R17_OFF 18
-#define R18_OFF 19
-#define DP_OFF 20
-#endif
-#endif
-
-#if defined(__i386__)
-
-#ifdef RTEMS_NEWLIB
-#error "Newlib not installed"
-#endif
-
-/*
- * For Linux 1.1
- */
-
-#ifdef RTEMS_UNIXLIB
-#if defined(__FreeBSD__)
-#define RET_OFF 0
-#define EBX_OFF 1
-#define EBP_OFF 2
-#define ESP_OFF 3
-#define ESI_OFF 4
-#define EDI_OFF 5
-#else
-#define EBX_OFF 0
-#define ESI_OFF 1
-#define EDI_OFF 2
-#define EBP_OFF 3
-#define ESP_OFF 4
-#define RET_OFF 5
-#endif
-#endif
-
-#endif
-
-#if defined(__sparc__)
-
-/*
- * Word indices within a jmp_buf structure
- */
-
-#ifdef RTEMS_NEWLIB
-#define ADDR_ADJ_OFFSET -8
-#define SP_OFF 0
-#define RP_OFF 1
-#define FP_OFF 2
-#endif
-
-#ifdef RTEMS_UNIXLIB
-#define ADDR_ADJ_OFFSET 0
-#define G0_OFF 0
-#define SP_OFF 1
-#define RP_OFF 2
-#define FP_OFF 3
-#define I7_OFF 4
-#endif
-
-#endif
-
-/*
- * Contexts
- *
- * Generally there are 2 types of context to save.
- * 1. Interrupt registers to save
- * 2. Task level registers to save
- *
- * This means we have the following 3 context items:
- * 1. task level context stuff:: Context_Control
- * 2. floating point task stuff:: Context_Control_fp
- * 3. special interrupt level context :: Context_Control_interrupt
- *
- * On some processors, it is cost-effective to save only the callee
- * preserved registers during a task context switch. This means
- * that the ISR code needs to save those registers which do not
- * persist across function calls. It is not mandatory to make this
- * distinctions between the caller/callee saves registers for the
- * purpose of minimizing context saved during task switch and on interrupts.
- * If the cost of saving extra registers is minimal, simplicity is the
- * choice. Save the same context on interrupt entry as for tasks in
- * this case.
- *
- * Additionally, if gdb is to be made aware of RTEMS tasks for this CPU, then
- * care should be used in designing the context area.
- *
- * On some CPUs with hardware floating point support, the Context_Control_fp
- * structure will not be used or it simply consist of an array of a
- * fixed number of bytes. This is done when the floating point context
- * is dumped by a "FP save context" type instruction and the format
- * is not really defined by the CPU. In this case, there is no need
- * to figure out the exact format -- only the size. Of course, although
- * this is enough information for RTEMS, it is probably not enough for
- * a debugger such as gdb. But that is another problem.
- */
-
-/*
- * This is really just the area for the following fields.
- *
- * jmp_buf regs;
- * unsigned32 isr_level;
- *
- * Doing it this way avoids conflicts between the native stuff and the
- * RTEMS stuff.
- *
- * NOTE:
- * hpux9 setjmp is optimized for the case where the setjmp buffer
- * is 8 byte aligned. In a RISC world, this seems likely to enable
- * 8 byte copies, especially for the float registers.
- * So we always align them on 8 byte boundaries.
- */
-
-#ifdef __GNUC__
-#define CONTEXT_STRUCTURE_ALIGNMENT __attribute__ ((aligned (8)))
-#else
-#define CONTEXT_STRUCTURE_ALIGNMENT
-#endif
-
-typedef struct {
- char Area[ CPU_CONTEXT_SIZE_IN_BYTES ] CONTEXT_STRUCTURE_ALIGNMENT;
-} Context_Control;
-
-typedef struct {
-} Context_Control_fp;
-
-typedef struct {
-} CPU_Interrupt_frame;
-
-
-/*
- * The following table contains the information required to configure
- * the UNIX Simulator specific parameters.
- */
-
-typedef struct {
- void (*pretasking_hook)( void );
- void (*predriver_hook)( void );
- void (*postdriver_hook)( void );
- void (*idle_task)( void );
- boolean do_zero_of_workspace;
- unsigned32 idle_task_stack_size;
- unsigned32 interrupt_stack_size;
- unsigned32 extra_mpci_receive_server_stack;
- void * (*stack_allocate_hook)( unsigned32 );
- void (*stack_free_hook)( void* );
- /* end of required fields */
-} rtems_cpu_table;
-
-/*
- * Macros to access required entires in the CPU Table are in
- * the file rtems/system.h.
- */
-
-/*
- * Macros to access UNIX specific additions to the CPU Table
- */
-
-/* There are no CPU specific additions to the CPU Table for this port. */
-
-/*
- * This variable is optional. It is used on CPUs on which it is difficult
- * to generate an "uninitialized" FP context. It is filled in by
- * _CPU_Initialize and copied into the task's FP context area during
- * _CPU_Context_Initialize.
- */
-
-SCORE_EXTERN Context_Control_fp _CPU_Null_fp_context;
-
-/*
- * On some CPUs, RTEMS supports a software managed interrupt stack.
- * This stack is allocated by the Interrupt Manager and the switch
- * is performed in _ISR_Handler. These variables contain pointers
- * to the lowest and highest addresses in the chunk of memory allocated
- * for the interrupt stack. Since it is unknown whether the stack
- * grows up or down (in general), this give the CPU dependent
- * code the option of picking the version it wants to use.
- *
- * NOTE: These two variables are required if the macro
- * CPU_HAS_SOFTWARE_INTERRUPT_STACK is defined as TRUE.
- */
-
-SCORE_EXTERN void *_CPU_Interrupt_stack_low;
-SCORE_EXTERN void *_CPU_Interrupt_stack_high;
-
-/*
- * With some compilation systems, it is difficult if not impossible to
- * call a high-level language routine from assembly language. This
- * is especially true of commercial Ada compilers and name mangling
- * C++ ones. This variable can be optionally defined by the CPU porter
- * and contains the address of the routine _Thread_Dispatch. This
- * can make it easier to invoke that routine at the end of the interrupt
- * sequence (if a dispatch is necessary).
- */
-
-SCORE_EXTERN void (*_CPU_Thread_dispatch_pointer)();
-
-/*
- * Nothing prevents the porter from declaring more CPU specific variables.
- */
-
-/* XXX: if needed, put more variables here */
-
-/*
- * The size of the floating point context area. On some CPUs this
- * will not be a "sizeof" because the format of the floating point
- * area is not defined -- only the size is. This is usually on
- * CPUs with a "floating point save context" instruction.
- */
-
-#define CPU_CONTEXT_FP_SIZE sizeof( Context_Control_fp )
-
-/*
- * The size of a frame on the stack
- */
-
-#if defined(__hppa__)
-#define CPU_FRAME_SIZE (32 * 4)
-#elif defined(__sparc__)
-#define CPU_FRAME_SIZE (112) /* based on disassembled test code */
-#elif defined(__i386__)
-#define CPU_FRAME_SIZE (24) /* return address, sp, and bp pushed plus fudge */
-#else
-#error "Unknown CPU!!!"
-#endif
-
-/*
- * Amount of extra stack (above minimum stack size) required by
- * MPCI receive server thread. Remember that in a multiprocessor
- * system this thread must exist and be able to process all directives.
- */
-
-#define CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK 0
-
-/*
- * This defines the number of entries in the ISR_Vector_table managed
- * by RTEMS.
- */
-
-#define CPU_INTERRUPT_NUMBER_OF_VECTORS 64
-#define CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER (CPU_INTERRUPT_NUMBER_OF_VECTORS - 1)
-
-/*
- * Should be large enough to run all RTEMS tests. This insures
- * that a "reasonable" small application should not have any problems.
- */
-
-#define CPU_STACK_MINIMUM_SIZE (16 * 1024)
-
-/*
- * CPU's worst alignment requirement for data types on a byte boundary. This
- * alignment does not take into account the requirements for the stack.
- */
-
-#define CPU_ALIGNMENT 8
-
-/*
- * This number corresponds to the byte alignment requirement for the
- * heap handler. This alignment requirement may be stricter than that
- * for the data types alignment specified by CPU_ALIGNMENT. It is
- * common for the heap to follow the same alignment requirement as
- * CPU_ALIGNMENT. If the CPU_ALIGNMENT is strict enough for the heap,
- * then this should be set to CPU_ALIGNMENT.
- *
- * NOTE: This does not have to be a power of 2. It does have to
- * be greater or equal to than CPU_ALIGNMENT.
- */
-
-#define CPU_HEAP_ALIGNMENT CPU_ALIGNMENT
-
-/*
- * This number corresponds to the byte alignment requirement for memory
- * buffers allocated by the partition manager. This alignment requirement
- * may be stricter than that for the data types alignment specified by
- * CPU_ALIGNMENT. It is common for the partition to follow the same
- * alignment requirement as CPU_ALIGNMENT. If the CPU_ALIGNMENT is strict
- * enough for the partition, then this should be set to CPU_ALIGNMENT.
- *
- * NOTE: This does not have to be a power of 2. It does have to
- * be greater or equal to than CPU_ALIGNMENT.
- */
-
-#define CPU_PARTITION_ALIGNMENT CPU_ALIGNMENT
-
-/*
- * This number corresponds to the byte alignment requirement for the
- * stack. This alignment requirement may be stricter than that for the
- * data types alignment specified by CPU_ALIGNMENT. If the CPU_ALIGNMENT
- * is strict enough for the stack, then this should be set to 0.
- *
- * NOTE: This must be a power of 2 either 0 or greater than CPU_ALIGNMENT.
- */
-
-#define CPU_STACK_ALIGNMENT 64
-
-/* ISR handler macros */
-
-/*
- * Disable all interrupts for an RTEMS critical section. The previous
- * level is returned in _level.
- */
-
-extern unsigned32 _CPU_ISR_Disable_support(void);
-
-#define _CPU_ISR_Disable( _level ) \
- do { \
- (_level) = _CPU_ISR_Disable_support(); \
- } while ( 0 )
-
-/*
- * Enable interrupts to the previous level (returned by _CPU_ISR_Disable).
- * This indicates the end of an RTEMS critical section. The parameter
- * _level is not modified.
- */
-
-void _CPU_ISR_Enable(unsigned32 level);
-
-/*
- * This temporarily restores the interrupt to _level before immediately
- * disabling them again. This is used to divide long RTEMS critical
- * sections into two or more parts. The parameter _level is not
- * modified.
- */
-
-#define _CPU_ISR_Flash( _level ) \
- do { \
- register unsigned32 _ignored = 0; \
- _CPU_ISR_Enable( (_level) ); \
- _CPU_ISR_Disable( _ignored ); \
- } while ( 0 )
-
-/*
- * Map interrupt level in task mode onto the hardware that the CPU
- * actually provides. Currently, interrupt levels which do not
- * map onto the CPU in a generic fashion are undefined. Someday,
- * it would be nice if these were "mapped" by the application
- * via a callout. For example, m68k has 8 levels 0 - 7, levels
- * 8 - 255 would be available for bsp/application specific meaning.
- * This could be used to manage a programmable interrupt controller
- * via the rtems_task_mode directive.
- */
-
-#define _CPU_ISR_Set_level( new_level ) \
- { \
- if ( new_level == 0 ) _CPU_ISR_Enable( 0 ); \
- else _CPU_ISR_Enable( 1 ); \
- }
-
-unsigned32 _CPU_ISR_Get_level( void );
-
-/* end of ISR handler macros */
-
-/* Context handler macros */
-
-/*
- * This routine is responsible for somehow restarting the currently
- * executing task. If you are lucky, then all that is necessary
- * is restoring the context. Otherwise, there will need to be
- * a special assembly routine which does something special in this
- * case. Context_Restore should work most of the time. It will
- * not work if restarting self conflicts with the stack frame
- * assumptions of restoring a context.
- */
-
-#define _CPU_Context_Restart_self( _the_context ) \
- _CPU_Context_restore( (_the_context) );
-
-/*
- * The purpose of this macro is to allow the initial pointer into
- * a floating point context area (used to save the floating point
- * context) to be at an arbitrary place in the floating point
- * context area.
- *
- * This is necessary because some FP units are designed to have
- * their context saved as a stack which grows into lower addresses.
- * Other FP units can be saved by simply moving registers into offsets
- * from the base of the context area. Finally some FP units provide
- * a "dump context" instruction which could fill in from high to low
- * or low to high based on the whim of the CPU designers.
- */
-
-#define _CPU_Context_Fp_start( _base, _offset ) \
- ( (void *) _Addresses_Add_offset( (_base), (_offset) ) )
-
-/*
- * This routine initializes the FP context area passed to it to.
- * There are a few standard ways in which to initialize the
- * floating point context. The code included for this macro assumes
- * that this is a CPU in which a "initial" FP context was saved into
- * _CPU_Null_fp_context and it simply copies it to the destination
- * context passed to it.
- *
- * Other models include (1) not doing anything, and (2) putting
- * a "null FP status word" in the correct place in the FP context.
- */
-
-#define _CPU_Context_Initialize_fp( _destination ) \
- { \
- *((Context_Control_fp *) *((void **) _destination)) = _CPU_Null_fp_context; \
- }
-
-#define _CPU_Context_save_fp( _fp_context ) \
- _CPU_Save_float_context( *(Context_Control_fp **)(_fp_context))
-
-#define _CPU_Context_restore_fp( _fp_context ) \
- _CPU_Restore_float_context( *(Context_Control_fp **)(_fp_context))
-
-extern void _CPU_Context_Initialize(
- Context_Control *_the_context,
- unsigned32 *_stack_base,
- unsigned32 _size,
- unsigned32 _new_level,
- void *_entry_point,
- boolean _is_fp
-);
-
-/* end of Context handler macros */
-
-/* Fatal Error manager macros */
-
-/*
- * This routine copies _error into a known place -- typically a stack
- * location or a register, optionally disables interrupts, and
- * halts/stops the CPU.
- */
-
-#define _CPU_Fatal_halt( _error ) \
- _CPU_Fatal_error( _error )
-
-/* end of Fatal Error manager macros */
-
-/* Bitfield handler macros */
-
-/*
- * This routine sets _output to the bit number of the first bit
- * set in _value. _value is of CPU dependent type Priority_Bit_map_control.
- * This type may be either 16 or 32 bits wide although only the 16
- * least significant bits will be used.
- *
- * There are a number of variables in using a "find first bit" type
- * instruction.
- *
- * (1) What happens when run on a value of zero?
- * (2) Bits may be numbered from MSB to LSB or vice-versa.
- * (3) The numbering may be zero or one based.
- * (4) The "find first bit" instruction may search from MSB or LSB.
- *
- * RTEMS guarantees that (1) will never happen so it is not a concern.
- * (2),(3), (4) are handled by the macros _CPU_Priority_mask() and
- * _CPU_Priority_bits_index(). These three form a set of routines
- * which must logically operate together. Bits in the _value are
- * set and cleared based on masks built by _CPU_Priority_mask().
- * The basic major and minor values calculated by _Priority_Major()
- * and _Priority_Minor() are "massaged" by _CPU_Priority_bits_index()
- * to properly range between the values returned by the "find first bit"
- * instruction. This makes it possible for _Priority_Get_highest() to
- * calculate the major and directly index into the minor table.
- * This mapping is necessary to ensure that 0 (a high priority major/minor)
- * is the first bit found.
- *
- * This entire "find first bit" and mapping process depends heavily
- * on the manner in which a priority is broken into a major and minor
- * components with the major being the 4 MSB of a priority and minor
- * the 4 LSB. Thus (0 << 4) + 0 corresponds to priority 0 -- the highest
- * priority. And (15 << 4) + 14 corresponds to priority 254 -- the next
- * to the lowest priority.
- *
- * If your CPU does not have a "find first bit" instruction, then
- * there are ways to make do without it. Here are a handful of ways
- * to implement this in software:
- *
- * - a series of 16 bit test instructions
- * - a "binary search using if's"
- * - _number = 0
- * if _value > 0x00ff
- * _value >>=8
- * _number = 8;
- *
- * if _value > 0x0000f
- * _value >=8
- * _number += 4
- *
- * _number += bit_set_table[ _value ]
- *
- * where bit_set_table[ 16 ] has values which indicate the first
- * bit set
- */
-
-/*
- * The UNIX port uses the generic C algorithm for bitfield scan to avoid
- * dependencies on either a native bitscan instruction or an ffs() in the
- * C library.
- */
-
-#define CPU_USE_GENERIC_BITFIELD_CODE TRUE
-#define CPU_USE_GENERIC_BITFIELD_DATA TRUE
-
-/* end of Bitfield handler macros */
-
-/* Priority handler handler macros */
-
-/*
- * The UNIX port uses the generic C algorithm for bitfield scan to avoid
- * dependencies on either a native bitscan instruction or an ffs() in the
- * C library.
- */
-
-/* end of Priority handler macros */
-
-/* functions */
-
-/*
- * _CPU_Initialize
- *
- * This routine performs CPU dependent initialization.
- */
-
-void _CPU_Initialize(
- rtems_cpu_table *cpu_table,
- void (*thread_dispatch)
-);
-
-/*
- * _CPU_ISR_install_raw_handler
- *
- * This routine installs a "raw" interrupt handler directly into the
- * processor's vector table.
- */
-
-void _CPU_ISR_install_raw_handler(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-);
-
-/*
- * _CPU_ISR_install_vector
- *
- * This routine installs an interrupt vector.
- */
-
-void _CPU_ISR_install_vector(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-);
-
-/*
- * _CPU_Install_interrupt_stack
- *
- * This routine installs the hardware interrupt stack pointer.
- *
- * NOTE: It need only be provided if CPU_HAS_HARDWARE_INTERRUPT_STACK
- * is TRUE.
- */
-
-void _CPU_Install_interrupt_stack( void );
-
-/*
- * _CPU_Thread_Idle_body
- *
- * This routine is the CPU dependent IDLE thread body.
- *
- * NOTE: It need only be provided if CPU_PROVIDES_IDLE_THREAD_BODY
- * is TRUE.
- */
-
-void _CPU_Thread_Idle_body( void );
-
-/*
- * _CPU_Context_switch
- *
- * This routine switches from the run context to the heir context.
- */
-
-void _CPU_Context_switch(
- Context_Control *run,
- Context_Control *heir
-);
-
-/*
- * _CPU_Context_restore
- *
- * This routine is generally used only to restart self in an
- * efficient manner. It may simply be a label in _CPU_Context_switch.
- *
- * NOTE: May be unnecessary to reload some registers.
- */
-
-void _CPU_Context_restore(
- Context_Control *new_context
-);
-
-/*
- * _CPU_Save_float_context
- *
- * This routine saves the floating point context passed to it.
- */
-
-void _CPU_Save_float_context(
- Context_Control_fp *fp_context_ptr
-);
-
-/*
- * _CPU_Restore_float_context
- *
- * This routine restores the floating point context passed to it.
- */
-
-void _CPU_Restore_float_context(
- Context_Control_fp *fp_context_ptr
-);
-
-
-void _CPU_ISR_Set_signal_level(
- unsigned32 level
-);
-
-void _CPU_Fatal_error(
- unsigned32 _error
-);
-
-/* The following routine swaps the endian format of an unsigned int.
- * It must be static because it is referenced indirectly.
- *
- * This version will work on any processor, but if there is a better
- * way for your CPU PLEASE use it. The most common way to do this is to:
- *
- * swap least significant two bytes with 16-bit rotate
- * swap upper and lower 16-bits
- * swap most significant two bytes with 16-bit rotate
- *
- * Some CPUs have special instructions which swap a 32-bit quantity in
- * a single instruction (e.g. i486). It is probably best to avoid
- * an "endian swapping control bit" in the CPU. One good reason is
- * that interrupts would probably have to be disabled to insure that
- * an interrupt does not try to access the same "chunk" with the wrong
- * endian. Another good reason is that on some CPUs, the endian bit
- * endianness for ALL fetches -- both code and data -- so the code
- * will be fetched incorrectly.
- */
-
-static inline unsigned int CPU_swap_u32(
- unsigned int value
-)
-{
- unsigned32 byte1, byte2, byte3, byte4, swapped;
-
- byte4 = (value >> 24) & 0xff;
- byte3 = (value >> 16) & 0xff;
- byte2 = (value >> 8) & 0xff;
- byte1 = value & 0xff;
-
- swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
- return( swapped );
-}
-
-#define CPU_swap_u16( value ) \
- (((value&0xff) << 8) | ((value >> 8)&0xff))
-
-/*
- * Special Purpose Routines to hide the use of UNIX system calls.
- */
-
-
-/*
- * Pointer to a sync io Handler
- */
-
-typedef void ( *rtems_sync_io_handler )(
- int fd,
- boolean read,
- boolean wrtie,
- boolean except
-);
-
-/* returns -1 if fd to large, 0 is successful */
-int _CPU_Set_sync_io_handler(
- int fd,
- boolean read,
- boolean write,
- boolean except,
- rtems_sync_io_handler handler
-);
-
-/* returns -1 if fd to large, o if successful */
-int _CPU_Clear_sync_io_handler(
- int fd
-);
-
-int _CPU_Get_clock_vector( void );
-
-void _CPU_Start_clock(
- int microseconds
-);
-
-void _CPU_Stop_clock( void );
-
-#if defined(RTEMS_MULTIPROCESSING)
-
-void _CPU_SHM_Init(
- unsigned32 maximum_nodes,
- boolean is_master_node,
- void **shm_address,
- unsigned32 *shm_length
-);
-
-int _CPU_Get_pid( void );
-
-int _CPU_SHM_Get_vector( void );
-
-void _CPU_SHM_Send_interrupt(
- int pid,
- int vector
-);
-
-void _CPU_SHM_Lock(
- int semaphore
-);
-
-void _CPU_SHM_Unlock(
- int semaphore
-);
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/cpukit/score/cpu/unix/rtems/score/types.h b/cpukit/score/cpu/unix/rtems/score/types.h
deleted file mode 100644
index f423564ebc..0000000000
--- a/cpukit/score/cpu/unix/rtems/score/types.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* unixtypes.h
- *
- * This include file contains type definitions which are appropriate
- * for a typical modern UNIX box using GNU C for the RTEMS simulator.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __UNIX_TYPES_h
-#define __UNIX_TYPES_h
-
-#ifndef ASM
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * some C++ compilers (eg: HP's) don't do 'signed' or 'volatile'
- */
-#if defined(__cplusplus) && !defined(__GNUC__)
-#define signed
-#define volatile
-#endif
-
-/*
- * This section defines the basic types for this processor.
- */
-
-typedef unsigned char unsigned8; /* unsigned 8-bit integer */
-typedef unsigned short unsigned16; /* unsigned 16-bit integer */
-typedef unsigned int unsigned32; /* unsigned 32-bit integer */
-
-typedef unsigned16 Priority_Bit_map_control;
-
-typedef signed char signed8; /* 8-bit signed integer */
-typedef signed short signed16; /* 16-bit signed integer */
-typedef signed int signed32; /* 32-bit signed integer */
-
-/*
- * some C++ compilers (eg: HP's) don't do 'long long'
- */
-#if defined(__GNUC__)
-typedef unsigned long long unsigned64; /* unsigned 64-bit integer */
-typedef signed long long signed64; /* 64 bit signed integer */
-#endif
-
-typedef unsigned32 boolean; /* Boolean value */
-
-typedef float single_precision; /* single precision float */
-typedef double double_precision; /* double precision float */
-
-typedef void unix_isr;
-
-typedef unix_isr ( *unix_isr_entry )( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !ASM */
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/cpu/unix/rtems/score/unix.h b/cpukit/score/cpu/unix/rtems/score/unix.h
deleted file mode 100644
index 26ef8ca4e4..0000000000
--- a/cpukit/score/cpu/unix/rtems/score/unix.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* unix.h
- *
- * This include file contains the definitions required by RTEMS
- * which are typical for a modern UNIX computer using GCC.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __UNIX_h
-#define __UNIX_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This file contains the information required to build
- * RTEMS for a particular member of the "unix"
- * family when executing in protected mode. It does
- * this by setting variables to indicate which implementation
- * dependent features are present in a particular member
- * of the family.
- */
-
-#if defined(hpux)
-
-#define CPU_MODEL_NAME "HP-UX"
-
-#elif defined(solaris2)
-
-#define CPU_MODEL_NAME "Solaris"
-
-#elif defined(__linux__)
-
-#define CPU_MODEL_NAME "Linux"
-
-#elif defined(linux)
-
-#define CPU_MODEL_NAME "Linux"
-
-#elif defined(__FreeBSD__)
-
-#define CPU_MODEL_NAME "FreeBSD"
-
-#else
-
-#error "Unsupported CPU Model"
-
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/score/include/Makefile.am b/cpukit/score/include/Makefile.am
deleted file mode 100644
index 0c97211587..0000000000
--- a/cpukit/score/include/Makefile.am
+++ /dev/null
@@ -1,10 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-SUBDIRS = rtems
-
-include $(top_srcdir)/../../../automake/subdirs.am
-include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/score/include/rtems/debug.h b/cpukit/score/include/rtems/debug.h
deleted file mode 100644
index 1b142be59f..0000000000
--- a/cpukit/score/include/rtems/debug.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/* debug.h
- *
- * This include file contains the information pertaining to the debug
- * support within RTEMS. It is currently cast in the form of a
- * Manager since it is externally accessible.
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_DEBUG_h
-#define __RTEMS_DEBUG_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * The following type is used to manage the debug mask.
- */
-
-typedef unsigned32 rtems_debug_control;
-
-/*
- * These constants represent various classes of debugging.
- */
-
-#define RTEMS_DEBUG_ALL_MASK 0xffffffff
-#define RTEMS_DEBUG_REGION 0x00000001
-
-/*
- * This variable contains the current debug level.
- */
-
-SCORE_EXTERN rtems_debug_control _Debug_Level;
-
-/*
- * _Debug_Manager_initialization
- *
- * DESCRIPTION:
- *
- * This routine performs the initialization necessary for this manager.
- */
-
-void _Debug_Manager_initialization( void );
-
-/*
- * rtems_debug_enable
- *
- * DESCRIPTION:
- *
- * This routine enables the specified types of debug checks.
- */
-
-void rtems_debug_enable (
- rtems_debug_control to_be_enabled
-);
-
-/*
- * rtems_debug_disable
- *
- * DESCRIPTION:
- *
- * This routine disables the specified types of debug checks.
- */
-
-void rtems_debug_disable (
- rtems_debug_control to_be_disabled
-);
-
-/*
- *
- * _Debug_Is_enabled
- *
- * DESCRIPTION:
- *
- * This routine returns TRUE if the requested debug level is
- * enabled, and FALSE otherwise.
- */
-
-boolean _Debug_Is_enabled(
- rtems_debug_control level
-);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/include/rtems/score/address.h b/cpukit/score/include/rtems/score/address.h
deleted file mode 100644
index edb04729dc..0000000000
--- a/cpukit/score/include/rtems/score/address.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* address.h
- *
- * This include file contains the information required to manipulate
- * physical addresses.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_ADDRESSES_h
-#define __RTEMS_ADDRESSES_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/address.inl>
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/include/rtems/score/apiext.h b/cpukit/score/include/rtems/score/apiext.h
deleted file mode 100644
index 1622f504da..0000000000
--- a/cpukit/score/include/rtems/score/apiext.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/* apiext.h
- *
- * This is the API Extensions Handler.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#ifndef __API_EXTENSIONS_h
-#define __API_EXTENSIONS_h
-
-#include <rtems/score/chain.h>
-#include <rtems/score/thread.h>
-
-/*
- * The control structure which defines the points at which an API
- * can add an extension to the system initialization thread.
- */
-
-typedef void (*API_extensions_Predriver_hook)(void);
-typedef void (*API_extensions_Postdriver_hook)(void);
-typedef void (*API_extensions_Postswitch_hook)(
- Thread_Control *
- );
-
-
-typedef struct {
- Chain_Node Node;
- API_extensions_Predriver_hook predriver_hook;
- API_extensions_Postdriver_hook postdriver_hook;
- API_extensions_Postswitch_hook postswitch_hook;
-} API_extensions_Control;
-
-/*
- * This is the list of API extensions to the system initialization.
- */
-
-SCORE_EXTERN Chain_Control _API_extensions_List;
-
-/*
- * _API_extensions_Initialization
- *
- * DESCRIPTION:
- *
- * This routine initializes the API extension handler.
- *
- */
-
-void _API_extensions_Initialization( void );
-
-/*
- * _API_extensions_Add
- *
- * DESCRIPTION:
- *
- * XXX
- */
-
-void _API_extensions_Add(
- API_extensions_Control *the_extension
-);
-
-/*
- * _API_extensions_Run_predriver
- *
- * DESCRIPTION:
- *
- * XXX
- */
-
-void _API_extensions_Run_predriver( void );
-
-/*
- * _API_extensions_Run_postdriver
- *
- * DESCRIPTION:
- *
- * XXX
- */
-
-void _API_extensions_Run_postdriver( void );
-
-/*
- * _API_extensions_Run_postswitch
- *
- * DESCRIPTION:
- *
- * XXX
- */
-
-void _API_extensions_Run_postswitch( void );
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/include/rtems/score/bitfield.h b/cpukit/score/include/rtems/score/bitfield.h
deleted file mode 100644
index 05c0daeb5b..0000000000
--- a/cpukit/score/include/rtems/score/bitfield.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/* bitfield.h
- *
- * This include file contains all bit field manipulation routines.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_BITFIELD_h
-#define __RTEMS_BITFIELD_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * _Bitfield_Find_first_bit
- *
- * DESCRIPTION:
- *
- * This routine returns the bit_number of the first bit set
- * in the specified value. The correspondence between bit_number
- * and actual bit position is processor dependent. The search for
- * the first bit set may run from most to least significant bit
- * or vice-versa.
- *
- * NOTE:
- *
- * This routine is used when the executing thread is removed
- * from the ready state and, as a result, its performance has a
- * significant impact on the performance of the executive as a whole.
- */
-
-#if ( CPU_USE_GENERIC_BITFIELD_DATA == TRUE )
-
-#ifndef SCORE_INIT
-extern const unsigned char __log2table[256];
-#else
-const unsigned char __log2table[256] = {
- 7, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-};
-#endif
-
-#endif
-
-#if ( CPU_USE_GENERIC_BITFIELD_CODE == FALSE )
-
-#define _Bitfield_Find_first_bit( _value, _bit_number ) \
- _CPU_Bitfield_Find_first_bit( _value, _bit_number )
-
-#else
-
-/*
- * The following must be a macro because if a CPU specific version
- * is used it will most likely use inline assembly.
- */
-
-#define _Bitfield_Find_first_bit( _value, _bit_number ) \
- { \
- register unsigned32 __value = (unsigned32) (_value); \
- register const unsigned char *__p = __log2table; \
- \
- if ( __value < 0x100 ) \
- (_bit_number) = __p[ __value ] + 8; \
- else \
- (_bit_number) = __p[ __value >> 8 ]; \
- }
-
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/include/rtems/score/chain.h b/cpukit/score/include/rtems/score/chain.h
deleted file mode 100644
index 469979c68e..0000000000
--- a/cpukit/score/include/rtems/score/chain.h
+++ /dev/null
@@ -1,167 +0,0 @@
-/* chain.h
- *
- * This include file contains all the constants and structures associated
- * with the Doubly Linked Chain Handler.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_CHAIN_h
-#define __RTEMS_CHAIN_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/address.h>
-
-/*
- * This is used to manage each element (node) which is placed
- * on a chain.
- *
- * NOTE: Typically, a more complicated structure will use the
- * chain package. The more complicated structure will
- * include a chain node as the first element in its
- * control structure. It will then call the chain package
- * with a pointer to that node element. The node pointer
- * and the higher level structure start at the same address
- * so the user can cast the pointers back and forth.
- *
- */
-
-typedef struct Chain_Node_struct Chain_Node;
-
-struct Chain_Node_struct {
- Chain_Node *next;
- Chain_Node *previous;
-};
-
-/*
- * This is used to manage a chain. A chain consists of a doubly
- * linked list of zero or more nodes.
- *
- * NOTE: This implementation does not require special checks for
- * manipulating the first and last elements on the chain.
- * To accomplish this the chain control structure is
- * treated as two overlapping chain nodes. The permanent
- * head of the chain overlays a node structure on the
- * first and permanent_null fields. The permanent tail
- * of the chain overlays a node structure on the
- * permanent_null and last elements of the structure.
- *
- */
-
-typedef struct {
- Chain_Node *first;
- Chain_Node *permanent_null;
- Chain_Node *last;
-} Chain_Control;
-
-/*
- * _Chain_Initialize
- *
- * DESCRIPTION:
- *
- * This routine initializes the_chain structure to manage the
- * contiguous array of number_nodes nodes which starts at
- * starting_address. Each node is of node_size bytes.
- *
- */
-
-void _Chain_Initialize(
- Chain_Control *the_chain,
- void *starting_address,
- unsigned32 number_nodes,
- unsigned32 node_size
-);
-
-/*
- * _Chain_Get_first_unprotected
- */
-
-#ifndef USE_INLINES
-Chain_Node *_Chain_Get_first_unprotected(
- Chain_Control *the_chain
-);
-#endif
-
-/*
- * _Chain_Extract
- *
- * DESCRIPTION:
- *
- * This routine extracts the_node from the chain on which it resides.
- * It disables interrupts to insure the atomicity of the
- * extract operation.
- *
- */
-
-void _Chain_Extract(
- Chain_Node *the_node
-);
-
-/*
- * _Chain_Get
- *
- * DESCRIPTION:
- *
- * This function removes the first node from the_chain and returns
- * a pointer to that node. If the_chain is empty, then NULL is returned.
- * It disables interrupts to insure the atomicity of the
- * get operation.
- *
- */
-
-Chain_Node *_Chain_Get(
- Chain_Control *the_chain
-);
-
-/*
- * _Chain_Insert
- *
- * DESCRIPTION:
- *
- * This routine inserts the_node on a chain immediately following
- * after_node. It disables interrupts to insure the atomicity
- * of the extract operation.
- *
- */
-
-void _Chain_Insert(
- Chain_Node *after_node,
- Chain_Node *the_node
-);
-
-/*
- * _Chain_Append
- *
- * DESCRIPTION:
- *
- * This routine appends the_node onto the end of the_chain.
- * It disables interrupts to insure the atomicity of the
- * append operation.
- *
- */
-
-void _Chain_Append(
- Chain_Control *the_chain,
- Chain_Node *the_node
-);
-
-#ifndef __RTEMS_APPLICATION__
-#include <rtems/score/chain.inl>
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/include/rtems/score/context.h b/cpukit/score/include/rtems/score/context.h
deleted file mode 100644
index acfaeccef7..0000000000
--- a/cpukit/score/include/rtems/score/context.h
+++ /dev/null
@@ -1,133 +0,0 @@
-/* context.h
- *
- * This include file contains all information about a context.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_CONTEXT_h
-#define __RTEMS_CONTEXT_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/cpu.h>
-
-/*
- * The following constant defines the number of bytes required
- * to store a full floating point context.
- */
-
-#define CONTEXT_FP_SIZE CPU_CONTEXT_FP_SIZE
-
-/*
- * The following variable is set to TRUE when a reschedule operation
- * has determined that the processor should be taken away from the
- * currently executing thread and given to the heir thread.
- */
-
-SCORE_EXTERN volatile boolean _Context_Switch_necessary;
-
-/*
- * _Context_Initialize
- *
- * DESCRIPTION:
- *
- * This routine initializes THE_CONTEXT such that the stack
- * pointer, interrupt level, and entry point are correct for the
- * thread's initial state.
- */
-
-#define \
- _Context_Initialize( _the_context, _stack, _size, _isr, _entry, _is_fp ) \
- _CPU_Context_Initialize( _the_context, _stack, _size, _isr, _entry, _is_fp )
-
-/*
- * _Context_Switch
- *
- * DESCRIPTION:
- *
- * This routine saves the current context into the EXECUTING
- * context record and restores the context specified by HEIR.
- */
-
-#define _Context_Switch( _executing, _heir ) \
- _CPU_Context_switch( _executing, _heir )
-
-/*
- * _Context_Restart_self
- *
- * DESCRIPTION:
- *
- * This routine restarts the calling thread by restoring its initial
- * stack pointer and returning to the thread's entry point.
- */
-
-#define _Context_Restart_self( _the_context ) \
- _CPU_Context_Restart_self( _the_context )
-
-/*
- * _Context_Fp_start
- *
- * DESCRIPTION:
- *
- * This function returns the starting address of the floating
- * point context save area. It is assumed that the are reserved
- * for the floating point save area is large enough.
- */
-
-#define _Context_Fp_start( _base, _offset ) \
- _CPU_Context_Fp_start( (_base), (_offset) )
-
-/*
- * _Context_Initialize_fp
- *
- * DESCRIPTION:
- *
- * This routine initializes the floating point context save
- * area to contain an initial known state.
- */
-
-#define _Context_Initialize_fp( _fp_area ) \
- _CPU_Context_Initialize_fp( _fp_area )
-
-/*
- * _Context_Restore_fp
- *
- * DESCRIPTION:
- *
- * This routine restores the floating point context contained
- * in the FP_CONTEXT area. It is assumed that the current
- * floating point context has been saved by a previous invocation
- * of SAVE_FP.
- */
-
-#define _Context_Restore_fp( _fp ) \
- _CPU_Context_restore_fp( _fp )
-
-/*
- * _Context_Save_fp
- *
- * DESCRIPTION:
- *
- * This routine saves the current floating point context
- * in the FP_CONTEXT area.
- */
-
-#define _Context_Save_fp( _fp ) \
- _CPU_Context_save_fp( _fp )
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/include/rtems/score/copyrt.h b/cpukit/score/include/rtems/score/copyrt.h
deleted file mode 100644
index d7e1c3c474..0000000000
--- a/cpukit/score/include/rtems/score/copyrt.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* copyrt.h
- *
- * This include file contains the copyright notice for RTEMS
- * which is included in every binary copy of the executive.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_COPYRIGHT_h
-#define __RTEMS_COPYRIGHT_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef SCORE_INIT
-
-const char _Copyright_Notice[] =
-"COPYRIGHT (c) 1989-1999.\n\
-On-Line Applications Research Corporation (OAR).\n";
-
-#else
-
-extern const char _Copyright_Notice[];
-
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/include/rtems/score/coremsg.h b/cpukit/score/include/rtems/score/coremsg.h
deleted file mode 100644
index 818b1e8c18..0000000000
--- a/cpukit/score/include/rtems/score/coremsg.h
+++ /dev/null
@@ -1,301 +0,0 @@
-/* coremsg.h
- *
- * This include file contains all the constants and structures associated
- * with the Message queue Handler.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_CORE_MESSAGE_QUEUE_h
-#define __RTEMS_CORE_MESSAGE_QUEUE_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <limits.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/watchdog.h>
-
-/*
- * The following type defines the callout which the API provides
- * to support global/multiprocessor operations on message_queues.
- */
-
-typedef void ( *CORE_message_queue_API_mp_support_callout )(
- Thread_Control *,
- Objects_Id
- );
-
-/*
- * The following defines the data types needed to manipulate
- * the contents of message buffers.
- *
- * NOTE: The buffer field is normally longer than a single unsigned32.
- * but since messages are variable length we just make a ptr to 1.
- */
-
-typedef struct {
- unsigned32 size;
- unsigned32 buffer[1];
-} CORE_message_queue_Buffer;
-
-/*
- * The following records define the organization of a message
- * buffer.
- */
-
-typedef struct {
- Chain_Node Node;
- int priority;
- CORE_message_queue_Buffer Contents;
-} CORE_message_queue_Buffer_control;
-
-/*
- * Blocking disciplines for a message_queue.
- */
-
-typedef enum {
- CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO,
- CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY
-} CORE_message_queue_Disciplines;
-
-/*
- * The following enumerated type details the modes in which a message
- * may be submitted to a message queue. The message may be posted
- * in a send or urgent fashion.
- *
- * NOTE: All other values are message priorities. Numerically smaller
- * priorities indicate higher priority messages.
- *
- */
-
-#define CORE_MESSAGE_QUEUE_SEND_REQUEST INT_MAX
-#define CORE_MESSAGE_QUEUE_URGENT_REQUEST INT_MIN
-
-typedef int CORE_message_queue_Submit_types;
-
-/*
- * Core Message queue handler return statuses.
- */
-
-typedef enum {
- CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL,
- CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE,
- CORE_MESSAGE_QUEUE_STATUS_TOO_MANY,
- CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED,
- CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT,
- CORE_MESSAGE_QUEUE_STATUS_WAS_DELETED,
- CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
-} CORE_message_queue_Status;
-
-/*
- * The following defines the control block used to manage the
- * attributes of each message queue.
- */
-
-typedef struct {
- CORE_message_queue_Disciplines discipline;
-} CORE_message_queue_Attributes;
-
-/*
- * The following defines the type for a Notification handler. A notification
- * handler is invoked when the message queue makes a 0->1 transition on
- * pending messages.
- */
-
-typedef void (*CORE_message_queue_Notify_Handler)( void * );
-
-/*
- * The following defines the control block used to manage each
- * counting message_queue.
- */
-
-typedef struct {
- Thread_queue_Control Wait_queue;
- CORE_message_queue_Attributes Attributes;
- unsigned32 maximum_pending_messages;
- unsigned32 number_of_pending_messages;
- unsigned32 maximum_message_size;
- Chain_Control Pending_messages;
- CORE_message_queue_Buffer *message_buffers;
- CORE_message_queue_Notify_Handler notify_handler;
- void *notify_argument;
- Chain_Control Inactive_messages;
-} CORE_message_queue_Control;
-
-/*
- * _CORE_message_queue_Initialize
- *
- * DESCRIPTION:
- *
- * This routine initializes the message_queue based on the parameters passed.
- */
-
-boolean _CORE_message_queue_Initialize(
- CORE_message_queue_Control *the_message_queue,
- Objects_Classes the_class,
- CORE_message_queue_Attributes *the_message_queue_attributes,
- unsigned32 maximum_pending_messages,
- unsigned32 maximum_message_size,
- Thread_queue_Extract_callout proxy_extract_callout
-);
-
-/*
- * _CORE_message_queue_Close
- *
- * DESCRIPTION:
- *
- * This function closes a message by returning all allocated space and
- * flushing the message_queue's task wait queue.
- */
-
-void _CORE_message_queue_Close(
- CORE_message_queue_Control *the_message_queue,
- Thread_queue_Flush_callout remote_extract_callout,
- unsigned32 status
-);
-
-/*
- * _CORE_message_queue_Flush
- *
- * DESCRIPTION:
- *
- * This function flushes the message_queue's pending message queue. The
- * number of messages flushed from the queue is returned.
- *
- */
-
-unsigned32 _CORE_message_queue_Flush(
- CORE_message_queue_Control *the_message_queue
-);
-
-/*
- * _CORE_message_queue_Flush_support
- *
- * DESCRIPTION:
- *
- * This routine flushes all outstanding messages and returns
- * them to the inactive message chain.
- */
-
-unsigned32 _CORE_message_queue_Flush_support(
- CORE_message_queue_Control *the_message_queue
-);
-
-/*
- * _CORE_message_queue_Flush_waiting_threads
- *
- * DESCRIPTION:
- *
- * This function flushes the threads which are blocked on this
- * message_queue's pending message queue. They are unblocked whether
- * blocked sending or receiving.
- */
-
-void _CORE_message_queue_Flush_waiting_threads(
- CORE_message_queue_Control *the_message_queue
-);
-
-/*
- * _CORE_message_queue_Broadcast
- *
- * DESCRIPTION:
- *
- * This function sends a message for every thread waiting on the queue and
- * returns the number of threads made ready by the message.
- *
- */
-
-CORE_message_queue_Status _CORE_message_queue_Broadcast(
- CORE_message_queue_Control *the_message_queue,
- void *buffer,
- unsigned32 size,
- Objects_Id id,
- CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
- unsigned32 *count
-);
-
-/*
- * _CORE_message_queue_Submit
- *
- * DESCRIPTION:
- *
- * This routine implements the send and urgent message functions. It
- * processes a message that is to be submitted to the designated
- * message queue. The message will either be processed as a
- * send message which it will be inserted at the rear of the queue
- * or it will be processed as an urgent message which will be inserted
- * at the front of the queue.
- *
- */
-
-void _CORE_message_queue_Submit(
- CORE_message_queue_Control *the_message_queue,
- void *buffer,
- unsigned32 size,
- Objects_Id id,
- CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
- CORE_message_queue_Submit_types submit_type,
- boolean wait,
- Watchdog_Interval timeout
-);
-
-/*
- * _CORE_message_queue_Seize
- *
- * DESCRIPTION:
- *
- * This kernel routine dequeues a message, copies the message buffer to
- * a given destination buffer, and frees the message buffer to the
- * inactive message pool. The thread will be blocked if wait is TRUE,
- * otherwise an error will be given to the thread if no messages are available.
- *
- * NOTE: Returns message priority via return are in TCB.
- */
-
-void _CORE_message_queue_Seize(
- CORE_message_queue_Control *the_message_queue,
- Objects_Id id,
- void *buffer,
- unsigned32 *size,
- boolean wait,
- Watchdog_Interval timeout
-);
-
-/*
- * _CORE_message_queue_Insert_message
- *
- * DESCRIPTION:
- *
- * This kernel routine inserts the specified message into the
- * message queue. It is assumed that the message has been filled
- * in before this routine is called.
- */
-
-void _CORE_message_queue_Insert_message(
- CORE_message_queue_Control *the_message_queue,
- CORE_message_queue_Buffer_control *the_message,
- CORE_message_queue_Submit_types submit_type
-);
-
-#ifndef __RTEMS_APPLICATION__
-#include <rtems/score/coremsg.inl>
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/score/include/rtems/score/coremutex.h b/cpukit/score/include/rtems/score/coremutex.h
deleted file mode 100644
index 32e4f40b5e..0000000000
--- a/cpukit/score/include/rtems/score/coremutex.h
+++ /dev/null
@@ -1,201 +0,0 @@
-/* mutex.h
- *
- * This include file contains all the constants and structures associated
- * with the Mutex Handler. A mutex is an enhanced version of the standard
- * Dijkstra binary semaphore used to provide synchronization and mutual
- * exclusion capabilities.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_CORE_MUTEX_h
-#define __RTEMS_CORE_MUTEX_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/watchdog.h>
-
-/*
- * The following type defines the callout which the API provides
- * to support global/multiprocessor operations on mutexes.
- */
-
-typedef void ( *CORE_mutex_API_mp_support_callout )(
- Thread_Control *,
- Objects_Id
- );
-
-/*
- * Blocking disciplines for a mutex.
- */
-
-typedef enum {
- CORE_MUTEX_DISCIPLINES_FIFO,
- CORE_MUTEX_DISCIPLINES_PRIORITY,
- CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT,
- CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING
-} CORE_mutex_Disciplines;
-
-/*
- * Mutex handler return statuses.
- */
-
-typedef enum {
- CORE_MUTEX_STATUS_SUCCESSFUL,
- CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT,
- CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED,
- CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE,
- CORE_MUTEX_WAS_DELETED,
- CORE_MUTEX_TIMEOUT,
- CORE_MUTEX_STATUS_CEILING_VIOLATED
-} CORE_mutex_Status;
-
-/*
- * Mutex lock nesting behavior
- *
- * CORE_MUTEX_NESTING_ACQUIRES:
- * This sequence has no blocking or errors:
- * lock(m)
- * lock(m)
- * unlock(m)
- * unlock(m)
- *
- * CORE_MUTEX_NESTING_IS_ERROR
- * This sequence returns an error at the indicated point:
- * lock(m)
- * lock(m) - already locked error
- * unlock(m)
- *
- * CORE_MUTEX_NESTING_BLOCKS
- * This sequence performs as indicated:
- * lock(m)
- * lock(m) - deadlocks or timeouts
- * unlock(m) - releases
- */
-
-typedef enum {
- CORE_MUTEX_NESTING_ACQUIRES,
- CORE_MUTEX_NESTING_IS_ERROR,
- CORE_MUTEX_NESTING_BLOCKS
-} CORE_mutex_Nesting_behaviors;
-
-/*
- * Locked and unlocked values
- */
-
-#define CORE_MUTEX_UNLOCKED 1
-#define CORE_MUTEX_LOCKED 0
-
-/*
- * The following defines the control block used to manage the
- * attributes of each mutex.
- */
-
-typedef struct {
- CORE_mutex_Nesting_behaviors lock_nesting_behavior;
- boolean only_owner_release;
- CORE_mutex_Disciplines discipline;
- Priority_Control priority_ceiling;
-} CORE_mutex_Attributes;
-
-/*
- * The following defines the control block used to manage each mutex.
- */
-
-typedef struct {
- Thread_queue_Control Wait_queue;
- CORE_mutex_Attributes Attributes;
- unsigned32 lock;
- unsigned32 nest_count;
- Thread_Control *holder;
- Objects_Id holder_id;
-} CORE_mutex_Control;
-
-/*
- * _CORE_mutex_Initialize
- *
- * DESCRIPTION:
- *
- * This routine initializes the mutex based on the parameters passed.
- */
-
-void _CORE_mutex_Initialize(
- CORE_mutex_Control *the_mutex,
- Objects_Classes the_class,
- CORE_mutex_Attributes *the_mutex_attributes,
- unsigned32 initial_lock,
- Thread_queue_Extract_callout proxy_extract_callout
-);
-
-/*
- * _CORE_mutex_Seize
- *
- * DESCRIPTION:
- *
- * This routine attempts to receive a unit from the_mutex.
- * If a unit is available or if the wait flag is FALSE, then the routine
- * returns. Otherwise, the calling task is blocked until a unit becomes
- * available.
- */
-
-void _CORE_mutex_Seize(
- CORE_mutex_Control *the_mutex,
- Objects_Id id,
- boolean wait,
- Watchdog_Interval timeout
-);
-
-/*
- * _CORE_mutex_Surrender
- *
- * DESCRIPTION:
- *
- * This routine frees a unit to the mutex. If a task was blocked waiting for
- * a unit from this mutex, then that task will be readied and the unit
- * given to that task. Otherwise, the unit will be returned to the mutex.
- */
-
-CORE_mutex_Status _CORE_mutex_Surrender(
- CORE_mutex_Control *the_mutex,
- Objects_Id id,
- CORE_mutex_API_mp_support_callout api_mutex_mp_support
-);
-
-/*
- * _CORE_mutex_Flush
- *
- * DESCRIPTION:
- *
- * This routine assists in the deletion of a mutex by flushing the associated
- * wait queue.
- */
-
-void _CORE_mutex_Flush(
- CORE_mutex_Control *the_mutex,
- Thread_queue_Flush_callout remote_extract_callout,
- unsigned32 status
-);
-
-#ifndef __RTEMS_APPLICATION__
-#include <rtems/score/coremutex.inl>
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/score/include/rtems/score/coresem.h b/cpukit/score/include/rtems/score/coresem.h
deleted file mode 100644
index 324fdcf1aa..0000000000
--- a/cpukit/score/include/rtems/score/coresem.h
+++ /dev/null
@@ -1,157 +0,0 @@
-/* core_sem.h
- *
- * This include file contains all the constants and structures associated
- * with the Counting Semaphore Handler. A counting semaphore is the
- * standard Dijkstra binary semaphore used to provide synchronization
- * and mutual exclusion capabilities.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_CORE_COUNTING_SEMAPHORE_h
-#define __RTEMS_CORE_COUNTING_SEMAPHORE_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/watchdog.h>
-
-/*
- * The following type defines the callout which the API provides
- * to support global/multiprocessor operations on semaphores.
- */
-
-typedef void ( *CORE_semaphore_API_mp_support_callout )(
- Thread_Control *,
- Objects_Id
- );
-
-/*
- * Blocking disciplines for a semaphore.
- */
-
-typedef enum {
- CORE_SEMAPHORE_DISCIPLINES_FIFO,
- CORE_SEMAPHORE_DISCIPLINES_PRIORITY
-} CORE_semaphore_Disciplines;
-
-/*
- * Core Semaphore handler return statuses.
- */
-
-typedef enum {
- CORE_SEMAPHORE_STATUS_SUCCESSFUL,
- CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT,
- CORE_SEMAPHORE_WAS_DELETED,
- CORE_SEMAPHORE_TIMEOUT,
- CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED
-} CORE_semaphore_Status;
-
-/*
- * The following defines the control block used to manage the
- * attributes of each semaphore.
- */
-
-typedef struct {
- unsigned32 maximum_count;
- CORE_semaphore_Disciplines discipline;
-} CORE_semaphore_Attributes;
-
-/*
- * The following defines the control block used to manage each
- * counting semaphore.
- */
-
-typedef struct {
- Thread_queue_Control Wait_queue;
- CORE_semaphore_Attributes Attributes;
- unsigned32 count;
-} CORE_semaphore_Control;
-
-/*
- * _CORE_semaphore_Initialize
- *
- * DESCRIPTION:
- *
- * This routine initializes the semaphore based on the parameters passed.
- */
-
-void _CORE_semaphore_Initialize(
- CORE_semaphore_Control *the_semaphore,
- Objects_Classes the_class,
- CORE_semaphore_Attributes *the_semaphore_attributes,
- unsigned32 initial_value,
- Thread_queue_Extract_callout proxy_extract_callout
-);
-
-/*
- * _CORE_semaphore_Seize
- *
- * DESCRIPTION:
- *
- * This routine attempts to receive a unit from the_semaphore.
- * If a unit is available or if the wait flag is FALSE, then the routine
- * returns. Otherwise, the calling task is blocked until a unit becomes
- * available.
- */
-
-void _CORE_semaphore_Seize(
- CORE_semaphore_Control *the_semaphore,
- Objects_Id id,
- boolean wait,
- Watchdog_Interval timeout
-);
-
-/*
- * _CORE_semaphore_Surrender
- *
- * DESCRIPTION:
- *
- * This routine frees a unit to the semaphore. If a task was blocked waiting
- * for a unit from this semaphore, then that task will be readied and the unit
- * given to that task. Otherwise, the unit will be returned to the semaphore.
- */
-
-CORE_semaphore_Status _CORE_semaphore_Surrender(
- CORE_semaphore_Control *the_semaphore,
- Objects_Id id,
- CORE_semaphore_API_mp_support_callout api_semaphore_mp_support
-);
-
-/*
- * _CORE_semaphore_Flush
- *
- * DESCRIPTION:
- *
- * This routine assists in the deletion of a semaphore by flushing the
- * associated wait queue.
- */
-
-void _CORE_semaphore_Flush(
- CORE_semaphore_Control *the_semaphore,
- Thread_queue_Flush_callout remote_extract_callout,
- unsigned32 status
-);
-
-#ifndef __RTEMS_APPLICATION__
-#include <rtems/score/coresem.inl>
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/score/include/rtems/score/heap.h b/cpukit/score/include/rtems/score/heap.h
deleted file mode 100644
index 1a502f7999..0000000000
--- a/cpukit/score/include/rtems/score/heap.h
+++ /dev/null
@@ -1,225 +0,0 @@
-/* heap.h
- *
- * This include file contains the information pertaining to the Heap
- * Handler. A heap is a doubly linked list of variable size
- * blocks which are allocated using the first fit method. Garbage
- * collection is performed each time a block is returned to the heap by
- * coalescing neighbor blocks. Control information for both allocated
- * and unallocated blocks is contained in the heap space. A heap header
- * contains control information for the heap.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_HEAP_h
-#define __RTEMS_HEAP_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Status codes for heap_extend
- */
-
-typedef enum {
- HEAP_EXTEND_SUCCESSFUL,
- HEAP_EXTEND_ERROR,
- HEAP_EXTEND_NOT_IMPLEMENTED
-} Heap_Extend_status;
-
-/*
- * Constants used in the size/used field of each heap block to
- * indicate when a block is free or in use.
- */
-
-#define HEAP_BLOCK_USED 1 /* indicates block is in use */
-#define HEAP_BLOCK_FREE 0 /* indicates block is free */
-
-/*
- * The size/used field value for the dummy front and back flags.
- */
-
-#define HEAP_DUMMY_FLAG (0 + HEAP_BLOCK_USED)
-
-/*
- * The following constants reflect various requirements of the
- * heap data structures which impact the management of a heap.
- *
- * NOTE: Because free block overhead is greater than used block
- * overhead AND a portion of the allocated space is from
- * the extra free block overhead, the absolute lower bound
- * of the minimum fragment size is equal to the size of
- * the free block overhead.
- */
-
-#define HEAP_OVERHEAD \
- (sizeof( unsigned32 ) * 2) /* size dummy first and last blocks */
-#define HEAP_BLOCK_USED_OVERHEAD \
- (sizeof( void * ) * 2) /* num bytes overhead in used block */
-#define HEAP_MINIMUM_SIZE \
- (HEAP_OVERHEAD + sizeof (Heap_Block))
- /* min number of bytes the user may */
- /* specify for the heap size */
-
-/*
- * The following defines the data structure used to manage
- * individual blocks in a heap. When the block is allocated, the
- * next and previous fields are not used by the Heap Handler
- * and thus the address returned for the block starts at
- * the address of the next field.
- *
- * NOTE: The next and previous pointers are only valid when the
- * block is free. Caution must be exercised to insure that
- * allocated blocks are large enough to contain them and
- * that they are not accidentally overwritten when the
- * block is actually allocated.
- */
-
-typedef struct Heap_Block_struct Heap_Block;
-
-struct Heap_Block_struct {
- unsigned32 back_flag; /* size and status of prev block */
- unsigned32 front_flag; /* size and status of block */
- Heap_Block *next; /* pointer to next block */
- Heap_Block *previous; /* pointer to previous block */
-};
-
-/*
- * The following defines the control block used to manage each heap.
- *
- * NOTE:
- *
- * This structure is layed out such that it can be used a a dummy
- * first and last block on the free block chain. The extra padding
- * insures the dummy last block is the correct size.
- *
- * The first Heap_Block starts at first while the second starts at
- * final. This is effectively the same trick as is used in the Chain
- * Handler.
- */
-
-typedef struct {
- Heap_Block *start; /* first valid block address in heap */
- Heap_Block *final; /* last valid block address in heap */
-
- Heap_Block *first; /* pointer to first block in heap */
- Heap_Block *permanent_null; /* always NULL pointer */
- Heap_Block *last; /* pointer to last block in heap */
- unsigned32 page_size; /* allocation unit */
- unsigned32 reserved;
-} Heap_Control;
-
-/*
- * _Heap_Initialize
- *
- * DESCRIPTION:
- *
- * This routine initializes the_heap record to manage the
- * contiguous heap of size bytes which starts at starting_address.
- * Blocks of memory are allocated from the heap in multiples of
- * page_size byte units.
- */
-
-unsigned32 _Heap_Initialize(
- Heap_Control *the_heap,
- void *starting_address,
- unsigned32 size,
- unsigned32 page_size
-);
-
-/*
- * _Heap_Extend
- *
- * DESCRIPTION:
- *
- * This routine grows the_heap memory area using the size bytes which
- * begin at starting_address.
- */
-
-Heap_Extend_status _Heap_Extend(
- Heap_Control *the_heap,
- void *starting_address,
- unsigned32 size,
- unsigned32 *amount_extended
-);
-
-/*
- * _Heap_Allocate
- *
- * DESCRIPTION:
- *
- * DESCRIPTION:
- *
- * This function attempts to allocate a block of size bytes from
- * the_heap. If insufficient memory is free in the_heap to allocate
- * a block of the requested size, then NULL is returned.
- */
-
-void *_Heap_Allocate(
- Heap_Control *the_heap,
- unsigned32 size
-);
-
-/*
- * _Heap_Size_of_user_area
- *
- * DESCRIPTION:
- *
- * This kernel routine sets size to the size of the given heap block.
- * It returns TRUE if the starting_address is in the heap, and FALSE
- * otherwise.
- */
-
-boolean _Heap_Size_of_user_area(
- Heap_Control *the_heap,
- void *starting_address,
- unsigned32 *size
-);
-
-/*
- * _Heap_Free
- *
- * DESCRIPTION:
- *
- * This routine returns the block of memory which begins
- * at starting_address to the_heap. Any coalescing which is
- * possible with the freeing of this routine is performed.
- */
-
-boolean _Heap_Free(
- Heap_Control *the_heap,
- void *start_address
-);
-
-/*
- * _Heap_Walk
- *
- * DESCRIPTION:
- *
- * This routine walks the heap to verify its integrity.
- */
-
-void _Heap_Walk(
- Heap_Control *the_heap,
- int source,
- boolean do_dump
-);
-
-#ifndef __RTEMS_APPLICATION__
-#include <rtems/score/heap.inl>
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/include/rtems/score/interr.h b/cpukit/score/include/rtems/score/interr.h
deleted file mode 100644
index 293957ec2b..0000000000
--- a/cpukit/score/include/rtems/score/interr.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/* interr.h
- *
- * This include file contains constants and prototypes related
- * to the Internal Error Handler.
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_INTERNAL_ERROR_h
-#define __RTEMS_INTERNAL_ERROR_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This type lists the possible sources from which an error
- * can be reported.
- */
-
-typedef enum {
- INTERNAL_ERROR_CORE,
- INTERNAL_ERROR_RTEMS_API,
- INTERNAL_ERROR_POSIX_API,
- INTERNAL_ERROR_ITRON_API
-} Internal_errors_Source;
-
-/*
- * A list of errors which are generated internally by the executive core.
- */
-
-typedef enum {
- INTERNAL_ERROR_NO_CONFIGURATION_TABLE,
- INTERNAL_ERROR_NO_CPU_TABLE,
- INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS,
- INTERNAL_ERROR_TOO_LITTLE_WORKSPACE,
- INTERNAL_ERROR_WORKSPACE_ALLOCATION,
- INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL,
- INTERNAL_ERROR_THREAD_EXITTED,
- INTERNAL_ERROR_INCONSISTENT_MP_INFORMATION,
- INTERNAL_ERROR_INVALID_NODE,
- INTERNAL_ERROR_NO_MPCI,
- INTERNAL_ERROR_BAD_PACKET,
- INTERNAL_ERROR_OUT_OF_PACKETS,
- INTERNAL_ERROR_OUT_OF_GLOBAL_OBJECTS,
- INTERNAL_ERROR_OUT_OF_PROXIES,
- INTERNAL_ERROR_INVALID_GLOBAL_ID,
- INTERNAL_ERROR_BAD_STACK_HOOK,
- INTERNAL_ERROR_BAD_ATTRIBUTES
-} Internal_errors_Core_list;
-
-/*
- * This type holds the fatal error information.
- */
-
-typedef struct {
- Internal_errors_Source the_source;
- boolean is_internal;
- unsigned32 the_error;
-} Internal_errors_Information;
-
-/*
- * When a fatal error occurs, the error information is stored here.
- */
-
-SCORE_EXTERN Internal_errors_Information Internal_errors_What_happened;
-
-/*
- * _Internal_error_Occurred
- *
- * DESCRIPTION:
- *
- * This routine is invoked when the application or the executive itself
- * determines that a fatal error has occurred.
- */
-
-void volatile _Internal_error_Occurred(
- Internal_errors_Source the_source,
- boolean is_internal,
- unsigned32 the_error
-);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/include/rtems/score/isr.h b/cpukit/score/include/rtems/score/isr.h
deleted file mode 100644
index 2cba4394d4..0000000000
--- a/cpukit/score/include/rtems/score/isr.h
+++ /dev/null
@@ -1,230 +0,0 @@
-/* isr.h
- *
- * This include file contains all the constants and structures associated
- * with the management of processor interrupt levels. This handler
- * supports interrupt critical sections, vectoring of user interrupt
- * handlers, nesting of interrupts, and manipulating interrupt levels.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __ISR_h
-#define __ISR_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * The following type defines the control block used to manage
- * the interrupt level portion of the status register.
- */
-
-typedef unsigned32 ISR_Level;
-
-/*
- * The following type defines the type used to manage the vectors.
- */
-
-typedef unsigned32 ISR_Vector_number;
-
-/*
- * Return type for ISR Handler
- */
-
-typedef void ISR_Handler;
-
-/*
- * Pointer to an ISR Handler
- */
-
-#if (CPU_ISR_PASSES_FRAME_POINTER == 1)
-typedef ISR_Handler ( *ISR_Handler_entry )(
- ISR_Vector_number,
- CPU_Interrupt_frame *
- );
-#else
-typedef ISR_Handler ( *ISR_Handler_entry )(
- ISR_Vector_number
- );
-#endif
-/*
- * This constant promotes out the number of vectors truly supported by
- * the current CPU being used. This is usually the number of distinct vectors
- * the cpu can vector.
- */
-
-#define ISR_NUMBER_OF_VECTORS CPU_INTERRUPT_NUMBER_OF_VECTORS
-
-/*
- * This constant promotes out the highest valid interrupt vector number.
- */
-
-#define ISR_INTERRUPT_MAXIMUM_VECTOR_NUMBER CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER
-
-/*
- * The following is TRUE if signals have been sent to the currently
- * executing thread by an ISR handler.
- */
-
-SCORE_EXTERN boolean _ISR_Signals_to_thread_executing;
-
-/*
- * The following contains the interrupt service routine nest level.
- * When this variable is zero, a thread is executing.
- */
-
-SCORE_EXTERN volatile unsigned32 _ISR_Nest_level;
-
-/*
- * The following declares the Vector Table. Application
- * interrupt service routines are vectored by the ISR Handler via this table.
- */
-
-SCORE_EXTERN ISR_Handler_entry _ISR_Vector_table[ ISR_NUMBER_OF_VECTORS ];
-
-/*
- * _ISR_Handler_initialization
- *
- * DESCRIPTION:
- *
- * This routine performs the initialization necessary for this handler.
- */
-
-void _ISR_Handler_initialization ( void );
-
-/*
- * _ISR_Disable
- *
- * DESCRIPTION:
- *
- * This routine disables all interrupts so that a critical section
- * of code can be executing without being interrupted. Upon return,
- * the argument _level will contain the previous interrupt mask level.
- */
-
-#define _ISR_Disable( _level ) \
- _CPU_ISR_Disable( _level )
-
-/*
- * _ISR_Enable
- *
- * DESCRIPTION:
- *
- * This routine enables interrupts to the previous interrupt mask
- * LEVEL. It is used at the end of a critical section of code to
- * enable interrupts so they can be processed again.
- */
-
-#define _ISR_Enable( _level ) \
- _CPU_ISR_Enable( _level )
-
-/*
- * _ISR_Flash
- *
- * DESCRIPTION:
- *
- * This routine temporarily enables interrupts to the previous
- * interrupt mask level and then disables all interrupts so that
- * the caller can continue into the second part of a critical
- * section. This routine is used to temporarily enable interrupts
- * during a long critical section. It is used in long sections of
- * critical code when a point is reached at which interrupts can
- * be temporarily enabled. Deciding where to flash interrupts
- * in a long critical section is often difficult and the point
- * must be selected with care to insure that the critical section
- * properly protects itself.
- */
-
-#define _ISR_Flash( _level ) \
- _CPU_ISR_Flash( _level )
-
-/*
- * _ISR_Install_vector
- *
- * DESCRIPTION:
- *
- * This routine installs new_handler as the interrupt service routine
- * for the specified vector. The previous interrupt service routine is
- * returned as old_handler.
- */
-
-#define _ISR_Install_vector( _vector, _new_handler, _old_handler ) \
- _CPU_ISR_install_vector( _vector, _new_handler, _old_handler )
-
-/*
- * _ISR_Get_level
- *
- * DESCRIPTION:
- *
- * This routine returns the current interrupt level.
- */
-
-#define _ISR_Get_level() \
- _CPU_ISR_Get_level()
-
-/*
- * _ISR_Set_level
- *
- * DESCRIPTION:
- *
- * This routine sets the current interrupt level to that specified
- * by new_level. The new interrupt level is effective when the
- * routine exits.
- */
-
-#define _ISR_Set_level( _new_level ) \
- _CPU_ISR_Set_level( _new_level )
-
-/*
- * _ISR_Handler
- *
- * DESCRIPTION:
- *
- * This routine is the interrupt dispatcher. ALL interrupts
- * are vectored to this routine so that minimal context can be saved
- * and setup performed before the application's high-level language
- * interrupt service routine is invoked. After the application's
- * interrupt service routine returns control to this routine, it
- * will determine if a thread dispatch is necessary. If so, it will
- * insure that the necessary thread scheduling operations are
- * performed when the outermost interrupt service routine exits.
- *
- * NOTE: Implemented in assembly language.
- */
-
-void _ISR_Handler( void );
-
-/*
- * _ISR_Dispatch
- *
- * DESCRIPTION:
- *
- * This routine provides a wrapper so that the routine
- * _Thread_Dispatch can be invoked when a reschedule is necessary
- * at the end of the outermost interrupt service routine. This
- * wrapper is necessary to establish the processor context needed
- * by _Thread_Dispatch and to save the processor context which is
- * corrupted by _Thread_Dispatch. This context typically consists
- * of registers which are not preserved across routine invocations.
- *
- * NOTE: Implemented in assembly language.
- */
-
-void _ISR_Dispatch( void );
-
-#include <rtems/score/isr.inl>
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/include/rtems/score/mpci.h b/cpukit/score/include/rtems/score/mpci.h
deleted file mode 100644
index 0ca7f15c02..0000000000
--- a/cpukit/score/include/rtems/score/mpci.h
+++ /dev/null
@@ -1,411 +0,0 @@
-/* mpci.h
- *
- * This include file contains all the constants and structures associated
- * with the MPCI layer. It provides mechanisms to utilize packets.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __MPCI_h
-#define __MPCI_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/mppkt.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/tqdata.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/score/coresem.h>
-
-/*
- * The following constants define the stack size requirements for
- * the system threads.
- */
-
-#define MPCI_RECEIVE_SERVER_STACK_SIZE \
- ( STACK_MINIMUM_SIZE + \
- CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK + \
- _CPU_Table.extra_mpci_receive_server_stack \
- )
-
-/*
- * The following defines the node number used when a broadcast is desired.
- */
-
-#define MPCI_ALL_NODES 0
-
-/*
- * For packets associated with requests that don't already have a timeout,
- * use the one specified by this MPCI driver. The value specified by
- * the MPCI driver sets an upper limit on how long a remote request
- * should take to complete.
- */
-
-#define MPCI_DEFAULT_TIMEOUT 0xFFFFFFFF
-
-/*
- * The following records define the Multiprocessor Communications
- * Interface (MPCI) Table. This table defines the user-provided
- * MPCI which is a required part of a multiprocessor system.
- *
- * For non-blocking local operations that become remote operations,
- * we need a timeout. This is a per-driver timeout: default_timeout
- */
-
-typedef void MPCI_Entry;
-
-typedef MPCI_Entry ( *MPCI_initialization_entry )( void );
-
-typedef MPCI_Entry ( *MPCI_get_packet_entry )(
- MP_packet_Prefix **
- );
-
-typedef MPCI_Entry ( *MPCI_return_packet_entry )(
- MP_packet_Prefix *
- );
-
-typedef MPCI_Entry ( *MPCI_send_entry )(
- unsigned32,
- MP_packet_Prefix *
- );
-
-typedef MPCI_Entry ( *MPCI_receive_entry )(
- MP_packet_Prefix **
- );
-
-typedef struct {
- unsigned32 default_timeout; /* in ticks */
- unsigned32 maximum_packet_size;
- MPCI_initialization_entry initialization;
- MPCI_get_packet_entry get_packet;
- MPCI_return_packet_entry return_packet;
- MPCI_send_entry send_packet;
- MPCI_receive_entry receive_packet;
-} MPCI_Control;
-
-/*
- * The following defines the type for packet processing routines
- * invoked by the MPCI Receive server.
- */
-
-typedef void (*MPCI_Packet_processor)( MP_packet_Prefix * );
-
-/*
- * The following enumerated type defines the list of
- * internal MP operations.
- */
-
-typedef enum {
- MPCI_PACKETS_SYSTEM_VERIFY = 0
-} MPCI_Internal_Remote_operations;
-
-/*
- * The following data structure defines the packet used to perform
- * remote event operations.
- */
-
-typedef struct {
- MP_packet_Prefix Prefix;
- MPCI_Internal_Remote_operations operation;
- unsigned32 maximum_nodes;
- unsigned32 maximum_global_objects;
-} MPCI_Internal_packet;
-
-/*
- * This is the core semaphore which the MPCI Receive Server blocks on.
- */
-
-SCORE_EXTERN CORE_semaphore_Control _MPCI_Semaphore;
-/*
- * The following thread queue is used to maintain a list of tasks
- * which currently have outstanding remote requests.
- */
-
-SCORE_EXTERN Thread_queue_Control _MPCI_Remote_blocked_threads;
-
-/*
- * The following define the internal pointers to the user's
- * configuration information.
- */
-
-SCORE_EXTERN MPCI_Control *_MPCI_table;
-
-/*
- * The following points to the MPCI Receive Server.
- */
-
-SCORE_EXTERN Thread_Control *_MPCI_Receive_server_tcb;
-
-/*
- * The following table contains the process packet routines provided
- * by each object that supports MP operations.
- */
-
-SCORE_EXTERN MPCI_Packet_processor
- _MPCI_Packet_processors[MP_PACKET_CLASSES_LAST+1];
-
-/*
- * _MPCI_Handler_initialization
- *
- * DESCRIPTION:
- *
- * This routine performs the initialization necessary for this handler.
- */
-
-void _MPCI_Handler_initialization(
- MPCI_Control *users_mpci_table,
- unsigned32 timeout_status
-);
-
-/*
- * _MPCI_Create_server
- *
- * DESCRIPTION:
- *
- * This routine creates the packet receive server used in MP systems.
- */
-
-void _MPCI_Create_server( void );
-
-/*
- * _MPCI_Initialization
- *
- * DESCRIPTION:
- *
- * This routine initializes the MPCI driver by
- * invoking the user provided MPCI initialization callout.
- */
-
-void _MPCI_Initialization ( void );
-
-/*
- * _MPCI_Register_packet_processor
- *
- * DESCRIPTION:
- *
- * This routine registers the MPCI packet processor for the
- * designated object class.
- */
-
-void _MPCI_Register_packet_processor(
- MP_packet_Classes the_class,
- MPCI_Packet_processor the_packet_processor
-
-);
-
-/*
- * _MPCI_Get_packet
- *
- * DESCRIPTION:
- *
- * This function obtains a packet by invoking the user provided
- * MPCI get packet callout.
- */
-
-MP_packet_Prefix *_MPCI_Get_packet ( void );
-
-/*
- * _MPCI_Return_packet
- *
- * DESCRIPTION:
- *
- * This routine returns a packet by invoking the user provided
- * MPCI return packet callout.
- */
-
-void _MPCI_Return_packet (
- MP_packet_Prefix *the_packet
-);
-
-/*
- * _MPCI_Send_process_packet
- *
- * DESCRIPTION:
- *
- * This routine sends a process packet by invoking the user provided
- * MPCI send callout.
- */
-
-void _MPCI_Send_process_packet (
- unsigned32 destination,
- MP_packet_Prefix *the_packet
-);
-
-/*
- * _MPCI_Send_request_packet
- *
- * DESCRIPTION:
- *
- * This routine sends a request packet by invoking the user provided
- * MPCI send callout.
- */
-
-unsigned32 _MPCI_Send_request_packet (
- unsigned32 destination,
- MP_packet_Prefix *the_packet,
- States_Control extra_state
-);
-
-/*
- * _MPCI_Send_response_packet
- *
- * DESCRIPTION:
- *
- * This routine sends a response packet by invoking the user provided
- * MPCI send callout.
- */
-
-void _MPCI_Send_response_packet (
- unsigned32 destination,
- MP_packet_Prefix *the_packet
-);
-
-/*
- * _MPCI_Receive_packet
- *
- * DESCRIPTION:
- *
- * This routine receives a packet by invoking the user provided
- * MPCI receive callout.
- */
-
-MP_packet_Prefix *_MPCI_Receive_packet ( void );
-
-/*
- * _MPCI_Process_response
- *
- * DESCRIPTION:
- *
- * This routine obtains a packet by invoking the user provided
- * MPCI get packet callout.
- */
-
-Thread_Control *_MPCI_Process_response (
- MP_packet_Prefix *the_packet
-);
-
-/*PAGE
- *
- * _MPCI_Receive_server
- *
- */
-
-Thread _MPCI_Receive_server(
- unsigned32 ignored
-);
-
-/*PAGE
- *
- * _MPCI_Announce
- *
- * DESCRIPTION:
- *
- * XXX
- */
-
-void _MPCI_Announce ( void );
-
-/*
- * _MPCI_Internal_packets_Send_process_packet
- *
- * DESCRIPTION:
- *
- * This routine performs a remote procedure call so that a
- * process operation can be performed on another node.
- */
-
-void _MPCI_Internal_packets_Send_process_packet (
- MPCI_Internal_Remote_operations operation
-);
-
-/*
- * _MPCI_Internal_packets_Send_request_packet
- *
- * DESCRIPTION:
- *
- * This routine performs a remote procedure call so that a
- * directive operation can be initiated on another node.
- *
- * This routine is not needed since there are no request
- * packets to be sent by this manager.
- */
-
-/*
- * _MPCI_Internal_packets_Send_response_packet
- *
- * DESCRIPTION:
- *
- * This routine performs a remote procedure call so that a
- * directive can be performed on another node.
- *
- * This routine is not needed since there are no response
- * packets to be sent by this manager.
- */
-
-/*
- *
- * _MPCI_Internal_packets_Process_packet
- *
- * DESCRIPTION:
- *
- * This routine performs the actions specific to this package for
- * the request from another node.
- */
-
-void _MPCI_Internal_packets_Process_packet (
- MP_packet_Prefix *the_packet_prefix
-);
-
-/*
- * _MPCI_Internal_packets_Send_object_was_deleted
- *
- * DESCRIPTION:
- *
- * This routine is invoked indirectly by the thread queue
- * when a proxy has been removed from the thread queue and
- * the remote node must be informed of this.
- *
- * This routine is not needed since there are no objects
- * deleted by this manager.
- */
-
-/*
- * _MPCI_Internal_packets_Send_extract_proxy
- *
- * DESCRIPTION:
- *
- * This routine is invoked when a task is deleted and it
- * has a proxy which must be removed from a thread queue and
- * the remote node must be informed of this.
- *
- * This routine is not needed since there are no objects
- * deleted by this manager.
- */
-
-/*
- * _MPCI_Internal_packets_Get_packet
- *
- * DESCRIPTION:
- *
- * This routine is used to obtain a internal threads mp packet.
- */
-
- MPCI_Internal_packet *_MPCI_Internal_packets_Get_packet ( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/include/rtems/score/mppkt.h b/cpukit/score/include/rtems/score/mppkt.h
deleted file mode 100644
index 58d4785a3b..0000000000
--- a/cpukit/score/include/rtems/score/mppkt.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/* mppkt.h
- *
- * This package is the specification for the Packet Handler.
- * This handler defines the basic packet and provides
- * mechanisms to utilize packets based on this prefix.
- * Packets are the fundamental basis for messages passed between
- * nodes in an MP system.
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __MP_PACKET_h
-#define __MP_PACKET_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/watchdog.h>
-
-/*
- * The following enumerated type defines the packet classes.
- *
- * NOTE: In general, each class corresponds to a manager
- * which supports global operations. Each manager
- * defines the set of supported operations.
- */
-
-typedef enum {
- MP_PACKET_MPCI_INTERNAL = 0,
- MP_PACKET_TASKS = 1,
- MP_PACKET_MESSAGE_QUEUE = 2,
- MP_PACKET_SEMAPHORE = 3,
- MP_PACKET_PARTITION = 4,
- MP_PACKET_REGION = 5,
- MP_PACKET_EVENT = 6,
- MP_PACKET_SIGNAL = 7
-} MP_packet_Classes;
-
-#define MP_PACKET_CLASSES_FIRST MP_PACKET_MPCI_INTERNAL
-#define MP_PACKET_CLASSES_LAST MP_PACKET_SIGNAL
-
-/*
- * The following record contains the prefix for every packet
- * passed between nodes in an MP system.
- *
- * NOTE: This structure is padded to insure that anything
- * following it is on a 16 byte boundary. This is
- * the most stringent structure alignment rule
- * encountered yet (i960CA).
- */
-
-typedef struct {
- MP_packet_Classes the_class;
- Objects_Id id;
- Objects_Id source_tid;
- Priority_Control source_priority;
- unsigned32 return_code;
- unsigned32 length;
- unsigned32 to_convert;
- Watchdog_Interval timeout;
-} MP_packet_Prefix;
-
-/*
- * An MPCI must support packets of at least this size.
- */
-
-#define MP_PACKET_MINIMUM_PACKET_SIZE 64
-
-/*
- * The following constant defines the number of unsigned32's
- * in a packet which must be converted to native format in a
- * heterogeneous system. In packets longer than
- * MP_PACKET_MINIMUN_HETERO_CONVERSION unsigned32's, some of the "extra" data
- * may a user message buffer which is not automatically endian swapped.
- */
-
-#define MP_PACKET_MINIMUN_HETERO_CONVERSION \
- ( sizeof( MP_packet_Prefix ) / sizeof( unsigned32 ) )
-
-#ifndef __RTEMS_APPLICATION__
-#include <rtems/score/mppkt.inl>
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/include/rtems/score/object.h b/cpukit/score/include/rtems/score/object.h
deleted file mode 100644
index 811e33a17e..0000000000
--- a/cpukit/score/include/rtems/score/object.h
+++ /dev/null
@@ -1,476 +0,0 @@
-/* object.h
- *
- * This include file contains all the constants and structures associated
- * with the Object Handler. This Handler provides mechanisms which
- * can be used to initialize and manipulate all objects which have
- * ids.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __OBJECTS_h
-#define __OBJECTS_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/chain.h>
-
-/*
- * Mask to enable unlimited objects
- *
- * XXX - needs to be moved to the API some-where
- */
-
-#define OBJECTS_UNLIMITED_OBJECTS 0x80000000
-
-/*
- * The following type defines the control block used to manage
- * object names.
- */
-
-typedef void * Objects_Name;
-
-/*
- * Space for object names is allocated in multiples of this.
- *
- * NOTE: Must be a power of 2. Matches the name manipulation routines.
- */
-
-#define OBJECTS_NAME_ALIGNMENT sizeof( unsigned32 )
-
-/*
- * Functions which compare names are prototyped like this.
- */
-
-typedef boolean (*Objects_Name_comparators)(
- void * /* name_1 */,
- void * /* name_2 */,
- unsigned32 /* length */
-);
-
-/*
- * The following type defines the control block used to manage
- * object IDs. The format is as follows (0=LSB):
- *
- * Bits 0 .. 15 = index
- * Bits 16 .. 25 = node
- * Bits 26 .. 31 = class
- */
-
-typedef unsigned32 Objects_Id;
-
-#define OBJECTS_INDEX_START_BIT 0
-#define OBJECTS_NODE_START_BIT 16
-#define OBJECTS_CLASS_START_BIT 26
-
-#define OBJECTS_INDEX_MASK 0x0000ffff
-#define OBJECTS_NODE_MASK 0x03ff0000
-#define OBJECTS_CLASS_MASK 0xfc000000
-
-#define OBJECTS_INDEX_VALID_BITS 0x0000ffff
-#define OBJECTS_NODE_VALID_BITS 0x000003ff
-#define OBJECTS_CLASS_VALID_BITS 0x000000cf
-
-/*
- * This enumerated type is used in the class field of the object ID.
- */
-
-typedef enum {
- OBJECTS_NO_CLASS = 0,
- OBJECTS_INTERNAL_THREADS = 1,
- OBJECTS_RTEMS_TASKS = 2,
- OBJECTS_POSIX_THREADS = 3,
- OBJECTS_ITRON_TASKS = 4,
- OBJECTS_RTEMS_TIMERS = 5,
- OBJECTS_RTEMS_SEMAPHORES = 6,
- OBJECTS_RTEMS_MESSAGE_QUEUES = 7,
- OBJECTS_RTEMS_PARTITIONS = 8,
- OBJECTS_RTEMS_REGIONS = 9,
- OBJECTS_RTEMS_PORTS = 10,
- OBJECTS_RTEMS_PERIODS = 11,
- OBJECTS_RTEMS_EXTENSIONS = 12,
- OBJECTS_POSIX_KEYS = 13,
- OBJECTS_POSIX_INTERRUPTS = 14,
- OBJECTS_POSIX_MESSAGE_QUEUES = 15,
- OBJECTS_POSIX_MUTEXES = 16,
- OBJECTS_POSIX_SEMAPHORES = 17,
- OBJECTS_POSIX_CONDITION_VARIABLES = 18,
- OBJECTS_ITRON_EVENTFLAGS = 19,
- OBJECTS_ITRON_MAILBOXES = 20,
- OBJECTS_ITRON_MESSAGE_BUFFERS = 21,
- OBJECTS_ITRON_PORTS = 22,
- OBJECTS_ITRON_SEMAPHORES = 23,
- OBJECTS_ITRON_VARIABLE_MEMORY_POOLS = 24,
- OBJECTS_ITRON_FIXED_MEMORY_POOLS = 25
-} Objects_Classes;
-
-#define OBJECTS_CLASSES_FIRST OBJECTS_NO_CLASS
-#define OBJECTS_CLASSES_LAST OBJECTS_ITRON_FIXED_MEMORY_POOLS
-#define OBJECTS_CLASSES_FIRST_THREAD_CLASS OBJECTS_INTERNAL_THREADS
-#define OBJECTS_CLASSES_LAST_THREAD_CLASS OBJECTS_ITRON_TASKS
-
-/*
- * This enumerated type lists the locations which may be returned
- * by _Objects_Get. These codes indicate the success of locating
- * an object with the specified ID.
- */
-
-typedef enum {
- OBJECTS_LOCAL = 0, /* object is local */
- OBJECTS_REMOTE = 1, /* object is remote */
- OBJECTS_ERROR = 2 /* id was invalid */
-} Objects_Locations;
-
-/*
- * The following defines the Object Control Block used to manage
- * each object local to this node.
- */
-
-typedef struct {
- Chain_Node Node;
- Objects_Id id;
- Objects_Name name;
-} Objects_Control;
-
-/*
- * The following defines the structure for the information used to
- * manage each class of objects.
- */
-
-typedef struct {
- Objects_Classes the_class; /* Class of this object */
- Objects_Id minimum_id; /* minimum valid id of this type */
- Objects_Id maximum_id; /* maximum valid id of this type */
- unsigned32 maximum; /* maximum number of objects */
- boolean auto_extend; /* TRUE if unlimited objects */
- unsigned32 allocation_size; /* number of objects in a block */
- unsigned32 size; /* size of the objects */
- Objects_Control **local_table;
- Objects_Name *name_table;
- Chain_Control *global_table; /* pointer to global table */
- Chain_Control Inactive; /* chain of inactive ctl blocks */
- unsigned32 inactive; /* number of objects on the InActive list */
- unsigned32 *inactive_per_block; /* used to release a block */
- void **object_blocks; /* the object memory to remove */
- boolean is_string; /* TRUE if names are strings */
- unsigned32 name_length; /* maximum length of names */
- boolean is_thread; /* TRUE if these are threads */
- /* irregardless of API */
-} Objects_Information;
-
-/*
- * The following defines the data storage which contains the
- * node number of the local node.
- */
-
-SCORE_EXTERN unsigned32 _Objects_Local_node;
-SCORE_EXTERN unsigned32 _Objects_Maximum_nodes;
-
-/*
- * The following is the list of information blocks for each object
- * class. From the ID, we can go to one of these information blocks,
- * and obtain a pointer to the appropriate object control block.
- */
-
-SCORE_EXTERN Objects_Information
- *_Objects_Information_table[OBJECTS_CLASSES_LAST + 1];
-
-/*
- * The following defines the constant which may be used
- * with _Objects_Get to manipulate the calling task.
- *
- */
-
-#define OBJECTS_ID_OF_SELF ((Objects_Id) 0)
-
-/*
- * The following define the constants which may be used in name searches.
- */
-
-#define OBJECTS_SEARCH_ALL_NODES 0
-#define OBJECTS_SEARCH_OTHER_NODES 0x7FFFFFFE
-#define OBJECTS_SEARCH_LOCAL_NODE 0x7FFFFFFF
-#define OBJECTS_WHO_AM_I 0
-
-/*
- * Parameters and return id's for _Objects_Get_next
- */
-
-#define OBJECTS_ID_INITIAL_INDEX (0)
-#define OBJECTS_ID_FINAL_INDEX (0xffff)
-
-#define OBJECTS_ID_INITIAL(_class, _node) \
- _Objects_Build_id( (_class), (_node), OBJECTS_ID_INITIAL_INDEX )
-
-#define OBJECTS_ID_FINAL ((Objects_Id)~0)
-
-/*
- * _Objects_Handler_initialization
- *
- * DESCRIPTION:
- *
- * This function performs the initialization necessary for this handler.
- *
- */
-
-void _Objects_Handler_initialization(
- unsigned32 node,
- unsigned32 maximum_nodes,
- unsigned32 maximum_global_objects
-);
-
-/*
- * _Objects_Extend_information
- *
- * DESCRIPTION:
- *
- * This function extends an object class information record.
- */
-
-void _Objects_Extend_information(
- Objects_Information *information
-);
-
-/*
- * _Objects_Shrink_information
- *
- * DESCRIPTION:
- *
- * This function shrink an object class information record.
- */
-
-void _Objects_Shrink_information(
- Objects_Information *information
-);
-
-/*
- * _Objects_Initialize_information
- *
- * DESCRIPTION:
- *
- * This function initializes an object class information record.
- * SUPPORTS_GLOBAL is TRUE if the object class supports global
- * objects, and FALSE otherwise. Maximum indicates the number
- * of objects required in this class and size indicates the size
- * in bytes of each control block for this object class. The
- * name length and string designator are also set. In addition,
- * the class may be a task, therefore this information is also included.
- */
-
-void _Objects_Initialize_information (
- Objects_Information *information,
- Objects_Classes the_class,
- boolean supports_global,
- unsigned32 maximum,
- unsigned32 size,
- boolean is_string,
- unsigned32 maximum_name_length,
- boolean is_task
-);
-
-/*PAGE
- *
- * _Objects_Allocate
- *
- * DESCRIPTION:
- *
- * This function allocates a object control block from
- * the inactive chain of free object control blocks.
- */
-
-Objects_Control *_Objects_Allocate(
- Objects_Information *information
-);
-
-/*
- * _Objects_Allocate_by_index
- *
- * DESCRIPTION:
- *
- * This function allocates the object control block
- * specified by the index from the inactive chain of
- * free object control blocks.
- */
-
-Objects_Control *_Objects_Allocate_by_index(
- Objects_Information *information,
- unsigned32 index,
- unsigned32 sizeof_control
-);
-
-/*PAGE
- *
- * _Objects_Free
- *
- * DESCRIPTION:
- *
- * This function frees a object control block to the
- * inactive chain of free object control blocks.
- */
-
-void _Objects_Free(
- Objects_Information *information,
- Objects_Control *the_object
-);
-
-/*
- * _Objects_Clear_name
- *
- * DESCRIPTION:
- *
- * XXX
- */
-
-void _Objects_Clear_name(
- void *name,
- unsigned32 length
-);
-
-/*
- * _Objects_Copy_name_string
- *
- * DESCRIPTION:
- *
- * XXX
- */
-
-void _Objects_Copy_name_string(
- void *source,
- void *destination
-);
-
-/*
- * _Objects_Copy_name_raw
- *
- * DESCRIPTION:
- *
- * XXX
- */
-
-void _Objects_Copy_name_raw(
- void *source,
- void *destination,
- unsigned32 length
-);
-
-/*
- * _Objects_Compare_name_string
- *
- * DESCRIPTION:
- *
- * XXX
- */
-
-boolean _Objects_Compare_name_string(
- void *name_1,
- void *name_2,
- unsigned32 length
-);
-
-/*
- * _Objects_Compare_name_raw
- *
- * DESCRIPTION:
- *
- * XXX
- */
-
-boolean _Objects_Compare_name_raw(
- void *name_1,
- void *name_2,
- unsigned32 length
-);
-/*
- * _Objects_Name_to_id
- *
- * DESCRIPTION:
- *
- * This function implements the common portion of the object
- * identification directives. This directive returns the object
- * id associated with name. If more than one object of this class
- * is named name, then the object to which the id belongs is
- * arbitrary. Node indicates the extent of the search for the
- * id of the object named name. If the object class supports global
- * objects, then the search can be limited to a particular node
- * or allowed to encompass all nodes.
- *
- */
-
-typedef enum {
- OBJECTS_SUCCESSFUL,
- OBJECTS_INVALID_NAME,
- OBJECTS_INVALID_NODE
-} Objects_Name_to_id_errors;
-
-#define OBJECTS_NAME_ERRORS_FIRST OBJECTS_SUCCESSFUL
-#define OBJECTS_NAME_ERRORS_LAST OBJECTS_INVALID_NODE
-
-Objects_Name_to_id_errors _Objects_Name_to_id(
- Objects_Information *information,
- Objects_Name name,
- unsigned32 node,
- Objects_Id *id
-);
-
-/*
- * _Objects_Get
- *
- * DESCRIPTION:
- *
- * This function maps object ids to object control blocks.
- * If id corresponds to a local object, then it returns
- * the_object control pointer which maps to id and location
- * is set to OBJECTS_LOCAL. If the object class supports global
- * objects and the object id is global and resides on a remote
- * node, then location is set to OBJECTS_REMOTE, and the_object
- * is undefined. Otherwise, location is set to OBJECTS_ERROR
- * and the_object is undefined.
- *
- */
-
-Objects_Control *_Objects_Get (
- Objects_Information *information,
- Objects_Id id,
- Objects_Locations *location
-);
-
-/*
- * _Objects_Get_next
- *
- * DESCRIPTION:
- *
- * Like _Objects_Get, but is used to find "next" open object.
- *
- */
-
-Objects_Control *_Objects_Get_next(
- Objects_Information *information,
- Objects_Id id,
- Objects_Locations *location_p,
- Objects_Id *next_id_p
-);
-
-/*
- * Pieces of object.inl are promoted out to the user
- */
-
-#include <rtems/score/object.inl>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/objectmp.h>
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/include/rtems/score/objectmp.h b/cpukit/score/include/rtems/score/objectmp.h
deleted file mode 100644
index de227a128b..0000000000
--- a/cpukit/score/include/rtems/score/objectmp.h
+++ /dev/null
@@ -1,151 +0,0 @@
-/* objectmp.h
- *
- * This include file contains all the constants and structures associated
- * with the manipulation of Global RTEMS Objects.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_OBJECTS_MP_h
-#define __RTEMS_OBJECTS_MP_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This defines the Global Object Control Block used to manage
- * objects resident on other nodes.
- */
-
-typedef struct {
- Objects_Control Object;
- unsigned32 name; /* XXX broken but works */
- /* XXX If any API is MP with variable length names .. BOOM!!!! */
-} Objects_MP_Control;
-
-/*
- * _Objects_MP_Handler_initialization
- *
- * DESCRIPTION:
- *
- * This routine intializes the inactive global object chain
- * based on the maximum number of global objects configured.
- */
-
-void _Objects_MP_Handler_initialization (
- unsigned32 node,
- unsigned32 maximum_nodes,
- unsigned32 maximum_global_objects
-);
-
-/*PAGE
- *
- * _Objects_MP_Open
- *
- * DESCRIPTION:
- *
- * This routine place the specified global object in the
- * specified information table.
- */
-
-void _Objects_MP_Open (
- Objects_Information *information,
- Objects_MP_Control *the_global_object,
- unsigned32 the_name, /* XXX -- wrong for variable */
- Objects_Id the_id
-);
-
-/*
- * _Objects_MP_Allocate_and_open
- *
- * DESCRIPTION:
- *
- * This routine allocates a global object control block
- * and places it in the specified information table. If the
- * allocation fails, then is_fatal_error determines the
- * error processing actions taken.
- */
-
-boolean _Objects_MP_Allocate_and_open (
- Objects_Information *information,
- unsigned32 the_name, /* XXX -- wrong for variable length */
- Objects_Id the_id,
- boolean is_fatal_error
-);
-
-/*
- * _Objects_MP_Close
- *
- * DESCRIPTION:
- *
- * This routine removes a global object from the specified
- * information table and deallocates the global object control block.
- */
-
-void _Objects_MP_Close (
- Objects_Information *information,
- Objects_Id the_id
-);
-
-/*
- * _Objects_MP_Global_name_search
- *
- * DESCRIPTION:
- *
- * This routine looks for the object with the_name in the global
- * object tables indicated by information. It returns the ID of the
- * object with that name if one is found.
- */
-
-Objects_Name_to_id_errors _Objects_MP_Global_name_search (
- Objects_Information *information,
- Objects_Name the_name,
- unsigned32 nodes_to_search,
- Objects_Id *the_id
-);
-
-/*
- * _Objects_MP_Is_remote
- *
- * DESCRIPTION:
- *
- * This function searches the Global Object Table managed
- * by information for the object indicated by ID. If the object
- * is found, then location is set to objects_remote, otherwise
- * location is set to objects_error. In both cases, the_object
- * is undefined.
- */
-
-void _Objects_MP_Is_remote (
- Objects_Information *information,
- Objects_Id the_id,
- Objects_Locations *location,
- Objects_Control **the_object
-);
-
-/*
- * The following chain header is used to manage the set of
- * inactive global object control blocks.
- */
-
-SCORE_EXTERN unsigned32 _Objects_MP_Maximum_global_objects;
-SCORE_EXTERN Chain_Control _Objects_MP_Inactive_global_objects;
-
-#ifndef __RTEMS_APPLICATION__
-#include <rtems/score/objectmp.inl>
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/include/rtems/score/priority.h b/cpukit/score/include/rtems/score/priority.h
deleted file mode 100644
index 216673bac2..0000000000
--- a/cpukit/score/include/rtems/score/priority.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/* priority.h
- *
- * This include file contains all thread priority manipulation routines.
- * This Handler provides mechanisms which can be used to
- * initialize and manipulate thread priorities.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __PRIORITY_h
-#define __PRIORITY_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * The following type defines the control block used to manage
- * thread priorities.
- *
- * NOTE: Priority 0 is reserved for internal threads only.
- */
-
-typedef unsigned32 Priority_Control;
-
-#define PRIORITY_MINIMUM 0 /* highest thread priority */
-#define PRIORITY_MAXIMUM 255 /* lowest thread priority */
-
-/*
- * The following record defines the information associated with
- * each thread to manage its interaction with the priority bit maps.
- */
-
-typedef struct {
- Priority_Bit_map_control *minor; /* addr of minor bit map slot */
- Priority_Bit_map_control ready_major; /* priority bit map ready mask */
- Priority_Bit_map_control ready_minor; /* priority bit map ready mask */
- Priority_Bit_map_control block_major; /* priority bit map block mask */
- Priority_Bit_map_control block_minor; /* priority bit map block mask */
-} Priority_Information;
-
-/*
- * The following data items are the priority bit map.
- * Each of the sixteen bits used in the _Priority_Major_bit_map is
- * associated with one of the sixteen entries in the _Priority_Bit_map.
- * Each bit in the _Priority_Bit_map indicates whether or not there are
- * threads ready at a particular priority. The mapping of
- * individual priority levels to particular bits is processor
- * dependent as is the value of each bit used to indicate that
- * threads are ready at that priority.
- */
-
-SCORE_EXTERN volatile Priority_Bit_map_control _Priority_Major_bit_map;
-SCORE_EXTERN Priority_Bit_map_control
- _Priority_Bit_map[16] CPU_STRUCTURE_ALIGNMENT;
-
-/*
- * The definition of the Priority_Bit_map_control type is CPU dependent.
- *
- */
-
-/*
- * Priority Bitfield Manipulation Routines
- *
- * NOTE:
- *
- * These may simply be pass throughs to CPU dependent routines.
- */
-
-#if ( CPU_USE_GENERIC_BITFIELD_CODE == FALSE )
-
-#define _Priority_Mask( _bit_number ) \
- _CPU_Priority_Mask( _bit_number )
-
-#define _Priority_Bits_index( _priority ) \
- _CPU_Priority_bits_index( _priority )
-
-#endif
-
-#ifndef __RTEMS_APPLICATION__
-#include <rtems/score/priority.inl>
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/include/rtems/score/stack.h b/cpukit/score/include/rtems/score/stack.h
deleted file mode 100644
index d9997bb389..0000000000
--- a/cpukit/score/include/rtems/score/stack.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* stack.h
- *
- * This include file contains all information about the thread
- * Stack Handler. This Handler provides mechanisms which can be used to
- * initialize and utilize stacks.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __STACK_h
-#define __STACK_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * The following constant defines the minimum stack size which every
- * thread must exceed.
- */
-
-#define STACK_MINIMUM_SIZE CPU_STACK_MINIMUM_SIZE
-
-/*
- * The following defines the control block used to manage each stack.
- */
-
-typedef struct {
- unsigned32 size; /* stack size */
- void *area; /* low memory addr of stack */
-} Stack_Control;
-
-#ifndef __RTEMS_APPLICATION__
-#include <rtems/score/stack.inl>
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/include/rtems/score/states.h b/cpukit/score/include/rtems/score/states.h
deleted file mode 100644
index b12571824f..0000000000
--- a/cpukit/score/include/rtems/score/states.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* states.h
- *
- * This include file contains thread execution state information.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_STATES_h
-#define __RTEMS_STATES_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * The following type defines the control block used to manage a
- * thread's state.
- */
-
-typedef unsigned32 States_Control;
-
-/*
- * The following constants define the individual states which may be
- * be used to compose and manipulate a thread's state.
- */
-
-#define STATES_ALL_SET 0xfffff /* all states */
-#define STATES_READY 0x00000 /* ready to run */
-#define STATES_DORMANT 0x00001 /* created not started */
-#define STATES_SUSPENDED 0x00002 /* waiting for resume */
-#define STATES_TRANSIENT 0x00004 /* in transition */
-#define STATES_DELAYING 0x00008 /* wait for timeout */
-#define STATES_WAITING_FOR_TIME 0x00010 /* wait for TOD */
-#define STATES_WAITING_FOR_BUFFER 0x00020
-#define STATES_WAITING_FOR_SEGMENT 0x00040
-#define STATES_WAITING_FOR_MESSAGE 0x00080
-#define STATES_WAITING_FOR_EVENT 0x00100
-#define STATES_WAITING_FOR_SEMAPHORE 0x00200
-#define STATES_WAITING_FOR_MUTEX 0x00400
-#define STATES_WAITING_FOR_CONDITION_VARIABLE 0x00800
-#define STATES_WAITING_FOR_JOIN_AT_EXIT 0x01000
-#define STATES_WAITING_FOR_RPC_REPLY 0x02000
-#define STATES_WAITING_FOR_PERIOD 0x04000
-#define STATES_WAITING_FOR_SIGNAL 0x08000
-#define STATES_INTERRUPTIBLE_BY_SIGNAL 0x10000
-
-#define STATES_LOCALLY_BLOCKED ( STATES_WAITING_FOR_BUFFER | \
- STATES_WAITING_FOR_SEGMENT | \
- STATES_WAITING_FOR_MESSAGE | \
- STATES_WAITING_FOR_SEMAPHORE | \
- STATES_WAITING_FOR_MUTEX | \
- STATES_WAITING_FOR_CONDITION_VARIABLE | \
- STATES_WAITING_FOR_JOIN_AT_EXIT | \
- STATES_WAITING_FOR_SIGNAL )
-
-#define STATES_WAITING_ON_THREAD_QUEUE \
- ( STATES_LOCALLY_BLOCKED | \
- STATES_WAITING_FOR_RPC_REPLY )
-
-#define STATES_BLOCKED ( STATES_DELAYING | \
- STATES_WAITING_FOR_TIME | \
- STATES_WAITING_FOR_PERIOD | \
- STATES_WAITING_FOR_EVENT | \
- STATES_WAITING_ON_THREAD_QUEUE | \
- STATES_INTERRUPTIBLE_BY_SIGNAL )
-
-#ifndef __RTEMS_APPLICATION__
-#include <rtems/score/states.inl>
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/include/rtems/score/sysstate.h b/cpukit/score/include/rtems/score/sysstate.h
deleted file mode 100644
index 526494b79b..0000000000
--- a/cpukit/score/include/rtems/score/sysstate.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* sysstates.h
- *
- * This include file contains information regarding the system state.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_SYSTEM_STATE_h
-#define __RTEMS_SYSTEM_STATE_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* types */
-
-/* enumerated constants */
-
-/*
- * The following type defines the possible system states.
- */
-
-typedef enum {
- SYSTEM_STATE_BEFORE_INITIALIZATION, /* start -> end of 1st init part */
- SYSTEM_STATE_BEFORE_MULTITASKING, /* end of 1st -> beginning of 2nd */
- SYSTEM_STATE_BEGIN_MULTITASKING, /* just before multitasking starts */
- SYSTEM_STATE_UP, /* normal operation */
- SYSTEM_STATE_SHUTDOWN, /* shutdown */
- SYSTEM_STATE_FAILED /* fatal error occurred */
-} System_state_Codes;
-
-#define SYSTEM_STATE_CODES_FIRST SYSTEM_STATE_BEFORE_INITIALIZATION
-#define SYSTEM_STATE_CODES_LAST SYSTEM_STATE_FAILED
-
-/*
- * The following variable indicates whether or not this is
- * an multiprocessing system.
- */
-
-SCORE_EXTERN boolean _System_state_Is_multiprocessing;
-
-/*
- * The following variable contains the current system state.
- */
-
-SCORE_EXTERN System_state_Codes _System_state_Current;
-
-/*
- * Make it possible for the application to get the system state information.
- */
-
-#include <rtems/score/sysstate.inl>
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/include/rtems/score/thread.h b/cpukit/score/include/rtems/score/thread.h
deleted file mode 100644
index ec48864a9f..0000000000
--- a/cpukit/score/include/rtems/score/thread.h
+++ /dev/null
@@ -1,761 +0,0 @@
-/* thread.h
- *
- * This include file contains all constants and structures associated
- * with the thread control block.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __THREAD_h
-#define __THREAD_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/context.h>
-#include <rtems/score/cpu.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mppkt.h>
-#endif
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/stack.h>
-#include <rtems/score/states.h>
-#include <rtems/score/tod.h>
-#include <rtems/score/tqdata.h>
-#include <rtems/score/watchdog.h>
-
-/*
- * The following defines the "return type" of a thread.
- *
- * NOTE: This cannot always be right. Some APIs have void
- * tasks/threads, others return pointers, others may
- * return a numeric value. Hopefully a pointer is
- * always at least as big as an unsigned32. :)
- */
-
-typedef void *Thread;
-
-/*
- * The following defines the ways in which the entry point for a
- * thread can be invoked. Basically, it can be passed any
- * combination/permutation of a pointer and an unsigned32 value.
- *
- * NOTE: For now, we are ignoring the return type.
- */
-
-typedef enum {
- THREAD_START_NUMERIC,
- THREAD_START_POINTER,
- THREAD_START_BOTH_POINTER_FIRST,
- THREAD_START_BOTH_NUMERIC_FIRST
-} Thread_Start_types;
-
-typedef Thread ( *Thread_Entry )(); /* basic type */
-
-typedef Thread ( *Thread_Entry_numeric )( unsigned32 );
-typedef Thread ( *Thread_Entry_pointer )( void * );
-typedef Thread ( *Thread_Entry_both_pointer_first )( void *, unsigned32 );
-typedef Thread ( *Thread_Entry_both_numeric_first )( unsigned32, void * );
-
-/*
- * The following lists the algorithms used to manage the thread cpu budget.
- *
- * Reset Timeslice: At each context switch, reset the time quantum.
- * Exhaust Timeslice: Only reset the quantum once it is consumed.
- * Callout: Execute routine when budget is consumed.
- */
-
-typedef enum {
- THREAD_CPU_BUDGET_ALGORITHM_NONE,
- THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE,
- THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE,
- THREAD_CPU_BUDGET_ALGORITHM_CALLOUT
-} Thread_CPU_budget_algorithms;
-
-typedef struct Thread_Control_struct Thread_Control;
-
-typedef void (*Thread_CPU_budget_algorithm_callout )( Thread_Control * );
-
-/*
- * Per task variable structure
- */
-
-struct rtems_task_variable_tt;
-
-struct rtems_task_variable_tt {
- struct rtems_task_variable_tt *next;
- void **ptr;
- void *var;
- void (*dtor)(void *);
-};
-
-typedef struct rtems_task_variable_tt rtems_task_variable_t;
-
-/*
- * The following structure contains the information which defines
- * the starting state of a thread.
- */
-
-typedef struct {
- Thread_Entry entry_point; /* starting thread address */
- Thread_Start_types prototype; /* how task is invoked */
- void *pointer_argument; /* pointer argument */
- unsigned32 numeric_argument; /* numeric argument */
- /* initial execution modes */
- boolean is_preemptible;
- Thread_CPU_budget_algorithms budget_algorithm;
- Thread_CPU_budget_algorithm_callout budget_callout;
- unsigned32 isr_level;
- Priority_Control initial_priority; /* initial priority */
- boolean core_allocated_stack;
- Stack_Control Initial_stack; /* stack information */
- void *fp_context; /* initial FP context area address */
- void *stack; /* initial stack area address */
-} Thread_Start_information;
-
-/*
- * The following structure contains the information necessary to manage
- * a thread which it is waiting for a resource.
- */
-
-#define THREAD_STATUS_PROXY_BLOCKING 0x1111111
-
-typedef struct {
- Objects_Id id; /* waiting on this object */
- unsigned32 count; /* "generic" fields to be used */
- void *return_argument; /* when blocking */
- void *return_argument_1;
- unsigned32 option;
-
- /*
- * NOTE: The following assumes that all API return codes can be
- * treated as an unsigned32.
- */
- unsigned32 return_code; /* status for thread awakened */
-
- Chain_Control Block2n; /* 2 - n priority blocked chain */
- Thread_queue_Control *queue; /* pointer to thread queue */
-} Thread_Wait_information;
-
-/*
- * The following defines the control block used to manage
- * each thread proxy.
- *
- * NOTE: It is critical that proxies and threads have identical
- * memory images for the shared part.
- */
-
-typedef struct {
- Objects_Control Object;
- States_Control current_state;
- Priority_Control current_priority;
- Priority_Control real_priority;
- unsigned32 resource_count;
- Thread_Wait_information Wait;
- Watchdog_Control Timer;
-#if defined(RTEMS_MULTIPROCESSING)
- MP_packet_Prefix *receive_packet;
-#endif
- /****************** end of common block ********************/
- Chain_Node Active;
-} Thread_Proxy_control;
-
-
-/*
- * The following record defines the control block used
- * to manage each thread.
- *
- * NOTE: It is critical that proxies and threads have identical
- * memory images for the shared part.
- */
-
-typedef enum {
- THREAD_API_RTEMS,
- THREAD_API_POSIX,
- THREAD_API_ITRON
-} Thread_APIs;
-
-#define THREAD_API_FIRST THREAD_API_RTEMS
-#define THREAD_API_LAST THREAD_API_ITRON
-
-struct Thread_Control_struct {
- Objects_Control Object;
- States_Control current_state;
- Priority_Control current_priority;
- Priority_Control real_priority;
- unsigned32 resource_count;
- Thread_Wait_information Wait;
- Watchdog_Control Timer;
-#if defined(RTEMS_MULTIPROCESSING)
- MP_packet_Prefix *receive_packet;
-#endif
- /****************** end of common block ********************/
- unsigned32 suspend_count;
- boolean is_global;
- boolean do_post_task_switch_extension;
-
- boolean is_preemptible;
- void *rtems_ada_self;
- unsigned32 cpu_time_budget;
- Thread_CPU_budget_algorithms budget_algorithm;
- Thread_CPU_budget_algorithm_callout budget_callout;
-
- unsigned32 ticks_executed;
- Chain_Control *ready;
- Priority_Information Priority_map;
- Thread_Start_information Start;
- Context_Control Registers;
- void *fp_context;
- void *API_Extensions[ THREAD_API_LAST + 1 ];
- void **extensions;
- rtems_task_variable_t *task_variables;
-};
-
-/*
- * Self for the GNU Ada Run-Time
- */
-
-SCORE_EXTERN void *rtems_ada_self;
-
-/*
- * The following defines the information control block used to
- * manage this class of objects.
- */
-
-SCORE_EXTERN Objects_Information _Thread_Internal_information;
-
-/*
- * The following define the thread control pointers used to access
- * and manipulate the idle thread.
- */
-
-SCORE_EXTERN Thread_Control *_Thread_Idle;
-
-/*
- * The following context area contains the context of the "thread"
- * which invoked the start multitasking routine. This context is
- * restored as the last action of the stop multitasking routine. Thus
- * control of the processor can be returned to the environment
- * which initiated the system.
- */
-
-SCORE_EXTERN Context_Control _Thread_BSP_context;
-
-/*
- * The following declares the dispatch critical section nesting
- * counter which is used to prevent context switches at inopportune
- * moments.
- */
-
-SCORE_EXTERN volatile unsigned32 _Thread_Dispatch_disable_level;
-
-/*
- * If this is non-zero, then the post-task switch extension
- * is run regardless of the state of the per thread flag.
- */
-
-SCORE_EXTERN unsigned32 _Thread_Do_post_task_switch_extension;
-
-/*
- * The following holds how many user extensions are in the system. This
- * is used to determine how many user extension data areas to allocate
- * per thread.
- */
-
-SCORE_EXTERN unsigned32 _Thread_Maximum_extensions;
-
-/*
- * The following is used to manage the length of a timeslice quantum.
- */
-
-SCORE_EXTERN unsigned32 _Thread_Ticks_per_timeslice;
-
-/*
- * The following points to the array of FIFOs used to manage the
- * set of ready threads.
- */
-
-SCORE_EXTERN Chain_Control *_Thread_Ready_chain;
-
-/*
- * The following points to the thread which is currently executing.
- * This thread is implicitly manipulated by numerous directives.
- */
-
-SCORE_EXTERN Thread_Control *_Thread_Executing;
-
-/*
- * The following points to the highest priority ready thread
- * in the system. Unless the current thread is not preemptibl,
- * then this thread will be context switched to when the next
- * dispatch occurs.
- */
-
-SCORE_EXTERN Thread_Control *_Thread_Heir;
-
-/*
- * The following points to the thread whose floating point
- * context is currently loaded.
- */
-
-SCORE_EXTERN Thread_Control *_Thread_Allocated_fp;
-
-/*
- * _Thread_Handler_initialization
- *
- * DESCRIPTION:
- *
- * This routine performs the initialization necessary for this handler.
- */
-
-void _Thread_Handler_initialization (
- unsigned32 ticks_per_timeslice,
- unsigned32 maximum_extensions,
- unsigned32 maximum_proxies
-);
-
-/*
- * _Thread_Create_idle
- *
- * DESCRIPTION:
- *
- * This routine creates the idle thread.
- *
- * WARNING!! No thread should be created before this one.
- */
-
-void _Thread_Create_idle( void );
-
-/*
- * _Thread_Start_multitasking
- *
- * DESCRIPTION:
- *
- * This routine initiates multitasking. It is invoked only as
- * part of initialization and its invocation is the last act of
- * the non-multitasking part of the system initialization.
- */
-
-void _Thread_Start_multitasking( void );
-
-/*
- * _Thread_Dispatch
- *
- * DESCRIPTION:
- *
- * This routine is responsible for transferring control of the
- * processor from the executing thread to the heir thread. As part
- * of this process, it is responsible for the following actions:
- *
- * + saving the context of the executing thread
- * + restoring the context of the heir thread
- * + dispatching any signals for the resulting executing thread
- */
-
-void _Thread_Dispatch( void );
-
-/*
- * _Thread_Stack_Allocate
- *
- * DESCRIPTION:
- *
- * Allocate the requested stack space for the thread.
- * return the actual size allocated after any adjustment
- * or return zero if the allocation failed.
- * Set the Start.stack field to the address of the stack
- *
- * NOTES: NONE
- *
- */
-
-unsigned32 _Thread_Stack_Allocate(
- Thread_Control *the_thread,
- unsigned32 stack_size
-);
-
-/*
- * _Thread_Stack_Free
- *
- * DESCRIPTION:
- *
- * Deallocate the Thread's stack.
- * NOTES: NONE
- *
- */
-
-void _Thread_Stack_Free(
- Thread_Control *the_thread
-);
-
-/*
- * _Thread_Initialize
- *
- * DESCRIPTION:
- *
- * This routine initializes the specified the thread. It allocates
- * all memory associated with this thread. It completes by adding
- * the thread to the local object table so operations on this
- * thread id are allowed.
- *
- * NOTES:
- *
- * If stack_area is NULL, it is allocated from the workspace.
- *
- * If the stack is allocated from the workspace, then it is guaranteed to be
- * of at least minimum size.
- */
-
-boolean _Thread_Initialize(
- Objects_Information *information,
- Thread_Control *the_thread,
- void *stack_area,
- unsigned32 stack_size,
- boolean is_fp,
- Priority_Control priority,
- boolean is_preemptible,
- Thread_CPU_budget_algorithms budget_algorithm,
- Thread_CPU_budget_algorithm_callout budget_callout,
- unsigned32 isr_level,
- Objects_Name name
-);
-
-/*
- * _Thread_Start
- *
- * DESCRIPTION:
- *
- * This routine initializes the executable information for a thread
- * and makes it ready to execute. After this routine executes, the
- * thread competes with all other threads for CPU time.
- */
-
-boolean _Thread_Start(
- Thread_Control *the_thread,
- Thread_Start_types the_prototype,
- void *entry_point,
- void *pointer_argument,
- unsigned32 numeric_argument
-);
-
-/*
- * _Thread_Restart
- *
- * DESCRIPTION:
- *
- * This support routine restarts the specified task in a way that the
- * next time this thread executes, it will begin execution at its
- * original starting point.
- */
-
-/* XXX multiple task arg profiles */
-
-boolean _Thread_Restart(
- Thread_Control *the_thread,
- void *pointer_argument,
- unsigned32 numeric_argument
-);
-
-/*
- * _Thread_Reset
- *
- * DESCRIPTION:
- *
- * This routine resets a thread to its initial state but does
- * not restart it.
- */
-
-void _Thread_Reset(
- Thread_Control *the_thread,
- void *pointer_argument,
- unsigned32 numeric_argument
-);
-
-/*
- * _Thread_Close
- *
- * DESCRIPTION:
- *
- * This routine frees all memory associated with the specified
- * thread and removes it from the local object table so no further
- * operations on this thread are allowed.
- */
-
-void _Thread_Close(
- Objects_Information *information,
- Thread_Control *the_thread
-);
-
-/*
- * _Thread_Ready
- *
- * DESCRIPTION:
- *
- * This routine removes any set states for the_thread. It performs
- * any necessary scheduling operations including the selection of
- * a new heir thread.
- */
-
-void _Thread_Ready(
- Thread_Control *the_thread
-);
-
-/*
- * _Thread_Clear_state
- *
- * DESCRIPTION:
- *
- * This routine clears the indicated STATES for the_thread. It performs
- * any necessary scheduling operations including the selection of
- * a new heir thread.
- */
-
-void _Thread_Clear_state(
- Thread_Control *the_thread,
- States_Control state
-);
-
-/*
- * _Thread_Set_state
- *
- * DESCRIPTION:
- *
- * This routine sets the indicated states for the_thread. It performs
- * any necessary scheduling operations including the selection of
- * a new heir thread.
- *
- */
-
-void _Thread_Set_state(
- Thread_Control *the_thread,
- States_Control state
-);
-
-/*
- * _Thread_Set_transient
- *
- * DESCRIPTION:
- *
- * This routine sets the TRANSIENT state for the_thread. It performs
- * any necessary scheduling operations including the selection of
- * a new heir thread.
- */
-
-void _Thread_Set_transient(
- Thread_Control *the_thread
-);
-
-/*
- * _Thread_Reset_timeslice
- *
- * DESCRIPTION:
- *
- * This routine is invoked upon expiration of the currently
- * executing thread's timeslice. If no other thread's are ready
- * at the priority of the currently executing thread, then the
- * executing thread's timeslice is reset. Otherwise, the
- * currently executing thread is placed at the rear of the
- * FIFO for this priority and a new heir is selected.
- */
-
-void _Thread_Reset_timeslice( void );
-
-/*
- * _Thread_Tickle_timeslice
- *
- * DESCRIPTION:
- *
- * This routine is invoked as part of processing each clock tick.
- * It is responsible for determining if the current thread allows
- * timeslicing and, if so, when its timeslice expires.
- */
-
-void _Thread_Tickle_timeslice( void );
-
-/*
- * _Thread_Yield_processor
- *
- * DESCRIPTION:
- *
- * This routine is invoked when a thread wishes to voluntarily
- * transfer control of the processor to another thread of equal
- * or greater priority.
- */
-
-void _Thread_Yield_processor( void );
-
-/*
- * _Thread_Rotate_Ready_Queue
- *
- * DESCRIPTION:
- *
- * This routine is invoked to rotate the ready queue for the
- * given priority. It can be used to yeild the processor
- * by rotating the executing threads ready queue.
- */
-
-void _Thread_Rotate_Ready_Queue(
- Priority_Control priority
-);
-
-/*
- * _Thread_Load_environment
- *
- * DESCRIPTION:
- *
- * This routine initializes the context of the_thread to its
- * appropriate starting state.
- */
-
-void _Thread_Load_environment(
- Thread_Control *the_thread
-);
-
-/*
- * _Thread_Handler
- *
- * DESCRIPTION:
- *
- * This routine is the wrapper function for all threads. It is
- * the starting point for all threads. The user provided thread
- * entry point is invoked by this routine. Operations
- * which must be performed immediately before and after the user's
- * thread executes are found here.
- */
-
-void _Thread_Handler( void );
-
-/*
- * _Thread_Delay_ended
- *
- * DESCRIPTION:
- *
- * This routine is invoked when a thread must be unblocked at the
- * end of a time based delay (i.e. wake after or wake when).
- */
-
-void _Thread_Delay_ended(
- Objects_Id id,
- void *ignored
-);
-
-/*
- * _Thread_Change_priority
- *
- * DESCRIPTION:
- *
- * This routine changes the current priority of the_thread to
- * new_priority. It performs any necessary scheduling operations
- * including the selection of a new heir thread.
- */
-
-void _Thread_Change_priority (
- Thread_Control *the_thread,
- Priority_Control new_priority,
- boolean prepend_it
-);
-
-/*
- * _Thread_Set_priority
- *
- * DESCRIPTION:
- *
- * This routine updates the priority related fields in the_thread
- * control block to indicate the current priority is now new_priority.
- */
-
-void _Thread_Set_priority(
- Thread_Control *the_thread,
- Priority_Control new_priority
-);
-
-/*
- * _Thread_Suspend
- *
- * DESCRIPTION:
- *
- * This routine updates the related suspend fields in the_thread
- * control block to indicate the current nested level.
- */
-
-void _Thread_Suspend(
- Thread_Control *the_thread
-);
-
-/*
- * _Thread_Resume
- *
- * DESCRIPTION:
- *
- * This routine updates the related suspend fields in the_thread
- * control block to indicate the current nested level. A force
- * parameter of TRUE will force a resume and clear the suspend count.
- */
-
-void _Thread_Resume(
- Thread_Control *the_thread,
- boolean force
-);
-
-/*
- * _Thread_Evaluate_mode
- *
- * DESCRIPTION:
- *
- * This routine evaluates the current scheduling information for the
- * system and determines if a context switch is required. This
- * is usually called after changing an execution mode such as preemptability
- * for a thread.
- */
-
-boolean _Thread_Evaluate_mode( void );
-
-/*
- * _Thread_Get
- *
- * NOTE: If we are not using static inlines, this must be a real
- * subroutine call.
- */
-
-#ifndef USE_INLINES
-Thread_Control *_Thread_Get (
- Objects_Id id,
- Objects_Locations *location
-);
-#endif
-
-/*
- * _Thread_Idle_body
- *
- * DESCRIPTION:
- *
- * This routine is the body of the system idle thread.
- */
-
-#if (CPU_PROVIDES_IDLE_THREAD_BODY == FALSE)
-Thread _Thread_Idle_body(
- unsigned32 ignored
-);
-#endif
-
-#ifndef __RTEMS_APPLICATION__
-#include <rtems/score/thread.inl>
-#endif
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/threadmp.h>
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/include/rtems/score/threadmp.h b/cpukit/score/include/rtems/score/threadmp.h
deleted file mode 100644
index 62a379d723..0000000000
--- a/cpukit/score/include/rtems/score/threadmp.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/* threadmp.h
- *
- * This include file contains the specification for all routines
- * and data specific to the multiprocessing portion of the thread package.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_THREAD_MP_h
-#define __RTEMS_THREAD_MP_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * _Thread_MP_Handler_initialization
- *
- * DESCRIPTION:
- *
- * This routine initializes the multiprocessing portion of the Thread Handler.
- */
-
-void _Thread_MP_Handler_initialization (
- unsigned32 maximum_proxies
-);
-
-/*
- * _Thread_MP_Allocate_proxy
- *
- * DESCRIPTION:
- *
- * This allocates a proxy control block from
- * the inactive chain of free proxy control blocks.
- *
- * NOTE: This function returns a thread control pointer
- * because proxies are substitutes for remote threads.
- */
-
-Thread_Control *_Thread_MP_Allocate_proxy (
- States_Control the_state
-);
-
-/*
- * _Thread_MP_Find_proxy
- *
- * DESCRIPTION:
- *
- * This function removes the proxy control block for the specified
- * id from the active chain of proxy control blocks.
- */
-
-Thread_Control *_Thread_MP_Find_proxy (
- Objects_Id the_id
-);
-
-/*
- * The following is used to determine when the multiprocessing receive
- * thread is executing so that a proxy can be allocated instead of
- * blocking the multiprocessing receive thread.
- */
-
-SCORE_EXTERN Thread_Control *_Thread_MP_Receive;
-
-/*
- * The following chains are used to manage proxies.
- */
-
-SCORE_EXTERN Chain_Control _Thread_MP_Active_proxies;
-SCORE_EXTERN Chain_Control _Thread_MP_Inactive_proxies;
-
-#ifndef __RTEMS_APPLICATION__
-#include <rtems/score/threadmp.inl>
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/include/rtems/score/threadq.h b/cpukit/score/include/rtems/score/threadq.h
deleted file mode 100644
index 1ef6c009cb..0000000000
--- a/cpukit/score/include/rtems/score/threadq.h
+++ /dev/null
@@ -1,300 +0,0 @@
-/* threadq.h
- *
- * This include file contains all the constants and structures associated
- * with the manipulation of objects.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __THREAD_QUEUE_h
-#define __THREAD_QUEUE_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/tqdata.h>
-
-#include <rtems/score/object.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/watchdog.h>
-
-/*
- * Constant for indefinite wait.
- */
-
-#define THREAD_QUEUE_WAIT_FOREVER WATCHDOG_NO_TIMEOUT
-
-/*
- * The following type defines the callout used when a remote task
- * is extracted from a local thread queue.
- */
-
-typedef void ( *Thread_queue_Flush_callout )(
- Thread_Control *
- );
-
-/*
- * The following type defines the callout used when a local task
- * is extracted from a remote thread queue (i.e. it's proxy must
- * extracted from the remote queue).
- */
-
-typedef void ( *Thread_queue_Extract_callout )(
- Thread_Control *
- );
-
-SCORE_EXTERN Thread_queue_Extract_callout
- _Thread_queue_Extract_table[ OBJECTS_CLASSES_LAST + 1 ];
-
-/*
- * _Thread_queue_Dequeue
- *
- * DESCRIPTION:
- *
- * This function returns a pointer to a thread waiting on
- * the_thread_queue. The selection of this thread is based on
- * the discipline of the_thread_queue. If no threads are waiting
- * on the_thread_queue, then NULL is returned.
- */
-
-Thread_Control *_Thread_queue_Dequeue(
- Thread_queue_Control *the_thread_queue
-);
-
-/*
- * _Thread_queue_Enqueue
- *
- * DESCRIPTION:
- *
- * This routine enqueues the currently executing thread on
- * the_thread_queue with an optional timeout.
- */
-
-void _Thread_queue_Enqueue(
- Thread_queue_Control *the_thread_queue,
- Watchdog_Interval timeout
-);
-
-/*
- * _Thread_queue_Extract
- *
- * DESCRIPTION:
- *
- * This routine removes the_thread from the_thread_queue
- * and cancels any timeouts associated with this blocking.
- */
-
-void _Thread_queue_Extract(
- Thread_queue_Control *the_thread_queue,
- Thread_Control *the_thread
-);
-
-/*
- * _Thread_queue_Extract_with_proxy
- *
- * DESCRIPTION:
- *
- * This routine extracts the_thread from the_thread_queue
- * and insures that if there is a proxy for this task on
- * another node, it is also dealt with.
- */
-
-boolean _Thread_queue_Extract_with_proxy(
- Thread_Control *the_thread
-);
-
-/*
- * _Thread_queue_First
- *
- * DESCRIPTION:
- *
- * This function returns a pointer to the "first" thread
- * on the_thread_queue. The "first" thread is selected
- * based on the discipline of the_thread_queue.
- */
-
-Thread_Control *_Thread_queue_First(
- Thread_queue_Control *the_thread_queue
-);
-
-/*
- * _Thread_queue_Flush
- *
- * DESCRIPTION:
- *
- * This routine unblocks all threads blocked on the_thread_queue
- * and cancels any associated timeouts.
- */
-
-void _Thread_queue_Flush(
- Thread_queue_Control *the_thread_queue,
- Thread_queue_Flush_callout remote_extract_callout,
- unsigned32 status
-);
-
-/*
- * _Thread_queue_Initialize
- *
- * DESCRIPTION:
- *
- * This routine initializes the_thread_queue based on the
- * discipline indicated in attribute_set. The state set on
- * threads which block on the_thread_queue is state.
- */
-
-void _Thread_queue_Initialize(
- Thread_queue_Control *the_thread_queue,
- Objects_Classes the_class,
- Thread_queue_Disciplines the_discipline,
- States_Control state,
- Thread_queue_Extract_callout proxy_extract_callout,
- unsigned32 timeout_status
-);
-
-/*
- * _Thread_queue_Dequeue_priority
- *
- * DESCRIPTION:
- *
- * This function returns a pointer to the highest priority
- * thread waiting on the_thread_queue. If no threads are waiting
- * on the_thread_queue, then NULL is returned.
- */
-
-Thread_Control *_Thread_queue_Dequeue_priority(
- Thread_queue_Control *the_thread_queue
-);
-
-/*
- * _Thread_queue_Enqueue_priority
- *
- * DESCRIPTION:
- *
- * This routine enqueues the currently executing thread on
- * the_thread_queue with an optional timeout using the
- * priority discipline.
- */
-
-void _Thread_queue_Enqueue_priority(
- Thread_queue_Control *the_thread_queue,
- Thread_Control *the_thread,
- Watchdog_Interval timeout
-);
-
-/*
- * _Thread_queue_Extract_priority
- *
- * DESCRIPTION:
- *
- * This routine removes the_thread from the_thread_queue
- * and cancels any timeouts associated with this blocking.
- */
-
-void _Thread_queue_Extract_priority(
- Thread_queue_Control *the_thread_queue,
- Thread_Control *the_thread
-);
-
-/*
- * _Thread_queue_First_priority
- *
- * DESCRIPTION:
- *
- * This function returns a pointer to the "first" thread
- * on the_thread_queue. The "first" thread is the highest
- * priority thread waiting on the_thread_queue.
- */
-
-Thread_Control *_Thread_queue_First_priority(
- Thread_queue_Control *the_thread_queue
-);
-
-/*
- * _Thread_queue_Dequeue_FIFO
- *
- * DESCRIPTION:
- *
- * This function returns a pointer to the thread which has
- * been waiting the longest on the_thread_queue. If no
- * threads are waiting on the_thread_queue, then NULL is returned.
- */
-
-Thread_Control *_Thread_queue_Dequeue_fifo(
- Thread_queue_Control *the_thread_queue
-);
-
-/*
- * _Thread_queue_Enqueue_FIFO
- *
- * DESCRIPTION:
- *
- * This routine enqueues the currently executing thread on
- * the_thread_queue with an optional timeout using the
- * FIFO discipline.
- */
-
-void _Thread_queue_Enqueue_fifo(
- Thread_queue_Control *the_thread_queue,
- Thread_Control *the_thread,
- Watchdog_Interval timeout
-);
-
-/*
- * _Thread_queue_Extract_FIFO
- *
- * DESCRIPTION:
- *
- * This routine removes the_thread from the_thread_queue
- * and cancels any timeouts associated with this blocking.
- */
-
-void _Thread_queue_Extract_fifo(
- Thread_queue_Control *the_thread_queue,
- Thread_Control *the_thread
-);
-
-/*
- * _Thread_queue_First_FIFO
- *
- * DESCRIPTION:
- *
- * This function returns a pointer to the "first" thread
- * on the_thread_queue. The first thread is the thread
- * which has been waiting longest on the_thread_queue.
- */
-
-Thread_Control *_Thread_queue_First_fifo(
- Thread_queue_Control *the_thread_queue
-);
-
-/*
- * _Thread_queue_timeout
- *
- * DESCRIPTION:
- *
- * This routine is invoked when a task's request has not
- * been satisfied after the timeout interval specified to
- * enqueue. The task represented by ID will be unblocked and
- * its status code will be set in it's control block to indicate
- * that a timeout has occurred.
- */
-
-void _Thread_queue_Timeout (
- Objects_Id id,
- void *ignored
-);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/include/rtems/score/tod.h b/cpukit/score/include/rtems/score/tod.h
deleted file mode 100644
index c745fdb1f6..0000000000
--- a/cpukit/score/include/rtems/score/tod.h
+++ /dev/null
@@ -1,276 +0,0 @@
-/* tod.h
- *
- * This include file contains all the constants and structures associated
- * with the Time of Day Handler.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __TIME_OF_DAY_h
-#define __TIME_OF_DAY_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/object.h>
-#include <rtems/score/watchdog.h>
-
-/*
- * The following constants are related to the time of day.
- */
-
-#define TOD_SECONDS_PER_MINUTE 60
-#define TOD_MINUTES_PER_HOUR 60
-#define TOD_MONTHS_PER_YEAR 12
-#define TOD_DAYS_PER_YEAR 365
-#define TOD_HOURS_PER_DAY 24
-#define TOD_SECONDS_PER_DAY (TOD_SECONDS_PER_MINUTE * \
- TOD_MINUTES_PER_HOUR * \
- TOD_HOURS_PER_DAY)
-
-#define TOD_SECONDS_PER_NON_LEAP_YEAR (365 * TOD_SECONDS_PER_DAY)
-
-#define TOD_MILLISECONDS_PER_SECOND 1000
-#define TOD_MICROSECONDS_PER_SECOND 1000000
-#define TOD_NANOSECONDS_PER_SECOND 1000000000
-#define TOD_NANOSECONDS_PER_MICROSECOND 1000
-
-/*
- * The following constant define the earliest year to which an
- * time of day can be initialized. This is considered the
- * epoch.
- */
-
-#define TOD_BASE_YEAR 1988
-
-/*
- * The following record defines the time of control block. This
- * control block is used to maintain the current time of day.
- */
-
-typedef struct { /* RTEID style time/date */
- unsigned32 year; /* year, A.D. */
- unsigned32 month; /* month, 1 -> 12 */
- unsigned32 day; /* day, 1 -> 31 */
- unsigned32 hour; /* hour, 0 -> 23 */
- unsigned32 minute; /* minute, 0 -> 59 */
- unsigned32 second; /* second, 0 -> 59 */
- unsigned32 ticks; /* elapsed ticks between secs */
-} TOD_Control;
-
-/*
- * The following is TRUE if the application has set the current
- * time of day, and FALSE otherwise.
- */
-
-SCORE_EXTERN boolean _TOD_Is_set;
-
-/*
- * The following contains the current time of day.
- */
-
-SCORE_EXTERN TOD_Control _TOD_Current;
-
-/*
- * The following contains the number of seconds from 00:00:00
- * January 1, TOD_BASE_YEAR until the current time of day.
- */
-
-SCORE_EXTERN Watchdog_Interval _TOD_Seconds_since_epoch;
-
-/*
- * The following contains the number of microseconds per tick.
- */
-
-SCORE_EXTERN unsigned32 _TOD_Microseconds_per_tick;
-
-/*
- * The following contains the number of clock ticks per second.
- *
- * NOTE:
- *
- * If one second is NOT evenly divisible by the number of microseconds
- * per clock tick, this value will contain only the integer portion
- * of the division. This means that the interval between clock ticks
- * can be a source of error in the current time of day.
- */
-
-SCORE_EXTERN unsigned32 _TOD_Ticks_per_second;
-
-/*
- * This is the control structure for the watchdog timer which
- * fires to service the seconds chain.
- */
-
-SCORE_EXTERN Watchdog_Control _TOD_Seconds_watchdog;
-
-#ifdef SCORE_INIT
-
-/*
- * The following array contains the number of days in all months.
- * The first dimension should be 1 for leap years, and 0 otherwise.
- * The second dimension should range from 1 to 12 for January to
- * February, respectively.
- */
-
-const unsigned32 _TOD_Days_per_month[ 2 ][ 13 ] = {
- { 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 },
- { 0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
-};
-
-/*
- * The following array contains the number of days in all months
- * up to the month indicated by the index of the second dimension.
- * The first dimension should be 1 for leap years, and 0 otherwise.
- */
-
-const unsigned16 _TOD_Days_to_date[2][13] = {
- { 0, 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 },
- { 0, 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335 }
-};
-
-/*
- * The following array contains the number of days in the years
- * since the last leap year. The index should be 0 for leap
- * years, and the number of years since the beginning of a leap
- * year otherwise.
- */
-
-const unsigned16 _TOD_Days_since_last_leap_year[4] = { 0, 366, 731, 1096 };
-
-#else
-
-extern const unsigned16 _TOD_Days_to_date[2][13]; /* Julian days */
-extern const unsigned16 _TOD_Days_since_last_leap_year[4];
-extern const unsigned32 _TOD_Days_per_month[2][13];
-
-#endif
-
-/*
- * _TOD_Handler_initialization
- *
- * DESCRIPTION:
- *
- * This routine performs the initialization necessary for this handler.
- */
-
-void _TOD_Handler_initialization(
- unsigned32 microseconds_per_tick
-);
-
-/*
- * _TOD_Set
- *
- * DESCRIPTION:
- *
- * This routine sets the current time of day to THE_TOD and
- * the equivalent SECONDS_SINCE_EPOCH.
- */
-
-void _TOD_Set(
- TOD_Control *the_tod,
- Watchdog_Interval seconds_since_epoch
-);
-
-/*
- * _TOD_Validate
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if THE_TOD contains
- * a valid time of day, and FALSE otherwise.
- */
-
-boolean _TOD_Validate(
- TOD_Control *the_tod
-);
-
-/*
- * _TOD_To_seconds
- *
- * DESCRIPTION:
- *
- * This function returns the number seconds between the epoch and THE_TOD.
- */
-
-Watchdog_Interval _TOD_To_seconds(
- TOD_Control *the_tod
-);
-
-/*
- * _TOD_Tickle
- *
- * DESCRIPTION:
- *
- * This routine is scheduled as a watchdog function and is invoked at
- * each second boundary. It updates the current time of day to indicate
- * that a second has passed and processes the seconds watchdog chain.
- */
-
-void _TOD_Tickle(
- Objects_Id id,
- void *ignored
-);
-
-/*
- * TOD_MILLISECONDS_TO_MICROSECONDS
- *
- * DESCRIPTION:
- *
- * This routine converts an interval expressed in milliseconds to microseconds.
- *
- * NOTE:
- *
- * This must be a macro so it can be used in "static" tables.
- */
-
-#define TOD_MILLISECONDS_TO_MICROSECONDS(_ms) ((_ms) * 1000)
-
-/*
- * TOD_MICROSECONDS_TO_TICKS
- *
- * DESCRIPTION:
- *
- * This routine converts an interval expressed in microseconds to ticks.
- *
- * NOTE:
- *
- * This must be a macro so it can be used in "static" tables.
- */
-
-#define TOD_MICROSECONDS_TO_TICKS(_us) \
- ((_us) / _TOD_Microseconds_per_tick)
-
-/*
- * TOD_MILLISECONDS_TO_TICKS
- *
- * DESCRIPTION:
- *
- * This routine converts an interval expressed in milliseconds to ticks.
- *
- * NOTE:
- *
- * This must be a macro so it can be used in "static" tables.
- */
-
-#define TOD_MILLISECONDS_TO_TICKS(_ms) \
- (TOD_MILLISECONDS_TO_MICROSECONDS(_ms) / _TOD_Microseconds_per_tick)
-
-#ifndef __RTEMS_APPLICATION__
-#include <rtems/score/tod.inl>
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/include/rtems/score/tqdata.h b/cpukit/score/include/rtems/score/tqdata.h
deleted file mode 100644
index 98b9e4d9d2..0000000000
--- a/cpukit/score/include/rtems/score/tqdata.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/* tqdata.h
- *
- * This include file contains all the constants and structures
- * needed to declare a thread queue.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __THREAD_QUEUE_DATA_h
-#define __THREAD_QUEUE_DATA_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/chain.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/states.h>
-
-/*
- * The following enumerated type details all of the disciplines
- * supported by the Thread Queue Handler.
- */
-
-typedef enum {
- THREAD_QUEUE_DISCIPLINE_FIFO, /* FIFO queue discipline */
- THREAD_QUEUE_DISCIPLINE_PRIORITY /* PRIORITY queue discipline */
-} Thread_queue_Disciplines;
-
-/*
- * The following enumerated types indicate what happened while the thread
- * queue was in the synchronization window.
- */
-
-typedef enum {
- THREAD_QUEUE_SYNCHRONIZED,
- THREAD_QUEUE_NOTHING_HAPPENED,
- THREAD_QUEUE_TIMEOUT,
- THREAD_QUEUE_SATISFIED
-} Thread_queue_States;
-
-/*
- * The following constants are used to manage the priority queues.
- *
- * There are four chains used to maintain a priority -- each chain
- * manages a distinct set of task priorities. The number of chains
- * is determined by TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS.
- * The following set must be consistent.
- *
- * The set below configures 4 headers -- each contains 64 priorities.
- * Header x manages priority range (x*64) through ((x*64)+63). If
- * the priority is more than half way through the priority range it
- * is in, then the search is performed from the rear of the chain.
- * This halves the search time to find the insertion point.
- */
-
-#define TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS 4
-#define TASK_QUEUE_DATA_PRIORITIES_PER_HEADER 64
-#define TASK_QUEUE_DATA_REVERSE_SEARCH_MASK 0x20
-
-typedef struct {
- union {
- Chain_Control Fifo; /* FIFO discipline list */
- Chain_Control Priority[TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS];
- /* priority discipline list */
- } Queues;
- Thread_queue_States sync_state; /* alloc/dealloc critical section */
- Thread_queue_Disciplines discipline; /* queue discipline */
- States_Control state; /* state of threads on Thread_q */
- unsigned32 timeout_status;
-} Thread_queue_Control;
-
-#ifndef __RTEMS_APPLICATION__
-#include <rtems/score/tqdata.inl>
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/include/rtems/score/userext.h b/cpukit/score/include/rtems/score/userext.h
deleted file mode 100644
index 4c2972030e..0000000000
--- a/cpukit/score/include/rtems/score/userext.h
+++ /dev/null
@@ -1,210 +0,0 @@
-/* userext.h
- *
- * This include file contains all information about user extensions. This
- * Handler provides mechanisms which can be used to initialize and manipulate
- * all user extensions.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __USER_EXTENSIONS_h
-#define __USER_EXTENSIONS_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/interr.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/thread.h>
-
-/*
- * The following records defines the User Extension Table.
- * This table defines the application dependent routines which
- * are invoked at critical points in the life of each thread and
- * the system as a whole.
- */
-
-typedef void User_extensions_routine;
-
-typedef boolean ( *User_extensions_thread_create_extension )(
- Thread_Control *,
- Thread_Control *
- );
-
-typedef User_extensions_routine ( *User_extensions_thread_delete_extension )(
- Thread_Control *,
- Thread_Control *
- );
-
-typedef User_extensions_routine ( *User_extensions_thread_start_extension )(
- Thread_Control *,
- Thread_Control *
- );
-
-typedef User_extensions_routine ( *User_extensions_thread_restart_extension )(
- Thread_Control *,
- Thread_Control *
- );
-
-typedef User_extensions_routine ( *User_extensions_thread_switch_extension )(
- Thread_Control *,
- Thread_Control *
- );
-
-typedef User_extensions_routine (
- *User_extensions_thread_post_switch_extension )(
- Thread_Control *
- );
-
-typedef User_extensions_routine ( *User_extensions_thread_begin_extension )(
- Thread_Control *
- );
-
-typedef User_extensions_routine ( *User_extensions_thread_exitted_extension )(
- Thread_Control *
- );
-
-typedef User_extensions_routine ( *User_extensions_fatal_extension )(
- Internal_errors_Source /* the_source */,
- boolean /* is_internal */,
- unsigned32 /* the_error */
- );
-
-
-typedef struct {
- User_extensions_thread_create_extension thread_create;
- User_extensions_thread_start_extension thread_start;
- User_extensions_thread_restart_extension thread_restart;
- User_extensions_thread_delete_extension thread_delete;
- User_extensions_thread_switch_extension thread_switch;
- User_extensions_thread_begin_extension thread_begin;
- User_extensions_thread_exitted_extension thread_exitted;
- User_extensions_fatal_extension fatal;
-} User_extensions_Table;
-
-/*
- * The following is used to manage each user extension set.
- */
-
-typedef struct {
- Chain_Node Node;
- User_extensions_Table Callouts;
-} User_extensions_Control;
-
-/*
- * The following is used to manage the list of active extensions.
- */
-
-SCORE_EXTERN Chain_Control _User_extensions_List;
-
-/*
- * _User_extensions_Thread_create
- *
- * DESCRIPTION:
- *
- * This routine is used to invoke the user extension for
- * the thread creation operate.
- */
-
-boolean _User_extensions_Thread_create (
- Thread_Control *the_thread
-);
-
-/*
- * _User_extensions_Thread_delete
- *
- * DESCRIPTION:
- *
- * This routine is used to invoke the user extension for
- * the thread deletion operation.
- */
-
-void _User_extensions_Thread_delete (
- Thread_Control *the_thread
-);
-
-/*
- * _User_extensions_Thread_start
- *
- * DESCRIPTION:
- *
- * This routine is used to invoke the user extension for
- * the thread start operation.
- */
-
-void _User_extensions_Thread_start (
- Thread_Control *the_thread
-);
-
-/*
- * _User_extensions_Thread_restart
- *
- * DESCRIPTION:
- *
- * This routine is used to invoke the user extension for
- * the thread restart operation.
- */
-
-void _User_extensions_Thread_restart (
- Thread_Control *the_thread
-);
-
-/*
- * _User_extensions_Thread_begin
- *
- * DESCRIPTION:
- *
- * This routine is used to invoke the user extension which
- * is invoked when a thread begins.
- */
-
-void _User_extensions_Thread_begin (
- Thread_Control *executing
-);
-
-/*
- * _User_extensions_Thread_exitted
- *
- * DESCRIPTION:
- *
- * This routine is used to invoke the user extension which
- * is invoked when a thread exits.
- */
-
-void _User_extensions_Thread_exitted (
- Thread_Control *executing
-);
-
-/*
- * _User_extensions_Fatal
- *
- * DESCRIPTION:
- *
- * This routine is used to invoke the user extension invoked
- * when a fatal error occurs.
- */
-
-void _User_extensions_Fatal (
- Internal_errors_Source the_source,
- boolean is_internal,
- unsigned32 the_error
-);
-
-#ifndef __RTEMS_APPLICATION__
-#include <rtems/score/userext.inl>
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/include/rtems/score/watchdog.h b/cpukit/score/include/rtems/score/watchdog.h
deleted file mode 100644
index ad25d62126..0000000000
--- a/cpukit/score/include/rtems/score/watchdog.h
+++ /dev/null
@@ -1,193 +0,0 @@
-/* watchdog.h
- *
- * This include file contains all the constants and structures associated
- * with watchdog timers. This Handler provides mechanisms which can be
- * used to initialize and manipulate watchdog timers.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __WATCHDOG_h
-#define __WATCHDOG_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/object.h>
-
-/*
- * The following type defines the control block used to manage
- * intervals.
- */
-
-typedef unsigned32 Watchdog_Interval;
-
-/*
- * The following types define a pointer to a watchdog service routine.
- */
-
-typedef void Watchdog_Service_routine;
-
-typedef Watchdog_Service_routine ( *Watchdog_Service_routine_entry )(
- Objects_Id,
- void *
- );
-
-/*
- * Constant for indefinite wait. (actually an illegal interval)
- */
-
-#define WATCHDOG_NO_TIMEOUT 0
-
-/*
- * The following enumerated type lists the states in which a
- * watchdog timer may be at any given time.
- */
-
-typedef enum {
- WATCHDOG_INACTIVE, /* off all chains */
- WATCHDOG_BEING_INSERTED, /* off all chains, searching for insertion point */
- WATCHDOG_ACTIVE, /* on chain, allowed to fire */
- WATCHDOG_REMOVE_IT /* on chain, remove without firing if expires */
-} Watchdog_States;
-
-/*
- * The following enumerated type details the manner in which
- * a watchdog chain may be adjusted by the Watchdog_Adjust
- * routine. The direction indicates a movement FORWARD
- * or BACKWARD in time.
- */
-
-typedef enum {
- WATCHDOG_FORWARD, /* adjust delta value forward */
- WATCHDOG_BACKWARD /* adjust delta value backward */
-} Watchdog_Adjust_directions;
-
-/*
- * The following record defines the control block used
- * to manage each watchdog timer.
- */
-
-typedef struct {
- Chain_Node Node;
- Watchdog_States state;
- Watchdog_Interval initial;
- Watchdog_Interval delta_interval;
- Watchdog_Interval start_time;
- Watchdog_Interval stop_time;
- Watchdog_Service_routine_entry routine;
- Objects_Id id;
- void *user_data;
-} Watchdog_Control;
-
-/*
- * The following are used for synchronization purposes
- * during an insert on a watchdog delta chain.
- */
-
-SCORE_EXTERN volatile unsigned32 _Watchdog_Sync_level;
-SCORE_EXTERN volatile unsigned32 _Watchdog_Sync_count;
-
-/*
- * The following contains the number of ticks since the
- * system was booted.
- */
-
-SCORE_EXTERN Watchdog_Interval _Watchdog_Ticks_since_boot;
-
-/*
- * The following defines the watchdog chains which are managed
- * on ticks and second boundaries.
- */
-
-SCORE_EXTERN Chain_Control _Watchdog_Ticks_chain;
-SCORE_EXTERN Chain_Control _Watchdog_Seconds_chain;
-
-/*
- * _Watchdog_Handler_initialization
- *
- * DESCRIPTION:
- *
- * This routine initializes the watchdog handler. The watchdog
- * synchronization flag is initialized and the watchdog chains are
- * initialized and emptied.
- */
-
-void _Watchdog_Handler_initialization( void );
-
-/*
- * _Watchdog_Remove
- *
- * DESCRIPTION:
- *
- * This routine removes THE_WATCHDOG from the watchdog chain on which
- * it resides and returns the state THE_WATCHDOG timer was in.
- */
-
-Watchdog_States _Watchdog_Remove (
- Watchdog_Control *the_watchdog
-);
-
-/*
- * _Watchdog_Adjust
- *
- * DESCRIPTION:
- *
- * This routine adjusts the HEADER watchdog chain in the forward
- * or backward DIRECTION for UNITS ticks.
- */
-
-void _Watchdog_Adjust (
- Chain_Control *header,
- Watchdog_Adjust_directions direction,
- Watchdog_Interval units
-);
-
-/*
- * _Watchdog_Insert
- *
- * DESCRIPTION:
- *
- * This routine inserts THE_WATCHDOG into the HEADER watchdog chain
- * for a time of UNITS. The INSERT_MODE indicates whether
- * THE_WATCHDOG is to be activated automatically or later, explicitly
- * by the caller.
- *
- */
-
-void _Watchdog_Insert (
- Chain_Control *header,
- Watchdog_Control *the_watchdog
-);
-
-/*
- * _Watchdog_Tickle
- *
- * DESCRIPTION:
- *
- * This routine is invoked at appropriate intervals to update
- * the HEADER watchdog chain.
- */
-
-void _Watchdog_Tickle (
- Chain_Control *header
-);
-
-#ifndef __RTEMS_APPLICATION__
-#include <rtems/score/watchdog.inl>
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/include/rtems/score/wkspace.h b/cpukit/score/include/rtems/score/wkspace.h
deleted file mode 100644
index 77d7142204..0000000000
--- a/cpukit/score/include/rtems/score/wkspace.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* wkspace.h
- *
- * This include file contains information related to the
- * RAM Workspace. This Handler provides mechanisms which can be used to
- * define, initialize and manipulate the workspace.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __WORKSPACE_h
-#define __WORKSPACE_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/heap.h>
-#include <rtems/score/interr.h>
-
-/*
- * The following is used to manage the Workspace.
- *
- */
-
-SCORE_EXTERN Heap_Control _Workspace_Area; /* executive heap header */
-
-/*
- * _Workspace_Handler_initialization
- *
- * DESCRIPTION:
- *
- * This routine performs the initialization necessary for this handler.
- */
-
-void _Workspace_Handler_initialization(
- void *starting_address,
- unsigned32 size
-);
-
-/*
- * _Workspace_Allocate_or_fatal_error
- *
- * DESCRIPTION:
- *
- * This routine returns the address of a block of memory of size
- * bytes. If a block of the appropriate size cannot be allocated
- * from the workspace, then the internal error handler is invoked.
- */
-
-void *_Workspace_Allocate_or_fatal_error(
- unsigned32 size
-);
-
-#ifndef __RTEMS_APPLICATION__
-#include <rtems/score/wkspace.inl>
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/include/rtems/system.h b/cpukit/score/include/rtems/system.h
deleted file mode 100644
index 6db19e8c62..0000000000
--- a/cpukit/score/include/rtems/system.h
+++ /dev/null
@@ -1,200 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the executive. This must be the first include file
- * included in all internal RTEMS files.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __RTEMS_SYSTEM_h
-#define __RTEMS_SYSTEM_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * The target options include file defines all target dependent
- * parameters for this build of RTEMS. It must be included
- * first so the basic macro definitions are in place.
- */
-
-#include <rtems/score/targopts.h>
-
-/*
- * The following insures that all data is declared in the space
- * of the initialization routine for either the Initialization Manager
- * or the initialization file for the appropriate API. It is
- * referenced as "external" in every other file.
- */
-
-#ifdef SCORE_INIT
-#undef SCORE_EXTERN
-#define SCORE_EXTERN
-#else
-#undef SCORE_EXTERN
-#define SCORE_EXTERN extern
-#endif
-
-#ifdef SAPI_INIT
-#undef SAPI_EXTERN
-#define SAPI_EXTERN
-#else
-#undef SAPI_EXTERN
-#define SAPI_EXTERN extern
-#endif
-
-#ifdef RTEMS_API_INIT
-#undef RTEMS_EXTERN
-#define RTEMS_EXTERN
-#else
-#undef RTEMS_EXTERN
-#define RTEMS_EXTERN extern
-#endif
-
-#ifdef POSIX_API_INIT
-#undef POSIX_EXTERN
-#define POSIX_EXTERN
-#else
-#undef POSIX_EXTERN
-#define POSIX_EXTERN extern
-#endif
-
-#ifdef ITRON_API_INIT
-#undef ITRON_EXTERN
-#define ITRON_EXTERN
-#else
-#undef ITRON_EXTERN
-#define ITRON_EXTERN extern
-#endif
-
-/*
- * The following (in conjunction with compiler arguments) are used
- * to choose between the use of static inline functions and macro
- * functions. The static inline implementation allows better
- * type checking with no cost in code size or execution speed.
- */
-
-#ifdef USE_INLINES
-# ifdef __GNUC__
-# define RTEMS_INLINE_ROUTINE static __inline__
-# else
-# define RTEMS_INLINE_ROUTINE static inline
-# endif
-#else
-# define RTEMS_INLINE_ROUTINE
-#endif
-
-/*
- * Include a base set of files.
- */
-
-/*
- * XXX: Eventually proc_ptr needs to disappear!!!
- */
-
-typedef void * proc_ptr;
-
-/*
- * Define NULL
- */
-
-#ifndef NULL
-#define NULL 0 /* NULL value */
-#endif
-
-/*
- * Boolean constants
- */
-
-#if !defined( TRUE ) || (TRUE != 1)
-#undef TRUE
-#define TRUE (1)
-#endif
-
-#if !defined( FALSE ) || (FALSE != 0)
-#undef FALSE
-#define FALSE (0)
-#endif
-
-#include <rtems/score/cpu.h> /* processor specific information */
-
-#define stringify( _x ) # _x
-
-#define RTEMS_offsetof(type, field) \
- ((unsigned32) &(((type *) 0)->field))
-
-/*
- * The following is the extern for the RTEMS version string.
- * The contents of this string are CPU specific.
- */
-
-extern const char _RTEMS_version[]; /* RTEMS version string */
-extern const char _Copyright_Notice[]; /* RTEMS copyright string */
-
-/*
- * The following defines the CPU dependent information table.
- */
-
-SCORE_EXTERN rtems_cpu_table _CPU_Table; /* CPU dependent info */
-
-/*
- * Macros to access CPU Table fields required by ALL ports.
- *
- * NOTE: Similar macros to access port specific fields in in the
- * appropriate cpu.h file.
- */
-
-#define rtems_cpu_configuration_get_table() \
- (&_CPU_Table)
-
-#define rtems_cpu_configuration_get_pretasking_hook() \
- (_CPU_Table.pretasking_hook)
-
-#define rtems_cpu_configuration_get_predriver_hook() \
- (_CPU_Table.predriver_hook)
-
-#define rtems_cpu_configuration_get_postdriver_hook() \
- (_CPU_Table.postdriver_hook)
-
-#define rtems_cpu_configuration_get_idle_task() \
- (_CPU_Table.idle_task)
-
-#define rtems_cpu_configuration_get_do_zero_of_workspace() \
- (_CPU_Table.do_zero_of_workspace)
-
-#define rtems_cpu_configuration_get_idle_task_stack_size() \
- (_CPU_Table.idle_task_stack_size)
-
-#define rtems_cpu_configuration_get_interrupt_stack_size() \
- (_CPU_Table.interrupt_stack_size)
-
-#define rtems_cpu_configuration_get_extra_mpci_receive_server_stack() \
- (_CPU_Table.extra_mpci_receive_server_stack)
-
-#define rtems_cpu_configuration_get_stack_allocate_hook() \
- (_CPU_Table.stack_allocate_hook)
-
-#define rtems_cpu_configuration_get_stack_free_hook() \
- (_CPU_Table.stack_free_hook)
-
-/*
- * XXX weird RTEMS stuff
- */
-
-#define RTEMS_MAXIMUM_NAME_LENGTH 4
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/inline/Makefile.am b/cpukit/score/inline/Makefile.am
deleted file mode 100644
index 0c97211587..0000000000
--- a/cpukit/score/inline/Makefile.am
+++ /dev/null
@@ -1,10 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-SUBDIRS = rtems
-
-include $(top_srcdir)/../../../automake/subdirs.am
-include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/score/inline/rtems/score/address.inl b/cpukit/score/inline/rtems/score/address.inl
deleted file mode 100644
index 1a77e617d7..0000000000
--- a/cpukit/score/inline/rtems/score/address.inl
+++ /dev/null
@@ -1,119 +0,0 @@
-/* inline/address.inl
- *
- * This include file contains the bodies of the routines
- * about addresses which are inlined.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __INLINE_ADDRESSES_inl
-#define __INLINE_ADDRESSES_inl
-
-/*PAGE
- *
- * _Addresses_Add_offset
- *
- * DESCRIPTION:
- *
- * This function is used to add an offset to a base address.
- * It returns the resulting address. This address is typically
- * converted to an access type before being used further.
- */
-
-RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
- void *base,
- unsigned32 offset
-)
-{
- return (void *)((char *)base + offset);
-}
-
-/*PAGE
- *
- * _Addresses_Subtract_offset
- *
- * DESCRIPTION:
- *
- * This function is used to subtract an offset from a base
- * address. It returns the resulting address. This address is
- * typically converted to an access type before being used further.
- */
-
-RTEMS_INLINE_ROUTINE void *_Addresses_Subtract_offset (
- void *base,
- unsigned32 offset
-)
-{
- return (void *)((char *)base - offset);
-}
-
-/*PAGE
- *
- * _Addresses_Subtract
- *
- * DESCRIPTION:
- *
- * This function is used to subtract two addresses. It returns the
- * resulting offset.
- *
- * NOTE: The cast of an address to an unsigned32 makes this code
- * dependent on an addresses being thirty two bits.
- */
-
-RTEMS_INLINE_ROUTINE unsigned32 _Addresses_Subtract (
- void *left,
- void *right
-)
-{
- return ((char *) left - (char *) right);
-}
-
-/*PAGE
- *
- * _Addresses_Is_aligned
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the given address is correctly
- * aligned for this processor and FALSE otherwise. Proper alignment
- * is based on correctness and efficiency.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Addresses_Is_aligned (
- void *address
-)
-{
- return ( ( (unsigned32)address % CPU_ALIGNMENT ) == 0 );
-}
-
-/*PAGE
- *
- * _Addresses_Is_in_range
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the given address is within the
- * memory range specified and FALSE otherwise. base is the address
- * of the first byte in the memory range and limit is the address
- * of the last byte in the memory range. The base address is
- * assumed to be lower than the limit address.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Addresses_Is_in_range (
- void *address,
- void *base,
- void *limit
-)
-{
- return ( address >= base && address <= limit );
-}
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/inline/rtems/score/chain.inl b/cpukit/score/inline/rtems/score/chain.inl
deleted file mode 100644
index ca005fe0a9..0000000000
--- a/cpukit/score/inline/rtems/score/chain.inl
+++ /dev/null
@@ -1,389 +0,0 @@
-/* inline/chain.inl
- *
- * This include file contains the bodies of the routines which are
- * associated with doubly linked chains and inlined.
- *
- * NOTE: The routines in this file are ordered from simple
- * to complex. No other Chain Handler routine is referenced
- * unless it has already been defined.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __INLINE_CHAIN_inl
-#define __INLINE_CHAIN_inl
-
-/*PAGE
- *
- * _Chain_Are_nodes_equal
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if LEFT and RIGHT are equal,
- * and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Chain_Are_nodes_equal(
- Chain_Node *left,
- Chain_Node *right
-)
-{
- return left == right;
-}
-
-/*PAGE
- *
- * _Chain_Is_null
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the_chain is NULL and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Chain_Is_null(
- Chain_Control *the_chain
-)
-{
- return ( the_chain == NULL );
-}
-
-/*PAGE
- *
- * _Chain_Is_null_node
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the_node is NULL and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Chain_Is_null_node(
- Chain_Node *the_node
-)
-{
- return ( the_node == NULL );
-}
-
-/*PAGE
- *
- * _Chain_Head
- *
- * DESCRIPTION:
- *
- * This function returns a pointer to the first node on the chain.
- */
-
-RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head(
- Chain_Control *the_chain
-)
-{
- return (Chain_Node *) the_chain;
-}
-
-/*PAGE
- *
- * _Chain_Tail
- *
- * DESCRIPTION:
- *
- * This function returns a pointer to the last node on the chain.
- */
-
-RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
- Chain_Control *the_chain
-)
-{
- return (Chain_Node *) &the_chain->permanent_null;
-}
-
-/*PAGE
- *
- * _Chain_Is_empty
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if there a no nodes on the_chain and
- * FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Chain_Is_empty(
- Chain_Control *the_chain
-)
-{
- return ( the_chain->first == _Chain_Tail( the_chain ) );
-}
-
-/*PAGE
- *
- * _Chain_Is_first
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the_node is the first node on a chain and
- * FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Chain_Is_first(
- Chain_Node *the_node
-)
-{
- return ( the_node->previous == NULL );
-}
-
-/*PAGE
- *
- * _Chain_Is_last
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the_node is the last node on a chain and
- * FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Chain_Is_last(
- Chain_Node *the_node
-)
-{
- return ( the_node->next == NULL );
-}
-
-/*PAGE
- *
- * _Chain_Has_only_one_node
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if there is only one node on the_chain and
- * FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Chain_Has_only_one_node(
- Chain_Control *the_chain
-)
-{
- return ( the_chain->first == the_chain->last );
-}
-
-/*PAGE
- *
- * _Chain_Is_head
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the_node is the head of the_chain and
- * FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Chain_Is_head(
- Chain_Control *the_chain,
- Chain_Node *the_node
-)
-{
- return ( the_node == _Chain_Head( the_chain ) );
-}
-
-/*PAGE
- *
- * _Chain_Is_tail
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the_node is the tail of the_chain and
- * FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Chain_Is_tail(
- Chain_Control *the_chain,
- Chain_Node *the_node
-)
-{
- return ( the_node == _Chain_Tail( the_chain ) );
-}
-
-/*PAGE
- *
- * Chain_Initialize_empty
- *
- * DESCRIPTION:
- *
- * This routine initializes the specified chain to contain zero nodes.
- */
-
-RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
- Chain_Control *the_chain
-)
-{
- the_chain->first = _Chain_Tail( the_chain );
- the_chain->permanent_null = NULL;
- the_chain->last = _Chain_Head( the_chain );
-}
-
-/*PAGE
- *
- * _Chain_Extract_unprotected
- *
- * DESCRIPTION:
- *
- * This routine extracts the_node from the chain on which it resides.
- * It does NOT disable interrupts to insure the atomicity of the
- * extract operation.
- */
-
-RTEMS_INLINE_ROUTINE void _Chain_Extract_unprotected(
- Chain_Node *the_node
-)
-{
- Chain_Node *next;
- Chain_Node *previous;
-
- next = the_node->next;
- previous = the_node->previous;
- next->previous = previous;
- previous->next = next;
-}
-
-/*PAGE
- *
- * _Chain_Get_first_unprotected
- *
- * DESCRIPTION:
- *
- * This function removes the first node from the_chain and returns
- * a pointer to that node. It does NOT disable interrupts to insure
- * the atomicity of the get operation.
- */
-
-RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_first_unprotected(
- Chain_Control *the_chain
-)
-{
- Chain_Node *return_node;
- Chain_Node *new_first;
-
- return_node = the_chain->first;
- new_first = return_node->next;
- the_chain->first = new_first;
- new_first->previous = _Chain_Head( the_chain );
-
- return return_node;
-}
-
-/*PAGE
- *
- * Chain_Get_unprotected
- *
- * DESCRIPTION:
- *
- * This function removes the first node from the_chain and returns
- * a pointer to that node. If the_chain is empty, then NULL is returned.
- * It does NOT disable interrupts to insure the atomicity of the
- * get operation.
- */
-
-RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
- Chain_Control *the_chain
-)
-{
- if ( !_Chain_Is_empty( the_chain ) )
- return _Chain_Get_first_unprotected( the_chain );
- else
- return NULL;
-}
-
-/*PAGE
- *
- * _Chain_Insert_unprotected
- *
- * DESCRIPTION:
- *
- * This routine inserts the_node on a chain immediately following
- * after_node. It does NOT disable interrupts to insure the atomicity
- * of the extract operation.
- */
-
-RTEMS_INLINE_ROUTINE void _Chain_Insert_unprotected(
- Chain_Node *after_node,
- Chain_Node *the_node
-)
-{
- Chain_Node *before_node;
-
- the_node->previous = after_node;
- before_node = after_node->next;
- after_node->next = the_node;
- the_node->next = before_node;
- before_node->previous = the_node;
-}
-
-/*PAGE
- *
- * _Chain_Append_unprotected
- *
- * DESCRIPTION:
- *
- * This routine appends the_node onto the end of the_chain.
- * It does NOT disable interrupts to insure the atomicity of the
- * append operation.
- */
-
-RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected(
- Chain_Control *the_chain,
- Chain_Node *the_node
-)
-{
- Chain_Node *old_last_node;
-
- the_node->next = _Chain_Tail( the_chain );
- old_last_node = the_chain->last;
- the_chain->last = the_node;
- old_last_node->next = the_node;
- the_node->previous = old_last_node;
-}
-
-/*PAGE
- *
- * _Chain_Prepend_unprotected
- *
- * DESCRIPTION:
- *
- * This routine prepends the_node onto the front of the_chain.
- * It does NOT disable interrupts to insure the atomicity of the
- * prepend operation.
- */
-
-RTEMS_INLINE_ROUTINE void _Chain_Prepend_unprotected(
- Chain_Control *the_chain,
- Chain_Node *the_node
-)
-{
- _Chain_Insert_unprotected( _Chain_Head( the_chain ), the_node );
-
-}
-
-/*PAGE
- *
- * _Chain_Prepend
- *
- * DESCRIPTION:
- *
- * This routine prepends the_node onto the front of the_chain.
- * It disables interrupts to insure the atomicity of the
- * prepend operation.
- */
-
-RTEMS_INLINE_ROUTINE void _Chain_Prepend(
- Chain_Control *the_chain,
- Chain_Node *the_node
-)
-{
- _Chain_Insert( _Chain_Head( the_chain ), the_node );
-}
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/inline/rtems/score/coremsg.inl b/cpukit/score/inline/rtems/score/coremsg.inl
deleted file mode 100644
index 7356ce9537..0000000000
--- a/cpukit/score/inline/rtems/score/coremsg.inl
+++ /dev/null
@@ -1,275 +0,0 @@
-/* coremsg.inl
- *
- * This include file contains the static inline implementation of all
- * inlined routines in the Core Message Handler.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __CORE_MESSAGE_QUEUE_inl
-#define __CORE_MESSAGE_QUEUE_inl
-
-#include <string.h> /* needed for memcpy */
-
-/*PAGE
- *
- * _CORE_message_queue_Send
- *
- * DESCRIPTION:
- *
- * This routine sends a message to the end of the specified message queue.
- */
-
-RTEMS_INLINE_ROUTINE void _CORE_message_queue_Send(
- CORE_message_queue_Control *the_message_queue,
- void *buffer,
- unsigned32 size,
- Objects_Id id,
- CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
- boolean wait,
- Watchdog_Interval timeout
-)
-{
- _CORE_message_queue_Submit(
- the_message_queue,
- buffer,
- size,
- id,
-#if defined(RTEMS_MULTIPROCESSING)
- api_message_queue_mp_support,
-#else
- NULL,
-#endif
- CORE_MESSAGE_QUEUE_SEND_REQUEST,
- wait, /* sender may block */
- timeout /* timeout interval */
- );
-}
-
-/*PAGE
- *
- * _CORE_message_queue_Urgent
- *
- * DESCRIPTION:
- *
- * This routine sends a message to the front of the specified message queue.
- */
-
-RTEMS_INLINE_ROUTINE void _CORE_message_queue_Urgent(
- CORE_message_queue_Control *the_message_queue,
- void *buffer,
- unsigned32 size,
- Objects_Id id,
- CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
- boolean wait,
- Watchdog_Interval timeout
-)
-{
- _CORE_message_queue_Submit(
- the_message_queue,
- buffer,
- size,
- id,
-#if defined(RTEMS_MULTIPROCESSING)
- api_message_queue_mp_support,
-#else
- NULL,
-#endif
- CORE_MESSAGE_QUEUE_URGENT_REQUEST,
- wait, /* sender may block */
- timeout /* timeout interval */
- );
-}
-
-/*PAGE
- *
- * _CORE_message_queue_Copy_buffer
- *
- * DESCRIPTION:
- *
- * This routine copies the contents of the source message buffer
- * to the destination message buffer.
- */
-
-RTEMS_INLINE_ROUTINE void _CORE_message_queue_Copy_buffer (
- void *source,
- void *destination,
- unsigned32 size
-)
-{
- memcpy(destination, source, size);
-}
-
-/*PAGE
- *
- * _CORE_message_queue_Allocate_message_buffer
- *
- * DESCRIPTION:
- *
- * This function allocates a message buffer from the inactive
- * message buffer chain.
- */
-
-RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control *
-_CORE_message_queue_Allocate_message_buffer (
- CORE_message_queue_Control *the_message_queue
-)
-{
- return (CORE_message_queue_Buffer_control *)
- _Chain_Get( &the_message_queue->Inactive_messages );
-}
-
-/*PAGE
- *
- * _CORE_message_queue_Free_message_buffer
- *
- * DESCRIPTION:
- *
- * This routine frees a message buffer to the inactive
- * message buffer chain.
- */
-
-RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer (
- CORE_message_queue_Control *the_message_queue,
- CORE_message_queue_Buffer_control *the_message
-)
-{
- _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node );
-}
-
-/*PAGE
- *
- * _CORE_message_queue_Get_pending_message
- *
- * DESCRIPTION:
- *
- * This function removes the first message from the_message_queue
- * and returns a pointer to it.
- */
-
-RTEMS_INLINE_ROUTINE
- CORE_message_queue_Buffer_control *_CORE_message_queue_Get_pending_message (
- CORE_message_queue_Control *the_message_queue
-)
-{
- return (CORE_message_queue_Buffer_control *)
- _Chain_Get_unprotected( &the_message_queue->Pending_messages );
-}
-
-/*PAGE
- *
- * _CORE_message_queue_Is_priority
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the priority attribute is
- * enabled in the attribute_set and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _CORE_message_queue_Is_priority(
- CORE_message_queue_Attributes *the_attribute
-)
-{
- return (the_attribute->discipline == CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY);
-}
-
-/*PAGE
- *
- * _CORE_message_queue_Append
- *
- * DESCRIPTION:
- *
- * This routine places the_message at the rear of the outstanding
- * messages on the_message_queue.
- */
-
-RTEMS_INLINE_ROUTINE void _CORE_message_queue_Append (
- CORE_message_queue_Control *the_message_queue,
- CORE_message_queue_Buffer_control *the_message
-)
-{
- _Chain_Append( &the_message_queue->Pending_messages, &the_message->Node );
-}
-
-/*PAGE
- *
- * _CORE_message_queue_Prepend
- *
- * DESCRIPTION:
- *
- * This routine places the_message at the front of the outstanding
- * messages on the_message_queue.
- */
-
-RTEMS_INLINE_ROUTINE void _CORE_message_queue_Prepend (
- CORE_message_queue_Control *the_message_queue,
- CORE_message_queue_Buffer_control *the_message
-)
-{
- _Chain_Prepend(
- &the_message_queue->Pending_messages,
- &the_message->Node
- );
-}
-
-/*PAGE
- *
- * _CORE_message_queue_Is_null
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the_message_queue is TRUE and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _CORE_message_queue_Is_null (
- CORE_message_queue_Control *the_message_queue
-)
-{
- return ( the_message_queue == NULL );
-}
-
-/*PAGE
- *
- * _CORE_message_queue_Is_notify_enabled
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if notification is enabled on this message
- * queue and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _CORE_message_queue_Is_notify_enabled (
- CORE_message_queue_Control *the_message_queue
-)
-{
- return (the_message_queue->notify_handler != NULL);
-}
-
-/*PAGE
- *
- * _CORE_message_queue_Set_notify
- *
- * DESCRIPTION:
- *
- * This routine initializes the notification information for the_message_queue.
- */
-
-RTEMS_INLINE_ROUTINE void _CORE_message_queue_Set_notify (
- CORE_message_queue_Control *the_message_queue,
- CORE_message_queue_Notify_Handler the_handler,
- void *the_argument
-)
-{
- the_message_queue->notify_handler = the_handler;
- the_message_queue->notify_argument = the_argument;
-}
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/inline/rtems/score/coremutex.inl b/cpukit/score/inline/rtems/score/coremutex.inl
deleted file mode 100644
index 8ce3a9b214..0000000000
--- a/cpukit/score/inline/rtems/score/coremutex.inl
+++ /dev/null
@@ -1,105 +0,0 @@
-/* inline/coremutex.inl
- *
- * This include file contains all of the inlined routines associated
- * with the CORE mutexes.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __INLINE_CORE_MUTEX_inl
-#define __INLINE_CORE_MUTEX_inl
-
-/*PAGE
- *
- * _CORE_mutex_Is_locked
- *
- * DESCRIPTION:
- *
- * This routine returns TRUE if the mutex specified is locked and FALSE
- * otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_locked(
- CORE_mutex_Control *the_mutex
-)
-{
- return the_mutex->lock == CORE_MUTEX_LOCKED;
-}
-
-/*PAGE
- *
- * _CORE_mutex_Is_fifo
- *
- * DESCRIPTION:
- *
- * This routine returns TRUE if the mutex's wait discipline is FIFO and FALSE
- * otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_fifo(
- CORE_mutex_Attributes *the_attribute
-)
-{
- return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_FIFO;
-}
-
-/*PAGE
- *
- * _CORE_mutex_Is_priority
- *
- * DESCRIPTION:
- *
- * This routine returns TRUE if the mutex's wait discipline is PRIORITY and
- * FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_priority(
- CORE_mutex_Attributes *the_attribute
-)
-{
- return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY;
-}
-
-/*PAGE
- *
- * _CORE_mutex_Is_inherit_priority
- *
- * DESCRIPTION:
- *
- * This routine returns TRUE if the mutex's wait discipline is
- * INHERIT_PRIORITY and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_inherit_priority(
- CORE_mutex_Attributes *the_attribute
-)
-{
- return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
-}
-
-/*PAGE
- *
- * _CORE_mutex_Is_priority_ceiling
- *
- * DESCRIPTION:
- *
- * This routine returns TRUE if the mutex's wait discipline is
- * PRIORITY_CEILING and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_priority_ceiling(
- CORE_mutex_Attributes *the_attribute
-)
-{
- return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
-}
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/inline/rtems/score/coresem.inl b/cpukit/score/inline/rtems/score/coresem.inl
deleted file mode 100644
index d2e0542281..0000000000
--- a/cpukit/score/inline/rtems/score/coresem.inl
+++ /dev/null
@@ -1,53 +0,0 @@
-/* inline/coresem.inl
- *
- * This include file contains all of the inlined routines associated
- * with the CORE semaphore.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __INLINE_CORE_SEMAPHORE_inl
-#define __INLINE_CORE_SEMAPHORE_inl
-
-/*PAGE
- *
- * _CORE_semaphore_Is_priority
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the priority attribute is
- * enabled in the attribute_set and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _CORE_semaphore_Is_priority(
- CORE_semaphore_Attributes *the_attribute
-)
-{
- return ( the_attribute->discipline == CORE_SEMAPHORE_DISCIPLINES_PRIORITY );
-}
-
-/*PAGE
- *
- * _CORE_semaphore_Get_count
- *
- * DESCRIPTION:
- *
- * This routine returns the current count associated with the semaphore.
- */
-
-RTEMS_INLINE_ROUTINE unsigned32 _CORE_semaphore_Get_count(
- CORE_semaphore_Control *the_semaphore
-)
-{
- return the_semaphore->count;
-}
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/inline/rtems/score/heap.inl b/cpukit/score/inline/rtems/score/heap.inl
deleted file mode 100644
index 976ddfa0af..0000000000
--- a/cpukit/score/inline/rtems/score/heap.inl
+++ /dev/null
@@ -1,273 +0,0 @@
-/* heap.inl
- *
- * This file contains the static inline implementation of the inlined
- * routines from the heap handler.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __HEAP_inl
-#define __HEAP_inl
-
-#include <rtems/score/address.h>
-
-/*PAGE
- *
- * _Heap_Head
- *
- * DESCRIPTION:
- *
- * This function returns the head of the specified heap.
- */
-
-RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Head (
- Heap_Control *the_heap
-)
-{
- return (Heap_Block *)&the_heap->start;
-}
-
-/*PAGE
- *
- * _Heap_Tail
- *
- * DESCRIPTION:
- *
- * This function returns the tail of the specified heap.
- */
-
-RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Tail (
- Heap_Control *the_heap
-)
-{
- return (Heap_Block *)&the_heap->final;
-}
-
-/*PAGE
- *
- * _Heap_Previous_block
- *
- * DESCRIPTION:
- *
- * This function returns the address of the block which physically
- * precedes the_block in memory.
- */
-
-RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Previous_block (
- Heap_Block *the_block
-)
-{
- return (Heap_Block *) _Addresses_Subtract_offset(
- (void *)the_block,
- the_block->back_flag & ~ HEAP_BLOCK_USED
- );
-}
-
-/*PAGE
- *
- * _Heap_Next_block
- *
- * DESCRIPTION:
- *
- * This function returns the address of the block which physically
- * follows the_block in memory.
- *
- * NOTE: Next_block assumes that the block is free.
- */
-
-RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Next_block (
- Heap_Block *the_block
-)
-{
- return (Heap_Block *) _Addresses_Add_offset(
- (void *)the_block,
- the_block->front_flag & ~ HEAP_BLOCK_USED
- );
-}
-
-/*PAGE
- *
- * _Heap_Block_at
- *
- * DESCRIPTION:
- *
- * This function calculates and returns a block's location (address)
- * in the heap based upon a base address and an offset.
- */
-
-RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
- void *base,
- unsigned32 offset
-)
-{
- return (Heap_Block *) _Addresses_Add_offset( (void *)base, offset );
-}
-
-/*PAGE
- *
- * _Heap_User_block_at
- *
- * DESCRIPTION:
- *
- * XXX
- */
-
-RTEMS_INLINE_ROUTINE Heap_Block *_Heap_User_block_at(
- void *base
-)
-{
- unsigned32 offset;
-
- offset = *(((unsigned32 *) base) - 1);
- return _Heap_Block_at( base, -offset + -HEAP_BLOCK_USED_OVERHEAD);
-}
-
-/*PAGE
- *
- * _Heap_Is_previous_block_free
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the previous block of the_block
- * is free, and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Heap_Is_previous_block_free (
- Heap_Block *the_block
-)
-{
- return !(the_block->back_flag & HEAP_BLOCK_USED);
-}
-
-/*PAGE
- *
- * _Heap_Is_block_free
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the block is free, and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Heap_Is_block_free (
- Heap_Block *the_block
-)
-{
- return !(the_block->front_flag & HEAP_BLOCK_USED);
-}
-
-/*PAGE
- *
- * _Heap_Is_block_used
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the block is currently allocated,
- * and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Heap_Is_block_used (
- Heap_Block *the_block
-)
-{
- return (the_block->front_flag & HEAP_BLOCK_USED);
-}
-
-/*PAGE
- *
- * _Heap_Block_size
- *
- * DESCRIPTION:
- *
- * This function returns the size of the_block in bytes.
- */
-
-RTEMS_INLINE_ROUTINE unsigned32 _Heap_Block_size (
- Heap_Block *the_block
-)
-{
- return (the_block->front_flag & ~HEAP_BLOCK_USED);
-}
-
-/*PAGE
- *
- * _Heap_Start_of_user_area
- *
- * DESCRIPTION:
- *
- * This function returns the starting address of the portion of the block
- * which the user may access.
- */
-
-RTEMS_INLINE_ROUTINE void *_Heap_Start_of_user_area (
- Heap_Block *the_block
-)
-{
- return (void *) &the_block->next;
-}
-
-/*PAGE
- *
- * _Heap_Is_block_in
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the_block is within the memory area
- * managed by the_heap, and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Heap_Is_block_in (
- Heap_Control *the_heap,
- Heap_Block *the_block
-)
-{
- return _Addresses_Is_in_range( the_block, the_heap->start, the_heap->final );
-}
-
-/*PAGE
- *
- * _Heap_Is_page_size_valid
- *
- * DESCRIPTION:
- *
- * This function validates a specified heap page size. If the page size
- * is 0 or if lies outside a page size alignment boundary it is invalid
- * and FALSE is returned. Otherwise, the page size is valid and TRUE is
- * returned.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Heap_Is_page_size_valid(
- unsigned32 page_size
-)
-{
- return ((page_size != 0) &&
- ((page_size % CPU_HEAP_ALIGNMENT) == 0));
-}
-
-/*PAGE
- *
- * _Heap_Build_flag
- *
- * DESCRIPTION:
- *
- * This function returns the block flag composed of size and in_use_flag.
- * The flag returned is suitable for use as a back or front flag in a
- * heap block.
- */
-
-RTEMS_INLINE_ROUTINE unsigned32 _Heap_Build_flag (
- unsigned32 size,
- unsigned32 in_use_flag
-)
-{
- return size | in_use_flag;
-}
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/inline/rtems/score/isr.inl b/cpukit/score/inline/rtems/score/isr.inl
deleted file mode 100644
index 5b6e3918b9..0000000000
--- a/cpukit/score/inline/rtems/score/isr.inl
+++ /dev/null
@@ -1,81 +0,0 @@
-/* isr.inl
- *
- * This include file contains the static implementation of all
- * inlined routines in the Interrupt Handler.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __ISR_inl
-#define __ISR_inl
-
-/*PAGE
- *
- * _ISR_Is_in_progress
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the processor is currently servicing
- * and interrupt and FALSE otherwise. A return value of TRUE indicates
- * that the caller is an interrupt service routine, NOT a thread. The
- * directives available to an interrupt service routine are restricted.
- */
-
-#if defined(powerpc)
-#define CPU_PROVIDES_ISR_IS_IN_PROGRESS
-#endif
-
-#ifndef CPU_PROVIDES_ISR_IS_IN_PROGRESS
-
-RTEMS_INLINE_ROUTINE boolean _ISR_Is_in_progress( void )
-{
- return (_ISR_Nest_level != 0);
-}
-#else
-#include <rtems/score/c_isr.inl>
-#endif
-
-/*PAGE
- *
- * _ISR_Is_vector_number_valid
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the vector is a valid vector number
- * for this processor and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _ISR_Is_vector_number_valid (
- unsigned32 vector
-)
-{
- return ( vector <= CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER );
-}
-
-/*PAGE
- *
- * _ISR_Is_valid_user_handler
- *
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if handler is the entry point of a valid
- * use interrupt service routine and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _ISR_Is_valid_user_handler (
- void *handler
-)
-{
- return ( handler != NULL);
-}
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/inline/rtems/score/mppkt.inl b/cpukit/score/inline/rtems/score/mppkt.inl
deleted file mode 100644
index 3838a96812..0000000000
--- a/cpukit/score/inline/rtems/score/mppkt.inl
+++ /dev/null
@@ -1,57 +0,0 @@
-/* inline/mppkt.inl
- *
- * This package is the implementation of the Packet Handler
- * routines which are inlined.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __INLINE_MP_PACKET_inl
-#define __INLINE_MP_PACKET_inl
-
-/*PAGE
- *
- * _Mp_packet_Is_valid_packet_class
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the the_packet_class is valid,
- * and FALSE otherwise.
- *
- * NOTE: Check for lower bounds (MP_PACKET_CLASSES_FIRST ) is unnecessary
- * because this enum starts at lower bound of zero.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Mp_packet_Is_valid_packet_class (
- MP_packet_Classes the_packet_class
-)
-{
- return ( the_packet_class <= MP_PACKET_CLASSES_LAST );
-}
-
-/*PAGE
- *
- * _Mp_packet_Is_null
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the the_packet_class is null,
- * and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Mp_packet_Is_null (
- MP_packet_Prefix *the_packet
-)
-{
- return the_packet == NULL;
-}
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/inline/rtems/score/object.inl b/cpukit/score/inline/rtems/score/object.inl
deleted file mode 100644
index 1b435b4d4f..0000000000
--- a/cpukit/score/inline/rtems/score/object.inl
+++ /dev/null
@@ -1,290 +0,0 @@
-/* object.inl
- *
- * This include file contains the static inline implementation of all
- * of the inlined routines in the Object Handler.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __OBJECTS_inl
-#define __OBJECTS_inl
-
-/*PAGE
- *
- * _Objects_Build_id
- *
- * DESCRIPTION:
- *
- * This function builds an object's id from the processor node and index
- * values specified.
- */
-
-RTEMS_INLINE_ROUTINE Objects_Id _Objects_Build_id(
- Objects_Classes the_class,
- unsigned32 node,
- unsigned32 index
-)
-{
- return ( (the_class << OBJECTS_CLASS_START_BIT) |
- (node << OBJECTS_NODE_START_BIT) |
- (index << OBJECTS_INDEX_START_BIT) );
-}
-
-/*PAGE
- *
- * _Objects_Get_class
- *
- * DESCRIPTION:
- *
- * This function returns the class portion of the ID.
- */
-
-RTEMS_INLINE_ROUTINE Objects_Classes _Objects_Get_class(
- Objects_Id id
-)
-{
- return (Objects_Classes)
- ((id >> OBJECTS_CLASS_START_BIT) & OBJECTS_CLASS_VALID_BITS);
-}
-
-
-/*PAGE
- *
- * _Objects_Get_node
- *
- * DESCRIPTION:
- *
- * This function returns the node portion of the ID.
- */
-
-RTEMS_INLINE_ROUTINE unsigned32 _Objects_Get_node(
- Objects_Id id
-)
-{
- return (id >> OBJECTS_NODE_START_BIT) & OBJECTS_NODE_VALID_BITS;
-}
-
-/*PAGE
- *
- * _Objects_Get_index
- *
- * DESCRIPTION:
- *
- * This function returns the index portion of the ID.
- */
-
-RTEMS_INLINE_ROUTINE unsigned32 _Objects_Get_index(
- Objects_Id id
-)
-{
- return (id >> OBJECTS_INDEX_START_BIT) & OBJECTS_INDEX_VALID_BITS;
-}
-
-/*PAGE
- *
- * _Objects_Is_class_valid
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the class is valid.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Objects_Is_class_valid(
- Objects_Classes the_class
-)
-{
- return the_class && the_class <= OBJECTS_CLASSES_LAST;
-}
-
-/*PAGE
- *
- * _Objects_Is_local_node
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the node is of the local object, and
- * FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Objects_Is_local_node(
- unsigned32 node
-)
-{
- return ( node == _Objects_Local_node );
-}
-
-/*PAGE
- *
- * _Objects_Is_local_id
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the id is of a local object, and
- * FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Objects_Is_local_id(
- Objects_Id id
-)
-{
- return _Objects_Is_local_node( _Objects_Get_node(id) );
-}
-
-/*PAGE
- *
- * _Objects_Are_ids_equal
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if left and right are equal,
- * and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Objects_Are_ids_equal(
- Objects_Id left,
- Objects_Id right
-)
-{
- return ( left == right );
-}
-
-/*PAGE
- *
- * _Objects_Get_local_object
- *
- * DESCRIPTION:
- *
- * This function returns a pointer to the local_table object
- * referenced by the index.
- */
-
-RTEMS_INLINE_ROUTINE Objects_Control *_Objects_Get_local_object(
- Objects_Information *information,
- unsigned32 index
-)
-{
- if ( index > information->maximum )
- return NULL;
- return ( information->local_table[ index ] );
-}
-
-/*PAGE
- *
- * _Objects_Set_local_object
- *
- * DESCRIPTION:
- *
- * This function sets the pointer to the local_table object
- * referenced by the index.
- */
-
-RTEMS_INLINE_ROUTINE void _Objects_Set_local_object(
- Objects_Information *information,
- unsigned32 index,
- Objects_Control *the_object
-)
-{
- if ( index <= information->maximum )
- information->local_table[ index ] = the_object;
-}
-
-
-/*PAGE
- *
- * _Objects_Get_information
- *
- * DESCRIPTION:
- *
- * This function return the information structure given
- * an id of an object.
- */
-
-RTEMS_INLINE_ROUTINE Objects_Information *_Objects_Get_information(
- Objects_Id id
-)
-{
- Objects_Classes the_class;
-
- the_class = _Objects_Get_class( id );
-
- if ( !_Objects_Is_class_valid( the_class ) )
- return NULL;
-
- return _Objects_Information_table[ the_class ];
-}
-
-/*PAGE
- *
- * _Objects_Open
- *
- * DESCRIPTION:
- *
- * This function places the_object control pointer and object name
- * in the Local Pointer and Local Name Tables, respectively.
- */
-
-RTEMS_INLINE_ROUTINE void _Objects_Open(
- Objects_Information *information,
- Objects_Control *the_object,
- Objects_Name name
-)
-{
- unsigned32 index;
-
- index = _Objects_Get_index( the_object->id );
- _Objects_Set_local_object( information, index, the_object );
-
- if ( information->is_string )
- _Objects_Copy_name_string( name, the_object->name );
- else
- _Objects_Copy_name_raw( name, the_object->name, information->name_length );
-}
-
-/*PAGE
- *
- * _Objects_Close
- *
- * DESCRIPTION:
- *
- * This function removes the_object control pointer and object name
- * in the Local Pointer and Local Name Tables.
- */
-
-RTEMS_INLINE_ROUTINE void _Objects_Close(
- Objects_Information *information,
- Objects_Control *the_object
-)
-{
- unsigned32 index;
-
- index = _Objects_Get_index( the_object->id );
- _Objects_Set_local_object( information, index, NULL );
- _Objects_Clear_name( the_object->name, information->name_length );
-}
-
-/*PAGE
- *
- * _Objects_Namespace_remove
- *
- * DESCRIPTION:
- *
- * This function removes the_object from the namespace.
- */
-
-RTEMS_INLINE_ROUTINE void _Objects_Namespace_remove(
- Objects_Information *information,
- Objects_Control *the_object
-)
-{
- _Objects_Clear_name( the_object->name, information->name_length );
-}
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/inline/rtems/score/objectmp.inl b/cpukit/score/inline/rtems/score/objectmp.inl
deleted file mode 100644
index 7e840c9ca3..0000000000
--- a/cpukit/score/inline/rtems/score/objectmp.inl
+++ /dev/null
@@ -1,72 +0,0 @@
-/* inline/objectmp.inl
- *
- * This include file contains the bodies of all inlined routines
- * which deal with global objects.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __INLINE_MP_OBJECTS_inl
-#define __INLINE_MP_OBJECTS_inl
-
-/*PAGE
- *
- * _Objects_MP_Allocate_global_object
- *
- * DESCRIPTION:
- *
- * This function allocates a Global Object control block.
- */
-
-RTEMS_INLINE_ROUTINE Objects_MP_Control *_Objects_MP_Allocate_global_object (
- void
-)
-{
- return (Objects_MP_Control *)
- _Chain_Get( &_Objects_MP_Inactive_global_objects );
-}
-
-/*PAGE
- *
- * _Objects_MP_Free_global_object
- *
- * DESCRIPTION:
- *
- * This routine deallocates a Global Object control block.
- */
-
-RTEMS_INLINE_ROUTINE void _Objects_MP_Free_global_object (
- Objects_MP_Control *the_object
-)
-{
- _Chain_Append(
- &_Objects_MP_Inactive_global_objects,
- &the_object->Object.Node
- );
-}
-
-/*PAGE
- *
- * _Objects_MP_Is_null_global_object
- *
- * DESCRIPTION:
- *
- * This function returns whether the global object is NULL or not.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Objects_MP_Is_null_global_object (
- Objects_MP_Control *the_object
-)
-{
- return( the_object == NULL );
-}
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/inline/rtems/score/priority.inl b/cpukit/score/inline/rtems/score/priority.inl
deleted file mode 100644
index 4928dba5ef..0000000000
--- a/cpukit/score/inline/rtems/score/priority.inl
+++ /dev/null
@@ -1,246 +0,0 @@
-/* priority.inl
- *
- * This file contains the static inline implementation of all inlined
- * routines in the Priority Handler.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __PRIORITY_inl
-#define __PRIORITY_inl
-
-#include <rtems/score/bitfield.h>
-
-/*PAGE
- *
- * _Priority_Handler_initialization
- *
- * DESCRIPTION:
- *
- * This routine performs the initialization necessary for this handler.
- */
-
-RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void )
-{
- unsigned32 index;
-
- _Priority_Major_bit_map = 0;
- for ( index=0 ; index <16 ; index++ )
- _Priority_Bit_map[ index ] = 0;
-}
-
-/*PAGE
- *
- * _Priority_Is_valid
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the_priority if valid for a
- * user task, and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Priority_Is_valid (
- Priority_Control the_priority
-)
-{
- /*
- * Since PRIORITY_MINIMUM is 0 and priorities are stored unsigned,
- * then checking for less than 0 is unnecessary.
- */
-
- return ( the_priority <= PRIORITY_MAXIMUM );
-}
-
-/*PAGE
- *
- * _Priority_Major
- *
- * DESCRIPTION:
- *
- * This function returns the major portion of the_priority.
- */
-
-RTEMS_INLINE_ROUTINE unsigned32 _Priority_Major (
- Priority_Control the_priority
-)
-{
- return ( the_priority / 16 );
-}
-
-/*PAGE
- *
- * _Priority_Minor
- *
- * DESCRIPTION:
- *
- * This function returns the minor portion of the_priority.
- */
-
-RTEMS_INLINE_ROUTINE unsigned32 _Priority_Minor (
- Priority_Control the_priority
-)
-{
- return ( the_priority % 16 );
-}
-
-#if ( CPU_USE_GENERIC_BITFIELD_CODE == TRUE )
-
-/*PAGE
- *
- * _Priority_Mask
- *
- * DESCRIPTION:
- *
- * This function returns the mask associated with the major or minor
- * number passed to it.
- */
-
-RTEMS_INLINE_ROUTINE unsigned32 _Priority_Mask (
- unsigned32 bit_number
-)
-{
- return (0x8000 >> bit_number);
-}
-
-
-/*PAGE
- *
- * _Priority_Bits_index
- *
- * DESCRIPTION:
- *
- * This function translates the bit numbers returned by the bit scan
- * of a priority bit field into something suitable for use as
- * a major or minor component of a priority.
- */
-
-RTEMS_INLINE_ROUTINE unsigned32 _Priority_Bits_index (
- unsigned32 bit_number
-)
-{
- return bit_number;
-}
-
-#endif
-
-/*PAGE
- *
- * _Priority_Add_to_bit_map
- *
- * DESCRIPTION:
- *
- * This routine uses the_priority_map to update the priority
- * bit maps to indicate that a thread has been readied.
- */
-
-RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
- Priority_Information *the_priority_map
-)
-{
- *the_priority_map->minor |= the_priority_map->ready_minor;
- _Priority_Major_bit_map |= the_priority_map->ready_major;
-}
-
-/*PAGE
- *
- * _Priority_Remove_from_bit_map
- *
- * DESCRIPTION:
- *
- * This routine uses the_priority_map to update the priority
- * bit maps to indicate that a thread has been removed from the
- * ready state.
- */
-
-RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map (
- Priority_Information *the_priority_map
-)
-{
- *the_priority_map->minor &= the_priority_map->block_minor;
- if ( *the_priority_map->minor == 0 )
- _Priority_Major_bit_map &= the_priority_map->block_major;
-}
-
-/*PAGE
- *
- * _Priority_Get_highest
- *
- * DESCRIPTION:
- *
- * This function returns the priority of the highest priority
- * ready thread.
- */
-
-RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void )
-{
- Priority_Bit_map_control minor;
- Priority_Bit_map_control major;
-
- _Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
- _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
-
- return (_Priority_Bits_index( major ) << 4) +
- _Priority_Bits_index( minor );
-}
-
-/*PAGE
- *
- * _Priority_Initialize_information
- *
- * DESCRIPTION:
- *
- * This routine initializes the_priority_map so that it
- * contains the information necessary to manage a thread
- * at new_priority.
- */
-
-RTEMS_INLINE_ROUTINE void _Priority_Initialize_information(
- Priority_Information *the_priority_map,
- Priority_Control new_priority
-)
-{
- Priority_Bit_map_control major;
- Priority_Bit_map_control minor;
- Priority_Bit_map_control mask;
-
- major = _Priority_Major( new_priority );
- minor = _Priority_Minor( new_priority );
-
- the_priority_map->minor =
- &_Priority_Bit_map[ _Priority_Bits_index(major) ];
-
- mask = _Priority_Mask( major );
- the_priority_map->ready_major = mask;
- the_priority_map->block_major = ~mask;
-
- mask = _Priority_Mask( minor );
- the_priority_map->ready_minor = mask;
- the_priority_map->block_minor = ~mask;
-}
-
-/*PAGE
- *
- * _Priority_Is_group_empty
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the priority GROUP is empty, and
- * FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Priority_Is_group_empty (
- Priority_Control the_priority
-)
-{
- return the_priority == 0;
-}
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/inline/rtems/score/stack.inl b/cpukit/score/inline/rtems/score/stack.inl
deleted file mode 100644
index ea7f2f1c36..0000000000
--- a/cpukit/score/inline/rtems/score/stack.inl
+++ /dev/null
@@ -1,80 +0,0 @@
-/* stack.inl
- *
- * This file contains the static inline implementation of the inlined
- * routines from the Stack Handler.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __STACK_inl
-#define __STACK_inl
-
-/*PAGE
- *
- * _Stack_Initialize
- *
- * DESCRIPTION:
- *
- * This routine initializes the_stack record to indicate that
- * size bytes of memory starting at starting_address have been
- * reserved for a stack.
- */
-
-RTEMS_INLINE_ROUTINE void _Stack_Initialize (
- Stack_Control *the_stack,
- void *starting_address,
- unsigned32 size
-)
-{
- the_stack->area = starting_address;
- the_stack->size = size;
-}
-
-/*PAGE
- *
- * _Stack_Is_enough
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if size bytes is enough memory for
- * a valid stack area on this processor, and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Stack_Is_enough (
- unsigned32 size
-)
-{
- return ( size >= STACK_MINIMUM_SIZE );
-}
-
-/*PAGE
- *
- * _Stack_Adjust_size
- *
- * DESCRIPTION:
- *
- * This function increases the stack size to insure that the thread
- * has the desired amount of stack space after the initial stack
- * pointer is determined based on alignment restrictions.
- *
- * NOTE:
- *
- * The amount of adjustment for alignment is CPU dependent.
- */
-
-RTEMS_INLINE_ROUTINE unsigned32 _Stack_Adjust_size (
- unsigned32 size
-)
-{
- return size + CPU_STACK_ALIGNMENT;
-}
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/inline/rtems/score/states.inl b/cpukit/score/inline/rtems/score/states.inl
deleted file mode 100644
index 5d57648f23..0000000000
--- a/cpukit/score/inline/rtems/score/states.inl
+++ /dev/null
@@ -1,383 +0,0 @@
-/* states.inl
- *
- * This file contains the macro implementation of the inlined
- * routines associated with thread state information.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __STATES_inl
-#define __STATES_inl
-
-/*PAGE
- *
- * _States_Set
- *
- * DESCRIPTION:
- *
- * This function sets the given states_to_set into the current_state
- * passed in. The result is returned to the user in current_state.
- */
-
-RTEMS_INLINE_ROUTINE States_Control _States_Set (
- States_Control states_to_set,
- States_Control current_state
-)
-{
- return (current_state | states_to_set);
-}
-
-/*PAGE
- *
- * _States_Clear
- *
- * DESCRIPTION:
- *
- * This function clears the given states_to_clear into the current_state
- * passed in. The result is returned to the user in current_state.
- */
-
-RTEMS_INLINE_ROUTINE States_Control _States_Clear (
- States_Control states_to_clear,
- States_Control current_state
-)
-{
- return (current_state & ~states_to_clear);
-}
-
-/*PAGE
- *
- * _States_Is_ready
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the_states indicates that the
- * state is READY, and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _States_Is_ready (
- States_Control the_states
-)
-{
- return (the_states == STATES_READY);
-}
-
-/*PAGE
- *
- * _States_Is_only_dormant
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the DORMANT state is the ONLY state
- * set in the_states, and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _States_Is_only_dormant (
- States_Control the_states
-)
-{
- return (the_states == STATES_DORMANT);
-}
-
-/*PAGE
- *
- * _States_Is_dormant
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the DORMANT state is set in
- * the_states, and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _States_Is_dormant (
- States_Control the_states
-)
-{
- return (the_states & STATES_DORMANT);
-}
-
-/*PAGE
- *
- * _States_Is_suspended
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the SUSPENDED state is set in
- * the_states, and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _States_Is_suspended (
- States_Control the_states
-)
-{
- return (the_states & STATES_SUSPENDED);
-}
-
-/*PAGE
- *
- * _States_Is_Transient
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the TRANSIENT state is set in
- * the_states, and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _States_Is_transient (
- States_Control the_states
-)
-{
- return (the_states & STATES_TRANSIENT);
-}
-
-/*PAGE
- *
- * _States_Is_delaying
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the DELAYING state is set in
- * the_states, and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _States_Is_delaying (
- States_Control the_states
-)
-{
- return (the_states & STATES_DELAYING);
-}
-
-/*PAGE
- *
- * _States_Is_waiting_for_buffer
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the WAITING_FOR_BUFFER state is set in
- * the_states, and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _States_Is_waiting_for_buffer (
- States_Control the_states
-)
-{
- return (the_states & STATES_WAITING_FOR_BUFFER);
-}
-
-/*PAGE
- *
- * _States_Is_waiting_for_segment
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the WAITING_FOR_SEGMENT state is set in
- * the_states, and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _States_Is_waiting_for_segment (
- States_Control the_states
-)
-{
- return (the_states & STATES_WAITING_FOR_SEGMENT);
-}
-
-/*PAGE
- *
- * _States_Is_waiting_for_message
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the WAITING_FOR_MESSAGE state is set in
- * the_states, and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _States_Is_waiting_for_message (
- States_Control the_states
-)
-{
- return (the_states & STATES_WAITING_FOR_MESSAGE);
-}
-
-/*PAGE
- *
- * _States_Is_waiting_for_event
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the WAITING_FOR_EVENT state is set in
- * the_states, and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _States_Is_waiting_for_event (
- States_Control the_states
-)
-{
- return (the_states & STATES_WAITING_FOR_EVENT);
-}
-
-/*PAGE
- *
- * _States_Is_waiting_for_mutex
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the WAITING_FOR_MUTEX state
- * is set in the_states, and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _States_Is_waiting_for_mutex (
- States_Control the_states
-)
-{
- return (the_states & STATES_WAITING_FOR_MUTEX);
-}
-
-/*PAGE
- *
- * _States_Is_waiting_for_semaphore
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the WAITING_FOR_SEMAPHORE state
- * is set in the_states, and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _States_Is_waiting_for_semaphore (
- States_Control the_states
-)
-{
- return (the_states & STATES_WAITING_FOR_SEMAPHORE);
-}
-
-/*PAGE
- *
- * _States_Is_waiting_for_time
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the WAITING_FOR_TIME state is set in
- * the_states, and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _States_Is_waiting_for_time (
- States_Control the_states
-)
-{
- return (the_states & STATES_WAITING_FOR_TIME);
-}
-
-/*PAGE
- *
- * _States_Is_waiting_for_rpc_reply
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the WAITING_FOR_TIME state is set in
- * the_states, and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _States_Is_waiting_for_rpc_reply (
- States_Control the_states
-)
-{
- return (the_states & STATES_WAITING_FOR_RPC_REPLY);
-}
-
-/*PAGE
- *
- * _States_Is_waiting_for_period
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the WAITING_FOR_PERIOD state is set in
- * the_states, and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _States_Is_waiting_for_period (
- States_Control the_states
-)
-{
- return (the_states & STATES_WAITING_FOR_PERIOD);
-}
-
-/*PAGE
- *
- * _States_Is_locally_blocked
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if one of the states which indicates
- * that a task is blocked waiting for a local resource is set in
- * the_states, and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _States_Is_locally_blocked (
- States_Control the_states
-)
-{
- return (the_states & STATES_LOCALLY_BLOCKED);
-}
-
-/*PAGE
- *
- * _States_Is_waiting_on_thread_queue
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if one of the states which indicates
- * that a task is blocked waiting for a local resource is set in
- * the_states, and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _States_Is_waiting_on_thread_queue (
- States_Control the_states
-)
-{
- return (the_states & STATES_WAITING_ON_THREAD_QUEUE);
-}
-
-/*PAGE
- *
- * _States_Is_blocked
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if one of the states which indicates
- * that a task is blocked is set in the_states, and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _States_Is_blocked (
- States_Control the_states
-)
-{
- return (the_states & STATES_BLOCKED);
-}
-
-/*PAGE
- *
- *
- * _States_Are_set
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if any of the states in the mask
- * are set in the_states, and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _States_Are_set (
- States_Control the_states,
- States_Control mask
-)
-{
- return ( (the_states & mask) != STATES_READY);
-}
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/inline/rtems/score/sysstate.inl b/cpukit/score/inline/rtems/score/sysstate.inl
deleted file mode 100644
index 17976f3e3f..0000000000
--- a/cpukit/score/inline/rtems/score/sysstate.inl
+++ /dev/null
@@ -1,153 +0,0 @@
-/* sysstates.inl
- *
- * This file contains the inline implementation of routines regarding the
- * system state.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __SYSTEM_STATE_inl
-#define __SYSTEM_STATE_inl
-
-/*PAGE
- *
- * _System_state_Handler_initialization
- *
- * DESCRIPTION:
- *
- * This routine initializes the system state handler.
- */
-
-RTEMS_INLINE_ROUTINE void _System_state_Handler_initialization (
- boolean is_multiprocessing
-)
-{
- _System_state_Current = SYSTEM_STATE_BEFORE_INITIALIZATION;
- _System_state_Is_multiprocessing = is_multiprocessing;
-}
-
-/*PAGE
- *
- * _System_state_Set
- *
- * DESCRIPTION:
- *
- * This routine sets the current system state to that specified by
- * the called.
- */
-
-RTEMS_INLINE_ROUTINE void _System_state_Set (
- System_state_Codes state
-)
-{
- _System_state_Current = state;
-}
-
-/*PAGE
- *
- * _System_state_Get
- *
- * DESCRIPTION:
- *
- * This function returns the current system state.
- */
-
-RTEMS_INLINE_ROUTINE System_state_Codes _System_state_Get ( void )
-{
- return _System_state_Current;
-}
-
-/*PAGE
- *
- * _System_state_Is_before_initialization
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the state is equal to the
- * "before initialization" state, and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _System_state_Is_before_initialization (
- System_state_Codes state
-)
-{
- return (state == SYSTEM_STATE_BEFORE_INITIALIZATION);
-}
-
-/*PAGE
- *
- * _System_state_Is_before_multitasking
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the state is equal to the
- * "before multitasking" state, and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _System_state_Is_before_multitasking (
- System_state_Codes state
-)
-{
- return (state == SYSTEM_STATE_BEFORE_MULTITASKING);
-}
-
-/*PAGE
- *
- * _System_state_Is_begin_multitasking
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the state is equal to the
- * "begin multitasking" state, and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _System_state_Is_begin_multitasking (
- System_state_Codes state
-)
-{
- return (state == SYSTEM_STATE_BEGIN_MULTITASKING);
-}
-
-/*PAGE
- *
- * _System_state_Is_up
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the state is equal to the
- * "up" state, and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _System_state_Is_up (
- System_state_Codes state
-)
-{
- return (state == SYSTEM_STATE_UP);
-}
-
-/*PAGE
- *
- * _System_state_Is_failed
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the state is equal to the
- * "failed" state, and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _System_state_Is_failed (
- System_state_Codes state
-)
-{
- return (state == SYSTEM_STATE_FAILED);
-}
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/inline/rtems/score/thread.inl b/cpukit/score/inline/rtems/score/thread.inl
deleted file mode 100644
index f1a2410c95..0000000000
--- a/cpukit/score/inline/rtems/score/thread.inl
+++ /dev/null
@@ -1,385 +0,0 @@
-/* thread.inl
- *
- * This file contains the macro implementation of the inlined
- * routines from the Thread handler.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __THREAD_inl
-#define __THREAD_inl
-
-/*PAGE
- *
- * _Thread_Stop_multitasking
- *
- * DESCRIPTION:
- *
- * This routine halts multitasking and returns control to
- * the "thread" (i.e. the BSP) which initially invoked the
- * routine which initialized the system.
- */
-
-RTEMS_INLINE_ROUTINE void _Thread_Stop_multitasking( void )
-{
- _Context_Switch( &_Thread_Executing->Registers, &_Thread_BSP_context );
-}
-
-/*PAGE
- *
- * _Thread_Is_executing
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the_thread is the currently executing
- * thread, and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Thread_Is_executing (
- Thread_Control *the_thread
-)
-{
- return ( the_thread == _Thread_Executing );
-}
-
-/*PAGE
- *
- * _Thread_Is_heir
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the_thread is the heir
- * thread, and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Thread_Is_heir (
- Thread_Control *the_thread
-)
-{
- return ( the_thread == _Thread_Heir );
-}
-
-/*PAGE
- *
- * _Thread_Is_executing_also_the_heir
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the currently executing thread
- * is also the heir thread, and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Thread_Is_executing_also_the_heir( void )
-{
- return ( _Thread_Executing == _Thread_Heir );
-}
-
-/*PAGE
- *
- * _Thread_Unblock
- *
- * DESCRIPTION:
- *
- * This routine clears any blocking state for the_thread. It performs
- * any necessary scheduling operations including the selection of
- * a new heir thread.
- */
-
-RTEMS_INLINE_ROUTINE void _Thread_Unblock (
- Thread_Control *the_thread
-)
-{
- _Thread_Clear_state( the_thread, STATES_BLOCKED );
-}
-
-/*PAGE
- *
- * _Thread_Restart_self
- *
- * DESCRIPTION:
- *
- * This routine resets the current context of the calling thread
- * to that of its initial state.
- */
-
-RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void )
-{
- if ( _Thread_Executing->fp_context != NULL )
- _Context_Restore_fp( &_Thread_Executing->fp_context );
-
- _CPU_Context_Restart_self( &_Thread_Executing->Registers );
-}
-
-/*PAGE
- *
- * _Thread_Calculate_heir
- *
- * DESCRIPTION:
- *
- * This function returns a pointer to the highest priority
- * ready thread.
- */
-
-RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
-{
- _Thread_Heir = (Thread_Control *)
- _Thread_Ready_chain[ _Priority_Get_highest() ].first;
-}
-
-/*PAGE
- *
- * _Thread_Is_allocated_fp
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the floating point context of
- * the_thread is currently loaded in the floating point unit, and
- * FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Thread_Is_allocated_fp (
- Thread_Control *the_thread
-)
-{
- return ( the_thread == _Thread_Allocated_fp );
-}
-
-/*PAGE
- *
- * _Thread_Deallocate_fp
- *
- * DESCRIPTION:
- *
- * This routine is invoked when the currently loaded floating
- * point context is now longer associated with an active thread.
- */
-
-RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void )
-{
- _Thread_Allocated_fp = NULL;
-}
-
-/*PAGE
- *
- * _Thread_Disable_dispatch
- *
- * DESCRIPTION:
- *
- * This routine prevents dispatching.
- */
-
-RTEMS_INLINE_ROUTINE void _Thread_Disable_dispatch( void )
-{
- _Thread_Dispatch_disable_level += 1;
-}
-
-/*PAGE
- *
- * _Thread_Enable_dispatch
- *
- * DESCRIPTION:
- *
- * This routine allows dispatching to occur again. If this is
- * the outer most dispatching critical section, then a dispatching
- * operation will be performed and, if necessary, control of the
- * processor will be transferred to the heir thread.
- */
-
-#if ( CPU_INLINE_ENABLE_DISPATCH == TRUE )
-RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch()
-{
- if ( (--_Thread_Dispatch_disable_level) == 0 )
- _Thread_Dispatch();
-}
-#endif
-
-#if ( CPU_INLINE_ENABLE_DISPATCH == FALSE )
-void _Thread_Enable_dispatch( void );
-#endif
-
-/*PAGE
- *
- * _Thread_Unnest_dispatch
- *
- * DESCRIPTION:
- *
- * This routine allows dispatching to occur again. However,
- * no dispatching operation is performed even if this is the outer
- * most dispatching critical section.
- */
-
-RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
-{
- _Thread_Dispatch_disable_level -= 1;
-}
-
-/*PAGE
- *
- * _Thread_Is_dispatching_enabled
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if dispatching is disabled, and FALSE
- * otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Thread_Is_dispatching_enabled( void )
-{
- return ( _Thread_Dispatch_disable_level == 0 );
-}
-
-/*PAGE
- *
- * _Thread_Is_context_switch_necessary
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if dispatching is disabled, and FALSE
- * otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Thread_Is_context_switch_necessary( void )
-{
- return ( _Context_Switch_necessary );
-}
-
-/*PAGE
- *
- * _Thread_Dispatch_initialization
- *
- * DESCRIPTION:
- *
- * This routine initializes the thread dispatching subsystem.
- */
-
-RTEMS_INLINE_ROUTINE void _Thread_Dispatch_initialization( void )
-{
- _Thread_Dispatch_disable_level = 1;
-}
-
-/*PAGE
- *
- * _Thread_Is_null
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the_thread is NULL and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Thread_Is_null (
- Thread_Control *the_thread
-)
-{
- return ( the_thread == NULL );
-}
-
-/*PAGE
- *
- * _Thread_Get
- *
- * DESCRIPTION:
- *
- * This function maps thread IDs to thread control
- * blocks. If ID corresponds to a local thread, then it
- * returns the_thread control pointer which maps to ID
- * and location is set to OBJECTS_LOCAL. If the thread ID is
- * global and resides on a remote node, then location is set
- * to OBJECTS_REMOTE, and the_thread is undefined.
- * Otherwise, location is set to OBJECTS_ERROR and
- * the_thread is undefined.
- *
- * NOTE: XXX... This routine may be able to be optimized.
- */
-
-RTEMS_INLINE_ROUTINE Thread_Control *_Thread_Get (
- Objects_Id id,
- Objects_Locations *location
-)
-{
- Objects_Classes the_class;
- Objects_Information *information;
- Thread_Control *tp = (Thread_Control *) 0;
-
- if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
- _Thread_Disable_dispatch();
- *location = OBJECTS_LOCAL;
- tp = _Thread_Executing;
- goto done;
- }
-
- the_class = _Objects_Get_class( id );
-
- if ( the_class > OBJECTS_CLASSES_LAST ) {
- *location = OBJECTS_ERROR;
- goto done;
- }
-
- information = _Objects_Information_table[ the_class ];
-
- if ( !information || !information->is_thread ) {
- *location = OBJECTS_ERROR;
- goto done;
- }
-
- tp = (Thread_Control *) _Objects_Get( information, id, location );
-
-done:
- return tp;
-}
-
-
-/*
- * _Thread_Is_proxy_blocking
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the status code is equal to the
- * status which indicates that a proxy is blocking, and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Thread_Is_proxy_blocking (
- unsigned32 code
-)
-{
- return (code == THREAD_STATUS_PROXY_BLOCKING);
-}
-
-/*PAGE
- *
- * _Thread_Internal_allocate
- *
- * DESCRIPTION:
- *
- * This routine allocates an internal thread.
- */
-
-RTEMS_INLINE_ROUTINE Thread_Control *_Thread_Internal_allocate( void )
-{
- return (Thread_Control *) _Objects_Allocate( &_Thread_Internal_information );
-}
-
-/*PAGE
- *
- * _Thread_Internal_free
- *
- * DESCRIPTION:
- *
- * This routine frees an internal thread.
- */
-
-RTEMS_INLINE_ROUTINE void _Thread_Internal_free (
- Thread_Control *the_task
-)
-{
- _Objects_Free( &_Thread_Internal_information, &the_task->Object );
-}
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/inline/rtems/score/threadmp.inl b/cpukit/score/inline/rtems/score/threadmp.inl
deleted file mode 100644
index c095fd5072..0000000000
--- a/cpukit/score/inline/rtems/score/threadmp.inl
+++ /dev/null
@@ -1,60 +0,0 @@
-/* inline/threadmp.inl
- *
- * This include file contains the bodies of all inlined routines
- * for the multiprocessing part of thread package.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __INLINE_MP_THREAD_inl
-#define __INLINE_MP_THREAD_inl
-
-/*PAGE
- *
- * _Thread_MP_Is_receive
- *
- * DESCRIPTION:
- *
- * This function returns true if the thread in question is the
- * multiprocessing receive thread.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Thread_MP_Is_receive (
- Thread_Control *the_thread
-)
-{
- return the_thread == _Thread_MP_Receive;
-}
-
-/*PAGE
- *
- * _Thread_MP_Free_proxy
- *
- * DESCRIPTION:
- *
- * This routine frees a proxy control block to the
- * inactive chain of free proxy control blocks.
- */
-
-RTEMS_INLINE_ROUTINE void _Thread_MP_Free_proxy (
- Thread_Control *the_thread
-)
-{
- Thread_Proxy_control *the_proxy;
-
- the_proxy = (Thread_Proxy_control *) the_thread;
-
- _Chain_Extract( &the_proxy->Active );
-
- _Chain_Append( &_Thread_MP_Inactive_proxies, &the_thread->Object.Node );
-}
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/inline/rtems/score/tod.inl b/cpukit/score/inline/rtems/score/tod.inl
deleted file mode 100644
index 2d429a8005..0000000000
--- a/cpukit/score/inline/rtems/score/tod.inl
+++ /dev/null
@@ -1,66 +0,0 @@
-/* tod.inl
- *
- * This file contains the static inline implementation of the inlined routines
- * from the Time of Day Handler.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __TIME_OF_DAY_inl
-#define __TIME_OF_DAY_inl
-
-/*PAGE
- *
- * _TOD_Tickle_ticks
- *
- * DESCRIPTION:
- *
- * This routine increments the ticks field of the current time of
- * day at each clock tick.
- */
-
-RTEMS_INLINE_ROUTINE void _TOD_Tickle_ticks( void )
-{
- _TOD_Current.ticks += 1;
- _Watchdog_Ticks_since_boot += 1;
-}
-
-/*PAGE
- *
- * _TOD_Deactivate
- *
- * DESCRIPTION:
- *
- * This routine deactivates updating of the current time of day.
- */
-
-RTEMS_INLINE_ROUTINE void _TOD_Deactivate( void )
-{
- _Watchdog_Remove( &_TOD_Seconds_watchdog );
-}
-
-/*PAGE
- *
- * _TOD_Activate
- *
- * DESCRIPTION:
- *
- * This routine activates updating of the current time of day.
- */
-
-RTEMS_INLINE_ROUTINE void _TOD_Activate(
- Watchdog_Interval ticks
-)
-{
- _Watchdog_Insert_ticks( &_TOD_Seconds_watchdog, ticks );
-}
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/inline/rtems/score/tqdata.inl b/cpukit/score/inline/rtems/score/tqdata.inl
deleted file mode 100644
index 201abeb82f..0000000000
--- a/cpukit/score/inline/rtems/score/tqdata.inl
+++ /dev/null
@@ -1,72 +0,0 @@
-/* tqdata.inl
- *
- * This file contains the static inline implementation of the inlined
- * routines needed to support the Thread Queue Data.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __THREAD_QUEUE_DATA_inl
-#define __THREAD_QUEUE_DATA_inl
-
-/*PAGE
- *
- * _Thread_queue_Header_number
- *
- * DESCRIPTION:
- *
- * This function returns the index of the priority chain on which
- * a thread of the_priority should be placed.
- */
-
-RTEMS_INLINE_ROUTINE unsigned32 _Thread_queue_Header_number (
- Priority_Control the_priority
-)
-{
- return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER);
-}
-
-/*PAGE
- *
- * _Thread_queue_Is_reverse_search
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the_priority indicates that the
- * enqueue search should start at the front of this priority
- * group chain, and FALSE if the search should start at the rear.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Thread_queue_Is_reverse_search (
- Priority_Control the_priority
-)
-{
- return ( the_priority & TASK_QUEUE_DATA_REVERSE_SEARCH_MASK );
-}
-
-/*PAGE
- *
- * _Thread_queue_Enter_critical_section
- *
- * DESCRIPTION:
- *
- * This routine is invoked to indicate that the specified thread queue is
- * entering a critical section.
- */
-
-RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
- Thread_queue_Control *the_thread_queue
-)
-{
- the_thread_queue->sync_state = THREAD_QUEUE_NOTHING_HAPPENED;
-}
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/inline/rtems/score/userext.inl b/cpukit/score/inline/rtems/score/userext.inl
deleted file mode 100644
index 06f1525680..0000000000
--- a/cpukit/score/inline/rtems/score/userext.inl
+++ /dev/null
@@ -1,131 +0,0 @@
-/* userext.inl
- *
- * This file contains the macro implementation of the inlined routines
- * from the User Extension Handler
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __USER_EXTENSIONS_inl
-#define __USER_EXTENSIONS_inl
-
-#include <rtems/score/wkspace.h>
-
-/*PAGE
- *
- * _User_extensions_Handler_initialization
- *
- * DESCRIPTION:
- *
- * This routine performs the initialization necessary for this handler.
- */
-
-RTEMS_INLINE_ROUTINE void _User_extensions_Handler_initialization (
- unsigned32 number_of_extensions,
- User_extensions_Table *initial_extensions
-)
-{
- User_extensions_Control *extension;
- unsigned32 i;
-
- _Chain_Initialize_empty( &_User_extensions_List );
-
- if ( initial_extensions ) {
- for (i=0 ; i<number_of_extensions ; i++ ) {
- extension =
- _Workspace_Allocate_or_fatal_error( sizeof(User_extensions_Control) );
-
- extension->Callouts = initial_extensions[i];
- _Chain_Append( &_User_extensions_List, &extension->Node );
- }
- }
-}
-
-/*PAGE
- *
- * _User_extensions_Add_set
- *
- * DESCRIPTION:
- *
- * This routine is used to add a user extension set to the active list.
- */
-
-RTEMS_INLINE_ROUTINE void _User_extensions_Add_set (
- User_extensions_Control *the_extension,
- User_extensions_Table *extension_table
-)
-{
- the_extension->Callouts = *extension_table;
-
- _Chain_Append( &_User_extensions_List, &the_extension->Node );
-}
-
-/*PAGE
- *
- * _User_extensions_Add_API_set
- * DESCRIPTION:
- *
- * This routine is used to add an API extension set to the active list.
- */
-
-RTEMS_INLINE_ROUTINE void _User_extensions_Add_API_set (
- User_extensions_Control *the_extension
-)
-{
- _Chain_Prepend( &_User_extensions_List, &the_extension->Node );
-}
-
-/*PAGE
- *
- * _User_extensions_Remove_set
- *
- * DESCRIPTION:
- *
- * This routine is used to remove a user extension set from the active list.
- */
-
-RTEMS_INLINE_ROUTINE void _User_extensions_Remove_set (
- User_extensions_Control *the_extension
-)
-{
- _Chain_Extract( &the_extension->Node );
-}
-
-/*PAGE
- *
- * _User_extensions_Thread_switch
- *
- * DESCRIPTION:
- *
- * This routine is used to invoke the user extension which
- * is invoked when a context switch occurs.
- */
-
-RTEMS_INLINE_ROUTINE void _User_extensions_Thread_switch (
- Thread_Control *executing,
- Thread_Control *heir
-)
-{
- Chain_Node *the_node;
- User_extensions_Control *the_extension;
-
- for ( the_node = _User_extensions_List.first ;
- !_Chain_Is_tail( &_User_extensions_List, the_node ) ;
- the_node = the_node->next ) {
-
- the_extension = (User_extensions_Control *) the_node;
-
- if ( the_extension->Callouts.thread_switch != NULL )
- (*the_extension->Callouts.thread_switch)( executing, heir );
- }
-}
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/inline/rtems/score/watchdog.inl b/cpukit/score/inline/rtems/score/watchdog.inl
deleted file mode 100644
index 5b87c00f17..0000000000
--- a/cpukit/score/inline/rtems/score/watchdog.inl
+++ /dev/null
@@ -1,323 +0,0 @@
-/* watchdog.inl
- *
- * This file contains the static inline implementation of all inlined
- * routines in the Watchdog Handler.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __WATCHDOG_inl
-#define __WATCHDOG_inl
-
-/*PAGE
- *
- * _Watchdog_Initialize
- *
- * DESCRIPTION:
- *
- * This routine initializes the specified watchdog. The watchdog is
- * made inactive, the watchdog id and handler routine are set to the
- * specified values.
- */
-
-RTEMS_INLINE_ROUTINE void _Watchdog_Initialize(
- Watchdog_Control *the_watchdog,
- Watchdog_Service_routine_entry routine,
- Objects_Id id,
- void *user_data
-)
-{
- the_watchdog->state = WATCHDOG_INACTIVE;
- the_watchdog->routine = routine;
- the_watchdog->id = id;
- the_watchdog->user_data = user_data;
-}
-
-/*PAGE
- *
- * _Watchdog_Is_active
- *
- * DESCRIPTION:
- *
- * This routine returns TRUE if the watchdog timer is in the ACTIVE
- * state, and FALSE otherwise.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Watchdog_Is_active(
- Watchdog_Control *the_watchdog
-)
-{
-
- return ( the_watchdog->state == WATCHDOG_ACTIVE );
-
-}
-
-/*PAGE
- *
- * _Watchdog_Activate
- *
- * DESCRIPTION:
- *
- * This routine activates THE_WATCHDOG timer which is already
- * on a watchdog chain.
- */
-
-RTEMS_INLINE_ROUTINE void _Watchdog_Activate(
- Watchdog_Control *the_watchdog
-)
-{
-
- the_watchdog->state = WATCHDOG_ACTIVE;
-
-}
-
-/*PAGE
- *
- * _Watchdog_Deactivate
- *
- * DESCRIPTION:
- *
- * This routine deactivates THE_WATCHDOG timer which will remain
- * on a watchdog chain.
- */
-
-RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
- Watchdog_Control *the_watchdog
-)
-{
-
- the_watchdog->state = WATCHDOG_REMOVE_IT;
-
-}
-
-/*PAGE
- *
- * _Watchdog_Tickle_ticks
- *
- * DESCRIPTION:
- *
- * This routine is invoked at each clock tick to update the ticks
- * watchdog chain.
- */
-
-RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_ticks( void )
-{
-
- _Watchdog_Tickle( &_Watchdog_Ticks_chain );
-
-}
-
-/*PAGE
- *
- * _Watchdog_Tickle_seconds
- *
- * DESCRIPTION:
- *
- * This routine is invoked at each clock tick to update the seconds
- * watchdog chain.
- */
-
-RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void )
-{
-
- _Watchdog_Tickle( &_Watchdog_Seconds_chain );
-
-}
-
-/*PAGE
- *
- * _Watchdog_Insert_ticks
- *
- * DESCRIPTION:
- *
- * This routine inserts THE_WATCHDOG into the ticks watchdog chain
- * for a time of UNITS ticks. The INSERT_MODE indicates whether
- * THE_WATCHDOG is to be activated automatically or later, explicitly
- * by the caller.
- */
-
-RTEMS_INLINE_ROUTINE void _Watchdog_Insert_ticks(
- Watchdog_Control *the_watchdog,
- Watchdog_Interval units
-)
-{
-
- the_watchdog->initial = units;
-
- _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
-
-}
-
-/*PAGE
- *
- * _Watchdog_Insert_seconds
- *
- * DESCRIPTION:
- *
- * This routine inserts THE_WATCHDOG into the seconds watchdog chain
- * for a time of UNITS seconds. The INSERT_MODE indicates whether
- * THE_WATCHDOG is to be activated automatically or later, explicitly
- * by the caller.
- */
-
-RTEMS_INLINE_ROUTINE void _Watchdog_Insert_seconds(
- Watchdog_Control *the_watchdog,
- Watchdog_Interval units
-)
-{
-
- the_watchdog->initial = units;
-
- _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
-
-}
-
-/*PAGE
- *
- * _Watchdog_Adjust_seconds
- *
- * DESCRIPTION:
- *
- * This routine adjusts the seconds watchdog chain in the forward
- * or backward DIRECTION for UNITS seconds. This is invoked when the
- * current time of day is changed.
- */
-
-RTEMS_INLINE_ROUTINE void _Watchdog_Adjust_seconds(
- Watchdog_Adjust_directions direction,
- Watchdog_Interval units
-)
-{
-
- _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units );
-
-}
-
-/*PAGE
- *
- * _Watchdog_Adjust_ticks
- *
- * DESCRIPTION:
- *
- * This routine adjusts the ticks watchdog chain in the forward
- * or backward DIRECTION for UNITS ticks.
- */
-
-RTEMS_INLINE_ROUTINE void _Watchdog_Adjust_ticks(
- Watchdog_Adjust_directions direction,
- Watchdog_Interval units
-)
-{
-
- _Watchdog_Adjust( &_Watchdog_Ticks_chain, direction, units );
-
-}
-
-/*PAGE
- *
- * _Watchdog_Reset
- *
- * DESCRIPTION:
- *
- * This routine resets THE_WATCHDOG timer to its state at INSERT
- * time. This routine is valid only on interval watchdog timers
- * and is used to make an interval watchdog timer fire "every" so
- * many ticks.
- */
-
-RTEMS_INLINE_ROUTINE void _Watchdog_Reset(
- Watchdog_Control *the_watchdog
-)
-{
-
- (void) _Watchdog_Remove( the_watchdog );
-
- _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
-
-}
-
-/*PAGE
- *
- * _Watchdog_Next
- *
- * DESCRIPTION:
- *
- * This routine returns a pointer to the watchdog timer following
- * THE_WATCHDOG on the watchdog chain.
- */
-
-RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next(
- Watchdog_Control *the_watchdog
-)
-{
-
- return ( (Watchdog_Control *) the_watchdog->Node.next );
-
-}
-
-/*PAGE
- *
- * _Watchdog_Previous
- *
- * DESCRIPTION:
- *
- * This routine returns a pointer to the watchdog timer preceding
- * THE_WATCHDOG on the watchdog chain.
- */
-
-RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Previous(
- Watchdog_Control *the_watchdog
-)
-{
-
- return ( (Watchdog_Control *) the_watchdog->Node.previous );
-
-}
-
-/*PAGE
- *
- * _Watchdog_First
- *
- * DESCRIPTION:
- *
- * This routine returns a pointer to the first watchdog timer
- * on the watchdog chain HEADER.
- */
-
-RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
- Chain_Control *header
-)
-{
-
- return ( (Watchdog_Control *) header->first );
-
-}
-
-/*PAGE
- *
- * _Watchdog_Last
- *
- * DESCRIPTION:
- *
- * This routine returns a pointer to the last watchdog timer
- * on the watchdog chain HEADER.
- */
-
-RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Last(
- Chain_Control *header
-)
-{
-
- return ( (Watchdog_Control *) header->last );
-
-}
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/inline/rtems/score/wkspace.inl b/cpukit/score/inline/rtems/score/wkspace.inl
deleted file mode 100644
index 2a31514c32..0000000000
--- a/cpukit/score/inline/rtems/score/wkspace.inl
+++ /dev/null
@@ -1,56 +0,0 @@
-/* wkspace.inl
- *
- * This include file contains the bodies of the routines which contains
- * information related to the RAM Workspace.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __WORKSPACE_inl
-#define __WORKSPACE_inl
-
-/*PAGE
- *
- * _Workspace_Allocate
- *
- * DESCRIPTION:
- *
- * This routine returns the address of a block of memory of size
- * bytes. If a block of the appropriate size cannot be allocated
- * from the workspace, then NULL is returned.
- */
-
-RTEMS_INLINE_ROUTINE void *_Workspace_Allocate(
- unsigned32 size
-)
-{
- return _Heap_Allocate( &_Workspace_Area, size );
-}
-
-/*PAGE
- *
- * _Workspace_Free
- *
- * DESCRIPTION:
- *
- * This function frees the specified block of memory. If the block
- * belongs to the Workspace and can be successfully freed, then
- * TRUE is returned. Otherwise FALSE is returned.
- */
-
-RTEMS_INLINE_ROUTINE boolean _Workspace_Free(
- void *block
-)
-{
- return _Heap_Free( &_Workspace_Area, block );
-}
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/macros/Makefile.am b/cpukit/score/macros/Makefile.am
deleted file mode 100644
index f60df4f6b8..0000000000
--- a/cpukit/score/macros/Makefile.am
+++ /dev/null
@@ -1,12 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-SUBDIRS = rtems
-
-EXTRA_DIST = README
-
-include $(top_srcdir)/../../../automake/subdirs.am
-include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/score/macros/README b/cpukit/score/macros/README
deleted file mode 100644
index b2f0c4d481..0000000000
--- a/cpukit/score/macros/README
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# $Id$
-#
-
-The files in this directory are not considered the "primary" source
-of inlined routines for RTEMS. The "inline" directory contains
-the implementations of the inlined basis which are regularly
-tested. In general, an effort is made to keep the contents of
-this directory up to date but testing is only performed irregularly
-and even then it is usually with a single target processor and BSP.
-
-The primary purpose of the code in this directory is to insure
-that RTEMS can be compiled using a C compiler which does not support
-static inline routines.
-
-These were last successfully tested on 2/1/95 on a prerelease version
-of 3.2.0. The testing was done only on the Force CPU386 i386 target board.
-No testing was done on version of the code in the final release.
diff --git a/cpukit/score/macros/rtems/score/README b/cpukit/score/macros/rtems/score/README
deleted file mode 100644
index b2f0c4d481..0000000000
--- a/cpukit/score/macros/rtems/score/README
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# $Id$
-#
-
-The files in this directory are not considered the "primary" source
-of inlined routines for RTEMS. The "inline" directory contains
-the implementations of the inlined basis which are regularly
-tested. In general, an effort is made to keep the contents of
-this directory up to date but testing is only performed irregularly
-and even then it is usually with a single target processor and BSP.
-
-The primary purpose of the code in this directory is to insure
-that RTEMS can be compiled using a C compiler which does not support
-static inline routines.
-
-These were last successfully tested on 2/1/95 on a prerelease version
-of 3.2.0. The testing was done only on the Force CPU386 i386 target board.
-No testing was done on version of the code in the final release.
diff --git a/cpukit/score/macros/rtems/score/address.inl b/cpukit/score/macros/rtems/score/address.inl
deleted file mode 100644
index 379aaca6cc..0000000000
--- a/cpukit/score/macros/rtems/score/address.inl
+++ /dev/null
@@ -1,67 +0,0 @@
-/* macros/address.h
- *
- * This include file contains the bodies of the routines
- * about addresses which are inlined.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __MACROS_ADDRESSES_h
-#define __MACROS_ADDRESSES_h
-
-/*PAGE
- *
- * _Addresses_Add_offset
- *
- */
-
-#define _Addresses_Add_offset( _base, _offset ) \
- ((void *)((char *)(_base) + (_offset)))
-
-/*PAGE
- *
- * _Addresses_Subtract_offset
- *
- */
-
-#define _Addresses_Subtract_offset( _base, _offset ) \
- ((void *)((char *)(_base) - (_offset)))
-
-/*PAGE
- *
- * _Addresses_Subtract
- *
- * NOTE: The cast of an address to an unsigned32 makes this code
- * dependent on an addresses being thirty two bits.
- */
-
-#define _Addresses_Subtract( _left, _right ) \
- ((void *)(_left) - (void *)(_right))
-
-/*PAGE
- *
- * _Addresses_Is_aligned
- *
- */
-
-#define _Addresses_Is_aligned( _address ) \
- ( ( (unsigned32)(_address) % 4 ) == 0 )
-
-/*PAGE
- *
- * _Addresses_Is_in_range
- *
- */
-
-#define _Addresses_Is_in_range( _address, _base, _limit ) \
- ( (_address) >= (_base) && (_address) <= (_limit) )
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/macros/rtems/score/chain.inl b/cpukit/score/macros/rtems/score/chain.inl
deleted file mode 100644
index 0c9f998117..0000000000
--- a/cpukit/score/macros/rtems/score/chain.inl
+++ /dev/null
@@ -1,199 +0,0 @@
-/* macros/chain.h
- *
- * This include file contains the bodies of the routines which are
- * associated with doubly linked chains and inlined.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __MACROS_CHAIN_h
-#define __MACROS_CHAIN_h
-
-/*PAGE
- *
- * _Chain_Are_nodes_equal
- */
-
-#define _Chain_Are_nodes_equal( _left, _right ) \
- ( (_left) == (_right) )
-
-/*PAGE
- *
- * _Chain_Is_null
- */
-
-#define _Chain_Is_null( _the_chain ) \
- ( (_the_chain) == NULL )
-
-/*PAGE
- *
- * _Chain_Is_null_node
- */
-
-#define _Chain_Is_null_node( _the_node ) \
- ( (_the_node) == NULL )
-
-/*PAGE
- *
- * _Chain_Head
- */
-
-#define _Chain_Head( _the_chain ) \
- ((Chain_Node *) (_the_chain))
-
-/*PAGE
- *
- * _Chain_Tail
- */
-
-#define _Chain_Tail( _the_chain ) \
- ((Chain_Node *) &(_the_chain)->permanent_null)
-
-/*PAGE
- *
- * _Chain_Is_empty
- */
-
-#define _Chain_Is_empty( _the_chain ) \
- ( (_the_chain)->first == _Chain_Tail( (_the_chain) ) )
-
-/*PAGE
- *
- * _Chain_Is_first
- */
-
-#define _Chain_Is_first( _the_node ) \
- ( (the_node)->previous == NULL )
-
-/*PAGE
- *
- * _Chain_Is_last
- */
-
-#define _Chain_Is_last( _the_node ) \
- ( (_the_node)->next == NULL )
-
-/*PAGE
- *
- * _Chain_Has_only_one_node
- */
-
-#define _Chain_Has_only_one_node( _the_chain ) \
- ( (_the_chain)->first == (_the_chain)->last )
-
-/*PAGE
- *
- * _Chain_Is_head
- */
-
-#define _Chain_Is_head( _the_chain, _the_node ) \
- ( (_the_node) == _Chain_Head( (_the_chain) ) )
-
-/*PAGE
- *
- * _Chain_Is_tail
- */
-
-#define _Chain_Is_tail( _the_chain, _the_node ) \
- ( (_the_node) == _Chain_Tail( (_the_chain) ) )
-
-/*PAGE
- *
- * Chain_Initialize_empty
- */
-
-#define _Chain_Initialize_empty( _the_chain ) \
-{ \
- (_the_chain)->first = _Chain_Tail( (_the_chain) ); \
- (_the_chain)->permanent_null = NULL; \
- (_the_chain)->last = _Chain_Head( (_the_chain) ); \
-}
-
-/*PAGE
- *
- * _Chain_Extract_unprotected
- */
-
-#define _Chain_Extract_unprotected( _the_node ) \
-{ \
- Chain_Node *_next; \
- Chain_Node *_previous; \
- \
- _next = (_the_node)->next; \
- _previous = (_the_node)->previous; \
- _next->previous = _previous; \
- _previous->next = _next; \
-}
-
-/*PAGE
- *
- * _Chain_Get_unprotected
- */
-
-/*PAGE
- *
- * Chain_Get_unprotected
- */
-
-#define _Chain_Get_unprotected( _the_chain ) \
- (( !_Chain_Is_empty( (_the_chain) ) ) \
- ? _Chain_Get_first_unprotected( (_the_chain) ) \
- : NULL)
-
-/*PAGE
- *
- * _Chain_Insert_unprotected
- */
-
-#define _Chain_Insert_unprotected( _after_node, _the_node ) \
-do { \
- Chain_Node *_before_node; \
- \
- (_the_node)->previous = (_after_node); \
- _before_node = (_after_node)->next; \
- (_after_node)->next = (_the_node); \
- (_the_node)->next = _before_node; \
- _before_node->previous = (_the_node); \
-} while (0)
-
-/*PAGE
- *
- * _Chain_Append_unprotected
- */
-
-#define _Chain_Append_unprotected( _the_chain, _the_node ) \
-{ \
- Chain_Node *_old_last_node; \
- \
- (_the_node)->next = _Chain_Tail( (_the_chain) ); \
- _old_last_node = (_the_chain)->last; \
- (_the_chain)->last = (_the_node); \
- _old_last_node->next = (_the_node); \
- (_the_node)->previous = _old_last_node; \
-}
-
-/*PAGE
- *
- * _Chain_Prepend_unprotected
- */
-
-#define _Chain_Prepend_unprotected( _the_chain, _the_node ) \
- _Chain_Insert_unprotected( _Chain_Head( (_the_chain) ), (_the_node) )
-
-/*PAGE
- *
- * _Chain_Prepend
- */
-
-#define _Chain_Prepend( _the_chain, _the_node ) \
- _Chain_Insert( _Chain_Head( (_the_chain) ), (_the_node) )
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/macros/rtems/score/coremsg.inl b/cpukit/score/macros/rtems/score/coremsg.inl
deleted file mode 100644
index 0717b3eea3..0000000000
--- a/cpukit/score/macros/rtems/score/coremsg.inl
+++ /dev/null
@@ -1,144 +0,0 @@
-/* coremsg.inl
- *
- * This include file contains the macro implementation of all
- * inlined routines in the Core Message Handler.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __CORE_MESSAGE_QUEUE_inl
-#define __CORE_MESSAGE_QUEUE_inl
-
-/*PAGE
- *
- * _CORE_message_queue_Send
- *
- */
-
-#define _CORE_message_queue_Send( _the_message_queue, _buffer, _size, \
- _id, _api_message_queue_mp_support, _wait, _timeout ) \
- _CORE_message_queue_Submit( (_the_message_queue), (_buffer), (_size), \
- (_id), (_api_message_queue_mp_support), \
- CORE_MESSAGE_QUEUE_SEND_REQUEST, (_wait), (_timeout)
-
-/*PAGE
- *
- * _CORE_message_queue_Urgent
- *
- */
-
-#define _CORE_message_queue_Urgent( _the_message_queue, _buffer, _size, \
- _id, _api_message_queue_mp_support, _wait, _timeout ) \
- _CORE_message_queue_Submit( (_the_message_queue), (_buffer), (_size), \
- (_id), (_api_message_queue_mp_support), \
- CORE_MESSAGE_QUEUE_URGENT_REQUEST, (_wait), (_timeout)
-
-/*PAGE
- *
- * _CORE_message_queue_Copy_buffer
- */
-
-#define _CORE_message_queue_Copy_buffer( _source, _destination, _size ) \
- memcpy( _destination, _source, _size)
-
-/*PAGE
- *
- * _CORE_message_queue_Allocate_message_buffer
- *
- */
-
-#define _CORE_message_queue_Allocate_message_buffer( _the_message_queue ) \
- (CORE_message_queue_Buffer_control *) \
- _Chain_Get( &(_the_message_queue)->Inactive_messages )
-
-/*PAGE
- *
- * _CORE_message_queue_Free_message_buffer
- *
- */
-
-#define _CORE_message_queue_Free_message_buffer( _the_message_queue, _the_message ) \
- _Chain_Append( \
- &(_the_message_queue)->Inactive_messages, \
- &(_the_message)->Node \
- )
-
-/*PAGE
- *
- * _CORE_message_queue_Is_priority
- *
- */
-
-#define _CORE_message_queue_Is_priority( _the_attribute ) \
- ((_the_attribute)->discipline == CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY)
-
-/*PAGE
- *
- * _CORE_message_queue_Get_pending_message
- *
- */
-
-#define _CORE_message_queue_Get_pending_message( _the_message_queue ) \
- (CORE_message_queue_Buffer_control *) \
- _Chain_Get_unprotected( &(_the_message_queue)->Pending_messages )
-
-/*PAGE
- *
- * _CORE_message_queue_Append
- *
- */
-
-#define _CORE_message_queue_Append( _the_message_queue, _the_message ) \
- _Chain_Append( &(_the_message_queue)->Pending_messages, \
- &(_the_message)->Node )
-
-/*PAGE
- *
- * _CORE_message_queue_Prepend
- *
- */
-
-#define _CORE_message_queue_Prepend( _the_message_queue, _the_message ) \
- _Chain_Prepend( &(_the_message_queue)->Pending_messages, \
- &(_the_message)->Node )
-
-/*PAGE
- *
- * _CORE_message_queue_Is_null
- *
- */
-
-#define _CORE_message_queue_Is_null( _the_message_queue ) \
- ( (_the_message_queue) == NULL )
-
-/*PAGE
- *
- * _CORE_message_queue_Is_notify_enabled
- *
- */
-
-#define _CORE_message_queue_Is_notify_enabled( _the_message_queue ) \
- ( (_the_message_queue)->notify_handler != NULL )
-
-/*PAGE
- *
- * _CORE_message_queue_Set_notify
- *
- */
-
-#define _CORE_message_queue_Set_notify( \
- _the_message_queue, _the_handler, _the_argument ) \
- do { \
- (_the_message_queue)->notify_handler = (_the_handler); \
- (_the_message_queue)->notify_argument = (_the_argument); \
- } while ( 0 )
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/macros/rtems/score/coremutex.inl b/cpukit/score/macros/rtems/score/coremutex.inl
deleted file mode 100644
index be6f483dae..0000000000
--- a/cpukit/score/macros/rtems/score/coremutex.inl
+++ /dev/null
@@ -1,67 +0,0 @@
-/* macros/coremutex.h
- *
- * This include file contains all of the inlined routines associated
- * with core mutexes.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __MACROS_CORE_MUTEX_h
-#define __MACROS_CORE_MUTEX_h
-
-
-/*PAGE
- *
- * _CORE_mutex_Is_locked
- *
- */
-
-#define _CORE_mutex_Is_locked( _the_mutex ) \
- ( (_the_mutex)->lock == CORE_MUTEX_LOCKED )
-
-/*PAGE
- *
- * _CORE_mutex_Is_fifo
- *
- */
-
-#define _CORE_mutex_Is_fifo( _the_attribute ) \
- ( (_the_attribute)->discipline == CORE_MUTEX_DISCIPLINES_FIFO )
-
-/*PAGE
- *
- * _CORE_mutex_Is_priority
- *
- */
-
-#define _CORE_mutex_Is_priority( _the_attribute ) \
- ( (_the_attribute)->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY )
-
-/*PAGE
- *
- * _CORE_mutex_Is_inherit_priority
- *
- */
-
-#define _CORE_mutex_Is_inherit_priority( _the_attribute ) \
- ( (_the_attribute)->discipline == \
- CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT )
-
-/*PAGE
- *
- * _CORE_mutex_Is_priority_ceiling
- *
- */
-
-#define _CORE_mutex_Is_priority_ceiling( _the_attribute )\
- ( (_the_attribute)->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING )
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/macros/rtems/score/coresem.inl b/cpukit/score/macros/rtems/score/coresem.inl
deleted file mode 100644
index 904b004cc6..0000000000
--- a/cpukit/score/macros/rtems/score/coresem.inl
+++ /dev/null
@@ -1,39 +0,0 @@
-/* macros/coresem.h
- *
- * This include file contains all of the inlined routines associated
- * with core semaphores.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __MACROS_CORE_SEMAPHORE_h
-#define __MACROS_CORE_SEMAPHORE_h
-
-/*PAGE
- *
- * _CORE_semaphore_Is_priority
- *
- */
-
-#define _CORE_semaphore_Is_priority( _the_attribute ) \
- ( (_the_attribute)->discipline == CORE_SEMAPHORE_DISCIPLINES_PRIORITY )
-
-/*PAGE
- *
- * _Core_semaphore_Get_count
- *
- */
-
-#define _Core_semaphore_Get_count( _the_semaphore ) \
- ( (_the_semaphore)->count )
-
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/macros/rtems/score/heap.inl b/cpukit/score/macros/rtems/score/heap.inl
deleted file mode 100644
index 6c2016be8d..0000000000
--- a/cpukit/score/macros/rtems/score/heap.inl
+++ /dev/null
@@ -1,149 +0,0 @@
-/* heap.inl
- *
- * This file contains the macro implementation of the inlined
- * routines from the heap handler.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __HEAP_inl
-#define __HEAP_inl
-
-#include <rtems/score/address.h>
-
-/*PAGE
- *
- * _Heap_Head
- */
-
-#define _Heap_Head( _the_heap ) \
- ((Heap_Block *)&(_the_heap)->start)
-
-/*PAGE
- *
- * _Heap_Tail
- */
-
-#define _Heap_Tail( _the_heap ) \
- ((Heap_Block *)&(_the_heap)->final)
-
-/*PAGE
- *
- * _Heap_Previous_block
- */
-
-#define _Heap_Previous_block( _the_block ) \
- ( (Heap_Block *) _Addresses_Subtract_offset( \
- (void *)(_the_block), \
- (_the_block)->back_flag & ~ HEAP_BLOCK_USED \
- ) \
- )
-
-/*PAGE
- *
- * _Heap_Next_block
- */
-
-#define _Heap_Next_block( _the_block ) \
- ( (Heap_Block *) _Addresses_Add_offset( \
- (void *)(_the_block), \
- (_the_block)->front_flag & ~ HEAP_BLOCK_USED \
- ) \
- )
-
-/*PAGE
- *
- * _Heap_Block_at
- */
-
-#define _Heap_Block_at( _base, _offset ) \
- ( (Heap_Block *) \
- _Addresses_Add_offset( (void *)(_base), (_offset) ) )
-
-/*PAGE
- *
- * _Heap_User_block_at
- *
- */
-
-#define _Heap_User_block_at( _base ) \
- _Heap_Block_at( \
- (_base), \
- -*(((unsigned32 *) (_base)) - 1) + -HEAP_BLOCK_USED_OVERHEAD \
- )
-
-/*PAGE
- *
- * _Heap_Is_previous_block_free
- */
-
-#define _Heap_Is_previous_block_free( _the_block ) \
- ( !((_the_block)->back_flag & HEAP_BLOCK_USED) )
-
-/*PAGE
- *
- * _Heap_Is_block_free
- */
-
-#define _Heap_Is_block_free( _the_block ) \
- ( !((_the_block)->front_flag & HEAP_BLOCK_USED) )
-
-/*PAGE
- *
- * _Heap_Is_block_used
- */
-
-#define _Heap_Is_block_used( _the_block ) \
- ((_the_block)->front_flag & HEAP_BLOCK_USED)
-
-/*PAGE
- *
- * _Heap_Block_size
- */
-
-#define _Heap_Block_size( _the_block ) \
- ((_the_block)->front_flag & ~HEAP_BLOCK_USED)
-
-/*PAGE
- *
- * _Heap_Start_of_user_area
- */
-
-#define _Heap_Start_of_user_area( _the_block ) \
- ((void *) &(_the_block)->next)
-
-/*PAGE
- *
- * _Heap_Is_block_in
- */
-
-#define _Heap_Is_block_in( _the_heap, _the_block ) \
- ( ((_the_block) >= (_the_heap)->start) && \
- ((_the_block) <= (_the_heap)->final) )
-
-/*PAGE
- *
- * _Heap_Is_page_size_valid
- */
-
-#define _Heap_Is_page_size_valid( _page_size ) \
- ( ((_page_size) != 0) && \
- (((_page_size) % CPU_HEAP_ALIGNMENT) == 0) )
-
-/*PAGE
- *
- * _Heap_Build_flag
- */
-
-#define _Heap_Build_flag( _size, _in_use_flag ) \
- ( (_size) | (_in_use_flag))
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/macros/rtems/score/isr.inl b/cpukit/score/macros/rtems/score/isr.inl
deleted file mode 100644
index b4c5eea4a1..0000000000
--- a/cpukit/score/macros/rtems/score/isr.inl
+++ /dev/null
@@ -1,47 +0,0 @@
-/* isr.inl
- *
- * This include file contains the macro implementation of all
- * inlined routines in the Interrupt Handler.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __ISR_inl
-#define __ISR_inl
-
-/*PAGE
- *
- * _ISR_Is_in_progress
- *
- */
-
-#define _ISR_Is_in_progress() \
- (_ISR_Nest_level != 0)
-
-/*PAGE
- *
- * _ISR_Is_vector_number_valid
- *
- */
-
-#define _ISR_Is_vector_number_valid( _vector ) \
- ( (_vector) <= CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER )
-
-/*PAGE
- *
- * _ISR_Is_valid_user_handler
- *
- */
-
-#define _ISR_Is_valid_user_handler( _handler ) \
- ((_handler) != NULL)
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/macros/rtems/score/mppkt.inl b/cpukit/score/macros/rtems/score/mppkt.inl
deleted file mode 100644
index ca88f64907..0000000000
--- a/cpukit/score/macros/rtems/score/mppkt.inl
+++ /dev/null
@@ -1,40 +0,0 @@
-/* macros/mppkt.h
- *
- * This package is the implementation of the Packet Handler
- * routines which are inlined.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __MACROS_MP_PACKET_h
-#define __MACROS_MP_PACKET_h
-
-/*PAGE
- *
- * _Mp_packet_Is_valid_packet_class
- *
- * NOTE: Check for lower bounds (MP_PACKET_CLASSES_FIRST ) is unnecessary
- * because this enum starts at lower bound of zero.
- */
-
-#define _Mp_packet_Is_valid_packet_class( _the_packet_class ) \
- ( (_the_packet_class) <= MP_PACKET_CLASSES_LAST )
-
-/*PAGE
- *
- * _Mp_packet_Is_null
- *
- */
-
-#define _Mp_packet_Is_null ( _the_packet ) \
- ( (_the_packet) == NULL )
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/macros/rtems/score/object.inl b/cpukit/score/macros/rtems/score/object.inl
deleted file mode 100644
index d303535489..0000000000
--- a/cpukit/score/macros/rtems/score/object.inl
+++ /dev/null
@@ -1,165 +0,0 @@
-/* object.inl
- *
- * This include file contains the macro implementation of all
- * of the inlined routines in the Object Handler.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __OBJECTS_inl
-#define __OBJECTS_inl
-
-/*PAGE
- *
- * _Objects_Build_id
- *
- */
-
-#define _Objects_Build_id( _the_class, _node, _index ) \
- ( ((_the_class) << OBJECTS_CLASS_START_BIT) | \
- ((_node) << OBJECTS_NODE_START_BIT) | \
- ((_index) << OBJECTS_INDEX_START_BIT) )
-
-/*PAGE
- *
- * _Objects_Get_class
- */
-
-#define _Objects_Get_class( _id ) \
- (Objects_Classes) \
- (((_id) >> OBJECTS_CLASS_START_BIT) & OBJECTS_CLASS_VALID_BITS)
-
-/*PAGE
- *
- * _Objects_Get_node
- *
- */
-
-#define _Objects_Get_node( _id ) \
- (((_id) >> OBJECTS_NODE_START_BIT) & OBJECTS_NODE_VALID_BITS)
-
-/*PAGE
- *
- * _Objects_Get_index
- *
- */
-
-#define _Objects_Get_index( _id ) \
- (((_id) >> OBJECTS_INDEX_START_BIT) & OBJECTS_INDEX_VALID_BITS)
-
-/*PAGE
- *
- * _Objects_Is_class_valid
- *
- */
-
-#define _Objects_Is_class_valid( _the_class ) \
- ( (_the_class) && (_the_class) <= OBJECTS_CLASSES_LAST )
-
-/*PAGE
- *
- * _Objects_Is_local_node
- *
- */
-
-#define _Objects_Is_local_node( _node ) \
- ( (_node) == _Objects_Local_node )
-
-/*PAGE
- *
- * _Objects_Is_local_id
- *
- */
-
-#define _Objects_Is_local_id( _id ) \
- _Objects_Is_local_node( _Objects_Get_node(_id) )
-
-/*PAGE
- *
- * _Objects_Are_ids_equal
- *
- */
-
-#define _Objects_Are_ids_equal( _left, _right ) \
- ( (_left) == (_right) )
-
-/*PAGE
- *
- * _Objects_Get_local_object
- *
- */
-
-#define _Objects_Get_local_object( information, index ) \
- ( ( index > information->maximum) ? NULL : \
- information->local_table[ index ] )
-
-/*PAGE
- *
- * _Objects_Set_local_object
- *
- */
-
-#define _Objects_Set_local_object( information, index, the_object ) \
- { \
- if ( index <= information->maximum) \
- information->local_table[ index ] = the_object; \
- }
-
-
-/*PAGE
- *
- * _Objects_Get_information
- *
- */
-
-#define _Objects_Get_information( id ) \
- ( \
- ( !_Objects_Is_class_valid( _Objects_Get_class( id ) ) ) ? \
- NULL : \
- _Objects_Information_table[ _Objects_Get_class( id ) ] \
- )
-
-/*PAGE
- *
- * _Objects_Open
- *
- */
-
-#define _Objects_Open( _information, _the_object, _name ) \
- { \
- unsigned32 _index; \
- \
- _index = _Objects_Get_index( (_the_object)->id ); \
- (_information)->local_table[ _index ] = (_the_object); \
- \
- if ( (_information)->is_string ) \
- _Objects_Copy_name_string( (_name), (_the_object)->name ); \
- else \
- _Objects_Copy_name_raw( \
- (_name), (_the_object)->name, (_information)->name_length ); \
- }
-
-/*PAGE
- *
- * _Objects_Close
- *
- */
-
-#define _Objects_Close( _information, _the_object ) \
- { \
- unsigned32 _index; \
- \
- _index = _Objects_Get_index( (_the_object)->id ); \
- (_information)->local_table[ _index ] = (Objects_Control *) NULL; \
- _Objects_Clear_name( (_the_object)->name, (_information)->name_length ); \
- }
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/macros/rtems/score/objectmp.inl b/cpukit/score/macros/rtems/score/objectmp.inl
deleted file mode 100644
index ce5550018d..0000000000
--- a/cpukit/score/macros/rtems/score/objectmp.inl
+++ /dev/null
@@ -1,49 +0,0 @@
-/* macros/objectmp.inl
- *
- * This include file contains the bodies of all inlined routines
- * which deal with global objects.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __MACROS_MP_OBJECTS_inl
-#define __MACROS_MP_OBJECTS_inl
-
-/*PAGE
- *
- * _Objects_MP_Allocate_global_object
- *
- */
-
-#define _Objects_MP_Allocate_global_object() \
- (Objects_MP_Control *) \
- _Chain_Get( &_Objects_MP_Inactive_global_objects )
-
-/*PAGE
- * _Objects_MP_Free_global_object
- *
- */
-
-#define _Objects_MP_Free_global_object( _the_object ) \
- _Chain_Append( \
- &_Objects_MP_Inactive_global_objects, \
- &(_the_object)->Object.Node \
- )
-
-/*PAGE
- * _Objects_MP_Is_null_global_object
- *
- */
-
-#define _Objects_MP_Is_null_global_object( _the_object ) \
- ( (_the_object) == NULL )
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/macros/rtems/score/priority.inl b/cpukit/score/macros/rtems/score/priority.inl
deleted file mode 100644
index f8598abb5c..0000000000
--- a/cpukit/score/macros/rtems/score/priority.inl
+++ /dev/null
@@ -1,169 +0,0 @@
-/* priority.inl
- *
- * This file contains the macro implementation of all inlined routines
- * in the Priority Handler.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __PRIORITY_inl
-#define __PRIORITY_inl
-
-#include <rtems/score/bitfield.h>
-
-/*PAGE
- *
- * _Priority_Handler_initialization
- *
- */
-
-#define _Priority_Handler_initialization() \
- { \
- unsigned32 index; \
- \
- _Priority_Major_bit_map = 0; \
- for ( index=0 ; index <16 ; index++ ) \
- _Priority_Bit_map[ index ] = 0; \
- }
-
-/*PAGE
- *
- * _Priority_Is_valid
- *
- */
-
- /*
- * Since PRIORITY_MINIMUM is 0 and priorities are stored unsigned,
- * then checking for less than 0 is unnecessary.
- */
-
-#define _Priority_Is_valid( _the_priority ) \
- ( (_the_priority) <= PRIORITY_MAXIMUM )
-
-/*PAGE
- *
- * _Priority_Major
- *
- */
-
-#define _Priority_Major( _the_priority ) ( (_the_priority) / 16 )
-
-/*PAGE
- *
- * _Priority_Minor
- *
- */
-
-#define _Priority_Minor( _the_priority ) ( (_the_priority) % 16 )
-
-#if ( CPU_USE_GENERIC_BITFIELD_CODE == TRUE )
-
-/*PAGE
- *
- * _Priority_Mask
- *
- */
-
-#define _Priority_Mask( _bit_number ) \
- (0x8000 >> _bit_number)
-
-/*PAGE
- *
- * _Priority_Bits_index
- *
- */
-
-#define _Priority_Bits_index( _bit_number ) \
- (_bit_number)
-
-#endif
-
-/*PAGE
- *
- * _Priority_Add_to_bit_map
- *
- */
-
-#define _Priority_Add_to_bit_map( _the_priority_map ) \
- { \
- *(_the_priority_map)->minor |= (_the_priority_map)->ready_minor; \
- _Priority_Major_bit_map |= (_the_priority_map)->ready_major; \
- }
-
-/*PAGE
- *
- * _Priority_Remove_from_bit_map
- *
- */
-
-#define _Priority_Remove_from_bit_map( _the_priority_map ) \
- { \
- *(_the_priority_map)->minor &= (_the_priority_map)->block_minor; \
- if ( *(_the_priority_map)->minor == 0 ) \
- _Priority_Major_bit_map &= (_the_priority_map)->block_major; \
- }
-
-/*PAGE
- *
- * _Priority_Get_highest
- *
- */
-
-#define _Priority_Get_highest( _high_priority ) \
- { \
- Priority_Bit_map_control minor; \
- Priority_Bit_map_control major; \
- \
- _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); \
- _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); \
- \
- (_high_priority) = (_Priority_Bits_index( major ) * 16) + \
- _Priority_Bits_index( minor ); \
- }
-
-/*PAGE
- *
- * _Priority_Initialize_information
- *
- */
-
-#define _Priority_Initialize_information( \
- _the_priority_map, _new_priority ) \
- { \
- Priority_Bit_map_control _major; \
- Priority_Bit_map_control _minor; \
- Priority_Bit_map_control _mask; \
- \
- _major = _Priority_Major( (_new_priority) ); \
- _minor = _Priority_Minor( (_new_priority) ); \
- \
- (_the_priority_map)->minor = \
- &_Priority_Bit_map[ _Priority_Bits_index(_major) ]; \
- \
- _mask = _Priority_Mask( _major ); \
- (_the_priority_map)->ready_major = _mask; \
- (_the_priority_map)->block_major = ~_mask; \
- \
- _mask = _Priority_Mask( _minor ); \
- (_the_priority_map)->ready_minor = _mask; \
- (_the_priority_map)->block_minor = ~_mask; \
- }
-
-/*PAGE
- *
- * _Priority_Is_group_empty
- *
- */
-
-#define _Priority_Is_group_empty ( _the_priority ) \
- ( (_the_priority) == 0 )
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/macros/rtems/score/stack.inl b/cpukit/score/macros/rtems/score/stack.inl
deleted file mode 100644
index fc0c94a980..0000000000
--- a/cpukit/score/macros/rtems/score/stack.inl
+++ /dev/null
@@ -1,49 +0,0 @@
-/* stack.inl
- *
- * This file contains the macro implementation of the inlined
- * routines from the Stack Handler.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __STACK_inl
-#define __STACK_inl
-
-/*PAGE
- *
- * _Stack_Initialize
- *
- */
-
-#define _Stack_Initialize( _the_stack, _starting_address, _size ) \
- { \
- (_the_stack)->area = (_starting_address); \
- (_the_stack)->size = (_size); \
- }
-
-/*PAGE
- *
- * _Stack_Is_enough
- *
- */
-
-#define _Stack_Is_enough( _size ) \
- ( (_size) >= STACK_MINIMUM_SIZE )
-
-/*PAGE
- *
- * _Stack_Adjust_size
- */
-
-#define _Stack_Adjust_size( _size ) \
- ((_size) + CPU_STACK_ALIGNMENT)
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/macros/rtems/score/states.inl b/cpukit/score/macros/rtems/score/states.inl
deleted file mode 100644
index 05a816f18d..0000000000
--- a/cpukit/score/macros/rtems/score/states.inl
+++ /dev/null
@@ -1,209 +0,0 @@
-/* states.inl
- *
- * This file contains the macro implementation of the inlined
- * routines associated with thread state information.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __STATES_inl
-#define __STATES_inl
-
-/*PAGE
- *
- * _States_Set
- *
- */
-
-#define _States_Set( _states_to_set, _current_state ) \
- ((_current_state) | (_states_to_set))
-
-/*PAGE
- *
- * _States_Clear
- *
- */
-
-#define _States_Clear( _states_to_clear, _current_state ) \
- ((_current_state) & ~(_states_to_clear))
-
-/*PAGE
- *
- * _States_Is_ready
- *
- */
-
-#define _States_Is_ready( _the_states ) \
- ( (_the_states) == STATES_READY )
-
-/*PAGE
- *
- * _States_Is_only_dormant
- *
- */
-
-#define _States_Is_only_dormant( _the_states ) \
- ( (_the_states) == STATES_DORMANT )
-
-/*PAGE
- *
- * _States_Is_dormant
- *
- */
-
-#define _States_Is_dormant( _the_states ) \
- ( (_the_states) & STATES_DORMANT )
-
-/*PAGE
- *
- * _States_Is_suspended
- *
- */
-
-#define _States_Is_suspended( _the_states ) \
- ( (_the_states) & STATES_SUSPENDED )
-
-/*PAGE
- *
- * _States_Is_Transient
- *
- */
-
-#define _States_Is_transient( _the_states ) \
- ( (_the_states) & STATES_TRANSIENT )
-
-/*PAGE
- *
- * _States_Is_delaying
- *
- */
-
-#define _States_Is_delaying( _the_states ) \
- ( (_the_states) & STATES_DELAYING )
-
-/*PAGE
- *
- * _States_Is_waiting_for_buffer
- *
- */
-
-#define _States_Is_waiting_for_buffer( _the_states ) \
- ( (_the_states) & STATES_WAITING_FOR_BUFFER )
-
-/*PAGE
- *
- * _States_Is_waiting_for_segment
- *
- */
-
-#define _States_Is_waiting_for_segment( _the_states ) \
- ( (_the_states) & STATES_WAITING_FOR_SEGMENT )
-
-/*PAGE
- *
- * _States_Is_waiting_for_message
- *
- */
-
-#define _States_Is_waiting_for_message( _the_states ) \
- ( (_the_states) & STATES_WAITING_FOR_MESSAGE )
-
-/*PAGE
- *
- * _States_Is_waiting_for_event
- *
- */
-
-#define _States_Is_waiting_for_event( _the_states ) \
- ( (_the_states) & STATES_WAITING_FOR_EVENT )
-
-/*PAGE
- *
- * _States_Is_waiting_for_mutex
- *
- */
-
-#define _States_Is_waiting_for_mutex( _the_states ) \
- ( (_the_states) & STATES_WAITING_FOR_MUTEX )
-
-/*PAGE
- *
- * _States_Is_waiting_for_semaphore
- *
- */
-
-#define _States_Is_waiting_for_semaphore( _the_states ) \
- ( (_the_states) & STATES_WAITING_FOR_SEMAPHORE )
-
-/*PAGE
- *
- * _States_Is_waiting_for_time
- *
- */
-
-#define _States_Is_waiting_for_time( _the_states ) \
- ( (_the_states) & STATES_WAITING_FOR_TIME )
-
-/*PAGE
- *
- * _States_Is_waiting_for_rpc_reply
- *
- */
-
-#define _States_Is_waiting_for_rpc_reply( _the_states ) \
- ( (_the_states) & STATES_WAITING_FOR_RPC_REPLY )
-
-/*PAGE
- *
- * _States_Is_waiting_for_period
- *
- */
-
-#define _States_Is_waiting_for_period( _the_states ) \
- ( (_the_states) & STATES_WAITING_FOR_PERIOD )
-
-/*PAGE
- *
- * _States_Is_locally_blocked
- *
- */
-
-#define _States_Is_locally_blocked( _the_states ) \
- ( (_the_states) & STATES_LOCALLY_BLOCKED )
-
-/*PAGE
- *
- * _States_Is_waiting_on_thread_queue
- *
- */
-
-#define _States_Is_waiting_on_thread_queue( _the_states ) \
- ( (_the_states) & STATES_WAITING_ON_THREAD_QUEUE )
-
-/*PAGE
- *
- * _States_Is_blocked
- *
- */
-
-#define _States_Is_blocked( _the_states ) \
- ( (_the_states) & STATES_BLOCKED )
-
-/*PAGE
- *
- * _States_Are_set
- *
- */
-
-#define _States_Are_set( _the_states, _mask ) \
- ( ((_the_states) & (_mask)) != STATES_READY )
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/macros/rtems/score/sysstate.inl b/cpukit/score/macros/rtems/score/sysstate.inl
deleted file mode 100644
index ac4197e8c6..0000000000
--- a/cpukit/score/macros/rtems/score/sysstate.inl
+++ /dev/null
@@ -1,89 +0,0 @@
-/* sysstates.inl
- *
- * This file contains the macro implementation of routines regarding the
- * system state.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __SYSTEM_STATE_inl
-#define __SYSTEM_STATE_inl
-
-/*PAGE
- *
- * _System_state_Handler_initialization
- */
-
-#define _System_state_Handler_initialization( _is_multiprocessing ) \
- do { \
- _System_state_Current = SYSTEM_STATE_BEFORE_INITIALIZATION; \
- _System_state_Is_multiprocessing = (_is_multiprocessing); \
- } while ( 0 )
-
-/*PAGE
- *
- * _System_state_Set
- */
-
-#define _System_state_Set( _state ) \
- do { \
- _System_state_Current = (_state); \
- } while ( 0 )
-
-/*PAGE
- *
- * _System_state_Get
- */
-
-#define _System_state_Get() \
- (_System_state_Current)
-
-/*PAGE
- *
- * _System_state_Is_before_initialization
- */
-
-#define _System_state_Is_before_initialization( _state ) \
- ((_state) == SYSTEM_STATE_BEFORE_INITIALIZATION)
-
-/*PAGE
- *
- * _System_state_Is_before_multitasking
- */
-
-#define _System_state_Is_before_multitasking( _state ) \
- ((_state) == SYSTEM_STATE_BEFORE_MULTITASKING)
-
-/*PAGE
- *
- * _System_state_Is_begin_multitasking
- */
-
-#define _System_state_Is_begin_multitasking( _state ) \
- ((_state) == SYSTEM_STATE_BEGIN_MULTITASKING)
-
-/*PAGE
- *
- * _System_state_Is_up
- */
-
-#define _System_state_Is_up( _state ) \
- ((_state) == SYSTEM_STATE_UP)
-
-/*PAGE
- *
- * _System_state_Is_failed
- */
-
-#define _System_state_Is_failed( _state ) \
- ((_state) == SYSTEM_STATE_FAILED)
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/macros/rtems/score/thread.inl b/cpukit/score/macros/rtems/score/thread.inl
deleted file mode 100644
index 26671093b6..0000000000
--- a/cpukit/score/macros/rtems/score/thread.inl
+++ /dev/null
@@ -1,207 +0,0 @@
-/* thread.inl
- *
- * This file contains the macro implementation of the inlined
- * routines from the Thread handler.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __THREAD_inl
-#define __THREAD_inl
-
-/*PAGE
- *
- * _Thread_Stop_multitasking
- *
- */
-
-#define _Thread_Stop_multitasking() \
- _Context_Switch( &_Thread_Executing->Registers, &_Thread_BSP_context );
-
-/*PAGE
- *
- * _Thread_Is_executing
- *
- */
-
-#define _Thread_Is_executing( _the_thread ) \
- ( (_the_thread) == _Thread_Executing )
-
-/*PAGE
- *
- * _Thread_Is_heir
- *
- */
-
-#define _Thread_Is_heir( _the_thread ) \
- ( (_the_thread) == _Thread_Heir )
-
-/*PAGE
- *
- * _Thread_Is_executing_also_the_heir
- *
- */
-
-#define _Thread_Is_executing_also_the_heir() \
- ( _Thread_Executing == _Thread_Heir )
-
-/*PAGE
- *
- * _Thread_Unblock
- *
- */
-
-#define _Thread_Unblock( _the_thread ) \
- _Thread_Clear_state( (_the_thread), STATES_BLOCKED );
-
-/*PAGE
- *
- * _Thread_Restart_self
- *
- */
-
-#define _Thread_Restart_self() \
- { \
- if ( _Thread_Executing->fp_context != NULL ) \
- _Context_Restore_fp( &_Thread_Executing->fp_context ); \
- \
- _CPU_Context_Restart_self( &_Thread_Executing->Registers ); \
- }
-
-/*PAGE
- *
- * _Thread_Calculate_heir
- *
- */
-
-#define _Thread_Calculate_heir() \
- { \
- Priority_Control highest; \
- \
- _Priority_Get_highest( highest ); \
- \
- _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ highest ].first; \
- }
-
-/*PAGE
- *
- * _Thread_Is_allocated_fp
- *
- */
-
-#define _Thread_Is_allocated_fp( _the_thread ) \
- ( (_the_thread) == _Thread_Allocated_fp )
-
-/*PAGE
- *
- * _Thread_Deallocate_fp
- *
- */
-
-#define _Thread_Deallocate_fp() \
- _Thread_Allocated_fp = NULL
-
-/*PAGE
- *
- * _Thread_Disable_dispatch
- *
- */
-
-#define _Thread_Disable_dispatch() \
- _Thread_Dispatch_disable_level += 1
-
-/*PAGE
- *
- * _Thread_Enable_dispatch
- *
- */
-
-#if ( CPU_INLINE_ENABLE_DISPATCH == TRUE )
-#define _Thread_Enable_dispatch() \
- { if ( (--_Thread_Dispatch_disable_level) == 0 ) \
- _Thread_Dispatch(); \
- }
-#endif
-
-#if ( CPU_INLINE_ENABLE_DISPATCH == FALSE )
-void _Thread_Enable_dispatch( void );
-#endif
-
-/*PAGE
- *
- * _Thread_Unnest_dispatch
- *
- */
-
-#define _Thread_Unnest_dispatch() \
- _Thread_Dispatch_disable_level -= 1
-
-/*PAGE
- *
- * _Thread_Is_dispatching_enabled
- *
- */
-
-#define _Thread_Is_dispatching_enabled() \
- ( _Thread_Dispatch_disable_level == 0 )
-
-/*PAGE
- *
- * _Thread_Is_context_switch_necessary
- *
- */
-
-#define _Thread_Is_context_switch_necessary() \
- ( _Context_Switch_necessary == TRUE )
-
-/*PAGE
- *
- * _Thread_Dispatch_initialization
- *
- */
-
-#define _Thread_Dispatch_initialization() \
- _Thread_Dispatch_disable_level = 1
-
-/*PAGE
- *
- * _Thread_Is_null
- *
- */
-
-#define _Thread_Is_null( _the_thread ) \
- ( (_the_thread) == NULL )
-
-/*
- * _Thread_Is_proxy_blocking
- *
- */
-
-#define _Thread_Is_proxy_blocking( _code ) \
- ( (_code) == THREAD_STATUS_PROXY_BLOCKING )
-
-/*
- * _Thread_Internal_allocate
- *
- */
-
-#define _Thread_Internal_allocate() \
- ((Thread_Control *) _Objects_Allocate( &_Thread_Internal_information ))
-
-/*
- * _Thread_Internal_free
- *
- */
-
-#define _Thread_Internal_free( _the_task ) \
- _Objects_Free( &_Thread_Internal_information, &(_the_task)->Object )
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/macros/rtems/score/threadmp.inl b/cpukit/score/macros/rtems/score/threadmp.inl
deleted file mode 100644
index 975403860d..0000000000
--- a/cpukit/score/macros/rtems/score/threadmp.inl
+++ /dev/null
@@ -1,49 +0,0 @@
-/* macros/threadmp.h
- *
- * This include file contains the bodies of all inlined routines
- * for the multiprocessing part of thread package.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __MACROS_MP_THREAD_h
-#define __MACROS_MP_THREAD_h
-
-/*PAGE
- *
- * _Thread_MP_Is_receive
- *
- */
-
-#define _Thread_MP_Is_receive( _the_thread ) \
- ( (_the_thread) == _Thread_MP_Receive)
-
-/*PAGE
- *
- * _Thread_MP_Free_proxy
- *
- */
-
-#define _Thread_MP_Free_proxy( _the_thread ) \
-{ \
- Thread_Proxy_control *_the_proxy; \
- \
- _the_proxy = (Thread_Proxy_control *) (_the_thread); \
- \
- _Chain_Extract( &_the_proxy->Active ); \
- \
- _Chain_Append( \
- &_Thread_MP_Inactive_proxies, \
- &(_the_thread)->Object.Node \
- ); \
-}
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/macros/rtems/score/tod.inl b/cpukit/score/macros/rtems/score/tod.inl
deleted file mode 100644
index 2fa91b127b..0000000000
--- a/cpukit/score/macros/rtems/score/tod.inl
+++ /dev/null
@@ -1,48 +0,0 @@
-/* tod.inl
- *
- * This file contains the macro implementation of the inlined routines
- * from the Time of Day Handler.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __TIME_OF_DAY_inl
-#define __TIME_OF_DAY_inl
-
-/*PAGE
- *
- * _TOD_Tickle_ticks
- *
- */
-
-#define _TOD_Tickle_ticks() \
- _TOD_Current.ticks++; \
- _Watchdog_Ticks_since_boot++
-
-/*PAGE
- *
- * _TOD_Deactivate
- *
- */
-
-#define _TOD_Deactivate() \
- _Watchdog_Remove( &_TOD_Seconds_watchdog )
-
-/*PAGE
- *
- * _TOD_Activate
- *
- */
-
-#define _TOD_Activate( _ticks ) \
- _Watchdog_Insert_ticks( &_TOD_Seconds_watchdog, (_ticks) )
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/macros/rtems/score/tqdata.inl b/cpukit/score/macros/rtems/score/tqdata.inl
deleted file mode 100644
index 96be35427b..0000000000
--- a/cpukit/score/macros/rtems/score/tqdata.inl
+++ /dev/null
@@ -1,49 +0,0 @@
-/* tqdata.inl
- *
- * This file contains the macro implementation of the inlined
- * routines needed to support the Thread Queue Data.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __THREAD_QUEUE_DATA_inl
-#define __THREAD_QUEUE_DATA_inl
-
-/*PAGE
- *
- * _Thread_queue_Header_number
- *
- */
-
-#define _Thread_queue_Header_number( _the_priority ) \
- ((_the_priority) / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER)
-
-/*PAGE
- *
- * _Thread_queue_Is_reverse_search
- *
- */
-
-#define _Thread_queue_Is_reverse_search( _the_priority ) \
- ( (_the_priority) & TASK_QUEUE_DATA_REVERSE_SEARCH_MASK )
-
-/*PAGE
- *
- * _Thread_queue_Enter_critical_section
- *
- */
-
-#define _Thread_queue_Enter_critical_section( _the_thread_queue ) \
- do { \
- (_the_thread_queue)->sync_state = THREAD_QUEUE_NOTHING_HAPPENED; \
- } while ( 0 )
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/macros/rtems/score/userext.inl b/cpukit/score/macros/rtems/score/userext.inl
deleted file mode 100644
index 8be1502778..0000000000
--- a/cpukit/score/macros/rtems/score/userext.inl
+++ /dev/null
@@ -1,133 +0,0 @@
-/* userext.inl
- *
- * This file contains the macro implementation of the inlined routines
- * from the User Extension Handler
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __USER_EXTENSIONS_inl
-#define __USER_EXTENSIONS_inl
-
-/*PAGE
- *
- * _User_extensions_Handler_initialization
- *
- */
-
-#define _User_extensions_Handler_initialization( \
- number_of_extensions, _initial_extensions \
-) \
- { \
- User_extensions_Control *extension; \
- unsigned32 i; \
- _Chain_Initialize_empty( &_User_extensions_List ); \
- \
- if ( (_initial_extensions) ) { \
- for (i=0 ; i<number_of_extensions ; i++ ) { \
- extension = \
- _Workspace_Allocate_or_fatal_error( sizeof(User_extensions_Control) ); \
- \
- extension->Callouts = _initial_extensions[i]; \
- _Chain_Append( &_User_extensions_List, &extension->Node ); \
- } \
- } \
- }
-
-/*PAGE
- *
- * _User_extensions_Add_set
- */
-
-#define _User_extensions_Add_set( _the_extension, _extension_table ) \
- do { \
- (_the_extension)->Callouts = *(_extension_table); \
- \
- _Chain_Append( &_User_extensions_List, &(_the_extension)->Node ); \
- } while ( 0 )
-
-/*PAGE
- *
- * _User_extensions_Add_API_set
- */
-
-#define _User_extensions_Add_API_set( _the_extension ) \
- _Chain_Prepend( &_User_extensions_List, &(_the_extension)->Node )
-
-
-/*PAGE
- *
- * _User_extensions_Remove_set
- */
-
-#define _User_extensions_Remove_set( _the_extension ) \
- _Chain_Extract( &(_the_extension)->Node )
-
-/*PAGE
- *
- * _User_extensions_Run_list_forward
- *
- * NOTE: No parentheses around macro names here to avoid
- * messing up the name and function call expansion.
- */
-
-#define _User_extensions_Run_list_forward( _name, _arguments ) \
- do { \
- Chain_Node *the_node; \
- User_extensions_Control *the_extension; \
- \
- for ( the_node = _User_extensions_List.first ; \
- !_Chain_Is_tail( &_User_extensions_List, the_node ) ; \
- the_node = the_node->next ) { \
- the_extension = (User_extensions_Control *) the_node; \
- \
- if ( the_extension->Callouts.## _name != NULL ) \
- (*the_extension->Callouts.## _name) _arguments; \
- \
- } \
- \
- } while ( 0 )
-
-/*PAGE
- *
- * _User_extensions_Run_list_backward
- *
- * NOTE: No parentheses around macro names here to avoid
- * messing up the name and function call expansion.
- */
-
-#define _User_extensions_Run_list_backward( _name, _arguments ) \
- do { \
- Chain_Node *the_node; \
- User_extensions_Control *the_extension; \
- \
- for ( the_node = _User_extensions_List.last ; \
- !_Chain_Is_head( &_User_extensions_List, the_node ) ; \
- the_node = the_node->previous ) { \
- the_extension = (User_extensions_Control *) the_node; \
- \
- if ( the_extension->Callouts.## _name != NULL ) \
- (*the_extension->Callouts.## _name) _arguments; \
- \
- } \
- \
- } while ( 0 )
-
-/*PAGE
- *
- * _User_extensions_Thread_switch
- *
- */
-
-#define _User_extensions_Thread_switch( _executing, _heir ) \
- _User_extensions_Run_list_forward(thread_switch, (_executing, _heir) )
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/macros/rtems/score/watchdog.inl b/cpukit/score/macros/rtems/score/watchdog.inl
deleted file mode 100644
index 53a88eacad..0000000000
--- a/cpukit/score/macros/rtems/score/watchdog.inl
+++ /dev/null
@@ -1,171 +0,0 @@
-/* watchdog.inl
- *
- * This file contains the macro implementation of all inlined routines
- * in the Watchdog Handler.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __WATCHDOG_inl
-#define __WATCHDOG_inl
-
-#include <rtems/score/object.h>
-
-/*PAGE
- *
- * _Watchdog_Initialize
- *
- */
-
-#define _Watchdog_Initialize( _the_watchdog, _routine, _id, _user_data ) \
- { \
- (_the_watchdog)->state = WATCHDOG_INACTIVE; \
- (_the_watchdog)->routine = (_routine); \
- (_the_watchdog)->id = (_id); \
- (_the_watchdog)->user_data = (_user_data); \
- }
-
-/*PAGE
- *
- * _Watchdog_Is_active
- *
- */
-
-#define _Watchdog_Is_active( _the_watchdog ) \
- ( (_the_watchdog)->state == WATCHDOG_ACTIVE )
-
-/*PAGE
- *
- * _Watchdog_Activate
- *
- */
-
-#define _Watchdog_Activate( _the_watchdog ) \
- (_the_watchdog)->state = WATCHDOG_ACTIVE
-
-/*PAGE
- *
- * _Watchdog_Deactivate
- *
- */
-
-#define _Watchdog_Deactivate( _the_watchdog ) \
- (_the_watchdog)->state = WATCHDOG_REMOVE_IT
-
-/*PAGE
- *
- * _Watchdog_Tickle_ticks
- *
- */
-
-#define _Watchdog_Tickle_ticks() \
- _Watchdog_Tickle( &_Watchdog_Ticks_chain )
-
-/*PAGE
- *
- * _Watchdog_Tickle_seconds
- *
- */
-
-#define _Watchdog_Tickle_seconds() \
- _Watchdog_Tickle( &_Watchdog_Seconds_chain )
-
-/*PAGE
- *
- * _Watchdog_Insert_ticks
- *
- */
-
-#define _Watchdog_Insert_ticks( _the_watchdog, _units ) \
- do { \
- (_the_watchdog)->initial = (_units); \
- _Watchdog_Insert( &_Watchdog_Ticks_chain, (_the_watchdog) ); \
- } while ( 0 )
-
-/*PAGE
- *
- * _Watchdog_Insert_seconds
- *
- */
-
-#define _Watchdog_Insert_seconds( _the_watchdog, _units ) \
- do { \
- (_the_watchdog)->initial = (_units); \
- _Watchdog_Insert( &_Watchdog_Seconds_chain, (_the_watchdog) ); \
- } while ( 0 )
-
-/*PAGE
- *
- * _Watchdog_Adjust_seconds
- *
- */
-
-#define _Watchdog_Adjust_seconds( _direction, _units ) \
- _Watchdog_Adjust( &_Watchdog_Seconds_chain, (_direction), (_units) )
-
-/*PAGE
- *
- * _Watchdog_Adjust_ticks
- *
- */
-
-#define _Watchdog_Adjust_ticks( _direction, _units ) \
- _Watchdog_Adjust( &_Watchdog_Ticks_chain, (_direction), (_units) )
-
-/*PAGE
- *
- * _Watchdog_Reset
- *
- */
-
-#define _Watchdog_Reset( _the_watchdog ) \
- { \
- (void) _Watchdog_Remove( (_the_watchdog) ); \
- _Watchdog_Insert( &_Watchdog_Ticks_chain, (_the_watchdog) ); \
- }
-
-/*PAGE
- *
- * _Watchdog_Next
- *
- */
-
-#define _Watchdog_Next( _watchdog ) \
- ((Watchdog_Control *) (_watchdog)->Node.next)
-
-/*PAGE
- *
- * _Watchdog_Previous
- *
- */
-
-#define _Watchdog_Previous( _watchdog ) \
- ((Watchdog_Control *) (_watchdog)->Node.previous)
-
-/*PAGE
- *
- * _Watchdog_First
- *
- */
-
-#define _Watchdog_First( _header ) \
- ((Watchdog_Control *) (_header)->first)
-
-/*PAGE
- *
- * _Watchdog_Last
- *
- */
-
-#define _Watchdog_Last( _header ) \
- ((Watchdog_Control *) (_header)->last)
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/macros/rtems/score/wkspace.inl b/cpukit/score/macros/rtems/score/wkspace.inl
deleted file mode 100644
index e327d27349..0000000000
--- a/cpukit/score/macros/rtems/score/wkspace.inl
+++ /dev/null
@@ -1,38 +0,0 @@
-/* wkspace.inl
- *
- * This file contains the macro implementation of the inlined routines
- * from the RAM Workspace Handler.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __WORKSPACE_inl
-#define __WORKSPACE_inl
-
-/*PAGE
- *
- * _Workspace_Allocate
- *
- */
-
-#define _Workspace_Allocate( _size ) \
- _Heap_Allocate( &_Workspace_Area, (_size) )
-
-/*PAGE
- *
- * _Workspace_Free
- *
- */
-
-#define _Workspace_Free( _block ) \
- _Heap_Free( &_Workspace_Area, (_block) )
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/src/Makefile.am b/cpukit/score/src/Makefile.am
deleted file mode 100644
index f5914fdb37..0000000000
--- a/cpukit/score/src/Makefile.am
+++ /dev/null
@@ -1,80 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../../../automake/lib.am
-
-# We only build multiprocessing related files if HAS_MP was defined
-MP_C_FILES = mpci.c objectmp.c threadmp.c
-
-CORE_MESSAGE_QUEUE_C_FILES = coremsg.c coremsgbroadcast.c coremsgclose.c \
- coremsgflush.c coremsgflushwait.c coremsginsert.c coremsgflushsupp.c \
- coremsgseize.c coremsgsubmit.c
-
-CORE_MUTEX_C_FILES = coremutex.c coremutexflush.c coremutexseize.c \
- coremutexsurrender.c
-
-CORE_SEMAPHORE_C_FILES = coresem.c coresemflush.c coresemseize.c \
- coresemsurrender.c
-
-HEAP_C_FILES = heap.c heapallocate.c heapextend.c heapfree.c \
- heapsizeofuserarea.c heapwalk.c
-
-OBJECT_C_FILES = object.c objectallocate.c objectallocatebyindex.c \
- objectclearname.c objectcomparenameraw.c objectcomparenamestring.c \
- objectcopynameraw.c objectcopynamestring.c objectextendinformation.c \
- objectfree.c objectget.c objectgetbyindex.c objectgetnext.c \
- objectinitializeinformation.c objectnametoid.c objectshrinkinformation.c
-
-THREAD_C_FILES = thread.c threadchangepriority.c threadclearstate.c \
- threadclose.c threadcreateidle.c threaddelayended.c threaddispatch.c \
- threadevaluatemode.c threadget.c threadhandler.c threadidlebody.c \
- threadinitialize.c threadloadenv.c threadready.c threadresettimeslice.c \
- threadreset.c threadrestart.c threadresume.c threadrotatequeue.c \
- threadsetpriority.c threadsetstate.c threadsettransient.c \
- threadstackallocate.c threadstackfree.c threadstart.c \
- threadstartmultitasking.c threadsuspend.c threadtickletimeslice.c \
- threadyieldprocessor.c
-
-THREADQ_C_FILES = threadq.c threadqdequeue.c threadqdequeuefifo.c \
- threadqdequeuepriority.c threadqenqueue.c threadqenqueuefifo.c \
- threadqenqueuepriority.c threadqextract.c threadqextractfifo.c \
- threadqextractpriority.c threadqextractwithproxy.c threadqfirst.c \
- threadqfirstfifo.c threadqfirstpriority.c threadqflush.c \
- threadqtimeout.c
-
-TOD_C_FILES = coretod.c coretodset.c coretodtickle.c coretodtoseconds.c \
- coretodvalidate.c
-
-WATCHDOG_C_FILES = watchdog.c watchdogadjust.c watchdoginsert.c \
- watchdogremove.c watchdogtickle.c
-
-STD_C_FILES = apiext.c chain.c $(CORE_MESSAGE_QUEUE_C_FILES) \
- $(CORE_MUTEX_C_FILES) $(CORE_SEMAPHORE_C_FILES) $(HEAP_C_FILES) interr.c \
- isr.c $(OBJECT_C_FILES) $(THREAD_C_FILES) $(THREADQ_C_FILES) \
- $(TOD_C_FILES) userext.c $(WATCHDOG_C_FILES) wkspace.c
-
-if HAS_MP
-C_FILES = $(STD_C_FILES) $(MP_C_FILES)
-else
-C_FILES = $(STD_C_FILES)
-endif
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-OBJS = $(C_O_FILES)
-
-#
-# Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -D__RTEMS_INSIDE__
-AM_CFLAGS += $(CFLAGS_OS_V)
-
-all: ${ARCH} ${OBJS}
-
-EXTRA_DIST = $(STD_C_FILES) $(MP_C_FILES) Unlimited.txt
-
-include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/score/src/Unlimited.txt b/cpukit/score/src/Unlimited.txt
deleted file mode 100644
index 7340fc2dfe..0000000000
--- a/cpukit/score/src/Unlimited.txt
+++ /dev/null
@@ -1,387 +0,0 @@
-#
-# $Id$
-#
-
-This document explains how the unlimited objects support works. This was
-written by Chris Johns <ccj@acm.org> of Objective Design Systems as a
-design document. This was submitted as part of the patch which added
-this capability.
-
-Unlimited Local Node Objects
-============================
-
-1. Why ?
-
-This patch changes the way RTEMS allocates, frees, and manages the
-'Objects_Control' structure.
-
-The 'Objects_Control' structure is at the root of all objects in
-RTEMS. The RTEMS and POSIX API allows users to create tasks, message
-queues, semaphores and other resources. These are all a type of
-Object. The POSIX API allow similar operations. These also map to
-Objects.
-
-Currently the number of objects that can be created is a static value
-loaded into the Configuration table before starting the kernel. The
-application cannot exceed these limits. Various means are used to tune
-this value. During development the value is usually set large. This
-saves having to change it everytime a developer adds a new
-resource. With a large team of developers the configuration table file
-can cycle through a large number of revisions. The wasted memory is
-only recovered when memory runs short. The issue of the configuration
-table parameters become more important the less memory you have.
-
-The Configuration table requires a calculation to occur at compile
-time to set the size of the Workspace. The calculation is an
-estimate. You need to specify an overhead value for memory that can
-not be calculated. An example of memory that cannot be calculated is
-stack sizes. This issue is not directly related to allowing unlimited
-objects how-ever the need to calculate the memory usage for a system
-in this manner is prone to error.
-
-I would like to see download support added to RTEMS. The kernel
-configuration being set at boot time means a download application can
-be limited. This can defeat one of the purposes of using downloaded
-code, no need to change ROMs. In a system I worked on the cost to
-change ROMS in a complete system was high and could take a week. This
-change is the first phase of supporting downloaded applications.
-
-1.1 How do Objects work ?
-
-All applications interact with the super core (c/src/exec/score) via
-an API. The central structure used in the super core is the
-`object'. Two application interfaces exist. They are RTEMS and
-POSIX. Both map to the super core using objects.
-
-An object in RTEMS is a resource which the user (through the API)
-creates. The different types of objects are referred to as classes of
-objects. An object is referenced by an id. This is of type `rtems_id'
-and is a 32bit unsigned integer. The id is unique for each object no
-matter what class.
-
-Objects are anchored by the `_Object_Information' structure. There is
-one per type or class of object. A global table of pointers to each
-information structure for a class of objects is held in
-`Objects_Information_table'.
-
-Objects consist of 6 main structures. The `_Object_Information' is the
-root structure. It contains pointers to the `local_table',
-`name_table', `global_table', the Inactive chain, and the object
-memory. It also contains the various variables which describe the
-object. We are only concerned with the `local_table', `name_table',
-Inactive chain, and the object memory to support unlimited objects.
-
-The `local_table' holds the pointers to open objects. A `local_table
-entry which is null is free and the object will be sitting on the
-Inactive chain. The index into the table is based on part of the
-id. Given an id the you can find the index into the `local_table', and
-therefore the object. The `local_table' has the entries for the
-indexes below the minimum_id's index. The minimum_id is always set to
-1 (the change allows another value to be selected if require). The
-index of 0 is reserved and never used. This allows any actions using
-an id of zero to fail or map to a special case.
-
-The `name_table' holds the names of the objects. Each entry in this
-table is the maximum size the name of the object can be. The size of
-names is not constrained by the object code (but is by the MP object
-code, and the API and should be fixed).
-
-The `global_table' and code that uses it has not changed. I did not
-look at the this code, and I am not farmilar with it.
-
-The Inactive chain stores objects which are free or not
-allocated. This design saves searching for a free object when
-allocating therefore providing a deterministic allocation scheme. When
-the chain is empty a null is returned.
-
-The change documented below basically extends the `local_table' and
-`name_table' structures at run-time. The memory used be these table
-is not large compared to the memory for the objects, and so are never
-reduced in size once extended. The object's memory grows and shrinks
-depending of the user's usage.
-
-Currently, the user specifies the total number of objects in the
-Configuration table. The change alters the function of the values in
-the Configuration table. A flag can be masked on to the value which
-selects the extending mode. If the user does not set the flag the
-object code operates with an object ceiling. A small performance
-overhead will be incurred as the allocate and free routines are now
-not inlined and a check of the auto_extend flag is made. The remaining
-value field of the Configuration table entry is total number of
-objects that can be allocated when not in unlimited mode.
-
-If the user masks the flag on to a value on the Configuration table
-auto-exdending mode is selected for that class of object. The value
-becomes the allocation unit size. If there are no free objects the
-object's tables are extended by the allocation unit number of
-objects. The object table is shrunk when the user frees objects. The
-table must have one free allocation block, and at least half the
-allocation size of another block before the object memory of the free
-allocation block is returned to the heap. This stops threshold
-thrashing when objects around the allocation unit size and created and
-destroyed.
-
-At least one allocation block size of objects is created and never
-destroyed.
-
-The change to support unlimited objects has extended the object
-information structure.
-
-The flag, `auto_extend' controls if the object can be automatically
-extended. The user masks the flag RTEMS_UNLIMITED_FLAGS onto the
-Configuration table number to select the auto-extend mode. This is
-passed to the `_Objects_Initialize_information' function in the
-parameter maximum. The flag is tested for and the auto_extend flag
-updated to reflect the state of the flag before being stipped from the
-maximum.
-
-The `allocation_size' is set to the parameter maxium in the function
-`_Objects_Initialize_information' if `auto_extend' is true. Making the
-allocation size small causes the memory to be allocated and freed more
-often. This only effects the performance times for creating a resource
-such as a task. It does how-ever give you fine grain memory
-control. If the performance of creating resources is not a problem
-make the size small.
-
-The size of the object is required to be stored. It is used when
-extending the object information.
-
-A count of the object on the Inactive list is maintained. This is used
-during freeing objects. If the count is above 1.5 times the
-`allocation_size' an attempt is made to shrink the object
-informtation. Shrinking might not always succeed as a single
-allocation block might not be free. Random freeing of objects can
-result in some fragmentation. Any further allocations will use the
-free objects before extending the object's information tables.
-
-A table of inactive objects per block is maintained. This table, like
-the `local_table' and `name_table' grows as more blocks are
-allocated. A check is made of a blocks inactive count when an object
-which is part of that block is freed. If the total inactive count
-exceeds 1.5 times the allocation size, and the block's inactive count
-is the allocation_size, the objects data block is returnd to the
-workspace heap.
-
-The `objects_blocks' is a table of pointers. The object_block's pointers
-point to the object's data block. The object's data block is a single
-allocation of the name space and object space. This was two separate
-allocations but is now one. The objects_block's table is use to
-determine if a block is allocated, and the address of the memory block
-to be returned to the workspace heap when the object informtation
-space is shrunk.
-
-2.0 Detail Of the Auto-Extend Patch to rtems-4.0.0, Snapshot 19990302
-
-o Configuration table support.
-
- Added a flag OBJECTS_UNLIMITED_OBJECTS to score/headers/object.h
- header file. This is referenced in the file sapi/headers/config.h to
- create the flag RTEMS_UNLIMITED_OBJECTS. A macro is provided to take
- a resource count and apply the flag. The macro is called
- `rtems_resource_unlimited'. The user uses this macro when building a
- configuration table. It can be used with the condefs.h header file.
-
-o Object Information Structure
-
- The object information structure, Objects_Information, has been
- extended with the follow fields :
-
- boolean auto_extend -
-
- When true the object's information tables can be extended untill
- all memory is used. When false the current functionallity is
- maintained.
-
- unsigned32 allocation_size -
-
- When auto_extend is true, it is the value in the Configuration
- table and is the number of objects the object's information
- tables are extended or shrunk.
-
- unsigned32 size -
-
- The size of the object. It is used to calculate the size of
- memory required to be allocated when extending the table.
-
- unsigned32 inactive -
-
- The number of elements on the Inactive chain.
-
- unsigned32 *inactive_per_block -
-
- Pointer to a table of counts of the inactive objects from a
- block on the Inactive chain. It is used to know which blocks are
- all free and therefore can be returned to the heap.
-
- void **object_blocks -
-
- Pointer to a table of pointers to the object data. The table
- holds the pointer used to return a block to the heap when
- shrinking the object's information tables.
-
-o Changes to Existing Object Functions
-
- Two functions prototypes are added. They are :
-
- _Objects_Extend_information,
- _Objects_Shrink_information
- _Object_Allocate, and
- _Object_Free
-
- The last were inlined, how-ever now they are not as they are too
- complex to implement as macros now.
-
-o Object Inline and Macro Changes
-
- The functions :
-
- _Object_Allocate, and
- _Object_Free
-
- are now not inlined. The function :
-
- _Objects_Get_local_object, and
- _Objects_Set_local_object
-
- have been added. There was no provided interface to allow an API to
- get/set an objects local pointer given an index. The POSIX code
- should be updated to use this interface.
-
- The function :
-
- _Objects_Get_information
-
- has been moved to be an inline function. It is used in the get
- object call which the API uses for every object reference.
-
-o Object Initialisation
-
- The function _Objects_Initialize_information has been changed to
- initialisation of the information structure's fields then call the
- new function _Objects_Extend_information.
-
- The first block of objects is always allocated and never
- released. This means with the auto-extend flag set to true the user
- still sees the same behaviour expected without this change. That is
- the number objects specified in the Configuration table is the
- number of object allocated during RTEMS initialisation. If not
- enough memory is found during this initial extend a fatal error
- occurs. The fatal error only occurs for this case of extending the
- object's information tables.
-
-o Object Information Extend
-
- The _Object_Information_Extend is a new function. It takes some of
- the code form the old _Object_Initialize_information function. The
- function extends an object's information base.
-
- Extending the first time is a special case. The function assumes the
- maximum index will be less than the minimum index. This means the
- minimum index must be greater than 0 at initialisation. The other
- special case made is coping the tables from the old location to the
- new location. The first block case is trapped and tables are
- initialised instead. Workspace allocation for the first block is
- tested for an if the first block the allocate or fatal error call is
- made. This traps an RTEMS initialise allocation error.
-
- The remainder of the code deals with all cases of extending the
- object's information.
-
- The current block count is first determined, then a scan of the
- object_block table is made to locate a free slot. Blocks can be
- freed in any order. The index base for the block is also determined.
-
- If the index base is greater than the maximum index, the tables must
- grow. To grow the tables, a new larger memory block is allocated and
- the tables copied. The object's information structure is then
- updated to point to the new tables. The tables are allocated in one
- memory block from the work-space heap. The single block is then
- broken down in the required tables.
-
- Once the tables are copied, and the new extended parts initialised
- the table pointers in the object's information structure are
- updated. This is protected by masking interrupts.
-
- The old table's memory block is returned to the heap.
-
- The names table and object is allocated. This again is a single
- block which is divided.
-
- The objects are initialised onto a local Inactive chain. They are
- then copied to the object's Inactive chain to complete the
- initialisation.
-
-o Object Informtation Shrink
-
- The _Object_Shrink_information function is new. It is required to
- scan all the blocks to see which one has no objects allocated. The
- last object freed might not belong to a block which is completely
- free.
-
- Once a block is located, the Inactive chain is interated down
- looking for objects which belong to the block of object being
- released.
-
- Once the Inactive chain scan is complete the names table and object
- memory is returned to the work-space heap and the table references cleared.
-
- XXX - I am not sure if this should occur if better protection or
- different code to provide better protection.
-
- The information tables do not change size. Once extended they never
- shrink.
-
-o Object Allocation
-
- The _Objects_Allocate attempts to get an object from the Inactive
- chain. If auto-extend mode is not enabled no further processing
- occurs. The extra overhead for this implemetation is the function is
- not inlined and check of a boolean occurs. It should effect the
- timing figures.
-
- If auto-extend is enabled, a further check is made to see if the get
- from the Inactive chain suceeded in getting an object. If it failed
- a call is made to extend the object's information tables.
-
- The get from the Inactive chain is retried. The result of this is
- returned to the user. A failure here is the users problem.
-
-o Object Free
-
- The _Objects_Free puts the object back onto the Inactive
- chain. Again if auto-extend mode is not enabled no further
- processing occurs and performance overhead will low.
-
- If auto-extend mode is enabled, a check is to see if the number of
- Inactive objects is one and a half times the allocation size. If
- there are that many free objects an attempt is made to shrink the
- object's information.
-
-o Object Index and the Get Function
-
- The existing code allocates the number of object specified in the
- configuration table, how-ever it makes the local_table have one more
- element. This is the slot for an id of 0. The 0 slot is always a
- NULL providing a simple check for a 0 id for object classes.
-
- The existing _Objects_Get code removes the minimum id, which I think
- could only be 1 from the index, then adds one for the 0 slot.
-
- This change removes this index adjustment code in _Objects_Get.
-
- The extend information starts the index count when scanning for free
- blocks at the minumun index. This means the base index for a block
- will always be adjusted by the minimum index. The extend information
- function only ever allocates the allocation size of
- objects. Finially the object's local_table size is the maximum plus
- the minumum index size. The maximum is really the maximum index.
-
- This means the values in the object's information structure and
- tables do not need the index adjustments which existed before.
-
-o The Test
-
- A new sample test, unlimited is provided. It attempts to test this
- change.
-
-
diff --git a/cpukit/score/src/apiext.c b/cpukit/score/src/apiext.c
deleted file mode 100644
index 5bb2ad658e..0000000000
--- a/cpukit/score/src/apiext.c
+++ /dev/null
@@ -1,104 +0,0 @@
-/* apiext.c
- *
- * XXX
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <rtems/system.h>
-#include <rtems/score/apiext.h>
-
-/*PAGE
- *
- * _API_extensions_Initialization
- */
-
-void _API_extensions_Initialization( void )
-{
- _Chain_Initialize_empty( &_API_extensions_List );
-}
-
-/*PAGE
- *
- * _API_extensions_Add
- */
-
-void _API_extensions_Add(
- API_extensions_Control *the_extension
-)
-{
- _Chain_Append( &_API_extensions_List, &the_extension->Node );
-}
-
-/*PAGE
- *
- * _API_extensions_Run_predriver
- */
-
-void _API_extensions_Run_predriver( void )
-{
- Chain_Node *the_node;
- API_extensions_Control *the_extension;
-
- for ( the_node = _API_extensions_List.first ;
- !_Chain_Is_tail( &_API_extensions_List, the_node ) ;
- the_node = the_node->next ) {
-
- the_extension = (API_extensions_Control *) the_node;
-
- if ( the_extension->predriver_hook )
- (*the_extension->predriver_hook)();
- }
-}
-
-/*PAGE
- *
- * _API_extensions_Run_postdriver
- */
-
-void _API_extensions_Run_postdriver( void )
-{
- Chain_Node *the_node;
- API_extensions_Control *the_extension;
-
- for ( the_node = _API_extensions_List.first ;
- !_Chain_Is_tail( &_API_extensions_List, the_node ) ;
- the_node = the_node->next ) {
-
- the_extension = (API_extensions_Control *) the_node;
-
- if ( the_extension->postdriver_hook )
- (*the_extension->postdriver_hook)();
- }
-}
-
-/*PAGE
- *
- * _API_extensions_Run_postswitch
- */
-
-void _API_extensions_Run_postswitch( void )
-{
- Chain_Node *the_node;
- API_extensions_Control *the_extension;
-
- for ( the_node = _API_extensions_List.first ;
- !_Chain_Is_tail( &_API_extensions_List, the_node ) ;
- the_node = the_node->next ) {
-
- the_extension = (API_extensions_Control *) the_node;
-
- if ( the_extension->postswitch_hook )
- (*the_extension->postswitch_hook)( _Thread_Executing );
- }
-}
-
-/* end of file */
diff --git a/cpukit/score/src/chain.c b/cpukit/score/src/chain.c
deleted file mode 100644
index 1819968c76..0000000000
--- a/cpukit/score/src/chain.c
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * Chain Handler
- *
- * NOTE:
- *
- * The order of this file is to allow proper compilation due to the
- * order of inlining required by the compiler.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/address.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-
-/*PAGE
- *
- * _Chain_Initialize
- *
- * This kernel routine initializes a doubly linked chain.
- *
- * Input parameters:
- * the_chain - pointer to chain header
- * starting_address - starting address of first node
- * number_nodes - number of nodes in chain
- * node_size - size of node in bytes
- *
- * Output parameters: NONE
- */
-
-void _Chain_Initialize(
- Chain_Control *the_chain,
- void *starting_address,
- unsigned32 number_nodes,
- unsigned32 node_size
-)
-{
- unsigned32 count;
- Chain_Node *current;
- Chain_Node *next;
-
- count = number_nodes;
- current = _Chain_Head( the_chain );
- the_chain->permanent_null = NULL;
- next = (Chain_Node *)starting_address;
- while ( count-- ) {
- current->next = next;
- next->previous = current;
- current = next;
- next = (Chain_Node *)
- _Addresses_Add_offset( (void *) next, node_size );
- }
- current->next = _Chain_Tail( the_chain );
- the_chain->last = current;
-}
-
-/*PAGE
- *
- * _Chain_Get_first_unprotected
- */
-
-#ifndef USE_INLINES
-Chain_Node *_Chain_Get_first_unprotected(
- Chain_Control *the_chain
-)
-{
- Chain_Node *return_node;
- Chain_Node *new_first;
-
- return_node = the_chain->first;
- new_first = return_node->next;
- the_chain->first = new_first;
- new_first->previous = _Chain_Head( the_chain );
-
- return return_node;
-}
-#endif /* USE_INLINES */
-
-/*PAGE
- *
- * _Chain_Get
- *
- * This kernel routine returns a pointer to a node taken from the
- * given chain.
- *
- * Input parameters:
- * the_chain - pointer to chain header
- *
- * Output parameters:
- * return_node - pointer to node in chain allocated
- * CHAIN_END - if no nodes available
- *
- * INTERRUPT LATENCY:
- * only case
- */
-
-Chain_Node *_Chain_Get(
- Chain_Control *the_chain
-)
-{
- ISR_Level level;
- Chain_Node *return_node;
-
- return_node = NULL;
- _ISR_Disable( level );
- if ( !_Chain_Is_empty( the_chain ) )
- return_node = _Chain_Get_first_unprotected( the_chain );
- _ISR_Enable( level );
- return return_node;
-}
-
-/*PAGE
- *
- * _Chain_Append
- *
- * This kernel routine puts a node on the end of the specified chain.
- *
- * Input parameters:
- * the_chain - pointer to chain header
- * node - address of node to put at rear of chain
- *
- * Output parameters: NONE
- *
- * INTERRUPT LATENCY:
- * only case
- */
-
-void _Chain_Append(
- Chain_Control *the_chain,
- Chain_Node *node
-)
-{
- ISR_Level level;
-
- _ISR_Disable( level );
- _Chain_Append_unprotected( the_chain, node );
- _ISR_Enable( level );
-}
-
-/*PAGE
- *
- * _Chain_Extract
- *
- * This kernel routine deletes the given node from a chain.
- *
- * Input parameters:
- * node - pointer to node in chain to be deleted
- *
- * Output parameters: NONE
- *
- * INTERRUPT LATENCY:
- * only case
- */
-
-void _Chain_Extract(
- Chain_Node *node
-)
-{
- ISR_Level level;
-
- _ISR_Disable( level );
- _Chain_Extract_unprotected( node );
- _ISR_Enable( level );
-}
-
-/*PAGE
- *
- * _Chain_Insert
- *
- * This kernel routine inserts a given node after a specified node
- * a requested chain.
- *
- * Input parameters:
- * after_node - pointer to node in chain to be inserted after
- * node - pointer to node to be inserted
- *
- * Output parameters: NONE
- *
- * INTERRUPT LATENCY:
- * only case
- */
-
-void _Chain_Insert(
- Chain_Node *after_node,
- Chain_Node *node
-)
-{
- ISR_Level level;
-
- _ISR_Disable( level );
- _Chain_Insert_unprotected( after_node, node );
- _ISR_Enable( level );
-}
diff --git a/cpukit/score/src/coremsg.c b/cpukit/score/src/coremsg.c
deleted file mode 100644
index 9895d52f68..0000000000
--- a/cpukit/score/src/coremsg.c
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * CORE Message Queue Handler
- *
- * DESCRIPTION:
- *
- * This package is the implementation of the CORE Message Queue Handler.
- * This core object provides task synchronization and communication functions
- * via messages passed to queue objects.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/coremsg.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-
-/*PAGE
- *
- * _CORE_message_queue_Initialize
- *
- * This routine initializes a newly created message queue based on the
- * specified data.
- *
- * Input parameters:
- * the_message_queue - the message queue to initialize
- * the_class - the API specific object class
- * the_message_queue_attributes - the message queue's attributes
- * maximum_pending_messages - maximum message and reserved buffer count
- * maximum_message_size - maximum size of each message
- * proxy_extract_callout - remote extract support
- *
- * Output parameters:
- * TRUE - if the message queue is initialized
- * FALSE - if the message queue is NOT initialized
- */
-
-boolean _CORE_message_queue_Initialize(
- CORE_message_queue_Control *the_message_queue,
- Objects_Classes the_class,
- CORE_message_queue_Attributes *the_message_queue_attributes,
- unsigned32 maximum_pending_messages,
- unsigned32 maximum_message_size,
- Thread_queue_Extract_callout proxy_extract_callout
-)
-{
- unsigned32 message_buffering_required;
- unsigned32 allocated_message_size;
-
- the_message_queue->maximum_pending_messages = maximum_pending_messages;
- the_message_queue->number_of_pending_messages = 0;
- the_message_queue->maximum_message_size = maximum_message_size;
- _CORE_message_queue_Set_notify( the_message_queue, NULL, NULL );
-
- /*
- * round size up to multiple of a ptr for chain init
- */
-
- allocated_message_size = maximum_message_size;
- if (allocated_message_size & (sizeof(unsigned32) - 1)) {
- allocated_message_size += sizeof(unsigned32);
- allocated_message_size &= ~(sizeof(unsigned32) - 1);
- }
-
- message_buffering_required = maximum_pending_messages *
- (allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
-
- the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
- _Workspace_Allocate( message_buffering_required );
-
- if (the_message_queue->message_buffers == 0)
- return FALSE;
-
- _Chain_Initialize (
- &the_message_queue->Inactive_messages,
- the_message_queue->message_buffers,
- maximum_pending_messages,
- allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
- );
-
- _Chain_Initialize_empty( &the_message_queue->Pending_messages );
-
- _Thread_queue_Initialize(
- &the_message_queue->Wait_queue,
- the_class,
- _CORE_message_queue_Is_priority( the_message_queue_attributes ) ?
- THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
- STATES_WAITING_FOR_MESSAGE,
- proxy_extract_callout,
- CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
- );
-
- return TRUE;
-}
diff --git a/cpukit/score/src/coremsgbroadcast.c b/cpukit/score/src/coremsgbroadcast.c
deleted file mode 100644
index 18e148ab1c..0000000000
--- a/cpukit/score/src/coremsgbroadcast.c
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * CORE Message Queue Handler
- *
- * DESCRIPTION:
- *
- * This package is the implementation of the CORE Message Queue Handler.
- * This core object provides task synchronization and communication functions
- * via messages passed to queue objects.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/coremsg.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-
-/*PAGE
- *
- * _CORE_message_queue_Broadcast
- *
- * This function sends a message for every thread waiting on the queue and
- * returns the number of threads made ready by the message.
- *
- * Input parameters:
- * the_message_queue - message is submitted to this message queue
- * buffer - pointer to message buffer
- * size - size in bytes of message to send
- * id - id of message queue
- * api_message_queue_mp_support - api specific mp support callout
- * count - area to store number of threads made ready
- *
- * Output parameters:
- * count - number of threads made ready
- * CORE_MESSAGE_QUEUE_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-CORE_message_queue_Status _CORE_message_queue_Broadcast(
- CORE_message_queue_Control *the_message_queue,
- void *buffer,
- unsigned32 size,
- Objects_Id id,
- CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
- unsigned32 *count
-)
-{
- Thread_Control *the_thread;
- unsigned32 number_broadcasted;
- Thread_Wait_information *waitp;
- unsigned32 constrained_size;
-
- /*
- * If there are pending messages, then there can't be threads
- * waiting for us to send them a message.
- *
- * NOTE: This check is critical because threads can block on
- * send and receive and this ensures that we are broadcasting
- * the message to threads waiting to receive -- not to send.
- */
-
- if ( the_message_queue->number_of_pending_messages != 0 ) {
- *count = 0;
- return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
- }
-
- /*
- * There must be no pending messages if there is a thread waiting to
- * receive a message.
- */
-
- number_broadcasted = 0;
- while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
- waitp = &the_thread->Wait;
- number_broadcasted += 1;
-
- constrained_size = size;
- if ( size > the_message_queue->maximum_message_size )
- constrained_size = the_message_queue->maximum_message_size;
-
- _CORE_message_queue_Copy_buffer(
- buffer,
- waitp->return_argument,
- constrained_size
- );
-
- *(unsigned32 *)the_thread->Wait.return_argument_1 = size;
-
-#if defined(RTEMS_MULTIPROCESSING)
- if ( !_Objects_Is_local_id( the_thread->Object.id ) )
- (*api_message_queue_mp_support) ( the_thread, id );
-#endif
-
- }
- *count = number_broadcasted;
- return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
-}
-
diff --git a/cpukit/score/src/coremsgclose.c b/cpukit/score/src/coremsgclose.c
deleted file mode 100644
index 245c18524f..0000000000
--- a/cpukit/score/src/coremsgclose.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * CORE Message Queue Handler
- *
- * DESCRIPTION:
- *
- * This package is the implementation of the CORE Message Queue Handler.
- * This core object provides task synchronization and communication functions
- * via messages passed to queue objects.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/coremsg.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-
-/*PAGE
- *
- * _CORE_message_queue_Close
- *
- * This function closes a message by returning all allocated space and
- * flushing the message_queue's task wait queue.
- *
- * Input parameters:
- * the_message_queue - the message_queue to be flushed
- * remote_extract_callout - function to invoke remotely
- * status - status to pass to thread
- *
- * Output parameters: NONE
- */
-
-void _CORE_message_queue_Close(
- CORE_message_queue_Control *the_message_queue,
- Thread_queue_Flush_callout remote_extract_callout,
- unsigned32 status
-)
-{
-
- /*
- * This will flush blocked threads whether they were blocked on
- * a send or receive.
- */
-
- _Thread_queue_Flush(
- &the_message_queue->Wait_queue,
- remote_extract_callout,
- status
- );
-
- /*
- * This removes all messages from the pending message queue. Since
- * we just flushed all waiting threads, we don't have to worry about
- * the flush satisfying any blocked senders as a side-effect.
- */
-
- if ( the_message_queue->number_of_pending_messages != 0 )
- (void) _CORE_message_queue_Flush_support( the_message_queue );
-
- (void) _Workspace_Free( the_message_queue->message_buffers );
-
-}
-
diff --git a/cpukit/score/src/coremsgflush.c b/cpukit/score/src/coremsgflush.c
deleted file mode 100644
index 957d00a59e..0000000000
--- a/cpukit/score/src/coremsgflush.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * CORE Message Queue Handler
- *
- * DESCRIPTION:
- *
- * This package is the implementation of the CORE Message Queue Handler.
- * This core object provides task synchronization and communication functions
- * via messages passed to queue objects.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/coremsg.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-
-/*PAGE
- *
- * _CORE_message_queue_Flush
- *
- * This function flushes the message_queue's pending message queue. The
- * number of messages flushed from the queue is returned.
- *
- * Input parameters:
- * the_message_queue - the message_queue to be flushed
- *
- * Output parameters:
- * returns - the number of messages flushed from the queue
- */
-
-unsigned32 _CORE_message_queue_Flush(
- CORE_message_queue_Control *the_message_queue
-)
-{
- if ( the_message_queue->number_of_pending_messages != 0 )
- return _CORE_message_queue_Flush_support( the_message_queue );
- else
- return 0;
-}
-
diff --git a/cpukit/score/src/coremsgflushsupp.c b/cpukit/score/src/coremsgflushsupp.c
deleted file mode 100644
index 4bfd8f358b..0000000000
--- a/cpukit/score/src/coremsgflushsupp.c
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * CORE Message Queue Handler
- *
- * DESCRIPTION:
- *
- * This package is the implementation of the CORE Message Queue Handler.
- * This core object provides task synchronization and communication functions
- * via messages passed to queue objects.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/coremsg.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-
-/*PAGE
- *
- * _CORE_message_queue_Flush_support
- *
- * This message handler routine removes all messages from a message queue
- * and returns them to the inactive message pool. The number of messages
- * flushed from the queue is returned
- *
- * Input parameters:
- * the_message_queue - pointer to message queue
- *
- * Output parameters:
- * returns - number of messages placed on inactive chain
- *
- * INTERRUPT LATENCY:
- * only case
- */
-
-unsigned32 _CORE_message_queue_Flush_support(
- CORE_message_queue_Control *the_message_queue
-)
-{
- ISR_Level level;
- Chain_Node *inactive_first;
- Chain_Node *message_queue_first;
- Chain_Node *message_queue_last;
- unsigned32 count;
-
- /*
- * Currently, RTEMS supports no API that has both flush and blocking
- * sends. Thus, this routine assumes that there are no senders
- * blocked waiting to send messages. In the event, that an API is
- * added that can flush a message queue when threads are blocked
- * waiting to send, there are two basic behaviors envisioned:
- *
- * (1) The thread queue of pending senders is a logical extension
- * of the pending message queue. In this case, it should be
- * flushed using the _Thread_queue_Flush() service with a status
- * such as CORE_MESSAGE_QUEUE_SENDER_FLUSHED (which currently does
- * not exist). This can be implemented without changing the "big-O"
- * of the message flushing part of the routine.
- *
- * (2) Only the actual messages queued should be purged. In this case,
- * the blocked sender threads must be allowed to send their messages.
- * In this case, the implementation will be forced to individually
- * dequeue the senders and queue their messages. This will force
- * this routine to have "big O(n)" where n is the number of blocked
- * senders. If there are more messages pending than senders blocked,
- * then the existing flush code can be used to dispose of the remaining
- * pending messages.
- *
- * For now, though, we are very happy to have a small routine with
- * fixed execution time that only deals with pending messages.
- */
-
- _ISR_Disable( level );
- inactive_first = the_message_queue->Inactive_messages.first;
- message_queue_first = the_message_queue->Pending_messages.first;
- message_queue_last = the_message_queue->Pending_messages.last;
-
- the_message_queue->Inactive_messages.first = message_queue_first;
- message_queue_last->next = inactive_first;
- inactive_first->previous = message_queue_last;
- message_queue_first->previous =
- _Chain_Head( &the_message_queue->Inactive_messages );
-
- _Chain_Initialize_empty( &the_message_queue->Pending_messages );
-
- count = the_message_queue->number_of_pending_messages;
- the_message_queue->number_of_pending_messages = 0;
- _ISR_Enable( level );
- return count;
-}
-
diff --git a/cpukit/score/src/coremsgflushwait.c b/cpukit/score/src/coremsgflushwait.c
deleted file mode 100644
index bda8143ffd..0000000000
--- a/cpukit/score/src/coremsgflushwait.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * CORE Message Queue Handler
- *
- * DESCRIPTION:
- *
- * This package is the implementation of the CORE Message Queue Handler.
- * This core object provides task synchronization and communication functions
- * via messages passed to queue objects.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/coremsg.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-
-/*PAGE
- *
- * _CORE_message_queue_Flush_waiting_threads
- *
- * This function flushes the message_queue's task wait queue. The number
- * of messages flushed from the queue is returned.
- *
- * Input parameters:
- * the_message_queue - the message_queue to be flushed
- *
- * Output parameters:
- * returns - the number of messages flushed from the queue
- */
-
-void _CORE_message_queue_Flush_waiting_threads(
- CORE_message_queue_Control *the_message_queue
-)
-{
- /* XXX this is not supported for global message queues */
-
- /*
- * IF there are no pending messages,
- * THEN threads may be blocked waiting to RECEIVE a message,
- *
- * IF the pending message queue is full
- * THEN threads may be blocked waiting to SEND a message
- *
- * But in either case, we will return "unsatisfied nowait"
- * to indicate that the blocking condition was not satisfied
- * and that the blocking state was canceled.
- */
-
- _Thread_queue_Flush(
- &the_message_queue->Wait_queue,
- NULL,
- CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT
- );
-}
-
diff --git a/cpukit/score/src/coremsginsert.c b/cpukit/score/src/coremsginsert.c
deleted file mode 100644
index f468334c97..0000000000
--- a/cpukit/score/src/coremsginsert.c
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * CORE Message Queue Handler
- *
- * DESCRIPTION:
- *
- * This package is the implementation of the CORE Message Queue Handler.
- * This core object provides task synchronization and communication functions
- * via messages passed to queue objects.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/coremsg.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-
-/*PAGE
- *
- * _CORE_message_queue_Insert_message
- *
- * This kernel routine inserts the specified message into the
- * message queue. It is assumed that the message has been filled
- * in before this routine is called.
- *
- * Input parameters:
- * the_message_queue - pointer to message queue
- * the_message - message to insert
- * priority - insert indication
- *
- * Output parameters: NONE
- *
- * INTERRUPT LATENCY:
- * insert
- */
-
-void _CORE_message_queue_Insert_message(
- CORE_message_queue_Control *the_message_queue,
- CORE_message_queue_Buffer_control *the_message,
- CORE_message_queue_Submit_types submit_type
-)
-{
- the_message_queue->number_of_pending_messages += 1;
-
- the_message->priority = submit_type;
-
- switch ( submit_type ) {
- case CORE_MESSAGE_QUEUE_SEND_REQUEST:
- _CORE_message_queue_Append( the_message_queue, the_message );
- break;
- case CORE_MESSAGE_QUEUE_URGENT_REQUEST:
- _CORE_message_queue_Prepend( the_message_queue, the_message );
- break;
- default:
- /* XXX interrupt critical section needs to be addressed */
- {
- CORE_message_queue_Buffer_control *this_message;
- Chain_Node *the_node;
- Chain_Control *the_header;
-
- the_header = &the_message_queue->Pending_messages;
- the_node = the_header->first;
- while ( !_Chain_Is_tail( the_header, the_node ) ) {
-
- this_message = (CORE_message_queue_Buffer_control *) the_node;
-
- if ( this_message->priority <= the_message->priority ) {
- the_node = the_node->next;
- continue;
- }
-
- break;
- }
- _Chain_Insert( the_node->previous, &the_message->Node );
- }
- break;
- }
-
- /*
- * According to POSIX, does this happen before or after the message
- * is actually enqueued. It is logical to think afterwards, because
- * the message is actually in the queue at this point.
- */
-
- if ( the_message_queue->number_of_pending_messages == 1 &&
- the_message_queue->notify_handler )
- (*the_message_queue->notify_handler)( the_message_queue->notify_argument );
-}
diff --git a/cpukit/score/src/coremsgseize.c b/cpukit/score/src/coremsgseize.c
deleted file mode 100644
index 9e72f2f8a1..0000000000
--- a/cpukit/score/src/coremsgseize.c
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * CORE Message Queue Handler
- *
- * DESCRIPTION:
- *
- * This package is the implementation of the CORE Message Queue Handler.
- * This core object provides task synchronization and communication functions
- * via messages passed to queue objects.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/coremsg.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-
-/*PAGE
- *
- * _CORE_message_queue_Seize
- *
- * This kernel routine dequeues a message, copies the message buffer to
- * a given destination buffer, and frees the message buffer to the
- * inactive message pool. The thread will be blocked if wait is TRUE,
- * otherwise an error will be given to the thread if no messages are available.
- *
- * Input parameters:
- * the_message_queue - pointer to message queue
- * id - id of object we are waitig on
- * buffer - pointer to message buffer to be filled
- * size - pointer to the size of buffer to be filled
- * wait - TRUE if wait is allowed, FALSE otherwise
- * timeout - time to wait for a message
- *
- * Output parameters: NONE
- *
- * NOTE: Dependent on BUFFER_LENGTH
- *
- * INTERRUPT LATENCY:
- * available
- * wait
- */
-
-void _CORE_message_queue_Seize(
- CORE_message_queue_Control *the_message_queue,
- Objects_Id id,
- void *buffer,
- unsigned32 *size,
- boolean wait,
- Watchdog_Interval timeout
-)
-{
- ISR_Level level;
- CORE_message_queue_Buffer_control *the_message;
- Thread_Control *executing;
- Thread_Control *the_thread;
-
- executing = _Thread_Executing;
- executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
- _ISR_Disable( level );
- if ( the_message_queue->number_of_pending_messages != 0 ) {
- the_message_queue->number_of_pending_messages -= 1;
-
- the_message = _CORE_message_queue_Get_pending_message( the_message_queue );
- _ISR_Enable( level );
-
- *size = the_message->Contents.size;
- _Thread_Executing->Wait.count = the_message->priority;
- _CORE_message_queue_Copy_buffer(the_message->Contents.buffer,buffer,*size);
-
- /*
- * There could be a thread waiting to send a message. If there
- * is not, then we can go ahead and free the buffer.
- *
- * NOTE: If we note that the queue was not full before this receive,
- * then we can avoid this dequeue.
- */
-
- the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
- if ( !the_thread ) {
- _CORE_message_queue_Free_message_buffer( the_message_queue, the_message );
- return;
- }
-
- /*
- * There was a thread waiting to send a message. This code
- * puts the messages in the message queue on behalf of the
- * waiting task.
- */
-
- the_message->priority = the_thread->Wait.count;
- the_message->Contents.size = (unsigned32)the_thread->Wait.return_argument_1;
- _CORE_message_queue_Copy_buffer(
- the_thread->Wait.return_argument,
- the_message->Contents.buffer,
- the_message->Contents.size
- );
-
- _CORE_message_queue_Insert_message(
- the_message_queue,
- the_message,
- the_message->priority
- );
- return;
- }
-
- if ( !wait ) {
- _ISR_Enable( level );
- executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
- return;
- }
-
- _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
- executing->Wait.queue = &the_message_queue->Wait_queue;
- executing->Wait.id = id;
- executing->Wait.return_argument = (void *)buffer;
- executing->Wait.return_argument_1 = (void *)size;
- /* Wait.count will be filled in with the message priority */
- _ISR_Enable( level );
-
- _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
-}
-
diff --git a/cpukit/score/src/coremsgsubmit.c b/cpukit/score/src/coremsgsubmit.c
deleted file mode 100644
index 6829351c18..0000000000
--- a/cpukit/score/src/coremsgsubmit.c
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * CORE Message Queue Handler
- *
- * DESCRIPTION:
- *
- * This package is the implementation of the CORE Message Queue Handler.
- * This core object provides task synchronization and communication functions
- * via messages passed to queue objects.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/coremsg.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-
-/*PAGE
- *
- * _CORE_message_queue_Submit
- *
- * This routine implements the send and urgent message functions. It
- * processes a message that is to be submitted to the designated
- * message queue. The message will either be processed as a
- * send message which it will be inserted at the rear of the queue
- * or it will be processed as an urgent message which will be inserted
- * at the front of the queue.
- *
- * Input parameters:
- * the_message_queue - message is submitted to this message queue
- * buffer - pointer to message buffer
- * size - size in bytes of message to send
- * id - id of message queue
- * api_message_queue_mp_support - api specific mp support callout
- * submit_type - send or urgent message
- *
- * Output parameters:
- * CORE_MESSAGE_QUEUE_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-void _CORE_message_queue_Submit(
- CORE_message_queue_Control *the_message_queue,
- void *buffer,
- unsigned32 size,
- Objects_Id id,
- CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
- CORE_message_queue_Submit_types submit_type,
- boolean wait,
- Watchdog_Interval timeout
-)
-{
- ISR_Level level;
- CORE_message_queue_Buffer_control *the_message;
- Thread_Control *the_thread;
- Thread_Control *executing;
-
- _Thread_Executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
-
- if ( size > the_message_queue->maximum_message_size ) {
- _Thread_Executing->Wait.return_code =
- CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE;
- return;
- }
-
- /*
- * Is there a thread currently waiting on this message queue?
- */
-
- if ( the_message_queue->number_of_pending_messages == 0 ) {
- the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
- if ( the_thread ) {
- _CORE_message_queue_Copy_buffer(
- buffer,
- the_thread->Wait.return_argument,
- size
- );
- *(unsigned32 *)the_thread->Wait.return_argument_1 = size;
- the_thread->Wait.count = submit_type;
-
-#if defined(RTEMS_MULTIPROCESSING)
- if ( !_Objects_Is_local_id( the_thread->Object.id ) )
- (*api_message_queue_mp_support) ( the_thread, id );
-#endif
- return;
- }
- }
-
- /*
- * No one waiting on the message queue at this time, so attempt to
- * queue the message up for a future receive.
- */
-
- if ( the_message_queue->number_of_pending_messages <
- the_message_queue->maximum_pending_messages ) {
-
- the_message =
- _CORE_message_queue_Allocate_message_buffer( the_message_queue );
-
- /*
- * NOTE: If the system is consistent, this error should never occur.
- */
- if ( !the_message ) {
- _Thread_Executing->Wait.return_code =
- CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED;
- return;
- }
-
- _CORE_message_queue_Copy_buffer(
- buffer,
- the_message->Contents.buffer,
- size
- );
- the_message->Contents.size = size;
- the_message->priority = submit_type;
-
- _CORE_message_queue_Insert_message(
- the_message_queue,
- the_message,
- submit_type
- );
- return;
- }
-
- /*
- * No message buffers were available so we may need to return an
- * overflow error or block the sender until the message is placed
- * on the queue.
- */
-
- if ( !wait ) {
- _Thread_Executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_TOO_MANY;
- return;
- }
-
- executing = _Thread_Executing;
-
- _ISR_Disable( level );
- _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
- executing->Wait.queue = &the_message_queue->Wait_queue;
- executing->Wait.id = id;
- executing->Wait.return_argument = (void *)buffer;
- executing->Wait.return_argument_1 = (void *)size;
- executing->Wait.count = submit_type;
- _ISR_Enable( level );
-
- _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
-}
diff --git a/cpukit/score/src/coremutex.c b/cpukit/score/src/coremutex.c
deleted file mode 100644
index a5842efb91..0000000000
--- a/cpukit/score/src/coremutex.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Mutex Handler
- *
- * DESCRIPTION:
- *
- * This package is the implementation of the Mutex Handler.
- * This handler provides synchronization and mutual exclusion capabilities.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/coremutex.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-
-/*PAGE
- *
- * _CORE_mutex_Initialize
- *
- * This routine initializes a mutex at create time and set the control
- * structure according to the values passed.
- *
- * Input parameters:
- * the_mutex - the mutex control block to initialize
- * the_class - the API class of the object
- * the_mutex_attributes - the mutex attributes specified at create time
- * initial_lock - mutex initial lock or unlocked status
- * proxy_extract_callout - MP specific extract callout
- *
- * Output parameters: NONE
- */
-
-void _CORE_mutex_Initialize(
- CORE_mutex_Control *the_mutex,
- Objects_Classes the_class,
- CORE_mutex_Attributes *the_mutex_attributes,
- unsigned32 initial_lock,
- Thread_queue_Extract_callout proxy_extract_callout
-)
-{
-
-/* Add this to the RTEMS environment later ?????????
- rtems_assert( initial_lock == CORE_MUTEX_LOCKED ||
- initial_lock == CORE_MUTEX_UNLOCKED );
- */
-
- the_mutex->Attributes = *the_mutex_attributes;
- the_mutex->lock = initial_lock;
-
-#if 0
- if ( !the_mutex_attributes->only_owner_release &&
- the_mutex_attributes->nesting_allowed ) {
- _Internal_error_Occurred(
- INTERNAL_ERROR_CORE,
- TRUE,
- INTERNAL_ERROR_BAD_ATTRIBUTES
- );
- }
-#endif
-
- if ( initial_lock == CORE_MUTEX_LOCKED ) {
- the_mutex->nest_count = 1;
- the_mutex->holder = _Thread_Executing;
- the_mutex->holder_id = _Thread_Executing->Object.id;
- _Thread_Executing->resource_count++;
- } else {
- the_mutex->nest_count = 0;
- the_mutex->holder = NULL;
- the_mutex->holder_id = 0;
- }
-
- _Thread_queue_Initialize(
- &the_mutex->Wait_queue,
- the_class,
- _CORE_mutex_Is_fifo( the_mutex_attributes ) ?
- THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY,
- STATES_WAITING_FOR_MUTEX,
- proxy_extract_callout,
- CORE_MUTEX_TIMEOUT
- );
-}
-
diff --git a/cpukit/score/src/coremutexflush.c b/cpukit/score/src/coremutexflush.c
deleted file mode 100644
index ad4f3b6cc3..0000000000
--- a/cpukit/score/src/coremutexflush.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Mutex Handler
- *
- * DESCRIPTION:
- *
- * This package is the implementation of the Mutex Handler.
- * This handler provides synchronization and mutual exclusion capabilities.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/coremutex.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-
-/*PAGE
- *
- * _CORE_mutex_Flush
- *
- * This function a flushes the mutex's task wait queue.
- *
- * Input parameters:
- * the_mutex - the mutex to be flushed
- * remote_extract_callout - function to invoke remotely
- * status - status to pass to thread
- *
- * Output parameters: NONE
- */
-
-void _CORE_mutex_Flush(
- CORE_mutex_Control *the_mutex,
- Thread_queue_Flush_callout remote_extract_callout,
- unsigned32 status
-)
-{
- _Thread_queue_Flush(
- &the_mutex->Wait_queue,
- remote_extract_callout,
- status
- );
-}
diff --git a/cpukit/score/src/coremutexseize.c b/cpukit/score/src/coremutexseize.c
deleted file mode 100644
index db576c6ef1..0000000000
--- a/cpukit/score/src/coremutexseize.c
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * Mutex Handler
- *
- * DESCRIPTION:
- *
- * This package is the implementation of the Mutex Handler.
- * This handler provides synchronization and mutual exclusion capabilities.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/coremutex.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-
-/*PAGE
- *
- * _CORE_mutex_Seize
- *
- * This routine attempts to allocate a mutex to the calling thread.
- *
- * Input parameters:
- * the_mutex - pointer to mutex control block
- * id - id of object to wait on
- * wait - TRUE if wait is allowed, FALSE otherwise
- * timeout - number of ticks to wait (0 means forever)
- *
- * Output parameters: NONE
- *
- * INTERRUPT LATENCY:
- * available
- * wait
- */
-
-void _CORE_mutex_Seize(
- CORE_mutex_Control *the_mutex,
- Objects_Id id,
- boolean wait,
- Watchdog_Interval timeout
-)
-{
- Thread_Control *executing;
- ISR_Level level;
-
- executing = _Thread_Executing;
- switch ( the_mutex->Attributes.discipline ) {
- case CORE_MUTEX_DISCIPLINES_FIFO:
- case CORE_MUTEX_DISCIPLINES_PRIORITY:
- case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT:
- break;
- case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING:
- if ( executing->current_priority <
- the_mutex->Attributes.priority_ceiling) {
- executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
- return;
- }
- }
- executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
- _ISR_Disable( level );
- if ( ! _CORE_mutex_Is_locked( the_mutex ) ) {
- the_mutex->lock = CORE_MUTEX_LOCKED;
- the_mutex->holder = executing;
- the_mutex->holder_id = executing->Object.id;
- the_mutex->nest_count = 1;
- executing->resource_count++;
- _ISR_Enable( level );
- switch ( the_mutex->Attributes.discipline ) {
- case CORE_MUTEX_DISCIPLINES_FIFO:
- case CORE_MUTEX_DISCIPLINES_PRIORITY:
- case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT:
- /* already the highest priority */
- break;
- case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING:
- if ( the_mutex->Attributes.priority_ceiling <
- executing->current_priority ) {
- _Thread_Change_priority(
- the_mutex->holder,
- the_mutex->Attributes.priority_ceiling,
- FALSE
- );
- }
- }
- executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
- return;
- }
-
- if ( _Thread_Is_executing( the_mutex->holder ) ) {
- switch ( the_mutex->Attributes.lock_nesting_behavior ) {
- case CORE_MUTEX_NESTING_ACQUIRES:
- the_mutex->nest_count++;
- _ISR_Enable( level );
- return;
- case CORE_MUTEX_NESTING_IS_ERROR:
- executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
- _ISR_Enable( level );
- return;
- case CORE_MUTEX_NESTING_BLOCKS:
- break;
- }
- }
-
- if ( !wait ) {
- _ISR_Enable( level );
- executing->Wait.return_code = CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT;
- return;
- }
-
- _Thread_queue_Enter_critical_section( &the_mutex->Wait_queue );
- executing->Wait.queue = &the_mutex->Wait_queue;
- executing->Wait.id = id;
- _ISR_Enable( level );
-
- switch ( the_mutex->Attributes.discipline ) {
- case CORE_MUTEX_DISCIPLINES_FIFO:
- case CORE_MUTEX_DISCIPLINES_PRIORITY:
- case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING:
- break;
- case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT:
- if ( the_mutex->holder->current_priority > executing->current_priority ) {
- _Thread_Change_priority(
- the_mutex->holder,
- executing->current_priority,
- FALSE
- );
- }
- break;
- }
-
- _Thread_queue_Enqueue( &the_mutex->Wait_queue, timeout );
-
- if ( _Thread_Executing->Wait.return_code == CORE_MUTEX_STATUS_SUCCESSFUL ) {
- switch ( the_mutex->Attributes.discipline ) {
- case CORE_MUTEX_DISCIPLINES_FIFO:
- case CORE_MUTEX_DISCIPLINES_PRIORITY:
- case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT:
- break;
- case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING:
- if ( the_mutex->Attributes.priority_ceiling <
- executing->current_priority ) {
- _Thread_Change_priority(
- executing,
- the_mutex->Attributes.priority_ceiling,
- FALSE
- );
- };
- break;
- }
- }
-}
-
diff --git a/cpukit/score/src/coremutexsurrender.c b/cpukit/score/src/coremutexsurrender.c
deleted file mode 100644
index 7eb1497c9f..0000000000
--- a/cpukit/score/src/coremutexsurrender.c
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Mutex Handler
- *
- * DESCRIPTION:
- *
- * This package is the implementation of the Mutex Handler.
- * This handler provides synchronization and mutual exclusion capabilities.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/coremutex.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-
-/*
- * _CORE_mutex_Surrender
- *
- * DESCRIPTION:
- *
- * This routine frees a unit to the mutex. If a task was blocked waiting for
- * a unit from this mutex, then that task will be readied and the unit
- * given to that task. Otherwise, the unit will be returned to the mutex.
- *
- * Input parameters:
- * the_mutex - the mutex to be flushed
- * id - id of parent mutex
- * api_mutex_mp_support - api dependent MP support actions
- *
- * Output parameters:
- * CORE_MUTEX_STATUS_SUCCESSFUL - if successful
- * core error code - if unsuccessful
- */
-
-CORE_mutex_Status _CORE_mutex_Surrender(
- CORE_mutex_Control *the_mutex,
- Objects_Id id,
- CORE_mutex_API_mp_support_callout api_mutex_mp_support
-)
-{
- Thread_Control *the_thread;
- Thread_Control *holder;
-
- holder = the_mutex->holder;
-
- /*
- * The following code allows a thread (or ISR) other than the thread
- * which acquired the mutex to release that mutex. This is only
- * allowed when the mutex in quetion is FIFO or simple Priority
- * discipline. But Priority Ceiling or Priority Inheritance mutexes
- * must be released by the thread which acquired them.
- */
-
- if ( the_mutex->Attributes.only_owner_release ) {
- if ( !_Thread_Is_executing( holder ) )
- return( CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE );
- }
-
- /* XXX already unlocked -- not right status */
-
- if ( !the_mutex->nest_count )
- return( CORE_MUTEX_STATUS_SUCCESSFUL );
-
- the_mutex->nest_count--;
-
- if ( the_mutex->nest_count != 0 ) {
- switch ( the_mutex->Attributes.lock_nesting_behavior ) {
- case CORE_MUTEX_NESTING_ACQUIRES:
- return CORE_MUTEX_STATUS_SUCCESSFUL;
- case CORE_MUTEX_NESTING_IS_ERROR:
- /* should never occur */
- return CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
- case CORE_MUTEX_NESTING_BLOCKS:
- /* Currently no API exercises this behavior. */
- break;
- }
- }
-
- _Thread_Executing->resource_count--;
- the_mutex->holder = NULL;
- the_mutex->holder_id = 0;
-
- /*
- * Whether or not someone is waiting for the mutex, an
- * inherited priority must be lowered if this is the last
- * mutex (i.e. resource) this task has.
- */
-
- switch ( the_mutex->Attributes.discipline ) {
- case CORE_MUTEX_DISCIPLINES_FIFO:
- case CORE_MUTEX_DISCIPLINES_PRIORITY:
- break;
- case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING:
- case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT:
- if ( holder->resource_count == 0 &&
- holder->real_priority != holder->current_priority ) {
- _Thread_Change_priority( holder, holder->real_priority, TRUE );
- }
- break;
- }
-
-
- if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) {
-
-#if defined(RTEMS_MULTIPROCESSING)
- if ( !_Objects_Is_local_id( the_thread->Object.id ) ) {
-
- the_mutex->holder = NULL;
- the_mutex->holder_id = the_thread->Object.id;
- the_mutex->nest_count = 1;
-
- ( *api_mutex_mp_support)( the_thread, id );
-
- } else
-#endif
- {
-
- the_mutex->holder = the_thread;
- the_mutex->holder_id = the_thread->Object.id;
- the_thread->resource_count++;
- the_mutex->nest_count = 1;
-
- /*
- * No special action for priority inheritance or priority ceiling
- * because the_thread is guaranteed to be the highest priority
- * thread waiting for the mutex.
- */
- }
- } else
- the_mutex->lock = CORE_MUTEX_UNLOCKED;
-
- return( CORE_MUTEX_STATUS_SUCCESSFUL );
-}
-
diff --git a/cpukit/score/src/coresem.c b/cpukit/score/src/coresem.c
deleted file mode 100644
index 8cbaaef486..0000000000
--- a/cpukit/score/src/coresem.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * CORE Semaphore Handler
- *
- * DESCRIPTION:
- *
- * This package is the implementation of the CORE Semaphore Handler.
- * This core object utilizes standard Dijkstra counting semaphores to provide
- * synchronization and mutual exclusion capabilities.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/coresem.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-
-/*PAGE
- *
- * CORE_semaphore_Initialize
- *
- * This function initialize a semaphore and sets the initial value based
- * on the given count.
- *
- * Input parameters:
- * the_semaphore - the semaphore control block to initialize
- * the_class - the API class of the object
- * the_semaphore_attributes - the attributes specified at create time
- * initial_value - semaphore's initial value
- * proxy_extract_callout - MP specific extract callout
- *
- * Output parameters: NONE
- */
-
-void _CORE_semaphore_Initialize(
- CORE_semaphore_Control *the_semaphore,
- Objects_Classes the_class,
- CORE_semaphore_Attributes *the_semaphore_attributes,
- unsigned32 initial_value,
- Thread_queue_Extract_callout proxy_extract_callout
-)
-{
-
- the_semaphore->Attributes = *the_semaphore_attributes;
- the_semaphore->count = initial_value;
-
- _Thread_queue_Initialize(
- &the_semaphore->Wait_queue,
- the_class,
- _CORE_semaphore_Is_priority( the_semaphore_attributes ) ?
- THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
- STATES_WAITING_FOR_SEMAPHORE,
- proxy_extract_callout,
- CORE_SEMAPHORE_TIMEOUT
- );
-}
diff --git a/cpukit/score/src/coresemflush.c b/cpukit/score/src/coresemflush.c
deleted file mode 100644
index e30f768aab..0000000000
--- a/cpukit/score/src/coresemflush.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * CORE Semaphore Handler
- *
- * DESCRIPTION:
- *
- * This package is the implementation of the CORE Semaphore Handler.
- * This core object utilizes standard Dijkstra counting semaphores to provide
- * synchronization and mutual exclusion capabilities.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/coresem.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-
-/*PAGE
- *
- * _CORE_semaphore_Flush
- *
- * This function a flushes the semaphore's task wait queue.
- *
- * Input parameters:
- * the_semaphore - the semaphore to be flushed
- * remote_extract_callout - function to invoke remotely
- * status - status to pass to thread
- *
- * Output parameters: NONE
- */
-
-void _CORE_semaphore_Flush(
- CORE_semaphore_Control *the_semaphore,
- Thread_queue_Flush_callout remote_extract_callout,
- unsigned32 status
-)
-{
-
- _Thread_queue_Flush(
- &the_semaphore->Wait_queue,
- remote_extract_callout,
- status
- );
-
-}
diff --git a/cpukit/score/src/coresemseize.c b/cpukit/score/src/coresemseize.c
deleted file mode 100644
index 0f3c25aeac..0000000000
--- a/cpukit/score/src/coresemseize.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * CORE Semaphore Handler
- *
- * DESCRIPTION:
- *
- * This package is the implementation of the CORE Semaphore Handler.
- * This core object utilizes standard Dijkstra counting semaphores to provide
- * synchronization and mutual exclusion capabilities.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/coresem.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-
-/*PAGE
- *
- * _CORE_semaphore_Seize
- *
- * This routine attempts to allocate a core semaphore to the calling thread.
- *
- * Input parameters:
- * the_semaphore - pointer to semaphore control block
- * id - id of object to wait on
- * wait - TRUE if wait is allowed, FALSE otherwise
- * timeout - number of ticks to wait (0 means forever)
- *
- * Output parameters: NONE
- *
- * INTERRUPT LATENCY:
- * available
- * wait
- */
-
-void _CORE_semaphore_Seize(
- CORE_semaphore_Control *the_semaphore,
- Objects_Id id,
- boolean wait,
- Watchdog_Interval timeout
-)
-{
- Thread_Control *executing;
- ISR_Level level;
-
- executing = _Thread_Executing;
- executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
- _ISR_Disable( level );
- if ( the_semaphore->count != 0 ) {
- the_semaphore->count -= 1;
- _ISR_Enable( level );
- return;
- }
-
- if ( !wait ) {
- _ISR_Enable( level );
- executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT;
- return;
- }
-
- _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue );
- executing->Wait.queue = &the_semaphore->Wait_queue;
- executing->Wait.id = id;
- _ISR_Enable( level );
-
- _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout );
-}
diff --git a/cpukit/score/src/coresemsurrender.c b/cpukit/score/src/coresemsurrender.c
deleted file mode 100644
index 1a54a5c712..0000000000
--- a/cpukit/score/src/coresemsurrender.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * CORE Semaphore Handler
- *
- * DESCRIPTION:
- *
- * This package is the implementation of the CORE Semaphore Handler.
- * This core object utilizes standard Dijkstra counting semaphores to provide
- * synchronization and mutual exclusion capabilities.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/coresem.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-
-/*PAGE
- *
- * _CORE_semaphore_Surrender
- *
- * Input parameters:
- * the_semaphore - the semaphore to be flushed
- * id - id of parent semaphore
- * api_semaphore_mp_support - api dependent MP support actions
- *
- * Output parameters:
- * CORE_SEMAPHORE_STATUS_SUCCESSFUL - if successful
- * core error code - if unsuccessful
- *
- * Output parameters:
- */
-
-CORE_semaphore_Status _CORE_semaphore_Surrender(
- CORE_semaphore_Control *the_semaphore,
- Objects_Id id,
- CORE_semaphore_API_mp_support_callout api_semaphore_mp_support
-)
-{
- Thread_Control *the_thread;
- ISR_Level level;
- CORE_semaphore_Status status;
-
- status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
-
- if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) {
-
- if ( !_Objects_Is_local_id( the_thread->Object.id ) )
- (*api_semaphore_mp_support) ( the_thread, id );
-
- } else {
- _ISR_Disable( level );
- if ( the_semaphore->count <= the_semaphore->Attributes.maximum_count )
- the_semaphore->count += 1;
- else
- status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
- _ISR_Enable( level );
- }
-
- return status;
-}
-
diff --git a/cpukit/score/src/coretod.c b/cpukit/score/src/coretod.c
deleted file mode 100644
index ef1091e1d2..0000000000
--- a/cpukit/score/src/coretod.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Time of Day (TOD) Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/tod.h>
-#include <rtems/score/watchdog.h>
-
-/*PAGE
- *
- * _TOD_Handler_initialization
- *
- * This routine initializes the time of day handler.
- *
- * Input parameters:
- * microseconds_per_tick - microseconds between clock ticks
- *
- * Output parameters: NONE
- */
-
-void _TOD_Handler_initialization(
- unsigned32 microseconds_per_tick
-)
-{
- _TOD_Microseconds_per_tick = microseconds_per_tick;
-
- _TOD_Seconds_since_epoch = 0;
-
- _TOD_Current.year = TOD_BASE_YEAR;
- _TOD_Current.month = 1;
- _TOD_Current.day = 1;
- _TOD_Current.hour = 0;
- _TOD_Current.minute = 0;
- _TOD_Current.second = 0;
- _TOD_Current.ticks = 0;
-
- if ( microseconds_per_tick == 0 )
- _TOD_Ticks_per_second = 0;
- else
- _TOD_Ticks_per_second =
- TOD_MICROSECONDS_PER_SECOND / microseconds_per_tick;
-
- _Watchdog_Initialize( &_TOD_Seconds_watchdog, _TOD_Tickle, 0, NULL );
-
- _TOD_Is_set = FALSE;
- _TOD_Activate( _TOD_Ticks_per_second );
-}
diff --git a/cpukit/score/src/coretodset.c b/cpukit/score/src/coretodset.c
deleted file mode 100644
index ddb6f8ee43..0000000000
--- a/cpukit/score/src/coretodset.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Time of Day (TOD) Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/tod.h>
-#include <rtems/score/watchdog.h>
-
-/*PAGE
- *
- * _TOD_Set
- *
- * This rountine sets the current date and time with the specified
- * new date and time structure.
- *
- * Input parameters:
- * the_tod - pointer to the time and date structure
- * seconds_since_epoch - seconds since system epoch
- *
- * Output parameters: NONE
- */
-
-void _TOD_Set(
- TOD_Control *the_tod,
- Watchdog_Interval seconds_since_epoch
-)
-{
- Watchdog_Interval ticks_until_next_second;
-
- _Thread_Disable_dispatch();
- _TOD_Deactivate();
-
- if ( seconds_since_epoch < _TOD_Seconds_since_epoch )
- _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD,
- _TOD_Seconds_since_epoch - seconds_since_epoch );
- else
- _Watchdog_Adjust_seconds( WATCHDOG_FORWARD,
- seconds_since_epoch - _TOD_Seconds_since_epoch );
-
- ticks_until_next_second = _TOD_Ticks_per_second;
- if ( ticks_until_next_second > _TOD_Current.ticks )
- ticks_until_next_second -= _TOD_Current.ticks;
-
- _TOD_Current = *the_tod;
- _TOD_Seconds_since_epoch = seconds_since_epoch;
- _TOD_Is_set = TRUE;
- _TOD_Activate( ticks_until_next_second );
-
- _Thread_Enable_dispatch();
-}
-
diff --git a/cpukit/score/src/coretodtickle.c b/cpukit/score/src/coretodtickle.c
deleted file mode 100644
index c28545f2b4..0000000000
--- a/cpukit/score/src/coretodtickle.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Time of Day (TOD) Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/tod.h>
-#include <rtems/score/watchdog.h>
-
-/*PAGE
- *
- * _TOD_Tickle
- *
- * This routine updates the calendar time and tickles the
- * per second watchdog timer chain.
- *
- * Input parameters:
- * ignored - this parameter is ignored
- *
- * Output parameters: NONE
- *
- * NOTE: This routine only works for leap-years through 2099.
- */
-
-void _TOD_Tickle(
- Objects_Id id,
- void *ignored
-)
-{
- unsigned32 leap;
-
- _TOD_Current.ticks = 0;
- ++_TOD_Seconds_since_epoch;
- if ( ++_TOD_Current.second >= TOD_SECONDS_PER_MINUTE ) {
- _TOD_Current.second = 0;
- if ( ++_TOD_Current.minute >= TOD_MINUTES_PER_HOUR ) {
- _TOD_Current.minute = 0;
- if ( ++_TOD_Current.hour >= TOD_HOURS_PER_DAY ) {
- _TOD_Current.hour = 0;
- if ( _TOD_Current.year & 0x3 ) leap = 0;
- else leap = 1;
- if ( ++_TOD_Current.day >
- _TOD_Days_per_month[ leap ][ _TOD_Current.month ]) {
- _TOD_Current.day = 1;
- if ( ++_TOD_Current.month > TOD_MONTHS_PER_YEAR ) {
- _TOD_Current.month = 1;
- _TOD_Current.year++;
- }
- }
- }
- }
- }
-
- _Watchdog_Tickle_seconds();
- _Watchdog_Insert_ticks( &_TOD_Seconds_watchdog, _TOD_Ticks_per_second );
-}
diff --git a/cpukit/score/src/coretodtoseconds.c b/cpukit/score/src/coretodtoseconds.c
deleted file mode 100644
index 16e9d24a1e..0000000000
--- a/cpukit/score/src/coretodtoseconds.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Time of Day (TOD) Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/tod.h>
-#include <rtems/score/watchdog.h>
-
-/*PAGE
- *
- * _TOD_To_seconds
- *
- * This routine returns the seconds from the epoch until the
- * current date and time.
- *
- * Input parameters:
- * the_tod - pointer to the time and date structure
- *
- * Output parameters:
- * returns - seconds since epoch until the_tod
- */
-
-unsigned32 _TOD_To_seconds(
- TOD_Control *the_tod
-)
-{
- unsigned32 time;
- unsigned32 year_mod_4;
-
- time = the_tod->day - 1;
- year_mod_4 = the_tod->year & 3;
-
- if ( year_mod_4 == 0 )
- time += _TOD_Days_to_date[ 1 ][ the_tod->month ];
- else
- time += _TOD_Days_to_date[ 0 ][ the_tod->month ];
-
- time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) *
- ( (TOD_DAYS_PER_YEAR * 4) + 1);
-
- time += _TOD_Days_since_last_leap_year[ year_mod_4 ];
-
- time *= TOD_SECONDS_PER_DAY;
-
- time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute)
- * TOD_SECONDS_PER_MINUTE;
-
- time += the_tod->second;
-
- return( time );
-}
-
diff --git a/cpukit/score/src/coretodvalidate.c b/cpukit/score/src/coretodvalidate.c
deleted file mode 100644
index 18f377e500..0000000000
--- a/cpukit/score/src/coretodvalidate.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Time of Day (TOD) Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/tod.h>
-#include <rtems/score/watchdog.h>
-
-/*PAGE
- *
- * _TOD_Validate
- *
- * This kernel routine checks the validity of a date and time structure.
- *
- * Input parameters:
- * the_tod - pointer to a time and date structure
- *
- * Output parameters:
- * TRUE - if the date, time, and tick are valid
- * FALSE - if the the_tod is invalid
- *
- * NOTE: This routine only works for leap-years through 2099.
- */
-
-boolean _TOD_Validate(
- TOD_Control *the_tod
-)
-{
- unsigned32 days_in_month;
-
- if ((the_tod->ticks >= _TOD_Ticks_per_second) ||
- (the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
- (the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
- (the_tod->hour >= TOD_HOURS_PER_DAY) ||
- (the_tod->month == 0) ||
- (the_tod->month > TOD_MONTHS_PER_YEAR) ||
- (the_tod->year < TOD_BASE_YEAR) ||
- (the_tod->day == 0) )
- return FALSE;
-
- if ( (the_tod->year % 4) == 0 )
- days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
- else
- days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
-
- if ( the_tod->day > days_in_month )
- return FALSE;
-
- return TRUE;
-}
-
diff --git a/cpukit/score/src/heap.c b/cpukit/score/src/heap.c
deleted file mode 100644
index 9ad4ca51ee..0000000000
--- a/cpukit/score/src/heap.c
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Heap Handler
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <rtems/system.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/heap.h>
-
-/*PAGE
- *
- * _Heap_Initialize
- *
- * This kernel routine initializes a heap.
- *
- * Input parameters:
- * the_heap - pointer to heap header
- * starting_address - starting address of heap
- * size - size of heap
- * page_size - allocatable unit of memory
- *
- * Output parameters:
- * returns - maximum memory available if RTEMS_SUCCESSFUL
- * 0 - otherwise
- *
- * This is what a heap looks like in memory immediately
- * after initialization:
- *
- * +--------------------------------+
- * 0 | size = 0 | status = used | a.k.a. dummy back flag
- * +--------------------------------+
- * 4 | size = size-8 | status = free | a.k.a. front flag
- * +--------------------------------+
- * 8 | next = PERM HEAP_TAIL |
- * +--------------------------------+
- * 12 | previous = PERM HEAP_HEAD |
- * +--------------------------------+
- * | |
- * | memory available |
- * | for allocation |
- * | |
- * +--------------------------------+
- * size - 8 | size = size-8 | status = free | a.k.a. back flag
- * +--------------------------------+
- * size - 4 | size = 0 | status = used | a.k.a. dummy front flag
- * +--------------------------------+
- */
-
-unsigned32 _Heap_Initialize(
- Heap_Control *the_heap,
- void *starting_address,
- unsigned32 size,
- unsigned32 page_size
-)
-{
- Heap_Block *the_block;
- unsigned32 the_size;
-
- if ( !_Heap_Is_page_size_valid( page_size ) ||
- (size < HEAP_MINIMUM_SIZE) )
- return 0;
-
- the_heap->page_size = page_size;
- the_size = size - HEAP_OVERHEAD;
-
- the_block = (Heap_Block *) starting_address;
- the_block->back_flag = HEAP_DUMMY_FLAG;
- the_block->front_flag = the_size;
- the_block->next = _Heap_Tail( the_heap );
- the_block->previous = _Heap_Head( the_heap );
-
- the_heap->start = the_block;
- the_heap->first = the_block;
- the_heap->permanent_null = NULL;
- the_heap->last = the_block;
-
- the_block = _Heap_Next_block( the_block );
- the_block->back_flag = the_size;
- the_block->front_flag = HEAP_DUMMY_FLAG;
- the_heap->final = the_block;
-
- return ( the_size - HEAP_BLOCK_USED_OVERHEAD );
-}
-
diff --git a/cpukit/score/src/heapallocate.c b/cpukit/score/src/heapallocate.c
deleted file mode 100644
index 661a4ba0f7..0000000000
--- a/cpukit/score/src/heapallocate.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Heap Handler
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <rtems/system.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/heap.h>
-
-/*PAGE
- *
- * _Heap_Allocate
- *
- * This kernel routine allocates the requested size of memory
- * from the specified heap.
- *
- * Input parameters:
- * the_heap - pointer to heap header.
- * size - size in bytes of the memory block to allocate.
- *
- * Output parameters:
- * returns - starting address of memory block allocated
- */
-
-void *_Heap_Allocate(
- Heap_Control *the_heap,
- unsigned32 size
-)
-{
- unsigned32 excess;
- unsigned32 the_size;
- Heap_Block *the_block;
- Heap_Block *next_block;
- Heap_Block *temporary_block;
- void *ptr;
- unsigned32 offset;
-
- excess = size % the_heap->page_size;
- the_size = size + the_heap->page_size + HEAP_BLOCK_USED_OVERHEAD;
-
- if ( excess )
- the_size += the_heap->page_size - excess;
-
- if ( the_size < sizeof( Heap_Block ) )
- the_size = sizeof( Heap_Block );
-
- for ( the_block = the_heap->first;
- ;
- the_block = the_block->next ) {
- if ( the_block == _Heap_Tail( the_heap ) )
- return( NULL );
- if ( the_block->front_flag >= the_size )
- break;
- }
-
- if ( (the_block->front_flag - the_size) >
- (the_heap->page_size + HEAP_BLOCK_USED_OVERHEAD) ) {
- the_block->front_flag -= the_size;
- next_block = _Heap_Next_block( the_block );
- next_block->back_flag = the_block->front_flag;
-
- temporary_block = _Heap_Block_at( next_block, the_size );
- temporary_block->back_flag =
- next_block->front_flag = _Heap_Build_flag( the_size,
- HEAP_BLOCK_USED );
- ptr = _Heap_Start_of_user_area( next_block );
- } else {
- next_block = _Heap_Next_block( the_block );
- next_block->back_flag = _Heap_Build_flag( the_block->front_flag,
- HEAP_BLOCK_USED );
- the_block->front_flag = next_block->back_flag;
- the_block->next->previous = the_block->previous;
- the_block->previous->next = the_block->next;
- ptr = _Heap_Start_of_user_area( the_block );
- }
-
- /*
- * round ptr up to a multiple of page size
- * Have to save the bump amount in the buffer so that free can figure it out
- */
-
- offset = the_heap->page_size - (((unsigned32) ptr) & (the_heap->page_size - 1));
- ptr = _Addresses_Add_offset( ptr, offset );
- *(((unsigned32 *) ptr) - 1) = offset;
-
-#ifdef RTEMS_DEBUG
- {
- unsigned32 ptr_u32;
- ptr_u32 = (unsigned32) ptr;
- if (ptr_u32 & (the_heap->page_size - 1))
- abort();
- }
-#endif
-
- return ptr;
-}
-
diff --git a/cpukit/score/src/heapextend.c b/cpukit/score/src/heapextend.c
deleted file mode 100644
index 3b928301ae..0000000000
--- a/cpukit/score/src/heapextend.c
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Heap Handler
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <rtems/system.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/heap.h>
-
-/*PAGE
- *
- * _Heap_Extend
- *
- * This routine grows the_heap memory area using the size bytes which
- * begin at starting_address.
- *
- * Input parameters:
- * the_heap - pointer to heap header.
- * starting_address - pointer to the memory area.
- * size - size in bytes of the memory block to allocate.
- *
- * Output parameters:
- * *amount_extended - amount of memory added to the_heap
- */
-
-Heap_Extend_status _Heap_Extend(
- Heap_Control *the_heap,
- void *starting_address,
- unsigned32 size,
- unsigned32 *amount_extended
-)
-{
- Heap_Block *the_block;
- unsigned32 *p;
-
- /*
- * The overhead was taken from the original heap memory.
- */
-
- Heap_Block *old_final;
- Heap_Block *new_final;
-
- /*
- * There are five possibilities for the location of starting
- * address:
- *
- * 1. non-contiguous lower address (NOT SUPPORTED)
- * 2. contiguous lower address (NOT SUPPORTED)
- * 3. in the heap (ERROR)
- * 4. contiguous higher address (SUPPORTED)
- * 5. non-contiguous higher address (NOT SUPPORTED)
- *
- * As noted, this code only supports (4).
- */
-
- if ( starting_address >= (void *) the_heap->start && /* case 3 */
- starting_address <= (void *) the_heap->final
- )
- return HEAP_EXTEND_ERROR;
-
- if ( starting_address < (void *) the_heap->start ) { /* cases 1 and 2 */
-
- return HEAP_EXTEND_NOT_IMPLEMENTED; /* cases 1 and 2 */
-
- } else { /* cases 4 and 5 */
-
- the_block = (Heap_Block *)
- _Addresses_Subtract_offset( starting_address, HEAP_OVERHEAD );
- if ( the_block != the_heap->final )
- return HEAP_EXTEND_NOT_IMPLEMENTED; /* case 5 */
- }
-
- /*
- * Currently only case 4 should make it to this point.
- * The basic trick is to make the extend area look like a used
- * block and free it.
- */
-
- *amount_extended = size;
-
- old_final = the_heap->final;
- new_final = _Addresses_Add_offset( old_final, size );
- /* SAME AS: _Addresses_Add_offset( starting_address, size-HEAP_OVERHEAD ); */
-
- the_heap->final = new_final;
-
- old_final->front_flag =
- new_final->back_flag = _Heap_Build_flag( size, HEAP_BLOCK_USED );
- new_final->front_flag = HEAP_DUMMY_FLAG;
-
- /*
- * Must pass in address of "user" area
- * So add in the offset field.
- */
-
- p = (unsigned32 *) &old_final->next;
- *p = sizeof(unsigned32);
- p++;
- _Heap_Free( the_heap, p );
-
- return HEAP_EXTEND_SUCCESSFUL;
-}
-
diff --git a/cpukit/score/src/heapfree.c b/cpukit/score/src/heapfree.c
deleted file mode 100644
index 1571e1ea2b..0000000000
--- a/cpukit/score/src/heapfree.c
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Heap Handler
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <rtems/system.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/heap.h>
-
-/*PAGE
- *
- * _Heap_Free
- *
- * This kernel routine returns the memory designated by the
- * given heap and given starting address to the memory pool.
- *
- * Input parameters:
- * the_heap - pointer to heap header
- * starting_address - starting address of the memory block to free.
- *
- * Output parameters:
- * TRUE - if starting_address is valid heap address
- * FALSE - if starting_address is invalid heap address
- */
-
-boolean _Heap_Free(
- Heap_Control *the_heap,
- void *starting_address
-)
-{
- Heap_Block *the_block;
- Heap_Block *next_block;
- Heap_Block *new_next_block;
- Heap_Block *previous_block;
- Heap_Block *temporary_block;
- unsigned32 the_size;
-
- the_block = _Heap_User_block_at( starting_address );
-
- if ( !_Heap_Is_block_in( the_heap, the_block ) ||
- _Heap_Is_block_free( the_block ) ) {
- return( FALSE );
- }
-
- the_size = _Heap_Block_size( the_block );
- next_block = _Heap_Block_at( the_block, the_size );
-
- if ( !_Heap_Is_block_in( the_heap, next_block ) ||
- (the_block->front_flag != next_block->back_flag) ) {
- return( FALSE );
- }
-
- if ( _Heap_Is_previous_block_free( the_block ) ) {
- previous_block = _Heap_Previous_block( the_block );
-
- if ( !_Heap_Is_block_in( the_heap, previous_block ) ) {
- return( FALSE );
- }
-
- if ( _Heap_Is_block_free( next_block ) ) { /* coalesce both */
- previous_block->front_flag += next_block->front_flag + the_size;
- temporary_block = _Heap_Next_block( previous_block );
- temporary_block->back_flag = previous_block->front_flag;
- next_block->next->previous = next_block->previous;
- next_block->previous->next = next_block->next;
- }
- else { /* coalesce prev */
- previous_block->front_flag =
- next_block->back_flag = previous_block->front_flag + the_size;
- }
- }
- else if ( _Heap_Is_block_free( next_block ) ) { /* coalesce next */
- the_block->front_flag = the_size + next_block->front_flag;
- new_next_block = _Heap_Next_block( the_block );
- new_next_block->back_flag = the_block->front_flag;
- the_block->next = next_block->next;
- the_block->previous = next_block->previous;
- next_block->previous->next = the_block;
- next_block->next->previous = the_block;
-
- if (the_heap->first == next_block)
- the_heap->first = the_block;
- }
- else { /* no coalesce */
- next_block->back_flag =
- the_block->front_flag = the_size;
- the_block->previous = _Heap_Head( the_heap );
- the_block->next = the_heap->first;
- the_heap->first = the_block;
- the_block->next->previous = the_block;
- }
-
- return( TRUE );
-}
-
diff --git a/cpukit/score/src/heapsizeofuserarea.c b/cpukit/score/src/heapsizeofuserarea.c
deleted file mode 100644
index 243d1844e6..0000000000
--- a/cpukit/score/src/heapsizeofuserarea.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Heap Handler
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <rtems/system.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/heap.h>
-
-/*PAGE
- *
- * _Heap_Size_of_user_area
- *
- * This kernel routine returns the size of the memory area
- * given heap block.
- *
- * Input parameters:
- * the_heap - pointer to heap header
- * starting_address - starting address of the memory block to free.
- * size - pointer to size of area
- *
- * Output parameters:
- * size - size of area filled in
- * TRUE - if starting_address is valid heap address
- * FALSE - if starting_address is invalid heap address
- */
-
-boolean _Heap_Size_of_user_area(
- Heap_Control *the_heap,
- void *starting_address,
- unsigned32 *size
-)
-{
- Heap_Block *the_block;
- Heap_Block *next_block;
- unsigned32 the_size;
-
- the_block = _Heap_User_block_at( starting_address );
-
- if ( !_Heap_Is_block_in( the_heap, the_block ) ||
- _Heap_Is_block_free( the_block ) )
- return( FALSE );
-
- the_size = _Heap_Block_size( the_block );
- next_block = _Heap_Block_at( the_block, the_size );
-
- if ( !_Heap_Is_block_in( the_heap, next_block ) ||
- (the_block->front_flag != next_block->back_flag) )
- return( FALSE );
-
- *size = the_size;
- return( TRUE );
-}
-
diff --git a/cpukit/score/src/heapwalk.c b/cpukit/score/src/heapwalk.c
deleted file mode 100644
index 3cd9c356ae..0000000000
--- a/cpukit/score/src/heapwalk.c
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * Heap Handler
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <rtems/system.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/heap.h>
-
-/*PAGE
- *
- * _Heap_Walk
- *
- * This kernel routine walks the heap and verifies its correctness.
- *
- * Input parameters:
- * the_heap - pointer to heap header
- * source - a numeric indicator of the invoker of this routine
- * do_dump - when TRUE print the information
- *
- * Output parameters: NONE
- */
-
-#ifndef RTEMS_DEBUG
-
-void _Heap_Walk(
- Heap_Control *the_heap,
- int source,
- boolean do_dump
-)
-{
-}
-
-#else
-
-#include <stdio.h>
-#include <unistd.h>
-
-void _Heap_Walk(
- Heap_Control *the_heap,
- int source,
- boolean do_dump
-)
-{
- Heap_Block *the_block = 0; /* avoid warnings */
- Heap_Block *next_block = 0; /* avoid warnings */
- int notdone = 1;
- int error = 0;
- int passes = 0;
-
- /*
- * We don't want to allow walking the heap until we have
- * transferred control to the user task so we watch the
- * system state.
- */
-
- if ( !_System_state_Is_up( _System_state_Get() ) )
- return;
-
- the_block = the_heap->start;
-
- if (do_dump == TRUE) {
- printf("\nPASS: %d start @ 0x%p final 0x%p, first 0x%p last 0x%p\n",
- source, the_heap->start, the_heap->final,
- the_heap->first, the_heap->last
- );
- }
-
- /*
- * Handle the 1st block
- */
-
- if (the_block->back_flag != HEAP_DUMMY_FLAG) {
- printf("PASS: %d Back flag of 1st block isn't HEAP_DUMMY_FLAG\n", source);
- error = 1;
- }
-
- while (notdone) {
- passes++;
- if (error && (passes > 10))
- abort();
-
- if (do_dump == TRUE) {
- printf("PASS: %d Block @ 0x%p Back %d, Front %d",
- source, the_block,
- the_block->back_flag, the_block->front_flag);
- if ( _Heap_Is_block_free(the_block) ) {
- printf( " Prev 0x%p, Next 0x%p\n",
- the_block->previous, the_block->next);
- } else {
- printf("\n");
- }
- }
-
- /*
- * Handle the last block
- */
-
- if ( the_block->front_flag != HEAP_DUMMY_FLAG ) {
- next_block = _Heap_Next_block(the_block);
- if ( the_block->front_flag != next_block->back_flag ) {
- error = 1;
- printf("PASS: %d Front and back flags don't match\n", source);
- printf(" Current Block (%p): Back - %d, Front - %d",
- the_block, the_block->back_flag, the_block->front_flag);
- if (do_dump == TRUE) {
- if (_Heap_Is_block_free(the_block)) {
- printf(" Prev 0x%p, Next 0x%p\n",
- the_block->previous, the_block->next);
- } else {
- printf("\n");
- }
- } else {
- printf("\n");
- }
- printf(" Next Block (%p): Back - %d, Front - %d",
- next_block, next_block->back_flag, next_block->front_flag);
- if (do_dump == TRUE) {
- if (_Heap_Is_block_free(next_block)) {
- printf(" Prev 0x%p, Next 0x%p\n",
- the_block->previous, the_block->next);
- } else {
- printf("\n");
- }
- } else {
- printf("\n");
- }
- }
- }
-
- if (the_block->front_flag == HEAP_DUMMY_FLAG)
- notdone = 0;
- else
- the_block = next_block;
- }
-
- if (error)
- abort();
-}
-#endif
diff --git a/cpukit/score/src/interr.c b/cpukit/score/src/interr.c
deleted file mode 100644
index e2a4d078bb..0000000000
--- a/cpukit/score/src/interr.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Internal Error Handler
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/userext.h>
-
-/*PAGE
- *
- * _Internal_error_Occurred
- *
- * This routine will invoke the fatal error handler supplied by the user
- * followed by the the default one provided by the executive. The default
- * error handler assumes no hardware is present to help inform the user
- * of the problem. Halt stores the error code in a known register,
- * disables interrupts, and halts the CPU. If the CPU does not have a
- * halt instruction, it will loop to itself.
- *
- * Input parameters:
- * the_source - what subsystem the error originated in
- * is_internal - if the error was internally generated
- * the_error - fatal error status code
- *
- * Output parameters:
- * As much information as possible is stored in a CPU dependent fashion.
- * See the CPU dependent code for more information.
- *
- * NOTE: The the_error is not necessarily a directive status code.
- */
-
-void volatile _Internal_error_Occurred(
- Internal_errors_Source the_source,
- boolean is_internal,
- unsigned32 the_error
-)
-{
-
- Internal_errors_What_happened.the_source = the_source;
- Internal_errors_What_happened.is_internal = is_internal;
- Internal_errors_What_happened.the_error = the_error;
-
- _User_extensions_Fatal( the_source, is_internal, the_error );
-
- _System_state_Set( SYSTEM_STATE_FAILED );
-
- _CPU_Fatal_halt( the_error );
-
- /* will not return from this routine */
-}
diff --git a/cpukit/score/src/isr.c b/cpukit/score/src/isr.c
deleted file mode 100644
index b187fda581..0000000000
--- a/cpukit/score/src/isr.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * ISR Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/stack.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/wkspace.h>
-
-/* _ISR_Handler_initialization
- *
- * This routine initializes the ISR handler.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- */
-
-void _ISR_Handler_initialization( void )
-{
- _ISR_Signals_to_thread_executing = FALSE;
-
- _ISR_Nest_level = 0;
-
-#if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE )
-
- if ( _CPU_Table.interrupt_stack_size < STACK_MINIMUM_SIZE )
- _Internal_error_Occurred(
- INTERNAL_ERROR_CORE,
- TRUE,
- INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL
- );
-
- _CPU_Interrupt_stack_low =
- _Workspace_Allocate_or_fatal_error( _CPU_Table.interrupt_stack_size );
-
- _CPU_Interrupt_stack_high = _Addresses_Add_offset(
- _CPU_Interrupt_stack_low,
- _CPU_Table.interrupt_stack_size
- );
-
-#endif
-
-#if ( CPU_HAS_HARDWARE_INTERRUPT_STACK == TRUE )
- _CPU_Install_interrupt_stack();
-#endif
-
-}
diff --git a/cpukit/score/src/mpci.c b/cpukit/score/src/mpci.c
deleted file mode 100644
index fb51a5f494..0000000000
--- a/cpukit/score/src/mpci.c
+++ /dev/null
@@ -1,526 +0,0 @@
-/*
- * Multiprocessing Communications Interface (MPCI) Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/cpu.h>
-#include <rtems/score/interr.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#include <rtems/score/mppkt.h>
-#endif
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/tqdata.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/score/sysstate.h>
-
-#include <rtems/score/coresem.h>
-
-/*PAGE
- *
- * _MPCI_Handler_initialization
- *
- * This subprogram performs the initialization necessary for this handler.
- */
-
-void _MPCI_Handler_initialization(
- MPCI_Control *users_mpci_table,
- unsigned32 timeout_status
-)
-{
- CORE_semaphore_Attributes attributes;
-
- if ( _System_state_Is_multiprocessing && !users_mpci_table )
- _Internal_error_Occurred(
- INTERNAL_ERROR_CORE,
- TRUE,
- INTERNAL_ERROR_NO_MPCI
- );
-
- _MPCI_table = users_mpci_table;
-
- if ( !_System_state_Is_multiprocessing )
- return;
-
- /*
- * Register the MP Process Packet routine.
- */
-
- _MPCI_Register_packet_processor(
- MP_PACKET_MPCI_INTERNAL,
- _MPCI_Internal_packets_Process_packet
- );
-
- /*
- * Create the counting semaphore used by the MPCI Receive Server.
- */
-
- attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO;
-
- _CORE_semaphore_Initialize(
- &_MPCI_Semaphore,
- OBJECTS_NO_CLASS, /* free floating semaphore */
- &attributes, /* the_semaphore_attributes */
- 0, /* initial_value */
- NULL /* proxy_extract_callout */
- );
-
- _Thread_queue_Initialize(
- &_MPCI_Remote_blocked_threads,
- OBJECTS_NO_CLASS,
- THREAD_QUEUE_DISCIPLINE_FIFO,
- STATES_WAITING_FOR_RPC_REPLY,
- NULL,
- timeout_status
- );
-}
-
-/*PAGE
- *
- * _MPCI_Create_server
- *
- * This subprogram creates the MPCI receive server.
- */
-
-char *_MPCI_Internal_name = "MPCI";
-
-void _MPCI_Create_server( void )
-{
-
- if ( !_System_state_Is_multiprocessing )
- return;
-
- /*
- * Initialize the MPCI Receive Server
- */
-
- _MPCI_Receive_server_tcb = _Thread_Internal_allocate();
-
- _Thread_Initialize(
- &_Thread_Internal_information,
- _MPCI_Receive_server_tcb,
- NULL, /* allocate the stack */
- MPCI_RECEIVE_SERVER_STACK_SIZE,
- CPU_ALL_TASKS_ARE_FP,
- PRIORITY_MINIMUM,
- FALSE, /* no preempt */
- THREAD_CPU_BUDGET_ALGORITHM_NONE,
- NULL, /* no budget algorithm callout */
- 0, /* all interrupts enabled */
- _MPCI_Internal_name
- );
-
- _Thread_Start(
- _MPCI_Receive_server_tcb,
- THREAD_START_NUMERIC,
- (void *) _MPCI_Receive_server,
- NULL,
- 0
- );
-}
-
-/*PAGE
- *
- * _MPCI_Initialization
- *
- * This subprogram initializes the MPCI driver by
- * invoking the user provided MPCI initialization callout.
- */
-
-void _MPCI_Initialization ( void )
-{
- (*_MPCI_table->initialization)();
-}
-
-/*PAGE
- *
- * _MPCI_Register_packet_processor
- *
- * This routine registers the MPCI packet processor for the
- * designated object class.
- */
-
-void _MPCI_Register_packet_processor(
- MP_packet_Classes the_class,
- MPCI_Packet_processor the_packet_processor
-
-)
-{
- _MPCI_Packet_processors[ the_class ] = the_packet_processor;
-}
-
-/*PAGE
- *
- * _MPCI_Get_packet
- *
- * This subprogram obtains a packet by invoking the user provided
- * MPCI get packet callout.
- */
-
-MP_packet_Prefix *_MPCI_Get_packet ( void )
-{
- MP_packet_Prefix *the_packet;
-
- (*_MPCI_table->get_packet)( &the_packet );
-
- if ( the_packet == NULL )
- _Internal_error_Occurred(
- INTERNAL_ERROR_CORE,
- TRUE,
- INTERNAL_ERROR_OUT_OF_PACKETS
- );
-
- /*
- * Put in a default timeout that will be used for
- * all packets that do not otherwise have a timeout.
- */
-
- the_packet->timeout = MPCI_DEFAULT_TIMEOUT;
-
- return the_packet;
-}
-
-/*PAGE
- *
- * _MPCI_Return_packet
- *
- * This subprogram returns a packet by invoking the user provided
- * MPCI return packet callout.
- */
-
-void _MPCI_Return_packet (
- MP_packet_Prefix *the_packet
-)
-{
- (*_MPCI_table->return_packet)( the_packet );
-}
-
-/*PAGE
- *
- * _MPCI_Send_process_packet
- *
- * This subprogram sends a process packet by invoking the user provided
- * MPCI send callout.
- */
-
-void _MPCI_Send_process_packet (
- unsigned32 destination,
- MP_packet_Prefix *the_packet
-)
-{
- the_packet->source_tid = _Thread_Executing->Object.id;
- the_packet->to_convert =
- ( the_packet->to_convert - sizeof(MP_packet_Prefix) ) /
- sizeof(unsigned32);
-
- (*_MPCI_table->send_packet)( destination, the_packet );
-}
-
-/*PAGE
- *
- * _MPCI_Send_request_packet
- *
- * This subprogram sends a request packet by invoking the user provided
- * MPCI send callout.
- */
-
-unsigned32 _MPCI_Send_request_packet (
- unsigned32 destination,
- MP_packet_Prefix *the_packet,
- States_Control extra_state
-)
-{
- the_packet->source_tid = _Thread_Executing->Object.id;
- the_packet->source_priority = _Thread_Executing->current_priority;
- the_packet->to_convert =
- ( the_packet->to_convert - sizeof(MP_packet_Prefix) ) /
- sizeof(unsigned32);
-
- _Thread_Executing->Wait.id = the_packet->id;
-
- _Thread_Executing->Wait.queue = &_MPCI_Remote_blocked_threads;
-
- _Thread_Disable_dispatch();
-
- (*_MPCI_table->send_packet)( destination, the_packet );
-
- _Thread_queue_Enter_critical_section( &_MPCI_Remote_blocked_threads );
-
- /*
- * See if we need a default timeout
- */
-
- if (the_packet->timeout == MPCI_DEFAULT_TIMEOUT)
- the_packet->timeout = _MPCI_table->default_timeout;
-
- _Thread_queue_Enqueue( &_MPCI_Remote_blocked_threads, the_packet->timeout );
-
- _Thread_Executing->current_state =
- _States_Set( extra_state, _Thread_Executing->current_state );
-
- _Thread_Enable_dispatch();
-
- return _Thread_Executing->Wait.return_code;
-}
-
-/*PAGE
- *
- * _MPCI_Send_response_packet
- *
- * This subprogram sends a response packet by invoking the user provided
- * MPCI send callout.
- */
-
-void _MPCI_Send_response_packet (
- unsigned32 destination,
- MP_packet_Prefix *the_packet
-)
-{
- the_packet->source_tid = _Thread_Executing->Object.id;
-
- (*_MPCI_table->send_packet)( destination, the_packet );
-}
-
-/*PAGE
- *
- * _MPCI_Receive_packet
- *
- * This subprogram receives a packet by invoking the user provided
- * MPCI receive callout.
- */
-
-MP_packet_Prefix *_MPCI_Receive_packet ( void )
-{
- MP_packet_Prefix *the_packet;
-
- (*_MPCI_table->receive_packet)( &the_packet );
-
- return the_packet;
-}
-
-/*PAGE
- *
- * _MPCI_Process_response
- *
- * This subprogram obtains a packet by invoking the user provided
- * MPCI get packet callout.
- */
-
-Thread_Control *_MPCI_Process_response (
- MP_packet_Prefix *the_packet
-)
-{
- Thread_Control *the_thread;
- Objects_Locations location;
-
- the_thread = _Thread_Get( the_packet->id, &location );
- switch ( location ) {
- case OBJECTS_ERROR:
- case OBJECTS_REMOTE:
- the_thread = NULL; /* IMPOSSIBLE */
- break;
- case OBJECTS_LOCAL:
- _Thread_queue_Extract( &_MPCI_Remote_blocked_threads, the_thread );
- the_thread->Wait.return_code = the_packet->return_code;
- _Thread_Unnest_dispatch();
- break;
- }
-
- return the_thread;
-}
-
-/*PAGE
- *
- * _MPCI_Receive_server
- *
- */
-
-Thread _MPCI_Receive_server(
- unsigned32 ignored
-)
-{
-
- MP_packet_Prefix *the_packet;
- MPCI_Packet_processor the_function;
- Thread_Control *executing;
-
- executing = _Thread_Executing;
-
- for ( ; ; ) {
-
- executing->receive_packet = NULL;
-
- _Thread_Disable_dispatch();
- _CORE_semaphore_Seize( &_MPCI_Semaphore, 0, TRUE, WATCHDOG_NO_TIMEOUT );
- _Thread_Enable_dispatch();
-
- for ( ; ; ) {
- the_packet = _MPCI_Receive_packet();
-
- if ( !the_packet )
- break;
-
- executing->receive_packet = the_packet;
-
- if ( !_Mp_packet_Is_valid_packet_class ( the_packet->the_class ) )
- break;
-
- the_function = _MPCI_Packet_processors[ the_packet->the_class ];
-
- if ( !the_function )
- _Internal_error_Occurred(
- INTERNAL_ERROR_CORE,
- TRUE,
- INTERNAL_ERROR_BAD_PACKET
- );
-
- (*the_function)( the_packet );
- }
- }
-}
-
-/*PAGE
- *
- * _MPCI_Announce
- *
- */
-
-void _MPCI_Announce ( void )
-{
- _Thread_Disable_dispatch();
- (void) _CORE_semaphore_Surrender( &_MPCI_Semaphore, 0, 0 );
- _Thread_Enable_dispatch();
-}
-
-/*PAGE
- *
- * _MPCI_Internal_packets_Send_process_packet
- *
- */
-
-void _MPCI_Internal_packets_Send_process_packet (
- MPCI_Internal_Remote_operations operation
-)
-{
- MPCI_Internal_packet *the_packet;
-
- switch ( operation ) {
-
- case MPCI_PACKETS_SYSTEM_VERIFY:
-
- the_packet = _MPCI_Internal_packets_Get_packet();
- the_packet->Prefix.the_class = MP_PACKET_MPCI_INTERNAL;
- the_packet->Prefix.length = sizeof ( MPCI_Internal_packet );
- the_packet->Prefix.to_convert = sizeof ( MPCI_Internal_packet );
- the_packet->operation = operation;
-
- the_packet->maximum_nodes = _Objects_Maximum_nodes;
-
- the_packet->maximum_global_objects = _Objects_MP_Maximum_global_objects;
-
- _MPCI_Send_process_packet( MPCI_ALL_NODES, &the_packet->Prefix );
- break;
- }
-}
-
-/*PAGE
- *
- * _MPCI_Internal_packets_Send_request_packet
- *
- * This subprogram is not needed since there are no request
- * packets to be sent by this manager.
- *
- */
-
-/*PAGE
- *
- * _MPCI_Internal_packets_Send_response_packet
- *
- * This subprogram is not needed since there are no response
- * packets to be sent by this manager.
- *
- */
-
-/*PAGE
- *
- *
- * _MPCI_Internal_packets_Process_packet
- *
- */
-
-void _MPCI_Internal_packets_Process_packet (
- MP_packet_Prefix *the_packet_prefix
-)
-{
- MPCI_Internal_packet *the_packet;
- unsigned32 maximum_nodes;
- unsigned32 maximum_global_objects;
-
- the_packet = (MPCI_Internal_packet *) the_packet_prefix;
-
- switch ( the_packet->operation ) {
-
- case MPCI_PACKETS_SYSTEM_VERIFY:
-
- maximum_nodes = the_packet->maximum_nodes;
- maximum_global_objects = the_packet->maximum_global_objects;
- if ( maximum_nodes != _Objects_Maximum_nodes ||
- maximum_global_objects != _Objects_MP_Maximum_global_objects ) {
-
- _MPCI_Return_packet( the_packet_prefix );
-
- _Internal_error_Occurred(
- INTERNAL_ERROR_CORE,
- TRUE,
- INTERNAL_ERROR_INCONSISTENT_MP_INFORMATION
- );
- }
-
- _MPCI_Return_packet( the_packet_prefix );
-
- break;
- }
-}
-
-/*PAGE
- *
- * _MPCI_Internal_packets_Send_object_was_deleted
- *
- * This subprogram is not needed since there are no objects
- * deleted by this manager.
- *
- */
-
-/*PAGE
- *
- * _MPCI_Internal_packets_Send_extract_proxy
- *
- * This subprogram is not needed since there are no objects
- * deleted by this manager.
- *
- */
-
-/*PAGE
- *
- * _MPCI_Internal_packets_Get_packet
- *
- */
-
-MPCI_Internal_packet *_MPCI_Internal_packets_Get_packet ( void )
-{
- return ( (MPCI_Internal_packet *) _MPCI_Get_packet() );
-}
-
-/* end of file */
diff --git a/cpukit/score/src/object.c b/cpukit/score/src/object.c
deleted file mode 100644
index 5d3ffb5916..0000000000
--- a/cpukit/score/src/object.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Object Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/address.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/object.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/objectmp.h>
-#endif
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/isr.h>
-
-/*PAGE
- *
- * _Objects_Handler_initialization
- *
- * This routine initializes the object handler.
- *
- * Input parameters:
- * node - local node
- * maximum_nodes - number of nodes in the system
- * maximum_global_objects - number of configured global objects
- *
- * Output parameters: NONE
- */
-
-void _Objects_Handler_initialization(
- unsigned32 node,
- unsigned32 maximum_nodes,
- unsigned32 maximum_global_objects
-)
-{
- if ( node < 1 || node > maximum_nodes )
- _Internal_error_Occurred(
- INTERNAL_ERROR_CORE,
- TRUE,
- INTERNAL_ERROR_INVALID_NODE
- );
-
- _Objects_Local_node = node;
- _Objects_Maximum_nodes = maximum_nodes;
-
-#if defined(RTEMS_MULTIPROCESSING)
- _Objects_MP_Handler_initialization(
- node,
- maximum_nodes,
- maximum_global_objects
- );
-#endif
-}
diff --git a/cpukit/score/src/objectallocate.c b/cpukit/score/src/objectallocate.c
deleted file mode 100644
index 9d7193fc7a..0000000000
--- a/cpukit/score/src/objectallocate.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Object Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/address.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/object.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/objectmp.h>
-#endif
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/isr.h>
-
-/*PAGE
- *
- * _Objects_Allocate
- *
- * DESCRIPTION:
- *
- * This function allocates a object control block from
- * the inactive chain of free object control blocks.
- */
-
-Objects_Control *_Objects_Allocate(
- Objects_Information *information
-)
-{
- Objects_Control *the_object =
- (Objects_Control *) _Chain_Get( &information->Inactive );
-
- if ( information->auto_extend ) {
- /*
- * If the list is empty then we are out of objects and need to
- * extend information base.
- */
-
- if ( !the_object ) {
- _Objects_Extend_information( information );
- the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
- }
-
- if ( the_object ) {
- unsigned32 block;
-
- block = _Objects_Get_index( the_object->id ) -
- _Objects_Get_index( information->minimum_id );
- block /= information->allocation_size;
-
- information->inactive_per_block[ block ]--;
- information->inactive--;
- }
- }
-
- return the_object;
-}
diff --git a/cpukit/score/src/objectallocatebyindex.c b/cpukit/score/src/objectallocatebyindex.c
deleted file mode 100644
index d46399c535..0000000000
--- a/cpukit/score/src/objectallocatebyindex.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Object Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/address.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/object.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/objectmp.h>
-#endif
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/isr.h>
-
-/*PAGE
- *
- * _Objects_Allocate_by_index
- *
- * DESCRIPTION:
- *
- * This function allocates the object control block
- * specified by the index from the inactive chain of
- * free object control blocks.
- */
-
-Objects_Control *_Objects_Allocate_by_index(
- Objects_Information *information,
- unsigned32 index,
- unsigned32 sizeof_control
-)
-{
- Objects_Control *the_object;
-
- if ( index && information->maximum >= index ) {
- the_object = _Objects_Get_local_object( information, index );
- if ( the_object )
- return NULL;
-
- /* XXX
- * This whole section of code needs to be addressed.
- * + The 0 should be dealt with more properly so we can autoextend.
- * + The pointer arithmetic is probably too expensive.
- * + etc.
- */
-
- the_object = (Objects_Control *) _Addresses_Add_offset(
- information->object_blocks[ 0 ],
- (sizeof_control * (index - 1))
- );
- _Chain_Extract( &the_object->Node );
-
- return the_object;
- }
-
- /*
- * Autoextend will have to be thought out as it applies
- * to user assigned indices.
- */
-
- return NULL;
-}
diff --git a/cpukit/score/src/objectclearname.c b/cpukit/score/src/objectclearname.c
deleted file mode 100644
index 639a9de458..0000000000
--- a/cpukit/score/src/objectclearname.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Object Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/address.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/object.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/objectmp.h>
-#endif
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/isr.h>
-
-/*PAGE
- *
- * _Objects_Clear_name
- *
- * This method clears the specified name so that no caller can do a name to
- * ID/object lookup past this point.
- */
-
-void _Objects_Clear_name(
- void *name,
- unsigned32 length
-)
-{
- unsigned32 index;
- unsigned32 maximum = length / OBJECTS_NAME_ALIGNMENT;
- unsigned32 *name_ptr = (unsigned32 *) name;
-
- for ( index=0 ; index < maximum ; index++ )
- *name_ptr++ = 0;
-}
diff --git a/cpukit/score/src/objectcomparenameraw.c b/cpukit/score/src/objectcomparenameraw.c
deleted file mode 100644
index 2092d7f822..0000000000
--- a/cpukit/score/src/objectcomparenameraw.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Object Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/address.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/object.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/objectmp.h>
-#endif
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/isr.h>
-
-/*PAGE
- *
- * _Objects_Compare_name_raw
- *
- * XXX
- */
-
-boolean _Objects_Compare_name_raw(
- void *name_1,
- void *name_2,
- unsigned32 length
-)
-{
- unsigned32 *name_1_p = (unsigned32 *) name_1;
- unsigned32 *name_2_p = (unsigned32 *) name_2;
- unsigned32 tmp_length = length / OBJECTS_NAME_ALIGNMENT;
-
- while ( tmp_length-- )
- if ( *name_1_p++ != *name_2_p++ )
- return FALSE;
-
- return TRUE;
-}
diff --git a/cpukit/score/src/objectcomparenamestring.c b/cpukit/score/src/objectcomparenamestring.c
deleted file mode 100644
index 9b1067bacb..0000000000
--- a/cpukit/score/src/objectcomparenamestring.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Object Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/address.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/object.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/objectmp.h>
-#endif
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/isr.h>
-
-/*PAGE
- *
- * _Objects_Compare_name_string
- *
- * XXX
- */
-
-boolean _Objects_Compare_name_string(
- void *name_1,
- void *name_2,
- unsigned32 length
-)
-{
- unsigned8 *name_1_p = (unsigned8 *) name_1;
- unsigned8 *name_2_p = (unsigned8 *) name_2;
- unsigned32 tmp_length = length;
-
- do {
- if ( *name_1_p++ != *name_2_p++ )
- return FALSE;
- if ( !tmp_length-- )
- return FALSE;
- } while ( *name_1_p );
-
- return TRUE;
-}
diff --git a/cpukit/score/src/objectcopynameraw.c b/cpukit/score/src/objectcopynameraw.c
deleted file mode 100644
index 74eb94afc1..0000000000
--- a/cpukit/score/src/objectcopynameraw.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Object Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/address.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/object.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/objectmp.h>
-#endif
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/isr.h>
-
-/*PAGE
- *
- * _Objects_Copy_name_raw
- *
- * XXX
- */
-
-void _Objects_Copy_name_raw(
- void *source,
- void *destination,
- unsigned32 length
-)
-{
- unsigned32 *source_p = (unsigned32 *) source;
- unsigned32 *destination_p = (unsigned32 *) destination;
- unsigned32 tmp_length = length / OBJECTS_NAME_ALIGNMENT;
-
- while ( tmp_length-- )
- *destination_p++ = *source_p++;
-}
diff --git a/cpukit/score/src/objectcopynamestring.c b/cpukit/score/src/objectcopynamestring.c
deleted file mode 100644
index cd0779d546..0000000000
--- a/cpukit/score/src/objectcopynamestring.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Object Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/address.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/object.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/objectmp.h>
-#endif
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/isr.h>
-
-/*PAGE
- *
- * _Objects_Copy_name_string
- *
- * XXX
- */
-
-void _Objects_Copy_name_string(
- void *source,
- void *destination
-)
-{
- unsigned8 *source_p = (unsigned8 *) source;
- unsigned8 *destination_p = (unsigned8 *) destination;
-
- do {
- *destination_p++ = *source_p;
- } while ( *source_p++ );
-}
diff --git a/cpukit/score/src/objectextendinformation.c b/cpukit/score/src/objectextendinformation.c
deleted file mode 100644
index 2e5ee327e1..0000000000
--- a/cpukit/score/src/objectextendinformation.c
+++ /dev/null
@@ -1,285 +0,0 @@
-/*
- * Object Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/address.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/object.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/objectmp.h>
-#endif
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/isr.h>
-
-/*PAGE
- *
- * _Objects_Extend_information
- *
- * This routine extends all object information related data structures.
- *
- * Input parameters:
- * information - object information table
- *
- * Output parameters: NONE
- */
-
-void _Objects_Extend_information(
- Objects_Information *information
-)
-{
- Objects_Control *the_object;
- void *name_area;
- Chain_Control Inactive;
- unsigned32 block_count;
- unsigned32 block;
- unsigned32 index_base;
- unsigned32 minimum_index;
- unsigned32 index;
-
- /*
- * Search for a free block of indexes. The block variable ends up set
- * to block_count + 1 if the table needs to be extended.
- */
-
- minimum_index = _Objects_Get_index( information->minimum_id );
- index_base = minimum_index;
- block = 0;
-
- if ( information->maximum < minimum_index )
- block_count = 0;
- else {
- block_count = information->maximum / information->allocation_size;
-
- for ( ; block < block_count; block++ ) {
- if ( information->object_blocks[ block ] == NULL )
- break;
- else
- index_base += information->allocation_size;
- }
- }
-
- /*
- * If the index_base is the maximum we need to grow the tables.
- */
-
- if (index_base >= information->maximum ) {
- ISR_Level level;
- void **object_blocks;
- Objects_Name *name_table;
- unsigned32 *inactive_per_block;
- Objects_Control **local_table;
- unsigned32 maximum;
- void *old_tables;
-
- /*
- * Growing the tables means allocating a new area, doing a copy and
- * updating the information table.
- *
- * If the maximum is minimum we do not have a table to copy. First
- * time through.
- *
- * The allocation has :
- *
- * void *objects[block_count];
- * unsigned32 inactive_count[block_count];
- * Objects_Name *name_table[block_count];
- * Objects_Control *local_table[maximum];
- *
- * This is the order in memory. Watch changing the order. See the memcpy
- * below.
- */
-
- /*
- * Up the block count and maximum
- */
-
- block_count++;
-
- maximum = information->maximum + information->allocation_size;
-
- /*
- * Allocate the tables and break it up.
- */
-
- if ( information->auto_extend ) {
- object_blocks = (void**)
- _Workspace_Allocate(
- block_count *
- (sizeof(void *) + sizeof(unsigned32) + sizeof(Objects_Name *)) +
- ((maximum + minimum_index) * sizeof(Objects_Control *))
- );
-
- if ( !object_blocks )
- return;
- }
- else {
- object_blocks = (void**)
- _Workspace_Allocate_or_fatal_error(
- block_count *
- (sizeof(void *) + sizeof(unsigned32) + sizeof(Objects_Name *)) +
- ((maximum + minimum_index) * sizeof(Objects_Control *))
- );
- }
-
- /*
- * Break the block into the various sections.
- *
- */
-
- inactive_per_block = (unsigned32 *) _Addresses_Add_offset(
- object_blocks, block_count * sizeof(void*) );
- name_table = (Objects_Name *) _Addresses_Add_offset(
- inactive_per_block, block_count * sizeof(unsigned32) );
- local_table = (Objects_Control **) _Addresses_Add_offset(
- name_table, block_count * sizeof(Objects_Name *) );
-
- /*
- * Take the block count down. Saves all the (block_count - 1)
- * in the copies.
- */
-
- block_count--;
-
- if ( information->maximum > minimum_index ) {
-
- /*
- * Copy each section of the table over. This has to be performed as
- * separate parts as size of each block has changed.
- */
-
- memcpy( object_blocks,
- information->object_blocks,
- block_count * sizeof(void*) );
- memcpy( inactive_per_block,
- information->inactive_per_block,
- block_count * sizeof(unsigned32) );
- memcpy( name_table,
- information->name_table,
- block_count * sizeof(Objects_Name *) );
- memcpy( local_table,
- information->local_table,
- (information->maximum + minimum_index) * sizeof(Objects_Control *) );
- }
- else {
-
- /*
- * Deal with the special case of the 0 to minimum_index
- */
- for ( index = 0; index < minimum_index; index++ ) {
- local_table[ index ] = NULL;
- }
- }
-
- /*
- * Initialise the new entries in the table.
- */
-
- object_blocks[block_count] = NULL;
- inactive_per_block[block_count] = 0;
- name_table[block_count] = NULL;
-
- for ( index=index_base ;
- index < ( information->allocation_size + index_base );
- index++ ) {
- local_table[ index ] = NULL;
- }
-
- _ISR_Disable( level );
-
- old_tables = information->object_blocks;
-
- information->object_blocks = object_blocks;
- information->inactive_per_block = inactive_per_block;
- information->name_table = name_table;
- information->local_table = local_table;
- information->maximum = maximum;
- information->maximum_id =
- _Objects_Build_id(
- information->the_class, _Objects_Local_node, information->maximum
- );
-
- _ISR_Enable( level );
-
- if ( old_tables )
- _Workspace_Free( old_tables );
-
- block_count++;
- }
-
- /*
- * Allocate the name table, and the objects
- */
-
- if ( information->auto_extend ) {
- information->object_blocks[ block ] =
- _Workspace_Allocate(
- (information->allocation_size * information->name_length) +
- (information->allocation_size * information->size)
- );
-
- if ( !information->object_blocks[ block ] )
- return;
- }
- else {
- information->object_blocks[ block ] =
- _Workspace_Allocate_or_fatal_error(
- (information->allocation_size * information->name_length) +
- (information->allocation_size * information->size)
- );
- }
-
- name_area = (Objects_Name *) _Addresses_Add_offset(
- information->object_blocks[ block ],
- (information->allocation_size * information->size)
- );
- information->name_table[ block ] = name_area;
-
- /*
- * Initialize objects .. add to a local chain first.
- */
-
- _Chain_Initialize(
- &Inactive,
- information->object_blocks[ block ],
- information->allocation_size,
- information->size
- );
-
- /*
- * Move from the local chain, initialise, then append to the inactive chain
- */
-
- index = index_base;
-
- while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) {
-
- the_object->id =
- _Objects_Build_id(
- information->the_class, _Objects_Local_node, index
- );
-
- the_object->name = (void *) name_area;
-
- name_area = _Addresses_Add_offset( name_area, information->name_length );
-
- _Chain_Append( &information->Inactive, &the_object->Node );
-
- index++;
- }
-
- information->inactive_per_block[ block ] = information->allocation_size;
- information->inactive += information->allocation_size;
-}
diff --git a/cpukit/score/src/objectfree.c b/cpukit/score/src/objectfree.c
deleted file mode 100644
index cf337efa8c..0000000000
--- a/cpukit/score/src/objectfree.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Object Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/address.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/object.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/objectmp.h>
-#endif
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/isr.h>
-
-/*PAGE
- *
- * _Objects_Free
- *
- * DESCRIPTION:
- *
- * This function frees a object control block to the
- * inactive chain of free object control blocks.
- */
-
-void _Objects_Free(
- Objects_Information *information,
- Objects_Control *the_object
-)
-{
- unsigned32 allocation_size = information->allocation_size;
-
- _Chain_Append( &information->Inactive, &the_object->Node );
-
- if ( information->auto_extend ) {
- unsigned32 block;
-
- block =
- _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id );
- block /= information->allocation_size;
-
- information->inactive_per_block[ block ]++;
- information->inactive++;
-
- /*
- * Check if the threshold level has been met of
- * 1.5 x allocation_size are free.
- */
-
- if ( information->inactive > ( allocation_size + ( allocation_size >> 1 ) ) ) {
- _Objects_Shrink_information( information );
- }
- }
-}
diff --git a/cpukit/score/src/objectget.c b/cpukit/score/src/objectget.c
deleted file mode 100644
index 91e44d28cf..0000000000
--- a/cpukit/score/src/objectget.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Object Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/address.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/object.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/objectmp.h>
-#endif
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/isr.h>
-
-/*PAGE
- *
- * _Objects_Get
- *
- * This routine sets the object pointer for the given
- * object id based on the given object information structure.
- *
- * Input parameters:
- * information - pointer to entry in table for this class
- * id - object id to search for
- * location - address of where to store the location
- *
- * Output parameters:
- * returns - address of object if local
- * location - one of the following:
- * OBJECTS_ERROR - invalid object ID
- * OBJECTS_REMOTE - remote object
- * OBJECTS_LOCAL - local object
- */
-
-Objects_Control *_Objects_Get(
- Objects_Information *information,
- Objects_Id id,
- Objects_Locations *location
-)
-{
- Objects_Control *the_object;
- unsigned32 index;
-
- index = _Objects_Get_index( id );
-
- if ( information->maximum >= index ) {
- _Thread_Disable_dispatch();
- if ( (the_object = _Objects_Get_local_object( information, index )) != NULL ) {
- *location = OBJECTS_LOCAL;
- return( the_object );
- }
- _Thread_Enable_dispatch();
- *location = OBJECTS_ERROR;
- return( NULL );
- }
- *location = OBJECTS_ERROR;
-#if defined(RTEMS_MULTIPROCESSING)
- _Objects_MP_Is_remote(
- information,
- _Objects_Build_id( information->the_class, _Objects_Local_node, index ),
- location,
- &the_object
- );
- return the_object;
-#else
- return NULL;
-#endif
-}
diff --git a/cpukit/score/src/objectgetbyindex.c b/cpukit/score/src/objectgetbyindex.c
deleted file mode 100644
index 6cfc2b98cd..0000000000
--- a/cpukit/score/src/objectgetbyindex.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Object Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/address.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/object.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/objectmp.h>
-#endif
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/isr.h>
-
-/*PAGE
- *
- * _Objects_Get_by_index
- *
- * This routine sets the object pointer for the given
- * object id based on the given object information structure.
- *
- * Input parameters:
- * information - pointer to entry in table for this class
- * index - object index to check for
- * location - address of where to store the location
- *
- * Output parameters:
- * returns - address of object if local
- * location - one of the following:
- * OBJECTS_ERROR - invalid object ID
- * OBJECTS_REMOTE - remote object
- * OBJECTS_LOCAL - local object
- */
-
-Objects_Control *_Objects_Get_by_index(
- Objects_Information *information,
- unsigned32 index,
- Objects_Locations *location
-)
-{
- Objects_Control *the_object;
-
- if ( information->maximum >= index ) {
- _Thread_Disable_dispatch();
- if ( (the_object = _Objects_Get_local_object( information, index )) != NULL ) {
- *location = OBJECTS_LOCAL;
- return( the_object );
- }
- _Thread_Enable_dispatch();
- *location = OBJECTS_ERROR;
- return( NULL );
- }
-
- /*
- * With just an index, you can't access a remote object.
- */
-
- _Thread_Enable_dispatch();
- *location = OBJECTS_ERROR;
- return NULL;
-}
diff --git a/cpukit/score/src/objectgetnext.c b/cpukit/score/src/objectgetnext.c
deleted file mode 100644
index ba3cea04e2..0000000000
--- a/cpukit/score/src/objectgetnext.c
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Object Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/address.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/object.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/objectmp.h>
-#endif
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/isr.h>
-
-/*PAGE
- *
- * _Objects_Get_next
- *
- * Like _Objects_Get, but considers the 'id' as a "hint" and
- * finds next valid one after that point.
- * Mostly used for monitor and debug traversal of an object.
- *
- * Input parameters:
- * information - pointer to entry in table for this class
- * id - object id to search for
- * location - address of where to store the location
- * next_id - address to store next id to try
- *
- * Output parameters:
- * returns - address of object if local
- * location - one of the following:
- * OBJECTS_ERROR - invalid object ID
- * OBJECTS_REMOTE - remote object
- * OBJECTS_LOCAL - local object
- * next_id - will contain a reasonable "next" id to continue traversal
- *
- * NOTE:
- * assumes can add '1' to an id to get to next index.
- */
-
-Objects_Control *
-_Objects_Get_next(
- Objects_Information *information,
- Objects_Id id,
- Objects_Locations *location_p,
- Objects_Id *next_id_p
-)
-{
- Objects_Control *object;
- Objects_Id next_id;
-
- if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX)
- next_id = information->minimum_id;
- else
- next_id = id;
-
- do {
- /* walked off end of list? */
- if (_Objects_Get_index(next_id) > information->maximum)
- {
- *location_p = OBJECTS_ERROR;
- goto final;
- }
-
- /* try to grab one */
- object = _Objects_Get(information, next_id, location_p);
-
- next_id++;
-
- } while (*location_p != OBJECTS_LOCAL);
-
- *next_id_p = next_id;
- return object;
-
-final:
- *next_id_p = OBJECTS_ID_FINAL;
- return 0;
-}
diff --git a/cpukit/score/src/objectinitializeinformation.c b/cpukit/score/src/objectinitializeinformation.c
deleted file mode 100644
index 9c21820888..0000000000
--- a/cpukit/score/src/objectinitializeinformation.c
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * Object Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/address.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/object.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/objectmp.h>
-#endif
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/isr.h>
-
-/*PAGE
- *
- * _Objects_Initialize_information
- *
- * This routine initializes all object information related data structures.
- *
- * Input parameters:
- * information - object information table
- * the_class - object class
- * supports_global - TRUE if this is a global object class
- * maximum - maximum objects of this class
- * size - size of this object's control block
- * is_string - TRUE if names for this object are strings
- * maximum_name_length - maximum length of each object's name
- * is_thread - TRUE if this class is threads
- *
- * Output parameters: NONE
- */
-
-void _Objects_Initialize_information(
- Objects_Information *information,
- Objects_Classes the_class,
- boolean supports_global,
- unsigned32 maximum,
- unsigned32 size,
- boolean is_string,
- unsigned32 maximum_name_length,
- boolean is_thread
-)
-{
- static Objects_Control *null_local_table = NULL;
-
- unsigned32 minimum_index;
- unsigned32 index;
- unsigned32 name_length;
-
- information->the_class = the_class;
- information->is_string = is_string;
- information->is_thread = is_thread;
-
- information->local_table = 0;
- information->name_table = 0;
- information->inactive_per_block = 0;
- information->object_blocks = 0;
-
- information->inactive = 0;
-
- /*
- * Set the entry in the object information table.
- */
-
- _Objects_Information_table[ the_class ] = information;
-
- /*
- * Set the size of the object
- */
-
- information->size = size;
-
- /*
- * Are we operating in unlimited, or auto-extend mode
- */
-
- information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? TRUE : FALSE;
- maximum &= ~OBJECTS_UNLIMITED_OBJECTS;
-
- /*
- * The allocation unit is the maximum value
- */
-
- information->allocation_size = maximum;
-
- /*
- * Provide a null local table entry for the case of any empty table.
- */
-
- information->local_table = &null_local_table;
-
- /*
- * Calculate minimum and maximum Id's
- */
-
- if ( maximum == 0 ) minimum_index = 0;
- else minimum_index = 1;
-
- information->minimum_id =
- _Objects_Build_id( the_class, _Objects_Local_node, minimum_index );
-
- /*
- * Calculate the maximum name length
- */
-
- name_length = maximum_name_length;
-
- if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
- name_length = (name_length + OBJECTS_NAME_ALIGNMENT) &
- ~(OBJECTS_NAME_ALIGNMENT-1);
-
- information->name_length = name_length;
-
- _Chain_Initialize_empty( &information->Inactive );
-
- /*
- * Initialize objects .. if there are any
- */
-
- if ( maximum ) {
-
- /*
- * Reset the maximum value. It will be updated when the information is
- * extended.
- */
-
- information->maximum = 0;
-
- /*
- * Always have the maximum size available so the current performance
- * figures are create are met. If the user moves past the maximum
- * number then a performance hit is taken.
- */
-
- _Objects_Extend_information( information );
-
- }
-
- /*
- * Take care of multiprocessing
- */
-
- if ( supports_global == TRUE && _System_state_Is_multiprocessing ) {
-
- information->global_table =
- (Chain_Control *) _Workspace_Allocate_or_fatal_error(
- (_Objects_Maximum_nodes + 1) * sizeof(Chain_Control)
- );
-
- for ( index=1; index <= _Objects_Maximum_nodes ; index++ )
- _Chain_Initialize_empty( &information->global_table[ index ] );
- }
- else
- information->global_table = NULL;
-}
diff --git a/cpukit/score/src/objectmp.c b/cpukit/score/src/objectmp.c
deleted file mode 100644
index bbd2f18cc5..0000000000
--- a/cpukit/score/src/objectmp.c
+++ /dev/null
@@ -1,274 +0,0 @@
-/*
- * Multiprocessing Support for the Object Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/thread.h>
-
-/*PAGE
- *
- * _Objects_MP_Handler_initialization
- *
- */
-
-void _Objects_MP_Handler_initialization (
- unsigned32 node,
- unsigned32 maximum_nodes,
- unsigned32 maximum_global_objects
-)
-{
- _Objects_MP_Maximum_global_objects = maximum_global_objects;
-
- if ( maximum_global_objects == 0 ) {
- _Chain_Initialize_empty( &_Objects_MP_Inactive_global_objects );
- return;
- }
-
- _Chain_Initialize(
- &_Objects_MP_Inactive_global_objects,
- _Workspace_Allocate_or_fatal_error(
- maximum_global_objects * sizeof( Objects_MP_Control )
- ),
- maximum_global_objects,
- sizeof( Objects_MP_Control )
- );
-
-}
-
-/*PAGE
- *
- * _Objects_MP_Open
- *
- */
-
-void _Objects_MP_Open (
- Objects_Information *information,
- Objects_MP_Control *the_global_object,
- unsigned32 the_name, /* XXX -- wrong for variable */
- Objects_Id the_id
-)
-{
- the_global_object->Object.id = the_id;
- the_global_object->name = the_name;
-
- _Chain_Prepend(
- &information->global_table[ _Objects_Get_node( the_id ) ],
- &the_global_object->Object.Node
- );
-
-}
-
-/*PAGE
- *
- * _Objects_MP_Allocate_and_open
- *
- */
-
-boolean _Objects_MP_Allocate_and_open (
- Objects_Information *information,
- unsigned32 the_name, /* XXX -- wrong for variable */
- Objects_Id the_id,
- boolean is_fatal_error
-)
-{
- Objects_MP_Control *the_global_object;
-
- the_global_object = _Objects_MP_Allocate_global_object();
- if ( _Objects_MP_Is_null_global_object( the_global_object ) ) {
-
- if ( is_fatal_error == FALSE )
- return FALSE;
-
- _Internal_error_Occurred(
- INTERNAL_ERROR_CORE,
- TRUE,
- INTERNAL_ERROR_OUT_OF_GLOBAL_OBJECTS
- );
-
- }
-
- _Objects_MP_Open( information, the_global_object, the_name, the_id );
-
- return TRUE;
-}
-
-/*PAGE
- *
- * _Objects_MP_Close
- *
- */
-
-void _Objects_MP_Close (
- Objects_Information *information,
- Objects_Id the_id
-)
-{
- Chain_Control *the_chain;
- Chain_Node *the_node;
- Objects_MP_Control *the_object;
-
- the_chain = &information->global_table[ _Objects_Get_node( the_id ) ];
-
- for ( the_node = the_chain->first ;
- !_Chain_Is_tail( the_chain, the_node ) ;
- the_node = the_node->next ) {
-
- the_object = (Objects_MP_Control *) the_node;
-
- if ( _Objects_Are_ids_equal( the_object->Object.id, the_id ) ) {
-
- _Chain_Extract( the_node );
- _Objects_MP_Free_global_object( the_object );
- return;
- }
-
- }
-
- _Internal_error_Occurred(
- INTERNAL_ERROR_CORE,
- TRUE,
- INTERNAL_ERROR_INVALID_GLOBAL_ID
- );
-}
-
-/*PAGE
- *
- * _Objects_MP_Global_name_search
- *
- */
-
-Objects_Name_to_id_errors _Objects_MP_Global_name_search (
- Objects_Information *information,
- Objects_Name the_name,
- unsigned32 nodes_to_search,
- Objects_Id *the_id
-)
-{
- unsigned32 low_node;
- unsigned32 high_node;
- unsigned32 node_index;
- Chain_Control *the_chain;
- Chain_Node *the_node;
- Objects_MP_Control *the_object;
- unsigned32 name_to_use = *(unsigned32 *)the_name; /* XXX variable */
-
- if ( nodes_to_search > _Objects_Maximum_nodes )
- return OBJECTS_INVALID_NODE;
-
- if ( information->global_table == NULL )
- return OBJECTS_INVALID_NAME;
-
- if ( nodes_to_search == OBJECTS_SEARCH_ALL_NODES ||
- nodes_to_search == OBJECTS_SEARCH_OTHER_NODES ) {
- low_node = 1;
- high_node = _Objects_Maximum_nodes;
- } else {
- low_node =
- high_node = nodes_to_search;
- }
-
- _Thread_Disable_dispatch();
-
- for ( node_index = low_node ; node_index <= high_node ; node_index++ ) {
-
- /*
- * NOTE: The local node was search (if necessary) by
- * _Objects_Name_to_id before this was invoked.
- */
-
- if ( !_Objects_Is_local_node( node_index ) ) {
- the_chain = &information->global_table[ node_index ];
-
- for ( the_node = the_chain->first ;
- !_Chain_Is_tail( the_chain, the_node ) ;
- the_node = the_node->next ) {
-
- the_object = (Objects_MP_Control *) the_node;
-
- if ( the_object->name == name_to_use ) {
- *the_id = the_object->Object.id;
- _Thread_Enable_dispatch();
- return OBJECTS_SUCCESSFUL;
- }
- }
- }
- }
-
- _Thread_Enable_dispatch();
- return OBJECTS_INVALID_NAME;
-}
-
-/*PAGE
- *
- * _Objects_MP_Is_remote
- *
- */
-
-void _Objects_MP_Is_remote (
- Objects_Information *information,
- Objects_Id the_id,
- Objects_Locations *location,
- Objects_Control **the_object
-)
-{
- unsigned32 node;
- Chain_Control *the_chain;
- Chain_Node *the_node;
- Objects_MP_Control *the_global_object;
-
- node = _Objects_Get_node( the_id );
-
- /*
- * NOTE: The local node was search (if necessary) by
- * _Objects_Name_to_id before this was invoked.
- *
- * The NODE field of an object id cannot be 0
- * because 0 is an invalid node number.
- */
-
- if ( node == 0 ||
- _Objects_Is_local_node( node ) ||
- node > _Objects_Maximum_nodes ||
- information->global_table == NULL ) {
-
- *location = OBJECTS_ERROR;
- *the_object = NULL;
- return;
- }
-
- _Thread_Disable_dispatch();
-
- the_chain = &information->global_table[ node ];
-
- for ( the_node = the_chain->first ;
- !_Chain_Is_tail( the_chain, the_node ) ;
- the_node = the_node->next ) {
-
- the_global_object = (Objects_MP_Control *) the_node;
-
- if ( _Objects_Are_ids_equal( the_global_object->Object.id, the_id ) ) {
- _Thread_Unnest_dispatch();
- *location = OBJECTS_REMOTE;
- *the_object = (Objects_Control *) the_global_object;
- return;
- }
- }
-
- _Thread_Enable_dispatch();
- *location = OBJECTS_ERROR;
- *the_object = NULL;
-
-}
diff --git a/cpukit/score/src/objectnametoid.c b/cpukit/score/src/objectnametoid.c
deleted file mode 100644
index 086a9fd74d..0000000000
--- a/cpukit/score/src/objectnametoid.c
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Object Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/address.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/object.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/objectmp.h>
-#endif
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/isr.h>
-
-/*PAGE
- *
- * _Objects_Name_to_id
- *
- * These kernel routines search the object table(s) for the given
- * object name and returns the associated object id.
- *
- * Input parameters:
- * information - object information
- * name - user defined object name
- * node - node indentifier (0 indicates any node)
- * id - address of return ID
- *
- * Output parameters:
- * id - object id
- * OBJECTS_SUCCESSFUL - if successful
- * error code - if unsuccessful
- */
-
-Objects_Name_to_id_errors _Objects_Name_to_id(
- Objects_Information *information,
- Objects_Name name,
- unsigned32 node,
- Objects_Id *id
-)
-{
- boolean search_local_node;
- Objects_Control *the_object;
- unsigned32 index;
- unsigned32 name_length;
- Objects_Name_comparators compare_them;
-
- if ( name == 0 )
- return OBJECTS_INVALID_NAME;
-
- search_local_node = FALSE;
-
- if ( information->maximum != 0 &&
- (node == OBJECTS_SEARCH_ALL_NODES || node == OBJECTS_SEARCH_LOCAL_NODE ||
- _Objects_Is_local_node( node ) ) )
- search_local_node = TRUE;
-
- if ( search_local_node ) {
- name_length = information->name_length;
-
- if ( information->is_string ) compare_them = _Objects_Compare_name_string;
- else compare_them = _Objects_Compare_name_raw;
-
- for ( index = 1; index <= information->maximum; index++ ) {
-
- the_object = information->local_table[ index ];
-
- if ( !the_object || !the_object->name )
- continue;
-
- if ( (*compare_them)( name, the_object->name, name_length ) ) {
- *id = the_object->id;
- return OBJECTS_SUCCESSFUL;
- }
- }
- }
-
- if ( _Objects_Is_local_node( node ) || node == OBJECTS_SEARCH_LOCAL_NODE )
- return OBJECTS_INVALID_NAME;
-
-#if defined(RTEMS_MULTIPROCESSING)
- return ( _Objects_MP_Global_name_search( information, name, node, id ) );
-#else
- return OBJECTS_INVALID_NAME;
-#endif
-}
diff --git a/cpukit/score/src/objectshrinkinformation.c b/cpukit/score/src/objectshrinkinformation.c
deleted file mode 100644
index 136e6b1686..0000000000
--- a/cpukit/score/src/objectshrinkinformation.c
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Object Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/address.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/object.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/objectmp.h>
-#endif
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/isr.h>
-
-/*PAGE
- *
- * _Objects_Shrink_information
- *
- * This routine shrinks object information related data structures.
- * The object's name and object space are released. The local_table
- * etc block does not shrink. The InActive list needs to be scanned
- * to find the objects are remove them.
- * Input parameters:
- * information - object information table
- * the_block - the block to remove
- *
- * Output parameters: NONE
- */
-
-void _Objects_Shrink_information(
- Objects_Information *information
-)
-{
- Objects_Control *the_object;
- Objects_Control *extract_me;
- unsigned32 block_count;
- unsigned32 block;
- unsigned32 index_base;
- unsigned32 index;
-
- /*
- * Search the list to find block or chunnk with all objects inactive.
- */
-
- index_base = _Objects_Get_index( information->minimum_id );
- block_count = ( information->maximum - index_base ) / information->allocation_size;
-
- for ( block = 0; block < block_count; block++ ) {
- if ( information->inactive_per_block[ block ] == information->allocation_size ) {
-
- /*
- * XXX - Not to sure how to use a chain where you need to iterate and
- * and remove elements.
- */
-
- the_object = (Objects_Control *) information->Inactive.first;
-
- /*
- * Assume the Inactive chain is never empty at this point
- */
-
- do {
- index = _Objects_Get_index( the_object->id );
-
- if ((index >= index_base) &&
- (index < (index_base + information->allocation_size))) {
-
- /*
- * Get the next node before the node is extracted
- */
-
- extract_me = the_object;
-
- if ( !_Chain_Is_last( &the_object->Node ) )
- the_object = (Objects_Control *) the_object->Node.next;
- else
- the_object = NULL;
-
- _Chain_Extract( &extract_me->Node );
- }
- else {
- the_object = (Objects_Control *) the_object->Node.next;
- }
- }
- while ( the_object && !_Chain_Is_last( &the_object->Node ) );
-
- /*
- * Free the memory and reset the structures in the object' information
- */
-
- _Workspace_Free( information->object_blocks[ block ] );
- information->name_table[ block ] = NULL;
- information->object_blocks[ block ] = NULL;
- information->inactive_per_block[ block ] = 0;
-
- information->inactive -= information->allocation_size;
-
- return;
- }
-
- index_base += information->allocation_size;
- }
-}
diff --git a/cpukit/score/src/thread.c b/cpukit/score/src/thread.c
deleted file mode 100644
index 9cb197e5bc..0000000000
--- a/cpukit/score/src/thread.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Thread Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/states.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-
-/*PAGE
- *
- * _Thread_Handler_initialization
- *
- * This routine initializes all thread manager related data structures.
- *
- * Input parameters:
- * ticks_per_timeslice - clock ticks per quantum
- * maximum_proxies - number of proxies to initialize
- *
- * Output parameters: NONE
- */
-
-void _Thread_Handler_initialization(
- unsigned32 ticks_per_timeslice,
- unsigned32 maximum_extensions,
- unsigned32 maximum_proxies
-)
-{
- unsigned32 index;
-
- /*
- * BOTH stacks hooks must be set or both must be NULL.
- * Do not allow mixture.
- */
-
- if ( !( ( _CPU_Table.stack_allocate_hook == 0 )
- == ( _CPU_Table.stack_free_hook == 0 ) ) )
- _Internal_error_Occurred(
- INTERNAL_ERROR_CORE,
- TRUE,
- INTERNAL_ERROR_BAD_STACK_HOOK
- );
-
- _Context_Switch_necessary = FALSE;
- _Thread_Executing = NULL;
- _Thread_Heir = NULL;
- _Thread_Allocated_fp = NULL;
-
- _Thread_Do_post_task_switch_extension = 0;
-
- _Thread_Maximum_extensions = maximum_extensions;
-
- _Thread_Ticks_per_timeslice = ticks_per_timeslice;
-
- _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
- (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control)
- );
-
- for ( index=0; index <= PRIORITY_MAXIMUM ; index++ )
- _Chain_Initialize_empty( &_Thread_Ready_chain[ index ] );
-
-#if defined(RTEMS_MULTIPROCESSING)
- _Thread_MP_Handler_initialization( maximum_proxies );
-#endif
-
- /*
- * Initialize this class of objects.
- */
-
- _Objects_Initialize_information(
- &_Thread_Internal_information,
- OBJECTS_INTERNAL_THREADS,
- FALSE,
- ( _System_state_Is_multiprocessing ) ? 2 : 1,
- sizeof( Thread_Control ),
- TRUE,
- 8,
- TRUE
- );
-
-}
-
diff --git a/cpukit/score/src/threadchangepriority.c b/cpukit/score/src/threadchangepriority.c
deleted file mode 100644
index 65c16a6305..0000000000
--- a/cpukit/score/src/threadchangepriority.c
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Thread Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/states.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-
-/*PAGE
- *
- * _Thread_Change_priority
- *
- * This kernel routine changes the priority of the thread. The
- * thread chain is adjusted if necessary.
- *
- * Input parameters:
- * the_thread - pointer to thread control block
- * new_priority - ultimate priority
- * prepend_it - TRUE if the thread should be prepended to the chain
- *
- * Output parameters: NONE
- *
- * INTERRUPT LATENCY:
- * ready chain
- * select heir
- */
-
-void _Thread_Change_priority(
- Thread_Control *the_thread,
- Priority_Control new_priority,
- boolean prepend_it
-)
-{
- ISR_Level level;
- /* boolean do_prepend = FALSE; */
-
- /*
- * If this is a case where prepending the task to its priority is
- * potentially desired, then we need to consider whether to do it.
- * This usually occurs when a task lowers its priority implcitly as
- * the result of losing inherited priority. Normal explicit priority
- * change calls (e.g. rtems_task_set_priority) should always do an
- * append not a prepend.
- */
-
- /*
- * Techically, the prepend should conditional on the thread lowering
- * its priority but that does allow cxd2004 of the acvc 2.0.1 to
- * pass with rtems 4.0.0. This should change when gnat redoes its
- * priority scheme.
- */
-/*
- if ( prepend_it &&
- _Thread_Is_executing( the_thread ) &&
- new_priority >= the_thread->current_priority )
- prepend_it = TRUE;
-*/
-
- _Thread_Set_transient( the_thread );
-
- if ( the_thread->current_priority != new_priority )
- _Thread_Set_priority( the_thread, new_priority );
-
- _ISR_Disable( level );
-
- the_thread->current_state =
- _States_Clear( STATES_TRANSIENT, the_thread->current_state );
-
- if ( ! _States_Is_ready( the_thread->current_state ) ) {
- /*
- * XXX If a task is to be reordered while blocked on a priority
- * XXX priority ordered thread queue, then this is where that
- * XXX should occur.
- */
- _ISR_Enable( level );
- return;
- }
-
- _Priority_Add_to_bit_map( &the_thread->Priority_map );
- if ( prepend_it )
- _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node );
- else
- _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node );
-
- _ISR_Flash( level );
-
- _Thread_Calculate_heir();
-
- if ( !_Thread_Is_executing_also_the_heir() &&
- _Thread_Executing->is_preemptible )
- _Context_Switch_necessary = TRUE;
- _ISR_Enable( level );
-}
diff --git a/cpukit/score/src/threadclearstate.c b/cpukit/score/src/threadclearstate.c
deleted file mode 100644
index 8a4ae80417..0000000000
--- a/cpukit/score/src/threadclearstate.c
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Thread Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/states.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-
-/*PAGE
- *
- * _Thread_Clear_state
- *
- * This kernel routine clears the appropriate states in the
- * requested thread. The thread ready chain is adjusted if
- * necessary and the Heir thread is set accordingly.
- *
- * Input parameters:
- * the_thread - pointer to thread control block
- * state - state set to clear
- *
- * Output parameters: NONE
- *
- * INTERRUPT LATENCY:
- * priority map
- * select heir
- */
-
-
-void _Thread_Clear_state(
- Thread_Control *the_thread,
- States_Control state
-)
-{
- ISR_Level level;
- States_Control current_state;
-
- _ISR_Disable( level );
- current_state = the_thread->current_state;
-
- if ( current_state & state ) {
- current_state =
- the_thread->current_state = _States_Clear( state, current_state );
-
- if ( _States_Is_ready( current_state ) ) {
-
- _Priority_Add_to_bit_map( &the_thread->Priority_map );
-
- _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
-
- _ISR_Flash( level );
-
- if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
- _Thread_Heir = the_thread;
- if ( _Thread_Executing->is_preemptible ||
- the_thread->current_priority == 0 )
- _Context_Switch_necessary = TRUE;
- }
- }
- }
- _ISR_Enable( level );
-}
diff --git a/cpukit/score/src/threadclose.c b/cpukit/score/src/threadclose.c
deleted file mode 100644
index 4f2c9a6de5..0000000000
--- a/cpukit/score/src/threadclose.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Thread Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/states.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-
-/*
- * _Thread_Close
- *
- * DESCRIPTION:
- *
- * This routine frees all memory associated with the specified
- * thread and removes it from the local object table so no further
- * operations on this thread are allowed.
- */
-
-void _Thread_Close(
- Objects_Information *information,
- Thread_Control *the_thread
-)
-{
- _Objects_Close( information, &the_thread->Object );
-
- _Thread_Set_state( the_thread, STATES_TRANSIENT );
-
- if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
-
- if ( _Watchdog_Is_active( &the_thread->Timer ) )
- (void) _Watchdog_Remove( &the_thread->Timer );
- }
-
- _User_extensions_Thread_delete( the_thread );
-
-#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
- if ( _Thread_Is_allocated_fp( the_thread ) )
- _Thread_Deallocate_fp();
-#endif
- the_thread->fp_context = NULL;
-
- if ( the_thread->Start.fp_context )
- (void) _Workspace_Free( the_thread->Start.fp_context );
-
- _Thread_Stack_Free( the_thread );
-
- if ( the_thread->extensions )
- (void) _Workspace_Free( the_thread->extensions );
-
- the_thread->Start.stack = NULL;
- the_thread->extensions = NULL;
-}
diff --git a/cpukit/score/src/threadcreateidle.c b/cpukit/score/src/threadcreateidle.c
deleted file mode 100644
index 32d8254507..0000000000
--- a/cpukit/score/src/threadcreateidle.c
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Thread Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/states.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-
-/*PAGE
- *
- * _Thread_Create_idle
- */
-
-char *_Thread_Idle_name = "IDLE";
-
-void _Thread_Create_idle( void )
-{
- void *idle;
- unsigned32 idle_task_stack_size;
-
- /*
- * The entire workspace is zeroed during its initialization. Thus, all
- * fields not explicitly assigned were explicitly zeroed by
- * _Workspace_Initialization.
- */
-
- _Thread_Idle = _Thread_Internal_allocate();
-
- /*
- * Initialize the IDLE task.
- */
-
-#if (CPU_PROVIDES_IDLE_THREAD_BODY == TRUE)
- idle = (void *) _CPU_Thread_Idle_body;
-#else
- idle = (void *) _Thread_Idle_body;
-#endif
-
- if ( _CPU_Table.idle_task )
- idle = _CPU_Table.idle_task;
-
- idle_task_stack_size = _CPU_Table.idle_task_stack_size;
- if ( idle_task_stack_size < STACK_MINIMUM_SIZE )
- idle_task_stack_size = STACK_MINIMUM_SIZE;
-
- _Thread_Initialize(
- &_Thread_Internal_information,
- _Thread_Idle,
- NULL, /* allocate the stack */
- idle_task_stack_size,
- CPU_IDLE_TASK_IS_FP,
- PRIORITY_MAXIMUM,
- TRUE, /* preemptable */
- THREAD_CPU_BUDGET_ALGORITHM_NONE,
- NULL, /* no budget algorithm callout */
- 0, /* all interrupts enabled */
- _Thread_Idle_name
- );
-
- /*
- * WARNING!!! This is necessary to "kick" start the system and
- * MUST be done before _Thread_Start is invoked.
- */
-
- _Thread_Heir =
- _Thread_Executing = _Thread_Idle;
-
- _Thread_Start(
- _Thread_Idle,
- THREAD_START_NUMERIC,
- idle,
- NULL,
- 0
- );
-
-}
diff --git a/cpukit/score/src/threaddelayended.c b/cpukit/score/src/threaddelayended.c
deleted file mode 100644
index bb8f05296c..0000000000
--- a/cpukit/score/src/threaddelayended.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Thread Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/states.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-
-/*PAGE
- *
- * _Thread_Delay_ended
- *
- * This routine processes a thread whose delay period has ended.
- * It is called by the watchdog handler.
- *
- * Input parameters:
- * id - thread id
- *
- * Output parameters: NONE
- */
-
-void _Thread_Delay_ended(
- Objects_Id id,
- void *ignored
-)
-{
- Thread_Control *the_thread;
- Objects_Locations location;
-
- the_thread = _Thread_Get( id, &location );
- switch ( location ) {
- case OBJECTS_ERROR:
- case OBJECTS_REMOTE: /* impossible */
- break;
- case OBJECTS_LOCAL:
- _Thread_Unblock( the_thread );
- _Thread_Unnest_dispatch();
- break;
- }
-}
diff --git a/cpukit/score/src/threaddispatch.c b/cpukit/score/src/threaddispatch.c
deleted file mode 100644
index 311947cfa9..0000000000
--- a/cpukit/score/src/threaddispatch.c
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Thread Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/states.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-
-/*PAGE
- *
- * _Thread_Dispatch
- *
- * This kernel routine determines if a dispatch is needed, and if so
- * dispatches to the heir thread. Once the heir is running an attempt
- * is made to dispatch any ASRs.
- *
- * ALTERNATE ENTRY POINTS:
- * void _Thread_Enable_dispatch();
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * INTERRUPT LATENCY:
- * dispatch thread
- * no dispatch thread
- */
-
-#if ( CPU_INLINE_ENABLE_DISPATCH == FALSE )
-void _Thread_Enable_dispatch( void )
-{
- if ( --_Thread_Dispatch_disable_level )
- return;
- _Thread_Dispatch();
-}
-#endif
-
-void _Thread_Dispatch( void )
-{
- Thread_Control *executing;
- Thread_Control *heir;
- ISR_Level level;
-
- executing = _Thread_Executing;
- _ISR_Disable( level );
- while ( _Context_Switch_necessary == TRUE ) {
- heir = _Thread_Heir;
- _Thread_Dispatch_disable_level = 1;
- _Context_Switch_necessary = FALSE;
- _Thread_Executing = heir;
- executing->rtems_ada_self = rtems_ada_self;
- rtems_ada_self = heir->rtems_ada_self;
- _ISR_Enable( level );
-
- heir->ticks_executed++;
-
- _User_extensions_Thread_switch( executing, heir );
-
- if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
- heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
-
- /*
- * If the CPU has hardware floating point, then we must address saving
- * and restoring it as part of the context switch.
- *
- * The second conditional compilation section selects the algorithm used
- * to context switch between floating point tasks. The deferred algorithm
- * can be significantly better in a system with few floating point tasks
- * because it reduces the total number of save and restore FP context
- * operations. However, this algorithm can not be used on all CPUs due
- * to unpredictable use of FP registers by some compilers for integer
- * operations.
- */
-
-#if ( CPU_HARDWARE_FP == TRUE )
-#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
- if ( (heir->fp_context != NULL) && !_Thread_Is_allocated_fp( heir ) ) {
- if ( _Thread_Allocated_fp != NULL )
- _Context_Save_fp( &_Thread_Allocated_fp->fp_context );
- _Context_Restore_fp( &heir->fp_context );
- _Thread_Allocated_fp = heir;
- }
-#else
- if ( executing->fp_context != NULL )
- _Context_Save_fp( &executing->fp_context );
-
- if ( heir->fp_context != NULL )
- _Context_Restore_fp( &heir->fp_context );
-#endif
-#endif
-
- _Context_Switch( &executing->Registers, &heir->Registers );
-
- executing = _Thread_Executing;
-
- _ISR_Disable( level );
- }
-
- _Thread_Dispatch_disable_level = 0;
-
- _ISR_Enable( level );
-
- if ( _Thread_Do_post_task_switch_extension ||
- executing->do_post_task_switch_extension ) {
- executing->do_post_task_switch_extension = FALSE;
- _API_extensions_Run_postswitch();
- }
-
-}
diff --git a/cpukit/score/src/threadevaluatemode.c b/cpukit/score/src/threadevaluatemode.c
deleted file mode 100644
index edbfa5b882..0000000000
--- a/cpukit/score/src/threadevaluatemode.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Thread Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/states.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-
-/*PAGE
- *
- * _Thread_Evaluate_mode
- *
- * XXX
- */
-
-boolean _Thread_Evaluate_mode( void )
-{
- Thread_Control *executing;
-
- executing = _Thread_Executing;
-
- if ( !_States_Is_ready( executing->current_state ) ||
- ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) {
- _Context_Switch_necessary = TRUE;
- return TRUE;
- }
-
- return FALSE;
-}
diff --git a/cpukit/score/src/threadget.c b/cpukit/score/src/threadget.c
deleted file mode 100644
index cf0cfaffd2..0000000000
--- a/cpukit/score/src/threadget.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Thread Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/states.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-
-/*PAGE
- *
- * _Thread_Get
- *
- * NOTE: If we are not using static inlines, this must be a real
- * subroutine call.
- *
- * NOTE: XXX... This routine may be able to be optimized.
- */
-
-#ifndef USE_INLINES
-
-Thread_Control *_Thread_Get (
- Objects_Id id,
- Objects_Locations *location
-)
-{
- Objects_Classes the_class;
- Objects_Information *information;
-
- if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
- _Thread_Disable_dispatch();
- *location = OBJECTS_LOCAL;
- return( _Thread_Executing );
- }
-
- the_class = _Objects_Get_class( id );
-
- if ( the_class > OBJECTS_CLASSES_LAST ) {
- *location = OBJECTS_ERROR;
- return (Thread_Control *) 0;
- }
-
- information = _Objects_Information_table[ the_class ];
-
- if ( !information || !information->is_thread ) {
- *location = OBJECTS_ERROR;
- return (Thread_Control *) 0;
- }
-
- return (Thread_Control *) _Objects_Get( information, id, location );
-}
-
-#endif
diff --git a/cpukit/score/src/threadhandler.c b/cpukit/score/src/threadhandler.c
deleted file mode 100644
index cfdb9292d1..0000000000
--- a/cpukit/score/src/threadhandler.c
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Thread Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/states.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-
-/*PAGE
- *
- * _Thread_Handler
- *
- * This routine is the "primal" entry point for all threads.
- * _Context_Initialize() dummies up the thread's initial context
- * to cause the first Context_Switch() to jump to _Thread_Handler().
- *
- * This routine is the default thread exitted error handler. It is
- * returned to when a thread exits. The configured fatal error handler
- * is invoked to process the exit.
- *
- * NOTE:
- *
- * On entry, it is assumed all interrupts are blocked and that this
- * routine needs to set the initial isr level. This may or may not
- * actually be needed by the context switch routine and as a result
- * interrupts may already be at there proper level. Either way,
- * setting the initial isr level properly here is safe.
- *
- * Currently this is only really needed for the posix port,
- * ref: _Context_Switch in unix/cpu.c
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- */
-
-void _Thread_Handler( void )
-{
- ISR_Level level;
- Thread_Control *executing;
-
- executing = _Thread_Executing;
-
- /*
- * have to put level into a register for those cpu's that use
- * inline asm here
- */
-
- level = executing->Start.isr_level;
- _ISR_Set_level(level);
-
- /*
- * Take care that 'begin' extensions get to complete before
- * 'switch' extensions can run. This means must keep dispatch
- * disabled until all 'begin' extensions complete.
- */
-
- _User_extensions_Thread_begin( executing );
-
- /*
- * At this point, the dispatch disable level BETTER be 1.
- */
-
- _Thread_Enable_dispatch();
-
- switch ( executing->Start.prototype ) {
- case THREAD_START_NUMERIC:
- executing->Wait.return_argument =
- (*(Thread_Entry_numeric) executing->Start.entry_point)(
- executing->Start.numeric_argument
- );
- break;
- case THREAD_START_POINTER:
- executing->Wait.return_argument =
- (*(Thread_Entry_pointer) executing->Start.entry_point)(
- executing->Start.pointer_argument
- );
- break;
- case THREAD_START_BOTH_POINTER_FIRST:
- executing->Wait.return_argument =
- (*(Thread_Entry_both_pointer_first) executing->Start.entry_point)(
- executing->Start.pointer_argument,
- executing->Start.numeric_argument
- );
- break;
- case THREAD_START_BOTH_NUMERIC_FIRST:
- executing->Wait.return_argument =
- (*(Thread_Entry_both_numeric_first) executing->Start.entry_point)(
- executing->Start.numeric_argument,
- executing->Start.pointer_argument
- );
- break;
- }
-
- /*
- * In the switch above, the return code from the user thread body
- * was placed in return_argument. This assumed that if it returned
- * anything (which is not supporting in all APIs), then it would be
- * able to fit in a (void *).
- */
-
- _User_extensions_Thread_exitted( executing );
-
- _Internal_error_Occurred(
- INTERNAL_ERROR_CORE,
- TRUE,
- INTERNAL_ERROR_THREAD_EXITTED
- );
-}
diff --git a/cpukit/score/src/threadidlebody.c b/cpukit/score/src/threadidlebody.c
deleted file mode 100644
index 93b90a12cd..0000000000
--- a/cpukit/score/src/threadidlebody.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Thread Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/states.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-
-/*PAGE
- *
- * _Thread_Idle_body
- *
- * This kernel routine is the idle thread. The idle thread runs any time
- * no other thread is ready to run. This thread loops forever with
- * interrupts enabled.
- *
- * Input parameters:
- * ignored - this parameter is ignored
- *
- * Output parameters: NONE
- */
-
-#if (CPU_PROVIDES_IDLE_THREAD_BODY == FALSE)
-Thread _Thread_Idle_body(
- unsigned32 ignored
-)
-{
- for( ; ; ) ;
-}
-#endif
diff --git a/cpukit/score/src/threadinitialize.c b/cpukit/score/src/threadinitialize.c
deleted file mode 100644
index 0d5154c400..0000000000
--- a/cpukit/score/src/threadinitialize.c
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
- * Thread Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/states.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-
-/*PAGE
- *
- * _Thread_Initialize
- *
- * This routine initializes the specified the thread. It allocates
- * all memory associated with this thread. It completes by adding
- * the thread to the local object table so operations on this
- * thread id are allowed.
- */
-
-boolean _Thread_Initialize(
- Objects_Information *information,
- Thread_Control *the_thread,
- void *stack_area,
- unsigned32 stack_size,
- boolean is_fp,
- Priority_Control priority,
- boolean is_preemptible,
- Thread_CPU_budget_algorithms budget_algorithm,
- Thread_CPU_budget_algorithm_callout budget_callout,
- unsigned32 isr_level,
- Objects_Name name
-)
-{
- unsigned32 actual_stack_size = 0;
- void *stack = NULL;
- void *fp_area;
- void *extensions_area;
-
- /*
- * Initialize the Ada self pointer
- */
-
- the_thread->rtems_ada_self = NULL;
-
- /*
- * Allocate and Initialize the stack for this thread.
- */
-
-
- if ( !stack_area ) {
- if ( !_Stack_Is_enough( stack_size ) )
- actual_stack_size = STACK_MINIMUM_SIZE;
- else
- actual_stack_size = stack_size;
-
- actual_stack_size = _Thread_Stack_Allocate( the_thread, actual_stack_size );
-
- if ( !actual_stack_size )
- return FALSE; /* stack allocation failed */
-
- stack = the_thread->Start.stack;
- the_thread->Start.core_allocated_stack = TRUE;
- } else {
- stack = stack_area;
- actual_stack_size = stack_size;
- the_thread->Start.core_allocated_stack = FALSE;
- }
-
- _Stack_Initialize(
- &the_thread->Start.Initial_stack,
- stack,
- actual_stack_size
- );
-
- /*
- * Allocate the floating point area for this thread
- */
-
- if ( is_fp ) {
-
- fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
- if ( !fp_area ) {
- _Thread_Stack_Free( the_thread );
- return FALSE;
- }
- fp_area = _Context_Fp_start( fp_area, 0 );
-
- } else
- fp_area = NULL;
-
- the_thread->fp_context = fp_area;
- the_thread->Start.fp_context = fp_area;
-
- /*
- * Allocate the extensions area for this thread
- */
-
- if ( _Thread_Maximum_extensions ) {
- extensions_area = _Workspace_Allocate(
- (_Thread_Maximum_extensions + 1) * sizeof( void * )
- );
-
- if ( !extensions_area ) {
- if ( fp_area )
- (void) _Workspace_Free( fp_area );
-
- _Thread_Stack_Free( the_thread );
-
- return FALSE;
- }
- } else
- extensions_area = NULL;
-
- the_thread->extensions = (void **) extensions_area;
-
- /*
- * General initialization
- */
-
- the_thread->Start.is_preemptible = is_preemptible;
- the_thread->Start.budget_algorithm = budget_algorithm;
- the_thread->Start.budget_callout = budget_callout;
-
- switch ( budget_algorithm ) {
- case THREAD_CPU_BUDGET_ALGORITHM_NONE:
- case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
- break;
- case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
- the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
- break;
- case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
- break;
- }
-
- the_thread->Start.isr_level = isr_level;
-
- the_thread->current_state = STATES_DORMANT;
- the_thread->resource_count = 0;
- the_thread->suspend_count = 0;
- the_thread->real_priority = priority;
- the_thread->Start.initial_priority = priority;
- the_thread->ticks_executed = 0;
-
- _Thread_Set_priority( the_thread, priority );
-
- /*
- * Open the object
- */
-
- _Objects_Open( information, &the_thread->Object, name );
-
- /*
- * Invoke create extensions
- */
-
- if ( !_User_extensions_Thread_create( the_thread ) ) {
-
- if ( extensions_area )
- (void) _Workspace_Free( extensions_area );
-
- if ( fp_area )
- (void) _Workspace_Free( fp_area );
-
- _Thread_Stack_Free( the_thread );
-
- return FALSE;
- }
-
- return TRUE;
-
-}
diff --git a/cpukit/score/src/threadloadenv.c b/cpukit/score/src/threadloadenv.c
deleted file mode 100644
index c3493eeccd..0000000000
--- a/cpukit/score/src/threadloadenv.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Thread Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/states.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-
-/*PAGE
- *
- * _Thread_Load_environment
- *
- * Load starting environment for another thread from its start area in the
- * thread. Only called from t_restart and t_start.
- *
- * Input parameters:
- * the_thread - thread control block pointer
- *
- * Output parameters: NONE
- */
-
-void _Thread_Load_environment(
- Thread_Control *the_thread
-)
-{
- boolean is_fp = FALSE;
-
- if ( the_thread->Start.fp_context ) {
- the_thread->fp_context = the_thread->Start.fp_context;
- _Context_Initialize_fp( &the_thread->fp_context );
- is_fp = TRUE;
- }
-
- the_thread->do_post_task_switch_extension = FALSE;
- the_thread->is_preemptible = the_thread->Start.is_preemptible;
- the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
- the_thread->budget_callout = the_thread->Start.budget_callout;
-
- _Context_Initialize(
- &the_thread->Registers,
- the_thread->Start.Initial_stack.area,
- the_thread->Start.Initial_stack.size,
- the_thread->Start.isr_level,
- _Thread_Handler,
- is_fp
- );
-
-}
diff --git a/cpukit/score/src/threadmp.c b/cpukit/score/src/threadmp.c
deleted file mode 100644
index 58a183ba87..0000000000
--- a/cpukit/score/src/threadmp.c
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * Multiprocessing Support for the Thread Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/isr.h>
-
-/*PAGE
- *
- * _Thread_MP_Handler_initialization
- *
- */
-
-void _Thread_MP_Handler_initialization (
- unsigned32 maximum_proxies
-)
-{
-
- _Chain_Initialize_empty( &_Thread_MP_Active_proxies );
-
- if ( maximum_proxies == 0 ) {
- _Chain_Initialize_empty( &_Thread_MP_Inactive_proxies );
- return;
- }
-
-
- _Chain_Initialize(
- &_Thread_MP_Inactive_proxies,
- _Workspace_Allocate_or_fatal_error(
- maximum_proxies * sizeof( Thread_Proxy_control )
- ),
- maximum_proxies,
- sizeof( Thread_Proxy_control )
- );
-
-}
-
-/*PAGE
- *
- * _Thread_MP_Allocate_proxy
- *
- */
-
-Thread_Control *_Thread_MP_Allocate_proxy (
- States_Control the_state
-)
-{
- Thread_Control *the_thread;
- Thread_Proxy_control *the_proxy;
-
- the_thread = (Thread_Control *)_Chain_Get( &_Thread_MP_Inactive_proxies );
-
- if ( !_Thread_Is_null( the_thread ) ) {
-
- the_proxy = (Thread_Proxy_control *) the_thread;
-
- _Thread_Executing->Wait.return_code = THREAD_STATUS_PROXY_BLOCKING;
-
- the_proxy->receive_packet = _Thread_MP_Receive->receive_packet;
-
- the_proxy->Object.id = _Thread_MP_Receive->receive_packet->source_tid;
-
- the_proxy->current_priority =
- _Thread_MP_Receive->receive_packet->source_priority;
-
- the_proxy->current_state = _States_Set( STATES_DORMANT, the_state );
-
- the_proxy->Wait = _Thread_Executing->Wait;
-
- _Chain_Append( &_Thread_MP_Active_proxies, &the_proxy->Active );
-
- return the_thread;
- }
-
- _Internal_error_Occurred(
- INTERNAL_ERROR_CORE,
- TRUE,
- INTERNAL_ERROR_OUT_OF_PROXIES
- );
-
- /*
- * NOTE: The following return insures that the compiler will
- * think that all paths return a value.
- */
-
- return NULL;
-}
-
-/*PAGE
- *
- * _Thread_MP_Find_proxy
- *
- */
-
-/*
- * The following macro provides the offset of the Active element
- * in the Thread_Proxy_control structure. This is the logical
- * equivalent of the POSITION attribute in Ada.
- */
-
-#define _Thread_MP_Proxy_Active_offset \
- ((unsigned32)&(((Thread_Proxy_control *)0))->Active)
-
-Thread_Control *_Thread_MP_Find_proxy (
- Objects_Id the_id
-)
-{
-
- Chain_Node *proxy_node;
- Thread_Control *the_thread;
- ISR_Level level;
-
-restart:
-
- _ISR_Disable( level );
-
- for ( proxy_node = _Thread_MP_Active_proxies.first;
- !_Chain_Is_tail( &_Thread_MP_Active_proxies, proxy_node ) ;
- ) {
-
- the_thread = (Thread_Control *) _Addresses_Subtract_offset(
- proxy_node,
- _Thread_MP_Proxy_Active_offset
- );
-
- if ( _Objects_Are_ids_equal( the_thread->Object.id, the_id ) ) {
- _ISR_Enable( level );
- return the_thread;
- }
-
- _ISR_Flash( level );
-
- proxy_node = proxy_node->next;
-
- /*
- * A proxy which is only dormant is not in a blocking state.
- * Therefore, we are looking at proxy which has been moved from
- * active to inactive chain (by an ISR) and need to restart
- * the search.
- */
-
- if ( _States_Is_only_dormant( the_thread->current_state ) ) {
- _ISR_Enable( level );
- goto restart;
- }
- }
-
- _ISR_Enable( level );
- return NULL;
-}
diff --git a/cpukit/score/src/threadq.c b/cpukit/score/src/threadq.c
deleted file mode 100644
index 1deaa61045..0000000000
--- a/cpukit/score/src/threadq.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Thread Queue Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/tqdata.h>
-
-/*PAGE
- *
- * _Thread_queue_Initialize
- *
- * This routine initializes the specified threadq.
- *
- * Input parameters:
- * the_thread_queue - pointer to a threadq header
- * the_class - class of the object to which this belongs
- * discipline - queueing discipline
- * state - state of waiting threads
- * proxy_extract_callout - MP specific callout
- * timeout_status - return on a timeout
- *
- * Output parameters: NONE
- */
-
-void _Thread_queue_Initialize(
- Thread_queue_Control *the_thread_queue,
- Objects_Classes the_class,
- Thread_queue_Disciplines the_discipline,
- States_Control state,
- Thread_queue_Extract_callout proxy_extract_callout,
- unsigned32 timeout_status
-)
-{
- unsigned32 index;
-
- _Thread_queue_Extract_table[ the_class ] = proxy_extract_callout;
-
- the_thread_queue->state = state;
- the_thread_queue->discipline = the_discipline;
- the_thread_queue->timeout_status = timeout_status;
- the_thread_queue->sync_state = THREAD_QUEUE_SYNCHRONIZED;
-
- switch ( the_discipline ) {
- case THREAD_QUEUE_DISCIPLINE_FIFO:
- _Chain_Initialize_empty( &the_thread_queue->Queues.Fifo );
- break;
- case THREAD_QUEUE_DISCIPLINE_PRIORITY:
- for( index=0 ;
- index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
- index++)
- _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] );
- break;
- }
-
-}
diff --git a/cpukit/score/src/threadqdequeue.c b/cpukit/score/src/threadqdequeue.c
deleted file mode 100644
index dcb64099d0..0000000000
--- a/cpukit/score/src/threadqdequeue.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Thread Queue Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/tqdata.h>
-
-/*PAGE
- *
- * _Thread_queue_Dequeue
- *
- * This routine removes a thread from the specified threadq. If the
- * threadq discipline is FIFO, it unblocks a thread, and cancels its
- * timeout timer. Priority discipline is processed elsewhere.
- *
- * Input parameters:
- * the_thread_queue - pointer to threadq
- *
- * Output parameters:
- * returns - thread dequeued or NULL
- *
- * INTERRUPT LATENCY:
- * check sync
- */
-
-Thread_Control *_Thread_queue_Dequeue(
- Thread_queue_Control *the_thread_queue
-)
-{
- Thread_Control *the_thread;
-
- switch ( the_thread_queue->discipline ) {
- case THREAD_QUEUE_DISCIPLINE_FIFO:
- the_thread = _Thread_queue_Dequeue_fifo( the_thread_queue );
- break;
- case THREAD_QUEUE_DISCIPLINE_PRIORITY:
- the_thread = _Thread_queue_Dequeue_priority( the_thread_queue );
- break;
- default: /* this is only to prevent warnings */
- the_thread = NULL;
- break;
- }
-
- return( the_thread );
-}
-
diff --git a/cpukit/score/src/threadqdequeuefifo.c b/cpukit/score/src/threadqdequeuefifo.c
deleted file mode 100644
index 2e3c84fe45..0000000000
--- a/cpukit/score/src/threadqdequeuefifo.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Thread Queue Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/tqdata.h>
-
-/*PAGE
- *
- * _Thread_queue_Dequeue_fifo
- *
- * This routine removes a thread from the specified threadq.
- *
- * Input parameters:
- * the_thread_queue - pointer to threadq
- *
- * Output parameters:
- * returns - thread dequeued or NULL
- *
- * INTERRUPT LATENCY:
- * check sync
- * FIFO
- */
-
-Thread_Control *_Thread_queue_Dequeue_fifo(
- Thread_queue_Control *the_thread_queue
-)
-{
- ISR_Level level;
- Thread_Control *the_thread;
-
- _ISR_Disable( level );
- if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) {
-
- the_thread = (Thread_Control *)
- _Chain_Get_first_unprotected( &the_thread_queue->Queues.Fifo );
-
- if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
- _ISR_Enable( level );
- _Thread_Unblock( the_thread );
- } else {
- _Watchdog_Deactivate( &the_thread->Timer );
- _ISR_Enable( level );
- (void) _Watchdog_Remove( &the_thread->Timer );
- _Thread_Unblock( the_thread );
- }
-
-#if defined(RTEMS_MULTIPROCESSING)
- if ( !_Objects_Is_local_id( the_thread->Object.id ) )
- _Thread_MP_Free_proxy( the_thread );
-#endif
-
- return the_thread;
- }
-
- switch ( the_thread_queue->sync_state ) {
- case THREAD_QUEUE_SYNCHRONIZED:
- case THREAD_QUEUE_SATISFIED:
- _ISR_Enable( level );
- return NULL;
-
- case THREAD_QUEUE_NOTHING_HAPPENED:
- case THREAD_QUEUE_TIMEOUT:
- the_thread_queue->sync_state = THREAD_QUEUE_SATISFIED;
- _ISR_Enable( level );
- return _Thread_Executing;
- }
- return NULL; /* this is only to prevent warnings */
-}
-
diff --git a/cpukit/score/src/threadqdequeuepriority.c b/cpukit/score/src/threadqdequeuepriority.c
deleted file mode 100644
index 0ca29eeabf..0000000000
--- a/cpukit/score/src/threadqdequeuepriority.c
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Thread Queue Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/tqdata.h>
-
-/*PAGE
- *
- * _Thread_queue_Dequeue_priority
- *
- * This routine removes a thread from the specified PRIORITY based
- * threadq, unblocks it, and cancels its timeout timer.
- *
- * Input parameters:
- * the_thread_queue - pointer to thread queue
- *
- * Output parameters:
- * returns - thread dequeued or NULL
- *
- * INTERRUPT LATENCY:
- * only case
- */
-
-Thread_Control *_Thread_queue_Dequeue_priority(
- Thread_queue_Control *the_thread_queue
-)
-{
- unsigned32 index;
- ISR_Level level;
- Thread_Control *the_thread = NULL; /* just to remove warnings */
- Thread_Control *new_first_thread;
- Chain_Node *new_first_node;
- Chain_Node *new_second_node;
- Chain_Node *last_node;
- Chain_Node *next_node;
- Chain_Node *previous_node;
-
- _ISR_Disable( level );
- for( index=0 ;
- index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
- index++ ) {
- if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) {
- the_thread = (Thread_Control *)
- the_thread_queue->Queues.Priority[ index ].first;
- goto dequeue;
- }
- }
-
- switch ( the_thread_queue->sync_state ) {
- case THREAD_QUEUE_SYNCHRONIZED:
- case THREAD_QUEUE_SATISFIED:
- _ISR_Enable( level );
- return NULL;
-
- case THREAD_QUEUE_NOTHING_HAPPENED:
- case THREAD_QUEUE_TIMEOUT:
- the_thread_queue->sync_state = THREAD_QUEUE_SATISFIED;
- _ISR_Enable( level );
- return _Thread_Executing;
- }
-
-dequeue:
- new_first_node = the_thread->Wait.Block2n.first;
- new_first_thread = (Thread_Control *) new_first_node;
- next_node = the_thread->Object.Node.next;
- previous_node = the_thread->Object.Node.previous;
-
- if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
- last_node = the_thread->Wait.Block2n.last;
- new_second_node = new_first_node->next;
-
- previous_node->next = new_first_node;
- next_node->previous = new_first_node;
- new_first_node->next = next_node;
- new_first_node->previous = previous_node;
-
- if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
- /* > two threads on 2-n */
- new_second_node->previous =
- _Chain_Head( &new_first_thread->Wait.Block2n );
-
- new_first_thread->Wait.Block2n.first = new_second_node;
- new_first_thread->Wait.Block2n.last = last_node;
-
- last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
- }
- } else {
- previous_node->next = next_node;
- next_node->previous = previous_node;
- }
-
- if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
- _ISR_Enable( level );
- _Thread_Unblock( the_thread );
- } else {
- _Watchdog_Deactivate( &the_thread->Timer );
- _ISR_Enable( level );
- (void) _Watchdog_Remove( &the_thread->Timer );
- _Thread_Unblock( the_thread );
- }
-
-#if defined(RTEMS_MULTIPROCESSING)
- if ( !_Objects_Is_local_id( the_thread->Object.id ) )
- _Thread_MP_Free_proxy( the_thread );
-#endif
- return( the_thread );
-}
-
diff --git a/cpukit/score/src/threadqenqueue.c b/cpukit/score/src/threadqenqueue.c
deleted file mode 100644
index fb4d907c78..0000000000
--- a/cpukit/score/src/threadqenqueue.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Thread Queue Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/tqdata.h>
-
-/*PAGE
- *
- * _Thread_queue_Enqueue
- *
- * This routine blocks a thread, places it on a thread, and optionally
- * starts a timeout timer.
- *
- * Input parameters:
- * the_thread_queue - pointer to threadq
- * timeout - interval to wait
- *
- * Output parameters: NONE
- *
- * INTERRUPT LATENCY:
- * only case
- */
-
-void _Thread_queue_Enqueue(
- Thread_queue_Control *the_thread_queue,
- Watchdog_Interval timeout
-)
-{
- Thread_Control *the_thread;
-
- the_thread = _Thread_Executing;
-
-#if defined(RTEMS_MULTIPROCESSING)
- if ( _Thread_MP_Is_receive( the_thread ) && the_thread->receive_packet )
- the_thread = _Thread_MP_Allocate_proxy( the_thread_queue->state );
- else
-#endif
- _Thread_Set_state( the_thread, the_thread_queue->state );
-
- if ( timeout ) {
- _Watchdog_Initialize(
- &the_thread->Timer,
- _Thread_queue_Timeout,
- the_thread->Object.id,
- NULL
- );
-
- _Watchdog_Insert_ticks( &the_thread->Timer, timeout );
- }
-
- switch( the_thread_queue->discipline ) {
- case THREAD_QUEUE_DISCIPLINE_FIFO:
- _Thread_queue_Enqueue_fifo( the_thread_queue, the_thread, timeout );
- break;
- case THREAD_QUEUE_DISCIPLINE_PRIORITY:
- _Thread_queue_Enqueue_priority( the_thread_queue, the_thread, timeout );
- break;
- }
-}
-
diff --git a/cpukit/score/src/threadqenqueuefifo.c b/cpukit/score/src/threadqenqueuefifo.c
deleted file mode 100644
index 5ba902198e..0000000000
--- a/cpukit/score/src/threadqenqueuefifo.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Thread Queue Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/tqdata.h>
-
-/*PAGE
- *
- * _Thread_queue_Enqueue_fifo
- *
- * This routine blocks a thread, places it on a thread, and optionally
- * starts a timeout timer.
- *
- * Input parameters:
- * the_thread_queue - pointer to threadq
- * the_thread - pointer to the thread to block
- * timeout - interval to wait
- *
- * Output parameters: NONE
- *
- * INTERRUPT LATENCY:
- * only case
- */
-
-void _Thread_queue_Enqueue_fifo (
- Thread_queue_Control *the_thread_queue,
- Thread_Control *the_thread,
- Watchdog_Interval timeout
-)
-{
- ISR_Level level;
- Thread_queue_States sync_state;
-
- _ISR_Disable( level );
-
- sync_state = the_thread_queue->sync_state;
- the_thread_queue->sync_state = THREAD_QUEUE_SYNCHRONIZED;
-
- switch ( sync_state ) {
- case THREAD_QUEUE_SYNCHRONIZED:
- /*
- * This should never happen. It indicates that someone did not
- * enter a thread queue critical section.
- */
- break;
-
- case THREAD_QUEUE_NOTHING_HAPPENED:
- _Chain_Append_unprotected(
- &the_thread_queue->Queues.Fifo,
- &the_thread->Object.Node
- );
- _ISR_Enable( level );
- return;
-
- case THREAD_QUEUE_TIMEOUT:
- the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
- _ISR_Enable( level );
- break;
-
- case THREAD_QUEUE_SATISFIED:
- if ( _Watchdog_Is_active( &the_thread->Timer ) ) {
- _Watchdog_Deactivate( &the_thread->Timer );
- _ISR_Enable( level );
- (void) _Watchdog_Remove( &the_thread->Timer );
- } else
- _ISR_Enable( level );
- break;
- }
-
- /*
- * Global objects with thread queue's should not be operated on from an
- * ISR. But the sync code still must allow short timeouts to be processed
- * correctly.
- */
-
- _Thread_Unblock( the_thread );
-
-#if defined(RTEMS_MULTIPROCESSING)
- if ( !_Objects_Is_local_id( the_thread->Object.id ) )
- _Thread_MP_Free_proxy( the_thread );
-#endif
-
-}
-
diff --git a/cpukit/score/src/threadqenqueuepriority.c b/cpukit/score/src/threadqenqueuepriority.c
deleted file mode 100644
index a3a49cd7dc..0000000000
--- a/cpukit/score/src/threadqenqueuepriority.c
+++ /dev/null
@@ -1,221 +0,0 @@
-/*
- * Thread Queue Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/tqdata.h>
-
-/*PAGE
- *
- * _Thread_queue_Enqueue_priority
- *
- * This routine blocks a thread, places it on a thread, and optionally
- * starts a timeout timer.
- *
- * Input parameters:
- * the_thread_queue - pointer to threadq
- * thread - thread to insert
- * timeout - timeout interval in ticks
- *
- * Output parameters: NONE
- *
- * INTERRUPT LATENCY:
- * forward less than
- * forward equal
- */
-
-void _Thread_queue_Enqueue_priority(
- Thread_queue_Control *the_thread_queue,
- Thread_Control *the_thread,
- Watchdog_Interval timeout
-)
-{
- Priority_Control search_priority;
- Thread_Control *search_thread;
- ISR_Level level;
- Chain_Control *header;
- unsigned32 header_index;
- Chain_Node *the_node;
- Chain_Node *next_node;
- Chain_Node *previous_node;
- Chain_Node *search_node;
- Priority_Control priority;
- States_Control block_state;
- Thread_queue_States sync_state;
-
- _Chain_Initialize_empty( &the_thread->Wait.Block2n );
-
- priority = the_thread->current_priority;
- header_index = _Thread_queue_Header_number( priority );
- header = &the_thread_queue->Queues.Priority[ header_index ];
- block_state = the_thread_queue->state;
-
- if ( _Thread_queue_Is_reverse_search( priority ) )
- goto restart_reverse_search;
-
-restart_forward_search:
- search_priority = PRIORITY_MINIMUM - 1;
- _ISR_Disable( level );
- search_thread = (Thread_Control *) header->first;
- while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
- search_priority = search_thread->current_priority;
- if ( priority <= search_priority )
- break;
-
-#if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE )
- search_thread = (Thread_Control *) search_thread->Object.Node.next;
- if ( _Chain_Is_tail( header, (Chain_Node *)search_thread ) )
- break;
- search_priority = search_thread->current_priority;
- if ( priority <= search_priority )
- break;
-#endif
- _ISR_Flash( level );
- if ( !_States_Are_set( search_thread->current_state, block_state) ) {
- _ISR_Enable( level );
- goto restart_forward_search;
- }
- search_thread =
- (Thread_Control *)search_thread->Object.Node.next;
- }
-
- if ( the_thread_queue->sync_state != THREAD_QUEUE_NOTHING_HAPPENED )
- goto synchronize;
-
- the_thread_queue->sync_state = THREAD_QUEUE_SYNCHRONIZED;
-
- if ( priority == search_priority )
- goto equal_priority;
-
- search_node = (Chain_Node *) search_thread;
- previous_node = search_node->previous;
- the_node = (Chain_Node *) the_thread;
-
- the_node->next = search_node;
- the_node->previous = previous_node;
- previous_node->next = the_node;
- search_node->previous = the_node;
- _ISR_Enable( level );
- return;
-
-restart_reverse_search:
- search_priority = PRIORITY_MAXIMUM + 1;
-
- _ISR_Disable( level );
- search_thread = (Thread_Control *) header->last;
- while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
- search_priority = search_thread->current_priority;
- if ( priority >= search_priority )
- break;
-#if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE )
- search_thread = (Thread_Control *) search_thread->Object.Node.previous;
- if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) )
- break;
- search_priority = search_thread->current_priority;
- if ( priority >= search_priority )
- break;
-#endif
- _ISR_Flash( level );
- if ( !_States_Are_set( search_thread->current_state, block_state) ) {
- _ISR_Enable( level );
- goto restart_reverse_search;
- }
- search_thread = (Thread_Control *)
- search_thread->Object.Node.previous;
- }
-
- if ( the_thread_queue->sync_state != THREAD_QUEUE_NOTHING_HAPPENED )
- goto synchronize;
-
- the_thread_queue->sync_state = THREAD_QUEUE_SYNCHRONIZED;
-
- if ( priority == search_priority )
- goto equal_priority;
-
- search_node = (Chain_Node *) search_thread;
- next_node = search_node->next;
- the_node = (Chain_Node *) the_thread;
-
- the_node->next = next_node;
- the_node->previous = search_node;
- search_node->next = the_node;
- next_node->previous = the_node;
- _ISR_Enable( level );
- return;
-
-equal_priority: /* add at end of priority group */
- search_node = _Chain_Tail( &search_thread->Wait.Block2n );
- previous_node = search_node->previous;
- the_node = (Chain_Node *) the_thread;
-
- the_node->next = search_node;
- the_node->previous = previous_node;
- previous_node->next = the_node;
- search_node->previous = the_node;
- _ISR_Enable( level );
- return;
-
-synchronize:
-
- sync_state = the_thread_queue->sync_state;
- the_thread_queue->sync_state = THREAD_QUEUE_SYNCHRONIZED;
-
- switch ( sync_state ) {
- case THREAD_QUEUE_SYNCHRONIZED:
- /*
- * This should never happen. It indicates that someone did not
- * enter a thread queue critical section.
- */
- break;
-
- case THREAD_QUEUE_NOTHING_HAPPENED:
- /*
- * This should never happen. All of this was dealt with above.
- */
- break;
-
- case THREAD_QUEUE_TIMEOUT:
- the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
- _ISR_Enable( level );
- break;
-
- case THREAD_QUEUE_SATISFIED:
- if ( _Watchdog_Is_active( &the_thread->Timer ) ) {
- _Watchdog_Deactivate( &the_thread->Timer );
- _ISR_Enable( level );
- (void) _Watchdog_Remove( &the_thread->Timer );
- } else
- _ISR_Enable( level );
- break;
- }
-
- /*
- * Global objects with thread queue's should not be operated on from an
- * ISR. But the sync code still must allow short timeouts to be processed
- * correctly.
- */
-
- _Thread_Unblock( the_thread );
-
-#if defined(RTEMS_MULTIPROCESSING)
- if ( !_Objects_Is_local_id( the_thread->Object.id ) )
- _Thread_MP_Free_proxy( the_thread );
-#endif
-}
-
diff --git a/cpukit/score/src/threadqextract.c b/cpukit/score/src/threadqextract.c
deleted file mode 100644
index 0514b2d932..0000000000
--- a/cpukit/score/src/threadqextract.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Thread Queue Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/tqdata.h>
-
-/*PAGE
- *
- * _Thread_queue_Extract
- *
- * This routine removes a specific thread from the specified threadq,
- * deletes any timeout, and unblocks the thread.
- *
- * Input parameters:
- * the_thread_queue - pointer to a threadq header
- * the_thread - pointer to a thread control block
- *
- * Output parameters: NONE
- *
- * INTERRUPT LATENCY: NONE
- */
-
-void _Thread_queue_Extract(
- Thread_queue_Control *the_thread_queue,
- Thread_Control *the_thread
-)
-{
- switch ( the_thread_queue->discipline ) {
- case THREAD_QUEUE_DISCIPLINE_FIFO:
- _Thread_queue_Extract_fifo( the_thread_queue, the_thread );
- break;
- case THREAD_QUEUE_DISCIPLINE_PRIORITY:
- _Thread_queue_Extract_priority( the_thread_queue, the_thread );
- break;
- }
-}
-
diff --git a/cpukit/score/src/threadqextractfifo.c b/cpukit/score/src/threadqextractfifo.c
deleted file mode 100644
index d2f23d38ea..0000000000
--- a/cpukit/score/src/threadqextractfifo.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Thread Queue Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/tqdata.h>
-
-/*PAGE
- *
- * _Thread_queue_Extract_fifo
- *
- * This routine removes a specific thread from the specified threadq,
- * deletes any timeout, and unblocks the thread.
- *
- * Input parameters:
- * the_thread_queue - pointer to a threadq header
- * the_thread - pointer to the thread to block
- *
- * Output parameters: NONE
- *
- * INTERRUPT LATENCY:
- * EXTRACT_FIFO
- */
-
-void _Thread_queue_Extract_fifo(
- Thread_queue_Control *the_thread_queue,
- Thread_Control *the_thread
-)
-{
- ISR_Level level;
-
- _ISR_Disable( level );
-
- if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
- _ISR_Enable( level );
- return;
- }
-
- _Chain_Extract_unprotected( &the_thread->Object.Node );
-
- if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
- _ISR_Enable( level );
- } else {
- _Watchdog_Deactivate( &the_thread->Timer );
- _ISR_Enable( level );
- (void) _Watchdog_Remove( &the_thread->Timer );
- }
-
- _Thread_Unblock( the_thread );
-
-#if defined(RTEMS_MULTIPROCESSING)
- if ( !_Objects_Is_local_id( the_thread->Object.id ) )
- _Thread_MP_Free_proxy( the_thread );
-#endif
-
-}
-
diff --git a/cpukit/score/src/threadqextractpriority.c b/cpukit/score/src/threadqextractpriority.c
deleted file mode 100644
index 57c9c54137..0000000000
--- a/cpukit/score/src/threadqextractpriority.c
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Thread Queue Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/tqdata.h>
-
-/*PAGE
- *
- * _Thread_queue_Extract_priority
- *
- * This routine removes a specific thread from the specified threadq,
- * deletes any timeout, and unblocks the thread.
- *
- * Input parameters:
- * the_thread_queue - pointer to a threadq header
- * the_thread - pointer to a thread control block
- *
- * Output parameters: NONE
- *
- * INTERRUPT LATENCY:
- * EXTRACT_PRIORITY
- */
-
-void _Thread_queue_Extract_priority(
- Thread_queue_Control *the_thread_queue,
- Thread_Control *the_thread
-)
-{
- ISR_Level level;
- Chain_Node *the_node;
- Chain_Node *next_node;
- Chain_Node *previous_node;
- Thread_Control *new_first_thread;
- Chain_Node *new_first_node;
- Chain_Node *new_second_node;
- Chain_Node *last_node;
-
- the_node = (Chain_Node *) the_thread;
- _ISR_Disable( level );
- if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
- next_node = the_node->next;
- previous_node = the_node->previous;
-
- if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
- new_first_node = the_thread->Wait.Block2n.first;
- new_first_thread = (Thread_Control *) new_first_node;
- last_node = the_thread->Wait.Block2n.last;
- new_second_node = new_first_node->next;
-
- previous_node->next = new_first_node;
- next_node->previous = new_first_node;
- new_first_node->next = next_node;
- new_first_node->previous = previous_node;
-
- if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
- /* > two threads on 2-n */
- new_second_node->previous =
- _Chain_Head( &new_first_thread->Wait.Block2n );
- new_first_thread->Wait.Block2n.first = new_second_node;
-
- new_first_thread->Wait.Block2n.last = last_node;
- last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
- }
- } else {
- previous_node->next = next_node;
- next_node->previous = previous_node;
- }
-
- if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
- _ISR_Enable( level );
- _Thread_Unblock( the_thread );
- } else {
- _Watchdog_Deactivate( &the_thread->Timer );
- _ISR_Enable( level );
- (void) _Watchdog_Remove( &the_thread->Timer );
- _Thread_Unblock( the_thread );
- }
-
-#if defined(RTEMS_MULTIPROCESSING)
- if ( !_Objects_Is_local_id( the_thread->Object.id ) )
- _Thread_MP_Free_proxy( the_thread );
-#endif
- }
- else
- _ISR_Enable( level );
-}
-
diff --git a/cpukit/score/src/threadqextractwithproxy.c b/cpukit/score/src/threadqextractwithproxy.c
deleted file mode 100644
index 68b3daff5b..0000000000
--- a/cpukit/score/src/threadqextractwithproxy.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Thread Queue Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/tqdata.h>
-
-/*PAGE
- *
- * _Thread_queue_Extract_with_proxy
- *
- * This routine extracts the_thread from the_thread_queue
- * and insures that if there is a proxy for this task on
- * another node, it is also dealt with.
- *
- * XXX
- */
-
-boolean _Thread_queue_Extract_with_proxy(
- Thread_Control *the_thread
-)
-{
- States_Control state;
- Objects_Classes the_class;
- Thread_queue_Extract_callout proxy_extract_callout;
-
- state = the_thread->current_state;
-
- if ( _States_Is_waiting_on_thread_queue( state ) ) {
- if ( _States_Is_waiting_for_rpc_reply( state ) &&
- _States_Is_locally_blocked( state ) ) {
-
- the_class = _Objects_Get_class( the_thread->Wait.id );
-
- proxy_extract_callout = _Thread_queue_Extract_table[ the_class ];
-
- if ( proxy_extract_callout )
- (*proxy_extract_callout)( the_thread );
- }
- _Thread_queue_Extract( the_thread->Wait.queue, the_thread );
-
- return TRUE;
- }
- return FALSE;
-}
-
diff --git a/cpukit/score/src/threadqfirst.c b/cpukit/score/src/threadqfirst.c
deleted file mode 100644
index 0057429376..0000000000
--- a/cpukit/score/src/threadqfirst.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Thread Queue Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/tqdata.h>
-
-/*PAGE
- *
- * _Thread_queue_First
- *
- * This routines returns a pointer to the first thread on the
- * specified threadq.
- *
- * Input parameters:
- * the_thread_queue - pointer to thread queue
- *
- * Output parameters:
- * returns - first thread or NULL
- */
-
-Thread_Control *_Thread_queue_First(
- Thread_queue_Control *the_thread_queue
-)
-{
- Thread_Control *the_thread;
-
- switch ( the_thread_queue->discipline ) {
- case THREAD_QUEUE_DISCIPLINE_FIFO:
- the_thread = _Thread_queue_First_fifo( the_thread_queue );
- break;
- case THREAD_QUEUE_DISCIPLINE_PRIORITY:
- the_thread = _Thread_queue_First_priority( the_thread_queue );
- break;
- default: /* this is only to prevent warnings */
- the_thread = NULL;
- break;
- }
-
- return the_thread;
-}
-
diff --git a/cpukit/score/src/threadqfirstfifo.c b/cpukit/score/src/threadqfirstfifo.c
deleted file mode 100644
index f1b92f2fd2..0000000000
--- a/cpukit/score/src/threadqfirstfifo.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Thread Queue Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/tqdata.h>
-
-/*PAGE
- *
- * _Thread_queue_First_fifo
- *
- * This routines returns a pointer to the first thread on the
- * specified threadq.
- *
- * Input parameters:
- * the_thread_queue - pointer to threadq
- *
- * Output parameters:
- * returns - first thread or NULL
- */
-
-Thread_Control *_Thread_queue_First_fifo(
- Thread_queue_Control *the_thread_queue
-)
-{
- if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) )
- return (Thread_Control *) the_thread_queue->Queues.Fifo.first;
-
- return NULL;
-}
-
diff --git a/cpukit/score/src/threadqfirstpriority.c b/cpukit/score/src/threadqfirstpriority.c
deleted file mode 100644
index dbab132ef6..0000000000
--- a/cpukit/score/src/threadqfirstpriority.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Thread Queue Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/tqdata.h>
-
-/*PAGE
- *
- * _Thread_queue_First_priority
- *
- * This routines returns a pointer to the first thread on the
- * specified threadq.
- *
- * Input parameters:
- * the_thread_queue - pointer to thread queue
- *
- * Output parameters:
- * returns - first thread or NULL
- */
-
-Thread_Control *_Thread_queue_First_priority (
- Thread_queue_Control *the_thread_queue
-)
-{
- unsigned32 index;
-
- for( index=0 ;
- index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
- index++ ) {
- if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) )
- return (Thread_Control *)
- the_thread_queue->Queues.Priority[ index ].first;
- }
- return NULL;
-}
diff --git a/cpukit/score/src/threadqflush.c b/cpukit/score/src/threadqflush.c
deleted file mode 100644
index 4d97ff60ab..0000000000
--- a/cpukit/score/src/threadqflush.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Thread Queue Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/tqdata.h>
-
-/*PAGE
- *
- * _Thread_queue_Flush
- *
- * This kernel routine flushes the given thread queue.
- *
- * Input parameters:
- * the_thread_queue - pointer to threadq to be flushed
- * remote_extract_callout - pointer to routine which extracts a remote thread
- * status - status to return to the thread
- *
- * Output parameters: NONE
- */
-
-void _Thread_queue_Flush(
- Thread_queue_Control *the_thread_queue,
- Thread_queue_Flush_callout remote_extract_callout,
- unsigned32 status
-)
-{
- Thread_Control *the_thread;
-
- while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) {
-#if defined(RTEMS_MULTIPROCESSING)
- if ( !_Objects_Is_local_id( the_thread->Object.id ) )
- ( *remote_extract_callout )( the_thread );
- else
-#endif
- the_thread->Wait.return_code = status;
- }
-}
-
diff --git a/cpukit/score/src/threadqtimeout.c b/cpukit/score/src/threadqtimeout.c
deleted file mode 100644
index 7ac2c04186..0000000000
--- a/cpukit/score/src/threadqtimeout.c
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Thread Queue Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/tqdata.h>
-
-/*PAGE
- *
- * _Thread_queue_Timeout
- *
- * This routine processes a thread which timeouts while waiting on
- * a thread queue. It is called by the watchdog handler.
- *
- * Input parameters:
- * id - thread id
- *
- * Output parameters: NONE
- */
-
-void _Thread_queue_Timeout(
- Objects_Id id,
- void *ignored
-)
-{
- Thread_Control *the_thread;
- Thread_queue_Control *the_thread_queue;
- Objects_Locations location;
-
- the_thread = _Thread_Get( id, &location );
- switch ( location ) {
- case OBJECTS_ERROR:
- case OBJECTS_REMOTE: /* impossible */
- break;
- case OBJECTS_LOCAL:
- the_thread_queue = the_thread->Wait.queue;
-
- /*
- * If the_thread_queue is not synchronized, then it is either
- * "nothing happened", "timeout", or "satisfied". If the_thread
- * is the executing thread, then it is in the process of blocking
- * and it is the thread which is responsible for the synchronization
- * process.
- *
- * If it is not satisfied, then it is "nothing happened" and
- * this is the "timeout" transition. After a request is satisfied,
- * a timeout is not allowed to occur.
- */
-
- if ( the_thread_queue->sync_state != THREAD_QUEUE_SYNCHRONIZED &&
- _Thread_Is_executing( the_thread ) ) {
- if ( the_thread_queue->sync_state != THREAD_QUEUE_SATISFIED )
- the_thread_queue->sync_state = THREAD_QUEUE_TIMEOUT;
- } else {
- the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
- _Thread_queue_Extract( the_thread->Wait.queue, the_thread );
- }
- _Thread_Unnest_dispatch();
- break;
- }
-}
-
diff --git a/cpukit/score/src/threadready.c b/cpukit/score/src/threadready.c
deleted file mode 100644
index 35525e787a..0000000000
--- a/cpukit/score/src/threadready.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Thread Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/states.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-
-/*PAGE
- *
- * _Thread_Ready
- *
- * This kernel routine readies the requested thread, the thread chain
- * is adjusted. A new heir thread may be selected.
- *
- * Input parameters:
- * the_thread - pointer to thread control block
- *
- * Output parameters: NONE
- *
- * NOTE: This routine uses the "blocking" heir selection mechanism.
- * This insures the correct heir after a thread restart.
- *
- * INTERRUPT LATENCY:
- * ready chain
- * select heir
- */
-
-void _Thread_Ready(
- Thread_Control *the_thread
-)
-{
- ISR_Level level;
- Thread_Control *heir;
-
- _ISR_Disable( level );
-
- the_thread->current_state = STATES_READY;
-
- _Priority_Add_to_bit_map( &the_thread->Priority_map );
-
- _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node );
-
- _ISR_Flash( level );
-
- _Thread_Calculate_heir();
-
- heir = _Thread_Heir;
-
- if ( !_Thread_Is_executing( heir ) && _Thread_Executing->is_preemptible )
- _Context_Switch_necessary = TRUE;
-
- _ISR_Enable( level );
-}
diff --git a/cpukit/score/src/threadreset.c b/cpukit/score/src/threadreset.c
deleted file mode 100644
index 52c975ec17..0000000000
--- a/cpukit/score/src/threadreset.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Thread Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/states.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-
-/*
- * _Thread_Reset
- *
- * DESCRIPTION:
- *
- * This routine resets a thread to its initial stat but does
- * not actually restart it. Some APIs do this in separate
- * operations and this division helps support this.
- */
-
-void _Thread_Reset(
- Thread_Control *the_thread,
- void *pointer_argument,
- unsigned32 numeric_argument
-)
-{
- the_thread->resource_count = 0;
- the_thread->suspend_count = 0;
- the_thread->is_preemptible = the_thread->Start.is_preemptible;
- the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
- the_thread->budget_callout = the_thread->Start.budget_callout;
-
- the_thread->Start.pointer_argument = pointer_argument;
- the_thread->Start.numeric_argument = numeric_argument;
-
- if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
-
- if ( _Watchdog_Is_active( &the_thread->Timer ) )
- (void) _Watchdog_Remove( &the_thread->Timer );
- }
-
- if ( the_thread->current_priority != the_thread->Start.initial_priority ) {
- the_thread->real_priority = the_thread->Start.initial_priority;
- _Thread_Set_priority( the_thread, the_thread->Start.initial_priority );
- }
-}
-
diff --git a/cpukit/score/src/threadresettimeslice.c b/cpukit/score/src/threadresettimeslice.c
deleted file mode 100644
index 480009b403..0000000000
--- a/cpukit/score/src/threadresettimeslice.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Thread Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/states.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-
-/*PAGE
- *
- * _Thread_Reset_timeslice
- *
- * This routine will remove the running thread from the ready chain
- * and place it immediately at the rear of this chain and then the
- * timeslice counter is reset. The heir THREAD will be updated if
- * the running is also the currently the heir.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * INTERRUPT LATENCY:
- * ready chain
- * select heir
- */
-
-void _Thread_Reset_timeslice( void )
-{
- ISR_Level level;
- Thread_Control *executing;
- Chain_Control *ready;
-
- executing = _Thread_Executing;
- ready = executing->ready;
- _ISR_Disable( level );
- if ( _Chain_Has_only_one_node( ready ) ) {
- _ISR_Enable( level );
- return;
- }
- _Chain_Extract_unprotected( &executing->Object.Node );
- _Chain_Append_unprotected( ready, &executing->Object.Node );
-
- _ISR_Flash( level );
-
- if ( _Thread_Is_heir( executing ) )
- _Thread_Heir = (Thread_Control *) ready->first;
-
- _Context_Switch_necessary = TRUE;
-
- _ISR_Enable( level );
-}
diff --git a/cpukit/score/src/threadrestart.c b/cpukit/score/src/threadrestart.c
deleted file mode 100644
index f2b6e9ddbb..0000000000
--- a/cpukit/score/src/threadrestart.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Thread Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/states.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-
-/*
- * _Thread_Restart
- *
- * DESCRIPTION:
- *
- * This support routine restarts the specified task in a way that the
- * next time this thread executes, it will begin execution at its
- * original starting point.
- */
-
-boolean _Thread_Restart(
- Thread_Control *the_thread,
- void *pointer_argument,
- unsigned32 numeric_argument
-)
-{
- if ( !_States_Is_dormant( the_thread->current_state ) ) {
-
- _Thread_Set_transient( the_thread );
-
- _Thread_Reset( the_thread, pointer_argument, numeric_argument );
-
- _Thread_Load_environment( the_thread );
-
- _Thread_Ready( the_thread );
-
- _User_extensions_Thread_restart( the_thread );
-
- if ( _Thread_Is_executing ( the_thread ) )
- _Thread_Restart_self();
-
- return TRUE;
- }
-
- return FALSE;
-}
diff --git a/cpukit/score/src/threadresume.c b/cpukit/score/src/threadresume.c
deleted file mode 100644
index 221d6a0fc0..0000000000
--- a/cpukit/score/src/threadresume.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Thread Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/states.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-
-/*PAGE
- *
- * _Thread_Resume
- *
- * This kernel routine clears the SUSPEND state if the suspend_count
- * drops below one. If the force parameter is set the suspend_count
- * is forced back to zero. The thread ready chain is adjusted if
- * necessary and the Heir thread is set accordingly.
- *
- * Input parameters:
- * the_thread - pointer to thread control block
- * force - force the suspend count back to 0
- *
- * Output parameters: NONE
- *
- * INTERRUPT LATENCY:
- * priority map
- * select heir
- */
-
-
-void _Thread_Resume(
- Thread_Control *the_thread,
- boolean force
-)
-{
-
- ISR_Level level;
- States_Control current_state;
-
- _ISR_Disable( level );
-
- if ( force == TRUE )
- the_thread->suspend_count = 0;
- else
- the_thread->suspend_count--;
-
- if ( the_thread->suspend_count > 0 ) {
- _ISR_Enable( level );
- return;
- }
-
- current_state = the_thread->current_state;
- if ( current_state & STATES_SUSPENDED ) {
- current_state =
- the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state);
-
- if ( _States_Is_ready( current_state ) ) {
-
- _Priority_Add_to_bit_map( &the_thread->Priority_map );
-
- _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
-
- _ISR_Flash( level );
-
- if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
- _Thread_Heir = the_thread;
- if ( _Thread_Executing->is_preemptible ||
- the_thread->current_priority == 0 )
- _Context_Switch_necessary = TRUE;
- }
- }
- }
-
- _ISR_Enable( level );
-}
diff --git a/cpukit/score/src/threadrotatequeue.c b/cpukit/score/src/threadrotatequeue.c
deleted file mode 100644
index 0c436e22a9..0000000000
--- a/cpukit/score/src/threadrotatequeue.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Thread Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/states.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-
-/*PAGE
- *
- * _Thread_Rotate_Ready_Queue
- *
- * This kernel routine will rotate the ready queue.
- * remove the running THREAD from the ready chain
- * and place it immediatly at the rear of this chain. Reset timeslice
- * and yield the processor functions both use this routine, therefore if
- * reset is TRUE and this is the only thread on the chain then the
- * timeslice counter is reset. The heir THREAD will be updated if the
- * running is also the currently the heir.
- *
- * Input parameters:
- * Priority of the queue we wish to modify.
- *
- * Output parameters: NONE
- *
- * INTERRUPT LATENCY:
- * ready chain
- * select heir
- */
-
-void _Thread_Rotate_Ready_Queue(
- Priority_Control priority
-)
-{
- ISR_Level level;
- Thread_Control *executing;
- Chain_Control *ready;
- Chain_Node *node;
-
- ready = &_Thread_Ready_chain[ priority ];
- executing = _Thread_Executing;
-
- if ( ready == executing->ready ) {
- _Thread_Yield_processor();
- return;
- }
-
- _ISR_Disable( level );
-
- if ( !_Chain_Is_empty( ready ) ) {
- if (!_Chain_Has_only_one_node( ready ) ) {
- node = _Chain_Get_first_unprotected( ready );
- _Chain_Append_unprotected( ready, node );
- }
- }
-
- _ISR_Flash( level );
-
- if ( _Thread_Heir->ready == ready )
- _Thread_Heir = (Thread_Control *) ready->first;
-
- if ( executing != _Thread_Heir )
- _Context_Switch_necessary = TRUE;
-
- _ISR_Enable( level );
-}
-
-
-
-
-
-
diff --git a/cpukit/score/src/threadsetpriority.c b/cpukit/score/src/threadsetpriority.c
deleted file mode 100644
index a4641ae43f..0000000000
--- a/cpukit/score/src/threadsetpriority.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Thread Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/states.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-
-/*PAGE
- *
- * _Thread_Set_priority
- *
- * This directive enables and disables several modes of
- * execution for the requesting thread.
- *
- * Input parameters:
- * the_thread - pointer to thread priority
- * new_priority - new priority
- *
- * Output: NONE
- */
-
-void _Thread_Set_priority(
- Thread_Control *the_thread,
- Priority_Control new_priority
-)
-{
- the_thread->current_priority = new_priority;
- the_thread->ready = &_Thread_Ready_chain[ new_priority ];
-
- _Priority_Initialize_information( &the_thread->Priority_map, new_priority );
-}
diff --git a/cpukit/score/src/threadsetstate.c b/cpukit/score/src/threadsetstate.c
deleted file mode 100644
index 286cacd56a..0000000000
--- a/cpukit/score/src/threadsetstate.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Thread Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/states.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-
-/*PAGE
- *
- * _Thread_Set_state
- *
- * This kernel routine sets the requested state in the THREAD. The
- * THREAD chain is adjusted if necessary.
- *
- * Input parameters:
- * the_thread - pointer to thread control block
- * state - state to be set
- *
- * Output parameters: NONE
- *
- * INTERRUPT LATENCY:
- * ready chain
- * select map
- */
-
-void _Thread_Set_state(
- Thread_Control *the_thread,
- States_Control state
-)
-{
- ISR_Level level;
- Chain_Control *ready;
-
- ready = the_thread->ready;
- _ISR_Disable( level );
- if ( !_States_Is_ready( the_thread->current_state ) ) {
- the_thread->current_state =
- _States_Set( state, the_thread->current_state );
- _ISR_Enable( level );
- return;
- }
-
- the_thread->current_state = state;
-
- if ( _Chain_Has_only_one_node( ready ) ) {
-
- _Chain_Initialize_empty( ready );
- _Priority_Remove_from_bit_map( &the_thread->Priority_map );
-
- } else
- _Chain_Extract_unprotected( &the_thread->Object.Node );
-
- _ISR_Flash( level );
-
- if ( _Thread_Is_heir( the_thread ) )
- _Thread_Calculate_heir();
-
- if ( _Thread_Is_executing( the_thread ) )
- _Context_Switch_necessary = TRUE;
-
- _ISR_Enable( level );
-}
diff --git a/cpukit/score/src/threadsettransient.c b/cpukit/score/src/threadsettransient.c
deleted file mode 100644
index 9a08bddbbb..0000000000
--- a/cpukit/score/src/threadsettransient.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Thread Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/states.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-
-/*PAGE
- *
- * _Thread_Set_transient
- *
- * This kernel routine places the requested thread in the transient state
- * which will remove it from the ready queue, if necessary. No
- * rescheduling is necessary because it is assumed that the transient
- * state will be cleared before dispatching is enabled.
- *
- * Input parameters:
- * the_thread - pointer to thread control block
- *
- * Output parameters: NONE
- *
- * INTERRUPT LATENCY:
- * only case
- */
-
-void _Thread_Set_transient(
- Thread_Control *the_thread
-)
-{
- ISR_Level level;
- unsigned32 old_state;
- Chain_Control *ready;
-
- ready = the_thread->ready;
- _ISR_Disable( level );
-
- old_state = the_thread->current_state;
- the_thread->current_state = _States_Set( STATES_TRANSIENT, old_state );
-
- if ( _States_Is_ready( old_state ) ) {
- if ( _Chain_Has_only_one_node( ready ) ) {
-
- _Chain_Initialize_empty( ready );
- _Priority_Remove_from_bit_map( &the_thread->Priority_map );
-
- } else
- _Chain_Extract_unprotected( &the_thread->Object.Node );
- }
-
- _ISR_Enable( level );
-
-}
diff --git a/cpukit/score/src/threadstackallocate.c b/cpukit/score/src/threadstackallocate.c
deleted file mode 100644
index 583b672f19..0000000000
--- a/cpukit/score/src/threadstackallocate.c
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Thread Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/states.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-
-/*PAGE
- *
- * _Thread_Stack_Allocate
- *
- * Allocate the requested stack space for the thread.
- * return the actual size allocated after any adjustment
- * or return zero if the allocation failed.
- * Set the Start.stack field to the address of the stack
- */
-
-unsigned32 _Thread_Stack_Allocate(
- Thread_Control *the_thread,
- unsigned32 stack_size
-)
-{
- void *stack_addr = 0;
-
- if ( !_Stack_Is_enough( stack_size ) )
- stack_size = STACK_MINIMUM_SIZE;
-
- /*
- * Call ONLY the CPU table stack allocate hook, _or_ the
- * the RTEMS workspace allocate. This is so the stack free
- * routine can call the correct deallocation routine.
- */
-
- if ( _CPU_Table.stack_allocate_hook )
- {
- stack_addr = (*_CPU_Table.stack_allocate_hook)( stack_size );
- } else {
-
- /*
- * First pad the requested size so we allocate enough memory
- * so the context initialization can align it properly. The address
- * returned the workspace allocate must be directly stored in the
- * stack control block because it is later used in the free sequence.
- *
- * Thus it is the responsibility of the CPU dependent code to
- * get and keep the stack adjust factor, the stack alignment, and
- * the context initialization sequence in sync.
- */
-
- stack_size = _Stack_Adjust_size( stack_size );
- stack_addr = _Workspace_Allocate( stack_size );
- }
-
- if ( !stack_addr )
- stack_size = 0;
-
- the_thread->Start.stack = stack_addr;
-
- return stack_size;
-}
diff --git a/cpukit/score/src/threadstackfree.c b/cpukit/score/src/threadstackfree.c
deleted file mode 100644
index 1a8abeade8..0000000000
--- a/cpukit/score/src/threadstackfree.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Thread Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/states.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-
-/*
- * _Thread_Stack_Free
- *
- * Deallocate the Thread's stack.
- */
-
-void _Thread_Stack_Free(
- Thread_Control *the_thread
-)
-{
- /*
- * If the API provided the stack space, then don't free it.
- */
-
- if ( !the_thread->Start.core_allocated_stack )
- return;
-
- /*
- * Call ONLY the CPU table stack free hook, or the
- * the RTEMS workspace free. This is so the free
- * routine properly matches the allocation of the stack.
- */
-
- if ( _CPU_Table.stack_free_hook )
- (*_CPU_Table.stack_free_hook)( the_thread->Start.Initial_stack.area );
- else
- _Workspace_Free( the_thread->Start.Initial_stack.area );
-}
diff --git a/cpukit/score/src/threadstart.c b/cpukit/score/src/threadstart.c
deleted file mode 100644
index ac36618c63..0000000000
--- a/cpukit/score/src/threadstart.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Thread Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/states.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-
-/*
- * _Thread_Start
- *
- * DESCRIPTION:
- *
- * This routine initializes the executable information for a thread
- * and makes it ready to execute. After this routine executes, the
- * thread competes with all other threads for CPU time.
- */
-
-boolean _Thread_Start(
- Thread_Control *the_thread,
- Thread_Start_types the_prototype,
- void *entry_point,
- void *pointer_argument,
- unsigned32 numeric_argument
-)
-{
- if ( _States_Is_dormant( the_thread->current_state ) ) {
-
- the_thread->Start.entry_point = (Thread_Entry) entry_point;
-
- the_thread->Start.prototype = the_prototype;
- the_thread->Start.pointer_argument = pointer_argument;
- the_thread->Start.numeric_argument = numeric_argument;
-
- _Thread_Load_environment( the_thread );
-
- _Thread_Ready( the_thread );
-
- _User_extensions_Thread_start( the_thread );
-
- return TRUE;
- }
-
- return FALSE;
-
-}
diff --git a/cpukit/score/src/threadstartmultitasking.c b/cpukit/score/src/threadstartmultitasking.c
deleted file mode 100644
index 0e58f77420..0000000000
--- a/cpukit/score/src/threadstartmultitasking.c
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Thread Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/states.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-
-/*PAGE
- *
- * _Thread_Start_multitasking
- *
- * This kernel routine readies the requested thread, the thread chain
- * is adjusted. A new heir thread may be selected.
- *
- * Input parameters:
- * system_thread - pointer to system initialization thread control block
- * idle_thread - pointer to idle thread control block
- *
- * Output parameters: NONE
- *
- * NOTE: This routine uses the "blocking" heir selection mechanism.
- * This insures the correct heir after a thread restart.
- *
- * INTERRUPT LATENCY:
- * ready chain
- * select heir
- */
-
-void _Thread_Start_multitasking( void )
-{
- /*
- * The system is now multitasking and completely initialized.
- * This system thread now either "goes away" in a single processor
- * system or "turns into" the server thread in an MP system.
- */
-
- _System_state_Set( SYSTEM_STATE_UP );
-
- _Context_Switch_necessary = FALSE;
-
- _Thread_Executing = _Thread_Heir;
-
- /*
- * Get the init task(s) running.
- *
- * Note: Thread_Dispatch() is normally used to dispatch threads. As
- * part of its work, Thread_Dispatch() restores floating point
- * state for the heir task.
- *
- * This code avoids Thread_Dispatch(), and so we have to restore
- * (actually initialize) the floating point state "by hand".
- *
- * Ignore the CPU_USE_DEFERRED_FP_SWITCH because we must always
- * switch in the first thread if it is FP.
- */
-
-
-#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
- /*
- * don't need to worry about saving BSP's floating point state
- */
-
- if ( _Thread_Heir->fp_context != NULL )
- _Context_Restore_fp( &_Thread_Heir->fp_context );
-#endif
-
- _Context_Switch( &_Thread_BSP_context, &_Thread_Heir->Registers );
-}
diff --git a/cpukit/score/src/threadsuspend.c b/cpukit/score/src/threadsuspend.c
deleted file mode 100644
index fe66b715e0..0000000000
--- a/cpukit/score/src/threadsuspend.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Thread Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/states.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-
-/*PAGE
- *
- * _Thread_Suspend
- *
- * This kernel routine sets the SUSPEND state in the THREAD. The
- * THREAD chain and suspend count are adjusted if necessary.
- *
- * Input parameters:
- * the_thread - pointer to thread control block
- *
- * Output parameters: NONE
- *
- * INTERRUPT LATENCY:
- * ready chain
- * select map
- */
-
-void _Thread_Suspend(
- Thread_Control *the_thread
-)
-{
- ISR_Level level;
- Chain_Control *ready;
-
- ready = the_thread->ready;
- _ISR_Disable( level );
- the_thread->suspend_count++;
- if ( !_States_Is_ready( the_thread->current_state ) ) {
- the_thread->current_state =
- _States_Set( STATES_SUSPENDED, the_thread->current_state );
- _ISR_Enable( level );
- return;
- }
-
- the_thread->current_state = STATES_SUSPENDED;
-
- if ( _Chain_Has_only_one_node( ready ) ) {
-
- _Chain_Initialize_empty( ready );
- _Priority_Remove_from_bit_map( &the_thread->Priority_map );
-
- } else
- _Chain_Extract_unprotected( &the_thread->Object.Node );
-
- _ISR_Flash( level );
-
- if ( _Thread_Is_heir( the_thread ) )
- _Thread_Calculate_heir();
-
- if ( _Thread_Is_executing( the_thread ) )
- _Context_Switch_necessary = TRUE;
-
- _ISR_Enable( level );
-}
diff --git a/cpukit/score/src/threadtickletimeslice.c b/cpukit/score/src/threadtickletimeslice.c
deleted file mode 100644
index 24ef516506..0000000000
--- a/cpukit/score/src/threadtickletimeslice.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Thread Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/states.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-
-/*PAGE
- *
- * _Thread_Tickle_timeslice
- *
- * This scheduler routine determines if timeslicing is enabled
- * for the currently executing thread and, if so, updates the
- * timeslice count and checks for timeslice expiration.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- */
-
-void _Thread_Tickle_timeslice( void )
-{
- Thread_Control *executing;
-
- executing = _Thread_Executing;
-
- /*
- * Increment the number of ticks this thread has been executing
- */
-
- executing->ticks_executed++;
-
- /*
- * If the thread is not preemptible or is not ready, then
- * just return.
- */
-
- if ( !executing->is_preemptible )
- return;
-
- if ( !_States_Is_ready( executing->current_state ) )
- return;
-
- /*
- * The cpu budget algorithm determines what happens next.
- */
-
- switch ( executing->budget_algorithm ) {
- case THREAD_CPU_BUDGET_ALGORITHM_NONE:
- break;
-
- case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
- case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
- if ( --executing->cpu_time_budget == 0 ) {
- _Thread_Reset_timeslice();
- executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
- }
- break;
-
- case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
- if ( --executing->cpu_time_budget == 0 )
- (*executing->budget_callout)( executing );
- break;
- }
-}
diff --git a/cpukit/score/src/threadyieldprocessor.c b/cpukit/score/src/threadyieldprocessor.c
deleted file mode 100644
index b46a6b1474..0000000000
--- a/cpukit/score/src/threadyieldprocessor.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Thread Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/states.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-
-/*PAGE
- *
- * _Thread_Yield_processor
- *
- * This kernel routine will remove the running THREAD from the ready chain
- * and place it immediatly at the rear of this chain. Reset timeslice
- * and yield the processor functions both use this routine, therefore if
- * reset is TRUE and this is the only thread on the chain then the
- * timeslice counter is reset. The heir THREAD will be updated if the
- * running is also the currently the heir.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * INTERRUPT LATENCY:
- * ready chain
- * select heir
- */
-
-void _Thread_Yield_processor( void )
-{
- ISR_Level level;
- Thread_Control *executing;
- Chain_Control *ready;
-
- executing = _Thread_Executing;
- ready = executing->ready;
- _ISR_Disable( level );
- if ( !_Chain_Has_only_one_node( ready ) ) {
- _Chain_Extract_unprotected( &executing->Object.Node );
- _Chain_Append_unprotected( ready, &executing->Object.Node );
-
- _ISR_Flash( level );
-
- if ( _Thread_Is_heir( executing ) )
- _Thread_Heir = (Thread_Control *) ready->first;
- _Context_Switch_necessary = TRUE;
- }
- else if ( !_Thread_Is_heir( executing ) )
- _Context_Switch_necessary = TRUE;
-
- _ISR_Enable( level );
-}
diff --git a/cpukit/score/src/userext.c b/cpukit/score/src/userext.c
deleted file mode 100644
index d652c29568..0000000000
--- a/cpukit/score/src/userext.c
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- * User Extension Handler
- *
- * NOTE: XXX
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/userext.h>
-
-/*PAGE
- *
- * _User_extensions_Thread_create
- */
-
-boolean _User_extensions_Thread_create (
- Thread_Control *the_thread
-)
-{
- Chain_Node *the_node;
- User_extensions_Control *the_extension;
- boolean status;
-
- for ( the_node = _User_extensions_List.first ;
- !_Chain_Is_tail( &_User_extensions_List, the_node ) ;
- the_node = the_node->next ) {
-
- the_extension = (User_extensions_Control *) the_node;
-
- if ( the_extension->Callouts.thread_create != NULL ) {
- status = (*the_extension->Callouts.thread_create)(
- _Thread_Executing,
- the_thread
- );
- if ( !status )
- return FALSE;
- }
- }
-
- return TRUE;
-}
-
-/*PAGE
- *
- * _User_extensions_Thread_delete
- */
-
-void _User_extensions_Thread_delete (
- Thread_Control *the_thread
-)
-{
- Chain_Node *the_node;
- User_extensions_Control *the_extension;
-
- for ( the_node = _User_extensions_List.last ;
- !_Chain_Is_head( &_User_extensions_List, the_node ) ;
- the_node = the_node->previous ) {
-
- the_extension = (User_extensions_Control *) the_node;
-
- if ( the_extension->Callouts.thread_delete != NULL )
- (*the_extension->Callouts.thread_delete)(
- _Thread_Executing,
- the_thread
- );
- }
-}
-
-/*PAGE
- *
- * _User_extensions_Thread_start
- *
- */
-
-void _User_extensions_Thread_start (
- Thread_Control *the_thread
-)
-{
- Chain_Node *the_node;
- User_extensions_Control *the_extension;
-
- for ( the_node = _User_extensions_List.first ;
- !_Chain_Is_tail( &_User_extensions_List, the_node ) ;
- the_node = the_node->next ) {
-
- the_extension = (User_extensions_Control *) the_node;
-
- if ( the_extension->Callouts.thread_start != NULL )
- (*the_extension->Callouts.thread_start)(
- _Thread_Executing,
- the_thread
- );
- }
-}
-
-/*PAGE
- *
- * _User_extensions_Thread_restart
- *
- */
-
-void _User_extensions_Thread_restart (
- Thread_Control *the_thread
-)
-{
- Chain_Node *the_node;
- User_extensions_Control *the_extension;
-
- for ( the_node = _User_extensions_List.first ;
- !_Chain_Is_tail( &_User_extensions_List, the_node ) ;
- the_node = the_node->next ) {
-
- the_extension = (User_extensions_Control *) the_node;
-
- if ( the_extension->Callouts.thread_restart != NULL )
- (*the_extension->Callouts.thread_restart)(
- _Thread_Executing,
- the_thread
- );
- }
-}
-
-/*PAGE
- *
- * _User_extensions_Thread_begin
- *
- */
-
-void _User_extensions_Thread_begin (
- Thread_Control *executing
-)
-{
- Chain_Node *the_node;
- User_extensions_Control *the_extension;
-
- for ( the_node = _User_extensions_List.first ;
- !_Chain_Is_tail( &_User_extensions_List, the_node ) ;
- the_node = the_node->next ) {
-
- the_extension = (User_extensions_Control *) the_node;
-
- if ( the_extension->Callouts.thread_begin != NULL )
- (*the_extension->Callouts.thread_begin)( executing );
- }
-}
-
-/*PAGE
- *
- * _User_extensions_Thread_exitted
- */
-
-void _User_extensions_Thread_exitted (
- Thread_Control *executing
-)
-{
- Chain_Node *the_node;
- User_extensions_Control *the_extension;
-
- for ( the_node = _User_extensions_List.last ;
- !_Chain_Is_head( &_User_extensions_List, the_node ) ;
- the_node = the_node->previous ) {
-
- the_extension = (User_extensions_Control *) the_node;
-
- if ( the_extension->Callouts.thread_exitted != NULL )
- (*the_extension->Callouts.thread_exitted)( executing );
- }
-}
-
-/*PAGE
- *
- * _User_extensions_Fatal
- */
-
-void _User_extensions_Fatal (
- Internal_errors_Source the_source,
- boolean is_internal,
- unsigned32 the_error
-)
-{
- Chain_Node *the_node;
- User_extensions_Control *the_extension;
-
- for ( the_node = _User_extensions_List.last ;
- !_Chain_Is_head( &_User_extensions_List, the_node ) ;
- the_node = the_node->previous ) {
-
- the_extension = (User_extensions_Control *) the_node;
-
- if ( the_extension->Callouts.fatal != NULL )
- (*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
- }
-}
-
-
diff --git a/cpukit/score/src/watchdog.c b/cpukit/score/src/watchdog.c
deleted file mode 100644
index 1bdbc5ae3d..0000000000
--- a/cpukit/score/src/watchdog.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Watchdog Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/watchdog.h>
-
-/*PAGE
- *
- * _Watchdog_Handler_initialization
- *
- * This routine initializes the watchdog handler.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- */
-
-void _Watchdog_Handler_initialization( void )
-{
- _Watchdog_Sync_count = 0;
- _Watchdog_Sync_level = 0;
- _Watchdog_Ticks_since_boot = 0;
-
- _Chain_Initialize_empty( &_Watchdog_Ticks_chain );
- _Chain_Initialize_empty( &_Watchdog_Seconds_chain );
-}
diff --git a/cpukit/score/src/watchdogadjust.c b/cpukit/score/src/watchdogadjust.c
deleted file mode 100644
index 6926743f32..0000000000
--- a/cpukit/score/src/watchdogadjust.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Watchdog Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/watchdog.h>
-
-/*PAGE
- *
- * _Watchdog_Adjust
- *
- * This routine adjusts the delta chain backward or forward in response
- * to a time change.
- *
- * Input parameters:
- * header - pointer to the delta chain to be adjusted
- * direction - forward or backward adjustment to delta chain
- * units - units to adjust
- *
- * Output parameters:
- */
-
-void _Watchdog_Adjust(
- Chain_Control *header,
- Watchdog_Adjust_directions direction,
- Watchdog_Interval units
-)
-{
- if ( !_Chain_Is_empty( header ) ) {
- switch ( direction ) {
- case WATCHDOG_BACKWARD:
- _Watchdog_First( header )->delta_interval += units;
- break;
- case WATCHDOG_FORWARD:
- while ( units ) {
- if ( units < _Watchdog_First( header )->delta_interval ) {
- _Watchdog_First( header )->delta_interval -= units;
- break;
- } else {
- units -= _Watchdog_First( header )->delta_interval;
- _Watchdog_First( header )->delta_interval = 1;
- _Watchdog_Tickle( header );
- if ( _Chain_Is_empty( header ) )
- break;
- }
- }
- break;
- }
- }
-}
-
diff --git a/cpukit/score/src/watchdoginsert.c b/cpukit/score/src/watchdoginsert.c
deleted file mode 100644
index 43c1eacd76..0000000000
--- a/cpukit/score/src/watchdoginsert.c
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Watchdog Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/watchdog.h>
-
-/*PAGE
- *
- * _Watchdog_Insert
- *
- * This routine inserts a watchdog timer on to the appropriate delta
- * chain while updating the delta interval counters.
- */
-
-void _Watchdog_Insert(
- Chain_Control *header,
- Watchdog_Control *the_watchdog
-)
-{
- ISR_Level level;
- Watchdog_Control *after;
- unsigned32 insert_isr_nest_level;
- Watchdog_Interval delta_interval;
-
-
- insert_isr_nest_level = _ISR_Nest_level;
- the_watchdog->state = WATCHDOG_BEING_INSERTED;
-
- _Watchdog_Sync_count++;
-restart:
- delta_interval = the_watchdog->initial;
-
- _ISR_Disable( level );
-
- for ( after = _Watchdog_First( header ) ;
- ;
- after = _Watchdog_Next( after ) ) {
-
- if ( delta_interval == 0 || !_Watchdog_Next( after ) )
- break;
-
- if ( delta_interval < after->delta_interval ) {
- after->delta_interval -= delta_interval;
- break;
- }
-
- delta_interval -= after->delta_interval;
-
- /*
- * If you experience problems comment out the _ISR_Flash line.
- * 3.2.0 was the first release with this critical section redesigned.
- * Under certain circumstances, the PREVIOUS critical section algorithm
- * used around this flash point allowed interrupts to execute
- * which violated the design assumptions. The critical section
- * mechanism used here WAS redesigned to address this.
- */
-
- _ISR_Flash( level );
-
- if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
- goto exit_insert;
- }
-
- if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
- _Watchdog_Sync_level = insert_isr_nest_level;
- _ISR_Enable( level );
- goto restart;
- }
- }
-
- _Watchdog_Activate( the_watchdog );
-
- the_watchdog->delta_interval = delta_interval;
-
- _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
-
- the_watchdog->start_time = _Watchdog_Ticks_since_boot;
-
-exit_insert:
- _Watchdog_Sync_level = insert_isr_nest_level;
- _Watchdog_Sync_count--;
- _ISR_Enable( level );
-}
-
diff --git a/cpukit/score/src/watchdogremove.c b/cpukit/score/src/watchdogremove.c
deleted file mode 100644
index f3b5d8e5a1..0000000000
--- a/cpukit/score/src/watchdogremove.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Watchdog Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/watchdog.h>
-
-/*PAGE
- *
- * _Watchdog_Remove
- *
- * The routine removes a watchdog from a delta chain and updates
- * the delta counters of the remaining watchdogs.
- */
-
-Watchdog_States _Watchdog_Remove(
- Watchdog_Control *the_watchdog
-)
-{
- ISR_Level level;
- Watchdog_States previous_state;
- Watchdog_Control *next_watchdog;
-
- _ISR_Disable( level );
- previous_state = the_watchdog->state;
- switch ( previous_state ) {
- case WATCHDOG_INACTIVE:
- break;
-
- case WATCHDOG_BEING_INSERTED:
-
- /*
- * It is not actually on the chain so just change the state and
- * the Insert operation we interrupted will be aborted.
- */
- the_watchdog->state = WATCHDOG_INACTIVE;
- break;
-
- case WATCHDOG_ACTIVE:
- case WATCHDOG_REMOVE_IT:
-
- the_watchdog->state = WATCHDOG_INACTIVE;
- next_watchdog = _Watchdog_Next( the_watchdog );
-
- if ( _Watchdog_Next(next_watchdog) )
- next_watchdog->delta_interval += the_watchdog->delta_interval;
-
- if ( _Watchdog_Sync_count )
- _Watchdog_Sync_level = _ISR_Nest_level;
-
- _Chain_Extract_unprotected( &the_watchdog->Node );
- break;
- }
- the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
-
- _ISR_Enable( level );
- return( previous_state );
-}
-
diff --git a/cpukit/score/src/watchdogtickle.c b/cpukit/score/src/watchdogtickle.c
deleted file mode 100644
index fe07f566ff..0000000000
--- a/cpukit/score/src/watchdogtickle.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Watchdog Handler
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/watchdog.h>
-
-/*PAGE
- *
- * _Watchdog_Tickle
- *
- * This routine decrements the delta counter in response to a tick. The
- * delta chain is updated accordingly.
- *
- * Input parameters:
- * header - pointer to the delta chain to be tickled
- *
- * Output parameters: NONE
- */
-
-void _Watchdog_Tickle(
- Chain_Control *header
-)
-{
- Watchdog_Control *the_watchdog;
-
- if ( _Chain_Is_empty( header ) )
- return;
-
- the_watchdog = _Watchdog_First( header );
- the_watchdog->delta_interval--;
- if ( the_watchdog->delta_interval != 0 )
- return;
-
- do {
- switch( _Watchdog_Remove( the_watchdog ) ) {
- case WATCHDOG_ACTIVE:
- (*the_watchdog->routine)(
- the_watchdog->id,
- the_watchdog->user_data
- );
- break;
-
- case WATCHDOG_INACTIVE:
- /*
- * This state indicates that the watchdog is not on any chain.
- * Thus, it is NOT on a chain being tickled. This case should
- * never occur.
- */
- break;
-
- case WATCHDOG_BEING_INSERTED:
- /*
- * This state indicates that the watchdog is in the process of
- * BEING inserted on the chain. Thus, it can NOT be on a chain
- * being tickled. This case should never occur.
- */
- break;
-
- case WATCHDOG_REMOVE_IT:
- break;
- }
- the_watchdog = _Watchdog_First( header );
- } while ( !_Chain_Is_empty( header ) &&
- (the_watchdog->delta_interval == 0) );
-}
diff --git a/cpukit/score/src/wkspace.c b/cpukit/score/src/wkspace.c
deleted file mode 100644
index 4ae6c6c118..0000000000
--- a/cpukit/score/src/wkspace.c
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Workspace Handler
- *
- * XXX
- *
- * NOTE:
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/wkspace.h>
-#include <rtems/score/interr.h>
-
-/*PAGE
- *
- * _Workspace_Handler_initialization
- */
-
-void _Workspace_Handler_initialization(
- void *starting_address,
- unsigned32 size
-)
-{
- unsigned32 *zero_out_array;
- unsigned32 index;
- unsigned32 memory_available;
-
- if ( !starting_address || !_Addresses_Is_aligned( starting_address ) )
- _Internal_error_Occurred(
- INTERNAL_ERROR_CORE,
- TRUE,
- INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS
- );
-
- if ( _CPU_Table.do_zero_of_workspace ) {
- for( zero_out_array = (unsigned32 *) starting_address, index = 0 ;
- index < size / sizeof( unsigned32 ) ;
- index++ )
- zero_out_array[ index ] = 0;
- }
-
- memory_available = _Heap_Initialize(
- &_Workspace_Area,
- starting_address,
- size,
- CPU_HEAP_ALIGNMENT
- );
-
- if ( memory_available == 0 )
- _Internal_error_Occurred(
- INTERNAL_ERROR_CORE,
- TRUE,
- INTERNAL_ERROR_TOO_LITTLE_WORKSPACE
- );
-}
-
-/*PAGE
- *
- * _Workspace_Allocate_or_fatal_error
- *
- */
-
-void *_Workspace_Allocate_or_fatal_error(
- unsigned32 size
-)
-{
- void *memory;
-
- memory = _Workspace_Allocate( size );
-
- if ( memory == NULL )
- _Internal_error_Occurred(
- INTERNAL_ERROR_CORE,
- TRUE,
- INTERNAL_ERROR_WORKSPACE_ALLOCATION
- );
-
- return memory;
-}
diff --git a/cpukit/wrapup/Makefile.am b/cpukit/wrapup/Makefile.am
deleted file mode 100644
index 67e58c56c3..0000000000
--- a/cpukit/wrapup/Makefile.am
+++ /dev/null
@@ -1,18 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-if HAS_POSIX
-POSIX_DIRS = posix
-endif
-
-if HAS_ITRON
-ITRON_DIRS = itron
-endif
-
-SUBDIRS = rtems $(POSIX_DIRS) $(ITRON_DIRS)
-
-include $(top_srcdir)/../../../automake/subdirs.am
-include $(top_srcdir)/../../../automake/local.am
diff --git a/cpukit/zlib/doc/rfc1950.txt b/cpukit/zlib/doc/rfc1950.txt
deleted file mode 100644
index ce6428a0f2..0000000000
--- a/cpukit/zlib/doc/rfc1950.txt
+++ /dev/null
@@ -1,619 +0,0 @@
-
-
-
-
-
-
-Network Working Group P. Deutsch
-Request for Comments: 1950 Aladdin Enterprises
-Category: Informational J-L. Gailly
- Info-ZIP
- May 1996
-
-
- ZLIB Compressed Data Format Specification version 3.3
-
-Status of This Memo
-
- This memo provides information for the Internet community. This memo
- does not specify an Internet standard of any kind. Distribution of
- this memo is unlimited.
-
-IESG Note:
-
- The IESG takes no position on the validity of any Intellectual
- Property Rights statements contained in this document.
-
-Notices
-
- Copyright (c) 1996 L. Peter Deutsch and Jean-Loup Gailly
-
- Permission is granted to copy and distribute this document for any
- purpose and without charge, including translations into other
- languages and incorporation into compilations, provided that the
- copyright notice and this notice are preserved, and that any
- substantive changes or deletions from the original are clearly
- marked.
-
- A pointer to the latest version of this and related documentation in
- HTML format can be found at the URL
- <ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html>.
-
-Abstract
-
- This specification defines a lossless compressed data format. The
- data can be produced or consumed, even for an arbitrarily long
- sequentially presented input data stream, using only an a priori
- bounded amount of intermediate storage. The format presently uses
- the DEFLATE compression method but can be easily extended to use
- other compression methods. It can be implemented readily in a manner
- not covered by patents. This specification also defines the ADLER-32
- checksum (an extension and improvement of the Fletcher checksum),
- used for detection of data corruption, and provides an algorithm for
- computing it.
-
-
-
-
-Deutsch & Gailly Informational [Page 1]
-
-RFC 1950 ZLIB Compressed Data Format Specification May 1996
-
-
-Table of Contents
-
- 1. Introduction ................................................... 2
- 1.1. Purpose ................................................... 2
- 1.2. Intended audience ......................................... 3
- 1.3. Scope ..................................................... 3
- 1.4. Compliance ................................................ 3
- 1.5. Definitions of terms and conventions used ................ 3
- 1.6. Changes from previous versions ............................ 3
- 2. Detailed specification ......................................... 3
- 2.1. Overall conventions ....................................... 3
- 2.2. Data format ............................................... 4
- 2.3. Compliance ................................................ 7
- 3. References ..................................................... 7
- 4. Source code .................................................... 8
- 5. Security Considerations ........................................ 8
- 6. Acknowledgements ............................................... 8
- 7. Authors' Addresses ............................................. 8
- 8. Appendix: Rationale ............................................ 9
- 9. Appendix: Sample code ..........................................10
-
-1. Introduction
-
- 1.1. Purpose
-
- The purpose of this specification is to define a lossless
- compressed data format that:
-
- * Is independent of CPU type, operating system, file system,
- and character set, and hence can be used for interchange;
-
- * Can be produced or consumed, even for an arbitrarily long
- sequentially presented input data stream, using only an a
- priori bounded amount of intermediate storage, and hence can
- be used in data communications or similar structures such as
- Unix filters;
-
- * Can use a number of different compression methods;
-
- * Can be implemented readily in a manner not covered by
- patents, and hence can be practiced freely.
-
- The data format defined by this specification does not attempt to
- allow random access to compressed data.
-
-
-
-
-
-
-
-Deutsch & Gailly Informational [Page 2]
-
-RFC 1950 ZLIB Compressed Data Format Specification May 1996
-
-
- 1.2. Intended audience
-
- This specification is intended for use by implementors of software
- to compress data into zlib format and/or decompress data from zlib
- format.
-
- The text of the specification assumes a basic background in
- programming at the level of bits and other primitive data
- representations.
-
- 1.3. Scope
-
- The specification specifies a compressed data format that can be
- used for in-memory compression of a sequence of arbitrary bytes.
-
- 1.4. Compliance
-
- Unless otherwise indicated below, a compliant decompressor must be
- able to accept and decompress any data set that conforms to all
- the specifications presented here; a compliant compressor must
- produce data sets that conform to all the specifications presented
- here.
-
- 1.5. Definitions of terms and conventions used
-
- byte: 8 bits stored or transmitted as a unit (same as an octet).
- (For this specification, a byte is exactly 8 bits, even on
- machines which store a character on a number of bits different
- from 8.) See below, for the numbering of bits within a byte.
-
- 1.6. Changes from previous versions
-
- Version 3.1 was the first public release of this specification.
- In version 3.2, some terminology was changed and the Adler-32
- sample code was rewritten for clarity. In version 3.3, the
- support for a preset dictionary was introduced, and the
- specification was converted to RFC style.
-
-2. Detailed specification
-
- 2.1. Overall conventions
-
- In the diagrams below, a box like this:
-
- +---+
- | | <-- the vertical bars might be missing
- +---+
-
-
-
-
-Deutsch & Gailly Informational [Page 3]
-
-RFC 1950 ZLIB Compressed Data Format Specification May 1996
-
-
- represents one byte; a box like this:
-
- +==============+
- | |
- +==============+
-
- represents a variable number of bytes.
-
- Bytes stored within a computer do not have a "bit order", since
- they are always treated as a unit. However, a byte considered as
- an integer between 0 and 255 does have a most- and least-
- significant bit, and since we write numbers with the most-
- significant digit on the left, we also write bytes with the most-
- significant bit on the left. In the diagrams below, we number the
- bits of a byte so that bit 0 is the least-significant bit, i.e.,
- the bits are numbered:
-
- +--------+
- |76543210|
- +--------+
-
- Within a computer, a number may occupy multiple bytes. All
- multi-byte numbers in the format described here are stored with
- the MOST-significant byte first (at the lower memory address).
- For example, the decimal number 520 is stored as:
-
- 0 1
- +--------+--------+
- |00000010|00001000|
- +--------+--------+
- ^ ^
- | |
- | + less significant byte = 8
- + more significant byte = 2 x 256
-
- 2.2. Data format
-
- A zlib stream has the following structure:
-
- 0 1
- +---+---+
- |CMF|FLG| (more-->)
- +---+---+
-
-
-
-
-
-
-
-
-Deutsch & Gailly Informational [Page 4]
-
-RFC 1950 ZLIB Compressed Data Format Specification May 1996
-
-
- (if FLG.FDICT set)
-
- 0 1 2 3
- +---+---+---+---+
- | DICTID | (more-->)
- +---+---+---+---+
-
- +=====================+---+---+---+---+
- |...compressed data...| ADLER32 |
- +=====================+---+---+---+---+
-
- Any data which may appear after ADLER32 are not part of the zlib
- stream.
-
- CMF (Compression Method and flags)
- This byte is divided into a 4-bit compression method and a 4-
- bit information field depending on the compression method.
-
- bits 0 to 3 CM Compression method
- bits 4 to 7 CINFO Compression info
-
- CM (Compression method)
- This identifies the compression method used in the file. CM = 8
- denotes the "deflate" compression method with a window size up
- to 32K. This is the method used by gzip and PNG (see
- references [1] and [2] in Chapter 3, below, for the reference
- documents). CM = 15 is reserved. It might be used in a future
- version of this specification to indicate the presence of an
- extra field before the compressed data.
-
- CINFO (Compression info)
- For CM = 8, CINFO is the base-2 logarithm of the LZ77 window
- size, minus eight (CINFO=7 indicates a 32K window size). Values
- of CINFO above 7 are not allowed in this version of the
- specification. CINFO is not defined in this specification for
- CM not equal to 8.
-
- FLG (FLaGs)
- This flag byte is divided as follows:
-
- bits 0 to 4 FCHECK (check bits for CMF and FLG)
- bit 5 FDICT (preset dictionary)
- bits 6 to 7 FLEVEL (compression level)
-
- The FCHECK value must be such that CMF and FLG, when viewed as
- a 16-bit unsigned integer stored in MSB order (CMF*256 + FLG),
- is a multiple of 31.
-
-
-
-
-Deutsch & Gailly Informational [Page 5]
-
-RFC 1950 ZLIB Compressed Data Format Specification May 1996
-
-
- FDICT (Preset dictionary)
- If FDICT is set, a DICT dictionary identifier is present
- immediately after the FLG byte. The dictionary is a sequence of
- bytes which are initially fed to the compressor without
- producing any compressed output. DICT is the Adler-32 checksum
- of this sequence of bytes (see the definition of ADLER32
- below). The decompressor can use this identifier to determine
- which dictionary has been used by the compressor.
-
- FLEVEL (Compression level)
- These flags are available for use by specific compression
- methods. The "deflate" method (CM = 8) sets these flags as
- follows:
-
- 0 - compressor used fastest algorithm
- 1 - compressor used fast algorithm
- 2 - compressor used default algorithm
- 3 - compressor used maximum compression, slowest algorithm
-
- The information in FLEVEL is not needed for decompression; it
- is there to indicate if recompression might be worthwhile.
-
- compressed data
- For compression method 8, the compressed data is stored in the
- deflate compressed data format as described in the document
- "DEFLATE Compressed Data Format Specification" by L. Peter
- Deutsch. (See reference [3] in Chapter 3, below)
-
- Other compressed data formats are not specified in this version
- of the zlib specification.
-
- ADLER32 (Adler-32 checksum)
- This contains a checksum value of the uncompressed data
- (excluding any dictionary data) computed according to Adler-32
- algorithm. This algorithm is a 32-bit extension and improvement
- of the Fletcher algorithm, used in the ITU-T X.224 / ISO 8073
- standard. See references [4] and [5] in Chapter 3, below)
-
- Adler-32 is composed of two sums accumulated per byte: s1 is
- the sum of all bytes, s2 is the sum of all s1 values. Both sums
- are done modulo 65521. s1 is initialized to 1, s2 to zero. The
- Adler-32 checksum is stored as s2*65536 + s1 in most-
- significant-byte first (network) order.
-
-
-
-
-
-
-
-
-Deutsch & Gailly Informational [Page 6]
-
-RFC 1950 ZLIB Compressed Data Format Specification May 1996
-
-
- 2.3. Compliance
-
- A compliant compressor must produce streams with correct CMF, FLG
- and ADLER32, but need not support preset dictionaries. When the
- zlib data format is used as part of another standard data format,
- the compressor may use only preset dictionaries that are specified
- by this other data format. If this other format does not use the
- preset dictionary feature, the compressor must not set the FDICT
- flag.
-
- A compliant decompressor must check CMF, FLG, and ADLER32, and
- provide an error indication if any of these have incorrect values.
- A compliant decompressor must give an error indication if CM is
- not one of the values defined in this specification (only the
- value 8 is permitted in this version), since another value could
- indicate the presence of new features that would cause subsequent
- data to be interpreted incorrectly. A compliant decompressor must
- give an error indication if FDICT is set and DICTID is not the
- identifier of a known preset dictionary. A decompressor may
- ignore FLEVEL and still be compliant. When the zlib data format
- is being used as a part of another standard format, a compliant
- decompressor must support all the preset dictionaries specified by
- the other format. When the other format does not use the preset
- dictionary feature, a compliant decompressor must reject any
- stream in which the FDICT flag is set.
-
-3. References
-
- [1] Deutsch, L.P.,"GZIP Compressed Data Format Specification",
- available in ftp://ftp.uu.net/pub/archiving/zip/doc/
-
- [2] Thomas Boutell, "PNG (Portable Network Graphics) specification",
- available in ftp://ftp.uu.net/graphics/png/documents/
-
- [3] Deutsch, L.P.,"DEFLATE Compressed Data Format Specification",
- available in ftp://ftp.uu.net/pub/archiving/zip/doc/
-
- [4] Fletcher, J. G., "An Arithmetic Checksum for Serial
- Transmissions," IEEE Transactions on Communications, Vol. COM-30,
- No. 1, January 1982, pp. 247-252.
-
- [5] ITU-T Recommendation X.224, Annex D, "Checksum Algorithms,"
- November, 1993, pp. 144, 145. (Available from
- gopher://info.itu.ch). ITU-T X.244 is also the same as ISO 8073.
-
-
-
-
-
-
-
-Deutsch & Gailly Informational [Page 7]
-
-RFC 1950 ZLIB Compressed Data Format Specification May 1996
-
-
-4. Source code
-
- Source code for a C language implementation of a "zlib" compliant
- library is available at ftp://ftp.uu.net/pub/archiving/zip/zlib/.
-
-5. Security Considerations
-
- A decoder that fails to check the ADLER32 checksum value may be
- subject to undetected data corruption.
-
-6. Acknowledgements
-
- Trademarks cited in this document are the property of their
- respective owners.
-
- Jean-Loup Gailly and Mark Adler designed the zlib format and wrote
- the related software described in this specification. Glenn
- Randers-Pehrson converted this document to RFC and HTML format.
-
-7. Authors' Addresses
-
- L. Peter Deutsch
- Aladdin Enterprises
- 203 Santa Margarita Ave.
- Menlo Park, CA 94025
-
- Phone: (415) 322-0103 (AM only)
- FAX: (415) 322-1734
- EMail: <ghost@aladdin.com>
-
-
- Jean-Loup Gailly
-
- EMail: <gzip@prep.ai.mit.edu>
-
- Questions about the technical content of this specification can be
- sent by email to
-
- Jean-Loup Gailly <gzip@prep.ai.mit.edu> and
- Mark Adler <madler@alumni.caltech.edu>
-
- Editorial comments on this specification can be sent by email to
-
- L. Peter Deutsch <ghost@aladdin.com> and
- Glenn Randers-Pehrson <randeg@alumni.rpi.edu>
-
-
-
-
-
-
-Deutsch & Gailly Informational [Page 8]
-
-RFC 1950 ZLIB Compressed Data Format Specification May 1996
-
-
-8. Appendix: Rationale
-
- 8.1. Preset dictionaries
-
- A preset dictionary is specially useful to compress short input
- sequences. The compressor can take advantage of the dictionary
- context to encode the input in a more compact manner. The
- decompressor can be initialized with the appropriate context by
- virtually decompressing a compressed version of the dictionary
- without producing any output. However for certain compression
- algorithms such as the deflate algorithm this operation can be
- achieved without actually performing any decompression.
-
- The compressor and the decompressor must use exactly the same
- dictionary. The dictionary may be fixed or may be chosen among a
- certain number of predefined dictionaries, according to the kind
- of input data. The decompressor can determine which dictionary has
- been chosen by the compressor by checking the dictionary
- identifier. This document does not specify the contents of
- predefined dictionaries, since the optimal dictionaries are
- application specific. Standard data formats using this feature of
- the zlib specification must precisely define the allowed
- dictionaries.
-
- 8.2. The Adler-32 algorithm
-
- The Adler-32 algorithm is much faster than the CRC32 algorithm yet
- still provides an extremely low probability of undetected errors.
-
- The modulo on unsigned long accumulators can be delayed for 5552
- bytes, so the modulo operation time is negligible. If the bytes
- are a, b, c, the second sum is 3a + 2b + c + 3, and so is position
- and order sensitive, unlike the first sum, which is just a
- checksum. That 65521 is prime is important to avoid a possible
- large class of two-byte errors that leave the check unchanged.
- (The Fletcher checksum uses 255, which is not prime and which also
- makes the Fletcher check insensitive to single byte changes 0 <->
- 255.)
-
- The sum s1 is initialized to 1 instead of zero to make the length
- of the sequence part of s2, so that the length does not have to be
- checked separately. (Any sequence of zeroes has a Fletcher
- checksum of zero.)
-
-
-
-
-
-
-
-
-Deutsch & Gailly Informational [Page 9]
-
-RFC 1950 ZLIB Compressed Data Format Specification May 1996
-
-
-9. Appendix: Sample code
-
- The following C code computes the Adler-32 checksum of a data buffer.
- It is written for clarity, not for speed. The sample code is in the
- ANSI C programming language. Non C users may find it easier to read
- with these hints:
-
- & Bitwise AND operator.
- >> Bitwise right shift operator. When applied to an
- unsigned quantity, as here, right shift inserts zero bit(s)
- at the left.
- << Bitwise left shift operator. Left shift inserts zero
- bit(s) at the right.
- ++ "n++" increments the variable n.
- % modulo operator: a % b is the remainder of a divided by b.
-
- #define BASE 65521 /* largest prime smaller than 65536 */
-
- /*
- Update a running Adler-32 checksum with the bytes buf[0..len-1]
- and return the updated checksum. The Adler-32 checksum should be
- initialized to 1.
-
- Usage example:
-
- unsigned long adler = 1L;
-
- while (read_buffer(buffer, length) != EOF) {
- adler = update_adler32(adler, buffer, length);
- }
- if (adler != original_adler) error();
- */
- unsigned long update_adler32(unsigned long adler,
- unsigned char *buf, int len)
- {
- unsigned long s1 = adler & 0xffff;
- unsigned long s2 = (adler >> 16) & 0xffff;
- int n;
-
- for (n = 0; n < len; n++) {
- s1 = (s1 + buf[n]) % BASE;
- s2 = (s2 + s1) % BASE;
- }
- return (s2 << 16) + s1;
- }
-
- /* Return the adler32 of the bytes buf[0..len-1] */
-
-
-
-
-Deutsch & Gailly Informational [Page 10]
-
-RFC 1950 ZLIB Compressed Data Format Specification May 1996
-
-
- unsigned long adler32(unsigned char *buf, int len)
- {
- return update_adler32(1L, buf, len);
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Deutsch & Gailly Informational [Page 11]
-
diff --git a/cpukit/zlib/doc/rfc1951.txt b/cpukit/zlib/doc/rfc1951.txt
deleted file mode 100644
index 403c8c722f..0000000000
--- a/cpukit/zlib/doc/rfc1951.txt
+++ /dev/null
@@ -1,955 +0,0 @@
-
-
-
-
-
-
-Network Working Group P. Deutsch
-Request for Comments: 1951 Aladdin Enterprises
-Category: Informational May 1996
-
-
- DEFLATE Compressed Data Format Specification version 1.3
-
-Status of This Memo
-
- This memo provides information for the Internet community. This memo
- does not specify an Internet standard of any kind. Distribution of
- this memo is unlimited.
-
-IESG Note:
-
- The IESG takes no position on the validity of any Intellectual
- Property Rights statements contained in this document.
-
-Notices
-
- Copyright (c) 1996 L. Peter Deutsch
-
- Permission is granted to copy and distribute this document for any
- purpose and without charge, including translations into other
- languages and incorporation into compilations, provided that the
- copyright notice and this notice are preserved, and that any
- substantive changes or deletions from the original are clearly
- marked.
-
- A pointer to the latest version of this and related documentation in
- HTML format can be found at the URL
- <ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html>.
-
-Abstract
-
- This specification defines a lossless compressed data format that
- compresses data using a combination of the LZ77 algorithm and Huffman
- coding, with efficiency comparable to the best currently available
- general-purpose compression methods. The data can be produced or
- consumed, even for an arbitrarily long sequentially presented input
- data stream, using only an a priori bounded amount of intermediate
- storage. The format can be implemented readily in a manner not
- covered by patents.
-
-
-
-
-
-
-
-
-Deutsch Informational [Page 1]
-
-RFC 1951 DEFLATE Compressed Data Format Specification May 1996
-
-
-Table of Contents
-
- 1. Introduction ................................................... 2
- 1.1. Purpose ................................................... 2
- 1.2. Intended audience ......................................... 3
- 1.3. Scope ..................................................... 3
- 1.4. Compliance ................................................ 3
- 1.5. Definitions of terms and conventions used ................ 3
- 1.6. Changes from previous versions ............................ 4
- 2. Compressed representation overview ............................. 4
- 3. Detailed specification ......................................... 5
- 3.1. Overall conventions ....................................... 5
- 3.1.1. Packing into bytes .................................. 5
- 3.2. Compressed block format ................................... 6
- 3.2.1. Synopsis of prefix and Huffman coding ............... 6
- 3.2.2. Use of Huffman coding in the "deflate" format ....... 7
- 3.2.3. Details of block format ............................. 9
- 3.2.4. Non-compressed blocks (BTYPE=00) ................... 11
- 3.2.5. Compressed blocks (length and distance codes) ...... 11
- 3.2.6. Compression with fixed Huffman codes (BTYPE=01) .... 12
- 3.2.7. Compression with dynamic Huffman codes (BTYPE=10) .. 13
- 3.3. Compliance ............................................... 14
- 4. Compression algorithm details ................................. 14
- 5. References .................................................... 16
- 6. Security Considerations ....................................... 16
- 7. Source code ................................................... 16
- 8. Acknowledgements .............................................. 16
- 9. Author's Address .............................................. 17
-
-1. Introduction
-
- 1.1. Purpose
-
- The purpose of this specification is to define a lossless
- compressed data format that:
- * Is independent of CPU type, operating system, file system,
- and character set, and hence can be used for interchange;
- * Can be produced or consumed, even for an arbitrarily long
- sequentially presented input data stream, using only an a
- priori bounded amount of intermediate storage, and hence
- can be used in data communications or similar structures
- such as Unix filters;
- * Compresses data with efficiency comparable to the best
- currently available general-purpose compression methods,
- and in particular considerably better than the "compress"
- program;
- * Can be implemented readily in a manner not covered by
- patents, and hence can be practiced freely;
-
-
-
-Deutsch Informational [Page 2]
-
-RFC 1951 DEFLATE Compressed Data Format Specification May 1996
-
-
- * Is compatible with the file format produced by the current
- widely used gzip utility, in that conforming decompressors
- will be able to read data produced by the existing gzip
- compressor.
-
- The data format defined by this specification does not attempt to:
-
- * Allow random access to compressed data;
- * Compress specialized data (e.g., raster graphics) as well
- as the best currently available specialized algorithms.
-
- A simple counting argument shows that no lossless compression
- algorithm can compress every possible input data set. For the
- format defined here, the worst case expansion is 5 bytes per 32K-
- byte block, i.e., a size increase of 0.015% for large data sets.
- English text usually compresses by a factor of 2.5 to 3;
- executable files usually compress somewhat less; graphical data
- such as raster images may compress much more.
-
- 1.2. Intended audience
-
- This specification is intended for use by implementors of software
- to compress data into "deflate" format and/or decompress data from
- "deflate" format.
-
- The text of the specification assumes a basic background in
- programming at the level of bits and other primitive data
- representations. Familiarity with the technique of Huffman coding
- is helpful but not required.
-
- 1.3. Scope
-
- The specification specifies a method for representing a sequence
- of bytes as a (usually shorter) sequence of bits, and a method for
- packing the latter bit sequence into bytes.
-
- 1.4. Compliance
-
- Unless otherwise indicated below, a compliant decompressor must be
- able to accept and decompress any data set that conforms to all
- the specifications presented here; a compliant compressor must
- produce data sets that conform to all the specifications presented
- here.
-
- 1.5. Definitions of terms and conventions used
-
- Byte: 8 bits stored or transmitted as a unit (same as an octet).
- For this specification, a byte is exactly 8 bits, even on machines
-
-
-
-Deutsch Informational [Page 3]
-
-RFC 1951 DEFLATE Compressed Data Format Specification May 1996
-
-
- which store a character on a number of bits different from eight.
- See below, for the numbering of bits within a byte.
-
- String: a sequence of arbitrary bytes.
-
- 1.6. Changes from previous versions
-
- There have been no technical changes to the deflate format since
- version 1.1 of this specification. In version 1.2, some
- terminology was changed. Version 1.3 is a conversion of the
- specification to RFC style.
-
-2. Compressed representation overview
-
- A compressed data set consists of a series of blocks, corresponding
- to successive blocks of input data. The block sizes are arbitrary,
- except that non-compressible blocks are limited to 65,535 bytes.
-
- Each block is compressed using a combination of the LZ77 algorithm
- and Huffman coding. The Huffman trees for each block are independent
- of those for previous or subsequent blocks; the LZ77 algorithm may
- use a reference to a duplicated string occurring in a previous block,
- up to 32K input bytes before.
-
- Each block consists of two parts: a pair of Huffman code trees that
- describe the representation of the compressed data part, and a
- compressed data part. (The Huffman trees themselves are compressed
- using Huffman encoding.) The compressed data consists of a series of
- elements of two types: literal bytes (of strings that have not been
- detected as duplicated within the previous 32K input bytes), and
- pointers to duplicated strings, where a pointer is represented as a
- pair <length, backward distance>. The representation used in the
- "deflate" format limits distances to 32K bytes and lengths to 258
- bytes, but does not limit the size of a block, except for
- uncompressible blocks, which are limited as noted above.
-
- Each type of value (literals, distances, and lengths) in the
- compressed data is represented using a Huffman code, using one code
- tree for literals and lengths and a separate code tree for distances.
- The code trees for each block appear in a compact form just before
- the compressed data for that block.
-
-
-
-
-
-
-
-
-
-
-Deutsch Informational [Page 4]
-
-RFC 1951 DEFLATE Compressed Data Format Specification May 1996
-
-
-3. Detailed specification
-
- 3.1. Overall conventions In the diagrams below, a box like this:
-
- +---+
- | | <-- the vertical bars might be missing
- +---+
-
- represents one byte; a box like this:
-
- +==============+
- | |
- +==============+
-
- represents a variable number of bytes.
-
- Bytes stored within a computer do not have a "bit order", since
- they are always treated as a unit. However, a byte considered as
- an integer between 0 and 255 does have a most- and least-
- significant bit, and since we write numbers with the most-
- significant digit on the left, we also write bytes with the most-
- significant bit on the left. In the diagrams below, we number the
- bits of a byte so that bit 0 is the least-significant bit, i.e.,
- the bits are numbered:
-
- +--------+
- |76543210|
- +--------+
-
- Within a computer, a number may occupy multiple bytes. All
- multi-byte numbers in the format described here are stored with
- the least-significant byte first (at the lower memory address).
- For example, the decimal number 520 is stored as:
-
- 0 1
- +--------+--------+
- |00001000|00000010|
- +--------+--------+
- ^ ^
- | |
- | + more significant byte = 2 x 256
- + less significant byte = 8
-
- 3.1.1. Packing into bytes
-
- This document does not address the issue of the order in which
- bits of a byte are transmitted on a bit-sequential medium,
- since the final data format described here is byte- rather than
-
-
-
-Deutsch Informational [Page 5]
-
-RFC 1951 DEFLATE Compressed Data Format Specification May 1996
-
-
- bit-oriented. However, we describe the compressed block format
- in below, as a sequence of data elements of various bit
- lengths, not a sequence of bytes. We must therefore specify
- how to pack these data elements into bytes to form the final
- compressed byte sequence:
-
- * Data elements are packed into bytes in order of
- increasing bit number within the byte, i.e., starting
- with the least-significant bit of the byte.
- * Data elements other than Huffman codes are packed
- starting with the least-significant bit of the data
- element.
- * Huffman codes are packed starting with the most-
- significant bit of the code.
-
- In other words, if one were to print out the compressed data as
- a sequence of bytes, starting with the first byte at the
- *right* margin and proceeding to the *left*, with the most-
- significant bit of each byte on the left as usual, one would be
- able to parse the result from right to left, with fixed-width
- elements in the correct MSB-to-LSB order and Huffman codes in
- bit-reversed order (i.e., with the first bit of the code in the
- relative LSB position).
-
- 3.2. Compressed block format
-
- 3.2.1. Synopsis of prefix and Huffman coding
-
- Prefix coding represents symbols from an a priori known
- alphabet by bit sequences (codes), one code for each symbol, in
- a manner such that different symbols may be represented by bit
- sequences of different lengths, but a parser can always parse
- an encoded string unambiguously symbol-by-symbol.
-
- We define a prefix code in terms of a binary tree in which the
- two edges descending from each non-leaf node are labeled 0 and
- 1 and in which the leaf nodes correspond one-for-one with (are
- labeled with) the symbols of the alphabet; then the code for a
- symbol is the sequence of 0's and 1's on the edges leading from
- the root to the leaf labeled with that symbol. For example:
-
-
-
-
-
-
-
-
-
-
-
-Deutsch Informational [Page 6]
-
-RFC 1951 DEFLATE Compressed Data Format Specification May 1996
-
-
- /\ Symbol Code
- 0 1 ------ ----
- / \ A 00
- /\ B B 1
- 0 1 C 011
- / \ D 010
- A /\
- 0 1
- / \
- D C
-
- A parser can decode the next symbol from an encoded input
- stream by walking down the tree from the root, at each step
- choosing the edge corresponding to the next input bit.
-
- Given an alphabet with known symbol frequencies, the Huffman
- algorithm allows the construction of an optimal prefix code
- (one which represents strings with those symbol frequencies
- using the fewest bits of any possible prefix codes for that
- alphabet). Such a code is called a Huffman code. (See
- reference [1] in Chapter 5, references for additional
- information on Huffman codes.)
-
- Note that in the "deflate" format, the Huffman codes for the
- various alphabets must not exceed certain maximum code lengths.
- This constraint complicates the algorithm for computing code
- lengths from symbol frequencies. Again, see Chapter 5,
- references for details.
-
- 3.2.2. Use of Huffman coding in the "deflate" format
-
- The Huffman codes used for each alphabet in the "deflate"
- format have two additional rules:
-
- * All codes of a given bit length have lexicographically
- consecutive values, in the same order as the symbols
- they represent;
-
- * Shorter codes lexicographically precede longer codes.
-
-
-
-
-
-
-
-
-
-
-
-
-Deutsch Informational [Page 7]
-
-RFC 1951 DEFLATE Compressed Data Format Specification May 1996
-
-
- We could recode the example above to follow this rule as
- follows, assuming that the order of the alphabet is ABCD:
-
- Symbol Code
- ------ ----
- A 10
- B 0
- C 110
- D 111
-
- I.e., 0 precedes 10 which precedes 11x, and 110 and 111 are
- lexicographically consecutive.
-
- Given this rule, we can define the Huffman code for an alphabet
- just by giving the bit lengths of the codes for each symbol of
- the alphabet in order; this is sufficient to determine the
- actual codes. In our example, the code is completely defined
- by the sequence of bit lengths (2, 1, 3, 3). The following
- algorithm generates the codes as integers, intended to be read
- from most- to least-significant bit. The code lengths are
- initially in tree[I].Len; the codes are produced in
- tree[I].Code.
-
- 1) Count the number of codes for each code length. Let
- bl_count[N] be the number of codes of length N, N >= 1.
-
- 2) Find the numerical value of the smallest code for each
- code length:
-
- code = 0;
- bl_count[0] = 0;
- for (bits = 1; bits <= MAX_BITS; bits++) {
- code = (code + bl_count[bits-1]) << 1;
- next_code[bits] = code;
- }
-
- 3) Assign numerical values to all codes, using consecutive
- values for all codes of the same length with the base
- values determined at step 2. Codes that are never used
- (which have a bit length of zero) must not be assigned a
- value.
-
- for (n = 0; n <= max_code; n++) {
- len = tree[n].Len;
- if (len != 0) {
- tree[n].Code = next_code[len];
- next_code[len]++;
- }
-
-
-
-Deutsch Informational [Page 8]
-
-RFC 1951 DEFLATE Compressed Data Format Specification May 1996
-
-
- }
-
- Example:
-
- Consider the alphabet ABCDEFGH, with bit lengths (3, 3, 3, 3,
- 3, 2, 4, 4). After step 1, we have:
-
- N bl_count[N]
- - -----------
- 2 1
- 3 5
- 4 2
-
- Step 2 computes the following next_code values:
-
- N next_code[N]
- - ------------
- 1 0
- 2 0
- 3 2
- 4 14
-
- Step 3 produces the following code values:
-
- Symbol Length Code
- ------ ------ ----
- A 3 010
- B 3 011
- C 3 100
- D 3 101
- E 3 110
- F 2 00
- G 4 1110
- H 4 1111
-
- 3.2.3. Details of block format
-
- Each block of compressed data begins with 3 header bits
- containing the following data:
-
- first bit BFINAL
- next 2 bits BTYPE
-
- Note that the header bits do not necessarily begin on a byte
- boundary, since a block does not necessarily occupy an integral
- number of bytes.
-
-
-
-
-
-Deutsch Informational [Page 9]
-
-RFC 1951 DEFLATE Compressed Data Format Specification May 1996
-
-
- BFINAL is set if and only if this is the last block of the data
- set.
-
- BTYPE specifies how the data are compressed, as follows:
-
- 00 - no compression
- 01 - compressed with fixed Huffman codes
- 10 - compressed with dynamic Huffman codes
- 11 - reserved (error)
-
- The only difference between the two compressed cases is how the
- Huffman codes for the literal/length and distance alphabets are
- defined.
-
- In all cases, the decoding algorithm for the actual data is as
- follows:
-
- do
- read block header from input stream.
- if stored with no compression
- skip any remaining bits in current partially
- processed byte
- read LEN and NLEN (see next section)
- copy LEN bytes of data to output
- otherwise
- if compressed with dynamic Huffman codes
- read representation of code trees (see
- subsection below)
- loop (until end of block code recognized)
- decode literal/length value from input stream
- if value < 256
- copy value (literal byte) to output stream
- otherwise
- if value = end of block (256)
- break from loop
- otherwise (value = 257..285)
- decode distance from input stream
-
- move backwards distance bytes in the output
- stream, and copy length bytes from this
- position to the output stream.
- end loop
- while not last block
-
- Note that a duplicated string reference may refer to a string
- in a previous block; i.e., the backward distance may cross one
- or more block boundaries. However a distance cannot refer past
- the beginning of the output stream. (An application using a
-
-
-
-Deutsch Informational [Page 10]
-
-RFC 1951 DEFLATE Compressed Data Format Specification May 1996
-
-
- preset dictionary might discard part of the output stream; a
- distance can refer to that part of the output stream anyway)
- Note also that the referenced string may overlap the current
- position; for example, if the last 2 bytes decoded have values
- X and Y, a string reference with <length = 5, distance = 2>
- adds X,Y,X,Y,X to the output stream.
-
- We now specify each compression method in turn.
-
- 3.2.4. Non-compressed blocks (BTYPE=00)
-
- Any bits of input up to the next byte boundary are ignored.
- The rest of the block consists of the following information:
-
- 0 1 2 3 4...
- +---+---+---+---+================================+
- | LEN | NLEN |... LEN bytes of literal data...|
- +---+---+---+---+================================+
-
- LEN is the number of data bytes in the block. NLEN is the
- one's complement of LEN.
-
- 3.2.5. Compressed blocks (length and distance codes)
-
- As noted above, encoded data blocks in the "deflate" format
- consist of sequences of symbols drawn from three conceptually
- distinct alphabets: either literal bytes, from the alphabet of
- byte values (0..255), or <length, backward distance> pairs,
- where the length is drawn from (3..258) and the distance is
- drawn from (1..32,768). In fact, the literal and length
- alphabets are merged into a single alphabet (0..285), where
- values 0..255 represent literal bytes, the value 256 indicates
- end-of-block, and values 257..285 represent length codes
- (possibly in conjunction with extra bits following the symbol
- code) as follows:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Deutsch Informational [Page 11]
-
-RFC 1951 DEFLATE Compressed Data Format Specification May 1996
-
-
- Extra Extra Extra
- Code Bits Length(s) Code Bits Lengths Code Bits Length(s)
- ---- ---- ------ ---- ---- ------- ---- ---- -------
- 257 0 3 267 1 15,16 277 4 67-82
- 258 0 4 268 1 17,18 278 4 83-98
- 259 0 5 269 2 19-22 279 4 99-114
- 260 0 6 270 2 23-26 280 4 115-130
- 261 0 7 271 2 27-30 281 5 131-162
- 262 0 8 272 2 31-34 282 5 163-194
- 263 0 9 273 3 35-42 283 5 195-226
- 264 0 10 274 3 43-50 284 5 227-257
- 265 1 11,12 275 3 51-58 285 0 258
- 266 1 13,14 276 3 59-66
-
- The extra bits should be interpreted as a machine integer
- stored with the most-significant bit first, e.g., bits 1110
- represent the value 14.
-
- Extra Extra Extra
- Code Bits Dist Code Bits Dist Code Bits Distance
- ---- ---- ---- ---- ---- ------ ---- ---- --------
- 0 0 1 10 4 33-48 20 9 1025-1536
- 1 0 2 11 4 49-64 21 9 1537-2048
- 2 0 3 12 5 65-96 22 10 2049-3072
- 3 0 4 13 5 97-128 23 10 3073-4096
- 4 1 5,6 14 6 129-192 24 11 4097-6144
- 5 1 7,8 15 6 193-256 25 11 6145-8192
- 6 2 9-12 16 7 257-384 26 12 8193-12288
- 7 2 13-16 17 7 385-512 27 12 12289-16384
- 8 3 17-24 18 8 513-768 28 13 16385-24576
- 9 3 25-32 19 8 769-1024 29 13 24577-32768
-
- 3.2.6. Compression with fixed Huffman codes (BTYPE=01)
-
- The Huffman codes for the two alphabets are fixed, and are not
- represented explicitly in the data. The Huffman code lengths
- for the literal/length alphabet are:
-
- Lit Value Bits Codes
- --------- ---- -----
- 0 - 143 8 00110000 through
- 10111111
- 144 - 255 9 110010000 through
- 111111111
- 256 - 279 7 0000000 through
- 0010111
- 280 - 287 8 11000000 through
- 11000111
-
-
-
-Deutsch Informational [Page 12]
-
-RFC 1951 DEFLATE Compressed Data Format Specification May 1996
-
-
- The code lengths are sufficient to generate the actual codes,
- as described above; we show the codes in the table for added
- clarity. Literal/length values 286-287 will never actually
- occur in the compressed data, but participate in the code
- construction.
-
- Distance codes 0-31 are represented by (fixed-length) 5-bit
- codes, with possible additional bits as shown in the table
- shown in Paragraph 3.2.5, above. Note that distance codes 30-
- 31 will never actually occur in the compressed data.
-
- 3.2.7. Compression with dynamic Huffman codes (BTYPE=10)
-
- The Huffman codes for the two alphabets appear in the block
- immediately after the header bits and before the actual
- compressed data, first the literal/length code and then the
- distance code. Each code is defined by a sequence of code
- lengths, as discussed in Paragraph 3.2.2, above. For even
- greater compactness, the code length sequences themselves are
- compressed using a Huffman code. The alphabet for code lengths
- is as follows:
-
- 0 - 15: Represent code lengths of 0 - 15
- 16: Copy the previous code length 3 - 6 times.
- The next 2 bits indicate repeat length
- (0 = 3, ... , 3 = 6)
- Example: Codes 8, 16 (+2 bits 11),
- 16 (+2 bits 10) will expand to
- 12 code lengths of 8 (1 + 6 + 5)
- 17: Repeat a code length of 0 for 3 - 10 times.
- (3 bits of length)
- 18: Repeat a code length of 0 for 11 - 138 times
- (7 bits of length)
-
- A code length of 0 indicates that the corresponding symbol in
- the literal/length or distance alphabet will not occur in the
- block, and should not participate in the Huffman code
- construction algorithm given earlier. If only one distance
- code is used, it is encoded using one bit, not zero bits; in
- this case there is a single code length of one, with one unused
- code. One distance code of zero bits means that there are no
- distance codes used at all (the data is all literals).
-
- We can now define the format of the block:
-
- 5 Bits: HLIT, # of Literal/Length codes - 257 (257 - 286)
- 5 Bits: HDIST, # of Distance codes - 1 (1 - 32)
- 4 Bits: HCLEN, # of Code Length codes - 4 (4 - 19)
-
-
-
-Deutsch Informational [Page 13]
-
-RFC 1951 DEFLATE Compressed Data Format Specification May 1996
-
-
- (HCLEN + 4) x 3 bits: code lengths for the code length
- alphabet given just above, in the order: 16, 17, 18,
- 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15
-
- These code lengths are interpreted as 3-bit integers
- (0-7); as above, a code length of 0 means the
- corresponding symbol (literal/length or distance code
- length) is not used.
-
- HLIT + 257 code lengths for the literal/length alphabet,
- encoded using the code length Huffman code
-
- HDIST + 1 code lengths for the distance alphabet,
- encoded using the code length Huffman code
-
- The actual compressed data of the block,
- encoded using the literal/length and distance Huffman
- codes
-
- The literal/length symbol 256 (end of data),
- encoded using the literal/length Huffman code
-
- The code length repeat codes can cross from HLIT + 257 to the
- HDIST + 1 code lengths. In other words, all code lengths form
- a single sequence of HLIT + HDIST + 258 values.
-
- 3.3. Compliance
-
- A compressor may limit further the ranges of values specified in
- the previous section and still be compliant; for example, it may
- limit the range of backward pointers to some value smaller than
- 32K. Similarly, a compressor may limit the size of blocks so that
- a compressible block fits in memory.
-
- A compliant decompressor must accept the full range of possible
- values defined in the previous section, and must accept blocks of
- arbitrary size.
-
-4. Compression algorithm details
-
- While it is the intent of this document to define the "deflate"
- compressed data format without reference to any particular
- compression algorithm, the format is related to the compressed
- formats produced by LZ77 (Lempel-Ziv 1977, see reference [2] below);
- since many variations of LZ77 are patented, it is strongly
- recommended that the implementor of a compressor follow the general
- algorithm presented here, which is known not to be patented per se.
- The material in this section is not part of the definition of the
-
-
-
-Deutsch Informational [Page 14]
-
-RFC 1951 DEFLATE Compressed Data Format Specification May 1996
-
-
- specification per se, and a compressor need not follow it in order to
- be compliant.
-
- The compressor terminates a block when it determines that starting a
- new block with fresh trees would be useful, or when the block size
- fills up the compressor's block buffer.
-
- The compressor uses a chained hash table to find duplicated strings,
- using a hash function that operates on 3-byte sequences. At any
- given point during compression, let XYZ be the next 3 input bytes to
- be examined (not necessarily all different, of course). First, the
- compressor examines the hash chain for XYZ. If the chain is empty,
- the compressor simply writes out X as a literal byte and advances one
- byte in the input. If the hash chain is not empty, indicating that
- the sequence XYZ (or, if we are unlucky, some other 3 bytes with the
- same hash function value) has occurred recently, the compressor
- compares all strings on the XYZ hash chain with the actual input data
- sequence starting at the current point, and selects the longest
- match.
-
- The compressor searches the hash chains starting with the most recent
- strings, to favor small distances and thus take advantage of the
- Huffman encoding. The hash chains are singly linked. There are no
- deletions from the hash chains; the algorithm simply discards matches
- that are too old. To avoid a worst-case situation, very long hash
- chains are arbitrarily truncated at a certain length, determined by a
- run-time parameter.
-
- To improve overall compression, the compressor optionally defers the
- selection of matches ("lazy matching"): after a match of length N has
- been found, the compressor searches for a longer match starting at
- the next input byte. If it finds a longer match, it truncates the
- previous match to a length of one (thus producing a single literal
- byte) and then emits the longer match. Otherwise, it emits the
- original match, and, as described above, advances N bytes before
- continuing.
-
- Run-time parameters also control this "lazy match" procedure. If
- compression ratio is most important, the compressor attempts a
- complete second search regardless of the length of the first match.
- In the normal case, if the current match is "long enough", the
- compressor reduces the search for a longer match, thus speeding up
- the process. If speed is most important, the compressor inserts new
- strings in the hash table only when no match was found, or when the
- match is not "too long". This degrades the compression ratio but
- saves time since there are both fewer insertions and fewer searches.
-
-
-
-
-
-Deutsch Informational [Page 15]
-
-RFC 1951 DEFLATE Compressed Data Format Specification May 1996
-
-
-5. References
-
- [1] Huffman, D. A., "A Method for the Construction of Minimum
- Redundancy Codes", Proceedings of the Institute of Radio
- Engineers, September 1952, Volume 40, Number 9, pp. 1098-1101.
-
- [2] Ziv J., Lempel A., "A Universal Algorithm for Sequential Data
- Compression", IEEE Transactions on Information Theory, Vol. 23,
- No. 3, pp. 337-343.
-
- [3] Gailly, J.-L., and Adler, M., ZLIB documentation and sources,
- available in ftp://ftp.uu.net/pub/archiving/zip/doc/
-
- [4] Gailly, J.-L., and Adler, M., GZIP documentation and sources,
- available as gzip-*.tar in ftp://prep.ai.mit.edu/pub/gnu/
-
- [5] Schwartz, E. S., and Kallick, B. "Generating a canonical prefix
- encoding." Comm. ACM, 7,3 (Mar. 1964), pp. 166-169.
-
- [6] Hirschberg and Lelewer, "Efficient decoding of prefix codes,"
- Comm. ACM, 33,4, April 1990, pp. 449-459.
-
-6. Security Considerations
-
- Any data compression method involves the reduction of redundancy in
- the data. Consequently, any corruption of the data is likely to have
- severe effects and be difficult to correct. Uncompressed text, on
- the other hand, will probably still be readable despite the presence
- of some corrupted bytes.
-
- It is recommended that systems using this data format provide some
- means of validating the integrity of the compressed data. See
- reference [3], for example.
-
-7. Source code
-
- Source code for a C language implementation of a "deflate" compliant
- compressor and decompressor is available within the zlib package at
- ftp://ftp.uu.net/pub/archiving/zip/zlib/.
-
-8. Acknowledgements
-
- Trademarks cited in this document are the property of their
- respective owners.
-
- Phil Katz designed the deflate format. Jean-Loup Gailly and Mark
- Adler wrote the related software described in this specification.
- Glenn Randers-Pehrson converted this document to RFC and HTML format.
-
-
-
-Deutsch Informational [Page 16]
-
-RFC 1951 DEFLATE Compressed Data Format Specification May 1996
-
-
-9. Author's Address
-
- L. Peter Deutsch
- Aladdin Enterprises
- 203 Santa Margarita Ave.
- Menlo Park, CA 94025
-
- Phone: (415) 322-0103 (AM only)
- FAX: (415) 322-1734
- EMail: <ghost@aladdin.com>
-
- Questions about the technical content of this specification can be
- sent by email to:
-
- Jean-Loup Gailly <gzip@prep.ai.mit.edu> and
- Mark Adler <madler@alumni.caltech.edu>
-
- Editorial comments on this specification can be sent by email to:
-
- L. Peter Deutsch <ghost@aladdin.com> and
- Glenn Randers-Pehrson <randeg@alumni.rpi.edu>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Deutsch Informational [Page 17]
-
diff --git a/cpukit/zlib/doc/rfc1952.txt b/cpukit/zlib/doc/rfc1952.txt
deleted file mode 100644
index a8e51b4567..0000000000
--- a/cpukit/zlib/doc/rfc1952.txt
+++ /dev/null
@@ -1,675 +0,0 @@
-
-
-
-
-
-
-Network Working Group P. Deutsch
-Request for Comments: 1952 Aladdin Enterprises
-Category: Informational May 1996
-
-
- GZIP file format specification version 4.3
-
-Status of This Memo
-
- This memo provides information for the Internet community. This memo
- does not specify an Internet standard of any kind. Distribution of
- this memo is unlimited.
-
-IESG Note:
-
- The IESG takes no position on the validity of any Intellectual
- Property Rights statements contained in this document.
-
-Notices
-
- Copyright (c) 1996 L. Peter Deutsch
-
- Permission is granted to copy and distribute this document for any
- purpose and without charge, including translations into other
- languages and incorporation into compilations, provided that the
- copyright notice and this notice are preserved, and that any
- substantive changes or deletions from the original are clearly
- marked.
-
- A pointer to the latest version of this and related documentation in
- HTML format can be found at the URL
- <ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html>.
-
-Abstract
-
- This specification defines a lossless compressed data format that is
- compatible with the widely used GZIP utility. The format includes a
- cyclic redundancy check value for detecting data corruption. The
- format presently uses the DEFLATE method of compression but can be
- easily extended to use other compression methods. The format can be
- implemented readily in a manner not covered by patents.
-
-
-
-
-
-
-
-
-
-
-Deutsch Informational [Page 1]
-
-RFC 1952 GZIP File Format Specification May 1996
-
-
-Table of Contents
-
- 1. Introduction ................................................... 2
- 1.1. Purpose ................................................... 2
- 1.2. Intended audience ......................................... 3
- 1.3. Scope ..................................................... 3
- 1.4. Compliance ................................................ 3
- 1.5. Definitions of terms and conventions used ................. 3
- 1.6. Changes from previous versions ............................ 3
- 2. Detailed specification ......................................... 4
- 2.1. Overall conventions ....................................... 4
- 2.2. File format ............................................... 5
- 2.3. Member format ............................................. 5
- 2.3.1. Member header and trailer ........................... 6
- 2.3.1.1. Extra field ................................... 8
- 2.3.1.2. Compliance .................................... 9
- 3. References .................................................. 9
- 4. Security Considerations .................................... 10
- 5. Acknowledgements ........................................... 10
- 6. Author's Address ........................................... 10
- 7. Appendix: Jean-Loup Gailly's gzip utility .................. 11
- 8. Appendix: Sample CRC Code .................................. 11
-
-1. Introduction
-
- 1.1. Purpose
-
- The purpose of this specification is to define a lossless
- compressed data format that:
-
- * Is independent of CPU type, operating system, file system,
- and character set, and hence can be used for interchange;
- * Can compress or decompress a data stream (as opposed to a
- randomly accessible file) to produce another data stream,
- using only an a priori bounded amount of intermediate
- storage, and hence can be used in data communications or
- similar structures such as Unix filters;
- * Compresses data with efficiency comparable to the best
- currently available general-purpose compression methods,
- and in particular considerably better than the "compress"
- program;
- * Can be implemented readily in a manner not covered by
- patents, and hence can be practiced freely;
- * Is compatible with the file format produced by the current
- widely used gzip utility, in that conforming decompressors
- will be able to read data produced by the existing gzip
- compressor.
-
-
-
-
-Deutsch Informational [Page 2]
-
-RFC 1952 GZIP File Format Specification May 1996
-
-
- The data format defined by this specification does not attempt to:
-
- * Provide random access to compressed data;
- * Compress specialized data (e.g., raster graphics) as well as
- the best currently available specialized algorithms.
-
- 1.2. Intended audience
-
- This specification is intended for use by implementors of software
- to compress data into gzip format and/or decompress data from gzip
- format.
-
- The text of the specification assumes a basic background in
- programming at the level of bits and other primitive data
- representations.
-
- 1.3. Scope
-
- The specification specifies a compression method and a file format
- (the latter assuming only that a file can store a sequence of
- arbitrary bytes). It does not specify any particular interface to
- a file system or anything about character sets or encodings
- (except for file names and comments, which are optional).
-
- 1.4. Compliance
-
- Unless otherwise indicated below, a compliant decompressor must be
- able to accept and decompress any file that conforms to all the
- specifications presented here; a compliant compressor must produce
- files that conform to all the specifications presented here. The
- material in the appendices is not part of the specification per se
- and is not relevant to compliance.
-
- 1.5. Definitions of terms and conventions used
-
- byte: 8 bits stored or transmitted as a unit (same as an octet).
- (For this specification, a byte is exactly 8 bits, even on
- machines which store a character on a number of bits different
- from 8.) See below for the numbering of bits within a byte.
-
- 1.6. Changes from previous versions
-
- There have been no technical changes to the gzip format since
- version 4.1 of this specification. In version 4.2, some
- terminology was changed, and the sample CRC code was rewritten for
- clarity and to eliminate the requirement for the caller to do pre-
- and post-conditioning. Version 4.3 is a conversion of the
- specification to RFC style.
-
-
-
-Deutsch Informational [Page 3]
-
-RFC 1952 GZIP File Format Specification May 1996
-
-
-2. Detailed specification
-
- 2.1. Overall conventions
-
- In the diagrams below, a box like this:
-
- +---+
- | | <-- the vertical bars might be missing
- +---+
-
- represents one byte; a box like this:
-
- +==============+
- | |
- +==============+
-
- represents a variable number of bytes.
-
- Bytes stored within a computer do not have a "bit order", since
- they are always treated as a unit. However, a byte considered as
- an integer between 0 and 255 does have a most- and least-
- significant bit, and since we write numbers with the most-
- significant digit on the left, we also write bytes with the most-
- significant bit on the left. In the diagrams below, we number the
- bits of a byte so that bit 0 is the least-significant bit, i.e.,
- the bits are numbered:
-
- +--------+
- |76543210|
- +--------+
-
- This document does not address the issue of the order in which
- bits of a byte are transmitted on a bit-sequential medium, since
- the data format described here is byte- rather than bit-oriented.
-
- Within a computer, a number may occupy multiple bytes. All
- multi-byte numbers in the format described here are stored with
- the least-significant byte first (at the lower memory address).
- For example, the decimal number 520 is stored as:
-
- 0 1
- +--------+--------+
- |00001000|00000010|
- +--------+--------+
- ^ ^
- | |
- | + more significant byte = 2 x 256
- + less significant byte = 8
-
-
-
-Deutsch Informational [Page 4]
-
-RFC 1952 GZIP File Format Specification May 1996
-
-
- 2.2. File format
-
- A gzip file consists of a series of "members" (compressed data
- sets). The format of each member is specified in the following
- section. The members simply appear one after another in the file,
- with no additional information before, between, or after them.
-
- 2.3. Member format
-
- Each member has the following structure:
-
- +---+---+---+---+---+---+---+---+---+---+
- |ID1|ID2|CM |FLG| MTIME |XFL|OS | (more-->)
- +---+---+---+---+---+---+---+---+---+---+
-
- (if FLG.FEXTRA set)
-
- +---+---+=================================+
- | XLEN |...XLEN bytes of "extra field"...| (more-->)
- +---+---+=================================+
-
- (if FLG.FNAME set)
-
- +=========================================+
- |...original file name, zero-terminated...| (more-->)
- +=========================================+
-
- (if FLG.FCOMMENT set)
-
- +===================================+
- |...file comment, zero-terminated...| (more-->)
- +===================================+
-
- (if FLG.FHCRC set)
-
- +---+---+
- | CRC16 |
- +---+---+
-
- +=======================+
- |...compressed blocks...| (more-->)
- +=======================+
-
- 0 1 2 3 4 5 6 7
- +---+---+---+---+---+---+---+---+
- | CRC32 | ISIZE |
- +---+---+---+---+---+---+---+---+
-
-
-
-
-Deutsch Informational [Page 5]
-
-RFC 1952 GZIP File Format Specification May 1996
-
-
- 2.3.1. Member header and trailer
-
- ID1 (IDentification 1)
- ID2 (IDentification 2)
- These have the fixed values ID1 = 31 (0x1f, \037), ID2 = 139
- (0x8b, \213), to identify the file as being in gzip format.
-
- CM (Compression Method)
- This identifies the compression method used in the file. CM
- = 0-7 are reserved. CM = 8 denotes the "deflate"
- compression method, which is the one customarily used by
- gzip and which is documented elsewhere.
-
- FLG (FLaGs)
- This flag byte is divided into individual bits as follows:
-
- bit 0 FTEXT
- bit 1 FHCRC
- bit 2 FEXTRA
- bit 3 FNAME
- bit 4 FCOMMENT
- bit 5 reserved
- bit 6 reserved
- bit 7 reserved
-
- If FTEXT is set, the file is probably ASCII text. This is
- an optional indication, which the compressor may set by
- checking a small amount of the input data to see whether any
- non-ASCII characters are present. In case of doubt, FTEXT
- is cleared, indicating binary data. For systems which have
- different file formats for ascii text and binary data, the
- decompressor can use FTEXT to choose the appropriate format.
- We deliberately do not specify the algorithm used to set
- this bit, since a compressor always has the option of
- leaving it cleared and a decompressor always has the option
- of ignoring it and letting some other program handle issues
- of data conversion.
-
- If FHCRC is set, a CRC16 for the gzip header is present,
- immediately before the compressed data. The CRC16 consists
- of the two least significant bytes of the CRC32 for all
- bytes of the gzip header up to and not including the CRC16.
- [The FHCRC bit was never set by versions of gzip up to
- 1.2.4, even though it was documented with a different
- meaning in gzip 1.2.4.]
-
- If FEXTRA is set, optional extra fields are present, as
- described in a following section.
-
-
-
-Deutsch Informational [Page 6]
-
-RFC 1952 GZIP File Format Specification May 1996
-
-
- If FNAME is set, an original file name is present,
- terminated by a zero byte. The name must consist of ISO
- 8859-1 (LATIN-1) characters; on operating systems using
- EBCDIC or any other character set for file names, the name
- must be translated to the ISO LATIN-1 character set. This
- is the original name of the file being compressed, with any
- directory components removed, and, if the file being
- compressed is on a file system with case insensitive names,
- forced to lower case. There is no original file name if the
- data was compressed from a source other than a named file;
- for example, if the source was stdin on a Unix system, there
- is no file name.
-
- If FCOMMENT is set, a zero-terminated file comment is
- present. This comment is not interpreted; it is only
- intended for human consumption. The comment must consist of
- ISO 8859-1 (LATIN-1) characters. Line breaks should be
- denoted by a single line feed character (10 decimal).
-
- Reserved FLG bits must be zero.
-
- MTIME (Modification TIME)
- This gives the most recent modification time of the original
- file being compressed. The time is in Unix format, i.e.,
- seconds since 00:00:00 GMT, Jan. 1, 1970. (Note that this
- may cause problems for MS-DOS and other systems that use
- local rather than Universal time.) If the compressed data
- did not come from a file, MTIME is set to the time at which
- compression started. MTIME = 0 means no time stamp is
- available.
-
- XFL (eXtra FLags)
- These flags are available for use by specific compression
- methods. The "deflate" method (CM = 8) sets these flags as
- follows:
-
- XFL = 2 - compressor used maximum compression,
- slowest algorithm
- XFL = 4 - compressor used fastest algorithm
-
- OS (Operating System)
- This identifies the type of file system on which compression
- took place. This may be useful in determining end-of-line
- convention for text files. The currently defined values are
- as follows:
-
-
-
-
-
-
-Deutsch Informational [Page 7]
-
-RFC 1952 GZIP File Format Specification May 1996
-
-
- 0 - FAT filesystem (MS-DOS, OS/2, NT/Win32)
- 1 - Amiga
- 2 - VMS (or OpenVMS)
- 3 - Unix
- 4 - VM/CMS
- 5 - Atari TOS
- 6 - HPFS filesystem (OS/2, NT)
- 7 - Macintosh
- 8 - Z-System
- 9 - CP/M
- 10 - TOPS-20
- 11 - NTFS filesystem (NT)
- 12 - QDOS
- 13 - Acorn RISCOS
- 255 - unknown
-
- XLEN (eXtra LENgth)
- If FLG.FEXTRA is set, this gives the length of the optional
- extra field. See below for details.
-
- CRC32 (CRC-32)
- This contains a Cyclic Redundancy Check value of the
- uncompressed data computed according to CRC-32 algorithm
- used in the ISO 3309 standard and in section 8.1.1.6.2 of
- ITU-T recommendation V.42. (See http://www.iso.ch for
- ordering ISO documents. See gopher://info.itu.ch for an
- online version of ITU-T V.42.)
-
- ISIZE (Input SIZE)
- This contains the size of the original (uncompressed) input
- data modulo 2^32.
-
- 2.3.1.1. Extra field
-
- If the FLG.FEXTRA bit is set, an "extra field" is present in
- the header, with total length XLEN bytes. It consists of a
- series of subfields, each of the form:
-
- +---+---+---+---+==================================+
- |SI1|SI2| LEN |... LEN bytes of subfield data ...|
- +---+---+---+---+==================================+
-
- SI1 and SI2 provide a subfield ID, typically two ASCII letters
- with some mnemonic value. Jean-Loup Gailly
- <gzip@prep.ai.mit.edu> is maintaining a registry of subfield
- IDs; please send him any subfield ID you wish to use. Subfield
- IDs with SI2 = 0 are reserved for future use. The following
- IDs are currently defined:
-
-
-
-Deutsch Informational [Page 8]
-
-RFC 1952 GZIP File Format Specification May 1996
-
-
- SI1 SI2 Data
- ---------- ---------- ----
- 0x41 ('A') 0x70 ('P') Apollo file type information
-
- LEN gives the length of the subfield data, excluding the 4
- initial bytes.
-
- 2.3.1.2. Compliance
-
- A compliant compressor must produce files with correct ID1,
- ID2, CM, CRC32, and ISIZE, but may set all the other fields in
- the fixed-length part of the header to default values (255 for
- OS, 0 for all others). The compressor must set all reserved
- bits to zero.
-
- A compliant decompressor must check ID1, ID2, and CM, and
- provide an error indication if any of these have incorrect
- values. It must examine FEXTRA/XLEN, FNAME, FCOMMENT and FHCRC
- at least so it can skip over the optional fields if they are
- present. It need not examine any other part of the header or
- trailer; in particular, a decompressor may ignore FTEXT and OS
- and always produce binary output, and still be compliant. A
- compliant decompressor must give an error indication if any
- reserved bit is non-zero, since such a bit could indicate the
- presence of a new field that would cause subsequent data to be
- interpreted incorrectly.
-
-3. References
-
- [1] "Information Processing - 8-bit single-byte coded graphic
- character sets - Part 1: Latin alphabet No.1" (ISO 8859-1:1987).
- The ISO 8859-1 (Latin-1) character set is a superset of 7-bit
- ASCII. Files defining this character set are available as
- iso_8859-1.* in ftp://ftp.uu.net/graphics/png/documents/
-
- [2] ISO 3309
-
- [3] ITU-T recommendation V.42
-
- [4] Deutsch, L.P.,"DEFLATE Compressed Data Format Specification",
- available in ftp://ftp.uu.net/pub/archiving/zip/doc/
-
- [5] Gailly, J.-L., GZIP documentation, available as gzip-*.tar in
- ftp://prep.ai.mit.edu/pub/gnu/
-
- [6] Sarwate, D.V., "Computation of Cyclic Redundancy Checks via Table
- Look-Up", Communications of the ACM, 31(8), pp.1008-1013.
-
-
-
-
-Deutsch Informational [Page 9]
-
-RFC 1952 GZIP File Format Specification May 1996
-
-
- [7] Schwaderer, W.D., "CRC Calculation", April 85 PC Tech Journal,
- pp.118-133.
-
- [8] ftp://ftp.adelaide.edu.au/pub/rocksoft/papers/crc_v3.txt,
- describing the CRC concept.
-
-4. Security Considerations
-
- Any data compression method involves the reduction of redundancy in
- the data. Consequently, any corruption of the data is likely to have
- severe effects and be difficult to correct. Uncompressed text, on
- the other hand, will probably still be readable despite the presence
- of some corrupted bytes.
-
- It is recommended that systems using this data format provide some
- means of validating the integrity of the compressed data, such as by
- setting and checking the CRC-32 check value.
-
-5. Acknowledgements
-
- Trademarks cited in this document are the property of their
- respective owners.
-
- Jean-Loup Gailly designed the gzip format and wrote, with Mark Adler,
- the related software described in this specification. Glenn
- Randers-Pehrson converted this document to RFC and HTML format.
-
-6. Author's Address
-
- L. Peter Deutsch
- Aladdin Enterprises
- 203 Santa Margarita Ave.
- Menlo Park, CA 94025
-
- Phone: (415) 322-0103 (AM only)
- FAX: (415) 322-1734
- EMail: <ghost@aladdin.com>
-
- Questions about the technical content of this specification can be
- sent by email to:
-
- Jean-Loup Gailly <gzip@prep.ai.mit.edu> and
- Mark Adler <madler@alumni.caltech.edu>
-
- Editorial comments on this specification can be sent by email to:
-
- L. Peter Deutsch <ghost@aladdin.com> and
- Glenn Randers-Pehrson <randeg@alumni.rpi.edu>
-
-
-
-Deutsch Informational [Page 10]
-
-RFC 1952 GZIP File Format Specification May 1996
-
-
-7. Appendix: Jean-Loup Gailly's gzip utility
-
- The most widely used implementation of gzip compression, and the
- original documentation on which this specification is based, were
- created by Jean-Loup Gailly <gzip@prep.ai.mit.edu>. Since this
- implementation is a de facto standard, we mention some more of its
- features here. Again, the material in this section is not part of
- the specification per se, and implementations need not follow it to
- be compliant.
-
- When compressing or decompressing a file, gzip preserves the
- protection, ownership, and modification time attributes on the local
- file system, since there is no provision for representing protection
- attributes in the gzip file format itself. Since the file format
- includes a modification time, the gzip decompressor provides a
- command line switch that assigns the modification time from the file,
- rather than the local modification time of the compressed input, to
- the decompressed output.
-
-8. Appendix: Sample CRC Code
-
- The following sample code represents a practical implementation of
- the CRC (Cyclic Redundancy Check). (See also ISO 3309 and ITU-T V.42
- for a formal specification.)
-
- The sample code is in the ANSI C programming language. Non C users
- may find it easier to read with these hints:
-
- & Bitwise AND operator.
- ^ Bitwise exclusive-OR operator.
- >> Bitwise right shift operator. When applied to an
- unsigned quantity, as here, right shift inserts zero
- bit(s) at the left.
- ! Logical NOT operator.
- ++ "n++" increments the variable n.
- 0xNNN 0x introduces a hexadecimal (base 16) constant.
- Suffix L indicates a long value (at least 32 bits).
-
- /* Table of CRCs of all 8-bit messages. */
- unsigned long crc_table[256];
-
- /* Flag: has the table been computed? Initially false. */
- int crc_table_computed = 0;
-
- /* Make the table for a fast CRC. */
- void make_crc_table(void)
- {
- unsigned long c;
-
-
-
-Deutsch Informational [Page 11]
-
-RFC 1952 GZIP File Format Specification May 1996
-
-
- int n, k;
- for (n = 0; n < 256; n++) {
- c = (unsigned long) n;
- for (k = 0; k < 8; k++) {
- if (c & 1) {
- c = 0xedb88320L ^ (c >> 1);
- } else {
- c = c >> 1;
- }
- }
- crc_table[n] = c;
- }
- crc_table_computed = 1;
- }
-
- /*
- Update a running crc with the bytes buf[0..len-1] and return
- the updated crc. The crc should be initialized to zero. Pre- and
- post-conditioning (one's complement) is performed within this
- function so it shouldn't be done by the caller. Usage example:
-
- unsigned long crc = 0L;
-
- while (read_buffer(buffer, length) != EOF) {
- crc = update_crc(crc, buffer, length);
- }
- if (crc != original_crc) error();
- */
- unsigned long update_crc(unsigned long crc,
- unsigned char *buf, int len)
- {
- unsigned long c = crc ^ 0xffffffffL;
- int n;
-
- if (!crc_table_computed)
- make_crc_table();
- for (n = 0; n < len; n++) {
- c = crc_table[(c ^ buf[n]) & 0xff] ^ (c >> 8);
- }
- return c ^ 0xffffffffL;
- }
-
- /* Return the CRC of the bytes buf[0..len-1]. */
- unsigned long crc(unsigned char *buf, int len)
- {
- return update_crc(0L, buf, len);
- }
-
-
-
-
-Deutsch Informational [Page 12]
-
diff --git a/doc/BAD.html b/doc/BAD.html
deleted file mode 100644
index 7be09d069a..0000000000
--- a/doc/BAD.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<HTML>
-<HEAD><TITLE>RTEMS 4.0.0 On-Line Library</TITLE></HEAD>
-<BODY BGCOLOR="FFFFFF">
-<A HREF="http://www.oarcorp.com" target="Text Frame">
- <IMG align=right BORDER=0 SRC="oaronly.jpg" ALT="OAR"> </A>
-<H1>RTEMS On-Line Library</H1>
-<HR>
-<BODY>
-The following manuals do not currently exist in PDF:
-<MENU>
- <LI>Getting Started with RTEMS for C/C++ Users</LI>
- <LI>Getting Started with GNAT/RTEMS</LI>
-</MENU>
-These can not be generated due to a bug in the texi2pdf processor
-that results in variables not being expanded in the @uref command.
-This has been reported to the maintainers. If you are interested
-in fixing this or have a fix for this bug, please contact
-<A HREF="mailto:rtems@OARcorp.com"><I>rtems@OARcorp.com</I>.</A>
-
-<HR>
-Copyright &copy; 1988-2000 <A HREF="http://www.oarcorp.com" target="Text Frame">OAR Corporation</A>
-</BODY></HTML>
diff --git a/doc/FAQ/FAQ.texi b/doc/FAQ/FAQ.texi
deleted file mode 100644
index 45b68b1004..0000000000
--- a/doc/FAQ/FAQ.texi
+++ /dev/null
@@ -1,123 +0,0 @@
-\input texinfo @c -*-texinfo-*-
-@c %**start of header
-@setfilename FAQ
-@syncodeindex vr fn
-@synindex ky cp
-@paragraphindent 0
-@c @smallbook
-@c %**end of header
-
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@c
-@c Master file for the RTEMS FAQ
-@c
-
-@include ../common/setup.texi
-
-@ignore
-@ifinfo
-@format
-START-INFO-DIR-ENTRY
-* RTEMS Frequently Asked Questions (FAQ):
-END-INFO-DIR-ENTRY
-@end format
-@end ifinfo
-@end ignore
-
-@c
-@c Title Page Stuff
-@c
-
-@set edition @value{RTEMS-EDITION}
-@set version @value{RTEMS-VERSION}
-@set update-date @value{RTEMS-UPDATE-DATE}
-@set update-month @value{RTEMS-UPDATE-MONTH}
-
-@c
-@c I don't really like having a short title page. --joel
-@c
-@c @shorttitlepage RTEMS Frequently Asked Questions
-
-@setchapternewpage odd
-@settitle RTEMS Frequently Asked Questions
-@titlepage
-@finalout
-
-@title RTEMS Frequently Asked Questions
-@subtitle Edition @value{edition}, for @value{version}
-@sp 1
-@subtitle @value{update-month}
-@author On-Line Applications Research Corporation
-@page
-@include ../common/cpright.texi
-@end titlepage
-
-@c This prevents a black box from being printed on "overflow" lines.
-@c The alternative is to rework a sentence to avoid this problem.
-
-@include basic.texi
-@include tools.texi
-@include concepts.texi
-@include bsp.texi
-@include debug.texi
-@include freesw.texi
-@include embeddedinfo.texi
-@include hwdebugaids.texi
-@include projects.texi
-@include endoftime.texi
-
-@ifinfo
-@node Top, Basic Information, (dir), (dir)
-@top FAQ
-
-This document is the RTEMS FAQ. FAQ is an acronym for Frequently
-Asked Questions and we sincerely hope that this contains the answers
-to some of the questions most frequently asked about RTEMS.
-
-Common questions have been divided into the following categories.
-
-
-@menu
-* Basic Information::
-* General Development Tool Hints::
-* RTEMS Concepts::
-* BSP Questions::
-* Debugging Hints::
-* Free Software that Works with RTEMS::
-* Resources for Embedded Information::
-* Hardware to Ease Debugging::
-* RTEMS Projects::
-* Date/Time Issues in Systems Using RTEMS::
-@end menu
-
-@c * Command and Variable Index::
-@c * Concept Index::
-@end ifinfo
-@c
-@c
-@c Need to copy the emacs stuff and "trailer stuff" (index, toc) into here
-@c
-
-@c @node Command and Variable Index, Concept Index, Installing EGCS AND NEWLIB, Top
-@c @unnumbered Command and Variable Index
-
-@c There are currently no Command and Variable Index entries.
-
-@c @printindex fn
-
-@c @node Concept Index, , Command and Variable Index, Top
-@c @unnumbered Concept Index
-
-@c There are currently no Concept Index entries.
-@c @printindex cp
-
-@contents
-@bye
-
diff --git a/doc/FAQ/Makefile b/doc/FAQ/Makefile
deleted file mode 100644
index 4ddee5e6f1..0000000000
--- a/doc/FAQ/Makefile
+++ /dev/null
@@ -1,117 +0,0 @@
-#
-# COPYRIGHT (c) 1988-1999.
-# On-Line Applications Research Corporation (OAR).
-# All rights reserved.
-#
-# $Id$
-#
-
-PROJECT=FAQ
-
-include ../Make.config
-
-all: html info ps pdf
-
-dirs:
- $(make-dirs)
-
-COMMON_FILES=../common/cpright.texi ../common/setup.texi
-
-GENERATED_FILES= \
- basic.texi tools.texi concepts.texi bsp.texi debug.texi freesw.texi \
- embeddedinfo.texi hwdebugaids.texi projects.texi endoftime.texi
-
-FILES=$(PROJECT).texi $(GENERATED_FILES)
-
-INFOFILES=$(wildcard $(PROJECT) $(PROJECT)-*)
-
-info: dirs $(PROJECT)
- #cp $(wildcard $(PROJECT) $(PROJECT)-*) $(INFO_INSTALL)
- # cp $(PROJECT) $(INFO_INSTALL)
-
-$(PROJECT): $(FILES)
- $(MAKEINFO) $(PROJECT).texi
-
-dvi: dirs $(PROJECT).dvi
-ps: dirs $(PROJECT).ps
-pdf: dirs $(PROJECT).pdf
-
-$(PROJECT).pdf: $(FILES)
- $(TEXI2PDF) $(PROJECT).texi
- cp $(PROJECT).pdf $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).ps: $(PROJECT).dvi
- dvips -o $(PROJECT).ps $(PROJECT).dvi
- cp $(PROJECT).ps $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).dvi: $(FILES)
- $(TEXI2DVI) $(PROJECT).texi
- cp $(PROJECT).dvi $(WWW_INSTALL)/$(PROJECT)
-
-html: dirs $(FILES)
- -mkdir -p $(WWW_INSTALL)/$(PROJECT)
- $(TEXI2WWW) $(TEXI2WWW_ARGS) -dir $(WWW_INSTALL)/$(PROJECT) \
- $(PROJECT).texi
-
-clean:
- rm -f *.o $(PROG) *.txt core $(PROJECT).pdf
- rm -f *.dvi *.ps *.log *.aux *.cp *.fn *.ky *.pg *.toc *.tp *.vr $(BASE)
- rm -f $(PROJECT) $(PROJECT)-* $(GENERATED_FILES)
- rm -f *.fixed _*
-
-
-#
-# Process Automatically Generated Files
-#
-
-basic.texi: basic.t Makefile
- $(BMENU) -c -p "Top" \
- -u "Top" \
- -n "" ${*}.t
-
-tools.texi: tools.t Makefile
- $(BMENU) -c -p "Top" \
- -u "Top" \
- -n "" ${*}.t
-
-concepts.texi: concepts.t Makefile
- $(BMENU) -c -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-bsp.texi: bsp.t Makefile
- $(BMENU) -c -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-debug.texi: debug.t Makefile
- $(BMENU) -c -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-freesw.texi: freesw.t Makefile
- $(BMENU) -c -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-embeddedinfo.texi: embeddedinfo.t Makefile
- $(BMENU) -c -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-hwdebugaids.texi: hwdebugaids.t Makefile
- $(BMENU) -c -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-projects.texi: projects.t Makefile
- $(BMENU) -c -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-
-endoftime.texi: endoftime.t Makefile
- $(BMENU) -c -p "" \
- -u "Top" \
- -n "" ${*}.t
-
diff --git a/doc/FAQ/basic.t b/doc/FAQ/basic.t
deleted file mode 100644
index 4f653650f9..0000000000
--- a/doc/FAQ/basic.t
+++ /dev/null
@@ -1,177 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Basic Information
-
-The questions in this category are basic questions about RTEMS. Where
-did it come from, why is it, what is it, when should you use it, etc.?
-
-@section What does RTEMS stand for?
-
-RTEMS is an anacronym for the Real-Time Executive for Multiprocessor
-Systems.
-
-Initially RTEMS stood for the Real-Time Executive for Missile Systems
-but as it became clear that the application domains that could use
-RTEMS extended far beyond missiles, the "M" changed to mean Military.
-At one point, there were both Ada and C implementations of RTEMS. The
-C version changed the "M" to mean Multiprocessor while the Ada version
-remained with the "M" meaning Military.
-
-@section What is RTEMS?
-
-RTEMS is a real-time executive which provides a high performance
-environment for embedded military applications including many
-features. The following is just a short list of the features
-avilable in RTEMS. If you are interested in something that
-is not on this list, please contact the RTEMS Team. Features
-are being added continuously.
-
-@itemize @bullet
-
-@item Standards Compliant
-@itemize @bullet
-@item POSIX 1003.1b API including threads
-@item RTEID/ORKID based Classic API
-@end itemize
-
-@item TCP/IP Stack
-@itemize @bullet
-@item high performance port of FreeBSD TCP/IP stack
-@item UDP, TCP
-@item ICMP, DHCP, RARP
-@item TFTP
-@item RPC
-@item FTPD
-@item HTTPD
-@item CORBA
-@end itemize
-
-@item Debugging
-@itemize @bullet
-@item GNU debugger (gdb)
-@item DDD GUI interface to GDB
-@item thread aware
-@item debug over Ethernet
-@item debug over Serial Port
-@end itemize
-
-@item Filesystem Support
-@itemize @bullet
-@item In-Memory Filesystem (IMFS)
-@item TFTP Client Filesystem
-@end itemize
-
-@item Basic Kernel Features
-@itemize @bullet
-@item multitasking capabilities
-@item homogeneous and heterogeneous multiprocessor systems
-@item event-driven, priority-based, preemptive scheduling
-@item optional rate monotonic scheduling
-@item intertask communication and synchronization
-@item priority inheritance
-@item responsive interrupt management
-@item dynamic memory allocation
-@item high level of user configurability
-@end itemize
-
-@end itemize
-
-
-@section What standards does RTEMS support?
-
-The original "Classic" RTEMS API is based on the Real-Time Executive
-Interface Definition (RTEID) and the Open Real-Time Kernel Interface
-Definition (ORKID). RTEMS also includes support for POSIX threads
-and real-time extensions.
-
-With the addition of file system infrastructure, RTEMS supports
-about 70% of the POSIX 1003.1b-1996 standard. This standard
-defines the programming interfaces of standard UNIX. This means
-that much source code that works on UNIX, also works on RTEMS.
-
-@section What processors is RTEMS available for?
-
-RTEMS is available for the following processor families:
-
-@itemize @bullet
-@item Motorola MC68xxx
-@item Motorola MC683xx
-@item Motorola ColdFire
-@item Hitachi SH
-@item Intel i386
-@item Intel i960
-@item MIPS
-@item PowerPC
-@item SPARC
-@item AMD A29K
-@item Hewlett-Packard PA-RISC
-@end itemize
-
-In addition, there is a port to UNIX which can be used as a prototyping
-and simulation environment.
-
-@section Executive vs. Kernel vs. Operating System (RTOS)
-
-The developers of RTEMS developers use the terms executive and kernel
-interchangeably. In the embedded system community, the terms executive
-or kernel are generally used to refer to small operating systems.
-So we consider it proper to refer to RTEMS as an executive, a kernel,
-or an operating system.
-
-@section Where/why was it developed?
-
-RTEMS was developed by On-Line Applications Research Corporation (OAR)
-for the U.S. Army Missile Command prior to that organizations merger
-with the Aviation Command that resulted in the new command, U. S. Army
-Aviation and Missile command (AMCOM). The original goal of RTEMS was
-to provide a portable, standards-based real-time executive for which
-source code was available and royalties were paid.
-
-In other words, RTEMS was open source before open source was cool.
-
-@section Are there no similar commercial products?
-
-Yes, but not all are based on standards and the open source philosophy.
-
-@section How can I get RTEMS?
-
-RTEMS is distributed by OAR Corporation via the Internet. Point your
-favorite browser at the following URL and following the link:
-
-@c this version should work
-@c @set OAR-URL http://www.OARcorp.com
-@c @uref{@value{OAR-URL},@value{OAR-URL}}
-@uref{http://www.OARcorp.com,http://www.OARcorp.com}
-
-@section What about support?
-
-OAR Corporation provides numerous services for RTEMS including support,
-training, and custom development.
-
-@section Are there any mailing lists?
-
-The primary RTEMS mailing list is @code{rtems-list@@oarcorp.com}. You
-can subscribe by sending a message with the word @b{subscribe rtems-list}
-as the body to @code{majordomo@@oarcorp.com}.
-
-@section Are there any license restrictions?
-
-RTEMS is licensed under a modified version of the GNU General Public License
-(GPL). The modification places no restrictions on the applications which
-use RTEMS but protects the interests of those who work on RTEMS.
-
-The TCP/IP network stack included with RTEMS is a port of the FreeBSD
-network stack and is licensed under different terms that also do not
-place restrictions on the application.
-
-@section Are there any export restrictions?
-
-No.
-
-
diff --git a/doc/FAQ/bsp.t b/doc/FAQ/bsp.t
deleted file mode 100644
index 1e8488aab6..0000000000
--- a/doc/FAQ/bsp.t
+++ /dev/null
@@ -1,35 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter BSP Questions
-
-The items in this category provide answers to questions
-commonly asked about BSPs.
-
-@section What is a BSP?
-
-BSP is an acronym for Board Support Package.
-
-A BSP is a collection of device drivers, startup code, linker scripts,
-and compiler support files (specs files) that tailor RTEMS for a
-particular target hardware environment.
-
-@section What has to be in a BSP?
-
-The basic set of items is the linker script, bsp_specs, and startup code.
-If you want standard IO, then you need a console driver. This is needed
-to run any of the RTEMS tests. If you want to measure passage of time,
-you need a clock tick driver. This driver is needed for all RTEMS tests
-EXCEPT hello world and the timing tests. The timer driver is a benchmark
-timer and is needed for the tmtests (timing tests). Sometimes you will
-see a shmsupp directory which is for shared memory multiprocessing
-systems. The network driver and real-time clock drivers are optional
-and not reqired by any RTEMS tests.
-
-
-
diff --git a/doc/FAQ/concepts.t b/doc/FAQ/concepts.t
deleted file mode 100644
index 1ad0bdf657..0000000000
--- a/doc/FAQ/concepts.t
+++ /dev/null
@@ -1,19 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter RTEMS Concepts
-
-The questions in this category are hints that help basic understanding.
-
-@section RTEMS Workspace versus Program Heap
-
-The RTEMS Workspace is used to allocate space for objects created
-by RTEMS such as tasks, semaphores, message queues, etc.. It is
-primarily used during system initialization although task stacks
-and message buffer areas are also allocated from here.
-@ref{How do I determine how much memory is left?}.
diff --git a/doc/FAQ/debug.t b/doc/FAQ/debug.t
deleted file mode 100644
index c5da7d1349..0000000000
--- a/doc/FAQ/debug.t
+++ /dev/null
@@ -1,100 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Debugging Hints
-
-The questions in this category are hints that can ease debugging.
-
-@section Malloc
-
-@subsection Is malloc reentrant?
-
-Yes. The RTEMS Malloc implementation is reentrant. It is
-implemented as calls to the Region Manager in the Classic API.
-
-@subsection When is malloc initialized?
-
-During BSP initialization, the @code{bsp_libc_init} routine
-is called. This routine initializes the heap as well as
-the RTEMS system call layer (open, read, write, etc.) and
-the RTEMS reentrancy support for the Cygnus newlib Standard C
-Library.
-
-The @code{bsp_libc_init} routine is passed the size and starting
-address of the memory area to be used for the program heap as well
-as the amount of memory to ask @code{sbrk} for when the heap is
-exhausted. For most BSPs, all memory available is placed in the
-program heap thus it can not be extended dynamically by calls to
-@code{sbrk}.
-
-@section How do I determine how much memory is left?
-
-First there are two types of memory: RTEMS Workspace and Program Heap.
-The RTEMS Workspace is the memory used by RTEMS to allocate control
-structures for system objects like tasks and semaphores, task
-stacks, and some system data structures like the ready chains.
-The Program Heap is where "malloc'ed" memory comes from.
-
-Both are essentially managed as heaps based on the Heap Manager
-in the RTEMS SuperCore. The RTEMS Workspace uses the Heap Manager
-directly while the Program Heap is actually based on an RTEMS Region
-from the Classic API. RTEMS Regions are in turn based on the Heap
-Manager in the SuperCore.
-
-@subsection How much memory is left in the RTEMS Workspace?
-
-An executive workspace overage can be fairly easily spotted with a
-debugger. Look at _Workspace_Area. If first == last, then there is only
-one free block of memory in the workspace (very likely if no task
-deletions). Then do this:
-
-(gdb) p *(Heap_Block *)_Workspace_Area->first
-$3 = @{back_flag = 1, front_flag = 68552, next = 0x1e260, previous = 0x1e25c@}
-
-In this case, I had 68552 bytes left in the workspace.
-
-@subsection How much memory is left in the Heap?
-
-The C heap is a region so this should work:
-
-(gdb) p *((Region_Control *)_Region_Information->local_table[1])->Memory->first
-$9 = @{back_flag = 1, front_flag = 8058280, next = 0x7ea5b4,
- previous = 0x7ea5b0@}
-
-In this case, the first block on the C Heap has 8,058,280 bytes left.
-
-@section How do I convert an executable to IEEE-695?
-
-This section is based on an email from Andrew Bythell
-<abythell@@nortelnetworks.com> in July 1999.
-
-Using Objcopy to convert m68k-coff to IEEE did not work. The new IEEE
-object could not be read by tools like the XRay BDM Debugger.
-
-The exact nature of this problem is beyond me, but I did narrow it down to a
-problem with objcopy in binutils 2-9.1. To no surprise, others have
-discovered this problem as well, as it has been fixed in later releases.
-
-I compiled a snapshot of the development sources from 07/26/99 and
-everything now works as it should. The development sources are at
-@uref{http://sourceware.cygnus.com/binutils} (thanks Ian!)
-
-Additional notes on converting an m68k-coff object for use with XRay (and
-others):
-
-@enumerate
-
-
-@item The m68k-coff object must be built with the -gstabs+ flag. The -g flag
-alone didn't work for me.
-
-@item Run Objcopy with the --debugging flag to copy debugging information.
-
-@end enumerate
-
-
diff --git a/doc/FAQ/embeddedinfo.t b/doc/FAQ/embeddedinfo.t
deleted file mode 100644
index 056f7c3ebc..0000000000
--- a/doc/FAQ/embeddedinfo.t
+++ /dev/null
@@ -1,38 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Resources for Embedded Information
-
-The items in this category provide pointers to other resources.
-
-@section General Information
-
-@section CrossGCC
-
-@uref{http://www.objsw.com}
-
-@section CPU Family Specific Forums
-
-@subsection Motorola M68xxx and ColdFire
-
-David Fiddes maintains a fabulous site on ColdFire and MC68xxx embedded
-development. It is at @uref{http://www.calm.hw.ac.uk/davidf/coldfire/}.
-
-Motorola has a lot of information at @uref{http://www.mot.com/SPS/HPESD/index.html}.
-
-@subsection Hitach SH
-
-@subsection Hitach H8
-
-@subsection MIPS
-
-@subsection PowerPC
-
-@subsection SPARC
-
-Jiri's ERC32 Site
diff --git a/doc/FAQ/endoftime.t b/doc/FAQ/endoftime.t
deleted file mode 100644
index 5f6d3592ca..0000000000
--- a/doc/FAQ/endoftime.t
+++ /dev/null
@@ -1,111 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Date/Time Issues in Systems Using RTEMS
-
-This section provides technical information regarding
-date/time representation issues and RTEMS. The Y2K problem has
-lead numerous people to ask these questions. The answer to
-these questions are actually more complicated than most
-people asking the question expect. RTEMS supports multiple
-standards and each of these standards has its own epoch and
-time representation. These standards include both programming
-API and programming language standards.
-
-In addition to the issues inside RTEMS
-itself, there is the complicating factor that the Board
-Support Package or application itself may interface with hardware
-or software that has its own set of date/time representation
-issues.
-
-In conclusion, viewing date/time representation as "the Y2K problem"
-is very short-sighted. Date/time representation should be viewed as
-a systems level issue for the system you are building. Each software
-and hardware component in the system as well as the systems being
-connected to is a factor in the equation.
-
-@section Hardware Issues
-
-Numerous Real-Time Clock (RTC) controllers provide only a two-digit
-Binary Coded Decimal (BCD) representation for the current year. Without
-software correction, these chips are a classic example of the Y2K problem.
-When the RTC rolls the year register over from 99 to 00, the device
-has no idea whether the year is 1900 or 2000. It is the responsibility
-of the device driver to recognize this condition and correct for it.
-The most common technique used is to assume that all years prior
-to either the existence of the board or RTEMS are past 2000. The
-starting year (epoch) for RTEMS is 1988. Thus,
-
-@itemize @bullet
-@item Chip year values 88-99 are interpreted as years 1988-1999.
-@item Chip year values 00-87 are interpreted as years 2000-2087.
-@end itemize
-
-Using this technique, a RTC using a
-two-digit BCD representation of the current year will overflow on
-January 1, 2088.
-
-@section RTEMS Specific Issues
-
-Internally, RTEMS uses an unsigned thirty-two bit integer to represent the
-number of seconds since midnight January 1, 1988. This counter will
-overflow on February 5, 2124.
-
-The time/date services in the Classic API will overflow when the
-RTEMS internal date/time representation overflows.
-
-The POSIX API uses the type @i{time_t} to represent the number of
-seconds since January 1, 1970. Many traditional UNIX systems as
-well as RTEMS define @i{time_t} as a signed thirty-two bit integer.
-This representation overflows on January 18, 2038. The solution
-usually proposed is to define @i{time_t} as a sixty-four bit
-integer. This solution is appropriate for for UNIX workstations
-as many of them already support sixty-four bit integers natively.
-At this time, this imposes a burden on embedded systems which are
-still primarily using processors with native integers of thirty-two
-bits or less.
-
-@section Language Specific Issues
-
-The Ada95 Language Reference Manual requires that the @i{Ada.Calendar}
-package support years through the year 2099. However, just as the
-hardware is layered on top of hardware and may inherit its limits,
-the Ada tasking and run-time support is layered on top of an operating
-system. Thus, if the operating system or underlying hardware fail
-to correctly report dates after 2099, then it is possible for the
-@i{Ada.Calendar} package to fail prior to 2099.
-
-@section Date/Time Conclusion
-
-Each embedded system could be impacted by a variety of date/time
-representation issues. Even whether a particular date/time
-repsentation issue impacts a system is questionable. A system
-using only the RTEMS Classic API is not impacted by the
-date/time representation issues in POSIX. A system not using
-date/time at all is not impacted by any of these issues. Also
-the planned end of life for a system may make these issues
-moot.
-
-The following is a timeline of the date/time representation
-issues presented in this section:
-
-@itemize @bullet
-
-@item 2000 - Two BCD Digit Real-Time Clock Rollover
-
-@item 2038 - POSIX @i{time_t} Rollover
-
-@item 2088 - Correction for Two BCD Digit Real-Time Clock Rollover
-
-@item 2099 - Ada95 @i{Ada.Calendar} Rollover
-
-@item 2124 - RTEMS Internal Seconds Counter Rollover
-
-@end itemize
-
-
diff --git a/doc/FAQ/entry b/doc/FAQ/entry
deleted file mode 100644
index 7a6be8d8ca..0000000000
--- a/doc/FAQ/entry
+++ /dev/null
@@ -1,57 +0,0 @@
-#
-# $Id$
-#
-
-This is the RTEMS entry in the Crossgcc FAQ at @uref{http://www.objsw.com}.
-As of 8/19/99, it has been submitted twice and the FAQ not updated.
-
-RTEMS is a freely available, royalty free real-time executive with
-multiprocessor capabilities. RTEMS' design provides performance and
-capabilities are comparable to those of the best commercial executives.
-The directive execution times and other critical performance measures such
-as interrupt latency are best of class. RTEMS was developed by On-Line
-Applications Research Corporation (OAR) under contract to the U.S. Army
-Missile Command.
-
-
-RTEMS includes support for multiple APIs. Currently RTEMS supports a
-POSIX threads API, and an RTEID based API which is similar to pSOS+.
-RTEMS includes a number of advanced real-time features including optional
-rate monotonic scheduling support, binary semapahores with priority
-inheritance, and watchdog timer functions.
-
-RTEMS includes a port of the FreeBSD TCP/IP stack that has high
-performance on very modest hardware. A remote debug server is supported
-on some targets that allows debugging across the network.
-
-RTEMS provides a rich run-time environment with a reentrant C library,
-POSIX 1003.1b support, and file system support. It also includes optional
-debug aids like stack overflow and heap integrity checking.
-
-RTEMS is built using GNU autoconf and can be built on any host supporting
-the GNU tools including Linux, FreeBSD, NetBSD, Solaris, and MS-Windows to
-name but a few. The current RTEMS release supports a the following CPU
-families:
-
- Motorola m680x0, m683xx, and ColdFire
- Motorola and IBM PowerPC (4xx, 6xx, 7xx, and 8xx)
- Hitachi SH-1
- Intel i386, i486, Pentium, and i960
- SPARC
- MIPS
- HP PA-RISC
- AMD A29K
-
-There are over 35 Board Support Packages included with RTEMS including
-BSPs for the SPARC and PowerPC simulators included with gdb. There are
-numerous BSPs for CPUs targetting the embedded market such as the Motorola
-m683xx and mpc8xx series which support the on-CPU peripherals.
-
-WWW:
-
-@uref{http://www.OARcorp.com}
-
-E-mail:
-
-@code{rtems-info@@OARcorp.com}
-
diff --git a/doc/FAQ/freesw.t b/doc/FAQ/freesw.t
deleted file mode 100644
index 03e5c6585f..0000000000
--- a/doc/FAQ/freesw.t
+++ /dev/null
@@ -1,162 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Free Software that Works with RTEMS
-
-This section describes other free software packages that are known to work
-with RTEMS.
-
-@section Development Tools
-
-@subsection Basic Development Environment
-
-The standard RTEMS development environment consists of the following GNU
-components:
-
-@itemize @bullet
-
-@item gcc/egcs
-@item binutils
-@item gdb
-
-@end itemize
-
-Although not from the Free Software Foundation, the Cygnus newlib C
-library integrates well with the GNU tools and is a standard part of the
-RTEMS development environment.
-
-@subsection GNU Ada
-
-For those interested in using the Ada95 programming language, the GNU Ada
-compiler (GNAT) is available and has excellent support for RTEMS.
-
-@subsection DDD - Data Display Debugger
-
-By far the easiest way to use DDD if you are on a Redhat Linux system is
-to retrieve the RPM package for your OS version. In general, it is
-easier to install a static binary since doing so avoids all problems
-with dynamic library versions.
-
-Some versions of DDD have had trouble with Lesstif. If you
-are using Lesstiff, you will need version 0.88 or newer. It
-is also available as an RPM at the popular sites. Another Motif
-clone is Motive and versions 1.2 and newer known to work with DDD
-on popular distributions of Linux including RedHat and Slackware.
-
-Installed as RPMs, DDD in conjunction with either Lesstif or Motive
-should work out-of-the-box.
-
-User comments indicate that both Lesstif and DDD can be built
-from scratch without any problems. Instructions on installing
-Lesstif are at @uref{http://www.cs.tu-bs.de/softech/ddd/}. They
-indicate that
-
-@itemize @bullet
-LessTif should be used in (default) Motif 1.2 compatibility mode.
-
-The Motif 2.0 compatibility mode of LessTif is still incomplete.
-@end itemize
-
-So configure lesstif with --enable-default-12.
-
-The configure script is broken (see www.lesstif.org --> known problems)
-for 0.88.1. I didn't fix the script as they show, so I just have links
-in /usr/local/lib (also shown).
-
-Watch out: Lesstif installs its libraries in /usr/local/Lesstif. You
-will need to update /etc/ld.so.conf and regenerate the cache of shared
-library paths to point to the Motif 1.2 library.
-
-The following notes are from an RTEMS user who uses DDD in conjunction
-with Lesstif. Configure DDD "--with-motif-libraries=/usr/local/lib
---with-motif-includes=/usr/local/include" DDD needs gnuplot 3.7.
-@uref{ftp://ftp.dartmouth.edu/pub/gnuplot/gnuplot-3.7.tar.gz}. Build and
-install from scratch.
-
-DDD can be started from a script that specifies the cross debugger.
-This simplifies the invocation. The following example shows what
-a script doing this looks like.
-
-@example
-#!/bin/bash
-ddd --debugger m68k-elf-gdb $1
-@end example
-
-Under many flavors of UNIX, you will likely have to relax permissions.
-
-On Linux, to get gdb to use the serial ports while running as a
-normal user, edit /etc/security/console.perms, and create a <serial>
-class (call it whatever you want).
-
-@example
-<serial>=/dev/ttyS* /dev/cua*
-@end example
-
-Now enable the change of ownership of these devices when users log in
-from the console:
-
-@example
-<console> 0600 <serial> 0600 root
-@end example
-
-Users report using minicom to communicate with the target to initiate a TFTP
-download. They then suspend minicom, launch DDD, and begin debugging.
-
-The procedure should be the same on other platforms, modulo the choice
-of terminal emulator program and the scheme used to access the serial
-ports. From problem reports on the cygwin mailing list, it appears that
-GDB has some problems communicating over serial lines on that platform.
-
-NOTE: GDB does not like getting lots of input from the program under test
-over the serial line. Actually, it does not care, but it looses
-characters. It would appear that flow control is not re-enabled when it
-resumes program execution. At times, it looked like the test were
-failing, but everything was OK. We modified the MVME167 serial driver to
-send test output to another serial port. Using two serial ports is
-usually the easiest way to get test output while retaining a reliable debug
-connection regardless of the debugger/target combination.
-
-Information provided by Charles-Antoine Gauthier (charles.gauthier@@iit.nrc.ca)
-and Jiri Gaisler (jgais@@ws.estec.esa.nl).
-
-
-@section omniORB
-
-omniORB is a GPL'ed CORBA which has been ported to RTEMS. It is
-available from
-(@uref{http://www.uk.research.att.com/omniORB/omniORB.html,http://www.uk.research.att.com/omniORB/omniORB.html})
-.
-
-For information on the RTEMS port of omniORB to RTEMS, see the following
-URL
-(@uref{http://www.connecttel.com/corba/rtems_omni.html,http://www.connecttel.com/corba/rtems_omni.html}).
-
-C++ exceptions must work properly on your target for omniORB to work.
-
-The port of omniORB to RTEMS was done by Rosimildo DaSilva
-<rdasilva@@connecttel.com>.
-
-@section TCL
-
-Tool Command Language.
-
-ditto
-
-@section ncurses
-
-Free version of curses.
-
-ditto
-
-
-@section zlib
-
-Free compression/decompression library.
-
-ditto
-
diff --git a/doc/FAQ/hwdebugaids.t b/doc/FAQ/hwdebugaids.t
deleted file mode 100644
index 765ba6d921..0000000000
--- a/doc/FAQ/hwdebugaids.t
+++ /dev/null
@@ -1,110 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Hardware to Ease Debugging
-
-The items in this category provide information on various hardware
-debugging assistants that are available.
-
-@section MC683xx BDM Support for GDB
-
-Eric Norum (eric@@skatter.usask.ca) has a driver for a parallel
-port interface to a BDM module. This driver has a long history
-and is based on a driver by Gunter Magin (magin@@skil.camelot.de)
-which in turn was based on BD32 for DOS by Scott Howard. Eric Norum
-and Chris Johns (ccj@@acm.org) have put together a package containing
-everything you need to use this BDM driver including software, PCB layouts,
-and machining drawings. From the README:
-
-"This package contains everything you need to be able to run GDB on
-Linux and control a Motorola CPU32+ (68360) or Coldfire (5206, 5206e, or
-5207) target through a standard PC parallel port."
-
-Information on this BDM driver is available at the following URL:
-
-@example
-http://www.calm.hw.ac.uk/davidf/coldfire/gdb-bdm-linux.htm
-@end example
-
-The package is officially hosted at Eric Norum's ftp site:
-
-@example
-ftp://skatter.usask.ca/pub/eric/BDM-Linux-gdb/
-@end example
-
-Peter Shoebridge (peter@@zeecube.com) has ported the Linux
-parallel port BDM driver from Eric Norum to Windows NT. It is
-available at http://www.zeecube.com/bdm.
-
-The efi332 project has a home-built BDM module and gdb backend for
-Linux. See http://efi332.eng.ohio-state.edu/efi332/hardware.html)
-for details. The device driver and gdb backend are based on those
-by Gunter Magin (magin@@skil.camelot.de) available from
-ftp.lpr.e-technik.tu-muenchen.de.
-
-Pavel Pisa (pisa@@cmp.felk.cvut.cz) has one available at
-http://cmp.felk.cvut.cz/~pisa/m683xx/bdm_driver.html.
-
-Huntsville Microsystems (HMI) has GDB support for their BDM module
-available upon request. It is also available from their ftp site:
-ftp://ftp.hmi.com/pub/gdb
-
-The Macraigor OCD BDM module has a driver for Linux
-written by Gunter Magin (magin@@skil.camelot.de).
-No URLs yet.
-
-Finally, there is a overview of BDM at the following URL:
-http://cmp.felk.cvut.cz/~pisa/m683xx/bdm_driver.html.
-
-Information in this section from:
-
-@itemize @bullet
-@item Brendan Simon <brendan@@dgs.monash.edu.au>
-@item W Gerald Hicks <wghicks@@bellsouth.net>
-@item Chris Johns <ccj@@acm.org>
-@item Eric Norum <eric@@skatter.usask.ca>
-@item Gunter Magin <magin@@skil.camelot.de>
-
-@end itemize
-
-
-@section MPC8xx BDM Support for GDB
-
-@c "Adrian Bocaniciu" <a.bocaniciu@computer.org> has a driver
-@c for NT and is willing to share it but he needs to be emailed
-@c privately since he needs to explain somethings about it.
-@c It has been used for over a year as of 08/18/99.
-
-Christian Haan <chn@@intego.de> has written a driver for FreeBSD
-based for"a slightly changed ICD BDM module (because of changes
-in the BDM interface on the PowerPC)" that "probably will work with
-the PD module too." His work is based on the M68K BDM work by
-Gunter Magin (Gunter.Magin@@skil.camelot.de) and
-the PPC BDM for Linux work by Sergey Drazhnikov (swd@@agua.comptek.ru).
-This is not yet publicly available.
-
-Sergey Drazhnikov (swd@@agua.comptek.ru) has written a PPC BDM driver for
-Linux. Information is available at http://cyclone.parad.ru/ppcbdm.
-
-Huntsville Microsystems (HMI) has GDB support for their BDM module
-available upon request. It is also available from their ftp site:
-ftp://ftp.hmi.com/pub/gdb
-
-GDB includes support for a set of primitives to support the Macraigor
-Wiggler (OCD BDM). Unfortunately, this requires the use of a
-proprietary interface and is supported only on Windows. This forces
-one to use CYGWIN. Reports are that this results in a slow
-interface. Scott Howard (http://www.objsw.com) has announced
-that support for the gdb+wiggler combination under DJGPP which should
-run significantly faster.
-
-@itemize @bullet
-@item Leon Pollak <leonp@@plris.com>
-@item Christian Haan <chn@@intego.de>
-@end itemize
-
diff --git a/doc/FAQ/projects.t b/doc/FAQ/projects.t
deleted file mode 100644
index 5bd7043207..0000000000
--- a/doc/FAQ/projects.t
+++ /dev/null
@@ -1,113 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter RTEMS Projects
-
-The questions in this category are regarding things that people
-are working on or that the RTEMS community would like to see work on.
-
-There are multiple ways to support the RTEMS Project. Financial support
-is always welcomed. This can be via sponsorship of a specific project
-such as one of the ones listed here or via volunteering in some
-capacity.
-
-@section Other Filesystems
-
-This is a list of the filesystems that would be nice to have support
-for in RTEMS. For each filsystem, status and contact information is
-provided for those who have expressed interest in helping out or are actively
-working on it.
-
-@itemize @bullet
-@item TFTP client - read only, no write capability
-@itemize @bullet
-@item No Contact
-@end itemize
-
-@item DOS Filesystem - ???
-@itemize @bullet
-@item Peter Shoebridge <peter@@zeecube.com>
-@item Victor V. Vengerov <vvv@@tepkom.ru>
-@end itemize
-
-@item CD-ROM Filesystem - ???
-@itemize @bullet
-@item Peter Shoebridge <peter@@zeecube.com>
-@end itemize
-
-@item Flash Filesystem(s) - ???
-@itemize @bullet
-@item Rod Barman <rodb@@ieee.org>
-@item Victor V. Vengerov <vvv@@tepkom.ru>
-@end itemize
-
-@item Remote Host Filesystem - ???
-@itemize @bullet
-@item Wayne Bullaughey <wayne@@wmi.com>
-@end itemize
-
-@item NFS client - ???
-@itemize @bullet
-@item No Contact
-@end itemize
-
-@end itemize
-
-@section Java
-
-@subsection Kaffe
-
-This porting effort is underway and active.
-
-@itemize @bullet
-@item Jiri Gaisler <jgais@@ws.estec.esa.nl>
-@item Oscar Martinez de la Torre <omt@@wm.estec.esa.nl>
-@end itemize
-
-NOTE: An older version of Kaffe was ported to a pre-4.0 version of RTEMS.
-The network support in RTEMS was immature at that port and Kaffe had
-portability problems. Together these resulted in an unclean port which
-was never merged.
-
-@subsection GNU Java Compiler (gjc)
-
-This porting effort is underway and active.
-
-@itemize @bullet
-@item Charles-Antoine Gauthier <charles.gauthier@@iit.nrc.ca>
-@end itemize
-
-@section CORBA
-
-@subsection TAO
-
-This porting effort is pending testing. Erik ported the code but then
-discovered that his target board did not have enough memory to run
-any TAO tests.
-
-@itemize @bullet
-@item Erik Ivanenko <erik.ivanenko@@utoronto.ca>
-@end itemize
-
-@section APIs
-
-@subsection POSIX 1003.1b
-
-Support for POSIX 1003.1b is mature but there are a few remaining
-items including a handful of services, performance tests, and
-documentation. Please refer to the Status chapter of the
-@i{POSIX API User's Guide} for more details.
-
-@subsection ITRON 3.0
-
-Support for ITRON 3.0 is in its beginning stages. There are
-numerous managers left to implement, both functional and
-performance tests to write, and much documentation remaining.
-Please refer to the Status chapter of the @i{ITRON 3.0 API User's Guide}
-for specific details.
-
diff --git a/doc/FAQ/tools.t b/doc/FAQ/tools.t
deleted file mode 100644
index 011f4945a6..0000000000
--- a/doc/FAQ/tools.t
+++ /dev/null
@@ -1,51 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter General Development Tool Hints
-
-The questions in this category are related to the GNU development tools
-in a non-language specific way.
-
-@section What is GNU?
-
-Take a look at @uref{http://www.gnu.org} for information on the GNU Project.
-
-@section How do I generate a patch?
-
-The RTEMS patches to the development tools are generated using a
-command like this
-
-@example
-diff -N -P -r -c TOOL-original-image TOOL-with-changes >PATCHFILE
-@end example
-
-where the options are:
-
-@itemize @bullet
-
-@item -N and -P take care of adding and removing files (be careful not to
-include junk files like file.mybackup)
-
-@item -r tells diff to recurse through subdirectories
-
-@item -c is a context diff (easy to read for humans)
-
-@end itemize
-
-Please look at the generated PATCHFILE and make sure it does not
-contain anything you did not intend to send to the maintainers.
-It is easy to accidentally leave a backup file in the modified
-source tree or have a spurious change that should not be
-in the PATCHFILE.
-
-If you end up with the entire contents of a file in the patch
-and can't figure out why, you may have different CR/LF scheme
-in the two source files. The GNU open-source packages usually have
-UNIX style CR/LF. If you edit on a Windows platform, the line
-terminators may have been transformed by the editor into Windows
-style.
diff --git a/doc/HELP.html b/doc/HELP.html
deleted file mode 100644
index 851d083d10..0000000000
--- a/doc/HELP.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<HTML>
-<HEAD><TITLE>RTEMS 4.0.0 On-Line Library</TITLE></HEAD>
-<BODY BGCOLOR="FFFFFF">
-<A HREF="http://www.oarcorp.com" target="Text Frame">
- <IMG align=right BORDER=0 SRC="oaronly.jpg" ALT="OAR"> </A>
-<H1>RTEMS On-Line Library</H1>
-<HR>
-<BODY>
-The following supplement manuals do not currently exist:
-<MENU>
- <LI>RTEMS AMD 29K Applications Supplement</LI>
- <LI>RTEMS MIPS Applications Supplement</LI>
- <LI>RTEMS Hitachi SH Applications Supplement</LI>
- <LI>RTEMS UNIX Port Applications Supplement</LI>
-</MENU>
-If you have knowledge of the processors used in the above ports and
-want to contribute to RTEMS, please contact
-<A HREF="mailto:rtems@OARcorp.com"><I>rtems@OARcorp.com</I></A>
-
-<HR>
-Copyright &copy; 1988-2000 <A HREF="http://www.oarcorp.com" target="Text Frame">OAR Corporation</A>
-</BODY></HTML>
diff --git a/doc/Make.config b/doc/Make.config
deleted file mode 100644
index c08a37a09d..0000000000
--- a/doc/Make.config
+++ /dev/null
@@ -1,64 +0,0 @@
-#
-# Build information which may change
-#
-# $Id$
-#
-
-RTEMS_VERSION=20000104
-#DOC_INSTALL_BASE=/usr1/rtems/tmp/rtemsdoc-$(RTEMS_VERSION)
-DOC_INSTALL_BASE=/home/httpd/html/rtems/rtemsdoc-$(RTEMS_VERSION)
-# DOC_INSTALL_BASE=/home/httpd/html/rtems/doc/rtems
-
-SRCDIR=/usr1/rtems/rtemsdoc-work
-
-BMENU=$(SRCDIR)/tools/bmenu/bmenu
-PDL2TEXI=$(SRCDIR)/tools/pdl2texi/pdl2texi
-
-SRC2HTML=$(SRCDIR)/tools/src2html/src2html
-#TEXI2DVI=$(SRCDIR)/tools/texi2www/texi2dvi
-TEXI2DVI=texi2dvi
-TEXI2PDF=texi2pdf
-TEXI2WWW=$(SRCDIR)/tools/texi2www/texi2www
-MAKEINFO=makeinfo
-INFO=info
-XDVI=xdvi -s 4
-GHOSTVIEW=ghostview -magstep -1
-
-# Account for tree organization which restricts visibility
-#ifeq ($(DISTRIBUTION_LEVEL),public)
-RLEVEL=
-WWW_INSTALL=$(DOC_INSTALL_BASE)/html
-INFO_INSTALL=$(DOC_INSTALL_BASE)/info
-INDEX_FILE=../$(RLEVEL)index.html
-#else
-#RLEVEL=../
-#WWW_INSTALL=$(DOC_INSTALL_BASE)/html/$(DISTRIBUTION_LEVEL)
-#INFO_INSTALL=$(DOC_INSTALL_BASE)/info/$(DISTRIBUTION_LEVEL)
-#INDEX_FILE=../$(RLEVEL)rtems_full.html
-#endif
-
-#TEXI2WWW_ARGS=-dirfile $(WWW_INSTALL)/index.html \
-# -header $(WWW_INSTALL)/rtems_header.html \
-# -footer $(WWW_INSTALL)/rtems_footer.html
-TEXI2WWW_ARGS=-dirfile $(INDEX_FILE) \
- -header $(WWW_INSTALL)/$(RLEVEL)rtems_header.html \
- -footer $(WWW_INSTALL)/$(RLEVEL)rtems_footer.html \
- -icons $(RLEVEL)..
-
-
-define make-dirs
- @ if [ ! -d $(WWW_INSTALL) ] ; then \
- mkdir -p $(WWW_INSTALL); \
- fi
- @ if [ ! -d $(INFO_INSTALL) ] ; then \
- mkdir -p $(INFO_INSTALL); \
- fi
- @ - cp $(SRCDIR)/oaronly.jpg $(WWW_INSTALL)
- @ - sed -e 's/RTEMS_VERSION/$(RTEMS_VERSION)/' \
- <$(SRCDIR)/rtems_footer.html >$(DOC_INSTALL_BASE)/html/rtems_footer.html
- @ - cp $(SRCDIR)/HELP.html $(DOC_INSTALL_BASE)/html
- @ - cp $(SRCDIR)/common/*.gif $(DOC_INSTALL_BASE)/html
- @ - cp $(SRCDIR)/tools/texi2www/*.gif $(DOC_INSTALL_BASE)/html
- @ - cp $(SRCDIR)/common/*.jpg $(DOC_INSTALL_BASE)/html
-endef
-
diff --git a/doc/Makefile b/doc/Makefile
deleted file mode 100644
index 39ca6a35f4..0000000000
--- a/doc/Makefile
+++ /dev/null
@@ -1,57 +0,0 @@
-#
-# $Id$
-#
-
-include Make.config
-
-BASEDIR=$(shell pwd)
-
-all: env info html ps pdf
-# find $(WWW_INSTALL) -type f | xargs -e chmod 444
-# find $(WWW_INSTALL) -type d | xargs -e chmod 555
-
-env: tools dirs headers
-
-dirs:
- $(make-dirs)
-
-headers:
- sed -e 's/RTEMS_VERSION/$(RTEMS_VERSION)/' \
- <$(SRCDIR)/index.html >$(WWW_INSTALL)/index.html
- sed -e 's/RTEMS_VERSION/$(RTEMS_VERSION)/' \
- <$(SRCDIR)/rtems_support.html >$(WWW_INSTALL)/rtems_support.html
- sed -e 's/RTEMS_VERSION/$(RTEMS_VERSION)/' \
- <$(SRCDIR)/rtems_header.html >$(WWW_INSTALL)/rtems_header.html
- sed -e 's/RTEMS_VERSION/$(RTEMS_VERSION)/' \
- <$(SRCDIR)/rtems_footer.html >$(WWW_INSTALL)/rtems_footer.html
- cp common/*.gif $(WWW_INSTALL)
- cp BAD.html $(WWW_INSTALL)
-
-info: env
- ./do_docs $(BASEDIR) info
-
-html: env
- ./do_docs $(BASEDIR) html
-
-dvi: dirs env
- ./do_docs $(BASEDIR) dvi
-
-ps: dirs env
- ./do_docs $(BASEDIR) ps
-
-pdf: dirs env
- ./do_docs $(BASEDIR) pdf
-
-clean:
- ./do_docs $(BASEDIR) clean
- cd tools/bmenu ; gmake clean
- cd tools/pdl2texi ; gmake clean
- cd tools/src2html ; gmake clean
-
-
-.PHONY: tools
-
-tools:
- cd tools/bmenu ; gmake
- cd tools/pdl2texi ; gmake
- cd tools/src2html ; gmake
diff --git a/doc/README b/doc/README
deleted file mode 100644
index 225dfa23b8..0000000000
--- a/doc/README
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# $Id$
-#
-
-Tools Required
-==============
-The following tools are used in the production of this documentation:
-
-TeX
-texinfo 3.7
-texi2www-960103
-
-This was used by the authors to generate the directory tree figure
-in the texinfo printed version:
-
-tree (from the CTAN Archives -- see http://jasper.ora.com/ctan.html)
-
-Installation
-============
-1. Edit replace-word so it references perl in the correct location.
-
-2. Edit Make.config and localize it.
-
-3. Edit do_docs and fix basedir
-
-4. Create the installation point for the html and info files.
-
-5. Copy texi2www gif files into the main rtems html install directory.
-
-
-Use do_docs to:
-
-do_docs info
-do_docs html
-do_docs clean
-
diff --git a/doc/TODO b/doc/TODO
deleted file mode 100644
index 0aa41ce461..0000000000
--- a/doc/TODO
+++ /dev/null
@@ -1,77 +0,0 @@
-#
-# $Id$
-#
-
-This is a collection of things which need to be done to the various
-manuals.
-
-POSIX User Notes
-================
-
-Add pages for network services.
-
-Add timer() services if we have any.
-
-
-Development Environment Guide
-=============================
-Either rename to "A Tour of the RTEMS Source Tree" or include
-more information on the GNU tools.
-
-The "C Suites" section is oddly named and the directory
-tree included is wrong in that make is no longer under
-the c directory. I think the build-tools make have
-moved as well.
-
-All the paths should be provided as relative paths
-from the top of the RTEMS source tree. It wastes
-valuable screen space to do otherwise.
-
-The last paragraph of "C Suites" is vague and could
-be written better. It should include the subdirectory
-names as part of the textual description.
-
-
-Should this documentation even use the phrase "C Implementation"
-any longer?
-
-Directory names should be in @code -- not "quoted".
-
-In "Support Library Source Directory", look for "which installed"
-
-In the latter part of the "libbsp" paragraph in "Support
-Library Source Directory", there is reference to the
-stubdr directory which is no longer there.
-
-Update this section to include discussion of the shared
-subdirectory and its relationship to the BSPs. Write this
-in such a way that it can be passed on to Geoffroy Montel.
-
-Include a better discussion of the subdirectories
-under each BSP. This can be a starting point for
-Geoffroy Montel. The sample tests also deserve mention
-in a BSP development guide.
-
-In the section, "Test Suite Source Directory", there is a
-numeric count of the number of tests in each suite. This
-should be eliminated for maintenance purposes.
-
-The psxtest directory is not mentioned. Check that no others
-have been forgotten.
-
-There should probably be no reference to the Ada sample
-applications. This document used to cover both implementations.
-This now seems inappropriate.
-
-The hello world sample test discussion mentions that it provides
-a rudiementary test of the BSP startup code and the "RTEMS
-C Library". This should be rewritten to tell mroe about what
-this test shows (actually a lot). It should mention that this
-test tries to avoid using interrupts.
-
-The ticker test should mention that in contrast to hello, it
-does use interrupts. :) It can be used to tune the clock
-tick.
-
-The ticker test documentation says it calls "tm_get" -- jeez
-how old is this manual.
diff --git a/doc/VERSION b/doc/VERSION
deleted file mode 100644
index 824201fb48..0000000000
--- a/doc/VERSION
+++ /dev/null
@@ -1,5 +0,0 @@
-#
-# $Id$
-#
-
-RTEMS Version 19991117
diff --git a/doc/ada_user/Makefile b/doc/ada_user/Makefile
deleted file mode 100644
index fedd0ea011..0000000000
--- a/doc/ada_user/Makefile
+++ /dev/null
@@ -1,73 +0,0 @@
-#
-# COPYRIGHT (c) 1988-1999.
-# On-Line Applications Research Corporation (OAR).
-# All rights reserved.
-#
-# $Id$
-#
-
-PROJECT=ada_user
-
-include ../Make.config
-
-all: html info ps pdf
-
-COMMON_FILES=../common/cpright.texi ../user/bsp.texi ../user/clock.texi \
- ../user/concepts.texi ../user/conf.texi ../user/dirstat.texi \
- ../user/dpmem.texi ../user/event.texi \
- ../user/fatal.texi ../user/glossary.texi ../user/init.texi \
- ../user/intr.texi ../user/io.texi ../user/mp.texi ../user/msg.texi \
- ../user/overview.texi ../user/part.texi ../user/preface.texi \
- ../user/region.texi ../user/rtmon.texi ../user/schedule.texi \
- ../user/sem.texi ../user/signal.texi ../user/task.texi \
- ../user/timer.texi ../user/userext.texi
-FILES= ada_user.texi example.texi $(COMMON_FILES)
-
-LINKFILES=../user/rtemspie.eps ../user/rtemspie.pdf \
- ../user/states.eps ../user/states.pdf
-
-dirs: links
- $(make-dirs)
-
-links:
- cp $(LINKFILES) .
-
-INFOFILES=$(wildcard $(PROJECT) $(PROJECT)-*)
-
-info: dirs $(PROJECT)
- cp $(shell ls -1 $(PROJECT) $(PROJECT)-* 2>/dev/null) $(INFO_INSTALL)
-
-$(PROJECT): $(FILES)
- $(MAKEINFO) $(PROJECT).texi
-
-dvi: dirs $(PROJECT).dvi
-ps: dirs $(PROJECT).ps
-pdf: dirs $(PROJECT).pdf
-
-$(PROJECT).pdf: $(FILES)
- $(TEXI2PDF) $(PROJECT).texi
- cp $(PROJECT).pdf $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).ps: dirs $(PROJECT).dvi
- dvips -o $(PROJECT).ps $(PROJECT).dvi
- cp $(PROJECT).ps $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).dvi: $(FILES)
- $(TEXI2DVI) $(PROJECT).texi
- cp $(PROJECT).dvi $(WWW_INSTALL)/$(PROJECT)
-
-html: dirs $(FILES)
- -mkdir -p $(WWW_INSTALL)/$(PROJECT)
- cp ../user/rtemsarc.gif ../user/rtemspie.gif ../user/states.gif \
- $(WWW_INSTALL)/$(PROJECT)
- $(TEXI2WWW) $(TEXI2WWW_ARGS) -dir $(WWW_INSTALL)/$(PROJECT) \
- $(PROJECT).texi
-
-# This is one of the few document directories without its own eps and pdf
-# files. Thus it can safely remove *.pdf and *.eps.
-clean:
- rm -f *.o $(PROG) *.txt core *.html *.pdf *.eps
- rm -f *.dvi *.ps *.log *.aux *.cp *.fn *.ky *.pg *.toc *.tp *.vr $(BASE)
- rm -f $(PROJECT) $(PROJECT)-* _*
- rm -f *.cps *.cpss *.fns *.jkys *.pgs *.tps *.vrs
-
diff --git a/doc/ada_user/ada_user.texi b/doc/ada_user/ada_user.texi
deleted file mode 100644
index fd7917f73e..0000000000
--- a/doc/ada_user/ada_user.texi
+++ /dev/null
@@ -1,169 +0,0 @@
-\input texinfo @c -*-texinfo-*-
-@c %**start of header
-@setfilename ada_user
-@syncodeindex vr fn
-@synindex ky cp
-@paragraphindent 0
-@c @smallbook
-@c %**end of header
-
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@c
-@c Master file for the Ada User's Guide
-@c
-
-@c Joel's Questions
-@c
-@c 1. Why does paragraphindent only impact makeinfo?
-@c 2. Why does paragraphindent show up in HTML?
-@c
-
-@include ../common/setup.texi
-
-@ignore
-@ifinfo
-@format
-START-INFO-DIR-ENTRY
-* RTEMS Ada User: (ada_user). The Ada User's Guide
-END-INFO-DIR-ENTRY
-@end format
-@end ifinfo
-@end ignore
-
-@c variable substitution info:
-@c
-@clear is-C
-@set is-Ada
-@set LANGUAGE Ada
-@set STRUCTURE record
-@set ROUTINE subprogram
-@set OR or
-@set RPREFIX RTEMS.
-@set DIRPREFIX rtems.
-@c the language is @value{LANGUAGE}
-@c NOTE: don't use underscore in the name
-@c
-
-@c
-@c Title Page Stuff
-@c
-
-@set edition @value{RTEMS-EDITION}
-@set version @value{RTEMS-VERSION}
-@set update-date @value{RTEMS-UPDATE-DATE}
-@set update-month @value{RTEMS-UPDATE-MONTH}
-
-@c
-@c I don't really like having a short title page. --joel
-@c
-@c @shorttitlepage RTEMS Applications Ada User's Guide
-
-@setchapternewpage odd
-@settitle RTEMS Ada User's Guide
-@titlepage
-@finalout
-
-@title RTEMS Applications Ada User's Guide
-@subtitle Edition @value{edition}, for RTEMS @value{version}
-@sp 1
-@subtitle @value{update-month}
-@author On-Line Applications Research Corporation
-@page
-@include ../common/cpright.texi
-@end titlepage
-
-@c This prevents a black box from being printed on "overflow" lines.
-@c The alternative is to rework a sentence to avoid this problem.
-
-@include ../user/preface.texi
-@include ../user/overview.texi
-@include ../user/concepts.texi
-@include ../user/init.texi
-@include ../user/task.texi
-@include ../user/intr.texi
-@include ../user/clock.texi
-@include ../user/timer.texi
-@include ../user/sem.texi
-@include ../user/msg.texi
-@include ../user/event.texi
-@include ../user/signal.texi
-@include ../user/part.texi
-@include ../user/region.texi
-@include ../user/dpmem.texi
-@include ../user/io.texi
-@include ../user/fatal.texi
-@include ../user/schedule.texi
-@include ../user/rtmon.texi
-@include ../user/bsp.texi
-@include ../user/userext.texi
-@include ../user/conf.texi
-@include ../user/mp.texi
-@include ../user/dirstat.texi
-@include example.texi
-@include ../user/glossary.texi
-@ifinfo
-@node Top, Preface, (dir), (dir)
-@top ada_user
-
-This is the online version of the RTEMS Ada User's Guide.
-
-@menu
-* Preface::
-* Overview::
-* Key Concepts::
-* Initialization Manager::
-* Task Manager::
-* Interrupt Manager::
-* Clock Manager::
-* Timer Manager::
-* Semaphore Manager::
-* Message Manager::
-* Event Manager::
-* Signal Manager::
-* Partition Manager::
-* Region Manager::
-* Dual-Ported Memory Manager::
-* I/O Manager::
-* Fatal Error Manager::
-* Scheduling Concepts::
-* Rate Monotonic Manager::
-* Board Support Packages::
-* User Extensions Manager::
-* Configuring a System::
-* Multiprocessing Manager::
-* Directive Status Codes::
-* Example Application::
-* Glossary::
-* Command and Variable Index::
-* Concept Index::
-@end menu
-
-@end ifinfo
-@c
-@c
-@c Need to copy the emacs stuff and "trailer stuff" (index, toc) into here
-@c
-
-@node Command and Variable Index, Concept Index, Glossary, Top
-@unnumbered Command and Variable Index
-
-@c There are currently no Command and Variable Index entries.
-
-@printindex fn
-
-@node Concept Index, , Command and Variable Index, Top
-@unnumbered Concept Index
-
-@c There are currently no Concept Index entries.
-@printindex cp
-
-@contents
-@bye
-
diff --git a/doc/ada_user/example.texi b/doc/ada_user/example.texi
deleted file mode 100644
index 8aa9a80899..0000000000
--- a/doc/ada_user/example.texi
+++ /dev/null
@@ -1,21 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@ifinfo
-@node Example Application, Glossary, Directive Status Codes, Top
-@end ifinfo
-@chapter Example Application
-
-@example
-
-Currently there is no example Ada application provided.
-
-@end example
-
-
-
diff --git a/doc/archgrey.gif b/doc/archgrey.gif
deleted file mode 100644
index d315b028f2..0000000000
--- a/doc/archgrey.gif
+++ /dev/null
Binary files differ
diff --git a/doc/bsp_howto/Makefile b/doc/bsp_howto/Makefile
deleted file mode 100644
index 0e12e674b3..0000000000
--- a/doc/bsp_howto/Makefile
+++ /dev/null
@@ -1,152 +0,0 @@
-#
-# COPYRIGHT (c) 1988-1999.
-# On-Line Applications Research Corporation (OAR).
-# All rights reserved.
-#
-# $Id$
-#
-
-PROJECT=bsp_howto
-
-include ../Make.config
-
-all: html info ps pdf
-
-dirs:
- $(make-dirs)
-
-COMMON_FILES=../common/cpright.texi ../common/setup.texi
-
-GENERATED_FILES= \
- intro.texi target.texi makefiles.texi linkcmds.texi support.texi \
- adaintr.texi init.texi console.texi clock.texi timer.texi rtc.texi \
- nvmem.texi network.texi shmsupp.texi analog.texi discrete.texi
-
-FILES=$(PROJECT).texi $(GENERATED_FILES)
-
-INFOFILES=$(wildcard $(PROJECT) $(PROJECT)-*)
-
-info: dirs $(PROJECT)
- #cp $(wildcard $(PROJECT) $(PROJECT)-*) $(INFO_INSTALL)
- # cp $(PROJECT) $(INFO_INSTALL)
-
-$(PROJECT): $(FILES)
- $(MAKEINFO) $(PROJECT).texi
-
-dvi: dirs $(PROJECT).dvi
-ps: dirs $(PROJECT).ps
-pdf: dirs $(PROJECT).pdf
-
-$(PROJECT).pdf: $(FILES)
- $(TEXI2PDF) $(PROJECT).texi
- cp $(PROJECT).pdf $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).ps: $(PROJECT).dvi
- dvips -o $(PROJECT).ps $(PROJECT).dvi
- cp $(PROJECT).ps $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).dvi: $(FILES)
- $(TEXI2DVI) $(PROJECT).texi
- cp $(PROJECT).dvi $(WWW_INSTALL)/$(PROJECT)
-
-html: dirs $(FILES)
- -mkdir -p $(WWW_INSTALL)/$(PROJECT)
- $(TEXI2WWW) $(TEXI2WWW_ARGS) -dir $(WWW_INSTALL)/$(PROJECT) \
- $(PROJECT).texi
-
-clean:
- rm -f *.o $(PROG) *.txt core $(PROJECT).pdf
- rm -f *.dvi *.ps *.log *.aux *.cp *.fn *.ky *.pg *.toc *.tp *.vr $(BASE)
- rm -f $(PROJECT) $(PROJECT)-* $(GENERATED_FILES)
- rm -f *.fixed _* network.t
-
-#
-# Grab the chapter on writing a network device driver.
-#
-network.t:
- ln -s ../networking/driver.t network.t
-
-
-#
-# Process Automatically Generated Files
-#
-
-intro.texi: intro.t Makefile
- $(BMENU) -p "Top" \
- -u "Top" \
- -n "Target Dependent Files" ${*}.t
-
-target.texi: target.t Makefile
- $(BMENU) -p "Introduction" \
- -u "Top" \
- -n "Makefiles" ${*}.t
-
-makefiles.texi: makefiles.t Makefile
- $(BMENU) -p "Target Dependent Files Board Support Package Structure" \
- -u "Top" \
- -n "Linker Script" ${*}.t
-
-linkcmds.texi: linkcmds.t Makefile
- $(BMENU) -p "Makefiles Creating a New BSP Make Customization File" \
- -u "Top" \
- -n "Ada95 Interrupt Support" ${*}.t
-
-adaintr.texi: adaintr.t Makefile
- $(BMENU) -p "Linker Script Initialized Data" \
- -u "Top" \
- -n "Miscellaneous Support Files" ${*}.t
-
-support.texi: support.t Makefile
- $(BMENU) -p "Ada95 Interrupt Support Version Requirements" \
- -u "Top" \
- -n "" ${*}.t
-
-init.texi: init.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-console.texi: console.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-clock.texi: clock.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-timer.texi: timer.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-rtc.texi: rtc.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-nvmem.texi: nvmem.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-network.texi: network.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-shmsupp.texi: shmsupp.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-analog.texi: analog.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-discrete.texi: discrete.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
diff --git a/doc/bsp_howto/adaintr.t b/doc/bsp_howto/adaintr.t
deleted file mode 100644
index 7ca60da21e..0000000000
--- a/doc/bsp_howto/adaintr.t
+++ /dev/null
@@ -1,81 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Ada95 Interrupt Support
-
-@section Introduction
-
-This chapter describes what is required to enable Ada interrupt
-and error exception handling when using GNAT over RTEMS.
-
-The GNAT Ada95 interrupt support RTEMS was developed by
-Jiri Gaisler <jgais@@ws.estec.esa.nl> who also wrote this
-chapter.
-
-@section Mapping Interrupts to POSIX Signals
-
-In Ada95, interrupts can be attached with the interrupt_attach pragma.
-For most systems, the gnat run-time will use POSIX signal to implement
-the interrupt handling, mapping one signal per interrupt. For interrupts
-to be propagated to the attached Ada handler, the corresponding signal
-must be raised when the interrupt occurs.
-
-The same mechanism is used to generate Ada error exceptions.
-Three error exceptions are defined: program, constraint and storage
-error. These are generated by raising the predefined signals: SIGILL,
-SIGFPE and SIGSEGV. These signals should be raised when a spurious
-or erroneous trap occurs.
-
-To enable gnat interrupt and error exception support for a particular
-bsp, the following has to be done:
-
-@enumerate
-
-@item Write an interrupt/trap handler that will raise the corresponding
-signal depending on the interrupt/trap number.
-
-@item Install the interrupt handler for all interrupts/traps that will be
-handled by gnat (including spurious).
-
-@item At startup, gnat calls @code{__gnat_install_handler()}. The bsp
-must provide this function which installs the interrupt/trap handlers.
-
-@end enumerate
-
-Which cpu-interrupt will generate which signal is implementation
-defined. There are 32 POSIX signals (1 - 32), and all except the
-three error signals (SIGILL, SIGFPE and SIGSEGV) can be used. I
-would suggest to use the upper 16 (17 - 32) which do not
-have an assigned POSIX name.
-
-Note that the pragma interrupt_attach will only bind a signal
-to a particular Ada handler - it will not unmask the
-interrupt or do any other things to enable it. This have to be
-done separately, typically by writing various device register.
-
-@section Example Ada95 Interrupt Program
-
-An example program (@code{irq_test}) is included in the
-Ada examples package to show how interrupts can be handled
-in Ada95. Note that generation of the test interrupt
-(@code{irqforce.c}) is bsp specific and must be edited.
-
-NOTE: The @code{irq_test} example was written for the SPARC/ERC32
-BSP.
-
-@section Version Requirements
-
-With RTEMS 4.0, a patch was required to psignal.c in RTEMS
-sources (to correct a bug associated to the default action of
-signals 15-32). The SPARC/ERC32 RTEMS BSP includes the
-@code{gnatsupp} subdirectory that can be used as an example
-for other BSPs.
-
-With GNAT 3.11p, a patch is required for @code{a-init.c} to invoke
-the BSP specific routine that installs the exception handlers.
-
diff --git a/doc/bsp_howto/analog.t b/doc/bsp_howto/analog.t
deleted file mode 100644
index 45c3a538da..0000000000
--- a/doc/bsp_howto/analog.t
+++ /dev/null
@@ -1,167 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Analog Driver
-
-The Analog driver is responsible for providing an
-interface to Digital to Analog Converters (DACs) and
-Analog to Digital Converters (ADCs). The capabilities provided
-by this class of device driver are:
-
-@itemize @bullet
-@item Initialize an Analog Board
-@item Open a Particular Analog
-@item Close a Particular Analog
-@item Read from a Particular Analog
-@item Write to a Particular Analog
-@item Reset DACs
-@item Reinitialize DACS
-@end itemize
-
-Most analog devices are found on I/O cards that support multiple
-DACs or ADCs on a single card.
-
-There are currently no analog device drivers included in the
-RTEMS source tree. The information provided in this chapter
-is based on drivers developed by OAR Corporation personnel
-for applications using RTEMS. It is hoped that this
-driver model information can form the basis for a standard
-analog driver model that can be supported in future RTEMS
-distribution.
-
-@section Major and Minor Numbers
-
-The @b{major} number of a device driver is its index in the
-RTEMS Device Address Table.
-
-A @b{minor} number is associated with each device instance
-managed by a particular device driver. An RTEMS minor number
-is an @code{unsigned32} entity. Convention calls
-dividing the bits in the minor number down into categories
-like the following:
-
-@itemize @bullet
-
-@item @b{board} - indicates the board a particular device is located on
-@item @b{port} - indicates the particular device on a board.
-
-@end itemize
-
-From the above, it should be clear that a single device driver
-can support multiple copies of the same board in a single system.
-The minor number is used to distinguish the devices.
-
-@section Analog Driver Configuration
-
-There is not a standard analog driver configuration table but some
-fields are common across different drivers. The analog driver
-configuration table is typically an array of structures with each
-structure containing the information for a particular board.
-The following is a list of the type of information normally required
-to configure an analog board:
-
-@table @b
-@item board_offset
-is the base address of a board.
-
-@item DAC_initial_values
-is an array of the voltages that should be written to each DAC
-during initialization. This allows the driver to start the board
-in a known state.
-
-@end table
-
-@section Initialize an Analog Board
-
-At system initialization, the analog driver's initialization entry point
-will be invoked. As part of initialization, the driver will perform
-whatever board initialization is required and then set all
-outputs to their configured initial state.
-
-The analog driver may register a device name for each DAC and ADC in
-the system.
-
-@section Open a Particular Analog
-
-This is the driver open call. Usually this call does nothing other than
-validate the minor number.
-
-With some drivers, it may be necessary to allocate memory when a particular
-device is opened. If that is the case, then this is often the place
-to do this operation.
-
-@section Close a Particular Analog
-
-This is the driver close call. Usually this call does nothing.
-
-With some drivers, it may be necessary to allocate memory when a particular
-device is opened. If that is the case, then this is the place
-where that memory should be deallocated.
-
-@section Read from a Particular Analog
-
-This corresponds to the driver read call. After validating the minor
-number and arguments, this call reads the indicated device. Most analog
-devices store the last value written to a DAC. Since DACs are output
-only devices, saving the last written value gives the appearance that
-DACs can be read from also. If the device is an ADC, then it is sampled.
-
-@b{NOTE:} Many boards have multiple analog inputs but only one ADC. On
-these boards, it will be necessary to provide some type of mutual exclusion
-during reads. On these boards, there is a MUX which must be switched
-before sampling the ADC. After the MUX is switched, the driver must
-delay some short period of time (usually microseconds) before the
-signal is stable and can be sampled. To make matters worse, some ADCs
-cannot respond to wide voltage swings in a single sample. On these
-ADCs, one must do two samples when the voltage swing is too large.
-On a practical basis, this means that the driver usually ends up
-double sampling the ADC on these systems.
-
-The value returned is a single precision floating point number
-representing the voltage read. This value is stored in the
-@code{argument_block} passed in to the call. By returning the
-voltage, the caller is freed from having to know the number of
-bits in the analog and board dependent conversion algorithm.
-
-@section Write to a Particular Analog
-
-This corresponds to the driver write call. After validating the minor
-number and arguments, this call writes the indicated device. If the
-specified device is an ADC, then an error is usually returned.
-
-The value written is a single precision floating point number
-representing the voltage to be written to the specified DAC.
-This value is stored in the @code{argument_block} passed in to the
-call. By passing the voltage to the device driver, the caller is
-freed from having to know the number of bits in the analog
-and board dependent conversion algorithm.
-
-@section Reset DACs
-
-This is one of the IOCTL functions supported by the I/O control
-device driver entry point. When this IOCTL function is invoked,
-all of the DACs are written to 0.0 volts.
-
-@section Reinitialize DACS
-
-This is one of the IOCTL functions supported by the I/O control
-device driver entry point. When this IOCTL function is invoked,
-all of the DACs are written with the initial value configured
-for this device.
-
-@section Get Last Written Values
-
-This is one of the IOCTL functions supported by the I/O control
-device driver entry point. When this IOCTL function is invoked,
-the following information is returned to the caller:
-
-@itemize @bullet
-@item last value written to the specified DAC
-@item timestamp of when the last write was performed
-@end itemize
-
diff --git a/doc/bsp_howto/bsp_howto.texi b/doc/bsp_howto/bsp_howto.texi
deleted file mode 100644
index 7980143011..0000000000
--- a/doc/bsp_howto/bsp_howto.texi
+++ /dev/null
@@ -1,130 +0,0 @@
-\input texinfo @c -*-texinfo-*-
-@c %**start of header
-@setfilename bsp_howto
-@syncodeindex vr fn
-@synindex ky cp
-@paragraphindent 0
-@c @smallbook
-@c %**end of header
-
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@c
-@c Master file for the Getting Started (C) Guide
-@c
-
-@include ../common/setup.texi
-
-@ignore
-@ifinfo
-@format
-START-INFO-DIR-ENTRY
-* BSP and Device Driver Development Guide (bsp_howto):
-END-INFO-DIR-ENTRY
-@end format
-@end ifinfo
-@end ignore
-
-@c
-@c Title Page Stuff
-@c
-
-@set edition @value{RTEMS-EDITION}
-@set version @value{RTEMS-VERSION}
-@set update-date @value{RTEMS-UPDATE-DATE}
-@set update-month @value{RTEMS-UPDATE-MONTH}
-
-@c
-@c I don't really like having a short title page. --joel
-@c
-@c @shorttitlepage BSP and Device Driver Development Guide
-
-@setchapternewpage odd
-@settitle BSP and Device Driver Development Guide
-@titlepage
-@finalout
-
-@title BSP and Device Driver Development Guide
-@subtitle Edition @value{edition}, for @value{version}
-@sp 1
-@subtitle @value{update-month}
-@author On-Line Applications Research Corporation
-@page
-@include ../common/cpright.texi
-@end titlepage
-
-@c This prevents a black box from being printed on "overflow" lines.
-@c The alternative is to rework a sentence to avoid this problem.
-
-@include intro.texi
-@include target.texi
-@include makefiles.texi
-@include linkcmds.texi
-@include support.texi
-@include adaintr.texi
-@include init.texi
-@include console.texi
-@include clock.texi
-@include timer.texi
-@include rtc.texi
-@include nvmem.texi
-@include network.texi
-@include shmsupp.texi
-@include analog.texi
-@include discrete.texi
-
-@ifinfo
-@node Top, Introduction, (dir), (dir)
-@top bsp_howto
-
-This is the online version of the RTEMS BSP and Device Driver Development Guide.
-
-@menu
-* Introduction::
-* Target Dependent Files::
-* Makefiles::
-* Linker Script::
-* Miscellaneous Support Files::
-* Ada95 Interrupt Support::
-* Initialization Code::
-* Console Driver::
-* Clock Driver::
-* Timer Driver::
-* Real-Time Clock Driver::
-* Networking Driver::
-* Non-Volatile Memory Driver::
-* Shared Memory Support Driver::
-* Analog Driver::
-* Discrete Driver::
-* Command and Variable Index::
-* Concept Index::
-@end menu
-
-@end ifinfo
-@c
-@c
-@c Need to copy the emacs stuff and "trailer stuff" (index, toc) into here
-@c
-
-@node Command and Variable Index, Concept Index, , Top
-@unnumbered Command and Variable Index
-
-There are currently no Command and Variable Index entries.
-
-@c @printindex fn
-
-@node Concept Index, , Command and Variable Index, Top
-@unnumbered Concept Index
-
-There are currently no Concept Index entries.
-@c @printindex cp
-
-@contents
-@bye
-
diff --git a/doc/bsp_howto/clock.t b/doc/bsp_howto/clock.t
deleted file mode 100644
index e4e24cfade..0000000000
--- a/doc/bsp_howto/clock.t
+++ /dev/null
@@ -1,132 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Clock Driver
-
-@section Introduction
-
-The purpose of the clock driver is to provide a steady time
-basis to the kernel, so that the RTEMS primitives that need
-a clock tick work properly. See the @code{Clock Manager} chapter
-of the @b{RTEMS Application C User's Guide} for more details.
-
-The clock driver is located in the @code{clock} directory of the BSP.
-
-@section Clock Driver Global Variables
-
-This section describes the global variables expected to be provided by
-this driver.
-
-@subsection Major and Minor Number
-
-The major and minor numbers of the clock driver are made available via
-the following variables.
-
-@itemize @bullet
-@item rtems_device_major_number rtems_clock_major;
-@item rtems_device_minor_number rtems_clock_minor;
-@end itemize
-
-The clock device driver is responsible for declaring and
-initializing these variables. These variables are used
-by other RTEMS components -- notably the Shared Memory Driver.
-
-@b{NOTE:} In a future RTEMS version, these variables may be replaced
-with the clock device driver registering @b{/dev/clock}.
-
-@subsection Ticks Counter
-
-Most of the clock device drivers provide a global variable
-that is simply a count of the number of clock driver interrupt service
-routines that have occured. This information is valuable when debugging
-a system. This variable is declared as follows:
-
-@example
-volatile rtems_unsigned32 Clock_driver_ticks;
-@end example
-
-@section Initialization
-
-The initialization routine is responsible for
-programming the hardware that will periodically
-generate an interrupt. A programmable interval timer is commonly
-used as the source of the clock tick.
-
-The device should be programmed such that an interrupt is generated
-every @i{m} microseconds, where @i{m} is equal to
-@code{BSP_Configuration.microseconds_per_tick}. Sometimes the periodic interval
-timer can use a prescaler so you have to look carefully at your user's
-manual to determine the correct value.
-
-You must use the RTEMS primitive @code{rtems_interrupt_catch} to install
-your clock interrupt service routine:
-
-@example
-rtems_interrupt_catch (Clock_ISR, CLOCK_VECTOR, &old_handler);
-@end example
-
-Since there is currently not a driver entry point invoked at system
-shutdown, many clock device drivers use the @code{atexit} routine
-to schedule their @code{Clock_exit} routine to execute when the
-system is shutdown.
-
-By convention, many of the clock drivers do not install the clock
-tick if the @code{ticks_per_timeslice} field of the Configuration
-Table is 0.
-
-@section System shutdown
-
-Many drivers provide the routine @code{Clock_exit} that is scheduled
-to be run during system shutdown via the @code{atexit} routine.
-The @code{Clock_exit} routine will disable the clock tick source
-if it was enabled. This can be used to prevent clock ticks after the
-system is shutdown.
-
-@section Clock Interrupt Subroutine
-
-It only has to inform the kernel that a ticker has elapsed, so call :
-
-@example
-@group
-rtems_isr Clock_isr( rtems_vector_number vector )
-@{
- invoke the rtems_clock_tick() directive to announce the tick
- if necessary for this hardware
- reload the programmable timer
-@}
-@end group
-@end example
-
-@section IO Control
-
-The clock driver must supply a handler for the IO control device driver
-entry point. This functionality is used by other components -- notably
-the Shared Memory Driver to install a wrapper for the clock interrupt
-service routine. The following shows the functionality required:
-
-@example
-@group
-rtems_device_driver Clock_control(
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void *pargp
-)
-@{
- error check the argument pointer parameter
-
- if the command is "ISR"
- invoke the clock interrupt service routine
- else if the command is "NEW"
- install the requested handler
-@}
-@end group
-@end example
-
-
-
-
diff --git a/doc/bsp_howto/console.t b/doc/bsp_howto/console.t
deleted file mode 100644
index 2ffef13686..0000000000
--- a/doc/bsp_howto/console.t
+++ /dev/null
@@ -1,377 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Console Driver
-
-@section Introduction
-
-This chapter describes the operation of a console driver using
-the RTEMS POSIX Termios support. Traditionally RTEMS has referred
-to all serial device drivers as console device drivers. A
-console driver can be used to do raw data processing in addition
-to the "normal" standard input and output device functions required
-of a console.
-
-The serial driver may be called as the consequence of a C Library
-call such as @code{printf} or @code{scanf} or directly via the
-@code{read} or @code{write} system calls.
-There are two main functioning modes:
-
-@itemize @bullet
-
-@item console: formatted input/output, with special characters (end of
-line, tabulations, etc.) recognition and processing,
-
-@item raw: permits raw data processing.
-
-@end itemize
-
-One may think that two serial drivers are needed to handle these two types
-of data, but Termios permits having only one driver.
-
-@section Termios
-
-Termios is a standard for terminal management, included in the POSIX 1003.1b
-standard. It is commonly provided on UNIX implementations.
-Having RTEMS support for Termios is beneficial:
-
-@itemize @bullet
-
-@item from the user's side because it provides standard primitive operations
-to access the terminal and change configuration settings. These operations
-are the same under Unix and Rtems.
-
-@item from the BSP developer's side because it frees the
-developer from dealing with buffer states and mutual exclusions on them.
-Early RTEMS console device drivers also did their own special
-character processing.
-
-@end itemize
-
-Termios support includes:
-
-@itemize @bullet
-
-@item raw and console handling,
-
-@item blocking or non-blocking characters receive, with or without
-Timeout.
-
-@end itemize
-
-At this time, RTEMS documentation does not include a thorough discussion
-of the Termios functionality. For more information on Termios,
-type @code{man termios} on a Unix box or point a web browser
-at
-@uref{http://www.freebsd.org/cgi/man.cgi}.
-
-@section Driver Functioning Modes
-
-There are generally two main functioning modes for an UART (Universal
-Asynchronous Receiver-Transmitter, i.e. the serial chip):
-
-@itemize @bullet
-
-@item polled mode
-@item interrupt driven mode
-
-@end itemize
-
-In polled mode, the processor blocks on sending/receiving characters.
-This mode is not the most efficient way to utilize the UART. But
-polled mode is usually necessary when one wants to print an
-error message in the event of a fatal error such as a fatal error
-in the BSP. This is also the simplest mode to
-program. Polled mode is generally preferred if the serial port is
-to be used primarily as a debug console. In a simple polled driver,
-the software will continuously check the status of the UART when
-it is reading or writing to the UART. Termios improves on this
-by delaying the caller for 1 clock tick between successive checks
-of the UART on a read operation.
-
-In interrupt driven mode, the processor does not block on sending/receiving
-characters. Data is buffered between the interrupt service routine
-and application code. Two buffers are used to insulate the application
-from the relative slowness of the serial device. One of the buffers is
-used for incoming characters, while the other is used for outgoing characters.
-
-An interrupt is raised when a character is received by the UART.
-The interrupt subroutine places the incoming character at the end
-of the input buffer. When an application asks for input,
-the characters at the front of the buffer are returned.
-
-When the application prints to the serial device, the outgoing characters
-are placed at the end of the output buffer. The driver will place
-one or more characters in the UART (the exact number depends on the UART)
-An interrupt will be raised when all the characters have been transmitted.
-The interrupt service routine has to send the characters
-remaining in the output buffer the same way. When the transmitting side
-of the UART is idle, it is typically necessary to prime the transmitter
-before the first interrupt will occur.
-
-@section Serial Driver Functioning Overview
-
-The following Figure shows how a Termios driven serial driver works:
-
-@example
-Figure not included in this draft
-@end example
-
-The following list describes the basic flow.
-
-@itemize @bullet
-
-@item the application programmer uses standard C library call (printf,
-scanf, read, write, etc.),
-
-@item C library (in fact that's Cygnus Newlib) calls RTEMS
-system call interface. This code can be found in the
-@code{c/src/lib/libc} directory.
-
-@item Glue code calls the serial driver entry routines.
-
-@end itemize
-
-@subsection Termios and Polled I/O
-
-The following functions are provided by the driver and invoked by
-Termios for simple character input/output. The specific names of
-these routines are not important as Termios invokes them indirectly
-via function pointers.
-
-@subsubsection pollWrite
-
-The @code{pollWrite} routine is responsible for writing @code{len} characters
-from @code{buf} to the serial device specified by @code{minor}.
-
-@example
-@group
-int pollWrite (int minor, const char *buf, int len)
-@{
- for (i=0; i<len; i++) @{
- put buf[i] into the UART channel minor
- wait for the character to be transmitted
- on the serial line
- @}
- return 0
-@}
-@end group
-@end example
-
-@subsubsection pollRead
-
-The @code{pollRead} routine is responsible for reading a single character
-from the serial device specified by @code{minor}. If no character is
-available, then the routine should return -1.
-
-@example
-@group
-int pollRead(int minor)
-@{
- read status of UART
- if status indicates a character is available
- return character
- return -1
-@}
-@end group
-@end example
-
-@subsection Termios and Interrupt Driven I/O
-
-The UART generally generates interrupts when it is ready to accept or to
-emit a number of characters. In this mode, the interrupt subroutine is the
-core of the driver.
-
-@subsubsection InterruptHandler
-
-The @code{InterruptHandler} is responsible for processing asynchronous
-interrupts from the UART. There may be multiple interrupt handlers for
-a single UART. Some UARTs can generate a unique interrupt vector for
-each interrupt source such as a character has been received or the
-transmitter is ready for another character.
-
-In the simplest case, the @code{InterruptHandler} will have to check
-the status of the UART and determine what caused the interrupt.
-The following describes the operation of an @code{InterruptHandler}
-which has to do this:
-
-@example
-@group
-rtems_isr InterruptHandler (rtems_vector_number v)
-@{
- check whether there was an error
-
- if some characters were received:
- Ask Termios to put them on his input buffer
-
- if some characters have been transmitted
- (i.e. the UART output buffer is empty)
- Tell TERMIOS that the characters have been
- transmitted. The TERMIOS routine will call
- the InterruptWrite function with the number
- of characters not transmitted yet if it is
- not zero.
-@}
-@end group
-@end example
-
-@subsubsection InterruptWrite
-
-The @code{InterruptWrite} is responsible for telling the UART
-that the @code{len} characters at @code{buf} are to be transmitted.
-
-@example
-static int InterruptWrite(int minor, const char *buf, int len)
-@{
- tell the UART to transmit len characters from buf
- return 0
-@}
-@end example
-
-The driver has to put the @i{n} first buf characters in the UART channel minor
-buffer (@i{n} is the UART channel size, @i{n}=1 on the MC68640). Generally, an
-interrupt is raised after these @i{n} characters being transmitted. So
-UART interrupts may have to be enabled after putting the characters in the
-UART.
-
-
-@subsection Initialization
-
-The driver initialization is called once during the RTEMS initialization
-process.
-
-The @code{console_initialize} function has to:
-
-@itemize @bullet
-
-@item initialize Termios support: call @code{rtems_termios_initialize()}. If
-Termios has already been initialized by another device driver, then
-this call will have no effect.
-
-@item Initialize the UART: This procedure should
-be described in the UART manual. This procedure @b{MUST} be
-followed precisely. This procedure varies but
-usually consists of:
-
-@itemize @bullet
-@item reinitialize the UART channels
-
-@item set the channels configuration to the Termios default:
-9600 bauds, no parity, 1 stop bit, and 8 bits per character
-@end itemize
-
-@item If interrupt driven, register the console interrupt routine to RTEMS:
-
-@example
-rtems_interrupt_catch(
- InterruptHandler, CONSOLE_VECTOR, &old_handler);
-@end example
-
-@item enable the UART channels.
-
-@item register the device name: in order to use the console (i.e. being
-able to do printf/scanf on stdin, stdout, and stderr), some device
-must be registered as "/dev/console":
-
-@example
-rtems_io_register_name ("dev/console", major, i);
-@end example
-
-@end itemize
-
-@subsection Opening a serial device
-
-The @code{console_open} function is called whenever a serial
-device is opened. The device registered as @code{"/dev/console"}
-is opened automatically during RTEMS initialization.
-For instance, if UART channel 2 is registered as "/dev/tty1",
-the @code{console_open} entry point will be called as
-the result of an @code{fopen("/dev/tty1", mode)} in the
-application.
-
-The @code{console_open} function has to inform Termios of the low-level
-functions for serial line support; the "callbacks".
-
-The gen68340 BSP defines two sets of callback tables:
-
-@itemize @bullet
-
-@item one with functions for polled input/output
-
-@item another with functions for interrupt driven input/output
-
-@end itemize
-
-This code can be found in the file @code{$BSPROOT/console/console.c}.
-
-@subsubsection Polled I/O
-
-Termios must be told the addresses of the functions that are to be
-used for simple character input/output, i.e. pointers to the
-@code{pollWrite} and @code{pollRead} functions
-defined earlier in @ref{Console Driver Termios and Polled I/O}.
-
-@subsubsection Interrupt Driven I/O
-
-Driver functioning is quite different in this mode. There is no
-device driver read function to be passed to Termios. Indeed a
-@code{console_read} call returns the contents of Termios input buffer.
-This buffer is filled in the driver interrupt subroutine
-(see @ref{Console Driver Termios and Interrupt Driven I/O}).
-
-The driver is responsible for providing a pointer to the
-@code{InterruptWrite} function.
-
-@subsection Closing a Serial Device
-
-The @code{console_close} is invoked when the serial device is to
-be closed. This entry point corresponds to the device driver
-close entry point.
-
-This routine is responsible for notifying Termios that the serial
-device was closed. This is done with a call to @code{rtems_termios_close}.
-
-@subsection Reading Characters From a Serial Device
-
-The @code{console_read} is invoked when the serial device is to
-be read from. This entry point corresponds to the device driver
-read entry point.
-
-This routine is responsible for returning the content of the
-Termios input buffer. This is done by invoking the
-@code{rtems_termios_read} routine.
-
-@subsection Writing Characters to a Serial Device
-
-The @code{console_write} is invoked when the serial device is to
-be written to. This entry point corresponds to the device driver
-write entry point.
-
-This routine is responsible for adding the requested characters to
-the Termios output queue for this device. This is done by
-calling the routine @code{rtems_termios_write}
-to add the characters at the end of the Termios output
-buffer.
-
-@subsection Changing Serial Line Parameters
-
-The @code{console_control} is invoked when the line parameters
-for a particular serial device are to be changed.
-This entry point corresponds to the device driver
-io_control entry point.
-
-The application write is able to control the serial line configuration
-with Termios calls (such as the @code{ioctl} command, see
-the Termios documentation for
-more details). If the driver is to support dynamic configuration, then
-is must have the @code{console_control} piece of code. Refer to the gen68340
-BSP for an example of how it is done. Basically @code{ioctl}
-commands call @code{console_control} with the serial line
-configuration in a Termios defined data structure. The driver
-is responsible for reinitializing the UART with the correct settings.
-
diff --git a/doc/bsp_howto/discrete.t b/doc/bsp_howto/discrete.t
deleted file mode 100644
index 23f9d65ce7..0000000000
--- a/doc/bsp_howto/discrete.t
+++ /dev/null
@@ -1,187 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Discrete Driver
-
-The Discrete driver is responsible for providing an
-interface to Discrete Input/Outputs. The capabilities provided
-by this class of device driver are:
-
-@itemize @bullet
-@item Initialize a Discrete I/O Board
-@item Open a Particular Discrete Bitfield
-@item Close a Particular Discrete Bitfield
-@item Read from a Particular Discrete Bitfield
-@item Write to a Particular Discrete Bitfield
-@item Reset DACs
-@item Reinitialize DACS
-@end itemize
-
-Most discrete I/O devices are found on I/O cards that support many
-bits of discrete I/O on a single card. This driver model is centered
-on the notion of reading bitfields from the card.
-
-There are currently no discrete I/O device drivers included in the
-RTEMS source tree. The information provided in this chapter
-is based on drivers developed by OAR Corporation personnel
-for applications using RTEMS. It is hoped that this
-driver model information can form the basis for a standard
-discrete I/O driver model that can be supported in future RTEMS
-distribution.
-
-@section Major and Minor Numbers
-
-The @b{major} number of a device driver is its index in the
-RTEMS Device Address Table.
-
-A @b{minor} number is associated with each device instance
-managed by a particular device driver. An RTEMS minor number
-is an @code{unsigned32} entity. Convention calls for
-dividing the bits in the minor number down into categories
-that specify a particular bitfield. This results in categories
-like the following:
-
-@itemize @bullet
-
-@item @b{board} - indicates the board a particular bitfield is located on
-@item @b{word} - indicates the particular word of discrete bits the
-bitfield is located within
-@item @b{start} - indicates the starting bit of the bitfield
-@item @b{width} - indicates the width of the bitfield
-
-@end itemize
-
-From the above, it should be clear that a single device driver
-can support multiple copies of the same board in a single system.
-The minor number is used to distinguish the devices.
-
-By providing a way to easily access a particular bitfield from
-the device driver, the application is insulated with knowing how
-to mask fields in and out of a discrete I/O.
-
-@section Discrete I/O Driver Configuration
-
-There is not a standard discrete I/O driver configuration table but some
-fields are common across different drivers. The discrete I/O driver
-configuration table is typically an array of structures with each
-structure containing the information for a particular board.
-The following is a list of the type of information normally required
-to configure an discrete I/O board:
-
-@table @b
-@item board_offset
-is the base address of a board.
-
-@item relay_initial_values
-is an array of the values that should be written to each output
-word on the board during initialization. This allows the driver
-to start with the board's output in a known state.
-
-@end table
-
-@section Initialize a Discrete I/O Board
-
-At system initialization, the discrete I/O driver's initialization entry point
-will be invoked. As part of initialization, the driver will perform
-whatever board initializatin is required and then set all
-outputs to their configured initial state.
-
-The discrete I/O driver may register a device name for bitfields of
-particular interest to the system. Normally this will be restricted
-to the names of each word and, if the driver supports it, an "all words".
-
-@section Open a Particular Discrete Bitfield
-
-This is the driver open call. Usually this call does nothing other than
-validate the minor number.
-
-With some drivers, it may be necessary to allocate memory when a particular
-device is opened. If that is the case, then this is often the place
-to do this operation.
-
-@section Close a Particular Discrete Bitfield
-
-This is the driver close call. Usually this call does nothing.
-
-With some drivers, it may be necessary to allocate memory when a particular
-device is opened. If that is the case, then this is the place
-where that memory should be deallocated.
-
-@section Read from a Particular Discrete Bitfield
-
-This corresponds to the driver read call. After validating the minor
-number and arguments, this call reads the indicated bitfield. A
-discrete I/O devices may have to store the last value written to
-a discrete output. If the bitfield is output only, saving the last
-written value gives the appearance that it can be read from also.
-If the bitfield is input, then it is sampled.
-
-@b{NOTE:} Many discrete inputs have a tendency to bounce. The application
-may have to take account for bounces.
-
-The value returned is an @code{unsigned32} number
-representing the bitfield read. This value is stored in the
-@code{argument_block} passed in to the call.
-
-@b{NOTE:} Some discrete I/O drivers have a special minor number
-used to access all discrete I/O bits on the board. If this special
-minor is used, then the area pointed to by @code{argument_block} must
-be the correct size.
-
-@section Write to a Particular Discrete Bitfield
-
-This corresponds to the driver write call. After validating the minor
-number and arguments, this call writes the indicated device. If the
-specified device is an ADC, then an error is usually returned.
-
-The value written is an @code{unsigned32} number
-representing the value to be written to the specified
-bitfield. This value is stored in the
-@code{argument_block} passed in to the call.
-
-@b{NOTE:} Some discrete I/O drivers have a special minor number
-used to access all discrete I/O bits on the board. If this special
-minor is used, then the area pointed to by @code{argument_block} must
-be the correct size.
-
-@section Disable Discrete Outputs
-
-This is one of the IOCTL functions supported by the I/O control
-device driver entry point. When this IOCTL function is invoked,
-the discrete outputs are disabled.
-
-@b{NOTE:} It may not be possible to disable/enable discrete output on all
-discrete I/O boards.
-
-@section Enable Discrete Outputs
-
-This is one of the IOCTL functions supported by the I/O control
-device driver entry point. When this IOCTL function is invoked,
-the discrete outputs are enabled.
-
-@b{NOTE:} It may not be possible to disable/enable discrete output on all
-discrete I/O boards.
-
-@section Reinitialize Outputs
-
-This is one of the IOCTL functions supported by the I/O control
-device driver entry point. When this IOCTL function is invoked,
-the discrete outputs are rewritten with the configured initial
-output values.
-
-@section Get Last Written Values
-
-This is one of the IOCTL functions supported by the I/O control
-device driver entry point. When this IOCTL function is invoked,
-the following information is returned to the caller:
-
-@itemize @bullet
-@item last value written to the specified output word
-@item timestamp of when the last write was performed
-@end itemize
-
diff --git a/doc/bsp_howto/init.t b/doc/bsp_howto/init.t
deleted file mode 100644
index ee67d59c11..0000000000
--- a/doc/bsp_howto/init.t
+++ /dev/null
@@ -1,430 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Initialization Code
-
-@section Introduction
-
-The initialization code is the first piece of code executed when there's a
-reset/reboot. Its purpose is to initialize the board for the application.
-This chapter contains a narrative description of the initialization
-process followed by a description of each of the files and routines
-commonly found in the BSP related to initialization. The remainder of
-this chapter covers special issues which require attention such
-as interrupt vector table and chip select initialization.
-
-Most of the examples in this chapter will be based on the gen68340 BSP
-initialization code. Like most BSPs, the initialization for this
-BSP is divided into two subdirectories under the BSP source directory.
-The gen68340 BSP source code is in the following directory:
-
-@example
-c/src/lib/libbsp/m68k/gen68340
-@end example
-
-The following source code files are in this subdirectory.
-
-@itemize @bullet
-
-@item @code{start340}: assembly language code which contains early
-initialization routines
-
-@item @code{startup}: C code with higher level routines (RTEMS
-initialization related)
-
-@end itemize
-
-@b{NOTE:} The directory @code{start340} is simply named @code{start} or
-start followed by a BSP designation.
-
-In the @code{start340} directory are two source files. The file
-@code{startfor340only.s} is the simpler of these files as it only has
-initialization code for a MC68340 board. The file @code{start340.s}
-contains initialization for a 68349 based board as well.
-
-@section Required Global Variables
-
-Although not strictly part of initialization, there are a few global
-variables assumed to exist by many support components. These
-global variables are usually declared in the file @code{startup/bspstart.c}
-that provides most of the BSP specific initialization. The following is
-a list of these global variables:
-
-@itemize @bullet
-@item @code{BSP_Configuration} is the BSP's writable copy of the RTEMS
-Configuration Table.
-
-@item @code{Cpu_table} is the RTEMS CPU Dependent Information Table.
-
-@item @code{bsp_isr_level} is the interrupt level that is set at
-system startup. It will be restored when the executive returns
-control to the BSP.
-
-@end itemize
-
-@section Board Initialization
-
-This section describes the steps an application goes through from the
-time the first BSP code is executed until the first application task
-executes. The routines invoked during this will be discussed and
-their location in the RTEMS source tree pointed out.
-
-@subsection Start Code - Assembly Language Initialization
-
-The assembly language code in the directory @code{start} is
-the first part of the application to execute. It is
-responsible for initializing the processor and board enough to execute
-the rest of the BSP. This includes:
-
-@itemize @bullet
-@item initializing the stack
-@item zeroing out the uninitialized data section @code{.bss}
-@item disabling external interrupts
-@item copy the initialized data from ROM to RAM
-@end itemize
-
-The general rule of thumb is that the
-start code in assembly should do the minimum necessary to allow C code
-to execute to complete the initialization sequence.
-
-The initial assembly language start code completes its execution by
-invoking the shared routine @code{boot_card()}.
-
-The label (symbolic name) associated with the starting address of the
-program is typically called @code{start}. The start object file
-is the first object file linked into the program image so it is insured
-that the start code is at offset 0 in the @code{.text} section. It is
-the responsibility of the linker script in conjunction with the
-compiler specifications file to put the start code in the correct location
-in the application image.
-
-@subsection boot_card() - Boot the Card
-
-The @code{boot_card()} is the first C code invoked. Most of the BSPs
-use the same shared version of @code{boot_card()} which is located in
-the following file:
-
-@example
-c/src/lib/libbsp/shared/main.c
-@end example
-
-The @code{boot_card()} routine performs the following functions:
-
-@itemize @bullet
-
-@item initializes the shared fields of the CPU Configuration Table
-(variable name @code{Cpu_table}) to a default state,
-
-@item copies the application's RTEMS Configuration Table
-(variable name @code{Configuration}) to the BSP's Configuration
-Table (variable name @code{BSP_Configuration}) so it can be modified
-as necessary without copying the original table,
-
-@item invokes the BSP specific routine @code{bsp_start()},
-
-@item invokes the RTEMS directive @code{rtems_initialize_executive_early()}
-to initialize the executive, C Library, and all device drivers but
-return without initiating multitasking or enabling interrupts,
-
-@item invokes the shared @code{main()} in the same file as
-@code{boot_card()} which does not return until the
-@code{rtems_shutdown_executive} directive is called, and
-
-@item invokes the BSP specific routine @code{bsp_cleanup()} to perform
-any necessary board specific shutdown actions.
-
-@end itemize
-
-It is important to note that the executive and much of the
-support environment must be initialized before invoking @code{main()}.
-
-@subsection bsp_start() - BSP Specific Initialization
-
-This is the first BSP specific C routine to execute during system
-initialization. This routine often performs required fundamental
-hardware initialization such as setting bus controller registers
-that do not have a direct impact on whether or not C code can execute.
-The source code for this routine is usually found in the following
-file:
-
-@example
-c/src/lib/libbsp/CPU/BSP/startup/bspstart.c
-@end example
-
-This routine is also responsible for overriding the default settings
-in the CPU Configuration Table and setting port specific entries
-in this table. This may include increasing the maximum number
-of some types of RTEMS system objects to reflect the needs of
-the BSP and the base set of device drivers. This routine will
-typically also install routines for one or more of the following
-initialization hooks:
-
-@itemize @bullet
-@item BSP Pretasking Hook
-@item BSP Predriver Hook
-@item BSP Postdriver Hook
-@end itemize
-
-One of the most important functions performed by this routine
-is determining where the RTEMS Workspace is to be
-located in memory. All RTEMS objects and task stacks will be
-allocated from this Workspace. The RTEMS Workspace is distinct
-from the application heap used for @code{malloc()}. Many BSPs
-place the RTEMS Workspace area at the end of RAM although this is
-certainly not a requirement.
-
-After completing execution, this routine returns to the
-@code{boot_card()} routine.
-
-@subsection main() - C Main
-
-This routine is the C main entry point. This is a special routine
-and the GNU Compiler Suite treats it as such. The GNU C Compiler
-recognizes @code{main()} and automatically inserts a call to the
-compiler run-time support routine @code{__main()} as the first
-code executed in @code{main()}.
-
-The routine @code{__main()} initializes the compiler's basic run-time
-support library and, most importantly, invokes the C++ global
-constructors.
-
-The precise placement of when @code{main()} is invoked in the
-RTEMS initialization sequence insures that C Library and non-blocking
-calls can be made in global C++ constructors.
-
-The shared implementation of this routine is located in the following file:
-
-@example
-c/src/lib/libbsp/shared/main.c
-@end example
-
-In addition to the implicit invocation of @code{__main}, this
-routine performs some explicit initialization. This routine
-sets the variable @code{rtems_progname} and initiates
-multitasking via a call to the RTEMS directive
-@code{rtems_initialize_executive_late}. It is important to note
-that the executive does not return to this routine until the
-RTEMS directive @code{rtems_shutdown_executive} is invoked.
-
-The RTEMS initialization procedure is described in the @b{Initialization
-Manager} chapter of the @b{RTEMS Application C User's Guide}.
-Please refer to that manual for more information.
-
-@subsection RTEMS Pretasking Callback
-
-The @code{pretasking_hook} entry in the RTEMS CPU Configuration
-Table may be the address of a user provided routine that is
-invoked once RTEMS API initialization is complete but before interrupts
-and tasking are enabled. No tasks -- not even the IDLE task -- have
-been created when this hook is invoked. The pretasking hook is optional.
-
-Although optional, most of the RTEMS BSPs provide a pretasking hook
-callback. This routine is usually called @code{bsp_pretasking_hook}
-and is found in the file:
-
-@example
-c/src/lib/libbsp/CPU/BSP/startup/bspstart.c
-@end example
-
-The @code{bsp_pretasking_hook()} routine is the appropriate place to
-initialize any support components which depend on the RTEMS APIs.
-Most BSPs set the debug level for the system and initialize the
-RTEMS C Library support in their
-implementation of @code{bsp_pretasking_hook()}. This initialization
-includes the application heap used by the @code{malloc} family
-of routines as well as the reentrancy support for the C Library.
-
-The routine @code{bsp_libc_init} routine invoked from the
-@code{bsp_pretasking_hook()} routine is passed the starting
-address, length, and growth amount passed to @code{sbrk}.
-This "sbrk amount" is only used if the heap runs out of
-memory. In this case, the RTEMS malloc implementation will
-invoked @code{sbrk} to obtain more memory. See
-@ref{Miscellaneous Support Files sbrk() Implementation} for more details.
-
-@subsection RTEMS Predriver Callback
-
-The @code{predriver_hook} entry in the RTEMS CPU Configuration
-Table may be the address of a user provided routine that is
-is invoked immediately before the the device drivers and MPCI
-are initialized. RTEMS
-initialization is complete but interrupts and tasking are disabled.
-This field may be NULL to indicate that the hook is not utilized.
-
-Most BSPs do not use this callback.
-
-@subsection Device Driver Initialization
-
-At this point in the initialization sequence, the initialization
-routines for all of the device drivers specified in the Device
-Driver Table are invoked. The initialization routines are invoked
-in the order they appear in the Device Driver Table.
-
-The Driver Address Table is part of the RTEMS Configuration Table. It
-defines device drivers entry points (initialization, open, close, read,
-write, and control). For more information about this table, please
-refer to the @b{Configuring a System} chapter in the
-@b{RTEMS Application C User's Guide}.
-
-The RTEMS initialization procedure calls the initialization function for
-every driver defined in the RTEMS Configuration Table (this allows
-one to include only the drivers needed by the application).
-
-All these primitives have a major and a minor number as arguments:
-
-@itemize @bullet
-
-@item the major number refers to the driver type,
-
-@item the minor number is used to control two peripherals with the same
-driver (for instance, we define only one major number for the serial
-driver, but two minor numbers for channel A and B if there are two
-channels in the UART).
-
-@end itemize
-
-@subsection RTEMS Postdriver Callback
-
-The @code{postdriver_hook} entry in the RTEMS CPU Configuration
-Table may be the address of a user provided routine that is
-invoked immediately after the the device drivers and MPCI are initialized.
-Interrupts and tasking are disabled. The postdriver hook is optional.
-
-Although optional, most of the RTEMS BSPs provide a postdriver hook
-callback. This routine is usually called @code{bsp_postdriver_hook}
-and is found in the file:
-
-@example
-c/src/lib/libbsp/CPU/BSP/startup/bsppost.c
-@end example
-
-The @code{bsp_postdriver_hook()} routine is the appropriate place to
-perform initialization that must be performed before the first task
-executes but requires that a device driver be initialized. The
-shared implementation of the postdriver hook opens the default
-standard in, out, and error files and associates them with
-@code{/dev/console}.
-
-@section The Interrupt Vector Table
-
-The Interrupt Vector Table is called different things on different
-processor families but the basic functionality is the same. Each
-entry in the Table corresponds to the handler routine for a particular
-interrupt source. When an interrupt from that source occurs, the
-specified handler routine is invoked. Some context information is
-saved by the processor automatically when this happens. RTEMS saves
-enough context information so that an interrupt service routine
-can be implemented in a high level language.
-
-On some processors, the Interrupt Vector Table is at a fixed address. If
-this address is in RAM, then usually the BSP only has to initialize
-it to contain pointers to default handlers. If the table is in ROM,
-then the application developer will have to take special steps to
-fill in the table.
-
-If the base address of the Interrupt Vector Table can be dynamically
-changed to an arbitrary address, then the RTEMS port to that processor
-family will usually allocate its own table and install it. For example,
-on some members of the Motorola MC68xxx family, the Vector Base Register
-(@code{vbr}) contains this base address.
-
-@subsection Interrupt Vector Table on the gen68340 BSP
-
-The gen68340 BSP provides a default Interrupt Vector Table in the
-file @code{$BSP_ROOT/start340/start340.s}. After the @code{entry}
-label is the definition of space reserved for the table of
-interrupts vectors. This space is assigned the symbolic name
-of @code{__uhoh} in the @code{gen68340} BSP.
-
-At @code{__uhoh} label is the default interrupt handler routine. This
-routine is only called when an unexpected interrupts is raised. One can
-add their own routine there (in that case there's a call to a routine -
-$BSP_ROOT/startup/dumpanic.c - that prints which address caused the
-interrupt and the contents of the registers, stack, etc.), but this should
-not return.
-
-@section Chip Select Initialization
-
-When the microprocessor accesses a memory area, address decoding is
-handled by an address decoder, so that the microprocessor knows which
-memory chip(s) to access. The following figure illustrates this:
-
-@example
-@group
- +-------------------+
- ------------| |
- ------------| |------------
- ------------| Address |------------
- ------------| Decoder |------------
- ------------| |------------
- ------------| |
- +-------------------+
- CPU Bus Chip Select
-@end group
-@end example
-
-
-The Chip Select registers must be programmed such that they match
-the @code{linkcmds} settings. In the gen68340 BSP, ROM and RAM
-addresses can be found in both the @code{linkcmds} and initialization
-code, but this is not a great way to do this. It is better to
-define addresses in the linker script.
-
-@section Integrated Processor Registers Initialization
-
-The CPUs used in many embedded systems are highly complex devices
-with multiple peripherals on the CPU itself. For these devices,
-there are always some specific integrated processor registers
-that must be initialized. Refer to the processors' manuals for
-details on these registers and be VERY careful programming them.
-
-@section Data Section Recopy
-
-The next initialization part can be found in
-@code{$BSP340_ROOT/start340/init68340.c}. First the Interrupt
-Vector Table is copied into RAM, then the data section recopy is initiated
-(_CopyDataClearBSSAndStart in @code{$BSP340_ROOT/start340/startfor340only.s}).
-
-This code performs the following actions:
-
-@itemize @bullet
-
-@item copies the .data section from ROM to its location reserved in RAM
-(see @ref{Linker Script Initialized Data} for more details about this copy),
-
-@item clear @code{.bss} section (all the non-initialized
-data will take value 0).
-
-@end itemize
-
-@section RTEMS-Specific Initialization
-
-@section The RTEMS configuration table
-
-The RTEMS configuration table contains the maximum number of objects RTEMS
-can handle during the application (e.g. maximum number of tasks,
-semaphores, etc.). It's used to allocate the size for the RTEMS inner data
-structures.
-
-The RTEMS configuration table is application dependent, which means that
-one has to provide one per application. It is usually defined
-by defining macros and including the header file @code{<confdefs.h>}.
-In simple applications such as the tests provided with RTEMS, it is
-commonly found in the main module of the application. For more complex
-applications, it may be in a file by itself.
-
-The header file @code{<confdefs.h>} defines a constant table named
-@code{Configuration}. It is common practice for the BSP to copy
-this table into a modifiable copy named @code{BSP_Configuration}.
-This copy of the table is modified to define the base address of the
-RTEMS Executive Workspace as well as to reflect any BSP and
-device driver requirements not automatically handled by the application.
-
-For more information on the RTEMS Configuration Table, refer to the
-@b{RTEMS Application C User's Guide}.
-
diff --git a/doc/bsp_howto/intro.t b/doc/bsp_howto/intro.t
deleted file mode 100644
index ddfd1ea956..0000000000
--- a/doc/bsp_howto/intro.t
+++ /dev/null
@@ -1,57 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Introduction
-
-Before reading this documentation, it is strongly advised to read the
-RTEMS Development Environment Guide to get acquainted with the RTEMS
-directory structure. This document describes how to do a RTEMS Board
-Support Package, i.e. how to port RTEMS on a new target board. Discussions
-are provided for the following topics:
-
-@itemize @bullet
-
-@item RTEMS Board Support Package Organization
-
-@item Makefiles and the Linker Command Script
-
-@item Board Initialization Sequence
-
-@item Device Drivers Including:
-
-@itemize @bullet
-
-@item Console Driver
-
-@item Clock Driver
-
-@item Timer Driver
-
-@item Real-Time Clock Driver
-
-@item Non-Volatile Memory Driver
-
-@item Networking Driver
-
-@item Shared Memory Support Driver
-
-@item Analog Driver
-
-@item Discrete Driver
-
-@end itemize
-
-@end itemize
-
-The original version of this manual was written by Geoffroy Montel
-<g_montel@@yahoo.com>. When he started development of the gen68340
-BSP, this manual did not exist. He wrote the initial version of
-this manual as the result of his experiences. At that time, this
-document was viewed internally as the most important "missing manual"
-in the RTEMS documentation set.
-
diff --git a/doc/bsp_howto/linkcmds.t b/doc/bsp_howto/linkcmds.t
deleted file mode 100644
index 828ff23099..0000000000
--- a/doc/bsp_howto/linkcmds.t
+++ /dev/null
@@ -1,425 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Linker Script
-
-@section What is a "linkcmds" file?
-
-The @code{linkcmds} file is a script which is passed to the linker at linking
-time. This file describes the memory configuration of the board as needed
-to link the program. Specifically it specifies where the code and data
-for the application will reside in memory.
-
-@section Program Sections
-
-An embedded systems programmer must be much more aware of the
-placement of their executable image in memory than the average
-applications programmer. A program destined to be embedded as well
-as the target system have some specific properties that must be
-taken into account. Embedded machines often mean average performances
-and small memory usage. It is the memory usage that concerns us
-when examining the linker command file.
-
-Two types of memories have to be distinguished:
-
-@itemize @bullet
-@item RAM - volatile offering read and write access
-@item ROM - non-volatile but read only
-@end itemize
-
-Even though RAM and ROM can be found in every personal computer,
-one generally doesn't care about them. In a personal computer,
-a program is nearly always stored on disk and executed in RAM. Things
-are a bit different for embedded targets: the target will execute the
-program each time it is rebooted or switched on. The application
-program is stored in non-volatile memory such as ROM, PROM, EEPROM,
-or Flash. On the other hand, data processing occurs in RAM.
-
-This leads us to the structure of an embedded program. In rough terms,
-an embedded program is made of sections. It is the responsibility of
-the application programmer to place these sections in the appropriate
-place in target memory. To make this clearer, if using the COFF
-object file format on the Motorola m68k family of microprocessors,
-the following sections will be present:
-
-@itemize @bullet
-
-@item @b{code (@code{.text}) section}:
-is the program's code and it should not be modified.
-This section may be placed in ROM.
-
-@item @b{non-initialized data (@code{.bss}) section}:
-holds uninitialized variables of the program. It can stay in RAM.
-
-@item @b{initialized data (@code{.data}) section}:
-holds the initialized program data which may be modified during the
-program's life. This means they have to be in RAM.
-On the other hand, these variables must be set to predefined values, and
-those predefined values have to be stored in ROM.
-
-@end itemize
-
-@b{NOTE:} Many programs and support libraries unknowingly assume that the
-@code{.bss} section and, possibly, the application heap are initialized
-to zero at program start. This is not required by the ISO/ANSI C Standard
-but is such a common requirement that most BSPs do this.
-
-That brings us up to the notion of the image of an executable: it consists
-of the set of the sections that together constitute the application.
-
-@section Image of an Executable
-
-As a program executable has many sections (note that the user can define
-their own, and that compilers define theirs without any notice), one has to
-specify the placement of each section as well as the type of memory
-(RAM or ROM) the sections will be placed into.
-For instance, a program compiled for a Personal Computer will see all the
-sections to go to RAM, while a program destined to be embedded will see
-some of his sections going into the ROM.
-
-The connection between a section and where that section is loaded into
-memory is made at link time. One has to let the linker know where
-the different sections are to be placed once they are in memory.
-
-The following example shows a simple layout of program sections. With
-some object formats, there are many more sections but the basic
-layout is conceptually similar.
-
-@example
-@group
- +-----------------+
- | .text | RAM or ROM
- +-----------------+
- | .data | RAM
- +-----------------+
- | .bss | RAM
- +-----------------+
-@end group
-@end example
-
-@section Example Linker Command Script
-
-The GNU linker has a command language to specify the image format. This
-command language can be quite complicated but most of what is required
-can be learned by careful examination of a well-documented example.
-The following is a heavily commented version of the linker script
-used with the the @code{gen68340} BSP This file can be found at
-$BSP340_ROOT/startup/linkcmds.
-
-@example
-/*
- * Specify that the output is to be coff-m68k regardless of what the
- * native object format is.
- */
-
-OUTPUT_FORMAT(coff-m68k)
-
-/*
- * Set the amount of RAM on the target board.
- *
- * NOTE: The default may be overridden by passing an argument to ld.
- */
-
-RamSize = DEFINED(RamSize) ? RamSize : 4M;
-
-/*
- * Set the amount of RAM to be used for the application heap. Objects
- * allocated using malloc() come from this area. Having a tight heap
- * size is somewhat difficult and multiple attempts to squeeze it may
- * be needed reducing memory usage is important. If all objects are
- * allocated from the heap at system initialization time, this eases
- * the sizing of the application heap.
- *
- * NOTE 1: The default may be overridden by passing an argument to ld.
- *
- * NOTE 2: The TCP/IP stack requires additional memory in the Heap.
- *
- * NOTE 3: The GNAT/RTEMS run-time requires additional memory in
- * the Heap.
- */
-
-HeapSize = DEFINED(HeapSize) ? HeapSize : 0x10000;
-
-/*
- * Set the size of the starting stack used during BSP initialization
- * until first task switch. After that point, task stacks allocated
- * by RTEMS are used.
- *
- * NOTE: The default may be overridden by passing an argument to ld.
- */
-
-StackSize = DEFINED(StackSize) ? StackSize : 0x1000;
-
-/*
- * Starting addresses and length of RAM and ROM.
- *
- * The addresses must be valid addresses on the board. The
- * Chip Selects should be initialized such that the code addresses
- * are valid.
- */
-
-MEMORY @{
- ram : ORIGIN = 0x10000000, LENGTH = 4M
- rom : ORIGIN = 0x01000000, LENGTH = 4M
-@}
-
-/*
- * This is for the network driver. See the Networking documentation
- * for more details.
- */
-
-ETHERNET_ADDRESS =
- DEFINED(ETHERNET_ADDRESS) ? ETHERNET_ADDRESS : 0xDEAD12;
-
-/*
- * The following defines the order in which the sections should go.
- * It also defines a number of variables which can be used by the
- * application program.
- *
- * NOTE: Each variable appears with 1 or 2 leading underscores to
- * ensure that the variable is accessible from C code with a
- * single underscore. Some object formats automatically add
- * a leading underscore to all C global symbols.
- */
-
-SECTIONS @{
-
- /*
- * Make the RomBase variable available to the application.
- */
-
- _RamSize = RamSize;
- __RamSize = RamSize;
-
- /*
- * Boot PROM - Set the RomBase variable to the start of the ROM.
- */
-
- rom : @{
- _RomBase = .;
- __RomBase = .;
- @} >rom
-
- /*
- * Dynamic RAM - set the RamBase variable to the start of the RAM.
- */
-
- ram : @{
- _RamBase = .;
- __RamBase = .;
- @} >ram
-
- /*
- * Text (code) goes into ROM
- */
-
- .text : @{
- /*
- * Create a symbol for each object (.o).
- */
-
- CREATE_OBJECT_SYMBOLS
-
- /*
- * Put all the object files code sections here.
- */
-
- *(.text)
-
- . = ALIGN (16); /* go to a 16-byte boundary */
-
- /*
- * C++ constructors and destructors
- *
- * NOTE: See the CROSSGCC mailing-list FAQ for
- * more details about the "[......]".
- */
-
- __CTOR_LIST__ = .;
- [......]
- __DTOR_END__ = .;
-
- /*
- * Declares where the .text section ends.
- */
-
- etext = .;
- _etext = .;
- @} >rom
-
- /*
- * Exception Handler Frame section
- */
-
- .eh_fram : @{
- . = ALIGN (16);
- *(.eh_fram)
- @} >ram
-
- /*
- * GCC Exception section
- */
-
- .gcc_exc : @{
- . = ALIGN (16);
- *(.gcc_exc)
- @} >ram
-
- /*
- * Special variable to let application get to the dual-ported
- * memory.
- */
-
- dpram : @{
- m340 = .;
- _m340 = .;
- . += (8 * 1024);
- @} >ram
-
- /*
- * Initialized Data section goes in RAM
- */
-
- .data : @{
- copy_start = .;
- *(.data)
-
- . = ALIGN (16);
- _edata = .;
- copy_end = .;
- @} >ram
-
- /*
- * Uninitialized Data section goes in ROM
- */
-
- .bss : @{
- /*
- * M68K specific: Reserve some room for the Vector Table
- * (256 vectors of 4 bytes).
- */
-
- M68Kvec = .;
- _M68Kvec = .;
- . += (256 * 4);
-
- /*
- * Start of memory to zero out at initialization time.
- */
-
- clear_start = .;
-
- /*
- * Put all the object files uninitialized data sections
- * here.
- */
-
- *(.bss)
-
- *(COMMON)
-
- . = ALIGN (16);
- _end = .;
-
- /*
- * Start of the Application Heap
- */
-
- _HeapStart = .;
- __HeapStart = .;
- . += HeapSize;
-
- /*
- * The Starting Stack goes after the Application Heap.
- * M68K stack grows down so start at high address.
- */
-
- . += StackSize;
- . = ALIGN (16);
- stack_init = .;
-
- clear_end = .;
-
- /*
- * The RTEMS Executive Workspace goes here. RTEMS
- * allocates tasks, stacks, semaphores, etc. from this
- * memory.
- */
-
- _WorkspaceBase = .;
- __WorkspaceBase = .;
- @} >ram
-@}
-@end example
-
-@section Initialized Data
-
-Now there's a problem with the initialized data: the @code{.data} section
-has to be in RAM as this data may be modified during the program execution.
-But how will the values be initialized at boot time?
-
-One approach is to place the entire program image in RAM and reload
-the image in its entirety each time the program is run. This is fine
-for use in a debug environment where a high-speed connection is available
-between the development host computer and the target. But even in this
-environment, it is cumbersome.
-
-The solution is to place a copy of the initialized data in a separate
-area of memory and copy it into the proper location each time the
-program is started. It is common practice to place a copy of the initialized
-@code{.data} section at the end of the code (@code{.text}) section
-in ROM when building a PROM image. The GNU tool @code{objcopy}
-can be used for this purpose.
-
-The following figure illustrates the steps a linked program goes through
-to become a downloadable image.
-
-@example
-@group
-+--------------+ +--------------------+
-| .data RAM | | .data RAM |
-+--------------+ +--------------------+
-| .bss RAM | | .bss RAM |
-+--------------+ +--------------------+ +----------------+
-| .text ROM | | .text ROM | | .text |
-+--------------+ +--------------------+ +----------------+
- | copy of .data ROM | | copy of .data |
- +--------------------+ +----------------+
-
- Step 1 Step 2 Step 3
-@end group
-@end example
-
-In Step 1, the program is linked together using the BSP linker script.
-
-In Step 2, a copy is made of the @code{.data} section and placed
-after the @code{.text} section so it can be placed in PROM. This step
-is done after the linking time. There is an example
-of doing this in the file $RTEMS_ROOT/make/custom/gen68340.cfg:
-
-@example
-# make a PROM image using objcopy
-m68k-rtems-objcopy \
---adjust-section-vma .data= \
-
-`m68k-rtems-objdump --section-headers \
-$(basename $@@).exe \
-| awk '[...]` \
-$(basename $@@).exe
-@end example
-
-NOTE: The address of the "copy of @code{.data} section" is
-created by extracting the last address in the @code{.text}
-section with an @code{awk} script. The details of how
-this is done are not relevant.
-
-Step 3 shows the final executable image as it logically appears in
-the target's non-volatile program memory. The board initialization
-code will copy the ""copy of @code{.data} section" (which are stored in
-ROM) to their reserved location in RAM.
-
diff --git a/doc/bsp_howto/makefiles.t b/doc/bsp_howto/makefiles.t
deleted file mode 100644
index 7019dc01a2..0000000000
--- a/doc/bsp_howto/makefiles.t
+++ /dev/null
@@ -1,235 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Makefiles
-
-This chapter discusses the Makefiles associated with a BSP. It does not
-describe the process of configuring, building, and installing RTEMS.
-This chapter will not provide detailed information about this process.
-Nonetheless, it is important to remember that the general process consists
-of three parts:
-
-@itemize @bullet
-@item configure
-@item build
-@item install
-@end itemize
-
-During the configure phase, a number of files are generated. These
-generated files are tailored for the specific host/target combination
-by the configure script. This set of files includes the Makefiles used
-to actually compile and install RTEMS.
-
-During the build phase, the source files are compiled into object files
-and libraries are built.
-
-During the install phase, the libraries, header files, and other support
-files are copied to the BSP specific installation point. After installation
-is successfully completed, the files generated by the configure and build
-phases may be removed.
-
-@section Makefiles Used During The BSP Building Process
-
-There is a file named @code{Makefile.in} in each directory of a BSP.
-RTEMS uses the @b{GNU autoconf} automatic configuration package.
-This tool specializes the @code{Makefile.in} files at the time that RTEMS
-is configured for a specific development host and target. Makefiles
-are automatically generated from the @code{Makefile.in} files. It is
-necessary for the BSP developer to provide these files. Most of the
-time, it is possible to copy the @code{Makefile.in} from another
-similar directory and edit it.
-
-The @code{Makefile} files generated are processed when building
-RTEMS for a given BSP.
-
-The BSP developer is responsible for generating @code{Makefile.in}
-files which properly build all the files associated with their BSP.
-There are generally three types of Makefiles in a BSP source tree:
-
-
-@itemize @bullet
-@item Directory Makefiles
-@item Source Directory Makefiles
-@item Wrapup Makefile
-@end itemize
-
-@subsection Directory Makefiles
-
-The Directory class of Makefiles directs the build process through
-a set of subdirectories in a particular order. This order is usually
-chosen to insure that build dependencies are properly processed.
-Most BSPs only have one Directory class Makefile. The @code{Makefile.in}
-in the BSP root directory (@code{c/src/lib/libbsp/CPU/BSP}) specifies
-which directories are to be built for this BSP. For example, the
-following Makefile fragment shows how a BSP would only build the
-networking device driver if HAS_NETWORKING was defined:
-
-@example
-NETWORKING_DRIVER_yes_V = network
-NETWORKING_DRIVER = $(NETWORKING_DRIVER_$(HAS_NETWORKING)_V)
-
-[...]
-
-SUB_DIRS=include start340 startup clock console timer \
- $(NETWORKING_DRIVER) wrapup
-@end example
-
-This fragment states that all the directories have to be processed,
-except for the @code{network} directory which is included only if the
-user configured networking.
-
-@subsection Source Directory Makefiles
-
-There is a @code{Makefile.in} in most of the directories in a BSP. This
-class of Makefile lists the files to be built as part of the driver.
-When adding new files to an existing directory, Do not forget to add
-the new files to the list of files to be built in the @code{Makefile.in}.
-
-@b{NOTE:} The @code{Makefile.in} files are ONLY processed during the configure
-process of a RTEMS build. Therefore, when developing
-a BSP and adding a new file to a @code{Makefile.in}, the
-already generated @code{Makefile} will not include the new references.
-This results in the new file not being be taken into account!
-The @code{configure} script must be run again or the @code{Makefile}
-(the result of the configure process) modified by hand. This file will
-be in a directory such as the following:
-
-@example
-MY_BUILD_DIR/c/src/lib/libbsp/CPU/BSP/DRIVER
-@end example
-
-@subsection Wrapup Makefile
-
-This class of Makefiles produces a library. The BSP wrapup Makefile
-is responsible for producing the library @code{libbsp.a} which is later
-merged into the @code{librtemsall.a} library. This Makefile specifies
-which BSP components are to be placed into the library as well as which
-components from the CPU dependent support code library. For example,
-this component may choose to use a default exception handler from the
-CPU dependent support code or provide its own.
-
-This Makefile makes use of the @code{foreach} construct in @b{GNU make}
-to pick up the required components:
-
-@example
-BSP_PIECES=startup clock console timer
-CPU_PIECES=
-GENERIC_PIECES=
-
-# bummer; have to use $foreach since % pattern subst
-# rules only replace 1x
-OBJS=$(foreach piece, $(BSP_PIECES), ../$(piece)/$(ARCH)/$(piece).o) \
- $(foreach piece, $(CPU_PIECES), \
- ../../../../libcpu/$(RTEMS_CPU)/$(piece)/$(ARCH)/$(piece).o) \
- $(wildcard \
- ../../../../libcpu/$(RTEMS_CPU)/$(RTEMS_CPU_MODEL)/fpsp/$(ARCH)/fpsp.rel) \
- $(foreach piece, \
- $(GENERIC_PIECES), ../../../$(piece)/$(ARCH)/$(piece).o)
-@end example
-
-The variable @code{OBJS} is the list of "pieces" expanded to include
-path information to the appropriate object files. The @code{wildcard}
-function is used on pieces of @code{libbsp.a} which are optional and
-may not be present based upon the configuration options.
-
-@section Makefiles Used Both During The BSP Design and its Use
-
-When building a BSP or an application using that BSP, it is necessary
-to tailor the compilation arguments to account for compiler flags, use
-custom linker scripts, include the RTEMS libraries, etc.. The BSP
-must be built using this information. Later, once the BSP is installed
-with the toolset, this same information must be used when building the
-application. So a BSP must include a build configuration file. The
-configuration file is @code{make/custom/BSP.cfg}.
-
-The configuration file is taken into account when building one's
-application using the RTEMS template Makefiles (@code{make/templates}).
-It is strongly advised to use these template Makefiles since they
-encapsulate a number of build rules along with the compile and link
-time options necessary to execute on the target board.
-
-There is a template Makefile provided for each of class of RTEMS
-Makefiles. The purpose of each class of RTEMS Makefile is to:
-
-@itemize @bullet
-@item call recursively the makefiles in the directories beneath
-the current one,
-
-@item build a library, or
-
-@item build an executable.
-
-@end itemize
-
-The following is a shortened and heavily commented version of the
-make customization file for the gen68340 BSP. The original source
-for this file can be found in the @code{make/custom} directory.
-
-@example
-
-# The RTEMS CPU Family and Model
-RTEMS_CPU=m68k
-RTEMS_CPU_MODEL=mcpu32
-
-include $(RTEMS_ROOT)/make/custom/default.cfg
-
-# The name of the BSP directory used for the actual source code.
-# This allows for build variants of the same BSP source.
-RTEMS_BSP_FAMILY=gen68340
-
-# CPU flag to pass to GCC
-CPU_CFLAGS = -mcpu32
-
-# optimization flag to pass to GCC
-CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
-
-# The name of the start file to be linked with. This file is the first
-# part of the BSP which executes.
-START_BASE=start340
-
-[...]
-
-# This make-exe macro is used in template makefiles to build the
-# final executable. Any other commands to follow, just as using
-# objcopy to build a PROM image or converting the executable to binary.
-
-ifeq ($(RTEMS_USE_GCC272),yes)
-# This has rules to link an application if an older version of GCC is
-# to be used with this BSP. It is not required for a BSP to support
-# older versions of GCC. This option is supported in some of the
-# BSPs which already had this support.
-[...]
-else
-# This has rules to link an application using gcc 2.8 or newer or any
-# egcs version. All BSPs should support this. This version is required
-# to support GNAT/RTEMS.
-define make-exe
- $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@@).exe $(LINK_OBJS)
- $(NM) -g -n $(basename $@@).exe > $(basename $@@).num
- $(SIZE) $(basename $@@).exe
-endif
-@end example
-
-@subsection Creating a New BSP Make Customization File
-
-The basic steps for creating a @code{make/custom} file for a new BSP
-are as follows:
-
-@itemize @bullet
-
-@item copy any @code{.cfg} file to @code{BSP.cfg}
-
-@item modify RTEMS_CPU, RTEMS_CPU_MODEL, RTEMS_BSP_FAMILY,
-RTEMS_BSP, CPU_CFLAGS, START_BASE, and make-exe rules.
-
-@end itemize
-
-It is generally easier to copy a @code{make/custom} file from a
-BSP similar to the one being developed.
-
-
diff --git a/doc/bsp_howto/nvmem.t b/doc/bsp_howto/nvmem.t
deleted file mode 100644
index 97643fff4f..0000000000
--- a/doc/bsp_howto/nvmem.t
+++ /dev/null
@@ -1,235 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Non-Volatile Memory Driver
-
-The Non-Volatile driver is responsible for providing an
-interface to various types of non-volatile memory. These
-types of memory include, but are not limited to, Flash, EEPROM,
-and battery backed RAM. The capabilities provided
-by this class of device driver are:
-
-@itemize @bullet
-@item Initialize the Non-Volatile Memory Driver
-@item Optional Disable Read and Write Handlers
-@item Open a Particular Memory Partition
-@item Close a Particular Memory Partition
-@item Read from a Particular Memory Partition
-@item Write to a Particular Memory Partition
-@item Erase the Non-Volatile Memory Area
-@end itemize
-
-There is currently only one non-volatile device driver included in the
-RTEMS source tree and it does not adhere to this device driver model.
-The information provided in this chapter is based on drivers developed
-by OAR Corporation personnel for applications using RTEMS. It is
-hoped that this driver model information can form the basis for a standard
-non-volatile memory driver model that can be supported in future RTEMS
-distribution.
-
-@section Major and Minor Numbers
-
-The @b{major} number of a device driver is its index in the
-RTEMS Device Address Table.
-
-A @b{minor} number is associated with each device instance
-managed by a particular device driver. An RTEMS minor number
-is an @code{unsigned32} entity. Convention calls
-dividing the bits in the minor number down into categories
-that specify an area of non-volatile memory and a partition
-with that area. This results in categories
-like the following:
-
-@itemize @bullet
-
-@item @b{area} - indicates a block of non-volatile memory
-@item @b{partition} - indicates a particular address range with an area
-
-@end itemize
-
-From the above, it should be clear that a single device driver
-can support multiple types of non-volatile memory in a single system.
-The minor number is used to distinguish the types of memory and
-blocks of memory used for different purposes.
-
-@section Non-Volatile Memory Driver Configuration
-
-There is not a standard non-volatile driver configuration table but some
-fields are common across different drivers. The non-volatile memory driver
-configuration table is typically an array of structures with each
-structure containing the information for a particular area of
-non-volatile memory.
-The following is a list of the type of information normally required
-to configure each area of non-volatile memory.
-
-@table @b
-@item memory_type
-is the type of memory device in this area. Choices are battery backed RAM,
-EEPROM, Flash, or an optional user-supplied type. If the user-supplied type
-is configured, then the user is responsible for providing a set of
-routines to program the memory.
-
-@item memory
-is the base address of this memory area.
-
-@item attributes
-is a pointer to a memory type specific attribute block. Some of
-the fields commonly contained in this memory type specific attribute
-structure area:
-
-@table @b
-@item use_protection_algorithm
-is set to TRUE to indicate that the protection (i.e. locking) algorithm
-should be used for this area of non-volatile memory. A particular
-type of non-volatile memory may not have a protection algorithm.
-
-@item access
-is an enumerated type to indicate the organization of the memory
-devices in this memory area. The following is a list of the
-access types supported by the current driver implementation:
-
-@itemize @bullet
-@item simple unsigned8
-@item simple unsigned16
-@item simple unsigned32
-@item simple unsigned64
-@item single unsigned8 at offset 0 in an unsigned16
-@item single unsigned8 at offset 1 in an unsigned16
-@item single unsigned8 at offset 0 in an unsigned32
-@item single unsigned8 at offset 1 in an unsigned32
-@item single unsigned8 at offset 2 in an unsigned32
-@item single unsigned8 at offset 3 in an unsigned32
-@end itemize
-
-@item depth
-is the depth of the progamming FIFO on this particular chip. Some
-chips, particularly EEPROMs, have the same programming algorithm but
-vary in the depth of the amount of data that can be programmed in a single
-block.
-
-@end table
-
-@item number_of_partitions
-is the number of logical partitions within this area.
-
-@item Partitions
-is the address of the table that contains an entry to describe each
-partition in this area. Fields within each element of this
-table are defined as follows:
-
-@table @b
-
-@item offset
-is the offset of this partition from the base address of this area.
-
-@item length
-is the length of this partition.
-
-@end table
-@end table
-
-By dividing an area of memory into multiple partitions, it is possible
-to easily divide the non-volatile memory for different purposes.
-
-@section Initialize the Non-Volatile Memory Driver
-
-At system initialization, the non-volatile memory driver's
-initialization entry point will be invoked. As part of
-initialization, the driver will perform
-whatever initializatin is required on each non-volatile memory area.
-
-The discrete I/O driver may register device names for memory
-partitions of particular interest to the system. Normally this
-will be restricted to the device "/dev/nv_memory" to indicate
-the entire device driver.
-
-@section Disable Read and Write Handlers
-
-Depending on the target's non-volatile memory configuration, it may be
-possible to write to a status register and make the memory area completely
-inaccessible. This is target dependent and beyond the standard capabilities
-of any memory type. The user has the optional capability to provide
-handlers to disable and enable access to a partiticular memory area.
-
-@section Open a Particular Memory Partition
-
-This is the driver open call. Usually this call does nothing other than
-validate the minor number.
-
-With some drivers, it may be necessary to allocate memory when a particular
-device is opened. If that is the case, then this is often the place
-to do this operation.
-
-@section Close a Particular Memory Partition
-
-This is the driver close call. Usually this call does nothing.
-
-With some drivers, it may be necessary to allocate memory when a particular
-device is opened. If that is the case, then this is the place
-where that memory should be deallocated.
-
-@section Read from a Particular Memory Partition
-
-This corresponds to the driver read call. After validating the minor
-number and arguments, this call enables reads from the specified
-memory area by invoking the user supplied "enable reads handler"
-and then reads the indicated memory area. When
-invoked the @code{argument_block} is actually a pointer to the following
-structure type:
-
-@example
-@group
-typedef struct @{
- rtems_unsigned32 offset;
- void *buffer;
- rtems_unsigned32 length;
- rtems_unsigned32 status;
-@} Non_volatile_memory_Driver_arguments;
-@end group
-@end example
-
-The driver reads @code{length} bytes starting at @code{offset} into
-the partition and places them at @code{buffer}. The result is returned
-in @code{status}.
-
-After the read operation is complete, the user supplied "disable reads handler"
-is invoked to protect the memory area again.
-
-@section Write to a Particular Memory Partition
-
-This corresponds to the driver write call. After validating the minor
-number and arguments, this call enables writes to the specified
-memory area by invoking the "enable writes handler", then unprotecting
-the memory area, and finally actually writing to the indicated memory
-area. When invoked the @code{argument_block} is actually a pointer to
-the following structure type:
-
-@example
-@group
-typedef struct @{
- rtems_unsigned32 offset;
- void *buffer;
- rtems_unsigned32 length;
- rtems_unsigned32 status;
-@} Non_volatile_memory_Driver_arguments;
-@end group
-@end example
-
-The driver writes @code{length} bytes from @code{buffer} and
-writes them to the non-volatile memory starting at @code{offset} into
-the partition. The result is returned in @code{status}.
-
-After the write operation is complete, the "disable writes handler"
-is invoked to protect the memory area again.
-
-@section Erase the Non-Volatile Memory Area
-
-This is one of the IOCTL functions supported by the I/O control
-device driver entry point. When this IOCTL function is invoked,
-the specified area of non-volatile memory is erased.
-
diff --git a/doc/bsp_howto/rtc.t b/doc/bsp_howto/rtc.t
deleted file mode 100644
index 2c13a18e03..0000000000
--- a/doc/bsp_howto/rtc.t
+++ /dev/null
@@ -1,188 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Real-Time Clock Driver
-
-@section Introduction
-
-The Real-Time Clock (@b{RTC}) driver is responsible for providing an
-interface to an @b{RTC} device. [NOTE: In this chapter, the abbreviation
-@b{TOD} is used for @b{Time of Day}.] The capabilities provided by this
-driver are:
-
-@itemize @bullet
-@item Set the RTC TOD to RTEMS TOD
-@item Set the RTEMS TOD to the RTC TOD
-@item Get the RTC TOD
-@item Set the RTC TOD to the Specified TOD
-@item Get the Difference Between the RTEMS and RTC TOD
-@end itemize
-
-The reference implementation for a real-time clock driver can
-be found in @code{c/src/lib/libbsp/shared/tod.c}. This driver
-is based on the libchip concept and can be easily configured
-to work with any of the RTC chips supported by the RTC
-chip drivers in the directory @code{c/src/lib/lib/libchip/rtc}.
-There is a README file in this directory for each supported
-RTC chip. Each of these README explains how to configure the
-shared libchip implementation of the RTC driver for that particular
-RTC chip.
-
-The DY-4 DMV177 BSP uses the shared libchip implementation of the RTC
-driver. Its @code{RTC_Table} configuration table can be found in
-@code{c/src/lib/libbsp/powerpc/dmv177/tod/config.c}.
-
-@section Initialization
-
-The @code{rtc_initialize} routine is responsible for initializing the
-RTC chip so it can be used. The shared libchip implementation of this
-driver supports multiple RTCs and bases its initialization order on
-the order the chips are defined in the @code{RTC_Table}. Each chip
-defined in the table may or may not be present on this particular board.
-It is the responsibility of the @code{deviceProbe} to indicate the
-presence of a particular RTC chip. The first RTC found to be present
-is considered the preferred RTC.
-
-In the shared libchip based implementation
-of the driver, the following actions are performed:
-
-@example
-@group
-rtems_device_driver rtc_initialize(
- rtems_device_major_number major,
- rtems_device_minor_number minor_arg,
- void *arg
-)
-@{
- for each RTC configured in RTC_Table
- if the deviceProbe for this RTC indicates it is present
- set RTC_Minor to this device
- set RTC_Present to TRUE
- break out of this loop
-
- if RTC_Present is not TRUE
- return RTEMS_INVALID_NUMBER to indicate that no RTC is present
-
- register this minor number as the "/dev/rtc"
-
- perform the deviceInitialize routine for the preferred RTC chip
-
- for RTCs past this one in the RTC_Table
- if the deviceProbe for this RTC indicates it is present
- perform the deviceInitialize routine for this RTC chip
- register the configured name for this RTC
-@}
-@end group
-@end example
-
-The @code{deviceProbe} routine returns TRUE if the device
-configured by this entry in the @code{RTC_Table} is present.
-This configuration scheme allows one to support multiple versions
-of the same board with a single BSP. For example, if the first
-generation of a board had Vendor A's RTC chip and the second
-generation had Vendor B's RTC chip, RTC_Table could contain
-information for both. The @code{deviceProbe} configured
-for Vendor A's RTC chip would need to return TRUE if the
-board was a first generation one. The @code{deviceProbe}
-routines are very board dependent and must be provided by
-the BSP.
-
-@section setRealTimeToRTEMS
-
-The @code{setRealTimeToRTEMS} routine sets the current RTEMS TOD to that
-of the preferred RTC.
-
-@example
-@group
-void setRealTimeToRTEMS(void)
-@{
- if no RTCs are present
- return
-
- invoke the deviceGetTime routine for the preferred RTC
- set the RTEMS TOD using rtems_clock_set
-@}
-@end group
-@end example
-
-@section setRealTimeFromRTEMS
-
-The @code{setRealTimeFromRTEMS} routine sets the preferred RTC TOD to the
-current RTEMS TOD.
-
-@example
-@group
-void setRealTimeFromRTEMS(void)
-@{
- if no RTCs are present
- return
-
- obtain the RTEMS TOD using rtems_clock_get
- invoke the deviceSetTime routine for the preferred RTC
-@}
-@end group
-@end example
-
-@section getRealTime
-
-The @code{getRealTime} returns the preferred RTC TOD to the
-caller.
-
-@example
-@group
-void getRealTime( rtems_time_of_day *tod )
-@{
- if no RTCs are present
- return
-
- invoke the deviceGetTime routine for the preferred RTC
-@}
-@end group
-@end example
-
-@section setRealTime
-
-The @code{setRealTime} routine sets the preferred RTC TOD to the
-TOD specified by the caller.
-
-@example
-@group
-void setRealTime( rtems_time_of_day *tod )
-@{
- if no RTCs are present
- return
-
- invoke the deviceSetTime routine for the preferred RTC
-@}
-@end group
-@end example
-
-@section checkRealTime
-
-The @code{checkRealTime} routine returns the number of seconds
-difference between the RTC TOD and the current RTEMS TOD.
-
-@example
-@group
-int checkRealTime( void )
-@{
- if no RTCs are present
- return -1
-
-
- obtain the RTEMS TOD using rtems_clock_get
- get the TOD from the preferred RTC using the deviceGetTime routine
-
- convert the RTEMS TOD to seconds
- convert the RTC TOD to seconds
-
- return the RTEMS TOD in seconds - RTC TOD in seconds
-@}
-@end group
-@end example
-
diff --git a/doc/bsp_howto/shmsupp.t b/doc/bsp_howto/shmsupp.t
deleted file mode 100644
index b1234f7bb9..0000000000
--- a/doc/bsp_howto/shmsupp.t
+++ /dev/null
@@ -1,269 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Shared Memory Support Driver
-
-The Shared Memory Support Driver is responsible for providing glue
-routines and configuration information required by the Shared
-Memory Multiprocessor Communications Interface (MPCI). The
-Shared Memory Support Driver tailors the portable Shared
-Memory Driver to a particular target platform.
-
-This driver is only required in shared memory multiprocessing
-systems that use the RTEMS mulitprocessing support. For more
-information on RTEMS multiprocessing capabilities and the
-MPCI, refer to the @b{Multiprocessing Manager} chapter
-of the @b{RTEMS Application C User's Guide}.
-
-@section Shared Memory Configuration Table
-
-The Shared Memory Configuration Table is defined in the following
-structure:
-
-@example
-@group
-typedef volatile rtems_unsigned32 vol_u32;
-
-typedef struct @{
- vol_u32 *address; /* write here for interrupt */
- vol_u32 value; /* this value causes interrupt */
- vol_u32 length; /* for this length (0,1,2,4) */
-@} Shm_Interrupt_information;
-
-struct shm_config_info @{
- vol_u32 *base; /* base address of SHM */
- vol_u32 length; /* length (in bytes) of SHM */
- vol_u32 format; /* SHM is big or little endian */
- vol_u32 (*convert)(); /* neutral conversion routine */
- vol_u32 poll_intr; /* POLLED or INTR driven mode */
- void (*cause_intr)( rtems_unsigned32 );
- Shm_Interrupt_information Intr; /* cause intr information */
-@};
-
-typedef struct shm_config_info shm_config_table;
-@end group
-@end example
-
-where the fields are defined as follows:
-
-@table @b
-@item base
-is the base address of the shared memory buffer used to pass
-messages between the nodes in the system.
-
-@item length
-is the length (in bytes) of the shared memory buffer used to pass
-messages between the nodes in the system.
-
-@item format
-is either SHM_BIG or SHM_LITTLE to indicate that the neutral format
-of the shared memory area is big or little endian. The format
-of the memory should be chosen to match most of the inter-node traffic.
-
-@item convert
-is the address of a routine which converts from native format to
-neutral format. Ideally, the neutral format is the same as the
-native format so this routine is quite simple.
-
-@item poll_intr
-is either INTR_MODE or POLLED_MODE to indicate how the node will be
-informed of incoming messages.
-
-@item cause_intr
-
-@item Intr
-is the information required to cause an interrupt on a node. This
-structure contains the following fields:
-@table @b
-@item address
-is the address to write at to cause an interrupt on that node.
-For a polled node, this should be NULL.
-
-@item value
-is the value to write to cause an interrupt.
-
-@item length
-is the length of the entity to write on the node to cause an interrupt.
-This can be 0 to indicate polled operation, 1 to write a byte, 2 to
-write a sixteen-bit entity, and 4 to write a thirty-two bit entity.
-@end table
-@end table
-
-@section Primitives
-
-@subsection Convert Address
-
-The @code{Shm_Convert_address} is responsible for converting an address
-of an entity in the shared memory area into the address that should be
-used from this node. Most targets will simply return the address
-passed to this routine. However, some target boards will have a special
-window onto the shared memory. For example, some VMEbus boards have
-special address windows to access addresses that are normally reserved
-in the CPU's address space.
-
-@example
-@group
-void *Shm_Convert_address( void *address )
-@{
- return the local address version of this bus address
-@}
-@end group
-@end example
-
-@subsection Get Configuration
-
-The @code{Shm_Get_configuration} routine is responsible for filling in the
-Shared Memory Configuration Table passed to it.
-
-@example
-@group
-void Shm_Get_configuration(
- rtems_unsigned32 localnode,
- shm_config_table **shmcfg
-)
-@{
- fill in the Shared Memory Configuration Table
-@}
-@end group
-@end example
-
-@subsection Locking Primitives
-
-This is a collection of routines that are invoked by the portable
-part of the Shared Memory Driver to manage locks in the shared
-memory buffer area. Accesses to the shared memory must be
-atomic. Two nodes in a multiprocessor system must not be manipulating
-the shared data structures simultaneously. The locking primitives
-are used to insure this.
-
-To avoid deadlock, local processor interrupts should be disabled the entire
-time the locked queue is locked.
-
-The locking primitives operate on the lock
-@code{field} of the @code{Shm_Locked_queue_Control}
-data structure. This structure is defined as follows:
-
-@example
-@group
-typedef struct @{
- vol_u32 lock; /* lock field for this queue */
- vol_u32 front; /* first envelope on queue */
- vol_u32 rear; /* last envelope on queue */
- vol_u32 owner; /* receiving (i.e. owning) node */
-@} Shm_Locked_queue_Control;
-@end group
-@end example
-
-where each field is defined as follows:
-
-@table @b
-@item lock
-is the lock field. Every node in the system must agree on how this
-field will be used. Many processor families provide an atomic
-"test and set" instruction that is used to manage this field.
-
-@item front
-is the index of the first message on this locked queue.
-
-@item rear
-is the index of the last message on this locked queue.
-
-@item owner
-is the node number of the node that currently has this structure locked.
-
-@end table
-
-@subsubsection Initializing a Shared Lock
-
-The @code{Shm_Initialize_lock} routine is responsible for
-initializing the lock field. This routines usually is implemented
-as follows:
-
-@example
-@group
-void Shm_Initialize_lock(
- Shm_Locked_queue_Control *lq_cb
-)
-@{
- lq_cb->lock = LQ_UNLOCKED;
-@}
-@end group
-@end example
-
-@subsubsection Acquiring a Shared Lock
-
-The @code{Shm_Lock} routine is responsible for
-acquiring the lock field. Interrupts should be
-disabled while that lock is acquired. If the lock
-is currently unavailble, then the locking routine
-should delay a few microseconds to allow the other
-node to release the lock. Doing this reduces bus contention
-for the lock. This routines usually is implemented as follows:
-
-@example
-@group
-void Shm_Lock(
- Shm_Locked_queue_Control *lq_cb
-)
-@{
- disable processor interrupts
- set Shm_isrstat to previous interrupt disable level
-
- while ( TRUE ) @{
- atomically attempt to acquire the lock
- if the lock was acquired
- return
- delay some small period of time
- @}
-@}
-@end group
-@end example
-
-@subsubsection Releasing a Shared Lock
-
-The @code{Shm_Unlock} routine is responsible for
-releasing the lock field and reenabling processor
-interrupts. This routines usually is implemented as follows:
-
-@example
-@group
-void Shm_Unlock(
- Shm_Locked_queue_Control *lq_cb
-)
-@{
- set the lock to the unlocked value
- reenable processor interrupts to their level prior
- to the lock being acquired. This value was saved
- in the global variable Shm_isrstat
-@}
-@end group
-@end example
-
-@section Installing the MPCI ISR
-
-The @code{Shm_setvec} is invoked by the portable portion
-of the shared memory to install the interrupt service routine
-that is invoked when an incoming message is announced. Some
-target boards support an interprocessor interrupt or mailbox
-scheme and this is where the ISR for that interrupt would be
-installed.
-
-On an interrupt driven node, this routine would be implemented
-as follows:
-
-@example
-@group
-void Shm_setvec( void )
-@{
- install the interprocessor communications ISR
-@}
-@end group
-@end example
-
-On a polled node, this routine would be empty.
-
diff --git a/doc/bsp_howto/support.t b/doc/bsp_howto/support.t
deleted file mode 100644
index f728851d9d..0000000000
--- a/doc/bsp_howto/support.t
+++ /dev/null
@@ -1,257 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Miscellaneous Support Files
-
-@section GCC Compiler Specifications File
-
-The file @code{bsp_specs} defines the start files and libraries
-that are always used with this BSP. The format of this file
-is admittedly cryptic and this document will make no attempt
-to explain it completely. Below is the @code{bsp_specs}
-file from the PowerPC psim BSP:
-
-@example
-@group
-%rename cpp old_cpp
-%rename lib old_lib
-%rename endfile old_endfile
-%rename startfile old_startfile
-%rename link old_link
-
-*cpp:
-%(old_cpp) %@{qrtems: -D__embedded__@} -Asystem(embedded)
-
-*lib:
-%@{!qrtems: %(old_lib)@} %@{qrtems: --start-group \
-%@{!qrtems_debug: -lrtemsall@} %@{qrtems_debug: -lrtemsall_g@} \
--lc -lgcc --end-group ecrtn%O%s \
-%@{!qnolinkcmds: -T linkcmds%s@}@}
-
-*startfile:
-%@{!qrtems: %(old_startfile)@} %@{qrtems: ecrti%O%s \
-%@{!qrtems_debug: startsim.o%s@} \
-%@{qrtems_debug: startsim_g.o%s@}@}
-
-*link:
-%@{!qrtems: %(old_link)@} %@{qrtems: -Qy -dp -Bstatic \
--T linkcmds%s -e _start -u __vectors@}
-@end group
-@end example
-
-The first section of this file renames the built-in definition of
-some specification variables so they can be augmented without
-embedded their original definition. The subsequent sections
-specify what behavior is expected when the @code{-qrtems} or
-@code{-qrtems_debug} option is specified.
-
-The @code{*cpp} definition specifies that when @code{-qrtems}
-is specified, predefine the preprocessor symbol @code{__embedded__}.
-
-The @code{*lib} section insures that the RTEMS library, BSP specific
-linker script, gcc support library, and the EABI specific @code{ecrtn}
-file are used.
-
-The @code{*startfile} section specifies that the BSP specific file
-@code{startsim.o} will be used instead of @code{crt0.o}. In addition,
-the EABI specific file @code{ecrti.o} will be linked in with the
-executable.
-
-The @code{*link} section specifies the arguments that will be passed to
-the linker.
-
-The format of this file is specific to the GNU Compiler Suite. The
-argument used to override and extend the compiler built-in specifications
-is relatively new to the toolset. The @code{-specs} option is present
-in all @code{egcs} distributions and @code{gcc} distributions starting
-with version 2.8.0.
-
-@section README Files
-
-Most BSPs provide one or more @code{README} files. Generally, there
-is a @code{README} file at the top of the BSP source. This file
-describes the board and its hardware configuration, provides vendor
-information, local configuration information, information on downloading
-code to the board, debugging, etc.. The intent of this
-file is to help someone begin to use the BSP faster.
-
-A @code{README} file in a BSP subdirectory typically explains something
-about the contents of that subdirectory in greater detail. For example,
-it may list the documentation available for a particular peripheral
-controller and how to obtain that documentation. It may also explain some
-particularly cryptic part of the software in that directory or provide
-rationale on the implementation.
-
-@section times
-
-This file contains the results of the RTEMS Timing Test Suite. It is
-in a standard format so that results from one BSP can be easily compared
-with those of another target board.
-
-If a BSP supports multiple variants, then there may be multiple @code{times}
-files. Usually these are named @code{times.VARIANTn}.
-
-@section Tools Subdirectory
-
-Some BSPs provide additional tools that aid in using the target board.
-These tools run on the development host and are built as part of building
-the BSP. Most common is a script to automate running the RTEMS Test Suites
-on the BSP. Examples of this include:
-
-@itemize @bullet
-
-@item @code{powerpc/psim} includes scripts to ease use of the simulator
-
-@item @code{m68k/mvme162} includes a utility to download across the
-VMEbus into target memory if the host is a VMEbus board in the same
-chasis.
-
-@item @code{unix/posix} includes scripts to run the tests automatically
-on this BSP.
-
-@end itemize
-
-@section bsp.h Include File
-
-The file @code{include/bsp.h} contains prototypes and definitions
-specific to this board. Every BSP is required to provide a @code{bsp.h}.
-The best approach to writing a @code{bsp.h} is copying an existing one
-as a starting point.
-
-Many @code{bsp.h} files provide prototypes of variables defined
-in the linker script (@code{linkcmds}).
-
-There are a number of fields in this file that are used only by the
-RTEMS Test Suites. The following is a list of these:
-
-@itemize @bullet
-@item @code{MAX_LONG_TEST_DURATION} - the longest length of time a
-"long running" test should run.
-
-@item @code{MAX_SHORT_TEST_DURATION} - the longest length of time a
-"short running" test should run.
-
-@item @code{MUST_WAIT_FOR_INTERRUPT} - modifies behavior of @code{tm27}.
-
-@item @code{Install_tm27_vector} - installs the interrupt service
-routine for the Interrupt Benchmark Test (@code{tm27}).
-
-@item @code{Cause_tm27_intr} - generates the interrupt source
-used in the Interrupt Benchmark Test (@code{tm27}).
-
-@item @code{Clear_tm27_intr} - clears the interrupt source
-used in the Interrupt Benchmark Test (@code{tm27}).
-
-@item @code{Lower_tm27_intr} - lowers the interrupt mask so the
-interrupt source used in the Interrupt Benchmark Test (@code{tm27})
-can generate a nested interrupt.
-
-@end itemize
-
-@section Calling Overhead File
-
-The file @code{include/coverhd.h} contains the overhead associated
-with invoking each directive. This overhead consists of the execution
-time required to package the parameters as well as to execute the "jump to
-subroutine" and "return from subroutine" sequence. The intent of this
-file is to help separate the calling overhead from the actual execution
-time of a directive. This file is only used by the tests in the
-RTEMS Timing Test Suite.
-
-The numbers in this file are obtained by running the "Timer Overhead"
-@code{tmoverhd} test. The numbers in this file may be 0 and no
-overhead is subtracted from the directive execution times reported by
-the Timing Suite.
-
-@section sbrk() Implementation
-
-If the BSP wants to dynamically extend the heap used by the
-C Library memory allocation routines (i.e. @code{malloc} family),
-then this routine must be functional. The following is the
-prototype for this routine:
-
-@example
-void * sbrk(size_t increment)
-@end example
-
-The @code{increment} amount is based upon the @code{sbrk_amount}
-parameter passed to the @code{RTEMS_Malloc_Initialize} during system
-initialization.
-See @ref{Initialization Code RTEMS Pretasking Callback} for more
-information.
-
-There is a default implementation which returns an error to indicate
-that the heap can not be extended. This implementation can be
-found in @code{c/src/lib/libbsp/shared/sbrk.c}. Many of the BSPs
-use this shared implementation. In order to use this implementation,
-the file @code{Makefile.in} in the BSP's @code{startup} directory
-must be modified so that the @code{$VPATH} variable searches
-both the @code{startup} directory and the shared directory. The following
-illustates the @code{VPATH} setting in the PowerPC psim BSP's
-@code{startup/Makefile.in}:
-
-@example
-VPATH = @@srcdir@@:@@srcdir@@/../../../shared
-@end example
-
-This instructs make to look in all of the directories in the @code{VPATH}
-for the source files. The directories will be examined in the order
-they are specified.
-
-@section bsp_cleanup() - Cleanup the Hardware
-
-The @code{bsp_cleanup()} is the last C code invoked. Most of the BSPs
-use the same shared version of @code{bsp_cleanup()} that does nothing.
-This implementation is located in the following file:
-
-@example
-c/src/lib/libbsp/shared/bspclean.c
-@end example
-
-The @code{bsp_cleanup()} routine can be used to return to a ROM monitor,
-insure that interrupt sources are disabled, etc.. This routine is the
-last place to insure a clean shutdown of the hardware.
-
-@section set_vector() - Install an Interrupt Vector
-
-The @code{set_vector} routine is responsible for installing an interrupt
-vector. It invokes the support routines necessary to install an
-interrupt handler as either a "raw" or an RTEMS interrupt handler. Raw
-handlers bypass the RTEMS interrupt structure and are responsible for
-saving and restoring all their own registers. Raw handlers are useful
-for handling traps, debug vectors, etc..
-
-The @code{set_vector} routine is a central place to perform
-interrupt controller manipulation and encapsulate that information.
-It is usually implemented as follows:
-
-@example
-@group
-rtems_isr_entry set_vector( /* returns old vector */
- rtems_isr_entry handler, /* isr routine */
- rtems_vector_number vector, /* vector number */
- int type /* RTEMS or RAW intr */
-)
-@{
- if the type is RAW
- install the raw vector
- else
- use rtems_interrupt_catch to install the vector
-
- perform any interrupt controller necessary to unmask
- the interrupt source
-
- return the previous handler
-@}
-@end group
-@end example
-
-
-@b{NOTE:} @code{set_vector} is provided by the majority of BSPs but
-not all. In particular, the i386 BSPs use a different scheme.
-
diff --git a/doc/bsp_howto/target.t b/doc/bsp_howto/target.t
deleted file mode 100644
index d7b9f51f3e..0000000000
--- a/doc/bsp_howto/target.t
+++ /dev/null
@@ -1,214 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Target Dependent Files
-
-RTEMS has a multi-layered approach to portability. This is done to
-maximize the amount of software that can be reused. Much of the
-RTEMS source code can be reused on all RTEMS platforms. Other parts
-of the executive are specific to hardware in some sense.
-RTEMS classifies target dependent code based upon its dependencies
-into one of the following categories.
-
-@itemize @bullet
-@item CPU dependent
-@item Board dependent
-@item Peripheral dependent
-@end itemize
-
-@section CPU Dependent
-
-This class of code includes the foundation
-routines for the executive proper such as the context switch and
-the interrupt subroutine implementations. Sources for the supported
-processor families can be found in @code{c/src/exec/score/cpu}.
-A good starting point for a new family of processors is the
-@code{no_cpu} directory, which holds both prototypes and
-descriptions of each needed CPU dependent function.
-
-CPU dependent code is further subcategorized if the implementation is
-dependent on a particular CPU model. For example, the MC68000 and MC68020
-processors are both members of the m68k CPU family but there are significant
-differents between these CPU models which RTEMS must take into account.
-
-@section Board Dependent
-
-This class of code provides the most specific glue between RTEMS and
-a particular board. This code is represented by the Board Support Packages
-and associated Device Drivers. Sources for the BSPs included in the
-RTEMS distribution are located in the directory @code{c/src/lib/libbsp}.
-The BSP source directory is further subdivided based on the CPU family
-and BSP.
-
-Some BSPs may support multiple board models within a single board family.
-This is necessary when the board supports multiple variants on a
-single base board. For example, the Motorola MVME162 board family has a
-fairly large number of variations based upon the particular CPU model
-and the peripherals actually placed on the board.
-
-@section Peripheral Dependent
-
-This class of code provides a reusable library of peripheral device
-drivers which can be tailored easily to a particular board. The
-libchip library is a collection of reusable software objects that
-correspond to standard controllers. Just as the hardware engineer
-chooses a standard controller when designing a board, the goal of
-this library is to let the software engineer do the same thing.
-
-The source code for the reusable peripheral driver library may be found
-in the directory @code{c/src/lib/libchip}. The source code is further
-divided based upon the class of hardware. Example classes include serial
-communications controllers, real-time clocks, non-volatile memory, and
-network controllers.
-
-@section Questions to Ask
-
-When evaluating what is required to support RTEMS applications on
-a particular target board, the following questions should be asked:
-
-@itemize @bullet
-
-@item Does a BSP for this board exist?
-
-@item Does a BSP for a similar board exists?
-
-@item Is the board's CPU supported?
-
-@end itemize
-
-If there is already a BSP for the board, then things may already be ready
-to start developing application software. All that remains is to verify
-that the existing BSP provides device drivers for all the peripherals
-on the board that the application will be using. For example, the application
-in question may require that the board's Ethernet controller be used and
-the existing BSP may not support this.
-
-If the BSP does not exist and the board's CPU model is supported, then
-examine the reusable chip library and existing BSPs for a close match.
-Other BSPs and libchip provide starting points for the development
-of a new BSP. It is often possible to copy existing components in
-the reusable chip library or device drivers from BSPs from different
-CPU families as the starting point for a new device driver.
-This will help reduce the development effort required.
-
-If the board's CPU family is supported but the particular CPU model on
-that board is not, then the RTEMS port to that CPU family will have to
-be augmented. After this is done, development of the new BSP can proceed.
-
-Otherwise both CPU dependent code and the BSP will have to be written.
-
-Regardless of the amount of development required, OAR Corporation
-offers custom development services to assist RTEMS users.
-For more information on custom development, training courses, and
-support, contact OAR Corporation at
-@uref{http://www.oarcorp.com}.
-
-
-@section CPU Dependent Executive Files
-
-The CPU dependent files in the RTEMS executive source code are found
-in the following directory:
-
-@example
-c/src/exec/score/cpu/@i{CPU}
-@end example
-
-where @i{CPU} is replaced with the CPU family name.
-
-Within each CPU dependent directory inside the executive proper is a
-file named @code{@i{CPU}.h} which contains information about each of the
-supported CPU models within that family.
-
-@section CPU Dependent Support Files
-
-The CPU dependent support files contain routines which aid in the development
-of applications using that CPU family. For example, the support routines
-may contain standard trap handlers for alignment or floating point exceptions
-or device drivers for peripheral controllers found on the CPU itself.
-This class of code may be found in the following directory:
-
-@example
-c/src/lib/libcpu/@i{CPU}
-@end example
-
-CPU model dependent support code is found in the following directory:
-
-@example
-c/src/lib/libcpu/@i{CPU}/@i{CPU_MODEL}
-@end example
-
-@section Board Support Package Structure
-
-The BSPs are all under the c/src/lib/libbsp directory. Below this
-directory, there is a subdirectory for each CPU family. Each BSP
-is found under the subdirectory for the appropriate processor
-family (m68k, powerpc, etc.). In addition, there is source code
-available which may be shared across all BSPs regardless of
-the CPU family or just across BSPs within a single CPU family. This
-results in a BSP using the following directories:
-
-@example
-c/src/lib/libbsp/shared
-c/src/lib/libbsp/@i{CPU}/shared
-c/src/lib/libbsp/@i{CPU}/@i{BSP}
-@end example
-
-Under each BSP specific directory, there is a collection of
-subdirectories. For commonly provided functionality, the BSPs
-follow a convention on subdirectory naming. The following list
-describes the commonly found subdirectories under each BSP.
-
-@itemize @bullet
-
-@item @b{console}:
-is technically the serial driver for the BSP rather
-than just a console driver, it deals with the board
-UARTs (i.e. serial devices).
-
-@item @b{clock}:
-support for the clock tick -- a regular time basis to the kernel.
-
-@item @b{timer}:
-support of timer devices.
-
-@item @b{rtc}:
-support for the hardware real-time clock.
-
-@item @b{nvmem}:
-support for non-volatile memory such as EEPROM or Flash.
-
-@item @b{network}:
-the Ethernet driver.
-
-@item @b{shmsupp}:
-support of shared memory driver MPCI layer in a multiprocessor system,
-
-@item @b{include}:
-include files for this BSP.
-
-@item @b{wrapup}:
-bundles all the components necessary to construct the BSP library.
-
-@end itemize
-
-The build order of the BSP is determined by the Makefile structure.
-This structure is discussed in more detail in the @ref{Makefiles}
-chapter.
-
-@b{NOTE:} This manual refers to the gen68340 BSP for numerous concrete
-examples. You should have a copy of the gen68340 BSP available while
-reading this piece of documentation. This BSP is located in the
-following directory:
-
-@example
-c/src/lib/libbsp/m68k/gen68340
-@end example
-
-Later in this document, the $BSP340_ROOT label will be used
-to refer to this directory.
-
diff --git a/doc/bsp_howto/timer.t b/doc/bsp_howto/timer.t
deleted file mode 100644
index fa4850a424..0000000000
--- a/doc/bsp_howto/timer.t
+++ /dev/null
@@ -1,121 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Timer Driver
-
-The timer driver is primarily used by the RTEMS Timing Tests.
-This driver provides as accurate a benchmark timer as possible.
-It typically reports its time in microseconds, CPU cycles, or
-bus cycles. This information can be very useful for determining
-precisely what pieces of code require optimization and to measure the
-impact of specific minor changes.
-
-The gen68340 BSP also uses the Timer Driver to support a high performance
-mode of the on-CPU UART.
-
-@section Benchmark Timer
-
-The RTEMS Timing Test Suite requires a benchmark timer. The
-RTEMS Timing Test Suite is very helpful for determining
-the performance of target hardware and comparing its performance
-to that of other RTEMS targets.
-
-This section describes the routines which are assumed to exist by
-the RTEMS Timing Test Suite. The names used are @b{EXACTLY} what
-is used in the RTEMS Timing Test Suite so follow the naming convention.
-
-@subsection Timer_initialize
-
-Initialize the timer source.
-
-@example
-void Timer_initialize(void)
-@{
- initialize the benchmark timer
-@}
-@end example
-
-@subsection Read_timer
-
-The @code{Read_timer} routine
-returns the number of benchmark time units (typically microseconds)
-that have elapsed since the last call to @code{Timer_initialize}.
-
-@example
-int Read_timer(void)
-@{
- stop time = read the hardware timer
- if the subtract overhead feature is enabled
- subtract overhead from stop time
- return the stop time
-@}
-@end example
-
-Many implementations of this routine subtract the overhead required
-to initialize and read the benchmark timer. This makes the times reported
-more accurate.
-
-Some implementations report 0 if the harware timer value change is
-sufficiently small. This is intended to indicate that the execution time
-is below the resolution of the timer.
-
-@subsection An Empty Function
-
-This routine is invoked by the RTEMS Timing Test Suite to measure
-the cost of invoking a subroutine.
-
-@example
-rtems_status_code Empty_function (void)
-@{
- return RTEMS_SUCCESSFUL;
-@}
-@end example
-
-@subsection Set_find_average_overhead
-
-This routine is invoked by the "Check Timer" (@code{tmck}) test in the
-RTEMS Timing Test Suite. It makes the @code{Read_timer}
-routine NOT subtract the overhead required
-to initialize and read the benchmark timer. This is used
-by the @code{tmoverhd} test to determine the overhead
-required to initialize and read the timer.
-
-@example
-void Set_find_average_overhead(rtems_boolean find_flag)
-@{
- disable the subtract overhead feature
-@}
-@end example
-
-The @code{Timer_driver_Find_average_overhead} variable is usually
-used to indicate the state of the "subtract overhead feature".
-
-@section gen68340 UART FIFO Full Mode
-
-The gen68340 BSP is an example of the use of the timer to support the UART
-input FIFO full mode (FIFO means First In First Out and roughly means
-buffer). This mode consists in the UART raising an interrupt when n
-characters have been received (@i{n} is the UART's FIFO length). It results
-in a lower interrupt processing time, but the problem is that a scanf
-primitive will block on a receipt of less than @i{n} characters. The solution
-is to set a timer that will check whether there are some characters
-waiting in the UART's input FIFO. The delay time has to be set carefully
-otherwise high rates will be broken:
-
-@itemize @bullet
-
-@item if no character was received last time the interrupt subroutine was
-entered, set a long delay,
-
-@item otherwise set the delay to the delay needed for @i{n} characters
-receipt.
-
-@end itemize
-
-
-
diff --git a/doc/common/cpright.texi b/doc/common/cpright.texi
deleted file mode 100644
index 2d188d2394..0000000000
--- a/doc/common/cpright.texi
+++ /dev/null
@@ -1,45 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@c
-@c The following puts a space somewhere on an otherwise empty page so we
-@c can force the copyright description onto a left hand page.
-@c
-
-@tex
-{\parskip=0pt \hfill On-Line Applications Research Corporation\par \hfill
-\TeX{}info \texinfoversion\par }
-@end tex
-
-@vskip 0pt plus 1filll
-COPYRIGHT @copyright{} 1988 - 1999.@*
-On-Line Applications Research Corporation (OAR).@*
-
-The authors have used their best efforts in preparing
-this material. These efforts include the development, research,
-and testing of the theories and programs to determine their
-effectiveness. No warranty of any kind, expressed or implied,
-with regard to the software or the material contained in this
-document is provided. No liability arising out of the
-application or use of any product described in this document is
-assumed. The authors reserve the right to revise this material
-and to make changes from time to time in the content hereof
-without obligation to notify anyone of such revision or changes.
-
-Any inquiries concerning RTEMS, its related support
-components, or its documentation should be directed to either:
-
-@example
-On-Line Applications Research Corporation
-4910-L Corporate Drive
-Huntsville, AL 35805
-VOICE: (256) 722-9985
-FAX: (256) 722-0985
-EMAIL: rtems@@OARcorp.com
-@end example
-
diff --git a/doc/common/dvi.gif b/doc/common/dvi.gif
deleted file mode 100644
index 163a5d52b5..0000000000
--- a/doc/common/dvi.gif
+++ /dev/null
Binary files differ
diff --git a/doc/common/oaronly.jpg b/doc/common/oaronly.jpg
deleted file mode 100644
index c87c151404..0000000000
--- a/doc/common/oaronly.jpg
+++ /dev/null
Binary files differ
diff --git a/doc/common/pdf.gif b/doc/common/pdf.gif
deleted file mode 100644
index c88fd777c4..0000000000
--- a/doc/common/pdf.gif
+++ /dev/null
Binary files differ
diff --git a/doc/common/pdf1.gif b/doc/common/pdf1.gif
deleted file mode 100644
index 784fe2ac8c..0000000000
--- a/doc/common/pdf1.gif
+++ /dev/null
Binary files differ
diff --git a/doc/common/ps.gif b/doc/common/ps.gif
deleted file mode 100644
index 0f565bc1db..0000000000
--- a/doc/common/ps.gif
+++ /dev/null
Binary files differ
diff --git a/doc/common/setup.texi b/doc/common/setup.texi
deleted file mode 100644
index 38ff545f7f..0000000000
--- a/doc/common/setup.texi
+++ /dev/null
@@ -1,75 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@c
-@c Set Variables
-@c
-
-@set RTEMS-RELEASE 20000104
-@set RTEMS-EDITION 20000104
-@set RTEMS-VERSION 20000104
-@set RTEMS-UPDATE-DATE January 4 2000
-@set RTEMS-UPDATE-MONTH January 2000
-
-@c
-@c The following determines which set of the tables and figures we will use.
-@c We default to ASCII but if available TeX or HTML versions will
-@c be used instead.
-@c
-
-@set use-ascii
-@clear use-html
-@clear use-tex
-
-@iftex
-@clear use-ascii
-@clear use-html
-@set use-tex
-@end iftex
-
-@ifhtml
-@clear use-ascii
-@clear use-tex
-@set use-html
-@end ifhtml
-
-@c
-@c The following variable says to use texinfo or html for the two column
-@c texinfo tables. For somethings the format does not look good in html.
-@c With our adjustment to the left column in TeX, it nearly always looks
-@c good printed.
-@c
-@ifset use-ascii
-@set use-texinfo-tables
-@end ifset
-@ifset use-tex
-@set use-texinfo-tables
-@end ifset
-@ifset use-html
-@clear use-texinfo-tables
-@end ifset
-
-@c
-@c Custom whitespace adjustments. We could fiddle a bit more.
-@c
-@tex
-\global\parindent 0in
-\global\chapheadingskip = 15pt plus 4pt minus 2pt
-\global\secheadingskip = 12pt plus 4pt minus 2pt
-\global\subsecheadingskip = 9pt plus 4pt minus 2pt
-\global\hbadness = 10000
-\global\tolerance = 6000
-\global\tableindent = 1.5in
-\global\itemindent = 0.5in
-
-@ifclear smallbook
-\global\parskip 6pt plus 1pt
-@end ifclear
-@end tex
-
-
diff --git a/doc/common/timemac.texi b/doc/common/timemac.texi
deleted file mode 100644
index 3a98a12bf2..0000000000
--- a/doc/common/timemac.texi
+++ /dev/null
@@ -1,36 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-@c
-@c Macros to help with the tables in this file
-@c
-
-@tex
-\global\advance \smallskipamount by -4pt
-
-\global\def\rtemstimetable{
-\vrule\strut##&
-\hbox to 3.0in{\enskip##\hfil}&
-\hbox to 0.75in{\enskip##\hfil}&
-\vrule##\cr
-\noalign{\hrule}
-}
-
-\global\def\rtemsendtimetable{}
-\global\def\rtemsonecase#1#2{
-& \bf #1\hfil& #2 & \cr\noalign{\hrule}
-}
-
-\global\def\rtemsdirective#1{
-& \bf #1 \hfil& & \cr\noalign{\hrule}
-}
-
-\global\def\rtemscase#1#2{
-& \hskip 0.3in #1\hfil& #2 & \cr\noalign{\hrule}
-}
-
-@end tex
diff --git a/doc/common/timetbl.t b/doc/common/timetbl.t
deleted file mode 100644
index a190cbad1b..0000000000
--- a/doc/common/timetbl.t
+++ /dev/null
@@ -1,1330 +0,0 @@
-@c ****** This comment is here to remind you not to edit the timetbl.t
-@c ****** in any directory but common.
-@c
-@c Time Table Template
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@ifset use-tex
-@sp 1
-@tex
-\centerline{\vbox{\offinterlineskip\halign{
-\span\rtemstimetable
-\rtemsonecase{No Floating Point Contexts}{RTEMS_NO_FP_CONTEXTS}
-\rtemsdirective{Floating Point Contexts}
-\rtemscase{restore first FP task}{RTEMS_RESTORE_1ST_FP_TASK}
-\rtemscase{save initialized, restore initialized}{RTEMS_SAVE_INIT_RESTORE_INIT}
-\rtemscase{save idle, restore initialized}{RTEMS_SAVE_IDLE_RESTORE_INIT}
-\rtemscase{save idle, restore idle}{RTEMS_SAVE_IDLE_RESTORE_IDLE}
-\rtemsendtimetable
-}}\hfil}
-@end tex
-@end ifset
-
-@ifset use-ascii
-@ifinfo
-@itemize @bullet
-@item No Floating Point Contexts
-@itemize -
-@item only case: RTEMS_NO_FP_CONTEXTS
-@end itemize
-@item Floating Point Contexts
-@itemize -
-@item restore first FP task: RTEMS_RESTORE_1ST_FP_TASK
-@item save initialized, restore initialized: RTEMS_SAVE_INIT_RESTORE_INIT
-@item save idle, restore initialized: RTEMS_SAVE_IDLE_RESTORE_INIT
-@item save idle, restore idle: RTEMS_SAVE_IDLE_RESTORE_INIT
-@end itemize
-@end itemize
-@end ifinfo
-@end ifset
-
-@ifset use-html
-@html
-<CENTER>
- <TABLE COLS=2 WIDTH="80%" BORDER=2>
-<TR><TD ALIGN=left><STRONG>No Floating Point Contexts</STRONG></TD>
- <TD ALIGN=center>RTEMS_NO_FP_CONTEXTS</TD></TR>
-<TR><TD ALIGN=left COLSPAN=2><STRONG>Floating Point Contexts</TR>
- <TR><TD ALIGN=left><dd>restore first FP task</TD>
- <TD ALIGN=center>RTEMS_RESTORE_1ST_FP_TASK</TD>
- <TR><TD ALIGN=left><dd>save initialized, restore initialized</TD>
- <TD ALIGN=center>RTEMS_SAVE_INIT_RESTORE_INIT</TD>
- <TR><TD ALIGN=left><dd>save idle, restore initialized</TD>
- <TD ALIGN=center>RTEMS_SAVE_IDLE_RESTORE_INIT</TD>
- <TR><TD ALIGN=left><dd>save idle, restore idle</TD>
- <TD ALIGN=center>RTEMS_SAVE_IDLE_RESTORE_IDLE</TD>
- </TABLE>
-</CENTER>
-@end html
-@end ifset
-
-@section Directive Times
-
-This sections is divided into a number of
-subsections, each of which contains a table listing the
-execution times of that manager's directives.
-
-@page
-@section Task Manager
-
-@ifset use-tex
-@tex
-\centerline{\vbox{\offinterlineskip\halign{
-\span\rtemstimetable
-\rtemsonecase{TASK\_CREATE}{RTEMS_TASK_CREATE_ONLY}
-\rtemsonecase{TASK\_IDENT}{RTEMS_TASK_IDENT_ONLY}
-\rtemsonecase{TASK\_START}{RTEMS_TASK_START_ONLY}
-\rtemsdirective{TASK\_RESTART}
-\rtemscase{calling task}{RTEMS_TASK_RESTART_CALLING_TASK}
-\rtemscase{suspended task -- returns to caller}
- {RTEMS_TASK_RESTART_SUSPENDED_RETURNS_TO_CALLER}
-\rtemscase{blocked task -- returns to caller}
- {RTEMS_TASK_RESTART_BLOCKED_RETURNS_TO_CALLER}
-\rtemscase{ready task -- returns to caller}
- {RTEMS_TASK_RESTART_READY_RETURNS_TO_CALLER}
-\rtemscase{suspended task -- preempts caller}
- {RTEMS_TASK_RESTART_SUSPENDED_PREEMPTS_CALLER}
-\rtemscase{blocked task -- preempts caller}
- {RTEMS_TASK_RESTART_BLOCKED_PREEMPTS_CALLER}
-\rtemscase{ready task -- preempts caller}
- {RTEMS_TASK_RESTART_READY_PREEMPTS_CALLER}
-\rtemsdirective{TASK\_DELETE}
-\rtemscase{calling task}{RTEMS_TASK_DELETE_CALLING_TASK}
-\rtemscase{suspended task}{RTEMS_TASK_DELETE_SUSPENDED_TASK}
-\rtemscase{blocked task}{RTEMS_TASK_DELETE_BLOCKED_TASK}
-\rtemscase{ready task}{RTEMS_TASK_DELETE_READY_TASK}
-\rtemsdirective{TASK\_SUSPEND}
-\rtemscase{calling task}{RTEMS_TASK_SUSPEND_CALLING_TASK}
-\rtemscase{returns to caller}{RTEMS_TASK_SUSPEND_RETURNS_TO_CALLER}
-\rtemsdirective{TASK\_RESUME}
-\rtemscase{task readied -- returns to caller}
- {RTEMS_TASK_RESUME_TASK_READIED_RETURNS_TO_CALLER}
-\rtemscase{task readied -- preempts caller}
- {RTEMS_TASK_RESUME_TASK_READIED_PREEMPTS_CALLER}
-\rtemsdirective{TASK\_SET\_PRIORITY}
-\rtemscase{obtain current priority}
- {RTEMS_TASK_SET_PRIORITY_OBTAIN_CURRENT_PRIORITY}
-\rtemscase{returns to caller}{RTEMS_TASK_SET_PRIORITY_RETURNS_TO_CALLER}
-\rtemscase{preempts caller}{RTEMS_TASK_SET_PRIORITY_PREEMPTS_CALLER}
-\rtemsdirective{TASK\_MODE}
-\rtemscase{obtain current mode}{RTEMS_TASK_MODE_OBTAIN_CURRENT_MODE}
-\rtemscase{no reschedule}{RTEMS_TASK_MODE_NO_RESCHEDULE}
-\rtemscase{reschedule -- returns to caller}
- {RTEMS_TASK_MODE_RESCHEDULE_RETURNS_TO_CALLER}
-\rtemscase{reschedule -- preempts caller}
- {RTEMS_TASK_MODE_RESCHEDULE_PREEMPTS_CALLER}
-\rtemsonecase{TASK\_GET\_NOTE}{RTEMS_TASK_GET_NOTE_ONLY}
-\rtemsonecase{TASK\_SET\_NOTE}{RTEMS_TASK_SET_NOTE_ONLY}
-\rtemsdirective{TASK\_WAKE\_AFTER}
-\rtemscase{yield -- returns to caller}
- {RTEMS_TASK_WAKE_AFTER_YIELD_RETURNS_TO_CALLER}
-\rtemscase{yield -- preempts caller}
- {RTEMS_TASK_WAKE_AFTER_YIELD_PREEMPTS_CALLER}
-\rtemsonecase{TASK\_WAKE\_WHEN}{RTEMS_TASK_WAKE_WHEN_ONLY}
-\rtemsendtimetable
-}}\hfil}
-@end tex
-@end ifset
-
-@ifset use-ascii
-@ifinfo
-@itemize @bullet
-
-@item TASK_CREATE
-@itemize -
-@item only case: RTEMS_TASK_CREATE_ONLY
-@end itemize
-
-@item TASK_IDENT
-@itemize -
-@item only case: RTEMS_TASK_IDENT_ONLY
-@end itemize
-
-@item TASK_START
-@itemize -
-@item only case: RTEMS_TASK_START_ONLY
-@end itemize
-
-@item TASK_RESTART
-@itemize -
-@item calling task: RTEMS_TASK_RESTART_CALLING_TASK
-@item suspended task -- returns to caller: RTEMS_TASK_RESTART_SUSPENDED_RETURNS_TO_CALLER
-@item blocked task -- returns to caller: RTEMS_TASK_RESTART_BLOCKED_RETURNS_TO_CALLER
-@item ready task -- returns to caller: RTEMS_TASK_RESTART_READY_RETURNS_TO_CALLER
-@item suspended task -- preempts caller: RTEMS_TASK_RESTART_SUSPENDED_PREEMPTS_CALLER
-@item blocked task -- preempts caller: RTEMS_TASK_RESTART_BLOCKED_PREEMPTS_CALLER
-@item ready task -- preempts caller: RTEMS_TASK_RESTART_READY_PREEMPTS_CALLER
-@end itemize
-
-@item TASK_DELETE
-@itemize -
-@item calling task: RTEMS_TASK_DELETE_CALLING_TASK
-@item suspended task: RTEMS_TASK_DELETE_SUSPENDED_TASK
-@item blocked task: RTEMS_TASK_DELETE_BLOCKED_TASK
-@item ready task: RTEMS_TASK_DELETE_READY_TASK
-@end itemize
-
-@item TASK_SUSPEND
-@itemize -
-@item calling task: RTEMS_TASK_SUSPEND_CALLING_TASK
-@item returns to caller: RTEMS_TASK_SUSPEND_RETURNS_TO_CALLER
-@end itemize
-
-@item TASK_RESUME
-@itemize -
-@item task readied -- returns to caller: RTEMS_TASK_RESUME_TASK_READIED_RETURNS_TO_CALLER
-@item task readied -- preempts caller: RTEMS_TASK_RESUME_TASK_READIED_PREEMPTS_CALLER
-@end itemize
-
-@item TASK_SET_PRIORITY
-@itemize -
-@item obtain current priority: RTEMS_TASK_SET_PRIORITY_OBTAIN_CURRENT_PRIORITY
-@item returns to caller: RTEMS_TASK_SET_PRIORITY_RETURNS_TO_CALLER
-@item preempts caller: RTEMS_TASK_SET_PRIORITY_PREEMPTS_CALLER
-@end itemize
-
-@item TASK_MODE
-@itemize -
-@item obtain current mode: RTEMS_TASK_MODE_OBTAIN_CURRENT_MODE
-@item no reschedule: RTEMS_TASK_MODE_NO_RESCHEDULE
-@item reschedule -- returns to caller: RTEMS_TASK_MODE_RESCHEDULE_RETURNS_TO_CALLER
-@item reschedule -- preempts caller: RTEMS_TASK_MODE_RESCHEDULE_PREEMPTS_CALLER
-@end itemize
-
-@item TASK_GET_NOTE
-@itemize -
-@item only case: RTEMS_TASK_GET_NOTE_ONLY
-@end itemize
-
-@item TASK_SET_NOTE
-@itemize -
-@item only case: RTEMS_TASK_SET_NOTE_ONLY
-@end itemize
-
-@item TASK_WAKE_AFTER
-@itemize -
-@item yield -- returns to caller: RTEMS_TASK_WAKE_AFTER_YIELD_RETURNS_TO_CALLER
-@item yield -- preempts caller: RTEMS_TASK_WAKE_AFTER_YIELD_PREEMPTS_CALLER
-@end itemize
-
-@item TASK_WAKE_WHEN
-@itemize -
-@item only case: RTEMS_TASK_WAKE_WHEN_ONLY
-@end itemize
-
-@end itemize
-@end ifinfo
-@end ifset
-
-@ifset use-html
-@html
-<CENTER>
- <TABLE COLS=2 WIDTH="80%" BORDER=2>
-<TR><TD ALIGN=left><STRONG>TASK_CREATE</STRONG></TD>
- <TD ALIGN=center>RTEMS_TASK_CREATE_ONLY</TD></TR>
-<TR><TD ALIGN=left><STRONG>TASK_IDENT</STRONG></TD>
- <TD ALIGN=center>RTEMS_TASK_IDENT_ONLY</TD></TR>
-<TR><TD ALIGN=left><STRONG>TASK_START</STRONG></TD>
- <TD ALIGN=center>RTEMS_TASK_START_ONLY</TD></TR>
-<TR><TD ALIGN=left COLSPAN=2><STRONG>TASK_RESTART</STRONG></TD></TR>
- <TR><TD ALIGN=left><dd>calling task</TD>
- <TD ALIGN=center>RTEMS_TASK_RESTART_CALLING_TASK</TD></TR>
- <TR><TD ALIGN=left><dd>suspended task -- returns to caller</TD>
- <TD ALIGN=center>RTEMS_TASK_RESTART_SUSPENDED_RETURNS_TO_CALLER</TD></TR>
- <TR><TD ALIGN=left><dd>blocked task -- returns to caller</TD>
- <TD ALIGN=center>RTEMS_TASK_RESTART_BLOCKED_RETURNS_TO_CALLER</TD></TR>
- <TR><TD ALIGN=left><dd>ready task -- returns to caller</TD>
- <TD ALIGN=center>RTEMS_TASK_RESTART_READY_RETURNS_TO_CALLER</TD></TR>
- <TR><TD ALIGN=left><dd>suspended task -- preempts caller</TD>
- <TD ALIGN=center>RTEMS_TASK_RESTART_SUSPENDED_PREEMPTS_CALLER</TD></TR>
- <TR><TD ALIGN=left><dd>blocked task -- preempts caller</TD>
- <TD ALIGN=center>RTEMS_TASK_RESTART_BLOCKED_PREEMPTS_CALLER</TD></TR>
- <TR><TD ALIGN=left><dd>ready task -- preempts caller</TD>
- <TD ALIGN=center>RTEMS_TASK_RESTART_READY_PREEMPTS_CALLER</TD></TR>
-<TR><TD ALIGN=left COLSPAN=2><STRONG>TASK_DELETE</STRONG></TD></TR>
- <TR><TD ALIGN=left><dd>calling task</TD>
- <TD ALIGN=center>RTEMS_TASK_DELETE_CALLING_TASK</TD></TR>
- <TR><TD ALIGN=left><dd>suspended task</TD>
- <TD ALIGN=center>RTEMS_TASK_DELETE_SUSPENDED_TASK</TD></TR>
- <TR><TD ALIGN=left><dd>blocked task</TD>
- <TD ALIGN=center>RTEMS_TASK_DELETE_BLOCKED_TASK</TD></TR>
- <TR><TD ALIGN=left><dd>ready task</TD>
- <TD ALIGN=center>RTEMS_TASK_DELETE_READY_TASK</TD></TR>
-<TR><TD ALIGN=left COLSPAN=2><STRONG>TASK_SUSPEND</STRONG></TD></TR>
- <TR><TD ALIGN=left><dd>calling task</TD>
- <TD ALIGN=center>RTEMS_TASK_SUSPEND_CALLING_TASK</TD></TR>
- <TR><TD ALIGN=left><dd>returns to caller</TD>
- <TD ALIGN=center>RTEMS_TASK_SUSPEND_RETURNS_TO_CALLER</TD></TR>
-<TR><TD ALIGN=left COLSPAN=2><STRONG>TASK_RESUME</STRONG></TD></TR>
- <TR><TD ALIGN=left><dd>task readied -- returns to caller</TD>
- <TD ALIGN=center>RTEMS_TASK_RESUME_TASK_READIED_RETURNS_TO_CALLER</TD></TR>
- <TR><TD ALIGN=left><dd>task readied -- preempts caller</TD>
- <TD ALIGN=center>RTEMS_TASK_RESUME_TASK_READIED_PREEMPTS_CALLER</TD></TR>
-<TR><TD ALIGN=left COLSPAN=2><STRONG>TASK_SET_PRIORITY</STRONG></TD></TR>
- <TR><TD ALIGN=left><dd>obtain current priority</TD>
- <TD ALIGN=center>RTEMS_TASK_SET_PRIORITY_OBTAIN_CURRENT_PRIORITY</TD></TR>
- <TR><TD ALIGN=left><dd>returns to caller</TD>
- <TD ALIGN=center>RTEMS_TASK_SET_PRIORITY_RETURNS_TO_CALLER</TD></TR>
- <TR><TD ALIGN=left><dd>preempts caller</TD>
- <TD ALIGN=center>RTEMS_TASK_SET_PRIORITY_PREEMPTS_CALLER</TD></TR>
-<TR><TD ALIGN=left COLSPAN=2><STRONG>TASK_MODE</STRONG></TD></TR>
- <TR><TD ALIGN=left><dd>obtain current mode</TD>
- <TD ALIGN=center>RTEMS_TASK_MODE_OBTAIN_CURRENT_MODE</TD></TR>
- <TR><TD ALIGN=left><dd>no reschedule</TD>
- <TD ALIGN=center>RTEMS_TASK_MODE_NO_RESCHEDULE</TD></TR>
- <TR><TD ALIGN=left><dd>reschedule -- returns to caller</TD>
- <TD ALIGN=center>RTEMS_TASK_MODE_RESCHEDULE_RETURNS_TO_CALLER</TD></TR>
- <TR><TD ALIGN=left><dd>reschedule -- preempts caller</TD>
- <TD ALIGN=center>RTEMS_TASK_MODE_RESCHEDULE_PREEMPTS_CALLER</TD></TR>
-<TR><TD ALIGN=left><STRONG>TASK_GET_NOTE</STRONG></TD>
- <TD ALIGN=center>RTEMS_TASK_GET_NOTE_ONLY</TD></TR>
-<TR><TD ALIGN=left><STRONG>TASK_SET_NOTE</STRONG></TD>
- <TD ALIGN=center>RTEMS_TASK_SET_NOTE_ONLY</TD></TR>
-<TR><TD ALIGN=left COLSPAN=2><STRONG>TASK_WAKE_AFTER</STRONG></TD></TR>
- <TR><TD ALIGN=left><dd>yield -- returns to caller</TD>
- <TD ALIGN=center>RTEMS_TASK_WAKE_AFTER_YIELD_RETURNS_TO_CALLER</TD></TR>
- <TR><TD ALIGN=left><dd>yield -- preempts caller</TD>
- <TD ALIGN=center>RTEMS_TASK_WAKE_AFTER_YIELD_PREEMPTS_CALLER</TD></TR>
-<TR><TD ALIGN=left><STRONG>TASK_WAKE_WHEN</STRONG></TD>
- <TD ALIGN=center>RTEMS_TASK_WAKE_WHEN_ONLY</TD></TR>
- </TABLE>
-</CENTER>
-@end html
-@end ifset
-
-@page
-@section Interrupt Manager
-
-It should be noted that the interrupt entry times
-include vectoring the interrupt handler.
-
-@ifset use-tex
-@sp 1
-@tex
-\centerline{\vbox{\offinterlineskip\halign{
-\span\rtemstimetable
-\rtemsdirective{Interrupt Entry Overhead}
-\rtemscase{returns to nested interrupt}{RTEMS_INTR_ENTRY_RETURNS_TO_NESTED}
-\rtemscase{returns to interrupted task}
- {RTEMS_INTR_ENTRY_RETURNS_TO_INTERRUPTED_TASK}
-\rtemscase{returns to preempting task}
- {RTEMS_INTR_ENTRY_RETURNS_TO_PREEMPTING_TASK}
-\rtemsdirective{Interrupt Exit Overhead}
-\rtemscase{returns to nested interrupt}{RTEMS_INTR_EXIT_RETURNS_TO_NESTED}
-\rtemscase{returns to interrupted task}
- {RTEMS_INTR_EXIT_RETURNS_TO_INTERRUPTED_TASK}
-\rtemscase{returns to preempting task}
- {RTEMS_INTR_EXIT_RETURNS_TO_PREEMPTING_TASK}
-\rtemsendtimetable
-}}\hfil}
-@end tex
-@end ifset
-
-@ifset use-ascii
-@ifinfo
-@itemize @bullet
-
-@item Interrupt Entry Overhead
-@itemize -
-@item returns to nested interrupt: RTEMS_INTR_ENTRY_RETURNS_TO_NESTED
-@item returns to interrupted task: RTEMS_INTR_ENTRY_RETURNS_TO_INTERRUPTED_TASK
-@item returns to preempting task: RTEMS_INTR_ENTRY_RETURNS_TO_PREEMPTING_TASK
-@end itemize
-
-@item Interrupt Exit Overhead
-@itemize -
-@item returns to nested interrupt: RTEMS_INTR_EXIT_RETURNS_TO_NESTED
-@item returns to interrupted task: RTEMS_INTR_EXIT_RETURNS_TO_INTERRUPTED_TASK
-@item returns to preempting task: RTEMS_INTR_EXIT_RETURNS_TO_PREEMPTING_TASK
-@end itemize
-
-@end itemize
-@end ifinfo
-@end ifset
-
-@ifset use-html
-@html
-<CENTER>
- <TABLE COLS=2 WIDTH="80%" BORDER=2>
-<TR><TD ALIGN=left COLSPAN=2><STRONG>Interrupt Entry Overhead</STRONG></TD></TR>
- <TR><TD ALIGN=left><dd>returns to nested interrupt</TD>
- <TD ALIGN=center>RTEMS_INTR_ENTRY_RETURNS_TO_NESTED</TD></TR>
- <TR><TD ALIGN=left><dd>returns to interrupted task</TD>
- <TD ALIGN=center>RTEMS_INTR_ENTRY_RETURNS_TO_INTERRUPTED_TASK</TD></TR>
- <TR><TD ALIGN=left><dd>returns to preempting task</TD>
- <TD ALIGN=center>RTEMS_INTR_ENTRY_RETURNS_TO_PREEMPTING_TASK</TD></TR>
-<TR><TD ALIGN=left COLSPAN=2><STRONG>Interrupt Exit Overhead</STRONG></TD></TR>
- <TR><TD ALIGN=left><dd>returns to nested interrupt</TD>
- <TD ALIGN=center>RTEMS_INTR_EXIT_RETURNS_TO_NESTED</TD></TR>
- <TR><TD ALIGN=left><dd>returns to interrupted task</TD>
- <TD ALIGN=center>RTEMS_INTR_EXIT_RETURNS_TO_INTERRUPTED_TASK</TD></TR>
- <TR><TD ALIGN=left><dd>returns to preempting task</TD>
- <TD ALIGN=center>RTEMS_INTR_EXIT_RETURNS_TO_PREEMPTING_TASK</TD></TR>
- </TABLE>
-</CENTER>
-@end html
-@end ifset
-
-
-@section Clock Manager
-
-@ifset use-tex
-@tex
-\centerline{\vbox{\offinterlineskip\halign{
-\span\rtemstimetable
-\rtemsonecase{CLOCK\_SET}{RTEMS_CLOCK_SET_ONLY}
-\rtemsonecase{CLOCK\_GET}{RTEMS_CLOCK_GET_ONLY}
-\rtemsonecase{CLOCK\_TICK}{RTEMS_CLOCK_TICK_ONLY}
-\rtemsendtimetable
-}}\hfil}
-@end tex
-@end ifset
-
-@ifset use-ascii
-@ifinfo
-@itemize @bullet
-
-@item CLOCK_SET
-@itemize -
-@item only case: RTEMS_CLOCK_SET_ONLY
-@end itemize
-
-@item CLOCK_GET
-@itemize -
-@item only case: RTEMS_CLOCK_GET_ONLY
-@end itemize
-
-@item CLOCK_TICK
-@itemize -
-@item only case: RTEMS_CLOCK_TICK_ONLY
-@end itemize
-
-@end itemize
-@end ifinfo
-@end ifset
-
-@ifset use-html
-@html
-<CENTER>
- <TABLE COLS=2 WIDTH="80%" BORDER=2>
-<TR><TD ALIGN=left><STRONG>CLOCK_SET</STRONG></TD>
- <TD ALIGN=center>RTEMS_CLOCK_SET_ONLY</TD></TR>
-<TR><TD ALIGN=left><STRONG>CLOCK_GET</STRONG></TD>
- <TD ALIGN=center>RTEMS_CLOCK_GET_ONLY</TD></TR>
-<TR><TD ALIGN=left><STRONG>CLOCK_TICK</STRONG></TD>
- <TD ALIGN=center>RTEMS_CLOCK_TICK_ONLY</TD></TR>
- </TABLE>
-</CENTER>
-@end html
-@end ifset
-
-@section Timer Manager
-
-@ifset use-tex
-@tex
-\centerline{\vbox{\offinterlineskip\halign{
-\span\rtemstimetable
-\rtemsonecase{TIMER\_CREATE}{RTEMS_TIMER_CREATE_ONLY}
-\rtemsonecase{TIMER\_IDENT}{RTEMS_TIMER_IDENT_ONLY}
-\rtemsdirective{TIMER\_DELETE}
-\rtemscase{inactive}{RTEMS_TIMER_DELETE_INACTIVE}
-\rtemscase{active}{RTEMS_TIMER_DELETE_ACTIVE}
-\rtemsdirective{TIMER\_FIRE\_AFTER}
-\rtemscase{inactive}{RTEMS_TIMER_FIRE_AFTER_INACTIVE}
-\rtemscase{active}{RTEMS_TIMER_FIRE_AFTER_ACTIVE}
-\rtemsdirective{TIMER\_FIRE\_WHEN}
-\rtemscase{inactive}{RTEMS_TIMER_FIRE_WHEN_INACTIVE}
-\rtemscase{active}{RTEMS_TIMER_FIRE_WHEN_ACTIVE}
-\rtemsdirective{TIMER\_RESET}
-\rtemscase{inactive}{RTEMS_TIMER_RESET_INACTIVE}
-\rtemscase{active}{RTEMS_TIMER_RESET_ACTIVE}
-\rtemsdirective{TIMER\_CANCEL}
-\rtemscase{inactive}{RTEMS_TIMER_CANCEL_INACTIVE}
-\rtemscase{active}{RTEMS_TIMER_CANCEL_ACTIVE}
-\rtemsendtimetable
-}}\hfil}
-@end tex
-@end ifset
-
-@ifset use-ascii
-@ifinfo
-@itemize @bullet
-
-@item TIMER_CREATE
-@itemize -
-@item only case: RTEMS_TIMER_CREATE_ONLY
-@end itemize
-
-@item TIMER_IDENT
-@itemize -
-@item only case: RTEMS_TIMER_IDENT_ONLY
-@end itemize
-
-@item TIMER_DELETE
-@itemize -
-@item inactive: RTEMS_TIMER_DELETE_INACTIVE
-@item active: RTEMS_TIMER_DELETE_ACTIVE
-@end itemize
-
-@item TIMER_FIRE_AFTER
-@itemize -
-@item inactive: RTEMS_TIMER_FIRE_AFTER_INACTIVE
-@item active: RTEMS_TIMER_FIRE_AFTER_ACTIVE
-@end itemize
-
-@item TIMER_FIRE_WHEN
-@itemize -
-@item inactive: TIMER_FIRE_WHEN_INACTIVE
-@item active: TIMER_FIRE_WHEN_ACTIVE
-@end itemize
-
-@item TIMER_RESET
-@itemize -
-@item inactive: TIMER_RESET_INACTIVE
-@item active: TIMER_RESET_ACTIVE
-@end itemize
-
-@item TIMER_CANCEL
-@itemize -
-@item inactive: TIMER_CANCEL_INACTIVE
-@item active: TIMER_CANCEL_ACTIVE
-@end itemize
-
-@end itemize
-@end ifinfo
-@end ifset
-
-@ifset use-html
-@html
-<CENTER>
- <TABLE COLS=2 WIDTH="80%" BORDER=2>
-<TR><TD ALIGN=left><STRONG>TIMER_CREATE</STRONG></TD>
- <TD ALIGN=center>RTEMS_TIMER_CREATE_ONLY</TD></TR>
-<TR><TD ALIGN=left><STRONG>TIMER_IDENT</STRONG></TD>
- <TD ALIGN=center>RTEMS_TIMER_IDENT_ONLY</TD></TR>
-<TR><TD ALIGN=left COLSPAN=2><STRONG>TIMER_DELETE</STRONG></TD></TR>
- <TR><TD ALIGN=left><dd>inactive</TD>
- <TD ALIGN=center>RTEMS_TIMER_DELETE_INACTIVE</TD></TR>
- <TR><TD ALIGN=left><dd>active</TD>
- <TD ALIGN=center>RTEMS_TIMER_DELETE_ACTIVE</TD></TR>
-<TR><TD ALIGN=left COLSPAN=2><STRONG>TIMER_FIRE_AFTER</STRONG></TD></TR>
- <TR><TD ALIGN=left><dd>inactive</TD>
- <TD ALIGN=center>RTEMS_TIMER_FIRE_AFTER_INACTIVE</TD></TR>
- <TR><TD ALIGN=left><dd>active</TD>
- <TD ALIGN=center>RTEMS_TIMER_FIRE_AFTER_ACTIVE</TD></TR>
-<TR><TD ALIGN=left COLSPAN=2><STRONG>TIMER_FIRE_WHEN</STRONG></TD></TR>
- <TR><TD ALIGN=left><dd>inactive</TD>
- <TD ALIGN=center>RTEMS_TIMER_FIRE_WHEN_INACTIVE</TD></TR>
- <TR><TD ALIGN=left><dd>active</TD>
- <TD ALIGN=center>RTEMS_TIMER_FIRE_WHEN_ACTIVE</TD></TR>
-<TR><TD ALIGN=left COLSPAN=2><STRONG>TIMER_RESET</STRONG></TD></TR>
- <TR><TD ALIGN=left><dd>inactive</TD>
- <TD ALIGN=center>RTEMS_TIMER_RESET_INACTIVE</TD></TR>
- <TR><TD ALIGN=left><dd>active</TD>
- <TD ALIGN=center>RTEMS_TIMER_RESET_ACTIVE</TD></TR>
-<TR><TD ALIGN=left COLSPAN=2><STRONG>TIMER_CANCEL</STRONG></TD></TR>
- <TR><TD ALIGN=left><dd>inactive</TD>
- <TD ALIGN=center>RTEMS_TIMER_CANCEL_INACTIVE</TD></TR>
- <TR><TD ALIGN=left><dd>active</TD>
- <TD ALIGN=center>RTEMS_TIMER_CANCEL_ACTIVE</TD></TR>
- </TABLE>
-</CENTER>
-@end html
-@end ifset
-
-@page
-@section Semaphore Manager
-
-@ifset use-tex
-@tex
-\centerline{\vbox{\offinterlineskip\halign{
-\span\rtemstimetable
-\rtemsonecase{SEMAPHORE\_CREATE}{RTEMS_SEMAPHORE_CREATE_ONLY}
-\rtemsonecase{SEMAPHORE\_IDENT}{RTEMS_SEMAPHORE_IDENT_ONLY}
-\rtemsonecase{SEMAPHORE\_DELETE}{RTEMS_SEMAPHORE_DELETE_ONLY}
-\rtemsdirective{SEMAPHORE\_OBTAIN}
-\rtemscase{available}{RTEMS_SEMAPHORE_OBTAIN_AVAILABLE}
-\rtemscase{not available -- NO\_WAIT}
- {RTEMS_SEMAPHORE_OBTAIN_NOT_AVAILABLE_NO_WAIT}
-\rtemscase{not available -- caller blocks}
- {RTEMS_SEMAPHORE_OBTAIN_NOT_AVAILABLE_CALLER_BLOCKS}
-\rtemsdirective{SEMAPHORE\_RELEASE}
-\rtemscase{no waiting tasks}{RTEMS_SEMAPHORE_RELEASE_NO_WAITING_TASKS}
-\rtemscase{task readied -- returns to caller}
- {RTEMS_SEMAPHORE_RELEASE_TASK_READIED_RETURNS_TO_CALLER}
-\rtemscase{task readied -- preempts caller}
- {RTEMS_SEMAPHORE_RELEASE_TASK_READIED_PREEMPTS_CALLER}
-\rtemsendtimetable
-}}\hfil}
-@end tex
-@end ifset
-
-@ifset use-ascii
-@ifinfo
-@itemize @bullet
-
-@item SEMAPHORE_CREATE
-@itemize -
-@item only case: RTEMS_SEMAPHORE_CREATE_ONLY
-@end itemize
-
-@item SEMAPHORE_IDENT
-@itemize -
-@item only case: RTEMS_SEMAPHORE_IDENT_ONLY
-@end itemize
-
-@item SEMAPHORE_DELETE
-@itemize -
-@item only case: RTEMS_SEMAPHORE_DELETE_ONLY
-@end itemize
-
-@item SEMAPHORE_OBTAIN
-@itemize -
-@item available: RTEMS_SEMAPHORE_OBTAIN_AVAILABLE
-@item not available -- NO_WAIT: RTEMS_SEMAPHORE_OBTAIN_NOT_AVAILABLE_NO_WAIT
-@item not available -- caller blocks: RTEMS_SEMAPHORE_OBTAIN_NOT_AVAILABLE_CALLER_BLOCKS
-@end itemize
-
-@item SEMAPHORE_RELEASE
-@itemize -
-@item no waiting tasks: RTEMS_SEMAPHORE_RELEASE_NO_WAITING_TASKS
-@item task readied -- returns to caller: RTEMS_SEMAPHORE_RELEASE_TASK_READIED_RETURNS_TO_CALLER
-@item task readied -- preempts caller: RTEMS_SEMAPHORE_RELEASE_TASK_READIED_PREEMPTS_CALLER
-@end itemize
-
-@end itemize
-@end ifinfo
-@end ifset
-
-@ifset use-html
-@html
-<CENTER>
- <TABLE COLS=2 WIDTH="80%" BORDER=2>
-<TR><TD ALIGN=left><STRONG>SEMAPHORE_CREATE</STRONG></TD>
- <TD ALIGN=center>RTEMS_SEMAPHORE_CREATE_ONLY</TD></TR>
-<TR><TD ALIGN=left><STRONG>SEMAPHORE_IDENT</STRONG></TD>
- <TD ALIGN=center>RTEMS_SEMAPHORE_IDENT_ONLY</TD></TR>
-<TR><TD ALIGN=left><STRONG>SEMAPHORE_DELETE</STRONG></TD>
- <TD ALIGN=center>RTEMS_SEMAPHORE_DELETE_ONLY</TD></TR>
-<TR><TD ALIGN=left COLSPAN=2><STRONG>SEMAPHORE_OBTAIN</STRONG></TD></TR>
- <TR><TD ALIGN=left><dd>available</TD>
- <TD ALIGN=center>RTEMS_SEMAPHORE_OBTAIN_AVAILABLE</TD></TR>
- <TR><TD ALIGN=left><dd>not available -- NO_WAIT</TD>
- <TD ALIGN=center>RTEMS_SEMAPHORE_OBTAIN_NOT_AVAILABLE_NO_WAIT</TD></TR>
- <TR><TD ALIGN=left><dd>not available -- caller blocks</TD>
- <TD ALIGN=center>RTEMS_SEMAPHORE_OBTAIN_NOT_AVAILABLE_CALLER_BLOCKS</TD></TR>
-<TR><TD ALIGN=left COLSPAN=2><STRONG>SEMAPHORE_RELEASE</STRONG></TD></TR>
- <TR><TD ALIGN=left><dd>no waiting tasks</TD>
- <TD ALIGN=center>RTEMS_SEMAPHORE_RELEASE_NO_WAITING_TASKS</TD></TR>
- <TR><TD ALIGN=left><dd>task readied -- returns to caller</TD>
- <TD ALIGN=center>RTEMS_SEMAPHORE_RELEASE_TASK_READIED_RETURNS_TO_CALLER</TD></TR>
- <TR><TD ALIGN=left><dd>task readied -- preempts caller</TD>
- <TD ALIGN=center>RTEMS_SEMAPHORE_RELEASE_TASK_READIED_PREEMPTS_CALLER</TD></TR>
- </TABLE>
-</CENTER>
-@end html
-@end ifset
-
-@section Message Manager
-
-@ifset use-tex
-@tex
-\centerline{\vbox{\offinterlineskip\halign{
-\span\rtemstimetable
-\rtemsonecase{MESSAGE\_QUEUE\_CREATE}{RTEMS_MESSAGE_QUEUE_CREATE_ONLY}
-\rtemsonecase{MESSAGE\_QUEUE\_IDENT}{RTEMS_MESSAGE_QUEUE_IDENT_ONLY}
-\rtemsonecase{MESSAGE\_QUEUE\_DELETE}{RTEMS_MESSAGE_QUEUE_DELETE_ONLY}
-\rtemsdirective{MESSAGE\_QUEUE\_SEND}
-\rtemscase{no waiting tasks}
- {RTEMS_MESSAGE_QUEUE_SEND_NO_WAITING_TASKS}
-\rtemscase{task readied -- returns to caller}
- {RTEMS_MESSAGE_QUEUE_SEND_TASK_READIED_RETURNS_TO_CALLER}
-\rtemscase{task readied -- preempts caller}
- {RTEMS_MESSAGE_QUEUE_SEND_TASK_READIED_PREEMPTS_CALLER}
-\rtemsdirective{MESSAGE\_QUEUE\_URGENT}
-\rtemscase{no waiting tasks}{RTEMS_MESSAGE_QUEUE_URGENT_NO_WAITING_TASKS}
-\rtemscase{task readied -- returns to caller}
- {RTEMS_MESSAGE_QUEUE_URGENT_TASK_READIED_RETURNS_TO_CALLER}
-\rtemscase{task readied -- preempts caller}
- {RTEMS_MESSAGE_QUEUE_URGENT_TASK_READIED_PREEMPTS_CALLER}
-\rtemsdirective{MESSAGE\_QUEUE\_BROADCAST}
-\rtemscase{no waiting tasks}{RTEMS_MESSAGE_QUEUE_BROADCAST_NO_WAITING_TASKS}
-\rtemscase{task readied -- returns to caller}
- {RTEMS_MESSAGE_QUEUE_BROADCAST_TASK_READIED_RETURNS_TO_CALLER}
-\rtemscase{task readied -- preempts caller}
- {RTEMS_MESSAGE_QUEUE_BROADCAST_TASK_READIED_PREEMPTS_CALLER}
-\rtemsdirective{MESSAGE\_QUEUE\_RECEIVE}
-\rtemscase{available}{RTEMS_MESSAGE_QUEUE_RECEIVE_AVAILABLE}
-\rtemscase{not available -- NO\_WAIT}
- {RTEMS_MESSAGE_QUEUE_RECEIVE_NOT_AVAILABLE_NO_WAIT}
-\rtemscase{not available -- caller blocks}
- {RTEMS_MESSAGE_QUEUE_RECEIVE_NOT_AVAILABLE_CALLER_BLOCKS}
-\rtemsdirective{MESSAGE\_QUEUE\_FLUSH}
-\rtemscase{no messages flushed}{RTEMS_MESSAGE_QUEUE_FLUSH_NO_MESSAGES_FLUSHED}
-\rtemscase{messages flushed}{RTEMS_MESSAGE_QUEUE_FLUSH_MESSAGES_FLUSHED}
-\rtemsendtimetable
-}}\hfil}
-@end tex
-@end ifset
-
-@ifset use-ascii
-@ifinfo
-@itemize @bullet
-
-@item MESSAGE_QUEUE_CREATE
-@itemize -
-@item only case: RTEMS_MESSAGE_QUEUE_CREATE_ONLY
-@end itemize
-
-@item MESSAGE_QUEUE_IDENT
-@itemize -
-@item only case: RTEMS_MESSAGE_QUEUE_IDENT_ONLY
-@end itemize
-
-@item MESSAGE_QUEUE_DELETE
-@itemize -
-@item only case: RTEMS_MESSAGE_QUEUE_DELETE_ONLY
-@end itemize
-
-@item MESSAGE_QUEUE_SEND
-@itemize -
-@item no waiting tasks: RTEMS_MESSAGE_QUEUE_SEND_NO_WAITING_TASKS
-@item task readied -- returns to caller: RTEMS_MESSAGE_QUEUE_SEND_TASK_READIED_RETURNS_TO_CALLER
-@item task readied -- preempts caller: RTEMS_MESSAGE_QUEUE_SEND_TASK_READIED_PREEMPTS_CALLER
-@end itemize
-
-@item MESSAGE_QUEUE_URGENT
-@itemize -
-@item no waiting tasks: RTEMS_MESSAGE_QUEUE_URGENT_NO_WAITING_TASKS
-@item task readied -- returns to caller: RTEMS_MESSAGE_QUEUE_URGENT_TASK_READIED_RETURNS_TO_CALLER
-@item task readied -- preempts caller: RTEMS_MESSAGE_QUEUE_URGENT_TASK_READIED_PREEMPTS_CALLER
-@end itemize
-
-@item MESSAGE_QUEUE_BROADCAST
-@itemize -
-@item no waiting tasks: RTEMS_MESSAGE_QUEUE_BROADCAST_NO_WAITING_TASKS
-@item task readied -- returns to caller: RTEMS_MESSAGE_QUEUE_BROADCAST_TASK_READIED_RETURNS_TO_CALLER
-@item task readied -- preempts caller: RTEMS_MESSAGE_QUEUE_BROADCAST_TASK_READIED_PREEMPTS_CALLER
-@end itemize
-
-@item MESSAGE_QUEUE_RECEIVE
-@itemize -
-@item available: RTEMS_MESSAGE_QUEUE_RECEIVE_AVAILABLE
-@item not available -- NO_WAIT: RTEMS_MESSAGE_QUEUE_RECEIVE_NOT_AVAILABLE_NO_WAIT
-@item not available -- caller blocks: RTEMS_MESSAGE_QUEUE_RECEIVE_NOT_AVAILABLE_CALLER_BLOCKS
-@end itemize
-
-@item MESSAGE_QUEUE_FLUSH
-@itemize -
-@item no messages flushed: RTEMS_MESSAGE_QUEUE_FLUSH_NO_MESSAGES_FLUSHED
-@item messages flushed: RTEMS_MESSAGE_QUEUE_FLUSH_MESSAGES_FLUSHED
-@end itemize
-
-@end itemize
-@end ifinfo
-@end ifset
-
-@ifset use-html
-@html
-<CENTER>
- <TABLE COLS=2 WIDTH="80%" BORDER=2>
-<TR><TD ALIGN=left><STRONG>MESSAGE_QUEUE_CREATE</STRONG></TD>
- <TD ALIGN=center>RTEMS_MESSAGE_QUEUE_CREATE_ONLY</TD></TR>
-<TR><TD ALIGN=left><STRONG>MESSAGE_QUEUE_IDENT</STRONG></TD>
- <TD ALIGN=center>RTEMS_MESSAGE_QUEUE_IDENT_ONLY</TD></TR>
-<TR><TD ALIGN=left><STRONG>MESSAGE_QUEUE_DELETE</STRONG></TD>
- <TD ALIGN=center>RTEMS_MESSAGE_QUEUE_DELETE_ONLY</TD></TR>
-<TR><TD ALIGN=left COLSPAN=2><STRONG>MESSAGE_QUEUE_SEND</STRONG></TD></TR>
- <TR><TD ALIGN=left><dd>no waiting tasks</TD>
- <TD ALIGN=center>RTEMS_MESSAGE_QUEUE_SEND_NO_WAITING_TASKS</TD></TR>
- <TR><TD ALIGN=left><dd>task readied -- returns to caller</TD>
- <TD ALIGN=center>RTEMS_MESSAGE_QUEUE_SEND_TASK_READIED_RETURNS_TO_CALLER</TD></TR>
- <TR><TD ALIGN=left><dd>task readied -- preempts caller</TD>
- <TD ALIGN=center>RTEMS_MESSAGE_QUEUE_SEND_TASK_READIED_PREEMPTS_CALLER</TD></TR>
-<TR><TD ALIGN=left COLSPAN=2><STRONG>MESSAGE_QUEUE_URGENT</STRONG></TD></TR>
- <TR><TD ALIGN=left><dd>no waiting tasks</TD>
- <TD ALIGN=center>RTEMS_MESSAGE_QUEUE_URGENT_NO_WAITING_TASKS</TD></TR>
- <TR><TD ALIGN=left><dd>task readied -- returns to caller</TD>
- <TD ALIGN=center>RTEMS_MESSAGE_QUEUE_URGENT_TASK_READIED_RETURNS_TO_CALLER</TD></TR>
- <TR><TD ALIGN=left><dd>task readied -- preempts caller</TD>
- <TD ALIGN=center>RTEMS_MESSAGE_QUEUE_URGENT_TASK_READIED_PREEMPTS_CALLER</TD></TR>
-<TR><TD ALIGN=left COLSPAN=2><STRONG>MESSAGE_QUEUE_BROADCAST</STRONG></TD></TR>
- <TR><TD ALIGN=left><dd>no waiting tasks</TD>
- <TD ALIGN=center>RTEMS_MESSAGE_QUEUE_BROADCAST_NO_WAITING_TASKS</TD></TR>
- <TR><TD ALIGN=left><dd>task readied -- returns to caller</TD>
- <TD ALIGN=center>RTEMS_MESSAGE_QUEUE_BROADCAST_TASK_READIED_RETURNS_TO_CALLER</TD></TR>
- <TR><TD ALIGN=left><dd>task readied -- preempts caller</TD>
- <TD ALIGN=center>RTEMS_MESSAGE_QUEUE_BROADCAST_TASK_READIED_PREEMPTS_CALLER</TD></TR>
-<TR><TD ALIGN=left COLSPAN=2><STRONG>MESSAGE_QUEUE_RECEIVE</STRONG></TD></TR>
- <TR><TD ALIGN=left><dd>available</TD>
- <TD ALIGN=center>RTEMS_MESSAGE_QUEUE_RECEIVE_AVAILABLE</TD></TR>
- <TR><TD ALIGN=left><dd>not available -- NO_WAIT</TD>
- <TD ALIGN=center>RTEMS_MESSAGE_QUEUE_RECEIVE_NOT_AVAILABLE_NO_WAIT</TD></TR>
- <TR><TD ALIGN=left><dd>not available -- caller blocks</TD>
- <TD ALIGN=center>RTEMS_MESSAGE_QUEUE_RECEIVE_NOT_AVAILABLE_CALLER_BLOCKS</TD></TR>
-<TR><TD ALIGN=left COLSPAN=2><STRONG>MESSAGE_QUEUE_FLUSH</STRONG></TD></TR>
- <TR><TD ALIGN=left><dd>no messages flushed</TD>
- <TD ALIGN=center>RTEMS_MESSAGE_QUEUE_FLUSH_NO_MESSAGES_FLUSHED</TD></TR>
- <TR><TD ALIGN=left><dd>messages flushed</TD>
- <TD ALIGN=center>RTEMS_MESSAGE_QUEUE_FLUSH_MESSAGES_FLUSHED</TD></TR>
-
- </TABLE>
-</CENTER>
-@end html
-@end ifset
-
-@page
-@section Event Manager
-
-@ifset use-tex
-@tex
-\centerline{\vbox{\offinterlineskip\halign{
-\span\rtemstimetable
-\rtemsdirective{EVENT\_SEND}
-\rtemscase{no task readied}{RTEMS_EVENT_SEND_NO_TASK_READIED}
-\rtemscase{task readied -- returns to caller}
- {RTEMS_EVENT_SEND_TASK_READIED_RETURNS_TO_CALLER}
-\rtemscase{task readied -- preempts caller}
- {RTEMS_EVENT_SEND_TASK_READIED_PREEMPTS_CALLER}
-\rtemsdirective{EVENT\_RECEIVE}
-\rtemscase{obtain current events}{RTEMS_EVENT_RECEIVE_OBTAIN_CURRENT_EVENTS}
-\rtemscase{available}{RTEMS_EVENT_RECEIVE_AVAILABLE}
-\rtemscase{not available -- NO\_WAIT}{RTEMS_EVENT_RECEIVE_NOT_AVAILABLE_NO_WAIT}
-\rtemscase{not available -- caller blocks}
- {RTEMS_EVENT_RECEIVE_NOT_AVAILABLE_CALLER_BLOCKS}
-\rtemsendtimetable
-}}\hfil}
-@end tex
-@end ifset
-
-@ifset use-ascii
-@ifinfo
-@itemize @bullet
-
-@item EVENT_SEND
-@itemize -
-@item no task readied: RTEMS_EVENT_SEND_NO_TASK_READIED
-@item task readied -- returns to caller: RTEMS_EVENT_SEND_TASK_READIED_RETURNS_TO_CALLER
-@item task readied -- preempts caller: RTEMS_EVENT_SEND_TASK_READIED_PREEMPTS_CALLER
-@end itemize
-
-@item EVENT_RECEIVE
-@itemize -
-@item obtain current events: RTEMS_EVENT_RECEIVE_OBTAIN_CURRENT_EVENTS
-@item available: RTEMS_EVENT_RECEIVE_AVAILABLE
-@item not available -- NO_WAIT: RTEMS_EVENT_RECEIVE_NOT_AVAILABLE_NO_WAIT
-@item not available -- caller blocks: RTEMS_EVENT_RECEIVE_NOT_AVAILABLE_CALLER_BLOCKS
-@end itemize
-
-@end itemize
-@end ifinfo
-@end ifset
-
-@ifset use-html
-@html
-<CENTER>
- <TABLE COLS=2 WIDTH="80%" BORDER=2>
-<TR><TD ALIGN=left COLSPAN=2><STRONG>EVENT_SEND</STRONG></TD></TR>
- <TR><TD ALIGN=left><dd>no task readied</TD>
- <TD ALIGN=center>RTEMS_EVENT_SEND_NO_TASK_READIED</TD></TR>
- <TR><TD ALIGN=left><dd>task readied -- returns to caller</TD>
- <TD ALIGN=center>RTEMS_EVENT_SEND_TASK_READIED_RETURNS_TO_CALLER</TD></TR>
- <TR><TD ALIGN=left><dd>task readied -- preempts caller</TD>
- <TD ALIGN=center>RTEMS_EVENT_SEND_TASK_READIED_PREEMPTS_CALLER</TD></TR>
-<TR><TD ALIGN=left COLSPAN=2><STRONG>EVENT_RECEIVE</STRONG></TD></TR>
- <TR><TD ALIGN=left><dd>obtain current events</TD>
- <TD ALIGN=center>RTEMS_EVENT_RECEIVE_OBTAIN_CURRENT_EVENTS</TD></TR>
- <TR><TD ALIGN=left><dd>available</TD>
- <TD ALIGN=center>RTEMS_EVENT_RECEIVE_AVAILABLE</TD></TR>
- <TR><TD ALIGN=left><dd>not available -- NO_WAIT</TD>
- <TD ALIGN=center>RTEMS_EVENT_RECEIVE_NOT_AVAILABLE_NO_WAIT</TD></TR>
- <TR><TD ALIGN=left><dd>not available -- caller blocks</TD>
- <TD ALIGN=center>RTEMS_EVENT_RECEIVE_NOT_AVAILABLE_CALLER_BLOCKS</TD></TR>
-
- </TABLE>
-</CENTER>
-@end html
-@end ifset
-@section Signal Manager
-
-@ifset use-tex
-@tex
-\centerline{\vbox{\offinterlineskip\halign{
-\span\rtemstimetable
-\rtemsonecase{SIGNAL\_CATCH}{RTEMS_SIGNAL_CATCH_ONLY}
-\rtemsdirective{SIGNAL\_SEND}
-\rtemscase{returns to caller}{RTEMS_SIGNAL_SEND_RETURNS_TO_CALLER}
-\rtemscase{signal to self}{RTEMS_SIGNAL_SEND_SIGNAL_TO_SELF}
-\rtemsdirective{EXIT ASR OVERHEAD}
-\rtemscase{returns to calling task}
- {RTEMS_SIGNAL_EXIT_ASR_OVERHEAD_RETURNS_TO_CALLING_TASK}
-\rtemscase{returns to preempting task}
- {RTEMS_SIGNAL_EXIT_ASR_OVERHEAD_RETURNS_TO_PREEMPTING_TASK}
-\rtemsendtimetable
-}}\hfil}
-@end tex
-@end ifset
-
-@ifset use-ascii
-@ifinfo
-@itemize @bullet
-@item SIGNAL_CATCH
-@itemize -
-@item only case: RTEMS_SIGNAL_CATCH_ONLY
-@end itemize
-
-@item SIGNAL_SEND
-@itemize -
-@item returns to caller: RTEMS_SIGNAL_SEND_RETURNS_TO_CALLER
-@item signal to self: RTEMS_SIGNAL_SEND_SIGNAL_TO_SELF
-@end itemize
-
-@item EXIT ASR OVERHEAD
-@itemize -
-@item returns to calling task: RTEMS_SIGNAL_EXIT_ASR_OVERHEAD_RETURNS_TO_CALLING_TASK
-@item returns to preempting task: RTEMS_SIGNAL_EXIT_ASR_OVERHEAD_RETURNS_TO_PREEMPTING_TASK
-@end itemize
-
-@end itemize
-@end ifinfo
-@end ifset
-
-@ifset use-html
-@html
-<CENTER>
- <TABLE COLS=2 WIDTH="80%" BORDER=2>
-<TR><TD ALIGN=left><STRONG>SIGNAL_CATCH</STRONG></TD>
- <TD ALIGN=center>RTEMS_SIGNAL_CATCH_ONLY</TD></TR>
-<TR><TD ALIGN=left COLSPAN=2><STRONG>SIGNAL_SEND</TD></TR>
- <TR><TD ALIGN=left><dd>returns to caller</TD>
- <TD ALIGN=center>RTEMS_SIGNAL_SEND_RETURNS_TO_CALLER</TD></TR>
- <TR><TD ALIGN=left><dd>signal to self</TD>
- <TD ALIGN=center>RTEMS_SIGNAL_SEND_SIGNAL_TO_SELF</TD></TR>
-<TR><TD ALIGN=left COLSPAN=2><STRONG>EXIT ASR OVERHEAD</TD></TR>
- <TR><TD ALIGN=left><dd>returns to calling task</TD>
- <TD ALIGN=center>
- RTEMS_SIGNAL_EXIT_ASR_OVERHEAD_RETURNS_TO_CALLING_TASK</TD></TR>
- <TR><TD ALIGN=left><dd>returns to preempting task</TD>
- <TD ALIGN=center>
- RTEMS_SIGNAL_EXIT_ASR_OVERHEAD_RETURNS_TO_PREEMPTING_TASK</TD></TR>
- </TABLE>
-</CENTER>
-@end html
-@end ifset
-
-@section Partition Manager
-
-@ifset use-tex
-@tex
-\centerline{\vbox{\offinterlineskip\halign{
-\span\rtemstimetable
-\rtemsonecase{PARTITION\_CREATE}{RTEMS_PARTITION_CREATE_ONLY}
-\rtemsonecase{PARTITION\_IDENT}{RTEMS_PARTITION_IDENT_ONLY}
-\rtemsonecase{PARTITION\_DELETE}{RTEMS_PARTITION_DELETE_ONLY}
-\rtemsdirective{PARTITION\_GET\_BUFFER}
-\rtemscase{available}{RTEMS_PARTITION_GET_BUFFER_AVAILABLE}
-\rtemscase{not available}{RTEMS_PARTITION_GET_BUFFER_NOT_AVAILABLE}
-\rtemsonecase{PARTITION\_RETURN\_BUFFER}
- {RTEMS_PARTITION_GET_BUFFER_NOT_AVAILABLE}
-\rtemsendtimetable
-}}\hfil}
-@end tex
-@end ifset
-
-@ifset use-ascii
-@ifinfo
-@itemize @bullet
-
-@item PARTITION_CREATE
-@itemize -
-@item only case: RTEMS_PARTITION_CREATE_ONLY
-@end itemize
-
-@item PARTITION_IDENT
-@itemize -
-@item only case: RTEMS_PARTITION_IDENT_ONLY
-@end itemize
-
-@item PARTITION_DELETE
-@itemize -
-@item only case: RTEMS_PARTITION_DELETE_ONLY
-@end itemize
-
-@item PARTITION_GET_BUFFER
-@itemize -
-@item available: RTEMS_PARTITION_GET_BUFFER_AVAILABLE
-@item not available: RTEMS_PARTITION_GET_BUFFER_NOT_AVAILABLE
-@end itemize
-
-@item PARTITION_RETURN_BUFFER
-@itemize -
-@item only case: RTEMS_PARTITION_RETURN_BUFFER_ONLY
-@end itemize
-
-@end itemize
-@end ifinfo
-@end ifset
-
-@ifset use-html
-@html
-<CENTER>
- <TABLE COLS=2 WIDTH="80%" BORDER=2>
-<TR><TD ALIGN=left><STRONG>PARTITION_CREATE</STRONG></TD>
- <TD ALIGN=center>RTEMS_PARTITION_CREATE_ONLY</TD></TR>
-<TR><TD ALIGN=left><STRONG>PARTITION_IDENT</STRONG></TD>
- <TD ALIGN=center>RTEMS_PARTITION_IDENT_ONLY</TD></TR>
-<TR><TD ALIGN=left><STRONG>PARTITION_DELETE</STRONG></TD>
- <TD ALIGN=center>RTEMS_PARTITION_DELETE_ONLY</TD></TR>
-<TR><TD ALIGN=left COLSPAN=2><STRONG>PARTITION_GET_BUFFER</STRONG></TD></TR>
- <TR><TD ALIGN=left><dd>available</TD>
- <TD ALIGN=center>RTEMS_PARTITION_GET_BUFFER_AVAILABLE</TD></TR>
- <TR><TD ALIGN=left><dd>not available</TD>
- <TD ALIGN=center>RTEMS_PARTITION_GET_BUFFER_NOT_AVAILABLE</TD></TR>
- <TR><TD ALIGN=left><STRONG>PARTITION_RETURN_BUFFER</STRONG></TD>
- <TD ALIGN=center>RTEMS_PARTITION_GET_BUFFER_NOT_AVAILABLE</TD></TR>
- </TABLE>
-</CENTER>
-@end html
-@end ifset
-
-@page
-@section Region Manager
-
-@ifset use-tex
-@tex
-\centerline{\vbox{\offinterlineskip\halign{
-\span\rtemstimetable
-\rtemsonecase{REGION\_CREATE}{RTEMS_REGION_CREATE_ONLY}
-\rtemsonecase{REGION\_IDENT}{RTEMS_REGION_IDENT_ONLY}
-\rtemsonecase{REGION\_DELETE}{RTEMS_REGION_DELETE_ONLY}
-\rtemsdirective{REGION\_GET\_SEGMENT}
-\rtemscase{available}{RTEMS_REGION_GET_SEGMENT_AVAILABLE}
-\rtemscase{not available -- NO\_WAIT}
- {RTEMS_REGION_GET_SEGMENT_NOT_AVAILABLE_NO_WAIT}
-\rtemscase{not available -- caller blocks}
- {RTEMS_REGION_GET_SEGMENT_NOT_AVAILABLE_CALLER_BLOCKS}
-\rtemsdirective{REGION\_RETURN\_SEGMENT}
-\rtemscase{no waiting tasks}{RTEMS_REGION_RETURN_SEGMENT_NO_WAITING_TASKS}
-\rtemscase{task readied -- returns to caller}
- {RTEMS_REGION_RETURN_SEGMENT_TASK_READIED_RETURNS_TO_CALLER}
-\rtemscase{task readied -- preempts caller}
- {RTEMS_REGION_RETURN_SEGMENT_TASK_READIED_PREEMPTS_CALLER}
-\rtemsendtimetable
-}}\hfil}
-@end tex
-@end ifset
-
-@ifset use-ascii
-@ifinfo
-@itemize @bullet
-
-@item REGION_CREATE
-@itemize -
-@item only case: RTEMS_REGION_CREATE_ONLY
-@end itemize
-
-@item REGION_IDENT
-@itemize -
-@item only case: RTEMS_REGION_IDENT_ONLY
-@end itemize
-
-@item REGION_DELETE
-@itemize -
-@item only case: RTEMS_REGION_DELETE_ONLY
-@end itemize
-
-@item REGION_GET_SEGMENT
-@itemize -
-@item available: RTEMS_REGION_GET_SEGMENT_AVAILABLE
-@item not available -- NO_WAIT: RTEMS_REGION_GET_SEGMENT_NOT_AVAILABLE_NO_WAIT
-@item not available -- caller blocks: RTEMS_REGION_GET_SEGMENT_NOT_AVAILABLE_CALLER_BLOCKS
-@end itemize
-
-@item REGION_RETURN_SEGMENT
-@itemize -
-@item no waiting tasks: RTEMS_REGION_RETURN_SEGMENT_NO_WAITING_TASKS
-@item task readied -- returns to caller: RTEMS_REGION_RETURN_SEGMENT_TASK_READIED_RETURNS_TO_CALLER
-@item task readied -- preempts caller: RTEMS_REGION_RETURN_SEGMENT_TASK_READIED_PREEMPTS_CALLER
-@end itemize
-
-@end itemize
-@end ifinfo
-@end ifset
-
-@ifset use-html
-@html
-<CENTER>
- <TABLE COLS=2 WIDTH="80%" BORDER=2>
-<TR><TD ALIGN=left><STRONG>REGION_CREATE</STRONG></TD>
- <TD ALIGN=center>RTEMS_REGION_CREATE_ONLY</TD></TR>
-<TR><TD ALIGN=left><STRONG>REGION_IDENT</STRONG></TD>
- <TD ALIGN=center>RTEMS_REGION_IDENT_ONLY</TD></TR>
-<TR><TD ALIGN=left><STRONG>REGION_DELETE</STRONG></TD>
- <TD ALIGN=center>RTEMS_REGION_DELETE_ONLY</TD></TR>
-<TR><TD ALIGN=left COLSPAN=2><STRONG>REGION_GET_SEGMENT</TD></TR>
- <TR><TD ALIGN=left><dd>available</TD>
- <TD ALIGN=center>RTEMS_REGION_GET_SEGMENT_AVAILABLE</TD></TR>
- <TR><TD ALIGN=left><dd>not available -- NO_WAIT</TD>
- <TD ALIGN=center>
- RTEMS_REGION_GET_SEGMENT_NOT_AVAILABLE_NO_WAIT</TD></TR>
- <TR><TD ALIGN=left><dd>not available -- caller blocks</TD>
- <TD ALIGN=center>
- RTEMS_REGION_GET_SEGMENT_NOT_AVAILABLE_CALLER_BLOCKS</TD></TR>
-<TR><TD ALIGN=left COLSPAN=2><STRONG>REGION_RETURN_SEGMENT</TD></TR>
- <TR><TD ALIGN=left><dd>no waiting tasks</TD>
- <TD ALIGN=center>RTEMS_REGION_RETURN_SEGMENT_NO_WAITING_TASKS</TD></TR>
- <TR><TD ALIGN=left><dd>task readied -- returns to caller</TD>
- <TD ALIGN=center>
- RTEMS_REGION_RETURN_SEGMENT_TASK_READIED_RETURNS_TO_CALLER</TD></TR>
- <TR><TD ALIGN=left><dd>task readied -- preempts caller</TD>
- <TD ALIGN=center>
- RTEMS_REGION_RETURN_SEGMENT_TASK_READIED_PREEMPTS_CALLER</TD></TR>
- </TABLE>
-</CENTER>
-@end html
-@end ifset
-
-@section Dual-Ported Memory Manager
-
-@ifset use-tex
-@tex
-\centerline{\vbox{\offinterlineskip\halign{
-\span\rtemstimetable
-\rtemsonecase{PORT\_CREATE}{RTEMS_PORT_CREATE_ONLY}
-\rtemsonecase{PORT\_IDENT}{RTEMS_PORT_IDENT_ONLY}
-\rtemsonecase{PORT\_DELETE}{RTEMS_PORT_DELETE_ONLY}
-\rtemsonecase{PORT\_INTERNAL\_TO\_EXTERNAL}
- {RTEMS_PORT_INTERNAL_TO_EXTERNAL_ONLY}
-\rtemsonecase{PORT\_EXTERNAL\_TO\_INTERNAL}
- {RTEMS_PORT_EXTERNAL_TO_INTERNAL_ONLY}
-\rtemsendtimetable
-}}\hfil}
-@end tex
-@end ifset
-
-@ifset use-ascii
-@ifinfo
-@itemize @bullet
-
-@item PORT_CREATE
-@itemize -
-@item only case: RTEMS_PORT_CREATE_ONLY
-@end itemize
-
-@item PORT_IDENT
-@itemize -
-@item only case: RTEMS_PORT_IDENT_ONLY
-@end itemize
-
-@item PORT_DELETE
-@itemize -
-@item only case: RTEMS_PORT_DELETE_ONLY
-@end itemize
-
-@item PORT_INTERNAL_TO_EXTERNAL
-@itemize -
-@item only case: RTEMS_PORT_INTERNAL_TO_EXTERNAL_ONLY
-@end itemize
-
-@item PORT_EXTERNAL_TO_INTERNAL
-@itemize -
-@item only case: RTEMS_PORT_EXTERNAL_TO_INTERNAL_ONLY
-@end itemize
-
-@end itemize
-@end ifinfo
-@end ifset
-
-@ifset use-html
-@html
-<CENTER>
- <TABLE COLS=2 WIDTH="80%" BORDER=2>
-<TR><TD ALIGN=left><STRONG>PORT_CREATE</STRONG></TD>
- <TD ALIGN=center>RTEMS_PORT_CREATE_ONLY</TD></TR>
-<TR><TD ALIGN=left><STRONG>PORT_IDENT</STRONG></TD>
- <TD ALIGN=center>RTEMS_PORT_IDENT_ONLY</TD></TR>
-<TR><TD ALIGN=left><STRONG>PORT_DELETE</STRONG></TD>
- <TD ALIGN=center>RTEMS_PORT_DELETE_ONLY</TD></TR>
-<TR><TD ALIGN=left><STRONG>PORT_INTERNAL_TO_EXTERNAL</STRONG></TD>
- <TD ALIGN=center>RTEMS_PORT_INTERNAL_TO_EXTERNAL_ONLY</TD></TR>
-<TR><TD ALIGN=left><STRONG>PORT_EXTERNAL_TO_INTERNAL</STRONG></TD>
- <TD ALIGN=center>RTEMS_PORT_EXTERNAL_TO_INTERNAL_ONLY</TD></TR>
-
- </TABLE>
-</CENTER>
-@end html
-@end ifset
-
-@section I/O Manager
-
-@ifset use-tex
-@tex
-\centerline{\vbox{\offinterlineskip\halign{
-\span\rtemstimetable
-\rtemsonecase{IO\_INITIALIZE}{RTEMS_IO_INITIALIZE_ONLY}
-\rtemsonecase{IO\_OPEN}{RTEMS_IO_OPEN_ONLY}
-\rtemsonecase{IO\_CLOSE}{RTEMS_IO_CLOSE_ONLY}
-\rtemsonecase{IO\_READ}{RTEMS_IO_READ_ONLY}
-\rtemsonecase{IO\_WRITE}{RTEMS_IO_WRITE_ONLY}
-\rtemsonecase{IO\_CONTROL}{RTEMS_IO_CONTROL_ONLY}
-\rtemsendtimetable
-}}\hfil}
-@end tex
-@end ifset
-
-@ifset use-ascii
-@ifinfo
-@itemize @bullet
-
-@item IO_INITIALIZE
-@itemize -
-@item only case: RTEMS_IO_INITIALIZE_ONLY
-@end itemize
-
-@item IO_OPEN
-@itemize -
-@item only case: RTEMS_IO_OPEN_ONLY
-@end itemize
-
-@item IO_CLOSE
-@itemize -
-@item only case: RTEMS_IO_CLOSE_ONLY
-@end itemize
-
-@item IO_READ
-@itemize -
-@item only case: RTEMS_IO_READ_ONLY
-@end itemize
-
-@item IO_WRITE
-@itemize -
-@item only case: RTEMS_IO_WRITE_ONLY
-@end itemize
-
-@item IO_CONTROL
-@itemize -
-@item only case: RTEMS_IO_CONTROL_ONLY
-@end itemize
-
-@end itemize
-@end ifinfo
-@end ifset
-
-@ifset use-html
-@html
-<CENTER>
- <TABLE COLS=2 WIDTH="80%" BORDER=2>
-<TR><TD ALIGN=left><STRONG>IO_INITIALIZE</STRONG></TD>
- <TD ALIGN=center>RTEMS_IO_INITIALIZE_ONLY</TD></TR>
-<TR><TD ALIGN=left><STRONG>IO_OPEN</STRONG></TD>
- <TD ALIGN=center>RTEMS_IO_OPEN_ONLY</TD></TR>
-<TR><TD ALIGN=left><STRONG>IO_CLOSE</STRONG></TD>
- <TD ALIGN=center>RTEMS_IO_CLOSE_ONLY</TD></TR>
-<TR><TD ALIGN=left><STRONG>IO_READ</STRONG></TD>
- <TD ALIGN=center>RTEMS_IO_READ_ONLY</TD></TR>
-<TR><TD ALIGN=left><STRONG>IO_WRITE</STRONG></TD>
- <TD ALIGN=center>RTEMS_IO_WRITE_ONLY</TD></TR>
-<TR><TD ALIGN=left><STRONG>IO_CONTROL</STRONG></TD>
- <TD ALIGN=center>RTEMS_IO_CONTROL_ONLY</TD></TR>
- </TABLE>
-</CENTER>
-@end html
-@end ifset
-
-@section Rate Monotonic Manager
-
-@ifset use-tex
-@tex
-\centerline{\vbox{\offinterlineskip\halign{
-\span\rtemstimetable
-\rtemsonecase{RATE\_MONOTONIC\_CREATE}{RTEMS_RATE_MONOTONIC_CREATE_ONLY}
-\rtemsonecase{RATE\_MONOTONIC\_IDENT}{RTEMS_RATE_MONOTONIC_IDENT_ONLY}
-\rtemsonecase{RATE\_MONOTONIC\_CANCEL}{RTEMS_RATE_MONOTONIC_CANCEL_ONLY}
-\rtemsdirective{RATE\_MONOTONIC\_DELETE}
-\rtemscase{active}{RTEMS_RATE_MONOTONIC_DELETE_ACTIVE}
-\rtemscase{inactive}{RTEMS_RATE_MONOTONIC_DELETE_INACTIVE}
-\rtemsdirective{RATE\_MONOTONIC\_PERIOD}
-\rtemscase{initiate period -- returns to caller}
- {RTEMS_RATE_MONOTONIC_PERIOD_INITIATE_PERIOD_RETURNS_TO_CALLER}
-\rtemscase{conclude period -- caller blocks}
- {RTEMS_RATE_MONOTONIC_PERIOD_CONCLUDE_PERIOD_CALLER_BLOCKS}
-\rtemscase{obtain status}{RTEMS_RATE_MONOTONIC_PERIOD_OBTAIN_STATUS}
-\rtemsendtimetable
-}}\hfil}
-@end tex
-@end ifset
-
-@ifset use-ascii
-@ifinfo
-@itemize @bullet
-
-@item RATE_MONOTONIC_CREATE
-@itemize -
-@item only case: RTEMS_RATE_MONOTONIC_CREATE_ONLY
-@end itemize
-
-@item RATE_MONOTONIC_IDENT
-@itemize -
-@item only case: RTEMS_RATE_MONOTONIC_IDENT_ONLY
-@end itemize
-
-@item RATE_MONOTONIC_CANCEL
-@itemize -
-@item only case: RTEMS_RATE_MONOTONIC_CANCEL_ONLY
-@end itemize
-
-@item RATE_MONOTONIC_DELETE
-@itemize -
-@item active: RTEMS_RATE_MONOTONIC_DELETE_ACTIVE
-@item inactive: RTEMS_RATE_MONOTONIC_DELETE_INACTIVE
-@end itemize
-
-@item RATE_MONOTONIC_PERIOD
-@itemize -
-@item initiate period -- returns to caller: RTEMS_RATE_MONOTONIC_PERIOD_INITIATE_PERIOD_RETURNS_TO_CALLER
-@item conclude period -- caller blocks: RTEMS_RATE_MONOTONIC_PERIOD_CONCLUDE_PERIOD_CALLER_BLOCKS
-@item obtain status: RTEMS_RATE_MONOTONIC_PERIOD_OBTAIN_STATUS
-@end itemize
-
-@end itemize
-@end ifinfo
-@end ifset
-
-@ifset use-html
-@html
-<CENTER>
- <TABLE COLS=2 WIDTH="80%" BORDER=2>
-<TR><TD ALIGN=left><STRONG>RATE_MONOTONIC_CREATE</STRONG></TD>
- <TD ALIGN=center>RTEMS_RATE_MONOTONIC_CREATE_ONLY</TD></TR>
-<TR><TD ALIGN=left><STRONG>RATE_MONOTONIC_IDENT</STRONG></TD>
- <TD ALIGN=center>RTEMS_RATE_MONOTONIC_IDENT_ONLY</TD></TR>
-<TR><TD ALIGN=left><STRONG>RATE_MONOTONIC_CANCEL</STRONG></TD>
- <TD ALIGN=center>RTEMS_RATE_MONOTONIC_CANCEL_ONLY</TD></TR>
-<TR><TD ALIGN=left COLSPAN=2><STRONG>RATE_MONOTONIC_DELETE</TD></TR>
- <TR><TD ALIGN=left><dd>active</TD>
- <TD ALIGN=center>RTEMS_RATE_MONOTONIC_DELETE_ACTIVE</TD></TR>
- <TR><TD ALIGN=left><dd>inactive</TD>
- <TD ALIGN=center>RTEMS_RATE_MONOTONIC_DELETE_INACTIVE</TD></TR>
-<TR><TD ALIGN=left COLSPAN=2><STRONG>RATE_MONOTONIC_PERIOD</TD></TR>
- <TR><TD ALIGN=left><dd>initiate period -- returns to caller</TD>
- <TD ALIGN=center>
- RTEMS_RATE_MONOTONIC_PERIOD_INITIATE_PERIOD_RETURNS_TO_CALLER</TD></TR>
- <TR><TD ALIGN=left><dd>conclude period -- caller blocks</TD>
- <TD ALIGN=center>
- RTEMS_RATE_MONOTONIC_PERIOD_CONCLUDE_PERIOD_CALLER_BLOCKS</TD></TR>
- <TR><TD ALIGN=left><dd>obtain status</TD>
- <TD ALIGN=center>RTEMS_RATE_MONOTONIC_PERIOD_OBTAIN_STATUS</TD></TR>
- </TABLE>
-</CENTER>
-@end html
-@end ifset
-
-@tex
-\global\advance \smallskipamount by 4pt
-@end tex
diff --git a/doc/common/timing.t b/doc/common/timing.t
deleted file mode 100644
index 5e717e87de..0000000000
--- a/doc/common/timing.t
+++ /dev/null
@@ -1,396 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Timing Specification
-
-@section Introduction
-
-This chapter provides information pertaining to the
-measurement of the performance of RTEMS, the methods of
-gathering the timing data, and the usefulness of the data. Also
-discussed are other time critical aspects of RTEMS that affect
-an applications design and ultimate throughput. These aspects
-include determinancy, interrupt latency and context switch times.
-
-@section Philosophy
-
-Benchmarks are commonly used to evaluate the
-performance of software and hardware. Benchmarks can be an
-effective tool when comparing systems. Unfortunately,
-benchmarks can also be manipulated to justify virtually any
-claim. Benchmarks of real-time executives are difficult to
-evaluate for a variety of reasons. Executives vary in the
-robustness of features and options provided. Even when
-executives compare favorably in functionality, it is quite
-likely that different methodologies were used to obtain the
-timing data. Another problem is that some executives provide
-times for only a small subset of directives, This is typically
-justified by claiming that these are the only time-critical
-directives. The performance of some executives is also very
-sensitive to the number of objects in the system. To obtain any
-measure of usefulness, the performance information provided for
-an executive should address each of these issues.
-
-When evaluating the performance of a real-time
-executive, one typically considers the following areas:
-determinancy, directive times, worst case interrupt latency, and
-context switch time. Unfortunately, these areas do not have
-standard measurement methodologies. This allows vendors to
-manipulate the results such that their product is favorably
-represented. We have attempted to provide useful and meaningful
-timing information for RTEMS. To insure the usefulness of our
-data, the methodology and definitions used to obtain and
-describe the data are also documented.
-
-@subsection Determinancy
-
-The correctness of data in a real-time system must
-always be judged by its timeliness. In many real-time systems,
-obtaining the correct answer does not necessarily solve the
-problem. For example, in a nuclear reactor it is not enough to
-determine that the core is overheating. This situation must be
-detected and acknowledged early enough that corrective action
-can be taken and a meltdown avoided.
-
-Consequently, a system designer must be able to
-predict the worst-case behavior of the application running under
-the selected executive. In this light, it is important that a
-real-time system perform consistently regardless of the number
-of tasks, semaphores, or other resources allocated. An
-important design goal of a real-time executive is that all
-internal algorithms be fixed-cost. Unfortunately, this goal is
-difficult to completely meet without sacrificing the robustness
-of the executive's feature set.
-
-Many executives use the term deterministic to mean
-that the execution times of their services can be predicted.
-However, they often provide formulas to modify execution times
-based upon the number of objects in the system. This usage is
-in sharp contrast to the notion of deterministic meaning fixed
-cost.
-
-Almost all RTEMS directives execute in a fixed amount
-of time regardless of the number of objects present in the
-system. The primary exception occurs when a task blocks while
-acquiring a resource and specifies a non-zero timeout interval.
-
-Other exceptions are message queue broadcast,
-obtaining a variable length memory block, object name to ID
-translation, and deleting a resource upon which tasks are
-waiting. In addition, the time required to service a clock tick
-interrupt is based upon the number of timeouts and other
-"events" which must be processed at that tick. This second
-group is composed primarily of capabilities which are inherently
-non-deterministic but are infrequently used in time critical
-situations. The major exception is that of servicing a clock
-tick. However, most applications have a very small number of
-timeouts which expire at exactly the same millisecond (usually
-none, but occasionally two or three).
-
-@subsection Interrupt Latency
-
-Interrupt latency is the delay between the CPU's
-receipt of an interrupt request and the execution of the first
-application-specific instruction in an interrupt service
-routine. Interrupts are a critical component of most real-time
-applications and it is critical that they be acted upon as
-quickly as possible.
-
-Knowledge of the worst case interrupt latency of an
-executive aids the application designer in determining the
-maximum period of time between the generation of an interrupt
-and an interrupt handler responding to that interrupt. The
-interrupt latency of an system is the greater of the executive's
-and the applications's interrupt latency. If the application
-disables interrupts longer than the executive, then the
-application's interrupt latency is the system's worst case
-interrupt disable period.
-
-The worst case interrupt latency for a real-time
-executive is based upon the following components:
-
-@itemize @bullet
-@item the longest period of time interrupts are disabled
-by the executive,
-
-@item the overhead required by the executive at the
-beginning of each ISR,
-
-@item the time required for the CPU to vector the
-interrupt, and
-
-@item for some microprocessors, the length of the longest
-instruction.
-@end itemize
-
-The first component is irrelevant if an interrupt
-occurs when interrupts are enabled, although it must be included
-in a worst case analysis. The third and fourth components are
-particular to a CPU implementation and are not dependent on the
-executive. The fourth component is ignored by this document
-because most applications use only a subset of a
-microprocessor's instruction set. Because of this the longest
-instruction actually executed is application dependent. The
-worst case interrupt latency of an executive is typically
-defined as the sum of components (1) and (2). The second
-component includes the time necessry for RTEMS to save registers
-and vector to the user-defined handler. RTEMS includes the
-third component, the time required for the CPU to vector the
-interrupt, because it is a required part of any interrupt.
-
-Many executives report the maximum interrupt disable
-period as their interrupt latency and ignore the other
-components. This results in very low worst-case interrupt
-latency times which are not indicative of actual application
-performance. The definition used by RTEMS results in a higher
-interrupt latency being reported, but accurately reflects the
-longest delay between the CPU's receipt of an interrupt request
-and the execution of the first application-specific instruction
-in an interrupt service routine.
-
-The actual interrupt latency times are reported in
-the Timing Data chapter of this supplement.
-
-@subsection Context Switch Time
-
-An RTEMS context switch is defined as the act of
-taking the CPU from the currently executing task and giving it
-to another task. This process involves the following components:
-
-@itemize @bullet
-@item Saving the hardware state of the current task.
-
-@item Optionally, invoking the TASK_SWITCH user extension.
-
-@item Restoring the hardware state of the new task.
-@end itemize
-
-RTEMS defines the hardware state of a task to include
-the CPU's data registers, address registers, and, optionally,
-floating point registers.
-
-Context switch time is often touted as a performance
-measure of real-time executives. However, a context switch is
-performed as part of a directive's actions and should be viewed
-as such when designing an application. For example, if a task
-is unable to acquire a semaphore and blocks, a context switch is
-required to transfer control from the blocking task to a new
-task. From the application's perspective, the context switch is
-a direct result of not acquiring the semaphore. In this light,
-the context switch time is no more relevant than the performance
-of any other of the executive's subroutines which are not
-directly accessible by the application.
-
-In spite of the inappropriateness of using the
-context switch time as a performance metric, RTEMS context
-switch times for floating point and non-floating points tasks
-are provided for comparison purposes. Of the executives which
-actually support floating point operations, many do not report
-context switch times for floating point context switch time.
-This results in a reported context switch time which is
-meaningless for an application with floating point tasks.
-
-The actual context switch times are reported in the
-Timing Data chapter of this supplement.
-
-@subsection Directive Times
-
-Directives are the application's interface to the
-executive, and as such their execution times are critical in
-determining the performance of the application. For example, an
-application using a semaphore to protect a critical data
-structure should be aware of the time required to acquire and
-release a semaphore. In addition, the application designer can
-utilize the directive execution times to evaluate the
-performance of different synchronization and communication
-mechanisms.
-
-The actual directive execution times are reported in
-the Timing Data chapter of this supplement.
-
-@section Methodology
-
-@subsection Software Platform
-
-The RTEMS timing suite is written in C. The overhead
-of passing arguments to RTEMS by C is not timed. The times
-reported represent the amount of time from entering to exiting
-RTEMS.
-
-The tests are based upon one of two execution models:
-(1) single invocation times, and (2) average times of repeated
-invocations. Single invocation times are provided for
-directives which cannot easily be invoked multiple times in the
-same scenario. For example, the times reported for entering and
-exiting an interrupt service routine are single invocation
-times. The second model is used for directives which can easily
-be invoked multiple times in the same scenario. For example,
-the times reported for semaphore obtain and semaphore release
-are averages of multiple invocations. At least 100 invocations
-are used to obtain the average.
-
-@subsection Hardware Platform
-
-Since RTEMS supports a variety of processors, the
-hardware platform used to gather the benchmark times must also
-vary. Therefore, for each processor supported the hardware
-platform must be defined. Each definition will include a brief
-description of the target hardware platform including the clock
-speed, memory wait states encountered, and any other pertinent
-information. This definition may be found in the processor
-dependent timing data chapter within this supplement.
-
-@subsection What is measured?
-
-An effort was made to provide execution times for a
-large portion of RTEMS. Times were provided for most directives
-regardless of whether or not they are typically used in time
-critical code. For example, execution times are provided for
-all object create and delete directives, even though these are
-typically part of application initialization.
-
-The times include all RTEMS actions necessary in a
-particular scenario. For example, all times for blocking
-directives include the context switch necessary to transfer
-control to a new task. Under no circumstances is it necessary
-to add context switch time to the reported times.
-
-The following list describes the objects created by
-the timing suite:
-
-@itemize @bullet
-@item All tasks are non-floating point.
-
-@item All tasks are created as local objects.
-
-@item No timeouts are used on blocking directives.
-
-@item All tasks wait for objects in FIFO order.
-
-@end itemize
-
-In addition, no user extensions are configured.
-
-@subsection What is not measured?
-
-The times presented in this document are not intended
-to represent best or worst case times, nor are all directives
-included. For example, no times are provided for the initialize
-executive and fatal_error_occurred directives. Other than the
-exceptions detailed in the Determinancy section, all directives
-will execute in the fixed length of time given.
-
-Other than entering and exiting an interrupt service
-routine, all directives were executed from tasks and not from
-interrupt service routines. Directives invoked from ISRs, when
-allowable, will execute in slightly less time than when invoked
-from a task because rescheduling is delayed until the interrupt
-exits.
-
-@subsection Terminology
-
-The following is a list of phrases which are used to
-distinguish individual execution paths of the directives taken
-during the RTEMS performance analysis:
-
-@table @b
-@item another task
-The directive was performed
-on a task other than the calling task.
-
-@item available
-A task attempted to obtain a resource and
-immediately acquired it.
-
-@item blocked task
-The task operated upon by the
-directive was blocked waiting for a resource.
-
-@item caller blocks
-The requested resoure was not
-immediately available and the calling task chose to wait.
-
-@item calling task
-The task invoking the directive.
-
-@item messages flushed
-One or more messages was flushed
-from the message queue.
-
-@item no messages flushed
-No messages were flushed from
-the message queue.
-
-@item not available
-A task attempted to obtain a resource
-and could not immediately acquire it.
-
-@item no reschedule
-The directive did not require a
-rescheduling operation.
-
-@item NO_WAIT
-A resource was not available and the
-calling task chose to return immediately via the NO_WAIT option
-with an error.
-
-@item obtain current
-The current value of something was
-requested by the calling task.
-
-@item preempts caller
-The release of a resource caused a
-task of higher priority than the calling to be readied and it
-became the executing task.
-
-@item ready task
-The task operated upon by the directive
-was in the ready state.
-
-@item reschedule
-The actions of the directive
-necessitated a rescheduling operation.
-
-@item returns to caller
-The directive succeeded and
-immediately returned to the calling task.
-
-@item returns to interrupted task
-The instructions
-executed immediately following this interrupt will be in the
-interrupted task.
-
-@item returns to nested interrupt
-The instructions
-executed immediately following this interrupt will be in a
-previously interrupted ISR.
-
-@item returns to preempting task
-The instructions
-executed immediately following this interrupt or signal handler
-will be in a task other than the interrupted task.
-
-@item signal to self
-The signal set was sent to the
-calling task and signal processing was enabled.
-
-@item suspended task
-The task operated upon by the
-directive was in the suspended state.
-
-@item task readied
-The release of a resource caused a
-task of lower or equal priority to be readied and the calling
-task remained the executing task.
-
-@item yield
-The act of attempting to voluntarily release
-the CPU.
-
-@end table
-
diff --git a/doc/common/treedef.tex b/doc/common/treedef.tex
deleted file mode 100644
index 26eda0c28c..0000000000
--- a/doc/common/treedef.tex
+++ /dev/null
@@ -1,317 +0,0 @@
-% treedef.tex
-%
-% These definitions for tree macros are taken from "Trees in TeX",
-% by David Eppstein, as published in TUGboat 6#1, March 1985.
-% David Eppstein's address (as of 15 June 1988) is
-% Computer Science Department
-% Columbia University
-% New York, NY 10027
-% Eppstein@cs.Columbia.edu
-%
-% Tree -- a macro to make aligned (horizontal) trees in TeX
-%
-% Input is of the form
-% \tree
-% item
-% \subtree
-% \leaf{item}
-% .
-% .
-% .
-% \endsubtree
-% \subtree
-% .
-% .
-% .
-% \endsubtree
-% \endsubtree
-% \endtree
-%
-% Nesting is to any level. \leaf is defined as a subtree of one item:
-% \def\leaf#1{\subtree#1\endsubtree}.
-%
-% A structure:
-% \subtree
-% item_part1
-% item_part2
-% .
-% .
-% .
-%
-% will print item_part2 directly below item_part1 as a single item
-% as if they were in a \box.
-%
-% The macro is a 3-pass macro. On the first pass it sets up a data
-% structure from the \subtree ... \endsubtree definitions. On the second pass
-% it recursively calculates the width of each level of the tree. On the third
-% pass it sets up the boxes, glue and rules.
-%
-% By David Eppstein, TUGboat, vol. 6 (1985), no. 1, pp. 31--35.
-% Transcribed by Margaret Kromer (peg), Feb., 1986.
-%
-% Pass 1
-% At the end of pass 1, the tree is coded as a nested collection of \hboxes
-% and \vboxes.
-\newbox\treebox\newcount\treeboxcnt
-\def\tree{\message{Begin tree}\treeboxcnt=1\global\setbox\treebox=\boxtree}
-\def\subtree{\ettext \advance\treeboxcnt by 1 \boxtree}
-\def\leaf#1{\subtree#1\endsubtree}
-\def\endsubtree{\ettext \egroup \advance\treeboxcnt-1{}%
- \ifnum\treeboxcnt=-1 \treeerrora\fi}
-\def\endtree{\endsubtree \ifnum\treeboxcnt>0 \treeerrorb\fi%
- \settreesizes \typesettree \message{-- end tree}}
-% Error messages for unbalanced tree
-\def\treeerrora{\errhelp=\treeerrorahelp%
- \errmessage{Unbalanced tree -- too many endsubtrees}}
-\newhelp\treeerrorahelp{There are more subtrees closed than opened}
-\def\treeerrorb{\errhelp=\treeerrorbhelp%
- \errmessage{Unbalanced tree -- not enough endsubtrees}}
-\newhelp\treeerrorbhelp{Not all the subtrees of the tree are closed.
-If you continue, you'll get some mysterious secondary errors.}
-% Set up \vbox containing root of tree
-\newif\iftreetext\treetextfalse % Whether still aligning text
-\def\boxtree{\hbox\bgroup % Start outer box of tree or subtree
- \baselineskip 2.5ex % Narrow line spacing slightly
- \tabskip 0pt % No spurious glue in alignment
- \vbox\bgroup % Start inner text \vbox
- \treetexttrue % Remember for \ettext
- \let\par\crcr \obeylines % New line breaks without explicit \cr
- \halign\bgroup##\hfil\cr} % Start alignment with simple template
-\def\ettext{\iftreetext % Are we still in inner text \vbox?
- \crcr\egroup \egroup \fi} % Yes, end alignment and box
-% Pass 2
-% Recursively calculate widths of tree with \setsizes; keep results in
-% \treesizes; \treewidth contains total width calculated so far. \treeworkbox
-% is workspace containing subtree being sized.
-\newbox\treeworkbox
-\def\cons#1#2{\edef#2{\xmark #1#2}} % Add something to start of list
-\def\car#1{\expandafter\docar#1\docar} % Take first element of list
-\def\docar\xmark#1\xmark#2\docar{#1} % ..by ignoring rest in expansion
-\def\cdr#1{\expandafter\docdr#1\docdr#1}% Similarly, drop first element
-\def\docdr\xmark#1\xmark#2\docdr#3{\def#3{\xmark #2}}
-\def\xmark{\noexpand\xmark} % List separator expands to self
-\def\nil{\xmark} % Empty list is just separator
-\def\settreesizes{\setbox\treeworkbox=\copy\treebox%
- \global\let\treesizes\nil \setsizes}
-\newdimen\treewidth % Width of this part of the tree
-\def\setsizes{\setbox\treeworkbox=\hbox\bgroup% Get a horiz list as a workspace
- \unhbox\treeworkbox\unskip % Take tree, unpack it into horiz list
- \inittreewidth % Get old width at this level
- \sizesubtrees % Recurse through all subtrees
- \sizelevel % Now set width from remaining \vbox
- \egroup} % All done, finish our \hbox
-\def\inittreewidth{\ifx\treesizes\nil % If this is the first at this level
- \treewidth=0pt % ..then we have no previous max width
- \else \treewidth=\car\treesizes % Otherwise take old max level width
- \global\cdr\treesizes % ..and advance level width storage
- \fi} % ..in preparation for next level.
-\def\sizesubtrees{\loop % For each box in horiz list (subtree)
- \setbox\treeworkbox=\lastbox \unskip % ..pull it off list and flush glue
- \ifhbox\treeworkbox \setsizes % If hbox, it's a subtree - recurse
- \repeat} % ..and loop; end loop on tree text
-\def\sizelevel{%
- \ifdim\treewidth<\wd\treeworkbox % If greater than previous maximum
- \treewidth=\wd\treeworkbox \fi % Then set max to new high
- \global\cons{\the\treewidth}\treesizes}% In either case, put back on list
-% Pass 3
-% Recursively typeset tree with \maketree by adding an \hbox containing
-% a subtree (in \treebox) to the horizontal list.
-\newdimen\treeheight % Height of this part of the tree
-\newif\ifleaf % Tree has no subtrees (is a leaf)
-\newif\ifbotsub % Bottom subtree of parent
-\newif\iftopsub % Top subtree of parent
-\def\typesettree{\medskip\maketree\medskip} % Make whole tree
-\def\maketree{\hbox{\treewidth=\car\treesizes % Get width at this level
- \cdr\treesizes % Set up width list for recursion
- \makesubtreebox\unskip % Set \treebox to text, make subtrees
- \ifleaf \makeleaf % No subtrees, add glue
- \else \makeparent \fi}} % Have subtrees, stick them at right
-{\catcode`@=11 % Be able to use \voidb@x
-\gdef\makesubtreebox{\unhbox\treebox % Open up tree or subtree
- \unskip\global\setbox\treebox\lastbox % Pick up very last box
- \ifvbox\treebox % If we're already at the \vbox
- \global\leaftrue \let\next\relax % ..then this is a leaf
- \else \botsubtrue % Otherwise, we have subtrees
- \setbox\treeworkbox\box\voidb@x % Init stack of processed subs
- \botsubtrue \let\next\makesubtree % ..and call \maketree on them
- \fi \next}} % Finish up for whichever it was
-\def\makesubtree{\setbox1\maketree % Call \maketree on this subtree
- \unskip\global\setbox\treebox\lastbox % Pick up box before it
- \treeheight=\ht1 % Get height of subtree we made
- \advance\treeheight 2ex % Add some room around the edges
- \ifhbox\treebox \topsubfalse % If picked up box is a \vbox,
- \else \topsubtrue \fi % ..this is the top, otherwise not
- \addsubtreebox % Stack subtree with the rest
- \iftopsub \global\leaffalse % If top, remember not a leaf
- \let\next\relax \else % ..(after recursion), set return
- \botsubfalse \let\next\makesubtree % Otherwise, we have more subtrees
- \fi \next} % Do tail recursion or return
-\def\addsubtreebox{\setbox\treeworkbox=\vbox{\subtreebox\unvbox\treeworkbox}}
-\def\subtreebox{\hbox\bgroup % Start \hbox of tree and lines
- \vbox to \treeheight\bgroup % Start \vbox for vertical rules
- \ifbotsub \iftopsub \vfil % If both bottom and top subtree
- \hrule width 0.4pt % ..vertical rule is just a dot
- \else \treehalfrule \fi \vfil % Bottom gets half-height rule
- \else \iftopsub \vfil \treehalfrule % Top gets half-height the other way
- \else \hrule width 0.4pt height \treeheight \fi\fi % Middle, full height
- \egroup % Finish vertical rule \vbox
- \treectrbox{\hrule width 1em}\hskip 0.2em\treectrbox{\box1}\egroup}
-\def\treectrbox#1{\vbox to \treeheight{\vfil #1\vfil}}
-\def\treehalfrule{\dimen\treeworkbox=\treeheight % Get total height
- \divide\dimen\treeworkbox 2%
- \advance\dimen\treeworkbox 0.2pt % Divide by two, add half horiz height
- \hrule width 0.4pt height \dimen\treeworkbox}% Make a vertical rule that high
-\def\makeleaf{\box\treebox} % Add leaf box to horiz list
-\def\makeparent{\ifdim\ht\treebox>%
- \ht\treeworkbox % If text is higher than subtrees
- \treeheight=\ht\treebox % ..use that height
- \else \treeheight=\ht\treeworkbox \fi % Otherwise use height of subtrees
- \advance\treewidth-\wd\treebox % Take remainder of level width
- \advance\treewidth 1em % ..after accounting for text and glue
- \treectrbox{\box\treebox}\hskip 0.2em % Add text, space before connection
-\treectrbox{\hrule width \treewidth}%
- \treectrbox{\box\treeworkbox}} % Add \hrule, subs
-
-************************************************
-% Plain TeX driver for tree.tex
-
-\def\uncatcodespecials{\catcode`@=12\def\do##1{\catcode`##1=12}\dospecials}
-\def\setupverbatim{\tt\obeylines\uncatcodespecials\obeyspaces}
-{\obeyspaces\global\let =\ }
-\def\beginshowoff{\par\begingroup\setupverbatim\doverbatim}
-{\catcode`\!=0 \catcode`\\=12
-!obeylines!gdef!doverbatim^^M#1\endshowoff{#1!endgroup!medbreak!filbreak%
-!smallskip}}
-
-% see The TeXbook, exercise 22.14
-%\input tree.tex
-\centerline{\bf TREE TREE}
-\bigskip
-\tree
- {Tree}
- Uses
- \subtree
- Computer
- Science
- \subtree
- Data
- Structures
- \leaf{Search Tree}
- \leaf{Priority Queue}
- \endsubtree
- \subtree
- Parsing
- \leaf{Parse Tree}
- \leaf{Symbol Table}
- \endsubtree
- \subtree
- Structured
- Programming
- \endsubtree
- \endsubtree
- \subtree
- Genealogy
- \leaf{Ancestors}
- \leaf{Descendants}
- \endsubtree
- \subtree
- Electrical
- Engineering
- \subtree
- Paper
- \leaf{{\it Vitae}}
- \leaf{Announcements}
- \leaf{Proposals}
- \leaf{\TeX{} Samples}
- \endsubtree
- \endsubtree
- \subtree
- Construction
- \leaf{Fences}
- \subtree
- Buildings
- \subtree
- Houses
- \leaf{Human}
- \leaf{Dog}
- \leaf{Bird}
- \leaf{Tree}
- \endsubtree
- \leaf{Barns}
- \leaf{Other}
- \endsubtree
- \leaf{\dots}
- \endsubtree
- \subtree
- Taxonomies
- \leaf{Tree Uses}
- \endsubtree
-\endtree
-
-\vskip.5truein
-\beginshowoff
-% see The TeXbook, exercise 22.14
-\input tree.tex
-\centerline{TREE TREE}
-\bigskip
-\tree
- Tree
- Uses
- \subtree
- Computer
- Science
- \subtree
- Data
- Structures
- \leaf{Search Tree}
- \leaf{Priority Queue}
- \endsubtree
- \subtree
- Parsing
- \leaf{Parse Tree}
- \leaf{Symbol Table}
- \endsubtree
- \subtree
- Structured
- Programming
- \endsubtree
- \endsubtree
- \subtree
- Genealogy
- \leaf{Ancestors}
- \leaf{Descendants}
- \endsubtree
- \subtree
- Electrical
- Engineering
- \subtree
- Paper
- \leaf{{\it Vitae}}
- \leaf{Announcements}
- \leaf{Proposals}
- \leaf{\TeX{} Samples}
- \endsubtree
- \endsubtree
- \subtree
- Construction
- \leaf{Fences}
- \subtree
- Buildings
- \subtree
- Houses
- \leaf{Human}
- \leaf{Dog}
- \leaf{Bird}
- \leaf{Tree}
- \endsubtree
- \leaf{Barns}
- \leaf{Other}
- \endsubtree
- \leaf{\dots}
- \endsubtree
- \subtree
- Taxonomies
- \leaf{Tree Uses}
- \endsubtree
-\endtree
-\endshowoff
diff --git a/doc/common/up-arrow.gif b/doc/common/up-arrow.gif
deleted file mode 100644
index 82aa8ccc68..0000000000
--- a/doc/common/up-arrow.gif
+++ /dev/null
Binary files differ
diff --git a/doc/common/wksheets.t b/doc/common/wksheets.t
deleted file mode 100644
index 7cfe61a40a..0000000000
--- a/doc/common/wksheets.t
+++ /dev/null
@@ -1,409 +0,0 @@
-@c ****** This comment is here to remind you not to edit the wksheets.t
-@c ****** in any directory but common.
-@c
-@c Figures ...
-@c RTEMS RAM Workspace Worksheet
-@c RTEMS Code Space Worksheet
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Memory Requirements
-
-@section Introduction
-
-Memory is typically a limited resource in real-time
-embedded systems, therefore, RTEMS can be configured to utilize
-the minimum amount of memory while meeting all of the
-applications requirements. Worksheets are provided which allow
-the RTEMS application developer to determine the amount of RTEMS
-code and RAM workspace which is required by the particular
-configuration. Also provided are the minimum code space,
-maximum code space, and the constant data space required by
-RTEMS.
-
-@section Data Space Requirements
-
-RTEMS requires a small amount of memory for its
-private variables. This data area must be in RAM and is
-separate from the RTEMS RAM Workspace. The following
-illustrates the data space required for all configurations of
-RTEMS:
-
-@itemize @bullet
-@item Data Space: RTEMS_DATA_SPACE
-@end itemize
-
-@section Minimum and Maximum Code Space Requirements
-
-A maximum configuration of RTEMS includes the core
-and all managers, including the multiprocessing manager.
-Conversely, a minimum configuration of RTEMS includes only the
-core and the following managers: initialization, task, interrupt
-and fatal error. The following illustrates the code space
-required by these configurations of RTEMS:
-
-@itemize @bullet
-@item Minimum Configuration: RTEMS_MINIMUM_CONFIGURATION
-@item Maximum Configuration: RTEMS_MAXIMUM_CONFIGURATION
-@end itemize
-
-@section RTEMS Code Space Worksheet
-
-The RTEMS Code Space Worksheet is a tool provided to
-aid the RTEMS application designer to accurately calculate the
-memory required by the RTEMS run-time environment. RTEMS allows
-the custom configuration of the executive by optionally
-excluding managers which are not required by a particular
-application. This worksheet provides the included and excluded
-size of each manager in tabular form allowing for the quick
-calculation of any custom configuration of RTEMS. The RTEMS
-Code Space Worksheet is below:
-
-@ifset use-ascii
-@page
-@end ifset
-@ifset use-tex
-@page
-@end ifset
-
-@page
-@center @b{RTEMS Code Space Worksheet}
-@sp 1
-
-@ifset use-ascii
-
-The following is a list of the components of the RTEMS code space. The first
-number in parentheses is the size when the component is included,
-while the second number indicates its size when not included. If the second
-number is "NA", then the component must always be included.
-
-@itemize @bullet
-@item Core (RTEMS_CORE_CODE_SIZE, NA)
-@item Initialization (RTEMS_INITIALIZATION_CODE_SIZE, NA)
-@item Task (RTEMS_TASK_CODE_SIZE, NA)
-@item Interrupt (RTEMS_INTERRUPT_CODE_SIZE, NA)
-@item Clock (RTEMS_CLOCK_CODE_SIZE, NA)
-@item Timer (RTEMS_TIMER_CODE_SIZE, RTEMS_TIMER_CODE_OPTSIZE)
-@item Semaphore (RTEMS_SEMAPHORE_CODE_SIZE, RTEMS_SEMAPHORE_CODE_OPTSIZE)
-@item Message (RTEMS_MESSAGE_CODE_SIZE, RTEMS_MESSAGE_CODE_OPTSIZE)
-@item Event (RTEMS_EVENT_CODE_SIZE, RTEMS_EVENT_CODE_OPTSIZE)
-@item Signal (RTEMS_SIGNAL_CODE_SIZE, RTEMS_SIGNAL_CODE_OPTSIZE)
-@item Partition (RTEMS_PARTITION_CODE_SIZE, RTEMS_PARTITION_CODE_OPTSIZE)
-@item Region (RTEMS_REGION_CODE_SIZE, RTEMS_REGION_CODE_OPTSIZE)
-@item Dual Ported Memory (RTEMS_DPMEM_CODE_SIZE, RTEMS_DPMEM_CODE_OPTSIZE)
-@item I/O (RTEMS_IO_CODE_SIZE, RTEMS_IO_CODE_OPTSIZE)
-@item Fatal Error (RTEMS_FATAL_ERROR_CODE_SIZE, NA)
-@item Rate Monotonic (RTEMS_RATE_MONOTONIC_CODE_SIZE, RTEMS_RATE_MONOTONIC_CODE_OPTSIZE)
-@item Multiprocessing (RTEMS_MULTIPROCESSING_CODE_SIZE, RTEMS_MULTIPROCESSING_CODE_OPTSIZE)
-@end itemize
-@end ifset
-
-@ifset use-tex
-
-@tex
-\line{\hskip 0.50in\vbox{\offinterlineskip\halign{
-\vrule\strut#&
-\hbox to 2.25in{\enskip\hfil#\hfil}&
-\vrule#&
-\hbox to 1.00in{\enskip\hfil#\hfil}&
-\vrule#&
-\hbox to 1.00in{\enskip\hfil#\hfil}&
-\vrule#&
-\hbox to 1.25in{\enskip\hfil#\hfil}&
-\vrule#\cr
-\noalign{\hrule}
-&\bf Component && \bf Included && \bf Not Included && \bf Size &\cr\noalign{\hrule}
-&Core && RTEMS_CORE_CODE_SIZE && NA && &\cr\noalign{\hrule}
-&Initialization && RTEMS_INITIALIZATION_CODE_SIZE && NA && &\cr\noalign{\hrule}
-&Task && RTEMS_TASK_CODE_SIZE && NA && &\cr\noalign{\hrule}
-&Interrupt && RTEMS_INTERRUPT_CODE_SIZE && NA && &\cr\noalign{\hrule}
-&Clock && RTEMS_CLOCK_CODE_SIZE && NA && &\cr\noalign{\hrule}
-&Timer && RTEMS_TIMER_CODE_SIZE && RTEMS_TIMER_CODE_OPTSIZE && &\cr\noalign{\hrule}
-&Semaphore && RTEMS_SEMAPHORE_CODE_SIZE && RTEMS_SEMAPHORE_CODE_OPTSIZE && &\cr\noalign{\hrule}
-&Message && RTEMS_MESSAGE_CODE_SIZE && RTEMS_MESSAGE_CODE_OPTSIZE && &\cr\noalign{\hrule}
-&Event && RTEMS_EVENT_CODE_SIZE && RTEMS_EVENT_CODE_OPTSIZE && &\cr\noalign{\hrule}
-&Signal && RTEMS_SIGNAL_CODE_SIZE && RTEMS_SIGNAL_CODE_OPTSIZE && &\cr\noalign{\hrule}
-&Partition && RTEMS_PARTITION_CODE_SIZE && RTEMS_PARTITION_CODE_OPTSIZE && &\cr\noalign{\hrule}
-&Region && RTEMS_REGION_CODE_SIZE && RTEMS_REGION_CODE_OPTSIZE && &\cr\noalign{\hrule}
-&Dual Ported Memory && RTEMS_DPMEM_CODE_SIZE && RTEMS_DPMEM_CODE_OPTSIZE && &\cr\noalign{\hrule}
-&I/O && RTEMS_IO_CODE_SIZE && RTEMS_IO_CODE_OPTSIZE && &\cr\noalign{\hrule}
-&Fatal Error && RTEMS_FATAL_ERROR_CODE_SIZE && NA && &\cr\noalign{\hrule}
-&Rate Monotonic && RTEMS_RATE_MONOTONIC_CODE_SIZE && RTEMS_RATE_MONOTONIC_CODE_OPTSIZE && &\cr\noalign{\hrule}
-&Multiprocessing && RTEMS_MULTIPROCESSING_CODE_SIZE && RTEMS_MULTIPROCESSING_CODE_OPTSIZE && &\cr\noalign{\hrule}
-&\multispan 5 \bf\hfil Total Code Space Requirements\qquad\hfil&&&\cr\noalign{\hrule}
-}}\hfil}
-@end tex
-@end ifset
-
-@ifset use-html
-@html
-<CENTER>
- <TABLE COLS=4 WIDTH="80%" BORDER=2>
-<TR><TD ALIGN=center><STRONG>Component</STRONG></TD>
- <TD ALIGN=center><STRONG>Included</STRONG></TD>
- <TD ALIGN=center><STRONG>Not Included</STRONG></TD>
- <TD ALIGN=center><STRONG>Size</STRONG></TD></TR>
-<TR><TD ALIGN=center>Core</TD>
- <TD ALIGN=center>RTEMS_CORE_CODE_SIZE</TD>
- <TD ALIGN=center>NA</TD>
- <TD><BR></TD></TR>
-<TR><TD ALIGN=center>Initialization</TD>
- <TD ALIGN=center>RTEMS_INITIALIZATION_CODE_SIZE</TD>
- <TD ALIGN=center>NA</TD>
- <TD><BR></TD></TR>
-<TR><TD ALIGN=center>Task</TD>
- <TD ALIGN=center>RTEMS_TASK_CODE_SIZE</TD>
- <TD ALIGN=center>NA</TD>
- <TD><BR></TD></TR>
-<TR><TD ALIGN=center>Interrupt</TD>
- <TD ALIGN=center>RTEMS_INTERRUPT_CODE_SIZE</TD>
- <TD ALIGN=center>NA</TD>
- <TD><BR></TD></TR>
-<TR><TD ALIGN=center>Clock</TD>
- <TD ALIGN=center>RTEMS_CLOCK_CODE_SIZE</TD>
- <TD ALIGN=center>NA</TD>
- <TD><BR></TD></TR>
-<TR><TD ALIGN=center>Timer</TD>
- <TD ALIGN=center>RTEMS_TIMER_CODE_SIZE</TD>
- <TD ALIGN=center>RTEMS_TIMER_CODE_OPTSIZE</TD>
- <TD><BR></TD></TR>
-<TR><TD ALIGN=center>Semaphore</TD>
- <TD ALIGN=center>RTEMS_SEMAPHORE_CODE_SIZE</TD>
- <TD ALIGN=center>RTEMS_SEMAPHORE_CODE_OPTSIZE</TD>
- <TD><BR></TD></TR>
-<TR><TD ALIGN=center>Message</TD>
- <TD ALIGN=center>RTEMS_MESSAGE_CODE_SIZE</TD>
- <TD ALIGN=center>RTEMS_MESSAGE_CODE_OPTSIZE</TD>
- <TD><BR></TD></TR>
-<TR><TD ALIGN=center>Event</TD>
- <TD ALIGN=center>RTEMS_EVENT_CODE_SIZE</TD>
- <TD ALIGN=center>RTEMS_EVENT_CODE_OPTSIZE</TD>
- <TD><BR></TD></TR>
-<TR><TD ALIGN=center>Signal</TD>
- <TD ALIGN=center>RTEMS_SIGNAL_CODE_SIZE</TD>
- <TD ALIGN=center>RTEMS_SIGNAL_CODE_OPTSIZE</TD>
- <TD><BR></TD></TR>
-<TR><TD ALIGN=center>Partition</TD>
- <TD ALIGN=center>RTEMS_PARTITION_CODE_SIZE</TD>
- <TD ALIGN=center>RTEMS_PARTITION_CODE_OPTSIZE</TD>
- <TD><BR></TD></TR>
-<TR><TD ALIGN=center>Region</TD>
- <TD ALIGN=center>RTEMS_REGION_CODE_SIZE</TD>
- <TD ALIGN=center>RTEMS_REGION_CODE_OPTSIZE</TD>
- <TD><BR></TD></TR>
-<TR><TD ALIGN=center>Dual Ported Memory</TD>
- <TD ALIGN=center>RTEMS_DPMEM_CODE_SIZE</TD>
- <TD ALIGN=center>RTEMS_DPMEM_CODE_OPTSIZE</TD>
- <TD><BR></TD></TR>
-<TR><TD ALIGN=center>I/O</TD>
- <TD ALIGN=center>RTEMS_IO_CODE_SIZE</TD>
- <TD ALIGN=center>RTEMS_IO_CODE_OPTSIZE</TD>
- <TD><BR></TD></TR>
-<TR><TD ALIGN=center>Fatal Error</TD>
- <TD ALIGN=center>RTEMS_FATAL_ERROR_CODE_SIZE</TD>
- <TD ALIGN=center>NA</TD>
- <TD><BR></TD></TR>
-<TR><TD ALIGN=center>Rate Monotonic</TD>
- <TD ALIGN=center>RTEMS_RATE_MONOTONIC_CODE_SIZE</TD>
- <TD ALIGN=center>RTEMS_RATE_MONOTONIC_CODE_OPTSIZE</TD>
- <TD><BR></TD></TR>
-<TR><TD ALIGN=center>Multiprocessing</TD>
- <TD ALIGN=center>RTEMS_MULTIPROCESSING_CODE_SIZE</TD>
- <TD ALIGN=center>RTEMS_MULTIPROCESSING_CODE_OPTSIZE</TD>
- <TD><BR></TD></TR>
-<TR><TD ALIGN=center COLSPAN=3>
- <STRONG>Total Code Space Requirements</STRONG></TD>
- <TD><BR></TD></TR>
- </TABLE>
-</CENTER>
-@end html
-@end ifset
-
-@page
-
-@c ****** Next node is set by a sed script in the document Makefile.
-@c ****** This comment is here to remind you not to edit the wksheets.t
-@c ****** in any directory but common.
-
-@section RTEMS RAM Workspace Worksheet
-
-The RTEMS RAM Workspace Worksheet is a tool provided
-to aid the RTEMS application designer to accurately calculate
-the minimum memory block to be reserved for RTEMS use. This
-worksheet provides equations for calculating the amount of
-memory required based upon the number of objects configured,
-whether for single or multiple processor versions of the
-executive. This information is presented in tabular form, along
-with the fixed system requirements, allowing for quick
-calculation of any application defined configuration of RTEMS.
-The RTEMS RAM Workspace Worksheet is provided below:
-
-@ifset use-ascii
-@page
-@end ifset
-@ifset use-tex
-@sp 2
-@end ifset
-
-@center @b{RTEMS RAM Workspace Worksheet}
-@sp 2
-
-@ifset use-ascii
-The total RTEMS RAM Workspace required is the sum of the following:
-
-@itemize @bullet
-@item maximum_tasks * RTEMS_BYTES_PER_TASK
-@item maximum_timers * RTEMS_BYTES_PER_TIMER
-@item maximum_semaphores * RTEMS_BYTES_PER_SEMAPHORE
-@item maximum_message_queues * RTEMS_BYTES_PER_MESSAGE_QUEUE
-@item maximum_regions * RTEMS_BYTES_PER_REGION
-@item maximum_partitions * RTEMS_BYTES_PER_PARTITION
-@item maximum_ports * RTEMS_BYTES_PER_PORT
-@item maximum_periods * RTEMS_BYTES_PER_PERIOD
-@item maximum_extensions * RTEMS_BYTES_PER_EXTENSION
-@item Floating Point Tasks * RTEMS_BYTES_PER_FP_TASK
-@item Task Stacks
-@item maximum_nodes * RTEMS_BYTES_PER_NODE
-@item maximum_global_objects * RTEMS_BYTES_PER_GLOBAL_OBJECT
-@item maximum_proxies * RTEMS_BYTES_PER_PROXY
-@item Fixed System Requirements of RTEMS_BYTES_OF_FIXED_SYSTEM_REQUIREMENTS
-@end itemize
-@end ifset
-
-@ifset use-tex
-@tex
-\line{\hskip 0.75in\vbox{\offinterlineskip\halign{
-\vrule\strut#&
-\hbox to 3.0in{\enskip\hfil#\hfil}&
-\vrule#&
-\hbox to 0.75in{\enskip\hfil#\hfil}&
-\vrule#&
-\hbox to 1.25in{\enskip\hfil#\hfil}&
-\vrule#\cr
-\noalign{\hrule}
-& \bf Description && \bf Equation && \bf Bytes Required &\cr\noalign{\hrule}
-& maximum\_tasks && * RTEMS_BYTES_PER_TASK = &&&\cr\noalign{\hrule}
-& maximum\_timers && * RTEMS_BYTES_PER_TIMER = &&&\cr\noalign{\hrule}
-& maximum\_semaphores && * RTEMS_BYTES_PER_SEMAPHORE = &&&\cr\noalign{\hrule}
-& maximum\_message\_queues && * RTEMS_BYTES_PER_MESSAGE_QUEUE = &&&\cr\noalign{\hrule}
-& maximum\_regions && * RTEMS_BYTES_PER_REGION = &&&\cr\noalign{\hrule}
-& maximum\_partitions && * RTEMS_BYTES_PER_PARTITION = &&&\cr\noalign{\hrule}
-& maximum\_ports && * RTEMS_BYTES_PER_PORT = &&&\cr\noalign{\hrule}
-& maximum\_periods && * RTEMS_BYTES_PER_PERIOD = &&&\cr\noalign{\hrule}
-& maximum\_extensions && * RTEMS_BYTES_PER_EXTENSION = &&&\cr\noalign{\hrule}
-& Floating Point Tasks && * RTEMS_BYTES_PER_FP_TASK = &&&\cr\noalign{\hrule}
-& Task Stacks &&\hskip 2.3em=&&&\cr\noalign{\hrule}
-& Total Single Processor Requirements &&&&&\cr\noalign{\hrule}
-}}\hfil}
-
-\line{\hskip 0.75in\vbox{\offinterlineskip\halign{
-\vrule\strut#&
-\hbox to 3.0in{\enskip\hfil#\hfil}&
-\vrule#&
-\hbox to 0.75in{\enskip\hfil#\hfil}&
-\vrule#&
-\hbox to 1.25in{\enskip\hfil#\hfil}&
-\vrule#\cr
-\noalign{\hrule}
-& \bf Description && \bf Equation && \bf Bytes Required &\cr\noalign{\hrule}
-& maximum\_nodes && * RTEMS_BYTES_PER_NODE = &&&\cr\noalign{\hrule}
-& maximum\_global\_objects && * RTEMS_BYTES_PER_GLOBAL_OBJECT = &&&\cr\noalign{\hrule}
-& maximum\_proxies && * RTEMS_BYTES_PER_PROXY = &&&\cr\noalign{\hrule}
-}}\hfil}
-
-\line{\hskip 0.75in\vbox{\offinterlineskip\halign{
-\vrule\strut#&
-\hbox to 3.0in{\enskip\hfil#\hfil}&
-\vrule#&
-\hbox to 0.75in{\enskip\hfil#\hfil}&
-\vrule#&
-\hbox to 1.25in{\enskip\hfil#\hfil}&
-\vrule#\cr
-\noalign{\hrule}
-& Total Multiprocessing Requirements &&&&&\cr\noalign{\hrule}
-& Fixed System Requirements && RTEMS_BYTES_OF_FIXED_SYSTEM_REQUIREMENTS &&&\cr\noalign{\hrule}
-& Total Single Processor Requirements &&&&&\cr\noalign{\hrule}
-& Total Multiprocessing Requirements &&&&&\cr\noalign{\hrule}
-& Minimum Bytes for RTEMS Workspace &&&&&\cr\noalign{\hrule}
-}}\hfil}
-@end tex
-@end ifset
-
-@ifset use-html
-@html
-<CENTER>
- <TABLE COLS=3 WIDTH="80%" BORDER=2>
-<TR><TD ALIGN=center><STRONG>Description</STRONG></TD>
- <TD ALIGN=center><STRONG>Equation</STRONG></TD>
- <TD ALIGN=center><STRONG>Bytes Required</STRONG></TD></TR>
-<TR><TD ALIGN=left>maximum_tasks</TD>
- <TD ALIGN=right>* RTEMS_BYTES_PER_TASK =</TD>
- <TD><BR></TD></TR>
-<TR><TD ALIGN=left>maximum_timers</TD>
- <TD ALIGN=right>* RTEMS_BYTES_PER_TIMER =</TD>
- <TD><BR></TD></TR>
-<TR><TD ALIGN=left>maximum_semaphores</TD>
- <TD ALIGN=right>* RTEMS_BYTES_PER_SEMAPHORE =</TD>
- <TD><BR></TD></TR>
-<TR><TD ALIGN=left>maximum_message_queues</TD>
- <TD ALIGN=right>* RTEMS_BYTES_PER_MESSAGE_QUEUE =</TD>
- <TD><BR></TD></TR>
-<TR><TD ALIGN=left>maximum_regions</TD>
- <TD ALIGN=right>* RTEMS_BYTES_PER_REGION =</TD>
- <TD><BR></TD></TR>
-<TR><TD ALIGN=left>maximum_partitions</TD>
- <TD ALIGN=right>* RTEMS_BYTES_PER_PARTITION =</TD>
- <TD><BR></TD></TR>
-<TR><TD ALIGN=left>maximum_ports</TD>
- <TD ALIGN=right>* RTEMS_BYTES_PER_PORT =</TD>
- <TD><BR></TD></TR>
-<TR><TD ALIGN=left>maximum_periods</TD>
- <TD ALIGN=right>* RTEMS_BYTES_PER_PERIOD =</TD>
- <TD><BR></TD></TR>
-<TR><TD ALIGN=left>maximum_extensions</TD>
- <TD ALIGN=right>* RTEMS_BYTES_PER_EXTENSION =</TD>
- <TD><BR></TD></TR>
-<TR><TD ALIGN=left>Floating Point Tasks</TD>
- <TD ALIGN=right>* RTEMS_BYTES_PER_FP_TASK =</TD>
- <TD><BR></TD></TR>
-<TR><TD ALIGN=left COLSPAN=2>Task Stacks</TD>
- <TD><BR></TD></TR>
-<TR><TD ALIGN=left COLSPAN=2>
- <STRONG>Total Single Processor Requirements</STRONG></TD>
- <TD><BR></TD></TR>
-<TR></TR>
-<TR><TD ALIGN=center><STRONG>Description</STRONG></TD>
- <TD ALIGN=center><STRONG>Equation</STRONG></TD>
- <TD ALIGN=center><STRONG>Bytes Required</STRONG></TD></TR>
-<TR><TD ALIGN=left>maximum_nodes</TD>
- <TD ALIGN=right>* RTEMS_BYTES_PER_NODE =</TD>
- <TD><BR></TD></TR>
-<TR><TD ALIGN=left>maximum_global_objects</TD>
- <TD ALIGN=right>* RTEMS_BYTES_PER_GLOBAL_OBJECT =</TD>
- <TD><BR></TD></TR>
-<TR><TD ALIGN=left>maximum_proxies</TD>
- <TD ALIGN=right>* RTEMS_BYTES_PER_PROXY =</TD>
- <TD><BR></TD></TR>
-<TR><TD ALIGN=left COLSPAN=2>
- <STRONG>Total Multiprocessing Requirements</STRONG></TD>
- <TD><BR></TD></TR>
-<TR></TR>
-<TR><TD ALIGN=left COLSPAN=2>Fixed System Requirements</TD>
- <TD ALIGN=center>RTEMS_BYTES_OF_FIXED_SYSTEM_REQUIREMENTS</TD></TR>
-<TR><TD ALIGN=left COLSPAN=2>Total Single Processor Requirements</TD>
- <TD><BR></TD></TR>
-<TR><TD ALIGN=left COLSPAN=2>Total Multiprocessing Requirements</TD>
- <TD><BR></TD></TR>
-<TR><TD ALIGN=left COLSPAN=2>
- <STRONG>Minimum Bytes for RTEMS Workspace</STRONG></TD>
- <TD><BR></TD></TR>
- </TABLE>
-</CENTER>
-@end html
-@end ifset
-
diff --git a/doc/develenv/Makefile b/doc/develenv/Makefile
deleted file mode 100644
index 2214554ae6..0000000000
--- a/doc/develenv/Makefile
+++ /dev/null
@@ -1,54 +0,0 @@
-#
-# COPYRIGHT (c) 1988-1999.
-# On-Line Applications Research Corporation (OAR).
-# All rights reserved.
-#
-# $Id$
-#
-
-PROJECT=develenv
-
-include ../Make.config
-
-all: html info ps pdf
-
-dirs:
- $(make-dirs)
-
-COMMON_FILES=../common/cpright.texi
-
-FILES=compile.texi $(PROJECT).texi direct.texi intro.texi sample.texi utils.texi
-
-info: dirs $(PROJECT)
- cp $(PROJECT) $(INFO_INSTALL)
-
-$(PROJECT): $(FILES)
- $(MAKEINFO) $(PROJECT).texi
-
-dvi: dirs $(PROJECT).dvi
-ps: dirs $(PROJECT).ps
-pdf: dirs $(PROJECT).pdf
-
-$(PROJECT).pdf: $(FILES)
- $(TEXI2PDF) $(PROJECT).texi
- cp $(PROJECT).pdf $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).ps: $(PROJECT).dvi
- dvips -o $(PROJECT).ps $(PROJECT).dvi
- cp $(PROJECT).ps $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).dvi: $(FILES)
- $(TEXI2DVI) $(PROJECT).texi
- cp $(PROJECT).dvi $(WWW_INSTALL)/$(PROJECT)
-
-html: dirs
- -mkdir -p $(WWW_INSTALL)/$(PROJECT)
- -cd .. ; gmake headers
- $(TEXI2WWW) $(TEXI2WWW_ARGS) -dir $(WWW_INSTALL)/$(PROJECT) \
- $(PROJECT).texi
-
-clean:
- rm -f *.o $(PROG) *.txt core *.html $(PROJECT).pdf
- rm -f *.dvi *.ps *.log *.aux *.cp *.fn *.ky *.pg *.toc *.tp *.vr $(BASE)
- rm -f $(PROJECT) $(PROJECT)-* _*
-
diff --git a/doc/develenv/compile.texi b/doc/develenv/compile.texi
deleted file mode 100644
index 79d1db7df8..0000000000
--- a/doc/develenv/compile.texi
+++ /dev/null
@@ -1,159 +0,0 @@
-@c This chapter is not currently in the Development Environment Guide.
-
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@ifinfo
-@node Compilation and GNU Make Stanzas, Compilation and GNU Make Stanzas Building the Entire Tree, Test Suite Source Directory, Top
-@end ifinfo
-@chapter Compilation and GNU Make Stanzas
-@ifinfo
-@menu
-* Compilation and GNU Make Stanzas Building the Entire Tree::
-* Compilation and GNU Make Stanzas Making a Component::
-* Compilation and GNU Make Stanzas Optional Manager Support::
-@end menu
-@end ifinfo
-
-RTEMS is compiled using the GNU gmake(1G) utilities.
-All examples in this section are with the gmake(1G) command.
-Note that the installation procedure for GNU Make installs it as
-make. It is referred to as gmake in this document to
-distinguish it from any other make utilities which may also be
-on the development system.
-
-The GNU Make utility uses a file that describes the
-relationships among the files and the operations necessary for
-updating each file. The GNU Make utility uses stanzas to specify
-which set of relationships to update. Each component and suite
-control directory contains a make control file, Makefile, which
-describes the relationships which must be checked and the
-associated update operations for each stanza. This facility is
-used to perform compilation, to remove intermediate files, to
-install RTEMS, and to maintain release and working set source
-and documentation notebooks. The following is a list of stanzas
-used by RTEMS make control files:
-
-@ifset use-texinfo-tables
-@table @code
-@item all
-perform compilation but do not install
-
-@item install
-perform compilation if directory contains source but do not install
-
-@item clean
-delete most generated files and directories for the current CPU and target
-
-@item clobber
-delete all generated files and directories for the current CPU and target
-@end table
-@end ifset
-
-@ifclear use-texinfo-tables
-@html
-<CENTER>
- <TABLE COLS=2 WIDTH="80%" BORDER=2>
-<TR><TD ALIGN=center>all</TD>
- <TD ALIGN=center>perform compilation but do not install</TD></TR>
-<TR><TD ALIGN=center>install</TD>
- <TD ALIGN=center>perform compilation if directory contains source
- but do not install</TD></TR>
-<TR><TD ALIGN=center>clean</TD>
- <TD ALIGN=center>delete most generated files and directories for
- the current CPU and target</TD></TR>
-<TR><TD ALIGN=center>clobber</TD>
- <TD ALIGN=center>delete all generated files and directories for
- the current CPU and target</TD></TR>
- </TABLE>
-</CENTER>
-@end html
-@end ifclear
-
-@ifinfo
-@node Compilation and GNU Make Stanzas Building the Entire Tree, Compilation and GNU Make Stanzas Making a Component, Compilation and GNU Make Stanzas, Compilation and GNU Make Stanzas
-@end ifinfo
-@section Building the Entire Tree
-
-At the top of the C source tree, execute the command
-gmake all. This will build and install all components and tests
-into the directory <TARGET> in this directory.
-
-@ifinfo
-@node Compilation and GNU Make Stanzas Making a Component, Compilation and GNU Make Stanzas Optional Manager Support, Compilation and GNU Make Stanzas Building the Entire Tree, Compilation and GNU Make Stanzas
-@end ifinfo
-@section Making a Component
-
-A single component can be compiled by changing to the
-directory which contains that component and performing the
-following command:
-
-@example
-gmake
-@end example
-
-
-This is equivalent to the following command:
-
-@example
-gmake all
-@end example
-
-Both commands will result in the GNU Make utility
-determining which files require compilation or assembly. If any
-files require compilation or assembly, then these operations
-will be performed followed by the appropriate archive or link
-command. Files installed are placed in subdirectories under the
-install point. The install point is determined by the setting
-of the variable PROJECT_HOME in the file
-c/make/custom/<TARGET>.cfg.
-
-If the current directory is not a leaf directory,
-then the requested operation will be performed recursively to
-all subdirectories under the current directory.
-
-By specifying one of the other stanzas supported by
-the Makefile, the GNU Make utility can be used to perform such
-operations as removing all automatically generated files in a
-component (clean and clobbers stanza).
-
-NOTE: For many components it is not possible to
-compile them until other components have been installed.
-
-@ifinfo
-@node Compilation and GNU Make Stanzas Optional Manager Support, Sample Applications, Compilation and GNU Make Stanzas Making a Component, Compilation and GNU Make Stanzas
-@end ifinfo
-@section Optional Manager Support
-
-RTEMS allows the C applications developer to build
-images that only contain those components of the executive that
-are needed, leaving out those that will not be utilized. This
-is accomplished by the RTEMS Makefile system linking in the
-"stub" versions of the optional managers in the place of those
-managers not needed by the specific application. The
-application Makefile sets the system variable $(MANAGERS) list
-to contain those managers that are required by the application.
-The RTEMS Makefile system then is able to build a list of
-managers that are unwanted, effectively linking in the stubbed
-versions of these managers before the RTEMS library is built.
-
-For more information and implementation details refer
-to the following files:
-
-@itemize @bullet
-@item c/make/leaf.cfg,
-
-@item a Makefile for a test or sample application, and
-
-@item a compiler description file from c/make/compilers
-@end itemize
-
-These files demonstrate the use of $(MANAGERS) and
-how the unwanted managers are handled.
-
-
diff --git a/doc/develenv/develenv.texi b/doc/develenv/develenv.texi
deleted file mode 100644
index 330d68591b..0000000000
--- a/doc/develenv/develenv.texi
+++ /dev/null
@@ -1,122 +0,0 @@
-\input texinfo @c -*-texinfo-*-
-@c %**start of header
-@setfilename develenv
-@syncodeindex vr fn
-@synindex ky cp
-@paragraphindent 0
-@c @smallbook
-@c %**end of header
-
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@c
-@c Master file
-@c
-
-@c Joel's Questions
-@c
-@c 1. Why does paragraphindent only impact makeinfo?
-@c 2. Why does paragraphindent show up in HTML?
-@c
-
-@include ../common/setup.texi
-
-@ignore
-@ifinfo
-@format
-START-INFO-DIR-ENTRY
-* RTEMS C User: (develenv). The C User's Guide
-END-INFO-DIR-ENTRY
-@end format
-@end ifinfo
-@end ignore
-
-@c variable substitution info:
-@c
-@c @set LANGUAGE C
-@c the language is @value{LANGUAGE}
-@c NOTE: don't use underscore in the name
-@c
-
-@c
-@c Title Page Stuff
-@c
-
-@set edition @value{RTEMS-EDITION}
-@set version @value{RTEMS-VERSION}
-@set update-date @value{RTEMS-UPDATE-DATE}
-@set update-month @value{RTEMS-UPDATE-MONTH}
-
-@c
-@c I don't really like having a short title page. --joel
-@c
-@c @shorttitlepage RTEMS Development Environment Guide
-
-@setchapternewpage odd
-@settitle RTEMS Development Environment Guide
-@titlepage
-@finalout
-
-@title RTEMS Development Environment Guide
-@subtitle Edition @value{edition}, for RTEMS @value{version}
-@sp 1
-@subtitle @value{update-month}
-@author On-Line Applications Research Corporation
-@page
-@include ../common/cpright.texi
-@end titlepage
-
-@c This prevents a black box from being printed on "overflow" lines.
-@c The alternative is to rework a sentence to avoid this problem.
-
-@include intro.texi
-@include direct.texi
-@c @include compile.texi
-@include sample.texi
-@include utils.texi
-
-@ifinfo
-@node Top, Introduction, (dir), (dir)
-@top develenv
-
-This is the online version of the RTEMS Development Environment Guide.
-
-@c * Compilation and GNU Make Stanzas::
-
-@menu
-* Introduction::
-* Directory Structure::
-* Sample Applications::
-* RTEMS Specific Utilities::
-* Command and Variable Index::
-* Concept Index::
-@end menu
-
-@end ifinfo
-@c
-@c
-@c Need to copy the emacs stuff and "trailer stuff" (index, toc) into here
-@c
-
-@node Command and Variable Index, Concept Index, RTEMS Specific Utilities Ada Language Specific Utilities, Top
-@unnumbered Command and Variable Index
-
-There are currently no Command and Variable Index entries.
-
-@c @printindex fn
-
-@node Concept Index, , Command and Variable Index, Top
-@unnumbered Concept Index
-
-There are currently no Concept Index entries.
-@c @printindex cp
-
-@contents
-@bye
-
diff --git a/doc/develenv/direct.texi b/doc/develenv/direct.texi
deleted file mode 100644
index 8a7d2abdef..0000000000
--- a/doc/develenv/direct.texi
+++ /dev/null
@@ -1,730 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@ifinfo
-@node Directory Structure, Directory Structure Suites, Introduction, Top
-@end ifinfo
-@chapter Directory Structure
-@ifinfo
-@menu
-* Directory Structure Suites::
-@end menu
-@end ifinfo
-
-The RTEMS directory structure is designed to meet
-the following requirements:
-
-@itemize @bullet
-@item encourage development of modular components.
-
-@item isolate processor and target dependent code, while
-allowing as much common source code as possible to be shared
-across multiple processors and targets.
-
-@item allow multiple RTEMS users to perform simultaneous
-compilation of RTEMS and its support facilities for different
-processors and targets.
-@end itemize
-
-The resulting directory structure has processor and
-target dependent source files isolated from generic files. When
-RTEMS is built, object directories and an install point will be
-automatically created based upon the target BSP selected. The
-placement of object files based upon the selected BSP name
-insures that object files are not mixed across CPUs or targets.
-This in combination with the make files allows the specific
-compilation options to be tailored for a particular target
-board. For example, the efficiency of the memory subsystem for
-a particular target board may be sensitive to the alignment of
-data structures, while on another target board with the same
-processor memory may be very limited. For the first target, the
-options could specify very strict alignment requirements, while
-on the second the data structures could be "packed" to conserve
-memory. It is impossible to achieve this degree of flexibility
-without providing source code.
-@ifinfo
-@node Directory Structure Suites, C Suites, Directory Structure, Directory Structure
-@end ifinfo
-@section Suites
-@ifinfo
-@menu
-* C Suites::
-* Executive Source Directory::
-* Support Library Source Directory::
-* Test Suite Source Directory::
-@end menu
-@end ifinfo
-
-The RTEMS source tree is organized based on the
-following four variables:
-
-@itemize @bullet
-@item language,
-
-@item target processor,
-
-@item target board, and
-
-@item compiler vendor (Ada only).
-@end itemize
-
-The language may be either C or Ada and there is
-currently nothing shared between the source trees for these two
-implementations of RTEMS. The user generally selects the
-subdirectory for the implementation they are using and ignores
-that for the other implementation. The only exceptions to this
-normally occurs when comparing the source code for the two
-implementations or when porting both to a new CPU or target
-board. The following shows the top level RTEMS directory
-structure which includes directories for each language
-implementation and a language independent source documentation
-directory. The source documentation directory is currently not
-supported.
-
-@c
-@c Tree 1 - Top Level
-@c
-
-@ifset use-ascii
-@example
-@group
- RTEMS
- |
-+-----------------------+-----------------------+
-| |
-c doc
-@end group
-@end example
-@end ifset
-
-@ifset use-tex
-@sp 1
-
-@tex
-{\parskip=0pt\offinterlineskip%
-\hskip 15.0em
-\hskip 1.25em\hbox to 3.00em{\hss{RTEMS}\hss}%
-\vrule width0em height1.972ex depth0.812ex\par\penalty10000
-\hskip 15.0em
-\hskip 2.75em\vrule width.04em%
-\vrule width0em height1.500ex depth0.500ex\par\penalty10000
-\hskip 15.0em
-\hskip 0.25em\vrule width2.50em height-0.407ex depth0.500ex%
-\vrule width.04em\vrule width2.50em height-0.407ex depth0.500ex%
-\vrule width0em height1.500ex depth0.500ex\par\penalty10000
-\hskip 15.0em
-\hskip 0.25em\vrule width.04em%
-\hskip 4.92em\vrule width.04em%
-\vrule width0em height1.500ex depth0.500ex\par\penalty10000
-\hskip 15.0em
-\hskip 0.00em\hbox to 0.50em{\hss{c}\hss}%
-\hskip 1.50em\hbox to 1.50em{\hss{ }\hss}%
-\hskip 1.00em\hbox to 1.50em{\hss{doc}\hss}%
-\vrule width0em height1.972ex depth0.812ex\par}
-@end tex
-@end ifset
-
-@c
-@c for now continue to use the ascii
-@c
-@ifset use-html
-@example
-@group
- RTEMS
- |
-+-----------------------+-----------------------+
-| |
-c doc
-@end group
-@end example
-@html
-@end html
-@end ifset
-
-Each of the following sections will describe the
-contents of the directories in the RTEMS source
-tree.
-
-@ifinfo
-@node C Suites, Executive Source Directory, Directory Structure Suites, Directory Structure Suites
-@end ifinfo
-@subsection C Suites
-
-The following table lists the suites currently included with the
-C implementation of RTEMS and the directory in which they may be located:
-
-@ifset use-texinfo-tables
-@table @code
-@item Support Libraries (BSPs, C library, CPU support)
-$RTEMS_ROOT/c/src/lib
-
-@item Single Processor Tests
-$RTEMS_ROOT/c/src/tests/sptests
-
-@item Timing Tests
-$RTEMS_ROOT/c/src/tests/tmtests
-
-@item Multiprocessor Tests
-$RTEMS_ROOT/c/src/tests/mptests
-
-@item Sample Applications
-$RTEMS_ROOT/c/src/tests/samples
-
-@item RTEMS Build Tools
-$RTEMS_SRC_BASE/c/build_tools
-
-@item Make Support
-$RTEMS_ROOT/c/make
-@end table
-@end ifset
-
-@ifclear use-texinfo-tables
-@html
-<CENTER>
- <TABLE COLS=2 WIDTH="80%" BORDER=2>
-<TR><TD ALIGN=center>Support Libraries (BSPs, C library, CPU support)</TD>
- <TD ALIGN=center>$RTEMS_ROOT/c/src/lib</TD></TR>
-<TR><TD ALIGN=center>Single Processor Tests</TD>
- <TD ALIGN=center>$RTEMS_ROOT/c/src/tests/sptests</TD></TR>
-<TR><TD ALIGN=center>Timing Tests</TD>
- <TD ALIGN=center>$RTEMS_ROOT/c/src/tests/tmtests</TD></TR>
-<TR><TD ALIGN=center>Multiprocessor Tests</TD>
- <TD ALIGN=center>$RTEMS_ROOT/c/src/tests/mptests</TD></TR>
-<TR><TD ALIGN=center>Sample Applications</TD>
- <TD ALIGN=center>$RTEMS_ROOT/c/src/tests/samples</TD></TR>
-<TR><TD ALIGN=center>RTEMS Build Tools</TD>
- <TD ALIGN=center>$RTEMS_SRC_BASE/c/build_tools</TD></TR>
-<TR><TD ALIGN=center>Make Support</TD>
- <TD ALIGN=center>$RTEMS_ROOT/c/make</TD></TR>
- </TABLE>
-</CENTER>
-@end html
-@end ifclear
-
-
-The top level directory structure for the C implementation of RTEMS
-is as follows:
-
-@c
-@c Tree 2 - Top C Level
-@c
-
-@ifset use-ascii
-@example
-@group
- C
- |
- +----------+-----------+----------+
- | | | |
-build_tools make src update_tools
-@end group
-@end example
-@end ifset
-
-@ifset use-tex
-@sp 1
-
-@tex
-{\parskip=0pt\offinterlineskip%
-\hskip 08.0em
-\hskip 13.00em\hbox to 0.50em{\hss{C}\hss}%
-\vrule width0em height1.972ex depth0.812ex\par\penalty10000
-\hskip 08.0em
-\hskip 13.25em\vrule width.04em%
-\vrule width0em height1.500ex depth0.500ex\par\penalty10000
-\hskip 08.0em
-\hskip 1.75em\vrule width11.50em height-0.407ex depth0.500ex%
-\vrule width.04em\vrule width11.50em height-0.407ex depth0.500ex%
-\vrule width0em height1.500ex depth0.500ex\par\penalty10000
-\hskip 08.0em
-\hskip 1.75em\vrule width.04em%
-\hskip 5.71em\vrule width.04em%
-\hskip 5.71em\vrule width.04em%
-\hskip 5.71em\vrule width.04em%
-\hskip 5.71em\vrule width.04em%
-\vrule width0em height1.500ex depth0.500ex\par\penalty10000
-\hskip 08.0em
-\hskip 0.00em\hbox to 3.50em{\hss{Modules}\hss}%
-\hskip 1.00em\hbox to 6.00em{\hss{build\_tools}\hss}%
-\hskip 1.75em\hbox to 2.00em{\hss{make}\hss}%
-\hskip 4.00em\hbox to 1.50em{\hss{src}\hss}%
-\hskip 1.75em\hbox to 6.50em{\hss{update\_tools}\hss}%
-\vrule width0em height1.972ex depth0.812ex\par}
-@end tex
-@end ifset
-
-@ifset use-html
-@example
-@group
- C
- |
- +----------+-----------+----------+
- | | | |
-build_tools make src update_tools
-@end group
-@end example
-@html
-@end html
-@end ifset
-
-This directory contains the subdirectories which
-contain the entire C implementation of the RTEMS executive.
-The "build-tools" directory contains an assortment of support tools
-for the RTEMS development environment. Two subdirectories exist
-under "build-tools" which contain scripts (executables) and
-source for the support tools. The "make" directory contains
-configuration files and subdirectories which provide a robust
-host and cross-target makefile system supporting the building of
-the executive for numerous application environments. The
-"update_tools" directory contains utilities which aid in the
-updating from a previous version to the current version of the
-RTEMS executive.
-
-The "src" directory structure for the C implementation of RTEMS is as follows:
-
-@c
-@c Tree 3 - Top C src Level
-@c
-
-@ifset use-ascii
-@example
-@group
- C Source
- |
- +-----------------------+-----------------------+
- | | |
-exec lib tests
-@end group
-@end example
-@end ifset
-
-@ifset use-tex
-@sp 1
-
-@tex
-{\parskip=0pt\offinterlineskip%
-\hskip 15.0em
-\hskip 2.00em\hbox to 4.00em{\hss{C Source}\hss}%
-\vrule width0em height1.972ex depth0.812ex\par\penalty10000
-\hskip 15.0em
-\hskip 4.00em\vrule width.04em%
-\vrule width0em height1.500ex depth0.500ex\par\penalty10000
-\hskip 15.0em
-\hskip 1.00em\vrule width3.00em height-0.407ex depth0.500ex%
-\vrule width.04em\vrule width3.00em height-0.407ex depth0.500ex%
-\vrule width0em height1.500ex depth0.500ex\par\penalty10000
-\hskip 15.0em
-\hskip 1.00em\vrule width.04em%
-\hskip 2.96em\vrule width.04em%
-\hskip 2.96em\vrule width.04em%
-\vrule width0em height1.500ex depth0.500ex\par\penalty10000
-\hskip 15.0em
-\hskip 0.00em\hbox to 2.00em{\hss{exec}\hss}%
-\hskip 1.25em\hbox to 1.50em{\hss{lib}\hss}%
-\hskip 1.00em\hbox to 2.50em{\hss{tests}\hss}%
-\vrule width0em height1.972ex depth0.812ex\par}
-@end tex
-@end ifset
-
-@ifset use-html
-@example
-@group
- C Source
- |
- +-----------------------+-----------------------+
- | | |
-exec lib tests
-@end group
-@end example
-@html
-@end html
-@end ifset
-
-This directory contains all source files that
-comprises the RTEMS executive, supported target board support
-packages, and the RTEMS Test Suite.
-
-@ifinfo
-@node Executive Source Directory, Support Library Source Directory, C Suites, Directory Structure Suites
-@end ifinfo
-@subsection Executive Source Directory
-
-The "exec" directory structure for the C implementation is as follows:
-
-@c
-@c Tree 4 - C Executive Tree
-@c
-
-@ifset use-ascii
-@example
-@group
- C Executive
- |
- +-----------+----------+-----------+----------+
- | | | | |
-posix rtems sapi score wrapup
-@end group
-@end example
-@end ifset
-
-@ifset use-tex
-@sp 1
-
-@tex
-{\parskip=0pt\offinterlineskip%
-\hskip 10.0em
-\hskip 6.00em\hbox to 5.50em{\hss{C Executive}\hss}%
-\vrule width0em height1.972ex depth0.812ex\par\penalty10000
-\hskip 10.0em
-\hskip 8.75em\vrule width.04em%
-\vrule width0em height1.500ex depth0.500ex\par\penalty10000
-\hskip 10.0em
-\hskip 1.25em\vrule width7.50em height-0.407ex depth0.500ex%
-\vrule width.04em\vrule width7.50em height-0.407ex depth0.500ex%
-\vrule width0em height1.500ex depth0.500ex\par\penalty10000
-\hskip 10.0em
-\hskip 1.25em\vrule width.04em%
-\hskip 3.71em\vrule width.04em%
-\hskip 3.71em\vrule width.04em%
-\hskip 3.71em\vrule width.04em%
-\hskip 3.71em\vrule width.04em%
-\vrule width0em height1.500ex depth0.500ex\par\penalty10000
-\hskip 10.0em
-\hskip 0.00em\hbox to 2.50em{\hss{posix}\hss}%
-\hskip 1.25em\hbox to 2.50em{\hss{rtems}\hss}%
-\hskip 1.50em\hbox to 2.00em{\hss{sapi}\hss}%
-\hskip 1.50em\hbox to 2.50em{\hss{score}\hss}%
-\hskip 1.00em\hbox to 3.00em{\hss{wrapup}\hss}%
-\vrule width0em height1.972ex depth0.812ex\par}
-@end tex
-@end ifset
-
-@ifset use-html
-@example
-@group
- C Executive
- |
- +-----------+----------+-----------+----------+
- | | | | |
-posix rtems sapi score wrapup
-@end group
-@end example
-@html
-@end html
-@end ifset
-
-This directory contains a set of subdirectories which
-contains the source files comprising the executive portion of
-the RTEMS development environment. At this point the API
-specific and "supercore" source code files are separated into
-distinct directory trees. The "rtems" and the "posix"
-subdirectories contain the C language source files for each
-module comprising the respective API. Also included in this
-directory are the subdirectories "sapi" and "score" which are
-the supercore modules. Within the "score" directory the CPU
-dependent modules are found.
-
-The "cpu" directory contains a subdirectory for each
-target CPU supported by the @value{RELEASE} release of the RTEMS
-executive. Each processor directory contains the CPU dependent
-code necessary to host RTEMS. The "no_cpu" directory provides a
-starting point for developing a new port to an unsupported
-processor. The files contained within the "no_cpu" directory
-may also be used as a reference for the other ports to specific
-processors.
-
-@ifinfo
-@node Support Library Source Directory, Test Suite Source Directory, Executive Source Directory, Directory Structure Suites
-@end ifinfo
-@subsection Support Library Source Directory
-
-The "lib" directory contains the support libraries and BSPS.
-Board support packages (BSPs), processor environment start up code,
-C library support, the FreeBSD TCP/IP stack, common BSP header files,
-and miscellaneous support functions are provided in the subdirectories.
-These are combined with the RTEMS executive object to form the single
-RTEMS library which installed.
-
-@c
-@c Tree 6 - Libraries
-@c
-
-
-The "libbsp" directory contains a directory for each CPU family supported
-by RTEMS. Beneath each CPU directory is a directory for each BSP for that
-processor family.
-
-@c
-@c Tree 7 - C BSP Library
-@c
-
-The "libbsp" directory provides all the BSPs provided with this
-release of the RTEMS executive. The subdirectories are
-divided, as discussed previously, based on specific processor
-family, then further breaking down into specific target board
-environments. The "shmdr" subdirectory provides the
-implementation of a shared memory driver which supports the
-multiprocessing portion of the executive. In addition, two
-starting point subdirectories are provided for reference. The
-"no_cpu" subdirectory provides a template BSP which can be used
-to develop a specific BSP for an unsupported target board. The
-"stubdr" subdirectory provides stubbed out BSPs. These files
-may aid in preliminary testing of the RTEMS development
-environment that has been built for no particular target in mind.
-
-Below each CPU dependent directory is a directory for each target BSP
-supported in this release.
-
-Each BSP provides the modules which comprise an RTEMS BSP. The
-modules are separated into the subdirectories "clock", "console",
-"include", "shmsupp", "startup", and "timer" as shown in the following
-figure:
-
-@c
-@c Tree 8 - Each BSP
-@c
-
-@ifset use-ascii
-@example
-@group
- Each BSP
- |
- +-----------+----------+-----+-----+----------+----------+
- | | | | | |
-clock console include shmsupp startup timer
-@end group
-@end example
-@end ifset
-
-@ifset use-tex
-@sp 1
-
-@tex
-{\parskip=0pt\offinterlineskip%
-\hskip 10.0em
-\hskip 10.25em\hbox to 4.50em{\hss{Each BSP}\hss}%
-\vrule width0em height1.972ex depth0.812ex\par\penalty10000
-\hskip 10.0em
-\hskip 12.50em\vrule width.04em%
-\vrule width0em height1.500ex depth0.500ex\par\penalty10000
-\hskip 10.0em
-\hskip 1.25em\vrule width11.25em height-0.407ex depth0.500ex%
-\vrule width.04em\vrule width11.25em height-0.407ex depth0.500ex%
-\vrule width0em height1.500ex depth0.500ex\par\penalty10000
-\hskip 10.0em
-\hskip 1.25em\vrule width.04em%
-\hskip 4.46em\vrule width.04em%
-\hskip 4.46em\vrule width.04em%
-\hskip 4.46em\vrule width.04em%
-\hskip 4.46em\vrule width.04em%
-\hskip 4.46em\vrule width.04em%
-\vrule width0em height1.500ex depth0.500ex\par\penalty10000
-\hskip 10.0em
-\hskip 0.00em\hbox to 2.50em{\hss{clock}\hss}%
-\hskip 1.50em\hbox to 3.50em{\hss{console}\hss}%
-\hskip 1.00em\hbox to 3.50em{\hss{include}\hss}%
-\hskip 1.00em\hbox to 3.50em{\hss{shmsupp}\hss}%
-\hskip 1.00em\hbox to 3.50em{\hss{startup}\hss}%
-\hskip 1.50em\hbox to 2.50em{\hss{timer}\hss}%
-\vrule width0em height1.972ex depth0.812ex\par}
-@end tex
-@end ifset
-
-@ifset use-html
-@example
-@group
- Each BSP
- |
- +-----------+----------+-----+-----+----------+----------+
- | | | | | |
-clock console include ... startup timer
-@end group
-@end example
-@html
-@end html
-@end ifset
-
-@ifinfo
-@node Test Suite Source Directory, Sample Applications, Support Library Source Directory, Directory Structure Suites
-@end ifinfo
-@subsection Test Suite Source Directory
-
-The "tests" directory structure for the C
-implementation is as follows:
-
-@c
-@c Tree 9 - C Tests
-@c
-
-@ifset use-ascii
-@example
-@group
- C Tests
- |
- +----------+---------+----------+---------+---------+---------+
- | | | | | | |
-libtests sptests support tmtests mptests psxtest samples
-@end group
-@end example
-@end ifset
-
-@ifset use-tex
-@sp 1
-
-@tex
-{\parskip=0pt\offinterlineskip%
-\hskip 05.0em
-\hskip 14.50em\hbox to 3.50em{\hss{C Tests}\hss}%
-\vrule width0em height1.972ex depth0.812ex\par\penalty10000
-\hskip 05.0em
-\hskip 16.25em\vrule width.04em%
-\vrule width0em height1.500ex depth0.500ex\par\penalty10000
-\hskip 05.0em
-\hskip 2.00em\vrule width14.25em height-0.407ex depth0.500ex%
-\vrule width.04em\vrule width14.25em height-0.407ex depth0.500ex%
-\vrule width0em height1.500ex depth0.500ex\par\penalty10000
-\hskip 05.0em
-\hskip 2.00em\vrule width.04em%
-\hskip 4.71em\vrule width.04em%
-\hskip 4.71em\vrule width.04em%
-\hskip 4.71em\vrule width.04em%
-\hskip 4.71em\vrule width.04em%
-\hskip 4.71em\vrule width.04em%
-\hskip 4.71em\vrule width.04em%
-\vrule width0em height1.500ex depth0.500ex\par\penalty10000
-\hskip 05.0em
-\hskip 0.00em\hbox to 4.00em{\hss{libtests}\hss}%
-\hskip 1.00em\hbox to 3.50em{\hss{sptests}\hss}%
-\hskip 1.25em\hbox to 3.50em{\hss{support}\hss}%
-\hskip 1.25em\hbox to 3.50em{\hss{tmtests}\hss}%
-\hskip 1.25em\hbox to 3.50em{\hss{mptests}\hss}%
-\hskip 1.75em\hbox to 2.50em{\hss{tools}\hss}%
-\hskip 1.75em\hbox to 3.50em{\hss{samples}\hss}%
-\vrule width0em height1.972ex depth0.812ex\par}
-@end tex
-@end ifset
-
-@ifset use-html
-@example
-@group
- C Tests
- |
- +----------+---------+----------+---------+---------+---------+
- | | | | | | |
-libtests sptests support tmtests mptests tools samples
-@end group
-@end example
-@html
-@end html
-@end ifset
-
-This directory provides the entire RTEMS Test Suite
-which includes the single processor tests, multiprocessor tests,
-timing tests, library tests, and sample tests. Additionally,
-subdirectories for support functions and test related header
-files are provided.
-
-The "sptests" subdirectory consists of twenty-four
-tests designed to cover the entire executive code. The
-"spfatal" test will verify any code associated with the
-occurrence of a fatal error. Also provided is a test which
-will determine the size of the RTEMS executive.
-
-The multiprocessor test are provided in "mptests".
-Fourteen tests are provided in this subdirectory which address
-two node configurations and cover the multiprocessor code found
-in RTEMS.
-
-Tests that time each directive and a set of critical
-executive functions are provided in the "tmtests" subdirectory.
-Within this subdirectory thirty-one tests are provided along
-with a subdirectory to contain each targets timing results.
-
-The "samples" directory structure for the C
-implementation is as follows:
-
-@c
-@c Tree 10 - C Samples
-@c
-
-@ifset use-ascii
-@example
-@group
- C Samples
- |
- +-----------+----------+-----+-----+----------+----------+
- | | | | | |
-base_mp base_sp cdtest hello paranoia ticker
-@end group
-@end example
-@end ifset
-
-@ifset use-tex
-@sp 1
-
-@tex
-{\parskip=0pt\offinterlineskip%
-\hskip 05.0em
-\hskip 12.25em\hbox to 4.50em{\hss{C Samples}\hss}%
-\vrule width0em height1.972ex depth0.812ex\par\penalty10000
-\hskip 05.0em
-\hskip 14.50em\vrule width.04em%
-\vrule width0em height1.500ex depth0.500ex\par\penalty10000
-\hskip 05.0em
-\hskip 2.00em\vrule width12.50em height-0.407ex depth0.500ex%
-\vrule width.04em\vrule width12.50em height-0.407ex depth0.500ex%
-\vrule width0em height1.500ex depth0.500ex\par\penalty10000
-\hskip 05.0em
-\hskip 2.00em\vrule width.04em%
-\hskip 4.96em\vrule width.04em%
-\hskip 4.96em\vrule width.04em%
-\hskip 4.96em\vrule width.04em%
-\hskip 4.96em\vrule width.04em%
-\hskip 4.96em\vrule width.04em%
-\vrule width0em height1.500ex depth0.500ex\par\penalty10000
-\hskip 05.0em
-\hskip 0.00em\hbox to 4.00em{\hss{base\_mp}\hss}%
-\hskip 1.00em\hbox to 4.00em{\hss{base\_sp}\hss}%
-\hskip 1.50em\hbox to 3.00em{\hss{cdtest}\hss}%
-\hskip 2.25em\hbox to 2.50em{\hss{hello}\hss}%
-\hskip 1.75em\hbox to 4.00em{\hss{paranoia}\hss}%
-\hskip 1.50em\hbox to 3.00em{\hss{ticker}\hss}%
-\vrule width0em height1.972ex depth0.812ex\par}
-@end tex
-@end ifset
-
-@ifset use-html
-@example
-@group
- C Samples
- |
- +-----------+----------+-----+-----+----------+----------+
- | | | | | |
-base_mp base_sp cdtest hello paranoia ticker
-@end group
-@end example
-@html
-@end html
-@end ifset
-
-This directory provides sample application tests
-which aid in the testing a newly built RTEMS environment, a new
-BSP, or as starting points for the development of an application
-using the RTEMS executive. A Hello World test is provided in
-the subdirectory "hello". This test is helpful when testing new
-versions of RTEMS, BSPs, or modifications to any portion of the
-RTEMS development environment. The "ticker" subdirectory
-provides a test for verification of clock chip device drivers of
-BSPs. A simple single processor test similar to those in the
-single processor test suite is provided in "base_sp". A simple
-two node multiprocessor test capable of testing an newly
-developed MPCI layer is provided in "base_mp". The "cdtest"
-subdirectory provides a simple C++ application using
-constructors and destructors. The final sample test is a
-public domain floating point and math library toolset test is
-provided in "paranoia".
diff --git a/doc/develenv/intro.texi b/doc/develenv/intro.texi
deleted file mode 100644
index 0c7262d23f..0000000000
--- a/doc/develenv/intro.texi
+++ /dev/null
@@ -1,58 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@ifinfo
-@node Introduction, Directory Structure, Top, Top
-@end ifinfo
-@chapter Introduction
-
-This document describes the RTEMS development
-environment. Discussions are provided for the following topics:
-
-@itemize @bullet
-@item the directory structure used by RTEMS,
-
-@item usage of the GNU Make utility within the RTEMS
-development environment,
-
-@item sample applications, and
-
-@item the RTEMS specific utilities.
-@end itemize
-
-RTEMS was designed as a reusable software component.
-Highly reusable software such as RTEMS is typically distributed
-in the form of source code without providing any support tools.
-RTEMS is the foundation for a complex family of facilities
-including board support packages, device drivers, and support
-libraries. The RTEMS Development Environment is not a CASE
-tool. It is a collection of tools designed to reduce the
-complexity of using and enhancing the RTEMS family. Tools are
-provided which aid in the management of the development,
-maintenance, and usage of RTEMS, its run-time support
-facilities, and applications which utilize the executive.
-
-A key component of the RTEMS development environment
-is the GNU family of free tools. This is robust set of
-development and POSIX compatible tools for which source code is
-freely available. The primary compilers, assemblers, linkers,
-and make utility used by the RTEMS development team are the GNU
-tools. They are highly portable supporting a wide variety of
-host computers and, in the case of the development tools, a wide
-variety of target processors.
-
-It is recommended that the RTEMS developer become
-familiar with the RTEMS Development Environment before
-proceeding with any modifications to the executive source tree.
-The source code for the executive is very modular and source
-code is divided amongst directories based upon functionality as
-well as dependencies on CPU and target board. This organization
-is aimed at isolating and minimizing non-portable code. This
-has the immediate result that adding support for a new CPU or
-target board requires very little "wandering" around the source
-tree.
diff --git a/doc/develenv/sample.texi b/doc/develenv/sample.texi
deleted file mode 100644
index 75dbc78b89..0000000000
--- a/doc/develenv/sample.texi
+++ /dev/null
@@ -1,287 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@ifinfo
-@node Sample Applications, Sample Applications Introduction, Test Suite Source Directory, Top
-@end ifinfo
-@chapter Sample Applications
-@ifinfo
-@menu
-* Sample Applications Introduction::
-* Sample Applications Hello World::
-* Sample Applications Clock Tick::
-* Sample Applications Base Single Processor Application::
-* Sample Applications Base Multiple Processor Application::
-* Sample Applications Constructor/Destructor C++ Application::
-* Sample Applications Paranoia Floating Point Application::
-@end menu
-@end ifinfo
-
-@ifinfo
-@node Sample Applications Introduction, Sample Applications Hello World, Sample Applications, Sample Applications
-@end ifinfo
-@section Introduction
-
-RTEMS is shipped with the following sample applications:
-
-@itemize @bullet
-@item Hello World - C and Ada
-
-@item Clock Tick - C and Ada
-
-@item Base Single Processor - C and Ada
-
-@item Base Multiple Processor - C and Ada
-
-@item Constructor/Destructor C++ Test - C only if C++
-enabled
-
-@item Paranoia Floating Point Test - C only
-@end itemize
-
-These applications are intended to illustrate the
-basic format of RTEMS single and multiple processor
-applications. In addition, these relatively simple applications
-can be used to test locally developed board support packages and
-device drivers.
-
-The reader should be familiar with the terms used and
-material presented in the RTEMS Applications User's Guide.
-
-@ifinfo
-@node Sample Applications Hello World, Sample Applications Clock Tick, Sample Applications Introduction, Sample Applications
-@end ifinfo
-@section Hello World
-
-This sample application is in the following directory:
-
-@example
-$RTEMS_SRC_BASE/tests/samples/hello
-@end example
-
-It provides a rudimentary test of the BSP start up
-code and the console output routine. The C version of this
-sample application uses the printf function from the RTEMS
-Standard C Library to output messages. The Ada version of this
-sample use the TEXT_IO package to output the hello messages.
-The following messages are printed:
-
-@example
-@group
-*** HELLO WORLD TEST ***
-Hello World
-*** END OF HELLO WORLD TEST ***
-@end group
-@end example
-
-These messages are printed from the application's
-single initialization task. If the above messages are not
-printed correctly, then either the BSP start up code or the
-console output routine is not operating properly.
-
-@ifinfo
-@node Sample Applications Clock Tick, Sample Applications Base Single Processor Application, Sample Applications Hello World, Sample Applications
-@end ifinfo
-@section Clock Tick
-
-This sample application is in the following directory:
-
-@example
-$RTEMS_SRC_BASE/tests/samples/ticker
-@end example
-
-This application is designed as a simple test of the
-clock tick device driver. In addition, this application also
-tests the printf function from the RTEMS Standard C Library by
-using it to output the following messages:
-
-@example
-@group
-*** CLOCK TICK TEST ***
-TA1 - tm_get - 09:00:00 12/31/1988
-TA2 - tm_get - 09:00:00 12/31/1988
-TA3 - tm_get - 09:00:00 12/31/1988
-TA1 - tm_get - 09:00:05 12/31/1988
-TA1 - tm_get - 09:00:10 12/31/1988
-TA2 - tm_get - 09:00:10 12/31/1988
-TA1 - tm_get - 09:00:15 12/31/1988
-TA3 - tm_get - 09:00:15 12/31/1988
-TA1 - tm_get - 09:00:20 12/31/1988
-TA2 - tm_get - 09:00:20 12/31/1988
-TA1 - tm_get - 09:00:25 12/31/1988
-TA1 - tm_get - 09:00:30 12/31/1988
-TA2 - tm_get - 09:00:30 12/31/1988
-TA3 - tm_get - 09:00:30 12/31/1988
-*** END OF CLOCK TICK TEST ***
-@end group
-@end example
-
-The clock tick sample application utilizes a single
-initialization task and three copies of the single application
-task. The initialization task prints the test herald, sets the
-time and date, and creates and starts the three application
-tasks before deleting itself. The three application tasks
-generate the rest of the output. Every five seconds, one or
-more of the tasks will print the current time obtained via the
-tm_get directive. The first task, TA1, executes every five
-seconds, the second task, TA2, every ten seconds, and the third
-task, TA3, every fifteen seconds. If the time printed does not
-match the above output, then the clock device driver is not
-operating properly.
-
-@ifinfo
-@node Sample Applications Base Single Processor Application, Sample Applications Base Multiple Processor Application, Sample Applications Clock Tick, Sample Applications
-@end ifinfo
-@section Base Single Processor Application
-
-This sample application is in the following directory:
-
-@example
-$RTEMS_SRC_BASE/tests/samples/base_sp
-@end example
-
-It provides a framework from which a single processor
-RTEMS application can be developed. The use of the task argument
-is illustrated. This sample application uses the printf
-function from the RTEMS Standard C Library or TEXT_IO functions
-when using the Ada version to output the following messages:
-
-@example
-@group
-*** SAMPLE SINGLE PROCESSOR APPLICATION ***
-Creating and starting an application task
-Application task was invoked with argument (0) and has id of 0x10002
-*** END OF SAMPLE SINGLE PROCESSOR APPLICATION ***
-@end group
-@end example
-
-The first two messages are printed from the
-application's single initialization task. The final messages
-are printed from the single application task.
-
-@ifinfo
-@node Sample Applications Base Multiple Processor Application, Sample Applications Constructor/Destructor C++ Application, Sample Applications Base Single Processor Application, Sample Applications
-@end ifinfo
-@section Base Multiple Processor Application
-
-This sample application is in the following directory:
-
-@example
-$RTEMS_SRC_BASE/tests/samples/base_mp
-@end example
-
-It provides a framework from which a multiprocessor
-RTEMS application can be developed. This directory has a
-subdirectory for each node in the multiprocessor system. The
-task argument is used to distinguish the node on which the
-application task is executed. The first node will print the
-following messages:
-
-@example
-@group
-*** SAMPLE MULTIPROCESSOR APPLICATION ***
-Creating and starting an application task
-This task was invoked with the node argument (1)
-This task has the id of 0x10002
-*** END OF SAMPLE MULTIPROCESSOR APPLICATION ***
-@end group
-@end example
-
-The second node will print the following messages:
-
-@example
-@group
-*** SAMPLE MULTIPROCESSOR APPLICATION ***
-Creating and starting an application task
-This task was invoked with the node argument (2)
-This task has the id of 0x20002
-*** END OF SAMPLE MULTIPROCESSOR APPLICATION ***
-@end group
-@end example
-
-The herald is printed from the application's single
-initialization task on each node. The final messages are
-printed from the single application task on each node.
-
-In this sample application, all source code is shared
-between the nodes except for the node dependent configuration
-files. These files contains the definition of the node number
-used in the initialization of the RTEMS Multiprocessor
-Configuration Table. This file is not shared because the node
-number field in the RTEMS Multiprocessor Configuration Table
-must be unique on each node.
-
-@ifinfo
-@node Sample Applications Constructor/Destructor C++ Application, Sample Applications Paranoia Floating Point Application, Sample Applications Base Multiple Processor Application, Sample Applications
-@end ifinfo
-@section Constructor/Destructor C++ Application
-
-This sample application is in the following directory:
-
-@example
-$RTEMS_SRC_BASE/tests/samples/cdtest
-@end example
-
-This sample application demonstrates that RTEMS is
-compatible with C++ applications. It uses constructors,
-destructor, and I/O stream output in testing these various
-capabilities. The board support package responsible for this
-application must support a C++ environment.
-
-This sample application uses the printf function from
-the RTEMS Standard C Library to output the following messages:
-
-@example
-@group
-Hey I'M in base class constructor number 1 for 0x400010cc.
-Hey I'M in base class constructor number 2 for 0x400010d4.
-Hey I'M in derived class constructor number 3 for 0x400010d4.
-*** CONSTRUCTOR/DESTRUCTOR TEST ***
-Hey I'M in base class constructor number 4 for 0x4009ee08.
-Hey I'M in base class constructor number 5 for 0x4009ee10.
-Hey I'M in base class constructor number 6 for 0x4009ee18.
-Hey I'M in base class constructor number 7 for 0x4009ee20.
-Hey I'M in derived class constructor number 8 for 0x4009ee20.
-Testing a C++ I/O stream
-Hey I'M in derived class constructor number 8 for 0x4009ee20.
-Derived class - Instantiation order 8
-Hey I'M in base class constructor number 7 for 0x4009ee20.
-Instantiation order 8
-Hey I'M in base class constructor number 6 for 0x4009ee18.
-Instantiation order 6
-Hey I'M in base class constructor number 5 for 0x4009ee10.
-Instantiation order 5
-Hey I'M in base class constructor number 4 for 0x4009ee08.
-Instantiation order 5
-*** END OF CONSTRUCTOR/DESTRUCTOR TEST ***
-Hey I'M in base class constructor number 3 for 0x400010d4.
-Hey I'M in base class constructor number 2 for 0x400010d4.
-Hey I'M in base class constructor number 1 for 0x400010cc.
-@end group
-@end example
-
-@ifinfo
-@node Sample Applications Paranoia Floating Point Application, RTEMS Specific Utilities, Sample Applications Constructor/Destructor C++ Application, Sample Applications
-@end ifinfo
-@section Paranoia Floating Point Application
-
-This sample application is in the following directory:
-
-@example
-$RTEMS_SRC_BASE/tests/samples/paranoia
-@end example
-
-This sample application uses a public domain floating
-point and math library test to verify these capabilities of the
-RTEMS executive. Deviations between actual and expected results
-are reported to the screen. This is a very extensive test which
-tests all mathematical and number conversion functions.
-Paranoia is also very large and requires a long period of time
-to run. Problems which commonly prevent this test from
-executing to completion include stack overflow and FPU exception
-handlers not installed.
diff --git a/doc/develenv/utils.texi b/doc/develenv/utils.texi
deleted file mode 100644
index 2443bd8495..0000000000
--- a/doc/develenv/utils.texi
+++ /dev/null
@@ -1,312 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@ifinfo
-@node RTEMS Specific Utilities, RTEMS Specific Utilities C Language Specific Utilities, Sample Applications Paranoia Floating Point Application, Top
-@end ifinfo
-@chapter RTEMS Specific Utilities
-@ifinfo
-@menu
-* RTEMS Specific Utilities C Language Specific Utilities::
-* RTEMS Specific Utilities Ada Language Specific Utilities::
-@end menu
-@end ifinfo
-
-This section describes the additional commands
-available within the RTEMS Development Environment. Although
-some of these commands are of general use, most are included to
-provide some capability necessary to perform a required function
-in the development of the RTEMS executive, one of its support
-components, or an RTEMS based application. The commands have
-been classified into the following categories for clarity:
-
-@itemize @bullet
-@item C Language Specific Utilities
-
-@item Ada Language Specific Utilities
-@end itemize
-
-Some of the commands are implemented as C programs.
-However, most commands are implemented as Bourne shell scripts.
-Even if the current user has selected a different shell, the
-scripts will automatically invoke the Bourne shell during their
-execution lifetime.
-
-The commands are presented in UNIX manual page style
-for compatibility and convenience. A standard set of paragraph
-headers were used for all of the command descriptions. If a
-section contained no data, the paragraph header was omitted to
-conserve space. Each of the permissible paragraph headers and
-their contents are described below:
-
-@table @code
-@item SYNOPSIS
-describes the command syntax
-
-@item DESCRIPTION
-a full description of the command
-
-@item OPTIONS
-describes each of the permissible options for the command
-
-@item NOTES
-lists any special noteworthy comments about the command
-
-@item ENVIRONMENT
-describes all environment variables utilized by the command
-
-@item EXAMPLES
-illustrates the use of the command with specific examples
-
-@item FILES
-provides a list of major files that the command references
-
-@item SEE ALSO
-lists any relevant commands which can be consulted
-@end table
-
-Most environment variables referenced by the commands
-are defined for the RTEMS Development Environment during the
-login procedure. During login, the user selects a default RTEMS
-environment through the use of the Modules package. This tool
-effectively sets the environment variables to provide a
-consistent development environment for a specific user.
-Additional environment variables within the RTEMS environment
-were set by the system administrator during installation. When
-specifying paths, a command description makes use of these
-environment variables.
-
-When referencing other commands in the SEE ALSO
-paragraph, the following notation is used: command(code).
-Where command is the name of a related command, and code is a
-section number. Valid section numbers are as follows:
-
-@table @code
-@item 1
-Section 1 of the standard UNIX documentation
-
-@item 1G
-Section 1 of the GNU documentation
-
-@item 1R
-a manual page from this document, the RTEMS Development Environment Guide
-@end table
-
-For example, ls(1) means see the standard ls command
-in section 1 of the UNIX documentation. gcc020(1G) means see
-the description of gcc020 in section 1 of the GNU documentation.
-
-@ifinfo
-@node RTEMS Specific Utilities C Language Specific Utilities, packhex - Compress Hexadecimal File, RTEMS Specific Utilities, RTEMS Specific Utilities
-@end ifinfo
-@section C Language Specific Utilities
-@ifinfo
-@menu
-* packhex - Compress Hexadecimal File::
-* unhex - Convert Hexadecimal File into Binary::
-* size_rtems - report RTEMS size information::
-@end menu
-@end ifinfo
-
-The C language utilities provide a powerful set of
-tools which combine to allow operations within the RTEMS
-Development Environment to be consistent and easy to use. Much
-effort was devoted to providing as close to the standard UNIX
-and GNU style of operations as possible. Each of these
-utilities are described in the section below.
-
-@ifinfo
-@node packhex - Compress Hexadecimal File, unhex - Convert Hexadecimal File into Binary, RTEMS Specific Utilities C Language Specific Utilities, RTEMS Specific Utilities C Language Specific Utilities
-@end ifinfo
-@subsection packhex - Compress Hexadecimal File
-
-@subheading SYNOPSIS
-
-@example
-packhex <source >destination
-@end example
-
-@subheading DESCRIPTION
-
-packhex accepts Intel Hexadecimal or Motorola Srecord
-on its standard input and attempts to pack as many contiguous
-bytes as possible into a single hexadecimal record. Many
-programs output hexadecimal records which are less than 80 bytes
-long (for human viewing). The overhead required by each
-unnecessary record is significant and packhex can often reduce
-the size of the download image by 20%. packhex attempts to
-output records which are as long as the hexadecimal format
-allows.
-
-@subheading OPTIONS
-
-This command has no options.
-
-@subheading EXAMPLES
-
-Assume the current directory contains the Motorola
-Srecord file download.sr. Then executing the command:
-
-@example
-packhex <download.sr >packed.sr
-@end example
-
-will generate the file packed.sr which is usually
-smaller than download.sr.
-
-@subheading CREDITS
-
-The source for packhex first appeared in the May 1993
-issue of Embedded Systems magazine. The code was downloaded
-from their BBS. Unfortunately, the author's name was not
-provided in the listing.
-
-@ifinfo
-@node unhex - Convert Hexadecimal File into Binary, size_rtems - report RTEMS size information, packhex - Compress Hexadecimal File, RTEMS Specific Utilities C Language Specific Utilities
-@end ifinfo
-@subsection unhex - Convert Hexadecimal File into Binary Equivalent
-
-@subheading SYNOPSIS
-
-@example
-unhex [-valF] [-o file] [file [file ...] ]
-@end example
-
-@subheading DESCRIPTION
-
-unhex accepts Intel Hexadecimal, Motorola Srecord, or
-TI 'B' records and converts them to their binary equivalent.
-The output may sent to standout or may be placed in a specified
-file with the -o option. The designated output file may not be
-an input file. Multiple input files may be specified with their
-outputs logically concatenated into the output file.
-
-@subheading OPTIONS
-
-This command has the following options:
-
-@table @code
-@item v
-Verbose
-
-@item a base
-First byte of output corresponds with base
-address
-
-@item l
-Linear Output
-
-@item o file
-Output File
-
-@item F k_bits
-Fill holes in input with 0xFFs up to k_bits * 1024 bits
-@end table
-
-@subheading EXAMPLES
-
-The following command will create a binary equivalent
-file for the two Motorola S record files in the specified output
-file binary.bin:
-
-@example
-unhex -o binary.bin downloadA.sr downloadB.sr
-@end example
-
-@ifinfo
-@node size_rtems - report RTEMS size information, RTEMS Specific Utilities Ada Language Specific Utilities, unhex - Convert Hexadecimal File into Binary, RTEMS Specific Utilities C Language Specific Utilities
-@end ifinfo
-@subsection size_rtems - report RTEMS size information
-
-@subheading SYNOPSIS
-
-@example
-size_rtems
-@end example
-
-@subheading DESCRIPTION
-
-size_rtems analyzes RTEMS and determines all of the
-critical sizing information which is reported in the related
-documentation.
-
-@subheading EXAMPLES
-
-To generate the RTEMS size report for the currently
-configured processor, execute the following command:
-
-@example
-size_rtems
-@end example
-
-Although the actual size information will differ, a
-report of the following format will be output:
-
-@example
- RTEMS SIZE REPORT
-
-CODE DATA BSS
-==================
-MANAGERS: 15988 0 0
-CORE : 4568 0 0
-CPU : 364 0 0
-OVERALL : 20556 0 0
-MINIMUM : 8752 0 0
-
-init : 1592 0 0
-tasks : 2440 0 0
-intr : 64 0 0
-clock : 2252 0 0
-sem : 876 0 0
-msg : 1624 0 0
-event : 604 0 0
-signal : 212 0 0
-part : 872 0 0
-region : 844 0 0
-dpmem : 532 0 0
-timer : 424 0 0
-io : 288 0 0
-fatal : 40 0 0
-rtmon : 764 0 0
-mp : 2984 0 0
-
-sem : 4 0 0
-msg : 4 0 0
-event : 4 0 0
-signal : 4 0 0
-part : 4 0 0
-region : 4 0 0
-timer : 4 0 0
-dpmem : 4 0 0
-io : 4 0 0
-rtmon : 4 0 0
-mp : 8 0 0
-@end example
-
-@subheading SEE ALSO
-
-gsize020(1G), gsize386(1G), gsize960(1G)
-
-
-@ifinfo
-@node RTEMS Specific Utilities Ada Language Specific Utilities, Command and Variable Index, size_rtems - report RTEMS size information, RTEMS Specific Utilities
-@end ifinfo
-@section Ada Language Specific Utilities
-
-The Ada language utilities provide a powerful set of
-tools which combine to allow operations within the RTEMS
-Development Environment to be consistent and easy to use. Much
-effort was devoted to providing as close to the standard UNIX
-and GNU style of operations as possible. Each of these
-utilities are described in the section below.
-
-NOTE: The Ada implementation is not included in this
-release.
-
-
-
diff --git a/doc/do_docs b/doc/do_docs
deleted file mode 100755
index ef3771a6f4..0000000000
--- a/doc/do_docs
+++ /dev/null
@@ -1,53 +0,0 @@
-#! /bin/sh
-#
-# $Id$
-#
-
-basedir=$1
-shift
-
-# classes of documents
-supplements="supplements/hppa1_1 supplements/i386 \
- supplements/i960 supplements/m68k supplements/sparc supplements/powerpc"
-
-# relnotes is obsolete
-
-# Division by access level
-public_docs="FAQ user develenv networking posix_users itron3.0 \
- started started_ada rtems_gdb rgdb_specs"
-support_docs="${supplements} bsp_howto filesystem porting ada_user posix1003.1"
-
-if [ x${MANUAL_SET} = x ] ; then
- MANUAL_SET=public
-fi
-
-case ${MANUAL_SET} in
- public)
- # manuals="$public_docs"
- # ;;
- #support)
- manuals="$public_docs $support_docs"
- ;;
- *)
- echo "ERROR: Unknown manual set ${MANUAL_SET}"
- exit 1
- ;;
-esac
-
-for action in $*
-do
- for manual in $manuals
- do
- if [ x${TEST} = xyes ] ; then
- echo "TEST *** make $action on ${basedir}/${manual} ***"
- else
- echo
- echo "*** make $action on ${basedir}/${manual} ***"
- echo
- cd ${basedir}/${manual}
- gmake $action || exit $?
- fi
- done
-done
-
-exit 0
diff --git a/doc/filesystem/Makefile b/doc/filesystem/Makefile
deleted file mode 100644
index 868ab9b40c..0000000000
--- a/doc/filesystem/Makefile
+++ /dev/null
@@ -1,120 +0,0 @@
-#
-# COPYRIGHT (c) 1988-1999.
-# On-Line Applications Research Corporation (OAR).
-# All rights reserved.
-#
-# $Id$
-#
-
-PROJECT=filesystem
-
-include ../Make.config
-
-REPLACE=../tools/word-replace
-
-BMENU+= -c
-
-all: html info ps pdf
-
-dirs:
- $(make-dirs)
-
-COMMON_FILES=../common/cpright.texi ../common/setup.texi
-
-GENERATED_FILES=patheval.texi \
- init.texi mounting.texi syscalls.texi fsrequirements.texi imfs.texi \
- miniimfs.texi tftp.texi
-
-FILES= $(PROJECT).texi \
- preface.texi $(GENERATED_FILES)
-
-INFOFILES=$(wildcard $(PROJECT) $(PROJECT)-*)
-
-info: dirs $(PROJECT)
- #cp $(wildcard $(PROJECT) $(PROJECT)-*) $(INFO_INSTALL)
- cp $(PROJECT) $(INFO_INSTALL)
-
-$(PROJECT): $(FILES)
- $(MAKEINFO) $(PROJECT).texi
-
-dvi: dirs $(PROJECT).dvi
-ps: dirs $(PROJECT).ps
-pdf: dirs $(PROJECT).pdf
-
-$(PROJECT).pdf: $(FILES)
- $(TEXI2PDF) $(PROJECT).texi
- cp $(PROJECT).pdf $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).ps: $(PROJECT).dvi
- dvips -o $(PROJECT).ps $(PROJECT).dvi
- cp $(PROJECT).ps $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).dvi: $(FILES)
- $(TEXI2DVI) $(PROJECT).texi
- cp $(PROJECT).dvi $(WWW_INSTALL)/$(PROJECT)
-
-patheval.texi: patheval.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-init.texi: init.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-mounting.texi: mounting.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-syscalls.texi: syscalls.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-fsrequirements.texi: fsrequirements.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-imfs.texi: imfs.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-miniimfs.texi: miniimfs.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-tftp.texi: tftp.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-html: dirs $(FILES)
- -mkdir -p $(WWW_INSTALL)/$(PROJECT)
- # rm -f $(WWW_INSTALL)/$(PROJECT)/networkflow.jpg
- # rm -f $(WWW_INSTALL)/$(PROJECT)/networkflow.png
- # rm -f $(WWW_INSTALL)/$(PROJECT)/PCIreg.jpg
- # cp recvbd.jpg $(WWW_INSTALL)/$(PROJECT)/recvbd.jpg
- # cp networkflow.jpg $(WWW_INSTALL)/$(PROJECT)/networkflow.jpg
- # cp networkflow.png $(WWW_INSTALL)/$(PROJECT)/networkflow.png
- # cp PCIreg.jpg $(WWW_INSTALL)/$(PROJECT)/PCIreg.jpg
- $(TEXI2WWW) $(TEXI2WWW_ARGS) -dir $(WWW_INSTALL)/$(PROJECT) \
- $(PROJECT).texi
-
-clean:
- rm -f *.o $(PROG) *.txt core $(PROJECT).pdf
- rm -f *.dvi *.ps *.log *.aux *.cp *.fn *.ky *.pg *.toc *.tp *.vr $(BASE)
- rm -f $(PROJECT) $(PROJECT)-* $(GENERATED_FILES)
- rm -f networking networking-*
- rm -f timedata.texi timetbl.texi intr.texi wksheets.texi
- rm -f timetbl.t wksheets.t
- rm -f *.fixed _*
-
-convert:
-# /usr/bin/gs -dMaxBitmap=300000000 -g5500x7500 -sDEVICE=pdfwrite -q -dNOPAUSE -dSAFER -sOutputFile=networkflow.pdf -- networkflow.eps -c -quit
-# /usr/bin/gs -dMaxBitmap=300000000 -g4500x5500 -sDEVICE=pdfwrite -q -dNOPAUSE -dSAFER -sOutputFile=PCIreg.pdf -- PCIreg.eps -c -quit
-# /usr/bin/gs -dMaxBitmap=300000000 -g4500x5500 -sDEVICE=pdfwrite -q -dNOPAUSE -dSAFER -sOutputFile=recvbd.pdf -- recvbd.eps -c -quit
diff --git a/doc/filesystem/filesystem.texi b/doc/filesystem/filesystem.texi
deleted file mode 100644
index eabde38005..0000000000
--- a/doc/filesystem/filesystem.texi
+++ /dev/null
@@ -1,115 +0,0 @@
-\input texinfo @c -*-texinfo-*-
-@c %**start of header
-@setfilename filesystem
-@syncodeindex vr fn
-@synindex ky cp
-@paragraphindent 0
-@c @smallbook
-@c %**end of header
-
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@c
-@c Master file for the Filesystem Design Guide
-@c
-
-@include ../common/setup.texi
-
-@ignore
-@ifinfo
-@format
-START-INFO-DIR-ENTRY
-* RTEMS Filesystem Design Guide:
-END-INFO-DIR-ENTRY
-@end format
-@end ifinfo
-@end ignore
-
-@c
-@c Title Page Stuff
-@c
-
-@set edition @value{RTEMS-EDITION}
-@set version @value{RTEMS-VERSION}
-@set update-date @value{RTEMS-UPDATE-DATE}
-@set update-month @value{RTEMS-UPDATE-MONTH}
-
-@c
-@c I don't really like having a short title page. --joel
-@c
-@c @shorttitlepage RTEMS Filesystem Design Guide
-
-@setchapternewpage odd
-@settitle RTEMS Filesystem Design Guide
-@titlepage
-@finalout
-
-@title RTEMS Filesystem Design Guide
-@subtitle Edition @value{edition}, for RTEMS @value{version}
-@sp 1
-@subtitle @value{update-month}
-@author On-Line Applications Research Corporation
-@page
-@include ../common/cpright.texi
-@end titlepage
-
-@c This prevents a black box from being printed on "overflow" lines.
-@c The alternative is to rework a sentence to avoid this problem.
-
-@include preface.texi
-@include patheval.texi
-@include init.texi
-@include mounting.texi
-@include syscalls.texi
-@include fsrequirements.texi
-@include imfs.texi
-@include miniimfs.texi
-@include tftp.texi
-@ifinfo
-@node Top, Preface, (dir), (dir)
-@top filesystem
-
-This is the online version of the RTEMS Filesystem Design Guide.
-
-@menu
-* Preface::
-* Pathname Evaluation::
-* System Initialization::
-* Mounting and Unmounting Filesystems::
-* System Call Development Notes::
-* Filesystem Implementation Requirements::
-* In-Memory Filesystem::
-* Miniature In-Memory Filesystem::
-* Trivial FTP Client Filesystem::
-* Command and Variable Index::
-* Concept Index::
-@end menu
-
-@end ifinfo
-@c
-@c
-@c Need to copy the emacs stuff and "trailer stuff" (index, toc) into here
-@c
-
-@node Command and Variable Index, Concept Index, , Top
-@unnumbered Command and Variable Index
-
-There are currently no Command and Variable Index entries.
-
-@c @printindex fn
-
-@node Concept Index, , Command and Variable Index, Top
-@unnumbered Concept Index
-
-There are currently no Concept Index entries.
-@c @printindex cp
-
-@contents
-@bye
-
diff --git a/doc/filesystem/fsrequirements.t b/doc/filesystem/fsrequirements.t
deleted file mode 100644
index 5ce4e86c61..0000000000
--- a/doc/filesystem/fsrequirements.t
+++ /dev/null
@@ -1,1183 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-
-@chapter Filesystem Implementation Requirements
-
-This chapter details the behavioral requirements that all filesystem
-implementations must adhere to.
-
-@section General
-
-The RTEMS filesystem framework was intended to be compliant with the
-POSIX Files and Directories interface standard. The following filesystem
-characteristics resulted in a functional switching layer.
-
-@example
-Figure of the Filesystem Functional Layering goes here.
-This figure includes networking and disk caching layering.
-@end example
-
-@ifset use-ascii
-@example
-@group
-@end group
-@end example
-@end ifset
-
-@ifset use-tex
-@c @image{FunctionalLayerCake,6in,4in}
-@end ifset
-
-@ifset use-html
-@end ifset
-
-@enumerate
-
-@item Application programs are presented with a standard set of POSIX
-compliant functions that allow them to interface with the files, devices
-and directories in the filesystem. The interfaces to these routines do
-not reflect the type of subordinate filesystem implementation in which
-the file will be found.
-
-@item The filesystem framework developed under RTEMS allows for mounting
-filesystem of different types under the base filesystem.
-
-@item The mechanics of locating file information may be quite different
-between filesystem types.
-
-@item The process of locating a file may require crossing filesystem
-boundaries.
-
-@item The transitions between filesystem and the processing required to
-access information in different filesystem is not visible at the level
-of the POSIX function call.
-
-@item The POSIX interface standard provides file access by character
-pathname to the file in some functions and through an integer file
-descriptor in other functions.
-
-@item The nature of the integer file descriptor and its associated
-processing is operating system and filesystem specific.
-
-@item Directory and device information must be processed with some of the
-same routines that apply to files.
-
-@item The form and content of directory and device information differs
-greatly from that of a regular file.
-
-@item Files, directories and devices represent elements (nodes) of a tree
-hierarchy.
-
-@item The rules for processing each of the node types that exist under the
-filesystem are node specific but are still not reflected in the POSIX
-interface routines.
-
-@end enumerate
-
-
-@example
-Figure of the Filesystem Functional Layering goes here.
-This figure focuses on the Base Filesystem and IMFS.
-@end example
-
-@example
-Figure of the IMFS Memfile control blocks
-@end example
-
-@section File and Directory Removal Constraints
-
-The following POSIX constraints must be honored by all filesystems.
-
-@itemize @bullet
-
-@item If a node is a directory with children it cannot be removed.
-
-@item The root node of any filesystem, whether the base filesystem or a
-mounted filesystem, cannot be removed.
-
-@item A node that is a directory that is acting as the mount point of a file
-system cannot be removed.
-
-@item On filesystems supporting hard links, a link count is maintained.
-Prior to node removal, the node's link count is decremented by one. The
-link count must be less than one to allow for removal of the node.
-
-@end itemize
-
-@c
-@c
-@c
-@section API Layering
-
-@subsection Mapping of Generic System Calls to Filesystem Specific Functions
-
-The list of generic system calls includes the routines open(), read(),
-write(), close(), etc..
-
-The Files and Directories section of the POSIX Application Programs
-Interface specifies a set of functions with calling arguments that are
-used to gain access to the information in a filesystem. To the
-application program, these functions allow access to information in any
-mounted filesystem without explicit knowledge of the filesystem type or
-the filesystem mount configuration. The following are functions that are
-provided to the application:
-
-@enumerate
-@item access()
-@item chdir()
-@item chmod()
-@item chown()
-@item close()
-@item closedir()
-@item fchmod()
-@item fcntl()
-@item fdatasync()
-@item fpathconf()
-@item fstat()
-@item fsync()
-@item ftruncate()
-@item link()
-@item lseek()
-@item mkdir()
-@item mknod()
-@item mount()
-@item open()
-@item opendir()
-@item pathconf()
-@item read()
-@item readdir()
-@item rewinddir()
-@item rmdir()
-@item rmnod()
-@item scandir()
-@item seekdir()
-@item stat()
-@item telldir()
-@item umask()
-@item unlink()
-@item unmount()
-@item utime()
-@item write()
-@end enumerate
-
-The filesystem's type as well as the node type within the filesystem
-determine the nature of the processing that must be performed for each of
-the functions above. The RTEMS filesystem provides a framework that
-allows new filesystem to be developed and integrated without alteration
-to the basic framework.
-
-To provide the functional switching that is required, each of the POSIX
-file and directory functions have been implemented as a shell function.
-The shell function adheres to the POSIX interface standard. Within this
-functional shell, filesystem and node type information is accessed which
-is then used to invoke the appropriate filesystem and node type specific
-routine to process the POSIX function call.
-
-@subsection File/Device/Directory function access via file control block - rtems_libio_t structure
-
-The POSIX open() function returns an integer file descriptor that is used
-as a reference to file control block information for a specific file. The
-file control block contains information that is used to locate node, file
-system, mount table and functional handler information. The diagram in
-Figure 8 depicts the relationship between and among the following
-components.
-
-@enumerate
-
-@item File Descriptor Table
-
-This is an internal RTEMS structure that tracks all currently defined file
-descriptors in the system. The index that is returned by the file open()
-operation references a slot in this table. The slot contains a pointer to
-the file descriptor table entry for this file. The rtems_libio_t structure
-represents the file control block.
-
-@item Allocation of entry in the File Descriptor Table
-
-Access to the file descriptor table is controlled through a semaphore that
-is implemented using the rtems_libio_allocate() function. This routine
-will grab a semaphore and then scan the file control blocks to determine
-which slot is free for use. The first free slot is marked as used and the
-index to this slot is returned as the file descriptor for the open()
-request. After the alterations have been made to the file control block
-table, the semaphore is released to allow further operations on the table.
-
-@item Maximum number of entries in the file descriptor table is
-configurable through the src/exec/sapi/headers/confdefs.h file. If the
-CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS constant is defined its value
-will represent the maximum number of file descriptors that are allowed.
-If CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS is not specified a default
-value of 20 will be used as the maximum number of file descriptors
-allowed.
-
-@item File control block - rtems_libio_t structure
-
-@example
-struct rtems_libio_tt @{
- rtems_driver_name_t *driver;
- off_t size;
- off_t offset;
- unsigned32 flags;
- rtems_filesystem_location_info_t pathinfo;
- Objects_Id sem;
- unsigned32 data0;
- void data1;
- void file_info;
- rtems_filesystem_file_handlers_r handlers;
-@};
-@end example
-
-A file control block can exist for regular files, devices and directories.
-The following fields are important for regular file and directory access:
-
-@itemize @bullet
-
-@item Size - For a file this represents the number of bytes currently
-stored in a file. For a directory this field is not filled in.
-
-@item Offset - For a file this is the byte file position index relative to
-the start of the file. For a directory this is the byte offset into a
-sequence of dirent structures.
-
-@item Pathinfo - This is a structure that provides a pointer to node
-information, OPS table functions, Handler functions and the mount table
-entry associated with this node.
-
-@item file_info - A pointer to node information that is used by Handler
-functions
-
-@item handlers - A pointer to a table of handler functions that operate on
-a file, device or directory through a file descriptor index
-
-@end itemize
-
-@end enumerate
-
-@subsection File/Directory function access via rtems_filesystem_location_info_t structure
-
-The rtems_filesystem_location_info_tt structure below provides sufficient
-information to process nodes under a mounted filesystem.
-
-@example
-struct rtems_filesystem_location_info_tt @{
- void *node_access;
- rtems_filesystem_file_handlers_r *handlers;
- rtems_filesystem_operations_table *ops;
- rtems_filesystem_mount_table_entry_t *mt_entry;
-@};
-@end example
-
-It contains a void pointer to filesystem specific nodal structure,
-pointers to the OPS table for the filesystem that contains the node, the
-node type specific handlers for the node and a reference pointer to the
-mount table entry associated with the filesystem containing the node
-
-@section Operation Tables
-
-Filesystem specific operations are invoked indirectly. The set of
-routines that implement the filesystem are configured into two tables.
-The Filesystem Handler Table has routines that are specific to a
-filesystem but remain constant regardless of the actual file type.
-The File Handler Table has routines that are both filesystem and file type
-specific.
-
-@subsection Filesystem Handler Table Functions
-
-OPS table functions are defined in a @code{rtems_filesystem_operations_table}
-structure. It defines functions that are specific to a given filesystem.
-One table exists for each filesystem that is supported in the RTEMS
-configuration. The structure definition appears below and is followed by
-general developmental information on each of the functions contained in this
-function management structure.
-
-@example
-typedef struct @{
- rtems_filesystem_evalpath_t evalpath;
- rtems_filesystem_evalmake_t evalformake;
- rtems_filesystem_link_t link;
- rtems_filesystem_unlink_t unlink;
- rtems_filesystem_node_type_t node_type;
- rtems_filesystem_mknod_t mknod;
- rtems_filesystem_rmnod_t rmnod;
- rtems_filesystem_chown_t chown;
- rtems_filesystem_freenode_t freenod;
- rtems_filesystem_mount_t mount;
- rtems_filesystem_fsmount_me_t fsmount_me;
- rtems_filesystem_unmount_t unmount;
- rtems_filesystem_fsunmount_me_t fsunmount_me;
- rtems_filesystem_utime_t utime;
- rtems_filesystem_evaluate_link_t eval_link;
- rtems_filesystem_symlink_t symlink;
-@} rtems_filesystem_operations_table;
-@end example
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection evalpath Handler
-
-@subheading Corresponding Structure Element:
-
-evalpath
-
-@subheading Arguments:
-
-@example
- const char *pathname, /* IN */
- int flags, /* IN */
- rtems_filesystem_location_info_t *pathloc /* IN/OUT */
-@end example
-
-@subheading Description:
-
-This routine is responsible for evaluating the pathname passed in
-based upon the flags and the valid @code{rthems_filesystem_location_info_t}.
-Additionally, it must make any changes to pathloc necessary to identify
-the pathname node. This should include calling the evalpath for a mounted
-filesystem, if the given filesystem supports the mount command.
-
-This routine returns a 0 if the evaluation was successful.
-Otherwise, it returns a -1 and sets errno to the correct error.
-
-This routine is required and should NOT be set to NULL.
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection evalformake Handler
-
-@subheading Corresponding Structure Element:
-
-evalformake
-
-@subheading Arguments:
-
-@example
- const char *path, /* IN */
- rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
- const char **name /* OUT */
-@end example
-
-@subheading Description:
-
-This method is given a path to evaluate and a valid start location. It
-is responsible for finding the parent node for a requested make command,
-setting pathloc information to identify the parent node, and setting
-the name pointer to the first character of the name of the new node.
-Additionally, if the filesystem supports the mount command, this method
-should call the evalformake routine for the mounted filesystem.
-
-This routine returns a 0 if the evaluation was successful. Otherwise, it
-returns a -1 and sets errno to the correct error.
-
-This routine is required and should NOT be set to NULL. However, if
-the filesystem does not support user creation of a new node, it may
-set errno to ENOSYS and return -1.
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection link Handler
-
-@subheading Corresponding Structure Element:
-
-link
-
-@subheading Arguments:
-
-
-@example
-rtems_filesystem_location_info_t *to_loc, /* IN */
-rtems_filesystem_location_info_t *parent_loc, /* IN */
-const char *token /* IN */
-@end example
-
-@subheading Description:
-
-
-This routine is used to create a hard-link.
-
-It will first examine the st_nlink count of the node that we are trying to.
-If the link count exceeds LINK_MAX an error will be returned.
-
-The name of the link will be normalized to remove extraneous separators from
-the end of the name.
-
-This routine is not required and may be set to NULL.
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection unlink Handler
-
-@subheading Corresponding Structure Element:
-
-XXX
-
-@subheading Arguments:
-
-XXX
-
-@subheading Description:
-
-XXX
-
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection node_type Handler
-
-@subheading Corresponding Structure Element:
-
-node_type()
-
-@subheading Arguments:
-
-@example
-rtems_filesystem_location_info_t *pathloc /* IN */
-@end example
-
-@subheading Description:
-
-XXX
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection mknod Handler
-
-@subheading Corresponding Structure Element:
-
-mknod()
-
-@subheading Arguments:
-
-@example
-const char *token, /* IN */
-mode_t mode, /* IN */
-dev_t dev, /* IN */
-rtems_filesystem_location_info_t *pathloc /* IN/OUT */
-@end example
-
-@subheading Description:
-
-XXX
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection rmnod Handler
-
-@subheading Corresponding Structure Element:
-
-XXX
-
-@subheading Arguments:
-
-XXX
-
-@subheading Description:
-
-XXX
-
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection chown Handler
-
-@subheading Corresponding Structure Element:
-
-chown()
-
-@subheading Arguments:
-
-@example
-rtems_filesystem_location_info_t *pathloc /* IN */
-uid_t owner /* IN */
-gid_t group /* IN */
-@end example
-
-@subheading Description:
-
-XXX
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection freenod Handler
-
-@subheading Corresponding Structure Element:
-
-freenod()
-
-@subheading Arguments:
-
-@example
-rtems_filesystem_location_info_t *pathloc /* IN */
-@end example
-
-@subheading Description:
-
-This routine is used by the generic code to allow memory to be allocated
-during the evaluate routines, and set free when the generic code is finished
-accessing a node. If the evaluate routines allocate memory to identify
-a node this routine should be utilized to free that memory.
-
-This routine is not required and may be set to NULL.
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection mount Handler
-
-@subheading Corresponding Structure Element:
-
-mount()
-
-@subheading Arguments:
-
-@example
-rtems_filesystem_mount_table_entry_t *mt_entry
-@end example
-
-@subheading Description:
-
-XXX
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection fsmount_me Handler
-
-@subheading Corresponding Structure Element:
-
-XXX
-
-@subheading Arguments:
-
-@example
-rtems_filesystem_mount_table_entry_t *mt_entry
-@end example
-
-@subheading Description:
-
-This function is provided with a filesystem to take care of the internal
-filesystem management details associated with mounting that filesystem
-under the RTEMS environment.
-
-It is not responsible for the mounting details associated the filesystem
-containing the mount point.
-
-The rtems_filesystem_mount_table_entry_t structure contains the key elements
-below:
-
-rtems_filesystem_location_info_t *mt_point_node,
-
-This structure contains information about the mount point. This
-allows us to find the ops-table and the handling functions
-associated with the filesystem containing the mount point.
-
-rtems_filesystem_location_info_t *fs_root_node,
-
-This structure contains information about the root node in the file
-system to be mounted. It allows us to find the ops-table and the
-handling functions associated with the filesystem to be mounted.
-
-rtems_filesystem_options_t options,
-
-Read only or read/write access
-
-void *fs_info,
-
-This points to an allocated block of memory the will be used to
-hold any filesystem specific information of a global nature. This
-allocated region if important because it allows us to mount the
-same filesystem type more than once under the RTEMS system.
-Each instance of the mounted filesystem has its own set of global
-management information that is separate from the global
-management information associated with the other instances of the
-mounted filesystem type.
-
-rtems_filesystem_limits_and_options_t pathconf_info,
-
-The table contains the following set of values associated with the
-mounted filesystem:
-
-@itemize @bullet
-
-@item link_max
-
-@item max_canon
-
-@item max_input
-
-@item name_max
-
-@item path_max
-
-@item pipe_buf
-
-@item posix_async_io
-
-@item posix_chown_restrictions
-
-@item posix_no_trunc
-
-@item posix_prio_io
-
-@item posix_sync_io
-
-@item posix_vdisable
-
-@end itemize
-
-These values are accessed with the pathconf() and the fpathconf ()
-functions.
-
-const char *dev
-
-The is intended to contain a string that identifies the device that contains
-the filesystem information. The filesystems that are currently implemented
-are memory based and don't require a device specification.
-
-If the mt_point_node.node_access is NULL then we are mounting the base file
-system.
-
-The routine will create a directory node for the root of the IMFS file
-system.
-
-The node will have read, write and execute permissions for owner, group and
-others.
-
-The node's name will be a null string.
-
-A filesystem information structure(fs_info) will be allocated and
-initialized for the IMFS filesystem. The fs_info pointer in the mount table
-entry will be set to point the filesystem information structure.
-
-The pathconf_info element of the mount table will be set to the appropriate
-table of path configuration constants (LIMITS_AND_OPTIONS).
-
-The fs_root_node structure will be filled in with the following:
-
-@itemize @bullet
-
-@item pointer to the allocated root node of the filesystem
-
-@item directory handlers for a directory node under the IMFS filesystem
-
-@item OPS table functions for the IMFS
-
-@end itemize
-
-A 0 will be returned to the calling routine if the process succeeded,
-otherwise a 1 will be returned.
-
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection unmount Handler
-
-@subheading Corresponding Structure Element:
-
-XXX
-
-@subheading Arguments:
-
-XXX
-
-@subheading Description:
-
-XXX
-
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection fsunmount_me Handler
-
-@subheading Corresponding Structure Element:
-
-imfs_fsunmount_me()
-
-@subheading Arguments:
-
-@example
-rtems_filesystem_mount_table_entry_t *mt_entry
-@end example
-
-@subheading Description:
-
-XXX
-
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection utime Handler
-
-@subheading Corresponding Structure Element:
-
-XXX
-
-@subheading Arguments:
-
-XXX
-
-@subheading Description:
-
-XXX
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection eval_link Handler
-
-@subheading Corresponding Structure Element:
-
-XXX
-
-@subheading Arguments:
-
-XXX
-
-@subheading Description:
-
-XXX
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection symlink Handler
-
-@subheading Corresponding Structure Element:
-
-XXX
-
-@subheading Arguments:
-
-XXX
-
-@subheading Description:
-
-XXX
-
-@c
-@c
-@c
-@c @page
-@subsection File Handler Table Functions
-
-Handler table functions are defined in a @code{rtems_filesystem_file_handlers_r}
-structure. It defines functions that are specific to a node type in a given
-filesystem. One table exists for each of the filesystem's node types. The
-structure definition appears below. It is followed by general developmental
-information on each of the functions associated with regular files contained
-in this function management structure.
-
-@example
-typedef struct @{
- rtems_filesystem_open_t open;
- rtems_filesystem_close_t close;
- rtems_filesystem_read_t read;
- rtems_filesystem_write_t write;
- rtems_filesystem_ioctl_t ioctl;
- rtems_filesystem_lseek_t lseek;
- rtems_filesystem_fstat_t fstat;
- rtems_filesystem_fchmod_t fchmod;
- rtems_filesystem_ftruncate_t ftruncate;
- rtems_filesystem_fpathconf_t fpathconf;
- rtems_filesystem_fsync_t fsync;
- rtems_filesystem_fdatasync_t fdatasync;
- rtems_filesystem_fcntl_t fcntl;
-@} rtems_filesystem_file_handlers_r;
-@end example
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection open Handler
-
-@subheading Corresponding Structure Element:
-
-open()
-
-@subheading Arguments:
-
-@example
-rtems_libio_t *iop,
-const char *pathname,
-unsigned32 flag,
-unsigned32 mode
-@end example
-
-@subheading Description:
-
-XXX
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection close Handler
-
-@subheading Corresponding Structure Element:
-
-close()
-
-@subheading Arguments:
-
-@example
-rtems_libio_t *iop
-@end example
-
-@subheading Description:
-
-XXX
-
-@subheading NOTES:
-
-XXX
-
-
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection read Handler
-
-@subheading Corresponding Structure Element:
-
-read()
-
-@subheading Arguments:
-
-@example
-rtems_libio_t *iop,
-void *buffer,
-unsigned32 count
-@end example
-
-@subheading Description:
-
-XXX
-
-@subheading NOTES:
-
-XXX
-
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection write Handler
-
-@subheading Corresponding Structure Element:
-
-XXX
-
-@subheading Arguments:
-
-XXX
-@subheading Description:
-
-XXX
-
-@subheading NOTES:
-
-XXX
-
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection ioctl Handler
-
-@subheading Corresponding Structure Element:
-
-XXX
-
-@subheading Arguments:
-
-@example
-rtems_libio_t *iop,
-unsigned32 command,
-void *buffer
-@end example
-
-@subheading Description:
-
-XXX
-
-@subheading NOTES:
-
-XXX
-
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection lseek Handler
-
-@subheading Corresponding Structure Element:
-
-lseek()
-
-@subheading Arguments:
-
-@example
-rtems_libio_t *iop,
-off_t offset,
-int whence
-@end example
-
-@subheading Description:
-
-XXX
-
-@subheading NOTES:
-
-XXX
-
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection fstat Handler
-
-@subheading Corresponding Structure Element:
-
-fstat()
-
-@subheading Arguments:
-
-@example
-rtems_filesystem_location_info_t *loc,
-struct stat *buf
-@end example
-
-@subheading Description:
-
-The following information is extracted from the filesystem
-specific node and placed in the @code{stat} structure:
-
-@itemize @bullet
-
-@item st_mode
-
-@item st_nlink
-
-@item st_ino
-
-@item st_uid
-
-@item st_gid
-
-@item st_atime
-
-@item st_mtime
-
-@item st_ctime
-
-@end itemize
-
-
-@subheading NOTES:
-
-Both the @code{stat()} and @code{lstat()} services are
-implemented directly using the @code{fstat()} handler. The
-difference in behavior is determined by how the path is evaluated
-prior to this handler being called on a particular
-file entity.
-
-The @code{fstat()} system call is implemented directly
-on top of this filesystem handler.
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection fchmod Handler
-
-@subheading Corresponding Structure Element:
-
-fchmod()
-
-@subheading Arguments:
-
-@example
-rtems_libio_t *iop
-mode_t mode
-@end example
-
-@subheading Description:
-
-XXX
-
-
-@subheading NOTES:
-
-XXX
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection ftruncate Handler
-
-@subheading Corresponding Structure Element:
-
-XXX
-
-@subheading Arguments:
-
-XXX
-@subheading Description:
-
-XXX
-
-@subheading NOTES:
-
-XXX
-
-@subsubsection fpathconf Handler
-
-@subheading Corresponding Structure Element:
-
-XXX
-
-@subheading Arguments:
-
-XXX
-
-@subheading Description:
-
-XXX
-
-@subheading NOTES:
-
-XXX
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection fsync Handler
-
-@subheading Corresponding Structure Element:
-
-XXX
-
-@subheading Arguments:
-
-XXX
-@subheading Description:
-
-XXX
-
-@subheading NOTES:
-
-XXX
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection fdatasync Handler
-
-@subheading Corresponding Structure Element:
-
-XXX
-
-@subheading Arguments:
-
-XXX
-
-@subheading Description:
-
-XXX
-
-@subheading NOTES:
-
-XXX
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection fcntl Handler
-
-@subheading Corresponding Structure Element:
-
-XXX
-
-@subheading Arguments:
-
-XXX
-
-@subheading Description:
-
-XXX
-
-@subheading NOTES:
-
-XXX
diff --git a/doc/filesystem/imfs.t b/doc/filesystem/imfs.t
deleted file mode 100644
index 1ba18edb88..0000000000
--- a/doc/filesystem/imfs.t
+++ /dev/null
@@ -1,2038 +0,0 @@
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter In-Memory Filesystem
-
-This chapter describes the In-Memory FileSystem (IMFS). The IMFS is a
-full featured POSIX filesystem that keeps all information in memory.
-
-@section IMFS Per Node Data Structure
-
-Each regular file, device, hard link, and directory is represented by a data
-structure called a @code{jnode}. The @code{jnode} is formally represented by the
-structure:
-
-@example
-struct IMFS_jnode_tt @{
- Chain_Node Node; /* for chaining them together */
- IMFS_jnode_t *Parent; /* Parent node */
- char name[NAME_MAX+1]; /* "basename" */
- mode_t st_mode; /* File mode */
- nlink_t st_nlink; /* Link count */
- ino_t st_ino; /* inode */
-
- uid_t st_uid; /* User ID of owner */
- gid_t st_gid; /* Group ID of owner */
- time_t st_atime; /* Time of last access */
- time_t st_mtime; /* Time of last modification */
- time_t st_ctime; /* Time of last status change */
- IMFS_jnode_types_t type; /* Type of this entry */
- IMFS_typs_union info;
-@};
-@end example
-
-The key elements of this structure are listed below together with a brief
-explanation of their role in the filesystem.
-
-@table @b
-
-@item Node
-exists to allow the entire @code{jnode} structure to be included in a chain.
-
-@item Parent
-is a pointer to another @code{jnode} structure that is the logical parent of the
-node in which it appears. This field may be NULL if the file associated with
-this node is deleted but there are open file descriptors on this file or
-there are still hard links to this node.
-
-@item name
-is the name of this node within the filesystem hierarchical tree. Example: If
-the fully qualified pathname to the @code{jnode} was @code{/a/b/c}, the
-@code{jnode} name field would contain the null terminated string @code{"c"}.
-
-@item st_mode
-is the standard Unix access permissions for the file or directory.
-
-@item st_nlink
-is the number of hard links to this file. When a @code{jnode} is first created
-its link count is set to 1. A @code{jnode} and its associated resources
-cannot be deleted unless its link count is less than 1.
-
-@item st_ino
-is a unique node identification number
-
-@item st_uid
-is the user ID of the file's owner
-
-@item st_gid
-is the group ID of the file's owner
-
-@item st_atime
-is the time of the last access to this file
-
-@item st_mtime
-is the time of the last modification of this file
-
-@item st_ctime
-is the time of the last status change to the file
-
-@item type
-is the indication of node type must be one of the following states:
-
-@itemize @bullet
-@item IMFS_DIRECTORY
-@item IMFS_MEMORY_FILE
-@item IMFS_HARD_LINK
-@item IMFS_SYM_LINK
-@item IMFS_DEVICE
-@end itemize
-
-
-@item info
-is this contains a structure that is unique to file type (See IMFS_typs_union
-in imfs.h).
-
-@itemize @bullet
-
-@item IMFS_DIRECTORY
-
-An IMFS directory contains a dynamic chain structure that
-records all files and directories that are subordinate to the directory node.
-
-@item IMFS_MEMORY_FILE
-
-Under the in memory filesystem regular files hold data. Data is dynamically
-allocated to the file in 128 byte chunks of memory. The individual chunks of
-memory are tracked by arrays of pointers that record the address of the
-allocated chunk of memory. Single, double, and triple indirection pointers
-are used to record the locations of all segments of the file. The
-memory organization of an IMFS file are discussed elsewhere in this manual.
-
-@item IMFS_HARD_LINK
-
-The IMFS filesystem supports the concept of hard links to other nodes in the
-IMFS filesystem. These hard links are actual pointers to other nodes in the
-same filesystem. This type of link cannot cross-filesystem boundaries.
-
-@item IMFS_SYM_LINK
-
-The IMFS filesystem supports the concept of symbolic links to other nodes in
-any filesystem. A symbolic link consists of a pointer to a character string
-that represents the pathname to the target node. This type of link can
-cross-filesystem boundaries. Just as with most versions of UNIX supporting
-symbolic links, a symbolic link can point to a non-existent file.
-
-@item IMFS_DEVICE
-
-All RTEMS devices now appear as files under the in memory filesystem. On
-system initialization, all devices are registered as nodes under the file
-system.
-
-@end itemize
-
-@end table
-
-@section Miscellaneous IMFS Information
-
-@section Memory associated with the IMFS
-
-A memory based filesystem draws its resources for files and directories
-from the memory resources of the system. When it is time to un-mount the
-filesystem, the memory resources that supported filesystem are set free.
-In order to free these resources, a recursive walk of the filesystems
-tree structure will be performed. As the leaf nodes under the filesystem
-are encountered their resources are freed. When directories are made empty
-by this process, their resources are freed.
-
-@subsection Node removal constraints for the IMFS
-
-The IMFS conforms to the general filesystem requirements for node
-removal. See @ref{File and Directory Removal Constraints}.
-
-@subsection IMFS General Housekeeping Notes
-
-The following is a list of odd housekeeping notes for the IMFS.
-
-@itemize @bullet
-
-@item If the global variable rtems_filesystem_current refers to the node that
-we are trying to remove, the node_access element of this structure must be
-set to NULL to invalidate it.
-
-@item If the node was of IMFS_MEMORY_FILE type, free the memory associated
-with the memory file before freeing the node. Use the IMFS_memfile_remove()
-function.
-
-@end itemize
-
-@section IMFS Operation Tables
-
-@subsection IMFS Filesystem Handler Table Functions
-
-OPS table functions are defined in a rtems_filesystem_operations_table
-structure. It defines functions that are specific to a given filesystem.
-One table exists for each filesystem that is supported in the RTEMS
-configuration. The structure definition appears below and is followed by
-general developmental information on each of the functions contained in this
-function management structure.
-
-@example
-rtems_filesystem_operations_table IMFS_ops = @{
- IMFS_eval_path,
- IMFS_evaluate_for_make,
- IMFS_link,
- IMFS_unlink,
- IMFS_node_type,
- IMFS_mknod,
- IMFS_rmnod,
- IMFS_chown,
- IMFS_freenodinfo,
- IMFS_mount,
- IMFS_initialize,
- IMFS_unmount,
- IMFS_fsunmount,
- IMFS_utime,
- IMFS_evaluate_link,
- IMFS_symlink,
- IMFS_readlink
-@};
-@end example
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection IMFS_evalpath()
-
-@subheading Corresponding Structure Element:
-
-XXX
-
-@subheading Arguments:
-
-XXX
-
-@subheading File:
-
-XXX
-
-@subheading Description:
-
-XXX
-
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection IMFS_evalformake()
-
-@subheading Corresponding Structure Element:
-
-XXX
-
-@subheading Arguments:
-
-XXX
-
-@subheading File:
-
-XXX
-
-@subheading Description:
-
-XXX
-
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection IMFS_link()
-
-@subheading Corresponding Structure Element:
-
-link
-
-@subheading Arguments:
-
-
-@example
-rtems_filesystem_location_info_t *to_loc, /* IN */
-rtems_filesystem_location_info_t *parent_loc, /* IN */
-const char *token /* IN */
-@end example
-
-@subheading File:
-
-imfs_link.c
-
-@subheading Description:
-
-
-This routine is used in the IMFS filesystem to create a hard-link.
-
-It will first examine the st_nlink count of the node that we are trying to.
-If the link count exceeds LINK_MAX an error will be returned.
-
-The name of the link will be normalized to remove extraneous separators from
-the end of the name.
-
-IMFS_create_node will be used to create a filesystem node that will have the
-following characteristics:
-
-@itemize @bullet
-
-@item parent that was determined in the link() function in file link.c
-
-@item Type will be set to IMFS_HARD_LINK
-
-@item name will be set to the normalized name
-
-@item mode of the hard-link will be set to the mode of the target node
-
-@end itemize
-
-If there was trouble allocating memory for the new node an error will be
-returned.
-
-The st_nlink count of the target node will be incremented to reflect the new
-link.
-
-The time fields of the link will be set to reflect the creation time of the
-hard-link.
-
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection IMFS_unlink()
-
-@subheading Corresponding Structure Element:
-
-XXX
-
-@subheading Arguments:
-
-XXX
-
-@subheading File:
-
-XXX
-
-@subheading Description:
-
-XXX
-
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection IMFS_node_type()
-
-@subheading Corresponding Structure Element:
-
-IMFS_node_type()
-
-@subheading Arguments:
-
-@example
-rtems_filesystem_location_info_t *pathloc /* IN */
-@end example
-
-@subheading File:
-
-imfs_ntype.c
-
-@subheading Description:
-
-This routine will locate the IMFS_jnode_t structure that holds ownership
-information for the selected node in the filesystem.
-
-This structure is pointed to by pathloc->node_access.
-
-The IMFS_jnode_t type element indicates one of the node types listed below:
-
-@itemize @bullet
-
-@item RTEMS_FILESYSTEM_DIRECTORY
-
-@item RTEMS_FILESYSTEM_DEVICE
-
-@item RTEMS_FILESYSTEM_HARD_LINK
-
-@item RTEMS_FILESYSTEM_MEMORY_FILE
-
-@end itemize
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection IMFS_mknod()
-
-@subheading Corresponding Structure Element:
-
-IMFS_mknod()
-
-@subheading Arguments:
-
-@example
-const char *token, /* IN */
-mode_t mode, /* IN */
-dev_t dev, /* IN */
-rtems_filesystem_location_info_t *pathloc /* IN/OUT */
-@end example
-
-@subheading File:
-
-imfs_mknod.c
-
-@subheading Description:
-
-This routine will examine the mode argument to determine is we are trying to
-create a directory, regular file and a device node. The creation of other
-node types is not permitted and will cause an assert.
-
-Memory space will be allocated for a @code{jnode} and the node will be set up
-according to the nodal type that was specified. The IMFS_create_node()
-function performs the allocation and setup of the node.
-
-The only problem that is currently reported is the lack of memory when we
-attempt to allocate space for the @code{jnode} (ENOMEN).
-
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection IMFS_rmnod()
-
-@subheading Corresponding Structure Element:
-
-XXX
-
-@subheading Arguments:
-
-XXX
-
-@subheading File:
-
-XXX
-
-@subheading Description:
-
-XXX
-
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection IMFS_chown()
-
-@subheading Corresponding Structure Element:
-
-IMFS_chown()
-
-@subheading Arguments:
-
-@example
-rtems_filesystem_location_info_t *pathloc /* IN */
-uid_t owner /* IN */
-gid_t group /* IN */
-@end example
-
-@subheading File:
-
-imfs_chown.c
-
-@subheading Description:
-
-This routine will locate the IMFS_jnode_t structure that holds ownership
-information for the selected node in the filesystem.
-
-This structure is pointed to by pathloc->node_access.
-
-The st_uid and st_gid fields of the node are then modified. Since this is a
-memory based filesystem, no further action is required to alter the
-ownership of the IMFS_jnode_t structure.
-
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection IMFS_freenod()
-
-@subheading Corresponding Structure Element:
-
-IMFS_freenod()
-
-@subheading Arguments:
-
-@example
-rtems_filesystem_location_info_t *pathloc /* IN */
-@end example
-
-@subheading File:
-
-imfs_free.c
-
-@subheading Description:
-
-This method is a private function to the IMFS. It is called by IMFS routines
-to free nodes that have been allocated. Examples of where this routine
-may be called from are unlink and rmnod.
-
-Note: This routine should not be confused with the filesystem callback
-freenod. The IMFS allocates memory until the node no longer exists.
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection IMFS_freenodinfo()
-
-@subheading Corresponding Structure Element:
-
-IMFS_freenodinfo()
-
-@subheading Arguments:
-
-@example
-rtems_filesystem_location_info_t *pathloc /* IN */
-@end example
-
-@subheading File:
-
-imfs_free.c
-
-@subheading Description:
-
-The In-Memory File System does not need to allocate memory during the
-evaluate routines. Therefore, this routine simply routines PASS.
-
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection IMFS_mount()
-
-@subheading Corresponding Structure Element:
-
-IMFS_mount()
-
-@subheading Arguments:
-
-@example
-rtems_filesystem_mount_table_entry_t *mt_entry
-@end example
-
-@subheading File:
-
-imfs_mount.c
-
-@subheading Description:
-
-This routine provides the filesystem specific processing required to mount a
-filesystem for the system that contains the mount point. It will determine
-if the point that we are trying to mount onto is a node of IMFS_DIRECTORY
-type.
-
-If it is the node's info element is altered so that the info.directory.mt_fs
-element points to the mount table chain entry that is associated with the
-mounted filesystem at this point. The info.directory.mt_fs element can be
-examined to determine if a filesystem is mounted at a directory. If it is
-NULL, the directory does not serve as a mount point. A non-NULL entry
-indicates that the directory does serve as a mount point and the value of
-info.directory.mt_fs can be used to locate the mount table chain entry that
-describes the filesystem mounted at this point.
-
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection IMFS_fsmount_me()
-
-@subheading Corresponding Structure Element:
-
-IMFS_initialize()
-
-@subheading Arguments:
-
-@example
-rtems_filesystem_mount_table_entry_t *mt_entry
-@end example
-
-@subheading File:
-
-imfs_init.c
-
-@subheading Description:
-
-This function is provided with a filesystem to take care of the internal
-filesystem management details associated with mounting that filesystem
-under the RTEMS environment.
-
-It is not responsible for the mounting details associated the filesystem
-containing the mount point.
-
-The rtems_filesystem_mount_table_entry_t structure contains the key elements
-below:
-
-rtems_filesystem_location_info_t *mt_point_node,
-
-This structure contains information about the mount point. This
-allows us to find the ops-table and the handling functions
-associated with the filesystem containing the mount point.
-
-rtems_filesystem_location_info_t *fs_root_node,
-
-This structure contains information about the root node in the file
-system to be mounted. It allows us to find the ops-table and the
-handling functions associated with the filesystem to be mounted.
-
-rtems_filesystem_options_t options,
-
-Read only or read/write access
-
-void *fs_info,
-
-This points to an allocated block of memory the will be used to
-hold any filesystem specific information of a global nature. This
-allocated region if important because it allows us to mount the
-same filesystem type more than once under the RTEMS system.
-Each instance of the mounted filesystem has its own set of global
-management information that is separate from the global
-management information associated with the other instances of the
-mounted filesystem type.
-
-rtems_filesystem_limits_and_options_t pathconf_info,
-
-The table contains the following set of values associated with the
-mounted filesystem:
-
-@itemize @bullet
-
-@item link_max
-
-@item max_canon
-
-@item max_input
-
-@item name_max
-
-@item path_max
-
-@item pipe_buf
-
-@item posix_async_io
-
-@item posix_chown_restrictions
-
-@item posix_no_trunc
-
-@item posix_prio_io
-
-@item posix_sync_io
-
-@item posix_vdisable
-
-@end itemize
-
-These values are accessed with the pathconf() and the fpathconf ()
-functions.
-
-const char *dev
-
-The is intended to contain a string that identifies the device that contains
-the filesystem information. The filesystems that are currently implemented
-are memory based and don't require a device specification.
-
-If the mt_point_node.node_access is NULL then we are mounting the base file
-system.
-
-The routine will create a directory node for the root of the IMFS file
-system.
-
-The node will have read, write and execute permissions for owner, group and
-others.
-
-The node's name will be a null string.
-
-A filesystem information structure(fs_info) will be allocated and
-initialized for the IMFS filesystem. The fs_info pointer in the mount table
-entry will be set to point the filesystem information structure.
-
-The pathconf_info element of the mount table will be set to the appropriate
-table of path configuration constants ( IMFS_LIMITS_AND_OPTIONS ).
-
-The fs_root_node structure will be filled in with the following:
-
-@itemize @bullet
-
-@item pointer to the allocated root node of the filesystem
-
-@item directory handlers for a directory node under the IMFS filesystem
-
-@item OPS table functions for the IMFS
-
-@end itemize
-
-A 0 will be returned to the calling routine if the process succeeded,
-otherwise a 1 will be returned.
-
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection IMFS_unmount()
-
-@subheading Corresponding Structure Element:
-
-IMFS_unmount()
-
-@subheading Arguments:
-
-@example
-rtems_filesystem_mount_table_entry_t *mt_entry
-@end example
-
-@subheading File:
-
-imfs_unmount.c
-
-@subheading Description:
-
-This routine allows the IMFS to unmount a filesystem that has been
-mounted onto a IMFS directory.
-
-The mount entry mount point node access is verified to be a mounted
-directory. It's mt_fs is set to NULL. This identifies to future
-calles into the IMFS that this directory node is no longer a mount
-point. Additionally, it will allow any directories that were hidden
-by the mounted system to again become visible.
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection IMFS_fsunmount()
-
-@subheading Corresponding Structure Element:
-
-imfs_fsunmount()
-
-@subheading Arguments:
-
-@example
-rtems_filesystem_mount_table_entry_t *mt_entry
-@end example
-
-@subheading File:
-
-imfs_init.c
-
-@subheading Description:
-
-This method unmounts this instance of the IMFS file system. It is the
-counterpart to the IMFS_initialize routine. It is called by the generic
-code under the fsunmount_me callback.
-
-All method loops finding the first encountered node with no children and
-removing the node from the tree, thus returning allocated resources. This
-is done until all allocated nodes are returned.
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection IMFS_utime()
-
-@subheading Corresponding Structure Element:
-
-XXX
-
-@subheading Arguments:
-
-XXX
-
-@subheading File:
-
-XXX
-
-@subheading Description:
-
-XXX
-
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection IMFS_eval_link()
-
-@subheading Corresponding Structure Element:
-
-XXX
-
-@subheading Arguments:
-
-XXX
-
-@subheading File:
-
-XXX
-
-@subheading Description:
-
-XXX
-
-@c
-@c
-@c
-@c @page
-@subsection Regular File Handler Table Functions
-
-Handler table functions are defined in a rtems_filesystem_file_handlers_r
-structure. It defines functions that are specific to a node type in a given
-filesystem. One table exists for each of the filesystem's node types. The
-structure definition appears below. It is followed by general developmental
-information on each of the functions associated with regular files contained
-in this function management structure.
-
-@example
-rtems_filesystem_file_handlers_r IMFS_memfile_handlers = @{
- memfile_open,
- memfile_close,
- memfile_read,
- memfile_write,
- memfile_ioctl,
- memfile_lseek,
- IMFS_stat,
- IMFS_fchmod,
- memfile_ftruncate,
- NULL, /* fpathconf */
- NULL, /* fsync */
- IMFS_fdatasync,
- IMFS_fcntl
-@};
-@end example
-
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection memfile_open() for Regular Files
-
-@subheading Corresponding Structure Element:
-
-memfile_open()
-
-@subheading Arguments:
-
-@example
-rtems_libio_t *iop,
-const char *pathname,
-unsigned32 flag,
-unsigned32 mode
-@end example
-
-@subheading File:
-
-memfile.c
-
-@subheading Description:
-
-Currently this function is a shell. No meaningful processing is performed and
-a success code is always returned.
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection memfile_close() for Regular Files
-
-@subheading Corresponding Structure Element:
-
-memfile_close()
-
-@subheading Arguments:
-
-@example
-rtems_libio_t *iop
-@end example
-
-@subheading File:
-
-memfile.c
-
-@subheading Description:
-
-This routine is a dummy for regular files under the base filesystem. It
-performs a capture of the IMFS_jnode_t pointer from the file control block
-and then immediately returns a success status.
-
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection memfile_read() for Regular Files
-
-@subheading Corresponding Structure Element:
-
-memfile_read()
-
-@subheading Arguments:
-
-@example
-rtems_libio_t *iop,
-void *buffer,
-unsigned32 count
-@end example
-
-@subheading File:
-
-memfile.c
-
-@subheading Description:
-
-This routine will determine the @code{jnode} that is associated with this file.
-
-It will then call IMFS_memfile_read() with the @code{jnode}, file position index,
-buffer and transfer count as arguments.
-
-IMFS_memfile_read() will do the following:
-
-@itemize @bullet
-
-@item Verify that the @code{jnode} is associated with a memory file
-
-@item Verify that the destination of the read is valid
-
-@item Adjust the length of the read if it is too long
-
-@item Acquire data from the memory blocks associated with the file
-
-@item Update the access time for the data in the file
-
-@end itemize
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection memfile_write() for Regular Files
-
-@subheading Corresponding Structure Element:
-
-XXX
-
-@subheading Arguments:
-
-XXX
-@subheading File:
-
-XXX
-
-@subheading Description:
-
-XXX
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection memfile_ioctl() for Regular Files
-
-@subheading Corresponding Structure Element:
-
-XXX
-
-@subheading Arguments:
-
-@example
-rtems_libio_t *iop,
-unsigned32 command,
-void *buffer
-@end example
-
-@subheading File:
-
-memfile.c
-
-@subheading Description:
-
-The current code is a placeholder for future development. The routine returns
-a successful completion status.
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection memfile_lseek() for Regular Files
-
-@subheading Corresponding Structure Element:
-
-Memfile_lseek()
-
-@subheading Arguments:
-
-@example
-rtems_libio_t *iop,
-off_t offset,
-int whence
-@end example
-
-@subheading File:
-
-memfile.c
-
-@subheading Description:
-
-This routine make sure that the memory based file is sufficiently large to
-allow for the new file position index.
-
-The IMFS_memfile_extend() function is used to evaluate the current size of
-the memory file and allocate additional memory blocks if required by the new
-file position index. A success code is always returned from this routine.
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection IMFS_stat() for Regular Files
-
-@subheading Corresponding Structure Element:
-
-IMFS_stat()
-
-@subheading Arguments:
-
-@example
-rtems_filesystem_location_info_t *loc,
-struct stat *buf
-@end example
-
-@subheading File:
-
-imfs_stat.c
-
-@subheading Description:
-
-This routine actually performs status processing for both devices and regular
-files.
-
-The IMFS_jnode_t structure is referenced to determine the type of node under
-the filesystem.
-
-If the node is associated with a device, node information is extracted and
-transformed to set the st_dev element of the stat structure.
-
-If the node is a regular file, the size of the regular file is extracted from
-the node.
-
-This routine rejects other node types.
-
-The following information is extracted from the node and placed in the stat
-structure:
-
-@itemize @bullet
-
-@item st_mode
-
-@item st_nlink
-
-@item st_ino
-
-@item st_uid
-
-@item st_gid
-
-@item st_atime
-
-@item st_mtime
-
-@item st_ctime
-
-@end itemize
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection IMFS_fchmod() for Regular Files
-
-@subheading Corresponding Structure Element:
-
-IMFS_fchmod()
-
-@subheading Arguments:
-
-@example
-rtems_libio_t *iop
-mode_t mode
-@end example
-
-@subheading File:
-
-imfs_fchmod.c
-
-@subheading Description:
-
-This routine will obtain the pointer to the IMFS_jnode_t structure from the
-information currently in the file control block.
-
-Based on configuration the routine will acquire the user ID from a call to
-getuid() or from the IMFS_jnode_t structure.
-
-It then checks to see if we have the ownership rights to alter the mode of
-the file. If the caller does not, an error code is returned.
-
-An additional test is performed to verify that the caller is not trying to
-alter the nature of the node. If the caller is attempting to alter more than
-the permissions associated with user group and other, an error is returned.
-
-If all the preconditions are met, the user, group and other fields are set
-based on the mode calling parameter.
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection memfile_ftruncate() for Regular Files
-
-@subheading Corresponding Structure Element:
-
-XXX
-
-@subheading Arguments:
-
-XXX
-@subheading File:
-
-XXX
-
-@subheading Description:
-
-XXX
-
-
-@subsubsection No pathconf() for Regular Files
-
-@subheading Corresponding Structure Element:
-
-NULL
-
-@subheading Arguments:
-
-Not Implemented
-
-@subheading File:
-
-Not Implemented
-
-@subheading Description:
-
-Not Implemented
-
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection No fsync() for Regular Files
-
-@subheading Corresponding Structure Element:
-
-XXX
-
-@subheading Arguments:
-
-XXX
-@subheading File:
-
-XXX
-
-@subheading Description:
-
-XXX
-
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection IMFS_fdatasync() for Regular Files
-
-@subheading Corresponding Structure Element:
-
-XXX
-
-@subheading Arguments:
-
-XXX
-@subheading File:
-
-XXX
-
-@subheading Description:
-
-XXX
-
-@c
-@c
-@c
-@c @page
-@subsection Directory Handler Table Functions
-
-Handler table functions are defined in a rtems_filesystem_file_handlers_r
-structure. It defines functions that are specific to a node type in a given
-filesystem. One table exists for each of the filesystem's node types. The
-structure definition appears below. It is followed by general developmental
-information on each of the functions associated with directories contained in
-this function management structure.
-
-@example
-rtems_filesystem_file_handlers_r IMFS_directory_handlers = @{
- IMFS_dir_open,
- IMFS_dir_close,
- IMFS_dir_read,
- NULL, /* write */
- NULL, /* ioctl */
- IMFS_dir_lseek,
- IMFS_dir_fstat,
- IMFS_fchmod,
- NULL, /* ftruncate */
- NULL, /* fpathconf */
- NULL, /* fsync */
- IMFS_fdatasync,
- IMFS_fcntl
-@};
-@end example
-
-
-@c
-@c
-@c
-@c @page
-@subsubsection IMFS_dir_open() for Directories
-
-@subheading Corresponding Structure Element:
-
-imfs_dir_open()
-
-@subheading Arguments:
-
-@example
-rtems_libio_t *iop,
-const char *pathname,
-unsigned32 flag,
-unsigned32 mode
-@end example
-
-@subheading File:
-
-imfs_directory.c
-
-@subheading Description:
-
-This routine will look into the file control block to find the @code{jnode} that
-is associated with the directory.
-
-The routine will verify that the node is a directory. If its not a directory
-an error code will be returned.
-
-If it is a directory, the offset in the file control block will be set to 0.
-This allows us to start reading at the beginning of the directory.
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection IMFS_dir_close() for Directories
-
-@subheading Corresponding Structure Element:
-
-imfs_dir_close()
-
-@subheading Arguments:
-
-@example
-rtems_libio_t *iop
-@end example
-
-@subheading File:
-
-imfs_directory.c
-
-@subheading Description:
-
-This routine is a dummy for directories under the base filesystem. It
-immediately returns a success status.
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection IMFS_dir_read() for Directories
-
-@subheading Corresponding Structure Element:
-
-imfs_dir_read
-
-@subheading Arguments:
-
-@example
-rtems_libio_t *iop,
-void *buffer,
-unsigned32 count
-@end example
-
-@subheading File:
-
-imfs_directory.c
-
-@subheading Description:
-
-This routine will read a fixed number of directory entries from the current
-directory offset. The number of directory bytes read will be returned from
-this routine.
-
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection No write() for Directories
-
-@subheading Corresponding Structure Element:
-
-XXX
-
-@subheading Arguments:
-
-XXX
-
-@subheading File:
-
-XXX
-
-@subheading Description:
-
-XXX
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection No ioctl() for Directories
-
-@subheading Corresponding Structure Element:
-
-ioctl
-
-@subheading Arguments:
-
-
-@subheading File:
-
-Not supported
-
-@subheading Description:
-
-XXX
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection IMFS_dir_lseek() for Directories
-
-@subheading Corresponding Structure Element:
-
-imfs_dir_lseek()
-
-@subheading Arguments:
-
-@example
-rtems_libio_t *iop,
-off_t offset,
-int whence
-@end example
-
-@subheading File:
-
-imfs_directory.c
-
-@subheading Description:
-
-This routine alters the offset in the file control block.
-
-No test is performed on the number of children under the current open
-directory. The imfs_dir_read() function protects against reads beyond the
-current size to the directory by returning a 0 bytes transfered to the
-calling programs whenever the file position index exceeds the last entry in
-the open directory.
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection IMFS_dir_fstat() for Directories
-
-@subheading Corresponding Structure Element:
-
-imfs_dir_fstat()
-
-@subheading Arguments:
-
-
-@example
-rtems_filesystem_location_info_t *loc,
-struct stat *buf
-@end example
-
-@subheading File:
-
-imfs_directory.c
-
-@subheading Description:
-
-The node access information in the rtems_filesystem_location_info_t structure
-is used to locate the appropriate IMFS_jnode_t structure. The following
-information is taken from the IMFS_jnode_t structure and placed in the stat
-structure:
-
-@itemize @bullet
-@item st_ino
-@item st_mode
-@item st_nlink
-@item st_uid
-@item st_gid
-@item st_atime
-@item st_mtime
-@item st_ctime
-@end itemize
-
-The st_size field is obtained by running through the chain of directory
-entries and summing the sizes of the dirent structures associated with each
-of the children of the directory.
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection IMFS_fchmod() for Directories
-
-@subheading Corresponding Structure Element:
-
-IMFS_fchmod()
-
-@subheading Arguments:
-
-@example
-rtems_libio_t *iop
-mode_t mode
-@end example
-
-@subheading File:
-
-imfs_fchmod.c
-
-@subheading Description:
-
-This routine will obtain the pointer to the IMFS_jnode_t structure from the
-information currently in the file control block.
-
-Based on configuration the routine will acquire the user ID from a call to
-getuid() or from the IMFS_jnode_t structure.
-
-It then checks to see if we have the ownership rights to alter the mode of
-the file. If the caller does not, an error code is returned.
-
-An additional test is performed to verify that the caller is not trying to
-alter the nature of the node. If the caller is attempting to alter more than
-the permissions associated with user group and other, an error is returned.
-
-If all the preconditions are met, the user, group and other fields are set
-based on the mode calling parameter.
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection No ftruncate() for Directories
-
-@subheading Corresponding Structure Element:
-
-XXX
-
-@subheading Arguments:
-
-XXX
-
-@subheading File:
-
-XXX
-
-@subheading Description:
-
-XXX
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection No fpathconf() for Directories
-
-@subheading Corresponding Structure Element:
-
-fpathconf
-
-@subheading Arguments:
-
-Not Implemented
-
-@subheading File:
-
-Not Implemented
-
-@subheading Description:
-
-Not Implemented
-
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection No fsync() for Directories
-
-@subheading Corresponding Structure Element:
-
-XXX
-
-@subheading Arguments:
-
-XXX
-@subheading File:
-
-XXX
-
-@subheading Description:
-
-XXX
-
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection IMFS_fdatasync() for Directories
-
-@subheading Corresponding Structure Element:
-
-XXX
-
-@subheading Arguments:
-
-XXX
-
-@subheading File:
-
-XXX
-
-@subheading Description:
-
-XXX
-
-@c
-@c
-@c
-@c @page
-@subsection Device Handler Table Functions
-
-Handler table functions are defined in a rtems_filesystem_file_handlers_r
-structure. It defines functions that are specific to a node type in a given
-filesystem. One table exists for each of the filesystem's node types. The
-structure definition appears below. It is followed by general developmental
-information on each of the functions associated with devices contained in
-this function management structure.
-
-@example
-typedef struct @{
- rtems_filesystem_open_t open;
- rtems_filesystem_close_t close;
- rtems_filesystem_read_t read;
- rtems_filesystem_write_t write;
- rtems_filesystem_ioctl_t ioctl;
- rtems_filesystem_lseek_t lseek;
- rtems_filesystem_fstat_t fstat;
- rtems_filesystem_fchmod_t fchmod;
- rtems_filesystem_ftruncate_t ftruncate;
- rtems_filesystem_fpathconf_t fpathconf;
- rtems_filesystem_fsync_t fsync;
- rtems_filesystem_fdatasync_t fdatasync;
-@} rtems_filesystem_file_handlers_r;
-@end example
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection device_open() for Devices
-
-@subheading Corresponding Structure Element:
-
-device_open()
-
-@subheading Arguments:
-
-@example
-rtems_libio_t *iop,
-const char *pathname,
-unsigned32 flag,
-unsigned32 mode
-@end example
-
-@subheading File:
-
-deviceio.c
-
-@subheading Description:
-
-This routine will use the file control block to locate the node structure for
-the device.
-
-It will extract the major and minor device numbers from the @code{jnode}.
-
-The major and minor device numbers will be used to make a rtems_io_open()
-function call to open the device driver. An argument list is sent to the
-driver that contains the file control block, flags and mode information.
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection device_close() for Devices
-
-@subheading Corresponding Structure Element:
-
-device_close()
-
-@subheading Arguments:
-
-@example
-rtems_libio_t *iop
-@end example
-
-@subheading File:
-
-deviceio.c
-
-@subheading Description:
-
-This routine extracts the major and minor device driver numbers from the
-IMFS_jnode_t that is referenced in the file control block.
-
-It also forms an argument list that contains the file control block.
-
-A rtems_io_close() function call is made to close the device specified by the
-major and minor device numbers.
-
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection device_read() for Devices
-
-@subheading Corresponding Structure Element:
-
-device_read()
-
-@subheading Arguments:
-
-@example
-rtems_libio_t *iop,
-void *buffer,
-unsigned32 count
-@end example
-
-@subheading File:
-
-deviceio.c
-
-@subheading Description:
-
-This routine will extract the major and minor numbers for the device from the -
-jnode- associated with the file descriptor.
-
-A rtems_io_read() call will be made to the device driver associated with the file
-descriptor. The major and minor device number will be sent as arguments as well
-as an argument list consisting of:
-
-@itemize @bullet
-@item file control block
-
-@item file position index
-
-@item buffer pointer where the data read is to be placed
-
-@item count indicating the number of bytes that the program wishes to read
-from the device
-
-@item flags from the file control block
-
-@end itemize
-
-On return from the rtems_io_read() the number of bytes that were actually
-read will be returned to the calling program.
-
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection device_write() for Devices
-
-@subheading Corresponding Structure Element:
-
-XXX
-
-@subheading Arguments:
-
-XXX
-@subheading File:
-
-XXX
-
-@subheading Description:
-
-XXX
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection device_ioctl() for Devices
-
-@subheading Corresponding Structure Element:
-
-ioctl
-
-@subheading Arguments:
-
-@example
-rtems_libio_t *iop,
-unsigned32 command,
-void *buffer
-@end example
-
-@subheading File:
-
-deviceio.c
-
-@subheading Description:
-
-This handler will obtain status information about a device.
-
-The form of status is device dependent.
-
-The rtems_io_control() function uses the major and minor number of the device
-to obtain the status information.
-
-rtems_io_control() requires an rtems_libio_ioctl_args_t argument list which
-contains the file control block, device specific command and a buffer pointer
-to return the device status information.
-
-The device specific command should indicate the nature of the information
-that is desired from the device.
-
-After the rtems_io_control() is processed, the buffer should contain the
-requested device information.
-
-If the device information is not obtained properly a -1 will be returned to
-the calling program, otherwise the ioctl_return value is returned.
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection device_lseek() for Devices
-
-@subheading Corresponding Structure Element:
-
-device_lseek()
-
-@subheading Arguments:
-
-@example
-rtems_libio_t *iop,
-off_t offset,
-int whence
-@end example
-
-@subheading File:
-
-deviceio.c
-
-@subheading Description:
-
-At the present time this is a placeholder function. It always returns a
-successful status.
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection IMFS_stat() for Devices
-
-@subheading Corresponding Structure Element:
-
-IMFS_stat()
-
-@subheading Arguments:
-
-@example
-rtems_filesystem_location_info_t *loc,
-struct stat *buf
-@end example
-
-@subheading File:
-
-imfs_stat.c
-
-@subheading Description:
-
-This routine actually performs status processing for both devices and regular files.
-
-The IMFS_jnode_t structure is referenced to determine the type of node under the
-filesystem.
-
-If the node is associated with a device, node information is extracted and
-transformed to set the st_dev element of the stat structure.
-
-If the node is a regular file, the size of the regular file is extracted from the node.
-
-This routine rejects other node types.
-
-The following information is extracted from the node and placed in the stat
-structure:
-
-@itemize @bullet
-
-@item st_mode
-
-@item st_nlink
-
-@item st_ino
-
-@item st_uid
-
-@item st_gid
-
-@item st_atime
-
-@item st_mtime
-
-@item st_ctime
-
-@end itemize
-
-
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection IMFS_fchmod() for Devices
-
-@subheading Corresponding Structure Element:
-
-IMFS_fchmod()
-
-@subheading Arguments:
-
-@example
-rtems_libio_t *iop
-mode_t mode
-@end example
-
-@subheading File:
-
-imfs_fchmod.c
-
-@subheading Description:
-
-This routine will obtain the pointer to the IMFS_jnode_t structure from the
-information currently in the file control block.
-
-Based on configuration the routine will acquire the user ID from a call to
-getuid() or from the IMFS_jnode_t structure.
-
-It then checks to see if we have the ownership rights to alter the mode of
-the file. If the caller does not, an error code is returned.
-
-An additional test is performed to verify that the caller is not trying to
-alter the nature of the node. If the caller is attempting to alter more than
-the permissions associated with user group and other, an error is returned.
-
-If all the preconditions are met, the user, group and other fields are set
-based on the mode calling parameter.
-
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection No ftruncate() for Devices
-
-@subheading Corresponding Structure Element:
-
-XXX
-
-@subheading Arguments:
-
-XXX
-@subheading File:
-
-XXX
-
-@subheading Description:
-
-XXX
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection No fpathconf() for Devices
-
-@subheading Corresponding Structure Element:
-
-fpathconf
-
-@subheading Arguments:
-
-Not Implemented
-
-@subheading File:
-
-Not Implemented
-
-@subheading Description:
-
-Not Implemented
-
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection No fsync() for Devices
-
-@subheading Corresponding Structure Element:
-
-XXX
-
-@subheading Arguments:
-
-XXX
-
-@subheading File:
-
-XXX
-
-@subheading Description:
-
-XXX
-
-
-@c
-@c
-@c
-@c @page
-
-@subsubsection No fdatasync() for Devices
-
-Not Implemented
-
-@subheading Corresponding Structure Element:
-
-XXX
-
-@subheading Arguments:
-
-XXX
-
-@subheading File:
-
-XXX
-
-@subheading Description:
-
-XXX
-
diff --git a/doc/filesystem/init.t b/doc/filesystem/init.t
deleted file mode 100644
index b4df2758b2..0000000000
--- a/doc/filesystem/init.t
+++ /dev/null
@@ -1,113 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter System Initialization
-
-After the RTEMS initialization is performed, the application's
-initialization will be performed. Part of initialization is a call to
-rtems_filesystem_initialize(). This routine will mount the `In Memory File
-System' as the base filesystem. Mounting the base filesystem consists
-of the following:
-
-@itemize @bullet
-
-@item Initialization of mount table chain control structure
-
-@item Allocation of a @code{jnode} structure that will server as the root node
-of the `In Memory Filesystem'
-
-@item Initialization of the allocated @code{jnode} with the appropriate OPS,
-directory handlers and pathconf limits and options.
-
-@item Allocation of a memory region for filesystem specific global
-management variables
-
-@item Creation of first mount table entry for the base filesystem
-
-@item Initialization of the first mount table chain entry to indicate that
-the mount point is NULL and the mounted filesystem is the base file
-system
-
-@end itemize
-
-
-After the base filesystem has been mounted, the following operations are
-performed under its directory structure:
-
-@itemize @bullet
-
-@item Creation of the /dev directory
-
-@item Registration of devices under /dev directory
-
-@end itemize
-
-@section Base Filesystem
-
-RTEMS initially mounts a RAM based file system known as the base file system.
-The root directory of this file system tree serves as the logical root of the
-directory hierarchy (Figure 3). Under the root directory a `/dev' directory
-is created under which all I/O device directories and files are registered as
-part of the file system hierarchy.
-
-@example
-Figure of the tree structure goes here.
-@end example
-
-A RAM based file system draws its management resources from memory. File and
-directory nodes are simply allocated blocks of memory. Data associated with
-regular files is stored in collections of memory blocks. When the system is
-turned off or restarted all memory-based components of the file system are
-lost.
-
-The base file system serves as a starting point for the mounting of file
-systems that are resident on semi-permanent storage media. Examples of such
-media include non- volatile memory, flash memory and IDE hard disk drives
-(Figure 3). File systems of other types will be mounted onto mount points
-within the base file system or other file systems that are subordinate to the
-base file system. The framework set up under the base file system will allow
-for these new file system types and the unique data and functionality that is
-required to manage the future file systems.
-
-@subsection Base Filesystem Mounting
-
-At present, the first file system to be mounted is the `In Memory File
-System'. It is mounted using a standard MOUNT() command in which the mount
-point is NULL. This flags the mount as the first file system to be
-registered under the operating system and appropriate initialization of file
-system management information is performed (See figures 4 and 5). If a
-different file system type is desired as the base file system, alterations
-must be made to base_fs.c. This routine handles the mount of the base file
-system.
-
-
-@example
-Figure of the mount table chain goes here.
-@end example
-
-
-Once the root of the base file system has been established and it has been
-recorded as the mount point of the base file system, devices are integrated
-into the base file system. For every device that is configured into the
-system (See ioman.c) a device registration process is performed. Device
-registration produces a unique dev_t handle that consists of a major and
-minor device number. In addition, the configuration information for each
-device contains a text string that represents the fully qualified pathname to
-that device's place in the base file system's hierarchy. A file system node
-is created for the device along the specified registration path.
-
-
-@example
-Figure of the Mount Table Processing goes here.
-@end example
-
-
-Note: Other file systems can be mounted but they are mounted onto points
-(directory mount points) in the base file system.
-
-
diff --git a/doc/filesystem/miniimfs.t b/doc/filesystem/miniimfs.t
deleted file mode 100644
index 6b65cab725..0000000000
--- a/doc/filesystem/miniimfs.t
+++ /dev/null
@@ -1,16 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Miniature In-Memory Filesystem
-
-This chapter describes the Miniature In-Memory FileSystem (miniIMFS).
-The miniIMFS is a reduced feature version of the IMFS designed to
-provide minimal functionality and have a low memory footprint.
-
-This chapter should be written after the IMFS chapter is completed
-and describe the implementation of the mini-IMFS.
diff --git a/doc/filesystem/mounting.t b/doc/filesystem/mounting.t
deleted file mode 100644
index 4090991776..0000000000
--- a/doc/filesystem/mounting.t
+++ /dev/null
@@ -1,171 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Mounting and Unmounting Filesystems
-
-@section Mount Points
-
-The following is the list of the characteristics of a mount point:
-
-@itemize @bullet
-
-@item The mount point must be a directory. It may have files and other
-directories under it. These files and directories will be hidden when the
-filesystem is mounted.
-
-@item The task must have read/write/execute permissions to the mount point
-or the mount attempt will be rejected.
-
-@item Only one filesystem can be mounted to a single mount point.
-
-@item The Root of the mountable filesystem will be referenced by the name
-of the mount point after the mount is complete.
-
-@end itemize
-
-@section Mount Table Chain
-
-The mount table chain is a dynamic list of structures that describe
-mounted filesystems a specific points in the filesystem hierarchy. It is
-initialized to an empty state during the base filesystem initialization.
-The mount operation will add entries to the mount table chain. The
-un-mount operation will remove entries from the mount table chain.
-
-Each entry in the mount table chain is of the following type:
-
-@example
-struct rtems_filesystem_mount_table_entry_tt
-@{
- Chain_Node Node;
- rtems_filesystem_location_info_t mt_point_node;
- rtems_filesystem_location_info_t mt_fs_root;
- int options;
- void *fs_info;
-
- rtems_filesystem_limits_and_options_t pathconf_limits_and_options;
-
- /*
- * When someone adds a mounted filesystem on a real device,
- * this will need to be used.
- *
- * The best option long term for this is probably an
- * open file descriptor.
- */
- char *dev;
-@};
-@end example
-
-@table @b
-@item Node
-The Node is used to produce a linked list of mount table entry nodes.
-
-@item mt_point_node
-The mt_point_node contains all information necessary to access the
-directory where a filesystem is mounted onto. This element may contain
-memory that is allocated during a path evaluation of the filesystem
-containing the mountpoint directory. The generic code allows this
-memory to be returned by unmount when the filesystem identified by
-mt_fs_root is unmounted.
-
-@item mt_fs_root
-The mt_fs_root contains all information necessary to identify the root
-of the mounted filesystem. The user is never allowed access to this
-node by the generic code, but it is used to identify to the mounted
-filesystem where to start evaluation of pathnames at.
-
-@item options
-XXX
-
-@item fs_info
-The fs_info element is a location available for use by the mounted file
-system to identify unique things applicable to this instance of the file
-system. For example the IMFS uses this space to provide node
-identification that is unique for each instance (mounting) of the filesystem.
-
-@item pathconf_limits_and_options
-XXX
-
-@item dev
-This character string represents the device where the filesystem will reside.
-
-@end table
-
-@section Adding entries to the chain during mount
-
-When a filesystem is mounted, its presence and location in the file
-system hierarchy is recorded in a dynamic list structure known as a chain.
-A unique rtems_filesystem_mount_table_entry_tt structure is logged for
-each filesystem that is mounted. This includes the base filesystem.
-
-@section Removing entries from the chain during unmount
-
-When a filesystem is dismounted its entry in the mount table chain is
-extracted and the memory for this entry is freed.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/doc/filesystem/patheval.t b/doc/filesystem/patheval.t
deleted file mode 100644
index 6f1f638ed6..0000000000
--- a/doc/filesystem/patheval.t
+++ /dev/null
@@ -1,109 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Pathname Evaluation
-
-This chapter describes the pathname evaluation process for the
-RTEMS Filesystem Infrastructure.
-
-@example
-XXX Include graphic of the path evaluation process
-@end example
-
-@section Pathname Evaluation Handlers
-
-There are two pathname evaluation routines. The handler patheval()
-is called to find, verify privlages on and return information on a node
-that exists. The handler evalformake() is called to find, verify
-permissions, and return information on a node that is to become a parent.
-Additionally, evalformake() returns a pointer to the start of the name of
-the new node to be created.
-
-Pathname evaluation is specific to a filesystem.
-Each filesystem is required to provide both a patheval() and an evalformake()
-routine. Both of these routines gets a name to evaluate and a node indicating
-where to start the evaluation.
-
-@section Crossing a Mount Point During Path Evaluation
-
-If the filesystem supports the mount command, the evaluate routines
-must handle crossing the mountpoint. The evaluate routine should evaluate
-the name upto the first directory node where the new filesystem is mounted.
-The filesystem may process terminator characters prior to calling the
-evaluate routine for the new filesystem. A pointer to the portion of the
-name which has not been evaluated along with the root node of the new
-file system ( gotten from the mount table entry ) is passed to the correct
-mounted filesystem evaluate routine.
-
-
-@section The rtems_filesystem_location_info_t Structure
-
-The @code{rtems_filesystem_location_info_t} structure contains all information
-necessary for identification of a node.
-
-The generic rtems filesystem code defines two global
-rtems_filesystem_location_info_t structures, the
-@code{rtems_filesystem_root} and the @code{rtems_filesystem_current}.
-Both are initially defined to be the root node of the base filesystem.
-Once the chdir command is correctly used the @code{rtems_filesystem_current}
-is set to the location specified by the command.
-
-The filesystem generic code peeks at the first character in the name to be
-evaluated. If this character is a valid seperator, the
-@code{rtems_filesystem_root} is used as the node to start the evaluation
-with. Otherwise, the @code{rtems_filesystem_current} node is used as the
-node to start evaluating with. Therefore, a valid
-rtems_filesystem_location_info_t is given to the evaluate routine to start
-evaluation with. The evaluate routines are then responsible for making
-any changes necessary to this structure to correspond to the name being
-parsed.
-
-@example
-struct rtems_filesystem_location_info_tt @{
- void *node_access;
- rtems_filesystem_file_handlers_r *handlers;
- rtems_filesystem_operations_table *ops;
- rtems_filesystem_mount_table_entry_t *mt_entry;
-@};
-@end example
-
-@table @b
-
-@item node_access
-This element is filesystem specific. A filesystem can define and store
-any information necessary to identify a node at this location. This element
-is normally filled in by the filesystem's evaluate routine. For the
-filesystem's root node, the filesystem's initilization routine should
-fill this in, and it should remain valid until the instance of the
-filesystem is unmounted.
-
-@item handlers
-This element is defined as a set of routines that may change within a
-given filesystem based upon node type. For example a directory and a
-memory file may have to completely different read routines. This element
-is set to an initialization state defined by the mount table, and may
-be set to the desired state by the evaluation routines.
-
-@item ops
-This element is defined as a set of routines that remain static for the
-filesystem. This element identifies entry points into the filesystem
-to the generic code.
-
-@item mt_entry
-This element identifies the mount table entry for this instance of the
-filesystem.
-
-@end table
-
-
-
-
-
-
-
-
diff --git a/doc/filesystem/preface.texi b/doc/filesystem/preface.texi
deleted file mode 100644
index 20a975fdf3..0000000000
--- a/doc/filesystem/preface.texi
+++ /dev/null
@@ -1,83 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@ifinfo
-@node Preface, , Top, Top
-@end ifinfo
-@unnumbered Preface
-
-This document describes the implementation of the RTEMS filesystem
-infrastructure. This infrastructure supports the following
-capabilities:
-
-@itemize @bullet
-
-@item Mountable file systems
-
-@item Hierarchical file system directory structure
-
-@item POSIX compliant set of routines for the manipulation of files and directories
-
-@item Individual file and directory support for the following:
-
-@enumerate
-
-@item Permissions for read, write and execute
-
-@item User ID
-
-@item Group ID
-
-@item Access time
-
-@item Modification time
-
-@item Creation time
-
-@end enumerate
-
-@item Hard links to files and directories
-
-@item Symbolic links to files and directories
-
-@end itemize
-
-This has been implemented to provide the framework for a UNIX-like
-file system support. POSIX file and directory functions have been
-implemented that allow a standard method of accessing file, device and
-directory information within file systems. The file system concept that
-has been implemented allows for expansion and adaptation of the file
-system to a variety of existing and future data storage devices. To this
-end, file system mount and unmount capabilities have been included in this
-RTEMS framework.
-
-This framework slightly alters the manner in which devices are handled
-under RTEMS from that of public release 4.0.0 and earlier. Devices that
-are defined under a given RTEMS configuration will now be registered as
-files in a mounted file system. Access to these device drivers and their
-associated devices may now be performed through the traditional file system
-open(), read(), write(), lseek(), fstat() and ioctl() functions in addition
-to the interface provided by the IO Manager in the RTEMS Classic API.
-
-An In-Memory File System (IMFS) is included which provides full POSIX
-filesystem functionality yet is RAM based. The IMFS maintains a
-node structure for each file, device, and directory in each mounted
-instantiation of its file system. The node structure is used to
-manage ownership, access rights, access time, modification time,
-and creation time. A union of structures within the IMFS nodal
-structure provide for manipulation of file data, device selection,
-or directory content as required by the nodal type. Manipulation of
-these properties is accomplished through the POSIX set of file and
-directory functions. In addition to being useful in its own right,
-the IMFS serves as a full featured example filesystem.
-
-The intended audience for this document is those persons implementing
-their own filesystem. Users of the filesystem may find information
-on the implementation useful. But the user interface to the filesystem
-is through the ISO/ANSI C Library and POSIX 1003.1b file and directory
-APIs.
diff --git a/doc/filesystem/syscalls.t b/doc/filesystem/syscalls.t
deleted file mode 100644
index 238931d68b..0000000000
--- a/doc/filesystem/syscalls.t
+++ /dev/null
@@ -1,1130 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter System Call Development Notes
-
-This set of routines represents the application's interface to files and directories
-under the RTEMS filesystem. All routines are compliant with POSIX standards if a
-specific interface has been established. The list below represents the routines that have
-been included as part of the application's interface.
-
-@enumerate
-@item access()
-@item chdir()
-@item chmod()
-@item chown()
-@item close()
-@item closedir()
-@item dup()
-@item dup2()
-@item fchmod()
-@item fcntl()
-@item fdatasync()
-@item fpathconf()
-@item fstat()
-@item ioctl()
-@item link()
-@item lseek()
-@item mkdir()
-@item mkfifo()
-@item mknod()
-@item mount()
-@item open()
-@item opendir()
-@item pathconf()
-@item read()
-@item readdir()
-@item unmount()
-@end enumerate
-
-The sections that follow provide developmental information concerning each
-of these functions.
-
-
-@c @page
-@section access
-
-@subheading File:
-
-access.c
-
-@subheading Processing:
-
-This routine is layered on the stat() function. It acquires the current
-status information for the specified file and then determines if the
-caller has the ability to access the file for read, write or execute
-according to the mode argument to this function.
-
-@subheading Development Comments:
-
-This routine is layered on top of the stat() function. As long as the
-st_mode element in the returned structure follow the standard UNIX
-conventions, this function should support other filesystems without
-alteration.
-
-@c @page
-@section chdir
-
-@subheading File:
-
-chdir.c
-
-
-@subheading Processing:
-
-This routine will determine if the pathname that we are attempting to make
-that current directory exists and is in fact a directory. If these
-conditions are met the global indication of the current directory
-(rtems_filesystem_current) is set to the rtems_filesystem_location_info_t
-structure that is returned by the rtems_filesystem_evaluate_path()
-routine.
-
-@subheading Development Comments:
-
-This routine is layered on the rtems_filesystem_evaluate_path() routine
-and the filesystem specific OP table function node_type().
-
-The routine node_type() must be a routine provided for each filesystem
-since it must access the filesystems node information to determine which
-of the following types the node is:
-
-@itemize @bullet
-@item RTEMS_FILESYSTEM_DIRECTORY
-@item RTEMS_FILESYSTEM_DEVICE
-@item RTEMS_FILESYSTEM_HARD_LINK
-@item RTEMS_FILESYSTEM_MEMORY_FILE
-@end itemize
-
-This acknowledges that the form of the node management information can
-vary from one filesystem implementation to another.
-
-RTEMS has a special global structure that maintains the current directory
-location. This global variable is of type rtems_filesystem_location_info_t
-and is called rtems_filesystem_current. This structure is not always
-valid. In order to determine if the structure is valid, you must first
-test the node_access element of this structure. If the pointer is NULL,
-then the structure does not contain a valid indication of what the current
-directory is.
-
-@c @page
-@section chmod
-
-@subheading File:
-
-chmod.c
-
-@subheading Processing:
-
-This routine is layered on the open(), fchmod() and close() functions. As
-long as the standard interpretation of the mode_t value is maintained,
-this routine should not need modification to support other filesystems.
-
-@subheading Development Comments:
-
-The routine first determines if the selected file can be open with
-read/write access. This is required to allow modification of the mode
-associated with the selected path.
-
-The fchmod() function is used to actually change the mode of the path
-using the integer file descriptor returned by the open() function.
-
-After mode modification, the open file descriptor is closed.
-
-@c @page
-@section chown
-
-@subheading File:
-
-chown.c
-
-@subheading Processing:
-
-This routine is layered on the rtems_filesystem_evaluate_path() and the
-file system specific chown() routine that is specified in the OPS table
-for the file system.
-
-@subheading Development Comments:
-
-rtems_filesystem_evaluate_path() is used to determine if the path
-specified actually exists. If it does a rtems_filesystem_location_info_t
-structure will be obtained that allows the shell function to locate the
-OPS table that is to be used for this filesystem.
-
-It is possible that the chown() function that should be in the OPS table
-is not defined. A test for a non-NULL OPS table chown() entry is performed
-before the function is called.
-
-If the chown() function is defined in the indicated OPS table, the
-function is called with the rtems_filesystem_location_info_t structure
-returned from the path evaluation routine, the desired owner, and group
-information.
-
-@c @page
-@section close
-
-@subheading File:
-
-close.c
-
-@subheading Processing:
-
-This routine will allow for the closing of both network connections and
-file system devices. If the file descriptor is associated with a network
-device, the appropriate network function handler will be selected from a
-table of previously registered network functions (rtems_libio_handlers)
-and that function will be invoked.
-
-If the file descriptor refers to an entry in the filesystem, the
-appropriate handler will be selected using information that has been
-placed in the file control block for the device (rtems_libio_t structure).
-
-@subheading Development Comments:
-
-rtems_file_descriptor_type examines some of the upper bits of the file
-descriptor index. If it finds that the upper bits are set in the file
-descriptor index, the device referenced is a network device.
-
-Network device handlers are obtained from a special registration table
-(rtems_libio_handlers) that is set up during network initialization. The
-network handler invoked and the status of the network handler will be
-returned to the calling process.
-
-If none of the upper bits are set in the file descriptor index, the file
-descriptor refers to an element of the RTEMS filesystem.
-
-The following sequence will be performed for any filesystem file
-descriptor:
-
-@enumerate
-
-@item Use the rtems_libio_iop() function to obtain the rtems_libio_t
-structure for the file descriptor
-
-@item Range check the file descriptor using rtems_libio_check_fd()
-
-@item Determine if there is actually a function in the selected handler
-table that processes the close() operation for the filesystem and node
-type selected. This is generally done to avoid execution attempts on
-functions that have not been implemented.
-
-@item If the function has been defined it is invoked with the file control
-block pointer as its argument.
-
-@item The file control block that was associated with the open file
-descriptor is marked as free using rtems_libio_free().
-
-@item The return code from the close handler is then passed back to the
-calling program.
-
-@end enumerate
-
-@c @page
-@section closedir
-
-@subheading File:
-
-closedir.c
-
-@subheading Processing:
-
-The code was obtained from the BSD group. This routine must clean up the
-memory resources that are required to track an open directory. The code is
-layered on the close() function and standard memory free() functions. It
-should not require alterations to support other filesystems.
-
-@subheading Development Comments:
-
-The routine alters the file descriptor and the index into the DIR
-structure to make it an invalid file descriptor. Apparently the memory
-that is about to be freed may still be referenced before it is
-reallocated.
-
-The dd_buf structure's memory is reallocated before the control structure
-that contains the pointer to the dd_buf region.
-
-DIR control memory is reallocated.
-
-The close() function is used to free the file descriptor index.
-
-
-@c @page
-@section dup() Unimplemented
-
-@subheading File:
-
-dup.c
-
-@subheading Processing:
-
-
-@subheading Development Comments:
-
-
-
-
-
-@c @page
-@section dup2() Unimplemented
-
-@subheading File:
-
-dup2.c
-
-@subheading Processing:
-
-
-@subheading Development Comments:
-
-
-
-
-
-
-@c @page
-@section fchmod
-
-@subheading File:
-
-fchmod.c
-
-@subheading Processing:
-
-This routine will alter the permissions of a node in a filesystem. It is
-layered on the following functions and macros:
-
-@itemize @bullet
-@item rtems_file_descriptor_type()
-
-@item rtems_libio_iop()
-
-@item rtems_libio_check_fd()
-
-@item rtems_libio_check_permissions()
-
-@item fchmod() function that is referenced by the handler table in the
-file control block associated with this file descriptor
-
-@end itemize
-
-@subheading Development Comments:
-
-The routine will test to see if the file descriptor index is associated
-with a network connection. If it is, an error is returned from this
-routine.
-
-The file descriptor index is used to obtain the associated file control
-block.
-
-The file descriptor value is range checked.
-
-The file control block is examined to determine if it has write
-permissions to allow us to alter the mode of the file.
-
-A test is made to determine if the handler table that is referenced in the
-file control block contains an entry for the fchmod() handler function. If
-it does not, an error is returned to the calling routine.
-
-If the fchmod() handler function exists, it is called with the file
-control block and the desired mode as parameters.
-
-@c @page
-@section fcntl()
-
-@subheading File:
-
-fcntl.c
-
-@subheading Processing:
-
-This routine currently only interacts with the file control block. If the
-structure of the file control block and the associated meanings do not
-change, the partial implementation of fcntl() should remain unaltered for
-other filesystem implementations.
-
-@subheading Development Comments:
-
-The only commands that have been implemented are the F_GETFD and F_SETFD.
-The commands manipulate the LIBIO_FLAGS_CLOSE_ON_EXEC bit in the
-@code{flags} element of the file control block associated with the file
-descriptor index.
-
-The current implementation of the function performs the sequence of
-operations below:
-
-@enumerate
-
-@item Test to see if we are trying to operate on a file descriptor
-associated with a network connection
-
-@item Obtain the file control block that is associated with the file
-descriptor index
-
-@item Perform a range check on the file descriptor index.
-
-@end enumerate
-
-
-
-@c @page
-@section fdatasync
-
-@subheading File:
-
-fdatasync.c
-
-@subheading Processing:
-
-This routine is a template in the in memory filesystem that will route us to the
-appropriate handler function to carry out the fdatasync() processing. In the in
-memory filesystem this function is not necessary. Its function in a disk based file
-system that employs a memory cache is to flush all memory based data buffers to
-disk. It is layered on the following functions and macros:
-
-@itemize @bullet
-
-@item rtems_file_descriptor_type()
-
-@item rtems_libio_iop()
-
-@item rtems_libio_check_fd()
-
-@item rtems_libio_check_permissions()
-
-@item fdatasync() function that is referenced by the handler table in the
-file control block associated with this file descriptor
-
-@end itemize
-
-@subheading Development Comments:
-
-The routine will test to see if the file descriptor index is associated
-with a network connection. If it is, an error is returned from this
-routine.
-
-The file descriptor index is used to obtain the associated file control
-block.
-
-The file descriptor value is range checked.
-
-The file control block is examined to determine if it has write
-permissions to the file.
-
-A test is made to determine if the handler table that is referenced in the
-file control block contains an entry for the fdatasync() handler function.
-If it does not an error is returned to the calling routine.
-
-If the fdatasync() handler function exists, it is called with the file
-control block as its parameter.
-
-@c @page
-@section fpathconf
-
-@subheading File:
-
-fpathconf.c
-
-@subheading Processing:
-
-This routine is layered on the following functions and macros:
-
-@itemize @bullet
-
-@item rtems_file_descriptor_type()
-
-@item rtems_libio_iop()
-
-@item rtems_libio_check_fd()
-
-@item rtems_libio_check_permissions()
-
-@end itemize
-
-When a filesystem is mounted, a set of constants is specified for the
-filesystem. These constants are stored with the mount table entry for the
-filesystem. These constants appear in the POSIX standard and are listed
-below.
-
-@itemize @bullet
-
-@item PCLINKMAX
-
-@item PCMAXCANON
-
-@item PCMAXINPUT
-
-@item PCNAMEMAX
-
-@item PCPATHMAX
-
-@item PCPIPEBUF
-
-@item PCCHOWNRESTRICTED
-
-@item PCNOTRUNC
-
-@item PCVDISABLE
-
-@item PCASYNCIO
-
-@item PCPRIOIO
-
-@item PCSYNCIO
-
-
-@end itemize
-
-This routine will find the mount table information associated the file
-control block for the specified file descriptor parameter. The mount table
-entry structure contains a set of filesystem specific constants that can
-be accessed by individual identifiers.
-
-@subheading Development Comments:
-
-The routine will test to see if the file descriptor index is associated
-with a network connection. If it is, an error is returned from this
-routine.
-
-The file descriptor index is used to obtain the associated file control
-block.
-
-The file descriptor value is range checked.
-
-The file control block is examined to determine if it has read permissions
-to the file.
-
-Pathinfo in the file control block is used to locate the mount table entry
-for the filesystem associated with the file descriptor.
-
-The mount table entry contains the pathconf_limits_and_options element.
-This element is a table of constants that is associated with the
-filesystem.
-
-The name argument is used to reference the desired constant from the
-pathconf_limits_and_options table.
-
-
-@c @page
-@section fstat
-
-@subheading File:
-
-fstat.c
-
-@subheading Processing:
-
-This routine will return information concerning a file or network
-connection. If the file descriptor is associated with a network
-connection, the current implementation of @code{fstat()} will return a
-mode set to @code{S_IFSOCK}. In a later version, this routine will map the
-status of a network connection to an external handler routine.
-
-If the file descriptor is associated with a node under a filesystem, the
-fstat() routine will map to the fstat() function taken from the node
-handler table.
-
-@subheading Development Comments:
-
-This routine validates that the struct stat pointer is not NULL so that
-the return location is valid.
-
-The struct stat is then initialized to all zeros.
-
-rtems_file_descriptor_type() is then used to determine if the file
-descriptor is associated with a network connection. If it is, network
-status processing is performed. In the current implementation, the file
-descriptor type processing needs to be improved. It currently just drops
-into the normal processing for file system nodes.
-
-If the file descriptor is associated with a node under a filesystem, the
-following steps are performed:
-
-@enumerate
-
-@item Obtain the file control block that is associated with the file descriptor
-index.
-
-@item Range check the file descriptor index.
-
-@item Test to see if there is a non-NULL function pointer in the handler
-table for the fstat() function. If there is, invoke the function with the
-file control block and the pointer to the stat structure.
-
-@end enumerate
-
-@c @page
-@section ioctl
-
-@subheading File:
-
-ioctl.c
-
-@subheading Processing:
-
-Not defined in the POSIX 1003.1b standard but commonly supported in most
-UNIX and POSIX system. Ioctl() is a catchall for I/O operations. Routine
-is layered on external network handlers and filesystem specific handlers.
-The development of new filesystems should not alter the basic processing
-performed by this routine.
-
-@subheading Development Comments:
-
-
-The file descriptor is examined to determine if it is associated with a
-network device. If it is processing is mapped to an external network
-handler. The value returned by this handler is then returned to the
-calling program.
-
-File descriptors that are associated with a filesystem undergo the
-following processing:
-
-@enumerate
-
-@item The file descriptor index is used to obtain the associated file
-control block.
-
-@item The file descriptor value is range checked.
-
-@item A test is made to determine if the handler table that is referenced
-in the file control block contains an entry for the ioctl() handler
-function. If it does not, an error is returned to the calling routine.
-
-@item If the ioctl() handler function exists, it is called with the file
-control block, the command and buffer as its parameters.
-
-@item The return code from this function is then sent to the calling
-routine.
-
-@end enumerate
-
-
-@c @page
-@section link
-
-@subheading File:
-
-link.c
-
-@subheading Processing:
-
-This routine will establish a hard link to a file, directory or a device.
-The target of the hard link must be in the same filesystem as the new link
-being created. A link to an existing link is also permitted but the
-existing link is evaluated before the new link is made. This implies that
-links to links are reduced to links to files, directories or devices
-before they are made.
-
-@subheading Development Comments:
-
-Calling parameters:
-const char *existing
- const char *new
-
-link() will determine if the target of the link actually exists using
-rtems_filesystem_evaluate_path()
-
-rtems_filesystem_get_start_loc() is used to determine where to start the
-path evaluation of the new name. This macro examines the first characters
-of the name to see if the name of the new link starts with a
-rtems_filesystem_is_separator. If it does the search starts from the root
-of the RTEMS filesystem; otherwise the search will start from the current
-directory.
-
-The OPS table evalformake() function for the parent's filesystem is used
-to locate the node that will be the parent of the new link. It will also
-locate the start of the new path's name. This name will be used to define
-a child under the parent directory.
-
-If the parent is found, the routine will determine if the hard link that
-we are trying to create will cross a filesystem boundary. This is not
-permitted for hard-links.
-
-If the hard-link does not cross a filesystem boundary, a check is
-performed to determine if the OPS table contains an entry for the link()
-function.
-
-If a link() function is defined, the OPS table link() function will be
-called to establish the actual link within the filesystem.
-
-The return code from the OPS table link() function is returned to the
-calling program.
-
-@c @page
-@section lseek
-
-@subheading File:
-
-lseek.c
-
-@subheading Processing:
-
-This routine is layered on both external handlers and filesystem / node
-type specific handlers. This routine should allow for the support of new
-filesystems without modification.
-
-@subheading Development Comments:
-
-This routine will determine if the file descriptor is associated with a
-network device. If it is lseek will map to an external network handler.
-The handler will be called with the file descriptor, offset and whence as
-its calling parameters. The return code from the external handler will be
-returned to the calling routine.
-
-If the file descriptor is not associated with a network connection, it is
-associated with a node in a filesystem. The following steps will be
-performed for filesystem nodes:
-
-@enumerate
-
-@item The file descriptor is used to obtain the file control block for the
-node.
-
-@item The file descriptor is range checked.
-
-@item The offset element of the file control block is altered as indicated
-by the offset and whence calling parameters
-
-@item The handler table in the file control block is examined to determine
-if it contains an entry for the lseek() function. If it does not an error
-is returned to the calling program.
-
-@item The lseek() function from the designated handler table is called
-with the file control block, offset and whence as calling arguments
-
-@item The return code from the lseek() handler function is returned to the
-calling program
-
-@end enumerate
-
-
-@c @page
-@section mkdir
-
-@subheading File:
-
-mkdir.c
-
-@subheading Processing:
-
-This routine attempts to create a directory node under the filesystem. The
-routine is layered the mknod() function.
-
-@subheading Development Comments:
-
-See mknod() for developmental comments.
-
-@c @page
-@section mkfifo
-
-@subheading File:
-
-mkfifo.c
-
-@subheading Processing:
-
-This routine attempts to create a FIFO node under the filesystem. The
-routine is layered the mknod() function.
-
-@subheading Development Comments:
-
-See mknod() for developmental comments
-
-@c @page
-@section mknod
-
-@subheading File:
-
-mknod.c
-
-@subheading Processing:
-
-This function will allow for the creation of the following types of nodes
-under the filesystem:
-
-@itemize @bullet
-
-@item directories
-
-@item regular files
-
-@item character devices
-
-@item block devices
-
-@item fifos
-
-@end itemize
-
-At the present time, an attempt to create a FIFO will result in an ENOTSUP
-error to the calling function. This routine is layered the filesystem
-specific routines evalformake and mknod. The introduction of a new
-filesystem must include its own evalformake and mknod function to support
-the generic mknod() function. Under this condition the generic mknod()
-function should accommodate other filesystem types without alteration.
-
-@subheading Development Comments:
-
-Test for nodal types - I thought that this test should look like the
-following code:
-
-@example
-if ( (mode & S_IFDIR) = = S_IFDIR) ||
- (mode & S_IFREG) = = S_IFREG) ||
- (mode & S_IFCHR) = = S_IFCHR) ||
- (mode & S_IFBLK) = = S_IFBLK) ||
- (mode & S_IFIFO) = = S_IFIFO))
- Set_errno_and_return_minus_one (EINVAL);
-
-@end example
-
-Where:
-
-@itemize @bullet
-@item S_IFREG (0100000) - Creation of a regular file
-@item S_IFCHR (0020000) - Creation of a character device
-@item S_IFBLK (0060000) - Creation of a block device
-@item S_IFIFO (0010000) - Creation of a FIFO
-@end itemize
-
-Determine if the pathname that we are trying to create starts at the root
-directory or is relative to the current directory using the
-rtems_filesystem_get_start_loc() function.
-
-Determine if the pathname leads to a valid directory that can be accessed
-for the creation of a node.
-
-If the pathname is a valid location to create a node, verify that a
-filesystem specific mknod() function exists.
-
-If the mknod() function exists, call the filesystem specific mknod()
-function. Pass the name, mode, device type and the location information
-associated with the directory under which the node will be created.
-
-@c @page
-@section mount
-
-@subheading File:
-
-mount.c
-
-
-Arguments (Not a standard POSIX call):
-
-rtems_filesystem_mount_table_entry_t **mt_entry,
-
-If the mount operation is successful, this pointer to a pointer will be
-set to reference the mount table chain entry that has been allocated for
-this file system mount.
-
-rtems_filesystem_operations_table *fs_ops,
-
-This is a pointer to a table of functions that are associated with the
-file system that we are about to mount. This is the mechanism to selected
-file system type without keeping a dynamic database of all possible file
-system types that are valid for the mount operation. Using this method, it
-is only necessary to configure the filesystems that we wish to use into
-the RTEMS build. Unused filesystems types will not be drawn into the
-build.
-
-char *fsoptions,
-
-This argument points to a string that selects mounting for read only
-access or read/write access. Valid states are "RO" and "RW"
-
-char *device,
-
-This argument is reserved for the name of a device that will be used to
-access the filesystem information. Current filesystem implementations are
-memory based and do not require a device to access filesystem information.
-
-char *mount_point
-
-This is a pathname to a directory in a currently mounted filesystem that
-allows read, write and execute permissions. If successful, the node found
-by evaluating this name, is stored in the mt_entry.
-
-@subheading Processing:
-
-This routine will handle the mounting of a filesystem on a mount point. If
-the operation is successful, a pointer to the mount table chain entry
-associated with the mounted filesystem will be returned to the calling
-function. The specifics about the processing required at the mount point
-and within the filesystem being mounted is isolated in the filesystem
-specific mount() and fsmount_me() functions. This allows the generic
-mount() function to remain unaltered even if new filesystem types are
-introduced.
-
-
-
-@subheading Development Comments:
-
-This routine will use get_file_system_options() to determine if the mount
-options are valid ("RO" or "RW").
-
-It confirms that a filesystem ops-table has been selected.
-
-Space is allocated for a mount table entry and selective elements of the
-temporary mount table entry are initialized.
-
-If a mount point is specified: The mount point is examined to determine
-that it is a directory and also has the appropriate permissions to allow a
-filesystem to be mounted.
-
-The current mount table chain is searched to determine that there is not
-another filesystem mounted at the mount point we are trying to mount onto.
-
-If a mount function is defined in the ops table for the filesystem
-containing the mount point, it is called at this time.
-
-If no mount point is specified: Processing if performed to set up the
-mount table chain entry as the base filesystem.
-
-If the fsmount_me() function is specified for ops-table of the filesystem
-being mounted, that function is called to initialize for the new
-filesystem.
-
-On successful completion, the temporary mount table entry will be placed
-on the mount table chain to record the presence of the mounted filesystem.
-
-@c @page
-@section open
-
-@subheading File:
-
-open.c
-
-@subheading Processing:
-
-This routine is layered on both RTEMS calls and filesystem specific
-implementations of the open() function. These functional interfaces should
-not change for new filesystems and therefore this code should be stable as
-new file systems are introduced.
-
-@subheading Development Comments:
-
-This routine will allocate a file control block for the file or device
-that we are about to open.
-
-It will then test to see if the pathname exists. If it does a
-rtems_filesystem_location_info_t data structure will be filled out. This
-structure contains information that associates node information,
-filesystem specific functions and mount table chain information with the
-pathname.
-
-If the create option has been it will attempt to create a node for a
-regular file along the specified path. If a file already exists along this
-path, an error will be generated; otherwise, a node will be allocated for
-the file under the filesystem that contains the pathname. When a new node
-is created, it is also evaluated so that an appropriate
-rtems_filesystem_location_info_t data structure can be filled out for the
-newly created node.
-
-If the file exists or the new file was created successfully, the file
-control block structure will be initialized with handler table
-information, node information and the rtems_filesystem_location_info_t
-data structure that describes the node and filesystem data in detail.
-
-If an open() function exists in the filesystem specific handlers table for
-the node that we are trying to open, it will be called at this time.
-
-If any error is detected in the process, cleanup is performed. It consists
-of freeing the file control block structure that was allocated at the
-beginning of the generic open() routine.
-
-On a successful open(), the index into the file descriptor table will be
-calculated and returned to the calling routine.
-
-@c @page
-@section opendir
-
-@subheading File:
-
-opendir.c
-
-@subheading Processing:
-
-This routine will attempt to open a directory for read access. It will
-setup a DIR control structure that will be used to access directory
-information. This routine is layered on the generic open() routine and
-filesystem specific directory processing routines.
-
-@subheading Development Comments:
-
-The BSD group provided this routine.
-
-@c @page
-@section pathconf
-
-@subheading File:
-
-pathconf.c
-
-@subheading Processing:
-
-This routine will obtain the value of one of the path configuration
-parameters and return it to the calling routine. It is layered on the
-generic open() and fpathconf() functions. These interfaces should not
-change with the addition of new filesystem types.
-
-@subheading Development Comments:
-
-This routine will try to open the file indicated by path.
-
-If successful, the file descriptor will be used to access the pathconf
-value specified by @code{name} using the fpathconf() function.
-
-The file that was accessed is then closed.
-
-@c @page
-@section read
-
-@subheading File:
-
-deviceio.c
-
-@subheading Processing:
-
-This routine is layered on a set of RTEMS calls and filesystem specific
-read operations. The functions are layered in such a way as to isolate
-them from change as new filesystems are introduced.
-
-@subheading Development Comments:
-
-This routine will examine the type of file descriptor it is sent.
-
-If the file descriptor is associated with a network device, the read
-function will be mapped to a special network handler. The return code from
-the network handler will then be sent as the return code from generic
-read() function.
-
-For file descriptors that are associated with the filesystem the following
-sequence will be performed:
-
-@enumerate
-
-@item Obtain the file control block associated with the file descriptor
-
-@item Range check the file descriptor
-
-@item Determine that the buffer pointer is not invalid
-
-@item Check that the count is not zero
-
-@item Check the file control block to see if we have permissions to read
-
-@item If there is a read function in the handler table, invoke the handler
-table read() function
-
-@item Use the return code from the handler table read function(number of
-bytes read) to increment the offset element of the file control block
-
-@item Return the number of bytes read to the calling program
-
-@end enumerate
-
-@c @page
-@section readdir
-
-@subheading File:
-
-readdir.c
-
-@subheading Processing:
-
-This routine was acquired from the BSD group. It has not been altered from
-its original form.
-
-@subheading Development Comments:
-
-The routine calls a customized getdents() function that is provided by the
-user. This routine provides the filesystem specific aspects of reading a
-directory.
-
-It is layered on the read() function in the directory handler table. This
-function has been mapped to the Imfs_dir_read() function.
-
-@c @page
-@section unmount
-
-@subheading File:
-
-unmount.c
-
-@subheading Processing:
-
-This routine will attempt to dismount a mounted filesystem and then free
-all resources that were allocated for the management of that filesystem.
-
-@subheading Development Comments:
-
-@itemize @bullet
-
-@item This routine will determine if there are any filesystems currently
-mounted under the filesystem that we are trying to dismount. This would
-prevent the dismount of the filesystem.
-
-@item It will test to see if the current directory is in the filesystem
-that we are attempting to dismount. This would prevent the dismount of the
-filesystem.
-
-@item It will scan all the currently open file descriptors to determine is
-there is an open file descriptor to a file in the filesystem that we are
-attempting to unmount().
-
-@end itemize
-
-If the above preconditions are met then the following sequence is
-performed:
-
-@enumerate
-
-@item Call the filesystem specific unmount() function for the filesystem
-that contains the mount point. This routine should indicate that the mount
-point no longer has a filesystem mounted below it.
-
-@item Call the filesystem specific fsunmount_me() function for the mounted
-filesystem that we are trying to unmount(). This routine should clean up
-any resources that are no longer needed for the management of the file
-system being un-mounted.
-
-@item Extract the mount table entry for the filesystem that was just
-dismounted from the mount table chain.
-
-@item Free the memory associated with the extracted mount table entry.
-
-@end enumerate
-
-@c @page
-@section eval
-
-@subheading File:
-
-XXX
-
-@subheading Processing:
-
-XXX
-
-@subheading Development Comments:
-
-XXX
-
-@c @page
-@section getdentsc
-
-@subheading File:
-
-XXX
-
-@subheading Processing:
-
-XXX
-
-@subheading Development Comments:
-
-XXX
-
diff --git a/doc/filesystem/tftp.t b/doc/filesystem/tftp.t
deleted file mode 100644
index 82c4764d4e..0000000000
--- a/doc/filesystem/tftp.t
+++ /dev/null
@@ -1,14 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Trivial FTP Client Filesystem
-
-This chapter describes the Trivial FTP (TFTP) Client Filesystem.
-
-This chapter should be written after the IMFS chapter is completed
-and describe the implementation of the TFTP.
diff --git a/doc/gnu_docs/Tool_Doc_Instructions b/doc/gnu_docs/Tool_Doc_Instructions
deleted file mode 100644
index 37f861d523..0000000000
--- a/doc/gnu_docs/Tool_Doc_Instructions
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# $Id$
-#
-
-Apparently, the tool documentation is tough to build without configuring
-in the tool source directory. So you need to do some magic to make
-this happen. In addition, the makefiles only support building dvi
-and info.
-
-mkdir doc_build
-cp -r binutils-XXX gcc-XXX gdb-XXX newlib-XXX doc_build
-
-# for each tool
-cd binutils-XXX
-./configure --target=i386-rtems --prefix=/usr3/tmp/DOCTMP
-make info dvi
-
-# for newlib we have to do the build differently
-mkdir b
-cd b
-../newlib-1.8.2/./configure --target=i386-rtems --prefix=/usr3/tmp/DOCTMP
-make
-make info dvi
-cd ../newlib-1.8.2
-find newlib/ -name "*.t*" | cpio -pdum ../b/i386-rtems/
-find etc/ -name "*.t*" | cpio -pdum ../b
-
-
-NOTE: The actual target is not relevant since the documentation is
-always the same.
-
-
diff --git a/doc/gnu_docs/gen_docs b/doc/gnu_docs/gen_docs
deleted file mode 100644
index 1e9ba9eb83..0000000000
--- a/doc/gnu_docs/gen_docs
+++ /dev/null
@@ -1,125 +0,0 @@
-#! /bin/sh
-#
-# This script is intended to be run in the build directory of a software
-# package including documentation in texinfo format. The basic operation
-# of this script is to:
-# + find all ".dvi" files from the current directory down,
-# + for each dvi file
-# + install the dvi file
-# + generate PostScript files for the dvi file
-# + install the PostScript file
-# + if there is texinfo source for this dvi file
-# install the info files
-# generate PDF from the texinfo source
-# install the PDF file
-# generate HTML from the texinfo source
-# install the HTML file
-#
-#
-
-texi2www=/usr1/rtems/rtemsdoc-work/tools/texi2www/texi2www
-install=/usr3/rtems_cds/test_cd/doc/tools/html
-
-#if [ $? -ne 1 ] ; then
-# echo "Usage: $0 install_directory"
-# exit 1
-#fi
-
-if [ ! -d ${install} ] ; then
- echo "${install} is not a directory"
- exit 1
-fi
-
-#ECHO=echo
-
-STARTDIR=`pwd`
-find . -name "*.dvi" | while read file
-do
- cd $STARTDIR
- cd `dirname $file`
- echo $file
- i=`basename $file`
-####
- b=`echo $i | cut -d'.' -f1`
- echo $b
-
- if [ -d ${install}/${b} ] ; then
- echo "Cleaning install point for ${b}"
- ${ECHO} rm -rf ${install}/${b}
- fi
- ${ECHO} mkdir ${install}/${b}
-
- echo "Copying DVI for ${b}"
- ${ECHO} cp ${b}.dvi ${install}/${b}
-
- echo "Generating PS for ${b}"
- ${ECHO} dvips -o ${install}/${b}/${b}.ps ${b}.dvi
-
- # unfortunately the .dvi names are not always the same. :(
- case ${b} in
- history) tsrc=hist ;;
- readline) tsrc=rlman ;;
- *) tsrc=${b} ;;
- esac
-
- case ${b} in
- refcard)
- cp $d/gnu_docs/refcard.html ${install}/${b}
- ;;
- *)
- if [ -r ${tsrc}.texi ] ; then
- ext=texi
- elif [ -r ${tsrc}.texinfo ] ; then
- ext=texinfo
- else
- echo "***
- echo "*** Cannot find a texi or texinfo file for ${b}"
- echo "***
-exit 1
- fi
-
- echo "Copying INFO for ${b}"
- ${ECHO} cp ${b}.info* ${install}/../info
-
- case ${b} in
- g77) bad_for_pdf="yes" ;;
- *) bad_for_pdf="no" ;;
- esac
-
- case ${b} in
- gdb) extraargs_for_pdf="-I ../../readline/doc" ;;
- *) extraargs_for_pdf="" ;;
- esac
- if [ ${bad_for_pdf} = "yes" ] ; then
- echo "*** "
- echo "*** Skipping PDF for ${b}"
- echo "*** "
- else
- echo "Generating PDF for ${b}"
- ${ECHO} texi2pdf ${extraargs_for_pdf} ${tsrc}.${ext} && \
- ${ECHO} cp ${tsrc}.pdf ${install}/${b}/${b}.pdf
- fi
-
- # until texi2www is modified to take a search path
- case ${b} in
- gdb)
- sed -e 's/^ @/@/' <../../readline/doc/rluser.texinfo >rluser.texinfo
- cp ../../readline/doc/inc-hist.texi .
- ;;
- readline)
- cp rluser.texinfo rluser.texinfo.tmp
- sed -e 's/^ @/@/' <../../readline/doc/rluser.texinfo >rluser.texinfo
- rm -f rluser.texinfo.tmp
- ;;
- *) ;;
- esac
- echo "Generating HTML for ${b}"
- ${ECHO} ${texi2www} \
- -dirfile ../index.html \
- -header $d/gnu_docs/gnu_header.html \
- -footer $d/gnu_docs/gnu_footer.html \
- -icons .. -dir ${install}/${b} \
- ${tsrc}.${ext}
- ;;
- esac
-done
diff --git a/doc/gnu_docs/gnu_footer.html b/doc/gnu_docs/gnu_footer.html
deleted file mode 100644
index 037261ac58..0000000000
--- a/doc/gnu_docs/gnu_footer.html
+++ /dev/null
@@ -1,2 +0,0 @@
-<P>Packaging copyright &copy; 1988-1999 <A HREF="http://www.oarcorp.com" target="Text Frame">OAR Corporation</A></BR>
-Context copyright by each document's author. See <A HREF="http://www.gnu.org" target="Text Frame">Free Software Foundation</A> for information.
diff --git a/doc/gnu_docs/gnu_header.html b/doc/gnu_docs/gnu_header.html
deleted file mode 100644
index 6bd6009147..0000000000
--- a/doc/gnu_docs/gnu_header.html
+++ /dev/null
@@ -1,5 +0,0 @@
-<BODY BGCOLOR="FFFFFF">
-<A HREF="http://www.oarcorp.com" target="Text Frame">
- <IMG align=right BORDER=0 SRC="../oaronly.jpg" ALT="OAR"> </A>
-<H1>RTEMS Tools On-Line Library</H1>
-<HR>
diff --git a/doc/gnu_docs/index.html b/doc/gnu_docs/index.html
deleted file mode 100644
index 03bd3de4b3..0000000000
--- a/doc/gnu_docs/index.html
+++ /dev/null
@@ -1,143 +0,0 @@
-<HTML>
-<HEAD><TITLE>RTEMS On-Line Library</TITLE></HEAD>
-<BODY BGCOLOR="FFFFFF">
-<A HREF="http://www.oarcorp.com" target="Text Frame">
- <IMG align=right BORDER=0 SRC="oaronly.jpg" ALT="OAR"> </A>
-<H1>RTEMS Tools On-Line Library</H1>
-<HR>
-<BODY>
-<MENU>
- <LI>GNU Compiler Collection (GCC) 2.95.1
- <MENU>
- <LI><A HREF="gcc/gcc.pdf"><IMG SRC="pdf1.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="gcc/gcc.ps"><IMG SRC="ps.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="gcc/gcc.dvi"><IMG SRC="dvi.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="gcc/index.html">
- Using and Porting the GNU Compiler Collection (GCC)</A></LI>
- <LI><A HREF="cpp/cpp.pdf"><IMG SRC="pdf1.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="cpp/cpp.ps"><IMG SRC="ps.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="cpp/cpp.dvi"><IMG SRC="dvi.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="cpp/index.html">
- The C Preprocessor</A></LI>
- <LI><A HREF="chill/chill.pdf"><IMG SRC="pdf1.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="chill/chill.ps"><IMG SRC="ps.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="chill/chill.dvi"><IMG SRC="dvi.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="chill/index.html">
- Guide to GNU Chill</A></LI>
- <LI><A HREF="BAD.html"><IMG SRC="pdf1.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="g77/g77.ps"><IMG SRC="ps.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="g77/g77.dvi"><IMG SRC="dvi.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="cpp/index.html">
- Using and Porting GNU Fortran</A></LI>
- </MENU>
- </LI>
-
- <LI>GNU binutils 990901
- <MENU>
- <LI><A HREF="binutils/binutils.pdf">
- <IMG SRC="pdf1.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="binutils/binutils.ps">
- <IMG SRC="ps.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="binutils/binutils.dvi">
- <IMG SRC="dvi.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="binutils/index.html">
- GNU Binary Utilities</A></LI>
- <LI><A HREF="as/as.pdf"><IMG SRC="pdf1.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="as/as.ps"><IMG SRC="ps.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="as/as.dvi"><IMG SRC="dvi.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="as/index.html">
- Using the GNU Assembler</A></LI>
- <LI><A HREF="gasp/gasp.pdf"><IMG SRC="pdf1.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="gasp/gasp.ps"><IMG SRC="ps.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="gasp/gasp.dvi"><IMG SRC="dvi.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="gasp/index.html">
- GNU Preprocessor for Assembly Programs (gasp)</A></LI>
- <LI><A HREF="ld/ld.pdf"><IMG SRC="pdf1.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="ld/ld.ps"><IMG SRC="ps.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="ld/ld.dvi"><IMG SRC="dvi.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="ld/index.html">
- Using the GNU Linker (ld)</A></LI>
- </MENU>
- </LI>
-
- <LI>GNU gdb 4.18
- <MENU>
- <LI><A HREF="gdb/gdb.pdf"><IMG SRC="pdf1.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="gdb/gdb.ps"><IMG SRC="ps.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="gdb/gdb.dvi"><IMG SRC="dvi.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="gdb/index.html">
- Debugging with GDB</A></LI>
- <LI><A HREF="gdbint/gdbint.pdf"><IMG SRC="pdf1.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="gdbint/gdbint.ps"><IMG SRC="ps.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="gdbint/gdbint.dvi"><IMG SRC="dvi.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="gdbint/index.html">
- GDB Internals</A></LI>
- <LI><A HREF="stabs/stabs.pdf"><IMG SRC="pdf1.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="stabs/stabs.ps"><IMG SRC="ps.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="stabs/stabs.dvi"><IMG SRC="dvi.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="stabs/index.html">
- STABS Debugging Format</A></LI>
- <LI><A HREF="refcard/refcard.html"><IMG SRC="pdf1.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="refcard/refcard.ps"><IMG SRC="ps.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="refcard/refcard.dvi"><IMG SRC="dvi.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="refcard/refcard.html">
- GDB Quick Reference Card</A></LI>
- </MENU>
- </LI>
-
- <LI>Newlib 1.8.2
- <MENU>
- <LI><A HREF="libc/libc.pdf"><IMG SRC="pdf1.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="libc/libc.ps"><IMG SRC="ps.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="libc/libc.dvi"><IMG SRC="dvi.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="libc/index.html">
- libc</A></LI>
- <LI><A HREF="libm/libm.pdf"><IMG SRC="pdf1.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="libm/libm.ps"><IMG SRC="ps.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="libm/libm.dvi"><IMG SRC="dvi.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="libm/index.html">
- libm</A></LI>
- </MENU>
- </LI>
-
- <LI>GNU Libraries Used by Multiple Tools
- <MENU>
- <LI><A HREF="history/history.pdf"><IMG SRC="pdf1.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="history/history.ps"><IMG SRC="ps.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="history/history.dvi"><IMG SRC="dvi.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="history/index.html">
- GNU History Library</A></LI>
- <LI><A HREF="readline/readline.pdf"><IMG SRC="pdf1.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="readline/readline.ps"><IMG SRC="ps.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="readline/readline.dvi"><IMG SRC="dvi.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="readline/index.html">
- GNU Readline Library</A></LI>
- <LI><A HREF="mmalloc/mmalloc.pdf"><IMG SRC="pdf1.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="mmalloc/mmalloc.ps"><IMG SRC="ps.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="mmalloc/mmalloc.dvi"><IMG SRC="dvi.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="mmalloc/index.html">
- GNU Memory-Mapped Malloc Library (mmalloc)</A></LI>
- <LI><A HREF="bfd/bfd.pdf"><IMG SRC="pdf1.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="bfd/bfd.ps"><IMG SRC="ps.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="bfd/bfd.dvi"><IMG SRC="dvi.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="bfd/index.html">
- GNU Binary File Descriptor (libbfd)</A></LI>
- </MENU>
-
- </LI>
- <LI>General GNU Project Documentation
- <MENU>
- <LI><A HREF="standards/standards.pdf">
- <IMG SRC="pdf1.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="standards/standards.ps">
- <IMG SRC="ps.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="standards/standards.dvi">
- <IMG SRC="dvi.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="standards/index.html">
- GNU Coding Standards</A></LI>
- </MENU>
- </LI>
-</MENU>
-<HR>
-Copyright &copy; 1988-1999 <A HREF="http://www.oarcorp.com" target="Text Frame">OAR Corporation</A>
-</BODY></HTML>
diff --git a/doc/gnu_docs/mk_install_dir b/doc/gnu_docs/mk_install_dir
deleted file mode 100644
index 52ef35287b..0000000000
--- a/doc/gnu_docs/mk_install_dir
+++ /dev/null
@@ -1,29 +0,0 @@
-#! /bin/sh
-#
-# This script creates the install infrastructure for the GNU tools
-# documentation.
-#
-
-install=/usr3/rtems_cds/test_cd/doc/tools
-
-#if [ $? -ne 1 ] ; then
-# echo "Usage: $0 install_directory"
-# exit 1
-#fi
-
-rm -rf ${install}
-mkdir ${install}
-mkdir ${install}/info
-mkdir ${install}/html
-
-cp rtems_tools_index.html ${install}/../index.html
-cp index.html ${install}/html
-cp ../BAD.html ${install}/html
-cp ../tools/texi2www/*.gif ${install}/html
-cp ../common/*arrow.gif ${install}/html
-cp ../common/up-arrow.gif ${install}/html
-cp ../common/oaronly.jpg ${install}/html
-cp ../common/dvi.gif ${install}/html
-cp ../common/pdf.gif ${install}/html
-cp ../common/pdf1.gif ${install}/html
-cp ../common/ps.gif ${install}/html
diff --git a/doc/gnu_docs/refcard.html b/doc/gnu_docs/refcard.html
deleted file mode 100644
index 0e96d95ac2..0000000000
--- a/doc/gnu_docs/refcard.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<HTML>
-<HEAD><TITLE>GDB Reference Card</TITLE></HEAD>
-<BODY BGCOLOR="FFFFFF">
-<A HREF="http://www.oarcorp.com" target="Text Frame">
- <IMG align=right BORDER=0 SRC="../oaronly.jpg" ALT="OAR"> </A>
-<H1>RTEMS On-Line Library</H1>
-<HR>
-<BODY>
-The GDB Reference card is not written in texinfo file. There is currently
-no HTML or PDF version of this file.
-<HR>
-Copyright &copy; 1988-1999 <A HREF="http://www.oarcorp.com" target="Text Frame">OAR Corporation</A>
-</BODY></HTML>
diff --git a/doc/gnu_docs/rtems_tools_index.html b/doc/gnu_docs/rtems_tools_index.html
deleted file mode 100644
index 38f83be513..0000000000
--- a/doc/gnu_docs/rtems_tools_index.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<HTML>
-<HEAD><TITLE>RTEMS and Tools On-Line Library</TITLE></HEAD>
-<BODY BGCOLOR="FFFFFF">
-<A HREF="http://www.oarcorp.com" target="Text Frame">
- <IMG align=right BORDER=0 SRC="rtems/html/oaronly.jpg" ALT="OAR"> </A>
-<H1>RTEMS and Tools On-Line Library</H1>
-<HR>
-<BODY>
-<MENU>
- <LI><A HREF="rtems/html/index.html">RTEMS Documentation</A></LI>
- <LI><A HREF="tools/html/index.html">GNU Documentation</A></LI>
-</MENU>
-<HR>
-Copyright &copy; 1988-1999 <A HREF="http://www.oarcorp.com" target="Text Frame">OAR Corporation</A>
-</BODY></HTML>
diff --git a/doc/index.html b/doc/index.html
deleted file mode 100644
index 4ad742870f..0000000000
--- a/doc/index.html
+++ /dev/null
@@ -1,275 +0,0 @@
-<HTML>
-<HEAD><TITLE>RTEMS RTEMS_VERSION On-Line Library</TITLE></HEAD>
-<BODY BGCOLOR="FFFFFF">
-<A HREF="http://www.oarcorp.com" target="Text Frame">
- <IMG align=right BORDER=0 SRC="oaronly.jpg" ALT="OAR"> </A>
-<H1>RTEMS RTEMS_VERSION On-Line Library</H1>
-<HR>
-<BODY>
-<MENU>
- <LI>
- <A HREF="FAQ/FAQ.pdf">
- <IMG SRC="pdf1.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="FAQ/FAQ.ps">
- <IMG SRC="ps.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="FAQ/FAQ.dvi">
- <IMG SRC="dvi.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="FAQ/index.html">RTEMS FAQ</A>
- </LI>
- <LI>C/C++ Manuals</LI>
- <MENU>
- <LI><A HREF="BAD.html">
- <IMG SRC="pdf1.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="started/started.ps">
- <IMG SRC="ps.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="started/started.dvi">
- <IMG SRC="dvi.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="started/index.html">
- Getting Started with RTEMS for C/C++ Users</A>
- </LI>
-
- <LI><A HREF="c_user/c_user.pdf">
- <IMG SRC="pdf1.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="c_user/c_user.ps">
- <IMG SRC="ps.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="c_user/c_user.dvi">
- <IMG SRC="dvi.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="c_user/index.html">
- RTEMS Applications C User's Guide</A>
- </LI>
-
- <LI><A HREF="posix_users/posix_users.pdf">
- <IMG SRC="pdf1.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="posix_users/posix_users.ps">
- <IMG SRC="ps.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="posix_users/posix_users.dvi">
- <IMG SRC="dvi.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="posix_users/index.html">
- RTEMS POSIX API User's Guide</A>
- </LI>
-
- <LI><A HREF="itron/itron.pdf">
- <IMG SRC="pdf1.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="itron/itron.ps">
- <IMG SRC="ps.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="itron/itron.dvi">
- <IMG SRC="dvi.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="itron/index.html">
- RTEMS ITRON 3.0 API User's Guide</A>
- </LI>
-
- <LI><A HREF="networking/networking.pdf">
- <IMG SRC="pdf1.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="networking/networking.ps">
- <IMG SRC="ps.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="networking/networking.dvi">
- <IMG SRC="dvi.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="networking/index.html">
- RTEMS Network Supplement</A>
- </LI>
- </MENU>
- <LI>Ada Manuals</LI>
- <MENU>
- <LI><A HREF="BAD.html">
- <IMG SRC="pdf1.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="started_ada/started_ada.ps">
- <IMG SRC="ps.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="started_ada/started_ada.dvi">
- <IMG SRC="dvi.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="started_ada/index.html">
- Getting Started with GNAT/RTEMS</A>
- </LI>
- <LI><A HREF="ada_user/ada_user.pdf">
- <IMG SRC="pdf1.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="ada_user/ada_user.ps">
- <IMG SRC="ps.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="ada_user/ada_user.dvi">
- <IMG SRC="dvi.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="ada_user/index.html">
- RTEMS Applications Ada User's Guide</A>
- </LI>
- </MENU>
- <LI>Miscellaneous Manuals</LI>
- <MENU>
- <LI><A HREF="develenv/develenv.pdf">
- <IMG SRC="pdf1.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="develenv/develenv.ps">
- <IMG SRC="ps.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="develenv/develenv.dvi">
- <IMG SRC="dvi.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="develenv/index.html">
- RTEMS Development Environment Guide</A>
- </LI>
-
- <LI><A HREF="rtems_gdb/rtems_gdb.pdf">
- <IMG SRC="pdf1.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="rtems_gdb/rtems_gdb.ps">
- <IMG SRC="ps.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="rtems_gdb/rtems_gdb.dvi">
- <IMG SRC="dvi.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="rtems_gdb/index.html">
- RTEMS/GDB User's Guide</A>
- </LI>
-
- <LI><A HREF="rgdb_specs/rgdb_specs.pdf">
- <IMG SRC="pdf1.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="rgdb_specs/rgdb_specs.ps">
- <IMG SRC="ps.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="rgdb_specs/rgdb_specs.dvi">
- <IMG SRC="dvi.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="rgdb_specs/index.html">
- RTEMS Remote Debugger Server Specifications</A>
- </LI>
-
- <LI><A HREF="bsp_howto/bsp_howto.pdf">
- <IMG SRC="pdf1.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="bsp_howto/bsp_howto.ps">
- <IMG SRC="ps.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="bsp_howto/bsp_howto.dvi">
- <IMG SRC="dvi.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="bsp_howto/index.html">
- RTEMS BSP and Device Driver Development Guide</A>
- </LI>
-
- <LI><A HREF="porting/porting.pdf">
- <IMG SRC="pdf1.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="porting/porting.ps">
- <IMG SRC="ps.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="porting/porting.dvi">
- <IMG SRC="dvi.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="porting/index.html">
- RTEMS Porting Guide</A>
- </LI>
-
- <LI><A HREF="filesystem/filesystem.pdf">
- <IMG SRC="pdf1.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="filesystem/filesystem.ps">
- <IMG SRC="ps.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="filesystem/filesystem.dvi">
- <IMG SRC="dvi.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="filesystem/index.html">
- RTEMS Filesystem Design Guide</A>
- </LI>
-
- <LI><A HREF="posix1003_1/posix1003_1.pdf">
- <IMG SRC="pdf1.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="posix1003_1/posix1003_1.ps">
- <IMG SRC="ps.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="posix1003_1/posix1003_1.dvi">
- <IMG SRC="dvi.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="posix1003_1/index.html">
- RTEMS POSIX 1003.1 Compliance Guide</A>
- </LI>
- </MENU>
-
-
-<LI>CPU Supplements
-
- <MENU>
- <LI><A HREF="HELP.html">
- <IMG SRC="pdf1.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="HELP.html">
- <IMG SRC="ps.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="HELP.html">
- <IMG SRC="dvi.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="HELP.html">
- RTEMS AMD 29K Applications Supplement</A>
- </LI>
-
- <LI><A HREF="HELP.html">
- <IMG SRC="pdf1.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="HELP.html">
- <IMG SRC="ps.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="HELP.html">
- <IMG SRC="dvi.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="HELP.html">
- RTEMS Hitachi SH Applications Supplement</A>
- </LI>
-
- <LI><A HREF="i386/i386.pdf">
- <IMG SRC="pdf1.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="i386/i386.ps">
- <IMG SRC="ps.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="i386/i386.dvi">
- <IMG SRC="dvi.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="i386/index.html">
- RTEMS Intel i386 Applications Supplement</A>
- </LI>
-
- <LI><A HREF="i960/i960.pdf">
- <IMG SRC="pdf1.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="i960/i960.ps">
- <IMG SRC="ps.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="i960/i960.dvi">
- <IMG SRC="dvi.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="i960/index.html">
- RTEMS Intel i960 Applications Supplement</A>
- </LI>
-
- <LI><A HREF="HELP.html">
- <IMG SRC="pdf1.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="HELP.html">
- <IMG SRC="ps.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="HELP.html">
- <IMG SRC="dvi.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="HELP.html">
- RTEMS MIPS64 ORION Applications Supplement</A>
- </LI>
-
- <LI><A HREF="m68k/m68k.pdf">
- <IMG SRC="pdf1.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="m68k/m68k.ps">
- <IMG SRC="ps.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="m68k/m68k.dvi">
- <IMG SRC="dvi.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="m68k/index.html">
- RTEMS Motorola MC68xxx Applications Supplement</A>
- </LI>
-
- <LI><A HREF="powerpc/powerpc.pdf">
- <IMG SRC="pdf1.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="powerpc/powerpc.ps">
- <IMG SRC="ps.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="powerpc/powerpc.dvi">
- <IMG SRC="dvi.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="powerpc/index.html">
- RTEMS PowerPC Applications Supplement</A>
- </LI>
-
- <LI><A HREF="sparc/sparc.pdf">
- <IMG SRC="pdf1.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="sparc/sparc.ps">
- <IMG SRC="ps.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="sparc/sparc.dvi">
- <IMG SRC="dvi.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="sparc/index.html">
- RTEMS SPARC Applications Supplement</A>
- </LI>
-
- <LI><A HREF="hppa1_1/hppa1_1.pdf">
- <IMG SRC="pdf1.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="hppa1_1/hppa1_1.ps">
- <IMG SRC="ps.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="hppa1_1/hppa1_1.dvi">
- <IMG SRC="dvi.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="hppa1_1/index.html">
- RTEMS Hewlett Packard PA-RISC Applications Supplement</A>
- </LI>
-
- <LI><A HREF="HELP.html">
- <IMG SRC="pdf1.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="HELP.html">
- <IMG SRC="ps.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="HELP.html">
- <IMG SRC="dvi.gif" HEIGHT=18 WIDTH=16></A>
- <A HREF="HELP.html">
- RTEMS UNIX Port Applications Supplement</A>
- </LI>
-
- </MENU>
-</LI>
-
-</MENU>
-<HR>
-Copyright &copy; 1988-2000 <A HREF="http://www.oarcorp.com" target="Text Frame">OAR Corporation</A>
-</BODY></HTML>
diff --git a/doc/itron3.0/Makefile b/doc/itron3.0/Makefile
deleted file mode 100644
index d3defd1fb8..0000000000
--- a/doc/itron3.0/Makefile
+++ /dev/null
@@ -1,133 +0,0 @@
-#
-# COPYRIGHT (c) 1988-1999.
-# On-Line Applications Research Corporation (OAR).
-# All rights reserved.
-#
-# $Id$
-#
-
-PROJECT=itron
-
-include ../Make.config
-
-all: html info ps pdf
-
-dirs:
- $(make-dirs)
-
-COMMON_FILES=
-
-GENERATED_FILES= \
- status.texi \
- task.texi tasksync.texi semaphore.texi eventflags.texi mailbox.texi \
- msgbuffer.texi rendezvous.texi interrupt.texi memorypool.texi \
- fixedblock.texi time.texi config.texi network.texi
-
-FILES= $(PROJECT).texi \
- $(COMMON_FILES) preface.texi $(GENERATED_FILES)
-
-INFOFILES=$(wildcard $(PROJECT) $(PROJECT)-*)
-
-info: $(FILES) $(PROJECT)
-
-$(PROJECT): $(FILES)
- $(MAKEINFO) $(PROJECT).texi
-
-dvi: $(PROJECT).dvi
-ps: $(PROJECT).ps
-pdf: $(PROJECT).pdf
-
-$(PROJECT).pdf: $(FILES)
- $(TEXI2PDF) $(PROJECT).texi
- cp $(PROJECT).pdf $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).ps: $(PROJECT).dvi
- dvips -o $(PROJECT).ps $(PROJECT).dvi
- cp $(PROJECT).ps $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).dvi: $(FILES)
- $(TEXI2DVI) $(PROJECT).texi
- cp $(PROJECT).dvi $(WWW_INSTALL)/$(PROJECT)
-
-html: $(FILES)
- -mkdir -p html
- -mkdir -p $(WWW_INSTALL)/$(PROJECT)
- $(TEXI2WWW) $(TEXI2WWW_ARGS) -dir $(WWW_INSTALL)/$(PROJECT) \
- $(PROJECT).texi
-
-clean:
- rm -f *.o $(PROG) *.txt core *.html
- rm -f *.dvi *.ps *.log *.aux *.cp *.fn *.ky *.pg *.toc *.tp *.vr $(BASE)
- rm -f $(PROJECT) $(PROJECT)-* _* $(GENERATED_FILES) $(PROJECT).pdf
- rm -rf html
-
-status.texi: status.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-task.texi: task.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-tasksync.texi: tasksync.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-semaphore.texi: semaphore.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-eventflags.texi: eventflags.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-mailbox.texi: mailbox.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-msgbuffer.texi: msgbuffer.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-rendezvous.texi: rendezvous.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-interrupt.texi: interrupt.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-memorypool.texi: memorypool.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-fixedblock.texi: fixedblock.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-time.texi: time.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-config.texi: config.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-network.texi: network.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
diff --git a/doc/itron3.0/config.t b/doc/itron3.0/config.t
deleted file mode 100644
index 8ce07e88d2..0000000000
--- a/doc/itron3.0/config.t
+++ /dev/null
@@ -1,187 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c This is the chapter from the RTEMS ITRON User's Guide that
-@c documents the services provided by the system
-@c manager.
-@c
-@c $Id$
-@c
-
-@chapter System Manager
-
-@section Introduction
-
-The
-system manager is ...
-
-The services provided by the system manager are:
-
-@itemize @bullet
-@item @code{get_ver} - Get Version Information
-@item @code{ref_sys} - Reference Semaphore Status
-@item @code{ref_cfg} - Reference Configuration Information
-@item @code{def_svc} - Define Extended SVC Handler
-@item @code{def_exc} - Define Exception Handler
-@end itemize
-
-@section Background
-
-@section Operations
-
-@section System Calls
-
-This section details the system manager's services.
-A subsection is dedicated to each of this manager's services
-and describes the calling sequence, related constants, usage,
-and status codes.
-
-
-@c
-@c get_ver
-@c
-
-@page
-@subsection get_ver - Get Version Information
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER get_ver(
- T_VER *pk_ver
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{EXXX} -
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-
-@c
-@c ref_sys
-@c
-
-@page
-@subsection ref_sys - Reference Semaphore Status
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER ref_sys(
- T_RSYS *pk_rsys
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{EXXX} -
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-
-@c
-@c ref_cfg
-@c
-
-@page
-@subsection ref_cfg - Reference Configuration Information
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER ref_cfg(
- T_RCFG *pk_rcfg
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{EXXX} -
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-
-@c
-@c def_svc
-@c
-
-@page
-@subsection def_svc - Define Extended SVC Handler
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER def_svc(
- FN s_fncd,
- T_DSVC *pk_dsvc
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{EXXX} -
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-
-@c
-@c def_exc
-@c
-
-@page
-@subsection def_exc - Define Exception Handler
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER def_exc(
- UINT exckind,
- T_DEXC *pk_dexc
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{EXXX} -
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
diff --git a/doc/itron3.0/eventflags.t b/doc/itron3.0/eventflags.t
deleted file mode 100644
index 00ef21d72f..0000000000
--- a/doc/itron3.0/eventflags.t
+++ /dev/null
@@ -1,860 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c This is the chapter from the RTEMS ITRON User's Guide that
-@c documents the services provided by the eventflags
-@c manager.
-@c
-@c $Id$
-@c
-
-@chapter Eventflags Manager
-
-@section Introduction
-
-The eventflag manager provides a high performance method of intertask communication and synchronization. The directives provided by the eventflag manager are:
-
-The services provided by the eventflags manager are:
-
-@itemize @bullet
-@item @code{cre_flg} - Create Eventflag
-@item @code{del_flg} - Delete Eventflag
-@item @code{set_flg} - Set Eventflag
-@item @code{clr_flg} - Clear Eventflag
-@item @code{wai_flg} - Wait on Eventflag
-@item @code{pol_flg} - Wait for Eventflag (Polling)
-@item @code{twai_flg} - Wait on Eventflag with Timeout
-@item @code{ref_flg} - Reference Eventflag Status
-@end itemize
-
-@section Background
-
-@subsection Event sets
-
-An eventflag is used by a task (or ISR) to inform another task of the
-occurrence of a significant situation. One word bit-field is associated with each eventflags. The application developer should remember the
-following key characteristics of event operations when utilizing the event
-manager:
-
-@itemize @bullet
-@item Events provide a simple synchronization facility.
-@item Events are aimed at tasks.
-@item Tasks can wait on more than one event simultaneously.
-@item Events are independent of one another.
-@item Events do not hold or transport data.
-@item Events are not queued. In other words, if an event is sent more than once to a task before being received, the second and subsequent send operations to that same task have no effect.
-@end itemize
-
-A pending event is an event that has been set. An
-event condition is used to specify the events which the task desires to
-receive and the algorithm which will be used to determine when the request
-is satisfied. An event condition is satisfied based upon one of two
-algorithms which are selected by the user. The @code{TWF_ORW} algorithm
-states that an event condition is satisfied when at least a single
-requested event is posted. The @code{TWF_ANDW} algorithm states that an
-event condition is satisfied when every requested event is posted.
-
-An eventflags or condition is built by a bitwise OR of the desired events.
-If an event is not explicitly specified in the set or condition, then it
-is not present. Events are specifically designed to be mutually exclusive,
-therefore bitwise OR and addition operations are equivalent as long as
-each event appears exactly once in the event set list.
-
-@subsection T_CFLG Structure
-
-The T_CFLG structire is used to define the characteristics of an eventflag
-and passed as an argument to the @code{cre_flg} service. The structure is
-defined as follows:
-
-@example
-
-/*
- * Create Eventflags (cre_flg) Structure
- */
-
-typedef struct t_cflg @{
- VP exinf; /* extended information */
- ATR flgatr; /* eventflag attribute */
- UINT iflgptn; /* initial eventflag */
- /* additional implementation dependent information may be included */
-@} T_CFLG;
-
-/*
- * flgatr - Eventflag Attribute Values
- */
-
-
-/* multiple tasks are not allowed to wait (Wait Single Task)*/
-
-#define TA_WSGL 0x00
-
-/* multiple tasks are allowed to wait (Wait Multiple Task) */
-
-#define TA_WMUL 0x08
-
-/* wfmode */
-#define TWF_ANDW 0x00 /* AND wait */
-#define TWF_ORW 0x02 /* OR wait */
-#define TWF_CLR 0x01 /* clear specification */
-@end example
-
-where the meaning of each field is:
-
-@table @b
-
-@item exinf
-
-may be used freely by the user for including extended information about
-the eventflag to be created. Information set here may be accessed by
-@code{ref_flg}. If a larger region is desired for including user information, or
-if the user wishes to change the contents of this information, the usr
-should allocate memory area and set the address of this memory packet to
-@code{exinf}. The OS does not take care of the contents of @code{exinf}. This
-implementation does not use this field.
-
-@item flgatr
-
-is the attributes for this eventflag. The lower bits of flgatr represent
-system attributes, while the upper bits represent implementation-dependent
-attributes.
-
-@item iflgptn
-
-is the initial eventflag pattern.
-(CPU and/or implementation-dependent information may also be included)
-
-@end table
-
-@subsection T_RFLG Structure
-
-The T_RFLG structire is used to define the characteristics of an eventflag
-and passed as an argument to the @code{ref_flg} service. The structure is
-defined as follows:
-
-@example
-/* Reference Eventflags (ref_flg) Structure */
-typedef struct t_rflg @{
- VP exinf; /* extended information */
- BOOL_ID wtsk; /* indicates whether or not there is a waiting task */
- UINT flgptn; /* eventflag bit pattern */
- /* additional implementation dependent information may be included */
-@} T_RFLG;
-@end example
-
-@table @b
-
-@item exinf
-
-see @code{T_CFLG}.
-
-@item wtsk
-
-indicates whether or not there is a task waiting for the eventflag in
-question. If there is no waiting task, @code{wtsk} is returned as FALSE = 0.
-If there is a waiting task, @code{wtsk} is returned as a value other than 0.
-
-@item flgptn
-
-is the eventflag pattern.
-
-@end table
-
-@section Operations
-
-@section System Calls
-
-This section details the eventflags manager's services. A subsection is
-dedicated to each of this manager's services and describes the calling
-sequence, related constants, usage, and status codes.
-
-
-@c
-@c cre_flg
-@c
-
-@page
-@subsection cre_flg - Create Eventflag
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER cre_flg(
- ID flgid,
- T_CFLG *pk_cflg
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_NOMEM} - Insufficient memory (Memory for control block cannot be
-allocated)
-
-@code{E_ID} - Invalid ID number (flgid was invalid or could not be used)
-
-@code{E_RSATR} - Reserved attribute (flgatr was invalid or could not be
-used)
-
-@code{E_OBJ} - Invalid object state (an eventflag of the same ID already
-exists)
-
-@code{E_OACV} - Object access violation (A flgid less than -4 was
-specified from a user task. This is implementation dependent.)
-
-@code{E_PAR} - Parameter error (pk_cflg is invalid)
-
-@code{EN_OBJNO} - An object number which could not be accessed on the
-target node is specified.
-
-@code{EN_CTXID} - Specified an object on another node when the system call
-was issued from a task in dispatch disabled state or from a
-task-independent portion
-
-@code{EN_PAR}- A value outside the range supported by the target node
-and/or transmission packet format was specified as a parameter (a value
-outside supported range was specified for exinf, flgatr and/or iflgptn)
-
-@subheading DESCRIPTION:
-
-This system call creates the eventflag specified by @code{flgid}.
-Specifically, a control block for the eventflag to be created is allocated
-and the associated flag pattern is initialized using @code{iflgptn}. A
-single eventflag handles one word's worth of bits of the processor in
-question as a group. All operations are done in single word units.
-
-User eventflags have positive ID numbers, while system eventflags have
-negative ID numbers. User tasks (tasks having positive task IDs) cannot
-access system eventflags. An @code{E_OACV} error will result if a user
-task issues a system call on a system eventflag, but error detection is
-implementation dependent.
-
-Eventflags having ID numbers from -4 through 0 cannot be created. An
-@code{E_ID} error will result if a value in this range is specified for
-@code{flgid}.
-
-The system attribute part of @code{flgatr} may be specified as @code{TA_WSGL}
-(Wait Single Task) or @code{TA_WMUL} (Wait Multiple Tasks)
-
-@subheading NOTES:
-
-Multiprocessing is not supported. Thus none of the "@code{EN_}" status
-codes will be returned.
-
-All memory is preallocated for @code{RTEMS ITRON} objects. Thus, no
-dynamic memory allocation is performed by @code{cre_flg} and the
-@code{E_NOMEM} error can not be returned.
-
-@c
-@c del_flg
-@c
-
-@page
-@subsection del_flg - Delete Eventflag
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER del_flg(
- ID flgid
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_ID} - Invalid ID number (flgid was invalid or could not be used)
-
-@code{E_NOEXS} - Object does not exist (the eventflag specified by flgid
-does not exist)
-
-@code{E_OACV} - Object access violation (A flgid less than -4 was
-specified from a user task. This is implementation dependent.)
-
-@code{EN_OBJNO} - An object number which could not be accessed on the
-target node is specified.
-
-@code{EN_CTXID} - Specified an object on another node when the system call
-was issued from a task in dispatch disabled state or from a
-task-independent portion
-
-@subheading DESCRIPTION:
-
-This system call deletes the eventflag specified by @code{flgid}.
-
-Issuing this system call causes memory used for the control block of the
-associated eventflag to be released. After this system call is invoked,
-another eventflag having the same ID number can be created.
-
-This system call will complete normally even if there are tasks waiting
-for the eventflag. In that case, an @code{E_DLT} error will be returned
-to each waiting task.
-
-@subheading NOTES:
-
-Multiprocessing is not supported. Thus none of the "@code{EN_}" status
-codes will be returned.
-
-When an eventflag being waited for by more than one tasks is deleted, the
-order of tasks on the ready queue after the WAIT state is cleared is
-implementation dependent in the case of tasks having the same priority.
-
-@c
-@c set_flg
-@c
-
-@page
-@subsection set_flg - Set Eventflag
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER set_flg(
- ID flgid,
- UINT setptn
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_ID} - Invalid ID number (flgid was invalid or could not be used)
-
-@code{E_NOEXS} - Object does not exist (the eventflag specified by flgid
-does not exist)
-
-@code{E_OACV} - Object access violation (A flgid less than -4 was
-specified from a user task. This is implementation dependent.)
-
-@code{EN_OBJNO} - An object number which could not be accessed on the
-target node is specified.
-
-@code{EN_CTXID} - Specified an object on another node when the system call
-was issued from a task in dispatch disabled state or from a
-task-independent portion
-
-@code{EN_PAR} - A value outside the range supported by the target node
-and/or transmission packet format was specified as a parameter (a value
-outside supported range was specified for setptn or clrptn)
-
-@subheading DESCRIPTION:
-
-The @code{set_flg} system call sets the bits specified by @code{setptn} of the
-one word eventflag specified by @code{flgid}. In other words, a logical
-sum is taken for the values of the eventflag specified by @code{flgid} with the
-value of @code{setptn}.
-
-If the eventflag value is changed by @code{set_flg} and the new eventflag
-value satisfies the condition to release the WAIT state of the task which
-issued @code{wai_flg} on the eventflag, the WAIT state of that task will
-be released and the task will be put into RUN or READY state (or SUSPEND
-state if the task was in WAIT-SUSPEND).
-
-Nothing will happen to the target eventflag if all bits of @code{setptn}
-are specified as 0 with @code{set_flg}. No error will result in either
-case.
-
-Multiple tasks can wait for a single eventflag if that eventflags has the
-@code{TA_WMUL} attribute. This means that even eventflags can make queues
-for tasks to wait on. When such eventflags are used, a single
-@code{set_flg} call may result in the release of multiple waiting tasks.
-In this case, the order of tasks on the ready queue after the WAIT state
-is cleared is preserved for tasks having the same priority.
-
-@subheading NOTES:
-
-Multiprocessing is not supported. Thus none of the "@code{EN_}" status
-codes will be returned.
-
-@c
-@c clr_flg
-@c
-
-@page
-@subsection clr_flg - Clear Eventflag
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER clr_flg(
- ID flgid,
- UINT clrptn
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-
-@code{E_OK} - Normal Completion
-
-@code{E_ID} - Invalid ID number (flgid was invalid or could not be used)
-
-@code{E_NOEXS} - Object does not exist (the eventflag specified by flgid
-does not exist)
-
-@code{E_OACV} - Object access violation (A flgid less than -4 was
-specified from a user task. This is implementation dependent.)
-
-@code{EN_OBJNO} - An object number which could not be accessed on the
-target node is specified.
-
-@code{EN_CTXID} - Specified an object on another node when the system call
-was issued from a task in dispatch disabled state or from a
-task-independent portion
-
-@code{EN_PAR} - A value outside the range supported by the target node
-and/or transmission packet format was specified as a parameter (a value
-outside supported range was specified for setptn or clrptn)
-
-@subheading DESCRIPTION:
-
-The @code{clr_flg} system call clears the bits of the one word eventflag
-based on the corresponding zero bits of @code{clrptn}. In other words, a
-logical product is taken for the values of the eventflag specified by
-@code{flgid} with the value of @code{clrptn}.
-
-Issuing @code{clr_flg} never results in wait conditions being released on
-a task waiting for the specified eventflag. In other words, dispatching
-never occurs with @code{clr_flg}.
-
-Nothing will happen to the target eventflag if all bits of @code{clrptn}
-are specified as 1 with @code{clr_flg}. No error will result.
-
-@subheading NOTES:
-
-Multiprocessing is not supported. Thus none of the "@code{EN_}" status
-codes will be returned.
-
-@c
-@c wai_flg
-@c
-
-@page
-@subsection wai_flg - Wait on Eventflag
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER wai_flg(
- UINT *p_flgptn,
- ID flgid,
- UINT waiptn,
- UINT wfmode
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-
-@code{E_OK} - Normal Completion
-
-@code{E_ID} - Invalid ID number (flgid was invalid or could not be used)
-
-@code{E_NOEXS} - Object does not exist (the eventflag specified by flgid
-does not exist)
-
-@code{E_OACV} - Object access violation (A flgid less than -4 was
-specified from a user task. This is implementation dependent.)
-
-@code{E_PAR} - Parameter error (waiptn = 0, wfmode invalid, or tmout is -2
-or less)
-
-@code{E_OBJ} - Invalid object state (multiple tasks waiting for an
-eventflag with the TA_WSGL attribute)
-
-@code{E_DLT} - The object being waited for was deleted (the specified
-eventflag was deleted while waiting)
-
-@code{E_RLWAI} - WAIT state was forcibly released (rel_wai was received
-while waiting)
-
-@code{E_TMOUT} - Polling failure or timeout exceeded
-
-@code{E_CTX} - Context error (issued from task-independent portions or a
-task in dispatch disabled state)
-
-@code{EN_OBJNO} - An object number which could not be accessed on the
-target node is specified.
-
-@code{EN_PAR} - A value outside the range supported by the target node
-and/or transmission packet format was specified as a parameter (a value
-outside supported range was specified for waiptn and tmout)
-
-@code{EN_RPAR} - A value outside the range supported by the requesting
-node and/or transmission packet format was specified as a parameter (a
-value exceeding the range for the requesting node was specified for
-flgptn)
-
-@subheading DESCRIPTION:
-
-The @code{wai_flg} system call waits for the eventflag specified by
-@code{flgid} to be set to satisfy the wait release condition specified by
-@code{wfmode}. The Eventflags bit-pattern will be returned with a pointer @code{p_flgptn}.
-
-If the eventflag specified by @code{flgid} already satisfies the wait
-release conditions given by @code{wfmode}, the issuing task will continue
-execution without waiting. @code{wfmode} may be specified as follows.
-
-@example
- wfmode = TWF_ANDW (or TWF_ORW) | TWF_CLR(optional)
-@end example
-
-If @code{TWF_ORW} is specified, the issuing task will wait for any of the
-bits specified by @code{waiptn} to be set for the eventflag given by
-@code{flgid} (OR wait). If @code{TWF_ANDW} is specified, the issuing task
-will wait for all of the bits specified by @code{waiptn} to be set for the
-eventflag given by @code{flgid} (AND wait).
-
-If the @code{TWF_CLR} specification is not present, the eventflag value
-will remain unchanged even after the wait conditions have been satisfied
-and the task has been released from the WAIT state. If @code{TWF_CLR} is
-specified, all bits of the eventflag will be cleared to 0 once the wait
-conditions of the waiting task have been satisfied.
-
-The return parameter @code{flgptn} returns the value of the eventflag after the
-wait state of a task has been released due to this system call. If
-@code{TWF_CLR} was specified, the value before eventflag bits were cleared
-is returned. The value returned by @code{flgptn} fulfills the wait
-release conditions of this system call.
-
-An @code{E_PAR} parameter error will result if @code{waiptn} is 0.
-
-A task can not execute any of @code{wai_flg, twai_flg} or @code{pol_flg}
-on an eventflag having the @code{TA_WSGL} attribute if another task is
-already waiting for that eventflag. An @code{E_OBJ} error will be
-returned to a task which executes @code{wai_flg} at a later time
-regardless as to whether or not the task that executes @code{wai_flg} or
-@code{twai_flg} later will be placed in a WAIT state (conditions for
-releasing wait state be satisfied). An @code{E_OBJ} error will be
-returned even to tasks which just execute @code{pol_flg}, again regardless
-as to whether or not wait release conditions for that task were satisfied.
-
-On the other hand, multiple tasks can wait at the same time for the same
-eventflag if that eventflag has the @code{TA_WMUL} attribute. This means
-that event flags can make queues for tasks to wait on. When such
-eventflags are used, a single @code{set_flg} call may release multiple
-waiting tasks.
-
-The following processing takes place if a queue for allowing multiple
-tasks to wait has been created for an eventflag with the @code{TA_WMUL}
-attribute.
-
-@itemize @bullet
-
-@item The waiting order on the queue is FIFO. (However, depending on
-@code{waiptn} and @code{wfmode}, task at the head of the queue will not
-always be released from waiting.)
-
-@item If a task specifying that the eventflag be cleared is on the queue,
-the flag is cleared when that task is released from waiting.
-
-@item Since any tasks behind a task which clears the eventflag (by
-specifying @code{TWF_CLR}) will check the eventflag after it is cleared,
-they will not be released from waiting.
-
-@end itemize
-
-If multiple tasks having the same priority are released from waiting
-simultaneously due to @code{set_flg}, the order of tasks on the ready
-queue after release will be the same as their original order on the
-eventflag queue.
-
-@subheading NOTES:
-
-Multiprocessing is not supported. Thus none of the "@code{EN_}" status
-codes will be returned.
-
-
-@c
-@c pol_flg
-@c
-
-@page
-@subsection pol_flg - Wait for Eventflag (Polling)
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER pol_flg(
- UINT *p_flgptn,
- ID flgid,
- UINT waiptn,
- UINT wfmode
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-
-@code{E_OK} - Normal Completion
-
-@code{E_ID} - Invalid ID number (flgid was invalid or could not be used)
-
-@code{E_NOEXS} - Object does not exist (the eventflag specified by flgid
-does not exist)
-
-@code{E_OACV} - Object access violation (A flgid less than -4 was
-specified from a user task. This is implementation dependent.)
-
-@code{E_PAR} - Parameter error (waiptn = 0, wfmode invalid, or tmout is -2
-or less)
-
-@code{E_OBJ} - Invalid object state (multiple tasks waiting for an
-eventflag with the TA_WSGL attribute)
-
-@code{E_DLT} - The object being waited for was deleted (the specified
-eventflag was deleted while waiting)
-
-@code{E_RLWAI} - WAIT state was forcibly released (rel_wai was received
-while waiting)
-
-@code{E_TMOUT} - Polling failure or timeout exceeded
-
-@code{E_CTX} - Context error (issued from task-independent portions or a
-task in dispatch disabled state)
-
-@code{EN_OBJNO} - An object number which could not be accessed on the
-target node is specified.
-
-@code{EN_PAR} - A value outside the range supported by the target node
-and/or transmission packet format was specified as a parameter (a value
-outside supported range was specified for waiptn and tmout)
-
-@code{EN_RPAR} - A value outside the range supported by the requesting
-node and/or transmission packet format was specified as a parameter (a
-value exceeding the range for the requesting node was specified for
-flgptn)
-
-@subheading DESCRIPTION:
-
-The @code{pol_flg} system call has the same function as @code{wai_flg}
-except for the waiting feature. @code{pol_flg} polls whether or not the
-task should wait if @code{wai_flg} is executed. The meanings of
-parameters to @code{pol_flg} are the same as for @code{wai_flg}. The
-specific operations by @code{pol_flg} are as follows.
-
-@itemize @bullet
-
-@item If the target eventflag already satisfies the conditions for
-releasing wait given by @code{wfmode}, processing is the same as
-@code{wai_flg}: the eventflag is cleared if @code{TWF_CLR} is specified
-and the system call completes normally.
-
-@item If the target eventflag does not yet satisfy the conditions for
-releasing wait given by @code{wfmode}, an @code{E_TMOUT} error is returned to
-indicate polling failed and the system call finishes. Unlike
-@code{wai_flg}, the issuing task does not wait in this case. The eventflag
-is not cleared in this case even if @code{TWF_CLR} has been specified.
-
-@end itemize
-
-@subheading NOTES:
-
-Multiprocessing is not supported. Thus none of the "@code{EN_}" status
-codes will be returned.
-
-
-@c
-@c twai_flg
-@c
-
-@page
-@subsection twai_flg - Wait on Eventflag with Timeout
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER twai_flg(
- UINT *p_flgptn,
- ID flgid,
- UINT waiptn,
- UINT wfmode,
- TMO tmout
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-
-@code{E_OK} - Normal Completion
-
-@code{E_ID} - Invalid ID number (flgid was invalid or could not be used)
-
-@code{E_NOEXS} - Object does not exist (the eventflag specified by flgid
-does not exist)
-
-@code{E_OACV} - Object access violation (A flgid less than -4 was
-specified from a user task. This is implementation dependent.)
-
-@code{E_PAR} - Parameter error (waiptn = 0, wfmode invalid, or tmout is -2
-or less)
-
-@code{E_OBJ} - Invalid object state (multiple tasks waiting for an
-eventflag with the TA_WSGL attribute)
-
-@code{E_DLT} - The object being waited for was deleted (the specified
-eventflag was deleted while waiting)
-
-@code{E_RLWAI} - WAIT state was forcibly released (rel_wai was received
-while waiting)
-
-@code{E_TMOUT} - Polling failure or timeout exceeded
-
-@code{E_CTX} - Context error (issued from task-independent portions or a
-task in dispatch disabled state)
-
-@code{EN_OBJNO} - An object number which could not be accessed on the
-target node is specified.
-
-@code{EN_PAR} - A value outside the range supported by the target node
-and/or transmission packet format was specified as a parameter (a value
-outside supported range was specified for waiptn and tmout)
-
-@code{EN_RPAR} - A value outside the range supported by the requesting
-node and/or transmission packet format was specified as a parameter (a
-value exceeding the range for the requesting node was specified for
-flgptn)
-
-@subheading DESCRIPTION:
-
-The @code{twai_flg} system call has the same function as @code{wai_flg}
-with an additional timeout feature. A maximum wait time (timeout value)
-can be specified using the parameter @code{tmout}. When a timeout is specified,
-a timeout error, @code{E_TMOUT}, will result and the system call will
-finish if the period specified by @code{tmout} elapses without conditions for
-releasing wait being satisfied.
-
-Specifying @code{TMO_POL = 0} to @code{twai_flg} for @code{tmout} indicates that
-a timeout value of 0 be used, resulting in exactly the same processing as
-@code{pol_flg}. Specifying @code{TMO_FEVR = -1} to @code{twai_flg} for
-@code{tmout} indicates that an infinite timeout value be used, resulting in
-exactly the same processing as @code{wai_flg}.
-
-@subheading NOTES:
-
-Multiprocessing is not supported. Thus none of the "@code{EN_}" status
-codes will be returned.
-
-
-@code{Pol_flg} and @code{wai_flg} represent the same processing as
-specifying certain values (@code{TMO_POL} or @code{TMO_FEVR}) to
-@code{twai_flg} for tmout. As such, only @code{twai_flg} is implemented
-in the kernel; @code{pol_flg} and @code{wai_flg} should be implemented as macros
-which call @code{twai_flg}.
-
-@c
-@c ref_flg
-@c
-
-@page
-@subsection ref_flg - Reference Eventflag Status
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER ref_flg(
- T_RFLG *pk_rflg,
- ID flgid );
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-
-@code{E_OK} - Normal Completion
-
-@code{E_ID} - Invalid ID number (flgid was invalid or could not be used)
-
-@code{E_NOEXS} - Object does not exist (the eventflag specified by flgid
-does not exist)
-
-@code{E_OACV} - Object access violation (A flgid less than -4 was
-specified from a user task. This is implementation dependent.)
-
-@code{E_PAR} - Parameter error (the packet address for the return
-parameters could not be used)
-
-@code{EN_OBJNO} - An object number which could not be accessed on the
-target node is specified.
-
-@code{EN_CTXID} - Specified an object on another node when the system call
-was issued from a task in dispatch disabled state or from a
-task-independent portion
-
-@code{EN_RPAR} - A value outside the range supported by the requesting
-node and/or transmission packet format was returned as a parameter (a
-value outside supported range was specified for exinf, wtsk and/or flgptn)
-
-@subheading DESCRIPTION:
-
-This system call refers to the state of the eventflag specified by
-@code{flgid}, and returns its current flag pattern (@code{flgptn}),
-waiting task information (@code{wtsk}), and its extended information
-(@code{exinf}).
-
-Depending on the implementation, @code{wtsk} may be returned as the ID
-(non-zero) of the task waiting for the eventflag. If there are multiple
-tasks waiting for the eventflag (only when attribute is @code{TA_WMUL}),
-the ID of the task at the head of the queue is returned.
-
-An @code{E_NOEXS} error will result if the eventflag specified to
-@code{ref_flg} does not exist.
-
-@subheading NOTES:
-
-Multiprocessing is not supported. Thus none of the "@code{EN_}" status
-codes will be returned.
-
-Although both @code{ref_flg} and @code{pol_flg} can be used to find an
-eventflag's pattern (@code{flgptn}) without causing the issuing task to
-wait, @code{ref_flg} simply reads the eventflag's pattern (@code{flgptn})
-while @code{pol_flg} functions is identical to @code{wai_flg} when wait
-release conditions are satisfied (it clears the eventflag if
-@code{TWF_CLR} is specified).
-
-Depending on the implementation, additional information besides
-@code{wtsk} and @code{flgptn} (such as eventflag attributes,
-@code{flgatr}) may also be referred.
diff --git a/doc/itron3.0/fixedblock.t b/doc/itron3.0/fixedblock.t
deleted file mode 100644
index aeea19d40b..0000000000
--- a/doc/itron3.0/fixedblock.t
+++ /dev/null
@@ -1,389 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c This is the chapter from the RTEMS ITRON User's Guide that
-@c documents the services provided by the fixed block
-@c manager.
-@c
-@c $Id$
-@c
-
-@chapter Fixed Block Manager
-
-@section Introduction
-
-The fixed block manager provides functions for creating, deleting, getting, polling, getting with timeout, releasing, and referencing the fixed-sized memorypool. This manager is based on ITRON 3.0 standard.
-
-The services provided by the fixed block manager are:
-
-@itemize @bullet
-@item @code{cre_mpf} - Create Fixed-Size Memorypool
-@item @code{del_mpf} - Delete Fixed-Size Memorypool
-@item @code{get_blf} - Get Fixed-Size Memory Block
-@item @code{pget_blf} - Poll and Get Fixed-Size Memory Block
-@item @code{tget_blf} - Get Fixed-Size Memory Block with Timeout
-@item @code{rel_blf} - Release Fixed-Size Memory Block
-@item @code{ref_mpf} - Reference Fixed-Size Memorypool Status
-@end itemize
-
-@section Background
-
-@section Operations
-
-@section System Calls
-
-This section details the fixed block manager's services.
-A subsection is dedicated to each of this manager's services
-and describes the calling sequence, related constants, usage,
-and status codes.
-
-
-@c
-@c cre_mpf
-@c
-
-@page
-@subsection cre_mpf - Create Fixed-Size Memorypool
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER cre_mpf(
- ID mpfid,
- T_CMPF *pk_cmpf
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_NOMEM} - Insufficient memory (Memory for control block and/or for
-memorypool cannot be allocated)
-
-@code{E_ID} - Invalid ID number (mpfid was invalid or could not be used)
-
-@code{E_RSATR} - Reserved attribute (mpfatr was invalid or could not be used)
-
-@code{E_OBJ} - Invalid object state (a memorypool of the same ID already exists)
-
-@code{E_OACV} - Object access violation (A mpfid less than -4 was specified from
-a user task. This is implementation dependent.)
-
-@code{E_PAR} - Parameter error (pk_cmpf is invalid or mpfsz and/or blfsz is
-negative or invalid)
-
-@subheading DESCRIPTION:
-
-This system call creates a fixed-size memorypool having the ID number specified by mpfid. Specifically, a memory area of a size based on values of mpfcnt and blfsz is reserved for use as a memorypool. A control block for the memorypool being created is also allocated. The get_blf system call specifying the memorypool created by this call can be issued to allocate memory blocks of the size given by blfsz (in bytes).
-
-@subheading NOTES:
-
-The memory area required for creating memorypools and for allocating control blocks for each object is allocated while system initialization. Associated parameters are therefore specified at system configuration.
-
-@c
-@c del_mpf
-@c
-
-@page
-@subsection del_mpf - Delete Fixed-Size Memorypool
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER del_mpf(
- ID mpfid
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_ID} - Invalid ID number (mpfid was invalid or could not be used)
-
-@code{E_NOEXS} - Object does not exist (the memorypool specified by mpfid does not exist)
-
-@code{E_OACV} - Object access violation (A mpfid less than -4 was specified from a user task. This is implementation dependent.)
-
-@subheading DESCRIPTION:
-
-This system call deletes the fixed-size memorypool specified by mpfid. No check or error report is performed even if there are tasks using memory from the memorypool to be deleted. This system call completes normally even if some of the memory blocks are not returned. Issuing this system call causes memory used for the control block of the associated memorypool and the memory area making up the memorypool itself to be released. After this system call is invoked, another memorypool having the same ID number can be created. This system call will complete normally even if there are tasks waiting to get memory blocks from the memorypool. In that case, an E_DLT error will be returned to each waiting task.
-
-@subheading NOTES:
-
-When a memorypool being waited for by more than one tasks is deleted, the order of tasks on the ready queue after the WAIT state is cleared is implementation dependent in the case of tasks having the same priority.
-
-
-@c
-@c get_blf
-@c
-
-@page
-@subsection get_blf - Get Fixed-Size Memory Block
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER get_blf(
- VP *p_blf,
- ID mpfid
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_ID} - Invalid ID number (mpfid was invalid or could not be used)
-
-@code{E_NOEXS} - Object does not exist (the memorypool specified by mpfid does not exist)
-
-@code{E_OACV} - Object access violation (A mpfid less than -4 was specified from
-a user task. This is implementation dependent.)
-
-@code{E_PAR} - Parameter error (tmout is -2 or less)
-
-@code{E_DLT} - The object being waited for was deleted (the specified memorypool
-was deleted while waiting)
-
-@code{E_RLWAI} - WAIT state was forcibly released (rel_wai was received while
-waiting)
-
-@code{E_TMOUT} - Polling failure or timeout exceeded
-
-@code{E_CTX} - Context error (issued from task-independent portions or a
-task in dispatch disabled state; implementation dependent for pget_blf and tget_blf(tmout=TMO_POL))
-
-@subheading DESCRIPTION:
-
-A memory block is allocated from the fixed-size memorypool specified by mpfid. The start address of the memory block allocated is returned to blf. The size of the memory block allocated is specified by the blfsz parameter when the fixed-size memorypool was created. The allocated memory block is not cleared to zero. The contents of the allocated memory block are undefined. If the memory block cannot be obtained from the specified memorypool when get_blf is issued, the task issuing get_blf will be placed on the memory allocation queue of the specified memorypool, and wait until it can get the memory it requires. If the object being waited for is deleted (the specified memorypool is deleted while waiting), an E_DLT error will be returned.
-
-@subheading NOTES:
-
-NONE
-
-
-@c
-@c pget_blf
-@c
-
-@page
-@subsection pget_blf - Poll and Get Fixed-Size Memory Block
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER ercd =pget_blf(
- VP *p_blf,
- ID mpfid
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_ID} - Invalid ID number (mpfid was invalid or could not be used)
-
-@code{E_NOEXS} - Object does not exist (the memorypool specified by mpfid does not exist)
-
-@code{E_OACV} - Object access violation (A mpfid less than -4 was specified from
-a user task. This is implementation dependent.)
-
-@code{E_PAR} - Parameter error (tmout is -2 or less)
-
-@code{E_DLT} - The object being waited for was deleted (the specified memorypool
-was deleted while waiting)
-
-@code{E_RLWAI} - WAIT state was forcibly released (rel_wai was received while
-waiting)
-
-@code{E_TMOUT} - Polling failure or timeout exceeded
-
-@code{E_CTX} - Context error (issued from task-independent portions or a
-task in dispatch disabled state; implementation dependent for pget_blf and tget_blf(tmout=TMO_POL))
-
-@subheading DESCRIPTION:
-
-The pget_blf system call has the same function as get_blf except for the waiting feature. Pget_blf polls whether or not the task should wait if get_blf is executed. The meaning of parameters to pget_blf are the same with get_blf. The specific operations by pget_blf are as follows.
-
- - If there is a free memory block available, processing is the same as
- get_blf: that is, the requested memory is allocated and the system call
- completes normally.
-
- - If there is no free memory block, an E_TMOUT error is returned to
- indicate polling failed and the system call finishes. Unlike get_blf,
- the issuing task does not wait in this case. Also, the issuing task
- does not get any memory.
-
-@subheading NOTES:
-
-NONE
-
-
-@c
-@c tget_blf
-@c
-
-@page
-@subsection tget_blf - Get Fixed-Size Memory Block with Timeout
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER ercd =tget_blf(
- VP *p_blf,
- ID mpfid,
- TMO tmout
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_ID} - Invalid ID number (mpfid was invalid or could not be used)
-
-@code{E_NOEXS} - Object does not exist (the memorypool specified by mpfid does not exist)
-
-@code{E_OACV} - Object access violation (A mpfid less than -4 was specified from
-a user task. This is implementation dependent.)
-
-@code{E_PAR} - Parameter error (tmout is -2 or less)
-
-@code{E_DLT} - The object being waited for was deleted (the specified memorypool
-was deleted while waiting)
-
-@code{E_RLWAI} - WAIT state was forcibly released (rel_wai was received while
-waiting)
-
-@code{E_TMOUT} - Polling failure or timeout exceeded
-
-@code{E_CTX} - Context error (issued from task-independent portions or a
-task in dispatch disabled state; implementation dependent for pget_blf and tget_blf(tmout=TMO_POL))
-
-@subheading DESCRIPTION:
-
-The tget_blf system call has the same function as get_blf with an additional timeout feature. A maximum wait time (timeout value) can be specified using the parameter tmout. When a timeout is specified, a timeout error, E_TMOUT, will result and the system call will finish if the period specified by tmout elapses without conditions for releasing wait being satisfied (i.e. without free memory becoming available).
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c rel_blf
-@c
-
-@page
-@subsection rel_blf - Release Fixed-Size Memory Block
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER rel_blf(
- ID mpfid,
- VP blf
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_ID} - Invalid ID number (mpfid was invalid or could not be used)
-
-@code{E_NOEXS} - Object does not exist (the memorypool specified by mpfid does not exist)
-
-@code{E_OACV} - Object access violation (A mpfid less than -4 was specified from
-a user task. This is implementation dependent.)
-
-@code{E_PAR} - Parameter error (blf is invalid or an attempt was made to return
-the memory block to the wrong memorypool)
-
-@subheading DESCRIPTION:
-
-This system call releases the memory block specified by blf and returns it to the fixed-size memorypool specified by mpfid. Executing rel_blf allows memory to be allocated to the next task waiting for memory allocation from the memorypool given by mpfid, thus releasing that task from its WAIT state.
-
-@subheading NOTES:
-
-The fixed-size memorypool to which the memory block is returned must be the same memorypool from which it was originally allocated. An E_PAR error will result if an attempt is made to return a memory block to another memorypool than that from which it was originally allocated.
-
-@c
-@c ref_mpf
-@c
-
-@page
-@subsection ref_mpf - Reference Fixed-Size Memorypool Status
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER ref_mpf(
- T_RMPF *pk_rmpf,
- ID mpfid
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_ID} - Invalid ID number (mpfid was invalid or could not be used)
-
-@code{E_NOEXS} - Object does not exist \(the memorypool specified by mpfid does
-not exist.)
-
-@code{E_OACV} - Object access violation (A mpfid less than -4 was specified from
-a user task. This is implementation dependent.)
-
-@code{E_PAR} - Parameter error (the packet address for the return parameters
-could not be used)
-
-@subheading DESCRIPTION:
-
-This system call refers to the state of the fixed-size memorypool specified by mpfid, and returns the current number of free blocks (frbcnt), information of a task waiting to be allocated memory (wtsk), and its extended information (exinf). Wtsk indicates whether or not there is a task waiting to be allocated memory from the fixed-size memorypool specified. If there is no waiting task, wtsk is returned as FALSE = 0. If there is a waiting task, wtsk is returned as a value other than 0.
-
-@subheading NOTES:
-
-While the frsz return parameter of ref_mpl returns the total size of free memory, the frbcnt return parameter of ref_mpf returns the number of free blocks.
-
-Depending on the implementation, additional information besides wtsk and frbcnt (such as memorypool attributes, mpfatr) may also be referred.
-
diff --git a/doc/itron3.0/gen_all b/doc/itron3.0/gen_all
deleted file mode 100644
index 6e4e66893f..0000000000
--- a/doc/itron3.0/gen_all
+++ /dev/null
@@ -1,4 +0,0 @@
-for i in config eventflags fixedblock interrupt mailbox memorypool msgbuffer network rendezvous task tasksync time
-do
- sh ./gen_section $i | tr -d "\r" >${i}.t
-done
diff --git a/doc/itron3.0/gen_section b/doc/itron3.0/gen_section
deleted file mode 100644
index cdc1c80f2c..0000000000
--- a/doc/itron3.0/gen_section
+++ /dev/null
@@ -1,191 +0,0 @@
-#
-# This shell script generates the starting template for a manager chapter.
-#
-
-
-# Set this based on which chapter you want to generate a template for.
-chapter=$1
-
-case ${chapter} in
- task)
- CHAPTER_CAPS="Task"
- CHAPTER_LOWER="task"
- ROUTINES=" cre_tsk del_tsk sta_tsk ext_tsk exd_tsk ter_tsk \
- dis_dsp ena_dsp chg_pri rot_rdq rel_wai get_tid ref_tsk"
- ;;
-
- tasksync)
- CHAPTER_CAPS="Task-Dependent Synchronization"
- CHAPTER_LOWER="task-dependent synchronization"
- ROUTINES=" sus_tsk rsm_tsk frsm_tsk \
- slp_tsk tslp_tsk wup_tsk can_wup"
- ;;
-
- semaphore)
- CHAPTER_CAPS="Semaphore"
- CHAPTER_LOWER="semaphore"
- ROUTINES="cre_sem del_sem sig_sem wai_sem preq_sem twai_sem ref_sem "
- ;;
-
- eventflags)
- CHAPTER_CAPS="Eventflags"
- CHAPTER_LOWER="eventflags"
- ROUTINES=" cre_flg del_flg set_flg clr_flg wai_flg pol_flg \
- twai_flg ref_flg "
- ;;
-
- mailbox)
- CHAPTER_CAPS="Mailbox"
- CHAPTER_LOWER="mailbox"
- ROUTINES="cre_mbx del_mbx snd_msg rcv_msg prcv_msg trcv_msg ref_mbx"
- ;;
-
- msgbuffer)
- CHAPTER_CAPS="Message Buffer"
- CHAPTER_LOWER="message buffer"
- ROUTINES=" cre_mbf del_mbf snd_mbf psnd_mbf tsnd_mbf rcv_mbf prcv_mbf \
- trcv_mbf ref_mbf "
- ;;
-
- rendezvous)
- CHAPTER_CAPS="Rendezvous"
- CHAPTER_LOWER="rendezvous"
- ROUTINES=" cre_por del_por cal_por pcal_por tcal_por acp_por pacp_por \
- tacp_por fwd_por rpl_rdv ref_por"
- ;;
-
- interrupt)
- CHAPTER_CAPS="Interrupt"
- CHAPTER_LOWER="interrupt"
- ROUTINES=" def_int ret_int ret_wup loc_cpu unl_cpu dis_int ena_int
- chg_iXX ref_iXX"
- ;;
-
- memorypool)
- CHAPTER_CAPS="Memory Pool"
- CHAPTER_LOWER="memory pool"
- ROUTINES=" cre_mpl del_mpl get_blk pget_blk tget_blk rel_blk ref_mpl"
- ;;
-
- fixedblock)
- CHAPTER_CAPS="Fixed Block"
- CHAPTER_LOWER="fixed block"
- ROUTINES=" cre_mpf del_mpf get_blf pget_blf tget_blf rel_blf ref_mpf"
- ;;
-
-
- time)
- CHAPTER_CAPS="Time"
- CHAPTER_LOWER="time"
- ROUTINES=" get_tim set_tim dly_tsk \
- def_cyc act_cyc ref_cyc \
- def_alm ref_alm ret_tmr"
- ;;
-
- config)
- CHAPTER_CAPS="System"
- CHAPTER_LOWER="system"
- ROUTINES=" get_ver ref_sys ref_cfg def_svc def_exc"
- ;;
-
- network)
- CHAPTER_CAPS="Network Support"
- CHAPTER_LOWER="network support"
- ROUTINES=" nrea_dat nwri_dat nget_nod nget_ver"
- ;;
- psxtimer)
- CHAPTER_CAPS="Timer"
- CHAPTER_LOWER="timer"
- ROUTINES="timer_create timer_delete timer_settime timer_gettime timer_getoverrun"
- ;;
- *)
- echo "Unknown chapter name"
- exit 1
- ;;
-esac
-
-if [ "x${CHAPTER_CAPS}" = "x" -o "x${CHAPTER_LOWER}" = "x" \
- -o "x${ROUTINES}" = "x" ] ; then
- echo "initialization problem"
- exit 1
-fi
-
-echo "@c"
-echo "@c This is the chapter from the RTEMS ITRON User's Guide that"
-echo "@c documents the services provided by the ${CHAPTER_LOWER}"
-echo "@c manager."
-echo "@c"
-echo "@c \$Id\$"
-echo "@c"
-echo ""
-echo "@chapter ${CHAPTER_CAPS}" Manager
-echo ""
-echo "@section Introduction"
-echo ""
-echo "The "
-echo "${CHAPTER_LOWER} manager is ..."
-echo ""
-echo "The services provided by the ${CHAPTER_LOWER} manager are:"
-echo ""
-echo "@itemize @bullet"
-
-for routine in ${ROUTINES}
-do
- description=`grep " ${routine} " ../../itron_spec/itron3-1.txt | grep "]" | cut -d']' -f2 `
- description=`echo ${description}`
- echo "@item @code{${routine}} - ${description}"
-done
-echo "@end itemize"
-
-echo ""
-echo "@section Background"
-echo ""
-echo "@section Operations"
-echo ""
-echo "@section System Calls"
-echo ""
-echo "This section details the ${CHAPTER_LOWER} manager's services."
-echo "A subsection is dedicated to each of this manager's services"
-echo "and describes the calling sequence, related constants, usage,"
-echo "and status codes."
-echo ""
-
-for routine in ${ROUTINES}
-do
- description=`grep ${routine} ../../itron_spec/itron3-1.txt | grep "]" | cut -d']' -f2`
- description=`echo -n ${description}`
- echo ""
- echo "@c"
- echo "@c ${routine}"
- echo "@c"
- echo ""
- echo "@page"
- echo "@subsection ${routine} - " ${description}
- echo ""
- echo "@subheading CALLING SEQUENCE:"
- echo ""
- echo "@ifset is-C"
- echo "@example"
- proto=`grep "${routine} (" ../../itron_spec/itron3-6.txt | sed -e 's/ercd = //'` # | sed -e 's/ \\(/(/'`
-
- echo `echo -n ${proto} | cut -d'(' -f1`"("
- echo ${proto} | cut -d'(' -f2 | sed -e 's/ .;//'
- echo ");"
- # echo "int ${routine}("
- # echo ");"
- echo "@end example"
- echo "@end ifset"
- echo ""
- echo "@ifset is-Ada"
- echo "@end ifset"
- echo ""
- echo "@subheading STATUS CODES:"
- echo ""
- echo "@code{EXXX} - "
- echo ""
- echo "@subheading DESCRIPTION:"
- echo ""
- echo "@subheading NOTES:"
- echo ""
-done
-
diff --git a/doc/itron3.0/gen_status_shell b/doc/itron3.0/gen_status_shell
deleted file mode 100644
index 1f3f8e4c47..0000000000
--- a/doc/itron3.0/gen_status_shell
+++ /dev/null
@@ -1,230 +0,0 @@
-#
-# This shell script generates the starting template for a manager chapter.
-#
-
-FILES="task tasksync semaphore eventflags mailbox msgbuffer rendezvous interrupt memorypool fixedblock time config network"
-
-
-cat <<EOF
-@c
-@c This is the chapter from the RTEMS ITRON User's Guide that
-@c documents the services provided by the task
-@c manager.
-@c
-@c $Id$
-@c
-
-@chapter ITRON Implementation Status
-
-@section Introduction
-
-This chapter describes the status of the implementation of each
-manager in the RTEMS implementataion of the uITRON 3.0 API. The
-status of each manager is presented in terms of documentation and
-status relative to the extended level (level 'E') of the uITRON 3.0
-API specification. The extended level of the specification is
-the level at which dynamic object creation, deletion, and
-reference services are available. This level is more akin to the other
-APIs supported by RTEMS. This purpose of this chapter is
-to make it clear what is required to bring the RTEMS
-uITRON API implementation into compliance with the
-specification. The following description of the specification
-levels is taken from the uITRON 3.0 API specification.
-
-
-uITRON 3.0 specification is divided into fewer system call levels than was the
-previous uITRON 2.0 specification. There are now just three levels: Level R
-(Required), Level S (Standard) and Level E (Extended). In addition to these
-three levels, there is also Level C for CPU-dependent system calls.
-In addition, the uITRON 3.0 API, defines the network level ('N') which
-represents system calls that support the connection function
-
-@itemize @bullet
-@item [level R] (Required)
-The functions in this level are mandatory for all implementations of
-uITRON 3.0 specification. This includes basic functions for achieving
-a real-time, multitasking OS. These functions can be implemented even
-without a hardware timer. This level corresponds to Levels 1 and 2
-of uITRON 2.0 specification.
-
-@item [level S] (Standard)
-This includes basic functions for achieving a real-time, multitasking
-OS. This level corresponds to Levels 3 and 4 of uITRON 2.0
-specification.
-
-@item [level E] (Extended)
-This includes additional and extended functions. This corresponds to
-functions not included in uITRON 2.0 specification (functions of
-ITRON2 specification). Specifically, this level includes object
-creation and deletion functions, rendezvous functions, memorypools
-and the timer handler.
-
-@item [level C] (CPU dependent)
-This level provides implementation-dependent functions required due to
-the CPU or hardware configuration.
-
-@end itemize
-
-The support level of the connection function is indicated by appending an 'N'
-to the end of the level. For example, connectivity supported at [level S]
-would be referred to as [level SN]. The support level for functions which
-can only send requests for operations on other nodes but offer no system call
-processing on the issuing node itself are indicated by the lower case letter
-'s' or 'e'.
-
-
-EOF
-
-
-for chapter in $FILES
-do
- case ${chapter} in
- task)
- CHAPTER_CAPS="Task"
- CHAPTER_LOWER="task"
- ROUTINES=" cre_tsk del_tsk sta_tsk ext_tsk exd_tsk ter_tsk \
- dis_dsp ena_dsp chg_pri rot_rdq rel_wai get_tid ref_tsk"
- ;;
-
- tasksync)
- CHAPTER_CAPS="Task-Dependent Synchronization"
- CHAPTER_LOWER="task-dependent synchronization"
- ROUTINES=" sus_tsk rsm_tsk frsm_tsk \
- slp_tsk tslp_tsk wup_tsk can_wup"
- ;;
-
- semaphore)
- CHAPTER_CAPS="Semaphore"
- CHAPTER_LOWER="semaphore"
- ROUTINES="cre_sem del_sem sig_sem wai_sem preq_sem twai_sem ref_sem "
- ;;
-
- eventflags)
- CHAPTER_CAPS="Eventflags"
- CHAPTER_LOWER="eventflags"
- ROUTINES=" cre_flg del_flg set_flg clr_flg wai_flg pol_flg \
- twai_flg ref_flg "
- ;;
-
- mailbox)
- CHAPTER_CAPS="Mailbox"
- CHAPTER_LOWER="mailbox"
- ROUTINES="cre_mbx del_mbx snd_msg rcv_msg prcv_msg trcv_msg ref_mbx"
- ;;
-
- msgbuffer)
- CHAPTER_CAPS="Message Buffer"
- CHAPTER_LOWER="message buffer"
- ROUTINES=" cre_mbf del_mbf snd_mbf psnd_mbf tsnd_mbf rcv_mbf prcv_mbf \
- trcv_mbf ref_mbf "
- ;;
-
- rendezvous)
- CHAPTER_CAPS="Rendezvous"
- CHAPTER_LOWER="rendezvous"
- ROUTINES=" cre_por del_por cal_por pcal_por tcal_por acp_por pacp_por \
- tacp_por fwd_por rpl_rdv ref_por"
- ;;
-
- interrupt)
- CHAPTER_CAPS="Interrupt"
- CHAPTER_LOWER="interrupt"
- ROUTINES=" def_int ret_int ret_wup loc_cpu unl_cpu dis_int ena_int
- chg_iXX ref_iXX"
- ;;
-
- memorypool)
- CHAPTER_CAPS="Memory Pool"
- CHAPTER_LOWER="memory pool"
- ROUTINES=" cre_mpl del_mpl get_blk pget_blk tget_blk rel_blk ref_mpl"
- ;;
-
- fixedblock)
- CHAPTER_CAPS="Fixed Block"
- CHAPTER_LOWER="fixed block"
- ROUTINES=" cre_mpf del_mpf get_blf pget_blf tget_blf rel_blf ref_mpf"
- ;;
-
- time)
- CHAPTER_CAPS="Time"
- CHAPTER_LOWER="time"
- ROUTINES=" get_tim set_tim dly_tsk \
- def_cyc act_cyc ref_cyc \
- def_alm ref_alm ret_tmr"
- ;;
-
- config)
- CHAPTER_CAPS="System"
- CHAPTER_LOWER="system"
- ROUTINES=" get_ver ref_sys ref_cfg def_svc def_exc"
- ;;
-
- network)
- CHAPTER_CAPS="Network Support"
- CHAPTER_LOWER="network support"
- ROUTINES=" nrea_dat nwri_dat nget_nod nget_ver"
- ;;
-
- *)
- echo "Unknown chapter name"
- exit 1
- ;;
- esac
-
- echo "@c"
- echo "@c ${CHAPTER_CAPS}"
- echo "@c"
- echo
- echo "@section ${CHAPTER_CAPS} Status"
-cat <<EOF
-
-@itemize @bullet
-
-@item Implementation
-@itemize @bullet
-EOF
-
- for routine in ${ROUTINES}
- do
- echo "@item ${routine} - Stub, Needs to be Fleshed Out"
- done
-cat <<EOF
-@end itemize
-
-@item Executive Modifications
-@itemize @bullet
-@item None Expected
-@end itemize
-
-@item Testing
-@itemize @bullet
-@item No Tests Written
-@end itemize
-
-@item Documentation
-@itemize @bullet
-@item Shell, Needs to be Fleshed Out
-@end itemize
-
-@item ITRON 3.0 API Conformance
-@itemize @bullet
-@item Level E - Extended Functionality
-@itemize @bullet
-@item
-@end itemize
-
-@item Level C - CPU Dependent Functionality
-@itemize @bullet
-@item NA
-@end itemize
-
-@item Level N - Connection Functionality
-@itemize @bullet
-@item Not implemented
-@end itemize
-@end itemize
-
-@end itemize
-
-EOF
-done
diff --git a/doc/itron3.0/interrupt.t b/doc/itron3.0/interrupt.t
deleted file mode 100644
index af3ad2f493..0000000000
--- a/doc/itron3.0/interrupt.t
+++ /dev/null
@@ -1,306 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c This is the chapter from the RTEMS ITRON User's Guide that
-@c documents the services provided by the interrupt
-@c manager.
-@c
-@c $Id$
-@c
-
-@chapter Interrupt Manager
-
-@section Introduction
-
-The
-interrupt manager is ...
-
-The services provided by the interrupt manager are:
-
-@itemize @bullet
-@item @code{def_int} - Define Interrupt Handler
-@item @code{ret_int} - Return from Interrupt Handler
-@item @code{ret_wup} - Return and Wakeup Task
-@item @code{loc_cpu} - Lock CPU
-@item @code{unl_cpu} - Unlock CPU
-@item @code{dis_int} - Disable Interrupt
-@item @code{ena_int} - Enable Interrupt
-@item @code{chg_iXX} - Change Interrupt Mask(Level or Priority)
-@item @code{ref_iXX} - Reference Interrupt Mask(Level or Priority)
-@end itemize
-
-@section Background
-
-@section Operations
-
-@section System Calls
-
-This section details the interrupt manager's services.
-A subsection is dedicated to each of this manager's services
-and describes the calling sequence, related constants, usage,
-and status codes.
-
-
-@c
-@c def_int
-@c
-
-@page
-@subsection def_int - Define Interrupt Handler
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER def_int(
- UINT dintno,
- T_DINT *pk_dint
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{EXXX} -
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-
-@c
-@c ret_int
-@c
-
-@page
-@subsection ret_int - Return from Interrupt Handler
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-void ret_int(
-
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{EXXX} -
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-
-@c
-@c ret_wup
-@c
-
-@page
-@subsection ret_wup - Return and Wakeup Task
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-void ret_wup(
- ID tskid
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{EXXX} -
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-
-@c
-@c loc_cpu
-@c
-
-@page
-@subsection loc_cpu - Lock CPU
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER loc_cpu(
-
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{EXXX} -
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-
-@c
-@c unl_cpu
-@c
-
-@page
-@subsection unl_cpu - Unlock CPU
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER unl_cpu(
-
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{EXXX} -
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-
-@c
-@c dis_int
-@c
-
-@page
-@subsection dis_int - Disable Interrupt
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER dis_int(
- UINT eintno
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{EXXX} -
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-
-@c
-@c ena_int
-@c
-
-@page
-@subsection ena_int - Enable Interrupt
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER ena_int(
- UINT eintno
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{EXXX} -
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-
-@c
-@c chg_iXX
-@c
-
-@page
-@subsection chg_iXX - Change Interrupt Mask(Level or Priority)
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER chg_iXX(
- UINT iXXXX
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{EXXX} -
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-
-@c
-@c ref_iXX
-@c
-
-@page
-@subsection ref_iXX - Reference Interrupt Mask(Level or Priority)
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER ref_iXX(
- UINT *p_iXXXX
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{EXXX} -
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
diff --git a/doc/itron3.0/itron.texi b/doc/itron3.0/itron.texi
deleted file mode 100644
index d4d681ed66..0000000000
--- a/doc/itron3.0/itron.texi
+++ /dev/null
@@ -1,149 +0,0 @@
-\input texinfo @c -*-texinfo-*-
-@c %**start of header
-@setfilename itron
-@syncodeindex vr fn
-@synindex ky cp
-@paragraphindent 0
-@c @smallbook
-@c %**end of header
-
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@c
-@c Master file for the RTEMS ITRON 3.0 API User's Guide
-@c
-
-@c Joel's Questions
-@c
-@c 1. Why does paragraphindent only impact makeinfo?
-@c 2. Why does paragraphindent show up in HTML?
-@c
-
-@include ../common/setup.texi
-
-@ignore
-@ifinfo
-@format
-START-INFO-DIR-ENTRY
-* RTEMS ITRON 3.0 API User's Guide: (itron). ITRON Guide
-END-INFO-DIR-ENTRY
-@end format
-@end ifinfo
-@end ignore
-
-@c variable substitution info:
-@c
-@c Note: At the moment there is not an Ada interface to ITRON.
-@set is-C
-@clear is-Ada
-@set LANGUAGE C
-@set STRUCTURE structure
-@set ROUTINE function
-@set OR |
-@set RPREFIX RTEMS_
-@set DIRPREFIX rtems_
-@c the language is @value{LANGUAGE}
-@c NOTE: don't use underscore in the name
-@c
-
-@c
-@c Title Page Stuff
-@c
-
-@set edition @value{RTEMS-EDITION}
-@set version @value{RTEMS-VERSION}
-@c @set update-date @value{RTEMS-UPDATE-DATE}
-@c @set update-month @value{RTEMS-UPDATE-MONTH}
-@set update-date 17 May 1999
-@set update-month May 1999
-
-@c
-@c I don't really like having a short title page. --joel
-@c
-@c @shorttitlepage RTEMS ITRON 3.0 API User's Guide
-
-@setchapternewpage odd
-@settitle RTEMS ITRON 3.0 API User's Guide
-@titlepage
-@finalout
-
-@title RTEMS ITRON 3.0 User's Guide
-@subtitle Edition @value{edition}, for RTEMS @value{version}
-@sp 1
-@subtitle @value{update-month}
-@author On-Line Applications Research Corporation
-@page
-@end titlepage
-
-@c This prevents a black box from being printed on "overflow" lines.
-@c The alternative is to rework a sentence to avoid this problem.
-
-@include preface.texi
-@include task.texi
-@include tasksync.texi
-@include semaphore.texi
-@include eventflags.texi
-@include mailbox.texi
-@include msgbuffer.texi
-@include rendezvous.texi
-@include interrupt.texi
-@include memorypool.texi
-@include fixedblock.texi
-@include time.texi
-@include config.texi
-@include network.texi
-@include status.texi
-@ifinfo
-@node Top, , (dir), (dir)
-@top itron
-
-This is the online version of the RTEMS ITRON 3.0 API User's Guide.
-
-@menu
-* Preface::
-* Task Manager::
-* Task-Dependent Synchronization Manager::
-* Semaphore Manager::
-* Eventflags Manager::
-* Mailbox Manager::
-* Message Buffer Manager::
-* Rendezvous Manager::
-* Interrupt Manager::
-* Memory Pool Manager::
-* Fixed Block Manager::
-* Time Manager::
-* System Manager::
-* Network Support Manager::
-* ITRON Implementation Status::
-* Command and Variable Index::
-* Concept Index::
-@end menu
-
-@end ifinfo
-@c
-@c
-@c Need to copy the emacs stuff and "trailer stuff" (index, toc) into here
-@c
-
-@node Command and Variable Index, Concept Index, , Top
-@unnumbered Command and Variable Index
-
-There are currently no Command and Variable Index entries.
-
-@c @printindex fn
-
-@node Concept Index, , Command and Variable Index, Top
-@unnumbered Concept Index
-
-There are currently no Concept Index entries.
-@c @printindex cp
-
-@contents
-@bye
-
diff --git a/doc/itron3.0/mailbox.t b/doc/itron3.0/mailbox.t
deleted file mode 100644
index 0f9f63db3a..0000000000
--- a/doc/itron3.0/mailbox.t
+++ /dev/null
@@ -1,338 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c This is the chapter from the RTEMS ITRON User's Guide that
-@c documents the services provided by the mailbox
-@c manager.
-@c
-@c $Id$
-@c
-
-
-@chapter Mailbox Manager
-
-@section Introduction
-
-The
-mailbox manager is basically a linked list, hidden by the super core message queue and consists of a control block, a private structure. The control block comprises of the create mailbox structure, the message structure and the reference mailbox structure.
-
-The services provided by the mailbox manager are:
-
-@itemize @bullet
-@item @code{cre_mbx} - Create Mailbox
-@item @code{del_mbx} - Delete Mailbox
-@item @code{snd_msg} - Send Message to Mailbox
-@item @code{rcv_msg} - Receive Message from Mailbox
-@item @code{prcv_msg} - Poll and Receive Message from Mailbox
-@item @code{trcv_msg} - Receive Message from Mailbox with Timeout
-@item @code{ref_mbx} - Reference Mailbox Status
-@end itemize
-
-
-@section Background
-
-@section Operations
-
-@section System Calls
-
-This section details the mailbox manager's services.
-A subsection is dedicated to each of this manager's services
-and describes the calling sequence, related constants, usage,
-and status codes.
-
-
-@c
-@c cre_mbx
-@c
-
-@page
-
-@subsection cre_mbx - Create Mailbox
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER cre_mbx(
- ID mbxid,
- T_CMBX *pk_cmbx
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal completion@*
-@code{E_NOMEM} - Insufficient memory@*
-@code{E_ID} - Invalid ID number@*
-@code{E_RSATR} - Reserved attribute@*
-@code{E_OBJ} - Invalid object state@*
-@code{E_OACV} - Object access violation@*
-@code{E_PAR} - Parameter error
-
-
-@subheading DESCRIPTION:
-
-Allocated a control area/buffer space for mailbox with some ID.
-
-@example
- User area: +ve ids
- System area: -ve ids
-@end example
-
-User may specify if its FIFO or priority level queue.
-Assumes shared memory b/w communicating processes.
-Initializes core message queue for this mbox.
-
-@subheading NOTES:
-
-NONE
-
-
-@c
-@c del_mbx
-@c
-
-@page
-
-@subsection del_mbx - Delete Mailbox
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER del_mbx(
- ID mbxid
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal completion@*
-@code{E_ID} - Invalid ID number@*
-@code{E_NOEXS} - Object does not exist@*
-@code{E_OACV} - Object access violation
-
-@subheading DESCRIPTION:
-
-Specified by the ID, cleans up all data structures and control blocks.
-
-@subheading NOTES:
-
-NONE
-
-
-@c
-@c snd_msg
-@c
-
-@page
-
-@subsection snd_msg - Send Message to Mailbox
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER snd_msg(
- ID mbxid,
- T_MSG *pk_msg
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal completion@*
-@code{E_ID} - Invalid ID number@*
-@code{E_NOEXS} - Object does not exist@*
-@code{E_OACV} - Object access violation@*
-@code{E_QOVR} - Queueing or nesting overflow
-
-@subheading DESCRIPTION:
-
-Sends the address of message to mbox having a given id, any waiting tasks (blocked tasks) will be woken up. It supports non-blocking send.
-
-@subheading NOTES:
-
-NONE
-
-
-@c
-@c rcv_msg
-@c
-
-@page
-
-@subsection rcv_msg - Receive Message from Mailbox
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER rcv_msg(
- T_MSG **ppk_msg,
- ID mbxid
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal completion@*
-@code{E_ID} - Invalid ID number@*
-@code{E_NOEXS} - Object does not exist@*
-@code{E_OACV} - Object access violation@*
-@code{E_PAR} - Parameter error@*
-@code{E_DLT} - The object being waited for was deleted@*
-@code{E_RLWAI} - WAIT state was forcibly released@*
-@code{E_CTX} - Context error
-
-@subheading DESCRIPTION:
-
-If there is no message then receiver blocks, if not empty then it takes the first message of the queue.
-
-@subheading NOTES:
-
-NONE
-
-
-@c
-@c prcv_msg
-@c
-
-@page
-
-@subsection prcv_msg - Poll and Receive Message from Mailbox
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER prcv_msg(
- T_MSG **ppk_msg,
- ID mbxid
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal completion@*
-@code{E_ID} - Invalid ID number@*
-@code{E_NOEXS} - Object does not exist@*
-@code{E_OACV} - Object access violation@*
-@code{E_PAR} - Parameter error@*
-@code{E_DLT} - The object being waited for was deleted@*
-@code{E_RLWAI} - WAIT state was forcibly released@*
-@code{E_CTX} - Context error@*
-
-@subheading DESCRIPTION:
-
-Poll and receive message from mailbox.
-
-@subheading NOTES:
-
-NONE
-
-
-@c
-@c trcv_msg
-@c
-
-@page
-
-@subsection trcv_msg - Receive Message from Mailbox with Timeout
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER trcv_msg(
- T_MSG **ppk_msg,
- ID mbxid,
- TMO tmout
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal completion@*
-@code{E_ID} - Invalid ID number@*
-@code{E_NOEXS} - Object does not exist@*
-@code{E_OACV} - Object access violation@*
-@code{E_PAR} - Parameter error@*
-@code{E_DLT} - The object being waited for was deleted@*
-@code{E_RLWAI} - WAIT state was forcibly released@*
-@code{E_CTX} - Context error
-
-@subheading DESCRIPTION:
-
-Blocking receive with a maximum timeout.
-
-@subheading NOTES:
-
-NONE
-
-
-@c
-@c ref_mbx
-@c
-
-@page
-
-@subsection ref_mbx - Reference Mailbox Status
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER ref_mbx(
- T_RMBX *pk_rmbx,
- ID mbxid
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal completion@*
-@code{E_ID} - Invalid ID number@*
-@code{E_NOEXS} - Object does not exist@*
-@code{E_OACV} - Object access violation@*
-@code{E_PAR} - Parameter error
-
-@subheading DESCRIPTION:
-
-Supports non-blocking receive. If there are no messages, it returns -1. Also returns id of the next process waiting on a message.
-
-@subheading NOTES:
-
-NONE
-
-
diff --git a/doc/itron3.0/memorypool.t b/doc/itron3.0/memorypool.t
deleted file mode 100644
index bd3e0de3cf..0000000000
--- a/doc/itron3.0/memorypool.t
+++ /dev/null
@@ -1,401 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c This is the chapter from the RTEMS ITRON User's Guide that
-@c documents the services provided by the memory pool
-@c manager.
-@c
-@c $Id$
-@c
-
-@chapter Memory Pool Manager
-
-@section Introduction
-
-The
-memory pool manager is ...
-
-The services provided by the memory pool manager are:
-
-@itemize @bullet
-@item @code{cre_mpl} - Create Variable-Size Memorypool
-@item @code{del_mpl} - Delete Variable-Size Memorypool
-@item @code{get_blk} - Get Variable-Size Memory Block
-@item @code{pget_blk} - Poll and Get Variable-Size Memory Block
-@item @code{tget_blk} - Get Variable-Size Memory Block with Timeout
-@item @code{rel_blk} - Release Variable-Size Memory Block
-@item @code{ref_mpl} - Reference Variable-Size Memorypool Status
-@end itemize
-
-@section Background
-
-Memorypool management functions manage memorypools and allocate memory blocks.
-There are two types of memorypool: fixed-size memorypools and variable-size
-memorypools. Both are considered separate objects and require different
-system calls for manipulation. While the size of memory blocks allocated
-from fixed-size memorypools are all fixed, blocks of any size may be
-specified when allocating memory blocks from variable-size memorypools.
-
-@section Operations
-
-@section System Calls
-
-This section details the memory pool manager's services.
-A subsection is dedicated to each of this manager's services
-and describes the calling sequence, related constants, usage,
-and status codes.
-
-
-@c
-@c cre_mpl
-@c
-
-@page
-@subsection cre_mpl - Create Variable-Size Memorypool
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER cre_mpl(
- ID mplid,
- T_CMPL *pk_cmpl
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_NOMEM} - Insufficient memory (Memory for control block and/or for
-memorypool cannot be allocated)
-
-@code{E_ID} - Invalid ID number (mplid was invalid or could not be used)
-
-@code{E_RSATR} - Reserved attribute (mplatr was invalid or could not be used)
-
-@code{E_OBJ} - Invalid object state (a memorypool of the same ID already exists)
-
-@code{E_OACV} - Object access violation (A mplid less than -4 was specified from
-a user task. This is implementation dependent.)
-
-@code{E_PAR} - Parameter error (pk_cmpl is invalid or mplsz is negative or
-invalid)
-
-@subheading DESCRIPTION:
-
-The cre_mpl directive creates a variable-size memorypool having the ID number specified by mplid. Specifically, a memory area of the size determined by mplsz is allocated for use as a memorypool. A control block for the memorypool being created is also allocated. User memorypools have positive ID numbers, while system memorypools have negative ID numbers. User tasks (tasks having positive task IDs) cannot access system memorypools (memorypools having negative ID numbers).
-
-@subheading NOTES:
-
-The memory required for creating memorypools and for allocating control blocks for each object is reserved while system initialization. Associated parameters are therefore specified at system configuration.
-
-@c
-@c del_mpl
-@c
-
-@page
-@subsection del_mpl - Delete Variable-Size Memorypool
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER del_mpl(
- ID mplid
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_ID} - Invalid ID number (mplid was invalid or could not be used)
-
-@code{E_NOEXS} - Object does not exist (the memorypool specified by mplid does not exist)
-
-@code{E_OACV} - Object access violation (A mplid less than -4 was specified from
-a user task. This is implementation dependent.)
-
-@subheading DESCRIPTION:
-
-This system call deletes the variable-size memorypool specified by mplid. No check or error report is performed even if there are tasks using memory from the memorypool to be deleted. This system call completes normally even if some of the memory blocks are not returned. Issuing this system call causes memory used for the control block of the associated memorypool and the memory area making up the memorypool itself to be released. After this system call is invoked, another memorypool having the same ID number can be created.
-
-@subheading NOTES:
-
-When a memorypool being waited for by more than one tasks is deleted, the order of tasks on the ready queue after the WAIT state is cleared is implementation dependent in the case of tasks having the same priority.
-
-@c
-@c get_blk
-@c
-
-@page
-@subsection get_blk - Get Variable-Size Memory Block
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER get_blk(
- VP *p_blk,
- ID mplid,
- INT blksz
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_ID} - Invalid ID number (mplid was invalid or could not be used)
-
-@code{E_NOEXS} - Object does not exist (the memorypool specified by mplid does not exist)
-
-@code{E_OACV} - Object access violation (A mplid less than -4 was specified from
-a user task. This is implementation dependent.)
-
-@code{E_PAR} - Parameter error (tmout is -2 or less, blksz is negative or invalid)
-
-@code{E_DLT} - The object being waited for was deleted (the specified memorypool
-was deleted while waiting)
-
-@code{E_RLWAI} - WAIT state was forcibly released (rel_wai was received while
-waiting)
-
-@code{E_TMOUT} - Polling failure or timeout
-
-@code{E_CTX} - Context error (issued from task-independent portions or a
-task in dispatch disabled state; implementation dependent for
-pget_blk and tget_blk(tmout=TMO_POL))
-
-@subheading DESCRIPTION:
-
-A memory block of the size in bytes given by blksz is allocated from the variable-size memorypool specified by mplid. The start address of the memory block allocated is returned in blk. The allocated memory block is not cleared to zero. The contents of the memory block allocated are undefined. If the memory block cannot be obtained from the specified memorypool when get_blk is issued, the task issuing get_blk will be placed on the memory allocation queue of the specified memorypool, and wait until it can get the memory it requires.
-
-The order in which tasks wait on the queue when waiting to be allocated memory blocks is according to either FIFO or task priority. The specification whereby tasks wait according to task priority is considered an extended function [level X] for which compatibility is not guaranteed. Furthermore, when tasks form a memory allocation queue, it is implementation dependent whether priority is given to tasks requesting the smaller size of memory or those at the head of the queue.
-
-@subheading NOTES:
-
-Pget_blk and get_blk represent the same processing as specifying certain values (TMO_POL or TMO_FEVR) to tget_blk for tmout. It is allowed that only tget_blk is implemented in the kernel and that pget_blk and get_blk are implemented as macros which call tget_blk.
-
-@c
-@c pget_blk
-@c
-
-@page
-@subsection pget_blk - Poll and Get Variable-Size Memory Block
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER ercd =pget_blk(
- VP *p_blk,
- ID mplid,
- INT blksz
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_ID} - Invalid ID number (mplid was invalid or could not be used)
-
-@code{E_NOEXS} - Object does not exist (the memorypool specified by mplid does not exist)
-
-@code{E_OACV} - Object access violation (A mplid less than -4 was specified from
-a user task. This is implementation dependent.)
-
-@code{E_PAR} - Parameter error (tmout is -2 or less, blksz is negative or invalid)
-
-@code{E_DLT} - The object being waited for was deleted (the specified memorypool
-was deleted while waiting)
-
-@code{E_RLWAI} - WAIT state was forcibly released (rel_wai was received while
-waiting)
-
-@code{E_TMOUT} - Polling failure or timeout
-
-@code{E_CTX} - Context error (issued from task-independent portions or a
-task in dispatch disabled state; implementation dependent for
-pget_blk and tget_blk(tmout=TMO_POL))
-
-@subheading DESCRIPTION:
-
-The pget_blk system call has the same function as get_blk except for the waiting feature. Pget_blk polls whether or not the task should wait if get_blk is executed. The meaning of parameters to pget_blk are the same with get_blk. The specific operations by pget_blk are as follows.
-
- - If there is enough free memory to get the memory block of specified size
- immediately, processing is the same as get_blk: that is, the
- requested memory is allocated and the system call completes normally.
-
- - If there is not enough free memory, an E_TMOUT error is returned to
- indicate polling failed and the system call finishes. Unlike get_blk,
- the issuing task does not wait in this case. Also, the issuing task
- does not get any memory.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c tget_blk
-@c
-
-@page
-@subsection tget_blk - Get Variable-Size Memory Block with Timeout
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER ercd =tget_blk(
- VP *p_blk,
- ID mplid,
- INT blksz,
- TMO tmout
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_ID} - Invalid ID number (mplid was invalid or could not be used)
-
-@code{E_NOEXS} - Object does not exist (the memorypool specified by mplid does not exist)
-
-@code{E_OACV} - Object access violation (A mplid less than -4 was specified from
-a user task. This is implementation dependent.)
-
-@code{E_PAR} - Parameter error (tmout is -2 or less, blksz is negative or invalid)
-
-@code{E_DLT} - The object being waited for was deleted (the specified memorypool
-was deleted while waiting)
-
-@code{E_RLWAI} - WAIT state was forcibly released (rel_wai was received while
-waiting)
-
-@code{E_TMOUT} - Polling failure or timeout
-
-@code{E_CTX} - Context error (issued from task-independent portions or a
-task in dispatch disabled state; implementation dependent for
-pget_blk and tget_blk(tmout=TMO_POL))
-
-
-@subheading DESCRIPTION:
-
-The tget_blk system call has the same function as get_blk with an additional timeout feature. A maximum wait time (timeout value) can be specified using the parameter tmout. When a timeout is specified, a timeout error, E_TMOUT, will result and the system call will finish if the period specified by tmout elapses without conditions for releasing wait being satisfied (i.e. without sufficient free memory becoming available).
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c rel_blk
-@c
-
-@page
-@subsection rel_blk - Release Variable-Size Memory Block
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER rel_blk(
- ID mplid,
- VP blk
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_ID} - Invalid ID number (mplid was invalid or could not be used)
-
-@code{E_NOEXS} - Object does not exist (the memorypool specified by mplid does not exist)
-
-@code{E_OACV} - Object access violation (A mplid less than -4 was specified from
- a user task. This is implementation dependent.)
-
-@code{E_PAR} - Parameter error (blk is invalid or an attempt was made to return
-the memory block to the wrong memorypool)
-
-@subheading DESCRIPTION:
-
-This system call releases the memory block specified by blk and returns it to the variable-size memorypool specified by mplid. Executing rel_blk allows memory to be allocated to the next task waiting for memory allocation from the memorypool given by mplid, thus releasing that task from its WAIT state. The variable-size memorypool to which the memory block is returned must be the same memorypool from which it was originally allocated. An E_PAR error will result if an attempt is made to return a memory block to another memorypool than that from which it was originally allocated.
-
-@subheading NOTES:
-
-When memory is returned to a variable-size memorypool for which more than one task is waiting, multiple tasks may be released from waiting at the same time depending on the number of bytes of memory. The order of tasks on the ready queue among tasks having the same priority after being released from waiting for memory is implementation dependent.
-
-@c
-@c ref_mpl
-@c
-
-@page
-@subsection ref_mpl - Reference Variable-Size Memorypool Status
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER ref_mpl(
- T_RMPL *pk_rmpl,
- ID mplid
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_ID} - Invalid ID number (mplid was invalid or could not be used)
-
-@code{E_NOEXS} - Object does not exist (the memorypool specified by mplid does not exist)
-
-@code{E_OACV} - Object access violation (A mplid less than -4 was specified from
-a user task. This is implementation dependent.) Note: User tasks can issue ref_mpl in order to reference memorypools of mplid = TMPL_OS = -4. Whether or not memorypools of mplid = -3 or -2 may be specified to ref_mpl by user tasks is implementation dependent.
-
-@code{E_PAR} - Parameter error (the packet address for the return parameters
-could not be used)
-
-@subheading DESCRIPTION:
-
-This system call refers to the state of the variable-size memorypool specified by mplid, and returns the total free memory size currently available (frsz), the maximum continuous memory size of readily available free memory (maxsz), information of a task waiting to be allocated memory (wtsk), and its extended information (exinf). Wtsk indicates, whether or not there is a task waiting to be allocated memory from the variable-size memorypool specified. If there is no waiting task, wtsk is returned as FALSE = 0. If there is a waiting task, wtsk is returned as a value other than 0.
-
-@subheading NOTES:
-
-In some implementations, memorypools having mplid = -3 or -2 may be referred with ref_mpl as memorypools used by implementation-dependent parts of the OS (such as those used for the stack only). This system call can provide more detailed information regarding remaining memory if the usage of memorypools having mplid = -3 or -2 is more clearly defined. Whether or not this feature is used and any details regarding information provided are implementation dependent.
-
diff --git a/doc/itron3.0/msgbuffer.t b/doc/itron3.0/msgbuffer.t
deleted file mode 100644
index 9c3b12c1a5..0000000000
--- a/doc/itron3.0/msgbuffer.t
+++ /dev/null
@@ -1,826 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c This is the chapter from the RTEMS ITRON User's Guide that
-@c documents the services provided by the message buffer
-@c manager.
-@c
-@c $Id$
-@c
-
-@chapter Message Buffer Manager
-
-@section Introduction
-
-The message buffer manager provides functions to create, delete, and
-control of message buffers. This manager is based on the ITRON 3.0
-standard.
-
-The services provided by the message buffer manager are:
-
-@itemize @bullet
-@item @code{cre_mbf} - Create MessageBuffer
-@item @code{del_mbf} - Delete MessageBuffer
-@item @code{snd_mbf} - Send Message to MessageBuffer
-@item @code{psnd_mbf} - Poll and Send Message to MessageBuffer
-@item @code{tsnd_mbf} - Send Message to MessageBuffer with Timeout
-@item @code{rcv_mbf} - Receive Message from MessageBuffer
-@item @code{prcv_mbf} - Poll and Receive Message from MessageBuffer
-@item @code{trcv_mbf} - Receive Message from MessageBuffer with Timeout
-@item @code{ref_mbf} - Reference MessageBuffer Status
-@end itemize
-
-@section Background
-
-@subsection T_CMBF Structure
-
-The T_CMBF structure is used to define the characteristics of a message
-buffer and passed as an argument to the @code{cre_mbf} routine. This
-structure is defined as:
-
-@example
-@group
-
-typedef struct t_cmbf @{
- VP exinf; /* extended information */
- ATR mbfatr; /* message buffer attributes */
- INT bufsz; /* buffer size (in bytes) */
- INT maxmsz; /* maximum message size (in bytes) */
- /* (CPU and/or implementation-dependent information may also be
- included) */
-@} T_CMBF;
-
-@end group
-@end example
-
-where the meaning of each field is:
-
-@table @b
-@item exinf
-is for any extended information that the implementation may define. This
-implementation does not use this field.
-
-@item mbfatr
-is the attributes for the message buffer. The only attributes which can
-be specified is whether tasks wait in FIFO (@code{TA_TFIFO}) or priority
-(@code{TA_TPRI}) order.
-
-@item bufsz
-is the size of the message buffer. Since some control data are needed to
-manage each messages in the message buffer, @code{bufsz} is usually
-larger than the total of all message sizes in this buffer.
-
-@item maxmsz
-is the maximum message size.
-
-@end table
-
-@subsection T_RMBF Structure
-
-The T_RMBF structure is filled in by the @code{ref_mbf} routine with
-status and state information of the message buffer. The structure is
-defined as follows:
-
-@example
-@group
-
-typedef struct t_rmbf @{
- VP exinf; /* extended information */
- BOOL_ID wtsk; /* waiting task information */
- BOOL_ID stsk; /* sending task information */
- INT msgsz; /* message size (in bytes) */
- INT frbufsz; /* free buffer size (in bytes) */
- /* (CPU and/or implementation-dependent information is returned) */
-@} T_RMBF;
-
-@end group
-@end example
-
-@table @b
-
-@item exinf
-is for any extended information that the implementation may define.
-This implementation does not use this field.
-
-@item wtsk
-is TRUE when there is one or more tasks waiting on this message buffer
-to send message. It is FALSE when there is no waiting task. The meaning
-of this field is allowed to vary between ITRON implementations. It may
-have the ID of a waiting task, the number of tasks waiting, or a boolean
-indication that one or more tasks are waiting.
-
-@item stsk
-is TRUE when there is one or more tasks waiting on this message buffer
-to receive message. It is FALSE when there is no waiting task. The meaning
-of this field is allowed to vary between ITRON implementations. It may
-have the ID of a waiting task, the number of tasks waiting, or a boolean
-indication that one or more tasks are waiting.
-
-@item msgsz
-is the size of the message that is at the head of the message buffer. If
-there is no message on the message queue, @code{msgsz} will be returned
-as FALSE = 0.
-
-@item frbufsz
-is the amount of free memory in the message buffer.
-
-@end table
-
-@section Operations
-
-@section System Calls
-
-This section details the message buffer manager's services.
-A subsection is dedicated to each of this manager's services
-and describes the calling sequence, related constants, usage,
-and status codes.
-
-@c
-@c cre_mbf
-@c
-
-@page
-@subsection cre_mbf - Create MessageBuffer
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER cre_mbf(
- ID mbfid,
- T_CMBF *pk_cmbf
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_NOMEM} - Insufficient memory (Memory for control block and/or
-ring buffer cannot be allocted)
-
-@code{E_ID} - Invalid ID number (mbfid was invalid or could not be used)
-
-@code{E_RSATR} - Reserved attribute (mbfatr was invalid or could not be
-used)
-
-@code{E_OBJ} - Invalid object state (a messagebuffer of the same ID
-already exists)
-
-@code{E_OACV} - Object access violation (A mbfid less than -4 was
-specified from a user task. This is implementation dependent.)
-
-@code{E_PAR} - Parameter error (pk_cmbf is invalid or bufsz and/or
-maxmsz is negative or invalid)
-
-@code{EN_OBJNO} - An object number which could not be accessed on the
-target node is specified.
-
-
-@code{EN_CTXID} - Specified an object on another node when the system
-call was issued from a task in dispatch disabled state or from a
-task-independent portion
-
-@code{EN_PAR} - A value outside the range supported by the target node
-and/or transmission packet format was specified as a parameter (a value
-outside supported range was specified for exinf, mbfatr, bufsz and/or
-maxmsz)
-
-@subheading DESCRIPTION:
-
-This routine creates a message buffer on the local node. The message
-buffer is initialized based on the attributes specified in the
-@code{pk_cmbf} structure. The buffer size and the maximum message size
-are determined by the @code{bufsz} and @code{maxmsz} fields in this
-structure.
-
-The @code{mbfatr} field represents attributes of the message
-buffer. If @code{TA_TFIFO} is specified, tasks will be put on the queue
-on a First In-First Out basis. If @code{TA_TPRI} is specified, tasks
-will be placed on the queue according to their priority.
-
-@subheading NOTES:
-
-Multiprocessing is not supported. Thus none of the "EN_" status codes
-will be returned.
-
-@c
-@c del_mbf
-@c
-
-@page
-@subsection del_mbf - Delete MessageBuffer
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER del_mbf(
- ID mbfid
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_ID} - Invalid ID number (mbfid was invalid or could not be used)
-
-@code{E_NOEXS} - Object does not exist (the messagebuffer specified by
-mbfid does not exist)
-
-@code{E_OACV} - Object access violation (A mbfid less than -4 was
-specified from a user task. This is implementation dependent.)
-
-@code{EN_OBJNO} - An object number which could not be accessed on the
-target node is specified.
-
-@code{EN_CTXID} - Specified an object on another node when the system
-call was issued from a task in dispatch disabled state or from a
-task-independent portion
-
-@subheading DESCRIPTION:
-
-This routine deletes the message buffer specified by @code{mbfid}.
-Issuing this system call releases memory area used for the control block of
-the associated message buffer and the buffer area used for storing messages.
-
-This routine will complete normally even if there are tasks waiting to
-send or receive messages at the message buffer. In that case, an
-@code{E_DLT} error will be returned to each waiting task. If there are
-messages still in the message buffer, they will be deleted along with
-the message buffer and no error will result.
-
-@subheading NOTES:
-
-Multiprocessing is not supported. Thus none of the "EN_" status codes
-will be returned.
-
-@c
-@c snd_mbf
-@c
-
-@page
-@subsection snd_mbf - Send Message to Message Buffer
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER snd_mbf(
- ID mbfid,
- VP msg,
- INT msgsz
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_ID} - Invalid ID number (mbfid was invalid or could not be used)
-
-@code{E_NOEXS} - Object does not exist (the message buffer specified by
-mbfid does not exist)
-
-@code{E_OACV} - Object access violation (A mbfid less than -4 was
-specified from a user task. This is implementation dependent.)
-
-@code{E_PAR} - Parameter error (msgsz is 0 or less; msgsz is larger than
-maxmsz; values unsuitable for msg; tmout is -2 or less)
-
-@code{E_DLT} - The object being waited for was deleted (the
-message buffer of interest was deleted while waiting)
-
-@code{E_RLWAI} - WAIT state was forcibly released (rel_wai was received
-while waiting)
-
-@code{E_CTX} - Context error (issued from task-independent portions or a
-task in dispatch disabled state; implementation dependent for psnd_mbf
-and tsnd_mbf(tmout=TMO_POL))
-
-@code{EN_OBJNO} - An object number which could not be accessed on the
-target node is specified.
-
-@code{EN_CTXID} - Specified an object on another node when the system
-call was issued from a task in dispatch disabled state or from a
-task-independent portion (implementation-dependent; applicable to
-psnd_mbf and tsnd_mbf (tmout=TMO_POL) only)
-
-@code{EN_PAR} - A value outside the range supported by the target node
-and/or transmission packet format was specified as a parameter (a value
-outside supported range was specified for msgsz and/or tmout)
-
-@subheading DESCRIPTION:
-
-This routine sends the message stored at the address given by @code{msg}
-to the message buffer specified by @code{mbfid}. The size of the
-message is specified by @code{msgsz}; that is, @code{msgsz} number of
-bytes beginning from @code{msg} are copied to the message buffer
-specified by @code{mbfid}. If the available space in the buffer is not
-enough to include the message given by @code{msg}, the task issuing this
-system call will wait on a send wait queue until more buffer space
-becomes available.
-
-@subheading NOTES:
-
-Multiprocessing is not supported. Thus none of the "EN_" status codes
-will be returned.
-
-@c
-@c psnd_mbf
-@c
-
-@page
-@subsection psnd_mbf - Poll and Send Message to Message Buffer
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER ercd =psnd_mbf(
- ID mbfid,
- VP msg,
- INT msgsz
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_ID} - Invalid ID number (mbfid was invalid or could not be used)
-
-@code{E_NOEXS} - Object does not exist (the message buffer specified by
-mbfid does not exist)
-
-@code{E_OACV} - Object access violation (A mbfid less than -4 was
-specified from a user task. This is implementation dependent.)
-
-@code{E_PAR} - Parameter error (msgsz is 0 or less; msgsz is larger than
-maxmsz; values unsuitable for msg; tmout is -2 or less)
-
-@code{E_DLT} - The object being waited for was deleted (the
-message buffer of interest was deleted while waiting)
-
-@code{E_RLWAI} - WAIT state was forcibly released (rel_wai was received
-while waiting)
-
-@code{E_TMOUT} - Polling failure or timeout
-
-@code{E_CTX} - Context error (issued from task-independent portions or a
-task in dispatch disabled state; implementation dependent for psnd_mbf
-and tsnd_mbf(tmout=TMO_POL))
-
-@code{EN_OBJNO} - An object number which could not be accessed on the
-target node is specified.
-
-@code{EN_CTXID} - Specified an object on another node when the system
-call was issued from a task in dispatch disabled state or from a
-task-independent portion (implementation-dependent; applicable to
-psnd_mbf and tsnd_mbf (tmout=TMO_POL) only)
-
-@code{EN_PAR} - A value outside the range supported by the target node
-and/or transmission packet format was specified as a parameter (a value
-outside supported range was specified for msgsz and/or tmout)
-
-@subheading DESCRIPTION:
-
-This routine has the same function as @code{snd_mbf} except for the
-waiting feature. @code{Psnd_mbf} polls whether or not the task should
-wait if @code{snd_mbf} is executed. The meaning of parameters to
-@code{psnd_mbf} are the same as for @code{snd_mbf}. The specific
-operations by @code{psnd_mbf} are as follows.
-
- - If there is enough space in the buffer, processing is the same as
- @code{snd_mbf}: the message is sent and the system call completes
- normally.
-
- - If there is not enough space in the buffer, an @code{E_TMOUT} error
- is returned to indicate polling failed and the system call finishes.
- Unlike @code{snd_mbf}, the issuing task does not wait in this case.
- The status of the message buffer and the message queue remain unchanged.
-
-@subheading NOTES:
-
-Multiprocessing is not supported. Thus none of the "EN_" status codes
-will be returned.
-
-@c
-@c tsnd_mbf
-@c
-
-@page
-@subsection tsnd_mbf - Send Message to Message Buffer with Timeout
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER ercd =tsnd_mbf(
- ID mbfid,
- VP msg,
- INT msgsz,
- TMO tmout
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_ID} - Invalid ID number (mbfid was invalid or could not be used)
-
-@code{E_NOEXS} - Object does not exist (the message buffer specified by
-mbfid does not exist)
-
-@code{E_OACV} - Object access violation (A mbfid less than -4 was
-specified from a user task. This is implementation dependent.)
-
-@code{E_PAR} - Parameter error (msgsz is 0 or less; msgsz is larger than
-maxmsz; values unsuitable for msg; tmout is -2 or less)
-
-@code{E_DLT} - The object being waited for was deleted (the
-message buffer of interest was deleted while waiting)
-
-@code{E_RLWAI} - WAIT state was forcibly released (rel_wai was received
-while waiting)
-
-@code{E_TMOUT} - Polling failure or timeout
-
-@code{E_CTX} - Context error (issued from task-independent portions or a
-task in dispatch disabled state; implementation dependent for psnd_mbf
-and tsnd_mbf(tmout=TMO_POL))
-
-@code{EN_OBJNO} - An object number which could not be accessed on the
-target node is specified.
-
-@code{EN_CTXID} - Specified an object on another node when the system
-call was issued from a task in dispatch disabled state or from a
-task-independent portion (implementation-dependent; applicable to
-psnd_mbf and tsnd_mbf (tmout=TMO_POL) only)
-
-@code{EN_PAR} - A value outside the range supported by the target node
-and/or transmission packet format was specified as a parameter (a value
-outside supported range was specified for msgsz and/or tmout)
-
-@subheading DESCRIPTION:
-
-The @code{tsnd_mbf} system call has the same function as @code{snd_mbf}
-with an additional timeout feature. A maximum wait time (timeout value)
-can be specified using the parameter @code{tmout}. When a timeout is
-specified, a timeout error, @code{E_TMOUT}, will result and the system
-call will finish if the period specified by @code{tmout} elapses without
-conditions for releasing wait being satisfied (i.e. without sufficient
-buffer space becoming available).
-
-Only positive values can be specified for @code{tmout}. Specifying
-@code{TMO_POL} = 0 to @code{tsnd_mbf} for @code{tmout} indicates that a
-timeout value of 0 be used, resulting in exactly the same processing as
-@code{psnd_mbf}. Specifying @code{TMO_FEVR} = -1 to @code{tsnd_mbf} for
-@code{tmout} indicates that an infinite timeout value be used, resulting
-in exactly the same processing as @code{snd_mbf}.
-
-@subheading NOTES:
-
-Multiprocessing is not supported. Thus none of the "EN_" status codes
-will be returned.
-
-
-@c
-@c rcv_mbf
-@c
-
-@page
-@subsection rcv_mbf - Receive Message from Message Buffer
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER rcv_mbf(
- VP msg,
- INT *p_msgsz,
- ID mbfid
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_ID} - Invalid ID number (mbfid was invalid or could not be used)
-
-@code{E_NOEXS} - Object does not exist (the message buffer specified by
-mbfid does not exist)
-
-@code{E_OACV} - Object access violation (A mbfid less than -4 was
-specified from a user task. This is implementation dependent.)
-
-@code{E_PAR} - Parameter error (values unsuitable for msg; tmout is -2
-or less)
-
-@code{E_DLT} - The object being waited for was deleted (the specified
-message buffer was deleted while waiting)
-
-@code{E_RLWAI} - WAIT state was forcibly released (rel_wai was received
-while waiting)
-
-@code{E_CTX} - Context error (issued from task-independent portions or a
-task in dispatch disabled state)
-
-@code{EN_OBJNO} - An object number which could not be accessed on the
-target node is specified.
-
-@code{EN_PAR} - A value outside the range supported by the target node
-and/or transmission packet format was specified as a parameter (a value
-outside supported range was specified for tmout)
-
-@code{EN_RPAR} - A value outside the range supported by the issuing node
-and/or transmission packet format was returned as a return parameter (msgsz is outside supported range for requesting node)
-
-@subheading DESCRIPTION:
-
-@code{Rcv_mbf} receives the message from the message buffer specified by
-@code{mbfid}, and stores it at the memory location given by @code{msg}.
-In other words, the content of the message at the head of the message
-buffer specified by @code{mbfid} is copied into an area which begins
-from @code{msg} and whose size is @code{msgsz}.
-
-If the message buffer is empty, the task issuing this system call will wait
-on a receive message wait queue until a message arrives.
-
-@subheading NOTES:
-
-Multiprocessing is not supported. Thus none of the "EN_" status codes
-will be returned.
-
-
-@c
-@c prcv_mbf
-@c
-
-@page
-@subsection prcv_mbf - Poll and Receive Message from Message Buffer
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER ercd =prcv_mbf(
- VP msg,
- INT *p_msgsz,
- ID mbfid
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_ID} - Invalid ID number (mbfid was invalid or could not be used)
-
-@code{E_NOEXS} - Object does not exist (the message buffer specified by
-mbfid does not exist)
-
-@code{E_OACV} - Object access violation (A mbfid less than -4 was
-specified from a user task. This is implementation dependent.)
-
-@code{E_PAR} - Parameter error (values unsuitable for msg; tmout is -2
-or less)
-
-@code{E_DLT} - The object being waited for was deleted (the specified
-message buffer was deleted while waiting)
-
-@code{E_RLWAI} - WAIT state was forcibly released (rel_wai was received
-while waiting)
-
-@code{E_TMOUT} - Polling failure or timeout
-
-@code{E_CTX} - Context error (issued from task-independent portions or a
-task in dispatch disabled state)
-
-@code{EN_OBJNO} - An object number which could not be accessed on the
-target node is specified.
-
-@code{EN_PAR} - A value outside the range supported by the target node
-and/or transmission packet format was specified as a parameter (a value
-outside supported range was specified for tmout)
-
-@code{EN_RPAR} - A value outside the range supported by the issuing node
-and/or transmission packet format was returned as a return parameter (msgsz is outside supported range for requesting node)
-
-
-@subheading DESCRIPTION:
-The @code{prcv_mbf} system call has the same function as @code{rcv_mbf}
-except for the waiting feature. @code{Prcv_mbf} polls whether or not
-the task should wait if @code{rcv_mbf} is executed. The meaning of
-parameters to @code{prcv_mbf} are the same as for @code{rcv_mbf}. The
-specific operations by @code{prcv_mbf} are as follows.
-
- - If there is a message in the specified message buffer, processing is
-the same as @code{rcv_mbf}: the first message on the message buffer is
-retrieved and the system call completes normally.
-
- - If there is no message in the specified message buffer, an
-@code{E_TMOUT} error is returned to indicate polling failed and the
-system call finishes. Unlike @code{rcv_mbf}, the issuing task does not
-wait in this case. The status of the message buffer remain unchanged.
-
-@subheading NOTES:
-
-Multiprocessing is not supported. Thus none of the "EN_" status codes
-will be returned.
-
-
-@c
-@c trcv_mbf
-@c
-
-@page
-@subsection trcv_mbf - Receive Message from Message Buffer with Timeout
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER ercd =trcv_mbf(
- VP msg,
- INT *p_msgsz,
- ID mbfid,
- TMO tmout
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_ID} - Invalid ID number (mbfid was invalid or could not be used)
-
-@code{E_NOEXS} - Object does not exist (the message buffer specified by
-mbfid does not exist)
-
-@code{E_OACV} - Object access violation (A mbfid less than -4 was
-specified from a user task. This is implementation dependent.)
-
-@code{E_PAR} - Parameter error (values unsuitable for msg; tmout is -2
-or less)
-
-@code{E_DLT} - The object being waited for was deleted (the specified
-message buffer was deleted while waiting)
-
-@code{E_RLWAI} - WAIT state was forcibly released (rel_wai was received
-while waiting)
-
-@code{E_TMOUT} - Polling failure or timeout
-
-@code{E_CTX} - Context error (issued from task-independent portions or a
-task in dispatch disabled state)
-
-@code{EN_OBJNO} - An object number which could not be accessed on the
-target node is specified.
-
-@code{EN_PAR} - A value outside the range supported by the target node
-and/or transmission packet format was specified as a parameter (a value
-outside supported range was specified for tmout)
-
-@code{EN_RPAR} - A value outside the range supported by the issuing node
-and/or transmission packet format was returned as a return parameter (msgsz is outside supported range for requesting node)
-
-@subheading DESCRIPTION:
-The @code{trcv_mbf} system call has the same function as @code{rcv_mbf}
-with an additional timeout feature. A maximum wait time (timeout value)
-can be specified using the parameter @code{tmout}. When a timeout is
-specified, a timeout error, @code{E_TMOUT}, will result and the system
-call will finish if the period specified by @code{tmout} elapses without
-conditions for releasing wait being satisfied (i.e. without a message
-arriving).
-
-Only positive values can be specified for @code{tmout}. Specifying
-@code{TMO_POL} = 0 to @code{trcv_mbf} for @code{tmout} indicates that a
-timeout value of 0 be used, resulting in exactly the same processing as
-@code{prcv_mbf}. Specifying @code{TMO_FEVR} = -1 to @code{trcv_mbf} for
-tmout indicates that an infinite timeout value be used, resulting in
-exactly the same processing as @code{rcv_mbf}.
-
-@subheading NOTES:
-
-Multiprocessing is not supported. Thus none of the "EN_" status codes
-will be returned.
-
-@c
-@c ref_mbf
-@c
-
-@page
-@subsection ref_mbf - Reference Message Buffer Status
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER ref_mbf(
- T_RMBF *pk_rmbf,
- ID mbfid
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_ID} - Invalid ID number (mbfid was invalid or could not be used)
-
-@code{E_NOEXS} - Object does not exist (the message buffer specified by
-mbfid does not exist)
-
-@code{E_OACV} - Object access violation (A mbfid less than -4 was
-specified from a user task. This is implementation dependent.)
-
-@code{E_PAR} - Parameter error (the packet address for the return
-parameters could not be used)
-
-@code{EN_OBJNO} - An object number which could not be accessed on the
-target node is specified.
-
-@code{EN_CTXID} - Specified an object on another node when the system
-call was issued from a task in dispatch disabled state or from a
-task-independent portion
-
-@code{EN_RPAR} - A value outside the range supported by the issuing node
-and/or transmission packet format was returned as a return parameter (a
-value outside supported range for exinf, wtsk, stsk, msgsz and/or
-frbufsz on a requesting node)
-
-@subheading DESCRIPTION:
-This system call refers to the state of the message buffer specified by
-@code{mbfid}, and returns information of a task waiting to send a
-message (@code{stsk}), the size of the next message to be received
-(@code{msgsz}), the free buffer size (@code{frbufsz}), information of a
-task waiting to receive a message (@code{wtsk}), and its extended
-information (@code{exinf}).
-
-@code{Wtsk} and @code{stsk} indicate whether or not there is a task
-waiting for the message buffer in question. If there is no waiting
-task, @code{wtsk} and @code{stsk} are returned as @code{FALSE} = 0. If
-there is a waiting task, @code{wtsk} and @code{stsk} are returned as
-values other than 0.
-
-An @code{E_NOEXS} error will result if the message buffer specified to
-@code{ref_mbf} does not exist.
-
-The size of the message at the head of the message buffer (the next
-message to be received) is returned to @code{msgsz}. If there are no
-messages on the message buffer, @code{msgsz} will be returned as
-@code{FALSE} = 0. A message whose size is zero cannot be sent.
-
-At least one of @code{msgsz} = @code{FALSE} and @code{wtsk} =
-@code{FALSE} is always true in this system call.
-
-@code{Frbufsz} indicates the amount of free memory in the message
-buffer. This value can be used to know the total approximate size of
-the messages which can be sent to the message buffer.
-
-@subheading NOTES:
-
-Multiprocessing is not supported. Thus none of the "EN_" status codes
-will be returned.
diff --git a/doc/itron3.0/network.t b/doc/itron3.0/network.t
deleted file mode 100644
index f71bc3c87b..0000000000
--- a/doc/itron3.0/network.t
+++ /dev/null
@@ -1,162 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c This is the chapter from the RTEMS ITRON User's Guide that
-@c documents the services provided by the network support
-@c manager.
-@c
-@c $Id$
-@c
-
-@chapter Network Support Manager
-
-@section Introduction
-
-The
-network support manager is ...
-
-The services provided by the network support manager are:
-
-@itemize @bullet
-@item @code{nrea_dat} - Read Data from another Node
-@item @code{nwri_dat} - Write Data to another Node
-@item @code{nget_nod} - Get Local Node Number
-@item @code{nget_ver} - Get Version Information of another Node
-@end itemize
-
-@section Background
-
-@section Operations
-
-@section System Calls
-
-This section details the network support manager's services.
-A subsection is dedicated to each of this manager's services
-and describes the calling sequence, related constants, usage,
-and status codes.
-
-
-@c
-@c nrea_dat
-@c
-
-@page
-@subsection nrea_dat - Read Data from another Node
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER nrea_dat(
- INT *p_reasz,
- VP dstadr,
- NODE srcnode,
- VP srcadr,
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{EXXX} -
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-
-@c
-@c nwri_dat
-@c
-
-@page
-@subsection nwri_dat - Write Data to another Node
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER nwri_dat(
- INT *p_wrisz,
- NODE dstnode,
- VP dstadr,
- VP srcadr,
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{EXXX} -
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-
-@c
-@c nget_nod
-@c
-
-@page
-@subsection nget_nod - Get Local Node Number
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER nget_nod(
- NODE *p_node
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{EXXX} -
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-
-@c
-@c nget_ver
-@c
-
-@page
-@subsection nget_ver - Get Version Information of another Node
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER nget_ver(
- T_VER *pk_ver,
- NODE node
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{EXXX} -
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
diff --git a/doc/itron3.0/preface.texi b/doc/itron3.0/preface.texi
deleted file mode 100644
index 2344d52f3c..0000000000
--- a/doc/itron3.0/preface.texi
+++ /dev/null
@@ -1,14 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@ifinfo
-@node Preface, , Top, Top
-@end ifinfo
-@unnumbered Preface
-
-There needs to be a preface to this manual.
diff --git a/doc/itron3.0/rendezvous.t b/doc/itron3.0/rendezvous.t
deleted file mode 100644
index c7fbdcb3ef..0000000000
--- a/doc/itron3.0/rendezvous.t
+++ /dev/null
@@ -1,395 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c This is the chapter from the RTEMS ITRON User's Guide that
-@c documents the services provided by the rendezvous
-@c manager.
-@c
-@c $Id$
-@c
-
-@chapter Rendezvous Manager
-
-@section Introduction
-
-The
-rendezvous manager is ...
-
-The services provided by the rendezvous manager are:
-
-@itemize @bullet
-@item @code{cre_por} - Create Port for Rendezvous
-@item @code{del_por} - Delete Port for Rendezvous
-@item @code{cal_por} - Call Port for Rendezvous
-@item @code{pcal_por} - Poll and Call Port for Rendezvous
-@item @code{tcal_por} - Call Port for Rendezvous with Timeout
-@item @code{acp_por} - Accept Port for Rendezvous
-@item @code{pacp_por} - Poll and Accept Port for Rendezvous
-@item @code{tacp_por} - Accept Port for Rendezvous with Timeout
-@item @code{fwd_por} - Forward Rendezvous to Other Port
-@item @code{rpl_rdv} - Reply Rendezvous
-@item @code{ref_por} - Reference Port Status
-@end itemize
-
-@section Background
-
-@section Operations
-
-@section System Calls
-
-This section details the rendezvous manager's services.
-A subsection is dedicated to each of this manager's services
-and describes the calling sequence, related constants, usage,
-and status codes.
-
-
-@c
-@c cre_por
-@c
-
-@page
-@subsection cre_por - Create Port for Rendezvous
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER cre_por(
- ID porid,
- T_CPOR *pk_cpor
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{EXXX} -
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-
-@c
-@c del_por
-@c
-
-@page
-@subsection del_por - Delete Port for Rendezvous
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER del_por(
- ID porid
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{EXXX} -
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-
-@c
-@c cal_por
-@c
-
-@page
-@subsection cal_por - Call Port for Rendezvous Poll
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER cal_por(
- VP msg,
- INT *p_rmsgsz,
- ID porid,
- UINT calptn
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{EXXX} -
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-
-@c
-@c pcal_por
-@c
-
-@page
-@subsection pcal_por - Poll and Call Port for Rendezvous
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER ercd =pcal_por(
- VP msg,
- INT *p_rmsgsz,
- ID porid,
- UINT calptn,
- INT
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{EXXX} -
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-
-@c
-@c tcal_por
-@c
-
-@page
-@subsection tcal_por - Call Port for Rendezvous with Timeout
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER ercd =tcal_por(
- VP msg,
- INT *p_rmsgsz,
- ID porid,
- UINT calptn,
- INT
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{EXXX} -
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-
-@c
-@c acp_por
-@c
-
-@page
-@subsection acp_por - Accept Port for Rendezvous Poll
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER acp_por(
- RNO *p_rdvno,
- VP msg,
- INT *p_cmsgsz,
- ID porid
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{EXXX} -
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-
-@c
-@c pacp_por
-@c
-
-@page
-@subsection pacp_por - Poll and Accept Port for Rendezvous
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER ercd =pacp_por(
- RNO *p_rdvno,
- VP msg,
- INT *p_cmsgsz,
- ID porid,
- UINT
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{EXXX} -
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-
-@c
-@c tacp_por
-@c
-
-@page
-@subsection tacp_por - Accept Port for Rendezvous with Timeout
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER ercd =tacp_por(
- RNO *p_rdvno,
- VP msg,
- INT *p_cmsgsz,
- ID porid,
- UINT
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{EXXX} -
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-
-@c
-@c fwd_por
-@c
-
-@page
-@subsection fwd_por - Forward Rendezvous to Other Port
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER fwd_por(
- ID porid,
- UINT calptn,
- RNO rdvno,
- VP msg,
- INT cmsgsz
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{EXXX} -
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-
-@c
-@c rpl_rdv
-@c
-
-@page
-@subsection rpl_rdv - Reply Rendezvous
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER rpl_rdv(
- RNO rdvno,
- VP msg,
- INT rmsgsz
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{EXXX} -
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-
-@c
-@c ref_por
-@c
-
-@page
-@subsection ref_por - Reference Port Status
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER ref_por(
- T_RPOR *pk_rpor,
- ID porid
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{EXXX} -
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
diff --git a/doc/itron3.0/semaphore.t b/doc/itron3.0/semaphore.t
deleted file mode 100644
index 07ef3a9c32..0000000000
--- a/doc/itron3.0/semaphore.t
+++ /dev/null
@@ -1,642 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c This is the chapter from the RTEMS ITRON User's Guide that
-@c documents the services provided by the semaphore
-@c manager.
-@c
-@c $Id$
-@c
-
-@chapter Semaphore Manager
-
-@section Introduction
-
-The semaphore manager provides functions to allocate, delete, and
-control counting semaphores. This manager is based on the
-ITRON 3.0 standard.
-
-The services provided by the semaphore manager are:
-
-@itemize @bullet
-@item @code{cre_sem} - Create Semaphore
-@item @code{del_sem} - Delete Semaphore
-@item @code{sig_sem} - Signal Semaphore
-@item @code{wai_sem} - Wait on Semaphore
-@item @code{preq_sem} - Poll and Request Semaphore
-@item @code{twai_sem} - Wait on Semaphore with Timeout
-@item @code{ref_sem} - Reference Semaphore Status
-@end itemize
-
-@section Background
-
-@subsection Theory
-
-Semaphores are used for synchronization and mutual exclusion by indicating
-the availability and number of resources. The task (the task which is
-returning resources) notifying other tasks of an event increases the number
-of resources held by the semaphore by one. The task (the task which
-will obtain resources) waiting for the event decreases the number of
-resources held by the semaphore by one. If the number of resources held by a
-semaphore is insufficient (namely 0), the task requiring resources will
-wait until the next time resources are returned to the semaphore. If there is
-more than one task waiting for a semaphore, the tasks will be placed in the
-queue.
-
-
-@subsection T_CSEM Structure
-
-The T_CSEM structure is used to define the characteristics of a semaphore
-and passed an as argument to the @code{cre_sem} service. The structure
-is defined as follows:
-
-@example
-@group
-/*
- * Create Semaphore (cre_sem) Structure
- */
-
-typedef struct t_csem @{
- VP exinf; /* extended information */
- ATR sematr; /* semaphore attributes */
- /* Following is the extended function for [level X]. */
- INT isemcnt; /* initial semaphore count */
- INT maxsem; /* maximum semaphore count */
- /* additional implementation dependent information may be included */
-@} T_CSEM;
-
-/*
- * sematr - Semaphore Attribute Values
- */
-
-#define TA_TFIFO 0x00 /* waiting tasks are handled by FIFO */
-#define TA_TPRI 0x01 /* waiting tasks are handled by priority */
-
-@end group
-@end example
-
-where the meaning of each field is:
-
-@table @b
-@item exinf
-is for any extended information that the implementation may define.
-This implementation does not use this field.
-
-@item sematr
-is the attributes for this semaphore. The only attributed
-which can be specified is whether tasks wait in FIFO (@code{TA_TFIFO})
-or priority (@code{TA_TPRI}) order.
-
-@item isemcnt
-is the initial count of the semaphore.
-
-@item maxsem
-is the maximum count the semaphore may have. It places an upper
-limit on the value taken by the semaphore.
-
-@end table
-
-@subsection Building a Semaphore Attribute Set
-
-In general, an attribute set is built by a bitwise OR
-of the desired attribute components. The following table lists
-the set of valid semaphore attributes:
-
-@itemize @bullet
-@item @code{TA_TFIFO} - tasks wait by FIFO
-
-@item @code{TA_TPRI} - tasks wait by priority
-
-@end itemize
-
-Attribute values are specifically designed to be
-mutually exclusive, therefore bitwise OR and addition operations
-are equivalent as long as each attribute appears exactly once in
-the component list.
-
-@subsection T_RSEM Structure
-
-The T_RSEM structure is filled in by the @code{ref_sem} service with
-status and state information on a semaphore. The structure
-is defined as follows:
-
-@example
-@group
-/*
- * Reference Semaphore (ref_sem) Structure
- */
-
-typedef struct t_rsem @{
- VP exinf; /* extended information */
- BOOL_ID wtsk; /* indicates whether there is a waiting task */
- INT semcnt; /* current semaphore count */
- /* additional implementation dependent information may be included */
-@} T_RSEM;
-@end group
-@end example
-
-@table @b
-
-@item exinf
-is for any extended information that the implementation may define.
-This implementation does not use this field.
-
-@item wtsk
-is TRUE when there is one or more task waiting on the semaphore.
-It is FALSE if no tasks are currently waiting. The meaning of this
-field is allowed to vary between ITRON implementations. It may have
-the ID of a waiting task, the number of tasks waiting, or a boolean
-indication that one or more tasks are waiting.
-
-@item semcnt
-is the current semaphore count.
-
-@end table
-
-The information in this table is very volatile and should be used
-with caution in an application.
-
-@section Operations
-
-@subsection Using as a Binary Semaphore
-
-Creating a semaphore with a limit on the count of 1 effectively
-restricts the semaphore to being a binary semaphore. When the
-binary semaphore is available, the count is 1. When the binary
-semaphore is unavailable, the count is 0.
-
-Since this does not result in a true binary semaphore, advanced
-binary features like the Priority Inheritance and Priority
-Ceiling Protocols are not available.
-
-@section System Calls
-
-This section details the semaphore manager's services.
-A subsection is dedicated to each of this manager's services
-and describes the calling sequence, related constants, usage,
-and status codes.
-
-
-@c
-@c cre_sem
-@c
-
-@page
-@subsection cre_sem - Create Semaphore
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER cre_sem(
- ID semid,
- T_CSEM *pk_csem
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_ID} - Invalid ID number (semid was invalid or could not be used)
-
-@code{E_NOMEM} - Insufficient memory (Memory for control block cannot be
-allocated)
-
-@code{E_OACV} - Object access violation (A semid less than -4 was
-specified from a user task.)
-
-@code{E_RSATR} - Reserved attribute (sematr was invalid or could not be
-used)
-
-@code{E_OBJ} - Invalid object state (a semaphore of the same ID already
-exists)
-
-@code{E_PAR} - Parameter error (pk_csem is invalid and/or isemcnt or
-maxsem is negative or invalid)
-
-@code{EN_OBJNO} - An object number which could not be accessed on the
-target node is specified.
-
-@code{EN_CTXID} - Specified an object on another node when the system call
-was issued from a task in dispatch disabled state or from a task-
-independent portion
-
-@code{EN_PAR} - A value outside the range supported by the target node
-and/or transmission packet format was specified as a parameter (a value
-outside supported range was specified for exinf, sematr, isemcnt and/or
-maxsem)
-
-@subheading DESCRIPTION:
-
-This routine creates a semaphore that resides on the local node. The
-semaphore is initialized based on the attributes specified in the
-@code{pk_csem} structure. The initial and maximum counts of the
-semaphore are set based on the @code{isemcnt} and @code{maxsem} fields
-in this structure.
-
-Specifying @code{TA_TPRI} in the @code{sematr} field of the
-semaphore attributes structure causes tasks
-waiting for a semaphore to be serviced according to task
-priority. When @code{TA_TFIFO} is selected, tasks are serviced in First
-In-First Out order.
-
-@subheading NOTES:
-
-Multiprocessing is not supported. Thus none of the "EN_" status codes
-will be returned.
-
-All memory is preallocated for RTEMS ITRON objects. Thus, no dynamic
-memory allocation is performed by @code{cre_sem} and the @code{E_NOMEM}
-error can not be returned.
-
-This directive will not cause the running task to be preempted.
-
-The following semaphore attribute constants are
-defined by RTEMS:
-
-@itemize @bullet
-@item @code{TA_TFIFO} - tasks wait by FIFO
-
-@item @code{TA_TPRI} - tasks wait by priority
-
-@end itemize
-
-@c
-@c del_sem
-@c
-
-@page
-@subsection del_sem - Delete Semaphore
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER del_sem(
- ID semid
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_ID} - Invalid ID number (semid was invalid or could not be used)
-
-@code{E_NOEXS} - Object does not exist (the semaphore specified by semid
-does not exist)
-
-@code{E_OACV} - Object access violation (A semid less than -4 was
-specified from a user task. This is implementation dependent.)
-
-@code{EN_OBJNO} - An object number which could not be accessed on the
-target node is specified.
-
-@code{EN_CTXID} - Specified an object on another node when the system call
-was issued from a task in dispatch disabled state or from a
-task-independent portion
-
-@subheading DESCRIPTION:
-
-This routine deletes the semaphore specified by @code{semid}.
-All tasks blocked waiting to acquire the semaphore will be
-readied and returned a status code which indicates that the
-semaphore was deleted. The control block for this semaphore
-is reclaimed by RTEMS.
-
-
-@subheading NOTES:
-
-Multiprocessing is not supported. Thus none of the "EN_" status codes
-will be returned.
-
-The calling task will be preempted if it is enabled
-by the task's execution mode and a higher priority local task is
-waiting on the deleted semaphore. The calling task will NOT be
-preempted if all of the tasks that are waiting on the semaphore
-are remote tasks.
-
-The calling task does not have to be the task that
-created the semaphore. Any local task that knows the semaphore
-id can delete the semaphore.
-
-
-@c
-@c sig_sem
-@c
-
-@page
-@subsection sig_sem - Signal Semaphore
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER sig_sem(
- ID semid
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_ID} - Invalid ID number (semid was invalid or could not be used)
-
-@code{E_NOEXS} - Object does not exist (the semaphore specified by semid
-does not exist)
-
-@code{E_OACV} - Object access violation (A semid less than -4 was
-specified from a user task. This is implementation dependent.)
-
-@code{E_QOVR} - Queuing or nesting overflow (the queuing count given by
-semcnt went over the maximum allowed)
-
-@code{EN_OBJNO} - An object number which could not be accessed on the
-target node is specified.
-
-@code{EN_CTXID} - Specified an object on another node when the system call
-was issued from a task in dispatch disabled state or from a
-task-independent portion
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-Multiprocessing is not supported. Thus none of the "EN_" status codes
-will be returned.
-
-@c
-@c wai_sem
-@c
-
-@page
-@subsection wai_sem - Wait on Semaphore
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER wai_sem(
- ID semid
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_ID} - Invalid ID number (semid was invalid or could not be used)
-
-@code{E_NOEXS} - Object does not exist (the semaphore specified by semid
-does not exist)
-
-@code{E_OACV} - Object access violation (A semid less than -4 was
-specified from a user task. This is implementation dependent.)
-
-@code{E_DLT} - The object being waited for was deleted (the specified
-semaphore was deleted while waiting)
-
-@code{E_RLWAI} - Wait state was forcibly released (rel_wai was received
-while waiting)
-
-@code{E_CTX} - Context error (issued from task-independent portions or a
-task in dispatch disabled state)
-
-@code{EN_OBJNO} - An object number which could not be accessed on the
-target node is specified.
-
-@code{EN_PAR} - A value outside the range supported by the target node
-and/or transmission packet format was specified as a parameter (a value
-outside supported range was specified for tmout)
-
-@subheading DESCRIPTION:
-
-This routine attempts to acquire the semaphore specified by @code{semid}.
-If the semaphore is available (i.e. positive semaphore count), then the
-semaphore count is decremented and the calling task returns immediately.
-Otherwise the calling tasking is blocked until the semaphore is released
-by a subsequent invocation of @code{sig_sem}.
-
-@subheading NOTES:
-
-Multiprocessing is not supported. Thus none of the "EN_" status codes
-will be returned.
-
-If the semaphore is not available, then the calling task will be blocked.
-
-@c
-@c preq_sem
-@c
-
-@page
-@subsection preq_sem - Poll and Request Semaphore
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER preq_sem(
- ID semid
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_ID} - Invalid ID number (semid was invalid or could not be used)
-
-@code{E_NOEXS} - Object does not exist (the semaphore specified by semid
-does not exist)
-
-@code{E_OACV} - Object access violation (A semid less than -4 was
-specified from a user task. This is implementation dependent.)
-
-@code{E_TMOUT} - Polling failure or timeout exceeded
-
-@code{E_CTX} - Context error (issued from task-independent portions or a
-task in dispatch disabled state)
-
-@code{EN_OBJNO} - An object number which could not be accessed on the
-target node is specified.
-
-@code{EN_PAR} - A value outside the range supported by the target node
-and/or transmission packet format was specified as a parameter (a value
-outside supported range was specified for tmout)
-
-@subheading DESCRIPTION:
-
-This routine attempts to acquire the semaphore specified by @code{semid}.
-If the semaphore is available (i.e. positive semaphore count), then the
-semaphore count is decremented and the calling task returns immediately.
-Otherwise, the @code{E_TMOUT} error is returned to the calling task to
-indicate the semaphore is unavailable.
-
-@subheading NOTES:
-
-Multiprocessing is not supported. Thus none of the "EN_" status codes
-will be returned.
-
-This routine will not cause the running task to be preempted.
-
-@c
-@c twai_sem
-@c
-
-@page
-@subsection twai_sem - Wait on Semaphore with Timeout
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER twai_sem(
- ID semid,
- TMO tmout
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_ID} - Invalid ID number (semid was invalid or could not be used)
-
-@code{E_NOEXS} - Object does not exist (the semaphore specified by semid
-does not exist)
-
-@code{E_OACV} - Object access violation (A semid less than -4 was
-specified from a user task. This is implementation dependent.)
-
-@code{E_PAR} - Parameter error (tmout is -2 or less)
-
-@code{E_DLT} - The object being waited for was deleted (the specified
-semaphore was deleted while waiting)
-
-@code{E_RLWAI} - Wait state was forcibly released (rel_wai was received
-while waiting)
-
-@code{E_TMOUT} - Polling failure or timeout exceeded
-
-@code{E_CTX} - Context error (issued from task-independent portions or a
-task in dispatch disabled state)
-
-@code{EN_OBJNO} - An object number which could not be accessed on the
-target node is specified.
-
-@code{EN_PAR} - A value outside the range supported by the target node
-and/or transmission packet format was specified as a parameter (a value
-outside supported range was specified for tmout)
-
-@subheading DESCRIPTION:
-
-This routine attempts to acquire the semaphore specified by @code{semid}.
-If the semaphore is available (i.e. positive semaphore count), then the
-semaphore count is decremented and the calling task returns immediately.
-Otherwise the calling tasking is blocked until the semaphore is released
-by a subsequent invocation of @code{sig_sem} or the timeout period specified
-by @code{tmout} milliseconds is exceeded. If the timeout period is exceeded,
-then the @code{E_TMOUT} error is returned.
-
-By specifiying @code{tmout} as @code{TMO_FEVR}, this routine has the same
-behavior as @code{wai_sem}. Similarly, by specifiying @code{tmout} as
-@code{TMO_POL}, this routine has the same behavior as @code{preq_sem}.
-
-@subheading NOTES:
-
-Multiprocessing is not supported. Thus none of the "EN_" status codes
-will be returned.
-
-This routine may cause the calling task to block.
-
-A clock tick is required to support the timeout functionality of
-this routine.
-
-@c
-@c ref_sem
-@c
-
-@page
-@subsection ref_sem - Reference Semaphore Status
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER ref_sem(
- T_RSEM *pk_rsem,
- ID semid
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_ID} - Invalid ID number (semid was invalid or could not be used)
-
-@code{E_NOEXS} - Object does not exist (the semaphore specified by semid
-does not exist)
-
-@code{E_OACV} - Object access violation (A semid less than -4 was
-specified from a user task. This is implementation dependent.)
-
-@code{E_PAR} - Parameter error (the packet address for the return
-parameters could not be used)
-
-@code{EN_OBJNO} - An object number which could not be accessed on the
-target node is specified.
-
-@code{EN_CTXID} - Specified an object on another node when the system call
-was issued from a task in dispatch disabled state or from a
-task-independent portion
-
-@code{EN_RPAR} - A value outside the range supported by the requesting
-node and/or transmission packet format was returned as a parameter (a
-value outside supported range was specified for exinf, wtsk or semcnt)
-
-@subheading DESCRIPTION:
-
-This routine returns status information on the semaphore specified
-by @code{semid}. The @code{pk_rsem} structure is filled in by
-this service call.
-
-@subheading NOTES:
-
-Multiprocessing is not supported. Thus none of the "EN_" status codes
-will be returned.
-
-This routine will not cause the running task to be preempted.
-
diff --git a/doc/itron3.0/status.t b/doc/itron3.0/status.t
deleted file mode 100644
index d4892f36f2..0000000000
--- a/doc/itron3.0/status.t
+++ /dev/null
@@ -1,943 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c This is the chapter from the RTEMS ITRON User's Guide that
-@c documents the services provided by the task
-@c manager.
-@c
-@c $Id$
-@c
-
-@chapter ITRON Implementation Status
-
-@section Introduction
-
-This chapter describes the status of the implementation of each
-manager in the RTEMS implementataion of the uITRON 3.0 API. The
-status of each manager is presented in terms of documentation and
-status relative to the extended level (level 'E') of the uITRON 3.0
-API specification. The extended level of the specification is
-the level at which dynamic object creation, deletion, and
-reference services are available. This level is more akin to the other
-APIs supported by RTEMS. This purpose of this chapter is
-to make it clear what is required to bring the RTEMS
-uITRON API implementation into compliance with the
-specification. The following description of the specification
-levels is taken from the uITRON 3.0 API specification.
-
-
-uITRON 3.0 specification is divided into fewer system call levels than was the
-previous uITRON 2.0 specification. There are now just three levels: Level R
-(Required), Level S (Standard) and Level E (Extended). In addition to these
-three levels, there is also Level C for CPU-dependent system calls.
-In addition, the uITRON 3.0 API, defines the network level ('N') which
-represents system calls that support the connection function
-
-@itemize @bullet
-@item [level R] (Required)
-The functions in this level are mandatory for all implementations of
-uITRON 3.0 specification. This includes basic functions for achieving
-a real-time, multitasking OS. These functions can be implemented even
-without a hardware timer. This level corresponds to Levels 1 and 2
-of uITRON 2.0 specification.
-
-@item [level S] (Standard)
-This includes basic functions for achieving a real-time, multitasking
-OS. This level corresponds to Levels 3 and 4 of uITRON 2.0
-specification.
-
-@item [level E] (Extended)
-This includes additional and extended functions. This corresponds to
-functions not included in uITRON 2.0 specification (functions of
-ITRON2 specification). Specifically, this level includes object
-creation and deletion functions, rendezvous functions, memorypools
-and the timer handler.
-
-@item [level C] (CPU dependent)
-This level provides implementation-dependent functions required due to
-the CPU or hardware configuration.
-
-@end itemize
-
-The support level of the connection function is indicated by appending an 'N'
-to the end of the level. For example, connectivity supported at [level S]
-would be referred to as [level SN]. The support level for functions which
-can only send requests for operations on other nodes but offer no system call
-processing on the issuing node itself are indicated by the lower case letter
-'s' or 'e'.
-
-@c
-@c Task
-@c
-
-@section Task Status
-
-@itemize @bullet
-
-@item Implementation
-@itemize @bullet
-@item cre_tsk - Complete, Pending Review
-@item del_tsk - Complete, Pending Review
-@item sta_tsk - Complete, Pending Review
-@item ext_tsk - Complete, Pending Review
-@item exd_tsk - Complete, Pending Review
-@item ter_tsk - Complete, Pending Review
-@item dis_dsp - Complete, Pending Review
-@item ena_dsp - Complete, Pending Review
-@item chg_pri - Complete, Pending Review
-@item rot_rdq - Complete, Pending Review
-@item rel_wai - Stub, Needs to be Fleshed Out
-@item get_tid - Complete, Pending Review
-@item ref_tsk - Complete, Pending Review
-
-@item Notes:
-@itemize @bullet
-@item None
-@end itemize
-
-@end itemize
-
-@item Executive Modifications
-@itemize @bullet
-@item None Expected
-@end itemize
-
-@item Testing
-@itemize @bullet
-@item itron01 - Hello world
-@item itron02 - Semaphore test
-@item itron03 - directives: ex_init, ex_start, t_create,
-t_start, tm_tick, i_return, t_ident, tm_set, tm_get, tm_wkafter
-See .doc file, verify correct
-@item itron04 - Doc file needed
-@item itron05 - directives: ext_tsk, cre_tsk, sta_tsk, rot_rdq
-ex_start, t_create, t_start, tm_tick, i_return, t_ident, t_delete,
-tm_wkafter, t_setpri, t_suspend
-See .doc file, verify correct
-@item itron06 - Doc file needed
-@item itron07 - Doc file needed
-@item itron08 - Doc file needed
-@item itron09 - Doc file needed
-@item itron10 - Doc file needed
-@item tmitron01 - Doc file needed
-@item tm_include - Doc file needed. Timing test for semaphores.
-@end itemize
-
-@item Documentation
-@itemize @bullet
-@item Complete, Pending Review
-@end itemize
-
-@item ITRON 3.0 API Conformance
-@itemize @bullet
-@item Level E - Extended Functionality
-@end itemize
-
-@item Level C - CPU Dependent Functionality
-@itemize @bullet
-@item NA
-@end itemize
-
-@item Level N - Connection Functionality
-@itemize @bullet
-@item Not implemented
-@end itemize
-
-@end itemize
-
-@c
-@c Task-Dependent Synchronization
-@c
-
-@section Task-Dependent Synchronization Status
-
-@itemize @bullet
-
-@item Implementation
-@itemize @bullet
-@item sus_tsk - Complete, Pending Review
-@item rsm_tsk - Complete, Pending Review
-@item frsm_tsk - Complete, Pending Review
-@item slp_tsk - Stub, Needs to be Fleshed Out
-@item tslp_tsk - Stub, Needs to be Fleshed Out
-@item wup_tsk - Stub, Needs to be Fleshed Out
-@item can_wup - Stub, Needs to be Fleshed Out
-
-@item Notes:
-@itemize @bullet
-@item None
-@end itemize
-
-@end itemize
-
-@item Executive Modifications
-@itemize @bullet
-@item None Expected
-@end itemize
-
-@item Testing
-@itemize @bullet
-@item Functional tests for complete routines.
-@item Yellow line testing needs to be verified.
-@item No Timing Tests
-@end itemize
-
-@item Documentation
-@itemize @bullet
-@item Complete, Pending Review
-@item
-@end itemize
-
-@item ITRON 3.0 API Conformance
-@itemize @bullet
-@item Level E - Extended Functionality
-
-@item Level C - CPU Dependent Functionality
-@itemize @bullet
-@item NA
-@end itemize
-
-@item Level N - Connection Functionality
-@itemize @bullet
-@item Not implemented
-@end itemize
-@end itemize
-
-@end itemize
-
-@c
-@c Semaphore
-@c
-
-@section Semaphore
-
-@itemize @bullet
-
-@item Implementation
-@itemize @bullet
-@item cre_sem - Complete, Pending Review
-@item del_sem - Complete, Pending Review
-@item sig_sem - Complete, Pending Review
-@item wai_sem - Complete, Pending Review
-@item preq_sem - Complete, Pending Review
-@item twai_sem - Complete, Pending Review
-@item ref_sem - Complete, Pending Review
-@end itemize
-
-@item Executive Modifications
-@itemize @bullet
-@item None Required
-@end itemize
-
-@item Testing
-@itemize @bullet
-@item Yellow Lined BUT Timeout Cases Not Actually Executed
-@item No Timing Tests
-@end itemize
-
-@item Documentation
-@itemize @bullet
-@item Complete, Pending Review
-@end itemize
-
-@item ITRON 3.0 API Conformance
-@itemize @bullet
-@item Level E - Extended Functionality
-@itemize @bullet
-@item Complete, Pending Review
-@end itemize
-
-@item Level C - CPU Dependent Functionality
-@itemize @bullet
-@item NA
-@end itemize
-
-@item Level N - Connection Functionality
-@itemize @bullet
-@item Not implemented
-@end itemize
-@end itemize
-
-@end itemize
-
-@c
-@c Eventflags
-@c
-
-@section Eventflags
-
-@itemize @bullet
-
-@item Implementation
-@itemize @bullet
-@item cre_flg - Stub, Needs to be Fleshed Out
-@item del_flg - Stub, Needs to be Fleshed Out
-@item set_flg - Stub, Needs to be Fleshed Out
-@item clr_flg - Stub, Needs to be Fleshed Out
-@item wai_flg - Stub, Needs to be Fleshed Out
-@item pol_flg - Stub, Needs to be Fleshed Out
-@item twai_flg - Stub, Needs to be Fleshed Out
-@item ref_flg - Stub, Needs to be Fleshed Out
-
-@item Notes:
-@itemize @bullet
-@item Similar in Functionality to Classic API Events Manager
-@item Implement Using new SuperCore Event Handler
-@end itemize
-
-@end itemize
-
-@item Executive Modifications
-@itemize @bullet
-@item Add SuperCore Events Object Based on Classic Events
-@item Redo Classic Events to use SuperCore Events
-@end itemize
-
-@item Testing
-@itemize @bullet
-@item No Tests Written
-@item No Timing Tests
-@end itemize
-
-@item Documentation
-@itemize @bullet
-@item Good First Draft.
-@item No Information in Operations.
-@item Should not use "standard-like" language.
-@end itemize
-
-@item ITRON 3.0 API Conformance
-@itemize @bullet
-@item Level E - Extended Functionality
-@itemize @bullet
-@item
-@end itemize
-
-@item Level C - CPU Dependent Functionality
-@itemize @bullet
-@item NA
-@end itemize
-
-@item Level N - Connection Functionality
-@itemize @bullet
-@item Not implemented
-@end itemize
-@end itemize
-
-@end itemize
-
-@c
-@c Mailbox
-@c
-
-@section Mailbox
-
-@itemize @bullet
-
-@item Implementation
-@itemize @bullet
-@item cre_mbx - Stub, Needs to be Fleshed Out
-@item del_mbx - Stub, Needs to be Fleshed Out
-@item snd_msg - Stub, Needs to be Fleshed Out
-@item rcv_msg - Stub, Needs to be Fleshed Out
-@item prcv_msg - Stub, Needs to be Fleshed Out
-@item trcv_msg - Stub, Needs to be Fleshed Out
-@item ref_mbx - Stub, Needs to be Fleshed Out
-
-@item Notes:
-@itemize @bullet
-@item Passes Addresses of Messages
-@item FIFO or Priority Task Blocking
-@item FIFO or Priority Message Ordering
-@item Send Returns Error on Overflow
-@end itemize
-
-@end itemize
-
-@item Executive Modifications
-@itemize @bullet
-@item None
-@end itemize
-
-@item Testing
-@itemize @bullet
-@item No Tests Written
-@item No Timing Tests
-@end itemize
-
-@item Documentation
-@itemize @bullet
-@item Needs More Text
-@item No Information in Background or Operations.
-@item Service Descriptions are Weak.
-@end itemize
-
-@item ITRON 3.0 API Conformance
-@itemize @bullet
-@item Level E - Extended Functionality
-@itemize @bullet
-@item
-@end itemize
-
-@item Level C - CPU Dependent Functionality
-@itemize @bullet
-@item NA
-@end itemize
-
-@item Level N - Connection Functionality
-@itemize @bullet
-@item Not implemented
-@end itemize
-@end itemize
-
-@end itemize
-
-@c
-@c Message Buffer
-@c
-
-@section Message Buffer
-
-@itemize @bullet
-
-@item Implementation
-@itemize @bullet
-@item cre_mbf - Stub, Needs to be Fleshed Out
-@item del_mbf - Stub, Needs to be Fleshed Out
-@item snd_mbf - Stub, Needs to be Fleshed Out
-@item psnd_mbf - Stub, Needs to be Fleshed Out
-@item tsnd_mbf - Stub, Needs to be Fleshed Out
-@item rcv_mbf - Stub, Needs to be Fleshed Out
-@item prcv_mbf - Stub, Needs to be Fleshed Out
-@item trcv_mbf - Stub, Needs to be Fleshed Out
-@item ref_mbf - Stub, Needs to be Fleshed Out
-
-@item Notes:
-@itemize @bullet
-@item Implement Using SuperCore Message Queue Handler
-@item Passes Full Bodies of Messages
-@item FIFO or Priority Task Blocking
-@item FIFO Message Ordering Only
-@item Send (snd_mbf and tsnd_mbf) Blocks on Overflow
-@end itemize
-
-@end itemize
-
-@item Executive Modifications
-@itemize @bullet
-@item SuperCore Message Queue Handler Must Support Blocking Sends. [NOTE:
-This is required for POSIX Message Queues as well.]
-@end itemize
-
-@item Testing
-@itemize @bullet
-@item No Tests Written
-@item No Timing Tests
-@end itemize
-
-@item Documentation
-@itemize @bullet
-@item Good First Draft.
-@item No Information in Operations
-@end itemize
-
-@item ITRON 3.0 API Conformance
-@itemize @bullet
-@item Level E - Extended Functionality
-@itemize @bullet
-@item
-@end itemize
-
-@item Level C - CPU Dependent Functionality
-@itemize @bullet
-@item NA
-@end itemize
-
-@item Level N - Connection Functionality
-@itemize @bullet
-@item Not implemented
-@end itemize
-@end itemize
-
-@end itemize
-
-@c
-@c Rendezvous
-@c
-
-@section Rendezvous
-
-@itemize @bullet
-
-@item Implementation
-@itemize @bullet
-@item cre_por - Stub, Needs to be Fleshed Out
-@item del_por - Stub, Needs to be Fleshed Out
-@item cal_por - Stub, Needs to be Fleshed Out
-@item pcal_por - Stub, Needs to be Fleshed Out
-@item tcal_por - Stub, Needs to be Fleshed Out
-@item acp_por - Stub, Needs to be Fleshed Out
-@item pacp_por - Stub, Needs to be Fleshed Out
-@item tacp_por - Stub, Needs to be Fleshed Out
-@item fwd_por - Stub, Needs to be Fleshed Out
-@item rpl_rdv - Stub, Needs to be Fleshed Out
-@item ref_por - Stub, Needs to be Fleshed Out
-
-@item Notes:
-@itemize @bullet
-@item Hardest ITRON Manager to Implement
-@end itemize
-
-@end itemize
-
-@item Executive Modifications
-@itemize @bullet
-@item Doubtful, Probably Implement in Terms of Multiple SuperCore Objects.
-@end itemize
-
-@item Testing
-@itemize @bullet
-@item No Tests Written
-@item No Timing Tests
-@end itemize
-
-@item Documentation
-@itemize @bullet
-@item Shell, Needs to be Fleshed Out
-@end itemize
-
-@item ITRON 3.0 API Conformance
-@itemize @bullet
-@item Level E - Extended Functionality
-@itemize @bullet
-@item
-@end itemize
-
-@item Level C - CPU Dependent Functionality
-@itemize @bullet
-@item NA
-@end itemize
-
-@item Level N - Connection Functionality
-@itemize @bullet
-@item Not implemented
-@end itemize
-@end itemize
-
-@end itemize
-
-@c
-@c Interrupt
-@c
-
-@section Interrupt
-
-@itemize @bullet
-
-@item Implementation
-@itemize @bullet
-@item def_int - Stub, Needs to be Fleshed Out
-@item ret_int - Stub, Needs to be Fleshed Out
-@item ret_wup - Stub, Needs to be Fleshed Out
-@item loc_cpu - Stub, Needs to be Fleshed Out
-@item unl_cpu - Stub, Needs to be Fleshed Out
-@item dis_int - Stub, Needs to be Fleshed Out
-@item ena_int - Stub, Needs to be Fleshed Out
-@item chg_iXX - Stub, Needs to be Fleshed Out
-@item ref_iXX - Stub, Needs to be Fleshed Out
-
-@item Notes:
-@itemize @bullet
-@item This quote from the ITRON specification needs to be thought about:@*
-@*@i{"When an interrupt is invoked, the interrupt handler defined with
-this system call is started directly by the
-interrupt processing mechanism of the CPU hardware. Accordingly, code at the
-beginning and end of an interrupt handler must save and restore any registers
-used by the interrupt handler."}@*@*
-Based on another comment, in the ret_int description, I think this means
-that RTEMS will not support the TA_ASM style of interrupt handlers --
-only the TA_HLNG style.@*@*
-@i{When TA_HLNG is specified, a high-level language environment setting
-program (a high-level language support routine) is called before branching
-to the inthdr address. The least significant bit (LSB) of the system
-attribute bits is used for this specification.}
-
-@item Specification allows special "interrupt-only" versions of system
-calls named i???_??? (i.e. sig_sem and isig_sem). This does not seem
-to be something that would be implemented with RTEMS. We could provide
-macros mapping them onto the default versions if this is an issue.
-
-@item How this operates versus the behavior of a true TRON chip is
-up for discussion.
-
-@item ret_wup is questionable in only high-level language ISRs.
-
-@item dis_int and ena_int refer to a specific interrupt number. These
-may require hooking back out to the BSP.
-
-@item for chg_iXX and reg_iXX, the XX should be replaced with something
-that is meaningful on a particular CPU.
-@end itemize
-
-@end itemize
-
-@item Executive Modifications
-@itemize @bullet
-@item None Expected
-@end itemize
-
-@item Testing
-@itemize @bullet
-@item No Tests Written
-@item No Timing Tests
-@end itemize
-
-@item Documentation
-@itemize @bullet
-@item Shell, Needs to be Fleshed Out
-@end itemize
-
-@item ITRON 3.0 API Conformance
-@itemize @bullet
-@item Level E - Extended Functionality
-@itemize @bullet
-@item
-@end itemize
-
-@item Level C - CPU Dependent Functionality
-@itemize @bullet
-@item NA
-@end itemize
-
-@item Level N - Connection Functionality
-@itemize @bullet
-@item Not implemented
-@end itemize
-@end itemize
-
-@end itemize
-
-@c
-@c Memory Pool
-@c
-
-@section Memory Pool
-
-@itemize @bullet
-
-@item Implementation
-@itemize @bullet
-@item cre_mpl - Stub, Needs to be Fleshed Out
-@item del_mpl - Stub, Needs to be Fleshed Out
-@item get_blk - Stub, Needs to be Fleshed Out
-@item pget_blk - Stub, Needs to be Fleshed Out
-@item tget_blk - Stub, Needs to be Fleshed Out
-@item rel_blk - Stub, Needs to be Fleshed Out
-@item ref_mpl - Stub, Needs to be Fleshed Out
-
-@item Notes:
-@itemize @bullet
-@item Implement Using SuperCore Heap Handler
-@item Similar to Region in Classic API with Blocking
-@item FIFO or Priority Task Blocking
-@item Specification Deliberately Open on Allocation Algorithm
-@item Multiple Tasks Can be Unblocked by a single rel_blk
-@end itemize
-
-@end itemize
-
-@item Executive Modifications
-@itemize @bullet
-@item None Expected
-@end itemize
-
-@item Testing
-@itemize @bullet
-@item No Tests Written
-@item No Timing Tests
-@end itemize
-
-@item Documentation
-@itemize @bullet
-@item Good First Draft.
-@item No Information in Operations
-@item Should not use "standard-like" language.
-@end itemize
-
-@item ITRON 3.0 API Conformance
-@itemize @bullet
-@item Level E - Extended Functionality
-@itemize @bullet
-@item
-@end itemize
-
-@item Level C - CPU Dependent Functionality
-@itemize @bullet
-@item NA
-@end itemize
-
-@item Level N - Connection Functionality
-@itemize @bullet
-@item Not implemented
-@end itemize
-@end itemize
-
-@end itemize
-
-@c
-@c Fixed Block
-@c
-
-@section Fixed Block
-
-@itemize @bullet
-
-@item Implementation
-@itemize @bullet
-@item cre_mpf - Stub, Needs to be Fleshed Out
-@item del_mpf - Stub, Needs to be Fleshed Out
-@item get_blf - Stub, Needs to be Fleshed Out
-@item pget_blf - Stub, Needs to be Fleshed Out
-@item tget_blf - Stub, Needs to be Fleshed Out
-@item rel_blf - Stub, Needs to be Fleshed Out
-@item ref_mpf - Stub, Needs to be Fleshed Out
-
-@item Notes:
-@itemize @bullet
-@item Implement Using SuperCore Chain Handler
-@item Similar to Partition in Classic API with Blocking
-@item FIFO or Priority Task Blocking
-@item Specification Deliberately Open on Allocation Algorithm
-@item Should add Blocking to Classic API Partition at Same Time
-@end itemize
-
-@end itemize
-
-@item Executive Modifications
-@itemize @bullet
-@item None Expected
-@end itemize
-
-@item Testing
-@itemize @bullet
-@item No Tests Written
-@item No Timing Tests
-@end itemize
-
-@item Documentation
-@itemize @bullet
-@item Good First Draft.
-@item No Information in Background or Operations
-@item Should not use "standard-like" language.
-@end itemize
-
-@item ITRON 3.0 API Conformance
-@itemize @bullet
-@item Level E - Extended Functionality
-@itemize @bullet
-@item
-@end itemize
-
-@item Level C - CPU Dependent Functionality
-@itemize @bullet
-@item NA
-@end itemize
-
-@item Level N - Connection Functionality
-@itemize @bullet
-@item Not implemented
-@end itemize
-@end itemize
-
-@end itemize
-
-@c
-@c Time
-@c
-
-@section Time
-
-@itemize @bullet
-
-@item Implementation
-@itemize @bullet
-@item get_tim - Stub, Needs to be Fleshed Out
-@item set_tim - Stub, Needs to be Fleshed Out
-@item dly_tsk - Stub, Needs to be Fleshed Out
-@item def_cyc - Stub, Needs to be Fleshed Out
-@item act_cyc - Stub, Needs to be Fleshed Out
-@item ref_cyc - Stub, Needs to be Fleshed Out
-@item def_alm - Stub, Needs to be Fleshed Out
-@item ref_alm - Stub, Needs to be Fleshed Out
-@item ret_tmr - Stub, Needs to be Fleshed Out
-
-@item Notes:
-@itemize @bullet
-@item Need to Implement Time Conversion Routines
-@item Epoch is January 1, 1985, 00:00:00 am (GMT).
-@item Cyclic and Alarm Handlers may be TA_ASM or TA_HLNG.
-@item Alarms may be Absolute or Relative Time based.
-@item May Want to Implement a Timer Server Task
-@item Termination via ret_tmr is Not Consistent with Current RTEMS Timers.
-@end itemize
-
-@end itemize
-
-@item Executive Modifications
-@itemize @bullet
-@item None Expected
-@end itemize
-
-@item Testing
-@itemize @bullet
-@item No Tests Written
-@item No Timing Tests
-@end itemize
-
-@item Documentation
-@itemize @bullet
-@item Have Version in Word
-@end itemize
-
-@item ITRON 3.0 API Conformance
-@itemize @bullet
-@item Level E - Extended Functionality
-@itemize @bullet
-@item
-@end itemize
-
-@item Level C - CPU Dependent Functionality
-@itemize @bullet
-@item NA
-@end itemize
-
-@item Level N - Connection Functionality
-@itemize @bullet
-@item Not implemented
-@end itemize
-@end itemize
-
-@end itemize
-
-@c
-@c System
-@c
-
-@section System
-
-@itemize @bullet
-
-@item Implementation
-@itemize @bullet
-@item get_ver - Stub, Needs to be Fleshed Out
-@item ref_sys - Stub, Needs to be Fleshed Out
-@item ref_cfg - Stub, Needs to be Fleshed Out
-@item def_svc - Stub, Needs to be Fleshed Out
-@item def_exc - Stub, Needs to be Fleshed Out
-
-@item Notes:
-@itemize @bullet
-@item May Have to Obtain ITRON "OS Maker" Id
-@item - def_svc seems to imply a trap handler interface
-@item - def_exc needs to be examined.
-@end itemize
-
-@end itemize
-
-@item Executive Modifications
-@itemize @bullet
-@item None Expected
-@end itemize
-
-@item Testing
-@itemize @bullet
-@item No Tests Written
-@item No Timing Tests
-@end itemize
-
-@item Documentation
-@itemize @bullet
-@item Shell, Needs to be Fleshed Out
-@end itemize
-
-@item ITRON 3.0 API Conformance
-@itemize @bullet
-@item Level E - Extended Functionality
-@itemize @bullet
-@item
-@end itemize
-
-@item Level C - CPU Dependent Functionality
-@itemize @bullet
-@item NA
-@end itemize
-
-@item Level N - Connection Functionality
-@itemize @bullet
-@item Not implemented
-@end itemize
-@end itemize
-
-@end itemize
-
-@c
-@c Network Support
-@c
-
-@section Network Support
-
-@itemize @bullet
-
-@item Implementation
-@itemize @bullet
-@item nrea_dat - Stub, Needs to be Fleshed Out
-@item nwri_dat - Stub, Needs to be Fleshed Out
-@item nget_nod - Stub, Needs to be Fleshed Out
-@item nget_ver - Stub, Needs to be Fleshed Out
-
-@item Notes:
-@itemize @bullet
-@item None of these are difficult to implement on top of MPCI
-@item MP Packet formats are well-defined.
-@end itemize
-
-@end itemize
-
-@item Executive Modifications
-@itemize @bullet
-@item None Expected
-@end itemize
-
-@item Testing
-@itemize @bullet
-@item No Tests Written
-@item No Timing Tests
-@end itemize
-
-@item Documentation
-@itemize @bullet
-@item Shell, Needs to be Fleshed Out
-@end itemize
-
-@item ITRON 3.0 API Conformance
-@itemize @bullet
-@item Level E - Extended Functionality
-@itemize @bullet
-@item
-@end itemize
-
-@item Level C - CPU Dependent Functionality
-@itemize @bullet
-@item NA
-@end itemize
-
-@item Level N - Connection Functionality
-@itemize @bullet
-@item Not implemented
-@end itemize
-@end itemize
-
-@end itemize
-
diff --git a/doc/itron3.0/task.t b/doc/itron3.0/task.t
deleted file mode 100644
index 64f100f806..0000000000
--- a/doc/itron3.0/task.t
+++ /dev/null
@@ -1,767 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c This is the chapter from the RTEMS ITRON User's Guide that
-@c documents the services provided by the task
-@c manager.
-@c
-@c $Id$
-@c
-
-@chapter Task Manager
-
-@section Introduction
-
-The task manager is used to directly control and access the state of tasks. Included among these are functions for creating, deleting, starting and terminating tasks, for releasing the WAIT state of tasks, for enabling/disabling task dispatching, for changing task priority levels, for rotatingtasks on the ready queue, and for accessing task state.
-
-The services provided by the task manager are:
-
-@itemize @bullet
-@item @code{cre_tsk} - Create Task
-@item @code{del_tsk} - Delete Task
-@item @code{sta_tsk} - Start Task
-@item @code{ext_tsk} - Exit Issuing Task
-@item @code{exd_tsk} - Exit and Delete Issuing Task
-@item @code{ter_tsk} - Terminate Other Task
-@item @code{dis_dsp} - Disable Dispatch
-@item @code{ena_dsp} - Enable Dispatch
-@item @code{chg_pri} - Change Task Priority
-@item @code{rot_rdq} - Rotate Tasks on the Ready Queue
-@item @code{rel_wai} - Release Wait of Other Task
-@item @code{get_tid} - Get Task Identifier
-@item @code{ref_tsk} - Reference Task Status
-@end itemize
-
-@section Background
-
-@subsection Task Definition
-Many definitions of a task have been proposed in computer literature. Unfortunately, none of these definitions encompasses all facets of the concept in a manner which is operating system independent. Several of the more common definitions are provided to enable each user to select a definition which best matches their own experience and understanding of the task concept:
-
-@itemize @bullet
-@item a "dispatchable" unit.
-@item an entity to which the processor is allocated.
-@item an atomic unit of a real-time, multiprocessor system.
-@item single threads of execution which concurrently compete for resources.
-@item a sequence of closely related computations which can execute concurrently with other computational sequences.
-@item From our implementation perspective, a task is the smallest thread of execution which can compete on its own for system resources. A task is manifested by the existence of a task control block (TCB).
-@end itemize
-
-@subsection Task Manager Task Control Block
- The Task Control Block (TCB) is a defined data structure which contains all the information that is pertinent to the execution of a task. During system initialization, implementation reserves a TCB for each task configured. A TCB is allocated upon creation of the task and is returned to the TCB free list upon deletion of the task.
-
-The TCB's elements are modified as a result of system calls made by the application in response to external and internal stimuli. The TCB contains a task's name, ID, current priority, current and starting states, TCB user extension pointer, scheduling control structures, as well as data required by a blocked task.
-
-A task's context is stored in the TCB when a task switch occurs. When the task regains control of the processor, its context is restored from the TCB. When a task is restarted, the initial state of the task is restored from the starting context area in the task's TCB.
-
-@subsection T_CTSK Structure
-The T_CTSK structure contains detailed information necessary to create the task. Such task attributes, start address, priority and stack size.
-
-@example
-typedef struct t_ctsk @{
- VP exinf; /* extended information */
- ATR tskatr; /* task attributes */
- FP task; /* task start address */
- PRI itskpri; /* initial task priority */
- INT stksz; /* stack size */
- /* additional implementation dependent information may be included */
-@} T_CTSK;
-
-@end example
-
-@subsection Task Manager Task States
-A task may exist in one of the following five states:
-
-@itemize @bullet
-@item RUN - Currently scheduled to the CPU
-@item READY - May be scheduled to the CPU
-@item Wait - Unable to be scheduled to the CPU
-@itemize @bullet
-@item (Specific) WAIT - The task is issued a command to wait on a condition
-@item SUSPEND - Another task suspended execution of the task
-@item WAIT-SUSPEND - Both the WAIT and SUSPEND states apply
-@end itemize
-@item DORMANT - Created task that is not started
-@item NON-EXISTENT - Uncreated or deleted task
-@end itemize
-
-An active task may occupy the RUN, READY, Wait or DORMANT state, otherwise the task is considered NON-EXISTENT. One or more tasks may be active in the system simultaneously. Multiple tasks communicate, synchronize, and compete for system resources with each other via system calls. The multiple tasks appear to execute in parallel, but actually each is dispatched to the CPU for periods of time determined by the scheduling algorithm. The scheduling of a task is based on its current state and priority.
-
-@subsection Task Manager Task Priority
-A task's priority determines its importance in relation to the other tasks executing on the same processor. Our implementation supports 255 levels of priority ranging from 1 to 255. Tasks of numerically smaller priority values are more important tasks than tasks of numerically larger priority values. For example, a task at priority level 5 is of higher privilege than a task at priority level 10. There is no limit to the number of tasks assigned to the same priority.
-
-Each task has a priority associated with it at all times. The initial value of this priority is assigned at task creation time. The priority of a task may be changed at any subsequent time.
-
-Priorities are used by the scheduler to determine which ready task will be allowed to execute. In general, the higher the logical priority of a task, the more likely it is to receive processor execution time.
-
-@section Operations
-
-@subsection Task Manager Creating Tasks
-The cre_tsk directive creates a task specified by tskid. Specifically, a TCB (Task Control Block) is allocated for the task to be created, and initialized according to accompanying parameter values of itskpri, task, stksz, etc. A stack area is also allocated for the task based on the parameter stksz.
-
-@subsection Task Manager Starting and Restarting Tasks
-The sta_tsk directive starts the task specified by tskid. Specifically, it changes the state of the task specified by tskid from DORMANT into RUN/READY. This enables the task to compete, based on its current priority, for the processor and other system resources. Any actions, such as suspension or change of priority, performed on a task prior to starting it are nullified when the task is started.
-
-Stacd can be used to specify parameters to be passed to the task when it is started. This parameter can be read by the task being started, and may be used for transmitting simple messages.
-
-The task priority on starting the task is given by the initial task priority parameter (itskpri) specified when the task was created.
-
-Start request is not queued in this this system call. In other words, if this system call is issued when the target task is not in DORMANT state, the system call will be ignored, and an E_OBJ error returned to the issuing task.
-
-If cre_tsk [level EN] is not implemented on a system, tasks are created statically when the system is started. Parameters required for creating a task, such as task starting address (task) and initial task priority (itskpri) are also specified statically at system startup.
-
-@subsection Task Manager Suspending and Resuming Tasks
-The sus_tsk directive suspends the execution of the task specified by tskid by putting it into SUSPEND state. SUSPEND state is released by issuing the rsm_tsk or frsm_tsk system call.
-
-If the task specified to sus_tsk is already in WAIT state, it will be put in the combined WAIT-SUSPEND state by the execution of sus_tsk. If wait conditions for the task are later fulfilled, it will enter SUSPEND state. If rsm_tsk is issued on the task, it will return to the WAIT state before the suspension.
-
-Both rsm_tsk and fsm_tsk system calls release SUSPEND state of the task specified by tskid. Specifically, they cause SUSPEND state to be released and the execution of the specified task to resume when the task has been suspended by the prior execution of sus_tsk.
-
-If the specified task is in WAIT-SUSPEND state, the execution of rsm_tsk only releases the SUSPEND state, and the task will become WAIT state.
-
-@subsection Task Manager Changing Task Priority
-The chg_pri system call changes the current priority of the task specified by tskid to the value specified by tskpri.
-
-A task may specify itself by specifying tskid = TSK_SELF = 0. Note, however, that an E_ID error will result if tskid = TSK_SELF = 0 is specified to a system call issued from a task-independent portion.
-
-The priority set by this system call remains in effect until the task exits. Once a task enters DORMANT state, its priority prior to exiting is lost. When a task which enters DORMANT state restarts, the initial task priority (itskpri) specified at task creation or at system startup will be used.
-
-@subsection Task Manager Task Deletion
-The del_tsk system call deletes the task specified by tskid. Specifically, it changes the state of the task specified by tskid from DORMANT into NON-EXISTENT (a virtual state not existing on the system), and then clears the TCB and releases stack. An E_OBJ error results if this system call is used on a task which is not DORMANT.
-
-After deletion, another task having the same ID number can be created.
-
-The exd_tsk system call causes the issuing task to exit and then delete itself.
-
-When a task exits, that task does not automatically release all the resources (memory blocks, semaphores, etc.) which it had secured prior to the call. It is the user's responsibility to see to it that all resources are released beforehand.
-
-@section System Calls
-
-This section details the task manager's services.
-A subsection is dedicated to each of this manager's services and describes the calling sequence, related constants, usage, and status codes.
-
-
-@c
-@c cre_tsk
-@c
-
-@page
-@subsection cre_tsk - Create Task
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER cre_tsk(
- ID tskid,
- T_CTSK *pk_ctsk
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_NOMEM} - Insufficient memory (Memory for control block and/or user stack cannot be allocated)
-
-@code{E_ID} - Invalid ID Number (tskid was invalid or could not be used)
-
-@code{E_RSATR} - Reserved attribute (tskatr was invalid or could not be used)
-
-@code{E_OBJ} - Invalid object state (a task of the same ID already exists)
-
-@code{E_OACV} - Object access violation (A tskid less than -4 was specified from a user task. This is implementation dependent.)
-
-@code{E_PAR} - Parameter error (pk_ctsk, task, itskpri and/or stksz is invalid)
-
-@code{EN_OBJNO} - An object number which could not be accessed on the target node is specified.
-
-@code{EN_CTXID} - Specified an object on another node when the system call was issued from a task in dispatch disabled state or from a task-independent portion
-
-@code{EN_PAR} - A value outside the range supported by the target node and/or transmission packet format was specified as a parameter (a value outside supported range was specified for exinf, tskatr, task, itskpri and/or stksz)
-
-@subheading DESCRIPTION:
-This system call creates the task specified by tskid. Specifically, a TCB (Task Control Block) is allocated for the task to be created, and initialized according to accompanying parameter values of itskpri, task, tksz, etc. A stack area is also allocated for the task based on the parameter stksz.
-
-@subheading NOTES:
-User tasks have positive ID numbers, while system tasks have negative ID numbers. User tasks cannot access system objects (objects having negative ID numbers).
-
-The new task created by this system call will be put in DORMANT state.
-
-Extended information (exinf) has been added. This allows the user to include additional information about task attributes. If a larger region is desired for including user information, the user should allocate memory area and set the address of the memory packet to exinf.
-
-Multiprocessing is not supported. Thus none of the "EN_" status codes will be returned.
-
-
-@c
-@c del_tsk
-@c
-
-@page
-@subsection del_tsk - Delete Task
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER del_tsk(
- ID tskid
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_ID} - Invalid ID Number (tskid was invalid or could not be used)
-
-@code{E_NOEXS} - Object does not exist (the task specified by tskid does not exist)
-
-@code{E_OACV} - Object access violation (A tskid less than -4 was specified from a user task. This is implementation dependent.)
-
-@code{E_OBJ} - Invalid object state (the target task is not in DORMANT state)
-
-@code{EN_OBJNO} - An object number which could not be accessed on the target node is specified.
-
-@code{EN_CTXID} - Specified an object on another node when the system call was issued from a task in dispatch disabled state or from a task-independent portion
-
-@subheading DESCRIPTION:
-This system call deletes the task specified by tskid. Specifically, it changes the state of the task specified by tskid from DORMANT into NON-EXISTENT (a virtual state not existing on the system), and then clears the TCB and releases stack. An E_OBJ error results if this system call is used on a task which is not DORMANT.
-
-After deletion, another task having the same ID number can be created.
-
-@subheading NOTES:
-A task cannot delete itself by this system call. An E_OBJ error will result if a task specifies itself, since such a task cannot be DORMANT. Use the exd_tsk system call rather than this one when a task needs to delete itself.
-
-
-@c
-@c sta_tsk
-@c
-
-@page
-@subsection sta_tsk - Start Task
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER sta_tsk(
- ID tskid,
- INT stacd
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_ID} - Invalid ID Number (tskid was invalid or could not be used)
-
-@code{E_NOEXS} - Object does not exist (the task specified by tskid does not exist)
-
-@code{E_OACV} - Object access violation (A tskid less than -4 was specified from a user task. This is implementation dependent.)
-
-@code{E_OBJ} - Invalid object state (the target task is not in DORMANT state)
-
-@code{EN_OBJNO} - An object number which could not be accessed on the target node is specified.
-
-@code{EN_CTXID} - Specified an object on another node when the system call was issued from a task in dispatch disabled state or from a task-independent portion
-
-@code{EN_PAR} - A value outside the range supported by the target node and/or transmission packet format was specified as a parameter (a value outside supported range was specified for stacd)
-
-@subheading DESCRIPTION:
-This system call starts the task specified by tskid. Specifically, it changes the state of the task specified by tskid from DORMANT into RUN/READY.
-
-Stacd can be used to specify parameters to be passed to the task when it is started. This parameter can be read by the task being started, and may be used for transmitting simple messages.
-
-The task priority on starting the task is given by the initial task priority parameter (itskpri) specified when the task was created.
-
-Start request is not queued in this this system call. In other words, if this system call is issued when the target task is not in DORMANT state, the system call will be ignored, and an E_OBJ error returned to the issuing task.
-
-If cre_tsk [level EN] is not implemented on a system, tasks are created statically when the system is started. Parameters required for creating a task, such as task starting address (task) and initial task priority (itskpri) are also specified statically at system startup.
-
-@subheading NOTES:
-
-
-@c
-@c ext_tsk
-@c
-
-@page
-@subsection ext_tsk - Exit Issuing Task
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-void ext_tsk(void);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_CTX} - Context error (issued from task-independent portions or a task in dispatch disabled state)
-
- * System call may detect this error. The error is not returned to the context issuing the system call. Error codes therefore cannot be returned directly as a return parameter of the system call. The behavior on error detection is implementation dependent.
-
-
-@subheading DESCRIPTION:
-This system call causes the issuing task to exit, changing the state of the task into the DORMANT state.
-
-@subheading NOTES:
-When a task exits due to ext_tsk, that task does not automatically release all the resources (memory blocks, semaphores, etc.) which it had obtained prior to the system call. It is the user's responsibility that all resources are released beforehand.
-
-Ext_tsk is a system call which does not return to the issuing context. Accordingly, even if an error code is returned on detection of some error, it is normal for tasks making this system call not to perform any error checking, and it is in fact possible that a program could run out of control. For this reason, even if an error is detected upon issuing this system call, the error is not returned to the task which issued the system call. If information on detected errors is required it should be left in a messagebuffer used as an error log.
-
-In principle, information concerning a task recorded in the TCB, such as task priority, is reset whenever a task is placed in DORMANT state. For example, its task priority after being restarted would be reset to the initial task priority (itskpri) specified by cre_tsk when it was first created, even if a task's priority was changed using chg_pri, then that task exits using ext_tsk, but later started by sta_tsk. Task priority does not return to what it was when ext_tsk was executed.
-
-
-@c
-@c exd_tsk
-@c
-
-@page
-@subsection exd_tsk - Exit and Delete Issuing Task
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-void exd_tsk(void);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_CTX} - Context error (issued from task-independent portions or a task in dispatch disabled state)
-
- * System call may detect the following error. The error is not returned to the context issuing the system call even. Error codes therefore cannot be returned directly as a return parameter of the system call. The behavior on error detection is implementation dependent.
-
-@subheading DESCRIPTION:
-This system call causes the issuing task to exit and then delete itself. In other words the state of the issuing task changes into the NON-EXISTENT (a virtual state not existing on the system).
-
-@subheading NOTES:
-When a task exits with exd_tsk, that task does not automatically release all the resources (memory blocks, semaphores, etc.) which it had secured prior to the call. It is the user's responsibility to see to it that all resources are released beforehand.
-
-Exd_tsk is a system call which does not return any parameters to the original issuing context. Accordingly, even if an error code is returned on detection of some error, it is normal for tasks making this system call not to perform any error checking, and it is in fact possible that a program could run out of control. For this reason, even if an error is detected upon making this system call, it is supposed that the error is not returned to the task which issued the system call. If information on detected errors is required it should be left in a messagebuffer used as an error log.
-
-
-@c
-@c ter_tsk
-@c
-
-@page
-@subsection ter_tsk - Terminate Other Task
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER ter_tsk(
- ID tskid
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_ID} - Invalid ID Number (tskid was invalid or could not be used)
-
-@code{E_NOEXS} - Object does not exist (the task specified by tskid does not exist)
-
-@code{E_OACV} - Object access violation (A tskid less than -4 was specified from a user task. This is implementation dependent.)
-
-@code{E_OBJ} - Invalid object state (the target task is already in DORMANT state or a task invalidly specified itself)
-
-@code{EN_OBJNO} - An object number which could not be accessed on the target node is specified.
-
-@code{EN_CTXID} - Specified an object on another node when the system call was issued from a task in dispatch disabled state or from a task-independent portion
-
-@subheading DESCRIPTION:
-This system call forcibly terminates the task specified by tskid. That is, it changes the state of the task specified by tskid into DORMANT.
-
-Even if the target task is in wait state (including SUSPEND state), its wait state will be released and then it will be terminated. If the target task is on a queue of some sort (such as waiting for a semaphore), it will be removed from that queue by ter_tsk.
-
-A task cannot specify the issuing task in this system call. An E_OBJ error will result if a task specifies itself.
-
-There is an intermediate state waiting for the response (TR packet or TA packet) from the target node after executing the system call to access the other node and making a request (sending a TP packet) to the node. This state is called the "connection function response wait (TTW_NOD)" state. The ter_tsk system call may specify tasks which are in the connection function response wait state. Tasks which are waiting for objects (such as a semaphore) on another node may also be specified to this system call. In such cases, ter_tsk will halt any system calls accessing other nodes which have been issued by the task to be terminated.
-
-@subheading NOTES:
-When a task is terminated by ter_tsk, that task does not automatically release all the resources (memory blocks, semaphores, etc.) which it had obtained prior to the call. It is the user's responsibility to see to it that all resources are released beforehand.
-
-In principle, information concerning a task recorded in the TCB, such as task priority, is reset whenever a task is placed in DORMANT state. For example, its task priority after being restarted would be reset to the initial task priority (itskpri) specified by cre_tsk when it was first created, even if a task's priority was changed using chg_pri, then that task is terminated by ter_tsk, but later started by sta_tsk. Task priority does not return to what it was when ter_tsk was executed.
-
-
-@c
-@c dis_dsp
-@c
-
-@page
-@subsection dis_dsp - Disable Dispatch
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER dis_dsp(void);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_CTX} - Context error (issued from task-independent portions or issued after execution of loc_cpu)
-
-@subheading DESCRIPTION:
-This system call disables task dispatching. Dispatching will remain disabled after this call is issued until a subsequent call to ena_dsp is issued. The status of the issuing task will not be allowed to be changed to READY from the RUN. It cannot be changed into WAIT, either. However, since external interrupt is not disabled, interrupt handlers are allowed to run even when dispatching has been disabled. While an executing task may be preempted by an interrupt handler with dispatching disabled, there is no possibility that it will be preempted by another task.
-
-The following operations occur during the time dispatching is disabled.
-@itemize @bullet
-@item Even in a situation where normally a task issuing dis_dsp should be preempted by a system call issued by an interrupt handler or by the task issuing dis_dsp, the task that should normally be executed is not dispatched. Instead, dispatching of this task is delayed until dispatch disabled state is cleared by ena_dsp.
-
-@item If an interrupt handler invoked during dispatch disabled state issues sus_tsk for a running task (one that executed dis_dsp) to put it in SUSPEND state, or ter_tsk to put it in DORMANT state, the task transition is delayed until dispatch disabled state is cleared.
-
-@item An E_CTX error will result if the task which has executed dis_dsp issues any system calls (such as slp_tsk or wai_sem) capable of putting an issuing task into WAIT state.
-
-@item An EN_CTXID error will result if a task which has executed dis_dsp attempts to operate on objects on another node (that is, if the ID parameter of the system call issued refers to an object on another node).
-
-@item TSS_DDSP will be returned as sysstat if system status is referenced using ref_sys.
-@end itemize
-No error will result if a task already in dispatch disable state issues dis_dsp. It only keeps dispatch disabled state. No matter how many times dis_dsp has been issued, a single ena_dsp enables dispatching again. It is therefore for the user to determine what to do with nested pairs of dis_dsp and ena_dsp.
-
-An E_CTX error will result if dis_dsp is issued when both interrupt and dispatching are disabled with loc_cpu. (For details, see the description of loc_cpu.)
-
-@subheading NOTES:
-A running task cannot enter DORMANT or NON-EXISTENT state while dispatching is disabled. An E_CTX error will result if an running task issues either ext_tsk or exd_tsk while interrupt and dispatching are disabled. Note however that since both ext_tsk and exd_tsk are system calls which do not return to their original contexts, error notification using return parameters of these system calls is not possible. If information on detected errors is required it should be left in a messagebuffer used as an error log.
-
-Only if the system is not a multiprocessor configuration, system can take advantage of the dispatch disabled state for exclusive inter-task control.
-
-
-@c
-@c ena_dsp
-@c
-
-@page
-@subsection ena_dsp - Enable Dispatch
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER ena_dsp(void);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_CTX} - Context error (issued from task-independent portions or issued after execution of loc_cpu)
-
-@subheading DESCRIPTION:
-This system call enables task dispatching, that is, it finishes dispatch disabled state caused by the execution of dis_dsp.
-
-No error will result if a task which is not in dispatch disabled state issues ena_dsp. In this case, dispatching will just remain enabled.
-
-An E_CTX error will result if ena_dsp is issued when both interrupt and dispatching are disabled with loc_cpu. (For details, see the description of loc_cpu.)
-
-@subheading NOTES:
-
-
-@c
-@c chg_pri
-@c
-
-@page
-@subsection chg_pri - Change Task Priority
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER chg_pri(
- ID tskid,
- PRI tskpri
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_ID} - Invalid ID Number (tskid was invalid or could not be used)
-
-@code{E_NOEXS} - Object does not exist (the task specified by tskid does not exist)
-
-@code{E_OACV} - Object access violation (A tskid less than -4 was specified from a user task. This is implementation dependent.)
-
-@code{E_PAR} - Parameter error (the value of tskpri is invalid or may not be used)
-
-@code{E_OBJ} - Invalid object state (the target task is in DORMANT state)
-
-@code{EN_OBJNO} - An object number which could not be accessed on the target node is specified.
-
-@code{EN_CTXID} = Specified an object on another node when the system call was issued from a task in dispatch disabled state or from a task-independent portion
-
-@code{EN_PAR} - A value outside the range supported by the target node and/or transmission packet format was specified as a parameter (a value outside supported range was specified for tskpri)
-
-@subheading DESCRIPTION:
-This system call changes the current priority of the task specified by tskid to the value specified by tskpri.
-
-Under uITRON 3.0 specification, at least any value of 1 through 8 can be specified as task priority. The smaller the value, the higher the priority. Priority levels -4 through 0 are reserved, and they may not be used. Priority levels outside this range (including negative values) may also be specified depending on the implementation; this is considered an extended function [level X] for which compatibility and connectivity are not guaranteed. In general, negative priority levels are reserved for use by the system.
-
-A task may specify itself by specifying tskid = TSK_SELF = 0. Note, however, that an E_ID error will result if tskid = TSK_SELF = 0 is specified to a system call issued from a task-independent portion. The priority set by this system call remains in effect until the task exits. Once a task enters DORMANT state, its priority prior to exiting is lost. When a task which enters DORMANT state restarts, the initial task priority (itskpri) specified at task creation or at system startup will be used.
-
-If the target task is linked to ready queue or any other queue, this system call may result in the re-ordering of the queues. If chg_pri is executed on a task waiting on the ready queue (including tasks in RUN state) or other priority-based queue, the target task will be moved to the end of the part of the queue for the associated priority. If the priority specified is the same as the current priority, the task will still be moved behind other tasks of the same priority. It is therefore possible for a task to relinquish its execution privileges using chg_pri on itself by specifying its current priority.
-
-@subheading NOTES:
-Depending on the implementation, specifying tskpri = TPRI_INI = 0 may cause a task's priority to be reset to the initial task priority (itskpri) which was defined when it was first created or when the system started. This feature is used in some implementations in order to reset the task priority to its original value after setting it to a higher value for indivisible processing. This feature is an extended function [level X] for which compatibility and connectivity are not guaranteed.
-
-
-@c
-@c rot_rdq
-@c
-
-@page
-@subsection rot_rdq - Rotate Tasks on the Ready Queue
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER rot_rdq(
- PRI tskpri
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_PAR} - Parameter error (the value of tskpri is invalid)
-
-@subheading DESCRIPTION:
-This system call rotates tasks on the ready queue associated with the priority level specified by tskpri. Specifically, the task at the head of the ready queue of the priority level in question is moved to the end of the ready queue, thus switching the execution of tasks having the same priority. Round robin scheduling may be implemented by periodically issuing this system call in a given period of time.
-
-When rot_rdq is issued by task portions with tskpri = TPRI_RUN = 0, the ready queue with the priority level of the issuing task is rotated.
-
-When TPRI_RUN or a task's own priority level are specified for tskpri to rot_rdq, the task issuing the system call will be placed on the end of its ready queue. In other words, task can issue rot_rdq to relinquishing its execution privileges. The concept of "ready queue" envisioned in the description of this system call is one which includes the task in RUN state.
-
-This system call does nothing if there are no tasks on the ready queue of the specified priority. No error will result.
-
-This system call cannot rotate ready queues on other nodes.
-
-@subheading NOTES:
-Depending on the implementation, it may be possible to issue rot_rdq(tskpri = TPRI_RUN) from task-independent portions, such as a cyclic handler. In this case the ready queue including the running task, or the ready queue including the highest priority task, is rotated. Normally these two are the same, but not always, as when task dispatching is delayed. In that case it is implementation dependent whether to rotate the ready queue including the running task or the ready queue including the highest priority task. Note that this is an extended function [Level X] for which compatibility and connectivity are not guaranteed.
-
-
-@c
-@c rel_wai
-@c
-
-@page
-@subsection rel_wai - Release Wait of Other Task
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER rel_wai(
- ID tskid
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_ID} - Invalid ID Number (tskid was invalid or could not be used)
-
-@code{E_NOEXS} - Object does not exist (the task specified by tskid does not exist)
-
-@code{E_OACV} - Object access violation (A tskid less than -4 was specified from a user task. This is implementation dependent.)
-
-@code{E_OBJ} - Invalid object state (the target task is not in WAIT state (including when it is in DORMANT state or when the issuing task specifies itself))
-
-@code{EN_OBJNO} - An object number which could not be accessed on the target node is specified.
-
-@code{EN_CTXID} - Specified an object on another node when the system call was issued from a task in dispatch disabled state or from a task-independent portion
-
-@subheading DESCRIPTION:
-This system call forcibly releases WAIT state (not including SUSPEND state)
-of the task specified by tskid.
-
-An E_RLWAI error is returned to the task whose WAIT state has been released using rel_wai.
-
-Wait release requests by rel_wai are not queued. In other words, if the task specified by tskid is already in WAIT state, the WAIT state is released, otherwise an E_OBJ error will be returned to the issuer. An E_OBJ error will also result when a task specifies itself to this system call.
-
-Rel_wai does not release SUSPEND state. If rel_wai is issued on a task in WAIT-SUSPEND state, WAIT will be released but SUSPEND will continue for that task. When SUSPEND should also be released, the frsm_tsk system call must be issued separately.
-
-@subheading NOTES:
-A function similar to timeout can be implemented using an alarm handler which issues this system call on tasks specified time after they have entered WAIT state.
-
-Rel_wai and wup_tsk differ in the following points.
-@itemize @bullet
-@item Wup_tsk can only release the WAIT state by slp_tsk or tslp_tsk, while rel_wai can release WAIT states caused by these and other calls (including wai_flg, wai_sem, rcv_msg, get_blk, etc.).
-@item As seen from the target task, releasing WAIT state with wup_tsk results in a normal completion (E_OK), whereas releasing WAIT state with rel_wai results in an error (E_RLWAI).
-@item When wup_tsk is used, a request is queued even if neither slp_tsk nor tslp_tsk have been executed on the target task yet. When rel_wai is used to the task which is not in WAIT state, an E_OBJ error will result.
-@end itemize
-
-
-@c
-@c get_tid
-@c
-
-@page
-@subsection get_tid - Get Task Identifier
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER get_tid(
- ID *p_tskid
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@subheading DESCRIPTION:
-This system call gets the ID of the issuing task.
-
-If this system call is issued from a task-independent portion, tskid will be FALSE=0.
-
-@subheading NOTES:
-
-
-@c
-@c ref_tsk
-@c
-
-@page
-@subsection ref_tsk - Reference Task Status
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER ref_tsk(
- T_RTSK *pk_rtsk,
- ID tskid
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_ID} - Invalid ID Number (tskid was invalid or could not be used)
-
-@code{E_NOEXS} - Object does not exist (the task specified by tskid does not exist)
-
-@code{E_OACV} - Object access violation (A tskid less than -4 was specified from a user task. This is implementation dependent.)
-
-@code{E_PAR} - Parameter error (the packet address for return parameters cannot be used)
-
-@code{EN_OBJNO} - An object number which could not be accessed on the target node is specified.
-
-@code{EN_CTXID} - Specified an object on another node when the system call was issued from a task in dispatch disabled state or from a task-independent portion
-
-@code{EN_RPAR} - A value outside the range supported by the requesting node and/or transmission packet format was returned as a return parameter (a value outside supported range was returned for exinf, tskpri and/or tskstat)
-
-@subheading DESCRIPTION:
-This system call refers to the state of the task specified by tskid, and returns its current priority (tskpri), its task state (tskstat), and its extended information (exinf).
-
-Tskstat may take the following values.
-
- tskstat:
-@itemize @bullet
-@item TTS_RUN H'0...01 RUN state (currently running)
-@item TTS_RDY H'0...02 READY state (ready to run)
-@item TTS_WAI H'0...04 WAIT state (waiting for something)
-@item TTS_SUS H'0...08 SUSPEND state (forcibly made to wait)
-@item TTS_WAS H'0...0c WAIT-SUSPEND state
-@item TTS_DMT H'0...10 DORMANT state
-@end itemize
-
-Since these task states are expressed by bit correspondences they are convenient when looking for OR conditions (such as whether a task is in RUN or READY state). TTS_WAS is a combination of both TTS_SUS and TTS_WAI, TTS_SUS does not combine with any of the other states (TTS_RUN, TTS_RDY or TTS_DMT).
-
-A task may specify itself by specifying tskid = TSK_SELF = 0. Note, however, that an E_ID error will result if tskid = TSK_SELF = 0 is specified when this system call is issued from a task-independent portion.
-
-An E_NOEXS error will result if the task specified to ref_tsk does not exist.
-
-Tskstat will be TTS_RUN if ref_tsk is executed specifying a task which has been interrupted by an interrupt handler.
-
-@subheading NOTES:
-The values of TTS_RUN, TTS_RDY, TTS_WAI, etc. as return values for tskstat are not necessarily the same value to be entered in the TCB. The way in which task state is represented in the TCB is implementation dependent. When ref_tsk is executed, the internal representation of task state may simply be converted to the standard values TTS_RUN, TTS_RDY, TTS_WAI, etc.
-
-Depending on the implementation, the following additional information can also be referenced in addition to exinf, tskpri and tskstat.
-
-@itemize @bullet
-@item tskwait Reason for wait
-@item wid Wait object ID
-@item wupcnt Number of queued wakeup requests
-@item suscnt Number of nested SUSPEND requests
-@item tskatr Task attributes
-@item task Task starting address
-@item itskpri Initial task priority
-@item stksz Stack size
-@end itemize
-
-
-
-
-
diff --git a/doc/itron3.0/tasksync.t b/doc/itron3.0/tasksync.t
deleted file mode 100644
index 244f64893f..0000000000
--- a/doc/itron3.0/tasksync.t
+++ /dev/null
@@ -1,388 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c This is the chapter from the RTEMS ITRON User's Guide that
-@c documents the services provided by the task-dependent synchronization
-@c manager.
-@c
-@c $Id$
-@c
-
-@chapter Task-Dependent Synchronization Manager
-
-@section Introduction
-
-The task-dependent synchronization manager is designed to utilize those synchronization
-functions already supported by tasks. This includes functions that suspend tasks for a while and associated functions that release SUSPEND state, and synchronization functions which make tasks wait and wake them up.
-
-The services provided by the task-dependent synchronization manager are:
-
-@itemize @bullet
-@item @code{sus_tsk} - Suspend Other Task
-@item @code{rsm_tsk} - Resume Suspended Task
-@item @code{frsm_tsk} - Forcibly Resume Suspended Task
-@item @code{slp_tsk} - Sleep Task
-@item @code{tslp_tsk} - Sleep Task with Timeout
-@item @code{wup_tsk} - Wakeup Other Task
-@item @code{can_wup} - Cancel Wakeup Request
-@end itemize
-
-@section Operations
-@subsection Suspend Other Task
-This call stops the execution of a task by putting it into a SUSPEND state. This call is not able to specify itself, since this would end the flow of execution altogether. If the task is already in a WAIT state, then SUSPEND is added to become WAIT-SUSPEND. These modes are turned on and off separately, without affecting one another. Furthermore, SUSPEND states can be nested, and tasks in a SUSPEND state are allocated resources as normal.
-
-@subsection Resume Suspended Task
-This operation restarts the execution of a task that was previously stopped by the SUSPEND OTHER TASK call. Obviously, a task cannot specify itself using this call. Since SUSPEND states can be nested, one call to RESUME releases only one SUSPEND. Thus, it takes as many RESUMES as SUSPENDS to return the task to execution.
-
-@subsection Forcibly Resume Suspended Task
-This call has the same functionality as the previously mentioned Resume Suspended Task with one exception. This call releases all nested SUSPENDS at once, which guarantees the task will return to execution.
-
-@subsection Sleep Task
-The Sleep Task operation causes the specified task to sleep until a Wakeup Task function is called. This puts the task in a WAIT state. WAIT states can not be nested, but can be combined with SUSPEND states as mentioned earlier.
-
-@subsection Sleep Task with Timeout
-This function is identical to the Sleep Task function with an added timeout attribute. If the timeout mark is reached before a Wakeup call is recieved, an error is generated.
-
-@subsection Wakeup Other Task
-The Wakeup Other Task call is used to release the WAIT state of a task. These calls can be previously queued using the wupcnt value so that when the matching Sleep Task is executed, there will be no delay.
-
-@subsection Cancel Wakeup Request
-This function call resets the value of wupcnt to zero, thereby canceling all associated wakeup requests. A call to self is acceptable for this operation, and may even be useful for monitoring certain situations.
-
-@section System Calls
-
-This section details the task-dependent synchronization manager's services. A subsection is dedicated to each of this manager's services and describes the calling sequence, related constants, usage, and status codes.
-
-
-@c
-@c sus_tsk
-@c
-
-@page
-@subsection sus_tsk - Suspend Other Task
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER sus_tsk(
- ID tskid
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_ID} - Invalid ID Number (tskid was invalid or could not be used)
-
-@code{E_NOEXS} - Object does not exist (the task specified by tskid does not exist)
-
-@code{E_OACV} - Object access violation (A tskid less than -4 was specified from a user task. This is implementation dependent.)
-
-@code{E_OBJ} - Invalid object state (the specified task is in DORMANT state or the issuing task specified itself)
-
-@code{E_QOVR} - Queuing or nesting overflow (the number of nesting levels given by suscnt went over the maximum allowed)
-
-@code{EN_OBJNO} - An object number which could not be accessed on the target node is specified.
-
-@code{EN_CTXID} - Specified an object on another node when the system call was issued from a task in dispatch disabled state or from a task-independent portion
-
-@subheading DESCRIPTION:
-This system call suspends the execution of the task specified by tskid by putting it into SUSPEND state.
-
-SUSPEND state is released by issuing the rsm_tsk or frsm_tsk system call. If the task specified to sus_tsk is already in WAIT state, it will be put in the combined WAIT-SUSPEND state by the execution of sus_tsk. If wait conditions for the task are later fulfilled, it will enter SUSPEND state. If rsm_tsk is issued on the task, it will return to the WAIT state before the suspension.
-
-Since SUSPEND state indicates the suspension of execution by a system call issued from another task, a task may not specify itself to this system call. An E_OBJ error will result if a task specifies itself.
-
-If more than one sus_tsk call is issued to a task, that task will be put in multiple SUSPEND states. This is called suspend request nesting. When this is done, rsm_tsk must be issued the same number of times which sus_tsk was issued (suscnt) in order to return the task to its original state before the suspension. This means it is possible to nest the pairs of sus_tsk and rsm_tsk.
-
-The maximum number of times suspend requests may be nested, and even whether or not suspend request nesting (the ability to issue sus_tsk on the same task more than once) is even allowed, is implementation dependent. Suspend request nesting is considered an extended function [level X] for which compatibility and connectivity are not guaranteed.
-
-An E_QOVR error will result if sus_tsk is issued more than once on the same task on a system which does not support suspend request nesting or if it is issued more than the maximum number of times allowed.
-
-@subheading NOTES:
-A task which is suspended in addition to waiting for resources (such as waiting for a semaphore) can be allocated resources (such as semaphore counts) based on the same conditions as tasks which are not suspended. Even when suspended, the allocation of resources is not delayed in any way. Conditions concerning resource allocation and release of the wait state remain unchanged. In other words, SUSPEND state is completely independent of other processing and task states. If it is desirable to delay the allocation of resources to a task which is suspended, the user should use chg_pri in conjunction with sus_tsk and rsm_tsk.
-
-@c
-@c rsm_tsk
-@c
-
-@page
-@subsection rsm_tsk - Resume Suspended Task
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER rsm_tsk(
- ID tskid
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_ID} - Invalid ID Number (tskid was invalid or could not be used)
-
-@code{E_NOEXS} - Object does not exist (the task specified by tskid does not exist)
-
-@code{E_OACV} - Object access violation (A tskid less than -4 was specified from a user task. This is implementation dependent.)
-
-@code{E_OBJ} - Invalid object state (the target task is not in SUSPEND state (including when it is DORMANT or when the issuing task specifies itself))
-
-@code{EN_OBJNO} - An object number which could not be accessed on the target node is specified.
-
-@code{EN_CTXID} - Specified an object on another node when the system call was issued from a task in dispatch disabled state or from a task-independent portion
-
-@subheading DESCRIPTION:
-This system call releases SUSPEND state of the task specified by tskid. Specifically, it causes SUSPEND state to be released and the execution of the specified task to resume when the task has been suspended by the prior execution of sus_tsk.
-If the specified task is in WAIT-SUSPEND state, the execution of rsm_tsk only releases the SUSPEND state, and the task will become WAIT state.
-
-A task cannot specify itself to this system call. An E_OBJ error will result if a task specifies itself.
-
-Rsm_tsk only releases one suspend request from the suspend request nest (suscnt). Accordingly, if more than one sus_tsk has been issued on the task in question (suscnt >= 2), that task will remain suspended even after the execution of rsm_tsk is completed.
-
-@subheading NOTES:
-It is implementation dependent which location in the ready queue a task returns to after the task which has been suspended from RUN or READY state is resumed by rsm_tsk.
-
-@c
-@c frsm_tsk
-@c
-
-@page
-@subsection frsm_tsk - Forcibly Resume Suspended Task
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER ercd =frsm_tsk(
- ID tskid
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_ID} - Invalid ID Number (tskid was invalid or could not be used)
-
-@code{E_NOEXS} - Object does not exist (the task specified by tskid does not exist)
-
-@code{E_OACV} - Object access violation (A tskid less than -4 was specified from a user task. This is implementation dependent.)
-
-@code{E_OBJ} - Invalid object state (the target task is not in SUSPEND state (including when it is DORMANT or when the issuing task specifies itself))
-
-@code{EN_OBJNO} - An object number which could not be accessed on the target node is specified.
-
-@code{EN_CTXID} - Specified an object on another node when the system call was issued from a task in dispatch disabled state or from a task-independent portion
-
-@subheading DESCRIPTION:
-This system call releases SUSPEND state of the task specified by tskid. Specifically, it causes SUSPEND state to be released and the execution of the specified task to resume when the task has been suspended by the prior execution of sus_tsk. If the specified task is in WAIT-SUSPEND state, the execution of rsm_tsk only releases the SUSPEND state, and the task will become WAIT state.
-
-A task cannot specify itself to this system call. An E_OBJ error will result if a task specifies itself.
-
-Frsm_tsk will clear all suspend requests (suscnt = 0) even if more than one sus_tsk has been issued (suscnt >= 2) on the same task. In other words, SUSPEND state is guaranteed to be released, and execution will resume unless the task in question had been in combined WAIT-SUSPEND state.
-
-@subheading NOTES:
-It is implementation dependent which location in the ready queue a task returns to after the task which has been suspended from RUN or READY state is resumed by frsm_tsk.
-
-
-@c
-@c slp_tsk
-@c
-
-@page
-@subsection slp_tsk - Sleep Task Sleep Task with Timeout
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER slp_tsk( void );
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_PAR} - Parameter error (a timeout value -2 or less was specified)
-
-@code{E_RLWAI} - WAIT state was forcibly released (rel_wai was received while waiting)
-
-@code{E_TMOUT} - Polling failure or timeout exceeded
-
-@code{E_CTX} - Context error (issued from task-independent portions or a task in dispatch disabled state)
-
-@subheading DESCRIPTION:
-
-This system call puts the issuing task (which was in RUN state) into WAIT state, causing the issuing task to sleep until wup_tsk is invoked.
-
-@subheading NOTES:
-Since the slp_tsk system call causes the issuing task to enter WAIT state, slp_tsk calls may not be nested. It is possible, however, for another task to execute a sus_tsk on a task which has put itself in WAIT state using slp_tsk. If this happens, the task will enter the combined WAIT-SUSPEND state.
-
-No polling function for slp_tsk is provided. A similar function can be implemented if necessary using can_wup.
-
-@c
-@c tslp_tsk
-@c
-
-@page
-@subsection tslp_tsk - Sleep Task with Timeout
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER ercd =tslp_tsk(
- TMO tmout
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_PAR} - Parameter error (a timeout value -2 or less was specified)
-
-@code{E_RLWAI} - WAIT state was forcibly released (rel_wai was received while waiting)
-
-@code{E_TMOUT} - Polling failure or timeout exceeded
-
-@code{E_CTX} - Context error (issued from task-independent portions or a task in dispatch disabled state)
-
-@subheading DESCRIPTION:
-The tslp_tsk system call is the same as slp_tsk but with an additional timeout feature. If a wup_tsk is issued before the period of time specified by tmout elapses, tslp_tsk will complete normally. An E_TMOUT error will result if no wup_tsk is issued before the time specified by tmout expires. Specifying tmout = TMO_FEVR = -1 can be used to set the timeout period to forever (no timeout). In this case, tslp_tsk will function exactly the same as slp_tsk causing the issuing task to wait forever for wup_tsk to be issued.
-
-@subheading NOTES:
-Since the tslp_tsk system call causes the issuing task to enter WAIT state, tslp_tsk calls may not be nested. It is possible, however, for another task to execute a sus_tsk on a task which has put itself in WAIT state using tslp_tsk. If this happens, the task will enter the combined WAIT-SUSPEND state.
-
-If you simply wish to delay a task (make it wait for a while), use dly_tsk rather than tslp_tsk.
-
-@c
-@c wup_tsk
-@c
-
-@page
-@subsection wup_tsk - Wakeup Other Task
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER wup_tsk(
- ID tskid
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_ID} - Invalid ID Number (tskid was invalid or could not be used)
-
-@code{E_NOEXS} - Object does not exist (the task specified by tskid does not exist)
-
-@code{E_OACV} - Object access violation (A tskid less than -4 was specified from a user task. This is implementation dependent.)
-
-@code{E_OBJ} - Invalid object state (the specified task is in DORMANT state or the issuing task specified itself)
-
-@code{E_QOVR} - Queuing or nesting overflow (wakeup request queuing count will exceed the maximum value allowed for wupcnt)
-
-@code{EN_OBJNO} - An object number which could not be accessed on the target node is specified.
-
-@code{EN_CTXID} - Specified an object on another node when the system call was issued from a task in dispatch disabled state or from a task-independent portion
-
-@subheading DESCRIPTION:
-This system call releases the WAIT state of the task specified by tskid caused by the execution of slp_tsk or tslp_tsk.
-
-A task cannot specify itself in this system call. An E_OBJ error will result if a task specifies itself.
-
-If the specified task is not in the WAIT state caused by a slp_tsk or tslp_tsk, the wakeup request based on the wup_tsk call will be queued. In other words, a record will be kept that a wup_tsk has been issued for the specified task and no WAIT state will result even if slp_tsk or tslp_tsk is executed by the task later. This is called queuing for wakeup request.
-
-@subheading NOTES:
-Wakeup requests are queued as follows. A wakeup request queuing count (wupcnt) is kept in the TCB for each task. Initially (when sta_tsk is executed) the value of wupcnt is 0. Executing wup_tsk on a task which is not waiting for a wakeup increments the wakeup request queuing count by one for the specified task. If slp_tsk or tslp_tsk is executed on that task, its wakeup request queuing count will be decremented by one. If the task with wakeup request queuing count = 0 executes slp_tsk or tslp_tsk, that task will be put in WAIT state rather than decrementing the wakeup request queuing count.
-
-It is always possible to queue at least one wup_tsk (wupcnt = 1); the maximum allowable number for the wakeup request queuing count (wupcnt) is implementation dependent, and may be any number higher than or equal to one. In other words, while the first wup_tsk issued to a task which is not waiting for a wakeup will not result in an error, it is implementation dependent whether or not any further wup_tsk calls on the same task will result in an error. The ability to queue more than one wakeup request is considered an extended function [level X] for which compatibility and connectivity are not guaranteed.
-
-An E_QOVR error will result if wup_tsk is issued more than the maximum value allowed for the wakeup request queuing count (wupcnt).
-
-
-@c
-@c can_wup
-@c
-
-@page
-@subsection can_wup - Cancel Wakeup Request
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER can_wup(
- INT *p_wupcnt,
- ID tskid
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{E_OK} - Normal Completion
-
-@code{E_ID} - Invalid ID Number (tskid was invalid or could not be used)
-
-@code{E_NOEXS} - Object does not exist (the task specified by tskid does not exist)
-
-@code{E_OACV} - Object access violation (A tskid less than -4 was specified from a user task. This is implementation dependent.)
-
-@code{E_OBJ} - Invalid object state (the target task is in DORMANT state)
-
-@code{EN_OBJNO} - An object number which could not be accessed on the target node is specified.
-
-@code{EN_CTXID} - Specified an object on another node when the system call was issued from a task in dispatch disabled state or from a task-independent portion
-
-@code{EN_RPAR} - A value outside the range supported by the issuing node and/or transmission packet format was returned as a return parameter (a value outside supported range was returned for wupcnt)
-
-@subheading DESCRIPTION:
-This system call returns the wakeup request queuing count (wupcnt) for the task specified by tskid while canceling all associated wakeup requests. Specifically, it resets the wakeup request queuing count (wupcnt) to 0.
-
-A task may specify itself by specifying tskid = TSK_SELF = 0. Note, however, that an E_ID error will result if tskid = TSK_SELF = 0 is specified when this system call is issued from a task-independent portion.
-
-@subheading NOTES:
-An EN_RPAR error will result if the number of bits used on the target node is larger than that used on the requesting node, and if a value not supported by the requesting node is returned for wupcnt.
-
-This system call can be used to determine whether or not processing has ended within a certain period when a task should periodically waken up by wup_tsk and do some processing. In other words, if a task monitoring the progress of its processing issues can_wup before issuing a slp_tsk after finishing processing associated with a previous wakeup request, and if wupcnt, one of can_wup's return parameters, is equal to or greater than one, it indicates that the processing for the previous wakeup request does not complete within a required time. This allows the monitoring task to take actions against processing delays.
-
-
diff --git a/doc/itron3.0/time.t b/doc/itron3.0/time.t
deleted file mode 100644
index d943fda449..0000000000
--- a/doc/itron3.0/time.t
+++ /dev/null
@@ -1,310 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c This is the chapter from the RTEMS ITRON User's Guide that
-@c documents the services provided by the time
-@c manager.
-@c
-@c $Id$
-@c
-
-@chapter Time Manager
-
-@section Introduction
-
-The
-time manager is ...
-
-The services provided by the time manager are:
-
-@itemize @bullet
-@item @code{get_tim} - Get System Clock
-@item @code{set_tim} - Set System Clock
-@item @code{dly_tsk} - Delay Task
-@item @code{def_cyc} - Define Cyclic Handler
-@item @code{act_cyc} - Activate Cyclic Handler
-@item @code{ref_cyc} - Reference Cyclic Handler Status
-@item @code{def_alm} - Define Alarm Handler
-@item @code{ref_alm} - Reference Alarm Handler Status
-@item @code{ret_tmr} - Return from Timer Handler
-@end itemize
-
-@section Background
-
-@section Operations
-
-@section System Calls
-
-This section details the time manager's services.
-A subsection is dedicated to each of this manager's services
-and describes the calling sequence, related constants, usage,
-and status codes.
-
-
-@c
-@c get_tim
-@c
-
-@page
-@subsection get_tim - Get System Clock
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER get_tim(
- SYSTIME *pk_tim
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{EXXX} -
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-
-@c
-@c set_tim
-@c
-
-@page
-@subsection set_tim - Set System Clock
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER set_tim(
- SYSTIME *pk_tim
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{EXXX} -
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-
-@c
-@c dly_tsk
-@c
-
-@page
-@subsection dly_tsk - Delay Task
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER dly_tsk(
- DLYTIME dlytim
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{EXXX} -
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-
-@c
-@c def_cyc
-@c
-
-@page
-@subsection def_cyc - Define Cyclic Handler
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER def_cyc(
- HNO cycno,
- T_DCYC *pk_dcyc
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{EXXX} -
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-
-@c
-@c act_cyc
-@c
-
-@page
-@subsection act_cyc - Activate Cyclic Handler
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER act_cyc(
- HNO cycno,
- UINT cycact
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{EXXX} -
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-
-@c
-@c ref_cyc
-@c
-
-@page
-@subsection ref_cyc - Reference Cyclic Handler Status
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER ref_cyc(
- T_RCYC *pk_rcyc,
- HNO cycno
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{EXXX} -
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-
-@c
-@c def_alm
-@c
-
-@page
-@subsection def_alm - Define Alarm Handler
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER def_alm(
- HNO almno,
- T_DALM *pk_dalm
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{EXXX} -
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-
-@c
-@c ref_alm
-@c
-
-@page
-@subsection ref_alm - Reference Alarm Handler Status
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-ER ref_alm(
- T_RALM *pk_ralm,
- HNO almno
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{EXXX} -
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-
-@c
-@c ret_tmr
-@c
-
-@page
-@subsection ret_tmr - Return from Timer Handler
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-void ret_tmr(
-
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{EXXX} -
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
diff --git a/doc/networking/Makefile b/doc/networking/Makefile
deleted file mode 100644
index a87d6fdf11..0000000000
--- a/doc/networking/Makefile
+++ /dev/null
@@ -1,109 +0,0 @@
-#
-# COPYRIGHT (c) 1988-1999.
-# On-Line Applications Research Corporation (OAR).
-# All rights reserved.
-#
-# $Id$
-#
-
-PROJECT=networking
-
-include ../Make.config
-
-REPLACE=../tools/word-replace
-
-BMENU+= -c
-
-all: html info ps pdf
-
-dirs:
- $(make-dirs)
-
-COMMON_FILES=../common/cpright.texi ../common/setup.texi
-
-GENERATED_FILES=networkapp.texi driver.texi networktasks.texi testing.texi \
- servers.texi decdriver.texi
-
-FILES= $(PROJECT).texi \
- networktasks.texi preface.texi $(GENERATED_FILES)
-
-INFOFILES=$(wildcard $(PROJECT) $(PROJECT)-*)
-
-info: dirs $(PROJECT)
- #cp $(wildcard $(PROJECT) $(PROJECT)-*) $(INFO_INSTALL)
- cp $(PROJECT) $(INFO_INSTALL)
-
-$(PROJECT): $(FILES)
- $(MAKEINFO) $(PROJECT).texi
-
-dvi: dirs $(PROJECT).dvi
-ps: dirs $(PROJECT).ps
-pdf: dirs $(PROJECT).pdf
-
-$(PROJECT).pdf: $(FILES)
- $(TEXI2PDF) $(PROJECT).texi
- cp $(PROJECT).pdf $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).ps: $(PROJECT).dvi
- dvips -o $(PROJECT).ps $(PROJECT).dvi
- cp $(PROJECT).ps $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).dvi: $(FILES)
- $(TEXI2DVI) $(PROJECT).texi
- cp $(PROJECT).dvi $(WWW_INSTALL)/$(PROJECT)
-
-networktasks.texi: networktasks.t Makefile
- $(BMENU) -p "Preface" \
- -u "Top" \
- -n "Networking Driver" ${*}.t
-
-driver.texi: driver.t Makefile
- $(BMENU) -p "Network Task Structure and Data Flow" \
- -u "Top" \
- -n "Using Networking in an RTEMS Application" ${*}.t
-
-networkapp.texi: networkapp.t Makefile
- $(BMENU) -p "Write the Driver Statistic-Printing Function" \
- -u "Top" \
- -n "Testing the Driver" ${*}.t
-
-testing.texi: testing.t Makefile
- $(BMENU) -p "Time Synchronization Using NTP" \
- -u "Top" \
- -n "Network Servers" ${*}.t
-
-servers.texi: servers.t Makefile
- $(BMENU) -p "Throughput" \
- -u "Top" \
- -n "DEC 21140 Driver" ${*}.t
-
-decdriver.texi: decdriver.t Makefile
- $(BMENU) -p "Using Hooks" \
- -u "Top" \
- -n "Command and Variable Index" ${*}.t
-
-html: dirs $(FILES)
- -mkdir -p $(WWW_INSTALL)/$(PROJECT)
- rm -f $(WWW_INSTALL)/$(PROJECT)/networkflow.jpg
- rm -f $(WWW_INSTALL)/$(PROJECT)/networkflow.png
- rm -f $(WWW_INSTALL)/$(PROJECT)/PCIreg.jpg
- cp recvbd.jpg $(WWW_INSTALL)/$(PROJECT)/recvbd.jpg
- cp networkflow.jpg $(WWW_INSTALL)/$(PROJECT)/networkflow.jpg
- cp networkflow.png $(WWW_INSTALL)/$(PROJECT)/networkflow.png
- cp PCIreg.jpg $(WWW_INSTALL)/$(PROJECT)/PCIreg.jpg
- $(TEXI2WWW) $(TEXI2WWW_ARGS) -dir $(WWW_INSTALL)/$(PROJECT) \
- $(PROJECT).texi
-
-clean:
- rm -f *.o $(PROG) *.txt core $(PROJECT).pdf
- rm -f *.dvi *.ps *.log *.aux *.cp *.fn *.ky *.pg *.toc *.tp *.vr $(BASE)
- rm -f $(PROJECT) $(PROJECT)-* $(GENERATED_FILES)
- rm -f $(PROJECT) $(PROJECT)-*
- rm -f timedata.texi timetbl.texi intr.texi wksheets.texi
- rm -f timetbl.t wksheets.t
- rm -f *.fixed _*
-
-convert:
- /usr/bin/gs -dMaxBitmap=300000000 -g5500x7500 -sDEVICE=pdfwrite -q -dNOPAUSE -dSAFER -sOutputFile=networkflow.pdf -- networkflow.eps -c -quit
- /usr/bin/gs -dMaxBitmap=300000000 -g4500x5500 -sDEVICE=pdfwrite -q -dNOPAUSE -dSAFER -sOutputFile=PCIreg.pdf -- PCIreg.eps -c -quit
- /usr/bin/gs -dMaxBitmap=300000000 -g4500x5500 -sDEVICE=pdfwrite -q -dNOPAUSE -dSAFER -sOutputFile=recvbd.pdf -- recvbd.eps -c -quit
diff --git a/doc/networking/PCIreg.eps b/doc/networking/PCIreg.eps
deleted file mode 100644
index e627786434..0000000000
--- a/doc/networking/PCIreg.eps
+++ /dev/null
@@ -1,319 +0,0 @@
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: PCI_reg.eps
-%%Creator: fig2dev Version 3.2 Patchlevel 1
-%%CreationDate: Mon Feb 8 15:09:56 1999
-%%For: raguet@genesis (Emmanuel Raguet)
-%%Orientation: Portrait
-%%BoundingBox: 0 0 270 592
-%%Pages: 0
-%%BeginSetup
-%%EndSetup
-%%Magnification: 1.0000
-%%EndComments
-/$F2psDict 200 dict def
-$F2psDict begin
-$F2psDict /mtrx matrix put
-/col-1 {0 setgray} bind def
-/col0 {0.000 0.000 0.000 srgb} bind def
-/col1 {0.000 0.000 1.000 srgb} bind def
-/col2 {0.000 1.000 0.000 srgb} bind def
-/col3 {0.000 1.000 1.000 srgb} bind def
-/col4 {1.000 0.000 0.000 srgb} bind def
-/col5 {1.000 0.000 1.000 srgb} bind def
-/col6 {1.000 1.000 0.000 srgb} bind def
-/col7 {1.000 1.000 1.000 srgb} bind def
-/col8 {0.000 0.000 0.560 srgb} bind def
-/col9 {0.000 0.000 0.690 srgb} bind def
-/col10 {0.000 0.000 0.820 srgb} bind def
-/col11 {0.530 0.810 1.000 srgb} bind def
-/col12 {0.000 0.560 0.000 srgb} bind def
-/col13 {0.000 0.690 0.000 srgb} bind def
-/col14 {0.000 0.820 0.000 srgb} bind def
-/col15 {0.000 0.560 0.560 srgb} bind def
-/col16 {0.000 0.690 0.690 srgb} bind def
-/col17 {0.000 0.820 0.820 srgb} bind def
-/col18 {0.560 0.000 0.000 srgb} bind def
-/col19 {0.690 0.000 0.000 srgb} bind def
-/col20 {0.820 0.000 0.000 srgb} bind def
-/col21 {0.560 0.000 0.560 srgb} bind def
-/col22 {0.690 0.000 0.690 srgb} bind def
-/col23 {0.820 0.000 0.820 srgb} bind def
-/col24 {0.500 0.190 0.000 srgb} bind def
-/col25 {0.630 0.250 0.000 srgb} bind def
-/col26 {0.750 0.380 0.000 srgb} bind def
-/col27 {1.000 0.500 0.500 srgb} bind def
-/col28 {1.000 0.630 0.630 srgb} bind def
-/col29 {1.000 0.750 0.750 srgb} bind def
-/col30 {1.000 0.880 0.880 srgb} bind def
-/col31 {1.000 0.840 0.000 srgb} bind def
-
-end
-save
--172.0 622.0 translate
-1 -1 scale
-
-/cp {closepath} bind def
-/ef {eofill} bind def
-/gr {grestore} bind def
-/gs {gsave} bind def
-/sa {save} bind def
-/rs {restore} bind def
-/l {lineto} bind def
-/m {moveto} bind def
-/rm {rmoveto} bind def
-/n {newpath} bind def
-/s {stroke} bind def
-/sh {show} bind def
-/slc {setlinecap} bind def
-/slj {setlinejoin} bind def
-/slw {setlinewidth} bind def
-/srgb {setrgbcolor} bind def
-/rot {rotate} bind def
-/sc {scale} bind def
-/sd {setdash} bind def
-/ff {findfont} bind def
-/sf {setfont} bind def
-/scf {scalefont} bind def
-/sw {stringwidth} bind def
-/tr {translate} bind def
-/tnt {dup dup currentrgbcolor
- 4 -2 roll dup 1 exch sub 3 -1 roll mul add
- 4 -2 roll dup 1 exch sub 3 -1 roll mul add
- 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
- bind def
-/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
- 4 -2 roll mul srgb} bind def
-/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
-/$F2psEnd {$F2psEnteredState restore end} def
-%%EndProlog
-
-$F2psBegin
-10 setmiterlimit
-n -1000 10868 m -1000 -1000 l 8010 -1000 l 8010 10868 l cp clip
- 0.06299 0.06299 sc
-% Polyline
-7.500 slw
-n 2745 1305 m 6525 1305 l 6525 1800 l 2745 1800 l cp gs 0.00 setgray ef gr gs col0 s gr
-% Polyline
-n 4635 1305 m 4635 1800 l gs col7 s gr
-% Polyline
-n 2745 6750 m 6525 6750 l 6525 7245 l 2745 7245 l cp gs col0 s gr
-% Polyline
-n 4635 6750 m 4635 7245 l gs col0 s gr
-% Polyline
-n 2745 8730 m 6525 8730 l 6525 9225 l 2745 9225 l cp gs col0 s gr
-% Polyline
-n 4635 8730 m 4635 9225 l gs col0 s gr
-% Polyline
-n 3735 8730 m 3735 9225 l gs col0 s gr
-% Polyline
-n 5580 8730 m 5580 9225 l gs col0 s gr
-% Polyline
-n 2745 3285 m 6525 3285 l 6525 3780 l 2745 3780 l cp gs col0 s gr
-% Polyline
-n 2745 3780 m 6525 3780 l 6525 4275 l 2745 4275 l cp gs col0 s gr
-% Polyline
-n 2745 4275 m 6525 4275 l 6525 4770 l 2745 4770 l cp gs col0 s gr
-% Polyline
-n 2745 4770 m 6525 4770 l 6525 5265 l 2745 5265 l cp gs col0 s gr
-% Polyline
-n 2745 5265 m 6525 5265 l 6525 5760 l 2745 5760 l cp gs col0 s gr
-% Polyline
-n 2745 5760 m 6525 5760 l 6525 6255 l 2745 6255 l cp gs col0 s gr
-% Polyline
-n 2745 2790 m 6525 2790 l 6525 3285 l 2745 3285 l cp gs col0 s gr
-% Polyline
-n 4635 2790 m 4635 3285 l gs col0 s gr
-% Polyline
-n 3735 2790 m 3735 3285 l gs col0 s gr
-% Polyline
-n 5580 2790 m 5580 3285 l gs col0 s gr
-% Polyline
-n 2745 2295 m 6525 2295 l 6525 2790 l 2745 2790 l cp gs 0.00 setgray ef gr gs col7 s gr
-% Polyline
-n 5580 2295 m 5580 2790 l gs col7 s gr
-% Polyline
-n 2745 1800 m 6525 1800 l 6525 2295 l 2745 2295 l cp gs 0.00 setgray ef gr gs col7 s gr
-% Polyline
-n 4635 1800 m 4635 2295 l gs col7 s gr
-% Polyline
-n 3735 3285 m 4635 3285 l 4635 2790 l 3735 2790 l cp gs 0.00 setgray ef gr gs col7 s gr
-% Polyline
-n 2745 6255 m 6525 6255 l 6525 6750 l 2745 6750 l cp gs col0 s gr
-% Polyline
-n 2745 7740 m 6525 7740 l 6525 8235 l 2745 8235 l cp gs col0 s gr
-% Polyline
-n 2745 8235 m 6525 8235 l 6525 8730 l 2745 8730 l cp gs col0 s gr
-% Polyline
-n 2880 9585 m 3285 9585 l 3285 9855 l 2880 9855 l cp gs 0.00 setgray ef gr gs col0 s gr
-% Polyline
-n 2745 7245 m 6525 7245 l 6525 7740 l 2745 7740 l cp gs col0 s gr
-% Polyline
-gs clippath
-6915 1140 m 6885 1260 l 6855 1140 l 6855 1275 l 6915 1275 l cp
-clip
-n 6885 1260 m 6885 675 l 6660 675 l gs col0 s gr gr
-
-% arrowhead
-n 6915 1140 m 6885 1260 l 6855 1140 l col0 s
-/Times-Roman ff 270.00 scf sf
-3735 7155 m
-gs 1 -1 sc (Subsystem ID) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman ff 270.00 scf sf
-4635 8145 m
-gs 1 -1 sc (Reserved) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman ff 270.00 scf sf
-4635 8550 m
-gs 1 -1 sc (Reserved) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman ff 270.00 scf sf
-3240 3195 m
-gs 1 -1 sc (BIST) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman ff 210.00 scf sf
-3240 9135 m
-gs 1 -1 sc (Max_Lat) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman ff 210.00 scf sf
-4185 9135 m
-gs 1 -1 sc (Min_Gnt) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman ff 210.00 scf sf
-5085 8955 m
-gs 1 -1 sc (Interrupt) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman ff 210.00 scf sf
-6030 8955 m
-gs 1 -1 sc (Interrupt) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman ff 210.00 scf sf
-5040 3015 m
-gs 1 -1 sc (Latency) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman ff 210.00 scf sf
-5535 6975 m
-gs 1 -1 sc (Subsystem) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman ff 210.00 scf sf
-5535 7200 m
-gs 1 -1 sc (Vendor ID) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman ff 210.00 scf sf
-4725 7695 m
-gs 1 -1 sc (Base address) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman ff 210.00 scf sf
-4725 7470 m
-gs 1 -1 sc (Expansion ROM) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman ff 210.00 scf sf
-6030 3195 m
-gs 1 -1 sc (Size Line) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman ff 210.00 scf sf
-5985 3015 m
-gs 1 -1 sc (Cache) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman ff 210.00 scf sf
-5085 3240 m
-gs 1 -1 sc (Timer) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman ff 270.00 scf sf
-4635 6615 m
-gs 1 -1 sc (CardBus CIS Pointer) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman ff 270.00 scf sf
-4680 6120 m
-gs 1 -1 sc (Base address 5) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman ff 270.00 scf sf
-4680 5625 m
-gs 1 -1 sc (Base address 4) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman ff 270.00 scf sf
-4680 5130 m
-gs 1 -1 sc (Base address 3) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman ff 270.00 scf sf
-4680 4635 m
-gs 1 -1 sc (Base address 2) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman ff 270.00 scf sf
-4680 4140 m
-gs 1 -1 sc (Base address 1) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman ff 270.00 scf sf
-4680 3600 m
-gs 1 -1 sc (Base address 0) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman ff 210.00 scf sf
-5085 9180 m
-gs 1 -1 sc (Pin) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman ff 210.00 scf sf
-6030 9180 m
-gs 1 -1 sc (Line) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman ff 270.00 scf sf
-5535 1665 m
-gs 1 -1 sc (Vendor ID) dup sw pop 2 div neg 0 rm col7 sh gr
-/Times-Roman ff 270.00 scf sf
-4185 2655 m
-gs 1 -1 sc (Class code) dup sw pop 2 div neg 0 rm col7 sh gr
-/Times-Roman ff 210.00 scf sf
-6030 2475 m
-gs 1 -1 sc (Revision) dup sw pop 2 div neg 0 rm col7 sh gr
-/Times-Roman ff 210.00 scf sf
-6030 2730 m
-gs 1 -1 sc (ID) dup sw pop 2 div neg 0 rm col7 sh gr
-/Times-Roman ff 240.00 scf sf
-5625 2160 m
-gs 1 -1 sc (Command register) dup sw pop 2 div neg 0 rm col7 sh gr
-/Times-Roman ff 270.00 scf sf
-3690 2160 m
-gs 1 -1 sc (Status register) dup sw pop 2 div neg 0 rm col7 sh gr
-/Times-Roman ff 270.00 scf sf
-3735 1665 m
-gs 1 -1 sc (Device ID) dup sw pop 2 div neg 0 rm col7 sh gr
-/Times-Roman ff 210.00 scf sf
-4185 2970 m
-gs 1 -1 sc (Header) dup sw pop 2 div neg 0 rm col7 sh gr
-/Times-Roman ff 210.00 scf sf
-4185 3225 m
-gs 1 -1 sc (Type) dup sw pop 2 div neg 0 rm col7 sh gr
-/Times-Roman ff 210.00 scf sf
-3375 9810 m
-gs 1 -1 sc (Required configuration registers) col0 sh gr
-/Times-Roman ff 210.00 scf sf
-6795 1665 m
-gs 1 -1 sc (00) col0 sh gr
-/Times-Roman ff 210.00 scf sf
-6795 4140 m
-gs 1 -1 sc (05) col0 sh gr
-/Times-Roman ff 210.00 scf sf
-6795 4635 m
-gs 1 -1 sc (06) col0 sh gr
-/Times-Roman ff 210.00 scf sf
-6795 2160 m
-gs 1 -1 sc (01) col0 sh gr
-/Times-Roman ff 210.00 scf sf
-6795 2655 m
-gs 1 -1 sc (02) col0 sh gr
-/Times-Roman ff 210.00 scf sf
-6795 3645 m
-gs 1 -1 sc (04) col0 sh gr
-/Times-Roman ff 210.00 scf sf
-6795 3150 m
-gs 1 -1 sc (03) col0 sh gr
-/Times-Roman ff 210.00 scf sf
-6795 5085 m
-gs 1 -1 sc (07) col0 sh gr
-/Times-Roman ff 210.00 scf sf
-6795 5580 m
-gs 1 -1 sc (08) col0 sh gr
-/Times-Roman ff 210.00 scf sf
-6795 6570 m
-gs 1 -1 sc (10) col0 sh gr
-/Times-Roman ff 210.00 scf sf
-6795 7110 m
-gs 1 -1 sc (11) col0 sh gr
-/Times-Roman ff 210.00 scf sf
-6795 7605 m
-gs 1 -1 sc (12) col0 sh gr
-/Times-Roman ff 210.00 scf sf
-6795 6075 m
-gs 1 -1 sc (09) col0 sh gr
-/Times-Roman ff 210.00 scf sf
-6795 8100 m
-gs 1 -1 sc (13) col0 sh gr
-/Times-Roman ff 210.00 scf sf
-6795 8595 m
-gs 1 -1 sc (14) col0 sh gr
-/Times-Roman ff 210.00 scf sf
-6795 9090 m
-gs 1 -1 sc (15) col0 sh gr
-/Times-Roman ff 210.00 scf sf
-5580 855 m
-gs 1 -1 sc (\(in decimal\)) col0 sh gr
-/Times-Roman ff 210.00 scf sf
-4725 630 m
-gs 1 -1 sc (Double word number) col0 sh gr
-$F2psEnd
-rs
diff --git a/doc/networking/PCIreg.jpg b/doc/networking/PCIreg.jpg
deleted file mode 100644
index c03257bed4..0000000000
--- a/doc/networking/PCIreg.jpg
+++ /dev/null
Binary files differ
diff --git a/doc/networking/PCIreg.pdf b/doc/networking/PCIreg.pdf
deleted file mode 100644
index 5fbb991e26..0000000000
--- a/doc/networking/PCIreg.pdf
+++ /dev/null
Binary files differ
diff --git a/doc/networking/decdriver.t b/doc/networking/decdriver.t
deleted file mode 100644
index 7a0fd0c4a3..0000000000
--- a/doc/networking/decdriver.t
+++ /dev/null
@@ -1,291 +0,0 @@
-@c
-@c RTEMS Remote Debugger Server Specifications
-@c
-@c Written by: Emmanuel Raguet <raguet@crf.canon.fr>
-@c
-@c
-@c $Id$
-@c
-
-@chapter DEC 21140 Driver
-
-@section DEC 21240 Driver Introduction
-
-@c XXX add back in cross reference to list of boards.
-
-One aim of our project is to port RTEMS on a standard PowerPC platform. To achieve
-it, we have chosen a Motorola MCP750 board. This board includes an Ethernet
-controller based on a DEC21140 chip. Because RTEMS has a TCP/IP stack, we will
-have to develop the DEC21140 related ethernet driver for the PowerPC port of
-RTEMS. As this controller is able to support 100Mbps network and as there is
-a lot of PCI card using this DEC chip, we have decided to first
-implement this driver on an Intel PC386 target to provide a solution for using
-RTEMS on PC with the 100Mbps network and then to port this code on PowerPC in
-a second phase.
-
-
-The aim of this document is to give some PCI board generalities and
-to explain the software architecture of the RTEMS driver. Finally, we will see
-what will be done for ChorusOs and Netboot environment .
-
-
-@section Document Revision History
-
-@b{Current release}:
-
-@itemize @bullet
-@item Current applicable release is 1.0.
-@end itemize
-@b{Existing releases}:
-
-@itemize @bullet
-@item 1.0 : Released the 10/02/98. First version of this document.
-@item 0.1 : First draft of this document
-@end itemize
-@b{Planned releases}:
-
-@itemize @bullet
-@item None planned today.
-@end itemize
-
-@section DEC21140 PCI Board Generalities
-
-@c XXX add crossreference to PCI Register Figure
-This chapter describes rapidely the PCI interface of this Ethernet controller.
-The board we have chosen for our PC386 implementation is a D-Link DFE-500TX.
-This is a dual-speed 10/100Mbps Ethernet PCI adapter with a DEC21140AF chip.
-Like other PCI devices, this board has a PCI device's header containing some
-required configuration registers, as shown in the PCI Register Figure.
-By reading
-or writing these registers, a driver can obtain information about the type of
-the board, the interrupt it uses, the mapping of the chip specific registers, ...
-
-
-
-On Intel target, the chip specific registers can be accessed via 2
-methods : I/O port access or PCI address mapped access. We have chosen to implement
-the PCI address access to obtain compatible source code to the port the driver
-on a PowerPC target.
-
-@c
-@c PCI Device's Configuration Header Space Format
-@c
-
-@ifset use-ascii
-@example
-@group
-There is no ASCII version of the PCI Device's Configuration Header Space Format
-@end group
-@end example
-@end ifset
-
-@ifset use-tex
-@image{PCIreg,,}
-@end ifset
-
-@c @image{PCIreg}
-
-@ifset use-html
-@c <IMG SRC="PCIreg.jpg" WIDTH=500 HEIGHT=600 ALT="PCI Device's Configuration Header Space Format">
-@html
-<IMG SRC="PCIreg.jpg" ALT="PCI Device's Configuration Header Space Format">
-@end html
-@end ifset
-
-
-@c XXX add crossreference to PCI Register Figure
-
-On RTEMS, a PCI API exists. We have used it to configure the board. After initializing
-this PCI module via the @code{pcib_init()} function, we try to detect
-the DEC21140 based ethernet board. This board is characterized by its Vendor
-ID (0x1011) and its Device ID (0x0009). We give these arguments to the
-@code{pcib_find_by_deviceid}
-function which returns , if the device is present, a pointer to the configuration
-header space (see PCI Registers Fgure). Once this operation performed,
-the driver
-is able to extract the information it needs to configure the board internal
-registers, like the interrupt line, the base address,... The board internal
-registers will not be detailled here. You can find them in @b{DIGITAL
-Semiconductor 21140A PCI Fast Ethernet LAN Controller
-- Hardware Reference Manual}.
-
-@c fix citation
-
-
-@section RTEMS Driver Software Architecture
-
-In this chapter will see the initialization phase, how the controller uses the
-host memory and the 2 threads launched at the initialization time.
-
-
-@subsection Initialization phase
-
-The DEC21140 Ethernet driver keeps the same software architecture than the other
-RTEMS ethernet drivers. The only API the programmer can use is the @code{rtems_dec21140_driver_attach}
-@code{(struct rtems_bsdnet_ifconfig *config)} function which
-detects the board and initializes the associated data structure (with registers
-base address, entry points to low-level initialization function,...), if the
-board is found.
-
-Once the attach function executed, the driver initializes the DEC
-chip. Then the driver connects an interrupt handler to the interrupt line driven
-by the Ethernet controller (the only interrupt which will be treated is the
-receive interrupt) and launches 2 threads : a receiver thread and a transmitter
-thread. Then the driver waits for incoming frame to give to the protocol stack
-or outcoming frame to send on the physical link.
-
-
-@subsection Memory Buffer
-
-@c XXX add cross reference to Problem
-This DEC chip uses the host memory to store the incoming Ethernet frames and
-the descriptor of these frames. We have chosen to use 7 receive buffers and
-1 transmit buffer to optimize memory allocation due to cache and paging problem
-that will be explained in the section @b{Encountered Problems}.
-
-
-To reference these buffers to the DEC chip we use a buffer descriptors
-ring. The descriptor structure is defined in the Buffer Descriptor Figure.
-Each descriptor
-can reference one or two memory buffers. We choose to use only one buffer of
-1520 bytes per descriptor.
-
-
-The difference between a receive and a transmit buffer descriptor
-is located in the status and control bits fields. We do not give details here,
-please refer to the [DEC21140 Hardware Manual].
-
-@c
-@c Buffer Descriptor
-@c
-
-@ifset use-ascii
-@example
-@group
-XXXXX reference it in the previous paragraph
-XXXXX insert recvbd.eps
-XXXXX Caption Buffer Descriptor
-@end group
-@end example
-@end ifset
-
-@ifset use-tex
-@image{recvbd}
-@end ifset
-
-
-@ifset use-html
-@c <IMG SRC="recvbd.jpg" WIDTH=500 HEIGHT=600 ALT="Buffer Descriptor">
-@html
-<IMG SRC="recvbd.jpg" ALT="Buffer Descriptor">
-@end html
-@end ifset
-
-
-
-@subsection Receiver Thread
-
-This thread is event driven. Each time a DEC PCI board interrupt occurs, the
-handler checks if this is a receive interrupt and send an event ``reception''
-to the receiver thread which looks into the entire buffer descriptors ring the
-ones that contain a valid incoming frame (bit OWN=0 means descriptor belongs
-to host processor). Each valid incoming ethernet frame is sent to the protocol
-stack and the buffer descriptor is given back to the DEC board (the host processor
-reset bit OWN, which means descriptor belongs to 21140).
-
-
-@subsection Transmitter Thread
-
-This thread is also event driven. Each time an Ethernet frame is put in the
-transmit queue, an event is sent to the transmit thread, which empty the queue
-by sending each outcoming frame. Because we use only one transmit buffer, we
-are sure that the frame is well-sent before sending the next.
-
-
-@section Encountered Problems
-
-On Intel PC386 target, we were faced with a problem of memory cache management.
-Because the DEC chip uses the host memory to store the incoming frame and because
-the DEC21140 configuration registers are mapped into the PCI address space,
-we must ensure that the data read (or written) by the host processor are the
-ones written (or read) by the DEC21140 device in the host memory and not old
-data stored in the cache memory. Therefore, we had to provide a way to manage
-the cache. This module is described in the document @b{RTEMS
-Cache Management For Intel}. On Intel, the
-memory region cache management is available only if the paging unit is enabled.
-We have used this paging mechanism, with 4Kb page. All the buffers allocated
-to store the incoming or outcoming frames, buffer descriptor and also the PCI
-address space of the DEC board are located in a memory space with cache disable.
-
-
-Concerning the buffers and their descriptors, we have tried to optimize
-the memory space in term of allocated page. One buffer has 1520 bytes, one descriptor
-has 16 bytes. We have 7 receive buffers and 1 transmit buffer, and for each,
-1 descriptor : (7+1)*(1520+16) = 12288 bytes = 12Kb = 3 entire pages. This
-allows not to lose too much memory or not to disable cache memory for a page
-which contains other data than buffer, which could decrease performance.
-
-
-@section ChorusOs DEC Driver
-
-Because ChorusOs is used in several Canon CRF projects, we must provide such
-a driver on this OS to ensure compatibility between the RTEMS and ChorusOs developments.
-On ChorusOs, a DEC driver source code already exists but only for a PowerPC
-target. We plan to port this code (which uses ChorusOs API) on Intel target.
-This will allow us to have homogeneous developments. Moreover, the port of the
-development performed with ChorusOs environment to RTEMS environment will be
-easier for the developers.
-
-
-@section Netboot DEC driver
-
-We use Netboot tool to load our development from a server to the target via
-an ethernet network. Currently, this tool does not support the DEC board. We
-plan to port the DEC driver for the Netboot tool.
-
-
-But concerning the port of the DEC driver into Netboot, we are faced
-with a problem : in RTEMS environment, the DEC driver is interrupt or event
-driven, in Netboot environment, it must be used in polling mode. It means that
-we will have to re-write some mechanisms of this driver.
-
-
-@section List of Ethernet cards using the DEC chip
-
-Many Ethernet adapter cards use the Tulip chip. Here is a non exhaustive list
-of adapters which support this driver :
-
-@itemize @bullet
-@item Accton EtherDuo PCI.
-@item Accton EN1207 All three media types supported.
-@item Adaptec ANA6911/TX 21140-AC.
-@item Cogent EM110 21140-A with DP83840 N-Way MII transceiver.
-@item Cogent EM400 EM100 with 4 21140 100mbps-only ports + PCI Bridge.
-@item Danpex EN-9400P3.
-@item D-Link DFE500-Tx 21140-A with DP83840 transceiver.
-@item Kingston EtherX KNE100TX 21140AE.
-@item Netgear FX310 TX 10/100 21140AE.
-@item SMC EtherPower10/100 With DEC21140 and 68836 SYM transceiver.
-@item SMC EtherPower10/100 With DEC21140-AC and DP83840 MII transceiver.
-Note: The EtherPower II uses the EPIC chip, which requires a different driver.
-@item Surecom EP-320X DEC 21140.
-@item Thomas Conrad TC5048.
-@item Znyx ZX345 21140-A, usually with the DP83840 N-Way MII transciever. Some ZX345
-cards made in 1996 have an ICS 1890 transciver instead.
-@item ZNYX ZX348 Two 21140-A chips using ICS 1890 transcievers and either a 21052
-or 21152 bridge. Early versions used National 83840 transcievers, but later
-versions are depopulated ZX346 boards.
-@item ZNYX ZX351 21140 chip with a Broadcom 100BaseT4 transciever.
-@end itemize
-
-Our DEC driver has not been tested with all these cards, only with the D-Link
-DFE500-TX.
-
-@itemize @code{ }
-@item @cite{[DEC21140 Hardware Manual] DIGITAL, @b{DIGITAL
-Semiconductor 21140A PCI Fast Ethernet LAN Controller - Hardware
-Reference Manual}}.
-
-@item @cite{[99.TA.0021.M.ER]Emmanuel Raguet,
-@b{RTEMS Cache Management For Intel}}.
-@end itemize
diff --git a/doc/networking/driver.t b/doc/networking/driver.t
deleted file mode 100644
index c2fa4866f6..0000000000
--- a/doc/networking/driver.t
+++ /dev/null
@@ -1,342 +0,0 @@
-@c
-@c Written by Eric Norum
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Networking Driver
-
-@section Introduction
-
-This chapter is intended to provide an introduction to the
-procedure for writing RTEMS network device drivers.
-The example code is taken from the `Generic 68360' network device
-driver. The source code for this driver is located in the
-@code{c/src/lib/libbsp/m68k/gen68360/network} directory in the RTEMS
-source code distribution. Having a copy of this driver at
-hand when reading the following notes will help significantly.
-
-@section Learn about the network device
-
-Before starting to write the network driver become completely
-familiar with the programmer's view of the device.
-The following points list some of the details of the
-device that must be understood before a driver can be written.
-
-@itemize @bullet
-
-@item Does the device use DMA to transfer packets to and from
-memory or does the processor have to
-copy packets to and from memory on the device?
-
-@item If the device uses DMA, is it capable of forming a single
-outgoing packet from multiple fragments scattered in separate
-memory buffers?
-
-@item If the device uses DMA, is it capable of chaining multiple
-outgoing packets, or does each outgoing packet require
-intervention by the driver?
-
-@item Does the device automatically pad short frames to the minimum
-64 bytes or does the driver have to supply the padding?
-
-@item Does the device automatically retry a transmission on detection
-of a collision?
-
-@item If the device uses DMA, is it capable of buffering multiple
-packets to memory, or does the receiver have to be restarted
-after the arrival of each packet?
-
-@item How are packets that are too short, too long, or received with
-CRC errors handled? Does the device automatically continue
-reception or does the driver have to intervene?
-
-@item How is the device Ethernet address set? How is the device
-programmed to accept or reject broadcast and multicast packets?
-
-@item What interrupts does the device generate? Does it generate an
-interrupt for each incoming packet, or only for packets received
-without error? Does it generate an interrupt for each packet
-transmitted, or only when the transmit queue is empty? What
-happens when a transmit error is detected?
-
-@end itemize
-
-In addition, some controllers have specific questions regarding
-board specific configuration. For example, the SONIC Ethernet
-controller has a very configurable data bus interface. It can
-even be configured for sixteen and thirty-two bit data buses. This
-type of information should be obtained from the board vendor.
-
-@section Understand the network scheduling conventions
-
-When writing code for the driver transmit and receive tasks,
-take care to follow the network scheduling conventions. All tasks
-which are associated with networking share various
-data structures and resources. To ensure the consistency
-of these structures the tasks
-execute only when they hold the network semaphore (@code{rtems_bsdnet_semaphore}).
-The transmit and receive tasks must abide by this protocol. Be very
-careful to avoid `deadly embraces' with the other network tasks.
-A number of routines are provided to make it easier for the network
-driver code to conform to the network task scheduling conventions.
-
-@itemize @bullet
-
-@item @code{void rtems_bsdnet_semaphore_release(void)}
-
-This function releases the network semaphore.
-The network driver tasks must call this function immediately before
-making any blocking RTEMS request.
-
-@item @code{void rtems_bsdnet_semaphore_obtain(void)}
-
-This function obtains the network semaphore.
-If a network driver task has released the network semaphore to allow other
-network-related tasks to run while the task blocks, then this function must
-be called to reobtain the semaphore immediately after the return from the
-blocking RTEMS request.
-
-@item @code{rtems_bsdnet_event_receive(rtems_event_set, rtems_option, rtems_interval, rtems_event_set *)}
-The network driver task should call this function when it wishes to wait
-for an event. This function releases the network semaphore,
-calls @code{rtems_event_receive} to wait for the specified event
-or events and reobtains the semaphore.
-The value returned is the value returned by the @code{rtems_event_receive}.
-
-@end itemize
-
-@section Network Driver Makefile
-
-Network drivers are considered part of the BSD network package and as such
-are to be compiled with the appropriate flags. This can be accomplished by
-adding @code{-D__INSIDE_RTEMS_BSD_TCPIP_STACK__} to the @code{command line}.
-If the driver is inside the RTEMS source tree or is built using the
-RTEMS application Makefiles, then adding the following line accomplishes
-this:
-
-@example
-DEFINES += -D__INSIDE_RTEMS_BSD_TCPIP_STACK__
-@end example
-
-This is equivalent to the following list of definitions. Early versions
-of the RTEMS BSD network stack required that all of these be defined.
-
-@example
--D_COMPILING_BSD_KERNEL_ -DKERNEL -DINET -DNFS \
- -DDIAGNOSTIC -DBOOTP_COMPAT
-@end example
-
-Defining these macros tells the network header files that the driver
-is to be compiled with extended visibility into the network stack. This
-is in sharp contrast to applications that simply use the network stack.
-Applications do not require this level of visibility and should stick
-to the portable application level API.
-
-As a direct result of being logically internal to the network stack,
-network drivers use the BSD memory allocation routines This means,
-for example, that malloc takes three arguments. See the SONIC
-device driver (@code{c/src/lib/libchip/network/sonic.c}) for an example
-of this. Because of this, network drivers should not include
-@code{<stdlib.h>}. Doing so will result in conflicting definitions
-of @code{malloc()}.
-
-@b{Application level} code including network servers such as the FTP
-daemon are @b{not} part of the BSD kernel network code and should not be
-compiled with the BSD network flags. They should include
-@code{<stdlib.h>} and not define the network stack visibility
-macros.
-
-@section Write the Driver Attach Function
-
-The driver attach function is responsible for configuring the driver
-and making the connection between the network stack
-and the driver.
-
-Driver attach functions take a pointer to an
-@code{rtems_bsdnet_ifconfig} structure as their only argument.
-and set the driver parameters based on the
-values in this structure. If an entry in the configuration
-structure is zero the attach function chooses an
-appropriate default value for that parameter.
-
-
-The driver should then set up several fields in the ifnet structure
-in the device-dependent data structure supplied and maintained by the driver:
-
-@table @code
-@item ifp->if_softc
-Pointer to the device-dependent data. The first entry
-in the device-dependent data structure must be an @code{arpcom}
-structure.
-
-@item ifp->if_name
-The name of the device. The network stack uses this string
-and the device number for device name lookups. The device name should
-be obtained from the @code{name} entry in the configuration structure.
-
-@item ifp->if_unit
-The device number. The network stack uses this number and the
-device name for device name lookups. For example, if
-@code{ifp->if_name} is @samp{scc} and @code{ifp->if_unit} is @samp{1},
-the full device name would be @samp{scc1}. The unit number should be
-obtained from the `name' entry in the configuration structure.
-
-@item ifp->if_mtu
-The maximum transmission unit for the device. For Ethernet
-devices this value should almost always be 1500.
-
-@item ifp->if_flags
-The device flags. Ethernet devices should set the flags
-to @code{IFF_BROADCAST|IFF_SIMPLEX}, indicating that the
-device can broadcast packets to multiple destinations
-and does not receive and transmit at the same time.
-
-@item ifp->if_snd.ifq_maxlen
-The maximum length of the queue of packets waiting to be
-sent to the driver. This is normally set to @code{ifqmaxlen}.
-
-@item ifp->if_init
-The address of the driver initialization function.
-
-@item ifp->if_start
-The address of the driver start function.
-
-@item ifp->if_ioctl
-The address of the driver ioctl function.
-
-@item ifp->if_output
-The address of the output function. Ethernet devices
-should set this to @code{ether_output}.
-@end table
-
-RTEMS provides a function to parse the driver name in the
-configuration structure into a device name and unit number.
-
-@example
-int rtems_bsdnet_parse_driver_name (
- const struct rtems_bsdnet_ifconfig *config,
- char **namep
-);
-@end example
-
-The function takes two arguments; a pointer to the configuration
-structure and a pointer to a pointer to a character. The function
-parses the configuration name entry, allocates memory for the driver
-name, places the driver name in this memory, sets the second argument
-to point to the name and returns the unit number.
-On error, a message is printed and -1 is returned.
-
-Once the attach function has set up the above entries it must link the
-driver data structure onto the list of devices by
-calling @code{if_attach}. Ethernet devices should then
-call @code{ether_ifattach}. Both functions take a pointer to the
-device's @code{ifnet} structure as their only argument.
-
-The attach function should return a non-zero value to indicate that
-the driver has been successfully configured and attached.
-
-@section Write the Driver Start Function.
-This function is called each time the network stack wants to start the
-transmitter. This occures whenever the network stack adds a packet
-to a device's send queue and the @code{IFF_OACTIVE} bit in the
-device's @code{if_flags} is not set.
-
-For many devices this function need only set the @code{IFF_OACTIVE} bit in the
-@code{if_flags} and send an event to the transmit task
-indicating that a packet is in the driver transmit queue.
-
-
-@section Write the Driver Initialization Function.
-
-This function should initialize the device, attach to interrupt handler,
-and start the driver transmit and receive tasks. The function
-
-@example
-rtems_id
-rtems_bsdnet_newproc (char *name,
- int stacksize,
- void(*entry)(void *),
- void *arg);
-@end example
-
-should be used to start the driver tasks.
-
-Note that the network stack may call the driver initialization function more
-than once.
-Make sure multiple versions of the receive and transmit tasks are not accidentally
-started.
-
-
-
-@section Write the Driver Transmit Task
-
-This task is reponsible for removing packets from the driver send queue and sending them to the device. The task should block waiting for an event from the
-driver start function indicating that packets are waiting to be transmitted.
-When the transmit task has drained the driver send queue the task should clear
-the @code{IFF_OACTIVE} bit in @code{if_flags} and block until another outgoing
-packet is queued.
-
-
-@section Write the Driver Receive Task
-This task should block until a packet arrives from the device. If the
-device is an Ethernet interface the function @code{ether_input} should be called
-to forward the packet to the network stack. The arguments to @code{ether_input}
-are a pointer to the interface data structure, a pointer to the ethernet
-header and a pointer to an mbuf containing the packet itself.
-
-
-
-
-@section Write the Driver Interrupt Handler
-A typical interrupt handler will do nothing more than the hardware
-manipulation required to acknowledge the interrupt and send an RTEMS event
-to wake up the driver receive or transmit task waiting for the event.
-Network interface interrupt handlers must not make any calls to other
-network routines.
-
-
-
-@section Write the Driver IOCTL Function
-This function handles ioctl requests directed at the device. The ioctl
-commands which must be handled are:
-
-@table @code
-@item SIOCGIFADDR
-@item SIOCSIFADDR
-If the device is an Ethernet interface these
-commands should be passed on to @code{ether_ioctl}.
-
-@item SIOCSIFFLAGS
-This command should be used to start or stop the device,
-depending on the state of the interface @code{IFF_UP} and
-@code{IFF_RUNNING} bits in @code{if_flags}:
-@table @code
-@item IFF_RUNNING
-Stop the device.
-
-@item IFF_UP
-Start the device.
-
-@item IFF_UP|IFF_RUNNING
-Stop then start the device.
-
-@item 0
-Do nothing.
-
-@end table
-@end table
-
-
-
-@section Write the Driver Statistic-Printing Function
-This function should print the values of any statistic/diagnostic
-counters the network driver may use. The driver ioctl function should call
-the statistic-printing function when the ioctl command is
-@code{SIO_RTEMS_SHOW_STATS}.
-
-
diff --git a/doc/networking/networkapp.t b/doc/networking/networkapp.t
deleted file mode 100644
index 42b5395433..0000000000
--- a/doc/networking/networkapp.t
+++ /dev/null
@@ -1,447 +0,0 @@
-@c
-@c Written by Eric Norum
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Using Networking in an RTEMS Application
-
-@section Makefile changes
-@subsection Including the required managers
-The FreeBSD networking code requires several RTEMS managers
-in the application:
-
-@example
-MANAGERS = io event semaphore
-@end example
-
-@subsection Increasing the size of the heap
-The networking tasks allocate a lot of memory. For most applications
-the heap should be at least 256 kbytes.
-The amount of memory set aside for the heap can be adjusted by setting
-the @code{CFLAGS_LD} definition as shown below:
-
-@example
-CFLAGS_LD += -Wl,--defsym -Wl,HeapSize=0x80000
-@end example
-
-This sets aside 512 kbytes of memory for the heap.
-
-@section System Configuration
-
-The networking tasks allocate some RTEMS objects. These
-must be accounted for in the application configuration table. The following
-lists the requirements.
-
-@table @b
-@item TASKS
-One network task plus a receive and transmit task for each device.
-
-@item SEMAPHORES
-One network semaphore plus one syslog mutex semaphore if the application uses
-openlog/syslog.
-
-@item EVENTS
-The network stack uses @code{RTEMS_EVENT_24} and @code{RTEMS_EVENT_25}.
-This has no effect on the application configuration, but
-application tasks which call the network functions should not
-use these events for other purposes.
-
-@end table
-
-@section Initialization
-@subsection Additional include files
-The source file which declares the network configuration
-structures and calls the network initialization function must include
-
-@example
-#include <rtems/rtems_bsdnet.h>
-@end example
-
-@subsection Network Configuration
-The network configuration is specified by declaring
-and initializing the @code{rtems_bsdnet_config}
-structure.
-
-@example
-@group
-struct rtems_bsdnet_config @{
- /*
- * This entry points to the head of the ifconfig chain.
- */
- struct rtems_bsdnet_ifconfig *ifconfig;
-
- /*
- * This entry should be rtems_bsdnet_do_bootp if BOOTP
- * is being used to configure the network, and NULL
- * if BOOTP is not being used.
- */
- void (*bootp)(void);
-
- /*
- * The remaining items can be initialized to 0, in
- * which case the default value will be used.
- */
- rtems_task_priority network_task_priority; /* 100 */
- unsigned long mbuf_bytecount; /* 64 kbytes */
- unsigned long mbuf_cluster_bytecount; /* 128 kbytes */
- char *hostname; /* BOOTP */
- char *domainname; /* BOOTP */
- char *gateway; /* BOOTP */
- char *log_host; /* BOOTP */
- char *name_server[3]; /* BOOTP */
- char *ntp_server[3]; /* BOOTP */
-@};
-@end group
-@end example
-
-The structure entries are described in the following table.
-If your application uses BOOTP/DHCP to obtain network configuration
-information and if you are happy with the default values described
-below, you need to provide only the first two entries in this structure.
-
-@table @code
-
-@item struct rtems_bsdnet_ifconfig *ifconfig
-A pointer to the first configuration structure of the first network
-device. This structure is described in the following section.
-You must provide a value for this entry since there is no default value for it.
-
-
-@item void (*bootp)(void)
-This entry should be set to @code{rtems_bsdnet_do_bootp}
-if your application will use BOOTP/DHCP
-to obtain network configuration information.
-It should be set to @code{NULL}
-if your application does not use BOOTP/DHCP.
-
-
-@item int network_task_priority
-The priority at which the network task and network device
-receive and transmit tasks will run.
-If a value of 0 is specified the tasks will run at priority 100.
-
-@item unsigned long mbuf_bytecount
-The number of bytes to allocate from the heap for use as mbufs.
-If a value of 0 is specified, 64 kbytes will be allocated.
-
-@item unsigned long mbuf_cluster_bytecount
-The number of bytes to allocate from the heap for use as mbuf clusters.
-If a value of 0 is specified, 128 kbytes will be allocated.
-
-@item char *hostname
-The host name of the system.
-If this, or any of the following, entries are @code{NULL} the value
-may be obtained from a BOOTP/DHCP server.
-
-@item char *domainname
-The name of the Internet domain to which the system belongs.
-
-@item char *gateway
-The Internet host number of the network gateway machine,
-specified in `dotted decimal' (@code{129.128.4.1}) form.
-
-@item char *log_host
-The Internet host number of the machine to which @code{syslog} messages
-will be sent.
-
-@item char *name_server[3]
-The Internet host numbers of up to three machines to be used as
-Internet Domain Name Servers.
-
-@item char *name_server[3]
-The Internet host numbers of up to three machines to be used as
-Network Time Protocol (NTP) Servers.
-
-@end table
-
-In addition, the following fields in the @code{rtems_bsdnet_ifconfig}
-are of interest.
-
-@table @b
-
-@item int port
-The I/O port number (ex: 0x240) on which the external Ethernet
-can be accessed.
-
-@item int irno
-The interrupt number of the external Ethernet controller.
-
-@item int bpar
-The address of the shared memory on the external Ethernet controller.
-
-
-@end table
-
-@subsection Network device configuration
-Network devices are specified and configured by declaring and initializing a
-@code{struct rtems_bsdnet_ifcontig} structure for each network device.
-
-The structure entries are described in the following table. An application
-which uses a single network interface, gets network configuration information
-from a BOOTP/DHCP server, and uses the default values for all driver
-parameters needs to initialize only the first two entries in the
-structure.
-
-@table @code
-@item char *name
-The full name of the network device. This name consists of the
-driver name and the unit number (e.g. @code{"scc1"}).
-The @code{bsp.h} include file usually defines RTEMS_BSP_NETWORK_DRIVER_NAME as
-the name of the primary (or only) network driver.
-
-@item int (*attach)(struct rtems_bsdnet_ifconfig *conf)
-The address of the driver @code{attach} function. The network
-initialization function calls this function to configure the driver and
-attach it to the network stack.
-The @code{bsp.h} include file usually defines RTEMS_BSP_NETWORK_DRIVER_ATTACH as
-the name of the attach function of the primary (or only) network driver.
-
-@item struct rtems_bsdnet_ifconfig *next
-A pointer to the network device configuration structure for the next network
-interface, or @code{NULL} if this is the configuration structure of the
-last network interface.
-
-@item char *ip_address
-The Internet address of the device,
-specified in `dotted decimal' (@code{129.128.4.2}) form, or @code{NULL}
-if the device configuration information is being obtained from a
-BOOTP/DHCP server.
-
-@item char *ip_netmask
-The Internet inetwork mask of the device,
-specified in `dotted decimal' (@code{255.255.255.0}) form, or @code{NULL}
-if the device configuration information is being obtained from a
-BOOTP/DHCP server.
-
-
-@item void *hardware_address
-The hardware address of the device, or @code{NULL} if the driver is
-to obtain the hardware address in some other way (usually by reading
-it from the device or from the bootstrap ROM).
-
-@item int ignore_broadcast
-Zero if the device is to accept broadcast packets, non-zero if the device
-is to ignore broadcast packets.
-
-@item int mtu
-The maximum transmission unit of the device, or zero if the driver
-is to choose a default value (typically 1500 for Ethernet devices).
-
-@item int rbuf_count
-The number of receive buffers to use, or zero if the driver is to
-choose a default value
-
-@item int xbuf_count
-The number of transmit buffers to use, or zero if the driver is to
-choose a default value
-Keep in mind that some network devices may use 4 or more
-transmit descriptors for a single transmit buffer.
-
-@end table
-
-A complete network configuration specification can be as simple as the one
-shown in the following example.
-This configuration uses a single network interface, gets
-network configuration information
-from a BOOTP/DHCP server, and uses the default values for all driver
-parameters.
-
-@example
-static struct rtems_bsdnet_ifconfig netdriver_config = @{
- RTEMS_BSP_NETWORK_DRIVER_NAME,
- RTEMS_BSP_NETWORK_DRIVER_ATTACH
-@};
-struct rtems_bsdnet_config rtems_bsdnet_config = @{
- &netdriver_config,
- rtems_bsdnet_do_bootp,
-@};
-@end example
-
-
-@subsection Network initialization
-The networking tasks must be started before any network I/O operations
-can be performed. This is done by calling:
-
-
-@example
-rtems_bsdnet_initialize_network ();
-@end example
-
-This function is declared in @code{rtems/rtems_bsdnet.h}.
-t returns 0 on success and -1 on failure with an error code
-in @code{errno}. It is not possible to undo the effects of
-a partial initialization, though, so the function can be
-called only once irregardless of the return code. Consequently,
-if the condition for the failure can be corrected, the
-system must be reset to permit another network initialization
-attempt.
-
-
-
-@section Application Programming Interface
-
-The RTEMS network package provides almost a complete set of BSD network
-services. The network functions work like their BSD counterparts
-with the following exceptions:
-
-@itemize @bullet
-@item A given socket can be read or written by only one task at a time.
-
-@item The @code{select} function only works for file descriptors associated
-with sockets.
-
-@item You must call @code{openlog} before calling any of the @code{syslog} functions.
-
-@item @b{Some of the network functions are not thread-safe.}
-For example the following functions return a pointer to a static
-buffer which remains valid only until the next call:
-
-@table @code
-@item gethostbyaddr
-@item gethostbyname
-@item inet_ntoa
-(@code{inet_ntop} is thread-safe, though).
-@end table
-
-@item The RTEMS network package gathers statistics.
-
-@item Addition of a mechanism to "tap onto" an interface
-and monitor every packet received and transmitted.
-
-@item Addition of @code{SO_SNDWAKEUP} and @code{SO_RCVWAKEUP} socket options.
-
-@end itemize
-
-Some of the new features are discussed in more detail in the following
-sections.
-
-@subsection Network Statistics
-
-There are a number of functions to print statistics gathered by
-the network stack.
-These function are declared in @code{rtems/rtems_bsdnet.h}.
-
-@table @code
-@item rtems_bsdnet_show_if_stats
-Display statistics gathered by network interfaces.
-
-@item rtems_bsdnet_show_ip_stats
-Display IP packet statistics.
-
-@item rtems_bsdnet_show_icmp_stats
-Display ICMP packet statistics.
-
-@item rtems_bsdnet_show_tcp_stats
-Display TCP packet statistics.
-
-@item rtems_bsdnet_show_udp_stats
-Display UDP packet statistics.
-
-@item rtems_bsdnet_show_mbuf_stats
-Display mbuf statistics.
-
-@item rtems_bsdnet_show_inet_routes
-Display the routing table.
-
-@end table
-
-@subsection Tapping Into an Interface
-
-RTEMS add two new ioctls to the BSD networking code:
-SIOCSIFTAP and SIOCGIFTAP. These may be used to set and get a
-@i{tap function}. The tap function will be called for every
-Ethernet packet received by the interface.
-
-These are called like other interface ioctls, such as SIOCSIFADDR.
-When setting the tap function with SIOCSIFTAP, set the ifr_tap field
-of the ifreq struct to the tap function. When retrieving the tap
-function with SIOCGIFTAP, the current tap function will be returned in
-the ifr_tap field. To stop tapping packets, call SIOCSIFTAP with a
-ifr_tap field of 0.
-
-The tap function is called like this:
-
-@example
-int tap (struct ifnet *, struct ether_header *, struct mbuf *)
-@end example
-
-The tap function should return 1 if the packet was fully handled, in
-which case the caller will simply discard the mbuf. The tap function
-should return 0 if the packet should be passed up to the higher
-networking layers.
-
-The tap function is called with the network semaphore locked. It must
-not make any calls on the application levels of the networking level
-itself. It is safe to call other non-networking RTEMS functions.
-
-@subsection Socket Options
-
-RTEMS adds two new @code{SOL_SOCKET} level options for @code{setsockopt} and
-@code{getsockopt}: @code{SO_SNDWAKEUP} and @code{SO_RCVWAKEUP}. For both, the
-option value should point to a sockwakeup structure. The sockwakeup
-structure has the following fields:
-
-@example
-@group
- void (*sw_pfn) (struct socket *, caddr_t);
- caddr_t sw_arg;
-@end group
-@end example
-
-These options are used to set a function to be called when there is
-data available from the socket (@code{SO_RCVWAKEUP}) and when there is space
-available to accept data written to the socket (@code{SO_SNDWAKEUP}).
-
-If @code{setsockopt} is called with the @code{SO_RCVWAKEUP} option, and the
-@code{sw_pfn} field is not zero, then when there is data
-available to be read from
-the socket, the function pointed to by the @code{sw_pfn} field will be
-called. A pointer to the socket structure will be passed as the first
-argument to the function. The @code{sw_arg} field set by the
-@code{SO_RCVWAKEUP} call will be passed as the second argument to the function.
-
-If @code{setsockopt} is called with the @code{SO_SNDWAKEUP}
-function, and the @code{sw_pfn} field is not zero, then when
-there is space available to accept data written to the socket,
-the function pointed to by the @code{sw_pfn} field
-will be called. The arguments passed to the function will be as with
-@code{SO_SNDWAKEUP}.
-
-When the function is called, the network semaphore will be locked.
-The function must be careful not to call any networking functions. It
-is OK to call an RTEMS function; for example, it is OK to send an
-RTEMS event.
-
-The purpose of these functions is to permit a more efficient
-alternative to the select call when dealing with a large number of
-sockets.
-
-@subsection Time Synchronization Using NTP
-
-@example
-int rtems_bsdnet_synchronize_ntp (int interval, rtems_task_priority priority);
-@end example
-
-If the interval argument is 0 the routine synchronizes the RTEMS time-of-day
-clock with the first NTP server in the rtems_bsdnet_ntpserve array and
-returns. The priority argument is ignored.
-
-If the interval argument is greater than 0, the routine also starts an
-RTEMS task at the specified priority and polls the NTP server every
-`interval' seconds. NOTE: This mode of operation has not yet been
-implemented.
-
-On successful synchronization of the RTEMS time-of-day clock the routine
-returns 0. If an error occurs a message is printed and the routine returns -1
-with an error code in errno.
-There is no timeout -- if there is no response from an NTP server the
-routine will wait forever.
-
-
-
-
diff --git a/doc/networking/networkflow.eps b/doc/networking/networkflow.eps
deleted file mode 100644
index 8aba78d55f..0000000000
--- a/doc/networking/networkflow.eps
+++ /dev/null
@@ -1,1343 +0,0 @@
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title:
-%%Creator: Diagram
-%%CreationDate: Tue Aug 18 16:41:45 1998
-%%For: eric
-%%DocumentFonts: (atend)
-%%Pages: 0 0
-%%BoundingBox: 0 0 487 549
-%%NXNextStepVersion: 3.0
-%%EndComments
-
-%%BeginProcSet: /usr/lib/NextStep/printPackage.ps 3.0
-%!
-% NeXT Printing Package
-% Version: 3.1
-% Copyright: 1988, NeXT, Inc.
-
-/__NXdef{1 index where{pop pop pop}{def}ifelse}bind def
-/__NXbdef{1 index where{pop pop pop}{bind def}ifelse}bind def
-/UserObjects 10 array __NXdef
-/defineuserobject{
- exch dup 1 add dup UserObjects length gt{
- array dup 0 UserObjects putinterval
- /UserObjects exch def
- }{pop}ifelse UserObjects exch 3 -1 roll put
-}__NXbdef
-/undefineuserobject{UserObjects exch null put}__NXbdef
-/execuserobject{UserObjects exch get exec}__NXbdef
-/__NXRectPath{4 2 roll moveto 1 index 0 rlineto
-0 exch rlineto neg 0 rlineto closepath}__NXbdef
-/__NXProcessRectArgs{
- 1 index type /arraytype eq{
- exch 0 4 2 index length 1 sub{
- dup 3 add 1 exch{1 index exch get exch}for
- 5 1 roll 5 index exec
- }for pop pop
- }{exec}ifelse
-}__NXbdef
-/rectfill{gsave newpath {__NXRectPath fill} __NXProcessRectArgs grestore}__NXbdef
-/rectclip{newpath {__NXRectPath} __NXProcessRectArgs clip newpath}__NXbdef
-/rectstroke{
- gsave newpath dup type /arraytype eq{dup length 6 eq}{false}ifelse{
- {gsave __NXRectPath null concat stroke grestore}
- dup length array cvx copy dup 2 4 -1 roll put __NXProcessRectArgs
- }{{__NXRectPath stroke} __NXProcessRectArgs}ifelse grestore
-}__NXbdef
-/_NXLevel2 systemdict /languagelevel known {languagelevel 2 ge}{false}ifelse __NXdef
-/xyshow{
- 0 1 3 index length 1 sub{
- currentpoint 4 index 3 index 1 getinterval show
- 3 index 3 index 2 mul 1 add get add exch
- 3 index 3 index 2 mul get add exch moveto pop
- }for pop pop
-}__NXbdef
-/xshow{
- 0 1 3 index length 1 sub{
- currentpoint 4 index 3 index 1 getinterval show
- exch 3 index 3 index get add exch moveto pop
- }for pop pop
-}__NXbdef
-/yshow{
- 0 1 3 index length 1 sub{
- currentpoint 4 index 3 index 1 getinterval show
- 3 index 3 index get add moveto pop
- }for pop pop
-}__NXbdef
-/arct{arcto pop pop pop pop}__NXbdef
-/setbbox{pop pop pop pop}__NXbdef
-/ucache{}__NXbdef
-/ucachestatus{mark 0 0 0 0 0}__NXbdef
-/setucacheparams{cleartomark}__NXbdef
-/uappend{systemdict begin cvx exec end}__NXbdef
-/ueofill{gsave newpath uappend eofill grestore}__NXbdef
-/ufill{gsave newpath uappend fill grestore}__NXbdef
-/ustroke{
- gsave newpath dup length 6 eq
- {exch uappend concat}{uappend}ifelse
- stroke grestore
-}__NXbdef
-/__NXustrokepathMatrix dup where {pop pop}{matrix def}ifelse
-/ustrokepath{
- newpath dup length 6 eq{
- exch uappend __NXustrokepathMatrix currentmatrix exch concat
- strokepath setmatrix
- }{uappend strokepath}ifelse
-} __NXbdef
-/upath{
- [exch {/ucache cvx}if pathbbox /setbbox cvx
- {/moveto cvx}{/lineto cvx}{/curveto cvx}{/closepath cvx}pathforall]cvx
-} __NXbdef
-/setstrokeadjust{pop}__NXbdef
-/currentstrokeadjust{false}__NXbdef
-/selectfont{exch findfont exch
-dup type /arraytype eq {makefont}{scalefont}ifelse setfont}__NXbdef
-/_NXCombineArrays{
- counttomark dup 2 add index dup length 3 -1 roll {
- 2 index length sub dup 4 1 roll 1 index exch 4 -1 roll putinterval exch
- }repeat pop pop pop
-}__NXbdef
-/flushgraphics{}def
-/setwindowtype{pop pop}def
-/currentwindowtype{pop 0}def
-/setalpha{pop}def
-/currentalpha{1.0}def
-/hidecursor{}def
-/obscurecursor{}def
-/revealcursor{}def
-/setcursor{4 {pop}repeat}bind def
-/showcursor{}def
-/NextStepEncoding where not{
-/NextStepEncoding StandardEncoding 256 array copy def
-0 [129/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/Ccedilla/Egrave
-/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex/Idieresis
-/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/Ugrave/Uacute
-/Ucircumflex/Udieresis/Yacute/Thorn/mu/multiply/divide/copyright
-176/registered 181/brokenbar 190/logicalnot 192/onesuperior 201/twosuperior
-204/threesuperior 209/plusminus/onequarter/onehalf/threequarters/agrave
-/aacute/acircumflex/atilde/adieresis/aring/ccedilla/egrave/eacute
-/ecircumflex/edieresis/igrave 226/iacute 228/icircumflex/idieresis/eth
-/ntilde 236/ograve/oacute/ocircumflex/otilde/odieresis 242/ugrave/uacute
-/ucircumflex 246/udieresis/yacute 252/thorn/ydieresis]
-{dup type /nametype eq
- {NextStepEncoding 2 index 2 index put pop 1 add}{exch pop}ifelse
-}forall pop
-/NextStepEncoding NextStepEncoding readonly def
-/_NXfstr 128 string dup 0 (_NX) putinterval def
-/_NXfindfont /findfont load def
-/findfont{
- % Because we can never let NextStepEncoding get into
- % SharedFontDirectory, we cannot reencode a font to NextStepEncoding
- % if we are in shared mode. So if currentshared is true,
- % we call the normal findfont and return that
- /currentshared where {pop currentshared} {false} ifelse
- {_NXfindfont}
- {dup _NXfstr 3 125 getinterval cvs length 3 add _NXfstr 0 3 -1 roll
- getinterval cvn exch FontDirectory 2 index known
- {pop FontDirectory exch get}
- {_NXfindfont dup /Encoding get StandardEncoding eq
- { dup length dict exch
- {1 index /FID ne {2 index 3 1 roll put}{pop pop}ifelse}forall
- dup /Encoding NextStepEncoding put definefont
- }{exch pop} ifelse
- }ifelse
- }ifelse
-}bind def
-}{pop}ifelse
-/_NXImageString {/__NXImageString where{pop}{/__NXImageString 4000 string __NXdef}ifelse __NXImageString}__NXbdef
-/_NXDoImageOp{
- 3 dict begin /parr 5 array def 1 index{dup}{1}ifelse /chans exch def
- chans 2 add 2 roll parr 0 chans getinterval astore pop
- 5 index 4 index mul 2 index{1 sub 8 idiv 1 add mul}{mul 1 sub 8 idiv 1 add}ifelse
- 4 index mul /totbytes exch def pop exch pop
- gsave matrix invertmatrix concat 0.5 setgray 0 0 4 2 roll rectfill grestore
- {0 1 chans 1 sub{parr exch get exec length totbytes exch sub /totbytes exch def}for totbytes 0 le{exit}if}loop end
-}__NXbdef
-/alphaimage{1 add _NXDoImageOp}def
-_NXLevel2{
- /NXCalibratedRGBColorSpace where{pop}{
- /NXCalibratedRGBColorSpace
- {mark /NXCalibratedRGB /ColorSpace findresource exch pop}stopped
- {cleartomark /NXCalibratedRGB[/CIEBasedABC 2 dict dup begin
- /MatrixLMN[.4124 .2126 .0193 .3576 .7152 .1192 .1805 .0722 .9505]def
- /WhitePoint[.9505 1 1.089] def end] /ColorSpace defineresource}if def}ifelse
- /nxsetrgbcolor{NXCalibratedRGBColorSpace setcolorspace setcolor}__NXbdef
- /nxsetgray{dup dup nxsetrgbcolor}__NXbdef
- /_NXCalibratedImage{exch{array astore dup length true}{false}ifelse
- 8 -1 roll{NXCalibratedRGBColorSpace setcolorspace}if
- 8 dict dup 9 1 roll begin /ImageType 1 def /MultipleDataSources exch def
- currentcolorspace 0 get /Indexed eq{pop /Decode[0 2 6 index exp 1 sub]def}
- {2 mul dup array /Decode exch def 1 sub 0 1 3 -1 roll{Decode exch dup 2 mod put}for}ifelse
- /DataSource exch def /ImageMatrix exch def
- /BitsPerComponent exch def /Height exch def /Width exch def end image}__NXbdef
-} {
- /setcmykcolor{
- 1.0 exch sub dup dup 6 -1 roll sub dup 0 lt{pop 0}if 5 1 roll
- 4 -1 roll sub dup 0 lt{pop 0}if 3 1 roll exch sub dup 0 lt{pop 0}if setrgbcolor}__NXbdef
- /currentcmykcolor{currentrgbcolor 3{1.0 exch sub 3 1 roll}repeat 0}__NXbdef
- /colorimage{2 copy 3 ne or{_NXDoImageOp}{4 index dup 8 ne exch 4 ne and{_NXDoImageOp}{
- pop pop save 6 1 roll 12 dict begin/Proc exch def/Res 0 string def
- /Alloc{2 index length mul 2 add dup 2 index load length gt{1.2 mul round cvi string def}{pop pop}ifelse}def
- 1 index 8 eq{/Unpack{.34 Alloc}def}{
- /Wid 4 index 3 mul def exch pop 8 exch/Str1 0 string def/Lim Wid def
- /Unpack{.67 Alloc/Str1 2 Alloc 0 exch Lim exch
- {dup -4 bitshift 17 mul Str1 exch 4 index exch put 15 and 17 mul Str1 exch 3 index 1 add exch put
- 2 sub dup 0 le{0 lt Wid exch{exch 1 sub exch}if}if exch 2 add exch
- }forall/Lim exch def Str1 exch 0 exch getinterval
- }def
- }ifelse
- /Ops[{.3 mul add 1}{.59 mul add 2}{.11 mul add round cvi Res exch 2 index exch put 1 add 0.0 0}]def/Val 0.0 def/Phase 0 def
- {0 Val Phase Proc/Res Unpack{exch Ops exch get exec}forall/Phase exch def/Val exch def Res exch 0 exch getinterval}
- image end restore}ifelse}ifelse
- }__NXbdef
- /nxsetrgbcolor{setrgbcolor}__NXbdef /nxsetgray{setgray}__NXbdef
- /setpattern{pop .5 setgray}__NXbdef
- /_NXCalibratedImage{dup 1 eq {pop pop image}{colorimage}ifelse pop}__NXbdef
-} ifelse
-/_NXSetCMYKOrRGB where{pop}{
- mark{systemdict /currentwindow get exec}stopped
- {{pop pop pop setcmykcolor}}{{nxsetrgbcolor pop pop pop pop}}ifelse /_NXSetCMYKOrRGB exch def cleartomark
-}ifelse
-%%EndProcSet
-
-gsave
- /__NXbasematrix matrix currentmatrix def
-grestore
-%%EndProlog
-%%BeginSetup
-%%EndSetup
-gsave
-0 0 488 549 rectclip
-[1 0 0 -1 -26.5 567] concat
-26.5 18 487 549 rectclip
-gsave
-36 306 306 261 rectclip
-0 nxsetgray
-1 setlinewidth
-[6] 1 setdash
-36.5 306.5 305 260 rectstroke
-grestore
-0.333338 nxsetgray
-gsave
-0.333338 nxsetgray
-newpath
-systemdict
-begin
-58 418 166 472 setbbox
-68.800003 418 moveto
-155.200012 428.799988 10.8 -90 0 arc
-155.200012 461.199982 10.8 0 90 arc
-68.800003 461.199982 10.8 90 180 arc
-68.800003 428.799988 10.8 180 270 arc
-closepath
-end
-clip
-newpath
-1 setlinewidth
-gsave
-newpath
-systemdict
-begin
-58 418 166 472 setbbox
-69.300003 418.5 moveto
-154.700012 429.299988 10.8 -90 0 arc
-154.700012 460.699982 10.8 0 90 arc
-69.300003 460.699982 10.8 90 180 arc
-69.300003 429.299988 10.8 180 270 arc
-closepath
-end
-stroke
-grestore
-grestore
-gsave
-newpath
-systemdict
-begin
-58 418 166 472 setbbox
-69.300003 419 moveto
-154.700012 429.299988 10.3 -90 0 arc
-154.700012 460.699982 10.3 0 90 arc
-69.300003 460.699982 10.3 90 180 arc
-69.300003 429.299988 10.3 180 270 arc
-closepath
-end
-fill
-grestore
-1 nxsetgray
-gsave
-newpath
-systemdict
-begin
-54 414 162 468 setbbox
-65.300003 415 moveto
-150.700012 425.299988 10.3 -90 0 arc
-150.700012 456.699982 10.3 0 90 arc
-65.300003 456.699982 10.3 90 180 arc
-65.300003 425.299988 10.3 180 270 arc
-closepath
-end
-fill
-grestore
-gsave
-newpath
-systemdict
-begin
-54 414 162 468 setbbox
-64.800003 414 moveto
-151.200012 424.799988 10.8 -90 0 arc
-151.200012 457.199982 10.8 0 90 arc
-64.800003 457.199982 10.8 90 180 arc
-64.800003 424.799988 10.8 180 270 arc
-closepath
-end
-clip
-newpath
-0 nxsetgray
-1 setlinewidth
-gsave
-newpath
-systemdict
-begin
-54 414 162 468 setbbox
-65.300003 414.5 moveto
-150.700012 425.299988 10.8 -90 0 arc
-150.700012 456.699982 10.8 0 90 arc
-65.300003 456.699982 10.8 90 180 arc
-65.300003 425.299988 10.8 180 270 arc
-closepath
-end
-stroke
-grestore
-grestore
-gsave
-/Helvetica findfont 12 scalefont [1 0 0 -1 0 0] makefont
-8
-exch
-defineuserobject
-8 execuserobject setfont
-0 nxsetgray
-8 execuserobject setfont
-0 nxsetgray
-84 430 moveto (Interface) show
-85 445 moveto (Receive) show
-84 460 moveto (Daemon) show
-grestore
-0.333338 nxsetgray
-gsave
-0.333338 nxsetgray
-newpath
-systemdict
-begin
-193 418 301 472 setbbox
-203.800003 418 moveto
-290.200012 428.799988 10.8 -90 0 arc
-290.200012 461.199982 10.8 0 90 arc
-203.800003 461.199982 10.8 90 180 arc
-203.800003 428.799988 10.8 180 270 arc
-closepath
-end
-clip
-newpath
-1 setlinewidth
-gsave
-newpath
-systemdict
-begin
-193 418 301 472 setbbox
-204.300003 418.5 moveto
-289.700012 429.299988 10.8 -90 0 arc
-289.700012 460.699982 10.8 0 90 arc
-204.300003 460.699982 10.8 90 180 arc
-204.300003 429.299988 10.8 180 270 arc
-closepath
-end
-stroke
-grestore
-grestore
-gsave
-newpath
-systemdict
-begin
-193 418 301 472 setbbox
-204.300003 419 moveto
-289.700012 429.299988 10.3 -90 0 arc
-289.700012 460.699982 10.3 0 90 arc
-204.300003 460.699982 10.3 90 180 arc
-204.300003 429.299988 10.3 180 270 arc
-closepath
-end
-fill
-grestore
-1 nxsetgray
-gsave
-newpath
-systemdict
-begin
-189 414 297 468 setbbox
-200.300003 415 moveto
-285.700012 425.299988 10.3 -90 0 arc
-285.700012 456.699982 10.3 0 90 arc
-200.300003 456.699982 10.3 90 180 arc
-200.300003 425.299988 10.3 180 270 arc
-closepath
-end
-fill
-grestore
-gsave
-newpath
-systemdict
-begin
-189 414 297 468 setbbox
-199.800003 414 moveto
-286.200012 424.799988 10.8 -90 0 arc
-286.200012 457.199982 10.8 0 90 arc
-199.800003 457.199982 10.8 90 180 arc
-199.800003 424.799988 10.8 180 270 arc
-closepath
-end
-clip
-newpath
-0 nxsetgray
-1 setlinewidth
-gsave
-newpath
-systemdict
-begin
-189 414 297 468 setbbox
-200.300003 414.5 moveto
-285.700012 425.299988 10.8 -90 0 arc
-285.700012 456.699982 10.8 0 90 arc
-200.300003 456.699982 10.8 90 180 arc
-200.300003 425.299988 10.8 180 270 arc
-closepath
-end
-stroke
-grestore
-grestore
-gsave
-8 execuserobject setfont
-0 nxsetgray
-8 execuserobject setfont
-0 nxsetgray
-219 430 moveto (Interface) show
-219 445 moveto (Transmit) show
-219 460 moveto (Daemon) show
-grestore
-0.333338 nxsetgray
-gsave
-0.333338 nxsetgray
-newpath
-systemdict
-begin
-184 328 310 382 setbbox
-184 328 moveto
-100.800003 0 rlineto
-25.200001 54 rlineto
--100.800003 0 rlineto
-closepath
-end
-clip
-newpath
-1 setlinewidth
-gsave
-newpath
-systemdict
-begin
-184.5 328.5 309.5 381.5 setbbox
-184.5 328.5 moveto
-100 0 rlineto
-25 53 rlineto
--100 0 rlineto
-closepath
-end
-stroke
-grestore
-grestore
-gsave
-newpath
-systemdict
-begin
-185 329 309 381 setbbox
-185 329 moveto
-99.199997 0 rlineto
-24.799999 52 rlineto
--99.199997 0 rlineto
-closepath
-end
-fill
-grestore
-1 nxsetgray
-gsave
-newpath
-systemdict
-begin
-181 325 305 377 setbbox
-181 325 moveto
-99.199997 0 rlineto
-24.799999 52 rlineto
--99.199997 0 rlineto
-closepath
-end
-fill
-grestore
-gsave
-newpath
-systemdict
-begin
-180 324 306 378 setbbox
-180 324 moveto
-100.800003 0 rlineto
-25.200001 54 rlineto
--100.800003 0 rlineto
-closepath
-end
-clip
-newpath
-0 nxsetgray
-1 setlinewidth
-gsave
-newpath
-systemdict
-begin
-180.5 324.5 305.5 377.5 setbbox
-180.5 324.5 moveto
-100 0 rlineto
-25 53 rlineto
--100 0 rlineto
-closepath
-end
-stroke
-grestore
-grestore
-gsave
-8 execuserobject setfont
-0 nxsetgray
-8 execuserobject setfont
-0 nxsetgray
-219 340.5 moveto (Interface) show
-224 355.5 moveto (Output) show
-224 370.5 moveto (Queue) show
-grestore
-0.333338 nxsetgray
-gsave
-0.333338 nxsetgray
-193 184 108 54 rectclip
-1 setlinewidth
-193.5 184.5 107 53 rectstroke
-grestore
-194 185 106 52 rectfill
-1 nxsetgray
-190 181 106 52 rectfill
-gsave
-189 180 108 54 rectclip
-0 nxsetgray
-1 setlinewidth
-189.5 180.5 107 53 rectstroke
-grestore
-gsave
-8 execuserobject setfont
-0 nxsetgray
-8 execuserobject setfont
-0 nxsetgray
-220 204 moveto (Network) show
-228 219 moveto (Code) show
-grestore
-0 nxsetgray
-1 setlinewidth
-2 setlinejoin
-gsave
-newpath
-systemdict
-begin
-242.999969 234 243.000031 316.299988 setbbox
-243.000031 234 moveto
-242.999969 316.299988 lineto
-end
-stroke
-grestore
-0 setlinejoin
-gsave
-[0 1 -1 0 567 81.000031] concat
-gsave
-newpath
-systemdict
-begin
-233.799973 319.5 242.999969 328.5 setbbox
-242.999969 324 moveto
--9.2 4.5 rlineto
-1.5 -4.5 rlineto
--1.5 -4.5 rlineto
-closepath
-end
-fill
-grestore
-grestore
-0 nxsetgray
-1 setlinewidth
-2 setlinejoin
-gsave
-newpath
-systemdict
-begin
-242.999985 378 243.000031 406.299988 setbbox
-243.000031 378 moveto
-242.999985 406.299988 lineto
-end
-stroke
-grestore
-0 setlinejoin
-gsave
-[0 1 -1 0 657 171.000031] concat
-gsave
-newpath
-systemdict
-begin
-233.799973 409.5 242.999969 418.5 setbbox
-242.999969 414 moveto
--9.2 4.5 rlineto
-1.5 -4.5 rlineto
--1.5 -4.5 rlineto
-closepath
-end
-fill
-grestore
-grestore
-0.333338 nxsetgray
-gsave
-0.333338 nxsetgray
-newpath
-systemdict
-begin
-193 22 301 76 setbbox
-203.800003 22 moveto
-290.200012 32.799999 10.8 -90 0 arc
-290.200012 65.199997 10.8 0 90 arc
-203.800003 65.199997 10.8 90 180 arc
-203.800003 32.799999 10.8 180 270 arc
-closepath
-end
-clip
-newpath
-1 setlinewidth
-gsave
-newpath
-systemdict
-begin
-193 22 301 76 setbbox
-204.300003 22.5 moveto
-289.700012 33.299999 10.8 -90 0 arc
-289.700012 64.699997 10.8 0 90 arc
-204.300003 64.699997 10.8 90 180 arc
-204.300003 33.299999 10.8 180 270 arc
-closepath
-end
-stroke
-grestore
-grestore
-gsave
-newpath
-systemdict
-begin
-193 22 301 76 setbbox
-204.300003 23 moveto
-289.700012 33.299999 10.3 -90 0 arc
-289.700012 64.699997 10.3 0 90 arc
-204.300003 64.699997 10.3 90 180 arc
-204.300003 33.299999 10.3 180 270 arc
-closepath
-end
-fill
-grestore
-1 nxsetgray
-gsave
-newpath
-systemdict
-begin
-189 18 297 72 setbbox
-200.300003 19 moveto
-285.700012 29.299999 10.3 -90 0 arc
-285.700012 60.699997 10.3 0 90 arc
-200.300003 60.699997 10.3 90 180 arc
-200.300003 29.299999 10.3 180 270 arc
-closepath
-end
-fill
-grestore
-gsave
-newpath
-systemdict
-begin
-189 18 297 72 setbbox
-199.800003 18 moveto
-286.200012 28.799999 10.8 -90 0 arc
-286.200012 61.200001 10.8 0 90 arc
-199.800003 61.200001 10.8 90 180 arc
-199.800003 28.799999 10.8 180 270 arc
-closepath
-end
-clip
-newpath
-0 nxsetgray
-1 setlinewidth
-gsave
-newpath
-systemdict
-begin
-189 18 297 72 setbbox
-200.300003 18.5 moveto
-285.700012 29.299999 10.8 -90 0 arc
-285.700012 60.699997 10.8 0 90 arc
-200.300003 60.699997 10.8 90 180 arc
-200.300003 29.299999 10.8 180 270 arc
-closepath
-end
-stroke
-grestore
-grestore
-gsave
-8 execuserobject setfont
-0 nxsetgray
-8 execuserobject setfont
-0 nxsetgray
-229 34 moveto (User) show
-213 49 moveto (Application) show
-229 64 moveto (Task) show
-grestore
-0.333338 nxsetgray
-gsave
-0.333338 nxsetgray
-newpath
-systemdict
-begin
-346 121 472 175 setbbox
-346 121 moveto
-100.800003 0 rlineto
-25.200001 54 rlineto
--100.800003 0 rlineto
-closepath
-end
-clip
-newpath
-1 setlinewidth
-gsave
-newpath
-systemdict
-begin
-346.5 121.5 471.5 174.5 setbbox
-346.5 121.5 moveto
-100 0 rlineto
-25 53 rlineto
--100 0 rlineto
-closepath
-end
-stroke
-grestore
-grestore
-gsave
-newpath
-systemdict
-begin
-347 122 471 174 setbbox
-347 122 moveto
-99.199997 0 rlineto
-24.799999 52 rlineto
--99.199997 0 rlineto
-closepath
-end
-fill
-grestore
-1 nxsetgray
-gsave
-newpath
-systemdict
-begin
-343 118 467 170 setbbox
-343 118 moveto
-99.199997 0 rlineto
-24.799999 52 rlineto
--99.199997 0 rlineto
-closepath
-end
-fill
-grestore
-gsave
-newpath
-systemdict
-begin
-342 117 468 171 setbbox
-342 117 moveto
-100.800003 0 rlineto
-25.200001 54 rlineto
--100.800003 0 rlineto
-closepath
-end
-clip
-newpath
-0 nxsetgray
-1 setlinewidth
-gsave
-newpath
-systemdict
-begin
-342.5 117.5 467.5 170.5 setbbox
-342.5 117.5 moveto
-100 0 rlineto
-25 53 rlineto
--100 0 rlineto
-closepath
-end
-stroke
-grestore
-grestore
-gsave
-8 execuserobject setfont
-0 nxsetgray
-8 execuserobject setfont
-0 nxsetgray
-386 133.5 moveto (Socket) show
-382 148.5 moveto (Receive) show
-384 163.5 moveto ( Queue) show
-grestore
-0.333338 nxsetgray
-gsave
-0.333338 nxsetgray
-newpath
-systemdict
-begin
-373 418 481 472 setbbox
-383.799988 418 moveto
-470.199982 428.799988 10.8 -90 0 arc
-470.199982 461.199982 10.8 0 90 arc
-383.799988 461.199982 10.8 90 180 arc
-383.799988 428.799988 10.8 180 270 arc
-closepath
-end
-clip
-newpath
-1 setlinewidth
-gsave
-newpath
-systemdict
-begin
-373 418 481 472 setbbox
-384.299988 418.5 moveto
-469.699982 429.299988 10.8 -90 0 arc
-469.699982 460.699982 10.8 0 90 arc
-384.299988 460.699982 10.8 90 180 arc
-384.299988 429.299988 10.8 180 270 arc
-closepath
-end
-stroke
-grestore
-grestore
-gsave
-newpath
-systemdict
-begin
-373 418 481 472 setbbox
-384.299988 419 moveto
-469.699982 429.299988 10.3 -90 0 arc
-469.699982 460.699982 10.3 0 90 arc
-384.299988 460.699982 10.3 90 180 arc
-384.299988 429.299988 10.3 180 270 arc
-closepath
-end
-fill
-grestore
-1 nxsetgray
-gsave
-newpath
-systemdict
-begin
-369 414 477 468 setbbox
-380.299988 415 moveto
-465.699982 425.299988 10.3 -90 0 arc
-465.699982 456.699982 10.3 0 90 arc
-380.299988 456.699982 10.3 90 180 arc
-380.299988 425.299988 10.3 180 270 arc
-closepath
-end
-fill
-grestore
-gsave
-newpath
-systemdict
-begin
-369 414 477 468 setbbox
-379.799988 414 moveto
-466.199982 424.799988 10.8 -90 0 arc
-466.199982 457.199982 10.8 0 90 arc
-379.799988 457.199982 10.8 90 180 arc
-379.799988 424.799988 10.8 180 270 arc
-closepath
-end
-clip
-newpath
-0 nxsetgray
-1 setlinewidth
-gsave
-newpath
-systemdict
-begin
-369 414 477 468 setbbox
-380.299988 414.5 moveto
-465.699982 425.299988 10.8 -90 0 arc
-465.699982 456.699982 10.8 0 90 arc
-380.299988 456.699982 10.8 90 180 arc
-380.299988 425.299988 10.8 180 270 arc
-closepath
-end
-stroke
-grestore
-grestore
-gsave
-8 execuserobject setfont
-0 nxsetgray
-8 execuserobject setfont
-0 nxsetgray
-400 437.5 moveto (Network) show
-399 452.5 moveto (Daemon) show
-grestore
-0.333338 nxsetgray
-gsave
-0.333338 nxsetgray
-67 499 90 45 rectclip
-1 setlinewidth
-67.5 499.5 89 44 rectstroke
-grestore
-68 500 88 43 rectfill
-1 nxsetgray
-64 496 88 43 rectfill
-gsave
-63 495 90 45 rectclip
-0 nxsetgray
-1 setlinewidth
-63.5 495.5 89 44 rectstroke
-grestore
-gsave
-8 execuserobject setfont
-0 nxsetgray
-8 execuserobject setfont
-0 nxsetgray
-86 508 moveto (Receive) show
-85 523 moveto (Interrupt) show
-gsave
-66 496 84 43 rectclip
-86 538 moveto (Handler) show
-grestore
-grestore
-0.333338 nxsetgray
-gsave
-0.333338 nxsetgray
-202 499 90 45 rectclip
-1 setlinewidth
-202.5 499.5 89 44 rectstroke
-grestore
-203 500 88 43 rectfill
-1 nxsetgray
-199 496 88 43 rectfill
-gsave
-198 495 90 45 rectclip
-0 nxsetgray
-1 setlinewidth
-198.5 495.5 89 44 rectstroke
-grestore
-gsave
-8 execuserobject setfont
-0 nxsetgray
-8 execuserobject setfont
-0 nxsetgray
-219 508 moveto (Transmit) show
-220 523 moveto (Interrupt) show
-gsave
-201 496 84 43 rectclip
-221 538 moveto (Handler) show
-grestore
-grestore
-0 nxsetgray
-1 setlinewidth
-2 setlinejoin
-[1 6] 1 setdash
-gsave
-newpath
-systemdict
-begin
-108.000023 475.700012 108.000031 495 setbbox
-108.000023 495 moveto
-108.000031 475.700012 lineto
-end
-stroke
-grestore
-[] 0 setdash
-0 setlinejoin
-gsave
-[0 -1 1 0 -359.999969 576] concat
-gsave
-newpath
-systemdict
-begin
-98.800034 463.5 108.000031 472.5 setbbox
-108.000031 468 moveto
--9.2 4.5 rlineto
-1.5 -4.5 rlineto
--1.5 -4.5 rlineto
-closepath
-end
-fill
-grestore
-grestore
-0 nxsetgray
-1 setlinewidth
-2 setlinejoin
-[1 6] 1 setdash
-gsave
-newpath
-systemdict
-begin
-243.000015 475.700012 243.000031 495 setbbox
-243.000015 495 moveto
-243.000031 475.700012 lineto
-end
-stroke
-grestore
-[] 0 setdash
-0 setlinejoin
-gsave
-[0 -1 1 0 -224.999969 711] concat
-gsave
-newpath
-systemdict
-begin
-233.800034 463.5 243.000031 472.5 setbbox
-243.000031 468 moveto
--9.2 4.5 rlineto
-1.5 -4.5 rlineto
--1.5 -4.5 rlineto
-closepath
-end
-fill
-grestore
-grestore
-0 nxsetgray
-1 setlinewidth
-2 setlinejoin
-[6] 1 setdash
-gsave
-newpath
-systemdict
-begin
-27 90 513 90 setbbox
-27 90 moveto
-513 90 lineto
-end
-stroke
-grestore
-[] 0 setdash
-0 setlinejoin
-0 nxsetgray
-1 setlinewidth
-2 setlinejoin
-gsave
-newpath
-systemdict
-begin
-304.700012 45 405.000031 117 setbbox
-405.000031 117 moveto
-405 45 lineto
-304.700012 45 lineto
-end
-stroke
-grestore
-0 setlinejoin
-gsave
-[-1 0 0 -1 594 90] concat
-gsave
-newpath
-systemdict
-begin
-287.799988 40.5 297 49.5 setbbox
-297 45 moveto
--9.2 4.5 rlineto
-1.5 -4.5 rlineto
--1.5 -4.5 rlineto
-closepath
-end
-fill
-grestore
-grestore
-0 nxsetgray
-1 setlinewidth
-2 setlinejoin
-gsave
-newpath
-systemdict
-begin
-297 178.699997 405.000031 207 setbbox
-297 207 moveto
-315 207 lineto
-405 207 lineto
-405.000031 178.699997 lineto
-end
-stroke
-grestore
-0 setlinejoin
-gsave
-[0 -1 1 0 234.000031 576] concat
-gsave
-newpath
-systemdict
-begin
-395.800018 166.5 405.000031 175.5 setbbox
-405.000031 171 moveto
--9.2 4.5 rlineto
-1.5 -4.5 rlineto
--1.5 -4.5 rlineto
-closepath
-end
-fill
-grestore
-grestore
-0.333338 nxsetgray
-gsave
-0.333338 nxsetgray
-newpath
-systemdict
-begin
-400 247 472 301 setbbox
-472 295.600006 moveto
-0 -43.200001 rlineto
-472 249.419205 455.872009 247 436 247 curveto
-416.127991 247 400 249.419205 400 252.399994 curveto
-0 43.200001 rlineto
-400 298.580811 416.127991 301 436 301 curveto
-455.872009 301 472 298.580811 472 295.600006 curveto
-closepath
-end
-clip
-newpath
-1 setlinewidth
-gsave
-newpath
-systemdict
-begin
-400.5 247.5 471.5 300.5 setbbox
-471.5 295.200012 moveto
-0 -42.400002 rlineto
-471.5 249.874405 455.596008 247.5 436 247.5 curveto
-416.403992 247.5 400.5 249.874405 400.5 252.800003 curveto
-0 42.400002 rlineto
-400.5 298.12558 416.403992 300.5 436 300.5 curveto
-455.596008 300.5 471.5 298.12558 471.5 295.199982 curveto
-closepath
-end
-stroke
-grestore
-gsave
-newpath
-systemdict
-begin
-400.5 247.5 471.5 300.5 setbbox
-471.5 252.800003 moveto
-471.5 255.725601 455.596008 258.100006 436 258.100006 curveto
-416.403992 258.100006 400.5 255.725601 400.5 252.800003 curveto
-end
-stroke
-grestore
-grestore
-gsave
-newpath
-systemdict
-begin
-401 248 471 300 setbbox
-471 294.799988 moveto
-0 -41.599998 rlineto
-471 250.329605 455.320007 248 436 248 curveto
-416.679993 248 401 250.329605 401 253.199997 curveto
-0 41.599998 rlineto
-401 297.67041 416.679993 300 436 300 curveto
-455.320007 300 471 297.67041 471 294.800018 curveto
-closepath
-end
-fill
-grestore
-1 nxsetgray
-gsave
-newpath
-systemdict
-begin
-397 244 467 296 setbbox
-467 290.799988 moveto
-0 -41.599998 rlineto
-467 246.329605 451.320007 244 432 244 curveto
-412.679993 244 397 246.329605 397 249.199997 curveto
-0 41.599998 rlineto
-397 293.67041 412.679993 296 432 296 curveto
-451.320007 296 467 293.67041 467 290.800018 curveto
-closepath
-end
-fill
-grestore
-gsave
-newpath
-systemdict
-begin
-396 243 468 297 setbbox
-468 291.600006 moveto
-0 -43.200001 rlineto
-468 245.419205 451.872009 243 432 243 curveto
-412.127991 243 396 245.419205 396 248.399994 curveto
-0 43.200001 rlineto
-396 294.580811 412.127991 297 432 297 curveto
-451.872009 297 468 294.580811 468 291.600006 curveto
-closepath
-end
-clip
-newpath
-0 nxsetgray
-1 setlinewidth
-gsave
-newpath
-systemdict
-begin
-396.5 243.5 467.5 296.5 setbbox
-467.5 291.200012 moveto
-0 -42.400002 rlineto
-467.5 245.874405 451.596008 243.5 432 243.5 curveto
-412.403992 243.5 396.5 245.874405 396.5 248.800003 curveto
-0 42.400002 rlineto
-396.5 294.12558 412.403992 296.5 432 296.5 curveto
-451.596008 296.5 467.5 294.12558 467.5 291.199982 curveto
-closepath
-end
-stroke
-grestore
-gsave
-newpath
-systemdict
-begin
-396.5 243.5 467.5 296.5 setbbox
-467.5 248.800003 moveto
-467.5 251.725601 451.596008 254.100006 432 254.100006 curveto
-412.403992 254.100006 396.5 251.725601 396.5 248.800003 curveto
-end
-stroke
-grestore
-grestore
-gsave
-8 execuserobject setfont
-0 nxsetgray
-8 execuserobject setfont
-0 nxsetgray
-411 266 moveto (Routing) show
-416 281 moveto (Table) show
-grestore
-0 nxsetgray
-1 setlinewidth
-2 setlinejoin
-gsave
-newpath
-systemdict
-begin
-304.304871 227.434952 388.695129 255.565048 setbbox
-304.304871 227.434952 moveto
-388.695129 255.565048 lineto
-end
-stroke
-grestore
-0 setlinejoin
-gsave
-[-0.948683 -0.316228 0.316228 -0.948683 507.607697 532.373413] concat
-gsave
-newpath
-systemdict
-begin
-287.799988 220.5 297 229.5 setbbox
-297 225 moveto
--9.2 4.5 rlineto
-1.5 -4.5 rlineto
--1.5 -4.5 rlineto
-closepath
-end
-fill
-grestore
-grestore
-gsave
-[0.948683 0.316228 -0.316228 0.948683 101.908165 -111.986488] concat
-gsave
-newpath
-systemdict
-begin
-386.799988 253.5 396 262.5 setbbox
-396 258 moveto
--9.2 4.5 rlineto
-1.5 -4.5 rlineto
--1.5 -4.5 rlineto
-closepath
-end
-fill
-grestore
-grestore
-0 nxsetgray
-1 setlinewidth
-2 setlinejoin
-gsave
-newpath
-systemdict
-begin
-242.999969 72 243.000031 172.300003 setbbox
-243.000031 72 moveto
-242.999969 172.300003 lineto
-end
-stroke
-grestore
-0 setlinejoin
-gsave
-[0 1 -1 0 422.999969 -62.999969] concat
-gsave
-newpath
-systemdict
-begin
-233.799973 175.5 242.999969 184.5 setbbox
-242.999969 180 moveto
--9.2 4.5 rlineto
-1.5 -4.5 rlineto
--1.5 -4.5 rlineto
-closepath
-end
-fill
-grestore
-grestore
-0 nxsetgray
-1 setlinewidth
-2 setlinejoin
-gsave
-newpath
-systemdict
-begin
-108 207 181.300003 414 setbbox
-108.000031 414 moveto
-108 207 lineto
-181.300003 207 lineto
-end
-stroke
-grestore
-0 setlinejoin
-gsave
-[1 0 0 1 0 0] concat
-gsave
-newpath
-systemdict
-begin
-179.800003 202.5 189 211.5 setbbox
-189 207 moveto
--9.2 4.5 rlineto
-1.5 -4.5 rlineto
--1.5 -4.5 rlineto
-closepath
-end
-fill
-grestore
-grestore
-grestore
-%%Trailer
-%%DocumentFonts: Helvetica
diff --git a/doc/networking/networkflow.jpg b/doc/networking/networkflow.jpg
deleted file mode 100644
index fc63ec69e0..0000000000
--- a/doc/networking/networkflow.jpg
+++ /dev/null
Binary files differ
diff --git a/doc/networking/networkflow.pdf b/doc/networking/networkflow.pdf
deleted file mode 100644
index b8c6cf9ab9..0000000000
--- a/doc/networking/networkflow.pdf
+++ /dev/null
Binary files differ
diff --git a/doc/networking/networkflow.png b/doc/networking/networkflow.png
deleted file mode 100644
index fd8ce244fa..0000000000
--- a/doc/networking/networkflow.png
+++ /dev/null
Binary files differ
diff --git a/doc/networking/networking.texi b/doc/networking/networking.texi
deleted file mode 100644
index 5d255727e5..0000000000
--- a/doc/networking/networking.texi
+++ /dev/null
@@ -1,111 +0,0 @@
-\input texinfo @c -*-texinfo-*-
-@c %**start of header
-@setfilename networking
-@syncodeindex vr fn
-@synindex ky cp
-@paragraphindent 0
-@c @smallbook
-@c %**end of header
-
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@c
-@c Master file for the network Supplement
-@c
-
-@include ../common/setup.texi
-
-@ignore
-@ifinfo
-@format
-START-INFO-DIR-ENTRY
-* RTEMS Network Supplement:
-END-INFO-DIR-ENTRY
-@end format
-@end ifinfo
-@end ignore
-
-@c
-@c Title Page Stuff
-@c
-
-@set edition @value{RTEMS-EDITION}
-@set version @value{RTEMS-VERSION}
-@set update-date @value{RTEMS-UPDATE-DATE}
-@set update-month @value{RTEMS-UPDATE-MONTH}
-
-@c
-@c I don't really like having a short title page. --joel
-@c
-@c @shorttitlepage RTEMS Network Supplement
-
-@setchapternewpage odd
-@settitle RTEMS Network Supplement
-@titlepage
-@finalout
-
-@title RTEMS Network Supplement
-@subtitle Edition @value{edition}, for RTEMS @value{version}
-@sp 1
-@subtitle @value{update-month}
-@author On-Line Applications Research Corporation
-@page
-@include ../common/cpright.texi
-@end titlepage
-
-@c This prevents a black box from being printed on "overflow" lines.
-@c The alternative is to rework a sentence to avoid this problem.
-
-@include preface.texi
-@include networktasks.texi
-@include driver.texi
-@include networkapp.texi
-@include testing.texi
-@include servers.texi
-@include decdriver.texi
-@ifinfo
-@node Top, Preface, (dir), (dir)
-@top networking
-
-This is the online version of the RTEMS Network Supplement.
-
-@menu
-* Preface::
-* Network Task Structure and Data Flow::
-* Networking Driver::
-* Using Networking in an RTEMS Application::
-* Testing the Driver::
-* Network Servers::
-* DEC 21140 Driver::
-* Command and Variable Index::
-* Concept Index::
-@end menu
-
-@end ifinfo
-@c
-@c
-@c Need to copy the emacs stuff and "trailer stuff" (index, toc) into here
-@c
-
-@node Command and Variable Index, Concept Index, List of Ethernet cards using the DEC chip, Top
-@unnumbered Command and Variable Index
-
-There are currently no Command and Variable Index entries.
-
-@c @printindex fn
-
-@node Concept Index, , Command and Variable Index, Top
-@unnumbered Concept Index
-
-There are currently no Concept Index entries.
-@c @printindex cp
-
-@contents
-@bye
-
diff --git a/doc/networking/networktasks.t b/doc/networking/networktasks.t
deleted file mode 100644
index b9760301e1..0000000000
--- a/doc/networking/networktasks.t
+++ /dev/null
@@ -1,62 +0,0 @@
-@c
-@c Written by Eric Norum
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Network Task Structure and Data Flow
-
-A schematic diagram of the tasks and message @b{mbuf} queues in a
-simple RTEMS networking application is shown in the following
-figure:
-
-@ifset use-ascii
-@example
-@group
-NO ASCII VERSION OF THE TASKING FIGURE IS AVAILABLE
-@end group
-@end example
-@end ifset
-
-@ifset use-tex
-@c for now use the ascii version
-@example
-@group
-@c why does this not work for pdf?
-@c @image{networkflow,5in,6in}
-NO TEX VERSION OF THE TASKING FIGURE IS AVAILABLE
-@end group
-@end example
-@end ifset
-
-@ifset use-html
-@html
-<IMG SRC="networkflow.jpg" ALIGN=CENTER
- ALT="Network Task Structure and Data Flow">
-@end html
-@end ifset
-
-
-The transmit task for each network interface is normally blocked waiting
-for a packet to arrive in the transmit queue. Once a packet arrives, the
-transmit task may block waiting for an event from the transmit interrupt
-handler. The transmit interrupt handler sends an RTEMS event to the transmit
-task to indicate that transmit hardware resources have become available.
-
-The receive task for each network interface is normally blocked waiting
-for an event from the receive interrupt handler. When this event is received
-the receive task reads the packet and forwards it to the network stack
-for subsequent processing by the network task.
-
-The network task processes incoming packets and takes care of
-timed operations such as handling TCP timeouts and
-aging and removing routing table entries.
-
-The `Network code' contains routines which may run in the context of
-the user application tasks, the interface receive task or the network task.
-A network semaphore ensures that
-the data structures manipulated by the network code remain consistent.
diff --git a/doc/networking/preface.texi b/doc/networking/preface.texi
deleted file mode 100644
index cecb2e48bc..0000000000
--- a/doc/networking/preface.texi
+++ /dev/null
@@ -1,52 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@ifinfo
-@node Preface, Network Task Structure and Data Flow, Top, Top
-@end ifinfo
-@unnumbered Preface
-
-This document describes the RTEMS specific parts of the FreeBSD TCP/IP
-stack. Much of this documentation was written by Eric Norum
-(@email{eric@@skatter.usask.ca})
-of the Saskatchewan Accelerator Laboratory
-who also ported the FreeBSD TCP/IP stack to RTEMS.
-
-The following is a list of resources which should be useful in trying
-to understand Ethernet:
-
-@itemize @bullet
-
-@item @cite{Charles Spurgeon's Ethernet Web Site}
-
-"This site provides extensive information about Ethernet
-(IEEE 802.3) local area network (LAN) technology. Including
-the original 10 Megabit per second (Mbps) system, the 100 Mbps
-Fast Ethernet system (802.3u), and the Gigabit Ethernet system (802.3z)."
-The URL is:
-@ifset use-html
-(@uref{http://wwwhost.ots.utexas.edu/ethernet/index.html,http://wwwhost.ots.utexas.edu/ethernet/index.html})
-@end ifset
-@ifclear use-html
-(http://wwwhost.ots.utexas.edu/ethernet/index.html)
-@end ifclear
-
-@item @cite{TCP/IP Illustrated, Volume 1 : The Protocols} by
-by W. Richard Stevens (ISBN: 0201633469)
-
-This book provides detailed introduction to TCP/IP and includes diagnostic
-programs which are publicly available.
-
-@item @cite{TCP/IP Illustrated : The Implementation} by W. Richard
-Stevens and Gary Wright (ISBN: 020163354X)
-
-This book focuses on implementation issues regarding TCP/IP. The
-treat for RTEMS users is that the implementation covered is the BSD
-stack.
-
-@end itemize
diff --git a/doc/networking/recvbd.eps b/doc/networking/recvbd.eps
deleted file mode 100644
index 2719ed231a..0000000000
--- a/doc/networking/recvbd.eps
+++ /dev/null
@@ -1,181 +0,0 @@
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: recvbd.eps
-%%Creator: fig2dev Version 3.2 Patchlevel 1
-%%CreationDate: Mon Feb 8 14:02:16 1999
-%%For: raguet@genesis (Emmanuel Raguet)
-%%Orientation: Portrait
-%%BoundingBox: 0 0 252 173
-%%Pages: 0
-%%BeginSetup
-%%EndSetup
-%%Magnification: 1.0000
-%%EndComments
-/$F2psDict 200 dict def
-$F2psDict begin
-$F2psDict /mtrx matrix put
-/col-1 {0 setgray} bind def
-/col0 {0.000 0.000 0.000 srgb} bind def
-/col1 {0.000 0.000 1.000 srgb} bind def
-/col2 {0.000 1.000 0.000 srgb} bind def
-/col3 {0.000 1.000 1.000 srgb} bind def
-/col4 {1.000 0.000 0.000 srgb} bind def
-/col5 {1.000 0.000 1.000 srgb} bind def
-/col6 {1.000 1.000 0.000 srgb} bind def
-/col7 {1.000 1.000 1.000 srgb} bind def
-/col8 {0.000 0.000 0.560 srgb} bind def
-/col9 {0.000 0.000 0.690 srgb} bind def
-/col10 {0.000 0.000 0.820 srgb} bind def
-/col11 {0.530 0.810 1.000 srgb} bind def
-/col12 {0.000 0.560 0.000 srgb} bind def
-/col13 {0.000 0.690 0.000 srgb} bind def
-/col14 {0.000 0.820 0.000 srgb} bind def
-/col15 {0.000 0.560 0.560 srgb} bind def
-/col16 {0.000 0.690 0.690 srgb} bind def
-/col17 {0.000 0.820 0.820 srgb} bind def
-/col18 {0.560 0.000 0.000 srgb} bind def
-/col19 {0.690 0.000 0.000 srgb} bind def
-/col20 {0.820 0.000 0.000 srgb} bind def
-/col21 {0.560 0.000 0.560 srgb} bind def
-/col22 {0.690 0.000 0.690 srgb} bind def
-/col23 {0.820 0.000 0.820 srgb} bind def
-/col24 {0.500 0.190 0.000 srgb} bind def
-/col25 {0.630 0.250 0.000 srgb} bind def
-/col26 {0.750 0.380 0.000 srgb} bind def
-/col27 {1.000 0.500 0.500 srgb} bind def
-/col28 {1.000 0.630 0.630 srgb} bind def
-/col29 {1.000 0.750 0.750 srgb} bind def
-/col30 {1.000 0.880 0.880 srgb} bind def
-/col31 {1.000 0.840 0.000 srgb} bind def
-
-end
-save
--186.0 268.0 translate
-1 -1 scale
-
-/cp {closepath} bind def
-/ef {eofill} bind def
-/gr {grestore} bind def
-/gs {gsave} bind def
-/sa {save} bind def
-/rs {restore} bind def
-/l {lineto} bind def
-/m {moveto} bind def
-/rm {rmoveto} bind def
-/n {newpath} bind def
-/s {stroke} bind def
-/sh {show} bind def
-/slc {setlinecap} bind def
-/slj {setlinejoin} bind def
-/slw {setlinewidth} bind def
-/srgb {setrgbcolor} bind def
-/rot {rotate} bind def
-/sc {scale} bind def
-/sd {setdash} bind def
-/ff {findfont} bind def
-/sf {setfont} bind def
-/scf {scalefont} bind def
-/sw {stringwidth} bind def
-/tr {translate} bind def
-/tnt {dup dup currentrgbcolor
- 4 -2 roll dup 1 exch sub 3 -1 roll mul add
- 4 -2 roll dup 1 exch sub 3 -1 roll mul add
- 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
- bind def
-/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
- 4 -2 roll mul srgb} bind def
-/reencdict 12 dict def /ReEncode { reencdict begin
-/newcodesandnames exch def /newfontname exch def /basefontname exch def
-/basefontdict basefontname findfont def /newfont basefontdict maxlength dict def
-basefontdict { exch dup /FID ne { dup /Encoding eq
-{ exch dup length array copy newfont 3 1 roll put }
-{ exch newfont 3 1 roll put } ifelse } { pop pop } ifelse } forall
-newfont /FontName newfontname put newcodesandnames aload pop
-128 1 255 { newfont /Encoding get exch /.notdef put } for
-newcodesandnames length 2 idiv { newfont /Encoding get 3 1 roll put } repeat
-newfontname newfont definefont pop end } def
-/isovec [
-8#200 /grave 8#201 /acute 8#202 /circumflex 8#203 /tilde
-8#204 /macron 8#205 /breve 8#206 /dotaccent 8#207 /dieresis
-8#210 /ring 8#211 /cedilla 8#212 /hungarumlaut 8#213 /ogonek 8#214 /caron
-8#220 /dotlessi 8#230 /oe 8#231 /OE
-8#240 /space 8#241 /exclamdown 8#242 /cent 8#243 /sterling
-8#244 /currency 8#245 /yen 8#246 /brokenbar 8#247 /section 8#250 /dieresis
-8#251 /copyright 8#252 /ordfeminine 8#253 /guillemotleft 8#254 /logicalnot
-8#255 /endash 8#256 /registered 8#257 /macron 8#260 /degree 8#261 /plusminus
-8#262 /twosuperior 8#263 /threesuperior 8#264 /acute 8#265 /mu 8#266 /paragraph
-8#267 /periodcentered 8#270 /cedilla 8#271 /onesuperior 8#272 /ordmasculine
-8#273 /guillemotright 8#274 /onequarter 8#275 /onehalf
-8#276 /threequarters 8#277 /questiondown 8#300 /Agrave 8#301 /Aacute
-8#302 /Acircumflex 8#303 /Atilde 8#304 /Adieresis 8#305 /Aring
-8#306 /AE 8#307 /Ccedilla 8#310 /Egrave 8#311 /Eacute
-8#312 /Ecircumflex 8#313 /Edieresis 8#314 /Igrave 8#315 /Iacute
-8#316 /Icircumflex 8#317 /Idieresis 8#320 /Eth 8#321 /Ntilde 8#322 /Ograve
-8#323 /Oacute 8#324 /Ocircumflex 8#325 /Otilde 8#326 /Odieresis 8#327 /multiply
-8#330 /Oslash 8#331 /Ugrave 8#332 /Uacute 8#333 /Ucircumflex
-8#334 /Udieresis 8#335 /Yacute 8#336 /Thorn 8#337 /germandbls 8#340 /agrave
-8#341 /aacute 8#342 /acircumflex 8#343 /atilde 8#344 /adieresis 8#345 /aring
-8#346 /ae 8#347 /ccedilla 8#350 /egrave 8#351 /eacute
-8#352 /ecircumflex 8#353 /edieresis 8#354 /igrave 8#355 /iacute
-8#356 /icircumflex 8#357 /idieresis 8#360 /eth 8#361 /ntilde 8#362 /ograve
-8#363 /oacute 8#364 /ocircumflex 8#365 /otilde 8#366 /odieresis 8#367 /divide
-8#370 /oslash 8#371 /ugrave 8#372 /uacute 8#373 /ucircumflex
-8#374 /udieresis 8#375 /yacute 8#376 /thorn 8#377 /ydieresis] def
-/Times-Roman /Times-Roman-iso isovec ReEncode
-/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
-/$F2psEnd {$F2psEnteredState restore end} def
-%%EndProlog
-
-$F2psBegin
-10 setmiterlimit
-n -1000 5242 m -1000 -1000 l 7942 -1000 l 7942 5242 l cp clip
- 0.06299 0.06299 sc
-% Polyline
-7.500 slw
-n 2970 1530 m 6930 1530 l 6930 2205 l 2970 2205 l cp gs col0 s gr
-% Polyline
-n 2970 2205 m 6930 2205 l 6930 2880 l 2970 2880 l cp gs col0 s gr
-% Polyline
-n 2970 2880 m 6930 2880 l 6930 3555 l 2970 3555 l cp gs col0 s gr
-% Polyline
-n 2970 3555 m 6930 3555 l 6930 4230 l 2970 4230 l cp gs col0 s gr
-% Polyline
-n 3285 1530 m 3285 2205 l gs col0 s gr
-% Polyline
-n 4230 2205 m 4230 2880 l gs col0 s gr
-% Polyline
-n 5535 2205 m 5535 2880 l gs col0 s gr
-/Times-Roman-iso ff 270.00 scf sf
-3960 3375 m
-gs 1 -1 sc (Buffer address 1) col0 sh gr
-/Times-Roman-iso ff 270.00 scf sf
-3960 4005 m
-gs 1 -1 sc (Buffer address 2) col0 sh gr
-/Times-Roman-iso ff 210.00 scf sf
-3105 2610 m
-gs 1 -1 sc (Control bits) col0 sh gr
-/Times-Roman-iso ff 210.00 scf sf
-4860 2475 m
-gs 1 -1 sc (Byte-Count) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 210.00 scf sf
-4860 2730 m
-gs 1 -1 sc (Buffer 2) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 210.00 scf sf
-6210 2520 m
-gs 1 -1 sc (Byte-Count) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 210.00 scf sf
-6210 2775 m
-gs 1 -1 sc (Buffer 1) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 210.00 scf sf
-3150 1755 m
-gs 1 -1 sc (O) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 210.00 scf sf
-3150 2160 m
-gs 1 -1 sc (N) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 210.00 scf sf
-3150 1980 m
-gs 1 -1 sc (W) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 270.00 scf sf
-4590 1935 m
-gs 1 -1 sc (Status) col0 sh gr
-$F2psEnd
-rs
diff --git a/doc/networking/recvbd.jpg b/doc/networking/recvbd.jpg
deleted file mode 100644
index b15b21b325..0000000000
--- a/doc/networking/recvbd.jpg
+++ /dev/null
Binary files differ
diff --git a/doc/networking/recvbd.pdf b/doc/networking/recvbd.pdf
deleted file mode 100644
index 1825846f79..0000000000
--- a/doc/networking/recvbd.pdf
+++ /dev/null
Binary files differ
diff --git a/doc/networking/servers.t b/doc/networking/servers.t
deleted file mode 100644
index f9b4acdeb4..0000000000
--- a/doc/networking/servers.t
+++ /dev/null
@@ -1,118 +0,0 @@
-@c
-@c Text Written by Jake Janovetz
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-
-@chapter Network Servers
-
-@section RTEMS FTP Daemon
-
-The RTEMS FTPD is a complete file transfer protocol (FTP) daemon
-which can store, retrieve, and manipulate files on the local
-filesystem. In addition, the RTEMS FTPD provides ``hooks''
-which are actions performed on received data. Hooks are useful
-in situations where a destination file is not necessarily
-appropriate or in cases when a formal device driver has not yet
-been implemented.
-
-This server was implemented and documented by Jake Janovetz
-(janovetz@@tempest.ece.uiuc.edu).
-
-@subsection Configuration Parameters
-
-The configuration structure for FTPD is as follows:
-
-@example
-struct rtems_ftpd_configuration
-@{
- rtems_task_priority priority; /* FTPD task priority */
- unsigned long max_hook_filesize; /* Maximum buffersize */
- /* for hooks */
- int port; /* Well-known port */
- struct rtems_ftpd_hook *hooks; /* List of hooks */
-@};
-@end example
-
-The FTPD task priority is specified with @code{priority}. Because
-hooks are not saved as files, the received data is placed in an
-allocated buffer. @code{max_hook_filesize} specifies the maximum
-size of this buffer. Finally, @code{hooks} is a pointer to the
-configured hooks structure.
-
-@subsection Initializing FTPD (Starting the daemon)
-
-Starting FTPD is done with a call to @code{rtems_initialize_ftpd()}.
-The configuration structure must be provided in the application
-source code. Example hooks structure and configuration structure
-folllow.
-
-@example
-struct rtems_ftpd_hook ftp_hooks[] =
- @{
- @{"untar", Untar_FromMemory@},
- @{NULL, NULL@}
- @};
-
-struct rtems_ftpd_configuration rtems_ftpd_configuration =
- @{
- 40, /* FTPD task priority */
- 512*1024, /* Maximum hook 'file' size */
- 0, /* Use default port */
- ftp_hooks /* Local ftp hooks */
- @};
-@end example
-
-Specifying 0 for the well-known port causes FTPD to use the
-UNIX standard FTPD port (21).
-
-@subsection Using Hooks
-
-In the example above, one hook was installed. The hook causes
-FTPD to call the function @code{Untar_FromMemory} when the
-user sends data to the file @code{untar}. The prototype for
-the @code{untar} hook (and hooks, in general) is:
-
-@example
- int Untar_FromMemory(unsigned char *tar_buf, unsigned long size);
-@end example
-
-An example FTP transcript which exercises this hook is:
-
-@example
-220 RTEMS FTP server (Version 1.0-JWJ) ready.
-Name (dcomm0:janovetz): John Galt
-230 User logged in.
-Remote system type is RTEMS.
-ftp> bin
-200 Type set to I.
-ftp> dir
-200 PORT command successful.
-150 ASCII data connection for LIST.
-drwxrwx--x 0 0 268 dev
-drwxrwx--x 0 0 0 TFTP
-226 Transfer complete.
-ftp> put html.tar untar
-local: html.tar remote: untar
-200 PORT command successful.
-150 BINARY data connection.
-210 File transferred successfully.
-471040 bytes sent in 0.48 secs (9.6e+02 Kbytes/sec)
-ftp> dir
-200 PORT command successful.
-150 ASCII data connection for LIST.
-drwxrwx--x 0 0 268 dev
-drwxrwx--x 0 0 0 TFTP
-drwxrwx--x 0 0 3484 public_html
-226 Transfer complete.
-ftp> quit
-221 Goodbye.
-@end example
-
-
-
diff --git a/doc/networking/testing.t b/doc/networking/testing.t
deleted file mode 100644
index 059e749d2e..0000000000
--- a/doc/networking/testing.t
+++ /dev/null
@@ -1,220 +0,0 @@
-@c
-@c Written by Eric Norum
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-
-@chapter Testing the Driver
-
-@section Preliminary Setup
-
-The network used to test the driver should include at least:
-
-@itemize @bullet
-
-@item The hardware on which the driver is to run.
-It makes testing much easier if you can run a debugger to control
-the operation of the target machine.
-
-@item An Ethernet network analyzer or a workstation with an
-`Ethernet snoop' program such as @code{ethersnoop} or
-@code{tcpdump}.
-
-@item A workstation.
-
-@end itemize
-
-During early debug, you should consider putting the target, workstation,
-and snooper on a small network by themselves. This offers a few
-advantages:
-
-@itemize @bullet
-
-@item There is less traffic to look at on the snooper and for the target
-to process while bringing the driver up.
-
-@item Any serious errors will impact only your small network not a building
-or campus network. You want to avoid causing any unnecessary problems.
-
-@item Test traffic is easier to repeatably generate.
-
-@item Performance measurements are not impacted by other systems on
-the network.
-
-@end itemize
-
-@section Debug Output
-
-There are a number of sources of debug output that can be enabled
-to aid in tracing the behavior of the network stack. The following
-is a list of them:
-
-@itemize @bullet
-
-@item mbuf activity
-
-There are commented out calls to @code{printf} in the file
-@code{sys/mbuf.h} in the network stack code. Uncommenting
-these lines results in output when mbuf's are allocated
-and freed. This is very useful for findind memory leaks.
-
-@item TX and RX queuing
-
-There are commented out calls to @code{printf} in the file
-@code{net/if.h} in the network stack code. Uncommenting
-these lines results in output when packets are placed
-on or removed from one of the transmit or receive packet
-queues. These queues can be viewed as the boundary line
-between a device driver and the network stack. If the
-network stack is enqueuing packets to be transmitted that
-the device driver is not dequeuing, then that is indicative
-of a problem in the transmit side of the device driver.
-Conversely, if the device driver is enqueueing packets
-as it receives them (via a call to @code{ether_input}) and
-they are not being dequeued by the network stack,
-then there is a problem. This situation would likely indicate
-that the network server task is not running.
-
-@item TCP state transitions
-
-In the unlikely event that one would actually want to see
-TCP state transitions, the @code{TCPDEBUG} macro can be defined
-in the file @code{opt_tcpdebug.h}. This results in the routine
-@code{tcp_trace()} being called by the network stack and
-the state transitions logged into the @code{tcp_debug} data
-structure. If the variable @code{tcpconsdebug} in the file
-@code{netinet/tcp_debug.c} is set to 1, then the state transitions
-will also be printed to the console.
-
-@end itemize
-
-@section Driver basic operation
-
-The network demonstration program @code{netdemo} may be used for these tests.
-
-@itemize @bullet
-
-@item Edit @code{networkconfig.h} to reflect the values for your network.
-
-@item Start with @code{RTEMS_USE_BOOTP} not defined.
-
-@item Edit @code{networkconfig.h} to configure the driver
-with an
-explicit Ethernet and Internet address and with reception of
-broadcast packets disabled:
-
-Verify that the program continues to run once the driver has been attached.
-
-@item Issue a @samp{u} command to send UDP
-packets to the `discard' port.
-Verify that the packets appear on the network.
-
-@item Issue a @samp{s} command to print the network and driver statistics.
-
-@item On a workstation, add a static route to the target system.
-
-@item On that same workstation try to `ping' the target system.
-Verify that the ICMP echo request and reply packets appear on the net.
-
-@item Remove the static route to the target system.
-Modify @code{networkconfig.h} to attach the driver
-with reception of broadcast packets enabled.
-Try to `ping' the target system again.
-Verify that ARP request/reply and ICMP echo request/reply packets appear
-on the net.
-
-@item Issue a @samp{t} command to send TCP
-packets to the `discard' port.
-Verify that the packets appear on the network.
-
-@item Issue a @samp{s} command to print the network and driver statistics.
-
-@item Verify that you can telnet to ports 24742
-and 24743 on the target system from one or more
-workstations on your network.
-
-@end itemize
-
-@section BOOTP/DHCP operation
-
-Set up a BOOTP/DHCP server on the network.
-Set define @code{RTEMS USE_BOOT} in @code{networkconfig.h}.
-Run the @code{netdemo} test program.
-Verify that the target system configures itself from the BOOTP/DHCP server and
-that all the above tests succeed.
-
-@section Stress Tests
-
-Once the driver passes the tests described in the previous section it should
-be subjected to conditions which exercise it more
-thoroughly and which test its error handling routines.
-
-@subsection Giant packets
-
-@itemize @bullet
-@item Recompile the driver with @code{MAXIMUM_FRAME_SIZE} set to
-a smaller value, say 514.
-
-@item `Ping' the driver from another workstation and verify
-that frames larger than 514 bytes are correctly rejected.
-
-@item Recompile the driver with @code{MAXIMUM_FRAME_SIZE} restored to 1518.
-@end itemize
-
-@subsection Resource Exhaustion
-
-@itemize @bullet
-@item Edit @code{networkconfig.h}
-so that the driver is configured with just two receive and transmit descriptors.
-
-@item Compile and run the @code{netdemo} program.
-
-@item Verify that the program operates properly and that you can
-still telnet to both the ports.
-
-@item Display the driver statistics (Console `@code{s}' command or telnet
-`control-G' character) and verify that:
-
-@enumerate
-
-@item The number of transmit interrupts is non-zero.
-This indicates that all transmit descriptors have been in use at some time.
-
-@item The number of missed packets is non-zero.
-This indicates that all receive descriptors have been in use at some time.
-
-@end enumerate
-
-@end itemize
-
-@subsection Cable Faults
-
-@itemize @bullet
-@item Run the @code{netdemo} program.
-
-@item Issue a `@code{u}' console command to make the target machine transmit
-a bunch of UDP packets.
-
-@item While the packets are being transmitted, disconnect and reconnect the
-network cable.
-
-@item Display the network statistics and verify that the driver has
-detected the loss of carrier.
-
-@item Verify that you can still telnet to both ports on the target machine.
-
-@end itemize
-
-@subsection Throughput
-
-Run the @code{ttcp} network benchmark program.
-Transfer large amounts of data (100's of megabytes) to and from the target
-system.
-
-
-
diff --git a/doc/new_chapters/Makefile b/doc/new_chapters/Makefile
deleted file mode 100644
index 8636e20436..0000000000
--- a/doc/new_chapters/Makefile
+++ /dev/null
@@ -1,107 +0,0 @@
-#
-# COPYRIGHT (c) 1988-1999.
-# On-Line Applications Research Corporation (OAR).
-# All rights reserved.
-#
-# $Id$
-#
-
-PROJECT=new_chapters
-
-include ../Make.config
-
-all: html info ps pdf
-
-dirs:
- $(make-dirs)
-
-COMMON_FILES=../common/cpright.texi
-
-GENERATED_FILES= \
- adminiface.texi confspace.texi \
- dumpcontrol.texi eventlog.texi \
- stackchk.texi rtmonuse.texi cpuuse.texi error.texi monitor.texi
-
-FILES= $(PROJECT).texi \
- $(COMMON_FILES) $(GENERATED_FILES)
-
-INFOFILES=$(wildcard $(PROJECT) $(PROJECT)-*)
-
-info: dirs $(FILES) $(PROJECT)
-# cp $(PROJECT) $(PROJECT)-* $(INFO_INSTALL)
- cp $(PROJECT) $(INFO_INSTALL)
-
-$(PROJECT): $(FILES)
- $(MAKEINFO) $(PROJECT).texi
-
-dvi: dirs $(PROJECT).dvi
-ps: dirs $(PROJECT).ps
-pdf: dirs $(PROJECT).pdf
-
-$(PROJECT).pdf: $(FILES)
- $(TEXI2PDF) $(PROJECT).texi
- cp $(PROJECT).pdf $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).ps: $(PROJECT).dvi
- dvips -o $(PROJECT).ps $(PROJECT).dvi
- cp $(PROJECT).ps $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).dvi: $(FILES)
- $(TEXI2DVI) $(PROJECT).texi
- cp $(PROJECT).dvi $(WWW_INSTALL)/$(PROJECT)
-
-html: dirs $(FILES)
- -mkdir -p $(WWW_INSTALL)/$(PROJECT)
- -cd .. ; gmake headers
- $(TEXI2WWW) $(TEXI2WWW_ARGS) -dir $(WWW_INSTALL)/$(PROJECT) \
- $(PROJECT).texi
-
-clean:
- rm -f *.o $(PROG) *.txt core *.html $(PROJECT).pdf
- rm -f *.dvi *.ps *.log *.aux *.cp *.fn *.ky *.pg *.toc *.tp *.vr $(BASE)
- rm -f $(PROJECT) $(PROJECT)-* _* $(GENERATED_FILES)
-
-eventlog.texi: eventlog.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-dumpcontrol.texi: dumpcontrol.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-confspace.texi: confspace.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-adminiface.texi: adminiface.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-stackchk.texi: stackchk.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-rtmonuse.texi: rtmonuse.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-cpuuse.texi: cpuuse.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-error.texi: error.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-monitor.texi: monitor.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
diff --git a/doc/new_chapters/STATUS b/doc/new_chapters/STATUS
deleted file mode 100644
index bff8ecbb8f..0000000000
--- a/doc/new_chapters/STATUS
+++ /dev/null
@@ -1,9 +0,0 @@
-#
-# $Id$
-#
-
-Each of the chapters is individually generated with no attempt to link
-the chapters together into a long hypertext chain.
-
-Some are chapters for POSIX 1003.1h managers. Some are RTEMS support
-libraries that we have not figured out where to put in the documentation.
diff --git a/doc/new_chapters/TODO b/doc/new_chapters/TODO
deleted file mode 100644
index 9f5a884add..0000000000
--- a/doc/new_chapters/TODO
+++ /dev/null
@@ -1,4 +0,0 @@
-
-General - check that all nodes have "none" if they don't have a note.
-
-
diff --git a/doc/new_chapters/adminiface.t b/doc/new_chapters/adminiface.t
deleted file mode 100644
index aa6a21f96a..0000000000
--- a/doc/new_chapters/adminiface.t
+++ /dev/null
@@ -1,129 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Administration Interface Manager
-
-@section Introduction
-
-The administration interface manager provides a portable
-interface for some system administrative functions.
-The capabilities in this manager are defined in the POSIX
-1003.1h/D3 proposed standard titled @b{Services for Reliable,
-Available, and Serviceable Systems}.
-
-The directives provided by the administration interface manager are:
-
-@itemize @bullet
-@item @code{admin_shutdown} - Shutdown the system
-@end itemize
-
-@section Background
-
-@subsection admin_args Structure
-
-@example
-put structure here
-@end example
-
-@table @b
-@item admin_type
-This field ...
-
-@table @b
-@item ADMIN_AUTOBOOT
-The default, causing the system to reboot in its usual fashion. The
-@code{admin_data} field points to an implementation defined string
-that specifies the system image to reboot.
-
-@item ADMIN_HALT
-The system is simply halted; no reboot takes place.
-
-@item ADMIN_FAST
-The system does no send SIGTERM to active processes before halting.
-
-@item ADMIN_IMMEDIATE
-The system does not perform any of the normal shutdown procedures.
-
-@item ADMIN_ALTSYSTEM
-The system reboots using the @code{admin_data} string as a specification
-of the system to be booted.
-
-@item ADMIN_ALTCONFIG
-The system reboots using the @code{admin_data} string as a specification
-of the initial implicit configuration space.
-
-@item ADMIN_SYSDUMP
-Dump kernal memory before rebooting.
-
-@item ADMIN_INIT
-An option allowing the specification of an alternate initial program
-to be run when the system reboots.
-
-@end table
-
-@item admin_data
-This field ...
-
-@end table
-
-@section Operations
-
-@subsection Shutting Down the System
-
-@section Directives
-
-This section details the administration interface manager's directives.
-A subsection is dedicated to each of this manager's directives
-and describes the calling sequence, related constants, usage,
-and status codes.
-
-@page
-@subsection admin_shutdown - Shutdown the system
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <admin.h>
-
-int admin_shutdown(
- struct admin_args *args[],
- size_t nargs
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item EINVAL
-An invalid argument was passed to the function call.
-
-@item EPERM
-The caller does not have appropriate permission for shutting down the
-system.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{admin_shutdown} function restarts the system. The
-@code{args} argument specifies alternate or optional behavior
-for the @code{admin_shutdown} function. The @code{admin_type}
-member of each element of the @code{args} array specifies the
-optional behavior to be performed. There are some @code{admin_types}
-values that may provoke unspecified behavior. The @code{nargs}
-argument specifies the length of the @code{args} array.
-
-@subheading NOTES:
-
-The @code{_POSIX_ADMIN} feature flag is defined to indicate
-this service is available.
diff --git a/doc/new_chapters/base.t b/doc/new_chapters/base.t
deleted file mode 100644
index 977317d93b..0000000000
--- a/doc/new_chapters/base.t
+++ /dev/null
@@ -1,62 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Mutex Manager
-
-@section Introduction
-
-The mutex manager ...
-
-The directives provided by the mutex manager are:
-
-@itemize @bullet
-@item @code{sigaddset} -
-@item @code{sigdelset} -
-@item @code{sigfillset} -
-@item @code{sigismember} -
-@item @code{sigemptyset} -
-@item @code{sigaction} -
-@item @code{pthread_kill} -
-@item @code{pthread_sigmask} -
-@item @code{kill} -
-@item @code{sigwait} -
-@end itemize
-
-@section Background
-
-There is currently no text in this section.
-
-@section Operations
-
-There is currently no text in this section.
-
-@section Directives
-
-This section details the mutex manager's directives.
-A subsection is dedicated to each of this manager's directives
-and describes the calling sequence, related constants, usage,
-and status codes.
-
-@page
-@subsection sigaddset
-
-@subheading CALLING SEQUENCE:
-
-@example
-int sigaddset(
- sigset_t *set,
- int signo
-);
-@end example
-
-@subheading STATUS CODES:
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
diff --git a/doc/new_chapters/confspace.t b/doc/new_chapters/confspace.t
deleted file mode 100644
index 94106759b8..0000000000
--- a/doc/new_chapters/confspace.t
+++ /dev/null
@@ -1,1351 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Configuration Space Manager
-
-@section Introduction
-
-The configuration space manager provides a portable
-interface for manipulating configuration data.
-The capabilities in this manager were defined in the POSIX
-1003.1h/D3 proposed standard titled @b{Services for Reliable,
-Available, and Serviceable Systems}.
-
-The directives provided by the configuration space manager are:
-
-@itemize @bullet
-@item @code{cfg_mount} - Mount a Configuration Space
-@item @code{cfg_unmount} - Unmount a Configuration Space
-@item @code{cfg_mknod} - Create a Configuration Node
-@item @code{cfg_get} - Get Configuration Node Value
-@item @code{cfg_set} - Set Configuration Node Value
-@item @code{cfg_link} - Create a Configuration Link
-@item @code{cfg_unlink} - Remove a Configuration Link
-@item @code{cfg_open} - Open a Configuration Space
-@item @code{cfg_read} - Read a Configuration Space
-@item @code{cfg_children} - Get Node Entries
-@item @code{cfg_mark} - Set Configuration Space Option
-@item @code{cfg_readdir} - Reads a directory
-@item @code{cfg_umask} - Sets a file creation mask
-@item @code{cfg_chmod} - Changes file mode
-@item @code{cfg_chown} - Changes the owner and/or group of a file
-@end itemize
-
-@section Background
-
-@subsection Configuration Nodes
-
-@subsection Configuration Space
-
-@subsection Format of a Configuration Space File
-
-@section Operations
-
-@subsection Mount and Unmounting
-
-@subsection Creating a Configuration Node
-
-@subsection Removing a Configuration Node
-
-@subsection Manipulating a Configuration Node
-
-@subsection Traversing a Configuration Space
-
-@section Directives
-
-This section details the configuration space manager's directives.
-A subsection is dedicated to each of this manager's directives
-and describes the calling sequence, related constants, usage,
-and status codes.
-
-@page
-@subsection cfg_mount - Mount a Configuration Space
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <cfg.h>
-
-int cfg_mount(
- const char *file,
- const char *cfgpath,
- log_facility_t notification,
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-A successful call to @code{cfg_mount()} returns a value of zero
-and an unsuccessful call returns the @code{errno}.
-
-@table @b
-@item EPERM
-The caller does not have the appropriate privilege.
-
-@item EACCES
-Search permission is denied for a component of the path prefix.
-
-@item EEXIST
-The file specified by the @code{file} argument does not exist
-
-@item ENAMETOOLONG
-A component of a pathname exceeded @code{NAME_MAX} characters,
-or an entire path name exceed @code{PATH_MAX} characters while
-@code{_POSIX_NO_TRUNC} is in effect.
-
-@item ENOENT
-A component of @code{cfgpath} does not exist.
-
-@item ENOTDIR
-A component of the @code{file} path prefix is not a directory.
-
-@item EBUSY
-The configuration space defined by @code{file} is already mounted.
-
-@item EINVAL
-The notification argument specifies an invalid log facility.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{cfg_mount()} function maps a configuration space defined
-by the file identified by the the @code{file} argument. The
-distinguished node of the mapped configuration space is
-mounted in the active space at the point identified by the
-@code{cfgpath} configuration pathname.
-
-The @code{notification} argument specifies how changes to the
-mapped configuration space are communicated to the application.
-If the @code{notification} argument is NULL, no notification will be
-be performed for the mapped configuration space. If the Event
-Logging option is defined, the notification argument defines the
-facility to which changes in the mapped configuration space are
-logged. Otherwise, the @code{notification} argument specifies
-an implementation defined method of notifying the application
-of changes to the mapped configuration space.
-
-@subheading NOTES:
-
-The @code{_POSIX_CFG} feature flag is defined to indicate
-this service is available.
-
-@page
-@subsection cfg_unmount - Unmount a Configuration Space
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <cfg.h>
-
-int cfg_unmount(
- const char *cfgpath
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-A successful call to @code{cfg_umount()} returns a value of zero
-and an unsuccessful call returns the @code{errno}.
-
-@table @b
-@item EPERM
-The caller does not have the appropriate privileges.
-
-@item EACCES
-Search permission is denied for a component of the path prefix.
-
-@item ENOENT
-A component of @code{cfgpath} does not exist.
-
-@item ENAMETOOLONG
-A component of a pathname exceeded @code{NAME_MAX} characters,
-or an entire path name exceed @code{PATH_MAX} characters while
-@code{_POSIX_NO_TRUNC} is in effect.
-
-@item EINVAL
-The requested node is not the distinguished node of a mounted
-configuration space.
-
-@item EBUSY
-One or more processes has an open configuration traversal
-stream for the configuration space whose distinguished node is
-referenced by the cfgpath argument.
-
-@item ELOOP
-A node appears more than once in the path specified by the
-@code{cfgpath} argument
-
-@item ELOOP
-More than @code{SYMLOOP_MAX} symbolic links were encountered during
-resolution of the cfgpath argument
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{cfg_umount()} function unmaps the configuration space whose
-distinguished node is mapped in the active space at the location defined
-by @code{cfgpath} configuration pathname. All system resources
-allocated for this configuration space should be deallocated.
-
-@subheading NOTES:
-
-The @code{_POSIX_CFG} feature flag is defined to indicate
-this service is available.
-
-@page
-@subsection cfg_mknod - Create a Configuration Node
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <cfg.h>
-
-int cfg_mknod(
- const char *cfgpath,
- mode_t mode,
- cfg_type_t type
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-A successful call to @code{cfg_mknod()} returns a value of zero
-and an unsuccessful call returns the @code{errno}.
-
-@table @b
-@item ENAMETOOLONG
-A component of a pathname exceeded @code{NAME_MAX} characters,
-or an entire path name exceed @code{PATH_MAX} characters while
-@code{_POSIX_NO_TRUNC} is in effect.
-
-@item ENOENT
-A component of the path prefix does not exist.
-
-@item EACCES
-Search permission is denied for a component of the path prefix.
-
-
-@item EPERM
-The calling process does not have the appropriate privilege.
-
-@item EEXIST
-The named node exists.
-
-@item EINVAL
-The value of @code{mode} is invalid.
-
-@item EINVAL
-The value of @code{type} is invalid.
-
-@item ELOOP
-A node appears more than once in the path specified by the
-@code{cfg_path} argument
-
-@item ELOOP
-More than @code{SYMLOOP_MAX} symbolic links were encountered during
-resolution of the @code{cfgpath} argument.
-
-@item EROFS
-The named @code{node} resides on a read-only configuration space.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{cfg_mknod()} function creates a new node in the configuration
-space which contains the pathname prefix of @code{cfgpath}. The node
-name is defined by the pathname suffix of @code{cfgpath}. The node
-permissions are specified by the value of @code{mode}. The node type
-is specified by the value of @code{type}.
-
-@subheading NOTES:
-
-The @code{_POSIX_CFG} feature flag is defined to indicate
-this service is available.
-
-@page
-@subsection cfg_get - Get Configuration Node Value
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <cfg.h>
-
-int cfg_get(
- const char *cfgpath
- cfg_value_t *value
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-A successful call to @code{cfg_get()} returns a value of zero
-and an unsuccessful call returns the @code{errno}.
-
-@table @b
-@item ENAMETOOLONG
-A component of a pathname exceeded @code{NAME_MAX} characters,
-or an entire path name exceed @code{PATH_MAX} characters while
-@code{_POSIX_NO_TRUNC} is in effect.
-
-@item ENOENT
-A component of @code{cfgpath} does not exist.
-
-@item EACCES
-Search permission is denied for a component of the path prefix.
-
-@item EPERM
-The calling process does not have the appropriate privileges.
-
-@item ELOOP
-A node appears more than once in the path specified by the
-@code{cfgpath} argument
-
-@item ELOOP
-More than @code{SYMLOOP_MAX} symbolic links were encountered during
-resolution of the @code{cfgpath} argument.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{cfg_get()} function stores the value attribute of the
-configuration node identified by @code{cfgpath}, into the buffer
-described by the @code{value} pointer.
-
-@subheading NOTES:
-
-The @code{_POSIX_CFG} feature flag is defined to indicate
-this service is available.
-
-@page
-@subsection cfg_set - Set Configuration Node Value
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <cfg.h>
-
-int cfg_set(
- const char *cfgpath
- cfg_value_t *value
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-A successful call to @code{cfg_set()} returns a value of zero
-and an unsuccessful call returns the @code{errno}.
-
-@table @b
-@item ENAMETOOLONG
-A component of a pathname exceeded @code{NAME_MAX} characters,
-or an entire path name exceed @code{PATH_MAX} characters while
-@code{_POSIX_NO_TRUNC} is in effect.
-
-@item ENOENT
-A component of @code{cfgpath} does not exist
-
-@item EACCES
-Search permission is denied for a component of the path prefix.
-
-@item EPERM
-The calling process does not have the appropriate privilege.
-
-@item ELOOP
-A node appears more than once in the path specified by the
-@code{cfgpath} argument.
-
-@item ELOOP
-More than @code{SYMLOOP_MAX} symbolic links were encountered during
-resolution of the cfgpath argument.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{cfg_set()} function stores the value specified by the
-@code{value} argument in the configuration node defined by the
-@code{cfgpath} argument.
-
-@subheading NOTES:
-
-The @code{_POSIX_CFG} feature flag is defined to indicate
-this service is available.
-
-@page
-@subsection cfg_link - Create a Configuration Link
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <cfg.h>
-
-int cfg_link(
- const char *src
- const char *dest
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-A successful call to @code{cfg_link()} returns a value of zero
-and an unsuccessful call returns the @code{errno}.
-
-@table @b
-@item ENAMETOOLONG
-A component of a pathname exceeded @code{NAME_MAX} characters,
-or an entire path name exceed @code{PATH_MAX} characters while
-@code{_POSIX_NO_TRUNC} is in effect.
-
-@item ENOENT
-A component of either path prefix does not exist.
-
-@item EACCES
-A component of either path prefix denies search permission.
-
-@item EACCES
-The requested link requires writing in a node with a mode that
-denies write permission.
-
-@item ENOENT
-The node named by @code{src} does not exist.
-
-@item EEXIST
-The node named by @code{dest} does exist.
-
-@item EPERM
-The calling process does not have the appropriate privilege to
-modify the node indicated by the @code{src} argument.
-
-@item EXDEV
-The link named by @code{dest} and the node named by @code{src} are from different
-configuration spaces.
-
-@item ENOSPC
-The node in which the entry for the new link is being placed
-cannot be extended because there is no space left on the
-configuration space containing the node.
-
-@item EIO
-An I/O error occurred while reading from or writing to the
-configuration space to make the link entry.
-
-@item EROFS
-The requested link requires writing in a node on a read-only
-configuration space.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{src} and @code{dest} arguments point to pathnames which
-name existing nodes. The @code{cfg_link()} function atomically creates
-a link between specified nodes, and increment by one the link count
-of the node specified by the @code{src} argument.
-
-If the @code{cfg_link()} function fails, no link is created, and the
-link count of the node remains unchanged by this function call.
-
-
-@subheading NOTES:
-
-The @code{_POSIX_CFG} feature flag is defined to indicate
-this service is available.
-
-@page
-@subsection cfg_unlink - Remove a Configuration Link
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <cfg.h>
-
-int cfg_unlink(
- const char *cfgpath
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-A successful call to @code{cfg_unlink()} returns a value of zero
-and an unsuccessful call returns the @code{errno}.
-
-@table @b
-@item ENAMETOOLONG
-A component of a pathname exceeded @code{NAME_MAX} characters,
-or an entire path name exceed @code{PATH_MAX} characters.
-
-@item EACCES
-Search permission is denied on the node containing the link to
-be removed.
-
-@item EACCES
-Write permission is denied on the node containing the link to
-be removed.
-
-@item ENOENT
-A component of @code{cfgpath} does not exist.
-
-@item EPERM
-The calling process does not have the appropriate privilege to
-modify the node indicated by the path prefix of the @code{cfgpath}
-argument.
-
-@item EBUSY
-The node to be unlinked is the distinguished node of a mounted
-configuration space.
-
-@item EIO
-An I/O error occurred while deleting the link entry or deallocating
-the node.
-
-@item EROFS
-The named node resides in a read-only configuration space.
-
-@item ELOOP
-A node appears more than once in the path specified by the
-@code{cfgpath} argument.
-
-@item ELOOP
-More than @code{SYMLOOP_MAX} symbolic links were encountered during
-resolution of the cfgpath argument.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{cfg_unlink()} function removes the link between the node
-specified by the @code{cfgpath} path prefix and the parent node
-specified by @code{cfgpath}, and decrements the link count
-of the @code{cfgpath} node.
-
-When the link count of the node becomes zero, the space occupied
-by the node is freed and the node is no longer be accessible.
-
-@subheading NOTES:
-
-The @code{_POSIX_CFG} feature flag is defined to indicate
-this service is available.
-
-@page
-@subsection cfg_open - Open a Configuration Space
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <cfg.h>
-
-int cfg_open(
- const char *pathnames[],
- int options,
- int (*compar)(const CFGENT **f1, const CFGENT **f2),
- CFG **cfgstream
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-A successful call to @code{cfg_open()} returns a value of zero
-and an unsuccessful call returns the @code{errno}.
-
-@table @b
-@item EACCES
-Search permission is denied for any component of a pathname.
-
-@item ELOOP
-A loop exists in symbolic links encountered during resolution
-of a pathname.
-
-@item ENAMETOOLONG
-The length of a pathname exceeds @code{PATH_MAX}, or a pathname
-component is longer than @code{NAME_MAX} while @code{_POSIX_NO_TRUNC}
-
-@item ENOENT
-The pathname argument is an empty string or the named node
-does not exist.
-
-@item EINVAL
-Either both or neither of @code{CFG_LOGICAL} and @code{CFG_PHYSICAL} are
-specified by the @code{options} argument
-
-@item ENOMEM
-Not enough memory is available to create the necessary structures.
-
-@item ELOOP
-More than @code{SYMLOOP_MAX} symbolic links were encountered during
-resolution of the @code{pathnames} argument.
-
-@item ENAMETOOLONG
-As a result of encountering a symbolic link in resolution of the
-pathname specified by the @code{pathnames} argument, the length of
-the substituted pathname string exceeded @code{PATH_MAX}.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{cfg_open()} function opens a configuration traversal stream
-rooted in the configuration nodes name by the @code{pathnames} argument.
-It stores a pointer to a CFG object that represents that stream at
-the location identified the @code{cfgstream} pointer. The @code{pathnames}
-argument is an array of character pointers to NULL-terminated strings.
-The last member of this array is a NULL pointer.
-
-The value of @code{options} is the bitwise inclusive OR of values from the
-following lists. Applications supply exactly one of the first two values
-below in @code{options}.
-
-@table @b
-
-@item CFG_LOGICAL
-When symbolic links referencing existing nodes are
-encountered during the traversal, the @code{cfg_info}
-field of the returned CFGENT structure describes the
-target node pointed to by the link instead of the
-link itself, unless the target node does not exist.
-If the target node has children, the pre-order return,
-followed by the return of structures referencing all of
-its descendants, followed by a post-order return, is done.
-
-@item CFG_PHYSICAL
-When symbolic links are encountered during the traversal,
-the @code{cfg_info} field is used to describe the symbolic
-link.
-
-@end table
-
-
-Any combination of the remaining flags can be specified in the value of
-@code{options}
-
-@table @b
-
-@item CFG_COMFOLLOW
-When symbolic links referencing existing nodes are
-specified in the @code{pathnames} argument, the
-@code{cfg_info} field of the returned CFGENT structure
-describes the target node pointed to by the link
-instead of the link itself, unless the target node does
-not exist. If the target node has children, the
-pre-order return, followed by the return of structures
-referencing all its descendants, followed by a post-order
-return, is done.
-
-@item CFG_XDEV
-The configuration space functions do not return a
-CFGENT structure for any node in a different configuration
-space than the configuration space of the nodes identified
-by the CFGENT structures for the @code{pathnames} argument.
-
-@end table
-
-The @code{cfg_open()} argument @code{compar} is either a NULL or point
-to a function that is called with two pointers to pointers to CFGENT
-structures that returns less than, equal to , or greater than zero if
-the node referenced by the first argument is considered to be respectively
-less than, equal to, or greater than the node referenced by the second.
-The CFGENT structure fields provided to the comparison routine is as
-described with the exception that the contents of the @code{cfg_path} and
-@code{cfg_pathlen} fields are unspecified.
-
-This comparison routine is used to determine the order in which nodes in
-directories encountered during the traversal are returned, and the order
-of traversal when more than one node is specified in the @code{pathnames}
-argument to @code{cfg_open()}. If a comparison routine is specified, the
-order of traversal is from the least to the greatest. If the @code{compar}
-argument is NULL, the order of traversal shall is listed in the
-@code{pathnames} argument.
-
-@subheading NOTES:
-
-The @code{_POSIX_CFG} feature flag is defined to indicate
-this service is available.
-
-@page
-@subsection cfg_read - Read a Configuration Space
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <cfg.h>
-
-int cfg_read(
- CFG *cfgp,
- CFGENT **node
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-A successful call to @code{cfg_read()} returns a value of zero
-and an unsuccessful call returns the @code{errno}.
-
-@table @b
-@item EACCES
-Search permission is denied for any component of a pathname.
-
-@item EBADF
-The @code{cfgp} argument does not refer to an open configuration
-space.
-
-@item ELOOP
-A loop exists in symbolic links encountered during resolution
-of a pathname.
-
-@item ENOENT
-A named @code{node} does not exist.
-
-@item ENOMEM
-Not enough memory is available to create the necessary structures.
-
-@item ELOOP
-More than @code{SYMLOOP_MAX} symbolic links were encountered during
-resolution of the cfgpath argument.
-
-@item ENAMETOOLONG
-As a result of encountering a symbolic link in resolution of the
-pathname specified by the pathnames argument, the length of the
-substituted pathname string exceeded @code{PATH_MATH}.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{cfg_read()} function returns a pointer to a CFGENT structure
-representing a node in the configuration space to which @code{cfgp}
-refers. The returned pointer is stored at the location indicated
-by the @code{node} argument.
-
-The child nodes of each node in the configuration tree is returned
-by @code{cfg_read()}. If a comparison routine was specified to the
-@code{cfg_open()} function, the order of return of the child nodes is
-as specified by the @code{compar} routine, from least to greatest.
-Otherwise, the order of return is unspecified.
-
-Structures referencing nodes with children is returned by the
-function @code{cfg_read()} at least twice [unless the application
-specifies otherwise with @code{cfg_mark()}]-once immediately before
-the structures representing their descendants, are returned
-(pre-order), and once immediately after structures representing all
-of their descendants, if any, are returned (post-order). The
-CFGENT structure returned in post-order (with the exception of the
-@code{cfg_info} field) is identical to that returned in pre-order.
-Structures referencing nodes of other types is returned at least
-once.
-
-The fields of the CFGENT structure contains the following
-information:
-
-@table @b
-
-@item cfg_parent
-A pointer to the structure returned by the
-@code{cfg_read()} function for the node that contains
-the entry for the current node. A @code{cfg_parent}
-structure is provided for the node(s) specified by
-the @code{pathnames} argument to the @code{cfg_open()}
-function, but the contents of other than its
-@code{cfg_number}, @code{cfg_pointer}, @code{cfg_parent},
-and @code{cfg_parent}, and @code{cfg_level} fields are
-unspecified. Its @code{cfg_link} field is unspecified.
-
-@item cfg_link
-Upon return from the @code{cfg_children()} function, the
-@code{cfg_link} field points to the next CFGENT structure
-in a NULL-terminated linked list of CFGENT structures.
-Otherwise, the content of the @code{cfg_link} field is
-unspecified.
-
-@item cfg_cycle
-If the structure being returned by @code{cfg_read()}
-represents a node that appears in the @code{cfg_parent}
-linked list tree, the @code{cfg_cycle} field shall point
-to the structure representing that entry from the
-@code{cfg_parent} linked list. Otherwise the content of
-the @code{cfg_cycle} field is unspecified.
-
-@item cfg_number
-The @code{cfg_number} field is provided for use by the
-application program. It is initialized to zero for
-each new node returned by the @code{cfg_read()} function,
-but is not further modified by the configuration space
-routines.
-
-@item cfg_pointer
-The @code{cfg_pointer} field is provided for use by the
-application program. It is initialized to NULL for
-each new node returned by the @code{cfg_read()} function,
-but is not further modified by the configuration
-space routines.
-
-@item cfg_path
-A pathname for the node including and relative to the
-argument supplied to the @code{cfg_open()} routine for this
-configuration space. This pathname may be longer than
-@code{PATH_MAX} bytes. This pathname is NULL-terminated.
-
-@item cfg_name
-The nodename of the node.
-
-@item cfg_pathlen
-The length of the string pointed at by the @code{cfg_path}
-field when returned by @code{cfg_read()}.
-
-@item cfg_namelen
-The length of the string pointed at by the @code{cfg_name}
-field.
-
-@item cfg_level
-The depth of the current entry in the configuration space.
-The @code{cfg_level} field of the @code{cfg_parent}
-structure for each of the node(s) specified in the
-@code{pathnames} argument to the @code{cfg_open()} function
-is set to 0, and this number is incremented for each
-node level descendant.
-
-@item cfg_info
-This field contains one of the values listed below. If
-an object can have more than one info value, the first
-appropriate value listed below is returned.
-
-@table @b
-
-@item CFG_D
-The structure represents a node with children in
-pre-order.
-
-@item CFG_DC
-The structure represents a node that is a parent
-of the node most recently returned by @code{cfg_read()}.
-The @code{cfg_cycle} field references the structure
-previously returned by @code{cfg_read} that is the
-same as the returned structure.
-
-@item CFG_DEFAULT
-The structure represents a node that is not
-represented by one of the other node types
-
-@item CFG_DNR
-The structure represents a node, not of type symlink,
-that is unreadable. The variable @code{cfg_errno}
-is set to the appropriate value.
-
-@item CFG_DP
-The structure represents a node with children in
-post-order. This value occurs only if CFG_D
-has previously been returned for this entry.
-
-@item CFG_ERR
-The structure represents a node for which an error has
-occurred. The variable @code{cfg_errno} is set to the
-appropriate value.
-
-@item CFG_F
-The structure represents a node without children.
-
-@item CFG_SL
-The structure represents a node of type symbolic link.
-
-@item CFG_SLNONET
-The structure represents a node of type symbolic link
-with a target node for which node characteristic
-information cannot be obtained.
-
-@end table
-
-@end table
-
-Structures returned by @code{cfg_read()} with a @code{cfg_info} field equal
-to CFG_D is accessible until a subsequent call, on the same
-configuration traversal stream, to @code{cfg_close()}, or to @code{cfg_read()}
-after they have been returned by the @code{cfg_read} function in
-post-order. Structures returned by @code{cfg_read()} with an
-@code{cfg_info} field not equal to CFG_D is accessible until a subsequent
-call, on the same configuration traversal stream, to @code{cfg_close()}
-or @code{cfg_read()}.
-
-The content of the @code{cfg_path} field is specified only for the
-structure most recently returned by @code{cfg_read()}.
-
-The specified fields in structures in the list representing nodes for
-which structures have previously been returned by @code{cfg_children()},
-is identical to those returned by @code{cfg_children()}, except that
-the contents of the @code{cfg_path} and @code{cfg_pathlen} fields are
-unspecified.
-
-@subheading NOTES:
-
-The @code{_POSIX_CFG} feature flag is defined to indicate
-this service is available.
-
-@page
-@subsection cfg_children - Get Node Entries
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <cfg.h>
-
-int cfg_children(
- CFG *cfgp,
- int options,
- CFGENT **children
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-A successful call to @code{cfg_children()} returns a value of zero
-and an unsuccessful call returns the @code{errno}.
-
-@table @b
-@item EACCES
-Search permission is denied for any component of a pathname
-
-@item EBADF
-The @code{cfgp} argument does not refer to an open configuration space.
-
-@item ELOOP
-A loop exists in symbolic links encountered during resolution of
-a pathname.
-
-@item ENAMETOOLONG
-The length of a pathname exceeds @code{PATH_MAX}, or a pathname
-component is longer than @code{NAME_MAX} while @code{_POSIX_NO_TRUNC} is
-in effect.
-
-@item EINVAL
-The specified value of the @code{options} argument is invalid.
-
-@item ENOENT
-The named node does not exist.
-
-@item ENOMEM
-Not enough memory is available to create the necessary structures.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The first @code{cfg_children()} call after a @code{cfg_read()} returns
-information about the first node without children under the node
-returned by @code{cfg_read()}. Subsequent calls to @code{cfg_children()}
-without the intervening @code{cfg_read()} shall return information
-about the remaining nodes without children under that same node.
-
-If @code{cfg_read()} has not yet been called for the configuration
-traversal stream represented by @code{cfgp}, @code{cfg_children()}
-returns a pointer to the first entry in a list of the nodes
-represented by the @code{pathnames} argument to @code{cfg_open()}.
-
-In either case, the list is NULL-terminated, ordered by the
-user-specified comparison function, if any, and linked through the
-@code{cfg_link} field.
-
-@subheading NOTES:
-
-The @code{_POSIX_CFG} feature flag is defined to indicate
-this service is available.
-
-@page
-@subsection cfg_mark - Set Configuration Space Options
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <cfg.h>
-
-int cfg_mark(
- CFG *cfgp,
- CFGENT *f,
- int options
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-A successful call to @code{cfg_mark()} returns a value of zero
-and an unsuccessful call returns the @code{errno}.
-
-@table @b
-@item EINVAL
-The specified combination of the @code{cfgp} and @code{f} arguments is not
-supported by the implementation.
-
-@item EINVAL
-The specified value of the @code{options} argument is invalid.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{cfg_mark()} function modifies the subsequent behavior of
-the @code{cfg} functions with regard to the node referenced by the structure
-pointed to by the argument @code{f} or the configuration space referenced
-by the structure pointed to by the argument @code{cfgp}.
-
-Exactly one of the @code{f} argument and the @code{cfgp} argument is NULL.
-
-The value of the @code{options} argument is exactly one of the flags
-specified in the following list:
-
-@table @b
-
-@item CFG_AGAIN
-If the @code{cfgp} argument is non-NULL, or the @code{f}
-argument is NULL, or the structure referenced by @code{f}
-is not the one most recently returned by @code{cfg_read()},
-@code{cfg_mark()} returns an error. Otherwise, the next
-call to the @code{cfg_read()} function returns the structure
-referenced by @code{f} with the @code{cfg_info} field
-reinitialized. Subsequent behavior of the @code{cfg}
-functions are based on the reinitialized value of
-@code{cfg_info}.
-
-@item CFG_SKIP
-If the @code{cfgp} argument is non-NULL, or the @code{f}
-argument is NULL, or the structure referenced by @code{f}
-is not one of those specified as accessible, or the structure
-referenced by @code{f} is not for a node of type pre-order
-node, @code{cfg_mark()} returns an error. Otherwise, no
-more structures for the node referenced by @code{f} or its
-descendants are returned by the @code{cfg_read()} function.
-
-@item CFG_FOLLOW
-If the @code{cfgp} argument is non-NULL, or the @code{f}
-argument is NULL, or the structure referenced by @code{f}
-is not one of those specified as accessible, or the structure
-referenced by @code{f} is not for a node of type symbolic link,
-@code{cfg_mark()} returns an error. Otherwise, the next
-call to the @code{cfg_read()} function returns the structure
-referenced by @code{f} with the @code{cfg_info} field reset
-to reflect the target of the symbolic link instead of the
-symbolic link itself. If the target of the link is node with
-children, the pre-order return, followed by the return of
-structures referencing all of its descendants, followed by a
-post-order return, shall be done.
-
-@end table
-
-If the target of the symbolic link does not exist, the fields
-of the structure by @code{cfg_read()} shall be unmodified, except
-that the @code{cfg_info} field shall be reset to @code{CFG_SLNONE}.
-
-@subheading NOTES:
-
-The @code{_POSIX_CFG} feature flag is defined to indicate
-this service is available.
-
-@page
-@subsection cfg_close - Close a Configuration Space
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <cfg.h>
-
-int cfg_close(
- CFG *cfgp
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-A successful call to @code{cfg_close()} returns a value of zero
-and an unsuccessful call returns the @code{errno}.
-
-@table @b
-@item EBADF
-The @code{cfgp} argument does not refer to an open configuration space
-traversal stream.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{cfg_close()} function closes a configuration space transversal
-stream represented by the CFG structure pointed at by the @code{cfgp}
-argument. All system resources allocated for this configuration space
-traversal stream should be deallocated. Upon return, the value of
-@code{cfgp} need not point to an accessible object of type CFG.
-
-@subheading NOTES:
-
-The @code{_POSIX_CFG} feature flag is defined to indicate
-this service is available.
-
-@page
-@subsection cfg_readdir - Reads a directory
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <sys/types.h>
-#include <dirent.h>
-
-struct dirent *cfg_readdir(
- DIR *dirp
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item EBADF
-Invalid file descriptor
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{cfg_readdir()} function returns a pointer to a structure @code{dirent}
-representing the next directory entry from the directory stream pointed to
-by @code{dirp}. On end-of-file, NULL is returned.
-
-The @code{cfg_readdir()} function may (or may not) return entries for . or .. Your
-program should tolerate reading dot and dot-dot but not require them.
-
-The data pointed to be @code{cfg_readdir()} may be overwritten by another call to
-@code{readdir()} for the same directory stream. It will not be overwritten by
-a call for another directory.
-
-@subheading NOTES:
-
-If @code{ptr} is not a pointer returned by @code{malloc()}, @code{calloc()}, or
-@code{realloc()} or has been deallocated with @code{free()} or @code{realloc()},
-the results are not portable and are probably disastrous.
-
-This function is not defined in the POSIX specification. It is an extension
-provided by this implementation.
-
-@page
-@subsection cfg_umask - Sets a file creation mask.
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <sys/types.h>
-#include <sys/stat.h>
-
-mode_t cfg_umask(
- mode_t cmask
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@subheading DESCRIPTION:
-
-The @code{cfg_umask()} function sets the process node creation mask to @code{cmask}.
-The file creation mask is used during @code{open()}, @code{creat()}, @code{mkdir()},
-@code{mkfifo()} calls to turn off permission bits in the @code{mode} argument.
-Bit positions that are set in @code{cmask} are cleared in the mode of the
-created file.
-
-The file creation mask is inherited across @code{fork()} and @code{exec()} calls.
-This makes it possible to alter the default permission bits of created files.
-
-@subheading NOTES: None
-
-The @code{cmask} argument should have only permission bits set. All other
-bits should be zero.
-
-@page
-@subsection cfg_chmod - Changes file mode.
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <sys/types.h>
-#include <sys/stat.h>
-
-int cfg_chmod(
- const char *path,
- mode_t mode
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-A successful call to @code{cfg_chmod()} returns a value of zero
-and an unsuccessful call returns the @code{errno}.
-
-@table @b
-@item EACCES
-Search permission is denied for a directory in a file's path prefix
-@item ENAMETOOLONG
-Length of a filename string exceeds PATH_MAX and _POSIX_NO_TRUNC is in
-effect.
-@item ENOENT
-A file or directory does not exist.
-@item ENOTDIR
-A component of the specified pathname was not a directory when a directory
-was expected.
-@item EPERM
-Operation is not permitted. Process does not have the appropriate priviledges
-or permissions to perform the requested operations.
-@item EROFS
-Read-only file system.
-
-@end table
-
-@subheading DESCRIPTION:
-
-Set the file permission bits, the set user ID bit, and the set group ID bit
-for the file named by @code{path} to @code{mode}. If the effective user ID
-does not match the owner of the node and the calling process does not have
-the appropriate privileges, @code{cfg_chmod()} returns -1 and sets @code{errno} to
-@code{EPERM}.
-
-@subheading NOTES:
-
-@page
-@subsection cfg_chown - Changes the owner and/or group of a file.
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <sys/types.h>
-#include <unistd.h>
-
-int cfg_chown(
- const char *path,
- uid_t owner,
- gid_t group
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-A successful call to @code{cfg_chown()} returns a value of zero
-and an unsuccessful call returns the @code{errno}.
-
-@table @b
-@item EACCES
-Search permission is denied for a directory in a file's path prefix
-@item EINVAL
-Invalid argument
-@item ENAMETOOLONG
-Length of a filename string exceeds PATH_MAX and _POSIX_NO_TRUNC is in
-effect.
-@item ENOENT
-A file or directory does not exist.
-@item ENOTDIR
-A component of the specified pathname was not a directory when a directory
-was expected.
-@item EPERM
-Operation is not permitted. Process does not have the appropriate priviledges
-or permissions to perform the requested operations.
-@item EROFS
-Read-only file system.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The user ID and group ID of the file named by @code{path} are set to
-@code{owner} and @code{path}, respectively.
-
-For regular files, the set group ID (S_ISGID) and set user ID (S_ISUID)
-bits are cleared.
-
-Some systems consider it a security violation to allow the owner of a file to
-be changed, If users are billed for disk space usage, loaning a file to
-another user could result in incorrect billing. The @code{cfg_chown()} function
-may be restricted to privileged users for some or all files. The group ID can
-still be changed to one of the supplementary group IDs.
-
-@subheading NOTES:
-
-This function may be restricted for some file. The @code{pathconf} function
-can be used to test the _PC_CHOWN_RESTRICTED flag.
-
-
diff --git a/doc/new_chapters/cpuuse.t b/doc/new_chapters/cpuuse.t
deleted file mode 100644
index 78cd23a8df..0000000000
--- a/doc/new_chapters/cpuuse.t
+++ /dev/null
@@ -1,142 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter CPU Usage Statistics
-
-@section Introduction
-
-The CPU usage statistics manager is an RTEMS support
-component that provides a convenient way to manipulate
-the CPU usage information associated with each task
-The routines provided by the CPU usage statistics manager are:
-
-@itemize @bullet
-@item @code{CPU_usage_Dump} - Report CPU Usage Statistics
-@item @code{CPU_usage_Reset} - Reset CPU Usage Statistics
-@end itemize
-
-@section Background
-
-@section Operations
-
-@section Report CPU Usage Statistics
-
-@subsection Reporting Period Statistics
-
-The application may dynamically report the CPU usage for every
-task in the system by calling the @code{CPU_usage_Dump} routine.
-This routine prints a table with the following information per task:
-
-@itemize @bullet
-@item task id
-@item task name
-@item number of clock ticks executed
-@item percentage of time consumed by this task
-@end itemize
-
-The following is an example of the report generated:
-
-@example
-@group
-CPU Usage by thread
- ID NAME TICKS PERCENT
-0x04010001 IDLE 0 0.000
-0x08010002 TA1 1203 0.748
-0x08010003 TA2 203 0.126
-0x08010004 TA3 202 0.126
-
-Ticks since last reset = 1600
-
-Total Units = 1608
-@end group
-@end example
-
-Notice that the "Total Units" is greater than the ticks per reset.
-This is an artifact of the way in which RTEMS keeps track of CPU
-usage. When a task is context switched into the CPU, the number
-of clock ticks it has executed is incremented. While the task
-is executing, this number is incremented on each clock tick.
-Otherwise, if a task begins and completes execution between
-successive clock ticks, there would be no way to tell that it
-executed at all.
-
-Another thing to keep in mind when looking at idle time, is that
-many systems -- especially during debug -- have a task providing
-some type of debug interface. It is usually fine to think of the
-total idle time as being the sum of the IDLE task and a debug
-task that will not be included in a production build of an application.
-
-@section Reset CPU Usage Statistics
-
-Invoking the @code{CPU_usage_Reset} routine resets the CPU usage
-statistics for all tasks in the system.
-
-@section Directives
-
-This section details the CPU usage statistics manager's directives.
-A subsection is dedicated to each of this manager's directives
-and describes the calling sequence, related constants, usage,
-and status codes.
-
-@page
-@subsection CPU_usage_Dump - Report CPU Usage Statistics
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-void CPU_usage_Dump( void );
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-An Ada interface is not currently available.
-@end example
-@end ifset
-
-@subheading STATUS CODES: NONE
-
-@subheading DESCRIPTION:
-
-This routine prints out a table detailing the CPU usage statistics for
-all tasks in the system.
-
-@subheading NOTES:
-
-NONE
-
-@page
-@subsection CPU_usage_Reset - Reset CPU Usage Statistics
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-void CPU_usage_Reset( void );
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-An Ada interface is not currently available.
-@end example
-@end ifset
-
-@subheading STATUS CODES: NONE
-
-@subheading DESCRIPTION:
-
-This routine re-initializes the CPU usage statistics for all tasks
-in the system to their initial state. The initial state is that
-a task has not executed and thus has consumed no CPU time.
-default state which is when zero period executions have occurred.
-
-@subheading NOTES:
-
-NONE
diff --git a/doc/new_chapters/dumpcontrol.t b/doc/new_chapters/dumpcontrol.t
deleted file mode 100644
index 9529d75f12..0000000000
--- a/doc/new_chapters/dumpcontrol.t
+++ /dev/null
@@ -1,98 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Process Dump Control Manager
-
-@section Introduction
-
-The process dump control manager provides a portable
-interface for changing the path to which a process dump
-is written. The capabilities in this manager were defined in
-the POSIX 1003.1h/D3 proposed standard titled @b{Services for Reliable,
-Available, and Serviceable Systems}.
-
-The directives provided by the process dump control manager are:
-
-@itemize @bullet
-@item @code{dump_setpath} - Dump File Control
-@end itemize
-
-@section Background
-
-There is currently no text in this section.
-
-@section Operations
-
-There is currently no text in this section.
-
-@section Directives
-
-This section details the process dump control manager's directives.
-A subsection is dedicated to each of this manager's directives
-and describes the calling sequence, related constants, usage,
-and status codes.
-
-@page
-@subsection dump_setpath - Dump File Control
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <dump.h>
-
-int dump_setpath(
- const char *path
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item EACESS
-Search permission is denied for a component of the path prefix,
-or write permission is denied on the directory containing the
-file.
-
-@item ENAMETOOLONG
-The length of the argument exceeds @code{PATH_MAX} or a pathname
-component is longer than @code{NAME_MAX} while @code{_POSIX_NO_TRUNC}
-is in effect.
-
-@item ENOENT
-The path argument points to an empty string.
-
-@item ENOTDIR
-A component of the path prefix is not a directory.
-
-@item EROFS
-The directory entry specified resides on a read-only file system.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{dump_setpath()} function defines the pathname where process
-dumps are written. The pathname pointed to by @code{path} defines
-where a process dump file is written if the calling process
-terminates with a dump file. The @code{path} argument does not
-name a directory.
-
-If the @code{path} argument is NULL, the system does not write a
-process dump file if the calling process terminates with a dump
-file. If the @code{dump_setpath} function fails, the pathname for
-writing process dumps does not change.
-
-@subheading NOTES:
-
-The @code{_POSIX_DUMP} feature flag is defined to indicate
-this service is available.
diff --git a/doc/new_chapters/error.t b/doc/new_chapters/error.t
deleted file mode 100644
index 21c82109e3..0000000000
--- a/doc/new_chapters/error.t
+++ /dev/null
@@ -1,164 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Error Reporting Support
-
-@section Introduction
-
-These error reporting facilities are an RTEMS support
-component that provide convenient facilities for handling
-error conditions in an RTEMS application.
-of each task using a period. The services provided by the error
-reporting support component are:
-
-@itemize @bullet
-@item @code{rtems_error} - Report an Error
-@item @code{rtems_panic} - Report an Error and Panic
-@item @code{rtems_status_text} - ASCII Version of RTEMS Status
-@end itemize
-
-@section Background
-
-@subsection Error Handling in an Embedded System
-
-Error handling in an embedded system is a difficult problem. If the error
-is severe, then the only recourse is to shut the system down in a safe
-manner. Other errors can be detected and compensated for. The
-error reporting routines in this support component -- @code{rtems_error}
-and @code{rtems_panic} assume that if the error is severe enough,
-then the system should be shutdown. If a simple shutdown with
-some basic diagnostic information is not sufficient, then
-these routines should not be used in that particular system. In this case,
-use the @code{rtems_status_text} routine to construct an application
-specific error reporting routine.
-
-@section Operations
-
-@subsection Reporting an Error
-
-The @code{rtems_error} and @code{rtems_panic} routines
-can be used to print some diagnostic information and
-shut the system down. The @code{rtems_error} routine
-is invoked with a user specified error level indicator.
-This error indicator is used to determine if the system
-should be shutdown after reporting this error.
-
-@section Routines
-
-This section details the error reporting support compenent's routine.
-A subsection is dedicated to each of this manager's routines
-and describes the calling sequence, related constants, usage,
-and status codes.
-
-@page
-@subsection rtems_status_text - ASCII Version of RTEMS Status
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-const char *rtems_status_text(
- rtems_status_code status
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-An Ada interface is not currently available.
-@end example
-@end ifset
-
-@subheading STATUS CODES:
-
-Returns a pointer to a constant string that describes the given
-RTEMS status code.
-
-@subheading DESCRIPTION:
-
-This routine returns a pointer to a string that describes
-the RTEMS status code specified by @code{status}.
-
-@subheading NOTES:
-
-NONE
-
-@page
-@subsection rtems_error - Report an Error
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int rtems_error(
- int error_code,
- const char *printf_format,
- ...
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-An Ada interface is not currently available.
-@end example
-@end ifset
-
-@subheading STATUS CODES:
-
-Returns the number of characters written.
-
-@subheading DESCRIPTION:
-
-This routine prints the requested information as specified by the
-@code{printf_format} parameter and the zero or more optional arguments
-following that parameter. The @code{error_code} parameter is an error
-number with either @code{RTEMS_ERROR_PANIC} or @code{RTEMS_ERROR_ABORT}
-bitwise or'ed with it. If the @code{RTEMS_ERROR_PANIC} bit is set, then
-then the system is system is shutdown via a call to @code{_exit}.
-If the @code{RTEMS_ERROR_ABORT} bit is set, then
-then the system is system is shutdown via a call to @code{abort}.
-
-@subheading NOTES:
-
-NONE
-
-@page
-@subsection rtems_panic - Report an Error and Panic
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int rtems_panic(
- const char *printf_format,
- ...
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-An Ada interface is not currently available.
-@end example
-@end ifset
-
-@subheading STATUS CODES:
-
-Returns the number of characters written.
-
-@subheading DESCRIPTION:
-
-This routine is a wrapper for the @code{rtems_error} routine with
-an implied error level of @code{RTEMS_ERROR_PANIC}. See
-@code{rtems_error} for more information.
-
-@subheading NOTES:
-
-NONE
-
diff --git a/doc/new_chapters/eventlog.t b/doc/new_chapters/eventlog.t
deleted file mode 100644
index 60f4199e2d..0000000000
--- a/doc/new_chapters/eventlog.t
+++ /dev/null
@@ -1,1265 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Event Logging Manager
-
-@section Introduction
-
-The event logging manager provides a portable method for logging
-system and application events and subsequent processing of those
-events. The capabilities in this manager were defined in the POSIX
-1003.1h/D3 proposed standard titled @b{Services for Reliable,
-Available, and Serviceable Systems}.
-
-The directives provided by the event logging manager are:
-
-@itemize @bullet
-@item @code{log_create} - Create a log file
-@item @code{log_sys_create} - Create a system log file
-@item @code{log_write} - Write to the system Log
-@item @code{log_write_any} - Write to any log file
-@item @code{log_write_entry} - Write entry to any log file
-@item @code{log_open} - Open a log file
-@item @code{log_read} - Read from a log file
-@item @code{log_notify} - Notify Process of writes to the system log
-@item @code{log_close} - Close log descriptor
-@item @code{log_seek} - Reposition log file offset
-@item @code{log_severity_before} - Compare event record severities
-@item @code{log_facilityemptyset} - Manipulate log facility sets
-@item @code{log_facilityfillset} - Manipulate log facility sets
-@item @code{log_facilityaddset} - Manipulate log facility sets
-@item @code{log_facilitydelset} - Manipulate log facility sets
-@item @code{log_facilityismember} - Manipulate log facility sets
-@item @code{log_facilityisvalid} - Manipulate log facility sets
-@end itemize
-
-@section Background
-
-@subsection Log Files and Events
-
-The operating system uses a special log file named @code{syslog}.
-This log file is called the system log and is automatically created and
-tracked by the operating system. The system log is written with
-the @code{log_write()} function. An alternative log file may be written
-using the @code{log_write_any()} function. It is possible to use @code{log_read()}
-to query the system log and and write the records to a non-system log file
-using @code{log_write_entry()} to produce a filtered version of the
-system log. For example you could produce a log of all disk controller
-faults that have occurred.
-
-A non-system log may be a special log file created by an application to
-describe application faults, or a subset of the system log created
-by the application.
-
-
-
-@subsection Facilities
-
-A facility is an identification code for a subsystem, device, or
-other object about which information is being written to
-a log file.
-
-A facility set is a collection of facilities.
-
-@subsection Severity
-
-Severity is a rating of the error that is being logged.
-
-@subsection Queries
-
-
-The facility identifier and the event severity are the basis for
-subsequent log query. A log query is used as a filter to
-obtain a subset of a given log file. The log file may be configured
-to send out an event.
-
-@section Operations
-
-@subsection Creating and Writing a non-System Log
-
-The following code fragment create a non-System log file at /temp/.
-A real filename previously read entry and buffer @code{log_buf} of size
-@code{readsize} are written into the log. See the discussion on opening
-and reading a log for how the entry is created.
-
-@example
-#include <evlog.h>
- :
- logd_t *outlog = NULL;
- char *path = "/temp/";
-
- log_create( outlog, path );
- :
- log_write_entry( outlog, &entry, log_buf, readsize );
-
-@end example
-
-@subsection Reading a Log
-
-Discuss opening and reading from a log.
-
-@example
- build a query
- log_open
- log_read loop
-@end example
-
-@section Directives
-
-This section details the event logging manager's directives.
-A subsection is dedicated to each of this manager's directives
-and describes the calling sequence, related constants, usage,
-and status codes.
-
-@page
-@subsection log_write - Write to the system Log
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <evlog.h>
-
-int log_write(
- const log_facility_t facility,
- const int event_id,
- const log_severity_t severity,
- const void *buf,
- const size_t len
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-A successful call to @code{log_write()} returns a value of zero
-and an unsuccessful call returns the @code{errno}.
-
-@table @b
-@item E2BIG
-This error indicates an inconsistency in the implementation.
-Report this as a bug.
-
-@item EINVAL
-The @code{facility} argument is not a valid log facility.
-
-@item EINVAL
-The @code{severity} argument exceeds @code{LOG_SEVERITY_MAX}.
-
-@item EINVAL
-The @code{len} argument exceeds @code{LOG_MAXIUM_BUFFER_SIZE}.
-
-@item EINVAL
-The @code{len} argument was non-zero and @code{buf} is @code{NULL}.
-
-@item ENOSPC
-The device which contains the log file has run out of space.
-
-@item EIO
-An I/O error occurred in writing to the log file.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{log_write} function writes an event record to the
-system log file. The event record written consists of the
-event attributes specified by the @code{facility}, @code{event_id},
-and @code{severity} arguments as well as the data identified by the
-@code{buf} and @code{len} arguments. The fields of the event record
-structure to be written are filled in as follows:
-
-@table @b
-@item log_recid
-This is set to a monotonically increasing log record id
-maintained by the system for this individual log file.
-
-@item log_size
-This is set to the value of the @code{len} argument.
-
-@item log_event_id
-This is set to the value of the @code{event_id} argument.
-
-@item log_facility
-This is set to the value of the @code{facility} argument.
-
-@item log_severity
-This is set to the value of the @code{severity} argument.
-
-@item log_uid
-This is set to the value returned by @code{geteuid()}.
-
-@item log_gid
-This is set to the value returned by @code{getegid()}.
-
-@item log_pid
-This is set to the value returned by @code{getpid()}.
-
-@item log_pgrp
-This is set to the value returned by @code{getpgrp()}.
-
-@item log_time
-This is set to the value returned by @code{clock_gettime()} for the
-@code{CLOCK_REALTIME clock} source.
-
-@end table
-
-@subheading NOTES:
-
-The @code{_POSIX_LOGGING} feature flag is defined to indicate
-this service is available.
-
-This implementation can not return the @code{EPERM} error.
-
-@page
-@subsection log_write_any - Write to the any log file
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <evlog.h>
-
-int log_write_any(
- const logd_t logdes,
- const log_facility_t facility,
- const int event_id,
- const log_severity_t severity,
- const void *buf,
- const size_t len
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-A successful call to @code{log_write_any()} returns a value of zero
-and an unsuccessful call returns the @code{errno}.
-
-@table @b
-@item E2BIG
-This error indicates an inconsistency in the implementation.
-Report this as a bug.
-
-@item EBADF
-The @code{logdes} argument is not a valid log descriptor.
-
-@item EINVAL
-The @code{facility} argument is not a valid log facility.
-
-@item EINVAL
-The @code{severity} argument exceeds @code{LOG_SEVERITY_MAX}.
-
-@item EINVAL
-The @code{len} argument exceeds @code{LOG_MAXIMUM_BUFFER_SIZE}.
-
-@item EINVAL
-The @code{len} argument was non-zero and @code{buf} is @code{NULL}.
-
-@item ENOSPC
-The device which contains the log file has run out of space.
-
-@item EIO
-An I/O error occurred in writing to the log file.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{log_write_any()} function writes an event record to the log file
-specified by @code{logdes}. The event record written consists of the
-event attributes specified by the @code{facility}, @code{event_id},
-and @code{severity} arguments as well as the data identified by the
-@code{buf} and @code{len} arguments. The fields of the event record
-structure to be written are filled in as follows:
-
-@table @b
-@item log_recid
-This is set to a monotonically increasing log record id
-maintained by the system for this individual log file.
-
-@item log_size
-This is set to the value of the @code{len} argument.
-
-@item log_event_id
-This is set to the value of the @code{event_id} argument.
-
-@item log_facility
-This is set to the value of the @code{facility} argument.
-
-@item log_severity
-This is set to the value of the @code{severity} argument.
-
-@item log_uid
-This is set to the value returned by @code{geteuid()}.
-
-@item log_gid
-This is set to the value returned by @code{getegid()}.
-
-@item log_pid
-This is set to the value returned by @code{getpid()}.
-
-@item log_pgrp
-This is set to the value returned by @code{getpgrp()}.
-
-@item log_time
-This is set to the value returned by @code{clock_gettime()} for the
-@code{CLOCK_REALTIME} clock source.
-
-@end table
-
-@subheading NOTES:
-
-The @code{_POSIX_LOGGING} feature flag is defined to indicate
-this service is available.
-
-This implementation can not return the @code{EPERM} error.
-
-This function is not defined in the POSIX specification. It is
-an extension provided by this implementation.
-
-@page
-@subsection log_write_entry - Write entry to any log file
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <evlog.h>
-
-int log_write_entry(
- const logd_t logdes,
- struct log_entry *entry,
- const void *buf,
- const size_t len
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-A successful call to @code{log_write_entry()} returns a value of zero
-and an unsuccessful call returns the @code{errno}.
-
-@table @b
-@item E2BIG
-This error indicates an inconsistency in the implementation.
-Report this as a bug.
-
-@item EBADF
-The @code{logdes} argument is not a valid log descriptor.
-
-@item EFAULT
-The @code{entry} argument is not a valid pointer to a log entry.
-
-@item EINVAL
-The @code{facility} field in @code{entry} is not a valid log facility.
-
-@item EINVAL
-The @code{severity} field in @code{entry} exceeds @code{LOG_SEVERITY_MAX}.
-
-@item EINVAL
-The @code{len} argument exceeds @code{LOG_MAXIMUM_BUFFER_SIZE}.
-
-@item EINVAL
-The @code{len} argument was non-zero and @code{buf} is NULL.
-
-@item ENOSPC
-The device which contains the log file has run out of space.
-
-@item EIO
-An I/O error occurred in writing to the log file.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{log_write_entry()} function writes an event record
-specified by the @code{entry}, @code{buf}, and @code{len} arguments.
-Most of the fields of the event record pointed to by @code{entry}
-are left intact. The following fields are filled in as follows:
-
-@table @b
-@item log_recid
-This is set to a monotonically increasing log record id
-maintained by the system for this individual log file.
-
-@item log_size
-This is set to the value of the @code{len} argument.
-
-@end table
-
-This allows existing log entries from one log file to be written to
-another log file without destroying the logged information.
-
-@subheading NOTES:
-
-The @code{_POSIX_LOGGING} feature flag is defined to indicate
-this service is available.
-
-This implementation can not return the @code{EPERM} error.
-
-This function is not defined in the POSIX specification. It is
-an extension provided by this implementation.
-
-@page
-@subsection log_open - Open a log file
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <evlog.h>
-
-int log_open(
- logd_t *logdes,
- const char *path,
- const log_query_t *query
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-A successful call to @code{log_open()} returns a value of zero
-and an unsuccessful call returns the @code{errno}.
-
-@table @b
-@item EACCES
-Search permission is denied on a component of the @code{path} prefix,
-or the log file exists and read permission is denied.
-
-@item EINTR
-A signal interrupted the call to @code{log_open()}.
-
-@item EINVAL
-The log_severity field of the query argument exceeds
-@code{LOG_SEVERITY_MAX}.
-
-@item EINVAL
-The @code{path} argument referred to a file that was not a log file.
-
-@item EMFILE
-Too many log file descriptors are currently in use by this
-process.
-
-@item ENAMETOOLONG
-The length of the path string exceeds @code{PATH_MAX}, or a pathname
-component is longer than @code{NAME_MAX} while @code{_POSIX_NO_TRUNC} is
-in effect.
-
-@item ENFILE
-Too many files are currently open in the system.
-
-@item ENOENT
-The file specified by the @code{path} argument does not exist.
-
-@item ENOTDIR
-A component of the @code{path} prefix is not a directory.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{log_open()} function establishes the connection between a
-log file and a log file descriptor. It creates an open log file
-descriptor that refers to this query stream on the specified log file
-The log file descriptor is used by the other log functions to refer
-to that log query stream. The @code{path} argument points to a
-pathname for a log file. A @code{path} argument of @code{NULL} specifies
-the current system log file.
-
-The @code{query} argument is not @code{NULL}, then it points to a log query
-specification that is used to filter the records in the log file on
-subsequent @code{log_read()} operations. This restricts the set of
-event records read using the returned log file descriptor to those
-which match the query. A query match occurs for a given record when
-that record's facility is a member of the query's facility set and
-the record's severity is greater than or equal to the severity specified
-in the query.
-
-If the value of the @code{query} argument is @code{NULL}, no query filter
-shall be applied.
-
-@subheading NOTES:
-
-The @code{_POSIX_LOGGING} feature flag is defined to indicate
-this service is available.
-
-POSIX specifies that @code{EINVAL} will be returned if the
-@code{log_facilities} field of the @code{query} argument is not
-a valid facility set. In this implementation, this condition
-can never occur.
-
-Many error codes that POSIX specifies to be returned by @code{log_open()}
-should actually be detected by @code{open()} and passed back by the
-@code{log_open()} implementation. In this implementation, @code{EACCESS},
-@code{EMFILE}, @code{ENAMETOOLONG}, @code{ENFILE}, @code{ENOENT},
-and @code{ENOTDIR} are detected in this manner.
-
-@page
-@subsection log_read - Read from a log file
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <evlog.h>
-
-int log_read(
- const logd_t logdes,
- struct log_entry *entry,
- void *log_buf,
- const size_t log_len,
- const size_t *log_sizeread
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-A successful call to @code{log_read()} returns a value of zero
-and an unsuccessful call returns the @code{errno}.
-
-@table @b
-@item E2BIG
-This error indicates an inconsistency in the implementation.
-Report this as a bug.
-
-@item EBADF
-The @code{logdes} argument is not a valid log file descriptor.
-
-@item EFAULT
-The @code{entry} argument is not a valid pointer to a log entry structure.
-
-@item EFAULT
-The @code{log_sizeread} argument is not a valid pointer to a size_t.
-
-@item EBUSY
-No data available. There are no unread event records remaining
-in this log file.
-
-@item EINTR
-A signal interrupted the call to @code{log_read()}.
-
-@item EIO
-An I/O error occurred in reading from the event log.
-
-@item EINVAL
-The matching event record has data associated with it and
-@code{log_buf} was not a valid pointer.
-
-@item EINVAL
-The matching event record has data associated with it which is
-longer than @code{log_len}.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{log_read()} function reads the @code{log_entry}
-structure and up to @code{log_len} bytes of data from the next
-event record of the log file associated with the open log file
-descriptor @code{logdes}. The event record read is placed
-into the @code{log_entry} structure pointed to by
-@code{entry} and any data into the buffer pointed to by @code{log_buf}.
-The log record ID of the returned event record is be stored in the
-@code{log_recid} member of the @code{log_entry} structure for the event
-record.
-
-If the query attribute of the open log file description associated with
-the @code{logdes} is set, the event record read will match that query.
-
-If the @code{log_read()} is successful the call stores the actual length
-of the data associated with the event record into the location specified by
-@code{log_sizeread}. This number will be less than or equal to
-@code{log_len}.
-
-@subheading NOTES:
-
-The @code{_POSIX_LOGGING} feature flag is defined to indicate
-this service is available.
-
-When @code{EINVAL} is returned, then no data is returned although the
-event record is returned. This is an extension to the POSIX specification.
-
-The POSIX specification specifically allows @code{log_read()} to write
-greater than @code{log_len} bytes into @code{log_buf}. This is highly
-undesirable and this implementation will NOT do this.
-
-@page
-@subsection log_notify - Notify Process of writes to the system log.
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <evlog.h>
-
-int log_notify(
- const logd_t logdes,
- const struct sigevent *notification
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-A successful call to @code{log_notify()} returns a value of zero
-and an unsuccessful call returns the @code{errno}.
-
-@table @b
-@item EBADF
-The logdes argument is not a valid log file descriptor.
-
-@item EINVAL
-The notification argument specifies an invalid signal.
-
-@item EINVAL
-The process has requested a notify on a log that will not be
-written to.
-
-@item ENOSYS
-The function @code{log_notify()} is not supported by this implementation.
-
-@end table
-
-@subheading DESCRIPTION:
-
-If the argument @code{notification} is not @code{NULL} this function registers
-the calling process to be notified of event records received by the system
-log, which match the query parameters associated with the open log descriptor
-specified by @code{logdes}. The notification specified by the
-@code{notification} argument shall be sent to the process when an event
-record received by the system log is matched by the query attribute of the
-open log file description associated with the @code{logdes} log file
-descriptor. If the calling process has already registered a notification
-for the @code{logdes} log file descriptor, the new notification shall
-replace the existing notification registration.
-
-If the @code{notification} argument is @code{NULL} and the calling process is
-currently registered to be notified for the @code{logdes} log file
-descriptor, the existing registration shall be removed.
-
-@subheading NOTES:
-
-The @code{_POSIX_LOGGING} feature flag is defined to indicate
-this service is available.
-
-@page
-@subsection log_close - Close log descriptor
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <evlog.h>
-
-int log_close(
- const logd_t logdes
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-A successful call to @code{log_close()} returns a value of zero
-and an unsuccessful call returns the @code{errno}.
-
-@table @b
-@item EBADF
-The logdes argument is not a valid log file descriptor.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{log_close()} function deallocates the open log file descriptor
-indicated by @code{log_des}.
-
-When all log file descriptors associated with an open log file description
-have been closed, the open log file description is freed.
-
-If the link count of the log file is zero, when all log file descriptors
-have been closed, the space occupied by the log file is freed and the
-log file shall no longer be accessible.
-
-If the process has successfully registered a notification request for the
-log file descriptor, the registration is removed.
-
-@subheading NOTES:
-
-The @code{_POSIX_LOGGING} feature flag is defined to indicate
-this service is available.
-
-@page
-@subsection log_seek - Reposition log file offset
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <evlog.h>
-
-int log_seek(
- const logd_t logdes,
- log_recid_t log_recid
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-A successful call to @code{log_seek()} returns a value of zero
-and an unsuccessful call returns the @code{errno}.
-
-@table @b
-@item EBADF
-The @code{logdes} argument is not a valid log file descriptor.
-@item EINVAL
-The @code{log_recid} argument is not a valid record id.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{log_seek()} function sets the log file offset of the open
-log description associated with the @code{logdes} log file descriptor
-to the event record in the log file identified by @code{log_recid}.
-The @code{log_recid} argument is either the record id of a valid event
-record or one of the following values, as defined in the header file
-@code{<evlog.h>:}
-
-@table @b
-@item LOG_SEEK_START
-Set log file position to point at the first event
-record in the log file.
-
-@item LOG_SEEK_END
-Set log file position to point after the last event
-record in the log file.
-
-@end table
-
-@subheading NOTES:
-
-The @code{_POSIX_LOGGING} feature flag is defined to indicate
-this service is available.
-
-This implementation can not return EINTR.
-
-This implementation can not return EINVAL to indicate that
-the @code{log_recid} argument is not a valid record id.
-
-@page
-@subsection log_severity_before - Compare event record severities
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <evlog.h>
-
-int log_severity_before(
- log_severity_t s1,
- log_severity_t s2
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item 0
-The severity of @code{s1} is less than that of @code{s2}.
-
-@item 1
-The severity of @code{s1} is greater than or equal that of @code{s2}.
-
-@item EINVAL
-The value of either s1 or s2 exceeds @code{LOG_SEVERITY_MAX}.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{log_severity_before()} function compares the severity order
-of the @code{s1} and @code{s2} arguments. If @code{s1} is of
-severity greater than or equal to that of @code{s2}, then this
-function returns 1. Otherwise, it returns 0.
-
-If either @code{s1} or @code{s2} specify invalid severity values, the
-return value of @code{log_severity_before()} is unspecified.
-
-@subheading NOTES:
-
-The @code{_POSIX_LOGGING} feature flag is defined to indicate
-this service is available.
-
-The POSIX specification of the return value for this function is ambiguous.
-If EINVAL is equal to 1 in an implementation, then the application
-can not distinguish between greater than and an error condition.
-
-@page
-@subsection log_facilityemptyset - Manipulate log facility sets
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <evlog.h>
-
-int log_facilityemptyset(
- log_facility_set_t *set
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-A successful call to @code{log_facilityemptyset()} returns a value of zero
-and a unsuccessful call returns the @code{errno}.
-
-@table @b
-@item EFAULT
-The @code{set} argument is an invalid pointer.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{log_facilityemptyset()} function initializes the facility
-set pointed to by the argument @code{set}, such that all facilities
-are excluded.
-
-@subheading NOTES:
-
-The @code{_POSIX_LOGGING} feature flag is defined to indicate
-this service is available.
-
-Applications shall call either @code{log_facilityemptyset()} or
-@code{log_facilityfillset()} at least once for each object of type
-@code{log_facilityset_t} prior to any other use of that object. If
-such an object is not initialized in this way, but is nonetheless
-supplied as an argument to any of the @code{log_facilityaddset()},
-@code{logfacilitydelset()}, @code{log_facilityismember()} or
-@code{log_open()} functions, the results are undefined.
-
-@page
-@subsection log_facilityfillset - Manipulate log facility sets
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <evlog.h>
-
-int log_facilityfillset(
- log_facility_set_t *set
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-A successful call to @code{log_facilityfillset()} returns a value of zero
-and a unsuccessful call returns the @code{errno}.
-
-@table @b
-@item EFAULT
-The @code{set} argument is an invalid pointer.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{log_facilityfillset()} function initializes the facility
-set pointed to by the argument @code{set}, such that all facilities
-are included.
-
-@subheading NOTES:
-
-The @code{_POSIX_LOGGING} feature flag is defined to indicate
-this service is available.
-
-Applications shall call either @code{log_facilityemptyset()} or
-@code{log_facilityfillset()} at least once for each object of type
-@code{log_facilityset_t} prior to any other use of that object. If
-such an object is not initialized in this way, but is nonetheless
-supplied as an argument to any of the @code{log_facilityaddset()},
-@code{logfacilitydelset()}, @code{log_facilityismember()} or
-@code{log_open()} functions, the results are undefined.
-
-@page
-@subsection log_facilityaddset - Manipulate log facility sets
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <evlog.h>
-
-int log_facilityaddset(
- log_facility_set_t *set,
- log_facility_t facilityno
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-A successful call to @code{log_facilityaddset()} returns a value of zero
-and a unsuccessful call returns the @code{errno}.
-
-@table @b
-@item EFAULT
-The @code{set} argument is an invalid pointer.
-
-@item EINVAL
-The @code{facilityno} argument is not a valid facility.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{log_facilityaddset()} function adds the individual
-facility specified by the value of the argument @code{facilityno}
-to the facility set pointed to by the argument @code{set}.
-
-@subheading NOTES:
-
-The @code{_POSIX_LOGGING} feature flag is defined to indicate
-this service is available.
-
-Applications shall call either @code{log_facilityemptyset()} or
-@code{log_facilityfillset()} at least once for each object of type
-@code{log_facilityset_t} prior to any other use of that object. If
-such an object is not initialized in this way, but is nonetheless
-supplied as an argument to any of the @code{log_facilityaddset()},
-@code{logfacilitydelset()}, @code{log_facilityismember()} or
-@code{log_open()} functions, the results are undefined.
-
-@page
-@subsection log_facilitydelset - Manipulate log facility sets
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <evlog.h>
-
-int log_facilitydelset(
- log_facility_set_t *set,
- log_facility_t facilityno
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-A successful call to @code{log_facilitydelset()} returns a value of zero
-and a unsuccessful call returns the @code{errno}.
-
-@table @b
-@item EFAULT
-The @code{set} argument is an invalid pointer.
-
-@item EINVAL
-The @code{facilityno} argument is not a valid facility.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{log_facilitydelset()} function deletes the individual
-facility specified by the value of the argument @code{facilityno}
-from the facility set pointed to by the argument @code{set}.
-
-@subheading NOTES:
-
-The @code{_POSIX_LOGGING} feature flag is defined to indicate
-this service is available.
-
-Applications shall call either @code{log_facilityemptyset()} or
-@code{log_facilityfillset()} at least once for each object of type
-@code{log_facilityset_t} prior to any other use of that object. If
-such an object is not initialized in this way, but is nonetheless
-supplied as an argument to any of the @code{log_facilityaddset()},
-@code{logfacilitydelset()}, @code{log_facilityismember()} or
-@code{log_open()} functions, the results are undefined.
-
-@page
-@subsection log_facilityismember - Manipulate log facility sets
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <evlog.h>
-
-int log_facilityismember(
- const log_facility_set_t *set,
- log_facility_t facilityno,
- const int *member
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-A successful call to @code{log_facilityismember()} returns a value
-of zero and a unsuccessful call returns the @code{errno}.
-
-@table @b
-@item EFAULT
-The @code{set} or @code{member} argument is an invalid pointer.
-
-@item EINVAL
-The @code{facilityno} argument is not a valid facility.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{log_facilityismember()} function tests whether the facility
-specified by the value of the argument @code{facilityno} is a member
-of the set pointed to by the argument @code{set}. Upon successful
-completion, the @code{log_facilityismember()} function either returns
-a value of one to the location specified by @code{member} if the
-specified facility is a member of the specified set or value of
-zero to the location specified by @code{member} if the specified
-facility is not a member of the specified set.
-
-@subheading NOTES:
-
-The @code{_POSIX_LOGGING} feature flag is defined to indicate
-this service is available.
-
-Applications shall call either @code{log_facilityemptyset()} or
-@code{log_facilityfillset()} at least once for each object of type
-@code{log_facilityset_t} prior to any other use of that object. If
-such an object is not initialized in this way, but is nonetheless
-supplied as an argument to any of the @code{log_facilityaddset()},
-@code{logfacilitydelset()}, @code{log_facilityismember()} or
-@code{log_open()} functions, the results are undefined.
-
-@page
-@subsection log_facilityisvalid - Manipulate log facility sets
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <evlog.h>
-
-int log_facilityisvalid(
- log_facility_t facilityno
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-A return value of zero indicates that the @code{facilityno} is valid and
-a return value other than zero represents an @code{errno}.
-
-@table @b
-@item EFAULT
-The @code{set} or @code{member} argument is an invalid pointer.
-
-@item EINVAL
-The @code{facilityno} argument is not a valid facility.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{log_facilityisvalid()} function tests whether the facility
-specified by the value of the argument @code{facilityno} is a valid
-facility number. Upon successful completion, the
-the @code{log_facilityisvalid()} function either returns a value of
-0 if the specified facility is a valid facility or value of EINVAL
-if the specified facility is not a valid facility.
-
-@subheading NOTES:
-
-The @code{_POSIX_LOGGING} feature flag is defined to indicate
-this service is available.
-
-Applications shall call either @code{log_facilityemptyset()} or
-@code{log_facilityfillset()} at least once for each object of type
-@code{log_facilityset_t} prior to any other use of that object. If
-such an object is not initialized in this way, but is nonetheless
-supplied as an argument to any of the @code{log_facilityaddset()},
-@code{logfacilitydelset()}, @code{log_facilityismember()} or
-@code{log_open()} functions, the results are undefined.
-
-@page
-@subsection log_create - Creates a log file
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <evlog.h>
-
-int log_create(
- logd_t *ld,
- const char *path,
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-A successful call to @code{log_create()} returns a value
-of zero and a unsuccessful call returns the @code{errno}.
-
-@table @b
-
-@item EEXIST
-The @code{path} already exists and O_CREAT and O_EXCL were used.
-
-@item EISDIR
-The @code{path} refers to a directory and the access requested involved
-writing.
-
-@item ETXTBSY
-The @code{path} refers to an executable image which is currently being
-executed and write access was requested.
-
-@item EFAULT
-The @code{path} points outside your accessible address space.
-
-@item EACCES
-The requested access to the file is not allowed, or one of the
-directories in @code{path} did not allow search (execute) permission.
-
-@item ENAMETOOLONG
-The @code{path} was too long.
-
-@item ENOENT
-A directory component in @code{path} does not exist or is a dangling symbolic
-link.
-
-@item ENOTDIR
-A component used as a directory in @code{path} is not, in fact, a directory.
-
-@item EMFILE
-The process already has the maximum number of files open.
-
-@item ENFILE
-The limit on the total number of files open on the system has been reached.
-
-@item ENOMEM
-Insufficient kernel memory was available.
-
-@item EROFS
-The @code{path} refers to a file on a read-only filesystem and write access
-was requested.
-
-@item ELOOP
-The @code{path} contains a reference to a circular symbolic link, ie a
-symbolic link whose expansion contains a reference to itself.
-
-@end table
-
-@subheading DESCRIPTION:
-
-This function attempts to create a file associated with the @code{logdes}
-argument in the directory provided by the argument @code{path}.
-
-@subheading NOTES:
-
-The @code{_POSIX_LOGGING} feature flag is defined to indicate
-this service is available.
-
-@page
-@subsection log_sys_create - Creates a system log file
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <evlog.h>
-
-int log_sys_create();
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-A successful call to @code{log_sys_create()} returns a value
-of zero and a unsuccessful call returns the @code{errno}.
-
-@table @b
-@item EEXIST
-The directory path to the system log already exist.
-
-@end table
-
-@subheading DESCRIPTION:
-
-This function will create a predefined system log directory path and
-system log file if they do not already exist.
-
-@subheading NOTES:
-
-The @code{_POSIX_LOGGING} feature flag is defined to indicate
-this service is available.
diff --git a/doc/new_chapters/gen_section b/doc/new_chapters/gen_section
deleted file mode 100644
index 880189ab4e..0000000000
--- a/doc/new_chapters/gen_section
+++ /dev/null
@@ -1,238 +0,0 @@
-#
-# This shell script generates the starting template for a manager chapter.
-#
-
-
-# Set this based on which chapter you want to generate a template for.
-chapter=$1
-
-case ${chapter} in
- process)
- CHAPTER_CAPS="Process Creation and Execution"
- CHAPTER_LOWER="process creation and execution"
- ROUTINES="fork execl execv execle execve execlp execvp pthread_atfork \
- wait waitpid _exit"
- ;;
- procenv)
- CHAPTER_CAPS="Process Environment"
- CHAPTER_LOWER="process environment"
- ROUTINES="getpid getppid getuid geteuid getgid getegid setuid setgid \
- getgroups getlogin getlogin_r getpgrp setsid setpgid uname times \
- getenv ctermid ttyname ttyname_r isatty sysconf "
- ;;
- files)
- CHAPTER_CAPS="Files and Directories"
- CHAPTER_LOWER="files and directories"
- ROUTINES="opendir readdir readdir_r rewinddir closedir \
- chdir getcwd open creat umask link mkdir mkfifo unlink \
- rmdir rename stat fstat access chmod fchmod chown \
- utime ftrunctate pathconf fpathconf"
- ;;
- io)
- CHAPTER_CAPS="Input and Output Primitives"
- CHAPTER_LOWER="input and output primitives"
- ROUTINES="pipe dup dup2 close read write fcntl lseek fsynch fdatasynch \
- aio_read aio_write lio_listio aio_error aio_return aio_cancel \
- aio_suspend aio_fsync"
- ;;
- device)
- CHAPTER_CAPS="Device- and Class- Specific Functions"
- CHAPTER_LOWER="device- and class- specific functions"
- ROUTINES="cfgetispeed cfgetospeed cfsetispeed cfsetospeed tcgetattr \
- tcsetattr tcsendbreak tcdrain tcflush tcflow tcgetpgrp tcsetpgrp"
- ;;
- cspecific)
- CHAPTER_CAPS="Language-Specific Services for the C Programming Language"
- CHAPTER_LOWER="language-specific services for the C programming language"
- ROUTINES="setlocale fileno fdopen flcokfile ftrylockfile funlockfile \
- getc_unlocked getchar_unlocked putc_unlocked putchar_unlocked \
- setjmp longjmp sigsetjmp siglongjmp tzset strtok_r asctime_r \
- ctime_r gmtime_r localtime_r rand_r"
- ;;
- systemdb)
- CHAPTER_CAPS="System Databases"
- CHAPTER_LOWER="system databases"
- ROUTINES="getgrgid getgrgid_r getgrnam getgrnam_r getpwuid getpwuid_r \
- getpwnam getpwnam_r"
- ;;
- semaphores)
- CHAPTER_CAPS="Semaphores"
- CHAPTER_LOWER="semaphore"
- ROUTINES="sem_init sem_destroy sem_open sem_close sem_unlink sem_wait \
- sem_trywait sem_post sem_getvalue"
- ;;
- memorymgmt)
- CHAPTER_CAPS="Memory Management"
- CHAPTER_LOWER="memory management"
- ROUTINES="mlockall munlockall mlock munlock mmap munmap mprotect \
- msync shm_open shm_unlink"
- ;;
- message)
- CHAPTER_CAPS="Message Passing"
- CHAPTER_LOWER="message passing"
- ROUTINES="mq_open mq_close mq_unlink mq_send mq_receive mq_notify \
- mq_setattr mq_getattr"
- ;;
- cancel)
- CHAPTER_CAPS="Thread Cancellation"
- CHAPTER_LOWER="thread cancellation"
- ROUTINES="pthread_cancel pthread_setcancelstate pthread_setcanceltype \
- pthread_testcancel pthread_cleanup_push"
- ;;
- eventlog)
- CHAPTER_CAPS="Event Logging"
- CHAPTER_LOWER="event logging"
- ROUTINES="log_write log_open log_read log_notify log_close log_seek \
- log_severity_before log_facilityemptyset log_facilityfillset \
- log_facilityaddset log_facilitydelset log_facilityismember"
- ;;
- dumpcontrol)
- CHAPTER_CAPS="Process Dump Control"
- CHAPTER_LOWER="process dump control"
- ROUTINES="dump_setpath"
- ;;
- confspace)
- CHAPTER_CAPS="Configuration Space"
- CHAPTER_LOWER="configuration space"
- ROUTINES="cfg_mount cfg_unmount cfg_mknod cfg_get cfg_set cfg_link \
- cfg_unlink cfg_open cfg_read cfg_children cfg_mark cfg_close"
- ;;
- adminiface)
- CHAPTER_CAPS="Administration Interface"
- CHAPTER_LOWER="administration interface"
- ROUTINES="admin_shutdown"
- ;;
- # XXX this is not all of the C Library Stuff
- libc_ctype)
- CHAPTER_CAPS="C Library Character Handling"
- CHAPTER_LOWER="character handling"
- ROUTINES="isalnum isalpha iscntrl isdigit isgraph islower isprint \
- ispunct isspace isupper isxdigit tolower toupper"
- ;;
- libc_math)
- CHAPTER_CAPS="C Math Library"
- CHAPTER_LOWER="math library"
- ROUTINES="acos asis atan atan2 cos sin tan cosh sinh tanh exp frexp ldexp
- log log10 modf pow sqrt ceil fabs floor fmod"
- ;;
- libc_io)
- CHAPTER_CAPS="C Library IO"
- CHAPTER_LOWER="C Library IO"
- ROUTINES="clearerr fclose feof ferror fflush fgetc fgets fopen fputc \
- fputs fread freopen fseek ftell fwrite getc getchar gets perror \
- printf fprintf sprintf putc putchar puts remove rename rewind \
- scanf fscanf sscanf setbuf tempfile tmpnam ungetc"
- ;;
- libc_string)
- CHAPTER_CAPS="C Library String Handling"
- CHAPTER_LOWER="string handling"
- ROUTINES="strcpy strncpy strcat strncat strcmp strncmp strchr strcspn \
- strpbrk strrchr strspn strstr strtok stlen"
- ;;
- misc_stackchk)
- CHAPTER_CAPS="Stack Bounds Checker"
- CHAPTER_LOWER="stack bounds checker"
- ROUTINES="Stack_check_Initialize Stack_check_Dump_usage"
- ;;
- misc_rtmonuse)
- CHAPTER_CAPS="Rate Monotonic Period Statistics"
- CHAPTER_LOWER="rate monotonic period statistics"
- ROUTINES="Period_usage_Initialize Period_usage_Reset \
- Period_usage_Update Period_usage_Dump"
- ;;
- misc_cpuuse)
- CHAPTER_CAPS="CPU Usage Statistics"
- CHAPTER_LOWER="CPU usage statistics"
- ROUTINES="CPU_usage_Dump CPU_usage_Reset"
- ;;
- misc_error)
- CHAPTER_CAPS="Error Reporting Support"
- CHAPTER_LOWER="error reporting support"
- ROUTINES="rtems_error rtems_panic"
- ;;
- misc_monitor)
- CHAPTER_CAPS="Monitor Task"
- CHAPTER_LOWER="monitor task"
- ROUTINES="rtems_monitor_init rtems_monitor_wakeup"
- ;;
- *)
- echo "Unknown chapter name"
- exit 1
- ;;
-esac
-
-if [ "x${CHAPTER_CAPS}" = "x" -o "x${CHAPTER_LOWER}" = "x" \
- -o "x${ROUTINES}" = "x" ] ; then
- echo "initialization problem"
- exit 1
-fi
-
-echo "@c"
-echo "@c COPYRIGHT (c) 1988-1999."
-echo "@c On-Line Applications Research Corporation (OAR)."
-echo "@c All rights reserved. "
-echo "@c"
-echo "@c \$Id\$"
-echo "@c"
-echo ""
-echo "@chapter ${CHAPTER_CAPS}" Manager
-echo ""
-echo "@section Introduction"
-echo ""
-echo "The "
-echo "${CHAPTER_LOWER} manager is ..."
-echo ""
-echo "The directives provided by the ${CHAPTER_LOWER} manager are:"
-echo ""
-echo "@itemize @bullet"
-
-for routine in ${ROUTINES}
-do
- echo "@item @code{${routine}} - "
-done
-echo "@end itemize"
-
-echo ""
-echo "@section Background"
-echo ""
-echo "@section Operations"
-echo ""
-echo "@section Directives"
-echo ""
-echo "This section details the ${CHAPTER_LOWER} manager's directives."
-echo "A subsection is dedicated to each of this manager's directives"
-echo "and describes the calling sequence, related constants, usage,"
-echo "and status codes."
-echo ""
-
-for routine in ${ROUTINES}
-do
- echo "@page"
- echo "@subsection ${routine} - "
- echo ""
- echo "@subheading CALLING SEQUENCE:"
- echo ""
- echo "@ifset is-C"
- echo "@example"
- echo "int ${routine}("
- echo ");"
- echo "@end example"
- echo "@end ifset"
- echo ""
- echo "@ifset is-Ada"
- echo "@end ifset"
- echo ""
- echo "@subheading STATUS CODES:"
- echo ""
- echo "@table @b"
- echo "@item E"
- echo "The"
- echo ""
- echo "@end table"
- echo ""
- echo "@subheading DESCRIPTION:"
- echo ""
- echo "@subheading NOTES:"
- echo ""
-done
-
diff --git a/doc/new_chapters/monitor.t b/doc/new_chapters/monitor.t
deleted file mode 100644
index 683a7942cd..0000000000
--- a/doc/new_chapters/monitor.t
+++ /dev/null
@@ -1,224 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Monitor Task
-
-@section Introduction
-
-The monitor task is a simple interactive shell that allows the user to
-make inquries about he state of various system objects. The routines
-provided by the monitor task manager are:
-
-@itemize @bullet
-@item @code{rtems_monitor_init} - Initialize the Monitor Task
-@item @code{rtems_monitor_wakeup} - Wakeup the Monitor Task
-@end itemize
-
-@section Background
-
-There is no background information.
-
-@section Operations
-
-@subsection Initializing the Monitor
-
-The monitor is initialized by calling @code{rtems_monitor_init}. When
-initialized, the monitor is created as an independent task. An example
-of initializing the monitor is shown below:
-
-@example
-@group
-#include <rtems/monitor.h>
- ...
-rtems_monitor_init(0);
-@end group
-@end example
-
-The "0" parameter to the @code{rtems_monitor_init} routine
-causes the monitor to immediately enter command mode.
-This parameter is a bitfield. If the monitor is to suspend
-itself on startup, then the @code{RTEMS_MONITOR_SUSPEND} bit
-should be set.
-
-@section Routines
-
-This section details the monitor task manager's routines.
-A subsection is dedicated to each of this manager's routines
-and describes the calling sequence, related constants, usage,
-and status codes.
-
-@page
-@subsection rtems_monitor_init - Initialize the Monitor Task
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-void rtems_monitor_init(
- unsigned32 monitor_flags
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-An Ada interface is not currently available.
-@end example
-@end ifset
-
-@subheading STATUS CODES: NONE
-
-@subheading DESCRIPTION:
-
-This routine initializes the RTEMS monitor task. The
-@code{monitor_flags} parameter indicates how the server
-task is to start. This parameter is a bitfield and
-has the following constants associated with it:
-
-@itemize @bullet
-@item @b{RTEMS_MONITOR_SUSPEND} - suspend monitor on startup
-@item @b{RTEMS_MONITOR_GLOBAL} - monitor should be global
-@end itemize
-
-If the @code{RTEMS_MONITOR_SUSPEND} bit is set, then the
-monitor task will suspend itself after it is initialized.
-A subsequent call to @code{rtems_monitor_wakeup} will be required
-to activate it.
-
-@subheading NOTES:
-
-The monitor task is created with priority 1. If there are
-application tasks at priority 1, then there may be times
-when the monitor task is not executing.
-
-@page
-@subsection rtems_monitor_wakeup - Wakeup the Monitor Task
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-void rtems_monitor_wakeup( void );
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-An Ada interface is not currently available.
-@end example
-@end ifset
-
-@subheading STATUS CODES: NONE
-
-@subheading DESCRIPTION:
-
-This routine is used to activate the monitor task if it is suspended.
-
-@subheading NOTES:
-
-NONE
-
-@page
-@section Monitor Interactive Commands
-
-The following commands are supported by the monitor task:
-
-@itemize @bullet
-@item @code{help} - Obtain Help
-@item @code{pause} - Pause Monitor for a Specified Number of Ticks
-@item @code{exit} - Invoke a Fatal RTEMS Error
-@item @code{symbol} - Show Entries from Symbol Table
-@item @code{continue} - Put Monitor to Sleep Waiting for Explicit Wakeup
-@item @code{config} - Show System Configuration
-@item @code{itask} - List Init Tasks
-@item @code{mpci} - List MPCI Config
-@item @code{task} - Show Task Information
-@item @code{queue} - Show Message Queue Information
-@item @code{extension} - User Extensions
-@item @code{driver} - Show Information About Named Drivers
-@item @code{dname} - Show Information About Named Drivers
-@item @code{object} - Generic Object Information
-@item @code{node} - Specify Default Node for Commands That Take IDs
-@end itemize
-
-
-@subsection help - Obtain Help
-
-The @code{help} command prints out the list of commands. If invoked
-with a command name as the first argument, detailed help information
-on that command is printed.
-
-@subsection pause - Pause Monitor for a Specified Number of Ticks
-
-The @code{pause} command cause the monitor task to suspend itself
-for the specified number of ticks. If this command is invoked with
-no arguments, then the task is suspended for 1 clock tick.
-
-@subsection exit - Invoke a Fatal RTEMS Error
-
-The @code{exit} command invokes @code{rtems_error_occurred} directive
-with the specified error code. If this command is invoked with
-no arguments, then the @code{rtems_error_occurred} directive is
-invoked with an arbitrary error code.
-
-@subsection symbol - Show Entries from Symbol Table
-
-The @code{symbol} command lists the specified entries in the symbol table.
-If this command is invoked with no arguments, then all the
-symbols in the symbol table are printed.
-
-@subsection continue - Put Monitor to Sleep Waiting for Explicit Wakeup
-
-The @code{continue} command suspends the monitor task with no timeout.
-
-@subsection config - Show System Configuration
-
-The @code{config} command prints the system configuration.
-
-@subsection itask - List Init Tasks
-
-The @code{itask} command lists the tasks in the initialization tasks table.
-
-@subsection mpci - List MPCI Config
-
-The @code{mpci} command shows the MPCI configuration information
-
-@subsection task - Show Task Information
-
-The @code{task} command prints out information about one or more tasks in
-the system. If invoked with no arguments, then
-information on all the tasks in the system is printed.
-
-@subsection queue - Show Message Queue Information
-
-The @code{queue} command prints out information about one or more
-message queues in the system. If invoked with no arguments, then
-information on all the message queues in the system is printed.
-
-@subsection extension - User Extensions
-
-The @code{extension} command prints out information about the user
-extensions.
-
-@subsection driver - Show Information About Named Drivers
-
-The @code{driver} command prints information about the device driver table.
-
-@subsection dname - Show Information About Named Drivers
-
-The @code{dname} command prints information about the named device drivers.
-
-@subsection object - Generic Object Information
-
-The @code{object} command prints information about RTEMS objects.
-
-@subsection node - Specify Default Node for Commands That Take IDs
-
-The @code{node} command sets the default node for commands that look
-at object ID ranges.
-
diff --git a/doc/new_chapters/new_chapters.texi b/doc/new_chapters/new_chapters.texi
deleted file mode 100644
index 16e93425a2..0000000000
--- a/doc/new_chapters/new_chapters.texi
+++ /dev/null
@@ -1,137 +0,0 @@
-\input texinfo @c -*-texinfo-*-
-@c %**start of header
-@setfilename new_chapters
-@syncodeindex vr fn
-@synindex ky cp
-@paragraphindent 0
-@c @smallbook
-@c %**end of header
-
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@c
-@c Master file for the C User's Guide
-@c
-
-@c Joel's Questions
-@c
-@c 1. Why does paragraphindent only impact makeinfo?
-@c 2. Why does paragraphindent show up in HTML?
-@c
-
-@include ../common/setup.texi
-
-@ignore
-@ifinfo
-@format
-START-INFO-DIR-ENTRY
-* New Chapters: (new_chapters). Miscellaneous New Chapters
-END-INFO-DIR-ENTRY
-@end format
-@end ifinfo
-@end ignore
-
-@c variable substitution info:
-@c
-@c Note: At the moment we do not document the Ada interface but by building
-@c in the infrastructure Florist support should be simple to add.
-@set is-C
-@clear is-Ada
-@set LANGUAGE C
-@set STRUCTURE structure
-@set ROUTINE function
-@set OR |
-@set RPREFIX RTEMS_
-@set DIRPREFIX rtems_
-@c the language is @value{LANGUAGE}
-@c NOTE: don't use underscore in the name
-@c
-
-@c
-@c Title Page Stuff
-@c
-
-@set edition @value{RTEMS-EDITION}
-@set version @value{RTEMS-VERSION}
-@set update-date @value{RTEMS-UPDATE-DATE}
-@set update-month @value{RTEMS-UPDATE-MONTH}
-
-@c
-@c I don't really like having a short title page. --joel
-@c
-@c @shorttitlepage New Chapters
-
-@setchapternewpage odd
-@settitle New Chapters
-@titlepage
-@finalout
-
-@title New Chapters
-@subtitle Edition @value{edition}, for RTEMS @value{version}
-@sp 1
-@subtitle @value{update-month}
-@author On-Line Applications Research Corporation
-@page
-@include ../common/cpright.texi
-@end titlepage
-
-@c This prevents a black box from being printed on "overflow" lines.
-@c The alternative is to rework a sentence to avoid this problem.
-
-@include eventlog.texi
-@include dumpcontrol.texi
-@include confspace.texi
-@include adminiface.texi
-@include stackchk.texi
-@include rtmonuse.texi
-@include cpuuse.texi
-@include error.texi
-@include monitor.texi
-@ifinfo
-@node Top, , (dir), (dir)
-@top posix_users_new
-
-This is the online version of the RTEMS POSIX API User's Guide
-
-@menu
-* Event Logging Manager::
-* Process Dump Control Manager::
-* Configuration Space Manager::
-* Administration Interface Manager::
-* Stack Bounds Checker::
-* Rate Monotonic Period Statistics::
-* CPU Usage Statistics::
-* Error Reporting Support::
-* Monitor Task::
-* Command and Variable Index::
-* Concept Index::
-@end menu
-
-@end ifinfo
-@c
-@c
-@c Need to copy the emacs stuff and "trailer stuff" (index, toc) into here
-@c
-
-@node Command and Variable Index, Concept Index, , Top
-@unnumbered Command and Variable Index
-
-There are currently no Command and Variable Index entries.
-
-@c @printindex fn
-
-@node Concept Index, , Command and Variable Index, Top
-@unnumbered Concept Index
-
-There are currently no Concept Index entries.
-@c @printindex cp
-
-@contents
-@bye
-
diff --git a/doc/new_chapters/rtmonuse.t b/doc/new_chapters/rtmonuse.t
deleted file mode 100644
index 343777f35e..0000000000
--- a/doc/new_chapters/rtmonuse.t
+++ /dev/null
@@ -1,294 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Rate Monotonic Period Statistics
-
-@section Introduction
-
-The rate monotonic period statistics manager is an RTEMS support
-component that maintains statistics on the execution characteristics
-of each task using a period. The routines provided by the rate
-monotonic period statistics manager are:
-
-@itemize @bullet
-@item @code{Period_usage_Initialize} - Initialize the Period Statistics
-@item @code{Period_usage_Reset} - Reset the Period Statistics
-@item @code{Period_usage_Update} - Update the Statistics for this Period
-@item @code{Period_usage_Dump} - Report Period Statistics Usage
-@end itemize
-
-@section Background
-
-@section Period Statistics
-
-This manager maintains a set of statistics on each period. The following
-is a list of the information kept:
-
-@itemize @bullet
-@item @code{id}
-is the id of the period.
-
-@item @code{count}
-is the total number of periods executed.
-
-@item @code{missed_count}
-is the number of periods that were missed.
-
-@item @code{min_cpu_time}
-is the minimum amount of CPU execution time consumed
-on any execution of the periodic loop.
-
-@item @code{max_cpu_time}
-is the maximum amount of CPU execution time consumed
-on any execution of the periodic loop.
-
-@item @code{total_cpu_time}
-is the total amount of CPU execution time consumed
-by executions of the periodic loop.
-
-@item @code{min_wall_time}
-is the minimum amount of wall time that passed
-on any execution of the periodic loop.
-
-@item @code{max_wall_time}
-is the maximum amount of wall time that passed
-on any execution of the periodic loop.
-
-@item @code{total_wall_time}
-is the total amount of wall time that passed
-during executions of the periodic loop.
-
-@end itemize
-
-The above information is inexpensive to maintain and can provide very
-useful insights into the execution characteristics of a periodic
-task loop.
-
-@subsection Analysis of the Reported Information
-
-The period statistics reported must be analyzed by the user in terms
-of what the applications is. For example, in an application where
-priorities are assigned by the Rate Monotonic Algorithm, it would
-be very undesirable for high priority (i.e. frequency) tasks to
-miss their period. Similarly, in nearly any application, if a
-task were supposed to execute its periodic loop every 10 milliseconds
-and it averaged 11 milliseconds, then application requirements
-are not being met.
-
-The information reported can be used to determine the "hot spots"
-in the application. Given a period's id, the user can determine
-the length of that period. From that information and the CPU usage,
-the user can calculate the percentage of CPU time consumed by that
-periodic task. For example, a task executing for 20 milliseconds
-every 200 milliseconds is consuming 10 percent of the processor's
-execution time. This is usually enough to make it a good candidate
-for optimization.
-
-However, execution time alone is not enough to gauge the value of
-optimizing a particular task. It is more important to optimize
-a task executing 2 millisecond every 10 milliseconds (20 percent
-of the CPU) than one executing 10 milliseconds every 100 (10 percent
-of the CPU). As a general rule of thumb, the higher frequency at
-which a task executes, the more important it is to optimize that
-task.
-
-@section Operations
-
-@subsection Initializing the Period Statistics
-
-The period statistics manager must be explicitly initialized before
-any calls to this manager. This is done by calling the
-@code{Period_usage_Initialize} service.
-
-@subsection Updating Period Statistics
-
-It is the responsibility of each period task loop to update the statistics
-on each execution of its loop. The following is an example of a
-simple periodic task that uses the period statistics manager:
-
-@example
-@group
-rtems_task Periodic_task()
-@{
- rtems_name name;
- rtems_id period;
- rtems_status_code status;
-
- name = rtems_build_name( 'P', 'E', 'R', 'D' );
-
- (void) rate_monotonic_create( name, &period );
-
- while ( 1 ) @{
- if ( rate_monotonic_period( period, 100 ) == TIMEOUT )
- break;
-
- /* Perform some periodic actions */
-
- /* Report statistics */
- Period_usage_Update( period_id );
- @}
-
- /* missed period so delete period and SELF */
-
- (void) rate_monotonic_delete( period );
- (void) task_delete( SELF );
-@}
-@end group
-@end example
-
-@subsection Reporting Period Statistics
-
-The application may dynamically report the period usage for every
-period in the system by calling the @code{Period_usage_Dump} routine.
-This routine prints a table with the following information per period:
-
-@itemize @bullet
-@item period id
-@item id of the task that owns the period
-@item number of periods executed
-@item number of periods missed
-@item minimum/maximum/average cpu use per period
-@item minimum/maximum/average wall time per period
-@end itemize
-
-The following is an example of the report generated:
-
-@example
-@group
-Period information by period
- ID OWNER PERIODS MISSED CPU TIME WALL TIME
-0x28010001 TA1 502 0 0/1/ 1.00 0/0/0.00
-0x28010002 TA2 502 0 0/1/ 1.00 0/0/0.00
-0x28010003 TA3 502 0 0/1/ 1.00 0/0/0.00
-0x28010004 TA4 502 0 0/1/ 1.00 0/0/0.00
-0x28010005 TA5 10 0 0/1/ 0.90 0/0/0.00
-@end group
-@end example
-
-@section Routines
-
-This section details the rate monotonic period statistics manager's routines.
-A subsection is dedicated to each of this manager's routines
-and describes the calling sequence, related constants, usage,
-and status codes.
-
-@page
-@subsection Period_usage_Initialize - Initialize the Period Statistics
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-void Period_usage_Initialize( void );
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-An Ada interface is not currently available.
-@end example
-@end ifset
-
-@subheading STATUS CODES: NONE
-
-@subheading DESCRIPTION:
-
-This routine allocates the table used to contain the period statistics.
-This table is then initialized by calling the @code{Period_usage_Reset}
-service.
-
-@subheading NOTES:
-
-This routine invokes the @code{malloc} routine to dynamically allocate
-memory.
-
-@page
-@subsection Period_usage_Reset - Reset the Period Statistics
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-void Period_usage_Reset( void );
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-An Ada interface is not currently available.
-@end example
-@end ifset
-
-@subheading STATUS CODES: NONE
-
-@subheading DESCRIPTION:
-
-This routine re-initializes the period statistics table to its
-default state which is when zero period executions have occurred.
-
-@subheading NOTES:
-
-NONE
-
-@page
-@subsection Period_usage_Update - Update the Statistics for this Period
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-void Period_usage_Update(
- rtems_id id
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-An Ada interface is not currently available.
-@end example
-@end ifset
-
-@subheading STATUS CODES: NONE
-
-@subheading DESCRIPTION:
-
-The @code{Period_usage_Update} routine must be invoked at the "bottom"
-of each periodic loop iteration to update the statistics.
-
-@subheading NOTES:
-
-NONE
-
-@page
-@subsection Period_usage_Dump - Report Period Statistics Usage
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-void Period_usage_Dump( void );
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-An Ada interface is not currently available.
-@end example
-@end ifset
-
-@subheading STATUS CODES: NONE
-
-@subheading DESCRIPTION:
-
-This routine prints out a table detailing the period statistics for
-all periods in the system.
-
-@subheading NOTES:
-
-NONE
diff --git a/doc/new_chapters/stackchk.t b/doc/new_chapters/stackchk.t
deleted file mode 100644
index 4d397bdd13..0000000000
--- a/doc/new_chapters/stackchk.t
+++ /dev/null
@@ -1,192 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Stack Bounds Checker
-
-@section Introduction
-
-The stack bounds checker is an RTEMS support component that determines
-if a task has overflowed its run-time stack. The routines provided
-by the stack bounds checker manager are:
-
-@itemize @bullet
-@item @code{Stack_check_Initialize} - Initialize the Stack Bounds Checker
-@item @code{Stack_check_Dump_usage} - Report Task Stack Usage
-@end itemize
-
-@section Background
-
-@subsection Task Stack
-
-Each task in a system has a fixed size stack associated with it. This
-stack is allocated when the task is created. As the task executes, the
-stack is used to contain parameters, return addresses, saved registers,
-and local variables. The amount of stack space required by a task
-is dependent on the exact set of routines used. The peak stack usage
-reflects the worst case of subroutine pushing information on the stack.
-For example, if a subroutine allocates a local buffer of 1024 bytes, then
-this data must be accounted for in the stack of every task that invokes that
-routine.
-
-Recursive routines make calculating peak stack usage difficult, if not
-impossible. Each call to the recursive routine consumes @i{n} bytes
-of stack space. If the routine recursives 1000 times, then @code{1000 * @i{n}}
-bytes of stack space are required.
-
-@subsection Execution
-
-The stack bounds checker operates as a set of task extensions. At
-task creation time, the task's stack is filled with a pattern to
-indicate the stack is unused. As the task executes, it will overwrite
-this pattern in memory. At each task switch, the stack bounds checker's
-task switch extension is executed. This extension checks that the last
-@code{n} bytes of the task's stack have not been overwritten. If they
-have, then a blown stack error is reported.
-
-The number of bytes checked for an overwrite is processor family dependent.
-The minimum stack frame per subroutine call varies widely between processor
-families. On CISC families like the Motorola MC68xxx and Intel ix86, all
-that is needed is a return address. On more complex RISC processors,
-the minimum stack frame per subroutine call may include space to save
-a significant number of registers.
-
-Another processor dependent feature that must be taken into account by
-the stack bounds checker is the direction that the stack grows. On some
-processor families, the stack grows up or to higher addresses as the
-task executes. On other families, it grows down to lower addresses. The
-stack bounds checker implementation uses the stack description definitions
-provided by every RTEMS port to get for this information.
-
-@section Operations
-
-@subsection Initializing the Stack Bounds Checker
-
-The stack checker is initialized automatically when its task
-create extension runs for the first time. When this occurs,
-the @code{Stack_check_Initialize} is invoked.
-
-The application must include the stack bounds checker extension set
-in its set of Initial Extensions. This set of extensions is
-defined as @code{STACK_CHECKER_EXTENSION}. If using @code{<confdefs.h>}
-for Configuration Table generation, then all that is necessary is
-to define the macro @code{STACK_CHECKER_ON} before including
-@code{<confdefs.h>} as shown below:
-
-@example
-@group
-#define STACK_CHECKER_ON
- ...
-#include <confdefs.h>
-@end group
-@end example
-
-@subsection Reporting Task Stack Usage
-
-The application may dynamically report the stack usage for every task
-in the system by calling the @code{Stack_check_Dump_usage} routine.
-This routine prints a table with the peak usage and stack size of
-every task in the system. The following is an example of the
-report generated:
-
-@example
-@group
- ID NAME LOW HIGH AVAILABLE USED
-0x04010001 IDLE 0x003e8a60 0x003e9667 2952 200
-0x08010002 TA1 0x003e5750 0x003e7b57 9096 1168
-0x08010003 TA2 0x003e31c8 0x003e55cf 9096 1168
-0x08010004 TA3 0x003e0c40 0x003e3047 9096 1104
-0xffffffff INTR 0x003ecfc0 0x003effbf 12160 128
-@end group
-@end example
-
-Notice the last time. The task id is 0xffffffff and its name is "INTR".
-This is not actually a task, it is the interrupt stack.
-
-@subsection When a Task Overflows the Stack
-
-When the stack bounds checker determines that a stack overflow has occurred,
-it will attempt to print a message identifying the task and then shut the
-system down. If the stack overflow has caused corruption, then it is
-possible that the message can not be printed.
-
-The following is an example of the output generated:
-
-@example
-@group
-BLOWN STACK!!! Offending task(0x3eb360): id=0x08010002; name=0x54413120
- stack covers range 0x003e5750 - 0x003e7b57 (9224 bytes)
- Damaged pattern begins at 0x003e5758 and is 128 bytes long
-@end group
-@end example
-
-The above includes the task id and a pointer to the task control block as
-well as enough information so one can look at the task's stack and
-see what was happening.
-
-@section Routines
-
-This section details the stack bounds checker's routines.
-A subsection is dedicated to each of routines
-and describes the calling sequence, related constants, usage,
-and status codes.
-
-@page
-@subsection Stack_check_Initialize - Initialize the Stack Bounds Checker
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-void Stack_check_Initialize( void );
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-An Ada interface is not currently available.
-@end example
-@end ifset
-
-@subheading STATUS CODES: NONE
-
-@subheading DESCRIPTION:
-
-Initialize the stack bounds checker.
-
-@subheading NOTES:
-
-This is performed automatically the first time the stack bounds checker
-task create extension executes.
-
-@page
-@subsection Stack_check_Dump_usage - Report Task Stack Usage
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-void Stack_check_Dump_usage( void );
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-An Ada interface is not currently available.
-@end example
-@end ifset
-
-@subheading STATUS CODES: NONE
-
-@subheading DESCRIPTION:
-
-This routine prints a table with the peak stack usage and stack space
-allocation of every task in the system.
-
-@subheading NOTES:
-
-NONE
diff --git a/doc/oaronly.jpg b/doc/oaronly.jpg
deleted file mode 100644
index c87c151404..0000000000
--- a/doc/oaronly.jpg
+++ /dev/null
Binary files differ
diff --git a/doc/porting/Makefile b/doc/porting/Makefile
deleted file mode 100644
index b612e6e095..0000000000
--- a/doc/porting/Makefile
+++ /dev/null
@@ -1,111 +0,0 @@
-#
-# COPYRIGHT (c) 1988-1999.
-# On-Line Applications Research Corporation (OAR).
-# All rights reserved.
-#
-# $Id$
-#
-
-PROJECT=porting
-
-include ../Make.config
-
-all: html info ps pdf
-
-dirs:
- $(make-dirs)
-
-COMMON_FILES=../common/cpright.texi
-FILES=preface.texi developtools.texi sourcecode.texi cpumodels.texi \
- cpuinit.texi interrupts.texi taskcontext.texi idlethread.texi \
- prioritybitmap.texi codetuning.texi miscellaneous.texi $(COMMON_FILES)
-
-GENERATED_FILES=developtools.texi sourcecode.texi cpumodels.texi \
- cpuinit.texi interrupts.texi taskcontext.texi idlethread.texi \
- prioritybitmap.texi codetuning.texi miscellaneous.texi
-
-
-INFOFILES=$(wildcard $(PROJECT) $(PROJECT)-*)
-
-info: dirs $(PROJECT)
- cp $(PROJECT) $(PROJECT)-* $(INFO_INSTALL)
-
-$(PROJECT): $(FILES)
- $(MAKEINFO) $(PROJECT).texi
-
-dvi: dirs $(PROJECT).dvi
-ps: dirs $(PROJECT).ps
-pdf: dirs $(PROJECT).pdf
-
-$(PROJECT).pdf: $(FILES)
- $(TEXI2PDF) $(PROJECT).texi
- cp $(PROJECT).pdf $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).ps: $(PROJECT).dvi
- dvips -o $(PROJECT).ps $(PROJECT).dvi
- cp $(PROJECT).ps $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).dvi: $(FILES)
- $(TEXI2DVI) $(PROJECT).texi
- cp $(PROJECT).dvi $(WWW_INSTALL)/$(PROJECT)
-
-html: dirs $(FILES)
- -mkdir -p $(WWW_INSTALL)/$(PROJECT)
- $(TEXI2WWW) $(TEXI2WWW_ARGS) -dir $(WWW_INSTALL)/$(PROJECT) \
- $(PROJECT).texi
-
-clean:
- rm -f *.o $(PROG) *.txt core *.html $(PROJECT).pdf
- rm -f *.dvi *.ps *.log *.aux *.cp *.fn *.ky *.pg *.toc *.tp *.vr $(BASE)
- rm -f $(PROJECT) $(PROJECT)-* _* $(GENERATED_FILES)
-
-developtools.texi: developtools.t
- $(BMENU) -p "Preface" \
- -u "Top" \
- -n "Source Code Organization" ${*}.t
-
-sourcecode.texi: sourcecode.t
- $(BMENU) -p "Development Tools" \
- -u "Top" \
- -n "CPU Model Variations" ${*}.t
-
-cpumodels.texi: cpumodels.t
- $(BMENU) -p "Source Code Organization Introduction" \
- -u "Top" \
- -n "CPU Initialization" ${*}.t
-
-cpuinit.texi: cpuinit.t
- $(BMENU) -p "CPU Model Variations Coding Issues" \
- -u "Top" \
- -n "Interrupts" ${*}.t
-
-interrupts.texi: interrupts.t
- $(BMENU) -p "CPU Initialization Initializing the CPU" \
- -u "Top" \
- -n "Task Context Management" ${*}.t
-
-taskcontext.texi: taskcontext.t
- $(BMENU) -p "Interrupts Pointer to _Thread_Dispatch Routine" \
- -u "Top" \
- -n "IDLE Thread" ${*}.t
-
-idlethread.texi: idlethread.t
- $(BMENU) -p "Task Context Management Restoring a Floating Point Context" \
- -u "Top" \
- -n "Priority Bitmap Manipulation" ${*}.t
-
-prioritybitmap.texi: prioritybitmap.t
- $(BMENU) -p "IDLE Thread Idle Thread Body" \
- -u "Top" \
- -n "Code Tuning Parameters" ${*}.t
-
-codetuning.texi: codetuning.t
- $(BMENU) -p "Priority Bitmap Manipulation Bit Scan Support" \
- -u "Top" \
- -n "Miscellaneous" ${*}.t
-
-miscellaneous.texi: miscellaneous.t
- $(BMENU) -p "Code Tuning Parameters Partition Element Alignment" \
- -u "Top" \
- -n "Command and Variable Index" ${*}.t
-
diff --git a/doc/porting/codetuning.t b/doc/porting/codetuning.t
deleted file mode 100644
index 95d9262e2e..0000000000
--- a/doc/porting/codetuning.t
+++ /dev/null
@@ -1,155 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Code Tuning Parameters
-
-@section Inline Thread_Enable_dispatch
-
-Should the calls to _Thread_Enable_dispatch be inlined?
-
-If TRUE, then they are inlined.
-
-If FALSE, then a subroutine call is made.
-
-
-Basically this is an example of the classic trade-off of size versus
-speed. Inlining the call (TRUE) typically increases the size of RTEMS
-while speeding up the enabling of dispatching.
-
-[NOTE: In general, the _Thread_Dispatch_disable_level will only be 0 or 1
-unless you are in an interrupt handler and that interrupt handler invokes
-the executive.] When not inlined something calls _Thread_Enable_dispatch
-which in turns calls _Thread_Dispatch. If the enable dispatch is inlined,
-then one subroutine call is avoided entirely.]
-
-@example
-#define CPU_INLINE_ENABLE_DISPATCH FALSE
-@end example
-
-@section Inline Thread_queue_Enqueue_priority
-
-Should the body of the search loops in _Thread_queue_Enqueue_priority be
-unrolled one time? In unrolled each iteration of the loop examines two
-"nodes" on the chain being searched. Otherwise, only one node is examined
-per iteration.
-
-If TRUE, then the loops are unrolled.
-
-If FALSE, then the loops are not unrolled.
-
-The primary factor in making this decision is the cost of disabling and
-enabling interrupts (_ISR_Flash) versus the cost of rest of the body of
-the loop. On some CPUs, the flash is more expensive than one iteration of
-the loop body. In this case, it might be desirable to unroll the loop.
-It is important to note that on some CPUs, this code is the longest
-interrupt disable period in RTEMS. So it is necessary to strike a balance
-when setting this parameter.
-
-@example
-#define CPU_UNROLL_ENQUEUE_PRIORITY TRUE
-@end example
-
-
-@section Structure Alignment Optimization
-
-The following macro may be defined to the attribute setting used to force
-alignment of critical RTEMS structures. On some processors it may make
-sense to have these aligned on tighter boundaries than the minimum
-requirements of the compiler in order to have as much of the critical data
-area as possible in a cache line. This ensures that the first access of
-an element in that structure fetches most, if not all, of the data
-structure and places it in the data cache. Modern CPUs often have cache
-lines of at least 16 bytes and thus a single access implicitly fetches
-some surrounding data and places that unreferenced data in the cache.
-Taking advantage of this allows RTEMS to essentially prefetch critical
-data elements.
-
-The placement of this macro in the declaration of the variables is based
-on the syntactically requirements of the GNU C "__attribute__" extension.
-For another toolset, the placement of this macro could be incorrect. For
-example with GNU C, use the following definition of
-CPU_STRUCTURE_ALIGNMENT to force a structures to a 32 byte boundary.
-
-#define CPU_STRUCTURE_ALIGNMENT __attribute__ ((aligned (32)))
-
-To benefit from using this, the data must be heavily used so it will stay
-in the cache and used frequently enough in the executive to justify
-turning this on. NOTE: Because of this, only the Priority Bit Map table
-currently uses this feature.
-
-The following illustrates how the CPU_STRUCTURE_ALIGNMENT is defined on
-ports which require no special alignment for optimized access to data
-structures:
-
-@example
-#define CPU_STRUCTURE_ALIGNMENT
-@end example
-
-@section Data Alignment Requirements
-
-@subsection Data Element Alignment
-
-The CPU_ALIGNMENT macro should be set to the CPU's worst alignment
-requirement for data types on a byte boundary. This is typically the
-alignment requirement for a C double. This alignment does not take into
-account the requirements for the stack.
-
-The following sets the CPU_ALIGNMENT macro to 8 which indicates that there
-is a basic C data type for this port which much be aligned to an 8 byte
-boundary.
-
-@example
-#define CPU_ALIGNMENT 8
-@end example
-
-@subsection Heap Element Alignment
-
-The CPU_HEAP_ALIGNMENT macro is set to indicate the byte alignment
-requirement for data allocated by the RTEMS Code Heap Handler. This
-alignment requirement may be stricter than that for the data types
-alignment specified by CPU_ALIGNMENT. It is common for the heap to follow
-the same alignment requirement as CPU_ALIGNMENT. If the CPU_ALIGNMENT is
-strict enough for the heap, then this should be set to CPU_ALIGNMENT. This
-macro is necessary to ensure that allocated memory is properly aligned for
-use by high level language routines.
-
-The following example illustrates how the CPU_HEAP_ALIGNMENT macro is set
-when the required alignment for elements from the heap is the same as the
-basic CPU alignment requirements.
-
-@example
-#define CPU_HEAP_ALIGNMENT CPU_ALIGNMENT
-@end example
-
-NOTE: This does not have to be a power of 2. It does have to be greater
-or equal to than CPU_ALIGNMENT.
-
-@subsection Partition Element Alignment
-
-The CPU_PARTITION_ALIGNMENT macro is set to indicate the byte alignment
-requirement for memory buffers allocated by the RTEMS Partition Manager
-that is part of the Classic API. This alignment requirement may be
-stricter than that for the data types alignment specified by
-CPU_ALIGNMENT. It is common for the partition to follow the same
-alignment requirement as CPU_ALIGNMENT. If the CPU_ALIGNMENT is strict
-enough for the partition, then this should be set to CPU_ALIGNMENT. This
-macro is necessary to ensure that allocated memory is properly aligned for
-use by high level language routines.
-
-The following example illustrates how the CPU_PARTITION_ALIGNMENT macro is
-set when the required alignment for elements from the RTEMS Partition
-Manager is the same as the basic CPU alignment requirements.
-
-
-@example
-#define CPU_PARTITION_ALIGNMENT CPU_ALIGNMENT
-@end example
-
-NOTE: This does not have to be a power of 2. It does have to be greater
-or equal to than CPU_ALIGNMENT.
-
diff --git a/doc/porting/cpuinit.t b/doc/porting/cpuinit.t
deleted file mode 100644
index a1ae785615..0000000000
--- a/doc/porting/cpuinit.t
+++ /dev/null
@@ -1,150 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter CPU Initialization
-
-This section describes the general CPU and system initialization sequence
-as it pertains to the CPU dependent code.
-
-@section Introduction
-
-XXX general startup sequence description rewritten to make it more
-applicable to CPU depdent code in executive
-
-@section CPU Dependent Configuration Table
-
-The CPU Dependent Configuration Table contains information which tailors
-the behavior of RTEMS base Some of the fields in this table are required
-to be present in all ports of RTEMS. These fields appear at the beginning
-of the data structure. Fields past this point may be CPU family and CPU
-model dependent. For example, a port may add a field to specify the
-default value for an interrupt mask register on the CPU. This table is
-initialized by the Board Support Package and passed to the
-rtems_initialize_executive or rtems_initialize_executive_early directive.
-
-@example
-typedef struct @{
- void (*pretasking_hook)( void );
- void (*predriver_hook)( void );
- void (*postdriver_hook)( void );
- void (*idle_task)( void );
- boolean do_zero_of_workspace;
- unsigned32 idle_task_stack_size;
- unsigned32 interrupt_stack_size;
- unsigned32 extra_mpci_receive_server_stack;
- void * (*stack_allocate_hook)( unsigned32 );
- void (*stack_free_hook)( void* );
- /* end of fields required on all CPUs */
-
- unsigned32 some_other_cpu_dependent_info;
-@} rtems_cpu_table;
-@end example
-
-@table @code
-@item pretasking_hook
-is the address of the user provided routine which is invoked
-once RTEMS APIs are initialized. This routine will be invoked
-before any system tasks are created. Interrupts are disabled.
-This field may be NULL to indicate that the hook is not utilized.
-
-@item predriver_hook
-is the address of the user provided
-routine that is invoked immediately before the
-the device drivers and MPCI are initialized. RTEMS
-initialization is complete but interrupts and tasking are disabled.
-This field may be NULL to indicate that the hook is not utilized.
-
-@item postdriver_hook
-is the address of the user provided
-routine that is invoked immediately after the
-the device drivers and MPCI are initialized. RTEMS
-initialization is complete but interrupts and tasking are disabled.
-This field may be NULL to indicate that the hook is not utilized.
-
-@item idle_task
-is the address of the optional user
-provided routine which is used as the system's IDLE task. If
-this field is not NULL, then the RTEMS default IDLE task is not
-used. This field may be NULL to indicate that the default IDLE
-is to be used.
-
-@item do_zero_of_workspace
-indicates whether RTEMS should
-zero the Workspace as part of its initialization. If set to
-TRUE, the Workspace is zeroed. Otherwise, it is not.
-
-@item idle_task_stack_size
-is the size of the RTEMS idle task stack in bytes.
-If this number is less than MINIMUM_STACK_SIZE, then the
-idle task's stack will be MINIMUM_STACK_SIZE in byte.
-
-@item interrupt_stack_size
-is the size of the RTEMS allocated interrupt stack in bytes.
-This value must be at least as large as MINIMUM_STACK_SIZE.
-
-@item extra_mpci_receive_server_stack
-is the extra stack space allocated for the RTEMS MPCI receive server task
-in bytes. The MPCI receive server may invoke nearly all directives and
-may require extra stack space on some targets.
-
-@item stack_allocate_hook
-is the address of the optional user provided routine which allocates
-memory for task stacks. If this hook is not NULL, then a stack_free_hook
-must be provided as well.
-
-@item stack_free_hook
-is the address of the optional user provided routine which frees
-memory for task stacks. If this hook is not NULL, then a stack_allocate_hook
-must be provided as well.
-
-@end table
-
-@section Initializing the CPU
-
-The _CPU_Initialize routine performs processor dependent initialization.
-
-@example
-void _CPU_Initialize(
- rtems_cpu_table *cpu_table,
- void (*thread_dispatch) /* may be ignored */
-)
-@end example
-
-The thread_dispatch argument is the address of the entry point for the
-routine called at the end of an ISR once it has been decided a context
-switch is necessary. On some compilation systems it is difficult to call
-a high-level language routine from assembly. Providing the address of the
-_Thread_ISR_Dispatch routine allows the porter an easy way to obtain this
-critical address and thus provides an easy way to work around this
-limitation on these systems.
-
-If you encounter this problem save the entry point in a CPU dependent
-variable as shown below:
-
-@example
-_CPU_Thread_dispatch_pointer = thread_dispatch;
-@end example
-
-
-During the initialization of the context for tasks with floating point,
-the CPU dependent code is responsible for initializing the floating point
-context. If there is not an easy way to initialize the FP context during
-Context_Initialize, then it is usually easier to save an "uninitialized"
-FP context here and copy it to the task's during Context_Initialize. If
-this technique is used to initialize the FP contexts, then it is important
-to ensure that the state of the floating point unit is in a coherent,
-initialized state.
-
-Finally, this routine is responsible for copying the application's CPU
-Table into a locally accessible and modifiable area. This is shown below:
-
-@example
-_CPU_Table = *cpu_table;
-@end example
-
-
diff --git a/doc/porting/cpumodels.t b/doc/porting/cpumodels.t
deleted file mode 100644
index e8952acb64..0000000000
--- a/doc/porting/cpumodels.t
+++ /dev/null
@@ -1,144 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter CPU Model Variations
-
-XXX enhance using portability presentation from CS595 class. See
-general/portability.ppt.
-
-Since the text in the next section was written, RTEMS view of
-portability has grown to distinguish totally portable, CPU
-family dependent, CPU model dependent, peripheral chip dependent
-and board dependent. This text was part of a larger paper that
-did not even cover portability completely as it existed when this
-was written and certainly is out of date now. :)
-
-
-@section Overview of RTEMS Portability
-
-RTEMS was designed to be a highly portable, reusable software component.
-This reflects the fundamental nature of embedded systems in which hardware
-components, ranging from boards to peripherals to even the processor
-itself, are selected specifically to meet the requirements of a particular
-project.
-
-@subsection Processor Families
-
-Since there are a wide variety of embedded systems, there are a wide
-variety of processors targeting embedded systems. RTEMS alleviates some of
-the burden on the embedded systems programmer by providing a consistent,
-high-performance environment regardless of the target processor. RTEMS
-has been ported to a variety of microprocessor families including:
-
-@itemize @bullet
-
-@item Motorola ColdFire
-
-@item Motorola MC68xxx
-
-@item Motorola MC683xx
-
-@item Intel ix86 (i386 and above)
-
-@item Intel i960
-
-@item MIPS
-
-@item PowerPC 4xx, 5xx, 6xx, 7xx, and 8xx
-
-@item SPARC
-
-@item Hewlett-Packard PA-RISC
-
-@item AMD A29K
-
-@end itemize
-
-
-In addition, there is a port of RTEMS to UNIX that uses standard UNIX
-services to simulate the embedded environment.
-
-Each RTEMS port supplies a well-defined set of services that are the
-foundation for the highly portable RTEMS and POSIX API implementations.
-When porting to a new processor family, one must provide the processor
-dependent implementation of these services. This set of processor
-dependent core services includes software to perform interrupt
-dispatching, context switches, and manipulate task register sets.
-
-The RTEMS approach to handling varying processor models reflects the
-approach taken by the designers of the processors themselves. In each
-processor family, there is a core architecture that must be implemented on
-all processor models within the family to provide any level of
-compatibility. Many of the modern RISC architectures refer to this as the
-Architectural Definition. The Architectural Definition is intended to be
-independent of any particular implementation. Additionally, there is a
-feature set which is allowed to vary in a defined way amongst the
-processor models. These feature sets may be defined as Optional in the
-Architectural Definition, be left as implementation defined
-characteristics, or be processor model specific extensions. Support for
-floating point, virtual memory, and low power mode are common Optional
-features included in an Architectural Definition.
-
-The processor family dependent software in RTEMS includes a definition of
-which features are present in each supported processor model. This often
-makes adding support for a new processor model within a supported family
-as simple as determining which features are present in the new processor
-implementation. If the new processor model varies in a way previously
-unaccounted for, then this must be addressed. This could be the result of
-a new Optional feature set being added to the Architectural Definition.
-Alternatively, this particular processor model could have a new and
-different implementation of a feature left as undefined in the
-Architectural Definition. This would require software to be written to
-utilize that feature.
-
-There is a relatively small set of features that may vary in a processor
-family. As the number of processor models in the family grow, the
-addition of each new model only requires adding an entry for the new model
-to the single feature table. It does not require searching for every
-conditional based on processor model and adding the new model in the
-appropriate place. This significantly eases the burden of adding a new
-processor model as it centralizes and logically simplifies the process.
-
-@subsection Boards
-
-Being portable both between models within a processor family and across
-processor families is not enough to address the needs of embedded systems
-developers. Custom board development is the norm for embedded systems.
-Each of these boards is optimized for a particular project. The processor
-and peripheral set have been chosen to meet a particular set of system
-requirements. The tools in the embedded systems developers’ toolbox must
-support their project’s unique board. RTEMS addresses this issue via the
-Board Support Package.
-
-RTEMS segregates board specific code to make it possible for the embedded
-systems developer to easily replace and customize this software. A
-minimal Board Support Package includes device drivers for a clock tick,
-console I/O, and a benchmark timer (optional) as well as startup and
-miscellaneous support code. The Board Support Package for a project may
-be extended to include the device drivers for any peripherals on the
-custom board.
-
-@subsection Applications
-
-One important design goal of RTEMS was to provide a bridge between the
-application software and the target hardware. Most hardware dependencies
-for real-time applications can be localized to the low level device
-drivers which provide an abstracted view of the hardware. The RTEMS I/O
-interface manager provides an efficient tool for incorporating these
-hardware dependencies into the system while simultaneously providing a
-general mechanism to the application code that accesses them. A well
-designed real-time system can benefit from this architecture by building a
-rich library of standard application components which can be used
-repeatedly in other real-time projects. The following figure illustrates
-how RTEMS serves as a buffer between the project dependent application
-code and the target hardware.
-
-@section Coding Issues
-
-XXX deal with this as it applies to score/cpu. Section name may
-be bad.
diff --git a/doc/porting/developtools.t b/doc/porting/developtools.t
deleted file mode 100644
index 7ea3000a2b..0000000000
--- a/doc/porting/developtools.t
+++ /dev/null
@@ -1,26 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Development Tools
-
-When porting RTEMS to a new CPU architecture, one will have to have a
-development environment including compiler, assembler, linker, and
-debugger. The GNU development tool suite used by RTEMS supports most
-modern CPU families. Often all that is required is to add RTEMS
-configurations for the target CPU family. RTEMS targets for the GNU tools
-usually start life as little more than aliases for existing embedded
-configurations. At this point in time, ELF is supported on most of the
-CPU families with a tool target of the form CPU-elf. If this target is
-not supported by all of the GNU tools, then it will be necessary to
-determine the configuration that makes the best starting point regardless
-of the target object format.
-
-Porting and retargetting the GNU tools is beyond the scope of this manual.
-The best advice that can be offered is to look at the existing RTEMS
-targets in the tool source and use that as a guideline.
-
diff --git a/doc/porting/idlethread.t b/doc/porting/idlethread.t
deleted file mode 100644
index 1be8c3595a..0000000000
--- a/doc/porting/idlethread.t
+++ /dev/null
@@ -1,116 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter IDLE Thread
-
-@section Does Idle Thread Have a Floating Point Context?
-
-The setting of the macro CPU_IDLE_TASK_IS_FP is based on the answer to the
-question: Should the IDLE task have a floating point context? If the
-answer to this question is TRUE, then the IDLE task has a floating point
-context associated. This is equivalent to creating a task in the Classic
-API (using rtems_task_create) as a RTEMS_FLOATING_POINT task. If
-CPU_IDLE_TASK_IS_FP is set to TRUE, then a floating point context switch
-occurs when the IDLE task is switched in and out. This adds to the
-execution overhead of the system but is necessary on some ports.
-
-If FALSE, then the IDLE task does not have a floating point context.
-
-NOTE: Setting CPU_IDLE_TASK_IS_FP to TRUE negatively impacts the time
-required to preempt the IDLE task from an interrupt because the floating
-point context must be saved as part of the preemption.
-
-The following illustrates how to set this macro:
-
-@example
-#define CPU_IDLE_TASK_IS_FP FALSE
-@end example
-
-@section CPU Dependent Idle Thread Body
-
-@subsection CPU_PROVIDES_IDLE_THREAD_BODY Macro Setting
-
-The CPU_PROVIDES_IDLE_THREAD_BODY macro setting is based upon the answer
-to the question: Does this port provide a CPU dependent IDLE task
-implementation? If the answer to this question is yes, then the
-CPU_PROVIDES_IDLE_THREAD_BODY macro should be set to TRUE, and the routine
-_CPU_Thread_Idle_body must be provided. This routine overrides the
-default IDLE thread body of _Thread_Idle_body. If the
-CPU_PROVIDES_IDLE_THREAD_BODY macro is set to FALSE, then the generic
-_Thread_Idle_body is the default IDLE thread body for this port.
-Regardless of whether or not a CPU dependent IDLE thread implementation is
-provided, the BSP can still override it.
-
-This is intended to allow for supporting processors which have a low power
-or idle mode. When the IDLE thread is executed, then the CPU can be
-powered down when the processor is idle.
-
-The order of precedence for selecting the IDLE thread body is:
-
-@enumerate
-@item BSP provided
-
-@item CPU dependent (if provided)
-
-@item generic (if no BSP and no CPU dependent)
-
-@end enumerate
-
-The following illustrates setting the CPU_PROVIDES_IDLE_THREAD_BODY macro:
-
-@example
-#define CPU_PROVIDES_IDLE_THREAD_BODY TRUE
-@end example
-
-Implementation details of a CPU model specific IDLE thread body are in the
-next section.
-
-@subsection Idle Thread Body
-
-The _CPU_Thread_Idle_body routine only needs to be provided if the porter
-wishes to include a CPU dependent IDLE thread body. If the port includes
-a CPU dependent implementation of the IDLE thread body, then the
-CPU_PROVIDES_IDLE_THREAD_BODY macro should be defined to TRUE. This
-routine is prototyped as follows:
-
-@example
-void _CPU_Thread_Idle_body( void );
-@end example
-
-As mentioned above, RTEMS does not require that a CPU dependent IDLE
-thread body be provided as part of the port. If
-CPU_PROVIDES_IDLE_THREAD_BODY is defined to FALSE, then the CPU
-independent algorithm is used. This algorithm consists of a "branch to
-self" which is implemented in the XXX routine as follows.
-
-@example
-XXX check name and exact implementation
-void _Thread_Idle_body( void )
-@{
- while( 1 ) ;
-@}
-@end example
-
-If the CPU dependent IDLE thread body is implementation centers upon using
-a "halt", "idle", or "shutdown" instruction, then don't forget to put it
-in an infinite loop as the CPU will have to reexecute this instruction
-each time the IDLE thread is dispatched.
-
-@example
-void _CPU_Thread_Idle_body( void )
-@{
-
- for( ; ; )
- /* insert your "halt" instruction here */ ;
-@}
-@end example
-
-Be warned. Some processors with onboard DMA have been known to stop the
-DMA if the CPU were put in IDLE mode. This might also be a problem with
-other on-chip peripherals. So use this hook with caution.
-
diff --git a/doc/porting/interrupts.t b/doc/porting/interrupts.t
deleted file mode 100644
index e469491d52..0000000000
--- a/doc/porting/interrupts.t
+++ /dev/null
@@ -1,402 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Interrupts
-
-@section Introduction
-
-@section Interrupt Levels
-
-RTEMS is designed assuming that a CPU family has a level associated with
-interrupts. Interrupts below the current interrupt level are masked and
-do not interrupt the CPU until the interrupt level is lowered. This
-design provides for 256 distinct interrupt levels even though most CPU
-implementations support far fewer levels. Interrupt level 0 is assumed to
-map to the hardware settings for all interrupts enabled.
-
-Over the years that RTEMS has been available, there has been much
-discussion on how to handle CPU families which support very few interrupt
-levels such as the i386, PowerPC, and HP-PA RISC. XXX
-
-@subsection Interrupt Level Mask
-
-The CPU_MODES_INTERRUPT_MASK macro defines the number of bits actually used in the interrupt field of the task mode. How those bits map to the CPU interrupt levels is defined by the routine _CPU_ISR_Set_level().
-
-The following illustrates how the CPU_MODES_INTERRUPT_MASK is set on a CPU
-family like the Intel i386 where the CPU itself only recognizes two
-interrupt levels - enabled and disabled.
-
-@example
-#define CPU_MODES_INTERRUPT_MASK 0x00000001
-@end example
-
-
-@subsection Obtaining the Current Interrupt Level
-
-The _CPU_ISR_Get_level function returns the current interrupt level.
-
-@example
-unsigned32 _CPU_ISR_Get_level( void )
-@end example
-
-@subsection Set the Interrupt Level
-
-The _CPU_ISR_Set_level routine maps the interrupt level in the Classic API
-task mode onto the hardware that the CPU actually provides. Currently,
-interrupt levels that do not map onto the CPU in a generic fashion are
-undefined. Someday, it would be nice if these were "mapped" by the
-application via a callout. For example, the Motorola m68k has 8 levels 0
-- 7, and levels 8 - 255 are currently undefined. Levels 8 - 255 would be
-available for bsp/application specific meaning. This could be used to
-manage a programmable interrupt controller via the rtems_task_mode
-directive.
-
-The following is a dummy implementation of the _CPU_ISR_Set_level routine:
-
-@example
-#define _CPU_ISR_Set_level( new_level ) \
- @{ \
- @}
-@end example
-
-The following is the implementation from the Motorola M68K:
-
-@example
-XXX insert m68k implementation here
-@end example
-
-
-@subsection Disable Interrupts
-
-The _CPU_ISR_Disable routine disable all external interrupts. It returns
-the previous interrupt level in the single parameter _isr_cookie. This
-routine is used to disable interrupts during a critical section in the
-RTEMS executive. Great care is taken inside the executive to ensure that
-interrupts are disabled for a minimum length of time. It is important to
-note that the way the previous level is returned forces the implementation
-to be a macro that translates to either inline assembly language or a
-function call whose return value is placed into _isr_cookie.
-
-It is important for the porter to realize that the value of _isr_cookie
-has no defined meaning except that it is the most convenient format for
-the _CPU_ISR_Disable, _CPU_ISR_Enable, and _CPU_ISR_Disable routines to
-manipulate. It is typically the contents of the processor status
-register. It is NOT the same format as manipulated by the
-_CPU_ISR_Get_level and _CPU_ISR_Set_level routines. The following is a
-dummy implementation that simply sets the previous level to 0.
-
-@example
-#define _CPU_ISR_Disable( _isr_cookie ) \
- @{ \
- (_isr_cookie) = 0; /* do something to prevent warnings */ \
- @}
-@end example
-
-The following is the implementation from the Motorola M68K port:
-
-@example
-XXX insert m68k port here
-@end example
-
-@subsection Enable Interrupts
-
-The _CPU_ISR_Enable routines enables interrupts to the previous level
-(returned by _CPU_ISR_Disable). This routine is invoked at the end of an
-RTEMS critical section to reenable interrupts. The parameter _level is
-not modified but indicates that level that interrupts should be enabled
-to. The following illustrates a dummy implementation of the
-_CPU_ISR_Enable routine:
-
-@example
-#define _CPU_ISR_Enable( _isr_cookie ) \
- @{ \
- @}
-@end example
-
-The following is the implementation from the Motorola M68K port:
-
-@example
-XXX insert m68k version here
-@end example
-
-
-@subsection Flash Interrupts
-
-The _CPU_ISR_Flash routine temporarily restores the interrupt to _level
-before immediately disabling them again. This is used to divide long
-RTEMS critical sections into two or more parts. This routine is always
-preceded by a call to _CPU_ISR_Disable and followed by a call to
-_CPU_ISR_Enable. The parameter _level is not modified.
-
-The following is a dummy implementation of the _CPU_ISR_Flash routine:
-
-@example
-#define _CPU_ISR_Flash( _isr_cookie ) \
- @{ \
- @}
-@end example
-
-The following is the implementation from the Motorola M68K port:
-
-@example
-XXX insert m68k version here
-@end example
-
-
-@section Interrupt Stack Management
-
-@subsection Hardware or Software Managed Interrupt Stack
-
-The setting of the CPU_HAS_SOFTWARE_INTERRUPT_STACK indicates whether the
-interrupt stack is managed by RTEMS in software or the CPU has direct
-support for an interrupt stack. If RTEMS is to manage a dedicated
-interrupt stack in software, then this macro should be set to TRUE and the
-memory for the software managed interrupt stack is allocated in
-_Interrupt_Manager_initialization. If this macro is set to FALSE, then
-RTEMS assumes that the hardware managed interrupt stack is supported by
-this CPU. If the CPU has a hardware managed interrupt stack, then the
-porter has the option of letting the BSP allcoate and initialize the
-interrupt stack or letting RTEMS do this. If RTEMS is to allocate the
-memory for the interrupt stack, then the macro
-CPU_ALLOCATE_INTERRUPT_STACK should be set to TRUE. If this macro is set
-to FALSE, then it is the responsibility of the BSP to allocate the memory
-for this stack and initialize it.
-
-If the CPU does not support a dedicated interrupt stack, then the porter
-has two options: (1) execute interrupts on the stack of the interrupted
-task, and (2) have RTEMS manage a dedicated interrupt stack.
-
-NOTE: If CPU_HAS_SOFTWARE_INTERRUPT_STACK is TRUE, then the macro
-CPU_ALLOCATE_INTERRUPT_STACK should also be set to TRUE.
-
-Only one of CPU_HAS_SOFTWARE_INTERRUPT_STACK and
-CPU_HAS_HARDWARE_INTERRUPT_STACK should be set to TRUE. It is possible
-that both are FALSE for a particular CPU. Although it is unclear what
-that would imply about the interrupt processing procedure on that CPU.
-
-@subsection Allocation of Interrupt Stack Memory
-
-Whether or not the interrupt stack is hardware or software managed, RTEMS
-may allocate memory for the interrupt stack from the Executive Workspace.
-If RTEMS is going to allocate the memory for a dedicated interrupt stack
-in the Interrupt Manager, then the macro CPU_ALLOCATE_INTERRUPT_STACK
-should be set to TRUE.
-
-NOTE: This should be TRUE is CPU_HAS_SOFTWARE_INTERRUPT_STACK is TRUE.
-
-@example
-#define CPU_ALLOCATE_INTERRUPT_STACK TRUE
-@end example
-
-If the CPU_HAS_SOFTWARE_INTERRUPT_STACK macro is set to TRUE, then RTEMS automatically allocates the stack memory in the initialization of the Interrupt Manager and the switch to that stack is performed in _ISR_Handler on the outermost interrupt. The _CPU_Interrupt_stack_low and _CPU_Interrupt_stack_high variables contain the addresses of the the lowest and highest addresses of the memory allocated for the interrupt stack. Although technically only one of these addresses is required to switch to the interrupt stack, by always providing both addresses, the port has more options avaialble to it without requiring modifications to the portable parts of the executive. Whether the stack grows up or down, this give the CPU dependent code the option of picking the version it wants to use.
-
-@example
-SCORE_EXTERN void *_CPU_Interrupt_stack_low;
-SCORE_EXTERN void *_CPU_Interrupt_stack_high;
-@end example
-
-NOTE: These two variables are required if the macro
-CPU_HAS_SOFTWARE_INTERRUPT_STACK is defined as TRUE.
-
-@subsection Install the Interrupt Stack
-
-The _CPU_Install_interrupt_stack routine XXX
-
-This routine installs the hardware interrupt stack pointer.
-
-NOTE: It need only be provided if CPU_HAS_HARDWARE_INTERRUPT_STAC is TRUE.
-
-@example
-void _CPU_Install_interrupt_stack( void )
-@end example
-
-
-@section ISR Installation
-
-@subsection Install a Raw Interrupt Handler
-
-The _CPU_ISR_install_raw_handler XXX
-
-@example
-void _CPU_ISR_install_raw_handler(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-)
-@end example
-
-This is where we install the interrupt handler into the "raw" interrupt
-table used by the CPU to dispatch interrupt handlers.
-
-@subsection Interrupt Context
-
-@subsection Maximum Number of Vectors
-
-There are two related macros used to defines the number of entries in the
-_ISR_Vector_table managed by RTEMS. The macro
-CPU_INTERRUPT_NUMBER_OF_VECTORS is the actual number of vectors supported
-by this CPU model. The second macro is the
-CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER. Since the table is zero-based, this
-indicates the highest vector number which can be looked up in the table
-and mapped into a user provided handler.
-
-@example
-#define CPU_INTERRUPT_NUMBER_OF_VECTORS 32
-#define CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER \
- (CPU_INTERRUPT_NUMBER_OF_VECTORS - 1)
-@end example
-
-
-@subsection Install RTEMS Interrupt Handler
-
-The _CPU_ISR_install_vector routine installs the RTEMS handler for the
-specified vector.
-
-XXX Input parameters:
-vector - interrupt vector number
-old_handler - former ISR for this vector number
-new_handler - replacement ISR for this vector number
-
-@example
-void _CPU_ISR_install_vector(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-)
-@end example
-
-@example
-*old_handler = _ISR_Vector_table[ vector ];
-@end example
-
-If the interrupt vector table is a table of pointer to isr entry points,
-then we need to install the appropriate RTEMS interrupt handler for this
-vector number.
-
-@example
-_CPU_ISR_install_raw_handler( vector, new_handler, old_handler );
-@end example
-
-We put the actual user ISR address in _ISR_vector_table. This will be
-used by the _ISR_Handler so the user gets control.
-
-@example
-_ISR_Vector_table[ vector ] = new_handler;
-@end example
-
-@section Interrupt Processing
-
-@subsection Interrupt Frame Data Structure
-
-When an interrupt occurs, it is the responsibility of the interrupt
-dispatching software to save the context of the processor such that an ISR
-written in a high-level language (typically C) can be invoked without
-damaging the state of the task that was interrupted. In general, this
-results in the saving of registers which are NOT preserved across
-subroutine calls as well as any special interrupt state. A port should
-define the CPU_Interrupt_frame structure so that application code can
-examine the saved state.
-
-@example
-typedef struct @{
- unsigned32 not_preserved_register_1;
- unsigned32 special_interrupt_register;
-@} CPU_Interrupt_frame;
-@end example
-
-
-@subsection Interrupt Dispatching
-
-The _ISR_Handler routine provides the RTEMS interrupt management.
-
-@example
-void _ISR_Handler()
-@end example
-
-This discussion ignores a lot of the ugly details in a real implementation
-such as saving enough registers/state to be able to do something real.
-Keep in mind that the goal is to invoke a user's ISR handler which is
-written in C. That ISR handler uses a known set of registers thus
-allowing the ISR to preserve only those that would normally be corrupted
-by a subroutine call.
-
-Also note that the exact order is to a large extent flexible. Hardware
-will dictate a sequence for a certain subset of _ISR_Handler while
-requirements for setting the RTEMS state variables that indicate the
-interrupt nest level (XX) and dispatching disable level (XXX) will also
-restrict the allowable order.
-
-Upon entry to the "common" _ISR_Handler, the vector number must be
-available. On some CPUs the hardware puts either the vector number or the
-offset into the vector table for this ISR in a known place. If the
-hardware does not provide this information, then the assembly portion of
-RTEMS for this port will contain a set of distinct interrupt entry points
-which somehow place the vector number in a known place (which is safe if
-another interrupt nests this one) and branches to _ISR_Handler.
-
-@example
-save some or all context on stack
-may need to save some special interrupt information for exit
-
-#if ( CPU_HAS_SOFTWARE_INTERRUPT_STACK == TRUE )
- if ( _ISR_Nest_level == 0 )
- switch to software interrupt stack
-#endif
-_ISR_Nest_level++;
-_Thread_Dispatch_disable_level++;
-(*_ISR_Vector_table[ vector ])( vector );
---_ISR_Nest_level;
-if ( _ISR_Nest_level )
- goto the label "exit interrupt (simple case)"
-#if ( CPU_HAS_SOFTWARE_INTERRUPT_STACK == TRUE )
- restore stack
-#endif
-
-if ( !_Context_Switch_necessary )
- goto the label "exit interrupt (simple case)"
-
-if ( !_ISR_Signals_to_thread_executing )
- _ISR_Signals_to_thread_executing = FALSE;
- goto the label "exit interrupt (simple case)"
-
-call _Thread_Dispatch() or prepare to return to _ISR_Dispatch
-prepare to get out of interrupt
-return from interrupt (maybe to _ISR_Dispatch)
-
-LABEL "exit interrupt (simple case):
- prepare to get out of interrupt
- return from interrupt
-@end example
-
-@subsection ISR Invoked with Frame Pointer
-
-Does the RTEMS invoke the user's ISR with the vector number and a pointer
-to the saved interrupt frame (1) or just the vector number (0)?
-
-@example
-#define CPU_ISR_PASSES_FRAME_POINTER 0
-@end example
-
-NOTE: It is desirable to include a pointer to the interrupt stack frame as
-an argument to the interrupt service routine. Eventually, it would be
-nice if all ports included this parameter.
-
-@subsection Pointer to _Thread_Dispatch Routine
-
-With some compilation systems, it is difficult if not impossible to call a
-high-level language routine from assembly language. This is especially
-true of commercial Ada compilers and name mangling C++ ones. This
-variable can be optionally defined by the CPU porter and contains the
-address of the routine _Thread_Dispatch. This can make it easier to
-invoke that routine at the end of the interrupt sequence (if a dispatch is
-necessary).
-
-@example
-void (*_CPU_Thread_dispatch_pointer)();
-@end example
-
diff --git a/doc/porting/miscellaneous.t b/doc/porting/miscellaneous.t
deleted file mode 100644
index edac46e346..0000000000
--- a/doc/porting/miscellaneous.t
+++ /dev/null
@@ -1,170 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Miscellaneous
-
-@section Fatal Error Default Handler
-
-The _CPU_Fatal_halt routine is the default fatal error handler. This
-routine copies _error into a known place -- typically a stack location or
-a register, optionally disables interrupts, and halts/stops the CPU. It
-is prototyped as follows and is often implemented as a macro:
-
-@example
-void _CPU_Fatal_halt(
- unsigned32 _error
-);
-@end example
-
-@section Processor Endianness
-
-Endianness refers to the order in which numeric values are stored in
-memory by the microprocessor. Big endian architectures store the most
-significant byte of a multi-byte numeric value in the byte with the lowest
-address. This results in the hexadecimal value 0x12345678 being stored as
-0x12345678 with 0x12 in the byte at offset zero, 0x34 in the byte at
-offset one, etc.. The Motorola M68K and numerous RISC processor families
-is big endian. Conversely, little endian architectures store the least
-significant byte of a multi-byte numeric value in the byte with the lowest
-address. This results in the hexadecimal value 0x12345678 being stored as
-0x78563412 with 0x78 in the byte at offset zero, 0x56 in the byte at
-offset one, etc.. The Intel ix86 family is little endian.
-Interestingly, some CPU models within the PowerPC and MIPS architectures
-can be switched between big and little endian modes. Most embedded
-systems use these families strictly in big endian mode.
-
-RTEMS must be informed of the byte ordering for this microprocessor family
-and, optionally, endian conversion routines may be provided as part of the
-port. Conversion between endian formats is often necessary in
-multiprocessor environments and sometimes needed when interfacing with
-peripheral controllers.
-
-@subsection Specifying Processor Endianness
-
-The CPU_BIG_ENDIAN and CPU_LITTLE_ENDIAN are set to specify the endian
-format used by this microprocessor. These macros should not be set to the
-same value. The following example illustrates how these macros should be
-set on a processor family that is big endian.
-
-@example
-#define CPU_BIG_ENDIAN TRUE
-#define CPU_LITTLE_ENDIAN FALSE
-@end example
-
-@subsection Optional Endian Conversion Routines
-
-In a networked environment, each program communicating must agree on the
-format of data passed between the various systems in the networked
-application. Routines such as ntohl() and htonl() are used to convert
-between the common network format and the native format used on this
-particular host system. Although RTEMS has a portable implementation of
-these endian conversion routines, it is often possible to implement these
-routines more efficiently in a processor specific fashion.
-
-The CPU_HAS_OWN_HOST_TO_NETWORK_ROUTINES is set to TRUE when the port
-provides its own implementation of the network to host and host to network
-family of routines. This set of routines include the following:
-
-@itemize @bullet
-@item XXX list of routines in bullets
-@end itemize
-
-The following example illustrates how this macro should be set when the
-generic, portable implementation of this family of routines is to be used
-by this port:
-
-@example
-#define CPU_HAS_OWN_HOST_TO_NETWORK_ROUTINES FALSE
-@end example
-
-@section Extra Stack for MPCI Receive Thread
-
-The CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK macro is set to the amount of
-stack space above the minimum thread stack space required by the MPCI
-Receive Server Thread. This macro is needed because in a multiprocessor
-system the MPCI Receive Server Thread must be able to process all
-directives.
-
-@example
-#define CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK 0
-@end example
-
-@subsection Endian Swap Unsigned Integers
-
-The port should provide routines to swap sixteen (CPU_swap_u16) and
-thirty-bit (CPU_swap_u32) unsigned integers. These are primarily used in
-two areas of RTEMS - multiprocessing support and the network endian swap
-routines. The CPU_swap_u32 routine must be implemented as a static
-routine rather than a macro because its address is taken and used
-indirectly. On the other hand, the CPU_swap_u16 routine may be
-implemented as a macro.
-
-Some CPUs have special instructions that swap a 32-bit quantity in a
-single instruction (e.g. i486). It is probably best to avoid an "endian
-swapping control bit" in the CPU. One good reason is that interrupts
-would probably have to be disabled to insure that an interrupt does not
-try to access the same "chunk" with the wrong endian. Another good reason
-is that on some CPUs, the endian bit endianness for ALL fetches -- both
-code and data -- so the code will be fetched incorrectly.
-
-The following is an implementation of the CPU_swap_u32 routine that will
-work on any CPU. It operates by breaking the unsigned thirty-two bit
-integer into four byte-wide quantities and reassemblying them.
-
-@example
-static inline unsigned int CPU_swap_u32(
- unsigned int value
-)
-@{
- unsigned32 byte1, byte2, byte3, byte4, swapped;
-
- byte4 = (value >> 24) & 0xff;
- byte3 = (value >> 16) & 0xff;
- byte2 = (value >> 8) & 0xff;
- byte1 = value & 0xff;
-
- swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
- return( swapped );
-@}
-@end example
-
-Although the above implementation is portable, it is not particularly
-efficient. So if there is a better way to implement this on a particular
-CPU family or model, please do so. The efficiency of this routine has
-significant impact on the efficiency of the multiprocessing support code
-in the shared memory driver and in network applications using the ntohl()
-family of routines.
-
-Most microprocessor families have rotate instructions which can be used to
-greatly improve the CPU_swap_u32 routine. The most common way to do this
-is to:
-
-@example
-swap least significant two bytes with 16-bit rotate
-swap upper and lower 16-bits
-swap most significant two bytes with 16-bit rotate
-@end example
-
-Some CPUs have special instructions that swap a 32-bit quantity in a
-single instruction (e.g. i486). It is probably best to avoid an "endian
-swapping control bit" in the CPU. One good reason is that interrupts
-would probably have to be disabled to insure that an interrupt does not
-try to access the same "chunk" with the wrong endian. Another good reason
-is that on some CPUs, the endian bit endianness for ALL fetches -- both
-code and data -- so the code will be fetched incorrectly.
-
-Similarly, here is a portable implementation of the CPU_swap_u16 routine.
-Just as with the CPU_swap_u32 routine, the porter should provide a better
-implementation if possible.
-
-@example
-#define CPU_swap_u16( value ) \
- (((value&0xff) << 8) | ((value >> 8)&0xff))
-@end example
-
-
diff --git a/doc/porting/porting.texi b/doc/porting/porting.texi
deleted file mode 100644
index 13969006a7..0000000000
--- a/doc/porting/porting.texi
+++ /dev/null
@@ -1,139 +0,0 @@
-\input texinfo @c -*-texinfo-*-
-@c %**start of header
-@setfilename porting
-@syncodeindex vr fn
-@synindex ky cp
-@paragraphindent 0
-@c @smallbook
-@c %**end of header
-
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@c
-@c Master file for the Porting Guide
-@c
-
-@c Joel's Questions
-@c
-@c 1. Why does paragraphindent only impact makeinfo?
-@c 2. Why does paragraphindent show up in HTML?
-@c
-
-@include ../common/setup.texi
-
-@ignore
-@ifinfo
-@format
-START-INFO-DIR-ENTRY
-* RTEMS Porting Guide: (porting). The Porting Guide
-END-INFO-DIR-ENTRY
-@end format
-@end ifinfo
-@end ignore
-
-@c variable substitution info:
-@c
-@set is-C
-@clear is-Ada
-@set LANGUAGE C
-@set STRUCTURE structure
-@set ROUTINE function
-@set OR |
-@set RPREFIX RTEMS_
-@set DIRPREFIX rtems_
-@c the language is @value{LANGUAGE}
-@c NOTE: don't use underscore in the name
-@c
-
-@c
-@c Title Page Stuff
-@c
-
-@set edition @value{RTEMS-EDITION}
-@set version @value{RTEMS-VERSION}
-@set update-date @value{RTEMS-UPDATE-DATE}
-@set update-month @value{RTEMS-UPDATE-MONTH}
-
-@c
-@c I don't really like having a short title page. --joel
-@c
-@c @shorttitlepage RTEMS Porting Guide
-
-@setchapternewpage odd
-@settitle RTEMS Porting Guide
-@titlepage
-@finalout
-
-@title RTEMS Porting Guide
-@subtitle Edition @value{edition}, for RTEMS @value{version}
-@sp 1
-@subtitle @value{update-month}
-@author On-Line Applications Research Corporation
-@page
-@include ../common/cpright.texi
-@end titlepage
-
-@c This prevents a black box from being printed on "overflow" lines.
-@c The alternative is to rework a sentence to avoid this problem.
-
-@include preface.texi
-@include developtools.texi
-@include sourcecode.texi
-@include cpumodels.texi
-@include cpuinit.texi
-@include interrupts.texi
-@include taskcontext.texi
-@include idlethread.texi
-@include prioritybitmap.texi
-@include codetuning.texi
-@include miscellaneous.texi
-@ifinfo
-@node Top, Preface, (dir), (dir)
-@top porting
-
-This is the online version of the RTEMS Porting Guide.
-
-@menu
-* Preface::
-* Development Tools::
-* Source Code Organization::
-* CPU Model Variations::
-* CPU Initialization::
-* Interrupts::
-* Task Context Management::
-* IDLE Thread::
-* Priority Bitmap Manipulation::
-* Code Tuning Parameters::
-* Miscellaneous::
-* Command and Variable Index::
-* Concept Index::
-@end menu
-
-@end ifinfo
-@c
-@c
-@c Need to copy the emacs stuff and "trailer stuff" (index, toc) into here
-@c
-
-@node Command and Variable Index, Concept Index, Miscellaneous Endian Swap Unsigned Integers, Top
-@unnumbered Command and Variable Index
-
-There are currently no Command and Variable Index entries.
-
-@c @printindex fn
-
-@node Concept Index, , Command and Variable Index, Top
-@unnumbered Concept Index
-
-There are currently no Concept Index entries.
-@c @printindex cp
-
-@contents
-@bye
-
diff --git a/doc/porting/preface.texi b/doc/porting/preface.texi
deleted file mode 100644
index 91274c5ec5..0000000000
--- a/doc/porting/preface.texi
+++ /dev/null
@@ -1,42 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@ifinfo
-@node Preface, Development Tools, Top, Top
-@end ifinfo
-@unnumbered Preface
-
-The purpose of this manual is to provide a roadmap to those people porting
-RTEMS to a new CPU family. This process includes a variety of activities
-including the following:
-
-@itemize @bullet
-
-@item targeting the GNU development tools
-
-@item porting the RTEMS executive code
-
-@item developing a Board Support Package
-
-@item writing an RTEMS CPU Supplement manual for the completed port.
-
-@end itemize
-
-This document focuses on the process of actually porting the RTEMS
-executive code proper. Each of the data structures, routines, and macro
-definitions required of a port of RTEMS is described in this document.
-
-Porting any operating system, including RTEMS, requires knowledge of the
-operating system, target CPU architecture, and debug environment. It is
-very desirable to have a CPU simulator or hardware emulator when debugging
-the port. This manual assumes that the user is familiar with building and
-using RTEMS, the C programming language, and the target CPU architecture.
-It is desirable to be familiar with the assembly language for the target
-CPU family but since only a limited amount of assembly is required to port
-RTEMS.
-
diff --git a/doc/porting/prioritybitmap.t b/doc/porting/prioritybitmap.t
deleted file mode 100644
index b4a6a92f90..0000000000
--- a/doc/porting/prioritybitmap.t
+++ /dev/null
@@ -1,166 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Priority Bitmap Manipulation
-
-@section Introduction
-
-The RTEMS chain of ready tasks is implemented as an array of FIFOs with
-each priority having its own FIFO. This makes it very efficient to
-determine the first and last ready task at each priority. In addition,
-blocking a task only requires appending the task to the end of the FIFO
-for its priority rather than a lengthy search down a single chain of all
-ready tasks. This works extremely well except for one problem. When the
-currently executing task blocks, there may be no easy way to determine
-what is the next most important ready task. If the blocking task was the
-only ready task at its priority, then RTEMS must search all of the FIFOs
-in the ready chain to determine the highest priority with a ready task.
-
-RTEMS uses a bitmap array to efficiently solve this problem. The state of
-each bit in the priority map bit array indicates whether or not there is a
-ready task at that priority. The bit array can be efficiently searched to
-determine the highest priority ready task. This family of data type and
-routines is used to maintain and search the bit map array.
-
-@section _Priority_Bit_map_control Type
-
-The _Priority_Bit_map_Control type is the fundamental data type of the
-priority bit map array used to determine which priorities have ready
-tasks. This type may be either 16 or 32 bits wide although only the 16
-least significant bits will be used. The data type is based upon what is
-the most efficient type for this CPU to manipulate. For example, some
-CPUs have bit scan instructions that only operate on a particular size of
-data. In this case, this type will probably be defined to work with this
-instruction.
-
-@section Find First Bit Routine
-
-The _CPU_Bitfield_Find_first_bit routine sets _output to the bit number of
-the first bit set in _value. _value is of CPU dependent type
-Priority_Bit_map_control. A stub version of this routine is as follows:
-
-@example
-#define _CPU_Bitfield_Find_first_bit( _value, _output ) \
- @{ \
- (_output) = 0; /* do something to prevent warnings */ \
- @}
-@end example
-
-There are a number of variables in using a "find first bit" type
-instruction.
-
-@enumerate
-
-@item What happens when run on a value of zero?
-
-@item Bits may be numbered from MSB to LSB or vice-versa.
-
-@item The numbering may be zero or one based.
-
-@item The "find first bit" instruction may search from MSB or LSB.
-
-@end enumerate
-
-RTEMS guarantees that (1) will never happen so it is not a concern.
-Cases (2),(3), (4) are handled by the macros _CPU_Priority_mask() and
-_CPU_Priority_bits_index(). These three form a set of routines which must
-logically operate together. Bits in the _value are set and cleared based
-on masks built by CPU_Priority_mask(). The basic major and minor values
-calculated by _Priority_Major() and _Priority_Minor() are "massaged" by
-_CPU_Priority_bits_index() to properly range between the values returned
-by the "find first bit" instruction. This makes it possible for
-_Priority_Get_highest() to calculate the major and directly index into the
-minor table. This mapping is necessary to ensure that 0 (a high priority
-major/minor) is the first bit found.
-
-This entire "find first bit" and mapping process depends heavily on the
-manner in which a priority is broken into a major and minor components
-with the major being the 4 MSB of a priority and minor the 4 LSB. Thus (0
-<< 4) + 0 corresponds to priority 0 -- the highest priority. And (15 <<
-4) + 14 corresponds to priority 254 -- the next to the lowest priority.
-
-If your CPU does not have a "find first bit" instruction, then there are
-ways to make do without it. Here are a handful of ways to implement this
-in software:
-
-@itemize @bullet
-
-@item a series of 16 bit test instructions
-
-@item a "binary search using if's"
-
-@item the following algorithm based upon a 16 entry lookup table. In this pseudo-code, bit_set_table[16] has values which indicate the first bit set:
-
-@example
-_number = 0 if _value > 0x00ff
- _value >>=8
- _number = 8;
- if _value > 0x0000f
- _value >=8
- _number += 4
-
-_number += bit_set_table[ _value ]
-@end example
-
-@end itemize
-
-The following illustrates how the CPU_USE_GENERIC_BITFIELD_CODE macro may
-be so the port can use the generic implementation of this bitfield code.
-This can be used temporarily during the porting process to avoid writing
-these routines until the end. This results in a functional although lower
-performance port. This is perfectly acceptable during development and
-testing phases.
-
-@example
-#define CPU_USE_GENERIC_BITFIELD_CODE TRUE
-#define CPU_USE_GENERIC_BITFIELD_DATA TRUE
-@end example
-
-Eventually, CPU specific implementations of these routines are usually
-written since they dramatically impact the performance of blocking
-operations. However they may take advantage of instructions which are not
-available on all models in the CPU family. In this case, one might find
-something like this stub example did:
-
-@example
-#if (CPU_USE_GENERIC_BITFIELD_CODE == FALSE)
-#define _CPU_Bitfield_Find_first_bit( _value, _output ) \
- @{ \
- (_output) = 0; /* do something to prevent warnings */ \
- @}
-#endif
-@end example
-
-@section Build Bit Field Mask
-
-The _CPU_Priority_Mask routine builds the mask that corresponds to the bit
-fields searched by _CPU_Bitfield_Find_first_bit(). See the discussion of
-that routine for more details.
-
-The following is a typical implementation when the
-_CPU_Bitfield_Find_first_bit searches for the most significant bit set:
-
-@example
-#if (CPU_USE_GENERIC_BITFIELD_CODE == FALSE)
-#define _CPU_Priority_Mask( _bit_number ) \
- ( 1 << (_bit_number) )
-#endif
-@end example
-
-@section Bit Scan Support
-
-The _CPU_Priority_bits_index routine translates the bit numbers returned by _CPU_Bitfield_Find_first_bit() into something suitable for use as a major or minor component of a priority. For example, the find first bit routine may number the bits in a way that is difficult to map into the major and minor components of the priority. This routine allows that unwieldy form to be converted into something easier to process. See the discussion of that routine for more details.
-
-@example
-#if (CPU_USE_GENERIC_BITFIELD_CODE == FALSE)
-#define _CPU_Priority_bits_index( _priority ) \
- (_priority)
-#endif
-@end example
-
-
diff --git a/doc/porting/sourcecode.t b/doc/porting/sourcecode.t
deleted file mode 100644
index 29365e8d68..0000000000
--- a/doc/porting/sourcecode.t
+++ /dev/null
@@ -1,23 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Source Code Organization
-
-This section describes the organization of the source code within RTEMS
-that is CPU family and CPU model dependent.
-
-@section Introduction
-
-The CPU family dependent files associated with a port of the RTEMS
-executive code proper to a particular processor family are found in
-c/src/exec/score/cpu. Support code for this port as well as processor
-dependent code which may be reused across multiple Board Support Packages
-is found in c/src/lib/libcpu.
-
-XXX list the files and directories here
-
diff --git a/doc/porting/taskcontext.t b/doc/porting/taskcontext.t
deleted file mode 100644
index 57f83b5caa..0000000000
--- a/doc/porting/taskcontext.t
+++ /dev/null
@@ -1,476 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Task Context Management
-
-@section Introduction
-
-XXX
-
-@section Task Stacks
-
-XXX
-
-@subsection Direction of Stack Growth
-
-The CPU_STACK_GROWS_UP macro is set based upon the answer to the following
-question: Does the stack grow up (toward higher addresses) or down (toward
-lower addresses)? If the stack grows upward in memory, then this macro
-should be set to TRUE. Otherwise, it should be set to FALSE to indicate
-that the stack grows downward toward smaller addresses.
-
-The following illustrates how the CPU_STACK_GROWS_UP macro is set:
-
-@example
-#define CPU_STACK_GROWS_UP TRUE
-@end example
-
-@subsection Minimum Task Stack Size
-
-The CPU_STACK_MINIMUM_SIZE macro should be set to the minimum size of each
-task stack. This size is specified as the number of bytes. This minimum
-stack size should be large enough to run all RTEMS tests. The minimum
-stack size is chosen such that a "reasonable" small application should not
-have any problems. Choosing a minimum stack size that is too small will
-result in the RTEMS tests "blowing" their stack and not executing
-properly.
-
-There are many reasons a task could require a stack size larger than the
-minimum. For example, a task could have a very deep call path or declare
-large data structures on the stack. Tasks which utilize C++ exceptions
-tend to require larger stacks as do Ada tasks.
-
-The following illustrates setting the minimum stack size to 4 kilobytes
-per task.
-
-@example
-#define CPU_STACK_MINIMUM_SIZE (1024*4)
-@end example
-
-@subsection Stack Alignment Requirements
-
-The CPU_STACK_ALIGNMENT macro is set to indicate the byte alignment
-requirement for the stack. This alignment requirement may be stricter
-than that for the data types alignment specified by CPU_ALIGNMENT. If the
-CPU_ALIGNMENT is strict enough for the stack, then this should be set to
-0.
-
-The following illustrates how the CPU_STACK_ALIGNMENT macro should be set
-when there are no special requirements:
-
-@example
-#define CPU_STACK_ALIGNMENT 0
-@end example
-
-NOTE: This must be a power of 2 either 0 or greater than CPU_ALIGNMENT. [XXX is this true?]
-
-@section Task Context
-
-Associated with each task is a context that distinguishes it from other
-tasks in the system and logically gives it its own scratch pad area for
-computations. In addition, when an interrupt occurs some processor
-context information must be saved and restored. This is managed in RTEMS
-as three items:
-
-@itemize @bullet
-
-@item Basic task level context (e.g. the Context_Control structure)
-
-@item Floating point task context (e.g. Context_Control_fp structure)
-
-@item Interrupt level context (e.g. the Context_Control_interrupt
-structure)
-
-@end itemize
-
-The integer and floating point context structures and the routines that
-manipulate them are discussed in detail in this section, while the
-interrupt level context structure is discussed in the XXX.
-
-Additionally, if the GNU debugger gdb is to be made aware of RTEMS tasks
-for this CPU, then care should be used in designing the context area.
-
-@example
-typedef struct @{
- unsigned32 special_interrupt_register;
-@} CPU_Interrupt_frame;
-@end example
-
-
-@subsection Basic Context Data Structure
-
-The Context_Control data structure contains the basic integer context of a
-task. In addition, this context area contains stack and frame pointers,
-processor status register(s), and any other registers that are normally
-altered by compiler generated code. In addition, this context must
-contain the processor interrupt level since the processor interrupt level
-is maintained on a per-task basis. This is necessary to support the
-interrupt level portion of the task mode as provided by the Classic RTEMS
-API.
-
-On some processors, it is cost-effective to save only the callee preserved
-registers during a task context switch. This means that the ISR code
-needs to save those registers which do not persist across function calls.
-It is not mandatory to make this distinctions between the caller/callee
-saves registers for the purpose of minimizing context saved during task
-switch and on interrupts. If the cost of saving extra registers is
-minimal, simplicity is the choice. Save the same context on interrupt
-entry as for tasks in this case.
-
-The Context_Control data structure should be defined such that the order
-of elements results in the simplest, most efficient implementation of XXX.
-A typical implementation starts with a definition such as the following:
-
-@example
-typedef struct @{
- unsigned32 some_integer_register;
- unsigned32 another_integer_register;
- unsigned32 some_system_register;
-@} Context_Control;
-@end example
-
-@subsection Initializing a Context
-
-The _CPU_Context_Initialize routine initializes the context to a state
-suitable for starting a task after a context restore operation.
-Generally, this involves:
-
-@itemize @bullet
-
-@item setting a starting address,
-
-@item preparing the stack,
-
-@item preparing the stack and frame pointers,
-
-@item setting the proper interrupt level in the context, and
-
-@item initializing the floating point context
-
-@end itemize
-
-This routine generally does not set any unnecessary register in the
-context. The state of the "general data" registers is undefined at task
-start time. The _CPU_Context_initialize routine is prototyped as follows:
-
-@example
-void _CPU_Context_Initialize(
- Context_Control *_the_context,
- void *_stack_base,
- unsigned32 _size,
- unsigned32 _isr,
- void *_entry_point,
- unsigned32 _is_fp
-);
-@end example
-
-This is_fp parameter is TRUE if the thread is to be a floating point
-thread. This is typically only used on CPUs where the FPU may be easily
-disabled by software such as on the SPARC where the PSR contains an enable
-FPU bit. The use of an FPU enable bit allows RTEMS to ensure that a
-non-floating point task is unable to access the FPU. This guarantees that
-a deferred floating point context switch is safe.
-
-XXX explain other parameters and check prototype
-
-@subsection Performing a Context Switch
-
-The _CPU_Context_switch performs a normal non-FP context switch from the
-context of the current executing thread to the context of the heir thread.
-
-@example
-void _CPU_Context_switch(
- Context_Control *run,
- Context_Control *heir
-);
-@end example
-
-@subsection Restoring a Context
-
-The _CPU_Context_restore routine is generally used only to restart the
-currently executing thread (i.e. self) in an efficient manner. In many
-ports, it can simply be a label in _CPU_Context_switch. It may be
-unnecessary to reload some registers.
-
-@example
-void _CPU_Context_restore(
- Context_Control *new_context
-);
-@end example
-
-@subsection Restarting the Currently Executing Task
-
-The _CPU_Context_Restart_self is responsible for somehow restarting the
-currently executing task. If you are lucky when porting RTEMS, then all
-that is necessary is restoring the context. Otherwise, there will need to
-be a routine that does something special in this case. Performing a
-_CPU_Context_Restore on the currently executing task after reinitializing
-that context should work on most ports. It will not work if restarting
-self conflicts with the stack frame assumptions of restoring a context.
-
-The following is an implementation of _CPU_Context_Restart_self that can
-be used when no special handling is required for this case.
-
-@example
-#define _CPU_Context_Restart_self( _the_context ) \
- _CPU_Context_restore( (_the_context) )
-@end example
-
-XXX find a port which does not do it this way and include it here
-
-@section Floating Point Context
-
-@subsection CPU_HAS_FPU Macro Definition
-
-The CPU_HAS_FPU macro is set based on the answer to the question: Does the
-CPU have hardware floating point? If the CPU has an FPU, then this should
-be set to TRUE. Otherwise, it should be set to FALSE. The primary
-implication of setting this macro to TRUE is that it indicates that tasks
-may have floating point contexts. In the Classic API, this means that the
-RTEMS_FLOATING_POINT task attribute specified as part of rtems_task_create
-is supported on this CPU. If CPU_HAS_FPU is set to FALSE, then no tasks
-or threads may be floating point and the RTEMS_FLOATING_POINT task
-attribute is ignored. On an API such as POSIX where all threads
-implicitly have a floating point context, then the setting of this macro
-determines whether every POSIX thread has a floating point context.
-
-The following example illustrates how the CPU_HARDWARE_FP (XXX macro name
-is varying) macro is set based on the CPU family dependent macro.
-
-@example
-#if ( THIS_CPU_FAMILY_HAS_FPU == 1 ) /* where THIS_CPU_FAMILY */
- /* might be M68K */
-#define CPU_HARDWARE_FP TRUE
-#else
-#define CPU_HARDWARE_FP FALSE
-#endif
-@end example
-
-The macro name THIS_CPU_FAMILY_HAS_FPU should be made CPU specific. It
-indicates whether or not this CPU model has FP support. For example, the
-definition of the i386ex and i386sx CPU models would set I386_HAS_FPU to
-FALSE to indicate that these CPU models are i386's without an i387 and
-wish to leave floating point support out of RTEMS when built for the
-i386_nofp processor model. On a CPU with a built-in FPU like the i486,
-this would be defined as TRUE.
-
-On some processor families, the setting of the THIS_CPU_FAMILY_HAS_FPU
-macro may be derived from compiler predefinitions. This can be used when
-the compiler distinguishes the individual CPU models for this CPU family
-as distinctly as RTEMS requires. Often RTEMS needs to need more about the
-CPU model than the compiler because of differences at the system level
-such as caching, interrupt structure.
-
-@subsection CPU_ALL_TASKS_ARE_FP Macro Setting
-
-The CPU_ALL_TASKS_ARE_FP macro is set to TRUE or FALSE based upon the
-answer to the following question: Are all tasks RTEMS_FLOATING_POINT tasks
-implicitly? If this macro is set TRUE, then all tasks and threads are
-assumed to have a floating point context. In the Classic API, this is
-equivalent to setting the RTEMS_FLOATING_POINT task attribute on all
-rtems_task_create calls. If the CPU_ALL_TASKS_ARE_FP macro is set to
-FALSE, then the RTEMS_FLOATING_POINT task attribute in the Classic API is
-honored.
-
-The rationale for this macro is that if a function that an application
-developer would not think utilize the FP unit DOES, then one can not
-easily predict which tasks will use the FP hardware. In this case, this
-option should be TRUE. So far, the only CPU families for which this macro
-has been to TRUE are the HP PA-RISC and PowerPC. For the HP PA-RISC, the
-HP C compiler and gcc both implicitly use the floating point registers to
-perform integer multiplies. For the PowerPC, this feature macro is set to
-TRUE because the printf routine saves a floating point register whether or
-not a floating point number is actually printed. If the newlib
-implementation of printf were restructured to avoid this, then the PowerPC
-port would not have to have this option set to TRUE.
-
-The following example illustrates how the CPU_ALL_TASKS_ARE_FP is set on
-the PowerPC. On this CPU family, this macro is set to TRUE if the CPU
-model has hardware floating point.
-
-@example
-#if (CPU_HARDWARE_FP == TRUE)
-#define CPU_ALL_TASKS_ARE_FP TRUE
-#else
-#define CPU_ALL_TASKS_ARE_FP FALSE
-#endif
-@end example
-
-NOTE: If CPU_HARDWARE_FP is FALSE, then this should be FALSE as well.
-
-@subsection CPU_USE_DEFERRED_FP_SWITCH Macro Setting
-
-The CPU_USE_DEFERRED_FP_SWITCH macro is set based upon the answer to the
-following question: Should the saving of the floating point registers be
-deferred until a context switch is made to another different floating
-point task? If the floating point context will not be stored until
-necessary, then this macro should be set to TRUE. When set to TRUE, the
-floating point context of a task will remain in the floating point
-registers and not disturbed until another floating point task is switched
-to.
-
-If the CPU_USE_DEFERRED_FP_SWITCH is set to FALSE, then the floating point
-context is saved each time a floating point task is switched out and
-restored when the next floating point task is restored. The state of the
-floating point registers between those two operations is not specified.
-
-There are a couple of known cases where the port should not defer saving
-the floating point context. The first case is when the compiler generates
-instructions that use the FPU when floating point is not actually used.
-This occurs on the HP PA-RISC for example when an integer multiply is
-performed. On the PowerPC, the printf routine includes a save of a
-floating point register to support printing floating point numbers even if
-the path that actually prints the floating point number is not invoked.
-In both of these cases, deferred floating point context switches can not
-be used. If the floating point context has to be saved as part of
-interrupt dispatching, then it may also be necessary to disable deferred
-context switches.
-
-Setting this flag to TRUE results in using a different algorithm for
-deciding when to save and restore the floating point context. The
-deferred FP switch algorithm minimizes the number of times the FP context
-is saved and restored. The FP context is not saved until a context switch
-is made to another, different FP task. Thus in a system with only one FP
-task, the FP context will never be saved or restored.
-
-The following illustrates setting the CPU_USE_DEFERRED_FP_SWITCH macro on
-a processor family such as the M68K or i386 which can use deferred
-floating point context switches.
-
-@example
-#define CPU_USE_DEFERRED_FP_SWITCH TRUE
-@end example
-
-@subsection Floating Point Context Data Structure
-
-The Context_Control_fp contains the per task information for the floating
-point unit. The organization of this structure may be a list of floating
-point registers along with any floating point control and status registers
-or it simply consist of an array of a fixed number of bytes. Defining the
-floating point context area as an array of bytes is done when the floating
-point context is dumped by a "FP save context" type instruction and the
-format is either not completely defined by the CPU documentation or the
-format is not critical for the implementation of the floating point
-context switch routines. In this case, there is no need to figure out the
-exact format -- only the size. Of course, although this is enough
-information for RTEMS, it is probably not enough for a debugger such as
-gdb. But that is another problem.
-
-@example
-typedef struct @{
- double some_float_register;
-@} Context_Control_fp;
-@end example
-
-
-On some CPUs with hardware floating point support, the Context_Control_fp
-structure will not be used.
-
-@subsection Size of Floating Point Context Macro
-
-The CPU_CONTEXT_FP_SIZE macro is set to the size of the floating point
-context area. On some CPUs this will not be a "sizeof" because the format
-of the floating point area is not defined -- only the size is. This is
-usually on CPUs with a "floating point save context" instruction. In
-general, though it is easier to define the structure as a "sizeof"
-operation and define the Context_Control_fp structure to be an area of
-bytes of the required size in this case.
-
-@example
-#define CPU_CONTEXT_FP_SIZE sizeof( Context_Control_fp )
-@end example
-
-@subsection Start of Floating Point Context Area Macro
-
-The _CPU_Context_Fp_start macro is used in the XXX routine and allows the initial pointer into a floating point context area (used to save the floating point context) to be at an arbitrary place in the floating point context area. This is necessary because some FP units are designed to have their context saved as a stack which grows into lower addresses. Other FP units can be saved by simply moving registers into offsets from the base of the context area. Finally some FP units provide a "dump context" instruction which could fill in from high to low or low to high based on the whim of the CPU designers. Regardless, the address at which that floating point context area pointer should start within the actual floating point context area varies between ports and this macro provides a clean way of addressing this.
-
-This is a common implementation of the _CPU_Context_Fp_start routine which
-is suitable for many processors. In particular, RISC processors tend to
-use this implementation since the floating point context is saved as a
-sequence of store operations.
-
-@example
-#define _CPU_Context_Fp_start( _base, _offset ) \
- ( (void *) _Addresses_Add_offset( (_base), (_offset) ) )
-@end example
-
-In contrast, the m68k treats the floating point context area as a stack
-which grows downward in memory. Thus the following implementation of
-_CPU_Context_Fp_start is used in that port:
-
-
-@example
-XXX insert m68k version here
-@end example
-
-@subsection Initializing a Floating Point Context
-
-The _CPU_Context_Initialize_fp routine initializes the floating point
-context area passed to it to. There are a few standard ways in which to
-initialize the floating point context. The simplest, and least
-deterministic behaviorally, is to do nothing. This leaves the FPU in a
-random state and is generally not a suitable way to implement this
-routine. The second common implementation is to place a "null FP status
-word" into some status/control register in the FPU. This mechanism is
-simple and works on many FPUs. Another common way is to initialize the
-FPU to a known state during _CPU_Initialize and save the context (using
-_CPU_Context_save_fp_context) into the special floating point context
-_CPU_Null_fp_context. Then all that is required to initialize a floating
-point context is to copy _CPU_Null_fp_context to the destination floating
-point context passed to it. The following example implementation shows
-how to accomplish this:
-
-@example
-#define _CPU_Context_Initialize_fp( _destination ) \
- @{ \
- *((Context_Control_fp *) *((void **) _destination)) = \
- _CPU_Null_fp_context; \
- @}
-@end example
-
-The _CPU_Null_fp_context is optional. A port need only include this variable when it uses the above mechanism to initialize a floating point context. This is typically done on CPUs where it is difficult to generate an "uninitialized" FP context. If the port requires this variable, then it is declared as follows:
-
-@example
-Context_Control_fp _CPU_Null_fp_context;
-@end example
-
-
-@subsection Saving a Floating Point Context
-
-The _CPU_Context_save_fp_context routine is responsible for saving the FP
-context at *fp_context_ptr. If the point to load the FP context from is
-changed then the pointer is modified by this routine.
-
-Sometimes a macro implementation of this is in cpu.h which dereferences
-the ** and a similarly named routine in this file is passed something like
-a (Context_Control_fp *). The general rule on making this decision is to
-avoid writing assembly language.
-
-@example
-void _CPU_Context_save_fp(
- void **fp_context_ptr
-)
-@end example
-
-@subsection Restoring a Floating Point Context
-
-The _CPU_Context_restore_fp_context is responsible for restoring the FP
-context at *fp_context_ptr. If the point to load the FP context from is
-changed then the pointer is modified by this routine.
-
-Sometimes a macro implementation of this is in cpu.h which dereferences
-the ** and a similarly named routine in this file is passed something like
-a (Context_Control_fp *). The general rule on making this decision is to
-avoid writing assembly language.
-
-@example
-void _CPU_Context_restore_fp(
- void **fp_context_ptr
-);
-@end example
-
diff --git a/doc/posix1003.1/Makefile b/doc/posix1003.1/Makefile
deleted file mode 100644
index 2a3a6c3761..0000000000
--- a/doc/posix1003.1/Makefile
+++ /dev/null
@@ -1,163 +0,0 @@
-#
-# COPYRIGHT (c) 1988-1999.
-# On-Line Applications Research Corporation (OAR).
-# All rights reserved.
-#
-# $Id$
-#
-
-PROJECT=posix1003_1
-
-include ../Make.config
-
-all: html info ps pdf
-
-dirs:
- $(make-dirs)
-
-COMMON_FILES=../common/cpright.texi ../common/setup.texi
-
-GENERATED_FILES=ch01.texi ch02.texi ch03.texi ch04.texi ch05.texi \
- ch06.texi ch07.texi ch08.texi ch09.texi ch10.texi \
- ch11.texi ch12.texi ch13.texi ch14.texi ch15.texi \
- ch16.texi ch17.texi ch18.texi ch19.t ch19.texi
-
-FILES= $(PROJECT).texi \
- preface.texi $(GENERATED_FILES)
-
-INFOFILES=$(wildcard $(PROJECT) $(PROJECT)-*)
-
-info: dirs $(PROJECT)
- #cp $(wildcard $(PROJECT) $(PROJECT)-*) $(INFO_INSTALL)
- cp $(PROJECT) $(INFO_INSTALL)
-
-$(PROJECT): $(FILES)
- $(MAKEINFO) $(PROJECT).texi
-
-dvi: dirs $(PROJECT).dvi
-ps: dirs $(PROJECT).ps
-pdf: dirs $(PROJECT).pdf
-
-$(PROJECT).pdf: $(FILES)
- $(TEXI2PDF) $(PROJECT).texi
- cp $(PROJECT).pdf $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).ps: $(PROJECT).dvi
- dvips -o $(PROJECT).ps $(PROJECT).dvi
- cp $(PROJECT).ps $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).dvi: $(FILES)
- $(TEXI2DVI) $(PROJECT).texi
- cp $(PROJECT).dvi $(WWW_INSTALL)/$(PROJECT)
-
-ch01.texi: ch01.t
- $(BMENU) -c -p "Preface" \
- -u "Top" \
- -n "Terminology and General Requirements" ${*}.t
-
-ch02.texi: ch02.t
- $(BMENU) -c -p "Conformance" \
- -u "Top" \
- -n "Process Primitives" ${*}.t
-
-ch03.texi: ch03.t
- $(BMENU) -c -p "Execution-Time Symbolic Constants for Portability Specifications" \
- -u "Top" \
- -n "Process Environment" ${*}.t
-
-ch04.texi: ch04.t
- $(BMENU) -c -p "Delay Process Execution" \
- -u "Top" \
- -n "Files and Directories" ${*}.t
-
-ch05.texi: ch05.t
- $(BMENU) -c -p "Get Configurable System Variables" \
- -u "Top" \
- -n "Input and Output Primitives" ${*}.t
-
-ch06.texi: ch06.t
- $(BMENU) -c -p "Get Configurable Pathname Variables" \
- -u "Top" \
- -n "Device- and Class-Specific Functions" ${*}.t
-
-ch07.texi: ch07.t
- $(BMENU) -c -p " Asynchronous File Synchronization" \
- -u "Top" \
- -n "Language-Specific Services for the C Programming Language" ${*}.t
-
-ch08.texi: ch08.t
- $(BMENU) -c -p "Set Foreground Process Group ID" \
- -u "Top" \
- -n "System Databases" ${*}.t
-
-ch09.texi: ch09.t
- $(BMENU) -c -p "Pseudo-Random Sequence Generation Functions" \
- -u "Top" \
- -n "Data Interchange Format" ${*}.t
-
-ch10.texi: ch10.t
- $(BMENU) -c -p "User Database Access" \
- -u "Top" \
- -n "Synchronization" ${*}.t
-
-ch11.texi: ch11.t
- $(BMENU) -c -p "Multiple Volumes" \
- -u "Top" \
- -n "Memory Management" ${*}.t
-
-ch12.texi: ch12.t
- $(BMENU) -c -p "Waiting on a Condition" \
- -u "Top" \
- -n "Execution Scheduling" ${*}.t
-
-ch13.texi: ch13.t
- $(BMENU) -c -p "Remove a Shared Memory Object" \
- -u "Top" \
- -n "Clocks and Timers" ${*}.t
-
-ch14.texi: ch14.t
- $(BMENU) -c -p "Change the Priority Ceiling of a Mutex" \
- -u "Top" \
- -n "Message Passing" ${*}.t
-
-ch15.texi: ch15.t
- $(BMENU) -c -p "High Resolution Sleep" \
- -u "Top" \
- -n "Thread Management" ${*}.t
-
-ch16.texi: ch16.t
- $(BMENU) -c -p "Get Message Queue Attributes" \
- -u "Top" \
- -n "Thread-Specific Data" ${*}.t
-
-ch17.texi: ch17.t
- $(BMENU) -c -p "Dynamic Package Initialization" \
- -u "Top" \
- -n "Thread Cancellation" ${*}.t
-
-ch18.texi: ch18.t
- $(BMENU) -c -p "Thread-Specific Data Key Deletion" \
- -u "Top" \
- -n "Compliance Summary" ${*}.t
-
-ch19.t: ch01.t ch02.t ch03.t ch04.t ch05.t ch06.t ch07.t ch08.t ch09.t \
- ch10.t ch11.t ch12.t ch13.t ch14.t ch15.t ch16.t ch17.t ch18.t \
- summarize
- ./summarize >ch19.t
-
-ch19.texi: ch19.t
- $(BMENU) -c -p "List of Cancellation Points" \
- -u "Top" \
- -n "Command and Variable Index" ${*}.t
-
-html: dirs $(FILES)
- -mkdir -p $(WWW_INSTALL)/$(PROJECT)
- $(TEXI2WWW) $(TEXI2WWW_ARGS) -dir $(WWW_INSTALL)/$(PROJECT) \
- $(PROJECT).texi
-
-clean:
- rm -f *.o $(PROG) *.txt core $(PROJECT).pdf
- rm -f *.dvi *.ps *.log *.aux *.cp *.fn *.ky *.pg *.toc *.tp *.vr $(BASE)
- rm -f $(PROJECT) $(PROJECT)-* $(GENERATED_FILES)
- rm -f *.fixed _*
-
diff --git a/doc/posix1003.1/ch01.t b/doc/posix1003.1/ch01.t
deleted file mode 100644
index 3f04995125..0000000000
--- a/doc/posix1003.1/ch01.t
+++ /dev/null
@@ -1,40 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter General
-
-@section Scope
-
-@section Normative References
-
-@section Conformance
-
-@example
-NGROUPS_MAX, Feature Flag,
-_POSIX_ASYNCHRONOUS_IO, Feature Flag,
-_POSIX_CHOWN_RESTRICTED, Feature Flag,
-_POSIX_FSYNC, Feature Flag,
-_POSIX_JOB_CONTROL, Feature Flag,
-_POSIX_MAPPED_FILES, Feature Flag,
-_POSIX_MEMLOCK, Feature Flag,
-_POSIX_MEMLOCK_RANGE, Feature Flag,
-_POSIX_MEMORY_PROTECTION, Feature Flag,
-_POSIX_MESSAGE_PASSING, Feature Flag,
-_POSIX_PRIORITIZED_IO, Feature Flag,
-_POSIX_PRIORITY_SCHEDULING, Feature Flag,
-_POSIX_REALTIME_SIGNALS, Feature Flag,
-_POSIX_SEMAPHORES, Feature Flag,
-_POSIX_SHARED_MEMORY_OBJECTS, Feature Flag,
-_POSIX_SYNCHRONIZED_IO, Feature Flag,
-_POSIX_TIMERS, Feature Flag,
-_POSIX_THREAD_PRIO_INHERIT, Feature Flag,
-_POSIX_THREAD_PRIORITY_SCHEDULING, Feature Flag,
-_POSIX_THREADS, Feature Flag,
-_POSIX_THREAD_SAFE_FUNCTIONS, Feature Flag,
-@end example
-
diff --git a/doc/posix1003.1/ch02.t b/doc/posix1003.1/ch02.t
deleted file mode 100644
index e2b1c30b9e..0000000000
--- a/doc/posix1003.1/ch02.t
+++ /dev/null
@@ -1,279 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Terminology and General Requirements
-
-@section Conventions
-
-@section Definitions
-
-@section General Concepts
-
-@section Error Numbers
-
-@example
-E2BIG, Constant, Implemented
-EACCES, Constant, Implemented
-EAGAIN, Constant, Implemented
-EBADF, Constant, Implemented
-EBADMSG, Constant, Implemented
-EBUSY, Constant, Implemented
-ECANCELED, Constant, Unimplemented
-ECHILD, Constant, Implemented
-EDEADLK, Constant, Implemented
-EDOM, Constant, Implemented
-EEXIST, Constant, Implemented
-EFAULT, Constant, Implemented
-EFBIG, Constant, Implemented
-EINPROGRESS, Constant, Implemented
-EINTR, Constant, Implemented
-EINVAL, Constant, Implemented
-EIO, Constant, Implemented
-EISDIR, Constant, Implemented
-EMFILE, Constant, Implemented
-EMLINK, Constant, Implemented
-EMSGSIZE, Constant, Implemented
-ENAMETOOLONG, Constant, Implemented
-ENFILE, Constant, Implemented
-ENODEV, Constant, Implemented
-ENOENT, Constant, Implemented
-ENOEXEC, Constant, Implemented
-ENOLCK, Constant, Implemented
-ENOMEM, Constant, Implemented
-ENOSPC, Constant, Implemented
-ENOSYS, Constant, Implemented
-ENOTDIR, Constant, Implemented
-ENOTEMPTY, Constant, Implemented
-ENOTSUP, Constant, Implemented
-ENOTTY, Constant, Implemented
-ENXIO, Constant, Implemented
-EPERM, Constant, Implemented
-EPIPE, Constant, Implemented
-ERANGE, Constant, Implemented
-EROFS, Constant, Implemented
-ESPIPE, Constant, Implemented
-ESRCH, Constant, Implemented
-ETIMEDOUT, Constant, Implemented
-EXDEV, Constant, Implemented
-@end example
-
-@section Primitive System Types
-
-@example
-dev_t, Type, Implemented
-gid_t, Type, Implemented
-ino_t, Type, Implemented
-mode_t, Type, Implemented
-nlink_t, Type, Implemented
-off_t, Type, Implemented
-pid_t, Type, Implemented
-pthread_t, Type, Implemented
-pthread_attr_t, Type, Implemented
-pthread_mutex_t, Type, Implemented
-pthread_mutex_attr_t, Type, Implemented
-pthread_cond_t, Type, Implemented
-pthread_cond_attr_t, Type, Implemented
-pthread_key_t, Type, Implemented
-pthread_once_t, Type, Implemented
-size_t, Type, Implemented
-ssize_t, Type, Implemented
-time_t, Type, Implemented
-uid_t, Type, Implemented
-@end example
-
-NOTE: time_t is not listed in this section but is used by many functions.
-
-@section Environment Description
-
-@section C Language Definitions
-
-@subsection Symbols From the C Standard
-
-@example
-NULL, Constant, Implemented
-@end example
-
-@subsection POSIX.1 Symbols
-
-@example
-_POSIX_C_SOURCE, Feature Flag,
-@end example
-
-@section Numerical Limits
-
-@section C Language Limits
-
-@example
-CHAR_BIT, Constant, Implemented
-CHAR_MAX, Constant, Implemented
-CHAR_MIN, Constant, Implemented
-INT_MAX, Constant, Implemented
-INT_MIN, Constant, Implemented
-LONG_MAX, Constant, Implemented
-LONG_MIN, Constant, Implemented
-MB_LEN_MAX, Constant, Implemented
-SCHAR_MAX, Constant, Implemented
-SCHAR_MIN, Constant, Implemented
-SHRT_MAX, Constant, Implemented
-SHRT_MIN, Constant, Implemented
-UCHAR_MAX, Constant, Implemented
-UINT_MAX, Constant, Implemented
-ULONG_MAX, Constant, Implemented
-USHRT_MAX, Constant, Implemented
-@end example
-
-NOTE: These are implemented in GCC's limits.h file.
-
-@subsection Minimum Values
-
-@example
-_POSIX_AIO_LISTIO_MAX, Constant, Implemented
-_POSIX_AIO_MAX, Constant, Implemented
-_POSIX_ARG_MAX, Constant, Implemented
-_POSIX_CHILD_MAX, Constant, Implemented
-_POSIX_DELAYTIMER_MAX, Constant, Implemented
-_POSIX_LINK_MAX, Constant, Implemented
-_POSIX_LOGIN_NAME_MAX, Constant, Implemented
-_POSIX_MAX_CANON, Constant, Implemented
-_POSIX_MAX_INPUT, Constant, Implemented
-_POSIX_MQ_OPEN_MAX, Constant, Implemented
-_POSIX_MQ_PRIO_MAX, Constant, Implemented
-_POSIX_NAME_MAX, Constant, Implemented
-_POSIX_NGROUPS_MAX, Constant, Implemented
-_POSIX_OPEN_MAX, Constant, Implemented
-_POSIX_PATH_MAX, Constant, Implemented
-_POSIX_PIPE_BUF, Constant, Implemented
-_POSIX_RTSIG_MAX, Constant, Implemented
-_POSIX_SEM_NSEMS_MAX, Constant, Implemented
-_POSIX_SEM_VALUE_MAX, Constant, Implemented
-_POSIX_SIGQUEUE_MAX, Constant, Implemented
-_POSIX_SSIZE_MAX, Constant, Implemented
-_POSIX_STREAM_MAX, Constant, Implemented
-_POSIX_THREAD_DESTRUCTOR_ITERATIONS, Constant, Implemented
-_POSIX_THREAD_KEYS_MAX, Constant, Implemented
-_POSIX_THREAD_THREADS_MAX, Constant, Implemented
-_POSIX_TTY_NAME_MAX, Constant, Implemented
-_POSIX_TIME_MAX, Constant, Unimplemented
-_POSIX_TZNAME_MAX, Constant, Implemented
-@end example
-
-@subsection Run-Time Increasable Values
-
-@example
-_POSIX_NGROUPS_MAX, Constant, Implemented
-@end example
-
-@subsection Run-Time Invariant Values (Possible Indeterminate)
-
-@example
-AIO_LISTIO_MAX, Constant, Implemented
-AIO_MAX, Constant, Implemented
-AIO_PRIO_DELTA_MAX, Constant, Implemented
-ARG_MAX, Constant, Implemented
-CHILD_MAX, Constant, Implemented
-DELAYTIMER_MAX, Constant, Implemented
-LOGIN_NAME_MAX, Constant, Implemented
-MQ_OPEN_MAX, Constant, Implemented
-OPEN_MAX, Constant, Implemented
-PAGESIZE, Constant, Implemented
-PTHREAD_DESTRUCTOR_ITERATIONS, Constant, Implemented
-PTHREAD_KEYS_MAX, Constant, Implemented
-PTHREAD_STACK_MIN, Constant, Implemented
-PTHJREAD_THREADS_MAX, Constant, Implemented
-RTSIG_MAX, Constant, Implemented
-SEM_NSEMS_MAX, Constant, Implemented
-SEM_VALUE_MAX, Constant, Implemented
-SIGQUEUE_MAX, Constant, Implemented
-STREAM_MAX, Constant, Implemented
-TIMER_MAX, Constant, Implemented
-TTY_NAME_MAX, Constant, Implemented
-TZNAME_MAX, Constant, Implemented
-@end example
-
-@subsection Pathname Variable Values
-
-@example
-LINK_MAX, Constant, Implemented
-MAX_CANON, Constant, Implemented
-MAX_INPUT, Constant, Implemented
-NAME_MAX, Constant, Implemented
-PATH_MAX, Constant, Implemented
-PIPE_BUF, Constant, Implemented
-@end example
-
-@subsection Invariant Values
-
-@example
-SSIZE_MAX, Constant, Implemented
-@end example
-
-@subsection Maximum Values
-
-@example
-_POSIX_CLOCKRES_MIN, Constant, Implemented
-@end example
-
-@section Symbolic Constants
-
-@subsection Symbolic Constants for the access Function
-
-@example
-R_OK, Constant, Implemented
-W_OK, Constant, Implemented
-X_OK, Constant, Implemented
-F_OK, Constant, Implemented
-@end example
-
-@subsection Symbolic Constants for the lseek Function
-
-@example
-SEEK_SET, Constant, Implemented
-SEEK_CUR, Constant, Implemented
-SEEK_END, Constant, Implemented
-@end example
-
-@subsection Compile-Time Symbolic Constants for Portability Specifications
-
-@example
-_POSIX_ASYNCHRONOUS_IO, Feature Flag,
-_POSIX_FSYNC, Feature Flag,
-_POSIX_JOB_CONTROL, Feature Flag,
-_POSIX_MAPPED_FILES, Feature Flag,
-_POSIX_MEMLOCK, Feature Flag,
-_POSIX_MEMLOCK_RANGE, Feature Flag,
-_POSIX_MEMORY_PROTECTION, Feature Flag,
-_POSIX_MESSAGE_PASSING, Feature Flag,
-_POSIX_PRIORITIZED_IO, Feature Flag,
-_POSIX_PRIORITY_SCHEDULING, Feature Flag,
-_POSIX_REALTIME_SIGNALS, Feature Flag,
-_POSIX_SAVED_IDS, Feature Flag,
-_POSIX_SEMAPHORES, Feature Flag,
-_POSIX_SHARED_MEMORY_OBJECTS, Feature Flag,
-_POSIX_SYNCHRONIZED_IO, Feature Flag,
-_POSIX_THREADS, Feature Flag,
-_POSIX_THREAD_ATTR_STACKADDR, Feature Flag,
-_POSIX_THREAD_ATTR_STACKSIZE, Feature Flag,
-_POSIX_THREAD_PRIORITY_SCHEDULING, Feature Flag,
-_POSIX_THREAD_PRIO_INHERIT, Feature Flag,
-_POSIX_THREAD_PRIO_CEILING, Feature Flag,
-_POSIX_THREAD_PROCESS_SHARED, Feature Flag,
-_POSIX_THREAD_SAFE_FUNCTIONS, Feature Flag,
-_POSIX_TIMERS, Feature Flag,
-_POSIX_VERSION, Feature Flag,
-@end example
-
-@subsection Execution-Time Symbolic Constants for Portability Specifications
-
-@example
-_POSIX_ASYNC_IO, Feature Flag,
-_POSIX_CHOWN_RESTRICTED, Feature Flag,
-_POSIX_NO_TRUNC, Feature Flag,
-_POSIX_PRIO_IO, Feature Flag,
-_POSIX_SYNC_IO, Feature Flag,
-_POSIX_VDISABLE, Feature Flag,
-@end example
diff --git a/doc/posix1003.1/ch03.t b/doc/posix1003.1/ch03.t
deleted file mode 100644
index df38e2576c..0000000000
--- a/doc/posix1003.1/ch03.t
+++ /dev/null
@@ -1,203 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Process Primitives
-
-@section Process Creation and Execution
-
-@subsection Process Creation
-
-@example
-fork(), Function, Unimplementable, Requires Processes
-@end example
-
-
-@subsection Execute a File
-
-@example
-execl(), Function, Unimplementable, Requires Processes
-execv(), Function, Unimplementable, Requires Processes
-execle(), Function, Unimplementable, Requires Processes
-execve(), Function, Unimplementable, Requires Processes
-execlp(), Function, Unimplementable, Requires Processes
-execvp(), Function, Unimplementable, Requires Processes
-@end example
-
-@subsection Register Fork Handlers
-
-@example
-pthread_atfork(), Function, Unimplementable, Requires Processes
-@end example
-
-@section Process Termination
-
-@subsection Wait for Process Termination
-
-@example
-wait(), Function, Unimplementable, Requires Processes
-waitpid(), Function, Unimplementable, Requires Processes
-WNOHANG, Constant, Unimplementable, Requires Processes
-WUNTRACED, Constant, Unimplementable, Requires Processes
-WIFEXITED(), Function, Unimplementable, Requires Processes
-WEXITSTATUS(), Function, Unimplementable, Requires Processes
-WIFSIGNALED(), Function, Unimplementable, Requires Processes
-WTERMSIG(), Function, Unimplementable, Requires Processes
-WIFSTOPPED(), Function, Unimplementable, Requires Processes
-WSTOPSIG(), Function, Unimplementable, Requires Processes
-@end example
-
-@subsection Terminate a Process
-
-@example
-_exit(), Function, Implemented
-@end example
-
-@section Signals
-
-@subsection Signal Concepts
-
-@subsubsection Signal Names
-
-@example
-sigset_t, Type, Implemented
-SIG_DFL, Constant, Implemented
-SIG_IGN, Constant, Implemented
-SIG_ERR, Constant, Implemented
-SIGABRT, Constant, Implemented
-SIGALRM, Constant, Implemented
-SIGFPE, Constant, Implemented
-SIGHUP, Constant, Implemented
-SIGILL, Constant, Implemented
-SIGINT, Constant, Implemented
-SIGKILL, Constant, Implemented
-SIGPIPE, Constant, Implemented
-SIGQUIT, Constant, Implemented
-SIGSEGV, Constant, Implemented
-SIGTERM, Constant, Implemented
-SIGUSR1, Constant, Implemented
-SIGUSR2, Constant, Implemented
-SIGCHLD, Constant, Unimplemented
-SIGCONT, Constant, Unimplemented
-SIGSTOP, Constant, Unimplemented
-SIGTSTP, Constant, Unimplemented
-SIGTTIN, Constant, Unimplemented
-SIGTTOU, Constant, Unimplemented
-SIGBUS, Constant, Implemented
-SIGRTMIN, Constant, Implemented
-SIGRTMAX, Constant, Implemented
-@end example
-
-NOTE: SIG_ERR is technically an extension to the C Library which is
-not documented anywhere else according to the index.
-@subsubsection Signal Generation and Delivery
-
-@example
-struct sigevent, Type, Implemented
-union sigval, Type, Implemented
-SIGEV_NONE, Constant, Implemented
-SIGEV_SIGNAL, Constant, Implemented
-SIGEV_THREAD, Constant, Implemented
-@end example
-
-@subsubsection Signal Actions
-
-@example
-siginfo_t, Type, Implemented
-SI_USER, Constant, Implemented
-SI_QUEUE, Constant, Implemented
-SI_TIMER, Constant, Implemented
-SI_ASYNCIO, Constant, Implemented
-SI_MESGQ, Constant, Implemented
-@end example
-
-@subsection Send a Signal to a Process
-
-@example
-kill(), Function, Implemented
-@end example
-
-@subsection Manipulate Signal Sets
-
-@example
-sigemptyset(), Function, Implemented
-sigfillset(), Function, Implemented
-sigaddset(), Function, Implemented
-sigdelset(), Function, Implemented
-sigismember(), Function, Implemented
-@end example
-
-@subsection Examine and Change Signal Action
-
-@example
-sigaction(), Function, Implemented
-sigaction, Type, Implemented
-SA_NOCLDSTOP, Constant, Implemented
-SA_SIGINFO, Constant, Implemented
-@end example
-
-@subsection Examine and Change Blocked Signals
-
-@example
-pthread_sigmask(), Function, Implemented
-sigprocmask(), Function, Implemented
-SIG_BLOCK, Constant, Implemented
-SIG_UNBLOCK, Constant, Implemented
-SIG_SETMASK, Constant, Implemented
-@end example
-
-@subsection Examine Pending Signals
-
-@example
-sigpending(), Function, Implemented
-@end example
-
-@subsection Wait for a Signal
-
-@example
-sigsuspend(), Function, Implemented
-@end example
-
-@subsection Synchronously Accept a Signal
-
-@example
-sigwait(), Function, Implemented
-sigwaitinfo(), Function, Implemented
-sigtimedwait(), Function, Implemented
-@end example
-
-@subsection Queue a Signal to a Process
-
-@example
-sigqueue(), Function, Implemented
-@end example
-
-@subsection Send a Signal to a Thread
-
-@example
-pthread_kill(), Function, Implemented
-@end example
-
-@section Timer Operations
-
-@subsection Schedule Alarm
-
-@example
-alarm(), Function, Implemented
-@end example
-
-@subsection Suspend Process Execution
-
-@example
-pause(), Function, Implemented
-@end example
-
-@subsection Delay Process Execution
-
-@example
-sleep(), Function, Implemented
-@end example
diff --git a/doc/posix1003.1/ch04.t b/doc/posix1003.1/ch04.t
deleted file mode 100644
index 8c2dda74af..0000000000
--- a/doc/posix1003.1/ch04.t
+++ /dev/null
@@ -1,181 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Process Environment
-
-@section Process Identification
-
-@subsection Get Process and Parent Process IDs
-
-@example
-getpid(), Function, Implemented, SUSP Functionality
-getppid(), Function, Implemented, SUSP Functionality
-@end example
-
-@section User Identification
-
-@subsection Get Real User Effective User Real Group and Effective Group IDs
-
-@example
-getuid(), Function, Implemented, SUSP Functionality
-geteuid(), Function, Implemented, SUSP Functionality
-getgid(), Function, Implemented, SUSP Functionality
-getegid(), Function, Implemented, SUSP Functionality
-@end example
-
-@subsection Set User and Group IDs
-
-@example
-setuid(), Function, Implemented, SUSP Functionality
-setgid(), Function, Implemented, SUSP Functionality
-@end example
-
-@subsection Get Supplementary Group IDs
-
-@example
-getgroups(), Function, Implemented, SUSP Functionality
-@end example
-
-@subsection Get User Name
-
-@example
-getlogin(), Function, Implemented, SUSP Functionality
-getlogin_r(), Function, Implemented, SUSP Functionality
-@end example
-
-@section Process Groups
-
-@subsection Get Process Group ID
-
-@example
-getpgrp(), Function, Implemented, SUSP Functionality
-@end example
-
-@subsection Create Session and Set Process Group ID
-
-@example
-setsid(), Function, Implemented, SUSP Functionality
-@end example
-
-@subsection Set Process Group ID for Job Control
-
-@example
-setpgid(), Function, Dummy Implementation
-@end example
-
-@section System Identification
-
-@subsection Get System Name
-
-@example
-struct utsname, Type, Implemented
-uname(), Function, Implemented
-@end example
-
-@section Time
-
-@subsection Get System Time
-
-@example
-time(), Function, Implemented
-@end example
-
-@subsection Get Process Times
-
-@example
-struct tms, Type, Implemented
-times(), Function, Implemented
-@end example
-
-NOTE: @code{times} always returns 0 for tms_stime, tms_cutime, and
-tms_cstime fields of the @code{struct tms} returned.
-
-@section Environment Variables
-
-@subsection Environment Access
-
-@example
-getenv(), Function, Implemented
-@end example
-
-@section Terminal Identification
-
-@subsection Generate Terminal Pathname
-
-@example
-ctermid(), Function, Implemented
-@end example
-
-@subsection Determine Terminal Device Name
-
-@example
-ttyname(), Function, Implemented, untested
-ttyname_r(), Function, Implemented, untested
-isatty(), Function, Implemented
-@end example
-
-@section Configurable System Variables
-
-@subsection Get Configurable System Variables
-
-@example
-sysconf(), Function, Dummy Implementation
-_SC_AIO_LISTIO_MAX, Constant, Implemented
-_SC_AIO_MAX, Constant, Implemented
-_SC_AIO_PRIO_DELTA_MAX, Constant, Implemented
-_SC_ARG_MAX, Constant, Implemented
-_SC_CHILD_MAX, Constant, Implemented
-_SC_CLK_TCK, Constant, Implemented
-CLK_TCK, Constant, Implemented
-_SC_DELAYTIMER_MAX, Constant, Implemented
-_SC_GETGR_R_SIZE_MAX, Constant, Implemented
-_SC_GETPW_R_SIZE_MAX, Constant, Implemented
-_SC_LOGIN_NAME_MAX, Constant, Implemented
-_SC_MQ_OPEN_MAX, Constant, Implemented
-_SC_MQ_PRIO_MAX, Constant, Implemented
-_SC_NGROUPS_MAX, Constant, Implemented
-_SC_OPEN_MAX, Constant, Implemented
-_SC_PAGESIZE, Constant, Implemented
-_SC_RTSIG_MAX, Constant, Implemented
-_SC_SEM_NSEMS_MAX, Constant, Implemented
-_SC_SEM_VALUE_MAX, Constant, Implemented
-_SC_SIGQUEUE_MAX, Constant, Implemented
-_SC_STREAM_MAX, Constant, Implemented
-_SC_THREAD_DESTRUCTOR_ITERATIONS, Constant, Implemented
-_SC_THREAD_KEYS_MAX, Constant, Implemented
-_SC_THREAD_STACK_MIN, Constant, Implemented
-_SC_THREAD_THREADS_MAX, Constant, Implemented
-_SC_TIMER_MAX, Constant, Implemented
-_SC_TTY_NAME_MAX, Constant, Implemented
-_SC_TZNAME_MAX, Constant, Implemented
-_SC_ASYNCHRONOUS_IO, Constant, Implemented
-_SC_FSYNC, Constant, Implemented
-_SC_JOB_CONROL, Constant, Implemented
-_SC_MAPPED_FILES, Constant, Implemented
-_SC_MEMLOCK, Constant, Implemented
-_SC_MEMLOCK_RANGE, Constant, Implemented
-_SC_MEMORY_PROTECTION, Constant, Implemented
-_SC_MESSAGE_PASSING, Constant, Implemented
-_SC_PRIORITIZED_IO, Constant, Implemented
-_SC_PRIORITY_SCHEDULING, Constant, Unimplemented
-_SC_REALTIME_SIGNALS, Constant, Implemented
-_SC_SAVED_IDS, Constant, Implemented
-_SC_SEMAPHORES, Constant, Implemented
-_SC_SHARED_MEMORY_OBJECTS, Constant, Implemented
-_SC_SYNCHRONIZED_IO, Constant, Implemented
-_SC_TIMERS, Constant, Implemented
-_SC_THREADS, Constant, Implemented
-_SC_THREAD_ATTR_STACKADDR, Constant, Implemented
-_SC_THREAD_ATTR_STACKSIZE, Constant, Implemented
-_SC_THREAD_PRIORITY_SCHEDULING, Constant, Implemented
-_SC_THREAD_PRIO_INHERIT, Constant, Implemented
-_SC_THREAD_PRIO_PROTECT, Constant, Unimplemented
-_SC_THREAD_PROCESS_SHARED, Constant, Implemented
-_SC_THREAD_SAFE_FUNCTIONS, Constant, Implemented
-_SC_VERSION, Constant, Implemented
-@end example
diff --git a/doc/posix1003.1/ch05.t b/doc/posix1003.1/ch05.t
deleted file mode 100644
index f6aa3a43b1..0000000000
--- a/doc/posix1003.1/ch05.t
+++ /dev/null
@@ -1,222 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Files and Directories
-
-@section Directories
-
-@subsection Format of Directory Entries
-
-@subsection Directory Operations
-
-@example
-struct dirent, Type, Implemented
-opendir(), Function, Implemented
-readdir(), Function, Implemented
-readdir_r(), Function, Implemented
-rewinddir(), Function, Implemented
-closedir(), Function, Implemented
-@end example
-
-@section Working Directory
-
-@subsection Change Current Working Directory
-
-@example
-chdir(), Function, Implemented
-@end example
-
-@subsection Get Working Directory Pathname
-
-@example
-getcwd(), Function, Implemented
-@end example
-
-@section General File Creation
-
-@subsection Open a File
-
-@example
-open(), Function, Implemented
-O_RDONLY, Constant, Implemented
-O_WRONLY, Constant, Implemented
-O_RDWR, Constant, Implemented
-O_APPEND, Constant, Implemented
-O_CREAT, Constant, Implemented
-O_DSYNC, Constant, Unimplemented
-O_EXCL, Constant, Implemented
-O_NOCTTY, Constant, Implemented
-O_NONBLOCK, Constant, Implemented
-O_RSYNC, Constant, Unimplemented
-O_SYNC, Constant, Implemented
-O_TRUNC, Constant, Implemented
-@end example
-
-NOTE: In the newlib fcntl.h, O_SYNC is defined only if _POSIX_SOURCE is
-not defined. This seems wrong.
-
-@subsection Create a New File or Rewrite an Existing One
-
-@example
-creat(), Function, Implemented
-@end example
-
-@subsection Set File Creation Mask
-
-@example
-umask(), Function, Implemented
-@end example
-
-@subsection Link to a File
-
-@example
-link(), Function, Implemented
-@end example
-
-@section Special File Creation
-
-@subsection Make a Directory
-
-@example
-mkdir(), Function, Implemented
-@end example
-
-@subsection Make a FIFO Special File
-
-@example
-mkfifo(), Function, Untested Implementation
-@end example
-
-NOTE: mkfifo() is implemented but no filesystem supports FIFOs.
-
-@section File Removal
-
-@subsection Remove Directory Entries
-
-@example
-unlink(), Function, Implemented
-@end example
-
-@subsection Remove a Directory
-
-@example
-rmdir(), Function, Implemented
-@end example
-
-@subsection Rename a File
-
-@example
-rename(), Function, Implemented
-@end example
-
-@section File Characteristics
-
-@subsection File Characteristics Header and Data Structure
-
-@example
-struct stat, Type, Implemented
-@end example
-
-@subsubsection <sys/stat.h> File Types
-
-@example
-S_ISBLK(), Function, Implemented
-S_ISCHR(), Function, Implemented
-S_ISDIR(), Function, Implemented
-S_ISFIFO(), Function, Implemented
-S_ISREG(), Function, Implemented
-S_TYPEISMQ(), Function, Unimplemented
-S_TYPEISSEM(), Function, Unimplemented
-S_TYPEISSHM(), Function, Unimplemented
-@end example
-
-@subsubsection <sys/stat.h> File Modes
-
-@example
-S_IRWXU, Constant, Implemented
-S_IRUSR, Constant, Implemented
-S_IWUSR, Constant, Implemented
-S_IXUSR, Constant, Implemented
-S_IRWXG, Constant, Implemented
-S_IRGRP, Constant, Implemented
-S_IWGRP, Constant, Implemented
-S_IXGRP, Constant, Implemented
-S_IRWXO, Constant, Implemented
-S_IROTH, Constant, Implemented
-S_IWOTH, Constant, Implemented
-S_IXOTH, Constant, Implemented
-S_ISUID, Constant, Implemented
-S_ISGID, Constant, Implemented
-@end example
-
-@subsubsection <sys/stat.h> Time Entries
-
-@subsection Get File Status
-
-@example
-stat(), Function, Implemented
-fstat(), Function, Implemented
-@end example
-
-@subsection Check File Accessibility
-
-@example
-access(), Function, Implemented
-@end example
-
-@subsection Change File Modes
-
-@example
-chmod(), Function, Implemented
-fchmod(), Function, Implemented
-@end example
-
-@subsection Change Owner and Group of a File
-
-@example
-chown(), Function, Implemented
-@end example
-
-@subsection Set File Access and Modification Times
-
-@example
-struct utimbuf, Type, Implemented
-utime(), Function, Implemented
-@end example
-
-@subsection Truncate a File to a Specified Length
-
-@example
-ftruncate(), Function, Implemented
-@end example
-
-@section Configurable Pathname Variable
-
-@subsection Get Configurable Pathname Variables
-
-@example
-pathconf(), Function, Implemented
-fpathconf(), Function, Implemented
-_PC_LINK_MAX, Constant, Implemented
-_PC_MAX_CANON, Constant, Implemented
-_PC_MAX_INPUT, Constant, Implemented
-_PC_MAX_INPUT, Constant, Implemented
-_PC_NAME_MAX, Constant, Implemented
-_PC_PATH_MAX, Constant, Implemented
-_PC_PIPE_BUF, Constant, Implemented
-_PC_ASYNC_IO, Constant, Implemented
-_PC_CHOWN_RESTRICTED, Constant, Implemented
-_PC_NO_TRUNC, Constant, Implemented
-_PC_PRIO_IO, Constant, Implemented
-_PC_SYNC_IO, Constant, Implemented
-_PC_VDISABLE, Constant, Implemented
-@end example
-
-NOTE: The newlib unistd.h and sys/unistd.h are installed and the
-include search patch is used to get the right one. There are
-conflicts between the newlib unistd.h and RTEMS' version.
diff --git a/doc/posix1003.1/ch06.t b/doc/posix1003.1/ch06.t
deleted file mode 100644
index d9169a0f12..0000000000
--- a/doc/posix1003.1/ch06.t
+++ /dev/null
@@ -1,175 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Input and Output Primitives
-
-@section Pipes
-
-@subsection Create an Inter-Process Channel
-
-@example
-pipe(), Function, Dummy Implementation
-@end example
-
-NOTE: pipe() returns ENOSYS.
-
-@section File Descriptor Manipulation
-
-@subsection Duplicate an Open File Descriptor
-
-@example
-dup(), Function, Implemented
-dup2(), Function, Implemented
-@end example
-
-@section File Descriptor Deassignment
-
-@subsection Close a File
-
-@example
-close(), Function, Implemented
-@end example
-
-@section Input and Output
-
-@subsection Read from a File
-
-@example
-read(), Function, Implemented
-@end example
-
-@subsection Write to a File
-
-@example
-write(), Function, Implemented
-@end example
-
-@section Control Operations on Files
-
-@subsection Data Definitions for File Control Operations
-
-@subsection File Control
-
-@example
-struct flock, Type, Implemented
-fcntl(), Function, Implemented
-F_DUPFD, Constant, Implemented
-F_GETFD, Constant, Implemented
-F_GETLK, Constant, Implemented
-F_SETFD, Constant, Implemented
-F_GETFL, Constant, Implemented
-F_SETFL, Constant, Implemented
-F_SETLK, Constant, Implemented
-F_SETLKW, Constant, Implemented
-FD_CLOEXEC, Constant, Implemented
-F_RDLCK, Constant, Implemented
-F_UNLCK, Constant, Implemented
-F_WRLCK, Constant, Implemented
-O_ACCMODE, Constant, Implemented
-@end example
-
-NOTE: A number of constants are used by both @code{open} and @code{fcntl}.
-@code{O_CREAT}, @code{O_EXCL}, @code{O_NOCTTY}, @code{O_TRUNC},
-@code{O_APPEND}, @code{O_DSYNC}, @code{O_NONBLOCK}, @code{O_RSYNC},
-@code{O_SYNC}, @code{O_RDONLY}, @code{O_RDWR}, and @code{O_WRONLY}
-are also included in another section. @xref{Open a File}.
-
-@subsection Reposition Read/Write File Offset
-
-@example
-lseek(), Function, Implemented
-SEEK_SET, Constant, Implemented
-SEEK_CUR, Constant, Implemented
-SEEK_END, Constant, Implemented
-@end example
-
-@section File Synchronization
-
-@subsection Synchronize the State of a File
-
-@example
-fsync(), Function, Implemented
-@end example
-
-@subsection Synchronize the Data of a File
-
-@example
-fdatasync(), Function, Implemented
-@end example
-
-@section Asynchronous Input and Output
-
-@subsection Data Definitions for Asynchronous Input and Output
-
-@subsubsection Asynchronous I/O Control Block
-
-@example
-struct aiocb, Type, Untested Implementation
-@end example
-
-@subsubsection Asynchronous I/O Manifest Constants
-
-@example
-AIO_CANCELED, Constant, Implemented
-AIO_NOTCANCELED, Constant, Implemented
-AIO_ALLDONE, Constant, Implemented
-LIO_WAIT, Constant, Implemented
-LIO_NOWAIT, Constant, Implemented
-LIO_READ, Constant, Implemented
-LIO_WRITE, Constant, Implemented
-LIO_NOP, Constant, Implemented
-@end example
-
-@subsection Asynchronous Read
-
-@example
-aio_read(), Function, Dummy Implementation
-@end example
-
-@subsection Asynchronous Write
-
-@example
-aio_write(), Function, Dummy Implementation
-@end example
-
-@subsection List Directed I/O
-
-@example
-lio_listio(), Function, Dummy Implementation
-@end example
-
-@subsection Retrieve Error Status of Asynchronous I/O Operation
-
-@example
-aio_error(), Function, Dummy Implementation
-@end example
-
-@subsection Retrieve Return Status of Asynchronous I/O Operation
-
-@example
-aio_return(), Function, Dummy Implementation
-@end example
-
-@subsection Cancel Asynchronous I/O Request
-
-@example
-aio_cancel(), Function, Dummy Implementation
-@end example
-
-@subsection Wait for Asynchronous I/O Request
-
-@example
-aio_suspend(), Function, Dummy Implementation
-@end example
-
-@subsection Asynchronous File Synchronization
-
-@example
-aio_fsync(), Function, Dummy Implementation
-@end example
-
diff --git a/doc/posix1003.1/ch07.t b/doc/posix1003.1/ch07.t
deleted file mode 100644
index 9a14b74caa..0000000000
--- a/doc/posix1003.1/ch07.t
+++ /dev/null
@@ -1,207 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Device- and Class-Specific Functions
-
-@section General Terminal Interface
-
-@subsection Interface Characteristics
-
-@subsubsection Opening a Terminal Device File
-
-@subsubsection Process Groups (TTY)
-
-@subsubsection The Controlling Terminal
-
-@subsubsection Terminal Access Control
-
-@subsubsection Input Processing and Reading Data
-
-@subsubsection Canonical Mode Input Processing
-
-@subsubsection Noncanonical Mode Input Processing
-
-@lowersections
-
-@subsubsection Case A - MIN > 0 and TIME > 0
-
-@subsubsection Case B - MIN > 0 and TIME = 0
-
-@subsubsection Case C - MIN = 0 and TIME > 0
-
-@subsubsection Case D - MIN = 0 and TIME = 0
-
-@raisesections
-
-@subsubsection Writing Data and Output Processing
-
-@subsubsection Special Characters
-
-@example
-INTR, Constant, Implemented
-QUIT, Constant, Implemented
-ERASE, Constant, Implemented
-KILL, Constant, Implemented
-EOF, Constant, Implemented
-NL, Constant, Implemented
-EOL, Constant, Implemented
-SUSP, Constant, Implemented
-STOP, Constant, Implemented
-START, Constant, Implemented
-CR, Constant, Implemented
-@end example
-
-@subsubsection Modem Disconnect
-
-@subsubsection Closing a Terminal Device File
-
-@subsection Parameters That Can Be Set
-
-@subsubsection termios Structure
-
-@example
-tcflag_t, Type, Implemented
-cc_t, Type, Implemented
-struct termios, Type, Implemented
-@end example
-
-@subsubsection Input Modes
-
-@example
-BRKINT, Constant, Implemented
-ICRNL, Constant, Implemented
-IGNBREAK, Constant, Unimplemented
-IGNCR, Constant, Implemented
-IGNPAR, Constant, Implemented
-INLCR, Constant, Implemented
-INPCK, Constant, Implemented
-ISTRIP, Constant, Implemented
-IXOFF, Constant, Implemented
-IXON, Constant, Implemented
-PARMRK, Constant, Implemented
-@end example
-
-@subsubsection Output Modes
-
-@example
-OPOST, Constant, Implemented
-@end example
-
-@subsubsection Control Modes
-
-@example
-CLOCAL, Constant, Implemented
-CREAD, Constant, Implemented
-CSIZE, Constant, Implemented
-CS5, Constant, Implemented
-CS6, Constant, Implemented
-CS7, Constant, Implemented
-CS8, Constant, Implemented
-CSTOPB, Constant, Implemented
-HUPCL, Constant, Implemented
-PARENB, Constant, Implemented
-PARODD, Constant, Implemented
-@end example
-
-@subsubsection Local Modes
-
-@example
-ECHO, Constant, Implemented
-ECHOE, Constant, Implemented
-ECHOK, Constant, Implemented
-ECHONL, Constant, Implemented
-ICANON, Constant, Implemented
-IEXTEN, Constant, Implemented
-ISIG, Constant, Implemented
-NOFLSH, Constant, Implemented
-TOSTOP, Constant, Implemented
-@end example
-
-@subsubsection Special Control Characters
-
-@example
-VEOF, Constant, Implemented
-VEOL, Constant, Implemented
-VERASE, Constant, Implemented
-VINTR, Constant, Implemented
-VKILL, Constant, Implemented
-VQUIT, Constant, Implemented
-VSUSP, Constant, Implemented
-VSTART, Constant, Implemented
-VSTOP, Constant, Implemented
-VMIN, Constant, Implemented
-VTIME, Constant, Implemented
-@end example
-
-@subsection Baud Rate Values
-
-@example
-B0, Constant, Implemented
-B50, Constant, Implemented
-B75, Constant, Implemented
-B110, Constant, Implemented
-B134, Constant, Implemented
-B150, Constant, Implemented
-B200, Constant, Implemented
-B300, Constant, Implemented
-B600, Constant, Implemented
-B1200, Constant, Implemented
-B1800, Constant, Implemented
-B2400, Constant, Implemented
-B4800, Constant, Implemented
-B9600, Constant, Implemented
-B19200, Constant, Implemented
-B38400, Constant, Implemented
-@end example
-
-@subsubsection Baud Rate Functions
-
-@example
-cfgetospeed(), Function, Implemented
-cfsetospeed(), Function, Implemented
-cfgetispeed(), Function, Implemented
-cfsetispeed(), Function, Implemented
-TCIFLUSH, Constant, Implemented
-TCOFLUSH, Constant, Implemented
-TCIOFLUSH, Constant, Implemented
-TCOOFF, Constant, Implemented
-TCOON, Constant, Implemented
-TCIOOFF, Constant, Implemented
-TCIOON, Constant, Implemented
-@end example
-
-@section General Terminal Interface Control Functions
-
-@subsection Get and Set State
-
-@example
-tcgetattr(), Function, Implemented
-tcsetattr(), Function, Implemented
-@end example
-
-@subsection Line Control Functions
-
-@example
-tcsendbreak(), Function, Dummy Implementation
-tcdrain(), Function, Implemented
-tcflush(), Function, Dummy Implementation
-tcflow(), Function, Dummy Implementation
-@end example
-
-@subsection Get Foreground Process Group ID
-
-@example
-tcgetprgrp(), Function, Implemented, SUSP
-@end example
-
-@subsection Set Foreground Process Group ID
-
-@example
-tcsetprgrp(), Function, Dummy Implementation
-@end example
-
diff --git a/doc/posix1003.1/ch08.t b/doc/posix1003.1/ch08.t
deleted file mode 100644
index 4f505d5358..0000000000
--- a/doc/posix1003.1/ch08.t
+++ /dev/null
@@ -1,288 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Language-Specific Services for the C Programming Language
-
-@section Referenced C Language Routines
-
-ANSI C Section 4.2 --- Diagnostics
-
-@example
-assert(), Function, Implemented
-@end example
-
-ANSI C Section 4.3 --- Character Handling
-
-@example
-isalnum(), Function, Implemented
-isalpha(), Function, Implemented
-iscntrl(), Function, Implemented
-isdigit(), Function, Implemented
-isgraph(), Function, Implemented
-islower(), Function, Implemented
-isprint(), Function, Implemented
-ispunct(), Function, Implemented
-isspace(), Function, Implemented
-isupper(), Function, Implemented
-isxdigit(), Function, Implemented
-tolower(), Function, Implemented
-toupper(), Function, Implemented
-@end example
-
-ANSI C Section 4.4 --- Localization
-
-@example
-setlocale(), Function, Implemented
-@end example
-
-ANSI C Section 4.5 --- Mathematics
-
-@example
-acos(), Function, Implemented
-asin(), Function, Implemented
-atan(), Function, Implemented
-atan2(), Function, Implemented
-cos(), Function, Implemented
-sin(), Function, Implemented
-tan(), Function, Implemented
-cosh(), Function, Implemented
-sinh(), Function, Implemented
-tanh(), Function, Implemented
-exp(), Function, Implemented
-frexp(), Function, Implemented
-ldexp(), Function, Implemented
-log(), Function, Implemented
-log10(), Function, Implemented
-modf(), Function, Implemented
-pow(), Function, Implemented
-sqrt(), Function, Implemented
-ceil(), Function, Implemented
-fabs(), Function, Implemented
-floor(), Function, Implemented
-fmod(), Function, Implemented
-@end example
-
-ANSI C Section 4.6 --- Non-Local Jumps
-
-@example
-setjmp(), Function, Implemented
-longjmp(), Function, Implemented
-@end example
-
-ANSI C Section 4.9 --- Input/Output
-
-@example
-FILE, Type, Implemented
-clearerr(), Function, Implemented
-fclose(), Function, Implemented
-feof(), Function, Implemented
-ferror(), Function, Implemented
-fflush(), Function, Implemented
-fgetc(), Function, Implemented
-fgets(), Function, Implemented
-fopen(), Function, Implemented
-fputc(), Function, Implemented
-fputs(), Function, Implemented
-fread(), Function, Implemented
-freopen(), Function, Implemented
-fseek(), Function, Implemented
-ftell(), Function, Implemented
-fwrite(), Function, Implemented
-getc(), Function, Implemented
-getchar(), Function, Implemented
-gets(), Function, Implemented
-perror(), Function, Implemented
-printf(), Function, Implemented
-fprintf(), Function, Implemented
-sprintf(), Function, Implemented
-putc(), Function, Implemented
-putchar(), Function, Implemented
-puts(), Function, Implemented
-remove(), Function, Implemented
-rewind(), Function, Implemented
-scanf(), Function, Implemented
-fscanf(), Function, Implemented
-sscanf(), Function, Implemented
-setbuf(), Function, Implemented
-tmpfile(), Function, Implemented
-tmpnam(), Function, Implemented
-ungetc(), Function, Implemented
-@end example
-
-NOTE: @code{rename} is also included in another section. @ref{Rename a File}.
-
-ANSI C Section 4.10 --- General Utilities
-
-@example
-abs(), Function, Implemented
-atof(), Function, Implemented
-atoi(), Function, Implemented
-atol(), Function, Implemented
-rand(), Function, Implemented
-srand(), Function, Implemented
-calloc(), Function, Implemented
-free(), Function, Implemented
-malloc(), Function, Implemented
-realloc(), Function, Implemented
-abort(), Function, Implemented
-exit(), Function, Implemented
-bsearch(), Function, Implemented
-qsort(), Function, Implemented
-@end example
-
-NOTE: @code{getenv} is also included in another section.
-@ref{Environment Access}.
-
-ANSI C Section 4.11 --- String Handling
-
-@example
-strcpy(), Function, Implemented
-strncpy(), Function, Implemented
-strcat(), Function, Implemented
-strncat(), Function, Implemented
-strcmp(), Function, Implemented
-strncmp(), Function, Implemented
-strchr(), Function, Implemented
-strcspn(), Function, Implemented
-strpbrk(), Function, Implemented
-strrchr(), Function, Implemented
-strspn(), Function, Implemented
-strstr(), Function, Implemented
-strtok(), Function, Implemented
-strlen(), Function, Implemented
-@end example
-
-ANSI C Section 4.12 --- Date and Time Handling
-
-@example
-asctime(), Function, Implemented
-ctime(), Function, Implemented
-gmtime(), Function, Implemented
-localtime(), Function, Implemented
-mktime(), Function, Implemented
-strftime(), Function, Implemented
-@end example
-
-NOTE: RTEMS has no notion of time zones.
-
-NOTE: @code{time} is also included in another section.
-@ref{Get System Time}.
-
-From Surrounding Text
-
-@example
-EXIT_SUCCESS, Constant, Implemented
-EXIT_FAILURE, Constant, Implemented
-@end example
-
-
-@subsection Extensions to Time Functions
-
-@subsection Extensions to setlocale Function
-
-@example
-LC_CTYPE, Constant, Implemented
-LC_COLLATE, Constant, Implemented
-LC_TIME, Constant, Implemented
-LC_NUMERIC, Constant, Implemented
-LC_MONETARY, Constant, Implemented
-LC_ALL, Constant, Implemented
-@end example
-
-@section C Language Input/Output Functions
-
-@subsection Map a Stream Pointer to a File Descriptor
-
-@example
-fileno(), Function, Implemented
-STDIN_FILENO, Constant, Implemented
-STDOUT_FILENO, Constant, Implemented
-STDERR_FILENO, Constant, Implemented
-@end example
-
-@subsection Open a Stream on a File Descriptor
-
-@example
-fdopen(), Function, Implemented
-@end example
-
-@subsection Interactions of Other FILE-Type C Functions
-
-@subsection Operations on Files - the remove Function
-
-@subsection Temporary File Name - the tmpnam Function
-
-@subsection Stdio Locking Functions
-
-@example
-flockfile(), Function, Unimplemented
-ftrylockfile(), Function, Unimplemented
-funlockfile(), Function, Unimplemented
-@end example
-
-@subsection Stdio With Explicit Client Locking
-
-@example
-getc_unlocked(), Function, Unimplemented
-getchar_unlocked(), Function, Unimplemented
-putc_unlocked(), Function, Unimplemented
-putchar_unlocked(), Function, Unimplemented
-@end example
-
-@section Other C Language Functions
-
-@subsection Nonlocal Jumps
-
-@example
-sigjmp_buf, Type, Implemented
-sigsetjmp(), Function, Implemented
-siglongjmp(), Function, Implemented
-@end example
-
-@subsection Set Time Zone
-
-@example
-tzset(), Function, Unimplemented
-@end example
-
-@subsection Find String Token
-
-@example
-strtok_r(), Function, Implemented
-@end example
-
-@subsection ASCII Time Representation
-
-@example
-asctime_r(), Function, Implemented
-@end example
-
-@subsection Current Time Representation
-
-@example
-ctime_r(), Function, Implemented
-@end example
-
-@subsection Coordinated Universal Time
-
-@example
-gmtime_r(), Function, Implemented
-@end example
-
-@subsection Local Time
-
-@example
-localtime_r(), Function, Implemented
-@end example
-
-@subsection Pseudo-Random Sequence Generation Functions
-
-@example
-rand_r(), Function, Implemented
-@end example
-
diff --git a/doc/posix1003.1/ch09.t b/doc/posix1003.1/ch09.t
deleted file mode 100644
index eccb991e3f..0000000000
--- a/doc/posix1003.1/ch09.t
+++ /dev/null
@@ -1,38 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter System Databases
-
-@section System Databases Section
-
-@section Database Access
-
-@subsection Group Database Access
-
-@example
-struct group, Type, Implemented
-getgrgid(), Function, Implemented
-getgrgid_r(), Function, Implemented
-getgrname(), Function, Implemented
-getgrnam_r(), Function, Implemented
-@end example
-
-NOTE: Creates /etc/group if none exists.
-
-@subsection User Database Access
-
-@example
-struct passwd, Type, Implemented
-getpwuid(), Function, Implemented
-getpwuid_r(), Function, Implemented
-getpwnam(), Function, Implemented
-getpwnam_r(), Function, Implemented
-@end example
-
-NOTE: Creates /etc/passwd if none exists.
-
diff --git a/doc/posix1003.1/ch10.t b/doc/posix1003.1/ch10.t
deleted file mode 100644
index 074840c77e..0000000000
--- a/doc/posix1003.1/ch10.t
+++ /dev/null
@@ -1,68 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Data Interchange Format
-
-@section Archive/Interchange File Format
-
-@subsection Extended tar Format
-
-@example
-tar format, Type, Unimplemented
-TMAGIC, Constant, Unimplemented
-TMAGLEN, Constant, Unimplemented
-TVERSION, Constant, Unimplemented
-TVERSLEN, Constant, Unimplemented
-REGTYPE, Constant, Unimplemented
-AREGTYPE, Constant, Unimplemented
-LNKTYPE, Constant, Unimplemented
-SYMTYPE, Constant, Unimplemented
-CHRTYPE, Constant, Unimplemented
-BLKTYPE, Constant, Unimplemented
-DIRTYPE, Constant, Unimplemented
-FIFOTYPE, Constant, Unimplemented
-CONTTYPE, Constant, Unimplemented
-TSUID, Constant, Unimplemented
-TSGID, Constant, Unimplemented
-TSVTX, Constant, Unimplemented
-TUREAD, Constant, Unimplemented
-TUWRITE, Constant, Unimplemented
-TUEXEC, Constant, Unimplemented
-TGREAD, Constant, Unimplemented
-TGWRITE, Constant, Unimplemented
-TGEXEC, Constant, Unimplemented
-TOREAD, Constant, Unimplemented
-TOWRITE, Constant, Unimplemented
-TOEXEC, Constant, Unimplemented
-@end example
-
-NOTE: Requires <tar.h> which is not in newlib.
-
-@subsection Extended cpio Format
-
-@example
-cpio format, Type, Unimplemented
-C_IRUSER, Constant, Unimplemented
-C_IWUSER, Constant, Unimplemented
-C_IXUSER, Constant, Unimplemented
-C_IRGRP, Constant, Unimplemented
-C_IWGRP, Constant, Unimplemented
-C_IXGRP, Constant, Unimplemented
-C_IROTH, Constant, Unimplemented
-C_IWOTH, Constant, Unimplemented
-C_IXOTH, Constant, Unimplemented
-C_ISUID, Constant, Unimplemented
-C_ISGID, Constant, Unimplemented
-C_ISVTX, Constant, Unimplemented
-@end example
-
-NOTE: POSIX does not require a header file or structure. RedHat Linux
-5.0 does not have a <cpio.h> although Solaris 2.6 does.
-
-@subsection Multiple Volumes
-
diff --git a/doc/posix1003.1/ch11.t b/doc/posix1003.1/ch11.t
deleted file mode 100644
index 80c7e592f5..0000000000
--- a/doc/posix1003.1/ch11.t
+++ /dev/null
@@ -1,133 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Synchronization
-
-@section Semaphore Characteristics
-
-NOTE: Semaphores are implemented but only unnamed semaphores
-are currently tested.
-
-@example
-sem_t, Type, Implemented
-@end example
-
-@section Semaphore Functions
-
-@subsection Initialize an Unnamed Semaphore
-
-@example
-sem_init(), Function, Implemented
-SEM_FAILED, Constant, Implemented
-@end example
-
-@subsection Destroy an Unnamed Semaphore
-
-@example
-sem_destroy(), Function, Implemented
-@end example
-
-@subsection Initialize/Open a Named Semaphore
-
-@example
-sem_open(), Function, Implemented
-@end example
-
-@subsection Close a Named Semaphore
-
-@example
-sem_close(), Function, Implemented
-@end example
-
-@subsection Remove a Named Semaphore
-
-@example
-sem_unlink(), Function, Implemented
-@end example
-
-@subsection Lock a Semaphore
-
-@example
-sem_wait(), Function, Implemented
-sem_trywait(), Function, Implemented
-@end example
-
-@subsection Unlock a Semaphore
-
-@example
-sem_post(), Function, Implemented
-@end example
-
-@subsection Get the Value of a Semaphore
-
-@example
-sem_getvalue(), Function, Implemented
-@end example
-
-@section Mutexes
-
-@subsection Mutex Initialization Attributes
-
-@example
-pthread_mutexattr_init(), Function, Implemented
-pthread_mutexattr_destroy(), Function, Implemented
-pthread_mutexattr_getpshared(), Function, Implemented
-pthread_mutexattr_setpshared(), Function, Implemented
-PTHREAD_PROCESS_SHARED, Constant, Implemented
-PTHREAD_PROCESS_PRIVATE, Constant, Implemented
-@end example
-
-@subsection Initializing and Destroying a Mutex
-
-@example
-pthread_mutex_init(), Function, Implemented
-pthread_mutex_destroy(), Function, Implemented
-PTHREAD_MUTEX_INITIALIZER, Constant, Implemented
-@end example
-
-@subsection Locking and Unlocking a Mutex
-
-@example
-pthread_mutex_lock(), Function, Implemented
-pthread_mutex_trylock(), Function, Implemented
-pthread_mutex_unlock(), Function, Implemented
-@end example
-
-@section Condition Variables
-
-@subsection Condition Variable Initialization Attributes
-
-@example
-pthread_condattr_init(), Function, Implemented
-pthread_condattr_destroy(), Function, Implemented
-pthread_condattr_getpshared(), Function, Implemented
-pthread_condattr_setpshared(), Function, Implemented
-@end example
-
-@subsection Initialization and Destroying Condition Variables
-
-@example
-pthread_cond_init(), Function, Implemented
-pthread_cond_destroy(), Function, Implemented
-PTHREAD_COND_INITIALIZER, Constant, Implemented
-@end example
-
-@subsection Broadcasting and Signaling a Condition
-
-@example
-pthread_cond_signal(), Function, Implemented
-pthread_cond_broadcast(), Function, Implemented
-@end example
-
-@subsection Waiting on a Condition
-
-@example
-pthread_cond_wait(), Function, Implemented
-pthread_cond_timedwait(), Function, Implemented
-@end example
-
diff --git a/doc/posix1003.1/ch12.t b/doc/posix1003.1/ch12.t
deleted file mode 100644
index 4d9e59843a..0000000000
--- a/doc/posix1003.1/ch12.t
+++ /dev/null
@@ -1,77 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Memory Management
-
-@section Memory Locking Functions
-
-@subsection Lock/Unlock the Address Space of a Process
-
-@example
-mlockall(), Function, Unimplemented
-munlockall(), Function, Unimplemented
-MCL_CURRENT, Constant, Unimplemented
-MCL_FUTURE, Constant, Unimplemented
-@end example
-
-@subsection Lock/Unlock a Rand of Process Address Space
-
-@example
-mlock(), Function, Unimplemented
-munlock(), Function, Unimplemented
-@end example
-
-@section Memory Mapping Functions
-
-@subsection Map Process Addresses to a Memory Object
-
-@example
-mmap(), Function, Unimplemented
-PROT_READ, Constant, Unimplemented
-PROT_WRITE, Constant, Unimplemented
-PROT_EXEC, Constant, Unimplemented
-PROT_NONE, Constant, Unimplemented
-MAP_SHARED, Constant, Unimplemented
-MAP_PRIVATE, Constant, Unimplemented
-MAP_FIXED, Constant, Unimplemented
-@end example
-
-@subsection Unmap Previously Mapped Addresses
-
-@example
-munmap(), Function, Unimplemented
-@end example
-
-@subsection Change Memory Protection
-
-@example
-mprotect(), Function, Unimplemented
-@end example
-
-@subsection Memory Object Synchronization
-
-@example
-msync(), Function, Unimplemented, Unimplemented
-MS_ASYNC, Constant, Unimplemented
-MS_SYNC, Constant, Unimplemented
-MS_INVALIDATE, Constant, Unimplemented
-@end example
-
-@section Shared Memory Functions
-
-@subsection Open a Shared Memory Object
-
-@example
-shm_open(), Function, Unimplemented
-@end example
-
-@subsection Remove a Shared Memory Object
-
-@example
-shm_unlink(), Function, Unimplemented
-@end example
diff --git a/doc/posix1003.1/ch13.t b/doc/posix1003.1/ch13.t
deleted file mode 100644
index 899e188b4a..0000000000
--- a/doc/posix1003.1/ch13.t
+++ /dev/null
@@ -1,132 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Execution Scheduling
-
-@section Scheduling Parameters
-
-@example
-struct sched_param, Type, Implemented
-@end example
-
-@section Scheduling Policies
-
-@example
-SCHED_FIFO, Constant, Implemented
-SCHED_RR, Constant, Implemented
-SCHED_OTHER, Constant, Implemented
-@end example
-
-NOTE: RTEMS adds SCHED_SPORADIC.
-
-@subsection SCHED_FIFO
-
-@subsection SCHED_RR
-
-@subsection SCHED_OTHER
-
-@section Process Scheduling Functions
-
-@subsection Set Scheduling Parameters
-
-@example
-sched_setparam(), Function, Dummy Implementation
-@end example
-
-@subsection Get Scheduling Parameters
-
-@example
-sched_getparam(), Function, Dummy Implementation
-@end example
-
-@subsection Set Scheduling Policy and Scheduling Parameters
-
-@example
-sched_setscheduler(), Function, Dummy Implementation
-@end example
-
-@subsection Get Scheduling Policy
-
-@example
-sched_getscheduler(), Function, Dummy Implementation
-@end example
-
-@subsection Yield Processor
-
-@example
-sched_yield(), Function, Implemented
-@end example
-
-@subsection Get Scheduling Parameter Limits
-
-@example
-sched_get_priority_max(), Function, Implemented
-sched_get_priority_min(), Function, Implemented
-sched_get_priority_rr_get_interval(), Function, Implemented
-@end example
-
-@section Thread Scheduling
-
-@subsection Thread Scheduling Attributes
-
-@example
-PTHREAD_SCOPE_PROCESS, Constant, Implemented
-PTHREAD_SCOPE_SYSTEM, Constant, Implemented
-@end example
-
-@subsection Scheduling Contention Scope
-
-@subsection Scheduling Allocation Domain
-
-@subsection Scheduling Documentation
-
-@section Thread Scheduling Functions
-
-@subsection Thread Creation Scheduling Attributes
-
-@example
-pthread_attr_setscope(), Function, Implemented
-pthread_attr_getscope(), Function, Implemented
-pthread_attr_setinheritsched(), Function, Implemented
-pthread_attr_getinheritsched(), Function, Implemented
-pthread_attr_setschedpolicy(), Function, Implemented
-pthread_attr_getschedpolicy(), Function, Implemented
-pthread_attr_setschedparam(), Function, Implemented
-pthread_attr_getschedparam(), Function, Implemented
-PTHREAD_INHERIT_SCHED, Constant, Implemented
-PTHREAD_EXPLICIT_SCHED, Constant, Implemented
-@end example
-
-@subsection Dynamic Thread Scheduling Parameters Access
-
-@example
-pthread_setschedparam(), Function, Implemented
-pthread_getschedparam(), Function, Implemented
-@end example
-
-@section Synchronization Scheduling
-
-@subsection Mutex Initialization Scheduling Attributes
-
-@example
-pthread_mutexattr_setprotocol(), Function, Implemented
-pthread_mutexattr_getprotocol(), Function, Implemented
-pthread_mutexattr_setprioceiling(), Function, Implemented
-pthread_mutexattr_getprioceiling(), Function, Implemented
-PTHREAD_PRIO_NONE, Constant, Implemented
-PTHREAD_PRIO_INHERIT, Constant, Implemented
-PTHREAD_PRIO_PROTECT, Constant, Implemented
-@end example
-
-@subsection Change the Priority Ceiling of a Mutex
-
-@example
-pthread_mutex_setprioceiling(), Function, Implemented
-pthread_mutex_getprioceiling(), Function, Implemented
-@end example
-
diff --git a/doc/posix1003.1/ch14.t b/doc/posix1003.1/ch14.t
deleted file mode 100644
index aee520c37e..0000000000
--- a/doc/posix1003.1/ch14.t
+++ /dev/null
@@ -1,71 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Clocks and Timers
-
-@section Data Definitions for Clocks and Timers
-
-@subsection Time Value Specification Structures
-
-@example
-struct timespec, Type, Implemented
-struct itimerspec, Type, Implemented
-@end example
-
-@subsection Timer Event Notification Control Block
-
-@subsection Type Definitions
-
-@example
-clockid_t, Type, Implemented
-timerid_t, Type, Implemented
-@end example
-
-@subsection Timer Event Notification Manifest Constants
-
-@example
-CLOCK_REALTIME, Constant, Implemented
-TIMER_ABSTIME, Constant, Implemented
-@end example
-
-@section Clock and Timer Functions
-
-@subsection Clocks
-
-@example
-clock_settime(), Function, Partial Implementation
-clock_gettime(), Function, Partial Implementation
-clock_getres(), Function, Implemented
-@end example
-
-@subsection Create a Per-Process Timer
-
-@example
-timer_create(), Function, Implemented
-@end example
-
-@subsection Delete a Per-Process Timer
-
-@example
-timer_delete(), Function, Implemented
-@end example
-
-@subsection Per-Process Timers
-
-@example
-timer_settime(), Function, Implemented
-timer_gettime(), Function, Implemented
-timer_getoverrun(), Function, Implemented
-@end example
-
-@subsection High Resolution Sleep
-
-@example
-nanosleep(), Function, Implemented
-@end example
-
diff --git a/doc/posix1003.1/ch15.t b/doc/posix1003.1/ch15.t
deleted file mode 100644
index d5d586e9d1..0000000000
--- a/doc/posix1003.1/ch15.t
+++ /dev/null
@@ -1,72 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Message Passing
-
-@section Data Definitions for Message Queues
-
-@subsection Data Structures
-
-NOTE: Semaphores are implemented but only unnamed semaphores
-are currently tested.
-
-@example
-mqd_t, Type, Implemented
-struct mq_attr, Type, Implemented
-@end example
-
-@section Message Passing Functions
-
-@subsection Open a Message Queue
-
-@example
-mq_open(), Function, Implemented
-@end example
-
-@subsection Close a Message Queue
-
-@example
-mq_close(), Function, Implemented
-@end example
-
-@subsection Remove a Message Queue
-
-@example
-mq_unlink(), Function, Implemented
-@end example
-
-@subsection Send a Message to a Message Queue
-
-@example
-mq_send(), Function, Implemented
-@end example
-
-@subsection Receive a Message From a Message Queue
-
-@example
-mq_receive(), Function, Implemented
-@end example
-
-@subsection Notify Process That a Message is Available on a Queue
-
-@example
-mq_notify(), Function, Implemented
-@end example
-
-@subsection Set Message Queue Attributes
-
-@example
-mq_setattr(), Function, Implemented
-@end example
-
-@subsection Get Message Queue Attributes
-
-@example
-mq_getattr(), Function, Implemented
-@end example
-
diff --git a/doc/posix1003.1/ch16.t b/doc/posix1003.1/ch16.t
deleted file mode 100644
index 970b91fa95..0000000000
--- a/doc/posix1003.1/ch16.t
+++ /dev/null
@@ -1,72 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Thread Management
-
-@section Threads
-
-@section Thread Functions
-
-@subsection Thread Creation Attributes
-
-@example
-pthread_attr_init(), Function, Implemented
-pthread_attr_destroy(), Function, Implemented
-pthread_attr_setstacksize(), Function, Implemented
-pthread_attr_getstacksize(), Function, Implemented
-pthread_attr_setstackaddr(), Function, Implemented
-pthread_attr_getstackaddr(), Function, Implemented
-pthread_attr_setdetachstate(), Function, Implemented
-pthread_attr_getdetachstate(), Function, Implemented
-PTHREAD_CREATE_JOINABLE, Constant, Implemented
-PTHREAD_CREATE_DETACHED, Constant, Implemented
-@end example
-
-@subsection Thread Creation
-
-@example
-pthread_create(), Function, Implemented
-@end example
-
-@subsection Wait for Thread Termination
-
-@example
-pthread_join(), Function, Implemented
-@end example
-
-@subsection Detaching a Thread
-
-@example
-pthread_detach(), Function, Implemented
-@end example
-
-@subsection Thread Termination
-
-@example
-pthread_exit(), Function, Implemented
-@end example
-
-@subsection Get Thread ID
-
-@example
-pthread_self(), Function, Implemented
-@end example
-
-@subsection Compare Thread IDs
-
-@example
-pthread_equal(), Function, Implemented
-@end example
-
-@subsection Dynamic Package Initialization
-
-@example
-pthread_once(), Function, Implemented
-PTHREAD_ONCE_INIT, Constant, Implemented
-@end example
-
diff --git a/doc/posix1003.1/ch17.t b/doc/posix1003.1/ch17.t
deleted file mode 100644
index f5443f8f9d..0000000000
--- a/doc/posix1003.1/ch17.t
+++ /dev/null
@@ -1,31 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Thread-Specific Data
-
-@section Thread-Specific Data Functions
-
-@subsection Thread-Specific Data Key Creation
-
-@example
-pthread_key_create(), Function, Implemented
-@end example
-
-@subsection Thread-Specific Data Management
-
-@example
-pthread_key_setspecific(), Function, Implemented
-pthread_key_getspecific(), Function, Implemented
-@end example
-
-@subsection Thread-Specific Data Key Deletion
-
-@example
-pthread_key_delete(), Function, Implemented
-@end example
-
diff --git a/doc/posix1003.1/ch18.t b/doc/posix1003.1/ch18.t
deleted file mode 100644
index d939ff8650..0000000000
--- a/doc/posix1003.1/ch18.t
+++ /dev/null
@@ -1,66 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Thread Cancellation
-
-@section Thread Cancellation Overview
-
-@subsection Cancelability States
-
-@example
-PTHREAD_CANCEL_DISABLE, Constant, Implemented
-PTHREAD_CANCEL_ENABLE, Constant, Implemented
-PTHREAD_CANCEL_ASYNCHRONOUS, Constant, Implemented
-PTHREAD_CANCEL_DEFERRED, Constant, Implemented
-@end example
-
-@subsection Cancellation Points
-
-@subsection Thread Cancellation Cleanup Handlers
-
-@example
-PTHREAD_CANCELED, Constant, Unimplemented
-@end example
-
-@subsection Async-Cancel Safety
-
-@section Thread Cancellation Functions
-
-@subsection Canceling Execution of a Thread
-
-@example
-pthread_cancel(), Function, Implemented
-@end example
-
-@subsection Setting Cancelability State
-
-@example
-pthread_setcancelstate(), Function, Implemented
-pthread_setcanceltype(), Function, Implemented
-pthread_testcancel(), Function, Implemented
-@end example
-
-@subsection Establishing Cancellation Handlers
-
-@example
-pthread_cleanup_push(), Function, Implemented
-pthread_cleanup_pop(), Function, Implemented
-@end example
-
-@section Language-Independent Cancellation Functionality
-
-@subsection Requesting Cancellation
-
-@subsection Associating Cleanup Code With Scopes
-
-@subsection Controlling Cancellation Within Scopes
-
-@subsection Defined Cancellation Sequence
-
-@subsection List of Cancellation Points
-
diff --git a/doc/posix1003.1/posix1003_1.texi b/doc/posix1003.1/posix1003_1.texi
deleted file mode 100644
index 354527f5c1..0000000000
--- a/doc/posix1003.1/posix1003_1.texi
+++ /dev/null
@@ -1,138 +0,0 @@
-\input texinfo @c -*-texinfo-*-
-@c %**start of header
-@setfilename posix1003_1
-@syncodeindex vr fn
-@synindex ky cp
-@paragraphindent 0
-@c @smallbook
-@c %**end of header
-
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@c
-@c Master file for the POSIX 1003.1 Compliance Guide
-@c
-
-@include ../common/setup.texi
-
-@ignore
-@ifinfo
-@format
-START-INFO-DIR-ENTRY
-* RTEMS POSIX 1003.1 Compliance Guide (posix1003_1):
-END-INFO-DIR-ENTRY
-@end format
-@end ifinfo
-@end ignore
-
-@c
-@c Title Page Stuff
-@c
-
-@set edition @value{RTEMS-EDITION}
-@set version @value{RTEMS-VERSION}
-@set update-date @value{RTEMS-UPDATE-DATE}
-@set update-month @value{RTEMS-UPDATE-MONTH}
-
-@c
-@c I don't really like having a short title page. --joel
-@c
-@c @shorttitlepage RTEMS POSIX 1003.1 Compliance Guide
-
-@setchapternewpage odd
-@settitle RTEMS POSIX 1003.1 Compliance Guide
-@titlepage
-@finalout
-
-@title RTEMS POSIX 1003.1 Compliance Guide
-@subtitle Edition @value{edition}, for RTEMS @value{version}
-@sp 1
-@subtitle @value{update-month}
-@author On-Line Applications Research Corporation
-@page
-@include ../common/cpright.texi
-@end titlepage
-
-@c This prevents a black box from being printed on "overflow" lines.
-@c The alternative is to rework a sentence to avoid this problem.
-
-@include preface.texi
-@include ch01.texi
-@include ch02.texi
-@include ch03.texi
-@include ch04.texi
-@include ch05.texi
-@include ch06.texi
-@include ch07.texi
-@include ch08.texi
-@include ch09.texi
-@include ch10.texi
-@include ch11.texi
-@include ch12.texi
-@include ch13.texi
-@include ch14.texi
-@include ch15.texi
-@include ch16.texi
-@include ch17.texi
-@include ch18.texi
-@include ch19.texi
-
-@ifinfo
-@node Top, Preface, (dir), (dir)
-@top posix1003_1
-
-This is the online version of the RTEMS POSIX 1003.1 Compliance Guide.
-
-@menu
-* Preface::
-* General::
-* Terminology and General Requirements::
-* Process Primitives::
-* Process Environment::
-* Files and Directories::
-* Input and Output Primitives::
-* Device- and Class-Specific Functions::
-* Language-Specific Services for the C Programming Language::
-* System Databases::
-* Data Interchange Format::
-* Synchronization::
-* Memory Management::
-* Execution Scheduling::
-* Clocks and Timers::
-* Message Passing::
-* Thread Management::
-* Thread-Specific Data::
-* Thread Cancellation::
-* Compliance Summary::
-* Command and Variable Index::
-* Concept Index::
-@end menu
-
-@end ifinfo
-@c
-@c
-@c Need to copy the emacs stuff and "trailer stuff" (index, toc) into here
-@c
-
-@node Command and Variable Index, Concept Index, Overall Summary, Top
-@unnumbered Command and Variable Index
-
-There are currently no Command and Variable Index entries.
-
-@c @printindex fn
-
-@node Concept Index, , Command and Variable Index, Top
-@unnumbered Concept Index
-
-There are currently no Concept Index entries.
-@c @printindex cp
-
-@contents
-@bye
-
diff --git a/doc/posix1003.1/preface.texi b/doc/posix1003.1/preface.texi
deleted file mode 100644
index b9cb7ae4f0..0000000000
--- a/doc/posix1003.1/preface.texi
+++ /dev/null
@@ -1,29 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@ifinfo
-@node Preface, General, Top, Top
-@end ifinfo
-
-@unnumbered Preface
-
-This document lists the functions, constant, macros, feature flags,
-and types defined in the POSIX 1003.1 standard. Each section in
-this document corresponds to a section in the 1003.1 standard
-and the implementation status of the items required by the standard
-are listed.
-
-RTEMS supports a number of POSIX process, user, and group oriented
-routines in what is referred to as a "SUSP" (Single-User, Single
-Process) manner. RTEMS supports a single process, multithreaded
-POSIX 1003.1b environment. In a pure world, there would be
-no reason to even include routines like @code{getpid()} when there
-can only be one process. But providing routines like @code{getpid()}
-and making them work in a sensible fashion for an embedded environment
-while not returning ENOSYS (for not implemented) makes it significantly
-easier to port code from a UNIX environment without modifying it.
diff --git a/doc/posix1003.1/summarize b/doc/posix1003.1/summarize
deleted file mode 100755
index fc8631894a..0000000000
--- a/doc/posix1003.1/summarize
+++ /dev/null
@@ -1,199 +0,0 @@
-#! /bin/sh
-#
-# Generate the summary chapter
-#
-# $Id$
-#
-
-echo "@c"
-echo "@c DO NOT EDIT -- AUTOMATICALLY GENERATED!!!"
-echo "@c"
-echo
-echo "@chapter Compliance Summary"
-echo
-
-wc2()
-{
- pattern=$1
- shift
- grep "${pattern}" $* | wc -l
-}
-
-wc3()
-{
- pattern=$1
- filter=$2
- shift ; shift
- grep "${pattern}" $* | grep "${filter}" | wc -l
-}
-
-# adds the numbers passed on the command line
-addit()
-{
- sumx=0
- for x in $*
- do
- sumx=`expr $sumx + $x`
- done
- echo $sumx
-}
-
-summarize_chapter()
-{
- echo
- if [ $# -eq 1 ] ; then
- grep "^@chapter" $1 | \
- sed -e "s/^.chapter/@section/" \
- -e "s/$/ Chapter/"
- else
- echo "@section Overall Summary"
- fi
-
- echo
-
- # functions
-
- functions_total=`wc2 "()" $*`
- functions_implemented=` wc3 "()" "Implemented" $*`
- functions_unimplemented=` wc3 "()" "Unimplemented" $*`
- functions_unmplementable=`wc3 "()" "Unimplementable" $*`
- functions_partial=` wc3 "()" "Partial Implementation" $*`
- functions_dummy=` wc3 "()" "Dummy Implementation" $*`
- functions_untested=` wc3 "()" "Untested Implementation" $*`
-
- functions_sum=`addit ${functions_implemented} \
- ${functions_unimplemented} ${functions_unmplementable} \
- ${functions_partial} ${functions_dummy} \
- ${functions_untested}`
-
- # data types
-
- datatypes_total=`wc2 "Type," $*`
- datatypes_implemented=` wc3 "Type," "Implemented" $*`
- datatypes_unimplemented=` wc3 "Type," "Unimplemented" $*`
- datatypes_unmplementable=`wc3 "Type," "Unimplementable" $*`
- datatypes_partial=` wc3 "Type," "Partial Implementation" $*`
- datatypes_dummy=` wc3 "Type," "Dummy Implementation" $*`
- datatypes_untested=` wc3 "Type," "Untested Implementation" $*`
-
- datatypes_sum=`addit ${datatypes_implemented} \
- ${datatypes_unimplemented} ${datatypes_unmplementable} \
- ${datatypes_partial} ${datatypes_dummy} \
- ${datatypes_untested}`
-
- # feature flags
-
- features_total=`wc2 "Feature Flag," $*`
- features_implemented=` wc3 "Feature Flag," "Implemented" $*`
- features_unimplemented=` wc3 "Feature Flag," "Unimplemented" $*`
- features_unmplementable=`wc3 "Feature Flag," "Unimplementable" $*`
- features_partial=` wc3 "Feature Flag," "Partial Implementation" $*`
- features_dummy=` wc3 "Feature Flag," "Dummy Implementation" $*`
- features_untested=` wc3 "Feature Flag," "Untested Implementation" $*`
-
- features_sum=`addit ${features_implemented} \
- ${features_unimplemented} ${features_unmplementable} \
- ${features_partial} ${features_dummy} \
- ${features_untested}`
-
- # constants
-
- constants_total=`wc2 "Constant," $*`
- constants_implemented=` wc3 "Constant," "Implemented" $*`
- constants_unimplemented=` wc3 "Constant," "Unimplemented" $*`
- constants_unmplementable=`wc3 "Constant," "Unimplementable" $*`
- constants_partial=` wc3 "Constant," "Partial Implementation" $*`
- constants_dummy=` wc3 "Constant," "Dummy Implementation" $*`
- constants_untested=` wc3 "Constant," "Untested Implementation" $*`
-
- constants_sum=`addit ${constants_implemented} \
- ${constants_unimplemented} ${constants_unmplementable} \
- ${constants_partial} ${constants_dummy} \
- ${constants_untested}`
-
- # Now print the reports
-
- echo "@example"
- echo "Functions:"
- echo " Total Number : ${functions_total}"
- echo " Implemented : ${functions_implemented}"
- echo " Unimplemented : ${functions_unimplemented}"
- echo " Unimplementable : ${functions_unmplementable}"
- echo " Partial : ${functions_partial}"
- echo " Dummy : ${functions_dummy}"
- echo " Untested : ${functions_untested}"
- echo "@end example"
- echo
- if [ ${functions_sum} -ne ${functions_total} ] ; then
- echo "@sp 1"
- echo "@center @b{FUNCTION COUNTS DO NOT ADD UP!!}"
- echo "@sp 1"
- fi
-
- echo "@example"
- echo "Data Types:"
- echo " Total Number : ${datatypes_total}"
- echo " Implemented : ${datatypes_implemented}"
- echo " Unimplemented : ${datatypes_unimplemented}"
- echo " Unimplementable : ${datatypes_unmplementable}"
- echo " Partial : ${datatypes_partial}"
- echo " Dummy : ${datatypes_dummy}"
- echo " Untested : ${datatypes_untested}"
- echo "@end example"
- echo
- if [ ${datatypes_sum} -ne ${datatypes_total} ] ; then
- echo "@sp 1"
- echo "@center @b{DATA TYPE COUNTS DO NOT ADD UP!!}"
- echo "@sp 1"
- fi
-
- echo "@example"
- echo "Feature Flags:"
- echo " Total Number : ${features_total}"
- echo " Implemented : ${features_implemented}"
- echo " Unimplemented : ${features_unimplemented}"
- echo " Unimplementable : ${features_unmplementable}"
- echo " Partial : ${features_partial}"
- echo " Dummy : ${features_dummy}"
- echo " Untested : ${features_untested}"
- echo "@end example"
- echo
- if [ ${features_sum} -ne ${features_total} ] ; then
- echo "@sp 1"
- echo "@center @b{FEATURE FLAG COUNTS DO NOT ADD UP!!}"
- echo "@sp 1"
- fi
-
- echo "@example"
- echo "Constants:"
- echo " Total Number : ${constants_total}"
- echo " Implemented : ${constants_implemented}"
- echo " Unimplemented : ${constants_unimplemented}"
- echo " Unimplementable : ${constants_unmplementable}"
- echo " Partial : ${constants_partial}"
- echo " Dummy : ${constants_dummy}"
- echo " Untested : ${constants_untested}"
- echo "@end example"
- echo
- if [ ${constants_sum} -ne ${constants_total} ] ; then
- echo "@sp 1"
- echo "@center @b{CONSTANT COUNTS DO NOT ADD UP!!}"
- echo "@sp 1"
- fi
-}
-
-chapters="ch01.t ch02.t ch03.t ch04.t ch05.t ch06.t ch07.t ch08.t \
- ch09.t ch10.t ch11.t ch12.t ch13.t ch14.t ch15.t ch16.t ch17.t ch18.t"
-
-# go through the chapters one at a time
-for chapter in ${chapters}
-do
- summarize_chapter $chapter
- echo "@page"
-done
-
-# now generate the overall summary
-summarize_chapter ${chapters}
-
-
-
diff --git a/doc/posix_users/Makefile b/doc/posix_users/Makefile
deleted file mode 100644
index 8c862ebd29..0000000000
--- a/doc/posix_users/Makefile
+++ /dev/null
@@ -1,177 +0,0 @@
-#
-# COPYRIGHT (c) 1988-1999.
-# On-Line Applications Research Corporation (OAR).
-# All rights reserved.
-#
-# $Id$
-#
-
-PROJECT=posix_users
-
-include ../Make.config
-
-all: html info ps pdf
-
-dirs:
- $(make-dirs)
-
-COMMON_FILES=../common/cpright.texi
-
-GENERATED_FILES= \
- cancel.texi clock.texi cond.texi \
- cspecific.texi device.texi files.texi \
- io.texi key.texi memorymgmt.texi message.texi mutex.texi procenv.texi \
- process.texi sched.texi semaphores.texi signal.texi status.texi \
- systemdb.texi thread.texi timer.texi libc.texi libm.texi
-
-FILES= posix_users.texi preface.texi \
- $(COMMON_FILES) $(GENERATED_FILES)
-
-INFOFILES=$(wildcard $(PROJECT) $(PROJECT)-*)
-
-info: dirs $(FILES) $(PROJECT)
-# cp $(PROJECT) $(PROJECT)-* $(INFO_INSTALL)
- cp $(PROJECT) $(INFO_INSTALL)
-
-$(PROJECT): $(FILES)
- $(MAKEINFO) posix_users.texi
-
-dvi: dirs $(PROJECT).dvi
-ps: dirs $(PROJECT).ps
-pdf: dirs $(PROJECT).pdf
-
-$(PROJECT).pdf: $(FILES)
- $(TEXI2PDF) $(PROJECT).texi
- cp $(PROJECT).pdf $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).ps: $(PROJECT).dvi
- dvips -o $(PROJECT).ps $(PROJECT).dvi
- cp $(PROJECT).ps $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).dvi: $(FILES)
- $(TEXI2DVI) posix_users.texi
- cp $(PROJECT).dvi $(WWW_INSTALL)/$(PROJECT)
-
-html: dirs $(FILES)
- -mkdir -p $(WWW_INSTALL)/$(PROJECT)
- -cd .. ; gmake headers
- $(TEXI2WWW) $(TEXI2WWW_ARGS) -dir $(WWW_INSTALL)/$(PROJECT) \
- posix_users.texi
-
-clean:
- rm -f *.o $(PROG) *.txt core *.html $(PROJECT).pdf
- rm -f *.dvi *.ps *.log *.aux *.cp *.fn *.ky *.pg *.toc *.tp *.vr $(BASE)
- rm -f $(PROJECT) $(PROJECT)-* _* $(GENERATED_FILES)
- rm -f *.cps *.cpss *.fns *.jkys *.pgs *.tps *.vrs
-
-process.texi: process.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-procenv.texi: procenv.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-files.texi: files.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-thread.texi: thread.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-signal.texi: signal.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-mutex.texi: mutex.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-cond.texi: cond.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-key.texi: key.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-clock.texi: clock.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-timer.texi: timer.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-sched.texi: sched.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-io.texi: io.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-device.texi: device.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-cspecific.texi: cspecific.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-semaphores.texi: semaphores.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-memorymgmt.texi: memorymgmt.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-message.texi: message.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-cancel.texi: cancel.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-systemdb.texi: systemdb.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-status.texi: status.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-libc.texi: libc.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
-
-libm.texi: libm.t Makefile
- $(BMENU) -p "" \
- -u "Top" \
- -n "" ${*}.t
-
diff --git a/doc/posix_users/cancel.t b/doc/posix_users/cancel.t
deleted file mode 100644
index efbde29ec5..0000000000
--- a/doc/posix_users/cancel.t
+++ /dev/null
@@ -1,239 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Thread Cancellation Manager
-
-@section Introduction
-
-The
-thread cancellation manager is ...
-
-The directives provided by the thread cancellation manager are:
-
-@itemize @bullet
-@item @code{pthread_cancel} - Cancel Execution of a Thread
-@item @code{pthread_setcancelstate} - Set Cancelability State
-@item @code{pthread_setcanceltype} - Set Cancelability Type
-@item @code{pthread_testcancel} - Create Cancellation Point
-@item @code{pthread_cleanup_push} - Establish Cancellation Handler
-@item @code{pthread_cleanup_pop} - Remove Cancellation Handler
-@end itemize
-
-@section Background
-
-There is currently no text in this section.
-
-@section Operations
-
-There is currently no text in this section.
-
-@section Directives
-
-This section details the thread cancellation manager's directives.
-A subsection is dedicated to each of this manager's directives
-and describes the calling sequence, related constants, usage,
-and status codes.
-
-@c
-@c
-@c
-@page
-@subsection pthread_cancel - Cancel Execution of a Thread
-
-@findex pthread_cancel
-@cindex cancel execution of a thread
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int pthread_cancel(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection pthread_setcancelstate - Set Cancelability State
-
-@findex pthread_setcancelstate
-@cindex set cancelability state
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int pthread_setcancelstate(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection pthread_setcanceltype - Set Cancelability Type
-
-@findex pthread_setcanceltype
-@cindex set cancelability type
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int pthread_setcanceltype(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection pthread_testcancel - Create Cancellation Point
-
-@findex pthread_testcancel
-@cindex create cancellation point
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int pthread_testcancel(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection pthread_cleanup_push - Establish Cancellation Handler
-
-@findex pthread_cleanup_push
-@cindex establish cancellation handler
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int pthread_cleanup_push(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection pthread_cleanup_pop - Remove Cancellation Handler
-
-@findex pthread_cleanup_pop
-@cindex remove cancellation handler
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int pthread_cleanup_push(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
diff --git a/doc/posix_users/clock.t b/doc/posix_users/clock.t
deleted file mode 100644
index a9f6aaf80f..0000000000
--- a/doc/posix_users/clock.t
+++ /dev/null
@@ -1,313 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Clock Manager
-
-@section Introduction
-
-The clock manager ...
-
-The directives provided by the clock manager are:
-
-@itemize @bullet
-@item @code{clock_gettime} - Obtain Time of Day
-@item @code{clock_settime} - Set Time of Day
-@item @code{clock_getres} - Get Clock Resolution
-@item @code{sleep} - Delay Process Execution
-@item @code{nanosleep} - Delay with High Resolution
-@item @code{gettimeofday} - Get the Time of Day
-@item @code{time} - Get time in seconds
-@end itemize
-
-@section Background
-
-There is currently no text in this section.
-
-@section Operations
-
-There is currently no text in this section.
-
-@section Directives
-
-This section details the clock manager's directives.
-A subsection is dedicated to each of this manager's directives
-and describes the calling sequence, related constants, usage,
-and status codes.
-
-@subsection clock_gettime -Obtain Time of Day
-
-@findex clock_gettime
-@cindex obtain time of day
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <time.h>
-
-int clock_gettime(
- clockid_t clock_id,
- struct timespec *tp
-);
-@end example
-
-@subheading STATUS CODES:
-
-On error, this routine returns -1 and sets errno to one of the following:
-
-@table @b
-@item EINVAL
-The tp pointer parameter is invalid.
-
-@item EINVAL
-The clock_id specified is invalid.
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection clock_settime - Set Time of Day
-
-@findex clock_settime
-@cindex set time of day
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <time.h>
-
-int clock_settime(
- clockid_t clock_id,
- const struct timespec *tp
-);
-@end example
-
-@subheading STATUS CODES:
-
-On error, this routine returns -1 and sets errno to one of the following:
-
-@table @b
-@item EINVAL
-The tp pointer parameter is invalid.
-
-@item EINVAL
-The clock_id specified is invalid.
-
-@item EINVAL
-The contents of the tp structure are invalid.
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection clock_getres - Get Clock Resolution
-
-@findex clock_getres
-@cindex get clock resolution
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <time.h>
-
-int clock_getres(
- clockid_t clock_id,
- struct timespec *res
-);
-@end example
-
-@subheading STATUS CODES:
-
-On error, this routine returns -1 and sets errno to one of the following:
-
-@table @b
-@item EINVAL
-The res pointer parameter is invalid.
-
-@item EINVAL
-The clock_id specified is invalid.
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-If res is NULL, then the resolution is not returned.
-
-@c
-@c
-@c
-@page
-@subsection sleep - Delay Process Execution
-
-@findex sleep
-@cindex delay process execution
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <time.h>
-
-unsigned int sleep(
- unsigned int seconds
-);
-@end example
-
-@subheading STATUS CODES:
-
-This routine returns the number of unslept seconds.
-
-@subheading DESCRIPTION:
-
-The @code{sleep()} function delays the calling thread by the specified
-number of @code{seconds}.
-
-@subheading NOTES:
-
-This call is interruptible by a signal.
-
-@c
-@c
-@c
-@page
-@subsection nanosleep - Delay with High Resolution
-
-@findex nanosleep
-@cindex delay with high resolution
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <time.h>
-
-int nanosleep(
- const struct timespec *rqtp,
- struct timespec *rmtp
-);
-@end example
-
-@subheading STATUS CODES:
-
-On error, this routine returns -1 and sets errno to one of the following:
-
-@table @b
-@item EINTR
-The routine was interrupted by a signal.
-
-@item EAGAIN
-The requested sleep period specified negative seconds or nanoseconds.
-
-@item EINVAL
-The requested sleep period specified an invalid number for the nanoseconds
-field.
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-This call is interruptible by a signal.
-
-@c
-@c
-@c
-@page
-@subsection gettimeofday - Get the Time of Day
-
-@findex gettimeofday
-@cindex get the time of day
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <sys/time.h>
-#include <unistd.h>
-
-int gettimeofday(
- struct timeval *tp,
- struct timezone *tzp
-);
-@end example
-
-@subheading STATUS CODES:
-
-On error, this routine returns -1 and sets @code{errno} as appropriate.
-
-@table @b
-@item EPERM
-@code{settimeofdat} is called by someone other than the superuser.
-
-@item EINVAL
-Timezone (or something else) is invalid.
-
-@item EFAULT
-One of @code{tv} or @code{tz} pointed outside your accessible address
-space
-
-@end table
-
-@subheading DESCRIPTION:
-
-This routine returns the current time of day in the @code{tp} structure.
-
-@subheading NOTES:
-
-Currently, the timezone information is not supported. The @code{tzp}
-argument is ignored.
-
-@c
-@c
-@c
-@page
-@subsection time - Get time in seconds
-
-@findex time
-@cindex get time in seconds
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <time.h>
-
-int time(
- time_t *tloc
-);
-@end example
-
-@subheading STATUS CODES:
-
-This routine returns the number of seconds since the Epoch.
-
-@subheading DESCRIPTION:
-
-@code{time} returns the time since 00:00:00 GMT, January 1, 1970,
-measured in seconds
-
-If @code{tloc} in non null, the return value is also stored in the
-memory pointed to by @code{t}.
-
-@subheading NOTES:
-
-NONE
-
diff --git a/doc/posix_users/cond.t b/doc/posix_users/cond.t
deleted file mode 100644
index 688cf31331..0000000000
--- a/doc/posix_users/cond.t
+++ /dev/null
@@ -1,383 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Condition Variable Manager
-
-@section Introduction
-
-The condition variable manager ...
-
-The directives provided by the condition variable manager are:
-
-@itemize @bullet
-@item @code{pthread_condattr_init} - Initialize a Condition Variable Attribute Set
-@item @code{pthread_condattr_destroy} - Destroy a Condition Variable Attribute Set
-@item @code{pthread_condattr_setpshared} - Set Process Shared Attribute
-@item @code{pthread_condattr_getpshared} - Get Process Shared Attribute
-@item @code{pthread_cond_init} - Initialize a Condition Variable
-@item @code{pthread_cond_destroy} - Destroy a Condition Variable
-@item @code{pthread_cond_signal} - Signal a Condition Variable
-@item @code{pthread_cond_broadcast} - Broadcast a Condition Variable
-@item @code{pthread_cond_wait} - Wait on a Condition Variable
-@item @code{pthread_cond_timedwait} - With with Timeout a Condition Variable
-@end itemize
-
-@section Background
-
-There is currently no text in this section.
-
-@section Operations
-
-There is currently no text in this section.
-
-@section Directives
-
-This section details the condition variable manager's directives.
-A subsection is dedicated to each of this manager's directives
-and describes the calling sequence, related constants, usage,
-and status codes.
-
-@c
-@c
-@c
-@page
-@subsection pthread_condattr_init - Initialize a Condition Variable Attribute Set
-
-@findex pthread_condattr_init
-@cindex initialize a condition variable attribute set
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_condattr_init(
- pthread_condattr_t *attr
-);
-@end example
-
-@subheading STATUS CODES:
-@table @b
-@item ENOMEM
-Insufficient memory is available to initialize the condition variable
-attributes object.
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection pthread_condattr_destroy - Destroy a Condition Variable Attribute Set
-
-@findex pthread_condattr_destroy
-@cindex destroy a condition variable attribute set
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_condattr_destroy(
- pthread_condattr_t *attr
-);
-@end example
-
-@subheading STATUS CODES:
-@table @b
-@item EINVAL
-The attribute object specified is invalid.
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection pthread_condattr_setpshared - Set Process Shared Attribute
-
-@findex pthread_condattr_setpshared
-@cindex set process shared attribute
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_condattr_setpshared(
- pthread_condattr_t *attr,
- int pshared
-);
-@end example
-
-@subheading STATUS CODES:
-
-@table @b
-@item EINVAL
-Invalid argument passed.
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection pthread_condattr_getpshared - Get Process Shared Attribute
-
-@findex pthread_condattr_getpshared
-@cindex get process shared attribute
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_condattr_getpshared(
- const pthread_condattr_t *attr,
- int *pshared
-);
-@end example
-
-@subheading STATUS CODES:
-
-@table @b
-@item EINVAL
-Invalid argument passed.
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-
-@c
-@c
-@c
-@page
-@subsection pthread_cond_init - Initialize a Condition Variable
-
-@findex pthread_cond_init
-@cindex initialize a condition variable
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_cond_init(
- pthread_cond_t *cond,
- const pthread_condattr_t *attr
-);
-@end example
-
-@subheading STATUS CODES:
-@table @b
-@item EAGAIN
-The system lacked a resource other than memory necessary to create the
-initialize the condition variable object.
-
-@item ENOMEM
-Insufficient memory is available to initialize the condition variable object.
-
-@item EBUSY
-The specified condition variable has already been initialized.
-
-@item EINVAL
-The specified attribute value is invalid.
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection pthread_cond_destroy - Destroy a Condition Variable
-
-@findex pthread_cond_destroy
-@cindex destroy a condition variable
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_cond_destroy(
- pthread_cond_t *cond
-);
-@end example
-
-@subheading STATUS CODES:
-@table @b
-@item EINVAL
-The specified condition variable is invalid.
-
-@item EBUSY
-The specified condition variable is currently in use.
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection pthread_cond_signal - Signal a Condition Variable
-
-@findex pthread_cond_signal
-@cindex signal a condition variable
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_cond_signal(
- pthread_cond_t *cond
-);
-@end example
-
-@subheading STATUS CODES:
-@table @b
-@item EINVAL
-The specified condition variable is not valid.
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-This routine should not be invoked from a handler from an asynchronous signal
-handler or an interrupt service routine.
-
-@c
-@c
-@c
-@page
-@subsection pthread_cond_broadcast - Broadcast a Condition Variable
-
-@findex pthread_cond_broadcast
-@cindex broadcast a condition variable
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_cond_broadcast(
- pthread_cond_t *cond
-);
-@end example
-
-@subheading STATUS CODES:
-@table @b
-@item EINVAL
-The specified condition variable is not valid.
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-This routine should not be invoked from a handler from an asynchronous signal
-handler or an interrupt service routine.
-
-@c
-@c
-@c
-@page
-@subsection pthread_cond_wait - Wait on a Condition Variable
-
-@findex pthread_cond_wait
-@cindex wait on a condition variable
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_cond_wait(
- pthread_cond_t *cond,
- pthread_mutex_t *mutex
-);
-@end example
-
-@subheading STATUS CODES:
-@table @b
-@item EINVAL
-The specified condition variable or mutex is not initialized OR different
-mutexes were specified for concurrent pthread_cond_wait() and
-pthread_cond_timedwait() operations on the same condition variable OR
-the mutex was not owned by the current thread at the time of the call.
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection pthread_cond_timedwait - Wait with Timeout a Condition Variable
-
-@findex pthread_cond_timedwait
-@cindex wait with timeout a condition variable
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_cond_timedwait(
- pthread_cond_t *cond,
- pthread_mutex_t *mutex,
- const struct timespec *abstime
-);
-@end example
-
-@subheading STATUS CODES:
-@table @b
-@item EINVAL
-The specified condition variable or mutex is not initialized OR different
-mutexes were specified for concurrent pthread_cond_wait() and
-pthread_cond_timedwait() operations on the same condition variable OR
-the mutex was not owned by the current thread at the time of the call.
-
-@item ETIMEDOUT
-The specified time has elapsed without the condition variable being
-satisfied.
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
diff --git a/doc/posix_users/cspecific.t b/doc/posix_users/cspecific.t
deleted file mode 100644
index 156864da1b..0000000000
--- a/doc/posix_users/cspecific.t
+++ /dev/null
@@ -1,749 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Language-Specific Services for the C Programming Language Manager
-
-@section Introduction
-
-The
-language-specific services for the C programming language manager is ...
-
-The directives provided by the language-specific services for the C programming language manager are:
-
-@itemize @bullet
-@item @code{setlocale} - Set the Current Locale
-@item @code{fileno} - Obtain File Descriptor Number for this File
-@item @code{fdopen} - Associate Stream with File Descriptor
-@item @code{flockfile} - Acquire Ownership of File Stream
-@item @code{ftrylockfile} - Poll to Acquire Ownership of File Stream
-@item @code{funlockfile} - Release Ownership of File Stream
-@item @code{getc_unlocked} - Get Character without Locking
-@item @code{getchar_unlocked} - Get Character from stdin without Locking
-@item @code{putc_unlocked} - Put Character without Locking
-@item @code{putchar_unlocked} - Put Character to stdin without Locking
-@item @code{setjmp} - Save Context for Non-Local Goto
-@item @code{longjmp} - Non-Local Jump to a Saved Context
-@item @code{sigsetjmp} - Save Context with Signal Status for Non-Local Goto
-@item @code{siglongjmp} - Non-Local Jump with Signal Status to a Saved Context
-@item @code{tzset} - Initialize Time Conversion Information
-@item @code{strtok_r} - Reentrant Extract Token from String
-@item @code{asctime_r} - Reentrant struct tm to ASCII Time Conversion
-@item @code{ctime_r} - Reentrant time_t to ASCII Time Conversion
-@item @code{gmtime_r} - Reentrant UTC Time Conversion
-@item @code{localtime_r} - Reentrant Local Time Conversion
-@item @code{rand_r} - Reentrant Random Number Generation
-@end itemize
-
-@section Background
-
-There is currently no text in this section.
-
-@section Operations
-
-There is currently no text in this section.
-
-@section Directives
-
-This section details the language-specific services for the C programming language manager's directives.
-A subsection is dedicated to each of this manager's directives
-and describes the calling sequence, related constants, usage,
-and status codes.
-
-@c
-@c
-@c
-@page
-@subsection setlocale - Set the Current Locale
-
-@findex setlocale
-@cindex set the current locale
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int setlocale(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection fileno - Obtain File Descriptor Number for this File
-
-@findex fileno
-@cindex obtain file descriptor number for this file
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int fileno(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection fdopen - Associate Stream with File Descriptor
-
-@findex fdopen
-@cindex associate stream with file descriptor
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int fdopen(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection flockfile - Acquire Ownership of File Stream
-
-@findex flockfile
-@cindex acquire ownership of file stream
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int flockfile(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection ftrylockfile - Poll to Acquire Ownership of File Stream
-
-@findex ftrylockfile
-@cindex poll to acquire ownership of file stream
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int ftrylockfile(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection funlockfile - Release Ownership of File Stream
-
-@findex funlockfile
-@cindex release ownership of file stream
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int funlockfile(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection getc_unlocked - Get Character without Locking
-
-@findex getc_unlocked
-@cindex get character without locking
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int getc_unlocked(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection getchar_unlocked - Get Character from stdin without Locking
-
-@findex getchar_unlocked
-@cindex get character from stdin without locking
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int getchar_unlocked(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection putc_unlocked - Put Character without Locking
-
-@findex putc_unlocked
-@cindex put character without locking
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int putc_unlocked(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection putchar_unlocked - Put Character to stdin without Locking
-
-@findex putchar_unlocked
-@cindex put character to stdin without locking
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int putchar_unlocked(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection setjmp - Save Context for Non-Local Goto
-
-@findex setjmp
-@cindex save context for non
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int setjmp(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection longjmp - Non-Local Jump to a Saved Context
-
-@findex longjmp
-@cindex non
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int longjmp(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection sigsetjmp - Save Context with Signal Status for Non-Local Goto
-
-@findex sigsetjmp
-@cindex save context with signal status for non
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int sigsetjmp(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection siglongjmp - Non-Local Jump with Signal Status to a Saved Context
-
-@findex siglongjmp
-@cindex non
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int siglongjmp(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection tzset - Initialize Time Conversion Information
-
-@findex tzset
-@cindex initialize time conversion information
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int tzset(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection strtok_r - Reentrant Extract Token from String
-
-@findex strtok_r
-@cindex reentrant extract token from string
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int strtok_r(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection asctime_r - Reentrant struct tm to ASCII Time Conversion
-
-@findex asctime_r
-@cindex reentrant struct tm to ascii time conversion
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int asctime_r(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection ctime_r - Reentrant time_t to ASCII Time Conversion
-
-@findex ctime_r
-@cindex reentrant time_t to ascii time conversion
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int ctime_r(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection gmtime_r - Reentrant UTC Time Conversion
-
-@findex gmtime_r
-@cindex reentrant utc time conversion
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int gmtime_r(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection localtime_r - Reentrant Local Time Conversion
-
-@findex localtime_r
-@cindex reentrant local time conversion
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int localtime_r(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection rand_r - Reentrant Random Number Generation
-
-@findex rand_r
-@cindex reentrant random number generation
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int rand_r(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
diff --git a/doc/posix_users/device.t b/doc/posix_users/device.t
deleted file mode 100644
index f4f2ad4c24..0000000000
--- a/doc/posix_users/device.t
+++ /dev/null
@@ -1,540 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Device- and Class- Specific Functions Manager
-
-@section Introduction
-
-The device- and class- specific functions manager is ...
-
-The directives provided by the device- and class- specific functions
-manager are:
-
-@itemize @bullet
-@item @code{cfgetispeed} - Reads terminal input baud rate
-@item @code{cfgetospeed} - Reads terminal output baud rate
-@item @code{cfsetispeed} - Sets terminal input baud rate
-@item @code{cfsetospeed} - Set terminal output baud rate
-@item @code{tcgetattr} - Gets terminal attributes
-@item @code{tcsetattr} - Set terminal attributes
-@item @code{tcsendbreak} - Sends a break to a terminal
-@item @code{tcdrain} - Waits for all output to be transmitted to the terminal
-@item @code{tcflush} - Discards terminal data
-@item @code{tcflow} - Suspends/restarts terminal output
-@item @code{tcgetpgrp} - Gets foreground process group ID
-@item @code{tcsetpgrp} - Sets foreground process group ID
-@end itemize
-
-@section Background
-
-There is currently no text in this section.
-
-@section Operations
-
-There is currently no text in this section.
-
-@section Directives
-
-This section details the device- and class- specific functions manager's
-directives. A subsection is dedicated to each of this manager's directives
-and describes the calling sequence, related constants, usage,
-and status codes.
-
-@c
-@c
-@c
-@page
-@subsection cfgetispeed - Reads terminal input baud rate
-
-@findex cfgetispeed
-@cindex reads terminal input baud rate
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <termios.h>
-
-int cfgetispeed(
- const struct termios *p
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-The @code{cfgetispeed()} function returns a code for baud rate.
-
-@subheading DESCRIPTION:
-
-The @code{cfsetispeed()} function stores a code for the terminal speed
-stored in a struct termios. The codes are defined in @code{<termios.h>}
-by the macros BO, B50, B75, B110, B134, B150, B200, B300, B600, B1200,
-B1800, B2400, B4800, B9600, B19200, and B38400.
-
-The @code{cfsetispeed()} function does not do anything to the hardware.
-It merely stores a value for use by @code{tcsetattr()}.
-
-@subheading NOTES:
-
-Baud rates are defined by symbols, such as B110, B1200, B2400. The actual
-number returned for any given speed may change from system to system.
-
-@c
-@c
-@c
-@page
-@subsection cfgetospeed - Reads terminal output baud rate
-
-@findex cfgetospeed
-@cindex reads terminal output baud rate
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <termios.h>
-
-int cfgetospeed(
- const struct termios *p
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-The @code{cfgetospeed()} function returns the termios code for the baud rate.
-
-@subheading DESCRIPTION:
-
-The @code{cfgetospeed()} function returns a code for the terminal speed
-stored in a @code{struct termios}. The codes are defined in @code{<termios.h>}
-by the macros BO, B50, B75, B110, B134, B150, B200, B300, B600, B1200, B1800,
-B2400, B4800, B9600, B19200, and B38400.
-
-The @code{cfgetospeed()} function does not do anything to the hardware.
-It merely returns the value stored by a previous call to @code{tcgetattr()}.
-
-@subheading NOTES:
-
-Baud rates are defined by symbols, such as B110, B1200, B2400. The actual
-number returned for any given speed may change from system to system.
-
-@c
-@c
-@c
-@page
-@subsection cfsetispeed - Sets terminal input baud rate
-
-@findex cfsetispeed
-@cindex sets terminal input baud rate
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <termios.h>
-
-int cfsetispeed(
- struct termios *p,
- speed_t speed
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-The @code{cfsetispeed()} function returns a zero when successful and
-returns -1 when an error occurs.
-
-@subheading DESCRIPTION:
-
-The @code{cfsetispeed()} function stores a code for the terminal speed
-stored in a struct termios. The codes are defined in @code{<termios.h>}
-by the macros B0, B50, B75, B110, B134, B150, B200, B300, B600, B1200,
-B1800, B2400, B4800, B9600, B19200, and B38400.
-
-@subheading NOTES:
-
-This function merely stores a value in the @code{termios} structure. It
-does not change the terminal speed until a @code{tcsetattr()} is done.
-It does not detect impossible terminal speeds.
-
-@c
-@c
-@c
-@page
-@subsection cfsetospeed - Sets terminal output baud rate
-
-@findex cfsetospeed
-@cindex sets terminal output baud rate
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <termios.h>
-
-int cfsetospeed(
- struct termios *p,
- speed_t speed
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-The @code{cfsetospeed()} function returns a zero when successful and
-returns -1 when an error occurs.
-
-
-@subheading DESCRIPTION:
-
-The @code{cfsetospeed()} function stores a code for the terminal speed stored
-in a struct @code{termios}. The codes are defiined in @code{<termios.h>} by the
-macros B0, B50, B75, B110, B134, B150, B200, B300, B600, B1200, B1800, B2400,
-B4800, B9600, B19200, and B38400.
-
-The @code{cfsetospeed()} function does not do anything to the hardware. It
-merely stores a value for use by @code{tcsetattr()}.
-
-@subheading NOTES:
-
-This function merely stores a value in the @code{termios} structure.
-It does not change the terminal speed until a @code{tcsetattr()} is done.
-It does not detect impossible terminal speeds.
-
-@c
-@c
-@c
-@page
-@subsection tcgetattr - Gets terminal attributes
-
-@findex tcgetattr
-@cindex gets terminal attributes
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <termios.h>
-#include <unistd.h>
-
-int tcgetattr(
- int fildes,
- struct termios *p
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item EBADF
-Invalid file descriptor
-
-@item ENOOTY
-Terminal control function attempted for a file that is not a terminal.
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{tcgetattr()} gets the parameters associated with the terminal
-referred to by @code{fildes} and stores them into the @code{termios()}
-structure pointed to by @code{termios_p}.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection tcsetattr - Set terminal attributes
-
-@findex tcsetattr
-@cindex set terminal attributes
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <termios.h>
-#include <unistd.h>
-
-int tcsetattr(
- int fildes,
- int options,
- const struct termios *tp
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection tcsendbreak - Sends a break to a terminal
-
-@findex tcsendbreak
-@cindex sends a break to a terminal
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int tcsendbreak(
- int fd
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-This routine is not currently supported by RTEMS but could be
-in a future version.
-
-@c
-@c
-@c
-@page
-@subsection tcdrain - Waits for all output to be transmitted to the terminal.
-
-@findex tcdrain
-@cindex waits for all output to be transmitted to the terminal.
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <termios.h>
-#include <unistd.h>
-
-int tcdrain(
- int fildes
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item EBADF
-Invalid file descriptor
-
-@item EINTR
-Function was interrupted by a signal
-
-@item ENOTTY
-Terminal control function attempted for a file that is not a terminal.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{tcdrain()} function waits until all output written to
-@code{fildes} has been transmitted.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection tcflush - Discards terminal data
-
-@findex tcflush
-@cindex discards terminal data
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int tcflush(
- int fd
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-This routine is not currently supported by RTEMS but could be
-in a future version.
-
-@c
-@c
-@c
-@page
-@subsection tcflow - Suspends/restarts terminal output.
-
-@findex tcflow
-@cindex suspends/restarts terminal output.
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int tcflow(
- int fd
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-This routine is not currently supported by RTEMS but could be
-in a future version.
-
-@c
-@c
-@c
-@page
-@subsection tcgetpgrp - Gets foreground process group ID
-
-@findex tcgetpgrp
-@cindex gets foreground process group id
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int tcgetpgrp(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-This routine is not currently supported by RTEMS but could be
-in a future version.
-
-@c
-@c
-@c
-@page
-@subsection tcsetpgrp - Sets foreground process group ID
-
-@findex tcsetpgrp
-@cindex sets foreground process group id
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int tcsetpgrp(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-This routine is not currently supported by RTEMS but could be
-in a future version.
-
-
diff --git a/doc/posix_users/files.t b/doc/posix_users/files.t
deleted file mode 100644
index 16018bb647..0000000000
--- a/doc/posix_users/files.t
+++ /dev/null
@@ -1,2347 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Files and Directories Manager
-
-@section Introduction
-
-The files and directories manager is ...
-
-The directives provided by the files and directories manager are:
-
-@itemize @bullet
-@item @code{opendir} - Open a Directory
-@item @code{readdir} - Reads a directory
-@item @code{rewinddir} - Resets the @code{readdir()} pointer
-@item @code{scandir} - Scan a directory for matching entries
-@item @code{telldir} - Return current location in directory stream
-@item @code{closedir} - Ends directory read operation
-@item @code{getdents} - Get directory entries
-@item @code{chdir} - Changes the current working directory
-@item @code{getcwd} - Gets current working directory
-@item @code{open} - Opens a file
-@item @code{creat} - Create a new file or rewrite an existing one
-@item @code{umask} - Sets a file creation mask
-@item @code{link} - Creates a link to a file
-@item @code{symlink} - Creates a symbolic link to a file
-@item @code{readlink} - Obtain the name of the link destination
-@item @code{mkdir} - Makes a directory
-@item @code{mkfifo} - Makes a FIFO special file
-@item @code{unlink} - Removes a directory entry
-@item @code{rmdir} - Delete a directory
-@item @code{rename} - Renames a file
-@item @code{stat} - Gets information about a file.
-@item @code{fstat} - Gets file status
-@item @code{lstat} - Gets file status
-@item @code{access} - Check permissions for a file.
-@item @code{chmod} - Changes file mode
-@item @code{fchmod} - Changes permissions of a file
-@item @code{chown} - Changes the owner and/ or group of a file
-@item @code{utime} - Change access and/or modification times of an inode
-@item @code{ftruncate} - Truncate a file to a specified length
-@item @code{truncate} - Truncate a file to a specified length
-@item @code{pathconf} - Gets configuration values for files
-@item @code{fpathconf} - Get configuration values for files
-@item @code{mknod} - Create a directory
-@end itemize
-
-@section Background
-
-@subsection Path Name Evaluation
-
-A pathname is a string that consists of no more than @code{PATH_MAX}
-bytes, including the terminating null character. A pathname has an optional
-beginning slash, followed by zero or more filenames separated by slashes.
-If the pathname refers to a directory, it may also have one or more trailing
-slashes. Multiple successive slahes are considered to be the same as
-one slash.
-
-POSIX allows a pathname that begins with precisely two successive slashes to be
-interpreted in an implementation-defined manner. RTEMS does not currently
-recognize this as a special condition. Any number of successive
-slashes is treated the same as a single slash. POSIX requires that
-an implementation treat more than two leading slashes as a single slash.
-
-@section Operations
-
-There is currently no text in this section.
-
-@section Directives
-
-This section details the files and directories manager's directives.
-A subsection is dedicated to each of this manager's directives
-and describes the calling sequence, related constants, usage,
-and status codes.
-
-@c
-@c
-@c
-@page
-@subsection opendir - Open a Directory
-
-@findex opendir
-@cindex open a directory
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <sys/types.h>
-#include <dirent.h>
-
-int opendir(
- const char *dirname
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item EACCES
-Search permission was denied on a component of the path
-prefix of @code{dirname}, or read permission is denied
-
-@item EMFILE
-Too many file descriptors in use by process
-
-@item ENFILE
-Too many files are currently open in the system.
-
-@item ENOENT
-Directory does not exist, or @code{name} is an empty string.
-
-@item ENOMEM
-Insufficient memory to complete the operation.
-
-@item ENOTDIR
-@code{name} is not a directory.
-
-@end table
-
-@subheading DESCRIPTION:
-
-This routine opens a directory stream corresponding to the
-directory specified by the @code{dirname} argument. The
-directory stream is positioned at the first entry.
-
-@subheading NOTES:
-
-The routine is implemented in Cygnus newlib.
-
-@c
-@c
-@c
-@page
-@subsection readdir - Reads a directory
-
-@findex readdir
-@cindex reads a directory
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <sys/types.h>
-#include <dirent.h>
-
-int readdir(
- DIR *dirp
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item EBADF
-Invalid file descriptor
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{readdir()} function returns a pointer to a structure @code{dirent}
-representing the next directory entry from the directory stream pointed to
-by @code{dirp}. On end-of-file, NULL is returned.
-
-The @code{readdir()} function may (or may not) return entries for . or .. Your
-program should tolerate reading dot and dot-dot but not require them.
-
-The data pointed to be @code{readdir()} may be overwritten by another call to
-@code{readdir()} for the same directory stream. It will not be overwritten by
-a call for another directory.
-
-@subheading NOTES:
-
-If @code{ptr} is not a pointer returned by @code{malloc()}, @code{calloc()}, or
-@code{realloc()} or has been deallocated with @code{free()} or
-@code{realloc()}, the results are not portable and are probably disastrous.
-
-The routine is implemented in Cygnus newlib.
-
-@c
-@c
-@c
-@page
-@subsection rewinddir - Resets the readdir() pointer
-
-@findex rewinddir
-@cindex resets the readdir() pointer
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <sys/types.h>
-#include <dirent.h>
-
-void rewinddir(
- DIR *dirp
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-No value is returned.
-
-@subheading DESCRIPTION:
-
-The @code{rewinddir()} function resets the position associated with
-the directory stream pointed to by @code{dirp}. It also causes the
-directory stream to refer to the current state of the directory.
-
-@subheading NOTES:
-
-NONE
-
-If @code{dirp} is not a pointer by @code{opendir()}, the results are
-undefined.
-
-The routine is implemented in Cygnus newlib.
-
-@c
-@c
-@c
-@page
-@subsection scandir - Scan a directory for matching entries
-
-@findex scandir
-@cindex scan a directory for matching entries
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <dirent.h>
-
-int scandir(
- const char *dir,
- struct dirent ***namelist,
- int (*select)(const struct dirent *),
- int (*compar)(const struct dirent **, const struct dirent **)
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item ENOMEM
-Insufficient memory to complete the operation.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{scandir()} function scans the directory @code{dir}, calling
-@code{select()} on each directory entry. Entries for which @code{select()}
-returns non-zero are stored in strings allocated via @code{malloc()},
-sorted using @code{qsort()} with the comparison function @code{compar()},
-and collected in array @code{namelist} which is allocated via @code{malloc()}.
-If @code{select} is NULL, all entries are selected.
-
-@subheading NOTES:
-
-The routine is implemented in Cygnus newlib.
-
-@c
-@c
-@c
-@page
-@subsection telldir - Return current location in directory stream
-
-@findex telldir
-@cindex return current location in directory stream
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <dirent.h>
-
-off_t telldir(
- DIR *dir
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item EBADF
-Invalid directory stream descriptor @code{dir}.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{telldir()} function returns the current location associated with the
-directory stream @code{dir}.
-
-@subheading NOTES:
-
-The routine is implemented in Cygnus newlib.
-
-@c
-@c
-@c
-@page
-@subsection closedir - Ends directory read operation
-
-@findex closedir
-@cindex ends directory read operation
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <sys/types.h>
-#include <dirent.h>
-
-int closedir(
- DIR *dirp
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item EBADF
-Invalid file descriptor
-
-@end table
-
-@subheading DESCRIPTION:
-
-The directory stream associated with @code{dirp} is closed.
-The value in @code{dirp} may not be usable after a call to
-@code{closedir()}.
-
-@subheading NOTES:
-
-NONE
-
-The argument to @code{closedir()} must be a pointer returned by
-@code{opendir()}. If it is not, the results are not portable and
-most likely unpleasant.
-
-The routine is implemented in Cygnus newlib.
-
-@c
-@c
-@c
-@page
-@subsection chdir - Changes the current working directory
-
-@findex chdir
-@cindex changes the current working directory
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <unistd.h>
-
-int chdir(
- const char *path
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item EACCES
-Search permission is denied for a directory in a file's path prefix.
-
-@item ENAMETOOLONG
-Length of a filename string exceeds PATH_MAX and _POSIX_NO_TRUNC is
-in effect.
-
-@item ENOENT
-A file or directory does not exist.
-
-@item ENOTDIR
-A component of the specified pathname was not a directory when directory
-was expected.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{chdir()} function causes the directory named by @code{path} to
-become the current working directory; that is, the starting point for
-searches of pathnames not beginning with a slash.
-
-If @code{chdir()} detects an error, the current working directory is not
-changed.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection getcwd - Gets current working directory
-
-@findex getcwd
-@cindex gets current working directory
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <unistd.h>
-
-int getcwd( void );
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item EINVAL
-Invalid argument
-
-@item ERANGE
-Result is too large
-
-@item EACCES
-Search permission is denied for a directory in a file's path prefix.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{getcwd()} function copies the absolute pathname of the current
-working directory to the character array pointed to by @code{buf}. The
-@code{size} argument is the number of bytes available in @code{buf}
-
-@subheading NOTES:
-
-There is no way to determine the maximum string length that @code{fetcwd()}
-may need to return. Applications should tolerate getting @code{ERANGE}
-and allocate a larger buffer.
-
-It is possible for @code{getcwd()} to return EACCES if, say, @code{login}
-puts the process into a directory without read access.
-
-The 1988 standard uses @code{int} instead of @code{size_t} for the second
-parameter.
-
-@c
-@c
-@c
-@page
-@subsection open - Opens a file
-
-@findex open
-@cindex opens a file
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-
-int open(
- const char *path,
- int oflag,
- mode_t mode
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-
-@item EACCES
-Search permission is denied for a directory in a file's path prefix.
-
-@item EEXIST
-The named file already exists.
-
-@item EINTR
-Function was interrupted by a signal.
-
-@item EISDIR
-Attempt to open a directory for writing or to rename a file to be a
-directory.
-
-@item EMFILE
-Too many file descriptors are in use by this process.
-
-@item ENAMETOOLONG
-Length of a filename string exceeds PATH_MAX and _POSIX_NO_TRUNC is in
-effect.
-
-@item ENFILE
-Too many files are currently open in the system.
-
-@item ENOENT
-A file or directory does not exist.
-
-@item ENOSPC
-No space left on disk.
-
-@item ENOTDIR
-A component of the specified pathname was not a directory when a directory
-was expected.
-
-@item ENXIO
-No such device. This error may also occur when a device is not ready, for
-example, a tape drive is off-line.
-
-@item EROFS
-Read-only file system.
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{open} function establishes a connection between a file and a file
-descriptor. The file descriptor is a small integer that is used by I/O
-functions to reference the file. The @code{path} argument points to the
-pathname for the file.
-
-The @code{oflag} argument is the bitwise inclusive OR of the values of
-symbolic constants. The programmer must specify exactly one of the following
-three symbols:
-
-@table @b
-@item O_RDONLY
-Open for reading only.
-
-@item O_WRONLY
-Open for writing only.
-
-@item O_RDWR
-Open for reading and writing.
-
-@end table
-
-Any combination of the following symbols may also be used.
-
-@table @b
-@item O_APPEND
-Set the file offset to the end-of-file prior to each write.
-
-@item O_CREAT
-If the file does not exist, allow it to be created. This flag indicates
-that the @code{mode} argument is present in the call to @code{open}.
-
-@item O_EXCL
-This flag may be used only if O_CREAT is also set. It causes the call
-to @code{open} to fail if the file already exists.
-
-@item O_NOCTTY
-If @code{path} identifies a terminal, this flag prevents that teminal from
-becoming the controlling terminal for thi9s process. See Chapter 8 for a
-description of terminal I/O.
-
-@item O_NONBLOCK
-Do no wait for the device or file to be ready or available. After the file
-is open, the @code{read} and @code{write} calls return immediately. If the
-process would be delayed in the read or write opermation, -1 is returned and
-@code{errno} is set to @code{EAGAIN} instead of blocking the caller.
-
-@item O_TRUNC
-This flag should be used only on ordinary files opened for writing. It
-causes the file to be tuncated to zero length..
-
-@end table
-
-Upon successful completion, @code{open} returns a non-negative file
-descriptor.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection creat - Create a new file or rewrite an existing one
-
-@findex creat
-@cindex create a new file or rewrite an existing one
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-
-int creat(
- const char *path,
- mode_t mode
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item EEXIST
-@code{path} already exists and O_CREAT and O_EXCL were used.
-
-@item EISDIR
-@code{path} refers to a directory and the access requested involved
-writing
-
-@item ETXTBSY
-@code{path} refers to an executable image which is currently being
-executed and write access was requested
-
-@item EFAULT
-@code{path} points outside your accessible address space
-
-@item EACCES
-The requested access to the file is not allowed, or one of the
-directories in @code{path} did not allow search (execute) permission.
-
-@item ENAMETOOLONG
-@code{path} was too long.
-
-@item ENOENT
-A directory component in @code{path} does not exist or is a dangling
-symbolic link.
-
-@item ENOTDIR
-A component used as a directory in @code{path} is not, in fact, a
-directory.
-
-@item EMFILE
-The process alreadyh has the maximum number of files open.
-
-@item ENFILE
-The limit on the total number of files open on the system has been
-reached.
-
-@item ENOMEM
-Insufficient kernel memory was available.
-
-@item EROFS
-@code{path} refers to a file on a read-only filesystem and write access
-was requested
-
-@end table
-
-@subheading DESCRIPTION:
-
-@code{creat} attempts to create a file and return a file descriptor for
-use in read, write, etc.
-
-@subheading NOTES:
-
-NONE
-
-The routine is implemented in Cygnus newlib.
-
-@c
-@c
-@c
-@page
-@subsection umask - Sets a file creation mask.
-
-@findex umask
-@cindex sets a file creation mask.
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <sys/types.h>
-#include <sys/stat.h>
-
-mode_t umask(
- mode_t cmask
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@subheading DESCRIPTION:
-
-The @code{umask()} function sets the process file creation mask to @code{cmask}.
-The file creation mask is used during @code{open()}, @code{creat()}, @code{mkdir()},
-@code{mkfifo()} calls to turn off permission bits in the @code{mode} argument.
-Bit positions that are set in @code{cmask} are cleared in the mode of the
-created file.
-
-@subheading NOTES:
-
-NONE
-
-The @code{cmask} argument should have only permission bits set. All other
-bits should be zero.
-
-In a system which supports multiple processes, the file creation mask is inherited
-across @code{fork()} and @code{exec()} calls. This makes it possible to alter the
-default permission bits of created files. RTEMS does not support multiple processes
-so this behavior is not possible.
-
-@c
-@c
-@c
-@page
-@subsection link - Creates a link to a file
-
-@findex link
-@cindex creates a link to a file
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <unistd.h>
-
-int link(
- const char *existing,
- const char *new
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-
-@item EACCES
-Search permission is denied for a directory in a file's path prefix
-
-@item EEXIST
-The named file already exists.
-
-@item EMLINK
-The number of links would exceed @code{LINK_MAX}.
-
-@item ENAMETOOLONG
-Length of a filename string exceeds PATH_MAX and _POSIX_NO_TRUNC is in
-effect.
-
-@item ENOENT
-A file or directory does not exist.
-@item ENOSPC
-No space left on disk.
-
-@item ENOTDIR
-A component of the specified pathname was not a directory when a directory
-was expected.
-
-@item EPERM
-Operation is not permitted. Process does not have the appropriate priviledges
-or permissions to perform the requested operations.
-
-@item EROFS
-Read-only file system.
-
-@item EXDEV
-Attempt to link a file to another file system.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{link()} function atomically creates a new link for an existing file
-and increments the link count for the file.
-
-If the @code{link()} function fails, no directories are modified.
-
-The @code{existing} argument should not be a directory.
-
-The caller may (or may not) need permission to access the existing file.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection symlink - Creates a symbolic link to a file
-
-@findex symlink
-@cindex creates a symbolic link to a file
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <unistd.h>
-
-int symlink(
- const char *topath,
- const char *frompath
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-
-@item EACCES
-Search permission is denied for a directory in a file's path prefix
-
-@item EEXIST
-The named file already exists.
-
-@item ENAMETOOLONG
-Length of a filename string exceeds PATH_MAX and _POSIX_NO_TRUNC is in
-effect.
-
-@item ENOENT
-A file or directory does not exist.
-
-@item ENOSPC
-No space left on disk.
-
-@item ENOTDIR
-A component of the specified pathname was not a directory when a directory
-was expected.
-
-@item EPERM
-Operation is not permitted. Process does not have the appropriate priviledges
-or permissions to perform the requested operations.
-
-@item EROFS
-Read-only file system.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{symlink()} function creates a symbolic link from the frombath to the
-topath. The symbolic link will be interpreted at run-time.
-
-If the @code{symlink()} function fails, no directories are modified.
-
-The caller may (or may not) need permission to access the existing file.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection readlink - Obtain the name of a symbolic link destination
-
-@findex readlink
-@cindex obtain the name of a symbolic link destination
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <unistd.h>
-
-int readlink(
- const char *path,
- char *buf,
- size_t bufsize
-);
-
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-
-@item EACCES
-Search permission is denied for a directory in a file's path prefix
-
-@item ENAMETOOLONG
-Length of a filename string exceeds PATH_MAX and _POSIX_NO_TRUNC is in
-effect.
-
-@item ENOENT
-A file or directory does not exist.
-
-@item ENOTDIR
-A component of the prefix pathname was not a directory when a directory
-was expected.
-
-@item ELOOP
-Too many symbolic links were encountered in the pathname.
-
-@item EINVAL
-The pathname does not refer to a symbolic link
-
-@item EFAULT
-An invalid pointer was passed into the @code{readlink()} routine.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{readlink()} function places the symbolic link destination into
-@code{buf} argument and returns the number of characters copied.
-
-If the symbolic link destination is longer than bufsize characters the
-name will be truncated.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection mkdir - Makes a directory
-
-@findex mkdir
-@cindex makes a directory
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <sys/types.h>
-#include <sys/stat.h>
-
-int mkdir(
- const char *path,
- mode_t mode
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item EACCES
-Search permission is denied for a directory in a file's path prefix
-
-@item EEXIST
-The name file already exist.
-
-@item EMLINK
-The number of links would exceed LINK_MAX
-
-@item ENAMETOOLONG
-Length of a filename string exceeds PATH_MAX and _POSIX_NO_TRUNC is in
-effect.
-
-@item ENOENT
-A file or directory does not exist.
-
-@item ENOSPC
-No space left on disk.
-
-@item ENOTDIR
-A component of the specified pathname was not a directory when a directory
-was expected.
-
-@item EROFS
-Read-only file system.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{mkdir()} function creates a new diectory named @code{path}. The
-permission bits (modified by the file creation mask) are set from @code{mode}.
-The owner and group IDs for the directory are set from the effective user ID
-and group ID.
-
-The new directory may (or may not) contain entries for.. and .. but is otherwise
-empty.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection mkfifo - Makes a FIFO special file
-
-@findex mkfifo
-@cindex makes a fifo special file
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <sys/types.h>
-#include <sys/stat.h>
-
-
-int mkfifo(
- const char *path,
- mode_t mode
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item EACCES
-Search permission is denied for a directory in a file's path prefix
-
-@item EEXIST
-The named file already exists.
-
-@item ENOENT
-A file or directory does not exist.
-
-@item ENOSPC
-No space left on disk.
-
-@item ENOTDIR
-A component of the specified @code{path} was not a directory when a directory
-was expected.
-
-@item EROFS
-Read-only file system.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{mkfifo()} function creates a new FIFO special file named @code{path}.
-The permission bits (modified by the file creation mask) are set from
-@code{mode}. The owner and group IDs for the FIFO are set from the efective
-user ID and group ID.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection unlink - Removes a directory entry
-
-@findex unlink
-@cindex removes a directory entry
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <unistd.h>
-
-int unlink(
- const char path
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item EACCES
-Search permission is denied for a directory in a file's path prefix
-
-@item EBUSY
-The directory is in use.
-
-@item ENAMETOOLONG
-Length of a filename string exceeds PATH_MAX and _POSIX_NO_TRUNC is in
-effect.
-
-@item ENOENT
-A file or directory does not exist.
-
-@item ENOTDIR
-A component of the specified @code{path} was not a directory when a directory
-was expected.
-
-@item EPERM
-Operation is not permitted. Process does not have the appropriate priviledges
-or permissions to perform the requested operations.
-
-@item EROFS
-Read-only file system.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{unlink} function removes the link named by @code{path} and decrements the
-link count of the file referenced by the link. When the link count goes to zero
-and no process has the file open, the space occupied by the file is freed and the
-file is no longer accessible.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection rmdir - Delete a directory
-
-@findex rmdir
-@cindex delete a directory
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <unistd.h>
-
-int rmdir(
- const char *pathname
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item EPERM
-The filesystem containing @code{pathname} does not support the removal
-of directories.
-
-@item EFAULT
-@code{pathname} points ouside your accessible address space.
-
-@item EACCES
-Write access to the directory containing @code{pathname} was not
-allowed for the process's effective uid, or one of the directories in
-@code{pathname} did not allow search (execute) permission.
-
-@item EPERM
-The directory containing @code{pathname} has the stickybit (S_ISVTX)
-set and the process's effective uid is neither the uid of the file to
-be delected nor that of the director containing it.
-
-@item ENAMETOOLONG
-@code{pathname} was too long.
-
-@item ENOENT
-A dirctory component in @code{pathname} does not exist or is a
-dangling symbolic link.
-
-@item ENOTDIR
-@code{pathname}, or a component used as a directory in @code{pathname},
-is not, in fact, a directory.
-
-@item ENOTEMPTY
-@code{pathname} contains entries other than . and .. .
-
-@item EBUSY
-@code{pathname} is the current working directory or root directory of
-some process
-
-@item EBUSY
-@code{pathname} is the current directory or root directory of some
-process.
-
-@item ENOMEM
-Insufficient kernel memory was available
-
-@item EROGS
-@code{pathname} refers to a file on a read-only filesystem.
-
-@item ELOOP
-@code{pathname} contains a reference to a circular symbolic link
-
-@end table
-
-@subheading DESCRIPTION:
-
-@code{rmdir} deletes a directory, which must be empty
-
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection rename - Renames a file
-
-@findex rename
-@cindex renames a file
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <unistd.h>
-
-int rename(
- const char *old,
- const char *new
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item EACCES
-Search permission is denied for a directory in a file's path prefix.
-
-@item EBUSY
-The directory is in use.
-
-@item EEXIST
-The named file already exists.
-
-@item EINVAL
-Invalid argument.
-
-@item EISDIR
-Attempt to open a directory for writing or to rename a file to be a
-directory.
-
-@item EMLINK
-The number of links would exceed LINK_MAX.
-
-@item ENAMETOOLONG
-Length of a filename string exceeds PATH_MAX and _POSIX_NO_TRUNC is
-in effect.
-
-@item ENOENT
-A file or directory does no exist.
-
-@item ENOSPC
-No space left on disk.
-
-@item ENOTDIR
-A component of the specified pathname was not a directory when a
-directory was expected.
-
-@item ENOTEMPTY
-Attempt to delete or rename a non-empty directory.
-
-@item EROFS
-Read-only file system
-
-@item EXDEV
-Attempt to link a file to another file system.
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{rename()} function causes the file known bo @code{old} to
-now be known as @code{new}.
-
-Ordinary files may be renamed to ordinary files, and directories may be
-renamed to directories; however, files cannot be converted using
-@code{rename()}. The @code{new} pathname may not contain a path prefix
-of @code{old}.
-
-@subheading NOTES:
-
-If a file already exists by the name @code{new}, it is removed. The
-@code{rename()} function is atomic. If the @code{rename()} detects an
-error, no files are removed. This guarantees that the
-@code{rename("x", "x")} does not remove @code{x}.
-
-You may not rename dot or dot-dot.
-
-The routine is implemented in Cygnus newlib using @code{link()} and
-@code{unlink()}.
-
-@c
-@c
-@c
-@page
-@subsection stat - Gets information about a file
-
-@findex stat
-@cindex gets information about a file
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <sys/types.h>
-#include <sys/stat.h>
-
-int stat(
- const char *path,
- struct stat *buf
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item EACCES
-Search permission is denied for a directory in a file's path prefix.
-
-@item EBADF
-Invalid file descriptor.
-
-@item ENAMETOOLONG
-Length of a filename string exceeds PATH_MAX and _POSIX_NO_TRUNC is
-in effect.
-
-@item ENOENT
-A file or directory does not exist.
-
-@item ENOTDIR
-A component of the specified pathname was not a directory when a
-directory was expected.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{path} argument points to a pathname for a file. Read, write, or
-execute permission for the file is not required, but all directories listed
-in @code{path} must be searchable. The @code{stat()} function obtains
-information about the named file and writes it to the area pointed to by
-@code{buf}.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection fstat - Gets file status
-
-@findex fstat
-@cindex gets file status
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <sys/types.h>
-#include <sys/stat.h>
-
-int fstat(
- int fildes,
- struct stat *buf
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item EBADF
-Invalid file descriptor
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{fstat()} function obtains information about the file
-associated with @code{fildes} and writes it to the area pointed
-to by the @code{buf} argument.
-
-@subheading NOTES:
-
-If the filesystem object referred to by @code{fildes} is a
-link, then the information returned in @code{buf} refers
-to the destination of that link. This is in contrast to
-@code{lstat()} which does not follow the link.
-
-@c
-@c
-@c
-@page
-@subsection lstat - Gets file status
-
-@findex lstat
-@cindex gets file status
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <sys/types.h>
-#include <sys/stat.h>
-
-int lstat(
- int fildes,
- struct stat *buf
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item EBADF
-Invalid file descriptor
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{lstat()} function obtains information about the file
-associated with @code{fildes} and writes it to the area pointed
-to by the @code{buf} argument.
-
-@subheading NOTES:
-
-If the filesystem object referred to by @code{fildes} is a
-link, then the information returned in @code{buf} refers
-to the link itself. This is in contrast to @code{fstat()}
-which follows the link.
-
-The @code{lstat()} routine is defined by BSD 4.3 and SVR4
-and not included in POSIX 1003.1b-1996.
-
-@c
-@c
-@c
-@page
-@subsection access - Check permissions for a file
-
-@findex access
-@cindex check permissions for a file
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <unistd.h>
-
-int access(
- const char *pathname,
- int mode
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item EACCES
-The requested access would be denied, either to the file itself or
-one of the directories in @code{pathname}.
-
-@item EFAULT
-@code{pathname} points outside your accessible address space.
-
-@item EINVAL
-@code{Mode} was incorrectly specified.
-
-@item ENAMETOOLONG
-@code{pathname} is too long.
-
-@item ENOENT
-A directory component in @code{pathname} would have been accessible but
-does not exist or was a dangling symbolic link.
-
-@item ENOTDIR
-A component used as a directory in @code{pathname} is not, in fact,
-a directory.
-
-@item ENOMEM
-Insufficient kernel memory was available.
-
-@end table
-
-@subheading DESCRIPTION:
-
-@code{Access} checks whether the process would be allowed to read, write or
-test for existence of the file (or other file system object) whose name is
-@code{pathname}. If @code{pathname} is a symbolic link permissions of the
-file referred by this symbolic link are tested.
-
-@code{Mode} is a mask consisting of one or more of R_OK, W_OK, X_OK and F_OK.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection chmod - Changes file mode.
-
-@findex chmod
-@cindex changes file mode.
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <sys/types.h>
-#include <sys/stat.h>
-
-int chmod(
- const char *path,
- mode_t mode
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item EACCES
-Search permission is denied for a directory in a file's path prefix
-
-@item ENAMETOOLONG
-Length of a filename string exceeds PATH_MAX and _POSIX_NO_TRUNC is in
-effect.
-
-@item ENOENT
-A file or directory does not exist.
-
-@item ENOTDIR
-A component of the specified pathname was not a directory when a directory
-was expected.
-
-@item EPERM
-Operation is not permitted. Process does not have the appropriate priviledges
-or permissions to perform the requested operations.
-
-@item EROFS
-Read-only file system.
-
-@end table
-
-@subheading DESCRIPTION:
-
-Set the file permission bits, the set user ID bit, and the set group ID bit
-for the file named by @code{path} to @code{mode}. If the effective user ID
-does not match the owner of the file and the calling process does not have
-the appropriate privileges, @code{chmod()} returns -1 and sets @code{errno} to
-@code{EPERM}.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection fchmod - Changes permissions of a file
-
-@findex fchmod
-@cindex changes permissions of a file
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <sys/types.h>
-#include <sys/stat.h>
-
-int fchmod(
- int fildes,
- mode_t mode
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item EACCES
-Search permission is denied for a directory in a file's path prefix.
-
-@item EBADF
-The descriptor is not valid.
-
-@item EFAULT
-@code{path} points outside your accessible address space.
-
-@item EIO
-A low-level I/o error occurred while modifying the inode.
-
-@item ELOOP
-@code{path} contains a circular reference
-
-@item ENAMETOOLONG
-Length of a filename string exceeds PATH_MAX and _POSIX_NO_TRUNC is
-in effect.
-
-@item ENOENT
-A file or directory does no exist.
-
-@item ENOMEM
-Insufficient kernel memory was avaliable.
-
-@item ENOTDIR
-A component of the specified pathname was not a directory when a
-directory was expected.
-
-@item EPERM
-The effective UID does not match the owner of the file, and is not
-zero
-
-@item EROFS
-Read-only file system
-@end table
-
-@subheading DESCRIPTION:
-
-The mode of the file given by @code{path} or referenced by
-@code{filedes} is changed.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection getdents - Get directory entries
-
-@findex getdents
-@cindex get directory entries
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <unistd.h>
-#include <linux/dirent.h>
-#include <linux/unistd.h>
-
-long getdents(
- int dd_fd,
- char *dd_buf,
- int dd_len
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-A successful call to @code{getdents} returns th the number of bytes read.
-On end of directory, 0 is returned. When an error occurs, -1 is returned,
-and @code{errno} is set appropriately.
-
-@table @b
-@item EBADF
-Invalid file descriptor @code{fd}.
-
-@item EFAULT
-Argument points outside the calling process's address space.
-
-@item EINVAL
-Result buffer is too small.
-
-@item ENOENT
-No such directory.
-
-@item ENOTDIR
-File descriptor does not refer to a directory.
-
-@end table
-
-@subheading DESCRIPTION:
-
-@code{getdents} reads several @code{dirent} structures from the directory
-pointed by @code{fd} into the memory area pointed to by @code{dirp}. The
-parameter @code{count} is the size of the memory area.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection chown - Changes the owner and/or group of a file.
-
-@findex chown
-@cindex changes the owner and/or group of a file.
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <sys/types.h>
-#include <unistd.h>
-
-int chown(
- const char *path,
- uid_t owner,
- gid_t group
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item EACCES
-Search permission is denied for a directory in a file's path prefix
-
-@item EINVAL
-Invalid argument
-
-@item ENAMETOOLONG
-Length of a filename string exceeds PATH_MAX and _POSIX_NO_TRUNC is in
-effect.
-
-@item ENOENT
-A file or directory does not exist.
-
-@item ENOTDIR
-A component of the specified pathname was not a directory when a directory
-was expected.
-
-@item EPERM
-Operation is not permitted. Process does not have the appropriate priviledges
-or permissions to perform the requested operations.
-
-@item EROFS
-Read-only file system.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The user ID and group ID of the file named by @code{path} are set to
-@code{owner} and @code{path}, respectively.
-
-For regular files, the set group ID (S_ISGID) and set user ID (S_ISUID)
-bits are cleared.
-
-Some systems consider it a security violation to allow the owner of a file to
-be changed, If users are billed for disk space usage, loaning a file to
-another user could result in incorrect billing. The @code{chown()} function
-may be restricted to privileged users for some or all files. The group ID can
-still be changed to one of the supplementary group IDs.
-
-@subheading NOTES:
-
-This function may be restricted for some file. The @code{pathconf} function
-can be used to test the @code{_PC_CHOWN_RESTRICTED} flag.
-
-
-
-@c
-@c
-@c
-@page
-@subsection utime - Change access and/or modification times of an inode
-
-@findex utime
-@cindex change access and/or modification times of an inode
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <sys/types.h>
-
-int utime(
- const char *filename,
- struct utimbuf *buf
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item EACCES
-Permission to write the file is denied
-
-@item ENOENT
-@code{Filename} does not exist
-
-@end table
-
-@subheading DESCRIPTION:
-
-@code{Utime} changes the access and modification times of the inode
-specified by @code{filename} to the @code{actime} and @code{modtime}
-fields of @code{buf} respectively. If @code{buf} is NULL, then the
-access and modification times of the file are set to the current time.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection ftruncate - truncate a file to a specified length
-
-@findex ftruncate
-@cindex truncate a file to a specified length
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <unistd.h>
-
-int ftrunctate(
- int fd,
- size_t length
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item ENOTDIR
-A component of the path prefix is not a directory.
-
-@item EINVAL
-The pathname contains a character with the high-order bit set.
-
-@item ENAMETOOLONG
-A component of a pathname exceeded 255 characters, or an entire
-path name exceeded 1023 characters.
-
-@item ENOENT
-The named file does not exist.
-
-@item EACCES
-The named file is not writable by the user.
-
-@item EACCES
-Search permission is denied for a component of the path prefix.
-
-@item ELOOP
-Too many symbolic links were encountered in translating the
-pathname
-
-@item EISDIR
-The named file is a directory.
-
-@item EROFS
-The named file resides on a read-only file system
-
-@item ETXTBSY
-The file is a pure procedure (shared text) file that is being
-executed
-
-@item EIO
-An I/O error occurred updating the inode.
-
-@item EFAULT
-@code{Path} points outside the process's allocated address space.
-
-@item EBADF
-The @code{fd} is not a valid descriptor.
-
-@end table
-
-@subheading DESCRIPTION:
-
-@code{truncate()} causes the file named by @code{path} or referenced by
-@code{fd} to be truncated to at most @code{length} bytes in size. If the
-file previously was larger than this size, the extra data is lost. With
-@code{ftruncate()}, the file must be open for writing.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection truncate - truncate a file to a specified length
-
-@findex truncate
-@cindex truncate a file to a specified length
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <unistd.h>
-
-int trunctate(
- const char *path,
- size_t length
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item ENOTDIR
-A component of the path prefix is not a directory.
-
-@item EINVAL
-The pathname contains a character with the high-order bit set.
-
-@item ENAMETOOLONG
-A component of a pathname exceeded 255 characters, or an entire
-path name exceeded 1023 characters.
-
-@item ENOENT
-The named file does not exist.
-
-@item EACCES
-The named file is not writable by the user.
-
-@item EACCES
-Search permission is denied for a component of the path prefix.
-
-@item ELOOP
-Too many symbolic links were encountered in translating the
-pathname
-
-@item EISDIR
-The named file is a directory.
-
-@item EROFS
-The named file resides on a read-only file system
-
-@item ETXTBSY
-The file is a pure procedure (shared text) file that is being
-executed
-
-@item EIO
-An I/O error occurred updating the inode.
-
-@item EFAULT
-@code{Path} points outside the process's allocated address space.
-
-@item EBADF
-The @code{fd} is not a valid descriptor.
-
-@end table
-
-@subheading DESCRIPTION:
-
-@code{truncate()} causes the file named by @code{path} or referenced by
-@code{fd} to be truncated to at most @code{length} bytes in size. If the
-file previously was larger than this size, the extra data is lost. With
-@code{ftruncate()}, the file must be open for writing.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection pathconf - Gets configuration values for files
-
-@findex pathconf
-@cindex gets configuration values for files
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <unistd.h>
-
-int pathconf(
- const char *path,
- int name
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item EINVAL
-Invalid argument
-
-@item EACCES
-Permission to write the file is denied
-
-@item ENAMETOOLONG
-Length of a filename string exceeds PATH_MAX and _POSIX_NO_TRUNC
-is in effect.
-
-@item ENOENT
-A file or directory does not exist
-
-@item ENOTDIR
-A component of the specified @code{path} was not a directory whan a
-directory was expected.
-
-@end table
-
-@subheading DESCRIPTION:
-
-@code{pathconf()} gets a value for the configuration option @code{name}
-for the open file descriptor @code{filedes}.
-
-The possible values for @code{name} are:
-
-@table @b
-@item _PC_LINK_MAX
-returns the maximum number of links to the file. If @code{filedes} or
-@code{path} refer to a directory, then the value applies to the whole
-directory. The corresponding macro is @code{_POSIX_LINK_MAX}.
-
-@item _PC_MAX_CANON
-returns the maximum length of a formatted input line, where @code{filedes}
-or @code{path} must refer to a terminal. The corresponding macro is
-@code{_POSIX_MAX_CANON}.
-
-@item _PC_MAX_INPUT
-returns the maximum length of an input line, where @code{filedes} or
-@code{path} must refer to a terminal. The corresponding macro is
-@code{_POSIX_MAX_INPUT}.
-
-@item _PC_NAME_MAX
-returns the maximum length of a filename in the directory @code{path} or
-@code{filedes}. The process is allowed to create. The corresponding macro
-is @code{_POSIX_NAME_MAX}.
-
-@item _PC_PATH_MAX
-returns the maximum length of a relative pathname when @code{path} or
-@code{filedes} is the current working directory. The corresponding macro
-is @code{_POSIX_PATH_MAX}.
-
-@item _PC_PIPE_BUF
-returns the size of the pipe buffer, where @code{filedes} must refer to a
-pipe or FIFO and @code{path} must refer to a FIFO. The corresponding macro
-is @code{_POSIX_PIPE_BUF}.
-
-@item _PC_CHOWN_RESTRICTED
-returns nonzero if the chown(2) call may not be used on this file. If
-@code{filedes} or @code{path} refer to a directory, then this applies to all
-files in that directory. The corresponding macro is
-@code{_POSIX_CHOWN_RESTRICTED}.
-
-@end table
-
-@subheading NOTES:
-
-Files with name lengths longer than the value returned for @code{name} equal
-@code{_PC_NAME_MAX} may exist in the given directory.
-
-@c
-@c
-@c
-@page
-@subsection fpathconf - Gets configuration values for files
-
-@findex fpathconf
-@cindex gets configuration values for files
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <unistd.h>
-
-int fpathconf(
- int filedes,
- int name
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item EINVAL
-Invalid argument
-
-@item EACCES
-Permission to write the file is denied
-@item ENAMETOOLONG
-
-Length of a filename string exceeds PATH_MAX and _POSIX_NO_TRUNC
-is in effect.
-
-@item ENOENT
-A file or directory does not exist
-
-@item ENOTDIR
-A component of the specified @code{path} was not a directory whan a
-directory was expected.
-
-@end table
-
-
-@subheading DESCRIPTION:
-
-@code{pathconf()} gets a value for the configuration option @code{name}
-for the open file descriptor @code{filedes}.
-
-The possible values for name are:
-
-@table @b
-@item _PC_LINK_MAX
-returns the maximum number of links to the file. If @code{filedes} or
-@code{path} refer to a directory, then the value applies to the whole
-directory. The corresponding macro is _POSIX_LINK_MAX.
-
-@item _PC_MAX_CANON
-returns the maximum length of a formatted input line, where @code{filedes}
-or @code{path} must refer to a terminal. The corresponding macro is
-@code{_POSIX_MAX_CANON}.
-
-@item _PC_MAX_INPUT
-returns the maximum length of an input line, where @code{filedes} or
-@code{path} must refer to a terminal. The corresponding macro is
-@code{_POSIX_MAX_INPUT}.
-
-@item _PC_NAME_MAX
-returns the maximum length of a filename in the directory @code{path} or
-@code{filedes}. The process is allowed to create. The corresponding macro
-is @code{_POSIX_NAME_MAX}.
-
-@item _PC_PATH_MAX
-returns the maximum length of a relative pathname when @code{path} or
-@code{filedes} is the current working directory. The corresponding macro
-is @code{_POSIX_PATH_MAX}.
-
-@item _PC_PIPE_BUF
-returns the size of the pipe buffer, where @code{filedes} must refer to a
-pipe or FIFO and @code{path} must refer to a FIFO. The corresponding macro
-is @code{_POSIX_PIPE_BUF}.
-
-@item _PC_CHOWN_RESTRICTED
-returns nonzero if the @code{chown()} call may not be used on this file. If
-@code{filedes} or @code{path} refer to a directory, then this applies to all
-files in that directory. The corresponding macro is
-@code{_POSIX_CHOWN_RESTRICTED}.
-
-@end table
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection mknod - create a directory
-
-@findex mknod
-@cindex create a directory
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-long mknod(
- const char *pathname,
- mode_t mode,
- dev_t dev
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{mknod} returns zero on success, or -1 if an error occurred (in which case,
-errno is set appropriately).
-
-@table @b
-@item ENAMETOOLONG
-@code{pathname} was too long.
-
-@item ENOENT
-A directory component in @code{pathname} does not exist or is a dangling symbolic
-link.
-
-@item ENOTDIR
-A component used in the directory @code{pathname} is not, in fact, a directory.
-
-@item ENOMEM
-Insufficient kernel memory was available
-
-@item EROFS
-@code{pathname} refers to a file on a read-only filesystem.
-
-@item ELOOP
-@code{pathname} contains a reference to a circular symbolic link, ie a symbolic
-link whose expansion contains a reference to itself.
-
-@item ENOSPC
-The device containing @code{pathname} has no room for the new node.
-
-@end table
-
-@subheading DESCRIPTION:
-
-@code{mknod} attempts to create a filesystem node (file, device special file or
-named pipe) named @code{pathname}, specified by @code{mode} and @code{dev}.
-
-@code{mode} specifies both the permissions to use and the type of node to be created.
-
-It should be a combination (using bitwise OR) of one of the file types listed
-below and the permissions for the new node.
-
-The permissions are modified by the process's @code{umask} in the usual way: the
-permissions of the created node are @code{(mode & ~umask)}.
-
-The file type should be one of @code{S_IFREG}, @code{S_IFCHR}, @code{S_IFBLK} and
-@code{S_IFIFO} to specify a normal file (which will be created empty), character
-special file, block special file or FIFO (named pipe), respectively, or zero, which
-will create a normal file.
-
-If the file type is @code{S_IFCHR} or @code{S_IFBLK} then @code{dev} specifies the major
-and minor numbers of the newly created device special file; otherwise it is ignored.
-
-The newly created node will be owned by the effective uid of the process. If the
-directory containing the node has the set group id bit set, or if the filesystem
-is mounted with BSD group semantics, the new node will inherit the group ownership
-from its parent directory; otherwise it will be owned by the effective gid of the
-process.
-
-
-@subheading NOTES:
-
-NONE
diff --git a/doc/posix_users/gen_size_report b/doc/posix_users/gen_size_report
deleted file mode 100644
index d2d1b02979..0000000000
--- a/doc/posix_users/gen_size_report
+++ /dev/null
@@ -1,209 +0,0 @@
-#
-# Hack of a script to generate a very long list which contains
-# the size information for every service listed in this manual
-#
-# This script must be modified by the user to tailor it for their
-# environment. This is VERY ugly and could be replaced by something
-# nicer in the future if this report style is useful.
-#
-# $Id$
-#
-
-#cpu=sparc
-#bsp=erc32
-
-#cpu=powerpc
-#bsp=mcp750
-
-cpu=v850
-bsp=bare
-symprefix=_
-
-#objdir=/usr1/rtems/build/build-${cpu}-rtems/${cpu}-rtems/c/${bsp}/
-#libc=/opt/rtems/${cpu}-rtems/lib/libc.a
-#libm=/opt/rtems/${cpu}-rtems/lib/libm.a
-objdir=/usr1/rtems/work/tools-v850/b-rtems/${cpu}-rtems/c/${bsp}/
-libc=/usr2/test-v850/${cpu}-rtems/lib/libc.a
-libm=/usr2/test-v850/${cpu}-rtems/lib/libm.a
-srcdir=$r/src
-docdir=$d
-nm=${cpu}-rtems-nm
-size=${cpu}-rtems-size
-ar=${cpu}-rtems-ar
-
-check_objs()
-{
- for i in *.o
- do
- ${nm} $i | grep "T ${symprefix}${1}$" >/dev/null
- if [ $? -eq 0 ] ; then
- echo $i
- return 0
- fi
- done
- return 1
-}
-per_manager()
-{
- docfile=$1
- shift
- subdirs=$*
- grep ^@item ${docfile} | grep "@code.* - " | \
- grep -v "@item E" | \
- grep -v "@code{CONFIGURE" | \
- grep -v "@value{RPREFIX" | \
- sed -e 's/@value{DIRPREFIX}/rtems_/' | \
- cut -d'{' -f2 | sed -e 's/}//' | cut -d'-' -f1 >/tmp/XXX.size
-
- if [ `wc -c </tmp/XXX.size` -eq 1 ] ; then
- return
- fi
- echo "====> `grep ^@chapter ${docfile} | sed -e 's/@chapter //'`"
- cat /tmp/XXX.size | while read line
- do
- # echo $line
- found=no
- for subd in ${subdirs}
- do
- if [ ${found} = "no" ] ; then
- cd ${objdir}/${subd}/o-optimize/
- objfile=`check_objs $line`
- if [ $? -eq 0 ] ; then
- found=yes
- #echo ${objfile}
- objcode=`${size} ${objfile} | tail -1 | cut -f1`
- objdata=`${size} ${objfile} | tail -1 | cut -f2`
- objbss=`${size} ${objfile} | tail -1 | cut -f3`
- objcode=`echo ${objcode}`
- objdata=`echo ${objdata}`
- objbss=`echo ${objbss}`
- echo "${line} - ${objcode}, ${objdata}, ${objbss}"
- fi
- fi
- done
- if [ ${found} = "no" ] ; then
- echo "$line - macro or not implemented"
- fi
-
- done
-}
-
-
-# extract libc
-if [ ! -d ${objdir}/newlib_extract/o-optimize ] ; then
- mkdir -p ${objdir}/newlib_extract/o-optimize
- cd ${objdir}/newlib_extract/o-optimize
- list=`${ar} t ${libc}`
- for i in $list
- do
- ${ar} x ${libc} ${i}
- done
-fi
-
-# extract libm
-if [ ! -d ${objdir}/libm_extract/o-optimize ] ; then
- mkdir -p ${objdir}/libm_extract/o-optimize
- cd ${objdir}/libm_extract/o-optimize
- list=`${ar} t ${libm}`
- for i in $list
- do
- ${ar} x ${libm} ${i}
- done
-fi
-
-# grab the size of the Classic API
-#
-# NOTE: This API is always configured.
-#
-cd ${docdir}/user
-echo
-echo "=============================================================="
-echo "=============================================================="
-echo "==== ===="
-echo "==== CLASSIC API SIZE INFORMATION ===="
-echo "==== ===="
-echo "=============================================================="
-echo "=============================================================="
-echo
-if [ -r ${objdir}/../../../${bsp}/lib/librtems.a ] ; then
- for i in *.t
- do
- per_manager $i exec/rtems/src exec/sapi/src lib/libc
- done
-else
- echo "RTEMS Classic API not configured."
-fi
-
-# Grab the size of the POSIX API
-cd ${docdir}/posix_users
-echo
-echo "=============================================================="
-echo "=============================================================="
-echo "==== ===="
-echo "==== POSIX 1003.1b API SIZE INFORMATION ===="
-echo "==== ===="
-echo "=============================================================="
-echo "=============================================================="
-echo
-if [ -r ${objdir}/../../../${bsp}/lib/libposix.a ] ; then
- for i in `ls -1 *.t | grep -v libc.t | grep -v libm.t`
- do
- per_manager $i exec/posix/src lib/libc newlib_extract
- done
-else
- echo "POSIX API not configured."
-fi
-
-# Grab the size of the POSIX routines provided by the C Library
-cd ${docdir}/posix_users
-echo
-echo "=============================================================="
-echo "=============================================================="
-echo "==== ===="
-echo "==== LIBC API SIZE INFORMATION ===="
-echo "==== ===="
-echo "=============================================================="
-echo "=============================================================="
-echo
-for i in libc.t
-do
- per_manager $i exec/posix/src lib/libc newlib_extract
-done
-
-# Grab the size of the libm routines
-cd ${docdir}/posix_users
-echo
-echo "=============================================================="
-echo "=============================================================="
-echo "==== ===="
-echo "==== LIBM API SIZE INFORMATION ===="
-echo "==== ===="
-echo "=============================================================="
-echo "=============================================================="
-echo
-for i in libm.t
-do
- per_manager $i exec/posix/src lib/libc libm_extract
-done
-
-# Grab the size of the ITRON API
-cd ${docdir}/itron3.0
-echo
-echo "=============================================================="
-echo "=============================================================="
-echo "==== ===="
-echo "==== ITRON 3.0 API SIZE INFORMATION ===="
-echo "==== ===="
-echo "=============================================================="
-echo "=============================================================="
-echo
-if [ -r ${objdir}/../../../${bsp}/lib/libitron.a ] ; then
- for i in *.t
- do
- per_manager $i exec/itron/src
- done
-else
- echo "ITRON API not configured."
-fi
-
-
diff --git a/doc/posix_users/io.t b/doc/posix_users/io.t
deleted file mode 100644
index 6185e6c56c..0000000000
--- a/doc/posix_users/io.t
+++ /dev/null
@@ -1,1107 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Input and Output Primitives Manager
-
-@section Introduction
-
-The input and output primitives manager is ...
-
-The directives provided by the input and output primitives manager are:
-
-@itemize @bullet
-@item @code{pipe} - Create an Inter-Process Channel
-@item @code{dup} - Duplicates an open file descriptor
-@item @code{dup2} - Duplicates an open file descriptor
-@item @code{close} - Closes a file
-@item @code{read} - Reads from a file
-@item @code{write} - Writes to a file
-@item @code{fcntl} - Manipulates an open file descriptor
-@item @code{lseek} - Reposition read/write file offset
-@item @code{fsync} - Synchronize file complete in-core state with that on disk
-@item @code{fdatasync} - Synchronize file in-core data with that on disk
-@item @code{mount} - Mount a file system
-@item @code{unmount} - Unmount file systems
-@item @code{aio_read} - Asynchronous Read
-@item @code{aio_write} - Asynchronous Write
-@item @code{lio_listio} - List Directed I/O
-@item @code{aio_error} - Retrieve Error Status of Asynchronous I/O Operation
-@item @code{aio_return} - Retrieve Return Status Asynchronous I/O Operation
-@item @code{aio_cancel} - Cancel Asynchronous I/O Request
-@item @code{aio_suspend} - Wait for Asynchronous I/O Request
-@item @code{aio_fsync} - Asynchronous File Synchronization
-@end itemize
-
-@section Background
-
-There is currently no text in this section.
-
-@section Operations
-
-There is currently no text in this section.
-
-@section Directives
-
-This section details the input and output primitives manager's directives.
-A subsection is dedicated to each of this manager's directives
-and describes the calling sequence, related constants, usage,
-and status codes.
-
-@c
-@c
-@c
-@page
-@subsection pipe - Create an Inter-Process Channel
-
-@findex pipe
-@cindex create an inter
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int pipe(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-This routine is not currently supported by RTEMS but could be
-in a future version.
-
-@c
-@c
-@c
-@page
-@subsection dup - Duplicates an open file descriptor
-
-@findex dup
-@cindex duplicates an open file descriptor
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <unistd.h>
-
-int dup(
- int fildes
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item EBADF
-Invalid file descriptor.
-
-@item EINTR
-Function was interrupted by a signal.
-
-@item EMFILE
-The process already has the maximum number of file descriptors open
-and tried to open a new one.
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{dup} function returns the lowest numbered available file
-descriptor. This new desciptor refers to the same open file as the
-original descriptor and shares any locks.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection dup2 - Duplicates an open file descriptor
-
-@findex dup2
-@cindex duplicates an open file descriptor
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <unistd.h>
-
-int dup2(
- int fildes,
- int fildes2
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item EBADF
-Invalid file descriptor.
-
-@item EINTR
-Function was interrupted by a signal.
-
-@item EMFILE
-The process already has the maximum number of file descriptors open
-and tried to open a new one.
-@end table
-
-@subheading DESCRIPTION:
-
-@code{Dup2} creates a copy of the file descriptor @code{oldfd}.
-
-The old and new descriptors may be used interchangeably. They share locks, file
-position pointers and flags; for example, if the file position is modified by using
-@code{lseek} on one of the descriptors, the position is also changed for the other.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection close - Closes a file.
-
-@findex close
-@cindex closes a file.
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <unistd.h>
-
-int close(
- int fildes
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item EBADF
-Invalid file descriptor
-
-@item EINTR
-Function was interrupted by a signal.
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{close()} function deallocates the file descriptor named by
-@code{fildes} and makes it available for reuse. All outstanding
-record locks owned by this process for the file are unlocked.
-
-@subheading NOTES:
-
-A signal can interrupt the @code{close()} function. In that case,
-@code{close()} returns -1 with @code{errno} set to EINTR. The file
-may or may not be closed.
-
-@c
-@c
-@c
-@page
-@subsection read - Reads from a file.
-
-@findex read
-@cindex reads from a file.
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <unistd.h>
-
-int read(
- int fildes,
- void *buf,
- unsigned int nbyte
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-On error, this routine returns -1 and sets @code{errno} to one of
-the following:
-
-@table @b
-@item EAGAIN
-The O_NONBLOCK flag is set for a file descriptor and the process
-would be delayed in the I/O operation.
-
-@item EBADF
-Invalid file descriptor
-
-@item EINTR
-Function was interrupted by a signal.
-
-@item EIO
-Input or output error
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{read()} function reads @code{nbyte} bytes from the file
-associated with @code{fildes} into the buffer pointed to by @code{buf}.
-
-The @code{read()} function returns the number of bytes actually read
-and placed in the buffer. This will be less than @code{nbyte} if:
-
-@itemize @bullet
-
-@item The number of bytes left in the file is less than @code{nbyte}.
-
-@item The @code{read()} request was interrupted by a signal.
-
-@item The file is a pipe or FIFO or special file with less than @code{nbytes}
-immediately available for reading.
-
-@end itemize
-
-When attempting to read from any empty pipe or FIFO:
-
-
-@itemize @bullet
-
-@item If no process has the pipe open for writing, zero is returned to
-indicate end-of-file.
-
-@item If some process has the pipe open for writing and O_NONBLOCK is set,
--1 is returned and @code{errno} is set to EAGAIN.
-
-@item If some process has the pipe open for writing and O_NONBLOCK is clear,
-@code{read()} waits for some data to be written or the pipe to be closed.
-
-@end itemize
-
-
-When attempting to read from a file other than a pipe or FIFO and no data
-is available.
-
-@itemize @bullet
-
-@item If O_NONBLOCK is set, -1 is returned and @code{errno} is set to EAGAIN.
-
-@item If O_NONBLOCK is clear, @code{read()} waits for some data to become
-available.
-
-@item The O_NONBLOCK flag is ignored if data is available.
-
-@end itemize
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection write - Writes to a file
-
-@findex write
-@cindex writes to a file
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <unistd.h>
-
-int write(
- int fildes,
- const void *buf,
- unsigned int nbytes
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item EAGAIN
-The O_NONBLOCK flag is set for a file descriptor and the process
-would be delayed in the I/O operation.
-
-@item EBADF
-Invalid file descriptor
-
-@item EFBIG
-An attempt was made to write to a file that exceeds the maximum file
-size
-
-@item EINTR
-The function was interrupted by a signal.
-
-@item EIO
-Input or output error.
-
-@item ENOSPC
-No space left on disk.
-
-@item EPIPE
-Attempt to write to a pope or FIFO with no reader.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{write()} function writes @code{nbyte} from the array pointed
-to by @code{buf} into the file associated with @code{fildes}.
-
-If @code{nybte} is zero and the file is a regular file, the @code{write()}
-function returns zero and has no other effect. If @code{nbyte} is zero
-and the file is a special file, te results are not portable.
-
-The @code{write()} function returns the number of bytes written. This
-number will be less than @code{nbytes} if there is an error. It will never
-be greater than @code{nbytes}.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection fcntl - Manipulates an open file descriptor
-
-@findex fcntl
-@cindex manipulates an open file descriptor
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <sys/types.h>
-#include <fcntl.h>
-#include <unistd.h>
-
-int fcntl(
- int fildes,
- int cmd
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item EACCESS
-Search permission is denied for a direcotry in a file's path
-prefix.
-
-@item EAGAIN
-The O_NONBLOCK flag is set for a file descriptor and the process
-would be delayed in the I/O operation.
-
-@item EBADF
-Invalid file descriptor
-
-@item EDEADLK
-An @code{fcntl} with function F_SETLKW would cause a deadlock.
-
-@item EINTR
-The functioin was interrupted by a signal.
-
-@item EINVAL
-Invalid argument
-
-@item EMFILE
-Too many file descriptor or in use by the process.
-
-@item ENOLCK
-No locks available
-
-@end table
-
-@subheading DESCRIPTION:
-
-@code{fcntl()} performs one of various miscellaneous operations on
-@code{fd}. The operation in question is determined by @code{cmd}:
-
-@table @b
-
-@item F_DUPFD
-Makes @code{arg} be a copy of @code{fd}, closing @code{fd} first if necessary.
-
-The same functionality can be more easily achieved by using @code{dup2()}.
-
-The old and new descriptors may be used interchangeably. They share locks,
-file position pointers and flags; for example, if the file position is
-modified by using @code{lseek()} on one of the descriptors, the position is
-also changed for the other.
-
-The two descriptors do not share the close-on-exec flag, however. The
-close-on-exec flag of the copy is off, meaning that it will be closed on
-exec.
-
-On success, the new descriptor is returned.
-
-@item F_GETFD
-Read the close-on-exec flag. If the low-order bit is 0, the file will
-remain open across exec, otherwise it will be closed.
-
-@item F_SETFD
-Set the close-on-exec flag to the value specified by @code{arg} (only the least
-significant bit is used).
-
-@item F_GETFL
-Read the descriptor's flags (all flags (as set by open()) are returned).
-
-@item F_SETFL
-Set the descriptor's flags to the value specified by @code{arg}. Only
-@code{O_APPEND} and @code{O_NONBLOCK} may be set.
-
-The flags are shared between copies (made with @code{dup()} etc.) of the same
-file descriptor.
-
-The flags and their semantics are described in @code{open()}.
-
-@item F_GETLK, F_SETLK and F_SETLKW
-Manage discretionary file locks. The third argument @code{arg} is a pointer to a
-struct flock (that may be overwritten by this call).
-
-@item F_GETLK
-Return the flock structure that prevents us from obtaining the lock, or set the
-@code{l_type} field of the lock to @code{F_UNLCK} if there is no obstruction.
-
-@item F_SETLK
-The lock is set (when @code{l_type} is @code{F_RDLCK} or @code{F_WRLCK}) or
-cleared (when it is @code{F_UNLCK}. If lock is held by someone else, this
-call returns -1 and sets @code{errno} to EACCES or EAGAIN.
-
-@item F_SETLKW
-Like @code{F_SETLK}, but instead of returning an error we wait for the lock to
-be released.
-
-@item F_GETOWN
-Get the process ID (or process group) of the owner of a socket.
-
-Process groups are returned as negative values.
-
-@item F_SETOWN
-Set the process or process group that owns a socket.
-
-For these commands, ownership means receiving @code{SIGIO} or @code{SIGURG}
-signals.
-
-Process groups are specified using negative values.
-
-@end table
-
-@subheading NOTES:
-
-The errors returned by @code{dup2} are different from those returned by
-@code{F_DUPFD}.
-
-@c
-@c
-@c
-@page
-@subsection lseek - Reposition read/write file offset
-
-@findex lseek
-@cindex reposition read/write file offset
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <sys/types.h>
-#include <unistd.h>
-
-int lseek(
- int fildes,
- off_t offset,
- int whence
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item EBADF
-@code{Fildes} is not an open file descriptor.
-
-@item ESPIPE
-@code{Fildes} is associated with a pipe, socket or FIFO.
-
-@item EINVAL
-@code{Whence} is not a proper value.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{lseek} function repositions the offset of the file descriptor
-@code{fildes} to the argument offset according to the directive whence.
-The argument @code{fildes} must be an open file descriptor. @code{Lseek}
-repositions the file pointer fildes as follows:
-
-@itemize @bullet
-
-@item
-If @code{whence} is SEEK_SET, the offset is set to @code{offset} bytes.
-
-@item
-If @code{whence} is SEEK_CUR, the offset is set to its current location
-plus offset bytes.
-
-@item
-If @code{whence} is SEEK_END, the offset is set to the size of the
-file plus @code{offset} bytes.
-
-@end itemize
-
-The @code{lseek} function allows the file offset to be set beyond the end
-of the existing end-of-file of the file. If data is later written at this
-point, subsequent reads of the data in the gap return bytes of zeros
-(until data is actually written into the gap).
-
-Some devices are incapable of seeking. The value of the pointer associated
-with such a device is undefined.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection fsync - Synchronize file complete in-core state with that on disk
-
-@findex fsync
-@cindex synchronize file complete in
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int fsync(
- int fd
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-On success, zero is returned. On error, -1 is returned, and @code{errno}
-is set appropriately.
-
-@table @b
-@item EBADF
-@code{fd} is not a valid descriptor open for writing
-
-@item EINVAL
-@code{fd} is bound to a special file which does not support support synchronization
-
-@item EROFS
-@code{fd} is bound to a special file which does not support support synchronization
-
-@item EIO
-An error occurred during synchronization
-
-@end table
-
-@subheading DESCRIPTION:
-
-@code{fsync} copies all in-core parts of a file to disk.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection fdatasync - Synchronize file in-core data with that on disk.
-
-@findex fdatasync
-@cindex synchronize file in
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int fdatasync(
- int fd
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-On success, zero is returned. On error, -1 is returned, and @code{errno} is
-set appropriately.
-
-@table @b
-@item EBADF
-@code{fd} is not a valid file descriptor open for writing.
-
-@item EINVAL
-@code{fd} is bound to a special file which does not support synchronization.
-
-@item EIO
-An error occurred during synchronization.
-
-@item EROFS
-@code{fd} is bound to a special file which dows not support synchronization.
-
-@end table
-
-@subheading DESCRIPTION:
-
-@code{fdatasync} flushes all data buffers of a file to disk (before the system call
-returns). It resembles @code{fsync} but is not required to update the metadata such
-as access time.
-
-Applications that access databases or log files often write a tiny data fragment
-(e.g., one line in a log file) and then call @code{fsync} immediately in order to
-ensure that the written data is physically stored on the harddisk. Unfortunately,
-fsync will always initiate two write operations: one for the newly written data and
-another one in order to update the modification time stored in the inode. If the
-modification time is not a part of the transaction concept @code{fdatasync} can be
-used to avoid unnecessary inode disk write operations.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection mount - Mount a file system
-
-@findex mount
-@cindex mount a file system
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <libio.h>
-
-int mount(
- rtems_filesystem_mount_table_entry_t **mt_entry,
- rtems_filesystem_operations_table *fs_ops,
- rtems_filesystem_options_t fsoptions,
- char *device,
- char *mount_point
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item EXXX
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{mount} routines mounts the filesystem class
-which uses the filesystem operations specified by @code{fs_ops}
-and @code{fsoptions}. The filesystem is mounted at the directory
-@code{mount_point} and the mode of the mounted filesystem is
-specified by @code{fsoptions}. If this filesystem class requires
-a device, then the name of the device must be specified by @code{device}.
-
-If this operation succeeds, the mount table entry for the mounted
-filesystem is returned in @code{mt_entry}.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection unmount - Unmount file systems
-
-@findex unmount
-@cindex unmount file systems
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <libio.h>
-
-int unmount(
- const char *mount_path
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item EXXX
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{unmount} routine removes the attachment of the filesystem specified
-by @code{mount_path}.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection aio_read - Asynchronous Read
-
-@findex aio_read
-@cindex asynchronous read
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int aio_read(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-This routine is not currently supported by RTEMS but could be
-in a future version.
-
-@c
-@c
-@c
-@page
-@subsection aio_write - Asynchronous Write
-
-@findex aio_write
-@cindex asynchronous write
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int aio_write(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-This routine is not currently supported by RTEMS but could be
-in a future version.
-
-@c
-@c
-@c
-@page
-@subsection lio_listio - List Directed I/O
-
-@findex lio_listio
-@cindex list directed i/o
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int lio_listio(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-This routine is not currently supported by RTEMS but could be
-in a future version.
-
-@c
-@c
-@c
-@page
-@subsection aio_error - Retrieve Error Status of Asynchronous I/O Operation
-
-@findex aio_error
-@cindex retrieve error status of asynchronous i/o operation
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int aio_error(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-This routine is not currently supported by RTEMS but could be
-in a future version.
-
-@c
-@c
-@c
-@page
-@subsection aio_return - Retrieve Return Status Asynchronous I/O Operation
-
-@findex aio_return
-@cindex retrieve return status asynchronous i/o operation
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int aio_return(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-This routine is not currently supported by RTEMS but could be
-in a future version.
-
-@c
-@c
-@c
-@page
-@subsection aio_cancel - Cancel Asynchronous I/O Request
-
-@findex aio_cancel
-@cindex cancel asynchronous i/o request
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int aio_cancel(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-This routine is not currently supported by RTEMS but could be
-in a future version.
-
-@c
-@c
-@c
-@page
-@subsection aio_suspend - Wait for Asynchronous I/O Request
-
-@findex aio_suspend
-@cindex wait for asynchronous i/o request
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int aio_suspend(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-This routine is not currently supported by RTEMS but could be
-in a future version.
-
-@c
-@c
-@c
-@page
-@subsection aio_fsync - Asynchronous File Synchronization
-
-@findex aio_fsync
-@cindex asynchronous file synchronization
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int aio_fsync(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-This routine is not currently supported by RTEMS but could be
-in a future version.
diff --git a/doc/posix_users/key.t b/doc/posix_users/key.t
deleted file mode 100644
index d2328ce216..0000000000
--- a/doc/posix_users/key.t
+++ /dev/null
@@ -1,152 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Key Manager
-
-@section Introduction
-
-The key manager ...
-
-The directives provided by the key manager are:
-
-@itemize @bullet
-@item @code{pthread_key_create} - Create Thread Specific Data Key
-@item @code{pthread_key_delete} - Delete Thread Specific Data Key
-@item @code{pthread_setspecific} - Set Thread Specific Key Value
-@item @code{pthread_getspecific} - Get Thread Specific Key Value
-@end itemize
-
-@section Background
-
-There is currently no text in this section.
-
-@section Operations
-
-There is currently no text in this section.
-
-@section Directives
-
-This section details the key manager's directives.
-A subsection is dedicated to each of this manager's directives
-and describes the calling sequence, related constants, usage,
-and status codes.
-
-@c
-@c
-@c
-@page
-@subsection pthread_key_create - Create Thread Specific Data Key
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_key_create(
- pthread_key_t *key,
- void (*destructor)( void )
-);
-@end example
-
-@subheading STATUS CODES:
-
-@table @b
-@item EAGAIN
-There were not enough resources available to create another key.
-
-@item ENOMEM
-Insufficient memory exists to create the key.
-
-@end table
-
-@c
-@c
-@c
-@page
-@subsection pthread_key_delete - Delete Thread Specific Data Key
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_key_delete(
-pthread_key_t key,
-);
-@end example
-
-@subheading STATUS CODES:
-
-@table @b
-@item EINVAL
-The key was invalid
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection pthread_setspecific - Set Thread Specific Key Value
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_setspecific(
-pthread_key_t key,
-const void *value
-);
-@end example
-
-@subheading STATUS CODES:
-@table @b
-@item EINVAL
-The specified key is invalid.
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection pthread_getspecific - Get Thread Specific Key Value
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-void *pthread_getspecific(
-pthread_key_t key
-);
-@end example
-
-@subheading STATUS CODES:
-@table @b
-@item NULL
-There is no thread-specific data associated with the specified key.
-
-@item non-NULL
-The data associated with the specified key.
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
diff --git a/doc/posix_users/libc.t b/doc/posix_users/libc.t
deleted file mode 100644
index 257d3b4b56..0000000000
--- a/doc/posix_users/libc.t
+++ /dev/null
@@ -1,348 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Services Provided by C Library (libc)
-
-@section Introduction
-
-This section lists the routines that provided by the Newlib C Library.
-
-@section Standard Utility Functions (stdlib.h)
-
-@itemize @bullet
-@item @code{abort} - Abnormal termination of a program
-@item @code{abs} - Integer absolute value (magnitude)
-@item @code{assert} - Macro for Debugging Diagnostics
-@item @code{atexit} - Request execution of functions at program exit
-@item @code{atof} - String to double or float
-@item @code{atoi} - String to integer
-@item @code{bsearch} - Binary search
-@item @code{calloc} - Allocate space for arrays
-@item @code{div} - Divide two integers
-@item @code{ecvtbuf} - Double or float to string of digits
-@item @code{ecvt} - Double or float to string of digits (malloc result)
-@item @code{__env_lock} - Lock environment list for getenv and setenv
-@item @code{gvcvt} - Format double or float as string
-@item @code{exit} - End program execution
-@item @code{getenv} - Look up environment variable
-@item @code{labs} - Long integer absolute value (magnitude)
-@item @code{ldiv} - Divide two long integers
-@item @code{malloc} - Allocate memory
-@item @code{realloc} - Reallocate memory
-@item @code{free} - Free previously allocated memory
-@item @code{mallinfo} - Get information about allocated memory
-@item @code{__malloc_lock} - Lock memory pool for malloc and free
-@item @code{mbstowcs} - Minimal multibyte string to wide string converter
-@item @code{mblen} - Minimal multibyte length
-@item @code{mbtowc} - Minimal multibyte to wide character converter
-@item @code{qsort} - Sort an array
-@item @code{rand} - Pseudo-random numbers
-@item @code{strtod} - String to double or float
-@item @code{strtol} - String to long
-@item @code{strtoul} - String to unsigned long
-@item @code{system} - Execute command string
-@item @code{wcstombs} - Minimal wide string to multibyte string converter
-@item @code{wctomb} - Minimal wide character to multibyte converter
-@end itemize
-
-@section Character Type Macros and Functions (ctype.h)
-
-@itemize @bullet
-@item @code{isalnum} - Alphanumeric character predicate
-@item @code{isalpha} - Alphabetic character predicate
-@item @code{isascii} - ASCII character predicate
-@item @code{iscntrl} - Control character predicate
-@item @code{isdigit} - Decimal digit predicate
-@item @code{islower} - Lower-case character predicate
-@item @code{isprint} - Printable character predicates (isprint, isgraph)
-@item @code{ispunct} - Punctuation character predicate
-@item @code{isspace} - Whitespace character predicate
-@item @code{isupper} - Uppercase character predicate
-@item @code{isxdigit} - Hexadecimal digit predicate
-@item @code{toascii} - Force integers to ASCII range
-@item @code{tolower} - Translate characters to lower case
-@item @code{toupper} - Translate characters to upper case
-@end itemize
-
-@section Input and Output (stdio.h)
-
-@itemize @bullet
-@item @code{clearerr} - Clear file or stream error indicator
-@item @code{fclose} - Close a file
-@item @code{feof} - Test for end of file
-@item @code{ferror} - Test whether read/write error has occurred
-@item @code{fflush} - Flush buffered file output
-@item @code{fgetc} - Get a character from a file or stream
-@item @code{fgetpos} - Record position in a stream or file
-@item @code{fgets} - Get character string from a file or stream
-@item @code{fiprintf} - Write formatted output to file (integer only)
-@item @code{fopen} - Open a file
-@item @code{fdopen} - Turn an open file into a stream
-@item @code{fputc} - Write a character on a stream or file
-@item @code{fputs} - Write a character string in a file or stream
-@item @code{fread} - Read array elements from a file
-@item @code{freopen} - Open a file using an existing file descriptor
-@item @code{fseek} - Set file position
-@item @code{fsetpos} - Restore position of a stream or file
-@item @code{ftell} - Return position in a stream or file
-@item @code{fwrite} - Write array elements from memory to a file or stream
-@item @code{getc} - Get a character from a file or stream (macro)
-@item @code{getchar} - Get a character from standard input (macro)
-@item @code{gets} - Get character string from standard input (obsolete)
-@item @code{iprintf} - Write formatted output (integer only)
-@item @code{mktemp} - Generate unused file name
-@item @code{perror} - Print an error message on standard error
-@item @code{putc} - Write a character on a stream or file (macro)
-@item @code{putchar} - Write a character on standard output (macro)
-@item @code{puts} - Write a character string on standard output
-@item @code{remove} - Delete a file's name
-@item @code{rename} - Rename a file
-@item @code{rewind} - Reinitialize a file or stream
-@item @code{setbuf} - Specify full buffering for a file or stream
-@item @code{setvbuf} - Specify buffering for a file or stream
-@item @code{siprintf} - Write formatted output (integer only)
-@item @code{printf} - Write formatted output
-@item @code{scanf} - Scan and format input
-@item @code{tmpfile} - Create a temporary file
-@item @code{tmpnam} - Generate name for a temporary file
-@item @code{vprintf} - Format variable argument list
-@end itemize
-
-@section Strings and Memory (string.h)
-
-@itemize @bullet
-@item @code{bcmp} - Compare two memory areas
-@item @code{bcopy} - Copy memory regions
-@item @code{bzero} - Initialize memory to zero
-@item @code{index} - Search for character in string
-@item @code{memchr} - Find character in memory
-@item @code{memcmp} - Compare two memory areas
-@item @code{memcpy} - Copy memory regions
-@item @code{memmove} - Move possibly overlapping memory
-@item @code{memset} - Set an area of memory
-@item @code{rindex} - Reverse search for character in string
-@item @code{strcasecmp} - Compare strings ignoring case
-@item @code{strcat} - Concatenate strings
-@item @code{strchr} - Search for character in string
-@item @code{strcmp} - Character string compare
-@item @code{strcoll} - Locale specific character string compare
-@item @code{strcpy} - Copy string
-@item @code{strcspn} - Count chars not in string
-@item @code{strerror} - Convert error number to string
-@item @code{strlen} - Character string length
-@item @code{strlwr} - Convert string to lower case
-@item @code{strncasecmp} - Compare strings ignoring case
-@item @code{strncat} - Concatenate strings
-@item @code{strncmp} - Character string compare
-@item @code{strncpy} - Counted copy string
-@item @code{strpbrk} - Find chars in string
-@item @code{strrchr} - Reverse search for character in string
-@item @code{strspn} - Find initial match
-@item @code{strstr} - Find string segment
-@item @code{strtok} - Get next token from a string
-@item @code{strupr} - Convert string to upper case
-@item @code{strxfrm} - Transform string
-@end itemize
-
-@section Signal Handling (signal.h)
-
-@itemize @bullet
-@item @code{raise} - Send a signal
-@item @code{signal} - Specify handler subroutine for a signal
-@end itemize
-
-@section Time Functions (time.h)
-
-@itemize @bullet
-@item @code{asctime} - Format time as string
-@item @code{clock} - Cumulative processor time
-@item @code{ctime} - Convert time to local and format as string
-@item @code{difftime} - Subtract two times
-@item @code{gmtime} - Convert time to UTC (GMT) traditional representation
-@item @code{localtime} - Convert time to local representation
-@item @code{mktime} - Convert time to arithmetic representation
-@item @code{strftime} - Flexible calendar time formatter
-@item @code{time} - Get current calendar time (as single number)
-@end itemize
-
-@section Locale (locale.h)
-
-@itemize @bullet
-@item @code{setlocale} - Select or query locale
-@end itemize
-
-@section Reentrant Versions of Functions
-
-
-@itemize @bullet
-@item Equivalent for errno variable:
-
-@itemize @bullet
-@item @code{errno_r} - XXX
-@end itemize
-
-@item Locale functions:
-
-@itemize @bullet
-@item @code{localeconv_r} - XXX
-@item @code{setlocale_r} - XXX
-@end itemize
-
-@item Equivalents for stdio variables:
-
-@itemize @bullet
-@item @code{stdin_r} - XXX
-@item @code{stdout_r} - XXX
-@item @code{stderr_r} - XXX
-@end itemize
-
-@item Stdio functions:
-
-@itemize @bullet
-@item @code{fdopen_r} - XXX
-@item @code{perror_r} - XXX
-@item @code{tempnam_r} - XXX
-@item @code{fopen_r} - XXX
-@item @code{putchar_r} - XXX
-@item @code{tmpnam_r} - XXX
-@item @code{getchar_r} - XXX
-@item @code{puts_r} - XXX
-@item @code{tmpfile_r} - XXX
-@item @code{gets_r} - XXX
-@item @code{remove_r} - XXX
-@item @code{vfprintf_r} - XXX
-@item @code{iprintf_r} - XXX
-@item @code{rename_r} - XXX
-@item @code{vsnprintf_r} - XXX
-@item @code{mkstemp_r} - XXX
-@item @code{snprintf_r} - XXX
-@item @code{vsprintf_r} - XXX
-@item @code{mktemp_t} - XXX
-@item @code{sprintf_r} - XXX
-@end itemize
-
-@item Signal functions:
-
-@itemize @bullet
-@item @code{init_signal_r} - XXX
-@item @code{signal_r} - XXX
-@item @code{kill_r} - XXX
-@item @code{_sigtramp_r} - XXX
-@item @code{raise_r} - XXX
-@end itemize
-
-@item Stdlib functions:
-
-@itemize @bullet
-@item @code{calloc_r} - XXX
-@item @code{mblen_r} - XXX
-@item @code{srand_r} - XXX
-@item @code{dtoa_r} - XXX
-@item @code{mbstowcs_r} - XXX
-@item @code{strtod_r} - XXX
-@item @code{free_r} - XXX
-@item @code{mbtowc_r} - XXX
-@item @code{strtol_r} - XXX
-@item @code{getenv_r} - XXX
-@item @code{memalign_r} - XXX
-@item @code{strtoul_r} - XXX
-@item @code{mallinfo_r} - XXX
-@item @code{mstats_r} - XXX
-@item @code{system_r} - XXX
-@item @code{malloc_r} - XXX
-@item @code{rand_r} - XXX
-@item @code{wcstombs_r} - XXX
-@item @code{malloc_r} - XXX
-@item @code{realloc_r} - XXX
-@item @code{wctomb_r} - XXX
-@item @code{malloc_stats_r} - XXX
-@item @code{setenv_r} - XXX
-@end itemize
-
-@item String functions:
-
-@itemize @bullet
-@item @code{strtok_r} - XXX
-@end itemize
-
-@item System functions:
-
-@itemize @bullet
-@item @code{close_r} - XXX
-@item @code{link_r} - XXX
-@item @code{unlink_r} - XXX
-@item @code{execve_r} - XXX
-@item @code{lseek_r} - XXX
-@item @code{wait_r} - XXX
-@item @code{fcntl_r} - XXX
-@item @code{open_r} - XXX
-@item @code{write_r} - XXX
-@item @code{fork_r} - XXX
-@item @code{read_r} - XXX
-@item @code{fstat_r} - XXX
-@item @code{sbrk_r} - XXX
-@item @code{gettimeofday_r} - XXX
-@item @code{stat_r} - XXX
-@item @code{getpid_r} - XXX
-@item @code{times_r} - XXX
-@end itemize
-
-@item Time function:
-
-@itemize @bullet
-@item @code{asctime_r} - XXX
-@end itemize
-
-@end itemize
-
-@section Miscellaneous Macros and Functions
-
-
-@itemize @bullet
-@item @code{unctrl} - Return printable representation of a character
-@end itemize
-
-@section Variable Argument Lists
-
-
-@itemize @bullet
-
-@item Stdarg (stdarg.h):
-@itemize @bullet
-@item @code{va_start} - XXX
-@item @code{va_arg} - XXX
-@item @code{va_end} - XXX
-@end itemize
-
-@item Vararg (varargs.h):
-@itemize @bullet
-@item @code{va_alist} - XXX
-@item @code{va_start-trad} - XXX
-@item @code{va_arg-trad} - XXX
-@item @code{va_end-trad} - XXX
-@end itemize
-@end itemize
-
-@section Reentrant System Calls
-
-@itemize @bullet
-@item @code{open_r} - XXX
-@item @code{close_r} - XXX
-@item @code{lseek_r} - XXX
-@item @code{read_r} - XXX
-@item @code{write_r} - XXX
-@item @code{fork_r} - XXX
-@item @code{wait_r} - XXX
-@item @code{stat_r} - XXX
-@item @code{fstat_r} - XXX
-@item @code{link_r} - XXX
-@item @code{unlink_r} - XXX
-@item @code{sbrk_r} - XXX
-@end itemize
-
-
diff --git a/doc/posix_users/libm.t b/doc/posix_users/libm.t
deleted file mode 100644
index c02a89c365..0000000000
--- a/doc/posix_users/libm.t
+++ /dev/null
@@ -1,58 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Services Provided by the Math Library (libm)
-
-@section Introduction
-
-This section lists the routines that provided by the Newlib Math Library
-(libm).
-
-@section Standard Math Functions (math.h)
-
-@itemize @bullet
-@item @code{acos} - Arccosine
-@item @code{acosh} - Inverse hyperbolic cosine
-@item @code{asin} - Arcsine
-@item @code{asinh} - Inverse hyperbolic sine
-@item @code{atan} - Arctangent
-@item @code{atan2} - Arctangent of y/x
-@item @code{atanh} - Inverse hyperbolic tangent
-@item @code{jN} - Bessel functions (jN and yN)
-@item @code{cbrt} - Cube root
-@item @code{copysign} - Sign of Y and magnitude of X
-@item @code{cosh} - Hyperbolic cosine
-@item @code{erf} - Error function (erf and erfc)
-@item @code{exp} - Exponential
-@item @code{expm1} - Exponential of x and - 1
-@item @code{fabs} - Absolute value (magnitude)
-@item @code{floor} - Floor and ceiling (floor and ceil)
-@item @code{fmod} - Floating-point remainder (modulo)
-@item @code{frexp} - Split floating-point number
-@item @code{gamma} - Logarithmic gamma function
-@item @code{hypot} - Distance from origin
-@item @code{ilogb} - Get exponent
-@item @code{infinity} - Floating infinity
-@item @code{isnan} - Check type of number
-@item @code{ldexp} - Load exponent
-@item @code{log} - Natural logarithms
-@item @code{log10} - Base 10 logarithms
-@item @code{log1p} - Log of 1 + X
-@item @code{matherr} - Modifiable math error handler
-@item @code{modf} - Split fractional and integer parts
-@item @code{nan} - Floating Not a Number
-@item @code{nextafter} - Get next representable number
-@item @code{pow} - X to the power Y
-@item @code{remainder} - remainder of X divided by Y
-@item @code{scalbn} - scalbn
-@item @code{sin} - Sine or cosine (sin and cos)
-@item @code{sinh} - Hyperbolic sine
-@item @code{sqrt} - Positive square root
-@item @code{tan} - Tangent
-@item @code{tanh} - Hyperbolic tangent
-@end itemize
diff --git a/doc/posix_users/memorymgmt.t b/doc/posix_users/memorymgmt.t
deleted file mode 100644
index ea06f75b8f..0000000000
--- a/doc/posix_users/memorymgmt.t
+++ /dev/null
@@ -1,375 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Memory Management Manager
-
-@section Introduction
-
-The
-memory management manager is ...
-
-The directives provided by the memory management manager are:
-
-@itemize @bullet
-@item @code{mlockall} - Lock the Address Space of a Process
-@item @code{munlockall} - Unlock the Address Space of a Process
-@item @code{mlock} - Lock a Range of the Process Address Space
-@item @code{munlock} - Unlock a Range of the Process Address Space
-@item @code{mmap} - Map Process Addresses to a Memory Object
-@item @code{munmap} - Unmap Previously Mapped Addresses
-@item @code{mprotect} - Change Memory Protection
-@item @code{msync} - Memory Object Synchronization
-@item @code{shm_open} - Open a Shared Memory Object
-@item @code{shm_unlink} - Remove a Shared Memory Object
-@end itemize
-
-@section Background
-
-There is currently no text in this section.
-
-@section Operations
-
-There is currently no text in this section.
-
-@section Directives
-
-This section details the memory management manager's directives.
-A subsection is dedicated to each of this manager's directives
-and describes the calling sequence, related constants, usage,
-and status codes.
-
-@c
-@c
-@c
-@page
-@subsection mlockall - Lock the Address Space of a Process
-
-@findex mlockall
-@cindex lock the address space of a process
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int mlockall(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection munlockall - Unlock the Address Space of a Process
-
-@findex munlockall
-@cindex unlock the address space of a process
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int munlockall(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection mlock - Lock a Range of the Process Address Space
-
-@findex mlock
-@cindex lock a range of the process address space
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int mlock(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection munlock - Unlock a Range of the Process Address Space
-
-@findex munlock
-@cindex unlock a range of the process address space
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int munlock(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection mmap - Map Process Addresses to a Memory Object
-
-@findex mmap
-@cindex map process addresses to a memory object
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int mmap(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection munmap - Unmap Previously Mapped Addresses
-
-@findex munmap
-@cindex unmap previously mapped addresses
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int munmap(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection mprotect - Change Memory Protection
-
-@findex mprotect
-@cindex change memory protection
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int mprotect(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection msync - Memory Object Synchronization
-
-@findex msync
-@cindex memory object synchronization
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int msync(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection shm_open - Open a Shared Memory Object
-
-@findex shm_open
-@cindex open a shared memory object
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int shm_open(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection shm_unlink - Remove a Shared Memory Object
-
-@findex shm_unlink
-@cindex remove a shared memory object
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int shm_unlink(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
diff --git a/doc/posix_users/message.t b/doc/posix_users/message.t
deleted file mode 100644
index 5c0b6aed8c..0000000000
--- a/doc/posix_users/message.t
+++ /dev/null
@@ -1,693 +0,0 @@
-@c
-@c COPYRIGHT(c) 1988-1998.
-@c On-Line Applications Research Corporation(OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Message Passing Manager
-
-@section Introduction
-
-The message passing manager is the means to provide communication and
-synchronization capabilities using POSIX message queues.
-
-The directives provided by the message passing manager are:
-
-@itemize @bullet
-@item @code{mq_open} - Open a Message Queue
-@item @code{mq_close} - Close a Message Queue
-@item @code{mq_unlink} - Remove a Message Queue
-@item @code{mq_send} - Send a Message to a Message Queue
-@item @code{mq_receive} - Receive a Message from a Message Queue
-@item @code{mq_notify} - Notify Process that a Message is Available
-@item @code{mq_setattr} - Set Message Queue Attributes
-@item @code{mq_getattr} - Get Message Queue Attributes
-@end itemize
-
-@section Background
-
-@subsection Theory
-
-Message queues are named objects that operate with readers and writers.
-In addition, a message queue is a priority queue of discrete messages.
-POSIX message queues offer a certain, basic amount of application access
-to, and control over, the message queue geometry that can be changed.
-
-@subsection Messages
-
-A message is a variable length buffer where information can be stored to
-support communication. The length of the message and the information
-stored in that message are user-defined and can be actual data,
-pointer(s), or empty. There is a maximum acceptable length for a message
-that is associated with each message queue.
-
-@subsection Message Queues
-
-Message queues are named objects similar to the pipes of POSIX. They are
-a means of communicating data between multiple processes and for passing
-messages among tasks and ISRs. Message queues can contain a variable
-number of messages from 0 to an upper limit that is user defined. The
-maximum length of the message can be set on a per message queue basis.
-Normally messages are sent and received from the message queue in FIFO
-order. However, messages can also be prioritized and a priority queue
-established for the passing of messages. Synchronization is needed when a
-task waits for a message to arrive at a queue. Also, a task may poll a
-queue for the arrival of a message.
-
-The message queue descriptor mqd_t mq represents the message queue. It is
-passed as an argument to all of the message queue functions.
-
-@subsection Building a Message Queue Attribute Set
-
-The mq_attr structure is used to define the characteristics of the message
-queue.
-
-@example
-@group
-typedef struct mq_attr@{
- long mq_flags;
- long mq_maxmsg;
- long mq_msgsize;
- long mq_curmsgs;
-@};
-@end group
-@end example
-
-All of these attributes are set when the message queue is created using
-mq_open. The mq_flags field is not used in the creation of a message
-queue, it is only used by mq_setattr and mq_getattr. The structure
-mq_attr is passed as an argument to mq_setattr and mq_getattr.
-
-The mq_flags contain information affecting the behavior of the message
-queue. The O_NONBLOCK mq_flag is the only flag that is defined. In
-mq_setattr, the mq_flag can be set to dynamically change the blocking and
-non-blocking behavior of the message queue. If the non-block flag is set
-then the message queue is non-blocking, and requests to send and receive
-messages do not block waiting for resources. For a blocking message
-queue, a request to send might have to wait for an empty message queue,
-and a request to receive might have to wait for a message to arrive on the
-queue. Both mq_maxmsg and mq_msgsize affect the sizing of the message
-queue. mq_maxmsg specifies how many messages the queue can hold at any
-one time. mq_msgsize specifies the size of any one message on the queue.
-If either of these limits is exceeded, an error message results.
-
-Upon return from mq_getattr, the mq_curmsgs is set according to the
-current state of the message queue. This specifies the number of messages
-currently on the queue.
-
-@subsection Notification of a Message on the Queue
-
-Every message queue has the ability to notify one (and only one) process
-whenever the queue's state changes from empty (0 messages) to nonempty.
-This means that the process does not have to block or constantly poll
-while it waits for a message. By calling mq_notify, you can attach a
-notification request to a message queue. When a message is received by an
-empty queue, if there are no processes blocked and waiting for the
-message, then the queue notifies the requesting process of a message
-arrival. There is only one signal sent by the message queue, after that
-the notification request is de-registered and another process can attach
-its notification request. After receipt of a notification, a process must
-re-register if it wishes to be notified again.
-
-If there is a process blocked and waiting for the message, that process
-gets the message, and notification is not sent. It is also possible for
-another process to receive the message after the notification is sent but
-before the notified process has sent its receive request.
-
-Only one process can have a notification request attached to a message
-queue at any one time. If another process attempts to register a
-notification request, it fails. You can de-register for a message queue
-by passing a NULL to mq_notify, this removes any notification request
-attached to the queue. Whenever the message queue is closed, all
-notification attachments are removed.
-
-@subsection POSIX Interpretation Issues
-
-There is one significant point of interpretation related to
-the RTEMS implementation of POSIX message queues:
-
-@cite{What happens to threads already blocked on a message queue when the
-mode of that same message queue is changed from blocking to non-blocking?}
-
-
-The RTEMS POSIX implementation decided to unblock all waiting tasks
-with an @code{EAGAIN} status just as if a non-blocking version of
-the same operation had returned unsatisfied. This case is not
-discussed in the POSIX standard and other implementations may have
-chosen alternative behaviors.
-
-@section Operations
-
-@subsection Opening or Creating a Message Queue
-
-If the message queue already exists, mq_open() opens it, if the message
-queue does not exist, mq_open() creates it. When a message queue is
-created, the geometry of the message queue is contained in the attribute
-structure that is passed in as an argument. This includes mq_msgsize that
-dictates the maximum size of a single message, and the mq_maxmsg that
-dictates the maximum number of messages the queue can hold at one time.
-The blocking or non-blocking behavior of the queue can also specified.
-
-@subsection Closing a Message Queue
-
-The mq_close() function is used to close the connection made to a message
-queue that was made during mq_open. The message queue itself and the
-messages on the queue are persistent and remain after the queue is closed.
-
-@subsection Removing a Message Queue
-
-The mq_unlink() function removes the named message queue. If the message
-queue is not open when mq_unlink is called, then the queue is immediately
-eliminated. Any messages that were on the queue are lost, and the queue
-can not be opened again. If processes have the queue open when mq_unlink
-is called, the removal of the queue is delayed until the last process
-using the queue has finished. However, the name of the message queue is
-removed so that no other process can open it.
-
-@subsection Sending a Message to a Message Queue
-
-The mq_send() function adds the message in priority order to the message
-queue. Each message has an assigned a priority. The highest priority
-message is be at the front of the queue.
-
-The maximum number of messages that a message queue may accept is
-specified at creation by the mq_maxmsg field of the attribute structure.
-If this amount is exceeded, the behavior of the process is determined
-according to what oflag was used when the message queue was opened. If
-the queue was opened with O_NONBLOCK flag set, the process does not block,
-and an error is returned. If the O_NONBLOCK flag was not set, the process
-does block and wait for space on the queue.
-
-@subsection Receiving a Message from a Message Queue
-
-The mq_receive() function is used to receive the oldest of the highest
-priority message(s) from the message queue specified by mqdes. The
-messages are received in FIFO order within the priorities. The received
-message's priority is stored in the location referenced by the msg_prio.
-If the msg_prio is a NULL, the priority is discarded. The message is
-removed and stored in an area pointed to by msg_ptr whose length is of
-msg_len. The msg_len must be at least equal to the mq_msgsize attribute
-of the message queue.
-
-The blocking behavior of the message queue is set by O_NONBLOCK at mq_open
-or by setting O_NONBLOCK in mq_flags in a call to mq_setattr. If this is
-a blocking queue, the process does block and wait on an empty queue. If
-this a non-blocking queue, the process does not block. Upon successful
-completion, mq_receive returns the length of the selected message in bytes
-and the message is removed from the queue.
-
-@subsection Notification of Receipt of a Message on an Empty Queue
-
-The mq_notify() function registers the calling process to be notified of
-message arrival at an empty message queue. Every message queue has the
-ability to notify one (and only one) process whenever the queue's state
-changes from empty (0 messages) to nonempty. This means that the process
-does not have to block or constantly poll while it waits for a message.
-By calling mq_notify, a notification request is attached to a message
-queue. When a message is received by an empty queue, if there are no
-processes blocked and waiting for the message, then the queue notifies the
-requesting process of a message arrival. There is only one signal sent by
-the message queue, after that the notification request is de-registered
-and another process can attach its notification request. After receipt of
-a notification, a process must re-register if it wishes to be notified
-again.
-
-If there is a process blocked and waiting for the message, that process
-gets the message, and notification is not sent. Only one process can have
-a notification request attached to a message queue at any one time. If
-another process attempts to register a notification request, it fails.
-You can de-register for a message queue by passing a NULL to mq_notify,
-this removes any notification request attached to the queue. Whenever the
-message queue is closed, all notification attachments are removed.
-
-@subsection Setting the Attributes of a Message Queue
-
-The mq_setattr() function is used to set attributes associated with the
-open message queue description referenced by the message queue descriptor
-specified by mqdes. The *omqstat represents the old or previous
-attributes. If omqstat is non-NULL, the function mq_setattr() stores, in
-the location referenced by omqstat, the previous message queue attributes
-and the current queue status. These values are the same as would be
-returned by a call to mq_getattr() at that point.
-
-There is only one mq_attr.mq_flag that can be altered by this call. This
-is the flag that deals with the blocking and non-blocking behavior of the
-message queue. If the flag is set then the message queue is non-blocking,
-and requests to send or receive do not block while waiting for resources.
-If the flag is not set, then message send and receive may involve waiting
-for an empty queue or waiting for a message to arrive.
-
-@subsection Getting the Attributes of a Message Queue
-
-The mq_getattr() function is used to get status information and attributes
-of the message queue associated with the message queue descriptor. The
-results are returned in the mq_attr structure referenced by the mqstat
-argument. All of these attributes are set at create time, except the
-blocking/non-blocking behavior of the message queue which can be
-dynamically set by using mq_setattr. The attribute mq_curmsg is set to
-reflect the number of messages on the queue at the time that mq_getattr
-was called.
-
-@section Directives
-
-This section details the message passing manager's directives. A
-subsection is dedicated to each of this manager's directives and describes
-the calling sequence, related constants, usage, and status codes.
-
-@c
-@c
-@c
-@page
-@subsection mq_open - Open a Message Queue
-
-@findex mq_open
-@cindex open a message queue
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <mqueue.h>
-
-mqd_t mq_open(
- const char *name,
- int oflag,
- mode_t mode,
- struct mq_attr *attr
-);
-@end example
-
-@subheading STATUS CODES:
-
-@code{EACCES} - Either the message queue exists and the permissions
-requested in oflags were denied, or the message does not exist and
-permission to create one is denied.
-
-@code{EEXIST} - You tried to create a message queue that already exists.
-
-@code{EINVAL} - An inappropriate name was given for the message queue, or
-the values of mq-maxmsg or mq_msgsize were less than 0.
-
-@code{ENOENT} - The message queue does not exist, and you did not specify
-to create it.
-
-@code{EINTR} - The call to mq_open was interrupted by a signal.
-
-@code{EMFILE} - The process has too many files or message queues open.
-This is a process limit error.
-
-@code{ENFILE} - The system has run out of resources to support more open
-message queues. This is a system error.
-
-@code{ENAMETOOLONG} - mq_name is too long.
-
-@subheading DESCRIPTION:
-
-The mq_open () function establishes the connection between a process and a
-message queue with a message queue descriptor. If the message queue
-already exists, mq_open opens it, if the message queue does not exist,
-mq_open creates it. Message queues can have multiple senders and
-receivers. If mq_open is successful, the function returns a message queue
-descriptor. Otherwise, the function returns a -1 and sets 'errno' to
-indicate the error.
-
-The name of the message queue is used as an argument. For the best of
-portability, the name of the message queue should begin with a "/" and no
-other "/" should be in the name. Different systems interpret the name in
-different ways.
-
-The oflags contain information on how the message is opened if the queue
-already exists. This may be O_RDONLY for read only, O_WRONLY for write
-only, of O_RDWR, for read and write.
-
-In addition, the oflags contain information needed in the creation of a
-message queue. @code{O_NONBLOCK} - If the non-block flag is set then the
-message queue is non-blocking, and requests to send and receive messages
-do not block waiting for resources. If the flag is not set then the
-message queue is blocking, and a request to send might have to wait for an
-empty message queue. Similarly, a request to receive might have to wait
-for a message to arrive on the queue. @code{O_CREAT} - This call specifies
-that the call the mq_open is to create a new message queue. In this case
-the mode and attribute arguments of the function call are utilized. The
-message queue is created with a mode similar to the creation of a file,
-read and write permission creator, group, and others.
-
-The geometry of the message queue is contained in the attribute structure.
-This includes mq_msgsize that dictates the maximum size of a single
-message, and the mq_maxmsg that dictates the maximum number of messages
-the queue can hold at one time. If a NULL is used in the mq_attr
-argument, then the message queue is created with implementation defined
-defaults. @code{O_EXCL} - is always set if O_CREAT flag is set. If the
-message queue already exists, O_EXCL causes an error message to be
-returned, otherwise, the new message queue fails and appends to the
-existing one.
-
-@subheading NOTES:
-
-The mq_open () function does not add or remove messages from the queue.
-When a new message queue is being created, the mq_flag field of the
-attribute structure is not used.
-
-@c
-@c
-@c
-@page
-@subsection mq_close - Close a Message Queue
-
-@findex mq_close
-@cindex close a message queue
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <mqueue.h>
-
-int mq_close(
- mqd_t mqdes
-);
-@end example
-
-@subheading STATUS CODES:
-
-@code{EINVAL} - The descriptor does not represent a valid open message
-queue
-
-@subheading DESCRIPTION:
-
-The mq_close function removes the association between the message queue
-descriptor, mqdes, and its message queue. If mq_close() is successfully
-completed, the function returns a value of zero; otherwise, the function
-returns a value of -1 and sets errno to indicate the error.
-
-@subheading NOTES:
-
-If the process had successfully attached a notification request to the
-message queue via mq_notify, this attachment is removed, and the message
-queue is available for another process to attach for notification.
-mq_close has no effect on the contents of the message queue, all the
-messages that were in the queue remain in the queue.
-
-@c
-@c
-@c
-@page
-@subsection mq_unlink - Remove a Message Queue
-
-@findex mq_unlink
-@cindex remove a message queue
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <mqueue.h>
-
-int mq_unlink(
- const char *name
-);
-@end example
-
-@subheading STATUS CODES:
-
-@code{EINVAL} - The descriptor does not represent a valid message queue
-
-@subheading DESCRIPTION:
-
-The mq_unlink() function removes the named message queue. If the message
-queue is not open when mq_unlink is called, then the queue is immediately
-eliminated. Any messages that were on the queue are lost, and the queue
-can not be opened again. If processes have the queue open when mq_unlink
-is called, the removal of the queue is delayed until the last process
-using the queue has finished. However, the name of the message queue is
-removed so that no other process can open it. Upon successful completion,
-the function returns a value of zero. Otherwise, the named message queue
-is not changed by this function call, and the function returns a value of
--1 and sets errno to indicate the error.
-
-@subheading NOTES:
-
-Calls to mq_open() to re-create the message queue may fail until the
-message queue is actually removed. However, the mq_unlink() call need not
-block until all references have been closed; it may return immediately.
-
-@c
-@c
-@c
-@page
-@subsection mq_send - Send a Message to a Message Queue
-
-@findex mq_send
-@cindex send a message to a message queue
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include<mqueue.h>
-int mq_send(
- mqd_t mqdes,
- const char *msg_ptr,
- size_t msg_len,
- unsigned int msg_prio
-);
-@end example
-
-@subheading STATUS CODES:
-
-@code{EBADF} - The descriptor does not represent a valid message queue, or the queue was opened for read only O_RDONLY
-@code{EINVAL} - The value of msg_prio was greater than the MQ_PRIO_MAX.
-@code{EMSGSIZE} - The msg_len is greater than the mq_msgsize attribute of the message queue
-@code{EAGAIN} - The message queue is non-blocking, and there is no room on the queue for another message as specified by the mq_maxmsg.
-@code{EINTR} - The message queue is blocking. While the process was waiting for free space on the queue, a signal arrived that interrupted the wait.
-
-@subheading DESCRIPTION:
-
-The mq_send() function adds the message pointed to by the argument msg_ptr
-to the message queue specified by mqdes. Each message is assigned a
-priority , from 0 to MQ_PRIO_MAX. MQ_PRIO_MAX is defined in <limits.h> and
-must be at least 32. Messages are added to the queue in order of their
-priority. The highest priority message is at the front of the queue.
-
-The maximum number of messages that a message queue may accept is
-specified at creation by the mq_maxmsg field of the attribute structure.
-If this amount is exceeded, the behavior of the process is determined
-according to what oflag was used when the message queue was opened. If
-the queue was opened with O_NONBLOCK flag set, then the EAGAIN error is
-returned. If the O_NONBLOCK flag was not set, the process blocks and
-waits for space on the queue, unless it is interrupted by a signal.
-
-Upon successful completion, the mq_send () function returns a value of
-zero. Otherwise, no message is enqueued, the function returns -1, and
-errno is set to indicate the error.
-
-@subheading NOTES:
-
-If the specified message queue is not full, mq_send inserts the message at
-the position indicated by the msg_prio argument.
-
-@c
-@c
-@c
-@page
-@subsection mq_receive - Receive a Message from a Message Queue
-
-@findex mq_receive
-@cindex receive a message from a message queue
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <mqueue.h>
-
-size_t mq_receive(
- mqd_t mqdes,
- char *msg_ptr,
- size_t msg_len,
- unsigned int *msg_prio
-);
-@end example
-
-@subheading STATUS CODES:
-
-@code{EBADF} - The descriptor does not represent a valid message queue, or the queue was opened for write only O_WRONLY
-@code{EMSGSIZE} - The msg_len is less than the mq_msgsize attribute of the message queue
-@code{EAGAIN} - The message queue is non-blocking, and the queue is empty
-@code{EINTR} - The message queue is blocking. While the process was waiting for a message to arrive on the queue, a signal arrived that interrupted the wait.
-
-@subheading DESCRIPTION:
-
-The mq_receive function is used to receive the oldest of the highest
-priority message(s) from the message queue specified by mqdes. The
-messages are received in FIFO order within the priorities. The received
-message's priority is stored in the location referenced by the msg_prio.
-If the msg_prio is a NULL, the priority is discarded. The message is
-removed and stored in an area pointed to by msg_ptr whose length is of
-msg_len. The msg_len must be at least equal to the mq_msgsize attribute
-of the message queue.
-
-The blocking behavior of the message queue is set by O_NONBLOCK at mq_open
-or by setting O_NONBLOCK in mq_flags in a call to mq_setattr. If this is
-a blocking queue, the process blocks and waits on an empty queue. If this
-a non-blocking queue, the process does not block.
-
-Upon successful completion, mq_receive returns the length of the selected
-message in bytes and the message is removed from the queue. Otherwise, no
-message is removed from the queue, the function returns a value of -1, and
-sets errno to indicate the error.
-
-@subheading NOTES:
-
-If the size of the buffer in bytes, specified by the msg_len argument, is
-less than the mq_msgsize attribute of the message queue, the function
-fails and returns an error
-
-@c
-@c
-@c
-@page
-@subsection mq_notify - Notify Process that a Message is Available
-
-@findex mq_notify
-@cindex notify process that a message is available
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <mqueue.h>
-
-int mq_notify(
- mqd_t mqdes,
- const struct sigevent *notification
-);
-@end example
-
-@subheading STATUS CODES:
-
-@code{EBADF} - The descriptor does not refer to a valid message queue
-@code{EBUSY} - A notification request is already attached to the queue
-
-@subheading DESCRIPTION:
-
-If the argument notification is not NULL, this function registers the
-calling process to be notified of message arrival at an empty message
-queue associated with the specified message queue descriptor, mqdes.
-
-Every message queue has the ability to notify one (and only one) process
-whenever the queue's state changes from empty (0 messages) to nonempty.
-This means that the process does not have to block or constantly poll
-while it waits for a message. By calling mq_notify, a notification
-request is attached to a message queue. When a message is received by an
-empty queue, if there are no processes blocked and waiting for the
-message, then the queue notifies the requesting process of a message
-arrival. There is only one signal sent by the message queue, after that
-the notification request is de-registered and another process can attach
-its notification request. After receipt of a notification, a process must
-re-register if it wishes to be notified again.
-
-If there is a process blocked and waiting for the message, that process
-gets the message, and notification is not be sent. Only one process can
-have a notification request attached to a message queue at any one time.
-If another process attempts to register a notification request, it fails.
-You can de-register for a message queue by passing a NULL to mq_notify;
-this removes any notification request attached to the queue. Whenever the
-message queue is closed, all notification attachments are removed.
-
-Upon successful completion, mq_notify returns a value of zero; otherwise,
-the function returns a value of -1 and sets errno to indicate the error.
-
-@subheading NOTES:
-
-It is possible for another process to receive the message after the notification is sent but before the notified process has sent its receive request.
-
-@c
-@c
-@c
-@page
-@subsection mq_setattr - Set Message Queue Attributes
-
-@findex mq_setattr
-@cindex set message queue attributes
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <mqueue.h>
-
-int mq_setattr(
- mqd_t mqdes,
- const struct mq_attr *mqstat,
- struct mq_attr *omqstat
-);
-@end example
-
-@subheading STATUS CODES:
-
-@code{EBADF} - The message queue descriptor does not refer to a valid, open queue.
-@code{EINVAL} - The mq_flag value is invalid.
-
-@subheading DESCRIPTION:
-
-The mq_setattr function is used to set attributes associated with the open
-message queue description referenced by the message queue descriptor
-specified by mqdes. The *omqstat represents the old or previous
-attributes. If omqstat is non-NULL, the function mq_setattr() stores, in
-the location referenced by omqstat, the previous message queue attributes
-and the current queue status. These values are the same as would be
-returned by a call to mq_getattr() at that point.
-
-There is only one mq_attr.mq_flag which can be altered by this call.
-This is the flag that deals with the blocking and non-blocking behavior of
-the message queue. If the flag is set then the message queue is
-non-blocking, and requests to send or receive do not block while waiting
-for resources. If the flag is not set, then message send and receive may
-involve waiting for an empty queue or waiting for a message to arrive.
-
-Upon successful completion, the function returns a value of zero and the
-attributes of the message queue have been changed as specified.
-Otherwise, the message queue attributes is unchanged, and the function
-returns a value of -1 and sets errno to indicate the error.
-
-@subheading NOTES:
-
-All other fields in the mq_attr are ignored by this call.
-
-@c
-@c
-@c
-@page
-@subsection mq_getattr - Get Message Queue Attributes
-
-@findex mq_getattr
-@cindex get message queue attributes
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <mqueue.h>
-int mq_getattr(
- mqd_t mqdes,
- struct mq_attr *mqstat
-);
-@end example
-
-@subheading STATUS CODES:
-
-@code{EBADF} - The message queue descriptor does not refer to a valid,
-open message queue.
-
-@subheading DESCRIPTION:
-
-The mqdes argument specifies a message queue descriptor. The mq_getattr
-function is used to get status information and attributes of the message
-queue associated with the message queue descriptor. The results are
-returned in the mq_attr structure referenced by the mqstat argument. All
-of these attributes are set at create time, except the
-blocking/non-blocking behavior of the message queue which can be
-dynamically set by using mq_setattr. The attribute mq_curmsg is set to
-reflect the number of messages on the queue at the time that mq_getattr
-was called.
-
-Upon successful completion, the mq_getattr function returns zero.
-Otherwise, the function returns -1 and sets errno to indicate the error.
-
-@subheading NOTES:
-
diff --git a/doc/posix_users/mutex.t b/doc/posix_users/mutex.t
deleted file mode 100644
index 101cf63ca1..0000000000
--- a/doc/posix_users/mutex.t
+++ /dev/null
@@ -1,744 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Mutex Manager
-
-@section Introduction
-
-The mutex manager implements the functionality required of the mutex
-manager as defined by POSIX 1003.1b-1996. This standard requires that
-a compliant operating system provide the facilties to ensure that
-threads can operate with mutual exclusion from one another and
-defines the API that must be provided.
-
-The services provided by the mutex manager are:
-
-@itemize @bullet
-@item @code{pthread_mutexattr_init} - Initialize a Mutex Attribute Set
-@item @code{pthread_mutexattr_destroy} - Destroy a Mutex Attribute Set
-@item @code{pthread_mutexattr_setprotocol} - Set the Blocking Protocol
-@item @code{pthread_mutexattr_getprotocol} - Get the Blocking Protocol
-@item @code{pthread_mutexattr_setprioceiling} - Set the Priority Ceiling
-@item @code{pthread_mutexattr_getprioceiling} - Get the Priority Ceiling
-@item @code{pthread_mutexattr_setpshared} - Set the Visibility
-@item @code{pthread_mutexattr_getpshared} - Get the Visibility
-@item @code{pthread_mutex_init} - Initialize a Mutex
-@item @code{pthread_mutex_destroy} - Destroy a Mutex
-@item @code{pthread_mutex_lock} - Lock a Mutex
-@item @code{pthread_mutex_trylock} - Poll to Lock a Mutex
-@item @code{pthread_mutex_timedlock} - Lock a Mutex with Timeout
-@item @code{pthread_mutex_unlock} - Unlock a Mutex
-@item @code{pthread_mutex_setprioceiling} - Dynamically Set the Priority Ceiling
-@item @code{pthread_mutex_getprioceiling} - Dynamically Get the Priority Ceiling
-@end itemize
-
-@section Background
-
-@subsection Mutex Attributes
-
-Mutex attributes are utilized only at mutex creation time. A mutex
-attribute structure may be initialized and passed as an argument to
-the @code{mutex_init} routine. Note that the priority ceiling of
-a mutex may be set at run-time.
-
-@table @b
-@item blocking protcol
-is the XXX
-
-@item priority ceiling
-is the XXX
-
-@item pshared
-is the XXX
-
-@end table
-
-@subsection PTHREAD_MUTEX_INITIALIZER
-
-This is a special value that a variable of type @code{pthread_mutex_t}
-may be statically initialized to as shown below:
-
-@example
-pthread_mutex_t my_mutex = PTHREAD_MUTEX_INITIALIZER;
-@end example
-
-This indicates that @code{my_mutex} will be automatically initialized
-by an implicit call to @code{pthread_mutex_init} the first time
-the mutex is used.
-
-Note that the mutex will be initialized with default attributes.
-
-@section Operations
-
-There is currently no text in this section.
-
-@section Services
-
-This section details the mutex manager's services.
-A subsection is dedicated to each of this manager's services
-and describes the calling sequence, related constants, usage,
-and status codes.
-
-@c
-@c
-@c
-@page
-@subsection pthread_mutexattr_init - Initialize a Mutex Attribute Set
-
-@findex pthread_mutexattr_init
-@cindex initialize a mutex attribute set
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_mutexattr_init(
- pthread_mutexattr_t *attr
-);
-@end example
-
-@subheading STATUS CODES:
-
-@table @b
-@item EINVAL
-The attribute pointer argument is invalid.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{pthread_mutexattr_init} routine initializes the mutex attributes
-object specified by @code{attr} with the default value for all of the
-individual attributes.
-
-@subheading NOTES:
-
-XXX insert list of default attributes here.
-
-@c
-@c
-@c
-@page
-@subsection pthread_mutexattr_destroy - Destroy a Mutex Attribute Set
-
-@findex pthread_mutexattr_destroy
-@cindex destroy a mutex attribute set
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_mutexattr_destroy(
- pthread_mutexattr_t *attr
-);
-@end example
-
-@subheading STATUS CODES:
-
-@table @b
-@item EINVAL
-The attribute pointer argument is invalid.
-
-@item EINVAL
-The attribute set is not initialized.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{pthread_mutex_attr_destroy} routine is used to destroy a mutex
-attributes object. The behavior of using an attributes object after
-it is destroyed is implementation dependent.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection pthread_mutexattr_setprotocol - Set the Blocking Protocol
-
-@findex pthread_mutexattr_setprotocol
-@cindex set the blocking protocol
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_mutexattr_setprotocol(
- pthread_mutexattr_t *attr,
- int protocol
-);
-@end example
-
-@subheading STATUS CODES:
-
-@table @b
-@item EINVAL
-The attribute pointer argument is invalid.
-
-@item EINVAL
-The attribute set is not initialized.
-
-@item EINVAL
-The protocol argument is invalid.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{pthread_mutexattr_setprotocol} routine is used to set value of the
-@code{protocol} attribute. This attribute controls the order in which
-threads waiting on this mutex will receive it.
-
-The @code{protocol} can be one of the following:
-
-@table @b
-
-@item @code{PTHREAD_PRIO_NONE}
-in which case blocking order is FIFO.
-
-@item @code{PTHREAD_PRIO_INHERIT}
-in which case blocking order is priority with the priority inheritance
-protocol in effect.
-
-@item @code{PTHREAD_PRIO_PROTECT}
-in which case blocking order is priority with the priority ceiling
-protocol in effect.
-
-@end table
-
-@subheading NOTES:
-
-There is currently no way to get simple priority blocking ordering
-with POSIX mutexes even though this could easily by supported by RTEMS.
-
-@c
-@c
-@c
-@page
-@subsection pthread_mutexattr_getprotocol - Get the Blocking Protocol
-
-@findex pthread_mutexattr_getprotocol
-@cindex get the blocking protocol
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_mutexattr_getprotocol(
- pthread_mutexattr_t *attr,
- int *protocol
-);
-@end example
-
-@subheading STATUS CODES:
-
-@table @b
-@item EINVAL
-The attribute pointer argument is invalid.
-
-@item EINVAL
-The attribute set is not initialized.
-
-@item EINVAL
-The protocol pointer argument is invalid.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{pthread_mutexattr_getprotocol} routine is used to obtain
-the value of the @code{protocol} attribute. This attribute controls
-the order in which threads waiting on this mutex will receive it.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection pthread_mutexattr_setprioceiling - Set the Priority Ceiling
-
-@findex pthread_mutexattr_setprioceiling
-@cindex set the priority ceiling
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_mutexattr_setprioceiling(
- pthread_mutexattr_t *attr,
- int prioceiling
-);
-@end example
-
-@subheading STATUS CODES:
-
-@table @b
-@item EINVAL
-The attribute pointer argument is invalid.
-
-@item EINVAL
-The attribute set is not initialized.
-
-@item EINVAL
-The prioceiling argument is invalid.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{pthread_mutexattr_setprioceiling} routine is used to set value of the
-@code{prioceiling} attribute. This attribute specifies the priority that
-is the ceiling for threads obtaining this mutex. Any task obtaining this
-mutex may not be of greater priority that the ceiling. If it is of lower
-priority, then its priority will be elevated to @code{prioceiling}.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection pthread_mutexattr_getprioceiling - Get the Priority Ceiling
-
-@findex pthread_mutexattr_getprioceiling
-@cindex get the priority ceiling
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_mutexattr_getprioceiling(
- const pthread_mutexattr_t *attr,
- int *prioceiling
-);
-@end example
-
-@subheading STATUS CODES:
-
-@table @b
-@item EINVAL
-The attribute pointer argument is invalid.
-
-@item EINVAL
-The attribute set is not initialized.
-
-@item EINVAL
-The prioceiling pointer argument is invalid.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{pthread_mutexattr_getprioceiling} routine is used to obtain the
-value of the @code{prioceiling} attribute. This attribute specifies the
-priority ceiling for this mutex.
-
-
-@subheading NOTES:
-
-
-NONE
-@c
-@c
-@c
-@page
-@subsection pthread_mutexattr_setpshared - Set the Visibility
-
-@findex pthread_mutexattr_setpshared
-@cindex set the visibility
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_mutexattr_setpshared(
- pthread_mutexattr_t *attr,
- int pshared
-);
-@end example
-
-@subheading STATUS CODES:
-
-@table @b
-@item EINVAL
-The attribute pointer argument is invalid.
-
-@item EINVAL
-The attribute set is not initialized.
-
-@item EINVAL
-The pshared argument is invalid.
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection pthread_mutexattr_getpshared - Get the Visibility
-
-@findex pthread_mutexattr_getpshared
-@cindex get the visibility
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_mutexattr_getpshared(
- const pthread_mutexattr_t *attr,
- int *pshared
-);
-@end example
-
-@subheading STATUS CODES:
-
-@table @b
-@item EINVAL
-The attribute pointer argument is invalid.
-
-@item EINVAL
-The attribute set is not initialized.
-
-@item EINVAL
-The pshared pointer argument is invalid.
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection pthread_mutex_init - Initialize a Mutex
-
-@findex pthread_mutex_init
-@cindex initialize a mutex
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_mutex_init(
- pthread_mutex_t *mutex,
- const pthread_mutexattr_t *attr
-);
-@end example
-
-@subheading STATUS CODES:
-
-@table @b
-@item EINVAL
-The attribute set is not initialized.
-
-@item EINVAL
-The specified protocol is invalid.
-
-@item EAGAIN
-The system lacked the necessary resources to initialize another mutex.
-
-@item ENOMEM
-Insufficient memory exists to initialize the mutex.
-
-@item EBUSY
-Attempted to reinialize the object reference by mutex, a previously
-initialized, but not yet destroyed.
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection pthread_mutex_destroy - Destroy a Mutex
-
-@findex pthread_mutex_destroy
-@cindex destroy a mutex
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_mutex_destroy(
- pthread_mutex_t *mutex
-);
-@end example
-
-@subheading STATUS CODES:
-
-@table @b
-@item EINVAL
-The specified mutex is invalid.
-
-@item EBUSY
-Attempted to destroy the object reference by mutex, while it is locked or
-referenced by another thread.
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection pthread_mutex_lock - Lock a Mutex
-
-@findex pthread_mutex_lock
-@cindex lock a mutex
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_mutex_lock(
- pthread_mutex_t *mutex
-);
-@end example
-
-@subheading STATUS CODES:
-
-@table @b
-@item EINVAL
-The specified mutex is invalid.
-
-@item EINVAL
-The mutex has the protocol attribute of PTHREAD_PRIO_PROTECT and the
-priority of the calling thread is higher than the current priority
-ceiling.
-
-@item EDEADLK
-The current thread already owns the mutex.
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection pthread_mutex_trylock - Poll to Lock a Mutex
-
-@findex pthread_mutex_trylock
-@cindex poll to lock a mutex
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_mutex_trylock(
- pthread_mutex_t *mutex
-);
-@end example
-
-@subheading STATUS CODES:
-
-@table @b
-@item EINVAL
-The specified mutex is invalid.
-
-@item EINVAL
-The mutex has the protocol attribute of PTHREAD_PRIO_PROTECT and the
-priority of the calling thread is higher than the current priority
-ceiling.
-
-@item EDEADLK
-The current thread already owns the mutex.
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection pthread_mutex_timedlock - Lock a Mutex with Timeout
-
-@findex pthread_mutex_timedlock
-@cindex lock a mutex with timeout
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-#include <time.h>
-
-int pthread_mutex_timedlock(
- pthread_mutex_t *mutex,
- const struct timespec *timeout
-);
-@end example
-
-@subheading STATUS CODES:
-
-@table @b
-@item EINVAL
-The specified mutex is invalid.
-
-@item EINVAL
-The nanoseconds field of timeout is invalid.
-
-@item EINVAL
-The mutex has the protocol attribute of PTHREAD_PRIO_PROTECT and the
-priority of the calling thread is higher than the current priority
-ceiling.
-
-@item EDEADLK
-The current thread already owns the mutex.
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-
-@c
-@c
-@c
-@page
-@subsection pthread_mutex_unlock - Unlock a Mutex
-
-@findex pthread_mutex_unlock
-@cindex unlock a mutex
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_mutex_unlock(
- pthread_mutex_t *mutex
-);
-@end example
-
-@subheading STATUS CODES:
-
-@table @b
-@item EINVAL
-The specified mutex is invalid.
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection pthread_mutex_setprioceiling - Dynamically Set the Priority Ceiling
-
-@findex pthread_mutex_setprioceiling
-@cindex dynamically set the priority ceiling
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_mutex_setprioceiling(
- pthread_mutex_t *mutex,
- int prioceiling,
- int *oldceiling
-);
-@end example
-
-@subheading STATUS CODES:
-
-@table @b
-@item EINVAL
-The oldceiling pointer parameter is invalid.
-
-@item EINVAL
-The prioceiling parameter is an invalid priority.
-
-@item EINVAL
-The specified mutex is invalid.
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection pthread_mutex_getprioceiling - Get the Current Priority Ceiling
-
-@findex pthread_mutex_getprioceiling
-@cindex get the current priority ceiling
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_mutex_getprioceiling(
- pthread_mutex_t *mutex,
- int *prioceiling
-);
-@end example
-
-@subheading STATUS CODES:
-
-@table @b
-@item EINVAL
-The prioceiling pointer parameter is invalid.
-
-@item EINVAL
-The specified mutex is invalid.
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
diff --git a/doc/posix_users/posix_users.texi b/doc/posix_users/posix_users.texi
deleted file mode 100644
index e4adc8adcc..0000000000
--- a/doc/posix_users/posix_users.texi
+++ /dev/null
@@ -1,165 +0,0 @@
-\input texinfo @c -*-texinfo-*-
-@c %**start of header
-@setfilename posix_users
-@syncodeindex vr fn
-@synindex ky cp
-@paragraphindent 0
-@c @smallbook
-@c %**end of header
-
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@c
-@c Master file for the C User's Guide
-@c
-
-@c Joel's Questions
-@c
-@c 1. Why does paragraphindent only impact makeinfo?
-@c 2. Why does paragraphindent show up in HTML?
-@c
-
-@include ../common/setup.texi
-
-@ignore
-@ifinfo
-@format
-START-INFO-DIR-ENTRY
-* RTEMS Posix API User's Guide: (posix_users). Posix API User's Guide Plan
-END-INFO-DIR-ENTRY
-@end format
-@end ifinfo
-@end ignore
-
-@c variable substitution info:
-@c
-@c Note: At the moment we do not document the Ada interface but by building
-@c in the infrastructure Florist support should be simple to add.
-@set is-C
-@clear is-Ada
-@set LANGUAGE C
-@set STRUCTURE structure
-@set ROUTINE function
-@set OR |
-@set RPREFIX RTEMS_
-@set DIRPREFIX rtems_
-@c the language is @value{LANGUAGE}
-@c NOTE: don't use underscore in the name
-@c
-
-@c
-@c Title Page Stuff
-@c
-
-@set edition @value{RTEMS-EDITION}
-@set version @value{RTEMS-VERSION}
-@set update-date @value{RTEMS-UPDATE-DATE}
-@set update-month @value{RTEMS-UPDATE-MONTH}
-
-@c
-@c I don't really like having a short title page. --joel
-@c
-@c @shorttitlepage RTEMS POSIX API User's Guide
-
-@setchapternewpage odd
-@settitle RTEMS POSIX API User's Guide
-@titlepage
-@finalout
-
-@title RTEMS POSIX API User's Guide
-@subtitle Edition @value{edition}, for RTEMS @value{version}
-@sp 1
-@subtitle @value{update-month}
-@author On-Line Applications Research Corporation
-@page
-@include ../common/cpright.texi
-@end titlepage
-
-@c This prevents a black box from being printed on "overflow" lines.
-@c The alternative is to rework a sentence to avoid this problem.
-
-@include preface.texi
-@include process.texi
-@include signal.texi
-@include procenv.texi
-@include files.texi
-@include io.texi
-@include device.texi
-@include cspecific.texi
-@include systemdb.texi
-@include semaphores.texi
-@include mutex.texi
-@include cond.texi
-@include memorymgmt.texi
-@include sched.texi
-@include clock.texi
-@include timer.texi
-@include message.texi
-@include thread.texi
-@include key.texi
-@include cancel.texi
-@include libc.texi
-@include libm.texi
-@include status.texi
-@ifinfo
-@node Top, Preface, (dir), (dir)
-@top posix_users
-
-This is the online version of the RTEMS POSIX API User's Guide
-
-@menu
-* Preface::
-* Process Creation and Execution Manager::
-* Signal Manager::
-* Process Environment Manager::
-* Files and Directories Manager::
-* Input and Output Primitives Manager::
-* Device- and Class- Specific Functions Manager::
-* Language-Specific Services for the C Programming Language Manager::
-* System Databases Manager::
-* Semaphore Manager::
-* Mutex Manager::
-* Condition Variable Manager::
-* Memory Management Manager::
-* Scheduler Manager::
-* Clock Manager::
-* Timer Manager::
-* Message Passing Manager::
-* Thread Manager::
-* Key Manager::
-* Thread Cancellation Manager::
-* Services Provided by C Library (libc)::
-* Services Provided by the Math Library (libm)::
-* Status of Implementation::
-* Command and Variable Index::
-* Concept Index::
-@end menu
-
-@end ifinfo
-@c
-@c
-@c Need to copy the emacs stuff and "trailer stuff" (index, toc) into here
-@c
-
-@node Command and Variable Index, Concept Index, , Top
-@unnumbered Command and Variable Index
-
-@c There are currently no Command and Variable Index entries.
-
-@printindex fn
-
-@node Concept Index, , Command and Variable Index, Top
-@unnumbered Concept Index
-
-@c There are currently no Concept Index entries.
-@printindex cp
-
-@contents
-@bye
-
diff --git a/doc/posix_users/preface.texi b/doc/posix_users/preface.texi
deleted file mode 100644
index 7dfa6f3f0b..0000000000
--- a/doc/posix_users/preface.texi
+++ /dev/null
@@ -1,34 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@ifinfo
-@node Preface, , Top, Top
-@end ifinfo
-@unnumbered Preface
-
-This is the User's Guide for the POSIX API support
-provided in RTEMS.
-
-The functionality described in this document is based
-on the following standards:
-
-@itemize @bullet
-
-@item POSIX 1003.1b-1993.
-
-@item POSIX 1003.1h/D3.
-
-@end itemize
-
-Much of the POSIX API standard is actually implemented in the
-Cygnus Newlib ANSI C Library. Please refer to documentation on
-Newlib for more information on what it supplies.
-
-At this point, this is just beginning to become what it
-ultimately should be.
-
diff --git a/doc/posix_users/procenv.t b/doc/posix_users/procenv.t
deleted file mode 100644
index 021146ec3b..0000000000
--- a/doc/posix_users/procenv.t
+++ /dev/null
@@ -1,819 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Process Environment Manager
-
-@section Introduction
-
-The process environment manager is ...
-
-The directives provided by the process environment manager are:
-
-@itemize @bullet
-@item @code{getpid} - Get Process ID
-@item @code{getppid} - Get Parent Process ID
-@item @code{getuid} - Get User ID
-@item @code{geteuid} - Get Effective User ID
-@item @code{getgid} - Get Real Group ID
-@item @code{getegid} - Get Effective Group ID
-@item @code{setuid} - Set User ID
-@item @code{setgid} - Set Group ID
-@item @code{getgroups} - Get Supplementary Group IDs
-@item @code{getlogin} - Get User Name
-@item @code{getlogin_r} - Reentrant Get User Name
-@item @code{getpgrp} - Get Process Group ID
-@item @code{setsid} - Create Session and Set Process Group ID
-@item @code{setpgid} - Set Process Group ID for Job Control
-@item @code{uname} - Get System Name
-@item @code{times} - Get Process Times
-@item @code{getenv} - Get Environment Variables
-@item @code{setenv} - Set Environment Variables
-@item @code{ctermid} - Generate Terminal Pathname
-@item @code{ttyname} - Determine Terminal Device Name
-@item @code{ttyname_r} - Reentrant Determine Terminal Device Name
-@item @code{isatty} - Determine if File Descriptor is Terminal
-@item @code{sysconf} - Get Configurable System Variables
-@end itemize
-
-@section Background
-
-There is currently no text in this section.
-
-@section Operations
-
-There is currently no text in this section.
-
-@section Directives
-
-This section details the process environment manager's directives.
-A subsection is dedicated to each of this manager's directives
-and describes the calling sequence, related constants, usage,
-and status codes.
-
-@c
-@c
-@c
-@page
-@subsection getpid - Get Process ID
-
-@findex getpid
-@cindex get process id
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int getpid(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection getppid - Get Parent Process ID
-
-@findex getppid
-@cindex get parent process id
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int getppid(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection getuid - Get User ID
-
-@findex getuid
-@cindex get user id
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int getuid(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection geteuid - Get Effective User ID
-
-@findex geteuid
-@cindex get effective user id
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int geteuid(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection getgid - Get Real Group ID
-
-@findex getgid
-@cindex get real group id
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int getgid(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection getegid - Get Effective Group ID
-
-@findex getegid
-@cindex get effective group id
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int getegid(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection setuid - Set User ID
-
-@findex setuid
-@cindex set user id
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int setuid(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection setgid - Set Group ID
-
-@findex setgid
-@cindex set group id
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int setgid(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection getgroups - Get Supplementary Group IDs
-
-@findex getgroups
-@cindex get supplementary group ids
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int getgroups(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection getlogin - Get User Name
-
-@findex getlogin
-@cindex get user name
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int getlogin(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection getlogin_r - Reentrant Get User Name
-
-@findex getlogin_r
-@cindex reentrant get user name
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int getlogin_r(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection getpgrp - Get Process Group ID
-
-@findex getpgrp
-@cindex get process group id
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int getpgrp(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection setsid - Create Session and Set Process Group ID
-
-@findex setsid
-@cindex create session and set process group id
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int setsid(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection setpgid - Set Process Group ID for Job Control
-
-@findex setpgid
-@cindex set process group id for job control
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int setpgid(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection uname - Get System Name
-
-@findex uname
-@cindex get system name
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int uname(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection times - Get process times
-
-@findex times
-@cindex get process times
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <sys/time.h>
-
-clock_t times(
- struct tms *buf
-);
-@end example
-
-@subheading STATUS CODES:
-
-This routine returns the process times
-
-@subheading DESCRIPTION:
-
-@code{times} stores the current process times in @code{buf}.
-
-@code{struct tms} is as defined in @code{/usr/include/sys/times.h}
-
-@code{times} returns the number of clock ticks that have elapsed
-since the systm has been up.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection getenv - Get Environment Variables
-
-@findex getenv
-@cindex get environment variables
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int getenv(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection setenv - Set Environment Variables
-
-@findex setenv
-@cindex set environment variables
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int setenv(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection ctermid - Generate Terminal Pathname
-
-@findex ctermid
-@cindex generate terminal pathname
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int ctermid(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection ttyname - Determine Terminal Device Name
-
-@findex ttyname
-@cindex determine terminal device name
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int ttyname(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection ttyname_r - Reentrant Determine Terminal Device Name
-
-@findex ttyname_r
-@cindex reentrant determine terminal device name
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int ttyname_r(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection isatty - Determine if File Descriptor is Terminal
-
-@findex isatty
-@cindex determine if file descriptor is terminal
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int isatty(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection sysconf - Get Configurable System Variables
-
-@findex sysconf
-@cindex get configurable system variables
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int sysconf(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
diff --git a/doc/posix_users/process.t b/doc/posix_users/process.t
deleted file mode 100644
index fb81c01d49..0000000000
--- a/doc/posix_users/process.t
+++ /dev/null
@@ -1,480 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Process Creation and Execution Manager
-
-@section Introduction
-
-The process creation and execution manager is ...
-
-The directives provided by the process creation and execution manager are:
-
-@itemize @bullet
-@item @code{fork} - Create a Process
-@item @code{execl} - Execute a File
-@item @code{execv} - Execute a File
-@item @code{execle} - Execute a File
-@item @code{execve} - Execute a File
-@item @code{execlp} - Execute a File
-@item @code{execvp} - Execute a File
-@item @code{pthread_atfork} - Register Fork Handlers
-@item @code{wait} - Wait for Process Termination
-@item @code{waitpid} - Wait for Process Termination
-@item @code{_exit} - Terminate a Process
-@end itemize
-
-@section Background
-
-There is currently no text in this section.
-
-@section Operations
-
-There is currently no text in this section.
-
-@section Directives
-
-This section details the process creation and execution manager's directives.
-A subsection is dedicated to each of this manager's directives
-and describes the calling sequence, related constants, usage,
-and status codes.
-
-@c
-@c
-@c
-@page
-@subsection fork - Create a Process
-
-@findex fork
-@cindex create a process
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <sys/types.h>
-
-int fork( void );
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item ENOSYS
-This routine is not supported by RTEMS.
-
-@end table
-
-@subheading DESCRIPTION:
-
-This routine is not supported by RTEMS.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection execl - Execute a File
-
-@findex execl
-@cindex execute a file
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int execl(
- const char *path,
- const char *arg,
- ...
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item ENOSYS
-This routine is not supported by RTEMS.
-
-@end table
-
-@subheading DESCRIPTION:
-
-This routine is not supported by RTEMS.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection execv - Execute a File
-
-@findex execv
-@cindex execute a file
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int execv(
- const char *path,
- char const *argv[],
- ...
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item ENOSYS
-This routine is not supported by RTEMS.
-
-@end table
-
-@subheading DESCRIPTION:
-
-This routine is not supported by RTEMS.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection execle - Execute a File
-
-@findex execle
-@cindex execute a file
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int execle(
- const char *path,
- const char *arg,
- ...
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item ENOSYS
-This routine is not supported by RTEMS.
-
-@end table
-
-@subheading DESCRIPTION:
-
-This routine is not supported by RTEMS.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection execve - Execute a File
-
-@findex execve
-@cindex execute a file
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int execve(
- const char *path,
- char *const argv[],
- char *const envp[]
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item ENOSYS
-This routine is not supported by RTEMS.
-
-@end table
-
-@subheading DESCRIPTION:
-
-This routine is not supported by RTEMS.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection execlp - Execute a File
-
-@findex execlp
-@cindex execute a file
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int execlp(
- const char *file,
- const char *arg,
- ...
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item ENOSYS
-This routine is not supported by RTEMS.
-
-@end table
-
-@subheading DESCRIPTION:
-
-This routine is not supported by RTEMS.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection execvp - Execute a File
-
-@findex execvp
-@cindex execute a file
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int execvp(
- const char *file,
- char *const argv[]
- ...
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item ENOSYS
-This routine is not supported by RTEMS.
-
-@end table
-
-@subheading DESCRIPTION:
-
-This routine is not supported by RTEMS.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection pthread_atfork - Register Fork Handlers
-
-@findex pthread_atfork
-@cindex register fork handlers
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <sys/types.h>
-
-int pthread_atfork(
- void (*prepare)(void),
- void (*parent)(void),
- void (*child)(void)
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item ENOSYS
-This routine is not supported by RTEMS.
-
-@end table
-
-@subheading DESCRIPTION:
-
-This routine is not supported by RTEMS.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection wait - Wait for Process Termination
-
-@findex wait
-@cindex wait for process termination
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <sys/types.h>
-#include <sys/wait.h>
-
-int wait(
- int *stat_loc
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item ENOSYS
-This routine is not supported by RTEMS.
-
-@end table
-
-@subheading DESCRIPTION:
-
-This routine is not supported by RTEMS.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection waitpid - Wait for Process Termination
-
-@findex waitpid
-@cindex wait for process termination
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int wait(
- pid_t pid,
- int *stat_loc,
- int options
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item ENOSYS
-This routine is not supported by RTEMS.
-
-@end table
-
-@subheading DESCRIPTION:
-
-This routine is not supported by RTEMS.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection _exit - Terminate a Process
-
-@findex _exit
-@cindex terminate a process
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-void _exit(
- int status
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-NONE
-
-@subheading DESCRIPTION:
-
-The @code{_exit()} function terminates the calling process.
-
-@subheading NOTES:
-
-In RTEMS, a process is equivalent to the entire application on a single
-processor. Invoking this service terminates the application.
diff --git a/doc/posix_users/sched.t b/doc/posix_users/sched.t
deleted file mode 100644
index afe0bb896d..0000000000
--- a/doc/posix_users/sched.t
+++ /dev/null
@@ -1,219 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Scheduler Manager
-
-@section Introduction
-
-The scheduler manager ...
-
-The directives provided by the scheduler manager are:
-
-@itemize @bullet
-@item @code{sched_get_priority_min} - Get Minimum Priority Value
-@item @code{sched_get_priority_max} - Get Maximum Priority Value
-@item @code{sched_rr_get_interval} - Get Timeslicing Quantum
-@item @code{sched_yield} - Yield the Processor
-@end itemize
-
-@section Background
-
-@subsection Priority
-
-In the RTEMS implementation of the POSIX API, the priorities range from
-the low priority of @code{sched_get_priority_min()} to the highest priority of
-@code{sched_get_priority_max()}. Numerically higher values represent higher
-priorities.
-
-@subsection Scheduling Policies
-
-The following scheduling policies are available:
-
-@table @b
-@item SCHED_FIFO
-Priority-based, preemptive scheduling with no timeslicing. This is equivalent
-to what is called "manual round-robin" scheduling.
-
-@item SCHED_RR
-Priority-based, preemptive scheduling with timeslicing. Time quantums are
-maintained on a per-thread basis and are not reset at each context switch.
-Thus, a thread which is preempted and subsequently resumes execution will
-attempt to complete the unused portion of its time quantum.
-
-@item SCHED_OTHER
-Priority-based, preemptive scheduling with timeslicing. Time quantums are
-maintained on a per-thread basis and are reset at each context switch.
-
-@item SCHED_SPORADIC
-Priority-based, preemptive scheduling utilizing three additional parameters:
-budget, replenishment period, and low priority. Under this policy, the
-thread is allowed to execute for "budget" amount of time before its priority
-is lowered to "low priority". At the end of each replenishment period,
-the thread resumes its initial priority and has its budget replenished.
-
-@end table
-
-@section Operations
-
-There is currently no text in this section.
-
-@section Directives
-
-This section details the scheduler manager's directives.
-A subsection is dedicated to each of this manager's directives
-and describes the calling sequence, related constants, usage,
-and status codes.
-
-@c
-@c
-@c
-@page
-@subsection sched_get_priority_min - Get Minimum Priority Value
-
-@findex sched_get_priority_min
-@cindex get minimum priority value
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <sched.h>
-
-int sched_get_priority_min(
- int policy
-);
-@end example
-
-@subheading STATUS CODES:
-
-On error, this routine returns -1 and sets errno to one of the following:
-
-@table @b
-@item EINVAL
-The indicated policy is invalid.
-
-@end table
-
-@subheading DESCRIPTION:
-
-This routine return the minimum (numerically and logically lowest) priority
-for the specified @code{policy}.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection sched_get_priority_max - Get Maximum Priority Value
-
-@findex sched_get_priority_max
-@cindex get maximum priority value
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <sched.h>
-
-int sched_get_priority_max(
- int policy
-);
-@end example
-
-@subheading STATUS CODES:
-
-On error, this routine returns -1 and sets errno to one of the following:
-
-@table @b
-@item EINVAL
-The indicated policy is invalid.
-
-@end table
-
-@subheading DESCRIPTION:
-
-This routine return the maximum (numerically and logically highest) priority
-for the specified @code{policy}.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection sched_rr_get_interval - Get Timeslicing Quantum
-
-@findex sched_rr_get_interval
-@cindex get timeslicing quantum
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <sched.h>
-
-int sched_rr_get_interval(
- pid_t pid,
- struct timespec *interval
-);
-@end example
-
-@subheading STATUS CODES:
-
-On error, this routine returns -1 and sets errno to one of the following:
-
-@table @b
-@item ESRCH
-The indicated process id is invalid.
-
-@item EINVAL
-The specified interval pointer parameter is invalid.
-
-@end table
-
-@subheading DESCRIPTION:
-
-This routine returns the length of the timeslice quantum in the
-@code{interval} parameter for the specified @code{pid}.
-
-@subheading NOTES:
-
-The @code{pid} argument should be 0 to indicate the calling process.
-
-@c
-@c
-@c
-@page
-@subsection sched_yield - Yield the Processor
-
-@findex sched_yield
-@cindex yield the processor
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <sched.h>
-
-int sched_yield( void );
-@end example
-
-@subheading STATUS CODES:
-
-This routine always returns zero to indicate success.
-
-@subheading DESCRIPTION:
-
-This call forces the calling thread to yield the processor to another
-thread. Normally this is used to implement voluntary round-robin
-task scheduling.
-
-@subheading NOTES:
-
-NONE
diff --git a/doc/posix_users/semaphores.t b/doc/posix_users/semaphores.t
deleted file mode 100644
index bf3de0ea43..0000000000
--- a/doc/posix_users/semaphores.t
+++ /dev/null
@@ -1,593 +0,0 @@
-@c
-@c COPYRIGHT(c) 1988-1998.
-@c On-Line Applications Research Corporation(OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Semaphore Manager
-
-@section Introduction
-
-The semaphore manager provides functions to allocate, delete, and control
-semaphores. This manager is based on the POSIX 1003.1 standard.
-
-The directives provided by the semaphore manager are:
-
-@itemize @bullet
-@item @code{sem_init} - Initialize an unnamed semaphore
-@item @code{sem_destroy} - Destroy an unnamed semaphore
-@item @code{sem_open} - Open a named semaphore
-@item @code{sem_close} - Close a named semaphore
-@item @code{sem_unlink} - Remove a named semaphore
-@item @code{sem_wait} - Lock a semaphore
-@item @code{sem_trywait} - Lock a semaphore
-@item @code{sem_timedwait} - Wait on a Semaphore for a Specified Time
-@item @code{sem_post} - Unlock a semaphore
-@item @code{sem_getvalue} - Get the value of a semeaphore
-@end itemize
-
-@section Background
-
-@subsection Theory
-Semaphores are used for synchronization and mutual exclusion by indicating the
-availability and number of resources. The task (the task which is returning
-resources) notifying other tasks of an event increases the number of resources
-held by the semaphore by one. The task (the task which will obtain resources)
-waiting for the event decreases the number of resources held by the semaphore
-by one. If the number of resources held by a semaphore is insufficient (namely
-0), the task requiring resources will wait until the next time resources are
-returned to the semaphore. If there is more than one task waiting for a
-semaphore, the tasks will be placed in the queue.
-
-@subsection "sem_t" Structure
-The "sem_t" structure is used to represent semaphores. It is passed as an
-argument to the semaphore directives and is defined as follows:
-
-@example
-typedef int sem_t
-@end example
-
-@subsection Building a Semaphore Attribute Set
-
-@section Operations
-
-@subsection Using as a Binary Semaphore
-Although POSIX supports mutexes, they are only visible between threads. To work
-between processes, a binary semaphore must be used.
-
-Creating a semaphore with a limit on the count of 1 effectively restricts the
-semaphore to being a binary semaphore. When the binary semaphore is available,
-the count is 1. When the binary semaphore is unavailable, the count is 0.
-
-Since this does not result in a true binary semaphore, advanced binary features like the Priority Inheritance and Priority Ceiling Protocols are not available.
-
-There is currently no text in this section.
-
-@section Directives
-
-This section details the semaphore manager's directives.
-A subsection is dedicated to each of this manager's directives
-and describes the calling sequence, related constants, usage,
-and status codes.
-
-@c
-@c
-@c
-@page
-@subsection sem_init - Initialize an unnamed semaphore
-
-@findex sem_init
-@cindex initialize an unnamed semaphore
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int sem_init(
- sem_t *sem,
- int pshared,
- unsigned int value
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item EINVAL
-The value argument exceeds SEM_VALUE_MAX
-
-@item ENOSPC
-A resource required to initialize the semaphore has been exhausted
-The limit on semaphores (SEM_VALUE_MAX) has been reached
-
-@item ENOSYS
-The function sem_init is not supported by this implementation
-
-@item EPERM
-The process lacks appropriate privileges to initialize the semaphore
-
-@end table
-
-@subheading DESCRIPTION:
-The sem_init function is used to initialize the unnamed semaphore referred to
-by "sem". The value of the initialized semaphore is the parameter "value". The
-semaphore remains valid until it is destroyed.
-
-ADD MORE HERE XXX
-
-@subheading NOTES:
-If the functions completes successfully, it shall return a value of zero.
-Otherwise, it shall return a value of -1 and set "errno" to specify the error
-that occurred.
-
-Multiprocessing is currently not supported in this implementation.
-
-@c
-@c
-@c
-@page
-@subsection sem_destroy - Destroy an unnamed semaphore
-
-@findex sem_destroy
-@cindex destroy an unnamed semaphore
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int sem_destroy(
- sem_t *sem
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item EINVAL
-The value argument exceeds SEM_VALUE_MAX
-
-@item ENOSYS
-The function sem_init is not supported by this implementation
-
-@item EBUSY
-There are currently processes blocked on the semaphore
-
-@end table
-
-@subheading DESCRIPTION:
-The sem_destroy function is used to destroy an unnamed semaphore refered to by
-"sem". sem_destroy can only be used on a semaphore that was created using
-sem_init.
-
-@subheading NOTES:
-If the functions completes successfully, it shall return a value of zero.
-Otherwise, it shall return a value of -1 and set "errno" to specify the error
-that occurred.
-
-Multiprocessing is currently not supported in this implementation.
-
-
-@c
-@c
-@c
-@page
-@subsection sem_open - Open a named semaphore
-
-@findex sem_open
-@cindex open a named semaphore
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int sem_open(
- const char *name,
- int oflag
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading ARGUMENTS:
-
-The following flag bit may be set in oflag:
-
-@code{O_CREAT} - Creates the semaphore if it does not already exist. If O_CREAT
-is set and the semaphore already exists then O_CREAT has no effect. Otherwise,
-sem_open() creates a semaphore. The O_CREAT flag requires the third and fourth
-argument: mode and value of type mode_t and unsigned int, respectively.
-
-@code{O_EXCL} - If O_EXCL and O_CREAT are set, all call to sem_open() shall fail
-if the semaphore name exists
-
-@subheading STATUS CODES:
-
-@table @b
-@item EACCES
-Valid name specified but oflag permissions are denied, or the semaphore name
-specified does not exist and permission to create the named semaphore is denied.
-
-@item EEXIST
-O_CREAT and O_EXCL are set and the named semaphore already exists.
-
-@item EINTR
-The sem_open() operation was interrupted by a signal.
-
-@item EINVAL
-The sem_open() operation is not supported for the given name.
-
-@item EMFILE
-Too many semaphore descriptors or file descriptors in use by this process.
-
-@item ENAMETOOLONG
-The length of the name exceed PATH_MAX or name component is longer than NAME_MAX
-while POSIX_NO_TRUNC is in effect.
-
-@item ENOENT
-O_CREAT is not set and the named semaphore does not exist.
-
-@item ENOSPC
-There is insufficient space for the creation of a new named semaphore.
-
-@item ENOSYS
-The function sem_open() is not supported by this implementation.
-
-@end table
-
-@subheading DESCRIPTION:
-The sem_open() function establishes a connection between a specified semaphore and
-a process. After a call to sem_open with a specified semaphore name, a process
-can reference to semaphore by the associated name using the address returned by
-the call. The oflag arguments listed above control the state of the semaphore by
-determining if the semaphore is created or accessed by a call to sem_open().
-
-@subheading NOTES:
-
-
-@c
-@c
-@c
-@page
-@subsection sem_close - Close a named semaphore
-
-@findex sem_close
-@cindex close a named semaphore
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int sem_close(
- sem_t *sem_close
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item EACCES
-The semaphore argument is not a valid semaphore descriptor.
-
-@item ENOSYS
-The function sem_close is not supported by this implementation.
-
-@end table
-
-@subheading DESCRIPTION:
-The sem_close() function is used to indicate that the calling process is finished
-using the named semaphore indicated by sem. The function sem_close deallocates
-any system resources that were previously allocated by a sem_open system call. If
-sem_close() completes successfully it returns a 1, otherwise a value of -1 is
-return and errno is set.
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection sem_unlink - Unlink a semaphore
-
-@findex sem_unlink
-@cindex unlink a semaphore
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int sem_unlink(
- const char *name
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item EACCESS
-Permission is denied to unlink a semaphore.
-
-@item ENAMETOOLONG
-The length of the strong name exceed NAME_MAX while POSIX_NO_TRUNC is in effect.
-
-@item ENOENT
-The name of the semaphore does not exist.
-
-@item ENOSPC
-There is insufficient space for the creation of a new named semaphore.
-
-@item ENOSYS
-The function sem_unlink is not supported by this implementation.
-
-@end table
-
-@subheading DESCRIPTION:
-The sem_unlink() function shall remove the semaphore name by the string name. If
-a process is currently accessing the name semaphore, the sem_unlink command has
-no effect. If one or more processes have the semaphore open when the sem_unlink
-function is called, the destruction of semaphores shall be postponed until all
-reference to semaphore are destroyed by calls to sem_close, _exit(), or exec.
-After all references have been destroyed, it returns immediately.
-
-If the termination is successful, the function shall return 0. Otherwise, a -1
-is returned and the errno is set.
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection sem_wait - Wait on a Semaphore
-
-@findex sem_wait
-@cindex wait on a semaphore
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int sem_wait(
- sem_t *sem
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item EINVAL
-The "sem" argument does not refer to a valid semaphore
-
-@end table
-
-@subheading DESCRIPTION:
-This function attempts to lock a semaphore specified by @code{sem}. If the
-semaphore is available, then the semaphore is locked (i.e., the semaphore
-value is decremented). If the semaphore is unavailable (i.e., the semaphore
-value is zero), then the function will block until the semaphore becomes
-available. It will then successfully lock the semaphore. The semaphore
-remains locked until released by a @code{sem_post()} call.
-
-If the call is unsuccessful, then the function returns -1 and sets errno to the
-appropriate error code.
-
-@subheading NOTES:
-Multiprocessing is not supported in this implementation.
-
-@c
-@c
-@c
-@page
-@subsection sem_trywait - Non-blocking Wait on a Semaphore
-
-@findex sem_trywait
-@cindex non
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int sem_trywait(
- sem_t *sem
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item EAGAIN
-The semaphore is not available (i.e., the semaphore value is zero), so the
-semaphore could not be locked.
-
-@item EINVAL
-The @code{sem} argument does not refewr to a valid semaphore
-
-@end table
-
-@subheading DESCRIPTION:
-This function attempts to lock a semaphore specified by @code{sem}. If the
-semaphore is available, then the semaphore is locked (i.e., the semaphore
-value is decremented) and the function returns a value of 0. The semaphore
-remains locked until released by a @code{sem_post()} call. If the semaphore
-is unavailable (i.e., the semaphore value is zero), then the function will
-return a value of -1 immediately and set @code{errno} to EAGAIN.
-
-If the call is unsuccessful, then the function returns -1 and sets
-@code{errno} to the appropriate error code.
-
-@subheading NOTES:
-Multiprocessing is not supported in this implementation.
-
-@c
-@c
-@c
-@page
-@subsection sem_timedwait - Wait on a Semaphore for a Specified Time
-
-@findex sem_timedwait
-@cindex wait on a semaphore for a specified time
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int sem_timedwait(
- sem_t *sem,
- const struct timespec *timeout
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item EAGAIN
-The semaphore is not available (i.e., the semaphore value is zero), so the
-semaphore could not be locked.
-
-@item EINVAL
-The @code{sem} argument does not refewr to a valid semaphore
-
-@end table
-
-@subheading DESCRIPTION:
-This function attemtps to lock a semaphore specified by @code{sem}, and will
-wait for the semaphore for an interval specified by @code{timeout}. If the
-semaphore is available, then the semaphore is locked (i.e., the semaphore
-value is decremented) and the function returns a value of 0. The semaphore
-remains locked until released by a @code{sem_post()} call. If the semaphore
-is unavailable, then the function will wait for the semaphore to become
-available for the amount of time specified by @code{timeout}.
-
-If the semaphore does not become available within the interval specified by
-@code{timeout}, then the function returns -1 and sets @code{errno} to EAGAIN.
-If any other error occurs, the function returns -1 and sets @code{errno} to
-the appropriate error code.
-
-@subheading NOTES:
-Multiprocessing is not supported in this implementation.
-
-@c
-@c
-@c
-@page
-@subsection sem_post - Unlock a Semaphore
-
-@findex sem_post
-@cindex unlock a semaphore
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int sem_post(
- sem_t *sem
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item EINVAL
-The @code{sem} argument does not refer to a valid semaphore
-
-@end table
-
-@subheading DESCRIPTION:
-This function attempts to release the semaphore specified by @code{sem}. If
-other tasks are waiting on the semaphore, then one of those tasks (which one
-depends on the scheduler being used) is allowed to lock the semaphore and
-return from its @code{sem_wait()}, @code{sem_trywait()}, or
-@code{sem_timedwait()} call. If there are no other tasks waiting on the
-semaphore, then the semaphore value is simply incremented. @code{sem_post()}
-returns 0 upon successful completion.
-
-If an error occurs, the function returns -1 and sets @code{errno} to the
-appropriate error code.
-
-@subheading NOTES:
-Multiprocessing is not supported in this implementation.
-
-@c
-@c
-@c
-@page
-@subsection sem_getvalue - Get the value of a semaphore
-
-@findex sem_getvalue
-@cindex get the value of a semaphore
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int sem_getvalue(
- sem_t *sem,
- int *sval
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item EINVAL
-The "sem" argument does not refer to a valid semaphore
-
-@item ENOSYS
-The function sem_getvalue is not supported by this implementation
-
-@end table
-
-@subheading DESCRIPTION:
-The sem_getvalue functions sets the location referenced by the "sval" argument
-to the value of the semaphore without affecting the state of the semaphore. The
-updated value represents a semaphore value that occurred at some point during
-the call, but is not necessarily the actual value of the semaphore when it
-returns to the calling process.
-
-If "sem" is locked, the value returned by sem_getvalue will be zero or a
-negative number whose absolute value is the number of processes waiting for the
-semaphore at some point during the call.
-
-@subheading NOTES:
-If the functions completes successfully, it shall return a value of zero.
-Otherwise, it shall return a value of -1 and set "errno" to specify the error
-that occurred.
diff --git a/doc/posix_users/signal.t b/doc/posix_users/signal.t
deleted file mode 100644
index 70e851b398..0000000000
--- a/doc/posix_users/signal.t
+++ /dev/null
@@ -1,836 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Signal Manager
-
-@section Introduction
-
-The signal manager ...
-
-The directives provided by the signal manager are:
-
-@itemize @bullet
-@item @code{sigaddset} - Add a Signal to a Signal Set
-@item @code{sigdelset} - Delete a Signal from a Signal Set
-@item @code{sigfillset} - Fill a Signal Set
-@item @code{sigismember} - Is Signal a Member of a Signal Set
-@item @code{sigemptyset} - Empty a Signal Set
-@item @code{sigaction} - Examine and Change Signal Action
-@item @code{pthread_kill} - Send a Signal to a Thread
-@item @code{sigprocmask} - Examine and Change Process Blocked Signals
-@item @code{pthread_sigmask} - Examine and Change Thread Blocked Signals
-@item @code{kill} - Send a Signal to a Process
-@item @code{sigpending} - Examine Pending Signals
-@item @code{sigsuspend} - Wait for a Signal
-@item @code{pause} - Suspend Process Execution
-@item @code{sigwait} - Synchronously Accept a Signal
-@item @code{sigwaitinfo} - Synchronously Accept a Signal
-@item @code{sigtimedwait} - Synchronously Accept a Signal with Timeout
-@item @code{sigqueue} - Queue a Signal to a Process
-@item @code{alarm} - Schedule Alarm
-@end itemize
-
-@section Background
-
-@subsection Signal Delivery
-
-Signals directed at a thread are delivered to the specified thread.
-
-Signals directed at a process are delivered to a thread which is selected
-based on the following algorithm:
-
-@enumerate
-@item If the action for this signal is currently @code{SIG_IGN},
-then the signal is simply ignored.
-
-@item If the currently executing thread has the signal unblocked, then
-the signal is delivered to it.
-
-@item If any threads are currently blocked waiting for this signal
-(@code{sigwait()}), then the signal is delivered to the highest priority
-thread waiting for this signal.
-
-@item If any other threads are willing to accept delivery of the signal, then
-the signal is delivered to the highest priority thread of this set. In the
-event, multiple threads of the same priority are willing to accept this
-signal, then priority is given first to ready threads, then to threads
-blocked on calls which may be interrupted, and finally to threads blocked
-on non-interruptible calls.
-
-@item In the event the signal still can not be delivered, then it is left
-pending. The first thread to unblock the signal (@code{sigprocmask()} or
-@code{pthread_sigprocmask()}) or to wait for this signal
-(@code{sigwait()}) will be the recipient of the signal.
-
-@end enumerate
-
-@section Operations
-
-There is currently no text in this section.
-
-@section Directives
-
-This section details the signal manager's directives.
-A subsection is dedicated to each of this manager's directives
-and describes the calling sequence, related constants, usage,
-and status codes.
-
-@c
-@c
-@c
-@page
-@subsection sigaddset - Add a Signal to a Signal Set
-
-@findex sigaddset
-@cindex add a signal to a signal set
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <signal.h>
-
-int sigaddset(
- sigset_t *set,
- int signo
-);
-@end example
-
-@subheading STATUS CODES:
-
-@table @b
-@item EINVAL
-Invalid argument passed.
-
-@end table
-
-@subheading DESCRIPTION:
-
-This function adds the @code{signo} to the specified signal @code{set}.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection sigdelset - Delete a Signal from a Signal Set
-
-@findex sigdelset
-@cindex delete a signal from a signal set
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <signal.h>
-
-int sigdelset(
- sigset_t *set,
- int signo
-);
-@end example
-
-@subheading STATUS CODES:
-
-@table @b
-@item EINVAL
-Invalid argument passed.
-
-@end table
-
-@subheading DESCRIPTION:
-
-This function deletes the @code{signo} to the specified signal @code{set}.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection sigfillset - Fill a Signal Set
-
-@findex sigfillset
-@cindex fill a signal set
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <signal.h>
-
-int sigfillset(
- sigset_t *set
-);
-@end example
-
-@subheading STATUS CODES:
-
-@table @b
-
-@item EINVAL
-Invalid argument passed.
-
-@end table
-
-@subheading DESCRIPTION:
-
-This function fills the specified signal @code{set} such that all
-signals are set.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection sigismember - Is Signal a Member of a Signal Set
-
-@findex sigismember
-@cindex is signal a member of a signal set
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <signal.h>
-
-int sigismember(
- const sigset_t *set,
- int signo
-);
-@end example
-
-@subheading STATUS CODES:
-
-@table @b
-
-@item EINVAL
-Invalid argument passed.
-
-@end table
-
-@subheading DESCRIPTION:
-
-This function returns returns 1 if @code{signo} is a member of @code{set}
-and 0 otherwise.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection sigemptyset - Empty a Signal Set
-
-@findex sigemptyset
-@cindex empty a signal set
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <signal.h>
-
-int sigemptyset(
- sigset_t *set
-);
-@end example
-
-@subheading STATUS CODES:
-
-@table @b
-
-@item EINVAL
-Invalid argument passed.
-
-@end table
-
-@subheading DESCRIPTION:
-
-This function fills the specified signal @code{set} such that all
-signals are cleared.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection sigaction - Examine and Change Signal Action
-
-@findex sigaction
-@cindex examine and change signal action
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <signal.h>
-
-int sigaction(
- int sig,
- const struct sigaction *act,
- struct sigaction *oact
-);
-@end example
-
-@subheading STATUS CODES:
-
-@table @b
-@item EINVAL
-Invalid argument passed.
-
-@item ENOTSUP
-Realtime Signals Extension option not supported.
-
-@end table
-
-@subheading DESCRIPTION:
-
-This function is used to change the action taken by a process on
-receipt of the specfic signal @code{sig}. The new action is
-specified by @code{act} and the previous action is returned
-via @code{oact}.
-
-@subheading NOTES:
-
-The signal number cannot be SIGKILL.
-
-@c
-@c
-@c
-@page
-@subsection pthread_kill - Send a Signal to a Thread
-
-@findex pthread_kill
-@cindex send a signal to a thread
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <signal.h>
-
-int pthread_kill(
- pthread_t thread,
- int sig
-);
-@end example
-
-@subheading STATUS CODES:
-
-@table @b
-
-@item ESRCH
-The thread indicated by the parameter thread is invalid.
-
-@item EINVAL
-Invalid argument passed.
-
-@end table
-
-@subheading DESCRIPTION:
-
-This functions sends the specified signal @code{sig} to @code{thread}.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection sigprocmask - Examine and Change Process Blocked Signals
-
-@findex sigprocmask
-@cindex examine and change process blocked signals
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <signal.h>
-
-int sigprocmask(
- int how,
- const sigset_t *set,
- sigset_t *oset
-);
-@end example
-
-@subheading STATUS CODES:
-
-@table @b
-
-@item EINVAL
-Invalid argument passed.
-
-@end table
-
-@subheading DESCRIPTION:
-
-This function is used to alter the set of currently blocked signals
-on a process wide basis. A blocked signal will not be received by the
-process. The behavior of this function is dependent on the value of
-@code{how} which may be one of the following:
-
-@table @code
-
-@item SIG_BLOCK
-The set of blocked signals is set to the union of @code{set} and
-those signals currently blocked.
-
-@item SIG_UNBLOCK
-The signals specific in @code{set} are removed from the currently
-blocked set.
-
-@item SIG_SETMASK
-The set of currently blocked signals is set to @code{set}.
-
-@end table
-
-If @code{oset} is not @code{NULL}, then the set of blocked signals
-prior to this call is returned in @code{oset}.
-
-@subheading NOTES:
-
-It is not an error to unblock a signal which is not blocked.
-
-@c
-@c
-@c
-@page
-@subsection pthread_sigmask - Examine and Change Thread Blocked Signals
-
-@findex pthread_sigmask
-@cindex examine and change thread blocked signals
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <signal.h>
-
-int pthread_sigmask(
- int how,
- const sigset_t *set,
- sigset_t *oset
-);
-@end example
-
-@subheading STATUS CODES:
-@table @b
-@item EINVAL
-Invalid argument passed.
-
-@end table
-
-@subheading DESCRIPTION:
-
-This function is used to alter the set of currently blocked signals
-for the calling thread. A blocked signal will not be received by the
-process. The behavior of this function is dependent on the value of
-@code{how} which may be one of the following:
-
-@table @code
-@item SIG_BLOCK
-The set of blocked signals is set to the union of @code{set} and
-those signals currently blocked.
-
-@item SIG_UNBLOCK
-The signals specific in @code{set} are removed from the currently
-blocked set.
-
-@item SIG_SETMASK
-The set of currently blocked signals is set to @code{set}.
-
-@end table
-
-If @code{oset} is not @code{NULL}, then the set of blocked signals
-prior to this call is returned in @code{oset}.
-
-@subheading NOTES:
-
-It is not an error to unblock a signal which is not blocked.
-
-
-@c
-@c
-@c
-@page
-@subsection kill - Send a Signal to a Process
-
-@findex kill
-@cindex send a signal to a process
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <sys/types.h>
-#include <signal.h>
-
-int kill(
- pid_t pid,
- int sig
-);
-@end example
-
-@subheading STATUS CODES:
-@table @b
-@item EINVAL
-Invalid argument passed.
-
-@item EPERM
-Process does not have permission to send the signal to any receiving process.
-
-@item ESRCH
-The process indicated by the parameter pid is invalid.
-
-@end table
-
-@subheading DESCRIPTION:
-
-This function sends the signal @code{sig} to the process @code{pid}.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection sigpending - Examine Pending Signals
-
-@findex sigpending
-@cindex examine pending signals
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <signal.h>
-
-int sigpending(
- const sigset_t *set
-);
-@end example
-
-@subheading STATUS CODES:
-
-On error, this routine returns -1 and sets @code{errno} to one of
-the following:
-
-@table @b
-
-@item EFAULT
-Invalid address for set.
-
-@end table
-
-@subheading DESCRIPTION:
-
-This function allows the caller to examine the set of currently pending
-signals. A pending signal is one which has been raised but is currently
-blocked. The set of pending signals is returned in @code{set}.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection sigsuspend - Wait for a Signal
-
-@findex sigsuspend
-@cindex wait for a signal
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <signal.h>
-
-int sigsuspend(
- const sigset_t *sigmask
-);
-@end example
-
-@subheading STATUS CODES:
-
-On error, this routine returns -1 and sets @code{errno} to one of
-the following:
-
-@table @b
-
-@item EINTR
-Signal interrupted this function.
-
-@end table
-
-@subheading DESCRIPTION:
-
-This function temporarily replaces the signal mask for the process
-with that specified by @code{sigmask} and blocks the calling thread
-until the signal is raised.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection pause - Suspend Process Execution
-
-@findex pause
-@cindex suspend process execution
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <signal.h>
-
-int pause( void );
-@end example
-
-@subheading STATUS CODES:
-
-On error, this routine returns -1 and sets @code{errno} to one of
-the following:
-
-@table @b
-
-@item EINTR
-Signal interrupted this function.
-
-@end table
-
-@subheading DESCRIPTION:
-
-This function causes the calling thread to be blocked until the signal
-is received.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection sigwait - Synchronously Accept a Signal
-
-@findex sigwait
-@cindex synchronously accept a signal
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <signal.h>
-
-int sigwait(
- const sigset_t *set,
- int *sig
-);
-@end example
-
-@subheading STATUS CODES:
-@table @b
-@item EINVAL
-Invalid argument passed.
-
-@item EINTR
-Signal interrupted this function.
-
-@end table
-
-@subheading DESCRIPTION:
-
-This function selects a pending signal based on the set specified in
-@code{set}, atomically clears it from the set of pending signals, and
-returns the signal number for that signal in @code{sig}.
-
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection sigwaitinfo - Synchronously Accept a Signal
-
-@findex sigwaitinfo
-@cindex synchronously accept a signal
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <signal.h>
-
-int sigwaitinfo(
- const sigset_t *set,
- siginfo_t *info
-);
-@end example
-
-@subheading STATUS CODES:
-@table @b
-@item EINTR
-Signal interrupted this function.
-
-@end table
-
-@subheading DESCRIPTION:
-
-This function selects a pending signal based on the set specified in
-@code{set}, atomically clears it from the set of pending signals, and
-returns information about that signal in @code{info}.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection sigtimedwait - Synchronously Accept a Signal with Timeout
-
-@findex sigtimedwait
-@cindex synchronously accept a signal with timeout
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <signal.h>
-
-int sigtimedwait(
- const sigset_t *set,
- siginfo_t *info,
- const struct timespec *timeout
-);
-@end example
-
-@subheading STATUS CODES:
-@table @b
-@item EAGAIN
-Timed out while waiting for the specified signal set.
-
-@item EINVAL
-Nanoseconds field of the timeout argument is invalid.
-
-@item EINTR
-Signal interrupted this function.
-
-@end table
-
-@subheading DESCRIPTION:
-
-This function selects a pending signal based on the set specified in
-@code{set}, atomically clears it from the set of pending signals, and
-returns information about that signal in @code{info}. The calling thread
-will block up to @code{timeout} waiting for the signal to arrive.
-
-@subheading NOTES:
-
-If @code{timeout} is NULL, then the calling thread will wait forever for
-the specified signal set.
-
-@c
-@c
-@c
-@page
-@subsection sigqueue - Queue a Signal to a Process
-
-@findex sigqueue
-@cindex queue a signal to a process
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <signal.h>
-
-int sigqueue(
- pid_t pid,
- int signo,
- const union sigval value
-);
-@end example
-
-@subheading STATUS CODES:
-
-@table @b
-
-@item EAGAIN
-No resources available to queue the signal. The process has already
-queued SIGQUEUE_MAX signals that are still pending at the receiver
-or the systemwide resource limit has been exceeded.
-
-@item EINVAL
-The value of the signo argument is an invalid or unsupported signal
-number.
-
-@item EPERM
-The process does not have the appropriate privilege to send the signal
-to the receiving process.
-
-@item ESRCH
-The process pid does not exist.
-
-@end table
-
-@subheading DESCRIPTION:
-
-This function sends the signal specified by @code{signo} to the
-process @code{pid}
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection alarm - Schedule Alarm
-
-@findex alarm
-@cindex schedule alarm
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <signal.h>
-
-unsigned int alarm(
- unsigned int seconds
-);
-@end example
-
-@subheading STATUS CODES:
-
-This call always succeeds.
-
-@subheading DESCRIPTION:
-
-If there was a previous @code{alarm()} request with time remaining,
-then this routine returns the number of seconds until that outstanding
-alarm would have fired. If no previous @code{alarm()} request was
-outstanding, then zero is returned.
-
-@subheading NOTES:
-
-NONE
diff --git a/doc/posix_users/status.t b/doc/posix_users/status.t
deleted file mode 100644
index 00b6d12c80..0000000000
--- a/doc/posix_users/status.t
+++ /dev/null
@@ -1,61 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Status of Implementation
-
-This chapter provides an overview of the status of the implementation
-of the POSIX API for RTEMS. The @i{POSIX 1003.1b Compliance Guide}
-provides more detailed information regarding the implementation of
-each of the numerous functions, constants, and macros specified by
-the POSIX 1003.1b standard.
-
-RTEMS supports many of the process and user/group oriented services
-in a "single user/single process" manner. This means that although
-these services may be of limited usefulness or functionality, they
-are provided and do work in a coherent manner. This is significant
-when porting existing code from UNIX to RTEMS.
-
-@itemize @bullet
-@item Implementation
-@itemize @bullet
-@item The current implementation of @code{dup()} is insufficient.
-@item FIFOs @code{mkfifo()} are not currently implemented.
-@item Asynchronous IO is not implemented.
-@item The @code{flockfile()} family is not implemented
-@item getc/putc unlocked family is not implemented
-@item Shared Memory is not implemented
-@item Mapped Memory is not implemented
-@item NOTES:
-@itemize @bullet
-@item For Shared Memory and Mapped Memory services, it is unclear what
-level of support is appropriate and possible for RTEMS.
-@end itemize
-@end itemize
-
-
-@item Functional Testing
-@itemize @bullet
-@item Tests for unimplemented services
-@end itemize
-
-@item Performance Testing
-@itemize @bullet
-@item There are no POSIX Performance Tests.
-@end itemize
-
-@item Documentation
-@itemize @bullet
-@item Many of the service description pages are not complete in this
-manual. These need to be completed and information added to the
-background and operations sections.
-@item Example programs (not just tests) would be very nice.
-@end itemize
-
-@end itemize
-
-
diff --git a/doc/posix_users/systemdb.t b/doc/posix_users/systemdb.t
deleted file mode 100644
index e1f29abf3f..0000000000
--- a/doc/posix_users/systemdb.t
+++ /dev/null
@@ -1,307 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter System Databases Manager
-
-@section Introduction
-
-The
-system databases manager is ...
-
-The directives provided by the system databases manager are:
-
-@itemize @bullet
-@item @code{getgrgid} - Get Group File Entry for ID
-@item @code{getgrgid_r} - Reentrant Get Group File Entry
-@item @code{getgrnam} - Get Group File Entry for Name
-@item @code{getgrnam_r} - Reentrant Get Group File Entry for Name
-@item @code{getpwuid} - Get Password File Entry for UID
-@item @code{getpwuid_r} - Reentrant Get Password File Entry for UID
-@item @code{getpwnam} - Get Password File Entry for Name
-@item @code{getpwnam_r} - Reentrant Get Password File Entry for Name
-@end itemize
-
-@section Background
-
-There is currently no text in this section.
-
-@section Operations
-
-There is currently no text in this section.
-
-@section Directives
-
-This section details the system databases manager's directives.
-A subsection is dedicated to each of this manager's directives
-and describes the calling sequence, related constants, usage,
-and status codes.
-
-@c
-@c
-@c
-@page
-@subsection getgrgid - Get Group File Entry for ID
-
-@findex getgrgid
-@cindex get group file entry for id
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int getgrgid(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection getgrgid_r - Reentrant Get Group File Entry
-
-@findex getgrgid_r
-@cindex reentrant get group file entry
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int getgrgid_r(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection getgrnam - Get Group File Entry for Name
-
-@findex getgrnam
-@cindex get group file entry for name
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int getgrnam(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection getgrnam_r - Reentrant Get Group File Entry for Name
-
-@findex getgrnam_r
-@cindex reentrant get group file entry for name
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int getgrnam_r(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection getpwuid - Get Password File Entry for UID
-
-@findex getpwuid
-@cindex get password file entry for uid
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int getpwuid(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection getpwuid_r - Reentrant Get Password File Entry for UID
-
-@findex getpwuid_r
-@cindex reentrant get password file entry for uid
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int getpwuid_r(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection getpwnam - Password File Entry for Name
-
-@findex getpwnam
-@cindex password file entry for name
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int getpwnam(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-@c
-@c
-@c
-@page
-@subsection getpwnam_r - Reentrant Get Password File Entry for Name
-
-@findex getpwnam_r
-@cindex reentrant get password file entry for name
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-int getpwnam_r(
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@table @b
-@item E
-The
-
-@end table
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
diff --git a/doc/posix_users/thread.t b/doc/posix_users/thread.t
deleted file mode 100644
index f5094df3b6..0000000000
--- a/doc/posix_users/thread.t
+++ /dev/null
@@ -1,1332 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Thread Manager
-
-@section Introduction
-
-The thread manager implements the functionality required of the thread
-manager as defined by POSIX 1003.1b-1996. This standard requires that
-a compliant operating system provide the facilties to manage multiple
-threads of control and defines the API that must be provided.
-
-The services provided by the thread manager are:
-
-@itemize @bullet
-@item @code{pthread_attr_init} - Initialize a Thread Attribute Set
-@item @code{pthread_attr_destroy} - Destroy a Thread Attribute Set
-@item @code{pthread_attr_setdetachstate} - Set Detach State
-@item @code{pthread_attr_getdetachstate} - Get Detach State
-@item @code{pthread_attr_setstacksize} - Set Thread Stack Size
-@item @code{pthread_attr_getstacksize} - Get Thread Stack Size
-@item @code{pthread_attr_setstackaddr} - Set Thread Stack Address
-@item @code{pthread_attr_getstackaddr} - Get Thread Stack Address
-@item @code{pthread_attr_setscope} - Set Thread Scheduling Scope
-@item @code{pthread_attr_getscope} - Get Thread Scheduling Scope
-@item @code{pthread_attr_setinheritsched} - Set Inherit Scheduler Flag
-@item @code{pthread_attr_getinheritsched} - Get Inherit Scheduler Flag
-@item @code{pthread_attr_setschedpolicy} - Set Scheduling Policy
-@item @code{pthread_attr_getschedpolicy} - Get Scheduling Policy
-@item @code{pthread_attr_setschedparam} - Set Scheduling Parameters
-@item @code{pthread_attr_getschedparam} - Get Scheduling Parameters
-@item @code{pthread_create} - Create a Thread
-@item @code{pthread_exit} - Terminate the Current Thread
-@item @code{pthread_detach} - Detach a Thread
-@item @code{pthread_join} - Wait for Thread Termination
-@item @code{pthread_self} - Get Thread ID
-@item @code{pthread_equal} - Compare Thread IDs
-@item @code{pthread_once} - Dynamic Package Initialization
-@item @code{pthread_setschedparam} - Set Thread Scheduling Parameters
-@item @code{pthread_getschedparam} - Get Thread Scheduling Parameters
-@end itemize
-
-@section Background
-
-@subsection Thread Attributes
-
-Thread attributes are utilized only at thread creation time. A thread
-attribute structure may be initialized and passed as an argument to
-the @code{pthread_create} routine.
-
-@table @b
-@item stack address
-is the address of the optionally user specified stack area for this thread.
-If this value is NULL, then RTEMS allocates the memory for the thread stack
-from the RTEMS Workspace Area. Otherwise, this is the user specified
-address for the memory to be used for the thread's stack. Each thread must
-have a distinct stack area. Each processor family has different alignment
-rules which should be followed.
-
-@item stack size
-is the minimum desired size for this thread's stack area.
-If the size of this area as specified by the stack size attribute
-is smaller than the minimum for this processor family and the stack
-is not user specified, then RTEMS will automatically allocate a
-stack of the minimum size for this processor family.
-
-@item contention scope
-specifies the scheduling contention scope. RTEMS only supports the
-PTHREAD_SCOPE_PROCESS scheduling contention scope.
-
-@item scheduling inheritance
-specifies whether a user specified or the scheduling policy and
-parameters of the currently executing thread are to be used. When
-this is PTHREAD_INHERIT_SCHED, then the scheduling policy and
-parameters of the currently executing thread are inherited by
-the newly created thread.
-
-@item scheduling policy and parameters
-specify the manner in which the thread will contend for the processor.
-The scheduling parameters are interpreted based on the specified policy.
-All policies utilize the thread priority parameter.
-
-@end table
-
-@section Operations
-
-There is currently no text in this section.
-
-@section Services
-
-This section details the thread manager's services.
-A subsection is dedicated to each of this manager's services
-and describes the calling sequence, related constants, usage,
-and status codes.
-
-@c
-@c
-@c
-@page
-@subsection pthread_attr_init - Initialize a Thread Attribute Set
-
-@findex pthread_attr_init
-@cindex initialize a thread attribute set
-
-@subheading CALLING SEQUENCE:
-
-
-@example
-#include <pthread.h>
-
-int pthread_attr_init(
- pthread_attr_t *attr
-);
-@end example
-
-@subheading STATUS CODES:
-
-@table @b
-@item EINVAL
-The attribute pointer argument is invalid.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{pthread_attr_init} routine initializes the thread attributes
-object specified by @code{attr} with the default value for all of the
-individual attributes.
-
-@subheading NOTES:
-
-The settings in the default attributes are implementation defined. For
-RTEMS, the default attributes are as follows:
-
-@itemize @bullet
-
-@item stackadr
-is not set to indicate that RTEMS is to allocate the stack memory.
-
-@item stacksize
-is set to @code{PTHREAD_MINIMUM_STACK_SIZE}.
-
-@item contentionscope
-is set to @code{PTHREAD_SCOPE_PROCESS}.
-
-@item inheritsched
-is set to @code{PTHREAD_INHERIT_SCHED} to indicate that the created
-thread inherits its scheduling attributes from its parent.
-
-@item detachstate
-is set to @code{PTHREAD_CREATE_JOINABLE}.
-
-@end itemize
-
-
-@c
-@c
-@c
-@page
-@subsection pthread_attr_destroy - Destroy a Thread Attribute Set
-
-@findex pthread_attr_destroy
-@cindex destroy a thread attribute set
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_attr_destroy(
- pthread_attr_t *attr
-);
-@end example
-
-@subheading STATUS CODES:
-
-@table @b
-@item EINVAL
-The attribute pointer argument is invalid.
-
-@item EINVAL
-The attribute set is not initialized.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{pthread_attr_destroy} routine is used to destroy a thread
-attributes object. The behavior of using an attributes object after
-it is destroyed is implementation dependent.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection pthread_attr_setdetachstate - Set Detach State
-
-@findex pthread_attr_setdetachstate
-@cindex set detach state
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_attr_setdetachstate(
- pthread_attr_t *attr,
- int detachstate
-);
-@end example
-
-@subheading STATUS CODES:
-
-@table @b
-@item EINVAL
-The attribute pointer argument is invalid.
-
-@item EINVAL
-The attribute set is not initialized.
-
-@item EINVAL
-The detachstate argument is invalid.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{pthread_attr_setdetachstate} routine is used to value of the
-@code{detachstate} attribute. This attribute controls whether the
-thread is created in a detached state.
-
-The @code{detachstate} can be either @code{PTHREAD_CREATE_DETACHED} or
-@code{PTHREAD_CREATE_JOINABLE}. The default value for all threads is
-@code{PTHREAD_CREATE_JOINABLE}.
-
-@subheading NOTES:
-
-If a thread is in a detached state,
-then the use of the ID with the @code{pthread_detach} or
-@code{pthread_join} routines is an error.
-
-@c
-@c
-@c
-@page
-@subsection pthread_attr_getdetachstate - Get Detach State
-
-@findex pthread_attr_getdetachstate
-@cindex get detach state
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_attr_getdetachstate(
- const pthread_attr_t *attr,
- int *detachstate
-);
-@end example
-
-@subheading STATUS CODES:
-
-@table @b
-@item EINVAL
-The attribute pointer argument is invalid.
-
-@item EINVAL
-The attribute set is not initialized.
-
-@item EINVAL
-The detatchstate pointer argument is invalid.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{pthread_attr_getdetachstate} routine is used to obtain the
-current value of the @code{detachstate} attribute as specified
-by the @code{attr} thread attribute object.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection pthread_attr_setstacksize - Set Thread Stack Size
-
-@findex pthread_attr_setstacksize
-@cindex set thread stack size
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_attr_setstacksize(
- pthread_attr_t *attr,
- size_t stacksize
-);
-@end example
-
-@subheading STATUS CODES:
-
-@table @b
-@item EINVAL
-The attribute pointer argument is invalid.
-
-@item EINVAL
-The attribute set is not initialized.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{pthread_attr_setstacksize} routine is used to set the
-@code{stacksize} attribute in the @code{attr} thread attribute
-object.
-
-@subheading NOTES:
-
-As required by POSIX, RTEMS defines the feature symbol
-@code{_POSIX_THREAD_ATTR_STACKSIZE} to indicate that this
-routine is supported.
-
-If the specified stacksize is below the minimum required for this CPU
-(@code{PTHREAD_STACK_MIN}, then the stacksize will be set to the minimum
-for this CPU.
-
-@c
-@c
-@c
-@page
-@subsection pthread_attr_getstacksize - Get Thread Stack Size
-
-@findex pthread_attr_getstacksize
-@cindex get thread stack size
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_attr_getstacksize(
- const pthread_attr_t *attr,
- size_t *stacksize
-);
-@end example
-
-@subheading STATUS CODES:
-
-@table @b
-@item EINVAL
-The attribute pointer argument is invalid.
-
-@item EINVAL
-The attribute set is not initialized.
-
-@item EINVAL
-The stacksize pointer argument is invalid.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{pthread_attr_getstacksize} routine is used to obtain the
-@code{stacksize} attribute in the @code{attr} thread attribute
-object.
-
-@subheading NOTES:
-
-As required by POSIX, RTEMS defines the feature symbol
-@code{_POSIX_THREAD_ATTR_STACKSIZE} to indicate that this
-routine is supported.
-
-@c
-@c
-@c
-@page
-@subsection pthread_attr_setstackaddr - Set Thread Stack Address
-
-@findex pthread_attr_setstackaddr
-@cindex set thread stack address
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_attr_setstackaddr(
- pthread_attr_t *attr,
- void *stackaddr
-);
-@end example
-
-@subheading STATUS CODES:
-
-@table @b
-@item EINVAL
-The attribute pointer argument is invalid.
-
-@item EINVAL
-The attribute set is not initialized.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{pthread_attr_setstackaddr} routine is used to set the
-@code{stackaddr} attribute in the @code{attr} thread attribute
-object.
-
-@subheading NOTES:
-
-As required by POSIX, RTEMS defines the feature symbol
-@code{_POSIX_THREAD_ATTR_STACKADDR} to indicate that this
-routine is supported.
-
-It is imperative to the proper operation of the system that
-each thread have sufficient stack space.
-
-@c
-@c
-@c
-@page
-@subsection pthread_attr_getstackaddr - Get Thread Stack Address
-
-@findex pthread_attr_getstackaddr
-@cindex get thread stack address
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_attr_getstackaddr(
- const pthread_attr_t *attr,
- void **stackaddr
-);
-@end example
-
-@subheading STATUS CODES:
-
-@table @b
-@item EINVAL
-The attribute pointer argument is invalid.
-
-@item EINVAL
-The attribute set is not initialized.
-
-@item EINVAL
-The stackaddr pointer argument is invalid.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{pthread_attr_getstackaddr} routine is used to obtain the
-@code{stackaddr} attribute in the @code{attr} thread attribute
-object.
-
-@subheading NOTES:
-
-As required by POSIX, RTEMS defines the feature symbol
-@code{_POSIX_THREAD_ATTR_STACKADDR} to indicate that this
-routine is supported.
-
-@c
-@c
-@c
-@page
-@subsection pthread_attr_setscope - Set Thread Scheduling Scope
-
-@findex pthread_attr_setscope
-@cindex set thread scheduling scope
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_attr_setscope(
- pthread_attr_t *attr,
- int contentionscope
-);
-@end example
-
-@subheading STATUS CODES:
-
-@table @b
-@item EINVAL
-The attribute pointer argument is invalid.
-
-@item EINVAL
-The attribute set is not initialized.
-
-@item EINVAL
-The contention scope specified is not valid.
-
-@item ENOTSUP
-The contention scope specified (PTHREAD_SCOPE_SYSTEM) is not supported.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{pthread_attr_setscope} routine is used to set the contention
-scope field in the thread attribute object @code{attr} to the value
-specified by @code{contentionscope}.
-
-The @code{contentionscope} must be either @code{PTHREAD_SCOPE_SYSTEM}
-to indicate that the thread is to be within system scheduling contention
-or @code{PTHREAD_SCOPE_PROCESS} indicating that the thread is to be
-within the process scheduling contention scope.
-
-@subheading NOTES:
-
-As required by POSIX, RTEMS defines the feature symbol
-@code{_POSIX_THREAD_PRIORITY_SCHEDULING} to indicate that the
-family of routines to which this routine belongs is supported.
-
-@c
-@c
-@c
-@page
-@subsection pthread_attr_getscope - Get Thread Scheduling Scope
-
-@findex pthread_attr_getscope
-@cindex get thread scheduling scope
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_attr_getscope(
- const pthread_attr_t *attr,
- int *contentionscope
-);
-@end example
-
-@subheading STATUS CODES:
-
-@table @b
-@item EINVAL
-The attribute pointer argument is invalid.
-
-@item EINVAL
-The attribute set is not initialized.
-
-@item EINVAL
-The contentionscope pointer argument is invalid.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{pthread_attr_getscope} routine is used to obtain the
-value of the contention scope field in the thread attributes
-object @code{attr}. The current value is returned in
-@code{contentionscope}.
-
-@subheading NOTES:
-
-As required by POSIX, RTEMS defines the feature symbol
-@code{_POSIX_THREAD_PRIORITY_SCHEDULING} to indicate that the
-family of routines to which this routine belongs is supported.
-@c
-@c
-@c
-@page
-@subsection pthread_attr_setinheritsched - Set Inherit Scheduler Flag
-
-@findex pthread_attr_setinheritsched
-@cindex set inherit scheduler flag
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_attr_setinheritsched(
- pthread_attr_t *attr,
- int inheritsched
-);
-@end example
-
-@subheading STATUS CODES:
-
-@table @b
-@item EINVAL
-The attribute pointer argument is invalid.
-
-@item EINVAL
-The attribute set is not initialized.
-
-@item EINVAL
-The specified scheduler inheritance argument is invalid.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{pthread_attr_setinheritsched} routine is used to set the
-inherit scheduler field in the thread attribute object @code{attr} to
-the value specified by @code{inheritsched}.
-
-The @code{contentionscope} must be either @code{PTHREAD_INHERIT_SCHED}
-to indicate that the thread is to inherit the scheduling policy
-and parameters fromthe creating thread, or @code{PTHREAD_EXPLICIT_SCHED}
-to indicate that the scheduling policy and parameters for this thread
-are to be set from the corresponding values in the attributes object.
-If @code{contentionscope} is @code{PTHREAD_INHERIT_SCHED}, then the
-scheduling attributes in the @code{attr} structure will be ignored
-at thread creation time.
-
-@subheading NOTES:
-
-As required by POSIX, RTEMS defines the feature symbol
-@code{_POSIX_THREAD_PRIORITY_SCHEDULING} to indicate that the
-family of routines to which this routine belongs is supported.
-
-@c
-@c
-@c
-@page
-@subsection pthread_attr_getinheritsched - Get Inherit Scheduler Flag
-
-@findex pthread_attr_getinheritsched
-@cindex get inherit scheduler flag
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_attr_getinheritsched(
- const pthread_attr_t *attr,
- int *inheritsched
-);
-@end example
-
-@subheading STATUS CODES:
-@table @b
-@item EINVAL
-The attribute pointer argument is invalid.
-
-@item EINVAL
-The attribute set is not initialized.
-
-@item EINVAL
-The inheritsched pointer argument is invalid.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{pthread_attr_getinheritsched} routine is used to
-object the current value of the inherit scheduler field in
-the thread attribute object @code{attr}.
-
-@subheading NOTES:
-
-As required by POSIX, RTEMS defines the feature symbol
-@code{_POSIX_THREAD_PRIORITY_SCHEDULING} to indicate that the
-family of routines to which this routine belongs is supported.
-
-@c
-@c
-@c
-@page
-@subsection pthread_attr_setschedpolicy - Set Scheduling Policy
-
-@findex pthread_attr_setschedpolicy
-@cindex set scheduling policy
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_attr_setschedpolicy(
- pthread_attr_t *attr,
- int policy
-);
-@end example
-
-@subheading STATUS CODES:
-@table @b
-@item EINVAL
-The attribute pointer argument is invalid.
-
-@item EINVAL
-The attribute set is not initialized.
-
-@item ENOTSUP
-The specified scheduler policy argument is invalid.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{pthread_attr_setschedpolicy} routine is used to set the
-scheduler policy field in the thread attribute object @code{attr} to
-the value specified by @code{policy}.
-
-Scheduling policies may be one of the following:
-
-@itemize @bullet
-
-@item @code{SCHED_DEFAULT}
-@item @code{SCHED_FIFO}
-@item @code{SCHED_RR}
-@item @code{SCHED_SPORADIC}
-@item @code{SCHED_OTHER}
-
-@end itemize
-
-The precise meaning of each of these is discussed elsewhere in this
-manual.
-
-@subheading NOTES:
-
-As required by POSIX, RTEMS defines the feature symbol
-@code{_POSIX_THREAD_PRIORITY_SCHEDULING} to indicate that the
-family of routines to which this routine belongs is supported.
-
-@c
-@c
-@c
-@page
-@subsection pthread_attr_getschedpolicy - Get Scheduling Policy
-
-@findex pthread_attr_getschedpolicy
-@cindex get scheduling policy
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_attr_getschedpolicy(
- const pthread_attr_t *attr,
- int *policy
-);
-@end example
-
-@subheading STATUS CODES:
-@table @b
-@item EINVAL
-The attribute pointer argument is invalid.
-
-@item EINVAL
-The attribute set is not initialized.
-
-@item EINVAL
-The specified scheduler policy argument pointer is invalid.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{pthread_attr_getschedpolicy} routine is used to obtain the
-scheduler policy field from the thread attribute object @code{attr}.
-The value of this field is returned in @code{policy}.
-
-@subheading NOTES:
-
-As required by POSIX, RTEMS defines the feature symbol
-@code{_POSIX_THREAD_PRIORITY_SCHEDULING} to indicate that the
-family of routines to which this routine belongs is supported.
-
-@c
-@c
-@c
-@page
-@subsection pthread_attr_setschedparam - Set Scheduling Parameters
-
-@findex pthread_attr_setschedparam
-@cindex set scheduling parameters
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_attr_setschedparam(
- pthread_attr_t *attr,
- const struct sched_param param
-);
-@end example
-
-@subheading STATUS CODES:
-@table @b
-@item EINVAL
-The attribute pointer argument is invalid.
-
-@item EINVAL
-The attribute set is not initialized.
-
-@item EINVAL
-The specified scheduler parameter argument is invalid.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{pthread_attr_setschedparam} routine is used to set the
-scheduler parameters field in the thread attribute object @code{attr} to
-the value specified by @code{param}.
-
-@subheading NOTES:
-
-As required by POSIX, RTEMS defines the feature symbol
-@code{_POSIX_THREAD_PRIORITY_SCHEDULING} to indicate that the
-family of routines to which this routine belongs is supported.
-
-@c
-@c
-@c
-@page
-@subsection pthread_attr_getschedparam - Get Scheduling Parameters
-
-@findex pthread_attr_getschedparam
-@cindex get scheduling parameters
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_attr_getschedparam(
- const pthread_attr_t *attr,
- struct sched_param *param
-);
-@end example
-
-@subheading STATUS CODES:
-@table @b
-@item EINVAL
-The attribute pointer argument is invalid.
-
-@item EINVAL
-The attribute set is not initialized.
-
-@item EINVAL
-The specified scheduler parameter argument pointer is invalid.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{pthread_attr_getschedparam} routine is used to obtain the
-scheduler parameters field from the thread attribute object @code{attr}.
-The value of this field is returned in @code{param}.
-
-@subheading NOTES:
-
-As required by POSIX, RTEMS defines the feature symbol
-@code{_POSIX_THREAD_PRIORITY_SCHEDULING} to indicate that the
-family of routines to which this routine belongs is supported.
-
-@c
-@c
-@c
-@page
-@subsection pthread_create - Create a Thread
-
-@findex pthread_create
-@cindex create a thread
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_create(
- pthread_t *thread,
- const pthread_attr_t *attr,
- void (*start_routine)( void *),
- void *arg
-);
-@end example
-
-@subheading STATUS CODES:
-
-@table @b
-
-@item EINVAL
-The attribute set is not initialized.
-
-@item EINVAL
-The user specified a stack address and the size of the area was not
-large enough to meet this processor's minimum stack requirements.
-
-@item EINVAL
-The specified scheduler inheritance policy was invalid.
-
-@item ENOTSUP
-The specified contention scope was PTHREAD_SCOPE_PROCESS.
-
-@item EINVAL
-The specified thread priority was invalid.
-
-@item EINVAL
-The specified scheduling policy was invalid.
-
-@item EINVAL
-The scheduling policy was SCHED_SPORADIC and the specified replenishment
-period is less than the initial budget.
-
-@item EINVAL
-The scheduling policy was SCHED_SPORADIC and the specified low priority
-is invalid.
-
-@item EAGAIN
-The system lacked the necessary resources to create another thread, or the
-self imposed limit on the total number of threads in a process
-PTHREAD_THREAD_MAX would be exceeded.
-
-@item EINVAL
-Invalid argument passed.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{pthread_create} routine is used to create a new thread with
-the attributes specified by @code{attr}. If the @code{attr} argument
-is @code{NULL}, then the default attribute set will be used. Modification
-of the contents of @code{attr} after this thread is created does not
-have an impact on this thread.
-
-The thread begins execution at the address specified by @code{start_routine}
-with @code{arg} as its only argument. If @code{start_routine} returns,
-then it is functionally equivalent to the thread executing the
-@code{pthread_exit} service.
-
-Upon successful completion, the ID of the created thread is returned in the
-@code{thread} argument.
-
-@subheading NOTES:
-
-There is no concept of a single main thread in RTEMS as there is in
-a tradition UNIX system. POSIX requires that the implicit return of
-the main thread results in the same effects as if there were a call
-to @code{exit}. This does not occur in RTEMS.
-
-The signal mask of the newly created thread is inherited from its
-creator and the set of pending signals for this thread is empty.
-
-@c
-@c
-@c
-@page
-@subsection pthread_exit - Terminate the Current Thread
-
-@findex pthread_exit
-@cindex terminate the current thread
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-void pthread_exit(
- void *status
-);
-@end example
-
-@subheading STATUS CODES:
-@table @b
-@item NONE
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{pthread_exit} routine is used to temrinate the calling thread.
-The @code{status} is made available to any successful join with the
-terminating thread.
-
-When a thread returns from its start routine, it results in an
-implicit call to the @code{pthread_exit} routine with the return
-value of the function serving as the argument to @code{pthread_exit}.
-
-@subheading NOTES:
-
-Any cancellation cleanup handlers that hace been pushed and not yet popped
-shall be popped in reverse of the order that they were pushed. After
-all cancellation cleanup handlers have been executed, if the
-thread has any thread-specific data, destructors for that data will
-be invoked.
-
-Thread termination does not release or free any application visible
-resources including byt not limited to mutexes, file descriptors, allocated
-memory, etc.. Similarly, exitting a thread does not result in any
-process-oriented cleanup activity.
-
-There is no concept of a single main thread in RTEMS as there is in
-a tradition UNIX system. POSIX requires that the implicit return of
-the main thread results in the same effects as if there were a call
-to @code{exit}. This does not occur in RTEMS.
-
-All access to any automatic variables allocated by the threads is lost
-when the thread exits. Thus references (i.e. pointers) to local variables
-of a thread should not be used in a global manner without care. As
-a specific example, a pointer to a local variable should NOT be used
-as the return value.
-
-
-@c
-@c
-@c
-@page
-@subsection pthread_detach - Detach a Thread
-
-@findex pthread_detach
-@cindex detach a thread
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_detach(
- pthread_t thread
-);
-@end example
-
-@subheading STATUS CODES:
-@table @b
-@item ESRCH
-The thread specified is invalid.
-
-@item EINVAL
-The thread specified is not a joinable thread.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{pthread_detach} routine is used to to indicate that storage
-for @code{thread} can be reclaimed when the thread terminates without
-another thread joinging with it.
-
-@subheading NOTES:
-
-If any threads have previously joined with the specified thread, then they
-will remain joined with that thread. Any subsequent calls to
-@code{pthread_join} on the specified thread will fail.
-
-@c
-@c
-@c
-@page
-@subsection pthread_join - Wait for Thread Termination
-
-@findex pthread_join
-@cindex wait for thread termination
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_join(
- pthread_t thread,
- void **value_ptr
-);
-@end example
-
-@subheading STATUS CODES:
-@table @b
-@item ESRCH
-The thread specified is invalid.
-
-@item EINVAL
-The thread specified is not a joinable thread.
-
-@item EDEADLK
-A deadlock was detected or thread is the calling thread.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{pthread_join} routine suspends execution of the calling thread
-until @code{thread} terminates. If @code{thread} has already terminated,
-then this routine returns immediately. The value returned by @code{thread}
-(i.e. passed to @code{pthread_exit} is returned in @code{value_ptr}.
-
-When this routine returns, then @code{thread} has been temrinated.
-
-@subheading NOTES:
-
-The results of multiple simultaneous joins on the same thread is undefined.
-
-If any threads have previously joined with the specified thread, then they
-will remain joined with that thread. Any subsequent calls to
-@code{pthread_join} on the specified thread will fail.
-
-If value_ptr is NULL, then no value is returned.
-
-@c
-@c
-@c
-@page
-@subsection pthread_self - Get Thread ID
-
-@findex pthread_self
-@cindex get thread id
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-pthread_t pthread_self( void );
-@end example
-
-@subheading STATUS CODES:
-
-The value returned is the ID of the calling thread.
-
-@subheading DESCRIPTION:
-
-This routine returns the ID of the calling thread.
-
-@subheading NOTES:
-
-NONE
-
-@c
-@c
-@c
-@page
-@subsection pthread_equal - Compare Thread IDs
-
-@findex pthread_equal
-@cindex compare thread ids
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_equal(
- pthread_t t1,
- pthread_t t2
-);
-@end example
-
-@subheading STATUS CODES:
-
-@table @b
-@item zero
-The thread ids are not equal.
-
-@item non-zero
-The thread ids are equal.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{pthread_equal} routine is used to compare two thread
-IDs and determine if they are equal.
-
-@subheading NOTES:
-
-The behavior is undefined if the thread IDs are not valid.
-
-@c
-@c
-@c
-@page
-@subsection pthread_once - Dynamic Package Initialization
-
-@findex pthread_once
-@cindex dynamic package initialization
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-pthread_once_t once_control = PTHREAD_ONCE_INIT;
-
-int pthread_once(
- pthread_once_t *once_control,
- void (*init_routine)(void)
-);
-@end example
-
-@subheading STATUS CODES:
-
-NONE
-
-@subheading DESCRIPTION:
-
-The @code{pthread_once} routine is used to provide controlled initialization
-of variables. The first call to @code{pthread_once} by any thread with the
-same @code{once_control} will result in the @code{init_routine} being
-invoked with no arguments. Subsequent calls to @code{pthread_once} with
-the same @code{once_control} will have no effect.
-
-The @code{init_routine} is guaranteed to have run to completion when
-this routine returns to the caller.
-
-@subheading NOTES:
-
-The behavior of @code{pthread_once} is undefined if @code{once_control}
-is automatic storage (i.e. on a task stack) or is not initialized using
-@code{PTHREAD_ONCE_INIT}.
-
-@c
-@c
-@c
-@page
-@subsection pthread_setschedparam - Set Thread Scheduling Parameters
-
-@findex pthread_setschedparam
-@cindex set thread scheduling parameters
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_setschedparam(
- pthread_t thread,
- int policy,
- struct sched_param *param
-);
-@end example
-
-@subheading STATUS CODES:
-
-@table @b
-@item EINVAL
-The scheduling parameters indicated by the parameter param is invalid.
-
-@item EINVAL
-The value specified by policy is invalid.
-
-@item EINVAL
-The scheduling policy was SCHED_SPORADIC and the specified replenishment
-period is less than the initial budget.
-
-@item EINVAL
-The scheduling policy was SCHED_SPORADIC and the specified low priority
-is invalid.
-
-@item ESRCH
-The thread indicated was invalid.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{pthread_setschedparam} routine is used to set the
-scheduler parameters currently associated with the thread specified
-by @code{thread} to the policy specified by @code{policy}. The
-contents of @code{param} are interpreted based upon the @code{policy}
-argument.
-
-@subheading NOTES:
-
-As required by POSIX, RTEMS defines the feature symbol
-@code{_POSIX_THREAD_PRIORITY_SCHEDULING} to indicate that the
-family of routines to which this routine belongs is supported.
-
-@c
-@c
-@c
-@page
-@subsection pthread_getschedparam - Get Thread Scheduling Parameters
-
-@findex pthread_getschedparam
-@cindex get thread scheduling parameters
-
-@subheading CALLING SEQUENCE:
-
-@example
-#include <pthread.h>
-
-int pthread_getschedparam(
- pthread_t thread,
- int *policy,
- struct sched_param *param
-);
-@end example
-
-@subheading STATUS CODES:
-
-@table @b
-@item EINVAL
-The policy pointer argument is invalid.
-
-@item EINVAL
-The scheduling parameters pointer argument is invalid.
-
-@item ESRCH
-The thread indicated by the parameter thread is invalid.
-
-@end table
-
-@subheading DESCRIPTION:
-
-The @code{pthread_getschedparam} routine is used to obtain the
-scheduler policy and parameters associated with @code{thread}.
-The current policy and associated parameters values returned in
-@code{policy} and @code{param}, respectively.
-
-@subheading NOTES:
-
-As required by POSIX, RTEMS defines the feature symbol
-@code{_POSIX_THREAD_PRIORITY_SCHEDULING} to indicate that the
-family of routines to which this routine belongs is supported.
diff --git a/doc/posix_users/timer.t b/doc/posix_users/timer.t
deleted file mode 100644
index d879f24abb..0000000000
--- a/doc/posix_users/timer.t
+++ /dev/null
@@ -1,196 +0,0 @@
-@c
-@c This is the chapter from the RTEMS POSIX 1003.1b API User's Guide that
-@c documents the services provided by the timer @c manager.
-@c
-@c $Id$
-@c
-
-@chapter Timer Manager
-
-@section Introduction
-
-The timer manager is ...
-
-The services provided by the timer manager are:
-
-@itemize @bullet
-@item @code{timer_create} - Create a Per-Process Timer
-@item @code{timer_delete} - Delete a Per-Process Timer
-@item @code{timer_settime} - Set Next Timer Expiration
-@item @code{timer_gettime} - Get Time Remaining on Timer
-@item @code{timer_getoverrun} - Get Timer Overrun Count
-@end itemize
-
-@section Background
-
-@section Operations
-
-@section System Calls
-
-This section details the timer manager's services.
-A subsection is dedicated to each of this manager's services
-and describes the calling sequence, related constants, usage,
-and status codes.
-
-
-@c
-@c timer_create
-@c
-
-@page
-@subsection timer_create - Create a Per-Process Timer
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <time.h>
-#include <signal.h>
-
-int timer_create(
- clockid_t clock_id,
- struct sigevent *evp,
- timer_t *timerid
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{EXXX} -
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-
-@c
-@c timer_delete
-@c
-
-@page
-@subsection timer_delete - Delete a Per-Process Timer
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <time.h>
-
-int timer_delete(
- timer_t timerid
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{EXXX} -
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-
-@c
-@c timer_settime
-@c
-
-@page
-@subsection timer_settime - Set Next Timer Expiration
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <time.h>
-
-int timer_settime(
- timer_t timerid,
- int flags,
- const struct itimerspec *value,
- struct itimerspec *ovalue
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{EXXX} -
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-
-@c
-@c timer_gettime
-@c
-
-@page
-@subsection timer_gettime - Get Time Remaining on Timer
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <time.h>
-
-int timer_gettime(
- timer_t timerid,
- struct itimerspec *value
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{EXXX} -
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
-
-@c
-@c timer_getoverrun
-@c
-
-@page
-@subsection timer_getoverrun - Get Timer Overrun Count
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-#include <time.h>
-
-int timer_getoverrun(
- timer_t timerid
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@end ifset
-
-@subheading STATUS CODES:
-
-@code{EXXX} -
-
-@subheading DESCRIPTION:
-
-@subheading NOTES:
-
diff --git a/doc/relnotes/Makefile b/doc/relnotes/Makefile
deleted file mode 100644
index a82a25fb54..0000000000
--- a/doc/relnotes/Makefile
+++ /dev/null
@@ -1,53 +0,0 @@
-#
-# COPYRIGHT (c) 1988-1999.
-# On-Line Applications Research Corporation (OAR).
-# All rights reserved.
-#
-# $Id$
-#
-
-PROJECT=relnotes
-
-include ../Make.config
-
-all: html info ps pdf
-
-dirs:
- $(make-dirs)
-
-COMMON_FILES=../common/cpright.texi
-
-FILES=install.texi intro.texi probrep.texi relnotes.texi status.texi
-
-info: dirs relnotes
- cp $(PROJECT) $(wildcard $(PROJECT)-*) $(INFO_INSTALL)
-
-relnotes: $(FILES)
- $(MAKEINFO) $(PROJECT).texi
-
-dvi: dirs $(PROJECT).dvi
-ps: dirs $(PROJECT).ps
-pdf: dirs $(PROJECT).pdf
-
-$(PROJECT).pdf: $(FILES)
- $(TEXI2PDF) $(PROJECT).texi
- cp $(PROJECT).pdf $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).ps: $(PROJECT).dvi
- dvips -o $(PROJECT).ps $(PROJECT).dvi
- cp $(PROJECT).ps $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).dvi: $(FILES)
- $(TEXI2DVI) $(PROJECT).texi
- cp $(PROJECT).dvi $(WWW_INSTALL)/$(PROJECT)
-
-html: dirs
- -mkdir -p $(WWW_INSTALL)/relnotes
- $(TEXI2WWW) $(TEXI2WWW_ARGS) -dir $(WWW_INSTALL)/$(PROJECT) \
- $(PROJECT).texi
-
-clean:
- rm -f *.o $(PROG) *.txt core *.html $(PROJECT).pdf
- rm -f *.dvi *.ps *.log *.aux *.cp *.fn *.ky *.pg *.toc *.tp *.vr $(BASE)
- rm -f relnotes relnotes-* _*
-
diff --git a/doc/relnotes/install.texi b/doc/relnotes/install.texi
deleted file mode 100644
index 320320a0ec..0000000000
--- a/doc/relnotes/install.texi
+++ /dev/null
@@ -1,176 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@ifinfo
-@node Installation Procedure, Installation Procedure Introduction, Introduction Documentation, Top
-@end ifinfo
-@chapter Installation Procedure
-@ifinfo
-@menu
-* Installation Procedure Introduction::
-* Installation Procedure RTEMS FTP Site Organization::
-* Installation Procedure Unarchiving the RTEMS and GNU Components::
-* Installation Procedure Installing a Cross-Development GNU Toolset::
-* Installation Procedure Installing RTEMS::
-@end menu
-@end ifinfo
-
-@ifinfo
-@node Installation Procedure Introduction, Installation Procedure RTEMS FTP Site Organization, Installation Procedure, Installation Procedure
-@end ifinfo
-@section Introduction
-
-This chapter describes the process of installing and
-configuring RTEMS and a cross-development environment based on
-freely available tools and libraries.
-
-@ifinfo
-@node Installation Procedure RTEMS FTP Site Organization, Installation Procedure Unarchiving the RTEMS and GNU Components, Installation Procedure Introduction, Installation Procedure
-@end ifinfo
-@section RTEMS FTP Site Organization
-
-RTEMS is distributed only via anonymous ftp.
-
-This section will discuss how to navigate the RTEMS
-ftp site and unarchive the files in the RTEMS and GNU package
-distributions. All example commands will be given in a shell
-independent fashion unless otherwise noted.
-
-Throughout the rest of this manual
-<RTEMS_distribution> will be used as the parent of components
-within the RTEMS distribution. For persons using the ftp
-distribution found on the primary ftp site for RTEMS,
-<RTEMS_distribution> is
-ftp://ftp.OARcorp.com/oarcorp/rtems/@value{RELEASE}.
-
-The archive files for RTEMS Release @value{RELEASE} are found
-under the directory <RTEMS_distribution>. This directory
-contains the files which comprise this relase as well as any
-patches which may be required for other tools.
-
-The complete source code and documentation set for
-the C language implementation of RTEMS is provided.
-
-Documentation other than this on-line version is available to
-OAR support customers. Please contact OAR for more information.
-
-@ifinfo
-@node Installation Procedure Unarchiving the RTEMS and GNU Components, Installation Procedure Installing a Cross-Development GNU Toolset, Installation Procedure RTEMS FTP Site Organization, Installation Procedure
-@end ifinfo
-@section Unarchiving the RTEMS and GNU Components
-
-Many of the components of the RTEMS release are
-"tarred, zipped" files and have the .tar.gz or .tgz extension.
-The GNU zip package is required to unarchives these files on the
-RTEMS ftp site. If this package is not installed, the source
-can be found in the files
-ftp://prep.ai.mit.edu/pub/gnu/gzip-1.2.4.shar or
-ftp://prep.ai.mit.edu/pub/gnu/gzip-1.2.4.tar. It may be
-restored using a command similar to the following:
-
-@example
-@group
-tar xvf gzip-1.2.4.tar
-
-OR
-
-sh gzip-1.2.4.shar
-@end group
-@end example
-
-This will create a subdirectory gzip-1.2.4 in the
-current directory. Please examine the files README and INSTALL
-and follow the instructions provided there.
-
-[Note: The GNU tools follow a standard packaging procedure
-They will unarchive into a directory based on the package name and version
-number. For detailed instructions on compilation and
-installation of the GNU tools, please refer to the instructions for
-each GNU tool.]
-
-Files which have been "tarred, zipped" (i.e. .tar.gz
-or .tgz extension) may be unarchived with a command similar to
-one of the following:
-
-@example
-@group
-gzcat <file>.tgz | tar xvof -
-
-OR
-
-gunzip -c <file>.tgz | tar xvof -
-
-OR
-
-gtar xzvf <file>.tgz
-@end group
-@end example
-
-NOTE: gunzip -c is equivalent to gzcat, while gtar is GNU tar.
-
-Given that the necessary utility programs are
-installed, any of the above commands will extract the contents
-of <file>.tar.gz into the current directory. All of the RTEMS
-components will be extracted into the subdirectory rtems-@value{RELEASE}.
-To view the contents of a component without restoring any files,
-use a command similar to the following:
-
-@example
-@group
-gzcat <file>.tgz | tar tvf -
-@end group
-@end example
-
-@ifinfo
-@node Installation Procedure Installing a Cross-Development GNU Toolset, Installation Procedure Installing RTEMS, Installation Procedure Unarchiving the RTEMS and GNU Components, Installation Procedure
-@end ifinfo
-@section Installing a Cross-Development GNU Toolset
-
-This sections describes how to build and install the
-FSF GNU tools for use as a cross-compilation system. These
-tools are used by the RTEMS developers. Every effort has been
-made to make these instructions accurate and complete. However,
-it is recommended that the individual doing the installation
-read the appropriate installation notes for each of the tools in
-the cross toolset. This will help insure that there are no
-special requirements for a particular host.
-
-If the host and target processors are the same, then
-it may be possible to use the host development tools. An
-example of this scenario is using a SPARC based workstation
-to develop an RTEMS application for the SPARC processor. Although
-the native toolset is useable in this scenario, it is ultimately
-more desirable to build a toolset specifically for the embedded environment.
-
-Instructions for building a cross environment using the GNU
-tools is provided in the crossgcc FAQ available from ftp.cygnus.com
-in /pub/embedded/crossgcc. It is recommended that the user following
-these instructions.
-
-After the cross development toolset has been built
-and installed, it will be necessary to modify the environment of
-each RTEMS application developer to reflect at least the path of
-the newly installed cross development toolset.
-
-The documentation for the FSF GNU and Cygnus tools is
-formatted using TeX. The RTEMS developers use TeX 3.14t3 to
-format the manuals for their own use. This document does not
-contain instructions on the acquisition or installation of TeX
-and supporting tools.
-
-NOTE: For "UNIX" processors, the native compiler binary utilities
-should be used.
-
-@ifinfo
-@node Installation Procedure Installing RTEMS, Development Environment Status, Installation Procedure Installing a Cross-Development GNU Toolset, Installation Procedure
-@end ifinfo
-@section Installing RTEMS
-
-For instructions on building and installing RTEMS, please refer to
-the file README.configure in the source distribution.
-
diff --git a/doc/relnotes/intro.texi b/doc/relnotes/intro.texi
deleted file mode 100644
index 3cb2b7ea12..0000000000
--- a/doc/relnotes/intro.texi
+++ /dev/null
@@ -1,217 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@ifinfo
-@node Introduction, Introduction Supporting Tools, Top, Top
-@end ifinfo
-@chapter Introduction
-@ifinfo
-@menu
-* Introduction Supporting Tools::
-* Introduction Documentation::
-@end menu
-@end ifinfo
-
-This document describes the contents, installation
-procedure, and current status of Release @value{RELEASE} of the RTEMS
-executive. An installation procedure is provided which
-describes the steps necessary to load and configure the RTEMS
-environment, including the GNU Development Environment and the
-Cygnus NEWLIB ANSI C Library, on a host computer. The status of
-the RTEMS environment is given, which includes supported
-processors and target boards, versions of the GNU utilities
-which were used by the RTEMS developers for this release,
-support libraries status, features which are not implemented,
-and any known existing problems.
-
-This RTEMS release package contains the following general components:
-
-@itemize @bullet
-@item RTEMS C Executive
-
-@item RTEMS C Documentation Set
-
-@item RTEMS NEWLIB ANSI C Library
-
-@item Patches to GNU Development Tools
-
-@end itemize
-
-There is a mailing list dedicated to RTEMS. This is
-a Majordomo style mailing list and may be subscribed to
-by sending a message to rtems-list-request@@OARcorp.com with
-the following line as the body:
-
-@example
-subscribe rtems_user@@your_email_goes_here.com
-@end example
-
-Please replace rtems_user@@your_email_goes_here.com with your
-email address.
-
-@ifinfo
-@node Introduction Supporting Tools, GNU Development Tools, Introduction, Introduction
-@end ifinfo
-@section Supporting Tools
-@ifinfo
-@menu
-* GNU Development Tools::
-* ANSI C Libraries::
-* GNU C Library::
-* Cygnus NEWLIB C Library::
-@end menu
-@end ifinfo
-
-This section discusses the freely available tools and
-libraries which are part of the RTEMS Development Environment.
-None of the tools discussed in this section were developed by
-the RTEMS project, although many do include submissions from the
-project. All of the tools and libraries required to build RTEMS
-are freely available. The home ftp site for most of the non-RTEMS
-specific tools is either prep.ai.mit.edu (18.71.0.38) or
-ftp.cygnus.com (140.174.1.3).
-
-Specifically of interest to embedded systems developers
-using the GNU tools is the crossgcc mailing list. This is
-a Majordomo style mailing list and may be subscribed to
-by sending a message to crossgcc-request@@cygnus.com with
-the following line as the body:
-
-@example
-subscribe rtems_user@@your_email_goes_here.com
-@end example
-
-Please replace rtems_user@@your_email_goes_here.com with your
-email address. The FAQ for crossgcc is in the /pub/embedded/crossgcc
-directory on ftp.cygnus.com (205.180.83.42).
-
-@ifinfo
-@node GNU Development Tools, ANSI C Libraries, Introduction Supporting Tools, Introduction Supporting Tools
-@end ifinfo
-@subsection GNU Development Tools
-
-Numerous GNU tools are used in the RTEMS Development
-Environment including C and Ada compilers, the GNU make program,
-GNU m4, the GNU assembler and binary utilities (linker,
-librarian, etc.), GNU tar, GNU zip, and the GNU debugger. These
-tools are distributed in source form and are all licensed under
-the GNU Public License which allows for unrestricted
-distribution under the condition that source code always be
-available. The Free Software Foundation is officially the
-originator of most of the GNU tools although many individuals
-have contributed to the GNU projects. In keeping with the
-spirit of the GPL, most of the time the GNU tools are
-distributed as source code without executables. It is the
-responsibility of the local site to install each tool. Numerous
-organizations and individuals supply executables for the GNU
-tools. All are required by the terms of the GPL to also make
-the source code available to the end user.
-
-The primary ftp site for the FSF GNU tools is
-prep.ai.mit.edu (18.71.0.38) in the /pub/gnu directory. These
-tools are mirrored on numerous ftp sites.
-
-Intel maintains a toolset for their i960 processor
-family based on the GNU tools referred to as GNU/960. The
-source code for this toolset is available from ftp.intel.com
-(143.185.65.2). [NOTE: The GNU/960 toolset generally includes
-an older version of GCC than that available from the FSF. When
-the FSF version of GNU C is significantly newer than that in the
-GNU/960 release, the RTEMS developers replace the GCC in the
-GNU/960 toolset with the FSF release.]
-
-Cygnus maintains an ftp site -- ftp.cygnus.com
-(205.180.83.42) -- which contains a source code which appeals to
-embedded developers. Of especial interest on this site are the
-directories /pub/newlib and /pub/embedded.
-
-@ifinfo
-@node ANSI C Libraries, GNU C Library, GNU Development Tools, Introduction Supporting Tools
-@end ifinfo
-@subsection ANSI C Libraries
-
-This section discusses the following freely
-distributable ANSI C Libraries:
-
-@itemize @bullet
-@item GNU C Library, and
-
-@item Cygnus NEWLIB
-@end itemize
-
-No C Library is included in the standard RTEMS
-distribution. It is the responsibility of the user to obtain
-and install a C Library separately.
-
-@ifinfo
-@node GNU C Library, Cygnus NEWLIB C Library, ANSI C Libraries, Introduction Supporting Tools
-@end ifinfo
-@subsection GNU C Library
-
-The GNU C Library is a robust and well-documented C
-Library which is distributed under the terms of the Library GNU
-Public License (LGPL). This library was not designed for use in
-real-time, embedded systems and the resource requirements of
-some of the routines in this library are an obvious indication
-of this. Additionally, this library does not have support for
-reentrancy in the sense that each task in a multitasking system
-could safely invoke every routine in the library. Finally, the
-distribution terms of the LGPL are considered undesirable by
-many embedded systems developers. However, the GNU C Library is
-very complete and is compliant with as many standards as
-possible. Because of this, it may be the only choice for many
-developers.
-
-There is currently no RTEMS support for the GNU C Library.
-
-The primary ftp site for this library is
-prep.ai.mit.edu (18.71.0.38).
-
-@ifinfo
-@node Cygnus NEWLIB C Library, Introduction Documentation, GNU C Library, Introduction Supporting Tools
-@end ifinfo
-@subsection Cygnus NEWLIB C Library
-
-The Cygnus NEWLIB C Library was specifically designed
-for real-time embedded systems. It is a small, reasonably
-documented Library with support for reentrancy. This library is
-a collection of freely distributable and public domain source
-code and is freely distributable with as few restrictions as
-possible placed on the end user.
-
-The primary ftp site for this library is ftp.cygnus.com (205.180.83.42).
-
-@ifinfo
-@node Introduction Documentation, Installation Procedure, Cygnus NEWLIB C Library, Introduction
-@end ifinfo
-@section Documentation
-
-The RTEMS Documentation Set is provided online at http://www.OARcorp.com/
-as reference information for all levels of RTEMS users. The set includes
-the following documents:
-
-@itemize @bullet
-@item C Applications User's Guide
-
-@item Intel i386 Applications Supplement
-
-@item Intel i960CA Applications Supplement
-
-@item Motorola MC68xxx Applications Supplement
-
-@item Hewlett Packard PA-RISC 1.1 Applications Supplement
-
-@item SPARC Applications Supplement
-
-@item Development Environment Guide
-
-@item Release Notes
-@end itemize
-
-The RTEMS documentation set is available in alternate formats to
-support customers.
diff --git a/doc/relnotes/probrep.texi b/doc/relnotes/probrep.texi
deleted file mode 100644
index cf4078ba11..0000000000
--- a/doc/relnotes/probrep.texi
+++ /dev/null
@@ -1,62 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-
-
-@ifinfo
-@node RTEMS PROBLEM REPORT, Command and Variable Index, RTEMS Problem Reporting, Top
-@end ifinfo
-@chapter RTEMS PROBLEM REPORT
-
-@example
-
-Customer (Company) Name:
-
-Customer Address:
-
-Contact Name:
-
-Telephone Voice: Fax:
-
-
-
-Product: Version:
-
-Target Processor: Target System:
-
-Host Computer System:
-
-Host Operating System: Version:
-
-
-
-Report Type: Customer Impact:
-
-
-
-[ ] Problem/Error [ ] System is inoperable, cannot proceed
-
-[ ] Enhancement [ ] Must be corrected in the near future
-
-[ ] Inquiry Suggestion [ ] Problem may be avoided until fixed
-
-[ ] Other______________ [ ] Problem is not time critical
-
- [ ] Minor problem
-
-@end example
-
-
-Please provide a detailed description of the
-problem (Attachments including source code, example code,
-makefiles, possible solutions, and any other information
-describing the problem will be appreciated):
-
-
-
-
diff --git a/doc/relnotes/relnotes.texi b/doc/relnotes/relnotes.texi
deleted file mode 100644
index b18f8b52b6..0000000000
--- a/doc/relnotes/relnotes.texi
+++ /dev/null
@@ -1,119 +0,0 @@
-\input texinfo @c -*-texinfo-*-
-@c %**start of header
-@setfilename relnotes
-@syncodeindex vr fn
-@synindex ky cp
-@paragraphindent 0
-@c @smallbook
-@c %**end of header
-
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@c
-@c Master file
-@c
-
-@c Joel's Questions
-@c
-@c 1. Why does paragraphindent only impact makeinfo?
-@c 2. Why does paragraphindent show up in HTML?
-@c
-
-@include ../common/setup.texi
-
-@ignore
-@ifinfo
-@format
-START-INFO-DIR-ENTRY
-* RTEMS Release Notes: (relnotes). Release Notes
-END-INFO-DIR-ENTRY
-@end format
-@end ifinfo
-@end ignore
-
-@c variable substitution info:
-@c
-@c @set LANGUAGE C
-@c the language is @value{LANGUAGE}
-@c NOTE: don't use underscore in the name
-@c
-
-@c
-@c Title Page Stuff
-@c
-
-@set edition @value{RTEMS-EDITION}
-@set version @value{RTEMS-VERSION}
-@set update-date @value{RTEMS-UPDATE-DATE}
-@set update-month @value{RTEMS-UPDATE-MONTH}
-
-@c
-@c I don't really like having a short title page. --joel
-@c
-@c @shorttitlepage RTEMS Release Notes
-
-@setchapternewpage odd
-@settitle RTEMS Release Notes
-@titlepage
-@finalout
-
-@title RTEMS Release Notes
-@subtitle Edition @value{edition}, for RTEMS @value{version}
-@sp 1
-@subtitle @value{update-month}
-@author On-Line Applications Research Corporation
-@page
-@include ../common/cpright.texi
-@end titlepage
-
-@c This prevents a black box from being printed on "overflow" lines.
-@c The alternative is to rework a sentence to avoid this problem.
-
-@include intro.texi
-@include install.texi
-@include status.texi
-@include probrep.texi
-
-@ifinfo
-@node Top, Introduction, (dir), (dir)
-@top relnotes
-
-This is the online version of the RTEMS Release Notes.
-
-@menu
-* Introduction::
-* Installation Procedure::
-* Development Environment Status::
-* RTEMS PROBLEM REPORT::
-* Command and Variable Index::
-* Concept Index::
-@end menu
-
-@end ifinfo
-@c
-@c
-@c Need to copy the emacs stuff and "trailer stuff" (index, toc) into here
-@c
-
-@node Command and Variable Index, Concept Index, RTEMS PROBLEM REPORT, Top
-@unnumbered Command and Variable Index
-
-There are currently no Command and Variable Index entries.
-
-@c @printindex fn
-
-@node Concept Index, , Command and Variable Index, Top
-@unnumbered Concept Index
-
-There are currently no Concept Index entries.
-@c @printindex cp
-
-@contents
-@bye
-
diff --git a/doc/relnotes/status.texi b/doc/relnotes/status.texi
deleted file mode 100644
index d638f41297..0000000000
--- a/doc/relnotes/status.texi
+++ /dev/null
@@ -1,260 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@ifinfo
-@node Development Environment Status, Development Environment Status RTEMS Executive Status, Installation Procedure Installing RTEMS, Top
-@end ifinfo
-@chapter Development Environment Status
-@ifinfo
-@menu
-* Development Environment Status RTEMS Executive Status::
-* Development Environment Status Development Environment Status::
-* Development Environment Status Known Problems::
-@end menu
-@end ifinfo
-
-This chapter will describe the current status of
-release version @value{RELEASE} of the RTEMS Development Environment.
-
-@ifinfo
-@node Development Environment Status RTEMS Executive Status, Development Environment Status Development Environment Status, Development Environment Status, Development Environment Status
-@end ifinfo
-@section RTEMS Executive Status
-
-Release @value{RELEASE} of the RTEMS Executive contains support
-for both the classic RTEMS API based on the RTEID specification as well
-as support for POSIX threads and real-time extensions.
-
-The classic RTEMS API has the following managers based upon the RTEID
-specification:
-
-@itemize @bullet
-@item Task
-@item Initialization
-@item Clock
-@item Timer
-@item Interrupt
-@item Fatal Error
-@item Message
-@item Semaphore
-@item Event
-@item Signal
-@item Region
-@item Partition
-@item Dual Ported Memory
-@item I/O
-@item Multiprocessing
-@item Rate Monotonic
-@item User Extensions
-@end itemize
-
-RTEMS also has support for the following managers based upon the POSIX threads
-and real-time extensions:
-
-@itemize @bullet
-@item Thread
-@item Clock
-@item Key
-@item Condition Variable
-@item Mutex
-@item Signal
-@item Scheduler
-@end itemize
-
-This release of the C implementation supports the
-following processors and target boards:
-
-@itemize @bullet
-@item Motorola M68k family
-@itemize -
-@item DY-4 DMV152, SVME153
-@item Motorola IDP
-@item Motorola MVME135, MVME136
-@item Motorola MVME147, MVME147S
-@item Motorola MVME162
-@item EFI 68000 and 68332
-@item Generic 68302
-@item Generic 68360 and 68360 in companion mode with 68040
-@end itemize
-
-@item Intel i386 family
-@itemize -
-@item Force CPU386
-@item Intel i386ex eval board
-@item PC-AT i386 and above (go32)
-@end itemize
-
-@item Intel i960 family
-@itemize -
-@item Cyclone CVME960, CVME961
-@end itemize
-
-@item Hewlett Packard PA-RISC family
-@itemize -
-@item Processor Simulator
-@end itemize
-
-@item PowerPC
-@itemize -
-@item Papyrus (proprietary controller)
-@end itemize
-
-@item SPARC
-@itemize -
-@item ERC32 (space-hardened V7)
-@end itemize
-
-@item MIPS
-@itemize -
-@item P4000 with R4600 or R4650
-@end itemize
-
-@item AMD 29K
-@itemize -
-@item Portsw
-@end itemize
-
-@item UNIX
-@itemize -
-@item Hewlett Packard HPUX (PA-RISC)
-@item Sun Solaris 2.x (SPARC)
-@item Linux (i386)
-@end itemize
-
-@end itemize
-
-Support for the Cygnus NEWLIB Standard C Library is
-provided with this release which may be used on any of the RTEMS
-supported targets. The BSPs only provide support for console
-I/O only using this library. Support for the reentrancy
-capabilities of newlib is provided in the RTEMS distribution.
-
-@ifinfo
-@node Development Environment Status Development Environment Status, Development Environment Status Known Problems, Development Environment Status RTEMS Executive Status, Development Environment Status
-@end ifinfo
-@section Development Environment Status
-
-This section details the versions of the tools used
-to develop and maintain RTEMS @value{RELEASE}:
-
-@itemize @bullet
-@item Cross Tools
-@itemize -
-@item gcc - 2.7.2.2 with rtems patch
-@item binutils - 2.7 with rtems patch
-@item zip - 1.2.4
-@item make - 3.74
-@end itemize
-@end itemize
-
-
-@ifinfo
-@node Development Environment Status Known Problems, Executive Problems, Development Environment Status Development Environment Status, Development Environment Status
-@end ifinfo
-@section Known Problems
-@ifinfo
-@menu
-* Executive Problems::
-* Development Environment Problems::
-* RTEMS Problem Reporting::
-@end menu
-@end ifinfo
-
-Problems which are known to exist at the time of
-release are described in the following sections. These are
-provided as warnings to the user and where possible, workarounds
-are provided until the problem is corrected.
-
-@ifinfo
-@node Executive Problems, Development Environment Problems, Development Environment Status Known Problems, Development Environment Status Known Problems
-@end ifinfo
-@subsection Executive Problems
-
-There are no known bugs in the executive itself.
-
-@ifinfo
-@node Development Environment Problems, RTEMS Problem Reporting, Executive Problems, Development Environment Status Known Problems
-@end ifinfo
-@subsection Development Environment Problems
-
-There are no known major problems with the
-development environment.
-
-@ifinfo
-@node RTEMS Problem Reporting, RTEMS PROBLEM REPORT, Development Environment Problems, Development Environment Status Known Problems
-@end ifinfo
-@subsection RTEMS Problem Reporting
-
-A problem report is provided at the end of this
-document and may be copied by the RTEMS user. Please fill out
-the form completely to assure a speedy response to the problem.
-In filling out the problem report the following instructions
-apply:
-
-@table @code
-@item User Name and Address:
-The full name
-and mailing address of the customer or company where
-correspondence from RTEMS support personnel may be shipped.
-
-@item Contact Name:
-The name of the person with whom
-RTEMS support personnel will correspond with concerning the
-reported problem.
-
-@item Telephone Voice/FAX:
-The telephone numbers which
-will enable RTEMS support personnel to reach the designated
-contact name.
-
-@item Product/Version:
-The RTEMS product and the version that is currently in use.
-
-@item Target Processor/System:
-The processor and board type that is the target.
-
-@item Host Computer System:
-The manufacturer and model
-number of the system on which RTEMS has been installed.
-
-@item Host Operating System/Version:
-The operating system and version under which RTEMS has been installed.
-
-@c @item Report Type:
-@c Check the most appropriate description of the reported problem.
-
-@item Customer Impact:
-Indicate the severity of the impact of the reported problem.
-
-@item Detailed Description:
-A written description of the
-problem including the area of the RTEMS development environment
-where the problem is located and its behavior. Please feel free
-to provide source code listings, makefiles, possible solutions,
-and any other information describing the problem. This
-additional information may be submitted via email or anonymous
-ftp.
-
-Support, training, ports, and custom development are provided
-by On-Line Applications Research Corporation (OAR). Correspondence
-regarding any aspect of RTEMS should be addressed as follows
-(magnetic tapes should be marked: DO NOT X-RAY):
-@end table
-
-@example
-@group
-RTEMS
-On-Line Applications Research Corporation
-4910-L Corporate Drive
-Huntsville, AL 35805
-Voice: (205) 722-9985
-FAX: (205) 722-0985
-EMAIL: rtems@@OARcorp.com
-@end group
-@end example
-
diff --git a/doc/rgdb_specs/Makefile b/doc/rgdb_specs/Makefile
deleted file mode 100644
index ddd3f70146..0000000000
--- a/doc/rgdb_specs/Makefile
+++ /dev/null
@@ -1,114 +0,0 @@
-#
-# COPYRIGHT (c) 1988-1999.
-# On-Line Applications Research Corporation (OAR).
-# All rights reserved.
-#
-# $Id$
-#
-
-PROJECT=rgdb_specs
-
-include ../Make.config
-
-all: html info ps pdf
-
-dirs:
- $(make-dirs)
-
-COMMON_FILES=../common/cpright.texi ../common/setup.texi
-
-GENERATED_FILES= \
- intro.texi revision.texi objectives.texi gdbinternals.texi \
- interfacing.texi comm.texi daemon.texi conclusion.texi
-
-FILES=$(PROJECT).texi $(GENERATED_FILES)
-
-INFOFILES=$(wildcard $(PROJECT) $(PROJECT)-*)
-
-info: dirs $(PROJECT)
- #cp $(wildcard $(PROJECT) $(PROJECT)-*) $(INFO_INSTALL)
- # cp $(PROJECT) $(INFO_INSTALL)
-
-$(PROJECT): $(FILES)
- $(MAKEINFO) $(PROJECT).texi
-
-dvi: dirs $(PROJECT).dvi
-ps: dirs $(PROJECT).ps
-pdf: dirs $(PROJECT).pdf
-
-$(PROJECT).pdf: $(FILES)
- $(TEXI2PDF) $(PROJECT).texi
- cp $(PROJECT).pdf $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).ps: $(PROJECT).dvi
- dvips -o $(PROJECT).ps $(PROJECT).dvi
- cp $(PROJECT).ps $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).dvi: $(FILES)
- $(TEXI2DVI) $(PROJECT).texi
- cp $(PROJECT).dvi $(WWW_INSTALL)/$(PROJECT)
-
-html: dirs $(FILES)
- -mkdir -p $(WWW_INSTALL)/$(PROJECT)
- cp $(wildcard *.jpg) $(WWW_INSTALL)/$(PROJECT)
- $(TEXI2WWW) $(TEXI2WWW_ARGS) -dir $(WWW_INSTALL)/$(PROJECT) \
- $(PROJECT).texi
-
-clean:
- rm -f *.o $(PROG) *.txt core $(PROJECT).pdf
- rm -f *.dvi *.ps *.log *.aux *.cp *.fn *.ky *.pg *.toc *.tp *.vr $(BASE)
- rm -f $(PROJECT) $(PROJECT)-* $(GENERATED_FILES)
- rm -f *.fixed _*
-
-#
-# Process Automatically Generated Files
-#
-
-intro.texi: intro.t Makefile
- $(BMENU) -c -p "Top" \
- -u "Top" \
- -n "Document Revision History" ${*}.t
-
-revision.texi: revision.t Makefile
- $(BMENU) -c -p "Introduction" \
- -u "Top" \
- -n "Objectives" ${*}.t
-
-objectives.texi: objectives.t Makefile
- $(BMENU) -c -p "Document Revision History" \
- -u "Top" \
- -n "A Rapid Tour of GDB Internals" ${*}.t
-
-gdbinternals.texi: gdbinternals.t Makefile
- $(BMENU) -c -p "Implied Restrictions" \
- -u "Top" \
- -n "Interfacing GDB with RTEMS as a Target" ${*}.t
-
-interfacing.texi: interfacing.t Makefile
- $(BMENU) -c -p "A Rapid Tour of GDB Internals" \
- -u "Top" \
- -n "Communication with GDB" ${*}.t
-
-comm.texi: comm.t Makefile
- $(BMENU) -c -p "Interfacing GDB with RTEMS as a Target" \
- -u "Top" \
- -n "RTEMS Debugger Server Daemon" ${*}.t
-
-daemon.texi: daemon.t Makefile
- $(BMENU) -c -p "Communication with GDB" \
- -u "Top" \
- -n "Conclusion" ${*}.t
-
-conclusion.texi: conclusion.t Makefile
- $(BMENU) -c -p "Output of a Debug Session with the Prototype" \
- -u "Top" \
- -n "" ${*}.t
-
-convert:
- /usr/bin/gs -dMaxBitmap=300000000 -g4500x5500 -sDEVICE=pdfwrite -q -dNOPAUSE -dSAFER -sOutputFile=garde.pdf -- garde.eps -c -quit
- /usr/bin/gs -dMaxBitmap=300000000 -g4500x5500 -sDEVICE=pdfwrite -q -dNOPAUSE -dSAFER -sOutputFile=layers.pdf -- layers.eps -c -quit
- /usr/bin/gs -dMaxBitmap=300000000 -g4500x5500 -sDEVICE=pdfwrite -q -dNOPAUSE -dSAFER -sOutputFile=process.pdf -- process.eps -c -quit
- /usr/bin/gs -dMaxBitmap=300000000 -g4500x5500 -sDEVICE=pdfwrite -q -dNOPAUSE -dSAFER -sOutputFile=seqinit.pdf -- seqinit.eps -c -quit
- /usr/bin/gs -dMaxBitmap=300000000 -g4500x5500 -sDEVICE=pdfwrite -q -dNOPAUSE -dSAFER -sOutputFile=seqbreak.pdf -- seqbreak.eps -c -quit
- /usr/bin/gs -dMaxBitmap=300000000 -g4500x5500 -sDEVICE=pdfwrite -q -dNOPAUSE -dSAFER -sOutputFile=seqdetach.pdf -- seqdetach.eps -c -quit
-
diff --git a/doc/rgdb_specs/comm.t b/doc/rgdb_specs/comm.t
deleted file mode 100644
index d7342154ed..0000000000
--- a/doc/rgdb_specs/comm.t
+++ /dev/null
@@ -1,115 +0,0 @@
-@c
-@c RTEMS Remote Debugger Server Specifications
-@c
-@c Written by: Eric Valette <valette@crf.canon.fr>
-@c Emmanuel Raguet <raguet@crf.canon.fr>
-@c
-@c
-@c $Id$
-@c
-
-@chapter Communication with GDB
-
-The RTEMS remote debugger will be accessed by GDB on a host machine
-through a communication link. We will use the TCP/IP stack included in RTEMS
-: the FreeBSD stack. The communication link will be based based on the UDP protocol
-and the BSD sockets which are parts of the FreeBSD stack. On top of these layers,
-we will plug a module which allows a simple communication between different
-machines (especially between different endianess machines) : the SUN Remote
-Procedure Call (SUN RPC). This code is freely available on the net and comes
-with a BSD like license. With this module, a process can invoke a procedure
-on a remote system. The RTEMS remote debugger will be seen by GDB as a SUN RPC
-server. Commands will be packed by the GDB SUN RPC client and sent to the server.
-This server will unpack these commands, execute them and, if needed, return
-results to the SUN RPC client.
-
-
-Only a minimal subset of the SUN RPC library must be implemented.
-For example, the portmapper related API which allows a dynamic allocation of
-port numbers will not be implemented and some specific UDP port numbers will
-be used to establish the communication between the host and the target. The
-SUN RPC library implements the XDR module (eXternal Data Representation) which
-is a standard way of encoding data in a portable fashion between different endian
-systems. Below are figures describing the additional code and data size for
-the minimal library implementation we currently have already implemented for
-RTEMS :
-
-@example
-$ size -x librpc.a
-text data bss dec hex filename
-0x40e 0x0 0x0 1038 40e rpc_callmsg.o (ex librpc.a)
-0x2f1 0x18 0x0 777 309 rpc_prot.o (ex librpc.a)
-0x458 0x0 0x0 1112 458 svc.o (ex librpc.a)
-0x4f 0x4 0x0 83 53 svc_auth.o (ex librpc.a)
-0x75c 0x18 0x0 1908 774 svc_udp.o (ex librpc.a)
-0x711 0x4 0x10 1829 725 xdr.o (ex librpc.a)
-0x149 0x0 0x0 329 149 xdr_array.o (ex librpc.a)
-0x165 0x20 0x0 389 185 xdr_mem.o (ex librpc.a)
-@end example
-
-We have a constraint with the use of the UDP protocol. Because this
-protocol is connectionless, it is impossible, especially for the target, to
-detect if the connection is always active. On the other hand, using the TCP/IP
-protocols seems to be heavy especially if we plan to implement a dedicated micro
-stack for debug in the future. It can be a real problem to let the debugged
-process stopped during a long time even if there is no more debugger connected
-to the system. To avoid such a problem, the target must periodically test the
-connection with the host on another way than the one used to receive the commands.
-We must therefore open two communication ways so we need two fixed UDP port
-numbers.
-
-@enumerate
-@item One port will be used by the debugger to send its commands to the
-debugged process and to receive the result of these commands. View from the
-remote debugger, this port will be called primary port. For this one, we choose
-arbitrarily the port number 2000.
-@item The other socket will be used as secondary port by the target to sometimes
-test the connection between the host and the target. These tests will occur
-in specific situations, when a process will be stopped on a breakpoint, single
-step instruction or other means. This secondary port will also be used by the
-target to signal any change in the behavior of a debugged process (stopped,
-killed, waiting for,...). For the secondary port, we choose the port number
-2010.
-@end enumerate
-
-These two port numbers are used by the remote debugger to open the
-two communication sockets. GDB will use its own mean to choose its port numbers
-(probably the Unix portmapper). The figure layer shows the different
-layers we need to implement.
-
-@c
-@c Communications Layers Figure
-@c
-
-@ifset use-ascii
-@example
-@group
-XXXXX reference it in the previous paragraph
-XXXXX insert layers.eps
-XXXXX Caption Communications Layers
-@end group
-@end example
-@end ifset
-
-@ifset use-tex
-@example
-@group
-@c XXXXX reference it in the previous paragraph
-@c XXXXX insert layers.eps
-@c XXXXX Caption Communications Layers
-@end group
-@end example
-@image{layers,,6in}
-@end ifset
-
-
-@ifset use-html
-@c <IMG SRC="layers.jpg" WIDTH=500 HEIGHT=600 ALT="Communications Layers">
-@html
-<IMG SRC="layers.jpg" ALT="Communications Layers">
-@end html
-@end ifset
-
-
-
-
diff --git a/doc/rgdb_specs/conclusion.t b/doc/rgdb_specs/conclusion.t
deleted file mode 100644
index b2ed9ca340..0000000000
--- a/doc/rgdb_specs/conclusion.t
+++ /dev/null
@@ -1,51 +0,0 @@
-@c
-@c RTEMS Remote Debugger Server Specifications
-@c
-@c Written by: Eric Valette <valette@crf.canon.fr>
-@c Emmanuel Raguet <raguet@crf.canon.fr>
-@c
-@c
-@c $Id$
-@c
-
-@chapter Conclusion
-
-In this document we have presented how we envisage to add remote debugging facilities
-to RTEMS by implementing a remote debugger daemon for GDB. As any debug implemented
-in software, it will have limitation but we are confident that most of them
-can be removed by adding separate software components dedicated to debug activity.
-We must keep in mind that even with this approach, no software will enable the
-debug of code with interrupt entirely masked at processor level and that In
-Circuit Emulator (ICE) or use of BDM extension on the target board are the ultimate
-way to really debug any portion of an RTOS. BDM support in GDB is still weak
-but people are working on it and we may get something better in a near future.
-
-@ifset use-ascii
-@example
-@group
-XXXXX reference it in the previous paragraph
-XXXXX insert process.eps
-XXXXX Caption remote debugger tasks and handlers
-@end group
-@end example
-@end ifset
-
-@ifset use-tex
-@example
-@group
-@c XXXXX reference it in the previous paragraph
-@c XXXXX insert process.eps
-@c XXXXX Caption remote debugger tasks and handlers
-@end group
-@end example
-@image{process,6in,}
-@end ifset
-
-
-@ifset use-html
-@c <IMG SRC="process.jpg" WIDTH=500 HEIGHT=600 ALT="remote debugger tasks and handlers">
-@html
-<IMG SRC="process.jpg" ALT="remote debugger tasks and handlers">
-@end html
-@end ifset
-
diff --git a/doc/rgdb_specs/daemon.t b/doc/rgdb_specs/daemon.t
deleted file mode 100644
index 8c2b148360..0000000000
--- a/doc/rgdb_specs/daemon.t
+++ /dev/null
@@ -1,437 +0,0 @@
-@c
-@c RTEMS Remote Debugger Server Specifications
-@c
-@c Written by: Eric Valette <valette@crf.canon.fr>
-@c Emmanuel Raguet <raguet@crf.canon.fr>
-@c
-@c
-@c $Id$
-@c
-
-@chapter RTEMS Debugger Server Daemon
-
-We will describe in this section how this debugger server will be
-implemented on RTEMS environment. Our initial target is based on Intel Pentium
-and we will use an Ethernet link to communicate between the host and the target.
-
-The RTEMS remote debugger will be composed by several tasks and exception
-handlers :
-
-@itemize @bullet
-@item an initialization task which opens the sockets and runs the SUN RPC
-server. This task will also connect the interrupt handlers and launch the communication
-task
-@item a communication task which receives the SUN RPC commands, executes
-them and sends the result to the GDB client,
-@item A debuggee event management task which waits for events. We need a different
-task than the command management task in order to be able to still accept commands
-while no event has yet occurred for the debuggee. An example could be a continue
-command from GDB and then hitting to DEL key to see what is currently going
-on on the target side because an expected breakpoint is not caught...
-@item a debug exception handler which manages the hardware breakpoint and
-single step exceptions (INT 1 on Intel x86),
-@item a breakpoint exception handler which manages the software breakpoints
-exceptions (INT 3 on Intel x86),
-@item a default exception handler used to catch every possible errors make on the
-target system,
-@end itemize
-
-@c XXX figure reference
-@c XXX references to other sections
-Figure @b{remote debugger tasks and handlers} represents these
-different tasks and handlers. The synchronization between the different task
-and exception handlers will be described below in the section
-@b{Synchronization Among Tasks and Exception Handlers}.
-Some open issues we have faced for a prototype implementation are described
-in the section @b{Open Issues}. The temporary workaround we chose are described
-in chapter @b{Workarounds for Open Issues in Prototype}.
-
-
-@section The INITIALIZATION task
-
-This is the task that must be executed at the boot phase of RTEMS.
-It initializes the debug context. It must :
-
-@itemize @bullet
-@item open the UDP sockets,
-@item run the SUN RPC server main loop,
-@item create the COMMAND MANAGEMENT task,
-@item connect the DEBUG EXCEPTION handler,
-@item connect the SOFTWARE BREAKPOINT handler,
-@item delete itself.
-@end itemize
-If an error occurs at any step of the execution, the connections established
-before the error will be closed, before the initialization task deletes itself.
-
-
-@section The COMMAND_MNGT task
-
-This task is in charge of receiving the SUN RPC messages and executing
-the associated commands. This task must have an important priority because it
-must be executed each time a command message comes from the debugger. It must
-be executed even if one or both exception handlers are executed. But the COMMAND
-MANAGEMENT task must not block the TCP/IP module without which no message can
-be received.
-
-When not executing a command, this task is waiting for a SUN RPC message
-on the primary port. This idle state blocks the task, so the other active tasks
-can run. Once a message comes from Ethernet via the primary port, the COMMAND
-MANAGEMENT task wakes up and receives the message which is a request from GDB.
-This request is sent to the SUN RPC server code which extracts the command and
-its arguments, executes it and, if needed, sends a result to GDB. After having
-performed these actions, the task sleeps, waiting for another message.
-
-A particular case is the reception of the ATTACH command : in this
-case the COMMAND_MNGT task creates the EVENT_MNGT task described below before
-going to wait on UDP socket again.
-
-
-@section The EVENT_MNGT task
-
-This task is in charge of managing events happening on the debuggee such as
-breakpoint, exceptions. This task does a basic simple loop waiting for event
-on a synchronization variable. It is waken up by exception handlers code. It
-then signals GDB that an event occurred and then go sleeping again as further
-requests will be processed by the COMMAND_MNGT task.
-
-
-@section The DEBUG EXCEPTION handler
-
-This handler is connected to the DEBUG exception (INT 1 on Intel ix86).
-This exception is entered when :
-
-@itemize @bullet
-@item executing a single-step instruction,
-@item hardware breakpoint condition is true,
-@end itemize
-These events will be treated by the debugger because they are the
-primary event used when debugging a software for instruction stepping. In both
-cases, the DEBUG EXCEPTION handler code is executed. Please note that the execution
-context of the exception handler is the supervisor stack of the task that generated
-the exception. This implies:
-
-@itemize @bullet
-@item We may sleep in this context,
-@item We have as many possible execution context for the DEBUG EXCEPTION handler as
-we need to,
-@item When we enter the high level exception handler code, a normalized exception
-context has been pushed on the system stack and a pointer to this context is
-available as the first argument (cf c/src/exec/score/cpu/i386/cpu.c for more
-details),
-@end itemize
-First the exception handler wakeup the EVENT_MNGT task. Then it will
-cause the faulting thread to sleep on a synchronization object. As soon as GDB
-receives the event notifying that the debuggee status has changed, it will start
-sending requests to get the debuggee status (registers set, faulty task id,
-...). These requests are handled by the COMMAND MANAGEMENT task. When this task
-receive a PTRACE_CONT command it will resume the execution of the task that
-caused the exception by doing a V on the synchronization object.
-
-
-@section The BREAKPOINT EXCEPTION handler
-
-This handler is connected to the BREAKPOINT exception (INT3 on Intel
-Ix86). Each time the debugger wants to place a software breakpoint in the debuggee,
-a debuggee opcode is temporarily replaced by an instruction causing BREAKPOINT
-exception (the ``INT 3'' instruction on Intel ix86). When ``INT 3'' is executed,
-the BREAKPOINT handler is executed. Otherwise, the exception processing is the
-same than the one described in previous section.
-
-
-@section Synchronization Among Tasks and Exception Handlers
-
-The previous chapters have presented a simplified and static view of the various
-tasks and exceptions handlers. This chapter is more focussed on synchronization
-requirements about the various pieces of code executed when RGDBSD is operating.
-
-
-@subsection Implicit Synchronization Using Task Priorities
-
-This chapter is relevant on Uniprocessor System (UP) only. However, it will
-also list the requirements for explicit synchronization on Multi-processor Systems
-(MP). Below are the task priorities sorted by high priority. They are not supposed
-to be equal :
-
-@enumerate
-@item Network Input Task. This is the highest priority task. This can be regarded
-as a software interrupt task for FreeBSD code,
-@item RGDBSD command task. As this task waits on UDP sockets, it shall not prevent
-the previous task from running. As the main debug entry point, it should preempt
-any other task in the system,
-@item RGDBSD event task. This task should preempt any task but the two mentionned
-before to signal a debug event to GDB. The command task shall be able to preempt
-this task for emergency command such as DEL, or REBOOT,
-@item Applications tasks (task we are able to debug),
-@end enumerate
-
-Using theses priorities eliminates the need for adding more synchronization
-objects in the next section. My belief is that symmetric MP support will require
-more important change in the RTEMS than RGDBSD itself like multiple scheduler
-queues, task to processor binding for non symmetric IO, use a different implementation
-for @emph{task_disable_preemption}, ...
-
-
-@subsection Explicit Synchronization
-
-This chapter will describe the synchronization variables that need to be implemented
-in order to sequence debug events in a way that is compatible with what GDB
-code expects. The root of the problem is that GDB code mainly expects that once
-a debug event has occurred on the debuggee, the entire debuggee is frozen and
-no other event will occur before the CONTINUE command is issued. This behavior
-is hard to achieve in our case as once we hit a breakpoint, only the task that
-hits the breakpoint will be asleep on a synchronization object. Other tasks
-may hit other breakpoints while we are waiting commands from GDB generating
-potential unexpected events. There is a solutions if RGDBSD itself use RTEMS
-threads to fix this problem by creating a task that loops forever at a priority
-superior to any debugged task but below RGDBSD task priorities. Unfortunately
-this will not work for the case we use the nano-kernel implementation and we
-think it is better to study synchronization problems now. We also expects that
-multi-thread debug support hardening in GDB will remove some event serializations
-requirements. Here is the list of synchronization variables we plan to use and
-their usage. They are all regular semaphores. They are not binary semaphores
-because the task that does V is not the task that has done the P.
-
-@itemize @bullet
-@item @emph{WakeUpEventTask} : used by exception handler code to wake up the EVENT_MNGT
-task by doing a V operation on this object. When target code is running normally
-the EVENT_MNGT task sleeps due to a P operation on this semaphore,
-@item @emph{SerializeDebugEvent} : used to serialize events in a way compatible to
-what GDB expects. Before doing a V operation on @emph{WakeUpEventTask}, the
-exception handler does a P on this semaphore to be sure processing of another
-exception is not in progress. Upon reception of a CONTINUE command, the COMMAND_MNGT
-task will issue a V operation so that the exception code can wake up EVENT_MNGT
-task using the mechanism described above,
-@item @emph{RestartFromException} : (in fact one semaphore per task) used by exception
-handling code to put a faulty task to sleep once it has generated an exception
-by doing a P operation on this semaphore. In the case the exception was generated
-due to a breakpoint, GDB command will modify back the BREAKPOINT opcode to the
-original value before doing the CONTINUE command. This command will perform
-a V on this semaphore. In the case it is a real non restartable exception (faulty
-memory reference via invalid pointer for example), GDB will not allow to restart
-the program avoiding any loop. So not special analysis of cause of exception
-is foreseen as far as RGDBSD code is concerned,
-@end itemize
-
-@section Open Issues
-
-Here are some problems we have faced while implementing our prototype :
-
-@table @b
-@item [Protected ReadMem/WriteMem (I1)]:
-A GDB user can request to see the content
-of a corrupted pointer. The request PEEK_DATA will be performed by the COMMAND_MNGT
-task. It shall not enter the default exception handler set by RGDBSD or it will
-cause a dead lock in the RGDBSD code. Replacing the default exception vector
-before calling @b{readMem/writeMem} can be temporarily sufficient but :
-
-@itemize @bullet
-@item It will never work on MP system as it will rely on task priorities to insure
-that other task will not cause exceptions while we have removed the default
-exception handler,
-
-@item This feature should not be usable in RGDBSD only but also by an embedded debugger
-that may run without any task. It is also unavoidable in case of protected memory
-and in this case no priority mechanism can be used,
-
-@item In the case of using RGDBSD code on a dedicated nano kernel, this code will
-be called from interrupt level and we need a way to be sure we can debug other
-interrupts that may also cause exceptions,
-@end itemize
-
-@item [ATTACH Command Implementation (I2)]:
-After the @emph{target rtems symbolic_ip_target_name}
-command, the normal operation is to issue an @emph{attach lid} command where
-@emph{lid} represents a valid execution context. For Unix this is a process
-id, for other multi-tasking system this is the id of a thread. After the attach
-command, GDB expects to be waken up in the same manner as it is for normal events.
-Once waken up it expects to have a complete register context available and also
-that the target task is in a stopped state and that it can restart it using
-the regular CONTINUE command. In RTEMS there is a way to get force a thread
-to become inactive via @emph{rtems_task_suspend} but no way to get the full
-registers set for the thread. A partial context can be retrieved from the task
-@emph{Registers} data structure. On the other hand, relying on @emph{rtems_task_suspend}
-will be a problem for the nano-kernel implementation.
-
-@item [Stopping Target System (I3)]:
-Allthough it might not be obvious, most of the
-actions made by a GDB user assume the target is not running. If you modify a
-variable via the @emph{set variable = value} command you expect that the value
-is the one you have put when restarting. If a still running task modifies the
-same value in the mean time, this may be false. On the other hand, stopping
-all the tasks on the target system impose to have a very deep knowledge of the
-system. Using an interrupt driven RGDBSD, may facilitate the implementation
-on the nano-kernel.
-
-@item [Getting Tasks Contexts (I4)]:
-As previously mentionned there is no way to get
-tasks execution contexts via the RTEMS API. This is needed when debugging for
-example via this classical sequence :
-
-@enumerate
-
-@item @emph{(gdb) target rtems symbolic_ip_target_name}
-
-@item @emph{(gdb) info threads <=} get a thread list on screen
-
-@item @emph{(gdb)} @emph{attach thread_id} <= thread_id is one of the thread in
-the list
-
-@item @emph{(gdb) b a_function_of_interest }
-
-@item @emph{(gdb) continue}
-
-@item @emph{(gdb)} @emph{backtrace} <= print the call stack on the screen once we
-have hit the breakpoint
-
-@item @emph{(gdb) thread target another_thread_li <=} change implicit current thread
-value for gdb commands
-
-@item @emph{(gdb)} @emph{backtrace <=} should print the backtrace for the chosen thread
-@end enumerate
-In our execution model, we have a valid context only for the threads that hits
-the breakpoint as it has been pushed by the exception handler code. The other
-thread is still running and during the various RPC requesting memory access,
-it even changes as the COMMAND_MNGT thread is going to sleep. So the backtrace
-command will fail. We must find a way to make this work as it is very usefull
-when debugging multi-threaded programs,
-
-
-@item [Backtrace Stop convention (I5)]:
-The backtrace command on RTEMS task does not
-gracefully terminate as GDB does not find some backtrace termination condition
-it expects.
-@end table
-
-@section Workarounds for Open Issues in Prototype
-
-@table @b
-
-@item [(I1)]:
-Not implemented.We would rather like to work on the formalization of
-per thread flags and global flags that are much more general than any kludge
-we could implement,
-
-@item [(I2)]:
-We have tried two solutions in our prototype. The first one was to use
-the @emph{idle} thread context contained in the @emph{Registers} task control
-block field. The drawback of this solution was that we had to implement specific
-code for the continue operation immediately following the attach command. We
-then decided to create a dedicated task that will only exist during the attach
-phase. This task will call the ``ENTER_RGDB'' exception. This call will execute
-the Exception Handler that saves a valid context and that notifies a change
-to GDB. After the first CONTINUE command from GDB, this task will continue its
-execution and delete itself,
-
-@item [(I3)]:
-As explained above in the synchronization chapter, we choose to serialize
-events in a way that makes GDB think the system is frozen,
-
-@item [(I4)]:
-As a temporary fix, we have called @emph{rtems_task_suspend} and used
-the context switch contex for tasks that are unknown to RGDBSD,
-
-@item [(I5)]:
-Not Implemented yet. If I remember correctly, setting the frame pointer
-to 0 at task initialization for CISC processor solves this problem (ebp = 0x0
-on Intel or a6 = 0x0 on 680x0). This should be done in rtems_task_create function
-in the path to really starts the task for the first time. The processor/system
-specific stop condition can be found as macros in the GDB source tree.
-@end table
-
-@section Output of a Debug Session with the Prototype
-
-This is a sample session with the remote debugging prototype. Note that
-some lines have been broken so they would print properly when printed.
-
-@example
-GNU gdb 4.17
-Copyright 1998 Free Software Foundation, Inc.
-GDB is free software, covered by the GNU General Public License,
-and you are welcome to change it and/or distribute copies of it
-under certain conditions. Type "show copying" to see the conditions.
-There is absolutely no warranty for GDB.
-Type "show warranty" for details.
-This GDB was configured as --host=i686-pc-linux-gnu --target=i386-rtems.
-Attaching remote machine across net...
-Connected to net-test.
-Now the "run" command will start a remote process.
-Setting up the environment for debugging gdb.
-(gdb) attach 1
-Attaching program: /build-rtems/pc386/tests/debug.exe pid 1
-0x230715 in enterRdbg ()
-(gdb) info threads
-There are 8 threads:
-Id. Name Detached Suspended
-134283273 Rini No No <= current target thread
-0x230715 in enterRdbg ()
-134283272 Evnt No No
-_Thread_Dispatch () at /rtems/c/src/exec/score/src/thread.c:315
-134283271 SPE2 No No
-_Thread_Dispatch () at /rtems/c/src/exec/score/src/thread.c:315
-134283270 SPE1 No No
-_Thread_Handler () at /rtems/c/src/exec/score/src/thread.c:1107
-134283269 RDBG No No
-0x230715 in enterRdbg ()
-134283268 SCrx No No
-_Thread_Dispatch () at /rtems/c/src/exec/score/src/thread.c:315
-134283267 SCtx No No
-_Thread_Dispatch () at /rtems/c/src/exec/score/src/thread.c:315
-134283266 ntwk No No
-_Thread_Dispatch () at /rtems/c/src/exec/score/src/thread.c:315
-(gdb) b init.c:89
-Breakpoint 1 at 0x200180: file \
- /rtems/c/src/tests/samples/debug/init.c, line 89.
-(gdb) c
-Continuing.
-Thread 134283273 (Rini) has been deleted.
-[Switching to Rtems thread 134283271 (Not suspended) \
- ( <= current target thread )]
-Breakpoint 1, example2 (argument=4) at \
- /rtems/c/src/tests/samples/debug/init.c:89
-89 tuto += tuti;
-(gdb) s
-90 if (print_enable2)
-(gdb) c
-Continuing.
-Breakpoint 1, example2 (argument=4) at \
- /rtems/c/src/tests/samples/debug/init.c:89
-89 tuto += tuti;
-(gdb) b init.c:66
-Breakpoint 2 at 0x200128: file \
- /rtems/c/src/tests/samples/debug/init.c, line 66.
-(gdb) c
-Continuing.
-Switching to Rtems thread 134283270 (Not suspended) \
- ( <= current target thread )]
-Breakpoint 2, example1 (argument=4) at \
- /rtems/c/src/tests/samples/debug/init.c:66
-66 toto += titi;
-(gdb) c
-Continuing.
-[Switching to Rtems thread 134283271 (Not suspended) \
- ( <= current target thread )]
-Breakpoint 1, example2 (argument=4) at \
- /rtems/c/src/tests/samples/debug/init.c:89
-89 tuto += tuti;
-(gdb) bt
-#0 example2 (argument=4)
- at /rtems/c/src/tests/samples/debug/init.c:89
-#1 0xf0009bd0 in ?? ()
-(gdb) thread target 134283270
-thread 134283270 [SPE1], _Thread_Dispatch () at \
- /rtems/c/src/exec/score/src/thread.c:315
-315 executing = _Thread_Executing;
-(gdb) c
-Continuing.
-Breakpoint 2, example1 (argument=4) at \
- /rtems/c/src/tests/samples/debug/init.c:66
-66 toto += titi;
-(gdb) detach
-Detaching program: /build-rtems/pc386/tests/debug.exe pid 1
-Warning: the next command will be done localy! \
- If you want to restart another remote
-program, reuse the target command
-(gdb)
-@end example
-
-
diff --git a/doc/rgdb_specs/garde.eps b/doc/rgdb_specs/garde.eps
deleted file mode 100644
index 6d31db2f92..0000000000
--- a/doc/rgdb_specs/garde.eps
+++ /dev/null
@@ -1,8168 +0,0 @@
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: garde.eps
-%%Creator: fig2dev Version 3.2 Patchlevel 1
-%%CreationDate: Fri Oct 30 13:27:47 1998
-%%For: valette@tri-yann (Eric Valette,,6891,)
-%%Orientation: Portrait
-%%BoundingBox: 0 0 521 694
-%%Pages: 0
-%%BeginSetup
-%%EndSetup
-%%Magnification: 1.0000
-%%EndComments
-/$F2psDict 200 dict def
-$F2psDict begin
-$F2psDict /mtrx matrix put
-/col-1 {0 setgray} bind def
-/col0 {0.000 0.000 0.000 srgb} bind def
-/col1 {0.000 0.000 1.000 srgb} bind def
-/col2 {0.000 1.000 0.000 srgb} bind def
-/col3 {0.000 1.000 1.000 srgb} bind def
-/col4 {1.000 0.000 0.000 srgb} bind def
-/col5 {1.000 0.000 1.000 srgb} bind def
-/col6 {1.000 1.000 0.000 srgb} bind def
-/col7 {1.000 1.000 1.000 srgb} bind def
-/col8 {0.000 0.000 0.560 srgb} bind def
-/col9 {0.000 0.000 0.690 srgb} bind def
-/col10 {0.000 0.000 0.820 srgb} bind def
-/col11 {0.530 0.810 1.000 srgb} bind def
-/col12 {0.000 0.560 0.000 srgb} bind def
-/col13 {0.000 0.690 0.000 srgb} bind def
-/col14 {0.000 0.820 0.000 srgb} bind def
-/col15 {0.000 0.560 0.560 srgb} bind def
-/col16 {0.000 0.690 0.690 srgb} bind def
-/col17 {0.000 0.820 0.820 srgb} bind def
-/col18 {0.560 0.000 0.000 srgb} bind def
-/col19 {0.690 0.000 0.000 srgb} bind def
-/col20 {0.820 0.000 0.000 srgb} bind def
-/col21 {0.560 0.000 0.560 srgb} bind def
-/col22 {0.690 0.000 0.690 srgb} bind def
-/col23 {0.820 0.000 0.820 srgb} bind def
-/col24 {0.500 0.190 0.000 srgb} bind def
-/col25 {0.630 0.250 0.000 srgb} bind def
-/col26 {0.750 0.380 0.000 srgb} bind def
-/col27 {1.000 0.500 0.500 srgb} bind def
-/col28 {1.000 0.630 0.630 srgb} bind def
-/col29 {1.000 0.750 0.750 srgb} bind def
-/col30 {1.000 0.880 0.880 srgb} bind def
-/col31 {1.000 0.840 0.000 srgb} bind def
-
-end
-save
--27.0 696.0 translate
-1 -1 scale
-
-/cp {closepath} bind def
-/ef {eofill} bind def
-/gr {grestore} bind def
-/gs {gsave} bind def
-/sa {save} bind def
-/rs {restore} bind def
-/l {lineto} bind def
-/m {moveto} bind def
-/rm {rmoveto} bind def
-/n {newpath} bind def
-/s {stroke} bind def
-/sh {show} bind def
-/slc {setlinecap} bind def
-/slj {setlinejoin} bind def
-/slw {setlinewidth} bind def
-/srgb {setrgbcolor} bind def
-/rot {rotate} bind def
-/sc {scale} bind def
-/sd {setdash} bind def
-/ff {findfont} bind def
-/sf {setfont} bind def
-/scf {scalefont} bind def
-/sw {stringwidth} bind def
-/tr {translate} bind def
-/tnt {dup dup currentrgbcolor
- 4 -2 roll dup 1 exch sub 3 -1 roll mul add
- 4 -2 roll dup 1 exch sub 3 -1 roll mul add
- 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
- bind def
-/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
- 4 -2 roll mul srgb} bind def
-/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
-/$F2psEnd {$F2psEnteredState restore end} def
-%%EndProlog
-
-$F2psBegin
-10 setmiterlimit
-n -1000 12037 m -1000 -1000 l 9697 -1000 l 9697 12037 l cp clip
- 0.06299 0.06299 sc
-/Times-Roman ff 210.00 scf sf
-2115 8595 m
-gs 1 -1 sc (CRF) col0 sh gr
-/Times-Roman ff 210.00 scf sf
-2115 8280 m
-gs 1 -1 sc (CRF) col0 sh gr
-/Times-Roman ff 210.00 scf sf
-2115 7965 m
-gs 1 -1 sc (CRF) col0 sh gr
-/Times-Bold ff 210.00 scf sf
-3600 5445 m
-gs 1 -1 sc (Validated By :) col0 sh gr
-/Times-Bold ff 210.00 scf sf
-540 5850 m
-gs 1 -1 sc (Name :) col0 sh gr
-/Times-Bold ff 210.00 scf sf
-495 6210 m
-gs 1 -1 sc (Company : ) col0 sh gr
-/Times-Bold ff 210.00 scf sf
-495 6570 m
-gs 1 -1 sc (Received on :) col0 sh gr
-/Times-Bold ff 210.00 scf sf
-5985 6210 m
-gs 1 -1 sc (Sign : ) col0 sh gr
-/Times-Bold ff 210.00 scf sf
-3420 6210 m
-gs 1 -1 sc (Department :) col0 sh gr
-/Times-Bold ff 210.00 scf sf
-3420 6615 m
-gs 1 -1 sc (Deadline : ) col0 sh gr
-/Times-Bold ff 210.00 scf sf
-3420 5850 m
-gs 1 -1 sc (Position : ) col0 sh gr
-/Times-Bold ff 210.00 scf sf
-585 4275 m
-gs 1 -1 sc (Name :) col0 sh gr
-/Times-Bold ff 210.00 scf sf
-540 4635 m
-gs 1 -1 sc (Company : ) col0 sh gr
-/Times-Bold ff 210.00 scf sf
-540 4995 m
-gs 1 -1 sc (Received on :) col0 sh gr
-/Times-Bold ff 210.00 scf sf
-6030 4635 m
-gs 1 -1 sc (Sign : ) col0 sh gr
-/Times-Bold ff 210.00 scf sf
-3465 4635 m
-gs 1 -1 sc (Department :) col0 sh gr
-/Times-Bold ff 210.00 scf sf
-3465 5040 m
-gs 1 -1 sc (Deadline : ) col0 sh gr
-/Times-Bold ff 210.00 scf sf
-3465 4275 m
-gs 1 -1 sc (Position : ) col0 sh gr
-/Times-Bold ff 210.00 scf sf
-3645 3870 m
-gs 1 -1 sc (Verified By :) col0 sh gr
-/Times-Bold ff 210.00 scf sf
-3060 2340 m
-gs 1 -1 sc (Last Modified on :) col0 sh gr
-/Times-Bold ff 210.00 scf sf
-6570 2340 m
-gs 1 -1 sc (Version : ) col0 sh gr
-/Times-Bold ff 210.00 scf sf
-540 2340 m
-gs 1 -1 sc (Created on : ) col0 sh gr
-% Polyline
-7.500 slw
-n 2970 2025 m 2970 2520 l gs col0 s gr
-% Polyline
-n 6390 2025 m 6390 2520 l gs col0 s gr
-% Polyline
-n 450 2520 m 8685 2520 l 8685 2565 l gs col0 s gr
-% Polyline
-n 450 3555 m 8685 3555 l 8685 3600 l gs col0 s gr
-% Polyline
-n 450 3015 m 8685 3015 l 8685 3060 l gs col0 s gr
-% Polyline
-n 450 6750 m 8685 6750 l 8685 6795 l gs col0 s gr
-% Polyline
-n 450 7200 m 8685 7200 l 8685 7245 l gs col0 s gr
-% Polyline
-n 450 5490 m 8685 5490 l 8685 5535 l gs col0 s gr
-% Polyline
-n 450 3915 m 8685 3915 l 8685 3960 l gs col0 s gr
-% Polyline
-n 450 5175 m 8685 5175 l 8685 5220 l gs col0 s gr
-/Times-Bold ff 210.00 scf sf
-540 3375 m
-gs 1 -1 sc (Document Internal Reference : ) col0 sh gr
-/Times-Bold ff 210.00 scf sf
-585 2835 m
-gs 1 -1 sc (Author : ) col0 sh gr
-/Times-Bold ff 270.00 scf sf
-3420 7065 m
-gs 1 -1 sc (DISTRIBUTION LIST) col0 sh gr
-% Polyline
-n 1980 7200 m 1980 10305 l gs col0 s gr
-% Polyline
-n 5895 7200 m 5895 10305 l gs col0 s gr
-% Polyline
-n 4500 7200 m 4500 10305 l gs col0 s gr
-% Polyline
-n 3105 7200 m 3105 10305 l gs col0 s gr
-% Polyline
-n 7515 7200 m 7515 10305 l gs col0 s gr
-/Times-Bold ff 210.00 scf sf
-495 7515 m
-gs 1 -1 sc (Name) col0 sh gr
-/Times-Bold ff 210.00 scf sf
-5985 7515 m
-gs 1 -1 sc (Reason) col0 sh gr
-/Times-Bold ff 210.00 scf sf
-4590 7515 m
-gs 1 -1 sc (Position) col0 sh gr
-/Times-Bold ff 210.00 scf sf
-2025 7515 m
-gs 1 -1 sc (Company) col0 sh gr
-/Times-Bold ff 210.00 scf sf
-3150 7515 m
-gs 1 -1 sc (Department) col0 sh gr
-/Times-Bold ff 210.00 scf sf
-7560 7515 m
-gs 1 -1 sc (Has Copy) col0 sh gr
-% Polyline
-n 450 7650 m 8685 7650 l 8685 7695 l gs col0 s gr
-/Times-Bold ff 270.00 scf sf
-4320 450 m
-gs 1 -1 sc (Canon Research Centre France S.A) col0 sh gr
-/Times-Roman ff 240.00 scf sf
-4725 765 m
-gs 1 -1 sc (Rue de la touche Lambert) col0 sh gr
-/Times-Roman ff 240.00 scf sf
-4725 1125 m
-gs 1 -1 sc (35515 CESSON SEVIGNE Cedex) col0 sh gr
-/Times-Roman ff 240.00 scf sf
-4725 1440 m
-gs 1 -1 sc (FRANCE) col0 sh gr
-% Polyline
-%
-% Begin Imported EPS File: /home/valette/ev-perso-doc/canon.eps
-%%BeginDocument: /home/valette/ev-perso-doc/canon.eps
-%
-n gs
-540 180 tr
-5.220486 -5.126582 sc
-0 -158 tr
--18 -18 tr
-sa
-n 18 18 m 594 18 l 594 176 l 18 176 l cp clip n
-countdictstack
-mark
-/showpage {} def
-% EPS file follows:
-%!PS-Adobe-2.0 EPSF-1.2
-%%Creator: tops on IRIS workstation
-%%BoundingBox: 18 18 594 176
-%% $Header$
-%%EndComments
-%%BeginPreview: 250 68 1 68
-% 0000000000000000000000000000000000000000000000000000000000000019
-% 0000000000000000000000000000000000000000000000000000000000000019
-% 0000000000000000000000000000000000000000000000000000000000000019
-% 0000000000000000000000000000000000000000000000000000000000000019
-% 0000000000000000000000000000000000000000000000000000000000000019
-% 0000000000000000000000000000000000000000000000000000000000000019
-% 0000000000000000000000000000000000000000000000000000000000000019
-% 0000000000000000000000000000000000000000000000000000000000000019
-% 0000000000000000000000000000000000000000000000000000000000000019
-% 0000000000000000000000000000000000000000000000000000000000000019
-% 0000001fffc00000000000000000000000000000000000000000000000000019
-% 000001fffffc0000000000000000000000000000000000000000000000000019
-% 00000fffffff8000000000000000000000000000000000000000000000000019
-% 00003fffffffe000000000000000000000000000000000000000000000000019
-% 0000fffff800780000000000000000000000000003ffc0000000700007c00019
-% 0003ffffe0001c000000018000000f80007e00001ffff8000003fc001ff00019
-% 0007ffff80003e0000003ff000003fe003ff00003ffffe00000ffe007ff80019
-% 000ffffe00003f800001fffc0000fff00fff8000fc0fff80003fff03fffc0019
-% 001ffffc00007fc00003fffe0003fff81fffc001fc0fffc0007fff87fffc0019
-% 003ffff800007fe0001fffff000ffff87fffe007f80fffe001ffff9ffffc0019
-% 007ffff00000fff0007fffff001ffffdffffe007f807fff007ffffe3fffe0019
-% 00ffffe00000ffe003ffffff007ffffe1fffe00ffc07fff81fffffc1fffe0019
-% 00ffffe00001ffc00fffffff80fffffc1fffe01ffc07fff83fffffc1fffe0019
-% 01ffffc00001ff003fffffff8003fffc1fffe03ffc03fffc003fffc1fffe0019
-% 01ffffc00003fe0000003fff8003fffc1fffe03ffc03fffc003fffc1fffe0019
-% 03ffff800003f00000001fffc003fffc1fffe07ffe03fffe003fffc1fffe0019
-% 03ffff800007e00000001fffc003fffc1fffe07ffe01fffe003fffc1fffe0019
-% 03ffff800007c00000000fffc003fffc1fffe07ffe01ffff003fffc1fffe0019
-% 03ffff00000f000000000fffe003fffc1fffe0ffff01ffff003fffc1fffe0019
-% 03ffff00000e000000000fffe003fffc1fffe0ffff01ffff003fffc1fffe0019
-% 07ffff000010000000000fffe003fffc1fffe0ffff00ffff003fffc1fffe0019
-% 07ffff0000000000000007ffe003fffc1fffe0ffff80ffff803fffc1fffe0019
-% 07ffff000000000001ff07fff003fffc1fffe0ffff80ffff803fffc1fffe0019
-% 03ffff000000000007ffc7fff003fffc1ffff0ffff807fff803fffc1fffe0019
-% 03ffff00000000001ffffffff003fffc1fffe0ffffc07fff803fffc1fffe0019
-% 03ffff00000000003ffffffff803fffc1ffff0ffffc07fff803fffc1fffe0019
-% 03ffff00000000007ffffffff803fffc1ffff0ffffc07fff003fffc1fffe0019
-% 03ffff0000000000fffc1ffff803fffc1ffff0ffffe03fff003fffc1fffe0019
-% 03ffff8000000001fff007fffc03fffc1ffff0ffffe03fff003fffc1fffe0019
-% 01ffff8000000001ffe003fffc03fffe1ffff0ffffe03fff003fffc1fffe0019
-% 01ffffc000000001ffe001fffc03fffe1ffff07fffe01fff003fffc1fffe0019
-% 00ffffc000000003ffc001fffc03fffe1ffff07ffff01ffe003fffc1fffe0019
-% 00ffffe000000003ffc000fffe01fffe0ffff03ffff01ffe003fffc1fffe0019
-% 007fffe000000013ff8000fffe01fffe0ffff03ffff00ffc003fffc1fffe0019
-% 007ffff000000033ff8000fffe03fffe0ffff01ffff80ffc003fffc1fffe0019
-% 003ffff800000023ffc000ffff03fffe1ffff01ffff80ff8003fffc1fffe0019
-% 001ffffc00000063ffc000ffff01fffe0ffff00ffff80ff0003fffc1fffe0019
-% 000ffffe00000181ffc001ffff01fffe0ffff007fffc07e0003fffc1fffe0019
-% 0007ffff80000301ffe0013fff81fffe0ffff003fffc0fc0003fffc1fffe0019
-% 0003ffffc0000601fff0033fff81fffe0ffff001fffc0fc0003fffc1fffe0019
-% 0001fffff0001c00fff80e3fff81fffe0ffff000fffe1f00003fffc1fffe0019
-% 00007fffff87f0007ffffc3fffc1fffe0ffff0003ffffe00003fffc1fffe0019
-% 00003fffffffc0001ffff81fffc1fffe0ffff0000ffff800003fffc1fffe0019
-% 00000fffffff00000fffe01fffc1fffe0ffff00003ffe0000000000000000019
-% 000001fffff8000001ff80000000000000000000000000000000000000000019
-% 00000007fc000000000000000000000000000000000000000000000000000019
-% 0000000000000000000000000000000000000000000000000000000000000019
-% 0000000000000000000000000000000000000000000000000000000000000019
-% 0000000000000000000000000000000000000000000000000000000000000019
-% 0000000000000000000000000000000000000000000000000000000000000019
-% 0000000000000000000000000000000000000000000000000000000000000019
-% 0000000000000000000000000000000000000000000000000000000000000019
-% 0000000000000000000000000000000000000000000000000000000000000019
-% 0000000000000000000000000000000000000000000000000000000000000019
-% 0000000000000000000000000000000000000000000000000000000000000019
-% 0000000000000000000000000000000000000000000000000000000000000019
-% 0000000000000000000000000000000000000000000000000000000000000019
-% 0000000000000000000000000000000000000000000000000000000000000019
-%%EndPreview
-gsave
-18.000000 176.000000 translate
-/bwproc {
- rgbproc
- dup length 3 idiv string 0 3 0
- 5 -1 roll {
- add 2 1 roll 1 sub dup 0 eq
- { pop 3 idiv 3 -1 roll dup 4 -1 roll dup
- 3 1 roll 5 -1 roll put 1 add 3 0 }
- { 2 1 roll } ifelse
- } forall
- pop pop pop
-} def
-systemdict /colorimage known not {
- /colorimage {
- pop
- pop
- /rgbproc exch def
- { bwproc } image
- } def
-} if
-576.000000 -158.000000 scale
-/picstr 991 string def
-991 272 8
-[991 0 0 -272 0 272]
-{currentfile picstr readhexstring pop}
-image
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffff3f3ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffd7950000000000000000000000
-00000000000000000000000000000000000000000057a5dcfbffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffe10000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000b3ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc00000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000002fbaffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffbdce6d7dcefffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffb3000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000057ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffba0000000000000000000000000000
-0000000000000000a5efffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffd70000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000020efffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff4a0000000000000000
-00000000000000000000000000000000000000000000000000fbffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffcc000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00e1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4a00
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000083ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffff7d7efe1ebffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffcc00000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000002fffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff0400000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000079ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000e1ffffffffffffffffffffffffffffffffffc0634a206e95
-9d959db3acbaccc0c6ebe6f3f7f7e1ebfff7ffe6ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffc02f000000000000000000000000000000000000
-00000000baffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-e100000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000efffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff6e0000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000008cffffffffffffffffffffffff
-ffffffffff000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000ffff
-ffffffffffffffffffffffffffffffffffff3d00000000000000000000000000000000
-000000000000040000042000000020202f572f4a795795a579a5c6d2e1effbf7fffbff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff7900000000000000000000000000
-0000000000000000000000000000000000000000008cffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff0400000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000efffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000c6ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff00000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000ffff
-ffffffffffffffffffffffffffffffff00000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000ffffffffffffffffffffffffffffffffffffffff000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff2f000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00e1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffba0000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000efffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000ffffffffffffffffffffffffffffffffffff0000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000ffffffffffffffffffffffffffffff
-ffffffffff000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-a500000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000006effffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff8c0000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00a5ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff0000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00ffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000ffffffffffffffffffffffffffffff
-ffffff0000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000ffffffff
-ffffffffffffffffffffffffffffffff00000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffd20000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000baffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff00000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000ffffffffffffffffffffffffffffffffffffffff630004003d2f
-3d123d63838c956363836e04639db3953dacd2d2d7d7bab3d7e1d2dce6ebefeff7e6ef
-fff3ebffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-3d00000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000004ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff9d00000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000063ffffffffffffffffffffffffffffffffffffffffff
-ffffffff00000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000ffffffffff
-ffffffffffffffffffffffffffff000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000ffffffffffffffffffffffffffffffffffffffff0000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffff7000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000004ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000ffffffffffffffffffffffffffffff
-ffffffffff000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000baff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff1200000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000f3ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000ffffffffffffffffff
-ffffffffffffffffffffffffffffff0000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000ffffffffffffffffffffffffffffffffffffff00000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000ffffffffffffffffffffffffffffffffff
-ffffff0000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffe1000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff0000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000ffffffff
-ffffffffffffffffffffffffffffffff00000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000004affffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff6e00000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000c6ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff2f
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000e6ffffffffffffffffffffffffffffffffffffffffffeb000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000ffffffffffffffffffffffffffffffffffff
-ff00000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000ffffffffffff
-ffffffffffffffffffffffffffff000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffba
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000020
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000ffffffffffffffffffffffffffffffffffffffff0000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000004affffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff7900000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000c0ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff0000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000057ffffffffffffffffffffffffffffffffffffff
-ff00000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000dcffffffffffffff
-ffffffffffffffffffffffff0000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000ffffffffffffffffffffffffffffffffffffffff00000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffc00000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000002fffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000ffffffffffffffffffffffffffffffffff
-ffffff0000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000083ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffc0000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000efffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000ffffffffffffff
-ffffffffffffffffffffffff0000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000ffffffffffffffffffffffffffffffffffffffff000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000ffffffffffffffffffffffffffffffffffffff
-ff00000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffdc0000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff00000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000ffffffffffff
-ffffffffffffffffffffffffffff000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000c0ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000579dffffffffffffffffffffffffffffffefac9520000000000000000000000000
-00000000000000000000fbffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000ffffffffffffffffffffffffffffffffffff000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000ffffffffffffffffffffffffffffffffffffffff00
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000ffffffffffffffff
-ffffffffffffffffffffffff0000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffff30000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000004affffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff0000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000ffffffffffffffffffffffffffffffffffffffff00000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000acffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff8c0000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000004baefffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffefb320000000000000000000000000000000000000ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffcc00000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000200420000000
-0000000000000000000000000000000000ffffffffffffffffffffffffffffffffac00
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000a5ffffffffffffffffffff
-ffffffffffffffffffff00000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000ffffffffffffffffffffffffffffffffffffffff000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff00000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000dcffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000ffffffffffffffffffffffffffffffffffffff
-ff00000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000b3ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000baffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffc000000000000000000000000000000000
-4affffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffdc000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000002f
-ccffffffffffffffffffffffffd2000000000000000000000000000000ffffffffffff
-ffffffffffffffffff0000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-ffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000ffffffffffffffffffffffffffffffffffffffff00
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffb3000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000ffffffffffffffff
-ffffffffffffffffffffffff0000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000acffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff79000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000003dffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7900
-00000000000000000000000000e1ffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffff30000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000083ffffffffffffffffffffffffffffffffffffffff12000000000000
-000000000000ffffffffffffffffffffffffffff000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000ffffffffffffffffffffffffffffffffffffffffff000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000ffffffffffffffffffff
-ffffffffffffffffffff00000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000063efffffffffffba00000000000000000000000000000000
-0000000000008cffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff00000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000ffffffffffffffffffffffffffffffffffffffff000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000009dffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000003dffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff0400000000000000000000000000ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000006effffffffffffffffffffffffffffffffffff
-ffffffffffff57000000000000000000004affffffffffffffffffffffffff00000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000ffffffffffffffffffffffffff
-ffffffffffffffff000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00ffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc00000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000ffffffffffffffffffffffff630000
-00000000000000000000000000000000000000ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000ffffffffffffffffffffffffffffffffffffffff00
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000a5ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffff70000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000d7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffdc000000000000000000
-000000acffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff0000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000057ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff4a0000000000000000009dffffffffff
-ffffffffffff0400000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000ffffff
-ffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000ffffffffffffffffffffffffffffffffffffffff000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff00000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000f3ffffffffff
-ffffffffffffffffffff000000000000000000000000000000000000000000ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000ffffffffffffffffffff
-ffffffffffffffffffff00000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000acffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6300
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000020ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff000000000000000000000000ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7000000
-000000000000ffffffffffffffffffffff000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000ffffffffffffffffffffffffffffffffffffffffffff0000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000ffffffffffffffffffffffff
-ffffffffffffffff000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000ffffffffffffffffffffffffffffffffffff2f000000000000000000000000
-00000000000000009dffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00ffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000d7ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000002fffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff0400000000000000000000baffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd20000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000b3ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffac0000000000000000ffffffffffffffffffff00000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000ffffffffffffffffffffffffffffffff
-ffffffffffff0000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000000000ff
-ffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffd70000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000fbffffffffffffffffffffffffffffffffffffff57
-000000000000000000000000000000000000000000ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000ffffffffffffffffffffffffffffffffffffffff000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000e6ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000063ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000
-00000000002fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000efffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff0000000000000000ffffffffff
-ffffffc000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000fbffffffffff
-ffffffffffffffffffffffffffffffffff000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000ffffffffffffffffffffffffffffffffffffffff0000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6e00
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000ffffffffffffffffffffff
-ffffffffffffffffffffff00000000000000000000000000000000000000000000ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000ffffffffffffffffffffffff
-ffffffffffffffff000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00dcffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000002fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffb00000000000000000000ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff0000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-000000000000e1ffffffffffffff000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000ffffffffffffffffffffffffffffffffffffffffffffff00000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000ffffffffffffffffffffffffffff
-ffffffffffff0000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000000000ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000000000d2
-ffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000
-00000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff0000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000000000ff
-ffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000d2ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffdc0000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffd2000000000000000000ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff00000000000000ffffffffffffff00000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000ffffffffffffffffffffffffffffffffffffff
-ffffffff00000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000ffffff
-ffffffffffffffffffffffffffffffffff000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffff3d
-00000000000000000000000000000000000000000000ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000ffffffffffffffffffffffffffffffffffffffff0000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000e1ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffac00000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000acffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff2f00
-00000000000000c0ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff00000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000d2ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff0000000000003dffffffffff
-ff00000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000d2ffffffffffffffff
-ffffffffffffffffffffffffffffff0000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000ffffffffffffffffffffffffffffffffffffffff00000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000f7ffffffffffffffffffffffffffff
-ffffffffffffffffffffff0000000000000000000000000000000000000000000000ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000ffffffffffffffffffffffffffff
-ffffffffffff0000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000000000f3
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff95000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff00000000000000002fffffffffffffffffffffffffffffff
-fffffffffffffffffffffffb0000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000063ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-000000000000ffffffffff200000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000ffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000ffffffffffffffffffffffffffffffff
-ffffffff00000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff0000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000ffffffff
-ffffffffffffffffffffffffffffffffffffffffffff00000000000000000000000000
-0000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff00000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000ffffff
-ffffffffffffffffffffffffffffffffff000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000efffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6e0000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000d2ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff2f0000000000000000ffffff
-ffffffffffffffffffffffffffffffffffffffffffff00000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffe6000000000000ffffffff00000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffff
-ffff000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000ffffffffff
-ffffffffffffffffffffffffffffff0000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff00000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffa500
-0000000000000000000000000000000000000000000000ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff0000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000ffffffffffffffffffffffffffffffffffffffff00000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff63000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-f70000000000000000ffffffffffffffffffffffffffffffffffffffffffffffff0000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff040000000000ffffffff0000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000004affffffffffffffffffffff
-ffffffffffffffffffffffffff00000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000ffffffffffffffffffffffffffffffffffffffff000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000e1ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff00000000000000000000000000000000000000000000000000
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000ffffffffffffffffffffffffffffffff
-ffffffff00000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff4a0000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000004affffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff0000000000000000ffffffffffffffffffffffffffff
-ffffffffffffffff830000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000c6ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-000000000000ffff950000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000000000ff
-ffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000ffffffffffffffffffffffffffffffffffff
-ffff000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000
-000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000ffffffffff
-ffffffffffffffffffffffffffffff0000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffac00000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-ebffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff0400000000000000ffff
-ffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffd20000000000ffff00000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffff
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000ffffffffffffff
-ffffffffffffffffffffffffff00000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-000000000000000000000000000000000000000000000000ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff00000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000ffffffffffffffffffffffffffffffffffffffff000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffac0000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffc600000000000000ffffffffffffffffffffffffffffffffffffffff0000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000e1ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000000000e10000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000ffffffffffffffffffffffffffff
-ffffffffffffffffffffff000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000ffffffffffffffffffffffffffffffffffffffff0000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000e6ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000000000000000000000000000000000000000000000000000
-00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000ffffffffffffffffffffffffffffffffffff
-ffeb000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000efffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffd200000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000020ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff00000000000000ffffffffffffffffffffffffff
-ffffffffff570000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000ffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000f3ffffff
-fffffffffffffffffffffffffffffffffffffffffff700000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000fffffffffffffffffffffffffffffffffffffff7
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff04000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000
-00000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000ffffffffffffff
-ffffffffffffffffffffffffe600000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000006effffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffef00000000000000ff
-ffffffffffffffffffffffffffffffff00000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000d7ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffeb0000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000ffffffffffffffffff
-ffffffffffffffffffffff000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffc600000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000
-00000000000000000000000000000000000000000000000000ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000ffffffffffffffffffffffffffffffffffffffef0000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000acffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff6e00000000000000ffffffffffffffffffffffffffffffff0000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffd7000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000ffffffffffffffffffffffffffffffffff
-fffffffffffffffff30000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000ffffffffffffffffffffffffffffffffffffffff00000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000acffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff9d0000000000000000000000000000000000000000000000000000000000
-008cffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff00000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000fffffffffffffffffffffffffffffffffffffffb
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000d2ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff00000000000000ffffffffffffffffffffffff
-ffffd20000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000dcffffffffffff
-ffffffffffffffffffffffffffffffffffffffeb000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000fffffffffffffffffffffffffffffffffffffffb0000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff00000000000000000000000000000000000000
-00000000000000000000000000f3ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000ffffffffffffffffff
-ffffffffffffffffffffe6000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000acffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000
-ffffffffffffffffffffffffff00000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000efffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff00000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffdc00000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000ffffffffffffffffffffff
-ffffffffffffffffd20000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000
-00000000000000000000000000000000000000000000000000ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff0000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000ffffffffffffffffffffffffffffffffffffffd700000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffac000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000079
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff00000000000000ffffffffffffffffffffffff0000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffc600000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffd200000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-ffffffffffffffffffffffffffffffffffffffd7000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffba00000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000083ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffd20000000000000000000000000000000000000000000000000000000000000000
-0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000ffffffffffffffffffffffffffffffffffffffb30000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff00000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000063ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff00000000000057ffffffffffffffffffffff
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000acffffffffffffffffff
-ffffffffffffffffffffffffffffffffffc60000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000ffffffffffffffffffffffffffffffffffffffe100000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff00000000000000000000000000000000000000000000
-000000000000000000000000008cffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000ffffffffffffffffffffff
-ffffffffffffffffc60000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000003dffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffeb000000000000
-e1ffffffffffffffffffff000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff0000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00ffffffffffffffffffffffffffffffffffffffffffffffffffffffcc000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000ffffffffffffffffffffffffff
-ffffffffffffc600000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000
-00000000000000000000000000000000000000000000000000ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff00000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-ffffffffffffffffffffffffffffffffffffffd7000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffa5000000000000ffffffffffffffffffff00000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000003dffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffd2000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000ffff
-ffffffffffffffffffffffffffffffffffc00000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff9d0000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000057ffffffffffffffffffffffffffffffffffffffffffffffffffffffffd7
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000ffffffffffffffffffffffffffffffffffffffeb00000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd7
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff3d000000000000fffffffffffffffff30000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000f7ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000003dffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffc000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000ffffffffffffffffffffffffffffffffffffffcc000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff00000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff00000000000000000000000000000000000000000000000000
-0000000000000000000000000095ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000ffffffffffffffffffffffffff
-ffffffffffffdc00000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff00000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000
-ffffffffffffffffd20000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff12000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffac0000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000ffffffffffffffffffffffffffffff
-ffffffffd2000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000
-00000000000000000000000000000000000000000000000000ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000ffff
-ffffffffffffffffffffffffffffffffffc60000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000f7ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff0000000000ffffffffffffffff95000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff2000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffac0000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000ffffffff
-ffffffffffffffffffffffffffffffc000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffac000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000012ffffffffffffffffffffffffffffffffffffffffffffffffffffffffeb000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff00000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000ffffffffffffffffffffffffffffffffffffffc0000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-6effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff4a00000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff9d000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000ffffffffffffffffffffffffffffffffffffff9d0000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff0000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000f3ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff00000000000000000000000000000000000000000000000000000000
-00000000000000000000000000f3ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000ffffffffffffffffffffffffffffff
-ffffffffac000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff0000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff57000000ffff
-ffffffffffff0000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000efffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff9d00000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000ffffffffffffffffffffffffffffffffff
-ffffac0000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000ffffffff
-ffffffffffffffffffffffffffffffffffffffffffff00000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff0000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000ffffffff
-ffffffffffffffffffffffffffffff9500000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffb3000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff000000ffffffffffffffff000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff00000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-9500000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000ffffffffffff
-ffffffffffffffffffffffffffa5000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-008cffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffef000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000ffffffffffffffffffffffffffffffffffffff8c0000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000ebffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff0000ffffffffffffffff12000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff630000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff950000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000ffffffffffffffffffffffffffffffffffffff8300000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000ffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000095ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff00000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffef00000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000ffffffffffffffffffffffffffffffffff
-ffff950000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffac00ffffffff
-ffffffffac000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000c0ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000d2ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff79000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000ffffffffffffffffffffffffffffffffffffff
-9d00000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000ffffffffffff
-ffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff0000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000083ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ef00000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000ffffffffffff
-ffffffffffffffffffffffffff79000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffb00000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff00ffffffffffffffffff00000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff00000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff5700
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000ffffffffffffffff
-ffffffffffffffffffffffa50000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000ffffffffffffffffffffffffffffffffffffffffffffffff000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffff70000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000ffffffffffffffffffffffffffffffffffffff4a00000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000acffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffd20000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff3d00000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000ffffffffffffffffffffffffffffffffffffff8c000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000ffffffffffffffffffffffffffffffffffffff
-ffffffffff000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000012ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff3d000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000d7ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffeb000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000ffffffffffffffffffffffffffffffffffffff
-5700000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb00
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff0000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000008cffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff120000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000ffffffffffffffffffffffffffffffffffffff6e00
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000ffffffffffffffff
-ffffffffffffffffffffffffffffff0000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff0000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe100
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000ffffffffffffffff
-ffffffffffffffffffffff200000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff0000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff00000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000ffffffffffffffffffff
-ffffffffffffffffff2f00000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000ffffffffffffffffffffffffffffffffffffffffffffff000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-e1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffdc00000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000ffffffffffffffffffffffffffffffffffffff12000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffd7000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000004ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffa5000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffe60000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff00000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00ffffffffffffffffffffffffffffffffffffff040000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffff
-ff57000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff6300
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffe10000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000ffffffffffffffffffffffffffffffffffffff2f00
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000000000ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000020ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000ffffffffffffffffffffffffffffffffffffff04000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000ffffffffffffffffffff
-ffffffffffffffffffffffff0000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000083ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff0000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd2000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000ffffffffffffffffffff
-ffffffffffffffffff0000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffeb0000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000063ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff00000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000efffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff00000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000ffffffffffffffffffffffff
-ffffffffffffff04000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00fffffffffffffffffffffffffffffffffffffffffffb000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000020
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffba000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00ffffffffffffffffffffffffffffffffffffff000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff00000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff8c0000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000000000ff
-ffffffffffffffffffffffffffffffffffff1200000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000ffffffffffffffffffffffffffffffffffffffffff0000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffcc00000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffb300000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000ffffffffffffffffffffffffffffffffffffff00000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000003dffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-d700000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff00000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000012ffffffffffffffffffffffffffffffffffffff000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000ffffffffffffffffffffffff
-ffffffffffffffffff0000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000083ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff0000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb30000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000ffffffffffffffffffffffff
-ffffffffffffff00000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff0000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff0000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000f3ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000003dffffffffffffffffffffffffffff
-ffffffffff000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000000000ff
-ffffffffffffffffffffffffffffffffffffffc6000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000000012ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffac0000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000000000ff
-ffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff00000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-b3ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff0000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000004affffff
-ffffffffffffffffffffffffffffffff04000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000ffffffffffffffffffffffffffffffffffffffff0000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000000000ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff9d000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000ffffffffffffffffffffffffffffffffffffff000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffba0000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffac
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000ffffffffffffffffffffffffffffffffffffff0000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000ffffffffffffffffffffffffffff
-ffffffffffff0000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff4a00000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff6e00000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000ffffffffffffffffffffffffffff
-ffffffffff000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000000000ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000008cffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000012ffffffffffffffffffffffffffffffff
-ffffff0000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000ffffff
-ffffffffffffffffffffffffffffffffd2000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000d2ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff7900000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000ffffff
-ffffffffffffffffffffffffffffffff00000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff00000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000f3ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff4a000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-57ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffe100000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff00000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000063ffffffffff
-ffffffffffffffffffffffffffff000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000ffffffffffffffffffffffffffffffffffffff0000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff8c0000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000004ffffffffffffffffffffffffffffffffffffff0000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff2f0000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000e1ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff0000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000acffffffffffffffffffffffffffffffffffffff00000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000ffffffffffffffffffffffffffffffff
-ffffff0000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-9d00000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff6e000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000004ffffffffffffffffffffffffffffffff
-ffffff0000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000012
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff00000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000f3ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000063ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000009dffffffffffffffffffffffffffffffffffff
-ff00000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000ffffffffff
-ffffffffffffffffffffffffffd7000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000083ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000d2ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff79000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000020ffffffffff
-ffffffffffffffffffffffffffff000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff00000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff00000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00ebffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000000000ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000acffffffffffffff
-ffffffffffffffffffffffff0000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000ffffffffffffffffffffffffffffffffffff0000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff00000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff6e00000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000063ffffffffffffffffffffffffffffffffffffff00000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff200000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000095ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff950000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff00000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000e1ffffffffffffffffffffffffffffffffffffff000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000ffffffffffffffffffffffffffffffffffff
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff120000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000004affffffffffffffffffffffffffffffffffff
-ff00000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000057ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff00000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff0400000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000003dffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000ffffffffffffffffffffffffffffffffffffffff00
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000ffffffffffffff
-ffffffffffffffffffffff000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000003dffffffffffffff
-ffffffffffffffffffffffff0000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff00000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff2000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000e1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000ffffffffffffffffffff
-ffffffffffffffffffff00000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000ffffffffffffffffffffffffffffffffffff00000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000d2ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff00000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000079ffffffffffffffffffffffffffffffffffffff000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffc00000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00ffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000ffffffffffffffffffffffffffffffffff9d0000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000079ffffffffffffffffffffffffffffffffffffff00
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffc000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000002fffffffffffff
-ffffffffffffffffffffffffffffffffff000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000ffffffffffffffffffffffffffffffffffffffff000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000ffffffffffffffffff
-ffffffffffffffff000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff9d0000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000079ffffffffffffffffff
-ffffffffffffffffffff00000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff00000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000ccffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000a5ffffffffffffffffffffffffffffffffff2f000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000d2ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000ffffffffffffffffffffffff
-ffffffffffffffff000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000ffffffffffffffffffffffffffffffffff00000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000d7ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff00000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0063ffffffffffffffffffffffffffffffffffffff0000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff0000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000b3ffffffffffffffffff950000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff0000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000000000ff
-ffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000ffffffffffffffffffffffffffffffffff0000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000079ffffffffffffffffffffffffffffffffffffff000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffc0000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff00000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000ffffffffffffffffffffffffffffffffffffffff0000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000002fffffffffffffffffffffff
-ffffffffffff0000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffef0000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000079ffffffffffffffffffffff
-ffffffffffffffff000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1200
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-006effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff7900000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000d2ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000ffffffffffffffffffffffffffff
-ffffffffffff0000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000004a
-ffffffffffffffffffffffffffffffffff000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000006effffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff00000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000e6ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff0000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000079
-ffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff0000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000fbffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff00000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000ffffff
-ffffffffffffffffffffffffffffffffff000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000004affffffffffffffffffffffffffffffffd200000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000006effffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000baffffffffffffffffffffffffffffffffffffff0000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff00000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff0000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000ffffffffffffffffffffffffffffffffffffffff00000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000004affffffffffffffffffffffffff
-ffffff3d00000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000d7ffffffffffffffffffffffffff
-ffffffffffff0000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000000000ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff00000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000063ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000ffffffffffffffffffffffffffffffff
-ffffffff00000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000002fffff
-ffffffffffffffffffffffffffff000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff63000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff00000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000d2ffff
-ffffffffffffffffffffffffffffffffff000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff00000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000ffffffffff
-ffffffffffffffffffffffffffffff0000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000004affffffffffffffffffffffffffffffff00000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000d7ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff0000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000ccffffffffffffffffffffffffffffffffffffff00000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffac0000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff00000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000ffffffffffffffffffffffffffffffffffffffff000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000009dffffffffffffffffffffffffffffff
-ff00000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000a5ffffffffffffffffffffffffffffff
-ffffffff00000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000006effffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000006e0000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000ffffffffffffffffffffffffffffffffffff
-ffff000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000c6ffffffff
-ffffffffffffffffffffffff0000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffb3000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000083ffffffff
-ffffffffffffffffffffffffffffff0000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff00000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000f7ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000a5ffc60000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000ffffffffffffff
-ffffffffffffffffffffffffff00000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000d7ffffffffffffffffffffffffffffffff000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000009dffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff00000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000c0ffffffffffffffffffffffffffffffffffffff000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff0000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff6300000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000ffffff00000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000ffffffffffffffffffffffffffffffffffffffff0000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000009dffffffffffffffffffffffffffffffff00
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000ebffffffffffffffffffffffffffffffffff
-ffff000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffff300000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000b3ffffffff0000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff00000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffff
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000006effffffffffff
-ffffffffffffffffffff00000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffff3000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000ebffffffffffff
-ffffffffffffffffffffffffff00000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff040000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000ffffff
-ffffff0000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000d7ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000ffffffffffffffffff
-ffffffffffffffffffffff000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000009dffffffffffffffffffffffffffffffff0000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000004ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff2f00000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000f3ffffffffffffffffffffffffffffffffffffff0000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff00000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffdc0000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000f7ffffffffffffb3000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff0000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000ffffffffffffffffffffffffffffffffffffffff00000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000083ffffffffffffffffffffffffffffffff000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff00000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000f7ffffffffffffffffffffffffffffffffffffff
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffd20000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffba00000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000efffffffffffffffff0000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000ffffffffffffffffffffffffffffffffffffffff0000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000008cffffffffffffffff
-ffffffffffffffff000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000fbffffffffffffffff
-ffffffffffffffffffffff000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffdc0000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000efffffffffffffffffffff
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000009dffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000ffffffffffffffffffffff
-ffffffffffffffffff0000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000c0ffffffffffffffffffffffffffffffff00000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff9d00000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff0000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000ffffffffffffffffffffffffffffffffffffffff00000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff12000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffdc00000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000003dffff
-ffffffffffffffffffffff000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff00000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-ffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000c6ffffffffffffffffffffffffffffffff0000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000baffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000ffffffffffffffffffffffffffffffffffffffff0000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffba0000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000c6ffffffffffffffffffffffffffff9d00000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000ffffffffffffffffffffffffffffffffffffffff00000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000d7ffffffffffffffffffff
-ffffffffffff0000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000ffffffffffffffffffffff
-ffffffffffffffffff0000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff950000000000000000000000000000000000000000000000
-0000000000000000000000000063f3ffffffffffffffffffffffffffffffffff000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000008cffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000ffffffffffffffffffffffffff
-ffffffffffffff00000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-dcffffffffffffffffffffffffffffffff000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffef00000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff00000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-ffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff6e0000000000000000
-00000000000000000000000000000000000000003debffffffffffffffffffffffffff
-ffffffffffffffff000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000ffff
-ffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000e6ffffffffffffffffffffffffffffffff00000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000095ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000ffffffffffffffffffffffffffffffffffffffff00000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffba63000000000000000000000000000000002fa5ebffffffffffffff
-ffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff00000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000ffffffffffffffffffffffffffffffffffffffff000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000efffffffffffffffffffffffff
-ffffffff00000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000ffffffffffffffffffffffffff
-ffffffffffffff00000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-04ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000000000ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff570000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000ffffffffffffffffffffffffffffff
-ffffffffff000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000ffff
-ffffffffffffffffffffffffffffff0000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffd200000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000ffff
-ffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000057ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff0000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000f3ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff0000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000ffffffff
-ffffffffffffffffffffffffffffffff00000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000ffffffffffffffffffffffffffffffffff3d0000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000a5ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000020ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff00000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000ffffffffffffffffffffffffffffffffffffffff000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000006effffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff20fbffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff00000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000ffffffffffffffffffffffffffffffffffffffff0000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000ffffffffffffffffffffffffffffff
-ffffd20000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000000000ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000b3ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000ffffffffffffffffffffffffffffff
-ffffffffff000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000009dff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffc60000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffeb0000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000ffffffffffffffffffffffffffffffffff
-ffffff0000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000ffffffff
-ffffffffffffffffffffffffffff000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff00000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff0000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000ffffffff
-ffffffffffffffffffffffffffffffff00000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000009dffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff00000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff0000009dffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000d7ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff00000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000ffffffffffff
-ffffffffffffffffffffffffffff000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000ffffffffffffffffffffffffffffffffffff00000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000006effffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff6e0000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000ffffffffffffffffffffffffffffffffffffffff0000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000095ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff0000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffb300000000ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff00000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff0000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000ffffffffffffffffffffffffffffffffffffffff00000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000ffffffffffffffffffffffffffffffffff
-ff00000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000ffffffffffffffffffffffffffffffffff
-ffffff0000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000008cffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000000012ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000ffffffffffffffffffffffffffffffffffffff
-ff00000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000ffffffffffff
-ffffffffffffffffffffffff0000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff00000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff00000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000ffffffffffff
-ffffffffffffffffffffffffffff000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000012ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000a5ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffc0000000000000baffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8c
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000012ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000ffffffffffffffff
-ffffffffffffffffffffffff0000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000ffffffffffffffffffffffffffffffffffff040000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffba0000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff0000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000ffffffffffffffffffffffffffffffffffffffff00000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff00000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff00000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000000000dc
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff00000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000ffffffffffffffffffffffffffffffffffffffff000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000ffffffffffffffffffffffffffffffffffffba
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000ccffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff00000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000083ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000ffffffffffffffffffffffffffffffffffffff
-ff00000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000008cffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff0400000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffac000000000000000057ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000ffffffffffffffffffffffffffffffffffffffff00
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000ffffffffffffffff
-ffffffffffffffffffffff000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000ffffffffffffffff
-ffffffffffffffffffffffff0000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000ccffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-6e00000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff00000000000000000000e6ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeb000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000ffffffffffffffffffff
-ffffffffffffffffffff00000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000ffffffffffffffffffffffffffffffffffffff00000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff0000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff00000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000ffffffffffffffffffffffffffffffffffffffff000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000d2ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffef0000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffac00000000000000000000
-00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff00000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00ffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000ffffffffffffffffffffffffffffffffffffff0000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000003dffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff4a000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000ffffffffffffffffffffffffffffffffffffffff00
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000d7ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff000000000000000000000000baffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000ffffffffffffffffffffffffffffffffffffffff000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000ffffffffffffffffffff
-ffffffffffffffffffcc00000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000008cffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000ffffffffffffffffffff
-ffffffffffffffffffff00000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000ccffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000095ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff2f00000000000000000000000000ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000ffffffffffffffffffffffff
-ffffffffffffffff000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00ffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff0000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00ffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000d2ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff00000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000
-0000003dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffb3000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000dcffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff0000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000000000ff
-ffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000ffffffffffffffffffffffffffffffffffffffff000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffd2000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000ffffffffffffffffffffffffffffffffffffffff000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000ccffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-6e000000000000000000000000000000ebffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff0000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000ffffffffffffffffffffffffffffffffffffffff0000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000ffffffffffffffffffffffff
-ffffffffffffffff120000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000008cff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000ffffffffffffffffffffffff
-ffffffffffffffff000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00c6ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff200000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff0000000000000000000000000000000000ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000ffffffffffffffffffffffffffff
-ffffffffffff0000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000000000ff
-ffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff0000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-d2ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff0000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000000000ff
-ffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000f3ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffcc0000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000002fffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff830000000000000000000000
-0000000000008cffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000009dffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff00000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000ffffff
-ffffffffffffffffffffffffffffffffff000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000ffffffffffffffffffffffffffffffffffffffffff00000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000ffffffffffffffffffffffffffffffffffffffff0000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000f3ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-00000000000000000000000000000000000000ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff8300000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff0000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000ffffffffffffffffffffffffffffffffffffffff00000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000ffffffffffffffffffffffffffff
-ffffffffffffff04000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000079ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff6e00000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000ffffffffffffffffffffffffffff
-ffffffffffff0000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000000000ef
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff2f0000000000000000000000000000000000000000ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000ffffffffffffffffffffffffffffffff
-ffffffff00000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000ffffff
-ffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000c0ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff00000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000ffffff
-ffffffffffffffffffffffffffffffffff000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff00000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000ccffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000
-000000000000000000c0ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000ffffffffff
-ffffffffffffffffffffffffffffff0000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000ffffffffffffffffffffffffffffffffffffffffffff0000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff0000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000ffffffffffffffffffffffffffffffffffffffff00000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffdc00000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83
-00000000000000000000000000000000000000000000ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff00000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff00000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000ffffffffffffffffffffffffffffffffffffffff000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000ffffffffffffffffffffffffffffffff
-ffffffffffffb300000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffd200000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000ffffffffffffffffffffffffffffffff
-ffffffff00000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000fbffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff00000000000000000000000000000000000000000000006e
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff040000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000ffffffffffffffffffffffffffffffffffff
-ffff000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000ffffffffff
-ffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000e1ffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000ebffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000ffffffffff
-ffffffffffffffffffffffffffffff0000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff0000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000e6ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff57000000000000000000000000
-000000000000000000000000e6ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000ffffffffffffff
-ffffffffffffffffffffffffff00000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000ffffffffffffffffffffffffffffffffffffffffffffff000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff00000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000ffffffffffffffffffffffffffffffffffffffff000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffc00000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-00000000000000000000000000000000000000000000000000ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff00000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000e1ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000ffffffffffffffffffffffffffffffffffffffff0000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000ffffffffffffffffffffffffffffffffffff
-ffffffffffff0000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000057ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000ffffffffffffffffffffffffffffffffffff
-ffff000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000000000ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff20000000000000000000000000000000000000000000000000
-0000acffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffcc0000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff00000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffff
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000ffffffffffffff
-ffffffffffffffffffffffffffffffffff000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-6effffffffffffffffffffffffffffffffffffffffffffffffffffffff2f0000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000ffffffffffffff
-ffffffffffffffffffffffffff00000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000057ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff00000000000000000000000000
-000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000ffffffffffffffffff
-ffffffffffffffffffffff000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000ffffffffffffffffffffffffffffffffffffffffffffffffe1000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000ffffffffffffffffffffffffffffffffffffffff0000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffc0000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff2f00
-00000000000000000000000000000000000000000000000000000000ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff00000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000006effffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff0000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000ffffffffffffffffffffffffffffffffffffffff00000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff00000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff00000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000fffffffffffffffffffffffffffffffffffffff7
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000d7ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff00000000000000000000000000000000000000000000000000
-0000000000e1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff0000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000ffffffffffffffffffffffffffffffffffffffff0000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000ffffffffffffffffff
-ffffffffffffffffffffffffffffffff79000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffc00000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000ffffffffffffffffff
-ffffffffffffffffffffff000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff00000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff3d00000000000000000000000000
-000000000000000000000000000000000000ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff20000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000ffffffffffffffffffffff
-ffffffffffffffffff0000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000ffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000f3ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff0000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000ffffffffffffffffffffffffffffffffffffffff00000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff00000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000c6ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-0000000000000000000000000000000000000000000000000000000000004affffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff00000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000004ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffef00000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-ffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffff
-ffffffff57000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff00000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000ffffffffffffffffffffffffffffffffffffffff0000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff2000000000000000000000000000000000000000000000000000
-0000000000000000ebffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff0000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffe60000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000ffffffffffffffffffffffffffffffffffffffff00000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff00000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000ffffffffffffffffffffff
-ffffffffffffffffff0000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffff300000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000fbffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000
-000000000000000000000000000000000000000000ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff4a000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffcc000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000ffffffffffffffffffffffffff
-ffffffffffffff00000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffd200000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000095ffffffffffffffffffffffffffffffffffffffffffffffffffffffff2f
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff00000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-ffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff0000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-000000000000000000000000000000000000000000000000000000000000000000d2ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffe11200000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff04000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000ffff
-ffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff00000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff00000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000ffffffffffffffffffffffffffffffffffffffff00000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffd70000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000fbffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff0000000000000000000000000000000000000000000000000000
-0000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff5700000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000e1ffff
-ffffffffffffffffffffffffffffffffff120000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000ffffffffffffffffffffffffffffffffffffffff000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff00000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000008cffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000ffffffffffffffffffffffffff
-ffffffffffffff00000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff0000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff200000000000000000000000000000
-000000000000000000000000000000000000000000000063ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffa5000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000ffffffffffffffffffffffffffffffffffffffffff790000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000ffffffffffffffffffffffffffffff
-fffffffff3000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff9d00000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffcc000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000ffff
-fffffffffffffffffffffffffffffffffffb0000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffeb0000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000063ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00f3ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffb00000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000ffffffffffffffffffffffffffffffff
-ffffffffffffff00000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000ffffffff
-ffffffffffffffffffffffffffffff6e00000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff00000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000e6ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff00000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff00000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000ffffffffffffffffffffffffffffffffffffffef000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffb200000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000a5ffffffffff
-ffffffffffffffffffffffffffffffffffffffef000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000ffffffffffffffffffffffffffffffffffffff000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000ffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffff700000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000095ffffffffffffffffffffffffffffffff20000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000ffffffffffffffffffffffffffffff
-ffffffffd2000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff0000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000c6ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff2f00
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffba0000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000c6ffffffffffffffffffffffffffffffff
-ffff000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000063ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff7900000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000ffffffffffffffffffffffffff
-ffffffffff000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000ffffffff
-ffffffffffffffffffffffffffffff4a00000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000ebffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff9d0000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff3d000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000ffffffffff
-ffffffffffffffffffffffffff00000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff00000000000000000000000000000000000000000000000000000000000000
-0000000000000000000057ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff79000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000ffffff
-ffffffffffffffffffffffffffffffffffe10000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000ffffffffffffffffffffffffffffffffffffff000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000079ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffdc00000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000063ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000095ffffffffffffffffffffffffffffffff000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff00000000000000000000000000000000000000
-000000000000000000000000000000000000000000ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff0000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000a5ffffffffffffffffffffffffffffffffffffffffffff8c00000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000ffffffffffffffffffffffffffffffffff
-ffff000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffef0000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff0000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-e600000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000dcffffffffffffffffffffffffffff9500
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffe100000000000000
-0000000000000000000000000000000000000000000000000000000000000000ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000ffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000ffffffffffff
-ffffffffffffffffffffffffff00000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000c6ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000002fffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff3d000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff4a000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000009dffffffff
-ffffffffffffffff120000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff00000000000000000000000000000000000000000000000000000000000000
-0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffa5000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000ffffffffffffffffffffffffffffffffffe60000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff00000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000efffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9d0000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000009dffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000e6fffffffffffffff7630000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000020ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff00000000000000000000000000000000000000
-000000000000000000000000000000000000dcffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff0000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdc00
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000ffffffffffffffffffffffffffffffff00
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000d7ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff0000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000000000ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff00000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000f3ff200000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000
-0000000000000000000000000000000000000000000000000000000000ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000acffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff8c0000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000ffffffffffff
-ffffffffffffffffff8c00000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff570000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000004affffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff4a00000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffac000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000ffffffff0000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000000000000000000000000000000000000000000000000000000000
-0000000000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffb00
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff0400000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000ffffffffffffffffffffffffff3d000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000008cffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff00000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8c
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000ffff
-ffffffffff000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffe6000000000000000000000000000000000000
-00000000000000000000000000000000ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff2f00000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000000000ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000020ffffffffffffffffff4a000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff0000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000d2ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffe100000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff00000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000ffffffffffffffffc60000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000d2ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff8c000000000000
-000000000000000000000000000000000000000000000000000000ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffac0000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000dc9d00000000000000002f12
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-004affffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff0000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffff7000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffcc000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000004affffffffffffffffffff6e00000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff830000000000000000000000000000000000000000000000000000000000
-000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000000000ff
-ffff3d0000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffd70000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff0000000000000000000000000000000000000000000000000000000000
-000000000000000000000000c6ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff3d000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff630000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000ffffffffff
-ffffffffffffffff200000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffa50000000000000000000000000000000000
-0000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffc000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000efffffffffff1200000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff7900000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000
-00000000000000000000000000000000000000000000a5ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffba0000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff00000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000ffffffffffffffffffffffffffffff0000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff790000000000
-00000000000000000000000000000000000000000000000000ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffd70000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000ffffffffffffffff00000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000000004ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff0000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000
-0000000000000000000000000000000000000000000000000000000000000000a5ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd200000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000baffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffb000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000fbffffffffffffffffffffffffffffffffd700
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff7900000000000000000000000000000000000000000000000000000000
-00ffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9500000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000ffffffff
-ffffffffffff0000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000000000ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff0000000000000000000000000000000000000000000000000000000000
-000000000000004affffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff0000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-9d00000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000ffffffffffffffff
-ffffffffffffffffffffffcc0000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000c0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff8300000000000000000000000000000000
-000000000000000000000000efffffffffffffffffffffffffffffffffffffffffffff
-ffffffff00000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000ffffffffffffffffffffffffe100000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff00000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff000000000000000000000000000000000000
-00000000000000000000000000000000002fffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff83000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff00000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000f3ffffffffffffffffffffffffffffffffffffffffff6e00000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb300000000
-000000000000000000000000000000000000000000000000ffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000000000ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffe60000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000ffffffffffffffffffffffffffffc0000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000b3ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff00000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000
-00000000000000000000000000000000000000000000000000000020ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-e100000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000e1ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffcc000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffff
-ffff000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000f7ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffa5000000000000000000000000000000000000000000000000000000
-ffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000002fffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000dcffffffffffffff
-ffffffffffffffffff9d00000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000000000000000000000000000000000000000000000000000000000
-000057ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000004ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff7900000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffe60000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000
-000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffff
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000002fffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff040000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000ffffffffffffffffffffffffffffffffffffff00000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000079ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff000000000000000000000000000000000000
-000000000000000000000000a5ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff4a00000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff00000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000ffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffff300000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-0000000000000000000000000000000000000000000000ffffffffffffffffffffffff
-ffffffffffffffffffffba000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000dcffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000e1ffffffffffffffffffffffffffffffffffffffffa5
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff200000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000
-00000000000000000000000000000000000000000000efffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff8c0000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffac0000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000ccffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff9d00000000000000000000000000000000000000000000000000
-ffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffe6000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000ffffffffffffffffffffff
-ffffffffffffffffffffffffe100000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000020ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6e0000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000000000000000000000000000000000000000000000000000efffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffd700000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000004ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff9500000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff0400000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffff300000000000000000000000000
-000000000000000000000000ffffffffffffffffffffffffffffffffffffff00000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000083ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff9d0000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000000000ff
-ffffffffffffffffffffffffffffffffffffffffffffffffff8c000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffc000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000e6ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff00000000000000000000000000000000000000
-00000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff120000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000079ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff12000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-000000000000000000000000000000000000000000000000ffffffffffffffffffffff
-ffffffffffd20000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000d7ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff2f00000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000083ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff6e00000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000d7ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffeb00000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000020ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000
-0000000000000000000000000000000000ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff3d000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000d2ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000f3ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffeb0000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffba0000000000000000000000000000000000000000000000
-002fffffffffffffffffffffffffff0000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff00000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000000000ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff0000000000000000000000000000000000000000000000ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffcc0000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffdc00000000000000000000000000000000000000000000000000
-0000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffba00000000000000000000000000
-00000000000000000000000000000000000000000000000000000000f3ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff1200000000000000000000
-000000000000000000000000000000ffffffffffffffffff0000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000e1ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffe60000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000003dffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffeb00000000000000000000000000000000000000
-009dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff120000000000000000000000000000000000000000000000000000000000000000
-00000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff2f000000000000000000000000
-000000000000000000000000000000000000000000000000ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff57
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000f3ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000baffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff3d00000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000baffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffd700000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000dcffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff630000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000e6ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000
-0000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffdc00000000000000000000000000000000000000
-00000000000000000000000000000000dcffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-00000000000000000000000000000000000000000000000000000000000000000000ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff0000000000000000000000000000000000000000000000
-00000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000008cffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff9d000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000063ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff30000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffb0000000000000000000000000000000000ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe63d00000000
-00000000000000000000000000000000000000000000000063ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff63000000000000000000000000000000000000000000
-0000000000000000d2ffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffff700000000000000000000
-0000000000000000000000000000000000000000000000ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff1200000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000000000ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffa50000000000000000000000000000
-000000000000000000000000000000000000000000000000008cffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff570000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000008cffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff00000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000020ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff000000000000000000000000000000acffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffb6e00000000000000000000000000000000000000000083ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffdc0000000000000000
-0000000000000000000000000000000000a5ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff2000000000000000000000000000000000000000000000000000000000a5ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9500
-0000000000000000000000000000000000000000000000000000000000000000000000
-a5ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff00000000000000000000000000000000000000000000000000
-0000000000000000000000000000acffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff6e000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000002fffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffb30000000000000000
-0000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffe18c3d000000000000
-000457baffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffff78c00000000000000000000000000000000000020ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff790000000000000000000000000000000000
-000000000000ccffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff000000000000000000000000000000000000000000000000
-00000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000
-000000000000000000000000000000000000000000000000e1ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000003dffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff8300000000000000000000006effffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffc62f00000000000000000004a5ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0000000
-00000000000000000000000000006effffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff20000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000004affffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff7900000000000000000000
-0000000000000000000000000000000000000012ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-cc000000000000000000000000000000000000000000000000000000000000000000ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffc000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffef000000000000000000000000ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffb6e00000000000020638cebffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffc600000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000000000e6
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffff70000000000000000000000000000000000000000000000000000f7ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff630000000000000000000000000000000000000000
-0000000000000000d2ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00008cffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff79000000000000000000000000c6ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff6e0000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000baffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff790000000000000000000000000000000000
-00004affffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffb57000000000000
-0000000000000000000000000000000000b3ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffb0000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000dcffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffc6000000000000
-0000000000000020ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff790000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000009dffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc04a00
-0000000000000000004ad2ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffeb57000000000000000000000000000000004affffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffb300000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000008cffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-dc00000000000000000000000000000000ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffff3200000000000000000000000000000000000
-000000000000000000000000000000000000000000004ae1ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffba4a1200000000005795d7ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000b3ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff9d0000000000000000000000000000000000b3ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0120000
-00000000000000000000000000000000000000000000000000000000008cdcffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff0000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000009dffffffffffffffff
-ffffffffffffffffffffffffffeb200000000000000000000000000000000000000000
-4affffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffb3200000000000000000000000000000000000001257
-a5ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffeb00000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000002fa54a0412000000000000000000000000000000000000
-0000000000000000006effffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff3000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000057ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffe600000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000083ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffe1000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00d7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff4a000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000e6ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffa50000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000003dffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffe100000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000dcffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff9500000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-ccffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff950000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000ccffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff74a
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000004d2ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffff3a5000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000063ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0200000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000a5ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffff76e000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-004accffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffefa5040000000000
-0000000000000000000000000000000000000000000000000000000000000000000000
-0000000000002095f3ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffe6d2a56e0000000000000000000000000000000000000000
-000000000000004a799dc6e6fbffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-baffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff
-grestore
-
-cleartomark
-countdictstack exch sub { end } repeat
-restore grestore
-%
-% End Imported PIC File: /home/valette/ev-perso-doc/canon.eps
-%%EndDocument
-%
-% Polyline
-n 450 1530 m 8685 1530 l 8685 1575 l gs col0 s gr
-% Polyline
-n 450 2025 m 8685 2025 l 8685 2070 l gs col0 s gr
-% Polyline
-n 2970 1530 m 2970 2025 l gs col0 s gr
-/Times-Bold ff 210.00 scf sf
-585 1845 m
-gs 1 -1 sc (Project : ) col0 sh gr
-/Times-Bold ff 210.00 scf sf
-3060 1845 m
-gs 1 -1 sc (Document title : ) col0 sh gr
-% Polyline
-n 450 10305 m 8685 10305 l 8685 10350 l gs col0 s gr
-% Polyline
-n 450 45 m 8685 45 l 8685 11025 l 450 11025 l cp gs col0 s gr
-/Times-Roman ff 210.00 scf sf
-4500 4275 m
-gs 1 -1 sc (Tools project Leader) col0 sh gr
-/Times-Roman ff 210.00 scf sf
-4770 4635 m
-gs 1 -1 sc (TA) col0 sh gr
-/Times-Roman ff 210.00 scf sf
-1350 4275 m
-gs 1 -1 sc (E. Valette) col0 sh gr
-/Times-Roman ff 210.00 scf sf
-4725 6210 m
-gs 1 -1 sc (TA) col0 sh gr
-/Times-Roman ff 210.00 scf sf
-1620 6210 m
-gs 1 -1 sc (CRF) col0 sh gr
-/Times-Roman ff 210.00 scf sf
-1305 5850 m
-gs 1 -1 sc (E. Valette) col0 sh gr
-/Times-Roman ff 210.00 scf sf
-4410 5850 m
-gs 1 -1 sc (Tools project Leader) col0 sh gr
-/Times-Roman ff 210.00 scf sf
-1620 4635 m
-gs 1 -1 sc (CRF) col0 sh gr
-/Times-Roman ff 210.00 scf sf
-495 7965 m
-gs 1 -1 sc (H. Dias) col0 sh gr
-/Times-Roman ff 210.00 scf sf
-495 8280 m
-gs 1 -1 sc (E. Valette) col0 sh gr
-/Times-Roman ff 210.00 scf sf
-495 8595 m
-gs 1 -1 sc (E. Raguet) col0 sh gr
-/Times-Roman ff 210.00 scf sf
-3240 7965 m
-gs 1 -1 sc (TA) col0 sh gr
-/Times-Roman ff 210.00 scf sf
-3240 8595 m
-gs 1 -1 sc (TA) col0 sh gr
-/Times-Roman ff 210.00 scf sf
-6030 8595 m
-gs 1 -1 sc (Author) col0 sh gr
-/Times-Roman ff 210.00 scf sf
-3240 8280 m
-gs 1 -1 sc (TA) col0 sh gr
-/Times-Roman ff 210.00 scf sf
-4590 8280 m
-gs 1 -1 sc (Project Leader) col0 sh gr
-/Times-Roman ff 210.00 scf sf
-4590 7965 m
-gs 1 -1 sc (Manager) col0 sh gr
-/Times-Roman ff 210.00 scf sf
-4590 8595 m
-gs 1 -1 sc (Engineer) col0 sh gr
-/Times-Roman ff 210.00 scf sf
-6030 8280 m
-gs 1 -1 sc (Approval) col0 sh gr
-/Times-Roman ff 210.00 scf sf
-7650 7965 m
-gs 1 -1 sc (1 \(Paper\)) col0 sh gr
-/Times-Roman ff 210.00 scf sf
-7650 8280 m
-gs 1 -1 sc (2 \(Paper\)) col0 sh gr
-/Times-Roman ff 210.00 scf sf
-7650 8595 m
-gs 1 -1 sc (3 \(Paper\)) col0 sh gr
-/Times-Roman ff 210.00 scf sf
-3690 3375 m
-gs 1 -1 sc (98.TA.0373.M.ER) col0 sh gr
-/Times-Roman ff 210.00 scf sf
-6030 7965 m
-gs 1 -1 sc (Info) col0 sh gr
-/Times-Roman ff 270.00 scf sf
-1530 1845 m
-gs 1 -1 sc (TOOLS ) col0 sh gr
-/Times-Roman ff 210.00 scf sf
-1800 2340 m
-gs 1 -1 sc (29/09/98) col0 sh gr
-/Times-Roman ff 210.00 scf sf
-1665 2835 m
-gs 1 -1 sc (Emmanuel RAGUET, Eric VALETTE CRF TA Dept. ) col0 sh gr
-/Times-Roman ff 210.00 scf sf
-7470 2340 m
-gs 1 -1 sc (2.0) col0 sh gr
-/Times-Roman ff 210.00 scf sf
-4905 2340 m
-gs 1 -1 sc (02/11/98) col0 sh gr
-/Times-Roman ff 210.00 scf sf
-4725 1845 m
-gs 1 -1 sc (RTEMS Remote Debugger Server Specs) col0 sh gr
-$F2psEnd
-rs
diff --git a/doc/rgdb_specs/garde.pdf b/doc/rgdb_specs/garde.pdf
deleted file mode 100644
index 62df59d4e5..0000000000
--- a/doc/rgdb_specs/garde.pdf
+++ /dev/null
Binary files differ
diff --git a/doc/rgdb_specs/gdbinternals.t b/doc/rgdb_specs/gdbinternals.t
deleted file mode 100644
index 947130155a..0000000000
--- a/doc/rgdb_specs/gdbinternals.t
+++ /dev/null
@@ -1,309 +0,0 @@
-@c
-@c RTEMS Remote Debugger Server Specifications
-@c
-@c Written by: Eric Valette <valette@crf.canon.fr>
-@c Emmanuel Raguet <raguet@crf.canon.fr>
-@c
-@c
-@c $Id$
-@c
-
-@chapter A Rapid Tour of GDB Internals
-
-To help the reader to understand what needs to be implemented, we
-will present briefly how GDB works regardless if the target is local or remote.
-A debugger is a tool which enables control of the execution of software on a
-target system. In most of cases, the debugger connects to a target system, attaches
-a process, inserts breakpoints and resumes execution. Then the normal execution
-is completely events driven (process execution stopped due to a breakpoint,
-process fault, single-step,...) coming from the debuggee. It can also directly
-access some parts of the target processor context (registers, data memory, code
-memory,...) and change their content. Native GDB debugger can just be seen as
-special cases where the host and the target are on the same machine and GDB
-can directly access the target system debug API.
-
-
-In our case, the host and the target are not on the same machine and
-an Ethernet link is used to communicate between the different machines. Because
-GDB needs to be able to support various targets (including Unix core file, ...),
-each action that needs to be performed on the debuggee is materialized by a
-field of the following @emph{targets_op}s structure :
-
-@example
-struct target_ops
-@{
- char *to_shortname; /* Name this target type */
- char *to_longname; /* Name for printing */
- char *to_doc; /* Documentation. Does not include trailing
- newline, and starts with a one-line
- description (probably similar to
- to_longname). */
- void (*to_open) PARAMS ((char *, int));
- void (*to_close) PARAMS ((int));
- void (*to_attach) PARAMS ((char *, int));
- void (*to_detach) PARAMS ((char *, int));
- void (*to_resume) PARAMS ((int, int, enum target_signal));
- int (*to_wait) PARAMS ((int, struct target_waitstatus *));
- void (*to_fetch_registers) PARAMS ((int));
- void (*to_store_registers) PARAMS ((int));
- void (*to_prepare_to_store) PARAMS ((void));
-
- /* Transfer LEN bytes of memory between GDB address MYADDR and
- target address MEMADDR. If WRITE, transfer them to the target,
- else transfer them from the target. TARGET is the target from
- which we get this function.
-
- Return value, N, is one of the following:
-
- 0 means that we can't handle this. If errno has been set,
- it is the error which prevented us from doing it (FIXME:
- What about bfd_error?).
-
- positive (call it N) means that we have transferred N bytes
- starting at MEMADDR. We might be able to handle more bytes
- beyond this length, but no promises.
-
- negative (call its absolute value N) means that we cannot
- transfer right at MEMADDR, but we could transfer at least
- something at MEMADDR + N. */
-
- int (*to_xfer_memory)
- PARAMS ((CORE_ADDR memaddr, char *myaddr,
- int len, int write,
- struct target_ops * target));
-
- void (*to_files_info) PARAMS ((struct target_ops *));
- int (*to_insert_breakpoint) PARAMS ((CORE_ADDR, char *));
- int (*to_remove_breakpoint) PARAMS ((CORE_ADDR, char *));
- void (*to_terminal_init) PARAMS ((void));
- void (*to_terminal_inferior) PARAMS ((void));
- void (*to_terminal_ours_for_output) PARAMS ((void));
- void (*to_terminal_ours) PARAMS ((void));
- void (*to_terminal_info) PARAMS ((char *, int));
- void (*to_kill) PARAMS ((void));
- void (*to_load) PARAMS ((char *, int));
- int (*to_lookup_symbol) PARAMS ((char *, CORE_ADDR *));
- void (*to_create_inferior) PARAMS ((char *, char *, char **));
- void (*to_mourn_inferior) PARAMS ((void));
- int (*to_can_run) PARAMS ((void));
- void (*to_notice_signals) PARAMS ((int pid));
- int (*to_thread_alive) PARAMS ((int pid));
- void (*to_stop) PARAMS ((void));
- enum strata to_stratum;
- struct target_ops
- *DONT_USE; /* formerly to_next */
- int to_has_all_memory;
- int to_has_memory;
- int to_has_stack;
- int to_has_registers;
- int to_has_execution;
- struct section_table
- *to_sections;
- struct section_table
- *to_sections_end;
- int to_magic;
- /* Need sub-structure for target machine related rather than comm related? */
-@};
-@end example
-
-This structure contains pointers to functions (in C++, this would
-be called a virtual class). Each different target supported by GDB has its own
-structure with the relevant implementation of the functions (some functions
-may be not implemented). When a user connects GDB to a target via the ``target''
-command, GDB points to the structure corresponding to this target. Then the
-user can attache GDB to a specific task via the ``attach'' command. We have
-therefore identified two steps to begin a remote debug session :
-
-@enumerate
-@item the choice of the target type (in our case RTEMS),
-@item the choice of what to debug (entire system, specific task,...),
-@end enumerate
-Note that in the case of natives debugger, the choice of the target is implicitly
-performed by commands like @b{run}, @b{attach}, @b{detach}. Several
-figures will now be described showing the main steps of a debug session.
-
-@c XXX figure reference
-Figure @b{Debug session initialization} explains how the debugger connects to the target
-:
-
-@enumerate
-@item The debugger opens a connection to the target. The word ``connection''
-doesn't only mean Ethernet or serial link connection but all the ways by which
-a process can communicate with another one (direct function call, messages mailbox,
-...),
-@item The targets checks if it can accept or reject this connection,
-@item If the connection is accepted, the host ``attaches'' the process,
-@item the target stops the process, notifies a child's stop to the host
-and waits for command,
-@item the host can ask information about the debugged process (name, registers,...)
-or perform some action like setting breakpoints, ...
-@end enumerate
-
-@c XXX figure reference
-Figure @b{Breakpoint and process execution} explains how the debugger manages the
-breakpoints and controls the execution of a process :
-
-@enumerate
-@item The host asks the debuggee what is the opcode at the concerned address
-in order for GDB to memorize this instruction,
-@item the host sends a CONTINUE command : it asks the target to write the
-``DEBUG'' opcode (for example, the INTEL ``DEBUG'' opcode is INT3 which
-generate a breakpoint trap) instead of the debugged opcode.
-@item then the host waits for events,
-@item after the change of instruction, the target resumes the execution
-of the debuggee,
-@item when the ``DEBUG'' opcode is executed, the breakpoint exception
-handler is executed and it notifies the host that the process is stopped. Then
-it waits for commands (if no command is sent after a certain amount of time,
-the connection will be closed by the target).
-@item the host asks the target to re-write the right opcode instead of the
-''DEBUG'' opcode and then can ask information
-@end enumerate
-
-@c XXX figure reference
-Figure @b{Breakpoint and process execution} also shows the case of other ``CONTINUE''
-commands (remember that the ``DEBUG'' opcode has been replaced by the right
-instruction):
-
-@enumerate
-@item Host sends first a ``single step'' command to execute the debugged
-instruction,
-@item It then waits for ``single step`` exception event,
-@item the target, once the single step executed, calls the debug exception
-handler. It notifies the host that execution is suspended and wait for commands.
-@item the host asks the target to re-write the ``DEBUG'' opcode (breakpoint
-trap) instead of the debugged one.
-@item then the host sends a ``CONTINUE'' command in order the target to
-resume the process execution to the next breakpoint.
-@end enumerate
-
-@c XXX figure reference
-Figure @b{Detach a process and close a connection} explains how the debugger disconnects from
-a target :
-
-@enumerate
-@item the host sends a detach command to the target.
-@item the target detaches the concerned process, notifies the detachment
-and resumes the process execution.
-@item once notified, the host sends a close connection command.
-@item the target closes the connection.
-@end enumerate
-These 3 examples show that the mains actions that are performed by
-the host debugger on the target are only simple actions which look like :
-
-@itemize @bullet
-@item read/write code,
-@item read/write data,
-@item read/write registers,
-@item manage exceptions,
-@item send/receive messages to/from the host.
-@end itemize
-
-
-@c
-@c Debug session initialization Figure
-@c
-
-@ifset use-ascii
-@example
-@group
-XXXXX reference it in the previous paragraph
-XXXXX insert seqinit.eps
-XXXXX Caption Debug session initialization
-@end group
-@end example
-@end ifset
-
-@ifset use-tex
-@example
-@group
-@c XXXXX reference it in the previous paragraph
-@c XXXXX insert seqinit.eps
-@c XXXXX Caption Debug session initialization
-@end group
-@end example
-@page
-@image{seqinit}
-@end ifset
-
-
-@ifset use-html
-@c <IMG SRC="seqinit.jpg" WIDTH=500 HEIGHT=600 ALT="Debug session initialization">
-@html
-<IMG SRC="seqinit.jpg" ALT="Debug session initialization">
-@end html
-@end ifset
-
-
-@c
-@c Breakpoint and process execution Figure
-@c
-
-@ifset use-ascii
-@example
-@group
-XXXXX reference it in the previous paragraph
-XXXXX insert seqbreak.eps
-XXXXX Caption Breakpoint and process execution
-@end group
-@end example
-@end ifset
-
-@ifset use-tex
-@example
-@group
-@c XXXXX reference it in the previous paragraph
-@c XXXXX insert seqbreak.eps
-@c XXXXX Caption Breakpoint and process execution
-@end group
-@end example
-@page
-@sp 5
-@image{seqbreak,,9in}
-@end ifset
-
-@ifset use-html
-@c <IMG SRC="seqbreak.jpg" WIDTH=500 HEIGHT=600 ALT="Breakpoint and process execution">
-@html
-<IMG SRC="seqbreak.jpg" ALT="Breakpoint and process execution">
-@end html
-@end ifset
-
-
-
-@c
-@c Detach a process and close a connection Figure
-@c
-
-@ifset use-ascii
-@example
-@group
-XXXXX reference it in the previous paragraph
-XXXXX insert seqdetach.eps
-XXXXX Caption Detach a process and close a connection
-@end group
-@end example
-@end ifset
-
-@ifset use-tex
-@example
-@group
-@c XXXXX reference it in the previous paragraph
-@c XXXXX insert seqdetach.eps
-@c XXXXX Caption Detach a process and close a connection
-@end group
-@end example
-@sp 10
-@image{seqdetach}
-@end ifset
-
-@ifset use-html
-@c <IMG SRC="seqdetach.jpg" WIDTH=500 HEIGHT=600 ALT="Detach a process and close a connection">
-@html
-<IMG SRC="seqdetach.jpg" ALT="Detach a process and close a connection">
-@end html
-@end ifset
-
-
-
-
diff --git a/doc/rgdb_specs/interfacing.t b/doc/rgdb_specs/interfacing.t
deleted file mode 100644
index f10ccdf5e0..0000000000
--- a/doc/rgdb_specs/interfacing.t
+++ /dev/null
@@ -1,79 +0,0 @@
-@c
-@c RTEMS Remote Debugger Server Specifications
-@c
-@c Written by: Eric Valette <valette@crf.canon.fr>
-@c Emmanuel Raguet <raguet@crf.canon.fr>
-@c
-@c
-@c $Id$
-@c
-
-@chapter Interfacing GDB with RTEMS as a Target
-
-@c XXX figure reference
-So, basically, porting GDB to RTEMS environment requires implementing
-the functions contained in the target_ops structure. The native debugger implementation
-(where the host machine is also the target one) uses direct function calls.
-For our needs (remote debugging), these functions must be implemented to support
-the encapsulation in UDP/IP layers and communications between different types
-of host machines : the best solution is use the SUN Remote Procedure Calls API
-(SUN RPC). This SUN RPC module will be explained below (see paragraph @b{Communication with GDB}).
-
-We can note that the functions described in the target_ops structure
-are high-level functions. The main reason is that GDB was designed in order
-to be able to use monitor firmware as a debug server. In the case of a Unix
-OS target, these high-level functions are implemented themselves using a lower
-level POSIX API. Because we want to simplify the code running on the target
-and decrease its size of this code, we propose to use the POSIX layer API used
-for the debug like @b{waitpid}, @b{ptrace}, ... Due to the GDB working
-mode and due to our requirements, we can establish here a non-exhaustive list
-of some commands required to implement the previously described functions :
-
-@itemize @bullet
-@item set up a connection with a target,
-@item close a connection,
-@item send a signal to the specified process,
-@item get a list of process/thread/connection running,
-@item control process under debug,
-@item ...
-@end itemize
-Control means that, with this function, we can read, write the memory
-of the debuggee, insert breakpoint to stop the process and resume the process
-execution. This command can be implemented by emulating in the RTEMS environment
-a Unix function called ``ptrace''. This function allows the control of a child
-process. The ``ptrace'' function has some sub-functions which are described
-below (some of these actions and standardized, the others are added due to our
-needs) :
-
-@itemize @bullet
-@item PTRACE_PEEKTEXT, PTRACE_PEEKDATA : read word at address,
-@item PTRACE_POKETEXT, PTRACE_POKEDATA :write word at address,
-@item PTRACE_CONT : restart after signal,
-@item PTRACE_KILL : send the child a SIGKILL to make it exit,
-@item PTRACE_SINGLESTEP : set the trap flag for single stepping,
-@item PTRACE_ATTACH : attach to the process specified,
-@item PTRACE_DETACH : detach a process that was previously attached.
-@end itemize
-This list only contains the command that are described in the ptrace
-Unix manpage. For some specific needs (debug of one task among several ones,
-register read/write,...), it is possible to create some special ptrace commands
-as described after :
-
-@itemize @bullet
-@item get current task registers,
-@item set current task registers,
-@item list of the threads,
-@item identifier of the target thread,
-@item restart to address,
-@item set breakpoint at address,
-@item clear breakpoint,
-@item get breakpoints,
-@item load dynamically a task,
-@item ...
-@end itemize
-This list is not exhaustive and can be increased due to the needs.
-All the described functions will not be implemented in a first version, only
-the strictly needed. If some commands are added, the modifications must be implemented
-both in RTEMS and in GDB.
-
-
diff --git a/doc/rgdb_specs/intro.t b/doc/rgdb_specs/intro.t
deleted file mode 100644
index 5490eefa51..0000000000
--- a/doc/rgdb_specs/intro.t
+++ /dev/null
@@ -1,39 +0,0 @@
-@c
-@c RTEMS Remote Debugger Server Specifications
-@c
-@c Written by: Eric Valette <valette@crf.canon.fr>
-@c Emmanuel Raguet <raguet@crf.canon.fr>
-@c
-@c
-@c $Id$
-@c
-
-@chapter Introduction
-
-The TOOLS project aims to provide a complete development environment
-for RTEMS OS. This environment must be as close as possible to the Chorus one
-(gnu compiler, gnu linker, gnu debugger, ...), because it is currently the OS
-which is the most used at CRF and we want to simplify the migration path from
-the ChorusOs environment to the RTEMS environment. One important item of this
-development environment is the remote debugger which allows the developer to
-debug his software on a target machine from a host machine via a communication
-link (Ethernet, serial link, ...).
-
-
-The choice of GDB as debugger has been made with because in CRF, every
-developer, which uses the ChorusOs development environment, debugs his software
-using the remote debugging functionality of GDB. Providing a remote GDB debug
-server running on RTEMS, will enable the developers to use transparently the
-same debugger for a different RTOS. Another reason for the choice of GDB is
-its constant evolution, and that it can be interfaced with graphic user interfaces
-like DDD providing a very powerfull debugging environment.
-
-
-The subject of this document is to explain how GDB works and the way
-to implement a daemon on RTEMS that will be used as a debugger server for a
-GDB client. We will call this daemon Rtems GDB Debug Server Daemon (RGDBSD).
-We aim to provide this debugger running at least on 2 host systems : Linux 2.x
-and Solaris 2.5.1 as they are the two platforms used for developing Chorus applications
-today.
-
-
diff --git a/doc/rgdb_specs/layers.eps b/doc/rgdb_specs/layers.eps
deleted file mode 100644
index e3427f67eb..0000000000
--- a/doc/rgdb_specs/layers.eps
+++ /dev/null
@@ -1,359 +0,0 @@
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: layers.eps
-%%Creator: fig2dev Version 3.2 Patchlevel 0-beta3
-%%CreationDate: Mon Oct 5 16:01:44 1998
-%%For: raguet@genesis (Emmanuel Raguet)
-%%Orientation: Portrait
-%%BoundingBox: 0 0 445 609
-%%Pages: 0
-%%BeginSetup
-%%EndSetup
-%%Magnification: 1.0000
-%%EndComments
-/$F2psDict 200 dict def
-$F2psDict begin
-$F2psDict /mtrx matrix put
-/col-1 {0 setgray} bind def
-/col0 {0.000 0.000 0.000 srgb} bind def
-/col1 {0.000 0.000 1.000 srgb} bind def
-/col2 {0.000 1.000 0.000 srgb} bind def
-/col3 {0.000 1.000 1.000 srgb} bind def
-/col4 {1.000 0.000 0.000 srgb} bind def
-/col5 {1.000 0.000 1.000 srgb} bind def
-/col6 {1.000 1.000 0.000 srgb} bind def
-/col7 {1.000 1.000 1.000 srgb} bind def
-/col8 {0.000 0.000 0.560 srgb} bind def
-/col9 {0.000 0.000 0.690 srgb} bind def
-/col10 {0.000 0.000 0.820 srgb} bind def
-/col11 {0.530 0.810 1.000 srgb} bind def
-/col12 {0.000 0.560 0.000 srgb} bind def
-/col13 {0.000 0.690 0.000 srgb} bind def
-/col14 {0.000 0.820 0.000 srgb} bind def
-/col15 {0.000 0.560 0.560 srgb} bind def
-/col16 {0.000 0.690 0.690 srgb} bind def
-/col17 {0.000 0.820 0.820 srgb} bind def
-/col18 {0.560 0.000 0.000 srgb} bind def
-/col19 {0.690 0.000 0.000 srgb} bind def
-/col20 {0.820 0.000 0.000 srgb} bind def
-/col21 {0.560 0.000 0.560 srgb} bind def
-/col22 {0.690 0.000 0.690 srgb} bind def
-/col23 {0.820 0.000 0.820 srgb} bind def
-/col24 {0.500 0.190 0.000 srgb} bind def
-/col25 {0.630 0.250 0.000 srgb} bind def
-/col26 {0.750 0.380 0.000 srgb} bind def
-/col27 {1.000 0.500 0.500 srgb} bind def
-/col28 {1.000 0.630 0.630 srgb} bind def
-/col29 {1.000 0.750 0.750 srgb} bind def
-/col30 {1.000 0.880 0.880 srgb} bind def
-/col31 {1.000 0.840 0.000 srgb} bind def
-
-end
-save
--51.0 635.0 translate
-1 -1 scale
-
-/cp {closepath} bind def
-/ef {eofill} bind def
-/gr {grestore} bind def
-/gs {gsave} bind def
-/sa {save} bind def
-/rs {restore} bind def
-/l {lineto} bind def
-/m {moveto} bind def
-/rm {rmoveto} bind def
-/n {newpath} bind def
-/s {stroke} bind def
-/sh {show} bind def
-/slc {setlinecap} bind def
-/slj {setlinejoin} bind def
-/slw {setlinewidth} bind def
-/srgb {setrgbcolor} bind def
-/rot {rotate} bind def
-/sc {scale} bind def
-/sd {setdash} bind def
-/ff {findfont} bind def
-/sf {setfont} bind def
-/scf {scalefont} bind def
-/sw {stringwidth} bind def
-/tr {translate} bind def
-/tnt {dup dup currentrgbcolor
- 4 -2 roll dup 1 exch sub 3 -1 roll mul add
- 4 -2 roll dup 1 exch sub 3 -1 roll mul add
- 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
- bind def
-/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
- 4 -2 roll mul srgb} bind def
-/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
-/$F2psEnd {$F2psEnteredState restore end} def
-%%EndProlog
-
-$F2psBegin
-10 setmiterlimit
-n -1000 11576 m -1000 -1000 l 9251 -1000 l 9251 11576 l cp clip
- 0.06000 0.06000 sc
-% Polyline
-7.500 slw
- [60] 0 sd
-gs clippath
-4530 2904 m 4500 3048 l 4470 2904 l 4470 3090 l 4530 3090 l cp
-clip
-n 5325 2100 m 5324 2101 l 5321 2104 l 5313 2111 l 5302 2121 l 5290 2133 l
- 5278 2143 l 5267 2153 l 5257 2161 l 5248 2168 l 5238 2175 l
- 5229 2181 l 5219 2187 l 5209 2193 l 5198 2199 l 5186 2205 l
- 5173 2211 l 5161 2216 l 5148 2222 l 5135 2227 l 5123 2231 l
- 5112 2234 l 5100 2238 l 5088 2240 l 5077 2242 l 5064 2244 l
- 5051 2246 l 5037 2247 l 5023 2248 l 5009 2249 l 4994 2249 l
- 4980 2250 l 4966 2250 l 4952 2250 l 4938 2250 l 4923 2250 l
- 4908 2250 l 4891 2250 l 4874 2250 l 4857 2250 l 4839 2250 l
- 4822 2250 l 4805 2250 l 4790 2250 l 4775 2250 l 4762 2250 l
- 4750 2250 l 4737 2250 l 4724 2250 l 4712 2250 l 4701 2251 l
- 4689 2252 l 4678 2253 l 4668 2255 l 4658 2257 l 4648 2259 l
- 4638 2263 l 4627 2266 l 4615 2271 l 4603 2277 l 4590 2283 l
- 4577 2291 l 4564 2299 l 4552 2308 l 4542 2318 l 4533 2327 l
- 4525 2338 l 4520 2345 l 4516 2353 l 4513 2363 l 4510 2373 l
- 4507 2385 l 4505 2398 l 4503 2412 l 4502 2428 l 4501 2445 l
- 4501 2464 l 4500 2483 l 4500 2504 l 4500 2526 l 4500 2550 l
- 4500 2566 l 4500 2583 l 4500 2602 l 4500 2622 l 4500 2644 l
- 4500 2668 l 4500 2695 l 4500 2724 l 4500 2756 l 4500 2790 l
- 4500 2826 l 4500 2864 l 4500 2903 l 4500 2940 l 4500 2975 l
- 4500 3006 l 4500 3032 l 4500 3075 l gs col0 s gr gr
- [] 0 sd
-% arrowhead
-n 4530 2904 m 4500 3048 l 4470 2904 l 4500 2928 l 4530 2904 l cp gs 0.00 setgray ef gr col0 s
-% Polyline
- [60] 0 sd
-gs clippath
-6180 2904 m 6150 3048 l 6120 2904 l 6120 3090 l 6180 3090 l cp
-clip
-n 5325 2100 m 5326 2101 l 5329 2104 l 5337 2111 l 5348 2121 l 5360 2133 l
- 5372 2143 l 5383 2153 l 5393 2161 l 5402 2168 l 5413 2175 l
- 5421 2181 l 5431 2187 l 5441 2193 l 5452 2199 l 5464 2205 l
- 5477 2211 l 5489 2216 l 5502 2222 l 5515 2227 l 5527 2231 l
- 5538 2234 l 5550 2238 l 5562 2240 l 5573 2242 l 5586 2244 l
- 5599 2246 l 5613 2247 l 5627 2248 l 5641 2249 l 5656 2249 l
- 5670 2250 l 5684 2250 l 5698 2250 l 5713 2250 l 5727 2250 l
- 5742 2250 l 5759 2250 l 5776 2250 l 5793 2250 l 5811 2250 l
- 5828 2250 l 5845 2250 l 5860 2250 l 5875 2250 l 5888 2250 l
- 5900 2250 l 5913 2250 l 5926 2250 l 5938 2250 l 5949 2251 l
- 5961 2252 l 5972 2253 l 5982 2255 l 5992 2257 l 6002 2259 l
- 6013 2263 l 6023 2266 l 6035 2271 l 6047 2277 l 6060 2283 l
- 6073 2291 l 6086 2299 l 6098 2308 l 6108 2318 l 6117 2327 l
- 6125 2338 l 6130 2345 l 6134 2353 l 6137 2363 l 6140 2373 l
- 6143 2385 l 6145 2398 l 6147 2412 l 6148 2428 l 6149 2445 l
- 6149 2464 l 6150 2483 l 6150 2504 l 6150 2526 l 6150 2550 l
- 6150 2566 l 6150 2583 l 6150 2602 l 6150 2622 l 6150 2644 l
- 6150 2668 l 6150 2695 l 6150 2724 l 6150 2756 l 6150 2790 l
- 6150 2826 l 6150 2864 l 6150 2903 l 6150 2940 l 6150 2975 l
- 6150 3006 l 6150 3032 l 6150 3075 l gs col0 s gr gr
- [] 0 sd
-% arrowhead
-n 6180 2904 m 6150 3048 l 6120 2904 l 6150 2928 l 6180 2904 l cp gs 0.00 setgray ef gr col0 s
-% Polyline
-n 2614 5738 m 2615 5737 l 2619 5734 l 2628 5727 l 2642 5715 l 2659 5700 l
- 2676 5685 l 2693 5670 l 2707 5656 l 2719 5644 l 2730 5632 l
- 2738 5620 l 2746 5609 l 2752 5599 l 2758 5588 l 2763 5576 l
- 2769 5563 l 2774 5550 l 2779 5535 l 2783 5520 l 2787 5504 l
- 2791 5487 l 2795 5470 l 2798 5453 l 2801 5436 l 2804 5418 l
- 2807 5400 l 2809 5385 l 2811 5370 l 2814 5353 l 2816 5336 l
- 2818 5318 l 2821 5299 l 2823 5279 l 2825 5259 l 2828 5238 l
- 2830 5217 l 2832 5196 l 2834 5174 l 2836 5153 l 2837 5133 l
- 2839 5112 l 2840 5092 l 2842 5073 l 2843 5054 l 2844 5036 l
- 2845 5019 l 2845 5001 l 2846 4982 l 2847 4963 l 2847 4944 l
- 2848 4924 l 2848 4903 l 2849 4882 l 2849 4860 l 2849 4838 l
- 2849 4816 l 2850 4794 l 2850 4773 l 2850 4751 l 2850 4729 l
- 2850 4708 l 2850 4686 l 2850 4665 l 2850 4644 l 2850 4622 l
- 2850 4599 l 2850 4576 l 2850 4552 l 2850 4527 l 2850 4501 l
- 2850 4475 l 2850 4449 l 2850 4422 l 2850 4395 l 2850 4369 l
- 2850 4343 l 2850 4318 l 2850 4293 l 2850 4270 l 2850 4248 l
- 2850 4227 l 2850 4207 l 2850 4188 l 2850 4170 l 2850 4149 l
- 2850 4129 l 2850 4109 l 2850 4090 l 2850 4072 l 2851 4054 l
- 2851 4036 l 2852 4019 l 2852 4003 l 2853 3987 l 2854 3972 l
- 2856 3957 l 2857 3943 l 2859 3930 l 2860 3917 l 2863 3904 l
- 2865 3888 l 2868 3872 l 2872 3855 l 2875 3838 l 2880 3820 l
- 2884 3801 l 2889 3783 l 2894 3765 l 2900 3748 l 2905 3731 l
- 2910 3716 l 2915 3702 l 2920 3690 l 2925 3678 l 2932 3664 l
- 2939 3651 l 2947 3638 l 2955 3627 l 2964 3618 l 2974 3609 l
- 2983 3601 l 2993 3594 l 3002 3589 l 3013 3583 l 3021 3579 l
- 3031 3574 l 3042 3569 l 3055 3563 l 3070 3557 l 3087 3550 l
- 3105 3543 l 3122 3536 l 3136 3531 l 3145 3527 l 3149 3525 l
- 3150 3525 l gs col0 s gr
-% Polyline
-n 2614 5735 m 2615 5736 l 2619 5739 l 2628 5746 l 2642 5758 l 2659 5772 l
- 2676 5788 l 2693 5803 l 2707 5816 l 2719 5829 l 2730 5840 l
- 2738 5852 l 2746 5863 l 2752 5874 l 2758 5884 l 2763 5896 l
- 2769 5909 l 2774 5922 l 2779 5937 l 2783 5952 l 2787 5968 l
- 2791 5985 l 2795 6002 l 2798 6019 l 2801 6036 l 2804 6054 l
- 2807 6072 l 2809 6087 l 2811 6102 l 2814 6119 l 2816 6136 l
- 2818 6154 l 2821 6173 l 2823 6193 l 2825 6213 l 2828 6234 l
- 2830 6255 l 2832 6276 l 2834 6298 l 2836 6319 l 2837 6339 l
- 2839 6360 l 2840 6380 l 2842 6399 l 2843 6418 l 2844 6436 l
- 2845 6453 l 2845 6471 l 2846 6490 l 2847 6509 l 2847 6528 l
- 2848 6548 l 2848 6569 l 2849 6590 l 2849 6612 l 2849 6634 l
- 2849 6656 l 2850 6678 l 2850 6699 l 2850 6721 l 2850 6743 l
- 2850 6764 l 2850 6786 l 2850 6807 l 2850 6829 l 2850 6850 l
- 2850 6873 l 2850 6896 l 2850 6920 l 2850 6945 l 2850 6971 l
- 2850 6997 l 2850 7023 l 2850 7050 l 2850 7077 l 2850 7103 l
- 2850 7129 l 2850 7154 l 2850 7179 l 2850 7202 l 2850 7224 l
- 2850 7245 l 2850 7265 l 2850 7284 l 2850 7302 l 2850 7323 l
- 2850 7343 l 2850 7363 l 2850 7382 l 2850 7400 l 2851 7418 l
- 2851 7436 l 2852 7453 l 2852 7469 l 2853 7485 l 2854 7500 l
- 2856 7515 l 2857 7529 l 2859 7542 l 2860 7555 l 2863 7569 l
- 2865 7584 l 2868 7600 l 2872 7617 l 2875 7635 l 2880 7653 l
- 2884 7671 l 2889 7689 l 2894 7707 l 2900 7725 l 2905 7741 l
- 2910 7756 l 2915 7770 l 2920 7783 l 2925 7795 l 2932 7809 l
- 2939 7822 l 2947 7834 l 2955 7845 l 2964 7855 l 2974 7864 l
- 2983 7871 l 2993 7878 l 3002 7884 l 3013 7889 l 3021 7893 l
- 3031 7898 l 3042 7903 l 3055 7909 l 3070 7915 l 3087 7922 l
- 3105 7929 l 3122 7936 l 3136 7941 l 3145 7945 l 3149 7947 l
- 3150 7947 l gs col0 s gr
-% Polyline
-n 3930 8325 m 3825 8325 3825 9345 105 arcto 4 {pop} repeat
- 3825 9450 6720 9450 105 arcto 4 {pop} repeat
- 6825 9450 6825 8430 105 arcto 4 {pop} repeat
- 6825 8325 3930 8325 105 arcto 4 {pop} repeat
- cp gs col0 s gr
-% Polyline
-gs clippath
-5295 8046 m 5325 7902 l 5355 8046 l 5355 7860 l 5295 7860 l cp
-5355 8154 m 5325 8298 l 5295 8154 l 5295 8340 l 5355 8340 l cp
-clip
-n 5325 8325 m 5325 7875 l gs col0 s gr gr
-
-% arrowhead
-n 5355 8154 m 5325 8298 l 5295 8154 l 5325 8178 l 5355 8154 l cp gs 0.00 setgray ef gr col0 s
-% arrowhead
-n 5295 8046 m 5325 7902 l 5355 8046 l 5325 8022 l 5295 8046 l cp gs 0.00 setgray ef gr col0 s
-% Polyline
-n 3930 6750 m 3825 6750 3825 7770 105 arcto 4 {pop} repeat
- 3825 7875 6720 7875 105 arcto 4 {pop} repeat
- 6825 7875 6825 6855 105 arcto 4 {pop} repeat
- 6825 6750 3930 6750 105 arcto 4 {pop} repeat
- cp gs col0 s gr
-% Polyline
-gs clippath
-5295 6471 m 5325 6327 l 5355 6471 l 5355 6285 l 5295 6285 l cp
-5355 6579 m 5325 6723 l 5295 6579 l 5295 6765 l 5355 6765 l cp
-clip
-n 5325 6750 m 5325 6300 l gs col0 s gr gr
-
-% arrowhead
-n 5355 6579 m 5325 6723 l 5295 6579 l 5325 6603 l 5355 6579 l cp gs 0.00 setgray ef gr col0 s
-% arrowhead
-n 5295 6471 m 5325 6327 l 5355 6471 l 5325 6447 l 5295 6471 l cp gs 0.00 setgray ef gr col0 s
-% Polyline
-gs clippath
-5295 4896 m 5325 4752 l 5355 4896 l 5355 4710 l 5295 4710 l cp
-5355 5004 m 5325 5148 l 5295 5004 l 5295 5190 l 5355 5190 l cp
-clip
-n 5325 5175 m 5325 4725 l gs col0 s gr gr
-
-% arrowhead
-n 5355 5004 m 5325 5148 l 5295 5004 l 5325 5028 l 5355 5004 l cp gs 0.00 setgray ef gr col0 s
-% arrowhead
-n 5295 4896 m 5325 4752 l 5355 4896 l 5325 4872 l 5295 4896 l cp gs 0.00 setgray ef gr col0 s
-% Polyline
-n 3930 3600 m 3825 3600 3825 4620 105 arcto 4 {pop} repeat
- 3825 4725 6720 4725 105 arcto 4 {pop} repeat
- 6825 4725 6825 3705 105 arcto 4 {pop} repeat
- 6825 3600 3930 3600 105 arcto 4 {pop} repeat
- cp gs col0 s gr
-% Polyline
-gs clippath
-4470 3321 m 4500 3177 l 4530 3321 l 4530 3135 l 4470 3135 l cp
-4530 3429 m 4500 3573 l 4470 3429 l 4470 3615 l 4530 3615 l cp
-clip
-n 4500 3600 m 4500 3150 l gs col0 s gr gr
-
-% arrowhead
-n 4530 3429 m 4500 3573 l 4470 3429 l 4500 3453 l 4530 3429 l cp gs 0.00 setgray ef gr col0 s
-% arrowhead
-n 4470 3321 m 4500 3177 l 4530 3321 l 4500 3297 l 4470 3321 l cp gs 0.00 setgray ef gr col0 s
-% Polyline
-n 3930 2025 m 3825 2025 3825 3045 105 arcto 4 {pop} repeat
- 3825 3150 6720 3150 105 arcto 4 {pop} repeat
- 6825 3150 6825 2130 105 arcto 4 {pop} repeat
- 6825 2025 3930 2025 105 arcto 4 {pop} repeat
- cp gs col0 s gr
-% Polyline
-gs clippath
-5295 1746 m 5325 1602 l 5355 1746 l 5355 1560 l 5295 1560 l cp
-5355 1854 m 5325 1998 l 5295 1854 l 5295 2040 l 5355 2040 l cp
-clip
-n 5325 2025 m 5325 1575 l gs col0 s gr gr
-
-% arrowhead
-n 5355 1854 m 5325 1998 l 5295 1854 l 5325 1878 l 5355 1854 l cp gs 0.00 setgray ef gr col0 s
-% arrowhead
-n 5295 1746 m 5325 1602 l 5355 1746 l 5325 1722 l 5295 1746 l cp gs 0.00 setgray ef gr col0 s
-% Polyline
-n 3930 450 m 3825 450 3825 1470 105 arcto 4 {pop} repeat
- 3825 1575 6720 1575 105 arcto 4 {pop} repeat
- 6825 1575 6825 555 105 arcto 4 {pop} repeat
- 6825 450 3930 450 105 arcto 4 {pop} repeat
- cp gs col0 s gr
-% Polyline
-gs clippath
-6120 3321 m 6150 3177 l 6180 3321 l 6180 3135 l 6120 3135 l cp
-6180 3429 m 6150 3573 l 6120 3429 l 6120 3615 l 6180 3615 l cp
-clip
-n 6150 3600 m 6150 3150 l gs col0 s gr gr
-
-% arrowhead
-n 6180 3429 m 6150 3573 l 6120 3429 l 6150 3453 l 6180 3429 l cp gs 0.00 setgray ef gr col0 s
-% arrowhead
-n 6120 3321 m 6150 3177 l 6180 3321 l 6150 3297 l 6120 3321 l cp gs 0.00 setgray ef gr col0 s
-% Polyline
-gs clippath
-5364 10069 m 5263 10176 l 5312 10038 l 5217 10197 l 5268 10228 l cp
-5211 9581 m 5311 9473 l 5263 9612 l 5358 9453 l 5307 9422 l cp
-clip
-n 5325 9450 m 5100 9825 l 5475 9825 l 5250 10200 l gs col0 s gr gr
-
-% arrowhead
-n 5211 9581 m 5311 9473 l 5263 9612 l 5249 9576 l 5211 9581 l cp gs 0.00 setgray ef gr col0 s
-% arrowhead
-n 5364 10069 m 5263 10176 l 5312 10038 l 5326 10074 l 5364 10069 l cp gs 0.00 setgray ef gr col0 s
-% Polyline
-n 3930 5175 m 3825 5175 3825 6195 105 arcto 4 {pop} repeat
- 3825 6300 6720 6300 105 arcto 4 {pop} repeat
- 6825 6300 6825 5280 105 arcto 4 {pop} repeat
- 6825 5175 3930 5175 105 arcto 4 {pop} repeat
- cp gs col0 s gr
-/Times-Roman ff 300.00 scf sf
-5325 7500 m
-gs 1 -1 sc (IP Protocol) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman ff 300.00 scf sf
-5325 9150 m
-gs 1 -1 sc (drivers) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman ff 300.00 scf sf
-5325 5775 m
-gs 1 -1 sc (UDP Protocol) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman ff 300.00 scf sf
-5250 4200 m
-gs 1 -1 sc (BSD Sockets) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman ff 300.00 scf sf
-5325 1050 m
-gs 1 -1 sc (Remote Debugger) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman ff 300.00 scf sf
-5325 8850 m
-gs 1 -1 sc (Ethernet / serial link / ...) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman ff 300.00 scf sf
-1650 6075 m
-gs 1 -1 sc (TCP/IP stack) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman ff 300.00 scf sf
-1575 5775 m
-gs 1 -1 sc (FreeBSD) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman ff 300.00 scf sf
-5325 10500 m
-gs 1 -1 sc (Physical link) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman ff 225.00 scf sf
-7275 3450 m
-gs 1 -1 sc (secondary port \(2010\)) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman ff 225.00 scf sf
-3525 3450 m
-gs 1 -1 sc (primary port \(2000\)) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman ff 300.00 scf sf
-5325 2700 m
-gs 1 -1 sc (SUN RPC Server) dup sw pop 2 div neg 0 rm col0 sh gr
-$F2psEnd
-rs
diff --git a/doc/rgdb_specs/layers.jpg b/doc/rgdb_specs/layers.jpg
deleted file mode 100644
index 5e4b8ee675..0000000000
--- a/doc/rgdb_specs/layers.jpg
+++ /dev/null
Binary files differ
diff --git a/doc/rgdb_specs/layers.pdf b/doc/rgdb_specs/layers.pdf
deleted file mode 100644
index 84a3cba9d8..0000000000
--- a/doc/rgdb_specs/layers.pdf
+++ /dev/null
Binary files differ
diff --git a/doc/rgdb_specs/objectives.t b/doc/rgdb_specs/objectives.t
deleted file mode 100644
index a9ad4ba2c8..0000000000
--- a/doc/rgdb_specs/objectives.t
+++ /dev/null
@@ -1,307 +0,0 @@
-@c
-@c RTEMS Remote Debugger Server Specifications
-@c
-@c Written by: Eric Valette <valette@crf.canon.fr>
-@c Emmanuel Raguet <raguet@crf.canon.fr>
-@c
-@c
-@c $Id$
-@c
-
-@chapter Objectives
-
-@c XXX reference
-This section is intended to clearly define the current objectives of our work.
-First, we will try here to list some ambitious requirements for the debugger
-in section @b{List of Requirements}. These requirements will deliberately be much more
-ambitious than what we will provide directly ourselves in the hope that the
-Internet development model will enable others to implement some features we
-rejected for man-power reasons in the first step. We are committed to do the
-core work and redistribute it but would appreciate any comment and enhancement.
-Then, in section @b{Requirements Analysis} we will analyze each requirement to see
-what technical problem must be solved if we want to fullfill it. After this
-analysis, we will determine in section @b{Requirements Selection} the requirements we
-chose to implement and the ones we will not. We will then clearly identify the
-limits of our solution in section @b{Implied Restrictions}.
-
-
-@section List of Requirements
-
-We will identify here possible requirements for the type of debug that may be
-provided :
-
-@table @b
-
-@item [(R1)]:
-We want to use GDB as the front-end debugger,
-
-@item [(R2)]:
-We want to support at least Intel and PowerPC as target processor architecture,
-
-@item [(R3)]:
-We want to use the GDB thread debugging interface,
-
-@item [(R4)]:
-We want to be able to debug a remote target over a serial line,
-
-@item [(R5)]:
-We want to be able to debug a remote target over Ethernet,
-
-@item [(R6)]:
-The set of target code path we will be able to debug using RGDBSD must
-be clearly identified. It will be called Debug Path Set (@emph{DPS}) in the
-remaining of this document,
-
-@item [(R7)]:
-@emph{DPS} must include the RTEMS core executive itself,
-
-@item [(R8)]:
-@emph{DPS} must include the FreeBSD stack,
-
-@item [(R9)]:
-@emph{DPS} must include anything but the FreeBSD stack and the RTEMS
-core executive,
-
-@item [(R10)]:
-We want to enable several persons to debug different parts of the code
-running on the target,
-
-@item [(R11)]:
-As much as possible the system must be frozen during a debug session
-so that debugging a particular portion of code does not prevent another part
-from functioning,
-@end table
-
-@section Requirements Analysis
-
-@table @b
-
-@item [(R1)]:
-Worth recalling it. It mainly imposes few restrictions on the binary
-files type, target processor type as :
-
-@itemize @bullet
-
-@item the binary format must be understood by GDB (to find debugging information).
-Elf, Coff and A.out are the main formats currently supported. Elf/Dwarf 2.0
-binary support will be our main target as they are the preferred format for
-Intel and PowerPC processors. No change in GDB will be required for other binaries
-except may be a new configuration file changing the binary/debug file format,
-
-@item the processor must be supported for disassemble/step instruction command,
-
-@item the target system must be supported. As far as I know RTEMS is not currently
-@emph{officially} supported anyway,
-@end itemize
-
-@item [(R2)]:
-Our primary targets are Intel and PowerPC. We however do not think implementing
-RGDBSD for other processors will be a heavy task. It will mainly require :
-
-@enumerate
-@item Implementing exception handling for the target processor,
-
-@item Interfacing the generic part of RGDBSD with the low level exception handling
-and make RGDBSD aware of exception used for debugging (usually illegal instruction
-or dedicated trap, single step),
-
-@item Making GDB aware of the frame layout pushed on exceptions,
-
-@item Implement the code for data transfer for the exception frame,
-
-@item Implement code to copy data cache back to main memory and invalidate instruction
-cache. This is needed in order to be sure opcode modification used to set breakpoint
-that use the data cache will be proagated to the instruction cache,
-@end enumerate
-
-As soon as we will have completed the first core work a document describing
-how to port it to a new processor should be written. So far we will organize
-the source tree with processor dependent directories so that port will be as
-easy as possible. May be a bare processor support should be created,
-
-
-@item [(R3)]:
-GDB already has an interface for manipulating multi-threaded programs.
-This interface is rather weak at the moment but it will certainly be improved
-in the future with the generalization of POSIX thread API on Linux and other
-operating systems. This implies that either GDB or RGDBSD is able to obtain
-the list of threads currently executing. The choice of implementing this in
-GDB or RGDBSD is a tradeof between target code size and simplicity,
-
-@item [(R4)]:
-Regular GDB code contains clients code for debugging over a serial line.
-However only few functions are implemented. We would like to provide a better
-support and to uniformize serial line debugging with debugging over Ethernet
-via the use of SLIP,
-
-@item [(R5)]:
-Regular GDB code contains client code for debugging over Ethernet for
-VxWorks via the SUN RPC library. So there will be at least one starting point
-to implement remote debugging over Ethernet via SUN RPC. The Chorus remote debugging
-code has been disclosed under GPL and also contains code for debugging suing
-SUN RPC,
-
-@item [(R6)]:
-Due to a classical chicken and egg problems, the remote debugging daemon
-cannot be used to debug code it uses to function. Thus depending on the API
-used by RGDBSD, some parts of the target system will not be debuggable via GDB.
-The most important point is documentation because my feeling is that implementing
-RGDBSD on a totally different @emph{dedicated} nano kernel should be possible,
-
-@item [(R7)]:
-RTEMS core executive is a real-time OS which implements priority level
-scheduling, synchronization objects, and interrupt handling. As mentioned in
-previous item, we may not debug theses features if RGDBSD uses them. This requirement
-is thus very strong because it impose that :
-
-@enumerate
-
-@item RGDBSD is totally interrupt driven (no thread API available),
-
-@item But it does not use RTEMS interrupt management,
-
-@item Nor does not use RTEMS exception management,
-
-@item RGDBSD must provide its own UDP/IP stack as the current FreeBSD code rely on
-tasks switching and RTEMS provided synchronization object for input path handling,
-@end enumerate
-
-So our feeling is that the @b{(R7)} more or less requires to write a @emph{dedicated}
-nano kernel with a very small dedicated UDP/IP stack.
-
-
-@item [(R8)]:
-GDB remote debugging over Ethernet code communicates with the remote
-target via the SUN RPC protocol. This requires a UDP/IP protocol and a minimal
-socket like interface. In RTEMS environment, this feature is currently provided
-by the FreeBSD stack. Again, if we use the FreeBSD stack itself for remote communication,
-it will be impossible to debug this stack as a breakpoint in the stack code
-will stop its execution and there would be no more way to communicate with the
-target. A solution consists in implementing a minimal, dedicated UDP/IP stack
-(with at least IP and UDP protocols, a minimal BSD sockets) and a simple SUN
-RPC library, which will be both dedicated to the debug. We can use RTEMS API
-to implement it if @b{(R7)} is not required. As the two stack will need
-to share the same chip, a kind of shared filter must be implemented at the bottom
-of the two stacks so that Ethernet frames can be dynamically directed either
-to the dedicated UDP/IP debug stack or to the regular FreeBSD stack. The fact
-that in the current design, the low level ethernet input routine mainly signal
-a thread should facilitate the design of this filter. The output path is less
-complicated as it is run by a task and thus can sleep on a synchronization object,
-
-@item [(R9)]:
-This requirement represents what we find reasonable as a first target.
-However, we can still present to the final user this kind of debugging via different
-model. RTEMS can be represented as a single threaded system or, because RTEMS
-is a multitasking system, as an ensemble of separate tasks. In the first representation,
-the debugger sees only 1 ``task'' without distinguishing the core executive
-part from the applicative part. This is the simplest way to implement the debugger
-but also implies that there is no way to protect the core executive. Some of
-these tasks are system tasks (tasks form the core executive and from the FreeBSD
-stack), the other ones are tasks implemented by the developer. The developer
-wants to debug his tasks, and sometimes only one of his tasks. We can provide
-a way to debug not the entire system but only the concerned task by testing
-if the current running task is a debugged task (test on the task identifier).
-GDB offers an API to ``detach'' thread so that if a detached thread hits a
-breakpoint it is automatically restarted without user intervention,
-
-@item [(R10)]:
-Several developers can work on a large project, each on a specific
-module. Sometimes only one target is available for everyone. This requirements
-is not really meaningfull until RTEMS supports dynamic code loading,
-
-@item [(R11)]:
-This requirement heavily depends on the @b{(R7)} and @b{(R8)}
-requirements.
-@end table
-
-@section Requirements Selection
-
-
-@subsection Requirement We Will Take Into Account For the First Implementation
-
-@table @b
-
-@item [(R1)]:
-Obviously.
-
-@item [(R2)]:
-As these are our targets. Of course other will be free to contribute.
-We will however document the works that needs to be done in order to port the
-debug code to other processors,
-
-@item [(R3)]:
-We think it is feasible with only few RTEMS modifications,
-
-@item [(R5)]:
-We think serial line debugging is nowadays too restrictive as most equipment
-are now connected via Ethernet,
-
-@item [(R6)]:
-This is a documentation problem and should be fairly easy to describe
-once we have the RGDBSD code,
-
-@item [(R9)]:
-We will try to provide the multi-thread target system presentation,
-@end table
-
-@subsection Requirements We Will Not Implement
-
-@table @b
-
-@item [(R4)]:
-it will not be implemented for the moment. It is just a matter on implementing
-SLIP in the FreeBSD stack and alternative solutions already exist in the meantime,
-
-@item [(R7)]:
-To simplify the first developments, we don't plan to implement a @emph{dedicated}
-nano-kernel to allow the RTEMS kernel to be debugged. It means that, if any
-breakpoint is set in the kernel, unpredictable behaviors can occur. So, developers
-must keep in mind to avoid stopping the kernel. They must also keep in mind,
-in order to not stop the kernel, that the user's tasks must have a lower priority
-than the tasks used for debug. The solution is to use a specific very-high priority
-level for the system tasks used directly or indirectly by RGDBSD. The SYSTEM_TASK
-attribute that already exists should be fine.
-
-@item [(R8)]:
-To avoid increasing the code size and the used memory and because the
-FreeBSD stack doesn't need to be debug any more, we choose not to implement
-a minimal TCP/IP stack but rather to use the FreeBSD one as communication protocol,
-
-@item [(R10)]:
-We will see later when a file system will be available and we can implement
-@b{exec} system call,
-
-@item [(R11)]:
-Without a separate TCP/IP stack it will be hard to freeze the system
-as some interrupts must occur in order to enable the FreeBSD stack to function,
-@end table
-
-@section Implied Restrictions
-
-High priority level must be used for these features :
-
-@itemize @bullet
-
-@item FreeBSD interrupt handling thread,
-
-@item Debugger threads.
-@end itemize
-
-This will allows these tasks not to be stopped when a process is stopped
-in debug mode
-
-If we don't want to use a ``specific'' priority level, we must affect
-priority to each of these tasks as follow :
-
-@itemize @bullet
-
-@item FreeBSD stack (high priority)
-
-@item Debugger (less high priority)
-@end itemize
-
-The user must remember the higher priority level he can use for his
-software in order not to block one of the previous threads and to not put breakpoints
-in part of the code executed by RGDBSD.
-
-
diff --git a/doc/rgdb_specs/process.eps b/doc/rgdb_specs/process.eps
deleted file mode 100644
index 14ebd297e9..0000000000
--- a/doc/rgdb_specs/process.eps
+++ /dev/null
@@ -1,672 +0,0 @@
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: process.eps
-%%Creator: fig2dev Version 3.2 Patchlevel 1
-%%CreationDate: Tue Nov 10 13:55:53 1998
-%%For: valette@tri-yann (Eric Valette,,6891,)
-%%Orientation: Portrait
-%%BoundingBox: 0 0 1245 646
-%%Pages: 0
-%%BeginSetup
-%%EndSetup
-%%Magnification: 1.0000
-%%EndComments
-/$F2psDict 200 dict def
-$F2psDict begin
-$F2psDict /mtrx matrix put
-/col-1 {0 setgray} bind def
-/col0 {0.000 0.000 0.000 srgb} bind def
-/col1 {0.000 0.000 1.000 srgb} bind def
-/col2 {0.000 1.000 0.000 srgb} bind def
-/col3 {0.000 1.000 1.000 srgb} bind def
-/col4 {1.000 0.000 0.000 srgb} bind def
-/col5 {1.000 0.000 1.000 srgb} bind def
-/col6 {1.000 1.000 0.000 srgb} bind def
-/col7 {1.000 1.000 1.000 srgb} bind def
-/col8 {0.000 0.000 0.560 srgb} bind def
-/col9 {0.000 0.000 0.690 srgb} bind def
-/col10 {0.000 0.000 0.820 srgb} bind def
-/col11 {0.530 0.810 1.000 srgb} bind def
-/col12 {0.000 0.560 0.000 srgb} bind def
-/col13 {0.000 0.690 0.000 srgb} bind def
-/col14 {0.000 0.820 0.000 srgb} bind def
-/col15 {0.000 0.560 0.560 srgb} bind def
-/col16 {0.000 0.690 0.690 srgb} bind def
-/col17 {0.000 0.820 0.820 srgb} bind def
-/col18 {0.560 0.000 0.000 srgb} bind def
-/col19 {0.690 0.000 0.000 srgb} bind def
-/col20 {0.820 0.000 0.000 srgb} bind def
-/col21 {0.560 0.000 0.560 srgb} bind def
-/col22 {0.690 0.000 0.690 srgb} bind def
-/col23 {0.820 0.000 0.820 srgb} bind def
-/col24 {0.500 0.190 0.000 srgb} bind def
-/col25 {0.630 0.250 0.000 srgb} bind def
-/col26 {0.750 0.380 0.000 srgb} bind def
-/col27 {1.000 0.500 0.500 srgb} bind def
-/col28 {1.000 0.630 0.630 srgb} bind def
-/col29 {1.000 0.750 0.750 srgb} bind def
-/col30 {1.000 0.880 0.880 srgb} bind def
-/col31 {1.000 0.840 0.000 srgb} bind def
-
-end
-save
--19.0 647.0 translate
-1 -1 scale
-
-/cp {closepath} bind def
-/ef {eofill} bind def
-/gr {grestore} bind def
-/gs {gsave} bind def
-/sa {save} bind def
-/rs {restore} bind def
-/l {lineto} bind def
-/m {moveto} bind def
-/rm {rmoveto} bind def
-/n {newpath} bind def
-/s {stroke} bind def
-/sh {show} bind def
-/slc {setlinecap} bind def
-/slj {setlinejoin} bind def
-/slw {setlinewidth} bind def
-/srgb {setrgbcolor} bind def
-/rot {rotate} bind def
-/sc {scale} bind def
-/sd {setdash} bind def
-/ff {findfont} bind def
-/sf {setfont} bind def
-/scf {scalefont} bind def
-/sw {stringwidth} bind def
-/tr {translate} bind def
-/tnt {dup dup currentrgbcolor
- 4 -2 roll dup 1 exch sub 3 -1 roll mul add
- 4 -2 roll dup 1 exch sub 3 -1 roll mul add
- 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
- bind def
-/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
- 4 -2 roll mul srgb} bind def
-/reencdict 12 dict def /ReEncode { reencdict begin
-/newcodesandnames exch def /newfontname exch def /basefontname exch def
-/basefontdict basefontname findfont def /newfont basefontdict maxlength dict def
-basefontdict { exch dup /FID ne { dup /Encoding eq
-{ exch dup length array copy newfont 3 1 roll put }
-{ exch newfont 3 1 roll put } ifelse } { pop pop } ifelse } forall
-newfont /FontName newfontname put newcodesandnames aload pop
-128 1 255 { newfont /Encoding get exch /.notdef put } for
-newcodesandnames length 2 idiv { newfont /Encoding get 3 1 roll put } repeat
-newfontname newfont definefont pop end } def
-/isovec [
-8#200 /grave 8#201 /acute 8#202 /circumflex 8#203 /tilde
-8#204 /macron 8#205 /breve 8#206 /dotaccent 8#207 /dieresis
-8#210 /ring 8#211 /cedilla 8#212 /hungarumlaut 8#213 /ogonek 8#214 /caron
-8#220 /dotlessi 8#230 /oe 8#231 /OE
-8#240 /space 8#241 /exclamdown 8#242 /cent 8#243 /sterling
-8#244 /currency 8#245 /yen 8#246 /brokenbar 8#247 /section 8#250 /dieresis
-8#251 /copyright 8#252 /ordfeminine 8#253 /guillemotleft 8#254 /logicalnot
-8#255 /endash 8#256 /registered 8#257 /macron 8#260 /degree 8#261 /plusminus
-8#262 /twosuperior 8#263 /threesuperior 8#264 /acute 8#265 /mu 8#266 /paragraph
-8#267 /periodcentered 8#270 /cedilla 8#271 /onesuperior 8#272 /ordmasculine
-8#273 /guillemotright 8#274 /onequarter 8#275 /onehalf
-8#276 /threequarters 8#277 /questiondown 8#300 /Agrave 8#301 /Aacute
-8#302 /Acircumflex 8#303 /Atilde 8#304 /Adieresis 8#305 /Aring
-8#306 /AE 8#307 /Ccedilla 8#310 /Egrave 8#311 /Eacute
-8#312 /Ecircumflex 8#313 /Edieresis 8#314 /Igrave 8#315 /Iacute
-8#316 /Icircumflex 8#317 /Idieresis 8#320 /Eth 8#321 /Ntilde 8#322 /Ograve
-8#323 /Oacute 8#324 /Ocircumflex 8#325 /Otilde 8#326 /Odieresis 8#327 /multiply
-8#330 /Oslash 8#331 /Ugrave 8#332 /Uacute 8#333 /Ucircumflex
-8#334 /Udieresis 8#335 /Yacute 8#336 /Thorn 8#337 /germandbls 8#340 /agrave
-8#341 /aacute 8#342 /acircumflex 8#343 /atilde 8#344 /adieresis 8#345 /aring
-8#346 /ae 8#347 /ccedilla 8#350 /egrave 8#351 /eacute
-8#352 /ecircumflex 8#353 /edieresis 8#354 /igrave 8#355 /iacute
-8#356 /icircumflex 8#357 /idieresis 8#360 /eth 8#361 /ntilde 8#362 /ograve
-8#363 /oacute 8#364 /ocircumflex 8#365 /otilde 8#366 /odieresis 8#367 /divide
-8#370 /oslash 8#371 /ugrave 8#372 /uacute 8#373 /ucircumflex
-8#374 /udieresis 8#375 /yacute 8#376 /thorn 8#377 /ydieresis] def
-/Times-Roman /Times-Roman-iso isovec ReEncode
- /DrawEllipse {
- /endangle exch def
- /startangle exch def
- /yrad exch def
- /xrad exch def
- /y exch def
- /x exch def
- /savematrix mtrx currentmatrix def
- x y tr xrad yrad sc 0 0 1 startangle endangle arc
- closepath
- savematrix setmatrix
- } def
-
-/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
-/$F2psEnd {$F2psEnteredState restore end} def
-%%EndProlog
-
-$F2psBegin
-10 setmiterlimit
-n -1000 11779 m -1000 -1000 l 22054 -1000 l 22054 11779 l cp clip
- 0.06000 0.06000 sc
-/Times-Roman-iso ff 300.00 scf sf
-2250 600 m
-gs 1 -1 sc (INITIALIZATION) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 300.00 scf sf
-2250 825 m
-gs 1 -1 sc (TASK) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 300.00 scf sf
-6150 825 m
-gs 1 -1 sc (TASK) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 300.00 scf sf
-6150 600 m
-gs 1 -1 sc (COMMAND MANAGEMENT) dup sw pop 2 div neg 0 rm col0 sh gr
-7.500 slw
-% Ellipse
-n 10050 3600 1275 525 0 360 DrawEllipse gs col0 s gr
-
-/Times-Roman-iso ff 180.00 scf sf
-10050 3450 m
-gs 1 -1 sc (WAIT FOR) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 180.00 scf sf
-10050 3900 m
-gs 1 -1 sc (SEMAPHORE) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 180.00 scf sf
-10050 3675 m
-gs 1 -1 sc (WAKE-UP) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 180.00 scf sf
-5925 1950 m
-gs 1 -1 sc (WAIT FOR) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 180.00 scf sf
-5925 2175 m
-gs 1 -1 sc (RPC MESSAGE) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 180.00 scf sf
-5925 2400 m
-gs 1 -1 sc (FROM GDB) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 180.00 scf sf
-5925 3750 m
-gs 1 -1 sc (EXECUTE) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 180.00 scf sf
-5925 3975 m
-gs 1 -1 sc (RECEIVED) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 180.00 scf sf
-5925 4200 m
-gs 1 -1 sc (COMMAND) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 180.00 scf sf
-5925 9150 m
-gs 1 -1 sc (SEND) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 180.00 scf sf
-5925 9375 m
-gs 1 -1 sc (RESULT) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 180.00 scf sf
-5925 9600 m
-gs 1 -1 sc (IF NEEDED) dup sw pop 2 div neg 0 rm col0 sh gr
-% Ellipse
-n 5925 9300 1275 525 0 360 DrawEllipse gs col0 s gr
-
-% Polyline
-n 5925 9825 m 5925 9826 l 5925 9830 l 5926 9839 l 5926 9855 l 5928 9876 l
- 5929 9899 l 5931 9923 l 5934 9946 l 5937 9967 l 5941 9987 l
- 5945 10004 l 5950 10020 l 5956 10035 l 5963 10050 l 5969 10063 l
- 5977 10076 l 5986 10089 l 5996 10103 l 6007 10117 l 6020 10132 l
- 6033 10146 l 6048 10161 l 6063 10175 l 6080 10189 l 6097 10203 l
- 6114 10216 l 6132 10228 l 6150 10240 l 6169 10252 l 6188 10263 l
- 6203 10271 l 6220 10279 l 6237 10288 l 6255 10296 l 6274 10305 l
- 6293 10313 l 6314 10321 l 6335 10329 l 6356 10337 l 6378 10345 l
- 6401 10352 l 6423 10359 l 6445 10366 l 6467 10372 l 6488 10378 l
- 6509 10383 l 6529 10388 l 6549 10392 l 6568 10396 l 6588 10400 l
- 6606 10403 l 6625 10406 l 6644 10409 l 6664 10411 l 6684 10413 l
- 6704 10415 l 6724 10416 l 6745 10417 l 6766 10418 l 6788 10418 l
- 6809 10418 l 6830 10417 l 6851 10416 l 6871 10415 l 6891 10413 l
- 6911 10411 l 6931 10409 l 6950 10406 l 6969 10403 l 6988 10400 l
- 7007 10396 l 7026 10392 l 7046 10388 l 7066 10383 l 7087 10378 l
- 7108 10372 l 7129 10366 l 7151 10359 l 7173 10352 l 7195 10345 l
- 7216 10337 l 7237 10329 l 7258 10321 l 7277 10313 l 7296 10305 l
- 7313 10296 l 7330 10288 l 7346 10279 l 7361 10271 l 7375 10263 l
- 7392 10252 l 7408 10240 l 7423 10228 l 7438 10216 l 7452 10203 l
- 7465 10189 l 7478 10175 l 7490 10161 l 7501 10146 l 7510 10132 l
- 7519 10117 l 7527 10103 l 7534 10089 l 7540 10076 l 7545 10063 l
- 7550 10050 l 7555 10035 l 7558 10020 l 7562 10004 l 7565 9987 l
- 7567 9967 l 7569 9946 l 7571 9923 l 7572 9899 l 7573 9876 l
- 7574 9855 l 7575 9839 l 7575 9830 l 7575 9826 l 7575 9825 l gs col0 s gr
-/Times-Roman-iso ff 180.00 scf sf
-2250 8025 m
-gs 1 -1 sc (DELETE) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 180.00 scf sf
-2250 8250 m
-gs 1 -1 sc (INITIALIZATION) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 180.00 scf sf
-2250 8475 m
-gs 1 -1 sc (TASK) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 180.00 scf sf
-2250 6525 m
-gs 1 -1 sc (COMMAND MANAGEMENT) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 180.00 scf sf
-2250 6300 m
-gs 1 -1 sc (CREATE SEPARATE TASK) dup sw pop 2 div neg 0 rm col0 sh gr
-% Ellipse
-n 2250 6375 1275 525 0 360 DrawEllipse gs col0 s gr
-
-% Ellipse
-n 2250 8175 1275 525 0 360 DrawEllipse gs col0 s gr
-
-% Polyline
-gs clippath
-2280 5730 m 2250 5850 l 2220 5730 l 2220 5865 l 2280 5865 l cp
-clip
-n 2250 5100 m 2250 5850 l gs col0 s gr gr
-
-% arrowhead
-n 2280 5730 m 2250 5850 l 2220 5730 l col0 s
-% Polyline
-gs clippath
-2280 7530 m 2250 7650 l 2220 7530 l 2220 7665 l 2280 7665 l cp
-clip
-n 2250 6900 m 2250 7650 l gs col0 s gr gr
-
-% arrowhead
-n 2280 7530 m 2250 7650 l 2220 7530 l col0 s
-% Ellipse
-n 2250 2775 1275 525 0 360 DrawEllipse gs col0 s gr
-
-% Ellipse
-n 2250 4575 1275 525 0 360 DrawEllipse gs col0 s gr
-
-% Polyline
-gs clippath
-2280 3930 m 2250 4050 l 2220 3930 l 2220 4065 l 2280 4065 l cp
-clip
-n 2250 3300 m 2250 4050 l gs col0 s gr gr
-
-% arrowhead
-n 2280 3930 m 2250 4050 l 2220 3930 l col0 s
-/Times-Roman-iso ff 180.00 scf sf
-2250 2850 m
-gs 1 -1 sc (INITIALIZATION) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 180.00 scf sf
-2250 4425 m
-gs 1 -1 sc (CONNECT) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 180.00 scf sf
-2250 4875 m
-gs 1 -1 sc (HANDLER) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 180.00 scf sf
-2250 4650 m
-gs 1 -1 sc (EXCEPTION) dup sw pop 2 div neg 0 rm col0 sh gr
-% Ellipse
-n 10050 5400 1275 525 0 360 DrawEllipse gs col0 s gr
-
-% Ellipse
-n 5925 2100 1275 525 0 360 DrawEllipse gs col0 s gr
-
-% Ellipse
-n 5925 3900 1275 525 0 360 DrawEllipse gs col0 s gr
-
-% Ellipse
-n 5943 5681 1275 525 0 360 DrawEllipse gs col0 s gr
-
-% Ellipse
-n 5925 7500 1275 525 0 360 DrawEllipse gs col0 s gr
-
-% Polyline
-60.000 slw
-n 600 75 m 375 75 375 10500 225 arcto 4 {pop} repeat
- 375 10725 12600 10725 225 arcto 4 {pop} repeat
- 12825 10725 12825 300 225 arcto 4 {pop} repeat
- 12825 75 600 75 225 arcto 4 {pop} repeat
- cp gs col0 s gr
-% Polyline
-7.500 slw
-n 11700 3075 m 11700 5925 l gs col0 s gr
-% Polyline
-gs clippath
-10080 4755 m 10050 4875 l 10020 4755 l 10020 4890 l 10080 4890 l cp
-clip
-n 10050 4125 m 10050 4875 l gs col0 s gr gr
-
-% arrowhead
-n 10080 4755 m 10050 4875 l 10020 4755 l col0 s
-% Polyline
-gs clippath
-5955 3255 m 5925 3375 l 5895 3255 l 5895 3390 l 5955 3390 l cp
-clip
-n 5925 2625 m 5925 3375 l gs col0 s gr gr
-
-% arrowhead
-n 5955 3255 m 5925 3375 l 5895 3255 l col0 s
-% Polyline
-gs clippath
-5955 5055 m 5925 5175 l 5895 5055 l 5895 5190 l 5955 5190 l cp
-clip
-n 5925 4425 m 5925 5175 l gs col0 s gr gr
-
-% arrowhead
-n 5955 5055 m 5925 5175 l 5895 5055 l col0 s
-% Polyline
-n 7575 1500 m 7575 9900 l gs col0 s gr
-% Polyline
-gs clippath
-5955 6855 m 5925 6975 l 5895 6855 l 5895 6990 l 5955 6990 l cp
-clip
-n 5925 6225 m 5925 6975 l gs col0 s gr gr
-
-% arrowhead
-n 5955 6855 m 5925 6975 l 5895 6855 l col0 s
-% Polyline
-gs clippath
-5955 8655 m 5925 8775 l 5895 8655 l 5895 8790 l 5955 8790 l cp
-clip
-n 5925 8025 m 5925 8775 l gs col0 s gr gr
-
-% arrowhead
-n 5955 8655 m 5925 8775 l 5895 8655 l col0 s
-% Polyline
-45.000 slw
-n 4050 375 m 4050 10350 l gs col0 s gr
-% Polyline
-n 8175 375 m 8175 10425 l gs col0 s gr
-% Polyline
-30.000 slw
- [60] 0 sd
-gs clippath
-4526 2104 m 4650 2100 l 4543 2162 l 4702 2116 l 4685 2059 l cp
-clip
-n 3525 6375 m 3526 6375 l 3528 6374 l 3531 6372 l 3537 6370 l 3544 6366 l
- 3554 6361 l 3566 6354 l 3580 6345 l 3596 6334 l 3612 6322 l
- 3630 6307 l 3648 6291 l 3666 6272 l 3684 6252 l 3702 6230 l
- 3719 6207 l 3735 6181 l 3750 6153 l 3765 6124 l 3778 6092 l
- 3791 6057 l 3804 6020 l 3815 5980 l 3826 5937 l 3837 5890 l
- 3847 5839 l 3856 5785 l 3866 5726 l 3875 5663 l 3880 5624 l
- 3885 5584 l 3891 5543 l 3896 5500 l 3901 5456 l 3906 5410 l
- 3911 5363 l 3917 5314 l 3922 5264 l 3927 5213 l 3932 5160 l
- 3938 5105 l 3943 5049 l 3948 4992 l 3954 4934 l 3959 4875 l
- 3965 4814 l 3970 4753 l 3976 4690 l 3981 4627 l 3987 4563 l
- 3993 4499 l 3999 4434 l 4004 4369 l 4010 4303 l 4016 4237 l
- 4022 4172 l 4028 4106 l 4034 4041 l 4040 3976 l 4046 3912 l
- 4052 3848 l 4058 3785 l 4064 3722 l 4070 3661 l 4076 3600 l
- 4082 3541 l 4088 3483 l 4094 3426 l 4100 3370 l 4106 3315 l
- 4112 3262 l 4118 3211 l 4124 3161 l 4130 3112 l 4137 3065 l
- 4143 3019 l 4149 2975 l 4156 2932 l 4162 2891 l 4168 2851 l
- 4175 2813 l 4186 2753 l 4197 2698 l 4209 2646 l 4221 2597 l
- 4233 2553 l 4247 2511 l 4261 2472 l 4276 2436 l 4291 2403 l
- 4308 2371 l 4326 2342 l 4345 2315 l 4365 2289 l 4385 2265 l
- 4407 2243 l 4430 2223 l 4453 2204 l 4476 2187 l 4500 2171 l
- 4523 2157 l 4545 2145 l 4566 2134 l 4585 2125 l 4601 2118 l
- 4616 2112 l 4627 2107 l 4636 2104 l 4650 2100 l gs col4 s gr gr
- [] 0 sd
-% arrowhead
-7.500 slw
-n 4526 2104 m 4650 2100 l 4543 2162 l col4 s
-% Polyline
-30.000 slw
- [60] 0 sd
-gs clippath
-8652 3585 m 8775 3600 l 8659 3644 l 8823 3624 l 8816 3565 l cp
-clip
-n 7200 5700 m 7202 5700 l 7206 5699 l 7214 5698 l 7225 5697 l 7242 5695 l
- 7262 5691 l 7287 5687 l 7315 5682 l 7346 5676 l 7379 5668 l
- 7413 5660 l 7447 5650 l 7481 5640 l 7514 5628 l 7545 5616 l
- 7575 5602 l 7603 5587 l 7629 5571 l 7654 5554 l 7676 5535 l
- 7697 5515 l 7717 5492 l 7736 5468 l 7753 5442 l 7769 5414 l
- 7785 5383 l 7800 5350 l 7811 5324 l 7821 5297 l 7832 5268 l
- 7842 5238 l 7852 5207 l 7862 5174 l 7871 5140 l 7881 5104 l
- 7891 5068 l 7901 5030 l 7910 4991 l 7920 4951 l 7930 4910 l
- 7939 4868 l 7949 4825 l 7959 4782 l 7968 4738 l 7978 4694 l
- 7987 4650 l 7997 4606 l 8007 4562 l 8016 4518 l 8026 4475 l
- 8036 4432 l 8045 4390 l 8055 4349 l 8065 4309 l 8074 4270 l
- 8084 4232 l 8094 4196 l 8104 4160 l 8113 4126 l 8123 4093 l
- 8133 4062 l 8143 4032 l 8154 4003 l 8164 3976 l 8175 3950 l
- 8190 3917 l 8206 3886 l 8222 3858 l 8239 3832 l 8258 3808 l
- 8278 3785 l 8299 3765 l 8321 3746 l 8346 3729 l 8372 3713 l
- 8400 3698 l 8430 3684 l 8461 3672 l 8494 3660 l 8528 3650 l
- 8562 3640 l 8596 3632 l 8629 3624 l 8660 3618 l 8688 3613 l
- 8713 3609 l 8733 3605 l 8750 3603 l 8775 3600 l gs col4 s gr gr
- [] 0 sd
-% arrowhead
-7.500 slw
-n 8652 3585 m 8775 3600 l 8659 3644 l col4 s
-% Polyline
-gs clippath
-10084 2956 m 10050 3075 l 10024 2954 l 10020 3089 l 10079 3091 l cp
-clip
-n 10050 3075 m 10051 3045 l 10053 3024 l 10054 3001 l 10056 2977 l 10059 2954 l
- 10062 2933 l 10066 2913 l 10070 2896 l 10075 2880 l 10081 2865 l
- 10088 2850 l 10094 2837 l 10102 2824 l 10111 2811 l 10121 2797 l
- 10132 2783 l 10145 2768 l 10158 2754 l 10173 2739 l 10188 2725 l
- 10205 2711 l 10222 2697 l 10239 2684 l 10257 2672 l 10275 2660 l
- 10294 2648 l 10313 2638 l 10328 2629 l 10345 2621 l 10362 2612 l
- 10380 2604 l 10399 2595 l 10418 2587 l 10439 2579 l 10460 2571 l
- 10481 2563 l 10503 2555 l 10526 2548 l 10548 2541 l 10570 2534 l
- 10592 2528 l 10613 2522 l 10634 2517 l 10654 2512 l 10674 2508 l
- 10693 2504 l 10713 2500 l 10731 2497 l 10750 2494 l 10769 2491 l
- 10789 2489 l 10809 2487 l 10829 2485 l 10849 2484 l 10870 2483 l
- 10891 2482 l 10913 2482 l 10934 2482 l 10955 2483 l 10976 2484 l
- 10996 2485 l 11016 2487 l 11036 2489 l 11056 2491 l 11075 2494 l
- 11094 2497 l 11113 2500 l 11132 2504 l 11151 2508 l 11171 2512 l
- 11191 2517 l 11212 2522 l 11233 2528 l 11254 2534 l 11276 2541 l
- 11298 2548 l 11320 2555 l 11341 2563 l 11362 2571 l 11383 2579 l
- 11402 2587 l 11421 2595 l 11438 2604 l 11455 2612 l 11471 2621 l
- 11486 2629 l 11500 2638 l 11517 2648 l 11533 2660 l 11548 2672 l
- 11563 2684 l 11577 2697 l 11590 2711 l 11603 2725 l 11615 2739 l
- 11626 2754 l 11635 2768 l 11644 2783 l 11652 2797 l 11659 2811 l
- 11665 2824 l 11670 2837 l 11675 2850 l 11680 2865 l 11683 2880 l
- 11687 2896 l 11690 2913 l 11692 2933 l 11694 2954 l 11696 2977 l
- 11697 3001 l 11698 3024 l 11699 3045 l 11700 3061 l 11700 3070 l
- 11700 3074 l 11700 3075 l gs col0 s gr gr
-
-% arrowhead
-n 10084 2956 m 10050 3075 l 10024 2954 l col0 s
-% Polyline
-n 10050 5925 m 10050 5926 l 10050 5930 l 10051 5939 l 10051 5955 l 10053 5976 l
- 10054 5999 l 10056 6023 l 10059 6046 l 10062 6067 l 10066 6087 l
- 10070 6104 l 10075 6120 l 10081 6135 l 10088 6150 l 10094 6163 l
- 10102 6176 l 10111 6189 l 10121 6203 l 10132 6217 l 10145 6232 l
- 10158 6246 l 10173 6261 l 10188 6275 l 10205 6289 l 10222 6303 l
- 10239 6316 l 10257 6328 l 10275 6340 l 10294 6352 l 10313 6363 l
- 10328 6371 l 10345 6379 l 10362 6388 l 10380 6396 l 10399 6405 l
- 10418 6413 l 10439 6421 l 10460 6429 l 10481 6437 l 10503 6445 l
- 10526 6452 l 10548 6459 l 10570 6466 l 10592 6472 l 10613 6478 l
- 10634 6483 l 10654 6488 l 10674 6492 l 10693 6496 l 10713 6500 l
- 10731 6503 l 10750 6506 l 10769 6509 l 10789 6511 l 10809 6513 l
- 10829 6515 l 10849 6516 l 10870 6517 l 10891 6518 l 10913 6518 l
- 10934 6518 l 10955 6517 l 10976 6516 l 10996 6515 l 11016 6513 l
- 11036 6511 l 11056 6509 l 11075 6506 l 11094 6503 l 11113 6500 l
- 11132 6496 l 11151 6492 l 11171 6488 l 11191 6483 l 11212 6478 l
- 11233 6472 l 11254 6466 l 11276 6459 l 11298 6452 l 11320 6445 l
- 11341 6437 l 11362 6429 l 11383 6421 l 11402 6413 l 11421 6405 l
- 11438 6396 l 11455 6388 l 11471 6379 l 11486 6371 l 11500 6363 l
- 11517 6352 l 11533 6340 l 11548 6328 l 11563 6316 l 11577 6303 l
- 11590 6289 l 11603 6275 l 11615 6261 l 11626 6246 l 11635 6232 l
- 11644 6217 l 11652 6203 l 11659 6189 l 11665 6176 l 11670 6163 l
- 11675 6150 l 11680 6135 l 11683 6120 l 11687 6104 l 11690 6087 l
- 11692 6067 l 11694 6046 l 11696 6023 l 11697 5999 l 11698 5976 l
- 11699 5955 l 11700 5939 l 11700 5930 l 11700 5926 l 11700 5925 l gs col0 s gr
-% Polyline
-gs clippath
-5959 1456 m 5925 1575 l 5899 1454 l 5895 1589 l 5954 1591 l cp
-clip
-n 5925 1575 m 5926 1545 l 5928 1524 l 5929 1501 l 5931 1477 l 5934 1454 l
- 5937 1433 l 5941 1413 l 5945 1396 l 5950 1380 l 5956 1365 l
- 5963 1350 l 5969 1337 l 5977 1324 l 5986 1311 l 5996 1297 l
- 6007 1283 l 6020 1268 l 6033 1254 l 6048 1239 l 6063 1225 l
- 6080 1211 l 6097 1197 l 6114 1184 l 6132 1172 l 6150 1160 l
- 6169 1148 l 6188 1138 l 6203 1129 l 6220 1121 l 6237 1112 l
- 6255 1104 l 6274 1095 l 6293 1087 l 6314 1079 l 6335 1071 l
- 6356 1063 l 6378 1055 l 6401 1048 l 6423 1041 l 6445 1034 l
- 6467 1028 l 6488 1022 l 6509 1017 l 6529 1012 l 6549 1008 l
- 6568 1004 l 6588 1000 l 6606 997 l 6625 994 l 6644 991 l
- 6664 989 l 6684 987 l 6704 985 l 6724 984 l 6745 983 l
- 6766 982 l 6788 982 l 6809 982 l 6830 983 l 6851 984 l
- 6871 985 l 6891 987 l 6911 989 l 6931 991 l 6950 994 l
- 6969 997 l 6988 1000 l 7007 1004 l 7026 1008 l 7046 1012 l
- 7066 1017 l 7087 1022 l 7108 1028 l 7129 1034 l 7151 1041 l
- 7173 1048 l 7195 1055 l 7216 1063 l 7237 1071 l 7258 1079 l
- 7277 1087 l 7296 1095 l 7313 1104 l 7330 1112 l 7346 1121 l
- 7361 1129 l 7375 1138 l 7392 1148 l 7408 1160 l 7423 1172 l
- 7438 1184 l 7452 1197 l 7465 1211 l 7478 1225 l 7490 1239 l
- 7501 1254 l 7510 1268 l 7519 1283 l 7527 1297 l 7534 1311 l
- 7540 1324 l 7545 1337 l 7550 1350 l 7555 1365 l 7558 1380 l
- 7562 1396 l 7565 1413 l 7567 1433 l 7569 1454 l 7571 1477 l
- 7572 1501 l 7573 1524 l 7574 1545 l 7575 1561 l 7575 1570 l
- 7575 1574 l 7575 1575 l gs col0 s gr gr
-
-% arrowhead
-n 5959 1456 m 5925 1575 l 5899 1454 l col0 s
-/Times-Roman-iso ff 300.00 scf sf
-10575 825 m
-gs 1 -1 sc (TASK) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 300.00 scf sf
-10575 600 m
-gs 1 -1 sc (EVENT MANAGEMENT) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 180.00 scf sf
-5025 6000 m
-gs 1 -1 sc (MANAGEMENT TASK) col0 sh gr
-/Times-Roman-iso ff 180.00 scf sf
-5250 5775 m
-gs 1 -1 sc (CREATE EVENT) col0 sh gr
-/Times-Roman-iso ff 180.00 scf sf
-4950 5550 m
-gs 1 -1 sc (IF ATTACH COMMAND) col0 sh gr
-/Times-Roman-iso ff 180.00 scf sf
-5925 7575 m
-gs 1 -1 sc (RELEASE SERIALIZE AND) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 180.00 scf sf
-5925 7350 m
-gs 1 -1 sc (IF CONTINUE COMMAND) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 180.00 scf sf
-5925 7800 m
-gs 1 -1 sc (CONTINUE SEMAPHORES) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 180.00 scf sf
-10050 5250 m
-gs 1 -1 sc (NOTIFY THE) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 180.00 scf sf
-10050 5475 m
-gs 1 -1 sc (DEBUGGEE CHANGES) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 180.00 scf sf
-10050 5700 m
-gs 1 -1 sc (TO GDB) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 300.00 scf sf
-6975 8175 m
-gs 1 -1 sc (\(1\)->) dup sw pop 2 div neg 0 rm col13 sh gr
-/Times-Roman-iso ff 300.00 scf sf
-11025 4275 m
-gs 1 -1 sc (\(2\)<-) dup sw pop 2 div neg 0 rm col1 sh gr
-/Times-Roman-iso ff 180.00 scf sf
-18525 2775 m
-gs 1 -1 sc (WAIT FOR) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 180.00 scf sf
-18525 3000 m
-gs 1 -1 sc (SERIALIZE) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 180.00 scf sf
-18525 3225 m
-gs 1 -1 sc (SEMAPHORE) dup sw pop 2 div neg 0 rm col0 sh gr
-% Ellipse
-n 18525 2925 1275 525 0 360 DrawEllipse gs col0 s gr
-
-% Ellipse
-n 18525 6450 1275 525 0 360 DrawEllipse gs col0 s gr
-
-% Ellipse
-n 18525 8250 1275 525 0 360 DrawEllipse gs col0 s gr
-
-% Ellipse
-n 18533 9976 1275 525 0 360 DrawEllipse gs col0 s gr
-
-% Ellipse
-n 18511 4735 1275 525 0 360 DrawEllipse gs col0 s gr
-
-% Polyline
-gs clippath
-18597 2300 m 18525 2400 l 18542 2277 l 18492 2403 l 18547 2425 l cp
-clip
-n 18525 2400 m 18675 2025 l 18375 2025 l 18525 1650 l gs col0 s gr gr
-
-% arrowhead
-n 18597 2300 m 18525 2400 l 18542 2277 l col0 s
-% Polyline
-gs clippath
-18555 4080 m 18525 4200 l 18495 4080 l 18495 4215 l 18555 4215 l cp
-clip
-n 18525 3450 m 18525 4200 l gs col0 s gr gr
-
-% arrowhead
-n 18555 4080 m 18525 4200 l 18495 4080 l col0 s
-% Polyline
-gs clippath
-18555 7605 m 18525 7725 l 18495 7605 l 18495 7740 l 18555 7740 l cp
-clip
-n 18525 6975 m 18525 7725 l gs col0 s gr gr
-
-% arrowhead
-n 18555 7605 m 18525 7725 l 18495 7605 l col0 s
-% Polyline
-gs clippath
-18555 9330 m 18525 9450 l 18495 9330 l 18495 9465 l 18555 9465 l cp
-clip
-n 18525 8775 m 18525 9450 l gs col0 s gr gr
-
-% arrowhead
-n 18555 9330 m 18525 9450 l 18495 9330 l col0 s
-% Polyline
-gs clippath
-18555 5805 m 18525 5925 l 18495 5805 l 18495 5940 l 18555 5940 l cp
-clip
-n 18525 5250 m 18525 5925 l gs col0 s gr gr
-
-% arrowhead
-n 18555 5805 m 18525 5925 l 18495 5805 l col0 s
-/Times-Roman-iso ff 300.00 scf sf
-18450 600 m
-gs 1 -1 sc ( DEBUG AND BREAKPOINT) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 300.00 scf sf
-18450 825 m
-gs 1 -1 sc (EXCEPTION HANDLER) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 180.00 scf sf
-18525 6900 m
-gs 1 -1 sc (SEMAPHORE) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 180.00 scf sf
-18525 6450 m
-gs 1 -1 sc (OR BREAKPOINT EXCEP,) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 180.00 scf sf
-18525 6225 m
-gs 1 -1 sc (IF SINGLE STEP) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 180.00 scf sf
-18525 6675 m
-gs 1 -1 sc (RELEASE WAKE-UP) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 180.00 scf sf
-18525 8100 m
-gs 1 -1 sc (WAIT FOR) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 180.00 scf sf
-18525 8550 m
-gs 1 -1 sc (SEMAPHORE) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 180.00 scf sf
-18525 8325 m
-gs 1 -1 sc (CONTINUE) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 180.00 scf sf
-17700 1425 m
-gs 1 -1 sc (RECEIVE EXCEPTION) col0 sh gr
-/Times-Roman-iso ff 300.00 scf sf
-17250 8850 m
-gs 1 -1 sc (->\(1\)) dup sw pop 2 div neg 0 rm col13 sh gr
-/Times-Roman-iso ff 300.00 scf sf
-17175 6975 m
-gs 1 -1 sc (<-\(2\)) dup sw pop 2 div neg 0 rm col1 sh gr
-/Times-Roman-iso ff 300.00 scf sf
-17250 3525 m
-gs 1 -1 sc (->\(1\)) dup sw pop 2 div neg 0 rm col13 sh gr
-/Times-Roman-iso ff 180.00 scf sf
-18525 10275 m
-gs 1 -1 sc (RETURN OF EXCEPTION) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 180.00 scf sf
-18525 10050 m
-gs 1 -1 sc (AND) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 180.00 scf sf
-18525 9825 m
-gs 1 -1 sc (RESTORE CONTEXT) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman-iso ff 180.00 scf sf
-18075 4950 m
-gs 1 -1 sc (CONTEXT) col0 sh gr
-/Times-Roman-iso ff 180.00 scf sf
-17700 4725 m
-gs 1 -1 sc (SAVE EXCEPTION ) col0 sh gr
-% Polyline
-60.000 slw
-n 16275 75 m 16050 75 16050 10500 225 arcto 4 {pop} repeat
- 16050 10725 20775 10725 225 arcto 4 {pop} repeat
- 21000 10725 21000 300 225 arcto 4 {pop} repeat
- 21000 75 16275 75 225 arcto 4 {pop} repeat
- cp gs col0 s gr
-$F2psEnd
-rs
diff --git a/doc/rgdb_specs/process.jpg b/doc/rgdb_specs/process.jpg
deleted file mode 100644
index ee14024a6d..0000000000
--- a/doc/rgdb_specs/process.jpg
+++ /dev/null
Binary files differ
diff --git a/doc/rgdb_specs/process.pdf b/doc/rgdb_specs/process.pdf
deleted file mode 100644
index 7cba5dc3f9..0000000000
--- a/doc/rgdb_specs/process.pdf
+++ /dev/null
Binary files differ
diff --git a/doc/rgdb_specs/revision.t b/doc/rgdb_specs/revision.t
deleted file mode 100644
index 9751d77784..0000000000
--- a/doc/rgdb_specs/revision.t
+++ /dev/null
@@ -1,42 +0,0 @@
-@c
-@c RTEMS Remote Debugger Server Specifications
-@c
-@c Written by: Eric Valette <valette@crf.canon.fr>
-@c Emmanuel Raguet <raguet@crf.canon.fr>
-@c
-@c
-@c $Id$
-@c
-
-@chapter Document Revision History
-
-@b{Current release} :
-
-@itemize @bullet
-@item Current applicable release is 2.0.
-@end itemize
-
-@b{Existing releases} :
-
-@itemize @bullet
-@item 0.1 : Released the 29/09/98. First draft of this document.
-
-@item 0.2 : Released the 05/10/98. Second draft version.
-
-@item 1.0 : Released the 08/10/98. Version Approved internally.
-
-@item 1.1 : Released the 13/13/98. Version Distributed for comments.
-
-@item 2.0 : Released the 01/11/98. Version including modifications related
-to comments we have got from the RTEMS mailing list. It also contains a
-more precise description of RGDBSD as we now have a first prototype,
-
-@end itemize
-
-@b{Planned releases} :
-
-@itemize @bullet
-@item 2.1 Final specification release intended to include a second round
-of comments,
-@end itemize
-
diff --git a/doc/rgdb_specs/rgdb_specs.texi b/doc/rgdb_specs/rgdb_specs.texi
deleted file mode 100644
index 143eafeae9..0000000000
--- a/doc/rgdb_specs/rgdb_specs.texi
+++ /dev/null
@@ -1,115 +0,0 @@
-\input texinfo @c -*-texinfo-*-
-@c %**start of header
-@setfilename rgdb_specs
-@syncodeindex vr fn
-@synindex ky cp
-@paragraphindent 0
-@c @smallbook
-@c %**end of header
-
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@c
-@c Master file for the Getting Started (C) Guide
-@c
-
-@include ../common/setup.texi
-
-@ignore
-@ifinfo
-@format
-START-INFO-DIR-ENTRY
-* RTEMS Remote Debugger Server Specifications (rgdb_specs):
-END-INFO-DIR-ENTRY
-@end format
-@end ifinfo
-@end ignore
-
-@c
-@c Title Page Stuff
-@c
-
-@set edition @value{RTEMS-EDITION}
-@set version @value{RTEMS-VERSION}
-@set update-date @value{RTEMS-UPDATE-DATE}
-@set update-month @value{RTEMS-UPDATE-MONTH}
-
-@c
-@c I don't really like having a short title page. --joel
-@c
-@c @shorttitlepage RTEMS Remote Debugger Server Specifications
-
-@setchapternewpage odd
-@settitle RTEMS Remote Debugger Server Specifications
-@titlepage
-@finalout
-
-@title RTEMS Remote Debugger Server Specifications
-@subtitle Edition @value{edition}, for @value{version}
-@sp 1
-@subtitle @value{update-month}
-@author Emmanuel Raguet and Eric Valette, Canon Research Centre
-@author On-Line Applications Research Corporation
-@page
-@include ../common/cpright.texi
-@end titlepage
-
-@c This prevents a black box from being printed on "overflow" lines.
-@c The alternative is to rework a sentence to avoid this problem.
-
-@include intro.texi
-@include revision.texi
-@include objectives.texi
-@include gdbinternals.texi
-@include interfacing.texi
-@include comm.texi
-@include daemon.texi
-@include conclusion.texi
-
-@ifinfo
-@node Top, Introduction, (dir), (dir)
-@top rgdb_specs
-
-This is the online version of the RTEMS Remote Debugger Server Specifications.
-
-@menu
-* Introduction::
-* Document Revision History::
-* Objectives::
-* A Rapid Tour of GDB Internals::
-* Interfacing GDB with RTEMS as a Target::
-* Communication with GDB::
-* RTEMS Debugger Server Daemon::
-* Conclusion::
-@end menu
-
-@c * Command and Variable Index::
-@c * Concept Index::
-@end ifinfo
-@c
-@c
-@c Need to copy the emacs stuff and "trailer stuff" (index, toc) into here
-@c
-
-@c @node Command and Variable Index, Concept Index, Installing EGCS AND NEWLIB, Top
-@c @unnumbered Command and Variable Index
-
-@c There are currently no Command and Variable Index entries.
-
-@c @printindex fn
-
-@c @node Concept Index, , Command and Variable Index, Top
-@c @unnumbered Concept Index
-
-@c There are currently no Concept Index entries.
-@c @printindex cp
-
-@contents
-@bye
-
diff --git a/doc/rgdb_specs/seqbreak.eps b/doc/rgdb_specs/seqbreak.eps
deleted file mode 100644
index ef3cdb69cc..0000000000
--- a/doc/rgdb_specs/seqbreak.eps
+++ /dev/null
@@ -1,311 +0,0 @@
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: seq_break.eps
-%%Creator: fig2dev Version 3.2 Patchlevel 1
-%%CreationDate: Tue Oct 13 14:00:22 1998
-%%For: valette@tri-yann (Eric Valette,,6891,)
-%%Orientation: Portrait
-%%BoundingBox: 0 0 522 1067
-%%Pages: 0
-%%BeginSetup
-%%EndSetup
-%%Magnification: 1.0000
-%%EndComments
-/$F2psDict 200 dict def
-$F2psDict begin
-$F2psDict /mtrx matrix put
-/col-1 {0 setgray} bind def
-/col0 {0.000 0.000 0.000 srgb} bind def
-/col1 {0.000 0.000 1.000 srgb} bind def
-/col2 {0.000 1.000 0.000 srgb} bind def
-/col3 {0.000 1.000 1.000 srgb} bind def
-/col4 {1.000 0.000 0.000 srgb} bind def
-/col5 {1.000 0.000 1.000 srgb} bind def
-/col6 {1.000 1.000 0.000 srgb} bind def
-/col7 {1.000 1.000 1.000 srgb} bind def
-/col8 {0.000 0.000 0.560 srgb} bind def
-/col9 {0.000 0.000 0.690 srgb} bind def
-/col10 {0.000 0.000 0.820 srgb} bind def
-/col11 {0.530 0.810 1.000 srgb} bind def
-/col12 {0.000 0.560 0.000 srgb} bind def
-/col13 {0.000 0.690 0.000 srgb} bind def
-/col14 {0.000 0.820 0.000 srgb} bind def
-/col15 {0.000 0.560 0.560 srgb} bind def
-/col16 {0.000 0.690 0.690 srgb} bind def
-/col17 {0.000 0.820 0.820 srgb} bind def
-/col18 {0.560 0.000 0.000 srgb} bind def
-/col19 {0.690 0.000 0.000 srgb} bind def
-/col20 {0.820 0.000 0.000 srgb} bind def
-/col21 {0.560 0.000 0.560 srgb} bind def
-/col22 {0.690 0.000 0.690 srgb} bind def
-/col23 {0.820 0.000 0.820 srgb} bind def
-/col24 {0.500 0.190 0.000 srgb} bind def
-/col25 {0.630 0.250 0.000 srgb} bind def
-/col26 {0.750 0.380 0.000 srgb} bind def
-/col27 {1.000 0.500 0.500 srgb} bind def
-/col28 {1.000 0.630 0.630 srgb} bind def
-/col29 {1.000 0.750 0.750 srgb} bind def
-/col30 {1.000 0.880 0.880 srgb} bind def
-/col31 {1.000 0.840 0.000 srgb} bind def
-
-end
-save
--40.0 1136.0 translate
-1 -1 scale
-
-/cp {closepath} bind def
-/ef {eofill} bind def
-/gr {grestore} bind def
-/gs {gsave} bind def
-/sa {save} bind def
-/rs {restore} bind def
-/l {lineto} bind def
-/m {moveto} bind def
-/rm {rmoveto} bind def
-/n {newpath} bind def
-/s {stroke} bind def
-/sh {show} bind def
-/slc {setlinecap} bind def
-/slj {setlinejoin} bind def
-/slw {setlinewidth} bind def
-/srgb {setrgbcolor} bind def
-/rot {rotate} bind def
-/sc {scale} bind def
-/sd {setdash} bind def
-/ff {findfont} bind def
-/sf {setfont} bind def
-/scf {scalefont} bind def
-/sw {stringwidth} bind def
-/tr {translate} bind def
-/tnt {dup dup currentrgbcolor
- 4 -2 roll dup 1 exch sub 3 -1 roll mul add
- 4 -2 roll dup 1 exch sub 3 -1 roll mul add
- 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
- bind def
-/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
- 4 -2 roll mul srgb} bind def
-/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
-/$F2psEnd {$F2psEnteredState restore end} def
-%%EndProlog
-
-$F2psBegin
-10 setmiterlimit
-n -1000 19922 m -1000 -1000 l 10365 -1000 l 10365 19922 l cp clip
- 0.06000 0.06000 sc
-/Times-Roman ff 300.00 scf sf
-7050 1350 m
-gs 1 -1 sc (TARGET) col0 sh gr
-/Times-Roman ff 300.00 scf sf
-6825 1650 m
-gs 1 -1 sc (DEPENDENT) col0 sh gr
-/Times-Roman ff 300.00 scf sf
-7275 1950 m
-gs 1 -1 sc (PART) col0 sh gr
-/Times-Roman ff 300.00 scf sf
-975 1725 m
-gs 1 -1 sc (INDEPENDENT) col0 sh gr
-/Times-Roman ff 300.00 scf sf
-1500 2025 m
-gs 1 -1 sc (PART) col0 sh gr
-/Times-Roman ff 300.00 scf sf
-1350 1425 m
-gs 1 -1 sc (TARGET) col0 sh gr
-% Polyline
-15.000 slw
-n 6000 2400 m 6000 18900 l gs col0 s gr
-% Polyline
-n 3600 2400 m 3600 18900 l gs col0 s gr
-% Polyline
-7.500 slw
-gs clippath
-5857 14614 m 5996 14662 l 5849 14674 l 6007 14694 l 6015 14634 l cp
-clip
-n 3596 14362 m 5996 14662 l gs col0 s gr gr
-
-% arrowhead
-n 5857 14614 m 5996 14662 l 5849 14674 l 5877 14647 l 5857 14614 l cp gs 0.00 setgray ef gr col0 s
-% Polyline
-gs clippath
-5855 16198 m 5994 16246 l 5847 16258 l 6005 16278 l 6013 16218 l cp
-clip
-n 3594 15946 m 5994 16246 l gs col0 s gr gr
-
-% arrowhead
-n 5855 16198 m 5994 16246 l 5847 16258 l 5875 16231 l 5855 16198 l cp gs 0.00 setgray ef gr col0 s
-% Polyline
-gs clippath
-5853 16742 m 5992 16790 l 5845 16802 l 6003 16822 l 6011 16762 l cp
-clip
-n 3592 16490 m 5992 16790 l gs col0 s gr gr
-
-% arrowhead
-n 5853 16742 m 5992 16790 l 5845 16802 l 5873 16775 l 5853 16742 l cp gs 0.00 setgray ef gr col0 s
-% Polyline
-gs clippath
-5857 10639 m 5996 10687 l 5849 10699 l 6007 10719 l 6015 10659 l cp
-clip
-n 3596 10387 m 5996 10687 l gs col0 s gr gr
-
-% arrowhead
-n 5857 10639 m 5996 10687 l 5849 10699 l 5877 10672 l 5857 10639 l cp gs 0.00 setgray ef gr col0 s
-% Polyline
-gs clippath
-5867 11156 m 6006 11204 l 5859 11216 l 6017 11236 l 6025 11176 l cp
-clip
-n 3606 10904 m 6006 11204 l gs col0 s gr gr
-
-% arrowhead
-n 5867 11156 m 6006 11204 l 5859 11216 l 5887 11189 l 5867 11156 l cp gs 0.00 setgray ef gr col0 s
-% Polyline
-gs clippath
-3746 11590 m 3599 11578 l 3738 11530 l 3580 11550 l 3588 11610 l cp
-clip
-n 5999 11278 m 3599 11578 l gs col0 s gr gr
-
-% arrowhead
-n 3746 11590 m 3599 11578 l 3738 11530 l 3718 11563 l 3746 11590 l cp gs 0.00 setgray ef gr col0 s
-% Polyline
-gs clippath
-5855 7873 m 5994 7921 l 5847 7933 l 6005 7953 l 6013 7893 l cp
-clip
-n 3594 7621 m 5994 7921 l gs col0 s gr gr
-
-% arrowhead
-n 5855 7873 m 5994 7921 l 5847 7933 l 5875 7906 l 5855 7873 l cp gs 0.00 setgray ef gr col0 s
-% Polyline
-gs clippath
-5853 8417 m 5992 8465 l 5845 8477 l 6003 8497 l 6011 8437 l cp
-clip
-n 3592 8165 m 5992 8465 l gs col0 s gr gr
-
-% arrowhead
-n 5853 8417 m 5992 8465 l 5845 8477 l 5873 8450 l 5853 8417 l cp gs 0.00 setgray ef gr col0 s
-% Polyline
-30.000 slw
-n 750 5625 m 9150 5625 l gs col0 s gr
-% Polyline
-n 825 12525 m 9225 12525 l gs col0 s gr
-% Polyline
-7.500 slw
-gs clippath
-5860 4386 m 5999 4434 l 5852 4446 l 6010 4466 l 6018 4406 l cp
-clip
-n 3599 4134 m 5999 4434 l gs col0 s gr gr
-
-% arrowhead
-n 5860 4386 m 5999 4434 l 5852 4446 l 5880 4419 l 5860 4386 l cp gs 0.00 setgray ef gr col0 s
-% Polyline
-gs clippath
-3743 4813 m 3596 4801 l 3735 4753 l 3577 4773 l 3585 4833 l cp
-clip
-n 5996 4501 m 3596 4801 l gs col0 s gr gr
-
-% arrowhead
-n 3743 4813 m 3596 4801 l 3735 4753 l 3715 4786 l 3743 4813 l cp gs 0.00 setgray ef gr col0 s
-% Polyline
-gs clippath
-3741 9894 m 3594 9882 l 3733 9834 l 3575 9854 l 3583 9914 l cp
-clip
-n 5994 9582 m 3594 9882 l gs col0 s gr gr
-
-% arrowhead
-n 3741 9894 m 3594 9882 l 3733 9834 l 3713 9867 l 3741 9894 l cp gs 0.00 setgray ef gr col0 s
-% Polyline
-gs clippath
-3741 15519 m 3594 15507 l 3733 15459 l 3575 15479 l 3583 15539 l cp
-clip
-n 5994 15207 m 3594 15507 l gs col0 s gr gr
-
-% arrowhead
-n 3741 15519 m 3594 15507 l 3733 15459 l 3713 15492 l 3741 15519 l cp gs 0.00 setgray ef gr col0 s
-/Times-Roman ff 300.00 scf sf
-3525 14775 m
-gs 1 -1 sc (Wait for event...) dup sw pop neg 0 rm col0 sh gr
-/Times-Roman ff 300.00 scf sf
-6075 15300 m
-gs 1 -1 sc (Notify a child change) col0 sh gr
-/Times-Roman ff 300.00 scf sf
-8475 15600 m
-gs 1 -1 sc (Wait for command ...) dup sw pop neg 0 rm col0 sh gr
-/Times-Roman ff 300.00 scf sf
-6075 15000 m
-gs 1 -1 sc (Debug Exception handler) col0 sh gr
-/Times-Roman ff 300.00 scf sf
-3450 16950 m
-gs 1 -1 sc (Wait for event...) dup sw pop neg 0 rm col0 sh gr
-/Times-Bold ff 300.00 scf sf
-3150 6525 m
-gs 1 -1 sc (Continue process : first time) col0 sh gr
-/Times-Bold ff 300.00 scf sf
-5700 2925 m
-gs 1 -1 sc (Set Breakpoint) dup sw pop neg 0 rm col0 sh gr
-/Times-Bold ff 300.00 scf sf
-2925 13425 m
-gs 1 -1 sc (Continue process : next times) col0 sh gr
-/Times-Roman ff 300.00 scf sf
-6150 9675 m
-gs 1 -1 sc (Notify a child change) col0 sh gr
-/Times-Roman ff 300.00 scf sf
-8550 9975 m
-gs 1 -1 sc (Wait for command ...) dup sw pop neg 0 rm col0 sh gr
-/Times-Roman ff 300.00 scf sf
-3525 11025 m
-gs 1 -1 sc (Ask information) dup sw pop neg 0 rm col0 sh gr
-/Times-Roman ff 300.00 scf sf
-6150 11325 m
-gs 1 -1 sc (Give information) col0 sh gr
-/Times-Roman ff 300.00 scf sf
-3450 11625 m
-gs 1 -1 sc (...) dup sw pop neg 0 rm col0 sh gr
-/Times-Roman ff 300.00 scf sf
-3450 8250 m
-gs 1 -1 sc (Resume process) dup sw pop neg 0 rm col0 sh gr
-/Times-Roman ff 300.00 scf sf
-3450 8625 m
-gs 1 -1 sc (Wait for event...) dup sw pop neg 0 rm col0 sh gr
-/Times-Roman ff 300.00 scf sf
-2250 10650 m
-gs 1 -1 sc (at address) col0 sh gr
-/Times-Roman ff 300.00 scf sf
-6150 9375 m
-gs 1 -1 sc (Breakpoint Except. handler) col0 sh gr
-/Times-Roman ff 300.00 scf sf
-4800 1650 m
-gs 1 -1 sc (message exchange) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman ff 300.00 scf sf
-3450 4800 m
-gs 1 -1 sc (...) dup sw pop neg 0 rm col0 sh gr
-/Times-Roman ff 300.00 scf sf
-3450 4200 m
-gs 1 -1 sc (Ask opcode at address) dup sw pop neg 0 rm col0 sh gr
-/Times-Roman ff 300.00 scf sf
-6150 4575 m
-gs 1 -1 sc (Send opcode ) col0 sh gr
-/Times-Roman ff 300.00 scf sf
-675 7650 m
-gs 1 -1 sc (Write "DEBUG" opcode) col0 sh gr
-/Times-Roman ff 300.00 scf sf
-8025 9075 m
-gs 1 -1 sc (DEBUG opcode) dup sw pop neg 0 rm col0 sh gr
-/Times-Roman ff 300.00 scf sf
-900 10425 m
-gs 1 -1 sc (Write previous opcode) col0 sh gr
-/Times-Roman ff 300.00 scf sf
-2400 7875 m
-gs 1 -1 sc (at address) col0 sh gr
-/Times-Roman ff 300.00 scf sf
-750 15900 m
-gs 1 -1 sc (Write "DEBUG" opcode) col0 sh gr
-/Times-Roman ff 300.00 scf sf
-2400 16125 m
-gs 1 -1 sc (at address) col0 sh gr
-/Times-Roman ff 300.00 scf sf
-3450 14475 m
-gs 1 -1 sc (Single Step command) dup sw pop neg 0 rm col0 sh gr
-/Times-Roman ff 300.00 scf sf
-3450 16575 m
-gs 1 -1 sc (Continue command) dup sw pop neg 0 rm col0 sh gr
-/Times-Roman ff 300.00 scf sf
-6150 16950 m
-gs 1 -1 sc (Resume process) col0 sh gr
-$F2psEnd
-rs
diff --git a/doc/rgdb_specs/seqbreak.jpg b/doc/rgdb_specs/seqbreak.jpg
deleted file mode 100644
index 2d31d9796d..0000000000
--- a/doc/rgdb_specs/seqbreak.jpg
+++ /dev/null
Binary files differ
diff --git a/doc/rgdb_specs/seqbreak.pdf b/doc/rgdb_specs/seqbreak.pdf
deleted file mode 100644
index 80e99eab5d..0000000000
--- a/doc/rgdb_specs/seqbreak.pdf
+++ /dev/null
Binary files differ
diff --git a/doc/rgdb_specs/seqdetach.eps b/doc/rgdb_specs/seqdetach.eps
deleted file mode 100644
index 2a143977da..0000000000
--- a/doc/rgdb_specs/seqdetach.eps
+++ /dev/null
@@ -1,167 +0,0 @@
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: seq_detach.eps
-%%Creator: fig2dev Version 3.2 Patchlevel 1
-%%CreationDate: Tue Oct 13 14:00:31 1998
-%%For: valette@tri-yann (Eric Valette,,6891,)
-%%Orientation: Portrait
-%%BoundingBox: 0 0 427 293
-%%Pages: 0
-%%BeginSetup
-%%EndSetup
-%%Magnification: 1.0000
-%%EndComments
-/$F2psDict 200 dict def
-$F2psDict begin
-$F2psDict /mtrx matrix put
-/col-1 {0 setgray} bind def
-/col0 {0.000 0.000 0.000 srgb} bind def
-/col1 {0.000 0.000 1.000 srgb} bind def
-/col2 {0.000 1.000 0.000 srgb} bind def
-/col3 {0.000 1.000 1.000 srgb} bind def
-/col4 {1.000 0.000 0.000 srgb} bind def
-/col5 {1.000 0.000 1.000 srgb} bind def
-/col6 {1.000 1.000 0.000 srgb} bind def
-/col7 {1.000 1.000 1.000 srgb} bind def
-/col8 {0.000 0.000 0.560 srgb} bind def
-/col9 {0.000 0.000 0.690 srgb} bind def
-/col10 {0.000 0.000 0.820 srgb} bind def
-/col11 {0.530 0.810 1.000 srgb} bind def
-/col12 {0.000 0.560 0.000 srgb} bind def
-/col13 {0.000 0.690 0.000 srgb} bind def
-/col14 {0.000 0.820 0.000 srgb} bind def
-/col15 {0.000 0.560 0.560 srgb} bind def
-/col16 {0.000 0.690 0.690 srgb} bind def
-/col17 {0.000 0.820 0.820 srgb} bind def
-/col18 {0.560 0.000 0.000 srgb} bind def
-/col19 {0.690 0.000 0.000 srgb} bind def
-/col20 {0.820 0.000 0.000 srgb} bind def
-/col21 {0.560 0.000 0.560 srgb} bind def
-/col22 {0.690 0.000 0.690 srgb} bind def
-/col23 {0.820 0.000 0.820 srgb} bind def
-/col24 {0.500 0.190 0.000 srgb} bind def
-/col25 {0.630 0.250 0.000 srgb} bind def
-/col26 {0.750 0.380 0.000 srgb} bind def
-/col27 {1.000 0.500 0.500 srgb} bind def
-/col28 {1.000 0.630 0.630 srgb} bind def
-/col29 {1.000 0.750 0.750 srgb} bind def
-/col30 {1.000 0.880 0.880 srgb} bind def
-/col31 {1.000 0.840 0.000 srgb} bind def
-
-end
-save
--72.0 362.0 translate
-1 -1 scale
-
-/cp {closepath} bind def
-/ef {eofill} bind def
-/gr {grestore} bind def
-/gs {gsave} bind def
-/sa {save} bind def
-/rs {restore} bind def
-/l {lineto} bind def
-/m {moveto} bind def
-/rm {rmoveto} bind def
-/n {newpath} bind def
-/s {stroke} bind def
-/sh {show} bind def
-/slc {setlinecap} bind def
-/slj {setlinejoin} bind def
-/slw {setlinewidth} bind def
-/srgb {setrgbcolor} bind def
-/rot {rotate} bind def
-/sc {scale} bind def
-/sd {setdash} bind def
-/ff {findfont} bind def
-/sf {setfont} bind def
-/scf {scalefont} bind def
-/sw {stringwidth} bind def
-/tr {translate} bind def
-/tnt {dup dup currentrgbcolor
- 4 -2 roll dup 1 exch sub 3 -1 roll mul add
- 4 -2 roll dup 1 exch sub 3 -1 roll mul add
- 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
- bind def
-/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
- 4 -2 roll mul srgb} bind def
-/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
-/$F2psEnd {$F2psEnteredState restore end} def
-%%EndProlog
-
-$F2psBegin
-10 setmiterlimit
-n -1000 7022 m -1000 -1000 l 9307 -1000 l 9307 7022 l cp clip
- 0.06000 0.06000 sc
-/Times-Roman ff 300.00 scf sf
-1200 1680 m
-gs 1 -1 sc (INDEPENDENT) col0 sh gr
-/Times-Roman ff 300.00 scf sf
-1800 1950 m
-gs 1 -1 sc (PART) col0 sh gr
-/Times-Roman ff 300.00 scf sf
-1575 1425 m
-gs 1 -1 sc (TARGET) col0 sh gr
-/Times-Roman ff 300.00 scf sf
-6450 1680 m
-gs 1 -1 sc (DEPENDENT) col0 sh gr
-/Times-Roman ff 300.00 scf sf
-6675 1350 m
-gs 1 -1 sc (TARGET) col0 sh gr
-/Times-Roman ff 300.00 scf sf
-6900 1950 m
-gs 1 -1 sc (PART) col0 sh gr
-% Polyline
-15.000 slw
-n 3600 2400 m 3600 6000 l gs col0 s gr
-% Polyline
-n 6000 2400 m 6000 6000 l gs col0 s gr
-% Polyline
-7.500 slw
-gs clippath
-5861 3927 m 6000 3975 l 5853 3987 l 6011 4007 l 6019 3947 l cp
-clip
-n 3600 3675 m 6000 3975 l gs col0 s gr gr
-
-% arrowhead
-n 5861 3927 m 6000 3975 l 5853 3987 l 5881 3960 l 5861 3927 l cp gs 0.00 setgray ef gr col0 s
-% Polyline
-gs clippath
-5861 5427 m 6000 5475 l 5853 5487 l 6011 5507 l 6019 5447 l cp
-clip
-n 3600 5175 m 6000 5475 l gs col0 s gr gr
-
-% arrowhead
-n 5861 5427 m 6000 5475 l 5853 5487 l 5881 5460 l 5861 5427 l cp gs 0.00 setgray ef gr col0 s
-% Polyline
-gs clippath
-3747 4643 m 3600 4631 l 3739 4583 l 3581 4603 l 3589 4663 l cp
-clip
-n 6000 4331 m 3600 4631 l gs col0 s gr gr
-
-% arrowhead
-n 3747 4643 m 3600 4631 l 3739 4583 l 3719 4616 l 3747 4643 l cp gs 0.00 setgray ef gr col0 s
-/Times-Bold ff 300.00 scf sf
-4800 2700 m
-gs 1 -1 sc (Detach a process) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman ff 300.00 scf sf
-2550 3750 m
-gs 1 -1 sc (Detach a process) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman ff 300.00 scf sf
-7200 4050 m
-gs 1 -1 sc (Detach the process) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman ff 300.00 scf sf
-6150 4425 m
-gs 1 -1 sc (Notify detach) col0 sh gr
-/Times-Roman ff 300.00 scf sf
-6150 4800 m
-gs 1 -1 sc (Resume process) col0 sh gr
-/Times-Roman ff 300.00 scf sf
-3450 5250 m
-gs 1 -1 sc (Close connection) dup sw pop neg 0 rm col0 sh gr
-/Times-Roman ff 300.00 scf sf
-8100 5625 m
-gs 1 -1 sc (Close connection) dup sw pop neg 0 rm col0 sh gr
-/Times-Roman ff 300.00 scf sf
-4800 1650 m
-gs 1 -1 sc (messages exchange) dup sw pop 2 div neg 0 rm col0 sh gr
-$F2psEnd
-rs
diff --git a/doc/rgdb_specs/seqdetach.jpg b/doc/rgdb_specs/seqdetach.jpg
deleted file mode 100644
index a42f9e5d7a..0000000000
--- a/doc/rgdb_specs/seqdetach.jpg
+++ /dev/null
Binary files differ
diff --git a/doc/rgdb_specs/seqdetach.pdf b/doc/rgdb_specs/seqdetach.pdf
deleted file mode 100644
index ed108a1913..0000000000
--- a/doc/rgdb_specs/seqdetach.pdf
+++ /dev/null
Binary files differ
diff --git a/doc/rgdb_specs/seqinit.eps b/doc/rgdb_specs/seqinit.eps
deleted file mode 100644
index 496cf69218..0000000000
--- a/doc/rgdb_specs/seqinit.eps
+++ /dev/null
@@ -1,204 +0,0 @@
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: seq_init.eps
-%%Creator: fig2dev Version 3.2 Patchlevel 1
-%%CreationDate: Tue Oct 13 13:59:59 1998
-%%For: valette@tri-yann (Eric Valette,,6891,)
-%%Orientation: Portrait
-%%BoundingBox: 0 0 482 527
-%%Pages: 0
-%%BeginSetup
-%%EndSetup
-%%Magnification: 1.0000
-%%EndComments
-/$F2psDict 200 dict def
-$F2psDict begin
-$F2psDict /mtrx matrix put
-/col-1 {0 setgray} bind def
-/col0 {0.000 0.000 0.000 srgb} bind def
-/col1 {0.000 0.000 1.000 srgb} bind def
-/col2 {0.000 1.000 0.000 srgb} bind def
-/col3 {0.000 1.000 1.000 srgb} bind def
-/col4 {1.000 0.000 0.000 srgb} bind def
-/col5 {1.000 0.000 1.000 srgb} bind def
-/col6 {1.000 1.000 0.000 srgb} bind def
-/col7 {1.000 1.000 1.000 srgb} bind def
-/col8 {0.000 0.000 0.560 srgb} bind def
-/col9 {0.000 0.000 0.690 srgb} bind def
-/col10 {0.000 0.000 0.820 srgb} bind def
-/col11 {0.530 0.810 1.000 srgb} bind def
-/col12 {0.000 0.560 0.000 srgb} bind def
-/col13 {0.000 0.690 0.000 srgb} bind def
-/col14 {0.000 0.820 0.000 srgb} bind def
-/col15 {0.000 0.560 0.560 srgb} bind def
-/col16 {0.000 0.690 0.690 srgb} bind def
-/col17 {0.000 0.820 0.820 srgb} bind def
-/col18 {0.560 0.000 0.000 srgb} bind def
-/col19 {0.690 0.000 0.000 srgb} bind def
-/col20 {0.820 0.000 0.000 srgb} bind def
-/col21 {0.560 0.000 0.560 srgb} bind def
-/col22 {0.690 0.000 0.690 srgb} bind def
-/col23 {0.820 0.000 0.820 srgb} bind def
-/col24 {0.500 0.190 0.000 srgb} bind def
-/col25 {0.630 0.250 0.000 srgb} bind def
-/col26 {0.750 0.380 0.000 srgb} bind def
-/col27 {1.000 0.500 0.500 srgb} bind def
-/col28 {1.000 0.630 0.630 srgb} bind def
-/col29 {1.000 0.750 0.750 srgb} bind def
-/col30 {1.000 0.880 0.880 srgb} bind def
-/col31 {1.000 0.840 0.000 srgb} bind def
-
-end
-save
--56.0 596.0 translate
-1 -1 scale
-
-/cp {closepath} bind def
-/ef {eofill} bind def
-/gr {grestore} bind def
-/gs {gsave} bind def
-/sa {save} bind def
-/rs {restore} bind def
-/l {lineto} bind def
-/m {moveto} bind def
-/rm {rmoveto} bind def
-/n {newpath} bind def
-/s {stroke} bind def
-/sh {show} bind def
-/slc {setlinecap} bind def
-/slj {setlinejoin} bind def
-/slw {setlinewidth} bind def
-/srgb {setrgbcolor} bind def
-/rot {rotate} bind def
-/sc {scale} bind def
-/sd {setdash} bind def
-/ff {findfont} bind def
-/sf {setfont} bind def
-/scf {scalefont} bind def
-/sw {stringwidth} bind def
-/tr {translate} bind def
-/tnt {dup dup currentrgbcolor
- 4 -2 roll dup 1 exch sub 3 -1 roll mul add
- 4 -2 roll dup 1 exch sub 3 -1 roll mul add
- 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
- bind def
-/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
- 4 -2 roll mul srgb} bind def
-/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
-/$F2psEnd {$F2psEnteredState restore end} def
-%%EndProlog
-
-$F2psBegin
-10 setmiterlimit
-n -1000 10922 m -1000 -1000 l 9958 -1000 l 9958 10922 l cp clip
- 0.06000 0.06000 sc
-/Times-Roman ff 300.00 scf sf
-1200 1680 m
-gs 1 -1 sc (INDEPENDENT) col0 sh gr
-/Times-Roman ff 300.00 scf sf
-1500 1350 m
-gs 1 -1 sc (TARGET) col0 sh gr
-/Times-Roman ff 300.00 scf sf
-1650 2025 m
-gs 1 -1 sc (PART) col0 sh gr
-/Times-Roman ff 300.00 scf sf
-7125 1350 m
-gs 1 -1 sc (TARGET) col0 sh gr
-/Times-Roman ff 300.00 scf sf
-7275 1950 m
-gs 1 -1 sc (PART) col0 sh gr
-/Times-Roman ff 300.00 scf sf
-6750 1650 m
-gs 1 -1 sc (DEPENDENT) col0 sh gr
-% Polyline
-7.500 slw
-gs clippath
-5861 3927 m 6000 3975 l 5853 3987 l 6011 4007 l 6019 3947 l cp
-clip
-n 3600 3675 m 6000 3975 l gs col0 s gr gr
-
-% arrowhead
-n 5861 3927 m 6000 3975 l 5853 3987 l 5881 3960 l 5861 3927 l cp gs 0.00 setgray ef gr col0 s
-% Polyline
-gs clippath
-3745 4380 m 3598 4368 l 3737 4320 l 3579 4340 l 3587 4400 l cp
-clip
-n 5998 4068 m 3598 4368 l gs col0 s gr gr
-
-% arrowhead
-n 3745 4380 m 3598 4368 l 3737 4320 l 3717 4353 l 3745 4380 l cp gs 0.00 setgray ef gr col0 s
-/Times-Roman ff 300.00 scf sf
-2550 3750 m
-gs 1 -1 sc (Open connection) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman ff 300.00 scf sf
-7125 4050 m
-gs 1 -1 sc (Accept connection) dup sw pop 2 div neg 0 rm col0 sh gr
-% Polyline
-15.000 slw
-n 3600 2400 m 3600 9825 l gs col0 s gr
-% Polyline
-n 6000 2400 m 6000 9900 l gs col0 s gr
-% Polyline
-30.000 slw
-n 975 5100 m 8925 5100 l gs col0 s gr
-% Polyline
-7.500 slw
-gs clippath
-5861 7002 m 6000 7050 l 5853 7062 l 6011 7082 l 6019 7022 l cp
-clip
-n 3600 6750 m 6000 7050 l gs col0 s gr gr
-
-% arrowhead
-n 5861 7002 m 6000 7050 l 5853 7062 l 5881 7035 l 5861 7002 l cp gs 0.00 setgray ef gr col0 s
-% Polyline
-gs clippath
-5865 8399 m 6004 8447 l 5857 8459 l 6015 8479 l 6023 8419 l cp
-clip
-n 3604 8147 m 6004 8447 l gs col0 s gr gr
-
-% arrowhead
-n 5865 8399 m 6004 8447 l 5857 8459 l 5885 8432 l 5865 8399 l cp gs 0.00 setgray ef gr col0 s
-% Polyline
-gs clippath
-3746 8815 m 3599 8803 l 3738 8755 l 3580 8775 l 3588 8835 l cp
-clip
-n 5999 8503 m 3599 8803 l gs col0 s gr gr
-
-% arrowhead
-n 3746 8815 m 3599 8803 l 3738 8755 l 3718 8788 l 3746 8815 l cp gs 0.00 setgray ef gr col0 s
-% Polyline
-gs clippath
-3748 7709 m 3601 7697 l 3740 7649 l 3582 7669 l 3590 7729 l cp
-clip
-n 6001 7397 m 3601 7697 l gs col0 s gr gr
-
-% arrowhead
-n 3748 7709 m 3601 7697 l 3740 7649 l 3720 7682 l 3748 7709 l cp gs 0.00 setgray ef gr col0 s
-/Times-Bold ff 300.00 scf sf
-4800 2850 m
-gs 1 -1 sc (Connect on target) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Bold ff 300.00 scf sf
-4800 5850 m
-gs 1 -1 sc (Attach a process) dup sw pop 2 div neg 0 rm col0 sh gr
-/Times-Roman ff 300.00 scf sf
-3525 6825 m
-gs 1 -1 sc (Attach a process) dup sw pop neg 0 rm col0 sh gr
-/Times-Roman ff 300.00 scf sf
-6150 7125 m
-gs 1 -1 sc (Stop the process) col0 sh gr
-/Times-Roman ff 300.00 scf sf
-6150 7500 m
-gs 1 -1 sc (Notify a child change) col0 sh gr
-/Times-Roman ff 300.00 scf sf
-6150 8550 m
-gs 1 -1 sc (Give information) col0 sh gr
-/Times-Roman ff 300.00 scf sf
-3150 8850 m
-gs 1 -1 sc (...) dup sw pop neg 0 rm col0 sh gr
-/Times-Roman ff 300.00 scf sf
-3525 8250 m
-gs 1 -1 sc (Ask information) dup sw pop neg 0 rm col0 sh gr
-/Times-Roman ff 300.00 scf sf
-4800 2025 m
-gs 1 -1 sc (messages exchange) dup sw pop 2 div neg 0 rm col0 sh gr
-$F2psEnd
-rs
diff --git a/doc/rgdb_specs/seqinit.jpg b/doc/rgdb_specs/seqinit.jpg
deleted file mode 100644
index 29714a181d..0000000000
--- a/doc/rgdb_specs/seqinit.jpg
+++ /dev/null
Binary files differ
diff --git a/doc/rgdb_specs/seqinit.pdf b/doc/rgdb_specs/seqinit.pdf
deleted file mode 100644
index 03604fce0b..0000000000
--- a/doc/rgdb_specs/seqinit.pdf
+++ /dev/null
Binary files differ
diff --git a/doc/rtems_footer.html b/doc/rtems_footer.html
deleted file mode 100644
index 07179683c9..0000000000
--- a/doc/rtems_footer.html
+++ /dev/null
@@ -1 +0,0 @@
-<P>Copyright &copy; 1988-2000 <A HREF="http://www.oarcorp.com" target="Text Frame">OAR Corporation</A>
diff --git a/doc/rtems_gdb/Makefile b/doc/rtems_gdb/Makefile
deleted file mode 100644
index db911b4d86..0000000000
--- a/doc/rtems_gdb/Makefile
+++ /dev/null
@@ -1,94 +0,0 @@
-#
-# COPYRIGHT (c) 1988-1999.
-# On-Line Applications Research Corporation (OAR).
-# All rights reserved.
-#
-# $Id$
-#
-
-PROJECT=rtems_gdb
-
-include ../Make.config
-
-all: html info ps pdf
-
-dirs:
- $(make-dirs)
-
-COMMON_FILES=../common/cpright.texi ../common/setup.texi
-
-GENERATED_FILES= \
- intro.texi swarch.texi started.texi commands.texi trouble.texi example.texi
-
-FILES=$(PROJECT).texi $(GENERATED_FILES)
-
-INFOFILES=$(wildcard $(PROJECT) $(PROJECT)-*)
-
-info: dirs $(PROJECT)
- #cp $(wildcard $(PROJECT) $(PROJECT)-*) $(INFO_INSTALL)
- # cp $(PROJECT) $(INFO_INSTALL)
-
-$(PROJECT): $(FILES)
- $(MAKEINFO) $(PROJECT).texi
-
-dvi: dirs $(PROJECT).dvi
-ps: dirs $(PROJECT).ps
-pdf: dirs $(PROJECT).pdf
-
-$(PROJECT).pdf: $(FILES)
- $(TEXI2PDF) $(PROJECT).texi
- cp $(PROJECT).pdf $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).ps: $(PROJECT).dvi
- dvips -o $(PROJECT).ps $(PROJECT).dvi
- cp $(PROJECT).ps $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).dvi: $(FILES)
- $(TEXI2DVI) $(PROJECT).texi
- cp $(PROJECT).dvi $(WWW_INSTALL)/$(PROJECT)
-
-html: dirs $(FILES)
- -mkdir -p $(WWW_INSTALL)/$(PROJECT)
- $(TEXI2WWW) $(TEXI2WWW_ARGS) -dir $(WWW_INSTALL)/$(PROJECT) \
- $(PROJECT).texi
-
-clean:
- rm -f *.o $(PROG) *.txt core $(PROJECT).pdf
- rm -f *.dvi *.ps *.log *.aux *.cp *.fn *.ky *.pg *.toc *.tp *.vr $(BASE)
- rm -f $(PROJECT) $(PROJECT)-* $(GENERATED_FILES)
- rm -f *.fixed _* network.t
-
-#
-# Process Automatically Generated Files
-#
-
-intro.texi: intro.t Makefile
- $(BMENU) -p "Top" \
- -u "Top" \
- -n "Software Architecture" ${*}.t
-
-swarch.texi: swarch.t Makefile
- $(BMENU) -p "Introduction" \
- -u "Top" \
- -n "Getting Started" ${*}.t
-
-started.texi: started.t Makefile
- $(BMENU) -p "Software Architecture" \
- -u "Top" \
- -n "Commands" ${*}.t
-
-commands.texi: commands.t Makefile
- $(BMENU) -p "Getting Started Attaching To The System" \
- -u "Top" \
- -n "Troubleshooting" ${*}.t
-
-trouble.texi: trouble.t Makefile
- $(BMENU) -p "Commands Thread control" \
- -u "Top" \
- -n "Debug Session Example" ${*}.t
-
-example.texi: example.t Makefile
- $(BMENU) -p "Troubleshooting Debug server not present" \
- -u "Top" \
- -n "" ${*}.t
-
diff --git a/doc/rtems_gdb/commands.t b/doc/rtems_gdb/commands.t
deleted file mode 100644
index a0c6a457ce..0000000000
--- a/doc/rtems_gdb/commands.t
+++ /dev/null
@@ -1,51 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Commands
-
-The usual GDB commands are available to display or modify data structures and
-machine registers, disassemble code, display source listings, set and reset
-breakpoints, control the debuggee execution, etc. Refer to Debugging with GDB
-for a complete documentation of the standard GDB commands.
-
-GDB 4.17 has been extended with a number of commands specifically
-for multi-threaded debugging within a RTEMS host-target environment. These commands
-are described in this section.
-
-
-@section Host-target connection control
-
-@itemize @bullet
-@item (gdb) setrpcmode sun : specifies the SUN RPC type.
-@item (gdb) setdaemontype rdbg : specifies the RDBG debug server type.
-@item (gdb) target rtems target-name : specifies the target type.
-@end itemize
-
-@section System status information
-
-@itemize @bullet
-@item (gdb) info threads : gives a list of all threads in the debuggee,
-their names, identifiers and states. It also indicates which thread is
-the target thread.
-@end itemize
-
-
-@section Thread control
-
-@itemize @bullet
-@item (gdb) thread target [id] : allows the user to get/set the target thread.
-The argument id is either the thread's symbolic name or its local identifier.
-@item (gdb) thread detach [id...] : all stops (breakpoints) of some specified
-thread(s) can be ignored using the thread detach command. Each time a detached
-thread hits a breakpoint, RTEMS/GDB will automatically restart the debuggee
-without passing control to the user.
-@item (gdb) thread attach [id...] : (re)attach specified thread(s).
-@end itemize
-
-
-
diff --git a/doc/rtems_gdb/example.t b/doc/rtems_gdb/example.t
deleted file mode 100644
index a7b55e4f84..0000000000
--- a/doc/rtems_gdb/example.t
+++ /dev/null
@@ -1,88 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Debug Session Example
-
-The following is a debug session. Note that some lines have been broken
-to aviod formatting problems in the printed document.
-
-@example
-GNU gdb 4.17
-Copyright 1998 Free Software Foundation, Inc.
-GDB is free software, covered by the GNU General Public License, and
-you are welcome to change it and/or distribute copies of it under
-certain conditions. Type "show copying" to see the conditions.
-There is absolutely no warranty for GDB.
-Type "show warranty" for details.
-This GDB was configured as --host=i686-pc-linux-gnu --target=i386-rtems.
-(gdb) setrpcmode sun
-(gdb) setdaemontype rdbg
-(gdb) target rtems usnet-test
-Attaching remote machine across net...
-Connected to usnet-test.
-Now the "run" command will start a remote process.
-(gdb) file /buildr4/pc386/tests/debug.exe
-Reading symbols from /buildr4/pc386/tests/debug.exe...done.
-(gdb) attach 1
-Attaching program: /buildr4/pc386/tests/debug.exe pid 1
-0x22fe65 in enterRdbg ()
-(gdb) info threads
-There are 8 threads:
-Id. Name Detached Suspended
-134283273 Rini No No <= current target thread
-0x22fe65 in enterRdbg ()
-134283272 Evnt No No
-_Thread_Dispatch () at /rtems4/c/src/exec/score/src/thread.c:315
-134283271 SPE2 No No
-_Thread_Dispatch () at /rtems4/c/src/exec/score/src/thread.c:315
-134283270 SPE1 No No
-_Thread_Handler () at /rtems4/c/src/exec/score/src/thread.c:1107
-134283269 RDBG No No
-0x22fe65 in enterRdbg ()
-134283268 SCrx No No
-_Thread_Dispatch () at /rtems4/c/src/exec/score/src/thread.c:315
-134283267 SCtx No No
-_Thread_Dispatch () at /rtems4/c/src/exec/score/src/thread.c:315
-134283266 ntwk No No
-_Thread_Dispatch () at /rtems4/c/src/exec/score/src/thread.c:315
-(gdb) b init.c:92
-Breakpoint 1 at 0x200180: file \
- /rtems4/c/src/tests/samples/debug/init.c, line 92.
-(gdb) c
-Continuing.
-Thread 134283273 (Rini) has been deleted.
-[Switching to Rtems thread 134283271 (Not suspended) \
- ( <= current target thread )]
-Breakpoint 1, example2 (argument=4) at \
- /rtems4/c/src/tests/samples/debug/init.c:92
-92 tuto += tuti;
-(gdb) b init.c:66
-Breakpoint 2 at 0x200128: file \
- /rtems4/c/src/tests/samples/debug/init.c, line 66.
-(gdb) c
-Continuing.
-[Switching to Rtems thread 134283270 (Not suspended) \
- ( <= current target thread )]
-Breakpoint 2, example1 (argument=4) at \
- /rtems4/c/src/tests/samples/debug/init.c:66
-66 toto += titi;
-(gdb) c
-Continuing.
-[Switching to Rtems thread 134283271 (Not suspended) \
- ( <= current target thread )]
-Breakpoint 1, example2 (argument=4) at \
- /rtems4/c/src/tests/samples/debug/init.c:92
-92 tuto += tuti;
-(gdb) s
-93 if (print_enable2)
-(gdb) detach
-Detaching program: /buildr4/pc386/tests/debug.exe pid 1
-Warning: the next command will be done localy!
-If you want to restart another remote program, reuse the target command
-(gdb) quit
-@end example
diff --git a/doc/rtems_gdb/intro.t b/doc/rtems_gdb/intro.t
deleted file mode 100644
index 063a5c959d..0000000000
--- a/doc/rtems_gdb/intro.t
+++ /dev/null
@@ -1,22 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Introduction
-
-GDB 4.17 is a source-level symbolic debugger for RTEMS environment.
-This version is an extension of GNU GDB version 4.17, adapted for the debugging
-of RTEMS applications in a heterogeneous host-target environment.
-
-This paper documents @b{only} the RTEMS/GDB extensions to GNU
-GDB 4.17, as well as its use in the RTEMS environment. The reader is assumed
-to be familiar with GNU GDB.
-
-The RTEMS project would like to thank Emmanuel Raguet (raguet@@crf.canon.fr)
-and Eric Valette (valette@@crf.canon.fr) of the Canon Research Centre
-France S.A. for developing and documenting RTEMS/GDB and submitting it.
-
diff --git a/doc/rtems_gdb/rtems_gdb.texi b/doc/rtems_gdb/rtems_gdb.texi
deleted file mode 100644
index cf527b5232..0000000000
--- a/doc/rtems_gdb/rtems_gdb.texi
+++ /dev/null
@@ -1,111 +0,0 @@
-\input texinfo @c -*-texinfo-*-
-@c %**start of header
-@setfilename rtems_gdb
-@syncodeindex vr fn
-@synindex ky cp
-@paragraphindent 0
-@c @smallbook
-@c %**end of header
-
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@c
-@c Master file for the Getting Started (C) Guide
-@c
-
-@include ../common/setup.texi
-
-@ignore
-@ifinfo
-@format
-START-INFO-DIR-ENTRY
-* RTEMS/GDB User's Guide (rtems_gdb):
-END-INFO-DIR-ENTRY
-@end format
-@end ifinfo
-@end ignore
-
-@c
-@c Title Page Stuff
-@c
-
-@set edition @value{RTEMS-EDITION}
-@set version @value{RTEMS-VERSION}
-@set update-date @value{RTEMS-UPDATE-DATE}
-@set update-month @value{RTEMS-UPDATE-MONTH}
-
-@c
-@c I don't really like having a short title page. --joel
-@c
-@c @shorttitlepage RTEMS/GDB User's Guide
-
-@setchapternewpage odd
-@settitle RTEMS/GDB User's Guide
-@titlepage
-@finalout
-
-@title RTEMS/GDB User's Guide
-@subtitle Edition @value{edition}, for @value{version}
-@sp 1
-@subtitle @value{update-month}
-@author Emmanuel Raguet and Eric Valette, Canon Research Centre
-@author On-Line Applications Research Corporation
-@page
-@include ../common/cpright.texi
-@end titlepage
-
-@c This prevents a black box from being printed on "overflow" lines.
-@c The alternative is to rework a sentence to avoid this problem.
-
-@include intro.texi
-@include swarch.texi
-@include started.texi
-@include commands.texi
-@include trouble.texi
-@include example.texi
-
-@ifinfo
-@node Top, Introduction, (dir), (dir)
-@top rtems_gdb
-
-This is the online version of the RTEMS/GDB User's Guide.
-
-@menu
-* Introduction::
-* Software Architecture::
-* Getting Started::
-* Commands::
-* Troubleshooting::
-* Debug Session Example::
-@end menu
-
-@c * Command and Variable Index::
-@c * Concept Index::
-@end ifinfo
-@c
-@c
-@c Need to copy the emacs stuff and "trailer stuff" (index, toc) into here
-@c
-
-@c @node Command and Variable Index, Concept Index, Installing EGCS AND NEWLIB, Top
-@c @unnumbered Command and Variable Index
-
-@c There are currently no Command and Variable Index entries.
-
-@c @printindex fn
-
-@c @node Concept Index, , Command and Variable Index, Top
-@c @unnumbered Concept Index
-
-@c There are currently no Concept Index entries.
-@c @printindex cp
-
-@contents
-@bye
-
diff --git a/doc/rtems_gdb/started.t b/doc/rtems_gdb/started.t
deleted file mode 100644
index 78d3643c8f..0000000000
--- a/doc/rtems_gdb/started.t
+++ /dev/null
@@ -1,53 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-
-@chapter Getting Started
-
-This section describes the steps which are necessary to set up a
-debugging session with RTEMS/GDB.
-
-
-@section Compiling The System Components
-
-The components that need to be debugged have to be compiled with the -g option
-in order the generated file to contain the required information for the debug
-session.
-
-
-@section Starting a debugging session
-
-After having launched GDB, the user must connect to the RTEMS target with the
-following commands:
-
-@example
-(gdb) setrpcmode sun
-(gdb) setdaemontype rdbg
-(gdb) target rtems target-name
-@end example
-
-Then he can use the file GDB command to specify the binary to be debugged.
-
-This initialization phase can be written in a @code{``.gdbinit''}
-file. Each time, the user will launch GDB, it will execute this initialization
-sequence.
-
-
-@section Attaching To The System
-
-The entire target system is viewed as a single multi-threaded process,
-the identifier of which is 1. To attach, use:
-
-@example
-(gdb) attach 1
-@end example
-
-When successfully attached, the user can control the execution of
-the target system from the debugger.
-
-
diff --git a/doc/rtems_gdb/swarch.t b/doc/rtems_gdb/swarch.t
deleted file mode 100644
index 34b69253e7..0000000000
--- a/doc/rtems_gdb/swarch.t
+++ /dev/null
@@ -1,32 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-
-@chapter Software Architecture
-
-RTEMS/GDB host-target debugger is architectured around:
-
-@itemize @bullet
-@item One debugger, running on the host.
-@item One debug server, running on the target.
-@end itemize
-
-The host debugger communicates with the debug server using Sun RPC
-over UDP/IP (Ethernet).
-
-When opening a debugging session, the user takes the control over
-the entire target system. The target system is viewed as a single multi-threaded
-process.
-
-The debugger can observe the state of the system objects, without
-stopping the entire system. However, breakpoints and stepping affect (stop)
-the entire system.
-
-For a given target, only one single system debugging session is possible
-at a time.
-
diff --git a/doc/rtems_gdb/trouble.t b/doc/rtems_gdb/trouble.t
deleted file mode 100644
index 556e7d4a66..0000000000
--- a/doc/rtems_gdb/trouble.t
+++ /dev/null
@@ -1,46 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-
-@chapter Troubleshooting
-
-This section describes symptoms in some situations where the debugger does not
-work correctly, and it gives guidelines for resolving the problems encountered.
-
-
-@section Target machine name unknown on the host
-
-RTEMS/GDB fails to connect to target machine named my_target:
-
-@example
-(gdb) target rtems my_target
-
-Attaching remote machine across net... \
- Invalid hostname. Couldn't find remote host address.
-@end example
-
-@i{==> Ask your system administrator to add an entry with the
-Internet number of machine my_target in the file /etc/hosts on your host machine. }
-
-
-@section Debug server not present
-
-The target rtems command fails:
-
-@example
-(gdb) target rtems my_target
-
-Attaching remote machine across net... RPC timed out. Couldn't connect
-to remote target
-@end example
-
-
-@i{==> Verify that the target system is properly configured,
-and is running the debugging daemon and communication stack.}
-
-
diff --git a/doc/rtems_header.html b/doc/rtems_header.html
deleted file mode 100644
index f201073ba2..0000000000
--- a/doc/rtems_header.html
+++ /dev/null
@@ -1,5 +0,0 @@
-<BODY BGCOLOR="FFFFFF">
-<A HREF="http://www.oarcorp.com" target="Text Frame">
- <IMG align=right BORDER=0 SRC="../oaronly.jpg" ALT="OAR"> </A>
-<H1>RTEMS RTEMS_VERSION On-Line Library</H1>
-<HR>
diff --git a/doc/rtems_support.html b/doc/rtems_support.html
deleted file mode 100644
index 3320bf3454..0000000000
--- a/doc/rtems_support.html
+++ /dev/null
@@ -1,59 +0,0 @@
-<HTML>
-<HEAD><TITLE>RTEMS RTEMS_VERSION On-Line Library</TITLE></HEAD>
-<BODY BGCOLOR="FFFFFF">
-<A HREF="http://www.oarcorp.com" target="Text Frame">
- <IMG align=right BORDER=0 SRC="oaronly.jpg" ALT="OAR"> </A>
-<H1>RTEMS RTEMS_VERSION On-Line Library</H1>
-<HR>
-<BODY>
-<MENU>
- <LI><A HREF="FAQ/index.html">
- RTEMS FAQ</A>
- <LI><A HREF="c_user/index.html">
- RTEMS Applications C User's Guide</A>
- <LI><A HREF="started/index.html">
- Getting Started with RTEMS for C/C++ Users</A>
- <LI><A HREF="started_ada/index.html">
- Getting Started with GNAT/RTEMS</A>
- <LI><A HREF="develenv/index.html">
- RTEMS Development Environment Guide</A>
- <LI><A HREF="posix_users/index.html">
- RTEMS POSIX API User's Guide</A>
- <LI><A HREF="networking/index.html">
- RTEMS Network Supplement</A>
- <LI><A HREF="rtems_gdb/index.html">
- RTEMS/GDB User's Guide</A>
- <LI><A HREF="rgdb_specs/index.html">
- RTEMS Remote Debugger Server Specifications</A>
- <LI><A HREF="bsp_howto/index.html">
- RTEMS BSP and Device Driver Development Guide</A>
-
-<LI>CPU Supplements
-
- <MENU>
- <LI><A HREF="HELP.html">
- RTEMS AMD 29K Applications Supplement</A>
- <LI><A HREF="HELP.html">
- RTEMS Hitachi SH Applications Supplement</A>
- <LI><A HREF="support/c_i386/index.html">
- RTEMS Intel i386 Applications Supplement</A>
- <LI><A HREF="support/c_i960/index.html">
- RTEMS Intel i960 Applications Supplement</A>
- <LI><A HREF="HELP.html">
- RTEMS MIPS64 ORION Applications Supplement</A>
- <LI><A HREF="support/c_m68k/index.html">
- RTEMS Motorola MC68xxx Applications Supplement</A>
- <LI><A HREF="support/c_powerpc/index.html">
- RTEMS PowerPC Applications Supplement</A>
- <LI><A HREF="support/c_sparc/index.html">
- RTEMS SPARC Applications Supplement</A>
- <LI><A HREF="support/c_hppa1_1/index.html">
- RTEMS Hewlett Packard PA-RISC Applications Supplement</A>
- <LI><A HREF="HELP.html">RTEMS UNIX Port Applications Supplement</A>
- </MENU>
-</LI>
-
-</MENU>
-<HR>
-Copyright &copy; 1988-2000 <A HREF="http://www.oarcorp.com" target="Text Frame">OAR Corporation</A>
-</BODY></HTML>
diff --git a/doc/src2html/Makefile b/doc/src2html/Makefile
deleted file mode 100644
index 3af68916f2..0000000000
--- a/doc/src2html/Makefile
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# COPYRIGHT (c) 1988-1999.
-# On-Line Applications Research Corporation (OAR).
-# All rights reserved.
-#
-# $Id$
-#
-
-PROJECT=browseable_rtems
-
-include ../Make.config
-
-all: html info ps pdf
-
-dirs:
- $(make-dirs)
-
-COMMON_FILES=../common/cpright.texi
-
-FILES= clock.texi cond.texi key.texi mutex.texi $(PROJECT).texi preface.texi \
- sched.texi signal.texi thread.texi $(COMMON_FILES)
-
-INFOFILES=$(wildcard $(PROJECT) $(PROJECT)-*)
-
-info:
-
-ps:
-
-pdf:
-
-html: dirs
- -mkdir -p $(WWW_INSTALL)/$(PROJECT)
- $(SRC2HTML) -d3 RTEMS.src
-
-RTEMS.src:
- sed -e 's/WWW_INSTALL/$(WWW_INSTALL)/' \
- <RTEMS.test >RTEMS.src
-
-clean:
- rm -f RTEMS.src
diff --git a/doc/src2html/RTEMS.test b/doc/src2html/RTEMS.test
deleted file mode 100644
index c99e86cd3b..0000000000
--- a/doc/src2html/RTEMS.test
+++ /dev/null
@@ -1,62 +0,0 @@
-# Comments
-#
-# Copyright (c) 1998, On-Line Applications Research Corporation (OAR)
-#
-# This file configures the src2html tool for the RTEMS source tree.
-#
-# $Id$
-#
-
-## Variables used are:
-## Srctree - The root of the source tree we are processing
-## Htmlroot - The directory where all WWW documents are kept
-## Htmldir - The directory under Htmlroot for this source tree
-## Htmltree - The root of the destination tree for the Html code
-## Newsrctree - The directory in Htmltree to store the new Htmlised code
-## Headers - The directory where we keep information to prepend in some docs
-## Formdir - The place to put the index searching script
-## Dirinfo{} - The list of dirs and the info about the directory
-## Dotdir{} - The directory name with /'s -> .'s
-
-set Srctree /usr1/rtems/rtems-work/c/src/exec/
-#set Htmltree /tmp/www
-set Htmlroot WWW_INSTALL/internal/browseable_rtems
-set Htmldir .
-set Newsrctree . # Comments here too
-# default is . and that is fine for us right now
-#set Headers
-set Formdir /cgi-bin/rtems
-#
-#
-
-dir rtems/src Classic API Source
-dir rtems/inline Classic API Inlines
-dir rtems/headers Classic API Header Files
-
-dir posix/src POSIX API Source
-dir posix/inline POSIX API Inlines
-dir posix/headers POSIX API Base Header Files
-dir posix/sys POSIX API System Header Files
-dir posix/headers POSIX API Internal Header Files
-
-dir sapi/src Non-Standard API Source
-dir sapi/inline Non-Standard API Inlines
-dir sapi/headers Non-Standard API Header Files
-
-dir score/src Super Core Source
-dir score/inline Super Core Inlines
-dir score/headers Super Core Header Files
-dir score/cpu/a29k AMD A29K Port
-dir score/cpu/hppa1.1 HP PA-RISC Port
-dir score/cpu/i386 Intel i386 Port
-dir score/cpu/i960 Intel i960 Port
-dir score/cpu/m68k Motorola m68k Port
-dir score/cpu/mips64orion MIPS64 Port
-dir score/cpu/no_cpu No CPU Example Port
-dir score/cpu/powerpc PowerPC Port
-dir score/cpu/sh Hitachi SH
-dir score/cpu/sparc SPARC Port
-dir score/cpu/unix UNIX Port
-
-
-
diff --git a/doc/started/Makefile b/doc/started/Makefile
deleted file mode 100644
index 700ae4301b..0000000000
--- a/doc/started/Makefile
+++ /dev/null
@@ -1,97 +0,0 @@
-#
-# COPYRIGHT (c) 1988-1999.
-# On-Line Applications Research Corporation (OAR).
-# All rights reserved.
-#
-# $Id$
-#
-
-PROJECT=started
-
-include ../Make.config
-
-all: html info ps pdf
-
-dirs:
- $(make-dirs)
-
-COMMON_FILES=../common/cpright.texi ../common/setup.texi
-
-GENERATED_FILES= buildc.texi buildrt.texi gdb.texi intro.texi \
- nt.texi require.texi sample.texi
-
-FILES= $(PROJECT).texi versions.texi $(GENERATED_FILES)
-
-INFOFILES=$(wildcard $(PROJECT) $(PROJECT)-*)
-
-info: dirs $(PROJECT)
- #cp $(wildcard $(PROJECT) $(PROJECT)-*) $(INFO_INSTALL)
- cp $(PROJECT) $(INFO_INSTALL)
-
-$(PROJECT): $(FILES)
- $(MAKEINFO) $(PROJECT).texi
-
-dvi: dirs $(PROJECT).dvi
-ps: dirs $(PROJECT).ps
-pdf: dirs $(PROJECT).pdf
-
-$(PROJECT).pdf: $(FILES)
- #$(TEXI2PDF) $(PROJECT).texi
- #cp $(PROJECT).pdf $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).ps: $(PROJECT).dvi
- dvips -o $(PROJECT).ps $(PROJECT).dvi
- cp $(PROJECT).ps $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).dvi: $(FILES)
- $(TEXI2DVI) $(PROJECT).texi
- cp $(PROJECT).dvi $(WWW_INSTALL)/$(PROJECT)
-
-intro.texi: intro.t versions.texi
- $(BMENU) -c -p "Top" \
- -u "Top" \
- -n "Requirements" ${*}.t
-
-require.texi: require.t versions.texi
- $(BMENU) -c -p "EGCS Mailing List" \
- -u "Top" \
- -n "Building the GNU C/C++ Cross Compiler Toolset" ${*}.t
-
-buildc.texi: buildc.t versions.texi
- $(BMENU) -c -p "GNU makeinfo Version Requirements" \
- -u "Top" \
- -n "Building RTEMS" ${*}.t
-
-buildrt.texi: buildrt.t versions.texi
- $(BMENU) -c -p "Error Messages Indicating Configuration Problems" \
- -u "Top" \
- -n "Building the Sample Application" ${*}.t
-
-sample.texi: sample.t versions.texi
- $(BMENU) -c -p "Using the RTEMS configure Script Directly" \
- -u "Top" \
- -n "Building the GNU Debugger" ${*}.t
-
-gdb.texi: gdb.t versions.texi
- $(BMENU) -c -p "Application Executable" \
- -u "Top" \
- -n "Using MS-Windows as a Development Host" ${*}.t
-
-nt.texi: nt.t versions.texi
- $(BMENU) -c -p "GDB for DINK32" \
- -u "Top" \
- -n "" ${*}.t
-
-html: dirs $(FILES)
- -mkdir -p $(WWW_INSTALL)/$(PROJECT)
- -cp pictures/sfile12c.jpg $(WWW_INSTALL)/$(PROJECT)
- -cp pictures/bit_c.jpg $(WWW_INSTALL)/$(PROJECT)
- $(TEXI2WWW) $(TEXI2WWW_ARGS) -dir $(WWW_INSTALL)/$(PROJECT) \
- $(PROJECT).texi
-
-clean:
- rm -f *.o $(PROG) *.txt core $(PROJECT).pdf
- rm -f *.dvi *.ps *.log *.aux *.cp *.fn *.ky *.pg *.toc *.tp *.vr $(BASE)
- rm -f $(PROJECT) $(PROJECT)-* $(GENERATED_FILES)
- rm -f *.fixed _*
-
diff --git a/doc/started/buildc.t b/doc/started/buildc.t
deleted file mode 100644
index 138748a73c..0000000000
--- a/doc/started/buildc.t
+++ /dev/null
@@ -1,566 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Building the GNU C/C++ Cross Compiler Toolset
-
-This chapter describes the steps required to acquire the
-source code for a GNU cross compiler toolset, apply
-any required RTEMS specific patches, compile that
-toolset and install it.
-
-@section Create the Archive and Build Directories
-
-Start by making the @code{archive} directory to contain the downloaded
-source code and the @code{tools} directory to be used as a build
-directory. The command sequence to do this is shown
-below:
-
-@example
-mkdir archive
-mkdir tools
-@end example
-
-This will result in an initial directory structure similar to the
-one shown in the following figure:
-
-@example
-@group
-/whatever/prefix/you/choose/
- archive/
- tools/
-
-@end group
-@end example
-
-@c @ifset use-html
-@c @html
-@c <IMG SRC="sfile12c.jpg" WIDTH=417 HEIGHT=178
-@c ALT="Starting Directory Organization">
-@c @end html
-@c @end ifset
-
-@section Get All the Pieces
-
-This section lists the components of an RTEMS cross development system.
-Included are the locations of each component as well as any required RTEMS
-specific patches.
-
-@subheading @value{GCC-VERSION}
-@example
- FTP Site: @value{GCC-FTPSITE}
- Directory: @value{GCC-FTPDIR}
- File: @value{GCC-TAR}
-@ifset use-html
- URL: @uref{Download @value{GCC-VERSION}, ftp://@value{GCC-FTPSITE}@value{GCC-HTTPDIR}}
-@end ifset
-@end example
-
-@subheading @value{BINUTILS-VERSION}
-@example
- FTP Site: @value{BINUTILS-FTPSITE}
- Directory: @value{BINUTILS-FTPDIR}
- File: @value{BINUTILS-TAR}
-@ifset use-html
- URL: @uref{ftp://@value{BINUTILS-FTPSITE}@value{BINUTILS-FTPDIR}/@value{BINUTILS-TAR},Download @value{BINUTILS-VERSION}}
-@end ifset
-@end example
-
-@subheading @value{NEWLIB-VERSION}
-@example
- FTP Site: @value{NEWLIB-FTPSITE}
- Directory: @value{NEWLIB-FTPDIR}
- File: @value{NEWLIB-TAR}
-@ifset use-html
- URL: @uref{ftp://@value{NEWLIB-FTPSITE}@value{NEWLIB-FTPDIR}/@value{NEWLIB-TAR}, Download @value{NEWLIB-VERSION}}
-@end ifset
-@end example
-
-@subheading @value{RTEMS-VERSION}
-@example
- FTP Site: @value{RTEMS-FTPSITE}
- Directory: @value{RTEMS-FTPDIR}
- File: @value{RTEMS-TAR}
-@ifset use-html
- URL: @uref{ftp://@value{RTEMS-FTPSITE}@value{RTEMS-FTPDIR}, Download RTEMS components}
-@end ifset
-@end example
-
-@subheading RTEMS Hello World
-@example
- FTP Site: @value{RTEMS-FTPSITE}
- Directory: @value{RTEMS-FTPDIR}
- File: hello_world_c.tgz
-@ifset use-html
- URL: @uref{ftp://@value{RTEMS-FTPSITE}@value{RTEMS-FTPDIR}/hello_world_c.tgz, Download RTEMS Hello World}
-@end ifset
-@end example
-
-@subheading RTEMS Specific Tool Patches and Scripts
-@example
- FTP Site: @value{RTEMS-FTPSITE}
- Directory: @value{RTEMS-FTPDIR}/c_tools
- File: @value{BUILDTOOLS-TAR}
-@ifset BINUTILS-RTEMSPATCH
- File: @value{BINUTILS-RTEMSPATCH}
-@end ifset
-@ifset NEWLIB-RTEMSPATCH
- File: @value{NEWLIB-RTEMSPATCH}
-@end ifset
-@ifset GCC-RTEMSPATCH
- File: @value{GCC-RTEMSPATCH}
-@end ifset
-@ifset use-html
- URL: @uref{ftp://@value{RTEMS-FTPSITE}@value{RTEMS-FTPDIR}/c_tools,Download RTEMS Patches and Scripts}
-@end ifset
-@end example
-
-@section Unarchiving the Tools
-
-While in the @code{tools} directory, unpack the compressed
-tar files using the following command sequence:
-
-@example
-cd tools
-tar xzf ../archive/@value{GCC-TAR}
-tar xzf ../archive/@value{BINUTILS-TAR}
-tar xzf ../archive/@value{NEWLIB-TAR}
-tar xzf ../archive/@value{BUILDTOOLS-TAR}
-@end example
-
-After the compressed tar files have been unpacked, the following
-directories will have been created under tools.
-
-@itemize @bullet
-@item @value{BINUTILS-UNTAR}
-@item @value{GCC-UNTAR}
-@item @value{NEWLIB-UNTAR}
-@end itemize
-
-There will also be a set of scripts in the current directory
-which aid in building the tools and RTEMS. They are:
-
-@itemize @bullet
-@item bit
-@item bit_gdb
-@item bit_rtems
-@item common.sh
-@item user.cfg
-@end itemize
-
-When the @code{bit} script is executed later in this process,
-it will automatically create two other subdirectories:
-
-@itemize @bullet
-@item src
-@item build-$@{CPU@}-tools
-@end itemize
-
-Similarly, the @code{bit_gdb} script will create the
-subdirectory @code{build-$@{CPU@}-gdb} and
-the @code{bit_rtems} script will create the
-subdirectory @code{build-$@{CPU@}-rtems}.
-
-The tree should look something like the following figure:
-
-@example
-@group
-/whatever/prefix/you/choose/
- archive/
- @value{GCC-TAR}
- @value{BINUTILS-TAR}
- @value{NEWLIB-TAR}
- @value{RTEMS-TAR}
- @value{BUILDTOOLS-TAR}
-@ifset GCC-RTEMSPATCH
- @value{GCC-RTEMSPATCH}
-@end ifset
-@ifset BINUTILS-RTEMSPATCH
- @value{BINUTILS-RTEMSPATCH}
-@end ifset
-@ifset NEWLIB-RTEMSPATCH
- @value{NEWLIB-RTEMSPATCH}
-@end ifset
- hello_world_c.tgz
- bit
- tools/
- @value{BINUTILS-UNTAR}/
- @value{GCC-UNTAR}/
- @value{NEWLIB-UNTAR}/
- @value{RTEMS-UNTAR}/
- bit
- bit_gdb
- bit_rtems
- common.sh
- user.cfg
-@end group
-@end example
-
-
-@c @ifset use-html
-@c @html
-@c <IMG SRC="bit_c.jpg" WIDTH=816 HEIGHT=267 ALT="Directory Organization">
-@c @end html
-@c @end ifset
-
-@c
-@c Host Specific Notes
-@c
-
-@section Host Specific Notes
-
-@subsection Solaris 2.x
-
-The build scripts are written in "shell". The program @code{/bin/sh}
-on Solaris 2.x is not robust enough to execute these scripts. If you
-are on a Solaris 2.x host, then change the first line of the files
-@code{bit}, @code{bit_gdb}, and @code{bit_rtems} to use the
-@code{/bin/ksh} shell instead.
-
-@subsection Linux
-
-@subsubsection Broken install Program
-
-Certain versions of GNU fileutils include a version of @code{install} which
-does not work properly. Please perform the following test to see if you
-need to upgrade:
-
-@example
-install -c -d /tmp/foo/bar
-@end example
-
-If this does not create the specified directories your install
-program will not install RTEMS properly. You will need to upgrade
-to at least GNU fileutile version 3.16 to resolve this problem.
-
-@c
-@c Reading the Documentation
-@c
-
-@section Reading the Tools Documentation
-
-Each of the tools in the GNU development suite comes with documentation.
-It is in the reader's and tool maintainers' interest that one read the
-documentation before posting a problem to a mailing list or news group.
-
-@c
-@c EGCS patches
-@c
-
-@section Apply RTEMS Patch to EGCS
-
-@ifclear GCC-RTEMSPATCH
-No RTEMS specific patches are required for @value{GCC-VERSION} to
-support @value{RTEMS-VERSION}.
-@end ifclear
-
-@ifset GCC-RTEMSPATCH
-
-Apply the patch using the following command sequence:
-
-@example
-cd tools/@value{GCC-UNTAR}
-zcat ../../archive/@value{GCC-RTEMSPATCH} | patch -p1
-@end example
-
-Check to see if any of these patches have been rejected using the following
-sequence:
-
-@example
-cd tools/@value{GCC-UNTAR}
-find . -name "*.rej" -print
-@end example
-
-If any files are found with the .rej extension, a patch has been rejected.
-This should not happen with a good patch file which is properly applied.
-
-@end ifset
-
-@c
-@c BINUTILS patches
-@c
-
-@section Apply RTEMS Patch to binutils
-
-@ifclear BINUTILS-RTEMSPATCH
-No RTEMS specific patches are required for @value{BINUTILS-VERSION} to
-support @value{RTEMS-VERSION}.
-@end ifclear
-
-@ifset BINUTILS-RTEMSPATCH
-Apply the patch using the following command sequence:
-
-@example
-cd tools/@value{BINUTILS-UNTAR}
-zcat ../../archive/@value{BINUTILS-RTEMSPATCH} | patch -p1
-@end example
-
-Check to see if any of these patches have been rejected using the following
-sequence:
-
-@example
-cd tools/@value{BINUTILS-UNTAR}
-find . -name "*.rej" -print
-@end example
-
-If any files are found with the .rej extension, a patch has been rejected.
-This should not happen with a good patch file which is properly applied.
-
-@end ifset
-
-@c
-@c Newlib patches
-@c
-
-@section Apply RTEMS Patch to newlib
-
-@ifclear NEWLIB-RTEMSPATCH
-No RTEMS specific patches are required for @value{NEWLIB-VERSION} to
-support @value{RTEMS-VERSION}.
-@end ifclear
-
-@ifset NEWLIB-RTEMSPATCH
-
-Apply the patch using the following command sequence:
-
-@example
-cd tools/@value{NEWLIB-UNTAR}
-zcat ../../archive/@value{NEWLIB-RTEMSPATCH} | patch -p1
-@end example
-
-Check to see if any of these patches have been rejected using the following
-sequence:
-
-@example
-cd tools/@value{NEWLIB-UNTAR}
-find . -name "*.rej" -print
-@end example
-
-If any files are found with the .rej extension, a patch has been rejected.
-This should not happen with a good patch file which is properly applied.
-
-@end ifset
-
-@c
-@c Localizing the Configuration
-@c
-
-@section Localizing the Configuration
-
-Edit the @code{user.cfg} file to alter the settings of various
-variables which are used to tailor the build process.
-Each of the variables set in @code{user.cfg} may be modified
-as described below:
-
-@table @code
-@item INSTALL_POINT
-is the location where you wish the GNU C/C++ cross compilation tools for
-RTEMS to be built. It is recommended that the directory chosen to receive
-these tools be named so that it is clear from which egcs distribution it
-was generated and for which target system the tools are to produce code for.
-
-@b{WARNING}: The @code{INSTALL_POINT} should not be a subdirectory
-under the build directory. The build directory will be removed
-automatically upon successful completion of the build procedure.
-
-@item BINUTILS
-is the directory under tools that contains @value{BINUTILS-UNTAR}.
-For example:
-
-@example
-BINUTILS=@value{BINUTILS-UNTAR}
-@end example
-
-@item GCC
-is the directory under tools that contains @value{GCC-UNTAR}.
-For example,
-
-@example
-GCC=@value{GCC-UNTAR}
-@end example
-
-@item NEWLIB
-is the directory under tools that contains @value{NEWLIB-UNTAR}.
-For example:
-
-@example
-NEWLIB=@value{NEWLIB-UNTAR}
-@end example
-
-@item BUILD_DOCS
-is set to "yes" if you want to install documentation.
-For example:
-
-@example
-BUILD_DOCS=yes
-@end example
-
-@item BUILD_OTHER_LANGUAGES
-is set to "yes" if you want to build languages other than C and C++. At
-the current time, this enables Fortan and Objective-C.
-For example:
-
-@example
-BUILD_OTHER_LANGUAGES=yes
-@end example
-
-@b{NOTE:} Based upon the version of the compiler being used, it may not
-be possible to build languages other than C and C++ cross. In many cases,
-the language run-time support libraries are not "multilib'ed". Thus the
-executable code in these libraries will be for the default compiler settings
-and not necessarily be correct for your CPU model.
-
-@item RTEMS
-is the directory under tools that contails @value{RTEMS-UNTAR}.
-
-@item ENABLE_RTEMS_POSIX
-is set to "yes" if you want to enable the RTEMS POSIX API support.
-At this time, this feature is not supported by the UNIX ports of RTEMS
-and is forced to "no" for those targets. This corresponds to the
-@code{configure} option @code{--enable-posix}.
-
-@item ENABLE_RTEMS_TESTS
-is set to "yes" if you want to build the RTEMS Test Suite. If this
-is set to "no", then only the Sample Tests will be built.
-This corresponds to the @code{configure} option @code{--enable-tests}.
-
-@item ENABLE_RTEMS_TCPIP
-is set to "yes" if you want to build the RTEMS TCP/IP Stack. If a
-particular BSP does not support TCP/IP, then this feature is automatically
-disabled. This corresponds to the @code{configure} option
-@code{--enable-tcpip}.
-
-@item ENABLE_RTEMS_CXX
-is set to "yes" if you want to build the RTEMS C++ support including
-the C++ Wrapper for the Classic API. This corresponds to the
-@code{configure} option @code{--enable-cxx}.
-@end table
-
-@section Running the bit Script
-
-After the @code{bit} script has been modified to reflect the
-local installation, the modified @code{bit} script is run
-using the following sequence:
-
-@example
-cd tools
-./bit <target configuration>
-@end example
-
-Where <target configuration> is one of the following:
-
-@itemize @bullet
-@item hppa1.1
-@item i386
-@item i386-elf
-@item i386-go32
-@item i960
-@item m68k
-@item mips64orion
-@item powerpc
-@item sh
-@item sparc
-@end itemize
-
-If no errors are encountered, the @code{bit} script will conclude by
-printing messages similar to the following:
-
-@example
-
-The src and build-i386-tools subdirectory may now be removed.
-
-Started: Fri Apr 10 10:14:07 CDT 1998
-Finished: Fri Apr 10 12:01:33 CDT 1998
-@end example
-
-If the @code{bit} script successfully completes, then the
-GNU C/C++ cross compilation tools are installed.
-
-If the @code{bit} script does not successfully complete, then investigation
-will be required to determine the source of the error.
-
-@section Common Problems
-
-@subsection Error Message Indicates Invalid Option to Assembler
-
-If a message like this is printed then the new cross compiler
-is most likely using the native assembler instead of the cross
-assembler or vice-versa (native compiler using new cross assembler).
-This can occur for one of the following reasons:
-
-@itemize @bullet
-
-@item Binutils Patch Improperly Applied
-@item Binutils Not Built
-@item Current Directory is in Your PATH
-
-@end itemize
-
-If you are using binutils 2.9.1 or newer with certain versions of
-egcs and gcc, they do not agree on what the name of the newly
-generated cross assembler is. Older binutils called it @code{as.new}
-which became @code{as.new.exe} under Windows. This is not a valid
-file name, so @code{as.new} is now called @code{as-new}. By using the latest
-released tool versions and RTEMS patches, this problem will be avoided.
-
-If binutils did not successfully build the cross assembler, then
-the new cross gcc (@code{xgcc}) used to build the libraries can not
-find it. Make sure the build of the binutils succeeded.
-
-If you include the current directory in your PATH, then there
-is a chance that the native compiler will accidentally use
-the new cross assembler instead of the native one. This usually
-indicates that "." is before the standard system directories
-in your PATH. As a general rule, including "." in your PATH
-is a security risk and should be avoided. Remove "." from
-your PATH.
-
-@subsection Error Messages Indicating Configuration Problems
-
-If you see error messages like the following,
-
-@itemize @bullet
-
-@item cannot configure libliberty
-@item coff-emulation not found
-@item etc.
-
-@end itemize
-
-Then it is likely that one or more of your gnu tools is
-already configured locally in its source tree. You can check
-for this by searching for the @code{config.status} file
-in the various tool source trees. The following command
-does this for the binutils source:
-
-@example
-find @value{BINUTILS-UNTAR} -name config.status -print
-@end example
-
-The solution for this is to execute the command
-@code{make distclean} in each of the GNU tools
-root source directory. This should remove all
-generated files including Makefiles.
-
-This situation usually occurs when you have previously
-built the tool source for some non-RTEMS target. The
-generated configuration specific files are still in
-the source tree and the include path specified during
-the RTEMS build accidentally picks up the previous
-configuration. The include path used is something like
-this:
-
-@example
--I../../@value{BINUTILS-UNTAR}/gcc -I/@value{BINUTILS-UNTAR}/gcc/include -I.
-@end example
-
-Note that the tool source directory is searched before the
-build directory.
-
-This situation can be avoided entirely by never using
-the source tree as the build directory -- even for
-native builds.
diff --git a/doc/started/buildrt.t b/doc/started/buildrt.t
deleted file mode 100644
index eaf7af70f5..0000000000
--- a/doc/started/buildrt.t
+++ /dev/null
@@ -1,137 +0,0 @@
-@c
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Building RTEMS
-
-@section Unpack the RTEMS Source
-
-Use the following command sequence to unpack the RTEMS source into the
-tools directory:
-
-@example
-cd tools
-tar xzf ../archive/@value{RTEMS-TAR}
-@end example
-
-@section Add <INSTALL_POINT>/bin to Executable PATH
-
-In order to compile RTEMS, you must have the cross compilation toolset
-in your search patch. The following command appends the directory
-where the tools were installed in the previous chapter:
-
-@example
-export PATH=$PATH:<INSTALL_POINT>/bin
-@end example
-
-NOTE: The above command is in Bourne shell (@code{sh}) syntax and
-should work with the Korn (@code{ksh}) and GNU Bourne Again Shell
-(@code{bash}). It will not work with the C Shell (@code{csh}) or
-derivatives of the C Shell.
-
-@section Verifying the Operation of the Cross Toolset
-
-In order to insure that the cross-compiler is invoking the correct
-subprograms (like @code{as} and @code{ld}), one can test assemble
-a small program. When in verbose more, @code{gcc} prints out information
-showing where it found the subprograms it invokes. Place the following
-function in a file named @code{f.c}:
-
-@example
-int f( int x )
-@{
- return x + 1;
-@}
-@end example
-
-Then assemble the file using a command similar to the following:
-
-@example
-m68k-rtems-gcc -v -S f.c
-@end example
-
-Where @code{m68k-rtems-gcc} should be changed to match the installed
-name of your cross compiler. The result of this command will be
-a sequence of output showing where the cross-compiler searched for
-and found its subcomponents. Verify that these paths correspond
-to your <INSTALL_POINT>.
-
-@b{NOTE:} One of the most common installation errors is for the
-cross-compiler not to be able to find the cross assembler and default
-to using the native @code{as}. This can result in very confusing
-error messages.
-
-@section Generate RTEMS for a Specific Target and BSP
-
-@subsection Using the bit_rtems Script
-
-The simplest way to build RTEMS is to use the @code{bit_rtems} script.
-This script interprets the settings in the @code{user.cfg} file to
-enable or disable the various RTEMS options.
-
-This script is invoked as follows:
-
-@example
-./bit_rtems CPU [BSP]
-@end example
-
-Where CPU is one of the RTEMS supported CPU families from the following
-list:
-
-@itemize @bullet
-@item hppa1.1
-@item i386
-@item i386-elf
-@item i386-go32
-@item i960
-@item m68k
-@item mips64orion
-@item powerpc
-@item sh
-@item sparc
-@end itemize
-
-BSP is a supported BSP for the selected CPU family. The list of
-supported BSPs may be found in the file
-tools/@value{RTEMS-UNTAR}/README.configure
-in the RTEMS source tree. If the BSP parameter is not specified,
-then all supported BSPs for the selected CPU family will be built.
-
-@subsection Using the RTEMS configure Script Directly
-
-Make a build directory under tools and build the RTEMS product in this
-directory. The ../@value{RTEMS-UNTAR}/configure
-command has numerous command line
-arguments. These arguments are discussed in detail in documentation that
-comes with the RTEMS distribution. In the installation described in the
-section "Unpack the RTEMS source", these configuration options can be found
-in the file tools/@value{RTEMS-UNTAR}/README.configure.
-
-The following shows the command sequence required to configure,
-compile, and install RTEMS with the POSIX API, FreeBSD TCP/IP,
-and C++ support disabled. RTEMS will be built to target
-the @code{BOARD_SUPPORT_PACKAGE} board.
-
-@example
-mkdir build-rtems
-cd build-rtems
-../@value{RTEMS-UNTAR}/configure --target=<TARGET_CONFIGURATION> \
- --disable-posix --disable-tcpip --disable-cxx \
- --enable-rtemsbsp=<BOARD_SUPPORT_PACKAGE>\
- --prefix=<INSTALL_POINT>
-gmake all install
-@end example
-
-Where the list of currently supported of <TARGET_CONFIGURATION>'s and
-<BOARD_SUPPORT_PACKAGE>'s can be found in
-tools/@value{RTEMS-UNTAR}/README.configure.
-
-<INSTALL_POINT> is the installation point from the previous step
-"Modify the bit script" in the build of the tools.
-
-
diff --git a/doc/started/gdb.t b/doc/started/gdb.t
deleted file mode 100644
index f29e3d6e0d..0000000000
--- a/doc/started/gdb.t
+++ /dev/null
@@ -1,222 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Building the GNU Debugger
-
-GDB is not currently RTEMS aware. The following configurations have been
-successfully used with RTEMS applications:
-
-@itemize @bullet
-@item Sparc Instruction Simulator (SIS)
-@item PowerPC Instruction Simulator (PSIM)
-@item DINK32
-@end itemize
-
-Other configurations of gdb have successfully been used by RTEMS users
-but are not documented here.
-
-@section Unarchive the gdb Distribution
-
-Use the following commands to unarchive the gdb distribution:
-
-@example
-cd tools
-tar xzf ../archive/@value{GDB-TAR}
-@end example
-
-The directory @value{GDB-UNTAR} is created under the tools directory.
-
-@c
-@c GDB Patch
-@c
-
-@section Apply RTEMS Patch to GDB
-
-@ifclear GDB-RTEMSPATCH
-No RTEMS specific patches are required for @value{GDB-VERSION} to
-support @value{RTEMS-VERSION}.
-@end ifclear
-
-@ifset GDB-RTEMSPATCH
-
-Apply the patch using the following command sequence:
-
-@example
-cd tools/@value{GDB-UNTAR}
-zcat archive/@value{GDB-RTEMSPATCH} | patch -p1
-@end example
-
-Check to see if any of these patches have been rejected using the following
-sequence:
-
-@example
-cd tools/@value{GDB-UNTAR}
-find . -name "*.rej" -print
-@end example
-
-If any files are found with the .rej extension, a patch has been rejected.
-This should not happen with a good patch file.
-
-To see the files that have been modified use the sequence:
-
-@example
-cd tools/@value{GDB-UNTAR}
-find . -name "*.orig" -print
-@end example
-
-The files that are found, have been modified by the patch file.
-
-@end ifset
-
-@section Using the bit_gdb script
-
-The simplest way to build gdb for RTEMS is to use the @code{bit_gdb} script.
-This script interprets the settings in the @code{user.cfg} file to
-produce the gdb configuration most appropriate for the target CPU.
-
-This script is invoked as follows:
-
-@example
-./bit_gdb CPU
-@end example
-
-Where CPU is one of the RTEMS supported CPU families from the following
-list:
-
-@itemize @bullet
-@item hppa1.1
-@item i386
-@item i386-elf
-@item i386-go32
-@item i960
-@item m68k
-@item mips64orion
-@item powerpc
-@item sh
-@item sparc
-@end itemize
-
-If gdb supports a CPU instruction simulator for this configuration, then
-it is included in the build.
-
-@section Using the gdb configure Script Directly
-
-@subsection GDB with Sparc Instruction Simulation (SIS)
-
-@subheading Make the Build Directory
-
-Create a build directory for the SIS Debugger
-
-@example
-cd tools
-mkdir build-sis
-@end example
-
-@subheading Configure for the Build
-
-Configure the GNU Debugger for the
-Sparc Instruction Simulator (SIS):
-
-@example
-cd tools/build-sis
-../@value{GDB-UNTAR}/configure --target-sparc-erc32-aout \
- --program-prefix=sparc-rtems- \
- --disable-gdbtk \
- --enable-targets=all \
- --prefix=<INSTALL_POINT_FOR_SIS>
-@end example
-
-Where <INSTALL_POINT_FOR_SIS> is a unique location where the gdb
-with SIS will be created.
-
-@subheading Make the Debugger
-
-From tools/build-sis execute the following command sequence:
-
-@example
-gmake all install
-@end example
-
-
-@subsection GDB with PowerPC Instruction Simulator
-
-@subheading Make the Build Directory
-
-Create a build directory for the SIS Debugger
-
-@example
-cd tools
-mkdir build-ppc
-@end example
-
-@subheading Configure for the Build
-
-Configure the GNU Debugger for the PowerPC
-Instruction Simulator (PSIM):
-
-@example
-cd tools/build-ppc
-../@value{GDB-UNTAR}/configure \
- --target=powerpc-unknown-eabi \
- --program-prefix=powerpc-rtems- \
- --enable-sim-powerpc \
- --enable-sim-timebase \
- --enable-sim-inline \
- --enable-sim-hardware \
- --enable-targets=all \
- --prefix=<INSTALL_POINT_FOR_PPC>
-@end example
-
-Where <INSTALL_POINT_FOR_PPC> is a unique location where the gdb
-with PSIM will be created.
-
-
-@subheading Make the Debugger
-
-From tools/build-ppc execute the following command sequence:
-
-@example
-gmake all install
-@end example
-
-
-@subsection GDB for DINK32
-
-@subheading Make the Build Directory
-
-Create a build directory for the DINK32 Debugger
-
-@example
-cd tools
-mkdir build-dink32
-@end example
-
-@subheading Configure for the Build
-
-Configure the GNU Debugger to communicate with
-the DINK32 ROM monitor:
-
-@example
-cd tools/build-dink32
-../@value{GDB-UNTAR}/configure --target-powerpc-elf \
- --program-prefix=powerpc-rtems- \
- --enable-targets=all \
- --prefix=<INSTALL_POINT_FOR_DINK32>
-@end example
-
-Where <INSTALL_POINT_FOR_DINK32> is a unique location where the
-gdb Dink32 will be created.
-
-@subheading Make the Debugger
-
-From tools/build-dink32 execute the following command sequence:
-
-@example
-gmake all install
-@end example
-
diff --git a/doc/started/intro.t b/doc/started/intro.t
deleted file mode 100644
index 5b6354f4fe..0000000000
--- a/doc/started/intro.t
+++ /dev/null
@@ -1,162 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Introduction
-
-The purpose of this document is to guide you through the process of
-installing a GNU cross development environment to use with RTEMS.
-
-If you are already familiar with the concepts behind a cross compiler and
-have a background in Unix, these instructions should provide the bare
-essentials for performing a setup of the following items:
-
-@itemize @bullet
-@item GNU C/C++ Cross Compilation Tools for RTEMS on your host system
-@item RTEMS OS for the target host
-@item GDB Debugger
-@end itemize
-
-The remainder of this chapter provides background information on real-time
-embedded systems and cross development and an overview of other
-resources of interest on the Internet. If you are not familiar with
-real-time embedded systems or the other areas, please read those sections.
-These sections will help familiarize you with the
-types of systems RTEMS is designed to be used in and the cross development
-process used when developing RTEMS applications.
-
-@section Real-Time Embedded Systems
-
-Real-time embedded systems are found in practically every facet of our
-everyday lives. Today's systems range from the common telephone, automobile
-control systems, and kitchen appliances to complex air traffic control
-systems, military weapon systems, an d production line control including
-robotics and automation. However, in the current climate of rapidly changing
-technology, it is difficult to reach a consensus on the definition of a
-real-time embedded system. Hardware costs are continuing to rapidly decline
-while at the same time the hardware is increasing in power and functionality.
-As a result, embedded systems that were not considered viable two years ago
-are suddenly a cost effective solution. In this domain, it is not uncommon
-for a single hardware configuration to employ a variety of architectures and
-technologies. Therefore, we shall define an embedded system as any computer
-system that is built into a larger system consisting of multiple technologies
-such as digital and analog electronics, mechanical devices, and sensors.
-
-Even as hardware platforms become more powerful, most embedded systems are
-critically dependent on the real-time software embedded in the systems
-themselves. Regardless of how efficiently the hardware operates, the
-performance of the embedded real-time software determines the success of the
-system. As the complexity of the embedded hardware platform grows, so does
-the size and complexity of the embedded software. Software systems must
-routinely perform activities which were only dreamed of a short time ago.
-These large, complex, real-time embedded applications now commonly contain
-one million lines of code or more.
-
-Real-time embedded systems have a complex set of characteristics that
-distinguish them from other software applications. Real-time embedded
-systems are driven by and must respond to real world events while adhering to
-rigorous requirements imposed by the environment with which they interact.
-The correctness of the system depends not only on the results of
-computations, but also on the time at which the results are produced. The
-most important and complex characteristic of real-time application systems is
-that they must receive and respond to a set of external stimuli within rigid
-and critical time constraints.
-
-A single real-time application can be composed of both soft and hard
-real-time components. A typical example of a hard real-time system is a
-nuclear reactor control system that must not only detect failures, but must
-also respond quickly enough to prevent a meltdown. This application also has
-soft real-time requirements because it may involve a man-machine interface.
-Providing an interactive input to the control system is not as critical as
-setting off an alarm to indicate a failure condition. However, th e
-interactive system component must respond within an acceptable time limit to
-allow the operator to interact efficiently with the control system.
-
-@section Cross Development
-
-Today almost all real-time embedded software systems are developed in a
-@b{cross development} environment using cross development tools. In the cross
-development environment, software development activities are typically
-performed on one computer system, the @b{host} system, while the result of the
-development effort (produced by the cross tools) is a software system that
-executes on the @b{target} platform. The requirements for the target platform are
-usually incompatible and quite often in direct conflict with the requirements
-for the host. Moreover, the target hardware is often custom designed for a
-particular project. This means that the cross development toolset must allow
-the developer to customize the tools to address target specific run-time
-issues. The toolset must have provisions for board dependent initialization
-code, device drivers, and error handling code.
-
-The host computer is optimized to support the code development cycle with
-support for code editors, compilers, and linkers requiring large disk drives,
-user development windows, and multiple developer connections. Thus the host
-computer is typically a traditional UNIX workstation such as are available
-from SUN or Silicon Graphics, or a PC running either a version of MS-Windows
-or UNIX. The host system may also be required to execute office productivity
-applications to allow the software developer to write documentation, make
-presentations, or track the project's progress using a project management
-tool. This necessitates that the host computer be general purpose with
-resources such as a thirty-two or sixty-four bit processor, large amounts of
-RAM, a monitor, mouse, keyboard, hard and floppy disk drives, CD-ROM drive,
-and a graphics card. It is likely that the system will be multimedia capable
-and have some networking capability.
-
-Conversely, the target platform generally has limited traditional computer
-resources. The hardware is designed for the particular functionality and
-requirements of the embedded system and optimized to perform those tasks
-effectively. Instead of hard driverss and keyboards, it is composed of
-sensors, relays, and stepper motors. The per-unit cost of the target platform
-is typically a critical concern. No hardware component is included without
-being cost justified. As a result, the processor of the target system is
-often from a different processor family than that of the host system and
-usually has lower performance. In addition to the processor families
-targeted only for use in embedded systems, there are versions of nearly every
-general-purpose process or specifically tailored for real-time embedded
-systems. For example, many of the processors targeting the embedded market
-do not include hardware floating point units, but do include peripherals such
-as timers, serial controllers, or network interfaces.
-
-@section Resources on the Internet
-
-This section describes various resources on the Internet which are of
-use to RTEMS users.
-
-@subsection RTEMS Mailing List
-
-rtems-list@@OARcorp.com
-
-This mailing list is dedicated to discussion of issues related
-to RTEMS. If you have questions about RTEMS, wish to make
-suggestions, or just want to pick up hints, this is a good
-list to subscribe to. Subscribe by sending a message with
-the one line "subscribe" to rtems-list-request@@OARcorp.com.
-
-@subsection CrossGCC Mailing List
-
-crossgcc@@cygnus.com
-
-This mailing list is dedicated to the use of the GNU tools in
-cross development environments. Most of the discussions
-focus on embedded issues. Subscribe by sending a message with
-the one line "subscribe" to crossgcc-request@@cygnus.com.
-
-The crossgcc FAQ as well as a number of patches and utiliities
-of interest to cross development system users are available
-at ftp://ftp.cygnus.com/pub/embedded/crossgcc.
-
-@subsection EGCS Mailing List
-
-egcs@@cygnus.com
-
-This mailing list is dedicated to the EGCS Project which was
-formed to speed the development and integration of the various
-GNU languages. The RTEMS and Linux communities were among those
-initially targetted by the EGCS Project as being important
-for its success. Numerous RTEMS users have made contributions
-to this project. Subscribe by sending a message with
-the one line "subscribe" to egcs-request@@cygnus.com.
-
diff --git a/doc/started/nt.t b/doc/started/nt.t
deleted file mode 100644
index c1805f3c34..0000000000
--- a/doc/started/nt.t
+++ /dev/null
@@ -1,345 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@set CYGWIN-VERSION B19
-@set CYGWIN-FTP http://www.cygnus.com/misc/gnu-win32/
-@set CYGWIN-COOLVIEW http://www.lexa.ru/sos/
-@set DOS2UNIX-FTP ftp://ftp.micros.hensa.ac.uk/platforms/ibm-pc/ms-dos/simtelnet/txtutl/dos2unix.zip
-@set PFE-FTP http://www.lancs.ac.uk/people/cpaap/pfe/
-
-@chapter Using MS-Windows as a Development Host
-
-This chapter discusses the installation of the GNU tool chain
-on a computer running the Microsoft Windows NT operating system.
-
-This chapter is based on a draft provided by
-Geoffroy Montel <g_montel@@yahoo.com>. Geoffroy's
-procedure was based on information from
-David Fiddes <D.J@@fiddes.surfaid.org>.
-Their input and feedback is greatly appreciated.
-
-@b{STATUS:} This chapter should be considered preliminary.
-Please be careful when following these instructions.
-
-@section Version Information
-
-This installation process works well under Windows NT.
-Using Windows 95 or 98 is not recommended although it
-should be possible with version 3.77 of gmake and an updated
-cygwinb19.dll.
-
-This procedure should also work with newer version of
-the tool versions listed in this chapter, but this has
-not been verified. If you have success with a particular
-version of the toolset or notice problems in this chapter,
-please let the RTEMS maintainers know so they can be
-addressed in future revisions of this document.
-
-@section MS-Windows Host Specific Requirements
-
-This section details the components required to install
-and build a Windows hosted GNU cross development toolset.
-
-@subsection Unzipping Archives
-
-You will have to uncompress many archives during this
-process. You must @b{NOT} use @code{WinZip} or
-@code{PKZip}. Instead the un-archiving process uses
-the GNU @code{zip} and @code{tar} programs as shown below:
-
-@example
-tar -xzvf archive.tgz
-@end example
-
-@code{tar} is provided with Cygwin32.
-
-@subsection Text Editor
-
-You absolutely have to use a text editor which can
-save files with Unix format (so don't use Notepad
-nor Wordpad). If you do not have an appropriate
-text editor, try @b{Programmers File Editor}, it is
-free and very convenient. This editor may be downloaded
-from:
-
-@uref{@value{PFE-FTP},@value{PFE-FTP}}
-
-@subsection Bug in Patch Utility
-
-There is a bug in the @code{patch} utility
-provided in Cygwin32 B19. The files modified end up
-having MS-DOS style line termination. They must have
-Unix format, so a @code{dos2unix}-like command must
-be used to put them back into Unix format as shown below:
-
-@example
-$ dos2unix XYZ
-Dos2Unix: Cleaning file XYZ ...
-@end example
-
-The dos2unix utility may be downloaded from:
-
-@uref{@value{DOS2UNIX-FTP},@value{DOS2UNIX-FTP}}
-
-You @b{must} change the format of every patched file
-for the toolset build to work correctly.
-
-@subsection Files Needed
-
-This section lists the files required to build and install
-a Windows hosted GNU cross development toolset and their
-home WWW site. In addition to the sources required
-for the cross environment listed earlier in @ref{Get All the Pieces},
-you will need to download the following
-files from their respective sites using your favorite
-Web browser or ftp client.
-
-@table @b
-
-@item cdk.exe
-@uref{@value{CYGWIN-FTP},@value{CYGWIN-FTP}}
-
-@item coolview.tar.gz
-@uref{@value{CYGWIN-COOLVIEW},@value{CYGWIN-COOLVIEW}}
-
-@end table
-
-@subsection System Requirements
-
-Although the finished cross-compiler is fairly easy on resources,
-building it can take a significant amount of processing power and
-disk space. The recommended build system spec is:
-
-@enumerate
-
-@item An AMD K6-300, Pentium II-300 or better processor. GNU C and Cygwin32 are
-@b{very} CPU hungry.
-
-@item At least 64MB of RAM.
-
-@item At least 400MB of FAT16 disk space or 250MB if you have an NTFS partition.
-
-@end enumerate
-
-Even with this spec of machine expect the full suite to take over 2 hours to
-build with a further half an hour for RTEMS itself.
-
-
-@section Installing Cygwin32 B19
-
-This section describes the process of installing the
-version @value{CYGWIN-VERSION} of the Cygwin32 environment. It assumes
-that this toolset is installed in a directory
-referred to as @code{<RTOS>}.
-
-@enumerate
-
-@item Execute cdk.exe. These instructions assume that you
-install Cygwin32 under the <RTOS>\cygnus\b19 directory.
-
-@item Execute Cygwin.bat (either on the start menu or
-under <RTOS>\cygnus\b19).
-
-@item At this point, you are at the command line of @code{bash},
-a Unix-like shell. You have to mount the "/" directory. Type:
-
-@example
-umount /
-mount -b <RTOS> /
-@end example
-
-For example, the following sequence mounts the @code{E:\unix} as the
-root directory for the Cygwin32 environment. Note the use of two @code{\}s
-when specifying DOS paths in bash:
-
-@example
-umount /
-mount -b e:\\unix /
-@end example
-
-@item Create the /bin, /tmp, /source and /build directories.
-
-@example
-mkdir /bin
-mkdir /tmp
-mkdir /source
-mkdir /build
-mkdir /build/binutils
-mkdir /build/egcs
-@end example
-
-@item The light Bourne shell provided with Cygwin B19 is buggy.
-You should copy it to a fake name and copy @code{bash.exe} to @code{sh.exe}:
-
-@example
-cd <RTOS>/cygnus/b19/H-i386-cygwin32/bin
-mv sh.exe old_sh.exe
-cp bash.exe sh.exe
-@end example
-
-The Bourne shell has to be present in /bin directory to run shell scripts properly:
-
-@example
-cp <RTOS>/cygnus/b19/H-i386-cygwin32/bin/sh.exe /bin
-cp <RTOS>/cygnus/b19/H-i386-cygwin32/bin/bash.exe /bin
-@end example
-
-
-@item Open the file
-@code{/cygnus/b19/H-i386-cygwin32/lib/gcc-lib/i386-cygwin32/2.7-b19/specs},
-and change the following line:
-
-@example
--lcygwin %@{mwindows:-luser32 -lgdi32 -lcomdlg32@} -lkernel32
-@end example
-
-to:
-
-@example
--lcygwin %@{mwindows:-luser32 -lgdi32 -lcomdlg32@} -lkernel32 -ladvapi32
-@end example
-
-@end enumerate
-
-At this point, you have a native installation of Cygwin32 and
-are ready to proceed to building a cross-compiler.
-
-@c
-@c BINUTILS
-@c
-
-@section Installing binutils
-
-@enumerate
-
-@item Unarchive @value{BINUTILS-TAR} following the
-instructions in @ref{Unarchiving the Tools} into the /source directory.
-Apply the appropriate RTEMS specific patch as detailed in
-@ref{Apply RTEMS Patch to binutils}.
-
-@item In the @code{/build/binutils} directory, execute the following
-command to configure @value{BINUTILS-VERSION}:
-
-@example
-/source/@value{BINUTILS-UNTAR}/configure --verbose --target=m68k-rtems \
- --prefix=/gcc-m68k-rtems --with-gnu-as --with-gnu-ld
-@end example
-
-Replace @code{m68k-rtems} with the target configuration
-of your choice. See @ref{Running the bit Script} for a
-list of the targets available.
-
-@item Execute the following command to compile the toolset:
-
-@example
-make
-@end example
-
-@item Install the full package with the following command:
-
-@example
-make -k install
-@end example
-
-There is a problem with the gnu info package which will cause an
-error during installation. Telling make to keep going with -k allows
-the install to complete.
-
-@item In the @code{cygnus.bat} file, add the directory
-containing the cross-compiler executables to your search path
-by inserting the following line:
-
-@example
-PATH=E:\unix\gcc-m68k-rtems\bin;%PATH%
-@end example
-
-@item You can erase the /build/binutils directory content if
-disk space is tight.
-
-@item Exit bash and run @code{cygnus.bat} to restart
-the Cygwin32 environment with the new path.
-
-@end enumerate
-
-@c
-@c EGCS
-@c
-
-@section Installing EGCS AND NEWLIB
-
-@enumerate
-@item Unarchive and patch @value{EGCS-TAR} and @value{NEWLIB-TAR}
-following the instructions in @ref{Unarchiving the Tools}.
-Apply the appropriate RTEMS specific patches as detailed in
-@ref{Apply RTEMS Patch to EGCS} and @ref{Apply RTEMS Patch to newlib}.
-
-@b{NOTE}: See @ref{Bug in Patch Utility}.
-
-@item Remove the following directories (we cannot use Fortran
-or Objective-C as Cygwin32 cross-compilers):
-
-@example
-/source/@value{GCC-UNTAR}/libf2c
-/source/@value{GCC-UNTAR}/gcc/objc
-/source/@value{GCC-UNTAR}/gcc/f
-@end example
-
-@b{NOTE}: See @ref{Bug in Patch Utility}.
-
-@item Link the following directories from Newlib to the main EGCS directory,
-/source/@value{GCC-UNTAR}/ :
-
-@itemize @bullet
-@item ln -s ../@value{NEWLIB-UNTAR}/newlib newlib
-@item ln -s ../@value{NEWLIB-UNTAR}/libgloss libgloss
-@end itemize
-
-@item Change to the /build/egcs directory to configure the compiler:
-
-@example
-/source/@value{GCC-UNTAR}/configure --verbose --target=m68k-rtems \
- --prefix=/gcc-m68k --with-gnu-as --with-gnu-ld \
- --with-newlib
-@end example
-
-Replace @code{m68k-rtems} with the target configuration
-of your choice. See @ref{Running the bit Script} for a
-list of the targets available.
-
-@item Compile the toolset as follows:
-
-@example
-make cross
-@end example
-
-You must do a @code{make cross} (not a simple @code{make})
-to insure that the different packages are built in the correct
-order. Making the compiler can take several hours even on
-fairly fast machines, beware.
-
-@item Install with the following command:
-
-@example
-make -k install
-@end example
-
-@item Just as with binutils package, a problem with the gnu
-info package not building correctly requires that you use -k to
-keep going.
-
-@example
-make -k install
-@end example
-
-@end enumerate
-
-With any luck, at this point you having a working cross-compiler. So
-as Geoffroy said:
-
-@center @b{That's it! Celebrate!}
-
diff --git a/doc/started/pictures/bit_ada.jpg b/doc/started/pictures/bit_ada.jpg
deleted file mode 100644
index 774b103711..0000000000
--- a/doc/started/pictures/bit_ada.jpg
+++ /dev/null
Binary files differ
diff --git a/doc/started/pictures/bit_ada.vsd b/doc/started/pictures/bit_ada.vsd
deleted file mode 100644
index 51e8e1fe53..0000000000
--- a/doc/started/pictures/bit_ada.vsd
+++ /dev/null
Binary files differ
diff --git a/doc/started/pictures/bit_c.jpg b/doc/started/pictures/bit_c.jpg
deleted file mode 100644
index 158beb4bd1..0000000000
--- a/doc/started/pictures/bit_c.jpg
+++ /dev/null
Binary files differ
diff --git a/doc/started/pictures/bit_c.vsd b/doc/started/pictures/bit_c.vsd
deleted file mode 100644
index a6db26bd15..0000000000
--- a/doc/started/pictures/bit_c.vsd
+++ /dev/null
Binary files differ
diff --git a/doc/started/pictures/scfile10.jpg b/doc/started/pictures/scfile10.jpg
deleted file mode 100644
index 22a83877ce..0000000000
--- a/doc/started/pictures/scfile10.jpg
+++ /dev/null
Binary files differ
diff --git a/doc/started/pictures/scfile10.vsd b/doc/started/pictures/scfile10.vsd
deleted file mode 100644
index 07efb1f18b..0000000000
--- a/doc/started/pictures/scfile10.vsd
+++ /dev/null
Binary files differ
diff --git a/doc/started/pictures/scfile11.jpg b/doc/started/pictures/scfile11.jpg
deleted file mode 100644
index f70986ef55..0000000000
--- a/doc/started/pictures/scfile11.jpg
+++ /dev/null
Binary files differ
diff --git a/doc/started/pictures/scfile11.vsd b/doc/started/pictures/scfile11.vsd
deleted file mode 100644
index 25871be19a..0000000000
--- a/doc/started/pictures/scfile11.vsd
+++ /dev/null
Binary files differ
diff --git a/doc/started/pictures/scfile12.jpg b/doc/started/pictures/scfile12.jpg
deleted file mode 100644
index 22a83877ce..0000000000
--- a/doc/started/pictures/scfile12.jpg
+++ /dev/null
Binary files differ
diff --git a/doc/started/pictures/scfile12.vsd b/doc/started/pictures/scfile12.vsd
deleted file mode 100644
index 750e7cdf56..0000000000
--- a/doc/started/pictures/scfile12.vsd
+++ /dev/null
Binary files differ
diff --git a/doc/started/pictures/scfile13.jpg b/doc/started/pictures/scfile13.jpg
deleted file mode 100644
index 7ea418b7a7..0000000000
--- a/doc/started/pictures/scfile13.jpg
+++ /dev/null
Binary files differ
diff --git a/doc/started/pictures/scfile13.vsd b/doc/started/pictures/scfile13.vsd
deleted file mode 100644
index 581eff901c..0000000000
--- a/doc/started/pictures/scfile13.vsd
+++ /dev/null
Binary files differ
diff --git a/doc/started/pictures/scsfile1.jpg b/doc/started/pictures/scsfile1.jpg
deleted file mode 100644
index d1d497e955..0000000000
--- a/doc/started/pictures/scsfile1.jpg
+++ /dev/null
Binary files differ
diff --git a/doc/started/pictures/scsfile1.vsd b/doc/started/pictures/scsfile1.vsd
deleted file mode 100644
index a7314848fc..0000000000
--- a/doc/started/pictures/scsfile1.vsd
+++ /dev/null
Binary files differ
diff --git a/doc/started/pictures/scsfile2.jpg b/doc/started/pictures/scsfile2.jpg
deleted file mode 100644
index afbe1db125..0000000000
--- a/doc/started/pictures/scsfile2.jpg
+++ /dev/null
Binary files differ
diff --git a/doc/started/pictures/scsfile2.vsd b/doc/started/pictures/scsfile2.vsd
deleted file mode 100644
index d2bb29a6e8..0000000000
--- a/doc/started/pictures/scsfile2.vsd
+++ /dev/null
Binary files differ
diff --git a/doc/started/pictures/scsfile3.jpg b/doc/started/pictures/scsfile3.jpg
deleted file mode 100644
index b0e135994d..0000000000
--- a/doc/started/pictures/scsfile3.jpg
+++ /dev/null
Binary files differ
diff --git a/doc/started/pictures/scsfile3.vsd b/doc/started/pictures/scsfile3.vsd
deleted file mode 100644
index da98158c85..0000000000
--- a/doc/started/pictures/scsfile3.vsd
+++ /dev/null
Binary files differ
diff --git a/doc/started/pictures/scsfile4.jpg b/doc/started/pictures/scsfile4.jpg
deleted file mode 100644
index 1c01cbb460..0000000000
--- a/doc/started/pictures/scsfile4.jpg
+++ /dev/null
Binary files differ
diff --git a/doc/started/pictures/scsfile4.vsd b/doc/started/pictures/scsfile4.vsd
deleted file mode 100644
index 50823fa67e..0000000000
--- a/doc/started/pictures/scsfile4.vsd
+++ /dev/null
Binary files differ
diff --git a/doc/started/pictures/scsfile5.jpg b/doc/started/pictures/scsfile5.jpg
deleted file mode 100644
index 8fe8df173c..0000000000
--- a/doc/started/pictures/scsfile5.jpg
+++ /dev/null
Binary files differ
diff --git a/doc/started/pictures/scsfile5.vsd b/doc/started/pictures/scsfile5.vsd
deleted file mode 100644
index 614736593a..0000000000
--- a/doc/started/pictures/scsfile5.vsd
+++ /dev/null
Binary files differ
diff --git a/doc/started/pictures/scsfile6.jpg b/doc/started/pictures/scsfile6.jpg
deleted file mode 100644
index 58a3489242..0000000000
--- a/doc/started/pictures/scsfile6.jpg
+++ /dev/null
Binary files differ
diff --git a/doc/started/pictures/scsfile6.vsd b/doc/started/pictures/scsfile6.vsd
deleted file mode 100644
index a970df509a..0000000000
--- a/doc/started/pictures/scsfile6.vsd
+++ /dev/null
Binary files differ
diff --git a/doc/started/pictures/scsfile7.jpg b/doc/started/pictures/scsfile7.jpg
deleted file mode 100644
index 68cff033b8..0000000000
--- a/doc/started/pictures/scsfile7.jpg
+++ /dev/null
Binary files differ
diff --git a/doc/started/pictures/scsfile7.vsd b/doc/started/pictures/scsfile7.vsd
deleted file mode 100644
index 0af5ae9f4f..0000000000
--- a/doc/started/pictures/scsfile7.vsd
+++ /dev/null
Binary files differ
diff --git a/doc/started/pictures/scsfile8.jpg b/doc/started/pictures/scsfile8.jpg
deleted file mode 100644
index a2ef5954ca..0000000000
--- a/doc/started/pictures/scsfile8.jpg
+++ /dev/null
Binary files differ
diff --git a/doc/started/pictures/scsfile8.vsd b/doc/started/pictures/scsfile8.vsd
deleted file mode 100644
index 0ed6dedf6d..0000000000
--- a/doc/started/pictures/scsfile8.vsd
+++ /dev/null
Binary files differ
diff --git a/doc/started/pictures/scsfile9.jpg b/doc/started/pictures/scsfile9.jpg
deleted file mode 100644
index 04f623e62d..0000000000
--- a/doc/started/pictures/scsfile9.jpg
+++ /dev/null
Binary files differ
diff --git a/doc/started/pictures/scsfile9.vsd b/doc/started/pictures/scsfile9.vsd
deleted file mode 100644
index ca3222b4cf..0000000000
--- a/doc/started/pictures/scsfile9.vsd
+++ /dev/null
Binary files differ
diff --git a/doc/started/pictures/sfile12c.jpg b/doc/started/pictures/sfile12c.jpg
deleted file mode 100644
index aba5bf21a2..0000000000
--- a/doc/started/pictures/sfile12c.jpg
+++ /dev/null
Binary files differ
diff --git a/doc/started/pictures/sfile12c.vsd b/doc/started/pictures/sfile12c.vsd
deleted file mode 100644
index fc0616cf1e..0000000000
--- a/doc/started/pictures/sfile12c.vsd
+++ /dev/null
Binary files differ
diff --git a/doc/started/require.t b/doc/started/require.t
deleted file mode 100644
index 0bbcb94184..0000000000
--- a/doc/started/require.t
+++ /dev/null
@@ -1,56 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Requirements
-
-A fairly large amount of disk space is required to perform the build of the
-GNU C/C++ Cross Compiler Tools for RTEMS. The following table may help in
-assessing the amount of disk space required for your installation:
-
-@example
-+------------------------------------+--------------------------+
-| Component | Disk Space Required |
-+------------------------------------+--------------------------+
-| archive directory | 30 Mbytes |
-| tools src unzipped | 100 Mbytes |
-| each individual build directory | 300 Mbytes worst case |
-| each installation directory | 20-400 Mbytes |
-+------------------------------------+--------------------------+
-@end example
-
-The disk space required for each installation directory depends
-primarily on the number of RTEMS BSPs which are to be installed.
-If a single BSP is installed, then the size of each install directory
-will tend to be in the 40-60 Mbyte range.
-
-The instructions in this manual should work on any computer running
-a UNIX variant. Some native GNU tools are used by this procedure
-including:
-
-@itemize @bullet
-@item GCC
-@item GNU make
-@item GNU makeinfo
-@end itemize
-
-In addition, some native utilities may be deficient for building
-the GNU tools.
-
-@section GNU makeinfo Version Requirements
-
-In order to build egcs 1.1b or newer, the GNU @code{makeinfo} program
-installed on your system must be at least version 1.68. The appropriate
-version of @code{makeinfo} is distributed with egcs 1.1b.
-
-The following demonstrates how to determine the version of @code{makeinfo}
-on your machine:
-
-@example
-makeinfo --version
-@end example
-
diff --git a/doc/started/sample.t b/doc/started/sample.t
deleted file mode 100644
index 9f8da9eb60..0000000000
--- a/doc/started/sample.t
+++ /dev/null
@@ -1,57 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Building the Sample Application
-
-@section Unpack the Sample Application
-
-Use the following command to unarchive the sample application:
-
-@example
-cd tools
-tar xzf ../archive/hello_world_c.tgz
-@end example
-
-@section Set the Environment Variable RTEMS_MAKEFILE_PATH
-
-It must point to the appropriate directory containing RTEMS build for our
-target and board support package combination.
-
-@example
-export RTEMS_MAKEFILE_PATH = \
-<INSTALLATION_POINT>/rtems/<BOARD_SUPPORT_PACKAGE>
-@end example
-
-Where <INSTALLATION_POINT> and <BOARD_SUPPORT_PACKAGE> are those used when
-configuring and installing RTEMS.
-
-@section Build the Sample Application
-
-Use the following command to start the build of the sample application:
-
-@example
-cd tools/hello_world_c
-gmake
-@end example
-
-If no errors are detected during the sample application build, it is
-reasonable to assume that the build of the GNU C/C++ Cross Compiler Tools
-for RTEMS and RTEMS itself for the selected host and target
-combination was done properly.
-
-@section Application Executable
-
-If the sample application has successfully been build, then the application
-executable is placed in the following directory:
-
-@example
-tools/hello_world_c/o-<BOARD_SUPPORT_PACKAGE>/<filename>.exe
-@end example
-
-How this executable is downloaded to the target board is very dependent
-on the BOARD_SUPPORT_PACKAGE selected.
diff --git a/doc/started/started.texi b/doc/started/started.texi
deleted file mode 100644
index 9bd6728fa0..0000000000
--- a/doc/started/started.texi
+++ /dev/null
@@ -1,117 +0,0 @@
-\input texinfo @c -*-texinfo-*-
-@c %**start of header
-@setfilename started
-@syncodeindex vr fn
-@synindex ky cp
-@paragraphindent 0
-@c @smallbook
-@c %**end of header
-
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@c
-@c Master file for the Getting Started (C) Guide
-@c
-
-@include ../common/setup.texi
-
-@c
-@c Now set all the tool version dependent information
-@c
-@include versions.texi
-
-@ignore
-@ifinfo
-@format
-START-INFO-DIR-ENTRY
-* Getting Started with RTEMS for C/C++ Users (started):
-END-INFO-DIR-ENTRY
-@end format
-@end ifinfo
-@end ignore
-
-@c
-@c Title Page Stuff
-@c
-
-@set edition @value{RTEMS-EDITION}
-@set version @value{RTEMS-VERSION}
-@set update-date @value{RTEMS-UPDATE-DATE}
-@set update-month @value{RTEMS-UPDATE-MONTH}
-
-@c
-@c I don't really like having a short title page. --joel
-@c
-@c @shorttitlepage Getting Started with RTEMS
-
-@setchapternewpage odd
-@settitle Getting Started with RTEMS for C/C++ Users
-@titlepage
-@finalout
-
-@title Getting Started with RTEMS for C/C++ Users
-@subtitle Edition @value{edition}, for @value{version}
-@sp 1
-@subtitle @value{update-month}
-@author On-Line Applications Research Corporation
-@page
-@include ../common/cpright.texi
-@end titlepage
-
-@c This prevents a black box from being printed on "overflow" lines.
-@c The alternative is to rework a sentence to avoid this problem.
-
-@include intro.texi
-@include require.texi
-@include buildc.texi
-@include buildrt.texi
-@include sample.texi
-@include gdb.texi
-@include nt.texi
-
-@ifinfo
-@node Top, Introduction, (dir), (dir)
-@top started
-
-This is the online version of the Getting Started with RTEMS for C/C++ Users.
-
-@menu
-* Introduction::
-* Requirements::
-* Building the GNU C/C++ Cross Compiler Toolset::
-* Building RTEMS::
-* Building the Sample Application::
-* Building the GNU Debugger::
-* Using MS-Windows as a Development Host::
-@end menu
-
-@c * Command and Variable Index::
-@c * Concept Index::
-@end ifinfo
-@c
-@c
-@c Need to copy the emacs stuff and "trailer stuff" (index, toc) into here
-@c
-
-@c @node Command and Variable Index, Concept Index, Installing EGCS AND NEWLIB, Top
-@c @unnumbered Command and Variable Index
-
-@c There are currently no Command and Variable Index entries.
-
-@c @printindex fn
-
-@c @node Concept Index, , Command and Variable Index, Top
-@c @unnumbered Concept Index
-
-@c There are currently no Concept Index entries.
-@c @printindex cp
-
-@contents
-@bye
-
diff --git a/doc/started/versions.texi b/doc/started/versions.texi
deleted file mode 100644
index 63398ce5a7..0000000000
--- a/doc/started/versions.texi
+++ /dev/null
@@ -1,86 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@c
-@c This file contains all toolset version dependent information
-@c
-
-@c
-@c Comment out setting the "XYZ-RTEMSPATCH" variable if there is no
-@c patch required. The documentation will detect this and print
-@c an appropriate message in a short section.
-@c
-
-
-@c
-@c GCC/EGCS Version
-@c
-
-@set GCC-VERSION egcs 1.1.2
-@set GCC-TAR egcs-1.1.2.tar.gz
-@set GCC-UNTAR egcs-1.1.2
-@set GCC-FTPSITE egcs.cygnus.com
-@set GCC-FTPDIR /pub/egcs/releases/egcs-1.1.2
-@set GCC-HTTPDIR /pub/egcs/releases/index.html
-@set GCC-RTEMSPATCH egcs-1.1.2-rtems-diff-19990331
-
-@c
-@c BINUTILS Version
-@c
-
-@c The "official" binutils
-@set BINUTILS-VERSION binutils 2.9.1
-@set BINUTILS-TAR binutils-2.9.1.tar.gz
-@set BINUTILS-UNTAR binutils-2.9.1
-@set BINUTILS-FTPSITE ftp.gnu.org
-@set BINUTILS-FTPDIR /pub/gnu
-@set BINUTILS-RTEMSPATCH binutils-2.9.1-rtems-diff-19981012.gz
-
-@c When forced to use a snapshot
-@c @set BINUTILS-VERSION gas 980314
-@c @set BINUTILS-TAR gas-980314.tgz
-@c @set BINUTILS-UNTAR gas-980314
-@c @set BINUTILS-FTPSITE ftp.OARcorp.com
-@c @set BINUTILS-FTPDIR /oarcorp/private/beta3/ada_tools
-@c @set BINUTILS-RTEMSPATCH binutils-2.8.1-rtems-diff-1998xxxx.gz
-
-@c
-@c NEWLIB Version
-@c
-
-@set NEWLIB-VERSION newlib 1.8.1
-@set NEWLIB-TAR newlib-1.8.1.tar.gz
-@set NEWLIB-UNTAR newlib-1.8.1
-@set NEWLIB-FTPSITE ftp.cygnus.com
-@set NEWLIB-FTPDIR /pub/newlib
-@set NEWLIB-RTEMSPATCH newlib-1.8.1-rtems-diff-19990302.gz
-
-@c
-@c GDB Version
-@c
-
-@set GDB-VERSION gdb 4.17
-@set GDB-TAR gdb-4.17.tar.gz
-@set GDB-UNTAR gdb-4.17
-@set GDB-FTPSITE ftp.gnu.org
-@set GDB-FTPDIR /pub/gnu
-@set GDB-RTEMSPATCH gdb-4.17-rtems-diff-19990302.gz
-
-
-@c
-@c RTEMS Version
-@c
-
-@set RTEMS-VERSION RTEMS 19990709
-@set RTEMS-TAR rtems-19990709.tgz
-@set RTEMS-UNTAR rtems-19990709
-@set RTEMS-FTPSITE ftp.OARcorp.com
-@set RTEMS-FTPDIR /pub/rtems/19990709
-@set BUILDTOOLS-TAR c_build_scripts-19990709.tgz
-
-
diff --git a/doc/started_ada/Makefile b/doc/started_ada/Makefile
deleted file mode 100644
index 840aee0ed1..0000000000
--- a/doc/started_ada/Makefile
+++ /dev/null
@@ -1,92 +0,0 @@
-#
-# COPYRIGHT (c) 1988-1999.
-# On-Line Applications Research Corporation (OAR).
-# All rights reserved.
-#
-# $Id$
-#
-
-PROJECT=started_ada
-
-include ../Make.config
-
-all: html info ps pdf
-
-dirs:
- $(make-dirs)
-
-COMMON_FILES=../common/cpright.texi ../common/setup.texi
-
-GENERATED_FILES= buildada.texi buildrt.texi gdb.texi intro.texi \
- require.texi sample.texi
-
-FILES= $(PROJECT).texi versions.texi $(GENERATED_FILES)
-
-INFOFILES=$(wildcard $(PROJECT) $(PROJECT)-*)
-
-info: dirs $(PROJECT)
- #cp $(wildcard $(PROJECT) $(PROJECT)-*) $(INFO_INSTALL)
- cp $(PROJECT) $(INFO_INSTALL)
-
-$(PROJECT): $(FILES)
- $(MAKEINFO) $(PROJECT).texi
-
-dvi: dirs $(PROJECT).dvi
-ps: dirs $(PROJECT).ps
-pdf: dirs $(PROJECT).pdf
-
-$(PROJECT).pdf: $(FILES)
- #$(TEXI2PDF) $(PROJECT).texi
- #cp $(PROJECT).pdf $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).ps: $(PROJECT).dvi
- dvips -o $(PROJECT).ps $(PROJECT).dvi
- cp $(PROJECT).ps $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).dvi: $(FILES)
- $(TEXI2DVI) $(PROJECT).texi
- cp $(PROJECT).dvi $(WWW_INSTALL)/$(PROJECT)
-
-intro.texi: intro.t versions.texi
- $(BMENU) -c -p "Top" \
- -u "Top" \
- -n "Requirements" ${*}.t
-
-require.texi: require.t versions.texi
- $(BMENU) -c -p "GNAT Chat Mailing List" \
- -u "Top" \
- -n "Building the GNAT Cross Compiler Toolset" ${*}.t
-
-buildada.texi: buildada.t versions.texi
- $(BMENU) -c -p "Insure GCC and GNAT Environment Variables Are Not Set" \
- -u "Top" \
- -n "Building RTEMS" ${*}.t
-
-buildrt.texi: buildrt.t versions.texi
- $(BMENU) -c -p "Running the bit_ada Script" \
- -u "Top" \
- -n "Building the Sample Application" ${*}.t
-
-sample.texi: sample.t versions.texi
- $(BMENU) -c -p "Using the RTEMS configure Script Directly" \
- -u "Top" \
- -n "Building the GNU Debugger" ${*}.t
-
-gdb.texi: gdb.t versions.texi
- $(BMENU) -c -p "Application Executable" \
- -u "Top" \
- -n "" ${*}.t
-
-html: dirs $(FILES)
- -mkdir -p $(WWW_INSTALL)/$(PROJECT)
- -cp ../started/pictures/sfile12c.jpg $(WWW_INSTALL)/$(PROJECT)
- -cp ../started/pictures/bit_ada.jpg $(WWW_INSTALL)/$(PROJECT)
- $(TEXI2WWW) $(TEXI2WWW_ARGS) -dir $(WWW_INSTALL)/$(PROJECT) \
- $(PROJECT).texi
-
-clean:
- rm -f *.o $(PROG) *.txt core $(PROJECT).pdf
- rm -f *.dvi *.ps *.log *.aux *.cp *.fn *.ky *.pg *.toc *.tp *.vr $(BASE)
- rm -f $(PROJECT) $(PROJECT)-* $(GENERATED_FILES)
- rm -f *.fixed _*
-
diff --git a/doc/started_ada/buildada.t b/doc/started_ada/buildada.t
deleted file mode 100644
index b226e4bc63..0000000000
--- a/doc/started_ada/buildada.t
+++ /dev/null
@@ -1,541 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Building the GNAT Cross Compiler Toolset
-
-This chapter describes the steps required to acquire the
-source code for a GNU cross compiler toolset, apply
-any required RTEMS specific patches, compile that
-toolset and install it.
-
-@section Create the Archive and Build Directories
-
-Start by making the @code{archive} directory to contain the downloaded
-source code and the @code{tools} directory to be used as a build
-directory. The command sequence to do this is shown
-below:
-
-@example
-mkdir archive
-mkdir tools
-@end example
-
-This will result in an initial directory structure similar to the
-one shown in the following figure:
-
-@example
-@group
-/whatever/prefix/you/choose/
- archive/
- tools/
-
-@end group
-@end example
-
-@c @ifset use-html
-@c @html
-@c <IMG SRC="sfile12c.jpg" WIDTH=417 HEIGHT=178
-@c ALT="Starting Directory Organization">
-@c @end html
-@c @end ifset
-
-@section Get All the Pieces
-
-This section lists the components of an RTEMS cross development system.
-Included are the locations of each component as well as any required RTEMS
-specific patches.
-
-@subheading @value{GCC-VERSION}
-@example
- FTP Site: @value{GCC-FTPSITE}
- Directory: @value{GCC-FTPDIR}
- File: @value{GCC-TAR}
-@ifset use-html
- URL: @uref{ftp://@value{GCC-FTPSITE}@value{GCC-FTPDIR}/@value{GCC-TAR},Download @value{GCC-VERSION}}
-@end ifset
-@end example
-
-@subheading @value{GNAT-VERSION}
-@example
- FTP Site: @value{GNAT-FTPSITE}
- Directory: @value{GNAT-FTPDIR}
- File: @value{GNAT-TAR}
-@ifset use-html
- URL: @uref{ ftp://@value{GNAT-FTPSITE}@value{GNAT-FTPDIR}/@value{GNAT-TAR}, Download @value{GNAT-VERSION}}
-@end ifset
-@end example
-
-@subheading @value{BINUTILS-VERSION}
-@example
- FTP Site: @value{BINUTILS-FTPSITE}
- Directory: @value{BINUTILS-FTPDIR}
- File: @value{BINUTILS-TAR}
-@ifset use-html
- URL: @uref{ftp://@value{BINUTILS-FTPSITE}@value{BINUTILS-FTPDIR}/@value{BINUTILS-TAR}, Download @value{BINUTILS-VERSION}}
-@end ifset
-@end example
-
-@subheading @value{NEWLIB-VERSION}
-@example
- FTP Site: @value{NEWLIB-FTPSITE}
- Directory: @value{NEWLIB-FTPDIR}
- File: @value{NEWLIB-TAR}
-@ifset use-html
- URL: @uref{ftp://@value{NEWLIB-FTPSITE}@value{NEWLIB-FTPDIR}/@value{NEWLIB-TAR}, Download @value{NEWLIB-VERSION}}
-@end ifset
-@end example
-
-@subheading @value{RTEMS-VERSION}
-@example
- FTP Site: @value{RTEMS-FTPSITE}
- Directory: @value{RTEMS-FTPDIR}
- File: @value{RTEMS-TAR}
-@ifset use-html
- URL: @uref{ftp://@value{RTEMS-FTPSITE}@value{RTEMS-FTPDIR}, Download RTEMS components}
-@end ifset
-@end example
-
-@subheading RTEMS Hello World
-@example
- FTP Site: @value{RTEMS-FTPSITE}
- Directory: @value{RTEMS-FTPDIR}
- File: hello_world_ada.tgz
-@ifset use-html
- URL: @uref{ftp://@value{RTEMS-FTPSITE}@value{RTEMS-FTPDIR}/ada_tools/hello_world_ada.tgz, Download RTEMS Hello World}
-@end ifset
-@end example
-
-@subheading RTEMS Specific Tool Patches and Scripts
-@example
- FTP Site: @value{RTEMS-FTPSITE}
- Directory: @value{RTEMS-FTPDIR}/ada_tools
- File: @value{BUILDTOOLS-TAR}
-@ifset BINUTILS-RTEMSPATCH
- File: @value{BINUTILS-RTEMSPATCH}
-@end ifset
-@ifset NEWLIB-RTEMSPATCH
- File: @value{NEWLIB-RTEMSPATCH}
-@end ifset
-@ifset GCC-RTEMSPATCH
- File: @value{GCC-RTEMSPATCH}
-@end ifset
-@ifset GNAT-RTEMSPATCH
- File: @value{GNAT-RTEMSPATCH}
-@end ifset
-@ifset use-html
- URL: @uref{ftp://@value{RTEMS-FTPSITE}@value{RTEMS-FTPDIR}/ada_tools, Download RTEMS patches}
-@end ifset
-@end example
-
-@section Unarchiving the Tools
-
-While in the @code{tools} directory, unpack the compressed
-tar files using the following command sequence:
-
-@example
-cd tools
-tar xzf ../archive/@value{GCC-TAR}
-tar xzf ../archive/@value{GNAT-TAR}
-tar xzf ../archive/@value{BINUTILS-TAR}
-tar xzf ../archive/@value{NEWLIB-TAR}
-tar xzf ../archive/@value{BUILDTOOLS-TAR}
-@end example
-
-After the compressed tar files have been unpacked, the following
-directories will have been created under tools.
-
-@itemize @bullet
-@item @value{BINUTILS-UNTAR}
-@item @value{GCC-UNTAR}
-@item @value{GNAT-UNTAR}
-@item @value{NEWLIB-UNTAR}
-@end itemize
-
-There will also be a set of scripts in the current directory
-which aid in building the tools and RTEMS. They are:
-
-@itemize @bullet
-@item bit_ada
-@item bit_gdb
-@item bit_rtems
-@item common.sh
-@item user.cfg
-@end itemize
-
-When the @code{bit_ada} script is executed later in this process,
-it will automatically create two other subdirectories:
-
-@itemize @bullet
-@item src
-@item build-$@{CPU@}-tools
-@end itemize
-
-Similarly, the @code{bit_gdb} script will create the
-subdirectory @code{build-$@{CPU@}-gdb} and
-the @code{bit_rtems} script will create the
-subdirectory @code{build-$@{CPU@}-rtems}.
-
-The directory tree should look something like the following figure:
-
-@example
-@group
-/whatever/prefix/you/choose/
- archive/
- @value{GCC-TAR}
- @value{GNAT-TAR}
- @value{BINUTILS-TAR}
- @value{NEWLIB-TAR}
- @value{RTEMS-TAR}
- @value{BUILDTOOLS-TAR}
-@ifset GCC-RTEMSPATCH
- @value{GCC-RTEMSPATCH}
-@end ifset
-@ifset BINUTILS-RTEMSPATCH
- @value{BINUTILS-RTEMSPATCH}
-@end ifset
-@ifset NEWLIB-RTEMSPATCH
- @value{NEWLIB-RTEMSPATCH}
-@end ifset
-@ifset GNAT-RTEMSPATCH
- @value{GNAT-RTEMSPATCH}
-@end ifset
- hello_world_ada.tgz
- bit_ada
- tools/
- @value{BINUTILS-UNTAR}/
- @value{GCC-UNTAR}/
- @value{GNAT-UNTAR}/
- @value{NEWLIB-UNTAR}/
- @value{RTEMS-UNTAR}/
- bit_ada
- bit_gdb
- bit_rtems
- common.sh
- user.cfg
-@end group
-@end example
-
-@c @ifset use-html
-@c @html
-@c <IMG SRC="bit_ada.jpg" WIDTH=816 HEIGHT=267 ALT="Directory Organization">
-@c @end html
-@c @end ifset
-
-@c
-@c Host Specific Notes
-@c
-
-@section Host Specific Notes
-
-@subsection Solaris 2.x
-
-The build scripts are written in "shell". The program @code{/bin/sh}
-on Solaris 2.x is not robust enough to execute these scripts. If you
-are on a Solaris 2.x host, then change the first line of the files
-@code{bit_ada}, @code{bit_gdb}, and @code{bit_rtems} to use the
-@code{/bin/ksh} shell instead.
-
-@c
-@c Reading the Documentation
-@c
-
-@section Reading the Tools Documentation
-
-Each of the tools in the GNU development suite comes with documentation.
-It is in the reader's and tool maintainers' interest that one read the
-documentation before posting a problem to a mailing list or news group.
-
-
-@c
-@c GCC patches
-@c
-
-@section Apply RTEMS Patch to GCC
-
-@ifclear GCC-RTEMSPATCH
-No RTEMS specific patches are required for @value{GCC-VERSION} to
-support @value{RTEMS-VERSION}.
-@end ifclear
-
-@ifset GCC-RTEMSPATCH
-
-Apply the patch using the following command sequence:
-
-@example
-cd tools/@value{GCC-UNTAR}
-zcat ../../archive/@value{GCC-RTEMSPATCH} | patch -p1
-@end example
-
-Check to see if any of these patches have been rejected using the following
-sequence:
-
-@example
-cd tools/@value{GCC-UNTAR}
-find . -name "*.rej" -print
-@end example
-
-If any files are found with the .rej extension, a patch has been rejected.
-This should not happen with a good patch file which is properly applied.
-
-@end ifset
-
-@c
-@c BINUTILS patches
-@c
-
-@section Apply RTEMS Patch to binutils
-
-@ifclear BINUTILS-RTEMSPATCH
-No RTEMS specific patches are required for @value{BINUTILS-VERSION} to
-support @value{RTEMS-VERSION}.
-@end ifclear
-
-@ifset BINUTILS-RTEMSPATCH
-Apply the patch using the following command sequence:
-
-@example
-cd tools/@value{BINUTILS-UNTAR}
-zcat ../../archive/@value{BINUTILS-RTEMSPATCH} | patch -p1
-@end example
-
-Check to see if any of these patches have been rejected using the following
-sequence:
-
-@example
-cd tools/@value{BINUTILS-UNTAR}
-find . -name "*.rej" -print
-@end example
-
-If any files are found with the .rej extension, a patch has been rejected.
-This should not happen with a good patch file which is properly applied.
-
-@end ifset
-
-@c
-@c Newlib patches
-@c
-
-@section Apply RTEMS Patch to newlib
-
-@ifclear NEWLIB-RTEMSPATCH
-No RTEMS specific patches are required for @value{NEWLIB-VERSION} to
-support @value{RTEMS-VERSION}.
-@end ifclear
-
-@ifset NEWLIB-RTEMSPATCH
-
-Apply the patch using the following command sequence:
-
-@example
-cd tools/@value{NEWLIB-UNTAR}
-zcat ../../archive/@value{NEWLIB-RTEMSPATCH} | patch -p1
-@end example
-
-Check to see if any of these patches have been rejected using the following
-sequence:
-
-@example
-cd tools/@value{NEWLIB-UNTAR}
-find . -name "*.rej" -print
-@end example
-
-If any files are found with the .rej extension, a patch has been rejected.
-This should not happen with a good patch file which is properly applied.
-
-@end ifset
-
-@c
-@c GNAT patches
-@c
-
-@section Apply RTEMS Patch to GNAT
-
-@ifclear GNAT-RTEMSPATCH
-No RTEMS specific patches are required for @value{GNAT-VERSION} to
-support @value{RTEMS-VERSION}.
-@end ifclear
-
-@ifset GNAT-RTEMSPATCH
-
-Apply the patch using the following command sequence:
-
-@example
-cd tools/@value{GNAT-UNTAR}
-zcat ../../archive/@value{GNAT-RTEMSPATCH} | patch -p1
-@end example
-
-Check to see if any of these patches have been rejected using the following
-sequence:
-
-@example
-cd tools/@value{GNAT-UNTAR}
-find . -name "*.rej" -print
-@end example
-
-If any files are found with the .rej extension, a patch has been rejected.
-This should not happen with a good patch file which is properly applied.
-
-@end ifset
-
-@c
-@c Copy the ada directory
-@c
-
-
-@section Copy the ada Subdirectory to the GCC Source Tree
-
-Copy the ada subtree in the patched subtree of
-tools/@value{GNAT-UNTAR}/src to the
-tools/@value{GCC-UNTAR} directory:
-
-@example
-cd tools/@value{GNAT-UNTAR}/src
-cp -r ada ../../@value{GCC-UNTAR}
-@end example
-
-@c
-@c Localizing the Configuration
-@c
-
-@section Localizing the Configuration
-
-Edit the @code{user.cfg} file to alter the settings of various
-variables which are used to tailor the build process.
-Each of the variables set in @code{user.cfg} may be modified
-as described below:
-
-@table @code
-@item INSTALL_POINT
-is the location where you wish the GNU C/C++ cross compilation tools for
-RTEMS to be built. It is recommended that the directory chosen to receive
-these tools be named so that it is clear from which egcs distribution it
-was generated and for which target system the tools are to produce code for.
-
-@b{WARNING}: The @code{INSTALL_POINT} should not be a subdirectory
-under the build directory. The build directory will be removed
-automatically upon successful completion of the build procedure.
-
-@item BINUTILS
-is the directory under tools that contains @value{BINUTILS-UNTAR}.
-For example:
-
-@example
-BINUTILS=@value{BINUTILS-UNTAR}
-@end example
-
-@item GCC
-is the directory under tools that contains @value{GCC-UNTAR}.
-For example,
-
-@example
-GCC=@value{GCC-UNTAR}
-@end example
-
-Note that the gnat version is not needed because the gnat source
-is built as part of building gcc.
-
-@item NEWLIB
-is the directory under tools that contains @value{NEWLIB-UNTAR}.
-For example:
-
-@example
-NEWLIB=@value{NEWLIB-UNTAR}
-@end example
-
-@item BUILD_DOCS
-is set to "yes" if you want to install documentation.
-For example:
-
-@example
-BUILD_DOCS=yes
-@end example
-
-@item BUILD_OTHER_LANGUAGES
-is set to "yes" if you want to build languages other than C and C++. At
-the current time, this enables Fortan and Objective-C.
-For example:
-
-@example
-BUILD_OTHER_LANGUAGES=yes
-@end example
-
-@item RTEMS
-is the directory under tools that contails @value{RTEMS-UNTAR}.
-
-@item ENABLE_RTEMS_POSIX
-is set to "yes" if you want to enable the RTEMS POSIX API support.
-At this time, this feature is not supported by the UNIX ports of RTEMS
-and is forced to "no" for those targets. This corresponds to the
-@code{configure} option @code{--enable-posix}.
-
-This must be enabled to support the GNAT/RTEMS run-time.
-
-@item ENABLE_RTEMS_TESTS
-is set to "yes" if you want to build the RTEMS Test Suite. If this
-is set to "no", then only the Sample Tests will be built.
-This corresponds to the @code{configure} option @code{--enable-tests}.
-
-@item ENABLE_RTEMS_TCPIP
-is set to "yes" if you want to build the RTEMS TCP/IP Stack. If a
-particular BSP does not support TCP/IP, then this feature is automatically
-disabled. This corresponds to the @code{configure} option
-@code{--enable-tcpip}.
-
-@item ENABLE_RTEMS_CXX
-is set to "yes" if you want to build the RTEMS C++ support including
-the C++ Wrapper for the Classic API. This corresponds to the
-@code{configure} option @code{--enable-cxx}.
-@end table
-
-@section Running the bit_ada Script
-
-After the @code{bit_ada} script has been modified to reflect the
-local installation, the modified @code{bit_ada} script is run
-using the following sequence:
-
-@example
-cd tools
-./bit_ada <target configuration>
-@end example
-
-Where <target configuration> is one of the following:
-
-@itemize @bullet
-@item hppa1.1
-@item i386
-@item i386-elf
-@item i386-go32
-@item i960
-@item m68k
-@item mips64orion
-@item powerpc
-@item sh
-@item sparc
-@end itemize
-
-NOTE: The above list of target configurations is the list of RTEMS supported
-targets. Only a subset of these have been tested with GNAT/RTEMS. For more
-information, contact your GNAT/RTEMS representative.
-
-If no errors are encountered, the @code{bit_ada} script will conclude by
-printing messages similar to the following:
-
-@example
-
-The src and build-i386-tools subdirectory may now be removed.
-
-Started: Fri Apr 10 10:14:07 CDT 1998
-Finished: Fri Apr 10 12:01:33 CDT 1998
-@end example
-
-If the @code{bit_ada} script successfully completes, then the
-GNU C/C++ cross compilation tools are installed.
-
-If the @code{bit_ada} script does not successfully complete, then investigation
-will be required to determine the source of the error.
-
diff --git a/doc/started_ada/buildrt.t b/doc/started_ada/buildrt.t
deleted file mode 100644
index 4321b1b093..0000000000
--- a/doc/started_ada/buildrt.t
+++ /dev/null
@@ -1,141 +0,0 @@
-@c
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Building RTEMS
-
-@section Unpack the RTEMS Source
-
-Use the following command sequence to unpack the RTEMS source into the
-tools directory:
-
-@example
-cd tools
-tar xzf ../archive/@value{RTEMS-TAR}
-@end example
-
-@section Add <INSTALL_POINT>/bin to Executable PATH
-
-In order to compile RTEMS, you must have the cross compilation toolset
-in your search patch. The following command appends the directory
-where the tools were installed in the previous chapter:
-
-@example
-export PATH=$PATH:<INSTALL_POINT>/bin
-@end example
-
-@b{NOTE:} The above command is in Bourne shell (@code{sh}) syntax and should
-work with the Korn (@code{ksh}) and GNU Bourne Again Shell (@code{bash}).
-It will not work with the C Shell (@code{csh})or derivatives of the C Shell.
-
-@section Verifying the Operation of the Cross Toolset
-
-In order to insure that the cross-compiler is invoking the correct
-subprograms (like @code{as} and @code{ld}), one can test assemble
-a small program. When in verbose more, @code{gcc} prints out information
-showing where it found the subprograms it invokes. Place the following
-function in a file named @code{f.c}:
-
-@example
-int f( int x )
-@{
- return x + 1;
-@}
-@end example
-
-Then assemble the file using a command similar to the following:
-
-@example
-m68k-rtems-gcc -v -S f.c
-@end example
-
-Where @code{m68k-rtems-gcc} should be changed to match the installed
-name of your cross compiler. The result of this command will be
-a sequence of output showing where the cross-compiler searched for
-and found its subcomponents. Verify that these paths correspond
-to your <INSTALL_POINT>.
-
-@b{NOTE:} One of the most common installation errors is for the
-cross-compiler not to be able to find the cross assembler and default
-to using the native @code{as}. This can result in very confusing
-error messages.
-
-@section Generate RTEMS for a Specific Target and BSP
-
-@subsection Using the bit_rtems script
-
-The simplest way to build RTEMS is to use the @code{bit_rtems} script.
-This script interprets the settings in the @code{user.cfg} file to
-enable or disable the various RTEMS options.
-
-This script is invoked as follows:
-
-@example
-./bit_rtems CPU [BSP]
-@end example
-
-Where CPU is one of the RTEMS supported CPU families from the following
-list:
-
-@itemize @bullet
-@item hppa1.1
-@item i386
-@item i386-elf
-@item i386-go32
-@item i960
-@item m68k
-@item mips64orion
-@item powerpc
-@item sh
-@item sparc
-@end itemize
-
-BSP is a supported BSP for the selected CPU family. The list of
-supported BSPs may be found in the file
-tools/@value{RTEMS-UNTAR}/README.configure
-in the RTEMS source tree. If the BSP parameter is not specified,
-then all supported BSPs for the selected CPU family will be built.
-
-@b{NOTE:} The POSIX API must be enabled to use GNAT/RTEMS.
-
-@subsection Using the RTEMS configure Script Directly
-
-Make a build directory under tools and build the RTEMS product in this
-directory. The ../@value{RTEMS-UNTAR}/configure
-command has numerous command line
-arguments. These arguments are discussed in detail in documentation that
-comes with the RTEMS distribution. In the installation described in the
-section "Unpack the RTEMS source", these configuration options can be found
-in the file tools/@value{RTEMS-UNTAR}/README.configure.
-
-The GNAT/RTEMS run-time implementation is based on the POSIX API. Thus
-the RTEMS configuration for a GNAT/RTEMS environment MUST include the
-@code{--enable-posix} flag.
-
-The following shows the command sequence required to configure,
-compile, and install RTEMS with the POSIX API enabled.
-RTEMS will be built to target the @code{BOARD_SUPPORT_PACKAGE} board.
-
-@example
-mkdir build-rtems
-cd build-rtems
-../@value{RTEMS-UNTAR}/configure --target=<TARGET_CONFIGURATION> \
- --enable-posix \
- --enable-rtemsbsp=<BOARD_SUPPORT_PACKAGE>\
- --prefix=<INSTALL_POINT>
-gmake all install
-@end example
-
-Where the list of currently supported of <TARGET_CONFIGURATION>'s and
-<BOARD_SUPPORT_PACKAGE>'s can be found in
-tools/@value{RTEMS-UNTAR}/README.configure.
-
-<INSTALL_POINT> is the installation point from the previous step
-"Modify the bit_ada Script" in the build of the tools.
-
-
diff --git a/doc/started_ada/gdb.t b/doc/started_ada/gdb.t
deleted file mode 100644
index e9307af259..0000000000
--- a/doc/started_ada/gdb.t
+++ /dev/null
@@ -1,232 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Building the GNU Debugger
-
-GDB is not currently RTEMS aware. The following configurations have been
-successfully used with RTEMS applications:
-
-@itemize @bullet
-@item Sparc Instruction Simulator (SIS)
-@item PowerPC Instruction Simulator (PSIM)
-@item DINK32
-@end itemize
-
-Other configurations of gdb have successfully been used by RTEMS users
-but are not documented here.
-
-@section Unarchive the gdb Distribution
-
-Use the following commands to unarchive the gdb distribution:
-
-@example
-cd tools
-tar xzf ../archive/@value{GDB-TAR}
-@end example
-
-The directory @value{GDB-UNTAR} is created under the tools directory.
-
-@c
-@c GDB GNAT Patch
-@c
-
-@section Apply GNAT Patch to GDB
-
-@ifclear GDB-GNATPATCH
-No GNAT specific patches are required for @value{GDB-VERSION} to
-support @value{RTEMS-VERSION} and @value{GNAT-VERSION}.
-@end ifclear
-
-@ifset GDB-GNATPATCH
-
-Apply the patch using the following command sequence:
-
-@example
-cd tools/@value{GDB-UNTAR}
-zcat archive/@value{GDB-GNATPATCH} | patch -p1
-@end example
-
-Check to see if any of these patches have been rejected using the following
-sequence:
-
-@example
-cd tools/@value{GDB-UNTAR}
-find . -name "*.rej" -print
-@end example
-
-If any files are found with the .rej extension, a patch has been rejected.
-This should not happen with a good patch file.
-
-To see the files that have been modified use the sequence:
-
-@example
-cd tools/@value{GDB-UNTAR}
-find . -name "*.orig" -print
-@end example
-
-The files that are found, have been modified by the patch file.
-
-@end ifset
-
-@c
-@c GDB RTEMS Patch
-@c
-
-@section Apply RTEMS Patch to GDB
-
-@ifclear GDB-RTEMSPATCH
-No RTEMS specific patches are required for @value{GDB-VERSION} to
-support @value{RTEMS-VERSION}.
-@end ifclear
-
-@ifset GDB-RTEMSPATCH
-
-Apply the patch using the following command sequence:
-
-@example
-cd tools/@value{GDB-UNTAR}
-zcat archive/@value{GDB-RTEMSPATCH} | patch -p1
-@end example
-
-Check to see if any of these patches have been rejected using the following
-sequence:
-
-@example
-cd tools/@value{GDB-UNTAR}
-find . -name "*.rej" -print
-@end example
-
-If any files are found with the .rej extension, a patch has been rejected.
-This should not happen with a good patch file.
-
-To see the files that have been modified use the sequence:
-
-@example
-cd tools/@value{GDB-UNTAR}
-find . -name "*.orig" -print
-@end example
-
-The files that are found, have been modified by the patch file.
-
-@end ifset
-
-
-@section GDB with Sparc Instruction Simulation (SIS)
-
-@subheading Make the Build Directory
-
-Create a build directory for the SIS Debugger
-
-@example
-cd tools
-mkdir build-sis
-@end example
-
-@subheading Configure for the Build
-
-Configure the GNU Debugger for the
-Sparc Instruction Simulator (SIS):
-
-@example
-cd tools/build-sis
-../@value{GDB-UNTAR}/configure --target-sparc-erc32-aout \
- --program-prefix=sparc-rtems- \
- --disable-gdbtk \
- --enable-targets=all \
- --prefix=<INSTALL_POINT_FOR_SIS>
-@end example
-
-Where <INSTALL_POINT_FOR_SIS> is a unique location where the gdb
-with SIS will be created.
-
-@subheading Make the Debugger
-
-From tools/build-sis execute the following command sequence:
-
-@example
-gmake all install
-@end example
-
-
-@section GDB with PowerPC Instruction Simulator
-
-@subheading Make the Build Directory
-
-Create a build directory for the SIS Debugger
-
-@example
-cd tools
-mkdir build-ppc
-@end example
-
-@subheading Configure for the Build
-
-Configure the GNU Debugger for the PowerPC
-Instruction Simulator (PSIM):
-
-@example
-cd tools/build-ppc
-../@value{GDB-UNTAR}/configure \
- --target=powerpc-unknown-eabi \
- --program-prefix=powerpc-rtems- \
- --enable-sim-powerpc \
- --enable-sim-timebase \
- --enable-sim-inline \
- --enable-sim-hardware \
- --enable-targets=all \
- --prefix=<INSTALL_POINT_FOR_PPC>
-@end example
-
-Where <INSTALL_POINT_FOR_PPC> is a unique location where the gdb
-with PSIM will be created.
-
-
-@subheading Make the Debugger
-
-From tools/build-ppc execute the following command sequence:
-
-@example
-gmake all install
-@end example
-
-
-@section GDB for DINK32
-
-@subheading Make the Build Directory
-
-Create a build directory for the DINK32 Debugger
-
-@example
-cd tools
-mkdir build-dink32
-@end example
-
-@subheading Configure for the Build
-
-Configure the GNU Debugger to communicate with
-the DINK32 ROM monitor:
-
-@example
-cd tools/build-dink32
-../@value{GDB-UNTAR}/configure --target-powerpc-elf \
- --program-prefix=powerpc-rtems- \
- --enable-targets=all \
- --prefix=<INSTALL_POINT_FOR_DINK32>
-@end example
-
-Where <INSTALL_POINT_FOR_DINK32> is a unique location where the
-gdb Dink32 will be created.
-
-@subheading Make the Debugger
-
-From tools/build-dink32 execute the following command sequence:
-
-@example
-gmake all install
-@end example
-
diff --git a/doc/started_ada/intro.t b/doc/started_ada/intro.t
deleted file mode 100644
index bbdb374769..0000000000
--- a/doc/started_ada/intro.t
+++ /dev/null
@@ -1,161 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Introduction
-
-The purpose of this document is to guide you through the process of
-installing a GNU cross development environment to use with RTEMS.
-
-If you are already familiar with the concepts behind a cross compiler and
-have a background in Unix, these instructions should provide the bare
-essentials for performing a setup of the following items:
-
-@itemize @bullet
-@item GNAT/RTEMS Cross Compilation Tools on your host system
-@item RTEMS OS for the target host
-@item GDB Debugger
-@end itemize
-
-The remainder of this chapter provides background information on real-time
-embedded systems and cross development and an overview of other
-resources of interest on the Internet. If you are not familiar with
-real-time embedded systems or the other areas, please read those sections.
-These sections will help familiarize you with the
-types of systems RTEMS is designed to be used in and the cross development
-process used when developing RTEMS applications.
-
-@section Real-Time Embedded Systems
-
-Real-time embedded systems are found in practically every facet of our
-everyday lives. Today's systems range from the common telephone, automobile
-control systems, and kitchen appliances to complex air traffic control
-systems, military weapon systems, an d production line control including
-robotics and automation. However, in the current climate of rapidly changing
-technology, it is difficult to reach a consensus on the definition of a
-real-time embedded system. Hardware costs are continuing to rapidly decline
-while at the same time the hardware is increasing in power and functionality.
-As a result, embedded systems that were not considered viable two years ago
-are suddenly a cost effective solution. In this domain, it is not uncommon
-for a single hardware configuration to employ a variety of architectures and
-technologies. Therefore, we shall define an embedded system as any computer
-system that is built into a larger system consisting of multiple technologies
-such as digital and analog electronics, mechanical devices, and sensors.
-
-Even as hardware platforms become more powerful, most embedded systems are
-critically dependent on the real-time software embedded in the systems
-themselves. Regardless of how efficiently the hardware operates, the
-performance of the embedded real-time software determines the success of the
-system. As the complexity of the embedded hardware platform grows, so does
-the size and complexity of the embedded software. Software systems must
-routinely perform activities which were only dreamed of a short time ago.
-These large, complex, real-time embedded applications now commonly contain
-one million lines of code or more.
-
-Real-time embedded systems have a complex set of characteristics that
-distinguish them from other software applications. Real-time embedded
-systems are driven by and must respond to real world events while adhering to
-rigorous requirements imposed by the environment with which they interact.
-The correctness of the system depends not only on the results of
-computations, but also on the time at which the results are produced. The
-most important and complex characteristic of real-time application systems is
-that they must receive and respond to a set of external stimuli within rigid
-and critical time constraints.
-
-A single real-time application can be composed of both soft and hard
-real-time components. A typical example of a hard real-time system is a
-nuclear reactor control system that must not only detect failures, but must
-also respond quickly enough to prevent a meltdown. This application also has
-soft real-time requirements because it may involve a man-machine interface.
-Providing an interactive input to the control system is not as critical as
-setting off an alarm to indicate a failure condition. However, th e
-interactive system component must respond within an acceptable time limit to
-allow the operator to interact efficiently with the control system.
-
-@section Cross Development
-
-Today almost all real-time embedded software systems are developed in a
-@b{cross development} environment using cross development tools. In the cross
-development environment, software development activities are typically
-performed on one computer system, the @b{host} system, while the result of the
-development effort (produced by the cross tools) is a software system that
-executes on the @b{target} platform. The requirements for the target platform are
-usually incompatible and quite often in direct conflict with the requirements
-for the host. Moreover, the target hardware is often custom designed for a
-particular project. This means that the cross development toolset must allow
-the developer to customize the tools to address target specific run-time
-issues. The toolset must have provisions for board dependent initialization
-code, device drivers, and error handling code.
-
-The host computer is optimized to support the code development cycle with
-support for code editors, compilers, and linkers requiring large disk drives,
-user development windows, and multiple developer connections. Thus the host
-computer is typically a traditional UNIX workstation such as are available
-from SUN or Silicon Graphics, or a PC running either a version of MS-Windows
-or UNIX. The host system may also be required to execute office productivity
-applications to allow the software developer to write documentation, make
-presentations, or track the project's progress using a project management
-tool. This necessitates that the host computer be general purpose with
-resources such as a thirty-two or sixty-four bit processor, large amounts of
-RAM, a monitor, mouse, keyboard, hard and floppy disk drives, CD-ROM drive,
-and a graphics card. It is likely that the system will be multimedia capable
-and have some networking capability.
-
-Conversely, the target platform generally has limited traditional computer
-resources. The hardware is designed for the particular functionality and
-requirements of the embedded system and optimized to perform those tasks
-effectively. Instead of hard driverss and keyboards, it is composed of
-sensors, relays, and stepper motors. The per-unit cost of the target platform
-is typically a critical concern. No hardware component is included without
-being cost justified. As a result, the processor of the target system is
-often from a different processor family than that of the host system and
-usually has lower performance. In addition to the processor families
-targeted only for use in embedded systems, there are versions of nearly every
-general-purpose process or specifically tailored for real-time embedded
-systems. For example, many of the processors targeting the embedded market
-do not include hardware floating point units, but do include peripherals such
-as timers, serial controllers, or network interfaces.
-
-@section Resources on the Internet
-
-This section describes various resources on the Internet which are of
-use to GNAT/RTEMS users.
-
-@subsection RTEMS Mailing List
-
-rtems-list@@OARcorp.com
-
-This mailing list is dedicated to discussion of issues related
-to RTEMS. If you have questions about RTEMS, wish to make
-suggestions, or just want to pick up hints, this is a good
-list to subscribe to. Subscribe by sending a message with
-the one line "subscribe" to rtems-list-request@@OARcorp.com.
-
-@subsection CrossGCC Mailing List
-
-crossgcc@@cygnus.com
-
-This mailing list is dedicated to the use of the GNU tools in
-cross development environments. Most of the discussions
-focus on embedded issues. Subscribe by sending a message with
-the one line "subscribe" to crossgcc-request@@cygnus.com.
-
-The crossgcc FAQ as well as a number of patches and utiliities
-of interest to cross development system users are available
-at ftp://ftp.cygnus.com/pub/embedded/crossgcc.
-
-@subsection GNAT Chat Mailing List
-
-chat@@gnat.com
-
-This mailing list is dedicated to the general discussion
-of GNAT specific issues. The discussions try to avoid
-more general Ada95 language issues which have other
-forums. Subscribe by sending a message with
-the one line "subscribe" to chat-request@@gnat.com.
-
-
diff --git a/doc/started_ada/require.t b/doc/started_ada/require.t
deleted file mode 100644
index aa817c66c3..0000000000
--- a/doc/started_ada/require.t
+++ /dev/null
@@ -1,102 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Requirements
-
-A fairly large amount of disk space is required to perform the build of the
-GNU C/C++ Cross Compiler Tools for RTEMS. The following table may help in
-assessing the amount of disk space required for your installation:
-
-@example
-+------------------------------------+--------------------------+
-| Component | Disk Space Required |
-+------------------------------------+--------------------------+
-| archive directory | 30 Mbytes |
-| tools src unzipped | 100 Mbytes |
-| each individual build directory | 300 Mbytes worst case |
-| each installation directory | 20-130 Mbytes |
-+------------------------------------+--------------------------+
-@end example
-
-The disk space required for each installation directory depends
-primarily on the number of RTEMS BSPs which are to be installed.
-If a single BSP is installed, then the size of each install directory
-will tend to be in the 40-60 Mbyte range.
-
-The instructions in this manual should work on any computer running
-a UNIX variant. Some native GNU tools are used by this procedure
-including:
-
-@itemize @bullet
-@item GCC
-@item GNAT
-@item GNU make
-@end itemize
-
-In addition, some native utilities may be deficient for building
-the GNU tools.
-
-@section Native GNAT
-
-The native GNAT must be installed in the default location or built
-from source. No GCC or GNAT environment variables should be set during
-the build or use of the cross GNAT/RTEMS toolset as this could result in
-an unpredictable mix of native and cross toolsets.
-
-Binaries for native GNAT installations are available at the primary
-GNAT ftp site (@value{GNAT-FTP}. Installation instructions are
-included with the binary GNAT distributions. The binary installation
-should be installed in the default location or installed in a
-non-default location and used ONLY to build a native GNAT from source.
-This final native GNAT will be used to build the GNAT/RTEMS cross
-development toolset.
-
-@subsection Verifying Correct Operation of Native GNAT
-
-It is imperative that the native GNAT installation work correctly for
-the installation of GNAT/RTEMS to succeed. It is recommended that the
-user verify that the native GNAT is installed correctly by performing
-these tests:
-
-@subsubsection Native Hello World Test
-
-Place the following Ada source code in hello.adb:
-
-@example
-with Text_IO; use Text_IO;
-
-procedure Hello is
-begin
- Put_Line ( "Hello World");
-end Hello;
-@end example
-
-Use the following command sequence to ompile and execute the above program:
-
-@example
-gnatmake hello
-./hello
-@end example
-
-If the message @code{Hello World} is printed, then the native installation
-of GNAT operates well enough to proceed.
-
-@subsubsection Insure GCC and GNAT Environment Variables Are Not Set
-
-If any of the following commands produce output, then you have
-environment variables overriding the default behavior of the
-native GNAT toolset. These variables will conflict with the cross
-toolset. Please resolve this problem before proceeding further.
-
-@example
-echo $GCC_EXEC_PREFIX
-echo $ADA_INCLUDE_PATH
-echo $ADA_OBJECTS_PATH
-echo $LD_RUN_PATH
-echo $C_INCLUDE_PATH
-@end example
diff --git a/doc/started_ada/sample.t b/doc/started_ada/sample.t
deleted file mode 100644
index d64af1c092..0000000000
--- a/doc/started_ada/sample.t
+++ /dev/null
@@ -1,54 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Building the Sample Application
-
-@section Unpack the Sample Application
-
-Use the following command to unarchive the sample application:
-
-@example
-cd tools
-tar xzf ../archive/hello_world_ada.tgz
-@end example
-
-@section Create a BSP Specific Makefile
-
-Provided are example Makefiles for multiple BSPs. Copy one of these to
-the file Makefile.<BOARD_SUPPORT_PACKAGE> and edit it as appropriate for
-your local configuration.
-
-Use the <INSTALLATION_POINT> and <BOARD_SUPPORT_PACKAGE> specified when
-configuring and installing RTEMS.
-
-@section Build the Sample Application
-
-Use the following command to start the build of the sample application:
-
-@example
-cd tools/hello_world_ada
-gmake -f Makefile.<BOARD_SUPPORT_PACKAGE>
-@end example
-
-If the BSP specific modifications to the Makefile were correct and
-no errors are detected during the sample application build, it is
-reasonable to assume that the build of the GNAT/RTEMS Cross Compiler Tools
-for RTEMS and RTEMS itself for the selected host and target
-combination was done properly.
-
-@section Application Executable
-
-If the sample application has successfully been build, then the application
-executable is placed in the following directory:
-
-@example
-tools/hello_world_ada/o-<BOARD_SUPPORT_PACKAGE>/<filename>.exe
-@end example
-
-How this executable is downloaded to the target board is very dependent
-on the BOARD_SUPPORT_PACKAGE selected.
diff --git a/doc/started_ada/started_ada.texi b/doc/started_ada/started_ada.texi
deleted file mode 100644
index 041eb3fab9..0000000000
--- a/doc/started_ada/started_ada.texi
+++ /dev/null
@@ -1,115 +0,0 @@
-\input texinfo @c -*-texinfo-*-
-@c %**start of header
-@setfilename started_ada
-@syncodeindex vr fn
-@synindex ky cp
-@paragraphindent 0
-@c @smallbook
-@c %**end of header
-
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@c
-@c Master file for the Getting Started (C) Guide
-@c
-
-@include ../common/setup.texi
-
-@c
-@c Now set all the tool version dependent information
-@c
-@include versions.texi
-
-@ignore
-@ifinfo
-@format
-START-INFO-DIR-ENTRY
-* Getting Started with GNAT/RTEMS (started_ada):
-END-INFO-DIR-ENTRY
-@end format
-@end ifinfo
-@end ignore
-
-@c
-@c Title Page Stuff
-@c
-
-@set edition @value{RTEMS-EDITION}
-@set version @value{RTEMS-VERSION}
-@set update-date @value{RTEMS-UPDATE-DATE}
-@set update-month @value{RTEMS-UPDATE-MONTH}
-
-@c
-@c I don't really like having a short title page. --joel
-@c
-@c @shorttitlepage Getting Started with RTEMS
-
-@setchapternewpage odd
-@settitle Getting Started with GNAT/RTEMS
-@titlepage
-@finalout
-
-@title Getting Started with GNAT/RTEMS
-@subtitle Edition @value{edition}, for @value{version}
-@sp 1
-@subtitle @value{update-month}
-@author On-Line Applications Research Corporation
-@page
-@include ../common/cpright.texi
-@end titlepage
-
-@c This prevents a black box from being printed on "overflow" lines.
-@c The alternative is to rework a sentence to avoid this problem.
-
-@include intro.texi
-@include require.texi
-@include buildada.texi
-@include buildrt.texi
-@include sample.texi
-@include gdb.texi
-
-@ifinfo
-@node Top, Introduction, (dir), (dir)
-@top started_ada
-
-This is the online version of the Getting Started with GNAT/RTEMS.
-
-@menu
-* Introduction::
-* Requirements::
-* Building the GNAT Cross Compiler Toolset::
-* Building RTEMS::
-* Building the Sample Application::
-* Building the GNU Debugger::
-@end menu
-
-@c * Command and Variable Index::
-@c * Concept Index::
-@end ifinfo
-@c
-@c
-@c Need to copy the emacs stuff and "trailer stuff" (index, toc) into here
-@c
-
-@c @node Command and Variable Index, Concept Index, GDB for DINK32, Top
-@c @unnumbered Command and Variable Index
-
-@c There are currently no Command and Variable Index entries.
-
-@c @printindex fn
-
-@c @node Concept Index, , Command and Variable Index, Top
-@c @unnumbered Concept Index
-
-@c There are currently no Concept Index entries.
-@c @printindex cp
-
-@contents
-@bye
-
diff --git a/doc/started_ada/versions.texi b/doc/started_ada/versions.texi
deleted file mode 100644
index 1396f76e03..0000000000
--- a/doc/started_ada/versions.texi
+++ /dev/null
@@ -1,96 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@c
-@c This file contains all toolset version dependent information
-@c
-
-@c
-@c Comment out setting the "XYZ-RTEMSPATCH" variable if there is no
-@c patch required. The documentation will detect this and print
-@c an appropriate message in a short section.
-@c
-
-
-@c
-@c GCC/EGCS Version
-@c
-
-@set GCC-VERSION gcc 2.8.1
-@set GCC-TAR gcc-2.8.1.tar.gz
-@set GCC-UNTAR gcc-2.8.1
-@set GCC-FTPSITE ftp.gnu.org
-@set GCC-FTPDIR /pub/gnu
-@set GCC-RTEMSPATCH gcc-2.8.1-rtems-diff-19980527.gz
-
-@c
-@c GNAT Version
-@c
-
-@set GNAT-VERSION gnat 3.11b
-@set GNAT-TAR gnat-3.11b-src.tar.gz
-@set GNAT-UNTAR gnat-3.11b-src
-@set GNAT-FTPSITE NONE
-@set GNAT-FTPDIR NO_DIRECTORY
-@set GNAT-RTEMSPATCH gnat-3.11b-rtems-diff-19981105.gz
-
-@c
-@c BINUTILS Version
-@c
-
-@c The "official" binutils
-@set BINUTILS-VERSION binutils 2.9.1
-@set BINUTILS-TAR binutils-2.9.1.tar.gz
-@set BINUTILS-UNTAR binutils-2.9.1
-@set BINUTILS-FTPSITE ftp.gnu.org
-@set BINUTILS-FTPDIR /pub/gnu
-@set BINUTILS-RTEMSPATCH binutils-2.9.1-rtems-diff-19981027.gz
-
-@c When forced to use a snapshot
-@c @set BINUTILS-VERSION gas 980314
-@c @set BINUTILS-TAR gas-980314.tgz
-@c @set BINUTILS-UNTAR gas-980314
-@c @set BINUTILS-FTPSITE ftp.OARcorp.com
-@c @set BINUTILS-FTPDIR /oarcorp/private/beta3/ada_tools
-@c @set BINUTILS-RTEMSPATCH binutils-2.8.1-rtems-diff-980321.gz
-
-@c
-@c NEWLIB Version
-@c
-
-@set NEWLIB-VERSION newlib 1.8.1
-@set NEWLIB-TAR newlib-1.8.1.tar.gz
-@set NEWLIB-UNTAR newlib-1.8.1
-@set NEWLIB-FTPSITE ftp.cygnus.com
-@set NEWLIB-FTPDIR /pub/newlib
-@set NEWLIB-RTEMSPATCH newlib-1.8.1-rtems-diff-19980121.gz
-
-@c
-@c GDB Version
-@c
-
-@set GDB-VERSION gdb 4.17
-@set GDB-TAR gdb-4.17.tar.gz
-@set GDB-UNTAR gdb-4.17
-@set GDB-FTPSITE ftp.gnu.org
-@set GDB-FTPDIR /pub/gnu
-@set GDB-RTEMSPATCH gdb-4.17-rtems-diff-19981027.gz
-@c @set GDB-GNATPATCH gdb-ada-patch-1.17.8.gz
-
-@c
-@c RTEMS Version
-@c
-
-@set RTEMS-VERSION RTEMS 4.0.0
-@set RTEMS-TAR rtems-4.0.0.tgz
-@set RTEMS-UNTAR rtems-4.0.0
-@set RTEMS-FTPSITE ftp.OARcorp.com
-@set RTEMS-FTPDIR /pub/rtems/4.0.0
-@set BUILDTOOLS-TAR ada_build_scripts-4.0.0.tgz
-
-
diff --git a/doc/supplements/hppa1_1/Makefile b/doc/supplements/hppa1_1/Makefile
deleted file mode 100644
index 640eb3bbe2..0000000000
--- a/doc/supplements/hppa1_1/Makefile
+++ /dev/null
@@ -1,152 +0,0 @@
-#
-# COPYRIGHT (c) 1988-1999.
-# On-Line Applications Research Corporation (OAR).
-# All rights reserved.
-#
-# $Id$
-#
-
-PROJECT=hppa1_1
-
-include ../../Make.config
-
-REPLACE=../../tools/word-replace
-
-all: html info ps pdf
-
-dirs:
- $(make-dirs)
-
-COMMON_FILES=../../common/cpright.texi ../../common/setup.texi
-
-GENERATED_FILES=\
- cpumodel.texi callconv.texi memmodel.texi intr.texi fatalerr.texi \
- bsp.texi cputable.texi wksheets.texi timing.texi timeSIMHPPA.texi
-
-FILES= $(PROJECT).texi \
- preface.texi \
- $(GENERATED_FILES)
-
-info: dirs c_hppa1_1
- cp c_$(PROJECT) $(INFO_INSTALL)
-
-c_hppa1_1: $(FILES)
- $(MAKEINFO) $(PROJECT).texi
-
-dvi: dirs $(PROJECT).dvi
-ps: dirs $(PROJECT).ps
-pdf: dirs $(PROJECT).pdf
-
-$(PROJECT).pdf: $(FILES)
- $(TEXI2PDF) $(PROJECT).texi
- cp $(PROJECT).pdf $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).ps: $(PROJECT).dvi
- dvips -o $(PROJECT).ps $(PROJECT).dvi
- cp $(PROJECT).ps $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).dvi: $(FILES)
- $(TEXI2DVI) $(PROJECT).texi
- cp $(PROJECT).dvi $(WWW_INSTALL)/$(PROJECT)
-
-html: dirs $(FILES)
- -mkdir -p $(WWW_INSTALL)/$(PROJECT)
- $(TEXI2WWW) $(TEXI2WWW_ARGS) -dir $(WWW_INSTALL)/$(PROJECT) \
- $(PROJECT).texi
-
-clean:
- rm -f *.o $(PROG) *.txt core $(PROJECT).pdf
- rm -f *.dvi *.ps *.log *.aux *.cp *.fn *.ky *.pg *.toc *.tp *.vr $(BASE)
- rm -f $(PROJECT) $(PROJECT)-*
- rm -f c_hppa1_1 c_hppa1_1-*
- rm -f intr.t
- rm -f timing.t timing.texi
- rm -f wksheets.t wksheets_NOTIMES.t $(GENERATED_FILES)
- rm -f *.fixed _*
-
-#
-# Chapters which get automatic processing
-#
-
-cpumodel.texi: cpumodel.t Makefile
- $(BMENU) -p "Preface" \
- -u "Top" \
- -n "Calling Conventions" ${*}.t
-
-callconv.texi: callconv.t Makefile
- $(BMENU) -p "CPU Model Dependent Features CPU Model Name" \
- -u "Top" \
- -n "Memory Model" ${*}.t
-
-memmodel.texi: memmodel.t Makefile
- $(BMENU) -p "Calling Conventions User-Provided Routines" \
- -u "Top" \
- -n "Interrupt Processing" ${*}.t
-
-# Interrupt Chapter:
-# 1. Replace Times and Sizes
-# 2. Build Node Structure
-
-intr.t: intr_NOTIMES.t SIMHPPA_TIMES
- ${REPLACE} -p SIMHPPA_TIMES intr_NOTIMES.t
- mv intr_NOTIMES.t.fixed intr.t
-
-intr.texi: intr.t Makefile
- $(BMENU) -p "Memory Model Flat Memory Model" \
- -u "Top" \
- -n "Default Fatal Error Processing" ${*}.t
-
-
-fatalerr.texi: fatalerr.t Makefile
- $(BMENU) -p "Interrupt Processing Disabling of Interrupts by RTEMS" \
- -u "Top" \
- -n "Board Support Packages" ${*}.t
-
-bsp.texi: bsp.t Makefile
- $(BMENU) -p "Default Fatal Error Processing Default Fatal Error Handler Operations" \
- -u "Top" \
- -n "Processor Dependent Information Table" ${*}.t
-
-cputable.texi: cputable.t Makefile
- $(BMENU) -p "Board Support Packages Processor Initialization" \
- -u "Top" \
- -n "Memory Requirements" ${*}.t
-
-# Worksheets Chapter:
-# 1. Obtain the Shared File
-# 2. Replace Times and Sizes
-# 3. Build Node Structure
-
-wksheets_NOTIMES.t: ../../common/wksheets.t
- cp ../../common/wksheets.t wksheets_NOTIMES.t
-
-wksheets.t: wksheets_NOTIMES.t SIMHPPA_TIMES
- ${REPLACE} -p SIMHPPA_TIMES wksheets_NOTIMES.t
- mv wksheets_NOTIMES.t.fixed wksheets.t
-
-wksheets.texi: wksheets.t Makefile
- $(BMENU) -p "Processor Dependent Information Table CPU Dependent Information Table" \
- -u "Top" \
- -n "Timing Specification" ${*}.t
-
-# Timing Specification Chapter:
-# 1. Copy the Shared File
-# 3. Build Node Structure
-
-timing.t: ../../common/timing.t
- cp ../../common/timing.t timing.t
-
-timing.texi: timing.t Makefile
- $(BMENU) -p "Memory Requirements RTEMS RAM Workspace Worksheet" \
- -u "Top" \
- -n "HP-7100 Timing Data" ${*}.t
-
-# Timing Data for BSP Chapter:
-# 1. Copy the Shared File
-# 2. Replace Times and Sizes
-# 3. Build Node Structure
-
-timeSIMHPPA.texi: timeSIMHPPA.t Makefile
- $(BMENU) -p "Timing Specification Terminology" \
- -u "Top" \
- -n "Command and Variable Index" ${*}.t
diff --git a/doc/supplements/hppa1_1/SIMHPPA_TIMES b/doc/supplements/hppa1_1/SIMHPPA_TIMES
deleted file mode 100644
index 311553aa03..0000000000
--- a/doc/supplements/hppa1_1/SIMHPPA_TIMES
+++ /dev/null
@@ -1,247 +0,0 @@
-#
-# PA-RISC Timing and Size Information
-#
-# $Id$
-#
-
-#
-# CPU Model Information
-#
-RTEMS_BSP simhppa
-RTEMS_CPU_MODEL HP-7100
-#
-# Interrupt Latency
-#
-# NOTE: In general, the text says it is hand-calculated to be
-# RTEMS_MAXIMUM_DISABLE_PERIOD at RTEMS_MAXIMUM_DISABLE_PERIOD_MHZ
-# Mhz and this was last calculated for Release
-# RTEMS_VERSION_FOR_MAXIMUM_DISABLE_PERIOD.
-#
-RTEMS_MAXIMUM_DISABLE_PERIOD TBD
-RTEMS_MAXIMUM_DISABLE_PERIOD_MHZ TBD
-RTEMS_RELEASE_FOR_MAXIMUM_DISABLE_PERIOD TBD
-#
-# Context Switch Times
-#
-RTEMS_NO_FP_CONTEXTS 1
-RTEMS_RESTORE_1ST_FP_TASK 2
-RTEMS_SAVE_INIT_RESTORE_INIT 3
-RTEMS_SAVE_IDLE_RESTORE_INIT 4
-RTEMS_SAVE_IDLE_RESTORE_IDLE 5
-#
-# Task Manager Times
-#
-RTEMS_TASK_CREATE_ONLY 6
-RTEMS_TASK_IDENT_ONLY 7
-RTEMS_TASK_START_ONLY 8
-RTEMS_TASK_RESTART_CALLING_TASK 9
-RTEMS_TASK_RESTART_SUSPENDED_RETURNS_TO_CALLER 9
-RTEMS_TASK_RESTART_BLOCKED_RETURNS_TO_CALLER 10
-RTEMS_TASK_RESTART_READY_RETURNS_TO_CALLER 11
-RTEMS_TASK_RESTART_SUSPENDED_PREEMPTS_CALLER 12
-RTEMS_TASK_RESTART_BLOCKED_PREEMPTS_CALLER 13
-RTEMS_TASK_RESTART_READY_PREEMPTS_CALLER 14
-RTEMS_TASK_DELETE_CALLING_TASK 15
-RTEMS_TASK_DELETE_SUSPENDED_TASK 16
-RTEMS_TASK_DELETE_BLOCKED_TASK 17
-RTEMS_TASK_DELETE_READY_TASK 18
-RTEMS_TASK_SUSPEND_CALLING_TASK 19
-RTEMS_TASK_SUSPEND_RETURNS_TO_CALLER 20
-RTEMS_TASK_RESUME_TASK_READIED_RETURNS_TO_CALLER 21
-RTEMS_TASK_RESUME_TASK_READIED_PREEMPTS_CALLER 22
-RTEMS_TASK_SET_PRIORITY_OBTAIN_CURRENT_PRIORITY 23
-RTEMS_TASK_SET_PRIORITY_RETURNS_TO_CALLER 24
-RTEMS_TASK_SET_PRIORITY_PREEMPTS_CALLER 25
-RTEMS_TASK_MODE_OBTAIN_CURRENT_MODE 26
-RTEMS_TASK_MODE_NO_RESCHEDULE 27
-RTEMS_TASK_MODE_RESCHEDULE_RETURNS_TO_CALLER 28
-RTEMS_TASK_MODE_RESCHEDULE_PREEMPTS_CALLER 29
-RTEMS_TASK_GET_NOTE_ONLY 30
-RTEMS_TASK_SET_NOTE_ONLY 31
-RTEMS_TASK_WAKE_AFTER_YIELD_RETURNS_TO_CALLER 32
-RTEMS_TASK_WAKE_AFTER_YIELD_PREEMPTS_CALLER 33
-RTEMS_TASK_WAKE_WHEN_ONLY 34
-#
-# Interrupt Manager
-#
-RTEMS_INTR_ENTRY_RETURNS_TO_NESTED 35
-RTEMS_INTR_ENTRY_RETURNS_TO_INTERRUPTED_TASK 36
-RTEMS_INTR_ENTRY_RETURNS_TO_PREEMPTING_TASK 37
-RTEMS_INTR_EXIT_RETURNS_TO_NESTED 38
-RTEMS_INTR_EXIT_RETURNS_TO_INTERRUPTED_TASK 39
-RTEMS_INTR_EXIT_RETURNS_TO_PREEMPTING_TASK 40
-#
-# Clock Manager
-#
-RTEMS_CLOCK_SET_ONLY 41
-RTEMS_CLOCK_GET_ONLY 42
-RTEMS_CLOCK_TICK_ONLY 43
-#
-# Timer Manager
-#
-RTEMS_TIMER_CREATE_ONLY 44
-RTEMS_TIMER_IDENT_ONLY 45
-RTEMS_TIMER_DELETE_INACTIVE 46
-RTEMS_TIMER_DELETE_ACTIVE 47
-RTEMS_TIMER_FIRE_AFTER_INACTIVE 48
-RTEMS_TIMER_FIRE_AFTER_ACTIVE 49
-RTEMS_TIMER_FIRE_WHEN_INACTIVE 50
-RTEMS_TIMER_FIRE_WHEN_ACTIVE 51
-RTEMS_TIMER_RESET_INACTIVE 52
-RTEMS_TIMER_RESET_ACTIVE 53
-RTEMS_TIMER_CANCEL_INACTIVE 54
-RTEMS_TIMER_CANCEL_ACTIVE 55
-#
-# Semaphore Manager
-#
-RTEMS_SEMAPHORE_CREATE_ONLY 56
-RTEMS_SEMAPHORE_IDENT_ONLY 57
-RTEMS_SEMAPHORE_DELETE_ONLY 58
-RTEMS_SEMAPHORE_OBTAIN_AVAILABLE 59
-RTEMS_SEMAPHORE_OBTAIN_NOT_AVAILABLE_NO_WAIT 60
-RTEMS_SEMAPHORE_OBTAIN_NOT_AVAILABLE_CALLER_BLOCKS 61
-RTEMS_SEMAPHORE_RELEASE_NO_WAITING_TASKS 62
-RTEMS_SEMAPHORE_RELEASE_TASK_READIED_RETURNS_TO_CALLER 63
-RTEMS_SEMAPHORE_RELEASE_TASK_READIED_PREEMPTS_CALLER 64
-#
-# Message Manager
-#
-RTEMS_MESSAGE_QUEUE_CREATE_ONLY 65
-RTEMS_MESSAGE_QUEUE_IDENT_ONLY 66
-RTEMS_MESSAGE_QUEUE_DELETE_ONLY 67
-RTEMS_MESSAGE_QUEUE_SEND_NO_WAITING_TASKS 68
-RTEMS_MESSAGE_QUEUE_SEND_TASK_READIED_RETURNS_TO_CALLER 69
-RTEMS_MESSAGE_QUEUE_SEND_TASK_READIED_PREEMPTS_CALLER 70
-RTEMS_MESSAGE_QUEUE_URGENT_NO_WAITING_TASKS 71
-RTEMS_MESSAGE_QUEUE_URGENT_TASK_READIED_RETURNS_TO_CALLER 72
-RTEMS_MESSAGE_QUEUE_URGENT_TASK_READIED_PREEMPTS_CALLER 73
-RTEMS_MESSAGE_QUEUE_BROADCAST_NO_WAITING_TASKS 74
-RTEMS_MESSAGE_QUEUE_BROADCAST_TASK_READIED_RETURNS_TO_CALLER 75
-RTEMS_MESSAGE_QUEUE_BROADCAST_TASK_READIED_PREEMPTS_CALLER 76
-RTEMS_MESSAGE_QUEUE_RECEIVE_AVAILABLE 77
-RTEMS_MESSAGE_QUEUE_RECEIVE_NOT_AVAILABLE_NO_WAIT 78
-RTEMS_MESSAGE_QUEUE_RECEIVE_NOT_AVAILABLE_CALLER_BLOCKS 79
-RTEMS_MESSAGE_QUEUE_FLUSH_NO_MESSAGES_FLUSHED 80
-RTEMS_MESSAGE_QUEUE_FLUSH_MESSAGES_FLUSHED 81
-#
-# Event Manager
-#
-RTEMS_EVENT_SEND_NO_TASK_READIED 82
-RTEMS_EVENT_SEND_TASK_READIED_RETURNS_TO_CALLER 83
-RTEMS_EVENT_SEND_TASK_READIED_PREEMPTS_CALLER 84
-RTEMS_EVENT_RECEIVE_OBTAIN_CURRENT_EVENTS 85
-RTEMS_EVENT_RECEIVE_AVAILABLE 86
-RTEMS_EVENT_RECEIVE_NOT_AVAILABLE_NO_WAIT 87
-RTEMS_EVENT_RECEIVE_NOT_AVAILABLE_CALLER_BLOCKS 88
-#
-# Signal Manager
-#
-RTEMS_SIGNAL_CATCH_ONLY 89
-RTEMS_SIGNAL_SEND_RETURNS_TO_CALLER 90
-RTEMS_SIGNAL_SEND_SIGNAL_TO_SELF 91
-RTEMS_SIGNAL_EXIT_ASR_OVERHEAD_RETURNS_TO_CALLING_TASK 92
-RTEMS_SIGNAL_EXIT_ASR_OVERHEAD_RETURNS_TO_PREEMPTING_TASK 93
-#
-# Partition Manager
-#
-RTEMS_PARTITION_CREATE_ONLY 94
-RTEMS_PARTITION_IDENT_ONLY 95
-RTEMS_PARTITION_DELETE_ONLY 96
-RTEMS_PARTITION_GET_BUFFER_AVAILABLE 97
-RTEMS_PARTITION_GET_BUFFER_NOT_AVAILABLE 98
-RTEMS_PARTITION_RETURN_BUFFER_ONLY 99
-#
-# Region Manager
-#
-RTEMS_REGION_CREATE_ONLY 100
-RTEMS_REGION_IDENT_ONLY 101
-RTEMS_REGION_DELETE_ONLY 102
-RTEMS_REGION_GET_SEGMENT_AVAILABLE 103
-RTEMS_REGION_GET_SEGMENT_NOT_AVAILABLE_NO_WAIT 104
-RTEMS_REGION_GET_SEGMENT_NOT_AVAILABLE_CALLER_BLOCKS 105
-RTEMS_REGION_RETURN_SEGMENT_NO_WAITING_TASKS 106
-RTEMS_REGION_RETURN_SEGMENT_TASK_READIED_RETURNS_TO_CALLER 107
-RTEMS_REGION_RETURN_SEGMENT_TASK_READIED_PREEMPTS_CALLER 108
-#
-# Dual-Ported Memory Manager
-#
-RTEMS_PORT_CREATE_ONLY 109
-RTEMS_PORT_IDENT_ONLY 110
-RTEMS_PORT_DELETE_ONLY 111
-RTEMS_PORT_INTERNAL_TO_EXTERNAL_ONLY 112
-RTEMS_PORT_EXTERNAL_TO_INTERNAL_ONLY 113
-#
-# IO Manager
-#
-RTEMS_IO_INITIALIZE_ONLY 114
-RTEMS_IO_OPEN_ONLY 115
-RTEMS_IO_CLOSE_ONLY 116
-RTEMS_IO_READ_ONLY 117
-RTEMS_IO_WRITE_ONLY 118
-RTEMS_IO_CONTROL_ONLY 119
-#
-# Rate Monotonic Manager
-#
-RTEMS_RATE_MONOTONIC_CREATE_ONLY 120
-RTEMS_RATE_MONOTONIC_IDENT_ONLY 121
-RTEMS_RATE_MONOTONIC_CANCEL_ONLY 122
-RTEMS_RATE_MONOTONIC_DELETE_ACTIVE 123
-RTEMS_RATE_MONOTONIC_DELETE_INACTIVE 124
-RTEMS_RATE_MONOTONIC_PERIOD_INITIATE_PERIOD_RETURNS_TO_CALLER 125
-RTEMS_RATE_MONOTONIC_PERIOD_CONCLUDE_PERIOD_CALLER_BLOCKS 126
-RTEMS_RATE_MONOTONIC_PERIOD_OBTAIN_STATUS 127
-#
-# Size Information
-#
-#
-# xxx alloted for numbers
-#
-RTEMS_DATA_SPACE 128
-RTEMS_MINIMUM_CONFIGURATION xx,129
-RTEMS_MAXIMUM_CONFIGURATION xx,130
-# x,xxx alloted for numbers
-RTEMS_CORE_CODE_SIZE x,131
-RTEMS_INITIALIZATION_CODE_SIZE x,132
-RTEMS_TASK_CODE_SIZE x,133
-RTEMS_INTERRUPT_CODE_SIZE x,134
-RTEMS_CLOCK_CODE_SIZE x,135
-RTEMS_TIMER_CODE_SIZE x,136
-RTEMS_SEMAPHORE_CODE_SIZE x,137
-RTEMS_MESSAGE_CODE_SIZE x,138
-RTEMS_EVENT_CODE_SIZE x,139
-RTEMS_SIGNAL_CODE_SIZE x,140
-RTEMS_PARTITION_CODE_SIZE x,141
-RTEMS_REGION_CODE_SIZE x,142
-RTEMS_DPMEM_CODE_SIZE x,143
-RTEMS_IO_CODE_SIZE x,144
-RTEMS_FATAL_ERROR_CODE_SIZE x,145
-RTEMS_RATE_MONOTONIC_CODE_SIZE x,146
-RTEMS_MULTIPROCESSING_CODE_SIZE x,147
-# xxx alloted for numbers
-RTEMS_TIMER_CODE_OPTSIZE 148
-RTEMS_SEMAPHORE_CODE_OPTSIZE 149
-RTEMS_MESSAGE_CODE_OPTSIZE 150
-RTEMS_EVENT_CODE_OPTSIZE 151
-RTEMS_SIGNAL_CODE_OPTSIZE 152
-RTEMS_PARTITION_CODE_OPTSIZE 153
-RTEMS_REGION_CODE_OPTSIZE 154
-RTEMS_DPMEM_CODE_OPTSIZE 155
-RTEMS_IO_CODE_OPTSIZE 156
-RTEMS_RATE_MONOTONIC_CODE_OPTSIZE 157
-RTEMS_MULTIPROCESSING_CODE_OPTSIZE 158
-# xxx alloted for numbers
-RTEMS_BYTES_PER_TASK 159
-RTEMS_BYTES_PER_TIMER 160
-RTEMS_BYTES_PER_SEMAPHORE 161
-RTEMS_BYTES_PER_MESSAGE_QUEUE 162
-RTEMS_BYTES_PER_REGION 163
-RTEMS_BYTES_PER_PARTITION 164
-RTEMS_BYTES_PER_PORT 165
-RTEMS_BYTES_PER_PERIOD 166
-RTEMS_BYTES_PER_EXTENSION 167
-RTEMS_BYTES_PER_FP_TASK 168
-RTEMS_BYTES_PER_NODE 169
-RTEMS_BYTES_PER_GLOBAL_OBJECT 170
-RTEMS_BYTES_PER_PROXY 171
-# x,xxx alloted for numbers
-RTEMS_BYTES_OF_FIXED_SYSTEM_REQUIREMENTS x,172
diff --git a/doc/supplements/hppa1_1/bsp.t b/doc/supplements/hppa1_1/bsp.t
deleted file mode 100644
index e453fcb654..0000000000
--- a/doc/supplements/hppa1_1/bsp.t
+++ /dev/null
@@ -1,53 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Board Support Packages
-
-@section Introduction
-
-An RTEMS Board Support Package (BSP) must be designed
-to support a particular processor and target board combination.
-This chapter presents a discussion of PA-RISC specific BSP
-issues. For more information on developing a BSP, refer to the
-chapter titled Board Support Packages in the RTEMS
-Applications User's Guide.
-
-@section System Reset
-
-An RTEMS based application is initiated or
-re-initiated when the PA-RISC processor is reset. The behavior
-of a PA-RISC upon reset is implementation defined and thus is
-beyond the scope of this manual.
-
-@section Processor Initialization
-
-The precise requirements for initialization of a
-particular implementation of the PA-RISC architecture are
-implementation defined. Thus it is impossible to provide exact
-details of this procedure in this manual. However, the
-requirements of RTEMS which must be satisfied by this
-initialization code can be discussed.
-
-RTEMS assumes that interrupts are disabled when the
-initialize_executive directive is invoked. Interrupts are
-enabled automatically by RTEMS as part of the initialize
-executive directive and device driver initialization occurs
-after interrupts are enabled. Thus all interrupt sources should
-be quiescent until the system's device drivers have been
-initialized and installed their interrupt handlers.
-
-If the processor requires initialization of the
-cache, then it should be be done during the reset application
-initialization code.
-
-Finally, the requirements in the Board Support
-Packages chapter of the Applications User's Manual for the
-reset code which is executed before the call to initialize
-executive must be satisfied.
-
-
diff --git a/doc/supplements/hppa1_1/callconv.t b/doc/supplements/hppa1_1/callconv.t
deleted file mode 100644
index 254a1784d4..0000000000
--- a/doc/supplements/hppa1_1/callconv.t
+++ /dev/null
@@ -1,143 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Calling Conventions
-
-@section Introduction
-
-Each high-level language compiler generates
-subroutine entry and exit code based upon a set of rules known
-as the compiler's calling convention. These rules address the
-following issues:
-
-@itemize @bullet
-@item register preservation and usage
-
-@item parameter passing
-
-@item call and return mechanism
-@end itemize
-
-A compiler's calling convention is of importance when
-interfacing to subroutines written in another language either
-assembly or high-level. Even when the high-level language and
-target processor are the same, different compilers may use
-different calling conventions. As a result, calling conventions
-are both processor and compiler dependent.
-
-This chapter describes the calling conventions used
-by the GNU C and standard HP-UX compilers for the PA-RISC
-architecture.
-
-@section Processor Background
-
-The PA-RISC architecture supports a simple yet
-effective call and return mechanism for subroutine calls where
-the caller and callee are both in the same address space. The
-compiler will not automatically generate subroutine calls which
-cross address spaces. A subroutine is invoked via the branch
-and link (bl) or the branch and link register (blr). These
-instructions save the return address in a caller specified
-register. By convention, the return address is saved in r2.
-The callee is responsible for maintaining the return address so
-it can return to the correct address. The branch vectored (bv)
-instruction is used to branch to the return address and thus
-return from the subroutine to the caller. It is is important to
-note that the PA-RISC subroutine call and return mechanism does
-not automatically save or restore any registers. It is the
-responsibility of the high-level language compiler to define the
-register preservation and usage convention.
-
-@section Calling Mechanism
-
-All RTEMS directives are invoked as standard
-subroutines via a bl or a blr instruction with the return address
-assumed to be in r2 and return to the user application via the
-bv instruction.
-
-@section Register Usage
-
-As discussed above, the bl and blr instructions do
-not automatically save any registers. RTEMS uses the registers
-r1, r19 - r26, and r31 as scratch registers. The PA-RISC
-calling convention specifies that the first four (4) arguments
-to subroutines are passed in registers r23 - r26. After the
-arguments have been used, the contents of these registers may be
-altered. Register r31 is the millicode scratch register.
-Millicode is the set of routines which support high-level
-languages on the PA-RISC by providing routines which are either
-too complex or too long for the compiler to generate inline code
-when these operations are needed. For example, indirect calls
-utilize a millicode routine. The scratch registers are not
-preserved by RTEMS directives therefore, the contents of these
-registers should not be assumed upon return from any RTEMS
-directive.
-
-Surprisingly, when using the GNU C compiler at least
-integer multiplies are performed using the floating point
-registers. This is an important optimization because the
-PA-RISC does not have otherwise have hardware for multiplies.
-This has important ramifications in regards to the PA-RISC port
-of RTEMS. On most processors, the floating point unit is
-ignored if the code only performs integer operations. This
-makes it easy for the application developer to predict whether
-or not any particular task will require floating point
-operations. This property is taken advantage of by RTEMS on
-other architectures to minimize the number of times the floating
-point context is saved and restored. However, on the PA-RISC
-architecture, every task is implicitly a floating point task.
-Additionally the state of the floating point unit must be saved
-and restored as part of the interrupt processing because for all
-practical purposes it is impossible to avoid the use of the
-floating point registers. It is unknown if the HP-UX C compiler
-shares this property.
-
-@itemize @code{ }
-@item @b{NOTE}: Later versions of the GNU C has a PA-RISC specific
-option to disable use of the floating point registers. RTEMS
-currently assumes that this option is not turned on. If the use
-of this option sets a built-in define, then it should be
-possible to modify the PA-RISC specific code such that all tasks
-are considered floating point only when this option is not used.
-@end itemize
-
-@section Parameter Passing
-
-RTEMS assumes that the first four (4) arguments are
-placed in the appropriate registers (r26, r25, r24, and r23)
-and, if needed, additional are placed on the current stack
-before the directive is invoked via the bl or blr instruction.
-The first argument is placed in r26, the second is placed in
-r25, and so forth. The following pseudo-code illustrates the
-typical sequence used to call a RTEMS directive with three (3)
-arguments:
-
-
-@example
-set r24 to the third argument
-set r25 to the second argument
-set r26 to the first argument
-invoke directive
-@end example
-
-The stack on the PA-RISC grows upward -- i.e.
-"pushing" onto the stack results in the address in the stack
-pointer becoming numerically larger. By convention, r27 is used
-as the stack pointer. The standard stack frame consists of a
-minimum of sixty-four (64) bytes and is the responsibility of
-the callee to maintain.
-
-@section User-Provided Routines
-
-All user-provided routines invoked by RTEMS, such as
-user extensions, device drivers, and MPCI routines, must also
-adhere to these calling conventions.
-
-
-
-
diff --git a/doc/supplements/hppa1_1/cpumodel.t b/doc/supplements/hppa1_1/cpumodel.t
deleted file mode 100644
index f90257c15a..0000000000
--- a/doc/supplements/hppa1_1/cpumodel.t
+++ /dev/null
@@ -1,56 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter CPU Model Dependent Features
-
-@section Introduction
-
-Microprocessors are generally classified into
-families with a variety of CPU models or implementations within
-that family. Within a processor family, there is a high level
-of binary compatibility. This family may be based on either an
-architectural specification or on maintaining compatibility with
-a popular processor. Recent microprocessor families such as the
-SPARC or PA-RISC are based on an architectural specification
-which is independent or any particular CPU model or
-implementation. Older families such as the M68xxx and the iX86
-evolved as the manufacturer strived to produce higher
-performance processor models which maintained binary
-compatibility with older models.
-
-RTEMS takes advantage of the similarity of the
-various models within a CPU family. Although the models do vary
-in significant ways, the high level of compatibility makes it
-possible to share the bulk of the CPU dependent executive code
-across the entire family. Each processor family supported by
-RTEMS has a list of features which vary between CPU models
-within a family. For example, the most common model dependent
-feature regardless of CPU family is the presence or absence of a
-floating point unit or coprocessor. When defining the list of
-features present on a particular CPU model, one simply notes
-that floating point hardware is or is not present and defines a
-single constant appropriately. Conditional compilation is
-utilized to include the appropriate source code for this CPU
-model's feature set. It is important to note that this means
-that RTEMS is thus compiled using the appropriate feature set
-and compilation flags optimal for this CPU model used. The
-alternative would be to generate a binary which would execute on
-all family members using only the features which were always
-present.
-
-This chapter presents the set of features which vary
-across PA-RISC implementations and are of importance to RTEMS.
-The set of CPU model feature macros are defined in the file
-c/src/exec/score/cpu/hppa1_1/hppa.h based upon the particular CPU
-model defined on the compilation command line.
-
-@section CPU Model Name
-
-The macro CPU_MODEL_NAME is a string which designates
-the name of this CPU model. For example, for the Hewlett Packard
-PA-7100 CPU model, this macro is set to the string "hppa 7100".
diff --git a/doc/supplements/hppa1_1/cputable.t b/doc/supplements/hppa1_1/cputable.t
deleted file mode 100644
index c8b1385a31..0000000000
--- a/doc/supplements/hppa1_1/cputable.t
+++ /dev/null
@@ -1,116 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Processor Dependent Information Table
-
-@section Introduction
-
-Any highly processor dependent information required
-to describe a processor to RTEMS is provided in the CPU
-Dependent Information Table. This table is not required for all
-processors supported by RTEMS. This chapter describes the
-contents, if any, for a particular processor type.
-
-@section CPU Dependent Information Table
-
-The PA-RISC version of the RTEMS CPU Dependent
-Information Table contains the information required to interface
-a Board Support Package and RTEMS on the PA-RISC. This
-information is provided to allow RTEMS to interoperate
-effectively with the BSP. The C structure definition is given
-here:
-
-@example
-typedef struct @{
- void (*pretasking_hook)( void );
- void (*predriver_hook)( void );
- void (*postdriver_hook)( void );
- void (*idle_task)( void );
- boolean do_zero_of_workspace;
- unsigned32 idle_task_stack_size;
- unsigned32 interrupt_stack_size;
- unsigned32 extra_mpci_receive_server_stack;
- void * (*stack_allocate_hook)( unsigned32 );
- void (*stack_free_hook)( void * );
- /* end of fields required on all CPUs */
-
- hppa_rtems_isr_entry spurious_handler;
-
- /* itimer_clicks_per_microsecond is for the Clock driver */
- unsigned32 itimer_clicks_per_microsecond;
-@} rtems_cpu_table;
-@end example
-
-@table @code
-@item pretasking_hook
-is the address of the user provided routine which is invoked
-once RTEMS APIs are initialized. This routine will be invoked
-before any system tasks are created. Interrupts are disabled.
-This field may be NULL to indicate that the hook is not utilized.
-
-@item predriver_hook
-is the address of the user provided
-routine that is invoked immediately before the
-the device drivers and MPCI are initialized. RTEMS
-initialization is complete but interrupts and tasking are disabled.
-This field may be NULL to indicate that the hook is not utilized.
-
-@item postdriver_hook
-is the address of the user provided
-routine that is invoked immediately after the
-the device drivers and MPCI are initialized. RTEMS
-initialization is complete but interrupts and tasking are disabled.
-This field may be NULL to indicate that the hook is not utilized.
-
-@item idle_task
-is the address of the optional user
-provided routine which is used as the system's IDLE task. If
-this field is not NULL, then the RTEMS default IDLE task is not
-used. This field may be NULL to indicate that the default IDLE
-is to be used.
-
-@item do_zero_of_workspace
-indicates whether RTEMS should
-zero the Workspace as part of its initialization. If set to
-TRUE, the Workspace is zeroed. Otherwise, it is not.
-
-@item idle_task_stack_size
-is the size of the RTEMS idle task stack in bytes.
-If this number is less than MINIMUM_STACK_SIZE, then the
-idle task's stack will be MINIMUM_STACK_SIZE in byte.
-
-@item interrupt_stack_size
-is the size of the RTEMS allocated interrupt stack in bytes.
-This value must be at least as large as MINIMUM_STACK_SIZE.
-
-@item extra_mpci_receive_server_stack
-is the extra stack space allocated for the RTEMS MPCI receive server task
-in bytes. The MPCI receive server may invoke nearly all directives and
-may require extra stack space on some targets.
-
-@item stack_allocate_hook
-is the address of the optional user provided routine which allocates
-memory for task stacks. If this hook is not NULL, then a stack_free_hook
-must be provided as well.
-
-@item stack_free_hook
-is the address of the optional user provided routine which frees
-memory for task stacks. If this hook is not NULL, then a stack_allocate_hook
-must be provided as well.
-
-@item spurious_handler
-is the address of the optional user provided routine which is invoked
-when a spurious external interrupt occurs. A spurious interrupt is one
-for which no handler is installed.
-
-@item itimer_clicks_per_microsecond
-is the number of countdowns in the on-CPU timer which corresponds
-to a microsecond. This is a function of the clock speed of the CPU
-being used.
-
-@end table
diff --git a/doc/supplements/hppa1_1/fatalerr.t b/doc/supplements/hppa1_1/fatalerr.t
deleted file mode 100644
index 170a2d683a..0000000000
--- a/doc/supplements/hppa1_1/fatalerr.t
+++ /dev/null
@@ -1,32 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Default Fatal Error Processing
-
-@section Introduction
-
-Upon detection of a fatal error by either the
-application or RTEMS the fatal error manager is invoked. The
-fatal error manager will invoke a user-supplied fatal error
-handler. If no user-supplied handler is configured, the RTEMS
-provided default fatal error handler is invoked. If the
-user-supplied fatal error handler returns to the executive the
-default fatal error handler is then invoked. This chapter
-describes the precise operations of the default fatal error
-handler.
-
-@section Default Fatal Error Handler Operations
-
-The default fatal error handler which is invoked by
-the fatal_error_occurred directive when there is no user handler
-configured or the user handler returns control to RTEMS. The
-default fatal error handler disables processor interrupts (i.e.
-sets the I bit in the PSW register to 0), places the error code
-in r1, and executes a break instruction to simulate a halt
-processor instruction.
-
diff --git a/doc/supplements/hppa1_1/hppa1_1.texi b/doc/supplements/hppa1_1/hppa1_1.texi
deleted file mode 100644
index 3c3512a0d4..0000000000
--- a/doc/supplements/hppa1_1/hppa1_1.texi
+++ /dev/null
@@ -1,121 +0,0 @@
-\input texinfo @c -*-texinfo-*-
-@c %**start of header
-@setfilename c_hppa1_1
-@syncodeindex vr fn
-@synindex ky cp
-@paragraphindent 0
-@c @smallbook
-@c %**end of header
-
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@c
-@c Master file for the Hewlett Packard PA-RISC Applications Supplement
-@c
-
-@include ../../common/setup.texi
-
-@ignore
-@ifinfo
-@format
-START-INFO-DIR-ENTRY
-* RTEMS Hewlett Packard PA-RISC Applications Supplement (hppa1_1):
-END-INFO-DIR-ENTRY
-@end format
-@end ifinfo
-@end ignore
-
-@c
-@c Title Page Stuff
-@c
-
-@set edition @value{RTEMS-EDITION}
-@set version @value{RTEMS-VERSION}
-@set update-date @value{RTEMS-UPDATE-DATE}
-@set update-month @value{RTEMS-UPDATE-MONTH}
-
-@c
-@c I don't really like having a short title page. --joel
-@c
-@c @shorttitlepage RTEMS Hewlett Packard PA-RISC Applications Supplement
-
-@setchapternewpage odd
-@settitle RTEMS Hewlett Packard PA-RISC Applications Supplement
-@titlepage
-@finalout
-
-@title RTEMS Hewlett Packard PA-RISC Applications Supplement
-@subtitle Edition @value{edition}, for RTEMS @value{version}
-@sp 1
-@subtitle @value{update-month}
-@author On-Line Applications Research Corporation
-@page
-@include ../../common/cpright.texi
-@end titlepage
-
-@c This prevents a black box from being printed on "overflow" lines.
-@c The alternative is to rework a sentence to avoid this problem.
-
-@include preface.texi
-@include cpumodel.texi
-@include callconv.texi
-@include memmodel.texi
-@include intr.texi
-@include fatalerr.texi
-@include bsp.texi
-@include cputable.texi
-@include wksheets.texi
-@include timing.texi
-@include timeSIMHPPA.texi
-@ifinfo
-@node Top, Preface, (dir), (dir)
-@top c_hppa1_1
-
-This is the online version of the RTEMS Hewlett Packard PA-RISC
-Applications Supplement.
-
-@menu
-* Preface::
-* CPU Model Dependent Features::
-* Calling Conventions::
-* Memory Model::
-* Interrupt Processing::
-* Default Fatal Error Processing::
-* Board Support Packages::
-* Processor Dependent Information Table::
-* Memory Requirements::
-* Timing Specification::
-* HP-7100 Timing Data::
-* Command and Variable Index::
-* Concept Index::
-@end menu
-
-@end ifinfo
-@c
-@c
-@c Need to copy the emacs stuff and "trailer stuff" (index, toc) into here
-@c
-
-@node Command and Variable Index, Concept Index, HP-7100 Timing Data Directive Times, Top
-
-@unnumbered Command and Variable Index
-
-There are currently no Command and Variable Index entries.
-
-@c @printindex fn
-
-@node Concept Index, , Command and Variable Index, Top
-@unnumbered Concept Index
-
-There are currently no Concept Index entries.
-@c @printindex cp
-
-@contents
-@bye
-
diff --git a/doc/supplements/hppa1_1/intr_NOTIMES.t b/doc/supplements/hppa1_1/intr_NOTIMES.t
deleted file mode 100644
index f05c9ac129..0000000000
--- a/doc/supplements/hppa1_1/intr_NOTIMES.t
+++ /dev/null
@@ -1,191 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Interrupt Processing
-
-@section Introduction
-
-Different types of processors respond to the
-occurence of an interrupt in their own unique fashion. In
-addition, each processor type provides a control mechanism to
-allow for the proper handling of an interrupt. The processor
-dependent response to the interrupt modifies the current
-execution state and results in a change in the execution stream.
-Most processors require that an interrupt handler utilize some
-special control mechanisms to return to the normal processing
-stream. Although RTEMS hides many of the processor dependent
-details of interrupt processing, it is important to understand
-how the RTEMS interrupt manager is mapped onto the processor's
-unique architecture. Discussed in this chapter are the PA-RISC's
-interrupt response and control mechanisms as they pertain to
-RTEMS.
-
-@section Vectoring of Interrupt Handler
-
-Upon receipt of an interrupt the PA-RISC
-automatically performs the following actions:
-
-@itemize @bullet
-@item The PSW (Program Status Word) is saved in the IPSW
-(Interrupt Program Status Word).
-
-@item The current privilege level is set to 0.
-
-@item The following defined bits in the PSW are set:
-
-@item E bit is set to the default endian bit
-
-@item M bit is set to 1 if the interrupt is a high-priority
-machine check and 0 otherwise
-
-@item Q bit is set to zero thuse freezing the IIA
-(Instruction Address) queues
-
-@item C and D bits are set to zero thus disabling all
-protection and translation.
-
-@item I bit is set to zero this disabling all external,
-powerfail, and low-priority machine check interrupts.
-
-@item All others bits are set to zero.
-
-@item General purpose registers r1, r8, r9, r16, r17, r24, and
-r25 are copied to the shadow registers.
-
-@item Execution begins at the address given by the formula:
-Interruption Vector Address + (32 * interrupt vector number).
-@end itemize
-
-Once the processor has completed the actions it is is
-required to perform for each interrupt, the RTEMS interrupt
-management code (the beginning of which is stored in the
-Interruption Vector Table) gains control and performs the
-following actions upon each interrupt:
-
-@itemize @bullet
-@item returns the processor to "virtual mode" thus reenabling
-all code and data address translation.
-
-@item saves all necessary interrupt state information
-
-@item saves all floating point registers
-
-@item saves all integer registers
-
-@item switches the current stack to the interrupt stack
-
-@item dispatches to the appropriate user provided interrupt
-service routine (ISR). If the ISR was installed with the
-interrupt_catch directive, then it will be executed at this.
-Because, the RTEMS interrupt handler saves all registers which
-are not preserved according to the calling conventions and
-invokes the application's ISR, the ISR can easily be written in
-a high-level language.
-@end itemize
-
-RTEMS refers to the combination of the interrupt
-state information and registers saved when vectoring an
-interrupt as the Interrupt Stack Frame (ISF). A nested
-interrupt is processed similarly by the PA-RISC and RTEMS with
-the exception that the nested interrupt occurred while executing
-on the interrupt stack and, thus, the current stack need not be
-switched.
-
-@section Interrupt Stack Frame
-
-The PA-RISC architecture does not alter the stack
-while processing interrupts. However, RTEMS does save
-information on the stack as part of processing an interrupt.
-This following shows the format of the Interrupt Stack Frame for
-the PA-RISC as defined by RTEMS:
-
-@example
-@group
- +------------------------+
- | Interrupt Context | 0xXXX
- +------------------------+
- | Integer Context | 0xXXX
- +------------------------+
- | Floating Point Context | 0xXXX
- +------------------------+
-@end group
-@end example
-
-@section External Interrupts and Traps
-
-In addition to the thirty-two unique interrupt
-sources supported by the PA-RISC architecture, RTEMS also
-supports the installation of handlers for each of the thirty-two
-external interrupts supported by the PA-RISC architecture.
-Except for interrupt vector 4, each of the interrupt vectors 0
-through 31 may be associated with a user-provided interrupt
-handler. Interrupt vector 4 is used for external interrupts.
-When an external interrupt occurs, the RTEMS external interrupt
-handler is invoked and the actual interrupt source is indicated
-by status bits in the EIR (External Interrupt Request) register.
-The RTEMS external interrupt handler (or interrupt vector four)
-examines the EIR to determine which interrupt source requires
-servicing.
-
-RTEMS supports sixty-four interrupt vectors for the
-PA-RISC. Vectors 0 through 31 map to the normal interrupt
-sources while RTEMS interrupt vectors 32 through 63 are directly
-associated with the external interrupt sources indicated by bits
-0 through 31 in the EIR.
-
-The exact set of interrupt sources which are checked
-for by the RTEMS external interrupt handler and the order in
-which they are checked are configured by the user in the CPU
-Configuration Table. If an external interrupt occurs which does
-not have a handler configured, then the spurious interrupt
-handler will be invoked. The spurious interrupt handler may
-also be specifiec by the user in the CPU Configuration Table.
-
-@section Interrupt Levels
-
-Two levels (enabled and disabled) of interrupt
-priorities are supported by the PA-RISC architecture. Level
-zero (0) indicates that interrupts are fully enabled (i.e. the I
-bit of the PSW is 1). Level one (1) indicates that interrupts
-are disabled (i.e. the I bit of the PSW is 0). Thirty-two
-independent sources of external interrupts are supported by the
-PA-RISC architecture. Each of these interrupts sources may be
-individually enabled or disabled. When processor interrupts are
-disabled, all sources of external interrupts are ignored. When
-processor interrupts are enabled, the EIR (External Interrupt
-Request) register is used to determine which sources are
-currently allowed to generate interrupts.
-
-Although RTEMS supports 256 interrupt levels, the
-PA-RISC architecture only supports two. RTEMS interrupt level 0
-indicates that interrupts are enabled and level 1 indicates that
-interrupts are disabled. All other RTEMS interrupt levels are
-undefined and their behavior is unpredictable.
-
-@section Disabling of Interrupts by RTEMS
-
-During the execution of directive calls, critical
-sections of code may be executed. When these sections are
-encountered, RTEMS disables external interrupts by setting the I
-bit in the PSW to 0 before the execution of this section and
-restores them to the previous level upon completion of the
-section. RTEMS has been optimized to insure that interrupts are
-disabled for less than XXX instructions when compiled with GNU
-CC at optimization level 4. The exact execution time will vary
-based on the based on the processor implementation, amount of
-cache, the number of wait states for primary memory, and
-processor speed present on the target board.
-
-Non-maskable interrupts (NMI) such as high-priority
-machine checks cannot be disabled, and ISRs which execute at
-this level MUST NEVER issue RTEMS system calls. If a directive
-is invoked, unpredictable results may occur due to the inability
-of RTEMS to protect its critical sections. However, ISRs that
-make no system calls may safely execute as non-maskable
-interrupts.
-
diff --git a/doc/supplements/hppa1_1/memmodel.t b/doc/supplements/hppa1_1/memmodel.t
deleted file mode 100644
index 985cc65918..0000000000
--- a/doc/supplements/hppa1_1/memmodel.t
+++ /dev/null
@@ -1,67 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Memory Model
-
-@section Introduction
-
-A processor may support any combination of memory
-models ranging from pure physical addressing to complex demand
-paged virtual memory systems. RTEMS supports a flat memory
-model which ranges contiguously over the processor's allowable
-address space. RTEMS does not support segmentation or virtual
-memory of any kind. The appropriate memory model for RTEMS
-provided by the targeted processor and related characteristics
-of that model are described in this chapter.
-
-@section Flat Memory Model
-
-RTEMS supports applications in which the application
-and the executive execute within a single thirty-two bit address
-space. Thus RTEMS and the application share a common four
-gigabyte address space within a single space. The PA-RISC
-automatically converts every address from a logical to a
-physical address each time it is used. The PA-RISC uses
-information provided in the page table to perform this
-translation. The following protection levels are assumed:
-
-@itemize @bullet
-@item a single code segment at protection level (0) which
-contains all application and executive code.
-
-@item a single data segment at protection level zero (0) which
-contains all application and executive data.
-@end itemize
-
-The PA-RISC space registers and associated stack --
-including the stack pointer r27 -- must be initialized when the
-initialize_executive directive is invoked. RTEMS treats the
-space registers as system resources shared by all tasks and does
-not modify or context switch them.
-
-This memory model supports a flat 32-bit address
-space with addresses ranging from 0x00000000 to 0xFFFFFFFF (4
-gigabytes). Each address is represented by a 32-bit value and
-memory is addressable. The address may be used to reference a
-single byte, half-word (2-bytes), or word (4 bytes).
-
-RTEMS does not require that logical addresses map
-directly to physical addresses, although it is desirable in many
-applications to do so. RTEMS does not need any additional
-information when physical addresses do not map directly to
-physical addresses. By not requiring that logical addresses map
-directly to physical addresses, the memory space of an RTEMS
-space can be separated from that of a ROM monitor. For example,
-a ROM monitor may load application programs into a separate
-logical address space from itself.
-
-RTEMS assumes that the space registers contain the
-selector for the single data segment when a directive is
-invoked. This assumption is especially important when
-developing interrupt service routines.
-
diff --git a/doc/supplements/hppa1_1/preface.texi b/doc/supplements/hppa1_1/preface.texi
deleted file mode 100644
index f8d2b6d251..0000000000
--- a/doc/supplements/hppa1_1/preface.texi
+++ /dev/null
@@ -1,36 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@ifinfo
-@node Preface, CPU Model Dependent Features, Top, Top
-@end ifinfo
-@unnumbered Preface
-
-The Real Time Executive for Multiprocessor Systems
-(RTEMS) is designed to be portable across multiple processor
-architectures. However, the nature of real-time systems makes
-it essential that the application designer understand certain
-processor dependent implementation details. These processor
-dependencies include calling convention, board support package
-issues, interrupt processing, exact RTEMS memory requirements,
-performance data, header files, and the assembly language
-interface to the executive.
-
-For information on the PA-RISC V1.1 architecture in
-general, refer to the following documents:
-
-@itemize @bullet
-@item @cite{PA-RISC 1.1 Architecture and Instruction Set Reference
-Manual, Third Edition. HP Part Number 09740-90039}.
-@end itemize
-
-It is highly recommended that the PA-RISC RTEMS
-application developer also obtain and become familiar with the
-Technical Reference Manual for the particular implementation of
-the PA-RISC being used.
-
diff --git a/doc/supplements/hppa1_1/timeSIMHPPA.t b/doc/supplements/hppa1_1/timeSIMHPPA.t
deleted file mode 100644
index 9480ac7294..0000000000
--- a/doc/supplements/hppa1_1/timeSIMHPPA.t
+++ /dev/null
@@ -1,86 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter HP-7100 Timing Data
-
-@section Introduction
-
-The timing data for the PA-RISC version of RTEMS is
-provided along with the target dependent aspects concerning the
-gathering of the timing data. The hardware platform used to
-gather the times is described to give the reader a better
-understanding of each directive time provided. Also, provided
-is a description of the interrupt latency and the context
-switch times as they pertain to the PA-RISC version of RTEMS.
-
-@section Hardware Platform
-
-No directive execution times are reported for the
-HP-7100 because the target platform was proprietary and
-executions times could not be released.
-
-@section Interrupt Latency
-
-The maximum period with traps disabled or the
-processor interrupt level set to it's highest value inside RTEMS
-is less than RTEMS_MAXIMUM_DISABLE_PERIOD
-microseconds including the instructions which
-disable and re-enable interrupts. The time required for the
-HP-7100 to vector an interrupt and for the RTEMS entry overhead
-before invoking the user's trap handler are a total of
-RTEMS_INTR_ENTRY_RETURNS_TO_PREEMPTING_TASK
-microseconds. These combine to yield a worst case interrupt
-latency of less than RTEMS_MAXIMUM_DISABLE_PERIOD +
-RTEMS_INTR_ENTRY_RETURNS_TO_PREEMPTING_TASK microseconds at 15 Mhz.
-[NOTE: The maximum period with interrupts disabled was last
-determined for Release RTEMS_RELEASE_FOR_MAXIMUM_DISABLE_PERIOD.]
-
-It should be noted again that the maximum period with
-interrupts disabled within RTEMS for the HP-7100 is hand calculated.
-
-@section Context Switch
-
-The RTEMS processor context switch time is RTEMS_NO_FP_CONTEXTS
-microsections for the HP-7100 when no floating point context
-switch is saved or restored. Saving and restoring the floating
-point context adds additional time to the context
-switch procedure. Additional execution time is required when a
-TASK_SWITCH user extension is configured. The use of the
-TASK_SWITCH extension is application dependent. Thus, its
-execution time is not considered part of the raw context switch
-time.
-
-Since RTEMS was designed specifically for embedded
-missile applications which are floating point intensive, the
-executive is optimized to avoid unnecessarily saving and
-restoring the state of the numeric coprocessor. On many
-processors, the state of the numeric coprocessor is only saved
-when an FLOATING_POINT task is dispatched and that task was not
-the last task to utilize the coprocessor. In a system with only
-one FLOATING_POINT task, the state of the numeric coprocessor
-will never be saved or restored. When the first FLOATING_POINT
-task is dispatched, RTEMS does not need to save the current
-state of the numeric coprocessor. As discussed in the Register
-Usage section, on the HP-7100 the every task is considered to be
-floating point registers and , as a rsule, every context switch
-involves saving and restoring the state of the floating point
-unit.
-
-The following table summarizes the context switch
-times for the HP-7100 processor:
-
-@example
-no times are available for the HP-7100
-@end example
-
-@section Directive Times
-
-No execution times are available for the HP-7100
-because the target platform was proprietary and no timing
-information could be released.
-
diff --git a/doc/supplements/i386/FORCE386_TIMES b/doc/supplements/i386/FORCE386_TIMES
deleted file mode 100644
index b40f8ad50b..0000000000
--- a/doc/supplements/i386/FORCE386_TIMES
+++ /dev/null
@@ -1,247 +0,0 @@
-#
-# Intel i386/Force CPU-386 Timing and Size Information
-#
-# $Id$
-#
-
-#
-# CPU Model Information
-#
-RTEMS_BSP CPU386
-RTEMS_CPU_MODEL i386
-#
-# Interrupt Latency
-#
-# NOTE: In general, the text says it is hand-calculated to be
-# RTEMS_MAXIMUM_DISABLE_PERIOD at RTEMS_MAXIMUM_DISABLE_PERIOD_MHZ
-# Mhz and this was last calculated for Release
-# RTEMS_VERSION_FOR_MAXIMUM_DISABLE_PERIOD.
-#
-RTEMS_MAXIMUM_DISABLE_PERIOD 13.0
-RTEMS_MAXIMUM_DISABLE_PERIOD_MHZ 16
-RTEMS_RELEASE_FOR_MAXIMUM_DISABLE_PERIOD 3.1.0
-#
-# Context Switch Times
-#
-RTEMS_NO_FP_CONTEXTS 34
-RTEMS_RESTORE_1ST_FP_TASK 57
-RTEMS_SAVE_INIT_RESTORE_INIT 59
-RTEMS_SAVE_IDLE_RESTORE_INIT 59
-RTEMS_SAVE_IDLE_RESTORE_IDLE 83
-#
-# Task Manager Times
-#
-RTEMS_TASK_CREATE_ONLY 157
-RTEMS_TASK_IDENT_ONLY 748
-RTEMS_TASK_START_ONLY 86
-RTEMS_TASK_RESTART_CALLING_TASK 118
-RTEMS_TASK_RESTART_SUSPENDED_RETURNS_TO_CALLER 45
-RTEMS_TASK_RESTART_BLOCKED_RETURNS_TO_CALLER 138
-RTEMS_TASK_RESTART_READY_RETURNS_TO_CALLER 105
-RTEMS_TASK_RESTART_SUSPENDED_PREEMPTS_CALLER 149
-RTEMS_TASK_RESTART_BLOCKED_PREEMPTS_CALLER 162
-RTEMS_TASK_RESTART_READY_PREEMPTS_CALLER 156
-RTEMS_TASK_DELETE_CALLING_TASK 187
-RTEMS_TASK_DELETE_SUSPENDED_TASK 147
-RTEMS_TASK_DELETE_BLOCKED_TASK 153
-RTEMS_TASK_DELETE_READY_TASK 157
-RTEMS_TASK_SUSPEND_CALLING_TASK 81
-RTEMS_TASK_SUSPEND_RETURNS_TO_CALLER 45
-RTEMS_TASK_RESUME_TASK_READIED_RETURNS_TO_CALLER 46
-RTEMS_TASK_RESUME_TASK_READIED_PREEMPTS_CALLER 71
-RTEMS_TASK_SET_PRIORITY_OBTAIN_CURRENT_PRIORITY 30
-RTEMS_TASK_SET_PRIORITY_RETURNS_TO_CALLER 67
-RTEMS_TASK_SET_PRIORITY_PREEMPTS_CALLER 115
-RTEMS_TASK_MODE_OBTAIN_CURRENT_MODE 19
-RTEMS_TASK_MODE_NO_RESCHEDULE 21
-RTEMS_TASK_MODE_RESCHEDULE_RETURNS_TO_CALLER 27
-RTEMS_TASK_MODE_RESCHEDULE_PREEMPTS_CALLER 66
-RTEMS_TASK_GET_NOTE_ONLY 32
-RTEMS_TASK_SET_NOTE_ONLY 32
-RTEMS_TASK_WAKE_AFTER_YIELD_RETURNS_TO_CALLER 18
-RTEMS_TASK_WAKE_AFTER_YIELD_PREEMPTS_CALLER 63
-RTEMS_TASK_WAKE_WHEN_ONLY 128
-#
-# Interrupt Manager
-#
-RTEMS_INTR_ENTRY_RETURNS_TO_NESTED 12
-RTEMS_INTR_ENTRY_RETURNS_TO_INTERRUPTED_TASK 13
-RTEMS_INTR_ENTRY_RETURNS_TO_PREEMPTING_TASK 12
-RTEMS_INTR_EXIT_RETURNS_TO_NESTED 10
-RTEMS_INTR_EXIT_RETURNS_TO_INTERRUPTED_TASK 13
-RTEMS_INTR_EXIT_RETURNS_TO_PREEMPTING_TASK 58
-#
-# Clock Manager
-#
-RTEMS_CLOCK_SET_ONLY 85
-RTEMS_CLOCK_GET_ONLY 2
-RTEMS_CLOCK_TICK_ONLY 16
-#
-# Timer Manager
-#
-RTEMS_TIMER_CREATE_ONLY 34
-RTEMS_TIMER_IDENT_ONLY 729
-RTEMS_TIMER_DELETE_INACTIVE 48
-RTEMS_TIMER_DELETE_ACTIVE 52
-RTEMS_TIMER_FIRE_AFTER_INACTIVE 65
-RTEMS_TIMER_FIRE_AFTER_ACTIVE 69
-RTEMS_TIMER_FIRE_WHEN_INACTIVE 92
-RTEMS_TIMER_FIRE_WHEN_ACTIVE 92
-RTEMS_TIMER_RESET_INACTIVE 58
-RTEMS_TIMER_RESET_ACTIVE 63
-RTEMS_TIMER_CANCEL_INACTIVE 32
-RTEMS_TIMER_CANCEL_ACTIVE 37
-#
-# Semaphore Manager
-#
-RTEMS_SEMAPHORE_CREATE_ONLY 64
-RTEMS_SEMAPHORE_IDENT_ONLY 787
-RTEMS_SEMAPHORE_DELETE_ONLY 60
-RTEMS_SEMAPHORE_OBTAIN_AVAILABLE 41
-RTEMS_SEMAPHORE_OBTAIN_NOT_AVAILABLE_NO_WAIT 40
-RTEMS_SEMAPHORE_OBTAIN_NOT_AVAILABLE_CALLER_BLOCKS 123
-RTEMS_SEMAPHORE_RELEASE_NO_WAITING_TASKS 47
-RTEMS_SEMAPHORE_RELEASE_TASK_READIED_RETURNS_TO_CALLER 70
-RTEMS_SEMAPHORE_RELEASE_TASK_READIED_PREEMPTS_CALLER 95
-#
-# Message Manager
-#
-RTEMS_MESSAGE_QUEUE_CREATE_ONLY 294
-RTEMS_MESSAGE_QUEUE_IDENT_ONLY 730
-RTEMS_MESSAGE_QUEUE_DELETE_ONLY 81
-RTEMS_MESSAGE_QUEUE_SEND_NO_WAITING_TASKS 117
-RTEMS_MESSAGE_QUEUE_SEND_TASK_READIED_RETURNS_TO_CALLER 118
-RTEMS_MESSAGE_QUEUE_SEND_TASK_READIED_PREEMPTS_CALLER 144
-RTEMS_MESSAGE_QUEUE_URGENT_NO_WAITING_TASKS 117
-RTEMS_MESSAGE_QUEUE_URGENT_TASK_READIED_RETURNS_TO_CALLER 116
-RTEMS_MESSAGE_QUEUE_URGENT_TASK_READIED_PREEMPTS_CALLER 144
-RTEMS_MESSAGE_QUEUE_BROADCAST_NO_WAITING_TASKS 53
-RTEMS_MESSAGE_QUEUE_BROADCAST_TASK_READIED_RETURNS_TO_CALLER 122
-RTEMS_MESSAGE_QUEUE_BROADCAST_TASK_READIED_PREEMPTS_CALLER 146
-RTEMS_MESSAGE_QUEUE_RECEIVE_AVAILABLE 93
-RTEMS_MESSAGE_QUEUE_RECEIVE_NOT_AVAILABLE_NO_WAIT 45
-RTEMS_MESSAGE_QUEUE_RECEIVE_NOT_AVAILABLE_CALLER_BLOCKS 127
-RTEMS_MESSAGE_QUEUE_FLUSH_NO_MESSAGES_FLUSHED 29
-RTEMS_MESSAGE_QUEUE_FLUSH_MESSAGES_FLUSHED 41
-#
-# Event Manager
-#
-RTEMS_EVENT_SEND_NO_TASK_READIED 26
-RTEMS_EVENT_SEND_TASK_READIED_RETURNS_TO_CALLER 60
-RTEMS_EVENT_SEND_TASK_READIED_PREEMPTS_CALLER 89
-RTEMS_EVENT_RECEIVE_OBTAIN_CURRENT_EVENTS <1
-RTEMS_EVENT_RECEIVE_AVAILABLE 27
-RTEMS_EVENT_RECEIVE_NOT_AVAILABLE_NO_WAIT 25
-RTEMS_EVENT_RECEIVE_NOT_AVAILABLE_CALLER_BLOCKS 94
-#
-# Signal Manager
-#
-RTEMS_SIGNAL_CATCH_ONLY 13
-RTEMS_SIGNAL_SEND_RETURNS_TO_CALLER 34
-RTEMS_SIGNAL_SEND_SIGNAL_TO_SELF 59
-RTEMS_SIGNAL_EXIT_ASR_OVERHEAD_RETURNS_TO_CALLING_TASK 39
-RTEMS_SIGNAL_EXIT_ASR_OVERHEAD_RETURNS_TO_PREEMPTING_TASK 60
-#
-# Partition Manager
-#
-RTEMS_PARTITION_CREATE_ONLY 83
-RTEMS_PARTITION_IDENT_ONLY 730
-RTEMS_PARTITION_DELETE_ONLY 40
-RTEMS_PARTITION_GET_BUFFER_AVAILABLE 34
-RTEMS_PARTITION_GET_BUFFER_NOT_AVAILABLE 33
-RTEMS_PARTITION_RETURN_BUFFER_ONLY 40
-#
-# Region Manager
-#
-RTEMS_REGION_CREATE_ONLY 68
-RTEMS_REGION_IDENT_ONLY 739
-RTEMS_REGION_DELETE_ONLY 39
-RTEMS_REGION_GET_SEGMENT_AVAILABLE 49
-RTEMS_REGION_GET_SEGMENT_NOT_AVAILABLE_NO_WAIT 45
-RTEMS_REGION_GET_SEGMENT_NOT_AVAILABLE_CALLER_BLOCKS 127
-RTEMS_REGION_RETURN_SEGMENT_NO_WAITING_TASKS 52
-RTEMS_REGION_RETURN_SEGMENT_TASK_READIED_RETURNS_TO_CALLER 113
-RTEMS_REGION_RETURN_SEGMENT_TASK_READIED_PREEMPTS_CALLER 138
-#
-# Dual-Ported Memory Manager
-#
-RTEMS_PORT_CREATE_ONLY 39
-RTEMS_PORT_IDENT_ONLY 728
-RTEMS_PORT_DELETE_ONLY 39
-RTEMS_PORT_INTERNAL_TO_EXTERNAL_ONLY 26
-RTEMS_PORT_EXTERNAL_TO_INTERNAL_ONLY 26
-#
-# IO Manager
-#
-RTEMS_IO_INITIALIZE_ONLY 4
-RTEMS_IO_OPEN_ONLY 1
-RTEMS_IO_CLOSE_ONLY 1
-RTEMS_IO_READ_ONLY <1
-RTEMS_IO_WRITE_ONLY 1
-RTEMS_IO_CONTROL_ONLY 1
-#
-# Rate Monotonic Manager
-#
-RTEMS_RATE_MONOTONIC_CREATE_ONLY 36
-RTEMS_RATE_MONOTONIC_IDENT_ONLY 725
-RTEMS_RATE_MONOTONIC_CANCEL_ONLY 39
-RTEMS_RATE_MONOTONIC_DELETE_ACTIVE 53
-RTEMS_RATE_MONOTONIC_DELETE_INACTIVE 49
-RTEMS_RATE_MONOTONIC_PERIOD_INITIATE_PERIOD_RETURNS_TO_CALLER 53
-RTEMS_RATE_MONOTONIC_PERIOD_CONCLUDE_PERIOD_CALLER_BLOCKS 82
-RTEMS_RATE_MONOTONIC_PERIOD_OBTAIN_STATUS 30
-#
-# Size Information
-#
-#
-# xxx alloted for numbers
-#
-RTEMS_DATA_SPACE 833
-RTEMS_MINIMUM_CONFIGURATION 22,660
-RTEMS_MAXIMUM_CONFIGURATION 39,592
-# x,xxx alloted for numbers
-RTEMS_CORE_CODE_SIZE 16,948
-RTEMS_INITIALIZATION_CODE_SIZE 916
-RTEMS_TASK_CODE_SIZE 3,436
-RTEMS_INTERRUPT_CODE_SIZE 52
-RTEMS_CLOCK_CODE_SIZE 296
-RTEMS_TIMER_CODE_SIZE 1,084
-RTEMS_SEMAPHORE_CODE_SIZE 1,500
-RTEMS_MESSAGE_CODE_SIZE 1,596
-RTEMS_EVENT_CODE_SIZE 1,036
-RTEMS_SIGNAL_CODE_SIZE 396
-RTEMS_PARTITION_CODE_SIZE 1,052
-RTEMS_REGION_CODE_SIZE 1,392
-RTEMS_DPMEM_CODE_SIZE 664
-RTEMS_IO_CODE_SIZE 676
-RTEMS_FATAL_ERROR_CODE_SIZE 20
-RTEMS_RATE_MONOTONIC_CODE_SIZE 1,132
-RTEMS_MULTIPROCESSING_CODE_SIZE 6,840
-# xxx alloted for numbers
-RTEMS_TIMER_CODE_OPTSIZE 144
-RTEMS_SEMAPHORE_CODE_OPTSIZE 136
-RTEMS_MESSAGE_CODE_OPTSIZE 224
-RTEMS_EVENT_CODE_OPTSIZE 44
-RTEMS_SIGNAL_CODE_OPTSIZE 44
-RTEMS_PARTITION_CODE_OPTSIZE 104
-RTEMS_REGION_CODE_OPTSIZE 124
-RTEMS_DPMEM_CODE_OPTSIZE 104
-RTEMS_IO_CODE_OPTSIZE 00
-RTEMS_RATE_MONOTONIC_CODE_OPTSIZE 136
-RTEMS_MULTIPROCESSING_CODE_OPTSIZE 228
-# xxx alloted for numbers
-RTEMS_BYTES_PER_TASK 372
-RTEMS_BYTES_PER_TIMER 68
-RTEMS_BYTES_PER_SEMAPHORE 124
-RTEMS_BYTES_PER_MESSAGE_QUEUE 148
-RTEMS_BYTES_PER_REGION 144
-RTEMS_BYTES_PER_PARTITION 56
-RTEMS_BYTES_PER_PORT 36
-RTEMS_BYTES_PER_PERIOD 36
-RTEMS_BYTES_PER_EXTENSION 64
-RTEMS_BYTES_PER_FP_TASK 108
-RTEMS_BYTES_PER_NODE 48
-RTEMS_BYTES_PER_GLOBAL_OBJECT 20
-RTEMS_BYTES_PER_PROXY 124
-# x,xxx alloted for numbers
-RTEMS_BYTES_OF_FIXED_SYSTEM_REQUIREMENTS 6,768
diff --git a/doc/supplements/i386/Makefile b/doc/supplements/i386/Makefile
deleted file mode 100644
index 9893c1a20c..0000000000
--- a/doc/supplements/i386/Makefile
+++ /dev/null
@@ -1,170 +0,0 @@
-#
-# COPYRIGHT (c) 1988-1999.
-# On-Line Applications Research Corporation (OAR).
-# All rights reserved.
-#
-# $Id$
-#
-
-PROJECT=i386
-
-include ../../Make.config
-
-REPLACE=../../tools/word-replace
-
-all: html info ps pdf
-
-COMMON_FILES=../../common/cpright.texi ../../common/setup.texi
-
-GENERATED_FILES=\
- cpumodel.texi callconv.texi memmodel.texi intr.texi fatalerr.texi \
- bsp.texi cputable.texi timing.texi wksheets.texi timeFORCE386.texi
-
-FILES= $(PROJECT).texi \
- preface.texi \
- $(GENERATED_FILES)
-
-
-dirs:
- $(make-dirs)
-
-info: dirs c_i386
- cp c_$(PROJECT) $(INFO_INSTALL)
- #cp c_$(PROJECT) c_$(PROJECT)-* $(INFO_INSTALL)
-
-c_i386: $(FILES)
- $(MAKEINFO) $(PROJECT).texi
-
-dvi: dirs $(PROJECT).dvi
-ps: dirs $(PROJECT).ps
-pdf: dirs $(PROJECT).pdf
-
-$(PROJECT).pdf: $(FILES)
- $(TEXI2PDF) $(PROJECT).texi
- cp $(PROJECT).pdf $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).ps: $(PROJECT).dvi
- dvips -o $(PROJECT).ps $(PROJECT).dvi
- cp $(PROJECT).ps $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).dvi: $(FILES)
- $(TEXI2DVI) $(PROJECT).texi
- cp $(PROJECT).dvi $(WWW_INSTALL)/$(PROJECT)
-
-html: dirs $(FILES)
- -mkdir -p $(WWW_INSTALL)/$(PROJECT)
- $(TEXI2WWW) $(TEXI2WWW_ARGS) -dir $(WWW_INSTALL)/$(PROJECT) \
- $(PROJECT).texi
-
-clean:
- rm -f *.o $(PROG) *.txt core $(PROJECT).pdf
- rm -f *.dvi *.ps *.log *.aux *.cp *.fn *.ky *.pg *.toc *.tp *.vr $(BASE)
- rm -f $(PROJECT) $(PROJECT)-*
- rm -f c_i386 c_i386-*
- rm -f intr.t $(GENERATED_FILES)
- rm -f wksheets.t wksheets_NOTIMES.t timing.t intr.t
- rm -f timeFORCE386_.t timeFORCE386_.texi
- rm -f *.fixed _*
-
-#
-# Chapters which get automatic processing
-#
-
-cpumodel.texi: cpumodel.t Makefile
- $(BMENU) -p "Preface" \
- -u "Top" \
- -n "Calling Conventions" ${*}.t
-
-callconv.texi: callconv.t Makefile
- $(BMENU) -p "CPU Model Dependent Features Floating Point Unit" \
- -u "Top" \
- -n "Memory Model" ${*}.t
-
-memmodel.texi: memmodel.t Makefile
- $(BMENU) -p "Calling Conventions User-Provided Routines" \
- -u "Top" \
- -n "Interrupt Processing" ${*}.t
-
-# Interrupt Chapter:
-# 1. Replace Times and Sizes
-# 2. Build Node Structure
-
-#intr.texi: intr.t FORCE386_TIMES
-# ${REPLACE} -p FORCE386_TIMES intr.t
-# mv intr.t.fixed intr.texi
-
-# Interrupt Chapter:
-# 1. Replace Times and Sizes
-# 2. Build Node Structure
-intr.t: intr_NOTIMES.t FORCE386_TIMES
- ${REPLACE} -p FORCE386_TIMES intr_NOTIMES.t
- mv intr_NOTIMES.t.fixed intr.t
-
-intr.texi: intr.t Makefile
- $(BMENU) -p "Memory Model Flat Memory Model" \
- -u "Top" \
- -n "Default Fatal Error Processing" ${*}.t
-
-fatalerr.texi: fatalerr.t Makefile
- $(BMENU) -p "Interrupt Processing Interrupt Stack" \
- -u "Top" \
- -n "Board Support Packages" ${*}.t
-
-bsp.texi: bsp.t Makefile
- $(BMENU) -p "Default Fatal Error Processing Default Fatal Error Handler Operations" \
- -u "Top" \
- -n "Processor Dependent Information Table" ${*}.t
-
-cputable.texi: cputable.t Makefile
- $(BMENU) -p "Board Support Packages Processor Initialization" \
- -u "Top" \
- -n "Memory Requirements" ${*}.t
-
-# Worksheets Chapter:
-# 1. Obtain the Shared File
-# 2. Replace Times and Sizes
-# 3. Build Node Structure
-
-wksheets_NOTIMES.t: ../../common/wksheets.t
- cp ../../common/wksheets.t wksheets_NOTIMES.t
-
-wksheets.t: wksheets_NOTIMES.t FORCE386_TIMES
- ${REPLACE} -p FORCE386_TIMES wksheets_NOTIMES.t
- mv wksheets_NOTIMES.t.fixed wksheets.t
-
-wksheets.texi: wksheets.t Makefile
- $(BMENU) -p "Processor Dependent Information Table CPU Dependent Information Table" \
- -u "Top" \
- -n "Timing Specification" ${*}.t
-
-# Timing Specification Chapter:
-# 1. Copy the Shared File
-# 3. Build Node Structure
-
-timing.t: ../../common/timing.t
- cp ../../common/timing.t timing.t
-
-timing.texi: timing.t Makefile
- $(BMENU) -p "Memory Requirements RTEMS RAM Workspace Worksheet" \
- -u "Top" \
- -n "CPU386 Timing Data" ${*}.t
-
-# Timing Data for BSP Chapter:
-# 1. Copy the Shared File
-# 2. Replace Times and Sizes
-# 3. Build Node Structure
-
-timeFORCE386_.t: ../../common/timetbl.t timeFORCE386.t
- cat timeFORCE386.t ../../common/timetbl.t >timeFORCE386_.t
- @echo >>timeFORCE386_.t
- @echo "@tex" >>timeFORCE386_.t
- @echo "\\global\\advance \\smallskipamount by 4pt" >>timeFORCE386_.t
- @echo "@end tex" >>timeFORCE386_.t
- ${REPLACE} -p FORCE386_TIMES timeFORCE386_.t
- mv timeFORCE386_.t.fixed timeFORCE386_.t
-
-timeFORCE386.texi: timeFORCE386_.t Makefile
- $(BMENU) -p "Timing Specification Terminology" \
- -u "Top" \
- -n "Command and Variable Index" timeFORCE386_.t
- mv timeFORCE386_.texi timeFORCE386.texi
diff --git a/doc/supplements/i386/bsp.t b/doc/supplements/i386/bsp.t
deleted file mode 100644
index 051f2402c4..0000000000
--- a/doc/supplements/i386/bsp.t
+++ /dev/null
@@ -1,109 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Board Support Packages
-
-@section Introduction
-
-An RTEMS Board Support Package (BSP) must be designed to support a
-particular processor and target board combination. This chapter presents a
-discussion of i386 specific BSP issues. For more information on developing
-a BSP, refer to the chapter titled Board Support Packages in the RTEMS
-Applications User's Guide.
-
-@section System Reset
-
-An RTEMS based application is initiated when the i386
-processor is reset. When the i386 is reset,
-
-@itemize @bullet
-
-@item The EAX register is set to indicate the results of the processor's
-power-up self test. If the self-test was not executed, the contents of
-this register are undefined. Otherwise, a non-zero value indicates the
-processor is faulty and a zero value indicates a successful self-test.
-
-@item The DX register holds a component identifier and revision level. DH
-contains 3 to indicate an i386 component and DL contains a unique revision
-level indicator.
-
-@item Control register zero (CR0) is set such that the processor is in real
-mode with paging disabled. Other portions of CR0 are used to indicate the
-presence of a numeric coprocessor.
-
-@item All bits in the extended flags register (EFLAG) which are not
-permanently set are cleared. This inhibits all maskable interrupts.
-
-@item The Interrupt Descriptor Register (IDTR) is set to point at address
-zero.
-
-@item All segment registers are set to zero.
-
-@item The instruction pointer is set to 0x0000FFF0. The first instruction
-executed after a reset is actually at 0xFFFFFFF0 because the i386 asserts
-the upper twelve address until the first intersegment (FAR) JMP or CALL
-instruction. When a JMP or CALL is executed, the upper twelve address
-lines are lowered and the processor begins executing in the first megabyte
-of memory.
-
-@end itemize
-
-Typically, an intersegment JMP to the application's initialization code is
-placed at address 0xFFFFFFF0.
-
-@section Processor Initialization
-
-This initialization code is responsible for initializing all data
-structures required by the i386 in protected mode and for actually entering
-protected mode. The i386 must be placed in protected mode and the segment
-registers and associated selectors must be initialized before the
-initialize_executive directive is invoked.
-
-The initialization code is responsible for initializing the Global
-Descriptor Table such that the i386 is in the thirty-two bit flat memory
-model with paging disabled. In this mode, the i386 automatically converts
-every address from a logical to a physical address each time it is used.
-For more information on the memory model used by RTEMS, please refer to the
-Memory Model chapter in this document.
-
-Since the processor is in real mode upon reset, the processor must be
-switched to protected mode before RTEMS can execute. Before switching to
-protected mode, at least one descriptor table and two descriptors must be
-created. Descriptors are needed for a code segment and a data segment. (
-This will give you the flat memory model.) The stack can be placed in a
-normal read/write data segment, so no descriptor for the stack is needed.
-Before the GDT can be used, the base address and limit must be loaded into
-the GDTR register using an LGDT instruction.
-
-If the hardware allows an NMI to be generated, you need to create the IDT
-and a gate for the NMI interrupt handler. Before the IDT can be used, the
-base address and limit for the idt must be loaded into the IDTR register
-using an LIDT instruction.
-
-Protected mode is entered by setting thye PE bit in the CR0 register.
-Either a LMSW or MOV CR0 instruction may be used to set this bit. Because
-the processor overlaps the interpretation of several instructions, it is
-necessary to discard the instructions from the read-ahead cache. A JMP
-instruction immediately after the LMSW changes the flow and empties the
-processor if intructions which have been pre-fetched and/or decoded. At
-this point, the processor is in protected mode and begins to perform
-protected mode application initialization.
-
-If the application requires that the IDTR be some value besides zero, then
-it should set it to the required value at this point. All tasks share the
-same i386 IDTR value. Because interrupts are enabled automatically by
-RTEMS as part of the initialize_executive directive, the IDTR MUST be set
-properly before this directive is invoked to insure correct interrupt
-vectoring. If processor caching is to be utilized, then it should be
-enabled during the reset application initialization code. The reset code
-which is executed before the call to initialize_executive has the following
-requirements:
-
-For more information regarding the i386s data structures and their
-contents, refer to Intel's 386 Programmer's Reference Manual.
-
diff --git a/doc/supplements/i386/callconv.t b/doc/supplements/i386/callconv.t
deleted file mode 100644
index c55652f01c..0000000000
--- a/doc/supplements/i386/callconv.t
+++ /dev/null
@@ -1,90 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Calling Conventions
-
-@section Introduction
-
-Each high-level language compiler generates
-subroutine entry and exit code based upon a set of rules known
-as the compiler's calling convention. These rules address the
-following issues:
-
-@itemize @bullet
-@item register preservation and usage
-
-@item parameter passing
-
-@item call and return mechanism
-@end itemize
-
-A compiler's calling convention is of importance when
-interfacing to subroutines written in another language either
-assembly or high-level. Even when the high-level language and
-target processor are the same, different compilers may use
-different calling conventions. As a result, calling conventions
-are both processor and compiler dependent.
-
-@section Processor Background
-
-The i386 architecture supports a simple yet effective
-call and return mechanism. A subroutine is invoked via the call
-(call) instruction. This instruction pushes the return address
-on the stack. The return from subroutine (ret) instruction pops
-the return address off the current stack and transfers control
-to that instruction. It is is important to note that the i386
-call and return mechanism does not automatically save or restore
-any registers. It is the responsibility of the high-level
-language compiler to define the register preservation and usage
-convention.
-
-@section Calling Mechanism
-
-All RTEMS directives are invoked using a call
-instruction and return to the user application via the ret
-instruction.
-
-@section Register Usage
-
-As discussed above, the call instruction does not
-automatically save any registers. RTEMS uses the registers EAX,
-ECX, and EDX as scratch registers. These registers are not
-preserved by RTEMS directives therefore, the contents of these
-registers should not be assumed upon return from any RTEMS
-directive.
-
-@section Parameter Passing
-
-RTEMS assumes that arguments are placed on the
-current stack before the directive is invoked via the call
-instruction. The first argument is assumed to be closest to the
-return address on the stack. This means that the first argument
-of the C calling sequence is pushed last. The following
-pseudo-code illustrates the typical sequence used to call a
-RTEMS directive with three (3) arguments:
-
-@example
-push third argument
-push second argument
-push first argument
-invoke directive
-remove arguments from the stack
-@end example
-
-The arguments to RTEMS are typically pushed onto the
-stack using a push instruction. These arguments must be removed
-from the stack after control is returned to the caller. This
-removal is typically accomplished by adding the size of the
-argument list in bytes to the stack pointer.
-
-@section User-Provided Routines
-
-All user-provided routines invoked by RTEMS, such as
-user extensions, device drivers, and MPCI routines, must also
-adhere to these calling conventions.
-
diff --git a/doc/supplements/i386/cpumodel.t b/doc/supplements/i386/cpumodel.t
deleted file mode 100644
index b84324e7d0..0000000000
--- a/doc/supplements/i386/cpumodel.t
+++ /dev/null
@@ -1,72 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter CPU Model Dependent Features
-
-@section Introduction
-
-Microprocessors are generally classified into
-families with a variety of CPU models or implementations within
-that family. Within a processor family, there is a high level
-of binary compatibility. This family may be based on either an
-architectural specification or on maintaining compatibility with
-a popular processor. Recent microprocessor families such as the
-SPARC or PA-RISC are based on an architectural specification
-which is independent or any particular CPU model or
-implementation. Older families such as the M68xxx and the iX86
-evolved as the manufacturer strived to produce higher
-performance processor models which maintained binary
-compatibility with older models.
-
-RTEMS takes advantage of the similarity of the
-various models within a CPU family. Although the models do vary
-in significant ways, the high level of compatibility makes it
-possible to share the bulk of the CPU dependent executive code
-across the entire family. Each processor family supported by
-RTEMS has a list of features which vary between CPU models
-within a family. For example, the most common model dependent
-feature regardless of CPU family is the presence or absence of a
-floating point unit or coprocessor. When defining the list of
-features present on a particular CPU model, one simply notes
-that floating point hardware is or is not present and defines a
-single constant appropriately. Conditional compilation is
-utilized to include the appropriate source code for this CPU
-model's feature set. It is important to note that this means
-that RTEMS is thus compiled using the appropriate feature set
-and compilation flags optimal for this CPU model used. The
-alternative would be to generate a binary which would execute on
-all family members using only the features which were always
-present.
-
-This chapter presents the set of features which vary
-across i386 implementations and are of importance to RTEMS.
-The set of CPU model feature macros are defined in the file
-c/src/exec/score/cpu/i386/i386.h based upon the particular CPU
-model defined on the compilation command line.
-
-@section CPU Model Name
-
-The macro CPU_MODEL_NAME is a string which designates
-the name of this CPU model. For example, for the Intel i386 without an
-i387 coprocessor, this macro is set to the string "i386 with i387".
-
-@section bswap Instruction
-
-The macro I386_HAS_BSWAP is set to 1 to indicate that
-this CPU model has the @code{bswap} instruction which
-endian swaps a thirty-two bit quantity. This instruction
-appears to be present in all CPU models
-i486's and above.
-
-@section Floating Point Unit
-
-The macro I386_HAS_FPU is set to 1 to indicate that
-this CPU model has a hardware floating point unit and 0
-otherwise. The hardware floating point may be on-chip (as in the
-case of an i486DX or Pentium) or as a coprocessor (as in the case of
-an i386/i387 combination).
diff --git a/doc/supplements/i386/cputable.t b/doc/supplements/i386/cputable.t
deleted file mode 100644
index 034553e8be..0000000000
--- a/doc/supplements/i386/cputable.t
+++ /dev/null
@@ -1,119 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Processor Dependent Information Table
-
-@section Introduction
-
-Any highly processor dependent information required
-to describe a processor to RTEMS is provided in the CPU
-Dependent Information Table. This table is not required for all
-processors supported by RTEMS. This chapter describes the
-contents, if any, for a particular processor type.
-
-@section CPU Dependent Information Table
-
-The i386 version of the RTEMS CPU Dependent
-Information Table contains the information required to interface
-a Board Support Package and RTEMS on the i386. This information
-is provided to allow RTEMS to interoperate effectively with the
-BSP. The C structure definition is given here:
-
-@example
-@group
-typedef struct @{
- void (*pretasking_hook)( void );
- void (*predriver_hook)( void );
- void (*idle_task)( void );
- boolean do_zero_of_workspace;
- unsigned32 idle_task_stack_size;
- unsigned32 interrupt_stack_size;
- unsigned32 extra_mpci_receive_server_stack;
- void * (*stack_allocate_hook)( unsigned32 );
- void (*stack_free_hook)( void* );
- /* end of fields required on all CPUs */
-
- unsigned32 interrupt_segment;
- void *interrupt_vector_table;
-@} rtems_cpu_table;
-@end group
-@end example
-
-@table @code
-@item pretasking_hook
-is the address of the user provided routine which is invoked
-once RTEMS APIs are initialized. This routine will be invoked
-before any system tasks are created. Interrupts are disabled.
-This field may be NULL to indicate that the hook is not utilized.
-
-@item predriver_hook
-is the address of the user provided
-routine that is invoked immediately before the
-the device drivers and MPCI are initialized. RTEMS
-initialization is complete but interrupts and tasking are disabled.
-This field may be NULL to indicate that the hook is not utilized.
-
-@item postdriver_hook
-is the address of the user provided
-routine that is invoked immediately after the
-the device drivers and MPCI are initialized. RTEMS
-initialization is complete but interrupts and tasking are disabled.
-This field may be NULL to indicate that the hook is not utilized.
-
-@item idle_task
-is the address of the optional user
-provided routine which is used as the system's IDLE task. If
-this field is not NULL, then the RTEMS default IDLE task is not
-used. This field may be NULL to indicate that the default IDLE
-is to be used.
-
-@item do_zero_of_workspace
-indicates whether RTEMS should
-zero the Workspace as part of its initialization. If set to
-TRUE, the Workspace is zeroed. Otherwise, it is not.
-
-@item idle_task_stack_size
-is the size of the RTEMS idle task stack in bytes.
-If this number is less than MINIMUM_STACK_SIZE, then the
-idle task's stack will be MINIMUM_STACK_SIZE in byte.
-
-@item interrupt_stack_size
-is the size of the RTEMS
-allocated interrupt stack in bytes. This value must be at least
-as large as MINIMUM_STACK_SIZE.
-
-@item extra_mpci_receive_server_stack
-is the extra stack space allocated for the RTEMS MPCI receive server task
-in bytes. The MPCI receive server may invoke nearly all directives and
-may require extra stack space on some targets.
-
-@item stack_allocate_hook
-is the address of the optional user provided routine which allocates
-memory for task stacks. If this hook is not NULL, then a stack_free_hook
-must be provided as well.
-
-@item stack_free_hook
-is the address of the optional user provided routine which frees
-memory for task stacks. If this hook is not NULL, then a stack_allocate_hook
-must be provided as well.
-
-@item interrupt_segment
-is the value of the selector which should be placed in a segment
-register to access the Interrupt Descriptor Table.
-
-@item interrupt_vector_table
-is the base address of the Interrupt Descriptor Table relative to the
-interrupt_segment.
-
-@end table
-
-The contents of the i386 Interrupt Descriptor Table
-are discussed in Intel's i386 User's Manual. Structure
-definitions for the i386 IDT is provided by including the file
-rtems.h.
-
diff --git a/doc/supplements/i386/fatalerr.t b/doc/supplements/i386/fatalerr.t
deleted file mode 100644
index 977c3c1232..0000000000
--- a/doc/supplements/i386/fatalerr.t
+++ /dev/null
@@ -1,31 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Default Fatal Error Processing
-
-@section Introduction
-
-Upon detection of a fatal error by either the
-application or RTEMS the fatal error manager is invoked. The
-fatal error manager will invoke the user-supplied fatal error
-handlers. If no user-supplied handlers are configured, the
-RTEMS provided default fatal error handler is invoked. If the
-user-supplied fatal error handlers return to the executive the
-default fatal error handler is then invoked. This chapter
-describes the precise operations of the default fatal error
-handler.
-
-@section Default Fatal Error Handler Operations
-
-The default fatal error handler which is invoked by
-the fatal_error_occurred directive when there is no user handler
-configured or the user handler returns control to RTEMS. The
-default fatal error handler disables processor interrupts,
-places the error code in EAX, and executes a HLT instruction to
-halt the processor.
-
diff --git a/doc/supplements/i386/i386.texi b/doc/supplements/i386/i386.texi
deleted file mode 100644
index 7f07ed014f..0000000000
--- a/doc/supplements/i386/i386.texi
+++ /dev/null
@@ -1,120 +0,0 @@
-\input texinfo @c -*-texinfo-*-
-@c %**start of header
-@setfilename c_i386
-@syncodeindex vr fn
-@synindex ky cp
-@paragraphindent 0
-@c @smallbook
-@c %**end of header
-
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@c
-@c Master file for the Intel i386 Applications Supplement
-@c
-
-@include ../../common/setup.texi
-
-@ignore
-@ifinfo
-@format
-START-INFO-DIR-ENTRY
-* RTEMS Intel i386 Applications Supplement (i386):
-END-INFO-DIR-ENTRY
-@end format
-@end ifinfo
-@end ignore
-
-@c
-@c Title Page Stuff
-@c
-
-@set edition @value{RTEMS-EDITION}
-@set version @value{RTEMS-VERSION}
-@set update-date @value{RTEMS-UPDATE-DATE}
-@set update-month @value{RTEMS-UPDATE-MONTH}
-
-@c
-@c I don't really like having a short title page. --joel
-@c
-@c @shorttitlepage RTEMS Intel i386 Applications Supplement
-
-@setchapternewpage odd
-@settitle RTEMS Intel i386 Applications Supplement
-@titlepage
-@finalout
-
-@title RTEMS Intel i386 Applications Supplement
-@subtitle Edition @value{edition}, for RTEMS @value{version}
-@sp 1
-@subtitle @value{update-month}
-@author On-Line Applications Research Corporation
-@page
-@include ../../common/cpright.texi
-@end titlepage
-
-@c This prevents a black box from being printed on "overflow" lines.
-@c The alternative is to rework a sentence to avoid this problem.
-
-@include preface.texi
-@include cpumodel.texi
-@include callconv.texi
-@include memmodel.texi
-@include intr.texi
-@include fatalerr.texi
-@include bsp.texi
-@include cputable.texi
-@include wksheets.texi
-@include timing.texi
-@include timeFORCE386.texi
-@ifinfo
-@node Top, Preface, (dir), (dir)
-@top c_i386
-
-This is the online version of the RTEMS Intel i386
-Applications Supplement.
-
-@menu
-* Preface::
-* CPU Model Dependent Features::
-* Calling Conventions::
-* Memory Model::
-* Interrupt Processing::
-* Default Fatal Error Processing::
-* Board Support Packages::
-* Processor Dependent Information Table::
-* Memory Requirements::
-* Timing Specification::
-* CPU386 Timing Data::
-* Command and Variable Index::
-* Concept Index::
-@end menu
-
-@end ifinfo
-@c
-@c
-@c Need to copy the emacs stuff and "trailer stuff" (index, toc) into here
-@c
-
-@node Command and Variable Index, Concept Index, CPU386 Timing Data Rate Monotonic Manager, Top
-@unnumbered Command and Variable Index
-
-There are currently no Command and Variable Index entries.
-
-@c @printindex fn
-
-@node Concept Index, , Command and Variable Index, Top
-@unnumbered Concept Index
-
-There are currently no Concept Index entries.
-@c @printindex cp
-
-@contents
-@bye
-
diff --git a/doc/supplements/i386/intr_NOTIMES.t b/doc/supplements/i386/intr_NOTIMES.t
deleted file mode 100644
index f29a0fd63f..0000000000
--- a/doc/supplements/i386/intr_NOTIMES.t
+++ /dev/null
@@ -1,168 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Interrupt Processing
-
-@section Introduction
-
-Different types of processors respond to the
-occurrence of an interrupt in their own unique fashion. In
-addition, each processor type provides a control mechanism to
-allow the proper handling of an interrupt. The processor
-dependent response to the interrupt modifies the execution state
-and results in the modification of the execution stream. This
-modification usually requires that an interrupt handler utilize
-the provided control mechanisms to return to the normal
-processing stream. Although RTEMS hides many of the processor
-dependent details of interrupt processing, it is important to
-understand how the RTEMS interrupt manager is mapped onto the
-processor's unique architecture. Discussed in this chapter are
-the the processor's response and control mechanisms as they
-pertain to RTEMS.
-
-@section Vectoring of Interrupt Handler
-
-Although the i386 supports multiple privilege levels,
-RTEMS and all user software executes at privilege level 0. This
-decision was made by the RTEMS designers to enhance
-compatibility with processors which do not provide sophisticated
-protection facilities like those of the i386. This decision
-greatly simplifies the discussion of i386 processing, as one
-need only consider interrupts without privilege transitions.
-
-Upon receipt of an interrupt the i386 automatically
-performs the following actions:
-
-@itemize @bullet
-@item pushes the EFLAGS register
-
-@item pushes the far address of the interrupted instruction
-
-@item vectors to the interrupt service routine (ISR).
-@end itemize
-
-A nested interrupt is processed similarly by the
-i386.
-
-@section Interrupt Stack Frame
-
-The structure of the Interrupt Stack Frame for the
-i386 which is placed on the interrupt stack by the processor in
-response to an interrupt is as follows:
-
-@ifset use-ascii
-@example
-@group
- +----------------------+
- | Old EFLAGS Register | ESP+8
- +----------+-----------+
- | UNUSED | Old CS | ESP+4
- +----------+-----------+
- | Old EIP | ESP
- +----------------------+
-@end group
-@end example
-@end ifset
-
-@ifset use-tex
-@sp 1
-@tex
-\centerline{\vbox{\offinterlineskip\halign{
-\strut\vrule#&
-\hbox to 1.00in{\enskip\hfil#\hfil}&
-\vrule#&
-\hbox to 1.00in{\enskip\hfil#\hfil}&
-\vrule#&
-\hbox to 0.75in{\enskip\hfil#\hfil}
-\cr
-\multispan{4}\hrulefill\cr
-& \multispan{3} Old EFLAGS Register\quad&&ESP+8\cr
-\multispan{4}\hrulefill\cr
-&UNUSED &&Old CS &&ESP+4\cr
-\multispan{4}\hrulefill\cr
-& \multispan{3} Old EIP && ESP\cr
-\multispan{4}\hrulefill\cr
-}}\hfil}
-@end tex
-@end ifset
-
-@ifset use-html
-@html
-<CENTER>
- <TABLE COLS=3 WIDTH="40%" BORDER=2>
-<TR><TD ALIGN=center COLSPAN=2><STRONG>Old EFLAGS Register</STRONG></TD>
- <TD ALIGN=center>0x0</TD></TR>
-<TR><TD ALIGN=center><STRONG>UNUSED</STRONG></TD>
- <TD ALIGN=center><STRONG>Old CS</STRONG></TD>
- <TD ALIGN=center>0x2</TD></TR>
-<TR><TD ALIGN=center COLSPAN=2><STRONG>Old EIP</STRONG></TD>
- <TD ALIGN=center>0x4</TD></TR>
- </TABLE>
-</CENTER>
-@end html
-@end ifset
-
-@section Interrupt Levels
-
-Although RTEMS supports 256 interrupt levels, the
-i386 only supports two -- enabled and disabled. Interrupts are
-enabled when the interrupt-enable flag (IF) in the extended
-flags (EFLAGS) is set. Conversely, interrupt processing is
-inhibited when the IF is cleared. During a non-maskable
-interrupt, all other interrupts, including other non-maskable
-ones, are inhibited.
-
-RTEMS interrupt levels 0 and 1 such that level zero
-(0) indicates that interrupts are fully enabled and level one
-that interrupts are disabled. All other RTEMS interrupt levels
-are undefined and their behavior is unpredictable.
-
-@section Disabling of Interrupts by RTEMS
-
-During the execution of directive calls, critical
-sections of code may be executed. When these sections are
-encountered, RTEMS disables interrupts before the execution of
-this section and restores them to the previous level upon
-completion of the section. RTEMS has been optimized to insure
-that interrupts are disabled for less than RTEMS_MAXIMUM_DISABLE_PERIOD
-microseconds on a RTEMS_MAXIMUM_DISABLE_PERIOD_MHZ Mhz i386 with zero
-wait states. These numbers will vary based the number of wait states
-and processor speed present on the target board. [NOTE: The maximum
-period with interrupts disabled within RTEMS was last calculated for
-Release RTEMS_RELEASE_FOR_MAXIMUM_DISABLE_PERIOD.]
-
-Non-maskable interrupts (NMI) cannot be disabled, and
-ISRs which execute at this level MUST NEVER issue RTEMS system
-calls. If a directive is invoked, unpredictable results may
-occur due to the inability of RTEMS to protect its critical
-sections. However, ISRs that make no system calls may safely
-execute as non-maskable interrupts.
-
-@section Interrupt Stack
-
-The i386 family does not support a dedicated hardware
-interrupt stack. On this processor, RTEMS allocates and manages
-a dedicated interrupt stack. As part of vectoring a non-nested
-interrupt service routine, RTEMS switches from the stack of the
-interrupted task to a dedicated interrupt stack. When a
-non-nested interrupt returns, RTEMS switches back to the stack
-of the interrupted stack. The current stack pointer is not
-altered by RTEMS on nested interrupt.
-
-Without a dedicated interrupt stack, every task in
-the system MUST have enough stack space to accommodate the worst
-case stack usage of that particular task and the interrupt
-service routines COMBINED. By supporting a dedicated interrupt
-stack, RTEMS significantly lowers the stack requirements for
-each task.
-
-RTEMS allocates the dedicated interrupt stack from
-the Workspace Area. The amount of memory allocated for the
-interrupt stack is determined by the interrupt_stack_size field
-in the CPU Configuration Table.
-
diff --git a/doc/supplements/i386/memmodel.t b/doc/supplements/i386/memmodel.t
deleted file mode 100644
index 301dc0c7f6..0000000000
--- a/doc/supplements/i386/memmodel.t
+++ /dev/null
@@ -1,72 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Memory Model
-
-@section Introduction
-
-A processor may support any combination of memory
-models ranging from pure physical addressing to complex demand
-paged virtual memory systems. RTEMS supports a flat memory
-model which ranges contiguously over the processor's allowable
-address space. RTEMS does not support segmentation or virtual
-memory of any kind. The appropriate memory model for RTEMS
-provided by the targeted processor and related characteristics
-of that model are described in this chapter.
-
-@section Flat Memory Model
-
-RTEMS supports the i386 protected mode, flat memory
-model with paging disabled. In this mode, the i386
-automatically converts every address from a logical to a
-physical address each time it is used. The i386 uses
-information provided in the segment registers and the Global
-Descriptor Table to convert these addresses. RTEMS assumes the
-existence of the following segments:
-
-@itemize @bullet
-@item a single code segment at protection level (0) which
-contains all application and executive code.
-
-@item a single data segment at protection level zero (0) which
-contains all application and executive data.
-@end itemize
-
-The i386 segment registers and associated selectors
-must be initialized when the initialize_executive directive is
-invoked. RTEMS treats the segment registers as system registers
-and does not modify or context switch them.
-
-This i386 memory model supports a flat 32-bit address
-space with addresses ranging from 0x00000000 to 0xFFFFFFFF (4
-gigabytes). Each address is represented by a 32-bit value and
-is byte addressable. The address may be used to reference a
-single byte, half-word (2-bytes), or word (4 bytes).
-
-RTEMS does not require that logical addresses map
-directly to physical addresses, although it is desirable in many
-applications to do so. If logical and physical addresses are
-not the same, then an additional selector will be required so
-RTEMS can access the Interrupt Descriptor Table to install
-interrupt service routines. The selector number of this segment
-is provided to RTEMS in the CPU Dependent Information Table.
-
-By not requiring that logical addresses map directly
-to physical addresses, the memory space of an RTEMS application
-can be separated from that of a ROM monitor. For example, on
-the Force Computers CPU386, the ROM monitor loads application
-programs into a logical address space where logical address
-0x00000000 corresponds to physical address 0x0002000. On this
-board, RTEMS and the application use virtual addresses which do
-not map to physical addresses.
-
-RTEMS assumes that the DS and ES registers contain
-the selector for the single data segment when a directive is
-invoked. This assumption is especially important when
-developing interrupt service routines.
-
diff --git a/doc/supplements/i386/preface.texi b/doc/supplements/i386/preface.texi
deleted file mode 100644
index e0b76b17fb..0000000000
--- a/doc/supplements/i386/preface.texi
+++ /dev/null
@@ -1,41 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@ifinfo
-@node Preface, CPU Model Dependent Features, Top, Top
-@end ifinfo
-@unnumbered Preface
-
-The Real Time Executive for Multiprocessor Systems
-(RTEMS) is designed to be portable across multiple processor
-architectures. However, the nature of real-time systems makes
-it essential that the application designer understand certain
-processor dependent implementation details. These processor
-dependencies include calling convention, board support package
-issues, interrupt processing, exact RTEMS memory requirements,
-performance data, header files, and the assembly language
-interface to the executive.
-
-For information on the i386 processor, refer to the
-following documents:
-
-@itemize @bullet
-@item @cite{386 Programmer's Reference Manual, Intel, Order No. 230985-002}.
-
-@item @cite{386 Microprocessor Hardware Reference Manual, Intel,
-Order No. 231732-003}.
-
-@item @cite{80386 System Software Writer's Guide, Intel, Order No. 231499-001}.
-
-@item @cite{80387 Programmer's Reference Manual, Intel, Order No. 231917-001}.
-@end itemize
-
-It is highly recommended that the i386 RTEMS
-application developer obtain and become familiar with Intel's
-386 Programmer's Reference Manual.
-
diff --git a/doc/supplements/i386/timeFORCE386.t b/doc/supplements/i386/timeFORCE386.t
deleted file mode 100644
index 00c79222b1..0000000000
--- a/doc/supplements/i386/timeFORCE386.t
+++ /dev/null
@@ -1,101 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@include ../../common/timemac.texi
-@tex
-\global\advance \smallskipamount by -4pt
-@end tex
-
-@chapter CPU386 Timing Data
-
-@section Introduction
-
-The timing data for the i386 version of RTEMS is
-provided along with the target dependent aspects concerning the
-gathering of the timing data. The hardware platform used to
-gather the times is described to give the reader a better
-understanding of each directive time provided. Also, provided
-is a description of the interrupt latency and the context
-switch times as they pertain to the i386 version of RTEMS.
-
-@section Hardware Platform
-
-All times reported except for the maximum period
-interrupts are disabled by RTEMS were measured using a Force
-Computers CPU386 board. The CPU386 is a 16 Mhz board with zero
-wait state dynamic memory and an i80387 numeric coprocessor.
-One of the count-down timers provided by a Motorola MC68901 was
-used to measure elapsed time with one microsecond resolution.
-All sources of hardware interrupts are disabled, although the
-interrupt level of the i386 allows all interrupts.
-
-The maximum period interrupts are disabled was
-measured by summing the number of CPU cycles required by each
-assembly language instruction executed while interrupts were
-disabled. Zero wait state memory was assumed. The total CPU
-cycles executed with interrupts disabled, including the
-instructions to disable and enable interrupts, was divided by 16
-to simulate a i386 executing at 16 Mhz.
-
-@section Interrupt Latency
-
-The maximum period with interrupts disabled within
-RTEMS is less than RTEMS_MAXIMUM_DISABLE_PERIOD microseconds
-including the instructions
-which disable and re-enable interrupts. The time required for
-the i386 to generate an interrupt using the int instruction,
-vectoring to an interrupt handler, and for the RTEMS entry
-overhead before invoking the user's interrupt handler are a
-total of 12 microseconds. These combine to yield a worst case
-interrupt latency of less
-RTEMS_MAXIMUM_DISABLE_PERIOD + RTEMS_INTR_ENTRY_RETURNS_TO_PREEMPTING_TASK
-microseconds. [NOTE: The
-maximum period with interrupts disabled within RTEMS was last
-calculated for Release RTEMS_RELEASE_FOR_MAXIMUM_DISABLE_PERIOD.]
-
-It should be noted again that the maximum period with
-interrupts disabled within RTEMS is hand-timed. The interrupt
-vector and entry overhead time was generated on the Force
-Computers CPU386 benchmark platform using the int instruction as
-the interrupt source.
-
-@section Context Switch
-
-The RTEMS processor context switch time is RTEMS_NO_FP_CONTEXTS
-microseconds on the Force Computers CPU386 benchmark platform.
-This time represents the raw context switch time with no user
-extensions configured. Additional execution time is required
-when a TASK_SWITCH user extension is configured. The use of the
-TASK_SWITCH extension is application dependent. Thus, its
-execution time is not considered part of the base context switch
-time.
-
-Since RTEMS was designed specifically for embedded
-missile applications which are floating point intensive, the
-executive is optimized to avoid unnecessarily saving and
-restoring the state of the numeric coprocessor. The state of
-the numeric coprocessor is only saved when a FLOATING_POINT task
-is dispatched and that task was not the last task to utilize the
-coprocessor. In a system with only one FLOATING_POINT task, the
-state of the numeric coprocessor will never be saved or
-restored. When the first FLOATING_POINT task is dispatched,
-RTEMS does not need to save the current state of the numeric
-coprocessor.
-
-The exact amount of time required to save and restore
-floating point context is dependent on the state of the numeric
-coprocessor. RTEMS places the coprocessor in the initialized
-state when a task is started or restarted. Once the task has
-utilized the coprocessor, it is in the idle state when floating
-point instructions are not executing and the busy state when
-floating point instructions are executing. The state of the
-coprocessor is task specific.
-
-The following table summarizes the context switch
-times for the Force Computers CPU386 benchmark platform:
-
diff --git a/doc/supplements/i960/CVME961_TIMES b/doc/supplements/i960/CVME961_TIMES
deleted file mode 100644
index 17e022c0f5..0000000000
--- a/doc/supplements/i960/CVME961_TIMES
+++ /dev/null
@@ -1,247 +0,0 @@
-#
-# Intel i960/Cyclone CVME961 (i960CA) Timing and Size Information
-#
-# $Id$
-#
-
-#
-# CPU Model Information
-#
-RTEMS_BSP CVME961
-RTEMS_CPU_MODEL i960CA
-#
-# Interrupt Latency
-#
-# NOTE: In general, the text says it is hand-calculated to be
-# RTEMS_MAXIMUM_DISABLE_PERIOD at RTEMS_MAXIMUM_DISABLE_PERIOD_MHZ
-# Mhz and this was last calculated for Release
-# RTEMS_VERSION_FOR_MAXIMUM_DISABLE_PERIOD.
-#
-RTEMS_MAXIMUM_DISABLE_PERIOD 2.5
-RTEMS_MAXIMUM_DISABLE_PERIOD_MHZ 33
-RTEMS_RELEASE_FOR_MAXIMUM_DISABLE_PERIOD 3.2.1
-#
-# Context Switch Times
-#
-RTEMS_NO_FP_CONTEXTS 1
-RTEMS_RESTORE_1ST_FP_TASK 2
-RTEMS_SAVE_INIT_RESTORE_INIT 3
-RTEMS_SAVE_IDLE_RESTORE_INIT 4
-RTEMS_SAVE_IDLE_RESTORE_IDLE 5
-#
-# Task Manager Times
-#
-RTEMS_TASK_CREATE_ONLY 6
-RTEMS_TASK_IDENT_ONLY 7
-RTEMS_TASK_START_ONLY 8
-RTEMS_TASK_RESTART_CALLING_TASK 9
-RTEMS_TASK_RESTART_SUSPENDED_RETURNS_TO_CALLER 9
-RTEMS_TASK_RESTART_BLOCKED_RETURNS_TO_CALLER 10
-RTEMS_TASK_RESTART_READY_RETURNS_TO_CALLER 11
-RTEMS_TASK_RESTART_SUSPENDED_PREEMPTS_CALLER 12
-RTEMS_TASK_RESTART_BLOCKED_PREEMPTS_CALLER 13
-RTEMS_TASK_RESTART_READY_PREEMPTS_CALLER 14
-RTEMS_TASK_DELETE_CALLING_TASK 15
-RTEMS_TASK_DELETE_SUSPENDED_TASK 16
-RTEMS_TASK_DELETE_BLOCKED_TASK 17
-RTEMS_TASK_DELETE_READY_TASK 18
-RTEMS_TASK_SUSPEND_CALLING_TASK 19
-RTEMS_TASK_SUSPEND_RETURNS_TO_CALLER 20
-RTEMS_TASK_RESUME_TASK_READIED_RETURNS_TO_CALLER 21
-RTEMS_TASK_RESUME_TASK_READIED_PREEMPTS_CALLER 22
-RTEMS_TASK_SET_PRIORITY_OBTAIN_CURRENT_PRIORITY 23
-RTEMS_TASK_SET_PRIORITY_RETURNS_TO_CALLER 24
-RTEMS_TASK_SET_PRIORITY_PREEMPTS_CALLER 25
-RTEMS_TASK_MODE_OBTAIN_CURRENT_MODE 26
-RTEMS_TASK_MODE_NO_RESCHEDULE 27
-RTEMS_TASK_MODE_RESCHEDULE_RETURNS_TO_CALLER 28
-RTEMS_TASK_MODE_RESCHEDULE_PREEMPTS_CALLER 29
-RTEMS_TASK_GET_NOTE_ONLY 30
-RTEMS_TASK_SET_NOTE_ONLY 31
-RTEMS_TASK_WAKE_AFTER_YIELD_RETURNS_TO_CALLER 32
-RTEMS_TASK_WAKE_AFTER_YIELD_PREEMPTS_CALLER 33
-RTEMS_TASK_WAKE_WHEN_ONLY 34
-#
-# Interrupt Manager
-#
-RTEMS_INTR_ENTRY_RETURNS_TO_NESTED 35
-RTEMS_INTR_ENTRY_RETURNS_TO_INTERRUPTED_TASK 36
-RTEMS_INTR_ENTRY_RETURNS_TO_PREEMPTING_TASK 37
-RTEMS_INTR_EXIT_RETURNS_TO_NESTED 38
-RTEMS_INTR_EXIT_RETURNS_TO_INTERRUPTED_TASK 39
-RTEMS_INTR_EXIT_RETURNS_TO_PREEMPTING_TASK 40
-#
-# Clock Manager
-#
-RTEMS_CLOCK_SET_ONLY 41
-RTEMS_CLOCK_GET_ONLY 42
-RTEMS_CLOCK_TICK_ONLY 43
-#
-# Timer Manager
-#
-RTEMS_TIMER_CREATE_ONLY 44
-RTEMS_TIMER_IDENT_ONLY 45
-RTEMS_TIMER_DELETE_INACTIVE 46
-RTEMS_TIMER_DELETE_ACTIVE 47
-RTEMS_TIMER_FIRE_AFTER_INACTIVE 48
-RTEMS_TIMER_FIRE_AFTER_ACTIVE 49
-RTEMS_TIMER_FIRE_WHEN_INACTIVE 50
-RTEMS_TIMER_FIRE_WHEN_ACTIVE 51
-RTEMS_TIMER_RESET_INACTIVE 52
-RTEMS_TIMER_RESET_ACTIVE 53
-RTEMS_TIMER_CANCEL_INACTIVE 54
-RTEMS_TIMER_CANCEL_ACTIVE 55
-#
-# Semaphore Manager
-#
-RTEMS_SEMAPHORE_CREATE_ONLY 56
-RTEMS_SEMAPHORE_IDENT_ONLY 57
-RTEMS_SEMAPHORE_DELETE_ONLY 58
-RTEMS_SEMAPHORE_OBTAIN_AVAILABLE 59
-RTEMS_SEMAPHORE_OBTAIN_NOT_AVAILABLE_NO_WAIT 60
-RTEMS_SEMAPHORE_OBTAIN_NOT_AVAILABLE_CALLER_BLOCKS 61
-RTEMS_SEMAPHORE_RELEASE_NO_WAITING_TASKS 62
-RTEMS_SEMAPHORE_RELEASE_TASK_READIED_RETURNS_TO_CALLER 63
-RTEMS_SEMAPHORE_RELEASE_TASK_READIED_PREEMPTS_CALLER 64
-#
-# Message Manager
-#
-RTEMS_MESSAGE_QUEUE_CREATE_ONLY 65
-RTEMS_MESSAGE_QUEUE_IDENT_ONLY 66
-RTEMS_MESSAGE_QUEUE_DELETE_ONLY 67
-RTEMS_MESSAGE_QUEUE_SEND_NO_WAITING_TASKS 68
-RTEMS_MESSAGE_QUEUE_SEND_TASK_READIED_RETURNS_TO_CALLER 69
-RTEMS_MESSAGE_QUEUE_SEND_TASK_READIED_PREEMPTS_CALLER 70
-RTEMS_MESSAGE_QUEUE_URGENT_NO_WAITING_TASKS 71
-RTEMS_MESSAGE_QUEUE_URGENT_TASK_READIED_RETURNS_TO_CALLER 72
-RTEMS_MESSAGE_QUEUE_URGENT_TASK_READIED_PREEMPTS_CALLER 73
-RTEMS_MESSAGE_QUEUE_BROADCAST_NO_WAITING_TASKS 74
-RTEMS_MESSAGE_QUEUE_BROADCAST_TASK_READIED_RETURNS_TO_CALLER 75
-RTEMS_MESSAGE_QUEUE_BROADCAST_TASK_READIED_PREEMPTS_CALLER 76
-RTEMS_MESSAGE_QUEUE_RECEIVE_AVAILABLE 77
-RTEMS_MESSAGE_QUEUE_RECEIVE_NOT_AVAILABLE_NO_WAIT 78
-RTEMS_MESSAGE_QUEUE_RECEIVE_NOT_AVAILABLE_CALLER_BLOCKS 79
-RTEMS_MESSAGE_QUEUE_FLUSH_NO_MESSAGES_FLUSHED 80
-RTEMS_MESSAGE_QUEUE_FLUSH_MESSAGES_FLUSHED 81
-#
-# Event Manager
-#
-RTEMS_EVENT_SEND_NO_TASK_READIED 82
-RTEMS_EVENT_SEND_TASK_READIED_RETURNS_TO_CALLER 83
-RTEMS_EVENT_SEND_TASK_READIED_PREEMPTS_CALLER 84
-RTEMS_EVENT_RECEIVE_OBTAIN_CURRENT_EVENTS 85
-RTEMS_EVENT_RECEIVE_AVAILABLE 86
-RTEMS_EVENT_RECEIVE_NOT_AVAILABLE_NO_WAIT 87
-RTEMS_EVENT_RECEIVE_NOT_AVAILABLE_CALLER_BLOCKS 88
-#
-# Signal Manager
-#
-RTEMS_SIGNAL_CATCH_ONLY 89
-RTEMS_SIGNAL_SEND_RETURNS_TO_CALLER 90
-RTEMS_SIGNAL_SEND_SIGNAL_TO_SELF 91
-RTEMS_SIGNAL_EXIT_ASR_OVERHEAD_RETURNS_TO_CALLING_TASK 92
-RTEMS_SIGNAL_EXIT_ASR_OVERHEAD_RETURNS_TO_PREEMPTING_TASK 93
-#
-# Partition Manager
-#
-RTEMS_PARTITION_CREATE_ONLY 94
-RTEMS_PARTITION_IDENT_ONLY 95
-RTEMS_PARTITION_DELETE_ONLY 96
-RTEMS_PARTITION_GET_BUFFER_AVAILABLE 97
-RTEMS_PARTITION_GET_BUFFER_NOT_AVAILABLE 98
-RTEMS_PARTITION_RETURN_BUFFER_ONLY 99
-#
-# Region Manager
-#
-RTEMS_REGION_CREATE_ONLY 100
-RTEMS_REGION_IDENT_ONLY 101
-RTEMS_REGION_DELETE_ONLY 102
-RTEMS_REGION_GET_SEGMENT_AVAILABLE 103
-RTEMS_REGION_GET_SEGMENT_NOT_AVAILABLE_NO_WAIT 104
-RTEMS_REGION_GET_SEGMENT_NOT_AVAILABLE_CALLER_BLOCKS 105
-RTEMS_REGION_RETURN_SEGMENT_NO_WAITING_TASKS 106
-RTEMS_REGION_RETURN_SEGMENT_TASK_READIED_RETURNS_TO_CALLER 107
-RTEMS_REGION_RETURN_SEGMENT_TASK_READIED_PREEMPTS_CALLER 108
-#
-# Dual-Ported Memory Manager
-#
-RTEMS_PORT_CREATE_ONLY 109
-RTEMS_PORT_IDENT_ONLY 110
-RTEMS_PORT_DELETE_ONLY 111
-RTEMS_PORT_INTERNAL_TO_EXTERNAL_ONLY 112
-RTEMS_PORT_EXTERNAL_TO_INTERNAL_ONLY 113
-#
-# IO Manager
-#
-RTEMS_IO_INITIALIZE_ONLY 114
-RTEMS_IO_OPEN_ONLY 115
-RTEMS_IO_CLOSE_ONLY 116
-RTEMS_IO_READ_ONLY 117
-RTEMS_IO_WRITE_ONLY 118
-RTEMS_IO_CONTROL_ONLY 119
-#
-# Rate Monotonic Manager
-#
-RTEMS_RATE_MONOTONIC_CREATE_ONLY 120
-RTEMS_RATE_MONOTONIC_IDENT_ONLY 121
-RTEMS_RATE_MONOTONIC_CANCEL_ONLY 122
-RTEMS_RATE_MONOTONIC_DELETE_ACTIVE 123
-RTEMS_RATE_MONOTONIC_DELETE_INACTIVE 124
-RTEMS_RATE_MONOTONIC_PERIOD_INITIATE_PERIOD_RETURNS_TO_CALLER 125
-RTEMS_RATE_MONOTONIC_PERIOD_CONCLUDE_PERIOD_CALLER_BLOCKS 126
-RTEMS_RATE_MONOTONIC_PERIOD_OBTAIN_STATUS 127
-#
-# Size Information
-#
-#
-# xxx alloted for numbers
-#
-RTEMS_DATA_SPACE 128
-RTEMS_MINIMUM_CONFIGURATION xx,129
-RTEMS_MAXIMUM_CONFIGURATION xx,130
-# x,xxx alloted for numbers
-RTEMS_CORE_CODE_SIZE x,131
-RTEMS_INITIALIZATION_CODE_SIZE x,132
-RTEMS_TASK_CODE_SIZE x,133
-RTEMS_INTERRUPT_CODE_SIZE x,134
-RTEMS_CLOCK_CODE_SIZE x,135
-RTEMS_TIMER_CODE_SIZE x,136
-RTEMS_SEMAPHORE_CODE_SIZE x,137
-RTEMS_MESSAGE_CODE_SIZE x,138
-RTEMS_EVENT_CODE_SIZE x,139
-RTEMS_SIGNAL_CODE_SIZE x,140
-RTEMS_PARTITION_CODE_SIZE x,141
-RTEMS_REGION_CODE_SIZE x,142
-RTEMS_DPMEM_CODE_SIZE x,143
-RTEMS_IO_CODE_SIZE x,144
-RTEMS_FATAL_ERROR_CODE_SIZE x,145
-RTEMS_RATE_MONOTONIC_CODE_SIZE x,146
-RTEMS_MULTIPROCESSING_CODE_SIZE x,147
-# xxx alloted for numbers
-RTEMS_TIMER_CODE_OPTSIZE 148
-RTEMS_SEMAPHORE_CODE_OPTSIZE 149
-RTEMS_MESSAGE_CODE_OPTSIZE 150
-RTEMS_EVENT_CODE_OPTSIZE 151
-RTEMS_SIGNAL_CODE_OPTSIZE 152
-RTEMS_PARTITION_CODE_OPTSIZE 153
-RTEMS_REGION_CODE_OPTSIZE 154
-RTEMS_DPMEM_CODE_OPTSIZE 155
-RTEMS_IO_CODE_OPTSIZE 156
-RTEMS_RATE_MONOTONIC_CODE_OPTSIZE 157
-RTEMS_MULTIPROCESSING_CODE_OPTSIZE 158
-# xxx alloted for numbers
-RTEMS_BYTES_PER_TASK 159
-RTEMS_BYTES_PER_TIMER 160
-RTEMS_BYTES_PER_SEMAPHORE 161
-RTEMS_BYTES_PER_MESSAGE_QUEUE 162
-RTEMS_BYTES_PER_REGION 163
-RTEMS_BYTES_PER_PARTITION 164
-RTEMS_BYTES_PER_PORT 165
-RTEMS_BYTES_PER_PERIOD 166
-RTEMS_BYTES_PER_EXTENSION 167
-RTEMS_BYTES_PER_FP_TASK 168
-RTEMS_BYTES_PER_NODE 169
-RTEMS_BYTES_PER_GLOBAL_OBJECT 170
-RTEMS_BYTES_PER_PROXY 171
-# x,xxx alloted for numbers
-RTEMS_BYTES_OF_FIXED_SYSTEM_REQUIREMENTS x,172
diff --git a/doc/supplements/i960/Makefile b/doc/supplements/i960/Makefile
deleted file mode 100644
index eac67b94d0..0000000000
--- a/doc/supplements/i960/Makefile
+++ /dev/null
@@ -1,161 +0,0 @@
-#
-# COPYRIGHT (c) 1988-1999.
-# On-Line Applications Research Corporation (OAR).
-# All rights reserved.
-#
-# $Id$
-#
-
-PROJECT=i960
-
-include ../../Make.config
-
-REPLACE=../../tools/word-replace
-
-all: html info ps pdf
-
-dirs:
- $(make-dirs)
-
-COMMON_FILES=../../common/cpright.texi ../../common/setup.texi
-
-GENERATED_FILES=\
- cpumodel.texi callconv.texi memmodel.texi intr.texi fatalerr.texi \
- bsp.texi cputable.texi timing.texi wksheets.texi timeCVME961.texi
-
-FILES= $(PROJECT).texi \
- preface.texi \
- $(GENERATED_FILES)
-
-info: dirs c_i960
- cp c_$(PROJECT) $(INFO_INSTALL)
-
-c_i960: $(FILES)
- $(MAKEINFO) $(PROJECT).texi
-
-dvi: dirs $(PROJECT).dvi
-ps: dirs $(PROJECT).ps
-pdf: dirs $(PROJECT).pdf
-
-$(PROJECT).pdf: $(FILES)
- $(TEXI2PDF) $(PROJECT).texi
- cp $(PROJECT).pdf $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).ps: $(PROJECT).dvi
- dvips -o $(PROJECT).ps $(PROJECT).dvi
- cp $(PROJECT).ps $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).dvi: $(FILES)
- $(TEXI2DVI) $(PROJECT).texi
- cp $(PROJECT).dvi $(WWW_INSTALL)/$(PROJECT)
-
-html: dirs $(FILES)
- -mkdir -p $(WWW_INSTALL)/$(PROJECT)
- $(TEXI2WWW) $(TEXI2WWW_ARGS) -dir $(WWW_INSTALL)/$(PROJECT) \
- $(PROJECT).texi
-
-clean:
- rm -f *.o $(PROG) *.txt core $(PROJECT).pdf
- rm -f *.dvi *.ps *.log *.aux *.cp *.fn *.ky *.pg *.toc *.tp *.vr $(BASE)
- rm -f $(PROJECT) $(PROJECT)-*
- rm -f c_i960 c_i960-*
- rm -f intr.t $(GENERATED_FILES)
- rm -f wksheets.t wksheets_NOTIMES.t
- rm -f *.fixed _* timing.t timing.texi
- rm -f timeCVME961_.t timeCVME961_.texi
-
-#
-# Chapters which get automatic processing
-#
-
-cpumodel.texi: cpumodel.t Makefile
- $(BMENU) -p "Preface" \
- -u "Top" \
- -n "Calling Conventions" ${*}.t
-
-callconv.texi: callconv.t Makefile
- $(BMENU) -p "CPU Model Dependent Features Floating Point Unit" \
- -u "Top" \
- -n "Memory Model" ${*}.t
-
-memmodel.texi: memmodel.t Makefile
- $(BMENU) -p "Calling Conventions Leaf Procedures" \
- -u "Top" \
- -n "Interrupt Processing" ${*}.t
-
-# Interrupt Chapter:
-# 1. Replace Times and Sizes
-# 2. Build Node Structure
-intr.t: intr_NOTIMES.t CVME961_TIMES
- ${REPLACE} -p CVME961_TIMES intr_NOTIMES.t
- mv intr_NOTIMES.t.fixed intr.t
-
-intr.texi: intr.t Makefile
- $(BMENU) -p "Memory Model Flat Memory Model" \
- -u "Top" \
- -n "Default Fatal Error Processing" ${*}.t
-
-fatalerr.texi: fatalerr.t Makefile
- $(BMENU) -p "Interrupt Processing Interrupt Stack" \
- -u "Top" \
- -n "Board Support Packages" ${*}.t
-
-bsp.texi: bsp.t Makefile
- $(BMENU) -p "Default Fatal Error Processing Default Fatal Error Handler Operations" \
- -u "Top" \
- -n "Processor Dependent Information Table" ${*}.t
-
-cputable.texi: cputable.t Makefile
- $(BMENU) -p "Board Support Packages Processor Initialization" \
- -u "Top" \
- -n "Memory Requirements" ${*}.t
-
-
-# Worksheets Chapter:
-# 1. Obtain the Shared File
-# 2. Replace Times and Sizes
-# 3. Build Node Structure
-
-wksheets_NOTIMES.t: ../../common/wksheets.t
- cp ../../common/wksheets.t wksheets_NOTIMES.t
-
-wksheets.t: wksheets_NOTIMES.t CVME961_TIMES
- ${REPLACE} -p CVME961_TIMES wksheets_NOTIMES.t
- mv wksheets_NOTIMES.t.fixed wksheets.t
-
-wksheets.texi: wksheets.t Makefile
- $(BMENU) -p "Processor Dependent Information Table CPU Dependent Information Table" \
- -u "Top" \
- -n "Timing Specification" ${*}.t
-
-# Timing Specification Chapter:
-# 1. Copy the Shared File
-# 3. Build Node Structure
-
-timing.t: ../../common/timing.t
- cp ../../common/timing.t timing.t
-
-timing.texi: timing.t Makefile
- $(BMENU) -p "Memory Requirements RTEMS RAM Workspace Worksheet" \
- -u "Top" \
- -n "CVME961 Timing Data" ${*}.t
-
-# Timing Data for BSP Chapter:
-# 1. Copy the Shared File
-# 2. Replace Times and Sizes
-# 3. Build Node Structure
-
-timeCVME961_.t: ../../common/timetbl.t timeCVME961.t
- cat timeCVME961.t ../../common/timetbl.t >timeCVME961_.t
- @echo >>timeCVME961_.t
- @echo "@tex" >>timeCVME961_.t
- @echo "\\global\\advance \\smallskipamount by 4pt" >>timeCVME961_.t
- @echo "@end tex" >>timeCVME961_.t
- ${REPLACE} -p CVME961_TIMES timeCVME961_.t
- mv timeCVME961_.t.fixed timeCVME961_.t
-
-timeCVME961.texi: timeCVME961_.t Makefile
- $(BMENU) -p "Timing Specification Terminology" \
- -u "Top" \
- -n "Command and Variable Index" timeCVME961_.t
- mv timeCVME961_.texi timeCVME961.texi
diff --git a/doc/supplements/i960/bsp.t b/doc/supplements/i960/bsp.t
deleted file mode 100644
index fdd0139e24..0000000000
--- a/doc/supplements/i960/bsp.t
+++ /dev/null
@@ -1,54 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Board Support Packages
-
-@section Introduction
-
-An RTEMS Board Support Package (BSP) must be designed
-to support a particular processor and target board combination.
-This chapter presents a discussion of i960CA specific BSP
-issues. For more information on developing a BSP, refer to the
-chapter titled Board Support Packages in the RTEMS
-Applications User's Guide.
-
-@section System Reset
-
-An RTEMS based application is initiated when the
-i960CA processor is reset. When the i960CA is reset, the
-processor reads an Initial Memory Image (IMI) to establish its
-state. The IMI consists of the Initialization Boot Record (IBR)
-and the Process Control Block (PRCB) from an Initial Memory
-Image (IMI) at location 0xFFFFFF00. The IBR contains the
-initial bus configuration data, the address of the first
-instruction to execute after reset, the address of the PRCB, and
-the checksum used by the processor's self-test.
-
-@section Processor Initialization
-
-The PRCB contains the base addresses for system data
-structures, and initial configuration information for the core
-and integrated peripherals. In particular, the PRCB contains
-the initial contents of the Arithmetic Control (AC) Register as
-well as the base addresses of the Interrupt Vector Table, System
-Procedure Entry Table, Fault Entry Table, and the Control Table.
-In addition, the PRCB is used to configure the depth of the
-instruction and register caches and the actions when certain
-types of faults are encountered.
-
-The Process Controls (PC) Register is initialized to
-0xC01F2002 which sets the i960CA's interrupt level to 0x1F (31
-decimal). In addition, the Interrupt Mask (IMSK) Register
-(alternately referred to as Special Function Register 1 or sf1)
-is set to 0x00000000 to mask all external and DMA interrupt
-sources. Thus, all interrupts are disabled when the first
-instruction is executed.
-
-For more information regarding the i960CA's data
-structures and their contents, refer to Intel's i960CA User's
-Manual.
diff --git a/doc/supplements/i960/callconv.t b/doc/supplements/i960/callconv.t
deleted file mode 100644
index 7eecb889a7..0000000000
--- a/doc/supplements/i960/callconv.t
+++ /dev/null
@@ -1,97 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Calling Conventions
-
-@section Introduction
-
-Each high-level language compiler generates
-subroutine entry and exit code based upon a set of rules known
-as the compiler's calling convention. These rules address the
-following issues:
-
-@itemize @bullet
-@item register preservation and usage
-
-@item parameter passing
-
-@item call and return mechanism
-@end itemize
-
-A compiler's calling convention is of importance when
-interfacing to subroutines written in another language either
-assembly or high-level. Even when the high-level language and
-target processor are the same, different compilers may use
-different calling conventions. As a result, calling conventions
-are both processor and compiler dependent.
-
-@section Processor Background
-
-All members of the i960 architecture family support
-two methods for performing procedure calls: a RISC-style
-branch-and-link and an integrated call and return mechanism.
-
-On a branch-and-link, the processor branches to the
-invoked procedure and saves the return address in a register,
-G14. Typically, the invoked procedure will not invoke another
-procedure and is referred to as a leaf procedure. Many
-high-level language compilers for the i960 family recognize leaf
-procedures and automatically optimize them to utilize the
-branch-and-link mechanism. Branch-and-link procedures are
-invoked using the bal and balx instructions and return control
-via the bx instruction. By convention, G14 is zero when not in
-a leaf procedure. It is the responsibility of the leaf
-procedure to clear G14 before returning.
-
-The integrated call and return mechanism also
-branches to the invoked procedure and saves the return address
-as did the branch and link mechanism. However, the important
-difference is that the call, callx, and calls instructions save
-the local register set (R0 through R15) before transferring
-control to the invoked procedure. The ret instruction
-automatically restores the previous local register set. The
-i960CA provides a register cache which can be configured to
-retain the last five to sixteen recent register caches. When
-the register cache is full, the oldest cached register set is
-written to the stack.
-
-@section Calling Mechanism
-
-All RTEMS directives are invoked using either a call
-or callx instruction and return to the user via the ret
-instruction.
-
-@section Register Usage
-
-As discussed above, the call and callx instructions
-automatically save the current contents of the local register
-set (R0 through R15). The contents of the local registers will
-be restored as part of returning to the application. The
-contents of global registers G0 through G7 are not preserved by
-RTEMS directives.
-
-@section Parameter Passing
-
-RTEMS uses the standard i960 family C parameter
-passing mechanism in which G0 contains the first parameter, G1
-the second, and so on for the remaining parameters. No RTEMS
-directive requires more than six parameters.
-
-@section User-Provided Routines
-
-All user-provided routines invoked by RTEMS, such as
-user extensions, device drivers, and MPCI routines, must also
-adhere to these calling conventions.
-
-@section Leaf Procedures
-
-RTEMS utilizes leaf procedures internally to improve
-performance. This improves execution speed as well as reducing
-stack usage and the number of register sets which must be cached.
-
-
diff --git a/doc/supplements/i960/cpumodel.t b/doc/supplements/i960/cpumodel.t
deleted file mode 100644
index 0c9f334449..0000000000
--- a/doc/supplements/i960/cpumodel.t
+++ /dev/null
@@ -1,62 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter CPU Model Dependent Features
-
-@section Introduction
-
-Microprocessors are generally classified into
-families with a variety of CPU models or implementations within
-that family. Within a processor family, there is a high level
-of binary compatibility. This family may be based on either an
-architectural specification or on maintaining compatibility with
-a popular processor. Recent microprocessor families such as the
-SPARC or PA-RISC are based on an architectural specification
-which is independent or any particular CPU model or
-implementation. Older families such as the M68xxx and the iX86
-evolved as the manufacturer strived to produce higher
-performance processor models which maintained binary
-compatibility with older models.
-
-RTEMS takes advantage of the similarity of the
-various models within a CPU family. Although the models do vary
-in significant ways, the high level of compatibility makes it
-possible to share the bulk of the CPU dependent executive code
-across the entire family. Each processor family supported by
-RTEMS has a list of features which vary between CPU models
-within a family. For example, the most common model dependent
-feature regardless of CPU family is the presence or absence of a
-floating point unit or coprocessor. When defining the list of
-features present on a particular CPU model, one simply notes
-that floating point hardware is or is not present and defines a
-single constant appropriately. Conditional compilation is
-utilized to include the appropriate source code for this CPU
-model's feature set. It is important to note that this means
-that RTEMS is thus compiled using the appropriate feature set
-and compilation flags optimal for this CPU model used. The
-alternative would be to generate a binary which would execute on
-all family members using only the features which were always
-present.
-
-This chapter presents the set of features which vary
-across i960 implementations and are of importance to RTEMS.
-The set of CPU model feature macros are defined in the file
-c/src/exec/score/cpu/i960/i960.h based upon the particular CPU
-model defined on the compilation command line.
-
-@section CPU Model Name
-
-The macro CPU_MODEL_NAME is a string which designates
-the name of this CPU model. For example, for the Intel i960CA,
-this macro is set to the string "i960ca".
-
-@section Floating Point Unit
-
-The macro I960_HAS_FPU is set to 1 to indicate that
-this CPU model has a hardware floating point unit and 0
-otherwise.
diff --git a/doc/supplements/i960/cputable.t b/doc/supplements/i960/cputable.t
deleted file mode 100644
index 90a6c4d7a8..0000000000
--- a/doc/supplements/i960/cputable.t
+++ /dev/null
@@ -1,121 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Processor Dependent Information Table
-
-@section Introduction
-
-Any highly processor dependent information required
-to describe a processor to RTEMS is provided in the CPU
-Dependent Information Table. This table is not required for all
-processors supported by RTEMS. This chapter describes the
-contents, if any, for a particular processor type.
-
-@section CPU Dependent Information Table
-
-The i960CA version of the RTEMS CPU Dependent
-Information Table contains the information required to interface
-a Board Support Package and RTEMS on the i960CA. This
-information is provided to allow RTEMS to interoperate
-effectively with the BSP. The C structure definition is given
-here:
-
-@example
-@group
-typedef struct @{
- void (*pretasking_hook)( void );
- void (*predriver_hook)( void );
- void (*postdriver_hook)( void );
- void (*idle_task)( void );
- boolean do_zero_of_workspace;
- unsigned32 idle_task_stack_size;
- unsigned32 interrupt_stack_size;
- unsigned32 extra_mpci_receive_server_stack;
- void (*stack_free_hook)( void* );
- /* end of fields required on all CPUs */
-
- i960_PRCB *Prcb;
-
-@} rtems_cpu_table;
-@end group
-@end example
-
-The contents of the i960 Processor Control Block
-are discussed in the User's Manual for the particular
-i960 model being used. Structure definitions for the
-i960CA and i960HA PRCB and Control Table are provided
-by including the file @code{rtems.h}.
-
-@table @code
-@item pretasking_hook
-is the address of the user provided routine which is invoked
-once RTEMS APIs are initialized. This routine will be invoked
-before any system tasks are created. Interrupts are disabled.
-This field may be NULL to indicate that the hook is not utilized.
-
-@item predriver_hook
-is the address of the user provided
-routine that is invoked immediately before the
-the device drivers and MPCI are initialized. RTEMS
-initialization is complete but interrupts and tasking are disabled.
-This field may be NULL to indicate that the hook is not utilized.
-
-@item postdriver_hook
-is the address of the user provided
-routine that is invoked immediately after the
-the device drivers and MPCI are initialized. RTEMS
-initialization is complete but interrupts and tasking are disabled.
-This field may be NULL to indicate that the hook is not utilized.
-
-@item idle_task
-is the address of the optional user
-provided routine which is used as the system's IDLE task. If
-this field is not NULL, then the RTEMS default IDLE task is not
-used. This field may be NULL to indicate that the default IDLE
-is to be used.
-
-@item do_zero_of_workspace
-indicates whether RTEMS should
-zero the Workspace as part of its initialization. If set to
-TRUE, the Workspace is zeroed. Otherwise, it is not.
-
-@item idle_task_stack_size
-is the size of the RTEMS idle task stack in bytes.
-If this number is less than MINIMUM_STACK_SIZE, then the
-idle task's stack will be MINIMUM_STACK_SIZE in byte.
-
-@item interrupt_stack_size
-is the size of the RTEMS
-allocated interrupt stack in bytes. This value must be at least
-as large as MINIMUM_STACK_SIZE.
-
-@item extra_mpci_receive_server_stack
-is the extra stack space allocated for the RTEMS MPCI receive server task
-in bytes. The MPCI receive server may invoke nearly all directives and
-may require extra stack space on some targets.
-
-@item stack_allocate_hook
-is the address of the optional user provided routine which allocates
-memory for task stacks. If this hook is not NULL, then a stack_free_hook
-must be provided as well.
-
-@item stack_free_hook
-is the address of the optional user provided routine which frees
-memory for task stacks. If this hook is not NULL, then a stack_allocate_hook
-must be provided as well.
-
-@item Prcb
-is the base address of the Processor Control Block. It
-is primarily used by RTEMS to install interrupt handlers.
-@end table
-
-
-
-
-
-
diff --git a/doc/supplements/i960/fatalerr.t b/doc/supplements/i960/fatalerr.t
deleted file mode 100644
index 1d46b2ad9a..0000000000
--- a/doc/supplements/i960/fatalerr.t
+++ /dev/null
@@ -1,30 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Default Fatal Error Processing
-
-@section Introduction
-
-Upon detection of a fatal error by either the
-application or RTEMS the fatal error manager is invoked. The
-fatal error manager will invoke the user-supplied fatal error
-handlers. If no user-supplied handlers is configured, the
-RTEMS provided default fatal error handler is invoked. If the
-user-supplied fatal error handlers return to the executive the
-default fatal error handler is then invoked. This chapter
-describes the precise operations of the default fatal error
-handler.
-
-@section Default Fatal Error Handler Operations
-
-The default fatal error handler which is invoked by
-the fatal_error_occurred directive when there is no user handler
-configured or the user handler returns control to RTEMS. The
-default fatal error handler disables processor interrupts to
-level 31, places the error code in G0, and executes a branch to
-self instruction to simulate a halt processor instruction.
diff --git a/doc/supplements/i960/i960.texi b/doc/supplements/i960/i960.texi
deleted file mode 100644
index 68b7944afe..0000000000
--- a/doc/supplements/i960/i960.texi
+++ /dev/null
@@ -1,120 +0,0 @@
-\input texinfo @c -*-texinfo-*-
-@c %**start of header
-@setfilename c_i960
-@syncodeindex vr fn
-@synindex ky cp
-@paragraphindent 0
-@c @smallbook
-@c %**end of header
-
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@c
-@c Master file for the Intel i960 Applications Supplement
-@c
-
-@include ../../common/setup.texi
-
-@ignore
-@ifinfo
-@format
-START-INFO-DIR-ENTRY
-* RTEMS Intel i960 Applications Supplement (i960):
-END-INFO-DIR-ENTRY
-@end format
-@end ifinfo
-@end ignore
-
-@c
-@c Title Page Stuff
-@c
-
-@set edition @value{RTEMS-EDITION}
-@set version @value{RTEMS-VERSION}
-@set update-date @value{RTEMS-UPDATE-DATE}
-@set update-month @value{RTEMS-UPDATE-MONTH}
-
-@c
-@c I don't really like having a short title page. --joel
-@c
-@c @shorttitlepage RTEMS Intel i960 Applications Supplement
-
-@setchapternewpage odd
-@settitle RTEMS Intel i960 Applications Supplement
-@titlepage
-@finalout
-
-@title RTEMS Intel i960 Applications Supplement
-@subtitle Edition @value{edition}, for RTEMS @value{version}
-@sp 1
-@subtitle @value{update-month}
-@author On-Line Applications Research Corporation
-@page
-@include ../../common/cpright.texi
-@end titlepage
-
-@c This prevents a black box from being printed on "overflow" lines.
-@c The alternative is to rework a sentence to avoid this problem.
-
-@include preface.texi
-@include cpumodel.texi
-@include callconv.texi
-@include memmodel.texi
-@include intr.texi
-@include fatalerr.texi
-@include bsp.texi
-@include cputable.texi
-@include wksheets.texi
-@include timing.texi
-@include timeCVME961.texi
-@ifinfo
-@node Top, Preface, (dir), (dir)
-@top c_i960
-
-This is the online version of the RTEMS Intel i960
-Applications Supplement.
-
-@menu
-* Preface::
-* CPU Model Dependent Features::
-* Calling Conventions::
-* Memory Model::
-* Interrupt Processing::
-* Default Fatal Error Processing::
-* Board Support Packages::
-* Processor Dependent Information Table::
-* Memory Requirements::
-* Timing Specification::
-* CVME961 Timing Data::
-* Command and Variable Index::
-* Concept Index::
-@end menu
-
-@end ifinfo
-@c
-@c
-@c Need to copy the emacs stuff and "trailer stuff" (index, toc) into here
-@c
-
-@node Command and Variable Index, Concept Index, CVME961 Timing Data Rate Monotonic Manager, Top
-@unnumbered Command and Variable Index
-
-There are currently no Command and Variable Index entries.
-
-@c @printindex fn
-
-@node Concept Index, , Command and Variable Index, Top
-@unnumbered Concept Index
-
-There are currently no Concept Index entries.
-@c @printindex cp
-
-@contents
-@bye
-
diff --git a/doc/supplements/i960/intr_NOTIMES.t b/doc/supplements/i960/intr_NOTIMES.t
deleted file mode 100644
index 8249a888ac..0000000000
--- a/doc/supplements/i960/intr_NOTIMES.t
+++ /dev/null
@@ -1,193 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Interrupt Processing
-
-@section Introduction
-
-Different types of processors respond to the
-occurrence of an interrupt in its own unique fashion. In
-addition, each processor type provides a control mechanism to
-allow the proper handling of an interrupt. The processor
-dependent response to the interrupt which modifies the execution
-state and results in the modification of the execution stream.
-This modification usually requires that an interrupt handler
-utilize the provided control mechanisms to return to the normal
-processing stream. Although RTEMS hides many of the processor
-dependent details of interrupt processing, it is important to
-understand how the RTEMS interrupt manager is mapped onto the
-processor's unique architecture. Discussed in this chapter are
-the the processor's response and control mechanisms as they
-pertain to RTEMS.
-
-@section Vectoring of Interrupt Handler
-
-Upon receipt of an interrupt the i960CA
-automatically performs the following actions:
-
-@itemize @bullet
-@item saves the local register set,
-
-@item sets the Frame Pointer (FP) to point to the interrupt
-stack,
-
-@item increments the FP by sixteen (16) to make room for the
-Interrupt Record,
-
-@item saves the current values of the arithmetic-controls (AC)
-register, the process-controls (PC) register, and the interrupt
-vector number are saved in the Interrupt Record,
-
-@item the CPU sets the Instruction Pointer (IP) to the address
-of the first instruction in the interrupt handler,
-
-@item the return-status field of the Previous Frame Pointer
-(PFP or R0) register is set to interrupt return,
-
-@item sets the PC state bit to interrupted,
-
-@item sets the current interrupt disable level in the PC to
-the level of the current interrupt, and
-
-@item disables tracing.
-@end itemize
-
-A nested interrupt is processed similarly by the
-i960CA with the exception that the Frame Pointer (FP) already
-points to the interrupt stack. This means that the FP is NOT
-overwritten before space for the Interrupt Record is allocated.
-
-The state flag bit of the saved PC register in the
-Interrupt Record is examined by RTEMS to determine when an outer
-most interrupt is being exited. Therefore, the user application
-code MUST NOT modify this bit.
-
-@section Interrupt Record
-
-The structure of the Interrupt Record for the i960CA
-which is placed on the interrupt stack by the processor in
-response to an interrupt is as follows:
-
-@ifset use-ascii
-@example
-@group
- +---------------------------+
- | Saved Process Controls | NFP-16
- +---------------------------+
- | Saved Arithmetic Controls | NFP-12
- +---------------------------+
- | UNUSED | NFP-8
- +---------------------------+
- | UNUSED | NFP-4
- +---------------------------+
-@end group
-@end example
-@end ifset
-
-@ifset use-tex
-@sp 1
-@tex
-\centerline{\vbox{\offinterlineskip\halign{
-\strut\vrule#&
-\hbox to 2.00in{\enskip\hfil#\hfil}&
-\vrule#&
-\hbox to 1.00in{\enskip\hfil#\hfil}
-\cr
-\multispan{3}\hrulefill\cr
-& Saved Process Controls && NFP-16\cr
-\multispan{3}\hrulefill\cr
-& Saved Arithmetic Controls && NFP-12\cr
-\multispan{3}\hrulefill\cr
-& UNUSED && NFP-8\cr
-\multispan{3}\hrulefill\cr
-& UNUSED && NFP-4\cr
-\multispan{3}\hrulefill\cr
-}}\hfil}
-@end tex
-@end ifset
-
-@ifset use-html
-@html
-<CENTER>
- <TABLE COLS=2 WIDTH="40%" BORDER=2>
-<TR><TD ALIGN=center><STRONG>Saved Process Controls</STRONG></TD>
- <TD ALIGN=center>NFP-16</TD></TR>
-<TR><TD ALIGN=center><STRONG>Saved Arithmetic Controls</STRONG></TD>
- <TD ALIGN=center>NFP-12</TD></TR>
-<TR><TD ALIGN=center><STRONG>UNUSED</STRONG></TD>
- <TD ALIGN=center>NFP-8</TD></TR>
-<TR><TD ALIGN=center><STRONG>UNUSED</STRONG></TD>
- <TD ALIGN=center>NFP-4</TD></TR>
- </TABLE>
-</CENTER>
-@end html
-@end ifset
-
-@section Interrupt Levels
-
-Thirty-two levels (0-31) of interrupt priorities are
-supported by the i960CA microprocessor with level thirty-one
-(31) being the highest priority. Level zero (0) indicates that
-interrupts are fully enabled. Interrupt requests for interrupts
-with priorities less than or equal to the current interrupt mask
-level are ignored.
-
-Although RTEMS supports 256 interrupt levels, the
-i960CA only supports thirty-two. RTEMS interrupt levels 0
-through 31 directly correspond to i960CA interrupt levels. All
-other RTEMS interrupt levels are undefined and their behavior is
-unpredictable.
-
-@section Disabling of Interrupts by RTEMS
-
-During the execution of directive calls, critical
-sections of code may be executed. When these sections are
-encountered, RTEMS disables interrupts to level thirty-one (31)
-before the execution of this section and restores them to the
-previous level upon completion of the section. RTEMS has been
-optimized to insure that interrupts are disabled for less than
-RTEMS_MAXIMUM_DISABLE_PERIOD microseconds on a
-RTEMS_MAXIMUM_DISABLE_PERIOD_MHZ Mhz i960CA with zero wait states.
-These numbers will vary based the number of wait states and
-processor speed present on the target board. [NOTE: This
-calculation was most recently performed for Release
-RTEMS_RELEASE_FOR_MAXIMUM_DISABLE_PERIOD.]
-
-Non-maskable interrupts (NMI) cannot be disabled, and
-ISRs which execute at this level MUST NEVER issue RTEMS system
-calls. If a directive is invoked, unpredictable results may
-occur due to the inability of RTEMS to protect its critical
-sections. However, ISRs that make no system calls may safely
-execute as non-maskable interrupts.
-
-@section Register Cache Flushing
-
-The i960CA version of the RTEMS interrupt manager is
-optimized to insure that the flushreg instruction is only
-executed when a context switch is necessary. The flushreg
-instruction flushes the i960CA register set cache and takes (14
-+ 23 * number of sets flushed) cycles to execute. As the i960CA
-supports caching of from five to sixteen register sets, this
-instruction takes from 129 to 382 cycles (3.90 to 11.57
-microseconds at 33 Mhz) to execute given no wait state memory.
-RTEMS flushes the register set cache only at the conclusion of
-the outermost ISR when a context switch is necessary. The
-register set cache will not be flushed as part of processing a
-nested interrupt or when a context switch is not necessary.
-This optimization is essential to providing high-performance
-interrupt management on the i960CA.
-
-@section Interrupt Stack
-
-On the i960CA, RTEMS allocates the interrupt stack
-from the Workspace Area. The amount of memory allocated for the
-interrupt stack is determined by the interrupt_stack_size field
-in the CPU Configuration Table. During the initialization
-process, RTEMS will install its interrupt stack.
-
-
diff --git a/doc/supplements/i960/memmodel.t b/doc/supplements/i960/memmodel.t
deleted file mode 100644
index 26c8967438..0000000000
--- a/doc/supplements/i960/memmodel.t
+++ /dev/null
@@ -1,40 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Memory Model
-
-@section Introduction
-
-A processor may support any combination of memory
-models ranging from pure physical addressing to complex demand
-paged virtual memory systems. RTEMS supports a flat memory
-model which ranges contiguously over the processor's allowable
-address space. RTEMS does not support segmentation or virtual
-memory of any kind. The appropriate memory model for RTEMS
-provided by the targeted processor and related characteristics
-of that model are described in this chapter.
-
-@section Flat Memory Model
-
-The i960CA supports a flat 32-bit address space with
-addresses ranging from 0x00000000 to 0xFFFFFFFF (4 gigabytes).
-Although the i960CA reserves portions of this address space,
-application code and data may be placed in any non-reserved
-areas. Each address is represented by a 32-bit value and is
-byte addressable. The address may be used to reference a single
-byte, half-word (2-bytes), word (4 bytes), double-word (8
-bytes), triple-word (12 bytes) or quad-word (16 bytes). The
-i960CA does not support virtual memory or segmentation.
-
-The i960CA allows the memory space to be partitioned
-into sixteen regions which may be configured individually as big
-or little endian. RTEMS assumes that the memory regions in
-which its code, data, and the RTEMS Workspace reside are
-configured as little endian.
-
-
diff --git a/doc/supplements/i960/preface.texi b/doc/supplements/i960/preface.texi
deleted file mode 100644
index 3395a4ff3e..0000000000
--- a/doc/supplements/i960/preface.texi
+++ /dev/null
@@ -1,40 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@ifinfo
-@node Preface, CPU Model Dependent Features, Top, Top
-@end ifinfo
-@unnumbered Preface
-
-The Real Time Executive for Multiprocessor Systems
-(RTEMS) is designed to be portable across multiple processor
-architectures. However, the nature of real-time systems makes
-it essential that the application designer understand certain
-processor dependent implementation details. These processor
-dependencies include calling convention, board support package
-issues, interrupt processing, exact RTEMS memory requirements,
-performance data, header files, and the assembly language
-interface to the executive.
-
-For information on the i960CA and the i960 processor
-family in general, refer to the following documents:
-
-@itemize @bullet
-@item @cite{80960CA User's Manual, Intel, Order No. 270710}.
-
-@item @cite{32-Bit Embedded Controller Handbook, Intel, Order No. 270647}.
-
-@item @cite{Glenford J. Meyers and David L. Budde. The 80960
-Microprocessor Architecture. Wiley. New York. 1988}.
-@end itemize
-
-It is highly recommended that the i960CA RTEMS
-application developer obtain and become familiar with Intel's
-i960CA User's Manual.
-
-
diff --git a/doc/supplements/i960/timeCVME961.t b/doc/supplements/i960/timeCVME961.t
deleted file mode 100644
index 3ddd6f630a..0000000000
--- a/doc/supplements/i960/timeCVME961.t
+++ /dev/null
@@ -1,88 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@include ../../common/timemac.texi
-@tex
-\global\advance \smallskipamount by -4pt
-@end tex
-
-@chapter CVME961 Timing Data
-
-NOTE: The CVME961 board used by the RTEMS Project to
-obtain i960CA times is currently broken. The information in
-this chapter was obtained using Release 3.2.1.
-
-@section Introduction
-
-The timing data for the i960CA version of RTEMS is
-provided along with the target dependent aspects concerning the
-gathering of the timing data. The hardware platform used to
-gather the times is described to give the reader a better
-understanding of each directive time provided. Also, provided
-is a description of the interrupt latency and the context
-switch times as they pertain to the i960CA version of RTEMS.
-
-@section Hardware Platform
-
-All times reported except for the maximum period
-interrupts are disabled by RTEMS were measured using a Cyclone
-Microsystems CVME961 board. The CVME961 is a 33 Mhz board with
-dynamic RAM which has two wait state dynamic memory (four CPU
-cycles) for read accesses and one wait state (two CPU cycles)
-for write accesses. The Z8536 on a SQUALL SQSIO4 mezzanine
-board was used to measure elapsed time with one-half microsecond
-resolution. All sources of hardware interrupts are disabled,
-although the interrupt level of the i960CA allows all interrupts.
-
-The maximum interrupt disable period was measured by
-summing the number of CPU cycles required by each assembly
-language instruction executed while interrupts were disabled.
-Zero wait state memory was assumed. The total CPU cycles
-executed with interrupts disabled, including the instructions to
-disable and enable interrupts, was divided by 33 to simulate a
-i960CA executing at 33 Mhz with zero wait states.
-
-@section Interrupt Latency
-
-The maximum period with interrupts disabled within
-RTEMS is less than
-RTEMS_MAXIMUM_DISABLE_PERIOD microseconds including the instructions
-which disable and re-enable interrupts. The time required for
-the i960CA to generate an interrupt using the sysctl
-instruction, vectoring to an interrupt handler, and for the
-RTEMS entry overhead before invoking the user's interrupt
-handler are a total of RTEMS_INTR_ENTRY_RETURNS_TO_PREEMPTING_TASK
-microseconds. These combine to yield
-a worst case interrupt latency of less than
-RTEMS_MAXIMUM_DISABLE_PERIOD + RTEMS_INTR_ENTRY_RETURNS_TO_PREEMPTING_TASK
-microseconds. [NOTE: The maximum period with interrupts
-disabled within RTEMS was last calculated for Release
-RTEMS_RELEASE_FOR_MAXIMUM_DISABLE_PERIOD.]
-
-It should be noted again that the maximum period with
-interrupts disabled within RTEMS is hand-timed. The interrupt
-vector and entry overhead time was generated on the Cyclone
-CVME961 benchmark platform using the sysctl instruction as the
-interrupt source.
-
-@section Context Switch
-
-The RTEMS processor context switch time is RTEMS_NO_FP_CONTEXTS
-microseconds on the Cyclone CVME961 benchmark platform. This
-time represents the raw context switch time with no user
-extensions configured. Additional execution time is required
-when a TSWITCH user extension is configured. The use of the
-TSWITCH extension is application dependent. Thus, its execution
-time is not considered part of the base context switch time.
-
-The CVME961 has no hardware floating point capability
-and floating point tasks are not supported.
-
-The following table summarizes the context switch
-times for the CVME961 benchmark platform:
-
diff --git a/doc/supplements/m68k/MVME136_TIMES b/doc/supplements/m68k/MVME136_TIMES
deleted file mode 100644
index 5b0dfe6fda..0000000000
--- a/doc/supplements/m68k/MVME136_TIMES
+++ /dev/null
@@ -1,247 +0,0 @@
-#
-# M68020/MVME136 Timing and Size Information
-#
-# $Id$
-#
-
-#
-# CPU Model Information
-#
-RTEMS_BSP MVME136
-RTEMS_CPU_MODEL MC68020
-#
-# Interrupt Latency
-#
-# NOTE: In general, the text says it is hand-calculated to be
-# RTEMS_MAXIMUM_DISABLE_PERIOD at RTEMS_MAXIMUM_DISABLE_PERIOD_MHZ
-# Mhz and this was last calculated for Release
-# RTEMS_VERSION_FOR_MAXIMUM_DISABLE_PERIOD.
-#
-RTEMS_MAXIMUM_DISABLE_PERIOD TBD
-RTEMS_MAXIMUM_DISABLE_PERIOD_MHZ 20
-RTEMS_RELEASE_FOR_MAXIMUM_DISABLE_PERIOD 3.2.1
-#
-# Context Switch Times
-#
-RTEMS_NO_FP_CONTEXTS 35
-RTEMS_RESTORE_1ST_FP_TASK 39
-RTEMS_SAVE_INIT_RESTORE_INIT 66
-RTEMS_SAVE_IDLE_RESTORE_INIT 66
-RTEMS_SAVE_IDLE_RESTORE_IDLE 68
-#
-# Task Manager Times
-#
-RTEMS_TASK_CREATE_ONLY 148
-RTEMS_TASK_IDENT_ONLY 350
-RTEMS_TASK_START_ONLY 76
-RTEMS_TASK_RESTART_CALLING_TASK 95
-RTEMS_TASK_RESTART_SUSPENDED_RETURNS_TO_CALLER 89
-RTEMS_TASK_RESTART_BLOCKED_RETURNS_TO_CALLER 124
-RTEMS_TASK_RESTART_READY_RETURNS_TO_CALLER 92
-RTEMS_TASK_RESTART_SUSPENDED_PREEMPTS_CALLER 125
-RTEMS_TASK_RESTART_BLOCKED_PREEMPTS_CALLER 149
-RTEMS_TASK_RESTART_READY_PREEMPTS_CALLER 142
-RTEMS_TASK_DELETE_CALLING_TASK 170
-RTEMS_TASK_DELETE_SUSPENDED_TASK 138
-RTEMS_TASK_DELETE_BLOCKED_TASK 143
-RTEMS_TASK_DELETE_READY_TASK 144
-RTEMS_TASK_SUSPEND_CALLING_TASK 71
-RTEMS_TASK_SUSPEND_RETURNS_TO_CALLER 43
-RTEMS_TASK_RESUME_TASK_READIED_RETURNS_TO_CALLER 45
-RTEMS_TASK_RESUME_TASK_READIED_PREEMPTS_CALLER 67
-RTEMS_TASK_SET_PRIORITY_OBTAIN_CURRENT_PRIORITY 31
-RTEMS_TASK_SET_PRIORITY_RETURNS_TO_CALLER 64
-RTEMS_TASK_SET_PRIORITY_PREEMPTS_CALLER 106
-RTEMS_TASK_MODE_OBTAIN_CURRENT_MODE 14
-RTEMS_TASK_MODE_NO_RESCHEDULE 16
-RTEMS_TASK_MODE_RESCHEDULE_RETURNS_TO_CALLER 23
-RTEMS_TASK_MODE_RESCHEDULE_PREEMPTS_CALLER 60
-RTEMS_TASK_GET_NOTE_ONLY 33
-RTEMS_TASK_SET_NOTE_ONLY 33
-RTEMS_TASK_WAKE_AFTER_YIELD_RETURNS_TO_CALLER 16
-RTEMS_TASK_WAKE_AFTER_YIELD_PREEMPTS_CALLER 56
-RTEMS_TASK_WAKE_WHEN_ONLY 117
-#
-# Interrupt Manager
-#
-RTEMS_INTR_ENTRY_RETURNS_TO_NESTED 12
-RTEMS_INTR_ENTRY_RETURNS_TO_INTERRUPTED_TASK 9
-RTEMS_INTR_ENTRY_RETURNS_TO_PREEMPTING_TASK 9
-RTEMS_INTR_EXIT_RETURNS_TO_NESTED <1
-RTEMS_INTR_EXIT_RETURNS_TO_INTERRUPTED_TASK 8
-RTEMS_INTR_EXIT_RETURNS_TO_PREEMPTING_TASK 54
-#
-# Clock Manager
-#
-RTEMS_CLOCK_SET_ONLY 86
-RTEMS_CLOCK_GET_ONLY 1
-RTEMS_CLOCK_TICK_ONLY 17
-#
-# Timer Manager
-#
-RTEMS_TIMER_CREATE_ONLY 28
-RTEMS_TIMER_IDENT_ONLY 343
-RTEMS_TIMER_DELETE_INACTIVE 43
-RTEMS_TIMER_DELETE_ACTIVE 47
-RTEMS_TIMER_FIRE_AFTER_INACTIVE 58
-RTEMS_TIMER_FIRE_AFTER_ACTIVE 61
-RTEMS_TIMER_FIRE_WHEN_INACTIVE 88
-RTEMS_TIMER_FIRE_WHEN_ACTIVE 88
-RTEMS_TIMER_RESET_INACTIVE 54
-RTEMS_TIMER_RESET_ACTIVE 58
-RTEMS_TIMER_CANCEL_INACTIVE 31
-RTEMS_TIMER_CANCEL_ACTIVE 34
-#
-# Semaphore Manager
-#
-RTEMS_SEMAPHORE_CREATE_ONLY 60
-RTEMS_SEMAPHORE_IDENT_ONLY 367
-RTEMS_SEMAPHORE_DELETE_ONLY 58
-RTEMS_SEMAPHORE_OBTAIN_AVAILABLE 38
-RTEMS_SEMAPHORE_OBTAIN_NOT_AVAILABLE_NO_WAIT 38
-RTEMS_SEMAPHORE_OBTAIN_NOT_AVAILABLE_CALLER_BLOCKS 109
-RTEMS_SEMAPHORE_RELEASE_NO_WAITING_TASKS 44
-RTEMS_SEMAPHORE_RELEASE_TASK_READIED_RETURNS_TO_CALLER 66
-RTEMS_SEMAPHORE_RELEASE_TASK_READIED_PREEMPTS_CALLER 87
-#
-# Message Manager
-#
-RTEMS_MESSAGE_QUEUE_CREATE_ONLY 200
-RTEMS_MESSAGE_QUEUE_IDENT_ONLY 341
-RTEMS_MESSAGE_QUEUE_DELETE_ONLY 80
-RTEMS_MESSAGE_QUEUE_SEND_NO_WAITING_TASKS 97
-RTEMS_MESSAGE_QUEUE_SEND_TASK_READIED_RETURNS_TO_CALLER 101
-RTEMS_MESSAGE_QUEUE_SEND_TASK_READIED_PREEMPTS_CALLER 123
-RTEMS_MESSAGE_QUEUE_URGENT_NO_WAITING_TASKS 96
-RTEMS_MESSAGE_QUEUE_URGENT_TASK_READIED_RETURNS_TO_CALLER 101
-RTEMS_MESSAGE_QUEUE_URGENT_TASK_READIED_PREEMPTS_CALLER 123
-RTEMS_MESSAGE_QUEUE_BROADCAST_NO_WAITING_TASKS 53
-RTEMS_MESSAGE_QUEUE_BROADCAST_TASK_READIED_RETURNS_TO_CALLER 111
-RTEMS_MESSAGE_QUEUE_BROADCAST_TASK_READIED_PREEMPTS_CALLER 133
-RTEMS_MESSAGE_QUEUE_RECEIVE_AVAILABLE 79
-RTEMS_MESSAGE_QUEUE_RECEIVE_NOT_AVAILABLE_NO_WAIT 43
-RTEMS_MESSAGE_QUEUE_RECEIVE_NOT_AVAILABLE_CALLER_BLOCKS 114
-RTEMS_MESSAGE_QUEUE_FLUSH_NO_MESSAGES_FLUSHED 29
-RTEMS_MESSAGE_QUEUE_FLUSH_MESSAGES_FLUSHED 39
-#
-# Event Manager
-#
-RTEMS_EVENT_SEND_NO_TASK_READIED 24
-RTEMS_EVENT_SEND_TASK_READIED_RETURNS_TO_CALLER 60
-RTEMS_EVENT_SEND_TASK_READIED_PREEMPTS_CALLER 84
-RTEMS_EVENT_RECEIVE_OBTAIN_CURRENT_EVENTS 1
-RTEMS_EVENT_RECEIVE_AVAILABLE 28
-RTEMS_EVENT_RECEIVE_NOT_AVAILABLE_NO_WAIT 23
-RTEMS_EVENT_RECEIVE_NOT_AVAILABLE_CALLER_BLOCKS 84
-#
-# Signal Manager
-#
-RTEMS_SIGNAL_CATCH_ONLY 15
-RTEMS_SIGNAL_SEND_RETURNS_TO_CALLER 37
-RTEMS_SIGNAL_SEND_SIGNAL_TO_SELF 55
-RTEMS_SIGNAL_EXIT_ASR_OVERHEAD_RETURNS_TO_CALLING_TASK 37
-RTEMS_SIGNAL_EXIT_ASR_OVERHEAD_RETURNS_TO_PREEMPTING_TASK 54
-#
-# Partition Manager
-#
-RTEMS_PARTITION_CREATE_ONLY 70
-RTEMS_PARTITION_IDENT_ONLY 341
-RTEMS_PARTITION_DELETE_ONLY 42
-RTEMS_PARTITION_GET_BUFFER_AVAILABLE 35
-RTEMS_PARTITION_GET_BUFFER_NOT_AVAILABLE 33
-RTEMS_PARTITION_RETURN_BUFFER_ONLY 43
-#
-# Region Manager
-#
-RTEMS_REGION_CREATE_ONLY 63
-RTEMS_REGION_IDENT_ONLY 348
-RTEMS_REGION_DELETE_ONLY 39
-RTEMS_REGION_GET_SEGMENT_AVAILABLE 52
-RTEMS_REGION_GET_SEGMENT_NOT_AVAILABLE_NO_WAIT 49
-RTEMS_REGION_GET_SEGMENT_NOT_AVAILABLE_CALLER_BLOCKS 123
-RTEMS_REGION_RETURN_SEGMENT_NO_WAITING_TASKS 54
-RTEMS_REGION_RETURN_SEGMENT_TASK_READIED_RETURNS_TO_CALLER 114
-RTEMS_REGION_RETURN_SEGMENT_TASK_READIED_PREEMPTS_CALLER 136
-#
-# Dual-Ported Memory Manager
-#
-RTEMS_PORT_CREATE_ONLY 35
-RTEMS_PORT_IDENT_ONLY 340
-RTEMS_PORT_DELETE_ONLY 39
-RTEMS_PORT_INTERNAL_TO_EXTERNAL_ONLY 26
-RTEMS_PORT_EXTERNAL_TO_INTERNAL_ONLY 27
-#
-# IO Manager
-#
-RTEMS_IO_INITIALIZE_ONLY 4
-RTEMS_IO_OPEN_ONLY 2
-RTEMS_IO_CLOSE_ONLY 1
-RTEMS_IO_READ_ONLY 2
-RTEMS_IO_WRITE_ONLY 3
-RTEMS_IO_CONTROL_ONLY 2
-#
-# Rate Monotonic Manager
-#
-RTEMS_RATE_MONOTONIC_CREATE_ONLY 32
-RTEMS_RATE_MONOTONIC_IDENT_ONLY 341
-RTEMS_RATE_MONOTONIC_CANCEL_ONLY 39
-RTEMS_RATE_MONOTONIC_DELETE_ACTIVE 51
-RTEMS_RATE_MONOTONIC_DELETE_INACTIVE 48
-RTEMS_RATE_MONOTONIC_PERIOD_INITIATE_PERIOD_RETURNS_TO_CALLER 54
-RTEMS_RATE_MONOTONIC_PERIOD_CONCLUDE_PERIOD_CALLER_BLOCKS 74
-RTEMS_RATE_MONOTONIC_PERIOD_OBTAIN_STATUS 31
-#
-# Size Information
-#
-#
-# xxx alloted for numbers
-#
-RTEMS_DATA_SPACE 723
-RTEMS_MINIMUM_CONFIGURATION 18,980
-RTEMS_MAXIMUM_CONFIGURATION 36,438
-# x,xxx alloted for numbers
-RTEMS_CORE_CODE_SIZE 12,674
-RTEMS_INITIALIZATION_CODE_SIZE 970
-RTEMS_TASK_CODE_SIZE 3,562
-RTEMS_INTERRUPT_CODE_SIZE 54
-RTEMS_CLOCK_CODE_SIZE 334
-RTEMS_TIMER_CODE_SIZE 1,110
-RTEMS_SEMAPHORE_CODE_SIZE 1,632
-RTEMS_MESSAGE_CODE_SIZE 1,754
-RTEMS_EVENT_CODE_SIZE 1,000
-RTEMS_SIGNAL_CODE_SIZE 418
-RTEMS_PARTITION_CODE_SIZE 1,164
-RTEMS_REGION_CODE_SIZE 1,494
-RTEMS_DPMEM_CODE_SIZE 724
-RTEMS_IO_CODE_SIZE 686
-RTEMS_FATAL_ERROR_CODE_SIZE 24
-RTEMS_RATE_MONOTONIC_CODE_SIZE 1,212
-RTEMS_MULTIPROCESSING_CODE_SIZE 6.952
-# xxx alloted for numbers
-RTEMS_TIMER_CODE_OPTSIZE 184
-RTEMS_SEMAPHORE_CODE_OPTSIZE 172
-RTEMS_MESSAGE_CODE_OPTSIZE 288
-RTEMS_EVENT_CODE_OPTSIZE 56
-RTEMS_SIGNAL_CODE_OPTSIZE 56
-RTEMS_PARTITION_CODE_OPTSIZE 132
-RTEMS_REGION_CODE_OPTSIZE 160
-RTEMS_DPMEM_CODE_OPTSIZE 132
-RTEMS_IO_CODE_OPTSIZE 00
-RTEMS_RATE_MONOTONIC_CODE_OPTSIZE 184
-RTEMS_MULTIPROCESSING_CODE_OPTSIZE 332
-# xxx alloted for numbers
-RTEMS_BYTES_PER_TASK 400
-RTEMS_BYTES_PER_TIMER 68
-RTEMS_BYTES_PER_SEMAPHORE 124
-RTEMS_BYTES_PER_MESSAGE_QUEUE 148
-RTEMS_BYTES_PER_REGION 144
-RTEMS_BYTES_PER_PARTITION 56
-RTEMS_BYTES_PER_PORT 36
-RTEMS_BYTES_PER_PERIOD 36
-RTEMS_BYTES_PER_EXTENSION 64
-RTEMS_BYTES_PER_FP_TASK 332
-RTEMS_BYTES_PER_NODE 48
-RTEMS_BYTES_PER_GLOBAL_OBJECT 20
-RTEMS_BYTES_PER_PROXY 124
-# x,xxx alloted for numbers
-RTEMS_BYTES_OF_FIXED_SYSTEM_REQUIREMENTS 8,872
diff --git a/doc/supplements/m68k/Makefile b/doc/supplements/m68k/Makefile
deleted file mode 100644
index 2dd342c0f2..0000000000
--- a/doc/supplements/m68k/Makefile
+++ /dev/null
@@ -1,170 +0,0 @@
-#
-# COPYRIGHT (c) 1988-1999.
-# On-Line Applications Research Corporation (OAR).
-# All rights reserved.
-#
-# $Id$
-#
-
-PROJECT=m68k
-
-include ../../Make.config
-
-REPLACE=../../tools/word-replace
-
-all: html info ps pdf
-
-dirs:
- $(make-dirs)
-
-COMMON_FILES=../../common/cpright.texi ../../common/setup.texi
-
-GENERATED_FILES=\
- cpumodel.texi callconv.texi memmodel.texi intr.texi fatalerr.texi \
- bsp.texi cputable.texi timing.texi wksheets.texi timeMVME136.texi
-
-FILES= $(PROJECT).texi \
- preface.texi \
- $(GENERATED_FILES)
-
-info: dirs c_m68k
- cp c_$(PROJECT) c_$(PROJECT)-* $(INFO_INSTALL)
-
-c_m68k: $(FILES)
- $(MAKEINFO) $(PROJECT).texi
-
-dvi: dirs $(PROJECT).dvi
-ps: dirs $(PROJECT).ps
-pdf: dirs $(PROJECT).pdf
-
-$(PROJECT).pdf: $(FILES)
- $(TEXI2PDF) $(PROJECT).texi
- cp $(PROJECT).pdf $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).ps: $(PROJECT).dvi
- dvips -o $(PROJECT).ps $(PROJECT).dvi
- cp $(PROJECT).ps $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).dvi: $(FILES)
- $(TEXI2DVI) $(PROJECT).texi
- cp $(PROJECT).dvi $(WWW_INSTALL)/$(PROJECT)
-
-html: dirs $(FILES)
- -mkdir -p $(WWW_INSTALL)/$(PROJECT)
- $(TEXI2WWW) $(TEXI2WWW_ARGS) -dir $(WWW_INSTALL)/$(PROJECT) \
- $(PROJECT).texi
-
-clean:
- rm -f *.o $(PROG) *.txt core $(PROJECT).pdf
- rm -f *.dvi *.ps *.log *.aux *.cp *.fn *.ky *.pg *.toc *.tp *.vr $(BASE)
- rm -f $(PROJECT) $(PROJECT)-*
- rm -f c_m68k c_m68k-*
- rm -f intr.t $(GENERATED_FILES)
- rm -f wksheets.t wksheets_NOTIMES.t
- rm -f timeMVME136_.t timeMVME136_.texi
- rm -f *.fixed _* timing.t
-
-#
-# Chapters which get automatic processing
-#
-
-cpumodel.texi: cpumodel.t Makefile
- $(BMENU) -p "Preface" \
- -u "Top" \
- -n "Calling Conventions" ${*}.t
-
-callconv.texi: callconv.t Makefile
- $(BMENU) -p "CPU Model Dependent Features Extend Byte to Long Instruction" \
- -u "Top" \
- -n "Memory Model" ${*}.t
-
-memmodel.texi: memmodel.t Makefile
- $(BMENU) -p "Calling Conventions User-Provided Routines" \
- -u "Top" \
- -n "Interrupt Processing" ${*}.t
-
-
-## Interrupt Chapter:
-## 1. Replace Times and Sizes
-## 2. Build Node Structure
-#
-#intr.texi: intr.t MVME136_TIMES
-# ${REPLACE} -p MVME136_TIMES intr.t
-# mv intr.t.fixed intr.texi
-
-# Interrupt Chapter:
-# 1. Replace Times and Sizes
-# 2. Build Node Structure
-intr.t: intr_NOTIMES.t MVME136_TIMES
- ${REPLACE} -p MVME136_TIMES intr_NOTIMES.t
- mv intr_NOTIMES.t.fixed intr.t
-
-intr.texi: intr.t Makefile
- $(BMENU) -p "Memory Model Flat Memory Model" \
- -u "Top" \
- -n "Default Fatal Error Processing" ${*}.t
-
-fatalerr.texi: fatalerr.t Makefile
- $(BMENU) -p "Interrupt Processing Interrupt Stack" \
- -u "Top" \
- -n "Board Support Packages" ${*}.t
-
-bsp.texi: bsp.t Makefile
- $(BMENU) -p "Default Fatal Error Processing Default Fatal Error Handler Operations" \
- -u "Top" \
- -n "Processor Dependent Information Table" ${*}.t
-
-cputable.texi: cputable.t Makefile
- $(BMENU) -p "Board Support Packages Processor Initialization" \
- -u "Top" \
- -n "Memory Requirements" ${*}.t
-
-
-# Worksheets Chapter:
-# 1. Obtain the Shared File
-# 2. Replace Times and Sizes
-# 3. Build Node Structure
-
-wksheets_NOTIMES.t: ../../common/wksheets.t
- cp ../../common/wksheets.t wksheets_NOTIMES.t
-
-wksheets.t: wksheets_NOTIMES.t MVME136_TIMES
- ${REPLACE} -p MVME136_TIMES wksheets_NOTIMES.t
- mv wksheets_NOTIMES.t.fixed wksheets.t
-
-wksheets.texi: wksheets.t Makefile
- $(BMENU) -p "Processor Dependent Information Table CPU Dependent Information Table" \
- -u "Top" \
- -n "Timing Specification" ${*}.t
-
-# Timing Specification Chapter:
-# 1. Copy the Shared File
-# 3. Build Node Structure
-
-timing.t: ../../common/timing.t
- cp ../../common/timing.t timing.t
-
-timing.texi: timing.t Makefile
- $(BMENU) -p "Memory Requirements RTEMS RAM Workspace Worksheet" \
- -u "Top" \
- -n "MVME136 Timing Data" ${*}.t
-
-# Timing Data for BSP Chapter:
-# 1. Copy the Shared File
-# 2. Replace Times and Sizes
-# 3. Build Node Structure
-
-timeMVME136_.t: ../../common/timetbl.t timeMVME136.t
- cat timeMVME136.t ../../common/timetbl.t >timeMVME136_.t
- @echo >>timeMVME136_.t
- @echo "@tex" >>timeMVME136_.t
- @echo "\\global\\advance \\smallskipamount by 4pt" >>timeMVME136_.t
- @echo "@end tex" >>timeMVME136_.t
- ${REPLACE} -p MVME136_TIMES timeMVME136_.t
- mv timeMVME136_.t.fixed timeMVME136_.t
-
-timeMVME136.texi: timeMVME136_.t Makefile
- $(BMENU) -p "Timing Specification Terminology" \
- -u "Top" \
- -n "Command and Variable Index" timeMVME136_.t
- mv timeMVME136_.texi timeMVME136.texi
diff --git a/doc/supplements/m68k/bsp.t b/doc/supplements/m68k/bsp.t
deleted file mode 100644
index 26758c8cbe..0000000000
--- a/doc/supplements/m68k/bsp.t
+++ /dev/null
@@ -1,93 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Board Support Packages
-
-@section Introduction
-
-An RTEMS Board Support Package (BSP) must be designed
-to support a particular processor and target board combination.
-This chapter presents a discussion of MC68020 specific BSP
-issues. For more information on developing a BSP, refer to the
-chapter titled Board Support Packages in the RTEMS
-Applications User's Guide.
-
-@section System Reset
-
-An RTEMS based application is initiated or
-re-initiated when the MC68020 processor is reset. When the
-MC68020 is reset, the processor performs the following actions:
-
-@itemize @bullet
-@item The tracing bits of the status register are cleared to
-disable tracing.
-
-@item The supervisor interrupt state is entered by setting the
-supervisor (S) bit and clearing the master/interrupt (M) bit of
-the status register.
-
-@item The interrupt mask of the status register is set to
-level 7 to effectively disable all maskable interrupts.
-
-@item The vector base register (VBR) is set to zero.
-
-@item The cache control register (CACR) is set to zero to
-disable and freeze the processor cache.
-
-@item The interrupt stack pointer (ISP) is set to the value
-stored at vector 0 (bytes 0-3) of the exception vector table
-(EVT).
-
-@item The program counter (PC) is set to the value stored at
-vector 1 (bytes 4-7) of the EVT.
-
-@item The processor begins execution at the address stored in
-the PC.
-@end itemize
-
-@section Processor Initialization
-
-The address of the application's initialization code
-should be stored in the first vector of the EVT which will allow
-the immediate vectoring to the application code. If the
-application requires that the VBR be some value besides zero,
-then it should be set to the required value at this point. All
-tasks share the same MC68020's VBR value. Because interrupts
-are enabled automatically by RTEMS as part of the initialize
-executive directive, the VBR MUST be set before this directive
-is invoked to insure correct interrupt vectoring. If processor
-caching is to be utilized, then it should be enabled during the
-reset application initialization code.
-
-In addition to the requirements described in the
-Board Support Packages chapter of the Applications User's
-Manual for the reset code which is executed before the call to
-initialize executive, the MC68020 version has the following
-specific requirements:
-
-@itemize @bullet
-@item Must leave the S bit of the status register set so that
-the MC68020 remains in the supervisor state.
-
-@item Must set the M bit of the status register to remove the
-MC68020 from the interrupt state.
-
-@item Must set the master stack pointer (MSP) such that a
-minimum stack size of MINIMUM_STACK_SIZE bytes is provided for
-the initialize executive directive.
-
-@item Must initialize the MC68020's vector table.
-@end itemize
-
-Note that the BSP is not responsible for allocating
-or installing the interrupt stack. RTEMS does this
-automatically as part of initialization. If the BSP does not
-install an interrupt stack and -- for whatever reason -- an
-interrupt occurs before initialize_executive is invoked, then
-the results are unpredictable.
-
diff --git a/doc/supplements/m68k/callconv.t b/doc/supplements/m68k/callconv.t
deleted file mode 100644
index 993dc7bcef..0000000000
--- a/doc/supplements/m68k/callconv.t
+++ /dev/null
@@ -1,92 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Calling Conventions
-
-@section Introduction
-
-Each high-level language compiler generates
-subroutine entry and exit code based upon a set of rules known
-as the compiler's calling convention. These rules address the
-following issues:
-
-@itemize @bullet
-@item register preservation and usage
-@item parameter passing
-@item call and return mechanism
-@end itemize
-
-A compiler's calling convention is of importance when
-interfacing to subroutines written in another language either
-assembly or high-level. Even when the high-level language and
-target processor are the same, different compilers may use
-different calling conventions. As a result, calling conventions
-are both processor and compiler dependent.
-
-@section Processor Background
-
-The MC68xxx architecture supports a simple yet
-effective call and return mechanism. A subroutine is invoked
-via the branch to subroutine (bsr) or the jump to subroutine
-(jsr) instructions. These instructions push the return address
-on the current stack. The return from subroutine (rts)
-instruction pops the return address off the current stack and
-transfers control to that instruction. It is is important to
-note that the MC68xxx call and return mechanism does not
-automatically save or restore any registers. It is the
-responsibility of the high-level language compiler to define the
-register preservation and usage convention.
-
-@section Calling Mechanism
-
-All RTEMS directives are invoked using either a bsr
-or jsr instruction and return to the user application via the
-rts instruction.
-
-@section Register Usage
-
-As discussed above, the bsr and jsr instructions do
-not automatically save any registers. RTEMS uses the registers
-D0, D1, A0, and A1 as scratch registers. These registers are
-not preserved by RTEMS directives therefore, the contents of
-these registers should not be assumed upon return from any RTEMS
-directive.
-
-@section Parameter Passing
-
-RTEMS assumes that arguments are placed on the
-current stack before the directive is invoked via the bsr or jsr
-instruction. The first argument is assumed to be closest to the
-return address on the stack. This means that the first argument
-of the C calling sequence is pushed last. The following
-pseudo-code illustrates the typical sequence used to call a
-RTEMS directive with three (3) arguments:
-
-@example
-@group
-push third argument
-push second argument
-push first argument
-invoke directive
-remove arguments from the stack
-@end group
-@end example
-
-The arguments to RTEMS are typically pushed onto the
-stack using a move instruction with a pre-decremented stack
-pointer as the destination. These arguments must be removed
-from the stack after control is returned to the caller. This
-removal is typically accomplished by adding the size of the
-argument list in bytes to the current stack pointer.
-
-@section User-Provided Routines
-
-All user-provided routines invoked by RTEMS, such as
-user extensions, device drivers, and MPCI routines, must also
-adhere to these calling conventions.
-
diff --git a/doc/supplements/m68k/cpumodel.t b/doc/supplements/m68k/cpumodel.t
deleted file mode 100644
index 9fbed24158..0000000000
--- a/doc/supplements/m68k/cpumodel.t
+++ /dev/null
@@ -1,91 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter CPU Model Dependent Features
-
-@section Introduction
-
-Microprocessors are generally classified into
-families with a variety of CPU models or implementations within
-that family. Within a processor family, there is a high level
-of binary compatibility. This family may be based on either an
-architectural specification or on maintaining compatibility with
-a popular processor. Recent microprocessor families such as the
-SPARC or PA-RISC are based on an architectural specification
-which is independent or any particular CPU model or
-implementation. Older families such as the M68xxx and the iX86
-evolved as the manufacturer strived to produce higher
-performance processor models which maintained binary
-compatibility with older models.
-
-RTEMS takes advantage of the similarity of the
-various models within a CPU family. Although the models do vary
-in significant ways, the high level of compatibility makes it
-possible to share the bulk of the CPU dependent executive code
-across the entire family. Each processor family supported by
-RTEMS has a list of features which vary between CPU models
-within a family. For example, the most common model dependent
-feature regardless of CPU family is the presence or absence of a
-floating point unit or coprocessor. When defining the list of
-features present on a particular CPU model, one simply notes
-that floating point hardware is or is not present and defines a
-single constant appropriately. Conditional compilation is
-utilized to include the appropriate source code for this CPU
-model's feature set. It is important to note that this means
-that RTEMS is thus compiled using the appropriate feature set
-and compilation flags optimal for this CPU model used. The
-alternative would be to generate a binary which would execute on
-all family members using only the features which were always
-present.
-
-This chapter presents the set of features which vary
-across SPARC implementations and are of importance to RTEMS.
-The set of CPU model feature macros are defined in the file
-c/src/exec/score/cpu/m68k/m68k.h based upon the particular CPU
-model defined on the compilation command line.
-
-@section CPU Model Name
-
-The macro CPU_MODEL_NAME is a string which designates
-the name of this CPU model. For example, for the MC68020
-processor, this macro is set to the string "mc68020".
-
-@section Floating Point Unit
-
-The macro M68K_HAS_FPU is set to 1 to indicate that
-this CPU model has a hardware floating point unit and 0
-otherwise. It does not matter whether the hardware floating
-point support is incorporated on-chip or is an external
-coprocessor.
-
-@section BFFFO Instruction
-
-The macro M68K_HAS_BFFFO is set to 1 to indicate that
-this CPU model has the bfffo instruction.
-
-@section Vector Base Register
-
-The macro M68K_HAS_VBR is set to 1 to indicate that
-this CPU model has a vector base register (vbr).
-
-@section Separate Stacks
-
-The macro M68K_HAS_SEPARATE_STACKS is set to 1 to
-indicate that this CPU model has separate interrupt, user, and
-supervisor mode stacks.
-
-@section Pre-Indexing Address Mode
-
-The macro M68K_HAS_PREINDEXING is set to 1 to indicate that
-this CPU model has the pre-indexing address mode.
-
-@section Extend Byte to Long Instruction
-
-The macro M68K_HAS_EXTB_L is set to 1 to indicate that this CPU model
-has the extb.l instruction. This instruction is supposed to be available
-in all models based on the cpu32 core as well as mc68020 and up models.
diff --git a/doc/supplements/m68k/cputable.t b/doc/supplements/m68k/cputable.t
deleted file mode 100644
index f7542845c7..0000000000
--- a/doc/supplements/m68k/cputable.t
+++ /dev/null
@@ -1,109 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Processor Dependent Information Table
-
-@section Introduction
-
-Any highly processor dependent information required
-to describe a processor to RTEMS is provided in the CPU
-Dependent Information Table. This table is not required for all
-processors supported by RTEMS. This chapter describes the
-contents, if any, for a particular processor type.
-
-@section CPU Dependent Information Table
-
-The MC68xxx version of the RTEMS CPU Dependent
-Information Table contains the information required to interface
-a Board Support Package and RTEMS on the MC68xxx. This
-information is provided to allow RTEMS to interoperate
-effectively with the BSP. The C structure definition is given
-here:
-
-@example
-@group
-typedef struct @{
- void (*pretasking_hook)( void );
- void (*predriver_hook)( void );
- void (*postdriver_hook)( void );
- void (*idle_task)( void );
- boolean do_zero_of_workspace;
- unsigned32 idle_task_stack_size;
- unsigned32 interrupt_stack_size;
- unsigned32 extra_mpci_receive_server_stack;
- void * (*stack_allocate_hook)( unsigned32 );
- void (*stack_free_hook)( void* );
- /* end of fields required on all CPUs */
-
- m68k_isr *interrupt_vector_table;
-@} rtems_cpu_table;
-@end group
-@end example
-
-@table @code
-@item pretasking_hook
-is the address of the user provided routine which is invoked
-once RTEMS APIs are initialized. This routine will be invoked
-before any system tasks are created. Interrupts are disabled.
-This field may be NULL to indicate that the hook is not utilized.
-
-@item predriver_hook
-is the address of the user provided
-routine that is invoked immediately before the
-the device drivers and MPCI are initialized. RTEMS
-initialization is complete but interrupts and tasking are disabled.
-This field may be NULL to indicate that the hook is not utilized.
-
-@item postdriver_hook
-is the address of the user provided
-routine that is invoked immediately after the
-the device drivers and MPCI are initialized. RTEMS
-initialization is complete but interrupts and tasking are disabled.
-This field may be NULL to indicate that the hook is not utilized.
-
-@item idle_task
-is the address of the optional user
-provided routine which is used as the system's IDLE task. If
-this field is not NULL, then the RTEMS default IDLE task is not
-used. This field may be NULL to indicate that the default IDLE
-is to be used.
-
-@item do_zero_of_workspace
-indicates whether RTEMS should
-zero the Workspace as part of its initialization. If set to
-TRUE, the Workspace is zeroed. Otherwise, it is not.
-
-@item idle_task_stack_size
-is the size of the RTEMS idle task stack in bytes.
-If this number is less than MINIMUM_STACK_SIZE, then the
-idle task's stack will be MINIMUM_STACK_SIZE in byte.
-
-@item interrupt_stack_size
-is the size of the RTEMS
-allocated interrupt stack in bytes. This value must be at least
-as large as MINIMUM_STACK_SIZE.
-
-@item extra_mpci_receive_server_stack
-is the extra stack space allocated for the RTEMS MPCI receive server task
-in bytes. The MPCI receive server may invoke nearly all directives and
-may require extra stack space on some targets.
-
-@item stack_allocate_hook
-is the address of the optional user provided routine which allocates
-memory for task stacks. If this hook is not NULL, then a stack_free_hook
-must be provided as well.
-
-@item stack_free_hook
-is the address of the optional user provided routine which frees
-memory for task stacks. If this hook is not NULL, then a stack_allocate_hook
-must be provided as well.
-
-@item interrupt_vector_table
-is the base address of the CPU's Exception Vector Table.
-
-@end table
diff --git a/doc/supplements/m68k/fatalerr.t b/doc/supplements/m68k/fatalerr.t
deleted file mode 100644
index 3e61400aad..0000000000
--- a/doc/supplements/m68k/fatalerr.t
+++ /dev/null
@@ -1,31 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Default Fatal Error Processing
-
-@section Introduction
-
-Upon detection of a fatal error by either the
-application or RTEMS the fatal error manager is invoked. The
-fatal error manager will invoke the user-supplied fatal error
-handlers. If no user-supplied handlers are configured, the
-RTEMS provided default fatal error handler is invoked. If the
-user-supplied fatal error handlers return to the executive the
-default fatal error handler is then invoked. This chapter
-describes the precise operations of the default fatal error
-handler.
-
-@section Default Fatal Error Handler Operations
-
-The default fatal error handler which is invoked by
-the fatal_error_occurred directive when there is no user handler
-configured or the user handler returns control to RTEMS. The
-default fatal error handler disables processor interrupts to
-level 7, places the error code in D0, and executes a stop
-instruction to simulate a halt processor instruction.
-
diff --git a/doc/supplements/m68k/intr_NOTIMES.t b/doc/supplements/m68k/intr_NOTIMES.t
deleted file mode 100644
index 5b5c0109ee..0000000000
--- a/doc/supplements/m68k/intr_NOTIMES.t
+++ /dev/null
@@ -1,196 +0,0 @@
-@c
-@c Interrupt Stack Frame Picture
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Interrupt Processing
-
-@section Introduction
-
-Different types of processors respond to the
-occurrence of an interrupt in its own unique fashion. In
-addition, each processor type provides a control mechanism to
-allow for the proper handling of an interrupt. The processor
-dependent response to the interrupt modifies the current
-execution state and results in a change in the execution stream.
-Most processors require that an interrupt handler utilize some
-special control mechanisms to return to the normal processing
-stream. Although RTEMS hides many of the processor dependent
-details of interrupt processing, it is important to understand
-how the RTEMS interrupt manager is mapped onto the processor's
-unique architecture. Discussed in this chapter are the MC68xxx's
-interrupt response and control mechanisms as they pertain to
-RTEMS.
-
-@section Vectoring of an Interrupt Handler
-
-Depending on whether or not the particular CPU
-supports a separate interrupt stack, the MC68xxx family has two
-different interrupt handling models.
-
-@subsection Models Without Separate Interrupt Stacks
-
-Upon receipt of an interrupt the MC68xxx family
-members without separate interrupt stacks automatically perform
-the following actions:
-
-@itemize @bullet
-@item To Be Written
-@end itemize
-
-@subsection Models With Separate Interrupt Stacks
-
-Upon receipt of an interrupt the MC68xxx family
-members with separate interrupt stacks automatically perform the
-following actions:
-
-@itemize @bullet
-@item saves the current status register (SR),
-
-@item clears the master/interrupt (M) bit of the SR to
-indicate the switch from master state to interrupt state,
-
-@item sets the privilege mode to supervisor,
-
-@item suppresses tracing,
-
-@item sets the interrupt mask level equal to the level of the
-interrupt being serviced,
-
-@item pushes an interrupt stack frame (ISF), which includes
-the program counter (PC), the status register (SR), and the
-format/exception vector offset (FVO) word, onto the supervisor
-and interrupt stacks,
-
-@item switches the current stack to the interrupt stack and
-vectors to an interrupt service routine (ISR). If the ISR was
-installed with the interrupt_catch directive, then the RTEMS
-interrupt handler will begin execution. The RTEMS interrupt
-handler saves all registers which are not preserved according to
-the calling conventions and invokes the application's ISR.
-@end itemize
-
-A nested interrupt is processed similarly by these
-CPU models with the exception that only a single ISF is placed
-on the interrupt stack and the current stack need not be
-switched.
-
-The FVO word in the Interrupt Stack Frame is examined
-by RTEMS to determine when an outer most interrupt is being
-exited. Since the FVO is used by RTEMS for this purpose, the
-user application code MUST NOT modify this field.
-
-The following shows the Interrupt Stack Frame for
-MC68xxx CPU models with separate interrupt stacks:
-
-@ifset use-ascii
-@example
-@group
- +----------------------+
- | Status Register | 0x0
- +----------------------+
- | Program Counter High | 0x2
- +----------------------+
- | Program Counter Low | 0x4
- +----------------------+
- | Format/Vector Offset | 0x6
- +----------------------+
-@end group
-@end example
-@end ifset
-
-@ifset use-tex
-@sp 1
-@tex
-\centerline{\vbox{\offinterlineskip\halign{
-\strut\vrule#&
-\hbox to 2.00in{\enskip\hfil#\hfil}&
-\vrule#&
-\hbox to 0.50in{\enskip\hfil#\hfil}
-\cr
-\multispan{3}\hrulefill\cr
-& Status Register && 0x0\cr
-\multispan{3}\hrulefill\cr
-& Program Counter High && 0x2\cr
-\multispan{3}\hrulefill\cr
-& Program Counter Low && 0x4\cr
-\multispan{3}\hrulefill\cr
-& Format/Vector Offset && 0x6\cr
-\multispan{3}\hrulefill\cr
-}}\hfil}
-@end tex
-@end ifset
-
-@ifset use-html
-@html
-<CENTER>
- <TABLE COLS=2 WIDTH="40%" BORDER=2>
-<TR><TD ALIGN=center><STRONG>Status Register</STRONG></TD>
- <TD ALIGN=center>0x0</TD></TR>
-<TR><TD ALIGN=center><STRONG>Program Counter High</STRONG></TD>
- <TD ALIGN=center>0x2</TD></TR>
-<TR><TD ALIGN=center><STRONG>Program Counter Low</STRONG></TD>
- <TD ALIGN=center>0x4</TD></TR>
-<TR><TD ALIGN=center><STRONG>Format/Vector Offset</STRONG></TD>
- <TD ALIGN=center>0x6</TD></TR>
- </TABLE>
-</CENTER>
-@end html
-@end ifset
-
-@section Interrupt Levels
-
-Eight levels (0-7) of interrupt priorities are
-supported by MC68xxx family members with level seven (7) being
-the highest priority. Level zero (0) indicates that interrupts
-are fully enabled. Interrupt requests for interrupts with
-priorities less than or equal to the current interrupt mask
-level are ignored.
-
-Although RTEMS supports 256 interrupt levels, the
-MC68xxx family only supports eight. RTEMS interrupt levels 0
-through 7 directly correspond to MC68xxx interrupt levels. All
-other RTEMS interrupt levels are undefined and their behavior is
-unpredictable.
-
-@section Disabling of Interrupts by RTEMS
-
-During the execution of directive calls, critical
-sections of code may be executed. When these sections are
-encountered, RTEMS disables interrupts to level seven (7) before
-the execution of this section and restores them to the previous
-level upon completion of the section. RTEMS has been optimized
-to insure that interrupts are disabled for less than
-RTEMS_MAXIMUM_DISABLE_PERIOD microseconds on a
-RTEMS_MAXIMUM_DISABLE_PERIOD_MHZ Mhz MC68020 with
-zero wait states. These numbers will vary based the
-number of wait states and processor speed present on the target board.
-[NOTE: The maximum period with interrupts disabled is hand calculated. This
-calculation was last performed for Release
-RTEMS_RELEASE_FOR_MAXIMUM_DISABLE_PERIOD.]
-
-Non-maskable interrupts (NMI) cannot be disabled, and
-ISRs which execute at this level MUST NEVER issue RTEMS system
-calls. If a directive is invoked, unpredictable results may
-occur due to the inability of RTEMS to protect its critical
-sections. However, ISRs that make no system calls may safely
-execute as non-maskable interrupts.
-
-@section Interrupt Stack
-
-RTEMS allocates the interrupt stack from the
-Workspace Area. The amount of memory allocated for the
-interrupt stack is determined by the interrupt_stack_size field
-in the CPU Configuration Table. During the initialization
-process, RTEMS will install its interrupt stack.
-
-The MC68xxx port of RTEMS supports a software managed
-dedicated interrupt stack on those CPU models which do not
-support a separate interrupt stack in hardware.
-
-
diff --git a/doc/supplements/m68k/m68k.texi b/doc/supplements/m68k/m68k.texi
deleted file mode 100644
index 7930349a12..0000000000
--- a/doc/supplements/m68k/m68k.texi
+++ /dev/null
@@ -1,121 +0,0 @@
-\input texinfo @c -*-texinfo-*-
-@c %**start of header
-@setfilename c_m68k
-@syncodeindex vr fn
-@synindex ky cp
-@paragraphindent 0
-@c @smallbook
-@c %**end of header
-
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@c
-@c Master file for the Motorola MC68xxx Applications Supplement
-@c
-
-@include ../../common/setup.texi
-
-@ignore
-@ifinfo
-@format
-START-INFO-DIR-ENTRY
-* RTEMS Motorola MC68xxx Applications Supplement (m68k):
-END-INFO-DIR-ENTRY
-@end format
-@end ifinfo
-@end ignore
-
-@c
-@c Title Page Stuff
-@c
-
-@set edition @value{RTEMS-EDITION}
-@set version @value{RTEMS-VERSION}
-@set update-date @value{RTEMS-UPDATE-DATE}
-@set update-month @value{RTEMS-UPDATE-MONTH}
-
-@c
-@c I don't really like having a short title page. --joel
-@c
-@c @shorttitlepage RTEMS Motorola MC68xxx Applications Supplement
-
-@setchapternewpage odd
-@settitle RTEMS Motorola MC68xxx Applications Supplement
-@titlepage
-@finalout
-
-@title RTEMS Motorola MC68xxx Applications Supplement
-@subtitle Edition @value{edition}, for RTEMS @value{version}
-@sp 1
-@subtitle @value{update-month}
-@author On-Line Applications Research Corporation
-@page
-
-@include ../../common/cpright.texi
-@end titlepage
-
-@c This prevents a black box from being printed on "overflow" lines.
-@c The alternative is to rework a sentence to avoid this problem.
-
-@include preface.texi
-@include cpumodel.texi
-@include callconv.texi
-@include memmodel.texi
-@include intr.texi
-@include fatalerr.texi
-@include bsp.texi
-@include cputable.texi
-@include wksheets.texi
-@include timing.texi
-@include timeMVME136.texi
-@ifinfo
-@node Top, Preface, (dir), (dir)
-@top c_m68k
-
-This is the online version of the RTEMS Motorola MC68xxx
-Applications Supplement.
-
-@menu
-* Preface::
-* CPU Model Dependent Features::
-* Calling Conventions::
-* Memory Model::
-* Interrupt Processing::
-* Default Fatal Error Processing::
-* Board Support Packages::
-* Processor Dependent Information Table::
-* Memory Requirements::
-* Timing Specification::
-* MVME136 Timing Data::
-* Command and Variable Index::
-* Concept Index::
-@end menu
-
-@end ifinfo
-@c
-@c
-@c Need to copy the emacs stuff and "trailer stuff" (index, toc) into here
-@c
-
-@node Command and Variable Index, Concept Index, MVME136 Timing Data Rate Monotonic Manager, Top
-@unnumbered Command and Variable Index
-
-There are currently no Command and Variable Index entries.
-
-@c @printindex fn
-
-@node Concept Index, , Command and Variable Index, Top
-@unnumbered Concept Index
-
-There are currently no Concept Index entries.
-@c @printindex cp
-
-@contents
-@bye
-
diff --git a/doc/supplements/m68k/memmodel.t b/doc/supplements/m68k/memmodel.t
deleted file mode 100644
index b2c6114bb7..0000000000
--- a/doc/supplements/m68k/memmodel.t
+++ /dev/null
@@ -1,39 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Memory Model
-
-@section Introduction
-
-A processor may support any combination of memory
-models ranging from pure physical addressing to complex demand
-paged virtual memory systems. RTEMS supports a flat memory
-model which ranges contiguously over the processor's allowable
-address space. RTEMS does not support segmentation or virtual
-memory of any kind. The appropriate memory model for RTEMS
-provided by the targeted processor and related characteristics
-of that model are described in this chapter.
-
-@section Flat Memory Model
-
-The MC68xxx family supports a flat 32-bit address
-space with addresses ranging from 0x00000000 to 0xFFFFFFFF (4
-gigabytes). Each address is represented by a 32-bit value and
-is byte addressable. The address may be used to reference a
-single byte, word (2-bytes), or long word (4 bytes). Memory
-accesses within this address space are performed in big endian
-fashion by the processors in this family.
-
-Some of the MC68xxx family members such as the
-MC68020, MC68030, and MC68040 support virtual memory and
-segmentation. The MC68020 requires external hardware support
-such as the MC68851 Paged Memory Management Unit coprocessor
-which is typically used to perform address translations for
-these systems. RTEMS does not support virtual memory or
-segmentation on any of the MC68xxx family members.
-
diff --git a/doc/supplements/m68k/preface.texi b/doc/supplements/m68k/preface.texi
deleted file mode 100644
index 96b4fb413c..0000000000
--- a/doc/supplements/m68k/preface.texi
+++ /dev/null
@@ -1,60 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@ifinfo
-@node Preface, CPU Model Dependent Features, Top, Top
-@end ifinfo
-@unnumbered Preface
-
-The Real Time Executive for Multiprocessor Systems (RTEMS)
-is designed to be portable across multiple processor
-architectures. However, the nature of real-time systems makes
-it essential that the application designer understand certain
-processor dependent implementation details. These processor
-dependencies include calling convention, board support package
-issues, interrupt processing, exact RTEMS memory requirements,
-performance data, header files, and the assembly language
-interface to the executive.
-
-This document discusses the Motorola MC68xxx
-architecture dependencies in this port of RTEMS. The MC68xxx
-family has a wide variety of CPU models within it. The part
-numbers for these models are generally divided into MC680xx and
-MC683xx. The MC680xx models are more general purpose processors
-with no integrated peripherals. The MC683xx models, on the
-other hand, are more specialized and have a variety of
-peripherals on chip including sophisticated timers and serial
-communications controllers.
-
-It is highly recommended that the Motorola MC68xxx
-RTEMS application developer obtain and become familiar with the
-documentation for the processor being used as well as the
-documentation for the family as a whole.
-
-@subheading Architecture Documents
-
-For information on the Motorola MC68xxx architecture,
-refer to the following documents available from Motorola
-(@file{http//www.moto.com/}):
-
-@itemize @bullet
-@item @cite{M68000 Family Reference, Motorola, FR68K/D}.
-@end itemize
-
-@subheading MODEL SPECIFIC DOCUMENTS
-
-For information on specific processor models and
-their associated coprocessors, refer to the following documents:
-
-@itemize @bullet
-@item @cite{MC68020 User's Manual, Motorola, MC68020UM/AD}.
-
-@item @cite{MC68881/MC68882 Floating-Point Coprocessor User's
-Manual, Motorola, MC68881UM/AD}.
-@end itemize
-
diff --git a/doc/supplements/m68k/timeMVME136.t b/doc/supplements/m68k/timeMVME136.t
deleted file mode 100644
index 7686dfc5b8..0000000000
--- a/doc/supplements/m68k/timeMVME136.t
+++ /dev/null
@@ -1,108 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@include ../../common/timemac.texi
-@tex
-\global\advance \smallskipamount by -4pt
-@end tex
-
-@chapter MVME136 Timing Data
-
-@section Introduction
-
-The timing data for the MC68020 version of RTEMS is
-provided along with the target dependent aspects concerning the
-gathering of the timing data. The hardware platform used to
-gather the times is described to give the reader a better
-understanding of each directive time provided. Also, provided
-is a description of the interrupt latency and the context switch
-times as they pertain to the MC68020 version of RTEMS.
-
-@section Hardware Platform
-
-All times reported except for the maximum period
-interrupts are disabled by RTEMS were measured using a Motorola
-MVME135 CPU board. The MVME135 is a 20Mhz board with one wait
-state dynamic memory and a MC68881 numeric coprocessor. The
-Zilog 8036 countdown timer on this board was used to measure
-elapsed time with a one-half microsecond resolution. All
-sources of hardware interrupts were disabled, although the
-interrupt level of the MC68020 allows all interrupts.
-
-The maximum period interrupts are disabled was
-measured by summing the number of CPU cycles required by each
-assembly language instruction executed while interrupts were
-disabled. The worst case times of the MC68020 microprocessor
-were used for each instruction. Zero wait state memory was
-assumed. The total CPU cycles executed with interrupts
-disabled, including the instructions to disable and enable
-interrupts, was divided by 20 to simulate a 20Mhz MC68020. It
-should be noted that the worst case instruction times for the
-MC68020 assume that the internal cache is disabled and that no
-instructions overlap.
-
-@section Interrupt Latency
-
-The maximum period with interrupts disabled within
-RTEMS is less than RTEMS_MAXIMUM_DISABLE_PERIOD
-microseconds including the instructions
-which disable and re-enable interrupts. The time required for
-the MC68020 to vector an interrupt and for the RTEMS entry
-overhead before invoking the user's interrupt handler are a
-total of RTEMS_INTR_ENTRY_RETURNS_TO_PREEMPTING_TASK
-microseconds. These combine to yield a worst case
-interrupt latency of less than
-RTEMS_MAXIMUM_DISABLE_PERIOD + RTEMS_INTR_ENTRY_RETURNS_TO_PREEMPTING_TASK
-microseconds at 20Mhz. [NOTE: The maximum period with interrupts
-disabled was last determined for Release
-RTEMS_RELEASE_FOR_MAXIMUM_DISABLE_PERIOD.]
-
-It should be noted again that the maximum period with
-interrupts disabled within RTEMS is hand-timed and based upon
-worst case (i.e. CPU cache disabled and no instruction overlap)
-times for a 20Mhz MC68020. The interrupt vector and entry
-overhead time was generated on an MVME135 benchmark platform
-using the Multiprocessing Communications registers to generate
-as the interrupt source.
-
-@section Context Switch
-
-The RTEMS processor context switch time is RTEMS_NO_FP_CONTEXTS
-microseconds on the MVME135 benchmark platform when no floating
-point context is saved or restored. Additional execution time
-is required when a TASK_SWITCH user extension is configured.
-The use of the TASK_SWITCH extension is application dependent.
-Thus, its execution time is not considered part of the raw
-context switch time.
-
-Since RTEMS was designed specifically for embedded
-missile applications which are floating point intensive, the
-executive is optimized to avoid unnecessarily saving and
-restoring the state of the numeric coprocessor. The state of
-the numeric coprocessor is only saved when an FLOATING_POINT
-task is dispatched and that task was not the last task to
-utilize the coprocessor. In a system with only one
-FLOATING_POINT task, the state of the numeric coprocessor will
-never be saved or restored. When the first FLOATING_POINT task
-is dispatched, RTEMS does not need to save the current state of
-the numeric coprocessor.
-
-The exact amount of time required to save and restore
-floating point context is dependent on whether an MC68881 or
-MC68882 is being used as well as the state of the numeric
-coprocessor. These numeric coprocessors define three operating
-states: initialized, idle, and busy. RTEMS places the
-coprocessor in the initialized state when a task is started or
-restarted. Once the task has utilized the coprocessor, it is in
-the idle state when floating point instructions are not
-executing and the busy state when floating point instructions
-are executing. The state of the coprocessor is task specific.
-
-The following table summarizes the context switch
-times for the MVME135 benchmark platform:
-
diff --git a/doc/supplements/m68k/timedata.t b/doc/supplements/m68k/timedata.t
deleted file mode 100644
index d050497d41..0000000000
--- a/doc/supplements/m68k/timedata.t
+++ /dev/null
@@ -1,150 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@include ../../common/timemac.texi
-@tex
-\global\advance \smallskipamount by -4pt
-@end tex
-
-@ifinfo
-@node MVME136 Timing Data, MVME136 Timing Data Introduction, Timing Specification Terminology, Top
-@end ifinfo
-@chapter MVME136 Timing Data
-@ifinfo
-@menu
-* MVME136 Timing Data Introduction::
-* MVME136 Timing Data Hardware Platform::
-* MVME136 Timing Data Interrupt Latency::
-* MVME136 Timing Data Context Switch::
-* MVME136 Timing Data Directive Times::
-* MVME136 Timing Data Task Manager::
-* MVME136 Timing Data Interrupt Manager::
-* MVME136 Timing Data Clock Manager::
-* MVME136 Timing Data Timer Manager::
-* MVME136 Timing Data Semaphore Manager::
-* MVME136 Timing Data Message Manager::
-* MVME136 Timing Data Event Manager::
-* MVME136 Timing Data Signal Manager::
-* MVME136 Timing Data Partition Manager::
-* MVME136 Timing Data Region Manager::
-* MVME136 Timing Data Dual-Ported Memory Manager::
-* MVME136 Timing Data I/O Manager::
-* MVME136 Timing Data Rate Monotonic Manager::
-@end menu
-@end ifinfo
-
-@ifinfo
-@node MVME136 Timing Data Introduction, MVME136 Timing Data Hardware Platform, MVME136 Timing Data, MVME136 Timing Data
-@end ifinfo
-@section Introduction
-
-The timing data for the MC68020 version of RTEMS is
-provided along with the target dependent aspects concerning the
-gathering of the timing data. The hardware platform used to
-gather the times is described to give the reader a better
-understanding of each directive time provided. Also, provided
-is a description of the interrupt latency and the context switch
-times as they pertain to the MC68020 version of RTEMS.
-
-@ifinfo
-@node MVME136 Timing Data Hardware Platform, MVME136 Timing Data Interrupt Latency, MVME136 Timing Data Introduction, MVME136 Timing Data
-@end ifinfo
-@section Hardware Platform
-
-All times reported except for the maximum period
-interrupts are disabled by RTEMS were measured using a Motorola
-MVME135 CPU board. The MVME135 is a 20Mhz board with one wait
-state dynamic memory and a MC68881 numeric coprocessor. The
-Zilog 8036 countdown timer on this board was used to measure
-elapsed time with a one-half microsecond resolution. All
-sources of hardware interrupts were disabled, although the
-interrupt level of the MC68020 allows all interrupts.
-
-The maximum period interrupts are disabled was
-measured by summing the number of CPU cycles required by each
-assembly language instruction executed while interrupts were
-disabled. The worst case times of the MC68020 microprocessor
-were used for each instruction. Zero wait state memory was
-assumed. The total CPU cycles executed with interrupts
-disabled, including the instructions to disable and enable
-interrupts, was divided by 20 to simulate a 20Mhz MC68020. It
-should be noted that the worst case instruction times for the
-MC68020 assume that the internal cache is disabled and that no
-instructions overlap.
-
-@ifinfo
-@node MVME136 Timing Data Interrupt Latency, MVME136 Timing Data Context Switch, MVME136 Timing Data Hardware Platform, MVME136 Timing Data
-@end ifinfo
-@section Interrupt Latency
-
-The maximum period with interrupts disabled within
-RTEMS is less than RTEMS_MAXIMUM_DISABLE_PERIOD
-microseconds including the instructions
-which disable and re-enable interrupts. The time required for
-the MC68020 to vector an interrupt and for the RTEMS entry
-overhead before invoking the user's interrupt handler are a
-total of RTEMS_INTR_ENTRY_RETURNS_TO_PREEMPTING_TASK
-microseconds. These combine to yield a worst case
-interrupt latency of less than
-RTEMS_MAXIMUM_DISABLE_PERIOD + RTEMS_INTR_ENTRY_RETURNS_TO_PREEMPTING_TASK
-microseconds at 20Mhz. [NOTE: The maximum period with interrupts
-disabled was last determined for Release
-RTEMS_RELEASE_FOR_MAXIMUM_DISABLE_PERIOD.]
-
-It should be noted again that the maximum period with
-interrupts disabled within RTEMS is hand-timed and based upon
-worst case (i.e. CPU cache disabled and no instruction overlap)
-times for a 20Mhz MC68020. The interrupt vector and entry
-overhead time was generated on an MVME135 benchmark platform
-using the Multiprocessing Communications registers to generate
-as the interrupt source.
-
-@ifinfo
-@node MVME136 Timing Data Context Switch, MVME136 Timing Data Directive Times, MVME136 Timing Data Interrupt Latency, MVME136 Timing Data
-@end ifinfo
-@section Context Switch
-
-The RTEMS processor context switch time is RTEMS_NO_FP_CONTEXTS
-microseconds on the MVME135 benchmark platform when no floating
-point context is saved or restored. Additional execution time
-is required when a TASK_SWITCH user extension is configured.
-The use of the TASK_SWITCH extension is application dependent.
-Thus, its execution time is not considered part of the raw
-context switch time.
-
-Since RTEMS was designed specifically for embedded
-missile applications which are floating point intensive, the
-executive is optimized to avoid unnecessarily saving and
-restoring the state of the numeric coprocessor. The state of
-the numeric coprocessor is only saved when an FLOATING_POINT
-task is dispatched and that task was not the last task to
-utilize the coprocessor. In a system with only one
-FLOATING_POINT task, the state of the numeric coprocessor will
-never be saved or restored. When the first FLOATING_POINT task
-is dispatched, RTEMS does not need to save the current state of
-the numeric coprocessor.
-
-The exact amount of time required to save and restore
-floating point context is dependent on whether an MC68881 or
-MC68882 is being used as well as the state of the numeric
-coprocessor. These numeric coprocessors define three operating
-states: initialized, idle, and busy. RTEMS places the
-coprocessor in the initialized state when a task is started or
-restarted. Once the task has utilized the coprocessor, it is in
-the idle state when floating point instructions are not
-executing and the busy state when floating point instructions
-are executing. The state of the coprocessor is task specific.
-
-The following table summarizes the context switch
-times for the MVME135 benchmark platform:
-
-@include timetbl.texi
-
-@tex
-\global\advance \smallskipamount by 4pt
-@end tex
diff --git a/doc/supplements/mips64orion/BSP_TIMES b/doc/supplements/mips64orion/BSP_TIMES
deleted file mode 100644
index 82b8160aa5..0000000000
--- a/doc/supplements/mips64orion/BSP_TIMES
+++ /dev/null
@@ -1,247 +0,0 @@
-#
-# CPU MODEL/BSP Timing and Size Information
-#
-# $Id$
-#
-
-#
-# CPU Model Information
-#
-RTEMS_BSP BSPFORTIMES
-RTEMS_CPU_MODEL BSP_CPU_MODEL
-#
-# Interrupt Latency
-#
-# NOTE: In general, the text says it is hand-calculated to be
-# RTEMS_MAXIMUM_DISABLE_PERIOD at RTEMS_MAXIMUM_DISABLE_PERIOD_MHZ
-# Mhz and this was last calculated for Release
-# RTEMS_VERSION_FOR_MAXIMUM_DISABLE_PERIOD.
-#
-RTEMS_MAXIMUM_DISABLE_PERIOD TBD
-RTEMS_MAXIMUM_DISABLE_PERIOD_MHZ 20
-RTEMS_RELEASE_FOR_MAXIMUM_DISABLE_PERIOD 4.0.0
-#
-# Context Switch Times
-#
-RTEMS_NO_FP_CONTEXTS 35
-RTEMS_RESTORE_1ST_FP_TASK 39
-RTEMS_SAVE_INIT_RESTORE_INIT 66
-RTEMS_SAVE_IDLE_RESTORE_INIT 66
-RTEMS_SAVE_IDLE_RESTORE_IDLE 68
-#
-# Task Manager Times
-#
-RTEMS_TASK_CREATE_ONLY 148
-RTEMS_TASK_IDENT_ONLY 350
-RTEMS_TASK_START_ONLY 76
-RTEMS_TASK_RESTART_CALLING_TASK 95
-RTEMS_TASK_RESTART_SUSPENDED_RETURNS_TO_CALLER 89
-RTEMS_TASK_RESTART_BLOCKED_RETURNS_TO_CALLER 124
-RTEMS_TASK_RESTART_READY_RETURNS_TO_CALLER 92
-RTEMS_TASK_RESTART_SUSPENDED_PREEMPTS_CALLER 125
-RTEMS_TASK_RESTART_BLOCKED_PREEMPTS_CALLER 149
-RTEMS_TASK_RESTART_READY_PREEMPTS_CALLER 142
-RTEMS_TASK_DELETE_CALLING_TASK 170
-RTEMS_TASK_DELETE_SUSPENDED_TASK 138
-RTEMS_TASK_DELETE_BLOCKED_TASK 143
-RTEMS_TASK_DELETE_READY_TASK 144
-RTEMS_TASK_SUSPEND_CALLING_TASK 71
-RTEMS_TASK_SUSPEND_RETURNS_TO_CALLER 43
-RTEMS_TASK_RESUME_TASK_READIED_RETURNS_TO_CALLER 45
-RTEMS_TASK_RESUME_TASK_READIED_PREEMPTS_CALLER 67
-RTEMS_TASK_SET_PRIORITY_OBTAIN_CURRENT_PRIORITY 31
-RTEMS_TASK_SET_PRIORITY_RETURNS_TO_CALLER 64
-RTEMS_TASK_SET_PRIORITY_PREEMPTS_CALLER 106
-RTEMS_TASK_MODE_OBTAIN_CURRENT_MODE 14
-RTEMS_TASK_MODE_NO_RESCHEDULE 16
-RTEMS_TASK_MODE_RESCHEDULE_RETURNS_TO_CALLER 23
-RTEMS_TASK_MODE_RESCHEDULE_PREEMPTS_CALLER 60
-RTEMS_TASK_GET_NOTE_ONLY 33
-RTEMS_TASK_SET_NOTE_ONLY 33
-RTEMS_TASK_WAKE_AFTER_YIELD_RETURNS_TO_CALLER 16
-RTEMS_TASK_WAKE_AFTER_YIELD_PREEMPTS_CALLER 56
-RTEMS_TASK_WAKE_WHEN_ONLY 117
-#
-# Interrupt Manager
-#
-RTEMS_INTR_ENTRY_RETURNS_TO_NESTED 12
-RTEMS_INTR_ENTRY_RETURNS_TO_INTERRUPTED_TASK 9
-RTEMS_INTR_ENTRY_RETURNS_TO_PREEMPTING_TASK 9
-RTEMS_INTR_EXIT_RETURNS_TO_NESTED <1
-RTEMS_INTR_EXIT_RETURNS_TO_INTERRUPTED_TASK 8
-RTEMS_INTR_EXIT_RETURNS_TO_PREEMPTING_TASK 54
-#
-# Clock Manager
-#
-RTEMS_CLOCK_SET_ONLY 86
-RTEMS_CLOCK_GET_ONLY 1
-RTEMS_CLOCK_TICK_ONLY 17
-#
-# Timer Manager
-#
-RTEMS_TIMER_CREATE_ONLY 28
-RTEMS_TIMER_IDENT_ONLY 343
-RTEMS_TIMER_DELETE_INACTIVE 43
-RTEMS_TIMER_DELETE_ACTIVE 47
-RTEMS_TIMER_FIRE_AFTER_INACTIVE 58
-RTEMS_TIMER_FIRE_AFTER_ACTIVE 61
-RTEMS_TIMER_FIRE_WHEN_INACTIVE 88
-RTEMS_TIMER_FIRE_WHEN_ACTIVE 88
-RTEMS_TIMER_RESET_INACTIVE 54
-RTEMS_TIMER_RESET_ACTIVE 58
-RTEMS_TIMER_CANCEL_INACTIVE 31
-RTEMS_TIMER_CANCEL_ACTIVE 34
-#
-# Semaphore Manager
-#
-RTEMS_SEMAPHORE_CREATE_ONLY 60
-RTEMS_SEMAPHORE_IDENT_ONLY 367
-RTEMS_SEMAPHORE_DELETE_ONLY 58
-RTEMS_SEMAPHORE_OBTAIN_AVAILABLE 38
-RTEMS_SEMAPHORE_OBTAIN_NOT_AVAILABLE_NO_WAIT 38
-RTEMS_SEMAPHORE_OBTAIN_NOT_AVAILABLE_CALLER_BLOCKS 109
-RTEMS_SEMAPHORE_RELEASE_NO_WAITING_TASKS 44
-RTEMS_SEMAPHORE_RELEASE_TASK_READIED_RETURNS_TO_CALLER 66
-RTEMS_SEMAPHORE_RELEASE_TASK_READIED_PREEMPTS_CALLER 87
-#
-# Message Manager
-#
-RTEMS_MESSAGE_QUEUE_CREATE_ONLY 200
-RTEMS_MESSAGE_QUEUE_IDENT_ONLY 341
-RTEMS_MESSAGE_QUEUE_DELETE_ONLY 80
-RTEMS_MESSAGE_QUEUE_SEND_NO_WAITING_TASKS 97
-RTEMS_MESSAGE_QUEUE_SEND_TASK_READIED_RETURNS_TO_CALLER 101
-RTEMS_MESSAGE_QUEUE_SEND_TASK_READIED_PREEMPTS_CALLER 123
-RTEMS_MESSAGE_QUEUE_URGENT_NO_WAITING_TASKS 96
-RTEMS_MESSAGE_QUEUE_URGENT_TASK_READIED_RETURNS_TO_CALLER 101
-RTEMS_MESSAGE_QUEUE_URGENT_TASK_READIED_PREEMPTS_CALLER 123
-RTEMS_MESSAGE_QUEUE_BROADCAST_NO_WAITING_TASKS 53
-RTEMS_MESSAGE_QUEUE_BROADCAST_TASK_READIED_RETURNS_TO_CALLER 111
-RTEMS_MESSAGE_QUEUE_BROADCAST_TASK_READIED_PREEMPTS_CALLER 133
-RTEMS_MESSAGE_QUEUE_RECEIVE_AVAILABLE 79
-RTEMS_MESSAGE_QUEUE_RECEIVE_NOT_AVAILABLE_NO_WAIT 43
-RTEMS_MESSAGE_QUEUE_RECEIVE_NOT_AVAILABLE_CALLER_BLOCKS 114
-RTEMS_MESSAGE_QUEUE_FLUSH_NO_MESSAGES_FLUSHED 29
-RTEMS_MESSAGE_QUEUE_FLUSH_MESSAGES_FLUSHED 39
-#
-# Event Manager
-#
-RTEMS_EVENT_SEND_NO_TASK_READIED 24
-RTEMS_EVENT_SEND_TASK_READIED_RETURNS_TO_CALLER 60
-RTEMS_EVENT_SEND_TASK_READIED_PREEMPTS_CALLER 84
-RTEMS_EVENT_RECEIVE_OBTAIN_CURRENT_EVENTS 1
-RTEMS_EVENT_RECEIVE_AVAILABLE 28
-RTEMS_EVENT_RECEIVE_NOT_AVAILABLE_NO_WAIT 23
-RTEMS_EVENT_RECEIVE_NOT_AVAILABLE_CALLER_BLOCKS 84
-#
-# Signal Manager
-#
-RTEMS_SIGNAL_CATCH_ONLY 15
-RTEMS_SIGNAL_SEND_RETURNS_TO_CALLER 37
-RTEMS_SIGNAL_SEND_SIGNAL_TO_SELF 55
-RTEMS_SIGNAL_EXIT_ASR_OVERHEAD_RETURNS_TO_CALLING_TASK 37
-RTEMS_SIGNAL_EXIT_ASR_OVERHEAD_RETURNS_TO_PREEMPTING_TASK 54
-#
-# Partition Manager
-#
-RTEMS_PARTITION_CREATE_ONLY 70
-RTEMS_PARTITION_IDENT_ONLY 341
-RTEMS_PARTITION_DELETE_ONLY 42
-RTEMS_PARTITION_GET_BUFFER_AVAILABLE 35
-RTEMS_PARTITION_GET_BUFFER_NOT_AVAILABLE 33
-RTEMS_PARTITION_RETURN_BUFFER_ONLY 43
-#
-# Region Manager
-#
-RTEMS_REGION_CREATE_ONLY 63
-RTEMS_REGION_IDENT_ONLY 348
-RTEMS_REGION_DELETE_ONLY 39
-RTEMS_REGION_GET_SEGMENT_AVAILABLE 52
-RTEMS_REGION_GET_SEGMENT_NOT_AVAILABLE_NO_WAIT 49
-RTEMS_REGION_GET_SEGMENT_NOT_AVAILABLE_CALLER_BLOCKS 123
-RTEMS_REGION_RETURN_SEGMENT_NO_WAITING_TASKS 54
-RTEMS_REGION_RETURN_SEGMENT_TASK_READIED_RETURNS_TO_CALLER 114
-RTEMS_REGION_RETURN_SEGMENT_TASK_READIED_PREEMPTS_CALLER 136
-#
-# Dual-Ported Memory Manager
-#
-RTEMS_PORT_CREATE_ONLY 35
-RTEMS_PORT_IDENT_ONLY 340
-RTEMS_PORT_DELETE_ONLY 39
-RTEMS_PORT_INTERNAL_TO_EXTERNAL_ONLY 26
-RTEMS_PORT_EXTERNAL_TO_INTERNAL_ONLY 27
-#
-# IO Manager
-#
-RTEMS_IO_INITIALIZE_ONLY 4
-RTEMS_IO_OPEN_ONLY 2
-RTEMS_IO_CLOSE_ONLY 1
-RTEMS_IO_READ_ONLY 2
-RTEMS_IO_WRITE_ONLY 3
-RTEMS_IO_CONTROL_ONLY 2
-#
-# Rate Monotonic Manager
-#
-RTEMS_RATE_MONOTONIC_CREATE_ONLY 32
-RTEMS_RATE_MONOTONIC_IDENT_ONLY 341
-RTEMS_RATE_MONOTONIC_CANCEL_ONLY 39
-RTEMS_RATE_MONOTONIC_DELETE_ACTIVE 51
-RTEMS_RATE_MONOTONIC_DELETE_INACTIVE 48
-RTEMS_RATE_MONOTONIC_PERIOD_INITIATE_PERIOD_RETURNS_TO_CALLER 54
-RTEMS_RATE_MONOTONIC_PERIOD_CONCLUDE_PERIOD_CALLER_BLOCKS 74
-RTEMS_RATE_MONOTONIC_PERIOD_OBTAIN_STATUS 31
-#
-# Size Information
-#
-#
-# xxx alloted for numbers
-#
-RTEMS_DATA_SPACE 723
-RTEMS_MINIMUM_CONFIGURATION 18,980
-RTEMS_MAXIMUM_CONFIGURATION 36,438
-# x,xxx alloted for numbers
-RTEMS_CORE_CODE_SIZE 12,674
-RTEMS_INITIALIZATION_CODE_SIZE 970
-RTEMS_TASK_CODE_SIZE 3,562
-RTEMS_INTERRUPT_CODE_SIZE 54
-RTEMS_CLOCK_CODE_SIZE 334
-RTEMS_TIMER_CODE_SIZE 1,110
-RTEMS_SEMAPHORE_CODE_SIZE 1,632
-RTEMS_MESSAGE_CODE_SIZE 1,754
-RTEMS_EVENT_CODE_SIZE 1,000
-RTEMS_SIGNAL_CODE_SIZE 418
-RTEMS_PARTITION_CODE_SIZE 1,164
-RTEMS_REGION_CODE_SIZE 1,494
-RTEMS_DPMEM_CODE_SIZE 724
-RTEMS_IO_CODE_SIZE 686
-RTEMS_FATAL_ERROR_CODE_SIZE 24
-RTEMS_RATE_MONOTONIC_CODE_SIZE 1,212
-RTEMS_MULTIPROCESSING_CODE_SIZE 6.952
-# xxx alloted for numbers
-RTEMS_TIMER_CODE_OPTSIZE 184
-RTEMS_SEMAPHORE_CODE_OPTSIZE 172
-RTEMS_MESSAGE_CODE_OPTSIZE 288
-RTEMS_EVENT_CODE_OPTSIZE 56
-RTEMS_SIGNAL_CODE_OPTSIZE 56
-RTEMS_PARTITION_CODE_OPTSIZE 132
-RTEMS_REGION_CODE_OPTSIZE 160
-RTEMS_DPMEM_CODE_OPTSIZE 132
-RTEMS_IO_CODE_OPTSIZE 00
-RTEMS_RATE_MONOTONIC_CODE_OPTSIZE 184
-RTEMS_MULTIPROCESSING_CODE_OPTSIZE 332
-# xxx alloted for numbers
-RTEMS_BYTES_PER_TASK 400
-RTEMS_BYTES_PER_TIMER 68
-RTEMS_BYTES_PER_SEMAPHORE 124
-RTEMS_BYTES_PER_MESSAGE_QUEUE 148
-RTEMS_BYTES_PER_REGION 144
-RTEMS_BYTES_PER_PARTITION 56
-RTEMS_BYTES_PER_PORT 36
-RTEMS_BYTES_PER_PERIOD 36
-RTEMS_BYTES_PER_EXTENSION 64
-RTEMS_BYTES_PER_FP_TASK 332
-RTEMS_BYTES_PER_NODE 48
-RTEMS_BYTES_PER_GLOBAL_OBJECT 20
-RTEMS_BYTES_PER_PROXY 124
-# x,xxx alloted for numbers
-RTEMS_BYTES_OF_FIXED_SYSTEM_REQUIREMENTS 8,872
diff --git a/doc/supplements/mips64orion/Makefile b/doc/supplements/mips64orion/Makefile
deleted file mode 100644
index 0895106a7e..0000000000
--- a/doc/supplements/mips64orion/Makefile
+++ /dev/null
@@ -1,161 +0,0 @@
-#
-# COPYRIGHT (c) 1988-1999.
-# On-Line Applications Research Corporation (OAR).
-# All rights reserved.
-#
-# $Id$
-#
-
-PROJECT=mips64orion
-
-include ../../Make.config
-
-REPLACE=../../tools/word-replace
-
-all: html info ps pdf
-
-dirs:
- $(make-dirs)
-
-COMMON_FILES=../../common/cpright.texi ../../common/setup.texi
-
-GENERATED_FILES=\
- cpumodel.texi callconv.texi memmodel.texi intr.texi fatalerr.texi \
- bsp.texi cputable.texi wksheets.texi timing.texi timeBSP.texi
-
-FILES= $(PROJECT).texi preface.texi \
- $(COMMON_FILES) $(GENERATED_FILES)
-
-info: dirs c_$(PROJECT)
- @echo NEED TO INSTALL THE INFO FILES
- #cp c_$(PROJECT) c_$(PROJECT)-* $(INFO_INSTALL)
- #cp c_$(PROJECT) c_$(PROJECT)-* $(INFO_INSTALL)
-
-c_$(PROJECT): $(FILES)
- $(MAKEINFO) $(PROJECT).texi
-
-dvi: dirs $(PROJECT).dvi
-ps: dirs $(PROJECT).ps
-pdf: dirs $(PROJECT).pdf
-
-$(PROJECT).pdf: $(FILES)
- $(TEXI2PDF) $(PROJECT).texi
- cp $(PROJECT).pdf $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).ps: $(PROJECT).dvi
- dvips -o $(PROJECT).ps $(PROJECT).dvi
- cp $(PROJECT).ps $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).dvi: $(FILES)
- $(TEXI2DVI) $(PROJECT).texi
- cp $(PROJECT).dvi $(WWW_INSTALL)/$(PROJECT)
-
-html: dirs $(FILES)
- -mkdir -p $(WWW_INSTALL)/$(PROJECT)
- $(TEXI2WWW) $(TEXI2WWW_ARGS) -dir $(WWW_INSTALL)/$(PROJECT) \
- $(PROJECT).texi
-
-clean:
- rm -f *.o $(PROG) *.txt core $(PROJECT).pdf
- rm -f *.dvi *.ps *.log *.aux *.cp *.fn *.ky *.pg *.toc *.tp *.vr $(BASE)
- rm -f $(PROJECT) $(PROJECT)-*
- rm -f c_$(PROJECT) c_$(PROJECT)-*
- rm -f wksheets.t wksheets_NOTIMES.t
- rm -f intr.t
- rm -f timeBSP_.t timing.t
- rm -f *.fixed _* $(GENERATED_FILES)
- rm -f timeBSP_.t timeBSP_.texi
-
-#
-# Chapters which get automatic processing
-#
-cpumodel.texi: cpumodel.t Makefile
- $(BMENU) -p "Preface" \
- -u "Top" \
- -n "Calling Conventions" ${*}.t
-
-callconv.texi: callconv.t Makefile
- $(BMENU) -p "CPU Model Dependent Features Another Optional Feature" \
- -u "Top" \
- -n "Memory Model" ${*}.t
-
-memmodel.texi: memmodel.t Makefile
- $(BMENU) -p "Calling Conventions User-Provided Routines" \
- -u "Top" \
- -n "Interrupt Processing" ${*}.t
-
-# Interrupt Chapter:
-# 1. Replace Times and Sizes
-# 2. Build Node Structure
-intr.t: intr_NOTIMES.t BSP_TIMES
- ${REPLACE} -p BSP_TIMES intr_NOTIMES.t
- mv intr_NOTIMES.t.fixed intr.t
-
-intr.texi: intr.t Makefile
- $(BMENU) -p "Memory Model Flat Memory Model" \
- -u "Top" \
- -n "Default Fatal Error Processing" ${*}.t
-
-fatalerr.texi: fatalerr.t Makefile
- $(BMENU) -p "Interrupt Processing Interrupt Stack" \
- -u "Top" \
- -n "Board Support Packages" ${*}.t
-
-bsp.texi: bsp.t Makefile
- $(BMENU) -p "Default Fatal Error Processing Default Fatal Error Handler Operations" \
- -u "Top" \
- -n "Processor Dependent Information Table" ${*}.t
-
-cputable.texi: cputable.t Makefile
- $(BMENU) -p "Board Support Packages Processor Initialization" \
- -u "Top" \
- -n "Memory Requirements" ${*}.t
-
-# Worksheets Chapter:
-# 1. Copy the Shared File
-# 2. Replace Times and Sizes
-# 3. Build Node Structure
-
-wksheets_NOTIMES.t: ../../common/wksheets.t
- cp ../../common/wksheets.t wksheets_NOTIMES.t
-
-wksheets.t: wksheets_NOTIMES.t BSP_TIMES
- ${REPLACE} -p BSP_TIMES wksheets_NOTIMES.t
- mv wksheets_NOTIMES.t.fixed wksheets.t
-
-wksheets.texi: wksheets.t Makefile
- $(BMENU) -p "Processor Dependent Information Table CPU Dependent Information Table" \
- -u "Top" \
- -n "Timing Specification" ${*}.t
-
-# Timing Specification Chapter:
-# 1. Copy the Shared File
-# 3. Build Node Structure
-
-timing.t: ../../common/timing.t
- cp ../../common/timing.t timing.t
-
-timing.texi: timing.t Makefile
- $(BMENU) -p "Memory Requirements RTEMS RAM Workspace Worksheet" \
- -u "Top" \
- -n "BSP_FOR_TIMES Timing Data" ${*}.t
-
-# Timing Data for BSP Chapter:
-# 1. Copy the Shared File
-# 2. Replace Times and Sizes
-# 3. Build Node Structure
-
-timeBSP_.t: ../../common/timetbl.t timeBSP.t Makefile
- cat timeBSP.t ../../common/timetbl.t >timeBSP_.t
- @echo >>timeBSP_.t
- @echo "@tex" >>timeBSP_.t
- @echo "\\global\\advance \\smallskipamount by 4pt" >>timeBSP_.t
- @echo "@end tex" >>timeBSP_.t
- ${REPLACE} -p BSP_TIMES timeBSP_.t
- mv timeBSP_.t.fixed timeBSP_.t
-
-timeBSP.texi: timeBSP_.t Makefile
- $(BMENU) -p "Timing Specification Terminology" \
- -u "Top" \
- -n "Command and Variable Index" timeBSP_.t
- mv timeBSP_.texi timeBSP.texi
diff --git a/doc/supplements/mips64orion/bsp.t b/doc/supplements/mips64orion/bsp.t
deleted file mode 100644
index a19aa06129..0000000000
--- a/doc/supplements/mips64orion/bsp.t
+++ /dev/null
@@ -1,93 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Board Support Packages
-
-@section Introduction
-
-An RTEMS Board Support Package (BSP) must be designed
-to support a particular processor and target board combination.
-This chapter presents a discussion of XXX specific BSP
-issues. For more information on developing a BSP, refer to the
-chapter titled Board Support Packages in the RTEMS
-Applications User's Guide.
-
-@section System Reset
-
-An RTEMS based application is initiated or
-re-initiated when the XXX processor is reset. When the
-XXX is reset, the processor performs the following actions:
-
-@itemize @bullet
-@item The tracing bits of the status register are cleared to
-disable tracing.
-
-@item The supervisor interrupt state is entered by setting the
-supervisor (S) bit and clearing the master/interrupt (M) bit of
-the status register.
-
-@item The interrupt mask of the status register is set to
-level 7 to effectively disable all maskable interrupts.
-
-@item The vector base register (VBR) is set to zero.
-
-@item The cache control register (CACR) is set to zero to
-disable and freeze the processor cache.
-
-@item The interrupt stack pointer (ISP) is set to the value
-stored at vector 0 (bytes 0-3) of the exception vector table
-(EVT).
-
-@item The program counter (PC) is set to the value stored at
-vector 1 (bytes 4-7) of the EVT.
-
-@item The processor begins execution at the address stored in
-the PC.
-@end itemize
-
-@section Processor Initialization
-
-The address of the application's initialization code
-should be stored in the first vector of the EVT which will allow
-the immediate vectoring to the application code. If the
-application requires that the VBR be some value besides zero,
-then it should be set to the required value at this point. All
-tasks share the same XXX's VBR value. Because interrupts
-are enabled automatically by RTEMS as part of the initialize
-executive directive, the VBR MUST be set before this directive
-is invoked to insure correct interrupt vectoring. If processor
-caching is to be utilized, then it should be enabled during the
-reset application initialization code.
-
-In addition to the requirements described in the
-Board Support Packages chapter of the Applications User's
-Manual for the reset code which is executed before the call to
-initialize executive, the XXX version has the following
-specific requirements:
-
-@itemize @bullet
-@item Must leave the S bit of the status register set so that
-the XXX remains in the supervisor state.
-
-@item Must set the M bit of the status register to remove the
-XXX from the interrupt state.
-
-@item Must set the master stack pointer (MSP) such that a
-minimum stack size of MINIMUM_STACK_SIZE bytes is provided for
-the initialize executive directive.
-
-@item Must initialize the XXX's vector table.
-@end itemize
-
-Note that the BSP is not responsible for allocating
-or installing the interrupt stack. RTEMS does this
-automatically as part of initialization. If the BSP does not
-install an interrupt stack and -- for whatever reason -- an
-interrupt occurs before initialize_executive is invoked, then
-the results are unpredictable.
-
diff --git a/doc/supplements/mips64orion/callconv.t b/doc/supplements/mips64orion/callconv.t
deleted file mode 100644
index 70d74e3808..0000000000
--- a/doc/supplements/mips64orion/callconv.t
+++ /dev/null
@@ -1,92 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Calling Conventions
-
-@section Introduction
-
-Each high-level language compiler generates
-subroutine entry and exit code based upon a set of rules known
-as the compiler's calling convention. These rules address the
-following issues:
-
-@itemize @bullet
-@item register preservation and usage
-@item parameter passing
-@item call and return mechanism
-@end itemize
-
-A compiler's calling convention is of importance when
-interfacing to subroutines written in another language either
-assembly or high-level. Even when the high-level language and
-target processor are the same, different compilers may use
-different calling conventions. As a result, calling conventions
-are both processor and compiler dependent.
-
-@section Processor Background
-
-The MC68xxx architecture supports a simple yet
-effective call and return mechanism. A subroutine is invoked
-via the branch to subroutine (@code{XXX}) or the jump to subroutine
-(@code{XXX}) instructions. These instructions push the return address
-on the current stack. The return from subroutine (@code{XXX})
-instruction pops the return address off the current stack and
-transfers control to that instruction. It is is important to
-note that the XXX call and return mechanism does not
-automatically save or restore any registers. It is the
-responsibility of the high-level language compiler to define the
-register preservation and usage convention.
-
-@section Calling Mechanism
-
-All RTEMS directives are invoked using either a @code{XXX}
-or @code{XXX} instruction and return to the user application via the
-@code{XXX} instruction.
-
-@section Register Usage
-
-As discussed above, the @code{XXX} and @code{XXX} instructions do
-not automatically save any registers. RTEMS uses the registers
-@b{D0}, @b{D1}, @b{A0}, and @b{A1} as scratch registers. These registers are
-not preserved by RTEMS directives therefore, the contents of
-these registers should not be assumed upon return from any RTEMS
-directive.
-
-@section Parameter Passing
-
-RTEMS assumes that arguments are placed on the
-current stack before the directive is invoked via the @code{XXX} or @code{XXX}
-instruction. The first argument is assumed to be closest to the
-return address on the stack. This means that the first argument
-of the C calling sequence is pushed last. The following
-pseudo-code illustrates the typical sequence used to call a
-RTEMS directive with three (3) arguments:
-
-@example
-@group
-push third argument
-push second argument
-push first argument
-invoke directive
-remove arguments from the stack
-@end group
-@end example
-
-The arguments to RTEMS are typically pushed onto the
-stack using a move instruction with a pre-decremented stack
-pointer as the destination. These arguments must be removed
-from the stack after control is returned to the caller. This
-removal is typically accomplished by adding the size of the
-argument list in bytes to the current stack pointer.
-
-@section User-Provided Routines
-
-All user-provided routines invoked by RTEMS, such as
-user extensions, device drivers, and MPCI routines, must also
-adhere to these calling conventions.
-
diff --git a/doc/supplements/mips64orion/cpumodel.t b/doc/supplements/mips64orion/cpumodel.t
deleted file mode 100644
index f709168913..0000000000
--- a/doc/supplements/mips64orion/cpumodel.t
+++ /dev/null
@@ -1,68 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter CPU Model Dependent Features
-
-@section Introduction
-
-Microprocessors are generally classified into
-families with a variety of CPU models or implementations within
-that family. Within a processor family, there is a high level
-of binary compatibility. This family may be based on either an
-architectural specification or on maintaining compatibility with
-a popular processor. Recent microprocessor families such as the
-SPARC or PA-RISC are based on an architectural specification
-which is independent or any particular CPU model or
-implementation. Older families such as the M68xxx and the iX86
-evolved as the manufacturer strived to produce higher
-performance processor models which maintained binary
-compatibility with older models.
-
-RTEMS takes advantage of the similarity of the
-various models within a CPU family. Although the models do vary
-in significant ways, the high level of compatibility makes it
-possible to share the bulk of the CPU dependent executive code
-across the entire family. Each processor family supported by
-RTEMS has a list of features which vary between CPU models
-within a family. For example, the most common model dependent
-feature regardless of CPU family is the presence or absence of a
-floating point unit or coprocessor. When defining the list of
-features present on a particular CPU model, one simply notes
-that floating point hardware is or is not present and defines a
-single constant appropriately. Conditional compilation is
-utilized to include the appropriate source code for this CPU
-model's feature set. It is important to note that this means
-that RTEMS is thus compiled using the appropriate feature set
-and compilation flags optimal for this CPU model used. The
-alternative would be to generate a binary which would execute on
-all family members using only the features which were always
-present.
-
-This chapter presents the set of features which vary
-across SPARC implementations and are of importance to RTEMS.
-The set of CPU model feature macros are defined in the file
-c/src/exec/score/cpu/XXX/XXX.h based upon the particular CPU
-model defined on the compilation command line.
-
-@section CPU Model Name
-
-The macro CPU_MODEL_NAME is a string which designates
-the name of this CPU model. For example, for the MODEL
-processor, this macro is set to the string "XXX".
-
-@section Floating Point Unit
-
-The macro XXX_HAS_FPU is set to 1 to indicate that
-this CPU model has a hardware floating point unit and 0
-otherwise. It does not matter whether the hardware floating
-point support is incorporated on-chip or is an external
-coprocessor.
-
-@section Another Optional Feature
-
-The macro XXX
diff --git a/doc/supplements/mips64orion/cputable.t b/doc/supplements/mips64orion/cputable.t
deleted file mode 100644
index 1a9f1e50d9..0000000000
--- a/doc/supplements/mips64orion/cputable.t
+++ /dev/null
@@ -1,109 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Processor Dependent Information Table
-
-@section Introduction
-
-Any highly processor dependent information required
-to describe a processor to RTEMS is provided in the CPU
-Dependent Information Table. This table is not required for all
-processors supported by RTEMS. This chapter describes the
-contents, if any, for a particular processor type.
-
-@section CPU Dependent Information Table
-
-The XXX version of the RTEMS CPU Dependent
-Information Table contains the information required to interface
-a Board Support Package and RTEMS on the XXX. This
-information is provided to allow RTEMS to interoperate
-effectively with the BSP. The C structure definition is given
-here:
-
-@example
-@group
-typedef struct @{
- void (*pretasking_hook)( void );
- void (*predriver_hook)( void );
- void (*postdriver_hook)( void );
- void (*idle_task)( void );
- boolean do_zero_of_workspace;
- unsigned32 idle_task_stack_size;
- unsigned32 interrupt_stack_size;
- unsigned32 extra_mpci_receive_server_stack;
- void * (*stack_allocate_hook)( unsigned32 );
- void (*stack_free_hook)( void* );
- /* end of fields required on all CPUs */
-
- /* XXX CPU family dependent stuff */
-@} rtems_cpu_table;
-@end group
-@end example
-
-@table @code
-@item pretasking_hook
-is the address of the user provided routine which is invoked
-once RTEMS APIs are initialized. This routine will be invoked
-before any system tasks are created. Interrupts are disabled.
-This field may be NULL to indicate that the hook is not utilized.
-
-@item predriver_hook
-is the address of the user provided
-routine that is invoked immediately before the
-the device drivers and MPCI are initialized. RTEMS
-initialization is complete but interrupts and tasking are disabled.
-This field may be NULL to indicate that the hook is not utilized.
-
-@item postdriver_hook
-is the address of the user provided
-routine that is invoked immediately after the
-the device drivers and MPCI are initialized. RTEMS
-initialization is complete but interrupts and tasking are disabled.
-This field may be NULL to indicate that the hook is not utilized.
-
-@item idle_task
-is the address of the optional user
-provided routine which is used as the system's IDLE task. If
-this field is not NULL, then the RTEMS default IDLE task is not
-used. This field may be NULL to indicate that the default IDLE
-is to be used.
-
-@item do_zero_of_workspace
-indicates whether RTEMS should
-zero the Workspace as part of its initialization. If set to
-TRUE, the Workspace is zeroed. Otherwise, it is not.
-
-@item idle_task_stack_size
-is the size of the RTEMS idle task stack in bytes.
-If this number is less than MINIMUM_STACK_SIZE, then the
-idle task's stack will be MINIMUM_STACK_SIZE in byte.
-
-@item interrupt_stack_size
-is the size of the RTEMS
-allocated interrupt stack in bytes. This value must be at least
-as large as MINIMUM_STACK_SIZE.
-
-@item extra_mpci_receive_server_stack
-is the extra stack space allocated for the RTEMS MPCI receive server task
-in bytes. The MPCI receive server may invoke nearly all directives and
-may require extra stack space on some targets.
-
-@item stack_allocate_hook
-is the address of the optional user provided routine which allocates
-memory for task stacks. If this hook is not NULL, then a stack_free_hook
-must be provided as well.
-
-@item stack_free_hook
-is the address of the optional user provided routine which frees
-memory for task stacks. If this hook is not NULL, then a stack_allocate_hook
-must be provided as well.
-
-@item XXX
-is where the CPU family dependent stuff goes.
-
-@end table
diff --git a/doc/supplements/mips64orion/fatalerr.t b/doc/supplements/mips64orion/fatalerr.t
deleted file mode 100644
index 0871fa3cb9..0000000000
--- a/doc/supplements/mips64orion/fatalerr.t
+++ /dev/null
@@ -1,31 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Default Fatal Error Processing
-
-@section Introduction
-
-Upon detection of a fatal error by either the
-application or RTEMS the fatal error manager is invoked. The
-fatal error manager will invoke the user-supplied fatal error
-handlers. If no user-supplied handlers are configured, the
-RTEMS provided default fatal error handler is invoked. If the
-user-supplied fatal error handlers return to the executive the
-default fatal error handler is then invoked. This chapter
-describes the precise operations of the default fatal error
-handler.
-
-@section Default Fatal Error Handler Operations
-
-The default fatal error handler which is invoked by
-the @code{rtems_fatal_error_occurred} directive when there is
-no user handler configured or the user handler returns control to
-RTEMS. The default fatal error handler disables processor interrupts,
-places the error code in @b{XXX}, and executes a @code{XXX}
-instruction to simulate a halt processor instruction.
-
diff --git a/doc/supplements/mips64orion/intr_NOTIMES.t b/doc/supplements/mips64orion/intr_NOTIMES.t
deleted file mode 100644
index 074420f2c9..0000000000
--- a/doc/supplements/mips64orion/intr_NOTIMES.t
+++ /dev/null
@@ -1,196 +0,0 @@
-@c
-@c Interrupt Stack Frame Picture
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Interrupt Processing
-
-@section Introduction
-
-Different types of processors respond to the
-occurrence of an interrupt in its own unique fashion. In
-addition, each processor type provides a control mechanism to
-allow for the proper handling of an interrupt. The processor
-dependent response to the interrupt modifies the current
-execution state and results in a change in the execution stream.
-Most processors require that an interrupt handler utilize some
-special control mechanisms to return to the normal processing
-stream. Although RTEMS hides many of the processor dependent
-details of interrupt processing, it is important to understand
-how the RTEMS interrupt manager is mapped onto the processor's
-unique architecture. Discussed in this chapter are the XXX's
-interrupt response and control mechanisms as they pertain to
-RTEMS.
-
-@section Vectoring of an Interrupt Handler
-
-Depending on whether or not the particular CPU
-supports a separate interrupt stack, the XXX family has two
-different interrupt handling models.
-
-@subsection Models Without Separate Interrupt Stacks
-
-Upon receipt of an interrupt the XXX family
-members without separate interrupt stacks automatically perform
-the following actions:
-
-@itemize @bullet
-@item To Be Written
-@end itemize
-
-@subsection Models With Separate Interrupt Stacks
-
-Upon receipt of an interrupt the XXX family
-members with separate interrupt stacks automatically perform the
-following actions:
-
-@itemize @bullet
-@item saves the current status register (SR),
-
-@item clears the master/interrupt (M) bit of the SR to
-indicate the switch from master state to interrupt state,
-
-@item sets the privilege mode to supervisor,
-
-@item suppresses tracing,
-
-@item sets the interrupt mask level equal to the level of the
-interrupt being serviced,
-
-@item pushes an interrupt stack frame (ISF), which includes
-the program counter (PC), the status register (SR), and the
-format/exception vector offset (FVO) word, onto the supervisor
-and interrupt stacks,
-
-@item switches the current stack to the interrupt stack and
-vectors to an interrupt service routine (ISR). If the ISR was
-installed with the interrupt_catch directive, then the RTEMS
-interrupt handler will begin execution. The RTEMS interrupt
-handler saves all registers which are not preserved according to
-the calling conventions and invokes the application's ISR.
-@end itemize
-
-A nested interrupt is processed similarly by these
-CPU models with the exception that only a single ISF is placed
-on the interrupt stack and the current stack need not be
-switched.
-
-The FVO word in the Interrupt Stack Frame is examined
-by RTEMS to determine when an outer most interrupt is being
-exited. Since the FVO is used by RTEMS for this purpose, the
-user application code MUST NOT modify this field.
-
-The following shows the Interrupt Stack Frame for
-XXX CPU models with separate interrupt stacks:
-
-@ifset use-ascii
-@example
-@group
- +----------------------+
- | Status Register | 0x0
- +----------------------+
- | Program Counter High | 0x2
- +----------------------+
- | Program Counter Low | 0x4
- +----------------------+
- | Format/Vector Offset | 0x6
- +----------------------+
-@end group
-@end example
-@end ifset
-
-@ifset use-tex
-@sp 1
-@tex
-\centerline{\vbox{\offinterlineskip\halign{
-\strut\vrule#&
-\hbox to 2.00in{\enskip\hfil#\hfil}&
-\vrule#&
-\hbox to 0.50in{\enskip\hfil#\hfil}
-\cr
-\multispan{3}\hrulefill\cr
-& Status Register && 0x0\cr
-\multispan{3}\hrulefill\cr
-& Program Counter High && 0x2\cr
-\multispan{3}\hrulefill\cr
-& Program Counter Low && 0x4\cr
-\multispan{3}\hrulefill\cr
-& Format/Vector Offset && 0x6\cr
-\multispan{3}\hrulefill\cr
-}}\hfil}
-@end tex
-@end ifset
-
-@ifset use-html
-@html
-<CENTER>
- <TABLE COLS=2 WIDTH="40%" BORDER=2>
-<TR><TD ALIGN=center><STRONG>Status Register</STRONG></TD>
- <TD ALIGN=center>0x0</TD></TR>
-<TR><TD ALIGN=center><STRONG>Program Counter High</STRONG></TD>
- <TD ALIGN=center>0x2</TD></TR>
-<TR><TD ALIGN=center><STRONG>Program Counter Low</STRONG></TD>
- <TD ALIGN=center>0x4</TD></TR>
-<TR><TD ALIGN=center><STRONG>Format/Vector Offset</STRONG></TD>
- <TD ALIGN=center>0x6</TD></TR>
- </TABLE>
-</CENTER>
-@end html
-@end ifset
-
-@section Interrupt Levels
-
-Eight levels (0-7) of interrupt priorities are
-supported by XXX family members with level seven (7) being
-the highest priority. Level zero (0) indicates that interrupts
-are fully enabled. Interrupt requests for interrupts with
-priorities less than or equal to the current interrupt mask
-level are ignored.
-
-Although RTEMS supports 256 interrupt levels, the
-XXX family only supports eight. RTEMS interrupt levels 0
-through 7 directly correspond to XXX interrupt levels. All
-other RTEMS interrupt levels are undefined and their behavior is
-unpredictable.
-
-@section Disabling of Interrupts by RTEMS
-
-During the execution of directive calls, critical
-sections of code may be executed. When these sections are
-encountered, RTEMS disables interrupts to level seven (7) before
-the execution of this section and restores them to the previous
-level upon completion of the section. RTEMS has been optimized
-to insure that interrupts are disabled for less than
-RTEMS_MAXIMUM_DISABLE_PERIOD microseconds on a
-RTEMS_MAXIMUM_DISABLE_PERIOD_MHZ Mhz XXX with
-zero wait states. These numbers will vary based the
-number of wait states and processor speed present on the target board.
-[NOTE: The maximum period with interrupts disabled is hand calculated. This
-calculation was last performed for Release
-RTEMS_RELEASE_FOR_MAXIMUM_DISABLE_PERIOD.]
-
-Non-maskable interrupts (NMI) cannot be disabled, and
-ISRs which execute at this level MUST NEVER issue RTEMS system
-calls. If a directive is invoked, unpredictable results may
-occur due to the inability of RTEMS to protect its critical
-sections. However, ISRs that make no system calls may safely
-execute as non-maskable interrupts.
-
-@section Interrupt Stack
-
-RTEMS allocates the interrupt stack from the
-Workspace Area. The amount of memory allocated for the
-interrupt stack is determined by the interrupt_stack_size field
-in the CPU Configuration Table. During the initialization
-process, RTEMS will install its interrupt stack.
-
-The XXX port of RTEMS supports a software managed
-dedicated interrupt stack on those CPU models which do not
-support a separate interrupt stack in hardware.
-
-
diff --git a/doc/supplements/mips64orion/memmodel.t b/doc/supplements/mips64orion/memmodel.t
deleted file mode 100644
index a0ced50355..0000000000
--- a/doc/supplements/mips64orion/memmodel.t
+++ /dev/null
@@ -1,39 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Memory Model
-
-@section Introduction
-
-A processor may support any combination of memory
-models ranging from pure physical addressing to complex demand
-paged virtual memory systems. RTEMS supports a flat memory
-model which ranges contiguously over the processor's allowable
-address space. RTEMS does not support segmentation or virtual
-memory of any kind. The appropriate memory model for RTEMS
-provided by the targeted processor and related characteristics
-of that model are described in this chapter.
-
-@section Flat Memory Model
-
-The XXX family supports a flat 32-bit address
-space with addresses ranging from 0x00000000 to 0xFFFFFFFF (4
-gigabytes). Each address is represented by a 32-bit value and
-is byte addressable. The address may be used to reference a
-single byte, word (2-bytes), or long word (4 bytes). Memory
-accesses within this address space are performed in big endian
-fashion by the processors in this family.
-
-Some of the XXX family members such as the
-XXX, XXX, and XXX support virtual memory and
-segmentation. The XXX requires external hardware support
-such as the XXX Paged Memory Management Unit coprocessor
-which is typically used to perform address translations for
-these systems. RTEMS does not support virtual memory or
-segmentation on any of the XXX family members.
-
diff --git a/doc/supplements/mips64orion/mips64orion.texi b/doc/supplements/mips64orion/mips64orion.texi
deleted file mode 100644
index e6d72a6e8f..0000000000
--- a/doc/supplements/mips64orion/mips64orion.texi
+++ /dev/null
@@ -1,120 +0,0 @@
-\input texinfo @c -*-texinfo-*-
-@c %**start of header
-@setfilename c_mips64orion
-@syncodeindex vr fn
-@synindex ky cp
-@paragraphindent 0
-@c @smallbook
-@c %**end of header
-
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@c
-@c Master file for the Template Applications Supplement
-@c
-
-@include ../../common/setup.texi
-
-@ignore
-@ifinfo
-@format
-START-INFO-DIR-ENTRY
-* RTEMS MIPS64 Orion Applications Supplement (mips64orion):
-END-INFO-DIR-ENTRY
-@end format
-@end ifinfo
-@end ignore
-
-@c
-@c Title Page Stuff
-@c
-
-@set edition @value{RTEMS-EDITION}
-@set version @value{RTEMS-VERSION}
-@set update-date @value{RTEMS-UPDATE-DATE}
-@set update-month @value{RTEMS-UPDATE-MONTH}
-
-@c
-@c I don't really like having a short title page. --joel
-@c
-@c @shorttitlepage RTEMS MIPS64 Orion Applications Supplement
-
-@setchapternewpage odd
-@settitle RTEMS MIPS64 Orion Applications Supplement
-@titlepage
-@finalout
-
-@title RTEMS MIPS64 Orion Applications Supplement
-@subtitle Edition @value{edition}, for RTEMS @value{version}
-@sp 1
-@subtitle @value{update-month}
-@author On-Line Applications Research Corporation
-@page
-
-@include ../../common/cpright.texi
-@end titlepage
-
-@c This prevents a black box from being printed on "overflow" lines.
-@c The alternative is to rework a sentence to avoid this problem.
-
-@include preface.texi
-@include cpumodel.texi
-@include callconv.texi
-@include memmodel.texi
-@include intr.texi
-@include fatalerr.texi
-@include bsp.texi
-@include cputable.texi
-@include wksheets.texi
-@include timing.texi
-@include timeBSP.texi
-@ifinfo
-@node Top, Preface, (dir), (dir)
-@top c_mips64orion
-
-This is the online version of the RTEMS MIPS64 Orion Applications Supplement.
-
-@menu
-* Preface::
-* CPU Model Dependent Features::
-* Calling Conventions::
-* Memory Model::
-* Interrupt Processing::
-* Default Fatal Error Processing::
-* Board Support Packages::
-* Processor Dependent Information Table::
-* Memory Requirements::
-* Timing Specification::
-* BSP_FOR_TIMES Timing Data::
-* Command and Variable Index::
-* Concept Index::
-@end menu
-
-@end ifinfo
-@c
-@c
-@c Need to copy the emacs stuff and "trailer stuff" (index, toc) into here
-@c
-
-@node Command and Variable Index, Concept Index, BSP_FOR_TIMES Timing Data Rate Monotonic Manager, Top
-@unnumbered Command and Variable Index
-
-There are currently no Command and Variable Index entries.
-
-@c @printindex fn
-
-@node Concept Index, , Command and Variable Index, Top
-@unnumbered Concept Index
-
-There are currently no Concept Index entries.
-@c @printindex cp
-
-@contents
-@bye
-
diff --git a/doc/supplements/mips64orion/preface.texi b/doc/supplements/mips64orion/preface.texi
deleted file mode 100644
index d07d013c1f..0000000000
--- a/doc/supplements/mips64orion/preface.texi
+++ /dev/null
@@ -1,57 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@ifinfo
-@node Preface, CPU Model Dependent Features, Top, Top
-@end ifinfo
-@unnumbered Preface
-
-The Real Time Executive for Multiprocessor Systems (RTEMS)
-is designed to be portable across multiple processor
-architectures. However, the nature of real-time systems makes
-it essential that the application designer understand certain
-processor dependent implementation details. These processor
-dependencies include calling convention, board support package
-issues, interrupt processing, exact RTEMS memory requirements,
-performance data, header files, and the assembly language
-interface to the executive.
-
-This document discusses the VENDOR XXX
-architecture dependencies in this port of RTEMS. The XXX
-family has a wide variety of CPU models within it. The part
-numbers ...
-
-XXX fill in some things here
-
-It is highly recommended that the XXX
-RTEMS application developer obtain and become familiar with the
-documentation for the processor being used as well as the
-documentation for the family as a whole.
-
-@subheading Architecture Documents
-
-IDT docs are online at http://www.idt.com/products/risc/Welcome.html
-
-For information on the XXX architecture,
-refer to the following documents available from VENDOR
-(@file{http//www.XXX.com/}):
-
-@itemize @bullet
-@item @cite{XXX Family Reference, VENDOR, PART NUMBER}.
-@end itemize
-
-@subheading MODEL SPECIFIC DOCUMENTS
-
-For information on specific processor models and
-their associated coprocessors, refer to the following documents:
-
-@itemize @bullet
-@item @cite{XXX MODEL Manual, VENDOR, PART NUMBER}.
-@item @cite{XXX MODEL Manual, VENDOR, PART NUMBER}.
-@end itemize
-
diff --git a/doc/supplements/mips64orion/timeBSP.t b/doc/supplements/mips64orion/timeBSP.t
deleted file mode 100644
index f8cafd5f89..0000000000
--- a/doc/supplements/mips64orion/timeBSP.t
+++ /dev/null
@@ -1,108 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@include ../../common/timemac.texi
-@tex
-\global\advance \smallskipamount by -4pt
-@end tex
-
-@chapter BSP_FOR_TIMES Timing Data
-
-@section Introduction
-
-The timing data for the XXX version of RTEMS is
-provided along with the target dependent aspects concerning the
-gathering of the timing data. The hardware platform used to
-gather the times is described to give the reader a better
-understanding of each directive time provided. Also, provided
-is a description of the interrupt latency and the context switch
-times as they pertain to the XXX version of RTEMS.
-
-@section Hardware Platform
-
-All times reported except for the maximum period
-interrupts are disabled by RTEMS were measured using a Motorola
-BSP_FOR_TIMES CPU board. The BSP_FOR_TIMES is a 20Mhz board with one wait
-state dynamic memory and a XXX numeric coprocessor. The
-Zilog 8036 countdown timer on this board was used to measure
-elapsed time with a one-half microsecond resolution. All
-sources of hardware interrupts were disabled, although the
-interrupt level of the XXX allows all interrupts.
-
-The maximum period interrupts are disabled was
-measured by summing the number of CPU cycles required by each
-assembly language instruction executed while interrupts were
-disabled. The worst case times of the XXX microprocessor
-were used for each instruction. Zero wait state memory was
-assumed. The total CPU cycles executed with interrupts
-disabled, including the instructions to disable and enable
-interrupts, was divided by 20 to simulate a 20Mhz XXX. It
-should be noted that the worst case instruction times for the
-XXX assume that the internal cache is disabled and that no
-instructions overlap.
-
-@section Interrupt Latency
-
-The maximum period with interrupts disabled within
-RTEMS is less than RTEMS_MAXIMUM_DISABLE_PERIOD
-microseconds including the instructions
-which disable and re-enable interrupts. The time required for
-the XXX to vector an interrupt and for the RTEMS entry
-overhead before invoking the user's interrupt handler are a
-total of RTEMS_INTR_ENTRY_RETURNS_TO_PREEMPTING_TASK
-microseconds. These combine to yield a worst case
-interrupt latency of less than
-RTEMS_MAXIMUM_DISABLE_PERIOD + RTEMS_INTR_ENTRY_RETURNS_TO_PREEMPTING_TASK
-microseconds at 20Mhz. [NOTE: The maximum period with interrupts
-disabled was last determined for Release
-RTEMS_RELEASE_FOR_MAXIMUM_DISABLE_PERIOD.]
-
-It should be noted again that the maximum period with
-interrupts disabled within RTEMS is hand-timed and based upon
-worst case (i.e. CPU cache disabled and no instruction overlap)
-times for a 20Mhz XXX. The interrupt vector and entry
-overhead time was generated on an BSP_FOR_TIMES benchmark platform
-using the Multiprocessing Communications registers to generate
-as the interrupt source.
-
-@section Context Switch
-
-The RTEMS processor context switch time is RTEMS_NO_FP_CONTEXTS
-microseconds on the BSP_FOR_TIMES benchmark platform when no floating
-point context is saved or restored. Additional execution time
-is required when a TASK_SWITCH user extension is configured.
-The use of the TASK_SWITCH extension is application dependent.
-Thus, its execution time is not considered part of the raw
-context switch time.
-
-Since RTEMS was designed specifically for embedded
-missile applications which are floating point intensive, the
-executive is optimized to avoid unnecessarily saving and
-restoring the state of the numeric coprocessor. The state of
-the numeric coprocessor is only saved when an FLOATING_POINT
-task is dispatched and that task was not the last task to
-utilize the coprocessor. In a system with only one
-FLOATING_POINT task, the state of the numeric coprocessor will
-never be saved or restored. When the first FLOATING_POINT task
-is dispatched, RTEMS does not need to save the current state of
-the numeric coprocessor.
-
-The exact amount of time required to save and restore
-floating point context is dependent on whether an XXX or
-XXX is being used as well as the state of the numeric
-coprocessor. These numeric coprocessors define three operating
-states: initialized, idle, and busy. RTEMS places the
-coprocessor in the initialized state when a task is started or
-restarted. Once the task has utilized the coprocessor, it is in
-the idle state when floating point instructions are not
-executing and the busy state when floating point instructions
-are executing. The state of the coprocessor is task specific.
-
-The following table summarizes the context switch
-times for the BSP_FOR_TIMES benchmark platform:
-
diff --git a/doc/supplements/powerpc/DMV177_TIMES b/doc/supplements/powerpc/DMV177_TIMES
deleted file mode 100644
index 8f6ff2e3c0..0000000000
--- a/doc/supplements/powerpc/DMV177_TIMES
+++ /dev/null
@@ -1,248 +0,0 @@
-#
-# PowerPC/603e/PSIM Timing and Size Information
-#
-# $Id$
-#
-
-#
-# CPU Model Information
-#
-RTEMS_BSP DMV177
-RTEMS_CPU_MODEL PPC603e
-#
-# Interrupt Latency
-#
-# NOTE: In general, the text says it is hand-calculated to be
-# RTEMS_MAXIMUM_DISABLE_PERIOD at RTEMS_MAXIMUM_DISABLE_PERIOD_MHZ
-# Mhz and this was last calculated for Release
-# RTEMS_VERSION_FOR_MAXIMUM_DISABLE_PERIOD.
-#
-RTEMS_MAXIMUM_DISABLE_PERIOD TBD
-RTEMS_MAXIMUM_DISABLE_PERIOD_MHZ 100.0
-RTEMS_RELEASE_FOR_MAXIMUM_DISABLE_PERIOD 4.0.0-lmco
-#
-# Context Switch Times
-#
-RTEMS_NO_FP_CONTEXTS 585
-RTEMS_RESTORE_1ST_FP_TASK 730
-RTEMS_SAVE_INIT_RESTORE_INIT 478
-RTEMS_SAVE_IDLE_RESTORE_INIT 825
-RTEMS_SAVE_IDLE_RESTORE_IDLE 478
-#
-# Task Manager Times
-#
-RTEMS_TASK_CREATE_ONLY 2301
-RTEMS_TASK_IDENT_ONLY 2900
-RTEMS_TASK_START_ONLY 794
-RTEMS_TASK_RESTART_CALLING_TASK 1137
-RTEMS_TASK_RESTART_SUSPENDED_RETURNS_TO_CALLER 906
-RTEMS_TASK_RESTART_BLOCKED_RETURNS_TO_CALLER 1102
-RTEMS_TASK_RESTART_READY_RETURNS_TO_CALLER 928
-RTEMS_TASK_RESTART_SUSPENDED_PREEMPTS_CALLER 1483
-RTEMS_TASK_RESTART_BLOCKED_PREEMPTS_CALLER 1640
-RTEMS_TASK_RESTART_READY_PREEMPTS_CALLER 1601
-RTEMS_TASK_DELETE_CALLING_TASK 2117
-RTEMS_TASK_DELETE_SUSPENDED_TASK 1555
-RTEMS_TASK_DELETE_BLOCKED_TASK 1609
-RTEMS_TASK_DELETE_READY_TASK 1620
-RTEMS_TASK_SUSPEND_CALLING_TASK 960
-RTEMS_TASK_SUSPEND_RETURNS_TO_CALLER 433
-RTEMS_TASK_RESUME_TASK_READIED_RETURNS_TO_CALLER 960
-RTEMS_TASK_RESUME_TASK_READIED_PREEMPTS_CALLER 803
-RTEMS_TASK_SET_PRIORITY_OBTAIN_CURRENT_PRIORITY 368
-RTEMS_TASK_SET_PRIORITY_RETURNS_TO_CALLER 633
-RTEMS_TASK_SET_PRIORITY_PREEMPTS_CALLER 1211
-RTEMS_TASK_MODE_OBTAIN_CURRENT_MODE 184
-RTEMS_TASK_MODE_NO_RESCHEDULE 213
-RTEMS_TASK_MODE_RESCHEDULE_RETURNS_TO_CALLER 247
-RTEMS_TASK_MODE_RESCHEDULE_PREEMPTS_CALLER 919
-RTEMS_TASK_GET_NOTE_ONLY 382
-RTEMS_TASK_SET_NOTE_ONLY 383
-RTEMS_TASK_WAKE_AFTER_YIELD_RETURNS_TO_CALLER 245
-RTEMS_TASK_WAKE_AFTER_YIELD_PREEMPTS_CALLER 851
-RTEMS_TASK_WAKE_WHEN_ONLY 1275
-#
-# Interrupt Manager
-#
-RTEMS_INTR_ENTRY_RETURNS_TO_NESTED 201
-RTEMS_INTR_ENTRY_RETURNS_TO_INTERRUPTED_TASK 206
-RTEMS_INTR_ENTRY_RETURNS_TO_PREEMPTING_TASK 202
-RTEMS_INTR_EXIT_RETURNS_TO_NESTED 201
-RTEMS_INTR_EXIT_RETURNS_TO_INTERRUPTED_TASK 213
-RTEMS_INTR_EXIT_RETURNS_TO_PREEMPTING_TASK 857
-#
-# Clock Manager
-#
-RTEMS_CLOCK_SET_ONLY 792
-RTEMS_CLOCK_GET_ONLY 78
-RTEMS_CLOCK_TICK_ONLY 214
-#
-# Timer Manager
-#
-RTEMS_TIMER_CREATE_ONLY 357
-RTEMS_TIMER_IDENT_ONLY 2828
-RTEMS_TIMER_DELETE_INACTIVE 432
-RTEMS_TIMER_DELETE_ACTIVE 471
-RTEMS_TIMER_FIRE_AFTER_INACTIVE 607
-RTEMS_TIMER_FIRE_AFTER_ACTIVE 646
-RTEMS_TIMER_FIRE_WHEN_INACTIVE 766
-RTEMS_TIMER_FIRE_WHEN_ACTIVE 764
-RTEMS_TIMER_RESET_INACTIVE 552
-RTEMS_TIMER_RESET_ACTIVE 766
-RTEMS_TIMER_CANCEL_INACTIVE 339
-RTEMS_TIMER_CANCEL_ACTIVE 378
-#
-# Semaphore Manager
-#
-RTEMS_SEMAPHORE_CREATE_ONLY 571
-RTEMS_SEMAPHORE_IDENT_ONLY 3243
-RTEMS_SEMAPHORE_DELETE_ONLY 575
-RTEMS_SEMAPHORE_OBTAIN_AVAILABLE 414
-RTEMS_SEMAPHORE_OBTAIN_NOT_AVAILABLE_NO_WAIT 414
-RTEMS_SEMAPHORE_OBTAIN_NOT_AVAILABLE_CALLER_BLOCKS 1254
-RTEMS_SEMAPHORE_RELEASE_NO_WAITING_TASKS 501
-RTEMS_SEMAPHORE_RELEASE_TASK_READIED_RETURNS_TO_CALLER 636
-RTEMS_SEMAPHORE_RELEASE_TASK_READIED_PREEMPTS_CALLER 982
-#
-# Message Manager
-#
-RTEMS_MESSAGE_QUEUE_CREATE_ONLY 2270
-RTEMS_MESSAGE_QUEUE_IDENT_ONLY 2828
-RTEMS_MESSAGE_QUEUE_DELETE_ONLY 708
-RTEMS_MESSAGE_QUEUE_SEND_NO_WAITING_TASKS 923
-RTEMS_MESSAGE_QUEUE_SEND_TASK_READIED_RETURNS_TO_CALLER 955
-RTEMS_MESSAGE_QUEUE_SEND_TASK_READIED_PREEMPTS_CALLER 1322
-RTEMS_MESSAGE_QUEUE_URGENT_NO_WAITING_TASKS 919
-RTEMS_MESSAGE_QUEUE_URGENT_TASK_READIED_RETURNS_TO_CALLER 955
-RTEMS_MESSAGE_QUEUE_URGENT_TASK_READIED_PREEMPTS_CALLER 1322
-RTEMS_MESSAGE_QUEUE_BROADCAST_NO_WAITING_TASKS 589
-RTEMS_MESSAGE_QUEUE_BROADCAST_TASK_READIED_RETURNS_TO_CALLER 1079
-RTEMS_MESSAGE_QUEUE_BROADCAST_TASK_READIED_PREEMPTS_CALLER 1435
-RTEMS_MESSAGE_QUEUE_RECEIVE_AVAILABLE 755
-RTEMS_MESSAGE_QUEUE_RECEIVE_NOT_AVAILABLE_NO_WAIT 467
-RTEMS_MESSAGE_QUEUE_RECEIVE_NOT_AVAILABLE_CALLER_BLOCKS 1283
-RTEMS_MESSAGE_QUEUE_FLUSH_NO_MESSAGES_FLUSHED 369
-RTEMS_MESSAGE_QUEUE_FLUSH_MESSAGES_FLUSHED 431
-#
-# Event Manager
-#
-RTEMS_EVENT_SEND_NO_TASK_READIED 354
-RTEMS_EVENT_SEND_TASK_READIED_RETURNS_TO_CALLER 571
-RTEMS_EVENT_SEND_TASK_READIED_PREEMPTS_CALLER 946
-RTEMS_EVENT_RECEIVE_OBTAIN_CURRENT_EVENTS 43
-RTEMS_EVENT_RECEIVE_AVAILABLE 357
-RTEMS_EVENT_RECEIVE_NOT_AVAILABLE_NO_WAIT 331
-RTEMS_EVENT_RECEIVE_NOT_AVAILABLE_CALLER_BLOCKS 1043
-#
-# Signal Manager
-#
-RTEMS_SIGNAL_CATCH_ONLY 267
-RTEMS_SIGNAL_SEND_RETURNS_TO_CALLER 408
-RTEMS_SIGNAL_SEND_SIGNAL_TO_SELF 607
-RTEMS_SIGNAL_EXIT_ASR_OVERHEAD_RETURNS_TO_CALLING_TASK 464
-RTEMS_SIGNAL_EXIT_ASR_OVERHEAD_RETURNS_TO_PREEMPTING_TASK 752
-#
-# Partition Manager
-#
-RTEMS_PARTITION_CREATE_ONLY 762
-RTEMS_PARTITION_IDENT_ONLY 2828
-RTEMS_PARTITION_DELETE_ONLY 426
-RTEMS_PARTITION_GET_BUFFER_AVAILABLE 394
-RTEMS_PARTITION_GET_BUFFER_NOT_AVAILABLE 376
-RTEMS_PARTITION_RETURN_BUFFER_ONLY 420
-#
-# Region Manager
-#
-RTEMS_REGION_CREATE_ONLY 614
-RTEMS_REGION_IDENT_ONLY 2878
-RTEMS_REGION_DELETE_ONLY 425
-RTEMS_REGION_GET_SEGMENT_AVAILABLE 515
-RTEMS_REGION_GET_SEGMENT_NOT_AVAILABLE_NO_WAIT 472
-RTEMS_REGION_GET_SEGMENT_NOT_AVAILABLE_CALLER_BLOCKS 1345
-RTEMS_REGION_RETURN_SEGMENT_NO_WAITING_TASKS 544
-RTEMS_REGION_RETURN_SEGMENT_TASK_READIED_RETURNS_TO_CALLER 935
-RTEMS_REGION_RETURN_SEGMENT_TASK_READIED_PREEMPTS_CALLER 1296
-#
-# Dual-Ported Memory Manager
-#
-RTEMS_PORT_CREATE_ONLY 428
-RTEMS_PORT_IDENT_ONLY 2828
-RTEMS_PORT_DELETE_ONLY 421
-RTEMS_PORT_INTERNAL_TO_EXTERNAL_ONLY 339
-RTEMS_PORT_EXTERNAL_TO_INTERNAL_ONLY 339
-#
-# IO Manager
-#
-RTEMS_IO_INITIALIZE_ONLY 52
-RTEMS_IO_OPEN_ONLY 42
-RTEMS_IO_CLOSE_ONLY 44
-RTEMS_IO_READ_ONLY 42
-RTEMS_IO_WRITE_ONLY 44
-RTEMS_IO_CONTROL_ONLY 42
-#
-# Rate Monotonic Manager
-#
-RTEMS_RATE_MONOTONIC_CREATE_ONLY 388
-RTEMS_RATE_MONOTONIC_IDENT_ONLY 2826
-RTEMS_RATE_MONOTONIC_CANCEL_ONLY 427
-RTEMS_RATE_MONOTONIC_DELETE_ACTIVE 519
-RTEMS_RATE_MONOTONIC_DELETE_INACTIVE 465
-RTEMS_RATE_MONOTONIC_PERIOD_INITIATE_PERIOD_RETURNS_TO_CALLER 556
-RTEMS_RATE_MONOTONIC_PERIOD_CONCLUDE_PERIOD_CALLER_BLOCKS 842
-RTEMS_RATE_MONOTONIC_PERIOD_OBTAIN_STATUS 377
-#
-# Size Information
-#
-#
-# xxx alloted for numbers
-#
-RTEMS_DATA_SPACE 428
-RTEMS_MINIMUM_CONFIGURATION 30,980
-RTEMS_MAXIMUM_CONFIGURATION 55540
-# x,xxx alloted for numbers
-RTEMS_CORE_CODE_SIZE 21,516
-RTEMS_INITIALIZATION_CODE_SIZE 1,412
-RTEMS_TASK_CODE_SIZE 4,804
-RTEMS_INTERRUPT_CODE_SIZE 96
-RTEMS_CLOCK_CODE_SIZE 536
-RTEMS_TIMER_CODE_SIZE 1,380
-RTEMS_SEMAPHORE_CODE_SIZE 1,928
-RTEMS_MESSAGE_CODE_SIZE 532
-RTEMS_EVENT_CODE_SIZE 100
-RTEMS_SIGNAL_CODE_SIZE 100
-RTEMS_PARTITION_CODE_SIZE 1,384
-RTEMS_REGION_CODE_SIZE 1,780
-RTEMS_DPMEM_CODE_SIZE 928
-RTEMS_IO_CODE_SIZE 1,244
-RTEMS_FATAL_ERROR_CODE_SIZE 44
-RTEMS_RATE_MONOTONIC_CODE_SIZE 1,756
-RTEMS_MULTIPROCESSING_CODE_SIZE 11,448
-# xxx alloted for numbers
-RTEMS_TIMER_CODE_OPTSIZE 340
-RTEMS_SEMAPHORE_CODE_OPTSIZE 308
-RTEMS_MESSAGE_CODE_OPTSIZE 532
-RTEMS_EVENT_CODE_OPTSIZE 100
-RTEMS_SIGNAL_CODE_OPTSIZE 100
-RTEMS_PARTITION_CODE_OPTSIZE 244
-RTEMS_REGION_CODE_OPTSIZE 292
-RTEMS_DPMEM_CODE_OPTSIZE 244
-RTEMS_IO_CODE_OPTSIZE NA
-RTEMS_RATE_MONOTONIC_CODE_OPTSIZE 336
-RTEMS_MULTIPROCESSING_CODE_OPTSIZE 612
-# xxx alloted for numbers
-RTEMS_BYTES_PER_TASK 456
-RTEMS_BYTES_PER_TIMER 68
-RTEMS_BYTES_PER_SEMAPHORE 120
-RTEMS_BYTES_PER_MESSAGE_QUEUE 144
-RTEMS_BYTES_PER_REGION 140
-RTEMS_BYTES_PER_PARTITION 56
-RTEMS_BYTES_PER_PORT 36
-RTEMS_BYTES_PER_PERIOD 36
-RTEMS_BYTES_PER_EXTENSION 64
-RTEMS_BYTES_PER_FP_TASK 264
-RTEMS_BYTES_PER_NODE 48
-RTEMS_BYTES_PER_GLOBAL_OBJECT 20
-RTEMS_BYTES_PER_PROXY 124
-# x,xxx alloted for numbers
-RTEMS_BYTES_OF_FIXED_SYSTEM_REQUIREMENTS 10008
-
diff --git a/doc/supplements/powerpc/Makefile b/doc/supplements/powerpc/Makefile
deleted file mode 100644
index 585671c558..0000000000
--- a/doc/supplements/powerpc/Makefile
+++ /dev/null
@@ -1,183 +0,0 @@
-#
-# COPYRIGHT (c) 1988-1999.
-# On-Line Applications Research Corporation (OAR).
-# All rights reserved.
-#
-# $Id$
-#
-
-PROJECT=powerpc
-
-include ../../Make.config
-
-REPLACE=../../tools/word-replace
-
-all: html info ps pdf
-
-dirs:
- $(make-dirs)
-
-COMMON_FILES=../../common/cpright.texi ../../common/setup.texi
-
-GENERATED_FILES=\
- cpumodel.texi callconv.texi memmodel.texi intr.texi fatalerr.texi \
- bsp.texi cputable.texi timing.texi wksheets.texi timePSIM.texi timeDMV177.texi
-
-FILES= $(PROJECT).texi \
- preface.texi \
- $(GENERATED_FILES)
-
-INFOFILES=$(wildcard $(PROJECT) $(PROJECT)-*)
-
-info: dirs c_$(PROJECT)
- cp c_$(PROJECT) c_$(PROJECT)-* $(INFO_INSTALL)
-
-c_$(PROJECT): $(FILES)
- $(MAKEINFO) $(PROJECT).texi
-
-dvi: dirs $(PROJECT).dvi
-ps: dirs $(PROJECT).ps
-pdf: dirs $(PROJECT).pdf
-
-$(PROJECT).pdf: $(FILES)
- $(TEXI2PDF) $(PROJECT).texi
- cp $(PROJECT).pdf $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).ps: $(PROJECT).dvi
- dvips -o $(PROJECT).ps $(PROJECT).dvi
- cp $(PROJECT).ps $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).dvi: $(FILES)
- $(TEXI2DVI) $(PROJECT).texi
- cp $(PROJECT).dvi $(WWW_INSTALL)/$(PROJECT)
-
-html: dirs $(FILES)
- -mkdir -p $(WWW_INSTALL)/$(PROJECT)
- $(TEXI2WWW) $(TEXI2WWW_ARGS) -dir $(WWW_INSTALL)/$(PROJECT) \
- $(PROJECT).texi
-
-clean:
- rm -f *.o $(PROG) *.txt core $(PROJECT).pdf
- rm -f *.dvi *.ps *.log *.aux *.cp *.fn *.ky *.pg *.toc *.tp *.vr $(BASE)
- rm -f $(PROJECT) $(PROJECT)-*
- rm -f c_$(PROJECT) c_$(PROJECT)-*
- rm -f intr.t $(GENERATED_FILES)
- rm -f wksheets.t wksheets_NOTIMES.t timing.t
- rm -f timePSIM_.t timePSIM_.texi
- rm -f timeDMV177_.t timeDMV177_.texi
- rm -f *.fixed _*
-
-#
-# Chapters which get automatic processing
-#
-
-cpumodel.texi: cpumodel.t Makefile
- $(BMENU) -p "Preface" \
- -u "Top" \
- -n "Calling Conventions" ${*}.t
-
-callconv.texi: callconv.t Makefile
- $(BMENU) -p "CPU Model Dependent Features Low Power Model" \
- -u "Top" \
- -n "Memory Model" ${*}.t
-
-memmodel.texi: memmodel.t Makefile
- $(BMENU) -p "Calling Conventions User-Provided Routines" \
- -u "Top" \
- -n "Interrupt Processing" ${*}.t
-
-# Interrupt Chapter:
-# 1. Replace Times and Sizes
-# 2. Build Node Structure
-intr.t: intr_NOTIMES.t PSIM_TIMES
- ${REPLACE} -p PSIM_TIMES intr_NOTIMES.t
- mv intr_NOTIMES.t.fixed intr.t
-
-intr.texi: intr.t Makefile
- $(BMENU) -p "Memory Model Flat Memory Model" \
- -u "Top" \
- -n "Default Fatal Error Processing" ${*}.t
-
-fatalerr.texi: fatalerr.t Makefile
- $(BMENU) -p "Interrupt Processing Interrupt Stack" \
- -u "Top" \
- -n "Board Support Packages" ${*}.t
-
-bsp.texi: bsp.t Makefile
- $(BMENU) -p "Default Fatal Error Processing Default Fatal Error Handler Operations" \
- -u "Top" \
- -n "Processor Dependent Information Table" ${*}.t
-
-cputable.texi: cputable.t Makefile
- $(BMENU) -p "Board Support Packages Processor Initialization" \
- -u "Top" \
- -n "Memory Requirements" ${*}.t
-
-# Worksheets Chapter:
-# 1. Obtain the Shared File
-# 2. Replace Times and Sizes
-# 3. Build Node Structure
-
-wksheets_NOTIMES.t: ../../common/wksheets.t
- cp ../../common/wksheets.t wksheets_NOTIMES.t
-
-wksheets.t: wksheets_NOTIMES.t PSIM_TIMES
- ${REPLACE} -p PSIM_TIMES wksheets_NOTIMES.t
- mv wksheets_NOTIMES.t.fixed wksheets.t
-
-wksheets.texi: wksheets.t Makefile
- $(BMENU) -p "Processor Dependent Information Table CPU Dependent Information Table" \
- -u "Top" \
- -n "Timing Specification" ${*}.t
-
-# Timing Specification Chapter:
-# 1. Copy the Shared File
-# 3. Build Node Structure
-
-timing.t: ../../common/timing.t
- cp ../../common/timing.t timing.t
-
-timing.texi: timing.t Makefile
- $(BMENU) -p "Memory Requirements RTEMS RAM Workspace Worksheet" \
- -u "Top" \
- -n "PSIM Timing Data" ${*}.t
-
-# Timing Data for PSIM BSP Chapter:
-# 1. Copy the Shared File
-# 2. Replace Times and Sizes
-# 3. Build Node Structure
-
-timePSIM_.t: ../../common/timetbl.t timePSIM.t
- cat timePSIM.t ../../common/timetbl.t >timePSIM_.t
- @echo >>timePSIM_.t
- @echo "@tex" >>timePSIM_.t
- @echo "\\global\\advance \\smallskipamount by 4pt" >>timePSIM_.t
- @echo "@end tex" >>timePSIM_.t
- ${REPLACE} -p PSIM_TIMES timePSIM_.t
- mv timePSIM_.t.fixed timePSIM_.t
-
-timePSIM.texi: timePSIM_.t Makefile
- $(BMENU) -p "Timing Specification Terminology" \
- -u "Top" \
- -n "DMV177 Timing Data" timePSIM_.t
- mv timePSIM_.texi timePSIM.texi
-
-# Timing Data for DMV177 BSP Chapter:
-# 1. Copy the Shared File
-# 2. Replace Times and Sizes
-# 3. Build Node Structure
-
-timeDMV177_.t: ../../common/timetbl.t timeDMV177.t
- cat timeDMV177.t ../../common/timetbl.t >timeDMV177_.t
- @echo >>timeDMV177_.t
- @echo "@tex" >>timeDMV177_.t
- @echo "\\global\\advance \\smallskipamount by 4pt" >>timeDMV177_.t
- @echo "@end tex" >>timeDMV177_.t
- ${REPLACE} -p DMV177_TIMES timeDMV177_.t
- mv timeDMV177_.t.fixed timeDMV177_.t
-
-timeDMV177.texi: timeDMV177_.t Makefile
- $(BMENU) -p "PSIM Timing Data Rate Monotonic Manager" \
- -u "Top" \
- -n "Command and Variable Index" timeDMV177_.t
- mv timeDMV177_.texi timeDMV177.texi
diff --git a/doc/supplements/powerpc/PSIM_TIMES b/doc/supplements/powerpc/PSIM_TIMES
deleted file mode 100644
index b357a1fc3c..0000000000
--- a/doc/supplements/powerpc/PSIM_TIMES
+++ /dev/null
@@ -1,248 +0,0 @@
-#
-# PowerPC/603e/PSIM Timing and Size Information
-#
-# $Id$
-#
-
-#
-# CPU Model Information
-#
-RTEMS_BSP PSIM
-RTEMS_CPU_MODEL PPC603e
-#
-# Interrupt Latency
-#
-# NOTE: In general, the text says it is hand-calculated to be
-# RTEMS_MAXIMUM_DISABLE_PERIOD at RTEMS_MAXIMUM_DISABLE_PERIOD_MHZ
-# Mhz and this was last calculated for Release
-# RTEMS_VERSION_FOR_MAXIMUM_DISABLE_PERIOD.
-#
-RTEMS_MAXIMUM_DISABLE_PERIOD TBD
-RTEMS_MAXIMUM_DISABLE_PERIOD_MHZ na
-RTEMS_RELEASE_FOR_MAXIMUM_DISABLE_PERIOD 4.0.0-lmco
-#
-# Context Switch Times
-#
-RTEMS_NO_FP_CONTEXTS 214
-RTEMS_RESTORE_1ST_FP_TASK 255
-RTEMS_SAVE_INIT_RESTORE_INIT 140
-RTEMS_SAVE_IDLE_RESTORE_INIT 140
-RTEMS_SAVE_IDLE_RESTORE_IDLE 290
-#
-# Task Manager Times
-#
-RTEMS_TASK_CREATE_ONLY 1075
-RTEMS_TASK_IDENT_ONLY 1637
-RTEMS_TASK_START_ONLY 345
-RTEMS_TASK_RESTART_CALLING_TASK 483
-RTEMS_TASK_RESTART_SUSPENDED_RETURNS_TO_CALLER 396
-RTEMS_TASK_RESTART_BLOCKED_RETURNS_TO_CALLER 491
-RTEMS_TASK_RESTART_READY_RETURNS_TO_CALLER 404
-RTEMS_TASK_RESTART_SUSPENDED_PREEMPTS_CALLER 644
-RTEMS_TASK_RESTART_BLOCKED_PREEMPTS_CALLER 709
-RTEMS_TASK_RESTART_READY_PREEMPTS_CALLER 686
-RTEMS_TASK_DELETE_CALLING_TASK 941
-RTEMS_TASK_DELETE_SUSPENDED_TASK 703
-RTEMS_TASK_DELETE_BLOCKED_TASK 723
-RTEMS_TASK_DELETE_READY_TASK 729
-RTEMS_TASK_SUSPEND_CALLING_TASK 403
-RTEMS_TASK_SUSPEND_RETURNS_TO_CALLER 181
-RTEMS_TASK_RESUME_TASK_READIED_RETURNS_TO_CALLER 191
-RTEMS_TASK_RESUME_TASK_READIED_PREEMPTS_CALLER 803
-RTEMS_TASK_SET_PRIORITY_OBTAIN_CURRENT_PRIORITY 147
-RTEMS_TASK_SET_PRIORITY_RETURNS_TO_CALLER 264
-RTEMS_TASK_SET_PRIORITY_PREEMPTS_CALLER 517
-RTEMS_TASK_MODE_OBTAIN_CURRENT_MODE 88
-RTEMS_TASK_MODE_NO_RESCHEDULE 110
-RTEMS_TASK_MODE_RESCHEDULE_RETURNS_TO_CALLER 112
-RTEMS_TASK_MODE_RESCHEDULE_PREEMPTS_CALLER 386
-RTEMS_TASK_GET_NOTE_ONLY 156
-RTEMS_TASK_SET_NOTE_ONLY 155
-RTEMS_TASK_WAKE_AFTER_YIELD_RETURNS_TO_CALLER 92
-RTEMS_TASK_WAKE_AFTER_YIELD_PREEMPTS_CALLER 348
-RTEMS_TASK_WAKE_WHEN_ONLY 546
-#
-# Interrupt Manager
-#
-RTEMS_INTR_ENTRY_RETURNS_TO_NESTED 60
-RTEMS_INTR_ENTRY_RETURNS_TO_INTERRUPTED_TASK 62
-RTEMS_INTR_ENTRY_RETURNS_TO_PREEMPTING_TASK 61
-RTEMS_INTR_EXIT_RETURNS_TO_NESTED 55
-RTEMS_INTR_EXIT_RETURNS_TO_INTERRUPTED_TASK 67
-RTEMS_INTR_EXIT_RETURNS_TO_PREEMPTING_TASK 344
-#
-# Clock Manager
-#
-RTEMS_CLOCK_SET_ONLY 340
-RTEMS_CLOCK_GET_ONLY 29
-RTEMS_CLOCK_TICK_ONLY 81
-#
-# Timer Manager
-#
-RTEMS_TIMER_CREATE_ONLY 144
-RTEMS_TIMER_IDENT_ONLY 1595
-RTEMS_TIMER_DELETE_INACTIVE 197
-RTEMS_TIMER_DELETE_ACTIVE 181
-RTEMS_TIMER_FIRE_AFTER_INACTIVE 252
-RTEMS_TIMER_FIRE_AFTER_ACTIVE 269
-RTEMS_TIMER_FIRE_WHEN_INACTIVE 333
-RTEMS_TIMER_FIRE_WHEN_ACTIVE 334
-RTEMS_TIMER_RESET_INACTIVE 233
-RTEMS_TIMER_RESET_ACTIVE 250
-RTEMS_TIMER_CANCEL_INACTIVE 156
-RTEMS_TIMER_CANCEL_ACTIVE 140
-#
-# Semaphore Manager
-#
-RTEMS_SEMAPHORE_CREATE_ONLY 223
-RTEMS_SEMAPHORE_IDENT_ONLY 1836
-RTEMS_SEMAPHORE_DELETE_ONLY 1836
-RTEMS_SEMAPHORE_OBTAIN_AVAILABLE 175
-RTEMS_SEMAPHORE_OBTAIN_NOT_AVAILABLE_NO_WAIT 175
-RTEMS_SEMAPHORE_OBTAIN_NOT_AVAILABLE_CALLER_BLOCKS 530
-RTEMS_SEMAPHORE_RELEASE_NO_WAITING_TASKS 206
-RTEMS_SEMAPHORE_RELEASE_TASK_READIED_RETURNS_TO_CALLER 272
-RTEMS_SEMAPHORE_RELEASE_TASK_READIED_PREEMPTS_CALLER 415
-#
-# Message Manager
-#
-RTEMS_MESSAGE_QUEUE_CREATE_ONLY 1022
-RTEMS_MESSAGE_QUEUE_IDENT_ONLY 1596
-RTEMS_MESSAGE_QUEUE_DELETE_ONLY 308
-RTEMS_MESSAGE_QUEUE_SEND_NO_WAITING_TASKS 421
-RTEMS_MESSAGE_QUEUE_SEND_TASK_READIED_RETURNS_TO_CALLER 434
-RTEMS_MESSAGE_QUEUE_SEND_TASK_READIED_PREEMPTS_CALLER 581
-RTEMS_MESSAGE_QUEUE_URGENT_NO_WAITING_TASKS 422
-RTEMS_MESSAGE_QUEUE_URGENT_TASK_READIED_RETURNS_TO_CALLER 435
-RTEMS_MESSAGE_QUEUE_URGENT_TASK_READIED_PREEMPTS_CALLER 582
-RTEMS_MESSAGE_QUEUE_BROADCAST_NO_WAITING_TASKS 244
-RTEMS_MESSAGE_QUEUE_BROADCAST_TASK_READIED_RETURNS_TO_CALLER 482
-RTEMS_MESSAGE_QUEUE_BROADCAST_TASK_READIED_PREEMPTS_CALLER 630
-RTEMS_MESSAGE_QUEUE_RECEIVE_AVAILABLE 345
-RTEMS_MESSAGE_QUEUE_RECEIVE_NOT_AVAILABLE_NO_WAIT 197
-RTEMS_MESSAGE_QUEUE_RECEIVE_NOT_AVAILABLE_CALLER_BLOCKS 542
-RTEMS_MESSAGE_QUEUE_FLUSH_NO_MESSAGES_FLUSHED 142
-RTEMS_MESSAGE_QUEUE_FLUSH_MESSAGES_FLUSHED 170
-#
-# Event Manager
-#
-RTEMS_EVENT_SEND_NO_TASK_READIED 145
-RTEMS_EVENT_SEND_TASK_READIED_RETURNS_TO_CALLER 250
-RTEMS_EVENT_SEND_TASK_READIED_PREEMPTS_CALLER 407
-RTEMS_EVENT_RECEIVE_OBTAIN_CURRENT_EVENTS 17
-RTEMS_EVENT_RECEIVE_AVAILABLE 133
-RTEMS_EVENT_RECEIVE_NOT_AVAILABLE_NO_WAIT 130
-RTEMS_EVENT_RECEIVE_NOT_AVAILABLE_CALLER_BLOCKS 442
-#
-# Signal Manager
-#
-RTEMS_SIGNAL_CATCH_ONLY 95
-RTEMS_SIGNAL_SEND_RETURNS_TO_CALLER 165
-RTEMS_SIGNAL_SEND_SIGNAL_TO_SELF 275
-RTEMS_SIGNAL_EXIT_ASR_OVERHEAD_RETURNS_TO_CALLING_TASK 216
-RTEMS_SIGNAL_EXIT_ASR_OVERHEAD_RETURNS_TO_PREEMPTING_TASK 329
-#
-# Partition Manager
-#
-RTEMS_PARTITION_CREATE_ONLY 320
-RTEMS_PARTITION_IDENT_ONLY 1596
-RTEMS_PARTITION_DELETE_ONLY 168
-RTEMS_PARTITION_GET_BUFFER_AVAILABLE 157
-RTEMS_PARTITION_GET_BUFFER_NOT_AVAILABLE 149
-RTEMS_PARTITION_RETURN_BUFFER_ONLY 172
-#
-# Region Manager
-#
-RTEMS_REGION_CREATE_ONLY 239
-RTEMS_REGION_IDENT_ONLY 1625
-RTEMS_REGION_DELETE_ONLY 167
-RTEMS_REGION_GET_SEGMENT_AVAILABLE 206
-RTEMS_REGION_GET_SEGMENT_NOT_AVAILABLE_NO_WAIT 190
-RTEMS_REGION_GET_SEGMENT_NOT_AVAILABLE_CALLER_BLOCKS 556
-RTEMS_REGION_RETURN_SEGMENT_NO_WAITING_TASKS 230
-RTEMS_REGION_RETURN_SEGMENT_TASK_READIED_RETURNS_TO_CALLER 412
-RTEMS_REGION_RETURN_SEGMENT_TASK_READIED_PREEMPTS_CALLER 562
-#
-# Dual-Ported Memory Manager
-#
-RTEMS_PORT_CREATE_ONLY 167
-RTEMS_PORT_IDENT_ONLY 1594
-RTEMS_PORT_DELETE_ONLY 165
-RTEMS_PORT_INTERNAL_TO_EXTERNAL_ONLY 133
-RTEMS_PORT_EXTERNAL_TO_INTERNAL_ONLY 134
-#
-# IO Manager
-#
-RTEMS_IO_INITIALIZE_ONLY 23
-RTEMS_IO_OPEN_ONLY 18
-RTEMS_IO_CLOSE_ONLY 18
-RTEMS_IO_READ_ONLY 18
-RTEMS_IO_WRITE_ONLY 18
-RTEMS_IO_CONTROL_ONLY 18
-#
-# Rate Monotonic Manager
-#
-RTEMS_RATE_MONOTONIC_CREATE_ONLY 149
-RTEMS_RATE_MONOTONIC_IDENT_ONLY 1595
-RTEMS_RATE_MONOTONIC_CANCEL_ONLY 169
-RTEMS_RATE_MONOTONIC_DELETE_ACTIVE 212
-RTEMS_RATE_MONOTONIC_DELETE_INACTIVE 186
-RTEMS_RATE_MONOTONIC_PERIOD_INITIATE_PERIOD_RETURNS_TO_CALLER 226
-RTEMS_RATE_MONOTONIC_PERIOD_CONCLUDE_PERIOD_CALLER_BLOCKS 362
-RTEMS_RATE_MONOTONIC_PERIOD_OBTAIN_STATUS 142
-#
-# Size Information
-#
-#
-# xxx alloted for numbers
-#
-RTEMS_DATA_SPACE 428
-RTEMS_MINIMUM_CONFIGURATION 30,912
-RTEMS_MAXIMUM_CONFIGURATION 55,572
-# x,xxx alloted for numbers
-RTEMS_CORE_CODE_SIZE 21,452
-RTEMS_INITIALIZATION_CODE_SIZE 1,408
-RTEMS_TASK_CODE_SIZE 4,804
-RTEMS_INTERRUPT_CODE_SIZE 96
-RTEMS_CLOCK_CODE_SIZE 536
-RTEMS_TIMER_CODE_SIZE 1,380
-RTEMS_SEMAPHORE_CODE_SIZE 1,928
-RTEMS_MESSAGE_CODE_SIZE 2,400
-RTEMS_EVENT_CODE_SIZE 1,460
-RTEMS_SIGNAL_CODE_SIZE 576
-RTEMS_PARTITION_CODE_SIZE 1,384
-RTEMS_REGION_CODE_SIZE 1,780
-RTEMS_DPMEM_CODE_SIZE 928
-RTEMS_IO_CODE_SIZE 1,244
-RTEMS_FATAL_ERROR_CODE_SIZE 44
-RTEMS_RATE_MONOTONIC_CODE_SIZE 1,756
-RTEMS_MULTIPROCESSING_CODE_SIZE 11,448
-# xxx alloted for numbers
-RTEMS_TIMER_CODE_OPTSIZE 340
-RTEMS_SEMAPHORE_CODE_OPTSIZE 308
-RTEMS_MESSAGE_CODE_OPTSIZE 532
-RTEMS_EVENT_CODE_OPTSIZE 100
-RTEMS_SIGNAL_CODE_OPTSIZE 100
-RTEMS_PARTITION_CODE_OPTSIZE 244
-RTEMS_REGION_CODE_OPTSIZE 292
-RTEMS_DPMEM_CODE_OPTSIZE 244
-RTEMS_IO_CODE_OPTSIZE NA
-RTEMS_RATE_MONOTONIC_CODE_OPTSIZE 336
-RTEMS_MULTIPROCESSING_CODE_OPTSIZE 612
-# xxx alloted for numbers
-RTEMS_BYTES_PER_TASK 456
-RTEMS_BYTES_PER_TIMER 68
-RTEMS_BYTES_PER_SEMAPHORE 120
-RTEMS_BYTES_PER_MESSAGE_QUEUE 144
-RTEMS_BYTES_PER_REGION 140
-RTEMS_BYTES_PER_PARTITION 56
-RTEMS_BYTES_PER_PORT 36
-RTEMS_BYTES_PER_PERIOD 36
-RTEMS_BYTES_PER_EXTENSION 64
-RTEMS_BYTES_PER_FP_TASK 264
-RTEMS_BYTES_PER_NODE 48
-RTEMS_BYTES_PER_GLOBAL_OBJECT 20
-RTEMS_BYTES_PER_PROXY 124
-# x,xxx alloted for numbers
-RTEMS_BYTES_OF_FIXED_SYSTEM_REQUIREMENTS 10,008
-
diff --git a/doc/supplements/powerpc/bsp.t b/doc/supplements/powerpc/bsp.t
deleted file mode 100644
index b2ce395b7f..0000000000
--- a/doc/supplements/powerpc/bsp.t
+++ /dev/null
@@ -1,76 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Board Support Packages
-
-@section Introduction
-
-An RTEMS Board Support Package (BSP) must be designed
-to support a particular processor and target board combination.
-This chapter presents a discussion of PowerPC specific BSP issues.
-For more information on developing a BSP, refer to the chapter
-titled Board Support Packages in the RTEMS
-Applications User's Guide.
-
-@section System Reset
-
-An RTEMS based application is initiated or
-re-initiated when the PowerPC processor is reset. The PowerPC
-architecture defines a Reset Exception, but leaves the
-details of the CPU state as implementation specific. Please
-refer to the User's Manual for the CPU model in question.
-
-In general, at power-up the PowerPC begin execution at address
-0xFFF00100 in supervisor mode with all exceptions disabled. For
-soft resets, the CPU will vector to either 0xFFF00100 or 0x00000100
-depending upon the setting of the Exception Prefix bit in the MSR.
-If during a soft reset, a Machine Check Exception occurs, then the
-CPU may execute a hard reset.
-
-@section Processor Initialization
-
-It is the responsibility of the application's
-initialization code to initialize the CPU and board
-to a quiescent state before invoking the @code{rtems_initialize_executive}
-directive. It is recommended that the BSP utilize the @code{predriver_hook}
-to install default handlers for all exceptions. These default handlers
-may be overwritten as various device drivers and subsystems install
-their own exception handlers. Upon completion of RTEMS executive
-initialization, all interrupts are enabled.
-
-If this PowerPC implementation supports on-chip caching
-and this is to be utilized, then it should be enabled during the
-reset application initialization code. On-chip caching has been
-observed to prevent some emulators from working properly, so it
-may be necessary to run with caching disabled to use these emulators.
-
-In addition to the requirements described in the
-@b{Board Support Packages} chapter of the @b{@value{LANGUAGE}
-Applications User's Manual} for the reset code
-which is executed before the call to @code{rtems_initialize_executive},
-the PowrePC version has the following specific requirements:
-
-@itemize @bullet
-@item Must leave the PR bit of the Machine State Register (MSR) set
-to 0 so the PowerPC remains in the supervisor state.
-
-@item Must set stack pointer (sp or r1) such that a minimum stack
-size of MINIMUM_STACK_SIZE bytes is provided for the
-@code{rtems_initialize_executive} directive.
-
-@item Must disable all external interrupts (i.e. clear the EI (EE)
-bit of the machine state register).
-
-@item Must enable traps so window overflow and underflow
-conditions can be properly handled.
-
-@item Must initialize the PowerPC's initial Exception Table with default
-handlers.
-
-@end itemize
-
diff --git a/doc/supplements/powerpc/callconv.t b/doc/supplements/powerpc/callconv.t
deleted file mode 100644
index 70a98f44ba..0000000000
--- a/doc/supplements/powerpc/callconv.t
+++ /dev/null
@@ -1,229 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Calling Conventions
-
-@section Introduction
-
-Each high-level language compiler generates
-subroutine entry and exit code based upon a set of rules known
-as the compiler's calling convention. These rules address the
-following issues:
-
-@itemize @bullet
-@item register preservation and usage
-
-@item parameter passing
-
-@item call and return mechanism
-@end itemize
-
-A compiler's calling convention is of importance when
-interfacing to subroutines written in another language either
-assembly or high-level. Even when the high-level language and
-target processor are the same, different compilers may use
-different calling conventions. As a result, calling conventions
-are both processor and compiler dependent.
-
-RTEMS supports the Embedded Application Binary Interface (EABI)
-calling convention. Documentation for EABI is available by sending
-a message with a subject line of "EABI" to eabi@@goth.sis.mot.com.
-
-@section Programming Model
-
-This section discusses the programming model for the
-PowerPC architecture.
-
-@subsection Non-Floating Point Registers
-
-The PowerPC architecture defines thirty-two non-floating point registers
-directly visible to the programmer. In thirty-two bit implementations, each
-register is thirty-two bits wide. In sixty-four bit implementations, each
-register is sixty-four bits wide.
-
-These registers are referred to as @code{gpr0} to @code{gpr31}.
-
-Some of the registers serve defined roles in the EABI programming model.
-The following table describes the role of each of these registers:
-
-@ifset use-ascii
-@example
-@group
- +---------------+----------------+------------------------------+
- | Register Name | Alternate Name | Description |
- +---------------+----------------+------------------------------+
- | r1 | sp | stack pointer |
- +---------------+----------------+------------------------------+
- | | | global pointer to the Small |
- | r2 | na | Constant Area (SDA2) |
- +---------------+----------------+------------------------------+
- | r3 - r12 | na | parameter and result passing |
- +---------------+----------------+------------------------------+
- | | | global pointer to the Small |
- | r13 | na | Data Area (SDA) |
- +---------------+----------------+------------------------------+
-@end group
-@end example
-@end ifset
-
-@ifset use-tex
-@sp 1
-@tex
-\centerline{\vbox{\offinterlineskip\halign{
-\vrule\strut#&
-\hbox to 1.75in{\enskip\hfil#\hfil}&
-\vrule#&
-\hbox to 1.75in{\enskip\hfil#\hfil}&
-\vrule#&
-\hbox to 2.50in{\enskip\hfil#\hfil}&
-\vrule#\cr
-\noalign{\hrule}
-&\bf Register Name &&\bf Alternate Names&&\bf Description&\cr\noalign{\hrule}
-&r1&&sp&&stack pointer&\cr\noalign{\hrule}
-&r2&&NA&&global pointer to the Small&\cr
-&&&&&Constant Area (SDA2)&\cr\noalign{\hrule}
-&r3 - r12&&NA&&parameter and result passing&\cr\noalign{\hrule}
-&r13&&NA&&global pointer to the Small&\cr
-&&&&&Data Area (SDA2)&\cr\noalign{\hrule}
-}}\hfil}
-@end tex
-@end ifset
-
-@ifset use-html
-@html
-<CENTER>
- <TABLE COLS=3 WIDTH="80%" BORDER=2>
-<TR><TD ALIGN=center><STRONG>Register Name</STRONG></TD>
- <TD ALIGN=center><STRONG>Alternate Name</STRONG></TD>
- <TD ALIGN=center><STRONG>Description</STRONG></TD></TR>
-<TR><TD ALIGN=center>r1</TD>
- <TD ALIGN=center>sp</TD>
- <TD ALIGN=center>stack pointer</TD></TR>
-<TR><TD ALIGN=center>r2</TD>
- <TD ALIGN=center>na</TD>
- <TD ALIGN=center>global pointer to the Small Constant Area (SDA2)</TD></TR>
-<TR><TD ALIGN=center>r3 - r12</TD>
- <TD ALIGN=center>NA</TD>
- <TD ALIGN=center>parameter and result passing</TD></TR>
-<TR><TD ALIGN=center>r13</TD>
- <TD ALIGN=center>NA</TD>
- <TD ALIGN=center>global pointer to the Small Data Area (SDA)</TD></TR>
- </TABLE>
-</CENTER>
-@end html
-@end ifset
-
-
-@subsection Floating Point Registers
-
-The PowerPC architecture includes thirty-two, sixty-four bit
-floating point registers. All PowerPC floating point instructions
-interpret these registers as 32 double precision floating point registers,
-regardless of whether the processor has 64-bit or 32-bit implementation.
-
-The floating point status and control register (fpscr) records exceptions
-and the type of result generated by floating-point operations.
-Additionally, it controls the rounding mode of operations and allows the
-reporting of floating exceptions to be enabled or disabled.
-
-@subsection Special Registers
-
-The PowerPC architecture includes a number of special registers
-which are critical to the programming model:
-
-@table @b
-
-@item Machine State Register
-
-The MSR contains the processor mode, power management mode, endian mode,
-exception information, privilege level, floating point available and
-floating point excepiton mode, address translation information and
-the exception prefix.
-
-@item Link Register
-
-The LR contains the return address after a function call. This register
-must be saved before a subsequent subroutine call can be made. The
-use of this register is discussed further in the @b{Call and Return
-Mechanism} section below.
-
-@item Count Register
-
-The CTR contains the iteration variable for some loops. It may also be used
-for indirect function calls and jumps.
-
-@end table
-
-@section Call and Return Mechanism
-
-The PowerPC architecture supports a simple yet effective call
-and return mechanism. A subroutine is invoked
-via the "branch and link" (@code{bl}) and
-"brank and link absolute" (@code{bla})
-instructions. This instructions place the return address
-in the Link Register (LR). The callee returns to the caller by
-executing a "branch unconditional to the link register" (@code{blr})
-instruction. Thus the callee returns to the caller via a jump
-to the return address which is stored in the LR.
-
-The previous contents of the LR are not automatically saved
-by either the @code{bl} or @code{bla}. It is the responsibility
-of the callee to save the contents of the LR before invoking
-another subroutine. If the callee invokes another subroutine,
-it must restore the LR before executing the @code{blr} instruction
-to return to the caller.
-
-It is important to note that the PowerPC subroutine
-call and return mechanism does not automatically save and
-restore any registers.
-
-The LR may be accessed as special purpose register 8 (@code{SPR8}) using the
-"move from special register" (@code{mfspr}) and
-"move to special register" (@code{mtspr}) instructions.
-
-@section Calling Mechanism
-
-All RTEMS directives are invoked using the regular
-PowerPC EABI calling convention via the @code{bl} or
-@code{bla} instructions.
-
-@section Register Usage
-
-As discussed above, the call instruction does not
-automatically save any registers. It is the responsibility
-of the callee to save and restore any registers which must be preserved
-across subroutine calls. The callee is responsible for saving
-callee-preserved registers to the program stack and restoring them
-before returning to the caller.
-
-@section Parameter Passing
-
-RTEMS assumes that arguments are placed in the
-general purpose registers with the first argument in
-register 3 (@code{r3}), the second argument in general purpose
-register 4 (@code{r4}), and so forth until the seventh
-argument is in general purpose register 10 (@code{r10}).
-If there are more than seven arguments, then subsequent arguments
-are placed on the program stack. The following pseudo-code
-illustrates the typical sequence used to call a RTEMS directive
-with three (3) arguments:
-
-@example
-load third argument into r5
-load second argument into r4
-load first argument into r3
-invoke directive
-@end example
-
-@section User-Provided Routines
-
-All user-provided routines invoked by RTEMS, such as
-user extensions, device drivers, and MPCI routines, must also
-adhere to these same calling conventions.
-
-
diff --git a/doc/supplements/powerpc/cpumodel.t b/doc/supplements/powerpc/cpumodel.t
deleted file mode 100644
index 5fe621d828..0000000000
--- a/doc/supplements/powerpc/cpumodel.t
+++ /dev/null
@@ -1,156 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter CPU Model Dependent Features
-
-@section Introduction
-
-Microprocessors are generally classified into
-families with a variety of CPU models or implementations within
-that family. Within a processor family, there is a high level
-of binary compatibility. This family may be based on either an
-architectural specification or on maintaining compatibility with
-a popular processor. Recent microprocessor families such as the
-PowerPC, SPARC, and PA-RISC are based on an architectural specification
-which is independent or any particular CPU model or
-implementation. Older families such as the M68xxx and the iX86
-evolved as the manufacturer strived to produce higher
-performance processor models which maintained binary
-compatibility with older models.
-
-RTEMS takes advantage of the similarity of the
-various models within a CPU family. Although the models do vary
-in significant ways, the high level of compatibility makes it
-possible to share the bulk of the CPU dependent executive code
-across the entire family.
-
-@section CPU Model Feature Flags
-
-Each processor family supported by RTEMS has a
-list of features which vary between CPU models
-within a family. For example, the most common model dependent
-feature regardless of CPU family is the presence or absence of a
-floating point unit or coprocessor. When defining the list of
-features present on a particular CPU model, one simply notes
-that floating point hardware is or is not present and defines a
-single constant appropriately. Conditional compilation is
-utilized to include the appropriate source code for this CPU
-model's feature set. It is important to note that this means
-that RTEMS is thus compiled using the appropriate feature set
-and compilation flags optimal for this CPU model used. The
-alternative would be to generate a binary which would execute on
-all family members using only the features which were always
-present.
-
-This section presents the set of features which vary
-across PowerPC implementations and are of importance to RTEMS.
-The set of CPU model feature macros are defined in the file
-c/src/exec/score/cpu/ppc/ppc.h based upon the particular CPU
-model defined on the compilation command line.
-
-@subsection CPU Model Name
-
-The macro CPU_MODEL_NAME is a string which designates
-the name of this CPU model. For example, for the PowerPC 603e
-model, this macro is set to the string "PowerPC 603e".
-
-@subsection Floating Point Unit
-
-The macro PPC_HAS_FPU is set to 1 to indicate that this CPU model
-has a hardware floating point unit and 0 otherwise.
-
-@subsection Alignment
-
-The macro PPC_ALIGNMENT is set to the PowerPC model's worst case alignment
-requirement for data types on a byte boundary. This value is used
-to derive the alignment restrictions for memory allocated from
-regions and partitions.
-
-@subsection Cache Alignment
-
-The macro PPC_CACHE_ALIGNMENT is set to the line size of the cache. It is
-used to align the entry point of critical routines so that as much code
-as possible can be retrieved with the initial read into cache. This
-is done for the interrupt handler as well as the context switch routines.
-
-In addition, the "shortcut" data structure used by the PowerPC implementation
-to ease access to data elements frequently accessed by RTEMS routines
-implemented in assembly language is aligned using this value.
-
-@subsection Maximum Interrupts
-
-The macro PPC_INTERRUPT_MAX is set to the number of exception sources
-supported by this PowerPC model.
-
-@subsection Has Double Precision Floating Point
-
-The macro PPC_HAS_DOUBLE is set to 1 to indicate that the PowerPC model
-has support for double precision floating point numbers. This is
-important because the floating point registers need only be four bytes
-wide (not eight) if double precision is not supported.
-
-@subsection Critical Interrupts
-
-The macro PPC_HAS_RFCI is set to 1 to indicate that the PowerPC model
-has the Critical Interrupt capability as defined by the IBM 403 models.
-
-@subsection Use Multiword Load/Store Instructions
-
-The macro PPC_USE_MULTIPLE is set to 1 to indicate that multiword load and
-store instructions should be used to perform context switch operations.
-The relative efficiency of multiword load and store instructions versus
-an equivalent set of single word load and store instructions varies based
-upon the PowerPC model.
-
-@subsection Instruction Cache Size
-
-The macro PPC_I_CACHE is set to the size in bytes of the instruction cache.
-
-@subsection Data Cache Size
-
-The macro PPC_D_CACHE is set to the size in bytes of the data cache.
-
-@subsection Debug Model
-
-The macro PPC_DEBUG_MODEL is set to indicate the debug support features
-present in this CPU model. The following debug support feature sets
-are currently supported:
-
-@table @b
-
-@item @code{PPC_DEBUG_MODEL_STANDARD}
-indicates that the single-step trace enable (SE) and branch trace
-enable (BE) bits in the MSR are supported by this CPU model.
-
-@item @code{PPC_DEBUG_MODEL_SINGLE_STEP_ONLY}
-indicates that only the single-step trace enable (SE) bit in the MSR
-is supported by this CPU model.
-
-@item @code{PPC_DEBUG_MODEL_IBM4xx}
-indicates that the debug exception enable (DE) bit in the MSR is supported
-by this CPU model. At this time, this particular debug feature set
-has only been seen in the IBM 4xx series.
-
-@end table
-
-@subsection Low Power Model
-
-The macro PPC_LOW_POWER_MODE is set to indicate the low power model
-supported by this CPU model. The following low power modes are currently
-supported.
-
-@table @b
-
-@item @code{PPC_LOW_POWER_MODE_NONE}
-indicates that this CPU model has no low power mode support.
-
-@item @code{PPC_LOW_POWER_MODE_STANDARD}
-indicates that this CPU model follows the low power model defined for
-the PPC603e.
-
-@end table
diff --git a/doc/supplements/powerpc/cputable.t b/doc/supplements/powerpc/cputable.t
deleted file mode 100644
index 8759a9ce6e..0000000000
--- a/doc/supplements/powerpc/cputable.t
+++ /dev/null
@@ -1,155 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Processor Dependent Information Table
-
-@section Introduction
-
-Any highly processor dependent information required
-to describe a processor to RTEMS is provided in the CPU
-Dependent Information Table. This table is not required for all
-processors supported by RTEMS. This chapter describes the
-contents, if any, for a particular processor type.
-
-@section CPU Dependent Information Table
-
-The PowerPC version of the RTEMS CPU Dependent
-Information Table is given by the C structure definition is
-shown below:
-
-@example
-typedef struct @{
- void (*pretasking_hook)( void );
- void (*predriver_hook)( void );
- void (*postdriver_hook)( void );
- void (*idle_task)( void );
- boolean do_zero_of_workspace;
- unsigned32 idle_task_stack_size;
- unsigned32 interrupt_stack_size;
- unsigned32 extra_mpci_receive_server_stack;
- void * (*stack_allocate_hook)( unsigned32 );
- void (*stack_free_hook)( void* );
- /* end of fields required on all CPUs */
-
- unsigned32 clicks_per_usec; /* Timer clicks per microsecond */
- void (*spurious_handler)(
- unsigned32 vector, CPU_Interrupt_frame *);
- boolean exceptions_in_RAM; /* TRUE if in RAM */
-
-#if defined(ppc403)
- unsigned32 serial_per_sec; /* Serial clocks per second */
- boolean serial_external_clock;
- boolean serial_xon_xoff;
- boolean serial_cts_rts;
- unsigned32 serial_rate;
- unsigned32 timer_average_overhead; /* in ticks */
- unsigned32 timer_least_valid; /* Least valid number from timer */
-#endif
-@};
-@end example
-
-@table @code
-@item pretasking_hook
-is the address of the user provided routine which is invoked
-once RTEMS APIs are initialized. This routine will be invoked
-before any system tasks are created. Interrupts are disabled.
-This field may be NULL to indicate that the hook is not utilized.
-
-@item predriver_hook
-is the address of the user provided
-routine that is invoked immediately before the
-the device drivers and MPCI are initialized. RTEMS
-initialization is complete but interrupts and tasking are disabled.
-This field may be NULL to indicate that the hook is not utilized.
-
-@item postdriver_hook
-is the address of the user provided
-routine that is invoked immediately after the
-the device drivers and MPCI are initialized. RTEMS
-initialization is complete but interrupts and tasking are disabled.
-This field may be NULL to indicate that the hook is not utilized.
-
-@item idle_task
-is the address of the optional user
-provided routine which is used as the system's IDLE task. If
-this field is not NULL, then the RTEMS default IDLE task is not
-used. This field may be NULL to indicate that the default IDLE
-is to be used.
-
-@item do_zero_of_workspace
-indicates whether RTEMS should
-zero the Workspace as part of its initialization. If set to
-TRUE, the Workspace is zeroed. Otherwise, it is not.
-
-@item idle_task_stack_size
-is the size of the RTEMS idle task stack in bytes.
-If this number is less than MINIMUM_STACK_SIZE, then the
-idle task's stack will be MINIMUM_STACK_SIZE in byte.
-
-@item interrupt_stack_size
-is the size of the RTEMS allocated interrupt stack in bytes.
-This value must be at least as large as MINIMUM_STACK_SIZE.
-
-@item extra_mpci_receive_server_stack
-is the extra stack space allocated for the RTEMS MPCI receive server task
-in bytes. The MPCI receive server may invoke nearly all directives and
-may require extra stack space on some targets.
-
-@item stack_allocate_hook
-is the address of the optional user provided routine which allocates
-memory for task stacks. If this hook is not NULL, then a stack_free_hook
-must be provided as well.
-
-@item stack_free_hook
-is the address of the optional user provided routine which frees
-memory for task stacks. If this hook is not NULL, then a stack_allocate_hook
-must be provided as well.
-
-@item clicks_per_usec
-is the number of decrementer interupts that occur each microsecond.
-
-@item spurious_handler
-is the address of the
-routine which is invoked when a spurious interrupt occurs.
-
-@item exceptions_in_RAM
-indicates whether the exception vectors are located in RAM or ROM. If
-they are located in RAM dynamic vector installation occurs, otherwise
-it does not.
-
-@item serial_per_sec
-is a PPC403 specific field which specifies the number of clock
-ticks per second for the PPC403 serial timer.
-
-@item serial_rate
-is a PPC403 specific field which specifies the baud rate for the
-PPC403 serial port.
-
-@item serial_external_clock
-is a PPC403 specific field which indicates whether or not to mask in a 0x2 into
-the Input/Output Configuration Register (IOCR) during initialization of the
-PPC403 console. (NOTE: This bit is defined as "reserved" 6-12?)
-
-@item serial_xon_xoff
-is a PPC403 specific field which indicates whether or not
-XON/XOFF flow control is supported for the PPC403 serial port.
-
-@item serial_cts_rts
-is a PPC403 specific field which indicates whether or not to set the
-least significant bit of the Input/Output Configuration Register
-(IOCR) during initialization of the PPC403 console. (NOTE: This
-bit is defined as "reserved" 6-12?)
-
-@item timer_average_overhead
-is a PPC403 specific field which specifies the average number of overhead ticks that occur on the PPC403 timer.
-
-@item timer_least_valid
-is a PPC403 specific field which specifies the maximum valid PPC403 timer value.
-
-@end table
-
diff --git a/doc/supplements/powerpc/fatalerr.t b/doc/supplements/powerpc/fatalerr.t
deleted file mode 100644
index 45d154c271..0000000000
--- a/doc/supplements/powerpc/fatalerr.t
+++ /dev/null
@@ -1,47 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Default Fatal Error Processing
-
-@section Introduction
-
-Upon detection of a fatal error by either the
-application or RTEMS the fatal error manager is invoked. The
-fatal error manager will invoke the user-supplied fatal error
-handlers. If no user-supplied handlers are configured, the
-RTEMS provided default fatal error handler is invoked. If the
-user-supplied fatal error handlers return to the executive the
-default fatal error handler is then invoked. This chapter
-describes the precise operations of the default fatal error
-handler.
-
-@section Default Fatal Error Handler Operations
-
-The default fatal error handler which is invoked by
-the @code{rtems_fatal_error_occurred} directive when there is no user handler
-configured or the user handler returns control to RTEMS. The
-default fatal error handler performs the following actions:
-
-@itemize @bullet
-
-@item places the error code in r3, and
-
-@item executes a trap instruction which results in a Program Exception.
-
-@end itemize
-
-If the Program Exception returns, then the following actions are performed:
-
-@itemize @bullet
-
-@item disables all processor exceptions by loading a 0 into the MSR, and
-
-@item goes into an infinite loop to simulate a halt processor instruction.
-
-@end itemize
-
diff --git a/doc/supplements/powerpc/intr_NOTIMES.t b/doc/supplements/powerpc/intr_NOTIMES.t
deleted file mode 100644
index 6332550490..0000000000
--- a/doc/supplements/powerpc/intr_NOTIMES.t
+++ /dev/null
@@ -1,184 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Interrupt Processing
-
-@section Introduction
-
-Different types of processors respond to the
-occurrence of an interrupt in its own unique fashion. In
-addition, each processor type provides a control mechanism to
-allow for the proper handling of an interrupt. The processor
-dependent response to the interrupt modifies the current
-execution state and results in a change in the execution stream.
-Most processors require that an interrupt handler utilize some
-special control mechanisms to return to the normal processing
-stream. Although RTEMS hides many of the processor dependent
-details of interrupt processing, it is important to understand
-how the RTEMS interrupt manager is mapped onto the processor's
-unique architecture. Discussed in this chapter are the PowerPC's
-interrupt response and control mechanisms as they pertain to
-RTEMS.
-
-RTEMS and associated documentation uses the terms
-interrupt and vector. In the PowerPC architecture, these terms
-correspond to exception and exception handler, respectively. The terms will
-be used interchangeably in this manual.
-
-@section Synchronous Versus Asynchronous Exceptions
-
-In the PowerPC architecture exceptions can be either precise or
-imprecise and either synchronous or asynchronous. Asynchronous
-exceptions occur when an external event interrupts the processor.
-Synchronous exceptions are caused by the actions of an
-instruction. During an exception SRR0 is used to calculate where
-instruction processing should resume. All instructions prior to
-the resume instruction will have completed execution. SRR1 is used to
-store the machine status.
-
-There are two asynchronous nonmaskable, highest-priority exceptions
-system reset and machine check. There are two asynchrononous maskable
-low-priority exceptions external interrupt and decrementer. Nonmaskable
-execptions are never delayed, therefore if two nonmaskable, asynchronous
-exceptions occur in immediate succession, the state information saved by
-the first exception may be overwritten when the subsequent exception occurs.
-
-The PowerPC arcitecure defines one imprecise exception, the imprecise
-floating point enabled exception. All other synchronous exceptions are
-precise. The synchronization occuring during asynchronous precise
-exceptions conforms to the requirements for context synchronization.
-
-@section Vectoring of Interrupt Handler
-
-Upon determining that an exception can be taken the PowerPC automatically
-performs the following actions:
-
-@itemize @bullet
-@item an instruction address is loaded into SRR0
-
-@item bits 33-36 and 42-47 of SRR1 are loaded with information
-specific to the exception.
-
-@item bits 0-32, 37-41, and 48-63 of SRR1 are loaded with corresponding
-bits from the MSR.
-
-@item the MSR is set based upon the exception type.
-
-@item instruction fetch and execution resumes, using the new MSR value, at a location specific to the execption type.
-
-@end itemize
-
-If the interrupt handler was installed as an RTEMS
-interrupt handler, then upon receipt of the interrupt, the
-processor passes control to the RTEMS interrupt handler which
-performs the following actions:
-
-@itemize @bullet
-@item saves the state of the interrupted task on it's stack,
-
-@item saves all registers which are not normally preserved
-by the calling sequence so the user's interrupt service
-routine can be written in a high-level language.
-
-@item if this is the outermost (i.e. non-nested) interrupt,
-then the RTEMS interrupt handler switches from the current stack
-to the interrupt stack,
-
-@item enables exceptions,
-
-@item invokes the vectors to a user interrupt service routine (ISR).
-@end itemize
-
-Asynchronous interrupts are ignored while exceptions are
-disabled. Synchronous interrupts which occur while are
-disabled result in the CPU being forced into an error mode.
-
-A nested interrupt is processed similarly with the
-exception that the current stack need not be switched to the
-interrupt stack.
-
-@section Interrupt Levels
-
-The PowerPC architecture supports only a single external
-asynchronous interrupt source. This interrupt source
-may be enabled and disabled via the External Interrupt Enable (EE)
-bit in the Machine State Register (MSR). Thus only two level (enabled
-and disabled) of external device interrupt priorities are
-directly supported by the PowerPC architecture.
-
-Some PowerPC implementations include a Critical Interrupt capability
-which is often used to receive interrupts from high priority external
-devices.
-
-The RTEMS interrupt level mapping scheme for the PowerPC is not
-a numeric level as on most RTEMS ports. It is a bit mapping in
-which the least three significiant bits of the interrupt level
-are mapped directly to the enabling of specific interrupt
-sources as follows:
-
-@table @b
-
-@item Critical Interrupt
-Setting bit 0 (the least significant bit) of the interrupt level
-enables the Critical Interrupt source, if it is available on this
-CPU model.
-
-@item Machine Check
-Setting bit 1 of the interrupt level enables Machine Check execptions.
-
-@item External Interrupt
-Setting bit 2 of the interrupt level enables External Interrupt execptions.
-
-@end table
-
-All other bits in the RTEMS task interrupt level are ignored.
-
-@section Disabling of Interrupts by RTEMS
-
-During the execution of directive calls, critical
-sections of code may be executed. When these sections are
-encountered, RTEMS disables Critical Interrupts, External Interrupts
-and Machine Checks before the execution of this section and restores
-them to the previous level upon completion of the section. RTEMS has been
-optimized to insure that interrupts are disabled for less than
-RTEMS_MAXIMUM_DISABLE_PERIOD microseconds on a
-RTEMS_MAXIMUM_DISABLE_PERIOD_MHZ Mhz PowerPC 603e with zero
-wait states. These numbers will vary based the number of wait
-states and processor speed present on the target board.
-[NOTE: The maximum period with interrupts disabled is hand calculated. This
-calculation was last performed for Release
-RTEMS_RELEASE_FOR_MAXIMUM_DISABLE_PERIOD.]
-
-If a PowerPC implementation provides non-maskable interrupts (NMI)
-which cannot be disabled, ISRs which process these interrupts
-MUST NEVER issue RTEMS system calls. If a directive is invoked,
-unpredictable results may occur due to the inability of RTEMS
-to protect its critical sections. However, ISRs that make no
-system calls may safely execute as non-maskable interrupts.
-
-@section Interrupt Stack
-
-The PowerPC architecture does not provide for a
-dedicated interrupt stack. Thus by default, exception handlers would
-execute on the stack of the RTEMS task which they interrupted.
-This artificially inflates the stack requirements for each task
-since EVERY task stack would have to include enough space to
-account for the worst case interrupt stack requirements in
-addition to it's own worst case usage. RTEMS addresses this
-problem on the PowerPC by providing a dedicated interrupt stack
-managed by software.
-
-During system initialization, RTEMS allocates the
-interrupt stack from the Workspace Area. The amount of memory
-allocated for the interrupt stack is determined by the
-interrupt_stack_size field in the CPU Configuration Table. As
-part of processing a non-nested interrupt, RTEMS will switch to
-the interrupt stack before invoking the installed handler.
-
-
-
diff --git a/doc/supplements/powerpc/memmodel.t b/doc/supplements/powerpc/memmodel.t
deleted file mode 100644
index 581c55c18c..0000000000
--- a/doc/supplements/powerpc/memmodel.t
+++ /dev/null
@@ -1,110 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Memory Model
-
-@section Introduction
-
-A processor may support any combination of memory
-models ranging from pure physical addressing to complex demand
-paged virtual memory systems. RTEMS supports a flat memory
-model which ranges contiguously over the processor's allowable
-address space. RTEMS does not support segmentation or virtual
-memory of any kind. The appropriate memory model for RTEMS
-provided by the targeted processor and related characteristics
-of that model are described in this chapter.
-
-@section Flat Memory Model
-
-The PowerPC architecture supports a variety of memory models.
-RTEMS supports the PowerPC using a flat memory model with
-paging disabled. In this mode, the PowerPC automatically
-converts every address from a logical to a physical address
-each time it is used. The PowerPC uses information provided
-in the Block Address Translation (BAT) to convert these addresses.
-
-Implementations of the PowerPC architecture may be thirty-two or sixty-four bit.
-The PowerPC architecture supports a flat thirty-two or sixty-four bit address
-space with addresses ranging from 0x00000000 to 0xFFFFFFFF (4
-gigabytes) in thirty-two bit implementations or to 0xFFFFFFFFFFFFFFFF
-in sixty-four bit implementations. Each address is represented
-by either a thirty-two bit or sixty-four bit value and is byte addressable.
-The address may be used to reference a single byte, half-word
-(2-bytes), word (4 bytes), or in sixty-four bit implementations a
-doubleword (8 bytes). Memory accesses within the address space are
-performed in big or little endian fashion by the PowerPC based
-upon the current setting of the Little-endian mode enable bit (LE)
-in the Machine State Register (MSR). While the processor is in
-big endian mode, memory accesses which are not properly aligned
-generate an "alignment exception" (vector offset 0x00600). In
-little endian mode, the PowerPC architecture does not require
-the processor to generate alignment exceptions.
-
-The following table lists the alignment requirements for a variety
-of data accesses:
-
-@ifset use-ascii
-@example
-@group
- +--------------+-----------------------+
- | Data Type | Alignment Requirement |
- +--------------+-----------------------+
- | byte | 1 |
- | half-word | 2 |
- | word | 4 |
- | doubleword | 8 |
- +--------------+-----------------------+
-@end group
-@end example
-@end ifset
-
-@ifset use-tex
-@sp 1
-@tex
-\centerline{\vbox{\offinterlineskip\halign{
-\vrule\strut#&
-\hbox to 1.75in{\enskip\hfil#\hfil}&
-\vrule#&
-\hbox to 1.75in{\enskip\hfil#\hfil}&
-\vrule#\cr
-\noalign{\hrule}
-&\bf Data Type &&\bf Alignment Requirement&\cr\noalign{\hrule}
-&byte&&1&\cr\noalign{\hrule}
-&half-word&&2&\cr\noalign{\hrule}
-&word&&4&\cr\noalign{\hrule}
-&doubleword&&8&\cr\noalign{\hrule}
-}}\hfil}
-@end tex
-@end ifset
-
-@ifset use-html
-@html
-<CENTER>
- <TABLE COLS=2 WIDTH="60%" BORDER=2>
-<TR><TD ALIGN=center><STRONG>Data Type</STRONG></TD>
- <TD ALIGN=center><STRONG>Alignment Requirement</STRONG></TD></TR>
-<TR><TD ALIGN=center>byte</TD>
- <TD ALIGN=center>1</TD></TR>
-<TR><TD ALIGN=center>half-word</TD>
- <TD ALIGN=center>2</TD></TR>
-<TR><TD ALIGN=center>word</TD>
- <TD ALIGN=center>4</TD></TR>
-<TR><TD ALIGN=center>doubleword</TD>
- <TD ALIGN=center>8</TD></TR>
- </TABLE>
-</CENTER>
-@end html
-@end ifset
-
-Doubleword load and store operations are only available in
-PowerPC CPU models which are sixty-four bit implementations.
-
-RTEMS does not directly support any PowerPC Memory Management
-Units, therefore, virtual memory or segmentation systems
-involving the PowerPC are not supported.
-
diff --git a/doc/supplements/powerpc/powerpc.texi b/doc/supplements/powerpc/powerpc.texi
deleted file mode 100644
index b9661ad02d..0000000000
--- a/doc/supplements/powerpc/powerpc.texi
+++ /dev/null
@@ -1,121 +0,0 @@
-\input texinfo @c -*-texinfo-*-
-@c %**start of header
-@setfilename c_powerpc
-@syncodeindex vr fn
-@synindex ky cp
-@paragraphindent 0
-@c @smallbook
-@c %**end of header
-
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@c
-@c Master file for the PowerPC Applications Supplement
-@c
-
-@include ../../common/setup.texi
-
-@ignore
-@ifinfo
-@format
-START-INFO-DIR-ENTRY
-* RTEMS PowerPC Applications Supplement (powerpc):
-END-INFO-DIR-ENTRY
-@end format
-@end ifinfo
-@end ignore
-
-@c
-@c Title Page Stuff
-@c
-
-@set edition @value{RTEMS-EDITION}
-@set version @value{RTEMS-VERSION}
-@set update-date @value{RTEMS-UPDATE-DATE}
-@set update-month @value{RTEMS-UPDATE-MONTH}
-
-@c
-@c I don't really like having a short title page. --joel
-@c
-@c @shorttitlepage RTEMS PowerPC Applications Supplement
-
-@setchapternewpage odd
-@settitle RTEMS PowerPC Applications Supplement
-@titlepage
-@finalout
-
-@title RTEMS PowerPC Applications Supplement
-@subtitle Edition @value{edition}, for RTEMS @value{version}
-@sp 1
-@subtitle @value{update-month}
-@author On-Line Applications Research Corporation
-@page
-@include ../../common/cpright.texi
-@end titlepage
-
-@c This prevents a black box from being printed on "overflow" lines.
-@c The alternative is to rework a sentence to avoid this problem.
-
-@include preface.texi
-@include cpumodel.texi
-@include callconv.texi
-@include memmodel.texi
-@include intr.texi
-@include fatalerr.texi
-@include bsp.texi
-@include cputable.texi
-@include wksheets.texi
-@include timing.texi
-@include timePSIM.texi
-@include timeDMV177.texi
-@ifinfo
-@node Top, Preface, (dir), (dir)
-@top c_powerpc
-
-This is the online version of the RTEMS PowerPC Applications Supplement.
-
-@menu
-* Preface::
-* CPU Model Dependent Features::
-* Calling Conventions::
-* Memory Model::
-* Interrupt Processing::
-* Default Fatal Error Processing::
-* Board Support Packages::
-* Processor Dependent Information Table::
-* Memory Requirements::
-* Timing Specification::
-* PSIM Timing Data::
-* DMV177 Timing Data::
-* Command and Variable Index::
-* Concept Index::
-@end menu
-
-@end ifinfo
-@c
-@c
-@c Need to copy the emacs stuff and "trailer stuff" (index, toc) into here
-@c
-
-@node Command and Variable Index, Concept Index, DMV177 Timing Data Rate Monotonic Manager, Top
-@unnumbered Command and Variable Index
-
-There are currently no Command and Variable Index entries.
-
-@c @printindex fn
-
-@node Concept Index, , Command and Variable Index, Top
-@unnumbered Concept Index
-
-There are currently no Concept Index entries.
-@c @printindex cp
-
-@contents
-@bye
-
diff --git a/doc/supplements/powerpc/preface.texi b/doc/supplements/powerpc/preface.texi
deleted file mode 100644
index 636344843d..0000000000
--- a/doc/supplements/powerpc/preface.texi
+++ /dev/null
@@ -1,94 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@ifinfo
-@node Preface, CPU Model Dependent Features, Top, Top
-@end ifinfo
-@unnumbered Preface
-
-The Real Time Executive for Multiprocessor Systems
-(RTEMS) is designed to be portable across multiple processor
-architectures. However, the nature of real-time systems makes
-it essential that the application designer understand certain
-processor dependent implementation details. These processor
-dependencies include calling convention, board support package
-issues, interrupt processing, exact RTEMS memory requirements,
-performance data, header files, and the assembly language
-interface to the executive.
-
-This document discusses the PowerPC architecture
-dependencies in this port of RTEMS.
-
-It is highly recommended that the PowerPC RTEMS
-application developer obtain and become familiar with the
-documentation for the processor being used as well as the
-specification for the revision of the PowerPC architecture which
-corresponds to that processor.
-
-@subheading PowerPC Architecture Documents
-
-For information on the PowerPC architecture, refer to
-the following documents available from Motorola and IBM:
-
-@itemize @bullet
-
-@item @cite{PowerPC Microprocessor Family: The Programming Environment}
-(Motorola Document MPRPPCFPE-01).
-
-@item @cite{IBM PPC403GB Embedded Controller User's Manual}.
-
-@item @cite{PoweRisControl MPC500 Family RCPU RISC Central Processing
-Unit Reference Manual} (Motorola Document RCPUURM/AD).
-
-@item @cite{PowerPC 601 RISC Microprocessor User's Manual}
-(Motorola Document MPR601UM/AD).
-
-@item @cite{PowerPC 603 RISC Microprocessor User's Manual}
-(Motorola Document MPR603UM/AD).
-
-@item @cite{PowerPC 603e RISC Microprocessor User's Manual}
-(Motorola Document MPR603EUM/AD).
-
-@item @cite{PowerPC 604 RISC Microprocessor User's Manual}
-(Motorola Document MPR604UM/AD).
-
-@item @cite{PowerPC MPC821 Portable Systems Microprocessor User's Manual}
-(Motorola Document MPC821UM/AD).
-
-@item @cite{PowerQUICC MPC860 User's Manual} (Motorola Document MPC860UM/AD).
-
-
-@end itemize
-
-Motorola maintains an on-line electronic library for the PowerPC
-at the following URL:
-
-@itemize @code{ }
-@item @cite{http://www.mot.com/powerpc/library/library.html}
-@end itemize
-
-This site has a a wealth of information and examples. Many of the
-manuals are available from that site in electronic format.
-
-@subheading PowerPC Processor Simulator Information
-
-PSIM is a program which emulates the Instruction Set Architecture
-of the PowerPC microprocessor family. It is reely available in source
-code form under the terms of the GNU General Public License (version
-2 or later). PSIM can be integrated with the GNU Debugger (gdb) to
-execute and debug PowerPC executables on non-PowerPC hosts. PSIM
-supports the addition of user provided device models which can be
-used to allow one to develop and debug embedded applications using
-the simulator.
-
-The latest version of PSIM is made available to the public via
-anonymous ftp at ftp://ftp.ci.com.au/pub/psim or
-ftp://cambridge.cygnus.com/pub/psim. There is also a mailing list
-at powerpc-psim@@ci.com.au.
-
-
diff --git a/doc/supplements/powerpc/timeDMV177.t b/doc/supplements/powerpc/timeDMV177.t
deleted file mode 100644
index c46bdfbd80..0000000000
--- a/doc/supplements/powerpc/timeDMV177.t
+++ /dev/null
@@ -1,113 +0,0 @@
-@c
-@c Timing information for the DMV177
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@include ../../common/timemac.texi
-@tex
-\global\advance \smallskipamount by -4pt
-@end tex
-
-@chapter RTEMS_BSP Timing Data
-
-@section Introduction
-
-The timing data for RTEMS on the DY-4 RTEMS_BSP board
-is provided along with the target
-dependent aspects concerning the gathering of the timing data.
-The hardware platform used to gather the times is described to
-give the reader a better understanding of each directive time
-provided. Also, provided is a description of the interrupt
-latency and the context switch times as they pertain to the
-PowerPC version of RTEMS.
-
-@section Hardware Platform
-
-All times reported in this chapter were measured using a RTEMS_BSP board.
-All data and code caching was disabled. This results in very deterministic
-times which represent the worst possible performance. Many embedded
-applications disable caching to insure that execution times are
-repeatable. Moreover, the JTAG port on certain revisions of the PowerPC
-603e does not operate properly if caching is enabled. Thus during
-development and debug, caching must be off.
-
-The PowerPC decrementer register was was used to gather
-all timing information. In the PowerPC architecture,
-this register typically counts
-something like CPU cycles or is a function of the clock
-speed. On the PPC603e decrements once for every four (4) bus cycles.
-On the RTEMS_BSP, the bus operates at a clock speed of
-33 Mhz. This result in a very accurate number since it is a function of the
-microprocessor itself. Thus all measurements in this
-chapter are reported as the actual number of decrementer
-clicks reported.
-
-To convert the numbers reported to microseconds, one should
-divide the number reported by 8.650752. This number was derived as
-shown below:
-
-@example
-((33 * 1048576) / 1000000) / 4 = 8.650752
-@end example
-
-All sources of hardware interrupts were disabled,
-although traps were enabled and the interrupt level of the
-PowerPC allows all interrupts.
-
-@section Interrupt Latency
-
-The maximum period with traps disabled or the
-processor interrupt level set to it's highest value inside RTEMS
-is less than RTEMS_MAXIMUM_DISABLE_PERIOD
-microseconds including the instructions which
-disable and re-enable interrupts. The time required for the
-PowerPC to vector an interrupt and for the RTEMS entry overhead
-before invoking the user's trap handler are a total of
-RTEMS_INTR_ENTRY_RETURNS_TO_PREEMPTING_TASK
-microseconds. These combine to yield a worst case interrupt
-latency of less than RTEMS_MAXIMUM_DISABLE_PERIOD +
-RTEMS_INTR_ENTRY_RETURNS_TO_PREEMPTING_TASK microseconds at
-RTEMS_MAXIMUM_DISABLE_PERIOD_MHZ Mhz.
-[NOTE: The maximum period with interrupts disabled was last
-determined for Release RTEMS_RELEASE_FOR_MAXIMUM_DISABLE_PERIOD.]
-
-The maximum period with interrupts disabled within
-RTEMS is hand-timed with some assistance from the PowerPC simulator.
-The maximum period with interrupts disabled with RTEMS has not
-been calculated on this target.
-
-The interrupt vector and entry overhead time was
-generated on the PSIM benchmark platform using the PowerPC's
-decrementer register. This register was programmed to generate
-an interrupt after one countdown.
-
-@section Context Switch
-
-The RTEMS processor context switch time is RTEMS_NO_FP_CONTEXTS
-bus cycle on the RTEMS_BSP benchmark platform when no floating
-point context is saved or restored. Additional execution time
-is required when a TASK_SWITCH user extension is configured.
-The use of the TASK_SWITCH extension is application dependent.
-Thus, its execution time is not considered part of the raw
-context switch time.
-
-Since RTEMS was designed specifically for embedded
-missile applications which are floating point intensive, the
-executive is optimized to avoid unnecessarily saving and
-restoring the state of the numeric coprocessor. The state of
-the numeric coprocessor is only saved when an FLOATING_POINT
-task is dispatched and that task was not the last task to
-utilize the coprocessor. In a system with only one
-FLOATING_POINT task, the state of the numeric coprocessor will
-never be saved or restored. When the first FLOATING_POINT task
-is dispatched, RTEMS does not need to save the current state of
-the numeric coprocessor.
-
-The following table summarizes the context switch
-times for the RTEMS_BSP benchmark platform:
-
diff --git a/doc/supplements/powerpc/timePSIM.t b/doc/supplements/powerpc/timePSIM.t
deleted file mode 100644
index 4a52100a95..0000000000
--- a/doc/supplements/powerpc/timePSIM.t
+++ /dev/null
@@ -1,97 +0,0 @@
-@c
-@c Timing information for PSIM
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@include ../../common/timemac.texi
-@tex
-\global\advance \smallskipamount by -4pt
-@end tex
-
-@chapter RTEMS_BSP Timing Data
-
-@section Introduction
-
-The timing data for RTEMS on the RTEMS_BSP target
-is provided along with the target
-dependent aspects concerning the gathering of the timing data.
-The hardware platform used to gather the times is described to
-give the reader a better understanding of each directive time
-provided. Also, provided is a description of the interrupt
-latency and the context switch times as they pertain to the
-PowerPC version of RTEMS.
-
-@section Hardware Platform
-
-All times reported in this chapter were measured using the PowerPC
-Instruction Simulator (PSIM). PSIM simulates a variety of PowerPC
-6xx models with the PPC603e being used as the basis for the measurements
-reported in this chapter.
-
-The PowerPC decrementer register was was used to gather
-all timing information. In real hardware implementations
-of the PowerPC architecture, this register would typically
-count something like CPU cycles or be a function of the clock
-speed. However, with PSIM each count of the decrementer register
-represents an instruction. Thus all measurements in this
-chapter are reported as the actual number of instructions
-executed. All sources of hardware interrupts were disabled,
-although traps were enabled and the interrupt level of the
-PowerPC allows all interrupts.
-
-@section Interrupt Latency
-
-The maximum period with traps disabled or the
-processor interrupt level set to it's highest value inside RTEMS
-is less than RTEMS_MAXIMUM_DISABLE_PERIOD
-microseconds including the instructions which
-disable and re-enable interrupts. The time required for the
-PowerPC to vector an interrupt and for the RTEMS entry overhead
-before invoking the user's trap handler are a total of
-RTEMS_INTR_ENTRY_RETURNS_TO_PREEMPTING_TASK
-microseconds. These combine to yield a worst case interrupt
-latency of less than RTEMS_MAXIMUM_DISABLE_PERIOD +
-RTEMS_INTR_ENTRY_RETURNS_TO_PREEMPTING_TASK microseconds at
-RTEMS_MAXIMUM_DISABLE_PERIOD_MHZ Mhz.
-[NOTE: The maximum period with interrupts disabled was last
-determined for Release RTEMS_RELEASE_FOR_MAXIMUM_DISABLE_PERIOD.]
-
-The maximum period with interrupts disabled within
-RTEMS is hand-timed with some assistance from RTEMS_BSP. The maximum
-period with interrupts disabled with RTEMS occurs was not measured
-on this target.
-
-The interrupt vector and entry overhead time was
-generated on the RTEMS_BSP benchmark platform using the PowerPC's
-decrementer register. This register was programmed to generate
-an interrupt after one countdown.
-
-@section Context Switch
-
-The RTEMS processor context switch time is RTEMS_NO_FP_CONTEXTS
-instructions on the RTEMS_BSP benchmark platform when no floating
-point context is saved or restored. Additional execution time
-is required when a TASK_SWITCH user extension is configured.
-The use of the TASK_SWITCH extension is application dependent.
-Thus, its execution time is not considered part of the raw
-context switch time.
-
-Since RTEMS was designed specifically for embedded
-missile applications which are floating point intensive, the
-executive is optimized to avoid unnecessarily saving and
-restoring the state of the numeric coprocessor. The state of
-the numeric coprocessor is only saved when an FLOATING_POINT
-task is dispatched and that task was not the last task to
-utilize the coprocessor. In a system with only one
-FLOATING_POINT task, the state of the numeric coprocessor will
-never be saved or restored. When the first FLOATING_POINT task
-is dispatched, RTEMS does not need to save the current state of
-the numeric coprocessor.
-
-The following table summarizes the context switch
-times for the RTEMS_BSP benchmark platform:
diff --git a/doc/supplements/sh/BSP_TIMES b/doc/supplements/sh/BSP_TIMES
deleted file mode 100644
index 82b8160aa5..0000000000
--- a/doc/supplements/sh/BSP_TIMES
+++ /dev/null
@@ -1,247 +0,0 @@
-#
-# CPU MODEL/BSP Timing and Size Information
-#
-# $Id$
-#
-
-#
-# CPU Model Information
-#
-RTEMS_BSP BSPFORTIMES
-RTEMS_CPU_MODEL BSP_CPU_MODEL
-#
-# Interrupt Latency
-#
-# NOTE: In general, the text says it is hand-calculated to be
-# RTEMS_MAXIMUM_DISABLE_PERIOD at RTEMS_MAXIMUM_DISABLE_PERIOD_MHZ
-# Mhz and this was last calculated for Release
-# RTEMS_VERSION_FOR_MAXIMUM_DISABLE_PERIOD.
-#
-RTEMS_MAXIMUM_DISABLE_PERIOD TBD
-RTEMS_MAXIMUM_DISABLE_PERIOD_MHZ 20
-RTEMS_RELEASE_FOR_MAXIMUM_DISABLE_PERIOD 4.0.0
-#
-# Context Switch Times
-#
-RTEMS_NO_FP_CONTEXTS 35
-RTEMS_RESTORE_1ST_FP_TASK 39
-RTEMS_SAVE_INIT_RESTORE_INIT 66
-RTEMS_SAVE_IDLE_RESTORE_INIT 66
-RTEMS_SAVE_IDLE_RESTORE_IDLE 68
-#
-# Task Manager Times
-#
-RTEMS_TASK_CREATE_ONLY 148
-RTEMS_TASK_IDENT_ONLY 350
-RTEMS_TASK_START_ONLY 76
-RTEMS_TASK_RESTART_CALLING_TASK 95
-RTEMS_TASK_RESTART_SUSPENDED_RETURNS_TO_CALLER 89
-RTEMS_TASK_RESTART_BLOCKED_RETURNS_TO_CALLER 124
-RTEMS_TASK_RESTART_READY_RETURNS_TO_CALLER 92
-RTEMS_TASK_RESTART_SUSPENDED_PREEMPTS_CALLER 125
-RTEMS_TASK_RESTART_BLOCKED_PREEMPTS_CALLER 149
-RTEMS_TASK_RESTART_READY_PREEMPTS_CALLER 142
-RTEMS_TASK_DELETE_CALLING_TASK 170
-RTEMS_TASK_DELETE_SUSPENDED_TASK 138
-RTEMS_TASK_DELETE_BLOCKED_TASK 143
-RTEMS_TASK_DELETE_READY_TASK 144
-RTEMS_TASK_SUSPEND_CALLING_TASK 71
-RTEMS_TASK_SUSPEND_RETURNS_TO_CALLER 43
-RTEMS_TASK_RESUME_TASK_READIED_RETURNS_TO_CALLER 45
-RTEMS_TASK_RESUME_TASK_READIED_PREEMPTS_CALLER 67
-RTEMS_TASK_SET_PRIORITY_OBTAIN_CURRENT_PRIORITY 31
-RTEMS_TASK_SET_PRIORITY_RETURNS_TO_CALLER 64
-RTEMS_TASK_SET_PRIORITY_PREEMPTS_CALLER 106
-RTEMS_TASK_MODE_OBTAIN_CURRENT_MODE 14
-RTEMS_TASK_MODE_NO_RESCHEDULE 16
-RTEMS_TASK_MODE_RESCHEDULE_RETURNS_TO_CALLER 23
-RTEMS_TASK_MODE_RESCHEDULE_PREEMPTS_CALLER 60
-RTEMS_TASK_GET_NOTE_ONLY 33
-RTEMS_TASK_SET_NOTE_ONLY 33
-RTEMS_TASK_WAKE_AFTER_YIELD_RETURNS_TO_CALLER 16
-RTEMS_TASK_WAKE_AFTER_YIELD_PREEMPTS_CALLER 56
-RTEMS_TASK_WAKE_WHEN_ONLY 117
-#
-# Interrupt Manager
-#
-RTEMS_INTR_ENTRY_RETURNS_TO_NESTED 12
-RTEMS_INTR_ENTRY_RETURNS_TO_INTERRUPTED_TASK 9
-RTEMS_INTR_ENTRY_RETURNS_TO_PREEMPTING_TASK 9
-RTEMS_INTR_EXIT_RETURNS_TO_NESTED <1
-RTEMS_INTR_EXIT_RETURNS_TO_INTERRUPTED_TASK 8
-RTEMS_INTR_EXIT_RETURNS_TO_PREEMPTING_TASK 54
-#
-# Clock Manager
-#
-RTEMS_CLOCK_SET_ONLY 86
-RTEMS_CLOCK_GET_ONLY 1
-RTEMS_CLOCK_TICK_ONLY 17
-#
-# Timer Manager
-#
-RTEMS_TIMER_CREATE_ONLY 28
-RTEMS_TIMER_IDENT_ONLY 343
-RTEMS_TIMER_DELETE_INACTIVE 43
-RTEMS_TIMER_DELETE_ACTIVE 47
-RTEMS_TIMER_FIRE_AFTER_INACTIVE 58
-RTEMS_TIMER_FIRE_AFTER_ACTIVE 61
-RTEMS_TIMER_FIRE_WHEN_INACTIVE 88
-RTEMS_TIMER_FIRE_WHEN_ACTIVE 88
-RTEMS_TIMER_RESET_INACTIVE 54
-RTEMS_TIMER_RESET_ACTIVE 58
-RTEMS_TIMER_CANCEL_INACTIVE 31
-RTEMS_TIMER_CANCEL_ACTIVE 34
-#
-# Semaphore Manager
-#
-RTEMS_SEMAPHORE_CREATE_ONLY 60
-RTEMS_SEMAPHORE_IDENT_ONLY 367
-RTEMS_SEMAPHORE_DELETE_ONLY 58
-RTEMS_SEMAPHORE_OBTAIN_AVAILABLE 38
-RTEMS_SEMAPHORE_OBTAIN_NOT_AVAILABLE_NO_WAIT 38
-RTEMS_SEMAPHORE_OBTAIN_NOT_AVAILABLE_CALLER_BLOCKS 109
-RTEMS_SEMAPHORE_RELEASE_NO_WAITING_TASKS 44
-RTEMS_SEMAPHORE_RELEASE_TASK_READIED_RETURNS_TO_CALLER 66
-RTEMS_SEMAPHORE_RELEASE_TASK_READIED_PREEMPTS_CALLER 87
-#
-# Message Manager
-#
-RTEMS_MESSAGE_QUEUE_CREATE_ONLY 200
-RTEMS_MESSAGE_QUEUE_IDENT_ONLY 341
-RTEMS_MESSAGE_QUEUE_DELETE_ONLY 80
-RTEMS_MESSAGE_QUEUE_SEND_NO_WAITING_TASKS 97
-RTEMS_MESSAGE_QUEUE_SEND_TASK_READIED_RETURNS_TO_CALLER 101
-RTEMS_MESSAGE_QUEUE_SEND_TASK_READIED_PREEMPTS_CALLER 123
-RTEMS_MESSAGE_QUEUE_URGENT_NO_WAITING_TASKS 96
-RTEMS_MESSAGE_QUEUE_URGENT_TASK_READIED_RETURNS_TO_CALLER 101
-RTEMS_MESSAGE_QUEUE_URGENT_TASK_READIED_PREEMPTS_CALLER 123
-RTEMS_MESSAGE_QUEUE_BROADCAST_NO_WAITING_TASKS 53
-RTEMS_MESSAGE_QUEUE_BROADCAST_TASK_READIED_RETURNS_TO_CALLER 111
-RTEMS_MESSAGE_QUEUE_BROADCAST_TASK_READIED_PREEMPTS_CALLER 133
-RTEMS_MESSAGE_QUEUE_RECEIVE_AVAILABLE 79
-RTEMS_MESSAGE_QUEUE_RECEIVE_NOT_AVAILABLE_NO_WAIT 43
-RTEMS_MESSAGE_QUEUE_RECEIVE_NOT_AVAILABLE_CALLER_BLOCKS 114
-RTEMS_MESSAGE_QUEUE_FLUSH_NO_MESSAGES_FLUSHED 29
-RTEMS_MESSAGE_QUEUE_FLUSH_MESSAGES_FLUSHED 39
-#
-# Event Manager
-#
-RTEMS_EVENT_SEND_NO_TASK_READIED 24
-RTEMS_EVENT_SEND_TASK_READIED_RETURNS_TO_CALLER 60
-RTEMS_EVENT_SEND_TASK_READIED_PREEMPTS_CALLER 84
-RTEMS_EVENT_RECEIVE_OBTAIN_CURRENT_EVENTS 1
-RTEMS_EVENT_RECEIVE_AVAILABLE 28
-RTEMS_EVENT_RECEIVE_NOT_AVAILABLE_NO_WAIT 23
-RTEMS_EVENT_RECEIVE_NOT_AVAILABLE_CALLER_BLOCKS 84
-#
-# Signal Manager
-#
-RTEMS_SIGNAL_CATCH_ONLY 15
-RTEMS_SIGNAL_SEND_RETURNS_TO_CALLER 37
-RTEMS_SIGNAL_SEND_SIGNAL_TO_SELF 55
-RTEMS_SIGNAL_EXIT_ASR_OVERHEAD_RETURNS_TO_CALLING_TASK 37
-RTEMS_SIGNAL_EXIT_ASR_OVERHEAD_RETURNS_TO_PREEMPTING_TASK 54
-#
-# Partition Manager
-#
-RTEMS_PARTITION_CREATE_ONLY 70
-RTEMS_PARTITION_IDENT_ONLY 341
-RTEMS_PARTITION_DELETE_ONLY 42
-RTEMS_PARTITION_GET_BUFFER_AVAILABLE 35
-RTEMS_PARTITION_GET_BUFFER_NOT_AVAILABLE 33
-RTEMS_PARTITION_RETURN_BUFFER_ONLY 43
-#
-# Region Manager
-#
-RTEMS_REGION_CREATE_ONLY 63
-RTEMS_REGION_IDENT_ONLY 348
-RTEMS_REGION_DELETE_ONLY 39
-RTEMS_REGION_GET_SEGMENT_AVAILABLE 52
-RTEMS_REGION_GET_SEGMENT_NOT_AVAILABLE_NO_WAIT 49
-RTEMS_REGION_GET_SEGMENT_NOT_AVAILABLE_CALLER_BLOCKS 123
-RTEMS_REGION_RETURN_SEGMENT_NO_WAITING_TASKS 54
-RTEMS_REGION_RETURN_SEGMENT_TASK_READIED_RETURNS_TO_CALLER 114
-RTEMS_REGION_RETURN_SEGMENT_TASK_READIED_PREEMPTS_CALLER 136
-#
-# Dual-Ported Memory Manager
-#
-RTEMS_PORT_CREATE_ONLY 35
-RTEMS_PORT_IDENT_ONLY 340
-RTEMS_PORT_DELETE_ONLY 39
-RTEMS_PORT_INTERNAL_TO_EXTERNAL_ONLY 26
-RTEMS_PORT_EXTERNAL_TO_INTERNAL_ONLY 27
-#
-# IO Manager
-#
-RTEMS_IO_INITIALIZE_ONLY 4
-RTEMS_IO_OPEN_ONLY 2
-RTEMS_IO_CLOSE_ONLY 1
-RTEMS_IO_READ_ONLY 2
-RTEMS_IO_WRITE_ONLY 3
-RTEMS_IO_CONTROL_ONLY 2
-#
-# Rate Monotonic Manager
-#
-RTEMS_RATE_MONOTONIC_CREATE_ONLY 32
-RTEMS_RATE_MONOTONIC_IDENT_ONLY 341
-RTEMS_RATE_MONOTONIC_CANCEL_ONLY 39
-RTEMS_RATE_MONOTONIC_DELETE_ACTIVE 51
-RTEMS_RATE_MONOTONIC_DELETE_INACTIVE 48
-RTEMS_RATE_MONOTONIC_PERIOD_INITIATE_PERIOD_RETURNS_TO_CALLER 54
-RTEMS_RATE_MONOTONIC_PERIOD_CONCLUDE_PERIOD_CALLER_BLOCKS 74
-RTEMS_RATE_MONOTONIC_PERIOD_OBTAIN_STATUS 31
-#
-# Size Information
-#
-#
-# xxx alloted for numbers
-#
-RTEMS_DATA_SPACE 723
-RTEMS_MINIMUM_CONFIGURATION 18,980
-RTEMS_MAXIMUM_CONFIGURATION 36,438
-# x,xxx alloted for numbers
-RTEMS_CORE_CODE_SIZE 12,674
-RTEMS_INITIALIZATION_CODE_SIZE 970
-RTEMS_TASK_CODE_SIZE 3,562
-RTEMS_INTERRUPT_CODE_SIZE 54
-RTEMS_CLOCK_CODE_SIZE 334
-RTEMS_TIMER_CODE_SIZE 1,110
-RTEMS_SEMAPHORE_CODE_SIZE 1,632
-RTEMS_MESSAGE_CODE_SIZE 1,754
-RTEMS_EVENT_CODE_SIZE 1,000
-RTEMS_SIGNAL_CODE_SIZE 418
-RTEMS_PARTITION_CODE_SIZE 1,164
-RTEMS_REGION_CODE_SIZE 1,494
-RTEMS_DPMEM_CODE_SIZE 724
-RTEMS_IO_CODE_SIZE 686
-RTEMS_FATAL_ERROR_CODE_SIZE 24
-RTEMS_RATE_MONOTONIC_CODE_SIZE 1,212
-RTEMS_MULTIPROCESSING_CODE_SIZE 6.952
-# xxx alloted for numbers
-RTEMS_TIMER_CODE_OPTSIZE 184
-RTEMS_SEMAPHORE_CODE_OPTSIZE 172
-RTEMS_MESSAGE_CODE_OPTSIZE 288
-RTEMS_EVENT_CODE_OPTSIZE 56
-RTEMS_SIGNAL_CODE_OPTSIZE 56
-RTEMS_PARTITION_CODE_OPTSIZE 132
-RTEMS_REGION_CODE_OPTSIZE 160
-RTEMS_DPMEM_CODE_OPTSIZE 132
-RTEMS_IO_CODE_OPTSIZE 00
-RTEMS_RATE_MONOTONIC_CODE_OPTSIZE 184
-RTEMS_MULTIPROCESSING_CODE_OPTSIZE 332
-# xxx alloted for numbers
-RTEMS_BYTES_PER_TASK 400
-RTEMS_BYTES_PER_TIMER 68
-RTEMS_BYTES_PER_SEMAPHORE 124
-RTEMS_BYTES_PER_MESSAGE_QUEUE 148
-RTEMS_BYTES_PER_REGION 144
-RTEMS_BYTES_PER_PARTITION 56
-RTEMS_BYTES_PER_PORT 36
-RTEMS_BYTES_PER_PERIOD 36
-RTEMS_BYTES_PER_EXTENSION 64
-RTEMS_BYTES_PER_FP_TASK 332
-RTEMS_BYTES_PER_NODE 48
-RTEMS_BYTES_PER_GLOBAL_OBJECT 20
-RTEMS_BYTES_PER_PROXY 124
-# x,xxx alloted for numbers
-RTEMS_BYTES_OF_FIXED_SYSTEM_REQUIREMENTS 8,872
diff --git a/doc/supplements/sh/Makefile b/doc/supplements/sh/Makefile
deleted file mode 100644
index 387cbf8071..0000000000
--- a/doc/supplements/sh/Makefile
+++ /dev/null
@@ -1,161 +0,0 @@
-#
-# COPYRIGHT (c) 1988-1999.
-# On-Line Applications Research Corporation (OAR).
-# All rights reserved.
-#
-# $Id$
-#
-
-PROJECT=sh
-
-include ../../Make.config
-
-REPLACE=../../tools/word-replace
-
-all: html info ps pdf
-
-dirs:
- $(make-dirs)
-
-COMMON_FILES=../../common/cpright.texi ../../common/setup.texi
-
-GENERATED_FILES=\
- cpumodel.texi callconv.texi memmodel.texi intr.texi fatalerr.texi \
- bsp.texi cputable.texi wksheets.texi timing.texi timeBSP.texi
-
-FILES= $(PROJECT).texi preface.texi \
- $(COMMON_FILES) $(GENERATED_FILES)
-
-info: dirs c_$(PROJECT)
- @echo NEED TO INSTALL THE INFO FILES
- #cp c_$(PROJECT) c_$(PROJECT)-* $(INFO_INSTALL)
- #cp c_$(PROJECT) c_$(PROJECT)-* $(INFO_INSTALL)
-
-c_$(PROJECT): $(FILES)
- $(MAKEINFO) $(PROJECT).texi
-
-dvi: dirs $(PROJECT).dvi
-ps: dirs $(PROJECT).ps
-pdf: dirs $(PROJECT).pdf
-
-$(PROJECT).pdf: $(FILES)
- $(TEXI2PDF) $(PROJECT).texi
- cp $(PROJECT).pdf $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).ps: $(PROJECT).dvi
- dvips -o $(PROJECT).ps $(PROJECT).dvi
- cp $(PROJECT).ps $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).dvi: $(FILES)
- $(TEXI2DVI) $(PROJECT).texi
- cp $(PROJECT).dvi $(WWW_INSTALL)/$(PROJECT)
-
-html: dirs $(FILES)
- -mkdir -p $(WWW_INSTALL)/$(PROJECT)
- $(TEXI2WWW) $(TEXI2WWW_ARGS) -dir $(WWW_INSTALL)/$(PROJECT) \
- $(PROJECT).texi
-
-clean:
- rm -f *.o $(PROG) *.txt core $(PROJECT).pdf
- rm -f *.dvi *.ps *.log *.aux *.cp *.fn *.ky *.pg *.toc *.tp *.vr $(BASE)
- rm -f $(PROJECT) $(PROJECT)-*
- rm -f c_$(PROJECT) c_$(PROJECT)-*
- rm -f wksheets.t wksheets_NOTIMES.t
- rm -f intr.t
- rm -f timeBSP_.t timing.t
- rm -f *.fixed _* $(GENERATED_FILES)
- rm -f timeBSP_.t timeBSP_.texi
-
-#
-# Chapters which get automatic processing
-#
-cpumodel.texi: cpumodel.t Makefile
- $(BMENU) -p "Preface" \
- -u "Top" \
- -n "Calling Conventions" ${*}.t
-
-callconv.texi: callconv.t Makefile
- $(BMENU) -p "CPU Model Dependent Features Another Optional Feature" \
- -u "Top" \
- -n "Memory Model" ${*}.t
-
-memmodel.texi: memmodel.t Makefile
- $(BMENU) -p "Calling Conventions User-Provided Routines" \
- -u "Top" \
- -n "Interrupt Processing" ${*}.t
-
-# Interrupt Chapter:
-# 1. Replace Times and Sizes
-# 2. Build Node Structure
-intr.t: intr_NOTIMES.t BSP_TIMES
- ${REPLACE} -p BSP_TIMES intr_NOTIMES.t
- mv intr_NOTIMES.t.fixed intr.t
-
-intr.texi: intr.t Makefile
- $(BMENU) -p "Memory Model Flat Memory Model" \
- -u "Top" \
- -n "Default Fatal Error Processing" ${*}.t
-
-fatalerr.texi: fatalerr.t Makefile
- $(BMENU) -p "Interrupt Processing Interrupt Stack" \
- -u "Top" \
- -n "Board Support Packages" ${*}.t
-
-bsp.texi: bsp.t Makefile
- $(BMENU) -p "Default Fatal Error Processing Default Fatal Error Handler Operations" \
- -u "Top" \
- -n "Processor Dependent Information Table" ${*}.t
-
-cputable.texi: cputable.t Makefile
- $(BMENU) -p "Board Support Packages Processor Initialization" \
- -u "Top" \
- -n "Memory Requirements" ${*}.t
-
-# Worksheets Chapter:
-# 1. Copy the Shared File
-# 2. Replace Times and Sizes
-# 3. Build Node Structure
-
-wksheets_NOTIMES.t: ../../common/wksheets.t
- cp ../../common/wksheets.t wksheets_NOTIMES.t
-
-wksheets.t: wksheets_NOTIMES.t BSP_TIMES
- ${REPLACE} -p BSP_TIMES wksheets_NOTIMES.t
- mv wksheets_NOTIMES.t.fixed wksheets.t
-
-wksheets.texi: wksheets.t Makefile
- $(BMENU) -p "Processor Dependent Information Table CPU Dependent Information Table" \
- -u "Top" \
- -n "Timing Specification" ${*}.t
-
-# Timing Specification Chapter:
-# 1. Copy the Shared File
-# 3. Build Node Structure
-
-timing.t: ../../common/timing.t
- cp ../../common/timing.t timing.t
-
-timing.texi: timing.t Makefile
- $(BMENU) -p "Memory Requirements RTEMS RAM Workspace Worksheet" \
- -u "Top" \
- -n "BSP_FOR_TIMES Timing Data" ${*}.t
-
-# Timing Data for BSP Chapter:
-# 1. Copy the Shared File
-# 2. Replace Times and Sizes
-# 3. Build Node Structure
-
-timeBSP_.t: ../../common/timetbl.t timeBSP.t Makefile
- cat timeBSP.t ../../common/timetbl.t >timeBSP_.t
- @echo >>timeBSP_.t
- @echo "@tex" >>timeBSP_.t
- @echo "\\global\\advance \\smallskipamount by 4pt" >>timeBSP_.t
- @echo "@end tex" >>timeBSP_.t
- ${REPLACE} -p BSP_TIMES timeBSP_.t
- mv timeBSP_.t.fixed timeBSP_.t
-
-timeBSP.texi: timeBSP_.t Makefile
- $(BMENU) -p "Timing Specification Terminology" \
- -u "Top" \
- -n "Command and Variable Index" timeBSP_.t
- mv timeBSP_.texi timeBSP.texi
diff --git a/doc/supplements/sh/bsp.t b/doc/supplements/sh/bsp.t
deleted file mode 100644
index a19aa06129..0000000000
--- a/doc/supplements/sh/bsp.t
+++ /dev/null
@@ -1,93 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Board Support Packages
-
-@section Introduction
-
-An RTEMS Board Support Package (BSP) must be designed
-to support a particular processor and target board combination.
-This chapter presents a discussion of XXX specific BSP
-issues. For more information on developing a BSP, refer to the
-chapter titled Board Support Packages in the RTEMS
-Applications User's Guide.
-
-@section System Reset
-
-An RTEMS based application is initiated or
-re-initiated when the XXX processor is reset. When the
-XXX is reset, the processor performs the following actions:
-
-@itemize @bullet
-@item The tracing bits of the status register are cleared to
-disable tracing.
-
-@item The supervisor interrupt state is entered by setting the
-supervisor (S) bit and clearing the master/interrupt (M) bit of
-the status register.
-
-@item The interrupt mask of the status register is set to
-level 7 to effectively disable all maskable interrupts.
-
-@item The vector base register (VBR) is set to zero.
-
-@item The cache control register (CACR) is set to zero to
-disable and freeze the processor cache.
-
-@item The interrupt stack pointer (ISP) is set to the value
-stored at vector 0 (bytes 0-3) of the exception vector table
-(EVT).
-
-@item The program counter (PC) is set to the value stored at
-vector 1 (bytes 4-7) of the EVT.
-
-@item The processor begins execution at the address stored in
-the PC.
-@end itemize
-
-@section Processor Initialization
-
-The address of the application's initialization code
-should be stored in the first vector of the EVT which will allow
-the immediate vectoring to the application code. If the
-application requires that the VBR be some value besides zero,
-then it should be set to the required value at this point. All
-tasks share the same XXX's VBR value. Because interrupts
-are enabled automatically by RTEMS as part of the initialize
-executive directive, the VBR MUST be set before this directive
-is invoked to insure correct interrupt vectoring. If processor
-caching is to be utilized, then it should be enabled during the
-reset application initialization code.
-
-In addition to the requirements described in the
-Board Support Packages chapter of the Applications User's
-Manual for the reset code which is executed before the call to
-initialize executive, the XXX version has the following
-specific requirements:
-
-@itemize @bullet
-@item Must leave the S bit of the status register set so that
-the XXX remains in the supervisor state.
-
-@item Must set the M bit of the status register to remove the
-XXX from the interrupt state.
-
-@item Must set the master stack pointer (MSP) such that a
-minimum stack size of MINIMUM_STACK_SIZE bytes is provided for
-the initialize executive directive.
-
-@item Must initialize the XXX's vector table.
-@end itemize
-
-Note that the BSP is not responsible for allocating
-or installing the interrupt stack. RTEMS does this
-automatically as part of initialization. If the BSP does not
-install an interrupt stack and -- for whatever reason -- an
-interrupt occurs before initialize_executive is invoked, then
-the results are unpredictable.
-
diff --git a/doc/supplements/sh/callconv.t b/doc/supplements/sh/callconv.t
deleted file mode 100644
index b75edb6cae..0000000000
--- a/doc/supplements/sh/callconv.t
+++ /dev/null
@@ -1,102 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Calling Conventions
-
-@section Introduction
-
-Each high-level language compiler generates
-subroutine entry and exit code based upon a set of rules known
-as the compiler's calling convention. These rules address the
-following issues:
-
-@itemize @bullet
-@item register preservation and usage
-@item parameter passing
-@item call and return mechanism
-@end itemize
-
-A compiler's calling convention is of importance when
-interfacing to subroutines written in another language either
-assembly or high-level. Even when the high-level language and
-target processor are the same, different compilers may use
-different calling conventions. As a result, calling conventions
-are both processor and compiler dependent.
-
-The Hitachi SH architecture supports a simple yet
-effective call and return mechanism. A subroutine is invoked
-via the branch to subroutine (XXX) or the jump to subroutine
-(XXX) instructions. These instructions push the return address
-on the current stack. The return from subroutine (rts)
-instruction pops the return address off the current stack and
-transfers control to that instruction. It is is important to
-note that the MC68xxx call and return mechanism does not
-automatically save or restore any registers. It is the
-responsibility of the high-level language compiler to define the
-register preservation and usage convention.
-
-@section Calling Mechanism
-
-All RTEMS directives are invoked using either a bsr
-or jsr instruction and return to the user application via the
-rts instruction.
-
-@section Register Usage
-
-As discussed above, the bsr and jsr instructions do
-not automatically save any registers. RTEMS uses the registers
-D0, D1, A0, and A1 as scratch registers. These registers are
-not preserved by RTEMS directives therefore, the contents of
-these registers should not be assumed upon return from any RTEMS
-directive.
-
-
-> > The SH1 has 16 general registers (r0..r15)
-> > r0..r3 used as general volatile registers
-> > r4..r7 used to pass up to 4 arguments to functions, arguments above 4 are
-> > passed via the stack)
-> > r8..13 caller saved registers (i.e. push them to the stack if you need them
-> > inside of a function)
-> > r14 frame pointer
-> > r15 stack pointer
->
-
-
-@section Parameter Passing
-
-RTEMS assumes that arguments are placed on the
-current stack before the directive is invoked via the bsr or jsr
-instruction. The first argument is assumed to be closest to the
-return address on the stack. This means that the first argument
-of the C calling sequence is pushed last. The following
-pseudo-code illustrates the typical sequence used to call a
-RTEMS directive with three (3) arguments:
-
-@example
-@group
-push third argument
-push second argument
-push first argument
-invoke directive
-remove arguments from the stack
-@end group
-@end example
-
-The arguments to RTEMS are typically pushed onto the
-stack using a move instruction with a pre-decremented stack
-pointer as the destination. These arguments must be removed
-from the stack after control is returned to the caller. This
-removal is typically accomplished by adding the size of the
-argument list in bytes to the current stack pointer.
-
-@section User-Provided Routines
-
-All user-provided routines invoked by RTEMS, such as
-user extensions, device drivers, and MPCI routines, must also
-adhere to these calling conventions.
-
diff --git a/doc/supplements/sh/cpumodel.t b/doc/supplements/sh/cpumodel.t
deleted file mode 100644
index f709168913..0000000000
--- a/doc/supplements/sh/cpumodel.t
+++ /dev/null
@@ -1,68 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter CPU Model Dependent Features
-
-@section Introduction
-
-Microprocessors are generally classified into
-families with a variety of CPU models or implementations within
-that family. Within a processor family, there is a high level
-of binary compatibility. This family may be based on either an
-architectural specification or on maintaining compatibility with
-a popular processor. Recent microprocessor families such as the
-SPARC or PA-RISC are based on an architectural specification
-which is independent or any particular CPU model or
-implementation. Older families such as the M68xxx and the iX86
-evolved as the manufacturer strived to produce higher
-performance processor models which maintained binary
-compatibility with older models.
-
-RTEMS takes advantage of the similarity of the
-various models within a CPU family. Although the models do vary
-in significant ways, the high level of compatibility makes it
-possible to share the bulk of the CPU dependent executive code
-across the entire family. Each processor family supported by
-RTEMS has a list of features which vary between CPU models
-within a family. For example, the most common model dependent
-feature regardless of CPU family is the presence or absence of a
-floating point unit or coprocessor. When defining the list of
-features present on a particular CPU model, one simply notes
-that floating point hardware is or is not present and defines a
-single constant appropriately. Conditional compilation is
-utilized to include the appropriate source code for this CPU
-model's feature set. It is important to note that this means
-that RTEMS is thus compiled using the appropriate feature set
-and compilation flags optimal for this CPU model used. The
-alternative would be to generate a binary which would execute on
-all family members using only the features which were always
-present.
-
-This chapter presents the set of features which vary
-across SPARC implementations and are of importance to RTEMS.
-The set of CPU model feature macros are defined in the file
-c/src/exec/score/cpu/XXX/XXX.h based upon the particular CPU
-model defined on the compilation command line.
-
-@section CPU Model Name
-
-The macro CPU_MODEL_NAME is a string which designates
-the name of this CPU model. For example, for the MODEL
-processor, this macro is set to the string "XXX".
-
-@section Floating Point Unit
-
-The macro XXX_HAS_FPU is set to 1 to indicate that
-this CPU model has a hardware floating point unit and 0
-otherwise. It does not matter whether the hardware floating
-point support is incorporated on-chip or is an external
-coprocessor.
-
-@section Another Optional Feature
-
-The macro XXX
diff --git a/doc/supplements/sh/cputable.t b/doc/supplements/sh/cputable.t
deleted file mode 100644
index 1a9f1e50d9..0000000000
--- a/doc/supplements/sh/cputable.t
+++ /dev/null
@@ -1,109 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Processor Dependent Information Table
-
-@section Introduction
-
-Any highly processor dependent information required
-to describe a processor to RTEMS is provided in the CPU
-Dependent Information Table. This table is not required for all
-processors supported by RTEMS. This chapter describes the
-contents, if any, for a particular processor type.
-
-@section CPU Dependent Information Table
-
-The XXX version of the RTEMS CPU Dependent
-Information Table contains the information required to interface
-a Board Support Package and RTEMS on the XXX. This
-information is provided to allow RTEMS to interoperate
-effectively with the BSP. The C structure definition is given
-here:
-
-@example
-@group
-typedef struct @{
- void (*pretasking_hook)( void );
- void (*predriver_hook)( void );
- void (*postdriver_hook)( void );
- void (*idle_task)( void );
- boolean do_zero_of_workspace;
- unsigned32 idle_task_stack_size;
- unsigned32 interrupt_stack_size;
- unsigned32 extra_mpci_receive_server_stack;
- void * (*stack_allocate_hook)( unsigned32 );
- void (*stack_free_hook)( void* );
- /* end of fields required on all CPUs */
-
- /* XXX CPU family dependent stuff */
-@} rtems_cpu_table;
-@end group
-@end example
-
-@table @code
-@item pretasking_hook
-is the address of the user provided routine which is invoked
-once RTEMS APIs are initialized. This routine will be invoked
-before any system tasks are created. Interrupts are disabled.
-This field may be NULL to indicate that the hook is not utilized.
-
-@item predriver_hook
-is the address of the user provided
-routine that is invoked immediately before the
-the device drivers and MPCI are initialized. RTEMS
-initialization is complete but interrupts and tasking are disabled.
-This field may be NULL to indicate that the hook is not utilized.
-
-@item postdriver_hook
-is the address of the user provided
-routine that is invoked immediately after the
-the device drivers and MPCI are initialized. RTEMS
-initialization is complete but interrupts and tasking are disabled.
-This field may be NULL to indicate that the hook is not utilized.
-
-@item idle_task
-is the address of the optional user
-provided routine which is used as the system's IDLE task. If
-this field is not NULL, then the RTEMS default IDLE task is not
-used. This field may be NULL to indicate that the default IDLE
-is to be used.
-
-@item do_zero_of_workspace
-indicates whether RTEMS should
-zero the Workspace as part of its initialization. If set to
-TRUE, the Workspace is zeroed. Otherwise, it is not.
-
-@item idle_task_stack_size
-is the size of the RTEMS idle task stack in bytes.
-If this number is less than MINIMUM_STACK_SIZE, then the
-idle task's stack will be MINIMUM_STACK_SIZE in byte.
-
-@item interrupt_stack_size
-is the size of the RTEMS
-allocated interrupt stack in bytes. This value must be at least
-as large as MINIMUM_STACK_SIZE.
-
-@item extra_mpci_receive_server_stack
-is the extra stack space allocated for the RTEMS MPCI receive server task
-in bytes. The MPCI receive server may invoke nearly all directives and
-may require extra stack space on some targets.
-
-@item stack_allocate_hook
-is the address of the optional user provided routine which allocates
-memory for task stacks. If this hook is not NULL, then a stack_free_hook
-must be provided as well.
-
-@item stack_free_hook
-is the address of the optional user provided routine which frees
-memory for task stacks. If this hook is not NULL, then a stack_allocate_hook
-must be provided as well.
-
-@item XXX
-is where the CPU family dependent stuff goes.
-
-@end table
diff --git a/doc/supplements/sh/fatalerr.t b/doc/supplements/sh/fatalerr.t
deleted file mode 100644
index 0871fa3cb9..0000000000
--- a/doc/supplements/sh/fatalerr.t
+++ /dev/null
@@ -1,31 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Default Fatal Error Processing
-
-@section Introduction
-
-Upon detection of a fatal error by either the
-application or RTEMS the fatal error manager is invoked. The
-fatal error manager will invoke the user-supplied fatal error
-handlers. If no user-supplied handlers are configured, the
-RTEMS provided default fatal error handler is invoked. If the
-user-supplied fatal error handlers return to the executive the
-default fatal error handler is then invoked. This chapter
-describes the precise operations of the default fatal error
-handler.
-
-@section Default Fatal Error Handler Operations
-
-The default fatal error handler which is invoked by
-the @code{rtems_fatal_error_occurred} directive when there is
-no user handler configured or the user handler returns control to
-RTEMS. The default fatal error handler disables processor interrupts,
-places the error code in @b{XXX}, and executes a @code{XXX}
-instruction to simulate a halt processor instruction.
-
diff --git a/doc/supplements/sh/intr_NOTIMES.t b/doc/supplements/sh/intr_NOTIMES.t
deleted file mode 100644
index 074420f2c9..0000000000
--- a/doc/supplements/sh/intr_NOTIMES.t
+++ /dev/null
@@ -1,196 +0,0 @@
-@c
-@c Interrupt Stack Frame Picture
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Interrupt Processing
-
-@section Introduction
-
-Different types of processors respond to the
-occurrence of an interrupt in its own unique fashion. In
-addition, each processor type provides a control mechanism to
-allow for the proper handling of an interrupt. The processor
-dependent response to the interrupt modifies the current
-execution state and results in a change in the execution stream.
-Most processors require that an interrupt handler utilize some
-special control mechanisms to return to the normal processing
-stream. Although RTEMS hides many of the processor dependent
-details of interrupt processing, it is important to understand
-how the RTEMS interrupt manager is mapped onto the processor's
-unique architecture. Discussed in this chapter are the XXX's
-interrupt response and control mechanisms as they pertain to
-RTEMS.
-
-@section Vectoring of an Interrupt Handler
-
-Depending on whether or not the particular CPU
-supports a separate interrupt stack, the XXX family has two
-different interrupt handling models.
-
-@subsection Models Without Separate Interrupt Stacks
-
-Upon receipt of an interrupt the XXX family
-members without separate interrupt stacks automatically perform
-the following actions:
-
-@itemize @bullet
-@item To Be Written
-@end itemize
-
-@subsection Models With Separate Interrupt Stacks
-
-Upon receipt of an interrupt the XXX family
-members with separate interrupt stacks automatically perform the
-following actions:
-
-@itemize @bullet
-@item saves the current status register (SR),
-
-@item clears the master/interrupt (M) bit of the SR to
-indicate the switch from master state to interrupt state,
-
-@item sets the privilege mode to supervisor,
-
-@item suppresses tracing,
-
-@item sets the interrupt mask level equal to the level of the
-interrupt being serviced,
-
-@item pushes an interrupt stack frame (ISF), which includes
-the program counter (PC), the status register (SR), and the
-format/exception vector offset (FVO) word, onto the supervisor
-and interrupt stacks,
-
-@item switches the current stack to the interrupt stack and
-vectors to an interrupt service routine (ISR). If the ISR was
-installed with the interrupt_catch directive, then the RTEMS
-interrupt handler will begin execution. The RTEMS interrupt
-handler saves all registers which are not preserved according to
-the calling conventions and invokes the application's ISR.
-@end itemize
-
-A nested interrupt is processed similarly by these
-CPU models with the exception that only a single ISF is placed
-on the interrupt stack and the current stack need not be
-switched.
-
-The FVO word in the Interrupt Stack Frame is examined
-by RTEMS to determine when an outer most interrupt is being
-exited. Since the FVO is used by RTEMS for this purpose, the
-user application code MUST NOT modify this field.
-
-The following shows the Interrupt Stack Frame for
-XXX CPU models with separate interrupt stacks:
-
-@ifset use-ascii
-@example
-@group
- +----------------------+
- | Status Register | 0x0
- +----------------------+
- | Program Counter High | 0x2
- +----------------------+
- | Program Counter Low | 0x4
- +----------------------+
- | Format/Vector Offset | 0x6
- +----------------------+
-@end group
-@end example
-@end ifset
-
-@ifset use-tex
-@sp 1
-@tex
-\centerline{\vbox{\offinterlineskip\halign{
-\strut\vrule#&
-\hbox to 2.00in{\enskip\hfil#\hfil}&
-\vrule#&
-\hbox to 0.50in{\enskip\hfil#\hfil}
-\cr
-\multispan{3}\hrulefill\cr
-& Status Register && 0x0\cr
-\multispan{3}\hrulefill\cr
-& Program Counter High && 0x2\cr
-\multispan{3}\hrulefill\cr
-& Program Counter Low && 0x4\cr
-\multispan{3}\hrulefill\cr
-& Format/Vector Offset && 0x6\cr
-\multispan{3}\hrulefill\cr
-}}\hfil}
-@end tex
-@end ifset
-
-@ifset use-html
-@html
-<CENTER>
- <TABLE COLS=2 WIDTH="40%" BORDER=2>
-<TR><TD ALIGN=center><STRONG>Status Register</STRONG></TD>
- <TD ALIGN=center>0x0</TD></TR>
-<TR><TD ALIGN=center><STRONG>Program Counter High</STRONG></TD>
- <TD ALIGN=center>0x2</TD></TR>
-<TR><TD ALIGN=center><STRONG>Program Counter Low</STRONG></TD>
- <TD ALIGN=center>0x4</TD></TR>
-<TR><TD ALIGN=center><STRONG>Format/Vector Offset</STRONG></TD>
- <TD ALIGN=center>0x6</TD></TR>
- </TABLE>
-</CENTER>
-@end html
-@end ifset
-
-@section Interrupt Levels
-
-Eight levels (0-7) of interrupt priorities are
-supported by XXX family members with level seven (7) being
-the highest priority. Level zero (0) indicates that interrupts
-are fully enabled. Interrupt requests for interrupts with
-priorities less than or equal to the current interrupt mask
-level are ignored.
-
-Although RTEMS supports 256 interrupt levels, the
-XXX family only supports eight. RTEMS interrupt levels 0
-through 7 directly correspond to XXX interrupt levels. All
-other RTEMS interrupt levels are undefined and their behavior is
-unpredictable.
-
-@section Disabling of Interrupts by RTEMS
-
-During the execution of directive calls, critical
-sections of code may be executed. When these sections are
-encountered, RTEMS disables interrupts to level seven (7) before
-the execution of this section and restores them to the previous
-level upon completion of the section. RTEMS has been optimized
-to insure that interrupts are disabled for less than
-RTEMS_MAXIMUM_DISABLE_PERIOD microseconds on a
-RTEMS_MAXIMUM_DISABLE_PERIOD_MHZ Mhz XXX with
-zero wait states. These numbers will vary based the
-number of wait states and processor speed present on the target board.
-[NOTE: The maximum period with interrupts disabled is hand calculated. This
-calculation was last performed for Release
-RTEMS_RELEASE_FOR_MAXIMUM_DISABLE_PERIOD.]
-
-Non-maskable interrupts (NMI) cannot be disabled, and
-ISRs which execute at this level MUST NEVER issue RTEMS system
-calls. If a directive is invoked, unpredictable results may
-occur due to the inability of RTEMS to protect its critical
-sections. However, ISRs that make no system calls may safely
-execute as non-maskable interrupts.
-
-@section Interrupt Stack
-
-RTEMS allocates the interrupt stack from the
-Workspace Area. The amount of memory allocated for the
-interrupt stack is determined by the interrupt_stack_size field
-in the CPU Configuration Table. During the initialization
-process, RTEMS will install its interrupt stack.
-
-The XXX port of RTEMS supports a software managed
-dedicated interrupt stack on those CPU models which do not
-support a separate interrupt stack in hardware.
-
-
diff --git a/doc/supplements/sh/memmodel.t b/doc/supplements/sh/memmodel.t
deleted file mode 100644
index a0ced50355..0000000000
--- a/doc/supplements/sh/memmodel.t
+++ /dev/null
@@ -1,39 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Memory Model
-
-@section Introduction
-
-A processor may support any combination of memory
-models ranging from pure physical addressing to complex demand
-paged virtual memory systems. RTEMS supports a flat memory
-model which ranges contiguously over the processor's allowable
-address space. RTEMS does not support segmentation or virtual
-memory of any kind. The appropriate memory model for RTEMS
-provided by the targeted processor and related characteristics
-of that model are described in this chapter.
-
-@section Flat Memory Model
-
-The XXX family supports a flat 32-bit address
-space with addresses ranging from 0x00000000 to 0xFFFFFFFF (4
-gigabytes). Each address is represented by a 32-bit value and
-is byte addressable. The address may be used to reference a
-single byte, word (2-bytes), or long word (4 bytes). Memory
-accesses within this address space are performed in big endian
-fashion by the processors in this family.
-
-Some of the XXX family members such as the
-XXX, XXX, and XXX support virtual memory and
-segmentation. The XXX requires external hardware support
-such as the XXX Paged Memory Management Unit coprocessor
-which is typically used to perform address translations for
-these systems. RTEMS does not support virtual memory or
-segmentation on any of the XXX family members.
-
diff --git a/doc/supplements/sh/preface.texi b/doc/supplements/sh/preface.texi
deleted file mode 100644
index 1c5f5bce21..0000000000
--- a/doc/supplements/sh/preface.texi
+++ /dev/null
@@ -1,55 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@ifinfo
-@node Preface, CPU Model Dependent Features, Top, Top
-@end ifinfo
-@unnumbered Preface
-
-The Real Time Executive for Multiprocessor Systems (RTEMS)
-is designed to be portable across multiple processor
-architectures. However, the nature of real-time systems makes
-it essential that the application designer understand certain
-processor dependent implementation details. These processor
-dependencies include calling convention, board support package
-issues, interrupt processing, exact RTEMS memory requirements,
-performance data, header files, and the assembly language
-interface to the executive.
-
-This document discusses the VENDOR XXX
-architecture dependencies in this port of RTEMS. The XXX
-family has a wide variety of CPU models within it. The part
-numbers ...
-
-XXX fill in some things here
-
-It is highly recommended that the XXX
-RTEMS application developer obtain and become familiar with the
-documentation for the processor being used as well as the
-documentation for the family as a whole.
-
-@subheading Architecture Documents
-
-For information on the XXX architecture,
-refer to the following documents available from VENDOR
-(@file{http//www.XXX.com/}):
-
-@itemize @bullet
-@item @cite{XXX Family Reference, VENDOR, PART NUMBER}.
-@end itemize
-
-@subheading MODEL SPECIFIC DOCUMENTS
-
-For information on specific processor models and
-their associated coprocessors, refer to the following documents:
-
-@itemize @bullet
-@item @cite{XXX MODEL Manual, VENDOR, PART NUMBER}.
-@item @cite{XXX MODEL Manual, VENDOR, PART NUMBER}.
-@end itemize
-
diff --git a/doc/supplements/sh/sh.texi b/doc/supplements/sh/sh.texi
deleted file mode 100644
index 26a0b0347f..0000000000
--- a/doc/supplements/sh/sh.texi
+++ /dev/null
@@ -1,120 +0,0 @@
-\input texinfo @c -*-texinfo-*-
-@c %**start of header
-@setfilename c_sh
-@syncodeindex vr fn
-@synindex ky cp
-@paragraphindent 0
-@c @smallbook
-@c %**end of header
-
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@c
-@c Master file for the Template Applications Supplement
-@c
-
-@include ../../common/setup.texi
-
-@ignore
-@ifinfo
-@format
-START-INFO-DIR-ENTRY
-* RTEMS Hitachi SH Applications Supplement (sh):
-END-INFO-DIR-ENTRY
-@end format
-@end ifinfo
-@end ignore
-
-@c
-@c Title Page Stuff
-@c
-
-@set edition @value{RTEMS-EDITION}
-@set version @value{RTEMS-VERSION}
-@set update-date @value{RTEMS-UPDATE-DATE}
-@set update-month @value{RTEMS-UPDATE-MONTH}
-
-@c
-@c I don't really like having a short title page. --joel
-@c
-@c @shorttitlepage RTEMS Hitachi SH Applications Supplement
-
-@setchapternewpage odd
-@settitle RTEMS Hitachi SH Applications Supplement
-@titlepage
-@finalout
-
-@title RTEMS Hitachi SH Applications Supplement
-@subtitle Edition @value{edition}, for RTEMS @value{version}
-@sp 1
-@subtitle @value{update-month}
-@author On-Line Applications Research Corporation
-@page
-
-@include ../../common/cpright.texi
-@end titlepage
-
-@c This prevents a black box from being printed on "overflow" lines.
-@c The alternative is to rework a sentence to avoid this problem.
-
-@include preface.texi
-@include cpumodel.texi
-@include callconv.texi
-@include memmodel.texi
-@include intr.texi
-@include fatalerr.texi
-@include bsp.texi
-@include cputable.texi
-@include wksheets.texi
-@include timing.texi
-@include timeBSP.texi
-@ifinfo
-@node Top, Preface, (dir), (dir)
-@top c_sh
-
-This is the online version of the RTEMS Hitachi SH Applications Supplement.
-
-@menu
-* Preface::
-* CPU Model Dependent Features::
-* Calling Conventions::
-* Memory Model::
-* Interrupt Processing::
-* Default Fatal Error Processing::
-* Board Support Packages::
-* Processor Dependent Information Table::
-* Memory Requirements::
-* Timing Specification::
-* BSP_FOR_TIMES Timing Data::
-* Command and Variable Index::
-* Concept Index::
-@end menu
-
-@end ifinfo
-@c
-@c
-@c Need to copy the emacs stuff and "trailer stuff" (index, toc) into here
-@c
-
-@node Command and Variable Index, Concept Index, BSP_FOR_TIMES Timing Data Rate Monotonic Manager, Top
-@unnumbered Command and Variable Index
-
-There are currently no Command and Variable Index entries.
-
-@c @printindex fn
-
-@node Concept Index, , Command and Variable Index, Top
-@unnumbered Concept Index
-
-There are currently no Concept Index entries.
-@c @printindex cp
-
-@contents
-@bye
-
diff --git a/doc/supplements/sh/timeBSP.t b/doc/supplements/sh/timeBSP.t
deleted file mode 100644
index f8cafd5f89..0000000000
--- a/doc/supplements/sh/timeBSP.t
+++ /dev/null
@@ -1,108 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@include ../../common/timemac.texi
-@tex
-\global\advance \smallskipamount by -4pt
-@end tex
-
-@chapter BSP_FOR_TIMES Timing Data
-
-@section Introduction
-
-The timing data for the XXX version of RTEMS is
-provided along with the target dependent aspects concerning the
-gathering of the timing data. The hardware platform used to
-gather the times is described to give the reader a better
-understanding of each directive time provided. Also, provided
-is a description of the interrupt latency and the context switch
-times as they pertain to the XXX version of RTEMS.
-
-@section Hardware Platform
-
-All times reported except for the maximum period
-interrupts are disabled by RTEMS were measured using a Motorola
-BSP_FOR_TIMES CPU board. The BSP_FOR_TIMES is a 20Mhz board with one wait
-state dynamic memory and a XXX numeric coprocessor. The
-Zilog 8036 countdown timer on this board was used to measure
-elapsed time with a one-half microsecond resolution. All
-sources of hardware interrupts were disabled, although the
-interrupt level of the XXX allows all interrupts.
-
-The maximum period interrupts are disabled was
-measured by summing the number of CPU cycles required by each
-assembly language instruction executed while interrupts were
-disabled. The worst case times of the XXX microprocessor
-were used for each instruction. Zero wait state memory was
-assumed. The total CPU cycles executed with interrupts
-disabled, including the instructions to disable and enable
-interrupts, was divided by 20 to simulate a 20Mhz XXX. It
-should be noted that the worst case instruction times for the
-XXX assume that the internal cache is disabled and that no
-instructions overlap.
-
-@section Interrupt Latency
-
-The maximum period with interrupts disabled within
-RTEMS is less than RTEMS_MAXIMUM_DISABLE_PERIOD
-microseconds including the instructions
-which disable and re-enable interrupts. The time required for
-the XXX to vector an interrupt and for the RTEMS entry
-overhead before invoking the user's interrupt handler are a
-total of RTEMS_INTR_ENTRY_RETURNS_TO_PREEMPTING_TASK
-microseconds. These combine to yield a worst case
-interrupt latency of less than
-RTEMS_MAXIMUM_DISABLE_PERIOD + RTEMS_INTR_ENTRY_RETURNS_TO_PREEMPTING_TASK
-microseconds at 20Mhz. [NOTE: The maximum period with interrupts
-disabled was last determined for Release
-RTEMS_RELEASE_FOR_MAXIMUM_DISABLE_PERIOD.]
-
-It should be noted again that the maximum period with
-interrupts disabled within RTEMS is hand-timed and based upon
-worst case (i.e. CPU cache disabled and no instruction overlap)
-times for a 20Mhz XXX. The interrupt vector and entry
-overhead time was generated on an BSP_FOR_TIMES benchmark platform
-using the Multiprocessing Communications registers to generate
-as the interrupt source.
-
-@section Context Switch
-
-The RTEMS processor context switch time is RTEMS_NO_FP_CONTEXTS
-microseconds on the BSP_FOR_TIMES benchmark platform when no floating
-point context is saved or restored. Additional execution time
-is required when a TASK_SWITCH user extension is configured.
-The use of the TASK_SWITCH extension is application dependent.
-Thus, its execution time is not considered part of the raw
-context switch time.
-
-Since RTEMS was designed specifically for embedded
-missile applications which are floating point intensive, the
-executive is optimized to avoid unnecessarily saving and
-restoring the state of the numeric coprocessor. The state of
-the numeric coprocessor is only saved when an FLOATING_POINT
-task is dispatched and that task was not the last task to
-utilize the coprocessor. In a system with only one
-FLOATING_POINT task, the state of the numeric coprocessor will
-never be saved or restored. When the first FLOATING_POINT task
-is dispatched, RTEMS does not need to save the current state of
-the numeric coprocessor.
-
-The exact amount of time required to save and restore
-floating point context is dependent on whether an XXX or
-XXX is being used as well as the state of the numeric
-coprocessor. These numeric coprocessors define three operating
-states: initialized, idle, and busy. RTEMS places the
-coprocessor in the initialized state when a task is started or
-restarted. Once the task has utilized the coprocessor, it is in
-the idle state when floating point instructions are not
-executing and the busy state when floating point instructions
-are executing. The state of the coprocessor is task specific.
-
-The following table summarizes the context switch
-times for the BSP_FOR_TIMES benchmark platform:
-
diff --git a/doc/supplements/sparc/ERC32_TIMES b/doc/supplements/sparc/ERC32_TIMES
deleted file mode 100644
index 4f9ce4c98b..0000000000
--- a/doc/supplements/sparc/ERC32_TIMES
+++ /dev/null
@@ -1,247 +0,0 @@
-#
-# SPARC/ERC32/SIS Timing and Size Information
-#
-# $Id$
-#
-
-#
-# CPU Model Information
-#
-RTEMS_BSP ERC32
-RTEMS_CPU_MODEL ERC32
-#
-# Interrupt Latency
-#
-# NOTE: In general, the text says it is hand-calculated to be
-# RTEMS_MAXIMUM_DISABLE_PERIOD at RTEMS_MAXIMUM_DISABLE_PERIOD_MHZ
-# Mhz and this was last calculated for Release
-# RTEMS_VERSION_FOR_MAXIMUM_DISABLE_PERIOD.
-#
-RTEMS_MAXIMUM_DISABLE_PERIOD TBD
-RTEMS_MAXIMUM_DISABLE_PERIOD_MHZ 15.0
-RTEMS_RELEASE_FOR_MAXIMUM_DISABLE_PERIOD 4.2.0-prerelease
-#
-# Context Switch Times
-#
-RTEMS_NO_FP_CONTEXTS 21
-RTEMS_RESTORE_1ST_FP_TASK 26
-RTEMS_SAVE_INIT_RESTORE_INIT 24
-RTEMS_SAVE_IDLE_RESTORE_INIT 23
-RTEMS_SAVE_IDLE_RESTORE_IDLE 33
-#
-# Task Manager Times
-#
-RTEMS_TASK_CREATE_ONLY 59
-RTEMS_TASK_IDENT_ONLY 163
-RTEMS_TASK_START_ONLY 30
-RTEMS_TASK_RESTART_CALLING_TASK 64
-RTEMS_TASK_RESTART_SUSPENDED_RETURNS_TO_CALLER 36
-RTEMS_TASK_RESTART_BLOCKED_RETURNS_TO_CALLER 47
-RTEMS_TASK_RESTART_READY_RETURNS_TO_CALLER 37
-RTEMS_TASK_RESTART_SUSPENDED_PREEMPTS_CALLER 77
-RTEMS_TASK_RESTART_BLOCKED_PREEMPTS_CALLER 84
-RTEMS_TASK_RESTART_READY_PREEMPTS_CALLER 75
-RTEMS_TASK_DELETE_CALLING_TASK 91
-RTEMS_TASK_DELETE_SUSPENDED_TASK 47
-RTEMS_TASK_DELETE_BLOCKED_TASK 50
-RTEMS_TASK_DELETE_READY_TASK 51
-RTEMS_TASK_SUSPEND_CALLING_TASK 56
-RTEMS_TASK_SUSPEND_RETURNS_TO_CALLER 16
-RTEMS_TASK_RESUME_TASK_READIED_RETURNS_TO_CALLER 17
-RTEMS_TASK_RESUME_TASK_READIED_PREEMPTS_CALLER 52
-RTEMS_TASK_SET_PRIORITY_OBTAIN_CURRENT_PRIORITY 10
-RTEMS_TASK_SET_PRIORITY_RETURNS_TO_CALLER 25
-RTEMS_TASK_SET_PRIORITY_PREEMPTS_CALLER 67
-RTEMS_TASK_MODE_OBTAIN_CURRENT_MODE 5
-RTEMS_TASK_MODE_NO_RESCHEDULE 6
-RTEMS_TASK_MODE_RESCHEDULE_RETURNS_TO_CALLER 9
-RTEMS_TASK_MODE_RESCHEDULE_PREEMPTS_CALLER 42
-RTEMS_TASK_GET_NOTE_ONLY 10
-RTEMS_TASK_SET_NOTE_ONLY 10
-RTEMS_TASK_WAKE_AFTER_YIELD_RETURNS_TO_CALLER 6
-RTEMS_TASK_WAKE_AFTER_YIELD_PREEMPTS_CALLER 49
-RTEMS_TASK_WAKE_WHEN_ONLY 75
-#
-# Interrupt Manager
-#
-RTEMS_INTR_ENTRY_RETURNS_TO_NESTED 7
-RTEMS_INTR_ENTRY_RETURNS_TO_INTERRUPTED_TASK 8
-RTEMS_INTR_ENTRY_RETURNS_TO_PREEMPTING_TASK 8
-RTEMS_INTR_EXIT_RETURNS_TO_NESTED 5
-RTEMS_INTR_EXIT_RETURNS_TO_INTERRUPTED_TASK 7
-RTEMS_INTR_EXIT_RETURNS_TO_PREEMPTING_TASK 14
-#
-# Clock Manager
-#
-RTEMS_CLOCK_SET_ONLY 33
-RTEMS_CLOCK_GET_ONLY 4
-RTEMS_CLOCK_TICK_ONLY 6
-#
-# Timer Manager
-#
-RTEMS_TIMER_CREATE_ONLY 11
-RTEMS_TIMER_IDENT_ONLY 159
-RTEMS_TIMER_DELETE_INACTIVE 15
-RTEMS_TIMER_DELETE_ACTIVE 17
-RTEMS_TIMER_FIRE_AFTER_INACTIVE 21
-RTEMS_TIMER_FIRE_AFTER_ACTIVE 23
-RTEMS_TIMER_FIRE_WHEN_INACTIVE 34
-RTEMS_TIMER_FIRE_WHEN_ACTIVE 34
-RTEMS_TIMER_RESET_INACTIVE 20
-RTEMS_TIMER_RESET_ACTIVE 22
-RTEMS_TIMER_CANCEL_INACTIVE 10
-RTEMS_TIMER_CANCEL_ACTIVE 13
-#
-# Semaphore Manager
-#
-RTEMS_SEMAPHORE_CREATE_ONLY 19
-RTEMS_SEMAPHORE_IDENT_ONLY 171
-RTEMS_SEMAPHORE_DELETE_ONLY 19
-RTEMS_SEMAPHORE_OBTAIN_AVAILABLE 12
-RTEMS_SEMAPHORE_OBTAIN_NOT_AVAILABLE_NO_WAIT 12
-RTEMS_SEMAPHORE_OBTAIN_NOT_AVAILABLE_CALLER_BLOCKS 67
-RTEMS_SEMAPHORE_RELEASE_NO_WAITING_TASKS 14
-RTEMS_SEMAPHORE_RELEASE_TASK_READIED_RETURNS_TO_CALLER 23
-RTEMS_SEMAPHORE_RELEASE_TASK_READIED_PREEMPTS_CALLER 57
-#
-# Message Manager
-#
-RTEMS_MESSAGE_QUEUE_CREATE_ONLY 114
-RTEMS_MESSAGE_QUEUE_IDENT_ONLY 159
-RTEMS_MESSAGE_QUEUE_DELETE_ONLY 25
-RTEMS_MESSAGE_QUEUE_SEND_NO_WAITING_TASKS 36
-RTEMS_MESSAGE_QUEUE_SEND_TASK_READIED_RETURNS_TO_CALLER 38
-RTEMS_MESSAGE_QUEUE_SEND_TASK_READIED_PREEMPTS_CALLER 76
-RTEMS_MESSAGE_QUEUE_URGENT_NO_WAITING_TASKS 36
-RTEMS_MESSAGE_QUEUE_URGENT_TASK_READIED_RETURNS_TO_CALLER 38
-RTEMS_MESSAGE_QUEUE_URGENT_TASK_READIED_PREEMPTS_CALLER 76
-RTEMS_MESSAGE_QUEUE_BROADCAST_NO_WAITING_TASKS 15
-RTEMS_MESSAGE_QUEUE_BROADCAST_TASK_READIED_RETURNS_TO_CALLER 42
-RTEMS_MESSAGE_QUEUE_BROADCAST_TASK_READIED_PREEMPTS_CALLER 83
-RTEMS_MESSAGE_QUEUE_RECEIVE_AVAILABLE 30
-RTEMS_MESSAGE_QUEUE_RECEIVE_NOT_AVAILABLE_NO_WAIT 13
-RTEMS_MESSAGE_QUEUE_RECEIVE_NOT_AVAILABLE_CALLER_BLOCKS 67
-RTEMS_MESSAGE_QUEUE_FLUSH_NO_MESSAGES_FLUSHED 9
-RTEMS_MESSAGE_QUEUE_FLUSH_MESSAGES_FLUSHED 13
-#
-# Event Manager
-#
-RTEMS_EVENT_SEND_NO_TASK_READIED 9
-RTEMS_EVENT_SEND_TASK_READIED_RETURNS_TO_CALLER 22
-RTEMS_EVENT_SEND_TASK_READIED_PREEMPTS_CALLER 58
-RTEMS_EVENT_RECEIVE_OBTAIN_CURRENT_EVENTS 1
-RTEMS_EVENT_RECEIVE_AVAILABLE 10
-RTEMS_EVENT_RECEIVE_NOT_AVAILABLE_NO_WAIT 9
-RTEMS_EVENT_RECEIVE_NOT_AVAILABLE_CALLER_BLOCKS 60
-#
-# Signal Manager
-#
-RTEMS_SIGNAL_CATCH_ONLY 6
-RTEMS_SIGNAL_SEND_RETURNS_TO_CALLER 14
-RTEMS_SIGNAL_SEND_SIGNAL_TO_SELF 22
-RTEMS_SIGNAL_EXIT_ASR_OVERHEAD_RETURNS_TO_CALLING_TASK 27
-RTEMS_SIGNAL_EXIT_ASR_OVERHEAD_RETURNS_TO_PREEMPTING_TASK 56
-#
-# Partition Manager
-#
-RTEMS_PARTITION_CREATE_ONLY 34
-RTEMS_PARTITION_IDENT_ONLY 159
-RTEMS_PARTITION_DELETE_ONLY 14
-RTEMS_PARTITION_GET_BUFFER_AVAILABLE 12
-RTEMS_PARTITION_GET_BUFFER_NOT_AVAILABLE 10
-RTEMS_PARTITION_RETURN_BUFFER_ONLY 16
-#
-# Region Manager
-#
-RTEMS_REGION_CREATE_ONLY 22
-RTEMS_REGION_IDENT_ONLY 162
-RTEMS_REGION_DELETE_ONLY 14
-RTEMS_REGION_GET_SEGMENT_AVAILABLE 19
-RTEMS_REGION_GET_SEGMENT_NOT_AVAILABLE_NO_WAIT 19
-RTEMS_REGION_GET_SEGMENT_NOT_AVAILABLE_CALLER_BLOCKS 67
-RTEMS_REGION_RETURN_SEGMENT_NO_WAITING_TASKS 17
-RTEMS_REGION_RETURN_SEGMENT_TASK_READIED_RETURNS_TO_CALLER 44
-RTEMS_REGION_RETURN_SEGMENT_TASK_READIED_PREEMPTS_CALLER 77
-#
-# Dual-Ported Memory Manager
-#
-RTEMS_PORT_CREATE_ONLY 14
-RTEMS_PORT_IDENT_ONLY 159
-RTEMS_PORT_DELETE_ONLY 13
-RTEMS_PORT_INTERNAL_TO_EXTERNAL_ONLY 9
-RTEMS_PORT_EXTERNAL_TO_INTERNAL_ONLY 9
-#
-# IO Manager
-#
-RTEMS_IO_INITIALIZE_ONLY 2
-RTEMS_IO_OPEN_ONLY 1
-RTEMS_IO_CLOSE_ONLY 1
-RTEMS_IO_READ_ONLY 1
-RTEMS_IO_WRITE_ONLY 1
-RTEMS_IO_CONTROL_ONLY 1
-#
-# Rate Monotonic Manager
-#
-RTEMS_RATE_MONOTONIC_CREATE_ONLY 12
-RTEMS_RATE_MONOTONIC_IDENT_ONLY 159
-RTEMS_RATE_MONOTONIC_CANCEL_ONLY 14
-RTEMS_RATE_MONOTONIC_DELETE_ACTIVE 19
-RTEMS_RATE_MONOTONIC_DELETE_INACTIVE 16
-RTEMS_RATE_MONOTONIC_PERIOD_INITIATE_PERIOD_RETURNS_TO_CALLER 20
-RTEMS_RATE_MONOTONIC_PERIOD_CONCLUDE_PERIOD_CALLER_BLOCKS 55
-RTEMS_RATE_MONOTONIC_PERIOD_OBTAIN_STATUS 9
-#
-# Size Information
-#
-#
-# xxx alloted for numbers
-#
-RTEMS_DATA_SPACE 9059
-RTEMS_MINIMUM_CONFIGURATION 28,288
-RTEMS_MAXIMUM_CONFIGURATION 50,432
-# x,xxx alloted for numbers
-RTEMS_CORE_CODE_SIZE 20,336
-RTEMS_INITIALIZATION_CODE_SIZE 1,408
-RTEMS_TASK_CODE_SIZE 4,496
-RTEMS_INTERRUPT_CODE_SIZE 72
-RTEMS_CLOCK_CODE_SIZE 576
-RTEMS_TIMER_CODE_SIZE 1,336
-RTEMS_SEMAPHORE_CODE_SIZE 1,888
-RTEMS_MESSAGE_CODE_SIZE 2,032
-RTEMS_EVENT_CODE_SIZE 1,696
-RTEMS_SIGNAL_CODE_SIZE 664
-RTEMS_PARTITION_CODE_SIZE 1,368
-RTEMS_REGION_CODE_SIZE 1,736
-RTEMS_DPMEM_CODE_SIZE 872
-RTEMS_IO_CODE_SIZE 1,144
-RTEMS_FATAL_ERROR_CODE_SIZE 32
-RTEMS_RATE_MONOTONIC_CODE_SIZE 1,656
-RTEMS_MULTIPROCESSING_CODE_SIZE 8,328
-# xxx alloted for numbers
-RTEMS_TIMER_CODE_OPTSIZE 208
-RTEMS_SEMAPHORE_CODE_OPTSIZE 192
-RTEMS_MESSAGE_CODE_OPTSIZE 320
-RTEMS_EVENT_CODE_OPTSIZE 64
-RTEMS_SIGNAL_CODE_OPTSIZE 64
-RTEMS_PARTITION_CODE_OPTSIZE 152
-RTEMS_REGION_CODE_OPTSIZE 176
-RTEMS_DPMEM_CODE_OPTSIZE 152
-RTEMS_IO_CODE_OPTSIZE 00
-RTEMS_RATE_MONOTONIC_CODE_OPTSIZE 208
-RTEMS_MULTIPROCESSING_CODE_OPTSIZE 408
-# xxx alloted for numbers
-RTEMS_BYTES_PER_TASK 488
-RTEMS_BYTES_PER_TIMER 68
-RTEMS_BYTES_PER_SEMAPHORE 124
-RTEMS_BYTES_PER_MESSAGE_QUEUE 148
-RTEMS_BYTES_PER_REGION 144
-RTEMS_BYTES_PER_PARTITION 56
-RTEMS_BYTES_PER_PORT 36
-RTEMS_BYTES_PER_PERIOD 36
-RTEMS_BYTES_PER_EXTENSION 64
-RTEMS_BYTES_PER_FP_TASK 136
-RTEMS_BYTES_PER_NODE 48
-RTEMS_BYTES_PER_GLOBAL_OBJECT 20
-RTEMS_BYTES_PER_PROXY 124
-# x,xxx alloted for numbers
-RTEMS_BYTES_OF_FIXED_SYSTEM_REQUIREMENTS 10,072
diff --git a/doc/supplements/sparc/Makefile b/doc/supplements/sparc/Makefile
deleted file mode 100644
index b390b92205..0000000000
--- a/doc/supplements/sparc/Makefile
+++ /dev/null
@@ -1,163 +0,0 @@
-#
-# COPYRIGHT (c) 1988-1999.
-# On-Line Applications Research Corporation (OAR).
-# All rights reserved.
-#
-# $Id$
-#
-
-PROJECT=sparc
-
-include ../../Make.config
-
-REPLACE=../../tools/word-replace
-
-all: html info ps pdf
-
-dirs:
- $(make-dirs)
-
-COMMON_FILES=../../common/cpright.texi ../../common/setup.texi
-
-GENERATED_FILES=\
- cpumodel.texi callconv.texi memmodel.texi intr.texi fatalerr.texi \
- bsp.texi cputable.texi timing.texi wksheets.texi timeERC32.texi
-
-FILES= $(PROJECT).texi \
- preface.texi \
- $(GENERATED_FILES)
-
-INFOFILES=$(wildcard $(PROJECT) $(PROJECT)-*)
-
-info: dirs c_sparc
- cp c_$(PROJECT) c_$(PROJECT)-* $(INFO_INSTALL)
-
-c_sparc: $(FILES)
- $(MAKEINFO) $(PROJECT).texi
-
-dvi: dirs $(PROJECT).dvi
-ps: dirs $(PROJECT).ps
-pdf: dirs $(PROJECT).pdf
-
-$(PROJECT).pdf: $(FILES)
- $(TEXI2PDF) $(PROJECT).texi
- cp $(PROJECT).pdf $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).ps: dirs $(PROJECT).dvi
- dvips -o $(PROJECT).ps $(PROJECT).dvi
- cp $(PROJECT).ps $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).dvi: $(FILES)
- $(TEXI2DVI) $(PROJECT).texi
- cp $(PROJECT).dvi $(WWW_INSTALL)/$(PROJECT)
-
-html: dirs $(FILES)
- -mkdir -p $(WWW_INSTALL)/$(PROJECT)
- $(TEXI2WWW) $(TEXI2WWW_ARGS) -dir $(WWW_INSTALL)/$(PROJECT) \
- $(PROJECT).texi
-
-clean:
- rm -f *.o $(PROG) *.txt core $(PROJECT).pdf
- rm -f *.dvi *.ps *.log *.aux *.cp *.fn *.ky *.pg *.toc *.tp *.vr $(BASE)
- rm -f $(PROJECT) $(PROJECT)-*
- rm -f c_$(PROJECT) c_$(PROJECT)-*
- rm -f intr.t $(GENERATED_FILES)
- rm -f wksheets.t wksheets_NOTIMES.t timing.t
- rm -f timeERC32_.t timeERC32_.texi
- rm -f *.fixed _*
-
-#
-# Chapters which get automatic processing
-#
-
-cpumodel.texi: cpumodel.t Makefile
- $(BMENU) -p "Preface" \
- -u "Top" \
- -n "Calling Conventions" ${*}.t
-
-callconv.texi: callconv.t Makefile
- $(BMENU) -p "CPU Model Dependent Features CPU Model Implementation Notes" \
- -u "Top" \
- -n "Memory Model" ${*}.t
-
-memmodel.texi: memmodel.t Makefile
- $(BMENU) -p "Calling Conventions User-Provided Routines" \
- -u "Top" \
- -n "Interrupt Processing" ${*}.t
-
-# Interrupt Chapter:
-# 1. Replace Times and Sizes
-# 2. Build Node Structure
-intr.t: intr_NOTIMES.t ERC32_TIMES
- ${REPLACE} -p ERC32_TIMES intr_NOTIMES.t
- mv intr_NOTIMES.t.fixed intr.t
-
-intr.texi: intr.t Makefile
- $(BMENU) -p "Memory Model Flat Memory Model" \
- -u "Top" \
- -n "Default Fatal Error Processing" ${*}.t
-
-fatalerr.texi: fatalerr.t Makefile
- $(BMENU) -p "Interrupt Processing Interrupt Stack" \
- -u "Top" \
- -n "Board Support Packages" ${*}.t
-
-bsp.texi: bsp.t Makefile
- $(BMENU) -p "Default Fatal Error Processing Default Fatal Error Handler Operations" \
- -u "Top" \
- -n "Processor Dependent Information Table" ${*}.t
-
-cputable.texi: cputable.t Makefile
- $(BMENU) -p "Board Support Packages Processor Initialization" \
- -u "Top" \
- -n "Memory Requirements" ${*}.t
-
-
-# Worksheets Chapter:
-# 1. Obtain the Shared File
-# 2. Replace Times and Sizes
-# 3. Build Node Structure
-
-wksheets_NOTIMES.t: ../../common/wksheets.t
- cp ../../common/wksheets.t wksheets_NOTIMES.t
-
-wksheets.t: wksheets_NOTIMES.t ERC32_TIMES
- ${REPLACE} -p ERC32_TIMES wksheets_NOTIMES.t
- mv wksheets_NOTIMES.t.fixed wksheets.t
-
-wksheets.texi: wksheets.t Makefile
- $(BMENU) -p "Processor Dependent Information Table CPU Dependent Information Table" \
- -u "Top" \
- -n "Timing Specification" ${*}.t
-
-# Timing Specification Chapter:
-# 1. Copy the Shared File
-# 3. Build Node Structure
-
-timing.t: ../../common/timing.t
- cp ../../common/timing.t timing.t
-
-timing.texi: timing.t Makefile
- $(BMENU) -p "Memory Requirements RTEMS RAM Workspace Worksheet" \
- -u "Top" \
- -n "ERC32 Timing Data" ${*}.t
-
-# Timing Data for ERC32 BSP Chapter:
-# 1. Copy the Shared File
-# 2. Replace Times and Sizes
-# 3. Build Node Structure
-
-timeERC32_.t: ../../common/timetbl.t timeERC32.t
- cat timeERC32.t ../../common/timetbl.t >timeERC32_.t
- @echo >>timeERC32_.t
- @echo "@tex" >>timeERC32_.t
- @echo "\\global\\advance \\smallskipamount by 4pt" >>timeERC32_.t
- @echo "@end tex" >>timeERC32_.t
- ${REPLACE} -p ERC32_TIMES timeERC32_.t
- mv timeERC32_.t.fixed timeERC32_.t
-
-timeERC32.texi: timeERC32_.t Makefile
- $(BMENU) -p "Timing Specification Terminology" \
- -u "Top" \
- -n "Command and Variable Index" timeERC32_.t
- mv timeERC32_.texi timeERC32.texi
diff --git a/doc/supplements/sparc/bsp.t b/doc/supplements/sparc/bsp.t
deleted file mode 100644
index 32bac2855a..0000000000
--- a/doc/supplements/sparc/bsp.t
+++ /dev/null
@@ -1,87 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Board Support Packages
-
-@section Introduction
-
-An RTEMS Board Support Package (BSP) must be designed
-to support a particular processor and target board combination.
-This chapter presents a discussion of SPARC specific BSP issues.
-For more information on developing a BSP, refer to the chapter
-titled Board Support Packages in the RTEMS
-Applications User's Guide.
-
-@section System Reset
-
-An RTEMS based application is initiated or
-re-initiated when the SPARC processor is reset. When the SPARC
-is reset, the processor performs the following actions:
-
-@itemize @bullet
-@item the enable trap (ET) of the psr is set to 0 to disable
-traps,
-
-@item the supervisor bit (S) of the psr is set to 1 to enter
-supervisor mode, and
-
-@item the PC is set 0 and the nPC is set to 4.
-@end itemize
-
-The processor then begins to execute the code at
-location 0. It is important to note that all fields in the psr
-are not explicitly set by the above steps and all other
-registers retain their value from the previous execution mode.
-This is true even of the Trap Base Register (TBR) whose contents
-reflect the last trap which occurred before the reset.
-
-@section Processor Initialization
-
-It is the responsibility of the application's
-initialization code to initialize the TBR and install trap
-handlers for at least the register window overflow and register
-window underflow conditions. Traps should be enabled before
-invoking any subroutines to allow for register window
-management. However, interrupts should be disabled by setting
-the Processor Interrupt Level (pil) field of the psr to 15.
-RTEMS installs it's own Trap Table as part of initialization
-which is initialized with the contents of the Trap Table in
-place when the @code{rtems_initialize_executive} directive was invoked.
-Upon completion of executive initialization, interrupts are
-enabled.
-
-If this SPARC implementation supports on-chip caching
-and this is to be utilized, then it should be enabled during the
-reset application initialization code.
-
-In addition to the requirements described in the
-Board Support Packages chapter of the @value{LANGUAGE}
-Applications User's Manual for the reset code
-which is executed before the call to
-@code{rtems_initialize_executive}, the SPARC version has the following
-specific requirements:
-
-@itemize @bullet
-@item Must leave the S bit of the status register set so that
-the SPARC remains in the supervisor state.
-
-@item Must set stack pointer (sp) such that a minimum stack
-size of MINIMUM_STACK_SIZE bytes is provided for the
-@code{rtems_initialize_executive} directive.
-
-@item Must disable all external interrupts (i.e. set the pil
-to 15).
-
-@item Must enable traps so window overflow and underflow
-conditions can be properly handled.
-
-@item Must initialize the SPARC's initial trap table with at
-least trap handlers for register window overflow and register
-window underflow.
-@end itemize
-
diff --git a/doc/supplements/sparc/callconv.t b/doc/supplements/sparc/callconv.t
deleted file mode 100644
index 590707386b..0000000000
--- a/doc/supplements/sparc/callconv.t
+++ /dev/null
@@ -1,392 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Calling Conventions
-
-@section Introduction
-
-Each high-level language compiler generates
-subroutine entry and exit code based upon a set of rules known
-as the compiler's calling convention. These rules address the
-following issues:
-
-@itemize @bullet
-@item register preservation and usage
-
-@item parameter passing
-
-@item call and return mechanism
-@end itemize
-
-A compiler's calling convention is of importance when
-interfacing to subroutines written in another language either
-assembly or high-level. Even when the high-level language and
-target processor are the same, different compilers may use
-different calling conventions. As a result, calling conventions
-are both processor and compiler dependent.
-
-@section Programming Model
-
-This section discusses the programming model for the
-SPARC architecture.
-
-@subsection Non-Floating Point Registers
-
-The SPARC architecture defines thirty-two
-non-floating point registers directly visible to the programmer.
-These are divided into four sets:
-
-@itemize @bullet
-@item input registers
-
-@item local registers
-
-@item output registers
-
-@item global registers
-@end itemize
-
-Each register is referred to by either two or three
-names in the SPARC reference manuals. First, the registers are
-referred to as r0 through r31 or with the alternate notation
-r[0] through r[31]. Second, each register is a member of one of
-the four sets listed above. Finally, some registers have an
-architecturally defined role in the programming model which
-provides an alternate name. The following table describes the
-mapping between the 32 registers and the register sets:
-
-@ifset use-ascii
-@example
-@group
- +-----------------+----------------+------------------+
- | Register Number | Register Names | Description |
- +-----------------+----------------+------------------+
- | 0 - 7 | g0 - g7 | Global Registers |
- +-----------------+----------------+------------------+
- | 8 - 15 | o0 - o7 | Output Registers |
- +-----------------+----------------+------------------+
- | 16 - 23 | l0 - l7 | Local Registers |
- +-----------------+----------------+------------------+
- | 24 - 31 | i0 - i7 | Input Registers |
- +-----------------+----------------+------------------+
-@end group
-@end example
-@end ifset
-
-@ifset use-tex
-@sp 1
-@tex
-\centerline{\vbox{\offinterlineskip\halign{
-\vrule\strut#&
-\hbox to 1.75in{\enskip\hfil#\hfil}&
-\vrule#&
-\hbox to 1.75in{\enskip\hfil#\hfil}&
-\vrule#&
-\hbox to 1.75in{\enskip\hfil#\hfil}&
-\vrule#\cr
-\noalign{\hrule}
-&\bf Register Number &&\bf Register Names&&\bf Description&\cr\noalign{\hrule}
-&0 - 7&&g0 - g7&&Global Registers&\cr\noalign{\hrule}
-&8 - 15&&o0 - o7&&Output Registers&\cr\noalign{\hrule}
-&16 - 23&&l0 - l7&&Local Registers&\cr\noalign{\hrule}
-&24 - 31&&i0 - i7&&Input Registers&\cr\noalign{\hrule}
-}}\hfil}
-@end tex
-@end ifset
-
-@ifset use-html
-@html
-<CENTER>
- <TABLE COLS=3 WIDTH="80%" BORDER=2>
-<TR><TD ALIGN=center><STRONG>Register Number</STRONG></TD>
- <TD ALIGN=center><STRONG>Register Names</STRONG></TD>
- <TD ALIGN=center><STRONG>Description</STRONG></TD>
-<TR><TD ALIGN=center>0 - 7</TD>
- <TD ALIGN=center>g0 - g7</TD>
- <TD ALIGN=center>Global Registers</TD></TR>
-<TR><TD ALIGN=center>8 - 15</TD>
- <TD ALIGN=center>o0 - o7</TD>
- <TD ALIGN=center>Output Registers</TD></TR>
-<TR><TD ALIGN=center>16 - 23</TD>
- <TD ALIGN=center>l0 - l7</TD>
- <TD ALIGN=center>Local Registers</TD></TR>
-<TR><TD ALIGN=center>24 - 31</TD>
- <TD ALIGN=center>i0 - i7</TD>
- <TD ALIGN=center>Input Registers</TD></TR>
- </TABLE>
-</CENTER>
-@end html
-@end ifset
-
-As mentioned above, some of the registers serve
-defined roles in the programming model. The following table
-describes the role of each of these registers:
-
-@ifset use-ascii
-@example
-@group
- +---------------+----------------+----------------------+
- | Register Name | Alternate Name | Description |
- +---------------+----------------+----------------------+
- | g0 | na | reads return 0 |
- | | | writes are ignored |
- +---------------+----------------+----------------------+
- | o6 | sp | stack pointer |
- +---------------+----------------+----------------------+
- | i6 | fp | frame pointer |
- +---------------+----------------+----------------------+
- | i7 | na | return address |
- +---------------+----------------+----------------------+
-@end group
-@end example
-@end ifset
-
-@ifset use-tex
-@sp 1
-@tex
-\centerline{\vbox{\offinterlineskip\halign{
-\vrule\strut#&
-\hbox to 1.75in{\enskip\hfil#\hfil}&
-\vrule#&
-\hbox to 1.75in{\enskip\hfil#\hfil}&
-\vrule#&
-\hbox to 1.75in{\enskip\hfil#\hfil}&
-\vrule#\cr
-\noalign{\hrule}
-&\bf Register Name &&\bf Alternate Names&&\bf Description&\cr\noalign{\hrule}
-&g0&&NA&&reads return 0; &\cr
-&&&&&writes are ignored&\cr\noalign{\hrule}
-&o6&&sp&&stack pointer&\cr\noalign{\hrule}
-&i6&&fp&&frame pointer&\cr\noalign{\hrule}
-&i7&&NA&&return address&\cr\noalign{\hrule}
-}}\hfil}
-@end tex
-@end ifset
-
-@ifset use-html
-@html
-<CENTER>
- <TABLE COLS=3 WIDTH="80%" BORDER=2>
-<TR><TD ALIGN=center><STRONG>Register Name</STRONG></TD>
- <TD ALIGN=center><STRONG>Alternate Name</STRONG></TD>
- <TD ALIGN=center><STRONG>Description</STRONG></TD></TR>
-<TR><TD ALIGN=center>g0</TD>
- <TD ALIGN=center>NA</TD>
- <TD ALIGN=center>reads return 0 ; writes are ignored</TD></TR>
-<TR><TD ALIGN=center>o6</TD>
- <TD ALIGN=center>sp</TD>
- <TD ALIGN=center>stack pointer</TD></TR>
-<TR><TD ALIGN=center>i6</TD>
- <TD ALIGN=center>fp</TD>
- <TD ALIGN=center>frame pointer</TD></TR>
-<TR><TD ALIGN=center>i7</TD>
- <TD ALIGN=center>NA</TD>
- <TD ALIGN=center>return address</TD></TR>
- </TABLE>
-</CENTER>
-@end html
-@end ifset
-
-
-@subsection Floating Point Registers
-
-The SPARC V7 architecture includes thirty-two,
-thirty-two bit registers. These registers may be viewed as
-follows:
-
-@itemize @bullet
-@item 32 single precision floating point or integer registers
-(f0, f1, ... f31)
-
-@item 16 double precision floating point registers (f0, f2,
-f4, ... f30)
-
-@item 8 extended precision floating point registers (f0, f4,
-f8, ... f28)
-@end itemize
-
-The floating point status register (fpsr) specifies
-the behavior of the floating point unit for rounding, contains
-its condition codes, version specification, and trap information.
-
-A queue of the floating point instructions which have
-started execution but not yet completed is maintained. This
-queue is needed to support the multiple cycle nature of floating
-point operations and to aid floating point exception trap
-handlers. Once a floating point exception has been encountered,
-the queue is frozen until it is emptied by the trap handler.
-The floating point queue is loaded by launching instructions.
-It is emptied normally when the floating point completes all
-outstanding instructions and by floating point exception
-handlers with the store double floating point queue (stdfq)
-instruction.
-
-@subsection Special Registers
-
-The SPARC architecture includes two special registers
-which are critical to the programming model: the Processor State
-Register (psr) and the Window Invalid Mask (wim). The psr
-contains the condition codes, processor interrupt level, trap
-enable bit, supervisor mode and previous supervisor mode bits,
-version information, floating point unit and coprocessor enable
-bits, and the current window pointer (cwp). The cwp field of
-the psr and wim register are used to manage the register windows
-in the SPARC architecture. The register windows are discussed
-in more detail below.
-
-@section Register Windows
-
-The SPARC architecture includes the concept of
-register windows. An overly simplistic way to think of these
-windows is to imagine them as being an infinite supply of
-"fresh" register sets available for each subroutine to use. In
-reality, they are much more complicated.
-
-The save instruction is used to obtain a new register
-window. This instruction decrements the current window pointer,
-thus providing a new set of registers for use. This register
-set includes eight fresh local registers for use exclusively by
-this subroutine. When done with a register set, the restore
-instruction increments the current window pointer and the
-previous register set is once again available.
-
-The two primary issues complicating the use of
-register windows are that (1) the set of register windows is
-finite, and (2) some registers are shared between adjacent
-registers windows.
-
-Because the set of register windows is finite, it is
-possible to execute enough save instructions without
-corresponding restore's to consume all of the register windows.
-This is easily accomplished in a high level language because
-each subroutine typically performs a save instruction upon
-entry. Thus having a subroutine call depth greater than the
-number of register windows will result in a window overflow
-condition. The window overflow condition generates a trap which
-must be handled in software. The window overflow trap handler
-is responsible for saving the contents of the oldest register
-window on the program stack.
-
-Similarly, the subroutines will eventually complete
-and begin to perform restore's. If the restore results in the
-need for a register window which has previously been written to
-memory as part of an overflow, then a window underflow condition
-results. Just like the window overflow, the window underflow
-condition must be handled in software by a trap handler. The
-window underflow trap handler is responsible for reloading the
-contents of the register window requested by the restore
-instruction from the program stack.
-
-The Window Invalid Mask (wim) and the Current Window
-Pointer (cwp) field in the psr are used in conjunction to manage
-the finite set of register windows and detect the window
-overflow and underflow conditions. The cwp contains the index
-of the register window currently in use. The save instruction
-decrements the cwp modulo the number of register windows.
-Similarly, the restore instruction increments the cwp modulo the
-number of register windows. Each bit in the wim represents
-represents whether a register window contains valid information.
-The value of 0 indicates the register window is valid and 1
-indicates it is invalid. When a save instruction causes the cwp
-to point to a register window which is marked as invalid, a
-window overflow condition results. Conversely, the restore
-instruction may result in a window underflow condition.
-
-Other than the assumption that a register window is
-always available for trap (i.e. interrupt) handlers, the SPARC
-architecture places no limits on the number of register windows
-simultaneously marked as invalid (i.e. number of bits set in the
-wim). However, RTEMS assumes that only one register window is
-marked invalid at a time (i.e. only one bit set in the wim).
-This makes the maximum possible number of register windows
-available to the user while still meeting the requirement that
-window overflow and underflow conditions can be detected.
-
-The window overflow and window underflow trap
-handlers are a critical part of the run-time environment for a
-SPARC application. The SPARC architectural specification allows
-for the number of register windows to be any power of two less
-than or equal to 32. The most common choice for SPARC
-implementations appears to be 8 register windows. This results
-in the cwp ranging in value from 0 to 7 on most implementations.
-
-
-The second complicating factor is the sharing of
-registers between adjacent register windows. While each
-register window has its own set of local registers, the input
-and output registers are shared between adjacent windows. The
-output registers for register window N are the same as the input
-registers for register window ((N - 1) modulo RW) where RW is
-the number of register windows. An alternative way to think of
-this is to remember how parameters are passed to a subroutine on
-the SPARC. The caller loads values into what are its output
-registers. Then after the callee executes a save instruction,
-those parameters are available in its input registers. This is
-a very efficient way to pass parameters as no data is actually
-moved by the save or restore instructions.
-
-@section Call and Return Mechanism
-
-The SPARC architecture supports a simple yet
-effective call and return mechanism. A subroutine is invoked
-via the call (call) instruction. This instruction places the
-return address in the caller's output register 7 (o7). After
-the callee executes a save instruction, this value is available
-in input register 7 (i7) until the corresponding restore
-instruction is executed.
-
-The callee returns to the caller via a jmp to the
-return address. There is a delay slot following this
-instruction which is commonly used to execute a restore
-instruction -- if a register window was allocated by this
-subroutine.
-
-It is important to note that the SPARC subroutine
-call and return mechanism does not automatically save and
-restore any registers. This is accomplished via the save and
-restore instructions which manage the set of registers windows.
-
-@section Calling Mechanism
-
-All RTEMS directives are invoked using the regular
-SPARC calling convention via the call instruction.
-
-@section Register Usage
-
-As discussed above, the call instruction does not
-automatically save any registers. The save and restore
-instructions are used to allocate and deallocate register
-windows. When a register window is allocated, the new set of
-local registers are available for the exclusive use of the
-subroutine which allocated this register set.
-
-@section Parameter Passing
-
-RTEMS assumes that arguments are placed in the
-caller's output registers with the first argument in output
-register 0 (o0), the second argument in output register 1 (o1),
-and so forth. Until the callee executes a save instruction, the
-parameters are still visible in the output registers. After the
-callee executes a save instruction, the parameters are visible
-in the corresponding input registers. The following pseudo-code
-illustrates the typical sequence used to call a RTEMS directive
-with three (3) arguments:
-
-@example
-load third argument into o2
-load second argument into o1
-load first argument into o0
-invoke directive
-@end example
-
-@section User-Provided Routines
-
-All user-provided routines invoked by RTEMS, such as
-user extensions, device drivers, and MPCI routines, must also
-adhere to these calling conventions.
-
diff --git a/doc/supplements/sparc/cpumodel.t b/doc/supplements/sparc/cpumodel.t
deleted file mode 100644
index 805791f048..0000000000
--- a/doc/supplements/sparc/cpumodel.t
+++ /dev/null
@@ -1,128 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter CPU Model Dependent Features
-
-@section Introduction
-
-Microprocessors are generally classified into
-families with a variety of CPU models or implementations within
-that family. Within a processor family, there is a high level
-of binary compatibility. This family may be based on either an
-architectural specification or on maintaining compatibility with
-a popular processor. Recent microprocessor families such as the
-SPARC or PA-RISC are based on an architectural specification
-which is independent or any particular CPU model or
-implementation. Older families such as the M68xxx and the iX86
-evolved as the manufacturer strived to produce higher
-performance processor models which maintained binary
-compatibility with older models.
-
-RTEMS takes advantage of the similarity of the
-various models within a CPU family. Although the models do vary
-in significant ways, the high level of compatibility makes it
-possible to share the bulk of the CPU dependent executive code
-across the entire family.
-
-@section CPU Model Feature Flags
-
-Each processor family supported by RTEMS has a
-list of features which vary between CPU models
-within a family. For example, the most common model dependent
-feature regardless of CPU family is the presence or absence of a
-floating point unit or coprocessor. When defining the list of
-features present on a particular CPU model, one simply notes
-that floating point hardware is or is not present and defines a
-single constant appropriately. Conditional compilation is
-utilized to include the appropriate source code for this CPU
-model's feature set. It is important to note that this means
-that RTEMS is thus compiled using the appropriate feature set
-and compilation flags optimal for this CPU model used. The
-alternative would be to generate a binary which would execute on
-all family members using only the features which were always
-present.
-
-This section presents the set of features which vary
-across SPARC implementations and are of importance to RTEMS.
-The set of CPU model feature macros are defined in the file
-c/src/exec/score/cpu/sparc/sparc.h based upon the particular CPU
-model defined on the compilation command line.
-
-@subsection CPU Model Name
-
-The macro CPU_MODEL_NAME is a string which designates
-the name of this CPU model. For example, for the European Space
-Agency's ERC32 SPARC model, this macro is set to the string
-"erc32".
-
-@subsection Floating Point Unit
-
-The macro SPARC_HAS_FPU is set to 1 to indicate that
-this CPU model has a hardware floating point unit and 0
-otherwise.
-
-@subsection Bitscan Instruction
-
-The macro SPARC_HAS_BITSCAN is set to 1 to indicate
-that this CPU model has the bitscan instruction. For example,
-this instruction is supported by the Fujitsu SPARClite family.
-
-@subsection Number of Register Windows
-
-The macro SPARC_NUMBER_OF_REGISTER_WINDOWS is set to
-indicate the number of register window sets implemented by this
-CPU model. The SPARC architecture allows a for a maximum of
-thirty-two register window sets although most implementations
-only include eight.
-
-@subsection Low Power Mode
-
-The macro SPARC_HAS_LOW_POWER_MODE is set to one to
-indicate that this CPU model has a low power mode. If low power
-is enabled, then there must be CPU model specific implementation
-of the IDLE task in c/src/exec/score/cpu/sparc/cpu.c. The low
-power mode IDLE task should be of the form:
-
-@example
-while ( TRUE ) @{
- enter low power mode
-@}
-@end example
-
-The code required to enter low power mode is CPU model specific.
-
-@section CPU Model Implementation Notes
-
-The ERC32 is a custom SPARC V7 implementation based on the Cypress 601/602
-chipset. This CPU has a number of on-board peripherals and was developed by
-the European Space Agency to target space applications. RTEMS currently
-provides support for the following peripherals:
-
-@itemize @bullet
-@item UART Channels A and B
-@item General Purpose Timer
-@item Real Time Clock
-@item Watchdog Timer (so it can be disabled)
-@item Control Register (so powerdown mode can be enabled)
-@item Memory Control Register
-@item Interrupt Control
-@end itemize
-
-The General Purpose Timer and Real Time Clock Timer provided with the ERC32
-share the Timer Control Register. Because the Timer Control Register is write
-only, we must mirror it in software and insure that writes to one timer do not
-alter the current settings and status of the other timer. Routines are
-provided in erc32.h which promote the view that the two timers are completely
-independent. By exclusively using these routines to access the Timer Control
-Register, the application can view the system as having a General Purpose
-Timer Control Register and a Real Time Clock Timer Control Register
-rather than the single shared value.
-
-The RTEMS Idle thread take advantage of the low power mode provided by the
-ERC32. Low power mode is entered during idle loops and is enabled at
-initialization time.
diff --git a/doc/supplements/sparc/cputable.t b/doc/supplements/sparc/cputable.t
deleted file mode 100644
index df74ce87c3..0000000000
--- a/doc/supplements/sparc/cputable.t
+++ /dev/null
@@ -1,102 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Processor Dependent Information Table
-
-@section Introduction
-
-Any highly processor dependent information required
-to describe a processor to RTEMS is provided in the CPU
-Dependent Information Table. This table is not required for all
-processors supported by RTEMS. This chapter describes the
-contents, if any, for a particular processor type.
-
-@section CPU Dependent Information Table
-
-The SPARC version of the RTEMS CPU Dependent
-Information Table is given by the C structure definition is
-shown below:
-
-@example
-@group
-typedef struct @{
- void (*pretasking_hook)( void );
- void (*predriver_hook)( void );
- void (*postdriver_hook)( void );
- void (*idle_task)( void );
- boolean do_zero_of_workspace;
- unsigned32 idle_task_stack_size;
- unsigned32 interrupt_stack_size;
- unsigned32 extra_mpci_receive_server_stack;
- void * (*stack_allocate_hook)( unsigned32 );
- void (*stack_free_hook)( void* );
- /* end of fields required on all CPUs */
-
-@} rtems_cpu_table;
-@end group
-@end example
-
-@table @code
-@item pretasking_hook
-is the address of the user provided routine which is invoked
-once RTEMS APIs are initialized. This routine will be invoked
-before any system tasks are created. Interrupts are disabled.
-This field may be NULL to indicate that the hook is not utilized.
-
-@item predriver_hook
-is the address of the user provided
-routine that is invoked immediately before the
-the device drivers and MPCI are initialized. RTEMS
-initialization is complete but interrupts and tasking are disabled.
-This field may be NULL to indicate that the hook is not utilized.
-
-@item postdriver_hook
-is the address of the user provided
-routine that is invoked immediately after the
-the device drivers and MPCI are initialized. RTEMS
-initialization is complete but interrupts and tasking are disabled.
-This field may be NULL to indicate that the hook is not utilized.
-
-@item idle_task
-is the address of the optional user
-provided routine which is used as the system's IDLE task. If
-this field is not NULL, then the RTEMS default IDLE task is not
-used. This field may be NULL to indicate that the default IDLE
-is to be used.
-
-@item do_zero_of_workspace
-indicates whether RTEMS should
-zero the Workspace as part of its initialization. If set to
-TRUE, the Workspace is zeroed. Otherwise, it is not.
-
-@item idle_task_stack_size
-is the size of the RTEMS idle task stack in bytes.
-If this number is less than MINIMUM_STACK_SIZE, then the
-idle task's stack will be MINIMUM_STACK_SIZE in byte.
-
-@item interrupt_stack_size
-is the size of the RTEMS allocated interrupt stack in bytes.
-This value must be at least as large as MINIMUM_STACK_SIZE.
-
-@item extra_mpci_receive_server_stack
-is the extra stack space allocated for the RTEMS MPCI receive server task
-in bytes. The MPCI receive server may invoke nearly all directives and
-may require extra stack space on some targets.
-
-@item stack_allocate_hook
-is the address of the optional user provided routine which allocates
-memory for task stacks. If this hook is not NULL, then a stack_free_hook
-must be provided as well.
-
-@item stack_free_hook
-is the address of the optional user provided routine which frees
-memory for task stacks. If this hook is not NULL, then a stack_allocate_hook
-must be provided as well.
-
-@end table
-
diff --git a/doc/supplements/sparc/fatalerr.t b/doc/supplements/sparc/fatalerr.t
deleted file mode 100644
index 7a1d483698..0000000000
--- a/doc/supplements/sparc/fatalerr.t
+++ /dev/null
@@ -1,32 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Default Fatal Error Processing
-
-@section Introduction
-
-Upon detection of a fatal error by either the
-application or RTEMS the fatal error manager is invoked. The
-fatal error manager will invoke the user-supplied fatal error
-handlers. If no user-supplied handlers are configured, the
-RTEMS provided default fatal error handler is invoked. If the
-user-supplied fatal error handlers return to the executive the
-default fatal error handler is then invoked. This chapter
-describes the precise operations of the default fatal error
-handler.
-
-@section Default Fatal Error Handler Operations
-
-The default fatal error handler which is invoked by
-the fatal_error_occurred directive when there is no user handler
-configured or the user handler returns control to RTEMS. The
-default fatal error handler disables processor interrupts to
-level 15, places the error code in g1, and goes into an infinite
-loop to simulate a halt processor instruction.
-
-
diff --git a/doc/supplements/sparc/intr_NOTIMES.t b/doc/supplements/sparc/intr_NOTIMES.t
deleted file mode 100644
index 86322ffbab..0000000000
--- a/doc/supplements/sparc/intr_NOTIMES.t
+++ /dev/null
@@ -1,199 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Interrupt Processing
-
-@section Introduction
-
-Different types of processors respond to the
-occurrence of an interrupt in its own unique fashion. In
-addition, each processor type provides a control mechanism to
-allow for the proper handling of an interrupt. The processor
-dependent response to the interrupt modifies the current
-execution state and results in a change in the execution stream.
-Most processors require that an interrupt handler utilize some
-special control mechanisms to return to the normal processing
-stream. Although RTEMS hides many of the processor dependent
-details of interrupt processing, it is important to understand
-how the RTEMS interrupt manager is mapped onto the processor's
-unique architecture. Discussed in this chapter are the SPARC's
-interrupt response and control mechanisms as they pertain to
-RTEMS.
-
-RTEMS and associated documentation uses the terms
-interrupt and vector. In the SPARC architecture, these terms
-correspond to traps and trap type, respectively. The terms will
-be used interchangeably in this manual.
-
-@section Synchronous Versus Asynchronous Traps
-
-The SPARC architecture includes two classes of traps:
-synchronous and asynchronous. Asynchronous traps occur when an
-external event interrupts the processor. These traps are not
-associated with any instruction executed by the processor and
-logically occur between instructions. The instruction currently
-in the execute stage of the processor is allowed to complete
-although subsequent instructions are annulled. The return
-address reported by the processor for asynchronous traps is the
-pair of instructions following the current instruction.
-
-Synchronous traps are caused by the actions of an
-instruction. The trap stimulus in this case either occurs
-internally to the processor or is from an external signal that
-was provoked by the instruction. These traps are taken
-immediately and the instruction that caused the trap is aborted
-before any state changes occur in the processor itself. The
-return address reported by the processor for synchronous traps
-is the instruction which caused the trap and the following
-instruction.
-
-@section Vectoring of Interrupt Handler
-
-Upon receipt of an interrupt the SPARC automatically
-performs the following actions:
-
-@itemize @bullet
-@item disables traps (sets the ET bit of the psr to 0),
-
-@item the S bit of the psr is copied into the Previous
-Supervisor Mode (PS) bit of the psr,
-
-@item the cwp is decremented by one (modulo the number of
-register windows) to activate a trap window,
-
-@item the PC and nPC are loaded into local register 1 and 2
-(l0 and l1),
-
-@item the trap type (tt) field of the Trap Base Register (TBR)
-is set to the appropriate value, and
-
-@item if the trap is not a reset, then the PC is written with
-the contents of the TBR and the nPC is written with TBR + 4. If
-the trap is a reset, then the PC is set to zero and the nPC is
-set to 4.
-@end itemize
-
-Trap processing on the SPARC has two features which
-are noticeably different than interrupt processing on other
-architectures. First, the value of psr register in effect
-immediately before the trap occurred is not explicitly saved.
-Instead only reversible alterations are made to it. Second, the
-Processor Interrupt Level (pil) is not set to correspond to that
-of the interrupt being processed. When a trap occurs, ALL
-subsequent traps are disabled. In order to safely invoke a
-subroutine during trap handling, traps must be enabled to allow
-for the possibility of register window overflow and underflow
-traps.
-
-If the interrupt handler was installed as an RTEMS
-interrupt handler, then upon receipt of the interrupt, the
-processor passes control to the RTEMS interrupt handler which
-performs the following actions:
-
-@itemize @bullet
-@item saves the state of the interrupted task on it's stack,
-
-@item insures that a register window is available for
-subsequent traps,
-
-@item if this is the outermost (i.e. non-nested) interrupt,
-then the RTEMS interrupt handler switches from the current stack
-to the interrupt stack,
-
-@item enables traps,
-
-@item invokes the vectors to a user interrupt service routine (ISR).
-@end itemize
-
-Asynchronous interrupts are ignored while traps are
-disabled. Synchronous traps which occur while traps are
-disabled result in the CPU being forced into an error mode.
-
-A nested interrupt is processed similarly with the
-exception that the current stack need not be switched to the
-interrupt stack.
-
-@section Traps and Register Windows
-
-One of the register windows must be reserved at all
-times for trap processing. This is critical to the proper
-operation of the trap mechanism in the SPARC architecture. It
-is the responsibility of the trap handler to insure that there
-is a register window available for a subsequent trap before
-re-enabling traps. It is likely that any high level language
-routines invoked by the trap handler (such as a user-provided
-RTEMS interrupt handler) will allocate a new register window.
-The save operation could result in a window overflow trap. This
-trap cannot be correctly processed unless (1) traps are enabled
-and (2) a register window is reserved for traps. Thus, the
-RTEMS interrupt handler insures that a register window is
-available for subsequent traps before enabling traps and
-invoking the user's interrupt handler.
-
-@section Interrupt Levels
-
-Sixteen levels (0-15) of interrupt priorities are
-supported by the SPARC architecture with level fifteen (15)
-being the highest priority. Level zero (0) indicates that
-interrupts are fully enabled. Interrupt requests for interrupts
-with priorities less than or equal to the current interrupt mask
-level are ignored.
-
-Although RTEMS supports 256 interrupt levels, the
-SPARC only supports sixteen. RTEMS interrupt levels 0 through
-15 directly correspond to SPARC processor interrupt levels. All
-other RTEMS interrupt levels are undefined and their behavior is
-unpredictable.
-
-@section Disabling of Interrupts by RTEMS
-
-During the execution of directive calls, critical
-sections of code may be executed. When these sections are
-encountered, RTEMS disables interrupts to level seven (15)
-before the execution of this section and restores them to the
-previous level upon completion of the section. RTEMS has been
-optimized to insure that interrupts are disabled for less than
-RTEMS_MAXIMUM_DISABLE_PERIOD microseconds on a RTEMS_MAXIMUM_DISABLE_PERIOD_MHZ
-Mhz ERC32 with zero wait states.
-These numbers will vary based the number of wait states and
-processor speed present on the target board.
-[NOTE: The maximum period with interrupts disabled is hand calculated. This
-calculation was last performed for Release
-RTEMS_RELEASE_FOR_MAXIMUM_DISABLE_PERIOD.]
-
-[NOTE: It is thought that the length of time at which
-the processor interrupt level is elevated to fifteen by RTEMS is
-not anywhere near as long as the length of time ALL traps are
-disabled as part of the "flush all register windows" operation.]
-
-Non-maskable interrupts (NMI) cannot be disabled, and
-ISRs which execute at this level MUST NEVER issue RTEMS system
-calls. If a directive is invoked, unpredictable results may
-occur due to the inability of RTEMS to protect its critical
-sections. However, ISRs that make no system calls may safely
-execute as non-maskable interrupts.
-
-@section Interrupt Stack
-
-The SPARC architecture does not provide for a
-dedicated interrupt stack. Thus by default, trap handlers would
-execute on the stack of the RTEMS task which they interrupted.
-This artificially inflates the stack requirements for each task
-since EVERY task stack would have to include enough space to
-account for the worst case interrupt stack requirements in
-addition to it's own worst case usage. RTEMS addresses this
-problem on the SPARC by providing a dedicated interrupt stack
-managed by software.
-
-During system initialization, RTEMS allocates the
-interrupt stack from the Workspace Area. The amount of memory
-allocated for the interrupt stack is determined by the
-interrupt_stack_size field in the CPU Configuration Table. As
-part of processing a non-nested interrupt, RTEMS will switch to
-the interrupt stack before invoking the installed handler.
-
diff --git a/doc/supplements/sparc/memmodel.t b/doc/supplements/sparc/memmodel.t
deleted file mode 100644
index c7a951dd81..0000000000
--- a/doc/supplements/sparc/memmodel.t
+++ /dev/null
@@ -1,104 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Memory Model
-
-@section Introduction
-
-A processor may support any combination of memory
-models ranging from pure physical addressing to complex demand
-paged virtual memory systems. RTEMS supports a flat memory
-model which ranges contiguously over the processor's allowable
-address space. RTEMS does not support segmentation or virtual
-memory of any kind. The appropriate memory model for RTEMS
-provided by the targeted processor and related characteristics
-of that model are described in this chapter.
-
-@section Flat Memory Model
-
-The SPARC architecture supports a flat 32-bit address
-space with addresses ranging from 0x00000000 to 0xFFFFFFFF (4
-gigabytes). Each address is represented by a 32-bit value and
-is byte addressable. The address may be used to reference a
-single byte, half-word (2-bytes), word (4 bytes), or doubleword
-(8 bytes). Memory accesses within this address space are
-performed in big endian fashion by the SPARC. Memory accesses
-which are not properly aligned generate a "memory address not
-aligned" trap (type number 7). The following table lists the
-alignment requirements for a variety of data accesses:
-
-@ifset use-ascii
-@example
-@group
- +--------------+-----------------------+
- | Data Type | Alignment Requirement |
- +--------------+-----------------------+
- | byte | 1 |
- | half-word | 2 |
- | word | 4 |
- | doubleword | 8 |
- +--------------+-----------------------+
-@end group
-@end example
-@end ifset
-
-@ifset use-tex
-@sp 1
-@tex
-\centerline{\vbox{\offinterlineskip\halign{
-\vrule\strut#&
-\hbox to 1.75in{\enskip\hfil#\hfil}&
-\vrule#&
-\hbox to 1.75in{\enskip\hfil#\hfil}&
-\vrule#\cr
-\noalign{\hrule}
-&\bf Data Type &&\bf Alignment Requirement&\cr\noalign{\hrule}
-&byte&&1&\cr\noalign{\hrule}
-&half-word&&2&\cr\noalign{\hrule}
-&word&&4&\cr\noalign{\hrule}
-&doubleword&&8&\cr\noalign{\hrule}
-}}\hfil}
-@end tex
-@end ifset
-
-@ifset use-html
-@html
-<CENTER>
- <TABLE COLS=2 WIDTH="60%" BORDER=2>
-<TR><TD ALIGN=center><STRONG>Data Type</STRONG></TD>
- <TD ALIGN=center><STRONG>Alignment Requirement</STRONG></TD></TR>
-<TR><TD ALIGN=center>byte</TD>
- <TD ALIGN=center>1</TD></TR>
-<TR><TD ALIGN=center>half-word</TD>
- <TD ALIGN=center>2</TD></TR>
-<TR><TD ALIGN=center>word</TD>
- <TD ALIGN=center>4</TD></TR>
-<TR><TD ALIGN=center>doubleword</TD>
- <TD ALIGN=center>8</TD></TR>
- </TABLE>
-</CENTER>
-@end html
-@end ifset
-
-Doubleword load and store operations must use a pair
-of registers as their source or destination. This pair of
-registers must be an adjacent pair of registers with the first
-of the pair being even numbered. For example, a valid
-destination for a doubleword load might be input registers 0 and
-1 (i0 and i1). The pair i1 and i2 would be invalid. [NOTE:
-Some assemblers for the SPARC do not generate an error if an odd
-numbered register is specified as the beginning register of the
-pair. In this case, the assembler assumes that what the
-programmer meant was to use the even-odd pair which ends at the
-specified register. This may or may not have been a correct
-assumption.]
-
-RTEMS does not support any SPARC Memory Management
-Units, therefore, virtual memory or segmentation systems
-involving the SPARC are not supported.
-
diff --git a/doc/supplements/sparc/preface.texi b/doc/supplements/sparc/preface.texi
deleted file mode 100644
index 6b209f0c90..0000000000
--- a/doc/supplements/sparc/preface.texi
+++ /dev/null
@@ -1,91 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@ifinfo
-@node Preface, CPU Model Dependent Features, Top, Top
-@end ifinfo
-@unnumbered Preface
-
-The Real Time Executive for Multiprocessor Systems
-(RTEMS) is designed to be portable across multiple processor
-architectures. However, the nature of real-time systems makes
-it essential that the application designer understand certain
-processor dependent implementation details. These processor
-dependencies include calling convention, board support package
-issues, interrupt processing, exact RTEMS memory requirements,
-performance data, header files, and the assembly language
-interface to the executive.
-
-This document discusses the SPARC architecture
-dependencies in this port of RTEMS. Currently, only
-implementations of SPARC Version 7 are supported by RTEMS.
-
-It is highly recommended that the SPARC RTEMS
-application developer obtain and become familiar with the
-documentation for the processor being used as well as the
-specification for the revision of the SPARC architecture which
-corresponds to that processor.
-
-@subheading SPARC Architecture Documents
-
-For information on the SPARC architecture, refer to
-the following documents available from SPARC International, Inc.
-(http://www.sparc.com):
-
-@itemize @bullet
-@item SPARC Standard Version 7.
-
-@item SPARC Standard Version 8.
-
-@item SPARC Standard Version 9.
-@end itemize
-
-@subheading ERC32 Specific Information
-
-The European Space Agency's ERC32 is a three chip
-computing core implementing a SPARC V7 processor and associated
-support circuitry for embedded space applications. The integer
-and floating-point units (90C601E & 90C602E) are based on the
-Cypress 7C601 and 7C602, with additional error-detection and
-recovery functions. The memory controller (MEC) implements
-system support functions such as address decoding, memory
-interface, DMA interface, UARTs, timers, interrupt control,
-write-protection, memory reconfiguration and error-detection.
-The core is designed to work at 25MHz, but using space qualified
-memories limits the system frequency to around 15 MHz, resulting
-in a performance of 10 MIPS and 2 MFLOPS.
-
-Information on the ERC32 and a number of development
-support tools, such as the SPARC Instruction Simulator (SIS),
-are freely available on the Internet. The following documents
-and SIS are available via anonymous ftp or pointing your web
-browser at ftp://ftp.estec.esa.nl/pub/ws/wsd/erc32.
-
-@itemize @bullet
-@item ERC32 System Design Document
-
-@item MEC Device Specification
-@end itemize
-
-Additionally, the SPARC RISC User's Guide from Matra
-MHS documents the functionality of the integer and floating
-point units including the instruction set information. To
-obtain this document as well as ERC32 components and VHDL models
-contact:
-
-@example
-Matra MHS SA
-3 Avenue du Centre, BP 309,
-78054 St-Quentin-en-Yvelines,
-Cedex, France
-VOICE: +31-1-30607087
-FAX: +31-1-30640693
-@end example
-
-Amar Guennon (amar.guennon@@matramhs.fr) is familiar with the ERC32.
-
diff --git a/doc/supplements/sparc/sparc.texi b/doc/supplements/sparc/sparc.texi
deleted file mode 100644
index 98462acac4..0000000000
--- a/doc/supplements/sparc/sparc.texi
+++ /dev/null
@@ -1,119 +0,0 @@
-\input texinfo @c -*-texinfo-*-
-@c %**start of header
-@setfilename c_sparc
-@syncodeindex vr fn
-@synindex ky cp
-@paragraphindent 0
-@c @smallbook
-@c %**end of header
-
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@c
-@c Master file for the SPARC Applications Supplement
-@c
-
-@include ../../common/setup.texi
-
-@ignore
-@ifinfo
-@format
-START-INFO-DIR-ENTRY
-* RTEMS SPARC Applications Supplement (sparc):
-END-INFO-DIR-ENTRY
-@end format
-@end ifinfo
-@end ignore
-
-@c
-@c Title Page Stuff
-@c
-
-@set edition @value{RTEMS-EDITION}
-@set version @value{RTEMS-VERSION}
-@set update-date @value{RTEMS-UPDATE-DATE}
-@set update-month @value{RTEMS-UPDATE-MONTH}
-
-@c
-@c I don't really like having a short title page. --joel
-@c
-@c @shorttitlepage RTEMS SPARC Applications Supplement
-
-@setchapternewpage odd
-@settitle RTEMS SPARC Applications Supplement
-@titlepage
-@finalout
-
-@title RTEMS SPARC Applications Supplement
-@subtitle Edition @value{edition}, for RTEMS @value{version}
-@sp 1
-@subtitle @value{update-month}
-@author On-Line Applications Research Corporation
-@page
-@include ../../common/cpright.texi
-@end titlepage
-
-@c This prevents a black box from being printed on "overflow" lines.
-@c The alternative is to rework a sentence to avoid this problem.
-
-@include preface.texi
-@include cpumodel.texi
-@include callconv.texi
-@include memmodel.texi
-@include intr.texi
-@include fatalerr.texi
-@include bsp.texi
-@include cputable.texi
-@include wksheets.texi
-@include timing.texi
-@include timeERC32.texi
-@ifinfo
-@node Top, Preface, (dir), (dir)
-@top c_sparc
-
-This is the online version of the RTEMS SPARC Applications Supplement.
-
-@menu
-* Preface::
-* CPU Model Dependent Features::
-* Calling Conventions::
-* Memory Model::
-* Interrupt Processing::
-* Default Fatal Error Processing::
-* Board Support Packages::
-* Processor Dependent Information Table::
-* Memory Requirements::
-* Timing Specification::
-* ERC32 Timing Data::
-* Command and Variable Index::
-* Concept Index::
-@end menu
-
-@end ifinfo
-@c
-@c
-@c Need to copy the emacs stuff and "trailer stuff" (index, toc) into here
-@c
-
-@node Command and Variable Index, Concept Index, ERC32 Timing Data Rate Monotonic Manager, Top
-@unnumbered Command and Variable Index
-
-There are currently no Command and Variable Index entries.
-
-@c @printindex fn
-
-@node Concept Index, , Command and Variable Index, Top
-@unnumbered Concept Index
-
-There are currently no Concept Index entries.
-@c @printindex cp
-
-@contents
-@bye
-
diff --git a/doc/supplements/sparc/timeERC32.t b/doc/supplements/sparc/timeERC32.t
deleted file mode 100644
index 2eb8359ce9..0000000000
--- a/doc/supplements/sparc/timeERC32.t
+++ /dev/null
@@ -1,120 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@include ../../common/timemac.texi
-@tex
-\global\advance \smallskipamount by -4pt
-@end tex
-
-@chapter ERC32 Timing Data
-
-@section Introduction
-
-The timing data for RTEMS on the ERC32 implementation
-of the SPARC architecture is provided along with the target
-dependent aspects concerning the gathering of the timing data.
-The hardware platform used to gather the times is described to
-give the reader a better understanding of each directive time
-provided. Also, provided is a description of the interrupt
-latency and the context switch times as they pertain to the
-SPARC version of RTEMS.
-
-@section Hardware Platform
-
-All times reported in this chapter were measured
-using the SPARC Instruction Simulator (SIS) developed by the
-European Space Agency. SIS simulates the ERC32 -- a custom low
-power implementation combining the Cypress 90C601 integer unit,
-the Cypress 90C602 floating point unit, and a number of
-peripherals such as counter timers, interrupt controller and a
-memory controller.
-
-For the RTEMS tests, SIS is configured with the
-following characteristics:
-
-@itemize @bullet
-@item 15 Mhz clock speed
-
-@item 0 wait states for PROM accesses
-
-@item 0 wait states for RAM accesses
-@end itemize
-
-The ERC32's General Purpose Timer was used to gather
-all timing information. This timer was programmed to operate
-with one microsecond accuracy. All sources of hardware
-interrupts were disabled, although traps were enabled and the
-interrupt level of the SPARC allows all interrupts.
-
-@section Interrupt Latency
-
-The maximum period with traps disabled or the
-processor interrupt level set to it's highest value inside RTEMS
-is less than RTEMS_MAXIMUM_DISABLE_PERIOD
-microseconds including the instructions which
-disable and re-enable interrupts. The time required for the
-ERC32 to vector an interrupt and for the RTEMS entry overhead
-before invoking the user's trap handler are a total of
-RTEMS_INTR_ENTRY_RETURNS_TO_PREEMPTING_TASK
-microseconds. These combine to yield a worst case interrupt
-latency of less than RTEMS_MAXIMUM_DISABLE_PERIOD +
-RTEMS_INTR_ENTRY_RETURNS_TO_PREEMPTING_TASK microseconds at
-RTEMS_MAXIMUM_DISABLE_PERIOD_MHZ Mhz.
-[NOTE: The maximum period with interrupts disabled was last
-determined for Release RTEMS_RELEASE_FOR_MAXIMUM_DISABLE_PERIOD.]
-
-The maximum period with interrupts disabled within
-RTEMS is hand-timed with some assistance from SIS. The maximum
-period with interrupts disabled with RTEMS occurs during a
-context switch when traps are disabled to flush all the register
-windows to memory. The length of time spent flushing the
-register windows varies based on the number of windows which
-must be flushed. Based on the information reported by SIS, it
-takes from 4.0 to 18.0 microseconds (37 to 122 instructions) to
-flush the register windows. It takes approximately 41 CPU
-cycles (2.73 microseconds) to flush each register window set to
-memory. The register window flush operation is heavily memory
-bound.
-
-[NOTE: All traps are disabled during the register
-window flush thus disabling both software generate traps and
-external interrupts. During a normal RTEMS critical section,
-the processor interrupt level (pil) is raised to level 15 and
-traps are left enabled. The longest path for a normal critical
-section within RTEMS is less than 50 instructions.]
-
-The interrupt vector and entry overhead time was
-generated on the SIS benchmark platform using the ERC32's
-ability to forcibly generate an arbitrary interrupt as the
-source of the "benchmark" interrupt.
-
-@section Context Switch
-
-The RTEMS processor context switch time is 10
-microseconds on the SIS benchmark platform when no floating
-point context is saved or restored. Additional execution time
-is required when a TASK_SWITCH user extension is configured.
-The use of the TASK_SWITCH extension is application dependent.
-Thus, its execution time is not considered part of the raw
-context switch time.
-
-Since RTEMS was designed specifically for embedded
-missile applications which are floating point intensive, the
-executive is optimized to avoid unnecessarily saving and
-restoring the state of the numeric coprocessor. The state of
-the numeric coprocessor is only saved when an FLOATING_POINT
-task is dispatched and that task was not the last task to
-utilize the coprocessor. In a system with only one
-FLOATING_POINT task, the state of the numeric coprocessor will
-never be saved or restored. When the first FLOATING_POINT task
-is dispatched, RTEMS does not need to save the current state of
-the numeric coprocessor.
-
-The following table summarizes the context switch
-times for the ERC32 benchmark platform:
-
diff --git a/doc/supplements/template/BSP_TIMES b/doc/supplements/template/BSP_TIMES
deleted file mode 100644
index c80ed37148..0000000000
--- a/doc/supplements/template/BSP_TIMES
+++ /dev/null
@@ -1,247 +0,0 @@
-#
-# CPU MODEL/BSP Timing and Size Information
-#
-# $Id$
-#
-
-#
-# CPU Model Information
-#
-RTEMS_BSP BSP_FOR_TIMES
-RTEMS_CPU_MODEL BSP_CPU_MODEL
-#
-# Interrupt Latency
-#
-# NOTE: In general, the text says it is hand-calculated to be
-# RTEMS_MAXIMUM_DISABLE_PERIOD at RTEMS_MAXIMUM_DISABLE_PERIOD_MHZ
-# Mhz and this was last calculated for Release
-# RTEMS_VERSION_FOR_MAXIMUM_DISABLE_PERIOD.
-#
-RTEMS_MAXIMUM_DISABLE_PERIOD TBD
-RTEMS_MAXIMUM_DISABLE_PERIOD_MHZ 20
-RTEMS_RELEASE_FOR_MAXIMUM_DISABLE_PERIOD 4.0.0
-#
-# Context Switch Times
-#
-RTEMS_NO_FP_CONTEXTS 35
-RTEMS_RESTORE_1ST_FP_TASK 39
-RTEMS_SAVE_INIT_RESTORE_INIT 66
-RTEMS_SAVE_IDLE_RESTORE_INIT 66
-RTEMS_SAVE_IDLE_RESTORE_IDLE 68
-#
-# Task Manager Times
-#
-RTEMS_TASK_CREATE_ONLY 148
-RTEMS_TASK_IDENT_ONLY 350
-RTEMS_TASK_START_ONLY 76
-RTEMS_TASK_RESTART_CALLING_TASK 95
-RTEMS_TASK_RESTART_SUSPENDED_RETURNS_TO_CALLER 89
-RTEMS_TASK_RESTART_BLOCKED_RETURNS_TO_CALLER 124
-RTEMS_TASK_RESTART_READY_RETURNS_TO_CALLER 92
-RTEMS_TASK_RESTART_SUSPENDED_PREEMPTS_CALLER 125
-RTEMS_TASK_RESTART_BLOCKED_PREEMPTS_CALLER 149
-RTEMS_TASK_RESTART_READY_PREEMPTS_CALLER 142
-RTEMS_TASK_DELETE_CALLING_TASK 170
-RTEMS_TASK_DELETE_SUSPENDED_TASK 138
-RTEMS_TASK_DELETE_BLOCKED_TASK 143
-RTEMS_TASK_DELETE_READY_TASK 144
-RTEMS_TASK_SUSPEND_CALLING_TASK 71
-RTEMS_TASK_SUSPEND_RETURNS_TO_CALLER 43
-RTEMS_TASK_RESUME_TASK_READIED_RETURNS_TO_CALLER 45
-RTEMS_TASK_RESUME_TASK_READIED_PREEMPTS_CALLER 67
-RTEMS_TASK_SET_PRIORITY_OBTAIN_CURRENT_PRIORITY 31
-RTEMS_TASK_SET_PRIORITY_RETURNS_TO_CALLER 64
-RTEMS_TASK_SET_PRIORITY_PREEMPTS_CALLER 106
-RTEMS_TASK_MODE_OBTAIN_CURRENT_MODE 14
-RTEMS_TASK_MODE_NO_RESCHEDULE 16
-RTEMS_TASK_MODE_RESCHEDULE_RETURNS_TO_CALLER 23
-RTEMS_TASK_MODE_RESCHEDULE_PREEMPTS_CALLER 60
-RTEMS_TASK_GET_NOTE_ONLY 33
-RTEMS_TASK_SET_NOTE_ONLY 33
-RTEMS_TASK_WAKE_AFTER_YIELD_RETURNS_TO_CALLER 16
-RTEMS_TASK_WAKE_AFTER_YIELD_PREEMPTS_CALLER 56
-RTEMS_TASK_WAKE_WHEN_ONLY 117
-#
-# Interrupt Manager
-#
-RTEMS_INTR_ENTRY_RETURNS_TO_NESTED 12
-RTEMS_INTR_ENTRY_RETURNS_TO_INTERRUPTED_TASK 9
-RTEMS_INTR_ENTRY_RETURNS_TO_PREEMPTING_TASK 9
-RTEMS_INTR_EXIT_RETURNS_TO_NESTED <1
-RTEMS_INTR_EXIT_RETURNS_TO_INTERRUPTED_TASK 8
-RTEMS_INTR_EXIT_RETURNS_TO_PREEMPTING_TASK 54
-#
-# Clock Manager
-#
-RTEMS_CLOCK_SET_ONLY 86
-RTEMS_CLOCK_GET_ONLY 1
-RTEMS_CLOCK_TICK_ONLY 17
-#
-# Timer Manager
-#
-RTEMS_TIMER_CREATE_ONLY 28
-RTEMS_TIMER_IDENT_ONLY 343
-RTEMS_TIMER_DELETE_INACTIVE 43
-RTEMS_TIMER_DELETE_ACTIVE 47
-RTEMS_TIMER_FIRE_AFTER_INACTIVE 58
-RTEMS_TIMER_FIRE_AFTER_ACTIVE 61
-RTEMS_TIMER_FIRE_WHEN_INACTIVE 88
-RTEMS_TIMER_FIRE_WHEN_ACTIVE 88
-RTEMS_TIMER_RESET_INACTIVE 54
-RTEMS_TIMER_RESET_ACTIVE 58
-RTEMS_TIMER_CANCEL_INACTIVE 31
-RTEMS_TIMER_CANCEL_ACTIVE 34
-#
-# Semaphore Manager
-#
-RTEMS_SEMAPHORE_CREATE_ONLY 60
-RTEMS_SEMAPHORE_IDENT_ONLY 367
-RTEMS_SEMAPHORE_DELETE_ONLY 58
-RTEMS_SEMAPHORE_OBTAIN_AVAILABLE 38
-RTEMS_SEMAPHORE_OBTAIN_NOT_AVAILABLE_NO_WAIT 38
-RTEMS_SEMAPHORE_OBTAIN_NOT_AVAILABLE_CALLER_BLOCKS 109
-RTEMS_SEMAPHORE_RELEASE_NO_WAITING_TASKS 44
-RTEMS_SEMAPHORE_RELEASE_TASK_READIED_RETURNS_TO_CALLER 66
-RTEMS_SEMAPHORE_RELEASE_TASK_READIED_PREEMPTS_CALLER 87
-#
-# Message Manager
-#
-RTEMS_MESSAGE_QUEUE_CREATE_ONLY 200
-RTEMS_MESSAGE_QUEUE_IDENT_ONLY 341
-RTEMS_MESSAGE_QUEUE_DELETE_ONLY 80
-RTEMS_MESSAGE_QUEUE_SEND_NO_WAITING_TASKS 97
-RTEMS_MESSAGE_QUEUE_SEND_TASK_READIED_RETURNS_TO_CALLER 101
-RTEMS_MESSAGE_QUEUE_SEND_TASK_READIED_PREEMPTS_CALLER 123
-RTEMS_MESSAGE_QUEUE_URGENT_NO_WAITING_TASKS 96
-RTEMS_MESSAGE_QUEUE_URGENT_TASK_READIED_RETURNS_TO_CALLER 101
-RTEMS_MESSAGE_QUEUE_URGENT_TASK_READIED_PREEMPTS_CALLER 123
-RTEMS_MESSAGE_QUEUE_BROADCAST_NO_WAITING_TASKS 53
-RTEMS_MESSAGE_QUEUE_BROADCAST_TASK_READIED_RETURNS_TO_CALLER 111
-RTEMS_MESSAGE_QUEUE_BROADCAST_TASK_READIED_PREEMPTS_CALLER 133
-RTEMS_MESSAGE_QUEUE_RECEIVE_AVAILABLE 79
-RTEMS_MESSAGE_QUEUE_RECEIVE_NOT_AVAILABLE_NO_WAIT 43
-RTEMS_MESSAGE_QUEUE_RECEIVE_NOT_AVAILABLE_CALLER_BLOCKS 114
-RTEMS_MESSAGE_QUEUE_FLUSH_NO_MESSAGES_FLUSHED 29
-RTEMS_MESSAGE_QUEUE_FLUSH_MESSAGES_FLUSHED 39
-#
-# Event Manager
-#
-RTEMS_EVENT_SEND_NO_TASK_READIED 24
-RTEMS_EVENT_SEND_TASK_READIED_RETURNS_TO_CALLER 60
-RTEMS_EVENT_SEND_TASK_READIED_PREEMPTS_CALLER 84
-RTEMS_EVENT_RECEIVE_OBTAIN_CURRENT_EVENTS 1
-RTEMS_EVENT_RECEIVE_AVAILABLE 28
-RTEMS_EVENT_RECEIVE_NOT_AVAILABLE_NO_WAIT 23
-RTEMS_EVENT_RECEIVE_NOT_AVAILABLE_CALLER_BLOCKS 84
-#
-# Signal Manager
-#
-RTEMS_SIGNAL_CATCH_ONLY 15
-RTEMS_SIGNAL_SEND_RETURNS_TO_CALLER 37
-RTEMS_SIGNAL_SEND_SIGNAL_TO_SELF 55
-RTEMS_SIGNAL_EXIT_ASR_OVERHEAD_RETURNS_TO_CALLING_TASK 37
-RTEMS_SIGNAL_EXIT_ASR_OVERHEAD_RETURNS_TO_PREEMPTING_TASK 54
-#
-# Partition Manager
-#
-RTEMS_PARTITION_CREATE_ONLY 70
-RTEMS_PARTITION_IDENT_ONLY 341
-RTEMS_PARTITION_DELETE_ONLY 42
-RTEMS_PARTITION_GET_BUFFER_AVAILABLE 35
-RTEMS_PARTITION_GET_BUFFER_NOT_AVAILABLE 33
-RTEMS_PARTITION_RETURN_BUFFER_ONLY 43
-#
-# Region Manager
-#
-RTEMS_REGION_CREATE_ONLY 63
-RTEMS_REGION_IDENT_ONLY 348
-RTEMS_REGION_DELETE_ONLY 39
-RTEMS_REGION_GET_SEGMENT_AVAILABLE 52
-RTEMS_REGION_GET_SEGMENT_NOT_AVAILABLE_NO_WAIT 49
-RTEMS_REGION_GET_SEGMENT_NOT_AVAILABLE_CALLER_BLOCKS 123
-RTEMS_REGION_RETURN_SEGMENT_NO_WAITING_TASKS 54
-RTEMS_REGION_RETURN_SEGMENT_TASK_READIED_RETURNS_TO_CALLER 114
-RTEMS_REGION_RETURN_SEGMENT_TASK_READIED_PREEMPTS_CALLER 136
-#
-# Dual-Ported Memory Manager
-#
-RTEMS_PORT_CREATE_ONLY 35
-RTEMS_PORT_IDENT_ONLY 340
-RTEMS_PORT_DELETE_ONLY 39
-RTEMS_PORT_INTERNAL_TO_EXTERNAL_ONLY 26
-RTEMS_PORT_EXTERNAL_TO_INTERNAL_ONLY 27
-#
-# IO Manager
-#
-RTEMS_IO_INITIALIZE_ONLY 4
-RTEMS_IO_OPEN_ONLY 2
-RTEMS_IO_CLOSE_ONLY 1
-RTEMS_IO_READ_ONLY 2
-RTEMS_IO_WRITE_ONLY 3
-RTEMS_IO_CONTROL_ONLY 2
-#
-# Rate Monotonic Manager
-#
-RTEMS_RATE_MONOTONIC_CREATE_ONLY 32
-RTEMS_RATE_MONOTONIC_IDENT_ONLY 341
-RTEMS_RATE_MONOTONIC_CANCEL_ONLY 39
-RTEMS_RATE_MONOTONIC_DELETE_ACTIVE 51
-RTEMS_RATE_MONOTONIC_DELETE_INACTIVE 48
-RTEMS_RATE_MONOTONIC_PERIOD_INITIATE_PERIOD_RETURNS_TO_CALLER 54
-RTEMS_RATE_MONOTONIC_PERIOD_CONCLUDE_PERIOD_CALLER_BLOCKS 74
-RTEMS_RATE_MONOTONIC_PERIOD_OBTAIN_STATUS 31
-#
-# Size Information
-#
-#
-# xxx alloted for numbers
-#
-RTEMS_DATA_SPACE 723
-RTEMS_MINIMUM_CONFIGURATION 18,980
-RTEMS_MAXIMUM_CONFIGURATION 36,438
-# x,xxx alloted for numbers
-RTEMS_CORE_CODE_SIZE 12,674
-RTEMS_INITIALIZATION_CODE_SIZE 970
-RTEMS_TASK_CODE_SIZE 3,562
-RTEMS_INTERRUPT_CODE_SIZE 54
-RTEMS_CLOCK_CODE_SIZE 334
-RTEMS_TIMER_CODE_SIZE 1,110
-RTEMS_SEMAPHORE_CODE_SIZE 1,632
-RTEMS_MESSAGE_CODE_SIZE 1,754
-RTEMS_EVENT_CODE_SIZE 1,000
-RTEMS_SIGNAL_CODE_SIZE 418
-RTEMS_PARTITION_CODE_SIZE 1,164
-RTEMS_REGION_CODE_SIZE 1,494
-RTEMS_DPMEM_CODE_SIZE 724
-RTEMS_IO_CODE_SIZE 686
-RTEMS_FATAL_ERROR_CODE_SIZE 24
-RTEMS_RATE_MONOTONIC_CODE_SIZE 1,212
-RTEMS_MULTIPROCESSING_CODE_SIZE 6.952
-# xxx alloted for numbers
-RTEMS_TIMER_CODE_OPTSIZE 184
-RTEMS_SEMAPHORE_CODE_OPTSIZE 172
-RTEMS_MESSAGE_CODE_OPTSIZE 288
-RTEMS_EVENT_CODE_OPTSIZE 56
-RTEMS_SIGNAL_CODE_OPTSIZE 56
-RTEMS_PARTITION_CODE_OPTSIZE 132
-RTEMS_REGION_CODE_OPTSIZE 160
-RTEMS_DPMEM_CODE_OPTSIZE 132
-RTEMS_IO_CODE_OPTSIZE 00
-RTEMS_RATE_MONOTONIC_CODE_OPTSIZE 184
-RTEMS_MULTIPROCESSING_CODE_OPTSIZE 332
-# xxx alloted for numbers
-RTEMS_BYTES_PER_TASK 400
-RTEMS_BYTES_PER_TIMER 68
-RTEMS_BYTES_PER_SEMAPHORE 124
-RTEMS_BYTES_PER_MESSAGE_QUEUE 148
-RTEMS_BYTES_PER_REGION 144
-RTEMS_BYTES_PER_PARTITION 56
-RTEMS_BYTES_PER_PORT 36
-RTEMS_BYTES_PER_PERIOD 36
-RTEMS_BYTES_PER_EXTENSION 64
-RTEMS_BYTES_PER_FP_TASK 332
-RTEMS_BYTES_PER_NODE 48
-RTEMS_BYTES_PER_GLOBAL_OBJECT 20
-RTEMS_BYTES_PER_PROXY 124
-# x,xxx alloted for numbers
-RTEMS_BYTES_OF_FIXED_SYSTEM_REQUIREMENTS 8,872
diff --git a/doc/supplements/template/Makefile b/doc/supplements/template/Makefile
deleted file mode 100644
index e5187e1038..0000000000
--- a/doc/supplements/template/Makefile
+++ /dev/null
@@ -1,159 +0,0 @@
-#
-# COPYRIGHT (c) 1988-1999.
-# On-Line Applications Research Corporation (OAR).
-# All rights reserved.
-#
-# $Id$
-#
-
-PROJECT=template
-
-include ../../Make.config
-
-REPLACE=../../tools/word-replace
-
-all: html info ps pdf
-
-dirs:
- $(make-dirs)
-
-COMMON_FILES=../../common/cpright.texi ../../common/setup.texi
-
-GENERATED_FILES=\
- cpumodel.texi callconv.texi memmodel.texi intr.texi fatalerr.texi \
- bsp.texi cputable.texi wksheets.texi timing.texi timeBSP.texi
-
-FILES= $(PROJECT).texi preface.texi \
- $(COMMON_FILES) $(GENERATED_FILES)
-
-info: dirs c_$(PROJECT)
- @echo NEED TO INSTALL THE INFO FILES
- #cp c_$(PROJECT) c_$(PROJECT)-* $(INFO_INSTALL)
- #cp c_$(PROJECT) c_$(PROJECT)-* $(INFO_INSTALL)
-
-c_$(PROJECT): $(FILES)
- $(MAKEINFO) $(PROJECT).texi
-
-dvi: dirs $(PROJECT).dvi
-ps: dirs $(PROJECT).ps
-pdf: dirs $(PROJECT).pdf
-
-$(PROJECT).pdf: $(FILES)
- $(TEXI2PDF) $(PROJECT).texi
- cp $(PROJECT).pdf $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).ps: $(PROJECT).dvi
- dvips -o $(PROJECT).ps $(PROJECT).dvi
- cp $(PROJECT).ps $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).dvi: $(FILES)
- $(TEXI2DVI) $(PROJECT).texi
- cp $(PROJECT).dvi $(WWW_INSTALL)/$(PROJECT)
-
-html: dirs $(FILES)
- -mkdir -p $(WWW_INSTALL)/$(PROJECT)
- $(TEXI2WWW) $(TEXI2WWW_ARGS) -dir $(WWW_INSTALL)/$(PROJECT) \
- $(PROJECT).texi
-
-clean:
- rm -f *.o $(PROG) *.txt core $(PROJECT).pdf
- rm -f *.dvi *.ps *.log *.aux *.cp *.fn *.ky *.pg *.toc *.tp *.vr $(BASE)
- rm -f $(PROJECT) $(PROJECT)-*
- rm -f c_$(PROJECT) c_$(PROJECT)-*
- rm -f wksheets.t wksheets_NOTIMES.t
- rm -f intr.t
- rm -f timeBSP_.t timing.t
- rm -f *.fixed _* $(GENERATED_FILES)
- rm -f timeBSP_.t
-
-#
-# Chapters which get automatic processing
-#
-cpumodel.texi: cpumodel.t Makefile
- $(BMENU) -p "Preface" \
- -u "Top" \
- -n "Calling Conventions" ${*}.t
-
-callconv.texi: callconv.t Makefile
- $(BMENU) -p "CPU Model Dependent Features Another Optional Feature" \
- -u "Top" \
- -n "Memory Model" ${*}.t
-
-memmodel.texi: memmodel.t Makefile
- $(BMENU) -p "Calling Conventions User-Provided Routines" \
- -u "Top" \
- -n "Interrupt Processing" ${*}.t
-
-# Interrupt Chapter:
-# 1. Replace Times and Sizes
-# 2. Build Node Structure
-intr.t: intr_NOTIMES.t BSP_TIMES
- ${REPLACE} -p BSP_TIMES intr_NOTIMES.t
- mv intr_NOTIMES.t.fixed intr.t
-
-intr.texi: intr.t Makefile
- $(BMENU) -p "Memory Model Flat Memory Model" \
- -u "Top" \
- -n "Default Fatal Error Processing" ${*}.t
-
-fatalerr.texi: fatalerr.t Makefile
- $(BMENU) -p "Interrupt Processing Interrupt Stack" \
- -u "Top" \
- -n "Board Support Packages" ${*}.t
-
-bsp.texi: bsp.t Makefile
- $(BMENU) -p "Default Fatal Error Processing Default Fatal Error Handler Operations" \
- -u "Top" \
- -n "Processor Dependent Information Table" ${*}.t
-
-cputable.texi: cputable.t Makefile
- $(BMENU) -p "Board Support Packages Processor Initialization" \
- -u "Top" \
- -n "Memory Requirements" ${*}.t
-
-# Worksheets Chapter:
-# 1. Copy the Shared File
-# 2. Replace Times and Sizes
-# 3. Build Node Structure
-
-wksheets_NOTIMES.t: ../../common/wksheets.t
- cp ../../common/wksheets.t wksheets_NOTIMES.t
-
-wksheets.t: wksheets_NOTIMES.t BSP_TIMES
- ${REPLACE} -p BSP_TIMES wksheets_NOTIMES.t
- mv wksheets_NOTIMES.t.fixed wksheets.t
-
-wksheets.texi: wksheets.t Makefile
- $(BMENU) -p "Processor Dependent Information Table CPU Dependent Information Table" \
- -u "Top" \
- -n "Timing Specification" ${*}.t
-
-# Timing Specification Chapter:
-# 1. Copy the Shared File
-# 3. Build Node Structure
-
-timing.t: ../../common/timing.t
- cp ../../common/timing.t timing.t
-
-timing.texi: timing.t Makefile
- $(BMENU) -p "Memory Requirements RTEMS RAM Workspace Worksheet" \
- -u "Top" \
- -n "BSP_FOR_TIMES Timing Data" ${*}.t
-
-# Timing Data for BSP Chapter:
-# 1. Copy the Shared File
-# 2. Replace Times and Sizes
-# 3. Build Node Structure
-
-timeBSP_.t: ../../common/timetbl.t timeBSP.t
- cat timeBSP.t ../../common/timetbl.t >timeBSP_.t
- @echo >>timeBSP_.t
- @echo "@tex" >>timeBSP_.t
- @echo "\\global\\advance \\smallskipamount by 4pt" >>timeBSP_.t
- @echo "@end tex" >>timeBSP_.t
-
-timeBSP.texi: timeBSP_.t Makefile
- $(BMENU) -p "Timing Specification Terminology" \
- -u "Top" \
- -n "Command and Variable Index" timeBSP_.t
- mv timeBSP_.t timeBSP.texi
diff --git a/doc/supplements/template/bsp.t b/doc/supplements/template/bsp.t
deleted file mode 100644
index a19aa06129..0000000000
--- a/doc/supplements/template/bsp.t
+++ /dev/null
@@ -1,93 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Board Support Packages
-
-@section Introduction
-
-An RTEMS Board Support Package (BSP) must be designed
-to support a particular processor and target board combination.
-This chapter presents a discussion of XXX specific BSP
-issues. For more information on developing a BSP, refer to the
-chapter titled Board Support Packages in the RTEMS
-Applications User's Guide.
-
-@section System Reset
-
-An RTEMS based application is initiated or
-re-initiated when the XXX processor is reset. When the
-XXX is reset, the processor performs the following actions:
-
-@itemize @bullet
-@item The tracing bits of the status register are cleared to
-disable tracing.
-
-@item The supervisor interrupt state is entered by setting the
-supervisor (S) bit and clearing the master/interrupt (M) bit of
-the status register.
-
-@item The interrupt mask of the status register is set to
-level 7 to effectively disable all maskable interrupts.
-
-@item The vector base register (VBR) is set to zero.
-
-@item The cache control register (CACR) is set to zero to
-disable and freeze the processor cache.
-
-@item The interrupt stack pointer (ISP) is set to the value
-stored at vector 0 (bytes 0-3) of the exception vector table
-(EVT).
-
-@item The program counter (PC) is set to the value stored at
-vector 1 (bytes 4-7) of the EVT.
-
-@item The processor begins execution at the address stored in
-the PC.
-@end itemize
-
-@section Processor Initialization
-
-The address of the application's initialization code
-should be stored in the first vector of the EVT which will allow
-the immediate vectoring to the application code. If the
-application requires that the VBR be some value besides zero,
-then it should be set to the required value at this point. All
-tasks share the same XXX's VBR value. Because interrupts
-are enabled automatically by RTEMS as part of the initialize
-executive directive, the VBR MUST be set before this directive
-is invoked to insure correct interrupt vectoring. If processor
-caching is to be utilized, then it should be enabled during the
-reset application initialization code.
-
-In addition to the requirements described in the
-Board Support Packages chapter of the Applications User's
-Manual for the reset code which is executed before the call to
-initialize executive, the XXX version has the following
-specific requirements:
-
-@itemize @bullet
-@item Must leave the S bit of the status register set so that
-the XXX remains in the supervisor state.
-
-@item Must set the M bit of the status register to remove the
-XXX from the interrupt state.
-
-@item Must set the master stack pointer (MSP) such that a
-minimum stack size of MINIMUM_STACK_SIZE bytes is provided for
-the initialize executive directive.
-
-@item Must initialize the XXX's vector table.
-@end itemize
-
-Note that the BSP is not responsible for allocating
-or installing the interrupt stack. RTEMS does this
-automatically as part of initialization. If the BSP does not
-install an interrupt stack and -- for whatever reason -- an
-interrupt occurs before initialize_executive is invoked, then
-the results are unpredictable.
-
diff --git a/doc/supplements/template/callconv.t b/doc/supplements/template/callconv.t
deleted file mode 100644
index 70d74e3808..0000000000
--- a/doc/supplements/template/callconv.t
+++ /dev/null
@@ -1,92 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Calling Conventions
-
-@section Introduction
-
-Each high-level language compiler generates
-subroutine entry and exit code based upon a set of rules known
-as the compiler's calling convention. These rules address the
-following issues:
-
-@itemize @bullet
-@item register preservation and usage
-@item parameter passing
-@item call and return mechanism
-@end itemize
-
-A compiler's calling convention is of importance when
-interfacing to subroutines written in another language either
-assembly or high-level. Even when the high-level language and
-target processor are the same, different compilers may use
-different calling conventions. As a result, calling conventions
-are both processor and compiler dependent.
-
-@section Processor Background
-
-The MC68xxx architecture supports a simple yet
-effective call and return mechanism. A subroutine is invoked
-via the branch to subroutine (@code{XXX}) or the jump to subroutine
-(@code{XXX}) instructions. These instructions push the return address
-on the current stack. The return from subroutine (@code{XXX})
-instruction pops the return address off the current stack and
-transfers control to that instruction. It is is important to
-note that the XXX call and return mechanism does not
-automatically save or restore any registers. It is the
-responsibility of the high-level language compiler to define the
-register preservation and usage convention.
-
-@section Calling Mechanism
-
-All RTEMS directives are invoked using either a @code{XXX}
-or @code{XXX} instruction and return to the user application via the
-@code{XXX} instruction.
-
-@section Register Usage
-
-As discussed above, the @code{XXX} and @code{XXX} instructions do
-not automatically save any registers. RTEMS uses the registers
-@b{D0}, @b{D1}, @b{A0}, and @b{A1} as scratch registers. These registers are
-not preserved by RTEMS directives therefore, the contents of
-these registers should not be assumed upon return from any RTEMS
-directive.
-
-@section Parameter Passing
-
-RTEMS assumes that arguments are placed on the
-current stack before the directive is invoked via the @code{XXX} or @code{XXX}
-instruction. The first argument is assumed to be closest to the
-return address on the stack. This means that the first argument
-of the C calling sequence is pushed last. The following
-pseudo-code illustrates the typical sequence used to call a
-RTEMS directive with three (3) arguments:
-
-@example
-@group
-push third argument
-push second argument
-push first argument
-invoke directive
-remove arguments from the stack
-@end group
-@end example
-
-The arguments to RTEMS are typically pushed onto the
-stack using a move instruction with a pre-decremented stack
-pointer as the destination. These arguments must be removed
-from the stack after control is returned to the caller. This
-removal is typically accomplished by adding the size of the
-argument list in bytes to the current stack pointer.
-
-@section User-Provided Routines
-
-All user-provided routines invoked by RTEMS, such as
-user extensions, device drivers, and MPCI routines, must also
-adhere to these calling conventions.
-
diff --git a/doc/supplements/template/cpumodel.t b/doc/supplements/template/cpumodel.t
deleted file mode 100644
index f709168913..0000000000
--- a/doc/supplements/template/cpumodel.t
+++ /dev/null
@@ -1,68 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter CPU Model Dependent Features
-
-@section Introduction
-
-Microprocessors are generally classified into
-families with a variety of CPU models or implementations within
-that family. Within a processor family, there is a high level
-of binary compatibility. This family may be based on either an
-architectural specification or on maintaining compatibility with
-a popular processor. Recent microprocessor families such as the
-SPARC or PA-RISC are based on an architectural specification
-which is independent or any particular CPU model or
-implementation. Older families such as the M68xxx and the iX86
-evolved as the manufacturer strived to produce higher
-performance processor models which maintained binary
-compatibility with older models.
-
-RTEMS takes advantage of the similarity of the
-various models within a CPU family. Although the models do vary
-in significant ways, the high level of compatibility makes it
-possible to share the bulk of the CPU dependent executive code
-across the entire family. Each processor family supported by
-RTEMS has a list of features which vary between CPU models
-within a family. For example, the most common model dependent
-feature regardless of CPU family is the presence or absence of a
-floating point unit or coprocessor. When defining the list of
-features present on a particular CPU model, one simply notes
-that floating point hardware is or is not present and defines a
-single constant appropriately. Conditional compilation is
-utilized to include the appropriate source code for this CPU
-model's feature set. It is important to note that this means
-that RTEMS is thus compiled using the appropriate feature set
-and compilation flags optimal for this CPU model used. The
-alternative would be to generate a binary which would execute on
-all family members using only the features which were always
-present.
-
-This chapter presents the set of features which vary
-across SPARC implementations and are of importance to RTEMS.
-The set of CPU model feature macros are defined in the file
-c/src/exec/score/cpu/XXX/XXX.h based upon the particular CPU
-model defined on the compilation command line.
-
-@section CPU Model Name
-
-The macro CPU_MODEL_NAME is a string which designates
-the name of this CPU model. For example, for the MODEL
-processor, this macro is set to the string "XXX".
-
-@section Floating Point Unit
-
-The macro XXX_HAS_FPU is set to 1 to indicate that
-this CPU model has a hardware floating point unit and 0
-otherwise. It does not matter whether the hardware floating
-point support is incorporated on-chip or is an external
-coprocessor.
-
-@section Another Optional Feature
-
-The macro XXX
diff --git a/doc/supplements/template/cputable.t b/doc/supplements/template/cputable.t
deleted file mode 100644
index 1a9f1e50d9..0000000000
--- a/doc/supplements/template/cputable.t
+++ /dev/null
@@ -1,109 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Processor Dependent Information Table
-
-@section Introduction
-
-Any highly processor dependent information required
-to describe a processor to RTEMS is provided in the CPU
-Dependent Information Table. This table is not required for all
-processors supported by RTEMS. This chapter describes the
-contents, if any, for a particular processor type.
-
-@section CPU Dependent Information Table
-
-The XXX version of the RTEMS CPU Dependent
-Information Table contains the information required to interface
-a Board Support Package and RTEMS on the XXX. This
-information is provided to allow RTEMS to interoperate
-effectively with the BSP. The C structure definition is given
-here:
-
-@example
-@group
-typedef struct @{
- void (*pretasking_hook)( void );
- void (*predriver_hook)( void );
- void (*postdriver_hook)( void );
- void (*idle_task)( void );
- boolean do_zero_of_workspace;
- unsigned32 idle_task_stack_size;
- unsigned32 interrupt_stack_size;
- unsigned32 extra_mpci_receive_server_stack;
- void * (*stack_allocate_hook)( unsigned32 );
- void (*stack_free_hook)( void* );
- /* end of fields required on all CPUs */
-
- /* XXX CPU family dependent stuff */
-@} rtems_cpu_table;
-@end group
-@end example
-
-@table @code
-@item pretasking_hook
-is the address of the user provided routine which is invoked
-once RTEMS APIs are initialized. This routine will be invoked
-before any system tasks are created. Interrupts are disabled.
-This field may be NULL to indicate that the hook is not utilized.
-
-@item predriver_hook
-is the address of the user provided
-routine that is invoked immediately before the
-the device drivers and MPCI are initialized. RTEMS
-initialization is complete but interrupts and tasking are disabled.
-This field may be NULL to indicate that the hook is not utilized.
-
-@item postdriver_hook
-is the address of the user provided
-routine that is invoked immediately after the
-the device drivers and MPCI are initialized. RTEMS
-initialization is complete but interrupts and tasking are disabled.
-This field may be NULL to indicate that the hook is not utilized.
-
-@item idle_task
-is the address of the optional user
-provided routine which is used as the system's IDLE task. If
-this field is not NULL, then the RTEMS default IDLE task is not
-used. This field may be NULL to indicate that the default IDLE
-is to be used.
-
-@item do_zero_of_workspace
-indicates whether RTEMS should
-zero the Workspace as part of its initialization. If set to
-TRUE, the Workspace is zeroed. Otherwise, it is not.
-
-@item idle_task_stack_size
-is the size of the RTEMS idle task stack in bytes.
-If this number is less than MINIMUM_STACK_SIZE, then the
-idle task's stack will be MINIMUM_STACK_SIZE in byte.
-
-@item interrupt_stack_size
-is the size of the RTEMS
-allocated interrupt stack in bytes. This value must be at least
-as large as MINIMUM_STACK_SIZE.
-
-@item extra_mpci_receive_server_stack
-is the extra stack space allocated for the RTEMS MPCI receive server task
-in bytes. The MPCI receive server may invoke nearly all directives and
-may require extra stack space on some targets.
-
-@item stack_allocate_hook
-is the address of the optional user provided routine which allocates
-memory for task stacks. If this hook is not NULL, then a stack_free_hook
-must be provided as well.
-
-@item stack_free_hook
-is the address of the optional user provided routine which frees
-memory for task stacks. If this hook is not NULL, then a stack_allocate_hook
-must be provided as well.
-
-@item XXX
-is where the CPU family dependent stuff goes.
-
-@end table
diff --git a/doc/supplements/template/fatalerr.t b/doc/supplements/template/fatalerr.t
deleted file mode 100644
index 0871fa3cb9..0000000000
--- a/doc/supplements/template/fatalerr.t
+++ /dev/null
@@ -1,31 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Default Fatal Error Processing
-
-@section Introduction
-
-Upon detection of a fatal error by either the
-application or RTEMS the fatal error manager is invoked. The
-fatal error manager will invoke the user-supplied fatal error
-handlers. If no user-supplied handlers are configured, the
-RTEMS provided default fatal error handler is invoked. If the
-user-supplied fatal error handlers return to the executive the
-default fatal error handler is then invoked. This chapter
-describes the precise operations of the default fatal error
-handler.
-
-@section Default Fatal Error Handler Operations
-
-The default fatal error handler which is invoked by
-the @code{rtems_fatal_error_occurred} directive when there is
-no user handler configured or the user handler returns control to
-RTEMS. The default fatal error handler disables processor interrupts,
-places the error code in @b{XXX}, and executes a @code{XXX}
-instruction to simulate a halt processor instruction.
-
diff --git a/doc/supplements/template/intr_NOTIMES.t b/doc/supplements/template/intr_NOTIMES.t
deleted file mode 100644
index 074420f2c9..0000000000
--- a/doc/supplements/template/intr_NOTIMES.t
+++ /dev/null
@@ -1,196 +0,0 @@
-@c
-@c Interrupt Stack Frame Picture
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Interrupt Processing
-
-@section Introduction
-
-Different types of processors respond to the
-occurrence of an interrupt in its own unique fashion. In
-addition, each processor type provides a control mechanism to
-allow for the proper handling of an interrupt. The processor
-dependent response to the interrupt modifies the current
-execution state and results in a change in the execution stream.
-Most processors require that an interrupt handler utilize some
-special control mechanisms to return to the normal processing
-stream. Although RTEMS hides many of the processor dependent
-details of interrupt processing, it is important to understand
-how the RTEMS interrupt manager is mapped onto the processor's
-unique architecture. Discussed in this chapter are the XXX's
-interrupt response and control mechanisms as they pertain to
-RTEMS.
-
-@section Vectoring of an Interrupt Handler
-
-Depending on whether or not the particular CPU
-supports a separate interrupt stack, the XXX family has two
-different interrupt handling models.
-
-@subsection Models Without Separate Interrupt Stacks
-
-Upon receipt of an interrupt the XXX family
-members without separate interrupt stacks automatically perform
-the following actions:
-
-@itemize @bullet
-@item To Be Written
-@end itemize
-
-@subsection Models With Separate Interrupt Stacks
-
-Upon receipt of an interrupt the XXX family
-members with separate interrupt stacks automatically perform the
-following actions:
-
-@itemize @bullet
-@item saves the current status register (SR),
-
-@item clears the master/interrupt (M) bit of the SR to
-indicate the switch from master state to interrupt state,
-
-@item sets the privilege mode to supervisor,
-
-@item suppresses tracing,
-
-@item sets the interrupt mask level equal to the level of the
-interrupt being serviced,
-
-@item pushes an interrupt stack frame (ISF), which includes
-the program counter (PC), the status register (SR), and the
-format/exception vector offset (FVO) word, onto the supervisor
-and interrupt stacks,
-
-@item switches the current stack to the interrupt stack and
-vectors to an interrupt service routine (ISR). If the ISR was
-installed with the interrupt_catch directive, then the RTEMS
-interrupt handler will begin execution. The RTEMS interrupt
-handler saves all registers which are not preserved according to
-the calling conventions and invokes the application's ISR.
-@end itemize
-
-A nested interrupt is processed similarly by these
-CPU models with the exception that only a single ISF is placed
-on the interrupt stack and the current stack need not be
-switched.
-
-The FVO word in the Interrupt Stack Frame is examined
-by RTEMS to determine when an outer most interrupt is being
-exited. Since the FVO is used by RTEMS for this purpose, the
-user application code MUST NOT modify this field.
-
-The following shows the Interrupt Stack Frame for
-XXX CPU models with separate interrupt stacks:
-
-@ifset use-ascii
-@example
-@group
- +----------------------+
- | Status Register | 0x0
- +----------------------+
- | Program Counter High | 0x2
- +----------------------+
- | Program Counter Low | 0x4
- +----------------------+
- | Format/Vector Offset | 0x6
- +----------------------+
-@end group
-@end example
-@end ifset
-
-@ifset use-tex
-@sp 1
-@tex
-\centerline{\vbox{\offinterlineskip\halign{
-\strut\vrule#&
-\hbox to 2.00in{\enskip\hfil#\hfil}&
-\vrule#&
-\hbox to 0.50in{\enskip\hfil#\hfil}
-\cr
-\multispan{3}\hrulefill\cr
-& Status Register && 0x0\cr
-\multispan{3}\hrulefill\cr
-& Program Counter High && 0x2\cr
-\multispan{3}\hrulefill\cr
-& Program Counter Low && 0x4\cr
-\multispan{3}\hrulefill\cr
-& Format/Vector Offset && 0x6\cr
-\multispan{3}\hrulefill\cr
-}}\hfil}
-@end tex
-@end ifset
-
-@ifset use-html
-@html
-<CENTER>
- <TABLE COLS=2 WIDTH="40%" BORDER=2>
-<TR><TD ALIGN=center><STRONG>Status Register</STRONG></TD>
- <TD ALIGN=center>0x0</TD></TR>
-<TR><TD ALIGN=center><STRONG>Program Counter High</STRONG></TD>
- <TD ALIGN=center>0x2</TD></TR>
-<TR><TD ALIGN=center><STRONG>Program Counter Low</STRONG></TD>
- <TD ALIGN=center>0x4</TD></TR>
-<TR><TD ALIGN=center><STRONG>Format/Vector Offset</STRONG></TD>
- <TD ALIGN=center>0x6</TD></TR>
- </TABLE>
-</CENTER>
-@end html
-@end ifset
-
-@section Interrupt Levels
-
-Eight levels (0-7) of interrupt priorities are
-supported by XXX family members with level seven (7) being
-the highest priority. Level zero (0) indicates that interrupts
-are fully enabled. Interrupt requests for interrupts with
-priorities less than or equal to the current interrupt mask
-level are ignored.
-
-Although RTEMS supports 256 interrupt levels, the
-XXX family only supports eight. RTEMS interrupt levels 0
-through 7 directly correspond to XXX interrupt levels. All
-other RTEMS interrupt levels are undefined and their behavior is
-unpredictable.
-
-@section Disabling of Interrupts by RTEMS
-
-During the execution of directive calls, critical
-sections of code may be executed. When these sections are
-encountered, RTEMS disables interrupts to level seven (7) before
-the execution of this section and restores them to the previous
-level upon completion of the section. RTEMS has been optimized
-to insure that interrupts are disabled for less than
-RTEMS_MAXIMUM_DISABLE_PERIOD microseconds on a
-RTEMS_MAXIMUM_DISABLE_PERIOD_MHZ Mhz XXX with
-zero wait states. These numbers will vary based the
-number of wait states and processor speed present on the target board.
-[NOTE: The maximum period with interrupts disabled is hand calculated. This
-calculation was last performed for Release
-RTEMS_RELEASE_FOR_MAXIMUM_DISABLE_PERIOD.]
-
-Non-maskable interrupts (NMI) cannot be disabled, and
-ISRs which execute at this level MUST NEVER issue RTEMS system
-calls. If a directive is invoked, unpredictable results may
-occur due to the inability of RTEMS to protect its critical
-sections. However, ISRs that make no system calls may safely
-execute as non-maskable interrupts.
-
-@section Interrupt Stack
-
-RTEMS allocates the interrupt stack from the
-Workspace Area. The amount of memory allocated for the
-interrupt stack is determined by the interrupt_stack_size field
-in the CPU Configuration Table. During the initialization
-process, RTEMS will install its interrupt stack.
-
-The XXX port of RTEMS supports a software managed
-dedicated interrupt stack on those CPU models which do not
-support a separate interrupt stack in hardware.
-
-
diff --git a/doc/supplements/template/memmodel.t b/doc/supplements/template/memmodel.t
deleted file mode 100644
index a0ced50355..0000000000
--- a/doc/supplements/template/memmodel.t
+++ /dev/null
@@ -1,39 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Memory Model
-
-@section Introduction
-
-A processor may support any combination of memory
-models ranging from pure physical addressing to complex demand
-paged virtual memory systems. RTEMS supports a flat memory
-model which ranges contiguously over the processor's allowable
-address space. RTEMS does not support segmentation or virtual
-memory of any kind. The appropriate memory model for RTEMS
-provided by the targeted processor and related characteristics
-of that model are described in this chapter.
-
-@section Flat Memory Model
-
-The XXX family supports a flat 32-bit address
-space with addresses ranging from 0x00000000 to 0xFFFFFFFF (4
-gigabytes). Each address is represented by a 32-bit value and
-is byte addressable. The address may be used to reference a
-single byte, word (2-bytes), or long word (4 bytes). Memory
-accesses within this address space are performed in big endian
-fashion by the processors in this family.
-
-Some of the XXX family members such as the
-XXX, XXX, and XXX support virtual memory and
-segmentation. The XXX requires external hardware support
-such as the XXX Paged Memory Management Unit coprocessor
-which is typically used to perform address translations for
-these systems. RTEMS does not support virtual memory or
-segmentation on any of the XXX family members.
-
diff --git a/doc/supplements/template/preface.texi b/doc/supplements/template/preface.texi
deleted file mode 100644
index 1c5f5bce21..0000000000
--- a/doc/supplements/template/preface.texi
+++ /dev/null
@@ -1,55 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@ifinfo
-@node Preface, CPU Model Dependent Features, Top, Top
-@end ifinfo
-@unnumbered Preface
-
-The Real Time Executive for Multiprocessor Systems (RTEMS)
-is designed to be portable across multiple processor
-architectures. However, the nature of real-time systems makes
-it essential that the application designer understand certain
-processor dependent implementation details. These processor
-dependencies include calling convention, board support package
-issues, interrupt processing, exact RTEMS memory requirements,
-performance data, header files, and the assembly language
-interface to the executive.
-
-This document discusses the VENDOR XXX
-architecture dependencies in this port of RTEMS. The XXX
-family has a wide variety of CPU models within it. The part
-numbers ...
-
-XXX fill in some things here
-
-It is highly recommended that the XXX
-RTEMS application developer obtain and become familiar with the
-documentation for the processor being used as well as the
-documentation for the family as a whole.
-
-@subheading Architecture Documents
-
-For information on the XXX architecture,
-refer to the following documents available from VENDOR
-(@file{http//www.XXX.com/}):
-
-@itemize @bullet
-@item @cite{XXX Family Reference, VENDOR, PART NUMBER}.
-@end itemize
-
-@subheading MODEL SPECIFIC DOCUMENTS
-
-For information on specific processor models and
-their associated coprocessors, refer to the following documents:
-
-@itemize @bullet
-@item @cite{XXX MODEL Manual, VENDOR, PART NUMBER}.
-@item @cite{XXX MODEL Manual, VENDOR, PART NUMBER}.
-@end itemize
-
diff --git a/doc/supplements/template/template.texi b/doc/supplements/template/template.texi
deleted file mode 100644
index fae5f168ff..0000000000
--- a/doc/supplements/template/template.texi
+++ /dev/null
@@ -1,121 +0,0 @@
-\input texinfo @c -*-texinfo-*-
-@c %**start of header
-@setfilename c_template
-@syncodeindex vr fn
-@synindex ky cp
-@paragraphindent 0
-@c @smallbook
-@c %**end of header
-
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@c
-@c Master file for the Template Applications Supplement
-@c
-
-@include ../../common/setup.texi
-
-@ignore
-@ifinfo
-@format
-START-INFO-DIR-ENTRY
-* RTEMS Template Applications Supplement (template):
-END-INFO-DIR-ENTRY
-@end format
-@end ifinfo
-@end ignore
-
-@c
-@c Title Page Stuff
-@c
-
-@set edition @value{RTEMS-EDITION}
-@set version @value{RTEMS-VERSION}
-@set update-date @value{RTEMS-UPDATE-DATE}
-@set update-month @value{RTEMS-UPDATE-MONTH}
-
-@c
-@c I don't really like having a short title page. --joel
-@c
-@c @shorttitlepage RTEMS Template Applications Supplement
-
-@setchapternewpage odd
-@settitle RTEMS Template Applications Supplement
-@titlepage
-@finalout
-
-@title RTEMS Template Applications Supplement
-@subtitle Edition @value{edition}, for RTEMS @value{version}
-@sp 1
-@subtitle @value{update-month}
-@author On-Line Applications Research Corporation
-@page
-
-@include ../../common/cpright.texi
-@end titlepage
-
-@c This prevents a black box from being printed on "overflow" lines.
-@c The alternative is to rework a sentence to avoid this problem.
-
-@include preface.texi
-@include cpumodel.texi
-@include callconv.texi
-@include memmodel.texi
-@include intr.texi
-@include fatalerr.texi
-@include bsp.texi
-@include cputable.texi
-@include wksheets.texi
-@include timing.texi
-@include timeBSP.texi
-@ifinfo
-@node Top, Preface, (dir), (dir)
-@top c_template
-
-This is the online version of the RTEMS Template
-Applications Supplement.
-
-@menu
-* Preface::
-* CPU Model Dependent Features::
-* Calling Conventions::
-* Memory Model::
-* Interrupt Processing::
-* Default Fatal Error Processing::
-* Board Support Packages::
-* Processor Dependent Information Table::
-* Memory Requirements::
-* Timing Specification::
-* BSP_FOR_TIMES Timing Data::
-* Command and Variable Index::
-* Concept Index::
-@end menu
-
-@end ifinfo
-@c
-@c
-@c Need to copy the emacs stuff and "trailer stuff" (index, toc) into here
-@c
-
-@node Command and Variable Index, Concept Index, BSP_FOR_TIMES Timing Data Context Switch, Top
-@unnumbered Command and Variable Index
-
-There are currently no Command and Variable Index entries.
-
-@c @printindex fn
-
-@node Concept Index, , Command and Variable Index, Top
-@unnumbered Concept Index
-
-There are currently no Concept Index entries.
-@c @printindex cp
-
-@contents
-@bye
-
diff --git a/doc/supplements/template/timeBSP.t b/doc/supplements/template/timeBSP.t
deleted file mode 100644
index f8cafd5f89..0000000000
--- a/doc/supplements/template/timeBSP.t
+++ /dev/null
@@ -1,108 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@include ../../common/timemac.texi
-@tex
-\global\advance \smallskipamount by -4pt
-@end tex
-
-@chapter BSP_FOR_TIMES Timing Data
-
-@section Introduction
-
-The timing data for the XXX version of RTEMS is
-provided along with the target dependent aspects concerning the
-gathering of the timing data. The hardware platform used to
-gather the times is described to give the reader a better
-understanding of each directive time provided. Also, provided
-is a description of the interrupt latency and the context switch
-times as they pertain to the XXX version of RTEMS.
-
-@section Hardware Platform
-
-All times reported except for the maximum period
-interrupts are disabled by RTEMS were measured using a Motorola
-BSP_FOR_TIMES CPU board. The BSP_FOR_TIMES is a 20Mhz board with one wait
-state dynamic memory and a XXX numeric coprocessor. The
-Zilog 8036 countdown timer on this board was used to measure
-elapsed time with a one-half microsecond resolution. All
-sources of hardware interrupts were disabled, although the
-interrupt level of the XXX allows all interrupts.
-
-The maximum period interrupts are disabled was
-measured by summing the number of CPU cycles required by each
-assembly language instruction executed while interrupts were
-disabled. The worst case times of the XXX microprocessor
-were used for each instruction. Zero wait state memory was
-assumed. The total CPU cycles executed with interrupts
-disabled, including the instructions to disable and enable
-interrupts, was divided by 20 to simulate a 20Mhz XXX. It
-should be noted that the worst case instruction times for the
-XXX assume that the internal cache is disabled and that no
-instructions overlap.
-
-@section Interrupt Latency
-
-The maximum period with interrupts disabled within
-RTEMS is less than RTEMS_MAXIMUM_DISABLE_PERIOD
-microseconds including the instructions
-which disable and re-enable interrupts. The time required for
-the XXX to vector an interrupt and for the RTEMS entry
-overhead before invoking the user's interrupt handler are a
-total of RTEMS_INTR_ENTRY_RETURNS_TO_PREEMPTING_TASK
-microseconds. These combine to yield a worst case
-interrupt latency of less than
-RTEMS_MAXIMUM_DISABLE_PERIOD + RTEMS_INTR_ENTRY_RETURNS_TO_PREEMPTING_TASK
-microseconds at 20Mhz. [NOTE: The maximum period with interrupts
-disabled was last determined for Release
-RTEMS_RELEASE_FOR_MAXIMUM_DISABLE_PERIOD.]
-
-It should be noted again that the maximum period with
-interrupts disabled within RTEMS is hand-timed and based upon
-worst case (i.e. CPU cache disabled and no instruction overlap)
-times for a 20Mhz XXX. The interrupt vector and entry
-overhead time was generated on an BSP_FOR_TIMES benchmark platform
-using the Multiprocessing Communications registers to generate
-as the interrupt source.
-
-@section Context Switch
-
-The RTEMS processor context switch time is RTEMS_NO_FP_CONTEXTS
-microseconds on the BSP_FOR_TIMES benchmark platform when no floating
-point context is saved or restored. Additional execution time
-is required when a TASK_SWITCH user extension is configured.
-The use of the TASK_SWITCH extension is application dependent.
-Thus, its execution time is not considered part of the raw
-context switch time.
-
-Since RTEMS was designed specifically for embedded
-missile applications which are floating point intensive, the
-executive is optimized to avoid unnecessarily saving and
-restoring the state of the numeric coprocessor. The state of
-the numeric coprocessor is only saved when an FLOATING_POINT
-task is dispatched and that task was not the last task to
-utilize the coprocessor. In a system with only one
-FLOATING_POINT task, the state of the numeric coprocessor will
-never be saved or restored. When the first FLOATING_POINT task
-is dispatched, RTEMS does not need to save the current state of
-the numeric coprocessor.
-
-The exact amount of time required to save and restore
-floating point context is dependent on whether an XXX or
-XXX is being used as well as the state of the numeric
-coprocessor. These numeric coprocessors define three operating
-states: initialized, idle, and busy. RTEMS places the
-coprocessor in the initialized state when a task is started or
-restarted. Once the task has utilized the coprocessor, it is in
-the idle state when floating point instructions are not
-executing and the busy state when floating point instructions
-are executing. The state of the coprocessor is task specific.
-
-The following table summarizes the context switch
-times for the BSP_FOR_TIMES benchmark platform:
-
diff --git a/doc/texinfo/texinfo.tex b/doc/texinfo/texinfo.tex
deleted file mode 100644
index 8fcde98a03..0000000000
--- a/doc/texinfo/texinfo.tex
+++ /dev/null
@@ -1,4426 +0,0 @@
-%% TeX macros to handle texinfo files
-
-% Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 1994 Free Software Foundation, Inc.
-
-%This texinfo.tex file is free software; you can redistribute it and/or
-%modify it under the terms of the GNU General Public License as
-%published by the Free Software Foundation; either version 2, or (at
-%your option) any later version.
-
-%This texinfo.tex file is distributed in the hope that it will be
-%useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-%of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-%General Public License for more details.
-
-%You should have received a copy of the GNU General Public License
-%along with this texinfo.tex file; see the file COPYING. If not, write
-%to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139,
-%USA.
-
-
-%In other words, you are welcome to use, share and improve this program.
-%You are forbidden to forbid anyone else to use, share and improve
-%what you give them. Help stamp out software-hoarding!
-
-
-% Send bug reports to bug-texinfo@prep.ai.mit.edu.
-% Please include a *precise* test case in each bug report.
-
-
-% Make it possible to create a .fmt file just by loading this file:
-% if the underlying format is not loaded, start by loading it now.
-% Added by gildea November 1993.
-\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
-
-% This automatically updates the version number based on RCS.
-\def\deftexinfoversion$#1: #2 ${\def\texinfoversion{#2}}
-\deftexinfoversion$Revision$
-\message{Loading texinfo package [Version \texinfoversion]:}
-
-% If in a .fmt file, print the version number
-% and turn on active characters that we couldn't do earlier because
-% they might have appeared in the input file name.
-\everyjob{\message{[Texinfo version \texinfoversion]}\message{}
- \catcode`+=\active \catcode`\_=\active}
-
-% Save some parts of plain tex whose names we will redefine.
-
-\let\ptextilde=\~
-\let\ptexlbrace=\{
-\let\ptexrbrace=\}
-\let\ptexdots=\dots
-\let\ptexdot=\.
-\let\ptexstar=\*
-\let\ptexend=\end
-\let\ptexbullet=\bullet
-\let\ptexb=\b
-\let\ptexc=\c
-\let\ptexi=\i
-\let\ptext=\t
-\let\ptexl=\l
-\let\ptexL=\L
-
-% Be sure we're in horizontal mode when doing a tie, since we make space
-% equivalent to this in @example-like environments. Otherwise, a space
-% at the beginning of a line will start with \penalty -- and
-% since \penalty is valid in vertical mode, we'd end up putting the
-% penalty on the vertical list instead of in the new paragraph.
-{\catcode`@ = 11
- % Avoid using \@M directly, because that causes trouble
- % if the definition is written into an index file.
- \global\let\tiepenalty = \@M
- \gdef\tie{\leavevmode\penalty\tiepenalty\ }
-}
-\let\~ = \tie % And make it available as @~.
-
-\message{Basics,}
-\chardef\other=12
-
-% If this character appears in an error message or help string, it
-% starts a new line in the output.
-\newlinechar = `^^J
-
-% Set up fixed words for English.
-\ifx\putwordChapter\undefined{\gdef\putwordChapter{Chapter}}\fi%
-\def\putwordInfo{Info}%
-\ifx\putwordSee\undefined{\gdef\putwordSee{See}}\fi%
-\ifx\putwordsee\undefined{\gdef\putwordsee{see}}\fi%
-\ifx\putwordfile\undefined{\gdef\putwordfile{file}}\fi%
-\ifx\putwordpage\undefined{\gdef\putwordpage{page}}\fi%
-\ifx\putwordsection\undefined{\gdef\putwordsection{section}}\fi%
-\ifx\putwordSection\undefined{\gdef\putwordSection{Section}}\fi%
-\ifx\putwordTableofContents\undefined{\gdef\putwordTableofContents{Table of Contents}}\fi%
-\ifx\putwordShortContents\undefined{\gdef\putwordShortContents{Short Contents}}\fi%
-\ifx\putwordAppendix\undefined{\gdef\putwordAppendix{Appendix}}\fi%
-
-% Ignore a token.
-%
-\def\gobble#1{}
-
-\hyphenation{ap-pen-dix}
-\hyphenation{mini-buf-fer mini-buf-fers}
-\hyphenation{eshell}
-
-% Margin to add to right of even pages, to left of odd pages.
-\newdimen \bindingoffset \bindingoffset=0pt
-\newdimen \normaloffset \normaloffset=\hoffset
-\newdimen\pagewidth \newdimen\pageheight
-\pagewidth=\hsize \pageheight=\vsize
-
-% Sometimes it is convenient to have everything in the transcript file
-% and nothing on the terminal. We don't just call \tracingall here,
-% since that produces some useless output on the terminal.
-%
-\def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}%
-\def\loggingall{\tracingcommands2 \tracingstats2
- \tracingpages1 \tracingoutput1 \tracinglostchars1
- \tracingmacros2 \tracingparagraphs1 \tracingrestores1
- \showboxbreadth\maxdimen\showboxdepth\maxdimen
-}%
-
-%---------------------Begin change-----------------------
-%
-%%%% For @cropmarks command.
-% Dimensions to add cropmarks at corners Added by P. A. MacKay, 12 Nov. 1986
-%
-\newdimen\cornerlong \newdimen\cornerthick
-\newdimen \topandbottommargin
-\newdimen \outerhsize \newdimen \outervsize
-\cornerlong=1pc\cornerthick=.3pt % These set size of cropmarks
-\outerhsize=7in
-%\outervsize=9.5in
-% Alternative @smallbook page size is 9.25in
-\outervsize=9.25in
-\topandbottommargin=.75in
-%
-%---------------------End change-----------------------
-
-% \onepageout takes a vbox as an argument. Note that \pagecontents
-% does insertions itself, but you have to call it yourself.
-\chardef\PAGE=255 \output={\onepageout{\pagecontents\PAGE}}
-\def\onepageout#1{\hoffset=\normaloffset
-\ifodd\pageno \advance\hoffset by \bindingoffset
-\else \advance\hoffset by -\bindingoffset\fi
-{\escapechar=`\\\relax % makes sure backslash is used in output files.
-\shipout\vbox{{\let\hsize=\pagewidth \makeheadline} \pagebody{#1}%
-{\let\hsize=\pagewidth \makefootline}}}%
-\advancepageno \ifnum\outputpenalty>-20000 \else\dosupereject\fi}
-
-%%%% For @cropmarks command %%%%
-
-% Here is a modification of the main output routine for Near East Publications
-% This provides right-angle cropmarks at all four corners.
-% The contents of the page are centerlined into the cropmarks,
-% and any desired binding offset is added as an \hskip on either
-% site of the centerlined box. (P. A. MacKay, 12 November, 1986)
-%
-\def\croppageout#1{\hoffset=0pt % make sure this doesn't mess things up
-{\escapechar=`\\\relax % makes sure backslash is used in output files.
- \shipout
- \vbox to \outervsize{\hsize=\outerhsize
- \vbox{\line{\ewtop\hfill\ewtop}}
- \nointerlineskip
- \line{\vbox{\moveleft\cornerthick\nstop}
- \hfill
- \vbox{\moveright\cornerthick\nstop}}
- \vskip \topandbottommargin
- \centerline{\ifodd\pageno\hskip\bindingoffset\fi
- \vbox{
- {\let\hsize=\pagewidth \makeheadline}
- \pagebody{#1}
- {\let\hsize=\pagewidth \makefootline}}
- \ifodd\pageno\else\hskip\bindingoffset\fi}
- \vskip \topandbottommargin plus1fill minus1fill
- \boxmaxdepth\cornerthick
- \line{\vbox{\moveleft\cornerthick\nsbot}
- \hfill
- \vbox{\moveright\cornerthick\nsbot}}
- \nointerlineskip
- \vbox{\line{\ewbot\hfill\ewbot}}
- }}
- \advancepageno
- \ifnum\outputpenalty>-20000 \else\dosupereject\fi}
-%
-% Do @cropmarks to get crop marks
-\def\cropmarks{\let\onepageout=\croppageout }
-
-\newinsert\margin \dimen\margin=\maxdimen
-
-\def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}}
-{\catcode`\@ =11
-\gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi
-% marginal hacks, juha@viisa.uucp (Juha Takala)
-\ifvoid\margin\else % marginal info is present
- \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi
-\dimen@=\dp#1 \unvbox#1
-\ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi
-\ifr@ggedbottom \kern-\dimen@ \vfil \fi}
-}
-
-%
-% Here are the rules for the cropmarks. Note that they are
-% offset so that the space between them is truly \outerhsize or \outervsize
-% (P. A. MacKay, 12 November, 1986)
-%
-\def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong}
-\def\nstop{\vbox
- {\hrule height\cornerthick depth\cornerlong width\cornerthick}}
-\def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong}
-\def\nsbot{\vbox
- {\hrule height\cornerlong depth\cornerthick width\cornerthick}}
-
-% Parse an argument, then pass it to #1. The argument is the rest of
-% the input line (except we remove a trailing comment). #1 should be a
-% macro which expects an ordinary undelimited TeX argument.
-%
-\def\parsearg#1{%
- \let\next = #1%
- \begingroup
- \obeylines
- \futurelet\temp\parseargx
-}
-
-% If the next token is an obeyed space (from an @example environment or
-% the like), remove it and recurse. Otherwise, we're done.
-\def\parseargx{%
- % \obeyedspace is defined far below, after the definition of \sepspaces.
- \ifx\obeyedspace\temp
- \expandafter\parseargdiscardspace
- \else
- \expandafter\parseargline
- \fi
-}
-
-% Remove a single space (as the delimiter token to the macro call).
-{\obeyspaces %
- \gdef\parseargdiscardspace {\futurelet\temp\parseargx}}
-
-{\obeylines %
- \gdef\parseargline#1^^M{%
- \endgroup % End of the group started in \parsearg.
- %
- % First remove any @c comment, then any @comment.
- % Result of each macro is put in \toks0.
- \argremovec #1\c\relax %
- \expandafter\argremovecomment \the\toks0 \comment\relax %
- %
- % Call the caller's macro, saved as \next in \parsearg.
- \expandafter\next\expandafter{\the\toks0}%
- }%
-}
-
-% Since all \c{,omment} does is throw away the argument, we can let TeX
-% do that for us. The \relax here is matched by the \relax in the call
-% in \parseargline; it could be more or less anything, its purpose is
-% just to delimit the argument to the \c.
-\def\argremovec#1\c#2\relax{\toks0 = {#1}}
-\def\argremovecomment#1\comment#2\relax{\toks0 = {#1}}
-
-% \argremovec{,omment} might leave us with trailing spaces, though; e.g.,
-% @end itemize @c foo
-% will have two active spaces as part of the argument with the
-% `itemize'. Here we remove all active spaces from #1, and assign the
-% result to \toks0.
-%
-% This loses if there are any *other* active characters besides spaces
-% in the argument -- _ ^ +, for example -- since they get expanded.
-% Fortunately, Texinfo does not define any such commands. (If it ever
-% does, the catcode of the characters in questionwill have to be changed
-% here.) But this means we cannot call \removeactivespaces as part of
-% \argremovec{,omment}, since @c uses \parsearg, and thus the argument
-% that \parsearg gets might well have any character at all in it.
-%
-\def\removeactivespaces#1{%
- \begingroup
- \ignoreactivespaces
- \edef\temp{#1}%
- \global\toks0 = \expandafter{\temp}%
- \endgroup
-}
-
-% Change the active space to expand to nothing.
-%
-\begingroup
- \obeyspaces
- \gdef\ignoreactivespaces{\obeyspaces\let =\empty}
-\endgroup
-
-
-\def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next}
-
-%% These are used to keep @begin/@end levels from running away
-%% Call \inENV within environments (after a \begingroup)
-\newif\ifENV \ENVfalse \def\inENV{\ifENV\relax\else\ENVtrue\fi}
-\def\ENVcheck{%
-\ifENV\errmessage{Still within an environment. Type Return to continue.}
-\endgroup\fi} % This is not perfect, but it should reduce lossage
-
-% @begin foo is the same as @foo, for now.
-\newhelp\EMsimple{Type <Return> to continue.}
-
-\outer\def\begin{\parsearg\beginxxx}
-
-\def\beginxxx #1{%
-\expandafter\ifx\csname #1\endcsname\relax
-{\errhelp=\EMsimple \errmessage{Undefined command @begin #1}}\else
-\csname #1\endcsname\fi}
-
-% @end foo executes the definition of \Efoo.
-%
-\def\end{\parsearg\endxxx}
-\def\endxxx #1{%
- \removeactivespaces{#1}%
- \edef\endthing{\the\toks0}%
- %
- \expandafter\ifx\csname E\endthing\endcsname\relax
- \expandafter\ifx\csname \endthing\endcsname\relax
- % There's no \foo, i.e., no ``environment'' foo.
- \errhelp = \EMsimple
- \errmessage{Undefined command `@end \endthing'}%
- \else
- \unmatchedenderror\endthing
- \fi
- \else
- % Everything's ok; the right environment has been started.
- \csname E\endthing\endcsname
- \fi
-}
-
-% There is an environment #1, but it hasn't been started. Give an error.
-%
-\def\unmatchedenderror#1{%
- \errhelp = \EMsimple
- \errmessage{This `@end #1' doesn't have a matching `@#1'}%
-}
-
-% Define the control sequence \E#1 to give an unmatched @end error.
-%
-\def\defineunmatchedend#1{%
- \expandafter\def\csname E#1\endcsname{\unmatchedenderror{#1}}%
-}
-
-
-% Single-spacing is done by various environments (specifically, in
-% \nonfillstart and \quotations).
-\newskip\singlespaceskip \singlespaceskip = 12.5pt
-\def\singlespace{%
- % Why was this kern here? It messes up equalizing space above and below
- % environments. --karl, 6may93
- %{\advance \baselineskip by -\singlespaceskip
- %\kern \baselineskip}%
- \setleading \singlespaceskip
-}
-
-%% Simple single-character @ commands
-
-% @@ prints an @
-% Kludge this until the fonts are right (grr).
-\def\@{{\tt \char '100}}
-
-% This is turned off because it was never documented
-% and you can use @w{...} around a quote to suppress ligatures.
-%% Define @` and @' to be the same as ` and '
-%% but suppressing ligatures.
-%\def\`{{`}}
-%\def\'{{'}}
-
-% Used to generate quoted braces.
-
-\def\mylbrace {{\tt \char '173}}
-\def\myrbrace {{\tt \char '175}}
-\let\{=\mylbrace
-\let\}=\myrbrace
-
-% @: forces normal size whitespace following.
-\def\:{\spacefactor=1000 }
-
-% @* forces a line break.
-\def\*{\hfil\break\hbox{}\ignorespaces}
-
-% @. is an end-of-sentence period.
-\def\.{.\spacefactor=3000 }
-
-% @enddots{} is an end-of-sentence ellipsis.
-\gdef\enddots{$\mathinner{\ldotp\ldotp\ldotp\ldotp}$\spacefactor=3000}
-
-% @! is an end-of-sentence bang.
-\gdef\!{!\spacefactor=3000 }
-
-% @? is an end-of-sentence query.
-\gdef\?{?\spacefactor=3000 }
-
-% @w prevents a word break. Without the \leavevmode, @w at the
-% beginning of a paragraph, when TeX is still in vertical mode, would
-% produce a whole line of output instead of starting the paragraph.
-\def\w#1{\leavevmode\hbox{#1}}
-
-% @group ... @end group forces ... to be all on one page, by enclosing
-% it in a TeX vbox. We use \vtop instead of \vbox to construct the box
-% to keep its height that of a normal line. According to the rules for
-% \topskip (p.114 of the TeXbook), the glue inserted is
-% max (\topskip - \ht (first item), 0). If that height is large,
-% therefore, no glue is inserted, and the space between the headline and
-% the text is small, which looks bad.
-%
-\def\group{\begingroup
- \ifnum\catcode13=\active \else
- \errhelp = \groupinvalidhelp
- \errmessage{@group invalid in context where filling is enabled}%
- \fi
- %
- % The \vtop we start below produces a box with normal height and large
- % depth; thus, TeX puts \baselineskip glue before it, and (when the
- % next line of text is done) \lineskip glue after it. (See p.82 of
- % the TeXbook.) Thus, space below is not quite equal to space
- % above. But it's pretty close.
- \def\Egroup{%
- \egroup % End the \vtop.
- \endgroup % End the \group.
- }%
- %
- \vtop\bgroup
- % We have to put a strut on the last line in case the @group is in
- % the midst of an example, rather than completely enclosing it.
- % Otherwise, the interline space between the last line of the group
- % and the first line afterwards is too small. But we can't put the
- % strut in \Egroup, since there it would be on a line by itself.
- % Hence this just inserts a strut at the beginning of each line.
- \everypar = {\strut}%
- %
- % Since we have a strut on every line, we don't need any of TeX's
- % normal interline spacing.
- \offinterlineskip
- %
- % OK, but now we have to do something about blank
- % lines in the input in @example-like environments, which normally
- % just turn into \lisppar, which will insert no space now that we've
- % turned off the interline space. Simplest is to make them be an
- % empty paragraph.
- \ifx\par\lisppar
- \edef\par{\leavevmode \par}%
- %
- % Reset ^^M's definition to new definition of \par.
- \obeylines
- \fi
- %
- % Do @comment since we are called inside an environment such as
- % @example, where each end-of-line in the input causes an
- % end-of-line in the output. We don't want the end-of-line after
- % the `@group' to put extra space in the output. Since @group
- % should appear on a line by itself (according to the Texinfo
- % manual), we don't worry about eating any user text.
- \comment
-}
-%
-% TeX puts in an \escapechar (i.e., `@') at the beginning of the help
-% message, so this ends up printing `@group can only ...'.
-%
-\newhelp\groupinvalidhelp{%
-group can only be used in environments such as @example,^^J%
-where each line of input produces a line of output.}
-
-% @need space-in-mils
-% forces a page break if there is not space-in-mils remaining.
-
-\newdimen\mil \mil=0.001in
-
-\def\need{\parsearg\needx}
-
-% Old definition--didn't work.
-%\def\needx #1{\par %
-%% This method tries to make TeX break the page naturally
-%% if the depth of the box does not fit.
-%{\baselineskip=0pt%
-%\vtop to #1\mil{\vfil}\kern -#1\mil\penalty 10000
-%\prevdepth=-1000pt
-%}}
-
-\def\needx#1{%
- % Go into vertical mode, so we don't make a big box in the middle of a
- % paragraph.
- \par
- %
- % Don't add any leading before our big empty box, but allow a page
- % break, since the best break might be right here.
- \allowbreak
- \nointerlineskip
- \vtop to #1\mil{\vfil}%
- %
- % TeX does not even consider page breaks if a penalty added to the
- % main vertical list is 10000 or more. But in order to see if the
- % empty box we just added fits on the page, we must make it consider
- % page breaks. On the other hand, we don't want to actually break the
- % page after the empty box. So we use a penalty of 9999.
- %
- % There is an extremely small chance that TeX will actually break the
- % page at this \penalty, if there are no other feasible breakpoints in
- % sight. (If the user is using lots of big @group commands, which
- % almost-but-not-quite fill up a page, TeX will have a hard time doing
- % good page breaking, for example.) However, I could not construct an
- % example where a page broke at this \penalty; if it happens in a real
- % document, then we can reconsider our strategy.
- \penalty9999
- %
- % Back up by the size of the box, whether we did a page break or not.
- \kern -#1\mil
- %
- % Do not allow a page break right after this kern.
- \nobreak
-}
-
-% @br forces paragraph break
-
-\let\br = \par
-
-% @dots{} output some dots
-
-\def\dots{$\ldots$}
-
-% @page forces the start of a new page
-
-\def\page{\par\vfill\supereject}
-
-% @exdent text....
-% outputs text on separate line in roman font, starting at standard page margin
-
-% This records the amount of indent in the innermost environment.
-% That's how much \exdent should take out.
-\newskip\exdentamount
-
-% This defn is used inside fill environments such as @defun.
-\def\exdent{\parsearg\exdentyyy}
-\def\exdentyyy #1{{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break}}
-
-% This defn is used inside nofill environments such as @example.
-\def\nofillexdent{\parsearg\nofillexdentyyy}
-\def\nofillexdentyyy #1{{\advance \leftskip by -\exdentamount
-\leftline{\hskip\leftskip{\rm#1}}}}
-
-%\hbox{{\rm#1}}\hfil\break}}
-
-% @include file insert text of that file as input.
-
-\def\include{\parsearg\includezzz}
-%Use \input\thisfile to avoid blank after \input, which may be an active
-%char (in which case the blank would become the \input argument).
-%The grouping keeps the value of \thisfile correct even when @include
-%is nested.
-\def\includezzz #1{\begingroup
-\def\thisfile{#1}\input\thisfile
-\endgroup}
-
-\def\thisfile{}
-
-% @center line outputs that line, centered
-
-\def\center{\parsearg\centerzzz}
-\def\centerzzz #1{{\advance\hsize by -\leftskip
-\advance\hsize by -\rightskip
-\centerline{#1}}}
-
-% @sp n outputs n lines of vertical space
-
-\def\sp{\parsearg\spxxx}
-\def\spxxx #1{\par \vskip #1\baselineskip}
-
-% @comment ...line which is ignored...
-% @c is the same as @comment
-% @ignore ... @end ignore is another way to write a comment
-
-\def\comment{\catcode 64=\other \catcode 123=\other \catcode 125=\other%
-\parsearg \commentxxx}
-
-\def\commentxxx #1{\catcode 64=0 \catcode 123=1 \catcode 125=2 }
-
-\let\c=\comment
-
-% Prevent errors for section commands.
-% Used in @ignore and in failing conditionals.
-\def\ignoresections{%
-\let\chapter=\relax
-\let\unnumbered=\relax
-\let\top=\relax
-\let\unnumberedsec=\relax
-\let\unnumberedsection=\relax
-\let\unnumberedsubsec=\relax
-\let\unnumberedsubsection=\relax
-\let\unnumberedsubsubsec=\relax
-\let\unnumberedsubsubsection=\relax
-\let\section=\relax
-\let\subsec=\relax
-\let\subsubsec=\relax
-\let\subsection=\relax
-\let\subsubsection=\relax
-\let\appendix=\relax
-\let\appendixsec=\relax
-\let\appendixsection=\relax
-\let\appendixsubsec=\relax
-\let\appendixsubsection=\relax
-\let\appendixsubsubsec=\relax
-\let\appendixsubsubsection=\relax
-\let\contents=\relax
-\let\smallbook=\relax
-\let\titlepage=\relax
-}
-
-% Used in nested conditionals, where we have to parse the Texinfo source
-% and so want to turn off most commands, in case they are used
-% incorrectly.
-%
-\def\ignoremorecommands{%
- \let\defcv = \relax
- \let\deffn = \relax
- \let\deffnx = \relax
- \let\defindex = \relax
- \let\defivar = \relax
- \let\defmac = \relax
- \let\defmethod = \relax
- \let\defop = \relax
- \let\defopt = \relax
- \let\defspec = \relax
- \let\deftp = \relax
- \let\deftypefn = \relax
- \let\deftypefun = \relax
- \let\deftypevar = \relax
- \let\deftypevr = \relax
- \let\defun = \relax
- \let\defvar = \relax
- \let\defvr = \relax
- \let\ref = \relax
- \let\xref = \relax
- \let\printindex = \relax
- \let\pxref = \relax
- \let\settitle = \relax
- \let\include = \relax
- \let\lowersections = \relax
- \let\down = \relax
- \let\raisesections = \relax
- \let\up = \relax
- \let\set = \relax
- \let\clear = \relax
- \let\item = \relax
- \let\message = \relax
-}
-
-% Ignore @ignore ... @end ignore.
-%
-\def\ignore{\doignore{ignore}}
-
-% Also ignore @ifinfo, @ifhtml, @html, @menu, and @direntry text.
-%
-\def\ifinfo{\doignore{ifinfo}}
-\def\ifhtml{\doignore{ifhtml}}
-\def\html{\doignore{html}}
-\def\menu{\doignore{menu}}
-\def\direntry{\doignore{direntry}}
-
-% Ignore text until a line `@end #1'.
-%
-\def\doignore#1{\begingroup
- % Don't complain about control sequences we have declared \outer.
- \ignoresections
- %
- % Define a command to swallow text until we reach `@end #1'.
- \long\def\doignoretext##1\end #1{\enddoignore}%
- %
- % Make sure that spaces turn into tokens that match what \doignoretext wants.
- \catcode32 = 10
- %
- % And now expand that command.
- \doignoretext
-}
-
-% What we do to finish off ignored text.
-%
-\def\enddoignore{\endgroup\ignorespaces}%
-
-\newif\ifwarnedobs\warnedobsfalse
-\def\obstexwarn{%
- \ifwarnedobs\relax\else
- % We need to warn folks that they may have trouble with TeX 3.0.
- % This uses \immediate\write16 rather than \message to get newlines.
- \immediate\write16{}
- \immediate\write16{***WARNING*** for users of Unix TeX 3.0!}
- \immediate\write16{This manual trips a bug in TeX version 3.0 (tex hangs).}
- \immediate\write16{If you are running another version of TeX, relax.}
- \immediate\write16{If you are running Unix TeX 3.0, kill this TeX process.}
- \immediate\write16{ Then upgrade your TeX installation if you can.}
- \immediate\write16{If you are stuck with version 3.0, run the}
- \immediate\write16{ script ``tex3patch'' from the Texinfo distribution}
- \immediate\write16{ to use a workaround.}
- \immediate\write16{}
- \warnedobstrue
- \fi
-}
-
-% **In TeX 3.0, setting text in \nullfont hangs tex. For a
-% workaround (which requires the file ``dummy.tfm'' to be installed),
-% uncomment the following line:
-%%%%%\font\nullfont=dummy\let\obstexwarn=\relax
-
-% Ignore text, except that we keep track of conditional commands for
-% purposes of nesting, up to an `@end #1' command.
-%
-\def\nestedignore#1{%
- \obstexwarn
- % We must actually expand the ignored text to look for the @end
- % command, so that nested ignore constructs work. Thus, we put the
- % text into a \vbox and then do nothing with the result. To minimize
- % the change of memory overflow, we follow the approach outlined on
- % page 401 of the TeXbook: make the current font be a dummy font.
- %
- \setbox0 = \vbox\bgroup
- % Don't complain about control sequences we have declared \outer.
- \ignoresections
- %
- % Define `@end #1' to end the box, which will in turn undefine the
- % @end command again.
- \expandafter\def\csname E#1\endcsname{\egroup\ignorespaces}%
- %
- % We are going to be parsing Texinfo commands. Most cause no
- % trouble when they are used incorrectly, but some commands do
- % complicated argument parsing or otherwise get confused, so we
- % undefine them.
- %
- % We can't do anything about stray @-signs, unfortunately;
- % they'll produce `undefined control sequence' errors.
- \ignoremorecommands
- %
- % Set the current font to be \nullfont, a TeX primitive, and define
- % all the font commands to also use \nullfont. We don't use
- % dummy.tfm, as suggested in the TeXbook, because not all sites
- % might have that installed. Therefore, math mode will still
- % produce output, but that should be an extremely small amount of
- % stuff compared to the main input.
- %
- \nullfont
- \let\tenrm = \nullfont \let\tenit = \nullfont \let\tensl = \nullfont
- \let\tenbf = \nullfont \let\tentt = \nullfont \let\smallcaps = \nullfont
- \let\tensf = \nullfont
- % Similarly for index fonts (mostly for their use in
- % smallexample)
- \let\indrm = \nullfont \let\indit = \nullfont \let\indsl = \nullfont
- \let\indbf = \nullfont \let\indtt = \nullfont \let\indsc = \nullfont
- \let\indsf = \nullfont
- %
- % Don't complain when characters are missing from the fonts.
- \tracinglostchars = 0
- %
- % Don't bother to do space factor calculations.
- \frenchspacing
- %
- % Don't report underfull hboxes.
- \hbadness = 10000
- %
- % Do minimal line-breaking.
- \pretolerance = 10000
- %
- % Do not execute instructions in @tex
- \def\tex{\doignore{tex}}
-}
-
-% @set VAR sets the variable VAR to an empty value.
-% @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE.
-%
-% Since we want to separate VAR from REST-OF-LINE (which might be
-% empty), we can't just use \parsearg; we have to insert a space of our
-% own to delimit the rest of the line, and then take it out again if we
-% didn't need it.
-%
-\def\set{\parsearg\setxxx}
-\def\setxxx#1{\setyyy#1 \endsetyyy}
-\def\setyyy#1 #2\endsetyyy{%
- \def\temp{#2}%
- \ifx\temp\empty \global\expandafter\let\csname SET#1\endcsname = \empty
- \else \setzzz{#1}#2\endsetzzz % Remove the trailing space \setxxx inserted.
- \fi
-}
-% Can't use \xdef to pre-expand #2 and save some time, since \temp or
-% \next or other control sequences that we've defined might get us into
-% an infinite loop. Consider `@set foo @cite{bar}'.
-\def\setzzz#1#2 \endsetzzz{\expandafter\gdef\csname SET#1\endcsname{#2}}
-
-% @clear VAR clears (i.e., unsets) the variable VAR.
-%
-\def\clear{\parsearg\clearxxx}
-\def\clearxxx#1{\global\expandafter\let\csname SET#1\endcsname=\relax}
-
-% @value{foo} gets the text saved in variable foo.
-%
-\def\value#1{\expandafter
- \ifx\csname SET#1\endcsname\relax
- {\{No value for ``#1''\}}
- \else \csname SET#1\endcsname \fi}
-
-% @ifset VAR ... @end ifset reads the `...' iff VAR has been defined
-% with @set.
-%
-\def\ifset{\parsearg\ifsetxxx}
-\def\ifsetxxx #1{%
- \expandafter\ifx\csname SET#1\endcsname\relax
- \expandafter\ifsetfail
- \else
- \expandafter\ifsetsucceed
- \fi
-}
-\def\ifsetsucceed{\conditionalsucceed{ifset}}
-\def\ifsetfail{\nestedignore{ifset}}
-\defineunmatchedend{ifset}
-
-% @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been
-% defined with @set, or has been undefined with @clear.
-%
-\def\ifclear{\parsearg\ifclearxxx}
-\def\ifclearxxx #1{%
- \expandafter\ifx\csname SET#1\endcsname\relax
- \expandafter\ifclearsucceed
- \else
- \expandafter\ifclearfail
- \fi
-}
-\def\ifclearsucceed{\conditionalsucceed{ifclear}}
-\def\ifclearfail{\nestedignore{ifclear}}
-\defineunmatchedend{ifclear}
-
-% @iftex always succeeds; we read the text following, through @end
-% iftex). But `@end iftex' should be valid only after an @iftex.
-%
-\def\iftex{\conditionalsucceed{iftex}}
-\defineunmatchedend{iftex}
-
-% We can't just want to start a group at @iftex (for example) and end it
-% at @end iftex, since then @set commands inside the conditional have no
-% effect (they'd get reverted at the end of the group). So we must
-% define \Eiftex to redefine itself to be its previous value. (We can't
-% just define it to fail again with an ``unmatched end'' error, since
-% the @ifset might be nested.)
-%
-\def\conditionalsucceed#1{%
- \edef\temp{%
- % Remember the current value of \E#1.
- \let\nece{prevE#1} = \nece{E#1}%
- %
- % At the `@end #1', redefine \E#1 to be its previous value.
- \def\nece{E#1}{\let\nece{E#1} = \nece{prevE#1}}%
- }%
- \temp
-}
-
-% We need to expand lots of \csname's, but we don't want to expand the
-% control sequences after we've constructed them.
-%
-\def\nece#1{\expandafter\noexpand\csname#1\endcsname}
-
-% @asis just yields its argument. Used with @table, for example.
-%
-\def\asis#1{#1}
-
-% @math means output in math mode.
-% We don't use $'s directly in the definition of \math because control
-% sequences like \math are expanded when the toc file is written. Then,
-% we read the toc file back, the $'s will be normal characters (as they
-% should be, according to the definition of Texinfo). So we must use a
-% control sequence to switch into and out of math mode.
-%
-% This isn't quite enough for @math to work properly in indices, but it
-% seems unlikely it will ever be needed there.
-%
-\let\implicitmath = $
-\def\math#1{\implicitmath #1\implicitmath}
-
-% @bullet and @minus need the same treatment as @math, just above.
-\def\bullet{\implicitmath\ptexbullet\implicitmath}
-\def\minus{\implicitmath-\implicitmath}
-
-\def\node{\ENVcheck\parsearg\nodezzz}
-\def\nodezzz#1{\nodexxx [#1,]}
-\def\nodexxx[#1,#2]{\gdef\lastnode{#1}}
-\let\nwnode=\node
-\let\lastnode=\relax
-
-\def\donoderef{\ifx\lastnode\relax\else
-\expandafter\expandafter\expandafter\setref{\lastnode}\fi
-\global\let\lastnode=\relax}
-
-\def\unnumbnoderef{\ifx\lastnode\relax\else
-\expandafter\expandafter\expandafter\unnumbsetref{\lastnode}\fi
-\global\let\lastnode=\relax}
-
-\def\appendixnoderef{\ifx\lastnode\relax\else
-\expandafter\expandafter\expandafter\appendixsetref{\lastnode}\fi
-\global\let\lastnode=\relax}
-
-\let\refill=\relax
-
-% @setfilename is done at the beginning of every texinfo file.
-% So open here the files we need to have open while reading the input.
-% This makes it possible to make a .fmt file for texinfo.
-\def\setfilename{%
- \readauxfile
- \opencontents
- \openindices
- \fixbackslash % Turn off hack to swallow `\input texinfo'.
- \global\let\setfilename=\comment % Ignore extra @setfilename cmds.
- \comment % Ignore the actual filename.
-}
-
-\outer\def\bye{\pagealignmacro\tracingstats=1\ptexend}
-
-\def\inforef #1{\inforefzzz #1,,,,**}
-\def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}},
- node \samp{\ignorespaces#1{}}}
-
-\message{fonts,}
-
-% Font-change commands.
-
-% Texinfo supports the sans serif font style, which plain TeX does not.
-% So we set up a \sf analogous to plain's \rm, etc.
-\newfam\sffam
-\def\sf{\fam=\sffam \tensf}
-\let\li = \sf % Sometimes we call it \li, not \sf.
-
-%% Try out Computer Modern fonts at \magstephalf
-\let\mainmagstep=\magstephalf
-
-% Set the font macro #1 to the font named #2, adding on the
-% specified font prefix (normally `cm').
-\def\setfont#1#2{\font#1=\fontprefix#2}
-
-% Use cm as the default font prefix.
-% To specify the font prefix, you must define \fontprefix
-% before you read in texinfo.tex.
-\ifx\fontprefix\undefined
-\def\fontprefix{cm}
-\fi
-
-\ifx\bigger\relax
-\let\mainmagstep=\magstep1
-\setfont\textrm{r12}
-\setfont\texttt{tt12}
-\else
-\setfont\textrm{r10 scaled \mainmagstep}
-\setfont\texttt{tt10 scaled \mainmagstep}
-\fi
-% Instead of cmb10, you many want to use cmbx10.
-% cmbx10 is a prettier font on its own, but cmb10
-% looks better when embedded in a line with cmr10.
-\setfont\textbf{b10 scaled \mainmagstep}
-\setfont\textit{ti10 scaled \mainmagstep}
-\setfont\textsl{sl10 scaled \mainmagstep}
-\setfont\textsf{ss10 scaled \mainmagstep}
-\setfont\textsc{csc10 scaled \mainmagstep}
-\font\texti=cmmi10 scaled \mainmagstep
-\font\textsy=cmsy10 scaled \mainmagstep
-
-% A few fonts for @defun, etc.
-\setfont\defbf{bx10 scaled \magstep1} %was 1314
-\setfont\deftt{tt10 scaled \magstep1}
-\def\df{\let\tentt=\deftt \let\tenbf = \defbf \bf}
-
-% Fonts for indices and small examples.
-% We actually use the slanted font rather than the italic,
-% because texinfo normally uses the slanted fonts for that.
-% Do not make many font distinctions in general in the index, since they
-% aren't very useful.
-\setfont\ninett{tt9}
-\setfont\indrm{r9}
-\setfont\indit{sl9}
-\let\indsl=\indit
-\let\indtt=\ninett
-\let\indsf=\indrm
-\let\indbf=\indrm
-\setfont\indsc{csc10 at 9pt}
-\font\indi=cmmi9
-\font\indsy=cmsy9
-
-% Fonts for headings
-\setfont\chaprm{bx12 scaled \magstep2}
-\setfont\chapit{ti12 scaled \magstep2}
-\setfont\chapsl{sl12 scaled \magstep2}
-\setfont\chaptt{tt12 scaled \magstep2}
-\setfont\chapsf{ss12 scaled \magstep2}
-\let\chapbf=\chaprm
-\setfont\chapsc{csc10 scaled\magstep3}
-\font\chapi=cmmi12 scaled \magstep2
-\font\chapsy=cmsy10 scaled \magstep3
-
-\setfont\secrm{bx12 scaled \magstep1}
-\setfont\secit{ti12 scaled \magstep1}
-\setfont\secsl{sl12 scaled \magstep1}
-\setfont\sectt{tt12 scaled \magstep1}
-\setfont\secsf{ss12 scaled \magstep1}
-\setfont\secbf{bx12 scaled \magstep1}
-\setfont\secsc{csc10 scaled\magstep2}
-\font\seci=cmmi12 scaled \magstep1
-\font\secsy=cmsy10 scaled \magstep2
-
-% \setfont\ssecrm{bx10 scaled \magstep1} % This size an font looked bad.
-% \setfont\ssecit{cmti10 scaled \magstep1} % The letters were too crowded.
-% \setfont\ssecsl{sl10 scaled \magstep1}
-% \setfont\ssectt{tt10 scaled \magstep1}
-% \setfont\ssecsf{ss10 scaled \magstep1}
-
-%\setfont\ssecrm{b10 scaled 1315} % Note the use of cmb rather than cmbx.
-%\setfont\ssecit{ti10 scaled 1315} % Also, the size is a little larger than
-%\setfont\ssecsl{sl10 scaled 1315} % being scaled magstep1.
-%\setfont\ssectt{tt10 scaled 1315}
-%\setfont\ssecsf{ss10 scaled 1315}
-
-%\let\ssecbf=\ssecrm
-
-\setfont\ssecrm{bx12 scaled \magstephalf}
-\setfont\ssecit{ti12 scaled \magstephalf}
-\setfont\ssecsl{sl12 scaled \magstephalf}
-\setfont\ssectt{tt12 scaled \magstephalf}
-\setfont\ssecsf{ss12 scaled \magstephalf}
-\setfont\ssecbf{bx12 scaled \magstephalf}
-\setfont\ssecsc{csc10 scaled \magstep1}
-\font\sseci=cmmi12 scaled \magstephalf
-\font\ssecsy=cmsy10 scaled \magstep1
-% The smallcaps and symbol fonts should actually be scaled \magstep1.5,
-% but that is not a standard magnification.
-
-% Fonts for title page:
-\setfont\titlerm{bx12 scaled \magstep3}
-\let\authorrm = \secrm
-
-% In order for the font changes to affect most math symbols and letters,
-% we have to define the \textfont of the standard families. Since
-% texinfo doesn't allow for producing subscripts and superscripts, we
-% don't bother to reset \scriptfont and \scriptscriptfont (which would
-% also require loading a lot more fonts).
-%
-\def\resetmathfonts{%
- \textfont0 = \tenrm \textfont1 = \teni \textfont2 = \tensy
- \textfont\itfam = \tenit \textfont\slfam = \tensl \textfont\bffam = \tenbf
- \textfont\ttfam = \tentt \textfont\sffam = \tensf
-}
-
-
-% The font-changing commands redefine the meanings of \tenSTYLE, instead
-% of just \STYLE. We do this so that font changes will continue to work
-% in math mode, where it is the current \fam that is relevant in most
-% cases, not the current. Plain TeX does, for example,
-% \def\bf{\fam=\bffam \tenbf} By redefining \tenbf, we obviate the need
-% to redefine \bf itself.
-\def\textfonts{%
- \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl
- \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc
- \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy
- \resetmathfonts}
-\def\chapfonts{%
- \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl
- \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc
- \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy
- \resetmathfonts}
-\def\secfonts{%
- \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl
- \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc
- \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy
- \resetmathfonts}
-\def\subsecfonts{%
- \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl
- \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc
- \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy
- \resetmathfonts}
-\def\indexfonts{%
- \let\tenrm=\indrm \let\tenit=\indit \let\tensl=\indsl
- \let\tenbf=\indbf \let\tentt=\indtt \let\smallcaps=\indsc
- \let\tensf=\indsf \let\teni=\indi \let\tensy=\indsy
- \resetmathfonts}
-
-% Set up the default fonts, so we can use them for creating boxes.
-%
-\textfonts
-
-% Count depth in font-changes, for error checks
-\newcount\fontdepth \fontdepth=0
-
-% Fonts for short table of contents.
-\setfont\shortcontrm{r12}
-\setfont\shortcontbf{bx12}
-\setfont\shortcontsl{sl12}
-
-%% Add scribe-like font environments, plus @l for inline lisp (usually sans
-%% serif) and @ii for TeX italic
-
-% \smartitalic{ARG} outputs arg in italics, followed by an italic correction
-% unless the following character is such as not to need one.
-\def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else\/\fi\fi\fi}
-\def\smartitalic#1{{\sl #1}\futurelet\next\smartitalicx}
-
-\let\i=\smartitalic
-\let\var=\smartitalic
-\let\dfn=\smartitalic
-\let\emph=\smartitalic
-\let\cite=\smartitalic
-
-\def\b#1{{\bf #1}}
-\let\strong=\b
-
-% We can't just use \exhyphenpenalty, because that only has effect at
-% the end of a paragraph. Restore normal hyphenation at the end of the
-% group within which \nohyphenation is presumably called.
-%
-\def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation}
-\def\restorehyphenation{\hyphenchar\font = `- }
-
-\def\t#1{%
- {\tt \rawbackslash \frenchspacing #1}%
- \null
-}
-\let\ttfont=\t
-\def\samp #1{`\tclose{#1}'\null}
-\def\key #1{{\tt \nohyphenation \uppercase{#1}}\null}
-\def\ctrl #1{{\tt \rawbackslash \hat}#1}
-
-\let\file=\samp
-
-% @code is a modification of @t,
-% which makes spaces the same size as normal in the surrounding text.
-\def\tclose#1{%
- {%
- % Change normal interword space to be same as for the current font.
- \spaceskip = \fontdimen2\font
- %
- % Switch to typewriter.
- \tt
- %
- % But `\ ' produces the large typewriter interword space.
- \def\ {{\spaceskip = 0pt{} }}%
- %
- % Turn off hyphenation.
- \nohyphenation
- %
- \rawbackslash
- \frenchspacing
- #1%
- }%
- \null
-}
-
-% We *must* turn on hyphenation at `-' and `_' in \code.
-% Otherwise, it is too hard to avoid overful hboxes
-% in the Emacs manual, the Library manual, etc.
-
-% Unfortunately, TeX uses one parameter (\hyphenchar) to control
-% both hyphenation at - and hyphenation within words.
-% We must therefore turn them both off (\tclose does that)
-% and arrange explicitly to hyphenate an a dash.
-% -- rms.
-{
-\catcode`\-=\active
-\catcode`\_=\active
-\global\def\code{\begingroup \catcode`\-=\active \let-\codedash \catcode`\_=\active \let_\codeunder \codex}
-% The following is used by \doprintindex to insure that long function names
-% wrap around. It is necessary for - and _ to be active before the index is
-% read from the file, as \entry parses the arguments long before \code is
-% ever called. -- mycroft
-\global\def\indexbreaks{\catcode`\-=\active \let-\realdash \catcode`\_=\active \let_\realunder}
-}
-
-\def\realdash{-}
-\def\realunder{_}
-\def\codedash{-\discretionary{}{}{}}
-\def\codeunder{\normalunderscore\discretionary{}{}{}}
-\def\codex #1{\tclose{#1}\endgroup}
-
-%\let\exp=\tclose %Was temporary
-
-% @kbd is like @code, except that if the argument is just one @key command,
-% then @kbd has no effect.
-
-\def\xkey{\key}
-\def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}%
-\ifx\one\xkey\ifx\threex\three \key{#2}%
-\else\tclose{\look}\fi
-\else\tclose{\look}\fi}
-
-% Typeset a dimension, e.g., `in' or `pt'. The only reason for the
-% argument is to make the input look right: @dmn{pt} instead of
-% @dmn{}pt.
-%
-\def\dmn#1{\thinspace #1}
-
-\def\kbd#1{\def\look{#1}\expandafter\kbdfoo\look??\par}
-
-\def\l#1{{\li #1}\null} %
-
-\def\r#1{{\rm #1}} % roman font
-% Use of \lowercase was suggested.
-\def\sc#1{{\smallcaps#1}} % smallcaps font
-\def\ii#1{{\it #1}} % italic font
-
-\message{page headings,}
-
-\newskip\titlepagetopglue \titlepagetopglue = 1.5in
-\newskip\titlepagebottomglue \titlepagebottomglue = 2pc
-
-% First the title page. Must do @settitle before @titlepage.
-\def\titlefont#1{{\titlerm #1}}
-
-\newif\ifseenauthor
-\newif\iffinishedtitlepage
-
-\def\shorttitlepage{\parsearg\shorttitlepagezzz}
-\def\shorttitlepagezzz #1{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}%
- \endgroup\page\hbox{}\page}
-
-\def\titlepage{\begingroup \parindent=0pt \textfonts
- \let\subtitlerm=\tenrm
-% I deinstalled the following change because \cmr12 is undefined.
-% This change was not in the ChangeLog anyway. --rms.
-% \let\subtitlerm=\cmr12
- \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}%
- %
- \def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines}%
- %
- % Leave some space at the very top of the page.
- \vglue\titlepagetopglue
- %
- % Now you can print the title using @title.
- \def\title{\parsearg\titlezzz}%
- \def\titlezzz##1{\leftline{\titlefont{##1}}
- % print a rule at the page bottom also.
- \finishedtitlepagefalse
- \vskip4pt \hrule height 4pt width \hsize \vskip4pt}%
- % No rule at page bottom unless we print one at the top with @title.
- \finishedtitlepagetrue
- %
- % Now you can put text using @subtitle.
- \def\subtitle{\parsearg\subtitlezzz}%
- \def\subtitlezzz##1{{\subtitlefont \rightline{##1}}}%
- %
- % @author should come last, but may come many times.
- \def\author{\parsearg\authorzzz}%
- \def\authorzzz##1{\ifseenauthor\else\vskip 0pt plus 1filll\seenauthortrue\fi
- {\authorfont \leftline{##1}}}%
- %
- % Most title ``pages'' are actually two pages long, with space
- % at the top of the second. We don't want the ragged left on the second.
- \let\oldpage = \page
- \def\page{%
- \iffinishedtitlepage\else
- \finishtitlepage
- \fi
- \oldpage
- \let\page = \oldpage
- \hbox{}}%
-% \def\page{\oldpage \hbox{}}
-}
-
-\def\Etitlepage{%
- \iffinishedtitlepage\else
- \finishtitlepage
- \fi
- % It is important to do the page break before ending the group,
- % because the headline and footline are only empty inside the group.
- % If we use the new definition of \page, we always get a blank page
- % after the title page, which we certainly don't want.
- \oldpage
- \endgroup
- \HEADINGSon
-}
-
-\def\finishtitlepage{%
- \vskip4pt \hrule height 2pt width \hsize
- \vskip\titlepagebottomglue
- \finishedtitlepagetrue
-}
-
-%%% Set up page headings and footings.
-
-\let\thispage=\folio
-
-\newtoks \evenheadline % Token sequence for heading line of even pages
-\newtoks \oddheadline % Token sequence for heading line of odd pages
-\newtoks \evenfootline % Token sequence for footing line of even pages
-\newtoks \oddfootline % Token sequence for footing line of odd pages
-
-% Now make Tex use those variables
-\headline={{\textfonts\rm \ifodd\pageno \the\oddheadline
- \else \the\evenheadline \fi}}
-\footline={{\textfonts\rm \ifodd\pageno \the\oddfootline
- \else \the\evenfootline \fi}\HEADINGShook}
-\let\HEADINGShook=\relax
-
-% Commands to set those variables.
-% For example, this is what @headings on does
-% @evenheading @thistitle|@thispage|@thischapter
-% @oddheading @thischapter|@thispage|@thistitle
-% @evenfooting @thisfile||
-% @oddfooting ||@thisfile
-
-\def\evenheading{\parsearg\evenheadingxxx}
-\def\oddheading{\parsearg\oddheadingxxx}
-\def\everyheading{\parsearg\everyheadingxxx}
-
-\def\evenfooting{\parsearg\evenfootingxxx}
-\def\oddfooting{\parsearg\oddfootingxxx}
-\def\everyfooting{\parsearg\everyfootingxxx}
-
-{\catcode`\@=0 %
-
-\gdef\evenheadingxxx #1{\evenheadingyyy #1@|@|@|@|\finish}
-\gdef\evenheadingyyy #1@|#2@|#3@|#4\finish{%
-\global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
-
-\gdef\oddheadingxxx #1{\oddheadingyyy #1@|@|@|@|\finish}
-\gdef\oddheadingyyy #1@|#2@|#3@|#4\finish{%
-\global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
-
-\gdef\everyheadingxxx #1{\everyheadingyyy #1@|@|@|@|\finish}
-\gdef\everyheadingyyy #1@|#2@|#3@|#4\finish{%
-\global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}
-\global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
-
-\gdef\evenfootingxxx #1{\evenfootingyyy #1@|@|@|@|\finish}
-\gdef\evenfootingyyy #1@|#2@|#3@|#4\finish{%
-\global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
-
-\gdef\oddfootingxxx #1{\oddfootingyyy #1@|@|@|@|\finish}
-\gdef\oddfootingyyy #1@|#2@|#3@|#4\finish{%
-\global\oddfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
-
-\gdef\everyfootingxxx #1{\everyfootingyyy #1@|@|@|@|\finish}
-\gdef\everyfootingyyy #1@|#2@|#3@|#4\finish{%
-\global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}
-\global\oddfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
-%
-}% unbind the catcode of @.
-
-% @headings double turns headings on for double-sided printing.
-% @headings single turns headings on for single-sided printing.
-% @headings off turns them off.
-% @headings on same as @headings double, retained for compatibility.
-% @headings after turns on double-sided headings after this page.
-% @headings doubleafter turns on double-sided headings after this page.
-% @headings singleafter turns on single-sided headings after this page.
-% By default, they are off.
-
-\def\headings #1 {\csname HEADINGS#1\endcsname}
-
-\def\HEADINGSoff{
-\global\evenheadline={\hfil} \global\evenfootline={\hfil}
-\global\oddheadline={\hfil} \global\oddfootline={\hfil}}
-\HEADINGSoff
-% When we turn headings on, set the page number to 1.
-% For double-sided printing, put current file name in lower left corner,
-% chapter name on inside top of right hand pages, document
-% title on inside top of left hand pages, and page numbers on outside top
-% edge of all pages.
-\def\HEADINGSdouble{
-%\pagealignmacro
-\global\pageno=1
-\global\evenfootline={\hfil}
-\global\oddfootline={\hfil}
-\global\evenheadline={\line{\folio\hfil\thistitle}}
-\global\oddheadline={\line{\thischapter\hfil\folio}}
-}
-% For single-sided printing, chapter title goes across top left of page,
-% page number on top right.
-\def\HEADINGSsingle{
-%\pagealignmacro
-\global\pageno=1
-\global\evenfootline={\hfil}
-\global\oddfootline={\hfil}
-\global\evenheadline={\line{\thischapter\hfil\folio}}
-\global\oddheadline={\line{\thischapter\hfil\folio}}
-}
-\def\HEADINGSon{\HEADINGSdouble}
-
-\def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex}
-\let\HEADINGSdoubleafter=\HEADINGSafter
-\def\HEADINGSdoublex{%
-\global\evenfootline={\hfil}
-\global\oddfootline={\hfil}
-\global\evenheadline={\line{\folio\hfil\thistitle}}
-\global\oddheadline={\line{\thischapter\hfil\folio}}
-}
-
-\def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex}
-\def\HEADINGSsinglex{%
-\global\evenfootline={\hfil}
-\global\oddfootline={\hfil}
-\global\evenheadline={\line{\thischapter\hfil\folio}}
-\global\oddheadline={\line{\thischapter\hfil\folio}}
-}
-
-% Subroutines used in generating headings
-% Produces Day Month Year style of output.
-\def\today{\number\day\space
-\ifcase\month\or
-January\or February\or March\or April\or May\or June\or
-July\or August\or September\or October\or November\or December\fi
-\space\number\year}
-
-% Use this if you want the Month Day, Year style of output.
-%\def\today{\ifcase\month\or
-%January\or February\or March\or April\or May\or June\or
-%July\or August\or September\or October\or November\or December\fi
-%\space\number\day, \number\year}
-
-% @settitle line... specifies the title of the document, for headings
-% It generates no output of its own
-
-\def\thistitle{No Title}
-\def\settitle{\parsearg\settitlezzz}
-\def\settitlezzz #1{\gdef\thistitle{#1}}
-
-\message{tables,}
-
-% @tabs -- simple alignment
-
-% These don't work. For one thing, \+ is defined as outer.
-% So these macros cannot even be defined.
-
-%\def\tabs{\parsearg\tabszzz}
-%\def\tabszzz #1{\settabs\+#1\cr}
-%\def\tabline{\parsearg\tablinezzz}
-%\def\tablinezzz #1{\+#1\cr}
-%\def\&{&}
-
-% Tables -- @table, @ftable, @vtable, @item(x), @kitem(x), @xitem(x).
-
-% default indentation of table text
-\newdimen\tableindent \tableindent=.8in
-% default indentation of @itemize and @enumerate text
-\newdimen\itemindent \itemindent=.3in
-% margin between end of table item and start of table text.
-\newdimen\itemmargin \itemmargin=.1in
-
-% used internally for \itemindent minus \itemmargin
-\newdimen\itemmax
-
-% Note @table, @vtable, and @vtable define @item, @itemx, etc., with
-% these defs.
-% They also define \itemindex
-% to index the item name in whatever manner is desired (perhaps none).
-
-\newif\ifitemxneedsnegativevskip
-
-\def\itemxpar{\par\ifitemxneedsnegativevskip\vskip-\parskip\nobreak\fi}
-
-\def\internalBitem{\smallbreak \parsearg\itemzzz}
-\def\internalBitemx{\itemxpar \parsearg\itemzzz}
-
-\def\internalBxitem "#1"{\def\xitemsubtopix{#1} \smallbreak \parsearg\xitemzzz}
-\def\internalBxitemx "#1"{\def\xitemsubtopix{#1} \itemxpar \parsearg\xitemzzz}
-
-\def\internalBkitem{\smallbreak \parsearg\kitemzzz}
-\def\internalBkitemx{\itemxpar \parsearg\kitemzzz}
-
-\def\kitemzzz #1{\dosubind {kw}{\code{#1}}{for {\bf \lastfunction}}%
- \itemzzz {#1}}
-
-\def\xitemzzz #1{\dosubind {kw}{\code{#1}}{for {\bf \xitemsubtopic}}%
- \itemzzz {#1}}
-
-\def\itemzzz #1{\begingroup %
- \advance\hsize by -\rightskip
- \advance\hsize by -\tableindent
- \setbox0=\hbox{\itemfont{#1}}%
- \itemindex{#1}%
- \nobreak % This prevents a break before @itemx.
- %
- % Be sure we are not still in the middle of a paragraph.
- %{\parskip = 0in
- %\par
- %}%
- %
- % If the item text does not fit in the space we have, put it on a line
- % by itself, and do not allow a page break either before or after that
- % line. We do not start a paragraph here because then if the next
- % command is, e.g., @kindex, the whatsit would get put into the
- % horizontal list on a line by itself, resulting in extra blank space.
- \ifdim \wd0>\itemmax
- %
- % Make this a paragraph so we get the \parskip glue and wrapping,
- % but leave it ragged-right.
- \begingroup
- \advance\leftskip by-\tableindent
- \advance\hsize by\tableindent
- \advance\rightskip by0pt plus1fil
- \leavevmode\unhbox0\par
- \endgroup
- %
- % We're going to be starting a paragraph, but we don't want the
- % \parskip glue -- logically it's part of the @item we just started.
- \nobreak \vskip-\parskip
- %
- % Stop a page break at the \parskip glue coming up. Unfortunately
- % we can't prevent a possible page break at the following
- % \baselineskip glue.
- \nobreak
- \endgroup
- \itemxneedsnegativevskipfalse
- \else
- % The item text fits into the space. Start a paragraph, so that the
- % following text (if any) will end up on the same line. Since that
- % text will be indented by \tableindent, we make the item text be in
- % a zero-width box.
- \noindent
- \rlap{\hskip -\tableindent\box0}\ignorespaces%
- \endgroup%
- \itemxneedsnegativevskiptrue%
- \fi
-}
-
-\def\item{\errmessage{@item while not in a table}}
-\def\itemx{\errmessage{@itemx while not in a table}}
-\def\kitem{\errmessage{@kitem while not in a table}}
-\def\kitemx{\errmessage{@kitemx while not in a table}}
-\def\xitem{\errmessage{@xitem while not in a table}}
-\def\xitemx{\errmessage{@xitemx while not in a table}}
-
-%% Contains a kludge to get @end[description] to work
-\def\description{\tablez{\dontindex}{1}{}{}{}{}}
-
-\def\table{\begingroup\inENV\obeylines\obeyspaces\tablex}
-{\obeylines\obeyspaces%
-\gdef\tablex #1^^M{%
-\tabley\dontindex#1 \endtabley}}
-
-\def\ftable{\begingroup\inENV\obeylines\obeyspaces\ftablex}
-{\obeylines\obeyspaces%
-\gdef\ftablex #1^^M{%
-\tabley\fnitemindex#1 \endtabley
-\def\Eftable{\endgraf\afterenvbreak\endgroup}%
-\let\Etable=\relax}}
-
-\def\vtable{\begingroup\inENV\obeylines\obeyspaces\vtablex}
-{\obeylines\obeyspaces%
-\gdef\vtablex #1^^M{%
-\tabley\vritemindex#1 \endtabley
-\def\Evtable{\endgraf\afterenvbreak\endgroup}%
-\let\Etable=\relax}}
-
-\def\dontindex #1{}
-\def\fnitemindex #1{\doind {fn}{\code{#1}}}%
-\def\vritemindex #1{\doind {vr}{\code{#1}}}%
-
-{\obeyspaces %
-\gdef\tabley#1#2 #3 #4 #5 #6 #7\endtabley{\endgroup%
-\tablez{#1}{#2}{#3}{#4}{#5}{#6}}}
-
-\def\tablez #1#2#3#4#5#6{%
-\aboveenvbreak %
-\begingroup %
-\def\Edescription{\Etable}% Necessary kludge.
-\let\itemindex=#1%
-\ifnum 0#3>0 \advance \leftskip by #3\mil \fi %
-\ifnum 0#4>0 \tableindent=#4\mil \fi %
-\ifnum 0#5>0 \advance \rightskip by #5\mil \fi %
-\def\itemfont{#2}%
-\itemmax=\tableindent %
-\advance \itemmax by -\itemmargin %
-\advance \leftskip by \tableindent %
-\exdentamount=\tableindent
-\parindent = 0pt
-\parskip = \smallskipamount
-\ifdim \parskip=0pt \parskip=2pt \fi%
-\def\Etable{\endgraf\afterenvbreak\endgroup}%
-\let\item = \internalBitem %
-\let\itemx = \internalBitemx %
-\let\kitem = \internalBkitem %
-\let\kitemx = \internalBkitemx %
-\let\xitem = \internalBxitem %
-\let\xitemx = \internalBxitemx %
-}
-
-% This is the counter used by @enumerate, which is really @itemize
-
-\newcount \itemno
-
-\def\itemize{\parsearg\itemizezzz}
-
-\def\itemizezzz #1{%
- \begingroup % ended by the @end itemsize
- \itemizey {#1}{\Eitemize}
-}
-
-\def\itemizey #1#2{%
-\aboveenvbreak %
-\itemmax=\itemindent %
-\advance \itemmax by -\itemmargin %
-\advance \leftskip by \itemindent %
-\exdentamount=\itemindent
-\parindent = 0pt %
-\parskip = \smallskipamount %
-\ifdim \parskip=0pt \parskip=2pt \fi%
-\def#2{\endgraf\afterenvbreak\endgroup}%
-\def\itemcontents{#1}%
-\let\item=\itemizeitem}
-
-% Set sfcode to normal for the chars that usually have another value.
-% These are `.?!:;,'
-\def\frenchspacing{\sfcode46=1000 \sfcode63=1000 \sfcode33=1000
- \sfcode58=1000 \sfcode59=1000 \sfcode44=1000 }
-
-% \splitoff TOKENS\endmark defines \first to be the first token in
-% TOKENS, and \rest to be the remainder.
-%
-\def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}%
-
-% Allow an optional argument of an uppercase letter, lowercase letter,
-% or number, to specify the first label in the enumerated list. No
-% argument is the same as `1'.
-%
-\def\enumerate{\parsearg\enumeratezzz}
-\def\enumeratezzz #1{\enumeratey #1 \endenumeratey}
-\def\enumeratey #1 #2\endenumeratey{%
- \begingroup % ended by the @end enumerate
- %
- % If we were given no argument, pretend we were given `1'.
- \def\thearg{#1}%
- \ifx\thearg\empty \def\thearg{1}\fi
- %
- % Detect if the argument is a single token. If so, it might be a
- % letter. Otherwise, the only valid thing it can be is a number.
- % (We will always have one token, because of the test we just made.
- % This is a good thing, since \splitoff doesn't work given nothing at
- % all -- the first parameter is undelimited.)
- \expandafter\splitoff\thearg\endmark
- \ifx\rest\empty
- % Only one token in the argument. It could still be anything.
- % A ``lowercase letter'' is one whose \lccode is nonzero.
- % An ``uppercase letter'' is one whose \lccode is both nonzero, and
- % not equal to itself.
- % Otherwise, we assume it's a number.
- %
- % We need the \relax at the end of the \ifnum lines to stop TeX from
- % continuing to look for a <number>.
- %
- \ifnum\lccode\expandafter`\thearg=0\relax
- \numericenumerate % a number (we hope)
- \else
- % It's a letter.
- \ifnum\lccode\expandafter`\thearg=\expandafter`\thearg\relax
- \lowercaseenumerate % lowercase letter
- \else
- \uppercaseenumerate % uppercase letter
- \fi
- \fi
- \else
- % Multiple tokens in the argument. We hope it's a number.
- \numericenumerate
- \fi
-}
-
-% An @enumerate whose labels are integers. The starting integer is
-% given in \thearg.
-%
-\def\numericenumerate{%
- \itemno = \thearg
- \startenumeration{\the\itemno}%
-}
-
-% The starting (lowercase) letter is in \thearg.
-\def\lowercaseenumerate{%
- \itemno = \expandafter`\thearg
- \startenumeration{%
- % Be sure we're not beyond the end of the alphabet.
- \ifnum\itemno=0
- \errmessage{No more lowercase letters in @enumerate; get a bigger
- alphabet}%
- \fi
- \char\lccode\itemno
- }%
-}
-
-% The starting (uppercase) letter is in \thearg.
-\def\uppercaseenumerate{%
- \itemno = \expandafter`\thearg
- \startenumeration{%
- % Be sure we're not beyond the end of the alphabet.
- \ifnum\itemno=0
- \errmessage{No more uppercase letters in @enumerate; get a bigger
- alphabet}
- \fi
- \char\uccode\itemno
- }%
-}
-
-% Call itemizey, adding a period to the first argument and supplying the
-% common last two arguments. Also subtract one from the initial value in
-% \itemno, since @item increments \itemno.
-%
-\def\startenumeration#1{%
- \advance\itemno by -1
- \itemizey{#1.}\Eenumerate\flushcr
-}
-
-% @alphaenumerate and @capsenumerate are abbreviations for giving an arg
-% to @enumerate.
-%
-\def\alphaenumerate{\enumerate{a}}
-\def\capsenumerate{\enumerate{A}}
-\def\Ealphaenumerate{\Eenumerate}
-\def\Ecapsenumerate{\Eenumerate}
-
-% Definition of @item while inside @itemize.
-
-\def\itemizeitem{%
-\advance\itemno by 1
-{\let\par=\endgraf \smallbreak}%
-\ifhmode \errmessage{\in hmode at itemizeitem}\fi
-{\parskip=0in \hskip 0pt
-\hbox to 0pt{\hss \itemcontents\hskip \itemmargin}%
-\vadjust{\penalty 1200}}%
-\flushcr}
-
-% @multitable macros
-% Amy Hendrickson, 8/18/94
-%
-% @multitable ... @endmultitable will make as many columns as desired.
-% Contents of each column will wrap at width given in preamble. Width
-% can be specified either with sample text given in a template line,
-% or in percent of \hsize, the current width of text on page.
-
-% Table can continue over pages but will only break between lines.
-
-% To make preamble:
-%
-% Either define widths of columns in terms of percent of \hsize:
-% @multitable @percentofhsize .2 .3 .5
-% @item ...
-%
-% Numbers following @percentofhsize are the percent of the total
-% current hsize to be used for each column. You may use as many
-% columns as desired.
-
-% Or use a template:
-% @multitable {Column 1 template} {Column 2 template} {Column 3 template}
-% @item ...
-% using the widest term desired in each column.
-
-
-% Each new table line starts with @item, each subsequent new column
-% starts with @tab. Empty columns may be produced by supplying @tab's
-% with nothing between them for as many times as empty columns are needed,
-% ie, @tab@tab@tab will produce two empty columns.
-
-% @item, @tab, @multicolumn or @endmulticolumn do not need to be on their
-% own lines, but it will not hurt if they are.
-
-% Sample multitable:
-
-% @multitable {Column 1 template} {Column 2 template} {Column 3 template}
-% @item first col stuff @tab second col stuff @tab third col
-% @item
-% first col stuff
-% @tab
-% second col stuff
-% @tab
-% third col
-% @item first col stuff @tab second col stuff
-% @tab Many paragraphs of text may be used in any column.
-%
-% They will wrap at the width determined by the template.
-% @item@tab@tab This will be in third column.
-% @endmultitable
-
-% Default dimensions may be reset by user.
-% @intableparskip will set vertical space between paragraphs in table.
-% @intableparindent will set paragraph indent in table.
-% @spacebetweencols will set horizontal space to be left between columns.
-% @spacebetweenlines will set vertical space to be left between lines.
-
-%%%%
-% Dimensions
-
-\newdimen\intableparskip
-\newdimen\intableparindent
-\newdimen\spacebetweencols
-\newdimen\spacebetweenlines
-\intableparskip=0pt
-\intableparindent=6pt
-\spacebetweencols=12pt
-\spacebetweenlines=12pt
-
-%%%%
-% Macros used to set up halign preamble:
-\let\endsetuptable\relax
-\def\xendsetuptable{\endsetuptable}
-\let\percentofhsize\relax
-\def\xpercentofhsize{\percentofhsize}
-\newif\ifsetpercent
-
-\newcount\colcount
-\def\setuptable#1{\def\firstarg{#1}%
-\ifx\firstarg\xendsetuptable\let\go\relax%
-\else
- \ifx\firstarg\xpercentofhsize\global\setpercenttrue%
- \else
- \ifsetpercent
- \if#1.\else%
- \global\advance\colcount by1 %
- \expandafter\xdef\csname col\the\colcount\endcsname{.#1\hsize}%
- \fi
- \else
- \global\advance\colcount by1
- \setbox0=\hbox{#1}%
- \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}%
- \fi%
- \fi%
- \let\go\setuptable%
-\fi\go}
-%%%%
-% multitable syntax
-\def\tab{&}
-
-%%%%
-% @multitable ... @endmultitable definitions:
-
-\def\multitable#1\item{\bgroup
-\let\item\cr
-\tolerance=9500
-\hbadness=9500
-\parskip=\intableparskip
-\parindent=\intableparindent
-\overfullrule=0pt
-\global\colcount=0\relax%
-\def\Emultitable{\global\setpercentfalse\global\everycr{}\cr\egroup\egroup}%
- % To parse everything between @multitable and @item :
-\def\one{#1}\expandafter\setuptable\one\endsetuptable
- % Need to reset this to 0 after \setuptable.
-\global\colcount=0\relax%
- %
- % This preamble sets up a generic column definition, which will
- % be used as many times as user calls for columns.
- % \vtop will set a single line and will also let text wrap and
- % continue for many paragraphs if desired.
-\halign\bgroup&\global\advance\colcount by 1\relax%
-\vtop{\hsize=\expandafter\csname col\the\colcount\endcsname
- % In order to keep entries from bumping into each other
- % we will add a \leftskip of \spacebetweencols to all columns after
- % the first one.
- % If a template has been used, we will add \spacebetweencols
- % to the width of each template entry.
- % If user has set preamble in terms of percent of \hsize
- % we will use that dimension as the width of the column, and
- % the \leftskip will keep entries from bumping into each other.
- % Table will start at left margin and final column will justify at
- % right margin.
-\ifnum\colcount=1
-\else
- \ifsetpercent
- \else
- % If user has <not> set preamble in terms of percent of \hsize
- % we will advance \hsize by \spacebetweencols
- \advance\hsize by \spacebetweencols
- \fi
- % In either case we will make \leftskip=\spacebetweencols:
-\leftskip=\spacebetweencols
-\fi
-\noindent##}\cr%
- % \everycr will reset column counter, \colcount, at the end of
- % each line. Every column entry will cause \colcount to advance by one.
- % The table preamble
- % looks at the current \colcount to find the correct column width.
-\global\everycr{\noalign{\nointerlineskip\vskip\spacebetweenlines
-\filbreak%% keeps underfull box messages off when table breaks over pages.
-\global\colcount=0\relax}}}
-
-\message{indexing,}
-% Index generation facilities
-
-% Define \newwrite to be identical to plain tex's \newwrite
-% except not \outer, so it can be used within \newindex.
-{\catcode`\@=11
-\gdef\newwrite{\alloc@7\write\chardef\sixt@@n}}
-
-% \newindex {foo} defines an index named foo.
-% It automatically defines \fooindex such that
-% \fooindex ...rest of line... puts an entry in the index foo.
-% It also defines \fooindfile to be the number of the output channel for
-% the file that accumulates this index. The file's extension is foo.
-% The name of an index should be no more than 2 characters long
-% for the sake of vms.
-
-\def\newindex #1{
-\expandafter\newwrite \csname#1indfile\endcsname% Define number for output file
-\openout \csname#1indfile\endcsname \jobname.#1 % Open the file
-\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex
-\noexpand\doindex {#1}}
-}
-
-% @defindex foo == \newindex{foo}
-
-\def\defindex{\parsearg\newindex}
-
-% Define @defcodeindex, like @defindex except put all entries in @code.
-
-\def\newcodeindex #1{
-\expandafter\newwrite \csname#1indfile\endcsname% Define number for output file
-\openout \csname#1indfile\endcsname \jobname.#1 % Open the file
-\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex
-\noexpand\docodeindex {#1}}
-}
-
-\def\defcodeindex{\parsearg\newcodeindex}
-
-% @synindex foo bar makes index foo feed into index bar.
-% Do this instead of @defindex foo if you don't want it as a separate index.
-\def\synindex #1 #2 {%
-\expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname
-\expandafter\let\csname#1indfile\endcsname=\synindexfoo
-\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex
-\noexpand\doindex {#2}}%
-}
-
-% @syncodeindex foo bar similar, but put all entries made for index foo
-% inside @code.
-\def\syncodeindex #1 #2 {%
-\expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname
-\expandafter\let\csname#1indfile\endcsname=\synindexfoo
-\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex
-\noexpand\docodeindex {#2}}%
-}
-
-% Define \doindex, the driver for all \fooindex macros.
-% Argument #1 is generated by the calling \fooindex macro,
-% and it is "foo", the name of the index.
-
-% \doindex just uses \parsearg; it calls \doind for the actual work.
-% This is because \doind is more useful to call from other macros.
-
-% There is also \dosubind {index}{topic}{subtopic}
-% which makes an entry in a two-level index such as the operation index.
-
-\def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer}
-\def\singleindexer #1{\doind{\indexname}{#1}}
-
-% like the previous two, but they put @code around the argument.
-\def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer}
-\def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}}
-
-\def\indexdummies{%
-% Take care of the plain tex accent commands.
-\def\"{\realbackslash "}%
-\def\`{\realbackslash `}%
-\def\'{\realbackslash '}%
-\def\^{\realbackslash ^}%
-\def\~{\realbackslash ~}%
-\def\={\realbackslash =}%
-\def\b{\realbackslash b}%
-\def\c{\realbackslash c}%
-\def\d{\realbackslash d}%
-\def\u{\realbackslash u}%
-\def\v{\realbackslash v}%
-\def\H{\realbackslash H}%
-% Take care of the plain tex special European modified letters.
-\def\oe{\realbackslash oe}%
-\def\ae{\realbackslash ae}%
-\def\aa{\realbackslash aa}%
-\def\OE{\realbackslash OE}%
-\def\AE{\realbackslash AE}%
-\def\AA{\realbackslash AA}%
-\def\o{\realbackslash o}%
-\def\O{\realbackslash O}%
-\def\l{\realbackslash l}%
-\def\L{\realbackslash L}%
-\def\ss{\realbackslash ss}%
-% Take care of texinfo commands likely to appear in an index entry.
-\def\_{{\realbackslash _}}%
-\def\w{\realbackslash w }%
-\def\bf{\realbackslash bf }%
-\def\rm{\realbackslash rm }%
-\def\sl{\realbackslash sl }%
-\def\sf{\realbackslash sf}%
-\def\tt{\realbackslash tt}%
-\def\gtr{\realbackslash gtr}%
-\def\less{\realbackslash less}%
-\def\hat{\realbackslash hat}%
-\def\char{\realbackslash char}%
-\def\TeX{\realbackslash TeX}%
-\def\dots{\realbackslash dots }%
-\def\copyright{\realbackslash copyright }%
-\def\tclose##1{\realbackslash tclose {##1}}%
-\def\code##1{\realbackslash code {##1}}%
-\def\samp##1{\realbackslash samp {##1}}%
-\def\t##1{\realbackslash r {##1}}%
-\def\r##1{\realbackslash r {##1}}%
-\def\i##1{\realbackslash i {##1}}%
-\def\b##1{\realbackslash b {##1}}%
-\def\cite##1{\realbackslash cite {##1}}%
-\def\key##1{\realbackslash key {##1}}%
-\def\file##1{\realbackslash file {##1}}%
-\def\var##1{\realbackslash var {##1}}%
-\def\kbd##1{\realbackslash kbd {##1}}%
-\def\dfn##1{\realbackslash dfn {##1}}%
-\def\emph##1{\realbackslash emph {##1}}%
-\unsepspaces
-}
-
-% If an index command is used in an @example environment, any spaces
-% therein should become regular spaces in the raw index file, not the
-% expansion of \tie (\\leavevmode \penalty \@M \ ).
-{\obeyspaces
- \gdef\unsepspaces{\obeyspaces\let =\space}}
-
-% \indexnofonts no-ops all font-change commands.
-% This is used when outputting the strings to sort the index by.
-\def\indexdummyfont#1{#1}
-\def\indexdummytex{TeX}
-\def\indexdummydots{...}
-
-\def\indexnofonts{%
-% Just ignore accents.
-\let\"=\indexdummyfont
-\let\`=\indexdummyfont
-\let\'=\indexdummyfont
-\let\^=\indexdummyfont
-\let\~=\indexdummyfont
-\let\==\indexdummyfont
-\let\b=\indexdummyfont
-\let\c=\indexdummyfont
-\let\d=\indexdummyfont
-\let\u=\indexdummyfont
-\let\v=\indexdummyfont
-\let\H=\indexdummyfont
-% Take care of the plain tex special European modified letters.
-\def\oe{oe}%
-\def\ae{ae}%
-\def\aa{aa}%
-\def\OE{OE}%
-\def\AE{AE}%
-\def\AA{AA}%
-\def\o{o}%
-\def\O{O}%
-\def\l{l}%
-\def\L{L}%
-\def\ss{ss}%
-\let\w=\indexdummyfont
-\let\t=\indexdummyfont
-\let\r=\indexdummyfont
-\let\i=\indexdummyfont
-\let\b=\indexdummyfont
-\let\emph=\indexdummyfont
-\let\strong=\indexdummyfont
-\let\cite=\indexdummyfont
-\let\sc=\indexdummyfont
-%Don't no-op \tt, since it isn't a user-level command
-% and is used in the definitions of the active chars like <, >, |...
-%\let\tt=\indexdummyfont
-\let\tclose=\indexdummyfont
-\let\code=\indexdummyfont
-\let\file=\indexdummyfont
-\let\samp=\indexdummyfont
-\let\kbd=\indexdummyfont
-\let\key=\indexdummyfont
-\let\var=\indexdummyfont
-\let\TeX=\indexdummytex
-\let\dots=\indexdummydots
-}
-
-% To define \realbackslash, we must make \ not be an escape.
-% We must first make another character (@) an escape
-% so we do not become unable to do a definition.
-
-{\catcode`\@=0 \catcode`\\=\other
-@gdef@realbackslash{\}}
-
-\let\indexbackslash=0 %overridden during \printindex.
-
-\let\SETmarginindex=\relax %initialize!
-% workhorse for all \fooindexes
-% #1 is name of index, #2 is stuff to put there
-\def\doind #1#2{%
-% Put the index entry in the margin if desired.
-\ifx\SETmarginindex\relax\else%
-\insert\margin{\hbox{\vrule height8pt depth3pt width0pt #2}}%
-\fi%
-{\count10=\lastpenalty %
-{\indexdummies % Must do this here, since \bf, etc expand at this stage
-\escapechar=`\\%
-{\let\folio=0% Expand all macros now EXCEPT \folio
-\def\rawbackslashxx{\indexbackslash}% \indexbackslash isn't defined now
-% so it will be output as is; and it will print as backslash in the indx.
-%
-% Now process the index-string once, with all font commands turned off,
-% to get the string to sort the index by.
-{\indexnofonts
-\xdef\temp1{#2}%
-}%
-% Now produce the complete index entry. We process the index-string again,
-% this time with font commands expanded, to get what to print in the index.
-\edef\temp{%
-\write \csname#1indfile\endcsname{%
-\realbackslash entry {\temp1}{\folio}{#2}}}%
-\temp }%
-}\penalty\count10}}
-
-\def\dosubind #1#2#3{%
-{\count10=\lastpenalty %
-{\indexdummies % Must do this here, since \bf, etc expand at this stage
-\escapechar=`\\%
-{\let\folio=0%
-\def\rawbackslashxx{\indexbackslash}%
-%
-% Now process the index-string once, with all font commands turned off,
-% to get the string to sort the index by.
-{\indexnofonts
-\xdef\temp1{#2 #3}%
-}%
-% Now produce the complete index entry. We process the index-string again,
-% this time with font commands expanded, to get what to print in the index.
-\edef\temp{%
-\write \csname#1indfile\endcsname{%
-\realbackslash entry {\temp1}{\folio}{#2}{#3}}}%
-\temp }%
-}\penalty\count10}}
-
-% The index entry written in the file actually looks like
-% \entry {sortstring}{page}{topic}
-% or
-% \entry {sortstring}{page}{topic}{subtopic}
-% The texindex program reads in these files and writes files
-% containing these kinds of lines:
-% \initial {c}
-% before the first topic whose initial is c
-% \entry {topic}{pagelist}
-% for a topic that is used without subtopics
-% \primary {topic}
-% for the beginning of a topic that is used with subtopics
-% \secondary {subtopic}{pagelist}
-% for each subtopic.
-
-% Define the user-accessible indexing commands
-% @findex, @vindex, @kindex, @cindex.
-
-\def\findex {\fnindex}
-\def\kindex {\kyindex}
-\def\cindex {\cpindex}
-\def\vindex {\vrindex}
-\def\tindex {\tpindex}
-\def\pindex {\pgindex}
-
-\def\cindexsub {\begingroup\obeylines\cindexsub}
-{\obeylines %
-\gdef\cindexsub "#1" #2^^M{\endgroup %
-\dosubind{cp}{#2}{#1}}}
-
-% Define the macros used in formatting output of the sorted index material.
-
-% This is what you call to cause a particular index to get printed.
-% Write
-% @unnumbered Function Index
-% @printindex fn
-
-\def\printindex{\parsearg\doprintindex}
-
-\def\doprintindex#1{%
- \tex
- \dobreak \chapheadingskip {10000}
- \catcode`\%=\other\catcode`\&=\other\catcode`\#=\other
- \catcode`\$=\other
- \catcode`\~=\other
- \indexbreaks
- %
- % The following don't help, since the chars were translated
- % when the raw index was written, and their fonts were discarded
- % due to \indexnofonts.
- %\catcode`\"=\active
- %\catcode`\^=\active
- %\catcode`\_=\active
- %\catcode`\|=\active
- %\catcode`\<=\active
- %\catcode`\>=\active
- % %
- \def\indexbackslash{\rawbackslashxx}
- \indexfonts\rm \tolerance=9500 \advance\baselineskip -1pt
- \begindoublecolumns
- %
- % See if the index file exists and is nonempty.
- \openin 1 \jobname.#1s
- \ifeof 1
- % \enddoublecolumns gets confused if there is no text in the index,
- % and it loses the chapter title and the aux file entries for the
- % index. The easiest way to prevent this problem is to make sure
- % there is some text.
- (Index is nonexistent)
- \else
- %
- % If the index file exists but is empty, then \openin leaves \ifeof
- % false. We have to make TeX try to read something from the file, so
- % it can discover if there is anything in it.
- \read 1 to \temp
- \ifeof 1
- (Index is empty)
- \else
- \input \jobname.#1s
- \fi
- \fi
- \closein 1
- \enddoublecolumns
- \Etex
-}
-
-% These macros are used by the sorted index file itself.
-% Change them to control the appearance of the index.
-
-% Same as \bigskipamount except no shrink.
-% \balancecolumns gets confused if there is any shrink.
-\newskip\initialskipamount \initialskipamount 12pt plus4pt
-
-\def\initial #1{%
-{\let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt
-\ifdim\lastskip<\initialskipamount
-\removelastskip \penalty-200 \vskip \initialskipamount\fi
-\line{\secbf#1\hfill}\kern 2pt\penalty10000}}
-
-% This typesets a paragraph consisting of #1, dot leaders, and then #2
-% flush to the right margin. It is used for index and table of contents
-% entries. The paragraph is indented by \leftskip.
-%
-\def\entry #1#2{\begingroup
- %
- % Start a new paragraph if necessary, so our assignments below can't
- % affect previous text.
- \par
- %
- % Do not fill out the last line with white space.
- \parfillskip = 0in
- %
- % No extra space above this paragraph.
- \parskip = 0in
- %
- % Do not prefer a separate line ending with a hyphen to fewer lines.
- \finalhyphendemerits = 0
- %
- % \hangindent is only relevant when the entry text and page number
- % don't both fit on one line. In that case, bob suggests starting the
- % dots pretty far over on the line. Unfortunately, a large
- % indentation looks wrong when the entry text itself is broken across
- % lines. So we use a small indentation and put up with long leaders.
- %
- % \hangafter is reset to 1 (which is the value we want) at the start
- % of each paragraph, so we need not do anything with that.
- \hangindent=2em
- %
- % When the entry text needs to be broken, just fill out the first line
- % with blank space.
- \rightskip = 0pt plus1fil
- %
- % Start a ``paragraph'' for the index entry so the line breaking
- % parameters we've set above will have an effect.
- \noindent
- %
- % Insert the text of the index entry. TeX will do line-breaking on it.
- #1%
- % The following is kludged to not output a line of dots in the index if
- % there are no page numbers. The next person who breaks this will be
- % cursed by a Unix daemon.
- \def\tempa{{\rm }}%
- \def\tempb{#2}%
- \edef\tempc{\tempa}%
- \edef\tempd{\tempb}%
- \ifx\tempc\tempd\ \else%
- %
- % If we must, put the page number on a line of its own, and fill out
- % this line with blank space. (The \hfil is overwhelmed with the
- % fill leaders glue in \indexdotfill if the page number does fit.)
- \hfil\penalty50
- \null\nobreak\indexdotfill % Have leaders before the page number.
- %
- % The `\ ' here is removed by the implicit \unskip that TeX does as
- % part of (the primitive) \par. Without it, a spurious underfull
- % \hbox ensues.
- \ #2% The page number ends the paragraph.
- \fi%
- \par
-\endgroup}
-
-% Like \dotfill except takes at least 1 em.
-\def\indexdotfill{\cleaders
- \hbox{$\mathsurround=0pt \mkern1.5mu ${\it .}$ \mkern1.5mu$}\hskip 1em plus 1fill}
-
-\def\primary #1{\line{#1\hfil}}
-
-\newskip\secondaryindent \secondaryindent=0.5cm
-
-\def\secondary #1#2{
-{\parfillskip=0in \parskip=0in
-\hangindent =1in \hangafter=1
-\noindent\hskip\secondaryindent\hbox{#1}\indexdotfill #2\par
-}}
-
-%% Define two-column mode, which is used in indexes.
-%% Adapted from the TeXbook, page 416.
-\catcode `\@=11
-
-\newbox\partialpage
-
-\newdimen\doublecolumnhsize
-
-\def\begindoublecolumns{\begingroup
- % Grab any single-column material above us.
- \output = {\global\setbox\partialpage
- =\vbox{\unvbox255\kern -\topskip \kern \baselineskip}}%
- \eject
- %
- % Now switch to the double-column output routine.
- \output={\doublecolumnout}%
- %
- % Change the page size parameters. We could do this once outside this
- % routine, in each of @smallbook, @afourpaper, and the default 8.5x11
- % format, but then we repeat the same computation. Repeating a couple
- % of assignments once per index is clearly meaningless for the
- % execution time, so we may as well do it once.
- %
- % First we halve the line length, less a little for the gutter between
- % the columns. We compute the gutter based on the line length, so it
- % changes automatically with the paper format. The magic constant
- % below is chosen so that the gutter has the same value (well, +- <
- % 1pt) as it did when we hard-coded it.
- %
- % We put the result in a separate register, \doublecolumhsize, so we
- % can restore it in \pagesofar, after \hsize itself has (potentially)
- % been clobbered.
- %
- \doublecolumnhsize = \hsize
- \advance\doublecolumnhsize by -.04154\hsize
- \divide\doublecolumnhsize by 2
- \hsize = \doublecolumnhsize
- %
- % Double the \vsize as well. (We don't need a separate register here,
- % since nobody clobbers \vsize.)
- \vsize = 2\vsize
- \doublecolumnpagegoal
-}
-
-\def\enddoublecolumns{\eject \endgroup \pagegoal=\vsize \unvbox\partialpage}
-
-\def\doublecolumnsplit{\splittopskip=\topskip \splitmaxdepth=\maxdepth
- \global\dimen@=\pageheight \global\advance\dimen@ by-\ht\partialpage
- \global\setbox1=\vsplit255 to\dimen@ \global\setbox0=\vbox{\unvbox1}
- \global\setbox3=\vsplit255 to\dimen@ \global\setbox2=\vbox{\unvbox3}
- \ifdim\ht0>\dimen@ \setbox255=\vbox{\unvbox0\unvbox2} \global\setbox255=\copy5 \fi
- \ifdim\ht2>\dimen@ \setbox255=\vbox{\unvbox0\unvbox2} \global\setbox255=\copy5 \fi
-}
-\def\doublecolumnpagegoal{%
- \dimen@=\vsize \advance\dimen@ by-2\ht\partialpage \global\pagegoal=\dimen@
-}
-\def\pagesofar{\unvbox\partialpage %
- \hsize=\doublecolumnhsize % have to restore this since output routine
- \wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}}
-\def\doublecolumnout{%
- \setbox5=\copy255
- {\vbadness=10000 \doublecolumnsplit}
- \ifvbox255
- \setbox0=\vtop to\dimen@{\unvbox0}
- \setbox2=\vtop to\dimen@{\unvbox2}
- \onepageout\pagesofar \unvbox255 \penalty\outputpenalty
- \else
- \setbox0=\vbox{\unvbox5}
- \ifvbox0
- \dimen@=\ht0 \advance\dimen@ by\topskip \advance\dimen@ by-\baselineskip
- \divide\dimen@ by2 \splittopskip=\topskip \splitmaxdepth=\maxdepth
- {\vbadness=10000
- \loop \global\setbox5=\copy0
- \setbox1=\vsplit5 to\dimen@
- \setbox3=\vsplit5 to\dimen@
- \ifvbox5 \global\advance\dimen@ by1pt \repeat
- \setbox0=\vbox to\dimen@{\unvbox1}
- \setbox2=\vbox to\dimen@{\unvbox3}
- \global\setbox\partialpage=\vbox{\pagesofar}
- \doublecolumnpagegoal
- }
- \fi
- \fi
-}
-
-\catcode `\@=\other
-\message{sectioning,}
-% Define chapters, sections, etc.
-
-\newcount \chapno
-\newcount \secno \secno=0
-\newcount \subsecno \subsecno=0
-\newcount \subsubsecno \subsubsecno=0
-
-% This counter is funny since it counts through charcodes of letters A, B, ...
-\newcount \appendixno \appendixno = `\@
-\def\appendixletter{\char\the\appendixno}
-
-\newwrite \contentsfile
-% This is called from \setfilename.
-\def\opencontents{\openout \contentsfile = \jobname.toc}
-
-% Each @chapter defines this as the name of the chapter.
-% page headings and footings can use it. @section does likewise
-
-\def\thischapter{} \def\thissection{}
-\def\seccheck#1{\if \pageno<0 %
-\errmessage{@#1 not allowed after generating table of contents}\fi
-%
-}
-
-\def\chapternofonts{%
-\let\rawbackslash=\relax%
-\let\frenchspacing=\relax%
-\def\result{\realbackslash result}
-\def\equiv{\realbackslash equiv}
-\def\expansion{\realbackslash expansion}
-\def\print{\realbackslash print}
-\def\TeX{\realbackslash TeX}
-\def\dots{\realbackslash dots}
-\def\copyright{\realbackslash copyright}
-\def\tt{\realbackslash tt}
-\def\bf{\realbackslash bf }
-\def\w{\realbackslash w}
-\def\less{\realbackslash less}
-\def\gtr{\realbackslash gtr}
-\def\hat{\realbackslash hat}
-\def\char{\realbackslash char}
-\def\tclose##1{\realbackslash tclose {##1}}
-\def\code##1{\realbackslash code {##1}}
-\def\samp##1{\realbackslash samp {##1}}
-\def\r##1{\realbackslash r {##1}}
-\def\b##1{\realbackslash b {##1}}
-\def\key##1{\realbackslash key {##1}}
-\def\file##1{\realbackslash file {##1}}
-\def\kbd##1{\realbackslash kbd {##1}}
-% These are redefined because @smartitalic wouldn't work inside xdef.
-\def\i##1{\realbackslash i {##1}}
-\def\cite##1{\realbackslash cite {##1}}
-\def\var##1{\realbackslash var {##1}}
-\def\emph##1{\realbackslash emph {##1}}
-\def\dfn##1{\realbackslash dfn {##1}}
-}
-
-\newcount\absseclevel % used to calculate proper heading level
-\newcount\secbase\secbase=0 % @raise/lowersections modify this count
-
-% @raisesections: treat @section as chapter, @subsection as section, etc.
-\def\raisesections{\global\advance\secbase by -1}
-\let\up=\raisesections % original BFox name
-
-% @lowersections: treat @chapter as section, @section as subsection, etc.
-\def\lowersections{\global\advance\secbase by 1}
-\let\down=\lowersections % original BFox name
-
-% Choose a numbered-heading macro
-% #1 is heading level if unmodified by @raisesections or @lowersections
-% #2 is text for heading
-\def\numhead#1#2{\absseclevel=\secbase\advance\absseclevel by #1
-\ifcase\absseclevel
- \chapterzzz{#2}
-\or
- \seczzz{#2}
-\or
- \numberedsubseczzz{#2}
-\or
- \numberedsubsubseczzz{#2}
-\else
- \ifnum \absseclevel<0
- \chapterzzz{#2}
- \else
- \numberedsubsubseczzz{#2}
- \fi
-\fi
-}
-
-% like \numhead, but chooses appendix heading levels
-\def\apphead#1#2{\absseclevel=\secbase\advance\absseclevel by #1
-\ifcase\absseclevel
- \appendixzzz{#2}
-\or
- \appendixsectionzzz{#2}
-\or
- \appendixsubseczzz{#2}
-\or
- \appendixsubsubseczzz{#2}
-\else
- \ifnum \absseclevel<0
- \appendixzzz{#2}
- \else
- \appendixsubsubseczzz{#2}
- \fi
-\fi
-}
-
-% like \numhead, but chooses numberless heading levels
-\def\unnmhead#1#2{\absseclevel=\secbase\advance\absseclevel by #1
-\ifcase\absseclevel
- \unnumberedzzz{#2}
-\or
- \unnumberedseczzz{#2}
-\or
- \unnumberedsubseczzz{#2}
-\or
- \unnumberedsubsubseczzz{#2}
-\else
- \ifnum \absseclevel<0
- \unnumberedzzz{#2}
- \else
- \unnumberedsubsubseczzz{#2}
- \fi
-\fi
-}
-
-
-\def\thischaptername{No Chapter Title}
-\outer\def\chapter{\parsearg\chapteryyy}
-\def\chapteryyy #1{\numhead0{#1}} % normally numhead0 calls chapterzzz
-\def\chapterzzz #1{\seccheck{chapter}%
-\secno=0 \subsecno=0 \subsubsecno=0
-\global\advance \chapno by 1 \message{\putwordChapter \the\chapno}%
-\chapmacro {#1}{\the\chapno}%
-\gdef\thissection{#1}%
-\gdef\thischaptername{#1}%
-% We don't substitute the actual chapter name into \thischapter
-% because we don't want its macros evaluated now.
-\xdef\thischapter{\putwordChapter{} \the\chapno: \noexpand\thischaptername}%
-{\chapternofonts%
-\edef\temp{{\realbackslash chapentry {#1}{\the\chapno}{\noexpand\folio}}}%
-\escapechar=`\\%
-\write \contentsfile \temp %
-\donoderef %
-\global\let\section = \numberedsec
-\global\let\subsection = \numberedsubsec
-\global\let\subsubsection = \numberedsubsubsec
-}}
-
-\outer\def\appendix{\parsearg\appendixyyy}
-\def\appendixyyy #1{\apphead0{#1}} % normally apphead0 calls appendixzzz
-\def\appendixzzz #1{\seccheck{appendix}%
-\secno=0 \subsecno=0 \subsubsecno=0
-\global\advance \appendixno by 1 \message{Appendix \appendixletter}%
-\chapmacro {#1}{\putwordAppendix{} \appendixletter}%
-\gdef\thissection{#1}%
-\gdef\thischaptername{#1}%
-\xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}%
-{\chapternofonts%
-\edef\temp{{\realbackslash chapentry
- {#1}{\putwordAppendix{} \appendixletter}{\noexpand\folio}}}%
-\escapechar=`\\%
-\write \contentsfile \temp %
-\appendixnoderef %
-\global\let\section = \appendixsec
-\global\let\subsection = \appendixsubsec
-\global\let\subsubsection = \appendixsubsubsec
-}}
-
-\outer\def\top{\parsearg\unnumberedyyy}
-\outer\def\unnumbered{\parsearg\unnumberedyyy}
-\def\unnumberedyyy #1{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz
-\def\unnumberedzzz #1{\seccheck{unnumbered}%
-\secno=0 \subsecno=0 \subsubsecno=0
-%
-% This used to be simply \message{#1}, but TeX fully expands the
-% argument to \message. Therefore, if #1 contained @-commands, TeX
-% expanded them. For example, in `@unnumbered The @cite{Book}', TeX
-% expanded @cite (which turns out to cause errors because \cite is meant
-% to be executed, not expanded).
-%
-% Anyway, we don't want the fully-expanded definition of @cite to appear
-% as a result of the \message, we just want `@cite' itself. We use
-% \the<toks register> to achieve this: TeX expands \the<toks> only once,
-% simply yielding the contents of the <toks register>.
-\toks0 = {#1}\message{(\the\toks0)}%
-%
-\unnumbchapmacro {#1}%
-\gdef\thischapter{#1}\gdef\thissection{#1}%
-{\chapternofonts%
-\edef\temp{{\realbackslash unnumbchapentry {#1}{\noexpand\folio}}}%
-\escapechar=`\\%
-\write \contentsfile \temp %
-\unnumbnoderef %
-\global\let\section = \unnumberedsec
-\global\let\subsection = \unnumberedsubsec
-\global\let\subsubsection = \unnumberedsubsubsec
-}}
-
-\outer\def\numberedsec{\parsearg\secyyy}
-\def\secyyy #1{\numhead1{#1}} % normally calls seczzz
-\def\seczzz #1{\seccheck{section}%
-\subsecno=0 \subsubsecno=0 \global\advance \secno by 1 %
-\gdef\thissection{#1}\secheading {#1}{\the\chapno}{\the\secno}%
-{\chapternofonts%
-\edef\temp{{\realbackslash secentry %
-{#1}{\the\chapno}{\the\secno}{\noexpand\folio}}}%
-\escapechar=`\\%
-\write \contentsfile \temp %
-\donoderef %
-\penalty 10000 %
-}}
-
-\outer\def\appendixsection{\parsearg\appendixsecyyy}
-\outer\def\appendixsec{\parsearg\appendixsecyyy}
-\def\appendixsecyyy #1{\apphead1{#1}} % normally calls appendixsectionzzz
-\def\appendixsectionzzz #1{\seccheck{appendixsection}%
-\subsecno=0 \subsubsecno=0 \global\advance \secno by 1 %
-\gdef\thissection{#1}\secheading {#1}{\appendixletter}{\the\secno}%
-{\chapternofonts%
-\edef\temp{{\realbackslash secentry %
-{#1}{\appendixletter}{\the\secno}{\noexpand\folio}}}%
-\escapechar=`\\%
-\write \contentsfile \temp %
-\appendixnoderef %
-\penalty 10000 %
-}}
-
-\outer\def\unnumberedsec{\parsearg\unnumberedsecyyy}
-\def\unnumberedsecyyy #1{\unnmhead1{#1}} % normally calls unnumberedseczzz
-\def\unnumberedseczzz #1{\seccheck{unnumberedsec}%
-\plainsecheading {#1}\gdef\thissection{#1}%
-{\chapternofonts%
-\edef\temp{{\realbackslash unnumbsecentry{#1}{\noexpand\folio}}}%
-\escapechar=`\\%
-\write \contentsfile \temp %
-\unnumbnoderef %
-\penalty 10000 %
-}}
-
-\outer\def\numberedsubsec{\parsearg\numberedsubsecyyy}
-\def\numberedsubsecyyy #1{\numhead2{#1}} % normally calls numberedsubseczzz
-\def\numberedsubseczzz #1{\seccheck{subsection}%
-\gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 %
-\subsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}%
-{\chapternofonts%
-\edef\temp{{\realbackslash subsecentry %
-{#1}{\the\chapno}{\the\secno}{\the\subsecno}{\noexpand\folio}}}%
-\escapechar=`\\%
-\write \contentsfile \temp %
-\donoderef %
-\penalty 10000 %
-}}
-
-\outer\def\appendixsubsec{\parsearg\appendixsubsecyyy}
-\def\appendixsubsecyyy #1{\apphead2{#1}} % normally calls appendixsubseczzz
-\def\appendixsubseczzz #1{\seccheck{appendixsubsec}%
-\gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 %
-\subsecheading {#1}{\appendixletter}{\the\secno}{\the\subsecno}%
-{\chapternofonts%
-\edef\temp{{\realbackslash subsecentry %
-{#1}{\appendixletter}{\the\secno}{\the\subsecno}{\noexpand\folio}}}%
-\escapechar=`\\%
-\write \contentsfile \temp %
-\appendixnoderef %
-\penalty 10000 %
-}}
-
-\outer\def\unnumberedsubsec{\parsearg\unnumberedsubsecyyy}
-\def\unnumberedsubsecyyy #1{\unnmhead2{#1}} %normally calls unnumberedsubseczzz
-\def\unnumberedsubseczzz #1{\seccheck{unnumberedsubsec}%
-\plainsecheading {#1}\gdef\thissection{#1}%
-{\chapternofonts%
-\edef\temp{{\realbackslash unnumbsubsecentry{#1}{\noexpand\folio}}}%
-\escapechar=`\\%
-\write \contentsfile \temp %
-\unnumbnoderef %
-\penalty 10000 %
-}}
-
-\outer\def\numberedsubsubsec{\parsearg\numberedsubsubsecyyy}
-\def\numberedsubsubsecyyy #1{\numhead3{#1}} % normally numberedsubsubseczzz
-\def\numberedsubsubseczzz #1{\seccheck{subsubsection}%
-\gdef\thissection{#1}\global\advance \subsubsecno by 1 %
-\subsubsecheading {#1}
- {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}%
-{\chapternofonts%
-\edef\temp{{\realbackslash subsubsecentry %
- {#1}
- {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}
- {\noexpand\folio}}}%
-\escapechar=`\\%
-\write \contentsfile \temp %
-\donoderef %
-\penalty 10000 %
-}}
-
-\outer\def\appendixsubsubsec{\parsearg\appendixsubsubsecyyy}
-\def\appendixsubsubsecyyy #1{\apphead3{#1}} % normally appendixsubsubseczzz
-\def\appendixsubsubseczzz #1{\seccheck{appendixsubsubsec}%
-\gdef\thissection{#1}\global\advance \subsubsecno by 1 %
-\subsubsecheading {#1}
- {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}%
-{\chapternofonts%
-\edef\temp{{\realbackslash subsubsecentry{#1}%
- {\appendixletter}
- {\the\secno}{\the\subsecno}{\the\subsubsecno}{\noexpand\folio}}}%
-\escapechar=`\\%
-\write \contentsfile \temp %
-\appendixnoderef %
-\penalty 10000 %
-}}
-
-\outer\def\unnumberedsubsubsec{\parsearg\unnumberedsubsubsecyyy}
-\def\unnumberedsubsubsecyyy #1{\unnmhead3{#1}} %normally unnumberedsubsubseczzz
-\def\unnumberedsubsubseczzz #1{\seccheck{unnumberedsubsubsec}%
-\plainsecheading {#1}\gdef\thissection{#1}%
-{\chapternofonts%
-\edef\temp{{\realbackslash unnumbsubsubsecentry{#1}{\noexpand\folio}}}%
-\escapechar=`\\%
-\write \contentsfile \temp %
-\unnumbnoderef %
-\penalty 10000 %
-}}
-
-% These are variants which are not "outer", so they can appear in @ifinfo.
-% Actually, they should now be obsolete; ordinary section commands should work.
-\def\infotop{\parsearg\unnumberedzzz}
-\def\infounnumbered{\parsearg\unnumberedzzz}
-\def\infounnumberedsec{\parsearg\unnumberedseczzz}
-\def\infounnumberedsubsec{\parsearg\unnumberedsubseczzz}
-\def\infounnumberedsubsubsec{\parsearg\unnumberedsubsubseczzz}
-
-\def\infoappendix{\parsearg\appendixzzz}
-\def\infoappendixsec{\parsearg\appendixseczzz}
-\def\infoappendixsubsec{\parsearg\appendixsubseczzz}
-\def\infoappendixsubsubsec{\parsearg\appendixsubsubseczzz}
-
-\def\infochapter{\parsearg\chapterzzz}
-\def\infosection{\parsearg\sectionzzz}
-\def\infosubsection{\parsearg\subsectionzzz}
-\def\infosubsubsection{\parsearg\subsubsectionzzz}
-
-% These macros control what the section commands do, according
-% to what kind of chapter we are in (ordinary, appendix, or unnumbered).
-% Define them by default for a numbered chapter.
-\global\let\section = \numberedsec
-\global\let\subsection = \numberedsubsec
-\global\let\subsubsection = \numberedsubsubsec
-
-% Define @majorheading, @heading and @subheading
-
-% NOTE on use of \vbox for chapter headings, section headings, and
-% such:
-% 1) We use \vbox rather than the earlier \line to permit
-% overlong headings to fold.
-% 2) \hyphenpenalty is set to 10000 because hyphenation in a
-% heading is obnoxious; this forbids it.
-% 3) Likewise, headings look best if no \parindent is used, and
-% if justification is not attempted. Hence \raggedright.
-
-
-\def\majorheading{\parsearg\majorheadingzzz}
-\def\majorheadingzzz #1{%
-{\advance\chapheadingskip by 10pt \chapbreak }%
-{\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
- \parindent=0pt\raggedright
- \rm #1\hfill}}\bigskip \par\penalty 200}
-
-\def\chapheading{\parsearg\chapheadingzzz}
-\def\chapheadingzzz #1{\chapbreak %
-{\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
- \parindent=0pt\raggedright
- \rm #1\hfill}}\bigskip \par\penalty 200}
-
-\def\heading{\parsearg\secheadingi}
-
-\def\subheading{\parsearg\subsecheadingi}
-
-\def\subsubheading{\parsearg\subsubsecheadingi}
-
-% These macros generate a chapter, section, etc. heading only
-% (including whitespace, linebreaking, etc. around it),
-% given all the information in convenient, parsed form.
-
-%%% Args are the skip and penalty (usually negative)
-\def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi}
-
-\def\setchapterstyle #1 {\csname CHAPF#1\endcsname}
-
-%%% Define plain chapter starts, and page on/off switching for it
-% Parameter controlling skip before chapter headings (if needed)
-
-\newskip \chapheadingskip \chapheadingskip = 30pt plus 8pt minus 4pt
-
-\def\chapbreak{\dobreak \chapheadingskip {-4000}}
-\def\chappager{\par\vfill\supereject}
-\def\chapoddpage{\chappager \ifodd\pageno \else \hbox to 0pt{} \chappager\fi}
-
-\def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname}
-
-\def\CHAPPAGoff{
-\global\let\pchapsepmacro=\chapbreak
-\global\let\pagealignmacro=\chappager}
-
-\def\CHAPPAGon{
-\global\let\pchapsepmacro=\chappager
-\global\let\pagealignmacro=\chappager
-\global\def\HEADINGSon{\HEADINGSsingle}}
-
-\def\CHAPPAGodd{
-\global\let\pchapsepmacro=\chapoddpage
-\global\let\pagealignmacro=\chapoddpage
-\global\def\HEADINGSon{\HEADINGSdouble}}
-
-\CHAPPAGon
-
-\def\CHAPFplain{
-\global\let\chapmacro=\chfplain
-\global\let\unnumbchapmacro=\unnchfplain}
-
-\def\chfplain #1#2{%
- \pchapsepmacro
- {%
- \chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
- \parindent=0pt\raggedright
- \rm #2\enspace #1}%
- }%
- \bigskip
- \penalty5000
-}
-
-\def\unnchfplain #1{%
-\pchapsepmacro %
-{\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
- \parindent=0pt\raggedright
- \rm #1\hfill}}\bigskip \par\penalty 10000 %
-}
-\CHAPFplain % The default
-
-\def\unnchfopen #1{%
-\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
- \parindent=0pt\raggedright
- \rm #1\hfill}}\bigskip \par\penalty 10000 %
-}
-
-\def\chfopen #1#2{\chapoddpage {\chapfonts
-\vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}%
-\par\penalty 5000 %
-}
-
-\def\CHAPFopen{
-\global\let\chapmacro=\chfopen
-\global\let\unnumbchapmacro=\unnchfopen}
-
-% Parameter controlling skip before section headings.
-
-\newskip \subsecheadingskip \subsecheadingskip = 17pt plus 8pt minus 4pt
-\def\subsecheadingbreak{\dobreak \subsecheadingskip {-500}}
-
-\newskip \secheadingskip \secheadingskip = 21pt plus 8pt minus 4pt
-\def\secheadingbreak{\dobreak \secheadingskip {-1000}}
-
-% @paragraphindent is defined for the Info formatting commands only.
-\let\paragraphindent=\comment
-
-% Section fonts are the base font at magstep2, which produces
-% a size a bit more than 14 points in the default situation.
-
-\def\secheading #1#2#3{\secheadingi {#2.#3\enspace #1}}
-\def\plainsecheading #1{\secheadingi {#1}}
-\def\secheadingi #1{{\advance \secheadingskip by \parskip %
-\secheadingbreak}%
-{\secfonts \vbox{\hyphenpenalty=10000\tolerance=5000
- \parindent=0pt\raggedright
- \rm #1\hfill}}%
-\ifdim \parskip<10pt \kern 10pt\kern -\parskip\fi \penalty 10000 }
-
-
-% Subsection fonts are the base font at magstep1,
-% which produces a size of 12 points.
-
-\def\subsecheading #1#2#3#4{\subsecheadingi {#2.#3.#4\enspace #1}}
-\def\subsecheadingi #1{{\advance \subsecheadingskip by \parskip %
-\subsecheadingbreak}%
-{\subsecfonts \vbox{\hyphenpenalty=10000\tolerance=5000
- \parindent=0pt\raggedright
- \rm #1\hfill}}%
-\ifdim \parskip<10pt \kern 10pt\kern -\parskip\fi \penalty 10000 }
-
-\def\subsubsecfonts{\subsecfonts} % Maybe this should change:
- % Perhaps make sssec fonts scaled
- % magstep half
-\def\subsubsecheading #1#2#3#4#5{\subsubsecheadingi {#2.#3.#4.#5\enspace #1}}
-\def\subsubsecheadingi #1{{\advance \subsecheadingskip by \parskip %
-\subsecheadingbreak}%
-{\subsubsecfonts \vbox{\hyphenpenalty=10000\tolerance=5000
- \parindent=0pt\raggedright
- \rm #1\hfill}}%
-\ifdim \parskip<10pt \kern 10pt\kern -\parskip\fi \penalty 10000}
-
-
-\message{toc printing,}
-
-% Finish up the main text and prepare to read what we've written
-% to \contentsfile.
-
-\newskip\contentsrightmargin \contentsrightmargin=1in
-\def\startcontents#1{%
- \pagealignmacro
- \immediate\closeout \contentsfile
- \ifnum \pageno>0
- \pageno = -1 % Request roman numbered pages.
- \fi
- % Don't need to put `Contents' or `Short Contents' in the headline.
- % It is abundantly clear what they are.
- \unnumbchapmacro{#1}\def\thischapter{}%
- \begingroup % Set up to handle contents files properly.
- \catcode`\\=0 \catcode`\{=1 \catcode`\}=2 \catcode`\@=11
- \catcode`\^=7 % to see ^^e4 as \"a etc. juha@piuha.ydi.vtt.fi
- \raggedbottom % Worry more about breakpoints than the bottom.
- \advance\hsize by -\contentsrightmargin % Don't use the full line length.
-}
-
-
-% Normal (long) toc.
-\outer\def\contents{%
- \startcontents{\putwordTableofContents}%
- \input \jobname.toc
- \endgroup
- \vfill \eject
-}
-
-% And just the chapters.
-\outer\def\summarycontents{%
- \startcontents{\putwordShortContents}%
- %
- \let\chapentry = \shortchapentry
- \let\unnumbchapentry = \shortunnumberedentry
- % We want a true roman here for the page numbers.
- \secfonts
- \let\rm=\shortcontrm \let\bf=\shortcontbf \let\sl=\shortcontsl
- \rm
- \advance\baselineskip by 1pt % Open it up a little.
- \def\secentry ##1##2##3##4{}
- \def\unnumbsecentry ##1##2{}
- \def\subsecentry ##1##2##3##4##5{}
- \def\unnumbsubsecentry ##1##2{}
- \def\subsubsecentry ##1##2##3##4##5##6{}
- \def\unnumbsubsubsecentry ##1##2{}
- \input \jobname.toc
- \endgroup
- \vfill \eject
-}
-\let\shortcontents = \summarycontents
-
-% These macros generate individual entries in the table of contents.
-% The first argument is the chapter or section name.
-% The last argument is the page number.
-% The arguments in between are the chapter number, section number, ...
-
-% Chapter-level things, for both the long and short contents.
-\def\chapentry#1#2#3{\dochapentry{#2\labelspace#1}{#3}}
-
-% See comments in \dochapentry re vbox and related settings
-\def\shortchapentry#1#2#3{%
- \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno{#3}}%
-}
-
-% Typeset the label for a chapter or appendix for the short contents.
-% The arg is, e.g. `Appendix A' for an appendix, or `3' for a chapter.
-% We could simplify the code here by writing out an \appendixentry
-% command in the toc file for appendices, instead of using \chapentry
-% for both, but it doesn't seem worth it.
-\setbox0 = \hbox{\shortcontrm \putwordAppendix }
-\newdimen\shortappendixwidth \shortappendixwidth = \wd0
-
-\def\shortchaplabel#1{%
- % We typeset #1 in a box of constant width, regardless of the text of
- % #1, so the chapter titles will come out aligned.
- \setbox0 = \hbox{#1}%
- \dimen0 = \ifdim\wd0 > \shortappendixwidth \shortappendixwidth \else 0pt \fi
- %
- % This space should be plenty, since a single number is .5em, and the
- % widest letter (M) is 1em, at least in the Computer Modern fonts.
- % (This space doesn't include the extra space that gets added after
- % the label; that gets put in in \shortchapentry above.)
- \advance\dimen0 by 1.1em
- \hbox to \dimen0{#1\hfil}%
-}
-
-\def\unnumbchapentry#1#2{\dochapentry{#1}{#2}}
-\def\shortunnumberedentry#1#2{\tocentry{#1}{\doshortpageno{#2}}}
-
-% Sections.
-\def\secentry#1#2#3#4{\dosecentry{#2.#3\labelspace#1}{#4}}
-\def\unnumbsecentry#1#2{\dosecentry{#1}{#2}}
-
-% Subsections.
-\def\subsecentry#1#2#3#4#5{\dosubsecentry{#2.#3.#4\labelspace#1}{#5}}
-\def\unnumbsubsecentry#1#2{\dosubsecentry{#1}{#2}}
-
-% And subsubsections.
-\def\subsubsecentry#1#2#3#4#5#6{%
- \dosubsubsecentry{#2.#3.#4.#5\labelspace#1}{#6}}
-\def\unnumbsubsubsecentry#1#2{\dosubsubsecentry{#1}{#2}}
-
-
-% This parameter controls the indentation of the various levels.
-\newdimen\tocindent \tocindent = 3pc
-
-% Now for the actual typesetting. In all these, #1 is the text and #2 is the
-% page number.
-%
-% If the toc has to be broken over pages, we would want to be at chapters
-% if at all possible; hence the \penalty.
-\def\dochapentry#1#2{%
- \penalty-300 \vskip\baselineskip
- \begingroup
- \chapentryfonts
- \tocentry{#1}{\dopageno{#2}}%
- \endgroup
- \nobreak\vskip .25\baselineskip
-}
-
-\def\dosecentry#1#2{\begingroup
- \secentryfonts \leftskip=\tocindent
- \tocentry{#1}{\dopageno{#2}}%
-\endgroup}
-
-\def\dosubsecentry#1#2{\begingroup
- \subsecentryfonts \leftskip=2\tocindent
- \tocentry{#1}{\dopageno{#2}}%
-\endgroup}
-
-\def\dosubsubsecentry#1#2{\begingroup
- \subsubsecentryfonts \leftskip=3\tocindent
- \tocentry{#1}{\dopageno{#2}}%
-\endgroup}
-
-% Final typesetting of a toc entry; we use the same \entry macro as for
-% the index entries, but we want to suppress hyphenation here. (We
-% can't do that in the \entry macro, since index entries might consist
-% of hyphenated-identifiers-that-do-not-fit-on-a-line-and-nothing-else.)
-%
-% \turnoffactive is for the sake of @" used for umlauts.
-\def\tocentry#1#2{\begingroup
- \hyphenpenalty = 10000
- \entry{\turnoffactive #1}{\turnoffactive #2}%
-\endgroup}
-
-% Space between chapter (or whatever) number and the title.
-\def\labelspace{\hskip1em \relax}
-
-\def\dopageno#1{{\rm #1}}
-\def\doshortpageno#1{{\rm #1}}
-
-\def\chapentryfonts{\secfonts \rm}
-\def\secentryfonts{\textfonts}
-\let\subsecentryfonts = \textfonts
-\let\subsubsecentryfonts = \textfonts
-
-
-\message{environments,}
-
-% Since these characters are used in examples, it should be an even number of
-% \tt widths. Each \tt character is 1en, so two makes it 1em.
-% Furthermore, these definitions must come after we define our fonts.
-\newbox\dblarrowbox \newbox\longdblarrowbox
-\newbox\pushcharbox \newbox\bullbox
-\newbox\equivbox \newbox\errorbox
-
-\let\ptexequiv = \equiv
-
-%{\tentt
-%\global\setbox\dblarrowbox = \hbox to 1em{\hfil$\Rightarrow$\hfil}
-%\global\setbox\longdblarrowbox = \hbox to 1em{\hfil$\mapsto$\hfil}
-%\global\setbox\pushcharbox = \hbox to 1em{\hfil$\dashv$\hfil}
-%\global\setbox\equivbox = \hbox to 1em{\hfil$\ptexequiv$\hfil}
-% Adapted from the manmac format (p.420 of TeXbook)
-%\global\setbox\bullbox = \hbox to 1em{\kern.15em\vrule height .75ex width .85ex
-% depth .1ex\hfil}
-%}
-
-\def\point{$\star$}
-
-\def\result{\leavevmode\raise.15ex\hbox to 1em{\hfil$\Rightarrow$\hfil}}
-\def\expansion{\leavevmode\raise.1ex\hbox to 1em{\hfil$\mapsto$\hfil}}
-\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}}
-
-\def\equiv{\leavevmode\lower.1ex\hbox to 1em{\hfil$\ptexequiv$\hfil}}
-
-% Adapted from the TeXbook's \boxit.
-{\tentt \global\dimen0 = 3em}% Width of the box.
-\dimen2 = .55pt % Thickness of rules
-% The text. (`r' is open on the right, `e' somewhat less so on the left.)
-\setbox0 = \hbox{\kern-.75pt \tensf error\kern-1.5pt}
-
-\global\setbox\errorbox=\hbox to \dimen0{\hfil
- \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right.
- \advance\hsize by -2\dimen2 % Rules.
- \vbox{
- \hrule height\dimen2
- \hbox{\vrule width\dimen2 \kern3pt % Space to left of text.
- \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below.
- \kern3pt\vrule width\dimen2}% Space to right.
- \hrule height\dimen2}
- \hfil}
-
-% The @error{} command.
-\def\error{\leavevmode\lower.7ex\copy\errorbox}
-
-% @tex ... @end tex escapes into raw Tex temporarily.
-% One exception: @ is still an escape character, so that @end tex works.
-% But \@ or @@ will get a plain tex @ character.
-
-\def\tex{\begingroup
-\catcode `\\=0 \catcode `\{=1 \catcode `\}=2
-\catcode `\$=3 \catcode `\&=4 \catcode `\#=6
-\catcode `\^=7 \catcode `\_=8 \catcode `\~=13 \let~=\tie
-\catcode `\%=14
-\catcode 43=12
-\catcode`\"=12
-\catcode`\==12
-\catcode`\|=12
-\catcode`\<=12
-\catcode`\>=12
-\escapechar=`\\
-%
-\let\~=\ptextilde
-\let\{=\ptexlbrace
-\let\}=\ptexrbrace
-\let\.=\ptexdot
-\let\*=\ptexstar
-\let\dots=\ptexdots
-\def\@{@}%
-\let\bullet=\ptexbullet
-\let\b=\ptexb \let\c=\ptexc \let\i=\ptexi \let\t=\ptext \let\l=\ptexl
-\let\L=\ptexL
-%
-\let\Etex=\endgroup}
-
-% Define @lisp ... @endlisp.
-% @lisp does a \begingroup so it can rebind things,
-% including the definition of @endlisp (which normally is erroneous).
-
-% Amount to narrow the margins by for @lisp.
-\newskip\lispnarrowing \lispnarrowing=0.4in
-
-% This is the definition that ^^M gets inside @lisp, @example, and other
-% such environments. \null is better than a space, since it doesn't
-% have any width.
-\def\lisppar{\null\endgraf}
-
-% Make each space character in the input produce a normal interword
-% space in the output. Don't allow a line break at this space, as this
-% is used only in environments like @example, where each line of input
-% should produce a line of output anyway.
-%
-{\obeyspaces %
-\gdef\sepspaces{\obeyspaces\let =\tie}}
-
-% Define \obeyedspace to be our active space, whatever it is. This is
-% for use in \parsearg.
-{\sepspaces%
-\global\let\obeyedspace= }
-
-% This space is always present above and below environments.
-\newskip\envskipamount \envskipamount = 0pt
-
-% Make spacing and below environment symmetrical. We use \parskip here
-% to help in doing that, since in @example-like environments \parskip
-% is reset to zero; thus the \afterenvbreak inserts no space -- but the
-% start of the next paragraph will insert \parskip
-%
-\def\aboveenvbreak{{\advance\envskipamount by \parskip
-\endgraf \ifdim\lastskip<\envskipamount
-\removelastskip \penalty-50 \vskip\envskipamount \fi}}
-
-\let\afterenvbreak = \aboveenvbreak
-
-% \nonarrowing is a flag. If "set", @lisp etc don't narrow margins.
-\let\nonarrowing=\relax
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% \cartouche: draw rectangle w/rounded corners around argument
-\font\circle=lcircle10
-\newdimen\circthick
-\newdimen\cartouter\newdimen\cartinner
-\newskip\normbskip\newskip\normpskip\newskip\normlskip
-\circthick=\fontdimen8\circle
-%
-\def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth
-\def\ctr{{\hskip 6pt\circle\char'010}}
-\def\cbl{{\circle\char'012\hskip -6pt}}
-\def\cbr{{\hskip 6pt\circle\char'011}}
-\def\carttop{\hbox to \cartouter{\hskip\lskip
- \ctl\leaders\hrule height\circthick\hfil\ctr
- \hskip\rskip}}
-\def\cartbot{\hbox to \cartouter{\hskip\lskip
- \cbl\leaders\hrule height\circthick\hfil\cbr
- \hskip\rskip}}
-%
-\newskip\lskip\newskip\rskip
-
-\long\def\cartouche{%
-\begingroup
- \lskip=\leftskip \rskip=\rightskip
- \leftskip=0pt\rightskip=0pt %we want these *outside*.
- \cartinner=\hsize \advance\cartinner by-\lskip
- \advance\cartinner by-\rskip
- \cartouter=\hsize
- \advance\cartouter by 18pt % allow for 3pt kerns on either
-% side, and for 6pt waste from
-% each corner char
- \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip
- % Flag to tell @lisp, etc., not to narrow margin.
- \let\nonarrowing=\comment
- \vbox\bgroup
- \baselineskip=0pt\parskip=0pt\lineskip=0pt
- \carttop
- \hbox\bgroup
- \hskip\lskip
- \vrule\kern3pt
- \vbox\bgroup
- \hsize=\cartinner
- \kern3pt
- \begingroup
- \baselineskip=\normbskip
- \lineskip=\normlskip
- \parskip=\normpskip
- \vskip -\parskip
-\def\Ecartouche{%
- \endgroup
- \kern3pt
- \egroup
- \kern3pt\vrule
- \hskip\rskip
- \egroup
- \cartbot
- \egroup
-\endgroup
-}}
-
-
-% This macro is called at the beginning of all the @example variants,
-% inside a group.
-\def\nonfillstart{%
- \aboveenvbreak
- \inENV % This group ends at the end of the body
- \hfuzz = 12pt % Don't be fussy
- \sepspaces % Make spaces be word-separators rather than space tokens.
- \singlespace
- \let\par = \lisppar % don't ignore blank lines
- \obeylines % each line of input is a line of output
- \parskip = 0pt
- \parindent = 0pt
- \emergencystretch = 0pt % don't try to avoid overfull boxes
- % @cartouche defines \nonarrowing to inhibit narrowing
- % at next level down.
- \ifx\nonarrowing\relax
- \advance \leftskip by \lispnarrowing
- \exdentamount=\lispnarrowing
- \let\exdent=\nofillexdent
- \let\nonarrowing=\relax
- \fi
-}
-
-% To ending an @example-like environment, we first end the paragraph
-% (via \afterenvbreak's vertical glue), and then the group. That way we
-% keep the zero \parskip that the environments set -- \parskip glue
-% will be inserted at the beginning of the next paragraph in the
-% document, after the environment.
-%
-\def\nonfillfinish{\afterenvbreak\endgroup}%
-
-% This macro is
-\def\lisp{\begingroup
- \nonfillstart
- \let\Elisp = \nonfillfinish
- \tt
- \rawbackslash % have \ input char produce \ char from current font
- \gobble
-}
-
-% Define the \E... control sequence only if we are inside the
-% environment, so the error checking in \end will work.
-%
-% We must call \lisp last in the definition, since it reads the
-% return following the @example (or whatever) command.
-%
-\def\example{\begingroup \def\Eexample{\nonfillfinish\endgroup}\lisp}
-\def\smallexample{\begingroup \def\Esmallexample{\nonfillfinish\endgroup}\lisp}
-\def\smalllisp{\begingroup \def\Esmalllisp{\nonfillfinish\endgroup}\lisp}
-
-% @smallexample and @smalllisp. This is not used unless the @smallbook
-% command is given. Originally contributed by Pavel@xerox.
-%
-\def\smalllispx{\begingroup
- \nonfillstart
- \let\Esmalllisp = \nonfillfinish
- \let\Esmallexample = \nonfillfinish
- %
- % Smaller interline space and fonts for small examples.
- \setleading{10pt}%
- \indexfonts \tt
- \rawbackslash % make \ output the \ character from the current font (tt)
- \gobble
-}
-
-% This is @display; same as @lisp except use roman font.
-%
-\def\display{\begingroup
- \nonfillstart
- \let\Edisplay = \nonfillfinish
- \gobble
-}
-
-% This is @format; same as @display except don't narrow margins.
-%
-\def\format{\begingroup
- \let\nonarrowing = t
- \nonfillstart
- \let\Eformat = \nonfillfinish
- \gobble
-}
-
-% @flushleft (same as @format) and @flushright.
-%
-\def\flushleft{\begingroup
- \let\nonarrowing = t
- \nonfillstart
- \let\Eflushleft = \nonfillfinish
- \gobble
-}
-\def\flushright{\begingroup
- \let\nonarrowing = t
- \nonfillstart
- \let\Eflushright = \nonfillfinish
- \advance\leftskip by 0pt plus 1fill
- \gobble}
-
-% @quotation does normal linebreaking (hence we can't use \nonfillstart)
-% and narrows the margins.
-%
-\def\quotation{%
- \begingroup\inENV %This group ends at the end of the @quotation body
- {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
- \singlespace
- \parindent=0pt
- % We have retained a nonzero parskip for the environment, since we're
- % doing normal filling. So to avoid extra space below the environment...
- \def\Equotation{\parskip = 0pt \nonfillfinish}%
- %
- % @cartouche defines \nonarrowing to inhibit narrowing at next level down.
- \ifx\nonarrowing\relax
- \advance\leftskip by \lispnarrowing
- \advance\rightskip by \lispnarrowing
- \exdentamount = \lispnarrowing
- \let\nonarrowing = \relax
- \fi
-}
-
-\message{defuns,}
-% Define formatter for defuns
-% First, allow user to change definition object font (\df) internally
-\def\setdeffont #1 {\csname DEF#1\endcsname}
-
-\newskip\defbodyindent \defbodyindent=.4in
-\newskip\defargsindent \defargsindent=50pt
-\newskip\deftypemargin \deftypemargin=12pt
-\newskip\deflastargmargin \deflastargmargin=18pt
-
-\newcount\parencount
-% define \functionparens, which makes ( and ) and & do special things.
-% \functionparens affects the group it is contained in.
-\def\activeparens{%
-\catcode`\(=\active \catcode`\)=\active \catcode`\&=\active
-\catcode`\[=\active \catcode`\]=\active}
-
-% Make control sequences which act like normal parenthesis chars.
-\let\lparen = ( \let\rparen = )
-
-{\activeparens % Now, smart parens don't turn on until &foo (see \amprm)
-
-% Be sure that we always have a definition for `(', etc. For example,
-% if the fn name has parens in it, \boldbrax will not be in effect yet,
-% so TeX would otherwise complain about undefined control sequence.
-\global\let(=\lparen \global\let)=\rparen
-\global\let[=\lbrack \global\let]=\rbrack
-
-\gdef\functionparens{\boldbrax\let&=\amprm\parencount=0 }
-\gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb}
-% This is used to turn on special parens
-% but make & act ordinary (given that it's active).
-\gdef\boldbraxnoamp{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb\let&=\ampnr}
-
-% Definitions of (, ) and & used in args for functions.
-% This is the definition of ( outside of all parentheses.
-\gdef\oprm#1 {{\rm\char`\(}#1 \bf \let(=\opnested %
-\global\advance\parencount by 1 }
-%
-% This is the definition of ( when already inside a level of parens.
-\gdef\opnested{\char`\(\global\advance\parencount by 1 }
-%
-\gdef\clrm{% Print a paren in roman if it is taking us back to depth of 0.
-% also in that case restore the outer-level definition of (.
-\ifnum \parencount=1 {\rm \char `\)}\sl \let(=\oprm \else \char `\) \fi
-\global\advance \parencount by -1 }
-% If we encounter &foo, then turn on ()-hacking afterwards
-\gdef\amprm#1 {{\rm\&#1}\let(=\oprm \let)=\clrm\ }
-%
-\gdef\normalparens{\boldbrax\let&=\ampnr}
-} % End of definition inside \activeparens
-%% These parens (in \boldbrax) actually are a little bolder than the
-%% contained text. This is especially needed for [ and ]
-\def\opnr{{\sf\char`\(}} \def\clnr{{\sf\char`\)}} \def\ampnr{\&}
-\def\lbrb{{\bf\char`\[}} \def\rbrb{{\bf\char`\]}}
-
-% First, defname, which formats the header line itself.
-% #1 should be the function name.
-% #2 should be the type of definition, such as "Function".
-
-\def\defname #1#2{%
-% Get the values of \leftskip and \rightskip as they were
-% outside the @def...
-\dimen2=\leftskip
-\advance\dimen2 by -\defbodyindent
-\dimen3=\rightskip
-\advance\dimen3 by -\defbodyindent
-\noindent %
-\setbox0=\hbox{\hskip \deflastargmargin{\rm #2}\hskip \deftypemargin}%
-\dimen0=\hsize \advance \dimen0 by -\wd0 % compute size for first line
-\dimen1=\hsize \advance \dimen1 by -\defargsindent %size for continuations
-\parshape 2 0in \dimen0 \defargsindent \dimen1 %
-% Now output arg 2 ("Function" or some such)
-% ending at \deftypemargin from the right margin,
-% but stuck inside a box of width 0 so it does not interfere with linebreaking
-{% Adjust \hsize to exclude the ambient margins,
-% so that \rightline will obey them.
-\advance \hsize by -\dimen2 \advance \hsize by -\dimen3
-\rlap{\rightline{{\rm #2}\hskip \deftypemargin}}}%
-% Make all lines underfull and no complaints:
-\tolerance=10000 \hbadness=10000
-\advance\leftskip by -\defbodyindent
-\exdentamount=\defbodyindent
-{\df #1}\enskip % Generate function name
-}
-
-% Actually process the body of a definition
-% #1 should be the terminating control sequence, such as \Edefun.
-% #2 should be the "another name" control sequence, such as \defunx.
-% #3 should be the control sequence that actually processes the header,
-% such as \defunheader.
-
-\def\defparsebody #1#2#3{\begingroup\inENV% Environment for definitionbody
-\medbreak %
-% Define the end token that this defining construct specifies
-% so that it will exit this group.
-\def#1{\endgraf\endgroup\medbreak}%
-\def#2{\begingroup\obeylines\activeparens\spacesplit#3}%
-\parindent=0in
-\advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent
-\exdentamount=\defbodyindent
-\begingroup %
-\catcode 61=\active % 61 is `='
-\obeylines\activeparens\spacesplit#3}
-
-\def\defmethparsebody #1#2#3#4 {\begingroup\inENV %
-\medbreak %
-% Define the end token that this defining construct specifies
-% so that it will exit this group.
-\def#1{\endgraf\endgroup\medbreak}%
-\def#2##1 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}}}%
-\parindent=0in
-\advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent
-\exdentamount=\defbodyindent
-\begingroup\obeylines\activeparens\spacesplit{#3{#4}}}
-
-\def\defopparsebody #1#2#3#4#5 {\begingroup\inENV %
-\medbreak %
-% Define the end token that this defining construct specifies
-% so that it will exit this group.
-\def#1{\endgraf\endgroup\medbreak}%
-\def#2##1 ##2 {\def#4{##1}%
-\begingroup\obeylines\activeparens\spacesplit{#3{##2}}}%
-\parindent=0in
-\advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent
-\exdentamount=\defbodyindent
-\begingroup\obeylines\activeparens\spacesplit{#3{#5}}}
-
-% These parsing functions are similar to the preceding ones
-% except that they do not make parens into active characters.
-% These are used for "variables" since they have no arguments.
-
-\def\defvarparsebody #1#2#3{\begingroup\inENV% Environment for definitionbody
-\medbreak %
-% Define the end token that this defining construct specifies
-% so that it will exit this group.
-\def#1{\endgraf\endgroup\medbreak}%
-\def#2{\begingroup\obeylines\spacesplit#3}%
-\parindent=0in
-\advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent
-\exdentamount=\defbodyindent
-\begingroup %
-\catcode 61=\active %
-\obeylines\spacesplit#3}
-
-% This is used for \def{tp,vr}parsebody. It could probably be used for
-% some of the others, too, with some judicious conditionals.
-%
-\def\parsebodycommon#1#2#3{%
- \begingroup\inENV %
- \medbreak %
- % Define the end token that this defining construct specifies
- % so that it will exit this group.
- \def#1{\endgraf\endgroup\medbreak}%
- \def#2##1 {\begingroup\obeylines\spacesplit{#3{##1}}}%
- \parindent=0in
- \advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent
- \exdentamount=\defbodyindent
- \begingroup\obeylines
-}
-
-\def\defvrparsebody#1#2#3#4 {%
- \parsebodycommon{#1}{#2}{#3}%
- \spacesplit{#3{#4}}%
-}
-
-% This loses on `@deftp {Data Type} {struct termios}' -- it thinks the
-% type is just `struct', because we lose the braces in `{struct
-% termios}' when \spacesplit reads its undelimited argument. Sigh.
-% \let\deftpparsebody=\defvrparsebody
-%
-% So, to get around this, we put \empty in with the type name. That
-% way, TeX won't find exactly `{...}' as an undelimited argument, and
-% won't strip off the braces.
-%
-\def\deftpparsebody #1#2#3#4 {%
- \parsebodycommon{#1}{#2}{#3}%
- \spacesplit{\parsetpheaderline{#3{#4}}}\empty
-}
-
-% Fine, but then we have to eventually remove the \empty *and* the
-% braces (if any). That's what this does, putting the result in \tptemp.
-%
-\def\removeemptybraces\empty#1\relax{\def\tptemp{#1}}%
-
-% After \spacesplit has done its work, this is called -- #1 is the final
-% thing to call, #2 the type name (which starts with \empty), and #3
-% (which might be empty) the arguments.
-%
-\def\parsetpheaderline#1#2#3{%
- \removeemptybraces#2\relax
- #1{\tptemp}{#3}%
-}%
-
-\def\defopvarparsebody #1#2#3#4#5 {\begingroup\inENV %
-\medbreak %
-% Define the end token that this defining construct specifies
-% so that it will exit this group.
-\def#1{\endgraf\endgroup\medbreak}%
-\def#2##1 ##2 {\def#4{##1}%
-\begingroup\obeylines\spacesplit{#3{##2}}}%
-\parindent=0in
-\advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent
-\exdentamount=\defbodyindent
-\begingroup\obeylines\spacesplit{#3{#5}}}
-
-% Split up #2 at the first space token.
-% call #1 with two arguments:
-% the first is all of #2 before the space token,
-% the second is all of #2 after that space token.
-% If #2 contains no space token, all of it is passed as the first arg
-% and the second is passed as empty.
-
-{\obeylines
-\gdef\spacesplit#1#2^^M{\endgroup\spacesplitfoo{#1}#2 \relax\spacesplitfoo}%
-\long\gdef\spacesplitfoo#1#2 #3#4\spacesplitfoo{%
-\ifx\relax #3%
-#1{#2}{}\else #1{#2}{#3#4}\fi}}
-
-% So much for the things common to all kinds of definitions.
-
-% Define @defun.
-
-% First, define the processing that is wanted for arguments of \defun
-% Use this to expand the args and terminate the paragraph they make up
-
-\def\defunargs #1{\functionparens \sl
-% Expand, preventing hyphenation at `-' chars.
-% Note that groups don't affect changes in \hyphenchar.
-\hyphenchar\tensl=0
-#1%
-\hyphenchar\tensl=45
-\ifnum\parencount=0 \else \errmessage{unbalanced parens in @def arguments}\fi%
-\interlinepenalty=10000
-\advance\rightskip by 0pt plus 1fil
-\endgraf\penalty 10000\vskip -\parskip\penalty 10000%
-}
-
-\def\deftypefunargs #1{%
-% Expand, preventing hyphenation at `-' chars.
-% Note that groups don't affect changes in \hyphenchar.
-% Use \boldbraxnoamp, not \functionparens, so that & is not special.
-\boldbraxnoamp
-\tclose{#1}% avoid \code because of side effects on active chars
-\interlinepenalty=10000
-\advance\rightskip by 0pt plus 1fil
-\endgraf\penalty 10000\vskip -\parskip\penalty 10000%
-}
-
-% Do complete processing of one @defun or @defunx line already parsed.
-
-% @deffn Command forward-char nchars
-
-\def\deffn{\defmethparsebody\Edeffn\deffnx\deffnheader}
-
-\def\deffnheader #1#2#3{\doind {fn}{\code{#2}}%
-\begingroup\defname {#2}{#1}\defunargs{#3}\endgroup %
-\catcode 61=\other % Turn off change made in \defparsebody
-}
-
-% @defun == @deffn Function
-
-\def\defun{\defparsebody\Edefun\defunx\defunheader}
-
-\def\defunheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index
-\begingroup\defname {#1}{Function}%
-\defunargs {#2}\endgroup %
-\catcode 61=\other % Turn off change made in \defparsebody
-}
-
-% @deftypefun int foobar (int @var{foo}, float @var{bar})
-
-\def\deftypefun{\defparsebody\Edeftypefun\deftypefunx\deftypefunheader}
-
-% #1 is the data type. #2 is the name and args.
-\def\deftypefunheader #1#2{\deftypefunheaderx{#1}#2 \relax}
-% #1 is the data type, #2 the name, #3 the args.
-\def\deftypefunheaderx #1#2 #3\relax{%
-\doind {fn}{\code{#2}}% Make entry in function index
-\begingroup\defname {\defheaderxcond#1\relax$$$#2}{Function}%
-\deftypefunargs {#3}\endgroup %
-\catcode 61=\other % Turn off change made in \defparsebody
-}
-
-% @deftypefn {Library Function} int foobar (int @var{foo}, float @var{bar})
-
-\def\deftypefn{\defmethparsebody\Edeftypefn\deftypefnx\deftypefnheader}
-
-% \defheaderxcond#1\relax$$$
-% puts #1 in @code, followed by a space, but does nothing if #1 is null.
-\def\defheaderxcond#1#2$$${\ifx#1\relax\else\code{#1#2} \fi}
-
-% #1 is the classification. #2 is the data type. #3 is the name and args.
-\def\deftypefnheader #1#2#3{\deftypefnheaderx{#1}{#2}#3 \relax}
-% #1 is the classification, #2 the data type, #3 the name, #4 the args.
-\def\deftypefnheaderx #1#2#3 #4\relax{%
-\doind {fn}{\code{#3}}% Make entry in function index
-\begingroup
-\normalparens % notably, turn off `&' magic, which prevents
-% at least some C++ text from working
-\defname {\defheaderxcond#2\relax$$$#3}{#1}%
-\deftypefunargs {#4}\endgroup %
-\catcode 61=\other % Turn off change made in \defparsebody
-}
-
-% @defmac == @deffn Macro
-
-\def\defmac{\defparsebody\Edefmac\defmacx\defmacheader}
-
-\def\defmacheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index
-\begingroup\defname {#1}{Macro}%
-\defunargs {#2}\endgroup %
-\catcode 61=\other % Turn off change made in \defparsebody
-}
-
-% @defspec == @deffn Special Form
-
-\def\defspec{\defparsebody\Edefspec\defspecx\defspecheader}
-
-\def\defspecheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index
-\begingroup\defname {#1}{Special Form}%
-\defunargs {#2}\endgroup %
-\catcode 61=\other % Turn off change made in \defparsebody
-}
-
-% This definition is run if you use @defunx
-% anywhere other than immediately after a @defun or @defunx.
-
-\def\deffnx #1 {\errmessage{@deffnx in invalid context}}
-\def\defunx #1 {\errmessage{@defunx in invalid context}}
-\def\defmacx #1 {\errmessage{@defmacx in invalid context}}
-\def\defspecx #1 {\errmessage{@defspecx in invalid context}}
-\def\deftypefnx #1 {\errmessage{@deftypefnx in invalid context}}
-\def\deftypeunx #1 {\errmessage{@deftypeunx in invalid context}}
-
-% @defmethod, and so on
-
-% @defop {Funny Method} foo-class frobnicate argument
-
-\def\defop #1 {\def\defoptype{#1}%
-\defopparsebody\Edefop\defopx\defopheader\defoptype}
-
-\def\defopheader #1#2#3{%
-\dosubind {fn}{\code{#2}}{on #1}% Make entry in function index
-\begingroup\defname {#2}{\defoptype{} on #1}%
-\defunargs {#3}\endgroup %
-}
-
-% @defmethod == @defop Method
-
-\def\defmethod{\defmethparsebody\Edefmethod\defmethodx\defmethodheader}
-
-\def\defmethodheader #1#2#3{%
-\dosubind {fn}{\code{#2}}{on #1}% entry in function index
-\begingroup\defname {#2}{Method on #1}%
-\defunargs {#3}\endgroup %
-}
-
-% @defcv {Class Option} foo-class foo-flag
-
-\def\defcv #1 {\def\defcvtype{#1}%
-\defopvarparsebody\Edefcv\defcvx\defcvarheader\defcvtype}
-
-\def\defcvarheader #1#2#3{%
-\dosubind {vr}{\code{#2}}{of #1}% Make entry in var index
-\begingroup\defname {#2}{\defcvtype{} of #1}%
-\defvarargs {#3}\endgroup %
-}
-
-% @defivar == @defcv {Instance Variable}
-
-\def\defivar{\defvrparsebody\Edefivar\defivarx\defivarheader}
-
-\def\defivarheader #1#2#3{%
-\dosubind {vr}{\code{#2}}{of #1}% Make entry in var index
-\begingroup\defname {#2}{Instance Variable of #1}%
-\defvarargs {#3}\endgroup %
-}
-
-% These definitions are run if you use @defmethodx, etc.,
-% anywhere other than immediately after a @defmethod, etc.
-
-\def\defopx #1 {\errmessage{@defopx in invalid context}}
-\def\defmethodx #1 {\errmessage{@defmethodx in invalid context}}
-\def\defcvx #1 {\errmessage{@defcvx in invalid context}}
-\def\defivarx #1 {\errmessage{@defivarx in invalid context}}
-
-% Now @defvar
-
-% First, define the processing that is wanted for arguments of @defvar.
-% This is actually simple: just print them in roman.
-% This must expand the args and terminate the paragraph they make up
-\def\defvarargs #1{\normalparens #1%
-\interlinepenalty=10000
-\endgraf\penalty 10000\vskip -\parskip\penalty 10000}
-
-% @defvr Counter foo-count
-
-\def\defvr{\defvrparsebody\Edefvr\defvrx\defvrheader}
-
-\def\defvrheader #1#2#3{\doind {vr}{\code{#2}}%
-\begingroup\defname {#2}{#1}\defvarargs{#3}\endgroup}
-
-% @defvar == @defvr Variable
-
-\def\defvar{\defvarparsebody\Edefvar\defvarx\defvarheader}
-
-\def\defvarheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index
-\begingroup\defname {#1}{Variable}%
-\defvarargs {#2}\endgroup %
-}
-
-% @defopt == @defvr {User Option}
-
-\def\defopt{\defvarparsebody\Edefopt\defoptx\defoptheader}
-
-\def\defoptheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index
-\begingroup\defname {#1}{User Option}%
-\defvarargs {#2}\endgroup %
-}
-
-% @deftypevar int foobar
-
-\def\deftypevar{\defvarparsebody\Edeftypevar\deftypevarx\deftypevarheader}
-
-% #1 is the data type. #2 is the name.
-\def\deftypevarheader #1#2{%
-\doind {vr}{\code{#2}}% Make entry in variables index
-\begingroup\defname {\defheaderxcond#1\relax$$$#2}{Variable}%
-\interlinepenalty=10000
-\endgraf\penalty 10000\vskip -\parskip\penalty 10000
-\endgroup}
-
-% @deftypevr {Global Flag} int enable
-
-\def\deftypevr{\defvrparsebody\Edeftypevr\deftypevrx\deftypevrheader}
-
-\def\deftypevrheader #1#2#3{\doind {vr}{\code{#3}}%
-\begingroup\defname {\defheaderxcond#2\relax$$$#3}{#1}
-\interlinepenalty=10000
-\endgraf\penalty 10000\vskip -\parskip\penalty 10000
-\endgroup}
-
-% This definition is run if you use @defvarx
-% anywhere other than immediately after a @defvar or @defvarx.
-
-\def\defvrx #1 {\errmessage{@defvrx in invalid context}}
-\def\defvarx #1 {\errmessage{@defvarx in invalid context}}
-\def\defoptx #1 {\errmessage{@defoptx in invalid context}}
-\def\deftypevarx #1 {\errmessage{@deftypevarx in invalid context}}
-\def\deftypevrx #1 {\errmessage{@deftypevrx in invalid context}}
-
-% Now define @deftp
-% Args are printed in bold, a slight difference from @defvar.
-
-\def\deftpargs #1{\bf \defvarargs{#1}}
-
-% @deftp Class window height width ...
-
-\def\deftp{\deftpparsebody\Edeftp\deftpx\deftpheader}
-
-\def\deftpheader #1#2#3{\doind {tp}{\code{#2}}%
-\begingroup\defname {#2}{#1}\deftpargs{#3}\endgroup}
-
-% This definition is run if you use @deftpx, etc
-% anywhere other than immediately after a @deftp, etc.
-
-\def\deftpx #1 {\errmessage{@deftpx in invalid context}}
-
-\message{cross reference,}
-% Define cross-reference macros
-\newwrite \auxfile
-
-\newif\ifhavexrefs % True if xref values are known.
-\newif\ifwarnedxrefs % True if we warned once that they aren't known.
-
-% \setref{foo} defines a cross-reference point named foo.
-
-\def\setref#1{%
-\dosetq{#1-title}{Ytitle}%
-\dosetq{#1-pg}{Ypagenumber}%
-\dosetq{#1-snt}{Ysectionnumberandtype}}
-
-\def\unnumbsetref#1{%
-\dosetq{#1-title}{Ytitle}%
-\dosetq{#1-pg}{Ypagenumber}%
-\dosetq{#1-snt}{Ynothing}}
-
-\def\appendixsetref#1{%
-\dosetq{#1-title}{Ytitle}%
-\dosetq{#1-pg}{Ypagenumber}%
-\dosetq{#1-snt}{Yappendixletterandtype}}
-
-% \xref, \pxref, and \ref generate cross-references to specified points.
-% For \xrefX, #1 is the node name, #2 the name of the Info
-% cross-reference, #3 the printed node name, #4 the name of the Info
-% file, #5 the name of the printed manual. All but the node name can be
-% omitted.
-%
-\def\href#1{\hrefX[#1,,,]}
-\def\hrefX[#1,#2,#3,#4]{#1}
-\def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]}
-\def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]}
-\def\ref#1{\xrefX[#1,,,,,,,]}
-\def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup
- \def\printedmanual{\ignorespaces #5}%
- \def\printednodename{\ignorespaces #3}%
- \setbox1=\hbox{\printedmanual}%
- \setbox0=\hbox{\printednodename}%
- \ifdim \wd0 = 0pt
- % No printed node name was explicitly given.
- \ifx\SETxref-automatic-section-title\thisisundefined
- % Use the node name inside the square brackets.
- \def\printednodename{\ignorespaces #1}%
- \else
- % Use the actual chapter/section title appear inside
- % the square brackets. Use the real section title if we have it.
- \ifdim \wd1>0pt%
- % It is in another manual, so we don't have it.
- \def\printednodename{\ignorespaces #1}%
- \else
- \ifhavexrefs
- % We know the real title if we have the xref values.
- \def\printednodename{\refx{#1-title}{}}%
- \else
- % Otherwise just copy the Info node name.
- \def\printednodename{\ignorespaces #1}%
- \fi%
- \fi
- \fi
- \fi
- %
- % If we use \unhbox0 and \unhbox1 to print the node names, TeX does not
- % insert empty discretionaries after hyphens, which means that it will
- % not find a line break at a hyphen in a node names. Since some manuals
- % are best written with fairly long node names, containing hyphens, this
- % is a loss. Therefore, we give the text of the node name again, so it
- % is as if TeX is seeing it for the first time.
- \ifdim \wd1 > 0pt
- \putwordsection{} ``\printednodename'' in \cite{\printedmanual}%
- \else
- % _ (for example) has to be the character _ for the purposes of the
- % control sequence corresponding to the node, but it has to expand
- % into the usual \leavevmode...\vrule stuff for purposes of
- % printing. So we \turnoffactive for the \refx-snt, back on for the
- % printing, back off for the \refx-pg.
- {\turnoffactive \refx{#1-snt}{}}%
- \space [\printednodename],\space
- \turnoffactive \putwordpage\tie\refx{#1-pg}{}%
- \fi
-\endgroup}
-
-% \dosetq is the interface for calls from other macros
-
-% Use \turnoffactive so that punctuation chars such as underscore
-% work in node names.
-\def\dosetq #1#2{{\let\folio=0 \turnoffactive \auxhat%
-\edef\next{\write\auxfile{\internalsetq {#1}{#2}}}%
-\next}}
-
-% \internalsetq {foo}{page} expands into
-% CHARACTERS 'xrdef {foo}{...expansion of \Ypage...}
-% When the aux file is read, ' is the escape character
-
-\def\internalsetq #1#2{'xrdef {#1}{\csname #2\endcsname}}
-
-% Things to be expanded by \internalsetq
-
-\def\Ypagenumber{\folio}
-
-\def\Ytitle{\thissection}
-
-\def\Ynothing{}
-
-\def\Ysectionnumberandtype{%
-\ifnum\secno=0 \putwordChapter\xreftie\the\chapno %
-\else \ifnum \subsecno=0 \putwordSection\xreftie\the\chapno.\the\secno %
-\else \ifnum \subsubsecno=0 %
-\putwordSection\xreftie\the\chapno.\the\secno.\the\subsecno %
-\else %
-\putwordSection\xreftie\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno %
-\fi \fi \fi }
-
-\def\Yappendixletterandtype{%
-\ifnum\secno=0 \putwordAppendix\xreftie'char\the\appendixno{}%
-\else \ifnum \subsecno=0 \putwordSection\xreftie'char\the\appendixno.\the\secno %
-\else \ifnum \subsubsecno=0 %
-\putwordSection\xreftie'char\the\appendixno.\the\secno.\the\subsecno %
-\else %
-\putwordSection\xreftie'char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno %
-\fi \fi \fi }
-
-\gdef\xreftie{'tie}
-
-% Use TeX 3.0's \inputlineno to get the line number, for better error
-% messages, but if we're using an old version of TeX, don't do anything.
-%
-\ifx\inputlineno\thisisundefined
- \let\linenumber = \empty % Non-3.0.
-\else
- \def\linenumber{\the\inputlineno:\space}
-\fi
-
-% Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME.
-% If its value is nonempty, SUFFIX is output afterward.
-
-\def\refx#1#2{%
- \expandafter\ifx\csname X#1\endcsname\relax
- % If not defined, say something at least.
- $\langle$un\-de\-fined$\rangle$%
- \ifhavexrefs
- \message{\linenumber Undefined cross reference `#1'.}%
- \else
- \ifwarnedxrefs\else
- \global\warnedxrefstrue
- \message{Cross reference values unknown; you must run TeX again.}%
- \fi
- \fi
- \else
- % It's defined, so just use it.
- \csname X#1\endcsname
- \fi
- #2% Output the suffix in any case.
-}
-
-% Read the last existing aux file, if any. No error if none exists.
-
-% This is the macro invoked by entries in the aux file.
-\def\xrdef #1#2{
-{\catcode`\'=\other\expandafter \gdef \csname X#1\endcsname {#2}}}
-
-\def\readauxfile{%
-\begingroup
-\catcode `\^^@=\other
-\catcode `\=\other
-\catcode `\=\other
-\catcode `\^^C=\other
-\catcode `\^^D=\other
-\catcode `\^^E=\other
-\catcode `\^^F=\other
-\catcode `\^^G=\other
-\catcode `\^^H=\other
-\catcode `\ =\other
-\catcode `\^^L=\other
-\catcode `\=\other
-\catcode `\=\other
-\catcode `\=\other
-\catcode `\=\other
-\catcode `\=\other
-\catcode `\=\other
-\catcode `\=\other
-\catcode `\=\other
-\catcode `\=\other
-\catcode `\=\other
-\catcode `\=\other
-\catcode `\=\other
-\catcode 26=\other
-\catcode `\^^[=\other
-\catcode `\^^\=\other
-\catcode `\^^]=\other
-\catcode `\^^^=\other
-\catcode `\^^_=\other
-\catcode `\@=\other
-\catcode `\^=\other
-\catcode `\~=\other
-\catcode `\[=\other
-\catcode `\]=\other
-\catcode`\"=\other
-\catcode`\_=\other
-\catcode`\|=\other
-\catcode`\<=\other
-\catcode`\>=\other
-\catcode `\$=\other
-\catcode `\#=\other
-\catcode `\&=\other
-% `\+ does not work, so use 43.
-\catcode 43=\other
-% Make the characters 128-255 be printing characters
-{%
- \count 1=128
- \def\loop{%
- \catcode\count 1=\other
- \advance\count 1 by 1
- \ifnum \count 1<256 \loop \fi
- }%
-}%
-% the aux file uses ' as the escape.
-% Turn off \ as an escape so we do not lose on
-% entries which were dumped with control sequences in their names.
-% For example, 'xrdef {$\leq $-fun}{page ...} made by @defun ^^
-% Reference to such entries still does not work the way one would wish,
-% but at least they do not bomb out when the aux file is read in.
-\catcode `\{=1 \catcode `\}=2
-\catcode `\%=\other
-\catcode `\'=0
-\catcode`\^=7 % to make ^^e4 etc usable in xref tags
-\catcode `\\=\other
-\openin 1 \jobname.aux
-\ifeof 1 \else \closein 1 \input \jobname.aux \global\havexrefstrue
-\global\warnedobstrue
-\fi
-% Open the new aux file. Tex will close it automatically at exit.
-\openout \auxfile=\jobname.aux
-\endgroup}
-
-
-% Footnotes.
-
-\newcount \footnoteno
-
-% The trailing space in the following definition for supereject is
-% vital for proper filling; pages come out unaligned when you do a
-% pagealignmacro call if that space before the closing brace is
-% removed.
-\def\supereject{\par\penalty -20000\footnoteno =0 }
-
-% @footnotestyle is meaningful for info output only..
-\let\footnotestyle=\comment
-
-\let\ptexfootnote=\footnote
-
-{\catcode `\@=11
-%
-% Auto-number footnotes. Otherwise like plain.
-\gdef\footnote{%
- \global\advance\footnoteno by \@ne
- \edef\thisfootno{$^{\the\footnoteno}$}%
- %
- % In case the footnote comes at the end of a sentence, preserve the
- % extra spacing after we do the footnote number.
- \let\@sf\empty
- \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\/\fi
- %
- % Remove inadvertent blank space before typesetting the footnote number.
- \unskip
- \thisfootno\@sf
- \footnotezzz
-}%
-
-% Don't bother with the trickery in plain.tex to not require the
-% footnote text as a parameter. Our footnotes don't need to be so general.
-%
-\long\gdef\footnotezzz#1{\insert\footins{%
- % We want to typeset this text as a normal paragraph, even if the
- % footnote reference occurs in (for example) a display environment.
- % So reset some parameters.
- \interlinepenalty\interfootnotelinepenalty
- \splittopskip\ht\strutbox % top baseline for broken footnotes
- \splitmaxdepth\dp\strutbox
- \floatingpenalty\@MM
- \leftskip\z@skip
- \rightskip\z@skip
- \spaceskip\z@skip
- \xspaceskip\z@skip
- \parindent\defaultparindent
- %
- % Hang the footnote text off the number.
- \hang
- \textindent{\thisfootno}%
- %
- % Don't crash into the line above the footnote text. Since this
- % expands into a box, it must come within the paragraph, lest it
- % provide a place where TeX can split the footnote.
- \footstrut
- #1\strut}%
-}
-
-}%end \catcode `\@=11
-
-% Set the baselineskip to #1, and the lineskip and strut size
-% correspondingly. There is no deep meaning behind these magic numbers
-% used as factors; they just match (closely enough) what Knuth defined.
-%
-\def\lineskipfactor{.08333}
-\def\strutheightpercent{.70833}
-\def\strutdepthpercent {.29167}
-%
-\def\setleading#1{%
- \normalbaselineskip = #1\relax
- \normallineskip = \lineskipfactor\normalbaselineskip
- \normalbaselines
- \setbox\strutbox =\hbox{%
- \vrule width0pt height\strutheightpercent\baselineskip
- depth \strutdepthpercent \baselineskip
- }%
-}
-
-% @| inserts a changebar to the left of the current line. It should
-% surround any changed text. This approach does *not* work if the
-% change spans more than two lines of output. To handle that, we would
-% have adopt a much more difficult approach (putting marks into the main
-% vertical list for the beginning and end of each change).
-%
-\def\|{%
- % \vadjust can only be used in horizontal mode.
- \leavevmode
- %
- % Append this vertical mode material after the current line in the output.
- \vadjust{%
- % We want to insert a rule with the height and depth of the current
- % leading; that is exactly what \strutbox is supposed to record.
- \vskip-\baselineskip
- %
- % \vadjust-items are inserted at the left edge of the type. So
- % the \llap here moves out into the left-hand margin.
- \llap{%
- %
- % For a thicker or thinner bar, change the `1pt'.
- \vrule height\baselineskip width1pt
- %
- % This is the space between the bar and the text.
- \hskip 12pt
- }%
- }%
-}
-
-% For a final copy, take out the rectangles
-% that mark overfull boxes (in case you have decided
-% that the text looks ok even though it passes the margin).
-%
-\def\finalout{\overfullrule=0pt}
-
-
-% End of control word definitions.
-
-\message{and turning on texinfo input format.}
-
-\def\openindices{%
- \newindex{cp}%
- \newcodeindex{fn}%
- \newcodeindex{vr}%
- \newcodeindex{tp}%
- \newcodeindex{ky}%
- \newcodeindex{pg}%
-}
-
-% Set some numeric style parameters, for 8.5 x 11 format.
-
-%\hsize = 6.5in
-\newdimen\defaultparindent \defaultparindent = 15pt
-\parindent = \defaultparindent
-\parskip 18pt plus 1pt
-\setleading{15pt}
-\advance\topskip by 1.2cm
-
-% Prevent underfull vbox error messages.
-\vbadness=10000
-
-% Following George Bush, just get rid of widows and orphans.
-\widowpenalty=10000
-\clubpenalty=10000
-
-% Use TeX 3.0's \emergencystretch to help line breaking, but if we're
-% using an old version of TeX, don't do anything. We want the amount of
-% stretch added to depend on the line length, hence the dependence on
-% \hsize. This makes it come to about 9pt for the 8.5x11 format.
-%
-\ifx\emergencystretch\thisisundefined
- % Allow us to assign to \emergencystretch anyway.
- \def\emergencystretch{\dimen0}%
-\else
- \emergencystretch = \hsize
- \divide\emergencystretch by 45
-\fi
-
-% Use @smallbook to reset parameters for 7x9.5 format (or else 7x9.25)
-\def\smallbook{
-
-% These values for secheadingskip and subsecheadingskip are
-% experiments. RJC 7 Aug 1992
-\global\secheadingskip = 17pt plus 6pt minus 3pt
-\global\subsecheadingskip = 14pt plus 6pt minus 3pt
-
-\global\lispnarrowing = 0.3in
-\setleading{12pt}
-\advance\topskip by -1cm
-\global\parskip 3pt plus 1pt
-\global\hsize = 5in
-\global\vsize=7.5in
-\global\tolerance=700
-\global\hfuzz=1pt
-\global\contentsrightmargin=0pt
-\global\deftypemargin=0pt
-\global\defbodyindent=.5cm
-
-\global\pagewidth=\hsize
-\global\pageheight=\vsize
-
-\global\let\smalllisp=\smalllispx
-\global\let\smallexample=\smalllispx
-\global\def\Esmallexample{\Esmalllisp}
-}
-
-% Use @afourpaper to print on European A4 paper.
-\def\afourpaper{
-\global\tolerance=700
-\global\hfuzz=1pt
-\setleading{12pt}
-\global\parskip 15pt plus 1pt
-
-\global\vsize= 53\baselineskip
-\advance\vsize by \topskip
-%\global\hsize= 5.85in % A4 wide 10pt
-\global\hsize= 6.5in
-\global\outerhsize=\hsize
-\global\advance\outerhsize by 0.5in
-\global\outervsize=\vsize
-\global\advance\outervsize by 0.6in
-
-\global\pagewidth=\hsize
-\global\pageheight=\vsize
-}
-
-% Allow control of the text dimensions. Parameters in order: textheight;
-% textwidth; \voffset; \hoffset (!); binding offset. All require a dimension;
-% header is additional; added length extends the bottom of the page.
-
-\def\changepagesizes#1#2#3#4#5{
- \global\vsize= #1
- \advance\vsize by \topskip
- \global\voffset= #3
- \global\hsize= #2
- \global\outerhsize=\hsize
- \global\advance\outerhsize by 0.5in
- \global\outervsize=\vsize
- \global\advance\outervsize by 0.6in
- \global\pagewidth=\hsize
- \global\pageheight=\vsize
- \global\normaloffset= #4
- \global\bindingoffset= #5}
-
-% This layout is compatible with Latex on A4 paper.
-
-\def\afourlatex{\changepagesizes{22cm}{15cm}{7mm}{4.6mm}{5mm}}
-
-% Use @afourwide to print on European A4 paper in wide format.
-\def\afourwide{\afourpaper
-\changepagesizes{9.5in}{6.5in}{\hoffset}{\normaloffset}{\bindingoffset}}
-
-% Define macros to output various characters with catcode for normal text.
-\catcode`\"=\other
-\catcode`\~=\other
-\catcode`\^=\other
-\catcode`\_=\other
-\catcode`\|=\other
-\catcode`\<=\other
-\catcode`\>=\other
-\catcode`\+=\other
-\def\normaldoublequote{"}
-\def\normaltilde{~}
-\def\normalcaret{^}
-\def\normalunderscore{_}
-\def\normalverticalbar{|}
-\def\normalless{<}
-\def\normalgreater{>}
-\def\normalplus{+}
-
-% This macro is used to make a character print one way in ttfont
-% where it can probably just be output, and another way in other fonts,
-% where something hairier probably needs to be done.
-%
-% #1 is what to print if we are indeed using \tt; #2 is what to print
-% otherwise. Since all the Computer Modern typewriter fonts have zero
-% interword stretch (and shrink), and it is reasonable to expect all
-% typewriter fonts to have this, we can check that font parameter.
-%
-\def\ifusingtt#1#2{\ifdim \fontdimen3\the\font=0pt #1\else #2\fi}
-
-% Turn off all special characters except @
-% (and those which the user can use as if they were ordinary).
-% Most of these we simply print from the \tt font, but for some, we can
-% use math or other variants that look better in normal text.
-
-\catcode`\"=\active
-\def\activedoublequote{{\tt \char '042}}
-\let"=\activedoublequote
-\catcode`\~=\active
-\def~{{\tt \char '176}}
-\chardef\hat=`\^
-\catcode`\^=\active
-\def\auxhat{\def^{'hat}}
-\def^{{\tt \hat}}
-
-\catcode`\_=\active
-\def_{\ifusingtt\normalunderscore\_}
-% Subroutine for the previous macro.
-\def\_{\leavevmode \kern.06em \vbox{\hrule width.3em height.1ex}}
-
-\catcode`\|=\active
-\def|{{\tt \char '174}}
-\chardef \less=`\<
-\catcode`\<=\active
-\def<{{\tt \less}}
-\chardef \gtr=`\>
-\catcode`\>=\active
-\def>{{\tt \gtr}}
-\catcode`\+=\active
-\def+{{\tt \char 43}}
-%\catcode 27=\active
-%\def^^[{$\diamondsuit$}
-
-% Set up an active definition for =, but don't enable it most of the time.
-{\catcode`\==\active
-\global\def={{\tt \char 61}}}
-
-\catcode`+=\active
-\catcode`\_=\active
-
-% If a .fmt file is being used, characters that might appear in a file
-% name cannot be active until we have parsed the command line.
-% So turn them off again, and have \everyjob (or @setfilename) turn them on.
-% \otherifyactive is called near the end of this file.
-\def\otherifyactive{\catcode`+=\other \catcode`\_=\other}
-
-\catcode`\@=0
-
-% \rawbackslashxx output one backslash character in current font
-\global\chardef\rawbackslashxx=`\\
-%{\catcode`\\=\other
-%@gdef@rawbackslashxx{\}}
-
-% \rawbackslash redefines \ as input to do \rawbackslashxx.
-{\catcode`\\=\active
-@gdef@rawbackslash{@let\=@rawbackslashxx }}
-
-% \normalbackslash outputs one backslash in fixed width font.
-\def\normalbackslash{{\tt\rawbackslashxx}}
-
-% Say @foo, not \foo, in error messages.
-\escapechar=`\@
-
-% \catcode 17=0 % Define control-q
-\catcode`\\=\active
-
-% Used sometimes to turn off (effectively) the active characters
-% even after parsing them.
-@def@turnoffactive{@let"=@normaldoublequote
-@let\=@realbackslash
-@let~=@normaltilde
-@let^=@normalcaret
-@let_=@normalunderscore
-@let|=@normalverticalbar
-@let<=@normalless
-@let>=@normalgreater
-@let+=@normalplus}
-
-@def@normalturnoffactive{@let"=@normaldoublequote
-@let\=@normalbackslash
-@let~=@normaltilde
-@let^=@normalcaret
-@let_=@normalunderscore
-@let|=@normalverticalbar
-@let<=@normalless
-@let>=@normalgreater
-@let+=@normalplus}
-
-% Make _ and + \other characters, temporarily.
-% This is canceled by @fixbackslash.
-@otherifyactive
-
-% If a .fmt file is being used, we don't want the `\input texinfo' to show up.
-% That is what \eatinput is for; after that, the `\' should revert to printing
-% a backslash.
-%
-@gdef@eatinput input texinfo{@fixbackslash}
-@global@let\ = @eatinput
-
-% On the other hand, perhaps the file did not have a `\input texinfo'. Then
-% the first `\{ in the file would cause an error. This macro tries to fix
-% that, assuming it is called before the first `\' could plausibly occur.
-% Also back turn on active characters that might appear in the input
-% file name, in case not using a pre-dumped format.
-%
-@gdef@fixbackslash{@ifx\@eatinput @let\ = @normalbackslash @fi
- @catcode`+=@active @catcode`@_=@active}
-
-%% These look ok in all fonts, so just make them not special. The @rm below
-%% makes sure that the current font starts out as the newly loaded cmr10
-@catcode`@$=@other @catcode`@%=@other @catcode`@&=@other @catcode`@#=@other
-
-@textfonts
-@rm
-
-@c Local variables:
-@c page-delimiter: "^\\\\message"
-@c End:
diff --git a/doc/tools/bmenu/Makefile b/doc/tools/bmenu/Makefile
deleted file mode 100644
index 6d5da7b9d0..0000000000
--- a/doc/tools/bmenu/Makefile
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# COPYRIGHT (c) 1988-1999.
-# On-Line Applications Research Corporation (OAR).
-# All rights reserved.
-#
-# $Id$
-#
-
-CC=gcc
-#CFLAGS=-O4 -fomit-frame-pointer
-CFLAGS=-g
-
-#TEXINPUTS=/home/gnu/work/binutils-2.6/texinfo:.
-PROG=bmenu
-
-all: $(PROG)
-
-$(BASE).txt: $(BASE).d ./$(PROG)
- ./$(PROG) $(BASE).d
-
-$(PROG): main.o chain.o
- gcc main.o chain.o -o $(PROG)
-
-main.o: main.c base.h
-
-chain.o: chain.c
-
-info: c_user.texinfo timer.texi
- makeinfo c_user.texinfo
-
-TESTER=init
-test: all
- #rm -f timer.txt
- #./bmenu -v timer.texi
- #cp ../user/$(TESTER).texi .
- ./bmenu -u "DOCS UP" -p "DOCS PREV" -n "DOCS NEXT" -v testdoc.txt
- #mv $(TESTER).txt $(TESTER).texi
- #makeinfo c_user.texinfo
-
-
-clean:
- rm -f *.o $(PROG) *.txt core *.html
- rm -f *.dvi *.ps *.log *.aux *.cp *.fn *.ky *.pg *.toc *.tp *.vr $(BASE)
- rm -f c_user c_user-* _*
-
diff --git a/doc/tools/bmenu/address.h b/doc/tools/bmenu/address.h
deleted file mode 100644
index 91aa6f3d82..0000000000
--- a/doc/tools/bmenu/address.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/* address.h
- *
- * This include file contains the information required to manipulate
- * physical addresses.
- *
- * COPYRIGHT (c) 1988-1999.
- * On-Line Applications Research Corporation (OAR).
- * All rights reserved.
- *
- * $Id$
- */
-
-#ifndef __ADDRESSES_h
-#define __ADDRESSES_h
-
-/*
- * _Addresses_Add_offset
- *
- * DESCRIPTION:
- *
- * This function is used to add an offset to a base address.
- * It returns the resulting address. This address is typically
- * converted to an access type before being used further.
- */
-
-STATIC INLINE void *_Addresses_Add_offset (
- void *base,
- unsigned32 offset
-);
-
-/*
- * _Addresses_Subtract_offset
- *
- * DESCRIPTION:
- *
- * This function is used to subtract an offset from a base
- * address. It returns the resulting address. This address is
- * typically converted to an access type before being used further.
- */
-
-STATIC INLINE void *_Addresses_Subtract_offset(
- void *base,
- unsigned32 offset
-);
-
-/*
- * _Addresses_Add
- *
- * DESCRIPTION:
- *
- * This function is used to add two addresses. It returns the
- * resulting address. This address is typically converted to an
- * access type before being used further.
- */
-
-STATIC INLINE void *_Addresses_Add (
- void *left,
- void *right
-);
-
-/*
- * _Addresses_Subtract
- *
- * DESCRIPTION:
- *
- * This function is used to subtract two addresses. It returns the
- * resulting offset.
- */
-
-STATIC INLINE unsigned32 _Addresses_Subtract (
- void *left,
- void *right
-);
-
-/*
- * _Addresses_Is_aligned
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the given address is correctly
- * aligned for this processor and FALSE otherwise. Proper alignment
- * is based on correctness and efficiency.
- */
-
-STATIC INLINE boolean _Addresses_Is_aligned (
- void *address
-);
-
-/*
- * _Addresses_Is_in_range
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the given address is within the
- * memory range specified and FALSE otherwise. base is the address
- * of the first byte in the memory range and limit is the address
- * of the last byte in the memory range. The base address is
- * assumed to be lower than the limit address.
- */
-
-STATIC INLINE boolean _Addresses_Is_in_range (
- void *address,
- void *base,
- void *limit
-);
-
-#include "address.inl"
-
-#endif
-/* end of include file */
diff --git a/doc/tools/bmenu/address.inl b/doc/tools/bmenu/address.inl
deleted file mode 100644
index bf3d3ff38b..0000000000
--- a/doc/tools/bmenu/address.inl
+++ /dev/null
@@ -1,105 +0,0 @@
-/* inline/address.inl
- *
- * This include file contains the bodies of the routines
- * about addresses which are inlined.
- *
- * COPYRIGHT (c) 1988-1999.
- * On-Line Applications Research Corporation (OAR).
- * All rights reserved.
- *
- * $Id$
- */
-
-#ifndef __INLINE_ADDRESSES_inl
-#define __INLINE_ADDRESSES_inl
-
-/*PAGE
- *
- * _Addresses_Add_offset
- *
- */
-
-STATIC INLINE void *_Addresses_Add_offset (
- void *base,
- unsigned32 offset
-)
-{
- return (base + offset);
-}
-
-/*PAGE
- *
- * _Addresses_Subtract_offset
- *
- */
-
-STATIC INLINE void *_Addresses_Subtract_offset (
- void *base,
- unsigned32 offset
-)
-{
- return (base - offset);
-}
-
-/*PAGE
- *
- * _Addresses_Add
- *
- * NOTE: The cast of an address to an unsigned32 makes this code
- * dependent on an addresses being thirty two bits.
- */
-
-STATIC INLINE void *_Addresses_Add (
- void *left,
- void *right
-)
-{
- return (left + (unsigned32)right);
-}
-
-/*PAGE
- *
- * _Addresses_Subtract
- *
- * NOTE: The cast of an address to an unsigned32 makes this code
- * dependent on an addresses being thirty two bits.
- */
-
-STATIC INLINE unsigned32 _Addresses_Subtract (
- void *left,
- void *right
-)
-{
- return (left - right);
-}
-
-/*PAGE
- *
- * _Addresses_Is_aligned
- *
- */
-
-STATIC INLINE boolean _Addresses_Is_aligned (
- void *address
-)
-{
- return ( ( (unsigned32)address % 4 ) == 0 );
-}
-
-/*PAGE
- *
- * _Addresses_Is_aligned
- *
- */
-
-STATIC INLINE boolean _Addresses_Is_in_range (
- void *address,
- void *base,
- void *limit
-)
-{
- return ( address >= base && address <= limit );
-}
-
-#endif
-/* end of include file */
diff --git a/doc/tools/bmenu/base.h b/doc/tools/bmenu/base.h
deleted file mode 100644
index 1720cb814a..0000000000
--- a/doc/tools/bmenu/base.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * COPYRIGHT (c) 1988-1999.
- * On-Line Applications Research Corporation (OAR).
- * All rights reserved.
- *
- * $Id$
- */
-
-#ifndef __PDL2AMI_h
-#define __PDL2AMI_h
-
-#include "system.h"
-#include "chain.h"
-
-#ifndef EXTERN
-#define EXTERN extern
-#endif
-
-/*
- * Paragraph size should be kept down because it is allocated for each
- * Line_Control. If this number is large, the memory requirements for
- * the program increase significantly.
- */
-
-#define BUFFER_SIZE (2 * 1024)
-#define PARAGRAPH_SIZE (2 * 1024)
-
-#define NUMBER_ELEMENTS( _x ) (sizeof(_x) / sizeof _x[0])
-
-void exit_application(
- int status
-);
-
-void ProcessFile(
- char *inname,
- char *outname
-);
-
-void strtolower(
- char *dest,
- char *src
-);
-
-void strtoInitialCaps(
- char *dest,
- char *src
-);
-
-void StripBlanks( void );
-
-void MergeParagraphs( void );
-
-int CheckForIncomplete( void );
-
-int CheckOutline( void );
-
-int CheckSections( void );
-
-void GenerateLists( void );
-
-void GenerateAList(
- char *section,
- Chain_Control *the_list
-);
-
-void LookForInternalInconsistencies( void );
-
-int Match_Argument(
- char **array,
- int entries,
- char *users
-);
-
-void usage( void );
-
-void ReadFileIntoChain(
- char *inname
-);
-
-int MergeText( void );
-
-int CheckForBadWhiteSpace();
-
-void RemoveCopyright();
-
-void RemovePagebreaks();
-
-int RemoveExtraBlankLines();
-
-void FormatToTexinfo( void );
-
-void PrintFile(
- char *out
-);
-
-void DumpList(
- Chain_Control *the_list
-);
-
-void ReleaseFile();
-
-EXTERN boolean Verbose; /* status/debug msgs */
-EXTERN boolean BlankAsWarnings;
-EXTERN Chain_Control Lines;
-
-EXTERN int NumberOfAttributes;
-EXTERN int NumberOfAssociations;
-EXTERN int NumberOfAbstractTypes;
-EXTERN int NumberOfDataItems;
-EXTERN int NumberOfMethods;
-EXTERN int NumberOfTasks;
-
-#endif
diff --git a/doc/tools/bmenu/chain.c b/doc/tools/bmenu/chain.c
deleted file mode 100644
index b8f13b51f7..0000000000
--- a/doc/tools/bmenu/chain.c
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
- * Chain Handler
- *
- * COPYRIGHT (c) 1988-1999.
- * On-Line Applications Research Corporation (OAR).
- * All rights reserved.
- *
- * $Id$
- */
-
-#include "system.h"
-#include "address.h"
-#include "chain.h"
-#include "isr.h"
-
-/*PAGE
- *
- * _Chain_Initialize
- *
- * This kernel routine initializes a doubly linked chain.
- *
- * Input parameters:
- * the_chain - pointer to chain header
- * starting_address - starting address of first node
- * number_nodes - number of nodes in chain
- * node_size - size of node in bytes
- *
- * Output parameters: NONE
- */
-
-void _Chain_Initialize(
- Chain_Control *the_chain,
- void *starting_address,
- unsigned32 number_nodes,
- unsigned32 node_size
-)
-{
- unsigned32 count;
- Chain_Node *current;
- Chain_Node *next;
-
- count = number_nodes;
- current = _Chain_Head( the_chain );
- the_chain->permanent_null = NULL;
- next = (Chain_Node *)starting_address;
- while ( count-- ) {
- current->next = next;
- next->previous = current;
- current = next;
- next = (Chain_Node *)
- _Addresses_Add_offset( (void *) next, node_size );
- }
- current->next = _Chain_Tail( the_chain );
- the_chain->last = current;
-}
-
-/*PAGE
- *
- * _Chain_Get_first_unprotected
- */
-
-#ifndef USE_INLINES
-STATIC INLINE Chain_Node *_Chain_Get_first_unprotected(
- Chain_Control *the_chain
-)
-{
- Chain_Node *return_node;
- Chain_Node *new_first;
-
- return_node = the_chain->first;
- new_first = return_node->next;
- the_chain->first = new_first;
- new_first->previous = _Chain_Head( the_chain );
-
- return return_node;
-}
-#endif /* USE_INLINES */
-
-/*PAGE
- *
- * _Chain_Get
- *
- * This kernel routine returns a pointer to a node taken from the
- * given chain.
- *
- * Input parameters:
- * the_chain - pointer to chain header
- *
- * Output parameters:
- * return_node - pointer to node in chain allocated
- * CHAIN_END - if no nodes available
- *
- * INTERRUPT LATENCY:
- * only case
- */
-
-Chain_Node *_Chain_Get(
- Chain_Control *the_chain
-)
-{
- ISR_Level level;
- Chain_Node *return_node;
-
- return_node = NULL;
- _ISR_Disable( level );
- if ( !_Chain_Is_empty( the_chain ) )
- return_node = _Chain_Get_first_unprotected( the_chain );
- _ISR_Enable( level );
- return return_node;
-}
-
-/*PAGE
- *
- * _Chain_Append
- *
- * This kernel routine puts a node on the end of the specified chain.
- *
- * Input parameters:
- * the_chain - pointer to chain header
- * node - address of node to put at rear of chain
- *
- * Output parameters: NONE
- *
- * INTERRUPT LATENCY:
- * only case
- */
-
-void _Chain_Append(
- Chain_Control *the_chain,
- Chain_Node *node
-)
-{
- ISR_Level level;
-
- _ISR_Disable( level );
- _Chain_Append_unprotected( the_chain, node );
- _ISR_Enable( level );
-}
-
-/*PAGE
- *
- * _Chain_Extract
- *
- * This kernel routine deletes the given node from a chain.
- *
- * Input parameters:
- * node - pointer to node in chain to be deleted
- *
- * Output parameters: NONE
- *
- * INTERRUPT LATENCY:
- * only case
- */
-
-void _Chain_Extract(
- Chain_Node *node
-)
-{
- ISR_Level level;
-
- _ISR_Disable( level );
- _Chain_Extract_unprotected( node );
- _ISR_Enable( level );
-}
-
-/*PAGE
- *
- * _Chain_Insert
- *
- * This kernel routine inserts a given node after a specified node
- * a requested chain.
- *
- * Input parameters:
- * after_node - pointer to node in chain to be inserted after
- * node - pointer to node to be inserted
- *
- * Output parameters: NONE
- *
- * INTERRUPT LATENCY:
- * only case
- */
-
-void _Chain_Insert(
- Chain_Node *after_node,
- Chain_Node *node
-)
-{
- ISR_Level level;
-
- _ISR_Disable( level );
- _Chain_Insert_unprotected( after_node, node );
- _ISR_Enable( level );
-}
-
-/*PAGE
- *
- * _Chain_Insert_chain
- *
- * This routine inserts a chain after the specified node in another
- * chain. It is assumed that the insert after node is not on the
- * second chain.
- *
- * Input parameters:
- * insert_after - insert the chain after this node
- * to_insert - the chain to insert
- */
-
-void _Chain_Insert_chain(
- Chain_Node *insert_after,
- Chain_Control *to_insert
-)
-{
- Chain_Node *first;
- Chain_Node *last;
- Chain_Node *insert_after_next;
-
- first = to_insert->first;
- last = to_insert->last;
-
- insert_after_next = insert_after->next;
-
- insert_after->next = first;
- first->previous = insert_after;
-
- insert_after_next->previous = last;
- last->next = insert_after_next;
-
- _Chain_Initialize_empty( to_insert );
-}
diff --git a/doc/tools/bmenu/chain.h b/doc/tools/bmenu/chain.h
deleted file mode 100644
index b2858ba41e..0000000000
--- a/doc/tools/bmenu/chain.h
+++ /dev/null
@@ -1,347 +0,0 @@
-/* chain.h
- *
- * This include file contains all the constants and structures associated
- * with the Doubly Linked Chain Handler.
- *
- * COPYRIGHT (c) 1988-1999.
- * On-Line Applications Research Corporation (OAR).
- * All rights reserved.
- *
- * $Id$
- */
-
-#ifndef __CHAIN_h
-#define __CHAIN_h
-
-#include "address.h"
-
-/*
- * This is used to manage each element (node) which is placed
- * on a chain.
- *
- * NOTE: Typically, a more complicated structure will use the
- * chain package. The more complicated structure will
- * include a chain node as the first element in its
- * control structure. It will then call the chain package
- * with a pointer to that node element. The node pointer
- * and the higher level structure start at the same address
- * so the user can cast the pointers back and forth.
- */
-
-typedef struct Chain_Node_struct Chain_Node;
-
-struct Chain_Node_struct {
- Chain_Node *next;
- Chain_Node *previous;
-};
-
-/*
- * This is used to manage a chain. A chain consists of a doubly
- * linked list of zero or more nodes.
- *
- * NOTE: This implementation does not require special checks for
- * manipulating the first and last elements on the chain.
- * To accomplish this the chain control structure is
- * treated as two overlapping chain nodes. The permanent
- * head of the chain overlays a node structure on the
- * first and permanent_null fields. The permanent tail
- * of the chain overlays a node structure on the
- * permanent_null and last elements of the structure.
- */
-
-typedef struct {
- Chain_Node *first;
- Chain_Node *permanent_null;
- Chain_Node *last;
-} Chain_Control;
-
-/*
- * _Chain_Initialize
- *
- * This routine initializes the_chain structure to manage the
- * contiguous array of number_nodes nodes which starts at
- * starting_address. Each node is of node_size bytes.
- */
-
-void _Chain_Initialize(
- Chain_Control *the_chain,
- void *starting_address,
- unsigned32 number_nodes,
- unsigned32 node_size
-);
-
-/*
- * _Chain_Initialize_empty
- *
- * This routine initializes the specified chain to contain zero nodes.
- */
-
-STATIC INLINE void _Chain_Initialize_empty(
- Chain_Control *the_chain
-);
-
-/*
- * _Chain_Extract_unprotected
- *
- * This routine extracts the_node from the chain on which it resides.
- * It does NOT disable interrupts to insure the atomicity of the
- * extract operation.
- */
-
-STATIC INLINE void _Chain_Extract_unprotected(
- Chain_Node *the_node
-);
-
-/*
- * _Chain_Extract
- *
- * This routine extracts the_node from the chain on which it resides.
- * It disables interrupts to insure the atomicity of the
- * extract operation.
- */
-
-void _Chain_Extract(
- Chain_Node *the_node
-);
-
-/*
- * _Chain_Get_unprotected
- *
- * This function removes the first node from the_chain and returns
- * a pointer to that node. If the_chain is empty, then NULL is returned.
- * It does NOT disable interrupts to insure the atomicity of the
- * get operation.
- */
-
-STATIC INLINE Chain_Node *_Chain_Get_unprotected(
- Chain_Control *the_chain
-);
-
-/*
- * _Chain_Get
- *
- * This function removes the first node from the_chain and returns
- * a pointer to that node. If the_chain is empty, then NULL is returned.
- * It disables interrupts to insure the atomicity of the
- * get operation.
- */
-
-Chain_Node *_Chain_Get(
- Chain_Control *the_chain
-);
-
-/*
- * _Chain_Get_first_unprotected
- *
- * This function removes the first node from the_chain and returns
- * a pointer to that node. It does NOT disable interrupts to insure
- * the atomicity of the get operation.
- */
-
-STATIC INLINE Chain_Node *_Chain_Get_first_unprotected(
- Chain_Control *the_chain
-);
-
-/*
- * _Chain_Insert_unprotected
- *
- * This routine inserts the_node on a chain immediately following
- * after_node. It does NOT disable interrupts to insure the atomicity
- * of the extract operation.
- */
-
-STATIC INLINE void _Chain_Insert_unprotected(
- Chain_Node *after_node,
- Chain_Node *the_node
-);
-
-/*
- * _Chain_Insert
- *
- * This routine inserts the_node on a chain immediately following
- * after_node. It disables interrupts to insure the atomicity
- * of the extract operation.
- */
-
-void _Chain_Insert(
- Chain_Node *after_node,
- Chain_Node *the_node
-);
-
-/*
- * _Chain_Append_unprotected
- *
- * This routine appends the_node onto the end of the_chain.
- * It does NOT disable interrupts to insure the atomicity of the
- * append operation.
- */
-
-STATIC INLINE void _Chain_Append_unprotected(
- Chain_Control *the_chain,
- Chain_Node *the_node
-);
-
-/*
- * _Chain_Append
- *
- * This routine appends the_node onto the end of the_chain.
- * It disables interrupts to insure the atomicity of the
- * append operation.
- */
-
-void _Chain_Append(
- Chain_Control *the_chain,
- Chain_Node *the_node
-);
-
-/*
- * _Chain_Prepend_unprotected
- *
- * This routine prepends the_node onto the front of the_chain.
- * It does NOT disable interrupts to insure the atomicity of the
- * prepend operation.
- */
-
-STATIC INLINE void _Chain_Prepend_unprotected(
- Chain_Control *the_chain,
- Chain_Node *the_node
-);
-
-/*
- * _Chain_Prepend
- *
- * This routine prepends the_node onto the front of the_chain.
- * It disables interrupts to insure the atomicity of the
- * prepend operation.
- */
-
-STATIC INLINE void _Chain_Prepend(
- Chain_Control *the_chain,
- Chain_Node *the_node
-);
-
-/*
- * _Chain_Insert_chain
- *
- * This routine inserts a chain after the specified node in another
- * chain. It is assumed that the insert after node is not on the
- * second chain.
- */
-
-void _Chain_Insert_chain(
- Chain_Node *insert_after,
- Chain_Control *to_insert
-);
-
-/*
- * _Chain_Head
- *
- * This function returns a pointer to the first node on the chain.
- */
-
-STATIC INLINE Chain_Node *_Chain_Head(
- Chain_Control *the_chain
-);
-
-/*
- * _Chain_Tail
- *
- * This function returns a pointer to the last node on the chain.
- */
-
-STATIC INLINE Chain_Node *_Chain_Tail(
- Chain_Control *the_chain
-);
-
-/*
- * _Chain_Is_head
- *
- * This function returns TRUE if the_node is the head of the_chain and
- * FALSE otherwise.
- */
-
-STATIC INLINE boolean _Chain_Is_head(
- Chain_Control *the_chain,
- Chain_Node *the_node
-);
-
-/*
- * _Chain_Is_tail
- *
- * This function returns TRUE if the_node is the tail of the_chain and
- * FALSE otherwise.
- */
-
-STATIC INLINE boolean _Chain_Is_tail(
- Chain_Control *the_chain,
- Chain_Node *the_node
-);
-
-/*
- * _Chain_Is_first
- *
- * This function returns TRUE if the_node is the first node on a chain and
- * FALSE otherwise.
- */
-
-STATIC INLINE boolean _Chain_Is_first(
- Chain_Node *the_node
-);
-
-/*
- * _Chain_Is_last
- *
- * This function returns TRUE if the_node is the last node on a chain and
- * FALSE otherwise.
- */
-
-STATIC INLINE boolean _Chain_Is_last(
- Chain_Node *the_node
-);
-
-/*
- * _Chain_Is_empty
- *
- * This function returns TRUE if there a no nodes on the_chain and
- * FALSE otherwise.
- */
-
-STATIC INLINE boolean _Chain_Is_empty(
- Chain_Control *the_chain
-);
-
-/*
- * _Chain_Has_only_one_node
- *
- * This function returns TRUE if there is only one node on the_chain and
- * FALSE otherwise.
- */
-
-STATIC INLINE boolean _Chain_Has_only_one_node(
- Chain_Control *the_chain
-);
-
-/*
- * _Chain_Is_null
- *
- * This function returns TRUE if the_chain is NULL and FALSE otherwise.
- */
-
-STATIC INLINE boolean _Chain_Is_null(
- Chain_Control *the_chain
-);
-
-/*
- * _Chain_Is_null_node
- *
- * This function returns TRUE if the_node is NULL and FALSE otherwise.
- */
-
-STATIC INLINE boolean _Chain_Is_null_node(
- Chain_Node *the_node
-);
-
-#include "chain.inl"
-
-#endif
-/* end of include file */
diff --git a/doc/tools/bmenu/chain.inl b/doc/tools/bmenu/chain.inl
deleted file mode 100644
index 577c765603..0000000000
--- a/doc/tools/bmenu/chain.inl
+++ /dev/null
@@ -1,271 +0,0 @@
-/* inline/chain.inl
- *
- * This include file contains the bodies of the routines which are
- * associated with doubly linked chains and inlined.
- *
- * COPYRIGHT (c) 1988-1999.
- * On-Line Applications Research Corporation (OAR).
- * All rights reserved.
- *
- * $Id$
- */
-
-#ifndef __INLINE_CHAIN_inl
-#define __INLINE_CHAIN_inl
-
-/*PAGE
- *
- * _Chain_Is_null
- */
-
-STATIC INLINE boolean _Chain_Is_null(
- Chain_Control *the_chain
-)
-{
- return ( the_chain == NULL );
-}
-
-/*PAGE
- *
- * _Chain_Is_null_node
- */
-
-STATIC INLINE boolean _Chain_Is_null_node(
- Chain_Node *the_node
-)
-{
- return ( the_node == NULL );
-}
-
-/*PAGE
- *
- * _Chain_Head
- */
-
-STATIC INLINE Chain_Node *_Chain_Head(
- Chain_Control *the_chain
-)
-{
- return (Chain_Node *) the_chain;
-}
-
-/*PAGE
- *
- * _Chain_Tail
- */
-
-STATIC INLINE Chain_Node *_Chain_Tail(
- Chain_Control *the_chain
-)
-{
- return (Chain_Node *) &the_chain->permanent_null;
-}
-
-/*PAGE
- *
- * _Chain_Is_empty
- */
-
-STATIC INLINE boolean _Chain_Is_empty(
- Chain_Control *the_chain
-)
-{
- return ( the_chain->first == _Chain_Tail( the_chain ) );
-}
-
-/*PAGE
- *
- * _Chain_Is_first
- */
-
-STATIC INLINE boolean _Chain_Is_first(
- Chain_Node *the_node
-)
-{
- return ( the_node->previous == NULL );
-}
-
-/*PAGE
- *
- * _Chain_Is_last
- */
-
-STATIC INLINE boolean _Chain_Is_last(
- Chain_Node *the_node
-)
-{
- return ( the_node->next == NULL );
-}
-
-/*PAGE
- *
- * _Chain_Has_only_one_node
- */
-
-STATIC INLINE boolean _Chain_Has_only_one_node(
- Chain_Control *the_chain
-)
-{
- return ( the_chain->first == the_chain->last );
-}
-
-/*PAGE
- *
- * _Chain_Is_head
- */
-
-STATIC INLINE boolean _Chain_Is_head(
- Chain_Control *the_chain,
- Chain_Node *the_node
-)
-{
- return ( the_node == _Chain_Head( the_chain ) );
-}
-
-/*PAGE
- *
- * _Chain_Is_tail
- */
-
-STATIC INLINE boolean _Chain_Is_tail(
- Chain_Control *the_chain,
- Chain_Node *the_node
-)
-{
- return ( the_node == _Chain_Tail( the_chain ) );
-}
-
-/*PAGE
- *
- * Chain_Initialize_empty
- */
-
-STATIC INLINE void _Chain_Initialize_empty(
- Chain_Control *the_chain
-)
-{
- the_chain->first = _Chain_Tail( the_chain );
- the_chain->permanent_null = NULL;
- the_chain->last = _Chain_Head( the_chain );
-}
-
-/*PAGE
- *
- * _Chain_Extract_unprotected
- */
-
-STATIC INLINE void _Chain_Extract_unprotected(
- Chain_Node *the_node
-)
-{
- Chain_Node *next;
- Chain_Node *previous;
-
- next = the_node->next;
- previous = the_node->previous;
- next->previous = previous;
- previous->next = next;
-}
-
-/*PAGE
- *
- * _Chain_Get_first_unprotected
- */
-
-STATIC INLINE Chain_Node *_Chain_Get_first_unprotected(
- Chain_Control *the_chain
-)
-{
- Chain_Node *return_node;
- Chain_Node *new_first;
-
- return_node = the_chain->first;
- new_first = return_node->next;
- the_chain->first = new_first;
- new_first->previous = _Chain_Head( the_chain );
-
- return return_node;
-}
-
-/*PAGE
- *
- * Chain_Get_unprotected
- */
-
-STATIC INLINE Chain_Node *_Chain_Get_unprotected(
- Chain_Control *the_chain
-)
-{
- if ( !_Chain_Is_empty( the_chain ) )
- return _Chain_Get_first_unprotected( the_chain );
- else
- return NULL;
-}
-
-/*PAGE
- *
- * _Chain_Insert_unprotected
- */
-
-STATIC INLINE void _Chain_Insert_unprotected(
- Chain_Node *after_node,
- Chain_Node *the_node
-)
-{
- Chain_Node *before_node;
-
- the_node->previous = after_node;
- before_node = after_node->next;
- after_node->next = the_node;
- the_node->next = before_node;
- before_node->previous = the_node;
-}
-
-/*PAGE
- *
- * _Chain_Append_unprotected
- */
-
-STATIC INLINE void _Chain_Append_unprotected(
- Chain_Control *the_chain,
- Chain_Node *the_node
-)
-{
- Chain_Node *old_last_node;
-
- the_node->next = _Chain_Tail( the_chain );
- old_last_node = the_chain->last;
- the_chain->last = the_node;
- old_last_node->next = the_node;
- the_node->previous = old_last_node;
-}
-
-/*PAGE
- *
- * _Chain_Prepend_unprotected
- */
-
-STATIC INLINE void _Chain_Prepend_unprotected(
- Chain_Control *the_chain,
- Chain_Node *the_node
-)
-{
- _Chain_Insert_unprotected( _Chain_Head( the_chain ), the_node );
-
-}
-
-/*PAGE
- *
- * _Chain_Prepend
- */
-
-STATIC INLINE void _Chain_Prepend(
- Chain_Control *the_chain,
- Chain_Node *the_node
-)
-{
- _Chain_Insert( _Chain_Head( the_chain ), the_node );
-}
-
-#endif
-/* end of include file */
diff --git a/doc/tools/bmenu/isr.h b/doc/tools/bmenu/isr.h
deleted file mode 100644
index 855683f056..0000000000
--- a/doc/tools/bmenu/isr.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * COPYRIGHT (c) 1988-1999.
- * On-Line Applications Research Corporation (OAR).
- * All rights reserved.
- *
- * $Id$
- */
-
-
-#ifndef __ISR_h
-#define __ISR_h
-
-typedef unsigned32 ISR_Level;
-
-#define _ISR_Disable
-#define _ISR_Enable
-
-#endif
diff --git a/doc/tools/bmenu/main.c b/doc/tools/bmenu/main.c
deleted file mode 100644
index 4cc78c28d1..0000000000
--- a/doc/tools/bmenu/main.c
+++ /dev/null
@@ -1,1061 +0,0 @@
-/*
- * main.c
- *
- * This program takes a texinfo file without node and menu commands,
- * build those commands and inserts them.
- *
- * It works by reading the input file into a linked list of lines
- * and then performing sweeps on that list until all formatting is
- * complete. After the program is run, there is still a little
- * clean up to be performed by hand. The following have to be fixed
- * by hand:
- * + previous of the first node
- * + next of the last node
- *
- * COPYRIGHT (c) 1988-1999.
- * On-Line Applications Research Corporation (OAR).
- * All rights reserved.
- *
- * $Id$
- */
-
-#include <assert.h>
-#include <ctype.h>
-#include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-/* XXX -- just for testing -- these should be set by options */
-char TopString[] = "Top";
-char EmptyString[] = "";
-
-char *DocsNextNode;
-char *DocsPreviousNode;
-char *DocsUpNode;
-int NodeNameIncludesChapter = 1;
-
-extern int optind; /* Why is this not in <stdlib.h>? */
-extern char *optarg; /* Why is this not in <stdlib.h>? */
-
-#ifndef NAME_MAX
-#define NAME_MAX 14 /* Why is the one in limits.h not showing up? */
-#endif
-#define INIT_DATA
-#define EXTERN
-
-#include "base.h"
-
-FILE *OutFile;
-
-/*************************************************************************
- *************************************************************************
- ***** DATA TYPES AND CONSTANT TABLES *****
- *************************************************************************
- *************************************************************************/
-/*
- * Usage Information
- */
-
-char *Usage_Strings[] = {
- "\n",
- "usage: cmd [-cv] [-p prev] [-n next] [-u up] files ...\n",
- "\n",
- "EOF"
-};
-
-/*
- * The page separator is not really a keyword and will be purged before
- * it is seen elsewhere.
- */
-
-#define PAGE_SEPARATOR "#PAGE"
-
-/*
- * Section Delimiter Keywords
- */
-
-#define MAXIMUM_KEYWORD_LENGTH 32
-
-/*
- * Level indicates where in the format the delimiter is allowed to occur.
- * 1 indicates a major section divider (e.g. "ATTRIBUTE DESCRIPTIONS:").
- * 2 indicates a subsection (e.g. "ATTRIBUTE:").
- * 3 indicates a heading (e.g. "DESCRIPTION:").
- */
-
-#define TEXT 0
-#define SECTION 1
-#define SUBSECTION 2
-#define SUBSUBSECTION 3
-#define HEADING 4
-
-typedef enum {
- UNUSED, /* dummy 0 slot */
- KEYWORD_CHAPTER,
- KEYWORD_APPENDIX,
- KEYWORD_PREFACE,
- KEYWORD_CHAPHEADING,
- KEYWORD_SECTION,
- KEYWORD_SUBSECTION,
- KEYWORD_SUBSUBSECTION,
- KEYWORD_RAISE,
- KEYWORD_LOWER,
- KEYWORD_OTHER,
- KEYWORD_END
-
-} Keyword_indices_t;
-
-#define KEYWORD_FIRST KEYOWRD_CHAPTER
-#define KEYWORD_LAST KEYWORD_END
-
-/*
- * Line Management Structure
- */
-
-typedef enum {
- NO_EXTRA_FORMATTING_INFO,
- RAW_OUTPUT,
- PARAGRAPH_OUTPUT
-} ExtraFormat_info_t;
-
-typedef struct {
- Chain_Node Node;
- Keyword_indices_t keyword; /* unused is unknown/undecided */
- ExtraFormat_info_t format;
- int number;
- int level;
- char Contents[ PARAGRAPH_SIZE ];
-} Line_Control;
-
-typedef enum {
- RT_FORBIDDEN, /* no text to right allowed */
- RT_OPTIONAL, /* text to right optional -- none below */
- RT_NONE, /* text to right is "none" or nothing -- none below */
- RT_REQUIRED, /* text to right required -- none below */
- RT_BELOW, /* text to right forbidden -- text below required */
- RT_NONE_OR_BELOW, /* text to right is "none" OR there is text below */
- RT_EITHER, /* text to right OR below */
- RT_BOTH /* text to right AND below */
-} Keywords_text_mode_t;
-
-typedef enum {
- BL_FORBIDDEN, /* text below forbidden */
- BL_FORMATTED, /* text below is to be formatted as paragraphs */
- BL_RAW, /* text below is to be unprocessed by this program */
-} Keywords_text_below_t;
-
-typedef (*Keyword_validater_t)( Line_Control * );
-
-typedef struct {
- char Name[ MAXIMUM_KEYWORD_LENGTH ];
- int level;
- Keywords_text_mode_t text_mode;
- Keywords_text_below_t text_below_mode;
- Keyword_validater_t keyword_validation_routine;
-} Keyword_info_t;
-
-Keyword_info_t Keywords[] = {
- { "unused", 0, 0, 0, NULL }, /* so 0 can be invalid */
- { "@chapter", SECTION, RT_FORBIDDEN, BL_FORBIDDEN, NULL },
- { "@appendix", SECTION, RT_FORBIDDEN, BL_FORBIDDEN, NULL },
- { "@preface", SECTION, RT_FORBIDDEN, BL_FORBIDDEN, NULL },
- { "@chapheading", SECTION, RT_FORBIDDEN, BL_FORBIDDEN, NULL },
- { "@section", SECTION, RT_FORBIDDEN, BL_FORBIDDEN, NULL },
- { "@subsection", SUBSECTION, RT_FORBIDDEN, BL_FORBIDDEN, NULL },
- { "@subsubsection", SUBSUBSECTION, RT_FORBIDDEN, BL_FORBIDDEN, NULL },
- { "@raise", SUBSECTION, RT_FORBIDDEN, BL_FORBIDDEN, NULL },
- { "@lower", SUBSECTION, RT_FORBIDDEN, BL_FORBIDDEN, NULL },
- { "", HEADING, RT_FORBIDDEN, BL_FORBIDDEN, NULL },
- { "END OF FILE", SECTION, RT_FORBIDDEN, BL_FORBIDDEN, NULL }
-};
-
-#define NUMBER_OF_KEYWORDS \
- ( sizeof( Keywords ) / sizeof( Keyword_info_t ) ) - 2
-
-/*
- * exit_application
- */
-
-void exit_application(
- int status
-)
-{
- fprintf( stderr, "*** Error encountered ***\n" );
-/*
- fprintf( stderr, "*** Error encountered on line %d ***\n", CurrentLine );
-*/
- fclose( OutFile );
- exit( status );
-}
-
-/*************************************************************************
- *************************************************************************
- ***** LINE MANIPULATION ROUTINES *****
- *************************************************************************
- *************************************************************************/
-
-/*
- * PrintLine
- */
-
-void PrintLine(
- Line_Control *line
-)
-{
- assert( line );
-
- if ( line->number == -1 )
- fprintf( stderr, " " );
- else
- fprintf( stderr, "%5d", line->number );
-
-#if 0
- fprintf( stderr, "%s\n", line->Contents );
-#else
- /*
- * Include some debugging information
- */
- fprintf(
- stderr,
- "<%d,%d,%d>:%s\n",
- line->keyword,
- line->format,
- line->level,
- line->Contents
- );
-#endif
-}
-
-Chain_Control Line_Pool;
-
-/*
- * FillLinePool
- */
-
-void FillLinePool( void )
-{
- void *pool;
-
-#define LINE_POOL_FILL_COUNT 100
-
- pool = malloc( sizeof( Line_Control ) * LINE_POOL_FILL_COUNT );
- assert( pool );
-
- _Chain_Initialize(
- &Line_Pool,
- pool,
- LINE_POOL_FILL_COUNT,
- sizeof( Line_Control )
- );
-}
-
-/*
- * AllocateLine
- */
-
-Line_Control *AllocateLine( void )
-{
- Line_Control *new_line;
-
- new_line = (Line_Control *) _Chain_Get( &Line_Pool );
- if ( !new_line ) {
- FillLinePool();
- new_line = (Line_Control *) _Chain_Get( &Line_Pool );
- assert( new_line );
- }
-
-/*
- * This is commented out because although it is helpful during debug,
- * it consumes a significant percentage of the program's execution time.
-
- memset( new_line->Contents, '\0', sizeof( new_line->Contents ) );
-*/
- new_line->number = -1;
- new_line->level = -1;
-
- new_line->keyword = UNUSED;
- new_line->format = NO_EXTRA_FORMATTING_INFO;
-
- new_line->Node.next = NULL;
- new_line->Node.previous = NULL;
-
- return new_line;
-}
-
-/*
- * FreeLine
- */
-
-void FreeLine(
- Line_Control *line
-)
-{
- fflush( stdout );
- _Chain_Append( &Line_Pool, &line->Node );
-}
-
-/*
- * DeleteLine
- */
-
-Line_Control *DeleteLine(
- Line_Control *line
-)
-{
- Line_Control *next;
-
- next = (Line_Control *)line->Node.next;
- _Chain_Extract( &line->Node );
- FreeLine( line );
- return next;
-}
-
-/*
- * PrintSurroundingLines
- */
-
-void PrintSurroundingLines(
- Line_Control *line,
- int backward,
- int forward
-)
-{
- int i;
- int real_backward;
- Line_Control *local;
-
- for ( local=line, real_backward=0, i=1 ;
- i<=backward ;
- i++, real_backward++ ) {
- if ( &local->Node == Lines.first )
- break;
- local = (Line_Control *) local->Node.previous;
- }
-
- for ( i=1 ; i<=real_backward ; i++ ) {
- PrintLine( local );
- local = (Line_Control *) local->Node.next;
- }
-
- PrintLine( local );
-
- for ( i=1 ; i<=forward ; i++ ) {
- local = (Line_Control *) local->Node.next;
- if ( _Chain_Is_last( &local->Node ) )
- break;
- PrintLine( local );
- }
-
-}
-
-/*
- * SetLineFormat
- */
-
-void SetLineFormat(
- Line_Control *line,
- ExtraFormat_info_t format
-)
-{
- if ( line->format != NO_EXTRA_FORMATTING_INFO ) {
- fprintf( stderr, "Line %d is already formatted\n", line->number );
- PrintLine( line );
- assert( FALSE );
- }
-
- line->format = format;
-}
-
-/*
- * LineCopyFromRight
- */
-
-void LineCopyFromRight(
- Line_Control *line,
- char *dest
-)
-{
- char *p;
-
- for ( p=line->Contents ; *p != ' ' ; p++ )
- ;
- p++; /* skip the ' ' */
- for ( ; isspace( *p ) ; p++ )
- ;
-
- strcpy( dest, p );
-
-}
-
-/*
- * LineCopySectionName
- */
-
-void LineCopySectionName(
- Line_Control *line,
- char *dest
-)
-{
- char *p;
- char *d;
-
- p = line->Contents;
- d = dest;
-
- if ( *p == '@' ) { /* skip texinfo command */
- while ( !isspace( *p++ ) )
- ;
- }
-
- for ( ; *p ; )
- *d++ = *p++;
-
- *d = '\0';
-}
-
-/*************************************************************************
- *************************************************************************
- ***** END OF LINE MANIPULATION ROUTINES *****
- *************************************************************************
- *************************************************************************/
-
-/*
- * main
- */
-
-int main(
- int argc,
- char **argv
-)
-{
- int c;
- int index;
- boolean single_file_mode;
-
- OutFile = stdout;
- Verbose = FALSE;
- DocsNextNode = EmptyString;
- DocsPreviousNode = TopString;
- DocsUpNode = TopString;
-
- while ((c = getopt(argc, argv, "vcp:n:u:")) != EOF) {
- switch (c) {
- case 'v':
- Verbose = TRUE;
- break;
- case 'c':
- NodeNameIncludesChapter = 0;
- break;
- case 'p':
- DocsPreviousNode = strdup(optarg);
- break;
- case 'n':
- DocsNextNode = strdup(optarg);
- break;
- case 'u':
- DocsUpNode = strdup(optarg);
- break;
-
- case '?':
- usage();
- return 0;
- }
- }
-
- if ( Verbose )
- fprintf( stderr, "Arguments successfully parsed\n" );
-
- FillLinePool();
-
- for ( index=optind ; index < argc ; index++ ) {
- ProcessFile( argv[ index ], NULL );
- }
-
- if ( Verbose )
- fprintf( stderr, "Exitting\n" );
-
- return 0;
-}
-
-/*
- * ProcessFile
- */
-
-void ProcessFile(
- char *inname,
- char *outname
-)
-{
- char out[ 256 ];
- int index;
-
- /*
- * Automatically generate the output file name.
- */
-
- if ( outname == NULL ) {
- for( index=0 ; inname[index] && inname[index] != '.' ; index++ ) {
- out[ index ] = inname[ index ];
- }
-
- if ( !strcmp( &inname[index], ".texi" ) ) {
- fprintf( stderr, "Input file already has .texi extension\n" );
- exit_application( 1 );
- }
-
- out[ index++ ] = '.';
- out[ index++ ] = 't';
- out[ index++ ] = 'e';
- out[ index++ ] = 'x';
- out[ index++ ] = 'i';
- out[ index ] = '\0';
- }
-
- /*
- * Read the file into our internal data structure
- */
-
- if ( Verbose )
- printf( "Processing (%s) -> (%s)\n", inname, out );
-
- ReadFileIntoChain( inname );
-
- if ( Verbose )
- fprintf( stderr, "-------->FILE READ IN\n" );
-
- /*
- * Remove any spaces before the keyword and mark each keyword line as
- * such. Also remove extra white space at the end of lines.
- */
-
- StripBlanks();
-
- if ( Verbose )
- fprintf( stderr, "-------->BLANKS BEFORE KEYWORDS STRIPPED\n" );
-
-
- FormatToTexinfo();
-
- if ( Verbose )
- fprintf( stderr, "-------->FILE FORMATTED TO TEXINFO\n" );
-
- /*
- * Print the file
- */
-
- PrintFile( out );
-
- if ( Verbose )
- fprintf( stderr, "-------->FILE PRINTED\n" );
-
- /*
- * Clean Up
- */
-
- ReleaseFile();
-
- if ( Verbose )
- fprintf( stderr, "-------->FILE RELEASED\n" );
-}
-
-/*
- * usage
- */
-
-void usage( void )
-{
- int index;
-
- for ( index=0 ; strcmp( Usage_Strings[ index ], "EOF" ) ; index++ )
- fprintf( stderr, Usage_Strings[ index ] );
-}
-
-/*
- * ReadFileIntoChain
- */
-
-void ReadFileIntoChain(
- char *inname
-)
-{
- FILE *InFile;
- int line_count;
- int max_length;
- char *line;
- char Buffer[ BUFFER_SIZE ];
- Line_Control *new_line;
-
- InFile = fopen( inname, "r" );
-
- if ( !InFile ) {
- fprintf( stderr, "Unable to open (%s)\n", inname );
- exit( 1 );
- }
- assert( InFile );
-
- max_length = 0;
- line_count = 0;
-
- _Chain_Initialize_empty( &Lines );
-
- for ( ;; ) {
- line = fgets( Buffer, BUFFER_SIZE, InFile );
- if ( !line )
- break;
-
- Buffer[ strlen( Buffer ) - 1 ] = '\0';
-
- new_line = AllocateLine();
-
- strcpy( new_line->Contents, Buffer );
-
- new_line->number = ++line_count;
-
- _Chain_Append( &Lines, &new_line->Node );
- }
-
- fclose( InFile );
-}
-
-/*
- * StripBlanks
- */
-
-void StripBlanks( void )
-{
- Line_Control *line;
- Keyword_indices_t index;
- int indentation;
- int length;
-
- for ( line = (Line_Control *) Lines.first ;
- !_Chain_Is_last( &line->Node ) ;
- line = (Line_Control *) line->Node.next
- ) {
-
- /*
- * Strip white space from the end of each line
- */
-
- length = strlen( line->Contents );
-
- while ( isspace( line->Contents[ --length ] ) )
- line->Contents[ length ] = '\0';
-
- if ( strstr( line->Contents, "@chapter" ) )
- line->keyword = KEYWORD_CHAPTER;
- else if ( strstr( line->Contents, "@appendix" ) )
- line->keyword = KEYWORD_APPENDIX;
- else if ( strstr( line->Contents, "@preface" ) )
- line->keyword = KEYWORD_PREFACE;
- else if ( strstr( line->Contents, "@chapheading" ) )
- line->keyword = KEYWORD_CHAPHEADING;
- else if ( strstr( line->Contents, "@section" ) )
- line->keyword = KEYWORD_SECTION;
- else if ( strstr( line->Contents, "@subsection" ) )
- line->keyword = KEYWORD_SUBSECTION;
- else if ( strstr( line->Contents, "@subsubsection" ) )
- line->keyword = KEYWORD_SUBSUBSECTION;
- else if ( strstr( line->Contents, "@raise" ) )
- line->keyword = KEYWORD_RAISE;
- else if ( strstr( line->Contents, "@lower" ) )
- line->keyword = KEYWORD_LOWER;
- else
- line->keyword = KEYWORD_OTHER;
-
- }
- line = AllocateLine();
- line->keyword = KEYWORD_END;
- _Chain_Append( &Lines, &line->Node );
-}
-
-/*
- * strIsAllSpace
- */
-
-boolean strIsAllSpace(
- char *s
-)
-{
- char *p;
-
- for ( p = s ; *p ; p++ )
- if ( !isspace( *p ) )
- return FALSE;
-
- return TRUE;
-}
-
-/*
- * BuildTexinfoNodes
- */
-
-void BuildTexinfoNodes( void )
-{
- char Buffer[ BUFFER_SIZE ];
- Line_Control *line;
- Line_Control *next_node;
- Line_Control *up_node;
- Line_Control *new_line;
- Line_Control *menu_insert_point;
- Line_Control *node_line;
- int next_found;
- int menu_items;
- Keyword_indices_t index;
- char ChapterName[ BUFFER_SIZE ];
- char NodeName[ BUFFER_SIZE ];
- char UpNodeName[ BUFFER_SIZE ];
- char NextNodeName[ BUFFER_SIZE ];
- char PreviousNodeName[ BUFFER_SIZE ];
-
- /*
- * Set Initial Previous Node Name
- */
-
- strcpy( PreviousNodeName, DocsPreviousNode );
-
- for ( line = (Line_Control *) Lines.first ;
- !_Chain_Is_last( &line->Node ) ;
- line = (Line_Control *) line->Node.next
- ) {
-
- if ( line->level == -1 )
- continue;
-
- LineCopyFromRight( line, NodeName );
-
- if ( line->keyword == KEYWORD_CHAPTER ||
- line->keyword == KEYWORD_APPENDIX ||
- line->keyword == KEYWORD_PREFACE ||
- line->keyword == KEYWORD_CHAPHEADING ) {
-
- strcpy( ChapterName, NodeName );
-
- } else if ( NodeNameIncludesChapter ) {
-
- sprintf( Buffer, "%s %s", ChapterName, NodeName );
- strcpy( NodeName, Buffer );
- }
-
- /*
- * Set Default Next Node Name
- */
-
- next_found = FALSE;
- strcpy( NextNodeName, DocsNextNode );
-
- /*
- * Go ahead and put it on the chain in the right order (ahead of
- * the menu) and we can fill it in later (after the menu is built).
- */
-
- new_line = AllocateLine();
- strcpy( new_line->Contents, "" ); /*"@ifinfo" ); */
- _Chain_Insert( line->Node.previous, &new_line->Node );
-
- node_line = AllocateLine();
- _Chain_Insert( line->Node.previous, &node_line->Node );
-
- new_line = AllocateLine();
- strcpy( new_line->Contents, "" ); /* "@end ifinfo" ); */
- _Chain_Insert( line->Node.previous, &new_line->Node );
-
- next_node = (Line_Control *) line->Node.next;
- menu_insert_point = next_node;
- menu_items = 0;
-
- for ( ; ; ) {
- if ( next_node->keyword == KEYWORD_END )
- break;
-
- if ( next_node->level == -1 )
- goto continue_menu_loop;
-
- LineCopySectionName( next_node, Buffer );
- if ( !next_found ) {
- next_found = TRUE;
- if (NodeNameIncludesChapter)
- sprintf( NextNodeName, "%s %s", ChapterName, Buffer );
- else
- sprintf( NextNodeName, "%s", Buffer );
- }
-
- if ( next_node->level <= line->level )
- break;
-
- if ( next_node->level != (line->level + 1) )
- goto continue_menu_loop;
-
- if ( menu_items == 0 ) {
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@ifinfo" );
- _Chain_Insert( menu_insert_point->Node.previous, &new_line->Node );
-
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@menu" );
- _Chain_Insert( menu_insert_point->Node.previous, &new_line->Node );
- }
-
- menu_items++;
-
- new_line = AllocateLine();
- if (NodeNameIncludesChapter)
- sprintf( new_line->Contents, "* %s %s::", ChapterName, Buffer );
- else
- sprintf( new_line->Contents, "* %s::", Buffer );
- _Chain_Insert( menu_insert_point->Node.previous, &new_line->Node );
-
-continue_menu_loop:
- next_node = (Line_Control *) next_node->Node.next;
- }
-
- /*
- * If menu items were generated, then insert the end of menu stuff.
- */
-
- if ( menu_items ) {
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@end menu" );
- _Chain_Insert( menu_insert_point->Node.previous, &new_line->Node );
-
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@end ifinfo" );
- _Chain_Insert( menu_insert_point->Node.previous, &new_line->Node );
- }
-
- /*
- * Find the UpNodeName
- */
-
-/* DumpList( &Lines ); */
-
- if ( line->level == 0 ) {
- strcpy( UpNodeName, DocsUpNode );
- } else {
- for ( up_node = line;
- up_node && !_Chain_Is_first((Chain_Node *)up_node) ;
- up_node = (Line_Control *) up_node->Node.previous
- ) {
-
- if ( (up_node->level == -1) )
- continue;
-
- if ( up_node->level == (line->level - 1) ) {
- LineCopySectionName( up_node, Buffer );
- if (NodeNameIncludesChapter) {
- if (!strcmp(ChapterName, Buffer))
- sprintf( UpNodeName, "%s", Buffer );
- else
- sprintf( UpNodeName, "%s %s", ChapterName, Buffer );
- } else
- sprintf( UpNodeName, "%s", Buffer );
- break;
- }
- }
- }
-
- /*
- * Update the node information
- */
-
-#if 0
- fprintf(
- stderr,
- "@node %s, %s, %s, %s\n",
- NodeName,
- NextNodeName,
- PreviousNodeName,
- UpNodeName
- );
-#endif
-
- /* node_line was previously inserted */
- if (!NodeNameIncludesChapter) {
- sprintf(
- node_line->Contents,
- "@node %s, %s, %s, %s",
- NodeName,
- NextNodeName,
- PreviousNodeName,
- UpNodeName
- );
- } else {
- sprintf(
- node_line->Contents,
- "@node %s, %s, %s, %s",
- NodeName,
- NextNodeName,
- PreviousNodeName,
- UpNodeName
- );
- }
-
- strcpy( PreviousNodeName, NodeName );
-
- /* PrintLine( line ); */
- }
-}
-
-/*
- * FormatToTexinfo
- */
-
-void FormatToTexinfo( void )
-{
- Line_Control *line;
- int baselevel = 0;
- int currentlevel;
-
- if ( Verbose )
- fprintf( stderr, "-------->INSERTING TEXINFO MENUS\n" );
-
- for ( line = (Line_Control *) Lines.first ;
- !_Chain_Is_last( &line->Node ) ;
- line = (Line_Control *) line->Node.next ) {
-
- switch (line->keyword) {
- case UNUSED:
- case KEYWORD_OTHER:
- case KEYWORD_END:
- line->level = -1;
- break;
- case KEYWORD_CHAPTER:
- case KEYWORD_APPENDIX:
- case KEYWORD_PREFACE:
- case KEYWORD_CHAPHEADING:
- currentlevel = 0;
- line->level = baselevel + currentlevel;
- break;
- case KEYWORD_SECTION:
- currentlevel = 1;
- line->level = baselevel + currentlevel;
- break;
- case KEYWORD_SUBSECTION:
- currentlevel = 2;
- line->level = baselevel + currentlevel;
- break;
- case KEYWORD_SUBSUBSECTION:
- currentlevel = 3;
- line->level = baselevel + currentlevel;
- break;
- case KEYWORD_RAISE:
- assert( baselevel );
- baselevel--;
- line->level = -1;
- break;
- case KEYWORD_LOWER:
- baselevel++;
- line->level = -1;
- break;
- }
- }
-
- BuildTexinfoNodes();
-}
-
-/*
- * PrintFile
- */
-
-void PrintFile(
- char *out
-)
-{
- Line_Control *line;
-
- OutFile = fopen( out, "w+" );
-
- if ( !OutFile ) {
- fprintf( stderr, "Unable to open (%s) for output\n", out );
- exit_application( 1 );
- }
- assert( OutFile );
-
- for ( line = (Line_Control *) Lines.first ;
- !_Chain_Is_last( &line->Node ) ;
- line = (Line_Control *) line->Node.next ) {
- fprintf( OutFile, "%s\n", line->Contents );
-/*
- fprintf(
- OutFile,
- "(%d,%d)%s\n",
- line->keyword,
- line->format,
- line->Contents
- );
-*/
- }
-}
-
-/*
- * DumpList
- */
-
-void DumpList(
- Chain_Control *the_list
-)
-{
- Line_Control *line;
-
- fprintf( stderr, "---> Dumping list (%p)\n", the_list );
-
- for ( line = (Line_Control *) the_list->first ;
- !_Chain_Is_last( &line->Node ) ;
- line = (Line_Control *) line->Node.next ) {
- /* if (line->level != -1) */
- PrintLine( line );
- /* fprintf( stderr, "%s\n", line->Contents ); */
- }
-}
-
-/*
- * ReleaseFile
- */
-
-void ReleaseFile()
-{
- Line_Control *line;
- Line_Control *next;
-
- for ( line = (Line_Control *) Lines.first ;
- !_Chain_Is_last( &line->Node ) ;
- ) {
- next = (Line_Control *) line->Node.next;
- line = next;
- }
-}
-
-/*
- * strtoInitialCaps
- */
-
-void strtoInitialCaps(
- char *dest,
- char *src
-)
-{
- char *source = src;
- char *destination = dest;
-
- source = src;
- destination = (dest) ? dest : src;
-
- while ( *source ) {
- while ( isspace( *source ) )
- *destination++ = *source++;
-
- if ( !*source )
- break;
-
- *destination++ = toupper( *source++ );
-
- for ( ; *source && !isspace( *source ) ; source++ )
- *destination++ = tolower( *source );
-
- if ( !*source )
- break;
- }
-
- *destination = '\0';
-}
diff --git a/doc/tools/bmenu/system.h b/doc/tools/bmenu/system.h
deleted file mode 100644
index 2eb8acafbf..0000000000
--- a/doc/tools/bmenu/system.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * COPYRIGHT (c) 1988-1999.
- * On-Line Applications Research Corporation (OAR).
- * All rights reserved.
- *
- * $Id$
- */
-
-#ifndef __SYSTEM_h
-#define __SYSTEM_h
-
-typedef unsigned int unsigned32;
-typedef unsigned short unsigned16;
-typedef unsigned char unsigned8;
-
-#define USE_INLINES
-#define STATIC static
-#define INLINE inline
-
-#ifndef NULL
-#define NULL 0
-#endif
-
-typedef unsigned int boolean;
-
-#if !defined( TRUE ) || (TRUE != 1)
-#undef TRUE
-#define TRUE (1)
-#endif
-
-#if !defined( FALSE ) || (FALSE != 0)
-#undef FALSE
-#define FALSE 0
-#endif
-
-#endif
diff --git a/doc/tools/pdl2texi/Makefile b/doc/tools/pdl2texi/Makefile
deleted file mode 100644
index 6827898edb..0000000000
--- a/doc/tools/pdl2texi/Makefile
+++ /dev/null
@@ -1,85 +0,0 @@
-#
-# COPYRIGHT (c) 1996-1997.
-# On-Line Applications Research Corporation (OAR).
-# All rights reserved.
-#
-# $Id$
-#
-
-CC=gcc
-#CFLAGS=-O4 -fomit-frame-pointer
-CFLAGS=-g
-
-TEXINPUTS=/home/gnu/work/binutils-2.6/texinfo:.
-PROG=pdl2texi
-
-all: $(PROG)
-
-$(BASE).texi: $(BASE).d ./$(PROG)
- ./$(PROG) $(BASE).d
-
-$(PROG): main.o chain.o
- gcc -static main.o chain.o -o $(PROG)
-
-drive: Drive
-Drive: $(BASE).txt
- /usr1/home/joel/tmp/makeinfo $(PROJECT).texi
-
-main.o: main.c base.h
-
-chain.o: chain.c
-
-dvi: dirs $(PROJECT).dvi
-ps: $(PROJECT).ps
-pdf: dirs $(PROJECT).pdf
-
-$(PROJECT).pdf: $(FILES)
- $(TEXI2PDF) $(PROJECT).texi
-info: Drive
-html: $(PROJECT).texi $(BASE).txt
- ../textools/texi2html $(PROJECT).texi
-
-$(BASE).txt: $(BASE).d
- ./$(PROG) -v -p "Turret Subsystem" -u "Turret Subsystem" $(BASE).d
-
-$(PROJECT).ps: $(PROJECT).dvi
- dvips -o $(PROJECT).ps $(PROJECT).dvi
-
-$(PROJECT).dvi: $(FILES)
- $(TEXI2DVI) $(PROJECT).texi
- cp $(PROJECT).dvi $(WWW_INSTALL)/$(PROJECT)
-
-view:
- test -r $(PROJECT).ps && ghostview $(PROJECT).ps
-
-tests: test test1
-
-test: $(PROG)
- rm -f $(BASE).texi
- ./$(PROG) -v -p "Turret Subsystem" -u "Turret Subsystem" $(BASE).d
-
-test1:
- rm -f t1.txt
- ./$(PROG) -v t1.d
-
-wtest:
- rm -f $(BASE).txt
- ./$(PROG) -w -v -p "Turret Subsystem" -u "Turret Subsystem" $(BASE).d
-
-enum:
- ./$(PROG) -w -v -p "Magic Subsystem" \
- -u "Magic Subsystem" test_cases/enum.d
- ./$(PROG) -w -v -p "Magic Subsystem" \
- -u "Magic Subsystem" test_cases/enumbad.d
-
-avdas:
- ./$(PROG) -v -p "Magic Subsystem" \
- -u "Magic Subsystem" test_cases/avdas.d
- ./$(PROG) -w -v -p "Magic Subsystem" \
- -u "Magic Subsystem" test_cases/avdas.d
-
-clean:
- rm -f *.o $(PROG) *.txt core *.html $(PROJECT) Drive.texi $(PROJECT).pdf
- rm -f *.dvi *.ps *.log *.aux *.cp *.fn *.ky *.pg *.toc *.tp *.vr $(BASE)
- rm -f test_cases/*.txt test_cases/*.texi
-
diff --git a/doc/tools/pdl2texi/address.h b/doc/tools/pdl2texi/address.h
deleted file mode 100644
index 82d73b917d..0000000000
--- a/doc/tools/pdl2texi/address.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/* address.h
- *
- * This include file contains the information required to manipulate
- * physical addresses.
- *
- * COPYRIGHT (c) 1997.
- * On-Line Applications Research Corporation (OAR).
- * All rights reserved.
- *
- * $Id$
- */
-
-#ifndef __ADDRESSES_h
-#define __ADDRESSES_h
-
-/*
- * _Addresses_Add_offset
- *
- * DESCRIPTION:
- *
- * This function is used to add an offset to a base address.
- * It returns the resulting address. This address is typically
- * converted to an access type before being used further.
- */
-
-STATIC INLINE void *_Addresses_Add_offset (
- void *base,
- unsigned32 offset
-);
-
-/*
- * _Addresses_Subtract_offset
- *
- * DESCRIPTION:
- *
- * This function is used to subtract an offset from a base
- * address. It returns the resulting address. This address is
- * typically converted to an access type before being used further.
- */
-
-STATIC INLINE void *_Addresses_Subtract_offset(
- void *base,
- unsigned32 offset
-);
-
-/*
- * _Addresses_Add
- *
- * DESCRIPTION:
- *
- * This function is used to add two addresses. It returns the
- * resulting address. This address is typically converted to an
- * access type before being used further.
- */
-
-STATIC INLINE void *_Addresses_Add (
- void *left,
- void *right
-);
-
-/*
- * _Addresses_Subtract
- *
- * DESCRIPTION:
- *
- * This function is used to subtract two addresses. It returns the
- * resulting offset.
- */
-
-STATIC INLINE unsigned32 _Addresses_Subtract (
- void *left,
- void *right
-);
-
-/*
- * _Addresses_Is_aligned
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the given address is correctly
- * aligned for this processor and FALSE otherwise. Proper alignment
- * is based on correctness and efficiency.
- */
-
-STATIC INLINE boolean _Addresses_Is_aligned (
- void *address
-);
-
-/*
- * _Addresses_Is_in_range
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the given address is within the
- * memory range specified and FALSE otherwise. base is the address
- * of the first byte in the memory range and limit is the address
- * of the last byte in the memory range. The base address is
- * assumed to be lower than the limit address.
- */
-
-STATIC INLINE boolean _Addresses_Is_in_range (
- void *address,
- void *base,
- void *limit
-);
-
-#include "address.inl"
-
-#endif
-/* end of include file */
diff --git a/doc/tools/pdl2texi/address.inl b/doc/tools/pdl2texi/address.inl
deleted file mode 100644
index fda92a9371..0000000000
--- a/doc/tools/pdl2texi/address.inl
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * This include file contains the bodies of the routines
- * about addresses which are inlined.
- *
- * COPYRIGHT (c) 1997.
- * On-Line Applications Research Corporation (OAR).
- * All rights reserved.
- *
- * $Id$
- */
-
-#ifndef __INLINE_ADDRESSES_inl
-#define __INLINE_ADDRESSES_inl
-
-/*PAGE
- *
- * _Addresses_Add_offset
- *
- */
-
-STATIC INLINE void *_Addresses_Add_offset (
- void *base,
- unsigned32 offset
-)
-{
- return (base + offset);
-}
-
-/*PAGE
- *
- * _Addresses_Subtract_offset
- *
- */
-
-STATIC INLINE void *_Addresses_Subtract_offset (
- void *base,
- unsigned32 offset
-)
-{
- return (base - offset);
-}
-
-/*PAGE
- *
- * _Addresses_Add
- *
- * NOTE: The cast of an address to an unsigned32 makes this code
- * dependent on an addresses being thirty two bits.
- */
-
-STATIC INLINE void *_Addresses_Add (
- void *left,
- void *right
-)
-{
- return (left + (unsigned32)right);
-}
-
-/*PAGE
- *
- * _Addresses_Subtract
- *
- * NOTE: The cast of an address to an unsigned32 makes this code
- * dependent on an addresses being thirty two bits.
- */
-
-STATIC INLINE unsigned32 _Addresses_Subtract (
- void *left,
- void *right
-)
-{
- return (left - right);
-}
-
-/*PAGE
- *
- * _Addresses_Is_aligned
- *
- */
-
-STATIC INLINE boolean _Addresses_Is_aligned (
- void *address
-)
-{
- return ( ( (unsigned32)address % 4 ) == 0 );
-}
-
-/*PAGE
- *
- * _Addresses_Is_aligned
- *
- */
-
-STATIC INLINE boolean _Addresses_Is_in_range (
- void *address,
- void *base,
- void *limit
-)
-{
- return ( address >= base && address <= limit );
-}
-
-#endif
-/* end of include file */
diff --git a/doc/tools/pdl2texi/base.h b/doc/tools/pdl2texi/base.h
deleted file mode 100644
index 12d481b3c7..0000000000
--- a/doc/tools/pdl2texi/base.h
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * COPYRIGHT (c) 1997.
- * On-Line Applications Research Corporation (OAR).
- * All rights reserved.
- *
- * $Id$
- */
-
-#ifndef __PDL2AMI_h
-#define __PDL2AMI_h
-
-#include "system.h"
-#include "chain.h"
-
-#ifndef EXTERN
-#define EXTERN extern
-#endif
-
-/*
- * Paragraph size should be kept down because it is allocated for each
- * Line_Control. If this number is large, the memory requirements for
- * the program increase significantly.
- */
-
-#define BUFFER_SIZE (10 * 1024)
-#define PARAGRAPH_SIZE (8 * 1024)
-
-#define NUMBER_ELEMENTS( _x ) (sizeof(_x) / sizeof _x[0])
-
-void exit_application(
- int status
-);
-
-void ProcessFile(
- char *inname,
- char *outname
-);
-
-void strtolower(
- char *dest,
- char *src
-);
-
-void strtoInitialCaps(
- char *dest,
- char *src
-);
-
-void StripBlanks( void );
-
-void MergeParagraphs( void );
-
-int CheckForIncomplete( void );
-
-int CheckOutline( void );
-
-int CheckSections( void );
-
-void GenerateLists( void );
-
-void GenerateAList(
- char *section,
- Chain_Control *the_list
-);
-
-void LookForInternalInconsistencies( void );
-
-int Match_Argument(
- char **array,
- int entries,
- char *users
-);
-
-void usage( void );
-
-void ReadFileIntoChain(
- char *inname
-);
-
-int MergeText( void );
-
-int CheckForBadWhiteSpace();
-
-void RemoveCopyright();
-
-void RemovePagebreaks();
-
-int RemoveExtraBlankLines();
-
-void FormatToTexinfo( void );
-
-void FormatToWord( void );
-
-void PrintFile(
- char *out
-);
-
-void DumpList(
- Chain_Control *the_list
-);
-
-void ReleaseFile();
-
-EXTERN boolean Verbose; /* status/debug msgs */
-EXTERN boolean Statistics; /* statistics msgs */
-EXTERN boolean OutputWord; /* Output MS-Word */
-EXTERN boolean IncompletesAreErrors;
-EXTERN boolean InsertTBDs;
-EXTERN Chain_Control Lines;
-
-EXTERN int NumberOfAttributes;
-EXTERN int NumberOfAssociations;
-EXTERN int NumberOfAbstractTypes;
-EXTERN int NumberOfDataItems;
-EXTERN int NumberOfMethods;
-EXTERN int NumberOfTasks;
-
-
-#endif
diff --git a/doc/tools/pdl2texi/chain.c b/doc/tools/pdl2texi/chain.c
deleted file mode 100644
index 10c96308e9..0000000000
--- a/doc/tools/pdl2texi/chain.c
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
- * Chain Handler
- *
- * COPYRIGHT (c) 1997.
- * On-Line Applications Research Corporation (OAR).
- * All rights reserved.
- *
- * $Id$
- */
-
-#include "system.h"
-#include "address.h"
-#include "chain.h"
-#include "isr.h"
-
-/*PAGE
- *
- * _Chain_Initialize
- *
- * This kernel routine initializes a doubly linked chain.
- *
- * Input parameters:
- * the_chain - pointer to chain header
- * starting_address - starting address of first node
- * number_nodes - number of nodes in chain
- * node_size - size of node in bytes
- *
- * Output parameters: NONE
- */
-
-void _Chain_Initialize(
- Chain_Control *the_chain,
- void *starting_address,
- unsigned32 number_nodes,
- unsigned32 node_size
-)
-{
- unsigned32 count;
- Chain_Node *current;
- Chain_Node *next;
-
- count = number_nodes;
- current = _Chain_Head( the_chain );
- the_chain->permanent_null = NULL;
- next = (Chain_Node *)starting_address;
- while ( count-- ) {
- current->next = next;
- next->previous = current;
- current = next;
- next = (Chain_Node *)
- _Addresses_Add_offset( (void *) next, node_size );
- }
- current->next = _Chain_Tail( the_chain );
- the_chain->last = current;
-}
-
-/*PAGE
- *
- * _Chain_Get_first_unprotected
- */
-
-#ifndef USE_INLINES
-STATIC INLINE Chain_Node *_Chain_Get_first_unprotected(
- Chain_Control *the_chain
-)
-{
- Chain_Node *return_node;
- Chain_Node *new_first;
-
- return_node = the_chain->first;
- new_first = return_node->next;
- the_chain->first = new_first;
- new_first->previous = _Chain_Head( the_chain );
-
- return return_node;
-}
-#endif /* USE_INLINES */
-
-/*PAGE
- *
- * _Chain_Get
- *
- * This kernel routine returns a pointer to a node taken from the
- * given chain.
- *
- * Input parameters:
- * the_chain - pointer to chain header
- *
- * Output parameters:
- * return_node - pointer to node in chain allocated
- * CHAIN_END - if no nodes available
- *
- * INTERRUPT LATENCY:
- * only case
- */
-
-Chain_Node *_Chain_Get(
- Chain_Control *the_chain
-)
-{
- ISR_Level level;
- Chain_Node *return_node;
-
- return_node = NULL;
- _ISR_Disable( level );
- if ( !_Chain_Is_empty( the_chain ) )
- return_node = _Chain_Get_first_unprotected( the_chain );
- _ISR_Enable( level );
- return return_node;
-}
-
-/*PAGE
- *
- * _Chain_Append
- *
- * This kernel routine puts a node on the end of the specified chain.
- *
- * Input parameters:
- * the_chain - pointer to chain header
- * node - address of node to put at rear of chain
- *
- * Output parameters: NONE
- *
- * INTERRUPT LATENCY:
- * only case
- */
-
-void _Chain_Append(
- Chain_Control *the_chain,
- Chain_Node *node
-)
-{
- ISR_Level level;
-
- _ISR_Disable( level );
- _Chain_Append_unprotected( the_chain, node );
- _ISR_Enable( level );
-}
-
-/*PAGE
- *
- * _Chain_Extract
- *
- * This kernel routine deletes the given node from a chain.
- *
- * Input parameters:
- * node - pointer to node in chain to be deleted
- *
- * Output parameters: NONE
- *
- * INTERRUPT LATENCY:
- * only case
- */
-
-void _Chain_Extract(
- Chain_Node *node
-)
-{
- ISR_Level level;
-
- _ISR_Disable( level );
- _Chain_Extract_unprotected( node );
- _ISR_Enable( level );
-}
-
-/*PAGE
- *
- * _Chain_Insert
- *
- * This kernel routine inserts a given node after a specified node
- * a requested chain.
- *
- * Input parameters:
- * after_node - pointer to node in chain to be inserted after
- * node - pointer to node to be inserted
- *
- * Output parameters: NONE
- *
- * INTERRUPT LATENCY:
- * only case
- */
-
-void _Chain_Insert(
- Chain_Node *after_node,
- Chain_Node *node
-)
-{
- ISR_Level level;
-
- _ISR_Disable( level );
- _Chain_Insert_unprotected( after_node, node );
- _ISR_Enable( level );
-}
-
-/*PAGE
- *
- * _Chain_Insert_chain
- *
- * This routine inserts a chain after the specified node in another
- * chain. It is assumed that the insert after node is not on the
- * second chain.
- *
- * Input parameters:
- * insert_after - insert the chain after this node
- * to_insert - the chain to insert
- */
-
-void _Chain_Insert_chain(
- Chain_Node *insert_after,
- Chain_Control *to_insert
-)
-{
- Chain_Node *first;
- Chain_Node *last;
- Chain_Node *insert_after_next;
-
- first = to_insert->first;
- last = to_insert->last;
-
- insert_after_next = insert_after->next;
-
- insert_after->next = first;
- first->previous = insert_after;
-
- insert_after_next->previous = last;
- last->next = insert_after_next;
-
- _Chain_Initialize_empty( to_insert );
-}
diff --git a/doc/tools/pdl2texi/chain.h b/doc/tools/pdl2texi/chain.h
deleted file mode 100644
index e9221aec60..0000000000
--- a/doc/tools/pdl2texi/chain.h
+++ /dev/null
@@ -1,347 +0,0 @@
-/* chain.h
- *
- * This include file contains all the constants and structures associated
- * with the Doubly Linked Chain Handler.
- *
- * COPYRIGHT (c) 1997.
- * On-Line Applications Research Corporation (OAR).
- * All rights reserved.
- *
- * $Id$
- */
-
-#ifndef __CHAIN_h
-#define __CHAIN_h
-
-#include "address.h"
-
-/*
- * This is used to manage each element (node) which is placed
- * on a chain.
- *
- * NOTE: Typically, a more complicated structure will use the
- * chain package. The more complicated structure will
- * include a chain node as the first element in its
- * control structure. It will then call the chain package
- * with a pointer to that node element. The node pointer
- * and the higher level structure start at the same address
- * so the user can cast the pointers back and forth.
- */
-
-typedef struct Chain_Node_struct Chain_Node;
-
-struct Chain_Node_struct {
- Chain_Node *next;
- Chain_Node *previous;
-};
-
-/*
- * This is used to manage a chain. A chain consists of a doubly
- * linked list of zero or more nodes.
- *
- * NOTE: This implementation does not require special checks for
- * manipulating the first and last elements on the chain.
- * To accomplish this the chain control structure is
- * treated as two overlapping chain nodes. The permanent
- * head of the chain overlays a node structure on the
- * first and permanent_null fields. The permanent tail
- * of the chain overlays a node structure on the
- * permanent_null and last elements of the structure.
- */
-
-typedef struct {
- Chain_Node *first;
- Chain_Node *permanent_null;
- Chain_Node *last;
-} Chain_Control;
-
-/*
- * _Chain_Initialize
- *
- * This routine initializes the_chain structure to manage the
- * contiguous array of number_nodes nodes which starts at
- * starting_address. Each node is of node_size bytes.
- */
-
-void _Chain_Initialize(
- Chain_Control *the_chain,
- void *starting_address,
- unsigned32 number_nodes,
- unsigned32 node_size
-);
-
-/*
- * _Chain_Initialize_empty
- *
- * This routine initializes the specified chain to contain zero nodes.
- */
-
-STATIC INLINE void _Chain_Initialize_empty(
- Chain_Control *the_chain
-);
-
-/*
- * _Chain_Extract_unprotected
- *
- * This routine extracts the_node from the chain on which it resides.
- * It does NOT disable interrupts to insure the atomicity of the
- * extract operation.
- */
-
-STATIC INLINE void _Chain_Extract_unprotected(
- Chain_Node *the_node
-);
-
-/*
- * _Chain_Extract
- *
- * This routine extracts the_node from the chain on which it resides.
- * It disables interrupts to insure the atomicity of the
- * extract operation.
- */
-
-void _Chain_Extract(
- Chain_Node *the_node
-);
-
-/*
- * _Chain_Get_unprotected
- *
- * This function removes the first node from the_chain and returns
- * a pointer to that node. If the_chain is empty, then NULL is returned.
- * It does NOT disable interrupts to insure the atomicity of the
- * get operation.
- */
-
-STATIC INLINE Chain_Node *_Chain_Get_unprotected(
- Chain_Control *the_chain
-);
-
-/*
- * _Chain_Get
- *
- * This function removes the first node from the_chain and returns
- * a pointer to that node. If the_chain is empty, then NULL is returned.
- * It disables interrupts to insure the atomicity of the
- * get operation.
- */
-
-Chain_Node *_Chain_Get(
- Chain_Control *the_chain
-);
-
-/*
- * _Chain_Get_first_unprotected
- *
- * This function removes the first node from the_chain and returns
- * a pointer to that node. It does NOT disable interrupts to insure
- * the atomicity of the get operation.
- */
-
-STATIC INLINE Chain_Node *_Chain_Get_first_unprotected(
- Chain_Control *the_chain
-);
-
-/*
- * _Chain_Insert_unprotected
- *
- * This routine inserts the_node on a chain immediately following
- * after_node. It does NOT disable interrupts to insure the atomicity
- * of the extract operation.
- */
-
-STATIC INLINE void _Chain_Insert_unprotected(
- Chain_Node *after_node,
- Chain_Node *the_node
-);
-
-/*
- * _Chain_Insert
- *
- * This routine inserts the_node on a chain immediately following
- * after_node. It disables interrupts to insure the atomicity
- * of the extract operation.
- */
-
-void _Chain_Insert(
- Chain_Node *after_node,
- Chain_Node *the_node
-);
-
-/*
- * _Chain_Append_unprotected
- *
- * This routine appends the_node onto the end of the_chain.
- * It does NOT disable interrupts to insure the atomicity of the
- * append operation.
- */
-
-STATIC INLINE void _Chain_Append_unprotected(
- Chain_Control *the_chain,
- Chain_Node *the_node
-);
-
-/*
- * _Chain_Append
- *
- * This routine appends the_node onto the end of the_chain.
- * It disables interrupts to insure the atomicity of the
- * append operation.
- */
-
-void _Chain_Append(
- Chain_Control *the_chain,
- Chain_Node *the_node
-);
-
-/*
- * _Chain_Prepend_unprotected
- *
- * This routine prepends the_node onto the front of the_chain.
- * It does NOT disable interrupts to insure the atomicity of the
- * prepend operation.
- */
-
-STATIC INLINE void _Chain_Prepend_unprotected(
- Chain_Control *the_chain,
- Chain_Node *the_node
-);
-
-/*
- * _Chain_Prepend
- *
- * This routine prepends the_node onto the front of the_chain.
- * It disables interrupts to insure the atomicity of the
- * prepend operation.
- */
-
-STATIC INLINE void _Chain_Prepend(
- Chain_Control *the_chain,
- Chain_Node *the_node
-);
-
-/*
- * _Chain_Insert_chain
- *
- * This routine inserts a chain after the specified node in another
- * chain. It is assumed that the insert after node is not on the
- * second chain.
- */
-
-void _Chain_Insert_chain(
- Chain_Node *insert_after,
- Chain_Control *to_insert
-);
-
-/*
- * _Chain_Head
- *
- * This function returns a pointer to the first node on the chain.
- */
-
-STATIC INLINE Chain_Node *_Chain_Head(
- Chain_Control *the_chain
-);
-
-/*
- * _Chain_Tail
- *
- * This function returns a pointer to the last node on the chain.
- */
-
-STATIC INLINE Chain_Node *_Chain_Tail(
- Chain_Control *the_chain
-);
-
-/*
- * _Chain_Is_head
- *
- * This function returns TRUE if the_node is the head of the_chain and
- * FALSE otherwise.
- */
-
-STATIC INLINE boolean _Chain_Is_head(
- Chain_Control *the_chain,
- Chain_Node *the_node
-);
-
-/*
- * _Chain_Is_tail
- *
- * This function returns TRUE if the_node is the tail of the_chain and
- * FALSE otherwise.
- */
-
-STATIC INLINE boolean _Chain_Is_tail(
- Chain_Control *the_chain,
- Chain_Node *the_node
-);
-
-/*
- * _Chain_Is_first
- *
- * This function returns TRUE if the_node is the first node on a chain and
- * FALSE otherwise.
- */
-
-STATIC INLINE boolean _Chain_Is_first(
- Chain_Node *the_node
-);
-
-/*
- * _Chain_Is_last
- *
- * This function returns TRUE if the_node is the last node on a chain and
- * FALSE otherwise.
- */
-
-STATIC INLINE boolean _Chain_Is_last(
- Chain_Node *the_node
-);
-
-/*
- * _Chain_Is_empty
- *
- * This function returns TRUE if there a no nodes on the_chain and
- * FALSE otherwise.
- */
-
-STATIC INLINE boolean _Chain_Is_empty(
- Chain_Control *the_chain
-);
-
-/*
- * _Chain_Has_only_one_node
- *
- * This function returns TRUE if there is only one node on the_chain and
- * FALSE otherwise.
- */
-
-STATIC INLINE boolean _Chain_Has_only_one_node(
- Chain_Control *the_chain
-);
-
-/*
- * _Chain_Is_null
- *
- * This function returns TRUE if the_chain is NULL and FALSE otherwise.
- */
-
-STATIC INLINE boolean _Chain_Is_null(
- Chain_Control *the_chain
-);
-
-/*
- * _Chain_Is_null_node
- *
- * This function returns TRUE if the_node is NULL and FALSE otherwise.
- */
-
-STATIC INLINE boolean _Chain_Is_null_node(
- Chain_Node *the_node
-);
-
-#include "chain.inl"
-
-#endif
-/* end of include file */
diff --git a/doc/tools/pdl2texi/chain.inl b/doc/tools/pdl2texi/chain.inl
deleted file mode 100644
index 7393fee7b8..0000000000
--- a/doc/tools/pdl2texi/chain.inl
+++ /dev/null
@@ -1,270 +0,0 @@
-/*
- * This include file contains the bodies of the routines which are
- * associated with doubly linked chains and inlined.
- *
- * COPYRIGHT (c) 1997.
- * On-Line Applications Research Corporation (OAR).
- * All rights reserved.
- *
- * $Id$
- */
-
-#ifndef __INLINE_CHAIN_inl
-#define __INLINE_CHAIN_inl
-
-/*PAGE
- *
- * _Chain_Is_null
- */
-
-STATIC INLINE boolean _Chain_Is_null(
- Chain_Control *the_chain
-)
-{
- return ( the_chain == NULL );
-}
-
-/*PAGE
- *
- * _Chain_Is_null_node
- */
-
-STATIC INLINE boolean _Chain_Is_null_node(
- Chain_Node *the_node
-)
-{
- return ( the_node == NULL );
-}
-
-/*PAGE
- *
- * _Chain_Head
- */
-
-STATIC INLINE Chain_Node *_Chain_Head(
- Chain_Control *the_chain
-)
-{
- return (Chain_Node *) the_chain;
-}
-
-/*PAGE
- *
- * _Chain_Tail
- */
-
-STATIC INLINE Chain_Node *_Chain_Tail(
- Chain_Control *the_chain
-)
-{
- return (Chain_Node *) &the_chain->permanent_null;
-}
-
-/*PAGE
- *
- * _Chain_Is_empty
- */
-
-STATIC INLINE boolean _Chain_Is_empty(
- Chain_Control *the_chain
-)
-{
- return ( the_chain->first == _Chain_Tail( the_chain ) );
-}
-
-/*PAGE
- *
- * _Chain_Is_first
- */
-
-STATIC INLINE boolean _Chain_Is_first(
- Chain_Node *the_node
-)
-{
- return ( the_node->previous == NULL );
-}
-
-/*PAGE
- *
- * _Chain_Is_last
- */
-
-STATIC INLINE boolean _Chain_Is_last(
- Chain_Node *the_node
-)
-{
- return ( the_node->next == NULL );
-}
-
-/*PAGE
- *
- * _Chain_Has_only_one_node
- */
-
-STATIC INLINE boolean _Chain_Has_only_one_node(
- Chain_Control *the_chain
-)
-{
- return ( the_chain->first == the_chain->last );
-}
-
-/*PAGE
- *
- * _Chain_Is_head
- */
-
-STATIC INLINE boolean _Chain_Is_head(
- Chain_Control *the_chain,
- Chain_Node *the_node
-)
-{
- return ( the_node == _Chain_Head( the_chain ) );
-}
-
-/*PAGE
- *
- * _Chain_Is_tail
- */
-
-STATIC INLINE boolean _Chain_Is_tail(
- Chain_Control *the_chain,
- Chain_Node *the_node
-)
-{
- return ( the_node == _Chain_Tail( the_chain ) );
-}
-
-/*PAGE
- *
- * Chain_Initialize_empty
- */
-
-STATIC INLINE void _Chain_Initialize_empty(
- Chain_Control *the_chain
-)
-{
- the_chain->first = _Chain_Tail( the_chain );
- the_chain->permanent_null = NULL;
- the_chain->last = _Chain_Head( the_chain );
-}
-
-/*PAGE
- *
- * _Chain_Extract_unprotected
- */
-
-STATIC INLINE void _Chain_Extract_unprotected(
- Chain_Node *the_node
-)
-{
- Chain_Node *next;
- Chain_Node *previous;
-
- next = the_node->next;
- previous = the_node->previous;
- next->previous = previous;
- previous->next = next;
-}
-
-/*PAGE
- *
- * _Chain_Get_first_unprotected
- */
-
-STATIC INLINE Chain_Node *_Chain_Get_first_unprotected(
- Chain_Control *the_chain
-)
-{
- Chain_Node *return_node;
- Chain_Node *new_first;
-
- return_node = the_chain->first;
- new_first = return_node->next;
- the_chain->first = new_first;
- new_first->previous = _Chain_Head( the_chain );
-
- return return_node;
-}
-
-/*PAGE
- *
- * Chain_Get_unprotected
- */
-
-STATIC INLINE Chain_Node *_Chain_Get_unprotected(
- Chain_Control *the_chain
-)
-{
- if ( !_Chain_Is_empty( the_chain ) )
- return _Chain_Get_first_unprotected( the_chain );
- else
- return NULL;
-}
-
-/*PAGE
- *
- * _Chain_Insert_unprotected
- */
-
-STATIC INLINE void _Chain_Insert_unprotected(
- Chain_Node *after_node,
- Chain_Node *the_node
-)
-{
- Chain_Node *before_node;
-
- the_node->previous = after_node;
- before_node = after_node->next;
- after_node->next = the_node;
- the_node->next = before_node;
- before_node->previous = the_node;
-}
-
-/*PAGE
- *
- * _Chain_Append_unprotected
- */
-
-STATIC INLINE void _Chain_Append_unprotected(
- Chain_Control *the_chain,
- Chain_Node *the_node
-)
-{
- Chain_Node *old_last_node;
-
- the_node->next = _Chain_Tail( the_chain );
- old_last_node = the_chain->last;
- the_chain->last = the_node;
- old_last_node->next = the_node;
- the_node->previous = old_last_node;
-}
-
-/*PAGE
- *
- * _Chain_Prepend_unprotected
- */
-
-STATIC INLINE void _Chain_Prepend_unprotected(
- Chain_Control *the_chain,
- Chain_Node *the_node
-)
-{
- _Chain_Insert_unprotected( _Chain_Head( the_chain ), the_node );
-
-}
-
-/*PAGE
- *
- * _Chain_Prepend
- */
-
-STATIC INLINE void _Chain_Prepend(
- Chain_Control *the_chain,
- Chain_Node *the_node
-)
-{
- _Chain_Insert( _Chain_Head( the_chain ), the_node );
-}
-
-#endif
-/* end of include file */
diff --git a/doc/tools/pdl2texi/isr.h b/doc/tools/pdl2texi/isr.h
deleted file mode 100644
index b9a78fabbc..0000000000
--- a/doc/tools/pdl2texi/isr.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * COPYRIGHT (c) 1997.
- * On-Line Applications Research Corporation (OAR).
- * All rights reserved.
- *
- * $Id$
- */
-
-
-#ifndef __ISR_h
-#define __ISR_h
-
-typedef unsigned32 ISR_Level;
-
-#define _ISR_Disable
-#define _ISR_Enable
-
-#endif
diff --git a/doc/tools/pdl2texi/main.c b/doc/tools/pdl2texi/main.c
deleted file mode 100644
index 25d4ddd2fd..0000000000
--- a/doc/tools/pdl2texi/main.c
+++ /dev/null
@@ -1,3616 +0,0 @@
-/*
- * main.c
- *
- * This program error checks the OAR PDL and converts it into
- * It works by reading the input file into a linked list of lines
- * and then performing sweeps on that list until all formatting is
- * complete.
- *
- * FEATURES:
- * + rudimentary statistics
- * + forgiveness features
- * + output in Texinfo format
- * + output in a form that a sibling MS-Word VBA program can format
- *
- * CHECKS PERFORMED:
- * + unable to open file
- * + unexpected end of file
- * + line should have a colon
- * + basic text (to right or below) associated with keyword
- * improperly placed
- * + an "incomplete marker" is still in place
- * + missing keywords within a subsection
- * + duplicated keywords withing a subsection
- * + subsections in correct order
- * + section header indicates no subsections and there are subsections
- * + section header indicates subsections and there are no subsections
- * + inconsistent spacing in RAW text. This tends to be 1st line with
- * text is indented further than a subsequent line.
- * + missing components on line (incomplete)
- * + invalid repitition of a subsection
- * + type keyword validated for class, type, and spacing between
- * + both members and range are present
- * + neither members and range are present
- * + enumerated types and attributes have members
- * + non-enumerated types and attributes have ranges.
- * + Object name and end object have the same name
- * + booleans in attribute section list both true and false
- * + task synchronization keyword is checked. There must be a valid
- * type of synchronization primitive and a description when expected.
- * + sections in correct order
- *
- * INTERNAL ERRORS:
- * + attempting to reformat an already formatted line
- * + end of processing reached and no formatting assigned to line
- *
- * CHECKS NOT PERFORMED:
- *
- * TODO:
- *
- * IDEAS NOT IMPLEMENTED:
- * + smarter reporting of sections not in the right order
- * + task which uses multiple synchronization types
- * + improved error messages
- * + no introductions inserted to sections
- * + recognize special "symbols" like infinity, +-, etc.
- *
- * QUESTIONS:
- * + "what do I know" is actually a table and should not be reformatted.
- *
- * COPYRIGHT (c) 1997.
- * On-Line Applications Research Corporation (OAR).
- * All rights reserved.
- *
- * $Id$
- */
-
-#include <assert.h>
-#include <ctype.h>
-#include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-/* XXX -- just for testing -- these should be set by options */
-char DocsNextNode[256] = "";
-char DocsPreviousNode[256] = "";
-char DocsUpNode[256] = "";
-
-extern int optind; /* Why is this not in <stdlib.h>? */
-extern char *optarg; /* Why is this not in <stdlib.h>? */
-
-#ifndef NAME_MAX
-#define NAME_MAX 14 /* Why is the one in limits.h not showing up? */
-#endif
-#define INIT_DATA
-#define EXTERN
-
-#include "base.h"
-
-FILE *OutFile;
-
-/*************************************************************************
- *************************************************************************
- ***** DATA TYPES AND CONSTANT TABLES *****
- *************************************************************************
- *************************************************************************/
-/*
- * Usage Information
- */
-
-char *Usage_Strings[] = {
- "\n",
- "usage: cmd [-vti?] [-p previous_node] [-u up_node] files ...\n",
- "\n",
- "EOF"
-};
-
-/*
- * The page separator is not really a keyword and will be purged before
- * it is seen elsewhere.
- */
-
-#define PAGE_SEPARATOR "#PAGE"
-
-/*
- * Section Delimiter Keywords
- */
-
-#define MAXIMUM_KEYWORD_LENGTH 32
-
-/*
- * Level indicates where in the format the delimiter is allowed to occur.
- * 1 indicates a major section divider (e.g. "ATTRIBUTE DESCRIPTIONS:").
- * 2 indicates a subsection (e.g. "ATTRIBUTE:").
- * 3 indicates a heading (e.g. "DESCRIPTION:").
- */
-
-#define TEXT 0
-#define SECTION 1
-#define SUBSECTION 2
-#define HEADING 3
-
-typedef enum {
- UNUSED, /* dummy 0 slot */
- OBJECT, /* sections */
- ATTRIBUTE_DESCRIPTIONS,
- ASSOCIATION_DESCRIPTIONS,
- ABSTRACT_TYPE_DESCRIPTIONS,
- DATA_ITEM_DESCRIPTIONS,
- METHOD_DESCRIPTIONS,
- TASK_DESCRIPTIONS,
- END_OBJECT,
-
- ATTRIBUTE, /* subsections */
- ASSOCIATION,
- ABSTRACT_TYPE,
- DATA_ITEM,
- METHOD,
- TASK,
-
- DESCRIPTION, /* headings */
- COPYRIGHT,
- PORTING,
- THEORY_OF_OPERATION,
- DERIVATION,
- DEPENDENCIES,
- NOTES,
- TYPE,
- RANGE,
- MEMBERS,
- UNITS,
- SCALE_FACTOR,
- DEFAULT,
- TOLERANCE,
- REQUIREMENTS,
- REFERENCES,
- VISIBILITY,
- ASSOCIATED_WITH,
- MULTIPLICITY,
- INPUTS,
- OUTPUTS,
- PDL,
- SYNCHRONIZATION,
- TIMING,
-
- RAW_EXAMPLE, /* our own */
-
-} Keyword_indices_t;
-
-#define KEYWORD_FIRST OBJECT
-#define KEYWORD_LAST TIMING
-
-/*
- * Line Management Structure
- */
-
-typedef enum {
- NO_EXTRA_FORMATTING_INFO,
- RAW_OUTPUT,
- PARAGRAPH_OUTPUT,
- BULLET_OUTPUT,
-} ExtraFormat_info_t;
-
-typedef struct {
- Chain_Node Node;
- Keyword_indices_t keyword; /* unused is unknown/undecided */
- ExtraFormat_info_t format;
- int number;
- char Contents[ PARAGRAPH_SIZE ];
-} Line_Control;
-
-typedef enum {
- RT_NO_CHECK, /* don't do this at all */
- RT_FORBIDDEN, /* no text to right allowed */
- RT_OPTIONAL, /* text to right optional -- none below */
- RT_NONE, /* text to right is "none" or nothing -- none below */
- RT_REQUIRED, /* text to right required -- none below */
- RT_BELOW, /* text to right forbidden -- text below required */
- RT_NONE_OR_BELOW, /* text to right is "none" OR there is text below */
- RT_MAYBE_BELOW, /* text to right required -- text below optional */
- RT_EITHER, /* text to right OR below */
- RT_BOTH /* text to right AND below */
-} Keywords_text_mode_t;
-
-typedef enum {
- BL_FORBIDDEN, /* text below forbidden */
- BL_FORMATTED, /* text below is to be formatted as paragraphs */
- BL_RAW, /* text below is to be unprocessed by this program */
-} Keywords_text_below_t;
-
-typedef int (*Keyword_validater_t)( Line_Control * );
-
-typedef struct {
- char Name[ MAXIMUM_KEYWORD_LENGTH ];
- int level;
- Keywords_text_mode_t text_mode;
- Keywords_text_below_t text_below_mode;
- Keyword_validater_t keyword_validation_routine;
-} Keyword_info_t;
-
-/*
- * Keyword Validation Routines
- */
-
-int Validate_visibility(
- Line_Control *line
-);
-
-int Validate_synchronization(
- Line_Control *line
-);
-
-Keyword_info_t Keywords[] = {
- { "unused",
- 0, 0, 0, NULL }, /* so 0 can be invalid */
- { "OBJECT:",
- SECTION, RT_REQUIRED, BL_FORBIDDEN, NULL },
- { "ATTRIBUTE DESCRIPTIONS:",
- SECTION, RT_NONE, BL_FORBIDDEN, NULL },
- { "ASSOCIATION DESCRIPTIONS:",
- SECTION, RT_NONE, BL_FORBIDDEN, NULL },
- { "ABSTRACT TYPE DESCRIPTIONS:",
- SECTION, RT_NONE, BL_FORBIDDEN, NULL },
- { "DATA ITEM DESCRIPTIONS:",
- SECTION, RT_NONE, BL_FORBIDDEN, NULL },
- { "METHOD DESCRIPTIONS:",
- SECTION, RT_NONE, BL_FORBIDDEN, NULL },
- { "TASK DESCRIPTIONS:",
- SECTION, RT_NONE, BL_FORBIDDEN, NULL },
- { "ENDOBJECT:",
- SECTION, RT_REQUIRED, BL_FORBIDDEN, NULL },
-
- { "ATTRIBUTE:",
- SUBSECTION, RT_REQUIRED, BL_FORBIDDEN, NULL },
- { "ASSOCIATION:",
- SUBSECTION, RT_REQUIRED, BL_FORBIDDEN, NULL },
- { "ABSTRACT TYPE:",
- SUBSECTION, RT_REQUIRED, BL_FORBIDDEN, NULL },
- { "DATA ITEM:",
- SUBSECTION, RT_REQUIRED, BL_FORBIDDEN, NULL },
- { "METHOD:",
- SUBSECTION, RT_REQUIRED, BL_FORBIDDEN, NULL },
- { "TASK:",
- SUBSECTION, RT_REQUIRED, BL_FORBIDDEN, NULL },
-
- { "DESCRIPTION:",
- HEADING, RT_BELOW, BL_FORMATTED, NULL },
- { "COPYRIGHT:",
- HEADING, RT_BELOW, BL_FORMATTED, NULL },
- { "PORTING:",
- HEADING, RT_BELOW, BL_FORMATTED, NULL },
- { "THEORY OF OPERATION:",
- HEADING, RT_BELOW, BL_FORMATTED, NULL },
- { "DERIVATION:",
- HEADING, RT_REQUIRED, BL_FORBIDDEN, NULL },
- { "DEPENDENCIES:",
- HEADING, RT_BELOW, BL_FORMATTED, NULL },
- { "NOTES:",
- HEADING, RT_BELOW, BL_FORMATTED, NULL },
- { "TYPE:",
- HEADING, RT_REQUIRED, BL_FORBIDDEN, NULL },
- { "RANGE:",
- HEADING, RT_REQUIRED, BL_FORBIDDEN, NULL },
- { "MEMBERS:",
- HEADING, RT_BELOW, BL_RAW, NULL },
- { "UNITS:",
- HEADING, RT_REQUIRED, BL_FORBIDDEN, NULL },
- { "SCALE FACTOR:",
- HEADING, RT_REQUIRED, BL_FORBIDDEN, NULL },
- { "DEFAULT:",
- HEADING, RT_EITHER, BL_RAW, NULL },
- { "TOLERANCE:",
- HEADING, RT_REQUIRED, BL_FORBIDDEN, NULL },
- { "REQUIREMENTS:",
- HEADING, RT_BELOW, BL_RAW, NULL },
- { "REFERENCES:",
- HEADING, RT_BELOW, BL_RAW, NULL },
- { "VISIBILITY:",
- HEADING, RT_REQUIRED, BL_FORBIDDEN, Validate_visibility },
- { "ASSOCIATED WITH:",
- HEADING, RT_REQUIRED, BL_FORBIDDEN, NULL },
- { "MULTIPLICITY:",
- HEADING, RT_REQUIRED, BL_FORBIDDEN, NULL },
- { "INPUTS:",
- HEADING, RT_NONE_OR_BELOW, BL_RAW, NULL },
- { "OUTPUTS:",
- HEADING, RT_NONE_OR_BELOW, BL_RAW, NULL },
- { "PDL:",
- HEADING, RT_BELOW, BL_RAW, NULL },
- { "SYNCHRONIZATION:",
- HEADING, RT_MAYBE_BELOW, BL_RAW, Validate_synchronization },
- { "TIMING:",
- HEADING, RT_REQUIRED, BL_FORBIDDEN, NULL },
- { "",
- TEXT, RT_NO_CHECK, BL_RAW, NULL }
-};
-
-#define NUMBER_OF_KEYWORDS \
- ( sizeof( Keywords ) / sizeof( Keyword_info_t ) ) - 2
-
-/*
- * Section Descriptions
- */
-
-#define MAXIMUM_ELEMENTS 16
-
-typedef struct {
- Keyword_indices_t keyword;
- boolean is_required;
-} Element_info_t;
-
-typedef struct Section_info_struct_t Section_info_t;
-
-typedef (*Section_validater_t)(
- Section_info_t *,
- Line_Control *, /* start */
- Line_Control * /* next_section */
-);
-
-struct Section_info_struct_t {
- boolean repeats;
- Keyword_indices_t This_section;
- Keyword_indices_t Next_section;
- Section_validater_t section_validation_routine;
- Element_info_t Description[MAXIMUM_ELEMENTS];
-};
-
-int Validate_object(
- Section_info_t *section,
- Line_Control *start,
- Line_Control *next_section
-);
-
-int Validate_attribute(
- Section_info_t *section,
- Line_Control *start,
- Line_Control *next_section
-);
-
-int Validate_abstract_type(
- Section_info_t *section,
- Line_Control *start,
- Line_Control *next_section
-);
-
-
-Section_info_t ObjectSection = {
- FALSE, /* subsections repeat */
- OBJECT, /* this section */
- ATTRIBUTE_DESCRIPTIONS, /* next section */
- Validate_object, /* validation routine */
- {
- { OBJECT, TRUE }, /* 0 */
- { DESCRIPTION, TRUE }, /* 1 */
- { COPYRIGHT, FALSE }, /* 2 */
- { PORTING, FALSE }, /* 3 */
- { THEORY_OF_OPERATION, TRUE }, /* 4 */
- { DERIVATION, FALSE }, /* 5 */
- { DEPENDENCIES, FALSE }, /* 6 */
- { REQUIREMENTS, FALSE }, /* 7 */
- { REFERENCES, FALSE }, /* 8 */
- { NOTES, FALSE }, /* 9 */
- { UNUSED, FALSE }, /* 10 */
- { UNUSED, FALSE }, /* 11 */
- { UNUSED, FALSE }, /* 12 */
- { UNUSED, FALSE }, /* 13 */
- { UNUSED, FALSE }, /* 14 */
- { UNUSED, FALSE }, /* 15 */
- }
-};
-
-Section_info_t AttributeSection = {
- TRUE, /* subsections repeat */
- ATTRIBUTE_DESCRIPTIONS, /* this section */
- ASSOCIATION_DESCRIPTIONS, /* next section */
- Validate_attribute, /* validation routine */
- {
- { ATTRIBUTE, TRUE }, /* 0 */
- { DESCRIPTION, TRUE }, /* 1 */
- { TYPE, TRUE }, /* 2 */
- { MEMBERS, FALSE }, /* 3 */
- { RANGE, FALSE }, /* 4 */
- { UNITS, FALSE }, /* 5 */
- { SCALE_FACTOR, FALSE }, /* 6 */
- { DEFAULT, FALSE }, /* 7 */
- { TOLERANCE, FALSE }, /* 8 */
- { REQUIREMENTS, FALSE }, /* 9 */
- { REFERENCES, FALSE }, /* 10 */
- { NOTES, FALSE }, /* 11 */
- { UNUSED, FALSE }, /* 12 */
- { UNUSED, FALSE }, /* 13 */
- { UNUSED, FALSE }, /* 14 */
- { UNUSED, FALSE }, /* 15 */
- }
-};
-
-Section_info_t AssociationSection = {
- TRUE, /* subsections repeat */
- ASSOCIATION_DESCRIPTIONS, /* this section */
- ABSTRACT_TYPE_DESCRIPTIONS, /* next section */
- NULL, /* validation routine */
- {
- { ASSOCIATION, TRUE }, /* 0 */
- { DESCRIPTION, TRUE }, /* 1 */
- { VISIBILITY, TRUE }, /* 2 */
- { ASSOCIATED_WITH, TRUE }, /* 3 */
- { MULTIPLICITY, TRUE }, /* 4 */
- { REQUIREMENTS, FALSE }, /* 5 */
- { REFERENCES, FALSE }, /* 6 */
- { NOTES, FALSE }, /* 7 */
- { UNUSED, FALSE }, /* 8 */
- { UNUSED, FALSE }, /* 9 */
- { UNUSED, FALSE }, /* 10 */
- { UNUSED, FALSE }, /* 11 */
- { UNUSED, FALSE }, /* 12 */
- { UNUSED, FALSE }, /* 13 */
- { UNUSED, FALSE }, /* 14 */
- { UNUSED, FALSE }, /* 15 */
- }
-};
-
-Section_info_t AbstractTypeSection = {
- TRUE, /* subsections repeat */
- ABSTRACT_TYPE_DESCRIPTIONS, /* this section */
- DATA_ITEM_DESCRIPTIONS, /* next section */
- Validate_abstract_type, /* validation routine */
- {
- { ABSTRACT_TYPE, TRUE }, /* 0 */
- { DESCRIPTION, TRUE }, /* 1 */
- { VISIBILITY, TRUE }, /* 2 */
- { DERIVATION, TRUE }, /* 3 */
- { MEMBERS, FALSE }, /* 4 */
- { RANGE, FALSE }, /* 5 */
- { UNITS, FALSE }, /* 6 */
- { SCALE_FACTOR, FALSE }, /* 7 */
- { DEFAULT, FALSE }, /* 8 */
- { TOLERANCE, FALSE }, /* 9 */
- { REQUIREMENTS, FALSE }, /* 10 */
- { REFERENCES, FALSE }, /* 11 */
- { NOTES, FALSE }, /* 12 */
- { UNUSED, FALSE }, /* 13 */
- { UNUSED, FALSE }, /* 14 */
- { UNUSED, FALSE }, /* 15 */
- }
-};
-
-Section_info_t DataItemSection = {
- TRUE, /* subsections repeat */
- DATA_ITEM_DESCRIPTIONS, /* this section */
- METHOD_DESCRIPTIONS, /* next section */
- NULL, /* validation routine */
- {
- { DATA_ITEM, TRUE }, /* 0 */
- { DESCRIPTION, TRUE }, /* 1 */
- { TYPE, TRUE }, /* 2 */
- { UNITS, FALSE }, /* 3 */
- { SCALE_FACTOR, FALSE }, /* 4 */
- { DEFAULT, FALSE }, /* 5 */
- { TOLERANCE, FALSE }, /* 6 */
- { NOTES, FALSE }, /* 7 */
- { UNUSED, FALSE }, /* 8 */
- { UNUSED, FALSE }, /* 9 */
- { UNUSED, FALSE }, /* 10 */
- { UNUSED, FALSE }, /* 11 */
- { UNUSED, FALSE }, /* 12 */
- { UNUSED, FALSE }, /* 13 */
- { UNUSED, FALSE }, /* 14 */
- { UNUSED, FALSE }, /* 15 */
- }
-};
-
-Section_info_t MethodSection = {
- TRUE, /* subsections repeat */
- METHOD_DESCRIPTIONS, /* this section */
- TASK_DESCRIPTIONS, /* next section */
- NULL, /* validation routine */
- {
- { METHOD, TRUE }, /* 0 */
- { DESCRIPTION, TRUE }, /* 1 */
- { VISIBILITY, TRUE }, /* 2 */
- { INPUTS, TRUE }, /* 3 */
- { OUTPUTS, TRUE }, /* 4 */
- { REQUIREMENTS, FALSE }, /* 5 */
- { REFERENCES, FALSE }, /* 6 */
- { NOTES, FALSE }, /* 7 */
- { PDL, TRUE }, /* 8 */
- { UNUSED, FALSE }, /* 9 */
- { UNUSED, FALSE }, /* 10 */
- { UNUSED, FALSE }, /* 11 */
- { UNUSED, FALSE }, /* 12 */
- { UNUSED, FALSE }, /* 13 */
- { UNUSED, FALSE }, /* 14 */
- { UNUSED, FALSE }, /* 15 */
- }
-};
-
-Section_info_t TaskSection = {
- TRUE, /* subsections repeat */
- TASK_DESCRIPTIONS, /* this section */
- END_OBJECT, /* next section */
- NULL, /* validation routine */
- {
- { METHOD, TRUE }, /* 0 */
- { DESCRIPTION, TRUE }, /* 1 */
- { VISIBILITY, TRUE }, /* 2 */
- { INPUTS, TRUE }, /* 3 */
- { SYNCHRONIZATION, TRUE }, /* 4 */
- { TIMING, TRUE }, /* 5 */
- { REQUIREMENTS, FALSE }, /* 6 */
- { REFERENCES, FALSE }, /* 7 */
- { NOTES, FALSE }, /* 8 */
- { PDL, TRUE }, /* 9 */
- { UNUSED, FALSE }, /* 10 */
- { UNUSED, FALSE }, /* 11 */
- { UNUSED, FALSE }, /* 12 */
- { UNUSED, FALSE }, /* 13 */
- { UNUSED, FALSE }, /* 14 */
- { UNUSED, FALSE }, /* 15 */
- }
-};
-
-
-Section_info_t *Sections[] = {
- &ObjectSection,
- &AttributeSection,
- &AssociationSection,
- &AbstractTypeSection,
- &DataItemSection,
- &MethodSection,
- &TaskSection
-};
-
-/*
- * exit_application
- */
-
-void exit_application(
- int status
-)
-{
- fprintf( stderr, "*** Error encountered ***\n" );
-/*
- fprintf( stderr, "*** Error encountered on line %d ***\n", CurrentLine );
-*/
- fclose( OutFile );
- exit( 1 );
-}
-
-/*************************************************************************
- *************************************************************************
- ***** LINE MANIPULATION ROUTINES *****
- *************************************************************************
- *************************************************************************/
-
-/*
- * PrintLine
- */
-
-void PrintLine(
- Line_Control *line
-)
-{
- assert( line );
-
- if ( line->number == -1 )
- fprintf( stderr, " " );
- else
- fprintf( stderr, "%5d", line->number );
-
-#if 0
- fprintf( stderr, "%s\n", line->Contents );
-#else
- /*
- * Include some debugging information
- */
- fprintf(
- stderr,
- "<%d,%d>:%s\n",
- line->keyword,
- line->format,
- line->Contents
- );
-#endif
-}
-
-Chain_Control Line_Pool;
-
-/*
- * FillLinePool
- */
-
-void FillLinePool( void )
-{
- void *pool;
-
-#define LINE_POOL_FILL_COUNT 100
-
- pool = malloc( sizeof( Line_Control ) * LINE_POOL_FILL_COUNT );
- assert( pool );
-
- _Chain_Initialize(
- &Line_Pool,
- pool,
- LINE_POOL_FILL_COUNT,
- sizeof( Line_Control )
- );
-}
-
-/*
- * AllocateLine
- */
-
-Line_Control *AllocateLine( void )
-{
- Line_Control *new_line;
-
- new_line = (Line_Control *) _Chain_Get( &Line_Pool );
- if ( !new_line ) {
- FillLinePool();
- new_line = (Line_Control *) _Chain_Get( &Line_Pool );
- assert( new_line );
- }
-
-/*
- * This is commented out because although it is helpful during debug,
- * it consumes a significant percentage of the program's execution time.
- */
-
- memset( new_line->Contents, '\0', sizeof( new_line->Contents ) );
- new_line->number = -1;
-
- new_line->keyword = UNUSED;
- new_line->format = NO_EXTRA_FORMATTING_INFO;
-
- new_line->Node.next = NULL;
- new_line->Node.previous = NULL;
-
- return new_line;
-}
-
-/*
- * FreeLine
- */
-
-void FreeLine(
- Line_Control *line
-)
-{
- fflush( stdout );
- _Chain_Append( &Line_Pool, &line->Node );
-}
-
-/*
- * DeleteLine
- */
-
-Line_Control *DeleteLine(
- Line_Control *line
-)
-{
- Line_Control *next;
-
- next = (Line_Control *)line->Node.next;
- _Chain_Extract( &line->Node );
- FreeLine( line );
- return next;
-}
-
-/*
- * PrintSurroundingLines
- */
-
-void PrintSurroundingLines(
- Line_Control *line,
- int backward,
- int forward
-)
-{
- int i;
- int real_backward;
- Line_Control *local;
-
- for ( local=line, real_backward=0, i=1 ;
- i<=backward ;
- i++, real_backward++ ) {
- if ( &local->Node == Lines.first )
- break;
- local = (Line_Control *) local->Node.previous;
- }
-
- for ( i=1 ; i<=real_backward ; i++ ) {
- PrintLine( local );
- local = (Line_Control *) local->Node.next;
- }
-
- PrintLine( local );
-
- for ( i=1 ; i<=forward ; i++ ) {
- local = (Line_Control *) local->Node.next;
- if ( _Chain_Is_last( &local->Node ) )
- break;
- PrintLine( local );
- }
-
-}
-
-/*
- * SetLineFormat
- */
-
-void SetLineFormat(
- Line_Control *line,
- ExtraFormat_info_t format
-)
-{
- if ( line->format != NO_EXTRA_FORMATTING_INFO ) {
- fprintf( stderr, "Line %d is already formatted\n", line->number );
- PrintLine( line );
- assert( FALSE );
- }
-
- line->format = format;
-}
-
-/*
- * LineCopyFromRight
- */
-
-void LineCopyFromRight(
- Line_Control *line,
- char *dest
-)
-{
- char *p;
-
- for ( p=line->Contents ; *p != ':' ; p++ )
- ;
- p++; /* skip the ':' */
- for ( ; isspace( *p ) ; p++ )
- ;
-
- strcpy( dest, p );
-
-}
-
-/*
- * LineCopySectionName
- */
-
-void LineCopySectionName(
- Line_Control *line,
- char *dest
-)
-{
- char *p;
- char *d;
-
- p = line->Contents;
- d = dest;
-
- if ( *p == '@' ) { /* skip texinfo command */
- while ( !isspace( *p++ ) )
- ;
- }
-
- for ( ; *p != ':' ; )
- *d++ = *p++;
-
- *d = '\0';
-}
-
-/*
- * FormatParagraph
- */
-
-Line_Control *FormatParagraph(
- Line_Control *starting
-)
-{
- Chain_Node *insert_after;
- Line_Control *to_add;
- Line_Control *new_line;
- char Paragraph[ PARAGRAPH_SIZE ];
- int starting_line;
- char *src;
- char *dest;
- boolean do_loop;
- boolean is_bullet;
- int length;
- int i;
-
- length = 0;
-
- starting_line = starting->number;
- insert_after = starting->Node.previous;
- to_add = starting;
-
- dest = Paragraph;
-
- is_bullet = FALSE;
-
- for ( ; ; ) {
- src = to_add->Contents;
-
- for ( ; *src && isspace( *src ) ; src++ ); /* skip leading spaces */
-
- if ( !strncmp( src, "@table", 6 ) ) {
-
- to_add = DeleteLine( to_add );
- src = to_add->Contents;
- for ( i=4 ; *src && isspace( *src ) && i-- ; src++ );
- /* skip leading spaces */
-
- for ( ; ; ) {
- if ( _Chain_Is_last( &to_add->Node ) ) {
- fprintf(
- stderr,
- "Missing end table for table starting at line %d\n",
- starting_line
- );
- exit_application( 1 );
- }
- if ( !strncmp( src, "@end table", 10 ) ) {
- to_add = DeleteLine( to_add );
- return to_add;
- }
- strcpy( Paragraph, src );
- strcpy( to_add->Contents, Paragraph );
- SetLineFormat( to_add, PARAGRAPH_OUTPUT );
- to_add->keyword = RAW_EXAMPLE;
- to_add = (Line_Control *) to_add->Node.next;
-
- src = to_add->Contents;
- for ( i=4 ; *src && isspace( *src ) && i-- ; src++ );
- /* skip leading spaces */
-
- }
- }
-
- if ( *src == '+' ) {
- if ( is_bullet == TRUE )
- break;
- is_bullet = TRUE;
- for ( src++ ; isspace(*src) ; src++ ) ;
- }
-
- do_loop = TRUE;
- while ( *src && do_loop == TRUE ) {
-
- if ( isspace( *src ) ) { /* convert multiple spaces to 1 */
-
- if ( *(dest-1) == '.' ) { /* two spaces after period */
- *dest++ = ' ';
- length++;
- }
-
- assert( length < PARAGRAPH_SIZE );
-
- *dest++ = ' ';
- length++;
-
- assert( length < PARAGRAPH_SIZE );
-
- for ( ; isspace( *src ) ; src++ )
- if ( !*src ) {
- do_loop = FALSE;
- break;
- }
-
- continue;
-
- } else {
- *dest++ = *src;
- length++;
- assert( length < PARAGRAPH_SIZE );
- src++;
- }
- }
-
- to_add = DeleteLine( to_add );
-
- if ( _Chain_Is_last( &to_add->Node ) )
- break;
-
- if ( !strlen( to_add->Contents ) )
- break;
-
- if ( to_add->keyword )
- break;
-
- if ( !isspace( *(dest-1) ) ) {
- if ( *(dest-1) == '.' ) {
- *dest++ = ' ';
- length++;
- assert( length < PARAGRAPH_SIZE );
- }
- *dest++ = ' ';
- length++;
- assert( length < PARAGRAPH_SIZE );
- }
- }
-
- new_line = AllocateLine();
-
- SetLineFormat( new_line, (is_bullet) ? BULLET_OUTPUT : PARAGRAPH_OUTPUT );
-
- *dest = '\0';
-
- strcpy( new_line->Contents, Paragraph );
-
- new_line->number = starting_line;
-
- _Chain_Insert( insert_after, &new_line->Node );
-
- return new_line;
-}
-
-/*
- * FormatMultipleParagraphs
- */
-
-Line_Control *FormatMultipleParagraphs(
- Line_Control *starting
-)
-{
- Line_Control *line = starting;
-
- if ( _Chain_Is_last( &line->Node ) ) {
- fprintf( stderr, "end of file reached when expecting text\n" );
- exit_application( 0 );
- }
-
- if ( line->keyword ) {
- line = (Line_Control *) line->Node.next;
-
- if ( _Chain_Is_last( &line->Node ) ) {
- fprintf( stderr, "end of file reached when expecting text\n" );
- exit_application( 0 );
- }
- }
-
- for ( ;; ) {
- assert( line );
-
- if ( _Chain_Is_last( &line->Node ) )
- break;
-
- if ( line->keyword )
- break;
-
- if ( !strlen( line->Contents ) ) {
- line = DeleteLine( line );
- continue;
- }
-
- line = FormatParagraph( line );
- line = (Line_Control *) line->Node.next;
- }
-}
-
-/*************************************************************************
- *************************************************************************
- ***** END OF LINE MANIPULATION ROUTINES *****
- *************************************************************************
- *************************************************************************/
-
-/*
- * CountKeywordOccurrences
- */
-
-int CountKeywordOccurrences(
- Keyword_indices_t keyword
-)
-{
- int count = 0;
- Line_Control *line;
-
- for ( line = (Line_Control *) Lines.first ;
- !_Chain_Is_last( &line->Node ) ;
- line = (Line_Control *) line->Node.next ) {
- if ( line->keyword == keyword )
- count += 1;
- }
-
- return count;
-}
-
-/*
- * main
- */
-
-int main(
- int argc,
- char **argv
-)
-{
- int c;
- int index;
- boolean single_file_mode;
-
- OutFile = stdout;
- Verbose = FALSE;
- Statistics = FALSE;
- OutputWord = FALSE;
- IncompletesAreErrors = TRUE;
- InsertTBDs = FALSE;
-
- while ((c = getopt(argc, argv, "istvw?n:p:u:")) != EOF) {
- switch (c) {
- case 'i':
- IncompletesAreErrors = FALSE;
- break;
- case 't':
- InsertTBDs = TRUE;
- break;
- case 'v':
- Verbose = TRUE;
- break;
- case 'n':
- strcpy( DocsNextNode, optarg );
- break;
- case 'p':
- strcpy( DocsPreviousNode, optarg );
- break;
- case 'u':
- strcpy( DocsUpNode, optarg );
- break;
- case 's':
- Statistics = TRUE;
- break;
- case 'w':
- OutputWord = TRUE;
- break;
- case '?':
- usage();
- return 0;
- }
- }
-
- if ( Verbose ) {
- fprintf( stderr, "Arguments successfully parsed\n" );
- fprintf( stderr, "Next Node = (%s)\n", DocsNextNode );
- fprintf( stderr, "Previous Node = (%s)\n", DocsPreviousNode );
- fprintf( stderr, "Up Node = (%s)\n", DocsUpNode );
- fprintf( stderr, "Output Format = (%s)\n", (OutputWord) ? "Word" : "Texi" );
- }
-
- FillLinePool();
-
- for ( index=optind ; index < argc ; index++ ) {
- ProcessFile( argv[ index ], NULL );
- }
-
- if ( Verbose )
- fprintf( stderr, "Exitting\n" );
-
- return 0;
-}
-
-/*
- * ProcessFile
- */
-
-void ProcessFile(
- char *inname,
- char *outname
-)
-{
- char out[ 256 ];
- int index;
- int out_index;
-
- /*
- * Automatically generate the output file name.
- */
-
- if ( outname == NULL ) {
- out_index = 0;
- for( index=0 ; inname[index] && inname[index] != '.' ; index++ ) {
-/*
- if ( inname[ index ] != '_' )
-*/
- out[ out_index++ ] = inname[ index ];
- }
-
- if ( OutputWord ) {
- out[ out_index++ ] = '.';
- out[ out_index++ ] = 't';
- out[ out_index++ ] = 'x';
- out[ out_index++ ] = 't';
- } else {
- out[ out_index++ ] = '.';
- out[ out_index++ ] = 't';
- out[ out_index++ ] = 'e';
- out[ out_index++ ] = 'x';
- out[ out_index++ ] = 'i';
- }
- out[ out_index ] = '\0';
-
- }
-
- /*
- * Read the file into our internal data structure
- */
-
- if ( Verbose )
- printf( "Processing (%s) -> (%s)\n", inname, out );
-
- ReadFileIntoChain( inname );
-
- if ( Verbose )
- fprintf( stderr, "-------->FILE READ IN\n" );
-
- /*
- * Remove any spaces before the keyword and mark each keyword line as
- * such. Also remove extra white space at the end of lines.
- */
-
- StripBlanks();
-
- if ( Verbose )
- fprintf( stderr, "-------->BLANKS BEFORE KEYWORDS STRIPPED\n" );
-
- /*
- * Count the number of each type of thing
- */
-
- NumberOfAttributes = CountKeywordOccurrences( ATTRIBUTE );
- NumberOfAssociations = CountKeywordOccurrences( ASSOCIATION );
- NumberOfAbstractTypes = CountKeywordOccurrences( ABSTRACT_TYPE );
- NumberOfDataItems = CountKeywordOccurrences( DATA_ITEM );
- NumberOfMethods = CountKeywordOccurrences( METHOD );
- NumberOfTasks = CountKeywordOccurrences( TASK );
-
- if ( Verbose || Statistics ) {
- fprintf( stderr, "NUMBER OF ATTRIBUTES = %d\n", NumberOfAttributes );
- fprintf( stderr, "NUMBER OF ASSOCIATIONS = %d\n", NumberOfAssociations );
- fprintf( stderr, "NUMBER OF ABSTRACT TYPES = %d\n", NumberOfAbstractTypes);
- fprintf( stderr, "NUMBER OF DATA ITEMS = %d\n", NumberOfDataItems );
- fprintf( stderr, "NUMBER OF METHODS = %d\n", NumberOfMethods );
- fprintf( stderr, "NUMBER OF TASKS = %d\n", NumberOfTasks );
- }
-
- /*
- * 1. Merge paragraphs entered as multiple lines into a single node
- * on the chain.
- * 2. Clean up "colon lines".
- */
-
- if ( MergeText() == -1 )
- exit_application( 1 );
-
- if ( Verbose )
- fprintf( stderr, "-------->PARAGRAPHS MERGED\n" );
-
- RemovePagebreaks();
-
- /*
- * Remove extraneous white space
- */
-
- if ( Verbose )
- fprintf( stderr, "-------->PAGEBREAKS REMOVED\n" );
-
- /*
- * At this point, the only unmarked lines should be empty or errors.
- * This deletes empty unmarked lines and flags the others as errors.
- */
-
- if ( RemoveExtraBlankLines() == -1 )
- exit_application( 1 );
-
- if ( Verbose )
- fprintf( stderr, "-------->EXTRA BLANK LINES REMOVED\n" );
-
- /*
- * Now report which lines do not appear to be complete
- */
-
- if ( CheckForIncomplete() == -1 )
- exit_application( 1 );
-
- if ( Verbose )
- fprintf( stderr, "-------->CHECKED FOR INCOMPLETE KEYWORDS\n" );
-
- /*
- * Check that all the required sections are present.
- */
-
- if ( CheckOutline() == -1 )
- exit_application( 1 );
-
- if ( Verbose )
- fprintf( stderr, "-------->CHECKED FOR HIGH LEVEL SECTION PROBLEMS\n" );
-
- /*
- * Check for problems in each section.
- */
-
- if ( CheckSections() == -1 )
- exit_application( 1 );
-
- if ( Verbose )
- fprintf( stderr, "-------->CHECKED FOR INTERNAL SECTION PROBLEMS\n" );
-
- /*
- * Look for Internal Consistencies
- */
-
- if ( Verbose )
- fprintf( stderr, "-------->LOOKING FOR ERRORS\n" );
-
- LookForInternalInconsistencies();
-
- /*
- * Formatting the file
- */
-
- if ( OutputWord ) {
- FormatToWord();
- if ( Verbose )
- fprintf( stderr, "-------->FILE FORMATTED TO WORD\n" );
- } else {
- FormatToTexinfo();
- if ( Verbose )
- fprintf( stderr, "-------->FILE FORMATTED TO TEXINFO\n" );
- }
-
- /*
- * Print the file
- */
-
- PrintFile( out );
-
- if ( Verbose )
- fprintf( stderr, "-------->FILE PRINTED\n" );
-
- /*
- * Clean Up
- */
-
- ReleaseFile();
-
- if ( Verbose )
- fprintf( stderr, "-------->FILE RELEASED\n" );
-}
-
-/*
- * LookForInternalInconsistencies
- *
- * This routine looks for lines with no formatting information and
- * lines with too much formatting information.
- */
-
-void LookForInternalInconsistencies( void )
-{
- Line_Control *line;
- int i;
- int errors = 0;
- char *src;
-
- for ( line = (Line_Control *) Lines.first ;
- !_Chain_Is_last( &line->Node ) ;
- line = (Line_Control *)line->Node.next
- ) {
- if ( !line->keyword && line->format == NO_EXTRA_FORMATTING_INFO ) {
- fprintf(
- stderr,
- "\nLine %d has no keyword or formatting:\n",
- line->number
- );
- PrintSurroundingLines( line, 3, 3 );
- errors++;
- }
- }
-
- if ( errors )
- exit_application( 1 );
-}
-
-/*
- * usage
- */
-
-void usage( void )
-{
- int index;
-
- for ( index=0 ; strcmp( Usage_Strings[ index ], "EOF" ) ; index++ )
- fprintf( stderr, Usage_Strings[ index ] );
-}
-
-/*
- * ReadFileIntoChain
- */
-
-void ReadFileIntoChain(
- char *inname
-)
-{
- FILE *InFile;
- int line_count;
- int max_length;
- char *line;
- char Buffer[ BUFFER_SIZE ];
- Line_Control *new_line;
-
- InFile = fopen( inname, "r" );
-
- if ( !InFile ) {
- fprintf( stderr, "Unable to open (%s)\n", inname );
- exit( 1 );
- }
- assert( InFile );
-
- max_length = 0;
- line_count = 0;
-
- _Chain_Initialize_empty( &Lines );
-
- for ( ;; ) {
- line = fgets( Buffer, BUFFER_SIZE, InFile );
- if ( !line )
- break;
-
- Buffer[ strlen( Buffer ) - 1 ] = '\0';
-
- new_line = AllocateLine();
-
- strcpy( new_line->Contents, Buffer );
-
- new_line->number = ++line_count;
-
- _Chain_Append( &Lines, &new_line->Node );
- }
-
- fclose( InFile );
-}
-
-/*
- * StripBlanks
- */
-
-void StripBlanks( void )
-{
- Line_Control *line;
- Keyword_indices_t index;
- int indentation;
- int length;
- Keyword_info_t *key;
-
- for ( line = (Line_Control *) Lines.first ;
- !_Chain_Is_last( &line->Node ) ;
- line = (Line_Control *) line->Node.next
- ) {
-
- /*
- * Strip white space from the end of each line
- */
-
- length = strlen( line->Contents );
-
- while ( isspace( line->Contents[ --length ] ) )
- line->Contents[ length ] = '\0';
-
- /*
- * Strip white space from the front of each keyword line.
- */
-
- for ( index=KEYWORD_FIRST ; index <= KEYWORD_LAST ; index++ ) {
- key = &Keywords[ index ];
-
- switch ( key->level ) {
- case SECTION: indentation = 0; break;
- case SUBSECTION: indentation = 0; break;
- case HEADING: indentation = 2; break;
- default: assert( FALSE );
- }
-
- if ( !strncmp( &line->Contents[ indentation ], key->Name,
- strlen( key->Name ) ) ) {
- if ( indentation )
- strcpy( line->Contents, &line->Contents[ indentation ] );
- line->keyword = index;
- break;
- }
- }
- }
-}
-
-/*
- * CrunchRight
- */
-
-boolean CrunchRight(
- Line_Control *line
-)
-{
- char Buffer[ PARAGRAPH_SIZE ];
- char *src;
- char *dest;
- boolean is_text_to_right = FALSE;
-
- src = line->Contents;
- dest = Buffer;
-
- while( *src != ':' ) {
- if ( !*src ) {
- fprintf(
- stderr,
- "Line %d should have had a colon\n",
- line->number
- );
- exit_application( 1 );
- }
- *dest++ = *src++;
- }
-
- *dest++ = *src++; /* this is the ':' */
-
- if ( *src ) {
- *dest++ = ' ';
- while ( *src && isspace( *src ) )
- src++;
-
- if ( *src )
- is_text_to_right = TRUE;
-
- while ( *src )
- *dest++ = *src++;
- }
-
- *dest = '\0';
-
- strcpy( line->Contents, Buffer );
-
- return is_text_to_right;
-}
-
-/*
- * CrunchBelow
- */
-
-void CrunchBelow(
- Line_Control *start_line,
- Keywords_text_below_t text_below_mode
-)
-{
- Line_Control *line;
- int i;
- int leading_white;
- int length;
-
- switch ( text_below_mode ) {
- case BL_FORBIDDEN:
- assert( FALSE );
- case BL_FORMATTED:
- (void) FormatMultipleParagraphs( start_line );
- break;
- case BL_RAW:
- for ( line = (Line_Control *) start_line->Node.next;
- !_Chain_Is_last( &line->Node ) ;
- ) {
- if ( strlen( line->Contents ) )
- break;
- line = DeleteLine( line );
- }
-
- for ( i=0 ; isspace( line->Contents[ i ] ) ; i++ )
- ;
-
- leading_white = i;
-
- for ( ;
- !_Chain_Is_last( &line->Node ) ;
- ) {
-
- assert( line );
-
- if ( line->keyword )
- break;
-
- assert( !_Chain_Is_last( &line->Node ) );
-
- length = strlen( line->Contents );
-
- if ( length ) {
- if ( length < leading_white ) {
- fprintf(
- stderr,
- "\nLine %d %s:\n",
- line->number,
- "has inconsistent spacing -- is too short -- see 1st line of text"
- );
- PrintSurroundingLines( line, 0, 0 );
- fprintf( stderr, "\n" );
-
- }
- for ( i=0 ; i < leading_white ; i++ ) {
- if ( !isspace( line->Contents[ i ] ) ) {
- fprintf(
- stderr,
- "\nLine %d %s:\n",
- line->number,
- "has inconsistent spacing -- see 1st line of text"
- );
- PrintSurroundingLines( line, 0, 0 );
- fprintf( stderr, "\n" );
- break;
- }
- }
-
- strcpy( line->Contents, &line->Contents[ leading_white ] );
-
- SetLineFormat( line, RAW_OUTPUT );
- line = (Line_Control *) line->Node.next;
- } else {
- SetLineFormat( line, RAW_OUTPUT );
- /* line = DeleteLine( line ); */
- line = (Line_Control *) line->Node.next;
- }
- }
- break;
- }
-}
-
-/*
- * MergeText
- */
-
-/* XXX expand this and address the error numbers */
-char *Format_Errors[] = {
- /* unused */ "no formatting error",
- /* RT_NO_CHECK */ "why am I here",
- /* RT_FORBIDDEN */ "no text allowed to right or below",
- /* RT_OPTIONAL */ "text to right optional -- none below",
- /* RT_NONE */ "text to right is \"none\" or nothing -- none below",
- /* RT_REQUIRED */ "text to right required -- none below",
- /* RT_BELOW */ "text to right forbidden -- text below required",
- /* RT_NONE_OR_BELOW */ "text to right is \"none\" OR there is text below",
- /* RT_MAYBE_BELOW */ "text to right required -- text below optional",
- /* RT_EITHER */ "text to right OR below",
- /* RT_BOTH */ "text to right AND below"
-};
-
-
-int MergeText( void )
-{
- Line_Control *line;
- Line_Control *next;
- Line_Control *new_line;
- Keyword_info_t *key;
- boolean is_text_to_right;
- boolean is_text_below;
- boolean add_text_to_right;
- boolean add_text_below;
- int errors = 0;
- int error_code = 0;
-
- for ( line = (Line_Control *) Lines.first ;
- !_Chain_Is_last( &line->Node ) ;
- ) {
-
- if ( error_code ) {
-
- fprintf(
- stderr,
- "\nLine %d %s:\n",
- line->number,
- Format_Errors[ error_code ]
- );
- PrintSurroundingLines( line, 0, 3 );
- fprintf( stderr, "\n" );
- error_code = 0;
- line = (Line_Control *) line->Node.next;
- }
-
- key = &Keywords[ line->keyword ];
-
- if ( !line->keyword || key->text_mode == RT_NO_CHECK ) {
- line = (Line_Control *) line->Node.next;
- continue;
- }
-
- /*
- * Figure out where the text is for this keyword. It is a pretty
- * ugly thing to look ahead for text below because of intermediate
- * blank lines which we are not allowed to remove.
- */
-
- add_text_to_right = FALSE;
- add_text_below = FALSE;
-
- is_text_to_right = CrunchRight( line );
-
- is_text_below = FALSE;
-
- for ( next = (Line_Control *) line->Node.next ;
- !_Chain_Is_last( &next->Node ) ;
- next = (Line_Control *) next->Node.next ) {
-
- if ( next->keyword )
- break;
-
- if ( strlen( next->Contents ) ) {
- is_text_below = TRUE;
- break;
- }
- }
-
- switch ( key->text_mode ) {
- case RT_NO_CHECK: /* no requirements */
- break;
-
- case RT_FORBIDDEN: /* no text to right or below allowed */
- if ( is_text_to_right || is_text_below ) {
- error_code = 1;
- errors++;
- continue;
- }
- break;
-
- case RT_OPTIONAL: /* text to right optional -- none below */
- if ( is_text_below ) {
- error_code = 2;
- errors++;
- continue;
- }
- break;
-
- case RT_NONE: /* text to right is "none" or nothing -- none below */
- if ( (is_text_to_right && !strstr( line->Contents, "none" )) ||
- is_text_below ) {
- error_code = 3;
- errors++;
- continue;
- }
- break;
-
- case RT_REQUIRED: /* text to right required -- none below */
- if ( is_text_below ) {
- error_code = 4;
- errors++;
- continue;
- }
-
- if ( !is_text_to_right ) {
- if ( !InsertTBDs ) {
- error_code = 4;
- errors++;
- continue;
- } else
- add_text_to_right = TRUE;
- }
- break;
-
- case RT_BELOW: /* text to right forbidden -- text below required */
- if ( is_text_to_right ) {
- error_code = 5;
- errors++;
- continue;
- }
-
- if ( !is_text_below ) {
- if ( !InsertTBDs ) {
- error_code = 5;
- errors++;
- continue;
- } else
- add_text_below = TRUE;
- }
- break;
-
- case RT_NONE_OR_BELOW: /* text to right is "none" OR text below */
-
- if ( is_text_to_right ) {
- if ( strstr( line->Contents, "none" ) )
- break;
- error_code = 6;
- errors++;
- continue;
- }
-
- if ( !is_text_below ) {
- if ( !InsertTBDs ) {
- error_code = 6;
- errors++;
- continue;
- } else
- add_text_to_right = TRUE;
- }
- break;
- /* text to right required -- text below optional */
- case RT_MAYBE_BELOW:
- if ( !is_text_to_right ) {
- error_code = 7;
- errors++;
- continue;
- }
- break;
-
- case RT_EITHER: /* text to right OR below */
- if ( !(is_text_to_right || is_text_below) ) {
- if ( !InsertTBDs ) {
- error_code = 8;
- errors++;
- continue;
- } else
- add_text_to_right = TRUE;
- }
- break;
-
- case RT_BOTH: /* text to right AND below */
- if ( !(is_text_to_right && is_text_below) ) {
- if ( !InsertTBDs ) {
- error_code = 9;
- errors++;
- continue;
- } else {
- add_text_to_right = TRUE;
- add_text_below = TRUE;
- }
- }
- break;
- }
-
- if ( add_text_to_right )
- strcat( line->Contents, " TBD" );
-
- if ( add_text_below ) {
- new_line = AllocateLine();
- strcpy( new_line->Contents, "TBD" );
- _Chain_Insert( &line->Node, &new_line->Node );
- is_text_below = TRUE;
- }
-
- if ( is_text_below )
- CrunchBelow( line, key->text_below_mode );
-
- line = (Line_Control *) line->Node.next;
- }
- return (errors) ? -1 : 0;
-}
-
-/*
- * CheckForIncomplete
- */
-
-char *IncompleteMarkers[] = {
- "??",
- "xxx",
- "XXX",
- "xyz",
- "XYZ"
-};
-
-int CheckForIncomplete()
-{
- Line_Control *line;
- int i;
- int errors = 0;
-
- for ( line = (Line_Control *) Lines.first ;
- !_Chain_Is_last( &line->Node ) ;
- line = (Line_Control *) line->Node.next
- ) {
- for ( i=0 ; i < NUMBER_ELEMENTS( IncompleteMarkers ) ; i++ ) {
- if ( !strstr( line->Contents, IncompleteMarkers[ i ] ) )
- continue;
-
- fprintf(
- stderr,
- "\nLine %d %s:\n",
- line->number,
- "appears to be incomplete"
- );
- PrintSurroundingLines( line, 0, 0 );
- fprintf( stderr, "\n" );
- if ( IncompletesAreErrors )
- errors++;
- break;
- }
- }
- return ( errors ) ? -1 : 0;
-}
-
-/*
- * CheckOutline
- *
- * Insure all section headers are present.
- * Check sections which say "none", really have subsections.
- * Check sections which have subsections, don't say none.
- */
-
-int CheckOutline( void )
-{
- Line_Control *line;
- int count;
- int errors = 0;
- void *none_present;
- boolean KeywordsPresent[ KEYWORD_LAST + 1 ];
- Keyword_indices_t keyword;
-
- for ( keyword=0 ; keyword <= KEYWORD_LAST ; keyword++ )
- KeywordsPresent[ keyword ] = FALSE;
-
- for ( line = (Line_Control *) Lines.first ;
- !_Chain_Is_last( &line->Node ) ;
- line = (Line_Control *) line->Node.next
- ) {
-
- KeywordsPresent[ line->keyword ] = TRUE;
-
- switch ( line->keyword ) {
- case ATTRIBUTE_DESCRIPTIONS:
- count = NumberOfAttributes;
- break;
- case ASSOCIATION_DESCRIPTIONS:
- count = NumberOfAssociations;
- break;
- case ABSTRACT_TYPE_DESCRIPTIONS:
- count = NumberOfAbstractTypes;
- break;
- case DATA_ITEM_DESCRIPTIONS:
- count = NumberOfDataItems;
- break;
- case METHOD_DESCRIPTIONS:
- count = NumberOfMethods;
- break;
- case TASK_DESCRIPTIONS:
- count = NumberOfTasks;
- break;
- default:
- count = -1;
- break;
- }
- if ( count == -1 )
- continue;
-
- none_present = strstr( line->Contents, "none" );
-
- /* valid cases are (none_present && !count) AND (!none_present && count) */
- if ( none_present && count ) {
- fprintf(
- stderr,
- "\nLine %d : %s\n",
- line->number,
- "section header says \"none\" and there are subsections"
- );
- PrintSurroundingLines( line, 0, 0 );
- fprintf( stderr, "\n" );
- errors++;
- }
- if ( !none_present && !count ) {
- fprintf(
- stderr,
- "\nLine %d : %s\n",
- line->number,
- "section header does not say \"none\" and there are no subsections"
- );
- PrintSurroundingLines( line, 0, 0 );
- fprintf( stderr, "\n" );
- errors++;
- }
- }
-
- for ( keyword=0 ; keyword <= KEYWORD_LAST ; keyword++ ) {
- if ( Keywords[ keyword ].level != SECTION )
- continue;
-
- if ( !KeywordsPresent[ keyword ] ) {
- fprintf(
- stderr,
- "Section (%s) is missing\n",
- Keywords[ keyword ].Name
- );
- errors++;
- }
- }
-
- return (errors) ? -1 : 0;
-}
-
-/*
- * ReportMissingKeywords
- */
-
-int ReportMissingKeywords(
- Section_info_t *section,
- Line_Control *line,
- int elements_present[ MAXIMUM_ELEMENTS ]
-)
-{
- int i;
- int errors = 0;
- int last_found;
-
-#ifdef SECTION_DEBUG
- PrintLine( line );
- for ( i=0 ; i < MAXIMUM_ELEMENTS ; i++ )
- fprintf( stderr, "%d ", elements_present[ i ] );
- fprintf( stderr, "\n" );
-#endif
-
- /*
- * Check for missing sections
- */
-
- for ( i=0 ; i < MAXIMUM_ELEMENTS ; i++ ) {
- if ( section->Description[ i ].keyword == UNUSED )
- break;
-
-#ifdef SECTION_DEBUG
- fprintf(
- stderr,
- "%d %d %s\n",
- section->Description[ i ].is_required,
- elements_present[ i ],
- Keywords[ section->Description[ i ].keyword ].Name
- );
-#endif
-
- if ( section->Description[ i ].is_required && elements_present[i] == -1 ) {
- fprintf(
- stderr,
- "Section starting at line %d is missing the %s keyword\n",
- line->number,
- Keywords[ section->Description[ i ].keyword ].Name
- );
- errors++;
- }
- }
-
- last_found = -1;
-
- for ( i=0 ; i < MAXIMUM_ELEMENTS ; i++ ) {
- if ( section->Description[ i ].keyword == UNUSED )
- break;
-
- if ( elements_present[i] == -1 )
- continue;
-
- if ( elements_present[i] > last_found ) {
- last_found = elements_present[i];
- continue;
- }
-
- fprintf(
- stderr,
- "Keywords in the section starting at line %d are in the wrong order\n",
- line->number
- );
- errors++;
- break;
-
- }
-
- return errors;
-}
-
-/*
- * ScanForNextSection
- */
-
-Line_Control *ScanForNextSection(
- Line_Control *start_line,
- Section_info_t *section
-)
-{
- Line_Control *line;
- Element_info_t *Elements;
-
- line = start_line;
- Elements = section->Description;
-
- for ( ;; ) {
- line = (Line_Control *) line->Node.next;
-
- if ( line->keyword == END_OBJECT )
- break;
-
- assert( line );
- assert( !_Chain_Is_last( &line->Node ) );
-
- if ( Keywords[ line->keyword ].level == SECTION &&
- section->Next_section != line->keyword ) {
-
- fprintf(
- stderr,
- "Sections appear to be out of order at line %d\n",
- start_line->number
- );
- return NULL;
- }
-
- if ( section->Next_section == line->keyword ) /* next section */
- break;
-
- if ( Elements[ 0 ].keyword == line->keyword ) /* repeating subsection */
- break;
- }
-
- return line;
-}
-
-/*
- * CheckSections
- */
-
-int CheckSections( void )
-{
- Line_Control *line;
- Line_Control *scan_line;
- Section_info_t *section;
- Keyword_info_t *key;
- Element_info_t *Elements;
- int elements_present[ MAXIMUM_ELEMENTS ];
- boolean stay_in_subsection;
- int i;
- int errors;
- int subsection;
- int element;
- int keyword_count;
- Line_Control *next_section;
-
- errors = 0;
- line = (Line_Control *) Lines.first;
-
- for ( i=0 ; i < NUMBER_ELEMENTS( Sections ) ; i++ ) {
- section = Sections[ i ];
- Elements = section->Description;
- subsection = 0;
-
- if ( strstr( line->Contents, "none" ) ) {
- next_section = ScanForNextSection( line, section );
- if ( !next_section ) {
- errors++;
- goto end_object;
- }
- line = next_section;
- if ( line->keyword == END_OBJECT )
- goto end_object;
- continue;
- }
-
- while ( Elements[ 0 ].keyword != line->keyword ) {
- if ( line->keyword == END_OBJECT )
- goto end_object;
-
- if( !line || _Chain_Is_last( &line->Node ) ) {
- fprintf( stderr, "out of sync -- aborting\n" );
- errors++;
- goto end_object;
- }
- line = (Line_Control *) line->Node.next;
- }
-
-repeating_subsection:
-
-#ifdef SECTION_DEBUG
- fprintf( stderr, "Checking Section %d Subsection %d\n", i, subsection );
-#endif
- assert( line );
- assert( !_Chain_Is_last( &line->Node ) );
-
- /*
- * Per Subsection Initialization
- */
-
- subsection++;
-
- keyword_count = 0;
-
- next_section = ScanForNextSection( line, section );
- if ( !next_section ) {
- errors++;
- goto end_object;
- }
-
- for ( element=0 ; element < MAXIMUM_ELEMENTS ; element++ )
- elements_present[ element ] = -1;
-
- /*
- * Do a subsection
- */
-
- /* validate each keyword */
-
- for ( scan_line = line ; ; ) {
-
- if ( !scan_line->keyword ) {
- scan_line = (Line_Control *) scan_line->Node.next;
- continue;
- }
-
- if ( scan_line == next_section )
- break;
-
- if ( *Keywords[ scan_line->keyword ].keyword_validation_routine ) {
- if ( (*Keywords[ scan_line->keyword ].keyword_validation_routine )(
- scan_line
- ) ) errors++;
- }
-
- scan_line = (Line_Control *) scan_line->Node.next;
- }
-
- /* scan subsection for keywords */
-
- for ( scan_line = line ; ; ) {
-
- if ( !scan_line->keyword ) {
- scan_line = (Line_Control *) scan_line->Node.next;
- continue;
- }
-
- if ( scan_line == next_section )
- break;
-
- for ( element=0 ; element < MAXIMUM_ELEMENTS ; element++ ) {
- if ( scan_line->keyword == Elements[ element ].keyword ) {
- if ( elements_present[ element ] != -1 ) {
- fprintf(
- stderr,
- "Section starting at line %d has the %s keyword more than once\n",
- line->number,
- Keywords[ Elements[ i ].keyword ].Name
- );
- errors++;
- }
-
-#ifdef SECTION_DEBUG
- fprintf( stderr, "FOUND %s %d %d\n",
- Keywords[ Elements[ element ].keyword ].Name,
- element, keyword_count );
-#endif
- elements_present[ element ] = keyword_count++;
- break;
- }
- if ( Elements[ element ].keyword == UNUSED )
- break;
- }
-
- scan_line = (Line_Control *) scan_line->Node.next;
- }
- errors += ReportMissingKeywords( section, line, elements_present );
-
- /*
- * Validate the section as a whole
- */
-
- if ( section->section_validation_routine ) {
- if ( (*section->section_validation_routine)(section, line, next_section) )
- errors++;
- }
-
-scan_for_next_section:
- /*
- * Scan forward until next subsection or next section
- */
-
-#ifdef SECTION_DEBUG
- fprintf( stderr, "End of Subsection\n" );
-#endif
- line = next_section;
- if ( line->keyword == END_OBJECT ) {
- goto end_object;
- }
-
- if ( Elements[ 0 ].keyword == line->keyword ) { /* repeating subsection */
- if ( !section->repeats ) {
- fprintf(
- stderr,
- "Invalid repeating subsection starting at line %d\n",
- line->number
- );
- errors++;
- goto end_object;
- }
- goto repeating_subsection;
- }
-
- }
-
-end_object:
- return (errors) ? -1 : 0;
-}
-/*
- * RemovePagebreaks
- */
-
-void RemovePagebreaks()
-{
- Line_Control *line;
-
- for ( line = (Line_Control *) Lines.first ;
- !_Chain_Is_last( &line->Node ) ;
- ) {
- if ( !strcmp( line->Contents, PAGE_SEPARATOR ) )
- line = DeleteLine( line );
- else
- line = (Line_Control *) line->Node.next;
- }
-}
-
-/*
- * strIsAllSpace
- */
-
-boolean strIsAllSpace(
- char *s
-)
-{
- char *p;
-
- for ( p = s ; *p ; p++ )
- if ( !isspace( *p ) )
- return FALSE;
-
- return TRUE;
-}
-
-/*
- * RemoveExtraBlankLines
- *
- * NOTE: Be careful not remove to remove white space in raw text.
- */
-
-int RemoveExtraBlankLines()
-{
- Line_Control *line;
- Line_Control *previous;
- int errors;
-
- errors = 0;
-
- for ( line = (Line_Control *) Lines.first ;
- !_Chain_Is_last( &line->Node ) ;
- line = (Line_Control *) line->Node.next
- ) {
- if ( line->keyword || line->format )
- continue;
-
- if ( !strlen( line->Contents ) ) {
- line = DeleteLine( line );
- line = (Line_Control *) line->Node.previous;
- continue;
- }
-
- fprintf(
- stderr,
- "\nLine %d is not associated with a keyword:\n",
- line->number
- );
- PrintSurroundingLines( line, 0, 0 );
- fprintf( stderr, "\n" );
- errors++;
- }
- return ( errors ) ? -1 : 0;
-}
-
-/*
- * strCopyToColon
- */
-
-void strCopyToColon(
- char *src,
- char *dest
-)
-{
- char *s = src;
- char *d = dest;
-
- for ( ; *s && *s != ':' ; )
- *d++ = *s++;
- *d ='\0';
-}
-
-/*
- * BuildTexinfoNodes
- */
-
-void BuildTexinfoNodes( void )
-{
- Line_Control *line;
- Line_Control *new_line;
- Line_Control *next_node;
- char Buffer[ BUFFER_SIZE ];
- char ObjectName[ BUFFER_SIZE ];
- char NodeName[ BUFFER_SIZE ];
- char NextNode[ BUFFER_SIZE ];
- char NextNodeName[ BUFFER_SIZE ];
- char PreviousNodeName[ BUFFER_SIZE ];
- char UpNodeName[ BUFFER_SIZE ];
- char SectionName[ BUFFER_SIZE ];
- char MenuBuffer[ BUFFER_SIZE ];
- Line_Control *menu_insert_point;
- Line_Control *node_line;
- boolean next_found;
- int menu_items;
-
- strcpy( PreviousNodeName, DocsPreviousNode );
-
- for ( line = (Line_Control *) Lines.first ;
- !_Chain_Is_last( &line->Node ) ;
- line = (Line_Control *) line->Node.next
- ) {
- menu_insert_point = (Line_Control *) line->Node.next;
-
- switch ( Keywords[ line->keyword ].level ) {
- case TEXT:
- case HEADING:
- break;
- case SECTION:
- if ( line->keyword == END_OBJECT )
- goto bottom;
-
- if ( line->keyword == OBJECT ) {
- LineCopyFromRight( line, Buffer );
- sprintf( ObjectName, "%s Object", Buffer );
- strcpy( NodeName, ObjectName );
- strcpy( UpNodeName, DocsUpNode );
- } else {
- LineCopySectionName( line, Buffer );
- sprintf( NodeName, "%s %s", ObjectName, Buffer );
- strcpy( UpNodeName, ObjectName );
- }
- strtoInitialCaps( NULL, NodeName );
- strtoInitialCaps( NULL, UpNodeName );
- strcpy( SectionName, NodeName );
-
- /*
- * Go ahead and put it on the chain in the right order (ahead of
- * the menu) and we can fill it in later (after the menu is built).
- */
-
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@ifinfo" );
- _Chain_Insert( line->Node.previous, &new_line->Node );
-
- node_line = AllocateLine();
- _Chain_Insert( line->Node.previous, &node_line->Node );
-
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@end ifinfo" );
- _Chain_Insert( line->Node.previous, &new_line->Node );
-
- menu_items = 0;
-
- if ( line->keyword == OBJECT ) {
- next_node = (Line_Control *) line->Node.next;
- next_found = FALSE;
- for ( ; ; ) {
- if ( next_node->keyword == END_OBJECT )
- break;
- if ( Keywords[ next_node->keyword ].level == SECTION ) {
- LineCopySectionName( next_node, Buffer );
- strtoInitialCaps( NULL, Buffer );
-
- if ( !next_found ) {
- next_found = TRUE;
- sprintf( NextNodeName, "%s %s", ObjectName, Buffer );
- }
- if ( menu_items == 0 ) {
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@ifinfo" );
- _Chain_Insert( menu_insert_point->Node.previous, &new_line->Node );
-
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@menu" );
- _Chain_Insert( menu_insert_point->Node.previous, &new_line->Node );
- }
-
- menu_items++;
-
- new_line = AllocateLine();
- sprintf( new_line->Contents, "* %s %s::", ObjectName, Buffer );
- _Chain_Insert( menu_insert_point->Node.previous, &new_line->Node);
- }
- next_node = (Line_Control *) next_node->Node.next;
- }
- } else {
- next_node = (Line_Control *) line->Node.next;
-
- next_found = FALSE;
- for ( ; ; ) {
- if ( Keywords[ next_node->keyword ].level == SECTION ) {
- if ( !next_found ) {
- if ( next_node->keyword == END_OBJECT ) {
- strcpy( NextNodeName, DocsNextNode );
- } else {
- LineCopySectionName( next_node, Buffer );
- sprintf( NextNodeName, "%s %s", ObjectName, Buffer );
- strtoInitialCaps( NULL, NextNodeName );
- }
- next_found = TRUE;
- }
- break;
- } else if ( Keywords[ next_node->keyword ].level == SUBSECTION ) {
- LineCopySectionName( next_node, Buffer );
- strtoInitialCaps( NULL, Buffer );
- sprintf( MenuBuffer, "%s %s - ", ObjectName, Buffer );
- LineCopyFromRight( next_node, Buffer );
- strcat( MenuBuffer, Buffer );
-
- if ( menu_items == 0 ) {
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@ifinfo" );
- _Chain_Insert( menu_insert_point->Node.previous, &new_line->Node );
-
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@menu" );
- _Chain_Insert( menu_insert_point->Node.previous, &new_line->Node );
- }
-
- menu_items++;
-
- new_line = AllocateLine();
- sprintf( new_line->Contents, "* %s::", MenuBuffer );
- _Chain_Insert( menu_insert_point->Node.previous, &new_line->Node );
-
- if ( !next_found ) {
- next_found = TRUE;
- strcpy( NextNodeName, MenuBuffer );
- }
- }
- next_node = (Line_Control *) next_node->Node.next;
- }
- }
-
- if ( menu_items ) {
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@end menu" );
- _Chain_Insert( menu_insert_point->Node.previous, &new_line->Node );
-
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@end ifinfo" );
- _Chain_Insert( menu_insert_point->Node.previous, &new_line->Node );
- }
-
-#if 0
- fprintf(
- stderr,
- "@node %s, %s, %s, %s\n",
- NodeName,
- NextNodeName,
- PreviousNodeName,
- UpNodeName
- );
-#endif
- /* node_line was previously inserted */
- sprintf(
- node_line->Contents,
- "@node %s, %s, %s, %s",
- NodeName,
- NextNodeName,
- PreviousNodeName,
- UpNodeName
- );
-
- strcpy( PreviousNodeName, NodeName );
- break;
-
- case SUBSECTION:
- strcpy( UpNodeName, SectionName );
-
- LineCopySectionName( line, Buffer );
- strtoInitialCaps( NULL, Buffer );
- sprintf( NodeName, "%s %s - ", ObjectName, Buffer );
- LineCopyFromRight( line, Buffer );
- strcat( NodeName, Buffer );
-
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@ifinfo" );
- _Chain_Insert( line->Node.previous, &new_line->Node );
-
- next_node = (Line_Control *) line->Node.next;
- for ( ; ; ) {
- if ( Keywords[ next_node->keyword ].level == SECTION ) {
- if ( next_node->keyword == END_OBJECT ) {
- strcpy( NextNodeName, DocsNextNode );
- } else {
- LineCopySectionName( next_node, Buffer );
- sprintf( NextNodeName, "%s %s", ObjectName, Buffer );
- strtoInitialCaps( NULL, NextNodeName );
- }
- break;
- } else if ( Keywords[ next_node->keyword ].level == SUBSECTION ) {
- LineCopySectionName( next_node, Buffer );
- strtoInitialCaps( NULL, Buffer );
- sprintf( NextNodeName, "%s %s - ", ObjectName, Buffer );
- LineCopyFromRight( next_node, Buffer );
- strcat( NextNodeName, Buffer );
- break;
- }
- next_node = (Line_Control *) next_node->Node.next;
- }
-
-#if 0
- fprintf(
- stderr,
- "@node %s, %s, %s, %s\n",
- NodeName,
- NextNodeName,
- PreviousNodeName,
- UpNodeName
- );
-#endif
- new_line = AllocateLine();
- sprintf(
- new_line->Contents,
- "@node %s, %s, %s, %s",
- NodeName,
- NextNodeName,
- PreviousNodeName,
- UpNodeName
- );
- _Chain_Insert( line->Node.previous, &new_line->Node );
-
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@end ifinfo" );
- _Chain_Insert( line->Node.previous, &new_line->Node );
-
- strcpy( PreviousNodeName, NodeName );
- break;
- }
- }
-bottom:
-}
-
-/*
- * FormatToTexinfo
- */
-
-char *Texinfo_Headers[] = {
- "\\input texinfo @c -*-texinfo-*-",
- "@c %**start of header",
- "@setfilename ",
- "@settitle ",
- "@paragraphindent 0",
- "@c %**end of header",
- "",
- "@c",
- "@c COPYRIGHT (c) 1996.",
- "@c On-Line Applications Research Corporation (OAR).",
- "@c All rights reserved.",
- "@c",
- "@c This file is automatically generated. DO NOT EDIT!!",
- "@c",
- "",
- "@c This prevents a black box from being printed on overfull lines.",
- "@c The alternative is to rework a sentence to avoid this problem.",
- "@finalout",
- "",
- "@tex",
- "\\global\\parindent 0in",
- "\\global\\chapheadingskip = 15pt plus 4pt minus 2pt",
- "\\global\\secheadingskip = 12pt plus 4pt minus 2pt",
- "\\global\\subsecheadingskip = 9pt plus 4pt minus 2pt",
- "",
- "@ifclear smallbook",
- "\\global\\parskip 6pt plus 1pt",
- "@end ifclear",
- "@end tex",
- "@setchapternewpage odd",
- "@ifinfo",
- "@top ",
- "@node Top, (dir), (dir), (dir)",
- "@end ifinfo",
- "@c ",
- "@c This is the end of the header block",
- "@c "
-};
-
-void FormatToTexinfo( void )
-{
- Line_Control *line;
- Line_Control *new_line;
- char Buffer[ PARAGRAPH_SIZE ];
- int i;
- char ChapterTitle[ PARAGRAPH_SIZE ];
- char InfoFile[ PARAGRAPH_SIZE ];
- char *p;
- boolean new_section;
- boolean in_bullets;
-
- for ( line = (Line_Control *) Lines.first ;
- !_Chain_Is_last( &line->Node ) ;
- ) {
-
- switch ( line->keyword ) {
- case UNUSED:
- line = (Line_Control *) line->Node.next;
- break;
-
- case OBJECT:
- LineCopyFromRight( line, ChapterTitle );
- strcpy( InfoFile, ChapterTitle );
-
- for ( p=InfoFile ; *p ; *p++ ) /* turn this into a file name */
- if ( isspace( *p ) )
- *p = '_';
-
- sprintf( Buffer, "@chapter %s", line->Contents );
- strcpy( line->Contents, Buffer );
- line = (Line_Control *) line->Node.next;
- break;
-
- case ATTRIBUTE_DESCRIPTIONS:
- case ASSOCIATION_DESCRIPTIONS:
- case ABSTRACT_TYPE_DESCRIPTIONS:
- case DATA_ITEM_DESCRIPTIONS:
- case METHOD_DESCRIPTIONS:
- case TASK_DESCRIPTIONS:
- sprintf( Buffer, "@section %s", line->Contents );
- strcpy( line->Contents, Buffer );
-
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@page" );
- _Chain_Insert( line->Node.previous, &new_line->Node );
-
- line = (Line_Control *) line->Node.next;
- new_section = TRUE;
- break;
-
- case END_OBJECT:
- line->Contents[ 0 ] = '\0';
- goto bottom;
-
- case ATTRIBUTE:
- case ASSOCIATION:
- case ABSTRACT_TYPE:
- case DATA_ITEM:
- if ( !new_section ) {
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@need 4000" );
- _Chain_Insert( line->Node.previous, &new_line->Node );
- }
- new_section = FALSE;
- sprintf( Buffer, "@subsection %s", line->Contents );
- strcpy( line->Contents, Buffer );
- line = (Line_Control *) line->Node.next;
- break;
-
- case METHOD:
- case TASK:
- if ( !new_section ) {
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@page" );
- _Chain_Insert( line->Node.previous, &new_line->Node );
- }
- new_section = FALSE;
- sprintf( Buffer, "@subsection %s", line->Contents );
- strcpy( line->Contents, Buffer );
- line = (Line_Control *) line->Node.next;
- break;
-
- case DESCRIPTION:
- case COPYRIGHT:
- case PORTING:
- case THEORY_OF_OPERATION:
- case DEPENDENCIES:
- case NOTES:
- sprintf( Buffer, "@subheading %s\n", line->Contents );
- strcpy( line->Contents, Buffer );
- line = (Line_Control *) line->Node.next;
-
- /* now take care of the paragraphs which are here */
-
- in_bullets = FALSE;
- do {
- line = (Line_Control *) line->Node.next;
- if ( line->format == BULLET_OUTPUT ) {
- if ( !in_bullets ) {
- in_bullets = TRUE;
-
- new_line = AllocateLine();
- _Chain_Insert( line->Node.previous, &new_line->Node );
-
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@itemize @bullet" );
- _Chain_Insert( line->Node.previous, &new_line->Node );
- }
- sprintf( Buffer, "@item %s\n", line->Contents );
- strcpy( line->Contents, Buffer );
- } else if ( in_bullets ) {
- in_bullets = FALSE;
-
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@end itemize" );
- _Chain_Insert( line->Node.previous, &new_line->Node );
-
- new_line = AllocateLine();
- _Chain_Insert( line->Node.previous, &new_line->Node );
- } else {
- new_line = AllocateLine();
- _Chain_Insert( line->Node.previous, &new_line->Node );
- }
- } while ( !line->keyword );
-
- break;
-
- case DERIVATION:
- case TYPE:
- case RANGE:
- case UNITS:
- case SCALE_FACTOR:
- case TOLERANCE:
- case VISIBILITY:
- case ASSOCIATED_WITH:
- case MULTIPLICITY:
- case TIMING:
- sprintf( Buffer, "@subheading %s\n", line->Contents );
- strcpy( line->Contents, Buffer );
- line = (Line_Control *) line->Node.next;
- break;
-
- case MEMBERS:
- case DEFAULT:
- case REQUIREMENTS:
- case REFERENCES:
- case INPUTS:
- case OUTPUTS:
- case PDL:
- case SYNCHRONIZATION:
- sprintf( Buffer, "@subheading %s\n", line->Contents );
- strcpy( line->Contents, Buffer );
-
- /* now take care of the raw text which is here */
-
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@example" );
- _Chain_Insert( &line->Node, &new_line->Node );
-
- do {
- line = (Line_Control *) line->Node.next;
- if ( !strlen( line->Contents ) ) {
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@end example" );
- _Chain_Insert( line->Node.previous, &new_line->Node );
-
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@example" );
- _Chain_Insert( &line->Node, &new_line->Node );
-
- }
- } while ( !line->keyword );
-
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@end example" );
- _Chain_Insert( line->Node.previous, &new_line->Node );
- /* at this point line points to the next keyword */
- break;
-
- case RAW_EXAMPLE:
-
- /* now take care of the raw text which is here */
-
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@example" );
- _Chain_Insert( line->Node.previous, &new_line->Node );
-
- while ( line->keyword == RAW_EXAMPLE ) {
- line = (Line_Control *) line->Node.next;
- }
-
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@end example" );
- _Chain_Insert( line->Node.previous, &new_line->Node );
-
- /* at this point line points to the next keyword */
- break;
-
- }
- }
-
-bottom:
-#if 0
- for ( i=NUMBER_ELEMENTS( Texinfo_Headers ) - 1 ; i >= 0 ; i-- ) {
- new_line = AllocateLine();
- strcpy( new_line->Contents, Texinfo_Headers[ i ] );
- if ( !strcmp( "@setfilename ", new_line->Contents ) )
- strcat( new_line->Contents, ChapterTitle );
- else if ( !strcmp( "@settitle ", new_line->Contents ) )
- strcat( new_line->Contents, InfoFile );
- else if ( !strcmp( "@top ", new_line->Contents ) )
- strcat( new_line->Contents, InfoFile );
- _Chain_Insert( _Chain_Head( &Lines ), &new_line->Node );
- }
-
- /*
- * Remove the special end of object string. No one wants to see
- * it in the printed output and the node is already marked "END_OBJECT".
- */
-
- ((Line_Control *)Lines.last)->Contents[ 0 ] = '\0';
-
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@bye" );
- _Chain_Append( &Lines, &new_line->Node );
-
-#endif
- if ( Verbose )
- fprintf( stderr, "-------->INSERTING TEXINFO MENUS\n" );
-
- BuildTexinfoNodes();
-}
-
-/*
- * FormatToWord
- */
-
-void FormatToWord( void )
-{
- Line_Control *line;
- Line_Control *new_line;
- char Buffer[ PARAGRAPH_SIZE ];
- int i;
- int length;
- char ChapterTitle[ PARAGRAPH_SIZE ];
- char InfoFile[ PARAGRAPH_SIZE ];
- char *p;
- boolean new_section;
- boolean in_bullets;
-
- for ( line = (Line_Control *) Lines.first ;
- !_Chain_Is_last( &line->Node ) ;
- ) {
-
- switch ( line->keyword ) {
- case UNUSED:
- line = (Line_Control *) line->Node.next;
- break;
-
- case OBJECT:
- LineCopyFromRight( line, ChapterTitle );
- strcpy( InfoFile, ChapterTitle );
-
- for ( p=InfoFile ; *p ; *p++ ) /* turn this into a file name */
- if ( isspace( *p ) )
- *p = '_';
-
- sprintf( Buffer, "@Chapter = %s", line->Contents );
- strcpy( line->Contents, Buffer );
- line = (Line_Control *) line->Node.next;
- break;
-
- case ATTRIBUTE_DESCRIPTIONS:
- case ASSOCIATION_DESCRIPTIONS:
- case ABSTRACT_TYPE_DESCRIPTIONS:
- case DATA_ITEM_DESCRIPTIONS:
- case METHOD_DESCRIPTIONS:
- case TASK_DESCRIPTIONS:
- sprintf( Buffer, "@Section = %s", line->Contents );
- strcpy( line->Contents, Buffer );
-
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@Page" );
- _Chain_Insert( line->Node.previous, &new_line->Node );
-
- line = (Line_Control *) line->Node.next;
- new_section = TRUE;
- break;
-
- case END_OBJECT:
- line->Contents[ 0 ] = '\0';
- goto bottom;
-
- case ATTRIBUTE:
- case ASSOCIATION:
- case ABSTRACT_TYPE:
- case DATA_ITEM:
- if ( !new_section ) {
- /*
- * Do something with the style to keep subsection
- * contents together
- */
- ;
- }
- new_section = FALSE;
- sprintf( Buffer, "@Subsection = %s", line->Contents );
- strcpy( line->Contents, Buffer );
- line = (Line_Control *) line->Node.next;
- break;
-
- case METHOD:
- case TASK:
- if ( !new_section ) {
- new_line = AllocateLine();
- strcpy( new_line->Contents, "@Page" );
- _Chain_Insert( line->Node.previous, &new_line->Node );
- }
- new_section = FALSE;
- sprintf( Buffer, "@Subsection = %s", line->Contents );
- strcpy( line->Contents, Buffer );
- line = (Line_Control *) line->Node.next;
- break;
-
- case DESCRIPTION:
- case COPYRIGHT:
- case PORTING:
- case THEORY_OF_OPERATION:
- case DEPENDENCIES:
- case NOTES:
- sprintf( Buffer, "@Subheading = %s\n", line->Contents );
- strcpy( line->Contents, Buffer );
- line = (Line_Control *) line->Node.next;
-
- /* now take care of the paragraphs which are here */
-
- in_bullets = FALSE;
- do {
- line = (Line_Control *) line->Node.next;
- if ( line->format == BULLET_OUTPUT ) {
- if ( !in_bullets ) {
- in_bullets = TRUE;
-
- new_line = AllocateLine();
- _Chain_Insert( line->Node.previous, &new_line->Node );
- }
- sprintf( Buffer, "@Bullet = %s\n", line->Contents );
- strcpy( line->Contents, Buffer );
- } else if ( in_bullets ) {
- in_bullets = FALSE;
-
- new_line = AllocateLine();
- _Chain_Insert( line->Node.previous, &new_line->Node );
- } else {
- new_line = AllocateLine();
- _Chain_Insert( line->Node.previous, &new_line->Node );
- }
- } while ( !line->keyword );
-
- break;
-
- case DERIVATION:
- case TYPE:
- case RANGE:
- case UNITS:
- case SCALE_FACTOR:
- case TOLERANCE:
- case VISIBILITY:
- case ASSOCIATED_WITH:
- case MULTIPLICITY:
- case TIMING:
- sprintf( Buffer, "@Subheading = %s\n", line->Contents );
- strcpy( line->Contents, Buffer );
- line = (Line_Control *) line->Node.next;
- break;
-
- case MEMBERS:
- case DEFAULT:
- case REQUIREMENTS:
- case REFERENCES:
- case INPUTS:
- case OUTPUTS:
- case PDL:
- case SYNCHRONIZATION:
- sprintf( Buffer, "@Subheading = %s\n", line->Contents );
- strcpy( line->Contents, Buffer );
- line = (Line_Control *) line->Node.next;
-
- /* now take care of the raw text which is here */
-
-#if 0
- while ( !line->keyword ) {
- sprintf( Buffer, "@Example = %s\n", line->Contents );
- strcpy( line->Contents, Buffer );
- line = (Line_Control *) line->Node.next;
- }
-
- /* at this point line points to the next keyword */
-#endif
-
- /* now take care of the raw text which is here */
-
- new_line = AllocateLine();
- _Chain_Insert( line->Node.previous, &new_line->Node );
- strcpy( new_line->Contents, "@Example = " );
-
- while ( !line->keyword ) {
- if ( strlen( line->Contents ) ) {
- new_line->keyword = line->keyword;
- new_line->format = line->format;
- length = strlen(new_line->Contents);
- if ( (length + strlen(line->Contents) + 12) > PARAGRAPH_SIZE ) {
- fprintf( stderr, "Output line too long at %d\n", line->number );
- exit_application( 1 );
- }
-
- strcat( new_line->Contents, line->Contents );
- strcat( new_line->Contents, "<@ManualCR>" );
- line = DeleteLine( line );
- } else {
- line = (Line_Control *) line->Node.next;
- new_line = AllocateLine();
- _Chain_Insert( line->Node.previous, &new_line->Node );
- strcpy( new_line->Contents, "@Example = " );
- }
- }
-
- /* at this point line points to the next keyword */
- break;
-
- case RAW_EXAMPLE:
-
- /* now take care of the raw text which is here */
-
- new_line = AllocateLine();
- _Chain_Insert( line->Node.previous, &new_line->Node );
- strcpy( new_line->Contents, "@Example = " );
-
-
- while ( line->keyword == RAW_EXAMPLE ) {
- if ( strlen( line->Contents ) ) {
- new_line->keyword = line->keyword;
- new_line->format = line->format;
- length = strlen(new_line->Contents);
- if ( (length + strlen(line->Contents) + 12) > PARAGRAPH_SIZE ) {
- fprintf( stderr, "Output line too long at %d\n", line->number );
- exit_application( 1 );
- }
-
- strcat( new_line->Contents, line->Contents );
- strcat( new_line->Contents, "<@ManualCR>" );
- line = DeleteLine( line );
- } else {
- line = (Line_Control *) line->Node.next;
- new_line = AllocateLine();
- _Chain_Insert( line->Node.previous, &new_line->Node );
- strcpy( new_line->Contents, "@Example = " );
- }
- }
-
- /* at this point line points to the next keyword */
- break;
-
- }
- }
-
-bottom:
-}
-
-/*
- * PrintFile
- */
-
-void PrintFile(
- char *out
-)
-{
- Line_Control *line;
-
- OutFile = fopen( out, "w+" );
-
- if ( !OutFile ) {
- fprintf( stderr, "Unable to open (%s) for output\n", out );
- exit_application( 1 );
- }
- assert( OutFile );
-
- for ( line = (Line_Control *) Lines.first ;
- !_Chain_Is_last( &line->Node ) ;
- line = (Line_Control *) line->Node.next ) {
- fprintf( OutFile, "%s\n", line->Contents );
-/*
- fprintf(
- OutFile,
- "(%d,%d)%s\n",
- line->keyword,
- line->format,
- line->Contents
- );
-*/
- }
-}
-
-/*
- * DumpList
- */
-
-void DumpList(
- Chain_Control *the_list
-)
-{
- Line_Control *line;
-
- fprintf( stderr, "---> Dumping list (%p)\n", the_list );
-
- for ( line = (Line_Control *) the_list->first ;
- !_Chain_Is_last( &line->Node ) ;
- line = (Line_Control *) line->Node.next ) {
- fprintf( stderr, "%s\n", line->Contents );
- }
-}
-
-/*
- * ReleaseFile
- */
-
-void ReleaseFile()
-{
- Line_Control *line;
- Line_Control *next;
-
- for ( line = (Line_Control *) Lines.first ;
- !_Chain_Is_last( &line->Node ) ;
- ) {
- next = (Line_Control *) line->Node.next;
- line = next;
- }
-}
-
-/*
- * strtoInitialCaps
- */
-
-void strtoInitialCaps(
- char *dest,
- char *src
-)
-{
- char *source = src;
- char *destination = dest;
-
- if ( !dest )
- return;
- strcpy( dest, src );
-#if 0
- source = src;
- destination = (dest) ? dest : src;
-
- while ( *source ) {
- while ( isspace( *source ) )
- *destination++ = *source++;
-
- if ( !*source )
- break;
-
- *destination++ = toupper( *source++ );
-
- for ( ; *source && !isspace( *source ) ; source++ )
- *destination++ = tolower( *source );
-
- if ( !*source )
- break;
- }
-
- *destination = '\0';
-#endif
-}
-
-/*
- * Validate_visibility
- */
-
-char *Valid_visibilities[] = {
- "public",
- "private"
-};
-
-int Validate_visibility(
- Line_Control *line
-)
-{
- char *s;
- char *d;
- char Buffer[ BUFFER_SIZE ];
- char Visibility[ BUFFER_SIZE ];
- int i;
- boolean found;
- int errors = 0;
-
- LineCopyFromRight( line, Buffer );
-
- memset( Visibility, '\0', sizeof( Visibility ) );
- s = Buffer;
-
- for ( d=Visibility ; ; s++, d++ ) {
- *d = *s;
- if ( !*s || isspace(*s) )
- break;
- }
- *d = '\0';
-
- if ( isspace(*s) ) {
- fprintf(
- stderr,
- "Unexpected white space on line %d -- are there multiple words?\n",
- line->number
- );
- errors++;
- }
-
- /*
- * Check out the type part of this keyword
- */
-
- for ( found=FALSE, i=0 ; i<NUMBER_ELEMENTS(Valid_visibilities) ; i++ ) {
- if ( !strcmp( Valid_visibilities[ i ], Visibility ) ) {
- found = TRUE;
- break;
- }
- }
-
- if ( !found ) {
- if ( !(InsertTBDs && !strcmp( Visibility, "TBD" )) ) {
- fprintf(
- stderr,
- "Invalid visibility type (%s) on line %d\n",
- Visibility,
- line->number
- );
- errors++;
- }
- }
-
- return (errors) ? -1 : 0;
-}
-
-/*
- * Validate_synchronization
- */
-
-char *Valid_synchronization[] = {
- "delay",
- "event",
- "mutex",
- "semaphore",
- "message",
- "signal",
- "period"
-};
-
-boolean Valid_synchronization_text_below[] = {
- FALSE, /* delay */
- TRUE, /* event */
- TRUE, /* mutex */
- TRUE, /* semaphore */
- TRUE, /* message */
- TRUE, /* signal */
- FALSE /* period */
-};
-
-int Validate_synchronization(
- Line_Control *line
-)
-{
- char *s;
- char *d;
- char Buffer[ BUFFER_SIZE ];
- char Synchronization[ BUFFER_SIZE ];
- int i;
- boolean found;
- int errors = 0;
-
- LineCopyFromRight( line, Buffer );
-
- memset( Synchronization, '\0', sizeof( Synchronization ) );
- s = Buffer;
-
- for ( d=Synchronization ; ; s++, d++ ) {
- *d = *s;
- if ( !*s || isspace(*s) )
- break;
- }
- *d = '\0';
-
- if ( isspace(*s) ) {
- fprintf(
- stderr,
- "Unexpected white space on line %d -- invalid use of multiple words\n",
- line->number
- );
- errors++;
- }
-
- /*
- * Check out the type part of this keyword
- */
-
- for ( found=FALSE, i=0 ; i<NUMBER_ELEMENTS(Valid_synchronization) ; i++ ) {
- if ( !strcmp( Valid_synchronization[ i ], Synchronization ) ) {
- found = TRUE;
- break;
- }
- }
-
- if ( !found ) {
- fprintf(
- stderr,
- "Invalid synchronization type (%s) on line %d\n",
- Synchronization,
- line->number
- );
- errors++;
- }
-
- if ( line->keyword && !Valid_synchronization_text_below[ i ] ) {
- fprintf(
- stderr,
- "Expected text below synchronization type (%s) on line %d\n",
- Synchronization,
- line->number
- );
- errors++;
- }
-
- return (errors) ? -1 : 0;
-}
-
-/*
- * Validate_abstract_type
- *
- * presence of range or members but not both
- */
-
-int Validate_abstract_type(
- Section_info_t *section,
- Line_Control *start,
- Line_Control *next_section
-)
-{
- boolean range_found = FALSE;
- boolean members_found = FALSE;
- boolean enumerated_found = FALSE;
- boolean no_range_or_members = FALSE;
- boolean true_found = FALSE;
- boolean false_found = FALSE;
- Line_Control *line;
- int errors = 0;
-
- for ( line = start;
- line != next_section ;
- line = (Line_Control *) line->Node.next ) {
- if ( line->keyword == RANGE )
- range_found = TRUE;
- else if ( line->keyword == MEMBERS ) {
- members_found = TRUE;
- } else if ( line->keyword == TYPE ) {
- if ( strstr( line->Contents, "enumerated" ) ||
- strstr( line->Contents, "structure" ) )
- enumerated_found = TRUE;
- } else if ( line->keyword == DERIVATION ) {
- if ( strstr( line->Contents, "enumerated" ) ||
- strstr( line->Contents, "structure" ) ) {
- enumerated_found = TRUE;
- } else if ( strstr( line->Contents, "handle" ) ||
- strstr( line->Contents, "array" ) ||
- strstr( line->Contents, "string" ) ) {
- no_range_or_members = TRUE;
- }
- }
- }
-
- if ( no_range_or_members ) {
-/* This code does not like:
-
-ABSTRACT TYPE: Times
- DESCRIPTION:
- This type specifies mode elapsed times.
- VISIBILITY: public
- DERIVATION: array of Elapsed_Seconds of Timeutil
- RANGE: COMM - ENGAGE of Current_mode_t
-
- if ( range_found ) {
- fprintf(
- stderr,
- "Range should not be specified in subsection starting at line %d\n",
- start->number
- );
- errors++;
- }
-*/
- if ( members_found ) {
- fprintf(
- stderr,
- "Members should not be specified in subsection starting at line %d\n",
- start->number
- );
- errors++;
- }
- } else {
- if ( !range_found && !members_found ) {
- fprintf(
- stderr,
- "Neither range nor members keyword present in "
- "subsection starting at line %d\n",
- start->number
- );
- errors++;
- }
-
- if ( !enumerated_found && !range_found ) {
- fprintf(
- stderr,
- "Type does not have range specified in "
- "subsection starting at line %d\n",
- start->number
- );
- errors++;
- }
-
- }
-
- if ( !InsertTBDs ) {
- if ( range_found && members_found ) {
- fprintf(
- stderr,
- "Both range and members keyword present in "
- "subsection starting at line %d\n",
- start->number
- );
- errors++;
- }
- }
-
- if ( enumerated_found && !members_found ) {
- fprintf(
- stderr,
- "Enumerated type without list of members in "
- "subsection starting at line %d\n",
- start->number
- );
- errors++;
- }
-
- return (errors) ? -1 : 0;
-}
-
-/*
- * Validate_attribute
- *
- * presence of range or members but not both
- */
-
-int Validate_attribute(
- Section_info_t *section,
- Line_Control *start,
- Line_Control *next_section
-)
-{
- boolean range_found = FALSE;
- boolean members_found = FALSE;
- boolean enumerated_found = FALSE;
- boolean boolean_found = FALSE;
- boolean true_found = FALSE;
- boolean false_found = FALSE;
- Line_Control *line;
- int errors = 0;
-
- for ( line = start;
- line != next_section ;
- line = (Line_Control *) line->Node.next ) {
- if ( line->keyword == RANGE )
- range_found = TRUE;
- else if ( line->keyword == MEMBERS ) {
- members_found = TRUE;
- if ( boolean_found == TRUE ) {
- line = (Line_Control *) line->Node.next;
- while ( !_Chain_Is_last( &line->Node ) ) {
- if ( line->keyword )
- break;
- if ( strstr( line->Contents, "FALSE" ) )
- false_found = TRUE;
- else if ( strstr( line->Contents, "TRUE" ) )
- true_found = TRUE;
- line = (Line_Control *) line->Node.next;
- }
- line = (Line_Control *) line->Node.previous;
- }
- } else if ( line->keyword == TYPE || line->keyword == DERIVATION ) {
- if ( strstr( line->Contents, "enumerated" ) )
- enumerated_found = TRUE;
- else if ( strstr( line->Contents, "boolean" ) ) {
- enumerated_found = TRUE;
- boolean_found = TRUE;
- }
- }
- }
-
- if ( !range_found && !members_found ) {
- fprintf(
- stderr,
- "Neither range nor members keyword present in "
- "subsection starting at line %d\n",
- start->number
- );
- errors++;
- }
-
- if ( !InsertTBDs ) {
- if ( range_found && members_found ) {
- fprintf(
- stderr,
- "Both range and members keyword present in "
- "subsection starting at line %d\n",
- start->number
- );
- errors++;
- }
- }
-
- if ( enumerated_found && !members_found ) {
- fprintf(
- stderr,
- "Enumerated type without list of members in "
- "subsection starting at line %d\n",
- start->number
- );
- errors++;
- }
-
- if ( !enumerated_found && !range_found ) {
- fprintf(
- stderr,
- "Type does not have range specified in "
- "subsection starting at line %d\n",
- start->number
- );
- errors++;
- }
-
- if ( boolean_found && !true_found ) {
- fprintf(
- stderr,
- "Boolean without a TRUE case specified in "
- "subsection starting at line %d\n",
- start->number
- );
- errors++;
- }
-
- if ( boolean_found && !false_found ) {
- fprintf(
- stderr,
- "Boolean without a FALSE case specified in "
- "subsection starting at line %d\n",
- start->number
- );
- errors++;
- }
-
- return (errors) ? -1 : 0;
-}
-
-/*
- * Validate_object
- *
- * presence of range or members but not both
- */
-
-int Validate_object(
- Section_info_t *section,
- Line_Control *start,
- Line_Control *next_section
-)
-{
- char ObjectName[ BUFFER_SIZE ];
- char EndObjectName[ BUFFER_SIZE ];
- Line_Control *line;
- int errors = 0;
-
-
- LineCopyFromRight( start, ObjectName );
-
- for ( line = start;
- !_Chain_Is_last( &line->Node ) ;
- line = (Line_Control *) line->Node.next ) {
- if ( line->keyword == END_OBJECT ) {
- LineCopyFromRight( line, EndObjectName );
- break;
- }
- }
-
- if ( strcmp( ObjectName, EndObjectName ) ) {
- fprintf(
- stderr,
- "Object and End Object names do not match\n"
- );
- errors++;
- }
-
- return (errors) ? -1 : 0;
-}
-
diff --git a/doc/tools/pdl2texi/s.d b/doc/tools/pdl2texi/s.d
deleted file mode 100644
index a434bf4523..0000000000
--- a/doc/tools/pdl2texi/s.d
+++ /dev/null
@@ -1,129 +0,0 @@
-
-OBJECT: Object_name
- DESCRIPTION:
- This object ...
- (briefly describe the object's primary responsibility or purpose)
- COPYRIGHT:
- Copyright (c) 1995, On-Line Applications Research Corporation (OAR)
- PORTING:
- THEORY OF OPERATION:
- DERIVATION:
- DEPENDENCIES:
- NOTES:
-
-ATTRIBUTE DESCRIPTIONS:
-
-ATTRIBUTE: An_attribute
- DESCRIPTION:
- This attribute ...
- (briefly describe the attribute's primary purpose)
- TYPE: float [constant]|integer [constant]
- (indicate one of the above)
- RANGE|MEMBERS: 0 - +INFINITY or MEMBER1, MEMBER2, MEMBER3
- (indicate RANGE or MEMBERS and specify, MEMBERS should be listed
- in all caps, RANGE can use +/-INFINITY)
- UNITS:
- SCALE FACTOR:
- DEFAULTS:
- TOLERANCE:
- REQUIREMENTS:
- ABCD 3.2.4 A paragraph title
- (indicate document, paragraph number, paragraph title)
- REFERENCES:
- NOTES:
-
-ASSOCIATION DESCRIPTIONS:
-
-ASSOCIATION:
- DESCRIPTION:
- VISIBILTY:
- ASSOCIATED WITH:
- MULTIPLICITY:
- REQUIREMENTS:
- ABCD 3.2.4 A paragraph title
- (indicate document, paragraph number, paragraph title)
- REFERENCES:
- NOTES:
-
-ABSTRACT TYPE DESCRIPTIONS:
-
-ABSTRACT TYPE:
- DESCRIPTION:
- This type ...
- (briefly describe the type's primary purpose)
- VISIBILITY: private|public
- (indicate one of the above)
- DERIVATION:
- MEMBERS|RANGE: 0 - +INFINITY or MEMBER1, MEMBER2, MEMBER3
- (indicate RANGE or MEMBERS and specify, MEMBERS should be listed
- in all caps, RANGE can use +/-INFINITY)
- UNITS:
- SCALE FACTOR:
- DEFAULTS:
- TOLERANCE:
- REQUIREMENTS:
- ABCD 3.2.4 A paragraph title
- (indicate document, paragraph number, paragraph title)
- REFERENCES:
- NOTES:
-
-DATA ITEM DESCRIPTIONS:
-
-DATA ITEM:
- DESCRIPTION:
- This data item ...
- (briefly describe the data item's primary purpose)
- TYPE:
- UNITS:
- SCALE FACTOR:
- DEFAULTS:
- TOLERANCE:
- NOTES:
-
-METHODS DESCRIPTIONS:
- (List methods alphabetically grouping public methods followed
- by private methods.)
-
-METHOD: Some_method
- DESCRIPTION:
- This method ...
- (briefly describe the method's primary responsibility)
- VISIBILITY: private|public
- (indicate one of the above)
- INPUTS:
- input_one - the first and only input
- (specify the logical inputs followed by a description,
- indicate 'none' if there are no inputs)
- OUTPUTS:
- output_one - the first and only output
- (specify the logical outputs followed by a description,
- indicate 'none' if there are no outputs, use 'result' if the
- method is a boolean function)
- REQUIREMENTS:
- ABCD 3.2.4 A paragraph title
- (indicate document, paragraph number, paragraph title)
- REFERENCES:
- NOTES:
- PDL:
-
-TASK DESCRIPTIONS:
-
-TASK:
- DESCRIPTION:
- This task ...
- (briefly describe the task's primary responsibility)
- INPUTS:
- SYNCHRONIZATION: delay|event|message|semaphore|signal|period
- (indicate one or more of the above and list any events,
- messages, or signals that can be received)
- TIMING:
- (specify any timing information that is related to the
- synchronization specified above)
- REQUIREMENTS:
- ABCD 3.2.4 A paragraph title
- (indicate document, paragraph number, paragraph title)
- REFERENCES:
- NOTES:
- PDL:
-
-ENDOBJECT: Object_name
diff --git a/doc/tools/pdl2texi/sample.d b/doc/tools/pdl2texi/sample.d
deleted file mode 100644
index c381cb3de2..0000000000
--- a/doc/tools/pdl2texi/sample.d
+++ /dev/null
@@ -1,136 +0,0 @@
-(All fields marked with an '*' are optional and can be deleted if
- there is no applicable information.
- All entity names (OBJECT, ATTRIBUTE, METHOD, etc.) are proper nouns
- and thus should only have the first letter capitalized.)
-
-OBJECT: Object_name
- DESCRIPTION:
- This object ...
- (briefly describe the object's primary responsibility or purpose)
- *COPYRIGHT:
- Copyright (c) 1995, On-Line Applications Research Corporation (OAR)
- *PORTING:
- THEORY OF OPERATION:
- *DERIVATION:
- *DEPENDENCIES:
- *NOTES:
-
-ATTRIBUTE DESCRIPTIONS:
-
-ATTRIBUTE: An_attribute
- DESCRIPTION:
- This attribute ...
- (briefly describe the attribute's primary purpose)
- TYPE: float [constant]|integer [constant]
- (indicate one of the above)
- MEMBERS|RANGE: 0 - +INFINITY or MEMBER1, MEMBER2, MEMBER3
- (indicate RANGE or MEMBERS and specify, MEMBERS should be listed
- in all caps, RANGE can use +/-INFINITY)
- *UNITS:
- *SCALE FACTOR:
- *DEFAULTS:
- *TOLERANCE:
- *REQUIREMENTS:
- ABCD 3.2.4 A paragraph title
- (indicate document, paragraph number, paragraph title)
- *REFERENCES:
- *NOTES:
-
-ASSOCIATION DESCRIPTIONS:
-
-ASSOCIATION: name
- DESCRIPTION:
- This association ...
- (briefly describe the association's primary purpose)
- VISIBILITY: private|public
- (indicate one of the above)
- ASSOCIATED WITH: object_name
- MULTIPLICITY:
- *REQUIREMENTS:
- ABCD 3.2.4 A paragraph title
- (indicate document, paragraph number, paragraph title)
- *REFERENCES:
- *NOTES:
-
-ABSTRACT TYPE DESCRIPTIONS:
-
-ABSTRACT TYPE: name
- DESCRIPTION:
- This type ...
- (briefly describe the type's primary purpose)
- VISIBILITY: private|public
- (indicate one of the above)
- DERIVATION:
- MEMBERS|RANGE: 0 - +INFINITY or MEMBER1, MEMBER2, MEMBER3
- (indicate RANGE or MEMBERS and specify, MEMBERS should be listed
- in all caps, RANGE can use +/-INFINITY)
- *UNITS:
- *SCALE FACTOR:
- *DEFAULTS:
- *TOLERANCE:
- *REQUIREMENTS:
- ABCD 3.2.4 A paragraph title
- (indicate document, paragraph number, paragraph title)
- *REFERENCES:
- *NOTES:
-
-DATA ITEM DESCRIPTIONS:
-
-DATA ITEM: name
- DESCRIPTION:
- This data item ...
- (briefly describe the data item's primary purpose)
- TYPE:
- *UNITS:
- *SCALE FACTOR:
- *DEFAULTS:
- *TOLERANCE:
- *NOTES:
-
-METHOD DESCRIPTIONS:
- (List methods alphabetically grouping public methods followed
- by private methods.)
-
-METHOD: Some_method
- DESCRIPTION:
- This method ...
- (briefly describe the method's primary responsibility)
- VISIBILITY: private|public
- (indicate one of the above)
- INPUTS:
- input_one - the first and only input
- (specify the logical inputs followed by a description,
- indicate 'none' if there are no inputs)
- OUTPUTS:
- output_one - the first and only output
- (specify the logical outputs followed by a description,
- indicate 'none' if there are no outputs, use 'result' if the
- method is a boolean function)
- *REQUIREMENTS:
- ABCD 3.2.4 A paragraph title
- (indicate document, paragraph number, paragraph title)
- *REFERENCES:
- *NOTES:
- PDL:
-
-TASK DESCRIPTIONS:
-
-TASK: name
- DESCRIPTION:
- This task ...
- (briefly describe the task's primary responsibility)
- INPUTS:
- SYNCHRONIZATION: delay|event|message|semaphore|signal|period
- (indicate one or more of the above and list any events,
- messages, or signals that can be received)
- TIMING:
- (specify any timing information that is related to the
- synchronization specified above)
- *REQUIREMENTS:
- ABCD 3.2.4 A paragraph title
- (indicate document, paragraph number, paragraph title)
- *REFERENCES:
- *NOTES:
- PDL:
-
-ENDOBJECT: Object_name
diff --git a/doc/tools/pdl2texi/system.h b/doc/tools/pdl2texi/system.h
deleted file mode 100644
index 173e48ce04..0000000000
--- a/doc/tools/pdl2texi/system.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * COPYRIGHT (c) 1997.
- * On-Line Applications Research Corporation (OAR).
- * All rights reserved.
- *
- * $Id$
- */
-
-#ifndef __SYSTEM_h
-#define __SYSTEM_h
-
-typedef unsigned int unsigned32;
-typedef unsigned short unsigned16;
-typedef unsigned char unsigned8;
-
-#define USE_INLINES
-#define STATIC static
-#define INLINE inline
-
-#ifndef NULL
-#define NULL 0
-#endif
-
-typedef unsigned int boolean;
-
-#if !defined( TRUE ) || (TRUE != 1)
-#undef TRUE
-#define TRUE (1)
-#endif
-
-#if !defined( FALSE ) || (FALSE != 0)
-#undef FALSE
-#define FALSE 0
-#endif
-
-#endif
diff --git a/doc/tools/pdl2texi/test_cases/enum.d b/doc/tools/pdl2texi/test_cases/enum.d
deleted file mode 100644
index fc03c04f44..0000000000
--- a/doc/tools/pdl2texi/test_cases/enum.d
+++ /dev/null
@@ -1,44 +0,0 @@
-OBJECT: Testfile
- DESCRIPTION:
- This file contains one abstract type without a range and two
- abstract types with filler ranges.
- THEORY OF OPERATION:
- This file will be used to test the .d compiler.
-
-ATTRIBUTE DESCRIPTIONS: none
-
-ASSOCIATION DESCRIPTIONS: none
-
-ABSTRACT TYPE DESCRIPTIONS:
-
-ABSTRACT TYPE: ID
- DESCRIPTION:
- This type defines an identifier for an event set that may be manipulated.
- VISIBILITY: public
- DERIVATION: Bin_type handle
-
-ABSTRACT TYPE: Test_ID
- DESCRIPTION:
- This is the abstract type with the range made optional.
- VISIBILITY: public
- DERIVATION: Bin_type handle
-
-ABSTRACT TYPE: Input_Buffer
- DESCRIPTION:
- This type indicates the maximum input buffer.
- VISIBILITY: public
- DERIVATION: string
-
-ABSTRACT TYPE: Image_t
- DESCRIPTION:
- This type specifies the data maintained for the screen.
- VISIBILITY: public
- DERIVATION: array [LINES][COLUMNS] of character
-
-DATA ITEM DESCRIPTIONS: none
-
-METHOD DESCRIPTIONS: none
-
-TASK DESCRIPTIONS: none
-
-ENDOBJECT: Testfile
diff --git a/doc/tools/pdl2texi/test_cases/enumbad.d b/doc/tools/pdl2texi/test_cases/enumbad.d
deleted file mode 100644
index 8bcd9f823e..0000000000
--- a/doc/tools/pdl2texi/test_cases/enumbad.d
+++ /dev/null
@@ -1,48 +0,0 @@
-OBJECT: Testfile
- DESCRIPTION:
- This file contains one abstract type without a range and two
- abstract types with filler ranges.
- THEORY OF OPERATION:
- This file will be used to test the .d compiler.
-
-ATTRIBUTE DESCRIPTIONS: none
-
-ASSOCIATION DESCRIPTIONS: none
-
-ABSTRACT TYPE DESCRIPTIONS:
-
-ABSTRACT TYPE: ID
- DESCRIPTION:
- This type defines an identifier for an event set that may be manipulated.
- VISIBILITY: public
- DERIVATION: Bin_type handle
- RANGE: 99 - 99
-
-ABSTRACT TYPE: Test_ID
- DESCRIPTION:
- This is the abstract type with the range made optional.
- VISIBILITY: public
- DERIVATION: Bin_type handle
-
-ABSTRACT TYPE: Input_Buffer
- DESCRIPTION:
- This type indicates the maximum input buffer.
- VISIBILITY: public
- DERIVATION: string
- RANGE: 99 - 99
-
-ABSTRACT TYPE: Image_t
- DESCRIPTION:
- This type specifies the data maintained for the screen.
- VISIBILITY: public
- DERIVATION: array [LINES][COLUMNS] of character
- RANGE: 0 - 1 QQQ
-
-DATA ITEM DESCRIPTIONS: none
-
-METHOD DESCRIPTIONS: none
-
-TASK DESCRIPTIONS: none
-
-ENDOBJECT: Testfile
-
diff --git a/doc/tools/pdl2texi/test_cases/table.d b/doc/tools/pdl2texi/test_cases/table.d
deleted file mode 100644
index 954a9b419b..0000000000
--- a/doc/tools/pdl2texi/test_cases/table.d
+++ /dev/null
@@ -1,27 +0,0 @@
-OBJECT: AVDAS
- DESCRIPTION:
- This file contains a test case which blows up pdl2texi when optimization
- is enabled. See the makefile for details.
- THEORY OF OPERATION:
- This object ..
- NOTES:
- The following blows up pdl2texi when -O is set.
-
-@table
- System Switch
-
-@end table
-
-ATTRIBUTE DESCRIPTIONS: none
-
-ASSOCIATION DESCRIPTIONS: none
-
-ABSTRACT TYPE DESCRIPTIONS: none
-
-DATA ITEM DESCRIPTIONS: none
-
-METHOD DESCRIPTIONS: none
-
-TASK DESCRIPTIONS: none
-
-ENDOBJECT: AVDAS
diff --git a/doc/tools/src2html/Makefile b/doc/tools/src2html/Makefile
deleted file mode 100644
index 6aa7b47e39..0000000000
--- a/doc/tools/src2html/Makefile
+++ /dev/null
@@ -1,38 +0,0 @@
-#
-# COPYRIGHT (c) 1988-1999.
-# On-Line Applications Research Corporation (OAR).
-# All rights reserved.
-#
-# $Id$
-#
-
-CC=gcc
-CFLAGS=-g
-
-PROGS=ctags-wr ctags-new ctags src2html
-
-SRC2HTMLDIR=src2html1.4a
-
-all: tools
-
-tools: $(PROGS)
- chmod +x $(PROGS)
-
-ctags-wr:
- cp ../$(SRC2HTMLDIR)/ctags-wr .
-
-ctags-new:
- cd ../$(SRC2HTMLDIR)/Ctags ; gmake
- cp ../$(SRC2HTMLDIR)/Ctags/ctags-new .
-
-# EMACS ctags with Ada awareness
-ctags:
- cp ../$(SRC2HTMLDIR)/ctags-emacs/ctags ctags
-
-src2html:
- cp ../$(SRC2HTMLDIR)/src2html .
-
-clean:
- rm -f $(PROGS)
- cd ../$(SRC2HTMLDIR)/Ctags ; gmake clean
-
diff --git a/doc/tools/src2html1.4a/Ctags/C.c b/doc/tools/src2html1.4a/Ctags/C.c
deleted file mode 100644
index f091fcedad..0000000000
--- a/doc/tools/src2html1.4a/Ctags/C.c
+++ /dev/null
@@ -1,444 +0,0 @@
-/*
- * Copyright (c) 1987 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)C.c 5.5 (Berkeley) 2/26/91";
-#endif /* not lint */
-
-#include <stdio.h>
-#include <string.h>
-#include "ctags.h"
-
-static int func_entry(), str_entry();
-static void hash_entry();
-
-/*
- * c_entries --
- * read .c and .h files and call appropriate routines
- */
-c_entries()
-{
- extern int tflag; /* -t: create tags for typedefs */
- register int c, /* current character */
- level; /* brace level */
- register char *sp; /* buffer pointer */
- int token, /* if reading a token */
- t_def, /* if reading a typedef */
- t_level; /* typedef's brace level */
- char tok[MAXTOKEN]; /* token buffer */
- int st; /* Symbol type */
- int rparen; /* State of last rparen */
-
- lineftell = ftell(inf);
- sp = tok; token = t_def = NO; t_level = -1; level = 0; lineno = 1;
- rparen=0;
- while (GETC(!=,EOF)) {
- rparen--;
- switch ((char)c) {
- /*
- * Here's where it DOESN'T handle:
- * foo(a)
- * {
- * #ifdef notdef
- * }
- * #endif
- * if (a)
- * puts("hello, world");
- * }
- */
- case '{':
- ++level;
- goto endtok;
- case '}':
- /*
- * if level goes below zero, try and fix
- * it, even though we've already messed up
- */
- if (--level < 0)
- level = 0;
- goto endtok;
-
- case '\n':
- SETLINE;
- /*
- * the above 3 cases are similar in that they
- * are special characters that also end tokens.
- */
-endtok: if (sp > tok) {
- *sp = EOS;
- token = YES;
- sp = tok;
- }
- else
- token = NO;
- continue;
-
- /* we ignore quoted strings and comments in their entirety */
- case '"':
- case '\'':
- (void)skip_key(c);
- break;
- /* We ignore everything between [] */
- case '[':
- (void)skip_key(']');
- goto storec;
-
- /*
- * comments can be fun; note the state is unchanged after
- * return, in case we found:
- * "foo() XX comment XX { int bar; }"
- */
- case '/':
- if (GETC(==,'*')) {
- skip_comment();
- continue;
- }
- (void)ungetc(c,inf);
- c = '/';
- goto storec;
-
- /* hash marks flag #define's. */
- case '#':
- if (sp == tok) {
- hash_entry();
- break;
- }
- goto storec;
-
- /*
- * if we have a current token, parenthesis on
- * level zero indicates a function.
- */
- case '(':
- if (!level && token) {
- int curline;
-
- if (sp != tok)
- *sp = EOS;
- /*
- * grab the line immediately, we may
- * already be wrong, for example,
- * foo\n
- * (arg1,
- */
- getline();
- curline = lineno;
- if (func_entry()) {
- ++level;
- pfnote(tok,curline,SY_FUN);
- } else rparen=2;
- break;
- }
- goto storec;
-
- /*
- * semi-colons indicate the end of a typedef; if we find a
- * typedef we search for the next semi-colon of the same
- * level as the typedef. Ignoring "structs", they are
- * tricky, since you can find:
- *
- * "typedef long time_t;"
- * "typedef unsigned int u_int;"
- * "typedef unsigned int u_int [10];"
- *
- * If looking at a typedef, we save a copy of the last token
- * found. Then, when we find the ';' we take the current
- * token if it starts with a valid token name, else we take
- * the one we saved. There's probably some reasonable
- * alternative to this...
- */
- case ';':
- if (t_def && level == t_level) {
- t_def = NO;
- getline();
- if (sp != tok)
- *sp = EOS;
- pfnote(tok,lineno,SY_TYP);
- break;
- }
- /*
- * Catch global variables by the fact that they end in ; or ,
- * and they are at level zero.
- */
- case ',':
- if (sp != tok) *sp = EOS;
- if (level==0 && rparen!=1) {
- pfnote(tok,lineno,SY_VAR);
- break;
- }
- goto storec;
-
- /*
- * store characters until one that can't be part of a token
- * comes along; check the current token against certain
- * reserved words.
- */
- default:
-storec: if (!intoken(c)) {
- if (sp == tok)
- break;
- *sp = EOS;
- if (tflag) {
- /* no typedefs inside typedefs */
- if (!t_def && !bcmp(tok,"typedef",8)) {
- t_def = YES;
- t_level = level;
- break;
- }
- /* catch "typedef struct" */
- if ((!t_def || t_level < level)
- && (!bcmp(tok,"struct",7)
- || !bcmp(tok,"union",6)
- || !bcmp(tok,"enum",5))) {
- /* Get type of symbol */
- st=0;
- switch (*tok) {
- case 's' : st= SY_STR; break;
- case 'u' : st= SY_UNI; break;
- case 'e' : st= SY_ENU; break;
- }
- /*
- * get line immediately;
- * may change before '{'
- */
- getline();
- if (str_entry(c,st))
- ++level;
- break;
- }
- }
- sp = tok;
- }
- else if (sp != tok || begtoken(c)) {
- *sp++ = c;
- token = YES;
- }
- continue;
- }
- sp = tok;
- token = NO;
- }
-}
-
-/*
- * func_entry --
- * handle a function reference
- */
-static
-func_entry()
-{
- register int c; /* current character */
-
- /*
- * we assume that the character after a function's right paren
- * is a token character if it's a function and a non-token
- * character if it's a declaration. Comments don't count...
- */
- (void)skip_key((int)')');
- for (;;) {
- while (GETC(!=,EOF) && iswhite(c))
- if (c == (int)'\n')
- SETLINE;
- if (intoken(c) || c == (int)'{')
- break;
- if (c == (int)'/' && GETC(==,'*'))
- skip_comment();
- else { /* don't ever "read" '/' */
- (void)ungetc(c,inf);
- return(NO);
- }
- }
- if (c != (int)'{')
- (void)skip_key((int)'{');
- return(YES);
-}
-
-/*
- * hash_entry --
- * handle a line starting with a '#'
- */
-static void
-hash_entry()
-{
- extern int dflag; /* -d: non-macro defines */
- register int c, /* character read */
- curline; /* line started on */
- register char *sp; /* buffer pointer */
- char tok[MAXTOKEN]; /* storage buffer */
-
- curline = lineno;
- for (sp = tok;;) { /* get next token */
- if (GETC(==,EOF))
- return;
- if (iswhite(c))
- break;
- *sp++ = c;
- }
- *sp = EOS;
- if (bcmp(tok,"define",6)) /* only interested in #define's */
- goto skip;
- for (;;) { /* this doesn't handle "#define \n" */
- if (GETC(==,EOF))
- return;
- if (!iswhite(c))
- break;
- }
- for (sp = tok;;) { /* get next token */
- *sp++ = c;
- if (GETC(==,EOF))
- return;
- /*
- * this is where it DOESN'T handle
- * "#define \n"
- */
- if (!intoken(c))
- break;
- }
- *sp = EOS;
- if (dflag || c == (int)'(') { /* only want macros */
- getline();
- if (c == (int)'(') pfnote(tok,curline,SY_MAC);
- else pfnote(tok,curline,SY_DEF);
- }
-skip: if (c == (int)'\n') { /* get rid of rest of define */
- SETLINE
- if (*(sp - 1) != '\\')
- return;
- }
- (void)skip_key((int)'\n');
-}
-
-/*
- * str_entry --
- * handle a struct, union or enum entry
- */
-static
-str_entry(c,st)
- register int c; /* current character */
- int st; /* type of symbol */
-{
- register char *sp; /* buffer pointer */
- int curline; /* line started on */
- char tok[BUFSIZ]; /* storage buffer */
-
- curline = lineno;
- while (iswhite(c))
- if (GETC(==,EOF))
- return(NO);
- if (c == (int)'{') /* it was "struct {" */
- return(YES);
- for (sp = tok;;) { /* get next token */
- *sp++ = c;
- if (GETC(==,EOF))
- return(NO);
- if (!intoken(c))
- break;
- }
- switch ((char)c) {
- case '{': /* it was "struct foo{" */
- --sp;
- break;
- case '\n': /* it was "struct foo\n" */
- SETLINE;
- /*FALLTHROUGH*/
- default: /* probably "struct foo " */
- while (GETC(!=,EOF))
- if (!iswhite(c))
- break;
- if (c != (int)'{') {
- (void)ungetc(c, inf);
- return(NO);
- }
- }
- *sp = EOS;
- pfnote(tok,curline,st);
- return(YES);
-}
-
-/*
- * skip_comment --
- * skip over comment
- */
-skip_comment()
-{
- register int c, /* character read */
- star; /* '*' flag */
-
- for (star = 0;GETC(!=,EOF);)
- switch((char)c) {
- /* comments don't nest, nor can they be escaped. */
- case '*':
- star = YES;
- break;
- case '/':
- if (star)
- return;
- break;
- case '\n':
- SETLINE;
- /*FALLTHROUGH*/
- default:
- star = NO;
- }
-}
-
-/*
- * skip_key --
- * skip to next char "key"
- */
-skip_key(key)
- register int key;
-{
- register int c,
- skip,
- retval;
-
- for (skip = retval = NO;GETC(!=,EOF);)
- switch((char)c) {
- case '\\': /* a backslash escapes anything */
- skip = !skip; /* we toggle in case it's "\\" */
- break;
- case ';': /* special case for yacc; if one */
- case '|': /* of these chars occurs, we may */
- retval = YES; /* have moved out of the rule */
- break; /* not used by C */
- case '\n':
- SETLINE;
- /*FALLTHROUGH*/
- default:
- if (c == key && !skip)
- return(retval);
- skip = NO;
- }
- return(retval);
-}
diff --git a/doc/tools/src2html1.4a/Ctags/Makefile b/doc/tools/src2html1.4a/Ctags/Makefile
deleted file mode 100644
index c6dd7f0d6a..0000000000
--- a/doc/tools/src2html1.4a/Ctags/Makefile
+++ /dev/null
@@ -1,15 +0,0 @@
-# @(#)Makefile 5.6 (Berkeley) 5/11/90
-
-CC=gcc
-
-PROG= ctags-new
-CFLAGS+=-I. -g
-
-SRCS= C.c ctags.c fortran.c lisp.c print.c tree.c yacc.c strerror.c
-
-ctags: C.o ctags.o fortran.o lisp.o print.o tree.o yacc.o strerror.o
- $(CC) -o ctags-new C.o ctags.o fortran.o lisp.o print.o tree.o yacc.o \
- strerror.o
-
-clean:
- rm -f *.o ctags-new
diff --git a/doc/tools/src2html1.4a/Ctags/ctags.1 b/doc/tools/src2html1.4a/Ctags/ctags.1
deleted file mode 100644
index aea23f9826..0000000000
--- a/doc/tools/src2html1.4a/Ctags/ctags.1
+++ /dev/null
@@ -1,225 +0,0 @@
-.\" Ctags-new is a modified version of the ctags produced by UCB and
-.\" distributed in their BSD distributions.
-.\" You should be able to diff this version against theirs to see what I
-.\" have changed.
-.\" Warren Toomey
-.\"
-.\" Copyright (c) 1987, 1990 The Regents of the University of California.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)ctags.1 6.8 (Berkeley) 4/24/91
-.\"
-.Dd April 24, 1991
-.Dt CTAGS 1
-.Os BSD 4
-.Sh NAME
-.Nm ctags-new
-.Nd create a tags file
-.Sh SYNOPSIS
-.Nm ctags-new
-.Op Fl BFadtuwvx
-.Op Fl f Ar tagsfile
-.Ar name ...
-.Sh DESCRIPTION
-.Nm Ctags-new
-makes a tags file for
-.Xr ex 1
-from the specified C,
-Pascal, Fortran,
-.Tn YACC ,
-lex, and lisp sources. A tags file gives the
-locations of specified objects in a group of files. Each line of the
-tags file contains the object name, the file in which it is defined,
-and a search pattern for the object definition, separated by white-space.
-Using the
-.Ar tags
-file,
-.Xr ex 1
-can quickly locate these object
-definitions. Depending on the options provided to
-.Nm ctags-new ,
-objects will consist of subroutines, typedefs, defines, structs,
-enums and unions.
-.Bl -tag -width Ds
-.It Fl B
-use backward searching patterns
-.Pq Li ?...? .
-.It Fl F
-use forward searching patterns
-.Pq Li /.../
-(the default).
-.It Fl a
-append to
-.Ar tags
-file.
-.It Fl d
-create tags for
-.Li #defines
-that don't take arguments;
-.Li #defines
-that take arguments are tagged automatically.
-.It Fl f
-Places the tag descriptions in a file called
-.Ar tagsfile .
-The default behaviour is to place them in a file
-.Ar tags .
-.It Fl t
-create tags for typedefs, structs, unions, and enums.
-.It Fl u
-update the specified files in the
-.Ar tags
-file, that is, all
-references to them are deleted, and the new values are appended to the
-file. (Beware: this option is implemented in a way which is rather
-slow; it is usually faster to simply rebuild the
-.Ar tags
-file.)
-.It Fl v
-An index of the form expected by
-.Xr vgrind 1
-is produced on the standard output. This listing
-contains the object name, file name, and page number (assuming 64
-line pages). Since the output will be sorted into lexicographic order,
-it may be desired to run the output through
-.Xr sort 1 .
-Sample use:
-.Bd -literal -offset indent
-ctags-new \-v files \&| sort \-f > index
-vgrind \-x index
-.Ed
-.It Fl y
-Yet another output format. This produces lines with the information:
-symbol, line number, file name, type of symbol, each separated by whitespace.
-This is used by the
-.Xr src2html 1L
-program.
-.It Fl w
-suppress warning diagnostics.
-.It Fl x
-.Nm ctags-new
-produces a list of object
-names, the line number and file name on which each is defined, as well
-as the text of that line and prints this on the standard output. This
-is a simple index which can be printed out as an off-line readable
-function index.
-.El
-.Pp
-Files whose names end in
-.Nm \&.c
-or
-.Nm \&.h
-are assumed to be C
-source files and are searched for C style routine and macro definitions.
-Files whose names end in
-.Nm \&.y
-are assumed to be
-.Tn YACC
-source files.
-Files whose names end in
-.Nm \&.l
-are assumed to be lisp files if their
-first non-blank character is `;', `(', or `[',
-otherwise, they are
-treated as lex files. Other files are first examined to see if they
-contain any Pascal or Fortran routine definitions, and, if not, are
-searched for C style definitions.
-.Pp
-The tag
-.Li main
-is treated specially in C programs. The tag formed
-is created by prepending
-.Ar M
-to the name of the file, with the
-trailing
-.Nm \&.c
-and any leading pathname components removed. This
-makes use of
-.Nm ctags-new
-practical in directories with more than one
-program.
-.Pp
-Yacc and lex files each have a special tag.
-.Ar Yyparse
-is the start
-of the second section of the yacc file, and
-.Ar yylex
-is the start of
-the second section of the lex file.
-.Sh FILES
-.Bl -tag -width tags -compact
-.It Pa tags
-default output tags file
-.El
-.Sh DIAGNOSTICS
-.Nm Ctags-new
-exits with a value of 1 if an error occurred, where
-duplicate objects are not considered errors, 0 otherwise.
-.Sh SEE ALSO
-.Xr ex 1 ,
-.Xr vi 1
-.Sh BUGS
-Recognition of
-.Nm functions ,
-.Nm subroutines
-and
-.Nm procedures
-for
-.Tn FORTRAN
-and Pascal is done is a very simpleminded way. No attempt
-is made to deal with block structure; if you have two Pascal procedures
-in different blocks with the same name you lose.
-.Nm Ctags-new
-doesn't
-understand about Pascal types.
-.Pp
-The method of deciding whether to look for C, Pascal or
-.Tn FORTRAN
-functions is a hack.
-.Pp
-.Nm Ctags-new
-relies on the input being well formed, and any syntactical
-errors will completely confuse it. It also finds some legal syntax
-confusing; for example, as it doesn't understand
-.Li #ifdef Ns 's ,
-(incidentally, that's a feature, not a bug) any code with unbalanced
-braces inside
-.Li #ifdef Ns 's
-will cause it to become somewhat disoriented.
-In a similar fashion, multiple line changes within a definition will
-cause it to enter the last line of the object, rather than the first, as
-the searching pattern. The last line of multiple line
-.Li typedef Ns 's
-will similarly be noted.
-.Sh HISTORY
-The
-.Nm
-command appeared in
-.Bx 3.0 .
diff --git a/doc/tools/src2html1.4a/Ctags/ctags.c b/doc/tools/src2html1.4a/Ctags/ctags.c
deleted file mode 100644
index 08d01a2ba0..0000000000
--- a/doc/tools/src2html1.4a/Ctags/ctags.c
+++ /dev/null
@@ -1,265 +0,0 @@
-/*
- * Copyright (c) 1987 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-char copyright[] =
-"@(#) Copyright (c) 1987 The Regents of the University of California.\n\
- All rights reserved.\n";
-#endif /* not lint */
-
-#ifndef lint
-static char sccsid[] = "@(#)ctags.c 5.8 (Berkeley) 2/26/91";
-#endif /* not lint */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include "ctags.h"
-
-/*
- * ctags: create a tags file
- */
-
-NODE *head; /* head of the sorted binary tree */
-
- /* boolean "func" (see init()) */
-bool _wht[0177],_etk[0177],_itk[0177],_btk[0177],_gd[0177];
-
-FILE *inf, /* ioptr for current input file */
- *outf; /* ioptr for tags file */
-
-long lineftell; /* ftell after getc( inf ) == '\n' */
-
-int lineno, /* line number of current line */
- dflag, /* -d: non-macro defines */
- tflag, /* -t: create tags for typedefs */
- wflag, /* -w: suppress warnings */
- vflag, /* -v: vgrind style index output */
- xflag, /* -x: cxref style output */
- yflag; /* -y: yet another style output */
-
-char *curfile, /* current input file name */
- searchar = '/', /* use /.../ searches by default */
- lbuf[BUFSIZ];
-
-main(argc,argv)
- int argc;
- char **argv;
-{
- extern char *optarg; /* getopt arguments */
- extern int optind;
- static char *outfile = "tags"; /* output file */
- int aflag, /* -a: append to tags */
- uflag, /* -u: update tags */
- exit_val, /* exit value */
- step, /* step through args */
- ch; /* getopts char */
- char cmd[100]; /* too ugly to explain */
-
- aflag = uflag = NO;
- while ((ch = getopt(argc,argv,"BFadf:tuwvxy")) != EOF)
- switch((char)ch) {
- case 'B':
- searchar = '?';
- break;
- case 'F':
- searchar = '/';
- break;
- case 'a':
- aflag++;
- break;
- case 'd':
- dflag++;
- break;
- case 'f':
- outfile = optarg;
- break;
- case 't':
- tflag++;
- break;
- case 'u':
- uflag++;
- break;
- case 'w':
- wflag++;
- break;
- case 'v':
- vflag++;
- case 'x':
- xflag++;
- break;
- case 'y':
- yflag++;
- break;
- case '?':
- default:
- goto usage;
- }
- argv += optind;
- argc -= optind;
- if (!argc) {
-usage: puts("Usage: ctags [-BFadtuwvx] [-f tagsfile] file ...");
- exit(1);
- }
-
- init();
-
- for (exit_val = step = 0;step < argc;++step)
- if (!(inf = fopen(argv[step],"r"))) {
- perror(argv[step]);
- exit_val = 1;
- }
- else {
- curfile = argv[step];
- find_entries(argv[step]);
- (void)fclose(inf);
- }
-
- if (head)
- if (xflag)
- put_entries(head);
- else {
- if (uflag) {
- for (step = 0;step < argc;step++) {
- (void)sprintf(cmd,"mv %s OTAGS;fgrep -v '\t%s\t' OTAGS >%s;rm OTAGS",outfile,argv[step],outfile);
- system(cmd);
- }
- ++aflag;
- }
- if (!(outf = fopen(outfile, aflag ? "a" : "w"))) {
- perror(outfile);
- exit(exit_val);
- }
- put_entries(head);
- (void)fclose(outf);
- if (uflag) {
- (void)sprintf(cmd,"sort %s -o %s",outfile,outfile);
- system(cmd);
- }
- }
- exit(exit_val);
-}
-
-/*
- * init --
- * this routine sets up the boolean psuedo-functions which work by
- * setting boolean flags dependent upon the corresponding character.
- * Every char which is NOT in that string is false with respect to
- * the pseudo-function. Therefore, all of the array "_wht" is NO
- * by default and then the elements subscripted by the chars in
- * CWHITE are set to YES. Thus, "_wht" of a char is YES if it is in
- * the string CWHITE, else NO.
- */
-init()
-{
- register int i;
- register char *sp;
-
- for (i = 0; i < 0177; i++) {
- _wht[i] = _etk[i] = _itk[i] = _btk[i] = NO;
- _gd[i] = YES;
- }
-#define CWHITE " \f\t\n"
- for (sp = CWHITE; *sp; sp++) /* white space chars */
- _wht[*sp] = YES;
-#define CTOKEN " \t\n\"'#()[]{}=-+%*/&|^~!<>;,.:?"
- for (sp = CTOKEN; *sp; sp++) /* token ending chars */
- _etk[*sp] = YES;
-#define CINTOK "ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz0123456789"
- for (sp = CINTOK; *sp; sp++) /* valid in-token chars */
- _itk[*sp] = YES;
-#define CBEGIN "ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz"
- for (sp = CBEGIN; *sp; sp++) /* token starting chars */
- _btk[*sp] = YES;
-#define CNOTGD ",;"
- for (sp = CNOTGD; *sp; sp++) /* invalid after-function chars */
- _gd[*sp] = NO;
-}
-
-/*
- * find_entries --
- * this routine opens the specified file and calls the function
- * which searches the file.
- */
-find_entries(file)
- char *file;
-{
- register char *cp;
-
- lineno = 0; /* should be 1 ?? KB */
- if (cp = rindex(file, '.')) {
- if (cp[1] == 'l' && !cp[2]) {
- register int c;
-
- for (;;) {
- if (GETC(==,EOF))
- return;
- if (!iswhite(c)) {
- rewind(inf);
- break;
- }
- }
-#define LISPCHR ";(["
-/* lisp */ if (index(LISPCHR,(char)c)) {
- l_entries();
- return;
- }
-/* lex */ else {
- /*
- * we search all 3 parts of a lex file
- * for C references. This may be wrong.
- */
- toss_yysec();
- (void)strcpy(lbuf,"%%$");
- pfnote("yylex",lineno);
- rewind(inf);
- }
- }
-/* yacc */ else if (cp[1] == 'y' && !cp[2]) {
- /*
- * we search only the 3rd part of a yacc file
- * for C references. This may be wrong.
- */
- toss_yysec();
- (void)strcpy(lbuf,"%%$");
- pfnote("yyparse",lineno);
- y_entries();
- }
-/* fortran */ else if ((cp[1] != 'c' && cp[1] != 'h') && !cp[2]) {
- if (PF_funcs())
- return;
- rewind(inf);
- }
- }
-/* C */ c_entries();
-}
diff --git a/doc/tools/src2html1.4a/Ctags/ctags.h b/doc/tools/src2html1.4a/Ctags/ctags.h
deleted file mode 100644
index 7b28018714..0000000000
--- a/doc/tools/src2html1.4a/Ctags/ctags.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 1987 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ctags.h 5.4 (Berkeley) 2/26/91
- */
-
-#include <strings.h>
-#define bool char
-
-#define YES 1
-#define NO 0
-#define EOS '\0'
-
-#define ENDLINE 50 /* max length of pattern */
-#define MAXTOKEN 250 /* max size of single token */
-
-#define SETLINE {++lineno;lineftell = ftell(inf);}
-#define GETC(op,exp) ((c = getc(inf)) op (int)exp)
-
-#define iswhite(arg) (_wht[arg]) /* T if char is white */
-#define begtoken(arg) (_btk[arg]) /* T if char can start token */
-#define intoken(arg) (_itk[arg]) /* T if char can be in token */
-#define endtoken(arg) (_etk[arg]) /* T if char ends tokens */
-#define isgood(arg) (_gd[arg]) /* T if char can be after ')' */
-
- /* Symbol types */
-#define SY_MAC 1 /* Preprocessor Macros */
-#define SY_DEF 2 /* Preprocessor Defines */
-#define SY_FUN 3 /* C Functions */
-#define SY_VAR 4 /* C Variables */
-#define SY_STR 5 /* C Structs */
-#define SY_UNI 6 /* C Unions */
-#define SY_TYP 7 /* C Typedefs */
-#define SY_ENU 8 /* C Enums */
-
-typedef struct nd_st { /* sorting structure */
- struct nd_st *left,
- *right; /* left and right sons */
- char *entry, /* function or type name */
- *file, /* file name */
- *pat; /* search pattern */
- int symbtype; /* Type of symbol */
- int lno; /* for -x option */
- bool been_warned; /* set if noticed dup */
-} NODE;
-
-extern FILE *inf; /* ioptr for current input file */
-extern long lineftell; /* ftell after getc( inf ) == '\n' */
-extern int lineno, /* line number of current line */
- xflag; /* -x: cxref style output */
-extern bool _wht[0177],_etk[0177],_itk[0177],_btk[0177],_gd[0177];
-extern char lbuf[BUFSIZ];
diff --git a/doc/tools/src2html1.4a/Ctags/fortran.c b/doc/tools/src2html1.4a/Ctags/fortran.c
deleted file mode 100644
index 025a204b6b..0000000000
--- a/doc/tools/src2html1.4a/Ctags/fortran.c
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Copyright (c) 1987 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)fortran.c 5.5 (Berkeley) 2/26/91";
-#endif /* not lint */
-
-#include <stdio.h>
-#include <string.h>
-#include "ctags.h"
-
-static void takeprec();
-
-char *lbp; /* line buffer pointer */
-
-PF_funcs()
-{
- register bool pfcnt; /* pascal/fortran functions found */
- register char *cp;
- char tok[MAXTOKEN],
- *gettoken();
-
- for (pfcnt = NO;;) {
- lineftell = ftell(inf);
- if (!fgets(lbuf,sizeof(lbuf),inf))
- return(pfcnt);
- ++lineno;
- lbp = lbuf;
- if (*lbp == '%') /* Ratfor escape to fortran */
- ++lbp;
- for (;isspace(*lbp);++lbp);
- if (!*lbp)
- continue;
- switch (*lbp | ' ') { /* convert to lower-case */
- case 'c':
- if (cicmp("complex") || cicmp("character"))
- takeprec();
- break;
- case 'd':
- if (cicmp("double")) {
- for (;isspace(*lbp);++lbp);
- if (!*lbp)
- continue;
- if (cicmp("precision"))
- break;
- continue;
- }
- break;
- case 'i':
- if (cicmp("integer"))
- takeprec();
- break;
- case 'l':
- if (cicmp("logical"))
- takeprec();
- break;
- case 'r':
- if (cicmp("real"))
- takeprec();
- break;
- }
- for (;isspace(*lbp);++lbp);
- if (!*lbp)
- continue;
- switch (*lbp | ' ') {
- case 'f':
- if (cicmp("function"))
- break;
- continue;
- case 'p':
- if (cicmp("program") || cicmp("procedure"))
- break;
- continue;
- case 's':
- if (cicmp("subroutine"))
- break;
- default:
- continue;
- }
- for (;isspace(*lbp);++lbp);
- if (!*lbp)
- continue;
- for (cp = lbp + 1;*cp && intoken(*cp);++cp);
- if (cp = lbp + 1)
- continue;
- *cp = EOS;
- (void)strcpy(tok,lbp);
- getline(); /* process line for ex(1) */
- pfnote(tok,lineno);
- pfcnt = YES;
- }
- /*NOTREACHED*/
-}
-
-/*
- * cicmp --
- * do case-independent strcmp
- */
-cicmp(cp)
- register char *cp;
-{
- register int len;
- register char *bp;
-
- for (len = 0,bp = lbp;*cp && (*cp &~ ' ') == (*bp++ &~ ' ');
- ++cp,++len);
- if (!*cp) {
- lbp += len;
- return(YES);
- }
- return(NO);
-}
-
-static void
-takeprec()
-{
- for (;isspace(*lbp);++lbp);
- if (*lbp == '*') {
- for (++lbp;isspace(*lbp);++lbp);
- if (!isdigit(*lbp))
- --lbp; /* force failure */
- else
- while (isdigit(*++lbp));
- }
-}
diff --git a/doc/tools/src2html1.4a/Ctags/lisp.c b/doc/tools/src2html1.4a/Ctags/lisp.c
deleted file mode 100644
index 652313d4fe..0000000000
--- a/doc/tools/src2html1.4a/Ctags/lisp.c
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright (c) 1987 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)lisp.c 5.5 (Berkeley) 2/26/91";
-#endif /* not lint */
-
-#include <stdio.h>
-#include <string.h>
-#include "ctags.h"
-
-extern char *lbp; /* pointer shared with fortran */
-
-/*
- * lisp tag functions
- * just look for (def or (DEF
- */
-l_entries()
-{
- register int special;
- register char *cp,
- savedc;
- char tok[MAXTOKEN];
-
- for (;;) {
- lineftell = ftell(inf);
- if (!fgets(lbuf,sizeof(lbuf),inf))
- return;
- ++lineno;
- lbp = lbuf;
- if (!cicmp("(def"))
- continue;
- special = NO;
- switch(*lbp | ' ') {
- case 'm':
- if (cicmp("method"))
- special = YES;
- break;
- case 'w':
- if (cicmp("wrapper") || cicmp("whopper"))
- special = YES;
- }
- for (;!isspace(*lbp);++lbp);
- for (;isspace(*lbp);++lbp);
- for (cp = lbp;*cp && *cp != '\n';++cp);
- *cp = EOS;
- if (special) {
- if (!(cp = index(lbp,')')))
- continue;
- for (;cp >= lbp && *cp != ':';--cp);
- if (cp < lbp)
- continue;
- lbp = cp;
- for (;*cp && *cp != ')' && *cp != ' ';++cp);
- }
- else
- for (cp = lbp + 1;
- *cp && *cp != '(' && *cp != ' ';++cp);
- savedc = *cp;
- *cp = EOS;
- (void)strcpy(tok,lbp);
- *cp = savedc;
- getline();
- pfnote(tok,lineno);
- }
- /*NOTREACHED*/
-}
diff --git a/doc/tools/src2html1.4a/Ctags/print.c b/doc/tools/src2html1.4a/Ctags/print.c
deleted file mode 100644
index 1c1c545ab6..0000000000
--- a/doc/tools/src2html1.4a/Ctags/print.c
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Copyright (c) 1987 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)print.c 5.4 (Berkeley) 2/26/91";
-#endif /* not lint */
-
-#include <unistd.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "ctags.h"
-
-extern char searchar; /* ex search character */
-
-/*
- * getline --
- * get the line the token of interest occurred on,
- * prepare it for printing.
- */
-getline()
-{
- register long saveftell;
- register int c,
- cnt;
- register char *cp;
-
- saveftell = ftell(inf);
- (void)fseek(inf,lineftell,SEEK_SET);
- if (xflag)
- for (cp = lbuf;GETC(!=,'\n');*cp++ = c);
- /*
- * do all processing here, so we don't step through the
- * line more than once; means you don't call this routine
- * unless you're sure you've got a keeper.
- */
- else for (cnt = 0,cp = lbuf;GETC(!=,EOF) && cnt < ENDLINE;++cnt) {
- if (c == (int)'\\') { /* backslashes */
- if (cnt > ENDLINE - 2)
- break;
- *cp++ = '\\'; *cp++ = '\\';
- ++cnt;
- }
- else if (c == (int)searchar) { /* search character */
- if (cnt > ENDLINE - 2)
- break;
- *cp++ = '\\'; *cp++ = c;
- ++cnt;
- }
- else if (c == (int)'\n') { /* end of keep */
- *cp++ = '$'; /* can find whole line */
- break;
- }
- else
- *cp++ = c;
- }
- *cp = EOS;
- (void)fseek(inf,saveftell,SEEK_SET);
-}
-
-char *symtype[]= {
- "Unknown",
- "Preprocessor macro",
- "Preprocessor define",
- "C function",
- "C variable",
- "C struct",
- "C union",
- "C typedef",
- "C enum"
-};
-
-/*
- * put_entries --
- * write out the tags
- */
-put_entries(node)
- register NODE *node;
-{
- extern FILE *outf; /* ioptr for tags file */
- extern int vflag; /* -v: vgrind style output */
- extern int yflag; /* -y: yet another style output */
-
- if (node->left)
- put_entries(node->left);
- if (vflag)
- printf("%s %s %d\n",
- node->entry,node->file,(node->lno + 63) / 64);
- else if (xflag)
- printf("%-16s %4d %-16s %s\n",
- node->entry,node->lno,node->file,node->pat);
- else if (yflag)
- printf("%-16s %4d %-16s %s\n",
- node->entry,node->lno,node->file,symtype[node->symbtype]);
- else
- fprintf(outf,"%s\t%s\t%c^%s%c\n",
- node->entry,node->file,searchar,node->pat,searchar);
- if (node->right)
- put_entries(node->right);
-}
diff --git a/doc/tools/src2html1.4a/Ctags/strerror.c b/doc/tools/src2html1.4a/Ctags/strerror.c
deleted file mode 100644
index 7a82b869bf..0000000000
--- a/doc/tools/src2html1.4a/Ctags/strerror.c
+++ /dev/null
@@ -1,6 +0,0 @@
-char *strerror(i)
- int i;
- {
- extern char *sys_errlist[];
- return sys_errlist[i];
- }
diff --git a/doc/tools/src2html1.4a/Ctags/tree.c b/doc/tools/src2html1.4a/Ctags/tree.c
deleted file mode 100644
index e82c72c404..0000000000
--- a/doc/tools/src2html1.4a/Ctags/tree.c
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Copyright (c) 1987 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)tree.c 5.5 (Berkeley) 2/26/91";
-#endif /* not lint */
-
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "ctags.h"
-
-/*
- * pfnote --
- * enter a new node in the tree
- */
-pfnote(name,ln,type)
- char *name;
- int ln;
- int type;
-{
- extern NODE *head; /* head of the sorted binary tree */
- extern char *curfile; /* current input file name */
- register NODE *np;
- register char *fp;
- char nbuf[MAXTOKEN];
-
- /*NOSTRICT*/
- if (!(np = (NODE *)malloc(sizeof(NODE)))) {
- fputs("ctags: too many entries to sort\n",stderr);
- put_entries(head);
- free_tree(head);
- /*NOSTRICT*/
- if (!(head = np = (NODE *)malloc(sizeof(NODE)))) {
- fputs("ctags: out of space.\n",stderr);
- exit(1);
- }
- }
- if (!xflag && !strcmp(name,"main")) {
- if (!(fp = rindex(curfile,'/')))
- fp = curfile;
- else
- ++fp;
- (void)sprintf(nbuf,"M%s",fp);
- fp = rindex(nbuf,'.');
- if (fp && !fp[2])
- *fp = EOS;
- name = nbuf;
- }
- if (!(np->entry = strdup(name))) {
- (void)fprintf(stderr, "ctags: %s\n", strerror(errno));
- exit(1);
- }
- np->file = curfile;
- np->lno = ln; np->symbtype= type;
- np->left = np->right = 0;
- if (!(np->pat = strdup(lbuf))) {
- (void)fprintf(stderr, "ctags: %s\n", strerror(errno));
- exit(1);
- }
- if (!head)
- head = np;
- else
- add_node(np,head);
-}
-
-add_node(node,cur_node)
- register NODE *node,
- *cur_node;
-{
- extern int wflag; /* -w: suppress warnings */
- register int dif;
-
- dif = strcmp(node->entry,cur_node->entry);
- if (!dif) {
- if (node->file == cur_node->file) {
- if (!wflag)
- fprintf(stderr,"Duplicate entry in file %s, line %d: %s\nSecond entry ignored\n",node->file,lineno,node->entry);
- return;
- }
- if (!cur_node->been_warned)
- if (!wflag)
- fprintf(stderr,"Duplicate entry in files %s and %s: %s (Warning only)\n",node->file,cur_node->file,node->entry);
- cur_node->been_warned = YES;
- }
- else if (dif < 0)
- if (cur_node->left)
- add_node(node,cur_node->left);
- else
- cur_node->left = node;
- else if (cur_node->right)
- add_node(node,cur_node->right);
- else
- cur_node->right = node;
-}
-
-free_tree(node)
- register NODE *node;
-{
- NODE *nl;
- while (node) {
- if (node->right)
- free_tree(node->right);
- nl= node->left; free(node);
- node = nl;
- }
-}
diff --git a/doc/tools/src2html1.4a/Ctags/yacc.c b/doc/tools/src2html1.4a/Ctags/yacc.c
deleted file mode 100644
index f073f2bb7c..0000000000
--- a/doc/tools/src2html1.4a/Ctags/yacc.c
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Copyright (c) 1987 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)yacc.c 5.6 (Berkeley) 2/26/91";
-#endif /* not lint */
-
-#include <stdio.h>
-#include <string.h>
-#include "ctags.h"
-
-/*
- * y_entries:
- * find the yacc tags and put them in.
- */
-y_entries()
-{
- register int c;
- register char *sp;
- register bool in_rule;
- char tok[MAXTOKEN];
-
- while (GETC(!=,EOF))
- switch ((char)c) {
- case '\n':
- SETLINE;
- /* FALLTHROUGH */
- case ' ':
- case '\f':
- case '\r':
- case '\t':
- break;
- case '{':
- if (skip_key((int)'}'))
- in_rule = NO;
- break;
- case '\'':
- case '"':
- if (skip_key(c))
- in_rule = NO;
- break;
- case '%':
- if (GETC(==,'%'))
- return;
- (void)ungetc(c,inf);
- break;
- case '/':
- if (GETC(==,'*'))
- skip_comment();
- else
- (void)ungetc(c,inf);
- break;
- case '|':
- case ';':
- in_rule = NO;
- break;
- default:
- if (in_rule || !isalpha(c) && c != (int)'.'
- && c != (int)'_')
- break;
- sp = tok;
- *sp++ = c;
- while (GETC(!=,EOF) && (intoken(c) || c == (int)'.'))
- *sp++ = c;
- *sp = EOS;
- getline(); /* may change before ':' */
- while (iswhite(c)) {
- if (c == (int)'\n')
- SETLINE;
- if (GETC(==,EOF))
- return;
- }
- if (c == (int)':') {
- pfnote(tok,lineno);
- in_rule = YES;
- }
- else
- (void)ungetc(c,inf);
- }
-}
-
-/*
- * toss_yysec --
- * throw away lines up to the next "\n%%\n"
- */
-toss_yysec()
-{
- register int c, /* read character */
- state;
-
- /*
- * state == 0 : waiting
- * state == 1 : received a newline
- * state == 2 : received first %
- * state == 3 : recieved second %
- */
- lineftell = ftell(inf);
- for (state = 0;GETC(!=,EOF);)
- switch ((char)c) {
- case '\n':
- ++lineno;
- lineftell = ftell(inf);
- if (state == 3) /* done! */
- return;
- state = 1; /* start over */
- break;
- case '%':
- if (state) /* if 1 or 2 */
- ++state; /* goto 3 */
- break;
- default:
- state = 0; /* reset */
- }
-}
diff --git a/doc/tools/src2html1.4a/Ctags/z.c b/doc/tools/src2html1.4a/Ctags/z.c
deleted file mode 100644
index 4c90e6ec95..0000000000
--- a/doc/tools/src2html1.4a/Ctags/z.c
+++ /dev/null
@@ -1,20 +0,0 @@
-#define fred 23
-#define jim(a) (a+2)
-
-int helo;
-
-struct thing {
- int v;
-} doris;
-
-union what {
- int v;
- char q;
-} mary;
-
-enum thinddd { 1,2,3,4,5 } zoo;
-
-typedef unsigned int uinty;
-
-int rain()
- { printf("Hello world\n"); }
diff --git a/doc/tools/src2html1.4a/FreeBSD/FreeBSD.hdr b/doc/tools/src2html1.4a/FreeBSD/FreeBSD.hdr
deleted file mode 100644
index 6c2f8e185c..0000000000
--- a/doc/tools/src2html1.4a/FreeBSD/FreeBSD.hdr
+++ /dev/null
@@ -1,25 +0,0 @@
-Welcome to the hyperlinked source code tree for FreeBSD-2.1.0. This is an
-attempt at a WWW document that allows you to find functions, structs
-etc. in the FreeBSD source code by name.<p>
-
-If you are interested in a particular type of symbols (e.g functions), use
-the type links below. If you are interested in a particular directory in
-FreeBSD, choose the directory link below.<p>
-
-Follow the links until you reach the source code you are interested in.<p>
-
-<h3>Bugs and Missing Features</h3>
-
-I am using ctags and perl to find the symbols and produce the html documents.
-My parsing of the ctags output (especially for variables) seems slightly
-wrong. I'd appreciate a better way of doing things.<p>
-
-The final code should have hyperlinks that allow you to follow references
-to other symbols in the tree (e.g calls to bread() etc). This is difficult
-given C's scoping rules, and I don't want to write a C grammar parser.
-Until I can think of a clean way, I'll omit the desired hyperlinks.<p>
-
-<author>
-<a href="http://minnie.cs.adfa.oz.au/warren.html">Warren Toomey</a>
-wkt@cs.adfa.oz.au, January 1996
-</author>
diff --git a/doc/tools/src2html1.4a/FreeBSD/FreeBSD.s2h b/doc/tools/src2html1.4a/FreeBSD/FreeBSD.s2h
deleted file mode 100644
index 925eefeb58..0000000000
--- a/doc/tools/src2html1.4a/FreeBSD/FreeBSD.s2h
+++ /dev/null
@@ -1,68 +0,0 @@
-#
-#
-# Input description for the FreeBSD 2.1.0 source tree
-# Place this file and all the .hdr files in a directory,
-# cd into that directory, and say `src2html FreeBSD.s2h'.
-#
-set Formdir /cgi-bin
-set Htmldir FreeBSD-srctree
-set Htmlroot .
-set Newsrctree newsrc
-set Srctree sys
-#
-dir conf Kernel configuration parameters
-dir ddb Kernel debugging routines
-dir dev/aic7xxx Adaptec AIC7770/AIC7870 sequencer code
-dir dev/vn Vnode disk driver
-dir gnu/i386/fpemul GNU's i387 floating point emulator
-dir gnu/i386/isa Device drivers with GNU licensing
-dir gnu/isdn An ISDN driver
-dir i386/apm i386-specific power management
-dir i386/apm/apm_init i386-specific power management
-dir i386/boot/biosboot i386-specific boot code
-dir i386/boot/dosboot i386-specific boot code
-dir i386/boot/kzipboot i386-specific boot code
-dir i386/boot/netboot i386-specific boot code
-dir i386/eisa Device drivers for peripherals on the EISA bus
-dir i386/i386 i386-specific code
-dir i386/ibcs2 Intel Unix Binary Compatibility code
-dir i386/include i386-specific C-language include files
-dir i386/include/pc i386-specific C-language include files
-dir i386/isa Device drivers for peripherals on the ISA bus
-dir i386/isa/ic Device drivers for peripherals on the ISA bus
-dir i386/isa/matcd Matsushita device driver
-dir i386/isa/pcvt VT-220 emulation code
-dir i386/isa/sound Device drivers for sound peripherals on the ISA bus
-dir i386/linux Linux binaries support
-dir i386/scsi Device drivers for SCSI peripherals on the ISA bus
-dir isofs/cd9660 ISO CD9660 file-system code
-dir kern The core OS routines: processes, scheduling, syscalls
-dir libkern The kernel library
-dir miscfs/deadfs Miscellaneous file systems
-dir miscfs/devfs Miscellaneous file systems
-dir miscfs/fdesc Miscellaneous file systems
-dir miscfs/fifofs Miscellaneous file systems
-dir miscfs/kernfs Miscellaneous file systems
-dir miscfs/nullfs Miscellaneous file systems
-dir miscfs/portal Miscellaneous file systems
-dir miscfs/procfs Miscellaneous file systems
-dir miscfs/specfs Miscellaneous file systems
-dir miscfs/umapfs Miscellaneous file systems
-dir miscfs/union Miscellaneous file systems
-dir msdosfs The MS-DOS file system code
-dir net Routing and general network interfaces
-dir netccitt CCITT Networking code
-dir netinet Internet protocols
-dir netiso ISO Networking code
-dir netiso/xebec ISO Networking code
-dir netns Xerox NS Networking code
-dir nfs The Network File System
-dir pccard Interface code for PC-CARD controllers.
-dir pci Device drivers for peripherals on the PCI bus
-dir scsi Device drivers for peripherals on the SCSI bus
-dir sys Widely used C-language include files
-dir ufs/ffs The Berkeley Fast Filesystem
-dir ufs/lfs The Log Filesystem
-dir ufs/mfs The Memory Filesystem
-dir ufs/ufs The Unix Filesystem
-dir vm The Virtual Memory Management subsystem
diff --git a/doc/tools/src2html1.4a/FreeBSD/conf.hdr b/doc/tools/src2html1.4a/FreeBSD/conf.hdr
deleted file mode 100644
index 103742dbe2..0000000000
--- a/doc/tools/src2html1.4a/FreeBSD/conf.hdr
+++ /dev/null
@@ -1,9 +0,0 @@
-The <tt>conf</tt> directory holds miscellaneous files, such as the list of
-files which are needed/optional in the OS. The main file of concern is
-<tt>param.c</tt>, which describes the system-dependent configuration
-parameters of FreeBSD.
-
-The 4.3BSD Internals book by Leffler, McKusick, Karels and Quarterman
-doesn't really cover this directory. It is vaguely covered in Chapter 8 of
-the "System Performance Tuning" Nutshell book by Mike Loukides.
-<p>
diff --git a/doc/tools/src2html1.4a/FreeBSD/ddb.hdr b/doc/tools/src2html1.4a/FreeBSD/ddb.hdr
deleted file mode 100644
index 2882f3dfa8..0000000000
--- a/doc/tools/src2html1.4a/FreeBSD/ddb.hdr
+++ /dev/null
@@ -1,6 +0,0 @@
-The <tt>ddb</tt> directory holds routines used to debug the kernel.
-The 4.3BSD Internals book by Leffler, McKusick, Karels and Quarterman
-doesn't really cover this directory. However, some information has been
-presented by Kirk KcKusick and Keith Bostic in their "UNIX Kernel Internals"
-notes, which they have presented in many places in the past few years.
-<p>
diff --git a/doc/tools/src2html1.4a/FreeBSD/i386.i386.hdr b/doc/tools/src2html1.4a/FreeBSD/i386.i386.hdr
deleted file mode 100644
index 72ea58d1f1..0000000000
--- a/doc/tools/src2html1.4a/FreeBSD/i386.i386.hdr
+++ /dev/null
@@ -1,5 +0,0 @@
-The <tt>i386/i386</tt> directory holds the routines that deal with the Intel
-386/486 CPU in the PC architecture.
-The 4.3BSD Internals book by Leffler, McKusick, Karels and Quarterman
-doesn't describe this anywhere at all, because this is machine-specific.
-<p>
diff --git a/doc/tools/src2html1.4a/FreeBSD/i386.include.hdr b/doc/tools/src2html1.4a/FreeBSD/i386.include.hdr
deleted file mode 100644
index 7acfb0ec1b..0000000000
--- a/doc/tools/src2html1.4a/FreeBSD/i386.include.hdr
+++ /dev/null
@@ -1,5 +0,0 @@
-The <tt>i386/include</tt> directory holds C-language include files that
-define things that are specific about the PC architecture.<p>
-
-The 4.3BSD Internals book by Leffler, McKusick, Karels and Quarterman
-doesn't describe this anywhere at all. <p>
diff --git a/doc/tools/src2html1.4a/FreeBSD/i386.isa.hdr b/doc/tools/src2html1.4a/FreeBSD/i386.isa.hdr
deleted file mode 100644
index ec13230f00..0000000000
--- a/doc/tools/src2html1.4a/FreeBSD/i386.isa.hdr
+++ /dev/null
@@ -1,10 +0,0 @@
-The <tt>i386/isa</tt> directory holds the routines that deal with the ISA
-I/O bus in the PC architecture.
-The 4.3BSD Internals book by Leffler, McKusick, Karels and Quarterman
-doesn't describe this anywhere at all, because this is machine-specific.
-You can however glean some information from the following chapter:
-
-<dl>
-<dt> <b>Chapter 8</b>, pp 225-256 <i>Device Drivers</i>.
-</dl>
-<p>
diff --git a/doc/tools/src2html1.4a/FreeBSD/i386.stand.hdr b/doc/tools/src2html1.4a/FreeBSD/i386.stand.hdr
deleted file mode 100644
index c548c044b0..0000000000
--- a/doc/tools/src2html1.4a/FreeBSD/i386.stand.hdr
+++ /dev/null
@@ -1,14 +0,0 @@
-The <tt>i386/stand</tt> directory holds functions that are useful, but cannot
-be called from the kernel. For example printf() is great, but if the kernel
-called printf() it would generate a TRAP and wind up back in the kernel.<p>
-
-The functions here emulate these functions by dealing directly with the
-hardware on the system.<p>
-
-The 4.3BSD Internals book by Leffler, McKusick, Karels and Quarterman
-covers machine-independent <tt>stand</tt> functionality in:
-
-<dl>
-<dt> <b>Chapter 13.2</b>, pg 394 <i>Bootstrapping</i>.
-</dl>
-<p>
diff --git a/doc/tools/src2html1.4a/FreeBSD/kern.hdr b/doc/tools/src2html1.4a/FreeBSD/kern.hdr
deleted file mode 100644
index f8ec13e4a1..0000000000
--- a/doc/tools/src2html1.4a/FreeBSD/kern.hdr
+++ /dev/null
@@ -1,18 +0,0 @@
-The <tt>kern</tt> directory holds the core functionality of FreeBSD:
-system startup, core system calls and syscall dispatching, process
-management, scheduling, signals, file descriptors, top-level filesystem
-code, interprocess communication and terminal handling.<p>
-
-The 4.3BSD Internals book by Leffler, McKusick, Karels and Quarterman
-covers <tt>kern</tt> in:
-
-<dl>
-<dt> <b>Chapter 2</b>, pp 19-42 <i>Overview of the Kernel</i>.
-<dt> <b>Chapter 3</b>, pp 43-66 <i>Kernel Services</i>.
-<dt> <b>Chapter 4</b>, pp 69-108 <i>Process Management</i>.
-<dt> <b>Chapter 6</b>, pp 169-186 <i>I/O System Overview</i>.
-<dt> <b>Chapter 9</b>, pp 259-278 <i>Terminal Handling</i>.
-<dt> <b>Chapter 10</b>, pp 281-309 <i>Interprocess Communication</i>.
-<dt> <b>Chapter 13</b>, pp 393-411 <i>System Startup</i>.
-</dl>
-<p>
diff --git a/doc/tools/src2html1.4a/FreeBSD/net.hdr b/doc/tools/src2html1.4a/FreeBSD/net.hdr
deleted file mode 100644
index 59c1f67741..0000000000
--- a/doc/tools/src2html1.4a/FreeBSD/net.hdr
+++ /dev/null
@@ -1,11 +0,0 @@
-The <tt>net</tt> directory holds the network functionality of FreeBSD that
-deals with routing and generic interfaces: SLIP, PPP, Ethernet, packet
-filters.
-
-The 4.3BSD Internals book by Leffler, McKusick, Karels and Quarterman
-covers <tt>kern</tt> in:
-
-<dl>
-<dt> <b>Chapter 11</b>, pp 311-341 <i>Network Communication</i>.
-</dl>
-<p>
diff --git a/doc/tools/src2html1.4a/FreeBSD/netinet.hdr b/doc/tools/src2html1.4a/FreeBSD/netinet.hdr
deleted file mode 100644
index 19cdffa577..0000000000
--- a/doc/tools/src2html1.4a/FreeBSD/netinet.hdr
+++ /dev/null
@@ -1,10 +0,0 @@
-The <tt>netinet</tt> directory holds the code for the Internet network
-protocols used in FreeBSD: TCP, IP, ICMP, ARP.<p>
-
-The 4.3BSD Internals book by Leffler, McKusick, Karels and Quarterman
-covers <tt>netinet</tt> in:
-
-<dl>
-<dt> <b>Chapter 12</b>, pp 343-389 <i>Network Protocols</i>.
-</dl>
-<p>
diff --git a/doc/tools/src2html1.4a/FreeBSD/nfs.hdr b/doc/tools/src2html1.4a/FreeBSD/nfs.hdr
deleted file mode 100644
index f9aeab2bbb..0000000000
--- a/doc/tools/src2html1.4a/FreeBSD/nfs.hdr
+++ /dev/null
@@ -1,7 +0,0 @@
-The <tt>nfs</tt> directory holds the code for the Network File System.
-The code was developed from a specification of NFS from Sun Microsystems.<p>
-
-The 4.3BSD Internals book by Leffler, McKusick, Karels and Quarterman
-doesn't cover <tt>nfs</tt>. You probably don't really want to delve into
-it too much, but there is an RFC around describing the protocol, but not
-the code here. <p>
diff --git a/doc/tools/src2html1.4a/FreeBSD/stand.hdr b/doc/tools/src2html1.4a/FreeBSD/stand.hdr
deleted file mode 100644
index 9e7df8861f..0000000000
--- a/doc/tools/src2html1.4a/FreeBSD/stand.hdr
+++ /dev/null
@@ -1,14 +0,0 @@
-The <tt>stand</tt> directory holds functions that are useful, but cannot be
-called from the kernel. For example printf() is great, but if the kernel
-called printf() it would generate a TRAP and wind up back in the kernel.<p>
-
-The functions here emulate these functions by dealing directly with the
-hardware on the system.<p>
-
-The 4.3BSD Internals book by Leffler, McKusick, Karels and Quarterman
-covers <tt>stand</tt> in:
-
-<dl>
-<dt> <b>Chapter 13.2</b>, pg 394 <i>Bootstrapping</i>.
-</dl>
-<p>
diff --git a/doc/tools/src2html1.4a/FreeBSD/sys.hdr b/doc/tools/src2html1.4a/FreeBSD/sys.hdr
deleted file mode 100644
index 2624741a87..0000000000
--- a/doc/tools/src2html1.4a/FreeBSD/sys.hdr
+++ /dev/null
@@ -1,6 +0,0 @@
-The <tt>sys</tt> directory holds C-language include files that are used
-by all parts of the FreeBSD source tree.<p>
-
-The 4.3BSD Internals book by Leffler, McKusick, Karels and Quarterman
-doesn't cover these files specifically, but discussion of their contents
-crops up everywhere.<p>
diff --git a/doc/tools/src2html1.4a/FreeBSD/ufs.hdr b/doc/tools/src2html1.4a/FreeBSD/ufs.hdr
deleted file mode 100644
index 8cec8cddac..0000000000
--- a/doc/tools/src2html1.4a/FreeBSD/ufs.hdr
+++ /dev/null
@@ -1,10 +0,0 @@
-The <tt>ufs</tt> directory holds the code for the Berkeley Fast Filesystem,
-which is the filesystem used on locally mounted hard and floppy disks.<p>
-
-The 4.3BSD Internals book by Leffler, McKusick, Karels and Quarterman
-covers <tt>ufs</tt> in:
-
-<dl>
-<dt> <b>Chapter 7</b>, pp 187-223 <i>The Filesystem</i>.
-</dl>
-<p>
diff --git a/doc/tools/src2html1.4a/FreeBSD/vm.hdr b/doc/tools/src2html1.4a/FreeBSD/vm.hdr
deleted file mode 100644
index 26205175a8..0000000000
--- a/doc/tools/src2html1.4a/FreeBSD/vm.hdr
+++ /dev/null
@@ -1,9 +0,0 @@
-The <tt>vm</tt> directory holds the virtual memory subsystem used by
-FreeBSD. This was derived from the VM system used in the Mach kernel,
-with the interface to the rest of the kernel rewritten. As such, it is
-not described in the
-4.3BSD Internals book by Leffler, McKusick, Karels and Quarterman,
-but it is described by Kirk KcKusick and Keith Bostic in their
-"UNIX Kernel Internals"
-notes, which they have presented in many places in the past few years.
-<p>
diff --git a/doc/tools/src2html1.4a/Readme b/doc/tools/src2html1.4a/Readme
deleted file mode 100644
index 2153411891..0000000000
--- a/doc/tools/src2html1.4a/Readme
+++ /dev/null
@@ -1,65 +0,0 @@
- src2html - Hyperlink a C source code tree using HTML, Version 1.3-alpha
-
- Warren Toomey wkt@cs.adfa.oz.au June 1995
-
-
-Src2html is a program which takes a C source tree and creates a set of
-HTML hypertext documents that allows the most important symbols in the
-source tree to be found easily. As well, a HTML version of the source
-tree is created, with the symbols given in bold font where they are defined
-in the source.
-
-
-REQUIREMENTS
-
-You will need:
-
- + Perl 4.x
- + a standard Unix sort(1) command.
- + a mkdir(1) that supports recursive creation of directories.
- src2html is configured to use `mkdir -p' to do this.
- + an egrep(1) if you're going to use the search facility.
- + httpd(1) if you're going to use the search facility.
- + Ctags-new, which is bundled with src2html, and a C compiler
- to compile it.
-
-
-INSTALLATION
-
-Extract the src2html archive, including the Ctags-new and Example directories;
-you probably have already done that. Go into the Ctags-new directory and make
-ctags-new. This should be very straight-forward.
-
-Install ctags-new and src2html in a directory on your path, make them
-executable and install their man pages as well. If your mkdir(1) uses a
-different option to -p, edit src2html to fix this.
-
-If you want to use the search facility, you need to install src2html.cgi
-in your httpd script directory, and edit it to reflect the root of your
-HTML documents, as set in DirectryRoot in conf/srm.conf.
-
-Make sure that ctags-new, src2html and src2html.cgi are executable, and
-that the latter two can find the Perl interpreter. Installation is complete.
-
-
-USING SRC2HTML
-
-Using src2html is pretty straight-forward. Print out and read the man page
-before trying anything. In the FreeBSD directory I have included the config
-file and header files for my src2html conversion of the FreeBSD-2.0.5 source
-tree; read the man page and FreeBSD/FreeBSD.s2h in tandem. The root document of
-this HTML tree is at http://minnie.cs.adfa.oz.au/FreeBSD-srctree/FreeBSD.html.
-
-
-COMMENTS AND QUESTIONS
-
-Surprisingly, src2html is reasonably fast even on large source trees. This was
-my first Perl program, so it could probably be made faster and smaller. I've
-placed comments in the source to give you an idea of what each section does. If
-you have any questions or comments, please email them to me at
-wkt@cs.adfa.oz.au. Now that it's finished I'm not that keen on overhauling it
-etc. I consider it as a good prototype. Getting inter-source hyperlinks done
-would be great, but I really don't want to write a C parser myself.
-
-Cheers,
- Warren Toomey
diff --git a/doc/tools/src2html1.4a/ctags-emacs/README b/doc/tools/src2html1.4a/ctags-emacs/README
deleted file mode 100644
index 83415c92f4..0000000000
--- a/doc/tools/src2html1.4a/ctags-emacs/README
+++ /dev/null
@@ -1,20 +0,0 @@
-#
-# $Id$
-#
-
-Included in this directory is a patch for the file lib-src/etags.c
-from emacs-20.2. This patch and the following instructions may
-or may not work for any other emacs version.
-
-mkdir work
-tar xzf ..../emacs-20.2.tar.gz
-cd emacs-20.2/lib-src
-patch <...../etags.c-ada-patch
-cd ../..
-mkdir build
-cd build
-../emacs-20.2/configure
-cd lib-src
-gmake ctags
-
-The ctags file in this directory is a pre-compiled binary.
diff --git a/doc/tools/src2html1.4a/ctags-emacs/ctags b/doc/tools/src2html1.4a/ctags-emacs/ctags
deleted file mode 100644
index 7fc51e6e9c..0000000000
--- a/doc/tools/src2html1.4a/ctags-emacs/ctags
+++ /dev/null
Binary files differ
diff --git a/doc/tools/src2html1.4a/ctags-emacs/etags.c-ada-patch b/doc/tools/src2html1.4a/ctags-emacs/etags.c-ada-patch
deleted file mode 100644
index 7f660ce864..0000000000
--- a/doc/tools/src2html1.4a/ctags-emacs/etags.c-ada-patch
+++ /dev/null
@@ -1,424 +0,0 @@
-*** etags.c.orig Wed Aug 6 02:09:19 1997
---- etags.c Wed Nov 5 13:30:11 1997
-***************
-*** 31,37 ****
- * Francesco Potorti` (F.Potorti@cnuce.cnr.it) is the current maintainer.
- */
-
-! char pot_etags_version[] = "@(#) pot revision number is 12.11";
-
- #define TRUE 1
- #define FALSE 0
---- 31,37 ----
- * Francesco Potorti` (F.Potorti@cnuce.cnr.it) is the current maintainer.
- */
-
-! char pot_etags_version[] = "@(#) pot revision number is 12.11/patched for Ada";
-
- #define TRUE 1
- #define FALSE 0
-***************
-*** 182,193 ****
---- 182,195 ----
- char *relative_filename (), *absolute_filename (), *absolute_dirname ();
- void grow_linebuffer ();
- long *xmalloc (), *xrealloc ();
-+ char *basename_no_extension ();
-
- typedef void Lang_function ();
- /* Many compilers barf on this:
- Lang_function Asm_labels;
- so let's write it this way */
- void Asm_labels ();
-+ void Ada_funcs ();
- void C_entries ();
- void default_C_entries ();
- void plain_C_entries ();
-***************
-*** 300,305 ****
---- 302,309 ----
- bool cxref_style; /* -x: create cxref style output */
- bool cplusplus; /* .[hc] means C++, not C */
- bool noindentypedefs; /* -I: ignore indentation in C */
-+ bool packages_only; /* -P: only ada packages */
-+ bool do_filename_tags; /* -F: insert a tag for the filename */
-
- #ifdef LONG_OPTIONS
- struct option longopts[] =
-***************
-*** 330,335 ****
---- 334,341 ----
- { "update", no_argument, NULL, 'u' },
- { "version", no_argument, NULL, 'V' },
- { "vgrind", no_argument, NULL, 'v' },
-+ { "packages-only", no_argument, NULL, 'P' },
-+ { "do-filename-tags", no_argument, NULL, 'F' },
- { 0 }
- };
- #endif /* LONG_OPTIONS */
-***************
-*** 371,376 ****
---- 377,386 ----
- NULL
- };
-
-+ /* Ada code */
-+ char *Ada_suffixes [] =
-+ { "ads", "adb", "ada", NULL };
-+
- /* Note that .c and .h can be considered C++, if the --c++ flag was
- given. That is why default_C_entries is called here. */
- char *default_C_suffixes [] =
-***************
-*** 445,450 ****
---- 455,461 ----
- struct lang_entry lang_names [] =
- {
- { "asm", Asm_labels, Asm_suffixes, NULL },
-+ { "Ada", Ada_funcs, Ada_suffixes, NULL },
- { "c", default_C_entries, default_C_suffixes, NULL },
- { "c++", Cplusplus_entries, Cplusplus_suffixes, NULL },
- { "c*", Cstar_entries, Cstar_suffixes, NULL },
-***************
-*** 609,614 ****
---- 620,631 ----
- which you like.");
- }
-
-+ puts ("-P, --packages-only\n\
-+ For Ada files, generates tags entries only for packages.");
-+
-+ puts ("-F, --do-filename-tags\n\
-+ Generates a tag entry with tagname being file basename without suffix.");
-+
- puts ("-V, --version\n\
- Print the version of the program.\n\
- -h, --help\n\
-***************
-*** 816,824 ****
- char *optstring;
-
- #ifdef ETAGS_REGEXPS
-! optstring = "-aCdDf:Il:o:r:RStTi:BuvxwVhH";
- #else
-! optstring = "-aCdDf:Il:o:StTi:BuvxwVhH";
- #endif /* ETAGS_REGEXPS */
-
- #ifndef LONG_OPTIONS
---- 833,841 ----
- char *optstring;
-
- #ifdef ETAGS_REGEXPS
-! optstring = "-aCdDf:Il:o:r:RStTi:BuvxwVhHPF";
- #else
-! optstring = "-aCdDf:Il:o:StTi:BuvxwVhHPF";
- #endif /* ETAGS_REGEXPS */
-
- #ifndef LONG_OPTIONS
-***************
-*** 892,897 ****
---- 909,923 ----
- case 'T':
- typedefs = typedefs_and_cplusplus = TRUE;
- break;
-+
-+ case 'P':
-+ packages_only++;
-+ break;
-+
-+ case 'F':
-+ do_filename_tags++;
-+ break;
-+
- #if (!CTAGS)
- /* Etags options */
- case 'i':
-***************
-*** 1169,1174 ****
---- 1195,1201 ----
- if (!CTAGS)
- {
- char *filename;
-+ char *tagfilename;
-
- if (absolutefn (file))
- {
-***************
-*** 1181,1186 ****
---- 1208,1220 ----
- to the directory of the tags file. */
- filename = relative_filename (file, tagfiledir);
- }
-+ if (do_filename_tags)
-+ {
-+ tagfilename = basename_no_extension(filename);
-+ pfnote(savestr(tagfilename), FALSE, tagfilename, 0, 1, 0);
-+ free (tagfilename);
-+ }
-+
- fprintf (tagf, "\f\n%s,%d\n", filename, total_size_of_entries (head));
- free (filename);
- put_entries (head);
-***************
-*** 2954,2959 ****
---- 2988,3198 ----
- C_entries (YACC, inf);
- }
-
-+ /* ada parsing */
-+
-+ char *adbp;
-+ int apfcnt;
-+
-+ void
-+ Ada_funcs(fi)
-+ FILE *fi;
-+ {
-+ int inquote;
-+
-+ inquote = 0;
-+ lineno = 0;
-+ charno = 0;
-+ apfcnt = 0;
-+
-+ while (!feof (fi))
-+ {
-+ if (adbp == NULL || *adbp == 0)
-+ {
-+ lineno++;
-+ linecharno = charno;
-+ charno += readline (&lb, fi) + 1;
-+ adbp = lb.buffer;
-+ }
-+ if (*adbp == '-')
-+ {
-+ adbp++ ;
-+ if (*adbp == '-')
-+ {
-+ while (*adbp)
-+ adbp++;
-+ continue;
-+ }
-+ }
-+ if (*adbp == '\'')
-+ {
-+ adbp++ ;
-+ if (*adbp) adbp++;
-+ continue;
-+ }
-+ if (inquote || (*adbp == '"'))
-+ {
-+ inquote = 1;
-+ adbp++ ;
-+ while (*adbp && *adbp != '"')
-+ adbp++;
-+ if (*adbp == '"')
-+ {
-+ adbp++;
-+ inquote = 0;
-+ }
-+ continue;
-+ }
-+ while (*adbp && !begtoken(*adbp))
-+ {
-+ if ((*adbp == '-') || (*adbp == '"') || (*adbp == '\''))
-+ break;
-+ adbp++;
-+ }
-+ if ((*adbp == '-') || (*adbp == '"') || (*adbp == '\''))
-+ continue;
-+ if (*adbp == 0)
-+ continue;
-+ switch (*adbp)
-+ {
-+ case 'f':
-+ case 'F':
-+ if (adatail("function") && !packages_only)
-+ adagetit(fi, "/f");
-+ else
-+ adaskip();
-+ continue;
-+ case 'p':
-+ case 'P':
-+ if (adatail("procedure") && !packages_only)
-+ adagetit(fi, "/p");
-+ else if (adatail("package"))
-+ adagetit(fi, "/s");
-+ else
-+ adaskip();
-+ continue;
-+ case 't':
-+ case 'T':
-+ if (adatail("task") && !packages_only)
-+ adagetit(fi, "/k");
-+ else if (typedefs && adatail("type") && !packages_only)
-+ adagetit(fi, "/t");
-+ else
-+ adaskip();
-+ continue;
-+
-+ default:
-+ adaskip();
-+ continue;
-+ }
-+ }
-+ }
-+ adaskip()
-+ {
-+ while (*adbp && !endtoken(*adbp))
-+ adbp++;
-+ while (*adbp && !begtoken(*adbp))
-+ {
-+ if ((*adbp == '"') || (*adbp == '\'') || (*adbp == '-'))
-+ return;
-+ adbp++;
-+ }
-+ }
-+
-+ adatail(cp)
-+ char *cp;
-+ {
-+ register int len = 0;
-+
-+ while (*cp && (*cp == tolower(*(adbp+len))))
-+ cp++, len++;
-+ if (*cp == 0)
-+ {
-+ adbp += len;
-+ if (intoken(*adbp))
-+ return (0);
-+ else
-+ return (1);
-+ }
-+ return (0);
-+ }
-+
-+ adagetit(fi, name_qualifier)
-+ FILE *fi;
-+ char *name_qualifier;
-+
-+ {
-+ register char *cp;
-+ char c;
-+ char nambuf[BUFSIZ];
-+ char * local_name_qualifier;
-+
-+ local_name_qualifier = name_qualifier;
-+
-+ while (!feof (fi))
-+ {
-+ if (*adbp == '\0')
-+ {
-+ lineno++;
-+ linecharno = charno;
-+ charno += readline (&lb, fi) + 1;
-+ adbp = lb.buffer;
-+ }
-+ if (*adbp == '-')
-+ {
-+ adbp++ ;
-+ if (*adbp == '-')
-+ {
-+ while (*adbp)
-+ adbp++;
-+ continue;
-+ }
-+ }
-+ while (isspace(*adbp))
-+ adbp++;
-+ if (*adbp == 0)
-+ continue;
-+ if (*adbp == '-')
-+ continue;
-+ switch(*adbp)
-+ {
-+ case 'b':
-+ case 'B':
-+ if (adatail("body"))
-+ {
-+ local_name_qualifier = "/b";
-+ continue;
-+ }
-+ break;
-+
-+ case 't':
-+ case 'T':
-+ if (adatail("type"))
-+ continue;
-+ break;
-+ }
-+ if (*adbp == '"')
-+ {
-+ for (cp = adbp+1; *cp && *cp != '"'; cp++)
-+ continue;
-+ }
-+ else
-+ for (cp = adbp+1;
-+ *cp && (isalpha(*cp) || isdigit(*cp) || *cp == '_');
-+ cp++)
-+ continue;
-+ c = cp[0];
-+ cp[0] = 0;
-+ strcpy(nambuf, adbp);
-+ strcat(nambuf, local_name_qualifier);
-+ cp[0] = c;
-+ pfnote(savenstr (nambuf, strlen(nambuf)), TRUE, lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
-+ /* I am not really sure what the name is used for. */
-+ /* probably to be used to add a qualifier like /f /p /b /s /k /t */
-+ apfcnt++;
-+ return;
-+ }
-+ }
-+
- /* Fortran parsing */
-
- char *dbp;
-***************
-*** 4684,4689 ****
---- 4923,4968 ----
- return path.buffer;
- #endif /* not MSDOS */
- #endif /* not HAVE_GETCWD */
-+ }
-+
-+ /* Returna newly allocated string containing the filename
-+ of FILE without any precending directory and without
-+ extension. */
-+ char *
-+ basename_no_extension (file)
-+ char *file;
-+ {
-+ char *begin = file + strlen(file);
-+ char *end = begin;
-+ char *res, *rescp;
-+ bool in_extension;
-+
-+
-+ /* position begin at the begining of the basename
-+ end will point to the end of the basename
-+ without extension */
-+ in_extension = TRUE;
-+
-+ while (begin > file && *begin != '/')
-+ {
-+ if (*begin == '.' && in_extension)
-+ {
-+ end = begin;
-+ in_extension = FALSE;
-+ }
-+ begin--;
-+ }
-+ if (*begin == '/')
-+ begin++;
-+
-+ res = xnew(strlen(begin) - strlen(end) + 1, char);
-+ rescp = res;
-+ while (begin != end)
-+ {
-+ *rescp++ = *begin++;
-+ }
-+ *rescp = '\0';
-+ return res;
- }
-
- /* Return a newly allocated string containing the file name
diff --git a/doc/tools/src2html1.4a/ctags-wr b/doc/tools/src2html1.4a/ctags-wr
deleted file mode 100644
index d514e85cab..0000000000
--- a/doc/tools/src2html1.4a/ctags-wr
+++ /dev/null
@@ -1,41 +0,0 @@
-#! /bin/sh
-#
-# Ctags wrapper
-#
-# Invokes the version shipped with src2html for C.
-# Invokes the Ada patched GNU Emacs version for Ada.
-#
-# $Id$
-
-TOOLSBASE=/usr1/rtems/rtemsdoc-work/tools/src2html
-
-if [ ! -f ${TOOLSBASE}/ctags-new ]; then
- echo Can not find ${TOOLSBASE}/ctags-new for C programs.
- exit 1
-fi
-
-if [ ! -f ${TOOLSBASE}/ctags ]; then
- echo Can not find ${TOOLSBASE}/ctags for Ada programs.
- exit 1
-fi
-
-cfiles=`find $1 -name "*.[ch]" -o "*.inl" 2>/dev/null | grep -v "/no-"`
-adafiles=`find $1 -name "*.ad[sb]" 2>/dev/null | grep -v "/no-"`
-adafiles=`ls -1 $1/*.ad[sb] 2>/dev/null`
-
-#cfiles=`ls -1 $1/*.[ch] $1/*.inl 2>/dev/null | grep -v "/no-"`
-#adafiles=`ls -1 $1/*.ad[sb] 2>/dev/null`
-
-if [ "x${cfiles}" != x ] ; then
- ${TOOLSBASE}/ctags-new -d -t -w -y ${cfiles}
- #mv tags tags.c
-fi
-
-if [ "x${adafiles}" != x ] ; then
- ${TOOLSBASE}-src/ctags -d -t -x --no-warn ${adafiles}
-fi
-# cat tags
-#mv tags tags.ada
-#
-#cat tags.c tags.ada
-#rm -f tags.c tags.ada
diff --git a/doc/tools/src2html1.4a/src2html b/doc/tools/src2html1.4a/src2html
deleted file mode 100644
index 98d9d83d7f..0000000000
--- a/doc/tools/src2html1.4a/src2html
+++ /dev/null
@@ -1,704 +0,0 @@
-#!/usr/bin/perl
-# Src2html: Take a source tree and generate Html documents that have hyperlinks
-# to the definition of structures, variables, functions, and preprocessor
-# definitions. Read the manual page for details on how to use the program.
-#
-# Version 1.4-alpha. Written by Warren Toomey wkt@cs.adfa.oz.au
-#
-# 19th January 1996
-#
-# $Id$
-#
-
-if ($#ARGV <= 0 || $#ARGV > 4) { # Check arg count
- print(STDERR "Usage: $0 [-na] [-nl] [-d num] input_description\n");
- print(STDERR " -na: Don't produce top-level category files\n");
- print(STDERR " -nl: Don't produce per-letter files\n");
- print(STDERR " -d: Set debugging to given number (0-3)\n");
- exit(1);
-}
-
-# Set up default option values
-$NoLetters= 0;
-$NoAll= 0;
-$Debug=0;
-$Top= $ARGV[$#ARGV];
-$Top=~ s/\.s2h$//;
-
-# Parse the options
-for ($i=0; $i<= $#ARGV; $i++) {
- if ($ARGV[$i] eq "-na") { $NoAll= 1; next; }
- if ($ARGV[$i] eq "-nl") { $NoLetters= 1; next; }
- if ($ARGV[$i] eq "-d") { $i++; $Debug= $ARGV[$i]; next; }
-}
-
-$Title{"m"}= "C Macros";
-$Title{"d"}= "C Defines";
-$Title{"f"}= "C Functions";
-$Title{"v"}= "C Variables";
-$Title{"s"}= "C Structs";
-$Title{"u"}= "C Unions";
-$Title{"t"}= "C Typedefs";
-$Title{"e"}= "C Enums";
-$Title{"AdaType"}= "Ada Types";
-$Title{"AdaProcedure"}= "Ada Procedures";
-$Title{"AdaFunction"}= "Ada Functions";
-$Title{"AdaPackage"}= "Ada Packages";
-$Title{"AdaTask"}= "Ada Tasks";
-$Title{"g"}= "All symbols";
-
-&get_s2h; # Read the description file
-&make_dirs; # Make directories as needed
-&make_ctags; # Generate ctags for all src
-&parse_ctags; # Parse ctags, generate html ptr files
-foreach $i (keys(%Dirinfo))
-{ &rewrite_src($i); } # Rewrite the src code
-exit(0); # and exit
-
-
-## get_s2h: Opens the source description file, reads it, and sets up some
-## variables describing where some directories are, and the source directories
-## to process. Variables used are:
-## Srctree - The root of the source tree we are processing
-## Htmlroot - The directory where all WWW documents are kept
-## Htmldir - The directory under Htmlroot for this source tree
-## Htmltree - The root of the destination tree for the Html code
-## Newsrctree - The directory in Htmltree to store the new Htmlised code
-## Headers - The directory where we keep information to prepend in some docs
-## Formdir - The place to put the index searching script
-## Dirinfo{} - The list of dirs and the info about the directory
-## Dotdir{} - The directory name with /'s -> .'s
-
-sub get_s2h {
- $Newsrctree= 'newsrc'; # Set up as default
- $Headers= '.';
-
-
- #########################################################
- # make sure we dump out the last bit of the last file....
-
- # Print out the remainder of the
- # current file, incl. the buffered line
- if ($In_file == 1) {
- if ("$line" ne "") { print OUT $line; }
- while (<IN>) {
- s/\&/&amp;/g; s/\</&lt;/g; s/\>/&gt;/g; print OUT;
- }
- print OUT "\n\n\n\n\n\n\n\n</pre></body>\n";
- close(IN); close(OUT);
- }
- #########################################################
-
- open(S2H,$ARGV[$#ARGV]) # Open descript
- || die "$0: can't open $ARGV[$#ARGV]: $!\n";
-
- while(<S2H>) { # Read in input lines
- next if /^#/; # Skip comments
- if ( /^set\s+Srctree\s+(\S+)/ ) {
- $Srctree = $1; next; # Set the variable
- }
- if ( /^set\s+Htmlroot\s+(\S+)/ ) {
- $Htmlroot = $1; next; # Set the variable
- }
- if ( /^set\s+Htmldir\s+(\S+)/ ) {
- $Htmldir = $1; next; # Set the variable
- }
- if ( /^set\s+Newsrctree\s+(\S+)/ ) {
- $Newsrctree = $1; next; # Set the variable
- }
- if ( /^set\s+Headers\s+(\S+)/ ) {
- $Headers = $1; next; # Set the variable
- }
- if ( /^set\s+Formdir\s+(\S+)/ ) {
- $Formdir = $1; next; # Set the variable
- }
- if ( /^dir\s+(\S+)\s+(.*)/ ) {
- $Dirinfo{$1}= $2; $Dotdir{$1}=$1;
- $Dotdir{$1}=~ s/\//./g;
- next; # Get dir commands
- }
- if ( /^\n/ ) { next; } # Ignore blank lines
- # Bad input line, give warning
- chop; print "$_: Bad line, ignoring\n"; next;
- }
- close(S2H);
- if (!defined($Srctree)) { die "$0: Srctree undefined in $ARGV[$#ARGV]\n"; }
- if (!defined($Htmlroot)) { die "$0: Htmlroot undefined in $ARGV[$#ARGV]\n"; }
- if (!defined($Htmldir)) { die "$0: Htmldir undefined in $ARGV[$#ARGV]\n"; }
- $Htmltree= "$Htmlroot/$Htmldir";
-}
-
-## make_dirs: Make the directories need to store the Html documents, and also
-## check to make sure that the input directories exist. We depend upon mkdir(1)
-## having the -p option to make intermediate directories as needed.
-
-sub make_dirs {
- local($i);
-
- foreach $i (keys(%Dirinfo)) { # Check that the directories exist
- if (! -e "$Srctree/$i") {
- die "$0: Input dir $Srctree/$i doesn't exist\n";
- }
- if (! -d "$Srctree/$i") {
- die "$0: Input dir $Srctree/$i is not a directory\n";
- }
- }
- if (! -e "$Htmltree") {
- system("mkdir -p $Htmltree") && die "$0: Can't mkdir $Htmltree\n";
- }
- if (! -e "$Htmltree/$Newsrctree") {
- system("mkdir -p $Htmltree/$Newsrctree")
- && die "$0: Can't mkdir $Htmltree/$Newsrctree\n";
- }
- if (! -e "$Htmltree/ctags") {
- system("mkdir -p $Htmltree/ctags") && die "$0: Can't mkdir ctags\n";
- }
- foreach $i (keys(%Dirinfo)) {
- if (! -e "$Htmltree/$Newsrctree/$i") {
- system("mkdir -p $Htmltree/$Newsrctree/$i")
- && die "$0: Can't mkdir $Htmltree/$Newsrctree/$i\n";
- }
- }
-}
-
-## make_ctags: Process all the source code, creating the ctags files.
-## The Ctagsfile{} array is set up to hold the name of the ctags files
-## created.
-
-sub make_ctags {
- local($i);
-
- foreach $i (keys(%Dirinfo)) {
- $Ctagsfile{$i}= "$Htmltree/ctags/$Dotdir{$i}.ctags";
- if ($Debug > 0 ) { print "Generating ctags for $Ctagsfile{$i}\n"; }
- system("(cd $Srctree; /usr1/rtems/rtemsdoc-work/tools/src2html/ctags-wr $i) > $Ctagsfile{$i}")
- && print "$0: ctags failed on $Srctree/$i\n";
- }
-}
-
-
-## parse_ctags: Parse the ctags file produced by make_ctags, creating several
-## arrays of information. The arrays created are:
-## Macro{} - The name of every macro and its name lowercased
-## Def{} - The name of every define and its name lowercased
-## Func{} - The name of every function and its name lowercased
-## Var{} - The name of every variable and its name lowercased
-## Struct{} - The name of every struct and its name lowercased
-## Union{} - The name of every union and its name lowercased
-## Type{} - The name of every typedef and its name lowercased
-## Enum{} - The name of every enum and its name lowercased
-## Nfile{} - The directory in which the symbol was found
-## Nline{} - The line number where the symbol was found
-
-sub parse_ctags {
- local($i);
- local($low);
- local($count);
-
- $count = 0;
-
- foreach $i (keys(%Dirinfo)) {
- open(CTAGS,$Ctagsfile{$i}) || die "$0: Can't open $Ctagsfile{$i}, $!\n";
- if ($Debug > 0) { print "Parsing $Ctagsfile{$i} to build ptr files\n"; }
- while (<CTAGS>) {
- $count ++;
- if ( /^(\w+)\s+(\d+)\s+(\S+)\s+Preprocessor macro/ ) {
- ($low=$1)=~tr/A-Z_/a-z/d; $k="$low$count";
- $Macro{$k}=$1; $Nline{$k}= $2;
- $Nfile{$k}= $3; next;
- }
- if ( /^(\w+)\s+(\d+)\s+(\S+)\s+Preprocessor define/ ) {
- ($low=$1)=~tr/A-Z_/a-z/d; $k="$low$count";
- $Def{$k}=$1; $Nline{$k}= $2;
- $Nfile{$k}= $3; next;
- }
- if ( /^(\w+)\s+(\d+)\s+(\S+)\s+C struct/ ) {
- ($low=$1)=~tr/A-Z_/a-z/d; $k="$low$count";
- $Struct{$k}=$1; $Nline{$k}= $2;
- $Nfile{$k}= $3; next;
- }
- if ( /^(\w+)\s+(\d+)\s+(\S+)\s+C union/ ) {
- ($low=$1)=~tr/A-Z_/a-z/d; $k="$low$count";
- $Union{$k}=$1; $Nline{$k}= $2;
- $Nfile{$k}= $3; next;
- }
- if ( /^(\w+)\s+(\d+)\s+(\S+)\s+C typedef/ ) {
- ($low=$1)=~tr/A-Z_/a-z/d; $k="$low$count";
- $Type{$k}=$1; $Nline{$k}= $2;
- $Nfile{$k}= $3; next;
- }
- if ( /^(\w+)\s+(\d+)\s+(\S+)\s+C enum/ ) {
- ($low=$1)=~tr/A-Z_/a-z/d; $k="$low$count";
- $Enum{$k}=$1; $Nline{$k}= $2;
- $Nfile{$k}= $3; next;
- }
- if ( /^(\w+)\s+(\d+)\s+(\S+)\s+C function/ ) {
- ($low=$1)=~tr/A-Z_/a-z/d; $k="$low$count";
- $Func{$k}=$1; $Nline{$k}= $2;
- $Nfile{$k}= $3; next;
- }
- if ( /^(\w+)\s+(\d+)\s+(\S+)\s+C variable/ ) {
- ($low=$1)=~tr/A-Z_/a-z/d; $k="$low$count";
- $Var{$k}=$1; $Nline{$k}= $2;
- $Nfile{$k}= $3; next;
- }
- if ( /^(return)\/.\s+(\d+)\s+(\S+)\s+.*/ ) {
- next;
- # Code like the following line results in "return" as ctag
- # "type Action is access function return Boolean;
- }
- if ( /^(\w+)\/.\s+(\d+)\s+(\S+)\s+use .*/ ) {
- next;
- # throw away lines like "use type System"
- }
-
- if ( /^(\w+)\/.\s+(\d+)\s+(\S+)\s+type .*/ ) {
- ($low=$1)=~tr/A-Z_/a-z/d; $k="$low$count";
- $AdaType{$k}=$1; $Nline{$k}= $2;
- $Nfile{$k}= $3; next;
- }
- if ( /^(\w+)\/.+\s+(\d+)\s+(\S+)\s+procedure .*/ ) {
- ($low=$1)=~tr/A-Z_/a-z/d; $k="$low$count";
- $AdaProcedure{$k}=$1; $Nline{$k}= $2;
- $Nfile{$k}= $3; next;
- }
- if ( /^(\w+)\/.+\s+(\d+)\s+(\S+)\s+function .*/ ) {
- ($low=$1)=~tr/A-Z_/a-z/d; $k="$low$count";
- $AdaFunction{$k}=$1; $Nline{$k}= $2;
- $Nfile{$k}= $3; next;
- }
- if ( /^(\".+)\/.+\s+(\d+)\s+(\S+)\s+function .*/ ) {
- next;
- # throw away functions like "*"
- }
- if ( /^(\w+)\/.\s+(\d+)\s+(\S+)\s+package .*/ ) {
- ($low=$1)=~tr/A-Z_/a-z/d; $k="$low$count";
- $AdaPackage{$k}=$1; $Nline{$k}= $2;
- $Nfile{$k}= $3; next;
- }
- if ( /^(\w+)\/.\s+(\d+)\s+(\S+)\s+task .*/ ) {
- ($low=$1)=~tr/A-Z_/a-z/d; $k="$low$count";
- $AdaTask{$k}=$1; $Nline{$k}= $2;
- $Nfile{$k}= $3; next;
- }
- if ( /^([\w\/]+)\s+(\d+)\s+(\S+)\s+use type .*/ ) {
- next;
- }
- if ( /^([\w\/\(]+)\s+(\d+)\s+(\S+)\s+type .*/ ) {
- next;
- }
- if ( /^;([\w\/\(]+)\s+(\d+)\s+(\S+)\s+type .*/ ) {
- next;
- }
- if ( /^\(([\w\/\(]+)\s+(\d+)\s+(\S+)\s+procedure .*/ ) {
- next;
- }
- print "$0: In Ctagsfile{$i}, don't recognise $_";
- }
- close(CTAGS);
- &make_dir_html($i);
- undef %Macro; undef %Def; undef %Func; undef %Var;
- undef %Struct; undef %Union; undef %Type; undef %Enum;
- undef %AdaType; undef %AdaProcedure; undef %AdaFunction;
- undef %AdaPackage; undef %AdaTask;
- }
- &make_top_html;
-}
-
-## make_letters_html: Make the lowest HTML documents, i.e those per-directory
-## per-type per-letter Htmls that point directly at the source code.
-## Arguments are: Dir name, prefix, title, Name/dir list
-## If the file is created, set $Exists(letter) positive, else to 0.
-
-sub make_letters_html {
- local($dir)= $_[0];
- local($pref)= $_[1];
- local($title)= $_[2];
- local(*type)= $_[3];
- local($htmlfile);
- local($let)="@";
-
- foreach $i ( "a".."z",
- "AdaType", "AdaProcedure", "AdaFunction", "AdaPackage", "AdaTask" ) {
- $Exists{$i}=0;
- }
- foreach $name (sort keys( %type )) {
- if (substr($name,0,1) ne $let) {
- if ($let ne "@") {
- print HTML "</ul></body>\n";
- close(HTML);
- $Exists{$let}= 1;
- }
- $let= substr($name, 0, 1);
- $htmlfile= "$Htmltree/$Dotdir{$dir}.$pref$let.html";
- open(HTML, "> $htmlfile") || die "$0: Can't open $htmlfile, $!\n";
-
- print HTML "<head>\n<title>$title starting with ";
- print HTML "`$let' in $dir</title>\n";
- print HTML "</head><body><h1>$title starting with ";
- print HTML "`$let' in $dir</h1><p>\n";
- print HTML "<ul>\n";
- }
- # print HTML "<li><a href=\"$Newsrctree/$Nfile{$type{$name}}";
- # print HTML ".html#$type{$name}\">$type{$name}</a> ";
- # print HTML "$Nfile{$type{$name}}:$Nline{$type{$name}}\n"; next;
-
- print HTML "<li><a href=\"$Newsrctree/$Nfile{$name}";
- print HTML ".html#$type{$name}\">$type{$name}</a> ";
- print HTML "$Nfile{$name}:$Nline{$name}\n"; next;
- }
- print HTML "</ul></body>\n";
- close(HTML);
- $Exists{$let}= 1;
-}
-
-## make_type_html: Make the type htmls. If there are <50 symbols for the
-## directory, create the per-directory per-type html document only. Otherwise
-## for every letter grep symbols, call make_lowest_letter_html, and
-## finally create the per-directory per-type html document that points only
-## at the letter files created.
-## Arguments are: Dir name, prefix, title, Name/dir list
-
-sub make_type_html {
- local($dir)= $_[0];
- local($pref)= $_[1];
- local($title)= $_[2];
- local(*type)= $_[3];
- local($i);
- local($htmlfile);
- local(@keys)= keys(%type);
- local($name);
-
- $Exists{$title}=0;
- if ( $#keys < 0 ) { return; }
- if ($Debug > 0) {
- $i= $#keys + 1;
- print "The associative array for $dir $title has $i elements\n";
- }
- if ( ($#keys < 50) || ($NoLetters == 1) ) {
- $htmlfile= "$Htmltree/$Dotdir{$dir}.$pref.html";
- open(HTML, "> $htmlfile") || die "$0: Can't open $htmlfile, $!\n";
- print HTML "<head>\n<title>$title in $dir</title>\n";
- print HTML "</head><body><h1>$title in $dir</h1>\n";
- print HTML "<ul>\n";
- foreach $name (sort keys( %type )) {
- # print HTML "<li><a href=\"$Newsrctree/$Nfile{$type{$name}}";
- # print HTML ".html#$type{$name}\">$type{$name}</a> ";
- # print HTML "$Nfile{$type{$name}}:$Nline{$type{$name}}\n"; next;
-
- print HTML "<li><a href=\"$Newsrctree/$Nfile{$name}";
- print HTML ".html#$type{$name}\">$type{$name}</a> ";
- print HTML "$Nfile{$name}:$Nline{$name}\n"; next;
- }
- print HTML "</ul></body>\n";
- close(HTML);
- $Exists{$title}=1;
- }
- else {
- &make_letters_html($dir, $pref, $title, *type);
-
- open(HTML, "> $Htmltree/$Dotdir{$dir}.$pref.html")
- || die "$0: Can't open $htmlfile.$pref.html, $!\n";
- print HTML "<head>\n<title>$title in $dir</title>\n";
- print HTML "</head><body><h1>$title in $dir</h1><p>\n";
- print HTML "<ul>\n";
-
- foreach $i ( "a".."z",
- "AdaType", "AdaProcedure", "AdaFunction", "AdaPackage", "AdaTask" ) {
- if ($Exists{$i} > 0) { # A file exists
- print HTML "<li><a href=\"$Dotdir{$dir}.$pref$i.html\">";
- print HTML "$i</a>\n"; $Exists{$title}++; $Exists{$i}=0;
- }
- }
- print HTML "</ul></body>\n";
- close(HTML);
- if ($Exists{$title} == 0) { unlink($htmlfile); }
- }
-}
-
-## asappend: Append the contents of the second associative array to the
-## first.
-
-sub asappend {
- local(*To)= $_[0];
- local(*From)= $_[1];
- local($i);
-
- foreach $i (keys(%From)) { $To{$i}= $From{$i} ; }
-}
-
-## make_dir_html: Make the html document for the directory. Use the
-## Exist{} array to determine what types to include on the document.
-## Arguments are: Dir name
-
-sub make_dir_html {
- local($dir)= $_[0];
- local($i);
- local(@keys);
-
- if ($Debug > 1) { print"In makedir, dir is $dir\n"; }
- &make_type_html($dir, "f", $Title{"f"}, *Func);
- &make_type_html($dir, "m", $Title{"m"}, *Macro);
- &make_type_html($dir, "d", $Title{"d"}, *Def);
- &make_type_html($dir, "v", $Title{"v"}, *Var);
- &make_type_html($dir, "s", $Title{"s"}, *Struct);
- &make_type_html($dir, "u", $Title{"u"}, *Union);
- &make_type_html($dir, "t", $Title{"t"}, *Type);
- &make_type_html($dir, "e", $Title{"e"}, *Enum);
- &make_type_html($dir, "AdaType", $Title{"AdaType"}, *AdaType);
- &make_type_html($dir,
- "AdaProcedure", $Title{"AdaProcedure"}, *AdaProcedure);
- &make_type_html($dir, "AdaFunction", $Title{"AdaFunction"}, *AdaFunction);
- &make_type_html($dir, "AdaPackage", $Title{"AdaPackage"}, *AdaPackage);
- &make_type_html($dir, "AdaTask", $Title{"AdaTask"}, *AdaTask);
-
- if ($NoAll != 1) {
- &asappend(*GFunc, *Func);
- &asappend(*GMacro, *Macro);
- &asappend(*GDef, *Def);
- &asappend(*GVar, *Var);
- &asappend(*GStruct, *Struct);
- &asappend(*GUnion, *Union);
- &asappend(*GType, *Type);
- &asappend(*GEnum, *Enum);
- &asappend(*GAdaType, *AdaType);
- &asappend(*GAdaProcedure, *AdaProcedure);
- &asappend(*GAdaFunction, *AdaFunction);
- &asappend(*GAdaPackage, *AdaPackage);
- &asappend(*GAdaTask, *AdaTask);
- }
-
- &asappend(*Alldir, *Func);
- &asappend(*Alldir, *Macro);
- &asappend(*Alldir, *Def);
- &asappend(*Alldir, *Var);
- &asappend(*Alldir, *Struct);
- &asappend(*Alldir, *Union);
- &asappend(*Alldir, *Type);
- &asappend(*Alldir, *Enum);
- &asappend(*Alldir, *AdaType);
- &asappend(*Alldir, *AdaProcedure);
- &asappend(*Alldir, *AdaFunction);
- &asappend(*Alldir, *AdaPackage);
- &asappend(*Alldir, *AdaTask);
-
- if ($NoLetters != 1) {
- &make_letters_html($dir, "g", $Title{"g"}, *Alldir);
- }
- undef %Alldir;
-
- open(HTML, "> $Htmltree/$Dotdir{$dir}.html")
- || die "$0: Can't open $Htmltree/$Dotdir{$dir}.html, $!\n";
- print HTML "<head>\n<title>Cross-references for $dir</title>\n";
- print HTML "</head><body><h1>Cross-references for $dir</h1><p>\n";
- if (-f "$Headers/$Dotdir{$dir}.hdr" ) {
- open(TOPHDR, "$Headers/$Dotdir{$dir}.hdr");
- while (<TOPHDR>) { print HTML; }
- close(TOPHDR);
- }
-
- if (defined($Formdir)) {
- print HTML "<hr><form action=\"$Formdir/src2html.cgi\" ";
- print HTML "method=\"POST\">\n";
- print HTML "<input type=\"submit\" value=\"Search\">\n";
- print HTML "<input type= \"text\" ";
- print HTML "name=\"$Htmldir/$Newsrctree\">\n";
- print HTML "Enter a symbol's name here to quickly find it.\n";
- print HTML "</form><hr>\n";
- }
- print HTML "<h1>Cross-references for $dir by type</h1><p><ul>\n";
-
- foreach $i ( "f","m","d","v","s","u","t","e",
- "AdaType", "AdaProcedure", "AdaFunction", "AdaPackage", "AdaTask" ) {
- if ($Exists{$Title{$i}} > 0) { # A type exists
- print HTML "<li><a href=\"$Dotdir{$dir}.$i.html\">";
- print HTML "$Title{$i}</a>\n";
- $Exists{$dir}++; $Exists{$Title{$i}}=0;
- }
- }
- print HTML "</ul><p>\n";
- if ($NoLetters != 1) {
- print HTML "<h1>Cross-references for $dir by letter</h1><p><ul>\n";
- foreach $i ( "a".."z" ) {
- if ($Exists{$i} > 0) { # A letter exists
- print HTML "<li><a href=\"$Dotdir{$dir}.g$i.html\">";
- print HTML "$i</a>\n"; $Exists{$i}=0;
- }
- }
- }
- print HTML "</ul></body>\n";
- close(HTML);
-}
-
-## Make_top_html: Make the top html document by making the ones below
-## it and then adding links to them.
-
-sub make_top_html {
- local($i);
- local(@keys);
-
- $Dotdir{$Top}=$Top;
- &make_type_html($Top, "f", $Title{"f"}, *GFunc);
- &make_type_html($Top, "m", $Title{"m"}, *GMacro);
- &make_type_html($Top, "d", $Title{"d"}, *GDef);
- &make_type_html($Top, "v", $Title{"v"}, *GVar);
- &make_type_html($Top, "s", $Title{"s"}, *GStruct);
- &make_type_html($Top, "u", $Title{"u"}, *GUnion);
- &make_type_html($Top, "t", $Title{"t"}, *GType);
- &make_type_html($Top, "e", $Title{"e"}, *GEnum);
- &make_type_html($Top, "AdaType", $Title{"AdaType"}, *GAdaType);
- &make_type_html($Top, "AdaProcedure", $Title{"AdaProcedure"}, *GAdaProcedure);
- &make_type_html($Top, "AdaFunction", $Title{"AdaFunction"}, *GAdaFunction);
- &make_type_html($Top, "AdaPackage", $Title{"AdaPackage"}, *GAdaPackage);
- &make_type_html($Top, "AdaTask", $Title{"AdaTask"}, *GAdaTask);
-
- open(HTMLTOP, "> $Htmltree/$Top.html")
- || die "$0: Can't open $Htmltree/$Top.html, $!\n";
- print HTMLTOP "<head>\n<title>Cross-references for $Top</title>\n";
- print HTMLTOP "</head><body><h1>Cross-references for $Top</h1><p>\n";
-
- if (-f "$Headers/$Top.hdr" ) {
- open(TOPHDR, "$Headers/$Top.hdr");
- while (<TOPHDR>) { print HTMLTOP; }
- close(TOPHDR);
- }
-
- if (defined($Formdir)) {
- print HTMLTOP "<hr><form action=\"$Formdir/src2html.cgi\" ";
- print HTMLTOP "method=\"POST\">\n";
- print HTMLTOP "<input type=\"submit\" value=\"Search\">\n";
- print HTMLTOP "<input type= \"text\" ";
- print HTMLTOP "name=\"$Htmldir/$Newsrctree\">\n";
- print HTMLTOP "Enter a symbol's name here to quickly find it.\n";
- print HTMLTOP "</form><hr>\n";
- }
- print HTMLTOP "<h2>Cross-references by directory</h2><p>\n";
- print HTMLTOP "<ul>\n";
-
- foreach $i (sort keys(%Dirinfo)) {
- if ($Exists{$i} > 0) { # A dir exists
- print HTMLTOP "<li><a href=\"$Dotdir{$i}.html\">";
- print HTMLTOP "$i</a> $Dirinfo{$i}\n"; $Exists{$i}=0;
- }
- }
- if ($NoAll != 1) {
- print HTMLTOP "</ul><p><h2>Cross-references by type</h2><p><ul>\n";
- foreach $i ( "f","m","d","v","s","u","t","e",
- "AdaType", "AdaProcedure", "AdaFunction", "AdaPackage", "AdaTask" ) {
- if ($Exists{$Title{$i}} > 0) { # A type exists
- print HTMLTOP "<li><a href=\"$Top.$i.html\">";
- print HTMLTOP "$Title{$i}</a>\n";
- }
- }
- if ($NoLetters != 1) {
- print HTMLTOP "</ul><p><h2>All Cross-references for $Top";
- print HTMLTOP "</h2><p><ul>\n";
- &asappend(*Alltop, *GFunc);
- &asappend(*Alltop, *GMacro);
- &asappend(*Alltop, *GDef);
- &asappend(*Alltop, *GVar);
- &asappend(*Alltop, *GStruct);
- &asappend(*Alltop, *GUnion);
- &asappend(*Alltop, *GType);
- &asappend(*Alltop, *GEnum);
- &asappend(*Alltop, *GAdaType);
- &asappend(*Alltop, *GAdaProcedure);
- &asappend(*Alltop, *GAdaFunction);
- &asappend(*Alltop, *GAdaPackage);
- &asappend(*Alltop, *GAdaTask);
-
- if ($Debug > 0) { print "Making top letters\n"; }
- &make_letters_html($Top, "g", $Title{"g"}, *Alltop);
- if ($Debug > 0) { print "Making top letters, part 2\n"; }
- foreach $i ( "a".."z" ) {
- if ($Exists{$i} > 0) {
- print HTMLTOP "<li><a href=\"$Dotdir{$Top}.g$i.html\">";
- print HTMLTOP "$i</a>\n";
- }
- }
- }
- }
- print HTMLTOP "</ul>\n";
- print HTMLTOP "<hr>This source tree was made with ";
- print HTMLTOP "<a href=\"http://minnie.cs.adfa.oz.au/Src2html/index.html";
- print HTMLTOP "\">src2html</a>.</body>\n";
- close(HTMLTOP);
-}
-
-
-## rewrite_src: Reread the ctags file for the given directory, and
-## rewrite the source code, adding in anchor points and bolding symbols.
-## This is messy as we can have multiple symbols on a single source line,
-## therefore we must buffer each line while reading from the ctags file.
-##
-sub rewrite_src {
- local($dir)= $_[0];
- local($i);
- local($file)="";
- local($line)="";
- local($symb);
- local($cnt);
- local($nextcnt);
-
- $In_file=0;
- open(CTAGS,"sort +2 -3 +1n -2 $Ctagsfile{$dir} |")
- || die "$0: Can't open sorted $Ctagsfile{$dir}, $!\n";
- if ($Debug > 0) { print "Rewriting source in $dir\n"; }
- while (<CTAGS>) {
- # Get the next file, line, symbol
- if (/^([\w\/]+)\s+(\d+)\s+([A-Za-z0-9_\+\-\.\/]+)/) {
- if ($Debug > 2) { print "Symb $1 at $2 in $3\n"; }
- $fname=$3; $nextcnt= $2; $symb=$1;
- $symb=~ s/\/.//g;
-
- # If it's in a new file
- if ("$file" ne "$fname") {
- # Print out the remainder of the
- # current file, incl. the buffered line
- if ($In_file == 1) {
- if ("$line" ne "") { print OUT $line; }
- while (<IN>) {
- s/\&/&amp;/g; s/\</&lt;/g; s/\>/&gt;/g; print OUT;
- }
- print OUT "\n\n\n\n\n\n\n\n\n\n</pre></body>\n";
- close(IN); close(OUT);
- }
- $file= "$fname";
- # Open the new file & do the preamble
- open(IN, "$Srctree/$file") ||
- print "Cannot open $Srctree/$file\n";
- open(OUT, "> $Htmltree/$Newsrctree/$file.html");
- $In_file=1;
- print OUT "<head>\n<title>$file Source</title>\n";
- print OUT "</head><body>\n";
- print OUT "<h1>Source to $file</h1>\n";
- if (defined($Formdir)) {
- print OUT "<hr><form action=\"$Formdir/src2html.cgi\" ";
- print OUT "method=\"POST\">\n";
- print OUT "<input type=\"submit\" value=\"Search\">\n";
- print OUT "<input type= \"text\" ";
- print OUT "name=\"$Htmldir/$Newsrctree\">\n";
- print OUT "Enter a symbol's name here to quickly find it.\n";
- print OUT "</form><hr>\n";
- }
- print OUT "<pre>\n";
- # Get the first line
- $cnt=1; $line = <IN>;
- $line=~ s/\&/&amp;/g;
- $line=~ s/\</&lt;/g;
- $line=~ s/\>/&gt;/g;
- }
- }
- # Print all lines until one with a symb
- while ($cnt < $nextcnt) {
- print OUT $line; $cnt++; $line= <IN>;
- $line=~ s/\&/&amp;/g;
- $line=~ s/\</&lt;/g;
- $line=~ s/\>/&gt;/g;
- }
- # Now rewrite the line
- $line=~ s/\b$symb\b/<a name="$symb"<\/a><b>$symb<\/b>/;
- next;
- }
- close(CTAGS); close(IN); close(OUT);
-}
diff --git a/doc/tools/src2html1.4a/src2html.1 b/doc/tools/src2html1.4a/src2html.1
deleted file mode 100644
index 7401859ca8..0000000000
--- a/doc/tools/src2html1.4a/src2html.1
+++ /dev/null
@@ -1,244 +0,0 @@
-.TH src2html 1L "June 1994"
-.SH NAME
-src2html \- Hyperlink a C source code tree using HTML, Version 1.3-alpha
-
-.SH SYNOPSIS
-.B src2html
-[
-.I \-na
-] [
-.I \-nl
-] [
-.I \-d debug_level
-]
-.I configuration_file
-
-.SH DESCRIPTION
-
-.B src2html
-is a program which takes a C source tree and creates a set of
-HTML hypertext documents that allows the most important symbols in the
-source tree to be found easily. As well, a HTML version of the source
-tree is created, with the symbols given in bold font where they are defined
-in the source.
-
-.B src2html
-finds and hyperlinks the following C symbols: Preprocessor defines
-and macros, C functions, global variables, structs, unions, enums and typedefs.
-If defined in the
-.I configuration file,
-a query document is used so that symbols can be located by an index query
-as well as following the hyperlinks.
-
-.SH OPTIONS
-The
-.I debug level
-was used when debugging the program, and its only use is
-to assure the user that something is actually happening, especially for large
-source trees. The highest debug level of 3 is not particularly verbose.
-.PP
-By default,
-.B src2html
-produces html pages for each category of C symbols. If there are more than
-50 in each category,
-.B src2html
-then further subdivides the symbols on a first-letter basis, making HTML
-documents for each letter.
-.PP
-If the
-.I -nl
-flag is set, no first-letter HTML documents will ever be produced.
-Similarly,
-.B src2html
-creates a top-level document with category links. If the
-.I -na
-flag is set, no top-level category links will be produced.
-
-.SH CONFIGURATION FILE
-
-.B src2html
-takes as an argument a
-.I configuration file
-which describes the directories in a source tree to process, and
-where to place the resulting HTML documents. Lines beginning with a #
-sign are ignored, as are blank lines. The following lines have special meaning:
-.P
-.IP "set Srctree source_tree"
-Set the root of the tree where the original source is kept, e.g
-/usr/src/sys. Do not leave a trailing slash on the tree name.
-This line must appear in the configuration file.
-.P
-.IP "set Htmlroot html_tree"
-Set the root of the tree where HTML documents are normally kept.
-This is the same as DocumentRoot in the httpd(1L) configuration.
-Again, do not leave a trailing slash on the tree name.
-This line must appear in the configuration file.
-.P
-.IP "set Htmldir html_dir"
-Set the directory within Htmlroot where the HTML documents for this
-tree will be placed.
-Again, do not leave a trailing slash on the tree name.
-This line must appear in the configuration file.
-.P
-.IP "set Newsrctree new_source_tree"
-Set the directory within the Htmltree where the marked up source code
-is placed, e.g src. This allows the source to be kept separate from the
-`pointer' documents which point at the source; see the next section for
-more details. This line is optional, and the default value of
-Newsrctree is `newsrc'.
-.P
-.IP "set Headers header_dir"
-.B src2html
-allows information to be placed at the beginning of the HTML
-documents created, e.g to describe the contents of a particular
-subdirectory. Files containing this information are kept in this
-directory. This line is optional, and the default value of
-Headers is `.'.
-.P
-.IP "set Formdir form_dir"
-If set, this tells
-.B src2html
-that the active HTML document which can
-perform index lookups for the source tree is located in this
-directory. If not set,
-.B src2html
-will not put query boxes in the
-HTML documents created. This line is optional, and there is no
-default value.
-.P
-.IP "dir directory comments_about_the_dir"
-This line may appear may times, and tells
-.B src2html
-to process
-source files in the directory Srctree/dir. This allows only particular
-sections of the source tree to be marked up. The comments after the
-directory are placed in the top-level HTML document to explain
-what that directory contains.
-
-.SH DIRECTORY STRUCTURE
-
-.B src2html
-expects to be given a source tree to process, and it produces
-a new tree with HTML documents. The configuration file should have a suffix
-of `.s2h', although this is strictly not needed.
-
-As an example, consider the following configuration file named BSD.s2h:
-.PP
-.nf
-# Comments
-set Srctree /usr/src/sys
-set Htmltree /usr/local/WWW
-set Htmldir sys
-set Newsrctree newsrc # Comments here too
-set Headers /home/staff/warren/sys_headers
-set Formdir /cgi
-dir kern The core OS routines: processes, scheduling, syscalls
-dir sys Widely used C-language include files
-dir i386/isa Device drivers for peripherals on the ISA bus
-.fi
-.PP
-Three directories containing C source will be processed,
-.nf
- /usr/src/sys/kern,
- /usr/src/sys/sys and
- /usr/src/sys/i386/isa
-.fi
-
-The resulting marked up source code will be placed in
-.nf
- /usr/local/WWW/sys/newsrc/kern,
- /usr/local/WWW/sys/newsrc/sys and
- /usr/local/WWW/sys/newsrc/i386/isa
-.fi
-respectivey.
-.PP
-The directory /usr/local/WWW/sys will itself contain a set of pointer
-documents which point to the source code documents on a per-directory,
-per-symbol-type and per-first-letter basis (and combinations of the
-above). One file, BSD.html (named from the configuration file name), is the
-root of the hyperlinks, and the entire source tree can be browsed from this
-one document.
-
-.SH HEADER FILES
-
-.B src2html
-creates a root HTML document, and HTML documents for each directory
-named in the configuration file. Textual information can be placed in the
-head of these documents to describe the contents of the tree/directory,
-give references etc. The files that hold this information are kept in the
-Headers directory. Taking the above configuration file as an example,
-
- /home/staff/warren/sys_headers/BSD.hdr
- /home/staff/warren/sys_headers/kern.hdr
- /home/staff/warren/sys_headers/sys.hdr
- /home/staff/warren/sys_headers/i386.isa.hdr
-
-can hold the information to be placed in the head of the appropriate
-documents. Note that if a directory name has a slash as given in the
-configuration file, the name of the header file has a dot instead.
-.PP
-Header files are placed `as is' into the head of the document, and thus
-can contain HTML markup commands. Any and all header files are optional;
-if the file does not exist, nothing will be placed in the head of the
-appropriate HTML document.
-.PP
-Once
-.B src2html
-has completed, the header files may be removed. However,
-you may wish to keep them in case you ever need to re-run
-.B src2html
-on the same source tree.
-
-.SH SEARCH SCRIPT
-
-During execution,
-.B src2html
-builds a ctags directory in Htmltree and places
-the output of ctags-new(1L) on the source tree directories in this place.
-This information is needed if a search script is also requested.
-.PP
-If the Formdir is set in the configuration file,
-.B src2html
-will configure the HTML code produced to use the search script
-.I src2html.cgi
-to search for symbols in the source tree. This script
-conforms to the cgi query format as used by httpd(1). You must move the
-supplied
-.I src2html.cgi
-file into the Formdir in the httpd hierachy before the query functionality
-can be used.
-.PP
-Again, from the example configuration file above,
-/usr/local/httpd/cgi/src2html.cgi is where to place the script, if the
-httpd hierachy is kept in /usr/local/httpd.
-
-.SH EXAMPLE SOURCE TREE
-
-The output from
-.B src2html
-for the full FreeBSD 2.0.5 kernel source directory can be browsed
-from the Web page http://minnie.cs.adfa.oz.au/FreeBSD-srctree/FreeBSD.html.
-
-.SH BUGS AND SHORTCOMINGS
-
-.B src2html
-uses the ctags-new(1L) program, which does not correctly parse C variable
-declarations and function pointer usage. Someone should rewrite this in Perl.
-.PP
-Ideally,
-.B src2html
-should include hyperlinks within each source file,
-but this is difficult given C's scoping rules, and would need a more
-sophisticated parser than ctags(1L).
-.PP
-.B src2html
-looks at all files in the named source directories, including
-files that don't end in .c and .h. This may be construed as a feature.
-
-.SH SEE ALSO
-.PD
-ctags-new(1L), httpd(1L), perl(1L)
-
-.SH AUTHOR
-.PD
-Warren Toomey wkt@cs.adfa.oz.au
diff --git a/doc/tools/src2html1.4a/src2html.cgi b/doc/tools/src2html1.4a/src2html.cgi
deleted file mode 100644
index cfc93d4134..0000000000
--- a/doc/tools/src2html1.4a/src2html.cgi
+++ /dev/null
@@ -1,100 +0,0 @@
-#!/usr/local/bin/perl
-#
-# src2html.cgi -- A search script to file symbols in a src2html tree.
-# You need to install this in your httpd script directory AND set the
-# httpd web root below.
-#
-# We need the cgi-lib.pl package to be available to Perl
-require 'cgi-lib.pl';
-#
-## We MUST know the root of the httpd server, so we can find the ctags
-##
-#
-$Http_root= "/usr/pub/pub/www";
-
- # Parse input -> %in
-&ReadParse; # and print first 2 lines
-
-@keys= keys(%in); # We only expect one name/val pair
-if ($#keys != 0) { # Otherwise, return an error document
- print <<"query_error";
-Content-type: text/html
-
- <header><title>Query Error</title></header><body>
- <h1>Query Error</h1>
- The document you used to query this source tree has an error in it.
- You should email the maintainer of the source tree with a copy of the
- document with the query form in it.
- </body>
-query_error
- exit(1);
-}
- # Given the name, determine which tree
-$Htmltree= "$Http_root/$keys[0]";
-$Htmltree=~ s/\/[^\/]*$//; # Location of the Html tree root
-$Srctree= "/$keys[0]"; # URL of the actual source
-$Ctags= "$Htmltree/ctags"; # Location of the ctags files
-
-@symbol= split(/\s+/, $in{$keys[0]}); # Get one symbol to search for
-
-if ($#symbol != 0) { # Hmm, <> 1 symbol, return an error
- print <<"symbol_error";
-Content-type: text/html
-
- <header><title>$Htmltree Search Error</title></header><body>
- <h1>$Htmltree Search Error</h1>
- Hmm, you either sent in no symbols to me to search, or a number of
- symbols to find, separated by whitespace.<p>
- The search function can only handle regexp expressions with no
- whitespace. Try resubmitting your query.
- </body>
-symbol_error
- exit(1);
-}
- # Let's go to work, egrep the ctags
-
-# Naftali Schwartz (nschwart@SLINKY.CS.NYU.EDU) reports that using the ^
-# on the following line stops the script from working under SunOS 4.1.3.
-# Sounds like ctags-new doesn't start the symbol in the 1st column.
-open(IN, "cat $Ctags/* | egrep ^$symbol[0] |") || die "$0: egrep failed\n";
-$cnt=0;
-while(<IN>) {
- ($sym, $line, $file, $com)= split(/\s+/);
- $Sym[$cnt]=$sym; $Line[$cnt]= $line; $File[$cnt]= $file; $cnt++;
-}
-close(IN);
- # How many did we get? Zero, no symbol
-if ($cnt == 0) {
- print <<"symbol_missing";
-Content-type: text/html
-
- <header><title>$Htmltree Search Error</title></header><body>
- <h1>$Htmltree Search Error</h1>
- The symbol $symbol[0] does not appear in the source tree.
- </body>
-symbol_missing
- exit(1);
-}
-
-if ($cnt == 1) { # Exactly one, return ptr to that doc
- print "Location: $Srctree/$File[0]";
-
-# I used to use the commented out line under NCSA httpd because the other
-# line didn't work. You may need to try things out on your server.
- print ".html\#$Sym[0]\n\n";
-# print ".html\n\n";
- exit(0);
-}
- # Else return a list of choices
-print <<"many_found";
-Content-type: text/html
-
-<header><title>$Htmltree Search</title></header><body>
-<h1>$Htmltree Search</h1><ul>
-many_found
-for ($i = 0; $i < $cnt; $i++) {
- print "<li><a href= \"$Srctree/$File[$i]";
- print ".html#$Sym[$i]\">$Sym[$i]</a> $File[$i]:$Line[$i]\n";
-}
-print "</ul></body>\n";
-exit(0);
diff --git a/doc/tools/texi2www/Makefile b/doc/tools/texi2www/Makefile
deleted file mode 100644
index 11ef5a3d65..0000000000
--- a/doc/tools/texi2www/Makefile
+++ /dev/null
@@ -1,50 +0,0 @@
-#
-# COPYRIGHT (c) 1988-1999.
-# On-Line Applications Research Corporation (OAR).
-# All rights reserved.
-#
-# $Id$
-#
-
-PROJECT=texi2www
-
-include ../../Make.config
-
-all: html info ps pdf
-
-dirs:
- $(make-dirs)
-
-FILES= texi2www.texi
-
-info:
-
-dvi: dirs $(PROJECT).dvi
-
-ps: dirs $(PROJECT).ps
-pdf: dirs $(PROJECT).pdf
-
-$(PROJECT).pdf: $(FILES)
- #$(TEXI2PDF) $(PROJECT).texi
- #cp $(PROJECT).pdf $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).ps: $(PROJECT).dvi
- #dvips -o $(PROJECT).ps $(PROJECT).dvi
- #cp $(PROJECT).ps $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).dvi: $(FILES)
- #$(TEXI2DVI) $(PROJECT).texi
- #cp $(PROJECT).dvi $(WWW_INSTALL)/$(PROJECT)
-
-html: dirs $(FILES)
- #-mkdir -p $(WWW_INSTALL)/$(PROJECT)
- #$(TEXI2WWW) $(TEXI2WWW_ARGS) -dir $(WWW_INSTALL)/$(PROJECT) \
- # $(PROJECT).texi
-
-clean:
- rm -f *.o $(PROG) *.txt core $(PROJECT).pdf
- rm -f *.dvi *.ps *.log *.aux *.cp *.cps
- rm -f *.fn *.ky *.pg *.toc *.tp *.vr $(BASE)
- rm -f $(PROJECT)-* $(GENERATED_FILES)
- rm -f *.fixed _*
-
diff --git a/doc/tools/texi2www/archive/texi2www-960103.tgz b/doc/tools/texi2www/archive/texi2www-960103.tgz
deleted file mode 100644
index b0851552c2..0000000000
--- a/doc/tools/texi2www/archive/texi2www-960103.tgz
+++ /dev/null
Binary files differ
diff --git a/doc/tools/texi2www/dir-arrow.gif b/doc/tools/texi2www/dir-arrow.gif
deleted file mode 100644
index 5d661527cc..0000000000
--- a/doc/tools/texi2www/dir-arrow.gif
+++ /dev/null
Binary files differ
diff --git a/doc/tools/texi2www/missing-arrow.gif b/doc/tools/texi2www/missing-arrow.gif
deleted file mode 100644
index c686c80b5f..0000000000
--- a/doc/tools/texi2www/missing-arrow.gif
+++ /dev/null
Binary files differ
diff --git a/doc/tools/texi2www/next-arrow.gif b/doc/tools/texi2www/next-arrow.gif
deleted file mode 100644
index 57f5cddb81..0000000000
--- a/doc/tools/texi2www/next-arrow.gif
+++ /dev/null
Binary files differ
diff --git a/doc/tools/texi2www/prev-arrow.gif b/doc/tools/texi2www/prev-arrow.gif
deleted file mode 100644
index 350785be10..0000000000
--- a/doc/tools/texi2www/prev-arrow.gif
+++ /dev/null
Binary files differ
diff --git a/doc/tools/texi2www/texi2dvi b/doc/tools/texi2www/texi2dvi
deleted file mode 100644
index 913904a921..0000000000
--- a/doc/tools/texi2www/texi2dvi
+++ /dev/null
@@ -1,218 +0,0 @@
-#!/usr/bin/perl
-#
-# $Id$
-#
-
-$version = <<END_VERSION;
-Jan 2 1996
-END_VERSION
-
-$copyright = <<END_COPYRIGHT;
-texi2dvi - converts texinfo to dvi
-Copyright (C) 1996 Tim Singletary
-
-This program is freely distributable under the terms of the GNU
-GENERAL PUBLIC LICENSE. In particular, modified versions of this
-program must retain this copyright notice and must remain freely
-distributable.
-END_COPYRIGHT
-
-$usage = <<END_USAGE;
-Usage: texi2dvi [option ...] texinfo_file ...
- -k (-nocleanup) -- don't ``rm -f'' the intermediate files.
- -v (-verbose) -- print additional output.
- -copyright -- print the copyright and die.
- -version -- print the version and die.
-Generates a .dvi file from each texinfo (.texi or .texinfo) file.
-Understands texi2www extensions (\@gif, etc.).
-END_USAGE
-
-unless ($tex = $ENV{TEX}) {$tex = tex;}
-unless ($texindex = $ENV{TEXINDEX}) {$texindex = texindex;}
-$texinputs = $ENV{TEXINPUTS};
-
-$cleanup = 1;
-while ($ARGV[0] =~ /^-/) {
- $_ = shift;
- if (/-k$/ || /-nocleanup/) {$cleanup = 0; next;}
- if (/-v$/ || /-verbose/) {$verbose = 1; next;}
- if (/-d$/ || /-vv$/ || /-debug/) {$verbose = 2; next;}
- if (/-copyright/) {die $copyright;}
- if (/-version/) {die $version;}
- die $usage;
-}
-
-$font_prefix = "xx";
-while (&prefix_in_use($font_prefix)) {
- ++$font_prefix;
- if (length($font_prefix) > 2) {
- $font_prefix = "aa";
- }
-}
-
-$unique_base = "_" . $$ . "a-";
-while (&prefix_in_use($unique_base)) {++$unique_base;}
-
-print "Generated files will begin with \`$unique_base\'\n" if $verbose;
-
-$arg_index = 'a';
-foreach $raw_texi (@ARGV) {
- $base = $unique_base . $arg_index;
- ++$arg_index;
-
- # $tawtexifile is a texinfo file; suffix must be either `.texi' or
- # `.texinfo'. If arg is in a different directory, adjust
- # TEXINPUTS environment variable to include that (and the current)
- # directory.
- unless ($raw_texi =~ /(.*).texi(nfo)?$/) {
- print "skipping $raw_texi -- has unknown extension!\n";
- next;
- }
- $raw_texi_base = $1;
- if ($raw_texi_base =~ m|^(.*)/([^/]*)$|) {
- $raw_texi_base = $2;
- $ENV{TEXINPUTS} = ".:$1:$texinputs";
- } else {
- $ENV{TEXINPUTS} = ".:$texinputs";
- }
-
- unless (-r $raw_texi) {
- print "skipping $raw_texi -- not readable or doesn't exist!\n";
- next;
- }
-
- # Preprocesses the $rawtexifile (because of @gif{} and other extensions)
- $processed_texi = "$base.texi";
- print "Preprocessing $raw_texi into $processed_texi:\n" if $verbose;
- &preprocess_texinfo($raw_texi,$processed_texi,$base);
-
- print "$tex $processed_texi\n" if $verbose;
- if (system("$tex $processed_texi") == 0) {
-
- # @possible_index_file = <$base.??>; only works for the
- # first value of $base ... so,
- opendir(DIR,".") || die "Couldn't read current directory -- $!\n";
- @possible_index_files = ();
- while ($_ = readdir(DIR)) {
- if (/^$base\...$/) {
- push(@possible_index_files,$_);
- }
- }
- closedir(DIR);
-
- @index_files = ();
- foreach $possible_index_file (@possible_index_files) {
- print "DEBUG: possible_index_file $possible_index_file\n"
- if ($verbose > 1);
- next unless (-s $possible_index_file);
- push(@index_files,$possible_index_file);
- }
-
- if (@index_files > 0) {
- $texindex_cmd = "$texindex " . join(' ',@index_files);
- print "$texindex_cmd\n" if $verbose;
- if (system($texindex_cmd) == 0) {
- print "$tex $processed_texi\n" if $verbose;
- system("$tex $processed_texi");
- }
- }
- }
-
- # At this point, $base.dvi should exist -- rename it
- # to $raw_texi_base.dvi
- if (-e "$base.dvi") {
- rename("$base.dvi","$raw_texi_base.dvi")
- || die "rename $base.dvi $raw_texi_base.dvi -- $!\n";
- }
-}
-if ($cleanup) {unlink(<$base*>);}
-
-sub preprocess_texinfo
-{
- local ($infile,$outfile,$b) = @_;
-
- open(IN,"<$infile") || die "Couldn't open $infile -- $!\n";
- open(OUT,">$outfile") || die "Couldn't open $outfile -- $!\n";
-
- $gif_index = 'a';
- while (<IN>) {
-
- # @gif{gif} or @gif{html_gif, tex_gif}
- if (/(.*)\@gif\{([^{]*)\}(.*)/) {
- $prefix = $1;
- $arg = $2;
- $suffix = $3;
- print OUT "$prefix\n" if $prefix;
-
- while (1) {
- $gif_base = $b . $gif_index;
- last unless (-e $gif_base . ".gif");
- ++$gif_index;
- }
-
- $gif_file = '';
- if ($arg =~ /.*,(..*\.gif)/) {
- $gif_file = $1;
- $font_base = $gif_file;
- } else {
- $font_base = $arg;
- $gif_file = $gif_base . ".gif";
- print "Scaling $arg into $gif_file:\n" if $verbose;
- $scale_cmd = "giftopnm $arg | pnmscale 2 | pnmnlfilt 2 1 "
- . "| ppmquant 255 | ppmtogif > $gif_file";
- print "$scale_cmd\n" if $verbose;
- if (system($scale_cmd) != 0) {
- print "$scale_cmd failed\n";
- $gif_file = '';
- }
- }
-
- if ($gif_file =~ /.*\.gif/) {
-
-
- $font_base =~ s|.*/||;
- $font_base =~ s|\..*||;
-
- # $font_base, due to bm2font requirements, can't be more
- # than six characters long and must consist entirely of
- # lower case letters.
- $font_base =~ s/[^a-z]//g;
- $font_base = $font_prefix . substr($font_base,0,5);
- while (&prefix_in_use($font_base)) {++$font_base;}
-
- $bm2font_cmd = "bm2font -f$font_base $gif_file";
- print "$bm2font_cmd\n" if $verbose;
- if (system($bm2font_cmd) != 0) {
- print "$bm2font_cmd failed\n";
- } else {
- print OUT "\@tex\n";
- print OUT "\\input $font_base.tex\n";
- print OUT "\\set$font_base\n";
- print OUT "\@end tex\n";
- }
- }
-
- print OUT "$suffix \n" if $suffix;
- } else {
- print OUT "$_";
- }
- }
- close OUT;
- close IN;
-}
-
-sub prefix_in_use
-{
- local ($p) = @_;
-
- # Returns true or false; returns true if any file in the current
- # directory begins with $p. This function is here because
- # `<$p*>' only works for the first value of $p!
-
- opendir(DIR,".") || die "Couldn't read current directory -- $!\n";
- while ($_ = readdir(DIR)) {
- last if /^$p/;
- }
- closedir(DIR);
- $rc = /^$p/;
-}
diff --git a/doc/tools/texi2www/texi2www b/doc/tools/texi2www/texi2www
deleted file mode 100755
index 48b5684c47..0000000000
--- a/doc/tools/texi2www/texi2www
+++ /dev/null
@@ -1,1284 +0,0 @@
-#!/usr/bin/perl
-# (Works with both perl 4 and perl 5)
-#
-# $Id$
-#
-
-$version = 'Jan 2 1996';
-$copyright = <<EOT;
-texi2www - converts texinfo to HTML
-Copyright (C) 1994, 1995, 1996 Tim Singletary
-
-This program is freely distributable under the terms of the GNU
-GENERAL PUBLIC LICENSE. In particular, modified versions of this
-program must retain this copyright notice and must remain freely
-distributable.
-
-EOT
-$usage = <<EOT;
-Usage: texi2www [option ...] texinfo_file
-where options are:
- -dir directory -- Specify output directory. Default is `.'.
- -dirfile path -- Specifies a replacement for ../dir.html
- -header path -- Specifies the path to a file containing HTML;
- this files gets inserted near the top of each
- generated HTML file.
- -footer path -- Specifies the path to a file containing HTML;
- this files gets inserted near the bottom of each
- generated HTML file.
- -icons path -- Specifies the path, relative to the output directory,
- to the arrow files. Default is `..'.
- -base -- Specify the base part fo the genrated short file names
- -uselongnames -- Use long names for generated html files
- -verbose -- Verbose output.
-
-The complete user\'s is available at
-http://sunland.gsfc.nasa.gov/info/texi2www/Top.html
-EOT
-
-########################################################################
-
-%lookup = (); # clear the name mapping hash
-$uselongnames=0; # default to using short names
-$base = "a"; # default short name base (BASEnnnnn.html)
-$outcount = 0; # count for the nnnnn part of short names
-$icons = ".."; # where are the icons
-$dir = "."; # where are the generated files to go
-$dirfile = "../dir.html"; # "up" node pointer
-while ($ARGV[0] =~ /^-/) {
- $_ = shift;
- if (/-base/) {$base = shift; next;}
- if (/-dirfile/) {$dirfile = shift; next;}
- if (/-dir/) {$_ = shift; s!/$!!; s!$!/!; $dir = $_; next;}
- if (/-footer/) {$footer = shift; next;}
- if (/-header/) {$header = shift; next;}
- if (/-icons/) {$_ = shift; s!\/$!!; $icons = $_; next;}
- if (/-uselongnames/) {$uselongnames = 1; next;}
- if (/-verbose/) {$verbose = 1; next;}
- die $usage;
-}
-
-&initialize_tables();
-
-#
-# Read the texinfo input into @texinfo
-#
-&open_input_file($ARGV[0]);
-&read_input(1,'/^\@bye/',"$texinfo_file[0] line 1");
-$texinfo[$ntexinfo] = "\@bye\n";
-$origin[$ntexinfo] = "$texinfo_file[0] line $.";
-
-#
-# Parse @texinfo
-#
-$texinfo_index = 0;
-while ($texinfo_index < @texinfo) {
- &get_more_stuff_to_parse();
- if (/^\@bye/) {
- &terminate_node();
- print "Normal completion\n";
- exit;
- }
- &parse();
-}
-
-print "Huh? didn't parse the \@bye directive!\n";
-
-########################################################################
-sub canonical # (node_name)
-{
- local ($n) = @_;
-
- $n =~ s/^\s+//; $n =~ s/\s+$//; # strip whitespace
-
- return "$dirfile" if ($n =~ /\(dir\)/i); # handle (dir)
-
- if ($n =~ /^\(([^\)]+)\)(.*)/) {
- $p = $1; $p =~ s/^\s+//; $p =~ s/\s+$//; $p .= "/";
- $n = $2; $n =~ s/^\s+//; $n =~ s/\s+$//;
- } else {
- $p = "";
- }
-
-
- $n =~ s/\$/\$\$/; # `$' -> `$$'
- $n =~ s/_/\$_/g; # `_' -> `$_'
- $n =~ s/\s+/_/g; # whitespace -> `_'
-
- # anything else that's funky get
- # translated to `$xx' where `xx'
- # are hex digits.
- while ($n =~ /(.*)([^-a-zA-Z0-9\$_.])(.*)/) {
- $n = $1 . sprintf("\$%02x",ord($2)) . $3;
- }
-
- if ($uselongnames) {
- return "$p$n.html" if ($n);
- } else {
- if ($n eq 'Top') {
- $lookup{"$p$n"}= "index.html";
- return $lookup{"$p$n"};
- } elsif ($n) {
- if (! $lookup{"$p$n"}) {
- $outcount = $outcount + 1;
- #$lookup{"$p$n"}= "$base$outcount.html";
- $lookup{"$p$n"} = sprintf "%s%05d.html", $base, $outcount;
- }
- return $lookup{"$p$n"};
- }
- }
- return "";
-} # canonical
-
-########################################################################
-sub deduce_node_links
-#
-# On entry, $_ is a node line and $start_index is the index (in @texinfo)
-# the node line.
-#
-# &deduce_node_links() sets $next, $prev, and $up.
-{
- local ($level,$i,$node,$j);
-
- # First, search down from this node to the next sectioning command.
- $level = &determine_node_level($start_index+1);
-
- # Next, look for the `next' node (i.e., the next node at the
- # same or a higher level).
- undef($next);
- for ($i=$start_index+1; $i < $ntexinfo; ++$i) {
- $_ = $texinfo[$i];
- next unless /^\@node +([^,]+).*\n/;
- $j = &determine_node_level($i+1);
- if ($j <= $level) {
- if ($j == $level) {$next = $1;}
- last;
- }
- }
-
- # Look for the `prev' and `up' nodes
- undef($prev);
- undef($up);
- for ($i=$start_index-1; $i > 1; --$i) {
- $_ = $texinfo[$i];
- next unless /^\@node\s+([^,]+).*\n/;
- $j = &determine_node_level($i+1);
- if ($j == $level) {
- unless ($prev) {$prev = $1;}
- } elsif ($j < $level) {
- $up = $1;
- last;
- }
- }
- unless (defined($up)) {$up = "(dir)";}
-
- $xthis = $this;
- $xthis =~ s/\n//;
-
-} # deduce_node_links
-
-########################################################################
-sub determine_node_level
-{
- local ($i) = @_;
- local ($level);
-
- $level = 0;
- while ($i < $ntexinfo) {
- $_ = $texinfo[$i];
- ++$i;
- next if /^\s+$/;
- last if (/\@node/);
- last unless (/\@(\w+)/);
- if ($directive_section{$1}) {
- $level = $directive_section{$1};
- last;
- }
- }
-
- return $level;
-} # determine_node_level
-
-
-########################################################################
-sub expand_xref
-{
- local ($cmd,$arg) = @_;
- local ($node,$xrefname,$topic,$infofile,$manual,$url,$x);
-
- if ($cmd eq 'inforef') {
- ($node,$xrefname,$infofile) = split(/,/,$arg);
- $topic = $manual = '';
- } elsif ($cmd eq 'href') {
- ($xrefname,$node,$infofile,$url) = split(/,/,$arg);
- } elsif ($cmd eq 'email') {
- ($xrefname,$node,$infofile,$url) = split(/,/,$arg);
- $xrefname = "mailto:$xrefname";
- $url = $xrefname
- } elsif ($cmd eq 'uref') {
- ($url,$xrefname,$node,$infofile) = split(/,/,$arg);
- } else {
- ($node,$xrefname,$topic,$infofile,$manual) = split(/,/,$arg);
- }
- $xrefname =~ s/^\s+//; $infofile =~ s/^\s+//;
- $xrefname =~ s/\s+$//; $infofile =~ s/\s+$//;
- $xrefname =~ s/\s+/ /; $infofile =~ s/\s+/ /;
- $infofile =~ s/\.texi$//;
- $infofile =~ s/\.texinfo$//;
-
- if ($xrefname =~ /^$/) {$xrefname = $node;}
-
- $node = &canonical($node);
- unless ($url) {
- unless ($infofile =~ /^$/) {$url = "../$infofile/";}
- $url = $url . $node;
- }
- $x = "<A HREF=\"$url\">$xrefname</A>";
-} # expand_xref
-
-########################################################################
-sub get_more_stuff_to_parse
-{
- $start_index = $texinfo_index;
-
- $_ = '';
- do {
- if ($texinfo_index >= @texinfo) {
- print "Unclosed \@x{y} in chunk beginning at "
- . "$origin[$start_index]\n";
- return;
- }
- s/\n$/ /;
- $more = $texinfo[$texinfo_index++];
- $more =~ s/\@\*/<BR>\n/g;
- $more =~ s/\@\./\./g;
- $more =~ s/\@\://g;
- $more =~ s/\@refill//g;
-
- $_ .= $more;
-
- # Expand all @a{b} in line
- while (/\@(\w+)\{([^{}]*)\}/) {
- $atcmd = $1;
- $atarg = $2;
-
- if ($z = $atxy_2_zyz{$atcmd}) {
- if ($z =~ /(.+),(.+),(.+)/) {
- $left = $1; $z = $2; $right = $3;
- } else {
- $left = ''; $right = '';
- }
- if ($z =~ s/^\^//) {$atarg =~ tr/a-z/A-Z/;}
- $x = "$left<$z>$atarg</$z>$right";
- } elsif ($atxy_2_y{$atcmd}) {
- $x = $atarg;
- } elsif ($z = $atxy_2_z{$atcmd}) {
- $x = $z;
- } elsif ($z = $atxy_2_ref{$atcmd}) {
- $x = $z . &expand_xref($atcmd,$atarg);
- $x =~ s/^X//; # works because $z must start with 'X'!
- } elsif ($atcmd eq 'value') {
- $x = $texinfo_variable{$atarg};
- } elsif ($atcmd eq 'today') {
- $x = &today();
- } elsif ($atcmd eq 'footnote') {
- $footnote[$nfootnotes++] = $atarg;
- $x = "\[$nfootnotes\]";
- } elsif ($atcmd eq 'gif') {
- $atarg =~ s/,.*//;
- &copy_to_destdir($atarg);
- $atarg =~ s|.*/||;
- $x = "<IMG SRC=\"$atarg\">";
- } else {
- print "**WARNING** Don't know how to expand "
- . "\@$atcmd\{$atarg\}\n";
- $debug = 1;
- $x = "?$atcmd\?$atarg\?";
- }
-
- print "$origin[$start_index]: \@$atcmd\{$atarg\} => $x\n"
- if $debug{expansions};
-
- s/\@\w+\{[^{}]*\}/$x/;
- }
- } while (/\@\w+\{[^}]*$/);
- print "$origin[$start_index]: $_" if $debug{chunks};
-} # get_more_stuff_to_parse
-
-########################################################################
-sub parse
-# On entry:
-# $_ -- the line(s) to parse.
-# $start_index -- where, in $texinfo, $_ begins.
-{
- local ($x);
-
- if (/^\@(\w+)/) {
- if ($x=$directive_block{$1}) { # @example, @quotation, etc.
- &parse_block($1,$x);
- } elsif ($directive_section{$1}) { # @chapter, @subsection, etc.
- &process_section();
- } elsif ($1 eq 'bye') {
- if ($nfootnotes > 0) {
- &printHTML("<P><HR>\n");
- for ($n=0; $n < $nfootnotes; ++$n) {
- &printHTML("<P>\[" . ($n+1) . "\] $footnote[$n]</P>\n");
- }
- }
- &printHTML("<P><HR>\n");
- &print_arrows;
- &printHTML("</P>\n");
- &print_footer if $footer;
- &printHTML("</BODY></HTML>\n");
- close (HTML);
- return;
- } elsif ($1 eq 'center') {
- /^\@center\s+(.*)/;
- &printHTML("$paragraph_end") if $in_paragraph;
- &printHTML("<P ALIGN=CENTER>$1</P>\n");
- $in_paragraph = 0;
- } elsif ($1 eq 'clear') {
- /^\@clear\s+(\S+)/;
- undef($texinfo_variable{$1});
- } elsif ($1 =~ /^def(code)?index/) {
- /^\@(def|defcode)index\s+(\w+)/;
- $index_name{$2} = $2 . "index";
- $index_style{$2} = 'CODE' if ($1 eq "defcode");
- } elsif ($1 =~ /^(def.*)/) { # @defn, @defun, ... @deftp
- &parse_def($1);
- } elsif ($1 eq 'enumerate') {
- &parse_enumerate();
- } elsif ($1 eq 'exdent') {
- /^\@exdent\s+(.*)/;
- &printHTML("$paragraph_end") if $in_paragraph;
- # A bug -- doesn't exdent the line!
- &printHTML("<P>$1</P>\n");
- $in_paragraph = 0;
- } elsif ($1 eq 'flushleft' || $1 eq 'flushright') {
- &parse_flush();
- } elsif ($1 eq 'html') {
- while ($texinfo_index < @texinfo) {
- &get_more_stuff_to_parse();
- last if (/^\@end\s+html/);
- s/\&quot;/\"/g; s/\&gt;/\>/g; s/\&lt;/\</g; s/\&amp;/\&/g;
- &printHTML("$_");
- }
- } elsif ($1 eq 'itemize') {
- &parse_itemize();
- } elsif ($1 eq 'menu') {
- &parse_menu();
- } elsif ($1 eq 'node') {
- $node=$_;
- &process_node();
- } elsif ($1 eq 'printindex') {
- /^\@printindex\s+([a-z]+)/;
- &print_index($1);
- } elsif ($1 eq 'settitle') {
- /^\@settitle\s+(.*)/;
- unless ($title) {$title = $1;}
- } elsif ($1 eq 'set') {
- if (/^\@set\s+(\S+)\s+(.+)$/) {
- $texinfo_variable{$1} = $2;
- } else {
- /^\@set\s+(\S+)/;
- $texinfo_variable{$1} = 1;
- }
- } elsif ($1 eq 'syncodeindex') {
- &process_synindex(1);
- } elsif ($1 eq 'synindex') {
- &process_synindex(0);
- } elsif ($1 =~ /^.?table/) { # @table, @vtable, @ftable
- unless (/^\@(.?table)\s*\@(\w*)/
- && ($2 eq 'asis' || ($tbltype=$atxy_2_zyz{$2}))) {
- print "**WARNING** $origin[$start_index]: assuming "
- . "\@table \@asis\n";
- $tbltype = '';
- }
- &parse_table($1,$tbltype);
- } elsif ($1 =~ /..?index/) { # @cindex, @findex, .. @auindex, etc.
- &process_index();
- } else {
- print "**WARNING** $origin[$start_index]: ignoring $_";
- }
- } else {
- if (/^\s*$/) {
- if ($in_paragraph) {
- &printHTML("$paragraph_end");
- } elsif ($in_preformatted) {
- &printHTML("\n");
- }
- $in_paragraph = 0;
- } else {
- unless ($in_preformatted) {
- unless ($in_paragraph) {
- &printHTML("<P>\n");
- $in_paragraph = 1;
- $paragraph_end = "</P>\n";
- }
- }
- &printHTML("$_");
- }
- }
-} # parse
-
-########################################################################
-sub parse_block
-#
-# Handles @example, @display, etc.
-#
-# > @example > <PRE>
-# > a + b = c ==> > a + b = c
-# > @end example > </PRE>
-{
- local ($block,$pre) = @_;
- local ($started_at);
-
- $started_at = $start_index;
-
- &printHTML("$paragraph_end") if $in_paragraph;
- $in_paragraph = 0;
-
- if ($pre eq '>PRE') {
- &printHTML("<DL><DT><DD>\n<PRE>\n");
- } else {
- &printHTML("<$pre>\n") unless ($pre eq '-');
- }
- $in_preformatted = $block;
- while ($texinfo_index < @texinfo) {
- &get_more_stuff_to_parse();
- if (/^\@end\s+$block/) {
- if ($pre eq 'HR') {
- &printHTML("</HR>\n");
- } elsif ($pre eq '>PRE') {
- &printHTML("</PRE>\n</DL>\n");
- } else {
- &printHTML("</$pre>\n") unless ($pre eq '-');
- }
- $in_preformatted = 0;
- return;
- }
- &parse();
- }
- print "**ERROR** reached EOF while searching for end of the \@$block "
- . "block that started on $origin[$started_at]\n";
-} # parse_block
-
-########################################################################
-sub parse_def
-# $_ contains a @def* command
-{
- local ($def) = @_;
- local ($started_at,$in_dd);
-
- $started_at = $start_index;
-
- &printHTML("$paragraph_end") if $in_paragraph;
- $in_paragraph = 0;
-
- &printHTML("<DL>\n");
-
- &printdef();
-
- while ($texinfo_index < @texinfo) {
- &get_more_stuff_to_parse();
- if (/^\@end\s+$def/) {
- &printHTML("</DL>\n");
- $in_paragraph = 0;
- return;
- }
- if (s/^(\@def\w+)x\s/$1 /) {&printdef();}
- else {
- unless ($in_dd) {
- &printHTML("<DD>\n");
- ++$in_dd;
- $in_paragraph = 1;
- $paragraph_end = "\n";
- }
- &parse();
- }
- }
- print "**ERROR** reached EOF while searching for end of the $def "
- . "definition that started on $origin[$started_at]\n";
-
-} # parse_def
-sub printdef
-{
-
- s/\@defun(x?)\s/\@deffn Function /
- || s/\@defmac(x?)\s/\@deffn Macro /
- || s/\@defspec(x?)\s/\@deffn \{Special Form\} /
- || s/\@defvar(x?)\s/\@defvr Variable /
- || s/\@defopt(x?)\s/\@defvr \{User Option\} /
- || s/\@deftypefun(x?)\s/\@deftypefn Function /
- || s/\@deftypevar(x?)\s/\@deftypefn Variable /
- || s/\@defivar(x?)\s/\@defcv \{Instance Variable\} /
- || s/\@defmethod(x?)\s/\@defop Method /;
- s/(\@\w+)x\s/$1 /;
-
- @words = split;
-
- $i = 1;
- $category = $words[$i++];
- while ($i < @words && $category =~ /^\{[^}]*$/) {
- $category .= ' ' . $words[$i++];
- }
- if ($i>=@words) {
- print "def error at $origin{$started_at}\n";
- }
- $category =~ s/^\{//;
- $category =~ s/\}$//;
-
- &printHTML("<DT>$category: ");
-
- if ($words[0] eq '@deftypefn' || $words[0] eq '@deftypevr'
- || $words[0] eq '@defcv' || $words[0] eq '@defop') {
- if ($words[$i] =~ s/^\{//) {
- &printHTML("<VAR>");
- until ($words[$i] =~ s/\}$//) {&printHTML("$words[$i++]");}
- &printHTML("$words[$i++]</VAR> ");
- } else {
- &printHTML("<VAR>$words[$i++]</VAR> ");
- }
- $words[0] =~ /.*([a-z][a-z])/;
- $_ = "\@" . $1 . "index " . $words[$i];
- &process_index;
- }
- &printHTML("<STRONG>$words[$i++]</STRONG>\n<VAR>");
-
- while ($i < @words) {&printHTML(" $words[$i++]");}
- &printHTML("</VAR>\n");
-
-} # printdef
-
-########################################################################
-sub parse_enumerate
-# $_ is `@enumerate'. Note that @enumerate with an arg (`@enumerate 3',
-# for example) is kinda funky due to HTML limitations.
-{
- local ($count,$started_at);
-
- $started_at = $start_index;
-
- &printHTML("$paragraph_end") if $in_paragraph;
- $in_paragraph = 0;
-
- if (/^\@enumerate\s*(\S+)/) {$count = $1;}
-
- &printHTML("<" . ($count ? "UL" : "OL") . ">\n");
-
- while ($texinfo_index < @texinfo) {
- &get_more_stuff_to_parse();
- if (/^\@end\s+enumerate/) {
- &printHTML("</" . ($count ? "UL" : "OL") . ">\n");
- return;
- }
- if (/^\@item\s+(.*)/ || /^\@item()$/) {
- if ($count) {
- &printHTML("<LI>$count: $1\n");
- ++$count;
- } else {
- &printHTML("<LI>$1\n");
- }
- $in_paragraph = 1;
- $paragraph_end = "\n";
- } else {
- &parse();
- }
- }
- print "**ERROR** reached EOF while searching for end of the \@enumerate "
- . "that started on $origin[$started_at]\n";
-} # parse_enumerate
-
-########################################################################
-sub parse_flush
-{
- local ($started_at,$flush);
-
- /^\@(\w+)\s/;
- $flush = $1;
- $started_at = $start_index;
-
- &printHTML("$paragraph_end") if $in_paragraph;
- $in_paragraph = 0;
-
- while ($texinfo_index < @texinfo) {
- &get_more_stuff_to_parse();
- if (/^\@end\s+$flush/) {
- return;
- }
- &parse();
- }
- print "**ERROR** reached EOF while searching for end of the $flush "
- . "that started on $origin[$started_at]\n";
-
-
-} # parse_flush
-
-########################################################################
-sub parse_itemize
-# $_ is `@itemize'. Due to HTML limitation, `@itemize @bullet' comes
-# out the same as `@itemize @minus'.
-{
- local ($started_at);
-
- $started_at = $start_index;
-
- &printHTML("$paragraph_end") if $in_paragraph;
- $in_paragraph = 0;
-
- &printHTML("<UL>\n");
-
-
- while ($texinfo_index < @texinfo) {
- &get_more_stuff_to_parse();
- if (/^\@end\s+itemize/) {
- &printHTML("</UL>\n");
- return;
- }
- if (/^\@item\s+(.*)/ || /^\@item()$/) {
- &printHTML("<LI>$1\n");
- $in_paragraph = 1;
- $paragraph_end = "\n";
- } else {
- &parse();
- }
- }
- print "**ERROR** reached EOF while searching for end of the itemize "
- . "that started on $origin[$started_at]\n";
-} # parse_itemize
-
-########################################################################
-sub parse_menu
-{
- local ($started_at);
-
- $started_at = $start_index;
-
- &printHTML("$paragraph_end") if $in_paragraph;
- $in_paragraph = 0;
-
- &printHTML("<MENU>\n");
-
- while ($texinfo_index < @texinfo) {
- &get_more_stuff_to_parse();
- if (/^\@end\s+menu/) {
- &printHTML("</MENU>\n");
- return;
- }
-
- # Like ` * menu-item:: description of item'
- if (/^\s*\*\s*([^:]*)\s*::\s*(.*)$/) {
- &printHTML("$paragraph_end") if $in_paragraph;
- $in_paragraph = 0;
- $node = &canonical($1);
- &printHTML("<LI><A HREF=\"$node\">$1</A>\n");
- &printHTML("$2\n") if $2;
- # Like ` * menu-item: cross-reference. description of item'
- } elsif (/^\s*\*\s*([^:]*)\s*:([^.]*)\.\s*(.*)$/) {
- &printHTML("$paragraph_end") if $in_paragraph;
- $in_paragraph = 0;
- $node = &canonical($2);
- &printHTML("<LI><A HREF=\"$node\">$1</A>\n");
- &printHTML("$3\n");
- } elsif (/^\@/) {
- print "**WARNING** Don\'t know how to process \`$_\' inside "
- . "a menu!\n";
- } else {
- if (/^\s*$/ && !$in_paragraph) {
- &printHTML("<P>");
- $in_paragraph = "1";
- $paragraph_end = "</P>\n";
- }
- &printHTML("$_");
- }
- }
- print "**ERROR** reached EOF while searching for end of the menu "
- . "that started on $origin[$started_at]\n";
-} # parse_menu
-
-########################################################################
-sub parse_table
-# $_ is `@itemize'. Due to HTML limitation, `@itemize @bullet' comes
-# out the same as `@itemize @minus'.
-{
- local ($table,$ttype,$after_DT,$started_at,$first_para);
- ($table,$ttype) = @_;
-
- $started_at = $start_index;
-
- &printHTML("$paragraph_end") if $in_paragraph;
- $in_paragraph = 0;
-
- &printHTML("<DL>\n");
-
- while ($texinfo_index < @texinfo) {
- &get_more_stuff_to_parse();
- if (/^\@end\s+$table/) {
- &printHTML("</DL>\n");
- return;
- }
- if (/^\@item(x?)\s+(.*)/ || /^\@item(x?)()$/) {
- $atarg = $2;
- if ($ttype) {
- if ($ttype =~ /(.+),(.+),(.+)/) {
- $left = $1; $z = $2; $right = $3;
- } else {
- $left = ''; $z = $ttype; $right = '';
- }
- if ($z =~ s/^\^//) {$atarg =~ tr/a-z/A-Z/;}
- &printHTML("<DT>$left<$z>$atarg</$z>$right\n");
- } else {
- &printHTML("<DT>$2\n");
- }
- $item = $2;
- if ($item && $table =~ /([fv])table/) {
- $_ = "\@" . $1 . "index " . $item;
- &process_index;
- }
- $after_DT = 1;
- } else {
- if ($after_DT) {
- &printHTML("<DD>\n");
- $in_paragraph = 1;
- $paragraph_end = "\n";
- $after_DT = 0;
- $first_para = 1;
- }
- unless ($first_para && /^\s*$/) {
- $first_para = 0;
- &parse();
- }
- }
- }
- print "**ERROR** reached EOF while searching for end of the table "
- . "that started on $origin[$started_at]\n";
-} # parse_table
-
-########################################################################
-sub print_index
-{
- local ($index) = @_;
- $index = $index_name{$index};
-
- eval "\@keys = keys \%$index";
-
- &printHTML("<MENU>\n");
- foreach $item (sort texinfo_sort @keys) {
- eval "\$val = \$$index\{\$item\}";
- &printHTML("<LI>$val\n");
- }
- &printHTML("</MENU>\n");
-} # print_index
-
-sub texinfo_sort
-{
- $x = $a; $x =~ s/<[^>]*>//g; $x =~ tr/A-Z/a-z/;
- $y = $b; $y =~ s/<[^>]*>//g; $y =~ tr/A-Z/a-z/;
- $x cmp $y;
-} # texinfo_sort
-
-########################################################################
-sub process_index
-#
-# For example, `@cindex whatever' generates an entry in %cpindex
-#
-{
- s/\@cindex/\@cpindex/ || s/\@findex/\@fnindex/
- || s/\@vindex/\@vrindex/ || s/\@kindex/\@kyindex/
- || s/\@pindex/\@pgindex/ || s/\@tindex/\@tpindex/;
-
- /\@(..)index\s+(.*)/;
-
- if ($x=$index_style{$1}) {
- $entry = "<A HREF=\"$cthis\"><$x>$2</$x></A>";
- } else {
- $entry = "<A HREF=\"$cthis\">$2</A>";
- }
-
- print "*** \$$index_name{$1}\{$2\} = $entry\n" if $debug{'index'};
- eval "\$$index_name{$1}\{\$2\} = \$entry";
-} # process_index
-
-########################################################################
-sub print_arrows
-{
- &printHTML("<LINK REL=\"Precedes\" HREF=\"$cnext\">\n") if $next;
- &printHTML("<LINK REV=\"Precedes\" HREF=\"$cprev\">\n") if $prev;
- &printHTML("<LINK REV=\"Subdocument\" HREF=\"$cup\">\n") if $up;
- &printHTML("<LINK REV=\"Library\" HREF=\"$dirfile\">\n") if $dirfile;
- &printHTML("</HEAD><BODY><P>\n");
- if ($cprev) {
- &printHTML("<A HREF=\"$cprev\"><IMG ALIGN=MIDDLE "
- . "SRC=\"$icons/prev-arrow.gif\" ALT=\"PREV\"></A>\n");
- } else {
- &printHTML("<A><IMG ALIGN=MIDDLE "
- . "SRC=\"$icons/missing-arrow.gif\" ALT=\"prev\"></A>\n");
- }
- if ($cup) {
- &printHTML("<A HREF=\"$cup\"> <IMG ALIGN=MIDDLE "
- . "SRC=\"$icons/up-arrow.gif\" ALT=\"UP\"></A>\n");
- } else {
- &printHTML("<A><IMG ALIGN=MIDDLE "
- . "SRC=\"$icons/missing-arrow.gif\" ALT=\"up\"></A>\n");
- }
- if ($cnext) {
- &printHTML("<A HREF=\"$cnext\"><IMG ALIGN=MIDDLE "
- . "SRC=\"$icons/next-arrow.gif\" ALT=\"NEXT\"></A>\n");
- } else {
- &printHTML("<A><IMG ALIGN=MIDDLE "
- . "SRC=\"$icons/missing-arrow.gif\" ALT=\"next\"></A>\n");
- }
- if ($dirfile) {
-# XXX need new graphic for this one
- &printHTML("<A HREF=\"$dirfile\"> <IMG ALIGN=MIDDLE "
- . "SRC=\"$icons/dir-arrow.gif\" ALT=\"Bookshelf\"></A>\n");
- } else {
- &printHTML("<A><IMG ALIGN=MIDDLE "
- . "SRC=\"$icons/missing-arrow.gif\" ALT=\"Bookshelf\"></A>\n");
- }
- &printHTML("<CITE>$title</CITE>") if $title;
-}
-
-########################################################################
-sub process_node
-# On entry, $_ is an @node line.
-{
- s/^\@node\s+//;
- ($this,$next,$prev,$up) = split(/,/);
-
- &deduce_node_links() unless ($next || $prev || $up);
-
- &terminate_node();
-
- $cthis = &canonical($this);
- $cnext = &canonical($next);
- $cprev = &canonical($prev);
- $cup = &canonical($up);
-
- print "... opening $dir$cthis ...\n" if $debug{nodes};
- open(HTML,">$dir/$cthis") || die "Couldn't open $dir$cthis -- $!\n";
-
- $nfootnotes = 0;
-
- &printHTML("<HTML>\n");
- &printHTML("<!-- created $today from " .
- $origin[$start_index] . " via texi2www -->\n");
- &print_header if $header;
- &printHTML("<HEAD>\n<TITLE>$this</TITLE>\n");
- &print_arrows;
- &printHTML("</P>\n");
-
-} # process_node
-
-sub terminate_node
-{
- if ($nfootnotes) {
- &printHTML("<P><HR>\n");
- for ($n=0; $n < $nfootnotes; ++$n) {
- &printHTML("<P>\[" . ($n+1) . "\] $footnote[$n]</P>\n");
- }
- }
-
-
- &printHTML("<P><HR>\n");
- &print_arrows;
- &printHTML("</P>\n");
- &print_footer if $footer;
- &printHTML("</BODY></HTML>\n");
- close (HTML);
-}
-
-########################################################################
-sub process_section
-#
-# On entry:
-# $_ is the section command (I.e. `@chapter Overview')
-# $i is the index to $_ in @lines
-{
- &printHTML("$paragraph_end") if $in_paragraph;
- $in_paragraph = 0;
-
- /^\@(\w+)\s+(.*)/;
-
- $section_number = '';
- if ($1 eq 'chapter') {
- ++$chapter; $section=$subsection=$subsubsection=0;
- $section_number = "Chapter $chapter: ";
- } elsif ($1 eq 'section') {
- ++$section; $subsection=$subsubsection=0;
- $section_number = "$chapter.$section: ";
- } elsif ($1 eq 'subsection') {
- ++$subsection; $subsubsection=0;
- $section_number = "$chapter.$section.$subsection: ";
- } elsif ($1 eq 'subsubsection') {
- ++$subsubsection;
- $section_number = "$chapter.$section.$subsection.$subsubsection: ";
- } elsif ($1 eq 'appendix') {
- ++$appendix; $section=$subsection=$subsubsection=0;
- $x = ('A'..'Z')[$appendix-1];
- $section_number = "Appendix $x: ";
- } elsif ($1 eq 'appendixsec') {
- ++$section; $subsection=$subsubsection=0;
- $x = ('A'..'Z')[$appendix-1];
- $section_number = "$x.$section: ";
- } elsif ($1 eq 'appendixsubsec') {
- ++$subsection; $subsubsection=0;
- $x = ('A'..'Z')[$appendix-1];
- $section_number = "$x.$section.$subsection: ";
- } elsif ($1 eq 'appendixsubsubsec') {
- ++$subsubsection;
- $x = ('A'..'Z')[$appendix-1];
- $section_number = "$x.$section.$subsection.$subsubsection: ";
- }
-
- $x = $directive_section{$1};
- &printHTML("<H$x>$section_number$2</H$x>\n");
-} # process_section
-
-########################################################################
-sub process_synindex
-#
-# There's perhaps a bug here -- this presumes the @synindex comes before
-# any @?index directives; anything already in <from> doesn't get merged
-# into <to>!
-#
-{
- local ($code) = @_; # Either 0 or 1; 1 means @syncodeindex
-
- /\@syn\w*index\s+(\w+)\s+(\w+)/;
-
- print "*** synindex $1 $2\n" if $debug{'index'};
-
- $index_name{$1} = $2 . "index";
- $index_style{$1} = 'CODE' if $code;
-} # process_synindex
-
-########################################################################
-sub printHTML
-{
- local ($line) = @_;
- $line =~ s/\$R/\}/g;
- $line =~ s/\$L/\{/g;
- $line =~ s/\$A/\@/g;
- $line =~ s/\$D/\$/g;
- if ($debug{printHTML}) {
- print $line;
- } else {
- print HTML $line;
- }
-} # printHTML
-
-########################################################################
-sub print_header
-{
- unless (open(HEADER,$header)) {
- print "WARNING -- couldn't open header file \"$header\" -- $!\n";
- $header = 0;
- return;
- }
- while (<HEADER>) {
- &printHTML($_);
- }
- close(HEADER);
-}
-
-########################################################################
-sub print_footer
-{
- unless (open(FOOTER,$footer)) {
- print "WARNING -- couldn't open footer file \"$footer\" -- $!\n";
- $footer = 0;
- return;
- }
- while (<FOOTER>) {
- &printHTML($_);
- }
- close(FOOTER);
-}
-
-########################################################################
-sub read_input
-#
-# Read the texinfo source into @texinfo. Don't copy comments or the
-# `@ifxxx' and `@end ifxxx' surrounding [or the contents of] conditional
-# blocks. Read `@include' files.
-{
- local ($echo,$terminator_re,$started_at) = @_;
-
- while (&texinfo_read()) {
-
- next if (/^\@c$/ || /^\@c\s/ || /^\@comment/);
-
- if (/^\@ifinfo/) {
- &read_input($echo,'/^\@end\s+ifinfo/',
- "$texinfo_file[0] line $.");
- next;
- }
- if (/^\@ifhtml/) {
- &read_input($echo,'/^\@end\s+ifhtml/',
- "$texinfo_file[0] line $.");
- next;
- }
- if (/^\@iftex/) {
- &read_input(0,'/^\@end\s+iftex/',
- "$texinfo_file[0] line $.");
- next;
- }
- if (/^\@tex/) {
- &read_input(0,'/^\@end\s+tex/',
- "$texinfo_file[0] line $.");
- next;
- }
- if (/^\@ignore/) {
- # @ignore doesn't nest
- $ignore_from = "$texinfo_file[0] line $.";
- while (&texinfo_read()) {
- last if (/^\@end\s+ignore/);
- }
- unless (/^\@end\s+ignore/) {
- print "Unexpected EOF while searching from $ignore_from "
- . "for \'\@end ignore\'\n";
- }
- next;
- }
- if (/^\@titlepage/) {
- &read_input(0,'/^\@end\s+titlepage/',"$texinfo_file[0] line $.");
- next;
- }
-
- if (/^\@ifclear\s+(\S+)/) {
- &read_input($echo&&(!defined($set{$1})),'/^\@end\s+ifclear/',
- "$texinfo_file[0] line $.");
- next;
- }
- if (/^\@ifset\s+(\S+)/) {
- &read_input($echo&&defined($set{$1}),'/^\@end\s+ifset/',
- "$texinfo_file[0] line $.");
- next;
- }
-
- return if eval "$terminator_re";
-
- if (/^\@include\s+(\S+)/) {
- &open_input_file($1);
- next;
- }
-
- if (/^\@(set|clear)\s+(\S+)/) {
- if ($1 eq "set") {
- $set{$2} = 1;
- } else {
- undef($set{$2});
- }
- }
-
- next unless $echo;
-
- if (/^\@(\w+)/) {next if $ignore_these_directives{$1};}
-
- # Hide @@, @{, and @} so later on it'll be easier to process
- # stuff like `@code{@@TeX@{@}}'.
- s/\$/\$D/g; s/\@\@/\$A/g; s/\@{/\$L/g; s/\@}/\$R/g;
-
- # Convert the HTML special characters
- s/\&/\&amp;/g; s/\</\&lt;/g; s/\>/\&gt;/g; s/\"/\&quot;/g;
-
- $texinfo[$ntexinfo] = $_;
- $origin[$ntexinfo] = "$texinfo_file[0] line $.";
- ++$ntexinfo;
- }
-
- print "Unexpected EOF while searching from $started_at "
- . "for $terminator_re\n";
-} # read_input
-
-########################################################################
-sub initialize_tables
-{
- # Lists which `@x{y}' get expanded into `y'.
- %atxy_2_y = (
- 'asis', 1,
- 'r', 1,
- 'w', 1,
- );
-
- # Describes which `@x{y}' get expanded into `<z>y</z>' and what `z'
- # is in those expansions! (If the expansion matches
- # ``/(.*),(.*),(.*)/'' then y actually expands to ``$1<$2>y</$2>$3'';
- # if z (or $2) begins with ^ then uppercase y before doing the
- # expansion).
- %atxy_2_zyz= (
- 'b', 'STRONG',
- 'cite', 'CITE',
- 'code', "CODE",
- 'dfn', 'EM',
- 'dmn', 'EM',
- 'emph', 'EM',
- 'file', "`,CODE,'",
- 'i', 'EM',
- 'kbd', 'KBD',
- 'key', '^CODE',
- 'math', 'CODE',
- 'samp', "`,CODE,'",
- 'sc', '^EM',
- 'strong', 'STRONG',
- 't', 'CODE',
- 'titlefont', 'CITE',
- 'var', 'VAR',
- );
-
- # Describes which `@x{y}' can be expanded into `z' and what `z' is in
- # those expansions!
- %atxy_2_z = (
- 'TeX', '<i>T</i>e<i>X</i>',
- 'bullet', '*',
- 'copyright', '(C)',
- 'dots', '...',
- 'equiv', '==',
- 'error', 'error-->',
- 'expansion', '==>',
- 'minus', '-',
- 'point', '-!-',
- 'print', '-|',
- 'result', '=>',
- 'today', &today(),
- );
-
- # Lists the '@x{y}' cross reference commands, and describes how they get
- # expanded. Note the 'X' beginning each expansion -- it's there so 'ref'
- # doesn't get expanded to ''!
- %atxy_2_ref = (
- 'xref', 'XSee ',
- 'ref', 'X',
- 'pxref', 'Xsee ',
- 'href', 'X',
- 'uref', 'X',
- 'email', 'X',
- 'inforef', 'XSee ',
- );
-
- %ignore_these_directives = (
- 'author', 1,
- 'break', 1,
- 'contents', 1,
- 'evenfooting', 1,
- 'everyfooting', 1,
- 'everyheading', 1,
- 'finalout', 1,
- 'footnotestyle', 1,
- 'headings', 1,
- 'need', 1,
- 'noindent', 1,
- 'oddfooting', 1,
- 'page', 1,
- 'paragraphindent', 1,
- 'setchapternewpage', 1,
- 'setfilename', 1,
- 'shortcontents', 1,
- 'shorttitlepage', 1,
- 'smallbook', 1,
- 'sp', 1,
- 'subtitle', 1,
- 'summarycontents', 1,
- 'top', 1,
- 'vskip', 1,
- );
-
- # List the section directives and indicate what heading level
- # each one gets.
- %directive_section = (
- 'chapter', 1,
- 'section', 2,
- 'subsection', 3,
- 'subsubsection',4,
- 'appendix', 1,
- 'appendixsec', 2,
- 'appendixsubsec', 3,
- 'appendixsubsubsec', 4,
- 'chapheading', 1,
- 'majorheading', 1,
- 'heading', 2,
- 'subheading', 3,
- 'subsubheading', 4,
- 'unnumbered', 1,
- 'unnumberedsec', 2,
- 'unnumberedsubsec', 3,
- 'unnumberedsubsubsec', 4,
- );
-
- # These @ directives begin a block of preformatted text
- # (">PRE" means indented inside <PRE>...</PRE>)
- %directive_block = (
- 'cartouche', 'HR',
- 'display', '>PRE',
- 'example', '>PRE',
- 'format', 'PRE',
- 'group', '-',
- 'lisp', '>PRE',
- 'quotation', 'BLOCKQUOTE',
- 'smallexample','>PRE',
- );
-
- %index_name = (
- 'cp', 'cpindex',
- 'fn', 'fnindex',
- 'ky', 'kyindex',
- 'pg', 'pgindex',
- 'tp', 'tpindex',
- 'vr', 'vrindex',
- );
- %index_style = (
- 'fn', 'CODE',
- 'ky', 'CODE',
- 'pg', 'CODE',
- 'tp', 'CODE',
- 'vr', 'CODE',
- );
-} # initialize_tables
-
-########################################################################
-sub open_input_file
-{
- unshift(@texinfo_file,$_[0]);
- print "opening $_[0] ...\n" if $debug{open_input_file};
- open($texinfo_file[0],$_[0]) || die "Couldn't open $_[0]: $!\n";
-} # open_input_file
-
-########################################################################
-sub texinfo_read
-# Reads the next line of texinfo input into $_.
-{
- do {
- $fd = $texinfo_file[0];
- $_ = <$fd>;
- } while ($_ eq '' && shift @texinfo_file);
- return $_;
-} # texinfo_read
-
-########################################################################
-sub today
-{
- $today = `date`;
- $today =~ s/\w+ (\w+ +[0-9]+) [0-9]+:[0-9]+:[0-9]+ \w+ ([0-9]+)\n/$1 $2/;
- $today =~ s/ +/ /g;
- return $today;
-} # today
-
-########################################################################
-sub copy_to_destdir
-{
- ($copy_from) = @_;
-
- if ($copy_from =~ m|(.*)/([^/]*)|) {
- $copy_from_dir = $1;
- $copy_from_file = $2;
- } else {
- $copy_from_dir = ".";
- $copy_from_file = $copy_from;
- }
-
- if ($copy_from_dir ne $dir && !-e "$dir/$copy_from_file") {
- system("cp $copy_from $dir")
- && die "Couldn\'t \`cp $copy_from $dir\'\n";
- }
-}
diff --git a/doc/tools/texi2www/texi2www.texi b/doc/tools/texi2www/texi2www.texi
deleted file mode 100644
index 753f64abb3..0000000000
--- a/doc/tools/texi2www/texi2www.texi
+++ /dev/null
@@ -1,707 +0,0 @@
-\input texinfo @c -*-texinfo-*-
-
-@comment %**start of header
-@setfilename texi2www
-@settitle texi2www user's guide
-@comment %**end of header
-
-@finalout
-
-@titlepage
-@title texi2www
-@author Tim Singletary
-@end titlepage
-
-@iftex
-@everyfooting @| Jan 2 1996
-@end iftex
-
-@comment ******************************************************** TOP
-@node Top,,,(dir)
-@ifhtml
-This document describes @var{texi2www}, a utility for converting
-texinfo to HTML.
-
-This document provides a pretty good example of @var{texi2www}'s texinfo
-to HTML conversion. @href{Click here,,,texi2wwwdoc.texi.txt} to view
-the texinfo source to this document.
-@end ifhtml
-
-@menu
-* Overview:: What is texi2www? texinfo? HTML? mosaic? WWW?
-* Real life:: A real-life example using texi2www
-* Invocation:: Command line args, etc.
-* Extensions:: @@ commands not in GNU texinfo
-* Known Bugs:: Oops!
-* Demo:: What various things look like
-
-* texi2dvi::
-
-* Index::
-@end menu
-
-@ifhtml
-@today{}.
-@end ifhtml
-
-
-@comment **************************************************** CHAPTER
-@node Overview
-@unnumbered Overview
-@cindex What is HTML
-@cindex What is texinfo
-@cindex What is mosaic
-@cindex texi2html
-@cindex info2html
-@cindex Other texinfo to HTML converters
-
-@var{Texi2www} converts texinfo to HTML:
-
-@table @asis
-@item
-@table @asis
-@item texinfo
-A documentation system that uses a single source file to produce both
-on-line documentation and printed output. For details see
-@ref{Top,the Texinfo User's Guide,Overview,texinfo,The Texinfo User's Guide}.
-@item HTML
-@href{HyperText Markup Language,,,
-http://www.ncsa.uiuc.edu/General/Internet/WWW/HTMLPrimer.html}
-used in World Wide Web documents. Programs like mosaic
-understand HTML.
-@end table
-@end table
-
-Texinfo's on-line documentation viewers (emacs, info, xinfo, etc.) are
-quite limited when compared to mosaic. Mosaic supports multiple fonts,
-variable width fonts, embedded images, and hypertext links to anywhere
-(not just to other texinfo documents). In addition, mosaic keeps a
-history of nodes visited and can easily go back to previously visited
-nodes.
-
-@var{Texinfo} converts @var{texinfo} directly to @var{HTML} without
-going through an intermediate @var{info} conversion.
-
-Other @var{texinfo} to @var{HTML} converters include:
-
-@table @asis
-@item
-@href{@var{http://wwwcn.cern.ch/dci/texi2html/},,,
- http://wwwcn.cern.ch/dci/texi2html/}; and
-@item
-@href{@var{http://www.ericsson.nl/info2www/info2www.html},,,
- http://www.ericsson.nl/info2www/info2www.html}
-@end table
-
-Texi2html is very good, but is different from texi2www in several respects,
-including:
-
-@itemize
-@item Texi2www processes @@ifinfo blocks, whereas texi2html processes
- @@iftex blocks.
-@item Texi2www always generates menus, whereas menu generation is
- optional in texi2html.
-@item Texi2www generates a seperate document for each node, wherease
- texi2html can combine several nodes into one document.
-@item Texi2www adds @href{@code{@@ifhtml} blocks,ifhtml blocks},
- @href{@code{@@html} blocks,html blocks}, and @href{@code{@@href@{@}},
- href}. Texi2html has @code{@@ifhtml} blocks, but they work like
- texi2www's @code{@@html} blocks.
-@item Texi2www uses icons for the prev, up, and next links; texi2html
- doesn't.
-@end itemize
-
-Texi2www is written in perl and may be used and distributed under the
-terms of the @href{GNU General Public License,Copying,emacs}.
-
-Texi2www was written by
-@href{Tim Singletary,,,
-http://sunland.gsfc.nasa.gov/personnel/aam/singletary.html}
-(@cite{tsingle@@sunland.gsfc.nasa.gov}) and is available at
-@href{@var{ftp://sunland.gsfc.nasa.gov/pub/tarfiles/texi2www.tgz},,,
-ftp://sunland.gsfc.nasa.gov/pub/tarfiles/texi2www.tgz}.
-
-@comment **************************************************** CHAPTER
-@node Real life
-@chapter A Real Life Example
-
-Here's how I used texi2www to set up a
-@href{directory of texinfo documents,,,
- http://sunland.gsfc.nasa.gov/info/dir.html}.
-This discussion is the minimum I had to do to set up
-@href{texinfo,,,http://sunland.gsfc.nasa.gov/info/texinfo/Top.html} and
-texi2www.
-First, I created the directory ``@var{$HTDOCS/info}'' (@var{$HTDOCS} is
-the root directory of my web server).
-
-Then, I copied arrow icons ``@var{missing-arrow.gif}'',
-``@var{next-arrow.gif}'', ``@var{prev-arrow.gif}'', and
-``@var{up-arrow.gif}'' into ``@var{$HTDOCS/info}''.
-(I obtained my icons from
-@cite{Rutgers University Network Services} at
-@href{http://ns2.rutgers.edu/doc-images/buttons,,,
- http://ns2.rutgers.edu/doc-images/buttons}.)
-
-Next, I created subdirectories ``@var{$HTDOCS/info/texinfo}'' and
-``@var{$HTDOCS/info/texi2wwwdoc}''.
-(I determined the names of these subdirectories by examining the
-``@var{@@setfilename}'' line in the texinfo files.
-files; @var{texi2wwwdoc.texi} contains the line
-``@var{@@setfilename texi2wwwdoc.info}'' and @var{texinfo.texi} contains
-``@var{@@setfilename texinfo.info}''.
-
-Next, I copied the texinfo files into the appropriate directories. This
-step isn't strictly required, but I think its a good idea since it makes
-it simple to keep track of which texinfo files generated which set of
-html documents.
-
-Then I generated the html documents. I used the commands:
-@example
-> cd $HTDOCS/info/texinfo
-> texi2www texinfo.texi
-Normal completion.
-> cd ../texi2wwwdoc
-> texi2www texi2wwwdoc.texi
-Normal completion.
-@end example
-Examing these directories shows that a bunch of @var{.html} files got
-generated, including, in each directory, ``@var{Top.html}''.
-
-Finally, I created a table of contents file
-``@var{$HTDOCS/info/dir.html}''. The first version of that file looked
-like:
-
-@example
-<HTML>
-<HEAD><TITLE>info directory table of contents</TITLE></HEAD>
-<BODY>
-<MENU>
-<LI><A HREF="texinfo/Top.html">texinfo</A>
- GNU texinfo version 3.1
-<LI><A HREF="texi2wwwdoc/Top.html">texi2www</A>
- Converts texinfo to html
-</MENU>
-</BODY></HTML>
-@end example
-
-@comment **************************************************** CHAPTER
-@node Invocation
-@chapter Invocation
-@cindex Command line options
-@cindex Obtaining gif files
-
-@unnumberedsec Synopsys
-
-@code{texi2www [options] texinfo-file}
-
-@unnumberedsec Options
-@table @asis
-
-@item @code{-dir} @var{path}
- Specifies the path to the directory where the
- generated files get placed. If not specified, the current
- directory is assumed.
-
-@item @code{-footer} @var{file}
- Specifies a file whose contents get
- appended at the bottom of each generated HTML file. Typically
- looks something like:
-
-@example
-<HR>
-<P>Back to our <A HREF="../../homepage.html">home page</A>.</P>
-@end example
-
-@item @code{-icons} @var{path}
- Specifies the path (relative to the directory where the generated
- files get placed) to the arrow files. If not specified, @file{..}
- is assumed. The names of the arrow
- files are @file{up_arrow.gif}, @file{left_arrow.gif},
- @file{right_arrow.gif}, and @file{missing_arrow.gif}
-
-@end table
-
-@unnumberedsec Directory structure
-
-Texi2www will generate a set of HTML files from each texinfo document;
-each set of HTML files must go in a seperate directory (why? one reason
-is because each set includes a file named @code{Top.html}!).
-
-These directories should be subdirectories of the same base directory.
-Assume the base directory is @code{$TEXIBASE}. Then HTML files for
-emacs go in directory @code{$TEXIBASE/emacs}, HTML files for texinfo go
-in @code{$TEXIBASE/texinfo}, etc, where the name of the subdirectory is
-the same as the name of the info file (so cross references between
-documents will work).
-
-In addition to the subdirectories of HTML files, @code{$TEXIBASE}
-contains a file @code{dir.html} and the four arrow gif files
-@code{up_arrow.gif}, @code{left_arrow.gif}, @code{right_arrow.gif}, and
-@code{missing_arrow.gif}.
-
-@code{$TEXIBASE/dir.html} is typically just a menu of links to the
-subdirectories and can be as simple as
-
-@example
-<HTML><HEAD><TITLE>dir</TITLE></HEAD>
-<BODY>
-<MENU>
-<LI><A HREF="emacs/Top.html">emacs</A>
-<LI><A HREF="texinfo/Top.html">texinfo</A>
-</MENU>
-</BODY></HTML>
-@end example
-
-(@code{$TEXIBASE/dir.html} is not generated via texi2www and must be
-created by hand).
-
-
-
-@comment **************************************************** CHAPTER
-@node Extensions
-@chapter Extensions
-@ifhtml
-Texi2www understands the following extensions to pure texinfo:
-@end ifhtml
-@menu
-* ifhtml blocks:: @code{@@ifhtml} and @code{@@end ifhtml}
-* html blocks:: @code{@@html} and @code{@@end html}
-* href:: @code{@@href@{text,node,file,URL@}}
-* gif:: @code{@@gif@{gif-file@}}
-@end menu
-
-@comment ******************************************************* NODE
-@comment Top -> Extensions ->
-@node ifhtml blocks
-@section @code{@@ifhtml} and @code{@@end ifhtml}
-@cindex Conditional HTML blocks
-
-@var{@@ifhtml} blocks are similar to @var{@@ifinfo} and @var{@@iftex}
-blocks. Lines between @var{@@ifhtml} and @var{@@end ifhtml} get
-processed when generating the hypertext manual but get ignored when
-generating the printed manual.
-
-@var{texinfo.tex} (in @var{/usr/local/lib/tex/macros} on my machine)
-needs to be modified in order to use @@ifhtml. I inserted
-@example
-\def\ifhtml@{\doignore@{ifhtml@}@}
-@end example
-after the @code{\def\ifinfo@{\doignore@{ifinfo@}@}} line (line
-596 ???).
-
-In most cases, it is better to use @var{@@ifinfo} than @var{@@ifhtml}.
-
-@comment ******************************************************* NODE
-@node html blocks
-@section @code{@@html} and @code{@@end html}
-@cindex Pure HTML blocks
-
-@var{@@html} blocks are similar to @var{@@tex} blocks; @var{@@html}
-blocks only get processed when generating HTML and lines within
-@var{@@html} blocks may contain HTML commands.
-
-@ifhtml
-For example,
-
-@example
-@@html
-produces <EM>&lt;EM&gt;</EM> in HTML is like @@var@{@@@@var@} in texinfo.
-@@end html
-@end example
-
-@html
-produces <EM>&lt;EM&gt;</EM> in HTML is like @var{@@var} in texinfo.
-@end html
-@end ifhtml
-
-@var{texinfo.tex} (in @var{/usr/local/lib/tex/macros} on my machine)
-needs to be modified in order to use @@ifhtml. I inserted
-@example
-\def\html@{\doignore@{html@}@}
-@end example
-after the @code{\def\ifinfo@{\doignore@{ifinfo@}@}} line (line
-596 ???).
-
-@comment ******************************************************* NODE
-@node href
-@section @code{@@href@{text,node,file,URL@}}
-
-Use @code{@@href@{text,node,file,URL@}} when you want a hypertext link in an
-HTML document and plain text everywhere else.
-
-@var{Text} is the text you want displayed in the document.
-@var{Node},@var{file}, and @var{URL} indicate what @var{text} is linked to.
-@var{Node} and @var{file} are a normal texinfo style node reference;
-@var{URL} is a HTML URL.
-One of @var{node} or @var{URL} must be specified (if both are specified,
-@var{URL} is used).
-
-The @href{texinfo source used to create this
-document,,,texi2wwwdoc.texi.txt} contains numerous examples of how
-@@href might be used.
-
-@var{texinfo.tex} (in @var{/usr/local/lib/tex/macros} on my machine)
-needs to be modified in order to use @@href@{@}. All I did was insert
-@example
-\def\href#1{\hrefX[#1,,,]}
-\def\hrefX[#1,#2,#3,#4]{#1}
-@end example
-before the @code{\def\pxref} line (line 3497 ???).
-
-@comment ******************************************************* NODE
-@node gif
-@section @code{@@gif@{@var{pict.gif}@}}
-
-This extension provides a method for inserting a gif file in both the
-html and printed document. For example, here are my arrow icons:
-@*
-prev: @gif{prev-arrow.gif},
-up: @gif{up-arrow.gif},
-and next: @gif{next-arrow.gif}
-
-@subsection @code{@@gif@{@}} and @var{texi2www}
-
-@var{texi2www} copies @var{pict.gif} to the destination directory.
-
-@subsection @code{@@gif@{@}} and @var{texi2dvi}
-
-@href{@var{texi2dvi},texi2dvi} converts @var{pict.gif} to a font and
-uses this font to insert the picture in the document. This conversion
-to a font requires that the pbmplus and bm2font utilities be installed on
-your system:
-
-@table @asis
-@item pbmplus
- A suite of utilities for manipulating images. @var{texi2dvi} uses
- @var{giftopnm}, @var{pnmscale}, @var{pnmnlfilt}, @var{ppmquant},
- and @var{ppmtogif}. These utilities can be obtained from
- @href{@code{
- <ftp://ftp.x.org/contrib/utilities/netpbm-1mar1994.tar.gz>},,,
- ftp://ftp.x.org/contrib/utilities/netpbm-1mar1994.tar.gz}.
-
-
-@item bm2font
- @var{bm2font} converts a bitmap images (including ``@code{.gif}''
- images) to a font that can be used in a @TeX{} document.
- @var{bm2font} can be obtained from
- @href{@code{<ftp://ftp.shsu.edu/tex-archive/graphics/bm2font.tar.gz>},,,
- ftp://ftp.shsu.edu/tex-archive/graphics/bm2font.tar.gz}.
-@end table
-
-@comment **************************************************** CHAPTER
-@node Known Bugs
-@chapter Known Bugs
-
-@enumerate
-
-@item The @href{@code{@@center},titlefont center sp,texinfo} command
- doesn't work since HTML doesn't support centering yet.
-
-@item The @href{@code{@@noindent},noindent,texinfo} and
- @href{@code{@@exdent},exdent,texinfo} commands don't work since
- HTML doesn't include any facility to control indentation.
-
-@item Mark specifications in the @href{@code{@@itemize},itemize,texinfo}
- command are ignored since HTML doesn't include any facility to
- specify the tag in itemized lists.
-
-@item The @href{emacs texinfo files need to be tweaked,
- problems with emacs} to work with @var{texi2www}.
-
-@item One @href{@code{@@gif},gif} command is allowed per line.
-
-@end enumerate
-
-@unnumberedsec Fixed Bugs
-
-@enumerate
-
-@item Previous versions didn't handle nested tables correctly. The
- @@item following an inner @@table would be drawn in the wrong
- font. @var{(tsingle, Jan 2 1996)}
-
-@item Previous versions didn't capitalize
- @href{@code{@@sc@{@}},Smallcaps,texinfo} text. (There's still
- the problem of HTML not supporting true smallcaps, however).
- @var{(tsingle, Sep 6 1995)}
-
-@item Previous versions of @var{texi2www} didn't correctly index
- @href{@code{@@ftable} and @code{@@vtable},ftable vtable,texinfo}
- items; this bug has been fixed! @var{(tsingle, Aug 17 1995)}
-
-@end enumerate
-
-@node problems with emacs
-@section emacs.texi @result{} HTML problems
-
-The file @var{man/commands.texi} distributed with GNU Emacs version
-version 19.25 contains, near the top of the file:
-
-@example
-@@c See file emacs.texi for copying conditions.
-@@iftex
-@@chapter Characters, Keys and Commands
-
- This chapter explains the character set used by Emacs for input commands
-and for the contents of files, and also explains the concepts of
-@@dfn@{keys@} and @@dfn@{commands@} which are necessary for understanding how
-your keyboard input is understood by Emacs.
-@@end iftex
-@@node User Input, Keys, Screen, Top
-@@section Keyboard Input
-@end example
-
-Texi2www doesn't see the @@chapter since it's inside an @@iftex block;
-this confuses texi2www's chapter numbering. My fix was to change this
-section to:
-
-@example
-@@c See file emacs.texi for copying conditions.
-@@node User Input, Keys, Screen, Top
-@@chapter Characters, Keys and Commands
-@@iftex
-
- This chapter explains the character set used by Emacs for input commands
-and for the contents of files, and also explains the concepts of
-@@dfn@{keys@} and @@dfn@{commands@} which are necessary for understanding how
-your keyboard input is understood by Emacs.
-@@end iftex
-@@section Keyboard Input
-@end example
-
-@var{killing.texi}, @var{misc.texi}, and @var{trouble.texi} have similar
-problems.
-
-@comment **************************************************** CHAPTER
-@node Demo
-@appendix Sample output
-
-This document itself is a pretty good example of what texi2www supports
-and produces. Following are some examples to really make things clear;
-to fully appreciate these examples compare the source and printed output
-to your html viewer.
-
-@menu
-* Fonts:: @@var@{@}, etc.
-* Glyphs:: @@result@{@}, etc.
-* Blocks:: @@example ... @@end example, etc.
-* Tables and Lists:: @@table .. @@end table, etc.
-@end menu
-
-@comment **************************************************** SECTION
-@node Fonts
-@unnumberedsec Text markup
-
-Texi2www supports:
-
-@table @asis
-
-@item @@b@{@var{bold text}@} @result{} @b{bold text}
-Here is @b{some text} in the @@b font.
-
-@item @@cite@{@var{reference}@} @result{} @cite{reference}
-Indicate the name of a book.
-Here is @cite{some text} in the @@cite font.
-
-@item @@code@{@var{sample-code}@} @result{} @code{sample-code}
-Indicate text that is a literal example of a piece of a program.
-Here is @code{some text} in the @@code font.
-
-@item @@dfn@{@var{term}@} @result{} @dfn{term}
-Indicate the introductory or defining use of a term.
-Here is @dfn{some text} in the @@dfn font.
-
-@item @@dmn@{@var{text}@} @result{} @dmn{text}
-Here is @dmn{some text} in the @@dmn font.
-
-@item @@emph@{@var{text}@} @result{} @emph{text}
-Here is @emph{some text} in the @@emph font.
-
-@item @@file@{@var{file-name}@} @result{} @file{file-name}
-Indicate the name of a file.
-Here is @file{some text} in the @@file font.
-
-@item @@i@{@var{italic text}@} @result{} @i{italic text}
-Here is @i{some text} in the @@i font.
-
-@item @@kbd@{@var{keyboard-characters}@} @result{} @kbd{keyboard-characters}
-Indicate keyboard input.
-Here is @kbd{some text} in the @@kbd font.
-
-@item @@key@{@var{key-name}@} @result{} @key{key-name}
-Indicate the conventional name for a key on a keyboard.
-Here is @key{some text} in the @@key font.
-
-@item @@math@{@var{ax^2+b}@} @result{} @math{ax^2+b}
-Here is @r{some text} in the @@math font.
-
-@item @@r@{@var{roman font text}@} @result{} @r{roman font text}
-Here is @r{some text} in the @@r font.
-
-@item @@samp@{@var{text}@} @result{} @samp{text}
-Indicate text that is a literal example of a sequence of characters.
-Here is @samp{some text} in the @@samp font.
-
-@item @@sc@{@var{text}@} @result{} @sc{text}
-Here is @sc{some text} in the @@sc font.
-
-@item @@strong@{@var{text}@} @result{} @strong{text}
-Here is @strong{some text} in the @@strong font.
-
-@item @@t@{@var{fixed-width text}@} @result{} @t{fixed-width text}
-Here is @t{some text} in the @@t font.
-
-@item @@titlefont@{@var{text}@} @result{} @titlefont{text}
-Here is @titlefont{some text} in the @@titlefont font.
-
-@item @@var@{@var{metasyntactic-variable}@} @result{} @var{metasyntactic-variable}
-Indicate a metasyntactic variable.
-Here is @var{some text} in the @@var font.
-
-@end table
-
-
-@comment **************************************************** SECTION
-@node Glyphs
-@unnumberedsec Glyphs
-
-@table @asis
-
-@item @@TeX@{@} @result{} @TeX{}
-@item @@bullet@{@} @result{} @bullet{}
-@item @@copyright@{@} @result{} @copyright{}
-@item @@dots@{@} @result{} @dots{}
-@item @@equiv@{@} @result{} @equiv{}
-@item @@error@{@} @result{} @error{}
-@item @@expansion@{@} @result{} @expansion{}
-@item @@minus@{@} @result{} @minus{}
-@item @@point@{@} @result{} @point{}
-@item @@print@{@} @result{} @print{}
-@item @@result@{@} @result{} @result{}
-@item @@today@{@} @result{} @today{}
-
-@end table
-
-@comment **************************************************** SECTION
-@node Blocks
-@unnumberedsec Blocks
-
-@example
-@cartouche
-@@example
-@@cartouche
-Here's two lines
-of text
-@@end cartouche
-@@end example
-@end cartouche
-@end example
-
-@display
-@@display
-Here's two lines
-of text
-@@end display
-@end display
-
-@example
-@@example
-Here's two lines
-of text
-@@end example
-@end example
-
-@format
-@@format
-Here's two lines
-of text
-@@end format
-@end format
-
-@lisp
-@@lisp
-Here's two lines
-of text
-@@end lisp
-@end lisp
-
-@quotation
-@@quotation
-Here's two lines
-of text
-@@end quotation
-@end quotation
-
-@smallexample
-@@smallexample
-Here's two lines
-of text
-@@end smallexample
-@end smallexample
-
-@comment **************************************************** SECTION
-@node Tables and Lists
-@unnumberedsec Tables and Lists
-
-@example
-@@table @@code
-@@item code-one
-@@table @@var
-@@item var-one
-@@table @@samp
-@@item samp-one
-Hmmm.
-@@item samp-two
-Mmmmh.
-@@end table
-@@item var-two
-Huh?
-@@end table
-@@item code-two
-Duh?
-@@end table
-@end example
-
-@table @code
-@item code-one
-@table @var
-@item var-one
-@table @samp
-@item samp-one
-Hmmm.
-@item samp-two
-Mmmmh.
-@end table
-@item var-two
-Huh?
-@end table
-@item code-two
-Duh?
-@end table
-
-
-@comment **************************************************** CHAPTER
-@node texi2dvi
-@appendix texi2dvi & texinfo.tex
-
-Versions of ``@code{texi2dvi}'' and ``@code{texinfo.tex}'' are included
-with this package. These are compatible with the
-@href{texi2www extensions,Extensions}.
-
-@appendixsec texi2dvi
-
-@appendixsec texinfo.tex
-
-``@code{texinfo.tex}'' is a @TeX{} macro used during the @var{texinfo}
-@result{} @var{dvi} conversion.
-
-
-
-
-@comment **************************************************** CHAPTER
-@node Index
-@unnumbered Index
-@printindex cp
-
-@contents
-@bye
diff --git a/doc/tools/texi2www/up-arrow.gif b/doc/tools/texi2www/up-arrow.gif
deleted file mode 100644
index 82aa8ccc68..0000000000
--- a/doc/tools/texi2www/up-arrow.gif
+++ /dev/null
Binary files differ
diff --git a/doc/tools/update b/doc/tools/update
deleted file mode 100644
index 6199707a74..0000000000
--- a/doc/tools/update
+++ /dev/null
@@ -1,221 +0,0 @@
-#!/bin/ksh
-#
-# Either bash or ksh will be ok for this; requires 'test -ot'
-# (-p above just says to not parse $ENV file; makes it faster for
-# those of us who set $ENV)
-#
-#
-# NOTE
-#
-# This is potentially a very dangerous program.
-#
-# $Id$
-#
-
-# progname=`basename $0`
-progname=${0##*/} # fast basename hack for ksh, bash
-
-USAGE=\
-"
-usage: $progname [ -vs ] [ -b base_directory ] [-p file] [-f] [files...]
- -v -- verbose
- -p -- file with replacement instructions
- -s -- skip prompt for backup verification
- -f -- do files at end of line
-
-base_directory is the root directory of the source code to update. It
-defaults to the current directory.
-
-This program updates C, H, and .inl files.
-"
-
-fatal() {
- if [ "$1" ]
- then
- echo >&2
- echo $* >&2
- echo >&2
- fi
- echo "$USAGE" 1>&2
- exit 1
-}
-
-#
-# KLUDGE to figure out at runtime how to echo a line without a
-# newline.
-#
-count=`echo "\\c" | wc -c`
-if [ ${count} -ne 0 ] ; then
- EARG="-n"
- EOL=""
-else
- EARG=""
- EOL="\\c"
-fi
-
-#
-# Function to make sure they do a backup
-#
-
-WARNING=\
-"
-
-*******************************************************************************
-*******************************************************************************
-*******************************************************************************
-**** ****
-**** WARNING!!! WARNING!!! WARNING!!! ****
-**** ****
-**** ALL SOURCE CODE SHOULD BE BACKED UP BEFORE RUNNING THIS PROGRAM!! ****
-**** ****
-**** WARNING!!! WARNING!!! WARNING!!! ****
-**** ****
-*******************************************************************************
-*******************************************************************************
-*******************************************************************************
-
-"
-
-verify_backup()
-{
- echo "$WARNING"
- continue="yes"
- while [ $continue = "yes" ]
- do
-echo ${EARG} "Do you wish to update the source tree at this time [y|n]? " ${EOL}
- read answer
- case $answer in
- [yY]*)
- continue="no"
- ;;
- [nN]*)
- echo
- echo "Exitting at user request"
- echo
- exit 0
- ;;
- esac
- done
-}
-
-#
-# Default tools to use...
-#
-# NOTE: The GNU versions of both of these are faster.
-#
-find_prog=find
-xargs_prog=xargs
-
-#
-# process the options
-#
-
-verbose=""
-suffix=""
-mode=""
-base_directory=.
-do_files="no"
-do_prompt="yes"
-replacement_file=""
-
-while getopts sfp:b:v OPT
-do
- case "$OPT" in
- v)
- verbose="yes";;
- s)
- do_prompt="no";;
- b)
- base_directory=${OPTARG};;
- p)
- replacement_file=${OPTARG};;
- f)
- do_files="yes";;
- *)
- fatal
- esac
-done
-
-let $((shiftcount = $OPTIND - 1))
-shift $shiftcount
-
-args=$*
-
-#
-# Make sure they have done a backup
-#
-
-if [ ${do_prompt} = "yes" ]
-then
- verify_backup
-fi
-
-#
-# Validate the base directory
-#
-
-if [ ! -d $base_directory ]
-then
- fatal "${base_directory} does not exist"
-fi
-
-#
-# Validate the replacement file
-#
-
-if [ ! -r $replacement_file ]
-then
- fatal "${replacement_file} does not exist or is not readable"
-fi
-
-
-#
-# Verify enough of the RTEMS environment variables are set
-#
-
-RTEMS_HOME=/usr1/rtems/rtemsdoc-work
-if [ ! -d "${RTEMS_HOME}" ]
-then
- fatal "RTEMS_HOME environment variable is not initialized"
-fi
-
-#
-# Update the files
-#
-
-generate_list()
-{
- if [ ${do_files} = "yes" ]
- then
- for i in $args
- do
- echo $i
- done
- else
- ${find_prog} ${base_directory} \( -name "*.[ch]" -o -name "*.inl" \) -print
- fi
-}
-
-generate_list | ${xargs_prog} |
- while read line
- do
-
- if [ ${verbose} = yes ] ; then
- echo ${RTEMS_HOME}/tools/word-replace -p ${replacement_file} ${line}
- fi
- ${RTEMS_HOME}/tools/word-replace -p ${replacement_file} ${line}
- if [ $? -ne 0 ]
- then
- exit 1
- fi
- for file in ${line}
- do
- mv ${file}.fixed ${file}
- done
- done
-
-exit 0
-
-# Local Variables: ***
-# mode:ksh ***
-# End: ***
diff --git a/doc/tools/word-replace b/doc/tools/word-replace
deleted file mode 100755
index 90e72117fd..0000000000
--- a/doc/tools/word-replace
+++ /dev/null
@@ -1,89 +0,0 @@
-#!/usr/bin/perl
-#
-# $Id$
-#
-
-eval "exec /usr/local/bin/perl -S $0 $*"
- if $running_under_some_shell;
-
-require 'getopts.pl';
-&Getopts("p:vh"); # help, pattern file, verbose,
-
-if ($opt_h || ! $opt_p) {
- print STDERR <<NO_MORE_HELP;
-word-replace
-
- Replace *words* with patterns. Pattern file specifies which patterns
- to replace on each line. All patterns are wrapped with perl \\b regexp
- specifiers.
-
-Usage: $0 [-v] -p pattern-file files to replace
-
- -v -- possibly more verbose
- -p file -- pattern file
- -h -- help
-
- anything else == this help message
-
-Pattern file looks like this:
-
-# Example:
-# ignores all lines with beginning with # or not exactly 2 fields
-_Dorky_Name rtems_dorky_name # comments, and blank lines are cool
-_Dorky_Name2 rtems_dorky_name2 # comments, and blank lines are cool
-NO_MORE_HELP
- exit 0;
-}
-
-$verbose = $opt_v;
-$pattern_file = $opt_p;
-
-# make standard outputs unbuffered (so the '.'s come out ok)
-$oldfh = select(STDERR); $| = 1; select($oldfh);
-$oldfh = select(STDOUT); $| = 1; select($oldfh);
-
-# pull in the patterns
-open(PATTERNS, "<$pattern_file") ||
- die "could not open $pattern_file: $!, crapped out at";
-
-foreach (<PATTERNS>)
-{
- chop;
- s/#.*//;
- next if /^$/;
- ($orig, $new, $junk, @rest) = split;
- next if ( ! $orig || ! $new || $junk); # <2 or >2 patterns
- die "pattern appears 2x: '$orig' in '$pattern_file'--" if defined($patterns{$orig});
- $patterns{$orig} = $new;
-}
-close PATTERNS;
-
-# walk thru each line in each file
-foreach $file (@ARGV)
-{
- print "$file\t";
-
- open (INFILE, "<$file") ||
- die "could not open input file $file: $!";
-
- $outfile = $file . ".fixed";;
- open (OUTFILE, ">$outfile") ||
- die "could not open output file $outfile: $!";
-
- while (<INFILE>)
- {
- study; # maybe make s/// faster
- foreach $key (keys %patterns)
- {
- if ( s/\b$key\b/$patterns{$key}/ge )
- {
- print ".";
- }
- }
- print OUTFILE $_;
- }
- print "\n";
- close INFILE;
- close OUTFILE;
-}
-
diff --git a/doc/user/Makefile b/doc/user/Makefile
deleted file mode 100644
index 1e4cc53234..0000000000
--- a/doc/user/Makefile
+++ /dev/null
@@ -1,194 +0,0 @@
-#
-# COPYRIGHT (c) 1988-1999.
-# On-Line Applications Research Corporation (OAR).
-# All rights reserved.
-#
-# $Id$
-#
-
-PROJECT=c_user
-
-include ../Make.config
-
-all: html info ps pdf
-
-dirs:
- $(make-dirs)
-
-COMMON_FILES=../common/cpright.texi
-FILES= bsp.texi c_user.texi clock.texi concepts.texi conf.texi \
- dirstat.texi dpmem.texi event.texi example.texi fatal.texi \
- glossary.texi init.texi intr.texi io.texi mp.texi msg.texi overview.texi \
- part.texi preface.texi region.texi rtmon.texi schedule.texi sem.texi \
- signal.texi task.texi timer.texi userext.texi $(COMMON_FILES)
-
-GENERATED_FILES=overview.texi concepts.texi init.texi task.texi \
- intr.texi clock.texi timer.texi sem.texi msg.texi \
- event.texi signal.texi part.texi region.texi \
- dpmem.texi io.texi fatal.texi schedule.texi rtmon.texi \
- bsp.texi userext.texi conf.texi mp.texi
-
-INFOFILES=$(wildcard $(PROJECT) $(PROJECT)-*)
-
-info: dirs $(PROJECT)
- cp $(PROJECT) $(PROJECT)-* $(INFO_INSTALL)
-
-$(PROJECT): $(FILES)
- $(MAKEINFO) $(PROJECT).texi
-
-dvi: dirs $(PROJECT).dvi
-ps: dirs $(PROJECT).ps
-pdf: dirs $(PROJECT).pdf
-
-$(PROJECT).pdf: $(FILES)
- $(TEXI2PDF) $(PROJECT).texi
- cp $(PROJECT).pdf $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).ps: $(PROJECT).dvi
- dvips -o $(PROJECT).ps $(PROJECT).dvi
- cp $(PROJECT).ps $(WWW_INSTALL)/$(PROJECT)
-
-$(PROJECT).dvi: $(FILES)
- $(TEXI2DVI) $(PROJECT).texi
- cp $(PROJECT).dvi $(WWW_INSTALL)/$(PROJECT)
-
-html: dirs $(FILES)
- -mkdir -p $(WWW_INSTALL)/$(PROJECT)
- cp rtemsarc.png rtemspie.png states.png $(WWW_INSTALL)/c_user
- $(TEXI2WWW) $(TEXI2WWW_ARGS) -dir $(WWW_INSTALL)/$(PROJECT) \
- $(PROJECT).texi
-
-index:
- texindex $(PROJECT).cp $(PROJECT).vr $(PROJECT).fn \
- $(PROJECT).tp $(PROJECT).pg $(PROJECT).ky
-
-clean:
- rm -f *.o $(PROG) *.txt core *.html $(PROJECT).pdf
- rm -f *.dvi *.ps *.log *.aux *.cp *.fn *.ky *.pg *.toc *.tp *.vr $(BASE)
- rm -f $(PROJECT) $(PROJECT)-* _* $(GENERATED_FILES)
- rm -f *.cps *.cpss *.fns *.kys *.pgs *.tps *.vrs
-
-
-#preface.texi: preface.t
-# $(BMENU) -p "Top" \
-# -u "Top" \
-# -n "Overview" ${*}.t
-
-overview.texi: overview.t
- $(BMENU) -p "Preface" \
- -u "Top" \
- -n "Key Concepts" ${*}.t
-
-concepts.texi: concepts.t
- $(BMENU) -p "Overview Manual Organization" \
- -u "Top" \
- -n "Initialization Manager" ${*}.t
-
-init.texi: init.t
- $(BMENU) -p "Key Concepts Memory Management" \
- -u "Top" \
- -n "Task Manager" ${*}.t
-
-task.texi: task.t
- $(BMENU) -p "Initialization Manager SHUTDOWN_EXECUTIVE - Shutdown RTEMS" \
- -u "Top" \
- -n "Interrupt Manager" ${*}.t
-
-intr.texi: intr.t
- $(BMENU) -p "Task Manager TASK_VARIABLE_DELETE - Remove per task variable" \
- -u "Top" \
- -n "Clock Manager" ${*}.t
-
-clock.texi: clock.t
- $(BMENU) \
- -p "Interrupt Manager INTERRUPT_IS_IN_PROGRESS - Is an ISR in Progress" \
- -u "Top" \
- -n "Timer Manager" ${*}.t
-
-timer.texi: timer.t
- $(BMENU) -p "Clock Manager CLOCK_TICK - Announce a clock tick" \
- -u "Top" \
- -n "Semaphore Manager" ${*}.t
-
-sem.texi: sem.t
- $(BMENU) -p "Timer Manager TIMER_RESET - Reset an interval timer" \
- -u "Top" \
- -n "Message Manager" ${*}.t
-
-msg.texi: msg.t
- $(BMENU) -p "Semaphore Manager SEMAPHORE_FLUSH - Unblock all tasks waiting on a semaphore" \
- -u "Top" \
- -n "Event Manager" ${*}.t
-
-event.texi: event.t
- $(BMENU) \
- -p "Message Manager MESSAGE_QUEUE_FLUSH - Flush all messages on a queue" \
- -u "Top" \
- -n "Signal Manager" ${*}.t
-
-signal.texi: signal.t
- $(BMENU) -p "Event Manager EVENT_RECEIVE - Receive event condition" \
- -u "Top" \
- -n "Partition Manager" ${*}.t
-
-part.texi: part.t
- $(BMENU) -p "Signal Manager SIGNAL_SEND - Send signal set to a task" \
- -u "Top" \
- -n "Region Manager" ${*}.t
-
-region.texi: region.t
- $(BMENU) \
--p "Partition Manager PARTITION_RETURN_BUFFER - Return buffer to a partition" \
- -u "Top" \
- -n "Dual-Ported Memory Manager" ${*}.t
-
-dpmem.texi: dpmem.t
- $(BMENU) \
- -p "Region Manager REGION_GET_SEGMENT_SIZE - Obtain size of a segment" \
- -u "Top" \
- -n "I/O Manager" ${*}.t
-
-io.texi: io.t
- $(BMENU) -p "Dual-Ported Memory Manager PORT_INTERNAL_TO_EXTERNAL - Convert internal to external address" \
- -u "Top" \
- -n "Fatal Error Manager" ${*}.t
-
-fatal.texi: fatal.t
- $(BMENU) -p "I/O Manager IO_CONTROL - Special device services" \
- -u "Top" \
- -n "Scheduling Concepts" ${*}.t
-
-schedule.texi: schedule.t
- $(BMENU) \
--p "Fatal Error Manager FATAL_ERROR_OCCURRED - Invoke the fatal error handler" \
- -u "Top" \
- -n "Rate Monotonic Manager" ${*}.t
-
-rtmon.texi: rtmon.t
- $(BMENU) -p "Scheduling Concepts Task State Transitions" \
- -u "Top" \
- -n "Board Support Packages" ${*}.t
-
-bsp.texi: bsp.t
- $(BMENU) -p "Rate Monotonic Manager RATE_MONOTONIC_GET_STATUS - Obtain status information on period" \
- -u "Top" \
- -n "User Extensions Manager" ${*}.t
-
-userext.texi: userext.t
- $(BMENU) -p "Board Support Packages Heterogeneous Systems" \
- -u "Top" \
- -n "Configuring a System" ${*}.t
-
-conf.texi: conf.t
- $(BMENU) -p "User Extensions Manager EXTENSION_DELETE - Delete a extension set" \
- -u "Top" \
- -n "Multiprocessing Manager" ${*}.t
-
-mp.texi: mp.t
- $(BMENU) -p "Configuring a System Sizing the RTEMS RAM Workspace" \
- -u "Top" \
- -n "Directive Status Codes" ${*}.t
-
-convert:
- /usr/bin/gs -dMaxBitmap=300000000 -g5500x5500 -sDEVICE=pdfwrite -q -dNOPAUSE -dSAFER -sOutputFile=rtemspie.pdf -- rtemspie.eps -c -quit
- /usr/bin/gs -dMaxBitmap=300000000 -g5500x5500 -sDEVICE=pdfwrite -q -dNOPAUSE -dSAFER -sOutputFile=states.pdf -- states.eps -c -quit
diff --git a/doc/user/bsp.t b/doc/user/bsp.t
deleted file mode 100644
index ede9d37135..0000000000
--- a/doc/user/bsp.t
+++ /dev/null
@@ -1,318 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Board Support Packages
-
-@cindex Board Support Packages
-@cindex BSPs
-
-@section Introduction
-
-@cindex BSP, definition
-
-A board support package (BSP) is a collection of
-user-provided facilities which interface RTEMS and an
-application with a specific hardware platform. These facilities
-may include hardware initialization, device drivers, user
-extensions, and a Multiprocessor Communications Interface
-(MPCI). However, a minimal BSP need only support processor
-reset and initialization and, if needed, a clock tick.
-
-@section Reset and Initialization
-
-An RTEMS based application is initiated or
-re-initiated when the processor is reset. This initialization
-code is responsible for preparing the target platform for the
-RTEMS application. Although the exact actions performed by the
-initialization code are highly processor and target dependent,
-the logical functionality of these actions are similar across a
-variety of processors and target platforms.
-
-Normally, the application's initialization is
-performed at two separate times: before the call to
-@code{@value{DIRPREFIX}initialize_executive}
-(reset application initialization) and
-after @code{@value{DIRPREFIX}initialize_executive}
-in the user's initialization tasks
-(local and global application initialization). The order of the
-startup procedure is as follows:
-
-@enumerate
-@item Reset application initialization.
-@item Call to @code{@value{DIRPREFIX}initialize_executive}
-@item Local and global application initialization.
-@end enumerate
-
-The reset application initialization code is executed
-first when the processor is reset. All of the hardware must be
-initialized to a quiescent state by this software before
-initializing RTEMS. When in quiescent state, devices do not
-generate any interrupts or require any servicing by the
-application. Some of the hardware components may be initialized
-in this code as well as any application initialization that does
-not involve calls to RTEMS directives.
-
-The processor's Interrupt Vector Table which will be
-used by the application may need to be set to the required value
-by the reset application initialization code. Because
-interrupts are enabled automatically by RTEMS as part of the
-@code{@value{DIRPREFIX}initialize_executive} directive,
-the Interrupt Vector Table MUST
-be set before this directive is invoked to insure correct
-interrupt vectoring. The processor's Interrupt Vector Table
-must be accessible by RTEMS as it will be modified by the
-@code{@value{DIRPREFIX}interrupt_catch} directive.
-On some CPUs, RTEMS installs it's
-own Interrupt Vector Table as part of initialization and thus
-these requirements are met automatically. The reset code which
-is executed before the call to @code{@value{DIRPREFIX}initialize_executive}
-has the following requirements:
-
-@itemize @bullet
-@item Must not make any RTEMS directive calls.
-
-@item If the processor supports multiple privilege levels,
-must leave the processor in the most privileged, or supervisory,
-state.
-
-@item Must allocate a stack of at least @code{@value{RPREFIX}MINIMUM_STACK_SIZE}
-bytes and initialize the stack pointer for the
-@code{@value{DIRPREFIX}initialize_executive} directive.
-
-@item Must initialize the processor's Interrupt Vector Table.
-
-@item Must disable all maskable interrupts.
-
-@item If the processor supports a separate interrupt stack,
-must allocate the interrupt stack and initialize the interrupt
-stack pointer.
-@end itemize
-
-The @code{@value{DIRPREFIX}initialize_executive} directive does not return to
-the initialization code, but causes the highest priority
-initialization task to begin execution. Initialization tasks
-are used to perform both local and global application
-initialization which is dependent on RTEMS facilities. The user
-initialization task facility is typically used to create the
-application's set of tasks.
-
-@subsection Interrupt Stack Requirements
-
-The worst-case stack usage by interrupt service
-routines must be taken into account when designing an
-application. If the processor supports interrupt nesting, the
-stack usage must include the deepest nest level. The worst-case
-stack usage must account for the following requirements:
-
-@itemize @bullet
-@item Processor's interrupt stack frame
-
-@item Processor's subroutine call stack frame
-
-@item RTEMS system calls
-
-@item Registers saved on stack
-
-@item Application subroutine calls
-@end itemize
-
-The size of the interrupt stack must be greater than
-or equal to the constant @code{@value{RPREFIX}MINIMUM_STACK_SIZE}.
-
-@subsection Processors with a Separate Interrupt Stack
-
-Some processors support a separate stack for
-interrupts. When an interrupt is vectored and the interrupt is
-not nested, the processor will automatically switch from the
-current stack to the interrupt stack. The size of this stack is
-based solely on the worst-case stack usage by interrupt service
-routines.
-
-The dedicated interrupt stack for the entire
-application is supplied and initialized by the reset and
-initialization code of the user's board support package. Since
-all ISRs use this stack, the stack size must take into account
-the worst case stack usage by any combination of nested ISRs.
-
-@subsection Processors without a Separate Interrupt Stack
-
-Some processors do not support a separate stack for
-interrupts. In this case, without special assistance every
-task's stack must include enough space to handle the task's
-worst-case stack usage as well as the worst-case interrupt stack
-usage. This is necessary because the worst-case interrupt
-nesting could occur while any task is executing.
-
-On many processors without dedicated hardware managed
-interrupt stacks, RTEMS manages a dedicated interrupt stack in
-software. If this capability is supported on a CPU, then it is
-logically equivalent to the processor supporting a separate
-interrupt stack in hardware.
-
-@section Device Drivers
-
-Device drivers consist of control software for
-special peripheral devices and provide a logical interface for
-the application developer. The RTEMS I/O manager provides
-directives which allow applications to access these device
-drivers in a consistent fashion. A Board Support Package may
-include device drivers to access the hardware on the target
-platform. These devices typically include serial and parallel
-ports, counter/timer peripherals, real-time clocks, disk
-interfaces, and network controllers.
-
-For more information on device drivers, refer to the
-I/O Manager chapter.
-
-@subsection Clock Tick Device Driver
-
-Most RTEMS applications will include a clock tick
-device driver which invokes the @code{@value{DIRPREFIX}clock_tick}
-directive at regular intervals. The clock tick is necessary if
-the application is to utilize timeslicing, the clock manager, the
-timer manager, the rate monotonic manager, or the timeout option on blocking
-directives.
-
-The clock tick is usually provided as an interrupt
-from a counter/timer or a real-time clock device. When a
-counter/timer is used to provide the clock tick, the device is
-typically programmed to operate in continuous mode. This mode
-selection causes the device to automatically reload the initial
-count and continue the countdown without programmer
-intervention. This reduces the overhead required to manipulate
-the counter/timer in the clock tick ISR and increases the
-accuracy of tick occurrences. The initial count can be based on
-the microseconds_per_tick field in the RTEMS Configuration
-Table. An alternate approach is to set the initial count for a
-fixed time period (such as one millisecond) and have the ISR
-invoke @code{@value{DIRPREFIX}clock_tick}
-on the microseconds_per_tick boundaries.
-Obviously, this can induce some error if the configured
-microseconds_per_tick is not evenly divisible by the chosen
-clock interrupt quantum.
-
-It is important to note that the interval between
-clock ticks directly impacts the granularity of RTEMS timing
-operations. In addition, the frequency of clock ticks is an
-important factor in the overall level of system overhead. A
-high clock tick frequency results in less processor time being
-available for task execution due to the increased number of
-clock tick ISRs.
-
-@section User Extensions
-
-RTEMS allows the application developer to augment
-selected features by invoking user-supplied extension routines
-when the following system events occur:
-
-@itemize @bullet
-@item Task creation
-@item Task initiation
-@item Task reinitiation
-@item Task deletion
-@item Task context switch
-@item Post task context switch
-@item Task begin
-@item Task exits
-@item Fatal error detection
-@end itemize
-
-User extensions can be used to implement a wide variety of
-functions including execution profiling, non-standard
-coprocessor support, debug support, and error detection and
-recovery. For example, the context of a non-standard numeric
-coprocessor may be maintained via the user extensions. In this
-example, the task creation and deletion extensions are
-responsible for allocating and deallocating the context area,
-the task initiation and reinitiation extensions would be
-responsible for priming the context area, and the task context
-switch extension would save and restore the context of the
-device.
-
-For more information on user extensions, refer to the
-User Extensions chapter.
-
-@section Multiprocessor Communications Interface (MPCI)
-
-RTEMS requires that an MPCI layer be provided when a
-multiple node application is developed. This MPCI layer must
-provide an efficient and reliable communications mechanism
-between the multiple nodes. Tasks on different nodes
-communicate and synchronize with one another via the MPCI. Each
-MPCI layer must be tailored to support the architecture of the
-target platform.
-
-For more information on the MPCI, refer to the
-Multiprocessing Manager chapter.
-
-@subsection Tightly-Coupled Systems
-
-A tightly-coupled system is a multiprocessor
-configuration in which the processors communicate solely via
-shared global memory. The MPCI can simply place the RTEMS
-packets in the shared memory space. The two primary
-considerations when designing an MPCI for a tightly-coupled
-system are data consistency and informing another node of a
-packet.
-
-The data consistency problem may be solved using
-atomic "test and set" operations to provide a "lock" in the
-shared memory. It is important to minimize the length of time
-any particular processor locks a shared data structure.
-
-The problem of informing another node of a packet can
-be addressed using one of two techniques. The first technique
-is to use an interprocessor interrupt capability to cause an
-interrupt on the receiving node. This technique requires that
-special support hardware be provided by either the processor
-itself or the target platform. The second technique is to have
-a node poll for arrival of packets. The drawback to this
-technique is the overhead associated with polling.
-
-@subsection Loosely-Coupled Systems
-
-A loosely-coupled system is a multiprocessor
-configuration in which the processors communicate via some type
-of communications link which is not shared global memory. The
-MPCI sends the RTEMS packets across the communications link to
-the destination node. The characteristics of the communications
-link vary widely and have a significant impact on the MPCI
-layer. For example, the bandwidth of the communications link
-has an obvious impact on the maximum MPCI throughput.
-
-The characteristics of a shared network, such as
-Ethernet, lend themselves to supporting an MPCI layer. These
-networks provide both the point-to-point and broadcast
-capabilities which are expected by RTEMS.
-
-@subsection Systems with Mixed Coupling
-
-A mixed-coupling system is a multiprocessor
-configuration in which the processors communicate via both
-shared memory and communications links. A unique characteristic
-of mixed-coupling systems is that a node may not have access to
-all communication methods. There may be multiple shared memory
-areas and communication links. Therefore, one of the primary
-functions of the MPCI layer is to efficiently route RTEMS
-packets between nodes. This routing may be based on numerous
-algorithms. In addition, the router may provide alternate
-communications paths in the event of an overload or a partial
-failure.
-
-@subsection Heterogeneous Systems
-
-Designing an MPCI layer for a heterogeneous system
-requires special considerations by the developer. RTEMS is
-designed to eliminate many of the problems associated with
-sharing data in a heterogeneous environment. The MPCI layer
-need only address the representation of thirty-two (32) bit
-unsigned quantities.
-
-For more information on supporting a heterogeneous
-system, refer the Supporting Heterogeneous Environments in the
-Multiprocessing Manager chapter.
diff --git a/doc/user/c_user.texi b/doc/user/c_user.texi
deleted file mode 100644
index 3784b85684..0000000000
--- a/doc/user/c_user.texi
+++ /dev/null
@@ -1,170 +0,0 @@
-\input texinfo @c -*-texinfo-*-
-@c %**start of header
-@setfilename c_user
-@syncodeindex vr fn
-@synindex ky cp
-@paragraphindent 0
-@c @smallbook
-@c %**end of header
-
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@c
-@c Master file for the C User's Guide
-@c
-
-@c Joel's Questions
-@c
-@c 1. Why does paragraphindent only impact makeinfo?
-@c 2. Why does paragraphindent show up in HTML?
-@c
-
-@include ../common/setup.texi
-
-@ignore
-@ifinfo
-@format
-START-INFO-DIR-ENTRY
-* RTEMS C User: (c_user). The C User's Guide
-END-INFO-DIR-ENTRY
-@end format
-@end ifinfo
-@end ignore
-
-@c @syncodeindex fn cp
-@c variable substitution info:
-@c
-@set is-C
-@clear is-Ada
-@set LANGUAGE C
-@set STRUCTURE structure
-@set ROUTINE function
-@set OR |
-@set RPREFIX RTEMS_
-@set DIRPREFIX rtems_
-@c the language is @value{LANGUAGE}
-@c NOTE: don't use underscore in the name
-@c
-
-@c
-@c Title Page Stuff
-@c
-
-@set edition @value{RTEMS-EDITION}
-@set version @value{RTEMS-VERSION}
-@set update-date @value{RTEMS-UPDATE-DATE}
-@set update-month @value{RTEMS-UPDATE-MONTH}
-
-@c
-@c I don't really like having a short title page. --joel
-@c
-@c @shorttitlepage RTEMS Applications C User's Guide
-
-@setchapternewpage odd
-@settitle RTEMS C User's Guide
-@titlepage
-@finalout
-
-@title RTEMS C User's Guide
-@subtitle Edition @value{edition}, for RTEMS @value{version}
-@sp 1
-@subtitle @value{update-month}
-@author On-Line Applications Research Corporation
-@page
-@include ../common/cpright.texi
-@end titlepage
-
-@c This prevents a black box from being printed on "overflow" lines.
-@c The alternative is to rework a sentence to avoid this problem.
-
-@include preface.texi
-@include overview.texi
-@include concepts.texi
-@include init.texi
-@include task.texi
-@include intr.texi
-@include clock.texi
-@include timer.texi
-@include sem.texi
-@include msg.texi
-@include event.texi
-@include signal.texi
-@include part.texi
-@include region.texi
-@include dpmem.texi
-@include io.texi
-@include fatal.texi
-@include schedule.texi
-@include rtmon.texi
-@include bsp.texi
-@include userext.texi
-@include conf.texi
-@include mp.texi
-@include dirstat.texi
-@include example.texi
-@include glossary.texi
-@ifinfo
-@node Top, Preface, (dir), (dir)
-@top c_user
-
-This is the online version of the RTEMS C User's Guide.
-
-@menu
-* Preface::
-* Overview::
-* Key Concepts::
-* Initialization Manager::
-* Task Manager::
-* Interrupt Manager::
-* Clock Manager::
-* Timer Manager::
-* Semaphore Manager::
-* Message Manager::
-* Event Manager::
-* Signal Manager::
-* Partition Manager::
-* Region Manager::
-* Dual-Ported Memory Manager::
-* I/O Manager::
-* Fatal Error Manager::
-* Scheduling Concepts::
-* Rate Monotonic Manager::
-* Board Support Packages::
-* User Extensions Manager::
-* Configuring a System::
-* Multiprocessing Manager::
-* Directive Status Codes::
-* Example Application::
-* Glossary::
-* Command and Variable Index::
-* Concept Index::
-@end menu
-
-@end ifinfo
-@c
-@c
-@c Need to copy the emacs stuff and "trailer stuff" (index, toc) into here
-@c
-
-@node Command and Variable Index, Concept Index, Glossary, Top
-@unnumbered Command and Variable Index
-
-@printindex fn
-
-@c There are currently no Command and Variable Index entries.
-
-@node Concept Index, , Command and Variable Index, Top
-@unnumbered Concept Index
-
-@c There are currently no Concept Index entries.
-@printindex cp
-
-@contents
-@bye
-
diff --git a/doc/user/clock.t b/doc/user/clock.t
deleted file mode 100644
index f27748d4e3..0000000000
--- a/doc/user/clock.t
+++ /dev/null
@@ -1,420 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Clock Manager
-
-@cindex clock
-
-@section Introduction
-
-The clock manager provides support for time of day
-and other time related capabilities. The directives provided by
-the clock manager are:
-
-@itemize @bullet
-@item @code{@value{DIRPREFIX}clock_set} - Set system date and time
-@item @code{@value{DIRPREFIX}clock_get} - Get system date and time information
-@item @code{@value{DIRPREFIX}clock_tick} - Announce a clock tick
-@end itemize
-
-@section Background
-
-@subsection Required Support
-
-For the features provided by the clock manager to be
-utilized, periodic timer interrupts are required. Therefore, a
-real-time clock or hardware timer is necessary to create the
-timer interrupts. The @code{@value{DIRPREFIX}clock_tick}
-directive is normally called
-by the timer ISR to announce to RTEMS that a system clock tick
-has occurred. Elapsed time is measured in ticks. A tick is
-defined to be an integral number of microseconds which is
-specified by the user in the Configuration Table.
-
-@subsection Time and Date Data Structures
-
-The clock facilities of the clock manager operate
-upon calendar time. These directives utilize the following date
-and time @value{STRUCTURE} for the native time and date format:
-
-@ifset is-C
-@example
-struct rtems_tod_control @{
- rtems_unsigned32 year; /* greater than 1987 */
- rtems_unsigned32 month; /* 1 - 12 */
- rtems_unsigned32 day; /* 1 - 31 */
- rtems_unsigned32 hour; /* 0 - 23 */
- rtems_unsigned32 minute; /* 0 - 59 */
- rtems_unsigned32 second; /* 0 - 59 */
- rtems_unsigned32 ticks; /* elapsed between seconds */
-@};
-
-typedef struct rtems_tod_control rtems_time_of_day;
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-type Time_Of_Day is
- record
- Year : RTEMS.Unsigned32; -- year, A.D.
- Month : RTEMS.Unsigned32; -- month, 1 .. 12
- Day : RTEMS.Unsigned32; -- day, 1 .. 31
- Hour : RTEMS.Unsigned32; -- hour, 0 .. 23
- Minute : RTEMS.Unsigned32; -- minute, 0 .. 59
- Second : RTEMS.Unsigned32; -- second, 0 .. 59
- Ticks : RTEMS.Unsigned32; -- elapsed ticks between seconds
- end record;
-@end example
-@end ifset
-
-
-The native date and time format is the only format
-supported when setting the system date and time using the
-@code{@value{DIRPREFIX}clock_get} directive. Some applications
-expect to operate on a "UNIX-style" date and time data structure. The
-@code{@value{DIRPREFIX}clock_get} directive can optionally return
-the current date and time in the
-following @value{STRUCTURE}:
-
-@ifset is-C
-@example
-@group
-typedef struct @{
- rtems_unsigned32 seconds; /* seconds since RTEMS epoch*/
- rtems_unsigned32 microseconds; /* since last second */
-@} rtems_clock_time_value;
-@end group
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-type Clock_Time_Value is
- record
- Seconds : Unsigned32;
- Microseconds : Unsigned32;
- end record;
-@end example
-@end ifset
-
-The seconds field in this @value{STRUCTURE} is the number of
-seconds since the RTEMS epoch of January 1, 1988.
-
-@subsection Clock Tick and Timeslicing
-
-Timeslicing is a task scheduling discipline in which
-tasks of equal priority are executed for a specific period of
-time before control of the CPU is passed to another task. It is
-also sometimes referred to as the automatic round-robin
-scheduling algorithm. The length of time allocated to each task
-is known as the quantum or timeslice.
-
-The system's timeslice is defined as an integral
-number of ticks, and is specified in the Configuration Table.
-The timeslice is defined for the entire system of tasks, but
-timeslicing is enabled and disabled on a per task basis.
-
-The @code{@value{DIRPREFIX}clock_tick}
-directive implements timeslicing by
-decrementing the running task's time-remaining counter when both
-timeslicing and preemption are enabled. If the task's timeslice
-has expired, then that task will be preempted if there exists a
-ready task of equal priority.
-
-@subsection Delays
-
-A sleep timer allows a task to delay for a given
-interval or up until a given time, and then wake and continue
-execution. This type of timer is created automatically by the
-@code{@value{DIRPREFIX}task_wake_after}
-and @code{@value{DIRPREFIX}task_wake_when} directives and, as a result,
-does not have an RTEMS ID. Once activated, a sleep timer cannot
-be explicitly deleted. Each task may activate one and only one
-sleep timer at a time.
-
-@subsection Timeouts
-
-Timeouts are a special type of timer automatically
-created when the timeout option is used on the
-@code{@value{DIRPREFIX}message_queue_receive},
-@code{@value{DIRPREFIX}event_receive},
-@code{@value{DIRPREFIX}semaphore_obtain} and
-@code{@value{DIRPREFIX}region_get_segment} directives.
-Each task may have one and only one timeout active at a time.
-When a timeout expires, it unblocks the task with a timeout status code.
-
-@section Operations
-
-@subsection Announcing a Tick
-
-RTEMS provides the @code{@value{DIRPREFIX}clock_tick} directive which is
-called from the user's real-time clock ISR to inform RTEMS that
-a tick has elapsed. The tick frequency value, defined in
-microseconds, is a configuration parameter found in the
-Configuration Table. RTEMS divides one million microseconds
-(one second) by the number of microseconds per tick to determine
-the number of calls to the
-@code{@value{DIRPREFIX}clock_tick} directive per second. The
-frequency of @code{@value{DIRPREFIX}clock_tick}
-calls determines the resolution
-(granularity) for all time dependent RTEMS actions. For
-example, calling @code{@value{DIRPREFIX}clock_tick}
-ten times per second yields a higher
-resolution than calling @code{@value{DIRPREFIX}clock_tick}
-two times per second. The @code{@value{DIRPREFIX}clock_tick}
-directive is responsible for maintaining both
-calendar time and the dynamic set of timers.
-
-@subsection Setting the Time
-
-The @code{@value{DIRPREFIX}clock_set} directive allows a task or an ISR to
-set the date and time maintained by RTEMS. If setting the date
-and time causes any outstanding timers to pass their deadline,
-then the expired timers will be fired during the invocation of
-the @code{@value{DIRPREFIX}clock_set} directive.
-
-@subsection Obtaining the Time
-
-The @code{@value{DIRPREFIX}clock_get} directive allows a task or an ISR to
-obtain the current date and time or date and time related
-information. The current date and time can be returned in
-either native or UNIX-style format. Additionally, the
-application can obtain date and time related information such as
-the number of seconds since the RTEMS epoch, the number of ticks
-since the executive was initialized, and the number of ticks per
-second. The information returned by the
-@code{@value{DIRPREFIX}clock_get} directive is
-dependent on the option selected by the caller. The following
-options are available:
-
-@itemize @bullet
-@item @code{@value{RPREFIX}CLOCK_GET_TOD} - obtain native style date and time
-
-@item @code{@value{RPREFIX}CLOCK_GET_TIME_VALUE} - obtain UNIX-style
-date and time
-
-@item @code{@value{RPREFIX}CLOCK_GET_TICKS_SINCE_BOOT} - obtain number of ticks
-since RTEMS was initialized
-
-@item @code{@value{RPREFIX}CLOCK_GET_SECONDS_SINCE_EPOCH} - obtain number
-of seconds since RTEMS epoch
-
-@item @code{@value{RPREFIX}CLOCK_GET_TICKS_PER_SECOND} - obtain number of clock
-ticks per second
-
-@end itemize
-
-Calendar time operations will return an error code if
-invoked before the date and time have been set.
-
-@section Directives
-
-This section details the clock manager's directives.
-A subsection is dedicated to each of this manager's directives
-and describes the calling sequence, related constants, usage,
-and status codes.
-
-@c
-@c
-@c
-@page
-@subsection CLOCK_SET - Set system date and time
-
-@subheading CALLING SEQUENCE:
-
-@cindex set the time of day
-
-@ifset is-C
-@findex rtems_clock_set
-@example
-rtems_status_code rtems_clock_set(
- rtems_time_of_day *time_buffer
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Clock_Set (
- Time_Buffer : in RTEMS.Time_Of_Day;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - date and time set successfully@*
-@code{INVALID_TIME_OF_DAY} - invalid time of day
-
-@subheading DESCRIPTION:
-
-This directive sets the system date and time. The
-date, time, and ticks in the time_buffer @value{STRUCTURE} are all
-range-checked, and an error is returned if any one is out of its
-valid range.
-
-@subheading NOTES:
-
-Years before 1988 are invalid.
-
-The system date and time are based on the configured
-tick rate (number of microseconds in a tick).
-
-Setting the time forward may cause a higher priority
-task, blocked waiting on a specific time, to be made ready. In
-this case, the calling task will be preempted after the next
-clock tick.
-
-Re-initializing RTEMS causes the system date and time
-to be reset to an uninitialized state. Another call to
-@code{@value{DIRPREFIX}clock_set} is required to re-initialize
-the system date and time to application specific specifications.
-
-@c
-@c
-@c
-@page
-@subsection CLOCK_GET - Get system date and time information
-
-@cindex obtain the time of day
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_clock_get
-@example
-rtems_status_code rtems_clock_get(
- rtems_clock_get_options option,
- void *time_buffer
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Clock_Get (
- Option : in RTEMS.Clock_Get_Options;
- Time_Buffer : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - current time obtained successfully@*
-@code{@value{RPREFIX}NOT_DEFINED} - system date and time is not set
-
-@subheading DESCRIPTION:
-
-This directive obtains the system date and time. If
-the caller is attempting to obtain the date and time (i.e.
-option is set to either @code{@value{RPREFIX}CLOCK_GET_SECONDS_SINCE_EPOCH},
-@code{@value{RPREFIX}CLOCK_GET_TOD}, or
-@code{@value{RPREFIX}CLOCK_GET_TIME_VALUE}) and the date and time
-has not been set with a previous call to
-@code{@value{DIRPREFIX}clock_set}, then the
-@code{@value{RPREFIX}NOT_DEFINED} status code is returned.
-The caller can always obtain the number of ticks per second (option is
-@code{@value{RPREFIX}CLOCK_GET_TICKS_PER_SECOND}) and the number of
-ticks since the executive was initialized option is
-@code{@value{RPREFIX}CLOCK_GET_TICKS_SINCE_BOOT}).
-
-The data type expected for time_buffer is indicated below:
-
-@ifset is-C
-@itemize @bullet
-@item @code{@value{RPREFIX}CLOCK_GET_TOD} - (rtems_time_of_day *)
-
-@item @code{@value{RPREFIX}CLOCK_GET_TIME_VALUE} - (rtems_clock_time_value *)
-
-@item @code{@value{RPREFIX}CLOCK_GET_TICKS_SINCE_BOOT} - (rtems_interval *)
-
-@item @code{@value{RPREFIX}CLOCK_GET_SECONDS_SINCE_EPOCH} - (rtems_interval *)
-
-@item @code{@value{RPREFIX}CLOCK_GET_TICKS_PER_SECOND} - (rtems_interval *)
-
-@end itemize
-@end ifset
-
-@ifset is-Ada
-@itemize @bullet
-@item @code{@value{RPREFIX}CLOCK_GET_TOD} - Address of an variable of
-type RTEMS.Time_Of_Day
-
-@item @code{@value{RPREFIX}CLOCK_GET_TIME_VALUE} - Address of an variable of
-type RTEMS.Clock_Time_Value
-
-@item @code{@value{RPREFIX}CLOCK_GET_TICKS_SINCE_BOOT} - Address of an
-variable of type RTEMS.Interval
-
-@item @code{@value{RPREFIX}CLOCK_GET_SECONDS_SINCE_EPOCH} - Address of an
-variable of type RTEMS.Interval
-
-@item @code{@value{RPREFIX}CLOCK_GET_TICKS_PER_SECOND} - Address of an
-variable of type RTEMS.Interval
-
-@end itemize
-@end ifset
-
-@subheading NOTES:
-
-This directive is callable from an ISR.
-
-This directive will not cause the running task to be
-preempted. Re-initializing RTEMS causes the system date and
-time to be reset to an uninitialized state. Another call to
-@code{@value{DIRPREFIX}clock_set} is required to re-initialize the
-system date and time to application specific specifications.
-
-@c
-@c
-@c
-@page
-@subsection CLOCK_TICK - Announce a clock tick
-
-@cindex clock tick
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_clock_tick
-@example
-rtems_status_code rtems_clock_tick( void );
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Clock_Tick (
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - current time obtained successfully
-
-@subheading DESCRIPTION:
-
-This directive announces to RTEMS that a system clock
-tick has occurred. The directive is usually called from the
-timer interrupt ISR of the local processor. This directive
-maintains the system date and time, decrements timers for
-delayed tasks, timeouts, rate monotonic periods, and implements
-timeslicing.
-
-@subheading NOTES:
-
-This directive is typically called from an ISR.
-
-The microseconds_per_tick and ticks_per_timeslice
-parameters in the Configuration Table contain the number of
-microseconds per tick and number of ticks per timeslice,
-respectively.
-
diff --git a/doc/user/concepts.t b/doc/user/concepts.t
deleted file mode 100644
index e81738be00..0000000000
--- a/doc/user/concepts.t
+++ /dev/null
@@ -1,331 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@c
-@c The following figure was replaced with an ASCII equivalent.
-@c Figure 2-1 Object ID Composition
-@c
-
-@chapter Key Concepts
-
-@section Introduction
-
-The facilities provided by RTEMS are built upon a
-foundation of very powerful concepts. These concepts must be
-understood before the application developer can efficiently
-utilize RTEMS. The purpose of this chapter is to familiarize
-one with these concepts.
-
-@section Objects
-
-@cindex objects
-
-RTEMS provides directives which can be used to
-dynamically create, delete, and manipulate a set of predefined
-object types. These types include tasks, message queues,
-semaphores, memory regions, memory partitions, timers, ports,
-and rate monotonic periods. The object-oriented nature of RTEMS
-encourages the creation of modular applications built upon
-re-usable "building block" routines.
-
-All objects are created on the local node as required
-by the application and have an RTEMS assigned ID. All objects
-have a user-assigned name. Although a relationship exists
-between an object's name and its RTEMS assigned ID, the name and
-ID are not identical. Object names are completely arbitrary and
-selected by the user as a meaningful "tag" which may commonly
-reflect the object's use in the application. Conversely, object
-IDs are designed to facilitate efficient object manipulation by
-the executive.
-
-@cindex object name
-
-An object name is an unsigned thirty-two bit entity
-associated with the object by the user. Although not required
-by RTEMS, object names are typically composed of four ASCII
-characters which help identify that object. For example, a task
-which causes a light to blink might be called "LITE". Utilities
-are provided to build an object name from four ASCII characters
-and to decompose an object name into four ASCII characters.
-However, it is not required that the application use ASCII
-characters to build object names. For example, if an
-application requires one-hundred tasks, it would be difficult to
-assign meaningful ASCII names to each task. A more convenient
-approach would be to name them the binary values one through
-one-hundred, respectively.
-
-@cindex object ID
-@cindex object ID composition
-
-@need 3000
-
-An object ID is a unique unsigned thirty-two bit
-entity composed of three parts: object class, node, and index.
-
-@ifset use-ascii
-@example
-@group
- 31 26 25 16 15 0
- +-----------+------------------+-------------------------------+
- | | | |
- | Class | Node | Index |
- | | | |
- +-----------+------------------+-------------------------------+
-@end group
-@end example
-@end ifset
-
-@ifset use-tex
-@sp 1
-@tex
-\centerline{\vbox{\offinterlineskip\halign{
-\strut#&
-\hbox to 0.50in{\enskip#}&
-\hbox to 0.50in{\enskip#}&
-#&
-\hbox to 0.50in{\enskip#}&
-\hbox to 0.50in{\enskip#}&
-#&
-\hbox to 1.00in{\enskip#}&
-\hbox to 1.00in{\enskip#}&
-#\cr
-\multispan{9}\cr
-\multispan{2}31\hfil&\multispan{2}\hfil26\enskip&
- \multispan{1}\enskip25\hfil&\multispan{2}\hfil16\enskip&
- \multispan{1}\enskip15\hfil&\multispan{2}\hfil0\cr
-&&&&&&&&&\cr
-}}\hfil}
-\centerline{\vbox{\offinterlineskip\halign{
-\strut\vrule#&
-\hbox to 0.50in{\enskip#}&
-\hbox to 0.50in{\enskip#}&
-\vrule#&
-\hbox to 0.50in{\enskip#}&
-\hbox to 0.50in{\enskip#}&
-\vrule#&
-\hbox to 0.50in{\enskip#}&
-\hbox to 0.50in{\enskip#}&
-\vrule#\cr
-\multispan{9}\cr
-\noalign{\hrule}
-&&&&&&&&&\cr
-&\multispan{2}\hfil Class\hfil&&
- \multispan{2}\hfil Node\hfil&&
- \multispan{2}\hfil Index\hfil&\cr
-&&&&&&&&&\cr
-\noalign{\hrule}
-}}\hfil}
-@end tex
-@end ifset
-
-@ifset use-html
-@html
-<CENTER>
- <TABLE COLS=6 WIDTH="60%" BORDER=0>
-<TR><TD ALIGN=left><STRONG>31</STRONG></TD>
- <TD ALIGN=right><STRONG>26</STRONG></TD>
- <TD ALIGN=left><STRONG>25</STRONG></TD>
- <TD ALIGN=right><STRONG>16</STRONG></TD>
- <TD ALIGN=left><STRONG>15</STRONG></TD>
- <TD ALIGN=right><STRONG>0</STRONG></TD></TR>
- </TABLE>
-</CENTER>
-<CENTER>
- <TABLE COLS=6 WIDTH="60%" BORDER=2>
-<TR><TD ALIGN=center COLSPAN=2>Class</TD>
- <TD ALIGN=center COLSPAN=2>Node</TD>
- <TD ALIGN=center COLSPAN=2>Index</TD></TD>
- </TABLE>
-</CENTER>
-@end html
-@end ifset
-
-The most significant six bits are the object class. The next
-ten bits are the number of the node on which this object was
-created. The node number is always one (1) in a single
-processor system. The least significant sixteen bits form an
-identifier within a particular object type. This identifier,
-called the object index, ranges in value from 1 to the maximum
-number of objects configured for this object type.
-
-
-The three components of an object ID make it possible
-to quickly locate any object in even the most complicated
-multiprocessor system. Object ID's are associated with an
-object by RTEMS when the object is created and the corresponding
-ID is returned by the appropriate object create directive. The
-object ID is required as input to all directives involving
-objects, except those which create an object or obtain the ID of
-an object.
-
-The object identification directives can be used to
-dynamically obtain a particular object's ID given its name.
-This mapping is accomplished by searching the name table
-associated with this object type. If the name is non-unique,
-then the ID associated with the first occurrence of the name
-will be returned to the application. Since object IDs are
-returned when the object is created, the object identification
-directives are not necessary in a properly designed single
-processor application.
-
-In addition, services are provided to portably examine the
-three subcomponents of an RTEMS ID. These services are
-prototyped as follows:
-
-@cindex obtaining class from object ID
-@cindex obtaining node from object ID
-@cindex obtaining index from object ID
-@cindex get class from object ID
-@cindex get node from object ID
-@cindex get index from object ID
-@findex rtems_get_class
-@findex rtems_get_node
-@findex rtems_get_index
-
-@example
-rtems_unsigned32 rtems_get_class( rtems_id );
-rtems_unsigned32 rtems_get_node( rtems_id );
-rtems_unsigned32 rtems_get_index( rtems_id );
-@end example
-
-An object control block is a data structure defined
-by RTEMS which contains the information necessary to manage a
-particular object type. For efficiency reasons, the format of
-each object type's control block is different. However, many of
-the fields are similar in function. The number of each type of
-control block is application dependent and determined by the
-values specified in the user's Configuration Table. An object
-control block is allocated at object create time and freed when
-the object is deleted. With the exception of user extension
-routines, object control blocks are not directly manipulated by
-user applications.
-
-@section Communication and Synchronization
-
-@cindex communication and synchronization
-
-In real-time multitasking applications, the ability
-for cooperating execution threads to communicate and synchronize
-with each other is imperative. A real-time executive should
-provide an application with the following capabilities:
-
-@itemize @bullet
-@item Data transfer between cooperating tasks
-@item Data transfer between tasks and ISRs
-@item Synchronization of cooperating tasks
-@item Synchronization of tasks and ISRs
-@end itemize
-
-Most RTEMS managers can be used to provide some form
-of communication and/or synchronization. However, managers
-dedicated specifically to communication and synchronization
-provide well established mechanisms which directly map to the
-application's varying needs. This level of flexibility allows
-the application designer to match the features of a particular
-manager with the complexity of communication and synchronization
-required. The following managers were specifically designed for
-communication and synchronization:
-
-@itemize @bullet
-@item Semaphore
-@item Message Queue
-@item Event
-@item Signal
-@end itemize
-
-The semaphore manager supports mutual exclusion
-involving the synchronization of access to one or more shared
-user resources. Binary semaphores may utilize the optional
-priority inheritance algorithm to avoid the problem of priority
-inversion. The message manager supports both communication and
-synchronization, while the event manager primarily provides a
-high performance synchronization mechanism. The signal manager
-supports only asynchronous communication and is typically used
-for exception handling.
-
-@section Time
-
-@cindex time
-
-The development of responsive real-time applications
-requires an understanding of how RTEMS maintains and supports
-time-related operations. The basic unit of time in RTEMS is
-known as a tick. The frequency of clock ticks is completely
-application dependent and determines the granularity and
-accuracy of all interval and calendar time operations.
-
-By tracking time in units of ticks, RTEMS is capable
-of supporting interval timing functions such as task delays,
-timeouts, timeslicing, the delayed execution of timer service
-routines, and the rate monotonic scheduling of tasks. An
-interval is defined as a number of ticks relative to the current
-time. For example, when a task delays for an interval of ten
-ticks, it is implied that the task will not execute until ten
-clock ticks have occurred.
-
-A characteristic of interval timing is that the
-actual interval period may be a fraction of a tick less than the
-interval requested. This occurs because the time at which the
-delay timer is set up occurs at some time between two clock
-ticks. Therefore, the first countdown tick occurs in less than
-the complete time interval for a tick. This can be a problem if
-the clock granularity is large.
-
-The rate monotonic scheduling algorithm is a hard
-real-time scheduling methodology. This methodology provides
-rules which allows one to guarantee that a set of independent
-periodic tasks will always meet their deadlines -- even under
-transient overload conditions. The rate monotonic manager
-provides directives built upon the Clock Manager's interval
-timer support routines.
-
-Interval timing is not sufficient for the many
-applications which require that time be kept in wall time or
-true calendar form. Consequently, RTEMS maintains the current
-date and time. This allows selected time operations to be
-scheduled at an actual calendar date and time. For example, a
-task could request to delay until midnight on New Year's Eve
-before lowering the ball at Times Square.
-
-Obviously, the directives which use intervals or wall
-time cannot operate without some external mechanism which
-provides a periodic clock tick. This clock tick is typically
-provided by a real time clock or counter/timer device.
-
-@section Memory Management
-
-@cindex memory management
-
-RTEMS memory management facilities can be grouped
-into two classes: dynamic memory allocation and address
-translation. Dynamic memory allocation is required by
-applications whose memory requirements vary through the
-application's course of execution. Address translation is
-needed by applications which share memory with another CPU or an
-intelligent Input/Output processor. The following RTEMS
-managers provide facilities to manage memory:
-
-@itemize @bullet
-@item Region
-
-@item Partition
-
-@item Dual Ported Memory
-@end itemize
-
-RTEMS memory management features allow an application
-to create simple memory pools of fixed size buffers and/or more
-complex memory pools of variable size segments. The partition
-manager provides directives to manage and maintain pools of
-fixed size entities such as resource control blocks.
-Alternatively, the region manager provides a more general
-purpose memory allocation scheme that supports variable size
-blocks of memory which are dynamically obtained and freed by the
-application. The dual-ported memory manager provides executive
-support for address translation between internal and external
-dual-ported RAM address space.
diff --git a/doc/user/conf.t b/doc/user/conf.t
deleted file mode 100644
index 235bf8047c..0000000000
--- a/doc/user/conf.t
+++ /dev/null
@@ -1,1502 +0,0 @@
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@c The following macros from confdefs.h have not been discussed in this
-@c chapter:
-@c
-@c CONFIGURE_NEWLIB_EXTENSION
-@c CONFIGURE_MALLOC_REGION
-@c CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS
-@c CONFIGURE_LIBIO_SEMAPHORES
-@c CONFIGURE_INIT
-@c CONFIGURE_INTERRUPT_STACK_MEMORY
-@c CONFIGURE_GNAT_RTEMS
-@c CONFIGURE_GNAT_MUTEXES
-@c CONFIGURE_GNAT_KEYS
-@c CONFIGURE_MAXIMUM_ADA_TASKS
-@c CONFIGURE_MAXIMUM_FAKE_ADA_TASKS
-@c CONFIGURE_ADA_TASKS_STACK
-@c
-@c In addition, there should be examples of defining your own
-@c Device Driver Table, Init task table, etc.
-@c
-@c Regardless, this is a big step up. :)
-@c
-
-@chapter Configuring a System
-
-@section Automatic Generation of System Configuration
-
-@cindex confdefs.h
-@fnindex confdefs.h
-
-RTEMS provides the @code{confdefs.h} C language header file that
-based on the setting of a variety of macros can automatically
-produce nearly all of the configuration tables required
-by an RTEMS application. Rather than building the individual
-tables by hand. the application simply specifies the values
-for the configuration parameters it wishes to set. In the following
-example, the configuration information for a simple system with
-a message queue and a time slice of 50 milliseconds is configured:
-
-@example
-@group
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MICROSECONDS_PER_TICK 1000 /* 1 millisecond */
-#define CONFIGURE_TICKS_PER_TIMESLICE 50 /* 50 milliseconds */
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-@end group
-@end example
-
-This system will begin execution with the single initialization task
-named @code{Init}. It will be configured to have both a console
-device driver (for standard I/O) and a clock tick device driver.
-
-For each configuration parameter in the configuration tables, the
-macro corresponding to that field is discussed. Most systems
-can be easily configured using the @code{confdefs.h} mechanism.
-
-The following subsection list all of the constants which can be
-set by the user.
-
-@subsection Library Support Definitions
-
-@itemize @bullet
-@item CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS
-@item CONFIGURE_HAS_OWN_MOUNT_TABLE
-@item CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM
-@item STACK_CHECKER_ON
-@item CONFIGURE_MEMORY_OVERHEAD
-@item CONFIGURE_EXTRA_TASK_STACKS
-@end itemize
-
-@subsection Basic System Information
-
-@itemize @bullet
-@item CONFIGURE_HAS_OWN_CONFIGURATION_TABLE
-@item CONFIGURE_INTERRUPT_STACK_MEMORY
-@item CONFIGURE_EXECUTIVE_RAM_WORK_AREA
-@item CONFIGURE_MICROSECONDS_PER_TICK
-@item CONFIGURE_TICKS_PER_TIMESLICE
-@end itemize
-
-NOTE: The required size of the Executive RAM Work Area is calculated
-automatically when using the @code{confdefs.h} mechanism.
-
-@subsection Device Driver Table
-
-@itemize @bullet
-@item CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE
-@item CONFIGURE_HAS_OWN_NUMBER_OF_DEVICES
-@item CONFIGURE_MAXIMUM_DEVICES
-@item CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-@item CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-@item CONFIGURE_TEST_NEEDS_STUB_DRIVER
-@end itemize
-
-@subsection Multiprocessing Configuration
-
-@itemize @bullet
-@item CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE
-@item CONFIGURE_MP_NODE_NUMBER
-@item CONFIGURE_MP_MAXIMUM_NODES
-@item CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS
-@item CONFIGURE_MP_MAXIMUM_PROXIES
-@item CONFIGURE_MP_MPCI_TABLE_POINTER
-@end itemize
-
-@subsection Classic API Configuration
-
-@itemize @bullet
-@item CONFIGURE_MAXIMUM_TASKS
-@item CONFIGURE_MAXIMUM_TIMERS
-@item CONFIGURE_MAXIMUM_SEMAPHORES
-@item CONFIGURE_MAXIMUM_MESSAGE_QUEUES
-@item CONFIGURE_MAXIMUM_PARTITIONS
-@item CONFIGURE_MAXIMUM_REGIONS
-@item CONFIGURE_MAXIMUM_PORTS
-@item CONFIGURE_MAXIMUM_PERIODS
-@item CONFIGURE_MAXIMUM_USER_EXTENSIONS
-@end itemize
-
-@subsection Initialization Tasks Table Configuration
-
-@itemize @bullet
-@item CONFIGURE_INIT_TASK_NAME
-@item CONFIGURE_INIT_TASK_STACK_SIZE
-@item CONFIGURE_INIT_TASK_PRIORITY
-@item CONFIGURE_INIT_TASK_ATTRIBUTES
-@item CONFIGURE_INIT_TASK_ENTRY_POINT
-@item CONFIGURE_INIT_TASK_INITIAL_MODES
-@item CONFIGURE_INIT_TASK_ARGUMENTS
-@end itemize
-
-
-@subsection POSIX API Configuration
-
-@itemize @bullet
-@item CONFIGURE_MAXIMUM_POSIX_THREADS
-@item CONFIGURE_MAXIMUM_POSIX_MUTEXES
-@item CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES
-@item CONFIGURE_MAXIMUM_POSIX_KEYS
-@item CONFIGURE_MAXIMUM_POSIX_TIMERS
-@item CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS
-@item CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES
-@item CONFIGURE_MAXIMUM_POSIX_SEMAPHORES
-@end itemize
-
-@subsection POSIX Initialization Thread Table Configuration
-
-@itemize @bullet
-@item CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT
-@item CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE
-@end itemize
-
-@subsection ITRON API Configuration
-
-@itemize @bullet
-@item CONFIGURE_MAXIMUM_ITRON_TASKS
-@item CONFIGURE_MAXIMUM_ITRON_SEMAPHORES
-@item CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS
-@item CONFIGURE_MAXIMUM_ITRON_MAILBOXES
-@item CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS
-@item CONFIGURE_MAXIMUM_ITRON_PORTS
-@item CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS
-@item CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS
-@end itemize
-
-@subsection ITRON Initialization Task Table Configuration
-
-@itemize @bullet
-@item CONFIGURE_ITRON_INIT_TASK_ENTRY_POINT
-@item CONFIGURE_ITRON_INIT_TASK_ATTRIBUTES
-@item CONFIGURE_ITRON_INIT_TASK_PRIORITY
-@item CONFIGURE_ITRON_INIT_TASK_STACK_SIZE
-@item CONFIGURE_ITRON_INIT_TASK_STACK_SIZES
-@end itemize
-
-@subsection Ada Tasks
-
-@itemize @bullet
-@item CONFIGURE_MAXIMUM_ADA_TASKS
-@item CONFIGURE_MAXIMUM_FAKE_ADA_TASKS
-@end itemize
-
-@section Configuration Table
-
-@cindex Configuration Table
-@cindex RTEMS Configuration Table
-
-The RTEMS Configuration Table is used to tailor an
-application for its specific needs. For example, the user can
-configure the number of device drivers or which APIs may be used.
-THe address of the user-defined Configuration Table is passed as an
-argument to the @code{@value{DIRPREFIX}initialize_executive}
-directive, which MUST be the first RTEMS directive called.
-The RTEMS Configuration Table
-is defined in the following @value{LANGUAGE} @value{STRUCTURE}:
-
-@ifset is-C
-@example
-@group
-typedef struct @{
- void *work_space_start;
- rtems_unsigned32 work_space_size;
- rtems_unsigned32 maximum_extensions;
- rtems_unsigned32 microseconds_per_tick;
- rtems_unsigned32 ticks_per_timeslice;
- rtems_unsigned32 maximum_devices;
- rtems_unsigned32 number_of_device_drivers;
- rtems_driver_address_table *Device_driver_table;
- rtems_unsigned32 number_of_initial_extensions;
- rtems_extensions_table *User_extension_table;
- rtems_multiprocessing_table *User_multiprocessing_table;
- rtems_api_configuration_table *RTEMS_api_configuration;
- posix_api_configuration_table *POSIX_api_configuration;
-@} rtems_configuration_table;
-@end group
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-type Configuration_Table is
- record
- Work_Space_Start : RTEMS.Address;
- Work_Space_Size : RTEMS.Unsigned32;
- Maximum_Extensions : RTEMS.Unsigned32;
- Microseconds_Per_Tick : RTEMS.Unsigned32;
- Ticks_Per_Timeslice : RTEMS.Unsigned32;
- Maximum_Devices : RTEMS.Unsigned32;
- Number_Of_Device_Drivers : RTEMS.Unsigned32;
- Device_Driver_Table :
- RTEMS.Driver_Address_Table_Pointer;
- Number_Of_Initial_Extensions : RTEMS.Unsigned32;
- User_Extension_Table : RTEMS.Extensions_Table_Pointer;
- User_Multiprocessing_Table :
- RTEMS.Multiprocessing_Table_Pointer;
- RTEMS_API_Configuration :
- RTEMS.API_Configuration_Table_Pointer;
- POSIX_API_Configuration :
- RTEMS.POSIX_API_Configuration_Table_Pointer;
- end record;
-
-type Configuration_Table_Pointer is access all Configuration_Table;
-@end example
-@end ifset
-
-@table @b
-@item work_space_start
-is the address of the RTEMS RAM Workspace.
-This area contains items such as the
-various object control blocks (TCBs, QCBs, ...) and task stacks.
-If the address is not aligned on a four-word boundary, then
-RTEMS will invoke the fatal error handler during
-@code{@value{DIRPREFIX}initialize_executive}.
-When using the @code{confdefs.h} mechanism for configuring
-an RTEMS application, the value for this field corresponds
-to the setting of the macro @code{CONFIGURE_EXECUTIVE_RAM_WORK_AREA}.
-
-@item work_space_size
-is the calculated size of the
-RTEMS RAM Workspace. The section Sizing the RTEMS RAM Workspace
-details how to arrive at this number.
-When using the @code{confdefs.h} mechanism for configuring
-an RTEMS application, the value for this field corresponds
-to the setting of the macro @code{CONFIGURE_EXECUTIVE_RAM_SIZE}
-and is calculated based on the other system configuration settings.
-
-@item microseconds_per_tick
-is number of microseconds per clock tick.
-When using the @code{confdefs.h} mechanism for configuring
-an RTEMS application, the value for this field corresponds
-to the setting of the macro @code{CONFIGURE_MICROSECONDS_PER_TICK}.
-If not defined by the application, then the @code{CONFIGURE_MAXIMUM_TASKS}
-macro defaults to 10.
-XXX
-
-@item ticks_per_timeslice
-is the number of clock ticks for a timeslice.
-When using the @code{confdefs.h} mechanism for configuring
-an RTEMS application, the value for this field corresponds
-to the setting of the macro @code{CONFIGURE_TICKS_PER_TIMESLICE}.
-
-@item maximum_devices
-is the maximum number of devices that can be registered.
-When using the @code{confdefs.h} mechanism for configuring
-an RTEMS application, the value for this field corresponds
-to the setting of the macro @code{CONFIGURE_MAXIMUM_DEVICES}.
-
-@item number_of_device_drivers
-is the number of device drivers for the system. There should be
-the same number of entries in the Device Driver Table. If this field
-is zero, then the @code{User_driver_address_table} entry should be NULL.
-When using the @code{confdefs.h} mechanism for configuring
-an RTEMS application, the value for this field is calculated
-automatically based on the number of entries in the
-Device Driver Table. This calculation is based on the assumption
-that the Device Driver Table is named @code{Device_drivers}
-and defined in C. This table may be generated automatically
-for simple applications using only the device drivers that correspond
-to the following macros:
-
-@itemize @bullet
-
-@item @code{CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER}
-@item @code{CONFIGURE_TEST_NEEDS_CLOCK_DRIVER}
-@item @code{CONFIGURE_TEST_NEEDS_TIMER_DRIVER}
-@item @code{CONFIGURE_TEST_NEEDS_RTC_DRIVER}
-@item @code{CONFIGURE_TEST_NEEDS_STUB_DRIVER}
-
-@end itemize
-
-Note that network device drivers are not configured in the
-Device Driver Table.
-
-@item Device_driver_table
-is the address of the Device Driver Table. This table contains the entry
-points for each device driver. If the number_of_device_drivers field is zero,
-then this entry should be NULL. The format of this table will be
-discussed below.
-When using the @code{confdefs.h} mechanism for configuring
-an RTEMS application, the Device Driver Table is assumed to be
-named @code{Device_drivers} and defined in C. If the application is providing
-its own Device Driver Table, then the macro
-@code{CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE} must be defined to indicate
-this and prevent @code{confdefs.h} from generating the table.
-
-@item number_of_initial_extensions
-is the number of initial user extensions. There should be
-the same number of entries as in the User_extension_table. If this field
-is zero, then the User_driver_address_table entry should be NULL.
-When using the @code{confdefs.h} mechanism for configuring
-an RTEMS application, the value for this field corresponds
-to the setting of the macro @code{CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS}
-which is set automatically by @code{confdefs.h} based on the size
-of the User Extensions Table.
-
-@item User_extension_table
-is the address of the User
-Extension Table. This table contains the entry points for the
-static set of optional user extensions. If no user extensions
-are configured, then this entry should be NULL. The format of
-this table will be discussed below.
-When using the @code{confdefs.h} mechanism for configuring
-an RTEMS application, the User Extensions Table is named
-@code{Configuration_Initial_Extensions} and defined in
-confdefs.h. It is initialized based on the following
-macros:
-
-@itemize @bullet
-
-@item @code{CONFIGURE_INITIAL_EXTENSIONS}
-@item @code{STACK_CHECKER_EXTENSION}
-
-@end itemize
-
-The application may configure one or more initial user extension
-sets by setting the @code{CONFIGURE_INITIAL_EXTENSIONS} macro. By
-defining the @code{STACK_CHECKER_EXTENSION} macro, the task stack bounds
-checking user extension set is automatically included in the
-application.
-
-@item User_multiprocessing_table
-is the address of the Multiprocessor Configuration Table. This
-table contains information needed by RTEMS only when used in a multiprocessor
-configuration. This field must be NULL when RTEMS is used in a
-single processor configuration.
-When using the @code{confdefs.h} mechanism for configuring
-an RTEMS application, the Multiprocessor Configuration Table
-is automatically generated when the @code{CONFIGURE_MPTEST}
-is defined. If @code{CONFIGURE_MPTEST} is not defined, the this
-entry is set to NULL. The generated table has the name
-@code{Multiprocessing_configuration}.
-
-@item RTEMS_api_configuration
-is the address of the RTEMS API Configuration Table. This table
-contains information needed by the RTEMS API. This field should be
-NULL if the RTEMS API is not used. [NOTE: Currently the RTEMS API
-is required to support support components such as BSPs and libraries
-which use this API.] This table is built automatically and this
-entry filled in, if using the @code{confdefs.h} application
-configuration mechanism. The generated table has the name
-@code{Configuration_RTEMS_API}.
-
-@item POSIX_api_configuration
-is the address of the POSIX API Configuration Table. This table
-contains information needed by the POSIX API. This field should be
-NULL if the POSIX API is not used. This table is built automatically
-and this entry filled in, if using the @code{confdefs.h} application
-configuration mechanism. The @code{confdefs.h} application
-mechanism will fill this field in with the address of the
-@code{Configuration_POSIX_API} table of POSIX API is configured
-and NULL if the POSIX API is not configured.
-
-@end table
-
-@section RTEMS API Configuration Table
-
-@cindex RTEMS API Configuration Table
-
-The RTEMS API Configuration Table is used to configure the
-managers which constitute the RTEMS API for a particular application.
-For example, the user can configure the maximum number of tasks for
-this application. The RTEMS API Configuration Table is defined in
-the following @value{LANGUAGE} @value{STRUCTURE}:
-
-@ifset is-C
-@example
-@group
-typedef struct @{
- rtems_unsigned32 maximum_tasks;
- rtems_unsigned32 maximum_timers;
- rtems_unsigned32 maximum_semaphores;
- rtems_unsigned32 maximum_message_queues;
- rtems_unsigned32 maximum_partitions;
- rtems_unsigned32 maximum_regions;
- rtems_unsigned32 maximum_ports;
- rtems_unsigned32 maximum_periods;
- rtems_unsigned32 number_of_initialization_tasks;
- rtems_initialization_tasks_table *User_initialization_tasks_table;
-@} rtems_api_configuration_table;
-@end group
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-type API_Configuration_Table is
- record
- Maximum_Tasks : RTEMS.Unsigned32;
- Maximum_Timers : RTEMS.Unsigned32;
- Maximum_Semaphores : RTEMS.Unsigned32;
- Maximum_Message_queues : RTEMS.Unsigned32;
- Maximum_Partitions : RTEMS.Unsigned32;
- Maximum_Regions : RTEMS.Unsigned32;
- Maximum_Ports : RTEMS.Unsigned32;
- Maximum_Periods : RTEMS.Unsigned32;
- Number_Of_Initialization_Tasks : RTEMS.Unsigned32;
- User_Initialization_Tasks_Table :
- RTEMS.Initialization_Tasks_Table_Pointer;
- end record;
-
-type API_Configuration_Table_Pointer is
- access all API_Configuration_Table;
-@end example
-@end ifset
-
-@table @b
-@item maximum_tasks
-is the maximum number of tasks that
-can be concurrently active (created) in the system including
-initialization tasks.
-When using the @code{confdefs.h} mechanism for configuring
-an RTEMS application, the value for this field corresponds
-to the setting of the macro @code{CONFIGURE_MAXIMUM_TASKS}.
-If not defined by the application, then the @code{CONFIGURE_MAXIMUM_TASKS}
-macro defaults to 10.
-
-@item maximum_timers
-is the maximum number of timers
-that can be concurrently active in the system.
-When using the @code{confdefs.h} mechanism for configuring
-an RTEMS application, the value for this field corresponds
-to the setting of the macro @code{CONFIGURE_MAXIMUM_TIMERS}.
-If not defined by the application, then the @code{CONFIGURE_MAXIMUM_TIMERS}
-macro defaults to 0.
-
-@item maximum_semaphores
-is the maximum number of
-semaphores that can be concurrently active in the system.
-When using the @code{confdefs.h} mechanism for configuring
-an RTEMS application, the value for this field corresponds
-to the setting of the macro @code{CONFIGURE_MAXIMUM_SEMAPHORES}.
-If not defined by the application, then the @code{CONFIGURE_MAXIMUM_SEMAPHORES}
-macro defaults to 0.
-
-@item maximum_message_queues
-is the maximum number of
-message queues that can be concurrently active in the system.
-When using the @code{confdefs.h} mechanism for configuring
-an RTEMS application, the value for this field corresponds
-to the setting of the macro @code{CONFIGURE_MAXIMUM_MESSAGE_QUEUES}.
-If not defined by the application, then the
-@code{CONFIGURE_MAXIMUM_MESSAGE_QUEUES} macro defaults to 0.
-
-@item maximum_partitions
-is the maximum number of
-partitions that can be concurrently active in the system.
-When using the @code{confdefs.h} mechanism for configuring
-an RTEMS application, the value for this field corresponds
-to the setting of the macro @code{CONFIGURE_MAXIMUM_PARTITIONS}.
-If not defined by the application, then the @code{CONFIGURE_MAXIMUM_PARTITIONS}
-macro defaults to 0.
-
-@item maximum_regions
-is the maximum number of regions
-that can be concurrently active in the system.
-When using the @code{confdefs.h} mechanism for configuring
-an RTEMS application, the value for this field corresponds
-to the setting of the macro @code{CONFIGURE_MAXIMUM_REGIONS}.
-If not defined by the application, then the @code{CONFIGURE_MAXIMUM_REGIONS}
-macro defaults to 0.
-
-@item maximum_ports
-is the maximum number of ports into
-dual-port memory areas that can be concurrently active in the
-system.
-When using the @code{confdefs.h} mechanism for configuring
-an RTEMS application, the value for this field corresponds
-to the setting of the macro @code{CONFIGURE_MAXIMUM_PORTS}.
-If not defined by the application, then the @code{CONFIGURE_MAXIMUM_PORTS}
-macro defaults to 0.
-
-@item number_of_initialization_tasks
-is the number of initialization tasks configured. At least one
-RTEMS initialization task or POSIX initializatin must be configured
-in order for the user's application to begin executing.
-When using the @code{confdefs.h} mechanism for configuring
-an RTEMS application, the user must define the
-@code{CONFIGURE_RTEMS_INIT_TASKS_TABLE} to indicate that there
-is one or more RTEMS initialization task. If the application
-only has one RTEMS initialization task, then the automatically
-generated Initialization Task Table will be sufficient. The following
-macros correspond to the single initialization task:
-
-@itemize @bullet
-
-@item @code{CONFIGURE_INIT_TASK_NAME} - is the name of the task.
-If this macro is not defined by the application, then this defaults
-to the task name of @code{"UI1 "} for User Initialization Task 1.
-
-@item @code{CONFIGURE_INIT_TASK_STACK_SIZE} - is the stack size
-of the single initialization task. If this macro is not defined
-by the application, then this defaults to @code{RTEMS_MINIMUM_STACK_SIZE}.
-
-@item @code{CONFIGURE_INIT_TASK_PRIORITY} - is the initial priority
-of the single initialization task. If this macro is not defined
-by the application, then this defaults to 1.
-
-@item @code{CONFIGURE_INIT_TASK_ATTRIBUTES} - is the attributes
-of the single initialization task. If this macro is not defined
-by the application, then this defaults to @code{RTEMS_DEFAULT_ATTRIBUTES}.
-
-@item @code{CONFIGURE_INIT_TASK_ENTRY_POINT} - is the entry point
-of the single initialization task. If this macro is not defined
-by the application, then this defaults to the C language routine
-@code{Init}.
-
-@item @code{CONFIGURE_INIT_TASK_INITIAL_MODES} - is the initial execution
-modes of the single initialization task. If this macro is not defined
-by the application, then this defaults to @code{RTEMS_NO_PREEMPT}.
-
-@item @code{CONFIGURE_INIT_TASK_ARGUMENTS} - is the argument passed to the
-of the single initialization task. If this macro is not defined
-by the application, then this defaults to 0.
-
-
-@end itemize
-
-
-has the option to have
- value for this field corresponds
-to the setting of the macro @code{}.
-
-@item User_initialization_tasks_table
-is the address of the Initialization Task Table. This table contains the
-information needed to create and start each of the
-initialization tasks. The format of this table will be discussed below.
-When using the @code{confdefs.h} mechanism for configuring
-an RTEMS application, the value for this field corresponds
-to the setting of the macro @code{CONFIGURE_EXECUTIVE_RAM_WORK_AREA}.
-
-@end table
-
-@section POSIX API Configuration Table
-
-@cindex POSIX API Configuration Table
-
-The POSIX API Configuration Table is used to configure the
-managers which constitute the POSIX API for a particular application.
-For example, the user can configure the maximum number of threads for
-this application. The POSIX API Configuration Table is defined in
-the following @value{LANGUAGE} @value{STRUCTURE}:
-
-@ifset is-C
-@example
-@group
-typedef struct @{
- void *(*thread_entry)(void *);
-@} posix_initialization_threads_table;
-
-typedef struct @{
- int maximum_threads;
- int maximum_mutexes;
- int maximum_condition_variables;
- int maximum_keys;
- int maximum_timers;
- int maximum_queued_signals;
- int number_of_initialization_tasks;
- posix_initialization_threads_table *User_initialization_tasks_table;
-@} posix_api_configuration_table;
-@end group
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
- type POSIX_Thread_Entry is access procedure (
- Argument : in RTEMS.Address
- );
-
- type POSIX_Initialization_Threads_Table_Entry is
- record
- Thread_Entry : RTEMS.POSIX_Thread_Entry;
- end record;
-
- type POSIX_Initialization_Threads_Table is array
- ( RTEMS.Unsigned32 range <> ) of
- RTEMS.POSIX_Initialization_Threads_Table_Entry;
-
- type POSIX_Initialization_Threads_Table_Pointer is access all
- POSIX_Initialization_Threads_Table;
-
- type POSIX_API_Configuration_Table_Entry is
- record
- Maximum_Threads : Interfaces.C.Int;
- Maximum_Mutexes : Interfaces.C.Int;
- Maximum_Condition_Variables : Interfaces.C.Int;
- Maximum_Keys : Interfaces.C.Int;
- Maximum_Timers : Interfaces.C.Int;
- Maximum_Queued_Signals : Interfaces.C.Int;
- Number_Of_Initialization_Tasks : Interfaces.C.Int;
- User_Initialization_Tasks_Table :
- RTEMS.POSIX_Initialization_Threads_Table_Pointer;
- end record;
-
- type POSIX_API_Configuration_Table is array
- ( RTEMS.Unsigned32 range <> ) of
- RTEMS.POSIX_API_Configuration_Table_Entry;
-
- type POSIX_API_Configuration_Table_Pointer is access all
- RTEMS.POSIX_API_Configuration_Table;
-@end example
-@end ifset
-
-@table @b
-@item maximum_threads
-is the maximum number of threads that
-can be concurrently active (created) in the system including
-initialization threads.
-When using the @code{confdefs.h} mechanism for configuring
-an RTEMS application, the value for this field corresponds
-to the setting of the macro @code{CONFIGURE_MAXIMUM_POSIX_THREADS}.
-If not defined by the application, then the
-@code{CONFIGURE_MAXIMUM_POSIX_THREADS} macro defaults to 10.
-
-@item maximum_mutexes
-is the maximum number of mutexes that can be concurrently
-active in the system.
-When using the @code{confdefs.h} mechanism for configuring
-an RTEMS application, the value for this field corresponds
-to the setting of the macro @code{CONFIGURE_MAXIMUM_POSIX_MUTEXES}.
-If not defined by the application, then the
-@code{CONFIGURE_MAXIMUM_POSIX_MUTEXES} macro defaults to 0.
-
-@item maximum_condition_variables
-is the maximum number of condition variables that can be
-concurrently active in the system.
-When using the @code{confdefs.h} mechanism for configuring
-an RTEMS application, the value for this field corresponds
-to the setting of the macro @code{CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES}.
-If not defined by the application, then the
-@code{CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES} macro defaults to 0.
-
-@item maximum_keys
-is the maximum number of keys that can be concurrently active in the system.
-When using the @code{confdefs.h} mechanism for configuring
-an RTEMS application, the value for this field corresponds
-to the setting of the macro @code{CONFIGURE_MAXIMUM_POSIX_KEYS}.
-If not defined by the application, then the
-@code{CONFIGURE_MAXIMUM_POSIX_KEYS} macro defaults to 0.
-
-@item maximum_timers
-is the maximum number of POSIX timers that can be concurrently active
-in the system.
-When using the @code{confdefs.h} mechanism for configuring
-an RTEMS application, the value for this field corresponds
-to the setting of the macro @code{CONFIGURE_MAXIMUM_POSIX_TIMERS}.
-If not defined by the application, then the
-@code{CONFIGURE_MAXIMUM_POSIX_TIMERS} macro defaults to 0.
-
-@item maximum_queued_signals
-is the maximum number of queued signals that can be concurrently
-pending in the system.
-When using the @code{confdefs.h} mechanism for configuring
-an RTEMS application, the value for this field corresponds
-to the setting of the macro @code{CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS}.
-If not defined by the application, then the
-@code{CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS} macro defaults to 0.
-
-@item number_of_initialization_threads
-is the number of initialization threads configured. At least one
-initialization threads must be configured.
-When using the @code{confdefs.h} mechanism for configuring
-an RTEMS application, the user must define the
-@code{CONFIGURE_POSIX_INIT_THREAD_TABLE} to indicate that there
-is one or more POSIX initialization thread. If the application
-only has one POSIX initialization thread, then the automatically
-generated POSIX Initialization Thread Table will be sufficient. The following
-macros correspond to the single initialization task:
-
-@itemize @bullet
-
-@item @code{CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT} - is the entry
-point of the thread. If this macro is not defined by the application,
-then this defaults to the C routine @code{POSIX_Init}.
-
-@item @code{CONFIGURE_POSIX_INIT_TASK_STACK_SIZE} - is the stack size
-of the single initialization thread. If this macro is not defined
-by the application, then this defaults to
-@code{(RTEMS_MINIMUM_STACK_SIZE * 2)}.
-
-@end itemize
-
-@item User_initialization_threads_table
-is the address of the Initialization Threads Table. This table contains the
-information needed to create and start each of the initialization threads.
-The format of each entry in this table is defined in the
-@code{posix_initialization_threads_table} @value{STRUCTURE}.
-When using the @code{confdefs.h} mechanism for configuring
-an RTEMS application, the value for this field corresponds
-to the address of the @code{POSIX_Initialization_threads} structure.
-
-@end table
-
-@section CPU Dependent Information Table
-
-@cindex CPU Dependent Information Table
-
-The CPU Dependent Information Table is used to
-describe processor dependent information required by RTEMS.
-This table is generally used to supply RTEMS with information
-only known by the Board Support Package. The contents of this
-table are discussed in the CPU Dependent Information Table
-chapter of the Applications Supplement document for a specific
-target processor.
-
-The @code{confdefs.h} mechanism does not support generating this
-table. It is normally filled in by the Board Support Package.
-
-@section Initialization Task Table
-
-@cindex Initialization Tasks Table
-
-The Initialization Task Table is used to describe
-each of the user initialization tasks to the Initialization
-Manager. The table contains one entry for each initialization
-task the user wishes to create and start. The fields of this
-data structure directly correspond to arguments to the
-@code{@value{DIRPREFIX}task_create} and
-@code{@value{DIRPREFIX}task_start} directives. The number of entries is
-found in the @code{number_of_initialization_tasks} entry in the
-Configuration Table.
-
-The format of each entry in the
-Initialization Task Table is defined in the following @value{LANGUAGE}
-@value{STRUCTURE}:
-
-@ifset is-C
-@example
-typedef struct @{
- rtems_name name;
- rtems_unsigned32 stack_size;
- rtems_task_priority initial_priority;
- rtems_attribute attribute_set;
- rtems_task_entry entry_point;
- rtems_mode mode_set;
- rtems_task_argument argument;
-@} rtems_initialization_tasks_table;
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-type Initialization_Tasks_Table_Entry is
- record
- Name : RTEMS.Name; -- task name
- Stack_Size : RTEMS.Unsigned32; -- task stack size
- Initial_Priority : RTEMS.Task_priority; -- task priority
- Attribute_Set : RTEMS.Attribute; -- task attributes
- Entry_Point : RTEMS.Task_Entry; -- task entry point
- Mode_Set : RTEMS.Mode; -- task initial mode
- Argument : RTEMS.Unsigned32; -- task argument
- end record;
-
-type Initialization_Tasks_Table is array
- ( RTEMS.Unsigned32 range <> ) of
- RTEMS.Initialization_Tasks_Table_Entry;
-
-type Initialization_Tasks_Table_Pointer is access all
- Initialization_Tasks_Table;
-@end example
-@end ifset
-
-@table @b
-@item name
-is the name of this initialization task.
-
-@item stack_size
-is the size of the stack for this initialization task.
-
-@item initial_priority
-is the priority of this initialization task.
-
-@item attribute_set
-is the attribute set used during creation of this initialization task.
-
-@item entry_point
-is the address of the entry point of this initialization task.
-
-@item mode_set
-is the initial execution mode of this initialization task.
-
-@item argument
-is the initial argument for this initialization task.
-
-@end table
-
-A typical declaration for an Initialization Task Table might appear as follows:
-
-@ifset is-C
-@example
-rtems_initialization_tasks_table
-Initialization_tasks[2] = @{
- @{ INIT_1_NAME,
- 1024,
- 1,
- DEFAULT_ATTRIBUTES,
- Init_1,
- DEFAULT_MODES,
- 1
-
- @},
- @{ INIT_2_NAME,
- 1024,
- 250,
- FLOATING_POINT,
- Init_2,
- NO_PREEMPT,
- 2
-
- @}
-@};
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-Initialization_Tasks : aliased
- RTEMS.Initialization_Tasks_Table( 1 .. 2 ) := (
- (INIT_1_NAME,
- 1024,
- 1,
- RTEMS.Default_Attributes,
- Init_1'Access,
- RTEMS.Default_Modes,
- 1),
- (INIT_2_NAME,
- 1024,
- 250,
- RTEMS.Floating_Point,
- Init_2'Access,
- RTEMS.No_Preempt,
- 2)
-);
-@end example
-@end ifset
-
-@section Driver Address Table
-
-@cindex Device Driver Table
-
-The Device Driver Table is used to inform the I/O
-Manager of the set of entry points for each device driver
-configured in the system. The table contains one entry for each
-device driver required by the application. The number of
-entries is defined in the number_of_device_drivers entry in the
-Configuration Table. The format of each entry in the Device
-Driver Table is defined in
-the following @value{LANGUAGE} @value{STRUCTURE}:
-
-@ifset is-C
-@example
-typedef struct @{
- rtems_device_driver_entry initialization;
- rtems_device_driver_entry open;
- rtems_device_driver_entry close;
- rtems_device_driver_entry read;
- rtems_device_driver_entry write;
- rtems_device_driver_entry control;
-@} rtems_driver_address_table;
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-type Driver_Address_Table_Entry is
- record
- Initialization : RTEMS.Device_Driver_Entry;
- Open : RTEMS.Device_Driver_Entry;
- Close : RTEMS.Device_Driver_Entry;
- Read : RTEMS.Device_Driver_Entry;
- Write : RTEMS.Device_Driver_Entry;
- Control : RTEMS.Device_Driver_Entry;
- end record;
-
-type Driver_Address_Table is array ( RTEMS.Unsigned32 range <> ) of
- RTEMS.Driver_Address_Table_Entry;
-
-type Driver_Address_Table_Pointer is access all Driver_Address_Table;
-@end example
-@end ifset
-
-@table @b
-@item initialization
-is the address of the entry point called by
-@code{@value{DIRPREFIX}io_initialize}
-to initialize a device driver and its associated devices.
-
-@item open
-is the address of the entry point called by @code{@value{DIRPREFIX}io_open}.
-
-@item close
-is the address of the entry point called by @code{@value{DIRPREFIX}io_close}.
-
-@item read
-is the address of the entry point called by @code{@value{DIRPREFIX}io_read}.
-
-@item write
-is the address of the entry point called by @code{@value{DIRPREFIX}io_write}.
-
-@item control
-is the address of the entry point called by @code{@value{DIRPREFIX}io_control}.
-
-@end table
-
-Driver entry points configured as NULL will always
-return a status code of @code{@value{RPREFIX}SUCCESSFUL}. No user code will be
-executed in this situation.
-
-A typical declaration for a Device Driver Table might appear as follows:
-
-@ifset is-C
-@example
-rtems_driver_address_table Driver_table[2] = @{
- @{ tty_initialize, tty_open, tty_close, /* major = 0 */
- tty_read, tty_write, tty_control
- @},
- @{ lp_initialize, lp_open, lp_close, /* major = 1 */
- NULL, lp_write, lp_control
- @}
-@};
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-@end example
-@end ifset
-
-More information regarding the construction and
-operation of device drivers is provided in the I/O Manager
-chapter.
-
-@section User Extensions Table
-
-@cindex User Extensions Table
-
-The User Extensions Table is used to inform RTEMS of
-the optional user-supplied static extension set. This table
-contains one entry for each possible extension. The entries are
-called at critical times in the life of the system and
-individual tasks. The application may create dynamic extensions
-in addition to this single static set. The format of each entry
-in the User Extensions Table is defined in the following @value{LANGUAGE}
-@value{STRUCTURE}:
-
-@ifset is-C
-@example
-typedef User_extensions_routine rtems_extension;
-typedef User_extensions_thread_create_extension
- rtems_task_create_extension;
-typedef User_extensions_thread_delete_extension
- rtems_task_delete_extension;
-typedef User_extensions_thread_start_extension
- rtems_task_start_extension;
-typedef User_extensions_thread_restart_extension
- rtems_task_restart_extension;
-typedef User_extensions_thread_switch_extension
- rtems_task_switch_extension;
-typedef User_extensions_thread_begin_extension
- rtems_task_begin_extension;
-typedef User_extensions_thread_exitted_extension
- rtems_task_exitted_extension;
-typedef User_extensions_fatal_extension rtems_fatal_extension;
-
-typedef User_extensions_Table rtems_extensions_table;
-
-typedef struct @{
- rtems_task_create_extension thread_create;
- rtems_task_start_extension thread_start;
- rtems_task_restart_extension thread_restart;
- rtems_task_delete_extension thread_delete;
- rtems_task_switch_extension thread_switch;
- rtems_task_begin_extension thread_begin;
- rtems_task_exitted_extension thread_exitted;
- rtems_fatal_extension fatal;
-@} User_extensions_Table;
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-type Extensions_Table_Entry is
- record
- Thread_Create : RTEMS.Thread_Create_Extension;
- Thread_Start : RTEMS.Thread_Start_Extension;
- Thread_Restart : RTEMS.Thread_Restart_Extension;
- Thread_Delete : RTEMS.Thread_Delete_Extension;
- Thread_Switch : RTEMS.Thread_Switch_Extension;
- Thread_Post_Switch : RTEMS.Thread_Post_Switch_Extension;
- Thread_Begin : RTEMS.Thread_Begin_Extension;
- Thread_Exitted : RTEMS.Thread_Exitted_Extension;
- Fatal : RTEMS.Fatal_Error_Extension;
- end record;
-@end example
-@end ifset
-
-@table @b
-
-@item thread_create
-is the address of the
-user-supplied subroutine for the TASK_CREATE extension. If this
-extension for task creation is defined, it is called from the
-task_create directive. A value of NULL indicates that no
-extension is provided.
-
-@item thread_start
-is the address of the user-supplied
-subroutine for the TASK_START extension. If this extension for
-task initiation is defined, it is called from the task_start
-directive. A value of NULL indicates that no extension is
-provided.
-
-@item thread_restart
-is the address of the user-supplied
-subroutine for the TASK_RESTART extension. If this extension
-for task re-initiation is defined, it is called from the
-task_restart directive. A value of NULL indicates that no
-extension is provided.
-
-@item thread_delete
-is the address of the user-supplied
-subroutine for the TASK_DELETE extension. If this RTEMS
-extension for task deletion is defined, it is called from the
-task_delete directive. A value of NULL indicates that no
-extension is provided.
-
-@item thread_switch
-is the address of the user-supplied
-subroutine for the task context switch extension. This
-subroutine is called from RTEMS dispatcher after the current
-task has been swapped out but before the new task has been
-swapped in. A value of NULL indicates that no extension is
-provided. As this routine is invoked after saving the current
-task's context and before restoring the heir task's context, it
-is not necessary for this routine to save and restore any
-registers.
-
-@item thread_begin
-is the address of the user-supplied
-subroutine which is invoked immediately before a task begins
-execution. It is invoked in the context of the beginning task.
-A value of NULL indicates that no extension is provided.
-
-@item thread_exitted
-is the address of the user-supplied
-subroutine which is invoked when a task exits. This procedure
-is responsible for some action which will allow the system to
-continue execution (i.e. delete or restart the task) or to
-terminate with a fatal error. If this field is set to NULL, the
-default RTEMS TASK_EXITTED handler will be invoked.
-
-@item fatal
-is the address of the user-supplied
-subroutine for the FATAL extension. This RTEMS extension of
-fatal error handling is called from the
-@code{@value{DIRPREFIX}fatal_error_occurred}
-directive. If the user's fatal error handler returns or if this
-entry is NULL then the default RTEMS fatal error handler will be
-executed.
-
-@end table
-
-A typical declaration for a User Extension Table
-which defines the TASK_CREATE, TASK_DELETE, TASK_SWITCH, and
-FATAL extension might appear as follows:
-
-@ifset is-C
-@example
-rtems_extensions_table User_extensions = @{
- task_create_extension,
- NULL,
- NULL,
- task_delete_extension,
- task_switch_extension,
- NULL,
- NULL,
- fatal_extension
-@};
-@end example
-@end ifset
-
-@ifset is-Ada
-User_Extensions : RTEMS.Extensions_Table := (
- Task_Create_Extension'Access,
- null,
- null,
- Task_Delete_Extension'Access,
- Task_Switch_Extension'Access,
- null,
- null,
- Fatal_Extension'Access
-);
-@example
-
-@end example
-@end ifset
-
-More information regarding the user extensions is
-provided in the User Extensions chapter.
-
-@section Multiprocessor Configuration Table
-
-@cindex Multiprocessor Configuration Table
-
-The Multiprocessor Configuration Table contains
-information needed when using RTEMS in a multiprocessor
-configuration. Many of the details associated with configuring
-a multiprocessor system are dependent on the multiprocessor
-communications layer provided by the user. The address of the
-Multiprocessor Configuration Table should be placed in the
-@code{User_multiprocessing_table} entry in the primary Configuration
-Table. Further details regarding many of the entries in the
-Multiprocessor Configuration Table will be provided in the
-Multiprocessing chapter.
-
-
-When using the @code{confdefs.h} mechanism for configuring
-an RTEMS application, the macro @code{CONFIGURE_MPTEST} must
-be defined to automatically generate the Multiprocessor Configuration Table.
-If @code{CONFIGURE_MPTEST}, is not defined, then a NULL pointer
-is configured as the address of this table.
-
-The format of the Multiprocessor Configuration Table is defined in
-the following @value{LANGUAGE} @value{STRUCTURE}:
-
-@ifset is-C
-@example
-typedef struct @{
- rtems_unsigned32 node;
- rtems_unsigned32 maximum_nodes;
- rtems_unsigned32 maximum_global_objects;
- rtems_unsigned32 maximum_proxies;
- rtems_mpci_table *User_mpci_table;
-@} rtems_multiprocessing_table;
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-type Multiprocessing_Table is
- record
- Node : RTEMS.Unsigned32;
- Maximum_Nodes : RTEMS.Unsigned32;
- Maximum_Global_Objects : RTEMS.Unsigned32;
- Maximum_Proxies : RTEMS.Unsigned32;
- User_MPCI_Table : RTEMS.MPCI_Table_Pointer;
- end record;
-
-type Multiprocessing_Table_Pointer is access all Multiprocessing_Table;
-@end example
-@end ifset
-
-@table @b
-@item node
-is a unique processor identifier
-and is used in routing messages between nodes in a
-multiprocessor configuration. Each processor must have a unique
-node number. RTEMS assumes that node numbers start at one and
-increase sequentially. This assumption can be used to advantage
-by the user-supplied MPCI layer. Typically, this requirement is
-made when the node numbers are used to calculate the address of
-inter-processor communication links. Zero should be avoided as
-a node number because some MPCI layers use node zero to
-represent broadcasted packets. Thus, it is recommended that
-node numbers start at one and increase sequentially.
-When using the @code{confdefs.h} mechanism for configuring
-an RTEMS application, the value for this field corresponds
-to the setting of the macro @code{CONFIGURE_MP_NODE_NUMBER}.
-If not defined by the application, then the @code{CONFIGURE_MP_NODE_NUMBER}
-macro defaults to the value of the @code{NODE_NUMBER} macro which is
-set on the compiler command line by the RTEMS Multiprocessing Test Suites.
-
-
-@item maximum_nodes
-is the number of processor nodes in the system.
-When using the @code{confdefs.h} mechanism for configuring
-an RTEMS application, the value for this field corresponds
-to the setting of the macro @code{CONFIGURE_MP_MAXIMUM_NODES}.
-If not defined by the application, then the @code{CONFIGURE_MP_MAXIMUM_NODES}
-macro defaults to the value 2.
-
-@item maximum_global_objects
-is the maximum number of global objects which can exist at any
-given moment in the entire system. If this parameter is not the
-same on all nodes in the system, then a fatal error is generated
-to inform the user that the system is inconsistent.
-When using the @code{confdefs.h} mechanism for configuring
-an RTEMS application, the value for this field corresponds
-to the setting of the macro @code{CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS}.
-If not defined by the application, then the
-@code{CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS} macro defaults to the value 32.
-
-
-@item maximum_proxies
-is the maximum number of proxies which can exist at any given moment
-on this particular node. A proxy is a substitute task control block
-which represent a task residing on a remote node when that task blocks
-on a remote object. Proxies are used in situations in which delayed
-interaction is required with a remote node.
-When using the @code{confdefs.h} mechanism for configuring
-an RTEMS application, the value for this field corresponds
-to the setting of the macro @code{CONFIGURE_MP_MAXIMUM_PROXIES}.
-If not defined by the application, then the @code{CONFIGURE_MP_MAXIMUM_PROXIES}
-macro defaults to the value 32.
-
-
-@item User_mpci_table
-is the address of the Multiprocessor Communications Interface
-Table. This table contains the entry points of user-provided functions
-which constitute the multiprocessor communications layer. This table
-must be provided in multiprocessor configurations with all
-entries configured. The format of this table and details
-regarding its entries can be found in the next section.
-When using the @code{confdefs.h} mechanism for configuring
-an RTEMS application, the value for this field corresponds
-to the setting of the macro @code{CONFIGURE_MP_MPCI_TABLE_POINTER}.
-If not defined by the application, then the
-@code{CONFIGURE_MP_MPCI_TABLE_POINTER} macro defaults to the
-address of the table named @code{MPCI_table}.
-
-
-@end table
-
-@section Multiprocessor Communications Interface Table
-
-@cindex Multiprocessor Communications Interface Table
-
-This table defines the set of callouts that must be provided by
-an Multiprocessor Communications Interface implementation.
-
-When using the @code{confdefs.h} mechanism for configuring
-an RTEMS application, the name of this table is assumed
-to be @code{MPCI_table} unless the application sets
-the @code{CONFIGURE_MP_MPCI_TABLE_POINTER} when configuring a
-multiprocessing system.
-
-The format of this table is defined in
-the following @value{LANGUAGE} @value{STRUCTURE}:
-
-@ifset is-C
-@example
-typedef struct @{
- rtems_unsigned32 default_timeout; /* in ticks */
- rtems_unsigned32 maximum_packet_size;
- rtems_mpci_initialization_entry initialization;
- rtems_mpci_get_packet_entry get_packet;
- rtems_mpci_return_packet_entry return_packet;
- rtems_mpci_send_entry send;
- rtems_mpci_receive_entry receive;
-@} rtems_mpci_table;
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-type MPCI_Table is
- record
- Default_Timeout : RTEMS.Unsigned32; -- in ticks
- Maximum_Packet_Size : RTEMS.Unsigned32;
- Initialization : RTEMS.MPCI_Initialization_Entry;
- Get_Packet : RTEMS.MPCI_Get_Packet_Entry;
- Return_Packet : RTEMS.MPCI_Return_Packet_Entry;
- Send : RTEMS.MPCI_Send_Entry;
- Receive : RTEMS.MPCI_Receive_Entry;
- end record;
-
-type MPCI_Table_Pointer is access all MPCI_Table;
-@end example
-@end ifset
-
-@table @b
-@item default_timeout
-is the default maximum length of time a task should block waiting for
-a response to a directive which results in communication with a remote node.
-The maximum length of time is a function the user supplied
-multiprocessor communications layer and the media used. This
-timeout only applies to directives which would not block if the
-operation were performed locally.
-
-@item maximum_packet_size
-is the size in bytes of the longest packet which the MPCI layer is capable
-of sending. This value should represent the total number of bytes available
-for a RTEMS interprocessor messages.
-
-@item initialization
-is the address of the entry point for the initialization procedure of the
-user supplied multiprocessor communications layer.
-
-@item get_packet
-is the address of the entry point for the procedure called by RTEMS to
-obtain a packet from the user supplied multiprocessor communications layer.
-
-@item return_packet
-is the address of the entry point for the procedure called by RTEMS to
-return a packet to the user supplied multiprocessor communications layer.
-
-@item send
-is the address of the entry point for the procedure called by RTEMS to
-send an envelope to another node. This procedure is part of the user
-supplied multiprocessor communications layer.
-
-@item receive
-is the address of the entry point for the
-procedure called by RTEMS to retrieve an envelope containing a
-message from another node. This procedure is part of the user
-supplied multiprocessor communications layer.
-
-@end table
-
-More information regarding the required functionality of these
-entry points is provided in the Multiprocessor chapter.
-
-@section Determining Memory Requirements
-
-Since memory is a critical resource in many real-time
-embedded systems, the RTEMS Classic API was specifically designed to allow
-unused managers to be forcibly excluded from the run-time environment.
-This allows the application designer the flexibility to tailor
-RTEMS to most efficiently meet system requirements while still
-satisfying even the most stringent memory constraints. As
-result, the size of the RTEMS executive is application
-dependent. A Memory Requirements worksheet is provided in the
-Applications Supplement document for a specific target
-processor. This worksheet can be used to calculate the memory
-requirements of a custom RTEMS run-time environment. To insure
-that enough memory is allocated for future versions of RTEMS,
-the application designer should round these memory requirements
-up. The following Classic API managers may be optionally excluded:
-
-@itemize @bullet
-@item signal
-@item region
-@item dual ported memory
-@item event
-@item multiprocessing
-@item partition
-@item timer
-@item semaphore
-@item message
-@item rate monotonic
-@end itemize
-
-RTEMS is designed to be built and installed as a library
-that is linked into the application. As such, much of
-RTEMS is implemented in such a way that there is a single
-entry point per source file. This avoids having the
-linker being forced to pull large object files in their
-entirety into an application when the application references
-a single symbol.
-
-RTEMS based applications must somehow provide memory
-for RTEMS' code and data space. Although RTEMS' data space must
-be in RAM, its code space can be located in either ROM or RAM.
-In addition, the user must allocate RAM for the RTEMS RAM
-Workspace. The size of this area is application dependent and
-can be calculated using the formula provided in the Memory
-Requirements chapter of the Applications Supplement document
-for a specific target processor.
-
-All private RTEMS data variables and routine names used by
-RTEMS begin with the underscore ( _ ) character followed by an
-upper-case letter. If RTEMS is linked with an application, then
-the application code should NOT contain any symbols which begin
-with the underscore character and followed by an upper-case
-letter to avoid any naming conflicts. All RTEMS directive names
-should be treated as reserved words.
-
-@section Sizing the RTEMS RAM Workspace
-
-The RTEMS RAM Workspace is a user-specified block of
-memory reserved for use by RTEMS. The application should NOT
-modify this memory. This area consists primarily of the RTEMS
-data structures whose exact size depends upon the values
-specified in the Configuration Table. In addition, task stacks
-and floating point context areas are dynamically allocated from
-the RTEMS RAM Workspace.
-
-The @code{confdefs.h} mechanism calcalutes the size
-of the RTEMS RAM Workspace automatically. It assumes that
-all tasks are floating point and that all will be allocated
-the miminum stack space. This calculation also automatically
-includes the memory that will be allocated for internal use
-by RTEMS. The following macros may be set
-by the application to make the calculation
-of memory required more accurate:
-
-@itemize @bullet
-
-CONFIGURE_MEMORY_OVERHEAD
-CONFIGURE_EXTRA_TASK_STACKS
-
-@end itemize
-
-The starting address of the RTEMS RAM Workspace must
-be aligned on a four-byte boundary. Failure to properly align
-the workspace area will result in the
-@code{@value{DIRPREFIX}fatal_error_occurred}
-directive being invoked with the
-@code{@value{RPREFIX}INVALID_ADDRESS} error code.
-
-A worksheet is provided in the @b{Memory Requirements}
-chapter of the Applications Supplement document for a specific
-target processor to assist the user in calculating the minimum
-size of the RTEMS RAM Workspace for each application. The value
-calculated with this worksheet is the minimum value that should
-be specified as the @code{work_space_size} parameter of the
-Configuration Table.
-
-The allocation of objects can operate in two modes. The default mode
-has an object number ceiling. No more than the specified number of
-objects can be allocated from the RTEMS RAM Workspace. The number of objects
-specified in the particular API Configuration table fields are
-allocated at initialisation. The second mode allows the number of
-objects to grow to use the available free memory in the RTEMS RAM Workspace.
-
-The auto-extending mode can be enabled individually for each object
-type by using the macro @code{rtems_resource_unlimited}. This takes a value
-as a parameter, and is used to set the object maximum number field in
-an API Configuration table. The value is an allocation unit size. When
-RTEMS is required to grow the object table it is grown by this
-size. The kernel will return the object memory back to the RTEMS RAM Workspace
-when an object is destroyed. The kernel will only return an allocated
-block of objects to the RTEMS RAM Workspace if at least half the allocation
-size of free objects remain allocated. RTEMS always keeps one
-allocation block of objects allocated. Here is an example of using
-@code{rtems_resource_unlimited}:
-
-@example
-#define CONFIGURE_MAXIMUM_TASKS rtems_resource_unlimited(5)
-@end example
-
-The user is cautioned that future versions of RTEMS may not have the
-same memory requirements per object. Although the value calculated is
-suficient for a particular target processor and release of RTEMS,
-memory usage is subject to change across versions and target
-processors. The user is advised to allocate somewhat more memory than
-the worksheet recommends to insure compatibility with future releases
-for a specific target processor and other target processors. To avoid
-problems, the user should recalculate the memory requirements each
-time one of the following events occurs:
-
-@itemize @bullet
-@item a configuration parameter is modified,
-@item task or interrupt stack requirements change,
-@item task floating point attribute is altered,
-@item RTEMS is upgraded, or
-@item the target processor is changed.
-@end itemize
-
-Failure to provide enough space in the RTEMS RAM
-Workspace will result in the
-@code{@value{DIRPREFIX}fatal_error_occurred} directive
-being invoked with the appropriate error code.
diff --git a/doc/user/dirstat.texi b/doc/user/dirstat.texi
deleted file mode 100644
index 649b3cfa2f..0000000000
--- a/doc/user/dirstat.texi
+++ /dev/null
@@ -1,42 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@ifinfo
-@node Directive Status Codes, Example Application, Multiprocessing Manager MULTIPROCESSING_ANNOUNCE - Announce the arrival of a packet, Top
-@end ifinfo
-@chapter Directive Status Codes
-@table @b
-@item @code{@value{RPREFIX}SUCCESSFUL} - successful completion
-@item @code{@value{RPREFIX}TASK_EXITTED} - returned from a task
-@item @code{@value{RPREFIX}MP_NOT_CONFIGURED} - multiprocessing not configured
-@item @code{@value{RPREFIX}INVALID_NAME} - invalid object name
-@item @code{@value{RPREFIX}INVALID_ID} - invalid object id
-@item @code{@value{RPREFIX}TOO_MANY} - too many
-@item @code{@value{RPREFIX}TIMEOUT} - timed out waiting
-@item @code{@value{RPREFIX}OBJECT_WAS_DELETED} - object was deleted while waiting
-@item @code{@value{RPREFIX}INVALID_SIZE} - invalid specified size
-@item @code{@value{RPREFIX}INVALID_ADDRESS} - invalid address specified
-@item @code{@value{RPREFIX}INVALID_NUMBER} - number was invalid
-@item @code{@value{RPREFIX}NOT_DEFINED} - item not initialized
-@item @code{@value{RPREFIX}RESOURCE_IN_USE} - resources outstanding
-@item @code{@value{RPREFIX}UNSATISFIED} - request not satisfied
-@item @code{@value{RPREFIX}INCORRECT_STATE} - task is in wrong state
-@item @code{@value{RPREFIX}ALREADY_SUSPENDED} - task already in state
-@item @code{@value{RPREFIX}ILLEGAL_ON_SELF} - illegal for calling task
-@item @code{@value{RPREFIX}ILLEGAL_ON_REMOTE_OBJECT} - illegal for remote object
-@item @code{@value{RPREFIX}CALLED_FROM_ISR} - invalid environment
-@item @code{@value{RPREFIX}INVALID_PRIORITY} - invalid task priority
-@item @code{@value{RPREFIX}INVALID_CLOCK} - invalid time buffer
-@item @code{@value{RPREFIX}INVALID_NODE} - invalid node id
-@item @code{@value{RPREFIX}NOT_CONFIGURED} - directive not configured
-@item @code{@value{RPREFIX}NOT_OWNER_OF_RESOURCE} - not owner of resource
-@item @code{@value{RPREFIX}NOT_IMPLEMENTED} - directive not implemented
-@item @code{@value{RPREFIX}INTERNAL_ERROR} - RTEMS inconsistency detected
-@item @code{@value{RPREFIX}NO_MEMORY} - could not get enough memory
-@end table
-
diff --git a/doc/user/dpmem.t b/doc/user/dpmem.t
deleted file mode 100644
index 7b0212810a..0000000000
--- a/doc/user/dpmem.t
+++ /dev/null
@@ -1,360 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Dual-Ported Memory Manager
-
-@cindex ports
-@cindex dual ported memory
-
-@section Introduction
-
-The dual-ported memory manager provides a mechanism
-for converting addresses between internal and external
-representations for multiple dual-ported memory areas (DPMA).
-The directives provided by the dual-ported memory manager are:
-
-@itemize @bullet
-@item @code{@value{DIRPREFIX}port_create} - Create a port
-@item @code{@value{DIRPREFIX}port_ident} - Get ID of a port
-@item @code{@value{DIRPREFIX}port_delete} - Delete a port
-@item @code{@value{DIRPREFIX}port_external_to_internal} - Convert external to internal address
-@item @code{@value{DIRPREFIX}port_internal_to_external} - Convert internal to external address
-@end itemize
-
-@section Background
-
-@cindex dual ported memory, definition
-@cindex external addresses, definition
-@cindex internal addresses, definition
-
-A dual-ported memory area (DPMA) is an contiguous
-block of RAM owned by a particular processor but which can be
-accessed by other processors in the system. The owner accesses
-the memory using internal addresses, while other processors must
-use external addresses. RTEMS defines a port as a particular
-mapping of internal and external addresses.
-
-There are two system configurations in which
-dual-ported memory is commonly found. The first is
-tightly-coupled multiprocessor computer systems where the
-dual-ported memory is shared between all nodes and is used for
-inter-node communication. The second configuration is computer
-systems with intelligent peripheral controllers. These
-controllers typically utilize the DPMA for high-performance data
-transfers.
-
-@section Operations
-
-@subsection Creating a Port
-
-The @code{@value{DIRPREFIX}port_create} directive creates a port into a DPMA
-with the user-defined name. The user specifies the association
-between internal and external representations for the port being
-created. RTEMS allocates a Dual-Ported Memory Control Block
-(DPCB) from the DPCB free list to maintain the newly created
-DPMA. RTEMS also generates a unique dual-ported memory port ID
-which is returned to the calling task. RTEMS does not
-initialize the dual-ported memory area or access any memory
-within it.
-
-@subsection Obtaining Port IDs
-
-When a port is created, RTEMS generates a unique port
-ID and assigns it to the created port until it is deleted. The
-port ID may be obtained by either of two methods. First, as the
-result of an invocation of the
-@code{@value{DIRPREFIX}port_create} directive, the task
-ID is stored in a user provided location. Second, the port ID
-may be obtained later using the
-@code{@value{DIRPREFIX}port_ident} directive. The port
-ID is used by other dual-ported memory manager directives to
-access this port.
-
-@subsection Converting an Address
-
-The @code{@value{DIRPREFIX}port_external_to_internal} directive is used to
-convert an address from external to internal representation for
-the specified port.
-The @code{@value{DIRPREFIX}port_internal_to_external} directive is
-used to convert an address from internal to external
-representation for the specified port. If an attempt is made to
-convert an address which lies outside the specified DPMA, then
-the address to be converted will be returned.
-
-@subsection Deleting a DPMA Port
-
-A port can be removed from the system and returned to
-RTEMS with the @code{@value{DIRPREFIX}port_delete} directive. When a port is deleted,
-its control block is returned to the DPCB free list.
-
-@section Directives
-
-This section details the dual-ported memory manager's
-directives. A subsection is dedicated to each of this manager's
-directives and describes the calling sequence, related
-constants, usage, and status codes.
-
-@c
-@c
-@c
-@page
-@subsection PORT_CREATE - Create a port
-
-@cindex create a port
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_port_create
-@example
-rtems_status_code rtems_port_create(
- rtems_name name,
- void *internal_start,
- void *external_start,
- rtems_unsigned32 length,
- rtems_id *id
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Port_Create (
- Name : in RTEMS.Name;
- Internal_Start : in RTEMS.Address;
- External_Start : in RTEMS.Address;
- Length : in RTEMS.Unsigned32;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - port created successfully@*
-@code{@value{RPREFIX}INVALID_NAME} - invalid task name@*
-@code{@value{RPREFIX}INVALID_ADDRESS} - address not on four byte boundary@*
-@code{@value{RPREFIX}TOO_MANY} - too many DP memory areas created
-
-@subheading DESCRIPTION:
-
-This directive creates a port which resides on the
-local node for the specified DPMA. The assigned port id is
-returned in id. This port id is used as an argument to other
-dual-ported memory manager directives to convert addresses
-within this DPMA.
-
-For control and maintenance of the port, RTEMS
-allocates and initializes an DPCB from the DPCB free pool. Thus
-memory from the dual-ported memory area is not used to store the
-DPCB.
-
-@subheading NOTES:
-
-The internal_address and external_address parameters
-must be on a four byte boundary.
-
-This directive will not cause the calling task to be
-preempted.
-
-@c
-@c
-@c
-@page
-@subsection PORT_IDENT - Get ID of a port
-
-@cindex get ID of a port
-@cindex obtain ID of a port
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_port_ident
-@example
-rtems_status_code rtems_port_ident(
- rtems_name name,
- rtems_id *id
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Port_Ident (
- Name : in RTEMS.Name;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - port identified successfully@*
-@code{@value{RPREFIX}INVALID_NAME} - port name not found
-
-@subheading DESCRIPTION:
-
-This directive obtains the port id associated with
-the specified name to be acquired. If the port name is not
-unique, then the port id will match one of the DPMAs with that
-name. However, this port id is not guaranteed to correspond to
-the desired DPMA. The port id is used to access this DPMA in
-other dual-ported memory area related directives.
-
-@subheading NOTES:
-
-This directive will not cause the running task to be
-preempted.
-
-@c
-@c
-@c
-@page
-@subsection PORT_DELETE - Delete a port
-
-@cindex delete a port
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_port_delete
-@example
-rtems_status_code rtems_port_delete(
- rtems_id id
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Port_Delete (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - port deleted successfully@*
-@code{@value{RPREFIX}INVALID_ID} - invalid port id
-
-@subheading DESCRIPTION:
-
-This directive deletes the dual-ported memory area
-specified by id. The DPCB for the deleted dual-ported memory
-area is reclaimed by RTEMS.
-
-@subheading NOTES:
-
-This directive will not cause the calling task to be
-preempted.
-
-The calling task does not have to be the task that
-created the port. Any local task that knows the port id can
-delete the port.
-
-@c
-@c
-@c
-@page
-@subsection PORT_EXTERNAL_TO_INTERNAL - Convert external to internal address
-
-@cindex convert external to internal address
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_port_external_to_internal
-@example
-rtems_status_code rtems_port_external_to_internal(
- rtems_id id,
- void *external,
- void **internal
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Port_External_To_Internal (
- ID : in RTEMS.ID;
- External : in RTEMS.Address;
- Internal : out RTEMS.Address;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - always successful
-
-@subheading DESCRIPTION:
-
-This directive converts a dual-ported memory address
-from external to internal representation for the specified port.
-If the given external address is invalid for the specified
-port, then the internal address is set to the given external
-address.
-
-@subheading NOTES:
-
-This directive is callable from an ISR.
-
-This directive will not cause the calling task to be
-preempted.
-
-@c
-@c
-@c
-@page
-@subsection PORT_INTERNAL_TO_EXTERNAL - Convert internal to external address
-
-@cindex convert internal to external address
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_port_internal_to_external
-@example
-rtems_status_code rtems_port_internal_to_external(
- rtems_id id,
- void *internal,
- void **external
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Port_Internal_To_External (
- ID : in RTEMS.ID;
- Internal : in RTEMS.Address;
- External : out RTEMS.Address;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - always successful
-
-@subheading DESCRIPTION:
-
-This directive converts a dual-ported memory address
-from internal to external representation so that it can be
-passed to owner of the DPMA represented by the specified port.
-If the given internal address is an invalid dual-ported address,
-then the external address is set to the given internal address.
-
-@subheading NOTES:
-
-This directive is callable from an ISR.
-
-This directive will not cause the calling task to be
-preempted.
-
diff --git a/doc/user/event.t b/doc/user/event.t
deleted file mode 100644
index 028881be1a..0000000000
--- a/doc/user/event.t
+++ /dev/null
@@ -1,337 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Event Manager
-
-@cindex events
-
-@section Introduction
-
-The event manager provides a high performance method
-of intertask communication and synchronization. The directives
-provided by the event manager are:
-
-@itemize @bullet
-@item @code{@value{DIRPREFIX}event_send} - Send event set to a task
-@item @code{@value{DIRPREFIX}event_receive} - Receive event condition
-@end itemize
-
-@section Background
-
-@subsection Event Sets
-
-@cindex event set, definition
-
-An event flag is used by a task (or ISR) to inform
-another task of the occurrence of a significant situation.
-Thirty-two event flags are associated with each task. A
-collection of one or more event flags is referred to as an event
-set. The application developer should remember the following
-key characteristics of event operations when utilizing the event
-manager:
-
-@itemize @bullet
-@item Events provide a simple synchronization facility.
-
-@item Events are aimed at tasks.
-
-@item Tasks can wait on more than one event simultaneously.
-
-@item Events are independent of one another.
-
-@item Events do not hold or transport data.
-
-@item Events are not queued. In other words, if an event is
-sent more than once to a task before being received, the second and
-subsequent send operations to that same task have no effect.
-@end itemize
-
-An event set is posted when it is directed (or sent) to a task. A
-pending event is an event that has been posted but not received. An event
-condition is used to specify the events which the task desires to receive
-and the algorithm which will be used to determine when the request is
-satisfied. An event condition is satisfied based upon one of two
-algorithms which are selected by the user. The
-@code{@value{RPREFIX}EVENT_ANY} algorithm states that an event condition
-is satisfied when at least a single requested event is posted. The
-@code{@value{RPREFIX}EVENT_ALL} algorithm states that an event condition
-is satisfied when every requested event is posted.
-
-@subsection Building an Event Set or Condition
-
-@cindex event condition, building
-@cindex event set, building
-
-An event set or condition is built by a bitwise OR of
-the desired events. The set of valid events is @code{@value{RPREFIX}EVENT_0} through
-@code{@value{RPREFIX}EVENT_31}. If an event is not explicitly specified in the set or
-condition, then it is not present. Events are specifically
-designed to be mutually exclusive, therefore bitwise OR and
-addition operations are equivalent as long as each event appears
-exactly once in the event set list.
-
-For example, when sending the event set consisting of
-@code{@value{RPREFIX}EVENT_6}, @code{@value{RPREFIX}EVENT_15}, and @code{@value{RPREFIX}EVENT_31},
-the event parameter to the @code{@value{DIRPREFIX}event_send}
-directive should be @code{@value{RPREFIX}EVENT_6 @value{OR}
-@value{RPREFIX}EVENT_15 @value{OR} @value{RPREFIX}EVENT_31}.
-
-@subsection Building an EVENT_RECEIVE Option Set
-
-In general, an option is built by a bitwise OR of the
-desired option components. The set of valid options for the
-@code{@value{DIRPREFIX}event_receive} directive are listed
-in the following table:
-
-@itemize @bullet
-@item @code{@value{RPREFIX}WAIT} - task will wait for event (default)
-@item @code{@value{RPREFIX}NO_WAIT} - task should not wait
-@item @code{@value{RPREFIX}EVENT_ALL} - return after all events (default)
-@item @code{@value{RPREFIX}EVENT_ANY} - return after any events
-@end itemize
-
-Option values are specifically designed to be
-mutually exclusive, therefore bitwise OR and addition operations
-are equivalent as long as each option appears exactly once in
-the component list. An option listed as a default is not
-required to appear in the option list, although it is a good
-programming practice to specify default options. If all
-defaults are desired, the option @code{@value{RPREFIX}DEFAULT_OPTIONS} should be
-specified on this call.
-
-This example demonstrates the option parameter needed
-to poll for all events in a particular event condition to
-arrive. The option parameter passed to the
-@code{@value{DIRPREFIX}event_receive} directive should be either
-@code{@value{RPREFIX}EVENT_ALL @value{OR} @value{RPREFIX}NO_WAIT}
-or @code{@value{RPREFIX}NO_WAIT}. The option parameter can be set to
-@code{@value{RPREFIX}NO_WAIT} because @code{@value{RPREFIX}EVENT_ALL} is the
-default condition for @code{@value{DIRPREFIX}event_receive}.
-
-@section Operations
-
-@subsection Sending an Event Set
-
-The @code{@value{DIRPREFIX}event_send} directive allows a task (or an ISR) to
-direct an event set to a target task. Based upon the state of
-the target task, one of the following situations applies:
-
-@itemize @bullet
-@item Target Task is Blocked Waiting for Events
-
-@itemize -
-
-@item If the waiting task's input event condition is
-satisfied, then the task is made ready for execution.
-
-@item If the waiting task's input event condition is not
-satisfied, then the event set is posted but left pending and the
-task remains blocked.
-
-@end itemize
-
-@item Target Task is Not Waiting for Events
-
-@itemize -
-@item The event set is posted and left pending.
-@end itemize
-
-@end itemize
-
-@subsection Receiving an Event Set
-
-The @code{@value{DIRPREFIX}event_receive} directive is used by tasks to
-accept a specific input event condition. The task also
-specifies whether the request is satisfied when all requested
-events are available or any single requested event is available.
-If the requested event condition is satisfied by pending
-events, then a successful return code and the satisfying event
-set are returned immediately. If the condition is not
-satisfied, then one of the following situations applies:
-
-@itemize @bullet
-@item By default, the calling task will wait forever for the
-event condition to be satisfied.
-
-@item Specifying the @code{@value{RPREFIX}NO_WAIT} option forces an immediate return
-with an error status code.
-
-@item Specifying a timeout limits the period the task will
-wait before returning with an error status code.
-@end itemize
-
-@subsection Determining the Pending Event Set
-
-A task can determine the pending event set by calling
-the @code{@value{DIRPREFIX}event_receive} directive with a value of
-@code{@value{RPREFIX}PENDING_EVENTS} for the input event condition.
-The pending events are returned to the calling task but the event
-set is left unaltered.
-
-@subsection Receiving all Pending Events
-
-A task can receive all of the currently pending
-events by calling the @code{@value{DIRPREFIX}event_receive}
-directive with a value of @code{@value{RPREFIX}ALL_EVENTS}
-for the input event condition and
-@code{@value{RPREFIX}NO_WAIT @value{OR} @value{RPREFIX}EVENT_ANY}
-for the option set. The pending events are returned to the
-calling task and the event set is cleared. If no events are
-pending then the @code{@value{RPREFIX}UNSATISFIED} status code will be returned.
-
-@section Directives
-
-This section details the event manager's directives.
-A subsection is dedicated to each of this manager's directives
-and describes the calling sequence, related constants, usage,
-and status codes.
-
-@c
-@c
-@c
-@page
-@subsection EVENT_SEND - Send event set to a task
-
-@cindex send event set to a task
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_event_send
-@example
-rtems_status_code rtems_event_send (
- rtems_id id,
- rtems_event_set event_in
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Event_Send (
- ID : in RTEMS.ID;
- Event_In : in RTEMS.Event_Set;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - event set sent successfully@*
-@code{@value{RPREFIX}INVALID_ID} - invalid task id
-
-@subheading DESCRIPTION:
-
-This directive sends an event set, event_in, to the
-task specified by id. If a blocked task's input event condition
-is satisfied by this directive, then it will be made ready. If
-its input event condition is not satisfied, then the events
-satisfied are updated and the events not satisfied are left
-pending. If the task specified by id is not blocked waiting for
-events, then the events sent are left pending.
-
-@subheading NOTES:
-
-Specifying @code{@value{RPREFIX}SELF} for id results in the event set being
-sent to the calling task.
-
-Identical events sent to a task are not queued. In
-other words, the second, and subsequent, posting of an event to
-a task before it can perform an @code{@value{DIRPREFIX}event_receive}
-has no effect.
-
-The calling task will be preempted if it has
-preemption enabled and a higher priority task is unblocked as
-the result of this directive.
-
-Sending an event set to a global task which does not
-reside on the local node will generate a request telling the
-remote node to send the event set to the appropriate task.
-
-@c
-@c
-@c
-@page
-@subsection EVENT_RECEIVE - Receive event condition
-
-@cindex receive event condition
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_event_receive
-@example
-rtems_status_code rtems_event_receive (
- rtems_event_set event_in,
- rtems_option option_set,
- rtems_interval ticks,
- rtems_event_set *event_out
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Event_Receive (
- Event_In : in RTEMS.Event_Set;
- Option_Set : in RTEMS.Option;
- Ticks : in RTEMS.Interval;
- Event_Out : out RTEMS.Event_Set;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - event received successfully@*
-@code{@value{RPREFIX}UNSATISFIED} - input event not satisfied (@code{@value{RPREFIX}NO_WAIT})@*
-@code{@value{RPREFIX}TIMEOUT} - timed out waiting for event
-
-@subheading DESCRIPTION:
-
-This directive attempts to receive the event
-condition specified in event_in. If event_in is set to
-@code{@value{RPREFIX}PENDING_EVENTS}, then the current pending events are returned in
-event_out and left pending. The @code{@value{RPREFIX}WAIT} and @code{@value{RPREFIX}NO_WAIT} options in the
-option_set parameter are used to specify whether or not the task
-is willing to wait for the event condition to be satisfied.
-@code{@value{RPREFIX}EVENT_ANY} and @code{@value{RPREFIX}EVENT_ALL} are used in the option_set parameter are
-used to specify whether a single event or the complete event set
-is necessary to satisfy the event condition. The event_out
-parameter is returned to the calling task with the value that
-corresponds to the events in event_in that were satisfied.
-
-If pending events satisfy the event condition, then
-event_out is set to the satisfied events and the pending events
-in the event condition are cleared. If the event condition is
-not satisfied and @code{@value{RPREFIX}NO_WAIT} is specified, then event_out is set to
-the currently satisfied events. If the calling task chooses to
-wait, then it will block waiting for the event condition.
-
-If the calling task must wait for the event condition
-to be satisfied, then the timeout parameter is used to specify
-the maximum interval to wait. If it is set to @code{@value{RPREFIX}NO_TIMEOUT}, then
-the calling task will wait forever.
-
-@subheading NOTES:
-
-This directive only affects the events specified in
-event_in. Any pending events that do not correspond to any of
-the events specified in event_in will be left pending.
-
-The following event receive option constants are defined by
-RTEMS:
-
-@itemize @bullet
-@item @code{@value{RPREFIX}WAIT} task will wait for event (default)
-@item @code{@value{RPREFIX}NO_WAIT} task should not wait
-@item @code{@value{RPREFIX}EVENT_ALL} return after all events (default)
-@item @code{@value{RPREFIX}EVENT_ANY} return after any events
-@end itemize
-
-A clock tick is required to support the functionality of this directive.
diff --git a/doc/user/example.texi b/doc/user/example.texi
deleted file mode 100644
index 70f6e32ea0..0000000000
--- a/doc/user/example.texi
+++ /dev/null
@@ -1,105 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@ifinfo
-@node Example Application, Glossary, Directive Status Codes, Top
-@end ifinfo
-@chapter Example Application
-
-@example
-/* example.c
- *
- * This file contains an example of a simple RTEMS
- * application. It contains a Configuration Table, a
- * user initialization task, and a simple task.
- *
- * This example assumes that a board support package exists
- * and invokes the initialize_executive() directive.
- */
-
-#include "rtems.h"
-
-rtems_task init_task();
-
-#define INIT_NAME rtems_build_name( 'A', 'B', 'C', ' ' ' )
-
-rtems_initialization_tasks_table init_task = @{
- @{ INIT_NAME, /* init task name "ABC" */
- 1024, /* init task stack size */
- 1, /* init task priority */
- DEFAULT_ATTRIBUTES, /* init task attributes */
- init_task, /* init task entry point */
- TIMESLICE, /* init task initial mode */
- 0 /* init task argument */
- @}
-@};
-
-rtems_configuration_table User_Configuration_Table = @{
- NULL, /* filled in by the BSP */
- 65536, /* executive RAM size */
- 2, /* maximum tasks */
- 0, /* maximum timers */
- 0, /* maximum semaphores */
- 0, /* maximum message queues */
- 0, /* maximum messages */
- 0, /* maximum partitions */
- 0, /* maximum regions */
- 0, /* maximum ports */
- 0, /* maximum periods */
- 0, /* maximum extensions */
- RTEMS_MILLISECONDS_TO_MICROSECONDS(10), /* number of ms in a tick */
- 1, /* num of ticks in a timeslice */
- 1, /* number of user init tasks */
- init_task_tbl, /* user init task(s) table */
- 0, /* number of device drivers */
- NULL, /* ptr to driver address table */
- NULL, /* ptr to extension table */
- NULL /* ptr to MP config table */
-@};
-
-task user_application(
- rtems_task_argument ignored
-);
-
-#define USER_APP_NAME 1 /* any 32-bit name; unique helps */
-
-rtems_task init_task(
- rtems_task_argument ignored
-)
-@{
- rtems_id tid;
-
- /* example assumes SUCCESSFUL return value */
-
- (void) rtems_task_create( USER_APP_NAME, 1, 1024,
- RTEMS_NO_PREEMPT, RTEMS_FLOATING_POINT, &tid );
- (void) rtems_task_start( tid, user_application, 0 );
- (void) rtems_task_delete( SELF );
-@}
-
-
-
-rtems_task user_application()
-
-@{
- /* application specific initialization goes here */
-
- while ( 1 ) @{ /* infinite loop */
-
- /* APPLICATION CODE GOES HERE
- *
- * This code will typically include at least one
- * directive which causes the calling task to
- * give up the processor.
- */
- @}
-@}
-@end example
-
-
-
diff --git a/doc/user/fatal.t b/doc/user/fatal.t
deleted file mode 100644
index b036611eb8..0000000000
--- a/doc/user/fatal.t
+++ /dev/null
@@ -1,170 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Fatal Error Manager
-
-@cindex fatal errors
-
-@section Introduction
-
-The fatal error manager processes all fatal or
-irrecoverable errors. The directive provided by the fatal error
-manager is:
-
-@itemize @bullet
-@item @code{@value{DIRPREFIX}fatal_error_occurred} - Invoke the fatal error handler
-@end itemize
-
-@section Background
-
-@cindex fatal error detection
-@cindex fatal error processing
-@cindex fatal error user extension
-
-The fatal error manager is called upon detection of
-an irrecoverable error condition by either RTEMS or the
-application software. Fatal errors can be detected from three
-sources:
-
-@itemize @bullet
-@item the executive (RTEMS)
-@item user system code
-@item user application code
-@end itemize
-
-RTEMS automatically invokes the fatal error manager
-upon detection of an error it considers to be fatal. Similarly,
-the user should invoke the fatal error manager upon detection of
-a fatal error.
-
-Each status or dynamic user extension set may include
-a fatal error handler. The fatal error handler in the static
-extension set can be used to provide access to debuggers and
-monitors which may be present on the target hardware. If any
-user-supplied fatal error handlers are installed, the fatal
-error manager will invoke them. If no user handlers are
-configured or if all the user handler return control to the
-fatal error manager, then the RTEMS default fatal error handler
-is invoked. If the default fatal error handler is invoked, then
-the system state is marked as failed.
-
-Although the precise behavior of the default fatal
-error handler is processor specific, in general, it will disable
-all maskable interrupts, place the error code in a known
-processor dependent place (generally either on the stack or in a
-register), and halt the processor. The precise actions of the
-RTEMS fatal error are discussed in the Default Fatal Error
-Processing chapter of the Applications Supplement document for
-a specific target processor.
-
-@section Operations
-
-@subsection Announcing a Fatal Error
-
-The @code{@value{DIRPREFIX}fatal_error_occurred} directive is invoked when a
-fatal error is detected. Before invoking any user-supplied
-fatal error handlers or the RTEMS fatal error handler, the
-@code{@value{DIRPREFIX}fatal_error_occurred}
-directive stores useful information in the
-variable @code{_Internal_errors_What_happened}. This @value{STRUCTURE}
-contains three pieces of information:
-
-@itemize @bullet
-@item the source of the error (API or executive core),
-
-@item whether the error was generated internally by the
-executive, and a
-
-@item a numeric code to indicate the error type.
-@end itemize
-
-The error type indicator is dependent on the source
-of the error and whether or not the error was internally
-generated by the executive. If the error was generated
-from an API, then the error code will be of that API's
-error or status codes. The status codes for the RTEMS
-API are in c/src/exec/rtems/headers/status.h. Those
-for the POSIX API can be found in <errno.h>.
-
-The @code{@value{DIRPREFIX}fatal_error_occurred} directive is responsible
-for invoking an optional user-supplied fatal error handler
-and/or the RTEMS fatal error handler. All fatal error handlers
-are passed an error code to describe the error detected.
-
-Occasionally, an application requires more
-sophisticated fatal error processing such as passing control to
-a debugger. For these cases, a user-supplied fatal error
-handler can be specified in the RTEMS configuration table. The
-User Extension Table field fatal contains the address of the
-fatal error handler to be executed when the
-@code{@value{DIRPREFIX}fatal_error_occurred}
-directive is called. If the field is set to NULL or if the
-configured fatal error handler returns to the executive, then
-the default handler provided by RTEMS is executed. This default
-handler will halt execution on the processor where the error
-occurred.
-
-@section Directives
-
-This section details the fatal error manager's
-directives. A subsection is dedicated to each of this manager's
-directives and describes the calling sequence, related
-constants, usage, and status codes.
-
-@c
-@c
-@c
-@page
-@subsection FATAL_ERROR_OCCURRED - Invoke the fatal error handler
-
-@cindex announce fatal error
-@cindex fatal error, announce
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_fatal_error_occurred
-@example
-void volatile rtems_fatal_error_occurred(
- rtems_unsigned32 the_error
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Fatal_Error_Occurred (
- The_Error : in RTEMS.Unsigned32
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES
-
-NONE
-
-@subheading DESCRIPTION:
-
-This directive processes fatal errors. If the FATAL
-error extension is defined in the configuration table, then the
-user-defined error extension is called. If configured and the
-provided FATAL error extension returns, then the RTEMS default
-error handler is invoked. This directive can be invoked by
-RTEMS or by the user's application code including initialization
-tasks, other tasks, and ISRs.
-
-@subheading NOTES:
-
-This directive supports local operations only.
-
-Unless the user-defined error extension takes special
-actions such as restarting the calling task, this directive WILL
-NOT RETURN to the caller.
-
-The user-defined extension for this directive may
-wish to initiate a global shutdown.
diff --git a/doc/user/glossary.texi b/doc/user/glossary.texi
deleted file mode 100644
index e19ae5fe68..0000000000
--- a/doc/user/glossary.texi
+++ /dev/null
@@ -1,771 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@ifinfo
-@node Glossary, Command and Variable Index, Example Application, Top
-@end ifinfo
-@chapter Glossary
-
-@table @b
-@item active
-A term used to describe an object
-which has been created by an application.
-
-@item aperiodic task
-A task which must execute only at
-irregular intervals and has only a soft deadline.
-
-@item application
-In this document, software which makes
-use of RTEMS.
-
-@item ASR
-see Asynchronous Signal Routine.
-
-@item asynchronous
-Not related in order or timing to
-other occurrences in the system.
-
-@item Asynchronous Signal Routine
-Similar to a hardware
-interrupt except that it is associated with a task and is run in
-the context of a task. The directives provided by the signal
-manager are used to service signals.
-
-@item awakened
-A term used to describe a task that has
-been unblocked and may be scheduled to the CPU.
-
-@item big endian
-A data representation scheme in which
-the bytes composing a numeric value are arranged such that the
-most significant byte is at the lowest address.
-
-@item bit-mapped
-A data encoding scheme in which each bit
-in a variable is used to represent something different. This
-makes for compact data representation.
-
-@item block
-A physically contiguous area of memory.
-
-@item blocked
-The task state entered by a task which has
-been previously started and cannot continue execution until the
-reason for waiting has been satisfied.
-
-@item broadcast
-To simultaneously send a message to a
-logical set of destinations.
-
-@item BSP
-see Board Support Package.
-
-@item Board Support Package
-A collection of device
-initialization and control routines specific to a particular
-type of board or collection of boards.
-
-@item buffer
-A fixed length block of memory allocated
-from a partition.
-
-@item calling convention
-The processor and compiler
-dependent rules which define the mechanism used to invoke
-subroutines in a high-level language. These rules define the
-passing of arguments, the call and return mechanism, and the
-register set which must be preserved.
-
-@item Central Processing Unit
-This term is equivalent to
-the terms processor and microprocessor.
-
-@item chain
-A data structure which allows for efficient
-dynamic addition and removal of elements. It differs from an
-array in that it is not limited to a predefined size.
-
-@item coalesce
-The process of merging adjacent holes into
-a single larger hole. Sometimes this process is referred to as
-garbage collection.
-
-@item Configuration Table
-A table which contains
-information used to tailor RTEMS for a particular application.
-
-@item context
-All of the processor registers and
-operating system data structures associated with a task.
-
-@item context switch
-Alternate term for task switch.
-Taking control of the processor from one task and transferring
-it to another task.
-
-@item control block
-A data structure used by the
-executive to define and control an object.
-
-@item core
-When used in this manual, this term refers to
-the internal executive utility functions. In the interest of
-application portability, the core of the executive should not be
-used directly by applications.
-
-@item CPU
-An acronym for Central Processing Unit.
-
-@item critical section
-A section of code which must be
-executed indivisibly.
-
-@item CRT
-An acronym for Cathode Ray Tube. Normally used
-in reference to the man-machine interface.
-
-@item deadline
-A fixed time limit by which a task must
-have completed a set of actions. Beyond this point, the results
-are of reduced value and may even be considered useless or
-harmful.
-
-@item device
-A peripheral used by the application that
-requires special operation software. See also device driver.
-
-@item device driver
-Control software for special
-peripheral devices used by the application.
-
-@item directives
-RTEMS' provided routines that provide
-support mechanisms for real-time applications.
-
-@item dispatch
-The act of loading a task's context onto
-the CPU and transferring control of the CPU to that task.
-
-@item dormant
-The state entered by a task after it is
-created and before it has been started.
-
-@item Device Driver Table
-A table which contains the
-entry points for each of the configured device drivers.
-
-@item dual-ported
-A term used to describe memory which
-can be accessed at two different addresses.
-
-@item embedded
-An application that is delivered as a
-hidden part of a larger system. For example, the software in a
-fuel-injection control system is an embedded application found
-in many late-model automobiles.
-
-@item envelope
-A buffer provided by the MPCI layer to
-RTEMS which is used to pass messages between nodes in a
-multiprocessor system. It typically contains routing
-information needed by the MPCI. The contents of an envelope are
-referred to as a packet.
-
-@item entry point
-The address at which a function or task
-begins to execute. In C, the entry point of a function is the
-function's name.
-
-@item events
-A method for task communication and
-synchronization. The directives provided by the event manager
-are used to service events.
-
-@item exception
-A synonym for interrupt.
-
-@item executing
-The task state entered by a task after it
-has been given control of the CPU.
-
-@item executive
-In this document, this term is used to
-referred to RTEMS. Commonly, an executive is a small real-time
-operating system used in embedded systems.
-
-@item exported
-An object known by all nodes in a
-multiprocessor system. An object created with the GLOBAL
-attribute will be exported.
-
-@item external address
-The address used to access
-dual-ported memory by all the nodes in a system which do not own
-the memory.
-
-@item FIFO
-An acronym for First In First Out.
-
-@item First In First Out
-A discipline for manipulating entries in a data structure.
-
-@item floating point coprocessor
-A component used in
-computer systems to enhance performance in mathematically
-intensive situations. It is typically viewed as a logical
-extension of the primary processor.
-
-@item freed
-A resource that has been released by the
-application to RTEMS.
-
-@item global
-An object that has been created with the
-GLOBAL attribute and exported to all nodes in a multiprocessor
-system.
-
-@item handler
-The equivalent of a manager, except that it
-is internal to RTEMS and forms part of the core. A handler is a
-collection of routines which provide a related set of functions.
-For example, there is a handler used by RTEMS to manage all
-objects.
-
-@item hard real-time system
-A real-time system in which a
-missed deadline causes the worked performed to have no value or
-to result in a catastrophic effect on the integrity of the
-system.
-
-@item heap
-A data structure used to dynamically allocate
-and deallocate variable sized blocks of memory.
-
-@item heterogeneous
-A multiprocessor computer system composed of dissimilar processors.
-
-@item homogeneous
-A multiprocessor computer system composed of a single type of processor.
-
-@item ID
-An RTEMS assigned identification tag used to
-access an active object.
-
-@item IDLE task
-A special low priority task which assumes
-control of the CPU when no other task is able to execute.
-
-@item interface
-A specification of the methodology used
-to connect multiple independent subsystems.
-
-@item internal address
-The address used to access
-dual-ported memory by the node which owns the memory.
-
-@item interrupt
-A hardware facility that causes the CPU
-to suspend execution, save its status, and transfer control to a
-specific location.
-
-@item interrupt level
-A mask used to by the CPU to
-determine which pending interrupts should be serviced. If a
-pending interrupt is below the current interrupt level, then the
-CPU does not recognize that interrupt.
-
-@item Interrupt Service Routine
-An ISR is invoked by the
-CPU to process a pending interrupt.
-
-@item I/O
-An acronym for Input/Output.
-
-@item ISR
-An acronym for Interrupt Service Routine.
-
-@item kernel
-In this document, this term is used as a
-synonym for executive.
-
-@item list
-A data structure which allows for dynamic
-addition and removal of entries. It is not statically limited
-to a particular size.
-
-@item little endian
-A data representation scheme in which
-the bytes composing a numeric value are arranged such that the
-least significant byte is at the lowest address.
-
-@item local
-An object which was created with the LOCAL
-attribute and is accessible only on the node it was created and
-resides upon. In a single processor configuration, all objects
-are local.
-
-@item local operation
-The manipulation of an object which
-resides on the same node as the calling task.
-
-@item logical address
-An address used by an application.
-In a system without memory management, logical addresses will
-equal physical addresses.
-
-@item loosely-coupled
-A multiprocessor configuration
-where shared memory is not used for communication.
-
-@item major number
-The index of a device driver in the
-Device Driver Table.
-
-@item manager
-A group of related RTEMS' directives which
-provide access and control over resources.
-
-@item memory pool
-Used interchangeably with heap.
-
-@item message
-A sixteen byte entity used to communicate
-between tasks. Messages are sent to message queues and stored
-in message buffers.
-
-@item message buffer
-A block of memory used to store
-messages.
-
-@item message queue
-An RTEMS object used to synchronize
-and communicate between tasks by transporting messages between
-sending and receiving tasks.
-
-@item Message Queue Control Block
-A data structure associated with each message queue used by RTEMS
-to manage that message queue.
-
-@item minor number
-A numeric value passed to a device
-driver, the exact usage of which is driver dependent.
-
-@item mode
-An entry in a task's control block that is
-used to determine if the task allows preemption, timeslicing,
-processing of signals, and the interrupt disable level used by
-the task.
-
-@item MPCI
-An acronym for Multiprocessor Communications
-Interface Layer.
-
-@item multiprocessing
-The simultaneous execution of two
-or more processes by a multiple processor computer system.
-
-@item multiprocessor
-A computer with multiple CPUs
-available for executing applications.
-
-@item Multiprocessor Communications Interface Layer
-A set
-of user-provided routines which enable the nodes in a
-multiprocessor system to communicate with one another.
-
-@item Multiprocessor Configuration Table
-The data structure defining the characteristics of the multiprocessor
-target system with which RTEMS will communicate.
-
-@item multitasking
-The alternation of execution amongst a
-group of processes on a single CPU. A scheduling algorithm is
-used to determine which process executes at which time.
-
-@item mutual exclusion
-A term used to describe the act of
-preventing other tasks from accessing a resource simultaneously.
-
-@item nested
-A term used to describe an ASR that occurs
-during another ASR or an ISR that occurs during another ISR.
-
-@item node
-A term used to reference a processor running
-RTEMS in a multiprocessor system.
-
-@item non-existent
-The state occupied by an uncreated or
-deleted task.
-
-@item numeric coprocessor
-A component used in computer
-systems to enhance performance in mathematically intensive
-situations. It is typically viewed as a logical extension of
-the primary processor.
-
-@item object
-In this document, this term is used to refer
-collectively to tasks, timers, message queues, partitions,
-regions, semaphores, ports, and rate monotonic periods. All
-RTEMS objects have IDs and user-assigned names.
-
-@item object-oriented
-A term used to describe systems
-with common mechanisms for utilizing a variety of entities.
-Object-oriented systems shield the application from
-implementation details.
-
-@item operating system
-The software which controls all
-the computer's resources and provides the base upon which
-application programs can be written.
-
-@item overhead
-The portion of the CPUs processing power
-consumed by the operating system.
-
-@item packet
-A buffer which contains the messages passed
-between nodes in a multiprocessor system. A packet is the
-contents of an envelope.
-
-@item partition
-An RTEMS object which is used to allocate
-and deallocate fixed size blocks of memory from an dynamically
-specified area of memory.
-
-@item Partition Control Block
-A data structure associated
-with each partition used by RTEMS to manage that partition.
-
-@item pending
-A term used to describe a task blocked
-waiting for an event, message, semaphore, or signal.
-
-@item periodic task
-A task which must execute at regular
-intervals and comply with a hard deadline.
-
-@item physical address
-The actual hardware address of a
-resource.
-
-@item poll
-A mechanism used to determine if an event has
-occurred by periodically checking for a particular status.
-Typical events include arrival of data, completion of an action,
-and errors.
-
-@item pool
-A collection from which resources are
-allocated.
-
-@item portability
-A term used to describe the ease with
-which software can be rehosted on another computer.
-
-@item posting
-The act of sending an event, message,
-semaphore, or signal to a task.
-
-@item preempt
-The act of forcing a task to relinquish the
-processor and dispatching to another task.
-
-@item priority
-A mechanism used to represent the relative
-importance of an element in a set of items. RTEMS uses priority
-to determine which task should execute.
-
-@item priority inheritance
-An algorithm that calls for
-the lower priority task holding a resource to have its priority
-increased to that of the highest priority task blocked waiting
-for that resource. This avoids the problem of priority
-inversion.
-
-@item priority inversion
-A form of indefinite
-postponement which occurs when a high priority tasks requests
-access to shared resource currently allocated to low priority
-task. The high priority task must block until the low priority
-task releases the resource.
-
-@item processor utilization
-The percentage of processor
-time used by a task or a set of tasks.
-
-@item proxy
-An RTEMS control structure used to represent,
-on a remote node, a task which must block as part of a remote
-operation.
-
-@item Proxy Control Block
-A data structure associated
-with each proxy used by RTEMS to manage that proxy.
-
-@item PTCB
-An acronym for Partition Control Block.
-
-@item PXCB
-An acronym for Proxy Control Block.
-
-@item quantum
-The application defined unit of time in
-which the processor is allocated.
-
-@item queue
-Alternate term for message queue.
-
-@item QCB
-An acronym for Message Queue Control Block.
-
-@item ready
-A task occupies this state when it is
-available to be given control of the CPU.
-
-@item real-time
-A term used to describe systems which are
-characterized by requiring deterministic response times to
-external stimuli. The external stimuli require that the
-response occur at a precise time or the response is incorrect.
-
-@item reentrant
-A term used to describe routines which do
-not modify themselves or global variables.
-
-@item region
-An RTEMS object which is used to allocate
-and deallocate variable size blocks of memory from a dynamically
-specified area of memory.
-
-@item Region Control Block
-A data structure associated
-with each region used by RTEMS to manage that region.
-
-@item registers
-Registers are locations physically
-located within a component, typically used for device control or
-general purpose storage.
-
-@item remote
-Any object that does not reside on the local
-node.
-
-@item remote operation
-The manipulation of an object
-which does not reside on the same node as the calling task.
-
-@item return code
-Also known as error code or return
-value.
-
-@item resource
-A hardware or software entity to which
-access must be controlled.
-
-@item resume
-Removing a task from the suspend state. If
-the task's state is ready following a call to the
-@code{@value{DIRPREFIX}task_resume}
-directive, then the task is available for scheduling.
-
-@item return code
-A value returned by RTEMS directives to
-indicate the completion status of the directive.
-
-@item RNCB
-An acronym for Region Control Block.
-
-@item round-robin
-A task scheduling discipline in which
-tasks of equal priority are executed in the order in which they
-are made ready.
-
-@item RS-232
-A standard for serial communications.
-
-@item running
-The state of a rate monotonic timer while
-it is being used to delineate a period. The timer exits this
-state by either expiring or being canceled.
-
-@item schedule
-The process of choosing which task should
-next enter the executing state.
-
-@item schedulable
-A set of tasks which can be guaranteed
-to meet their deadlines based upon a specific scheduling
-algorithm.
-
-@item segments
-Variable sized memory blocks allocated
-from a region.
-
-@item semaphore
-An RTEMS object which is used to
-synchronize tasks and provide mutually exclusive access to
-resources.
-
-@item Semaphore Control Block
-A data structure associated
-with each semaphore used by RTEMS to manage that semaphore.
-
-@item shared memory
-Memory which is accessible by
-multiple nodes in a multiprocessor system.
-
-@item signal
-An RTEMS provided mechanism to communicate
-asynchronously with a task. Upon reception of a signal, the ASR
-of the receiving task will be invoked.
-
-@item signal set
-A thirty-two bit entity which is used to
-represent a task's collection of pending signals and the signals
-sent to a task.
-
-@item SMCB
-An acronym for Semaphore Control Block.
-
-@item soft real-time system
-A real-time system in which a
-missed deadline does not compromise the integrity of the system.
-
-@item sporadic task
-A task which executes at irregular
-intervals and must comply with a hard deadline. A minimum
-period of time between successive iterations of the task can be
-guaranteed.
-
-@item stack
-A data structure that is managed using a Last
-In First Out (LIFO) discipline. Each task has a stack
-associated with it which is used to store return information
-and local variables.
-
-@item status code
-Also known as error code or return
-value.
-
-@item suspend
-A term used to describe a task that is not
-competing for the CPU because it has had a
-@code{@value{DIRPREFIX}task_suspend} directive.
-
-@item synchronous
-Related in order or timing to other
-occurrences in the system.
-
-@item system call
-In this document, this is used as an
-alternate term for directive.
-
-@item target
-The system on which the application will
-ultimately execute.
-
-@item task
-A logically complete thread of execution. The
-CPU is allocated among the ready tasks.
-
-@item Task Control Block
-A data structure associated with
-each task used by RTEMS to manage that task.
-
-@item task switch
-Alternate terminology for context
-switch. Taking control of the processor from one task and given
-to another.
-
-@item TCB
-An acronym for Task Control Block.
-
-@item tick
-The basic unit of time used by RTEMS. It is a
-user-configurable number of microseconds. The current tick
-expires when the @code{@value{DIRPREFIX}clock_tick}
-directive is invoked.
-
-@item tightly-coupled
-A multiprocessor configuration
-system which communicates via shared memory.
-
-@item timeout
-An argument provided to a number of
-directives which determines the maximum length of time an
-application task is willing to wait to acquire the resource if
-it is not immediately available.
-
-@item timer
-An RTEMS object used to invoke subprograms at
-a later time.
-
-@item Timer Control Block
-A data structure associated
-with each timer used by RTEMS to manage that timer.
-
-@item timeslicing
-A task scheduling discipline in which
-tasks of equal priority are executed for a specific period of
-time before being preempted by another task.
-
-@item timeslice
-The application defined unit of time in
-which the processor is allocated.
-
-@item TMCB
-An acronym for Timer Control Block.
-
-@item transient overload
-A temporary rise in system
-activity which may cause deadlines to be missed. Rate Monotonic
-Scheduling can be used to determine if all deadlines will be met
-under transient overload.
-
-@item user extensions
-Software routines provided by the
-application to enhance the functionality of RTEMS.
-
-@item User Extension Table
-A table which contains the
-entry points for each user extensions.
-
-@item User Initialization Tasks Table
-A table which
-contains the information needed to create and start each of the
-user initialization tasks.
-
-@item user-provided
-Alternate term for user-supplied.
-This term is used to designate any software routines which must
-be written by the application designer.
-
-@item user-supplied
-Alternate term for user-provided.
-This term is used to designate any software routines which must
-be written by the application designer.
-
-@item vector
-Memory pointers used by the processor to
-fetch the address of routines which will handle various
-exceptions and interrupts.
-
-@item wait queue
-The list of tasks blocked pending the
-release of a particular resource. Message queues, regions, and
-semaphores have a wait queue associated with them.
-
-@item yield
-When a task voluntarily releases control of the processor.
-
-@end table
-
diff --git a/doc/user/init.t b/doc/user/init.t
deleted file mode 100644
index 58045a0ab8..0000000000
--- a/doc/user/init.t
+++ /dev/null
@@ -1,416 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Initialization Manager
-
-@section Introduction
-
-The initialization manager is responsible for
-initiating and shutting down RTEMS. Initiating RTEMS involves
-creating and starting all configured initialization tasks, and
-for invoking the initialization routine for each user-supplied
-device driver. In a multiprocessor configuration, this manager
-also initializes the interprocessor communications layer. The
-directives provided by the initialization manager are:
-
-@itemize @bullet
-@item @code{@value{DIRPREFIX}initialize_executive} - Initialize RTEMS
-@item @code{@value{DIRPREFIX}initialize_executive_early} - Initialize RTEMS and do NOT Start Multitasking
-@item @code{@value{DIRPREFIX}initialize_executive_late} - Complete Initialization and Start Multitasking
-@item @code{@value{DIRPREFIX}shutdown_executive} - Shutdown RTEMS
-@end itemize
-
-@section Background
-
-@subsection Initialization Tasks
-
-@cindex initialization tasks
-
-Initialization task(s) are the mechanism by which
-RTEMS transfers initial control to the user's application.
-Initialization tasks differ from other application tasks in that
-they are defined in the User Initialization Tasks Table and
-automatically created and started by RTEMS as part of its
-initialization sequence. Since the initialization tasks are
-scheduled using the same algorithm as all other RTEMS tasks,
-they must be configured at a priority and mode which will insure
-that they will complete execution before other application tasks
-execute. Although there is no upper limit on the number of
-initialization tasks, an application is required to define at
-least one.
-
-A typical initialization task will create and start
-the static set of application tasks. It may also create any
-other objects used by the application. Initialization tasks
-which only perform initialization should delete themselves upon
-completion to free resources for other tasks. Initialization
-tasks may transform themselves into a "normal" application task.
-This transformation typically involves changing priority and
-execution mode. RTEMS does not automatically delete the
-initialization tasks.
-
-@subsection The System Initialization Task
-
-The System Initialization Task is responsible for
-initializing all device drivers. As a result, this task has a
-higher priority than all other tasks to insure that no
-application tasks executes until all device drivers are
-initialized. After device initialization in a single processor
-system, this task will delete itself.
-
-The System Initialization Task must have enough stack
-space to successfully execute the initialization routines for
-all device drivers and, in multiprocessor configurations, the
-Multiprocessor Communications Interface Layer initialization
-routine. The CPU Configuration Table contains a field which
-allows the application or BSP to increase the default amount of
-stack space allocated for this task.
-
-In multiprocessor configurations, the System
-Initialization Task does not delete itself after initializing
-the device drivers. Instead it transforms itself into the
-Multiprocessing Server which initializes the Multiprocessor
-Communications Interface Layer, verifies multiprocessor system
-consistency, and processes all requests from remote nodes.
-
-@subsection The Idle Task
-
-The Idle Task is the lowest priority task in a system
-and executes only when no other task is ready to execute. This
-task consists of an infinite loop and will be preempted when any
-other task is made ready to execute.
-
-@subsection Initialization Manager Failure
-
-The fatal_error_occurred directive will be called
-from @code{@value{DIRPREFIX}initialize_executive}
-for any of the following reasons:
-
-@itemize @bullet
-@item If either the Configuration Table or the CPU Dependent
-Information Table is not provided.
-
-@item If the starting address of the RTEMS RAM Workspace,
-supplied by the application in the Configuration Table, is NULL
-or is not aligned on a four-byte boundary.
-
-@item If the size of the RTEMS RAM Workspace is not large
-enough to initialize and configure the system.
-
-@item If the interrupt stack size specified is too small.
-
-@item If multiprocessing is configured and the node entry in
-the Multiprocessor Configuration Table is not between one and
-the maximum_nodes entry.
-
-@item If a multiprocessor system is being configured and no
-Multiprocessor Communications Interface is specified.
-
-@item If no user initialization tasks are configured. At
-least one initialization task must be configured to allow RTEMS
-to pass control to the application at the end of the executive
-initialization sequence.
-
-@item If any of the user initialization tasks cannot be
-created or started successfully.
-@end itemize
-
-@section Operations
-
-@subsection Initializing RTEMS
-
-The @code{@value{DIRPREFIX}initialize_executive}
-directive is called by the
-board support package at the completion of its initialization
-sequence. RTEMS assumes that the board support package
-successfully completed its initialization activities. The
-@code{@value{DIRPREFIX}initialize_executive}
-directive completes the initialization
-sequence by performing the following actions:
-
-@itemize @bullet
-@item Initializing internal RTEMS variables;
-@item Allocating system resources;
-@item Creating and starting the System Initialization Task;
-@item Creating and starting the Idle Task;
-@item Creating and starting the user initialization task(s); and
-@item Initiating multitasking.
-@end itemize
-
-This directive MUST be called before any other RTEMS
-directives. The effect of calling any RTEMS directives before
-@code{@value{DIRPREFIX}initialize_executive}
-is unpredictable. Many of RTEMS actions
-during initialization are based upon the contents of the
-Configuration Table and CPU Dependent Information Table. For
-more information regarding the format and contents of these
-tables, please refer to the chapter Configuring a System.
-
-The final step in the initialization sequence is the
-initiation of multitasking. When the scheduler and dispatcher
-are enabled, the highest priority, ready task will be dispatched
-to run. Control will not be returned to the board support
-package after multitasking is enabled until
-@code{@value{DIRPREFIX}shutdown_executive}
-the directive is called.
-
-The @code{@value{DIRPREFIX}initialize_executive}
-directive provides a
-conceptually simple way to initialize RTEMS. However, in
-certain cases, this mechanism cannot be used. The
-@code{@value{DIRPREFIX}initialize_executive_early}
-and @code{@value{DIRPREFIX}initialize_executive_late}
-directives are provided as an alternative mechanism for
-initializing RTEMS. The
-@code{@value{DIRPREFIX}initialize_executive_early} directive
-returns to the caller BEFORE initiating multitasking. The
-@code{@value{DIRPREFIX}initialize_executive_late}
-directive is invoked to start
-multitasking. It is critical that only one of the RTEMS
-initialization sequences be used in an application.
-
-@subsection Shutting Down RTEMS
-
-The @code{@value{DIRPREFIX}shutdown_executive} directive is invoked by the
-application to end multitasking and return control to the board
-support package. The board support package resumes execution at
-the code immediately following the invocation of the
-@code{@value{DIRPREFIX}initialize_executive} directive.
-
-@section Directives
-
-This section details the initialization manager's
-directives. A subsection is dedicated to each of this manager's
-directives and describes the calling sequence, related
-constants, usage, and status codes.
-
-@page
-@subsection INITIALIZE_EXECUTIVE - Initialize RTEMS
-
-@cindex initialize RTEMS
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_initialize_executive
-@example
-void rtems_initialize_executive(
- rtems_configuration_table *configuration_table,
- rtems_cpu_table *cpu_table
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Initialize_Executive (
- Configuration_Table : in RTEMS.Configuration_Table_Pointer;
- CPU_Table : in RTEMS.CPU_Table_Pointer
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-
-NONE
-
-@subheading DESCRIPTION:
-
-This directive is called when the board support
-package has completed its initialization to allow RTEMS to
-initialize the application environment based upon the
-information in the Configuration Table, CPU Dependent
-Information Table, User Initialization Tasks Table, Device
-Driver Table, User Extension Table, Multiprocessor Configuration
-Table, and the Multiprocessor Communications Interface (MPCI)
-Table. This directive starts multitasking and does not return
-to the caller until the @code{@value{DIRPREFIX}shutdown_executive}
-directive is invoked.
-
-@subheading NOTES:
-
-This directive MUST be the first RTEMS directive
-called and it DOES NOT RETURN to the caller until the
-@code{@value{DIRPREFIX}shutdown_executive}
-is invoked.
-
-This directive causes all nodes in the system to
-verify that certain configuration parameters are the same as
-those of the local node. If an inconsistency is detected, then
-a fatal error is generated.
-
-The application must use only one of the two
-initialization sequences:
-@code{@value{DIRPREFIX}initialize_executive} or
-@code{@value{DIRPREFIX}initialize_executive_early} and
-@code{@value{DIRPREFIX}initialize_executive_late}. The
-@code{@value{DIRPREFIX}initialize_executive}
-directive is logically equivalent to invoking
-@code{@value{DIRPREFIX}initialize_executive_early} and
-@code{@value{DIRPREFIX}initialize_executive_late}
-with no intervening actions.
-
-@page
-@subsection INITIALIZE_EXECUTIVE_EARLY - Initialize RTEMS and do NOT Start Multitasking
-
-@cindex initialize RTEMS
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_initialize_executive_early
-@example
-rtems_interrupt_level rtems_initialize_executive_early(
- rtems_configuration_table *configuration_table,
- rtems_cpu_table *cpu_table
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Initialize_Executive_Early(
- Configuration_Table : in RTEMS.Configuration_Table_Pointer;
- CPU_Table : in RTEMS.Cpu_Table;
- Level : out RTEMS.ISR_Level
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-
-NONE
-
-@subheading DESCRIPTION:
-
-This directive is called when the board support
-package has completed its initialization to allow RTEMS to
-initialize the application environment based upon the
-information in the Configuration Table, CPU Dependent
-Information Table, User Initialization Tasks Table, Device
-Driver Table, User Extension Table, Multiprocessor Configuration
-Table, and the Multiprocessor Communications Interface (MPCI)
-Table. This directive returns to the caller after completing
-the basic RTEMS initialization but before multitasking is
-initiated. The interrupt level in place when the directive is
-invoked is returned to the caller. This interrupt level should
-be the same one passed to
-@code{@value{DIRPREFIX}initialize_executive_late}.
-
-@subheading NOTES:
-
-The application must use only one of the two
-initialization sequences:
-@code{@value{DIRPREFIX}initialize_executive} or
-@code{@value{DIRPREFIX}nitialize_executive_early} and
-@code{@value{DIRPREFIX}nitialize_executive_late}.
-
-@page
-@subsection INITIALIZE_EXECUTIVE_LATE - Complete Initialization and Start Multitasking
-
-@cindex initialize RTEMS
-@cindex start multitasking
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_initialize_executive_late
-@example
-void rtems_initialize_executive_late(
- rtems_interrupt_level bsp_level
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Initialize_Executive_Late(
- BSP_Level : in RTEMS.ISR_Level
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-
-NONE
-
-@subheading DESCRIPTION:
-
-This directive is called after the
-@code{@value{DIRPREFIX}initialize_executive_early}
-directive has been called to complete
-the RTEMS initialization sequence and initiate multitasking.
-The interrupt level returned by the
-@code{@value{DIRPREFIX}initialize_executive_early}
-directive should be in bsp_level and this value is restored as
-part of this directive returning to the caller after the
-@code{@value{DIRPREFIX}shutdown_executive}
-directive is invoked.
-
-@subheading NOTES:
-
-This directive MUST be the second RTEMS directive
-called and it DOES NOT RETURN to the caller until the
-@code{@value{DIRPREFIX}shutdown_executive} is invoked.
-
-This directive causes all nodes in the system to
-verify that certain configuration parameters are the same as
-those of the local node. If an inconsistency is detected, then
-a fatal error is generated.
-
-The application must use only one of the two
-initialization sequences:
-@code{@value{DIRPREFIX}initialize_executive} or
-@code{@value{DIRPREFIX}initialize_executive_early} and
-@code{@value{DIRPREFIX}initialize_executive_late}.
-
-
-
-@page
-@subsection SHUTDOWN_EXECUTIVE - Shutdown RTEMS
-
-@cindex shutdown RTEMS
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_shutdown_executive
-@example
-void rtems_shutdown_executive(
- rtems_unsigned32 result
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Shutdown_Executive(
- result : in RTEMS.Unsigned32
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-
-NONE
-
-@subheading DESCRIPTION:
-
-This directive is called when the application wishes
-to shutdown RTEMS and return control to the board support
-package. The board support package resumes execution at the
-code immediately following the invocation of the
-@code{@value{DIRPREFIX}initialize_executive} directive.
-
-@subheading NOTES:
-
-This directive MUST be the last RTEMS directive
-invoked by an application and it DOES NOT RETURN to the caller.
-
-This directive should not be invoked until the
-executive has successfully completed initialization.
diff --git a/doc/user/intr.t b/doc/user/intr.t
deleted file mode 100644
index dac3b57141..0000000000
--- a/doc/user/intr.t
+++ /dev/null
@@ -1,467 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Interrupt Manager
-
-@section Introduction
-
-Any real-time executive must provide a mechanism for
-quick response to externally generated interrupts to satisfy the
-critical time constraints of the application. The interrupt
-manager provides this mechanism for RTEMS. This manager permits
-quick interrupt response times by providing the critical ability
-to alter task execution which allows a task to be preempted upon
-exit from an ISR. The interrupt manager includes the following
-directive:
-
-@itemize @bullet
-@item @code{@value{DIRPREFIX}interrupt_catch} - Establish an ISR
-@item @code{@value{DIRPREFIX}interrupt_disable} - Disable Interrupts
-@item @code{@value{DIRPREFIX}interrupt_enable} - Enable Interrupts
-@item @code{@value{DIRPREFIX}interrupt_flash} - Flash Interrupt
-@item @code{@value{DIRPREFIX}interrupt_is_in_progress} - Is an ISR in Progress
-@end itemize
-
-@section Background
-
-@subsection Processing an Interrupt
-
-@cindex interrupt processing
-
-The interrupt manager allows the application to
-connect a function to a hardware interrupt vector. When an
-interrupt occurs, the processor will automatically vector to
-RTEMS. RTEMS saves and restores all registers which are not
-preserved by the normal @value{LANGUAGE} calling convention
-for the target
-processor and invokes the user's ISR. The user's ISR is
-responsible for processing the interrupt, clearing the interrupt
-if necessary, and device specific manipulation.
-
-The @code{@value{DIRPREFIX}interrupt_catch}
-directive connects a procedure to
-an interrupt vector. The interrupt service routine is assumed
-to abide by these conventions and have a prototype similar to
-the following:
-
-@ifset is-C
-@example
-rtems_isr user_isr(
- rtems_vector_number vector
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure User_ISR (
- vector : in RTEMS.Vector_Number
-);
-@end example
-@end ifset
-
-The vector number argument is provided by RTEMS to
-allow the application to identify the interrupt source. This
-could be used to allow a single routine to service interrupts
-from multiple instances of the same device. For example, a
-single routine could service interrupts from multiple serial
-ports and use the vector number to identify which port requires
-servicing.
-
-To minimize the masking of lower or equal priority
-level interrupts, the ISR should perform the minimum actions
-required to service the interrupt. Other non-essential actions
-should be handled by application tasks. Once the user's ISR has
-completed, it returns control to the RTEMS interrupt manager
-which will perform task dispatching and restore the registers
-saved before the ISR was invoked.
-
-The RTEMS interrupt manager guarantees that proper
-task scheduling and dispatching are performed at the conclusion
-of an ISR. A system call made by the ISR may have readied a
-task of higher priority than the interrupted task. Therefore,
-when the ISR completes, the postponed dispatch processing must
-be performed. No dispatch processing is performed as part of
-directives which have been invoked by an ISR.
-
-Applications must adhere to the following rule if
-proper task scheduling and dispatching is to be performed:
-
-@itemize @b{ }
-
-@item @b{The interrupt manager must be used for all ISRs which
-may be interrupted by the highest priority ISR which invokes an
-RTEMS directive.}
-
-@end itemize
-
-Consider a processor which allows a numerically low
-interrupt level to interrupt a numerically greater interrupt
-level. In this example, if an RTEMS directive is used in a
-level 4 ISR, then all ISRs which execute at levels 0 through 4
-must use the interrupt manager.
-
-Interrupts are nested whenever an interrupt occurs
-during the execution of another ISR. RTEMS supports efficient
-interrupt nesting by allowing the nested ISRs to terminate
-without performing any dispatch processing. Only when the
-outermost ISR terminates will the postponed dispatching occur.
-
-@subsection RTEMS Interrupt Levels
-
-@cindex interrupt levels
-
-Many processors support multiple interrupt levels or
-priorities. The exact number of interrupt levels is processor
-dependent. RTEMS internally supports 256 interrupt levels which
-are mapped to the processor's interrupt levels. For specific
-information on the mapping between RTEMS and the target
-processor's interrupt levels, refer to the Interrupt Processing
-chapter of the Applications Supplement document for a specific
-target processor.
-
-@subsection Disabling of Interrupts by RTEMS
-
-@cindex disabling interrupts
-
-During the execution of directive calls, critical
-sections of code may be executed. When these sections are
-encountered, RTEMS disables all maskable interrupts before the
-execution of the section and restores them to the previous level
-upon completion of the section. RTEMS has been optimized to
-insure that interrupts are disabled for a minimum length of
-time. The maximum length of time interrupts are disabled by
-RTEMS is processor dependent and is detailed in the Timing
-Specification chapter of the Applications Supplement document
-for a specific target processor.
-
-Non-maskable interrupts (NMI) cannot be disabled, and
-ISRs which execute at this level MUST NEVER issue RTEMS system
-calls. If a directive is invoked, unpredictable results may
-occur due to the inability of RTEMS to protect its critical
-sections. However, ISRs that make no system calls may safely
-execute as non-maskable interrupts.
-
-@section Operations
-
-@subsection Establishing an ISR
-
-The @code{@value{DIRPREFIX}interrupt_catch}
-directive establishes an ISR for
-the system. The address of the ISR and its associated CPU
-vector number are specified to this directive. This directive
-installs the RTEMS interrupt wrapper in the processor's
-Interrupt Vector Table and the address of the user's ISR in the
-RTEMS' Vector Table. This directive returns the previous
-contents of the specified vector in the RTEMS' Vector Table.
-
-@subsection Directives Allowed from an ISR
-
-Using the interrupt manager insures that RTEMS knows
-when a directive is being called from an ISR. The ISR may then
-use system calls to synchronize itself with an application task.
-The synchronization may involve messages, events or signals
-being passed by the ISR to the desired task. Directives invoked
-by an ISR must operate only on objects which reside on the local
-node. The following is a list of RTEMS system calls that may be
-made from an ISR:
-
-@itemize @bullet
-@item Task Management
-
-@itemize -
-@item task_get_note, task_set_note, task_suspend, task_resume
-@end itemize
-
-@item Clock Management
-
-@itemize -
-@item clock_get, clock_tick
-@end itemize
-
-@item Message, Event, and Signal Management
-
-@itemize -
-@item message_queue_send, message_queue_urgent
-@item event_send
-@item signal_send
-@end itemize
-
-@item Semaphore Management
-
-@itemize -
-@item semaphore_release
-@end itemize
-
-@item Dual-Ported Memory Management
-
-@itemize -
-@item port_external_to_internal, port_internal_to_external
-@end itemize
-
-@item IO Management
-
-@itemize -
-@item io_initialize, io_open, io_close, io_read, io_write, io_control
-@end itemize
-
-@item Fatal Error Management
-
-@itemize -
-@item fatal_error_occurred
-@end itemize
-
-@item Multiprocessing
-
-@itemize -
-@item multiprocessing_announce
-@end itemize
-@end itemize
-
-@section Directives
-
-This section details the interrupt manager's
-directives. A subsection is dedicated to each of this manager's
-directives and describes the calling sequence, related
-constants, usage, and status codes.
-
-@c
-@c
-@c
-@page
-@subsection INTERRUPT_CATCH - Establish an ISR
-
-@cindex establish an ISR
-@cindex install an ISR
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_interrupt_catch
-@example
-rtems_status_code rtems_interrupt_catch(
- rtems_isr_entry new_isr_handler,
- rtems_vector_number vector,
- rtems_isr_entry *old_isr_handler
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Interrupt_Catch (
- New_ISR_handler : in RTEMS.Address;
- Vector : in RTEMS.Vector_Number;
- Old_ISR_Handler : out RTEMS.Address;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - ISR established successfully@*
-@code{@value{RPREFIX}INVALID_NUMBER} - illegal vector number@*
-@code{@value{RPREFIX}INVALID_ADDRESS} - illegal ISR entry point or invalid old_isr_handler
-
-@subheading DESCRIPTION:
-
-This directive establishes an interrupt service
-routine (ISR) for the specified interrupt vector number. The
-@code{new_isr_handler} parameter specifies the entry point of the ISR.
-The entry point of the previous ISR for the specified vector is
-returned in @code{old_isr_handler}.
-
-To release an interrupt vector, pass the old handler's address obtained
-when the vector was first capture.
-
-@ifset is-C
-Passing a NULL pointer as the @code{old_handler} address and this parameter
-will be ignored.
-@end ifset
-
-@subheading NOTES:
-
-This directive will not cause the calling task to be preempted.
-
-@c
-@c
-@c
-@page
-@subsection INTERRUPT_DISABLE - Disable Interrupts
-
-@cindex disable interrupts
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_interrupt_disable
-@example
-void rtems_interrupt_disable(
- rtems_interrupt_level level
-);
-
-/* this is implemented as a macro and sets level as a side-effect */
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-function Interrupt_Disable
-return RTEMS.ISR_Level;
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-
-NONE
-
-@subheading DESCRIPTION:
-
-This directive disables all maskable interrupts and returns
-the previous @code{level}. A later invocation of the
-@code{@value{DIRPREFIX}interrupt_enable} directive should be used to
-restore the interrupt level.
-
-@subheading NOTES:
-
-This directive will not cause the calling task to be preempted.
-
-@ifset is-C
-@b{This directive is implemented as a macro which modifies the @code{level}
-parameter.}
-@end ifset
-
-@c
-@c
-@c
-@page
-@subsection INTERRUPT_ENABLE - Enable Interrupts
-
-@cindex enable interrupts
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_interrupt_enable
-@example
-void rtems_interrupt_enable(
- rtems_interrupt_level level
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Interrupt_Enable (
- Level : in RTEMS.ISR_Level
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-
-NONE
-
-@subheading DESCRIPTION:
-
-This directive enables maskable interrupts to the @code{level}
-which was returned by a previous call to
-@code{@value{DIRPREFIX}interrupt_disable}.
-Immediately prior to invoking this directive, maskable interrupts should
-be disabled by a call to @code{@value{DIRPREFIX}interrupt_disable}
-and will be enabled when this directive returns to the caller.
-
-@subheading NOTES:
-
-This directive will not cause the calling task to be preempted.
-
-
-@c
-@c
-@c
-@page
-@subsection INTERRUPT_FLASH - Flash Interrupts
-
-@cindex flash interrupts
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_interrupt_flash
-@example
-void rtems_interrupt_flash(
- rtems_interrupt_level level
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Interrupt_Flash (
- Level : in RTEMS.ISR_Level
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-
-NONE
-
-@subheading DESCRIPTION:
-
-This directive temporarily enables maskable interrupts to the @code{level}
-which was returned by a previous call to
-@code{@value{DIRPREFIX}interrupt_disable}.
-Immediately prior to invoking this directive, maskable interrupts should
-be disabled by a call to @code{@value{DIRPREFIX}interrupt_disable}
-and will be redisabled when this directive returns to the caller.
-
-@subheading NOTES:
-
-This directive will not cause the calling task to be preempted.
-
-@c
-@c
-@c
-@page
-@subsection INTERRUPT_IS_IN_PROGRESS - Is an ISR in Progress
-
-@cindex is interrupt in progress
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_interrupt_is_in_progress
-@example
-rtems_boolean rtems_interrupt_is_in_progress( void );
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-function Interrupt_Is_In_Progress
-return RTEMS.Boolean;
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-
-NONE
-
-@subheading DESCRIPTION:
-
-This directive returns @code{TRUE} if the processor is currently
-servicing an interrupt and @code{FALSE} otherwise. A return value
-of @code{TRUE} indicates that the caller is an interrupt service
-routine, @b{NOT} a task. The directives available to an interrupt
-service routine are restricted.
-
-@subheading NOTES:
-
-This directive will not cause the calling task to be preempted.
-
diff --git a/doc/user/io.t b/doc/user/io.t
deleted file mode 100644
index 9ab2be053e..0000000000
--- a/doc/user/io.t
+++ /dev/null
@@ -1,617 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter I/O Manager
-
-@cindex device drivers
-@cindex IO Manager
-
-@section Introduction
-
-The input/output interface manager provides a
-well-defined mechanism for accessing device drivers and a
-structured methodology for organizing device drivers. The
-directives provided by the I/O manager are:
-
-@itemize @bullet
-@item @code{@value{DIRPREFIX}io_initialize} - Initialize a device driver
-@item @code{@value{DIRPREFIX}io_register_name} - Register a device name
-@item @code{@value{DIRPREFIX}io_lookup_name} - Look up a device name
-@item @code{@value{DIRPREFIX}io_open} - Open a device
-@item @code{@value{DIRPREFIX}io_close} - Close a device
-@item @code{@value{DIRPREFIX}io_read} - Read from a device
-@item @code{@value{DIRPREFIX}io_write} - Write to a device
-@item @code{@value{DIRPREFIX}io_control} - Special device services
-@end itemize
-
-@section Background
-
-@subsection Device Driver Table
-
-@cindex Device Driver Table
-
-Each application utilizing the RTEMS I/O manager must
-specify the address of a Device Driver Table in its
-Configuration Table. This table contains each device driver's
-entry points. Each device driver may contain the following
-entry points:
-
-@itemize @bullet
-@item Initialization
-@item Open
-@item Close
-@item Read
-@item Write
-@item Control
-@end itemize
-
-If the device driver does not support a particular
-entry point, then that entry in the Configuration Table should
-be NULL. RTEMS will return
-@code{@value{RPREFIX}SUCCESSFUL} as the executive's and
-zero (0) as the device driver's return code for these device
-driver entry points.
-
-@subsection Major and Minor Device Numbers
-
-@cindex major device number
-@cindex minor device number
-
-Each call to the I/O manager must provide a device's
-major and minor numbers as arguments. The major number is the
-index of the requested driver's entry points in the Device
-Driver Table, and is used to select a specific device driver.
-The exact usage of the minor number is driver specific, but is
-commonly used to distinguish between a number of devices
-controlled by the same driver.
-
-@subsection Device Names
-
-@cindex device names
-
-The I/O Manager provides facilities to associate a
-name with a particular device. Directives are provided to
-register the name of a device and to look up the major/minor
-number pair associated with a device name.
-
-@subsection Device Driver Environment
-
-Application developers, as well as device driver
-developers, must be aware of the following regarding the RTEMS
-I/O Manager:
-
-@itemize @bullet
-@item A device driver routine executes in the context of the
-invoking task. Thus if the driver blocks, the invoking task
-blocks.
-
-@item The device driver is free to change the modes of the
-invoking task, although the driver should restore them to their
-original values.
-
-@item Device drivers may be invoked from ISRs.
-
-@item Only local device drivers are accessible through the I/O
-manager.
-
-@item A device driver routine may invoke all other RTEMS
-directives, including I/O directives, on both local and global
-objects.
-
-@end itemize
-
-Although the RTEMS I/O manager provides a framework
-for device drivers, it makes no assumptions regarding the
-construction or operation of a device driver.
-
-@subsection Device Driver Interface
-
-@cindex device driver interface
-
-When an application invokes an I/O manager directive,
-RTEMS determines which device driver entry point must be
-invoked. The information passed by the application to RTEMS is
-then passed to the correct device driver entry point. RTEMS
-will invoke each device driver entry point assuming it is
-compatible with the following prototype:
-
-@ifset is-C
-@example
-rtems_device_driver io_entry(
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void *argument_block
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-function IO_Entry (
- Major : in RTEMS.Device_Major_Number;
- Minor : in RTEMS.Device_Major_Number;
- Argument_Block : in RTEMS.Address
-) return RTEMS.Status_Code;
-@end example
-@end ifset
-
-The format and contents of the parameter block are
-device driver and entry point dependent.
-
-It is recommended that a device driver avoid
-generating error codes which conflict with those used by
-application components. A common technique used to generate
-driver specific error codes is to make the most significant part
-of the status indicate a driver specific code.
-
-@subsection Device Driver Initialization
-
-RTEMS automatically initializes all device drivers
-when multitasking is initiated via the
-@code{@value{DIRPREFIX}initialize_executive}
-directive. RTEMS initializes the device drivers by invoking
-each device driver initialization entry point with the following
-parameters:
-
-@table @asis
-@item major
-the major device number for this device driver.
-
-@item minor
-zero.
-
-@item argument_block
-will point to the Configuration Table.
-
-@end table
-
-The returned status will be ignored by RTEMS. If the driver
-cannot successfully initialize the device, then it should invoke
-the fatal_error_occurred directive.
-
-@section Operations
-
-@subsection Register and Lookup Name
-
-The @code{@value{DIRPREFIX}io_register} directive associates a name with the
-specified device (i.e. major/minor number pair). Device names
-are typically registered as part of the device driver
-initialization sequence. The @code{@value{DIRPREFIX}io_lookup}
-directive is used to
-determine the major/minor number pair associated with the
-specified device name. The use of these directives frees the
-application from being dependent on the arbitrary assignment of
-major numbers in a particular application. No device naming
-conventions are dictated by RTEMS.
-
-@subsection Accessing an Device Driver
-
-The I/O manager provides directives which enable the
-application program to utilize device drivers in a standard
-manner. There is a direct correlation between the RTEMS I/O
-manager directives
-@code{@value{DIRPREFIX}io_initialize},
-@code{@value{DIRPREFIX}io_open},
-@code{@value{DIRPREFIX}io_close},
-@code{@value{DIRPREFIX}io_read},
-@code{@value{DIRPREFIX}io_write}, and
-@code{@value{DIRPREFIX}io_control}
-and the underlying device driver entry points.
-
-@section Directives
-
-This section details the I/O manager's directives. A
-subsection is dedicated to each of this manager's directives and
-describes the calling sequence, related constants, usage, and
-status codes.
-
-@c
-@c
-@c
-@page
-@subsection IO_INITIALIZE - Initialize a device driver
-
-@cindex initialize a device driver
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_io_initialize
-@example
-rtems_status_code rtems_io_initialize(
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void *argument
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure IO_Initialize (
- Major : in RTEMS.Device_Major_Number;
- Minor : in RTEMS.Device_Minor_Number;
- Argument : in RTEMS.Address;
- Return_Value : out RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - successfully initialized@*
-@code{@value{RPREFIX}INVALID_NUMBER} - invalid major device number
-
-@subheading DESCRIPTION:
-
-This directive calls the device driver initialization
-routine specified in the Device Driver Table for this major
-number. This directive is automatically invoked for each device
-driver when multitasking is initiated via the
-initialize_executive directive.
-
-A device driver initialization module is responsible
-for initializing all hardware and data structures associated
-with a device. If necessary, it can allocate memory to be used
-during other operations.
-
-@subheading NOTES:
-
-This directive may or may not cause the calling task
-to be preempted. This is dependent on the device driver being
-initialized.
-
-@c
-@c
-@c
-@page
-@subsection IO_REGISTER_NAME - Register a device
-
-@cindex register device
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_io_register_name
-@example
-rtems_status_code rtems_io_register_name(
- char *name,
- rtems_device_major_number major,
- rtems_device_minor_number minor
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure IO_Register_Name (
- Name : in String;
- Major : in RTEMS.Device_Major_Number;
- Minor : in RTEMS.Device_Minor_Number;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - successfully initialized@*
-@code{@value{RPREFIX}TOO_MANY} - too many devices registered
-
-@subheading DESCRIPTION:
-
-This directive associates name with the specified
-major/minor number pair.
-
-@subheading NOTES:
-
-This directive will not cause the calling task to be
-preempted.
-
-@c
-@c
-@c
-@page
-@subsection IO_LOOKUP_NAME - Lookup a device
-
-@cindex lookup device major and minor number
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_io_lookup_name
-@example
-rtems_status_code rtems_io_lookup_name(
- const char *name,
- rtems_driver_name_t **device_info
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure IO_Lookup_Name (
- Name : in String;
- Device_Info : out RTEMS.Driver_Name_t;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - successfully initialized@*
-@code{@value{RPREFIX}UNSATISFIED} - name not registered
-
-@subheading DESCRIPTION:
-
-This directive returns the major/minor number pair
-associated with the given device name in device_info.
-
-@subheading NOTES:
-
-This directive will not cause the calling task to be
-preempted.
-
-@c
-@c
-@c
-@page
-@subsection IO_OPEN - Open a device
-
-@cindex open a devive
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_io_open
-@example
-rtems_status_code rtems_io_open(
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void *argument
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure IO_Open (
- Major : in RTEMS.Device_Major_Number;
- Minor : in RTEMS.Device_Minor_Number;
- Argument : in RTEMS.Address;
- Return_Value : out RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - successfully initialized@*
-@code{@value{RPREFIX}INVALID_NUMBER} - invalid major device number
-
-@subheading DESCRIPTION:
-
-This directive calls the device driver open routine
-specified in the Device Driver Table for this major number. The
-open entry point is commonly used by device drivers to provide
-exclusive access to a device.
-
-@subheading NOTES:
-
-This directive may or may not cause the calling task
-to be preempted. This is dependent on the device driver being
-invoked.
-
-@c
-@c
-@c
-@page
-@subsection IO_CLOSE - Close a device
-
-@cindex close a device
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_io_close
-@example
-rtems_status_code rtems_io_close(
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void *argument
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure IO_Close (
- Major : in RTEMS.Device_Major_Number;
- Minor : in RTEMS.Device_Minor_Number;
- Argument : in RTEMS.Address;
- Return_Value : out RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - successfully initialized@*
-@code{@value{RPREFIX}INVALID_NUMBER} - invalid major device number
-
-@subheading DESCRIPTION:
-
-This directive calls the device driver close routine
-specified in the Device Driver Table for this major number. The
-close entry point is commonly used by device drivers to
-relinquish exclusive access to a device.
-
-@subheading NOTES:
-
-This directive may or may not cause the calling task
-to be preempted. This is dependent on the device driver being
-invoked.
-
-@c
-@c
-@c
-@page
-@subsection IO_READ - Read from a device
-
-@cindex read from a device
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_io_read
-@example
-rtems_status_code rtems_io_read(
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void *argument
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure IO_Read (
- Major : in RTEMS.Device_Major_Number;
- Minor : in RTEMS.Device_Minor_Number;
- Argument : in RTEMS.Address;
- Return_Value : out RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - successfully initialized@*
-@code{@value{RPREFIX}INVALID_NUMBER} - invalid major device number
-
-@subheading DESCRIPTION:
-
-This directive calls the device driver read routine
-specified in the Device Driver Table for this major number.
-Read operations typically require a buffer address as part of
-the argument parameter block. The contents of this buffer will
-be replaced with data from the device.
-
-@subheading NOTES:
-
-This directive may or may not cause the calling task
-to be preempted. This is dependent on the device driver being
-invoked.
-
-@c
-@c
-@c
-@page
-@subsection IO_WRITE - Write to a device
-
-@cindex write to a device
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_io_write
-@example
-rtems_status_code rtems_io_write(
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void *argument
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure IO_Write (
- Major : in RTEMS.Device_Major_Number;
- Minor : in RTEMS.Device_Minor_Number;
- Argument : in RTEMS.Address;
- Return_Value : out RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - successfully initialized@*
-@code{@value{RPREFIX}INVALID_NUMBER} - invalid major device number
-
-@subheading DESCRIPTION:
-
-This directive calls the device driver write routine
-specified in the Device Driver Table for this major number.
-Write operations typically require a buffer address as part of
-the argument parameter block. The contents of this buffer will
-be sent to the device.
-
-@subheading NOTES:
-
-This directive may or may not cause the calling task
-to be preempted. This is dependent on the device driver being
-invoked.
-
-@c
-@c
-@c
-@page
-@subsection IO_CONTROL - Special device services
-
-@cindex special device services
-@cindex IO Control
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_io_control
-@example
-rtems_status_code rtems_io_control(
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void *argument
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure IO_Control (
- Major : in RTEMS.Device_Major_Number;
- Minor : in RTEMS.Device_Minor_Number;
- Argument : in RTEMS.Address;
- Return_Value : out RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - successfully initialized@*
-@code{@value{RPREFIX}INVALID_NUMBER} - invalid major device number
-
-@subheading DESCRIPTION:
-
-This directive calls the device driver I/O control
-routine specified in the Device Driver Table for this major
-number. The exact functionality of the driver entry called by
-this directive is driver dependent. It should not be assumed
-that the control entries of two device drivers are compatible.
-For example, an RS-232 driver I/O control operation may change
-the baud rate of a serial line, while an I/O control operation
-for a floppy disk driver may cause a seek operation.
-
-@subheading NOTES:
-
-This directive may or may not cause the calling task
-to be preempted. This is dependent on the device driver being
-invoked.
-
-
-
diff --git a/doc/user/mp.t b/doc/user/mp.t
deleted file mode 100644
index 5840d64ebb..0000000000
--- a/doc/user/mp.t
+++ /dev/null
@@ -1,618 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Multiprocessing Manager
-
-@cindex multiprocessing
-
-@section Introduction
-
-In multiprocessor real-time systems, new
-requirements, such as sharing data and global resources between
-processors, are introduced. This requires an efficient and
-reliable communications vehicle which allows all processors to
-communicate with each other as necessary. In addition, the
-ramifications of multiple processors affect each and every
-characteristic of a real-time system, almost always making them
-more complicated.
-
-RTEMS addresses these issues by providing simple and
-flexible real-time multiprocessing capabilities. The executive
-easily lends itself to both tightly-coupled and loosely-coupled
-configurations of the target system hardware. In addition,
-RTEMS supports systems composed of both homogeneous and
-heterogeneous mixtures of processors and target boards.
-
-A major design goal of the RTEMS executive was to
-transcend the physical boundaries of the target hardware
-configuration. This goal is achieved by presenting the
-application software with a logical view of the target system
-where the boundaries between processor nodes are transparent.
-As a result, the application developer may designate objects
-such as tasks, queues, events, signals, semaphores, and memory
-blocks as global objects. These global objects may then be
-accessed by any task regardless of the physical location of the
-object and the accessing task. RTEMS automatically determines
-that the object being accessed resides on another processor and
-performs the actions required to access the desired object.
-Simply stated, RTEMS allows the entire system, both hardware and
-software, to be viewed logically as a single system.
-
-@section Background
-
-@cindex multiprocessing topologies
-
-RTEMS makes no assumptions regarding the connection
-media or topology of a multiprocessor system. The tasks which
-compose a particular application can be spread among as many
-processors as needed to satisfy the application's timing
-requirements. The application tasks can interact using a subset
-of the RTEMS directives as if they were on the same processor.
-These directives allow application tasks to exchange data,
-communicate, and synchronize regardless of which processor they
-reside upon.
-
-The RTEMS multiprocessor execution model is multiple
-instruction streams with multiple data streams (MIMD). This
-execution model has each of the processors executing code
-independent of the other processors. Because of this
-parallelism, the application designer can more easily guarantee
-deterministic behavior.
-
-By supporting heterogeneous environments, RTEMS
-allows the systems designer to select the most efficient
-processor for each subsystem of the application. Configuring
-RTEMS for a heterogeneous environment is no more difficult than
-for a homogeneous one. In keeping with RTEMS philosophy of
-providing transparent physical node boundaries, the minimal
-heterogeneous processing required is isolated in the MPCI layer.
-
-@subsection Nodes
-
-@cindex nodes, definition
-
-A processor in a RTEMS system is referred to as a
-node. Each node is assigned a unique non-zero node number by
-the application designer. RTEMS assumes that node numbers are
-assigned consecutively from one to the @code{maximum_nodes}
-configuration parameter. The node
-number, node, and the maximum number of nodes, maximum_nodes, in
-a system are found in the Multiprocessor Configuration Table.
-The maximum_nodes field and the number of global objects,
-maximum_global_objects, is required to be the same on all nodes
-in a system.
-
-The node number is used by RTEMS to identify each
-node when performing remote operations. Thus, the
-Multiprocessor Communications Interface Layer (MPCI) must be
-able to route messages based on the node number.
-
-@subsection Global Objects
-
-@cindex global objects, definition
-
-All RTEMS objects which are created with the GLOBAL
-attribute will be known on all other nodes. Global objects can
-be referenced from any node in the system, although certain
-directive specific restrictions (e.g. one cannot delete a remote
-object) may apply. A task does not have to be global to perform
-operations involving remote objects. The maximum number of
-global objects is the system is user configurable and can be
-found in the maximum_global_objects field in the Multiprocessor
-Configuration Table. The distribution of tasks to processors is
-performed during the application design phase. Dynamic task
-relocation is not supported by RTEMS.
-
-@subsection Global Object Table
-
-@cindex global objects table
-
-RTEMS maintains two tables containing object
-information on every node in a multiprocessor system: a local
-object table and a global object table. The local object table
-on each node is unique and contains information for all objects
-created on this node whether those objects are local or global.
-The global object table contains information regarding all
-global objects in the system and, consequently, is the same on
-every node.
-
-Since each node must maintain an identical copy of
-the global object table, the maximum number of entries in each
-copy of the table must be the same. The maximum number of
-entries in each copy is determined by the
-maximum_global_objects parameter in the Multiprocessor
-Configuration Table. This parameter, as well as the
-maximum_nodes parameter, is required to be the same on all
-nodes. To maintain consistency among the table copies, every
-node in the system must be informed of the creation or deletion
-of a global object.
-
-@subsection Remote Operations
-
-@cindex MPCI and remote operations
-
-When an application performs an operation on a remote
-global object, RTEMS must generate a Remote Request (RQ) message
-and send it to the appropriate node. After completing the
-requested operation, the remote node will build a Remote
-Response (RR) message and send it to the originating node.
-Messages generated as a side-effect of a directive (such as
-deleting a global task) are known as Remote Processes (RP) and
-do not require the receiving node to respond.
-
-Other than taking slightly longer to execute
-directives on remote objects, the application is unaware of the
-location of the objects it acts upon. The exact amount of
-overhead required for a remote operation is dependent on the
-media connecting the nodes and, to a lesser degree, on the
-efficiency of the user-provided MPCI routines.
-
-The following shows the typical transaction sequence
-during a remote application:
-
-@enumerate
-
-@item The application issues a directive accessing a
-remote global object.
-
-@item RTEMS determines the node on which the object
-resides.
-
-@item RTEMS calls the user-provided MPCI routine
-GET_PACKET to obtain a packet in which to build a RQ message.
-
-@item After building a message packet, RTEMS calls the
-user-provided MPCI routine SEND_PACKET to transmit the packet to
-the node on which the object resides (referred to as the
-destination node).
-
-@item The calling task is blocked until the RR message
-arrives, and control of the processor is transferred to another
-task.
-
-@item The MPCI layer on the destination node senses the
-arrival of a packet (commonly in an ISR), and calls the
-@code{@value{DIRPREFIX}multiprocessing_announce}
-directive. This directive readies the Multiprocessing Server.
-
-@item The Multiprocessing Server calls the user-provided
-MPCI routine RECEIVE_PACKET, performs the requested operation,
-builds an RR message, and returns it to the originating node.
-
-@item The MPCI layer on the originating node senses the
-arrival of a packet (typically via an interrupt), and calls the RTEMS
-@code{@value{DIRPREFIX}multiprocessing_announce} directive. This directive
-readies the Multiprocessing Server.
-
-@item The Multiprocessing Server calls the user-provided
-MPCI routine RECEIVE_PACKET, readies the original requesting
-task, and blocks until another packet arrives. Control is
-transferred to the original task which then completes processing
-of the directive.
-
-@end enumerate
-
-If an uncorrectable error occurs in the user-provided
-MPCI layer, the fatal error handler should be invoked. RTEMS
-assumes the reliable transmission and reception of messages by
-the MPCI and makes no attempt to detect or correct errors.
-
-@subsection Proxies
-
-@cindex proxy, definition
-
-A proxy is an RTEMS data structure which resides on a
-remote node and is used to represent a task which must block as
-part of a remote operation. This action can occur as part of the
-@code{@value{DIRPREFIX}semaphore_obtain} and
-@code{@value{DIRPREFIX}message_queue_receive} directives. If the
-object were local, the task's control block would be available
-for modification to indicate it was blocking on a message queue
-or semaphore. However, the task's control block resides only on
-the same node as the task. As a result, the remote node must
-allocate a proxy to represent the task until it can be readied.
-
-The maximum number of proxies is defined in the
-Multiprocessor Configuration Table. Each node in a
-multiprocessor system may require a different number of proxies
-to be configured. The distribution of proxy control blocks is
-application dependent and is different from the distribution of
-tasks.
-
-@subsection Multiprocessor Configuration Table
-
-The Multiprocessor Configuration Table contains
-information needed by RTEMS when used in a multiprocessor
-system. This table is discussed in detail in the section
-Multiprocessor Configuration Table of the Configuring a System
-chapter.
-
-@section Multiprocessor Communications Interface Layer
-
-The Multiprocessor Communications Interface Layer
-(MPCI) is a set of user-provided procedures which enable the
-nodes in a multiprocessor system to communicate with one
-another. These routines are invoked by RTEMS at various times
-in the preparation and processing of remote requests.
-Interrupts are enabled when an MPCI procedure is invoked. It is
-assumed that if the execution mode and/or interrupt level are
-altered by the MPCI layer, that they will be restored prior to
-returning to RTEMS.
-
-@cindex MPCI, definition
-
-The MPCI layer is responsible for managing a pool of
-buffers called packets and for sending these packets between
-system nodes. Packet buffers contain the messages sent between
-the nodes. Typically, the MPCI layer will encapsulate the
-packet within an envelope which contains the information needed
-by the MPCI layer. The number of packets available is dependent
-on the MPCI layer implementation.
-
-@cindex MPCI entry points
-
-The entry points to the routines in the user's MPCI
-layer should be placed in the Multiprocessor Communications
-Interface Table. The user must provide entry points for each of
-the following table entries in a multiprocessor system:
-
-@itemize @bullet
-@item initialization initialize the MPCI
-@item get_packet obtain a packet buffer
-@item return_packet return a packet buffer
-@item send_packet send a packet to another node
-@item receive_packet called to get an arrived packet
-@end itemize
-
-A packet is sent by RTEMS in each of the following situations:
-
-@itemize @bullet
-@item an RQ is generated on an originating node;
-@item an RR is generated on a destination node;
-@item a global object is created;
-@item a global object is deleted;
-@item a local task blocked on a remote object is deleted;
-@item during system initialization to check for system consistency.
-@end itemize
-
-If the target hardware supports it, the arrival of a
-packet at a node may generate an interrupt. Otherwise, the
-real-time clock ISR can check for the arrival of a packet. In
-any case, the
-@code{@value{DIRPREFIX}multiprocessing_announce} directive must be called
-to announce the arrival of a packet. After exiting the ISR,
-control will be passed to the Multiprocessing Server to process
-the packet. The Multiprocessing Server will call the get_packet
-entry to obtain a packet buffer and the receive_entry entry to
-copy the message into the buffer obtained.
-
-@subsection INITIALIZATION
-
-The INITIALIZATION component of the user-provided
-MPCI layer is called as part of the @code{@value{DIRPREFIX}initialize_executive}
-directive to initialize the MPCI layer and associated hardware.
-It is invoked immediately after all of the device drivers have
-been initialized. This component should be adhere to the
-following prototype:
-
-@ifset is-C
-@example
-@group
-rtems_mpci_entry user_mpci_initialization(
- rtems_configuration_table *configuration
-);
-@end group
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure User_MPCI_Initialization (
- Configuration : in RTEMS.Configuration_Table_Pointer
-);
-@end example
-@end ifset
-
-where configuration is the address of the user's
-Configuration Table. Operations on global objects cannot be
-performed until this component is invoked. The INITIALIZATION
-component is invoked only once in the life of any system. If
-the MPCI layer cannot be successfully initialized, the fatal
-error manager should be invoked by this routine.
-
-One of the primary functions of the MPCI layer is to
-provide the executive with packet buffers. The INITIALIZATION
-routine must create and initialize a pool of packet buffers.
-There must be enough packet buffers so RTEMS can obtain one
-whenever needed.
-
-@subsection GET_PACKET
-
-The GET_PACKET component of the user-provided MPCI
-layer is called when RTEMS must obtain a packet buffer to send
-or broadcast a message. This component should be adhere to the
-following prototype:
-
-@ifset is-C
-@example
-@group
-rtems_mpci_entry user_mpci_get_packet(
- rtems_packet_prefix **packet
-);
-@end group
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure User_MPCI_Get_Packet (
- Packet : access RTEMS.Packet_Prefix_Pointer
-);
-@end example
-@end ifset
-
-where packet is the address of a pointer to a packet.
-This routine always succeeds and, upon return, packet will
-contain the address of a packet. If for any reason, a packet
-cannot be successfully obtained, then the fatal error manager
-should be invoked.
-
-RTEMS has been optimized to avoid the need for
-obtaining a packet each time a message is sent or broadcast.
-For example, RTEMS sends response messages (RR) back to the
-originator in the same packet in which the request message (RQ)
-arrived.
-
-@subsection RETURN_PACKET
-
-The RETURN_PACKET component of the user-provided MPCI
-layer is called when RTEMS needs to release a packet to the free
-packet buffer pool. This component should be adhere to the
-following prototype:
-
-@ifset is-C
-@example
-@group
-rtems_mpci_entry user_mpci_return_packet(
- rtems_packet_prefix *packet
-);
-@end group
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure User_MPCI_Return_Packet (
- Packet : in RTEMS.Packet_Prefix_Pointer
-);
-@end example
-@end ifset
-
-where packet is the address of a packet. If the
-packet cannot be successfully returned, the fatal error manager
-should be invoked.
-
-@subsection RECEIVE_PACKET
-
-The RECEIVE_PACKET component of the user-provided
-MPCI layer is called when RTEMS needs to obtain a packet which
-has previously arrived. This component should be adhere to the
-following prototype:
-
-@ifset is-C
-@example
-@group
-rtems_mpci_entry user_mpci_receive_packet(
- rtems_packet_prefix **packet
-);
-@end group
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure User_MPCI_Receive_Packet (
- Packet : access RTEMS.Packet_Prefix_Pointer
-);
-@end example
-@end ifset
-
-where packet is a pointer to the address of a packet
-to place the message from another node. If a message is
-available, then packet will contain the address of the message
-from another node. If no messages are available, this entry
-packet should contain NULL.
-
-@subsection SEND_PACKET
-
-The SEND_PACKET component of the user-provided MPCI
-layer is called when RTEMS needs to send a packet containing a
-message to another node. This component should be adhere to the
-following prototype:
-
-@ifset is-C
-@example
-@group
-rtems_mpci_entry user_mpci_send_packet(
- rtems_unsigned32 node,
- rtems_packet_prefix **packet
-);
-@end group
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure User_MPCI_Send_Packet (
- Node : in RTEMS.Unsigned32;
- Packet : access RTEMS.Packet_Prefix_Pointer
-);
-@end example
-@end ifset
-
-where node is the node number of the destination and packet is the
-address of a packet which containing a message. If the packet cannot
-be successfully sent, the fatal error manager should be invoked.
-
-If node is set to zero, the packet is to be
-broadcasted to all other nodes in the system. Although some
-MPCI layers will be built upon hardware which support a
-broadcast mechanism, others may be required to generate a copy
-of the packet for each node in the system.
-
-Many MPCI layers use the packet_length field of the MP_packet_prefix
-of the packet to avoid sending unnecessary data. This is especially
-useful if the media connecting the nodes is relatively slow.
-
-The to_convert field of the MP_packet_prefix portion of the packet indicates
-how much of the packet (in unsigned32's) may require conversion in a
-heterogeneous system.
-
-@subsection Supporting Heterogeneous Environments
-
-@cindex heterogeneous multiprocessing
-
-Developing an MPCI layer for a heterogeneous system
-requires a thorough understanding of the differences between the
-processors which comprise the system. One difficult problem is
-the varying data representation schemes used by different
-processor types. The most pervasive data representation problem
-is the order of the bytes which compose a data entity.
-Processors which place the least significant byte at the
-smallest address are classified as little endian processors.
-Little endian byte-ordering is shown below:
-
-
-@example
-@group
-+---------------+----------------+---------------+----------------+
-| | | | |
-| Byte 3 | Byte 2 | Byte 1 | Byte 0 |
-| | | | |
-+---------------+----------------+---------------+----------------+
-@end group
-@end example
-
-Conversely, processors which place the most
-significant byte at the smallest address are classified as big
-endian processors. Big endian byte-ordering is shown below:
-
-@example
-@group
-+---------------+----------------+---------------+----------------+
-| | | | |
-| Byte 0 | Byte 1 | Byte 2 | Byte 3 |
-| | | | |
-+---------------+----------------+---------------+----------------+
-@end group
-@end example
-
-Unfortunately, sharing a data structure between big
-endian and little endian processors requires translation into a
-common endian format. An application designer typically chooses
-the common endian format to minimize conversion overhead.
-
-Another issue in the design of shared data structures
-is the alignment of data structure elements. Alignment is both
-processor and compiler implementation dependent. For example,
-some processors allow data elements to begin on any address
-boundary, while others impose restrictions. Common restrictions
-are that data elements must begin on either an even address or
-on a long word boundary. Violation of these restrictions may
-cause an exception or impose a performance penalty.
-
-Other issues which commonly impact the design of
-shared data structures include the representation of floating
-point numbers, bit fields, decimal data, and character strings.
-In addition, the representation method for negative integers
-could be one's or two's complement. These factors combine to
-increase the complexity of designing and manipulating data
-structures shared between processors.
-
-RTEMS addressed these issues in the design of the
-packets used to communicate between nodes. The RTEMS packet
-format is designed to allow the MPCI layer to perform all
-necessary conversion without burdening the developer with the
-details of the RTEMS packet format. As a result, the MPCI layer
-must be aware of the following:
-
-@itemize @bullet
-@item All packets must begin on a four byte boundary.
-
-@item Packets are composed of both RTEMS and application data.
-All RTEMS data is treated as thirty-two (32) bit unsigned
-quantities and is in the first @code{@value{RPREFIX}MINIMUM_UNSIGNED32S_TO_CONVERT}
-thirty-two (32) quantities of the packet.
-
-@item The RTEMS data component of the packet must be in native
-endian format. Endian conversion may be performed by either the
-sending or receiving MPCI layer.
-
-@item RTEMS makes no assumptions regarding the application
-data component of the packet.
-@end itemize
-
-@section Operations
-
-@subsection Announcing a Packet
-
-The @code{@value{DIRPREFIX}multiprocessing_announce} directive is called by
-the MPCI layer to inform RTEMS that a packet has arrived from
-another node. This directive can be called from an interrupt
-service routine or from within a polling routine.
-
-@section Directives
-
-This section details the additional directives
-required to support RTEMS in a multiprocessor configuration. A
-subsection is dedicated to each of this manager's directives and
-describes the calling sequence, related constants, usage, and
-status codes.
-
-@c
-@c
-@c
-@page
-@subsection MULTIPROCESSING_ANNOUNCE - Announce the arrival of a packet
-
-@cindex announce arrival of package
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_multiprocessing_announce
-@example
-void rtems_multiprocessing_announce( void );
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Multiprocessing_Announce;
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-
-NONE
-
-@subheading DESCRIPTION:
-
-This directive informs RTEMS that a multiprocessing
-communications packet has arrived from another node. This
-directive is called by the user-provided MPCI, and is only used
-in multiprocessor configurations.
-
-@subheading NOTES:
-
-This directive is typically called from an ISR.
-
-This directive will almost certainly cause the
-calling task to be preempted.
-
-This directive does not generate activity on remote nodes.
diff --git a/doc/user/msg.t b/doc/user/msg.t
deleted file mode 100644
index 0e319b1703..0000000000
--- a/doc/user/msg.t
+++ /dev/null
@@ -1,824 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Message Manager
-
-@cindex messages
-@cindex message queues
-
-@section Introduction
-
-The message manager provides communication and
-synchronization capabilities using RTEMS message queues. The
-directives provided by the message manager are:
-
-@itemize @bullet
-@item @code{@value{DIRPREFIX}message_queue_create} - Create a queue
-@item @code{@value{DIRPREFIX}message_queue_ident} - Get ID of a queue
-@item @code{@value{DIRPREFIX}message_queue_delete} - Delete a queue
-@item @code{@value{DIRPREFIX}message_queue_send} - Put message at rear of a queue
-@item @code{@value{DIRPREFIX}message_queue_urgent} - Put message at front of a queue
-@item @code{@value{DIRPREFIX}message_queue_broadcast} - Broadcast N messages to a queue
-@item @code{@value{DIRPREFIX}message_queue_receive} - Receive message from a queue
-@item @code{@value{DIRPREFIX}message_queue_get_number_pending} - Get number of messages pending on a queue
-@item @code{@value{DIRPREFIX}message_queue_flush} - Flush all messages on a queue
-@end itemize
-
-@section Background
-
-@subsection Messages
-
-A message is a variable length buffer where
-information can be stored to support communication. The length
-of the message and the information stored in that message are
-user-defined and can be actual data, pointer(s), or empty.
-
-@subsection Message Queues
-
-A message queue permits the passing of messages among
-tasks and ISRs. Message queues can contain a variable number of
-messages. Normally messages are sent to and received from the
-queue in FIFO order using the @code{@value{DIRPREFIX}message_queue_send}
-directive. However, the @code{@value{DIRPREFIX}message_queue_urgent}
-directive can be used to place
-messages at the head of a queue in LIFO order.
-
-Synchronization can be accomplished when a task can
-wait for a message to arrive at a queue. Also, a task may poll
-a queue for the arrival of a message.
-
-The maximum length message which can be sent is set
-on a per message queue basis.
-
-@subsection Building a Message Queue Attribute Set
-
-@cindex message queue attributes
-
-In general, an attribute set is built by a bitwise OR
-of the desired attribute components. The set of valid message
-queue attributes is provided in the following table:
-
-@itemize @bullet
-@item @code{@value{RPREFIX}FIFO} - tasks wait by FIFO (default)
-@item @code{@value{RPREFIX}PRIORITY} - tasks wait by priority
-@item @code{@value{RPREFIX}LOCAL} - local message queue (default)
-@item @code{@value{RPREFIX}GLOBAL} - global message queue
-@end itemize
-
-
-An attribute listed as a default is not required to
-appear in the attribute list, although it is a good programming
-practice to specify default attributes. If all defaults are
-desired, the attribute @code{@value{RPREFIX}DEFAULT_ATTRIBUTES}
-should be specified on this call.
-
-This example demonstrates the attribute_set parameter
-needed to create a local message queue with the task priority
-waiting queue discipline. The attribute_set parameter to the
-@code{@value{DIRPREFIX}message_queue_create} directive could be either
-@code{@value{RPREFIX}PRIORITY} or
-@code{@value{RPREFIX}LOCAL @value{OR} @value{RPREFIX}PRIORITY}.
-The attribute_set parameter can be set to @code{@value{RPREFIX}PRIORITY}
-because @code{@value{RPREFIX}LOCAL} is the default for all created
-message queues. If a similar message queue were to be known globally, then the
-attribute_set parameter would be
-@code{@value{RPREFIX}GLOBAL @value{OR} @value{RPREFIX}PRIORITY}.
-
-@subsection Building a MESSAGE_QUEUE_RECEIVE Option Set
-
-In general, an option is built by a bitwise OR of the
-desired option components. The set of valid options for the
-@code{@value{DIRPREFIX}message_queue_receive} directive are
-listed in the following table:
-
-@itemize @bullet
-@item @code{@value{RPREFIX}WAIT} - task will wait for a message (default)
-@item @code{@value{RPREFIX}NO_WAIT} - task should not wait
-@end itemize
-
-An option listed as a default is not required to
-appear in the option OR list, although it is a good programming
-practice to specify default options. If all defaults are
-desired, the option @code{@value{RPREFIX}DEFAULT_OPTIONS} should
-be specified on this call.
-
-This example demonstrates the option parameter needed
-to poll for a message to arrive. The option parameter passed to
-the @code{@value{DIRPREFIX}message_queue_receive} directive should
-be @code{@value{RPREFIX}NO_WAIT}.
-
-@section Operations
-
-@subsection Creating a Message Queue
-
-The @code{@value{DIRPREFIX}message_queue_create} directive creates a message
-queue with the user-defined name. The user specifies the
-maximum message size and maximum number of messages which can be
-placed in the message queue at one time. The user may select
-FIFO or task priority as the method for placing waiting tasks in
-the task wait queue. RTEMS allocates a Queue Control Block
-(QCB) from the QCB free list to maintain the newly created queue
-as well as memory for the message buffer pool associated with
-this message queue. RTEMS also generates a message queue ID
-which is returned to the calling task.
-
-For GLOBAL message queues, the maximum message size
-is effectively limited to the longest message which the MPCI is
-capable of transmitting.
-
-@subsection Obtaining Message Queue IDs
-
-When a message queue is created, RTEMS generates a
-unique message queue ID. The message queue ID may be obtained
-by either of two methods. First, as the result of an invocation
-of the @code{@value{DIRPREFIX}message_queue_create} directive, the
-queue ID is stored in a user provided location. Second, the queue
-ID may be obtained later using the @code{@value{DIRPREFIX}message_queue_ident}
-directive. The queue ID is used by other message manager
-directives to access this message queue.
-
-@subsection Receiving a Message
-
-The @code{@value{DIRPREFIX}message_queue_receive} directive attempts to
-retrieve a message from the specified message queue. If at
-least one message is in the queue, then the message is removed
-from the queue, copied to the caller's message buffer, and
-returned immediately along with the length of the message. When
-messages are unavailable, one of the following situations
-applies:
-
-@itemize @bullet
-@item By default, the calling task will wait forever for the
-message to arrive.
-
-@item Specifying the @code{@value{RPREFIX}NO_WAIT} option forces an immediate return
-with an error status code.
-
-@item Specifying a timeout limits the period the task will
-wait before returning with an error status.
-@end itemize
-
-If the task waits for a message, then it is placed in
-the message queue's task wait queue in either FIFO or task
-priority order. All tasks waiting on a message queue are
-returned an error code when the message queue is deleted.
-
-@subsection Sending a Message
-
-Messages can be sent to a queue with the
-@code{@value{DIRPREFIX}message_queue_send} and
-@code{@value{DIRPREFIX}message_queue_urgent} directives. These
-directives work identically when tasks are waiting to receive a
-message. A task is removed from the task waiting queue,
-unblocked, and the message is copied to a waiting task's
-message buffer.
-
-When no tasks are waiting at the queue,
-@code{@value{DIRPREFIX}message_queue_send} places the
-message at the rear of the message queue, while
-@code{@value{DIRPREFIX}message_queue_urgent} places the message at the
-front of the queue. The message is copied to a message buffer
-from this message queue's buffer pool and then placed in the
-message queue. Neither directive can successfully send a
-message to a message queue which has a full queue of pending
-messages.
-
-@subsection Broadcasting a Message
-
-The @code{@value{DIRPREFIX}message_queue_broadcast} directive sends the same
-message to every task waiting on the specified message queue as
-an atomic operation. The message is copied to each waiting
-task's message buffer and each task is unblocked. The number of
-tasks which were unblocked is returned to the caller.
-
-@subsection Deleting a Message Queue
-
-The @code{@value{DIRPREFIX}message_queue_delete} directive removes a message
-queue from the system and frees its control block as well as the
-memory associated with this message queue's message buffer pool.
-A message queue can be deleted by any local task that knows the
-message queue's ID. As a result of this directive, all tasks
-blocked waiting to receive a message from the message queue will
-be readied and returned a status code which indicates that the
-message queue was deleted. Any subsequent references to the
-message queue's name and ID are invalid. Any messages waiting
-at the message queue are also deleted and deallocated.
-
-@section Directives
-
-This section details the message manager's
-directives. A subsection is dedicated to each of this manager's
-directives and describes the calling sequence, related
-constants, usage, and status codes.
-
-@c
-@c
-@c
-@page
-@subsection MESSAGE_QUEUE_CREATE - Create a queue
-
-@cindex create a message queue
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_message_queue_create
-@example
-rtems_status_code rtems_message_queue_create(
- rtems_name name,
- rtems_unsigned32 count,
- rtems_unsigned32 max_message_size,
- rtems_attribute attribute_set,
- rtems_id *id
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Message_Queue_Create (
- Name : in RTEMS.Name;
- Count : in RTEMS.Unsigned32;
- Max_Message_Size : in RTEMS.Unsigned32;
- Attribute_Set : in RTEMS.Attribute;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - queue created successfully@*
-@code{@value{RPREFIX}INVALID_NAME} - invalid task name@*
-@code{@value{RPREFIX}INVALID_NUMBER} - invalid message count@*
-@code{@value{RPREFIX}INVALID_SIZE} - invalid message size@*
-@code{@value{RPREFIX}TOO_MANY} - too many queues created@*
-@code{@value{RPREFIX}MP_NOT_CONFIGURED} - multiprocessing not configured@*
-@code{@value{RPREFIX}TOO_MANY} - too many global objects
-
-@subheading DESCRIPTION:
-
-This directive creates a message queue which resides
-on the local node with the user-defined name specified in name.
-For control and maintenance of the queue, RTEMS allocates and
-initializes a QCB. Memory is allocated from the RTEMS Workspace
-for the specified count of messages, each of max_message_size
-bytes in length. The RTEMS-assigned queue id, returned in id,
-is used to access the message queue.
-
-Specifying @code{@value{RPREFIX}PRIORITY} in attribute_set causes tasks
-waiting for a message to be serviced according to task priority.
-When @code{@value{RPREFIX}FIFO} is specified, waiting tasks are serviced in First
-In-First Out order.
-
-@subheading NOTES:
-
-This directive will not cause the calling task to be
-preempted.
-
-The following message queue attribute constants are
-defined by RTEMS:
-
-@itemize @bullet
-@item @code{@value{RPREFIX}FIFO} - tasks wait by FIFO (default)
-@item @code{@value{RPREFIX}PRIORITY} - tasks wait by priority
-@item @code{@value{RPREFIX}LOCAL} - local message queue (default)
-@item @code{@value{RPREFIX}GLOBAL} - global message queue
-@end itemize
-
-Message queues should not be made global unless
-remote tasks must interact with the created message queue. This
-is to avoid the system overhead incurred by the creation of a
-global message queue. When a global message queue is created,
-the message queue's name and id must be transmitted to every
-node in the system for insertion in the local copy of the global
-object table.
-
-For GLOBAL message queues, the maximum message size
-is effectively limited to the longest message which the MPCI is
-capable of transmitting.
-
-The total number of global objects, including message
-queues, is limited by the maximum_global_objects field in the
-configuration table.
-
-@c
-@c
-@c
-@page
-@subsection MESSAGE_QUEUE_IDENT - Get ID of a queue
-
-@cindex get ID of a message queue
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_message_queue_ident
-@example
-rtems_status_code rtems_message_queue_ident(
- rtems_name name,
- rtems_unsigned32 node,
- rtems_id *id
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Message_Queue_Ident (
- Name : in RTEMS.Name;
- Node : in RTEMS.Unsigned32;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - queue identified successfully@*
-@code{@value{RPREFIX}INVALID_NAME} - queue name not found@*
-@code{@value{RPREFIX}INVALID_NODE} - invalid node id
-
-@subheading DESCRIPTION:
-
-This directive obtains the queue id associated with
-the queue name specified in name. If the queue name is not
-unique, then the queue id will match one of the queues with that
-name. However, this queue id is not guaranteed to correspond to
-the desired queue. The queue id is used with other message
-related directives to access the message queue.
-
-@subheading NOTES:
-
-This directive will not cause the running task to be
-preempted.
-
-If node is @code{@value{RPREFIX}SEARCH_ALL_NODES}, all nodes are searched
-with the local node being searched first. All other nodes are
-searched with the lowest numbered node searched first.
-
-If node is a valid node number which does not
-represent the local node, then only the message queues exported
-by the designated node are searched.
-
-This directive does not generate activity on remote
-nodes. It accesses only the local copy of the global object
-table.
-
-@c
-@c
-@c
-@page
-@subsection MESSAGE_QUEUE_DELETE - Delete a queue
-
-@cindex delete a message queue
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_message_queue_delete
-@example
-rtems_status_code rtems_message_queue_delete(
- rtems_id id
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Message_Queue_Delete (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - queue deleted successfully@*
-@code{@value{RPREFIX}INVALID_ID} - invalid queue id@*
-@code{@value{RPREFIX}ILLEGAL_ON_REMOTE_OBJECT} - cannot delete remote queue
-
-@subheading DESCRIPTION:
-
-This directive deletes the message queue specified by
-id. As a result of this directive, all tasks blocked waiting to
-receive a message from this queue will be readied and returned a
-status code which indicates that the message queue was deleted.
-If no tasks are waiting, but the queue contains messages, then
-RTEMS returns these message buffers back to the system message
-buffer pool. The QCB for this queue as well as the memory for
-the message buffers is reclaimed by RTEMS.
-
-@subheading NOTES:
-
-The calling task will be preempted if its preemption
-mode is enabled and one or more local tasks with a higher
-priority than the calling task are waiting on the deleted queue.
-The calling task will NOT be preempted if the tasks that are
-waiting are remote tasks.
-
-The calling task does not have to be the task that
-created the queue, although the task and queue must reside on
-the same node.
-
-When the queue is deleted, any messages in the queue
-are returned to the free message buffer pool. Any information
-stored in those messages is lost.
-
-When a global message queue is deleted, the message
-queue id must be transmitted to every node in the system for
-deletion from the local copy of the global object table.
-
-Proxies, used to represent remote tasks, are
-reclaimed when the message queue is deleted.
-
-@c
-@c
-@c
-@page
-@subsection MESSAGE_QUEUE_SEND - Put message at rear of a queue
-
-@cindex send message to a queue
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_message_queue_send
-@example
-rtems_status_code rtems_message_queue_send(
- rtems_id id,
- void *buffer,
- rtems_unsigned32 size
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Message_Queue_Send (
- ID : in RTEMS.ID;
- Buffer : in RTEMS.Address;
- Size : in RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - message sent successfully@*
-@code{@value{RPREFIX}INVALID_ID} - invalid queue id@*
-@code{@value{RPREFIX}INVALID_SIZE} - invalid message size@*
-@code{@value{RPREFIX}UNSATISFIED} - out of message buffers@*
-@code{@value{RPREFIX}TOO_MANY} - queue's limit has been reached
-
-@subheading DESCRIPTION:
-
-This directive sends the message buffer of size bytes
-in length to the queue specified by id. If a task is waiting at
-the queue, then the message is copied to the waiting task's
-buffer and the task is unblocked. If no tasks are waiting at the
-queue, then the message is copied to a message buffer which is
-obtained from this message queue's message buffer pool. The
-message buffer is then placed at the rear of the queue.
-
-@subheading NOTES:
-
-The calling task will be preempted if it has
-preemption enabled and a higher priority task is unblocked as
-the result of this directive.
-
-Sending a message to a global message queue which
-does not reside on the local node will generate a request to the
-remote node to post the message on the specified message queue.
-
-If the task to be unblocked resides on a different
-node from the message queue, then the message is forwarded to
-the appropriate node, the waiting task is unblocked, and the
-proxy used to represent the task is reclaimed.
-
-@c
-@c
-@c
-@page
-@subsection MESSAGE_QUEUE_URGENT - Put message at front of a queue
-
-@cindex put message at front of queue
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_message_queue_urgent
-@example
-rtems_status_code rtems_message_queue_urgent(
- rtems_id id,
- void *buffer,
- rtems_unsigned32 size
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Message_Queue_Urgent (
- ID : in RTEMS.ID;
- Buffer : in RTEMS.Address;
- Size : in RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - message sent successfully@*
-@code{@value{RPREFIX}INVALID_ID} - invalid queue id@*
-@code{@value{RPREFIX}INVALID_SIZE} - invalid message size@*
-@code{@value{RPREFIX}UNSATISFIED} - out of message buffers@*
-@code{@value{RPREFIX}TOO_MANY} - queue's limit has been reached
-
-@subheading DESCRIPTION:
-
-This directive sends the message buffer of size bytes
-in length to the queue specified by id. If a task is waiting on
-the queue, then the message is copied to the task's buffer and
-the task is unblocked. If no tasks are waiting on the queue,
-then the message is copied to a message buffer which is obtained
-from this message queue's message buffer pool. The message
-buffer is then placed at the front of the queue.
-
-@subheading NOTES:
-
-The calling task will be preempted if it has
-preemption enabled and a higher priority task is unblocked as
-the result of this directive.
-
-Sending a message to a global message queue which
-does not reside on the local node will generate a request
-telling the remote node to post the message on the specified
-message queue.
-
-If the task to be unblocked resides on a different
-node from the message queue, then the message is forwarded to
-the appropriate node, the waiting task is unblocked, and the
-proxy used to represent the task is reclaimed.
-
-@c
-@c
-@c
-@page
-@subsection MESSAGE_QUEUE_BROADCAST - Broadcast N messages to a queue
-
-@cindex broadcast message to a queue
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_message_queue_broadcast
-@example
-rtems_status_code rtems_message_queue_broadcast(
- rtems_id id,
- void *buffer,
- rtems_unsigned32 size,
- rtems_unsigned32 *count
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Message_Queue_Broadcast (
- ID : in RTEMS.ID;
- Buffer : in RTEMS.Address;
- Size : in RTEMS.Unsigned32;
- Count : out RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - message broadcasted successfully@*
-@code{@value{RPREFIX}INVALID_ID} - invalid queue id@*
-@code{@value{RPREFIX}INVALID_SIZE} - invalid message size
-
-@subheading DESCRIPTION:
-
-This directive causes all tasks that are waiting at
-the queue specified by id to be unblocked and sent the message
-contained in buffer. Before a task is unblocked, the message
-buffer of size byes in length is copied to that task's message
-buffer. The number of tasks that were unblocked is returned in
-count.
-
-@subheading NOTES:
-
-The calling task will be preempted if it has
-preemption enabled and a higher priority task is unblocked as
-the result of this directive.
-
-The execution time of this directive is directly
-related to the number of tasks waiting on the message queue,
-although it is more efficient than the equivalent number of
-invocations of @code{@value{DIRPREFIX}message_queue_send}.
-
-Broadcasting a message to a global message queue
-which does not reside on the local node will generate a request
-telling the remote node to broadcast the message to the
-specified message queue.
-
-When a task is unblocked which resides on a different
-node from the message queue, a copy of the message is forwarded
-to the appropriate node, the waiting task is unblocked, and the
-proxy used to represent the task is reclaimed.
-
-@c
-@c
-@c
-@page
-@subsection MESSAGE_QUEUE_RECEIVE - Receive message from a queue
-
-@cindex receive message from a queue
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_message_queue_receive
-@example
-rtems_status_code rtems_message_queue_receive(
- rtems_id id,
- void *buffer,
- rtems_unsigned32 *size,
- rtems_unsigned32 option_set,
- rtems_interval timeout
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Message_Queue_Receive (
- ID : in RTEMS.ID;
- Buffer : in RTEMS.Address;
- Option_Set : in RTEMS.Option;
- Timeout : in RTEMS.Interval;
- Size : out RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - message received successfully@*
-@code{@value{RPREFIX}INVALID_ID} - invalid queue id@*
-@code{@value{RPREFIX}UNSATISFIED} - queue is empty@*
-@code{@value{RPREFIX}TIMEOUT} - timed out waiting for message@*
-@code{@value{RPREFIX}OBJECT_WAS_DELETED} - queue deleted while waiting
-
-@subheading DESCRIPTION:
-
-This directive receives a message from the message
-queue specified in id. The @code{@value{RPREFIX}WAIT} and @code{@value{RPREFIX}NO_WAIT} options of the
-options parameter allow the calling task to specify whether to
-wait for a message to become available or return immediately.
-For either option, if there is at least one message in the
-queue, then it is copied to buffer, size is set to return the
-length of the message in bytes, and this directive returns
-immediately with a successful return code.
-
-If the calling task chooses to return immediately and
-the queue is empty, then a status code indicating this condition
-is returned. If the calling task chooses to wait at the message
-queue and the queue is empty, then the calling task is placed on
-the message wait queue and blocked. If the queue was created
-with the @code{@value{RPREFIX}PRIORITY} option specified, then
-the calling task is inserted into the wait queue according to
-its priority. But, if the queue was created with the
-@code{@value{RPREFIX}FIFO} option specified, then the
-calling task is placed at the rear of the wait queue.
-
-A task choosing to wait at the queue can optionally
-specify a timeout value in the timeout parameter. The timeout
-parameter specifies the maximum interval to wait before the
-calling task desires to be unblocked. If it is set to
-@code{@value{RPREFIX}NO_TIMEOUT}, then the calling task will wait forever.
-
-@subheading NOTES:
-
-The following message receive option constants are
-defined by RTEMS:
-
-@itemize @bullet
-@item @code{@value{RPREFIX}WAIT} - task will wait for a message (default)
-@item @code{@value{RPREFIX}NO_WAIT} - task should not wait
-@end itemize
-
-Receiving a message from a global message queue which
-does not reside on the local node will generate a request to the
-remote node to obtain a message from the specified message
-queue. If no message is available and @code{@value{RPREFIX}WAIT} was specified, then
-the task must be blocked until a message is posted. A proxy is
-allocated on the remote node to represent the task until the
-message is posted.
-
-A clock tick is required to support the timeout functionality of
-this directive.
-
-@c
-@c
-@c
-@page
-@subsection MESSAGE_QUEUE_GET_NUMBER_PENDING - Get number of messages pending on a queue
-
-@cindex get number of pending messages
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_message_queue_get_number_pending
-@example
-rtems_status_code rtems_message_queue_get_number_pending(
- rtems_id id,
- rtems_unsigned32 *count
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Message_Queue_Get_Number_Pending (
- ID : in RTEMS.ID;
- Count : out RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - number of messages pending returned successfully@*
-@code{@value{RPREFIX}INVALID_ID} - invalid queue id
-
-@subheading DESCRIPTION:
-
-This directive returns the number of messages pending on this
-message queue in count. If no messages are present
-on the queue, count is set to zero.
-
-@subheading NOTES:
-
-Getting the number of pending messages on a global message queue which
-does not reside on the local node will generate a request to the
-remote node to actually obtain the pending message count for
-the specified message queue.
-
-
-@c
-@c
-@c
-@page
-@subsection MESSAGE_QUEUE_FLUSH - Flush all messages on a queue
-
-@cindex flush messages on a queue
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_message_queue_flush
-@example
-rtems_status_code rtems_message_queue_flush(
- rtems_id id,
- rtems_unsigned32 *count
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Message_Queue_Flush (
- ID : in RTEMS.ID;
- Count : out RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - message queue flushed successfully@*
-@code{@value{RPREFIX}INVALID_ID} - invalid queue id
-
-@subheading DESCRIPTION:
-
-This directive removes all pending messages from the
-specified queue id. The number of messages removed is returned
-in count. If no messages are present on the queue, count is set
-to zero.
-
-@subheading NOTES:
-
-Flushing all messages on a global message queue which
-does not reside on the local node will generate a request to the
-remote node to actually flush the specified message queue.
-
diff --git a/doc/user/overview.t b/doc/user/overview.t
deleted file mode 100644
index 48dddf7974..0000000000
--- a/doc/user/overview.t
+++ /dev/null
@@ -1,532 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@c
-@c This chapter is missing the following figures:
-@c
-@c Figure 1-1 RTEMS Application Architecture
-@c Figure 1-2 RTEMS Internal Architecture
-@c
-
-@chapter Overview
-
-@section Introduction
-
-RTEMS, Real-Time Executive for Multiprocessor Systems, is a
-real-time executive (kernel) which provides a high performance
-environment for embedded military applications including the
-following features:
-
-@itemize @bullet
-@item multitasking capabilities
-@item homogeneous and heterogeneous multiprocessor systems
-@item event-driven, priority-based, preemptive scheduling
-@item optional rate monotonic scheduling
-@item intertask communication and synchronization
-@item priority inheritance
-@item responsive interrupt management
-@item dynamic memory allocation
-@item high level of user configurability
-@end itemize
-
-This manual describes the usage of RTEMS for
-applications written in the @value{LANGUAGE} programming language. Those
-implementation details that are processor dependent are provided
-in the Applications Supplement documents. A supplement
-document which addresses specific architectural issues that
-affect RTEMS is provided for each processor type that is
-supported.
-
-@section Real-time Application Systems
-
-Real-time application systems are a special class of
-computer applications. They have a complex set of
-characteristics that distinguish them from other software
-problems. Generally, they must adhere to more rigorous
-requirements. The correctness of the system depends not only on
-the results of computations, but also on the time at which the
-results are produced. The most important and complex
-characteristic of real-time application systems is that they
-must receive and respond to a set of external stimuli within
-rigid and critical time constraints referred to as deadlines.
-Systems can be buried by an avalanche of interdependent,
-asynchronous or cyclical event streams.
-
-Deadlines can be further characterized as either hard
-or soft based upon the value of the results when produced after
-the deadline has passed. A deadline is hard if the results have
-no value or if their use will result in a catastrophic event.
-In contrast, results which are produced after a soft deadline
-may have some value.
-
-Another distinguishing requirement of real-time
-application systems is the ability to coordinate or manage a
-large number of concurrent activities. Since software is a
-synchronous entity, this presents special problems. One
-instruction follows another in a repeating synchronous cycle.
-Even though mechanisms have been developed to allow for the
-processing of external asynchronous events, the software design
-efforts required to process and manage these events and tasks
-are growing more complicated.
-
-The design process is complicated further by
-spreading this activity over a set of processors instead of a
-single processor. The challenges associated with designing and
-building real-time application systems become very complex when
-multiple processors are involved. New requirements such as
-interprocessor communication channels and global resources that
-must be shared between competing processors are introduced. The
-ramifications of multiple processors complicate each and every
-characteristic of a real-time system.
-
-@section Real-time Executive
-
-Fortunately, real-time operating systems or real-time
-executives serve as a cornerstone on which to build the
-application system. A real-time multitasking executive allows
-an application to be cast into a set of logical, autonomous
-processes or tasks which become quite manageable. Each task is
-internally synchronous, but different tasks execute
-independently, resulting in an asynchronous processing stream.
-Tasks can be dynamically paused for many reasons resulting in a
-different task being allowed to execute for a period of time.
-The executive also provides an interface to other system
-components such as interrupt handlers and device drivers.
-System components may request the executive to allocate and
-coordinate resources, and to wait for and trigger synchronizing
-conditions. The executive system calls effectively extend the
-CPU instruction set to support efficient multitasking. By
-causing tasks to travel through well-defined state transitions,
-system calls permit an application to demand-switch between
-tasks in response to real-time events.
-
-By proper grouping of responses to stimuli into
-separate tasks, a system can now asynchronously switch between
-independent streams of execution, directly responding to
-external stimuli as they occur. This allows the system design
-to meet critical performance specifications which are typically
-measured by guaranteed response time and transaction throughput.
-The multiprocessor extensions of RTEMS provide the features
-necessary to manage the extra requirements introduced by a
-system distributed across several processors. It removes the
-physical barriers of processor boundaries from the world of the
-system designer, enabling more critical aspects of the system to
-receive the required attention. Such a system, based on an
-efficient real-time, multiprocessor executive, is a more
-realistic model of the outside world or environment for which it
-is designed. As a result, the system will always be more
-logical, efficient, and reliable.
-
-By using the directives provided by RTEMS, the
-real-time applications developer is freed from the problem of
-controlling and synchronizing multiple tasks and processors. In
-addition, one need not develop, test, debug, and document
-routines to manage memory, pass messages, or provide mutual
-exclusion. The developer is then able to concentrate solely on
-the application. By using standard software components, the
-time and cost required to develop sophisticated real-time
-applications is significantly reduced.
-
-@section RTEMS Application Architecture
-
-One important design goal of RTEMS was to provide a
-bridge between two critical layers of typical real-time systems.
-As shown in the following figure, RTEMS serves as a buffer between the
-project dependent application code and the target hardware.
-Most hardware dependencies for real-time applications can be
-localized to the low level device drivers.
-
-@ifset use-ascii
-@example
-@group
- +-----------------------------------------------------------+
- | Application Dependent Software |
- | +----------------------------------------+ |
- | | Standard Application Components | |
- | | +-------------+---+ |
- | +---+-----------+ | | |
- | | Board Support | | RTEMS | |
- | | Package | | | |
- +----+---------------+--------------+-----------------+-----|
- | Target Hardware |
- +-----------------------------------------------------------+
-@end group
-@end example
-@end ifset
-
-@ifset use-tex
-@sp 1
-@tex
-\centerline{\vbox{\offinterlineskip\halign{
-\vrule#&
-\hbox to 0.50in{\enskip\hfil#\hfil}&
-\vrule#&
-\hbox to 0.50in{\enskip\hfil#\hfil}&
-\vrule#&
-\hbox to 0.75in{\enskip\hfil#\hfil}&
-\vrule#&
-\hbox to 0.75in{\enskip\hfil#\hfil}&
-\vrule#&
-\hbox to 0.75in{\enskip\hfil#\hfil}&
-\vrule#&
-\hbox to 0.75in{\enskip\hfil#\hfil}&
-\vrule#&
-\hbox to 0.50in{\enskip\hfil#\hfil}&
-\vrule#&
-\hbox to 0.50in{\enskip\hfil#\hfil}&
-\vrule#\cr
-\multispan{17}\hrulefill\cr
-% to force all columns to desired width
-& \enskip && \enskip && \enskip && \enskip &&
- \enskip && \enskip &&\enskip &&\enskip &\cr
-% For debugging columns
-%& \enskip 0&& \enskip 1&& \enskip 2&& \enskip 3&&
-% \enskip 4&& \enskip 5&&\enskip 6&&\enskip 7&\cr
-\strut&\multispan{15}&\cr
-&\multispan{15}\hfil Application Dependent Software\hfil&\cr
-\strut&\multispan{15}&\cr
-&\multispan{2}&&\multispan{8}\hrulefill &\multispan{2}&\cr
-\strut&\multispan{2}&&&\multispan{7}&&\multispan{2}&&\cr
-&\multispan{2}&&&\multispan{7}\hfil Standard Application Components\hfil&
- &\multispan{2}&&\cr
-\strut&\multispan{2}&&&\multispan{7}&&\multispan{2}&&\cr
-&&\multispan{5}\hrulefill&&\multispan{7}\hrulefill&&\cr
-\strut&&&\multispan{3} &&&&\multispan{5}&&&\cr
-&&&\multispan{3}\hfil Device\hfil&&&&\multispan{5}\hfil RTEMS\hfil&&&\cr
-&&&\multispan{3}\hfil Drivers\hfil&&&&\multispan{5}&&&\cr
-\strut&&&\multispan{3} &&&&\multispan{5}&&&\cr
-\multispan{17}\hrulefill\cr
-\strut&\multispan{15}&\cr
-&\multispan{15}\hfil Target Hardware\hfil&\cr
-\strut&\multispan{15}&\cr
-\multispan{17}\hrulefill\cr
-}}\hfil}
-@end tex
-@end ifset
-
-@ifset use-html
-@html
-<IMG SRC="rtemsarc.png" WIDTH=500 HEIGHT=300 ALT="RTEMS Application Architecture">
-@end html
-@end ifset
-
-The RTEMS I/O interface manager provides an efficient tool for incorporating
-these hardware dependencies into the system while simultaneously
-providing a general mechanism to the application code that
-accesses them. A well designed real-time system can benefit
-from this architecture by building a rich library of standard
-application components which can be used repeatedly in other
-real-time projects.
-
-@section RTEMS Internal Architecture
-
-RTEMS can be viewed as a set of layered components that work in
-harmony to provide a set of services to a real-time application
-system. The executive interface presented to the application is
-formed by grouping directives into logical sets called resource managers.
-Functions utilized by multiple managers such as scheduling,
-dispatching, and object management are provided in the executive
-core. The executive core depends on a small set of CPU dependent routines.
-Together these components provide a powerful run time
-environment that promotes the development of efficient real-time
-application systems. The following figure illustrates this organization:
-
-@ifset use-ascii
-@example
-@group
- +-----------------------------------------------+
- | RTEMS Executive Interface |
- +-----------------------------------------------+
- | RTEMS Core |
- +-----------------------------------------------+
- | CPU Dependent Code |
- +-----------------------------------------------+
-@end group
-@end example
-@end ifset
-
-@ifset use-tex
-@c for now use the ascii version
-@c @example
-@c @group
-@c +-----------------------------------------------+
-@c | RTEMS Executive Interface |
-@c +-----------------------------------------------+
-@c | RTEMS Core |
-@c +-----------------------------------------------+
-@c | CPU Dependent Code |
-@c +-----------------------------------------------+
-@c @end group
-@c @end example
-@image{rtemspie,4in,3in}
-@tex
-@end tex
-@end ifset
-
-@ifset use-html
-@html
-<IMG SRC="rtemspie.png" WIDTH=500 HEIGHT=300 ALT="RTEMS Architecture">
-@end html
-@end ifset
-Subsequent chapters present a detailed description of the capabilities
-provided by each of the following RTEMS managers:
-
-@itemize @bullet
-@item initialization
-@item task
-@item interrupt
-@item clock
-@item timer
-@item semaphore
-@item message
-@item event
-@item signal
-@item partition
-@item region
-@item dual ported memory
-@item I/O
-@item fatal error
-@item rate monotonic
-@item user extensions
-@item multiprocessing
-@end itemize
-
-@section User Customization and Extensibility
-
-As thirty-two bit microprocessors have decreased in
-cost, they have become increasingly common in a variety of
-embedded systems. A wide range of custom and general-purpose
-processor boards are based on various thirty-two bit processors.
-RTEMS was designed to make no assumptions concerning the
-characteristics of individual microprocessor families or of
-specific support hardware. In addition, RTEMS allows the system
-developer a high degree of freedom in customizing and extending
-its features.
-
-RTEMS assumes the existence of a supported
-microprocessor and sufficient memory for both RTEMS and the
-real-time application. Board dependent components such as
-clocks, interrupt controllers, or I/O devices can be easily
-integrated with RTEMS. The customization and extensibility
-features allow RTEMS to efficiently support as many environments
-as possible.
-
-@section Portability
-
-The issue of portability was the major factor in the
-creation of RTEMS. Since RTEMS is designed to isolate the
-hardware dependencies in the specific board support packages,
-the real-time application should be easily ported to any other
-processor. The use of RTEMS allows the development of real-time
-applications which can be completely independent of a particular
-microprocessor architecture.
-
-@section Memory Requirements
-
-Since memory is a critical resource in many real-time
-embedded systems, RTEMS was specifically designed to allow
-unused managers to be excluded from the run-time environment.
-This allows the application designer the flexibility to tailor
-RTEMS to most efficiently meet system requirements while still
-satisfying even the most stringent memory constraints. As a
-result, the size of the RTEMS executive is application
-dependent. A worksheet is provided in the Memory Requirements
-chapter of the Applications Supplement document for a specific
-target processor. The worksheet is used to calculate the memory
-requirements of a custom RTEMS run-time environment. The
-following managers may be optionally excluded:
-
-@itemize @bullet
-@item clock
-@item timer
-@item semaphore
-@item message
-@item event
-@item signal
-@item partition
-@item region
-@item dual ported memory
-@item I/O
-@item rate monotonic
-@item fatal error
-@item multiprocessing
-@end itemize
-
-RTEMS utilizes memory for both code and data space.
-Although RTEMS' data space must be in RAM, its code space can be
-located in either ROM or RAM.
-
-@section Audience
-
-This manual was written for experienced real-time
-software developers. Although some background is provided, it
-is assumed that the reader is familiar with the concepts of task
-management as well as intertask communication and
-synchronization. Since directives, user related data
-structures, and examples are presented in @value{LANGUAGE}, a basic
-understanding of the @value{LANGUAGE} programming language
-is required to fully
-understand the material presented. However, because of the
-similarity of the Ada and C RTEMS implementations, users will
-find that the use and behavior of the two implementations is
-very similar. A working knowledge of the target processor is
-helpful in understanding some of RTEMS' features. A thorough
-understanding of the executive cannot be obtained without
-studying the entire manual because many of RTEMS' concepts and
-features are interrelated. Experienced RTEMS users will find
-that the manual organization facilitates its use as a reference
-document.
-
-@section Conventions
-
-The following conventions are used in this manual:
-
-@itemize @bullet
-@item Significant words or phrases as well as all directive
-names are printed in bold type.
-
-@item Items in bold capital letters are constants defined by
-RTEMS. Each language interface provided by RTEMS includes a
-file containing the standard set of constants, data types, and
-@value{STRUCTURE} definitions which can be incorporated into the user
-application.
-
-@item A number of type definitions are provided by RTEMS and
-can be found in rtems.h.
-
-@item The characters "0x" preceding a number indicates that
-the number is in hexadecimal format. Any other numbers are
-assumed to be in decimal format.
-@end itemize
-
-@section Manual Organization
-
-This first chapter has presented the introductory and
-background material for the RTEMS executive. The remaining
-chapters of this manual present a detailed description of RTEMS
-and the environment, including run time behavior, it creates for
-the user.
-
-A chapter is dedicated to each manager and provides a
-detailed discussion of each RTEMS manager and the directives
-which it provides. The presentation format for each directive
-includes the following sections:
-
-@itemize @bullet
-@item Calling sequence
-@item Directive status codes
-@item Description
-@item Notes
-@end itemize
-
-The following provides an overview of the remainder
-of this manual:
-
-@table @asis
-@item Chapter 2
-Key Concepts: presents an
-introduction to the ideas which are common across multiple RTEMS
-managers.
-
-@item Chapter 3:
-Initialization Manager: describes the functionality and directives
-provided by the Initialization Manager.
-
-@item Chapter 4:
-Task Manager: describes the functionality and directives provided
-by the Task Manager.
-
-@item Chapter 5:
-Interrupt Manager: describes the functionality and directives
-provided by the Interrupt Manager.
-
-@item Chapter 6:
-Clock Manager: describes the functionality and directives
-provided by the Clock Manager.
-
-@item Chapter 7
-Timer Manager: describes the functionality and directives provided
-by the Timer Manager.
-
-@item Chapter 8:
-Semaphore Manager: describes the functionality and directives
-provided by the Semaphore Manager.
-
-@item Chapter 9:
-Message Manager: describes the functionality and directives
-provided by the Message Manager.
-
-@item Chapter 10:
-Event Manager: describes the
-functionality and directives provided by the Event Manager.
-
-@item Chapter 11:
-Signal Manager: describes the
-functionality and directives provided by the Signal Manager.
-
-@item Chapter 12:
-Partition Manager: describes the
-functionality and directives provided by the Partition Manager.
-
-@item Chapter 13:
-Region Manager: describes the
-functionality and directives provided by the Region Manager.
-
-@item Chapter 14:
-Dual-Ported Memory Manager: describes
-the functionality and directives provided by the Dual-Ported
-Memory Manager.
-
-@item Chapter 15:
-I/O Manager: describes the
-functionality and directives provided by the I/O Manager.
-
-@item Chapter 16:
-Fatal Error Manager: describes the functionality and directives
-provided by the Fatal Error Manager.
-
-@item Chapter 17:
-Scheduling Concepts: details the RTEMS scheduling algorithm and
-task state transitions.
-
-@item Chapter 18:
-Rate Monotonic Manager: describes the functionality and directives
-provided by the Rate Monotonic Manager.
-
-@item Chapter 19:
-Board Support Packages: defines the
-functionality required of user-supplied board support packages.
-
-@item Chapter 20:
-User Extensions: shows the user how to
-extend RTEMS to incorporate custom features.
-
-@item Chapter 21:
-Configuring a System: details the process by which one tailors RTEMS
-for a particular single-processor or multiprocessor application.
-
-@item Chapter 22:
-Multiprocessing Manager: presents a
-conceptual overview of the multiprocessing capabilities provided
-by RTEMS as well as describing the Multiprocessing
-Communications Interface Layer and Multiprocessing Manager
-directives.
-
-@item Chapter 23:
-Directive Status Codes: provides a definition of each of the
-directive status codes referenced in this manual.
-
-@item Chapter 24:
-Example Application: provides a template for simple RTEMS applications.
-
-@item Chapter 25:
-Glossary: defines terms used throughout this manual.
-
-@end table
-
-
diff --git a/doc/user/part.t b/doc/user/part.t
deleted file mode 100644
index e4889cdabf..0000000000
--- a/doc/user/part.t
+++ /dev/null
@@ -1,448 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Partition Manager
-
-@cindex partitions
-
-@section Introduction
-
-The partition manager provides facilities to
-dynamically allocate memory in fixed-size units. The directives
-provided by the partition manager are:
-
-@itemize @bullet
-@item @code{@value{DIRPREFIX}partition_create} - Create a partition
-@item @code{@value{DIRPREFIX}partition_ident} - Get ID of a partition
-@item @code{@value{DIRPREFIX}partition_delete} - Delete a partition
-@item @code{@value{DIRPREFIX}partition_get_buffer} - Get buffer from a partition
-@item @code{@value{DIRPREFIX}partition_return_buffer} - Return buffer to a partition
-@end itemize
-
-@section Background
-
-@subsection Partition Manager Definitions
-
-@cindex partition, definition
-
-A partition is a physically contiguous memory area
-divided into fixed-size buffers that can be dynamically
-allocated and deallocated.
-
-@cindex buffers, definition
-
-Partitions are managed and maintained as a list of
-buffers. Buffers are obtained from the front of the partition's
-free buffer chain and returned to the rear of the same chain.
-When a buffer is on the free buffer chain, RTEMS uses eight
-bytes of each buffer as the free buffer chain. When a buffer is
-allocated, the entire buffer is available for application use.
-Therefore, modifying memory that is outside of an allocated
-buffer could destroy the free buffer chain or the contents of an
-adjacent allocated buffer.
-
-@subsection Building a Partition Attribute Set
-
-@cindex partition attribute set, building
-
-In general, an attribute set is built by a bitwise OR
-of the desired attribute components. The set of valid partition
-attributes is provided in the following table:
-
-@itemize @bullet
-@item @code{@value{RPREFIX}LOCAL} - local task (default)
-@item @code{@value{RPREFIX}GLOBAL} - global task
-@end itemize
-
-Attribute values are specifically designed to be
-mutually exclusive, therefore bitwise OR and addition operations
-are equivalent as long as each attribute appears exactly once in
-the component list. An attribute listed as a default is not
-required to appear in the attribute list, although it is a good
-programming practice to specify default attributes. If all
-defaults are desired, the attribute
-@code{@value{RPREFIX}DEFAULT_ATTRIBUTES} should be
-specified on this call. The attribute_set parameter should be
-@code{@value{RPREFIX}GLOBAL} to indicate that the partition
-is to be known globally.
-
-@section Operations
-
-@subsection Creating a Partition
-
-The @code{@value{DIRPREFIX}partition_create} directive creates a partition
-with a user-specified name. The partition's name, starting
-address, length and buffer size are all specified to the
-@code{@value{DIRPREFIX}partition_create} directive.
-RTEMS allocates a Partition Control
-Block (PTCB) from the PTCB free list. This data structure is
-used by RTEMS to manage the newly created partition. The number
-of buffers in the partition is calculated based upon the
-specified partition length and buffer size, and returned to the
-calling task along with a unique partition ID.
-
-@subsection Obtaining Partition IDs
-
-When a partition is created, RTEMS generates a unique
-partition ID and assigned it to the created partition until it
-is deleted. The partition ID may be obtained by either of two
-methods. First, as the result of an invocation of the
-@code{@value{DIRPREFIX}partition_create} directive, the partition
-ID is stored in a user provided location. Second, the partition
-ID may be obtained later using the @code{@value{DIRPREFIX}partition_ident}
-directive. The partition ID is used by other partition manager directives
-to access this partition.
-
-@subsection Acquiring a Buffer
-
-A buffer can be obtained by calling the
-@code{@value{DIRPREFIX}partition_get_buffer} directive.
-If a buffer is available, then
-it is returned immediately with a successful return code.
-Otherwise, an unsuccessful return code is returned immediately
-to the caller. Tasks cannot block to wait for a buffer to
-become available.
-
-@subsection Releasing a Buffer
-
-Buffers are returned to a partition's free buffer
-chain with the @code{@value{DIRPREFIX}partition_return_buffer} directive. This
-directive returns an error status code if the returned buffer
-was not previously allocated from this partition.
-
-@subsection Deleting a Partition
-
-The @code{@value{DIRPREFIX}partition_delete} directive allows a partition to
-be removed and returned to RTEMS. When a partition is deleted,
-the PTCB for that partition is returned to the PTCB free list.
-A partition with buffers still allocated cannot be deleted. Any
-task attempting to do so will be returned an error status code.
-
-@section Directives
-
-This section details the partition manager's
-directives. A subsection is dedicated to each of this manager's
-directives and describes the calling sequence, related
-constants, usage, and status codes.
-
-@c
-@c
-@c
-@page
-@subsection PARTITION_CREATE - Create a partition
-
-@cindex create a partition
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_partition_create
-@example
-rtems_status_code rtems_partition_create(
- rtems_name name,
- void *starting_address,
- rtems_unsigned32 length,
- rtems_unsigned32 buffer_size,
- rtems_attribute attribute_set,
- rtems_id *id
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Partition_Create (
- Name : in RTEMS.Name;
- Starting_Address : in RTEMS.Address;
- Length : in RTEMS.Unsigned32;
- Buffer_Size : in RTEMS.Unsigned32;
- Attribute_Set : in RTEMS.Attribute;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - partition created successfully@*
-@code{@value{RPREFIX}INVALID_NAME} - invalid task name@*
-@code{@value{RPREFIX}TOO_MANY} - too many partitions created@*
-@code{@value{RPREFIX}INVALID_ADDRESS} - address not on four byte boundary@*
-@code{@value{RPREFIX}INVALID_SIZE} - length or buffer size is 0@*
-@code{@value{RPREFIX}INVALID_SIZE} - length is less than the buffer size@*
-@code{@value{RPREFIX}INVALID_SIZE} - buffer size not a multiple of 4@*
-@code{@value{RPREFIX}MP_NOT_CONFIGURED} - multiprocessing not configured@*
-@code{@value{RPREFIX}TOO_MANY} - too many global objects
-
-@subheading DESCRIPTION:
-
-This directive creates a partition of fixed size
-buffers from a physically contiguous memory space which starts
-at starting_address and is length bytes in size. Each allocated
-buffer is to be of buffer_length in bytes. The assigned
-partition id is returned in id. This partition id is used to
-access the partition with other partition related directives.
-For control and maintenance of the partition, RTEMS allocates a
-PTCB from the local PTCB free pool and initializes it.
-
-@subheading NOTES:
-
-This directive will not cause the calling task to be
-preempted.
-
-The starting_address and buffer_size parameters must
-be multiples of four.
-
-Memory from the partition is not used by RTEMS to
-store the Partition Control Block.
-
-The following partition attribute constants are
-defined by RTEMS:
-
-@itemize @bullet
-@item @code{@value{RPREFIX}LOCAL} - local task (default)
-@item @code{@value{RPREFIX}GLOBAL} - global task
-@end itemize
-
-The PTCB for a global partition is allocated on the
-local node. The memory space used for the partition must reside
-in shared memory. Partitions should not be made global unless
-remote tasks must interact with the partition. This is to avoid
-the overhead incurred by the creation of a global partition.
-When a global partition is created, the partition's name and id
-must be transmitted to every node in the system for insertion in
-the local copy of the global object table.
-
-The total number of global objects, including
-partitions, is limited by the maximum_global_objects field in
-the Configuration Table.
-
-@c
-@c
-@c
-@page
-@subsection PARTITION_IDENT - Get ID of a partition
-
-@cindex get ID of a partition
-@cindex obtain ID of a partition
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_partition_ident
-@example
-rtems_status_code rtems_partition_ident(
- rtems_name name,
- rtems_unsigned32 node,
- rtems_id *id
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Partition_Ident (
- Name : in RTEMS.Name;
- Node : in RTEMS.Unsigned32;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - partition identified successfully@*
-@code{@value{RPREFIX}INVALID_NAME} - partition name not found@*
-@code{@value{RPREFIX}INVALID_NODE} - invalid node id
-
-@subheading DESCRIPTION:
-
-This directive obtains the partition id associated
-with the partition name. If the partition name is not unique,
-then the partition id will match one of the partitions with that
-name. However, this partition id is not guaranteed to
-correspond to the desired partition. The partition id is used
-with other partition related directives to access the partition.
-
-@subheading NOTES:
-
-This directive will not cause the running task to be
-preempted.
-
-If node is @code{@value{RPREFIX}SEARCH_ALL_NODES}, all nodes are searched
-with the local node being searched first. All other nodes are
-searched with the lowest numbered node searched first.
-
-If node is a valid node number which does not
-represent the local node, then only the partitions exported by
-the designated node are searched.
-
-This directive does not generate activity on remote
-nodes. It accesses only the local copy of the global object
-table.
-
-@c
-@c
-@c
-@page
-@subsection PARTITION_DELETE - Delete a partition
-
-@cindex delete a partition
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_partition_delete
-@example
-rtems_status_code rtems_partition_delete(
- rtems_id id
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Partition_Delete (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - partition deleted successfully@*
-@code{@value{RPREFIX}INVALID_ID} - invalid partition id@*
-@code{@value{RPREFIX}RESOURCE_IN_USE} - buffers still in use@*
-@code{@value{RPREFIX}ILLEGAL_ON_REMOTE_OBJECT} - cannot delete remote partition
-
-@subheading DESCRIPTION:
-
-This directive deletes the partition specified by id.
-The partition cannot be deleted if any of its buffers are still
-allocated. The PTCB for the deleted partition is reclaimed by
-RTEMS.
-
-@subheading NOTES:
-
-This directive will not cause the calling task to be
-preempted.
-
-The calling task does not have to be the task that
-created the partition. Any local task that knows the partition
-id can delete the partition.
-
-When a global partition is deleted, the partition id
-must be transmitted to every node in the system for deletion
-from the local copy of the global object table.
-
-The partition must reside on the local node, even if
-the partition was created with the @code{@value{RPREFIX}GLOBAL} option.
-
-@c
-@c
-@c
-@page
-@subsection PARTITION_GET_BUFFER - Get buffer from a partition
-
-@cindex get buffer from partition
-@cindex obtain buffer from partition
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_partition_get_buffer
-@example
-rtems_status_code rtems_partition_get_buffer(
- rtems_id id,
- void **buffer
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Partition_Get_Buffer (
- ID : in RTEMS.ID;
- Buffer : out RTEMS.Address;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - buffer obtained successfully@*
-@code{@value{RPREFIX}INVALID_ID} - invalid partition id@*
-@code{@value{RPREFIX}UNSATISFIED} - all buffers are allocated
-
-@subheading DESCRIPTION:
-
-This directive allows a buffer to be obtained from
-the partition specified in id. The address of the allocated
-buffer is returned in buffer.
-
-@subheading NOTES:
-
-This directive will not cause the running task to be
-preempted.
-
-All buffers begin on a four byte boundary.
-
-A task cannot wait on a buffer to become available.
-
-Getting a buffer from a global partition which does
-not reside on the local node will generate a request telling the
-remote node to allocate a buffer from the specified partition.
-
-@c
-@c
-@c
-@page
-@subsection PARTITION_RETURN_BUFFER - Return buffer to a partition
-
-@cindex return buffer to partitition
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_partition_return_buffer
-@example
-rtems_status_code rtems_partition_return_buffer(
- rtems_id id,
- void *buffer
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Partition_Return_Buffer (
- ID : in RTEMS.ID;
- Buffer : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - buffer returned successfully@*
-@code{@value{RPREFIX}INVALID_ID} - invalid partition id@*
-@code{@value{RPREFIX}INVALID_ADDRESS} - buffer address not in partition
-
-@subheading DESCRIPTION:
-
-This directive returns the buffer specified by buffer
-to the partition specified by id.
-
-@subheading NOTES:
-
-This directive will not cause the running task to be
-preempted.
-
-Returning a buffer to a global partition which does
-not reside on the local node will generate a request telling the
-remote node to return the buffer to the specified partition.
diff --git a/doc/user/preface.texi b/doc/user/preface.texi
deleted file mode 100644
index c1565877c5..0000000000
--- a/doc/user/preface.texi
+++ /dev/null
@@ -1,189 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@ifinfo
-@node Preface, Overview, Top, Top
-@end ifinfo
-@unnumbered Preface
-
-In recent years, the cost required to develop a
-software product has increased significantly while the target
-hardware costs have decreased. Now a larger portion of money is
-expended in developing, using, and maintaining software. The
-trend in computing costs is the complete dominance of software
-over hardware costs. Because of this, it is necessary that
-formal disciplines be established to increase the probability
-that software is characterized by a high degree of correctness,
-maintainability, and portability. In addition, these
-disciplines must promote practices that aid in the consistent
-and orderly development of a software system within schedule and
-budgetary constraints. To be effective, these disciplines must
-adopt standards which channel individual software efforts toward
-a common goal.
-
-The push for standards in the software development
-field has been met with various degrees of success. The
-Microprocessor Operating Systems Interfaces (MOSI) effort has
-experienced only limited success. As popular as the UNIX
-operating system has grown, the attempt to develop a standard
-interface definition to allow portable application development
-has only recently begun to produce the results needed in this
-area. Unfortunately, very little effort has been expended to
-provide standards addressing the needs of the real-time
-community. Several organizations have addressed this need
-during recent years.
-
-The Real Time Executive Interface Definition (RTEID)
-was developed by Motorola with technical input from Software
-Components Group. RTEID was adopted by the VMEbus International
-Trade Association (VITA) as a baseline draft for their proposed
-standard multiprocessor, real-time executive interface, Open
-Real-Time Kernel Interface Definition (ORKID). These two groups
-are currently working together with the IEEE P1003.4 committee
-to insure that the functionality of their proposed standards is
-adopted as the real-time extensions to POSIX.
-
-This emerging standard defines an interface for the
-development of real-time software to ease the writing of
-real-time application programs that are directly portable across
-multiple real-time executive implementations. This interface
-includes both the source code interfaces and run-time behavior
-as seen by a real-time application. It does not include the
-details of how a kernel implements these functions. The
-standard's goal is to serve as a complete definition of external
-interfaces so that application code that conforms to these
-interfaces will execute properly in all real-time executive
-environments. With the use of a standards compliant executive,
-routines that acquire memory blocks, create and manage message
-queues, establish and use semaphores, and send and receive
-signals need not be redeveloped for a different real-time
-environment as long as the new environment is compliant with the
-standard. Software developers need only concentrate on the
-hardware dependencies of the real-time system. Furthermore,
-most hardware dependencies for real-time applications can be
-localized to the device drivers.
-
-A compliant executive provides simple and flexible
-real-time multiprocessing. It easily lends itself to both
-tightly-coupled and loosely-coupled configurations (depending on
-the system hardware configuration). Objects such as tasks,
-queues, events, signals, semaphores, and memory blocks can be
-designated as global objects and accessed by any task regardless
-of which processor the object and the accessing task reside.
-
-The acceptance of a standard for real-time executives
-will produce the same advantages enjoyed from the push for UNIX
-standardization by AT&T's System V Interface Definition and
-IEEE's POSIX efforts. A compliant multiprocessing executive
-will allow close coupling between UNIX systems and real-time
-executives to provide the many benefits of the UNIX development
-environment to be applied to real-time software development.
-Together they provide the necessary laboratory environment to
-implement real-time, distributed, embedded systems using a wide
-variety of computer architectures.
-
-A study was completed in 1988, within the Research,
-Development, and Engineering Center, U.S. Army Missile Command,
-which compared the various aspects of the Ada programming
-language as they related to the application of Ada code in
-distributed and/or multiple processing systems. Several
-critical conclusions were derived from the study. These
-conclusions have a major impact on the way the Army develops
-application software for embedded applications. These impacts
-apply to both in-house software development and contractor
-developed software.
-
-A conclusion of the analysis, which has been
-previously recognized by other agencies attempting to utilize
-Ada in a distributed or multiprocessing environment, is that the
-Ada programming language does not adequately support
-multiprocessing. Ada does provide a mechanism for
-multi-tasking, however, this capability exists only for a single
-processor system. The language also does not have inherent
-capabilities to access global named variables, flags or program
-code. These critical features are essential in order for data
-to be shared between processors. However, these drawbacks do
-have workarounds which are sometimes awkward and defeat the
-intent of software maintainability and portability goals.
-
-Another conclusion drawn from the analysis, was that
-the run time executives being delivered with the Ada compilers
-were too slow and inefficient to be used in modern missile
-systems. A run time executive is the core part of the run time
-system code, or operating system code, that controls task
-scheduling, input/output management and memory management.
-Traditionally, whenever efficient executive (also known as
-kernel) code was required by the application, the user developed
-in-house software. This software was usually written in
-assembly language for optimization.
-
-Because of this shortcoming in the Ada programming
-language, software developers in research and development and
-contractors for project managed systems, are mandated by
-technology to purchase and utilize off-the-shelf third party
-kernel code. The contractor, and eventually the Government,
-must pay a licensing fee for every copy of the kernel code used
-in an embedded system.
-
-The main drawback to this development environment is
-that the Government does not own, nor has the right to modify
-code contained within the kernel. V&V techniques in this
-situation are more difficult than if the complete source code
-were available. Responsibility for system failures due to faulty
-software is yet another area to be resolved under this
-environment.
-
-The Guidance and Control Directorate began a software
-development effort to address these problems. A project to
-develop an experimental run time kernel was begun that will
-eliminate the major drawbacks of the Ada programming language
-mentioned above. The Real Time Executive for Multiprocessor Systems
-(RTEMS) provides full capabilities for management of tasks,
-interrupts, time, and multiple processors in addition to those
-features typical of generic operating systems. The code is
-Government owned, so no licensing fees are necessary. RTEMS has
-been implemented in both the Ada and C programming languages.
-It has been ported to the following processor families:
-
-@itemize @bullet
-@item Intel i80386 and above
-@item Intel i80960
-@item Motorola MC68xxx
-@item Motorola MC683xx
-@item MIPS
-@item PowerPC
-@item SPARC
-@item Hewlett Packard PA-RISC
-@item Hitach SH
-@item AMD A29K
-@item UNIX
-@end itemize
-
-Support for other processor families, including RISC, CISC, and DSP, is
-planned. Since almost all of RTEMS is written in a high level language,
-ports to additional processor families require minimal effort.
-
-RTEMS multiprocessor support is capable of handling
-either homogeneous or heterogeneous systems. The kernel
-automatically compensates for architectural differences (byte
-swapping, etc.) between processors. This allows a much easier
-transition from one processor family to another without a major
-system redesign.
-
-Since the proposed standards are still in draft form,
-RTEMS cannot and does not claim compliance. However, the status
-of the standard is being carefully monitored to guarantee that
-RTEMS provides the functionality specified in the standard.
-Once approved, RTEMS will be made compliant.
-
-This document is a detailed users guide for a
-functionally compliant real-time multiprocessor executive. It
-describes the user interface and run-time behavior of Release
-@value{RTEMS-RELEASE} of the @value{LANGUAGE} interface
-to RTEMS.
-
diff --git a/doc/user/region.t b/doc/user/region.t
deleted file mode 100644
index cfa4b2a939..0000000000
--- a/doc/user/region.t
+++ /dev/null
@@ -1,657 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Region Manager
-
-@cindex regions
-
-@section Introduction
-
-The region manager provides facilities to dynamically
-allocate memory in variable sized units. The directives
-provided by the region manager are:
-
-@itemize @bullet
-@item @code{@value{DIRPREFIX}region_create} - Create a region
-@item @code{@value{DIRPREFIX}region_ident} - Get ID of a region
-@item @code{@value{DIRPREFIX}region_delete} - Delete a region
-@item @code{@value{DIRPREFIX}region_extend} - Add memory to a region
-@item @code{@value{DIRPREFIX}region_get_segment} - Get segment from a region
-@item @code{@value{DIRPREFIX}region_return_segment} - Return segment to a region
-@item @code{@value{DIRPREFIX}region_get_segment_size} - Obtain size of a segment
-@end itemize
-
-@section Background
-
-@subsection Region Manager Definitions
-
-@cindex region, definition
-@cindex segment, definition
-
-A region makes up a physically contiguous memory
-space with user-defined boundaries from which variable-sized
-segments are dynamically allocated and deallocated. A segment
-is a variable size section of memory which is allocated in
-multiples of a user-defined page size. This page size is
-required to be a multiple of four greater than or equal to four.
-For example, if a request for a 350-byte segment is made in a
-region with 256-byte pages, then a 512-byte segment is allocated.
-
-Regions are organized as doubly linked chains of
-variable sized memory blocks. Memory requests are allocated
-using a first-fit algorithm. If available, the requester
-receives the number of bytes requested (rounded up to the next
-page size). RTEMS requires some overhead from the region's
-memory for each segment that is allocated. Therefore, an
-application should only modify the memory of a segment that has
-been obtained from the region. The application should NOT
-modify the memory outside of any obtained segments and within
-the region's boundaries while the region is currently active in
-the system.
-
-Upon return to the region, the free block is
-coalesced with its neighbors (if free) on both sides to produce
-the largest possible unused block.
-
-@subsection Building an Attribute Set
-
-@cindex region attribute set, building
-
-In general, an attribute set is built by a bitwise OR
-of the desired attribute components. The set of valid region
-attributes is provided in the following table:
-
-@itemize @bullet
-@item @code{@value{RPREFIX}FIFO} - tasks wait by FIFO (default)
-@item @code{@value{RPREFIX}PRIORITY} - tasks wait by priority
-@end itemize
-
-Attribute values are specifically designed to be
-mutually exclusive, therefore bitwise OR and addition operations
-are equivalent as long as each attribute appears exactly once in
-the component list. An attribute listed as a default is not
-required to appear in the attribute list, although it is a good
-programming practice to specify default attributes. If all
-defaults are desired, the attribute
-@code{@value{RPREFIX}DEFAULT_ATTRIBUTES} should be
-specified on this call.
-
-This example demonstrates the attribute_set parameter
-needed to create a region with the task priority waiting queue
-discipline. The attribute_set parameter to the
-@code{@value{DIRPREFIX}region_create}
-directive should be @code{@value{RPREFIX}PRIORITY}.
-
-@subsection Building an Option Set
-
-In general, an option is built by a bitwise OR of the
-desired option components. The set of valid options for the
-@code{@value{DIRPREFIX}region_get_segment} directive are
-listed in the following table:
-
-@itemize @bullet
-@item @code{@value{RPREFIX}WAIT} - task will wait for semaphore (default)
-@item @code{@value{RPREFIX}NO_WAIT} - task should not wait
-@end itemize
-
-Option values are specifically designed to be
-mutually exclusive, therefore bitwise OR and addition operations
-are equivalent as long as each option appears exactly once in
-the component list. An option listed as a default is not
-required to appear in the option list, although it is a good
-programming practice to specify default options. If all
-defaults are desired, the option
-@code{@value{RPREFIX}DEFAULT_OPTIONS} should be
-specified on this call.
-
-This example demonstrates the option parameter needed
-to poll for a segment. The option parameter passed to the
-@code{@value{DIRPREFIX}region_get_segment} directive should
-be @code{@value{RPREFIX}NO_WAIT}.
-
-@section Operations
-
-@subsection Creating a Region
-
-The @code{@value{DIRPREFIX}region_create} directive creates a region with the
-user-defined name. The user may select FIFO or task priority as
-the method for placing waiting tasks in the task wait queue.
-RTEMS allocates a Region Control Block (RNCB) from the RNCB free
-list to maintain the newly created region. RTEMS also generates
-a unique region ID which is returned to the calling task.
-
-It is not possible to calculate the exact number of
-bytes available to the user since RTEMS requires overhead for
-each segment allocated. For example, a region with one segment
-that is the size of the entire region has more available bytes
-than a region with two segments that collectively are the size
-of the entire region. This is because the region with one
-segment requires only the overhead for one segment, while the
-other region requires the overhead for two segments.
-
-Due to automatic coalescing, the number of segments
-in the region dynamically changes. Therefore, the total
-overhead required by RTEMS dynamically changes.
-
-@subsection Obtaining Region IDs
-
-When a region is created, RTEMS generates a unique
-region ID and assigns it to the created region until it is
-deleted. The region ID may be obtained by either of two
-methods. First, as the result of an invocation of the
-@code{@value{DIRPREFIX}region_create} directive,
-the region ID is stored in a user
-provided location. Second, the region ID may be obtained later
-using the @code{@value{DIRPREFIX}region_ident} directive.
-The region ID is used by other region manager directives to
-access this region.
-
-@subsection Adding Memory to a Region
-
-The @code{@value{DIRPREFIX}region_extend} directive may be used to add memory
-to an existing region. The caller specifies the size in bytes
-and starting address of the memory being added.
-
-NOTE: Please see the release notes or RTEMS source
-code for information regarding restrictions on the location of
-the memory being added in relation to memory already in the
-region.
-
-@subsection Acquiring a Segment
-
-The @code{@value{DIRPREFIX}region_get_segment} directive attempts to acquire
-a segment from a specified region. If the region has enough
-available free memory, then a segment is returned successfully
-to the caller. When the segment cannot be allocated, one of the
-following situations applies:
-
-@itemize @bullet
-@item By default, the calling task will wait forever to acquire the segment.
-
-@item Specifying the @code{@value{RPREFIX}NO_WAIT} option forces
-an immediate return with an error status code.
-
-@item Specifying a timeout limits the interval the task will
-wait before returning with an error status code.
-@end itemize
-
-If the task waits for the segment, then it is placed
-in the region's task wait queue in either FIFO or task priority
-order. All tasks waiting on a region are returned an error when
-the message queue is deleted.
-
-@subsection Releasing a Segment
-
-When a segment is returned to a region by the
-@code{@value{DIRPREFIX}region_return_segment} directive, it is merged with its
-unallocated neighbors to form the largest possible segment. The
-first task on the wait queue is examined to determine if its
-segment request can now be satisfied. If so, it is given a
-segment and unblocked. This process is repeated until the first
-task's segment request cannot be satisfied.
-
-@subsection Obtaining the Size of a Segment
-
-The @code{@value{DIRPREFIX}region_get_segment_size} directive returns the
-size in bytes of the specified segment. The size returned
-includes any "extra" memory included in the segment because of
-rounding up to a page size boundary.
-
-@subsection Deleting a Region
-
-A region can be removed from the system and returned
-to RTEMS with the @code{@value{DIRPREFIX}region_delete}
-directive. When a region is
-deleted, its control block is returned to the RNCB free list. A
-region with segments still allocated is not allowed to be
-deleted. Any task attempting to do so will be returned an
-error. As a result of this directive, all tasks blocked waiting
-to obtain a segment from the region will be readied and returned
-a status code which indicates that the region was deleted.
-
-@section Directives
-
-This section details the region manager's directives.
-A subsection is dedicated to each of this manager's directives
-and describes the calling sequence, related constants, usage,
-and status codes.
-
-@c
-@c
-@c
-@page
-@subsection REGION_CREATE - Create a region
-
-@cindex create a region
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_region_create
-@example
-rtems_status_code rtems_region_create(
- rtems_name name,
- void *starting_address,
- rtems_unsigned32 length,
- rtems_unsigned32 page_size,
- rtems_attribute attribute_set,
- rtems_id *id
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Region_Create (
- Name : in RTEMS.Name;
- Starting_Address : in RTEMS.Address;
- Length : in RTEMS.Unsigned32;
- Page_Size : in RTEMS.Unsigned32;
- Attribute_Set : in RTEMS.Attribute;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-
-@code{@value{RPREFIX}SUCCESSFUL} - region created successfully@*
-@code{@value{RPREFIX}INVALID_NAME} - invalid task name@*
-@code{@value{RPREFIX}INVALID_ADDRESS} - address not on four byte boundary@*
-@code{@value{RPREFIX}TOO_MANY} - too many regions created@*
-@code{@value{RPREFIX}INVALID_SIZE} - invalid page size
-
-@subheading DESCRIPTION:
-
-This directive creates a region from a physically
-contiguous memory space which starts at starting_address and is
-length bytes long. Segments allocated from the region will be a
-multiple of page_size bytes in length. The assigned region id
-is returned in id. This region id is used as an argument to
-other region related directives to access the region.
-
-For control and maintenance of the region, RTEMS
-allocates and initializes an RNCB from the RNCB free pool. Thus
-memory from the region is not used to store the RNCB. However,
-some overhead within the region is required by RTEMS each time a
-segment is constructed in the region.
-
-Specifying @code{@value{RPREFIX}PRIORITY} in attribute_set causes tasks
-waiting for a segment to be serviced according to task priority.
-Specifying @code{@value{RPREFIX}FIFO} in attribute_set or selecting
-@code{@value{RPREFIX}DEFAULT_ATTRIBUTES} will cause waiting tasks to
-be serviced in First In-First Out order.
-
-The starting_address parameter must be aligned on a
-four byte boundary. The page_size parameter must be a multiple
-of four greater than or equal to four.
-
-@subheading NOTES:
-
-This directive will not cause the calling task to be
-preempted.
-
-The following region attribute constants are defined
-by RTEMS:
-
-@itemize @bullet
-@item @code{@value{RPREFIX}FIFO} - tasks wait by FIFO (default)
-@item @code{@value{RPREFIX}PRIORITY} - tasks wait by priority
-@end itemize
-
-@c
-@c
-@c
-@page
-@subsection REGION_IDENT - Get ID of a region
-
-@cindex get ID of a region
-@cindex obtain ID of a region
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_region_ident
-@example
-rtems_status_code rtems_region_ident(
- rtems_name name,
- rtems_id *id
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Region_Ident (
- Name : in RTEMS.Name;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-
-@code{@value{RPREFIX}SUCCESSFUL} - region identified successfully@*
-@code{@value{RPREFIX}INVALID_NAME} - region name not found
-
-@subheading DESCRIPTION:
-
-This directive obtains the region id associated with
-the region name to be acquired. If the region name is not
-unique, then the region id will match one of the regions with
-that name. However, this region id is not guaranteed to
-correspond to the desired region. The region id is used to
-access this region in other region manager directives.
-
-@subheading NOTES:
-
-This directive will not cause the running task to be preempted.
-
-@c
-@c
-@c
-@page
-@subsection REGION_DELETE - Delete a region
-
-@cindex delete a region
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_region_delete
-@example
-rtems_status_code rtems_region_delete(
- rtems_id id
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Region_Delete (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-
-@code{@value{RPREFIX}SUCCESSFUL} - region deleted successfully@*
-@code{@value{RPREFIX}INVALID_ID} - invalid region id@*
-@code{@value{RPREFIX}RESOURCE_IN_USE} - segments still in use
-
-@subheading DESCRIPTION:
-
-This directive deletes the region specified by id.
-The region cannot be deleted if any of its segments are still
-allocated. The RNCB for the deleted region is reclaimed by
-RTEMS.
-
-@subheading NOTES:
-
-This directive will not cause the calling task to be preempted.
-
-The calling task does not have to be the task that
-created the region. Any local task that knows the region id can
-delete the region.
-
-@c
-@c
-@c
-@page
-@subsection REGION_EXTEND - Add memory to a region
-
-@cindex add memory to a region
-@cindex region, add memory
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_region_extend
-@example
-rtems_status_code rtems_region_extend(
- rtems_id id,
- void *starting_address,
- rtems_unsigned32 length
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Region_Extend (
- ID : in RTEMS.ID;
- Starting_Address : in RTEMS.Address;
- Length : in RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-
-@code{@value{RPREFIX}SUCCESSFUL} - region extended successfully@*
-@code{@value{RPREFIX}INVALID_ID} - invalid region id@*
-@code{@value{RPREFIX}INVALID_ADDRESS} - invalid address of area to add
-
-@subheading DESCRIPTION:
-
-This directive adds the memory which starts at
-starting_address for length bytes to the region specified by id.
-
-@subheading NOTES:
-
-This directive will not cause the calling task to be preempted.
-
-The calling task does not have to be the task that
-created the region. Any local task that knows the region id can
-extend the region.
-
-@c
-@c
-@c
-@page
-@subsection REGION_GET_SEGMENT - Get segment from a region
-
-@cindex get segment from region
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_region_get_segment
-@example
-rtems_status_code rtems_region_get_segment(
- rtems_id id,
- rtems_unsigned32 size,
- rtems_option option_set,
- rtems_interval timeout,
- void **segment
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Region_Get_Segment (
- ID : in RTEMS.ID;
- Size : in RTEMS.Unsigned32;
- Option_Set : in RTEMS.Option;
- Timeout : in RTEMS.Interval;
- Segment : out RTEMS.Address;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-
-@code{@value{RPREFIX}SUCCESSFUL} - segment obtained successfully@*
-@code{@value{RPREFIX}INVALID_ID} - invalid region id@*
-@code{@value{RPREFIX}INVALID_SIZE} - request is for zero bytes or exceeds
-the size of maximum segment which is possible for this region@*
-@code{@value{RPREFIX}UNSATISFIED} - segment of requested size not available@*
-@code{@value{RPREFIX}TIMEOUT} - timed out waiting for segment@*
-@code{@value{RPREFIX}OBJECT_WAS_DELETED} - semaphore deleted while waiting
-
-@subheading DESCRIPTION:
-
-This directive obtains a variable size segment from
-the region specified by id. The address of the allocated
-segment is returned in segment. The @code{@value{RPREFIX}WAIT}
-and @code{@value{RPREFIX}NO_WAIT} components
-of the options parameter are used to specify whether the calling
-tasks wish to wait for a segment to become available or return
-immediately if no segment is available. For either option, if a
-sufficiently sized segment is available, then the segment is
-successfully acquired by returning immediately with the
-@code{@value{RPREFIX}SUCCESSFUL} status code.
-
-If the calling task chooses to return immediately and
-a segment large enough is not available, then an error code
-indicating this fact is returned. If the calling task chooses
-to wait for the segment and a segment large enough is not
-available, then the calling task is placed on the region's
-segment wait queue and blocked. If the region was created with
-the @code{@value{RPREFIX}PRIORITY} option, then the calling
-task is inserted into the
-wait queue according to its priority. However, if the region
-was created with the @code{@value{RPREFIX}FIFO} option, then the calling
-task is placed at the rear of the wait queue.
-
-The timeout parameter specifies the maximum interval
-that a task is willing to wait to obtain a segment. If timeout
-is set to @code{@value{RPREFIX}NO_TIMEOUT}, then the
-calling task will wait forever.
-
-@subheading NOTES:
-
-The actual length of the allocated segment may be
-larger than the requested size because a segment size is always
-a multiple of the region's page size.
-
-The following segment acquisition option constants
-are defined by RTEMS:
-
-@itemize @bullet
-@item @code{@value{RPREFIX}WAIT} - task will wait for semaphore (default)
-@item @code{@value{RPREFIX}NO_WAIT} - task should not wait
-@end itemize
-
-A clock tick is required to support the timeout functionality of
-this directive.
-
-@c
-@c
-@c
-@page
-@subsection REGION_RETURN_SEGMENT - Return segment to a region
-
-@cindex return segment to region
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_region_return_segment
-@example
-rtems_status_code rtems_region_return_segment(
- rtems_id id,
- void *segment
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Region_Return_Segment (
- ID : in RTEMS.ID;
- Segment : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-
-@code{@value{RPREFIX}SUCCESSFUL} - segment returned successfully@*
-@code{@value{RPREFIX}INVALID_ID} - invalid region id@*
-@code{@value{RPREFIX}INVALID_ADDRESS} - segment address not in region
-
-@subheading DESCRIPTION:
-
-This directive returns the segment specified by
-segment to the region specified by id. The returned segment is
-merged with its neighbors to form the largest possible segment.
-The first task on the wait queue is examined to determine if its
-segment request can now be satisfied. If so, it is given a
-segment and unblocked. This process is repeated until the first
-task's segment request cannot be satisfied.
-
-@subheading NOTES:
-
-This directive will cause the calling task to be
-preempted if one or more local tasks are waiting for a segment
-and the following conditions exist:
-
-@itemize @bullet
-@item a waiting task has a higher priority than the calling task
-
-@item the size of the segment required by the waiting task
-is less than or equal to the size of the segment returned.
-@end itemize
-
-@c
-@c
-@c
-@page
-@subsection REGION_GET_SEGMENT_SIZE - Obtain size of a segment
-
-@cindex get size of segment
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_region_get_segment_size
-@example
-rtems_status_code rtems_region_get_segment_size(
- rtems_id id,
- void *segment,
- rtems_unsigned32 *size
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Region_Get_Segment_Size (
- ID : in RTEMS.ID;
- Segment : in RTEMS.Address;
- Size : out RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-
-@code{@value{RPREFIX}SUCCESSFUL} - segment obtained successfully@*
-@code{@value{RPREFIX}INVALID_ID} - invalid region id@*
-@code{@value{RPREFIX}INVALID_ADDRESS} - segment address not in region
-
-@subheading DESCRIPTION:
-
-This directive obtains the size in bytes of the specified segment.
-
-@subheading NOTES:
-
-The actual length of the allocated segment may be
-larger than the requested size because a segment size is always
-a multiple of the region's page size.
-
diff --git a/doc/user/rtemsarc.gif b/doc/user/rtemsarc.gif
deleted file mode 100644
index fea62ecb42..0000000000
--- a/doc/user/rtemsarc.gif
+++ /dev/null
Binary files differ
diff --git a/doc/user/rtemsarc.png b/doc/user/rtemsarc.png
deleted file mode 100644
index 13c3b30789..0000000000
--- a/doc/user/rtemsarc.png
+++ /dev/null
Binary files differ
diff --git a/doc/user/rtemspie.eps b/doc/user/rtemspie.eps
deleted file mode 100644
index ad0eebbb5f..0000000000
--- a/doc/user/rtemspie.eps
+++ /dev/null
@@ -1,2164 +0,0 @@
-%!PS-Adobe-3.0 EPSF-3.0
-%%Creator: (ImageMagick)
-%%Title: (rtemspie.eps)
-%%CreationDate: (Wed Oct 6 10:47:26 1999)
-%%BoundingBox: 0 213 495 508
-%%DocumentData: Clean7Bit
-%%LanguageLevel: 1
-%%Pages: 0
-%%EndComments
-
-%%BeginDefaults
-%%PageOrientation: Portrait
-%%EndDefaults
-
-%%BeginProlog
-%
-% Display a color image. The image is displayed in color on
-% Postscript viewers or printers that support color, otherwise
-% it is displayed as grayscale.
-%
-/buffer 512 string def
-/byte 1 string def
-/color_packet 3 string def
-/pixels 768 string def
-
-/DirectClassPacket
-{
- %
- % Get a DirectClass packet.
- %
- % Parameters:
- % red.
- % green.
- % blue.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/DirectClassImage
-{
- %
- % Display a DirectClass image.
- %
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { DirectClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayDirectClassPacket } image
- } ifelse
-} bind def
-
-/GrayDirectClassPacket
-{
- %
- % Get a DirectClass packet; convert to grayscale.
- %
- % Parameters:
- % red
- % green
- % blue
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/GrayPseudoClassPacket
-{
- %
- % Get a PseudoClass packet; convert to grayscale.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassPacket
-{
- %
- % Get a PseudoClass packet.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassImage
-{
- %
- % Display a PseudoClass image.
- %
- % Parameters:
- % class: 0-PseudoClass or 1-Grayscale.
- %
- currentfile buffer readline pop
- token pop /class exch def pop
- class 0 gt
- {
- currentfile buffer readline pop
- token pop /depth exch def pop
- /grays columns 8 add depth sub depth mul 8 idiv string def
- columns rows depth
- [
- columns 0 0
- rows neg 0 rows
- ]
- { currentfile grays readhexstring pop } image
- }
- {
- %
- % Parameters:
- % colors: number of colors in the colormap.
- % colormap: red, green, blue color packets.
- %
- currentfile buffer readline pop
- token pop /colors exch def pop
- /colors colors 3 mul def
- /colormap colors string def
- currentfile colormap readhexstring pop pop
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { PseudoClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayPseudoClassPacket } image
- } ifelse
- } ifelse
-} bind def
-
-/DisplayImage
-{
- %
- % Display a DirectClass or PseudoClass image.
- %
- % Parameters:
- % x & y translation.
- % x & y scale.
- % label pointsize.
- % image label.
- % image columns & rows.
- % class: 0-DirectClass or 1-PseudoClass.
- % compression: 0-RunlengthEncodedCompression or 1-NoCompression.
- % hex color packets.
- %
- gsave
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- x y translate
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- currentfile buffer readline pop
- token pop /pointsize exch def pop
- /Helvetica findfont pointsize scalefont setfont
- x y scale
- currentfile buffer readline pop
- token pop /columns exch def
- token pop /rows exch def pop
- currentfile buffer readline pop
- token pop /class exch def pop
- currentfile buffer readline pop
- token pop /compression exch def pop
- class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
- grestore
-} bind def
-%%EndProlog
-%%Page: 1 1
-%%PageBoundingBox: 0 213 495 508
-userdict begin
-%%BeginData:
-DisplayImage
-0 213
-495.101124 295.280899
-12
-1787 1066
-1
-0
-0
-256
-000000
-000033
-000066
-000099
-0000cc
-0000ff
-003300
-003333
-003366
-003399
-0033cc
-0033ff
-006600
-006633
-006666
-006699
-0066cc
-0066ff
-009900
-009933
-009966
-009999
-0099cc
-0099ff
-00cc00
-00cc33
-00cc66
-00cc99
-00cccc
-00ccff
-00ff00
-00ff33
-00ff66
-00ff99
-00ffcc
-00ffff
-330000
-330033
-330066
-330099
-3300cc
-3300ff
-333300
-333333
-333366
-333399
-3333cc
-3333ff
-336600
-336633
-336666
-336699
-3366cc
-3366ff
-339900
-339933
-339966
-339999
-3399cc
-3399ff
-33cc00
-33cc33
-33cc66
-33cc99
-33cccc
-33ccff
-33ff00
-33ff33
-33ff66
-33ff99
-33ffcc
-33ffff
-660000
-660033
-660066
-660099
-6600cc
-6600ff
-663300
-663333
-663366
-663399
-6633cc
-6633ff
-666600
-666633
-666666
-666699
-6666cc
-6666ff
-669900
-669933
-669966
-669999
-6699cc
-6699ff
-66cc00
-66cc33
-66cc66
-66cc99
-66cccc
-66ccff
-66ff00
-66ff33
-66ff66
-66ff99
-66ffcc
-66ffff
-990000
-990033
-990066
-990099
-9900cc
-9900ff
-993300
-993333
-993366
-993399
-9933cc
-9933ff
-996600
-996633
-996666
-996699
-9966cc
-9966ff
-999900
-999933
-999966
-999999
-9999cc
-9999ff
-99cc00
-99cc33
-99cc66
-99cc99
-99cccc
-99ccff
-99ff00
-99ff33
-99ff66
-99ff99
-99ffcc
-99ffff
-cc0000
-cc0033
-cc0066
-cc0099
-cc00cc
-cc00ff
-cc3300
-cc3333
-cc3366
-cc3399
-cc33cc
-cc33ff
-cc6600
-cc6633
-cc6666
-cc6699
-cc66cc
-cc66ff
-cc9900
-cc9933
-cc9966
-cc9999
-cc99cc
-cc99ff
-cccc00
-cccc33
-cccc66
-cccc99
-cccccc
-ccccff
-ccff00
-ccff33
-ccff66
-ccff99
-ccffcc
-ccffff
-ff0000
-ff0033
-ff0066
-ff0099
-ff00cc
-ff00ff
-ff3300
-ff3333
-ff3366
-ff3399
-ff33cc
-ff33ff
-ff6600
-ff6633
-ff6666
-ff6699
-ff66cc
-ff66ff
-ff9900
-ff9933
-ff9966
-ff9999
-ff99cc
-ff99ff
-ffcc00
-ffcc33
-ffcc66
-ffcc99
-ffcccc
-ffccff
-ffff00
-ffff33
-ffff66
-ffff99
-ffffcc
-ffffff
-000000
-0d0d0d
-1a1a1a
-282828
-353535
-434343
-505050
-5d5d5d
-6b6b6b
-787878
-868686
-939393
-a1a1a1
-aeaeae
-bbbbbb
-c9c9c9
-d6d6d6
-e4e4e4
-f1f1f1
-ffffff
-000000
-000000
-000000
-000000
-000000
-000000
-000000
-000000
-000000
-000000
-000000
-000000
-000000
-000000
-000000
-000000
-000000
-000000
-000000
-000000
-d7ffd7ffd7ffd7ffd7ffd7ffd7ffd7ffd7ffd7ffd75b002dd7ffd7ffd7ffd7ffd7ffd7ff
-d7aa0071d7ffd7ffd7ffd7ffd7ffd7ffd772009dd7ffd7ffd7ffd7ffd7ffd7ffd74900c3
-d7ffd7ffd7ffd7ffd7ffd7ffd72700e1d7ffd7ffd7ffd7ffd7ffd7ffd70a00fdd7ffd7ff
-d7ffd7ffd7ffd7ef00ff0017d7ffd7ffd7ffd7ffd7ffd7d700ff002dd7ffd7ffd7ffd7ff
-d7ffd7c200ff0041d7ffd7ffd7ffd7ffd7ffd7ad0072d7710072d7ffd7ffd7ffd7ffd7ff
-d7990065d79d0065d7ffd7ffd7ffd7ffd7ffd789005bd7bf005bd7ffd7ffd7ffd7ffd7ff
-d77b0057d7d50057d7ffd7ffd7ffd7ffd7ffd76c0055d7e90055d7ffd7ffd7ffd7ffd7ff
-d75d0051d7780000d7850051d7ffd7ffd7ffd7ffd7ffd74f004dd7830000d790004dd7ff
-d7ffd7ffd7ffd7ffd7410049d78e0000d79b0049d7ffd7ffd7ffd7ffd7ffd7340044d799
-0000d7a60044d7ffd7ffd7ffd7ffd7ffd728003fd7ffd757003fd7ffd7ffd7ffd7ffd7ff
-d71c003cd7ffd769003cd7ffd7ffd7ffd7ffd7ffd710003bd7ffd777003bd7ffd7ffd7ff
-d7ffd7ffd704003ad7ffd785003ad7ffd7ffd7ffd7ffd7f80039d7ffd7930039d7ffd7ff
-d7ffd7ffd7ed0037d7c90000d7d60037d7ffd7ffd7ffd7ffd7e30035d7d00000d7dd0035
-d7ffd7ffd7ffd7ffd7d90033d7d70000d7e40033d7ffd7ffd7ffd7ffd7cf0031d7de0000
-d7eb0031d7ffd7ffd7ffd7ffd7c40030d7ffd7d90030d7ffd7ffd7ffd7ffd7b9002ed7ff
-d7e7002ed7ffd7ffd7ffd7ffd7af002cd7ffd7f5002cd7ffd7ffd7ffd7ffd7a5002ad7ff
-d7ffd703002ad7ffd7ffd7ffd7ffd79b0029d7ffd7ffd70f0029d7ffd7ffd7ffd7ffd792
-0029d7ffd7040000d7ffd7110029d7ffd7ffd7ffd7ffd7890029d7ffd7090000d7ffd716
-0029d7ffd7ffd7ffd7ffd7800029d7ffd70d0000d7ffd71a0029d7ffd7ffd7ffd7ffd777
-0029d7ffd7120000d7ffd71f0029d7ffd7ffd7ffd7ffd76e0028d7ffd7ffd73d0028d7ff
-d7ffd7ffd7ffd7660028d7ffd7ffd7450028d7ffd7ffd7ffd7ffd75d0028d7ffd7ffd74f
-0028d7ffd7ffd7ffd7ffd7540028d7ffd7ffd7570028d7ffd7ffd7ffd7ffd74b0028d7ff
-d7ffd7610027d7ffd7ffd7ffd7ffd7430028d7ffd72d0000d7ffd73a0027d7ffd7ffd7ff
-d7ffd73b0027d7ffd7320000d7ffd73e0027d7ffd7ffd7ffd7ffd7330027d7ffd7360000
-d7ffd7430026d7ffd7ffd7ffd7ffd72b0026d7ffd73b0000d7ffd7470026d7ffd7ffd7ff
-d7ffd7230026d7ffd7ffd78c0026d7ffd7ffd7ffd7ffd71b0026d7ffd7ffd7950025d7ff
-d7ffd7ffd7ffd7130025d7ffd7ffd79e0025d7ffd7ffd7ffd7ffd70b0025d7ffd7ffd79c
-0000d7080025d7ffd7ffd7ffd7ffd7030025d7ffd7ffd7a00000d70d0024d7ffd7ffd7ff
-d7fc0024d7ffd7540000d7ffd74d0000d7120023d7ffd7ffd7ffd7f50024d7010000d7ff
-d7550000d7ffd74c0000d7170023d7ffd7ffd7ffd7ee0023d7060000d7ffd7540000d7ff
-d7690022d7ffd7ffd7ffd7e70023d70a0000d7ffd7540000d7ffd76d0022d7ffd7ffd7ff
-d7e00022d70f0000d7ffd7ffd7c60021d7ffd7ffd7ffd7d90022d7ffd7ffd7b30000d72a
-0021d7ffd7ffd7ffd7d20021d7ffd7ffd7b60000d72f0021d7ffd7ffd7ffd7cb0020d7ff
-d7ffd7ba0000d7330020d7ffd7ffd7ffd7c40020d7230000d7ffd7ffd7980000d7380020
-d7ffd7ffd7ffd7bd0020d7260000d7ffd74f0000d7ffd7840020d7ffd7ffd7ffd7b60020
-d72b0000d7ffd74e0000d7ffd7880020d7ffd7ffd7ffd7af0020d72f0000d7ffd74d0000
-d7ffd78b0020d7ffd7ffd7ffd7a9001fd7ffd7820000d7ffd78e0020d7ffd7ffd7ffd7a3
-001fd7ffd7ffd7ca0000d74d001fd7ffd7ffd7ffd79d001ed7ffd7ffd7ce0000d750001f
-d7ffd7ffd7ffd797001ed7ffd7ffd7d00000d754001fd7ffd7ffd7ffd791001ed7430000
-d7ffd7ffd78d0000d759001ed7ffd7ffd7ffd78a001ed7470000d7ffd7ffd7eb001fd7ff
-d7ffd7ffd783001ed74b0000d7ffd7490000d7ffd7a2001fd7ffd7ffd7ffd77d001dd750
-0000d7ffd7480000d7ffd7a6001ed7ffd7ffd7ffd777001dd7ffd79d0000d7ffd7a9001e
-d7ffd7ffd7ffd771001dd7ffd7a00000d7ffd73e0000d76c001ed7ffd7ffd7ffd76b001d
-d7ffd7ffd7e30000d76f001ed7ffd7ffd7ffd765001dd7ffd7ffd7e50000d773001ed7ff
-d7ffd7ffd75f001dd7630000d7ffd7ffd7820000d777001ed7ffd7ffd7ffd75a001cd766
-0000d7ffd7ffd7fe001dd7ffd7ffd7ffd755001cd76a0000d7ffd7ffd7ffd701001cd7ff
-d7ffd7ffd74f001cd76e0000d7ffd7420000d7ffd7bf001cd7ffd7ffd7ffd749001cd7ff
-d7b50000d7ffd7c2001cd7ffd7ffd7ffd743001cd7e40001d7170001d71f0002d7080001
-d73f0002d7460000d7ffd7390000d78a001cd7ffd7ffd7ffd73e001bd7e60004d7130005
-d71b0004d7070004d73c0004d7450000d7ffd7380000d78e001bd7ffd7ffd7ffd739001b
-d77d0000d740000dd71a0005d7130005d7190006d7060005d73b0005d7ffd77f0000d791
-001bd7ffd7ffd7ffd733001bd7800000d7420008d71d0005d7130005d7180007d7060005
-d73b0005d7ffd77e0000d795001bd7ffd7ffd7ffd72d001bd7840000d7430006d71d0005
-d7090001d7070005d7180000d7010004d7060005d7320000d7080004d7ffd7ffd718001b
-d7ffd7ffd7ffd728001bd7870000d7430004d7200002d70a0001d7080003d71c0004d707
-0003d7330000d7090003d7ffd7ffd71a001bd7ffd7ffd7ffd723001bd7cf0004d72e0001
-d7290004d73f0000d7ffd7ffd72b001bd7ffd7ffd7ffd71d001bd7d20004d72d0002d729
-0004d73e0001d7530000d7ffd7d9001bd7ffd7ffd7ffd718001ad7d50004d72d0002d729
-0004d73d0002d7530000d7ffd7330000d7a7001ad7ffd7ffd7ffd7140019d7d80004d72c
-0003d7290004d73c0003d7530000d7ffd7320000d7ab0019d7ffd7ffd7ffd7100019d799
-0000d73f0004d72a0005d7290004d73b0004d7530000d7a40002d7890000d7ae0019d7ff
-d7ffd7ffd70b0019d79c0000d73f0004d7090002d7020004d70c0002d7050009d7060002
-d7080007d70a0004d7090002d7050011d7050006d708000ad7050002d70b0006d70c0002
-d7030004d7bd0004d7ffd73c0019d7ffd7ffd7ffd7060018d7a00000d73e0004d7060005
-d7010007d7070005d703000bd7030005d707000ad7080004d7060005d7050011d704000a
-d703000cd7020005d709000ad7070005d7010008d77a0019d7240006d7ffd73f0018d7ff
-d7ffd7ffd7020017d7e30004d7040007d7000009d7040007d703000bd7010007d7050005
-d7010005d7070004d7040007d7050010d7030004d7020005d702000cd7000007d7080004
-d7020004d7040007d7000009d77a0019d7230007d7ffd7420017d7ffd7ffd7fd0018d7e5
-0004d7040012d7040007d7060004d7050007d7050003d7040005d7060004d7040007d705
-0002d7070005d7030003d7040004d7060003d7060006d7070004d7030005d7040012d779
-0004d7040005d7050003d7240000d7000004d7ffd7440018d7ffd7ffd7f80017d7e80004
-d7070007d7020005d7060004d7060004d7080004d7040004d7050004d7060004d7070004
-d7050001d7070005d7030003d7060003d7060003d7080004d7060004d7050005d7050007
-d7030005d7780002d7060005d7060002d7260004d7860000d7bf0017d7ffd7ffd7f40016
-d7eb0004d7070005d7050004d7060004d7060004d7080004d7040004d7050004d7060004
-d7070004d7050000d7080004d7040004d7050003d7060003d7090003d7060003d7070004
-d7050005d7060004d7150000d7610001d7070005d7070001d7270003d7850000d7c30016
-d7ffd7ffd7f00016d7b10000d73a0004d7070004d7060004d7060004d7060004d7080004
-d7040004d7060003d7060004d7070004d7050000d7070004d7050004d7050004d7050003
-d7090003d7060003d7070004d7050004d7070004d7150000d7610001d7070005d7070001
-d7270003d7850000d7c50016d7ffd7ffd7eb0016d7b50000d7390004d7070004d7070003
-d7060004d7060004d7080004d7040004d7060003d7060004d7070004d70d0005d7050003
-d7060004d7050003d7090003d7050004d7080004d7040004d7070004d7150000d7610001
-d7070005d7080000d7270003d7840000d7c90016d7ffd7ffd7e60016d7b80000d7380004
-d7070004d7070003d7060004d7060004d7080004d70f0004d7060004d7070004d70c0005
-d7100005d7050003d7090003d7040005d7080004d7040004d7070004d7150000d76b0005
-d7310003d7ffd7510016d7ffd7ffd7e20016d7f40004d7070004d7070003d7060004d706
-0004d7080004d70c0007d7060004d7070004d70c0004d70f0007d7050003d7090003d704
-0005d7080005d7030004d7070004d7820005d7310003d7ffd7530016d7ffd7ffd7de0015
-d7f70004d7070004d7070003d7060004d7060004d7080004d7090005d7000003d7060004
-d7070004d70b0004d70c0005d7000004d7050003d7090003d7040005d7080005d7030004
-d7070004d7820005d70c0007d70b0006d7000001d7060003d7040009d7ffd7470015d7ff
-d7ffd7d90016d7f90004d7070004d7070003d7060004d7060004d7080004d7080003d703
-0003d7060004d7070004d70a0005d70b0004d7020004d7050003d7090003d7040005d708
-0005d7030004d7070004d7820005d70b000ad708000ad7060003d7040009d7ffd7490016
-d7ffd7ffd7d40015d7fc0004d7070004d7070003d7060004d7060004d7080004d7070003
-d7040003d7060004d7070004d7090005d70b0003d7040004d7050003d7090003d7040005
-d7090004d7030004d7070004d7820005d70a000cd706000bd7060003d7050004d7750000
-d7d90015d7ffd7ffd7d00015d7c70000d7350004d7070004d7070003d7060004d7060004
-d7080004d7050004d7050003d7060004d7070004d7080005d70b0003d7050004d7050003
-d7090003d7040005d7090004d7030004d7070004d7820005d7090004d7030005d7050002
-d7040003d7060003d7050002d7770000d7db0015d7ffd7ffd7cc0014d7ca0000d7350004
-d7070004d7070003d7060004d7060004d7080004d7040004d7060003d7060004d7070004
-d7080004d70b0003d7060004d7050003d7090003d7040005d7090004d7030004d7070004
-d7150000d76b0005d7080004d7050004d7040003d7050002d7060003d7040002d7770000
-d7df0014d7ffd7ffd7c70015d7cd0000d7340004d7070004d7070003d7060004d7060004
-d7080004d7040003d7070003d7060004d7070004d7070005d7070001d7000004d7060004
-d7050003d7090003d7050005d7080003d7040004d7070004d7150000d76b0005d7080004
-d7050004d7040003d7060001d7060003d7030002d7770000d7e20015d7ffd7ffd7c20015
-d7d00000d7330004d7070004d7070003d7060004d7060004d7080004d7040003d7070003
-d7060004d7070004d7060005d7080001d7000004d7060004d7050003d7090003d7050005
-d7070004d7040004d7070004d7150000d76b0005d7080004d7060003d7040003d7060001
-d7060003d7020001d7ffd75f0015d7ffd7ffd7be0014d7ffd7080004d7070004d7070003
-d7060004d7060004d7080004d7040004d7050004d7060004d7070004d7050005d7090001
-d7000004d7060004d7050003d7090003d7060004d7070003d7050004d7070004d7150000
-d76b0005d7080004d7060003d7040004d7050001d7060003d7010001d7ffd7630014d7ff
-d7ffd7b90015d7ffd70a0004d7070004d7070003d7060004d7060004d7010003d7020004
-d7040005d7020006d7010001d7020004d7070004d7050004d7090002d7000005d7020007
-d7000001d7020004d7010002d7030003d7070003d7070003d7050004d7070004d7820005
-d70a0001d7060004d7040006d70c0003d7000001d7ffd7660015d7ffd7ffd7b40014d7ff
-d70c0006d7060004d7060005d7050005d7050009d7020005d704000ad7000007d7020004
-d7070005d7030005d7070004d7000013d7020009d7020005d7060005d7040003d7060005
-d7060004d7820005d7100007d7040008d70a0007d7ffd7680014d7ffd7ffd7b00014d7dd
-0000d72b000dd700000ad7010009d700000ad7040007d701000ad7010009d7010006d700
-000ad701000ad7000013d7010008d7010006d7030007d701000ad705000bd705000ad701
-000ad77f0005d70e0004d7000003d7060008d7080008d7760000d7f10014d7ffd7ffd7ac
-0014d7e00000d72a000dd700000ad7010009d700000ad7040006d702000ad7030006d702
-0004d702000ad701000ad7000013d7020006d7030004d7050006d701000ad7070008d706
-000ad701000ad77f0005d70c0005d7010003d7080007d7070009d7750000d7f30014d7ff
-d7ffd7a70015d7e20000d7640001d7140002d7060001d7360002d7060000d70a0001d71b
-0001d7a10005d70b0003d7040003d7090007d7060009d7740000d7f60015d7ffd7ffd7a2
-0014d7e60000d7ffd7280000d76b0005d7090004d7050003d70b0005d7060003d7000005
-d7720000d7fa0014d7ffd7ffd79e0014d7ffd7ffd7120000d76b0005d7080004d7060003
-d70d0004d7050003d7010005d7ffd76f0014d7ffd7ffd79a0014d7ffd7ffd7140000d76b
-0005d7080003d7070003d7040000d7070004d7050003d7020005d7ffd7700014d7ffd7ff
-d7950014d7ffd7ffd7170000d76b0005d7080003d7070003d7040001d7070004d7040003
-d7020005d7ffd7730014d7ffd7ffd7900014d7f30000d7ffd7910005d7080003d7060004
-d7040001d7080003d7040003d7030005d7ffd7740014d7ffd7ffd78c0014d7f50000d7ff
-d7910005d7080005d7020006d7010001d7000002d7060003d7040004d7040005d76a0000
-d7ffd7090014d7ffd7ffd7880014d7f80000d7ffd7900005d7080013d7000003d7050002
-d7050004d7050005d7690000d7ffd70b0014d7ffd7ffd7840013d7fc0000d7ffd78b000d
-d704000ad7000006d701000bd703000ad7010009d7650000d7ffd70f0013d7ffd7ffd780
-0013d7ffd7ffd7220000d767000dd7060006d7020004d703000ad704000ad7010009d7ff
-d7780013d7ffd7ffd77c0013d7ffd7ffd7240000d77d0002d7060001d7050000d7040002
-d7ffd7980013d7ffd7ffd7780013d7ffd7ffd7260000d7ffd7ffd7330013d7ffd7ffd774
-0012d7ffd7080000d7ffd71f0000d7ffd7ffd7360012d7ffd7ffd7700012d7ffd70b0000
-d7ffd71e0000d7ffd7180000d77d0002d7340002d7650012d7ffd7ffd76c0012d7ffd70d
-0000d7ffd7ffd7380000d7660007d7030001d7060004d7320004d7670012d7ffd7ffd768
-0012d7ffd7100000d7ffd7ffd7360000d764000cd7010001d7040006d7300006d7690012
-d7ffd7ffd7640012d7ffd7ffd7ffd7490000d7630006d7020008d7030007d72f0007d76b
-0012d7ffd7ffd7600012d7ffd7ffd7ffd7af0004d7080005d7030000d7010004d72f0000
-d7000005d76d0012d7ffd7ffd75c0012d7ffd7ffd7350000d7ffd7790004d70b0003d706
-0004d7320004d76f0012d7ffd7ffd7580012d7ffd7ffd7370000d7ffd7780004d70d0002
-d7060004d7320004d7710012d7ffd7ffd7550011d7ffd71e0000d7ffd7190000d7ffd777
-0004d70f0002d7050004d7320004d7730011d7ffd7ffd7520011d7ffd7210000d7ffd718
-0000d7ffd7130000d7620004d70f0002d7050004d7320004d7750011d7ffd7ffd74e0011
-d7ffd7240000d7ffd7170000d7ffd7120000d7620005d7100001d7050004d7320004d777
-0011d7ffd7ffd74a0011d7ffd7ffd7ffd7530000d7620005d7100001d7050004d7320004
-d7790011d7ffd7ffd7460011d7ffd7ffd7ffd7540000d7620005d7110001d7050004d70b
-0006d70f0006d7080004d7030009d76d0011d7ffd7ffd7420011d7ffd7ffd7ffd7ba0005
-d7190004d709000ad70c0008d7070004d7030009d76f0011d7ffd7ffd73e0011d7ffd7ff
-d7ffd7bc0004d71a0004d708000cd709000cd7050004d7050004d7740011d7ffd7ffd73a
-0011d7ffd7310000d7ffd7140000d7ffd7750004d71a0004d7070004d7030004d7080002
-d7040005d7050004d7040003d7780011d7ffd7ffd7360012d7ffd7330000d7ffd7130000
-d7ffd7740005d71a0004d7060004d7050004d7070002d7050005d7040004d7040001d77b
-0012d7ffd7ffd7320012d7ffd7360000d7ffd7120000d7ffd70d0000d7650005d71a0004
-d7060003d7070004d7050003d7050005d7040004d7030001d77e0012d7ffd7ffd72e0012
-d7ffd7ffd74c0000d7ffd70d0000d7650005d71a0004d7060003d7070004d7050002d706
-0005d7040004d7020001d7810012d7ffd7ffd72a0012d7ffd7ffd74e0000d7ffd70c0000
-d7660005d71a0004d7050004d7080004d7030003d7080002d7050004d7010001d7840012
-d7ffd7ffd7260012d7ffd7ffd7ffd75d0000d7670005d71a0004d7040005d7080004d703
-0003d7110004d7000001d7870012d7ffd7ffd7220012d7ffd7ffd7ffd7c80005d71a0004
-d7040005d7080005d7010004d7110008d7880012d7ffd7ffd71e0012d7ffd7430000d7ff
-d7ffd7850005d71a0004d7040005d7080005d7010004d7110008d78a0012d7ffd7ffd71a
-0012d7ffd7460000d7ffd7ffd7850004d71a0004d7040005d7080005d7010004d7110009
-d78b0012d7ffd7ffd7170012d7ffd7470000d7ffd70e0000d7ffd7080000d76b0005d719
-0004d7040005d7090004d7010004d711000ad78b0012d7ffd7ffd7140012d7ffd74a0000
-d7ffd70d0000d7ffd7080000d76b0006d7110000d7050004d7040005d7090004d7010004
-d70b0000d7040004d7000005d78c0012d7ffd7ffd7100012d7ffd7ffd75b0000d7ffd707
-0000d76d0005d7110001d7040004d7040005d7090004d7010005d7090001d7040004d701
-0004d78e0012d7ffd7ffd70d0011d7ffd7ffd75d0000d7ffd7060000d76e0005d7100002
-d7040004d7050004d7090003d7030004d7090001d7040004d7020004d78f0011d7ffd7ff
-d70a0011d7ffd7ffd75f0000d7ffd7770005d70e0002d7050004d7050004d7080004d703
-0004d7080002d7040004d7020005d7900011d7ffd7ffd7060014d7ffd7530000d7ffd7ff
-d7820006d70c0001d7070004d7060004d7070003d7050005d7050002d7050004d7030005
-d7910010d7ffd7ffd7040016d7ffd7520000d7ffd7ffd7830007d7090002d7070004d706
-0004d7070003d705000ed7050004d7040005d78d0000d7030010d7ffd7ffd700001ad7ff
-d7510000d7ffd7ffd70d0000d7740009d7030004d7080005d7060005d7040003d707000c
-d7050005d7050005d78b0000d7060010d7ffd7fc001ed7ffd7500000d7ffd7ffd70b0000
-d778000ed706000ad705000bd70a000ad704000ad700000ad7910010d7ffd7fa0021d7b4
-0002d7ffd79f0000d7ffd7020000d77a000ad708000ad7070008d70c0008d705000ad700
-000ad7930010d7ffd7f60010d7000012d75e0017d7390005d70e0018d7ffd7770000d7ff
-d7010000d77e0004d7220001d7110003d7a30000d710000fd7ffd7f30011d7020013d75c
-0017d7370007d70e0018d7ffd7770000d7ffd7ffd7630001d7120010d7ffd7f00010d706
-0013d75d0014d7370007d7120014d7710000d7ffd7040000d7ffd7ffd7620000d7160010
-d7ffd7ec0011d7090013d75c0005d7090003d71b0000d71d0004d7130004d70a0003d772
-0000d7ffd7030000d7ffd7ffd77b0010d7ffd7e90011d70d0012d75b0005d70a0002d71b
-0000d71d0004d7130004d70b0002d7720000d7ffd7ffd7020000d7ffd77e0010d7ffd7e6
-0010d7100013d7590005d70a0002d71a0001d71d0004d7130004d70c0001d7730000d7ff
-d7ffd7010000d7ffd75e0000d720000fd7ffd7e30011d7130013d7570005d70b0001d719
-0002d71d0004d7130004d70c0001d7ffd7ffd7750000d7ffd75d0001d7220010d7ffd7df
-0011d7170013d7550005d70b0001d7190002d71d0004d7130004d70c0001d7ffd7ffd774
-0000d7ffd75d0000d7260010d7ffd7dc0011d71a0012d7540005d7260003d71d0004d713
-0004d7ffd7860000d7ffd7ffd7830010d7ffd7d90011d71d0013d7520005d7150004d709
-0005d70c0004d70b0004d7130004d7160002d7030001d7050002d7030001d70a0002d70f
-0001d7030001d7ffd7310000d7ffd7ffd7850010d7ffd7d60010d7210013d7500005d707
-0001d7090009d705000bd704000ad7080004d7130004d7090001d7080004d7010004d702
-0004d7020003d7070008d7090003d7020004d72f0000d7fe0000d7ffd7ffd7540001d730
-000fd7ffd7d30011d7240013d74e0005d7070001d708000cd702000cd703000cd7070004
-d7130004d7090001d7060006d700000dd7000006d704000ad7070005d7010005d7300000
-d7fd0000d7ffd7ffd7530000d7330010d7ffd7d00010d7280012d74d0005d7070001d707
-0004d7020005d7060003d7070004d7030004d7070004d7130004d7090001d705001ed702
-0004d7030005d7040006d7000007d7300000d7fc0000d7f80000d7ffd7580000d7360010
-d7ffd7cc0011d72a0013d74b0005d7060002d7070002d7060003d7060003d7070003d705
-0004d7060004d7130004d7080002d7050000d700000dd701000cd7020003d7060004d703
-0000d700000cd7ffd7ffd7280000d7ffd7920010d7ffd7ca0010d72e0013d749000fd706
-0003d7060003d7060003d7060004d7050004d7060004d7130010d7080005d7010003d702
-0006d7010003d7020003d7060004d7060005d7010003d7ffd7ffd7270000d7ffd7950010
-d7ffd7c60010d7320013d747000fd7060004d7050004d7050003d7060004d7050004d706
-0004d7130010d7080004d7040000d7030004d7040001d7020003d7080004d7050004d704
-0000d7ffd7ffd7ffd77f0001d73f000fd7ffd7c40010d7350012d7460005d7040004d706
-0003d7060004d7050003d7060004d7050004d7060004d7130004d7060004d7080004d709
-0004d7080004d7080005d7040003d7ffd7ffd7ffd7850000d7420010d7ffd7c00010d738
-0013d7440005d7060002d7070002d7050005d7050003d7070002d7050005d7060004d713
-0004d7080002d7080004d7090004d7080004d7080005d7040003d73c0000d7f90000d7ff
-d7ffd74b0000d745000fd7ffd7be0010d73b0013d7420005d7070001d70e0007d7050003
-d70e0007d7060004d7130004d7090001d7080004d7090004d7080004d7080005d7040003
-d73d0000d7f80000d7ffd7ffd7930010d7ffd7ba0010d73f0013d7400005d7070001d70c
-0009d7050003d70c0009d7060004d7130004d7090001d7080004d7090004d7070005d709
-0004d7040003d73e0000d7f70000d7f20000d7ffd7520000d74d000fd7ffd7b8000fd743
-0012d73f0005d7070001d70a0004d7010004d7050003d70b0003d7010004d7060004d713
-0004d7090001d7080004d7090004d7070005d7090004d7040003d7ffd7370000d7f10000
-d7ffd7510001d750000fd7ffd7b40010d7460012d73d0005d7120004d7030004d7050003
-d7080005d7020004d7060004d7130004d7140004d7090004d7070005d7090004d7040003
-d7ffd7370000d7f00000d7ffd7510000d7530010d7ffd7b1000fd7490013d73b0005d711
-0003d7050004d7050003d7080003d7040004d7060004d7130004d7140004d7090004d707
-0005d7090004d7040003d7ffd7ffd7ffd7d3000fd7ffd7ae0010d74c0013d7390005d710
-0004d7050004d7050003d7060004d7050004d7060004d7130004d70f0001d7020004d709
-0004d7080004d7090004d7040003d7ffd7ffd7ffd7d40010d7ffd7ab000fd7500012d738
-0005d7100003d7060004d7050003d7060003d7060004d7060004d7130004d70e0002d702
-0004d7090004d7080004d7090004d7040003d7420000d7ffd7ffd7ffd7330000d75d000f
-d7ffd7a80010d7530012d7360005d70f0004d7060004d7050003d7050004d7060004d706
-0004d7130004d70d0002d7030004d7090004d7080005d7080004d7040003d7420000d7ff
-d7ffd7ffd7310001d75f0010d7ffd7a5000fd7560013d7340005d70f0004d7060004d705
-0004d7040004d7060004d7060004d7130004d70c0003d7030004d7090004d7090004d708
-0003d7050003d7430000d7f20000d7ed0000d7ffd74c0000d763000fd7ffd7a20010d759
-0013d7320005d70f0005d7030006d7010000d7020004d7010008d7040005d7010001d702
-0004d7130004d70c0002d7040004d7090004d7090004d7070003d7060004d7ffd7360000
-d7ed0000d7ffd7b20010d7ffd79f000fd75d0012d7310005d70f0013d7020009d7000013
-d7020004d7120005d70b0003d7040004d7090004d70a0005d7050003d7060004d7ffd736
-0000d7ec0000d7ffd7b5000fd7ffd79d000ed7610012d72e0008d70e0011d7030008d701
-0011d7030006d7100015d7040006d7070006d70a0006d7010004d7050007d7ffd7350000
-d7eb0000d7ffd7490000d76d000ed7ffd79a000fd7630013d729000dd70d0007d7010005
-d7050006d7030008d7010004d702000ad70b0018d702000ad703000ad70a0009d706000a
-d7ffd7330000d7ffd7ffd7340001d76f000fd7ffd797000ed7670013d7440004d7040003
-d7070003d7060005d7030003d75d0005d7570000d7ffd7ffd7ffd7230000d773000ed7ff
-d795000ed76a0012d7ffd72e0000d7ffd7ffd7ffd799000ed7ffd792000ed76e0012d7ff
-d72d0000d7ffd7d70000d7ffd7c1000ed7ffd78f000ed7700013d7ffd72c0000d7ffd7d5
-0000d7ffd7450000d77c000ed7ffd78d000dd7740013d7ffd7ffd7180000d7e70000d7ff
-d7440000d77f000dd7ffd78a000ed7770012d7ffd7ffd7170000d7e60000d7ffd7440000
-d781000ed7ffd787000ed77a0012d7ffd7ffd7150000d7ffd7ffd7b0000ed7ffd785000d
-d77d0013d7ffd7280000d7e90000d7ffd7ffd7b2000dd7ffd782000ed7800013d7ffd726
-0000d7e90000d7ffd7ffd7260001d78a000ed7ffd77f000ed7830012d7ffd7260000d7ff
-d7cc0000d7ffd7410000d78d000ed7ffd77d000dd7870012d7ffd7250000d7ffd7cb0000
-d7ffd7400000d790000dd7ffd77a000ed7890013d7ffd7ffd7ef0000d7ffd7d4000ed7ff
-d777000dd78d0013d7ffd7ffd7ec0000d7ffd73d0000d798000dd7ffd775000dd7900012
-d7ffd7ffd7090000d7ffd7ffd71d0001d79a000dd7ffd772000ed7930012d7ffd7220000
-d7e30000d7ffd7ffd71c0000d79d000ed7ffd76f000dd7960013d7ffd7200000d7e30000
-d7ffd7ffd7bd000dd7ffd76d000dd7990013d7ffd71f0000d7e20000d7ffd7ffd7be000d
-d7ffd76a000ed79c0012d7ffd71f0000d7e10000d7dd0000d7ffd7380000d7a6000ed7ff
-d767000dd7a00012d7ffd7ffd7de0000d7ffd7370001d7a9000dd7ffd765000dd7a20013
-d7ffd7ffd7db0000d7ffd7370000d7ac000dd7ffd763000dd7a50013d7ffd7ffd7ffd7ff
-d7c1000dd7ffd760000dd7a90012d7ffd7ffd7ffd7ffd7c2000cd7ffd75e000dd7ac0012
-d7ffd7190000d7de0000d7ffd7ffd70e0001d7b5000dd7ffd75b000dd7af0012d7ffd718
-0000d7dd0000d7ffd7ffd70d0000d7b8000dd7ffd759000cd7b20013d7ffd7170000d7dc
-0000d7d70000d7ffd7330000d7bb000cd7ffd756000dd7b50012d7ffd7f40000d7d60000
-d7ffd7f2000cd7ffd754000dd7b80012d7ffd7f20000d7d50000d7ffd7f4000cd7ffd752
-000dd7bb0012d7ffd7ffd7ffd7f90000d7c3000dd7ffd74f000dd7bd0013d7ffd7ffd7ff
-d7f60000d7c5000dd7ffd74c000dd7c10012d7ffd7130000d7ffd7ffd7df0000d7c8000c
-d7ffd74a000dd7c40012d7ffd7110000d7ffd7ffd7ffd7aa000cd7ffd748000dd7c70012
-d7ffd7100000d7d70000d7d20000d7ffd72c0000d7cf000cd7ffd746000dd7c90013d7ff
-d7e70000d7d10000d7ffd72b0001d7d1000dd7ffd742000ed7cc0012d7ffd7e60000d7d0
-0000d7ffd72b0000d7d4000dd7ffd740000dd7d00012d7ffd7e40000d7ffd7ffd7d5000c
-d7ffd73e000dd7d30012d7ffd7e20000d7ffd7ffd7d6000cd7ffd73c000dd7d50013d7ff
-d70b0000d7ffd7ffd7cd0000d7dd000cd7ffd73a000dd7d80012d7ffd70a0000d7ffd7ff
-d7cb0001d7df000dd7ffd736000ed7db0012d7ffd7090000d7ffd7a10000d7ffd7260000
-d7e2000dd7ffd734000dd7df0012d7ffd7080000d7ffd79f0000d7ffd7ffd70d000cd7ff
-d732000dd7e10013d7ffd7d90000d7cc0000d7ffd7ffd70e000cd7ffd730000dd7e40012
-d7ffd7d80000d7cb0000d7ffd7230000d7eb000cd7ffd72e000dd7e70012d7ffd7d60000
-d7ffd7ee0001d7ed000dd7ffd72b000dd7ea0012d7ffd7040000d7ce0000d7ffd7ed0000
-d7f0000dd7ffd729000dd7ec0013d7ffd7020000d7ce0000d7ffd7ffd7e0000dd7ffd726
-000dd7f00012d7ffd7020000d7ffd7960000d7ffd7ffd719000cd7ffd724000dd7f30012
-d7ffd7010000d7ffd7950000d7ffd71e0001d7f9000cd7ffd722000dd7f60012d7ffd7ff
-d7950000d7ffd71e0000d7fc000dd7ffd71f000dd7f80013d7ffd7ffd7920000d7ffd71e
-0000d7fe000dd7ffd71d000dd7fb0012d7ffd7ca0000d7ffd7ffd7e6000dd7ffd71b000d
-d7fe0012d7fe0000d7c80000d7ffd7ffd7e7000dd7ffd719000dd7ffd7010012d7fc0000
-d7c80000d7ffd7e00001d7ffd705000dd7ffd716000dd7ffd7040013d7fb0000d7c70000
-d7c20000d7ffd71b0000d7ffd709000dd7ffd713000dd7ffd7070012d7fb0000d7c60000
-d7c20000d7ffd71a0000d7ffd70b000dd7ffd711000dd7ffd70a0012d7ffd7ffd7840000
-d7ffd7ffd729000dd7ffd70f000dd7ffd70d0012d7ffd7ffd7810000d7ffd7170000d7ff
-d712000dd7ffd70d000dd7ffd70f0013d7ffd7ffd7ffd7960001d7ffd714000dd7ffd70b
-000dd7ffd7120012d7f70000d7ffd7ffd79b0000d7ffd717000dd7ffd709000dd7ffd715
-0012d7f50000d7c30000d7ffd7ffd7f0000dd7ffd707000cd7ffd7190012d7f40000d7c2
-0000d7ffd7ffd7f2000cd7ffd705000cd7ffd71c0012d7f30000d7c10000d7bc0000d7ff
-d7130000d7ffd720000cd7ffd703000cd7ffd71e0012d7ffd7b50000d7bc0000d7ffd711
-0001d7ffd722000cd7ffd701000cd7ffd7210012d7ffd7b30000d7bb0000d7ffd7110000
-d7ffd725000cd7ff000cd7ffd7240012d7ffd7ffd7ffd7ffd7a9000cd7fd000cd7ffd727
-0012d7ffd7ffd7ffd7ffd7a8000cd7fb000cd7ffd7290012d7ef0000d7ffd7ffd7880000
-d7ffd72d000cd7fa000bd7ffd72c0012d7ed0000d7ffd7ffd7860001d7ffd72f000bd7f9
-000bd7ffd72f0012d7ec0000d7bc0000d7b70000d7ffd70d0000d7ffd732000bd7f7000b
-d7ffd7320012d7ffd7a80000d7b60000d7ffd7ffd743000bd7f5000bd7ffd7340012d7ff
-d7a70000d7b50000d7ffd7ffd745000bd7f3000bd7ffd7370012d7ffd7a50000d7ffd7c0
-0001d7ffd73a000bd7f1000bd7ffd73a0012d7ffd7a30000d7ffd7bf0000d7ffd73d000b
-d7ef000bd76c0017d7b80012d7e70000d7ffd7ffd7780000d7ffd73f000bd7ed000bd76d
-0017d7b90012d7e70000d7ffd7ffd7ffd7b9000bd7eb000bd7710014d7bb0012d7e60000
-d7ffd76a0000d7ffd7ffd74d000bd7e9000bd7730005d70a0002d74b0001d76f0012d7ff
-d7ffd74f0000d7ffd7060001d7ffd746000bd7e7000bd7740005d70a0003d74a0001d771
-0012d7ffd79a0000d7b10000d7ffd7050000d7ffd749000bd7e5000bd7750005d70b0002
-d7490002d7720012d7ffd7990000d7b00000d7ffd7050000d7ffd74b000bd7e3000bd776
-0005d70b0002d7490002d7740012d7ffd7970000d7ffd7ffd7ffd705000bd7e1000bd777
-0005d70b0002d7480003d7760012d7e00000d7b30000d7ffd7b20000d7ffd752000bd7df
-000bd7780005d7560004d7780012d7de0000d7b30000d7ffd7b00001d7ffd754000bd7dd
-000bd7790005d7550005d7790012d7de0000d7ffd7600000d7ffd7010000d7a20002d7b1
-000bd7db000bd77a0005d7090000d705000ad7040006d7060007d70a0001d7030006d704
-000bd7770012d7dd0000d7ffd75f0000d7ffd7870019d7020004d7b1000bd7da000ad77b
-0005d7080001d705000ad7040006d7050009d7060004d7020007d704000bd7790012d7ff
-d7ffd73b0000d7ffd7880019d7020005d7b1000ad7d9000ad77c0005d7080001d7080005
-d7080002d7060002d7030004d7030006d7010009d7060004d77f0012d7ffd7ffd7380000
-d7fe0000d7890019d7020005d7b2000ad7d7000ad77d0005d7070002d7080005d7080001
-d7060002d7050004d7020013d7050004d7800012d7ffd78b0000d7ffd7a80001d78a0003
-d7060004d7050003d7020004d7b4000ad7d5000ad77e0010d7090004d7080001d7050002
-d7070003d7050005d7050004d7050004d7820012d7d90000d7ae0000d7ffd7a70000d78c
-0002d7070004d7070002d7020002d7b6000ad7d3000ad77f0010d7090004d7080001d705
-0002d7070004d7040003d7070004d7050004d7840012d7d80000d7ad0000d7ffd7ffd735
-0001d7080004d7070002d7bd000ad7d1000bd77f0010d70a0004d7060001d7050003d707
-0004d7040003d7070004d7050004d7860012d7d60000d7ad0000d7a70000d7ffd78c0001
-d7080004d7070002d7bd000bd7cf000bd7800005d7070002d70a0004d7060001d7050010
-d7040003d7070004d7050004d7870012d7d60000d7ffd7550000d7f80001d7910001d708
-0004d7080001d7be000bd7cd000bd7810005d7080001d70b0004d7040001d7060011d703
-0003d7070004d7050004d7890012d7ffd7ffd72a0000d7f80000d79e0004d7ca000bd7cb
-000bd7820005d7080001d70b0004d7040001d7060003d7110003d7070004d7050004d78b
-0012d7ffd7ffd7270000d7f80000d79f0004d7cb000bd7c9000bd7830005d7090000d70b
-0005d7020002d7050004d7110003d7070004d7050004d78d0012d7ffd7ffd7ffd7c00004
-d70e0002d7090002d7020005d7050005d70b0008d7090002d7020003d76f000bd7c7000b
-d7840005d7170004d7020001d7060004d7110003d7070004d7050004d78e0012d7d30000
-d7ffd7ffd7ea0004d70b0005d7060005d7010007d7030007d709000ad7050005d7010005
-d76f000bd7c6000ad7850005d7170005d7000002d7060004d7110003d7070004d7050004
-d7900012d7d10000d7a80000d7ffd79a0000d7a40004d7090007d7040012d7010009d708
-0003d7000006d7020007d7010005d770000ad7c5000ad7860005d70e0001d7070004d700
-0001d7080003d70b0000d7040003d7070004d7050004d7920012d7d00000d7a70000d7a2
-0000d7f50000d7a50004d70a0006d7040012d700000ad7060003d7040005d7010007d700
-0006d771000ad7c3000ad7870005d70d0002d7070007d7080004d70a0001d7030003d707
-0004d7050004d7940012d7cf0000d7a60000d7a10000d7f50000d7a60004d70c0004d707
-0005d7040007d7040004d7040003d7060004d7040006d7010003d772000ad7c1000ad788
-0005d70d0001d7090005d7090005d7080001d7040003d7070004d7050004d7960011d7ff
-d7760000d7a10000d7ffd79d0004d70d0003d7070004d7060004d7060004d7040003d706
-0005d7030005d7030001d774000ad7bf000ad7890005d70c0002d7090005d7090006d706
-0002d7040003d7070004d7050004d7970012d7ffd7ffd7160000d7f10000d7ab0004d70d
-0003d7070004d7060004d7060004d7040002d7080004d7030005d77b000ad7bd000bd789
-0005d70b0003d7090005d70a0007d7030003d7040003d7070004d7050004d7020002d793
-0012d7ffd7ffd7ffd7050001d7ac0004d70d0003d7070004d7060004d7060004d7040010
-d7030004d77c000bd7bb000bd78a0005d70a0003d70b0003d70c000dd7050004d7060004
-d7050009d7960012d7ffd7ffd7ffd7020000d7ae0004d70d0003d7070004d7060004d706
-0004d7030011d7030004d77d000bd7b9000bd78a0015d70b0003d70d000bd7050005d706
-0005d7050007d7990011d7cb0000d7ffd7ffd7e40004d70d0003d7070004d7060004d706
-0004d7030003d7110004d77e000bd7b8000ad7880017d70d0001d70f0009d704000ad700
-000ad7030007d79a0012d7c90000d7ffd7ffd7e40004d70d0003d7070004d7060004d706
-0004d7030004d7100004d77f000ad7b7000ad7890017d70d0001d7100006d706000ad700
-000ad7040005d79d0012d7c80000d7a10000d79c0000d7ed0000d7b30004d70d0003d707
-0004d7060004d7060004d7030004d7100004d780000ad7b5000ad7ffd7930012d7ffd769
-0000d79b0000d7ec0001d7b40004d70d0003d7070004d7060004d7060004d7030004d710
-0004d781000ad7b3000ad7ffd7960011d7ffd7680000d79a0000d7ec0000d7b60004d70d
-0003d7070004d7060004d7060004d7030004d70b0000d7030004d782000ad7b1000ad7ff
-d7980012d7ffd7660000d7ffd7ffd7400004d70d0003d7070004d7060004d7060004d703
-0005d7090001d7030004d783000ad7af000bd7ffd79a0012d7ffd7ffd7ffd7a60004d70d
-0003d7070004d7060004d7060004d7040005d7080001d7030004d783000bd7ae000ad7ff
-d79d0012d7c30000d7ffd7ffd7220000d7bb0004d70d0003d7070004d7060004d7060004
-d7040005d7080001d7030004d784000ad7ad000ad7ffd7a00011d7c30000d7ffd7ffd71f
-0001d7bc0004d70d0003d7070004d7060004d7060004d7040007d7040002d7040004d785
-000ad7ab000ad7ffd7a20012d7c20000d7ffd7340000d7e70000d7bd0005d70d0003d707
-0004d7060004d7060004d705000ed7040004d786000ad7a9000bd7ffd7a40012d7ffd7f5
-0000d7ffd7a70006d70b0005d7050005d7050005d7050006d705000cd7050005d785000b
-d7a7000bd7ffd7a70012d7ffd75b0000d7950000d7ffd7a4000dd705000bd700000ad700
-000ad700000ad7040009d704000bd783000bd7a6000ad7ffd7aa0011d7ffd75a0000d7ff
-d77a0001d7be000dd705000bd700000ad700000ad700000ad7060006d705000bd784000a
-d7a5000ad7020000d7ffd7a80012d7ffd7580000d7ffd7790000d7ffd7aa000ad7a3000b
-d7030001d7ffd7a80012d7bc0000d7980000d7ffd7780000d7ffd7ab000bd7a1000bd706
-0000d7ffd7a90012d7bb0000d7ffd7ffd7ffd7bf000bd79f000bd70d0001d7ffd7a40011
-d7bb0000d7ffd7290000d7ffd7ffd794000bd79d000bd7100001d7ffd7a30012d7ffd7e4
-0000d7e00001d7ffd7b2000bd79c000ad7180001d7ffd79e0012d7ffd7e10000d7e00000
-d7ffd7b5000ad79b000bd71a0001d7ffd79e0012d7ffd7de0000d7e00000d7ffd7b6000b
-d799000bd7ffd7be0011d7ffd74c0000d7ffd7ffd7ffd72a000bd797000bd7230001d7ff
-d79a0012d7b50000d7930000d7ffd76c0000d7ffd7bd000bd796000ad7260001d7ffd79a
-0012d7b40000d7920000d7ffd76a0001d7ffd7bf000ad795000bd72d0001d7ffd7950012
-d7b20000d7920000d78c0000d7db0000d7ffd7c1000bd793000bd7300001d7ffd7950011
-d7b20000d7ffd71f0000d7ffd7ffd79f000bd792000ad7380000d7ffd7900012d7ffd7d0
-0000d7ffd7ffd79d0001d701000ad791000ad73a0001d7ffd7900012d7ffd7cd0000d7d8
-0000d7ffd7c20001d704000ad78f000bd73c0000d7ffd7910012d7ffd7ffd7a30001d7ff
-d7bc0001d70b000bd78d000bd7430001d7ffd78c0011d7af0000d7ffd7f00000d7ffd7bc
-0001d70e000bd78c000ad7460001d7ffd78c0011d7ad0000d78d0000d7ffd7ffd7ffd731
-000ad78b000bd74d0001d7ffd7860012d7ac0000d78c0000d7870000d7ffd7ffd78f0001
-d716000bd789000bd7500001d7ffd7860012d7ab0000d78b0000d7860000d7d40000d7ff
-d7b80001d719000bd788000ad7ffd7dc0011d7ffd7370000d7860000d7d20001d7ffd7b3
-0001d720000ad787000ad7590001d7ffd7830011d7ffd7bc0000d7d20000d7ffd7b20002
-d723000ad785000bd75b0001d7ffd7820012d7ffd7ffd7ffd7ffd73d0000d72a000bd784
-000ad7630001d7ffd77d0012d7a70000d7ffd7ffd7ffd7900001d72c000ad783000ad766
-0001d7ffd77d0011d7a70000d7ffd7dc0001d7ffd7ae0001d72f000ad781000bd76d0000
-d7ffd7790011d7a50000d7ffd7db0000d7ffd7aa0001d735000bd77f000bd76f0001d7ff
-d7780012d7a40000d7860000d7810000d7ce0000d7ffd7a80002d738000bd77e000ad772
-0000d7ffd7790011d7ffd72b0000d7800000d7ffd7ffd7730001d740000ad77d000bd778
-0001d7ffd7740011d7ffd7290000d77f0000d7cc0000d7ffd7a30002d742000bd77b000b
-d77b0001d7ffd7740011d7ffd7270000d7ffd74b0001d7ffd7eb000bd77a000ad7830001
-d7ffd76e0012d7ffd7ffd7710000d7ffd7a00001d74b000ad779000ad7860001d7ffd76e
-0011d7a00000d7ffd7ffd7ffd76d0002d74e000ad777000bd7ffd7f90011d79f0000d7ff
-d7ffd7ffd7660001d755000bd776000ad78e0001d7ffd76b0011d79e0000d7fe0000d7c7
-0000d7ffd7990002d758000ad775000ad7910001d7ffd76a0012d7ffd79b0000d7c60001
-d7ffd7950000d760000ad774000ad7980001d7ffd7650011d7ffd71d0000d77a0000d7c6
-0000d7ffd7950001d761000ad773000ad79b0001d7ffd7650011d7ffd71b0000d7ffd7ff
-d7d70001d764000ad7720009d7a30000d7ffd7610011d7ffd7190000d7ffd7ffd7d10001
-d76b0009d771000ad7a40001d7ffd7600012d7980000d77d0000d7ffd73d0000d7ffd78f
-0002d76d000ad76f000ad7a70000d7ffd7610011d7980000d7ffd7b90001d7ffd78a0001
-d775000ad76e000ad7ad0001d7ffd75c0011d7970000d7f30000d7c20000d7ffd7890002
-d777000ad76d000ad7b00001d7ffd75c0011d7ffd7890000d7ffd7ffd7ca000ad76c0009
-d7b80001d7ffd7560012d7ffd7860000d7ffd7ffd7490001d7800009d76b000ad7ba0001
-d7ffd7560011d7ffd7ffd7450001d7ffd7850002d782000ad769000ad7ffd7ffd7160011
-d7ffd70d0000d7ffd7330000d7ffd7810001d78a000ad768000ad7c20001d7ffd7530011
-d7910000d7780000d7ffd7320000d7ffd77f0002d78c000ad767000ad7c50001d7ffd752
-0012d7900000d7770000d7ffd7ffd7ae0000d794000ad7660009d7cd0001d7ffd74d0011
-d78f0000d7770000d7710000d7ffd7ffd7390001d7960009d765000ad7cf0001d7ffd74d
-0011d78e0000d7e90000d7ba0000d7ffd77b0001d798000ad7640009d7d70000d7ffd749
-0011d7ffd7760000d7ba0000d7ffd7760001d79f0009d7630009d7d90001d7ffd7480012
-d7ffd7730000d7ba0000d7ffd7740002d7a20009d761000ad7db0000d7ffd7490011d7ff
-d7ffd7ffd79e0001d7a9000ad7600009d7e20001d7ffd7440011d78b0000d7ffd79a0000
-d7ffd7700002d7ac0009d75f000ad7e40001d7ffd7440011d7890000d7720000d7ffd724
-0001d7ffd7ffd721000ad75e0009d7ec0001d7ffd73f0011d7880000d7710000d76c0000
-d7b50000d7ffd76d0001d7b40009d75d0009d7ef0001d7ffd73e0011d7880000d7700000
-d76b0000d7ffd7ffd7220002d7b70009d75c0009d7ffd7ffd7320011d7f80000d76b0000
-d7ffd7ffd71c0001d7be0009d75b0009d7f70001d7ffd73b0011d7ffd7620000d7b20000
-d7ffd7660002d7c10009d75a0009d7f90001d7ffd73b0011d7ffd7ffd7120001d7ffd761
-0001d7c80009d7590009d7ffd7010001d7ffd7350011d7840000d7ffd78a0000d7ffd760
-0002d7cb0009d7580008d7ffd7040001d7ffd7350011d7820000d7ffd7ffd7ffd7bc0008
-d7570009d7ffd70b0001d7ffd7300011d7810000d76d000dd7580000d7ffd7ffd70f0001
-d7d30009d7560008d7ffd70e0001d7ffd7300011d7800000d7520042d73d0000d7ae0000
-d7ffd75c0002d7d60008d7550009d7ffd7ffd7420011d7c6005cd72f0000d7ad0001d7ff
-d7570001d7dd0009d7540008d7ffd7160001d7ffd72c0011d7ba0070d7240000d7ad0000
-d7ffd7560002d7e00008d7530009d7ffd7180001d7ffd72c0011d7b2007cd7ffd7ffd720
-0000d7e70009d7520008d7ffd7200001d7ffd7270011d77d0000d72a008ad7ffd7ffd717
-0001d7e90008d7510009d7ffd7220001d7ffd7260011d77c0000d7240096d7ba0001d7ff
-d7520001d7eb0009d7500008d7ffd72a0000d7ffd7220011d77b0000d71c00a4d7b20000
-d7ffd74e0001d7f20008d74f0009d7ffd72b0001d7ffd7220011d77a0000d71500b0d701
-0000d7a80000d7ffd74c0002d7f40009d74e0008d7ffd72e0000d7ffd7230011d78a0048
-d7280048d7ffd7ee0001d7fc0008d74d0009d7ffd7330001d7ffd71e0011d785003fd742
-003fd7ffd7e70002d7fe0009d74c0008d7ffd7360002d7ffd71d0011d77f0036d75c0036
-d7990001d7ffd7ffd74a0008d74b0009d7ffd73d0001d7ffd7190011d7790030d7700030
-d7940000d7ffd7430001d7ffd7060009d74a0008d7ffd7400002d7ffd7180011d773002e
-d77c002ed78f0000d7ffd7410002d7ffd7090008d7490009d7ffd7ffd75d0011d76e002c
-d788002cd7ffd7c80001d7ffd7100009d7480008d7ffd7480001d7ffd7150011d7690029
-d7940029d7830000d7ffd73d0002d7ffd7130008d7470009d7ffd74a0002d7ffd7140011
-d7630026d7a20026d77d0001d7ffd7390000d7ffd71a0009d7460008d7ffd7520001d7ff
-d7100011d75d0024d7ae0024d7780000d7ffd7390001d7ffd71c0008d7450009d7ffd754
-0002d7ffd70e0011d7590021d7b90022d7ffd7ae0001d7ffd71e0009d7440008d7ffd75c
-0000d7ffd70b0011d754001ed7c5001fd7ffd7a50001d7ffd7250008d7430009d7ffd75d
-0001d7ffd70b0011d74f001dd7ce001cd76b0000d7ffd7330002d7ffd7270009d7420008
-d7ffd7600001d7ffd70b0011d74a001cd7d6001bd7660001d7ffd72e0001d7ffd72f0008
-d7410009d7ffd7660001d7ffd7060011d746001bd7de001ad7620000d7ffd72d0002d7ff
-d7310009d7400008d7ffd7690002d7ffd7050011d740001cd7e4001bd7ffd7ffd7c30008
-d7400008d7ffd7700001d7ffd7010011d73b001cd7ea001cd7ffd7830001d7ffd7390008
-d73f0009d7ffd7720002d7ffd7000011d736001dd7ee001dd7520000d7ffd7290002d7ff
-d73b0009d73e0008d7ffd7ffd7790010d733001cd7f4001cd74e0001d7ffd7240001d7ff
-d7430008d73d0009d7ffd77a0001d7fd0011d72f001bd7fa001bd74b0000d7ffd7230002
-d7ffd7450009d73c0008d7ffd77d0002d7fc0011d72b0019d7ffd7020019d7ffd7690000
-d7ffd74d0008d73c0008d7ffd7840001d7f80011d7270017d7ffd70a0017d7420000d7ff
-d7210001d7ffd74e0008d73b0009d7ffd7860002d7f70010d7230017d7ffd7100017d73d
-0001d7ffd7200001d7ffd7500009d73a0008d7ffd78e0000d7f30011d71f0016d7ffd716
-0016d73a0000d7ffd71c0001d7ffd7570008d7390009d7ffd78f0001d7f30011d71a0017
-d7ffd71a0017d7ffd7520002d7ffd7590009d7380009d7ffd7910001d7f30011d7160016
-d7ffd7200016d7310000d7ffd7170001d7ffd7600009d7380008d7ffd7980001d7ef0010
-d7120016d7ffd7260015d72d0001d7ffd7150002d7ffd7630008d7370009d7ffd79a0002
-d7ed0011d70e0016d7ffd72a0015d72a0000d7ffd7ffd77e0009d7360008d7ffd7a20001
-d7e90011d70a0015d7ffd7300014d7ffd73b0001d7ffd76b0008d7350009d7ffd7a40002
-d7e80011d7060015d7ffd7340014d7210000d7ffd7140001d7ffd76d0009d7340009d7ff
-d7ffd7920010d7030014d7ffd73a0013d71d0001d7ffd70e0001d7ffd7740009d7340008
-d7ffd7ac0001d7e50026d7ffd73e0013d71a0000d7ffd70e0001d7ffd7770008d7330009
-d7ffd7ae0002d7e40021d7ffd7440012d7ffd7220000d7ffd77e0009d7320009d7ffd7b5
-0001d7e0001dd7ffd7480013d7100000d7ffd70b0001d7ffd77f0009d7310009d7ffd7b8
-0002d7df0019d7ffd74c0013d70c0001d7ffd70b0000d7ffd7820009d7300009d7ffd7bf
-0000d7db0016d7ffd7500013d7090000d7ffd7060001d7ffd7880009d7300008d7ffd7c1
-0001d7da0013d7ffd7540013d7ffd70d0001d7ffd78b0008d72f0009d7ffd7c30001d7d7
-0012d7ffd7580012d7ffd7050001d7ffd7920009d72e0009d7ffd7c90001d7cf0012d7ff
-d75c0013d7ffd7000001d7ffd7940009d72e0008d7ffd7cc0002d7cb0012d7ffd75e0012
-d7ffd7ffd7980008d72d0009d7ffd7d30001d7c30012d7ffd7620012d7f70001d7ffd79c
-0009d72c0009d7ffd7d50002d7bf0011d7ffd7660011d7f40001d7ffd79e0009d72c0008
-d7ffd7ffd7970011d7ffd76a0011d7eb0001d7ffd7a60008d72b0009d7ffd7dd0001d7b5
-0011d7ffd76e0011d7e70001d7ffd7a80009d72a0009d7ffd7df0002d7b10010d7ffd772
-0010d7e00000d7ffd7af0009d72a0008d7ffd7e70001d7a90010d7ffd7760010d7dc0001
-d7ffd7b10008d7290009d7ffd7e90002d7a5000fd7ffd77a000fd7da0000d7d6000cd7cf
-0009d7280009d76d0009d7130009d7ffd75a0000d79e000fd7ffd77e000fd7d10001d7df
-0006d7d20009d7280008d76e0009d7130009d7ffd75b0001d79a000fd7ffd782000fd7cd
-0001d7e10006d7210000d76b0001d7420008d7280008d7700008d7110007d7ffd7600001
-d797000ed7ffd786000ed7c50001d7e90004d7210001d76b0001d7420008d7270009d771
-0007d7110006d7ffd7670001d78f000fd7ffd788000fd7c10001d7eb0004d7210001d76b
-0001d7420009d7260009d7720007d70f0007d7ffd7690001d78c000fd7ffd78a000fd7ba
-0000d7f20004d7200002d76a0002d7420009d7260008d7730007d70f0007d7ffd7700001
-d784000ed7ffd78e000ed7b70001d7f30004d71f0003d7690003d7430008d7250009d773
-0007d70e0008d7ffd7720001d781000ed7ffd790000ed7b50000d7f50004d71f0003d769
-0003d7430009d7240009d7730008d70d0008d7ffd7780000d77a000fd7ffd792000fd7ac
-0001d7fb0004d71e0004d7680004d7430009d7240008d7740008d70c0009d7ffd7790001
-d777000ed7ffd796000ed7a90001d7fd0004d7090002d7030004d706000bd7050008d709
-0002d7020003d7040002d7020003d7000007d7040006d7070002d7020005d706000bd73f
-0008d7230009d7740002d7000005d70b0002d7000005d7ffd77b0000d775000ed7ffd798
-000ed7a10001d7ffd7040004d7060005d7010008d703000cd704000ad7060004d7010005
-d7010004d701000dd7040006d7040005d7010008d703000cd73f0009d7220009d7740002
-d7000005d70a0003d7000005d7090008d709000ad706000ad7060009d70c0007d70d0007
-d7ffd70a0001d76e000ed7ffd79a000ed79e0001d7ffd7060004d7040007d7000009d703
-000cd7040003d7000006d7030006d701000cd7010006d7000005d7060004d7020007d700
-000ad702000cd73f0009d7220008d7750002d7010005d7090002d7010005d708000ad707
-000bd705000bd705000cd7080010d705000ad7ffd70a0002d769000ed7ffd79e000ed7ff
-d7a50004d7050012d7050004d7080002d7040005d7020006d700000dd7000007d7010004
-d7070003d7020013d7050004d7450008d7210009d7750002d7010005d7090002d7010005
-d7080002d7020005d7050003d7030004d7040003d7030004d7040004d7020005d7070003
-d7040008d7040002d7030005d7ffd7100001d762000ed7ffd7a0000ed7940001d7ffd70d
-0004d7070005d7050004d7050004d7070002d7060004d7050005d7010003d7020005d701
-0003d7020004d7070003d7050007d7030005d7040004d7450009d7200009d7750002d702
-0004d7080002d7020005d7060003d7040005d7030003d7050003d7030003d7050003d704
-0003d7050003d7070003d7050006d7040003d7040004d7ffd7120001d75f000dd7ffd7a4
-000dd7910001d7ffd70f0004d7070004d7060004d7050004d7070002d7060005d7040004
-d7030001d7030005d7020002d7020004d7070003d7050005d7050005d7040004d7450009
-d7200008d7760002d7020005d7070002d7020005d7050003d7060004d7030003d7060002
-d7030003d7060002d7030003d7060003d7060003d7060004d7050003d7060003d7ffd772
-000dd7ffd7a8000dd7880001d7ffd7160004d7070004d7060004d7050004d7060002d708
-0004d7040004d7090004d7090004d7070003d7050004d7070004d7040004d7460008d720
-0008d7760002d7030004d7060002d7030005d7050003d7060005d7020003d7060002d703
-0003d7060002d7030004d7050004d7050003d7060004d7050003d7060004d7ffd7170001
-d756000dd7ffd7aa000dd7850001d7ffd7180004d7070004d7070003d7050004d7060010
-d7040003d70a0003d70a0004d7070003d7050004d7070005d7030004d7460008d71f0009
-d7760002d7030005d7050002d7030005d7040003d7070005d7020004d7050002d7030004
-d7050002d7030003d7060004d7040004d7070003d7040003d7070005d7ffd7180001d753
-000cd7ffd7ae000cd77f0000d7ffd71e0004d7070004d7070003d7050004d7050011d704
-0003d70a0003d70a0004d7070003d7050004d7080004d7030004d7460009d71e0009d776
-0002d7040004d7040002d7040005d7040011d7020005d7050001d7030005d7050001d704
-0002d7050005d7040004d7070003d7040011d7ffd71e0001d74c000cd7ffd7b0000cd77c
-0001d7ffd71f0004d7070004d7070003d7050004d7050003d7120003d70a0003d70a0004
-d7070003d7050004d7080004d7030004d7460009d71e0008d7770002d7040004d7040002
-d7040005d7040011d7030006d70a0006d7110007d7040004d7070003d7040011d7ffd720
-0002d748000cd7ffd7b2000cd7790001d7ffd7210004d7070004d7070003d7050004d705
-0004d7110003d70a0003d70a0004d7070003d7050004d7080004d7030004d7470008d71e
-0008d7770002d7040005d7020003d7040005d7040003d7110009d7070009d70c0009d704
-0004d7070003d7040003d7ffd7350000d742000cd7ffd7b4000cd7720001d7ffd7270004
-d7070004d7070003d7050004d7050004d7110003d70a0003d70a0004d7070003d7050004
-d7080004d7030004d7470008d71d0009d7770002d7050004d7020002d7050005d7040003
-d7130009d7070009d7080004d7010004d7050003d7060004d7040003d7ffd7360001d73f
-000cd7ffd7b6000bd7700001d7ffd7290004d7070004d7070003d7050004d7050004d711
-0003d70a0003d70a0004d7070003d7050004d7080004d7030004d7470008d71d0009d777
-0002d7050005d7000003d7050005d7040003d7140008d7080008d7060004d7030004d705
-0004d7050003d7050003d7ffd7380000d73d000cd7ffd7b8000bd7680001d7ffd7300004
-d7070004d7070003d7050004d7050004d70b0000d7040003d70a0003d70a0004d7070003
-d7050004d7080004d7030004d7470009d71c0008d7780002d7060004d7000002d7060005
-d7040004d7160006d70a0006d7040004d7040004d7060004d7030003d7060004d7ffd73c
-0001d736000cd7ffd7ba000bd7650001d7ffd7320004d7070004d7070003d7050004d705
-0005d7090001d7040003d70a0003d70a0004d7070003d7050004d7080004d7030004d748
-0008d71c0008d7780002d7060008d7060005d7040004d70b0000d70a0006d70a0006d703
-0003d7050004d707000ad7070004d70a0000d7ffd7320001d733000cd7ffd7bc000bd7ff
-d7990004d7070004d7070003d7050004d7060005d7080001d7040003d70a0003d70a0004
-d7070003d7050004d7080003d7040004d7480008d71b0009d7780002d7070006d7070005
-d7040005d7090001d7020001d7070004d7020001d7070004d7020003d7060004d7070008
-d7090004d70a0001d7ffd7380001d72b000cd7ffd7be000bd75d0001d7ffd7380004d707
-0004d7070003d7050004d7060005d7080001d7040003d70a0003d70a0004d7070003d705
-0004d7080003d7040004d7480008d71b0009d7780002d7070006d7070005d7040006d707
-0002d7020001d7070004d7020001d7070004d7010004d7060004d7060002d7100006d707
-0002d7ffd73a0001d728000cd7ffd7c0000bd75a0001d7ffd73a0004d7070004d7070003
-d7050004d7030001d7010006d7040003d7040003d70a0003d70a0005d7040006d7040004
-d7080003d7040004d7030001d7420008d71b0008d7790002d7080004d7080005d7040007
-d7060002d7020001d7080003d7020001d7080003d7010004d7060004d7050002d7110007
-d7060002d7ffd765000ad7ffd7c3000bd7530001d7ffd7400004d7070004d7070004d705
-0004d7000002d702000ed7050003d70a0004d70a0005d7010008d7000000d7020005d706
-0003d7050005d7000002d7440007d71b0008d7790002d7080004d7080005d7050007d704
-0002d7030002d7070003d7020002d7070003d7010004d7040006d7010000d7010005d710
-0007d7030003d7ffd7410001d721000ad7ffd7c5000bd7500001d7ffd7410006d7060005
-d7050005d7050008d703000cd7050005d7080005d70a000ad7000007d7010006d7040003
-d7060009d7440008d71a0008d7790002d7090002d7090005d707000cd7040003d7050003
-d7030003d7050003d7020013d7010011d705000dd7ffd7440001d71e000ad7ffd7c7000b
-d7490000d7ffd745000cd700000ad701000ad7020007d705000ad704000ad703000ad708
-0008d7010005d703000ed7080007d7450008d7190009d7780004d7080002d7080007d706
-000cd7040004d7030004d7030004d7030004d7030012d7010012d705000bd7ffd74b0001
-d717000ad7ffd7c9000bd7460001d7ffd746000cd700000ad701000ad7030005d7080006
-d706000ad703000ad7080006d7030002d706000cd70b0005d7460008d7190008d776000a
-d7060000d706000dd7040009d706000cd704000cd7050007d7010006d7030012d7050009
-d7ffd74e0002d713000bd7ffd7ca000bd7440000d7ffd7c70004d7610007d7190008d776
-000ad7060000d706000dd7060006d7070009d7070009d7090005d7030004d7050012d705
-0007d7ffd7560000d70d000bd7ffd7cc000bd73d0001d7ffd7cc0004d7610007d7190008
-d7ee0001d70d0003d7ffd7650001d70a000bd7ffd7cd000cd73a0001d7ffd7ce0004d761
-0008d7170009d7ed0002d70e0001d7ffd7680000d709000ad7ffd7cf000bd7340001d7ff
-d7d40004d7610008d7170008d7ed0003d70d0002d7ffd76d0001d702000bd7ffd7d0000b
-d7300002d7ffd7d60004d7620007d7170008d7ed0003d70d0002d7ffd76f000dd7ffd7d2
-000bd7ffd7ffd7090004d7620007d7170008d7ed0006d7080003d7ffd771000bd7ffd7d4
-000bd7280001d7ffd7dd0004d7620007d7160009d7ed0012d7ffd771000bd7ffd7d6000b
-d7250001d7ffd7dc000ad75f0008d7150008d7ef000fd7ffd773000bd7ffd7d6000bd71f
-0001d7ffd7e2000ad7600007d7150008d7f1000cd7ffd773000bd7ffd7d8000bd71c0001
-d7ffd7ffd7500007d7150008d7f50005d7ffd776000ad7ffd7da000ad7160000d7ffd7ff
-d7570007d7150008d7ffd7ffd771000ad7ffd7dc000ad7130001d7ffd7ffd7580007d715
-0008d7ffd7ffd7710009d7ffd7de0009d7120000d7ffd7ffd75a0007d7150008d7ffd7ff
-d7700009d7ffd7e00009d70b0001d7ffd7ffd75f0008d7130009d7ffd7ffd76f000ad7ff
-d7e0000ad7080001d7ffd7ffd7610008d7130008d7ffd7ffd7700009d7ffd7e20009d702
-0001d7ffd7ffd7680007d7130008d7ffd7ffd76f0009d7ffd7e4000bd7ffd7ffd76a0007
-d7130008d7ffd7ffd76e0009d7ffd7480003d7090001d78d0009d7ffd7ffd76b0007d713
-0008d7ffd7ffd76d0009d79e0012d7100020d702001ed708000bd71a000ad704000bd704
-0002d78e0009d7ffd7ffd76a0007d7130008d7ffd7ffd76d0009d79d0015d70e0020d702
-001ed708000bd719000bd703000ed7010003d78e0009d7ffd7ffd76a0008d7120008d7ff
-d7ffd76c0009d7a00015d70b0020d705001bd70a000ad718000ad7040014d7900009d7ff
-d7ffd7690008d7120008d7ffd7ffd76c0009d7a20014d70a0020d7070019d70d0007d718
-0007d7060005d7050009d7900009d7ffd7ffd7690008d7110009d7ffd7ffd76b0009d7a3
-0007d7060006d7090006d7060005d7070004d7080006d70b0005d70e0006d7170007d706
-0005d7090006d7910009d7ffd7ffd7680008d7110008d7ffd7ffd76c0009d7a30006d707
-0006d7090004d7070005d7090003d7080005d70d0004d70e0007d7150008d7060004d70a
-0006d7910009d7ffd7ffd7690007d7110008d7ffd7ffd76b0009d7a40006d7080006d707
-0004d7080005d7090002d7080006d70e0002d70e0008d7140008d7060005d70b0005d792
-0009d7ffd7ffd7680008d7100008d7ffd7ffd76b0009d7a40006d7080006d7070002d70a
-0005d7090002d7080006d70e0002d70e0008d7140008d7060004d70d0003d7930009d7ff
-d7ffd7680008d7100008d7ffd7ffd76a0009d7a50006d7080006d7070002d7090006d709
-0002d7080006d70e0002d70e0008d7130009d7050005d70d0003d7940009d7ffd7ffd767
-0009d70f0008d7ffd7ffd76a0009d7a50005d70a0006d7060002d7090005d70a0002d708
-0005d70f0001d70f0008d7120009d7060005d70d0003d7940009d7ffd7ffd7670009d70f
-0008d7ffd7ffd7690009d7a60005d70a0006d7050002d7090006d70a0001d7090005d70f
-0001d70e0009d711000ad7060005d70e0002d7950009d7ffd7ffd7660009d70f0008d7ff
-d7ffd7690009d7a50006d7090006d7060002d7090006d70a0001d7080006d7200009d710
-000bd7060006d70d0001d7960009d7ffd7ffd766000ad70d0009d7ffd7ffd7680009d7a6
-0006d7090006d7130006d7150006d7200009d7100003d7000005d7070006d70c0002d797
-0009d7ffd7ffd765000ad70d0008d7ffd7ffd7690009d7a50006d70a0006d7120006d715
-0006d7090001d7140003d7000006d70e000bd7070007d70b0002d7970009d7ffd7ffd766
-0009d70d0008d7ffd7ffd7680009d7a60006d7090006d7130006d7150006d7080002d714
-0003d7000006d70d0004d7000006d7080007d7a60009d7ffd7ffd7650009d70d0008d7ff
-d7ffd7680009d7a60006d7090006d7130006d7150006d7070003d7130004d7000006d70d
-000cd7090006d7a60009d7ffd7ffd765000ad70c0008d7ffd7ffd7680008d7a70006d709
-0006d7130006d7150006d7070003d7130004d7000006d70c0004d7000007d7090007d7a6
-0008d7ffd7ffd765000ad70c0008d7ffd7ffd7670009d7a60006d7080007d7140005d715
-0006d7080002d7140003d7010006d70c0004d7000006d70b0007d7a50009d7ffd7ffd764
-000ad70c0008d7ffd7ffd7670008d7a70006d7060007d7150006d7150006d7050005d713
-0004d7010006d70b0004d7000007d70b0008d7a50008d7ffd7ffd764000ad70c0008d7ff
-d7ffd7660009d7a70007d701000ad7160006d7150012d7130004d7010006d70a0004d701
-0007d70c0008d7a40009d7ffd7ffd763000ad70c0008d7ffd7ffd7660009d7a70013d717
-0006d7140012d7140003d7020006d70a0003d7020007d70d0008d7a30009d7ffd7ffd763
-000ad70c0008d7ffd7ffd7660008d7a70010d71b0005d7150012d7140003d7030005d709
-0004d7020006d70f0008d7a30008d7ffd7ffd763000bd70b0008d7ffd7ffd7660008d7a7
-000fd71b0006d7150005d7060005d7130004d7030006d7070004d7020007d7100008d7a2
-0008d7ffd7ffd763000bd70b0008d7ffd7ffd7650009d7a70005d7030006d71a0006d714
-0005d7080004d7130003d7040006d7070003d7030007d7110008d7a10009d7ffd7ffd762
-000bd70b0008d7ffd7ffd7650009d7a70005d7040005d71a0005d7150005d7090002d714
-0003d7040006d7060003d7040006d7130008d7a00009d7ffd7ffd762000bd70b0008d7ff
-d7ffd7650008d7a70006d7040005d71a0005d7150005d7090002d7140003d7040006d705
-0004d7040006d7130008d7a10008d7ffd7ffd762000cd70a0008d7ffd7ffd7650008d7a7
-0006d7040006d7180006d7150005d7090002d7130004d7040006d7040004d7040007d714
-0008d7a00008d7ffd7ffd762000cd70a0008d7ffd7ffd7640009d7a70005d7050006d718
-0005d7150005d70a0001d7140003d7050006d7040003d7050006d7160008d79f0009d7ff
-d7ffd761000cd70a0008d7ffd7ffd7640008d7a80005d7060005d7180005d7150005d70a
-0001d7140003d7050006d7030003d7060006d7070001d70d0007d7a00008d7ffd7ffd761
-000cd70a0008d7ffd7ffd7640008d7a70006d7060006d7170005d7150005d7210003d705
-0006d7020004d7060006d7070000d70f0006d7a00008d7ffd7ffd761000dd7090008d7ff
-d7ffd7640008d7a70005d7070006d7160006d7140005d7140001d70a0003d7070006d701
-0003d7060007d7060001d70f0006d7a00008d7ffd7ffd761000dd7080008d7ffd7ffd764
-0009d7a70005d7080005d7160005d7150005d7130002d70a0003d7070006d7000003d707
-0006d7070001d70f0006d7a00009d7ffd7ffd761000cd7080008d7ffd7ffd7640008d7a8
-0005d7080006d7150005d7150005d7120002d70b0003d707000ad7080006d7070001d710
-0005d7a10008d7ffd7ffd761000cd7080008d7ffd7ffd7640008d7a70006d7080006d715
-0005d7140006d7120002d70b0002d708000ad7080006d7070002d70f0005d7a10008d7ff
-d7ffd761000dd7070008d7ffd7ffd7640008d7a70005d70a0005d7140005d7150005d712
-0003d70a0003d7080009d7090005d7070003d70f0005d7a10008d7ffd7ffd761000dd707
-0008d7ffd7ffd7640008d7a60006d70a0006d7130005d7150005d7110003d70b0003d708
-0008d70a0005d7070003d70f0004d7a20008d7ffd7ffd761000dd7070008d7ffd7ffd764
-0008d7a60006d70a0006d7120006d7150005d7100004d70b0003d7080007d70a0005d708
-0003d70e0005d7a20008d7ffd7ffd761000dd7070008d7ffd7ffd7630009d7a60006d70a
-0007d7110006d7150005d70f0005d70b0002d7090007d7090006d7080004d70d0005d7a2
-0009d7ffd7ffd760000ed7060008d7ffd7ffd7630008d7a60006d70c0007d7100005d715
-0006d70c0007d70b0003d70a0005d70a0006d7070006d70b0005d7a40008d7ffd7ffd760
-000ed7060008d7ffd7ffd7630008d7a50008d70b0007d70f0007d7130008d708000ad70a
-0004d70a0004d70a0007d7070008d7090004d7a50008d7ffd7ffd760000ed7060008d7ff
-d7ffd7630008d7a4000ad70a0009d70b000ad711001dd7090007d7080003d70a0009d706
-000ad7040005d7a70008d7ffd7ffd760000ed7060008d7ffd7ffd7630008d7a10010d708
-000bd7050011d70a001fd706000ed7050003d7060011d7020014d7a80008d7ffd7ffd760
-000ed7060008d7ffd7ffd7630008d7a1000fd709000bd7040012d70a001fd706000ed705
-0002d7070011d7010002d705000ad7aa0008d7ffd7ffd760000fd7050008d7ffd7ffd763
-0008d7ffd7450001d70a0003d7ad0008d7ffd7ffd760000fd7050009d7040003d7040003
-d7040003d7040003d7040003d7040003d7040003d7040003d7040003d7040003d7040003
-d7040003d7040003d7040003d7040003d7040003d7040003d7040003d7030004d7030004
-d7030004d7030004d7030004d7030004d7030004d7030004d7030004d7030004d7030004
-d7030004d7030004d7030004d7030004d7030004d7030004d7030004d7030004d7030004
-d7030004d7030004d7030004d7030004d7030004d7030004d7030004d7030004d7030004
-d7030004d7030004d7030004d7030003d7040003d7040003d7040003d7040003d7040003
-d7040003d7040003d7040003d7040003d7040003d7040003d7040003d7040003d7040003
-d7040003d7040003d704000cd7ffd7ffd7040008d7ffd7ffd760000fd7050008d7ffd7ff
-d7630008d7ffd7ffd7040008d7ffd7ffd760000fd7050008d7ffd7ffd7630008d7ffd7ff
-d7040008d7ffd7ffd760000fd7050008d7ffd7ffd7630008d7ffd7ffd7040008d7ffd7ff
-d7600010d7040008d7ffd7ffd7630008d7ffd7ffd7040008d7ffd7ffd7600010d7040008
-d7ffd7ffd7630008d7ffd7ffd70400ff00ff007ad7040008d7ffd7ffd7630008d7ffd7ff
-d70400ff00ff007ad7040008d7ffd7ffd7630008d7ffd7ffd70400ff00ff007ad7040008
-d7ffd7ffd7630008d7ffd7ffd70400ff00ff007ad7040008d7ffd7ffd7630008d7ffd7ff
-d70400ff00ff007bd7030008d7ffd7ffd7630008d7ffd7ffd70400ff00ff007bd7030008
-d7ffd7ffd7630008d7ffd7ffd70400ff00ff007bd7030008d7ffd7ffd7630008d7ffd7ff
-d70400ff00ff007bd7040008d7ffd7ffd7620008d7ffd7ffd70400ff00ff007bd7040008
-d7ffd7ffd7620008d7ffd7ffd70400ff00ff007bd7040008d7ffd7ffd7620009d7ffd7ff
-d702000cd7ffd7ffd75c0008d7000008d7040008d7ffd7ffd7630008d7ffd7ffd702000c
-d7ffd7ffd75c0008d7000008d7040008d7ffd7ffd7630008d7ffd7ffd702000cd7ffd7ff
-d75c0008d7000009d7030008d7ffd7ffd7630008d7de0009d7060001d7ffd710000cd7ff
-d7ffd75c0008d7010008d7030008d7ffd7ffd7630008d7da0011d7000003d7ffd710000d
-d7ffd7ffd75b0008d7010008d7030008d7ffd7ffd7630009d7d60019d7ffd70f000ed7ff
-d7ffd75b0008d7010008d7030008d7ffd7ffd7630009d7d50007d7080008d7ffd710000e
-d7ffd7ffd75b0008d7010008d7030008d7ffd7ffd7640008d7d30006d70d0006d7ffd710
-000ed7ffd7ffd75b0008d7010008d7030008d7ffd7ffd7640008d7d20006d70f0005d7ff
-d710000ed7ffd7ffd75b0008d7010008d7030008d7ffd7ffd7640009d7d10005d7110004
-d7ffd70f000fd7ffd7ffd75b0008d7010008d7030008d7ffd7ffd7640009d7cf0006d712
-0003d7ffd710000fd7ffd7ffd75b0008d7010008d7030008d7ffd7ffd7650008d7ce0006
-d7130003d7ffd710000fd7ffd7ffd75b0008d7010008d7030008d7ffd7ffd7650009d7cc
-0006d7150002d7ffd70f0011d7ffd7ffd75a0008d7010008d7030008d7ffd7ffd7650009
-d7cc0005d7160002d7ffd70f0011d7ffd7ffd75a0008d7010008d7030008d7ffd7ffd766
-0008d7cb0006d7160001d7ffd7100011d7ffd7ffd75a0008d7020007d7030009d7ffd7ff
-d7650008d7ca0006d7170001d7ffd7100011d7ffd7ffd7590008d7030007d7040008d7ff
-d7ffd7650009d7c90006d7170001d7ffd70f0012d7ffd7ffd7590008d7030007d7040008
-d7ffd7ffd7650009d7c80006d72d0002d7140002d7060001d7110002d7c30012d7ffd7ff
-d7590008d7030007d7040008d7ffd7ffd7650009d7c80006d7290009d70b0008d7050004
-d70a000ad7c00012d7ffd7ffd7590008d7030007d7040008d7ffd7ffd765000ad7c60006
-d727000dd707000ad7040006d708000dd7be0012d7ffd7ffd75a0008d7030007d7040008
-d7ffd7ffd765000ad7c60006d7260004d7050004d7070009d7030007d7070004d7040005
-d7bd0012d7ffd7ffd75a0008d7030007d7040008d7ffd7ffd765000bd7c40006d7260004
-d7070003d70b0005d7030007d7060003d7060005d7bc0009d7000008d7ffd7ffd75a0007
-d7040007d7040008d7ffd7ffd765000bd7c40006d7240005d7080004d70a0005d7020008
-d7040004d7070005d7bc0009d7000008d7ffd7ffd75a0007d7040007d7040009d7ffd7ff
-d764000cd7c20007d7230005d70a0004d7090004d7020002d7000005d7030004d7080005
-d7bb0009d7010008d7ffd7ffd7590008d7040007d7050008d7ffd7ffd764000cd7c20006
-d7240005d70a0004d7090004d7020001d7020003d7030004d7090004d7bc0009d7010008
-d7ffd7ffd7590008d7040008d7040008d7ffd7ffd765000bd7c20006d7230005d70b0004
-d7090004d7010001d7030002d7030005d7090004d7bc0008d7020008d7ffd7ffd7590008
-d7040008d7040008d7ffd7ffd765000cd7c10006d7220005d70c0004d7080005d7000001
-d70b0004d7080006d7bb0009d7010009d7ffd7ffd7590008d7040008d7040008d7ffd7ff
-d765000cd7c10006d7210006d70b0006d7070004d7000002d70a0005d7070006d7bc0008
-d7020008d7ffd7ffd75a0007d7050008d7040008d7ffd7ffd765000dd7c00006d7210005
-d70c0006d7060008d70b0004d7070005d7bd0009d7020008d7ffd7ffd75a0007d7050008
-d7040008d7ffd7ffd766000cd7c00006d7200006d70c0006d7060007d70c0004d7050006
-d7be0008d7030008d7ffd7ffd75a0007d7050008d7040008d7ffd7ffd766000dd7bf0006
-d7200006d70c0006d7060006d70c0005d7030007d7be0009d7030008d7ffd7ffd75a0007
-d7050008d7040009d7ffd7ffd765000dd7bf0006d71f0006d70d0005d7070006d70c0004
-d7010008d7c00008d7040008d7fc0002d7810002d7d40008d7050008d7050008d7ffd7ff
-d765000ed7be0006d71f0006d70d0005d7060006d70c000dd7c20009d7040008d7fa0004
-d77f0004d7d40008d7050008d7050008d7ffd7ffd765000ed7be0006d71f0006d70d0005
-d7060006d70c000ad7c50008d7040008d7ab0014d7380006d70f0010d75c0006d70d0009
-d7140009d79d0007d7060008d7050008d7ffd7ffd765000fd7bd0006d71f0005d70d0006
-d7060005d70c0005d7ca0009d7040008d7ae0015d7330007d712000fd7590007d70f0007
-d7140006d7a00007d7060008d7050008d7f20002d7ffd770000fd7bc0007d71e0005d70d
-0005d7070005d70c0005d7c90009d7050008d7af0005d7070007d7350004d7130005d703
-0006d7300000d7280004d7110006d7120006d7a10007d7060008d7050008d7790006d703
-0001d7690004d7ffd76c0002d700000fd7bd0006d7160002d7040005d70c0005d7070005
-d70d0005d7c90009d7050008d7af0005d7090006d7350003d7130005d7040006d72f0000
-d7280004d7120005d7120006d7a10007d7060008d7050008d776000fd7670006d7ffd763
-0002d7030001d7030010d7bc0006d7150003d7040005d70c0005d7070005d70d0005d7c8
-0009d7060007d7b00005d70a0006d7340003d7130005d7050006d72d0001d7280004d712
-0006d7100006d7a20007d7060008d7050009d7740004d7040006d7670006d7ffd7620000
-d70c0011d7bc0006d7140002d7050005d70b0005d7080005d70d0005d70e0001d7b60009
-d7060008d7b00005d70b0005d7340003d7130005d7060005d72c0002d7280004d7120006
-d7100006d7a10008d7060008d7060008d7740004d7060004d7690004d7ffd75b0002d711
-0012d7bb0006d7120003d7060005d70a0006d7080004d70e0006d70c0003d7b40009d707
-0008d7b00005d70c0005d7330003d7130005d7070004d72c0002d7280004d7120007d70e
-0007d7a10007d7070008d7060008d7740003d7080003d76a0003d7ffd75a0000d7140012
-d7bc0006d7100003d7070005d70a0005d7080005d70f0005d70a0003d7b60009d7060009
-d7b00005d70d0004d7330003d7130005d7070005d72a0003d7280004d7120007d70e0007
-d7a10007d7070008d7060008d7730003d70a0002d76a0003d7ffd7520002d71b0012d7bc
-0007d70e0002d7080005d7090005d7090004d7100006d7080003d7b60009d7070008d7b1
-0005d70d0005d7320003d7130005d7070005d7290004d7280004d7120002d7000004d70c
-0002d7000004d7a10007d7070008d7060009d7710004d70a0002d76a0003d7ffd7510000
-d71e0013d7bc0007d70b0003d70a0005d7070005d70a0004d7110008d7020005d7b60009
-d7070009d7b10005d70e0004d7020007d7040006d7080006d70b0003d7130005d7070005
-d7080006d70c0002d7010003d702000ad7070005d70e0005d7000004d7120002d7000004
-d70c0002d7000004d70b0005d70b0002d7030004d7070003d70e0006d70c0001d7020003
-d700000ad7030007d7260008d7070008d7070008d7710005d70a0001d76a0003d7ffd74a
-0002d7230014d7bc0014d70d0005d7040005d70c0004d711000fd7b7000ad7070009d7b1
-0005d70e0005d7010007d7040006d707000ad7080003d7130005d7070005d706000ad707
-0005d7000012d704000ad70a000dd7120002d7010004d70a0002d7010004d709000ad705
-0005d7010008d7020008d70a000ad7070004d7010010d7030007d7260008d7060008d708
-0008d7710005d70a0001d76a0003d7ffd7490000d7260009d700000ad7bd0011d710000c
-d70d0004d714000cd7b7000ad7080009d7b10005d70e0005d7030005d7060004d7050004
-d7010006d7070003d7130005d7070004d7060004d7010005d7040007d7000012d7040003
-d7000006d7080003d7010008d7120002d7010004d70a0002d7010004d7080003d7010006
-d7020007d700000ad7000009d7090004d7010005d7040006d7010006d7000005d7090002
-d7280007d7070008d7080008d7710005d70a0001d76a0003d7ffd7420002d72c0014d7be
-000ed7130009d70f0004d7150009d7b9000ad7070009d7b20005d70e0006d7030004d707
-0003d7040003d7050004d7070003d7130005d7060005d7050004d7030004d704000fd701
-0004d7080002d7040004d7070003d7040006d7120002d7020004d7080002d7020004d707
-0003d7040004d7030006d7000016d7070003d7040004d7040006d7000007d7010004d709
-0001d7290007d7070008d7080009d7700006d7090001d7090008d70a0002d7020005d705
-0005d70b0007d70a0002d7020006d7080003d7030005d70c0007d70b0002d7020003d706
-0008d7f40002d7030001d72f0009d700000ad7c20007d7170005d72e0004d7bb000ad708
-0009d7b20005d70e0006d7030004d7070003d7040003d7060003d7070003d7130005d705
-0005d7050004d7050004d7060006d7000004d7010004d7070002d7060004d7050003d706
-0005d7120002d7020004d7080002d7020004d7060003d7060004d7040007d7030007d703
-0004d7060003d7060004d706000cd7010005d7070002d7280008d7070008d7090008d771
-0007d712000ad7060005d7010007d7030007d709000ad7060004d7010008d7070003d701
-0008d709000ad7080004d7010005d704000ad7f20000d7390015d7ffd7d6000bd707000a
-d7b20005d70f0005d7030004d7070003d7040003d7060003d7070003d7130005d7030006
-d7050004d7070004d7050005d7020002d7020004d7070002d7060005d7030004d7070004
-d7120002d7030004d7060002d7030004d7060003d7060004d7040005d7050005d7060003
-d7050004d7070004d7050005d7020002d7030004d7070002d7280008d7070008d7090008
-d7720008d7100003d7000006d7030012d7010009d7060004d7020005d7030006d700000a
-d7060003d700000ad7070005d7010005d7040006d7010006d7030002d7010006d7ea0002
-d73e0009d700000bd7ffd7d4000bd7080009d7b30005d70f0005d7030004d7070003d704
-0003d7060003d7070003d713000fd7060004d7070004d7050004d7090004d7060002d708
-0004d7030004d7070004d7120002d7030004d7060002d7030004d7050003d7070004d705
-0003d7070003d7070004d7040004d7070004d7050004d70b0003d7060002d7290008d707
-0008d7090008d772000ad70d0002d7040005d7020012d700000ad7060003d7040004d703
-0012d706000fd7070003d7050004d7030006d7000007d7010003d7040005d7e80000d742
-0009d700000ad7ffd7d4000ad708000ad7020002d7ad0005d70f0005d7030004d7070003
-d7040003d7060003d7070003d713000ed7070003d7090004d7040004d7090004d7060010
-d7020005d7070004d7120002d7040004d7040002d7040004d7050011d7040003d7070003
-d7070004d7040003d7090004d7040003d70c0004d7050002d7290008d7070008d7090009
-d772000ad70b0002d7060004d7050005d7040007d7040004d7040003d7060003d7050007
-d7030005d7050006d7030004d7060003d7060004d7060005d7010003d7010003d7060004
-d7e10002d7470009d701000ad7ffd7d2000ad7090009d7060000d7ac0005d70e0005d704
-0004d7070003d70e0004d7070003d7130005d70f0004d7090004d7040004d7090004d705
-0011d7020004d7080004d7120002d7040004d7040002d7040004d7050011d7040003d707
-0003d7070004d7030004d7090004d7040003d70d0003d7050001d7290008d7080008d709
-0009d774000ad7090002d7060005d7040004d7060005d7050004d7040004d7050004d704
-0005d7060005d7040004d7060004d7040004d7070004d7050004d7030001d7020003d706
-0005d7de0001d74b0009d701000ad7ffd7d0000ad709000ad70c0001d7a50005d70e0005
-d7040004d7070003d7090009d7070003d7130005d70f0004d7090004d7040004d7090004
-d7050012d7010004d7080004d7120002d7040005d7020003d7040004d7050011d7040003
-d7070003d7070004d7030004d7090004d7040003d70d0004d7030002d7290008d7080008
-d70a0008d775000ad7070002d7080004d7040004d7060004d7060004d7040003d7060004
-d7040004d7080004d7040003d7070004d7040003d7080004d7050004d7070003d7070005
-d7d70002d7510009d701000bd7ffd7ce000bd7090009d70f0001d7a30005d70e0005d704
-0004d7070003d7080005d7000003d7070003d7130005d70f0004d7090005d7030004d709
-0004d7050003d7100004d7080004d7120002d7050004d7020002d7050004d7050003d712
-0003d7070003d7070004d7030004d7090004d7040003d70e0003d7030002d7290008d708
-0008d70a0008d776000ad7060010d7040004d7060004d7060004d7040003d7060004d704
-0004d7080004d7040003d7070004d7030004d7080005d7040003d7080011d7d50001d755
-0009d701000ad7ffd7cd000bd709000ad7b50005d70e0005d7040004d7070003d7070004
-d7020003d7070003d7130005d70f0004d70a0004d7030004d7090004d7050004d70f0004
-d7080004d7120002d7050005d7000003d7050004d7050003d7120003d7070003d7070004
-d7030004d7090004d7040003d70e0004d7010002d72a0008d7080008d70a0009d7770009
-d7040011d7040004d7060004d7060004d70c0007d7040004d7080004d7040003d7070004
-d7030004d7080005d7040003d7080011d7cc0004d75b0009d702000ad7ffd7cb000bd70a
-0009d7160002d79c0005d70e0004d7050004d7070003d7050004d7040003d7070003d713
-0005d70f0004d70a0004d7030004d7090004d7050004d70f0004d7080004d7120002d706
-0004d7000002d7060004d7050004d7110003d7070003d7070004d7030004d7090004d704
-0003d70e0004d7010002d7290009d7080008d70a0009d7790008d7030003d7120004d706
-0004d7060004d709000ad7040004d7080004d7040003d7070004d7030004d7090004d704
-0003d7080003d7d30002d7650009d702000ad7ffd7c9000bd70a000ad7190000d79b0005
-d70e0004d7050004d7070003d7040003d7060003d7070003d7130005d70f0005d7090003
-d7040004d7090004d7050004d70b0000d7020004d7080004d7120002d7060008d7060004
-d7050004d70a0000d7050003d7070003d7070004d7030005d7080004d7040003d70f0004
-d7000001d72a0008d7090008d70b0008d77b0006d7030004d7110004d7060004d7060004
-d7080005d7000004d7040004d7090003d7040003d7070004d7030004d7090004d7040003
-d7080003d7d10001d7680009d703000ad7ffd7c7000bd70b0009d71f0002d7940005d70d
-0004d7060004d7070003d7040003d7060003d7070003d7130005d70f0005d7090003d704
-0004d7090004d7050005d70a0001d7010005d7070004d7120002d7070006d7070004d705
-0005d7090001d7040003d7070003d7070004d7030005d7080004d7040003d70f0007d72a
-0008d7090008d70b0008d76e0001d70b0006d7020004d7110004d7060004d7060004d706
-0005d7020004d7040004d7090003d7040003d7070004d7030004d7090004d7040003d708
-0003d7ca0002d76f0009d703000ad7ffd7c5000bd70b000ad7220001d7920005d70c0005
-d7060004d7070003d7030003d7070003d7070003d7130005d7100004d7090003d7040004
-d7090004d7060005d7080001d7020005d7070004d7120002d7070006d7070004d7050005
-d7090001d7040003d7070003d7070004d7030005d7080004d7040003d7100006d72a0008
-d7090008d70b0009d76d0001d70c0005d7020004d7110004d7060004d7060004d7050004
-d7040004d7040004d7090003d7040003d7070004d7030004d7090004d7040003d7080004
-d7c70001d7720009d703000bd7ffd7c3000bd70c0009d7b80005d70b0005d7070004d707
-0003d7030003d7070003d7070003d7130005d7100004d7080004d7040004d7090004d706
-0005d7080001d7020006d7060004d7120002d7080004d7080004d7050006d7070002d704
-0003d7070003d7070004d7030005d7080003d7050003d7100005d72a0009d7090008d70b
-0009d76d0002d70b0005d7020004d70b0000d7040004d7060004d7060004d7050003d705
-0004d7040004d7090003d7040003d7070004d7030004d7090004d7040003d7080004d70b
-0000d7ffd7300009d703000cd7ffd7c0000bd70c000ad7290002d78b0005d70a0006d707
-0004d7050005d7030004d7050004d7070003d7130005d7100005d7070003d7050004d709
-0004d7070005d7060002d7030005d7060004d7120002d7080004d7080004d7060006d705
-0002d7050003d7070003d7070004d7040005d7060004d7050003d7110004d72a0009d708
-0008d70d0008d76d0002d70c0004d7020005d7090001d7040004d7060004d7060004d704
-0003d7060004d7040004d7090003d7040003d7070004d7030004d7090004d7040003d708
-0005d7090001d7b30002d7790009d704000cd7ffd7be000bd70d0009d72d0000d78a0005
-d7080007d7090005d7010008d7000000d7000006d701000ad7030003d7130005d7110005
-d7050003d7060004d70a0004d7010002d701000ed7040007d7020006d7010000d70f0002
-d7090002d7090005d705000ed7050004d7070004d7060004d7050005d7050003d7060004
-d7100003d72b0008d7090008d70d0008d76d0002d70c0004d7030005d7080001d7040004
-d7060004d7060004d7030004d7060004d7040004d7090003d7040003d7070004d7030005
-d7080004d7040003d7080006d7080001d7b20000d77d0009d704000cd7ffd7bc000bd70d
-0009d7330002d7830008d7010008d70c000ad7000006d700000ad7000007d7020005d712
-0005d7120005d7030003d7070005d7090008d703000cd7060013d70e0003d7090002d709
-0005d706000cd7060005d7050005d7060004d7060005d7030003d7070004d7110002d72b
-0008d7090008d70d0009d76c0003d70b0004d7030005d7080001d7040004d7060004d706
-0004d7030004d7060004d7040004d7090003d7040003d7070004d7030005d7080003d705
-0003d7080006d7070002d7aa0002d7830009d705000cd7ffd7ba000bd70e0009d7360000
-d77e0016d70e0008d7010004d7030008d7010006d700000ad70c000dd70f000bd705000a
-d7070007d705000ad7080009d7000005d70c000bd7060000d706000dd7040009d704000a
-d701000ad700000ad704000bd705000ad70e0002d72a0009d7090008d70d0009d76c0003
-d70b0004d7040006d7040003d7040004d7060004d7060004d7030004d7040006d7010000
-d7010005d7070003d7050003d7070004d7040005d7060003d7060003d7090007d7040002
-d7aa0000d7870009d705000cd7ffd7b8000bd70e0009d73d0001d7770012d7120007d702
-0002d7060006d7020005d701000ad70c000dd7110008d706000ad7080006d7070006d70c
-0007d7000002d70f000bd7060000d706000dd7050007d705000ad701000ad700000ad705
-0008d707000ad70d0002d72b0009d7090008d70e0008d76c0005d7080004d705000ed705
-0004d7060004d7060004d7030006d701000ad7010005d7060003d7060003d7070004d705
-0005d7050003d7060004d709000dd7a40001d78e0009d705000cd7ffd7b6000bd70e000a
-d73f0001d7ffd7ee0002d72b0008d70a0008d70e0009d76b0006d7050004d708000cd705
-0005d7060004d7060005d7020013d7010006d7040003d7060005d7060005d7040006d703
-0003d7060005d70a000cd7a20001d7910009d705000cd7ffd7b4000cd70d000ad7ffd7ff
-d7300002d72b0009d7090008d70f0009d76b0010d70a000ad704000ad700000ad700000a
-d7010008d7010006d702000ed7050009d701000ad703000bd706000ad7080009d7ffd738
-0009d706000cd7ffd7b2000cd70e000ad7460002d7ffd7e60002d72b0009d7090008d710
-0008d76b0002d7020008d70e0006d706000ad700000ad700000ad7030005d7030004d703
-0004d7000006d7070009d701000ad7070005d708000ad70a0006d79d0002d7990009d706
-000cd7ffd7b0000cd70e000ad74a0000d7ffd7df0001d7020002d72c0008d70a0008d710
-0009d7d00004d7f70000d79d0009d706000cd7ffd7ae000cd70e000ad7500002d7ffd7d6
-0009d72b0009d70a0008d7100009d7d00004d7ef0002d7a3000ad706000dd7ffd7aa000d
-d70e000bd7530000d7ffd7d50008d72c0009d70a0008d7110008d7d00004d7ee0000d7a7
-000ad707000dd7ffd7a6000dd70f000bd7ffd7ffd72b0007d72d0008d70b0008d7110009
-d7cf0004d7ffd797000bd707000dd7ffd7a4000dd70f000bd75b0002d7ffd7cd0006d72d
-0009d70a0009d7110009d7cf0004d7e60002d7ae000ad708000ed7ffd7a0000ed710000a
-d75f0000d7ffd7cd0004d72e0009d70a0008d7130008d7cf0004d7e50000d7b1000bd709
-000dd7ffd79e000dd711000bd7650002d7ffd7f90008d70b0008d7130008d7cf0004d7dd
-0002d7b8000bd709000dd7ffd79c000dd711000bd7690000d7ffd7f80008d70b0008d713
-0009d7cb000ad7d90000d7bc000bd709000dd7ffd79a000dd711000bd7700001d7ffd7f0
-0009d70b0008d7130009d7cb000ad7d20001d7c3000bd709000ed7ffd796000ed711000b
-d7730001d7ffd7ee0009d70b0008d7140008d7ffd7a70001d7c6000bd709000ed7ffd794
-000ed712000ad7ffd7ffd7650008d70b0009d7140009d7ffd7ffd76f000cd70a000dd7ff
-d792000dd713000bd77b0002d7ffd7e50009d70b0008d7150009d7ffd79e0002d7ce000b
-d70b000dd7ffd790000dd713000bd77f0000d7ffd7e40009d70b0008d7160008d7ffd79d
-0000d7d2000bd70b000ed7ffd78c000ed713000bd7860002d7ffd7dc0008d70c0008d716
-0009d7ffd7940002d7d9000bd70b000fd7ffd788000fd714000ad78a0000d7ffd7da0009
-d70c0008d7160009d7ffd7930000d7dd000bd70c000ed7ffd786000ed715000ad7ffd7ff
-d7670009d70c0008d7160009d7ffd78c0001d7e4000bd70d000ed7ffd782000ed716000a
-d7920002d7ffd7d20008d70c0009d7170009d7ffd7890001d7e7000bd70d000ed7ffd780
-000ed716000bd7950000d7ffd7d00009d70c0008d7180009d7ffd7ffd774000bd70e000e
-d7ffd77c000ed716000cd79c0002d7ffd7c80009d70c0008d7180009d7ffd7810002d7f0
-000bd70e000fd7ffd778000fd716000cd7a00000d7ffd7c70008d70d0008d718000ad7ff
-d77f0000d7f4000bd70f000fd7ffd774000fd717000cd7a70001d7ffd7bf0009d70d0008
-d718000ad7ffd7770002d7fb000bd70f0010d7ffd7700010d717000cd7aa0001d7ffd7bd
-0009d70c0009d7190009d7ffd7760000d7ff000cd70e0010d7ffd76e0010d717000cd7ff
-d7ffd76b0008d70d0008d71a000ad7ffd7ffd777000cd70f0010d7ffd76a0010d717000d
-d7b30002d7ffd7b40009d70d0008d71a000ad7ffd76d0002d7ffd707000cd70f0011d7ff
-d7660011d717000dd7b70000d7ffd7b30008d70e0008d71a000bd7ffd76b0000d7ffd70b
-000dd70e0012d7ffd7620012d717000dd7be0002d7ffd7aa0009d70e0008d71a000bd7ff
-d7630002d7ffd712000dd70f0012d7ffd75e0012d718000dd7c20000d7ffd7a90009d70d
-0009d71a000bd7ffd7620000d7ffd716000dd7100012d7ffd75a0012d719000dd7ffd7ff
-d76e0008d70e0009d71b000bd7ffd75a0001d7ffd71d000dd7110012d7ffd7560012d71a
-000dd7ca0002d7ffd7a00009d70e0008d71c000bd7ffd7580001d7ffd721000dd7110012
-d7ffd7520012d71a000dd7cf0000d7ffd79f0008d70f0008d71c000bd7ffd7ffd77d000d
-d7110013d7ffd74e0012d71b000dd7d50002d7ffd7980008d70f0008d71c000cd7ffd74f
-0002d7ffd72a000dd7120014d7ffd7480013d71c000dd7d90001d7ffd7950009d70e0009
-d71c000cd7ffd74e0000d7ffd72f000cd7130014d7ffd7440013d71d000cd7e10001d7ff
-d78f0008d70f0009d71d000cd7ffd7450002d7ffd734000fd7130014d7ffd7400013d71d
-000dd7e40001d7ffd78c0009d70f0008d71e000cd7ffd7440000d7ffd7350012d7140014
-d7ffd73c0013d71d000ed7e70000d7ffd78b0008d7100008d71e000cd7ffd7ffd7790015
-d7150014d7ffd7380014d71d000ed7ed0002d7ffd7840008d7100008d71e000dd7ffd73b
-0002d7ffd7380018d7150014d7ffd7340014d71d000ed7f20001d7ffd7810009d70f0009
-d71e000dd7ffd73a0000d7ffd739001bd7160014d7ffd7300014d71e000ed7f90002d7ff
-d77a0008d7100009d71f000cd7ffd7330002d7ffd73c001fd7160015d7ffd72a0015d71e
-000fd7fd0001d7ffd7780008d7100008d720000dd7ffd7300001d7ffd73d0011d700000f
-d7170015d7ffd7260015d71f000fd7ffd7ffd7780008d7110008d720000dd7ffd72a0001
-d7ffd7420010d7030010d7170016d7ffd7200016d720000fd7ffd7050002d7ffd7700008
-d7100009d720000ed7ffd7270001d7ffd7420010d707000fd7180018d7ffd7180018d720
-000fd7ffd70a0001d7ffd76d0009d7100009d721000dd7ffd7260000d7ffd7420011d70a
-000fd7190019d7ffd7100019d722000ed7ffd7120002d7ffd7660008d7110008d722000d
-d7ffd71f0002d7ffd7450011d70d000fd71a001ad7ffd70a001ad723000ed7ffd7160001
-d7ffd7640008d7100009d722000ed7ffd71c0001d7ffd7460011d711000fd71b001ad7ff
-d704001ad724000ed7ffd71e0002d7ffd75c0008d7110009d723000dd7ffd7150002d7ff
-d74b0010d7140010d71b001ad7ffd7000019d725000fd7060000d7ffd71a0001d7ffd75a
-0008d7110008d724000ed7ffd7120001d7ffd74c0010d718000fd71d001ad7fa001ad725
-000fd7090001d7ffd7ffd7740009d7100009d724000ed7ffd7ffd75f0011d71b000fd71d
-001bd7f4001ad726000fd7ffd72c0002d7ffd7520008d7110009d725000ed7ffd70a0002
-d7ffd74e0011d71e0010d71e001cd7ec001bd7270010d7ffd7300001d7ffd74f0009d711
-0008d726000ed7ffd7080001d7ffd74f0011d7220010d71f001dd7e4001cd7280010d714
-0001d7ffd7210002d7ffd7480008d7110009d726000fd7ffd7000002d7ffd7540010d725
-0011d71f001ed7dd001ed7280011d7170001d7ffd7220001d7ffd7450009d7110009d727
-000ed7fe0001d7ffd7550011d7280011d720001fd7d5001fd7290011d7ffd7440001d7ff
-d73f0008d7120008d728000fd7f70001d7ffd7590011d72b0012d7210020d7cd0020d72a
-0012d7ffd7470001d7ffd73c0009d7120008d728000fd7f50001d7ffd7590011d72f0012
-d7220021d7c60020d72b0012d7220001d7ffd7260000d7ffd73b0008d7120009d7280010
-d7f30000d7ffd75a0010d7320013d7230022d7be0022d72b0013d7250001d7ffd7290002
-d7ffd7330009d7120009d729000fd7ec0002d7ffd75d0010d7360013d7240023d7b60023
-d72c0013d7ffd7560001d7ffd7310008d7130008d72a0010d7e90001d7ffd75e0011d739
-0013d7250025d7ac0025d72d0014d7ffd75d0002d7ffd7290009d7120009d72a0010d7e2
-0002d7ffd7620011d73d0013d7270027d7a00027d72f0014d7300000d7ffd7300001d7ff
-d7270008d7130009d72b0010d7df0001d7ffd7630011d7410013d7290029d7940029d731
-0014d7330001d7ffd7ffd7570009d7130008d72c0010d7ffd7ffd7440010d7450014d72a
-002bd788002bd7320015d7370000d7ffd7330002d7ffd71f0008d7130009d72c0011d7d7
-0002d7ffd7660010d7490014d72c002ed77a002ed7340015d7ffd7710001d7ffd71c0009
-d7130009d72d0010d7d50001d7ffd7670011d74c0015d72d0030d76e0030d7350016d7ff
-d7790002d7ffd7150008d7140008d72e0011d7cd0002d7ffd76b0011d7500015d7300034
-d75c0034d7380016d7420001d7ffd7390001d7ffd7120009d7130009d72e0011d7cb0001
-d7ffd76c0011d7540016d733003bd742003bd73b0016d7470001d7ffd73d0001d7ffd70c
-0008d7140009d72f0011d7c40001d7ffd7710010d7580016d73600b0d73e0016d7ffd78b
-0001d7ffd7090009d7140008d7300011d7c20001d7ffd7710011d75c0016d73700a8d73f
-0016d7ffd7900000d7ffd7080008d7140009d7300012d7c00000d7ffd7710011d7600017
-d73800a0d7400017d7540000d7ffd7410002d7ffd7000009d7140009d7310012d7b80002
-d7ffd7740011d7640017d73b0096d7430017d7570001d7ffd7420001d7fd0009d7140009
-d7320012d7b60001d7ffd7760010d7680018d73e008ad7460018d7ffd7a40002d7f60009
-d7140009d7330012d7ae0002d7ffd77a0010d76c0019d7450076d74d0019d7ffd7a90001
-d7f30009d7150008d7340012d7ac0001d7ffd77b0011d76f001bd74b0062d753001bd763
-0001d7ffd7ffd73b0008d7150009d7340013d7ffd7ffd7270011d774001cd74d0056d755
-001cd7680001d7ffd7490002d7eb0009d7150009d7350008d7000009d7a30002d7ffd77d
-0011d778001dd7540042d75c001dd7ffd7b90001d7e80009d7150009d7360013d7a10001
-d7ffd77f0010d77d001dd76c000cd774001dd7ffd7c20002d7e10009d7150009d7370008
-d7000009d7990002d7ffd7830011d781001cd7ea001cd7760001d7ffd74f0001d7de0009
-d7150009d7380008d7000009d7970001d7ffd7840011d786001cd7e4001dd77a0001d7ff
-d7530001d7d80009d7150009d7380009d7000009d78f0002d7ffd7880011d78a001ed7dd
-001dd7ffd7d50001d7d50009d7160009d7390008d7010009d78c0001d7ffd7890011d78f
-001fd7d5001fd7ffd7d90000d7d30009d7160009d73a0009d7000009d7ffd7ffd7170010
-d7940020d7cd0020d7880001d7ffd7560002d7cc0009d7160009d73b0008d7010009d784
-0002d7ffd78c0011d7990020d7c40021d78e0001d7ffd7570001d7c90009d7160009d73c
-0008d701000ad7810001d7ffd78d0011d79e0023d7b80023d7ffd7f20002d7c1000ad716
-0009d73c0009d7010009d77a0002d7ffd7910011d79f002ad7ac0025d7ffd7f90001d7bf
-0009d7170009d73d0008d7020009d7770001d7ffd7930010d7a10030d7a00027d7ffd7ff
-d7be0009d7170009d73e0008d7020009d7710001d7ffd7970010d7a2000ad7020029d795
-002ad7a20001d7ffd7600002d7b70009d7170009d73f0008d7020009d76e0001d7ffd797
-0011d7a2000ad7070029d78d002fd7a30001d7ffd7610001d7b40009d7170009d7400008
-d702000ad76c0000d7ffd7970011d7a3000ad70c0029d7850033d7ffd7ffd70d0002d7ac
-000ad7170009d7400009d7020009d7650002d7ffd79a0011d7a5000ad710002dd774002d
-d703000bd7ffd7ffd70f0001d7aa0009d717000ad7410008d702000ad7620001d7ffd79c
-0010d7a6000ad7150035d75c0035d708000bd7a60001d7ffd76b0001d7a3000ad7170009
-d7420009d7020009d75b0002d7ffd7a00011d7a6000ad71a003ed742003ed70d000ad7a8
-0001d7ffd76b0001d7a10009d717000ad7430008d7030009d7580001d7ffd7a10011d7a8
-000ad71e0048d7270047d712000ad7ffd7ffd7170000d79f0009d7180009d7440009d702
-000ad7ffd7f90011d7a9000ad72400aed717000bd7ffd7ffd71b0002d797000ad717000a
-d7440009d7030009d7500002d7ffd7a30011d7aa000ad72b00a2d71e000bd7ab0001d7ff
-d76f0001d7950009d718000ad7450009d702000ad74d0001d7ffd7a50010d7ab000ad732
-0096d725000ad7ad0001d7ffd7730002d78d000ad717000ad7460009d703000ad7450002
-d7ffd7a90011d7ac000ad738008ad72b000bd7ffd7ffd7250001d78a000ad718000ad747
-0009d703000ad7420001d7ffd7aa0011d7ad000ad740007cd733000bd7ffd7ffd7b0000a
-d718000ad7480009d703000ad73c0001d7ffd7ae0011d7ae000ad7470070d73a000bd7b0
-0001d7ffd7760002d782000ad718000ad7490009d703000ad7390001d7ffd7ae0011d7b0
-000ad751005cd745000ad7b20001d7ffd7770001d77f000ad718000ad74a0009d704000a
-d7370000d7ffd7af0010d7b1000ad75f0042d752000bd7ffd7ffd7310002d777000ad719
-000ad74b0009d703000bd72f0002d7ffd7b20011d7b1000ad76e0027d760000bd7ffd7ff
-d7330001d774000bd718000ad74c0009d704000ad72d0001d7ffd7b30011d7b30009d778
-0009d776000bd7b50001d7ffd7800001d76e000ad719000ad74d0009d704000ad7250002
-d7ffd7b70011d7b4000ad7780009d777000ad7b70001d7ffd7800001d76b000ad719000a
-d74e0009d705000ad7220001d7ffd7b90010d7b5000ad7790009d777000bd7ffd7ffd73b
-0000d769000ad71a000ad74f0009d704000ad7ffd7dc0011d7b5000ad77a0009d778000b
-d7ffd7ffd73f0002d762000ad719000ad7500009d705000ad71a0002d7ffd7bb0011d7b7
-000ad77a0009d779000ad7ffd7ffd7420001d75f000ad71a000ad7510009d705000ad717
-0001d7ffd7bc0011d7b8000ad77b0009d77a000ad7ba0000d7ffd78b0002d757000ad71a
-000ad7520009d705000bd70f0002d7ffd7c00011d7b9000ad77c0009d77a000bd7ba0001
-d7ffd78c0000d755000bd71a000ad7530009d705000ad70d0001d7ffd7c20010d7bb0009
-d77d0009d77b000bd7ffd7ffd74e0001d74e000ad71a000ad7540009d706000ad7060001
-d7ffd7c60011d7bb000ad77d0009d77c000ad7ffd7ffd7500001d74b000ad71b000ad755
-0009d705000bd7030001d7ffd7c60011d7bc000ad77e0009d77c000bd7be0001d7ffd7db
-000bd71a000ad7560009d706000bd7010000d7ffd7c60011d7bd000ad77f0009d77d000b
-d7bf0001d7ffd7930002d741000bd71b000ad7570009d706000ad7ffd7c70011d7bf000a
-d77f0009d77e000bd7ffd7ffd7570000d740000ad71b000ad758000ad706000ad7ffd7c5
-0011d7bf000ad7800009d77f000ad7ffd7ffd75d0002d737000ad71b000bd7590009d706
-000bd7ffd7c20011d7c0000ad7810009d77f000bd7c30001d7ffd7990000d735000bd71b
-000ad75a000ad706000bd7ffd7bf0011d7c20009d7820009d780000bd7c40001d7ffd7cd
-000bd71b000bd75b0009d707000ad7ffd7bd0011d7c3000ad7820009d781000bd7ffd7ff
-d7630002d72c000ad71c000ad75d0009d706000bd7c10001d74d0002d7a60010d7c4000a
-d7830009d782000ad7ffd7ffd7660000d72a000bd71b000ad75e000ad706000bd7aa0005
-d7040001d7060005d7490004d7a40011d7c50009d7840009d782000bd7c80001d7ffd7a0
-0002d721000bd71c000ad75f0009d707000bd7a6000bd7000002d7060005d7470006d7a2
-0011d7c6000ad7840009d783000bd7c90001d7ffd7a10000d71f000bd71c000ad760000a
-d707000ad7a50005d7020007d7060005d7460007d7a00011d7c7000ad7850009d784000a
-d7ffd7ffd7730001d718000ad71c000bd7610009d707000bd7a40003d7070004d7060005
-d7490004d79e0011d7c8000ad7860009d785000ad7ffd7ffd7740001d715000bd71c000a
-d762000ad706000cd7a20003d7080004d7070003d74a0004d79d0010d7ca000ad7860009
-d785000bd7cd0001d7f90003d7150003d7a2000bd71c000ad764000ad7050000d700000b
-d7a00004d7090003d7560004d79b0011d7ca000ad7870009d786000bd7ce0001d7a90010
-d73b0005d7130005d7910002d70b000bd71d000ad7650009d7050000d701000ad7a00004
-d70a0002d7560004d7990011d7cb000ad7880009d787000ad7ffd77a0012d7390005d713
-0005d7940000d70a000ad71d000ad766000ad7040000d702000ad79f0004d70a0002d756
-0004d7970011d7cd0009d7890009d787000bd7ffd77d0010d7370005d7130005d79a0002
-d701000ad71e0009d768000ad7030000d703000ad79e0005d70a0001d7560004d7950011
-d7ce000ad7890009d788000bd7d20000d7a90004d7040006d72c0001d7080004d7090000
-d7080005d79d000bd71e000ad768000ad7030000d703000bd79d0005d70a0001d7560004
-d7940011d7ce000ad78a0009d789000bd7d20000d7a80004d7060005d72b0001d7090001
-d70b0000d70a0001d79f000bd71e0009d76a000ad7020000d704000bd79c0006d7090001
-d7090002d70b0005d70c0002d7030004d70c0006d70a0004d7920011d7cf000ad78b0009
-d78a000ad7d30000d7a70004d7060005d72b0001d7160001d7ab000bd71e000ad76b0009
-d7020000d705000ad79c0008d7100005d7080010d7020004d7010008d708000bd7070004
-d7900011d7d1000ad78b0009d78a000bd7ffd77b0004d7070005d7290002d7160001d7ab
-000ad71e000ad76c000ad7010000d706000ad79c0009d70c0007d7070003d7040008d700
-0006d700000ad7060004d7010005d7070004d78e0011d7d2000ad78c0009d78b000bd7ff
-d77a0004d7070005d7280003d7150002d7aa000ad71f0009d76e000ad7000000d707000a
-d79c000ad70a0007d7070003d7040008d7000012d7050003d7050004d7060004d78d0010
-d7d3000ad78d0009d78c000bd7d50001d7a10004d7070005d7270004d7140003d7a9000a
-d71f000ad76e000ad7000000d707000bd79b000bd70c0004d7060003d7060004d7050007
-d7030005d7040003d7050004d7060004d78b0011d7d40009d78e0009d78d000ad7d70001
-d79f0004d7070005d7070004d70d0001d7040000d7030005d70a0002d7050004d70b0002
-d70c0002d70f0001d7050001d76f000bd71f0009d770000bd708000ad79d000bd70a0004
-d7060003d7060004d7060004d7060004d7040003d7050004d7060004d7890011d7d5000a
-d78e0009d78d000bd7ffd7780004d7070005d705000ad7070003d7020011d7030004d703
-000bd7040004d70a0008d7090003d7030005d76d000ad71f0009d771000bd709000ad79e
-000ad7090004d7050004d7060004d7060003d7070004d7040003d7060003d7060004d787
-0011d7d6000ad78f0009d78e000bd7ffd7770004d7070005d704000cd7040005d7010012
-d7010006d703000bd7020006d708000ad7070005d7010008d76b000ad7200009d772000a
-d70a000ad79e000ad7080004d7050004d7070003d7060003d7070004d7040003d7060003
-d7060004d7850011d7d80009d7900009d78f000ad7db0001d7990004d7070004d7040004
-d7030004d7030006d7000007d7010004d7050007d7060003d7060007d7070003d7030005
-d7040006d700000ad769000ad7200009d774000ad70a000ad79f0009d7070004d7050004
-d7070003d7060003d7070004d70e0004d7060004d7840011d7d8000ad7900009d790000a
-d7dc0001d7970004d7060005d7040003d7050004d7020000d700000dd7010004d7050000
-d7010004d7060003d7060000d7000005d7070003d7050004d7030000d7000008d7010006
-d767000ad720000ad774000ad70b000ad79f0008d7070004d7050004d7070003d7060003
-d7070004d7090009d7060004d7820011d7d9000ad7910009d790000bd7ffd7750004d705
-0005d7040004d7050004d7050005d7010003d7020004d7080004d7060003d7090004d706
-0003d7060005d7050005d7050004d766000ad7210009d776000ad70a000bd7a10006d706
-0004d7060003d7070003d7060003d7070004d7080005d7000003d7060004d7800011d7da
-000ad7920009d791000bd7ffd774000fd7050004d7050004d7050004d7090004d7080004
-d7060003d7090004d7050003d7080004d7050003d7070004d765000bd7020000d71c0009
-d777000bd70a000bd7930001d70a0006d7060004d7060004d7050003d7070003d7070004
-d7070004d7020003d7060004d77e0011d7dc0009d7930009d792000ad7e00001d791000d
-d7070004d7050004d7050003d70a0004d7080004d7060003d7090004d7040004d7080005
-d7040003d7070004d764000bd7030000d71b000ad778000ad70b000bd7920001d70b0006
-d7050004d7070004d7030003d7080003d7070004d7050004d7040003d7060004d77c0011
-d7dd000ad7930009d792000bd7e10001d78f000bd70a0002d7050005d7050003d70a0004
-d7080004d7060003d7090004d7040004d7090004d7040003d7070004d763000bd7040000
-d71b0009d77a000ad70b000ad7920001d70c0005d7050004d708000ad7090003d7070004
-d7040003d7060003d7060004d77b0011d7dd000ad7940009d793000bd7ffd7720004d718
-0007d7050003d70a0004d7080004d7060003d7090004d7040004d7090004d7040003d707
-0004d763000ad7050000d71a0009d77b000bd70b000ad7910002d70b0005d7050004d709
-0007d70b0003d7070004d7040003d7060003d7060004d7790011d7df0009d7950009d794
-000bd7ffd7710004d7160009d7050003d70a0004d7080004d7060003d7090004d7040004
-d7090004d7040003d7070004d762000ad7060000d719000ad77c000bd70b000ad7900002
-d70c0004d7050004d7070003d7010002d70c0003d7070004d7030003d7070003d7060004
-d7770011d7e0000ad7950009d795000ad7e50001d7890004d7130005d7010004d7050003
-d70a0004d7080004d7060003d7090004d7040004d7090004d7040003d7070004d761000a
-d721000ad77e000ad70c000ad78f0002d70c0003d7060004d7060002d7130003d7070004
-d7030003d7070003d7060004d7750011d7e1000ad7960009d795000bd7e60001d7870004
-d7120004d7030004d7050003d70a0004d7080004d7060003d7090004d7040004d7090004
-d7040003d7070004d760000ad7220009d77f000bd70c000ad78e0003d70a0004d7060004
-d7060002d7130003d7070004d7030004d7050004d7060004d7740010d7e2000ad7970009
-d796000bd7ffd76f0004d7110003d7050004d7050003d70a0004d7080004d7060003d709
-0004d7040004d7090004d7040003d7070004d75f000ad722000ad780000bd70b000bd78d
-0005d7080003d7070004d7050010d7060004d7060004d7030006d701000ad7020004d772
-0011d7e30009d7980009d797000bd7ffd76e0004d7100004d7050004d7050003d70a0004
-d7080004d7060003d7090004d7040004d7090004d7040003d7070004d75e000bd721000a
-d782000ad70c000bd78c0005d7060004d7070006d7040011d7040005d7060005d702000a
-d7000007d7020005d76f0011d7e4000ad7980009d798000ad7e90001d7820004d7100003
-d7060004d7050003d70a0004d7080004d7060003d7090004d7040004d7090004d7040003
-d7070004d75d000bd70a0000d7160009d784000ad70c000bd78b0010d706000ad7030012
-d700000ad700000ad7010008d7010006d700000ad76b0011d7e5000ad7990009d798000b
-d7ea0001d7800004d70f0004d7060004d7050003d70a0004d7080004d7060003d7090004
-d7040005d7080004d7040003d7070004d75c000bd70b0000d715000ad784000bd70c000b
-d78a0001d7020009d708000ad704001dd700000ad7020006d7020004d702000ad7690011
-d7e70009d79a0009d799000bd7ffd76c0004d70f0004d7060004d7050003d70a0004d708
-0004d7060004d7080004d7050005d7070003d7050003d7070004d75b000bd70c0000d714
-000ad786000ad70d000bd7b00002d70c0003d79f0011d7e7000ad79a0009d79a000ad7ff
-d76c0004d70f0005d7040005d7010001d7010004d7090004d7020002d7020004d7060004
-d7020001d7030004d7050005d7060004d7050003d7070004d75a000bd70d0000d7140009
-d788000ad70d000bd7ae0002d70e0002d79d0011d7e8000ad79b0009d79b000ad7ffd76b
-0004d7100013d7010004d7090009d7030004d7060009d7030004d7060005d7050003d706
-0004d7060004d759000bd70e0000d713000ad788000bd70d000ad7ae0002d70e0001d79c
-0011d7ea0009d79c0009d79b000bd7ed0001d7780008d70e0011d7020006d7090008d702
-0006d7050008d7030006d7060006d7010004d7050006d7050006d758000ad723000ad78a
-000bd70d000ad7ac0003d70d0002d79a0011d7eb0009d79d0009d79c000bd7ee0001d773
-000dd70d0008d7010004d701000ad7070006d702000ad7040006d702000ad706000ad705
-000ad700000ad755000ad723000bd78b000ad70e000ad7ab0004d70b0002d7990011d7ec
-000ad79d0009d79d000ad7ffd7810005d7030003d7170003d7150003d7170005d774000a
-d724000ad78c000bd70e000ad7aa0012d7990011d7ec000ad79e0009d79d000bd7ffd7ff
-d756000ad724000ad78e000bd70e000ad7aa0010d7980011d7ee0009d79f0009d79e000b
-d7f20001d7ffd75f000ad7130000d70f000bd78f000ad70e000bd7ab000dd7970011d7ef
-000ad79f0009d79f000bd7f30001d7ffd75c000bd7130000d70f000ad791000ad70e000b
-d7ac0009d7970011d7f0000ad7a00009d7a0000ad7ffd7ffd751000bd7140000d70e000a
-d792000bd70e000bd7ffd74c0010d7f20009d7a10009d7a0000bd7ffd7ffd74f000bd715
-0000d70d000bd793000bd70e000bd7ffd7490011d7f2000ad7a10009d7a1000bd7f70001
-d7ffd753000bd7160000d70c000bd795000ad70f000bd7ffd7460011d7f3000ad7a20009
-d7a2000bd7f80001d7ffd750000bd725000ad796000bd70f000bd7ffd7430011d7f4000a
-d7a30009d7a3000ad7ffd7ffd74a000bd725000bd797000bd70f000bd7ffd7400011d7f6
-0009d7a40009d7a3000bd7ffd7ffd748000bd725000bd799000bd70f000bd7ffd73e0011
-d7f6000ad7a40009d7a4000bd7fc0000d7ffd748000bd725000bd79b000ad710000bd7ff
-d73b0011d7f7000ad7a50009d7a5000ad7fd0001d7ffd745000bd71b0000d709000ad79c
-000bd710000bd7ffd7380011d7f90009d7a60009d7a6000ad7ffd7ffd743000bd71c0000
-d708000bd79d000bd710000bd7ffd7350011d7fa000ad7a60009d7a6000bd7ffd7ffd741
-000bd71d0000d707000bd79f000bd710000bd7ffd7320011d7fb000ad7a70009d7a7000b
-d7ffd7000001d7ffd73c000bd71f0000d705000bd7a1000ad711000bd7ffd7300011d7fb
-000ad7a80009d7a8000ad7ffd7020001d7ffd739000bd7200000d705000ad7a3000ad711
-000bd7ffd72d0011d7fd0009d7a90009d7a8000bd7ffd7ffd73c000bd727000ad7a5000a
-d711000bd7ffd72a0011d7fe000ad7a90009d7a9000bd7ffd7ffd73a000bd727000ad7a6
-000bd711000bd7ffd7270011d7ff000ad7aa0009d7aa000bd7ffd7050000d7ffd731000b
-d727000bd7a7000bd710000cd7ffd7250011d7ffd7000009d7ab0009d7ab000ad7ffd706
-0001d7ffd72e000cd726000bd7a9000ad711000cd7ffd7220011d7ffd701000ad7ab0009
-d7ab000bd7ffd7070000d7ffd72c000cd7240000d701000ad7ab000ad711000cd7ffd71f
-0011d7ffd702000ad7ac0009d7ac000bd7ffd7ffd733000cd7250000d700000ad7ad000a
-d711000cd7ffd71c0011d7ffd7040009d7ad0009d7ad000bd7ffd7ffd731000cd726000b
-d7ae000bd711000cd7ffd7190011d7ffd7050009d7ae0009d7ae000ad7ffd70a0001d7ff
-d723000cd727000bd7af000ad712000cd7ffd7170011d7ffd705000ad7ae0009d7ae000b
-d7ffd70b0001d7ffd720000cd728000ad7b1000ad712000cd7ffd7140011d7ffd706000a
-d7af0009d7af000bd7ffd7ffd72c000cd728000ad7b3000ad712000cd7ffd7110011d7ff
-d7080009d7b00009d7b0000ad7ffd7ffd72b000cd728000ad7b5000ad712000dd7ffd70d
-0011d7ffd709000ad7b00009d7b1000ad7ffd70f0001d7ffd716000dd728000ad7b7000a
-d712000dd7ffd70a0011d7ffd70a000ad7b10009d7b1000bd7ffd7100001d7ffd713000d
-d728000ad7b8000bd712000dd7ffd7080011d7ffd70b0009d7b20009d7b2000bd7ffd7ff
-d724000dd728000bd7b9000bd712000dd7ffd7050011d7ffd70c0009d7b30009d7b3000a
-d7ffd7ffd723000dd728000bd7bb000bd712000dd7ffd7020011d7ffd70d000ad7b30009
-d7b3000bd7ffd7140000d7ffd70b000dd728000bd7bd000ad713000dd7ff0011d7ffd70e
-000ad7b40009d7b4000bd7ffd7140001d7ffd708000dd729000ad7bf000ad713000dd7fd
-0011d7ffd70f0009d7b50009d7b5000bd7ffd7ffd71d000cd72a000ad7c1000ad714000d
-d7f90011d7ffd710000ad7b50009d7b6000ad7ffd7ffd71b000dd72a000ad7c3000ad714
-000dd7f60011d7ffd711000ad7b60009d7b6000bd7ffd7180000d7ff000dd72a000ad7c5
-000ad714000dd7f30011d7ffd7130009d7b70009d7b7000bd7ffd7180001d7fc000dd72a
-000ad7c6000bd714000dd7f00011d7ffd7140009d7b80009d7b8000bd7ffd7190000d7fa
-000dd72a000bd7c7000bd714000dd7ee0011d7ffd714000ad7b80009d7b9000ad7ffd7ff
-d714000cd72b000bd7c9000bd714000dd7eb0011d7ffd7160009d7b90009d7b9000bd7ff
-d7ffd712000cd72b000bd7cb000bd714000dd7e80011d7ffd7170009d7ba0009d7ba000b
-d7ffd71c0001d7f1000cd72b000bd7cd000bd715000dd7e40011d7ffd718000ad7ba0009
-d7bb000ad7ffd71e0001d7ed000dd72b000bd7cf000bd715000dd7e10012d7ffd718000a
-d7bb0009d7bc000ad7ffd7ffd70c000dd72b000bd7d1000ad716000dd7df0011d7ffd71a
-0009d7bc0009d7bc000bd7ffd7ffd70a000cd72d000ad7d3000ad716000dd7dc0011d7ff
-d71b000ad7bc0009d7bd000bd7ffd7ffd708000cd72d000ad7d5000ad716000dd7d90011
-d7ffd71c000ad7bd0009d7be000ad7ffd7210001d7e3000cd72d000ad7d7000ad716000e
-d7d50011d7ffd71e0009d7be0009d7be000bd7ffd7220001d7df000dd72d000ad7d9000a
-d716000ed7d30011d7ffd71e0009d7bf0009d7bf000bd7ffd7ffd702000dd72d000ad7da
-000bd717000dd7d00011d7ffd71f000ad7bf0009d7c0000bd7ffd7ffd700000cd72e000b
-d7db000bd717000dd7cd0011d7ffd720000ad7c00009d7c1000ad7ffd7ff000cd72e000b
-d7dd000bd717000dd7ca0011d7ffd7220009d7c10009d7c1000bd7ffd7250001d7d5000c
-d72e000bd7df000bd717000ed7c60011d7ffd723000ad7c10009d7c2000bd7ffd7260001
-d7d1000dd72e000bd7e1000bd717000ed7c40011d7ffd723000ad7c20009d7c3000bd7ff
-d7f8000dd72e000bd7e3000bd717000ed7c10011d7ffd7250009d7c30009d7c4000ad7ff
-d7f7000dd72e000bd7e5000bd718000dd7be0011d7ffd7260009d7c40009d7c4000bd7ff
-d7290000d7ca000cd72f000bd7e7000bd718000dd7bb0011d7ffd727000ad7c40009d7c5
-000bd7ffd7290001d7c7000cd72f000bd7e9000bd718000ed7b70012d7ffd7280009d7c5
-0009d7c6000ad7ffd72b0000d7c4000dd72f000bd7eb000bd718000ed7b50011d7ffd729
-0009d7c60009d7c7000ad7ffd7ef000dd72f000bd7ed000bd718000ed7b20011d7ffd72a
-000ad7c60009d7c7000bd7ffd7ed000dd72f000bd7ef000bd719000dd7af0011d7ffd72b
-000ad7c70009d7c8000bd7ffd72d0000d7bc000dd72f000bd7f1000bd719000dd7ac0011
-d7ffd72d0009d7c80009d7c9000ad7ffd72e0001d7b9000dd72f000bd7f3000bd719000e
-d7a80012d7ffd72d0009d7c90009d7c9000bd7ffd72f0000d7b6000dd730000bd7f5000b
-d719000ed7a60011d7ffd72e000ad7c90009d7ca000bd7ffd7e5000dd730000bd7f7000b
-d719000ed7a30011d78b0002d7a10009d7ca0009d7cb000bd7ffd7e3000dd730000bd7f8
-000cd71a000dd7a00011d78d0002d70c0004d78e0009d7cb0009d7cc000ad7ffd7320001
-d7ad000dd730000bd7fa000cd71a000ed79c0011d775000dd70a0002d709000cd789000a
-d7cb0009d7cc000bd7ffd7330001d7a9000ed730000bd7fc000cd71a000ed79a0011d776
-000dd70a0002d707000fd787000ad7cc0009d7cd000bd7ffd7340000d7a7000ed730000b
-d7fe000cd71a000ed7970011d77c0006d70d0002d7060004d7080003d7860009d7cd0009
-d7ce000bd7ffd7db000ed730000bd7ffd700000cd71a000fd7930011d77e0005d70d0002
-d7060004d70a0003d7840009d7ce0009d7cf000ad7ffd7d9000ed731000bd7ffd702000c
-d71b000ed7900011d7810004d70d0002d7050004d70c0003d782000ad7ce0009d7cf000b
-d7ffd7370001d79d000ed731000bd7ffd704000cd71b000ed78d0012d7820004d70d0001
-d7060004d70c0004d7810009d7cf0009d7d0000bd7ffd7380001d79a000ed731000bd7ff
-d706000cd71b000fd78a0011d7840004d70c0002d7050004d70e0004d77f0009d7d00009
-d7d1000ad7ffd7d3000fd731000bd7ffd708000dd71a000fd7870011d7860004d70c0002
-d7050004d70e0004d77e000ad7d00009d7d2000ad7ffd7d1000fd730000cd7ffd70a000d
-d71b000fd7830011d7880004d70c0001d7050004d7100004d77d0009d7d10009d7d2000b
-d7ffd7ce000fd731000cd7ffd70c000dd71b000fd7800011d78a0004d70b0002d7050004
-d7100004d77c0009d7d20009d7d3000bd7ffd73b0001d78e000fd731000cd7ffd70e000d
-d71b000fd77d0012d78b0004d70b0002d7050004d7100004d77b000ad7d20009d7d4000a
-d7b30002d7860001d78b000fd731000cd7ffd710000dd71c000fd77a0011d78d0004d70b
-0001d7050004d7110005d779000ad7d30009d7d4000bd763000ed73d0005d7ffd711000f
-d732000cd7ffd712000dd71c000fd7770011d78f0004d70a0002d7050004d7110005d779
-0009d7d40009d7d5000bd7620013d7380005d7ffd710000fd732000cd7ffd714000dd71d
-000ed7740011d7910004d70a0001d7060004d7110005d7780009d7d50009d7d6000bd764
-0011d7370005d78b0000d782000ed733000cd7ffd717000dd71c000fd7700012d7920004
-d70a0001d7050005d7110006d776000ad7d50009d7d7000ad7650005d7050005d7360005
-d78c0001d77e000fd732000cd7ffd71a000dd71d000ed76e0011d7940004d7090002d705
-0005d7120005d7760009d7d60009d7d7000bd7650004d7060005d7370002d78f0001d77b
-000ed733000cd7ffd71c000dd71d000ed76b0011d7960004d7090001d7060005d7120005
-d7750009d7d70009d7d8000bd7640004d7070005d7ffd746000ed733000cd7ffd71e000d
-d71d000fd7670011d7980004d7080002d7070004d7120004d775000ad7d70009d7d9000b
-d7630004d7080005d7ffd743000fd733000cd7ffd720000dd71e000ed7640011d79a0004
-d7080002d7070004d7110005d774000ad7d80009d7da000ad7630004d7080005d7ce0001
-d771000ed734000cd7ffd722000dd71e000fd7600012d79b0004d7080001d7080004d711
-0005d7740009d7d90009d7da000bd7620004d7080005d7d00001d76d000fd734000cd7ff
-d724000dd71f000ed75e0011d79d0004d7070002d7080004d7110004d7740009d7da0009
-d7db000bd7610004d7080005d7ffd73f000ed735000cd7ffd727000dd71e000fd75a0011
-d79f0004d7070001d7090005d7100004d773000ad7da0009d7dc000ad7610004d7080005
-d70b0007d70c0007d70d0002d70a0007d70c0002d7020005d7d7000fd734000cd7ffd72a
-000dd71f000fd7560011d7a10004d7070001d7090005d7100004d7730009d7db0009d7dd
-000ad7600004d7070006d70a000ad709000fd7030005d709000ad7070005d7010007d7d4
-000fd735000cd7ffd72c000dd71f000fd7530011d7a30004d7060002d70a0004d7100003
-d7730009d7dc0009d7dd000bd75f0004d7070005d70a0003d7010006d7070003d7030009
-d7000007d7080004d7010005d7040007d7000009d76e0001d761000fd735000cd7ffd72e
-000dd71f0010d74f0012d7a40004d7060001d70c0004d70e0004d772000ad7dc0009d7de
-000bd75e0004d7060005d70a0003d7040004d7060003d7050006d7020007d7070003d705
-0004d7030013d76f0001d75d0010d735000cd7ffd730000dd720000fd74d0011d7a60004
-d7060001d70d0003d70e0003d7730009d7dd0009d7df000ad75e0004d7040006d70a0003
-d7060003d7050003d7060004d7070004d7060004d7050004d7060005d7050004d7ce000f
-d736000cd7ffd732000ed71f0010d7490011d7a80004d7050002d70d0004d70c0003d773
-0009d7de0009d7df000bd75d000fd70b0002d7070004d7040003d7070003d7070004d705
-0004d7070004d7050004d7060004d7cc0010d735000dd7ffd734000ed720000fd7460011
-d7a90005d7050001d70f0004d70a0004d7720009d7df0009d7e0000bd75c000dd70c0003
-d7070004d7040003d7070004d7060004d7050004d7070004d7050004d7060004d7cb000f
-d736000dd7ffd737000dd7200010d7420012d7aa0005d7050001d7100004d7080004d772
-000ad7df0009d7e1000bd75b000dd70c0011d7020004d7070004d7060004d7050003d709
-0004d7040004d7070003d7760001d7500010d736000cd7ffd73a000dd721000fd7400011
-d7ab0008d7020001d7120007d7000007d7730009d7e00009d7e2000ad75b0004d7020006
-d70b0011d7020004d7070004d7060004d7040004d7090004d7040004d7070003d7780001
-d74d000fd737000cd7ffd73c000dd7210010d73c0011d7aa000dd7000001d714000cd774
-0009d7e10009d7e2000bd75a0004d7030005d70b0003d7110004d7060004d7060004d704
-0004d7090004d7040004d7070003d7c6000fd738000cd7ffd73e000ed7210010d7380011
-d7ffd753000ad7e10009d7e3000bd7590004d7030006d70a0003d7110004d7060003d707
-0004d7040004d7090005d7030004d7070003d7c40010d737000dd7ffd740000ed7210010
-d7350011d7ffd7550009d7e20009d7e4000bd7580004d7040006d7090003d7120003d705
-0003d7080004d7040004d7090005d7030004d7070003d77e0000d743000fd738000dd7ff
-d743000dd7220010d7310012d7ffd7550009d7e30009d7e5000ad7580004d7050005d709
-0003d7120004d7040002d7090004d7040004d7090005d7030004d7070003d77f0001d73f
-0010d738000cd7ffd746000dd7220010d72f0011d7ffd7560009d7e40009d7e5000bd757
-0004d7060005d7080003d70b0000d706000ad70a0004d7040005d7080004d7040004d707
-0003d7810000d73d000fd739000cd7ffd748000dd7230010d72b0011d7ffd757000ad7e4
-0009d7e6000bd7560004d7060005d7080004d70a0001d7050009d70b0004d7040005d708
-0004d7040004d7070003d7be0010d739000cd7ffd74a000ed7220010d7280011d7ffd759
-0009d7e50009d7e7000ad7560004d7070005d7070005d7090001d7040002d7130004d704
-0005d7080004d7040004d7070003d7bd000fd739000dd7ffd74d000dd7230010d7240011
-d7ffd75a0009d7e60009d7e8000ad7550004d7080005d7060005d7080002d7040002d713
-0004d7040005d7080003d7050004d7070003d7860000d7330010d739000cd7ffd750000d
-d7230011d7200012d7ffd75a000ad7e60009d7e8000bd7540004d7090005d7060007d703
-0003d7040004d7120004d7050005d7070003d7050004d7070003d7870001d72f0010d73a
-000cd7ffd752000dd7240010d71e0011d7ffd75c0009d7e70009d7e9000bd7530004d70a
-0005d705000ed7040010d7070004d7060005d7050003d7060004d7070003d7890001d72c
-000fd73b000cd7ffd754000dd7240011d71a0011d7ffd75d0009d7e80009d7ea000ad752
-0006d7090007d704000cd7050012d7050005d7070004d7020004d7060005d7060005d7b5
-0010d73b000cd7ffd757000dd7240010d7170011d7ffd75e0009d7e90009d7ea000bd74d
-000dd7070009d7030009d7070012d701000ad7070009d705000ad7010009d7b2000fd73b
-000cd7ffd75a000dd7240011d7130012d7ffd75e000ad7e90009d7eb000bd74c000dd708
-0008d7040007d70a0011d700000ad7080005d708000ad7010009d78c0001d7210010d73b
-000cd7ffd75c000dd7250011d7100011d7ffd7600009d7ea0009d7ec000bd7810002d70c
-0003d7c90001d71d0010d73c000cd7ffd75e000dd7250011d70d0011d7ffd7610009d7eb
-0009d7ed000ad7800002d70e0002d7e80010d73c000cd7ffd761000dd7250011d7090011
-d7ffd762000ad7eb0009d7ed000bd77f0002d70e0002d7e60010d73c000cd7ffd764000d
-d7260010d7060011d7ffd7640009d7ec0009d7ee000bd77d0004d70c0002d7e6000fd73d
-000cd7ffd766000dd7260011d7020012d7ffd7640009d7ed0009d7ef000bd77c0005d70a
-0002d7d10001d7110010d73d000cd7ffd768000ed7260023d7ffd765000ad7ed0009d7f0
-000ad77c0012d7d40001d70d0010d73d000dd7ffd76b000dd727001fd7ffd7670009d7ee
-0009d7f0000bd77c0011d7e30010d73d000cd7ffd76e000dd727001cd7ffd7680009d7ef
-0009d7f1000bd77d000cd7e40010d73e000cd7ffd770000ed7270019d7ffd7680009d7f0
-0009d7f2000ad77f0008d7e5000fd73e000dd7ffd773000dd7280015d7ffd769000ad7f0
-0009d7f3000ad7ffd76b0010d73e000dd7ffd775000ed7270012d7ffd76b0009d7f10009
-d7f3000bd7ffd7680010d73e000dd7ffd778000ed7280010d7ffd76a0009d7f20009d7f4
-000bd7ffd7660010d73e000dd7ffd77b000dd7290010d7ffd767000ad7f20009d7f5000a
-d7ffd7640010d73f000dd7ffd77d000ed7260013d7ffd7650009d7f30009d7f5000bd7ff
-d7610010d73f000dd7ffd780000ed7250015d7ffd7620009d7f40009d7f6000bd7ffd75e
-0011d73f000dd7ffd783000dd7240017d7ffd75f0009d7f50009d7f7000bd7ffd75b0011
-d740000dd7ffd785000ed7220019d7ffd75c000ad7f50009d7f8000ad7ffd7590012d73f
-000dd7ffd788000ed721001bd7ffd75a0009d7f60009d7f8000bd7ffd7560012d740000d
-d7ffd78b000dd7200008d7010012d7ffd7570009d747000ed7a00009d7f9000bd7ffd753
-0012d741000dd7ffd78d000ed71e0008d7020012d7ffd755000ad7470012d79c0009d7fa
-000ad7ffd7520012d740000ed7ffd78f000ed71d0008d7040012d7ffd7530009d74b0011
-d79a0009d7fb000ad7ffd74f0012d741000dd7ffd793000ed71b0008d7060012d7ffd750
-0009d74c0005d7050006d7210001d7750009d7fb000bd7ffd74c0012d741000ed7ffd795
-000ed71a0008d7080012d7ffd74d0009d74e0004d7060005d7210001d7750009d7fc000b
-d7ffd7490012d7020000d73e000ed7ffd797000fd7180008d70a0012d7ffd74b0009d74e
-0004d7070005d7200001d7750009d7fd000ad7ffd7470012d7040000d73c000ed7ffd79b
-000fd7160008d70c0012d7ffd7480009d74f0004d7080005d71e0002d7750009d7fd000b
-d7ffd7440012d7060000d73a000fd7ffd79d000fd7150008d70d0013d7ffd7450009d750
-0004d7080005d71d0003d7750009d7fe000bd7ffd7410013d7070000d739000fd7ffd79f
-0010d7130008d70f0013d7ffd742000ad7500004d7080005d71d0003d7750009d7ff000b
-d7ffd73e0013d7090000d737000fd7ffd7a3000fd7120008d7110013d7ffd7400009d751
-0004d7080005d71c0004d7750009d7ffd700000ad7ffd73c0013d743000fd7ffd7a50010
-d7100008d7130013d7ffd73d0009d7520004d7080005d70b0007d706000bd7050008d761
-0009d7ffd700000bd7ffd7390013d7430010d7ffd7a8000fd70f0008d7150013d7ffd73a
-0009d7530004d7080005d708000cd703000cd704000ad7600009d7ffd701000bd7ffd736
-0013d744000fd7ffd7ab0010d70d0008d7160014d7ffd7380009d7530004d7070005d709
-0003d7030004d7060004d7090002d7020005d75f0009d7ffd702000bd7ffd7330014d743
-0010d7ffd7ae000fd70c0008d7180014d7ffd7350009d7540004d7060005d7090003d705
-0004d7050004d7070003d7040005d75e0009d7ffd703000ad7ffd7310014d7120000d730
-000fd7ffd7b2000fd70a0008d71a0014d7ffd7320009d7550004d7030008d7090003d705
-0004d7050004d7060003d7060004d75e0009d7ffd703000bd7ffd72e0014d7140000d72e
-000fd7ffd7b50010d7080008d71c0014d7ffd72f000ad755000ed70c0003d7060003d705
-0004d7060003d7070004d75d0009d7ffd704000bd7ffd72b0014d7160000d72c0010d7ff
-d7b8000fd7070009d71d0014d7ffd72d0009d756000dd70d0003d7060003d7050004d706
-0002d7080004d75d0009d7ffd705000ad7ffd7290014d7180000d72b000fd7ffd7bb0010
-d7050009d71f0014d7ffd72a0009d757000dd70d0003d7050004d7050004d7060010d75d
-0009d7ffd706000ad7ffd7260014d7450010d7ffd7be000fd7040009d7210014d7ffd727
-000ad7570004d7020006d7130007d7050004d7050011d75d0009d7ffd706000bd7ffd723
-0014d746000fd7ffd7c10010d7020009d7230014d7ffd7250009d7580004d7030005d711
-0009d7050004d7050003d76b0009d7ffd707000bd7ffd7200014d7460010d7ffd7c4000f
-d7010009d7250014d7ffd7220009d7590004d7030006d70f0005d7000003d7050004d705
-0004d76a0009d7ffd708000ad7ffd71e0014d747000fd7ffd7c7001ad7270014d7ffd71f
-0009d75a0004d7040006d70c0004d7030003d7050004d7050004d76a0009d7ffd708000b
-d7ffd71b0014d7470010d7ffd7ca0018d7290014d7ffd71d0009d75a0004d7050005d70b
-0003d7050003d7050004d7050004d76a0009d7ffd709000bd7ffd7180014d7240000d721
-0010d7ffd7ce0016d72b0014d7ffd71a0009d75b0004d7060005d7090003d7060003d705
-0004d7050004d70b0000d75d0009d7ffd70a000bd7ffd7150014d7260000d720000fd7ff
-d7d10015d72d0014d7ffd7170009d75c0004d7060005d7080004d7060003d7050004d705
-0005d7090001d75d0009d7ffd70b000ad7ffd7130014d7280000d71e0010d7ffd7d40013
-d7300013d7ffd714000ad75c0004d7070006d7060003d7070003d7050004d7060005d708
-0001d75d0009d7ffd70b000bd7ffd7100013d72b0000d71d000fd7ffd7d70012d7320013
-d7ffd7120009d75d0004d7080006d7050004d7050004d7050004d7060006d7060002d75d
-0009d7ffd70c000bd7ffd70d0013d74a0010d7ffd7da0010d7340013d7ffd70f0009d75e
-0004d7090005d7050004d7040005d7020000d7010004d7030001d7000007d7040002d75e
-0009d7ffd70d000bd7ffd70a0013d74a0010d7ffd7dd0010d7350013d7ffd70c0009d75f
-0004d70a0005d7040006d701000ad7010005d7000002d702000ed75e0009d7ffd70e000a
-d7ffd7080013d74b0010d7ffd7e00010d7350014d7ffd7090009d75e0006d7090007d702
-000ad7000007d7010009d703000cd75f0009d7ffd70e000bd7ffd7040014d74b0010d7ff
-d7e4000fd7360014d7ffd7060009d75c000cd7070009d7000008d7010006d7030007d705
-0009d7610009d7ffd70f000bd7ffd7010014d74c000fd7ffd7e70010d7360014d7ffd703
-0009d75d000cd7080008d7020005d7020004d7060005d7080006d7620009d7ffd710000a
-d7ff0014d7370000d7130010d7ffd7e90011d7360015d7ff000ad7ffd70d0009d7ffd711
-000ad7fb0015d7390000d7110010d7ffd7eb0012d7380014d7fd0009d7ffd70e0009d7ff
-d711000bd7f80014d73c0000d7100010d7ffd7ec0014d7380014d7fa0009d7ffd70f0009
-d7ffd712000bd7f50014d73e0000d70e0010d7ffd7ee0015d7390014d7f70009d7ffd710
-0009d7ffd713000ad7f30014d74f000fd7ffd7f70010d7390015d7f40009d7ffd7100009
-d7ffd713000bd7ef0015d74f0010d7ffd7fa0010d73a0014d7f10009d7ffd7110009d7ff
-d714000bd7ec0014d7500010d7ffd7fd0010d73b0014d7ee0009d7ffd7120009d7ffd715
-000bd7e90014d7510010d7ffd7ffd7000010d73b0014d7ec0009d7ffd7120009d7ffd716
-000ad7e70014d7510010d7ffd7ffd7040010d73c0014d7e80009d7ffd7130009d7ffd716
-000bd7e30014d74c0000d7040010d7ffd7ffd7070011d73c0014d7e50009d7ffd7140009
-d7ffd717000bd7e00014d74e0000d7020011d7ffd7ffd70a0011d73c0015d7e10009d7ff
-d7150009d7ffd718000bd7dc0015d7500000d7000011d7ffd7ffd70d0012d73c0015d7df
-0009d7ffd7150009d7ffd719000ad7da0015d7520012d7ffd7ffd7100012d73d0014d7dc
-0009d7ffd7160009d7ffd719000bd7d70014d7530012d7ffd7ffd7140012d73d0015d7d8
-0009d7d80003d73a0009d7ffd71a000bd7d30015d7530012d7ffd7ffd7170012d73e0015
-d7d60009d72c0009d7130009d7820005d7390009d7450002d7140003d7920003d722000a
-d7d10015d7530013d7ffd7ffd71a0012d73e0016d7d20009d72d0009d7130009d7820005
-d7390013d7140009d7190005d7130004d7910004d723000ad7cd0016d7530013d7ffd7ff
-d71e0012d73f0015d7cf0009d7310007d7110007d7850005d7390013d7140009d7170007
-d7130005d7900005d722000bd7ca0015d7540013d7ffd7ffd7220012d73f0016d7cb0009
-d7320007d7110006d74e0001d7360004d7390009d7020007d7120006d71b0007d7130005
-d7900005d723000bd7c60016d7540013d7ffd7ffd7260012d73f0016d7c90009d7330007
-d70f0007d74e0001d7380000d73b0009d7040005d7120006d71e0004d7090000d7090003
-d7920003d725000ad7c40016d7540013d7ffd7ffd72a0012d73f0016d7c60009d7340007
-d70f0007d74e0001d7750009d7040006d7100006d71f0004d7090000d70a0001d7940001
-d726000bd7c10016d7540013d7ffd7ffd72e0012d7400016d7c20009d7350007d70e0008
-d74d0002d7750009d7040006d7100006d71f0004d7080001d7cb000bd7bd0016d7550013
-d7ffd7ffd7320012d7400016d7c00009d7350008d70d0008d74c0003d7750009d7040007
-d70e0007d71f0004d7080001d7cc000bd7ba0016d7550013d7ffd7ffd7360012d7400017
-d7bc0009d7360008d70c0009d74b0004d7750009d7040007d70e0007d71f0004d7070002
-d7cd000ad7b70017d7560012d7ffd7ffd73a0012d7410017d7b80009d7370002d7000005
-d70b0002d7000005d70c0003d70e0002d7040002d7100002d70b0005d70d0003d70e0002
-d7040002d70c0002d70d0003d7270009d7040008d70c0008d71f0004d7060003d7cd000b
-d7b30017d7570012d7ffd7ffd73e0012d7410017d7b60009d7370002d7000005d70a0003
-d7000005d70a0008d7090004d7030005d70b0008d706000cd7060008d7090004d7030005
-d7080004d7090009d7250009d7040002d7000004d70c0002d7000004d71f0004d7050004
-d70b0001d7090001d7040001d70d0001d7030001d70a0003d7130002d7100001d70e0004
-d7010001d7080004d7010001d7080001d7090001d7050001d7110002d700000bd7b00017
-d7570012d7ffd7ffd7420012d7410018d7b20009d7380002d7010005d7090002d7010005
-d709000ad7060006d7010007d70a000ad705000cd705000ad7060006d7010007d7060006
-d708000bd7240009d7040002d7000005d70a0003d7000004d7040006d7040007d7060004
-d703000bd7040003d7070003d7020006d7080003d7020004d7060009d70b0009d7090008
-d709000ad706000ad7060003d7070003d7030005d70c0013d7ac0018d7570012d7ffd7ff
-d7460012d7410019d7ae0009d7390002d7010005d7090002d7010005d7070004d7020005
-d7040007d7000009d7070004d7020005d7070004d7080004d7020005d7040007d7000009
-d7040007d7070003d7030005d7230009d7040002d7010004d70a0002d7010004d7040006
-d7040007d7060004d703000bd7020005d7050005d7010008d7050005d7010006d703000c
-d709000bd707000ad707000bd705000bd7040005d7050005d7010008d7080016d7a90019
-d7570012d7ffd7ffd74a0012d7420019d7aa0009d73a0002d7020004d7080002d7020005
-d7070003d7050004d7030000d7000009d7010005d7060003d7050004d7060004d7080003
-d7050004d7030000d7010008d7010005d7030000d7010004d7060003d7050004d7230009
-d7040002d7010005d7080003d7010004d7070003d7070004d7060004d7060003d7060006
-d7040006d700000ad7030006d7000007d7020003d7040004d7080003d7030004d7060003
-d7030004d7050003d7040003d7040003d7040003d7030006d7040006d700000ad7070003
-d704000ed7a50019d7580012d7ffd7ffd74e0012d742001ad7a70009d73a0002d7020005
-d7070002d7020005d7060003d7060004d7060005d7050004d7050003d7060004d7060004
-d7070003d7060004d7060005d7050004d7060004d7050003d7060004d7230009d7040002
-d7020004d7080002d7020004d7070003d7070004d7060004d7060003d7060000d7000004
-d7040000d7000011d7020000d700000cd7030003d7050004d7060003d7050004d7050001
-d7060004d7040002d7060002d7040002d7060002d7030000d7000004d7040000d7000008
-d7010005d7060003d706000ed7a1001ad7580012d7ffd7ffd7520012d742001ad7a40009
-d73b0002d7030004d7060002d7030005d7050004d7070004d7050004d7060004d7050003
-d7070004d7050004d7060004d7070004d7050004d7060004d7060004d7050003d7060004
-d7230009d7040002d7020005d7060003d7020004d7070003d7070004d7060004d7060003
-d7090003d7070006d7030005d7050005d7010003d7020003d7060005d7040003d7060004
-d7040002d7070004d7020003d7060002d7030003d7060002d7060003d7070005d7040005
-d7050003d706000ed79f001ad7580012d7ffd7ffd7560012d742001bd7a00009d73c0002
-d7030005d7050002d7030005d7050003d7080005d7040004d7070003d7040004d7070005
-d7040004d7060003d7080005d7040004d7070003d7060004d7050003d7070003d7230009
-d7040002d7030004d7060002d7030004d7070003d7070004d7060004d7060003d7090003
-d7070004d7060005d7040004d7080004d7070004d7040003d7060004d7040002d7070004
-d7020003d7070001d7030003d7070001d7060003d7070003d7070004d7040004d706000f
-d79b001bd7580012d7ffd7ffd75a0012d743001bd79d0009d73c0002d7040004d7040002
-d7040005d7050003d7090004d7040004d7070003d7040004d7080004d7040004d7060003
-d7090004d7040004d7070003d7060004d7050003d72f0009d7040002d7030005d7040003
-d7030004d7070003d7070004d7060004d7060003d7090003d7070003d7080004d7040003
-d7090003d7080005d7020004d7070003d7030003d7070004d7020004d7060001d7030004
-d7060001d7060003d7070003d7070004d7040004d707000fd797001bd7590012d7ffd7ff
-d75e0012d744001bd7990009d73d0002d7040004d7040002d7040005d7040004d7090004
-d7040004d7070003d7030005d7080004d7040004d7050004d7090004d7040004d7070003
-d7060004d7040004d72f0009d7040002d7040004d7040002d7040004d7070003d7070004
-d7060004d7060003d7090003d7070003d7080004d7040003d7080004d7090004d7020003
-d7100010d7030006d7030001d7040006d7030001d7060003d7070003d7070004d7040004
-d7070003d700000bd793001bd75a0012d7ffd7ffd7620012d744001bd7960009d73e0002
-d7050004d7020002d7050005d7040004d7090004d7040004d7070003d7030005d7080004
-d7040004d7050004d7090004d7040004d7070003d7060004d7040004d72f0009d7040002
-d7040005d7020003d7040004d7070003d7070004d7060004d7060003d7090003d7070003
-d7080004d7040003d7080004d7090004d7020003d7100011d7020008d7080008d70a0003
-d7070003d7070004d7040004d7070003d701000ad791001bd75a0012d7ffd7ffd7660012
-d745001bd7920009d73f0002d7050004d7020002d7050005d7040004d7090005d7030004
-d7070003d7030005d7080005d7030004d7050004d7090005d7030004d7070003d7060004
-d7040004d72f0009d7040002d7050004d7020002d7050004d7070003d7070004d7060004
-d7060003d7090003d7070003d7090004d7030003d7080004d7090004d7020003d7100003
-d7110009d7070009d7080003d7070003d7070004d7040004d7070003d701000bd78d001b
-d75b0012d7ffd7ffd76a0012d746001bd78f0009d73f0002d7060004d7000002d7060005
-d7040004d7090005d7030004d7070003d7030005d7090004d7030004d7050004d70a0004
-d7030004d7070003d7060004d7040004d72f0009d7040002d7050005d7000003d7050004
-d7070003d7070004d7060004d7060003d7090003d7070003d7090004d7030003d7080004
-d7090005d7010003d70f0004d7120009d7070009d7070003d7070003d7070004d7050003
-d7060004d702000bd789001bd75c0012d7ffd7ffd76e0012d747001bd78b0009d7400002
-d7060004d7000002d7060005d7040004d7090005d7030004d7070003d7030005d7090004
-d7030004d7050004d70a0004d7030004d7070003d7060004d7040004d72f0009d7040002
-d7060004d7000002d7060004d7070003d7070004d7060004d7060003d7090003d7070003
-d7090004d7030003d7080004d7090005d7010003d70f0004d7150006d70a0006d7070003
-d7070003d7070004d7060003d7050003d704000bd785001bd75d0012d7ffd7ffd7720012
-d748001bd7870009d7410002d7070006d7070005d7040005d7080004d7040004d7070003
-d7030005d7090003d7040004d7050005d7090003d7040004d7070003d7060004d7040004
-d70b0000d7220009d7040002d7060008d7060004d7070003d7070004d7060004d7060003
-d7090003d7070003d7090003d7040003d7080004d7090005d7010004d70f0003d7160006
-d70a0006d7060003d7070003d7070004d7060004d7030003d706000ad782001bd75e0012
-d7ffd7ffd7760012d748001cd7840009d7410002d7070006d7070005d7050004d7080004
-d7040004d7070003d7040004d7090003d7040004d7060004d7090003d7040004d7070003
-d7060004d7040004d70a0001d7220009d7040002d7070006d7070004d7070003d7070004
-d7060004d7060003d7090003d7070003d7090003d7040003d7080005d7080004d7020004
-d70b0000d7020003d70b0001d70a0005d70b0005d7050003d7070003d7070004d707000a
-d707000bd77e001cd75e0012d7ffd7ffd77a0012d749001cd7800009d7420002d7080004
-d7080005d7050004d7080004d7040004d7070003d7040004d7090003d7040004d7060004
-d7090003d7040004d7070003d7060004d7050004d7090001d7220009d7040002d7070006
-d7070004d7070003d7070004d7060004d7060003d7090003d7070003d7090003d7040003
-d7080005d7080004d7020004d70a0001d7020004d7090002d7010001d7070004d7020001
-d7070004d7050003d7070003d7070004d7070007d70b000bd77a001cd75f0012d7ffd7ff
-d77e0012d74a001cd77c0009d7430002d7080004d7080005d7050005d7070003d7050004
-d7070003d7050004d7070004d7040004d7060005d7070004d7040004d7070003d7060004
-d7050005d7060002d7230009d7040002d7080004d7080004d7070003d7070004d7060004
-d7060003d7090003d7070003d7090003d7040003d7080005d7080003d7030005d7080002
-d7020005d7080001d7020001d7080003d7020001d7080003d7050003d7070003d7070004
-d7050003d712000bd776001cd7600012d7ffd7ffd7820012d74b001cd7780009d7440002
-d7090002d7090005d7050005d7070003d7050004d7070003d7050004d7070003d7050004
-d7020002d7000005d7070003d7050004d7070003d7060004d7050008d7020003d7230009
-d7040002d7080004d7080004d7070004d7060004d7060004d7060004d7080003d7070003
-d7090002d7050003d7090005d7070003d7030006d7060002d7030006d7060002d7020002
-d7070003d7020002d7070003d7050003d7070003d7070004d7050002d714000ad772001d
-d7610012d7ffd7ffd7860012d74b001dd7750009d7440002d7090002d7090005d7060005
-d7050003d7060004d7070004d7040005d7050003d7060009d7020005d7050003d7060004
-d7070004d7050004d707000cd7240009d7040002d7090002d7090005d7060005d7030006
-d7060004d7060004d7020001d7030003d7070004d7070003d7050004d7080005d7060004
-d7040008d7010004d7040008d7010004d7020003d7060003d7020003d7060003d7050003
-d7070003d7070004d704000cd70b000bd76e001ed7600013d7ffd7ffd78a0013d74b001d
-d7710009d7430006d7080000d7090007d7070006d7000004d7060006d7050005d7060006
-d7010003d7080008d7040006d7010003d7060006d7050005d7040006d707000ad7250009
-d7030003d7090002d7090005d7060013d7030004d7060009d7030004d7060005d7050003
-d7060004d7090005d7050003d707000cd706000dd7030003d7050003d7030003d7050003
-d7060004d7060003d7070004d7040011d707000bd76a001ed7610013d7ffd7ffd78e0013
-d74c001dd76d0009d742000ad7060000d706000dd7060009d705000ad701000ad7050009
-d7090006d7080009d705000ad7010015d7060008d7260009d7020006d7080000d7080008
-d7060009d7000007d7020006d7050008d7030006d7050006d7020003d7060007d70a0006
-d7000004d709000ad708000bd7040006d7010003d7040006d7010003d7060006d7030006
-d7050006d7030012d707000ad767001ed7620013d7ffd7ffd7920013d74d001dd76a0009
-d7720005d7280004d70e0003d70a0005d7340003d7290015d7060000d706000dd7040007
-d7010005d702000ad7040006d702000ad703000cd706000ad709000ad70b0008d70b0008
-d705000bd705000bd705000ad7000009d701000ad7020012d707000ad763001ed7620014
-d7ffd7ffd7960013d74e001dd7660009d7ffd72e0009d72e0005d7020003d7160003d712
-0003d7010004d71f0005d7100003d70f0004d7080001d7010006d7060001d7010006d72c
-0002d704000ad707000bd75f001ed7630014d7ffd7ffd79a0013d74f001dd7620009d7ff
-d72f0009d7690003d7a80002d70e0001d708000bd75b001ed7640014d7ffd7ffd79e0014
-d74f001ed75e0008d7ffd7300009d7690003d7a80002d70e0001d709000ad757001fd765
-0014d7ffd7ffd7a20014d750001ed75a0009d7ffd7300009d7690003d7a70002d70e0002
-d709000bd753001fd7650015d7ffd7ffd7a60014d752001ed7550009d7ffd7310009d769
-0003d7a70003d70d0001d70b000bd74f001ed7670014d7ffd7ffd7ac0013d753001ed751
-0009d7ffd7320009d7690003d7a70006d7070004d70c000bd74a001fd7680014d7ffd7ff
-d7b00013d754001fd74d0009d7ffd7320009d7690003d7a70012d70e000ad747001fd769
-0014d7ffd7ffd7b40014d754001fd7490009d7ffd7330009d7680005d7a7000fd710000b
-d743001fd7690014d7ffd7ffd7b90014d755001fd7450009d7ffd7340009d765000ad7a7
-000cd712000bd73e0020d76a0014d7ffd7ffd7bd0015d7550020d7410008d7ffd7350009
-d765000ad7ab0004d717000bd73a0020d76a0015d7ffd7ffd7c20014d7560020d73d0009
-d7ffd7350009d7ffd73a000ad7370020d76b0015d7ffd7ffd7c60015d7570020d7380009
-d7ffd7360009d7ffd73a000bd7320020d76d0014d7ffd7ffd7cb0015d7580020d7340009
-d7ffd7370009d7ffd73b000bd72e0020d76d0015d7ffd7ffd7cf0016d7590020d7300009
-d7ffd7370009d7ffd73c000ad72a0020d76f0015d7ffd7ffd7d30016d75a0020d72c0009
-d7ffd7380009d7ffd73d000ad7250021d76f0016d7ffd7ffd7d80016d75b0020d7270009
-d7ffd7390009d7ffd73d000bd7210020d7710015d7ffd7ffd7dd0016d75c0020d7240009
-d7ffd7390009d7ffd73e000bd71c0020d7720016d7ffd7ffd7e10017d75c0021d71f0009
-d7ffd73a0009d7ffd73f000ad7180021d7730016d7ffd7ffd7e60016d75e0021d71a0009
-d7ffd73b0009d7ffd73f000bd7140020d7750016d7ffd7ffd7ea0017d75e0021d7170008
-d7ffd73c0009d7ffd740000bd70f0021d7750016d7ffd7ffd7ef0017d7600021d7120009
-d7ffd73c0009d7ffd741000bd70b0020d7770016d7ffd7ffd7f40017d7610020d70e0009
-d7ffd73d0009d7ffd742000ad7070021d7770017d7ffd7ffd7f80018d7620020d7090009
-d7ffd73e0009d7ffd742000bd7020021d7780017d7ffd7ffd7fd0018d7640020d7050009
-d7ffd73e0009d7ffd743002bd77a0017d7ffd7ffd7ffd7020018d7650020d7000009d7ff
-d73f0009d7ffd7440026d77b0018d7ffd7ffd7ffd7060019d7660026d7ffd7400009d7ff
-d7450021d77c0019d7ffd7ffd7ffd70a0019d7680021d7ffd7410009d7ffd7400022d77d
-0019d7ffd7ffd7ffd7100019d7690022d7ffd73c0009d7ffd73c0022d77e001ad7ffd7ff
-d7ffd714001ad76a0022d7ffd7380009d7ffd7380022d780001ad7ffd7ffd7ffd718001a
-d76c0022d7ffd7340009d7ffd7330023d781001bd7ffd7ffd7ffd71d001ad76d0023d7ff
-d72f0009d7ffd72f0023d782001bd7ffd7ffd7ffd723001ad76e0023d7ffd72b0009d7ff
-d72b0026d780001bd7ffd7ffd7ffd728001ad7700024d7ffd7260009d7ffd726002bd77e
-001ad7ffd7ffd7ffd72e001ad76e0028d7ffd7210009d7ffd7210024d7010009d77b001b
-d7ffd7ffd7ffd733001ad76b002dd7ffd71c0009d7ffd71c0025d7050009d778001bd7ff
-d7ffd7ffd739001ad7680008d7030025d7ffd7170009d7ffd7170025d70a0009d775001b
-d7ffd7ffd7ffd73f001ad7650008d7070027d7ffd7110009d7ffd7110027d70e0009d772
-001bd7ffd7ffd7ffd744001cd7610008d70b0028d7ffd70c0009d7ffd70c0028d7120009
-d76f001bd7ffd7ffd7ffd74a001cd75e0008d7100028d7ffd7070009d7ffd7070028d717
-0009d76c001bd7ffd7ffd7ffd750001cd75b0008d7140029d7ffd7020009d7ffd7020029
-d71b0009d769001bd7ffd7ffd7ffd756001cd7580008d719002ad7fc0009d7fc002ad720
-0009d765001dd7ffd7ffd7ffd75a001dd7550008d71e002bd7f60009d7f6002bd7250009
-d762001dd7ffd7ffd7ffd760001dd7520008d723002cd7f00009d7f0002cd72a0009d75f
-001dd7ffd7ffd7ffd766001ed74e0008d728002dd7ea0009d7ea002dd72f0009d75c001d
-d7ffd7ffd7ffd76c001ed74b0008d72e002dd7e40009d7e4002dd7350009d759001dd7ff
-d7ffd7ffd772001ed7480008d733002ed7de0009d7de002ed73a0009d756001dd7ffd7ff
-d7ffd778001ed7450008d738002fd7d80009d7d8002fd73f0009d753001dd7ffd7ffd7ff
-d77e001fd7410008d73d0031d7d10009d7d10031d7440009d74f001ed7ffd7ffd7ffd784
-001fd73e0008d7430033d7c90009d7c90033d74a0009d74c001ed7ffd7ffd7ffd78b001e
-d73b0008d7490036d7c00009d7c00036d7500009d748001fd7ffd7ffd7ffd791001fd737
-0008d74f0038d7b80009d7b80038d7560009d745001fd7ffd7ffd7ffd797001fd7340008
-d755003ad7b00009d7b0003ad75c0009d7410020d7ffd7ffd7ffd79d001fd7310008d75b
-003ed7a60009d7a6003ed7620009d73e0020d7ffd7ffd7ffd7a30020d72d0008d7610043
-d79b0009d79b0043d7680009d73b0020d7ffd7ffd7ffd7a90020d72a0008d7670048d790
-0009d7900048d76e0009d7370021d7ffd7ffd7ffd7af0020d7270008d76d004dd7850009
-d785004dd7740009d7340021d7ffd7ffd7ffd7b60020d7230008d7740051d77a0009d77a
-0051d77b0009d7300021d7ffd7ffd7ffd7bd0020d7200008d77b0055d76f0009d76f0055
-d7820009d72d0021d7ffd7ffd7ffd7c40020d71c0008d7830057d7650009d7650057d78a
-0009d7290021d7ffd7ffd7ffd7cb0021d7180008d78a005bd75a0009d75a005bd7910009
-d7250022d7ffd7ffd7ffd7d20021d7140008d7910065d7490009d7490065d7980009d721
-0022d7ffd7ffd7ffd7da0021d7100008d79a0072d7330009d7330072d7a10009d71d0022
-d7ffd7ffd7ffd7e10022d70c0008d7a500ff0041d7ac0009d7190023d7ffd7ffd7ffd7e8
-0022d7080008d7af00ff002dd7b60009d7150023d7ffd7ffd7ffd7ef0023d7040008d7ba
-00ff0017d7c10009d7110024d7ffd7ffd7ffd7f60023d7000008d7c700fdd7ce0009d70d
-0024d7ffd7ffd7ffd7fd002ad7d600dfd7dd0009d7090025d7ffd7ffd7ffd7ffd7040026
-d7e400c3d7eb0009d7050025d7ffd7ffd7ffd7ffd70c0024d7f100a5d7fa0009d7010025
-d7ffd7ffd7ffd7ffd7140025d7fb0087d7ffd709002dd7ffd7ffd7ffd7ffd71c0025d7ff
-d7060069d7ffd7180029d7ffd7ffd7ffd7ffd7230027d7ffd7300009d7ffd7470027d7ff
-d7ffd7ffd7ffd72b0027d7ffd72c0009d7ffd7430027d7ffd7ffd7ffd7ffd7330027d7ff
-d7280009d7ffd73f0027d7ffd7ffd7ffd7ffd73b0028d7ffd7230009d7ffd73a0028d7ff
-d7ffd7ffd7ffd7430028d7ffd71f0009d7ffd7360028d7ffd7ffd7ffd7ffd74b0029d7ff
-d71a0009d7ffd7310029d7ffd7ffd7ffd7ffd7530029d7ffd7160009d7ffd72d0029d7ff
-d7ffd7ffd7ffd75c0029d7ffd7110009d7ffd7280029d7ffd7ffd7ffd7ffd7650029d7ff
-d70d0009d7ffd7240029d7ffd7ffd7ffd7ffd76e0029d7ffd7080009d7ffd71f0029d7ff
-d7ffd7ffd7ffd7780029d7ffd7030009d7ffd71b0029d7ffd7ffd7ffd7ffd7800029d7ff
-0009d7ffd7170029d7ffd7ffd7ffd7ffd7890029d7fa0009d7ffd7120029d7ffd7ffd7ff
-d7ffd7920029d7f60009d7ffd70e0029d7ffd7ffd7ffd7ffd79b002ad7f00009d7ffd708
-002ad7ffd7ffd7ffd7ffd7a5002cd7e90009d7ffd701002cd7ffd7ffd7ffd7ffd7af002e
-d7e20009d7fa002ed7ffd7ffd7ffd7ffd7b90030d7db0009d7f30030d7ffd7ffd7ffd7ff
-d7c40031d7d40009d7ec0031d7ffd7ffd7ffd7ffd7cf0033d7cd0009d7e50033d7ffd7ff
-d7ffd7ffd7d90035d7c60009d7de0035d7ffd7ffd7ffd7ffd7e30037d7bf0009d7d70037
-d7ffd7ffd7ffd7ffd7ee0038d7b80009d7d00038d7ffd7ffd7ffd7ffd7fa0039d7b10009
-d7c90039d7ffd7ffd7ffd7ffd7ffd706003ad7aa0009d7c2003ad7ffd7ffd7ffd7ffd7ff
-d712003bd7a30009d7bb003bd7ffd7ffd7ffd7ffd7ffd71e003ed79a0009d7b2003ed7ff
-d7ffd7ffd7ffd7ffd72a0043d78f0009d7a70043d7ffd7ffd7ffd7ffd7ffd7360047d785
-0009d79c0048d7ffd7ffd7ffd7ffd7ffd742004cd77a0009d791004dd7ffd7ffd7ffd7ff
-d7ffd74f0050d76f0009d7860051d7ffd7ffd7ffd7ffd7ffd75d0054d7640009d77b0055
-d7ffd7ffd7ffd7ffd7ffd76b0058d7590009d7700058d7ffd7ffd7ffd7ffd7ffd77a005c
-d74e0009d765005cd7ffd7ffd7ffd7ffd7ffd7880066d73d0009d7540066d7ffd7ffd7ff
-d7ffd7ffd7980073d7270009d73e0073d7ffd7ffd7ffd7ffd7ffd7ac00ff0042d7ffd7ff
-d7ffd7ffd7ffd7c200ff002dd7ffd7ffd7ffd7ffd7ffd7d700ff0017d7ffd7ffd7ffd7ff
-d7ffd7ef00fdd7ffd7ffd7ffd7ffd7ffd7ffd70b00dfd7ffd7ffd7ffd7ffd7ffd7ffd728
-00c2d7ffd7ffd7ffd7ffd7ffd7ffd74a009cd7ffd7ffd7ffd7ffd7ffd7ffd7730070d7ff
-d7ffd7ffd7ffd7ffd7ffd7ab002cd7ffd7ffd7ffd7ffd7ffd7ffd7ffd7ffd7ffd7ffd75c
-
-%%EndData
-end
-%%PageTrailer
-%%Trailer
-%%BoundingBox: 0 213 495 508
-%%EOF
diff --git a/doc/user/rtemspie.gif b/doc/user/rtemspie.gif
deleted file mode 100644
index 8341861b0d..0000000000
--- a/doc/user/rtemspie.gif
+++ /dev/null
Binary files differ
diff --git a/doc/user/rtemspie.pdf b/doc/user/rtemspie.pdf
deleted file mode 100644
index ad64183eed..0000000000
--- a/doc/user/rtemspie.pdf
+++ /dev/null
Binary files differ
diff --git a/doc/user/rtemspie.png b/doc/user/rtemspie.png
deleted file mode 100644
index f6245ff45f..0000000000
--- a/doc/user/rtemspie.png
+++ /dev/null
Binary files differ
diff --git a/doc/user/rtmon.t b/doc/user/rtmon.t
deleted file mode 100644
index a8c359ea7d..0000000000
--- a/doc/user/rtmon.t
+++ /dev/null
@@ -1,1174 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@c
-@c Open Issues
-@c - nicen up the tables
-@c - use math mode to print formulas
-@c
-
-@chapter Rate Monotonic Manager
-
-@cindex rate mononitonic tasks
-@cindex periodic tasks
-
-@section Introduction
-
-The rate monotonic manager provides facilities to
-implement tasks which execute in a periodic fashion. The
-directives provided by the rate monotonic manager are:
-
-@itemize @bullet
-@item @code{@value{DIRPREFIX}rate_monotonic_create} - Create a rate monotonic period
-@item @code{@value{DIRPREFIX}rate_monotonic_ident} - Get ID of a period
-@item @code{@value{DIRPREFIX}rate_monotonic_cancel} - Cancel a period
-@item @code{@value{DIRPREFIX}rate_monotonic_delete} - Delete a rate monotonic period
-@item @code{@value{DIRPREFIX}rate_monotonic_period} - Conclude current/Start next period
-@item @code{@value{DIRPREFIX}rate_monotonic_get_status} - Obtain status information on period
-@end itemize
-
-@section Background
-
-The rate monotonic manager provides facilities to
-manage the execution of periodic tasks. This manager was
-designed to support application designers who utilize the Rate
-Monotonic Scheduling Algorithm (RMS) to insure that their
-periodic tasks will meet their deadlines, even under transient
-overload conditions. Although designed for hard real-time
-systems, the services provided by the rate monotonic manager may
-be used by any application which requires periodic tasks.
-
-@subsection Rate Monotonic Manager Required Support
-
-A clock tick is required to support the functionality provided by this manager.
-
-@subsection Rate Monotonic Manager Definitions
-
-@cindex periodic task, definition
-
-A periodic task is one which must be executed at a
-regular interval. The interval between successive iterations of
-the task is referred to as its period. Periodic tasks can be
-characterized by the length of their period and execution time.
-The period and execution time of a task can be used to determine
-the processor utilization for that task. Processor utilization
-is the percentage of processor time used and can be calculated
-on a per-task or system-wide basis. Typically, the task's
-worst-case execution time will be less than its period. For
-example, a periodic task's requirements may state that it should
-execute for 10 milliseconds every 100 milliseconds. Although
-the execution time may be the average, worst, or best case, the
-worst-case execution time is more appropriate for use when
-analyzing system behavior under transient overload conditions.
-
-@cindex aperiodic task, definition
-
-In contrast, an aperiodic task executes at irregular
-intervals and has only a soft deadline. In other words, the
-deadlines for aperiodic tasks are not rigid, but adequate
-response times are desirable. For example, an aperiodic task
-may process user input from a terminal.
-
-@cindex sporadic task, definition
-
-Finally, a sporadic task is an aperiodic task with a
-hard deadline and minimum interarrival time. The minimum
-interarrival time is the minimum period of time which exists
-between successive iterations of the task. For example, a
-sporadic task could be used to process the pressing of a fire
-button on a joystick. The mechanical action of the fire button
-insures a minimum time period between successive activations,
-but the missile must be launched by a hard deadline.
-
-@subsection Rate Monotonic Scheduling Algorithm
-
-@cindex Rate Monotonic Scheduling Algorithm, definition
-@cindex RMS Algorithm, definition
-
-The Rate Monotonic Scheduling Algorithm (RMS) is
-important to real-time systems designers because it allows one
-to guarantee that a set of tasks is schedulable. A set of tasks
-is said to be schedulable if all of the tasks can meet their
-deadlines. RMS provides a set of rules which can be used to
-perform a guaranteed schedulability analysis for a task set.
-This analysis determines whether a task set is schedulable under
-worst-case conditions and emphasizes the predictability of the
-system's behavior. It has been proven that:
-
-@itemize @code{ }
-@b{RMS is an optimal static priority algorithm for
-scheduling independent, preemptible, periodic tasks
-on a single processor.}
-@end itemize
-
-RMS is optimal in the sense that if a set of tasks
-can be scheduled by any static priority algorithm, then RMS will
-be able to schedule that task set. RMS bases it schedulability
-analysis on the processor utilization level below which all
-deadlines can be met.
-
-RMS calls for the static assignment of task
-priorities based upon their period. The shorter a task's
-period, the higher its priority. For example, a task with a 1
-millisecond period has higher priority than a task with a 100
-millisecond period. If two tasks have the same period, then RMS
-does not distinguish between the tasks. However, RTEMS
-specifies that when given tasks of equal priority, the task
-which has been ready longest will execute first. RMS's priority
-assignment scheme does not provide one with exact numeric values
-for task priorities. For example, consider the following task
-set and priority assignments:
-
-@ifset use-ascii
-@example
-@group
-+--------------------+---------------------+---------------------+
-| Task | Period | Priority |
-| | (in milliseconds) | |
-+--------------------+---------------------+---------------------+
-| 1 | 100 | Low |
-+--------------------+---------------------+---------------------+
-| 2 | 50 | Medium |
-+--------------------+---------------------+---------------------+
-| 3 | 50 | Medium |
-+--------------------+---------------------+---------------------+
-| 4 | 25 | High |
-+--------------------+---------------------+---------------------+
-@end group
-@end example
-@end ifset
-
-@ifset use-tex
-@sp 1
-@tex
-\centerline{\vbox{\offinterlineskip\halign{
-\vrule\strut#&
-\hbox to 0.75in{\enskip\hfil#\hfil}&
-\vrule#&
-\hbox to 1.25in{\enskip\hfil#\hfil}&
-\vrule#&
-\hbox to 1.25in{\enskip\hfil#\hfil}&
-\vrule#\cr\noalign{\hrule}
-&\bf Task&& \bf Period && \bf Priority &\cr
-& && \bf (in milliseconds) && &\cr\noalign{\hrule}
-& 1 && 100 && Low &\cr\noalign{\hrule}
-& 2 && 50 && Medium &\cr\noalign{\hrule}
-& 3 && 50 && Medium &\cr\noalign{\hrule}
-& 4 && 25 && High &\cr\noalign{\hrule}
-}}\hfil}
-@end tex
-@end ifset
-
-@ifset use-html
-@html
-<CENTER>
- <TABLE COLS=3 WIDTH="80%" BORDER=2>
-<TR><TD ALIGN=center><STRONG>Task</STRONG></TD>
- <TD ALIGN=center><STRONG>Period (in milliseconds)</STRONG></TD>
- <TD ALIGN=center><STRONG>Priority</STRONG></TD></TR>
-<TR><TD ALIGN=center>1</TD>
- <TD ALIGN=center>100 </TD>
- <TD ALIGN=center>Low</TD></TR>
-<TR><TD ALIGN=center>2</TD>
- <TD ALIGN=center>50 </TD>
- <TD ALIGN=center>Medium</TD></TR>
-<TR><TD ALIGN=center>3</TD>
- <TD ALIGN=center>50 </TD>
- <TD ALIGN=center>Medium</TD></TR>
-<TR><TD ALIGN=center>4</TD>
- <TD ALIGN=center>25 </TD>
- <TD ALIGN=center>High</TD></TR>
- </TABLE>
-</CENTER>
-@end html
-@end ifset
-
-RMS only calls for task 1 to have the lowest
-priority, task 4 to have the highest priority, and tasks 2 and 3
-to have an equal priority between that of tasks 1 and 4. The
-actual RTEMS priorities assigned to the tasks must only adhere
-to those guidelines.
-
-Many applications have tasks with both hard and soft
-deadlines. The tasks with hard deadlines are typically referred
-to as the critical task set, with the soft deadline tasks being
-the non-critical task set. The critical task set can be
-scheduled using RMS, with the non-critical tasks not executing
-under transient overload, by simply assigning priorities such
-that the lowest priority critical task (i.e. longest period) has
-a higher priority than the highest priority non-critical task.
-Although RMS may be used to assign priorities to the
-non-critical tasks, it is not necessary. In this instance,
-schedulability is only guaranteed for the critical task set.
-
-@subsection Schedulability Analysis
-
-@cindex RMS schedulability analysis
-
-RMS allows application designers to insure that tasks
-can meet all deadlines, even under transient overload, without
-knowing exactly when any given task will execute by applying
-proven schedulability analysis rules.
-
-@lowersections
-
-@subsection Assumptions
-
-The schedulability analysis rules for RMS were
-developed based on the following assumptions:
-
-
-@itemize @bullet
-@item The requests for all tasks for which hard deadlines
-exist are periodic, with a constant interval between requests.
-
-@item Each task must complete before the next request for it
-occurs.
-
-@item The tasks are independent in that a task does not depend
-on the initiation or completion of requests for other tasks.
-
-@item The execution time for each task without preemption or
-interruption is constant and does not vary.
-
-@item Any non-periodic tasks in the system are special. These
-tasks displace periodic tasks while executing and do not have
-hard, critical deadlines.
-@end itemize
-
-Once the basic schedulability analysis is understood,
-some of the above assumptions can be relaxed and the
-side-effects accounted for.
-
-@subsection Processor Utilization Rule
-
-@cindex RMS Processor Utilization Rule
-
-The Processor Utilization Rule requires that
-processor utilization be calculated based upon the period and
-execution time of each task. The fraction of processor time
-spent executing task index is Time(index) / Period(index). The
-processor utilization can be calculated as follows:
-
-@example
-@group
-Utilization = 0
-
-for index = 1 to maximum_tasks
- Utilization = Utilization + (Time(index)/Period(index))
-@end group
-@end example
-
-To insure schedulability even under transient
-overload, the processor utilization must adhere to the following
-rule:
-
-@example
-Utilization = maximum_tasks * (2(1/maximum_tasks) - 1)
-@end example
-
-As the number of tasks increases, the above formula
-approaches ln(2) for a worst-case utilization factor of
-approximately 0.693. Many tasks sets can be scheduled with a
-greater utilization factor. In fact, the average processor
-utilization threshold for a randomly generated task set is
-approximately 0.88.
-
-@subsection Processor Utilization Rule Example
-
-This example illustrates the application of the
-Processor Utilization Rule to an application with three critical
-periodic tasks. The following table details the RMS priority,
-period, execution time, and processor utilization for each task:
-
-@ifset use-ascii
-@example
-@group
- +------------+----------+--------+-----------+-------------+
- | Task | RMS | Period | Execution | Processor |
- | | Priority | | Time | Utilization |
- +------------+----------+--------+-----------+-------------+
- | 1 | High | 100 | 15 | 0.15 |
- +------------+----------+--------+-----------+-------------+
- | 2 | Medium | 200 | 50 | 0.25 |
- +------------+----------+--------+-----------+-------------+
- | 3 | Low | 300 | 100 | 0.33 |
- +------------+----------+--------+-----------+-------------+
-@end group
-@end example
-@end ifset
-
-@ifset use-tex
-@sp 1
-@tex
-\centerline{\vbox{\offinterlineskip\halign{
-\vrule\strut#&
-\hbox to 0.75in{\enskip\hfil#\hfil}&
-\vrule#&
-\hbox to 0.75in{\enskip\hfil#\hfil}&
-\vrule#&
-\hbox to 0.75in{\enskip\hfil#\hfil}&
-\vrule#&
-\hbox to 1.00in{\enskip\hfil#\hfil}&
-\vrule#&
-\hbox to 1.00in{\enskip\hfil#\hfil}&
-\vrule#\cr\noalign{\hrule}
-&\bf Task&& \bf RMS && \bf Period && \bf Execution &&\bf Processor&\cr
-& && \bf Priority && &&\bf Time &&\bf Utilization &\cr\noalign{\hrule}
-& 1 && High && 100 && 15 && 0.15 &\cr\noalign{\hrule}
-& 2 && Medium && 200 && 50 && 0.25 &\cr\noalign{\hrule}
-& 3 && Low && 300 && 100 && 0.33 &\cr\noalign{\hrule}
-}}\hfil}
-@end tex
-@end ifset
-
-@ifset use-html
-@html
-<CENTER>
- <TABLE COLS=5 WIDTH="80%" BORDER=2>
-<TR><TD ALIGN=center><STRONG>Task</STRONG></TD>
- <TD ALIGN=center><STRONG>RMS Priority</STRONG></TD>
- <TD ALIGN=center><STRONG>Period</STRONG></TD>
- <TD ALIGN=center><STRONG>Execution Time</STRONG></TD>
- <TD ALIGN=center><STRONG>Processor Utilization</STRONG></TD></TR>
-<TR><TD ALIGN=center>1</TD>
- <TD ALIGN=center>High</TD>
- <TD ALIGN=center>100</TD>
- <TD ALIGN=center>15</TD>
- <TD ALIGN=center>0.15</TD></TR>
-<TR><TD ALIGN=center>2</TD>
- <TD ALIGN=center>Medium</TD>
- <TD ALIGN=center>200</TD>
- <TD ALIGN=center>50</TD>
- <TD ALIGN=center>0.25</TD></TR>
-<TR><TD ALIGN=center>3</TD>
- <TD ALIGN=center>Low</TD>
- <TD ALIGN=center>300</TD>
- <TD ALIGN=center>100</TD>
- <TD ALIGN=center>0.33</TD></TR>
- </TABLE>
-</CENTER>
-@end html
-@end ifset
-
-The total processor utilization for this task set is
-0.73 which is below the upper bound of 3 * (2(1/3) - 1), or
-0.779, imposed by the Processor Utilization Rule. Therefore,
-this task set is guaranteed to be schedulable using RMS.
-
-@subsection First Deadline Rule
-
-@cindex RMS First Deadline Rule
-
-If a given set of tasks do exceed the processor
-utilization upper limit imposed by the Processor Utilization
-Rule, they can still be guaranteed to meet all their deadlines
-by application of the First Deadline Rule. This rule can be
-stated as follows:
-
-For a given set of independent periodic tasks, if
-each task meets its first deadline when all tasks are started at
-the same time, then the deadlines will always be met for any
-combination of start times.
-
-A key point with this rule is that ALL periodic tasks
-are assumed to start at the exact same instant in time.
-Although this assumption may seem to be invalid, RTEMS makes it
-quite easy to insure. By having a non-preemptible user
-initialization task, all application tasks, regardless of
-priority, can be created and started before the initialization
-deletes itself. This technique insures that all tasks begin to
-compete for execution time at the same instant -- when the user
-initialization task deletes itself.
-
-@subsection First Deadline Rule Example
-
-The First Deadline Rule can insure schedulability
-even when the Processor Utilization Rule fails. The example
-below is a modification of the Processor Utilization Rule
-example where task execution time has been increased from 15 to
-25 units. The following table details the RMS priority, period,
-execution time, and processor utilization for each task:
-
-@ifset use-ascii
-@example
-@group
- +------------+----------+--------+-----------+-------------+
- | Task | RMS | Period | Execution | Processor |
- | | Priority | | Time | Utilization |
- +------------+----------+--------+-----------+-------------+
- | 1 | High | 100 | 25 | 0.25 |
- +------------+----------+--------+-----------+-------------+
- | 2 | Medium | 200 | 50 | 0.25 |
- +------------+----------+--------+-----------+-------------+
- | 3 | Low | 300 | 100 | 0.33 |
- +------------+----------+--------+-----------+-------------+
-@end group
-@end example
-@end ifset
-
-@ifset use-tex
-@sp 1
-@tex
-\centerline{\vbox{\offinterlineskip\halign{
-\vrule\strut#&
-\hbox to 0.75in{\enskip\hfil#\hfil}&
-\vrule#&
-\hbox to 0.75in{\enskip\hfil#\hfil}&
-\vrule#&
-\hbox to 0.75in{\enskip\hfil#\hfil}&
-\vrule#&
-\hbox to 1.00in{\enskip\hfil#\hfil}&
-\vrule#&
-\hbox to 1.00in{\enskip\hfil#\hfil}&
-\vrule#\cr\noalign{\hrule}
-&\bf Task&& \bf RMS && \bf Period && \bf Execution &&\bf Processor&\cr
-& && \bf Priority && &&\bf Time &&\bf Utilization &\cr\noalign{\hrule}
-& 1 && High && 100 && 25 && 0.25 &\cr\noalign{\hrule}
-& 2 && Medium && 200 && 50 && 0.25 &\cr\noalign{\hrule}
-& 3 && Low && 300 && 100 && 0.33 &\cr\noalign{\hrule}
-}}\hfil}
-@end tex
-@end ifset
-
-@ifset use-html
-@html
-<CENTER>
- <TABLE COLS=5 WIDTH="80%" BORDER=2>
-<TR><TD ALIGN=center><STRONG>Task</STRONG></TD>
- <TD ALIGN=center><STRONG>RMS Priority</STRONG></TD>
- <TD ALIGN=center><STRONG>Period</STRONG></TD>
- <TD ALIGN=center><STRONG>Execution Time</STRONG></TD>
- <TD ALIGN=center><STRONG>Processor Utilization</STRONG></TD></TR>
-<TR><TD ALIGN=center>1</TD>
- <TD ALIGN=center>High</TD>
- <TD ALIGN=center>100</TD>
- <TD ALIGN=center>25</TD>
- <TD ALIGN=center>0.25</TD></TR>
-<TR><TD ALIGN=center>2</TD>
- <TD ALIGN=center>Medium</TD>
- <TD ALIGN=center>200</TD>
- <TD ALIGN=center>50</TD>
- <TD ALIGN=center>0.25</TD></TR>
-<TR><TD ALIGN=center>3</TD>
- <TD ALIGN=center>Low</TD>
- <TD ALIGN=center>300</TD>
- <TD ALIGN=center>100</TD>
- <TD ALIGN=center>0.33</TD></TR>
- </TABLE>
-</CENTER>
-@end html
-@end ifset
-
-The total processor utilization for the modified task
-set is 0.83 which is above the upper bound of 3 * (2(1/3) - 1),
-or 0.779, imposed by the Processor Utilization Rule. Therefore,
-this task set is not guaranteed to be schedulable using RMS.
-However, the First Deadline Rule can guarantee the
-schedulability of this task set. This rule calls for one to
-examine each occurrence of deadline until either all tasks have
-met their deadline or one task failed to meet its first
-deadline. The following table details the time of each deadline
-occurrence, the maximum number of times each task may have run,
-the total execution time, and whether all the deadlines have
-been met.
-
-@ifset use-ascii
-@example
-@group
-+----------+------+------+------+----------------------+---------------+
-| Deadline | Task | Task | Task | Total | All Deadlines |
-| Time | 1 | 2 | 3 | Execution Time | Met? |
-+----------+------+------+------+----------------------+---------------+
-| 100 | 1 | 1 | 1 | 25 + 50 + 100 = 175 | NO |
-+----------+------+------+------+----------------------+---------------+
-| 200 | 2 | 1 | 1 | 50 + 50 + 100 = 200 | YES |
-+----------+------+------+------+----------------------+---------------+
-@end group
-@end example
-@end ifset
-
-@ifset use-tex
-@sp 1
-@tex
-\centerline{\vbox{\offinterlineskip\halign{
-\vrule\strut#&
-\hbox to 0.75in{\enskip\hfil#\hfil}&
-\vrule#&
-\hbox to 0.75in{\enskip\hfil#\hfil}&
-\vrule#&
-\hbox to 0.75in{\enskip\hfil#\hfil}&
-\vrule#&
-\hbox to 0.75in{\enskip\hfil#\hfil}&
-\vrule#&
-\hbox to 2.00in{\enskip\hfil#\hfil}&
-\vrule#&
-\hbox to 1.00in{\enskip\hfil#\hfil}&
-\vrule#\cr\noalign{\hrule}
-&\bf Deadline&& \bf Task &&\bf Task&&\bf Task&&\bf Total &&\bf All Deadlines &\cr
-&\bf Time && \bf 1 &&\bf 2 &&\bf 3 &&\bf Execution Time &&\bf Net?&\cr\noalign{\hrule}
-& 100&& 1 && 1 && 1 && 25 + 50 + 100 = 175 && NO &\cr\noalign{\hrule}
-& 200&& 2 && 1 && 1 && 50 + 50 + 100 = 200 && YES &\cr\noalign{\hrule}
-}}\hfil}
-@end tex
-@end ifset
-
-@ifset use-html
-@html
-<CENTER>
- <TABLE COLS=6 WIDTH="80%" BORDER=2>
-<TR><TD ALIGN=center><STRONG>Deadline Time</STRONG></TD>
- <TD ALIGN=center><STRONG>Task 1</STRONG></TD>
- <TD ALIGN=center><STRONG>Task 2</STRONG></TD>
- <TD ALIGN=center><STRONG>Task 3</STRONG></TD>
- <TD ALIGN=center><STRONG>Total Execution Time</STRONG></TD>
- <TD ALIGN=center><STRONG>All Deadlines Met?</STRONG></TD></TR>
-<TR><TD ALIGN=center>100</TD>
- <TD ALIGN=center>1</TD>
- <TD ALIGN=center>1</TD>
- <TD ALIGN=center>1</TD>
- <TD ALIGN=center>25 + 50 + 100 = 175</TD>
- <TD ALIGN=center>NO</TD></TR>
-<TR><TD ALIGN=center>200</TD>
- <TD ALIGN=center>2</TD>
- <TD ALIGN=center>1</TD>
- <TD ALIGN=center>1</TD>
- <TD ALIGN=center>50 + 50 + 100 = 175</TD>
- <TD ALIGN=center>YES</TD></TR>
- </TABLE>
-</CENTER>
-@end html
-@end ifset
-
-The key to this analysis is to recognize when each
-task will execute. For example at time 100, task 1 must have
-met its first deadline, but tasks 2 and 3 may also have begun
-execution. In this example, at time 100 tasks 1 and 2 have
-completed execution and thus have met their first deadline.
-Tasks 1 and 2 have used (25 + 50) = 75 time units, leaving (100
-- 75) = 25 time units for task 3 to begin. Because task 3 takes
-100 ticks to execute, it will not have completed execution at
-time 100. Thus at time 100, all of the tasks except task 3 have
-met their first deadline.
-
-At time 200, task 1 must have met its second deadline
-and task 2 its first deadline. As a result, of the first 200
-time units, task 1 uses (2 * 25) = 50 and task 2 uses 50,
-leaving (200 - 100) time units for task 3. Task 3 requires 100
-time units to execute, thus it will have completed execution at
-time 200. Thus, all of the tasks have met their first deadlines
-at time 200, and the task set is schedulable using the First
-Deadline Rule.
-
-@subsection Relaxation of Assumptions
-
-The assumptions used to develop the RMS
-schedulability rules are uncommon in most real-time systems.
-For example, it was assumed that tasks have constant unvarying
-execution time. It is possible to relax this assumption, simply
-by using the worst-case execution time of each task.
-
-Another assumption is that the tasks are independent.
-This means that the tasks do not wait for one another or
-contend for resources. This assumption can be relaxed by
-accounting for the amount of time a task spends waiting to
-acquire resources. Similarly, each task's execution time must
-account for any I/O performed and any RTEMS directive calls.
-
-In addition, the assumptions did not account for the
-time spent executing interrupt service routines. This can be
-accounted for by including all the processor utilization by
-interrupt service routines in the utilization calculation.
-Similarly, one should also account for the impact of delays in
-accessing local memory caused by direct memory access and other
-processors accessing local dual-ported memory.
-
-The assumption that nonperiodic tasks are used only
-for initialization or failure-recovery can be relaxed by placing
-all periodic tasks in the critical task set. This task set can
-be scheduled and analyzed using RMS. All nonperiodic tasks are
-placed in the non-critical task set. Although the critical task
-set can be guaranteed to execute even under transient overload,
-the non-critical task set is not guaranteed to execute.
-
-In conclusion, the application designer must be fully
-cognizant of the system and its run-time behavior when
-performing schedulability analysis for a system using RMS.
-Every hardware and software factor which impacts the execution
-time of each task must be accounted for in the schedulability
-analysis.
-
-@subsection Further Reading
-
-For more information on Rate Monotonic Scheduling and
-its schedulability analysis, the reader is referred to the
-following:
-
-@itemize @code{ }
-@item @cite{C. L. Liu and J. W. Layland. "Scheduling Algorithms for
-Multiprogramming in a Hard Real Time Environment." @b{Journal of
-the Association of Computing Machinery}. January 1973. pp. 46-61.}
-
-@item @cite{John Lehoczky, Lui Sha, and Ye Ding. "The Rate Monotonic
-Scheduling Algorithm: Exact Characterization and Average Case
-Behavior." @b{IEEE Real-Time Systems Symposium}. 1989. pp. 166-171.}
-
-@item @cite{Lui Sha and John Goodenough. "Real-Time Scheduling
-Theory and Ada." @b{IEEE Computer}. April 1990. pp. 53-62.}
-
-@item @cite{Alan Burns. "Scheduling hard real-time systems: a
-review." @b{Software Engineering Journal}. May 1991. pp. 116-128.}
-@end itemize
-
-@raisesections
-
-@section Operations
-
-@subsection Creating a Rate Monotonic Period
-
-The @code{@value{DIRPREFIX}rate_monotonic_create} directive creates a rate
-monotonic period which is to be used by the calling task to
-delineate a period. RTEMS allocates a Period Control Block
-(PCB) from the PCB free list. This data structure is used by
-RTEMS to manage the newly created rate monotonic period. RTEMS
-returns a unique period ID to the application which is used by
-other rate monotonic manager directives to access this rate
-monotonic period.
-
-@subsection Manipulating a Period
-
-The @code{@value{DIRPREFIX}rate_monotonic_period} directive is used to
-establish and maintain periodic execution utilizing a previously
-created rate monotonic period. Once initiated by the
-@code{@value{DIRPREFIX}rate_monotonic_period} directive, the period is
-said to run until it either expires or is reinitiated. The state of the rate
-monotonic period results in one of the following scenarios:
-
-@itemize @bullet
-@item If the rate monotonic period is running, the calling
-task will be blocked for the remainder of the outstanding period
-and, upon completion of that period, the period will be
-reinitiated with the specified period.
-
-@item If the rate monotonic period is not currently running
-and has not expired, it is initiated with a length of period
-ticks and the calling task returns immediately.
-
-@item If the rate monotonic period has expired before the task
-invokes the @code{@value{DIRPREFIX}rate_monotonic_period} directive,
-the period will be initiated with a length of period ticks and the calling task
-returns immediately with a timeout error status.
-
-@end itemize
-
-@subsection Obtaining the Status of a Period
-
-If the @code{@value{DIRPREFIX}rate_monotonic_period} directive is invoked
-with a period of @code{@value{RPREFIX}PERIOD_STATUS} ticks, the current
-state of the specified rate monotonic period will be returned. The following
-table details the relationship between the period's status and
-the directive status code returned by the
-@code{@value{DIRPREFIX}rate_monotonic_period}
-directive:
-
-@itemize @bullet
-@item @code{@value{RPREFIX}SUCCESSFUL} - period is running
-
-@item @code{@value{RPREFIX}TIMEOUT} - period has expired
-
-@item @code{@value{RPREFIX}NOT_DEFINED} - period has never been initiated
-@end itemize
-
-Obtaining the status of a rate monotonic period does
-not alter the state or length of that period.
-
-@subsection Canceling a Period
-
-The @code{@value{DIRPREFIX}rate_monotonic_cancel} directive is used to stop
-the period maintained by the specified rate monotonic period.
-The period is stopped and the rate monotonic period can be
-reinitiated using the @code{@value{DIRPREFIX}rate_monotonic_period} directive.
-
-@subsection Deleting a Rate Monotonic Period
-
-The @code{@value{DIRPREFIX}rate_monotonic_delete} directive is used to delete
-a rate monotonic period. If the period is running and has not
-expired, the period is automatically canceled. The rate
-monotonic period's control block is returned to the PCB free
-list when it is deleted. A rate monotonic period can be deleted
-by a task other than the task which created the period.
-
-@subsection Examples
-
-The following sections illustrate common uses of rate
-monotonic periods to construct periodic tasks.
-
-@subsection Simple Periodic Task
-
-This example consists of a single periodic task
-which, after initialization, executes every 100 clock ticks.
-
-@page
-@example
-rtems_task Periodic_task()
-@{
- rtems_name name;
- rtems_id period;
- rtems_status_code status;
-
- name = rtems_build_name( 'P', 'E', 'R', 'D' );
-
- (void) rate_monotonic_create( name, &period );
-
- while ( 1 ) @{
- if ( rate_monotonic_period( period, 100 ) == TIMEOUT )
- break;
-
- /* Perform some periodic actions */
- @}
-
- /* missed period so delete period and SELF */
-
- (void) rate_monotonic_delete( period );
- (void) task_delete( SELF );
-@}
-@end example
-
-
-The above task creates a rate monotonic period as
-part of its initialization. The first time the loop is
-executed, the @code{@value{DIRPREFIX}rate_monotonic_period}
-directive will initiate the period for 100 ticks and return
-immediately. Subsequent invocations of the
-@code{@value{DIRPREFIX}rate_monotonic_period} directive will result
-in the task blocking for the remainder of the 100 tick period.
-If, for any reason, the body of the loop takes more than 100
-ticks to execute, the @code{@value{DIRPREFIX}rate_monotonic_period}
-directive will return the @code{@value{RPREFIX}TIMEOUT} status.
-If the above task misses its deadline, it will delete the rate
-monotonic period and itself.
-
-@subsection Task with Multiple Periods
-
-This example consists of a single periodic task
-which, after initialization, performs two sets of actions every
-100 clock ticks. The first set of actions is performed in the
-first forty clock ticks of every 100 clock ticks, while the
-second set of actions is performed between the fortieth and
-seventieth clock ticks. The last thirty clock ticks are not
-used by this task.
-
-@page
-@example
-task Periodic_task()
-@{
- rtems_name name_1, name_2;
- rtems_id period_1, period_2;
- rtems_status_code status;
-
- name_1 = rtems_build_name( 'P', 'E', 'R', '1' );
- name_2 = rtems_build_name( 'P', 'E', 'R', '2' );
-
- (void ) rate_monotonic_create( name_1, &period_1 );
- (void ) rate_monotonic_create( name_2, &period_2 );
-
- while ( 1 ) @{
- if ( rate_monotonic_period( period_1, 100 ) == TIMEOUT )
- break;
-
- if ( rate_monotonic_period( period_2, 40 ) == TIMEOUT )
- break;
-
- /*
- * Perform first set of actions between clock
- * ticks 0 and 39 of every 100 ticks.
- */
-
- if ( rate_monotonic_period( period_2, 30 ) == TIMEOUT )
- break;
-
- /*
- * Perform second set of actions between clock 40 and 69
- * of every 100 ticks. THEN ...
- *
- * Check to make sure we didn't miss the period_2 period.
- */
-
- if ( rate_monotonic_period( period_2, STATUS ) == TIMEOUT )
- break;
-
- (void) rate_monotonic_cancel( period_2 );
- @}
-
- /* missed period so delete period and SELF */
-
- (void ) rate_monotonic_delete( period_1 );
- (void ) rate_monotonic_delete( period_2 );
- (void ) task_delete( SELF );
-@}
-@end example
-
-The above task creates two rate monotonic periods as
-part of its initialization. The first time the loop is
-executed, the @code{@value{DIRPREFIX}rate_monotonic_period}
-directive will initiate the period_1 period for 100 ticks
-and return immediately. Subsequent invocations of the
-@code{@value{DIRPREFIX}rate_monotonic_period} directive
-for period_1 will result in the task blocking for the remainder
-of the 100 tick period. The period_2 period is used to control
-the execution time of the two sets of actions within each 100
-tick period established by period_1. The
-@code{@value{DIRPREFIX}rate_monotonic_cancel( period_2 )}
-call is performed to insure that the period_2 period
-does not expire while the task is blocked on the period_1
-period. If this cancel operation were not performed, every time
-the @code{@value{DIRPREFIX}rate_monotonic_period( period_1, 40 )}
-call is executed, except for the initial one, a directive status
-of @code{@value{RPREFIX}TIMEOUT} is returned. It is important to
-note that every time this call is made, the period_1 period will be
-initiated immediately and the task will not block.
-
-If, for any reason, the task misses any deadline, the
-@code{@value{DIRPREFIX}rate_monotonic_period} directive will
-return the @code{@value{RPREFIX}TIMEOUT}
-directive status. If the above task misses its deadline, it
-will delete the rate monotonic periods and itself.
-
-@section Directives
-
-This section details the rate monotonic manager's
-directives. A subsection is dedicated to each of this manager's
-directives and describes the calling sequence, related
-constants, usage, and status codes.
-
-@c
-@c
-@c
-@page
-@subsection RATE_MONOTONIC_CREATE - Create a rate monotonic period
-
-@cindex create a period
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_rate_monotonic_create
-@example
-rtems_status_code rtems_rate_monotonic_create(
- rtems_name name,
- rtems_id *id
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Rate_Monotonic_Create (
- Name : in RTEMS.Name;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - rate monotonic period created successfully@*
-@code{@value{RPREFIX}INVALID_NAME} - invalid task name@*
-@code{@value{RPREFIX}TOO_MANY} - too many periods created
-
-@subheading DESCRIPTION:
-
-This directive creates a rate monotonic period. The
-assigned rate monotonic id is returned in id. This id is used
-to access the period with other rate monotonic manager
-directives. For control and maintenance of the rate monotonic
-period, RTEMS allocates a PCB from the local PCB free pool and
-initializes it.
-
-@subheading NOTES:
-
-This directive will not cause the calling task to be
-preempted.
-
-@c
-@c
-@c
-@page
-@subsection RATE_MONOTONIC_IDENT - Get ID of a period
-
-@cindex get ID of a period
-@cindex obtain ID of a period
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_rate_monotonic_ident
-@example
-rtems_status_code rtems_rate_monotonic_ident(
- rtems_name name,
- rtems_id *id
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Rate_Monotonic_Ident (
- Name : in RTEMS.Name;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - period identified successfully@*
-@code{@value{RPREFIX}INVALID_NAME} - period name not found
-
-@subheading DESCRIPTION:
-
-This directive obtains the period id associated with
-the period name to be acquired. If the period name is not
-unique, then the period id will match one of the periods with
-that name. However, this period id is not guaranteed to
-correspond to the desired period. The period id is used to
-access this period in other rate monotonic manager directives.
-
-@subheading NOTES:
-
-This directive will not cause the running task to be
-preempted.
-
-@c
-@c
-@c
-@page
-@subsection RATE_MONOTONIC_CANCEL - Cancel a period
-
-@cindex cancel a period
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_rate_monotonic_cancel
-@example
-rtems_status_code rtems_rate_monotonic_cancel(
- rtems_id id
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Rate_Monotonic_Cancel (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - period canceled successfully@*
-@code{@value{RPREFIX}INVALID_ID} - invalid rate monotonic period id@*
-@code{@value{RPREFIX}NOT_OWNER_OF_RESOURCE} - rate monotonic period not created by calling task
-
-@subheading DESCRIPTION:
-
-This directive cancels the rate monotonic period id.
-This period will be reinitiated by the next invocation of
-@code{@value{DIRPREFIX}rate_monotonic_period} with id.
-
-@subheading NOTES:
-
-This directive will not cause the running task to be
-preempted.
-
-The rate monotonic period specified by id must have
-been created by the calling task.
-
-@c
-@c
-@c
-@page
-@subsection RATE_MONOTONIC_DELETE - Delete a rate monotonic period
-
-@cindex delete a period
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_rate_monotonic_delete
-@example
-rtems_status_code rtems_rate_monotonic_delete(
- rtems_id id
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Rate_Monotonic_Delete (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - period deleted successfully@*
-@code{@value{RPREFIX}INVALID_ID} - invalid rate monotonic period id
-
-@subheading DESCRIPTION:
-
-This directive deletes the rate monotonic period
-specified by id. If the period is running, it is automatically
-canceled. The PCB for the deleted period is reclaimed by RTEMS.
-
-@subheading NOTES:
-
-This directive will not cause the running task to be
-preempted.
-
-A rate monotonic period can be deleted by a task
-other than the task which created the period.
-
-@c
-@c
-@c
-@page
-@subsection RATE_MONOTONIC_PERIOD - Conclude current/Start next period
-
-@cindex conclude current period
-@cindex start current period
-@cindex period initiation
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_rate_monotonic_period
-@example
-rtems_status_code rtems_rate_monotonic_period(
- rtems_id id,
- rtems_interval length
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Rate_Monotonic_Period (
- ID : in RTEMS.ID;
- Length : in RTEMS.Interval;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - period initiated successfully@*
-@code{@value{RPREFIX}INVALID_ID} - invalid rate monotonic period id@*
-@code{@value{RPREFIX}NOT_OWNER_OF_RESOURCE} - period not created by calling task@*
-@code{@value{RPREFIX}NOT_DEFINED} - period has never been initiated (only
-possible when period is set to PERIOD_STATUS)@*
-@code{@value{RPREFIX}TIMEOUT} - period has expired
-
-@subheading DESCRIPTION:
-
-This directive initiates the rate monotonic period id
-with a length of period ticks. If id is running, then the
-calling task will block for the remainder of the period before
-reinitiating the period with the specified period. If id was
-not running (either expired or never initiated), the period is
-immediately initiated and the directive returns immediately.
-
-If invoked with a period of @code{@value{RPREFIX}PERIOD_STATUS} ticks, the
-current state of id will be returned. The directive status
-indicates the current state of the period. This does not alter
-the state or period of the period.
-
-@subheading NOTES:
-
-This directive will not cause the running task to be preempted.
-
-@c
-@c
-@c
-@page
-@subsection RATE_MONOTONIC_GET_STATUS - Obtain status information on period
-
-@cindex get status of period
-@cindex obtain status of period
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_rate_monotonic_get_status
-@example
-rtems_status_code rtems_rate_monotonic_get_status(
- rtems_id id,
- rtems_rate_monotonic_period_status *status
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Rate_Monotonic_Get_Status (
- ID : in RTEMS.ID;
- Status : out RTEMS.Rate_Monotonic_Period_Status;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - period initiated successfully@*
-@code{@value{RPREFIX}INVALID_ID} - invalid rate monotonic period id@*
-@code{@value{RPREFIX}INVALID_ADDRESS} - invalid address of status@*
-
-@subheading DESCRIPTION:
-
-This directive returns status information associated with
-the rate monotonic period id in the following data @value{STRUCTURE}:
-
-@ifset is-C
-@example
-typedef struct @{
- rtems_rate_monotonic_period_states state;
- unsigned32 ticks_since_last_period;
- unsigned32 ticks_executed_since_last_period;
-@} rtems_rate_monotonic_period_status;
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-type Rate_Monotonic_Period_Status is
- begin
- State : RTEMS.Rate_Monotonic_Period_States;
- Ticks_Since_Last_Period : RTEMS.Unsigned32;
- Ticks_Executed_Since_Last_Period : RTEMS.Unsigned32;
- end record;
-@end example
-@end ifset
-
-@c RATE_MONOTONIC_INACTIVE does not have RTEMS_ in front of it.
-
-If the period's state is @code{RATE_MONOTONIC_INACTIVE}, both
-ticks_since_last_period and ticks_executed_since_last_period
-will be set to 0. Otherwise, ticks_since_last_period will
-contain the number of clock ticks which have occurred since
-the last invocation of the
-@code{@value{DIRPREFIX}rate_monotonic_period} directive.
-Also in this case, the ticks_executed_since_last_period will indicate
-how much processor time the owning task has consumed since the invocation
-of the @code{@value{DIRPREFIX}rate_monotonic_period} directive.
-
-@subheading NOTES:
-
-This directive will not cause the running task to be preempted.
diff --git a/doc/user/schedule.t b/doc/user/schedule.t
deleted file mode 100644
index c80b3200ee..0000000000
--- a/doc/user/schedule.t
+++ /dev/null
@@ -1,407 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@c
-@c This figure is not included:
-@c Figure 17-1 RTEMS Task State Transitions
-@c
-
-@chapter Scheduling Concepts
-
-@cindex scheduling
-@cindex task scheduling
-
-@section Introduction
-
-The concept of scheduling in real-time systems
-dictates the ability to provide immediate response to specific
-external events, particularly the necessity of scheduling tasks
-to run within a specified time limit after the occurrence of an
-event. For example, software embedded in life-support systems
-used to monitor hospital patients must take instant action if a
-change in the patient's status is detected.
-
-The component of RTEMS responsible for providing this
-capability is appropriately called the scheduler. The
-scheduler's sole purpose is to allocate the all important
-resource of processor time to the various tasks competing for
-attention. The RTEMS scheduler allocates the processor using a
-priority-based, preemptive algorithm augmented to provide
-round-robin characteristics within individual priority groups.
-The goal of this algorithm is to guarantee that the task which
-is executing on the processor at any point in time is the one
-with the highest priority among all tasks in the ready state.
-
-There are two common methods of accomplishing the
-mechanics of this algorithm. Both ways involve a list or chain
-of tasks in the ready state. One method is to randomly place
-tasks in the ready chain forcing the scheduler to scan the
-entire chain to determine which task receives the processor.
-The other method is to schedule the task by placing it in the
-proper place on the ready chain based on the designated
-scheduling criteria at the time it enters the ready state.
-Thus, when the processor is free, the first task on the ready
-chain is allocated the processor. RTEMS schedules tasks using
-the second method to guarantee faster response times to external
-events.
-
-@section Scheduling Mechanisms
-
-@cindex scheduling mechanisms
-
-RTEMS provides four mechanisms which allow the user
-to impact the task scheduling process:
-
-@itemize @bullet
-@item user-selectable task priority level
-@item task preemption control
-@item task timeslicing control
-@item manual round-robin selection
-@end itemize
-
-Each of these methods provides a powerful capability
-to customize sets of tasks to satisfy the unique and particular
-requirements encountered in custom real-time applications.
-Although each mechanism operates independently, there is a
-precedence relationship which governs the effects of scheduling
-modifications. The evaluation order for scheduling
-characteristics is always priority, preemption mode, and
-timeslicing. When reading the descriptions of timeslicing and
-manual round-robin it is important to keep in mind that
-preemption (if enabled) of a task by higher priority tasks will
-occur as required, overriding the other factors presented in the
-description.
-
-@subsection Task Priority and Scheduling
-
-@cindex task priority
-
-The most significant of these mechanisms is the
-ability for the user to assign a priority level to each
-individual task when it is created and to alter a task's
-priority at run-time. RTEMS provides 255 priority levels.
-Level 255 is the lowest priority and level 1 is the highest.
-When a task is added to the ready chain, it is placed behind all
-other tasks of the same priority. This rule provides a
-round-robin within priority group scheduling characteristic.
-This means that in a group of equal priority tasks, tasks will
-execute in the order they become ready or FIFO order. Even
-though there are ways to manipulate and adjust task priorities,
-the most important rule to remember is:
-
-@itemize @code{ }
-@item @b{The RTEMS scheduler will always select the highest
-priority task that is ready to run when allocating the processor
-to a task.}
-@end itemize
-
-@subsection Preemption
-
-@cindex preemption
-
-Another way the user can alter the basic scheduling
-algorithm is by manipulating the preemption mode flag
-(@code{@value{RPREFIX}PREEMPT_MASK}) of individual tasks. If preemption is disabled
-for a task (@code{@value{RPREFIX}NO_PREEMPT}), then the task will not relinquish
-control of the processor until it terminates, blocks, or
-re-enables preemption. Even tasks which become ready to run and
-possess higher priority levels will not be allowed to execute.
-Note that the preemption setting has no effect on the manner in
-which a task is scheduled. It only applies once a task has
-control of the processor.
-
-@subsection Timeslicing
-
-@cindex timeslicing
-@cindex round robin scheduling
-
-Timeslicing or round-robin scheduling is an
-additional method which can be used to alter the basic
-scheduling algorithm. Like preemption, timeslicing is specified
-on a task by task basis using the timeslicing mode flag
-(@code{@value{RPREFIX}TIMESLICE_MASK}). If timeslicing is enabled for a task
-(@code{@value{RPREFIX}TIMESLICE}), then RTEMS will limit the amount of time the task
-can execute before the processor is allocated to another task.
-Each tick of the real-time clock reduces the currently running
-task's timeslice. When the execution time equals the timeslice,
-RTEMS will dispatch another task of the same priority to
-execute. If there are no other tasks of the same priority ready
-to execute, then the current task is allocated an additional
-timeslice and continues to run. Remember that a higher priority
-task will preempt the task (unless preemption is disabled) as
-soon as it is ready to run, even if the task has not used up its
-entire timeslice.
-
-@subsection Manual Round-Robin
-
-@cindex manual round robin
-
-The final mechanism for altering the RTEMS scheduling
-algorithm is called manual round-robin. Manual round-robin is
-invoked by using the @code{@value{DIRPREFIX}task_wake_after}
-directive with a time interval of @code{@value{RPREFIX}YIELD_PROCESSOR}.
-This allows a task to give up the
-processor and be immediately returned to the ready chain at the
-end of its priority group. If no other tasks of the same
-priority are ready to run, then the task does not lose control
-of the processor.
-
-@subsection Dispatching Tasks
-
-@cindex dispatching
-
-The dispatcher is the RTEMS component responsible for
-allocating the processor to a ready task. In order to allocate
-the processor to one task, it must be deallocated or retrieved
-from the task currently using it. This involves a concept
-called a context switch. To perform a context switch, the
-dispatcher saves the context of the current task and restores
-the context of the task which has been allocated to the
-processor. Saving and restoring a task's context is the
-storing/loading of all the essential information about a task to
-enable it to continue execution without any effects of the
-interruption. For example, the contents of a task's register
-set must be the same when it is given the processor as they were
-when it was taken away. All of the information that must be
-saved or restored for a context switch is located either in the
-TCB or on the task's stacks.
-
-Tasks that utilize a numeric coprocessor and are
-created with the @code{@value{RPREFIX}FLOATING_POINT} attribute
-require additional operations during a context switch. These
-additional operations
-are necessary to save and restore the floating point context of
-@code{@value{RPREFIX}FLOATING_POINT} tasks. To avoid unnecessary save and restore
-operations, the state of the numeric coprocessor is only saved
-when a @code{@value{RPREFIX}FLOATING_POINT} task is dispatched and that task was not
-the last task to utilize the coprocessor.
-
-@section Task State Transitions
-
-@cindex task state transitions
-
-Tasks in an RTEMS system must always be in one of the
-five allowable task states. These states are: executing, ready,
-blocked, dormant, and non-existent.
-
-A task occupies the non-existent state before a
-@code{@value{DIRPREFIX}task_create} has been
-issued on its behalf. A task enters the
-non-existent state from any other state in the system when it is
-deleted with the @code{@value{DIRPREFIX}task_delete}
-directive. While a task occupies
-this state it does not have a TCB or a task ID assigned to it;
-therefore, no other tasks in the system may reference this task.
-
-When a task is created via the @code{@value{DIRPREFIX}task_create} directive
-it enters the dormant state. This state is not entered through
-any other means. Although the task exists in the system, it
-cannot actively compete for system resources. It will remain in
-the dormant state until it is started via the @code{@value{DIRPREFIX}task_start}
-directive, at which time it enters the ready state. The task is
-now permitted to be scheduled for the processor and to compete
-for other system resources.
-
-@ifset use-ascii
-@example
-@group
- +-------------------------------------------------------------+
- | Non-existent |
- | +-------------------------------------------------------+ |
- | | | |
- | | | |
- | | Creating +---------+ Deleting | |
- | | -------------------> | Dormant | -------------------> | |
- | | +---------+ | |
- | | | | |
- | | Starting | | |
- | | | | |
- | | V Deleting | |
- | | +-------> +-------+ -------------------> | |
- | | Yielding / +----- | Ready | ------+ | |
- | | / / +-------+ <--+ \ | |
- | | / / \ \ Blocking | |
- | | / / Dispatching Readying \ \ | |
- | | / V \ V | |
- | | +-----------+ Blocking +---------+ | |
- | | | Executing | --------------> | Blocked | | |
- | | +-----------+ +---------+ | |
- | | | |
- | | | |
- | +-------------------------------------------------------+ |
- | Non-existent |
- +-------------------------------------------------------------+
-@end group
-@end example
-@end ifset
-
-@ifset use-tex
-@c @page
-@c @image{states,5in,4in}
-@example
-@group
- +-------------------------------------------------------------+
- | Non-existent |
- | +-------------------------------------------------------+ |
- | | | |
- | | | |
- | | Creating +---------+ Deleting | |
- | | -------------------> | Dormant | -------------------> | |
- | | +---------+ | |
- | | | | |
- | | Starting | | |
- | | | | |
- | | V Deleting | |
- | | +-------> +-------+ -------------------> | |
- | | Yielding / +----- | Ready | ------+ | |
- | | / / +-------+ <--+ \ | |
- | | / / \ \ Blocking | |
- | | / / Dispatching Readying \ \ | |
- | | / V \ V | |
- | | +-----------+ Blocking +---------+ | |
- | | | Executing | --------------> | Blocked | | |
- | | +-----------+ +---------+ | |
- | | | |
- | | | |
- | +-------------------------------------------------------+ |
- | Non-existent |
- +-------------------------------------------------------------+
-@end group
-@end example
-@end ifset
-
-@ifset use-html
-@html
-<IMG SRC="states.png" WIDTH=550 HEIGHT=400 ALT="RTEMS Task States">
-@end html
-@end ifset
-
-A task occupies the blocked state whenever it is
-unable to be scheduled to run. A running task may block itself
-or be blocked by other tasks in the system. The running task
-blocks itself through voluntary operations that cause the task
-to wait. The only way a task can block a task other than itself
-is with the @code{@value{DIRPREFIX}task_suspend} directive.
-A task enters the blocked state due to any of the following conditions:
-
-@itemize @bullet
-@item A task issues a @code{@value{DIRPREFIX}task_suspend} directive
-which blocks either itself or another task in the system.
-
-@item The running task issues a @code{@value{DIRPREFIX}message_queue_receive}
-directive with the wait option and the message queue is empty.
-
-@item The running task issues an @code{@value{DIRPREFIX}event_receive}
-directive with the wait option and the currently pending events do not
-satisfy the request.
-
-@item The running task issues a @code{@value{DIRPREFIX}semaphore_obtain}
-directive with the wait option and the requested semaphore is unavailable.
-
-@item The running task issues a @code{@value{DIRPREFIX}task_wake_after}
-directive which blocks the task for the given time interval. If the time
-interval specified is zero, the task yields the processor and
-remains in the ready state.
-
-@item The running task issues a @code{@value{DIRPREFIX}task_wake_when}
-directive which blocks the task until the requested date and time arrives.
-
-@item The running task issues a @code{@value{DIRPREFIX}region_get_segment}
-directive with the wait option and there is not an available segment large
-enough to satisfy the task's request.
-
-@item The running task issues a @code{@value{DIRPREFIX}rate_monotonic_period}
-directive and must wait for the specified rate monotonic period
-to conclude.
-@end itemize
-
-A blocked task may also be suspended. Therefore,
-both the suspension and the blocking condition must be removed
-before the task becomes ready to run again.
-
-A task occupies the ready state when it is able to be
-scheduled to run, but currently does not have control of the
-processor. Tasks of the same or higher priority will yield the
-processor by either becoming blocked, completing their
-timeslice, or being deleted. All tasks with the same priority
-will execute in FIFO order. A task enters the ready state due
-to any of the following conditions:
-
-@itemize @bullet
-
-@item A running task issues a @code{@value{DIRPREFIX}task_resume}
-directive for a task that is suspended and the task is not blocked
-waiting on any resource.
-
-@item A running task issues a @code{@value{DIRPREFIX}message_queue_send},
-@code{@value{DIRPREFIX}message_queue_broadcast}, or a
-@code{@value{DIRPREFIX}message_queue_urgent} directive
-which posts a message to the queue on which the blocked task is
-waiting.
-
-@item A running task issues an @code{@value{DIRPREFIX}event_send}
-directive which sends an event condition to a task which is blocked
-waiting on that event condition.
-
-@item A running task issues a @code{@value{DIRPREFIX}semaphore_release}
-directive which releases the semaphore on which the blocked task is
-waiting.
-
-@item A timeout interval expires for a task which was blocked
-by a call to the @code{@value{DIRPREFIX}task_wake_after} directive.
-
-@item A timeout period expires for a task which blocked by a
-call to the @code{@value{DIRPREFIX}task_wake_when} directive.
-
-@item A running task issues a @code{@value{DIRPREFIX}region_return_segment}
-directive which releases a segment to the region on which the blocked task
-is waiting and a resulting segment is large enough to satisfy
-the task's request.
-
-@item A rate monotonic period expires for a task which blocked
-by a call to the @code{@value{DIRPREFIX}rate_monotonic_period} directive.
-
-@item A timeout interval expires for a task which was blocked
-waiting on a message, event, semaphore, or segment with a
-timeout specified.
-
-@item A running task issues a directive which deletes a
-message queue, a semaphore, or a region on which the blocked
-task is waiting.
-
-@item A running task issues a @code{@value{DIRPREFIX}task_restart}
-directive for the blocked task.
-
-@item The running task, with its preemption mode enabled, may
-be made ready by issuing any of the directives that may unblock
-a task with a higher priority. This directive may be issued
-from the running task itself or from an ISR.
-
-A ready task occupies the executing state when it has
-control of the CPU. A task enters the executing state due to
-any of the following conditions:
-
-@item The task is the highest priority ready task in the
-system.
-
-@item The running task blocks and the task is next in the
-scheduling queue. The task may be of equal priority as in
-round-robin scheduling or the task may possess the highest
-priority of the remaining ready tasks.
-
-@item The running task may reenable its preemption mode and a
-task exists in the ready queue that has a higher priority than
-the running task.
-
-@item The running task lowers its own priority and another
-task is of higher priority as a result.
-
-@item The running task raises the priority of a task above its
-own and the running task is in preemption mode.
-
-@end itemize
diff --git a/doc/user/sem.t b/doc/user/sem.t
deleted file mode 100644
index dfc9b819b2..0000000000
--- a/doc/user/sem.t
+++ /dev/null
@@ -1,821 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Semaphore Manager
-
-@cindex semaphores
-@cindex binary semaphores
-@cindex counting semaphores
-@cindex mutual exclusion
-
-@section Introduction
-
-The semaphore manager utilizes standard Dijkstra
-counting semaphores to provide synchronization and mutual
-exclusion capabilities. The directives provided by the
-semaphore manager are:
-
-@itemize @bullet
-@item @code{@value{DIRPREFIX}semaphore_create} - Create a semaphore
-@item @code{@value{DIRPREFIX}semaphore_ident} - Get ID of a semaphore
-@item @code{@value{DIRPREFIX}semaphore_delete} - Delete a semaphore
-@item @code{@value{DIRPREFIX}semaphore_obtain} - Acquire a semaphore
-@item @code{@value{DIRPREFIX}semaphore_release} - Release a semaphore
-@item @code{@value{DIRPREFIX}semaphore_flush} - Unblock all tasks waiting on a semaphore
-@end itemize
-
-@section Background
-
-A semaphore can be viewed as a protected variable
-whose value can be modified only with the
-@code{@value{DIRPREFIX}semaphore_create},
-@code{@value{DIRPREFIX}semaphore_obtain}, and
-@code{@value{DIRPREFIX}semaphore_release} directives. RTEMS
-supports both binary and counting semaphores. A binary semaphore
-is restricted to values of zero or one, while a counting
-semaphore can assume any non-negative integer value.
-
-A binary semaphore can be used to control access to a
-single resource. In particular, it can be used to enforce
-mutual exclusion for a critical section in user code. In this
-instance, the semaphore would be created with an initial count
-of one to indicate that no task is executing the critical
-section of code. Upon entry to the critical section, a task
-must issue the @code{@value{DIRPREFIX}semaphore_obtain}
-directive to prevent other tasks from entering the critical section.
-Upon exit from the critical section, the task must issue the
-@code{@value{DIRPREFIX}semaphore_release} directive to
-allow another task to execute the critical section.
-
-A counting semaphore can be used to control access to
-a pool of two or more resources. For example, access to three
-printers could be administered by a semaphore created with an
-initial count of three. When a task requires access to one of
-the printers, it issues the @code{@value{DIRPREFIX}semaphore_obtain}
-directive to obtain access to a printer. If a printer is not currently
-available, the task can wait for a printer to become available or return
-immediately. When the task has completed printing, it should
-issue the @code{@value{DIRPREFIX}semaphore_release}
-directive to allow other tasks access to the printer.
-
-Task synchronization may be achieved by creating a
-semaphore with an initial count of zero. One task waits for the
-arrival of another task by issuing a @code{@value{DIRPREFIX}semaphore_obtain}
-directive when it reaches a synchronization point. The other task
-performs a corresponding @code{@value{DIRPREFIX}semaphore_release}
-operation when it reaches its synchronization point, thus unblocking
-the pending task.
-
-@subsection Nested Resource Access
-
-Deadlock occurs when a task owning a binary semaphore
-attempts to acquire that same semaphore and blocks as result.
-Since the semaphore is allocated to a task, it cannot be
-deleted. Therefore, the task that currently holds the semaphore
-and is also blocked waiting for that semaphore will never
-execute again.
-
-RTEMS addresses this problem by allowing the task
-holding the binary semaphore to obtain the same binary semaphore
-multiple times in a nested manner. Each
-@code{@value{DIRPREFIX}semaphore_obtain} must be accompanied with a
-@code{@value{DIRPREFIX}semaphore_release}. The semaphore will
-only be made available for acquisition by other tasks when the
-outermost @code{@value{DIRPREFIX}semaphore_obtain} is matched with
-a @code{@value{DIRPREFIX}semaphore_release}.
-
-
-@subsection Priority Inversion
-
-Priority inversion is a form of indefinite
-postponement which is common in multitasking, preemptive
-executives with shared resources. Priority inversion occurs
-when a high priority tasks requests access to shared resource
-which is currently allocated to low priority task. The high
-priority task must block until the low priority task releases
-the resource. This problem is exacerbated when the low priority
-task is prevented from executing by one or more medium priority
-tasks. Because the low priority task is not executing, it
-cannot complete its interaction with the resource and release
-that resource. The high priority task is effectively prevented
-from executing by lower priority tasks.
-
-@subsection Priority Inheritance
-
-Priority inheritance is an algorithm that calls for
-the lower priority task holding a resource to have its priority
-increased to that of the highest priority task blocked waiting
-for that resource. Each time a task blocks attempting to obtain
-the resource, the task holding the resource may have its
-priority increased.
-
-RTEMS supports priority inheritance for local, binary
-semaphores that use the priority task wait queue blocking
-discipline. When a task of higher priority than the task
-holding the semaphore blocks, the priority of the task holding
-the semaphore is increased to that of the blocking task. When
-the task holding the task completely releases the binary
-semaphore (i.e. not for a nested release), the holder's priority
-is restored to the value it had before any higher priority was
-inherited.
-
-The RTEMS implementation of the priority inheritance
-algorithm takes into account the scenario in which a task holds
-more than one binary semaphore. The holding task will execute
-at the priority of the higher of the highest ceiling priority or
-at the priority of the highest priority task blocked waiting for
-any of the semaphores the task holds. Only when the task
-releases ALL of the binary semaphores it holds will its priority
-be restored to the normal value.
-
-@subsection Priority Ceiling
-
-Priority ceiling is an algorithm that calls for the
-lower priority task holding a resource to have its priority
-increased to that of the highest priority task which will EVER
-block waiting for that resource. This algorithm addresses the
-problem of priority inversion although it avoids the possibility
-of changing the priority of the task holding the resource
-multiple times. The priority ceiling algorithm will only change
-the priority of the task holding the resource a maximum of one
-time. The ceiling priority is set at creation time and must be
-the priority of the highest priority task which will ever
-attempt to acquire that semaphore.
-
-RTEMS supports priority ceiling for local, binary
-semaphores that use the priority task wait queue blocking
-discipline. When a task of lower priority than the ceiling
-priority successfully obtains the semaphore, its priority is
-raised to the ceiling priority. When the task holding the task
-completely releases the binary semaphore (i.e. not for a nested
-release), the holder's priority is restored to the value it had
-before any higher priority was put into effect.
-
-The need to identify the highest priority task which
-will attempt to obtain a particular semaphore can be a difficult
-task in a large, complicated system. Although the priority
-ceiling algorithm is more efficient than the priority
-inheritance algorithm with respect to the maximum number of task
-priority changes which may occur while a task holds a particular
-semaphore, the priority inheritance algorithm is more forgiving
-in that it does not require this apriori information.
-
-The RTEMS implementation of the priority ceiling
-algorithm takes into account the scenario in which a task holds
-more than one binary semaphore. The holding task will execute
-at the priority of the higher of the highest ceiling priority or
-at the priority of the highest priority task blocked waiting for
-any of the semaphores the task holds. Only when the task
-releases ALL of the binary semaphores it holds will its priority
-be restored to the normal value.
-
-@subsection Building a Semaphore Attribute Set
-
-In general, an attribute set is built by a bitwise OR
-of the desired attribute components. The following table lists
-the set of valid semaphore attributes:
-
-@itemize @bullet
-@item @code{@value{RPREFIX}FIFO} - tasks wait by FIFO (default)
-
-@item @code{@value{RPREFIX}PRIORITY} - tasks wait by priority
-
-@item @code{@value{RPREFIX}BINARY_SEMAPHORE} - restrict values to
-0 and 1 (default)
-
-@item @code{@value{RPREFIX}COUNTING_SEMAPHORE} - no restriction on values
-
-@item @code{@value{RPREFIX}NO_INHERIT_PRIORITY} - do not use priority
-inheritance (default)
-
-@item @code{@value{RPREFIX}INHERIT_PRIORITY} - use priority inheritance
-
-@item @code{@value{RPREFIX}PRIORITY_CEILING} - use priority ceiling
-
-@item @code{@value{RPREFIX}NO_PRIORITY_CEILING} - do not use priority
-ceiling (default)
-
-@item @code{@value{RPREFIX}LOCAL} - local task (default)
-
-@item @code{@value{RPREFIX}GLOBAL} - global task
-@end itemize
-
-Attribute values are specifically designed to be
-mutually exclusive, therefore bitwise OR and addition operations
-are equivalent as long as each attribute appears exactly once in
-the component list. An attribute listed as a default is not
-required to appear in the attribute list, although it is a good
-programming practice to specify default attributes. If all
-defaults are desired, the attribute
-@code{@value{RPREFIX}DEFAULT_ATTRIBUTES} should be
-specified on this call.
-
-This example demonstrates the attribute_set parameter needed to create a
-local semaphore with the task priority waiting queue discipline. The
-attribute_set parameter passed to the
-@code{@value{DIRPREFIX}semaphore_create} directive could be either
-@code{@value{RPREFIX}PRIORITY} or @code{@value{RPREFIX}LOCAL @value{OR}
-@value{RPREFIX}PRIORITY}. The attribute_set parameter can be set to
-@code{@value{RPREFIX}PRIORITY} because @code{@value{RPREFIX}LOCAL} is the
-default for all created tasks. If a similar semaphore were to be known
-globally, then the attribute_set parameter would be
-@code{@value{RPREFIX}GLOBAL @value{OR} @value{RPREFIX}PRIORITY}.
-
-@subsection Building a SEMAPHORE_OBTAIN Option Set
-
-In general, an option is built by a bitwise OR of the
-desired option components. The set of valid options for the
-@code{@value{DIRPREFIX}semaphore_obtain} directive are listed
-in the following table:
-
-@itemize @bullet
-@item @code{@value{RPREFIX}WAIT} - task will wait for semaphore (default)
-@item @code{@value{RPREFIX}NO_WAIT} - task should not wait
-@end itemize
-
-Option values are specifically designed to be mutually exclusive,
-therefore bitwise OR and addition operations are equivalent as long as
-each attribute appears exactly once in the component list. An option
-listed as a default is not required to appear in the list, although it is
-a good programming practice to specify default options. If all defaults
-are desired, the option @code{@value{RPREFIX}DEFAULT_OPTIONS} should be
-specified on this call.
-
-This example demonstrates the option parameter needed
-to poll for a semaphore. The option parameter passed to the
-@code{@value{DIRPREFIX}semaphore_obtain}
-directive should be @code{@value{RPREFIX}NO_WAIT}.
-
-@section Operations
-
-@subsection Creating a Semaphore
-
-The @code{@value{DIRPREFIX}semaphore_create} directive creates a binary or
-counting semaphore with a user-specified name as well as an
-initial count. If a binary semaphore is created with a count of
-zero (0) to indicate that it has been allocated, then the task
-creating the semaphore is considered the current holder of the
-semaphore. At create time the method for ordering waiting tasks
-in the semaphore's task wait queue (by FIFO or task priority) is
-specified. Additionally, the priority inheritance or priority
-ceiling algorithm may be selected for local, binary semaphores
-that use the priority task wait queue blocking discipline. If
-the priority ceiling algorithm is selected, then the highest
-priority of any task which will attempt to obtain this semaphore
-must be specified. RTEMS allocates a Semaphore Control Block
-(SMCB) from the SMCB free list. This data structure is used by
-RTEMS to manage the newly created semaphore. Also, a unique
-semaphore ID is generated and returned to the calling task.
-
-@subsection Obtaining Semaphore IDs
-
-When a semaphore is created, RTEMS generates a unique
-semaphore ID and assigns it to the created semaphore until it is
-deleted. The semaphore ID may be obtained by either of two
-methods. First, as the result of an invocation of the
-@code{@value{DIRPREFIX}semaphore_create} directive, the
-semaphore ID is stored in a user provided location. Second,
-the semaphore ID may be obtained later using the
-@code{@value{DIRPREFIX}semaphore_ident} directive. The semaphore ID is
-used by other semaphore manager directives to access this
-semaphore.
-
-@subsection Acquiring a Semaphore
-
-The @code{@value{DIRPREFIX}semaphore_obtain} directive is used to acquire the
-specified semaphore. A simplified version of the
-@code{@value{DIRPREFIX}semaphore_obtain} directive can be described as follows:
-
-@example
-if semaphore's count is greater than zero
- then decrement semaphore's count
- else wait for release of semaphore
-
-return SUCCESSFUL
-@end example
-
-When the semaphore cannot be immediately acquired,
-one of the following situations applies:
-
-@itemize @bullet
-@item By default, the calling task will wait forever to
-acquire the semaphore.
-
-@item Specifying @code{@value{RPREFIX}NO_WAIT} forces an immediate return
-with an error status code.
-
-@item Specifying a timeout limits the interval the task will
-wait before returning with an error status code.
-@end itemize
-
-If the task waits to acquire the semaphore, then it
-is placed in the semaphore's task wait queue in either FIFO or
-task priority order. If the task blocked waiting for a binary
-semaphore using priority inheritance and the task's priority is
-greater than that of the task currently holding the semaphore,
-then the holding task will inherit the priority of the blocking
-task. All tasks waiting on a semaphore are returned an error
-code when the semaphore is deleted.
-
-When a task successfully obtains a semaphore using
-priority ceiling and the priority ceiling for this semaphore is
-greater than that of the holder, then the holder's priority will
-be elevated.
-
-@subsection Releasing a Semaphore
-
-The @code{@value{DIRPREFIX}semaphore_release} directive is used to release
-the specified semaphore. A simplified version of the
-@code{@value{DIRPREFIX}semaphore_release} directive can be described as
-follows:
-
-@example
-if no tasks are waiting on this semaphore
- then increment semaphore's count
- else assign semaphore to a waiting task
-
-return SUCCESSFUL
-@end example
-
-If this is the outermost release of a binary
-semaphore that uses priority inheritance or priority ceiling and
-the task does not currently hold any other binary semaphores,
-then the task performing the @code{@value{DIRPREFIX}semaphore_release}
-will have its priority restored to its normal value.
-
-@subsection Deleting a Semaphore
-
-The @code{@value{DIRPREFIX}semaphore_delete} directive removes a semaphore
-from the system and frees its control block. A semaphore can be
-deleted by any local task that knows the semaphore's ID. As a
-result of this directive, all tasks blocked waiting to acquire
-the semaphore will be readied and returned a status code which
-indicates that the semaphore was deleted. Any subsequent
-references to the semaphore's name and ID are invalid.
-
-@section Directives
-
-This section details the semaphore manager's
-directives. A subsection is dedicated to each of this manager's
-directives and describes the calling sequence, related
-constants, usage, and status codes.
-
-@c
-@c
-@c
-@page
-@subsection SEMAPHORE_CREATE - Create a semaphore
-
-@cindex create a semaphore
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_semaphore_create
-@example
-rtems_status_code rtems_semaphore_create(
- rtems_name name,
- rtems_unsigned32 count,
- rtems_attribute attribute_set,
- rtems_task_priority priority_ceiling,
- rtems_id *id
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Semaphore_Create (
- Name : in RTEMS.Name;
- Count : in RTEMS.Unsigned32;
- Attribute_Set : in RTEMS.Attribute;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - semaphore created successfully@*
-@code{@value{RPREFIX}INVALID_NAME} - invalid task name@*
-@code{@value{RPREFIX}TOO_MANY} - too many semaphores created@*
-@code{@value{RPREFIX}NOT_DEFINED} - invalid attribute set@*
-@code{@value{RPREFIX}INVALID_NUMBER} - invalid starting count for binary semaphore@*
-@code{@value{RPREFIX}MP_NOT_CONFIGURED} - multiprocessing not configured@*
-@code{@value{RPREFIX}TOO_MANY} - too many global objects
-
-@subheading DESCRIPTION:
-
-This directive creates a semaphore which resides on
-the local node. The created semaphore has the user-defined name
-specified in name and the initial count specified in count. For
-control and maintenance of the semaphore, RTEMS allocates and
-initializes a SMCB. The RTEMS-assigned semaphore id is returned
-in id. This semaphore id is used with other semaphore related
-directives to access the semaphore.
-
-Specifying PRIORITY in attribute_set causes tasks
-waiting for a semaphore to be serviced according to task
-priority. When FIFO is selected, tasks are serviced in First
-In-First Out order.
-
-@subheading NOTES:
-
-This directive will not cause the calling task to be
-preempted.
-
-The priority inheritance and priority ceiling
-algorithms are only supported for local, binary semaphores that
-use the priority task wait queue blocking discipline.
-
-The following semaphore attribute constants are
-defined by RTEMS:
-
-@itemize @bullet
-@item @code{@value{RPREFIX}FIFO} - tasks wait by FIFO (default)
-
-@item @code{@value{RPREFIX}PRIORITY} - tasks wait by priority
-
-@item @code{@value{RPREFIX}BINARY_SEMAPHORE} - restrict values to
-0 and 1 (default)
-
-@item @code{@value{RPREFIX}COUNTING_SEMAPHORE} - no restriction on values
-
-@item @code{@value{RPREFIX}NO_INHERIT_PRIORITY} - do not use priority
-inheritance (default)
-
-@item @code{@value{RPREFIX}INHERIT_PRIORITY} - use priority inheritance
-
-@item @code{@value{RPREFIX}PRIORITY_CEILING} - use priority ceiling
-
-@item @code{@value{RPREFIX}NO_PRIORITY_CEILING} - do not use priority
-ceiling (default)
-
-@item @code{@value{RPREFIX}LOCAL} - local task (default)
-
-@item @code{@value{RPREFIX}GLOBAL} - global task
-@end itemize
-
-Semaphores should not be made global unless remote
-tasks must interact with the created semaphore. This is to
-avoid the system overhead incurred by the creation of a global
-semaphore. When a global semaphore is created, the semaphore's
-name and id must be transmitted to every node in the system for
-insertion in the local copy of the global object table.
-
-The total number of global objects, including
-semaphores, is limited by the maximum_global_objects field in
-the Configuration Table.
-
-@c
-@c
-@c
-@page
-@subsection SEMAPHORE_IDENT - Get ID of a semaphore
-
-@cindex get ID of a semaphore
-@cindex obtain ID of a semaphore
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_semaphore_ident
-@example
-rtems_status_code rtems_semaphore_ident(
- rtems_name name,
- rtems_unsigned32 node,
- rtems_id *id
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Semaphore_Ident (
- Name : in RTEMS.Name;
- Node : in RTEMS.Unsigned32;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - semaphore identified successfully@*
-@code{@value{RPREFIX}INVALID_NAME} - semaphore name not found@*
-@code{@value{RPREFIX}INVALID_NODE} - invalid node id
-
-@subheading DESCRIPTION:
-
-This directive obtains the semaphore id associated
-with the semaphore name. If the semaphore name is not unique,
-then the semaphore id will match one of the semaphores with that
-name. However, this semaphore id is not guaranteed to
-correspond to the desired semaphore. The semaphore id is used
-by other semaphore related directives to access the semaphore.
-
-@subheading NOTES:
-
-This directive will not cause the running task to be
-preempted.
-
-If node is @code{@value{RPREFIX}SEARCH_ALL_NODES}, all nodes are searched
-with the local node being searched first. All other nodes are
-searched with the lowest numbered node searched first.
-
-If node is a valid node number which does not
-represent the local node, then only the semaphores exported by
-the designated node are searched.
-
-This directive does not generate activity on remote
-nodes. It accesses only the local copy of the global object
-table.
-
-@c
-@c
-@c
-@page
-@subsection SEMAPHORE_DELETE - Delete a semaphore
-
-@cindex delete a semaphore
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_semaphore_delete
-@example
-rtems_status_code rtems_semaphore_delete(
- rtems_id id
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Semaphore_Delete (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - semaphore deleted successfully@*
-@code{@value{RPREFIX}INVALID_ID} - invalid semaphore id@*
-@code{@value{RPREFIX}ILLEGAL_ON_REMOTE_OBJECT} - cannot delete remote semaphore@*
-@code{@value{RPREFIX}RESOURCE_IN_USE} - binary semaphore is in use
-
-@subheading DESCRIPTION:
-
-This directive deletes the semaphore specified by @code{id}.
-All tasks blocked waiting to acquire the semaphore will be
-readied and returned a status code which indicates that the
-semaphore was deleted. The SMCB for this semaphore is reclaimed
-by RTEMS.
-
-@subheading NOTES:
-
-The calling task will be preempted if it is enabled
-by the task's execution mode and a higher priority local task is
-waiting on the deleted semaphore. The calling task will NOT be
-preempted if all of the tasks that are waiting on the semaphore
-are remote tasks.
-
-The calling task does not have to be the task that
-created the semaphore. Any local task that knows the semaphore
-id can delete the semaphore.
-
-When a global semaphore is deleted, the semaphore id
-must be transmitted to every node in the system for deletion
-from the local copy of the global object table.
-
-The semaphore must reside on the local node, even if
-the semaphore was created with the @code{@value{RPREFIX}GLOBAL} option.
-
-Proxies, used to represent remote tasks, are
-reclaimed when the semaphore is deleted.
-
-@c
-@c
-@c
-@page
-@subsection SEMAPHORE_OBTAIN - Acquire a semaphore
-
-@cindex obtain a semaphore
-@cindex lock a semaphore
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_semaphore_obtain
-@example
-rtems_status_code rtems_semaphore_obtain(
- rtems_id id,
- rtems_unsigned32 option_set,
- rtems_interval timeout
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Semaphore_Obtain (
- ID : in RTEMS.ID;
- Option_Set : in RTEMS.Option;
- Timeout : in RTEMS.Interval;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - semaphore obtained successfully@*
-@code{@value{RPREFIX}UNSATISFIED} - semaphore not available@*
-@code{@value{RPREFIX}TIMEOUT} - timed out waiting for semaphore@*
-@code{@value{RPREFIX}OBJECT_WAS_DELETED} - semaphore deleted while waiting@*
-@code{@value{RPREFIX}INVALID_ID} - invalid semaphore id
-
-@subheading DESCRIPTION:
-
-This directive acquires the semaphore specified by
-id. The @code{@value{RPREFIX}WAIT} and @code{@value{RPREFIX}NO_WAIT} components of the options parameter
-indicate whether the calling task wants to wait for the
-semaphore to become available or return immediately if the
-semaphore is not currently available. With either @code{@value{RPREFIX}WAIT} or
-@code{@value{RPREFIX}NO_WAIT}, if the current semaphore count is positive, then it is
-decremented by one and the semaphore is successfully acquired by
-returning immediately with a successful return code.
-
-If the calling task chooses to return immediately and the current
-semaphore count is zero or negative, then a status code is returned
-indicating that the semaphore is not available. If the calling task
-chooses to wait for a semaphore and the current semaphore count is zero or
-negative, then it is decremented by one and the calling task is placed on
-the semaphore's wait queue and blocked. If the semaphore was created with
-the @code{@value{RPREFIX}PRIORITY} attribute, then the calling task is
-inserted into the queue according to its priority. However, if the
-semaphore was created with the @code{@value{RPREFIX}FIFO} attribute, then
-the calling task is placed at the rear of the wait queue. If the binary
-semaphore was created with the @code{@value{RPREFIX}INHERIT_PRIORITY}
-attribute, then the priority of the task currently holding the binary
-semaphore is guaranteed to be greater than or equal to that of the
-blocking task. If the binary semaphore was created with the
-@code{@value{RPREFIX}PRIORITY_CEILING} attribute, a task successfully
-obtains the semaphore, and the priority of that task is greater than the
-ceiling priority for this semaphore, then the priority of the task
-obtaining the semaphore is elevated to that of the ceiling.
-
-The timeout parameter specifies the maximum interval the calling task is
-willing to be blocked waiting for the semaphore. If it is set to
-@code{@value{RPREFIX}NO_TIMEOUT}, then the calling task will wait forever.
-If the semaphore is available or the @code{@value{RPREFIX}NO_WAIT} option
-component is set, then timeout is ignored.
-
-@subheading NOTES:
-The following semaphore acquisition option constants
-are defined by RTEMS:
-
-@itemize @bullet
-@item @code{@value{RPREFIX}WAIT} - task will wait for semaphore (default)
-@item @code{@value{RPREFIX}NO_WAIT} - task should not wait
-@end itemize
-
-Attempting to obtain a global semaphore which does not reside on the local
-node will generate a request to the remote node to access the semaphore.
-If the semaphore is not available and @code{@value{RPREFIX}NO_WAIT} was
-not specified, then the task must be blocked until the semaphore is
-released. A proxy is allocated on the remote node to represent the task
-until the semaphore is released.
-
-A clock tick is required to support the timeout functionality of
-this directive.
-
-@c
-@c
-@c
-@page
-@subsection SEMAPHORE_RELEASE - Release a semaphore
-
-@cindex release a semaphore
-@cindex unlock a semaphore
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_semaphore_release
-@example
-rtems_status_code rtems_semaphore_release(
- rtems_id id
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Semaphore_Release (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - semaphore released successfully@*
-@code{@value{RPREFIX}INVALID_ID} - invalid semaphore id@*
-@code{@value{RPREFIX}NOT_OWNER_OF_RESOURCE} - calling task does not own semaphore
-
-@subheading DESCRIPTION:
-
-This directive releases the semaphore specified by
-id. The semaphore count is incremented by one. If the count is
-zero or negative, then the first task on this semaphore's wait
-queue is removed and unblocked. The unblocked task may preempt
-the running task if the running task's preemption mode is
-enabled and the unblocked task has a higher priority than the
-running task.
-
-@subheading NOTES:
-
-The calling task may be preempted if it causes a
-higher priority task to be made ready for execution.
-
-Releasing a global semaphore which does not reside on
-the local node will generate a request telling the remote node
-to release the semaphore.
-
-If the task to be unblocked resides on a different
-node from the semaphore, then the semaphore allocation is
-forwarded to the appropriate node, the waiting task is
-unblocked, and the proxy used to represent the task is reclaimed.
-
-The outermost release of a local, binary, priority
-inheritance or priority ceiling semaphore may result in the
-calling task having its priority lowered. This will occur if
-the calling task holds no other binary semaphores and it has
-inherited a higher priority.
-
-@c
-@c
-@c
-@page
-@subsection SEMAPHORE_FLUSH - Unblock all tasks waiting on a semaphore
-
-@cindex flush a semaphore
-@cindex unlock all tasks a semaphore
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_semaphore_flush
-@example
-rtems_status_code rtems_semaphore_flush(
- rtems_id id
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Semaphore_Flush (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - semaphore released successfully@*
-@code{@value{RPREFIX}INVALID_ID} - invalid semaphore id@*
-@code{@value{RPREFIX}ILLEGAL_ON_REMOTE_OBJECT} - not supported for remote semaphores
-
-@subheading DESCRIPTION:
-
-This directive unblocks all tasks waiting on the semaphore specified by
-id. Since there are tasks blocked on the semaphore, the semaphore's
-count is not changed by this directive and thus is zero before and
-after this directive is executed. Tasks which are unblocked as the
-result of this directive will return from the
-@code{@value{DIRPREFIX}semaphore_release} directive with a
-status code of @code{@value{RPREFIX}UNSATISFIED} to indicate
-that the semaphore was not obtained.
-
-This directive may unblock any number of tasks. Any of the unblocked
-tasks may preempt the running task if the running task's preemption mode is
-enabled and an unblocked task has a higher priority than the
-running task.
-
-@subheading NOTES:
-
-The calling task may be preempted if it causes a
-higher priority task to be made ready for execution.
-
-If the task to be unblocked resides on a different
-node from the semaphore, then the waiting task is
-unblocked, and the proxy used to represent the task is reclaimed.
-
-
diff --git a/doc/user/signal.t b/doc/user/signal.t
deleted file mode 100644
index 012824fc71..0000000000
--- a/doc/user/signal.t
+++ /dev/null
@@ -1,383 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Signal Manager
-
-@cindex signals
-
-@section Introduction
-
-The signal manager provides the capabilities required
-for asynchronous communication. The directives provided by the
-signal manager are:
-
-@itemize @bullet
-@item @code{@value{DIRPREFIX}signal_catch} - Establish an ASR
-@item @code{@value{DIRPREFIX}signal_send} - Send signal set to a task
-@end itemize
-
-@section Background
-
-@subsection Signal Manager Definitions
-
-@cindex asynchronous signal routine
-@cindex ASR
-
-The signal manager allows a task to optionally define
-an asynchronous signal routine (ASR). An ASR is to a task what
-an ISR is to an application's set of tasks. When the processor
-is interrupted, the execution of an application is also
-interrupted and an ISR is given control. Similarly, when a
-signal is sent to a task, that task's execution path will be
-"interrupted" by the ASR. Sending a signal to a task has no
-effect on the receiving task's current execution state.
-
-A signal flag is used by a task (or ISR) to inform
-another task of the occurrence of a significant situation.
-Thirty-two signal flags are associated with each task. A
-collection of one or more signals is referred to as a signal
-set. A signal set is posted when it is directed (or sent) to a
-task. A pending signal is a signal that has been sent to a task
-with a valid ASR, but has not been processed by that task's ASR.
-
-
-@subsection A Comparison of ASRs and ISRs
-
-@cindex ASR vs. ISR
-@cindex ISR vs. ASR
-
-The format of an ASR is similar to that of an ISR
-with the following exceptions:
-
-@itemize @bullet
-@item ISRs are scheduled by the processor hardware. ASRs are
-scheduled by RTEMS.
-
-@item ISRs do not execute in the context of a task and may
-invoke only a subset of directives. ASRs execute in the context
-of a task and may execute any directive.
-
-@item When an ISR is invoked, it is passed the vector number
-as its argument. When an ASR is invoked, it is passed the
-signal set as its argument.
-
-@item An ASR has a task mode which can be different from that
-of the task. An ISR does not execute as a task and, as a
-result, does not have a task mode.
-@end itemize
-
-@subsection Building a Signal Set
-
-@cindex signal set, building
-
-A signal set is built by a bitwise OR of the desired
-signals. The set of valid signals is @code{@value{RPREFIX}SIGNAL_0} through
-@code{@value{RPREFIX}SIGNAL_31}. If a signal is not explicitly specified in the
-signal set, then it is not present. Signal values are
-specifically designed to be mutually exclusive, therefore
-bitwise OR and addition operations are equivalent as long as
-each signal appears exactly once in the component list.
-
-This example demonstrates the signal parameter used
-when sending the signal set consisting of
-@code{@value{RPREFIX}SIGNAL_6},
-@code{@value{RPREFIX}SIGNAL_15}, and
-@code{@value{RPREFIX}SIGNAL_31}. The signal parameter provided
-to the @code{@value{DIRPREFIX}signal_send} directive should be
-@code{@value{RPREFIX}SIGNAL_6 @value{OR}
-@value{RPREFIX}SIGNAL_15 @value{OR} @value{RPREFIX}SIGNAL_31}.
-
-@subsection Building an ASR Mode
-
-@cindex ASR mode, building
-
-In general, an ASR's mode is built by a bitwise OR of
-the desired mode components. The set of valid mode components
-is the same as those allowed with the task_create and task_mode
-directives. A complete list of mode options is provided in the
-following table:
-
-@itemize @bullet
-@item @code{@value{RPREFIX}PREEMPT} is masked by
-@code{@value{RPREFIX}PREEMPT_MASK} and enables preemption
-
-@item @code{@value{RPREFIX}NO_PREEMPT} is masked by
-@code{@value{RPREFIX}PREEMPT_MASK} and disables preemption
-
-@item @code{@value{RPREFIX}NO_TIMESLICE} is masked by
-@code{@value{RPREFIX}TIMESLICE_MASK} and disables timeslicing
-
-@item @code{@value{RPREFIX}TIMESLICE} is masked by
-@code{@value{RPREFIX}TIMESLICE_MASK} and enables timeslicing
-
-@item @code{@value{RPREFIX}ASR} is masked by
-@code{@value{RPREFIX}ASR_MASK} and enables ASR processing
-
-@item @code{@value{RPREFIX}NO_ASR} is masked by
-@code{@value{RPREFIX}ASR_MASK} and disables ASR processing
-
-@item @code{@value{RPREFIX}INTERRUPT_LEVEL(0)} is masked by
-@code{@value{RPREFIX}INTERRUPT_MASK} and enables all interrupts
-
-@item @code{@value{RPREFIX}INTERRUPT_LEVEL(n)} is masked by
-@code{@value{RPREFIX}INTERRUPT_MASK} and sets interrupts level n
-@end itemize
-
-Mode values are specifically designed to be mutually
-exclusive, therefore bitwise OR and addition operations are
-equivalent as long as each mode appears exactly once in the
-component list. A mode component listed as a default is not
-required to appear in the mode list, although it is a good
-programming practice to specify default components. If all
-defaults are desired, the mode DEFAULT_MODES should be specified
-on this call.
-
-This example demonstrates the mode parameter used
-with the @code{@value{DIRPREFIX}signal_catch}
-to establish an ASR which executes at
-interrupt level three and is non-preemptible. The mode should
-be set to
-@code{@value{RPREFIX}INTERRUPT_LEVEL(3) @value{OR} @value{RPREFIX}NO_PREEMPT}
-to indicate the
-desired processor mode and interrupt level.
-
-@section Operations
-
-@subsection Establishing an ASR
-
-The @code{@value{DIRPREFIX}signal_catch} directive establishes an ASR for the
-calling task. The address of the ASR and its execution mode are
-specified to this directive. The ASR's mode is distinct from
-the task's mode. For example, the task may allow preemption,
-while that task's ASR may have preemption disabled. Until a
-task calls @code{@value{DIRPREFIX}signal_catch} the first time,
-its ASR is invalid, and no signal sets can be sent to the task.
-
-A task may invalidate its ASR and discard all pending
-signals by calling @code{@value{DIRPREFIX}signal_catch}
-with a value of NULL for the ASR's address. When a task's
-ASR is invalid, new signal sets sent to this task are discarded.
-
-A task may disable ASR processing (@code{@value{RPREFIX}NO_ASR}) via the
-task_mode directive. When a task's ASR is disabled, the signals
-sent to it are left pending to be processed later when the ASR
-is enabled.
-
-Any directive that can be called from a task can also
-be called from an ASR. A task is only allowed one active ASR.
-Thus, each call to @code{@value{DIRPREFIX}signal_catch}
-replaces the previous one.
-
-Normally, signal processing is disabled for the ASR's
-execution mode, but if signal processing is enabled for the ASR,
-the ASR must be reentrant.
-
-@subsection Sending a Signal Set
-
-The @code{@value{DIRPREFIX}signal_send} directive allows both
-tasks and ISRs to send signals to a target task. The target task and
-a set of signals are specified to the
-@code{@value{DIRPREFIX}signal_send} directive. The sending
-of a signal to a task has no effect on the execution state of
-that task. If the task is not the currently running task, then
-the signals are left pending and processed by the task's ASR the
-next time the task is dispatched to run. The ASR is executed
-immediately before the task is dispatched. If the currently
-running task sends a signal to itself or is sent a signal from
-an ISR, its ASR is immediately dispatched to run provided signal
-processing is enabled.
-
-If an ASR with signals enabled is preempted by
-another task or an ISR and a new signal set is sent, then a new
-copy of the ASR will be invoked, nesting the preempted ASR.
-Upon completion of processing the new signal set, control will
-return to the preempted ASR. In this situation, the ASR must be
-reentrant.
-
-Like events, identical signals sent to a task are not
-queued. In other words, sending the same signal multiple times
-to a task (without any intermediate signal processing occurring
-for the task), has the same result as sending that signal to
-that task once.
-
-@subsection Processing an ASR
-
-Asynchronous signals were designed to provide the
-capability to generate software interrupts. The processing of
-software interrupts parallels that of hardware interrupts. As a
-result, the differences between the formats of ASRs and ISRs is
-limited to the meaning of the single argument passed to an ASR.
-The ASR should have the following calling sequence and adhere to
-@value{LANGUAGE} calling conventions:
-
-@ifset is-C
-@example
-rtems_asr user_routine(
- rtems_signal_set signals
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure User_Routine (
- Signals : in RTEMS.Signal_Set
-);
-@end example
-@end ifset
-
-When the ASR returns to RTEMS the mode and execution
-path of the interrupted task (or ASR) is restored to the context
-prior to entering the ASR.
-
-@section Directives
-
-This section details the signal manager's directives.
-A subsection is dedicated to each of this manager's directives
-and describes the calling sequence, related constants, usage,
-and status codes.
-
-@c
-@c
-@c
-@page
-@subsection SIGNAL_CATCH - Establish an ASR
-
-@cindex establish an ASR
-@cindex install an ASR
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_signal_catch
-@example
-rtems_status_code rtems_signal_catch(
- rtems_asr_entry asr_handler,
- rtems_mode mode
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Signal_Catch (
- ASR_Handler : in RTEMS.ASR_Handler;
- Mode_Set : in RTEMS.Mode;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - always successful
-
-@subheading DESCRIPTION:
-
-This directive establishes an asynchronous signal
-routine (ASR) for the calling task. The asr_handler parameter
-specifies the entry point of the ASR. If asr_handler is NULL,
-the ASR for the calling task is invalidated and all pending
-signals are cleared. Any signals sent to a task with an invalid
-ASR are discarded. The mode parameter specifies the execution
-mode for the ASR. This execution mode supersedes the task's
-execution mode while the ASR is executing.
-
-@subheading NOTES:
-
-This directive will not cause the calling task to be
-preempted.
-
-The following task mode constants are defined by RTEMS:
-
-@itemize @bullet
-@item @code{@value{RPREFIX}PREEMPT} is masked by
-@code{@value{RPREFIX}PREEMPT_MASK} and enables preemption
-
-@item @code{@value{RPREFIX}NO_PREEMPT} is masked by
-@code{@value{RPREFIX}PREEMPT_MASK} and disables preemption
-
-@item @code{@value{RPREFIX}NO_TIMESLICE} is masked by
-@code{@value{RPREFIX}TIMESLICE_MASK} and disables timeslicing
-
-@item @code{@value{RPREFIX}TIMESLICE} is masked by
-@code{@value{RPREFIX}TIMESLICE_MASK} and enables timeslicing
-
-@item @code{@value{RPREFIX}ASR} is masked by
-@code{@value{RPREFIX}ASR_MASK} and enables ASR processing
-
-@item @code{@value{RPREFIX}NO_ASR} is masked by
-@code{@value{RPREFIX}ASR_MASK} and disables ASR processing
-
-@item @code{@value{RPREFIX}INTERRUPT_LEVEL(0)} is masked by
-@code{@value{RPREFIX}INTERRUPT_MASK} and enables all interrupts
-
-@item @code{@value{RPREFIX}INTERRUPT_LEVEL(n)} is masked by
-@code{@value{RPREFIX}INTERRUPT_MASK} and sets interrupts level n
-@end itemize
-
-@c
-@c
-@c
-@page
-@subsection SIGNAL_SEND - Send signal set to a task
-
-@cindex send signal set
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_signal_send
-@example
-rtems_status_code rtems_signal_send(
- rtems_id id,
- rtems_signal_set signal_set
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Signal_Send (
- ID : in RTEMS.ID;
- Signal_Set : in RTEMS.Signal_Set;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - signal sent successfully@*
-@code{@value{RPREFIX}INVALID_ID} - task id invalid@*
-@code{@value{RPREFIX}NOT_DEFINED} - ASR invalid
-
-@subheading DESCRIPTION:
-
-This directive sends a signal set to the task
-specified in id. The signal_set parameter contains the signal
-set to be sent to the task.
-
-If a caller sends a signal set to a task with an
-invalid ASR, then an error code is returned to the caller. If a
-caller sends a signal set to a task whose ASR is valid but
-disabled, then the signal set will be caught and left pending
-for the ASR to process when it is enabled. If a caller sends a
-signal set to a task with an ASR that is both valid and enabled,
-then the signal set is caught and the ASR will execute the next
-time the task is dispatched to run.
-
-@subheading NOTES:
-
-Sending a signal set to a task has no effect on that
-task's state. If a signal set is sent to a blocked task, then
-the task will remain blocked and the signals will be processed
-when the task becomes the running task.
-
-Sending a signal set to a global task which does not
-reside on the local node will generate a request telling the
-remote node to send the signal set to the specified task.
-
diff --git a/doc/user/states.eps b/doc/user/states.eps
deleted file mode 100644
index cea4e7f344..0000000000
--- a/doc/user/states.eps
+++ /dev/null
@@ -1,13822 +0,0 @@
-%!PS-Adobe-3.0 EPSF-3.0
-%%Creator: (ImageMagick)
-%%Title: (states.eps)
-%%CreationDate: (Wed Oct 6 11:08:51 1999)
-%%BoundingBox: 0 109 495 573
-%%DocumentData: Clean7Bit
-%%LanguageLevel: 1
-%%Pages: 0
-%%EndComments
-
-%%BeginDefaults
-%%PageOrientation: Portrait
-%%EndDefaults
-
-%%BeginProlog
-%
-% Display a color image. The image is displayed in color on
-% Postscript viewers or printers that support color, otherwise
-% it is displayed as grayscale.
-%
-/buffer 512 string def
-/byte 1 string def
-/color_packet 3 string def
-/pixels 768 string def
-
-/DirectClassPacket
-{
- %
- % Get a DirectClass packet.
- %
- % Parameters:
- % red.
- % green.
- % blue.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/DirectClassImage
-{
- %
- % Display a DirectClass image.
- %
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { DirectClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayDirectClassPacket } image
- } ifelse
-} bind def
-
-/GrayDirectClassPacket
-{
- %
- % Get a DirectClass packet; convert to grayscale.
- %
- % Parameters:
- % red
- % green
- % blue
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/GrayPseudoClassPacket
-{
- %
- % Get a PseudoClass packet; convert to grayscale.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassPacket
-{
- %
- % Get a PseudoClass packet.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassImage
-{
- %
- % Display a PseudoClass image.
- %
- % Parameters:
- % class: 0-PseudoClass or 1-Grayscale.
- %
- currentfile buffer readline pop
- token pop /class exch def pop
- class 0 gt
- {
- currentfile buffer readline pop
- token pop /depth exch def pop
- /grays columns 8 add depth sub depth mul 8 idiv string def
- columns rows depth
- [
- columns 0 0
- rows neg 0 rows
- ]
- { currentfile grays readhexstring pop } image
- }
- {
- %
- % Parameters:
- % colors: number of colors in the colormap.
- % colormap: red, green, blue color packets.
- %
- currentfile buffer readline pop
- token pop /colors exch def pop
- /colors colors 3 mul def
- /colormap colors string def
- currentfile colormap readhexstring pop pop
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { PseudoClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayPseudoClassPacket } image
- } ifelse
- } ifelse
-} bind def
-
-/DisplayImage
-{
- %
- % Display a DirectClass or PseudoClass image.
- %
- % Parameters:
- % x & y translation.
- % x & y scale.
- % label pointsize.
- % image label.
- % image columns & rows.
- % class: 0-DirectClass or 1-PseudoClass.
- % compression: 0-RunlengthEncodedCompression or 1-NoCompression.
- % hex color packets.
- %
- gsave
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- x y translate
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- currentfile buffer readline pop
- token pop /pointsize exch def pop
- /Helvetica findfont pointsize scalefont setfont
- x y scale
- currentfile buffer readline pop
- token pop /columns exch def
- token pop /rows exch def pop
- currentfile buffer readline pop
- token pop /class exch def pop
- currentfile buffer readline pop
- token pop /compression exch def pop
- class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
- grestore
-} bind def
-%%EndProlog
-%%Page: 1 1
-%%PageBoundingBox: 0 109 495 573
-userdict begin
-%%BeginData:
-DisplayImage
-0 109
-495.101124 464.359551
-12
-721 676
-1
-1
-1
-8
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff87ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff8787ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff8787ffffffff6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6effff8787ffffffff876e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6effffff8787ffffffff8787a07762636363636363636363636363636363636363636363
-636363636363636363636363636363636363636363636363636363636363636363636363
-636363636363636363636363636363636363636363636363636363636363636363636363
-636363636363636363636363636363636363636363636363636363636363636363636363
-636363636363636363636363636363636363636363636363636363636363636363636363
-636363636363636363636363636363636363636363636363636363636363636363636363
-636363636363636363636363636363636363636363636363636363636363636363636363
-636363636363636363636363636363636363636363636363636363636363636363636363
-636363636363636363636363636363636363636363636363636363636363636363636363
-636363636363636363636363636363636363636363636363636363636363636363636363
-636363636363636363636363636363636363636363636363636363636363636363636363
-636363636363636363636363636363636363636363636363636363636363636363636363
-636363636363636363636363636363636363636363636363636363636363636363636363
-636363636363636363636363636363636363636363636363636363636363636363636363
-636363636363636363636363636363636363636363636363636363636363636363636363
-636363636363636363636363636363636363636363636363636363636363636363636363
-636363636363636363636363636363636363636363636363636363636363636363636363
-636363636363636363636363636363636363636363636363636363636363636363636363
-636363636363636363636363636363636363636363636363636363636363636363636363
-636363636363636363636363636363636363636363636363636363636363636363636362
-75ffffffff8787ffffffff87877731111a19191919191919191919191919191919191919
-191919191919191919191919191919191919191919191919191919191919191919191919
-191919191919191919191919191919191919191919191919191919191919191919191919
-191919191919191919191919191919191919191919191919191919191919191919191919
-191919191919191919191919191919191919191919191919191919191919191919191919
-191919191919191919191919191919191919191919191919191919191919191919191919
-191919191919191919191919191919191919191919191919191919191919191919191919
-191919191919191919191919191919191919191919191919191919191919191919191919
-191919191919191919191919191919191919191919191919191919191919191919191919
-191919191919191919191919191919191919191919191919191919191919191919191919
-191919191919191919191919191919191919191919191919191919191919191919191919
-191919191919191919191919191919191919191919191919191919191919191919191919
-191919191919191919191919191919191919191919191919191919191919191919191919
-191919191919191919191919191919191919191919191919191919191919191919191919
-191919191919191919191919191919191919191919191919191919191919191919191919
-191919191919191919191919191919191919191919191919191919191919191919191919
-191919191919191919191919191919191919191919191919191919191919191919191919
-191919191919191919191919191919191919191919191919191919191919191919191919
-191919191919191919191919191919191919191919191919191919191919191919191919
-19191919191919191919191919191919191919191919191919191919191919191919191a
-123affffffff8787ffffffff878763140000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-00001effffffff8787ffffffff8787631900000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-0000001effffffff8787ffffffff87876319000000050000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000003
-000000001effffffff8787ffffffff87876319000005ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff820000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff810000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff7a747effffffffffffffffffbe687affffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7a68beff
-fffffffffffffffffffffffffffffffffffffffeffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffeffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffd000000b3ffffffffffffffff730000fdffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb000070
-ffffffffffffffffffffffffffffffffffffff5e82ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff5e82ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff00000000f8ffffffffffffff7f0000ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa0400
-7effffffffffffffffffffffffffffffffffff3c0077ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff3c0077ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff0000000080ffffffffffffff7f0000ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd
-fdffffffffffffffffffffffffffffffffffffff00007fffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff00007fffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff0000080000c3ffffffffffff7f0000ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff000081ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff000081ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff00007a230037ffffffffffff7f0000ffff
-fffffffffffff5827872bcfffffffffffffffff8f9ffffb9727881f6ffffffffffffffff
-ffffffffffffffffffffffbd727b72baffffffffffffeefbfcfffffffffffffffffbf3f8
-fff7f8fffffffffffff481787882f4fffffffffffefa050080fff7ffffffffffffbd727b
-72bafffffffffffffff8f8fffff4827872bafffffffffffefa050080fff7ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff878763190000
-00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff00009b9d00007affffffffff7f0000ff
-ffffffffffc23100000000000176ffffffffff7c000cff44000000000077ffffffffffff
-ffffffffffffffffffffb100000000000034c2ffffffff460000b1ffffffffffff3b0000
-c2ff00007cffffffffb20000000000003efffffffa00000000000000faffffffb1000000
-00000034c2fffffffffa000096cb000000000030cafffffa00000000000000faffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff8787631900
-0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff000089ff3c0003feffffffff7f0000
-ffffffffffb30000000003000000003effffffff7d00043b00000003000000bfffffffff
-ffffffffffffffffffff41000000020001000000b3ffffffff380000c1ffffffff410000
-b8ffff00007dffffffc0000000030200000041fffffb00000000000000fbffff41000000
-020001000000b3ffffffff0000380000000300000035fffffb00000000000000fbffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319
-000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff00007fffc8000045ffffffff7f00
-00fffffffff70000003fcdffff850b000079ffffff7f0000004bffffff4e000035ffffff
-ffffffffffffffffffffb200003dceffffff88000000f7ffffffc8000037ffffffb60000
-49ffffff00007fffffff350000c6ffffcf400000afffff85830000419182ffffb200003d
-ceffffff88000000f7ffffff00000000c2ffffc3000000bcffff85830000419182ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff878763
-19000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff00007fffff850000b3ffffff7f
-0000ffffffff8a000087fffffffffffd0c0004ffffff7f00003fffffffffff450000ffff
-ffffffffffffffffffffff000055ffffffffffffca00008affffffff8100007fffc40000
-3effffffff00007fffffff00007affffffffff002ac3ffffffff02008bffffffff000055
-ffffffffffffca00008affffff000000bfffffffffc300007affffffff02008bffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff8787
-6319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff00007ffffffb000000f8ffff
-7f0000ffffffff3a0006feffffffffffff830000bfffff7f0000caffffffffff850000ff
-ffffffffffffffffffffffbf0005ffffffffffffffff7f003affffffffff4b0000c24800
-00c6ffffffff00007fffffff030000beffffffffffffffffffffff00007fffffffbf0005
-ffffffffffffffff7f003affffff000043ffffffffffff00007fffffffff00007fffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87
-876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff00007fffffffba00007fff
-ff7f0000ffffffff00007bffffffffffffffff00007affff7f0000ffffffffffff7f0000
-fffffff6fffffffffffff5ff7c00000300000000000000000000ffffffffffff03000000
-00bdffffffffff00007fffffff7e000000003689f6ffffffffffffff00007fffffff7a00
-000300000000000000000000ffffff000084ffffffffffff00007fffffffff00007fffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff
-87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff00007fffffffff4d0000
-c3ff800000ffffffff000080ffffffffffffffff00007fffff7f0000ffffffffffff7f00
-00fffffa0000000000000000ff8500000000000000000000000000fdffffffffffca0000
-0058ffffffffffff00007fffffffff4700000000000031c0ffffffffff00007fffffff7f
-00000000000000000000000000fdffff00007fffffffffffff00007fffffffff00007fff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffff
-ff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff00007fffffffffff07
-0036ff8a0000ffffffff000080ffffffffffffffff00007fffff7f0000ffffffffffff7f
-0000fffffb0000000000000000ff850000898a868686868686868282ffffffffffffc100
-0000bdffffffffffff00007fffffffffffca3c0000000000003fffffffff00007fffffff
-7f0000898a868686868686868282ffffff00007fffffffffffff00007fffffffff00007f
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffff
-ffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00007fffffffffff
-800000989b0000ffffffff000077fffffffffffffffc000079ffff7f0000ffffffffffff
-7f0000ffffff8483878787878383ff7c0003fffffffffffffffffffffffffffffffffc00
-00000000c0ffffffffff00007ffffffffffffffffc907d0c000000baffffff00007fffff
-ff790003ffffffffffffffffffffffffffff00007fffffffffffff00007fffffffff0000
-7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ff
-ffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00007fffffffff
-ffff3e001f780000ffffffff400004faffffffffffff7d0000c5ffff7f0000ffffffffff
-ff7f0000ffffffffffffffffffffffffc5000080ffffffffffffffaeb0f6ffffffffff41
-000684020038ffffffffff00007fffffffb073ffffffffffffcb000078ffffff00007fff
-ffffc5000080ffffffffffffffaeb0f6ffffff00007fffffffffffff00007fffffffff00
-007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787
-ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00007fffffff
-ffffffc80000050000ffffffff8e000080fffffffffff5080007ffffff7f0000ffffffff
-ffff7f0000ffffffffffffffffffffffffff070000b8ffffffffffb600003fffffffff7c
-000085ffc2000040ffffffff00007fffff870000b6ffffffffffff030089ffffff000086
-ffffffff070000b8ffffffffffb600003fffffff00007fffffffffffff00007fffffffff
-000086ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff87
-87ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00007fffff
-ffffffffff8600000000fffffffff901000036c4fffb7a0500007fffffff7f0000ffffff
-ffffff7f0000ffffffffffffffffffffffffff7f0000007dfbfffb7d000000c2ffffffb3
-00004cffffff4d0000b2ffffff00007ffffffa0100007dfbffffc6390005fbffffff0000
-43fff9ffff7f0000007dfbfffb7d000000c2ffffff00007fffffffffffff00007fffffff
-ff000043fff9ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff
-8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00007fff
-fffffffffffffa02000000ffffffffffbb00000000000000000047ffffffff7f0000ffff
-ffffffff7f0000ffffffffffffffffffffffffffff4700000000000000000047fffffffd
-000002fffffffffe020000fdffff00007fffffff800000000000000000007dffffffff00
-00000000f2ffff4700000000000000000047ffffffff00007fffffffffffff00007fffff
-ffff0000000000f2ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffff
-ff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc000072
-ffffffffffffffffb9000000fcffffffffffcb3a00000000000982ffffffffff720000fc
-ffffffffff720000fcffffffffffffffffffffffffffff820900000000000981fffffff2
-240000bcffffffffffbc000024f9ff000072ffffffffb90300000000000880ffffffffff
-b80000000074ffffff820900000000000981fffffffffc000072fffffffffffc000072ff
-ffffffb80000000074ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effff
-ffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8575
-c3ffffffffffffffffff8a8185fffffffffffffffffe908680c7ffffffffffffffc37585
-ffffffffffffc37585ffffffffffffffffffffffffffffffffffc7808980c7ffffffffff
-c46d7cc3ffffffffffffffc37c6dc8ff8575c3ffffffffffffc7808980c7ffffffffffff
-fffffc8e8678c3ffffffffffc7808980c7ffffffffffffff8575c3ffffffffffff8575c3
-fffffffffffc8e8678c3ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001eff
-ffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001e
-ffffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000
-1effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000
-001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00
-00001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f
-0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff726f74747474747474
-747474747474747474747474747474747474747474747474747474747474747474747474
-747474747474747474747474747474747474747474747474747474747474747474747474
-747474747474747474747474747474747474747474747474747474747474747474747474
-747474747474747474747474747474747474747474747474747474747474747474747474
-747474747474747474747474747474747474747474747474747474747474747474747474
-747474747474747474747474747474747474747474747474747474747474747474747474
-747474747474747474747474747474747474747474747474747474747474747474747474
-747474747474747474747474747474747474747474747474747474747474747474747474
-747474747474747474747474747474747474747474747474747474747474747474747474
-747474747474747474747474747474747474747474747474747474747474747474747474
-747474747474747474747474747474747474747474747474747474747474747474747474
-747474747474747474747474747474747474747474747474747474747474747474747474
-747474747474747474747474747474747474747474747474747474747474747474747474
-747474747474747474747474747474747474747474747474747474747474747474747474
-747474747474747474747474747474747474747474747474747474747474747474747474
-747474747474747474747474747474747474747474747474747474747474747474747474
-747474747474747474747474747474747474747474747474747474747474747474747474
-74747463baffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffd0000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000074ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-0000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000
-0a0101010101010101010101010101010101010101010101010101010101010101010101
-010101010101010101010101010101010101010101010101010101010101010101010101
-010101010101010101010101010101010101010101010101010101010101010101010101
-010101010101010101010101010101010101010101010101010101010101010101010101
-010101010101010101010101010101010101010101010101010101010101010101010101
-010101010101010101010101010101010101010101010101010101010101010101010101
-010101010101010101010101010101010101010101010101010101010101010101010101
-010101010101010101010101010101010101010101010101010101010101010101010101
-0101010101010101010101010101020a1a22222011040101010101010101010101010101
-010101010101010101010101010101010101010101010101010101010101010101010101
-010101010101010101010101010101010101010101010101010101010101010101010101
-010101010101010101010101010101010101010101010101010101010101010101010101
-010101010101010101010101010101010101010101010101010101010101010101010101
-010101010101010101010101010101010101010101010101010101010101010101010101
-010101010101010101010101010101010101010101010101010101010101010101010101
-010101010101010101010101010101010101010101010101010101010101010101010101
-010101010101010101010101010101010101010101010101010101010101010101010101
-0101030a000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-84ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff7c797e6cc4ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff040000007fffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-0081ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff0000000078ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-00007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff878763190000
-00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff8787631900
-0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319
-000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff878763
-19000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff8787
-6319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffff
-fffffffffffffffffffffffff8fdfbffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffafffffffdecffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87
-876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffff
-fffffffffffffffffffffb751c0000006af0ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff8f77ffffff6300f3ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff
-87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffff
-ffffffffffffffffffffff2a003d9091420000a7ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff006effffffc179ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffff
-ff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fff
-ffffffffffffffffffffff2c00c4ffffffffc60000efffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff0087ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffff
-ffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007f
-ffffffffffffffffffffffb900c3ffffffffffffbc0086ffffb36cfc7051aeffffffac60
-60acffffffffffffed6f656572efffffb75d003066b3ffb35dffffb36affb06060aeffff
-ffffffffae615fb6ff67b3ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ff
-ffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-7fffffffffffffffffffffff2500ffffffffffffffffc6ffffff7200200000b2ffff2900
-00000029ffffffffa6000000000000a6ff770000000073ff6f00feff7200230000000033
-ffffffff2c000000005f0072ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787
-ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-007fffffffffffffffffffffff0072ffffffffffffffffffffffff7e0042ffffffff2900
-c6ffffc6002cffffa40044ffffffcd0000ffffff0080ffffff7900ffff7e0000c7ffff52
-00b6ffff2c0090ffff8e00007effffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff87
-87ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-00007fffffffffffffffffffffff007affffffffffffffffffffffff7b00d0fffffff100
-daffffffffdc00b3ffbd7effffffffff8600ffffff007bffffff7900ffff7b00cbffffff
-ff0075fff30084ffffffff8e007effffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff
-8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000007fffffffffffffffffffffff007affffffffffffffffffffffff7a00ffffffff80
-00736c66666c720076fffffffffff7ffc22400ffffff0079ffffff7900ffff7a00ffffff
-ffff0079ff7d00ffffffffffff007affffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffff
-ff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-000000007fffffffffffffffffffffff0067fffffffffffffffffcffffff7900ffffffff
-7d000000000000000081fffffb731a0000000000ffffff0079ffffff7900ffff7900ffff
-ffffff0079ff7800ffffffffffff0079ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effff
-ffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff000000007fffffffffffffffffffffff6a00ffffffffffffffff6e4cfeff7900ffffff
-ff7500fffffffffffffffffffe29003e9384e68900ffffff0079ffffff7900ffff7900ff
-ffffffff0079ff7400ffffffffffff007affffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001eff
-ffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000007fffffffffffffffffffffffc100abfffffffffffffb0026ffff7900ffff
-ffffc500c1ffffffffffeef6ff7c00d0ffffffff7600ffffff007affffff7900ffff7900
-ffffffffff0079ffc500bdffffffffc2007dffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001e
-ffffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff000000007fffffffffffffffffffffffff4400a8fffffffffa2f00caffff7900ff
-ffffffff0026fdffffffa200bbff7300fdffffffa80000ffffff0074ffffff7900ffff79
-00ffffffffff0079ffff0026fdfffffb34007fffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000
-1effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff000000007fffffffffffffffffffffffffff45001e6a66590000c2ffffff7600
-ffffffffffbf00005c6f240041ffffc400005d6d18002a00ffffff000053b4ff7600ffff
-7600ffffffffff0076ffffbf00005f5d0000007effffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000
-001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000007fffffffffffffffffffffffffffff983a00000078caffffffff7d
-00fbffffffffffd13900000088ffffffffd139000033ded300baffffbc000075ff7d00fb
-ff7d00fbfffffffb007dffffffd83a000050ff0079ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00
-00001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffff
-fffdfffffffffffffffffffffffffffffffffffffffffffffffcfefffffffffffffffffd
-fffffffdfffffffffffdffffaf61ffffffffffff0085ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f
-0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff7a00aaffffffff2d00feffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007f
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffa0600226b6a1c0081ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff8b00000035d0ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-00007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff030000008cffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffad566b6b6b6b707000000000357a6b6b6b6b6a57c0ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffb900000000000000000000000000000000000000f2ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff45000000000000000000000000000000000089ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007f
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffcb000000000000000000000000000000000affffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff440000000000000000000000000000008affffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffcb00000000000000000000000000000affffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-00007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff44000000000000000000000000008affffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffcb0000000000000000000000000affffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff4400000000000000000000008affffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffcc0000000000000000000005ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff878763190000
-00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff44000000000000000000c5ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff8787631900
-0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffcc000000000000000045ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319
-000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff4400000000000000ccffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff878763
-19000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffcc00000000000044ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff8787
-6319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff440000000000ccffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87
-876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffcc0000000044ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff
-87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff44000000ccffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffff
-ff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffcc000044ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffff
-ffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff3c00cbff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ff
-ffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc656ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787
-ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4f6fafffb
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff87
-87ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffff1f9ed6f6366696000000000
-002a6e6666636fedf9f1ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff
-8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffcac662a0000000000000000000000
-00000000000000000000002a66acfcffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffff
-ff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffff8b0570000000000000000000000000000
-0000000000000000000000000000000057b0f8ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effff
-ffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffeb752900000000000000000000000000000000
-00000000000000000000000000000000000000002975ebffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001eff
-ffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffed67000000000000000000000c0b0a0a0151a39a
-9a9a9a9a9a9a9d9113070a0a0f000000000000000000000067edffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001e
-ffffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffeb680000000000000000000351a9ffffffffffffff
-ffffffffffffffffffffffffffffd78b170000000000000000000068ebffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000
-1effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffa300000000000000000351a9ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffd49b54030000000000000000a3ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000
-001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffaf250000000000000056a9ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffa9560000000000000025afffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00
-00001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffb2220000000000000050daffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffda500000000000000022
-b2ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f
-0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffa30000000000000052dbffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdb520000000000
-0000a3ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007f
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff2f00000000000052dbffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffcb0d0000
-000000002fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffff137000000000052dbffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff99
-16000000000037f1ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffa3000000000000d0ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff5a000000000000a3ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-00007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffa400000000000ec8ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff9b040000000000a4ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff2f00000000005dffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffce0000000000002fffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffc2f000000000059ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffdb5000000000002ffcffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff7300000000005bffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff58000000000073ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffa70000000000d1ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff9d0500000000a7ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007f
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffb70000000000cfffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffd00000000000b7ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff605757
-57575750a2ffffffffffffffffffffffffffffffffff50acffffffffffffffffffffffff
-ffe5b3ffffffa748fdffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff2f00000000cdffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffcd000000002fffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0000
-00000000000014adffffffffffffffffffffffffffffff006fffffffffffffffffffffff
-ffff1065ffffff7300f5ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff310000000057ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff570000000031ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-82ffffffffff9d0000b4ffffffffffffffffffffffffffff0079ffffffffffffffffffff
-ffffff007bffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-00007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff32000000005bffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff5b0000000032ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-007affffffffffffd20020ffffffffffffeeeeffffffffffff0079ffffffffffeeeeffff
-ffffffe70074fff9fff9e5fffff8e6ffffeeeeffffffffffffffffeeedffffe4f8ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffa6000000005fffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff5f00000000a6ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff0079ffffffffffffff8a00efffffffa909000009a9ffffffff0079ffffffa909000009
-a9ffff680000000066ff7100fbff72009f0f000011a8ffffffffab0d000025e10072ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffb50000000008ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff0800000000b5ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff0079ffffffffffffffff007affff990045a2a245009affffff0079ffff990045a2a2
-45009affd48f0049a0cdff7800ffff7c000048a5960000eeffff9a000594930700007dff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff3000000000ccffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffcc0000000030ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff0079ffffffffffffffff0078ffff005affffffff5d00eeffff0079ffff005affff
-ffff5d00f1ffff0084ffffff7900ffff7e0061ffffffd4007dffff003fffffffff4c007e
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff878763190000
-00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffa300000000ceffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffce00000000a3ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff0079ffffffffffffffff0079ffaf00f3fff2f2fff4007bffff0079ffaf00f3ff
-f2f2fff4007bffff0079ffffff7900ffff7a00ffffffffff0079ffaf00d1ffffffffd500
-7bffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff8787631900
-0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffef0000000047ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4900000000ef
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff0079ffffffffffffffff0078ff7900000000000000006fffff0079ff790000
-0000000000006fffff0079ffffff7900ffff7900ffffffffff0079ff7500ffffffffffff
-007affffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319
-000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff7100000001d3ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd000000000
-71ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff0079ffffffffffffffb5008eff7900a2a19c9c9c9d91d0ffff0079ff7900
-a2a19c9c9c9d91d0ffff0079ffffff7900ffff7900ffffffffff0079ff7700ffffffffff
-ff0079ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff878763
-19000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffff6000000008dffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff470000
-0000f6ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff0079ffffffffffffff6700feff8b00ffffffffffffffffffff0079ff8b
-00ffffffffffffffffffff0079ffffff7900ffff7900ffffffffff0079ff8b00f5ffffff
-fff6007bffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff8787
-6319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff3300000049ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd301
-00000033ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff007dffffffffffffa50053fffffd006dfffffffff94dbbffff0079ff
-fd006dfffffffff94dbbffff0082ffffff7900ffff7900ffffffffff0079fffd006effff
-ffff78007effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87
-876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffb600000000d0ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-9100000000b6ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff0071fff2f2f5eb5e0000ffffffff4f005eebfdae0900f2ffff0079
-ffff4f005eebfdae0900f2ffff002deefbff7900ffff7900ffffffffff0079ffff4e005d
-eeed5d00007effffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff
-87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff2f0000005effffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff0e0000002fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffc00000000000000004bd8ffffffffff570000000000c7fffffc00
-6bffffff570000000000c7ffffff51000067ff6b00fcff6b00fcfffffffc006bffffff59
-0000000096007bffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffff
-ff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffb20000000fffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff8e00000000b0ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff9c9d9e9e9e9e96d7ffffffffffffffffd6969ca4ffffffffff
-8fceffffffffd6969ca4ffffffffffffa28ecfffce8fffffce8fffffffffff8fcefff7ea
-ffd99696e0ff0074ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffff
-ffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff6a00000091ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff1000000081ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff69
-00faffffffffa400c9ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ff
-ffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff7a00000030ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-c60013adf9fb9d0038ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787
-ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffb50000000cffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffd000000000f1ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff97050000000048deffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff87
-87ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff6b0000007effffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff0e00000086ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffa49d97d6ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff
-8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffff00000000091ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff790000002effffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffff
-ff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff8500000000ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffd000000000ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effff
-ffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff2f0000004effffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff0e000000b4ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001eff
-ffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffff1000000007cffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff790000006affffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001e
-ffffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff7f00000000d1ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffd100000000ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000
-1effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff7e00000000ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000
-001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff8500000000ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff00000000b2ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffa58effffffffffffffffffffffffffffffffffffffffffff000000007fffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00
-00001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff2d0000000bffffffffff
-ffffffffffffffe6edefefeff0eaffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffff3ffffffffffffffffffffffff0b0000007bffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff73001fa7ffffffffffffffffffffffffffffffffffffffff000000007fff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f
-0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000080ffffffff
-fffffffffffffffb000000000000000ca4ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff7d71ffffffffffffffffffffffff8000000080ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff7f0000001ea7ffffffffffffffffffffffffffffffffffff000000007f
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffff
-ffffffffffffffffff0048b3a0a1a3980c0021f7ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff0070ffffffffffffffffffffffff7f0000006effffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff7f0000000000246ae5ffffffffffffffffffffffffffffff00000000
-7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffff
-ffffffffffffffffffff0083ffffffffffff600066ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff0089ffffffffffffffffffffffff7f00000000ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff7f00000000000000005ee8ffffffffffffffffffffffffff000000
-007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007dff
-ffffffffffffffffffffff0079ffffffffffffff4100ffffffffff9c47479cffffffffff
-4ec0ac3d4cffac4fffa0444ba0ffff99474b9fffffffffffe1584b4c5de2ffffffff4ebb
-f257495de1ffffab4400244ba7ffffffffffffffffffff7d00000000ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff7f000000000000000000005ee8ffffffffffffffffffffff0000
-00007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb20000000091
-ffffffffffffffffffffffff0079ffffffffffffffd400acfffffb1a000000001afbffff
-ff000d000042ff74008800000000b42800000000b0ffffff9600000000000095ffffff00
-110000000000adff7f000000007cffffffffffffffffffff9100000000ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff8d0000000000000000000000004da0ffffffffffffffffff00
-0000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7b00000000
-ffffffffffffffffffffffffff0079ffffffffffffffff0075ffff2200a7ffffa70022ff
-ffff0000d5ffffff7e0000d1ffdd000846e5ffdd001dffff9a0055ffffffdd0000feffff
-000060ffffdd001dffffff0084ffffffffffffffffffffffffff00000000b2ffac475a5a
-5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a
-5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a
-5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a
-5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a
-5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a
-5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a
-5a5a5a5a5a5a5a5a5a5a59682d00000000000000000000000000001da5ffffffffffffff
-000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000
-00ffffffffffffffffffffffffff0079ffffffffffffffff0079ffac0091ffffffff9100
-acffff004bffffffff7b00d6ffffff7e00d8ffffff7a00ffffc994ffffffffff8900ffff
-ff004dffffffff7a00ffffff007affffffffffffffffffffffffff000000007bff750000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000001da5ffffffff
-ff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000
-0000ffffffffffffffffffffffffff0079ffffffffffffffff0079ff7600ffffffffffff
-0076ffff007dffffffff7a00ffffffff7a00ffffffff7a00ffffffffffffe8f6ad1700ff
-ffff007effffffff7a00ffffff0079ffffffffffffffffffffffffff000000007dff7f00
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000000001beff
-ffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7d00
-000000ffffffffffffffffffffffffff0079fffffffffffffff20074ff7900ffffffffff
-ff0079ffff0079ffffffff7900ffffffff7900ffffffff7900fffffff55c0a0000000000
-ffffff0079ffffffff7900ffffff0079ffffffffffffffffffffffffff0000000091ff7b
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000001692fc
-ffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007f
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff91
-00000000b2ffffffffffffffffffffffff0079ffffffffffffff8100d1ff7300ffffffff
-ffff0078ffff0079ffffffff7900ffffffff7900ffffffff7900fffff6190053aa9bf98e
-00ffffff0079ffffffff7900ffffff0079ffffffffffffffffffffffffb200000000ffff
-880012111111111111111111111111111111111111111111111111111111111111111111
-111111111111111111111111111111111111111111111111111111111111111111111111
-111111111111111111111111111111111111111111111111111111111111111111111111
-111111111111111111111111111111111111111111111111111111111111111111111111
-111111111111111111111111111111111111111111111111111111111111111111111111
-111111111111111111111111111111111111111111111111111111111111111111111111
-1111111111111111111111111111111a0800000000000000000000000000000019a3ffff
-ffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff000000007bffffffffffffffffffffffff0079ffffffffffffff1c00ffffcf00b5ffff
-ffffb8008effff0079ffffffff7900ffffffff7900ffffffff7900ffff7700dfffffffff
-7000ffffff0079ffffffff7900ffffff007bffffffffffffffffffffffff7b00000000ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff8a0000000000000000000000000019a4ffffff
-ffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000007fffffffffffffffffffffffff0088ffffffffffeb2400cbffffff001bee
-ffffee1c00ffffff0079ffffffff7900ffffffff7900ffffffff7900ffff7300f0ffffff
-950000ffffff0079ffffffff7900ffffff006dffffffffffffffffffffffff7f00000000
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff8000000000000000000000001aa4ffffffff
-ffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-00007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff000000007fffffffffffffffffffffffff001a5a4c4c4f4600005effffffffcd00
-0047470000ceffffff0075ffffffff7500ffffffff7500ffffffff7500ffffce00004653
-06003600ffffff0075ffffffff7500ffffff00003ba8ffffffffffffffffffff7f000000
-4fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff7f0000000000000000001aa4ffffffffff
-ffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff0000000085fffffffffffffffffffffffb160000000000004fe2ffffffffffff
-df4c00004cdffffffffb0183ffffffff8301fbffffff8301fbffffff8301fbffffde4c00
-0046eddc04b8fffb0183ffffffff8301fbffffcc0c007cffffffffffffffffffff850000
-0083ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff7f000000000000001aa4ffffffffffff
-ffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff0d0000002bffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff2b00
-00007dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff7f00000000001aa4ffffffffffffff
-ffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff8000000000ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-00000092ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff7f0000001aa4ffffffffffffffff
-ffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff878763190000
-00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff7f00000000ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff74001ba6ffffffffffffffffff
-ffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff8787631900
-0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff7800000000b0ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-b200000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff908dffffffffffffffffffff
-ffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319
-000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffd20000000081ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff690000004dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff878763
-19000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff100000002bffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff0000000096ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff8787
-6319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff9300000000ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffb200000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87
-876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff00000000b2ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff690000004fffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff
-87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff4f00000069ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff000000007cffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffff
-ff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff9500000000ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffb000000000d2ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffff
-ffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff12000000f2ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff6a00000011ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ff
-ffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff7b0000006cffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffef000000007bffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787
-ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffcf00000000efffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff6c00000000cfffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff87
-87ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff4c0000006fffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffef000000004cffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff
-8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffd400000000b2ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff6c00000000d4ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffff
-ff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff4c0000002affffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffef000000004cffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effff
-ffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffd400000000b4ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff6c00000000d4ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001eff
-ffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff6500000026f9ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffef0000000065ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001e
-ffffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1200000069ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff6c00000012ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000
-1effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9300000000
-f5ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffff50000000093ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000
-001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff120000
-0029fbffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffb2900000012ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00
-00001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9100
-0000002affffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff2a0000000091ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f
-0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-64000000009dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff9d0000000064ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007f
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff4f000000009bffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff9b000000004fffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffd7000000000096ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff960000000000d7ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffd90300000000f2ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffff20000000003d9ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-00007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffda0400000028fdffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffe2800000004daffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffd50000000026ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffe52b00000000d5ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff64000000001aa1ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff97000000000064ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff66000000000099ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff95000000000066ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff6400000000009bffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffb24000000000064ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007f
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffae0b0000000051f4ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffe42b000000000baeffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffdb040000000025ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff97000000000004dbffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffd903000000001b9effffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffdf57000000000003d9ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-00007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffd41b0000000000179dffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffde540000000000001bd4ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff6a000000000000179dff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff91000000000000006affffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff6b00000000000000
-179dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff9d17000000000000006bffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe96300000000
-00000015a2e8ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffe8a2150000000000000063e9ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff878763190000
-00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeb5d00
-000000000000001b4d98efffffffffffffffffffffffffffffffffffffffffffffffffff
-ffe9994d1b00000000000000005debffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff8787631900
-0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-aa2100000000000000000000475adde9e0ffffffffffffffffffffffffffffffe7e5ef99
-4d1b0000000000000000000021aaffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319
-000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffac21000000000000000000000000001b574e4f4699efe6e9dd574c4e514a000000
-000000000000000000000021acffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff878763
-19000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffab2217000000000000000000000000000000000000000000000000000000
-0000000000000000001722abffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff8787
-6319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffbe64100000000000000000000000000000000000000000000000
-000000000000001064beffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87
-876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffb9a62900000000000000000000000000000000000000
-000000000029a6b9ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff
-87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffe3aab5a924181b1b1a000000000000201a1b
-1824a9b5aae3ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffff
-ff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffb6afb2b2aae4ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffff
-ffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ff
-ffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdde3e5db
-f1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787
-ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa000000
-0073ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff87
-87ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-00007effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff
-8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffff
-ff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effff
-ffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001eff
-ffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001e
-ffffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000
-1effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000
-001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00
-00001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f
-0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007f
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-00007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007f
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-00007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff878763190000
-00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff8787631900
-0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319
-000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff878763
-19000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff8787
-6319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87
-876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff
-87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffbcb43333445d4ffffffffffdb
-a5ffffffffffffffffffffffffffffffffffffffffffdba5ffffff9628fbffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffff
-ff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffed0600050b10000044ffffffff
-0067ffffffffffffffffffffffffffffffffffffffffff0067ffffff8000f7ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffff
-ffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff5500bcfffffff6630087ffff
-ff007dffffffffffffffffffffffffffffffffffffffffff007dffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007f
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ff
-ffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff0081ffffffffffff4000fe
-fad1006aebeffffffffcd8ded8fcffffffffedd4ffdfdadfdb006aebefffeeccffffffce
-f9ffdedbdefffffffffffffdd9d8fbffcfedffffffffffffffffffffffffffff00000000
-7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787
-ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff0065ffffffffffffdea9
-ff670000000062ffff91000000000095ffffff6e00730000000000000062ff6b00fbfffa
-00524e0000003be9ffffff930000000fcc006effffffffffffffffffffffffffff000000
-007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff87
-87ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff47004bd5e2ffffffff
-ffffe2ad0059c1deff78005fc3bbb50400a0ffff7d000bb0c6ebb40059c1dbff7800ffff
-ff000001b0c56c0059ffff83001eb2b11e00007dffffffffffffffffffffffffffff0000
-00007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff
-8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffd91a000000364ecd
-f9ffffffff0081fffff90f63ffffffffef0078ffff7e00a1ffffffff0081ffffff7900ff
-ffff000ae7ffffff5300ffff004cffffffff59007effffffffffffffffffffffffffff00
-0000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffff
-ff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc76b1a0000
-000df4ffffff0079ffffffffffffffffffe2007bffff7a00ffffffffff0079ffffff7900
-ffffff007fffffffff7d00ffaa00deffffffffe0007bffffffffffffffffffffffffffff
-000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effff
-ffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffea
-bd73000cedffff0079fffffffffac941332c00007dffff7900ffffffffff0079ffffff79
-00ffffff0079ffffffff7900ff7c00ffffffffffff007affffffffffffffffffffffffff
-ff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001eff
-ffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9a35ffffffff
-ffffffe50075ffff0079fffffff20800070a1fad007bffff7900ffffffffff0079ffffff
-7900ffffff0079ffffffff7900ff7d00ffffffffffff0079ffffffffffffffffffffffff
-ffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001e
-ffffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8a00aaffff
-ffffffffff0073ffff0079ffffff0f00bdffffffff007affff7900ffffffffff0079ffff
-ff7900ffffff0079ffffffff7900ff9b00ecffffffffee007bffffffffffffffffffffff
-ffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000
-1effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0711fe
-ffffffffff8e00d4ffff0083ffffff008cffffffff92007effff7900ffffffffff0083ff
-ffff7900ffffff0079ffffffff7900ffff005fffffffff6b007effffffffffffffffffff
-ffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000
-001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9300
-0094e5e0d4400064fffffe001fd6f6ff000099e8d23500007fffff7900fffffffffe001f
-d6f0ff7900ffffff0079ffffffff7900ffff630041d7d63f00007effffffffffffffffff
-ffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00
-00001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-b21c000000000070ffffffff66000063ffd91600000012d80244ffff6900fbffffffff66
-000063ff6900fbfffb0069ffffffff6900fdffff7500000000b4007bffffffffffffffff
-ffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f
-0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffbfb9bcb6e8ffffffffffffbdafddffffffbfb9bfffffdeaaffffdcaaffffffffff
-ffbdafddffdcaaffffffaadcffffffffdcaaffefd3ffebb6b4f3ff0073ffffffffffffff
-ffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007f
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff6600f2ffffffff8e00d5ffffffffffff
-ffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffd3000093e4e6830044ffffffffffff
-ffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffb11b0000000064ebffffffffff
-ffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-00007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffc0bbb7eaffffffffffff
-ffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007f
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-00007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff878763190000
-00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff8787631900
-0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319
-000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff878763
-19000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff8787
-6319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87
-876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff
-87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffff
-ff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffff
-ffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007f
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ff
-ffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787
-ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff87
-87ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-00007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff
-8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffff
-ff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-0500000090ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effff
-ffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb726393b3b3b3f
-43000000001e473b3b3b3b3926b7ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001eff
-ffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0900000000
-0000000000000000000000000009ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001e
-ffffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa0000000
-0000000000000000000000000000a0ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000
-1effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1900
-000000000000000000000000000019ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000
-001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa0
-0000000000000000000000000000009cffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00
-00001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff1b0000000000000000000000000059ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f
-0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff9f00000000000000000000000000deffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007f
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff1b000000000000000000000057ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff9f0000000000000000000000ddffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff1c0000000000000000007bffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-00007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffc3000000000000000000ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffdc000000000000000055ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff5700000000000000dfffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffdf00000000000057ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff570000000000dfffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007f
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffdf0000000057ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff57000000dfffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffdf000059ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-00007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff4f00ddffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffe285ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffd4d1d5dedbffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffff8ccd5c94035373a3400000000000c3e37373540c9d5ccf8ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff878763190000
-00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffdd83350c000000000000000000000000000000000000000000000c
-3583ddffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff8787631900
-0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffff7d5872a0000000000000000000000000000000000000000000000000000
-000000002a87d5f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319
-000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffc9440900000000000000000000000000000000000000000000000000000000
-00000000000000000944c9ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff878763
-19000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffca3b000000000000000000002c2f2e2e257bd2c9c9c9c9c9c9c9ccc0372b2e2e
-3408000000000000000000003bcaffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff8787
-6319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffc83c000000000000000000247bd5ffffffffffffffffffffffffffffffffffffff
-fffff6b83f040000000000000000003cc8ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87
-876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff7b0000000000000000247bd5ffffffffffffffffffffffffffffffffffffffffff
-fffffffffffff2cb7d2400000000000000007bffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff
-87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffe84060000000000000180d5ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffd580010000000000000684feffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffff
-ff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff8802000000000000017cfaffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffa7c010000000000000288ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffff
-ffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fc7b000000000000017cfaffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffa7d050000000000007bfcffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ff
-ffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ef100000000000017cfaffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffea3100000000000010efffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787
-ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-cc1900000000067dfaffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffc539000000000019ccffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff87
-87ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-7f000000000010f0ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff7e0000000000007fffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff
-8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa
-7c000000000033e6ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffc81700000000007c
-faffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffff
-ff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee
-10000000000080ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeb0c00000000
-0010eeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effff
-ffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe8
-1000000000007dffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8760000
-00000010e8ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001eff
-ffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-5e000000000585ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7d
-00000000005effffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001e
-ffffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-800000000013efffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffc8180000000080ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000
-1effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-a20000000014ecffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffee1400000000a2ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000
-001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-f01900000000e5ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffe50000000019f0ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00
-00001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-eb13000000007affffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff7a0000000013ebffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f
-0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffd3324212020201a75fcffffffff
-fffffffffffffffffffffffd2194ffffffffffffffffffffffffffcf9bffffff8c13faff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff19000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff7f0000000019ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007f
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff0001291e1e1f1a000084ffff
-ffffffffffffffffffffffffff0073ffffffffffffffffffffffffff0068ffffff8a12f8
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff840000000084ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff840000000084ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff0088ffffffffffcc0c009d
-ffffffffffffffffffffffffffff0079ffffffffffffffffffffffffff007fffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff9f0000000019ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff19000000009fffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff0079fffffffffffff007
-0bfffffffffff3c7c7f3ffffffffff0079fffffffff3c7c7f3ffffffecc00062d6e5ffe4
-baffffffbcf1ffcec9cefffffffffffff3c7c6f3ffbee4ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff1d00000015eaffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffea150000001dffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-00007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff0079ffffffffffffff
-a300e0ffffff7e000000007effffffff0079ffffff7e000000007effff620000000060ff
-6a00fcfffc00463a00000028e2ffffff8200000003ba006dffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffa400000000e7ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffe700000000a4ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff0079ffffffffffff
-ffff0074ffff700073d6d6730073ffffff0079ffff700073d6d6730072ffefc00062d6e5
-ff7900ffffff00000ac6da7d0050ffff72002fc6c53000007effffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff1f00000059ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff5b0000001fffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0079ffffffffff
-ffffff0079ffff008bffffffff8c00dbffff0079ffff008bffffffff8c00ddffff0080ff
-ffff7900ffffff0014f2ffffff5a00ffff0057ffffffff63007effffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff7f00000015eaffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffe2000000007fffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0079ffffffff
-ffffffff0079ff9c00d3d8cdcdd8d40075ffff0079ff9c00d3d8cdcdd8d40075ffff0079
-ffffff7900ffffff0080ffffffff7c00ffa100e5ffffffffe8007bffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffe100000000a6ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff5b00000000e1ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0079ffffff
-ffffffffff0077ff7a000000000000000070ffff0079ff7a000000000000000070ffff00
-79ffffff7900ffffff0079ffffffff7900ff7c00ffffffffffff0079ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff5b0000001dffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffe2000000005bffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007f
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0079ffff
-ffffffffffa0009eff7800d1d4cecececec4e7ffff0079ff7800d1d4cecececec4e7ffff
-0079ffffff7900ffffff0079ffffffff7900ff7c00ffffffffffff0079ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffe000000000a2ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff5b00000000e0ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0079ff
-ffffffffffff5600ffff9c00f0ffffffffffffffffff0079ff9c00f0ffffffffffffffff
-ff0079ffffff7900ffffff0079ffffffff7900ffa300e5ffffffffe7007bffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff5a0000005fffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffe2000000005affffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0080
-ffffffffffff7e0079ffffff0055ffffffffe61eb3ffff0079ffff0055ffffffffe61eb3
-ffff0081ffffff7900ffffff0079ffffffff7900ffff0055ffffffff61007effffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffde00000000e2ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff5b00000000deffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-00007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-5edfcbcbcec22f000dffffffff74002ec2d6800000ffffff0079ffff74002ec2d6800000
-fffffe0014c3e8ff7900ffffff0079ffffffff7900ffff74002dc5c42d00007effffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff7f0000005bffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffe2000000007fffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb
-00000000000000007cf5ffffffffff830000000026e5fffffc0069ffffff830000000026
-e5ffffff76000061ff6900fcfffc0069ffffffff6900fdffff8700000006c5007bffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff20000000e7ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff5f0000001cff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffc9ccd0cfcfd0c9f4fffffffffffffffff4cacfd1ffffffffffbde5fffffffff4cacfd1
-ffffffffffffcfc3e7ffe5bdffffffbde5ffffffffe5bdffe6c3fff9cac9ffff0074ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff9f00000000ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa400000000
-e1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff6500e7ffffffff7d00ddff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff5b00000061ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-007bffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff878763190000
-00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffdc00007fd2d471004dff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff000000007dffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff5e00
-00005effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff8787631900
-0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffc22d0000000079f4
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffa400000000e2ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa4
-00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319
-000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd1cfc9f4ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff1a0000001effffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff00000000a1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff878763
-19000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffe10000000083ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff5e0000005bffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff8787
-6319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff7900000000a1ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffa400000000feffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87
-876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffc6ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff7f00000001ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff01000000ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff
-87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000007fffffffffffffffffffffffffffffffffffc42d00f9ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff8500000000ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff000000009effffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffff
-ff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff000000007fffffffffffffffffffffffffffffffc435000000ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff190000001dffffffffffffffffffffffffffffffffff
-ffffffffc2c5c9c8c8c8c9c2f0ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffe1b7ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff1d0000007cffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffff
-ffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff000000007fffffffffffffffffffffffffffc4350000000000ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff0000000086ffffffffffffffffffffffffffffffff
-fffffffffa0000000000000000007effffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff6a00fbffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff8600000082ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ff
-ffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff000000007fffffffffffffffffffffffc43500000000000000
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffff
-ffffffffffff0061e6d0d1d1d3ce10009cffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff7900ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff7f0000005effffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787
-ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff000000007fffffffffffffffffffc4350000000000000000
-00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffff
-ffffffffffffff007ffffffffffffff40b09ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff7d00ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff7f00000000feffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff87
-87ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff000000007fffffffffffffffc433000000000000000000
-0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff000000007cffffffffffffffffffffffffff
-ffffffffffffffff0079ffffffffffffff8500fffffffff46a13136af4ffffffffffbb25
-18192cbdffffffffffbb25162bdc8700ffbe1bd8ffffffff931af8ffffffffffffffffff
-ffffffffffffffffffffff7c00000000ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff
-8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000007fffffffffffc23300000000000000000000
-000004ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff9e00000000a3ffffffffffffffffffffffff
-ffffffffffffffffff0079ffffffffffffff5900ffffffe4000029290000e5ffffff6e00
-1f252b000071ffffff6e001e2c00000600ffff0072ffffffff0045ffffffffffffffffff
-ffffffffffffffffffffffffa300000000ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffff
-ff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff000000007fffffffc2330000000000000000000000
-00000000352e2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d
-2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d
-2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d
-2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d
-2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d
-2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d
-2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d282ffdff7c00000001ffffffffffffffffffffffff
-ffffffffffffffffffff0088fffffffffffc710053ffffff0000f7fffff70003ffff8600
-7cfffffffc1200fdff960084ffffff810000ffff5003ffffffdd00a0ffffffffffffffff
-ffffffffffffffffffffffffffff010000009effffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effff
-ffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff0000000083ffb532000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000ffff7f00000000ffffffffffffffffffffff
-ffffffffffffffffffffff000424181d283000002fe4ffffdc00ffffffffffff0097ffe1
-c4ffffffffff8d00ffff4a0cffffffffff1d00ffffa000ddffff7500ffffffffffffffff
-ffffffffffffffffffffffffffffff000000007cffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001eff
-ffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff0000000089d700000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000ffff7f00000000ffffffffffffffffffff
-ffffffffffffffffffffffff000c322823000022daffffffff7800291b18181b260074ff
-fffffff2c1ce7c0000ffff007cffffffffff7f00ffffff0075ffff0250ffffffffffffff
-ffffffffffffffffffffffffffffffff000000007cffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001e
-ffffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff0000000083fffa8606000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000ffff7c00000000ffffffffffffffffff
-ffffffffffffffffffffffffff0089ffffffcc001fffffffffff7d00312a26262629209b
-ffffe127000000010f00ffff0079ffffffffff7900ffffff5002ffe400a0ffffffffffff
-ffffffffffffffffffffffffffffffffff00000000a3ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000
-1effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff000000007fffffffff8606000000000000
-00000000000000003e3b3737373737373737373737373737373737373737373737373737
-373737373737373737373737373737373737373737373737373737373737373737373737
-373737373737373737373737373737373737373737373737373737373737373737373737
-373737373737373737373737373737373737373737373737373737373737373737373737
-373737373737373737373737373737373737373737373737373737373737373737373737
-373737373737373737373737373737373737373737373737373737373737373737373737
-37373737373737373737373737373737373737323afcffa3000000009effffffffffffff
-ffffffffffffffffffffffffffff0079ffffffff7f0077ffffffff7400ffffffffffffff
-ffffe0000084d9cbff9300ffff007affffffffff7e00ffffffa000ff8400ffffffffffff
-ffffffffffffffffffffffffffffffffff9e00000001ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000
-001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000007fffffffffffff8707000000
-000000000000000005ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff010000007cffffffffffff
-ffffffffffffffffffffffffffffff0079ffffffffff5a009dffffffe3009fffffffffff
-b6dbff7100feffffffff5c00ffff5006ffffffffff1700ffffffff007c2150ffffffffff
-ffffffffffffffffffffffffffffffffffff7c00000000ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00
-00001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffff8707
-00000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffff
-ffffffffffffffffffffffffffffffff0079ffffffffffed0a03e7ffffff0903c8fffffd
-6400cfff7400cbfffffb690000ffff9b006ffefffd750000ffffffff570000a2ffffffff
-ffffffffffffffffffffffffffffffffffffff7f00000000ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f
-0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffff
-ff87070000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffff
-ffffffffffffffffffffffffffffffffff0072ffffffffffffa30043ffffffed01001420
-000077ffffe60400141e000f5100ffffff7b00002300000500ffffffffa50000ffffffff
-ffffffffffffffffffffffffffffffffffffffff7f00000063ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007f
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffff
-ffffffff8707000000000000ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000085ffffff
-fffffffffffffffffffffffffffffffffffd2797ffffffffffffff7e18b4fffffffc7c22
-2638c8fffffffffb7c222075fff029b7ffffffc8382438daa72efdffffffff0059ffffff
-ffffffffffffffffffffffffffffffffffffffffff8500000081ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffff
-ffffffffffffff870700000000ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1f00000019ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1009fffff
-ffffffffffffffffffffffffffffffffffffffffffff190000007cffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffff
-ffffffffffffffffffff87070000ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8600000000ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4e07ffff
-ffffffffffffffffffffffffffffffffffffffffffffff00000000a3ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-00007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffff
-ffffffffffffffffffffffffff8009f3ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8c02009eff
-ffffffffffffffffffffffffffffffffffffffffffffffff00000001ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffff
-fffffffffffffffffffffffffffffff0ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7a000000
-009dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff940e82ff
-ffffffffffffffffffffffffffffffffffffffffffffffffa000000000ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe50000
-000083ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff580000005fffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1e
-00000017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff00000000a7ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-aa00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffa000000000ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007f
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff00000000a0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff5800000062ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff5f00000058ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007cffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffa400000000ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffa000000000e5ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-00007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff24000000e3ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff5b00000021ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff8100000056ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffde0000000081ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffe300000000deffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff5600000000e3
-ffffafecffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff5f00000059ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffde000000005f
-fffffe00002c32bbc4c7ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff878763190000
-00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffe6000000009cffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff5600000000
-e6ffffffa8000000000000272176cbc7ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff8787631900
-0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff5f00000019ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdc00000000
-5fffffffffff2300000000000000000000272176cbbcf0ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319
-000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffe400000000a1ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff56000000
-00e4ffffffffffa9000000000000000000000000000000042b2ea2dcffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff878763
-19000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff890000000fe4ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdc000000
-0089ffffffffffffff23000000000000000000000000000000000003ddffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff8787
-6319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffefabdbffffffffffff2400000054ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff560000
-0024ffffffffffffffffa90000000000000000000000000000000000a8ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87
-876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffefbcc5b930242e0000d4ffffffffffffa900000000e1ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe10000
-0000a9ffffffffffffffffff2300000000000000000000000000000089ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff
-87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc6c0cb
-741f272e04000000000000005fffffffffffffffff230000000ee3ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe30e00
-000023ffffffffffffffffffffa9000000000000000000000000000063ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffff
-ff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffdbba731f29260000
-00000000000000000000000000e5ffffffffffffffffa60000000014ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1400
-000000a6ffffffffffffffffffffff260000000000000000000000001aedffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffff
-ffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd2000000000000
-000000000000000000000000005effffffffffffffffffff8c000000007affffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7a00
-0000008cffffffffffffffffffffffff81000000000000000000000002fdffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ff
-ffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8a00000000
-000000000000000000000000001bf0ffffffffffffffffffffff1f0000000075ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7500
-0000001fffffffffffffffffffffffffffe500000000000000000000000079f3ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787
-ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff220000
-0000000000000000000000000000adfffffffffffffffffffffffff21b0000000070ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7000
-0000001bf2ffffffffffffffffffffffffffff6200000000000000000000000008e8ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff87
-87ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeb00
-000000000000000000000000000023ffffffffffffffffffffffffffffed0000000000e0
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe000
-00000000edffffffffffffffffffffffffffffffe700000000000000000000000000007b
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff
-8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-860000000000000000000000000000abffffffffffffffffffffffffffffff8500000000
-0de6ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe70d
-0000000085ffffffffffffffffffffffffffffffffff620000000000002b880000000000
-0078ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffff
-ff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff7200000000000000000000000022ffffffffffffffffffffffffffffffffff8b0000
-00000ce9ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf12
-000000008bffffffffffffffffffffffffffffffffffffe700000000001dfcffd71e0000
-00000029e1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effff
-ffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffa9000000000000000000000000a8ffffffffffffffffffffffffffffffffffff64
-00000000007affffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7200
-0000000064ffffffffffffffffffffffffffffffffffffffff6200000000a9ffffffee42
-000000000011bdffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001eff
-ffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffff36c00000000000000000000000066ffffffffffffffffffffffffffffffffffffff
-ed18000000000074ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff16d00
-0000000027f9ffffffffffffffffffffffffffffffffffffffffe70000008bffffffffff
-ff8d00000000000072ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001e
-ffffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffbd0c00000000000000000000000000e7ffffffffffffffffffffffffffffffffffff
-fffff418000000000076ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe50500
-000000002969edffffffffffffffffffffffffffffffffffffffffff600063ffffffffff
-ffffff940d00000000006bf2ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000
-1effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff74000000000000190000000000000062ffffffffffffffffffffffffffffffffffff
-ffffffffff85000000000028deffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbd1000
-00000000a79c00007affffffffffffffffffffffffffffffffffffffffd915e8ffffffff
-fffffffffff918000000000006e7ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000
-001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffe32800000000001bebb200000000000000e6ffffffffffffffffffffffffffffffffff
-ffffffffffffff8900000000000ae8ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff740000
-0000000098fe1c0000006bf2fffffffffffffffffffffffffffffffffffffff0ffffffff
-ffffffffffffffff850000000000007affffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00
-00001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff7c00000000000083ffffff6300000000008affffffffffffffffffffffffffffffffff
-ffffffffffffffffffd721000000000072f4ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffba2e0000
-00000021daff31000000000006e7ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff8900000000000076ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f
-0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-e22800000000001fd8ffffffffef1b00000025ffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffff51700000000000071f3ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb62c000000
-00000017f5ffffe74200000000000078ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffd81f000000000027e0ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007f
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-7b00000000000043f0ffffffffffffec000000acffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff880000000000000071f3ffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff46a00000000
-00000087ffffffffffff8b0000000000006bf0ffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffff04300000000000fbcffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0
-2700000000000e96ffffffffffffffffff8c001fffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffff3ff940b0000000000000071f3ffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff3710000000000
-00000b93ffffffffffffffffd81f000000000006e5ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff8d00000000000072ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbc
-0f000000000043f3ffffffffffffffffffffff0e98ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffe21a09ffffff8f0c0000000000000075caffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffca75000000000000
-000c8ffffffffffffffffffffffff043000000000010bcffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff950f00000000006af0ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffdfb1bebdbdbdbdbbc0ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffacdbff
-ffffffffffffffffffffdbabffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-00007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffabb1ffffffffff
-ffffffe19dd9ffabdbffffffffffffffffffffffffffacdbffffffffffffffffdbacffff
-ffabdbffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff267
-00000000000d98fffffffffffffffffffffffffff3ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff7b00000073ffffffff8500000000000000001970caffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffecc0731900000000000000
-0085ffffffffffffffffffffffffffffff8c00000000000073ffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffff918000000000006e7ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff6e0000000000000000
-1cdcfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb0069
-ffffffffffffffffffffff5c00f2ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6f00d7ffffff
-ffffffff3e00e5fa005cfffffffffffffffffffffffffb0069ffffffffffffffff6900fb
-fff2005cffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbc0c
-000000000044f3ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffe2260000000000ceffffffffd34600000000000000000019
-70cafffffffffffffffffffffffffffffffffffffffffff0ad3300000000000000000000
-46d3ffffffffffffffffffffffffffffffffffd921000000000026e0ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff8700000000000078ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff7b00dae1dbdcdbe7
-8a0007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-79ffffffffffffffffffffffecc9ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1300deff
-ffffffff6900a6ffffc9ecffffffffffffffffffffffffff0079ffffffffffffffff7900
-ffffffc9ecffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff06700
-00000000008cffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff790000000000003cdeffffffffffffd54800000000000000
-00000021242324212db4c0bdbdbdbdbdbdc6701b2423232a020000000000000000000048
-d5fffffffffffffffffffffffffffffffffffffffff51900000000000fbaffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff8a00000000000075ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7900ffffffffff
-ffff910095ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-0079ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeb0049
-ffffffffd9005cffffffffffffffffffffffffffffffffffff0079ffffffffffffffff7e
-00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffba0c00
-000000001fd8ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffe02700000000000f97ffffffffffffffffffffd24b3c000000
-0000000000000000000000000000000000000000000000000000000000000000003c4bd2
-ffffffffffffffffffffffffffffffffffffffffffffffff8800000000000071ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffd921000000000026
-deffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7900ffffffff
-ffffffff0078ffffffffae190919aeffffffffffec5d070e0964edffffffffec5d07096b
-f0007aff425dffffffffff1188ff8c12fdff8d22e761070964ebffffffffed64090873ff
-1d8dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff87
-0097ffffff030af0fffffd128cffffffec5d07075decffffffff0079ffffffae190a1fd0
-8500fffffd128cfffd1898c2190a20b1ffffffffffb2200b1af0a417fdffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffef680000
-0000000086ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff7900000000000045f3ffffffffffffffffffffffffffffe68f
-37000000000000000000000000000000000000000000000000000000000000378fe6ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff951000000000006aefff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffef4500000000
-0010baffffffffffffffffffffffffffffffffffffffffffffffffffffffff7900ffffff
-ffffffffe40077ffffff65002b352b0065ffffffdd00003735300000daffffdd0000392d
-0000007eff6d00ffffffff9400dfff7400ffff7800000039300003ffffffdd00002e2d00
-180078ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007f
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff1400e4ff6a00a6ffffffff0074ffffdd000037370000deffffff0079ffff65002b3a00
-000100ffffff0074ffff0000002a3b030093ffffff6800004000000400ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe6070000
-0000001fd8ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffe02700000000000f97ffffffffffffffffffffffffffffffffff
-ffffdfd05310000000000000000000000000000000000000000000001053d0dfffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffff819000000000007
-e6ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8e0000
-0000000073ffffffffffffffffffffffffffffffffffffffffffffffffffffff7a00ffff
-ffffffffbc0300e4ffff90008cffffff8c0092fffb0000faffffff970075ffff000afeff
-ffde23007fffe60097ffffff450cffff7900ffff7e001cfcffff940095ffff000fddffff
-db1f007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffff60354ec0087ffffffffff0079ffff0007fefffffe0800ffffff0079ff92008dffff
-ff8b0000ffffff0079ffff000090ffffff1303ffff920087ffffff870000ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff79000000
-00000086ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff7900000000000045f4ffffffffffffffffffffffffffffffffff
-fffffffffffffdd7e0d44b3f42453f0000000000134942423f4bd4e0d7fdffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8800000000
-000077ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff95
-10000000000025ddffffffffffffffffffffffffffffffffffffffffffffffffff7e001b
-100f18231a00008effffff4463ffffffffff6901ffffcaf5ffffffffff007bffd800abff
-ffffffb2007effff0c45ffffff0079ffff7900ffff7b00f5ffffffff0077ffd800acffff
-ffffb2007effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffa5000017ffffffffffff0079ffd600ffffffffffff0093ffff007aff4511ffff
-ffffff2100ffffff0079ffff0066ffffffff8100ffff4511ffffffffff2100ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe025000000
-00001fdaffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffdf2400000000000f97ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffdddcddddd7feffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8c0000
-000000006aefffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffa19000000000009e6ffffffffffffffffffffffffffffffffffffffffffffffff7d00
-3c363807000092ffffffffff00001b0c0c0c190000feffffffffbebab027007eff7300ff
-ffffffffff007affff7900ffff9600e7ffff7900ffff7900ffffffffff0079ff7300ffff
-ffffffff007affffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-00007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff6500f2ffffffffffff0079ff76001e0f0c0c0e1a0074ffff007eff007dff
-ffffffff8000ffffff0079ffff007bffffffff7900ffff007dffffffffff8000ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7800000000
-000089ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffb90e000000000046f4ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffda
-22000000000005e4ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff8900000000000076ffffffffffffffffffffffffffffffffffffffffffffff7a
-00ffffffff6000abffffffffff001242333434353744fdffff6b0000000034007dff7900
-ffffffffffff0079ffffe70099ff450effffff7900ffff7900ffffffffff0079ff7900ff
-ffffffffff0079ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff7c00ffffffffffffff0079ff7d003d38343434362da2ffff007fff0079
-ffffffffff7900ffffff0079ffff0079ffffffff7900ffff0079ffffffffff7900ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe02500000000
-000f97ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffff06600000000000f99ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fff14600000000000075ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff9710000000000068efffffffffffffffffffffffffffffffffffffffffff
-7900fffffffff21000e1ffffffff0089ffffffffffffffffff64003dd2dde6ff007aff75
-00ffffffffffff007affffff0d50ff0079ffffff7900ffff7900ffffffffff0079ff7500
-ffffffffffff007affffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff7900ffffffffffffff0079ff7600ffffffffffffffffffff007eff00
-79ffffffffff7d00ffffff0079ffff0079ffffffff7900ffff0079ffffffffff7d00ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff760000000000
-0046f4ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffb90b000000000047f4ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff8e00000000000073ffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffb1d000000000004e2ffffffffffffffffffffffffffffffffffffff
-ff7900ffffffffffec0005ffffffff5501ffffffffffdfa8ffff006cffffffffe8007bff
-e7009affffffffa2007effffff78009600e7ffffff7900ffff7900ffffffffff0079ffe7
-009affffffffa2007effffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff7900ffffffffffffff0079ffe7009affffffffffacd7ffff007aff
-5401ffffffffff1300ffffff0079ffff0079ffffffff7900ffff5401ffffffffff1400ff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0680000000000
-0f99ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffff0660000000000008effffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffda22000000000025ddffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffff04600000000000fb9ffffffffffffffffffffffffffffffffff
-ffff7900ffffffffffff8b006dffffffa10064f6ffffba003fffff004dffffffb607007e
-ffff0f00bcffffbd12007fffffffe600001cffffffff7900ffff7900ffffffffff0079ff
-ff0f00bcffffbb0c007fffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff878763190000
-00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff7900ffffffffffffff0079ffff0f00bcfffff65a00d4ffff0079
-ffa10064f6fff66b0000ffffff0079ffff0079ffffffff7900ffffa10064f6fff5650000
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb90b0000000000
-46f4ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffb90b00000000001edaffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffff14600000000000eb9ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff8d00000000000072ffffffffffffffffffffffffffffff
-ffffff7100ffffffffffffff1700c8ffffff85000012090008edffff8100001204007400
-6dfffff20a000a0a000a0076ffffffff230082ffffffff7100ffff7100ffffffffff0071
-fffff30a000a09003b007dffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff8787631900
-0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff7100ffffffffffffff0071fffff20a000912000082ffffff00
-71ffff8500001600000900ffffff0071ffff0071ffffffff7100ffffff86000016000b1c
-00fffffffffffffffffffffffffffffffffffffffffffffffffffffff066000000000010
-99ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffff06600000000000087ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff9100000000000072ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffdc23000000000023dcffffffffffffffffffffffff
-ffffffff9c32feffffffffffffed3455fdffffffd244322e87ffffffffffd2442f3ed2ff
-8353ffffffff872e2e8bff409dffffffff8400eaffffffff9c32feff9c32fefffffffe32
-9cffffffff882e2d97ff0077ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319
-000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff9e33fefffffffffffe339effffffff872f3445d2fffffffe
-339effffffd2453245e4af39fdfffe339efffe339effffffff9e33ffffffffd7453240ff
-9400ffffffffffffffffffffffffffffffffffffffffffffffffffffb70b00000000001b
-faffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffb70b000000000020dbffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff9812000000000023ddffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffff61a000000000009e5ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff460dffffffffffffffffffffffffffffffff
-ffffff8513ffffffffffe500a1ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff878763
-19000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa0d95ffffffff
-ff4b0bffffffffffffffffffffffffffffffffffffffffffffffffef6500000000000087
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffef6500000000000087ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffa1b00000000000eb8ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff8b00000000000074ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffdf00a4ffffffffffffffffffffffffffffff
-ffffffff9b0065f6ffffe70011ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff8787
-6319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0900bbffff
-ff6e00a6ffffffffffffffffffffffffffffffffffffffffffffffb70b000000000020db
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffb70b000000000020dbffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff8b0000000000006effffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff9812000000000067edffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffff7190012ffffffffffffffffffffffffffffff
-ffffffffffff430000100e0000b0ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87
-876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb0000007
-0d050040ffffffffffffffffffffffffffffffffffffffffffffff7000000000000087ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffef6500000000000087ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff9812000000000067edffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffa1d000000000005e2ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffb383becffffffffffffffffffffffffffff
-ffffffffffffffffd445342e84ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff
-87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff88
-2f3340d2ffffffffffffffffffffffffffffffffffffffffffffdf24000000000020dbff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffb70b000000000020dbffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffa1b000000000005e4ffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffff04800000000000fb7ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffff
-ff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff7700000000000088ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffef6500000000000088ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff8b00000000000074ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8f000000000000
-70ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffff
-ffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffde24000000000023ddffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffb609000000000021dbffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff8e00000000000065ec
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdd25000000
-000022daffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ff
-ffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff7700000000000048f2ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffee6300000000000088ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdd230000000000
-03e1fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81b00
-0000000007e4ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787
-ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffdc220000000000119cffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffb60a000000000021dbffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff249000000
-00000eb6ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-8c00000000000073ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff87
-87ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffb70d000000000049f5ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffee6300000000000088ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9000
-00000000006fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff9a13000000000065ecffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff
-8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffee630000000000119cffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffb60a000000000021dbffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-dd25000000000022dcffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffc1e000000000003e1ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffff
-ff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffb60a000000000049f5ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ec6300000000000088ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffff81b00000000000db6ffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffff14900000000000eb6ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effff
-ffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffee6300000000000090ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-e304000000000021dbffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff8c0000000000006fffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff900000000000006fffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001eff
-ffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffb50a000000000021dcffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-750000000000008affffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff9b13000000000022daffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffdd25000000000022daffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001e
-ffffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffec620000000000008affffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffde
-23000000000021dcffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffb1d000000000008e2ffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffff71d000000000008e2ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000
-1effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffe204000000000021dcffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff75
-0000000000008cffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff8c00000000000073ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff8c00000000000073ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000
-001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff750000000000008affffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffde23
-0000000000119bffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff9b13000000000064ecffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff9b13000000000064ecffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00
-00001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffde23000000000021dcffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7500
-00000000004af5ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffc20000000000004e2ffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffc20000000000003dfffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f
-0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff750000000000008cffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffde2300
-00000000119dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffff14a00000000000073ffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffff14a00000000000eb5ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007f
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffdd210000000000139bffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff740000
-000000004af5ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff9200000000000064ebffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff920000000000006dffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff740000000000004cf7ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdd210000
-000000139fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffde24000000000002e0ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffde26000000000021d9
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffdb200000000000139effffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff74000000
-0000004cf7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffff34c00000000000db3ffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff91e0000000000
-06e1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-00007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffb40c00000000004cf7ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdd21000000
-0000139effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff920000000000006d
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8f000000
-00000070ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffec610000000000139effffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7400000000
-00004cf7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffde2600000000
-0021dbffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c14
-000000000063ebffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffb30800000000004cf7ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdd2100000000
-00139effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff91e0000
-0000000cb3ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fd21000000000002deffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffec6100000000000093ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff720000000000
-004cf7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8f
-0000000000006affffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffff24c00000000000db3ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffb308000000000024ddffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdb210000000000
-139effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff9c14000000000063ebffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff930000000000006cffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007f
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff6c0000000000008cffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff73000000000000
-4cf7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffc1f000000000003e0ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffde27000000000021d8ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffdb20000000000024dfffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffdb20000000000013
-9effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff8f00000000000070ffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffff91e000000000006e1ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff730000000000008cffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff730000000000004d
-f6ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff9100000000000063ebffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff8f00000000000070ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-00007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffdb20000000000026e0ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffdb20000000000014a0
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffe026000000000003dfffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff9e15000000000061eaffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff710000000000004cf5ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff6f0000000000004df8
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffff44d0000000000006effffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffe22000000000001ddffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffdb20000000000014a0ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffeb61000000000014a0ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff940000000000006cffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffff34d00000000000cb2ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff6f0000000000004df8ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffb20700000000004df8ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffe02600000000001fd9ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff940000000000006bffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff878763190000
-00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffeb61000000000014a0ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffeb5f000000000015a0ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffff44d00000000000bb2ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffe02700000000001fd9ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff8787631900
-0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffb00700000000004ff8ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffb007000000000020fdffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff970000000000006bffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffa1f00000000000bb1ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319
-000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffea5e000000000017a1ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffea5e0000000000008fffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff9f1700000000001ed6ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff9200000000000067
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff878763
-19000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffb007000000000021fdffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffb007000000000025e0ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffd21000000000005deff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9f1700000000
-0060e8ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff8787
-6319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffe85e0000000000008fffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffea5e0000000000008fffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff92000000000000
-6dfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd210000
-00000002deffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87
-876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffde02000000000025e0ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffb007000000000025e0ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9f17000000
-000060e8ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff92
-0000000000006dffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff
-87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff700000000000008fffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffea5e0000000000008fffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe2200
-0000000002deffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff940000000000006bffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffff
-ff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffda1f000000000025e0ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffb007000000000025e0ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff3
-4e0000000000006effffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffe12700000000001ed8ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffff
-ffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff6e00000000000093ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffea5c00000000000091ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff960000000000005ee8ffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffff650000000000009afffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ff
-ffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffd91d000000000015a1ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffaf06000000000026e2ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffe228000000000000dcffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff9800000000000067ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787
-ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff6e00000000000050f9ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffea5c00000000000091ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffff65000000000000aafffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffa01700000000005fe8ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff87
-87ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffd71c000000000015a3ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffaf06000000000026e2ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff9600000000000069ffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffd21000000000002deffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff
-8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffb009000000000050f9ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffea5c00000000000091ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffe22a00000000001dd7ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff930000000000006cffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffff
-ff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffe4a8aeb5ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffea5c000000000015a3ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffaf06000000000026e2ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffa21000000000009afffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff940000000000006bffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffe4a8aeb5ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effff
-ffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffe3a7b2a622161f00000000181a1064b8acb4ffffffffffffffffffffffffff
-ffffffffffffad06000000000052f9ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffe85c00000000000091ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff9300000000000068ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffe22800000000001dd7ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffb4acb86411191f00000000181a1064b8
-acb4ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001eff
-ffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffe3b164101f000000000000000000000000000000000000181922a3b6ffffffffffffff
-ffffffffffe85c00000000000097ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffad06000000000026e2ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffa11800000000001dd5ffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffff55100000000000aaeffffffffffff
-ffffffffffffffffffffffffffffffffb6a3221918000000000000000000000000000000
-000000181922a3b6ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001e
-ffffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe3b1
-6315000000000000000000000000000000000000000000000000000000001622a3b6ffff
-ffffffffffad06000000000028e3ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff6800000000000092ffffffffffffffffffff
-ffffffffffffffffff8c00060000000012a8fffffffffff6007bffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff66f1ffffffffffffffffffff
-fffffc0586ffffffffffffffff7b00f6ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffc1a06020000000055e4fffffffc0586ffffffffffffffffffffffffffffff
-fffffffffffffffc0586fffffffffffffff6007bffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffe23000000000004ddffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff9900000000000066ffffffff
-ffffffffffffffffffffffffffb6a3221600000000000000000000000000000000000000
-0000000000000000001622a3b6ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000
-1effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe95c1500
-000000000000000000000000000000000000000000000000000000000000000000000016
-21aaffffff6800000000000092ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffd71c000000000028e3ffffffffffffffffffff
-ffffffffffffffffffff790047454141490a0011d1fffffffc349dffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff8800feffffffffffffffffff
-ffffffff0074ffffffffffffffff9d34fcffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff00154f4141443b0000d5ffffff0074ffffffffffffffffffffffffffff
-ffffffffffffffffff0074fffffffffffffffc349dffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff940000000000006bffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffa21800000000005de7ff
-ffffffffffffffffffffffaa211600000000000000000000000000000000000000000000
-00000000000000000000000000001621aaffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000
-001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe962000000
-000000000000000000001c585050479bf0e7e7eade594d50534b00000000000000000000
-00000023a125000000000028e3ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff6d00000000000092ffffffffffffffffffffff
-ffffffffffffffffffffff7a00ffffffffffff910002ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff8000ffffffffffffffffff
-ffffffffff007affffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff0089ffffffffffea133bffffff0079ffffffffffffffffffffffffff
-ffffffffffffffffffff0079ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffa21800000000005de7ffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffe23000000000001
-dcffffffffffffffffffab1f000000000000000000000000001c585050479bf0e7e7eade
-594d50534b000000000000000000000000001fabffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00
-00001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe66100000000
-00000000000000439df0e1ffffffffffffffffffffffffffffffffe8e7de611a00000000
-000000000000000000000092ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffa1d9ffffffffffffffffffffffd71c00000000002ae4ffffffffffffffffffffff
-ffffffffffffffffffffffff7900ffffffffffffff9a0093ffffff9cd5ffffffb1aaa4e0
-ffffffffff9ddfffaea9b1ffffffffffffffb1aaaab1ffffffba4f00aaacffffffffdfa6
-a6dfffffffff0088ffb0a9b1ffffffffd59cffffff9fe3ffb0a9b1ffffffffffffffb1a9
-aeffe39effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff0079ffffffffffff8000ffffff0079ffffffffffb1a9b1ffffffff
-ffffffdfa6a6dfffffffff0079ffffffffa49dffff9cd5ffffd5a6ffe1a4a6dfffffffff
-ffffb1a9aeffe39effffffffffffffffffffffffffffffffffffffff25000000000001dc
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9500000000
-00006affffffffffffa9200000000000000000000000439df0e1ffffffffffffffffffff
-ffffffffffffe8e7de611a0000000000000000000020a9ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f
-0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffae0600000000
-0000000000449cf1ffffffffffffffffffffffffffffffffffffffffffffffffffd8631b
-0000000000000000000038faffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffd10043ffffffffffffffffffff6d00000000000052f5ffffffffffffffffffffff
-ffffffffffffffffffffffffff7900ffffffffffffffff193ffffffc006affd107000000
-0012d1fffffc00796e00000008d2ffffffd207000000000fd7ff0000000000f1ffff6300
-00000061ffffff0045210000000dd2ffff6a00fcfffb00361e0000000dd2ffffffd20800
-0000624800fbffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff007affffffffffff7700ffffff0079ffffffd20800000008d2ff
-ffffff630000000061ffffff0079ffffff590079fffe006affff6c00560000000063ffff
-ffd208000000624800fbfffffffffffffffffffffffffffffffffffffff4530000000000
-006affffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff970000
-0000000068ffffffea5c0000000000000000001f4f9bf1ffffffffffffffffffffffffff
-ffffffffffffffffffffffffd8631b0000000000000000005ceaffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007f
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffaa200000000000
-000000449cf1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffd8631b000000000000000f72ebffffffffffffffffffffffffffffffffffffffffffff
-ffffffff4e000094ffffffffffffffd71c000000000018a4ffffffffffffffffffffffff
-ffffffffffffffffffffffffffff7900ffffffffffffffff7d00ffffff007aff3c00a6ef
-f2930033ffffff0000129ef8a20400d4ffc70011e3eaf29a0001fffb6c00e1e5ffff5900
-50e3e452008affff00001fe3f59a0042ffff7900ffffff00001fe3f59a0042ffffd40004
-a2f89f0d0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff0084ffffffffffad088effffff0079ffffd70004a2f8a20400
-d7ffff590050e3e452008affff0079ffff5c0092ffffff0079ffff7e000092f4e72300cf
-ffd40004a2f89f0d0000ffffffffffffffffffffffffffffffffffffffffffff99000000
-00000068ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe4
-2a000000000023ae6b00000000000000001b63d8ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffd8631b000000000000000060e7ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffd519000000000000
-0018a2f0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffdc5d00000000000000006affffffffffffffffffffffffffffffffffffffff
-ffffffffd500000008dbffffffffff6d00000000000053f9ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff7900ffffffffffffffff7900ffffff007dff008aff
-ffffff9540f9ffff0000f6fffffff80071ff9d38f4ffffffff7300ffff7e00ffffffff00
-66ffffffff1500ffff0023ffffffff6700ffff7900ffffff0023ffffffff6700ffff7100
-f8fffffff90000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff00000b00000003003bffffffff0079ffff4000f8fffffff8
-003fffff0066ffffffff1500ffff0082ff5d0092ffffffff0079ffff7e00a0fffffff900
-75ff7000f8fffffff90000ffffffffffffffffffffffffffffffffffffffffffffffe42a
-00000000001bd5ffffffffffffffffff5554ffffffffffffffffffffffffffffffffffff
-fff5530000000000000000000000000057dbffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffdb5700000000000000006affffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffac08000000000000
-189effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff2c3d000000000000005ce6ffffffffffffffffffffffffffffffffff
-ffffffffff4f000000004dffffffd81a000000000018a5ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff7900ffffffffffffffff7a00ffffff007dff1b00
-68aee2ffffffffffff0066ffffffffff5e00fffffffffffffff74a00ffff7900ffffff8f
-00f0fffffffff8d5ffff0081ffffffff7b00ffff7900ffffff0081ffffffff7b00ffff00
-5effffffffff6600ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff001b534444444f1b005fffffff0079ffff0063ffffffff
-ff6300ff9400f0fffffffff8d5ffff00877a00a2ffffffffff0079ffff7a00ffffffffff
-007eff005effffffffff6600ffffffffffffffffffffffffffffffffffffffffffffffff
-f753000000000008acffffffffffffffd50000d3ffffffffffffffffffffffffffffffff
-ffffffff9d0000000000000000000055e1ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffe1550000000000000068ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-00007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff6400000000000018
-9effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffcffe35500000000000000daffffffffffffffffffffffffffffff
-ffffffffff910000000000009cff6c00000000000053faffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff7900ffffffffffffffff7800ffffff0079fff9
-160000000d59e4ffffff007bffffffffff7a00ffffffb5530001000000ffff7900ffffff
-7700ffffffffffffffffff0079ffffffff7900ffff7900ffffff0079ffffffff7900ffff
-007affffffffff7b00ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff0088ffffffffffff6400cfffff0079ffff007bffffff
-ffff7b00ff7d00ffffffffffffffffff000018006cffffffffff0079ffff7900ffffffff
-ff007fff007affffffffff7b00ffffffffffffffffffffffffffffffffffffffffffffff
-ffffff9b00000000000066ffffffffffd90100004effffffffffffffffffffffffffffff
-ffffffffffff770000000000000055e1ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffe1550000000000001ad4
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffe65c0000000000189e
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffe155000000000009acffffffffffffffffffffffffff
-ffffffffffff120000000000000a22000000000018a5ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff7900ffffffffffffffff001bffffff0079ff
-ffffdc5c44000000d3ffff007dffffffffff7b00ffff5a00084a3cad7500ffff7900ffff
-ff7900ffffffffffffffffff0079ffffffff7900ffff7900ffffff0079ffffffff7900ff
-ff007bffffffffff7d00ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff0079fffffffffffff50074ffff0079ffff007bffff
-ffffff7d00ff7f00ffffffffffffffffff0021ff6f00d0ffffffff0079ffff7900ffffff
-ffff007eff007bffffffffff7d00ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffa31900000000001ad5ffffff4e00000000d4ffffffffffffffffffffffffff
-ffffffffffffde10000000000058e1ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1550000000000
-02daffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffd700000000000094ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffe729000000000062ffffffffffffffffffffff
-ffffffffffff950000000000000000000000000054faffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff7900ffffffffffffffd7007dffffff007a
-ff98dbfffffff6a80075ffff004cffffffffff3f11ff900097ffffffff8600ffff7900ff
-ffff7a00d9ffffffff8707ffff0079ffffffff7900ffff7900ffffff0079ffffffff7900
-ffff1442ffffffffff4c00ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff0079ffffffffffffff0076ffff0079ffff1542ff
-ffffffff4700ff7f00d9ffffffff8707ffff0081fffa1300ffffffff0079ffff7900ffff
-ffffff007dff1442ffffffffff4c00ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff24000000000008aeff6b00000000004cffffffffffffffffffffffff
-ffffffffffffda03000000000098ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7290000
-000003daffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffdc04000000002be5ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffff754000000000069ffffffffffffffffff
-ffffffffffffff12000000000000000000000018a5ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff7a00ffffffffffffdc0015f6ffffff00
-7cff0400ffffffffe90078ffff0000d9ffffffd500aaff7500ffffffffdb0000ffff7a00
-ffffffea0044ffffffdb0054ffff0079ffffffff7900ffff7900ffffff0079ffffffff79
-00ffff7b00d6ffffffd80000ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff0082ffffffffffff9800a9ffff0079ffff7b00
-d6ffffffd6005fffeb0044ffffffdb0054ffff0079ffffae005fffffff0079ffff7900ff
-ffffffff0079ff7b00d6ffffffd80000ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff960000000000005b02000000000000d4ffffffffffffffffffff
-ffffffffffffab09000000002be5ffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff754
-0000000009abffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff69000000000023fcff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff9d00000000001ad4ffffffffffff
-ffffffffffffff97000000000000000000000064ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff7a00acafababb3600000acffffffff
-0079ffac0014a2b0a20012f4ffff00000060bb60001affffa60015a2b555000a00ffff78
-0062b2ffff900054b5a60000e8ffff0078ffffffff7800ffff7800ffffff0078ffffffff
-7800fffff3150060bb5d000000ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff004cbdaaababb25b001dffffff0078fffff3
-150060bb600016f5ffff900054b5a60000e8ffff0078ffffff96008bffff0078ffff7800
-ffffffffff0078fff3150060bb5d000000ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffa3190000000000000000000000004cffffffffffffffffff
-ffffffffffff62000000000023fcffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff9d000000000062ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007f
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff64000000000096ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff9a000000000002d8ffffffff
-ffffffffffffffd906000000000000000000000079ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff74000000000000004dddffffffff
-fa006dffff9f0300000044f5ffffff00646400000047f4ffffff9f03000000adb700c8ff
-f3180000f1ffff9e00000018dffffffa006dffffffff6d00faff6d00fafffa006dffffff
-ff6d00fbfffffe49000000a67800ffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffff9000000000000000654f1fffffa006dffff
-fff54700000047f5ffffffff9e00000018dffffffa006dffffffff1600d1ff006dffff6d
-00fafffffffa006efffffe49000000a67800ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff24000000000000000000000000d4ffffffffffffff
-ffffffffffff64000000000096ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff9a000000000064ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff62000000000096ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffa31b0000000000d7ffff
-ffffffffffffffff4b00000000000000000000000000d1ffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffff4dfe9e9e9e9e8e8ffffffffff
-ffffd6f2ffffffffe3e8e8ffffffffff0084ffe7e6e8ffffffffffffffe3e3ffffffd6eb
-fffffce1e0ffffffffffe3e3fdffffffffd6f2fffffffff2d6fffff2d6ffffffd6f2ffff
-fffff2d6ffff9ce3ffe8e6eaff8300ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffdfe7e9e9e9e9e3ffffffffffffd6f2ff
-ffffffffe8e6e8ffffffffffffffffe3e3fdffffffffd6f2fffffffff9d0ecffd6f2ffff
-f2d6ffffffffffd6f5ff9ce3ffe8e6eaff8300ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffa000000000000000000000004cffffffffffff
-ffffffffffff62000000000096ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffa31b0000000062ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffd4000000002ce6ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff28000000004fff
-ffffffffffffffffd400000000000000000000000000000dffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff0079ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffff6003fffffffffdf005effffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffff7003fffffffffdf005effffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffa7000000000000000000000000d4ffffffff
-ffffffffffffd4000000002ce6ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff2800000000d4ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-00007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffd7050000002bfdffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc2800000000
-65ffffffffffffffff4c00000000000000000000000000000065ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff0078ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff5f0012a0afa00000e9ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff5f0012a0afa00000e9ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffd6090000000000000000000000004cffffff
-ffffffffffffd7050000002bfdffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffc2b00000005d7ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffd60300000000f4ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc290000
-000065ffffffffffffd20000000000000000000000000000000000d1ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffc006fffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff9b040000004adbffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff9b040000004adbffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff0b0000000000000000000000000000d4ff
-ffffffffffffd60300000000f4ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffff40000000003d6ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffd7000000000096ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff28
-0000000061ffffffffff0b000000000000000000000000000000000000f6ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffd7f2ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffe5eae9ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffe5eae9ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff670000000000000000000000000000004c
-ffffffffffffd7000000000096ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff960000000000d7ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff4d000000009affff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-b20000000000d3ffffff9300000000000000000000000000000000001c47bbffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff9100000000000000000000000000000000
-00d4ffffffffff4d000000009affffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff9a000000004dffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff878763190000
-00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff64000000009effff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff9a0000000002d7ffff10000000000000000000001f5c515de1ede4ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffcb00000000000000000000000000000000
-00004cffffffff64000000009effffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff9e0000000064ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff8787631900
-0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff8f000000002bffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff9a000000004bff84000000001f5c515de1ede4ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffedcf5c5a1f0000000000000000000000
-00000000d4ffff8f000000002bffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff2b000000008fffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319
-000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff100000002bfcff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff9d00000000d27651e2eee5ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffe5f4a04f510000000000
-00000000004cffff100000002bfcffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffc2b00000010ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff878763
-19000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9300000000f5ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff7000000053ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeaf3a04f
-51000000000000eca600000000f5ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffff50000000093ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff8787
-6319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff120000006cff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffef00000000d3ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffeaebe25e5b143f1c0000006cffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff6c00000012ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87
-876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6300000000ef
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff6c0000004dffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff3b00000000efffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffef0000000063ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff
-87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd2000000006b
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffef00000000d3ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffda000000006bffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff6b00000000d2ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffff
-ff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4b00000000
-efffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff6d0000004bffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff4b00000000efffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffef000000004bffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffff
-ffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd300000000
-6dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffee00000000d3ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffd3000000006dffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6d00000000d3
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ff
-ffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4b000000
-00eeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff6d0000004bffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff4b00000000eeffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee00000000
-4bffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787
-ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffcf000000
-006dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffff000000000d0ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffcf000000006dffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6d0000
-0000cfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff87
-87ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7c0000
-0000f0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff6d00000079ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff7c00000000f0ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000
-0000007cffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff
-8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4f00
-00006affffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffff400000010ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff4f0000006affffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-6a0000004fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffff
-ff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-000000b2ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff00000000d3ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff00000000b2ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffb200000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effff
-ffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff96
-00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff6c0000007affffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff9600000000ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff0000000096ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001eff
-ffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-4d00000069ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff8100000011ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff4d00000069ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff690000004dffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001e
-ffffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff00000000b2ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffef0000000095ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff00000000b2ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffb200000000ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000
-1effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffd400000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff2d0000004dffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffd400000000ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff00000000d4ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000
-001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff790000006affffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8100000000ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff790000006affffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff6a00000079ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00
-00001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff0d000000b4ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb20000000091
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff0d000000b4ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffb40000000dffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f
-0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-7dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007f
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-0083ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f3ee2ffffffff
-ffffffffffffffffffffffffffffffffffffffd200000000ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff00000000d2ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffd20000002dffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff2d00
-00004dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7800005ae2ff
-ffffffffffffffffffffffffffffffffffffffff780000002dffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff2d00000078ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff7800000085fffffffffffffb14000000000000000001f6ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff5ef1fffff70076ffffffffffffffffffffffffffffffffffffffffffffffffffffff85
-00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000
-5ae2ffffffffffffffffffffffffffffffffffffff7f00000085ffffffffffffffffffff
-fffffffb140000000000004bdefffffffb0083ffffffffffffffffffffffffffffffffff
-fffffffffffb0083ffffffffffffffffffffffffffffffffffffffffffffffffff8300fb
-ffffffffffffffffffffffffffff850000007fffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-00007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff7f0000007fffffffffffffff001b5c4d4e4e4e4e4950fdffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff8500fefffffd3fa3ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-7f00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000
-0000005ae2ffffffffffffffffffffffffffffffffff800000007fffffffffffffffffff
-ffffffffff001b5c4d4d50470000d1ffffff0075ffffffffffffffffffffffffffffffff
-ffffffffffffff0075ffffffffffffffffffffffffffffffffffffffffffffffffff7500
-ffffffffffffffffffffffffffffff7f00000080ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff7f0000007fffffffffffffff0088ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff8000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff7f00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000
-00000000000058e1ffffffffffffffffffffffffffffff0b0000007fffffffffffffffff
-ffffffffffff0088fffffffffff31935ffffff0079ffffffffffffffffffffffffffffff
-ffffffffffffffff0079ffffffffffffffffffffffffffffffffffffffffffffffffff7a
-00ffffffffffffffffffffffffffffff7f0000000bffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff830000007bffffffffffffff0079ffffffffffffffffffcd82d0ff
-ffffffff93cfffffffffa79fa7ffffffffffffffffa79fa7ffffffffcf92ffffffffff92
-d1ffb049009fa2ffff92cfffff95dfffa69fa7ffffffffffffffa79fa4ffde94ffffffff
-ffff7b00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00
-00000000000000000058e1ffffffffffffffffffffffffff000000007bffffffffffffff
-ffffffffffffff0079ffffffffffff7f00ffffff0079ffffffffd79b9bd7ffffffffffff
-ffd79b9bd7ffffffff0079ffffffff9a96ffffffffd79b9bd7ffffffffffffffa79fa6ff
-8800ffffffffffffffffffffffffffffff7b00000000ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff4d000000b2ffffffffffffff007affffffffffffffffffea0400
-ffffffff4d00dcffffca0000000000caffffffffcd0100000001caffff6b00fcfffffffc
-006fff0000000000f8ff006bfffc00321600000005ceffffffcd01000000584300fcffff
-ffffffb200000000d2ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff88
-00000000000000000000000058e1ffffffffffffffffffffff00000000b2ffffffffffff
-ffffffffffffffff007affffffffffff7500ffffff0079ffffff5a000000005affffffff
-ff5a0000000059ffffff0079ffffff510080ffffff580000000058ffffffffca00000000
-1c4100ffffffffffffffffffffffffffffffb200000000ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff00000000ffffffffffffffff0083ffffffffffffffffffffb2
-0059ffff8a0099ffffcc001cedf4ed1c00d0ffffce000dabffae0900ffff7900ffffffff
-ff007afffd7000eaebffff0079ffff000028ecfda3003dffffce000dabffa9140000ffff
-ffffffffff0000000078ffd196a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4
-a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4
-a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4
-a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4
-a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4
-a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4
-a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4
-a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4b6
-52000000000000000000000000000058e1ffffffffffffffff9100000000ffffffffffff
-ffffffffffffffffff0083ffffffffffa30797ffffff0079ffff54005bebeb5b0054ffff
-ff52005bebec5b0083ffff0079ffff540099ffffff4f0099fafa990051ffffce001fedfa
-ab190000ffffffffffffffffffffffffffffffff0000000091ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007f
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff00000000ffffffffffffffff0000020000000000007bffff
-ff6700dde90023ffffff6a1cffffffffff2237ffff6e00faffffffb20083ff7900ffffff
-ffff0079ffff7d00ffffffff0079ffff0029ffffffff6a00ffff6e00fafffffffb0000ff
-ffffffffffff000000007fff700000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000058e0ffffffffffff7d00000000ffffffffff
-ffffffffffffffffffff00000200000000003affffffff0079ffcc006dffffffff6d00cc
-ffff006cffffffff1c00ffff0084ff540099fffffffc00b1ffffffffb200cbff6e00f7ff
-fffffb0000ffffffffffffffffffffffffffffffff000000007dffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff00000000ffffffffffffffff00205e4f4f4f4f503ea7ff
-fffffa1e043317ffffffff004cbba2a1a2ba4e00ffff0061ffffffffffe1f2ff7900ffff
-ffffff0079ffff7900ffffffff0079ffff0081ffffffff7b00ffff0061ffffffffff6800
-ffffffffffffff000000007fff7f00000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000055ffffffffff7b00000000ffffffff
-ffffffffffffffffffffff00205e4f4f4f59230058ffffff0079ff7400f6fffffffff600
-74ff8c00f3fffffffffbdcffff00847300a8ffffffff8d00aba9a1a1a9ad007aff0061ff
-ffffffff6800ffffffffffffffffffffffffffffffff000000007bffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff00000000ffffffffffffffff0088ffffffffffffffff
-ffffffffff0000bfffffffff000000000000000000ffff007affffffffffffffff7900ff
-ffffffff0079ffff7900ffffffff0079ffff0079ffffffff7900ffff007affffffffff7b
-00ffffffffffffff000000007bff7e000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000056d2ffffffffffb200000000ffffff
-ffffffffffffffffffffffff0088ffffffffffff6900cbffff0079ff7900ffffffffffff
-0079ff7700ffffffffffffffffff00001d0065ffffffff7c00000000000000007bff007a
-ffffffffff7b00ffffffffffffffffffffffffffffffff00000000b2ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-00007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff2e000000d1ffffffffffffff0079ffffffffffffff
-ffffffffffd30000daffffffff0075ffefefeff0efe9ffff007dffffffffffffffff7900
-ffffffffff0079ffff7900ffffffff0079ffff0079ffffffff7900ffff007bffffffffff
-7d00ffffffffffffd100000000b2ff750000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000005fe7ffffffffffffffff00000000d1ff
-ffffffffffffffffffffffffff0079fffffffffffff80074ffff0079ff7500ffffffffff
-ff0079ff7900ffffffffffffffffff0027ff7300caffffff7700f2f6efefeff0e9ffff00
-7bffffffffff7d00ffffffffffffffffffffffffffffffd100000000ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff8500000078ffffffffffffff0079ffffffffffff
-ffffffffffff00242700d2ffffff1a44ffffffffffffffffff0044ffffffffff0083ff79
-00ffffffffff007affff7900ffffffff0079ffff0079ffffffff7900ffff193fffffffff
-ff4900ffffffffffff7800000000fffff8e7f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0
-f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0
-f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0
-f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0
-f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0
-f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0
-f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0
-f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0
-f0f0f0f0ff77000000000000000000000000005fe9ffffffffffffffffffff0000000078
-ffffffffffffffffffffffffffff0079ffffffffffffff0076ffff0079ffae00d4ffffff
-ffd5007bff7b00d5ffffffff8001ffff0081fffe1900ffffffae00dbffffffffffffffff
-193fffffffffff4900ffffffffffffffffffffffffffffff7800000000ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff7f0000007fffffffffffffff0083ffffffffff
-ffffffffffff5300ffff003cffffff7c00cfffffffff4835ffff6500ceffffff5600e7ff
-7b00d5ffffff5d007effff7a00ffffffff0079ffff0079ffffffff7900ffff7c00cfffff
-ffd10000ffffffffffff7f00000000ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff8300000000000000000000005fe9ffffffffffffffffffffffff00000000
-7fffffffffffffffffffffffffffff0083ffffffffffff9100aeffff0079ffff0040ffff
-ffff4200eeffee003fffffffd4005bffff0079ffffb20056ffffff0040ffffffffca00b4
-ff7c00cfffffffd30000ffffffffffffffffffffffffffffff7f00000000ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff7f0000007fffffffffffffff0046b19f9f9f
-9f9f9f92d2ff86009affff9c0087fffff71c0056aa950800a6fffff91a0096ab520064ff
-ffed00009ba94510007cffff7b0059a7ffff0078ffff0078ffffffff7800fffff71c0056
-af53000000ffffffffffff7f00000000ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff7f0000000000000000005fe9ffffffffffffffffffffffffffff6e0000
-007fffffffffffffffffffffffffffff0046b19f9f9fa6510024ffffff0078ffff970008
-9898080099ffffff990049aa9a0000ecffff0078ffffff9e0087ffff97000995aa560018
-fffff71c0056af55000000ffffffffffffffffffffffffffffff7f0000006effffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff878763190000
-00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff7b00000083fffffffffffffa0000000000
-00000000006fdd001effffffff1e00c7fffff9510000000ca8fffffffff84e00000094ff
-ffffffa70f00001af40070fffff7210000f7ff006ffffb006fffffffff6f00fbffffff54
-000000b07c00ffffffffffff8300000000ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff7f0000000000000060e9ffffffffffffffffffffffffffffffff8000
-000083fffffffffffffffffffffffffffa000000000000000d60f4fffffb006fffffffa8
-0c00000ca8ffffffffffa607000020e7fffffb006fffffffff1e00c7ffffa80c00000051
-f8fffffff951000000696000fbffffffffffffffffffffffffffff8300000080ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff8787631900
-0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffb40000004bffffffffffffffe8eff1f1
-f1f1f1f1f1e7fef6d9fdfffffffffdd9edfffffffff0f0ebfffffffffffffffff0edeeff
-ffffffffffffebebffffe0f6ffffffffe9e8ffffdef6ffffdff6fffffffff6deffff92dd
-fff1edf0ff8000ffffffffffff4b0000002effffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff7f000000000060e9ffffffffffffffffffffffffffffffffffff7b
-0000004bffffffffffffffffffffffffffffe8eff1f1f1f1ebffffffffffffdff6ffffff
-ffffebebffffffffffffffffffebebffffffffffdff6fffffffffdd9edffffffffebf0f0
-fffffffffffffff0edefffffe0ffffffffffffffffffffffffffffff4b0000007bffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319
-000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff800
-3affffffffd60065ffffffffffff0000000085ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff7e00000060e9ffffffffffffffffffffffffffffffffffffffff
-b400000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000b4ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff878763
-19000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-65000a95a3940000ecffffffffffff000000007effffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff6f0061e9ffffffffffffffffffffffffffffffffffffffffff
-ffff00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff8787
-6319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff00000000d1ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffa50d00000053e2ffffffffffffd1000000007fffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffb5d5ffffffffffffffffffffffffffffffffffffffffffff
-ffffff00000000d1ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd100000000ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87
-876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff6f00000079ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffedf1f1ffffffffffffffff7d00000000f0ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff6f00000079ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff790000006f
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff
-87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff810000000fffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff4b0000002fffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff810000000fffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0f000000
-81ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffff
-ff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000d0ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff0000000086ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff9b9b9d9c9c9d95d5ffffffffff8dccffff
-ffffffffffffffffffffffffffffffffffffffffff8dccffffffffffffffff8acbffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffff000000000d0ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd0000000
-00f0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffff
-ffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff2f00000079ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffd100000000f0ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffc000000000000000054fffffffc006bff
-fffffffffffffffffffffffffffffffffffffffffffc006bfffffffffffffff30060ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff2f00000079ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff790000
-002fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ff
-ffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff870000000fff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff780000002bffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff0071fff2f2f5eb5e0081ffffff0079
-ffffffffffffffffffffffffffffffffffffffffffffff0079ffffffffffffffffe3f9ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff870000000fffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0f00
-000087ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787
-ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff300000000
-d0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff0c000000b9ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff007dffffffffffff6700ffffff00
-79ffffffffffffffffffffffffffffffffffffffffffffff0079ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffff300000000d0ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd000
-000000f3ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff87
-87ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-0078ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff0079ffffffffffff7d00ffffff
-0079ffffffff9506000695ffffffffffdb47000047daffffff0079ffffffc7003ffffe00
-80ffff830dd246000047d8ffffffff95060000de9401fcffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff0000000078ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff78
-00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff
-8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6b00
-000010ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff8f0000006bffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff0083ffffffffffff3b1bffff
-ff0079ffffff4f00186318004fffffffc8000050510000d0ffff0079ffffcb0017f7ffff
-0075ffff7a0000135d520000ffffff4f00186314000000ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff6b00000010ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-100000006bffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffff
-ff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb3
-000000008effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff0c000000b6ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff0046ad9b9b9e950c25ffff
-ffff0079ffff8400a0ffffffa00084ffff0020f5ffffe6002affff007cffcb001effffff
-ff0079ffff7e0032ffffffab008bff8900a0ffffffa20000ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffb3000000008effffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-8e00000000b3ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effff
-ffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff300000000cffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff8e00000000ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000001d5
-ffffff0079ffff0025ffffffffff2500ffd100b7ffffffff9d4effff0090ee0029ffffff
-ffff0079ffff7b00fdffffffff0079ff371fffffffffff2e00ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff300000000cffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff0c00000030ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001eff
-ffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffb8000000008effffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff0c00000070ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff0073fff3f3f3fcb50f
-00ffffff0079ffff007fffffffffff7f00ff7900ffffffffffffffffff003b0b00c6ffff
-ffffff0079ffff7900ffffffffff007eff007dffffffffff7f00ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffb8000000008effffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff8e00000000b8ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001e
-ffffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff300000000effffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff9100000000f3ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff007dffffffffffff
-be008bffff0079ffff0079ffffffffff7a00ff7f00ffffffffffffffffff0000a52e00ff
-ffffffff0079ffff7900ffffffffff007fff0079ffffffffff7a00ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff300000000effffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff0e00000030ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000
-1effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffb8000000005bffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffd20100000071ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0079ffffffffff
-ffff0078ffff0079ffff0073ffffffffff7600ff7d00ffffffffffce86ffff006effba00
-55ffffffff0079ffff7900ffffffffff007eff0073ffffffffff7700ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffb8000000005bffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff5b00000000b8ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000
-001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff3400000000ceffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff4600000000f3ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff007affffffff
-ffffd7007dffff0079ffff5f00ffffffffff001effb4008dffffffff2e05ffff007bffff
-6a00c8ffffff0079ffff7900ffffffffff007aff5f00ffffffffff0900ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff3400000000ceffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffce0000000034ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00
-00001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffff70000000047ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffd00000000071ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082ffffff
-ffffe43100efffff0079ffffaf0047e1ffe14700b3ffff2600d4ffff5700b3ffff0079ff
-fffb2300d0ffff0079ffff7900ffffffffff0079ffaf0047e1ffdf4a0000ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffff70000000047ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff4700000000f7ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f
-0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff7100000000ceffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff4a00000000f2ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe00000000
-000000000099ffffff006fffffff9c00000000009cfffffffd1d000000005effffff006f
-fffffff5002affff006fffff6f00ffffffffff006fffff9e00000000222e00ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff7100000000ceffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffce0000000071ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007f
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffff20000000000caffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff5a0000000073ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff605758
-5757574fa4f9ffffffff50acffffffffe8645364e8ffffffffffffa04f4fa7ffffffff50
-acffffffff9f3ec0ff4facffffac50ffffffffff50afffffffee64535fff9000ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffff20000000000caffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffca0000000000f2ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff6f0000000008ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff590000000000f1ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffb0085ffffffffff3c19ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff6f0000000008ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff08000000006fffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffc30000000005effffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff570000000000a2ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff18009dffffff5300b2ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc30000000005e
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff5e0000000030fcffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-00007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff2f0000000059ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffcc0000000000a8ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffbf1200000000005dffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff2f000000
-0059ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff59000000002fffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffb8000000000057ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffcd000000000033ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa4525662e7ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb80000
-00000057ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff570000000000b8ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffa70000000000ccffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffcd000000000032ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa5
-0000000000ccffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffcc0000000000a5ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffb50000000000cfffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffcd000000000032ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffa60000000000cfffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffce0000000000a6ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff59d9be00000000049bffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffd000000000002effffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffa800000000049bffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffd00000000000a8ffffffca95ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007f
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff58000bff44000000000057ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff5a000000000000b8ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff35000000000057ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff5a000000000035ffffffff000056ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff5800000064ff3700000000004dda
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff58000000000000a6ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff3300000000004ddaffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff58000000000033ffffffff5500000058ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff590000000000caff650000000000
-00cdffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff5b000000000025b2ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff31000000000000cdffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff5b000000000031ffffffffb9000000000058ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-00007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffda4d0000000000a5ffffffa6000000
-0000049affffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffc80d000000000032ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffa50000000000049affffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffc80d0000000000a5ffffffffffffa5000000000058ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffcb000000000000a7fffffffffff235
-000000000059ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffcf000000000000a5ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffa400000000000059ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffcf000000000000a4ffffffffffffffffa7000000000058ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffcc000000000000a8ffffffffffffff
-fc6700000000001598ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffd94f000000000027b2ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffff23800000000001598ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffd94f000000000038f2ffffffffffffffffffffa8000000000057ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffcc000000000000a5ffffffffffffff
-ffffffa70000000000001398ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffd94f00000000000033ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff320000000000001394ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffd94f00000000000032ffffffffffffffffffffffffffa8000000000057ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff878763190000
-00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffcc000000000038f2ffffffffffffff
-fffffffffff2370000000000001398ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffd94f00000000000000a6ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffa6000000000000004cdaffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-d94f00000000000000a6ffffffffffffffffffffffffffffffa8000000000057ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff8787631900
-0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffcc000000000033ffffffffffffffff
-fffffffffffffffd63000000000000001196ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffd94f0000000000000025b1ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffb125000000000000004fd9ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd9
-4f0000000000000025b1ffffffffffffffffffffffffffffffffffa8000000000057ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319
-000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffcc000000000033ffffffffffffffff
-ffffffffffffffffffffee6900000000000000128ad5ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffa8540000000000000027b0ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffb0270000000000000054a8
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa854
-0000000000000027b0ffffffffffffffffffffffffffffffffffffffffa8000000000057
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff878763
-19000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffcc000000000033ffffffffffffffff
-fffffffffffffffffffffffffff33500000000000000001689d5ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffa850020000000000000000a4ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffa400000000000000
-00025399d2ffffffffffffffffffffffffffffffffffffffffffffffffffffffa8500200
-00000000000000a4ffffffffffffffffffffffffffffffffffffffffffffffa800000000
-0057ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff8787
-6319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffcd000000000035ffffffffffffffff
-ffffffffffffffffffffffffffffffffb1260000000000000000001688d6ffffffffffff
-ffffffffffffffffffffffffffffffa6500200000000000000000069ecffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec6900000000
-0000000000001688d6ffffffffffffffffffffffffffffffffffffffffffa65002000000
-00000000000069ecffffffffffffffffffffffffffffffffffffffffffffffffffaa0000
-00000055ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87
-876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff57000000000035ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffb226000000000000000000000e06128f9a
-98959effffffffd38f9897a050000a0a0000000000000000000069eeffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee6900
-000000000000000000000e06128f9a98959effffffffd38f9897a050000a0a0000000000
-000000000069eeffffffffffffffffffffffffffffffffffffffffffffffffffffffffaa
-000000000055ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff
-87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff55000000000035ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffa9672c0000000000000000000000
-000000000b09080e000000000000000000000000000000005f71edffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ed715f000000000000000000000000000000000b09080e00000000000000000000000000
-0000005f71edffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffaa000000000055ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffff
-ff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff55000000000033ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffe9772900000000000000
-0000000000000000000000000000000000000000000059affdffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffdaf590000000000000000000000000000000000000000000000000000000000
-0059affdffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffaa000000000055ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffff
-ffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff55000000000068fdffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9b259000000
-000000000000000000000000000000000000002a77ecf7ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffff7ec772a000000000000000000000000000000000000000000002a77
-ecf7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffaa000000000055ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ff
-ffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff550000000000acffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4f5
-ffaf5f6867702b0000000000616a676570edf9f1ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffff1f9ed70656767702b0000000000616a676570edf9f1ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffaa000000000055ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787
-ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff560000000000a9ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffff2f8f8f7f6ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffff2f8f8f7f6ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffa9000000000056ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff87
-87ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff560000000000a9ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffa9000000000056ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff
-8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff560000000000a9ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffa9000000000056ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffff
-ff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff590000000000a9ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffa9000000000056ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effff
-ffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffc50c0000000000a9ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffa9000000000056ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001eff
-ffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffc9000000000000abffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffab000000000054ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001e
-ffffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffc9000000000000aaffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffab000000000054ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000
-1effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffc9000000000029b6ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffab000000000054ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000
-001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffc9000000000036ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffab000000000054ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00
-00001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffc8000000000037ffffffffffffffffff
-ffffffffffffff91909190909189cdffffffffffffffffffffffffffffffffff83c6ffff
-fffffffffffffffffffffff7cdffffffc57fffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff91909190909189cdffffffffffffffffffffffffffffffff
-ff83c6fffffffffffffffffffffffffff7cdffffffc57fffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffab000000000054ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f
-0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffc8000000000037ffffffffffffffffff
-fffffffffffffffc000000000000000042d2fffffffffffffffffffffffffffffd006cff
-ffffffffffffffffffffffff2f65ffffff6300f3ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffc000000000000000042d2ffffffffffffffffffffffffff
-fffd006cffffffffffffffffffffffffff2f65ffffff6300f3ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffab000000000054
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007f
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffc8000000000037ffffffffffffffffff
-ffffffffffffffffff0075fff9f9fcf26a0000cbffffffffffffffffffffffffffff0079
-ffffffffffffffffffffffffff0077fffffffdebffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff0075fff9f9fcf26a0000cbffffffffffffffffffffff
-ffffff0079ffffffffffffffffffffffffff0077fffffffdebffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffac00000000
-0053ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffc9000000000037ffffffffffffffffff
-ffffffffffffffffffff007cffffffffffffb00037ffffffffffffffffffffffffffff00
-79ffffffffffffffffffffffffff0081fffffffffffffffffeffffffffffffffffffffff
-fffffffffffffdffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff007cffffffffffffb00037ffffffffffffffffffff
-ffffffff0079ffffffffffffffffffffffffff0081ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffac0000
-00000053ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffffff
-ffffffffffffffffffffffffffffffffffffffff54000000000037ffffffffffffffffff
-ffffffffffffffffffffff0079ffffffffffffff7200fcffffffd135000035d1ffffffff
-0079ffffffd135000035d1ffff780000000074ff7c00fbfffb007f9c00000088ffffffff
-ff89000000d48e00fbffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff0079ffffffffffffff7200fcffffffd135000035
-d1ffffffff0079ffffffd135000035d1ffff780000000074ff7c00fbff7f05c93a00003d
-cfffffffffd23b00004fff007fffffffffffffffffffffffffffffffffffffffffffffac
-000000000053ffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-00007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffffff
-ffffffffffffffffffffffffffffffffffffffff53000000000037ffffffffffffffffff
-ffffffffffffffffffffffff0079fffffffffffffff70086ffffc0001969691900c0ffff
-ff0079ffffc0001969691900c0ffb758002f62b1ff7600ffffff000000596d25007fffff
-ff460022721f000000ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff0079fffffffffffffff70086ffffc000196969
-1900c0ffffff0079ffffc0001969691900c0ffb758002f62b1ff7600ffff7a00001d6c5e
-0000fcffffc000005e5b0000007affffffffffffffffffffffffffffffffffffffffffff
-ffac000000000053ffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffffff
-ffffffffffffffffffffffffffffffffffffffff53000000000036ffffffffffffffffff
-ffffffffffffffffffffffffff0079ffffffffffffffff0078ffff002bffffffff2e00fc
-ffff0079ffff002bffffffff2e00ffffff0087ffffff7900ffffff0000afffffff2a00ff
-ff8600a8ffffffab0000ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff0079ffffffffffffffff0078ffff002bffff
-ffff2e00fcffff0079ffff002bffffffff2e00ffffff0087ffffff7900ffff7e0039ffff
-ffb20088ffff0024fbfffff934007fffffffffffffffffffffffffffffffffffffffffff
-ffffffac000000000053ffffffffffffffffffffffffffffffffffffffffffffffffffff
-000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffffff
-ffffffffffffffffffffffffffffffffffffffff5300000000006efdffffffffffffffff
-ffffffffffffffffffffffffffff0079ffffffffffffffff0079ffc400ffffffffffff00
-88ffff0079ffc400ffffffffffff0088ffff0079ffffff7900ffffff0070ffffffff7f00
-ffff3226ffffffffff3200ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff0079ffffffffffffffff0079ffc400ffff
-ffffffff0088ffff0079ffc400ffffffffffff0088ffff0079ffffff7900ffff7b00ffff
-ffffff0078ffc600bdffffffffc2007dffffffffffffffffffffffffffffffffffffffff
-ffffffffffac000000000053ffffffffffffffffffffffffffffffffffffffffffffffff
-ff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fffff
-ffffffffffffffffffffffffffffffffffffffff510000000000b0ffffffffffffffffff
-ffffffffffffffffffffffffffffff0079ffffffffffffffff0079ff7800000000000000
-0072ffff0079ff78000000000000000072ffff0079ffffff7900ffffff007affffffff79
-00ffff007cffffffffff7f00ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff0079ffffffffffffffff0079ff780000
-00000000000072ffff0079ff78000000000000000072ffff0079ffffff7900ffff7900ff
-ffffffff0079ff7400ffffffffffff007affffffffffffffffffffffffffffffffffffff
-ffffffffffffffae000000000051ffffffffffffffffffffffffffffffffffffffffffff
-ffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007fff
-ffffffffffffffffffffffffffffffffffffffff510000000000aeffffffffffffffffff
-ffffffffffffffffffffffffffffffff0079ffffffffffffffca007fff7c006b67636363
-645ab7ffff0079ff7c006b67636363645ab7ffff0079ffffff7900ffffff0079ffffffff
-7900ffff0079ffffffffff7a00ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff0079ffffffffffffffca007fff7c00
-6b67636363645ab7ffff0079ff7c006b67636363645ab7ffff0079ffffff7900ffff7900
-ffffffffff0079ff7800ffffffffffff0079ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffae000000000051ffffffffffffffffffffffffffffffffffffffff
-ffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000007f
-ffffffffffffffffffffffffffffffffffffffff510000000000aeffffffffffffffffff
-ffffffffffffffffffffffffffffffffff0079ffffffffffffff7200f4ff7e00ffffffff
-ffffffffffff0079ff7e00ffffffffffffffffffff0079ffffff7900ffffff0079ffffff
-ff7900ffff0072ffffffffff7600ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff0079ffffffffffffff7200f4ff7e
-00ffffffffffffffffffff0079ff7e00ffffffffffffffffffff0079ffffff7900ffff79
-00ffffffffff0079ff7d00ffffffffffff007affffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffae000000000051ffffffffffffffffffffffffffffffffffff
-ffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
-7fffffffffffffffffffffffffffffffffffffff520000000000aeffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff007bffffffffffffca002ffffff30086ffff
-ffffff82c9ffff0079fff30086ffffffffff82c9ffff007fffffff7900ffffff0079ffff
-ffff7900ffff6100ffffffffff0500ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff007bffffffffffffca002fffff
-f30086ffffffffff82c9ffff0079fff30086ffffffffff82c9ffff007fffffff7900ffff
-7900ffffffffff0079fff30086ffffffff8e007effffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffae000000000051ffffffffffffffffffffffffffffffff
-ffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000
-007fffffffffffffff3e41ffffffffffffffffd3470000000000aeffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff007effffffffff900000f7ffffff2a0092
-ffffd93400e1ffff0079ffff2a0092ffffd93400e1ffff0046ffffff7900ffffff0079ff
-ffffff7900ffffb4003ed9ffd73f0000ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff007effffffffff900000f7ff
-ffff2a0092ffffd93400e1ffff0079ffff2a0092ffffd93400e1ffff0046ffffff7900ff
-ff7900ffffffffff0079ffff2a0092ffff9000007effffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffae000000000051ffffffffffffffff413effffffff
-ffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000
-00007ffffffffffffffc000051ffffffffffffc6000000000000aeffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffe00000000000000001eb3ffffffffff2b
-0000000000a3fffffe006fffffff2b0000000000a3ffffff2f000075ff6f00fefffe006f
-ffffffff6f00feffffa8000000002b3400ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffe00000000000000001eb3ff
-ffffffff2b0000000000a3fffffe006fffffff2b0000000000a3ffffff2f000075ff6f00
-feff6f00fefffffffe006fffffff2c0000000064007dffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffae000000000051ffffffffffff510000fcffff
-ffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-0000007fffffffffffff9100000051ffffffffc6000000000000aeffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff6c64656464655daeffffffffffffff
-ffad5d6271eeffffffff5db3ffffffffad5d6271eefffffffffb6f54b1ffb35dffffff5d
-b3ffffffffb35dfffffffff571606dff9000ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff6c64656464655daeffff
-ffffffffffffad5d6271eeffffffff5db3ffffffffad5d6271eefffffffffb6f54b1ffb3
-5dffffb35dffffffffff5db3ffffffffaf5e5cbaff0075ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffae000000000051ffffffff5100000091ff
-ffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-000000007fffffffffffff450000000051ffffc7000000000000abffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffff7007fffffffffff361effffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff7600ffffffffffc900b2ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffae000000000051ffff510000000045
-ffffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff000000007ffffffffffffd0000000000005fcf00000000003ef7ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff1f0092ffffff4a00b6ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffaf003ed8ffffc90023ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffae000000000058580000000000
-00fdffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff878763190000
-00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff000000007fffffffffff8800000000000000000000000039ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffc41a000000000067ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff68000000000018c4ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffae00000000000000000000
-000088ffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff8787631900
-0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff000000007fffffffffff08000000000000000000000038ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffaf5f646eefffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffff071645eacffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffae0000000000000000
-00000008ffffffffffffffff000000007fffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319
-000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff000000007fffffffffc9000000000000000000000047ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb9000000000000
-0000000000c9ffffffffffffff000000007fffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff878763
-19000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff000000007fffffffff760000000000000000000000c8ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600000000000
-00000000000076ffffffffffffff000000007fffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff8787
-6319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff000000007fffffffff09000000000000000000000000c6ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff500000000000
-0000000000000009ffffffffffffff000000007fffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87
-876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff000000007fffffffc90000000000000000000000000000c5ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff500000000000
-000000000000000000c9ffffffffffff000000007fffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff
-87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff000000007fffffff76000000000000000000000000000000c5ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff500000000000
-0000000000000000000076ffffffffffff000000007fffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffff
-ff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff000000007fffffff0900000000000000000000000000000000c1ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb3e0000000000
-000000000000000000000009ffffffffffff000000007fffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffff
-ffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff000000007fffffc7000000000000000000000000000000000000
-c2ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc71600000000
-00000000000000000000000000c7ffffffffff000000007fffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ff
-ffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff000000007fffff760000000000000000000000000000003470
-a7fdffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff08131
-000000000000000000000000000076ffffffffff000000007fffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787
-ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff000000007fffff080000000000000000000000003181f0ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffba62000000000000000000000008ffffffffff000000007fffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff87
-87ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff000000007fff8e0000000000000000000062baffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffb7620000000000000000008fffffffff000000007fffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff
-8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff0000000082ff420000000000003181f3fcffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffb76200000000000043ffffffff000000007fffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffff
-ff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff000000008bff0000000064b9ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffb67234000000f7ffffff000000007fffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effff
-ffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff0000000094a11e76bcffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffff6861e82ffffff000000007fffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001eff
-ffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff000000008cffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff040000007fffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001e
-ffffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff00000000020f060302020303030303030303
-030303030303030303030303030303030303030303030303030303030303030303030303
-030303030303030303030303030303030303030303030303030303030303030303030303
-030303030303030303030303030303030303030303030303030303030303030303030303
-030303030303030303030303030303030303030303030303030303030303030303030303
-030303030303030303030303030303030303030303030303030303030303030303030303
-030303030303030303030303030303030303030303030303030303030303030303030303
-030303030303030303030303030303030303030303030303030303030303030303030303
-030303030303030303030303030303030303030303030303030303030303030303030303
-030303030303030303030303030303030303030303030303030303030303030303030303
-030303030303030303030303030303030303030303030303030303030303030303030303
-030303030303030303030303030303030303030303030303030303030303030303030303
-030303030303030303030303030303030303030303030303030303030303030303030303
-030303030303030303030303030303030303030303030303030303030303030303030303
-030303030303030303030303030303030303030303030303030303030303030303030303
-030303030303030303030303030303030303030303030303030303030303030303030303
-030303030303030303030303030303030303030303030303030303030303030303030303
-03030303030303030303030303030303030303030203060703040b000000007fffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000
-1effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffd0000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000007fffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000
-001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff77720000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000007fffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00
-00001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff00000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000000000000000000000074ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f
-0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff726f74747474747474747474
-747474747474747474747474747474747474747474747474747474747474747474747474
-747474747474747474747474747474747474747474747474747474747474747474747474
-747474747474747474747474747474747474747474747474747474747474747474747474
-747474747474747474747474747474747474747474747474747474747474747474747474
-747474747474747474747474747474747474747474747474747474747474747474747474
-747474747474747474747474747474747474747474747474747474747474747474747474
-747474747474747474747474747474747474747474747474747474747474747474747474
-747474747474747474747474747474747474747474747474747474747474747474747474
-747474747474747474747474747474747474747474747474747474747474747474747474
-747474747474747474747474747474747474747474747474747474747474747474747474
-747474747474747474747474747474747474747474747474747474747474747474747474
-747474747474747474747474747474747474747474747474747474747474747474747474
-747474747474747474747474747474747474747474747474747474747474747474747474
-747474747474747474747474747474747474747474747474747474747474747474747474
-747474747474747474747474747474747474747474747474747474747474747474747474
-747474747474747474747474747474747474747474747474747474747474747474747474
-7474747474747474747474747474747474747474747474747474747474747474747463ba
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff87828bffffffffffffffffffc57787ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff8777c5ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffc000000bbffffffffffffffff720000fcffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffb000070ffffffff
-ffffffffffffffffffffffffffffff6c86ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff6c86ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff00000002fcffffffffffffff7f0000ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa00007bffffff
-ffffffffffffffffffffffffffffff450076ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff450076ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff0000000087ffffffffffffff7f0000ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff5f5ffffff
-ffffffffffffffffffffffffffffffff00007fffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff00007fffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff0000030000c9ffffffffffff7f0000ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff000081ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff000081ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff0000781f003effffffffffff7f0000ffffffffffff
-fffffe908680c7ffffffffffffffffffffffffc480868efeffffffffffffffffffffffff
-ffffffffffffffc7808980c4fffffffffffbfbfffffffffffffffffffffff5ffffffffff
-ffffffffffc4808980c7ffffffffffffffff050083fffffffffffffffd9086868efeffff
-fffffffffffffffffffc8e8680c4ffffffffffffff050083ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319000000
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff00009b98000080ffffffffff7f0000ffffffffff
-ffcb3a00000000000982ffffffffff800011ff4e000000000681ffffffffffffffffffff
-ffffffffffffbb0300000000003fcbffffffba000045ffffffffffffbb000043fffc0300
-80ffffffff4a000000000002bbfffffffb06020000000003fbffffff4a00000000000682
-fffffffffffb030098d200000000003ad1fffffb06020000000003fbffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff878763190000
-00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff00008aff360007ffffffffff7f0000ffffffff
-ffbb00000000000000000047ffffffff7c00044300000000000000c5ffffffffffffffff
-ffffffffffff49000000000000000000bbffffffaf000049ffffffffc6000030ffffff00
-007cffffff490000000000000000c5fffffb00000000000000fcffc20000000000000000
-0047ffffffffff00003d040000000000003afffffb00000000000000fbffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff8787631900
-0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff000080ffc100004dffffffff7f0000ffffff
-fff901000036c4fffb7a0500007fffffff7f00000042ffffff4500003bffffffffffffff
-ffffffffffffbb000034c5fffffb7d000000f9ffffff430000bcffffff3f0000c0ffffff
-00007fffffc100004afffffb7f00002cffffff797700003c8375ffff3c00007dfbffffc5
-3500007fffffffff00000000b9ffffba000000c2ffff797700003c8375ffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87876319
-000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff00007fffff7f0000bcffffff7f0000ffff
-ffff8e000080fffffffffff5080007ffffff7f00003affffffffff3f0000ffffffffffff
-ffffffffffffff01004affffffffffffc000008efffffffb000003ffff4a0000b5ffffff
-ff00007fffff780005ffffffffff770067ffffffffff03008bffffff8b0000c0ffffffff
-ffff4a0006ffffffff000000b6ffffffffba000079ffffffff03008bffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff878763
-19000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff00007ffffff7000001faffff7f0000ff
-ffffff400004faffffffffffff7d0000c5ffff7f0000c5ffffffffff850000ffffffffff
-ffffffffffffffc50004ffffffffffffffff7f0040ffffffffb300005ec8000040ffffff
-ffff00007fffff84000056fffffffffff8ffffffffffff00007fffffff40007fffffffff
-ffffffff0400c5ffffff00003effffffffffff00007fffffffff00007fffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff8787
-6319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff00007fffffffb2000086ffff7f0000
-ffffffff000077fffffffffffffffc000079ffff7f0000ffffffffffff7f0000ffffffff
-ffffffffffffffff7900000a01000000000008010000ffffffffff7c0000000038ffffff
-ffffff00007ffffff6000000020777c9ffffffffffffffff00007fffffff000001080000
-000000010a000079ffffff000084ffffffffffff00007fffffffff00007fffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff87
-876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff00007fffffffff450000c8ff7f00
-00ffffffff000080ffffffffffffffff00007fffff7f0000ffffffffffff7f0000ffff7f
-000000000000007fff7f00000000000000000000000000fdffffffffff45000000c9ffff
-ffffffff00007fffffffae0000000000000983fdffffffffff00007fffffff0000000000
-000000000000000073ffffff00007fffffffffffff00007fffffffff00007fffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffffff
-87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff00007ffffffffffd03003cff89
-0000ffffffff000080ffffffffffffffff00007fffff7f0000ffffffffffff7f0000ffff
-700000000000000070ff7f00007e7e797979797979797577ffffffffffff4c000041ffff
-ffffffffff00007ffffffffff67900000000000000c2ffffffff00007fffffff00003e89
-797979797979797a68bcffffff00007fffffffffffff00007fffffffff00007fffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffffff
-ff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff00007fffffffffff7900009f
-9b0000ffffffff00007bffffffffffffffff00007affff7f0000ffffffffffff7f0000ff
-ffbc687a7979797a68bcff7a0005ffffffffffffffffffffffffffffffff83000000004b
-ffffffffffff00007fffffffffffffffbb793900000038ffffffff00007fffffff000089
-ffffffffffffffffffffffffffff00007fffffffffffff00007fffffffff00007fffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ffff
-ffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff00007fffffffffffff3700
-237c0000ffffffff3a0006feffffffffffff830000bfffff7f0000ffffffffffff7f0000
-ffffffffffffffffffffffffbf000086ffffffffffffffb9baffffffffffbd00004a4800
-00bdffffffffff00007ffffff47dc7ffffffffffff450000ffffffff00007fffffff3a00
-08ffffffffffffffff8ff2fdffffff00007fffffffffffff00007fffffffff00007fffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787ff
-ffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff00007fffffffffffffc3
-0000080000ffffffff8a000087fffffffffffd0c0004ffffff7f0000ffffffffffff7f00
-00ffffffffffffffffffffffffff040000c2ffffffffffc0000040ffffffff010000ffff
-390000c6ffffffff00007ffff90a0038ffffffffffff890000ffffffff000085ffffff8a
-00004dffffffffffff470000bcffffff00007fffffffffffff00007fffffffff000085ff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff8787
-ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff00007fffffffffffff
-ff8100000000fffffffff70000003fcdffff850b000079ffffff7f0000ffffffffffff7f
-0000ffffffffffffffffffffffffff7900000088ffffff88000000bcffffff490000b6ff
-ffc300003cffffffff00007fffff7700003eceffffff8b02007dffffffff000049ffffff
-f90000003dceffffce3d000034ffffffff00007fffffffffffff00007fffffffff000049
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff87
-87ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00007fffffffffff
-fffff800000000ffffffffffb30000000003000000003effffffff7f0000ffffffffffff
-7f0000ffffffffffffffffffffffffffff3e0000000100010000003fffffff8200007eff
-ffffff7d000082ffffff00007ffffff505000000030000000000f8ffffffff0000000005
-f7ffb300000000030300000000bfffffffff00007fffffffffffff00007fffffffff0000
-000004faffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffffff
-8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffd000073ffffffff
-ffffffffb1000000fdffffffffffc23100000000000176ffffffffff730000fdffffffff
-ff730000fdffffffffffffffffffffffffffff760100000000000176ffffffa400003eff
-ffffffffff3e0000a4fffd000073fffffff94100000000000031beffffffffffae000000
-0077ffffc23100000000000031c1fffffffffd000073fffffffffffd000073ffffffffae
-00000000fbffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effffff
-ff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7867bcffffff
-ffffffffffff7d7378fffffffffffffffff5827872bcffffffffffffffbc6778ffffffff
-ffffbc6778ffffffffffffffffffffffffffffffffffbc727b72bcfffffffffe78697cff
-ffffffffffffff7c6978ffff7867bcfffffffffff482787882f5fffffffffffffffff481
-7869bbfffffffff582787882f5ffffffffffffff7867bcffffffffffff7867bcffffffff
-fff4827478ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001effff
-ffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001eff
-ffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000001e
-ffffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000
-1effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000
-001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00
-00001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f
-0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffff7f0000001effffffff8787ffffffff87876319000000ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffff810000001effffffff8787ffffffff87876319000005ffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff820000001effffffff8787ffffffff8787631500000005000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000003000000001effffffff8787ffffffff8787741a000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000001effffffff8787ffffffff8787eefffb01000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000001effffffff8787ffffffff8787ffffe6371c1e1e1e1e
-1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e
-1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e
-1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e
-1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e
-1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e
-1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e
-1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e
-1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e
-1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e
-1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e
-1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e
-1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e
-1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e
-1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e
-1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e
-1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e
-1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e
-1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e
-1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e
-1e1e1e1e1e1e1e1e1e1e1e1e1e1e1c38ffffffff8787ffffffff87ffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffff8787ffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffff8787ffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff8787ffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff8787ff6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e876e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e6e
-%%EndData
-end
-%%PageTrailer
-%%Trailer
-%%BoundingBox: 0 109 495 573
-%%EOF
diff --git a/doc/user/states.gif b/doc/user/states.gif
deleted file mode 100644
index cd0799ea2e..0000000000
--- a/doc/user/states.gif
+++ /dev/null
Binary files differ
diff --git a/doc/user/states.pdf b/doc/user/states.pdf
deleted file mode 100644
index 490d2e00cd..0000000000
--- a/doc/user/states.pdf
+++ /dev/null
Binary files differ
diff --git a/doc/user/states.png b/doc/user/states.png
deleted file mode 100644
index 26d8b7784a..0000000000
--- a/doc/user/states.png
+++ /dev/null
Binary files differ
diff --git a/doc/user/task.t b/doc/user/task.t
deleted file mode 100644
index 22931fa723..0000000000
--- a/doc/user/task.t
+++ /dev/null
@@ -1,1729 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Task Manager
-
-@cindex tasks
-
-@section Introduction
-
-The task manager provides a comprehensive set of directives to
-create, delete, and administer tasks. The directives provided
-by the task manager are:
-
-@itemize @bullet
-@item @code{@value{DIRPREFIX}task_create} - Create a task
-@item @code{@value{DIRPREFIX}task_ident} - Get ID of a task
-@item @code{@value{DIRPREFIX}task_start} - Start a task
-@item @code{@value{DIRPREFIX}task_restart} - Restart a task
-@item @code{@value{DIRPREFIX}task_delete} - Delete a task
-@item @code{@value{DIRPREFIX}task_suspend} - Suspend a task
-@item @code{@value{DIRPREFIX}task_resume} - Resume a task
-@item @code{@value{DIRPREFIX}task_is_suspended} - Determine if a task is suspended
-@item @code{@value{DIRPREFIX}task_set_priority} - Set task priority
-@item @code{@value{DIRPREFIX}task_mode} - Change current task's mode
-@item @code{@value{DIRPREFIX}task_get_note} - Get task notepad entry
-@item @code{@value{DIRPREFIX}task_set_note} - Set task notepad entry
-@item @code{@value{DIRPREFIX}task_wake_after} - Wake up after interval
-@item @code{@value{DIRPREFIX}task_wake_when} - Wake up when specified
-@item @code{@value{DIRPREFIX}task_variable_add} - Associate per task variable
-@item @code{@value{DIRPREFIX}task_variable_add} - Obtain value of a a per task variable
-@item @code{@value{DIRPREFIX}task_variable_delete} - Remove per task variable
-@end itemize
-
-@section Background
-
-@subsection Task Definition
-
-@cindex task, definition
-
-Many definitions of a task have been proposed in computer literature.
-Unfortunately, none of these definitions encompasses all facets of the
-concept in a manner which is operating system independent. Several of the
-more common definitions are provided to enable each user to select a
-definition which best matches their own experience and understanding of the
-task concept:
-
-@itemize @bullet
-@item a "dispatchable" unit.
-
-@item an entity to which the processor is allocated.
-
-@item an atomic unit of a real-time, multiprocessor system.
-
-@item single threads of execution which concurrently compete for resources.
-
-@item a sequence of closely related computations which can execute
-concurrently with other computational sequences.
-
-@end itemize
-
-From RTEMS' perspective, a task is the smallest thread of
-execution which can compete on its own for system resources. A
-task is manifested by the existence of a task control block
-(TCB).
-
-@subsection Task Control Block
-
-The Task Control Block (TCB) is an RTEMS defined data structure
-which contains all the information that is pertinent to the
-execution of a task. During system initialization, RTEMS
-reserves a TCB for each task configured. A TCB is allocated
-upon creation of the task and is returned to the TCB free list
-upon deletion of the task.
-
-The TCB's elements are modified as a result of system calls made
-by the application in response to external and internal stimuli.
-TCBs are the only RTEMS internal data structure that can be
-accessed by an application via user extension routines. The TCB
-contains a task's name, ID, current priority, current and
-starting states, execution mode, set of notepad locations, TCB
-user extension pointer, scheduling control structures, as well
-as data required by a blocked task.
-
-A task's context is stored in the TCB when a task switch occurs.
-When the task regains control of the processor, its context is
-restored from the TCB. When a task is restarted, the initial
-state of the task is restored from the starting context area in
-the task's TCB.
-
-@subsection Task States
-
-@cindex task states
-
-A task may exist in one of the following five states:
-
-@itemize @bullet
-@item @b{executing} - Currently scheduled to the CPU
-@item @b{ready} - May be scheduled to the CPU
-@item @b{blocked} - Unable to be scheduled to the CPU
-@item @b{dormant} - Created task that is not started
-@item @b{non-existent} - Uncreated or deleted task
-@end itemize
-
-An active task may occupy the executing, ready, blocked or
-dormant state, otherwise the task is considered non-existent.
-One or more tasks may be active in the system simultaneously.
-Multiple tasks communicate, synchronize, and compete for system
-resources with each other via system calls. The multiple tasks
-appear to execute in parallel, but actually each is dispatched
-to the CPU for periods of time determined by the RTEMS
-scheduling algorithm. The scheduling of a task is based on its
-current state and priority.
-
-@subsection Task Priority
-
-@cindex task priority
-@cindex priority, task
-
-A task's priority determines its importance in relation to the
-other tasks executing on the same processor. RTEMS supports 255
-levels of priority ranging from 1 to 255. Tasks of numerically
-smaller priority values are more important tasks than tasks of
-numerically larger priority values. For example, a task at
-priority level 5 is of higher privilege than a task at priority
-level 10. There is no limit to the number of tasks assigned to
-the same priority.
-
-Each task has a priority associated with it at all times. The
-initial value of this priority is assigned at task creation
-time. The priority of a task may be changed at any subsequent
-time.
-
-Priorities are used by the scheduler to determine which ready
-task will be allowed to execute. In general, the higher the
-logical priority of a task, the more likely it is to receive
-processor execution time.
-
-@subsection Task Mode
-
-@cindex task mode
-
-A task's mode is a combination of the following four components:
-
-@itemize @bullet
-@item preemption
-@item ASR processing
-@item timeslicing
-@item interrupt level
-@end itemize
-
-It is used to modify RTEMS' scheduling process and to alter the
-execution environment of the task.
-
-@cindex preemption
-
-The preemption component allows a task to determine when control of the
-processor is relinquished. If preemption is disabled
-(@code{@value{RPREFIX}NO_PREEMPT}), the task will retain control of the
-processor as long as it is in the executing state -- even if a higher
-priority task is made ready. If preemption is enabled
-(@code{@value{RPREFIX}PREEMPT}) and a higher priority task is made ready,
-then the processor will be taken away from the current task immediately and
-given to the higher priority task.
-
-@cindex timeslicing
-
-The timeslicing component is used by the RTEMS scheduler to determine how
-the processor is allocated to tasks of equal priority. If timeslicing is
-enabled (@code{@value{RPREFIX}TIMESLICE}), then RTEMS will limit the amount
-of time the task can execute before the processor is allocated to another
-ready task of equal priority. The length of the timeslice is application
-dependent and specified in the Configuration Table. If timeslicing is
-disabled (@code{@value{RPREFIX}NO_TIMESLICE}), then the task will be
-allowed to execute until a task of higher priority is made ready. If
-@code{@value{RPREFIX}NO_PREEMPT} is selected, then the timeslicing
-component is ignored by the scheduler.
-
-The asynchronous signal processing component is used to determine when
-received signals are to be processed by the task.
-If signal processing is enabled (@code{@value{RPREFIX}ASR}), then signals
-sent to the task will be processed the next time the task executes. If
-signal processing is disabled (@code{@value{RPREFIX}NO_ASR}), then all
-signals received by the task will remain posted until signal processing is
-enabled. This component affects only tasks which have established a
-routine to process asynchronous signals.
-
-@cindex interrupt level, task
-
-The interrupt level component is used to determine which
-interrupts will be enabled when the task is executing.
-@code{@value{RPREFIX}INTERRUPT_LEVEL(n)}
-specifies that the task will execute at interrupt level n.
-
-@itemize @bullet
-@item @code{@value{RPREFIX}PREEMPT} - enable preemption (default)
-@item @code{@value{RPREFIX}NO_PREEMPT} - disable preemption
-@item @code{@value{RPREFIX}NO_TIMESLICE} - disable timeslicing (default)
-@item @code{@value{RPREFIX}TIMESLICE} - enable timeslicing
-@item @code{@value{RPREFIX}ASR} - enable ASR processing (default)
-@item @code{@value{RPREFIX}NO_ASR} - disable ASR processing
-@item @code{@value{RPREFIX}INTERRUPT_LEVEL(0)} - enable all interrupts (default)
-@item @code{@value{RPREFIX}INTERRUPT_LEVEL(n)} - execute at interrupt level n
-@end itemize
-
-@subsection Accessing Task Arguments
-
-@cindex task arguments
-
-All RTEMS tasks are invoked with a single argument which is
-specified when they are started or restarted. The argument is
-commonly used to communicate startup information to the task.
-The simplest manner in which to define a task which accesses it
-argument is:
-
-@ifset is-C
-@example
-rtems_task user_task(
- rtems_task_argument argument
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure User_Task (
- Argument : in RTEMS.Task_Argument_Ptr
-);
-@end example
-@end ifset
-
-Application tasks requiring more information may view this
-single argument as an index into an array of parameter blocks.
-
-@subsection Floating Point Considerations
-
-@cindex floating point
-
-Creating a task with the @code{@value{RPREFIX}FLOATING_POINT} flag results
-in additional memory being allocated for the TCB to store the state of the
-numeric coprocessor during task switches. This additional memory is
-@b{NOT} allocated for @code{@value{RPREFIX}NO_FLOATING_POINT} tasks. Saving
-and restoring the context of a @code{@value{RPREFIX}FLOATING_POINT} task
-takes longer than that of a @code{@value{RPREFIX}NO_FLOATING_POINT} task
-because of the relatively large amount of time required for the numeric
-coprocessor to save or restore its computational state.
-
-Since RTEMS was designed specifically for embedded military applications
-which are floating point intensive, the executive is optimized to avoid
-unnecessarily saving and restoring the state of the numeric coprocessor.
-The state of the numeric coprocessor is only saved when a
-@code{@value{RPREFIX}FLOATING_POINT} task is dispatched and that task was
-not the last task to utilize the coprocessor. In a system with only one
-@code{@value{RPREFIX}FLOATING_POINT} task, the state of the numeric
-coprocessor will never be saved or restored.
-
-Although the overhead imposed by @code{@value{RPREFIX}FLOATING_POINT} tasks
-is minimal, some applications may wish to completely avoid the overhead
-associated with @code{@value{RPREFIX}FLOATING_POINT} tasks and still
-utilize a numeric coprocessor. By preventing a task from being preempted
-while performing a sequence of floating point operations, a
-@code{@value{RPREFIX}NO_FLOATING_POINT} task can utilize the numeric
-coprocessor without incurring the overhead of a
-@code{@value{RPREFIX}FLOATING_POINT} context switch. This approach also
-avoids the allocation of a floating point context area. However, if this
-approach is taken by the application designer, NO tasks should be created
-as @code{@value{RPREFIX}FLOATING_POINT} tasks. Otherwise, the floating
-point context will not be correctly maintained because RTEMS assumes that
-the state of the numeric coprocessor will not be altered by
-@code{@value{RPREFIX}NO_FLOATING_POINT} tasks.
-
-If the supported processor type does not have hardware floating
-capabilities or a standard numeric coprocessor, RTEMS will not provide
-built-in support for hardware floating point on that processor. In this
-case, all tasks are considered @code{@value{RPREFIX}NO_FLOATING_POINT}
-whether created as @code{@value{RPREFIX}FLOATING_POINT} or
-@code{@value{RPREFIX}NO_FLOATING_POINT} tasks. A floating point emulation
-software library must be utilized for floating point operations.
-
-On some processors, it is possible to disable the floating point unit
-dynamically. If this capability is supported by the target processor, then
-RTEMS will utilize this capability to enable the floating point unit only
-for tasks which are created with the @code{@value{RPREFIX}FLOATING_POINT}
-attribute. The consequence of a @code{@value{RPREFIX}NO_FLOATING_POINT}
-task attempting to access the floating point unit is CPU dependent but will
-generally result in an exception condition.
-
-@subsection Per Task Variables
-
-@cindex per task variables
-
-Per task variables are used to support global variables whose value
-may be unique to a task. After indicating that a variable should be
-treated as private (i.e. per-task) the task can access and modify the
-variable, but the modifications will not appear to other tasks, and
-other tasks' modifications to that variable will not affect the value
-seen by the task. This is accomplished by saving and restoring the
-variable's value each time a task switch occurs to or from the calling task.
-
-This feature can be used when a routine is to be spawned repeatedly as
-several independent tasks. Although each task will have its own stack,
-and thus separate stack variables, they will all share the same static and
-global variables. To make a variable not shareable (i.e. a "global" variable
-that is specific to a single task), the tasks can call
-@code{rtems_task_variable_add} to make a separate copy of the variable
-for each task, but all at the same physical address.
-
-Task variables increase the context switch time to and from the
-tasks that own them so it is desirable to minimize the number of
-task variables. One efficient method is to have a single task
-variable that is a pointer to a dynamically allocated structure
-containing the task's private "global" data.
-
-A critical point with per-task variables is that each task must separately
-request that the same global variable is per-task private.
-
-@subsection Building a Task Attribute Set
-
-@cindex task attributes, building
-
-In general, an attribute set is built by a bitwise OR of the
-desired components. The set of valid task attribute components
-is listed below:
-
-@itemize @bullet
-@item @code{@value{RPREFIX}NO_FLOATING_POINT} - does not use coprocessor (default)
-@item @code{@value{RPREFIX}FLOATING_POINT} - uses numeric coprocessor
-@item @code{@value{RPREFIX}LOCAL} - local task (default)
-@item @code{@value{RPREFIX}GLOBAL} - global task
-@end itemize
-
-Attribute values are specifically designed to be mutually
-exclusive, therefore bitwise OR and addition operations are
-equivalent as long as each attribute appears exactly once in the
-component list. A component listed as a default is not required
-to appear in the component list, although it is a good
-programming practice to specify default components. If all
-defaults are desired, then @code{@value{RPREFIX}DEFAULT_ATTRIBUTES} should be used.
-
-This example demonstrates the attribute_set parameter needed to
-create a local task which utilizes the numeric coprocessor. The
-attribute_set parameter could be @code{@value{RPREFIX}FLOATING_POINT} or
-@code{@value{RPREFIX}LOCAL @value{OR} @value{RPREFIX}FLOATING_POINT}.
-The attribute_set parameter can be set to
-@code{@value{RPREFIX}FLOATING_POINT} because @code{@value{RPREFIX}LOCAL} is the default for all created
-tasks. If the task were global and used the numeric
-coprocessor, then the attribute_set parameter would be
-@code{@value{RPREFIX}GLOBAL @value{OR} @value{RPREFIX}FLOATING_POINT}.
-
-@subsection Building a Mode and Mask
-
-@cindex task mode, building
-
-In general, a mode and its corresponding mask is built by a
-bitwise OR of the desired components. The set of valid mode
-constants and each mode's corresponding mask constant is
-listed below:
-
-@ifset use-ascii
-@itemize @bullet
-@item @code{@value{RPREFIX}PREEMPT} is masked by
-@code{@value{RPREFIX}PREEMPT_MASK} and enables preemption
-
-@item @code{@value{RPREFIX}NO_PREEMPT} is masked by
-@code{@value{RPREFIX}PREEMPT_MASK} and disables preemption
-
-@item @code{@value{RPREFIX}NO_TIMESLICE} is masked by
-@code{@value{RPREFIX}TIMESLICE_MASK} and disables timeslicing
-
-@item @code{@value{RPREFIX}TIMESLICE} is masked by
-@code{@value{RPREFIX}TIMESLICE_MASK} and enables timeslicing
-
-@item @code{@value{RPREFIX}ASR} is masked by
-@code{@value{RPREFIX}ASR_MASK} and enables ASR processing
-
-@item @code{@value{RPREFIX}NO_ASR} is masked by
-@code{@value{RPREFIX}ASR_MASK} and disables ASR processing
-
-@item @code{@value{RPREFIX}INTERRUPT_LEVEL(0)} is masked by
-@code{@value{RPREFIX}INTERRUPT_MASK} and enables all interrupts
-
-@item @code{@value{RPREFIX}INTERRUPT_LEVEL(n)} is masked by
-@code{@value{RPREFIX}INTERRUPT_MASK} and sets interrupts level n
-@end itemize
-@end ifset
-
-@ifset use-tex
-@sp 1
-@c this is temporary
-@itemize @bullet
-@item @code{@value{RPREFIX}PREEMPT} is masked by
-@code{@value{RPREFIX}PREEMPT_MASK} and enables preemption
-
-@item @code{@value{RPREFIX}NO_PREEMPT} is masked by
-@code{@value{RPREFIX}PREEMPT_MASK} and disables preemption
-
-@item @code{@value{RPREFIX}NO_TIMESLICE} is masked by
-@code{@value{RPREFIX}TIMESLICE_MASK} and disables timeslicing
-
-@item @code{@value{RPREFIX}TIMESLICE} is masked by
-@code{@value{RPREFIX}TIMESLICE_MASK} and enables timeslicing
-
-@item @code{@value{RPREFIX}ASR} is masked by
-@code{@value{RPREFIX}ASR_MASK} and enables ASR processing
-
-@item @code{@value{RPREFIX}NO_ASR} is masked by
-@code{@value{RPREFIX}ASR_MASK} and disables ASR processing
-
-@item @code{@value{RPREFIX}INTERRUPT_LEVEL(0)} is masked by
-@code{@value{RPREFIX}INTERRUPT_MASK} and enables all interrupts
-
-@item @code{@value{RPREFIX}INTERRUPT_LEVEL(n)} is masked by
-@code{@value{RPREFIX}INTERRUPT_MASK} and sets interrupts level n
-
-@end itemize
-
-@tex
-@end tex
-@end ifset
-
-@ifset use-html
-@html
-<CENTER>
- <TABLE COLS=3 WIDTH="80%" BORDER=2>
-<TR><TD ALIGN=center><STRONG>Mode Constant</STRONG></TD>
- <TD ALIGN=center><STRONG>Mask Constant</STRONG></TD>
- <TD ALIGN=center><STRONG>Description</STRONG></TD></TR>
-<TR><TD ALIGN=center>@value{RPREFIX}PREEMPT</TD>
- <TD ALIGN=center>@value{RPREFIX}PREEMPT_MASK</TD>
- <TD ALIGN=center>enables preemption</TD></TR>
-<TR><TD ALIGN=center>@value{RPREFIX}NO_PREEMPT</TD>
- <TD ALIGN=center>@value{RPREFIX}PREEMPT_MASK</TD>
- <TD ALIGN=center>disables preemption</TD></TR>
-<TR><TD ALIGN=center>@value{RPREFIX}NO_TIMESLICE</TD>
- <TD ALIGN=center>@value{RPREFIX}TIMESLICE_MASK</TD>
- <TD ALIGN=center>disables timeslicing</TD></TR>
-<TR><TD ALIGN=center>@value{RPREFIX}TIMESLICE</TD>
- <TD ALIGN=center>@value{RPREFIX}TIMESLICE_MASK</TD>
- <TD ALIGN=center>enables timeslicing</TD></TR>
-<TR><TD ALIGN=center>@value{RPREFIX}ASR</TD>
- <TD ALIGN=center>@value{RPREFIX}ASR_MASK</TD>
- <TD ALIGN=center>enables ASR processing</TD></TR>
-<TR><TD ALIGN=center>@value{RPREFIX}NO_ASR</TD>
- <TD ALIGN=center>@value{RPREFIX}ASR_MASK</TD>
- <TD ALIGN=center>disables ASR processing</TD></TR>
-<TR><TD ALIGN=center>@value{RPREFIX}INTERRUPT_LEVEL(0)</TD>
- <TD ALIGN=center>@value{RPREFIX}INTERRUPT_MASK</TD>
- <TD ALIGN=center>enables all interrupts</TD></TR>
-<TR><TD ALIGN=center>@value{RPREFIX}INTERRUPT_LEVEL(n)</TD>
- <TD ALIGN=center>@value{RPREFIX}INTERRUPT_MASK</TD>
- <TD ALIGN=center>sets interrupts level n</TD></TR>
- </TABLE>
-</CENTER>
-@end html
-@end ifset
-
-Mode values are specifically designed to be mutually exclusive, therefore
-bitwise OR and addition operations are equivalent as long as each mode
-appears exactly once in the component list. A mode component listed as a
-default is not required to appear in the mode component list, although it
-is a good programming practice to specify default components. If all
-defaults are desired, the mode @code{@value{RPREFIX}DEFAULT_MODES} and the
-mask @code{@value{RPREFIX}ALL_MODE_MASKS} should be used.
-
-The following example demonstrates the mode and mask parameters used with
-the @code{@value{DIRPREFIX}task_mode}
-directive to place a task at interrupt level 3 and make it
-non-preemptible. The mode should be set to
-@code{@value{RPREFIX}INTERRUPT_LEVEL(3) @value{OR}
-@value{RPREFIX}NO_PREEMPT} to indicate the desired preemption mode and
-interrupt level, while the mask parameter should be set to
-@code{@value{RPREFIX}INTERRUPT_MASK @value{OR}
-@value{RPREFIX}NO_PREEMPT_MASK} to indicate that the calling task's
-interrupt level and preemption mode are being altered.
-
-@section Operations
-
-@subsection Creating Tasks
-
-The @code{@value{DIRPREFIX}task_create}
-directive creates a task by allocating a task
-control block, assigning the task a user-specified name,
-allocating it a stack and floating point context area, setting a
-user-specified initial priority, setting a user-specified
-initial mode, and assigning it a task ID. Newly created tasks
-are initially placed in the dormant state. All RTEMS tasks
-execute in the most privileged mode of the processor.
-
-@subsection Obtaining Task IDs
-
-When a task is created, RTEMS generates a unique task ID and
-assigns it to the created task until it is deleted. The task ID
-may be obtained by either of two methods. First, as the result
-of an invocation of the @code{@value{DIRPREFIX}task_create}
-directive, the task ID is
-stored in a user provided location. Second, the task ID may be
-obtained later using the @code{@value{DIRPREFIX}task_ident}
-directive. The task ID is
-used by other directives to manipulate this task.
-
-@subsection Starting and Restarting Tasks
-
-The @code{@value{DIRPREFIX}task_start}
-directive is used to place a dormant task in the
-ready state. This enables the task to compete, based on its
-current priority, for the processor and other system resources.
-Any actions, such as suspension or change of priority, performed
-on a task prior to starting it are nullified when the task is
-started.
-
-With the @code{@value{DIRPREFIX}task_start}
-directive the user specifies the task's
-starting address and argument. The argument is used to
-communicate some startup information to the task. As part of
-this directive, RTEMS initializes the task's stack based upon
-the task's initial execution mode and start address. The
-starting argument is passed to the task in accordance with the
-target processor's calling convention.
-
-The @code{@value{DIRPREFIX}task_restart}
-directive restarts a task at its initial
-starting address with its original priority and execution mode,
-but with a possibly different argument. The new argument may be
-used to distinguish between the original invocation of the task
-and subsequent invocations. The task's stack and control block
-are modified to reflect their original creation values.
-Although references to resources that have been requested are
-cleared, resources allocated by the task are NOT automatically
-returned to RTEMS. A task cannot be restarted unless it has
-previously been started (i.e. dormant tasks cannot be
-restarted). All restarted tasks are placed in the ready state.
-
-@subsection Suspending and Resuming Tasks
-
-The @code{@value{DIRPREFIX}task_suspend}
-directive is used to place either the caller or
-another task into a suspended state. The task remains suspended
-until a @code{@value{DIRPREFIX}task_resume}
-directive is issued. This implies that a
-task may be suspended as well as blocked waiting either to
-acquire a resource or for the expiration of a timer.
-
-The @code{@value{DIRPREFIX}task_resume}
-directive is used to remove another task from
-the suspended state. If the task is not also blocked, resuming
-it will place it in the ready state, allowing it to once again
-compete for the processor and resources. If the task was
-blocked as well as suspended, this directive clears the
-suspension and leaves the task in the blocked state.
-
-Suspending a task which is already suspended or resuming a
-task which is not suspended is considered an error.
-The @code{@value{DIRPREFIX}task_is_suspended} can be used to
-determine if a task is currently suspended.
-
-@subsection Delaying the Currently Executing Task
-
-The @code{@value{DIRPREFIX}task_wake_after} directive creates a sleep timer
-which allows a task to go to sleep for a specified interval. The task is
-blocked until the delay interval has elapsed, at which time the task is
-unblocked. A task calling the @code{@value{DIRPREFIX}task_wake_after}
-directive with a delay
-interval of @code{@value{RPREFIX}YIELD_PROCESSOR} ticks will yield the
-processor to any other ready task of equal or greater priority and remain
-ready to execute.
-
-The @code{@value{DIRPREFIX}task_wake_when}
-directive creates a sleep timer which allows
-a task to go to sleep until a specified date and time. The
-calling task is blocked until the specified date and time has
-occurred, at which time the task is unblocked.
-
-@subsection Changing Task Priority
-
-The @code{@value{DIRPREFIX}task_set_priority}
-directive is used to obtain or change the
-current priority of either the calling task or another task. If
-the new priority requested is
-@code{@value{RPREFIX}CURRENT_PRIORITY} or the task's
-actual priority, then the current priority will be returned and
-the task's priority will remain unchanged. If the task's
-priority is altered, then the task will be scheduled according
-to its new priority.
-
-The @code{@value{DIRPREFIX}task_restart}
-directive resets the priority of a task to its
-original value.
-
-@subsection Changing Task Mode
-
-The @code{@value{DIRPREFIX}task_mode}
-directive is used to obtain or change the current
-execution mode of the calling task. A task's execution mode is
-used to enable preemption, timeslicing, ASR processing, and to
-set the task's interrupt level.
-
-The @code{@value{DIRPREFIX}task_restart}
-directive resets the mode of a task to its
-original value.
-
-@subsection Notepad Locations
-
-RTEMS provides sixteen notepad locations for each task. Each
-notepad location may contain a note consisting of four bytes of
-information. RTEMS provides two directives,
-@code{@value{DIRPREFIX}task_set_note} and
-@code{@value{DIRPREFIX}task_get_note}, that enable a user
-to access and change the
-notepad locations. The @code{@value{DIRPREFIX}task_set_note}
-directive enables the user
-to set a task's notepad entry to a specified note. The
-@code{@value{DIRPREFIX}task_get_note}
-directive allows the user to obtain the note
-contained in any one of the sixteen notepads of a specified task.
-
-@subsection Task Deletion
-
-RTEMS provides the @code{@value{DIRPREFIX}task_delete}
-directive to allow a task to
-delete itself or any other task. This directive removes all
-RTEMS references to the task, frees the task's control block,
-removes it from resource wait queues, and deallocates its stack
-as well as the optional floating point context. The task's name
-and ID become inactive at this time, and any subsequent
-references to either of them is invalid. In fact, RTEMS may
-reuse the task ID for another task which is created later in the
-application.
-
-Unexpired delay timers (i.e. those used by
-@code{@value{DIRPREFIX}task_wake_after} and
-@code{@value{DIRPREFIX}task_wake_when}) and
-timeout timers associated with the task are
-automatically deleted, however, other resources dynamically
-allocated by the task are NOT automatically returned to RTEMS.
-Therefore, before a task is deleted, all of its dynamically
-allocated resources should be deallocated by the user. This may
-be accomplished by instructing the task to delete itself rather
-than directly deleting the task. Other tasks may instruct a
-task to delete itself by sending a "delete self" message, event,
-or signal, or by restarting the task with special arguments
-which instruct the task to delete itself.
-
-@section Directives
-
-This section details the task manager's directives. A
-subsection is dedicated to each of this manager's directives and
-describes the calling sequence, related constants, usage, and
-status codes.
-
-@page
-
-@subsection TASK_CREATE - Create a task
-
-@cindex create a task
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_task_create
-@example
-rtems_status_code rtems_task_create(
- rtems_name name,
- rtems_task_priority initial_priority,
- rtems_unsigned32 stack_size,
- rtems_mode initial_modes,
- rtems_attribute attribute_set,
- rtems_id *id
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Task_Create (
- Name : in RTEMS.Name;
- Initial_Priority : in RTEMS.Task_Priority;
- Stack_Size : in RTEMS.Unsigned32;
- Initial_Modes : in RTEMS.Mode;
- Attribute_Set : in RTEMS.Attribute;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - task created successfully@*
-@code{@value{RPREFIX}INVALID_NAME} - invalid task name@*
-@code{@value{RPREFIX}INVALID_SIZE} - stack too small@*
-@code{@value{RPREFIX}INVALID_PRIORITY} - invalid task priority@*
-@code{@value{RPREFIX}MP_NOT_CONFIGURED} - multiprocessing not configured@*
-@code{@value{RPREFIX}TOO_MANY} - too many tasks created@*
-@code{@value{RPREFIX}UNSATISFIED} - not enough memory for stack/FP context@*
-@code{@value{RPREFIX}TOO_MANY} - too many global objects
-
-@subheading DESCRIPTION:
-This directive creates a task which resides on the local node.
-It allocates and initializes a TCB, a stack, and an optional
-floating point context area. The mode parameter contains values
-which sets the task's initial execution mode. The
-@code{@value{RPREFIX}FLOATING_POINT} attribute should be
-specified if the created task
-is to use a numeric coprocessor. For performance reasons, it is
-recommended that tasks not using the numeric coprocessor should
-specify the @code{@value{RPREFIX}NO_FLOATING_POINT} attribute.
-If the @code{@value{RPREFIX}GLOBAL}
-attribute is specified, the task can be accessed from remote
-nodes. The task id, returned in id, is used in other task
-related directives to access the task. When created, a task is
-placed in the dormant state and can only be made ready to
-execute using the directive @code{@value{DIRPREFIX}task_start}.
-
-@subheading NOTES:
-This directive will not cause the calling task to be preempted.
-
-Valid task priorities range from a high of 1 to a low of 255.
-
-RTEMS supports a maximum of 256 interrupt levels which are
-mapped onto the interrupt levels actually supported by the
-target processor.
-
-The requested stack size should be at least
-@code{@value{RPREFIX}MINIMUM_STACK_SIZE}
-bytes. The value of @code{@value{RPREFIX}MINIMUM_STACK_SIZE}
-is processor dependent.
-Application developers should consider the stack usage of the
-device drivers when calculating the stack size required for
-tasks which utilize the driver.
-
-The following task attribute constants are defined by RTEMS:
-
-@itemize @bullet
-@item @code{@value{RPREFIX}NO_FLOATING_POINT} - does not use coprocessor (default)
-@item @code{@value{RPREFIX}FLOATING_POINT} - uses numeric coprocessor
-@item @code{@value{RPREFIX}LOCAL} - local task (default)
-@item @code{@value{RPREFIX}GLOBAL} - global task
-@end itemize
-
-The following task mode constants are defined by RTEMS:
-
-@itemize @bullet
-@item @code{@value{RPREFIX}PREEMPT} - enable preemption (default)
-@item @code{@value{RPREFIX}NO_PREEMPT} - disable preemption
-@item @code{@value{RPREFIX}NO_TIMESLICE} - disable timeslicing (default)
-@item @code{@value{RPREFIX}TIMESLICE} - enable timeslicing
-@item @code{@value{RPREFIX}ASR} - enable ASR processing (default)
-@item @code{@value{RPREFIX}NO_ASR} - disable ASR processing
-@item @code{@value{RPREFIX}INTERRUPT_LEVEL(0)} - enable all interrupts (default)
-@item @code{@value{RPREFIX}INTERRUPT_LEVEL(n)} - execute at interrupt level n
-@end itemize
-
-Tasks should not be made global unless remote tasks must
-interact with them. This avoids the system overhead incurred by
-the creation of a global task. When a global task is created,
-the task's name and id must be transmitted to every node in the
-system for insertion in the local copy of the global object
-table.
-
-The total number of global objects, including tasks, is limited
-by the maximum_global_objects field in the Configuration Table.
-
-@page
-
-@subsection TASK_IDENT - Get ID of a task
-
-@cindex get ID of a task
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_task_ident
-@example
-rtems_status_code rtems_task_ident(
- rtems_name name,
- rtems_unsigned32 node,
- rtems_id *id
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Task_Ident (
- Name : in RTEMS.Name;
- Node : in RTEMS.Node;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - task identified successfully@*
-@code{@value{RPREFIX}INVALID_NAME} - invalid task name@*
-@code{@value{RPREFIX}INVALID_NODE} - invalid node id
-
-@subheading DESCRIPTION:
-This directive obtains the task id associated with the task name
-specified in name. A task may obtain its own id by specifying
-@code{@value{RPREFIX}SELF} or its own task name in name. If the task name is not
-unique, then the task id returned will match one of the tasks
-with that name. However, this task id is not guaranteed to
-correspond to the desired task. The task id, returned in id, is
-used in other task related directives to access the task.
-
-@subheading NOTES:
-This directive will not cause the running task to be preempted.
-
-If node is @code{@value{RPREFIX}SEARCH_ALL_NODES}, all nodes are searched with the
-local node being searched first. All other nodes are searched
-with the lowest numbered node searched first.
-
-If node is a valid node number which does not represent the
-local node, then only the tasks exported by the designated node
-are searched.
-
-This directive does not generate activity on remote nodes. It
-accesses only the local copy of the global object table.
-
-@page
-
-@subsection TASK_START - Start a task
-
-@cindex starting a task
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_task_start
-@example
-rtems_status_code rtems_task_start(
- rtems_id id,
- rtems_task_entry entry_point,
- rtems_task_argument argument
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Task_Start (
- ID : in RTEMS.ID;
- Entry_Point : in System.Address;
- Argument : in RTEMS.Task_Argument_PTR;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - ask started successfully@*
-@code{@value{RPREFIX}INVALID_ADDRESS} - invalid task entry point@*
-@code{@value{RPREFIX}INVALID_ID} - invalid task id@*
-@code{@value{RPREFIX}INCORRECT_STATE} - task not in the dormant state@*
-@code{@value{RPREFIX}ILLEGAL_ON_REMOTE_OBJECT} - cannot start remote task
-
-@subheading DESCRIPTION:
-This directive readies the task, specified by tid, for execution
-based on the priority and execution mode specified when the task
-was created. The starting address of the task is given in
-entry_point. The task's starting argument is contained in
-argument. This argument can be a single value or used as an
-index into an array of parameter blocks.
-
-@subheading NOTES:
-The calling task will be preempted if its preemption mode is
-enabled and the task being started has a higher priority.
-
-Any actions performed on a dormant task such as suspension or
-change of priority are nullified when the task is initiated via
-the @code{@value{DIRPREFIX}task_start} directive.
-
-@page
-
-@subsection TASK_RESTART - Restart a task
-
-@cindex restarting a task
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_task_restart
-@example
-rtems_status_code rtems_task_restart(
- rtems_id id,
- rtems_task_argument argument
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Task_Restart (
- ID : in RTEMS.ID;
- Argument : in RTEMS.Task_Argument_PTR;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - task restarted successfully@*
-@code{@value{RPREFIX}INVALID_ID} - task id invalid@*
-@code{@value{RPREFIX}INCORRECT_STATE} - task never started@*
-@code{@value{RPREFIX}ILLEGAL_ON_REMOTE_OBJECT} - cannot restart remote task
-
-@subheading DESCRIPTION:
-This directive resets the task specified by id to begin
-execution at its original starting address. The task's priority
-and execution mode are set to the original creation values. If
-the task is currently blocked, RTEMS automatically makes the
-task ready. A task can be restarted from any state, except the
-dormant state.
-
-The task's starting argument is contained in argument. This
-argument can be a single value or an index into an array of
-parameter blocks. This new argument may be used to distinguish
-between the initial @code{@value{DIRPREFIX}task_start}
-of the task and any ensuing calls
-to @code{@value{DIRPREFIX}task_restart}
-of the task. This can be beneficial in deleting
-a task. Instead of deleting a task using
-the @code{@value{DIRPREFIX}task_delete}
-directive, a task can delete another task by restarting that
-task, and allowing that task to release resources back to RTEMS
-and then delete itself.
-
-@subheading NOTES:
-If id is @code{@value{RPREFIX}SELF}, the calling task will be restarted and will not
-return from this directive.
-
-The calling task will be preempted if its preemption mode is
-enabled and the task being restarted has a higher priority.
-
-The task must reside on the local node, even if the task was
-created with the @code{@value{RPREFIX}GLOBAL} option.
-
-@page
-
-@subsection TASK_DELETE - Delete a task
-
-@cindex deleting a task
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_task_delete
-@example
-rtems_status_code rtems_task_delete(
- rtems_id id
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Task_Delete (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - task restarted successfully@*
-@code{@value{RPREFIX}INVALID_ID} - task id invalid@*
-@code{@value{RPREFIX}ILLEGAL_ON_REMOTE_OBJECT} - cannot restart remote task
-
-@subheading DESCRIPTION:
-This directive deletes a task, either the calling task or
-another task, as specified by id. RTEMS stops the execution of
-the task and reclaims the stack memory, any allocated delay or
-timeout timers, the TCB, and, if the task is @code{@value{RPREFIX}FLOATING_POINT}, its
-floating point context area. RTEMS does not reclaim the
-following resources: region segments, partition buffers,
-semaphores, timers, or rate monotonic periods.
-
-@subheading NOTES:
-A task is responsible for releasing its resources back to RTEMS
-before deletion. To insure proper deallocation of resources, a
-task should not be deleted unless it is unable to execute or
-does not hold any RTEMS resources. If a task holds RTEMS
-resources, the task should be allowed to deallocate its
-resources before deletion. A task can be directed to release
-its resources and delete itself by restarting it with a special
-argument or by sending it a message, an event, or a signal.
-
-Deletion of the current task (@code{@value{RPREFIX}SELF}) will force RTEMS to select
-another task to execute.
-
-When a global task is deleted, the task id must be transmitted
-to every node in the system for deletion from the local copy of
-the global object table.
-
-The task must reside on the local node, even if the task was
-created with the @code{@value{RPREFIX}GLOBAL} option.
-
-@page
-
-@subsection TASK_SUSPEND - Suspend a task
-
-@cindex suspending a task
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_task_suspend
-@example
-rtems_status_code rtems_task_suspend(
- rtems_id id
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Task_Suspend (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - task restarted successfully@*
-@code{@value{RPREFIX}INVALID_ID} - task id invalid@*
-@code{@value{RPREFIX}ALREADY_SUSPENDED} - task already suspended
-
-@subheading DESCRIPTION:
-This directive suspends the task specified by id from further
-execution by placing it in the suspended state. This state is
-additive to any other blocked state that the task may already be
-in. The task will not execute again until another task issues
-the @code{@value{DIRPREFIX}task_resume}
-directive for this task and any blocked state
-has been removed.
-
-@subheading NOTES:
-The requesting task can suspend itself by specifying @code{@value{RPREFIX}SELF} as id.
-In this case, the task will be suspended and a successful
-return code will be returned when the task is resumed.
-
-Suspending a global task which does not reside on the local node
-will generate a request to the remote node to suspend the
-specified task.
-
-If the task specified by id is already suspended, then the
-@code{@value{RPREFIX}ALREADY_SUSPENDED} status code is returned.
-
-@page
-
-@subsection TASK_RESUME - Resume a task
-
-@cindex resuming a task
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_task_resume
-@example
-rtems_status_code rtems_task_resume(
- rtems_id id
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Task_Resume (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - task restarted successfully@*
-@code{@value{RPREFIX}INVALID_ID} - task id invalid@*
-@code{@value{RPREFIX}INCORRECT_STATE} - task not suspended
-
-@subheading DESCRIPTION:
-This directive removes the task specified by id from the
-suspended state. If the task is in the ready state after the
-suspension is removed, then it will be scheduled to run. If the
-task is still in a blocked state after the suspension is
-removed, then it will remain in that blocked state.
-
-@subheading NOTES:
-The running task may be preempted if its preemption mode is
-enabled and the local task being resumed has a higher priority.
-
-Resuming a global task which does not reside on the local node
-will generate a request to the remote node to resume the
-specified task.
-
-If the task specified by id is not suspended, then the
-@code{@value{RPREFIX}INCORRECT_STATE} status code is returned.
-
-@page
-
-@subsection TASK_IS_SUSPENDED - Determine if a task is Suspended
-
-@cindex is task suspended
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_task_is_suspended
-@example
-rtems_status_code rtems_task_is_suspended(
- rtems_id id
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Task_Is_Suspended (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - task is not suspended@*
-@code{@value{RPREFIX}ALREADY_SUSPENDED} - task is not suspended@*
-@code{@value{RPREFIX}INVALID_ID} - task id invalid@*
-@code{@value{RPREFIX}ILLEGAL_ON_REMOTE_OBJECT} - not supported on remote tasks
-
-@subheading DESCRIPTION:
-
-This directive returns a status code indicating whether or
-not the specified task is currently suspended.
-
-@subheading NOTES:
-
-This operation is not currently supported on remote tasks.
-
-@page
-
-@subsection TASK_SET_PRIORITY - Set task priority
-
-@findex rtems_task_set_priority
-@cindex current task priority
-@cindex set task priority
-@cindex get task priority
-@cindex obtain task priority
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@example
-rtems_status_code rtems_task_set_priority(
- rtems_id id,
- rtems_task_priority new_priority,
- rtems_task_priority *old_priority
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Task_Set_Priority (
- ID : in RTEMS.ID;
- New_Priority : in RTEMS.Task_Priority;
- Old_Priority : out RTEMS.Task_Priority;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - task priority set successfully@*
-@code{@value{RPREFIX}INVALID_ID} - invalid task id@*
-@code{@value{RPREFIX}INVALID_ADDRESS} - invalid return argument pointer@*
-@code{@value{RPREFIX}INVALID_PRIORITY} - invalid task priority
-
-@subheading DESCRIPTION:
-This directive manipulates the priority of the task specified by
-id. An id of @code{@value{RPREFIX}SELF} is used to indicate
-the calling task. When new_priority is not equal to
-@code{@value{RPREFIX}CURRENT_PRIORITY}, the specified
-task's previous priority is returned in old_priority. When
-new_priority is @code{@value{RPREFIX}CURRENT_PRIORITY},
-the specified task's current
-priority is returned in old_priority. Valid priorities range
-from a high of 1 to a low of 255.
-
-@subheading NOTES:
-The calling task may be preempted if its preemption mode is
-enabled and it lowers its own priority or raises another task's
-priority.
-
-Setting the priority of a global task which does not reside on
-the local node will generate a request to the remote node to
-change the priority of the specified task.
-
-If the task specified by id is currently holding any binary
-semaphores which use the priority inheritance algorithm, then
-the task's priority cannot be lowered immediately. If the
-task's priority were lowered immediately, then priority
-inversion results. The requested lowering of the task's
-priority will occur when the task has released all priority
-inheritance binary semaphores. The task's priority can be
-increased regardless of the task's use of priority inheritance
-binary semaphores.
-
-@page
-
-@subsection TASK_MODE - Change the current task mode
-
-@cindex current task mode
-@cindex set task mode
-@cindex get task mode
-@cindex set task preemption mode
-@cindex get task preemption mode
-@cindex obtain task mode
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_task_mode
-@example
-rtems_status_code rtems_task_mode(
- rtems_mode mode_set,
- rtems_mode mask,
- rtems_mode *previous_mode_set
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Task_Delete (
- Mode_Set : in RTEMS.Mode;
- Mask : in RTEMS.Mode;
- Previous_Mode_Set : in RTEMS.Mode;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - task mode set successfully
-
-@subheading DESCRIPTION:
-This directive manipulates the execution mode of the calling
-task. A task's execution mode enables and disables preemption,
-timeslicing, asynchronous signal processing, as well as
-specifying the current interrupt level. To modify an execution
-mode, the mode class(es) to be changed must be specified in the
-mask parameter and the desired mode(s) must be specified in the
-mode parameter.
-
-@subheading NOTES:
-The calling task will be preempted if it enables preemption and
-a higher priority task is ready to run.
-
-Enabling timeslicing has no effect if preemption is enabled.
-
-A task can obtain its current execution mode, without modifying
-it, by calling this directive with a mask value of
-@code{@value{RPREFIX}CURRENT_MODE}.
-
-To temporarily disable the processing of a valid ASR, a task
-should call this directive with the @code{@value{RPREFIX}NO_ASR}
-indicator specified in mode.
-
-The set of task mode constants and each mode's corresponding
-mask constant is provided in the following table:
-
-@ifset use-ascii
-@itemize @bullet
-@item @code{@value{RPREFIX}PREEMPT} is masked by
-@code{@value{RPREFIX}PREEMPT_MASK} and enables preemption
-
-@item @code{@value{RPREFIX}NO_PREEMPT} is masked by
-@code{@value{RPREFIX}PREEMPT_MASK} and disables preemption
-
-@item @code{@value{RPREFIX}NO_TIMESLICE} is masked by
-@code{@value{RPREFIX}TIMESLICE_MASK} and disables timeslicing
-
-@item @code{@value{RPREFIX}TIMESLICE} is masked by
-@code{@value{RPREFIX}TIMESLICE_MASK} and enables timeslicing
-
-@item @code{@value{RPREFIX}ASR} is masked by
-@code{@value{RPREFIX}ASR_MASK} and enables ASR processing
-
-@item @code{@value{RPREFIX}NO_ASR} is masked by
-@code{@value{RPREFIX}ASR_MASK} and disables ASR processing
-
-@item @code{@value{RPREFIX}INTERRUPT_LEVEL(0)} is masked by
-@code{@value{RPREFIX}INTERRUPT_MASK} and enables all interrupts
-
-@item @code{@value{RPREFIX}INTERRUPT_LEVEL(n)} is masked by
-@code{@value{RPREFIX}INTERRUPT_MASK} and sets interrupts level n
-
-@end itemize
-@end ifset
-
-@ifset use-tex
-@sp 1
-@c this is temporary
-@itemize @bullet
-@item @code{@value{RPREFIX}PREEMPT} is masked by
-@code{@value{RPREFIX}PREEMPT_MASK} and enables preemption
-
-@item @code{@value{RPREFIX}NO_PREEMPT} is masked by
-@code{@value{RPREFIX}PREEMPT_MASK} and disables preemption
-
-@item @code{@value{RPREFIX}NO_TIMESLICE} is masked by
-@code{@value{RPREFIX}TIMESLICE_MASK} and disables timeslicing
-
-@item @code{@value{RPREFIX}TIMESLICE} is masked by
-@code{@value{RPREFIX}TIMESLICE_MASK} and enables timeslicing
-
-@item @code{@value{RPREFIX}ASR} is masked by
-@code{@value{RPREFIX}ASR_MASK} and enables ASR processing
-
-@item @code{@value{RPREFIX}NO_ASR} is masked by
-@code{@value{RPREFIX}ASR_MASK} and disables ASR processing
-
-@item @code{@value{RPREFIX}INTERRUPT_LEVEL(0)} is masked by
-@code{@value{RPREFIX}INTERRUPT_MASK} and enables all interrupts
-
-@item @code{@value{RPREFIX}INTERRUPT_LEVEL(n)} is masked by
-@code{@value{RPREFIX}INTERRUPT_MASK} and sets interrupts level n
-
-@end itemize
-
-@tex
-@end tex
-@end ifset
-
-@ifset use-html
-@html
-<CENTER>
- <TABLE COLS=3 WIDTH="80%" BORDER=2>
-<TR><TD ALIGN=center><STRONG>Mode Constant</STRONG></TD>
- <TD ALIGN=center><STRONG>Mask Constant</STRONG></TD>
- <TD ALIGN=center><STRONG>Description</STRONG></TD></TR>
-<TR><TD ALIGN=center>@value{RPREFIX}PREEMPT</TD>
- <TD ALIGN=center>@value{RPREFIX}PREEMPT_MASK</TD>
- <TD ALIGN=center>enables preemption</TD></TR>
-<TR><TD ALIGN=center>@value{RPREFIX}NO_PREEMPT</TD>
- <TD ALIGN=center>@value{RPREFIX}PREEMPT_MASK</TD>
- <TD ALIGN=center>disables preemption</TD></TR>
-<TR><TD ALIGN=center>@value{RPREFIX}NO_TIMESLICE</TD>
- <TD ALIGN=center>@value{RPREFIX}TIMESLICE_MASK</TD>
- <TD ALIGN=center>disables timeslicing</TD></TR>
-<TR><TD ALIGN=center>@value{RPREFIX}TIMESLICE</TD>
- <TD ALIGN=center>@value{RPREFIX}TIMESLICE_MASK</TD>
- <TD ALIGN=center>enables timeslicing</TD></TR>
-<TR><TD ALIGN=center>@value{RPREFIX}ASR</TD>
- <TD ALIGN=center>@value{RPREFIX}ASR_MASK</TD>
- <TD ALIGN=center>enables ASR processing</TD></TR>
-<TR><TD ALIGN=center>@value{RPREFIX}NO_ASR</TD>
- <TD ALIGN=center>@value{RPREFIX}ASR_MASK</TD>
- <TD ALIGN=center>disables ASR processing</TD></TR>
-<TR><TD ALIGN=center>@value{RPREFIX}INTERRUPT_LEVEL(0)</TD>
- <TD ALIGN=center>@value{RPREFIX}INTERRUPT_MASK</TD>
- <TD ALIGN=center>enables all interrupts</TD></TR>
-<TR><TD ALIGN=center>@value{RPREFIX}INTERRUPT_LEVEL(n)</TD>
- <TD ALIGN=center>@value{RPREFIX}INTERRUPT_MASK</TD>
- <TD ALIGN=center>sets interrupts level n</TD></TR>
- </TABLE>
-</CENTER>
-@end html
-@end ifset
-
-@page
-
-@subsection TASK_GET_NOTE - Get task notepad entry
-
-@cindex get task notepad entry
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_task_get_note
-@example
-rtems_status_code rtems_task_get_note(
- rtems_id id,
- rtems_unsigned32 notepad,
- rtems_unsigned32 *note
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Task_Get_Note (
- ID : in RTEMS.ID;
- Notepad : in RTEMS.Notepad_Index;
- Note : out RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - note obtained successfully@*
-@code{@value{RPREFIX}INVALID_ID} - invalid task id@*
-@code{@value{RPREFIX}INVALID_NUMBER} - invalid notepad location
-
-@subheading DESCRIPTION:
-This directive returns the note contained in the notepad
-location of the task specified by id.
-
-@subheading NOTES:
-This directive will not cause the running task to be preempted.
-
-If id is set to @code{@value{RPREFIX}SELF},
-the calling task accesses its own notepad.
-
-@c This version of the paragraph avoids the overfull hbox error.
-@c The constants NOTEPAD_0 through NOTEPAD_15 can be used to access the
-@c sixteen notepad locations.
-
-The sixteen notepad locations can be accessed using the constants
-@code{@value{RPREFIX}NOTEPAD_0} through @code{@value{RPREFIX}NOTEPAD_15}.
-
-Getting a note of a global task which does not reside on the
-local node will generate a request to the remote node to obtain
-the notepad entry of the specified task.
-
-@page
-
-@subsection TASK_SET_NOTE - Set task notepad entry
-
-@cindex set task notepad entry
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_task_set_note
-@example
-rtems_status_code rtems_task_set_note(
- rtems_id id,
- rtems_unsigned32 notepad,
- rtems_unsigned32 note
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Task_Set_Note (
- ID : in RTEMS.ID;
- Notepad : in RTEMS.Notepad_Index;
- Note : in RTEMS.Unsigned32;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - task's note set successfully@*
-@code{@value{RPREFIX}INVALID_ID} - invalid task id@*
-@code{@value{RPREFIX}INVALID_NUMBER} - invalid notepad location
-
-@subheading DESCRIPTION:
-This directive sets the notepad entry for the task specified by
-id to the value note.
-
-@subheading NOTES:
-If id is set to @code{@value{RPREFIX}SELF}, the calling
-task accesses its own notepad locations.
-
-This directive will not cause the running task to be preempted.
-
-@c This version of the paragraph avoids the overfull hbox error.
-@c The constants NOTEPAD_0 through NOTEPAD_15 can be used to access the
-@c sixteen notepad locations.
-
-The sixteen notepad locations can be accessed using the constants
-@code{@value{RPREFIX}NOTEPAD_0} through @code{@value{RPREFIX}NOTEPAD_15}.
-
-Setting a notepad location of a global task which does not
-reside on the local node will generate a request to the remote
-node to set the specified notepad entry.
-
-@page
-
-@subsection TASK_WAKE_AFTER - Wake up after interval
-
-@cindex delay a task for an interval
-@cindex wake up after an interval
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_task_wake_after
-@example
-rtems_status_code rtems_task_wake_after(
- rtems_interval ticks
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Task_Wake_After (
- Ticks : in RTEMS.Interval;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - always successful
-
-@subheading DESCRIPTION:
-This directive blocks the calling task for the specified number
-of system clock ticks. When the requested interval has elapsed,
-the task is made ready. The @code{@value{DIRPREFIX}clock_tick}
-directive automatically updates the delay period.
-
-@subheading NOTES:
-Setting the system date and time with the
-@code{@value{DIRPREFIX}clock_set} directive
-has no effect on a @code{@value{DIRPREFIX}task_wake_after} blocked task.
-
-A task may give up the processor and remain in the ready state
-by specifying a value of @code{@value{RPREFIX}YIELD_PROCESSOR} in ticks.
-
-The maximum timer interval that can be specified is the maximum
-value which can be represented by the rtems_unsigned32 type.
-
-A clock tick is required to support the functionality of this directive.
-
-@page
-
-@subsection TASK_WAKE_WHEN - Wake up when specified
-
-@cindex delay a task until a wall time
-@cindex wake up at a wall time
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_task_wake_when
-@example
-rtems_status_code rtems_task_wake_when(
- rtems_time_of_day *time_buffer
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Task_Wake_When (
- Time_Buffer : in RTEMS.Time_Of_Day;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - awakened at date/time successfully@*
-@code{INVALID_TIME_OF_DAY} - invalid time buffer@*
-@code{@value{RPREFIX}NOT_DEFINED} - system date and time is not set
-
-@subheading DESCRIPTION:
-This directive blocks a task until the date and time specified
-in time_buffer. At the requested date and time, the calling
-task will be unblocked and made ready to execute.
-
-@subheading NOTES:
-The ticks portion of time_buffer @value{STRUCTURE} is ignored. The
-timing granularity of this directive is a second.
-
-A clock tick is required to support the functionality of this directive.
-
-@page
-
-@subsection TASK_VARIABLE_ADD - Associate per task variable
-
-@cindex per-task variable
-@cindex task private variable
-@cindex task private data
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_task_variable_add
-@example
-rtems_status_code rtems_task_variable_add(
- rtems_id tid,
- void **ptr,
- void (*dtor)(void *)
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Task_Variable_Add (
- Id : in RTEMS.ID;
- Ptr : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - per task variable added successfully@*
-@code{@value{RPREFIX}INVALID_ID} - invalid task id@*
-@code{@value{RPREFIX}NO_MEMORY} - invalid task id@*
-@code{@value{RPREFIX}ILLEGAL_ON_REMOTE_OBJECT} - not supported on remote tasks@*
-
-@subheading DESCRIPTION:
-This directive adds the memory location specified by the
-ptr argument to the context of the given task. The variable will
-then be private to the task. The task can access and modify the
-variable, but the modifications will not appear to other tasks, and
-other tasks' modifications to that variable will not affect the value
-seen by the task. This is accomplished by saving and restoring the
-variable's value each time a task switch occurs to or from the calling task.
-If the dtor argument is non-NULL it specifies the address of a `destructor'
-function which will be called when the task is deleted. The argument
-passed to the destructor function is the task's value of the variable.
-
-@subheading NOTES:
-
-Task variables increase the context switch time to and from the
-tasks that own them so it is desirable to minimize the number of
-task variables. One efficient method
-is to have a single task variable that is a pointer to a dynamically
-allocated structure containing the task's private `global' data.
-In this case the destructor function could be `free'.
-
-@page
-
-@subsection TASK_VARIABLE_GET - Obtain value of a per task variable
-
-@cindex get per-task variable
-@cindex obtain per-task variable
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_task_variable_get
-@example
-rtems_status_code rtems_task_variable_get(
- rtems_id tid,
- void **ptr,
- void **result
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Task_Variable_Get (
- Id : in RTEMS.ID;
- Ptr : in RTEMS.Address;
- Value : out RTEMS.Address;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - per task variable added successfully@*
-@code{@value{RPREFIX}INVALID_ID} - invalid task id@*
-@code{@value{RPREFIX}NO_MEMORY} - invalid task id@*
-@code{@value{RPREFIX}ILLEGAL_ON_REMOTE_OBJECT} - not supported on remote tasks@*
-
-@subheading DESCRIPTION:
-This directive looks up the private value of a task variable for a
-specified task and stores that value in the location pointed to by
-the result argument. The specified task is usually not the calling
-task, which can get its private value by directly accessing the variable.
-
-@subheading NOTES:
-
-If you change memory which @code{result} points to, remember to declare that
-memory as volatile, so that the compiler will optimize it correctly. In this
-case both the pointer @code{result} and data referenced by @code{result}
-should be considered volatile.
-
-@page
-
-@subsection TASK_VARIABLE_DELETE - Remove per task variable
-
-@cindex per-task variable
-@cindex task private variable
-@cindex task private data
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_task_variable_delete
-@example
-rtems_status_code rtems_task_variable_delete(
- rtems_id tid,
- void **ptr
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Task_Variable_Delete (
- Id : in RTEMS.ID;
- Ptr : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - per task variable added successfully@*
-@code{@value{RPREFIX}INVALID_ID} - invalid task id@*
-@code{@value{RPREFIX}NO_MEMORY} - invalid task id@*
-@code{@value{RPREFIX}ILLEGAL_ON_REMOTE_OBJECT} - not supported on remote tasks@*
-
-@subheading DESCRIPTION:
-This directive removes the given location from a task's context.
-
-@subheading NOTES:
-
-NONE
diff --git a/doc/user/timer.t b/doc/user/timer.t
deleted file mode 100644
index 250cb4a76c..0000000000
--- a/doc/user/timer.t
+++ /dev/null
@@ -1,504 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter Timer Manager
-
-@cindex timers
-
-@section Introduction
-
-The timer manager provides support for timer
-facilities. The directives provided by the timer manager are:
-
-@itemize @bullet
-@item @code{@value{DIRPREFIX}timer_create} - Create a timer
-@item @code{@value{DIRPREFIX}timer_ident} - Get ID of a timer
-@item @code{@value{DIRPREFIX}timer_cancel} - Cancel a timer
-@item @code{@value{DIRPREFIX}timer_delete} - Delete a timer
-@item @code{@value{DIRPREFIX}timer_fire_after} - Fire timer after interval
-@item @code{@value{DIRPREFIX}timer_fire_when} - Fire timer when specified
-@item @code{@value{DIRPREFIX}timer_reset} - Reset an interval timer
-@end itemize
-
-
-@section Background
-
-@subsection Required Support
-
-A clock tick is required to support the functionality provided by this manager.
-
-@subsection Timers
-
-A timer is an RTEMS object which allows the
-application to schedule operations to occur at specific times in
-the future. User supplied timer service routines are invoked by
-the @code{@value{DIRPREFIX}clock_tick} directive
-when the timer fires. Timer service routines may perform
-any operations or directives which normally
-would be performed by the application code which invoked the
-@code{@value{DIRPREFIX}clock_tick} directive.
-
-The timer can be used to implement watchdog routines
-which only fire to denote that an application error has
-occurred. The timer is reset at specific points in the
-application to insure that the watchdog does not fire. Thus, if
-the application does not reset the watchdog timer, then the
-timer service routine will fire to indicate that the application
-has failed to reach a reset point. This use of a timer is
-sometimes referred to as a "keep alive" or a "deadman" timer.
-
-@subsection Timer Service Routines
-
-The timer service routine should adhere to @value{LANGUAGE} calling
-conventions and have a prototype similar to the following:
-
-@ifset is-C
-@example
-rtems_timer_service_routine user_routine(
- rtems_id timer_id,
- void *user_data
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure User_Routine(
- Timer_ID : in RTEMS.ID;
- User_Data : in System.Address
-);
-@end example
-@end ifset
-
-Where the timer_id parameter is the RTEMS object ID
-of the timer which is being fired and user_data is a pointer to
-user-defined information which may be utilized by the timer
-service routine. The argument user_data may be NULL.
-
-@section Operations
-
-@subsection Creating a Timer
-
-The @code{@value{DIRPREFIX}timer_create} directive creates a timer by
-allocating a Timer Control Block (TMCB), assigning the timer a
-user-specified name, and assigning it a timer ID. Newly created
-timers do not have a timer service routine associated with them
-and are not active.
-
-@subsection Obtaining Timer IDs
-
-When a timer is created, RTEMS generates a unique
-timer ID and assigns it to the created timer until it is
-deleted. The timer ID may be obtained by either of two methods.
-First, as the result of an invocation of the
-@code{@value{DIRPREFIX}timer_create}
-directive, the timer ID is stored in a user provided location.
-Second, the timer ID may be obtained later using the
-@code{@value{DIRPREFIX}timer_ident} directive. The timer ID
-is used by other directives to manipulate this timer.
-
-@subsection Initiating an Interval Timer
-
-The @code{@value{DIRPREFIX}timer_fire_after} directive initiates a timer to
-fire a user provided timer service routine after the specified
-number of clock ticks have elapsed. When the interval has
-elapsed, the timer service routine will be invoked from the
-@code{@value{DIRPREFIX}clock_tick} directive.
-
-@subsection Initiating a Time of Day Timer
-
-The @code{@value{DIRPREFIX}timer_fire_when} directive initiates a timer to
-fire a user provided timer service routine when the specified
-time of day has been reached. When the interval has elapsed,
-the timer service routine will be invoked from the
-@code{@value{DIRPREFIX}clock_tick} directive.
-
-@subsection Canceling a Timer
-
-The @code{@value{DIRPREFIX}timer_cancel} directive is used to halt the
-specified timer. Once canceled, the timer service routine will
-not fire unless the timer is reinitiated. The timer can be
-reinitiated using the @code{@value{DIRPREFIX}timer_reset},
-@code{@value{DIRPREFIX}timer_fire_after}, and
-@code{@value{DIRPREFIX}timer_fire_when} directives.
-
-@subsection Resetting a Timer
-
-The @code{@value{DIRPREFIX}timer_reset} directive is used to restore an
-interval timer initiated by a previous invocation of
-@code{@value{DIRPREFIX}timer_fire_after} to
-its original interval length. If the
-timer has not been used or the last usage of this timer
-was by a @code{@value{DIRPREFIX}timer_fire_when} directive, then an error is
-returned. The timer service routine is not changed or
-fired by this directive.
-
-@subsection Deleting a Timer
-
-The @code{@value{DIRPREFIX}timer_delete} directive is used to delete a timer.
-If the timer is running and has not expired, the timer is
-automatically canceled. The timer's control block is returned
-to the TMCB free list when it is deleted. A timer can be
-deleted by a task other than the task which created the timer.
-Any subsequent references to the timer's name and ID are invalid.
-
-@section Directives
-
-This section details the timer manager's directives.
-A subsection is dedicated to each of this manager's directives
-and describes the calling sequence, related constants, usage,
-and status codes.
-
-@c
-@c
-@c
-@page
-@subsection TIMER_CREATE - Create a timer
-
-@cindex create a timer
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_timer_create
-@example
-rtems_status_code rtems_timer_create(
- rtems_name name,
- rtems_id *id
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Timer_Create (
- Name : in RTEMS.Name;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - timer created successfully@*
-@code{@value{RPREFIX}INVALID_NAME} - invalid timer name@*
-@code{@value{RPREFIX}TOO_MANY} - too many timers created
-
-@subheading DESCRIPTION:
-
-This directive creates a timer. The assigned timer
-id is returned in id. This id is used to access the timer with
-other timer manager directives. For control and maintenance of
-the timer, RTEMS allocates a TMCB from the local TMCB free pool
-and initializes it.
-
-@subheading NOTES:
-
-This directive will not cause the calling task to be
-preempted.
-
-@c
-@c
-@c
-@page
-@subsection TIMER_IDENT - Get ID of a timer
-
-@cindex obtain the ID of a timer
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_timer_ident
-@example
-rtems_status_code rtems_timer_ident(
- rtems_name name,
- rtems_id *id
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Timer_Ident (
- Name : in RTEMS.Name;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - timer identified successfully@*
-@code{@value{RPREFIX}INVALID_NAME} - timer name not found
-
-@subheading DESCRIPTION:
-
-This directive obtains the timer id associated with
-the timer name to be acquired. If the timer name is not unique,
-then the timer id will match one of the timers with that name.
-However, this timer id is not guaranteed to correspond to the
-desired timer. The timer id is used to access this timer in
-other timer related directives.
-
-@subheading NOTES:
-
-This directive will not cause the running task to be
-preempted.
-
-@c
-@c
-@c
-@page
-@subsection TIMER_CANCEL - Cancel a timer
-
-@cindex cancel a timer
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_timer_cancel
-@example
-rtems_status_code rtems_timer_cancel(
- rtems_id id
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Timer_Cancel (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - timer canceled successfully@*
-@code{@value{RPREFIX}INVALID_ID} - invalid timer id
-
-@subheading DESCRIPTION:
-
-This directive cancels the timer id. This timer will
-be reinitiated by the next invocation of @code{@value{DIRPREFIX}timer_reset},
-@code{@value{DIRPREFIX}timer_fire_after}, or
-@code{@value{DIRPREFIX}timer_fire_when} with id.
-
-@subheading NOTES:
-
-This directive will not cause the running task to be preempted.
-
-@c
-@c
-@c
-@page
-@subsection TIMER_DELETE - Delete a timer
-
-@cindex delete a timer
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_timer_delete
-@example
-rtems_status_code rtems_timer_delete(
- rtems_id id
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Timer_Delete (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - timer deleted successfully@*
-@code{@value{RPREFIX}INVALID_ID} - invalid timer id
-
-@subheading DESCRIPTION:
-
-This directive deletes the timer specified by id. If
-the timer is running, it is automatically canceled. The TMCB
-for the deleted timer is reclaimed by RTEMS.
-
-@subheading NOTES:
-
-This directive will not cause the running task to be
-preempted.
-
-A timer can be deleted by a task other than the task
-which created the timer.
-
-@c
-@c
-@c
-@page
-@subsection TIMER_FIRE_AFTER - Fire timer after interval
-
-@cindex fire a timer after an interval
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_timer_fire_after
-@example
-rtems_status_code rtems_timer_fire_after(
- rtems_id id,
- rtems_interval ticks,
- rtems_timer_service_routine_entry routine,
- void *user_data
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Timer_Fire_After (
- ID : in RTEMS.ID;
- Ticks : in RTEMS.Interval;
- Routine : in RTEMS.Timer_Service_Routine;
- User_Data : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - timer initiated successfully@*
-@code{@value{RPREFIX}INVALID_ID} - invalid timer id@*
-@code{@value{RPREFIX}INVALID_NUMBER} - invalid interval
-
-@subheading DESCRIPTION:
-
-This directive initiates the timer specified by id.
-If the timer is running, it is automatically canceled before
-being initiated. The timer is scheduled to fire after an
-interval ticks clock ticks has passed. When the timer fires,
-the timer service routine routine will be invoked with the
-argument user_data.
-
-@subheading NOTES:
-
-This directive will not cause the running task to be
-preempted.
-
-@c
-@c
-@c
-@page
-@subsection TIMER_FIRE_WHEN - Fire timer when specified
-
-@cindex fire a timer at wall time
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_timer_fire_when
-@example
-rtems_status_code rtems_timer_fire_when(
- rtems_id id,
- rtems_time_of_day *wall_time,
- rtems_timer_service_routine_entry routine,
- void *user_data
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Timer_Fire_When (
- ID : in RTEMS.ID;
- Wall_Time : in RTEMS.Time_Of_Day;
- Routine : in RTEMS.Timer_Service_Routine;
- User_Data : in RTEMS.Address;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - timer initiated successfully@*
-@code{@value{RPREFIX}INVALID_ID} - invalid timer id@*
-@code{@value{RPREFIX}NOT_DEFINED} - system date and time is not set@*
-@code{@value{RPREFIX}INVALID_CLOCK} - invalid time of day
-
-@subheading DESCRIPTION:
-
-This directive initiates the timer specified by id.
-If the timer is running, it is automatically canceled before
-being initiated. The timer is scheduled to fire at the time of
-day specified by wall_time. When the timer fires, the timer
-service routine routine will be invoked with the argument
-user_data.
-
-@subheading NOTES:
-
-This directive will not cause the running task to be
-preempted.
-
-@c
-@c
-@c
-@page
-@subsection TIMER_RESET - Reset an interval timer
-
-@cindex reset a timer
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_timer_reset
-@example
-rtems_status_code rtems_timer_reset(
- rtems_id id
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Timer_Reset (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - timer reset successfully@*
-@code{@value{RPREFIX}INVALID_ID} - invalid timer id@*
-@code{@value{RPREFIX}NOT_DEFINED} - attempted to reset a when or newly created timer
-
-@subheading DESCRIPTION:
-
-This directive resets the timer associated with id.
-This timer must have been previously initiated with a
-@code{@value{DIRPREFIX}timer_fire_after}
-directive. If active the timer is canceled,
-after which the timer is reinitiated using the same interval and
-timer service routine which the original
-@code{@value{DIRPREFIX}timer_fire_after}
-directive used.
-
-@subheading NOTES:
-
-If the timer has not been used or the last usage of this timer
-was by a @code{@value{DIRPREFIX}timer_fire_when}
-directive, then the @code{@value{RPREFIX}NOT_DEFINED} error is
-returned.
-
-Restarting a cancelled after timer results in the timer being
-reinitiated with its previous timer service routine and interval.
-
-This directive will not cause the running task to be preempted.
-
diff --git a/doc/user/userext.t b/doc/user/userext.t
deleted file mode 100644
index 1a0a16fca1..0000000000
--- a/doc/user/userext.t
+++ /dev/null
@@ -1,685 +0,0 @@
-@c
-@c COPYRIGHT (c) 1988-1999.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
-@c
-@c $Id$
-@c
-
-@chapter User Extensions Manager
-
-@cindex user extensions
-
-@section Introduction
-
-The RTEMS User Extensions Manager allows the
-application developer to augment the executive by allowing them
-to supply extension routines which are invoked at critical
-system events. The directives provided by the user extensions
-manager are:
-
-@itemize @bullet
-@item @code{@value{DIRPREFIX}extension_create} - Create an extension set
-@item @code{@value{DIRPREFIX}extension_ident} - Get ID of an extension set
-@item @code{@value{DIRPREFIX}extension_delete} - Delete an extension set
-@end itemize
-
-@section Background
-
-User extension routines are invoked when the
-following system events occur:
-
-@itemize @bullet
-@item Task creation
-@item Task initiation
-@item Task reinitiation
-@item Task deletion
-@item Task context switch
-@item Post task context switch
-@item Task begin
-@item Task exits
-@item Fatal error detection
-@end itemize
-
-These extensions are invoked as a function with
-arguments that are appropriate to the system event.
-
-@subsection Extension Sets
-
-@cindex extension set
-
-An extension set is defined as a set of routines
-which are invoked at each of the critical system events at which
-user extension routines are invoked. Together a set of these
-routines typically perform a specific functionality such as
-performance monitoring or debugger support. RTEMS is informed of
-the entry points which constitute an extension set via the
-following @value{STRUCTURE}:
-
-@ifset is-C
-@example
-@group
-typedef struct @{
- rtems_task_create_extension thread_create;
- rtems_task_start_extension thread_start;
- rtems_task_restart_extension thread_restart;
- rtems_task_delete_extension thread_delete;
- rtems_task_switch_extension thread_switch;
- rtems_task_begin_extension thread_begin;
- rtems_task_exitted_extension thread_exitted;
- rtems_fatal_extension fatal;
-@} User_extensions_Table;
-@end group
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-type Extensions_Table is
- record
- Task_Create : RTEMS.Task_Create_Extension;
- Task_Start : RTEMS.Task_Start_Extension;
- Task_Restart : RTEMS.Task_Restart_Extension;
- Task_Delete : RTEMS.Task_Delete_Extension;
- Task_Switch : RTEMS.Task_Switch_Extension;
- Task_Post_Switch : RTEMS.Task_Post_Switch_Extension;
- Task_Begin : RTEMS.Task_Begin_Extension;
- Task_Exitted : RTEMS.Task_Exitted_Extension;
- Fatal : RTEMS.Fatal_Error_Extension;
- end record;
-@end example
-@end ifset
-
-
-RTEMS allows the user to have multiple extension sets
-active at the same time. First, a single static extension set
-may be defined as the application's User Extension Table which
-is included as part of the Configuration Table. This extension
-set is active for the entire life of the system and may not be
-deleted. This extension set is especially important because it
-is the only way the application can provided a FATAL error
-extension which is invoked if RTEMS fails during the
-initialize_executive directive. The static extension set is
-optional and may be configured as NULL if no static extension
-set is required.
-
-Second, the user can install dynamic extensions using
-the @code{@value{DIRPREFIX}extension_create}
-directive. These extensions are RTEMS
-objects in that they have a name, an ID, and can be dynamically
-created and deleted. In contrast to the static extension set,
-these extensions can only be created and installed after the
-initialize_executive directive successfully completes execution.
-Dynamic extensions are useful for encapsulating the
-functionality of an extension set. For example, the application
-could use extensions to manage a special coprocessor, do
-performance monitoring, and to do stack bounds checking. Each
-of these extension sets could be written and installed
-independently of the others.
-
-All user extensions are optional and RTEMS places no
-naming restrictions on the user.
-
-@subsection TCB Extension Area
-
-@cindex TCB extension area
-
-RTEMS provides for a pointer to a user-defined data
-area for each extension set to be linked to each task's control
-block. This set of pointers is an extension of the TCB and can
-be used to store additional data required by the user's
-extension functions. It is also possible for a user extension
-to utilize the notepad locations associated with each task
-although this may conflict with application usage of those
-particular notepads.
-
-The TCB extension is an array of pointers in the TCB.
-The number of pointers in the area is the same as the number of
-user extension sets configured. This allows an application to
-augment the TCB with user-defined information. For example, an
-application could implement task profiling by storing timing
-statistics in the TCB's extended memory area. When a task
-context switch is being executed, the TASK_SWITCH extension
-could read a real-time clock to calculate how long the task
-being swapped out has run as well as timestamp the starting time
-for the task being swapped in.
-
-If used, the extended memory area for the TCB should
-be allocated and the TCB extension pointer should be set at the
-time the task is created or started by either the TASK_CREATE or
-TASK_START extension. The application is responsible for
-managing this extended memory area for the TCBs. The memory may
-be reinitialized by the TASK_RESTART extension and should be
-deallocated by the TASK_DELETE extension when the task is
-deleted. Since the TCB extension buffers would most likely be
-of a fixed size, the RTEMS partition manager could be used to
-manage the application's extended memory area. The application
-could create a partition of fixed size TCB extension buffers and
-use the partition manager's allocation and deallocation
-directives to obtain and release the extension buffers.
-
-@subsection Extensions
-
-The sections that follow will contain a description
-of each extension. Each section will contain a prototype of a
-function with the appropriate calling sequence for the
-corresponding extension. The names given for the @value{LANGUAGE}
-@value{ROUTINE} and
-its arguments are all defined by the user. The names used in
-the examples were arbitrarily chosen and impose no naming
-conventions on the user.
-
-@subsection TASK_CREATE Extension
-
-The TASK_CREATE extension directly corresponds to the
-task_create directive. If this extension is defined in any
-static or dynamic extension set and a task is being created,
-then the extension routine will automatically be invoked by
-RTEMS. The extension should have a prototype similar to the
-following:
-
-@ifset is-C
-@example
-rtems_extension user_task_create(
- rtems_tcb *current_task,
- rtems_tcb *new_task
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure User_Task_Create (
- Current_Task : in RTEMS.TCB_Pointer;
- New_Task : in RTEMS.TCB_Pointer
-);
-@end example
-@end ifset
-
-where current_task can be used to access the TCB for
-the currently executing task, and new_task can be used to access
-the TCB for the new task being created. This extension is
-invoked from the task_create directive after new_task has been
-completely initialized, but before it is placed on a ready TCB
-chain.
-
-@subsection TASK_START Extension
-
-The TASK_START extension directly corresponds to the
-task_start directive. If this extension is defined in any
-static or dynamic extension set and a task is being started,
-then the extension routine will automatically be invoked by
-RTEMS. The extension should have a prototype similar to the
-following:
-
-@ifset is-C
-@example
-rtems_extension user_task_start(
- rtems_tcb *current_task,
- rtems_tcb *started_task
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure User_Task_Start (
- Current_Task : in RTEMS.TCB_Pointer;
- Started_Task : in RTEMS.TCB_Pointer
-);
-@end example
-@end ifset
-
-where current_task can be used to access the TCB for
-the currently executing task, and started_task can be used to
-access the TCB for the dormant task being started. This
-extension is invoked from the task_start directive after
-started_task has been made ready to start execution, but before
-it is placed on a ready TCB chain.
-
-@subsection TASK_RESTART Extension
-
-The TASK_RESTART extension directly corresponds to
-the task_restart directive. If this extension is defined in any
-static or dynamic extension set and a task is being restarted,
-then the extension should have a prototype similar to the
-following:
-
-@ifset is-C
-@example
-rtems_extension user_task_restart(
- rtems_tcb *current_task,
- rtems_tcb *restarted_task
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure User_Task_Restart (
- Current_Task : in RTEMS.TCB_Pointer;
- Restarted_Task : in RTEMS.TCB_Pointer
-);
-@end example
-@end ifset
-
-where current_task can be used to access the TCB for
-the currently executing task, and restarted_task can be used to
-access the TCB for the task being restarted. This extension is
-invoked from the task_restart directive after restarted_task has
-been made ready to start execution, but before it is placed on a
-ready TCB chain.
-
-@subsection TASK_DELETE Extension
-
-The TASK_DELETE extension is associated with the
-task_delete directive. If this extension is defined in any
-static or dynamic extension set and a task is being deleted,
-then the extension routine will automatically be invoked by
-RTEMS. The extension should have a prototype similar to the
-following:
-
-@ifset is-C
-@example
-rtems_extension user_task_delete(
- rtems_tcb *current_task,
- rtems_tcb *deleted_task
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure User_Task_Delete (
- Current_Task : in RTEMS.TCB_Pointer;
- Deleted_Task : in RTEMS.TCB_Pointer
-);
-@end example
-@end ifset
-
-where current_task can be used to access the TCB for
-the currently executing task, and deleted_task can be used to
-access the TCB for the task being deleted. This extension is
-invoked from the task_delete directive after the TCB has been
-removed from a ready TCB chain, but before all its resources
-including the TCB have been returned to their respective free
-pools. This extension should not call any RTEMS directives if a
-task is deleting itself (current_task is equal to deleted_task).
-
-@subsection TASK_SWITCH Extension
-
-The TASK_SWITCH extension corresponds to a task
-context switch. If this extension is defined in any static or
-dynamic extension set and a task context switch is in progress,
-then the extension routine will automatically be invoked by
-RTEMS. The extension should have a prototype similar to the
-following:
-
-@ifset is-C
-@example
-rtems_extension user_task_switch(
- rtems_tcb *current_task,
- rtems_tcb *heir_task
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure User_Task_Switch (
- Current_Task : in RTEMS.TCB_Pointer;
- Heir_Task : in RTEMS.TCB_Pointer
-);
-@end example
-@end ifset
-
-where current_task can be used to access the TCB for
-the task that is being swapped out, and heir_task can be used to
-access the TCB for the task being swapped in. This extension is
-invoked from RTEMS' dispatcher routine after the current_task
-context has been saved, but before the heir_task context has
-been restored. This extension should not call any RTEMS
-directives.
-
-@subsection TASK_BEGIN Extension
-
-The TASK_BEGIN extension is invoked when a task
-begins execution. It is invoked immediately before the body of
-the starting procedure and executes in the context in the task.
-This user extension have a prototype similar to the following:
-
-@ifset is-C
-@example
-rtems_extension user_task_begin(
- rtems_tcb *current_task
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure User_Task_Begin (
- Current_Task : in RTEMS.TCB_Pointer
-);
-@end example
-@end ifset
-
-where current_task can be used to access the TCB for
-the currently executing task which has begun. The distinction
-between the TASK_BEGIN and TASK_START extension is that the
-TASK_BEGIN extension is executed in the context of the actual
-task while the TASK_START extension is executed in the context
-of the task performing the task_start directive. For most
-extensions, this is not a critical distinction.
-
-@subsection TASK_EXITTED Extension
-
-The TASK_EXITTED extension is invoked when a task
-exits the body of the starting procedure by either an implicit
-or explicit return statement. This user extension have a
-prototype similar to the following:
-
-@ifset is-C
-@example
-rtems_extension user_task_exitted(
- rtems_tcb *current_task
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure User_Task_Exitted (
- Current_Task : in RTEMS.TCB_Pointer
-);
-@end example
-@end ifset
-
-where current_task can be used to access the TCB for
-the currently executing task which has just exitted.
-
-Although exiting of task is often considered to be a
-fatal error, this extension allows recovery by either restarting
-or deleting the exiting task. If the user does not wish to
-recover, then a fatal error may be reported. If the user does
-not provide a TASK_EXITTED extension or the provided handler
-returns control to RTEMS, then the RTEMS default handler will be
-used. This default handler invokes the directive
-fatal_error_occurred with the @code{@value{RPREFIX}TASK_EXITTED} directive status.
-
-@lowersections
-
-@subsection FATAL Error Extension
-
-The FATAL error extension is associated with the
-fatal_error_occurred directive. If this extension is defined in
-any static or dynamic extension set and the fatal_error_occurred
-directive has been invoked, then this extension will be called.
-This extension should have a prototype similar to the following:
-
-@ifset is-C
-@example
-rtems_extension user_fatal_error(
- Internal_errors_Source the_source,
- rtems_boolean is_internal,
- rtems_unsigned32 the_error
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure User_Fatal_Error (
- Error : in RTEMS.Unsigned32
-);
-@end example
-@end ifset
-
-where the_error is the error code passed to the
-fatal_error_occurred directive. This extension is invoked from
-the fatal_error_occurred directive.
-
-If defined, the user's FATAL error extension is
-invoked before RTEMS' default fatal error routine is invoked and
-the processor is stopped. For example, this extension could be
-used to pass control to a debugger when a fatal error occurs.
-This extension should not call any RTEMS directives.
-
-@raisesections
-
-@subsection Order of Invocation
-
-When one of the critical system events occur, the
-user extensions are invoked in either "forward" or "reverse"
-order. Forward order indicates that the static extension set is
-invoked followed by the dynamic extension sets in the order in
-which they were created. Reverse order means that the dynamic
-extension sets are invoked in the opposite of the order in which
-they were created followed by the static extension set. By
-invoking the extension sets in this order, extensions can be
-built upon one another. At the following system events, the
-extensions are invoked in forward order:
-
-@itemize @bullet
-@item Task creation
-@item Task initiation
-@item Task reinitiation
-@item Task deletion
-@item Task context switch
-@item Post task context switch
-@item Task begins to execute
-@end itemize
-
-
-At the following system events, the extensions are
-invoked in reverse order:
-
-@itemize @bullet
-@item Task deletion
-@item Fatal error detection
-@end itemize
-
-At these system events, the extensions are invoked in
-reverse order to insure that if an extension set is built upon
-another, the more complicated extension is invoked before the
-extension set it is built upon. For example, by invoking the
-static extension set last it is known that the "system" fatal
-error extension will be the last fatal error extension executed.
-Another example is use of the task delete extension by the
-Standard C Library. Extension sets which are installed after
-the Standard C Library will operate correctly even if they
-utilize the C Library because the C Library's TASK_DELETE
-extension is invoked after that of the other extensions.
-
-@section Operations
-
-@subsection Creating an Extension Set
-
-The @code{@value{DIRPREFIX}extension_create} directive creates and installs
-an extension set by allocating a Extension Set Control Block
-(ESCB), assigning the extension set a user-specified name, and
-assigning it an extension set ID. Newly created extension sets
-are immediately installed and are invoked upon the next system
-even supporting an extension.
-
-@subsection Obtaining Extension Set IDs
-
-When an extension set is created, RTEMS generates a
-unique extension set ID and assigns it to the created extension
-set until it is deleted. The extension ID may be obtained by
-either of two methods. First, as the result of an invocation of
-the @code{@value{DIRPREFIX}extension_create}
-directive, the extension set ID is stored
-in a user provided location. Second, the extension set ID may
-be obtained later using the @code{@value{DIRPREFIX}extension_ident}
-directive. The extension set ID is used by other directives
-to manipulate this extension set.
-
-@subsection Deleting an Extension Set
-
-The @code{@value{DIRPREFIX}extension_delete} directive is used to delete an
-extension set. The extension set's control block is returned to
-the ESCB free list when it is deleted. An extension set can be
-deleted by a task other than the task which created the
-extension set. Any subsequent references to the extension's
-name and ID are invalid.
-
-@section Directives
-
-This section details the user extension manager's
-directives. A subsection is dedicated to each of this manager's
-directives and describes the calling sequence, related
-constants, usage, and status codes.
-
-@c
-@c
-@c
-@page
-@subsection EXTENSION_CREATE - Create a extension set
-
-@cindex create an extension set
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_extension_create
-@example
-rtems_status_code rtems_extension_create(
- rtems_name name,
- rtems_extensions_table *table,
- rtems_id *id
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Extension_Create (
- Name : in RTEMS.Name;
- Table : in RTEMS.Extensions_Table_Pointer;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - extension set created successfully@*
-@code{@value{RPREFIX}INVALID_NAME} - invalid extension set name@*
-@code{@value{RPREFIX}TOO_MANY} - too many extension sets created
-
-@subheading DESCRIPTION:
-
-This directive creates a extension set. The assigned
-extension set id is returned in id. This id is used to access
-the extension set with other user extension manager directives.
-For control and maintenance of the extension set, RTEMS
-allocates an ESCB from the local ESCB free pool and initializes
-it.
-
-@subheading NOTES:
-
-This directive will not cause the calling task to be
-preempted.
-
-@c
-@c
-@c
-@page
-@subsection EXTENSION_IDENT - Get ID of a extension set
-
-@cindex get ID of an extension set
-@cindex obtain ID of an extension set
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_extension_ident
-@example
-rtems_status_code rtems_extension_ident(
- rtems_name name,
- rtems_id *id
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Extension_Ident (
- Name : in RTEMS.Name;
- ID : out RTEMS.ID;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - extension set identified successfully@*
-@code{@value{RPREFIX}INVALID_NAME} - extension set name not found
-
-@subheading DESCRIPTION:
-
-This directive obtains the extension set id
-associated with the extension set name to be acquired. If the
-extension set name is not unique, then the extension set id will
-match one of the extension sets with that name. However, this
-extension set id is not guaranteed to correspond to the desired
-extension set. The extension set id is used to access this
-extension set in other extension set related directives.
-
-@subheading NOTES:
-
-This directive will not cause the running task to be
-preempted.
-
-@c
-@c
-@c
-@page
-@subsection EXTENSION_DELETE - Delete a extension set
-
-@cindex delete an extension set
-
-@subheading CALLING SEQUENCE:
-
-@ifset is-C
-@findex rtems_extension_delete
-@example
-rtems_status_code rtems_extension_delete(
- rtems_id id
-);
-@end example
-@end ifset
-
-@ifset is-Ada
-@example
-procedure Extension_Delete (
- ID : in RTEMS.ID;
- Result : out RTEMS.Status_Codes
-);
-@end example
-@end ifset
-
-@subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - extension set deleted successfully@*
-@code{@value{RPREFIX}INVALID_ID} - invalid extension set id
-
-@subheading DESCRIPTION:
-
-This directive deletes the extension set specified by
-id. If the extension set is running, it is automatically
-canceled. The ESCB for the deleted extension set is reclaimed
-by RTEMS.
-
-@subheading NOTES:
-
-This directive will not cause the running task to be
-preempted.
-
-A extension set can be deleted by a task other than
-the task which created the extension set.
-
-@subheading NOTES:
-
-This directive will not cause the running task to be
-preempted.
diff --git a/testsuites/Makefile.am b/testsuites/Makefile.am
deleted file mode 100644
index 68a22cd69f..0000000000
--- a/testsuites/Makefile.am
+++ /dev/null
@@ -1,13 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-
-SUBDIRS = @subdirs@
-
-EXTRA_DIST = PROBLEMS
-
-include $(top_srcdir)/../../../automake/subdirs.am
-include $(top_srcdir)/../../../automake/local.am
diff --git a/testsuites/PROBLEMS b/testsuites/PROBLEMS
deleted file mode 100644
index 6f3e2920be..0000000000
--- a/testsuites/PROBLEMS
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# $Id$
-#
-
-The tests were designed to operate in a very controlled environment. If
-one uses interrupt-driven console output, then tasks will block unexpectedly
-when a buffer filles and interrupts will perturb with the task execution order.
-
-The tmtests should only be run with all interrupt sources disabled using
-polled IO.
-
-The following is a list of reported failures from running the tests on
-a board with interrupt driven console IO. These problems do not
-occur when using polled IO.
-
-tm03, tm04, tm05, tm07, tm11, tm12, tm13, tm14, tm15, tm16, tm17,
-tm19, tm22, tm23, tm24 - All hit my breakpoint at
-_Internal_error_Occurred.
-
-tm20, tm27 - hang in middle of tests.
-tm26 - hangs at end of tests.
-
-sp02 - Gets through some tests, then attempts to execute code at
-location 0.
-sp04 - hangs at end of tests.
-sp06 - rtems_task_restart of TA3 FAILED -- expected (0) got (4)
-sp07, sp14 - hang in middle of tests
-sp13, sp15 - terminate properly, but output at end is missing.
-sp16 - _Internal_error_Occurred.
-sp19 - rtems_clock_get FAILED -- expected (0) got (11), and hangs in
-middle of test.
-
-cpuuse - hangs in middle of tests
-malloctest - prints nothing
-
-psx05 - Init: pthread_mutex_init - EINVAL (bad protocol)
-../../../../../../../src/rtems-981001/c/src/tests/psxtests/psx05/../../../../../
-../../src/rtems-981001/c/src/tests/psxtests/psx05/task.c:35:
-failed assertion `status == EBUSY'
-N\: pthread_mutex_init - EINVAL (bad priority ceiling)
-
-
diff --git a/testsuites/README b/testsuites/README
deleted file mode 100644
index f799370569..0000000000
--- a/testsuites/README
+++ /dev/null
@@ -1,44 +0,0 @@
-#
-# $Id$
-#
-
-This is the directory under which the RTEMS
-test programs provided with the release are located. The
-following is a description of the contents of each file and
-subdirectory directly in this directory:
-
-NOTE: Other than the 'samples' directory these tests are intended
- only to exercise RTEMS features and are *not* good examples
- of programming for RTEMS.
-
- samples
-
- This directory contains a set of simple sample applications
- which can be used either to test a board support package
- or as the starting point for a custom application.
-
- mptests
-
- This directory contains the RTEMS Multiprocessor Test Suite.
- The tests in this directory provide near complete (98%+) test
- coverage of the multiprocessor specific code in RTEMS.
-
- psxtests
-
- This directory contains the RTEMS POSIX API Test Suite.
- The tests in this directory test the POSIX API support in RTEMS.
-
- sptests
-
- This directory contains the RTEMS Single Processor Test Suite.
- The tests in this directory provide near complete (98%+) test
- coverage of the non-multiprocessor code in RTEMS.
-
- tmtests
-
- This directory contains the RTEMS Timing Test Suite.
- The tests in this directory are used to measure the execution
- time of RTEMS directive and some critical internal functions.
- The results of these test are reported in the Fact Sheets
- and Supplental Manuals.
-
diff --git a/testsuites/itrontests/Makefile.am b/testsuites/itrontests/Makefile.am
deleted file mode 100644
index b4c23c60b3..0000000000
--- a/testsuites/itrontests/Makefile.am
+++ /dev/null
@@ -1,14 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-
-SUBDIRS = itronhello itrontask01 itrontask02 itrontask03 itrontask04 \
- itronmbf01 itronmbox01 itronsem01 itrontime01
-
-EXTRA_DIST = itrontests.am
-
-include $(top_srcdir)/../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/itrontests/README b/testsuites/itrontests/README
deleted file mode 100644
index 65c5d4165d..0000000000
--- a/testsuites/itrontests/README
+++ /dev/null
@@ -1,6 +0,0 @@
-#
-# $Id$
-#
-
-This directory contains the functionality tests for the ITRON 3.0 API
-implementation.
diff --git a/testsuites/itrontests/itronhello/Makefile.am b/testsuites/itrontests/itronhello/Makefile.am
deleted file mode 100644
index 194ea819d2..0000000000
--- a/testsuites/itrontests/itronhello/Makefile.am
+++ /dev/null
@@ -1,42 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = itronhello
-PGM = ${ARCH}/$(TEST).exe
-
-MANAGERS = all
-
-C_FILES = init.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/itrontests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/itrontests/itronhello/init.c b/testsuites/itrontests/itronhello/init.c
deleted file mode 100644
index 62a8c8ac37..0000000000
--- a/testsuites/itrontests/itronhello/init.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is called from init_exec and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-#include <stdio.h>
-
-void ITRON_Init( void )
-{
- printf( "\n\n*** ITRON HELLO WORLD TEST ***\n" );
- printf( "Hello World\n" );
- printf( "*** END OF ITRON HELLO WORLD TEST ***\n" );
- exit( 0 );
-}
diff --git a/testsuites/itrontests/itronhello/itronhello.doc b/testsuites/itrontests/itronhello/itronhello.doc
deleted file mode 100644
index 988364bf45..0000000000
--- a/testsuites/itrontests/itronhello/itronhello.doc
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: itronhello
-
-directives:
- cre_tsk, sta_tsk
-
-concepts:
-
- a. Verifies the initial itron task can be created and started.
-
-
diff --git a/testsuites/itrontests/itronhello/itronhello.scn b/testsuites/itrontests/itronhello/itronhello.scn
deleted file mode 100644
index 7acacc083b..0000000000
--- a/testsuites/itrontests/itronhello/itronhello.scn
+++ /dev/null
@@ -1,3 +0,0 @@
-*** ITRON HELLO WORLD TEST ***
-Hello World
-*** END OF ITRON HELLO WORLD TEST ***
diff --git a/testsuites/itrontests/itronhello/system.h b/testsuites/itrontests/itronhello/system.h
deleted file mode 100644
index ed516a778b..0000000000
--- a/testsuites/itrontests/itronhello/system.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-#include <itron.h>
-
-/* functions */
-
-void ITRON_Init( void );
-
-/* configuration information */
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-
-#define CONFIGURE_ITRON_INIT_TASK_TABLE
-
-#define CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM
-
-#include <confdefs.h>
-
-/* global variables */
-
-TEST_EXTERN rtems_id Global_variable; /* example global variable */
-
-/* end of include file */
diff --git a/testsuites/itrontests/itronmbf01/Makefile.am b/testsuites/itrontests/itronmbf01/Makefile.am
deleted file mode 100644
index 79d9eeafd9..0000000000
--- a/testsuites/itrontests/itronmbf01/Makefile.am
+++ /dev/null
@@ -1,42 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = itronmbf01
-PGM = ${ARCH}/$(TEST).exe
-
-MANAGERS = all
-
-C_FILES = init.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/itrontests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/itrontests/itronmbf01/init.c b/testsuites/itrontests/itronmbf01/init.c
deleted file mode 100644
index 3c2714a35f..0000000000
--- a/testsuites/itrontests/itronmbf01/init.c
+++ /dev/null
@@ -1,367 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is called from init_exec and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-#include <stdio.h>
-#include <assert.h>
-
-/*
- * The following is hopefully temporary.
- */
-
-#include <time.h>
-
-#define put_time(_s) \
-do { \
- time_t a_time_t; \
- a_time_t = time( 0 ); \
- printf( "%s%s", _s, ctime( &a_time_t ) ); \
-} while(0)
-
-
-
-void TestCre();
-void TestDel();
-void TestPsnd();
-void TestRef();
-void TestTrcv();
-void TestRcv();
-void TestPrcv();
-
-void ITRON_Init( void )
-{
- printf( "\n\n*** ITRONMBF01 -- ITRON MESSAGE BUFFER TEST ***\n" );
-
- TestCre();
- TestDel();
- TestPsnd();
- TestRef();
- TestRcv();
- TestRef();
- TestPrcv();
- TestTrcv();
-
- printf("\n\n*** ITRONMBF01 --- ITRON MESSAGE BUFFER TEST ***\n");
- exit(0);
-}
-
-void TestCre()
-{
- ER status;
- T_CMBF pk_cmbf;
-
- /*
- * Exercise cre_mbf - this code seems to exercise every path.
- */
-
- puts( "Init - cre_mbf - NULL pk_cmbf returns E_PAR" );
- status = cre_mbf( 1, NULL );
- assert( status == E_PAR );
-
- puts( "Init - cre_mbf - negative values for bufsz returns E_PAR" );
- pk_cmbf.bufsz = -1;
- pk_cmbf.maxmsz = 100;
- pk_cmbf.mbfatr = 0;
- pk_cmbf.exinf = NULL;
- status = cre_mbf( 1, &pk_cmbf );
- assert( status == E_PAR );
-
- puts( "Init - cre_mbf - negative values for maxmsz returns E_PAR" );
- pk_cmbf.bufsz = 100;
- pk_cmbf.maxmsz = -1;
- status = cre_mbf( 1, &pk_cmbf );
- assert( status == E_PAR );
-
- puts( "Init - cre_mbf - bufsz < maxmsz returns E_PAR" );
- pk_cmbf.bufsz = 100;
- pk_cmbf.maxmsz = 101;
- status = cre_mbf( 1, &pk_cmbf );
- assert( status == E_PAR );
-
- /*
- * Now run through all the bad ID errors
- */
-
- pk_cmbf.bufsz = 200;
- pk_cmbf.maxmsz = 30;
- puts( "Init - cre_mbf - bad id (less than -4) - E_OACV" );
- status = cre_mbf( -5, &pk_cmbf );
- assert( status == E_OACV );
-
- puts( "Init - cre_mbf - bad id (between 0 and -4) - E_ID" );
- status = cre_mbf( -4, &pk_cmbf );
- assert( status == E_ID );
-
- puts( "Init - cre_mbf - bad id (0) - E_ID" );
- status = cre_mbf( 0, &pk_cmbf );
- assert( status == E_ID );
-
- puts( "Init - cre_mbf - bad id (too great) - E_ID" );
- status = cre_mbf( CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS + 1, &pk_cmbf );
- assert( status == E_ID );
-
- puts( "Init - cre_mbf - create mbf 1 TA_TFIFO - E_OK" );
- pk_cmbf.bufsz = 600;
- pk_cmbf.maxmsz = 200;
- pk_cmbf.mbfatr = TA_TFIFO;
- status = cre_mbf( 1, &pk_cmbf );
- assert( status == E_OK );
-
- puts( "Init - cre_mbf - create mbf 1 again - E_OBJ" );
- status = cre_mbf( 1, &pk_cmbf );
- assert( status == E_OBJ );
-
- puts( "Init - cre_mbf - create mbf 2 TA_TPRI - E_OK" );
- pk_cmbf.bufsz = 600;
- pk_cmbf.maxmsz = 200;
- pk_cmbf.mbfatr = TA_TPRI;
- status = cre_mbf( 2, &pk_cmbf );
- assert( status == E_OK );
-}
-
-void TestDel()
-{
- ER status;
-
- /*
- * Generate all the bad id errors for del_mbf
- */
-
- puts( "Init - del_mbf - bad id (less than -4) - E_OACV" );
- status = del_mbf( -5 );
- assert( status == E_OACV );
-
- puts( "Init - del_mbf - bad id (between 0 and -4) - E_ID" );
- status = del_mbf( -4 );
- assert( status == E_ID );
-
- puts( "Init - del_mbf - bad id (0) - E_ID" );
- status = del_mbf( 0 );
- assert( status == E_ID );
-
- puts( "Init - del_mbf - bad id (too great) - E_ID" );
- status = del_mbf( CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS + 1 );
- assert( status == E_ID );
-
-
- puts("Init - del_mbf - E_OK" );
- status = del_mbf(2);
- assert(status == E_OK);
-}
-
-void TestPsnd()
-{
- ER status;
- char msg[100] = "This is test message 1";
-
- /*
- * Generate all the bad id errors for psnd_mbf
- */
-
- puts( "Init - psnd_mbf - bad id (less than -4) - E_OACV" );
- status = psnd_mbf(-5, msg, sizeof(msg));
- assert( status == E_OACV );
-
- puts( "Init - psnd_mbf - bad id (between 0 and -4) - E_ID" );
- status = psnd_mbf(-4, msg, sizeof(msg));
- assert( status == E_ID );
-
- puts( "Init - psnd_mbf - bad id (0) - E_ID" );
- status = psnd_mbf(0, msg, sizeof(msg));
- assert( status == E_ID );
-
- puts( "Init - psnd_mbf - bad id (too great) - E_ID" );
- status = psnd_mbf(CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS + 1, msg,
- sizeof(msg));
- assert( status == E_ID );
-
- puts( "Init - psnd_mbf - msg == 0, E_PAR" );
- status = psnd_mbf(1, 0, sizeof(msg));
- assert( status == E_PAR );
-
- puts( "Init - psnd_mbf - msgsz too big - E_PAR" );
- status = psnd_mbf(1, msg, 300);
- assert( status == E_PAR );
-
- puts( "Init - psnd_mbf - msgsz <0 - E_PAR" );
- status = psnd_mbf(1, msg, -10);
- assert( status == E_PAR );
-
- puts( "Init - psnd_mbf - E_OK" );
- status = psnd_mbf(1, msg, sizeof(msg));
- assert( status == E_OK );
-}
-
-void TestRef()
-{
- ER status;
- T_RMBF pk_rmbf;
-
- puts( "Init - ref_mbf - bad id (less than -4) - E_OACV" );
- status = ref_mbf(&pk_rmbf, -5);
- assert( status == E_OACV );
-
- puts( "Init - ref_mbf - bad id (between 0 and -4) - E_ID" );
- status = ref_mbf(&pk_rmbf, -4);
- assert( status == E_ID );
-
- puts( "Init - ref_mbf - bad id (0) - E_ID" );
- status = ref_mbf(&pk_rmbf, 0);
- assert( status == E_ID );
-
- puts( "Init - ref_mbf - bad id (too great) - E_ID" );
- status = ref_mbf(&pk_rmbf,
- CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS + 1);
- assert( status == E_ID );
-
- puts( "Init - ref_mbf - NULL pk_mbf returns E_PAR" );
- status = ref_mbf( NULL, 1 );
- assert( status == E_PAR );
-
- puts( "Init - ref_mbf - mbf 1 - E_OK" );
- status = ref_mbf( &pk_rmbf, 1 );
- assert( status == E_OK );
-
- printf( "Init - mbf 1 msgsz = %d\n", pk_rmbf.msgsz );
- printf( "Init - mbf 1 frbufsz = %d\n", pk_rmbf.frbufsz );
- printf( "Init - mbf 1 waiting tasks = %d\n", pk_rmbf.wtsk );
- printf( "Init - mbf 1 sending tasks = %d\n", pk_rmbf.stsk);
-}
-
-void TestRcv()
-{
- ER status;
- char buffer[200];
- int s;
-
- puts( "Init - rcv_mbf - bad id (less than -4) - E_OACV" );
- status = rcv_mbf(buffer, &s, -5);
- assert( status == E_OACV );
-
- puts( "Init - rcv_mbf - bad id (between 0 and -4) - E_ID" );
- status = rcv_mbf(buffer, &s, -4);
- assert( status == E_ID );
-
- puts( "Init - rcv_mbf - bad id (0) - E_ID" );
- status = rcv_mbf(buffer, &s, 0);
- assert( status == E_ID );
-
- puts( "Init - rcv_mbf - bad id (too great) - E_ID" );
- status = rcv_mbf(buffer, &s, CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS + 1);
- assert( status == E_ID );
-
- puts( "Init - rcv_mbf - NULL msg returns E_PAR" );
- status = rcv_mbf(NULL, &s, 1);
- assert( status == E_PAR );
-
- puts( "Init - rcv_mbf - NULL p_msgsz returns E_PAR" );
- status = rcv_mbf(buffer, 0, 1);
- assert( status == E_PAR );
-
- puts("Init - rcv_mbf -- OK");
- status = rcv_mbf(buffer, &s, 1);
- assert(status == E_OK);
- printf("Message:[%s], length:%d\n", buffer, s);
-}
-
-
-void TestPrcv()
-{
- ER status;
- char buffer[200];
- int s;
-
- puts( "Init - prcv_mbf - bad id (less than -4) - E_OACV" );
- status = prcv_mbf(buffer, &s, -5);
- assert( status == E_OACV );
-
- puts( "Init - prcv_mbf - bad id (between 0 and -4) - E_ID" );
- status = prcv_mbf(buffer, &s, -4);
- assert( status == E_ID );
-
- puts( "Init - prcv_mbf - bad id (0) - E_ID" );
- status = prcv_mbf(buffer, &s, 0);
- assert( status == E_ID );
-
- puts( "Init - prcv_mbf - bad id (too great) - E_ID" );
- status = prcv_mbf(buffer, &s, CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS + 1);
- assert( status == E_ID );
-
- puts( "Init - prcv_mbf - NULL msg returns E_PAR" );
- status = prcv_mbf(NULL, &s, 1);
- assert( status == E_PAR );
-
- puts( "Init - prcv_mbf - NULL p_msgsz returns E_PAR" );
- status = prcv_mbf(buffer, 0, 1);
- assert( status == E_PAR );
-
- puts("Init - prcv_mbf -- E_TMOUT");
- status = prcv_mbf(buffer, &s, 1);
- assert(status == E_TMOUT);
-}
-
-
-void TestTrcv()
-{
- ER status;
- char buffer[200];
- int s;
-
- puts( "Init - trcv_mbf - bad id (less than -4) - E_OACV" );
- status = trcv_mbf(buffer, &s, -5, 5000);
- assert( status == E_OACV );
-
- puts( "Init - trcv_mbf - bad id (between 0 and -4) - E_ID" );
- status = trcv_mbf(buffer, &s, -4, 5000);
- assert( status == E_ID );
-
- puts( "Init - trcv_mbf - bad id (0) - E_ID" );
- status = trcv_mbf(buffer, &s, 0, 5000);
- assert( status == E_ID );
-
- puts( "Init - trcv_mbf - bad id (too great) - E_ID" );
- status = trcv_mbf(buffer, &s,
- CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS + 1,
- 5000);
- assert( status == E_ID );
-
- puts( "Init - trcv_mbf - NULL msg returns E_PAR" );
- status = trcv_mbf(NULL, &s, 1, 5000);
- assert( status == E_PAR );
-
- puts( "Init - trcv_mbf - NULL p_msgsz returns E_PAR" );
- status = trcv_mbf(buffer, 0, 1, 5000);
- assert( status == E_PAR );
-
- puts( "Init - trcv_mbf - tmout <-2 returns E_PAR" );
- status = trcv_mbf(buffer, &s, 1, -2);
- assert( status == E_PAR );
-
- puts("\nInit - trcv_mbf -- E_TMOUT");
- put_time( "Init - starting to block at ");
- status = trcv_mbf(buffer, &s, 1, 1000);
- assert(status == E_TMOUT);
- put_time( "Init - time out at ");
-}
-
-
diff --git a/testsuites/itrontests/itronmbf01/itronmbf01.doc b/testsuites/itrontests/itronmbf01/itronmbf01.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/itrontests/itronmbf01/itronmbf01.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/itrontests/itronmbf01/itronmbf01.scn b/testsuites/itrontests/itronmbf01/itronmbf01.scn
deleted file mode 100644
index c7db9ac3ee..0000000000
--- a/testsuites/itrontests/itronmbf01/itronmbf01.scn
+++ /dev/null
@@ -1,71 +0,0 @@
-*** ITRONMBF01 -- ITRON MESSAGE BUFFER TEST ***
-Init - cre_mbf - NULL pk_cmbf returns E_PAR
-Init - cre_mbf - negative values for bufsz returns E_PAR
-Init - cre_mbf - negative values for maxmsz returns E_PAR
-Init - cre_mbf - bufsz < maxmsz returns E_PAR
-Init - cre_mbf - bad id (less than -4) - E_OACV
-Init - cre_mbf - bad id (between 0 and -4) - E_ID
-Init - cre_mbf - bad id (0) - E_ID
-Init - cre_mbf - bad id (too great) - E_ID
-Init - cre_mbf - create mbf 1 TA_TFIFO - E_OK
-Init - cre_mbf - create mbf 1 again - E_OBJ
-Init - cre_mbf - create mbf 2 TA_TPRI - E_OK
-Init - del_mbf - bad id (less than -4) - E_OACV
-Init - del_mbf - bad id (between 0 and -4) - E_ID
-Init - del_mbf - bad id (0) - E_ID
-Init - del_mbf - bad id (too great) - E_ID
-Init - del_mbf - E_OK
-Init - psnd_mbf - bad id (less than -4) - E_OACV
-Init - psnd_mbf - bad id (between 0 and -4) - E_ID
-Init - psnd_mbf - bad id (0) - E_ID
-Init - psnd_mbf - bad id (too great) - E_ID
-Init - psnd_mbf - msg == 0, E_PAR
-Init - psnd_mbf - msgsz too big - E_PAR
-Init - psnd_mbf - msgsz <0 - E_PAR
-Init - psnd_mbf - E_OK
-Init - ref_mbf - bad id (less than -4) - E_OACV
-Init - ref_mbf - bad id (between 0 and -4) - E_ID
-Init - ref_mbf - bad id (0) - E_ID
-Init - ref_mbf - bad id (too great) - E_ID
-Init - ref_mbf - NULL pk_mbf returns E_PAR
-Init - ref_mbf - mbf 1 - E_OK
-Init - mbf 1 msgsz = 100
-Init - mbf 1 frbufsz = 400
-Init - mbf 1 waiting tasks = 0
-Init - mbf 1 sending tasks = 0
-Init - rcv_mbf - bad id (less than -4) - E_OACV
-Init - rcv_mbf - bad id (between 0 and -4) - E_ID
-Init - rcv_mbf - bad id (0) - E_ID
-Init - rcv_mbf - bad id (too great) - E_ID
-Init - rcv_mbf - NULL msg returns E_PAR
-Init - rcv_mbf - NULL p_msgsz returns E_PAR
-Init - rcv_mbf -- OK
-Message:[This is test message 1], length:100
-Init - ref_mbf - bad id (less than -4) - E_OACV
-Init - ref_mbf - bad id (between 0 and -4) - E_ID
-Init - ref_mbf - bad id (0) - E_ID
-Init - ref_mbf - bad id (too great) - E_ID
-Init - ref_mbf - NULL pk_mbf returns E_PAR
-Init - ref_mbf - mbf 1 - E_OK
-Init - mbf 1 msgsz = 0
-Init - mbf 1 frbufsz = 600
-Init - mbf 1 waiting tasks = 0
-Init - mbf 1 sending tasks = 0
-Init - prcv_mbf - bad id (less than -4) - E_OACV
-Init - prcv_mbf - bad id (between 0 and -4) - E_ID
-Init - prcv_mbf - bad id (0) - E_ID
-Init - prcv_mbf - bad id (too great) - E_ID
-Init - prcv_mbf - NULL msg returns E_PAR
-Init - prcv_mbf - NULL p_msgsz returns E_PAR
-Init - prcv_mbf -- E_TMOUT
-Init - trcv_mbf - bad id (less than -4) - E_OACV
-Init - trcv_mbf - bad id (between 0 and -4) - E_ID
-Init - trcv_mbf - bad id (0) - E_ID
-Init - trcv_mbf - bad id (too great) - E_ID
-Init - trcv_mbf - NULL msg returns E_PAR
-Init - trcv_mbf - NULL p_msgsz returns E_PAR
-Init - trcv_mbf - tmout <-2 returns E_PAR
-Init - trcv_mbf -- E_TMOUT
-Init - starting to block at Fri Jan 01 00:00:00 1988
-Init - time out at Fri Jan 01 00:00:01 1988
-*** ITRONMBF01 --- ITRON MESSAGE BUFFER TEST ***
diff --git a/testsuites/itrontests/itronmbf01/system.h b/testsuites/itrontests/itronmbf01/system.h
deleted file mode 100644
index 391829bb03..0000000000
--- a/testsuites/itrontests/itronmbf01/system.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-#include <itron.h>
-
-/* functions */
-
-void ITRON_Init( void );
-
-/* configuration information */
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_ITRON_INIT_TASK_TABLE
-#define CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS 10
-#define CONFIGURE_ITRON_INIT_TASK_STACK_SIZE (4 * RTEMS_MINIMUM_STACK_SIZE)
-
-#include <confdefs.h>
-
-/* global variables */
-
-TEST_EXTERN rtems_id Global_variable; /* example global variable */
-
-/* end of include file */
diff --git a/testsuites/itrontests/itronmbox01/Makefile.am b/testsuites/itrontests/itronmbox01/Makefile.am
deleted file mode 100644
index 434dbfc5d5..0000000000
--- a/testsuites/itrontests/itronmbox01/Makefile.am
+++ /dev/null
@@ -1,42 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = itronmbox01
-PGM = ${ARCH}/$(TEST).exe
-
-MANAGERS = all
-
-C_FILES = init.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/itrontests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/itrontests/itronmbox01/init.c b/testsuites/itrontests/itronmbox01/init.c
deleted file mode 100644
index 08a5d175b1..0000000000
--- a/testsuites/itrontests/itronmbox01/init.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is called from init_exec and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-#include <stdio.h>
-#include <time.h>
-
-void ITRON_Init( void )
-{
- printf( "\n\n*** ITRON MBOX TEST 01 ***\n" );
- printf( "doesn't test anything yet\n" );
- printf( "*** END OF ITRON MBOX TEST 01 ***\n" );
- exit( 0 );
-}
-
-
diff --git a/testsuites/itrontests/itronmbox01/itronmbox01.doc b/testsuites/itrontests/itronmbox01/itronmbox01.doc
deleted file mode 100644
index e69de29bb2..0000000000
--- a/testsuites/itrontests/itronmbox01/itronmbox01.doc
+++ /dev/null
diff --git a/testsuites/itrontests/itronmbox01/itronmbox01.scn b/testsuites/itrontests/itronmbox01/itronmbox01.scn
deleted file mode 100644
index e69de29bb2..0000000000
--- a/testsuites/itrontests/itronmbox01/itronmbox01.scn
+++ /dev/null
diff --git a/testsuites/itrontests/itronmbox01/system.h b/testsuites/itrontests/itronmbox01/system.h
deleted file mode 100644
index d400584887..0000000000
--- a/testsuites/itrontests/itronmbox01/system.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-#include <itron.h>
-
-/* functions */
-
-void ITRON_Init( void );
-
-/* configuration information */
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-
-#define CONFIGURE_ITRON_INIT_TASK_TABLE
-
-#include <confdefs.h>
-
-/* global variables */
-
-TEST_EXTERN rtems_id Global_variable; /* example global variable */
-
-/* end of include file */
diff --git a/testsuites/itrontests/itronsem01/Makefile.am b/testsuites/itrontests/itronsem01/Makefile.am
deleted file mode 100644
index 0935883bb4..0000000000
--- a/testsuites/itrontests/itronsem01/Makefile.am
+++ /dev/null
@@ -1,42 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = itronsem01
-PGM = ${ARCH}/$(TEST).exe
-
-MANAGERS = all
-
-C_FILES = init.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/itrontests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/itrontests/itronsem01/init.c b/testsuites/itrontests/itronsem01/init.c
deleted file mode 100644
index e90d9d8537..0000000000
--- a/testsuites/itrontests/itronsem01/init.c
+++ /dev/null
@@ -1,331 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is called from init_exec and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-#include <stdio.h>
-
-/*
- * The following is hopefully temporary.
- */
-
-#include <time.h>
-
-#define put_time(_s) \
- do { \
- time_t a_time_t; \
- a_time_t = time( 0 ); \
- printf( "%s%s", _s, ctime( &a_time_t ) ); \
- } while(0)
-
-void ITRON_Init( void )
-{
- ER status;
- T_CSEM pk_csem;
- T_RSEM pk_rsem;
-
- printf( "\n\n*** ITRONSEM01 -- ITRON SEMAPHORE TEST ***\n" );
-
- /*
- * Exercise cre_sem - this code seems to exercise every path.
- */
-
- puts( "Init - cre_sem - NULL pk_sem returns E_PAR" );
- status = cre_sem( 1, NULL );
- assert( status == E_PAR );
-
- puts( "Init - cre_sem - isemcnt > maxsem returns E_PAR" );
- pk_csem.isemcnt = 3;
- pk_csem.maxsem = 2;
- status = cre_sem( 1, &pk_csem );
- assert( status == E_PAR );
-
- puts( "Init - cre_sem - maxsem of 0 returns E_PAR" );
- pk_csem.isemcnt = 0;
- pk_csem.maxsem = 0;
- status = cre_sem( 1, &pk_csem );
- assert( status == E_PAR );
-
- /*
- * Now run through all the bad ID errors
- */
-
- pk_csem.isemcnt = 2;
- pk_csem.maxsem = 3;
- puts( "Init - cre_sem - bad id (less than -4) - E_OACV" );
- status = cre_sem( -5, &pk_csem );
- assert( status == E_OACV );
-
- puts( "Init - cre_sem - bad id (between 0 and -4) - E_ID" );
- status = cre_sem( -4, &pk_csem );
- assert( status == E_ID );
-
- puts( "Init - cre_sem - bad id (0) - E_ID" );
- status = cre_sem( 0, &pk_csem );
- assert( status == E_ID );
-
- puts( "Init - cre_sem - bad id (too great) - E_ID" );
- status = cre_sem( CONFIGURE_MAXIMUM_ITRON_SEMAPHORES + 1, &pk_csem );
- assert( status == E_ID );
-
- puts( "Init - cre_sem - create semaphore 1 TA_TFIFO - E_OK" );
- pk_csem.isemcnt = 2;
- pk_csem.maxsem = 3;
- pk_csem.sematr = TA_TFIFO;
- status = cre_sem( 1, &pk_csem );
- assert( status == E_OK );
-
- puts( "Init - cre_sem - create semaphore 1 again - E_OBJ" );
- status = cre_sem( 1, &pk_csem );
- assert( status == E_OBJ );
-
- puts( "Init - cre_sem - create semaphore 2 TA_TPRI - E_OK" );
- pk_csem.isemcnt = 2;
- pk_csem.maxsem = 3;
- pk_csem.sematr = TA_TPRI;
- status = cre_sem( 2, &pk_csem );
- assert( status == E_OK );
-
- /*
- * Generate all the bad id errors for del_sem
- */
-
- puts( "Init - del_sem - bad id (less than -4) - E_OACV" );
- status = del_sem( -5 );
- assert( status == E_OACV );
-
- puts( "Init - del_sem - bad id (between 0 and -4) - E_ID" );
- status = del_sem( -4 );
- assert( status == E_ID );
-
- puts( "Init - del_sem - bad id (0) - E_ID" );
- status = del_sem( 0 );
- assert( status == E_ID );
-
- puts( "Init - del_sem - bad id (too great) - E_ID" );
- status = del_sem( CONFIGURE_MAXIMUM_ITRON_SEMAPHORES + 1 );
- assert( status == E_ID );
-
- /*
- * Generate all the bad id errors for sig_sem
- */
-
- puts( "Init - sig_sem - bad id (less than -4) - E_OACV" );
- status = sig_sem( -5 );
- assert( status == E_OACV );
-
- puts( "Init - sig_sem - bad id (between 0 and -4) - E_ID" );
- status = sig_sem( -4 );
- assert( status == E_ID );
-
- puts( "Init - sig_sem - bad id (0) - E_ID" );
- status = sig_sem( 0 );
- assert( status == E_ID );
-
- puts( "Init - sig_sem - bad id (too great) - E_ID" );
- status = wai_sem( CONFIGURE_MAXIMUM_ITRON_SEMAPHORES + 1 );
- assert( status == E_ID );
-
- /*
- * Generate all the bad id errors for preq_sem
- */
-
- puts( "Init - preq_sem - bad id (less than -4) - E_OACV" );
- status = preq_sem( -5 );
- assert( status == E_OACV );
-
- puts( "Init - preq_sem - bad id (between 0 and -4) - E_ID" );
- status = preq_sem( -4 );
- assert( status == E_ID );
-
- puts( "Init - preq_sem - bad id (0) - E_ID" );
- status = preq_sem( 0 );
- assert( status == E_ID );
-
- puts( "Init - preq_sem - bad id (too great) - E_ID" );
- status = preq_sem( CONFIGURE_MAXIMUM_ITRON_SEMAPHORES + 1 );
- assert( status == E_ID );
-
- /*
- * Generate all the bad id errors for wai_sem
- */
-
- puts( "Init - wai_sem - bad id (less than -4) - E_OACV" );
- status = wai_sem( -5 );
- assert( status == E_OACV );
-
- puts( "Init - wai_sem - bad id (between 0 and -4) - E_ID" );
- status = wai_sem( -4 );
- assert( status == E_ID );
-
- puts( "Init - wai_sem - bad id (0) - E_ID" );
- status = wai_sem( 0 );
- assert( status == E_ID );
-
- puts( "Init - wai_sem - bad id (too great) - E_ID" );
- status = wai_sem( CONFIGURE_MAXIMUM_ITRON_SEMAPHORES + 1 );
- assert( status == E_ID );
-
- /*
- * Generate all the bad id errors for twai_sem
- */
-
- puts( "Init - twai_sem - bad id (less than -4) - E_OACV" );
- status = twai_sem( -5, 1000 );
- assert( status == E_OACV );
-
- puts( "Init - twai_sem - bad id (between 0 and -4) - E_ID" );
- status = twai_sem( -4, 1000 );
- assert( status == E_ID );
-
- puts( "Init - twai_sem - bad id (0) - E_ID" );
- status = twai_sem( 0, 1000 );
- assert( status == E_ID );
-
- puts( "Init - twai_sem - bad id (too great) - E_ID" );
- status = twai_sem( CONFIGURE_MAXIMUM_ITRON_SEMAPHORES + 1, 1000 );
- assert( status == E_ID );
-
- /*
- * Generate all the bad id errors for ref_sem
- */
-
- puts( "Init - ref_sem - bad id (less than -4) - E_OACV" );
- status = ref_sem( -5, &pk_rsem );
- assert( status == E_OACV );
-
- puts( "Init - ref_sem - bad id (between 0 and -4) - E_ID" );
- status = ref_sem( -4, &pk_rsem );
- assert( status == E_ID );
-
- puts( "Init - ref_sem - bad id (0) - E_ID" );
- status = ref_sem( 0, &pk_rsem );
- assert( status == E_ID );
-
- puts( "Init - ref_sem - bad id (too great) - E_ID" );
- status = ref_sem( CONFIGURE_MAXIMUM_ITRON_SEMAPHORES + 1, &pk_rsem );
- assert( status == E_ID );
-
- /*
- * Exercise preq_sem (and sig_sem a little)
- */
-
-
- puts( "Init - preq_sem - semaphore 1 available (count --> 1) - E_OK" );
- status = preq_sem( 1 );
- assert( status == E_OK );
-
- puts( "Init - preq_sem - semaphore 1 available (count --> 0) - E_OK" );
- status = preq_sem( 1 );
- assert( status == E_OK );
-
- puts( "Init - preq_sem - semaphore 1 unavailable - E_TMOUT" );
- status = preq_sem( 1 );
- assert( status == E_TMOUT );
-
- puts( "Init - sig_sem - semaphore 1 (count --> 1) - E_OK" );
- status = sig_sem( 1 );
- assert( status == E_OK );
-
- puts("Init - twai_sem(TMO_POL) - semaphore 1 available (count --> 0) - E_OK");
- status = twai_sem( 1, TMO_POL );
- assert( status == E_OK );
-
- puts( "Init - twai_sem(TMO_POL) - semaphore 1 available - E_TMOUT" );
- status = twai_sem( 1, TMO_POL );
- assert( status == E_TMOUT );
-
- /*
- * Exercise twai_sem
- */
-
- puts( "Init - twai_sem - semaphore 1 unavailable - 1 second E_TMOUT" );
- put_time( "Init - starting to block at ");
- status = twai_sem( 1, 1000 );
- assert( status == E_TMOUT );
- put_time( "Init - timed out at ");
- puts( "Init - twai_sem - semaphore 1 unavailable - timeout completed" );
-
- /*
- * Now let's test exceed the maximum count of semaphore 1
- */
-
- puts( "Init - sig_sem - semaphore 1 (count --> 1) - E_OK" );
- status = sig_sem( 1 );
- assert( status == E_OK );
-
- puts( "Init - sig_sem - semaphore 1 (count --> 2) - E_OK" );
- status = sig_sem( 1 );
- assert( status == E_OK );
-
- puts( "Init - sig_sem - semaphore 1 (count --> 3) - E_OK" );
- status = sig_sem( 1 );
- assert( status == E_OK );
-
- puts( "Init - sig_sem - semaphore 1 (count > maximum) - E_QOVR" );
- status = sig_sem( 1 );
- assert( status == E_OK );
-
- /*
- * Exercise ref_sem
- */
-
- puts( "Init - ref_sem - NULL pk_sem returns E_PAR" );
- status = ref_sem( 1, NULL );
- assert( status == E_PAR );
-
- puts( "Init - ref_sem - semaphore 1 - E_OK" );
- status = ref_sem( 1, &pk_rsem );
- assert( status == E_OK );
- printf( "Init - semaphore 1 count = %d\n", pk_rsem.semcnt );
- printf( "Init - semaphore 1 waiting tasks = %d\n", pk_rsem.wtsk );
-
- puts( "Init - preq_sem - semaphore 1 (count --> 2) - E_OK" );
- status = preq_sem( 1 );
- assert( status == E_OK );
-
- puts( "Init - ref_sem - semaphore 1 - E_OK" );
- status = ref_sem( 1, &pk_rsem );
- assert( status == E_OK );
- printf( "Init - semaphore 1 count = %d\n", pk_rsem.semcnt );
- printf( "Init - semaphore 1 waiting tasks = %d\n", pk_rsem.wtsk );
-
-
- /*
- * Exercise del_sem
- */
-
- /* XXX really want another task blocking on the semaphore XXX */
-
- puts( "Init - del_sem - semaphore 1 deleted - E_OK" );
- status = del_sem( 1 );
- assert( status == E_OK );
-
- puts( "Init - XXX need other tasks to complete the test XXX" );
-
- puts( "Init - dly_tsk - 1 second to let other task run" );
- status = dly_tsk( 1000 );
- assert( status == E_OK );
-
- printf( "*** END OF ITRONSEM01 -- ITRON SEMAPHORE TEST ***\n" );
- exit( 0 );
-}
diff --git a/testsuites/itrontests/itronsem01/itronsem01.doc b/testsuites/itrontests/itronsem01/itronsem01.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/itrontests/itronsem01/itronsem01.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/itrontests/itronsem01/itronsem01.scn b/testsuites/itrontests/itronsem01/itronsem01.scn
deleted file mode 100644
index 38093bda31..0000000000
--- a/testsuites/itrontests/itronsem01/itronsem01.scn
+++ /dev/null
@@ -1,61 +0,0 @@
-*** ITRONSEM01 -- ITRON SEMAPHORE TEST ***
-Init - cre_sem - NULL pk_sem returns E_PAR
-Init - cre_sem - isemcnt > maxsem returns E_PAR
-Init - cre_sem - maxsem of 0 returns E_PAR
-Init - cre_sem - bad id (less than -4) - E_OACV
-Init - cre_sem - bad id (between 0 and -4) - E_ID
-Init - cre_sem - bad id (0) - E_ID
-Init - cre_sem - bad id (too great) - E_ID
-Init - cre_sem - create semaphore 1 TA_TFIFO - E_OK
-Init - cre_sem - create semaphore 1 again - E_OBJ
-Init - cre_sem - create semaphore 2 TA_TPRI - E_OK
-Init - del_sem - bad id (less than -4) - E_OACV
-Init - del_sem - bad id (between 0 and -4) - E_ID
-Init - del_sem - bad id (0) - E_ID
-Init - del_sem - bad id (too great) - E_ID
-Init - sig_sem - bad id (less than -4) - E_OACV
-Init - sig_sem - bad id (between 0 and -4) - E_ID
-Init - sig_sem - bad id (0) - E_ID
-Init - sig_sem - bad id (too great) - E_ID
-Init - preq_sem - bad id (less than -4) - E_OACV
-Init - preq_sem - bad id (between 0 and -4) - E_ID
-Init - preq_sem - bad id (0) - E_ID
-Init - preq_sem - bad id (too great) - E_ID
-Init - wai_sem - bad id (less than -4) - E_OACV
-Init - wai_sem - bad id (between 0 and -4) - E_ID
-Init - wai_sem - bad id (0) - E_ID
-Init - wai_sem - bad id (too great) - E_ID
-Init - twai_sem - bad id (less than -4) - E_OACV
-Init - twai_sem - bad id (between 0 and -4) - E_ID
-Init - twai_sem - bad id (0) - E_ID
-Init - twai_sem - bad id (too great) - E_ID
-Init - ref_sem - bad id (less than -4) - E_OACV
-Init - ref_sem - bad id (between 0 and -4) - E_ID
-Init - ref_sem - bad id (0) - E_ID
-Init - ref_sem - bad id (too great) - E_ID
-Init - preq_sem - semaphore 1 available (count --> 1) - E_OK
-Init - preq_sem - semaphore 1 available (count --> 0) - E_OK
-Init - preq_sem - semaphore 1 unavailable - E_TMOUT
-Init - sig_sem - semaphore 1 (count --> 1) - E_OK
-Init - twai_sem(TMO_POL) - semaphore 1 available (count --> 0) - E_OK
-Init - twai_sem(TMO_POL) - semaphore 1 available - E_TMOUT
-Init - twai_sem - semaphore 1 unavailable - 1 second E_TMOUT
-Init - starting to block at Fri Jan 01 00:00:00 1988
-Init - timed out at Fri Jan 01 00:00:01 1988
-Init - twai_sem - semaphore 1 unavailable - timeout completed
-Init - sig_sem - semaphore 1 (count --> 1) - E_OK
-Init - sig_sem - semaphore 1 (count --> 2) - E_OK
-Init - sig_sem - semaphore 1 (count --> 3) - E_OK
-Init - sig_sem - semaphore 1 (count > maximum) - E_QOVR
-Init - ref_sem - NULL pk_sem returns E_PAR
-Init - ref_sem - semaphore 1 - E_OK
-Init - semaphore 1 count = 4
-Init - semaphore 1 waiting tasks = 0
-Init - preq_sem - semaphore 1 (count --> 2) - E_OK
-Init - ref_sem - semaphore 1 - E_OK
-Init - semaphore 1 count = 3
-Init - semaphore 1 waiting tasks = 0
-Init - del_sem - semaphore 1 deleted - E_OK
-Init - XXX need other tasks to complete the test XXX
-Init - dly_tsk - 1 second to let other task run
-*** END OF ITRONSEM01 -- ITRON SEMAPHORE TEST ***
diff --git a/testsuites/itrontests/itronsem01/system.h b/testsuites/itrontests/itronsem01/system.h
deleted file mode 100644
index 6989ad101b..0000000000
--- a/testsuites/itrontests/itronsem01/system.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-#include <itron.h>
-#include <assert.h>
-
-/* functions */
-
-void ITRON_Init( void );
-
-/* configuration information */
-
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-
-#define CONFIGURE_ITRON_INIT_TASK_TABLE
-#define CONFIGURE_MAXIMUM_ITRON_SEMAPHORES 10
-
-#include <confdefs.h>
-
-/* global variables */
-
-TEST_EXTERN rtems_id Global_variable; /* example global variable */
-
-/* end of include file */
diff --git a/testsuites/itrontests/itrontask01/Makefile.am b/testsuites/itrontests/itrontask01/Makefile.am
deleted file mode 100644
index e3d6d007f4..0000000000
--- a/testsuites/itrontests/itrontask01/Makefile.am
+++ /dev/null
@@ -1,42 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = itrontask01
-PGM = ${ARCH}/$(TEST).exe
-
-MANAGERS = all
-
-C_FILES = init.c task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/itrontests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/itrontests/itrontask01/init.c b/testsuites/itrontests/itrontask01/init.c
deleted file mode 100644
index 73a53c84c4..0000000000
--- a/testsuites/itrontests/itrontask01/init.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is called from init_exec and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-#include <stdio.h>
-
-void ITRON_Init( void )
-{
- rtems_time_of_day time;
- ER status;
- T_CTSK pk_ctsk;
-
- puts( "\n\n*** ITRON TASK TEST 1 ***" );
-
- /*
- * XXX - Change this to an itron clock !!
- */
-
- build_time( &time, 12, 31, 1988, 9, 0, 0, 0 );
- status = rtems_clock_set( &time );
- directive_failed( status, "rtems_clock_set" );
-
- pk_ctsk.exinf = NULL;
- pk_ctsk.tskatr = TA_HLNG;
- pk_ctsk.itskpri = 1;
- pk_ctsk.task = Task_2_through_4;
-
- pk_ctsk.stksz = RTEMS_MINIMUM_STACK_SIZE * 2;
- status = cre_tsk( 2, &pk_ctsk );
- directive_failed( status, "cre_tsk of TA1" );
-
- pk_ctsk.stksz = RTEMS_MINIMUM_STACK_SIZE * 2;
- status = cre_tsk( 3, &pk_ctsk );
- directive_failed( status, "cre_tsk of TA2" );
-
- pk_ctsk.stksz = RTEMS_MINIMUM_STACK_SIZE * 3;
- status = cre_tsk( 4, &pk_ctsk );
- directive_failed( status, "cre_tsk of TA3" );
-
- status = sta_tsk( 2, 0 );
- directive_failed( status, "sta_tsk of TA1" );
-
- status = sta_tsk( 3, 0 );
- directive_failed( status, "sta_tsk of TA1" );
-
- status = sta_tsk( 4, 0 );
- directive_failed( status, "sta_tsk of TA1" );
-
- exd_tsk();
- directive_failed( 0, "exd_tsk" );
-}
diff --git a/testsuites/itrontests/itrontask01/itrontask01.doc b/testsuites/itrontests/itrontask01/itrontask01.doc
deleted file mode 100644
index 8e5e884f34..0000000000
--- a/testsuites/itrontests/itrontask01/itrontask01.doc
+++ /dev/null
@@ -1,61 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-This file describes the directives and concepts tested by this test set.
-This test is based upon the test in sp01.
-
-test set name: itrontask01
-
-directives:
- cre_tsk, exd_tsk, get_tid, sta_tsk
-
-concepts: XXX verify
-
- a. Verifies system can create and start both the executive's system
- initialization and idle task.
-
- b. Verifies executive can swap between three application tasks at the
- same priority and the executive's internal idle task.
-
- c. Verifies can print strings to the CRT on port 2 of the mvme136 board
- using Print and Println in the board support package.
-
- d. Verifies interrupt handler can handle a task switch from an interrupt
- as specified with the i_return directive.
-
- e. Verifies executive initialization performed correctly.
-
- f. Verifies the executive trap handler except for the halt function.
-
- g. Verifies that a task can get the task identification number of itself.
-
- a. Verifies exd_tsk
-
- b. Verifies get_tid
-
-notes:
-
- rtems clock directives should change to itron clock directives when
- the clock directives are merged.
-
- change rtems task wake after to itron routines.
-
-output:
- "TA1" is printed once every 5 seconds.
- "TA2" is printed once every 10 seconds.
- "TA3" is printed once every 15 seconds.
-
-
-
-
-
-
-
diff --git a/testsuites/itrontests/itrontask01/itrontask01.scn b/testsuites/itrontests/itrontask01/itrontask01.scn
deleted file mode 100644
index 7ccefcbda4..0000000000
--- a/testsuites/itrontests/itrontask01/itrontask01.scn
+++ /dev/null
@@ -1,18 +0,0 @@
-*** ITRON TASK TEST 1 ***
-TA1 - rtems_clock_get - 09:00:00 12/31/1988
-TA2 - rtems_clock_get - 09:00:00 12/31/1988
-TA3 - rtems_clock_get - 09:00:00 12/31/1988
-TA1 - rtems_clock_get - 09:00:05 12/31/1988
-TA2 - rtems_clock_get - 09:00:10 12/31/1988
-TA1 - rtems_clock_get - 09:00:10 12/31/1988
-TA3 - rtems_clock_get - 09:00:15 12/31/1988
-TA1 - rtems_clock_get - 09:00:15 12/31/1988
-TA2 - rtems_clock_get - 09:00:20 12/31/1988
-TA1 - rtems_clock_get - 09:00:20 12/31/1988
-TA1 - rtems_clock_get - 09:00:25 12/31/1988
-TA3 - rtems_clock_get - 09:00:30 12/31/1988
-TA1 - rtems_clock_get - 09:00:30 12/31/1988
-TA2 - rtems_clock_get - 09:00:30 12/31/1988
-*** END OF ITRON TASK TEST 1 ***
-
-NOTE: The order of the prints at each time interval is irrelevant.
diff --git a/testsuites/itrontests/itrontask01/system.h b/testsuites/itrontests/itrontask01/system.h
deleted file mode 100644
index 9974522892..0000000000
--- a/testsuites/itrontests/itrontask01/system.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-#include <itron.h>
-
-/* functions */
-
-void ITRON_Init( void );
-void Task_2_through_4();
-
-/* configuration information */
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_ITRON_INIT_TASK_TABLE
-
-#include <confdefs.h>
-
-/* global variables */
-
-/* end of include file */
-
-
-
diff --git a/testsuites/itrontests/itrontask01/task1.c b/testsuites/itrontests/itrontask01/task1.c
deleted file mode 100644
index da12424800..0000000000
--- a/testsuites/itrontests/itrontask01/task1.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/* Task_1_through_3
- *
- * This routine serves as a test task. It verifies the basic task
- * switching capabilities of the executive.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-void Task_2_through_4()
-{
- ID tid;
- int tid_index;
- rtems_time_of_day time;
- ER status;
- char name[30];
-
- status = get_tid( &tid );
- directive_failed( status, "get_tid");
-
- tid_index = tid - 1; /* account for init tasks */
-
- sprintf(name, "TA%d", tid_index);
-
- while( FOREVER ) {
- status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
- directive_failed( status, "rtems_clock_get" );
-
- if ( time.second >= 35 ) {
- puts( "*** END OF ITRON TASK TEST 1 ***" );
- exit( 0 );
- }
-
- printf(name);
- print_time( " - rtems_clock_get - ", &time, "\n" );
-
- status = rtems_task_wake_after( tid_index * 5 * TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
- }
-}
-
diff --git a/testsuites/itrontests/itrontask02/Makefile.am b/testsuites/itrontests/itrontask02/Makefile.am
deleted file mode 100644
index c9a13f63d4..0000000000
--- a/testsuites/itrontests/itrontask02/Makefile.am
+++ /dev/null
@@ -1,42 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = itrontask02
-PGM = ${ARCH}/$(TEST).exe
-
-MANAGERS = all
-
-C_FILES = init.c dormant.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/itrontests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/itrontests/itrontask02/dormant.c b/testsuites/itrontests/itrontask02/dormant.c
deleted file mode 100644
index 69cb694e7e..0000000000
--- a/testsuites/itrontests/itrontask02/dormant.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/* Dormant
- *
- * This routine serves as two test tasks.
- * It has one dormant and one sleeping tasks.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <assert.h>
-#include "system.h"
-
-void Dormant_task()
-{
- puts( "DORMANT - ext_tsk - going to DORMANT state" );
- ext_tsk( );
-
- puts( "ERROR==>ext_tsk of DORMANT returned" );
- assert(0);
-}
-
-
-void Non_Dormant_task()
-{
- ER status;
-
- while (TRUE) {
- puts( "NON-DORMANT - Sleep for 2 minutes" );
- status = rtems_task_wake_after( 120*TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
- }
-}
-
diff --git a/testsuites/itrontests/itrontask02/init.c b/testsuites/itrontests/itrontask02/init.c
deleted file mode 100644
index 43957dcf4f..0000000000
--- a/testsuites/itrontests/itrontask02/init.c
+++ /dev/null
@@ -1,580 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is called from init_exec and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-#include <stdio.h>
-#include <assert.h>
-
-void ITRON_Init( void )
-{
-
- /*
- * Status Codes for these errors
- *
- *
- * E_OK - Normal Completion
- *
- * E_NOMEM - Insufficient memory (Memory for control block and/or user
- * stack cannot be allocated)
- *
- * E_ID - Invalid ID Number (tskid was invalid or could not be used)
- *
- * E_RSATR - Reserved attribute (tskatr was invalid or could not be used)
- *
- * E_OBJ - Invalid object state (a task of the same ID already exists)
- *
- * E_OACV - Object access violation (A tskid less than -4 was specified
- * from a user task. This is implementation dependent.)
- *
- * E_PAR - Parameter error (pk_ctsk, task, itskpri and/or stksz is invalid)
- *
- * E_NOEXS - Object does not exist (the task specified by tskid does not
- * exist)
- *
- * E_CTX - Context error (issued from task-independent portions or a task
- * in dispatch disabled state)
- *
- *
- *
- * Network Specific Errors (ITRON calls these Connection Function Errors)
- *
- * EN_OBJNO - An object number which could not be accessed on the target
- * node is specified.
- *
- * EN_CTXID - Specified an object on another node when the system call
- * was issued from a task in dispatch disabled state or from
- * a task-independent portion
- *
- * EN_PAR - A value outside the range supported by the target node and/or
- * transmission packet format was specified as a parameter
- * (a value outside supported range was specified for exinf,
- * tskatr, task, itskpri and/or stksz)
- *
- * EN_RPAR - A value outside the range supported by the requesting node
- * and/or transmission packet format was returned as a return
- * parameter (a value outside supported range was returned for
- * exinf, tskpri and/or tskstat)
- *
- */
-
-
- rtems_time_of_day time;
- ER status;
- T_CTSK pk_ctsk;
- T_RTSK pk_rtsk; /* Reference Task Packet */
-
-
- puts( "\n\n*** ITRON TASK TEST 2 ***\n" );
-
- build_time( &time, 12, 31, 1988, 9, 0, 0, 0 );
- status = rtems_clock_set( &time );
- directive_failed( status, "rtems_clock_set" );
-
-
- /*
- * Set My priority to 8 so that dummy tasks will be
- * forced to run when started.
- */
-
- status = chg_pri( TSK_SELF, 8 );
- fatal_directive_status( status, E_OK, "chg_pri of TSK_SELF");
- status = ref_tsk( &pk_rtsk, TSK_SELF );
- fatal_directive_status( status, E_OK, "ref_tsk of TSK_SELF");
- fatal_directive_status( pk_rtsk.tskpri, 8, "task priority of SELF");
-
- /*
- * Create and verify a DORMANT task.
- */
-
- pk_ctsk.exinf = NULL;
- pk_ctsk.tskatr = TA_HLNG;
- pk_ctsk.itskpri = 1;
- pk_ctsk.task = Dormant_task;
- pk_ctsk.stksz = RTEMS_MINIMUM_STACK_SIZE;
-
- puts( "Init - cre_tsk - Dormant Task" );
- status = cre_tsk( DORMANT_TASK_ID, &pk_ctsk );
- fatal_directive_status( status, E_OK, "cre_tsk of DORMANT");
- status = ref_tsk( &pk_rtsk, DORMANT_TASK_ID );
- fatal_directive_status( status, E_OK, "ref_tsk of DORMANT");
- fatal_directive_status( pk_rtsk.tskstat, TTS_DMT, "task state of DORMANT");
-
- /*
- * Create, Start and verify a not DORMANT task.
- */
-
- pk_ctsk.task = Non_Dormant_task;
- puts( "Init - cre_tsk - Non-Dormant Task" );
- status = cre_tsk( NON_DORMANT_TASK_ID, &pk_ctsk );
- fatal_directive_status( status, E_OK, "cre_tsk of NON_DORMANT");
- status = sta_tsk( NON_DORMANT_TASK_ID, 1 );
- status = ref_tsk( &pk_rtsk, NON_DORMANT_TASK_ID );
- fatal_directive_status( status, E_OK, "ref_tsk of NON_DORMANT");
- fatal_directive_status( pk_rtsk.tskstat,TTS_WAI,"task state of NON_DORMANT");
-
-
- /*
- * Bad ID errors
- */
-
- puts( "\n*** Create Task Errors ***" );
-
- puts( "Init - cre_tsk - access violation ( id less than -4) - E_OACV" );
- status = cre_tsk( -5, &pk_ctsk );
- fatal_directive_status( status, E_OACV, "cre_tsk of -5");
-
- puts( "Init - cre_tsk - bad id (between 0 and -4) - E_ID" );
- status = cre_tsk( -2, &pk_ctsk );
- fatal_directive_status( status, E_ID, "cre_tsk of -2");
-
- puts( "Init - cre_tsk - cannot create TSK_SELF - E_ID" );
- status = cre_tsk( TSK_SELF, &pk_ctsk );
- fatal_directive_status( status, E_ID, "cre_tsk of TSK_SELF");
-
- puts( "Init - cre_tsk - invalid id; id already exists - E_OBJ" );
- status = cre_tsk( 1, &pk_ctsk );
- fatal_directive_status( status, E_OBJ, "cre_tsk of 1");
-
- /*
- * Bad task attribute errors
- */
-
- pk_ctsk.tskatr = -1;
- puts( "Init - cre_tsk - tskatr is invalid - E_RSATR" );
- status = cre_tsk( 5, &pk_ctsk );
- fatal_directive_status( status, E_RSATR, "cre_tsk with tskatr of -1");
-
- puts( "Init - cre_tsk - pk_ctsk is invalid - E_PAR" );
- status = cre_tsk( 5, NULL );
- fatal_directive_status( status, E_PAR, "cre_tsk with NULL discription");
-
- pk_ctsk.tskatr = TA_HLNG;
- pk_ctsk.itskpri = 0;
- puts( "Init - cre_tsk - itskpri is 0 - E_PAR" );
- status = cre_tsk( 5, &pk_ctsk );
- fatal_directive_status( status, E_PAR, "cre_tsk with priority of 0");
- pk_ctsk.itskpri = 257; /* XXX Design parameter not requirement. */
- puts( "Init - cre_tsk - itskpri is 257 - E_PAR" );
- status = cre_tsk( 5, &pk_ctsk );
- fatal_directive_status( status, E_PAR, "cre_tsk with priority of 257");
-
- pk_ctsk.stksz = -1;
- puts( "Init - cre_tsk - stksz is invalid - E_PAR" );
- status = cre_tsk( 5, &pk_ctsk );
- fatal_directive_status( status, E_PAR, "cre_tsk with size of -1");
-
- pk_ctsk.task = NULL;
- puts( "Init - cre_tsk - task is invalid - E_PAR" );
- status = cre_tsk( 5, &pk_ctsk );
- fatal_directive_status( status, E_PAR, "cre_tsk with null task identifier");
-
-
-#if (0)
- /* these errors can not be generated for cre_tsk at this time */
- fatal_directive_status( status, E_NOMEM, "");
- fatal_directive_status( status, EN_OBJNO, "");
- fatal_directive_status( status, EN_CTXID, "");
- fatal_directive_status( status, EN_PAR, "");
-#endif
-
- puts( "\n\n*** Delete Task Errors ***" );
-
- /*
- * Reset structure
- */
-
- pk_ctsk.exinf = NULL;
- pk_ctsk.tskatr = TA_HLNG;
- pk_ctsk.itskpri = 1;
- pk_ctsk.task = Dormant_task;
- pk_ctsk.stksz = RTEMS_MINIMUM_STACK_SIZE;
-
-
- puts( "Init - del_tsk - cannot delete TSK_SELF - E_OBJ" );
- status = del_tsk( TSK_SELF );
- fatal_directive_status( status, E_OBJ, "del_tsk with SELF");
-
- puts( "Init - del_tsk - task is not DORMANT - E_OBJ" );
- status = del_tsk( NON_DORMANT_TASK_ID );
- fatal_directive_status( status, E_OBJ, "del_tsk NON_DORMANT");
-
- puts( "Init - del_tsk - task does not exist - E_NOEXS" );
- status = del_tsk( 5 );
- fatal_directive_status( status, E_NOEXS, "del_tsk 5");
-
- puts( "Init - del_tsk - access violation ( id less than -4) - E_OACV" );
- status = del_tsk( -5 );
- fatal_directive_status( status, E_OACV, "del_tsk -5");
-
- puts( "Init - del_tsk - cannot delete TSK_SELF - E_OBJ" );
- status = del_tsk( TSK_SELF );
- fatal_directive_status( status, E_OBJ, "del_tsk self");
-
- puts( "Init - del_tsk - bad id (between 0 and -4) - E_ID" );
- status = del_tsk( -3 );
- fatal_directive_status( status, E_ID, "del_tsk -3");
-
-#if (0)
- /* these errors can not be generated for del_tsk at this time */
- fatal_directive_status( status, EN_OBJNO, "del_tsk ");
- fatal_directive_status( status, EN_CTXID, "del_tsk ");
-#endif
-
-
- puts( "\n\n*** Start Task Errors ***" );
-
- puts( "Init - sta_tsk - access violation ( id less than -4) - E_OACV" );
- status = sta_tsk( -5, 1 );
- fatal_directive_status( status, E_OACV, "sta_tsk of -5");
-
- puts( "Init - sta_tsk - bad id (between 0 and -4) - E_ID" );
- status = sta_tsk( -2, 1 );
- fatal_directive_status( status, E_ID, "sta_tsk of -2");
-
- puts( "Init - sta_tsk - cannot start TSK_SELF - E_OBJ" );
- status = sta_tsk( TSK_SELF, 1 );
- fatal_directive_status( status, E_OBJ, "sta_tsk of self");
-
- puts( "Init - sta_tsk - task is not DORMANT - E_OBJ" );
- status = sta_tsk( NON_DORMANT_TASK_ID, 1 );
- fatal_directive_status( status, E_OBJ, "sta_tsk NON_DORMANT");
-
- puts( "Init - sta_tsk - task does not exist - E_NOEXS" );
- status = sta_tsk( 5, 1 );
- fatal_directive_status( status, E_NOEXS, "5");
-
-#if (0)
- /* these errors can not be generated for sta_tsk at this time */
- fatal_directive_status( status, EN_OBJNO, "sta_tsk");
- fatal_directive_status( status, EN_CTXID, "sta_tsk");
- fatal_directive_status( status, EN_PAR, "sta_tsk");
-#endif
-
-
-#if (0)
- /* these errors can not be tested at this time */
- puts( "\n\n*** Exit Task Errors ***" );
- puts( "Init - ext_tsk - context error - E_CTX" );
- status = ext_tsk( );
- fatal_directive_status( status, E_CTX, "ext_tsk ");
-
- puts( "\n\n*** Exit and Delete Task Errors ***" );
- puts( "Init - exd_tsk - context error - E_CTX" );
- status = exd_tsk( );
- fatal_directive_status( status, E_CTX, "exd_tsk");
-#endif
-
-
- puts( "\n\n*** Terminate Other Task Errors ***" );
-
- puts( "Init - ter_tsk - bad id (between 0 and -4) - E_ID" );
- status = ter_tsk( -2 );
- fatal_directive_status( status, E_ID, "ter_tsk of -2");
-
- puts( "Init - ter_tsk - cannot terminate TSK_SELF (0) - E_OBJ" );
- status = ter_tsk( TSK_SELF );
- fatal_directive_status( status, E_OBJ, "ter_tsk of self");
-
- puts( "Init - ter_tsk - task is not DORMANT - E_OBJ" );
- status = ter_tsk( DORMANT_TASK_ID );
- fatal_directive_status( status, E_OBJ, "ter_tsk DORMANT");
-
- puts( "Init - ter_tsk - task does not exist - E_NOEXS" );
- status = ter_tsk( 5 );
- fatal_directive_status( status, E_NOEXS, "ter_tsk of 5");
-
- puts( "Init - ter_tsk - access violation ( id less than -4) - E_OACV" );
- status = ter_tsk( -5 );
- fatal_directive_status( status, E_OACV, "ter_tsk of -5");
-
-#if (0)
- /* these errors can not be generated for ter_tsk at this time */
- fatal_directive_status( status, EN_OBJNO, "ter_tsk");
- fatal_directive_status( status, EN_CTXID, "ter_tsk");
-#endif
-
-
-#if (0)
- status = dis_dsp( );
- fatal_directive_status( status, E_CTX, "dis_dsp");
-
- status = ena_dsp( );
- fatal_directive_status( status, E_CTX, "ena_dsp");
-#endif
-
- puts( "\n\n*** Change Priority Task Errors ***" );
-
- puts( "Init - chg_pri - bad id (between 0 and -4) - E_ID" );
- status = chg_pri( -2, 1 );
- fatal_directive_status( status, E_ID, "chg_pri of -2");
-
- /* Call from task independent portion to cause E_OBJ
- puts( "Init - chg_pri - change priority of TSK_SELF - E_OBJ" );
- status = chg_pri( XXX - INTERRUPT, 1 );
- assert( status == E_OBJ );
- */
-
- puts( "Init - chg_pri - task is DORMANT - E_OBJ" );
- status = chg_pri( DORMANT_TASK_ID, 1 );
- fatal_directive_status( status, E_OBJ, "chg_pri of DORMANT");
-
- puts( "Init - chg_pri - task does not exist - E_NOEXS" );
- status = chg_pri( 5, 1 );
- fatal_directive_status( status, E_NOEXS, "chg_pri of 5");
-
- puts( "Init - chg_pri - access violation ( id less than -4) - E_OACV" );
- status = chg_pri( -5, 1 );
- fatal_directive_status( status, E_OACV, "chg_pri of -5");
-
- puts( "Init - chg_pri - invalid priority - E_PAR" );
- status = chg_pri( 1, -1 );
- fatal_directive_status( status, E_PAR, "chg_pri with priority of -1");
-
-#if (0)
- /* these errors can not be generated for chg_pri at this time */
- fatal_directive_status( status, EN_OBJNO, "chg_pri");
- fatal_directive_status( status, EN_CTXID, "chg_pri");
- fatal_directive_status( status, EN_PAR, "chg_pri");
-#endif
-
- /* This gave me a nasty-gram
- * "core_find_mapping() - access to unmaped address, attach a default map
- * to handle this - addr=0x80002098 nr_bytes=0x4 processor=0x40134008
- * cia=0xc744"
- */
-
- puts( "\n\n*** Rotate Ready Queue Errors ***" );
- puts( "Init - rot_rdq - priority -1 - E_PAR" );
- status = rot_rdq( -1 );
- fatal_directive_status( status, E_PAR, "rot_rdq -1");
- puts( "Init - rot_rdq - priority 257 - E_PAR" );
- status = rot_rdq( 257 );
- fatal_directive_status( status, E_PAR, "rot_rdq 256");
-
- /* XXX - This routine is not coded */
-
- puts( "Init - rel_rdq - XXX Add when rel_wai coded - E_OK" );
- status = rel_wai( 1 );
- fatal_directive_status( status, E_OK, "rel_wai");
-
- puts( "Init - rel_rdq - XXX Add when rel_wai coded - E_ID" );
- status = E_ID;
- fatal_directive_status( status, E_ID, "rel_wai");
-
- puts( "Init - rel_rdq - XXX Add when rel_wai coded - E_NOEXS" );
- status = E_NOEXS;
- fatal_directive_status( status, E_NOEXS, "rel_wai");
-
- puts( "Init - rel_rdq - XXX Add when rel_wai coded - E_OACV" );
- status = E_OACV;
- fatal_directive_status( status, E_OACV, "rel_wai");
-
- puts( "Init - rel_rdq - XXX Add when rel_wai coded - E_OBJ" );
- status = E_OBJ;
- fatal_directive_status( status, E_OBJ, "rel_wai");
-
- puts( "Init - rel_rdq - XXX Add when rel_wai coded - EN_OBJNO" );
- status = EN_OBJNO;
- fatal_directive_status( status, EN_OBJNO, "rel_wai");
-
- puts( "Init - rel_rdq - XXX Add when rel_wai coded - EN_CTXID" );
- status = EN_CTXID;
- fatal_directive_status( status, EN_CTXID, "rel_wai");
-
-
- puts( "\n\n*** Reference Task Status Errors ***" );
- puts( "Init - ref_tsk - bad id (between 0 and -4) - E_ID" );
- status = ref_tsk( &pk_rtsk, -2 );
- fatal_directive_status( status, E_ID, "ref_tsk -2");
-
- /* XXX Call from task independent portion to cause E_ID
- puts( "Init - ref_tsk - reference INTERRUPT - E_ID" );
- status = ref_tsk( &pk_rtsk, TSK_SELF );
- assert( status == E_ID );
- */
-
- puts( "Init - ref_tsk - task does not exist - E_NOEXS" );
- status = ref_tsk( &pk_rtsk, 5 );
- fatal_directive_status( status, E_NOEXS, "ref_tsk 5");
-
- puts( "Init - ref_tsk - access violation ( id less than -4) - E_OACV" );
- status = ref_tsk( &pk_rtsk, -5 );
- fatal_directive_status( status, E_OACV, "ref_tsk -5");
-
- puts( "Init - ref_tsk - packet address is bad - E_PAR" );
- status = ref_tsk( NULL, 1 );
- fatal_directive_status( status, E_PAR, "ref_tsk SELF with NULL descriptor");
-
-#if (0)
- /* these errors can not be generated for ref_tsk at this time */
- fatal_directive_status( status, EN_OBJNO, "ref_tsk");
- fatal_directive_status( status, EN_CTXID, "ref_tsk");
- fatal_directive_status( status, EN_RPAR, "ref_tsk");
-#endif
-
- puts( "\n\n*** Suspend Task Errors ***" );
-
- puts( "Init - sus_tsk - access violation ( id less than -4) - E_OACV" );
- status = sus_tsk( -5 );
- fatal_directive_status( status, E_OACV, "sus_tsk of -5");
-
- puts( "Init - sus_tsk - bad id (between 0 and -4) - E_ID" );
- status = sus_tsk( -2 );
- fatal_directive_status( status, E_ID, "sus_tsk of -2");
-
- puts( "Init - sus_tsk - cannot suspend SELF - E_OBJ" );
- status = sus_tsk( TSK_SELF );
- fatal_directive_status( status, E_OBJ, "sus_tsk of self");
-
- puts( "Init - sus_tsk - task does not exist - E_NOEXS" );
- status = sus_tsk( 5 );
- fatal_directive_status( status, E_NOEXS, "sus_tsk of 5");
-
- /* XXX - We support nested suspends and will never return this error.
- puts( "Init - sus_tsk - no support for nested SUSPENDS - E_QOVR" );
- status = sus_tsk( 1 );
- fatal_directive_status( status, E_QOVR, "sus_tsk");
- */
-
- /* XXX - Can not test this.
- puts( "Init - sus_tsk - exceeded limit for nested SUSPENDS - E_QOVR" );
- status = sus_tsk( 1 );
- fatal_directive_status( status, E_QOVR, "sus_tsk");
- */
-
-#if (0)
- /* these errors can not be generated for sus_tsk at this time */
- fatal_directive_status( status, EN_OBJNO, "sus_tsk");
- fatal_directive_status( status, EN_CTXID, "sus_tsk");
-#endif
-
-
- puts( "\n\n*** Resume Task Errors ***" );
-
- puts( "Init - rsm_tsk - access violation ( id less than -4) - E_OACV" );
- status = rsm_tsk( -5 );
- fatal_directive_status( status, E_OACV, "rsm_tsk -5");
-
- puts( "Init - rsm_tsk - bad id (between 0 and -4) - E_ID" );
- status = rsm_tsk( -2 );
- fatal_directive_status( status, E_ID, "rsm_tsk -2");
-
- puts( "Init - rsm_tsk - cannot resume SELF - E_OBJ" );
- status = rsm_tsk( TSK_SELF );
- fatal_directive_status( status, E_OBJ, "rsm_tsk self");
-
- puts( "Init - rsm_tsk - task is DORMANT - E_OBJ" );
- status = rsm_tsk( DORMANT_TASK_ID );
- fatal_directive_status( status, E_OBJ, "rsm_tsk DORMANT");
-
- puts( "Init - rsm_tsk - task is NON_DORMANT not suspended - E_OK" );
- status = rsm_tsk( NON_DORMANT_TASK_ID );
- fatal_directive_status( status, E_OK, "rsm_tsk NON_DORMANT");
-
- puts( "Init - rsm_tsk - task does not exist - E_NOEXS" );
- status = rsm_tsk( 5 );
- fatal_directive_status( status, E_NOEXS, "rms_tsk 5");
-
-#if (0)
- /* these errors can not be generated for rsm_tsk at this time */
- fatal_directive_status( status, EN_OBJNO, "rsm_tsk");
- fatal_directive_status( status, EN_CTXID, "rsm_tsk");
-#endif
-
-
- puts( "\n\n*** Forcibly Resume Task Errors ***" );
-
- puts( "Init - frsm_tsk - access violation ( id less than -4) - E_OACV" );
- status = frsm_tsk( -5 );
- fatal_directive_status( status, E_OACV, "frsm_tsk -5");
-
- puts( "Init - frsm_tsk - bad id (between 0 and -4) - E_ID" );
- status = frsm_tsk( -2 );
- fatal_directive_status( status, E_ID, "frsm_tsk -2");
-
- puts( "Init - frsm_tsk - cannot forcibly resume SELF - E_OBJ" );
- status = frsm_tsk( TSK_SELF );
- fatal_directive_status( status, E_OBJ, "frsm_tsk self");
-
- puts( "Init - frsm_tsk - task is DORMANT - E_OBJ" );
- status = frsm_tsk( DORMANT_TASK_ID );
- fatal_directive_status( status, E_OBJ, "frsm_tsk DORMANT");
-
- puts( "Init - frsm_tsk - task does not exist - E_NOEXS" );
- status = frsm_tsk( 5 );
- fatal_directive_status( status, E_NOEXS, "frsm_tsk 5");
-
- puts( "Init - frsm_tsk - task is NON_DORMANT not suspended - E_OK" );
- status = frsm_tsk( NON_DORMANT_TASK_ID );
- fatal_directive_status( status, E_OK, "frsm_tsk NON_DORMANT");
-
-#if (0)
- /* these errors can not be generated for frsm_tsk at this time */
- fatal_directive_status( status, EN_OBJNO, "frsm_tsk");
- fatal_directive_status( status, EN_CTXID, "frsm_tsk");
-#endif
-
-
-#if (0)
-XXXXX - FIX ME
- /* these directives are not coded */
- slp_tsk( );
- fatal_directive_status( status, E_OK, "");
- fatal_directive_status( status, E_PAR, "");
- fatal_directive_status( status, E_RLWAI, "");
- fatal_directive_status( status, E_TMOUT, "");
- fatal_directive_status( status, E_CTX, "");
-
-
- tslp_tsk( TMO );
- fatal_directive_status( status, E_OK, "");
- fatal_directive_status( status, E_PAR, "");
- fatal_directive_status( status, E_RLWAI, "");
- fatal_directive_status( status, E_TMOUT, "");
- fatal_directive_status( status, E_CTX, "");
-
- wup_tsk( ID );
- fatal_directive_status( status, E_OK, "");
- fatal_directive_status( status, E_ID, "");
- fatal_directive_status( status, E_NOEXS, "");
- fatal_directive_status( status, E_OACV, "");
- fatal_directive_status( status, E_OBJ, "");
- fatal_directive_status( status, E_QOVR, "");
- fatal_directive_status( status, EN_OBJNO, "");
- fatal_directive_status( status, EN_CTXID, "");
-
-
- can_tsk( INT, ID );
- fatal_directive_status( status, E_OK, "");
- fatal_directive_status( status, E_ID, "");
- fatal_directive_status( status, E_NOEXS, "");
- fatal_directive_status( status, E_OACV, "");
- fatal_directive_status( status, E_OBJ, "");
- fatal_directive_status( status, EN_OBJNO, "");
- fatal_directive_status( status, EN_CTXID, "");
- fatal_directive_status( status, EN_RPAR, "");
-#endif
-
- puts( "*** END OF ITRON TASK TEST 2 ***" );
- exit( 0 );
-}
diff --git a/testsuites/itrontests/itrontask02/itrontask02.doc b/testsuites/itrontests/itrontask02/itrontask02.doc
deleted file mode 100644
index 677399e1dc..0000000000
--- a/testsuites/itrontests/itrontask02/itrontask02.doc
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-This file describes the directives and concepts tested by this test set.
-This test forces and verifies error conditions for the task and task
-synchronization managers..
-
-test set name: itrontask02
-
-directives:
- chg_pri cre_tsk del_tsk dis_dsp ena_dsp exd_tsk ext_tsk
- frsm_tsk get_tid ref_tsk rel_wai rot_rdq rsm_tsk slp_tsk
- sta_tsk sus_tsk ter_tsk tslp_tsk wup_tsk
-
-concepts:
-
- a. Verification of error codes from all task and task synchronization
- commands.
-
-notes:
- Unimplementted functions are stubbed out and should be added when
- the functions are finished.
-
-output:
- Name of command and expected error code.
- Test asserts when an unexpected error code or an error does not occur.
diff --git a/testsuites/itrontests/itrontask02/itrontask02.scn b/testsuites/itrontests/itrontask02/itrontask02.scn
deleted file mode 100644
index a7a7aca31b..0000000000
--- a/testsuites/itrontests/itrontask02/itrontask02.scn
+++ /dev/null
@@ -1,80 +0,0 @@
-*** ITRON TASK TEST 2 ***
-Init - cre_tsk - Dormant Task
-Init - cre_tsk - Non-Dormant Task
-NON-DORMANT - Sleep for 2 minutes
-
-*** Create Task Errors ***
-Init - cre_tsk - access violation ( id less than -4) - E_OACV
-Init - cre_tsk - bad id (between 0 and -4) - E_ID
-Init - cre_tsk - cannot create TSK_SELF - E_ID
-Init - cre_tsk - invalid id; id already exists - E_OBJ
-Init - cre_tsk - tskatr is invalid - E_RSATR
-Init - cre_tsk - pk_ctsk is invalid - E_PAR
-Init - cre_tsk - itskpri is 0 - E_PAR
-Init - cre_tsk - itskpri is 257 - E_PAR
-Init - cre_tsk - stksz is invalid - E_PAR
-Init - cre_tsk - task is invalid - E_PAR
-
-*** Delete Task Errors ***
-Init - del_tsk - cannot delete TSK_SELF - E_OBJ
-Init - del_tsk - task is not DORMANT - E_OBJ
-Init - del_tsk - task does not exist - E_NOEXS
-Init - del_tsk - access violation ( id less than -4) - E_OACV
-Init - del_tsk - cannot delete TSK_SELF - E_OBJ
-Init - del_tsk - bad id (between 0 and -4) - E_ID
-
-*** Start Task Errors ***
-Init - sta_tsk - access violation ( id less than -4) - E_OACV
-Init - sta_tsk - bad id (between 0 and -4) - E_ID
-Init - sta_tsk - cannot start TSK_SELF - E_OBJ
-Init - sta_tsk - task is not DORMANT - E_OBJ
-Init - sta_tsk - task does not exist - E_NOEXS
-
-*** Terminate Other Task Errors ***
-Init - ter_tsk - bad id (between 0 and -4) - E_ID
-Init - ter_tsk - cannot terminate TSK_SELF (0) - E_OBJ
-Init - ter_tsk - task is not DORMANT - E_OBJ
-Init - ter_tsk - task does not exist - E_NOEXS
-Init - ter_tsk - access violation ( id less than -4) - E_OACV
-
-*** Change Priority Task Errors ***
-Init - chg_pri - bad id (between 0 and -4) - E_ID
-Init - chg_pri - task is DORMANT - E_OBJ
-Init - chg_pri - task does not exist - E_NOEXS
-Init - chg_pri - access violation ( id less than -4) - E_OACV
-Init - chg_pri - invalid priority - E_PAR
-
-*** Rotate Ready Queue Errors ***
-Init - rot_rdq - priority -1 - E_PAR
-Init - rot_rdq - priority 257 - E_PAR
-
-*** Reference Task Status Errors ***
-Init - ref_tsk - bad id (between 0 and -4) - E_ID
-Init - ref_tsk - task does not exist - E_NOEXS
-Init - ref_tsk - access violation ( id less than -4) - E_OACV
-Init - ref_tsk - packet address is bad - E_PAR
-
-*** Suspend Task Errors ***
-Init - sus_tsk - access violation ( id less than -4) - E_OACV
-Init - sus_tsk - bad id (between 0 and -4) - E_ID
-Init - sus_tsk - cannot suspend SELF - E_OBJ
-Init - sus_tsk - task does not exist - E_NOEXS
-
-*** Resume Task Errors ***
-Init - rsm_tsk - access violation ( id less than -4) - E_OACV
-Init - rsm_tsk - bad id (between 0 and -4) - E_ID
-Init - rsm_tsk - cannot resume SELF - E_OBJ
-Init - rsm_tsk - task is DORMANT - E_OBJ
-Init - rsm_tsk - task is NON_DORMANT not suspended - E_OK
-Init - rsm_tsk - task does not exist - E_NOEXS
-
-*** Forcibly Resume Task Errors ***
-Init - frsm_tsk - access violation ( id less than -4) - E_OACV
-Init - frsm_tsk - bad id (between 0 and -4) - E_ID
-Init - frsm_tsk - cannot forcibly resume SELF - E_OBJ
-Init - frsm_tsk - task is DORMANT - E_OBJ
-Init - frsm_tsk - task does not exist - E_NOEXS
-Init - frsm_tsk - task is NON_DORMANT not suspended - E_OK
-
-*** END OF ITRON TASK TEST 2 ***
-
diff --git a/testsuites/itrontests/itrontask02/system.h b/testsuites/itrontests/itrontask02/system.h
deleted file mode 100644
index df868d6c48..0000000000
--- a/testsuites/itrontests/itrontask02/system.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-#include <itron.h>
-
-/* functions */
-
-void ITRON_Init( void );
-void Dormant_task();
-void Non_Dormant_task();
-
-/* configuration information */
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_ITRON_INIT_TASK_TABLE
-
-#include <confdefs.h>
-
-/* global variables */
-
-#define DORMANT_TASK_ID 2
-#define NON_DORMANT_TASK_ID 3
-
-TEST_EXTERN rtems_id Global_variable; /* example global variable */
-
-/* end of include file */
-
-
-
-
-
diff --git a/testsuites/itrontests/itrontask03/Makefile.am b/testsuites/itrontests/itrontask03/Makefile.am
deleted file mode 100644
index 3d1751e714..0000000000
--- a/testsuites/itrontests/itrontask03/Makefile.am
+++ /dev/null
@@ -1,42 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = itrontask03
-PGM = ${ARCH}/$(TEST).exe
-
-MANAGERS = all
-
-C_FILES = init.c preempt.c task1.c task2.c task3.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/itrontests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/itrontests/itrontask03/init.c b/testsuites/itrontests/itrontask03/init.c
deleted file mode 100644
index 503a776a41..0000000000
--- a/testsuites/itrontests/itrontask03/init.c
+++ /dev/null
@@ -1,144 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is called from init_exec and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-#include <stdio.h>
-#include <assert.h>
-
-void ITRON_Init( void )
-{
- ER status;
- T_CTSK pk_ctsk;
- T_RTSK pk_rtsk;
-
- pk_ctsk.exinf = NULL;
- pk_ctsk.tskatr = TA_HLNG;
- pk_ctsk.stksz = RTEMS_MINIMUM_STACK_SIZE;
- pk_ctsk.itskpri = PREEMPT_PRIORITY;
- pk_ctsk.task = Preempt_task;
-
- puts( "\n\n*** ITRON TASK TEST 3 ***" );
-
- /*
- * Create and start the Preempt task the first time.
- * Verify that it is dormant when it comes back.
- */
-
- puts( "INIT - Create and Start PREEMPT" );
- status = chg_pri( TSK_SELF, (PREEMPT_PRIORITY+2) );
- directive_failed( status, "chg_pri of SELF" );
-
- status = cre_tsk( PREEMPT_TASK_ID, &pk_ctsk );
- directive_failed( status, "cre_tsk of RTEMS_PREEMPT" );
-
- status = sta_tsk( PREEMPT_TASK_ID, 0 );
- directive_failed( status, "sta_tsk of RTEMS_PREEMPT" );
- puts( "INIT - rot_rdq - no tasks at this priority" );
- status = rot_rdq( 1 );
- directive_failed( status, "rot_rdq" );
-
- puts( "INIT - ref_tsk PREEMPT - Validate DORMANT STATE" );
- status = ref_tsk( &pk_rtsk, PREEMPT_TASK_ID );
- directive_failed( status, "INIT - ref_tsk of RTEMS_PREEMPT");
- fatal_directive_status(pk_rtsk.tskstat,TTS_DMT,"tskstat of PREEMPT");
-
- /*
- * Restart the Preempt Task.
- */
-
- status = sta_tsk( PREEMPT_TASK_ID, 0 );
- directive_failed( status, "sta_tsk of RTEMS_PREEMPT" );
- puts( "INIT - rot_rdq - yielding processor" );
- status = rot_rdq( 1 );
- directive_failed( status, "rot_rdq" );
- puts( "INIT - ref_tsk PREEMPT - Validate no longer exists" );
- status = ref_tsk( &pk_rtsk, PREEMPT_TASK_ID );
- fatal_directive_status( status, E_NOEXS, "tskstat of PREEMPT");
- status = chg_pri( TSK_SELF, PREEMPT_PRIORITY );
- directive_failed( status, "chg_pri of SELF" );
-
- /*
- * XXX
- */
-
- pk_ctsk.itskpri = 3;
- pk_ctsk.task = Task_1;
- status = cre_tsk( TA1_ID, &pk_ctsk );
- directive_failed( status, "cre_tsk of TA1" );
-
- pk_ctsk.task = Task_2;
- status = cre_tsk( TA2_ID, &pk_ctsk );
- directive_failed( status, "cre_tsk of TA2" );
-
- pk_ctsk.task = Task_3;
- status = cre_tsk( TA3_ID, &pk_ctsk );
- directive_failed( status, "cre_tsk of TA3" );
-
- status = sta_tsk( TA1_ID, 0 );
- directive_failed( status, "sta_tsk of TA1" );
- status = sta_tsk( TA2_ID, 0 );
- directive_failed( status, "sta_tsk of TA2" );
- status = sta_tsk( TA3_ID, 0 );
- directive_failed( status, "sta_tsk of TA3" );
-
- status = ref_tsk( &pk_rtsk, TA1_ID);
- directive_failed( status, "INIT - ref_tsk of TA1");
- fatal_directive_status( pk_rtsk.tskstat, TTS_RDY , "tskstat of TA1");
-
- puts( "INIT - suspending TA2 while middle task on a ready chain" );
- status = sus_tsk( TA2_ID );
- directive_failed( status, "sus_tsk of TA2" );
- status = ref_tsk( &pk_rtsk, TA2_ID);
- directive_failed( status, "INIT - ref_tsk of TA2");
- fatal_directive_status( pk_rtsk.tskstat, TTS_SUS, "tskstat of TA2");
-
- status = ter_tsk( TA1_ID );
- directive_failed( status, "ter_tsk of TA1" );
- status = del_tsk( TA1_ID );
- directive_failed( status, "del_tsk of TA1" );
- status = ter_tsk( TA2_ID );
- directive_failed( status, "ter_tsk of TA2" );
- status = ter_tsk( TA3_ID );
- directive_failed( status, "ter_tsk of TA3" );
-
- pk_ctsk.itskpri = 1;
- pk_ctsk.task = Task_1;
- status = cre_tsk( TA1_ID, &pk_ctsk );
- directive_failed( status, "cre_tsk of TA1 at priority 1" );
-
- status = sta_tsk( TA1_ID, 0 );
- directive_failed( status, "sta_tsk of TA1" );
- status = sta_tsk( TA2_ID, 0 );
- directive_failed( status, "sta_tsk of TA2" );
- status = sta_tsk( TA3_ID, 0 );
- directive_failed( status, "sta_tsk of TA3" );
-
- exd_tsk();
- assert(0);
-}
-
-
-
-
-
-
diff --git a/testsuites/itrontests/itrontask03/itrontask03.doc b/testsuites/itrontests/itrontask03/itrontask03.doc
deleted file mode 100644
index 0382de6f1f..0000000000
--- a/testsuites/itrontests/itrontask03/itrontask03.doc
+++ /dev/null
@@ -1,54 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-This file describes the directives and concepts tested by this test set.
-This test is based upon the test in sp0.
-
-test set name: itrontask03
-
-directives:
- chg_pri cre_tsk del_tsk exd_tsk rot_rdq sta_tsk sus_tsk ter_tsk
-
-concepts: XXX - Verify
-
- a. verifies rot_rdq can be used by equal priority tasks to correctly yeild the processor
-
- b. Verifies sus_tsk suspends another task.
-
- c. Verifies rot_rdq with a yeild process response.
-
- a. Verifies that a task can delete another task and also delete itself.
-
- b. Verifies that memory is freed back to the heap correctly.
-
- c. Verifies that TCBs are freed back to the inactive chain correctly.
-
- d. Verifies that a task can get the task identification number of
- another task.
-
- e. Verifies the _Set_state routine where the task is not READY.
-
- f. Verifies the break statement in the _Block_activate routine.
-
- g. Verifies the while loop in the _Prev_tcb routine.
-
-notes:
-
- rtems_wake_after calls should be replaced with itron calls when
- the time functionality is added.
-
-output:
-
-
-
-
-
-
diff --git a/testsuites/itrontests/itrontask03/itrontask03.scn b/testsuites/itrontests/itrontask03/itrontask03.scn
deleted file mode 100644
index f933bf7161..0000000000
--- a/testsuites/itrontests/itrontask03/itrontask03.scn
+++ /dev/null
@@ -1,21 +0,0 @@
-*** ITRON TASK TEST 3 ***
-INIT - Create and Start PREEMPT
-PREEMPT - ref_tsk validation
-PREEMPT - chg_pri increment priority
-PREEMPT - ext_tsk - going to DORMANT state
-INIT - rot_rdq - no tasks at this priority
-INIT - ref_tsk PREEMPT - Validate DORMANT STATE
-PREEMPT - ref_tsk validation
-PREEMPT - exd_tsk - Exit and Delete task
-INIT - rot_rdq - yielding processor
-INIT - ref_tsk PREEMPT - Validate no longer exists
-INIT - suspending TA2 while middle task on a ready chain
-TA1 - rtems_task_wake_after - sleep 1 second
-TA2 - rtems_task_wake_after - sleep 1 minute
-TA3 - rtems_task_wake_after - sleep 5 seconds
-TA1 - chg_pri - set TA3's priority to 2
-TA1 - sus_tsk - suspend TA2
-TA1 - - delete TA2
-TA1 - rtems_task_wake_after - sleep for 5 seconds
-TA3 - exd_tsk - exit and delete self
-*** ITRON TASK TEST 3 ***
diff --git a/testsuites/itrontests/itrontask03/preempt.c b/testsuites/itrontests/itrontask03/preempt.c
deleted file mode 100644
index 7c2bafbee8..0000000000
--- a/testsuites/itrontests/itrontask03/preempt.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/* Preempt_task
- *
- * This routine serves as a test task. It verifies the task manager.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <assert.h>
-#include "system.h"
-
-int Preempt_task_Count;
-
-void Preempt_task()
-{
- ER status;
- T_RTSK pk_rtsk;
-
- puts( "PREEMPT - ref_tsk validation" );
- status = ref_tsk( &pk_rtsk, PREEMPT_TASK_ID );
- fatal_directive_status( status, E_OK , "ref_tsk of PREEMPT");
- assert( pk_rtsk.tskpri == PREEMPT_PRIORITY );
- assert( pk_rtsk.itskpri == PREEMPT_PRIORITY );
- assert( pk_rtsk.task == Preempt_task );
- assert( pk_rtsk.stksz >= RTEMS_MINIMUM_STACK_SIZE );
- assert( pk_rtsk.tskstat == (TTS_RUN | TTS_RDY) );
-
- if ( Preempt_task_Count == 0 ) {
- Preempt_task_Count ++;
- puts( "PREEMPT - chg_pri increment priority ");
- status = chg_pri( PREEMPT_TASK_ID, (PREEMPT_PRIORITY+1) );
- directive_failed( status, "chg_pri" );
- puts( "PREEMPT - ext_tsk - going to DORMANT state" );
- ext_tsk( );
- assert( 0 );
- } else {
- Preempt_task_Count ++;
- puts( "PREEMPT - exd_tsk - Exit and Delete task" );
- exd_tsk( );
- assert( 0 );
- }
-}
-
diff --git a/testsuites/itrontests/itrontask03/system.h b/testsuites/itrontests/itrontask03/system.h
deleted file mode 100644
index 3f7a585bb2..0000000000
--- a/testsuites/itrontests/itrontask03/system.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-#include <itron.h>
-
-/* functions */
-
-void ITRON_Init( void );
-void Preempt_task();
-void Task_1();
-void Task_2();
-void Task_3();
-
-/* configuration information */
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-#define CONFIGURE_ITRON_INIT_TASK_TABLE
-
-#include <confdefs.h>
-
-/* global variables */
-
-#define PREEMPT_TASK_ID 2
-#define TA1_ID 3
-#define TA2_ID 4
-#define TA3_ID 5
-
-
-#define PREEMPT_PRIORITY 1
-TEST_EXTERN rtems_id Global_variable; /* example global variable */
-
-/* end of include file */
diff --git a/testsuites/itrontests/itrontask03/task1.c b/testsuites/itrontests/itrontask03/task1.c
deleted file mode 100644
index 5247db714b..0000000000
--- a/testsuites/itrontests/itrontask03/task1.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/* Task_1
- *
- * This routine serves as a test task. It verifies the task manager.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-void Task_1()
-{
- ER status;
-
- /*
- * XXX - Change to itron routine.
- */
-
- puts( "TA1 - rtems_task_wake_after - sleep 1 second" );
- status = rtems_task_wake_after( 1*TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
-
- status = chg_pri( TA3_ID , 2 );
- directive_failed( status, "chg_pri" );
-
- puts( "TA1 - chg_pri - set TA3's priority to 2" );
-
- puts( "TA1 - sus_tsk - suspend TA2" );
- status = sus_tsk( TA2_ID );
- directive_failed( status, "sus_tsk of TA2" );
-
- puts( "TA1 - - delete TA2" );
- status = ter_tsk( TA2_ID );
- directive_failed( status, "ter_tsk of TA2" );
-
- /*
- * XXX - Change to itron routine.
- */
-
- puts( "TA1 - rtems_task_wake_after - sleep for 5 seconds" );
- status = rtems_task_wake_after( 5*TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
-
- puts( "*** ITRON TASK TEST 3 ***" );
- exit( 0 );
-}
diff --git a/testsuites/itrontests/itrontask03/task2.c b/testsuites/itrontests/itrontask03/task2.c
deleted file mode 100644
index b85bc527c4..0000000000
--- a/testsuites/itrontests/itrontask03/task2.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Task_2
- *
- * This routine serves as a test task. It sleeps for 1 minute but
- * does not expect to wake up. Task 1 should suspend then delete it
- * so that it appears to never wake up.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-void Task_2()
-{
- rtems_status_code status;
-
- puts( "TA2 - rtems_task_wake_after - sleep 1 minute" );
- status = rtems_task_wake_after( 60*TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after in TA2" );
-}
diff --git a/testsuites/itrontests/itrontask03/task3.c b/testsuites/itrontests/itrontask03/task3.c
deleted file mode 100644
index 05b92ec280..0000000000
--- a/testsuites/itrontests/itrontask03/task3.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Task_3
- *
- * This routine serves as a test task. It simply sleeps for 5 seconds
- * and then deletes itself.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-void Task_3()
-{
- rtems_status_code status;
-
- /*
- * XXX - Convert Later.
- */
-
- puts( "TA3 - rtems_task_wake_after - sleep 5 seconds" );
- status = rtems_task_wake_after( 5*TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after in TA3" );
-
-
- puts( "TA3 - exd_tsk - exit and delete self" );
- exd_tsk();
- directive_failed( 0, "exd_tsk" );
-}
diff --git a/testsuites/itrontests/itrontask04/Makefile.am b/testsuites/itrontests/itrontask04/Makefile.am
deleted file mode 100644
index f4713a718d..0000000000
--- a/testsuites/itrontests/itrontask04/Makefile.am
+++ /dev/null
@@ -1,42 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = itrontask04
-PGM = ${ARCH}/$(TEST).exe
-
-MANAGERS = all
-
-C_FILES = init.c task1.c task2.c task3.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/itrontests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/itrontests/itrontask04/init.c b/testsuites/itrontests/itrontask04/init.c
deleted file mode 100644
index 56d251d15c..0000000000
--- a/testsuites/itrontests/itrontask04/init.c
+++ /dev/null
@@ -1,93 +0,0 @@
- /* Init
- *
- * This routine is the initialization task for this test program.
- * It is called from init_exec and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-#include <stdio.h>
-
-void ITRON_Init( void )
-{
- ER status;
- T_CTSK pk_ctsk;
-
- puts( "\n\n*** ITRON TASK TEST 4 ***" );
-
- status = chg_pri( 0, 20 );
- directive_failed( status, "chg_pri to 20" );
-
- pk_ctsk.exinf = NULL;
- pk_ctsk.tskatr = TA_HLNG;
- pk_ctsk.stksz = RTEMS_MINIMUM_STACK_SIZE;
- pk_ctsk.itskpri = 2;
-
- pk_ctsk.task = Task_1;
- status = cre_tsk( TA1_ID, &pk_ctsk );
- directive_failed( status, "cre_tsk of TA1" );
-
- pk_ctsk.task = Task_2;
- status = cre_tsk( TA2_ID, &pk_ctsk );
- directive_failed( status, "cre_tsk of TA2" );
-
- pk_ctsk.itskpri = 1;
- pk_ctsk.task = Task_3;
- status = cre_tsk( TA3_ID, &pk_ctsk );
- directive_failed( status, "cre_tsk of TA3" );
-
- puts("INIT - dis_dsp while starting tasks");
- status = dis_dsp( );
-
- /* dispatching disabled */
-
- directive_failed_with_level( status, "dis_dsp from ITRON_Init", 1 );
- status = sta_tsk( TA1_ID, 0 );
- directive_failed_with_level( status, "sta_tsk of TA1", 1 );
- status = sta_tsk( TA2_ID, 0 );
- directive_failed_with_level( status, "sta_tsk of TA2", 1 );
- status = sta_tsk( TA3_ID, 0 );
- directive_failed_with_level( status, "sta_tsk of TA3", 1 );
-
- puts( "INIT - suspending TA2 3 times" );
- status = sus_tsk( TA2_ID );
- directive_failed_with_level( status, "sus_tsk of TA2", 1 );
- status = sus_tsk( TA2_ID );
- directive_failed_with_level( status, "sus_tsk of TA2", 1 );
- status = sus_tsk( TA2_ID );
- directive_failed_with_level( status, "sus_tsk of TA2", 1 );
-
- puts("INIT - ena_dsp while starting tasks");
- status = ena_dsp( );
-
- /* dispatching enabled again */
-
- puts( "INIT - suspending TA1 3 times" );
- status = sus_tsk( TA1_ID );
- directive_failed( status, "sus_tsk of TA2" );
- status = sus_tsk( TA1_ID );
- directive_failed( status, "sus_tsk of TA2" );
- status = sus_tsk( TA1_ID );
- directive_failed( status, "sus_tsk of TA2" );
-
- puts("INIT - exd_tsk");
- exd_tsk();
- directive_failed( 0, "exd_tsk" );
-}
-
diff --git a/testsuites/itrontests/itrontask04/itrontask04.doc b/testsuites/itrontests/itrontask04/itrontask04.doc
deleted file mode 100644
index 7119c520f8..0000000000
--- a/testsuites/itrontests/itrontask04/itrontask04.doc
+++ /dev/null
@@ -1,49 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: itrontask04
-
-directives:
- chg_pri cre_tsk dis_dsp ena_dsp exd_tsk frsm_tsk rot_rdq rsm_tsk
- sta_tsk sus_tsk
-
-concepts:
-
- a. This test check task suspend and resume functionality.
-
- b. Verifies the suspend count works correctly.
-
- c. Verifies the forced resume works correctly
-
- d. Verifies the rotate ready queue works correctly
-
- e. Verifies a task called with rtems suspend can be resumed
- with an itron resume call. ( XXX - May not be necessary. )
-
- f. verifies rot_rdq can be used by non-equal priority tasks to correctly rotate ready queue.
-
- g. Verifies enable dispatch and disable dispatch work.
-
-notes:
-
- This verision of ITRON does not provide a way for a task to
- suspend itself (only another task can suspend it). Therefore,
- the test calls rtems_task_suspend to suspend it.
-
- rtems_task_wake_after calls should be replaced with itron call
- when the ITRON functionality is finished.
-
-output:
-
- XXX - Verify the output messages on this test. It looks like
- the suspend count doesn't look correct. ??? Nov 10, 99
diff --git a/testsuites/itrontests/itrontask04/itrontask04.scn b/testsuites/itrontests/itrontask04/itrontask04.scn
deleted file mode 100644
index 76959b88c0..0000000000
--- a/testsuites/itrontests/itrontask04/itrontask04.scn
+++ /dev/null
@@ -1,35 +0,0 @@
-*** ITRON TASK TEST 4 ***
-INIT - dis_dsp while starting tasks
-INIT - suspending TA2 3 times
-INIT - ena_dsp while starting tasks
-TA3 - frsm_tsk TA1
-TA3 - rsm_tsk TA2
-TA3 - rot_rdq priority 2 queue
-TA3 - rtems_task_wake_after - sleep 1 second
-TA2 - rtems_task_suspend RTEMS_SELF
-INIT - suspending TA1 3 times
-INIT - exd_tsk
-TA3 - frsm_tsk TA1
-TA3 - rsm_tsk TA2
-TA3 - rot_rdq priority 2 queue
-TA3 - rtems_task_wake_after - sleep 1 second
-TA2 - rtems_task_suspend RTEMS_SELF
-TA3 - frsm_tsk TA1
-TA3 - rsm_tsk TA2
-TA3 - rot_rdq priority 2 queue
-TA3 - rtems_task_wake_after - sleep 1 second
-TA2 - rtems_task_suspend RTEMS_SELF
-TA2 - rtems_task_suspend RTEMS_SELF
-TA3 - frsm_tsk TA1
-TA3 - rsm_tsk TA2
-TA3 - rot_rdq priority 2 queue
-TA3 - rtems_task_wake_after - sleep 1 second
-TA2 - rtems_task_suspend RTEMS_SELF
-TA2 - rtems_task_suspend RTEMS_SELF
-TA3 - frsm_tsk TA1
-TA3 - rsm_tsk TA2
-TA3 - rot_rdq priority 2 queue
-TA3 - rtems_task_wake_after - sleep 1 second
-TA2 - rtems_task_suspend RTEMS_SELF
-TA2 - rtems_task_suspend RTEMS_SELF
-*** ITRON TASK TEST 4 ***
diff --git a/testsuites/itrontests/itrontask04/system.h b/testsuites/itrontests/itrontask04/system.h
deleted file mode 100644
index f9cc60958f..0000000000
--- a/testsuites/itrontests/itrontask04/system.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-#include <itron.h>
-
-/* functions */
-
-void ITRON_Init( void );
-void Preempt_task();
-void Task_1();
-void Task_2();
-void Task_3();
-
-/* configuration information */
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-#define CONFIGURE_ITRON_INIT_TASK_TABLE
-
-#include <confdefs.h>
-
-/* global variables */
-
-#define PREEMPT_TASK_ID 2
-#define TA1_ID 3
-#define TA2_ID 4
-#define TA3_ID 5
-
-TEST_EXTERN rtems_id Global_variable; /* example global variable */
-
-/* end of include file */
diff --git a/testsuites/itrontests/itrontask04/task1.c b/testsuites/itrontests/itrontask04/task1.c
deleted file mode 100644
index ac7f9cc49b..0000000000
--- a/testsuites/itrontests/itrontask04/task1.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/* Task_1
- *
- * This routine serves as a test task. It verifies the task manager.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-/*
- * XXX - This test requires tasks to suspend self, yet ITRON defines
- * this as an error.
- */
-
-void Task_1()
-{
- rtems_status_code status;
-
- while (1) {
-
- puts( "TA2 - rtems_task_suspend RTEMS_SELF" );
- status = rtems_task_suspend( RTEMS_SELF );
- directive_failed( status, "TA2 rtems_task_suspend RTEMS_SELF" );
-
- }
-}
-
-
-
-
-
-
diff --git a/testsuites/itrontests/itrontask04/task2.c b/testsuites/itrontests/itrontask04/task2.c
deleted file mode 100644
index f47225dba6..0000000000
--- a/testsuites/itrontests/itrontask04/task2.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/* Task_2
- *
- * This routine serves as a test task. It sleeps for 1 minute but
- * does not expect to wake up. Task 1 should suspend then delete it
- * so that it appears to never wake up.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-/*
- * XXX - This test requires tasks to suspend self, yet ITRON defines
- * this as an error.
- */
-
-void Task_2()
-{
- rtems_status_code status;
-
- while (1) {
-
- puts( "TA2 - rtems_task_suspend RTEMS_SELF" );
- status = rtems_task_suspend( RTEMS_SELF );
- directive_failed( status, "TA2 rtems_task_suspend RTEMS_SELF" );
-
- }
-}
diff --git a/testsuites/itrontests/itrontask04/task3.c b/testsuites/itrontests/itrontask04/task3.c
deleted file mode 100644
index 4157eccb5f..0000000000
--- a/testsuites/itrontests/itrontask04/task3.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/* Task_3
- *
- * This routine serves as a test task. It simply sleeps for 5 seconds
- * and then deletes itself.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-void Task_3()
-{
- rtems_status_code status;
- int i;
-
- for(i=0; i<5; i++) {
- puts("TA3 - frsm_tsk TA1");
- status = frsm_tsk( TA1_ID );
- directive_failed( status, "TA3 - frsm_tsk TA1" );
-
- puts("TA3 - rsm_tsk TA2");
- status = rsm_tsk( TA2_ID );
- directive_failed( status, "TA3 - rsm_tsk TA2" );
-
- puts( "TA3 - rot_rdq priority 2 queue");
- status = rot_rdq( 2 );
- directive_failed( status, "rot_rdq for 2" );
-
- /*
- * XXX - Convert Later.
- */
-
- puts( "TA3 - rtems_task_wake_after - sleep 1 second" );
- status = rtems_task_wake_after( TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after in TA3" );
- }
-
- puts( "*** ITRON TASK TEST 4 ***" );
- exit( 0 );
-}
-
diff --git a/testsuites/itrontests/itrontests.am b/testsuites/itrontests/itrontests.am
deleted file mode 100644
index 25e96d366b..0000000000
--- a/testsuites/itrontests/itrontests.am
+++ /dev/null
@@ -1,23 +0,0 @@
-project_bspdir=$(PROJECT_ROOT)/@RTEMS_BSP@
-
-$(project_bspdir)/tests:
- @$(mkinstalldirs) $@
-
-$(project_bspdir)/tests/$(TEST)$(LIB_VARIANT).exe: $(PGM)
- $(INSTALL_PROGRAM) $< $@
-
-$(project_bspdir)/tests/screens:
- @$(mkinstalldirs) $@
-
-$(project_bspdir)/tests/screens/itrontests:
- @$(mkinstalldirs) $@
-
-$(project_bspdir)/tests/screens/itrontests/$(TEST).scn: $(TEST).scn
- $(INSTALL_DATA) $< $@
-
-TMPINSTALL_FILES += \
-$(project_bspdir)/tests \
-$(project_bspdir)/tests/$(TEST)$(LIB_VARIANT).exe \
-$(project_bspdir)/tests/screens \
-$(project_bspdir)/tests/screens/itrontests \
-$(project_bspdir)/tests/screens/itrontests/$(TEST).scn
diff --git a/testsuites/itrontests/itrontime01/Makefile.am b/testsuites/itrontests/itrontime01/Makefile.am
deleted file mode 100644
index 03d4ea878c..0000000000
--- a/testsuites/itrontests/itrontime01/Makefile.am
+++ /dev/null
@@ -1,42 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = itrontime01
-PGM = ${ARCH}/$(TEST).exe
-
-MANAGERS = all
-
-C_FILES = init.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/itrontests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/itrontests/itrontime01/init.c b/testsuites/itrontests/itrontime01/init.c
deleted file mode 100644
index 2b0e625fdd..0000000000
--- a/testsuites/itrontests/itrontime01/init.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is called from init_exec and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-#include <stdio.h>
-#include <time.h>
-
-/*
- * get the current time in second since epoch (1970), change it since 1985,
- * compute the time in millisecond
- *
- */
-
-int time_sec_epoch( void ) {
-
-int s_time,t_time,r_time;
-long m_sec;
-
-t_time = time(NULL);
-s_time = (1985-1970)*365*24*60*60;
-r_time = t_time - s_time;
-m_sec = r_time*1000;
-
-printf( "Time from 1970: %d\n", t_time );
-printf( "Time between 1970 and 1985: %d\n", s_time );
-printf( "Time from 1985: %d\n", r_time );
-printf("milliseconds: %ld\n",m_sec);
-
-return 0;
-}
-
-
-
-void ITRON_Init( void )
-{
- printf( "\n\n*** ITRON TIME TEST 01 ***\n" );
- printf( "doesn't test anything yet\n" );
- printf( "*** END OF ITRON TIME TEST 01 ***\n" );
- exit( 0 );
-}
-
-
diff --git a/testsuites/itrontests/itrontime01/itrontime01.doc b/testsuites/itrontests/itrontime01/itrontime01.doc
deleted file mode 100644
index e69de29bb2..0000000000
--- a/testsuites/itrontests/itrontime01/itrontime01.doc
+++ /dev/null
diff --git a/testsuites/itrontests/itrontime01/itrontime01.scn b/testsuites/itrontests/itrontime01/itrontime01.scn
deleted file mode 100644
index e69de29bb2..0000000000
--- a/testsuites/itrontests/itrontime01/itrontime01.scn
+++ /dev/null
diff --git a/testsuites/itrontests/itrontime01/system.h b/testsuites/itrontests/itrontime01/system.h
deleted file mode 100644
index d400584887..0000000000
--- a/testsuites/itrontests/itrontime01/system.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-#include <itron.h>
-
-/* functions */
-
-void ITRON_Init( void );
-
-/* configuration information */
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-
-#define CONFIGURE_ITRON_INIT_TASK_TABLE
-
-#include <confdefs.h>
-
-/* global variables */
-
-TEST_EXTERN rtems_id Global_variable; /* example global variable */
-
-/* end of include file */
diff --git a/testsuites/libtests/Makefile.am b/testsuites/libtests/Makefile.am
deleted file mode 100644
index d60d6dae67..0000000000
--- a/testsuites/libtests/Makefile.am
+++ /dev/null
@@ -1,14 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-
-SUBDIRS = cpuuse malloctest putenvtest monitor rtmonuse stackchk termios \
- rtems++
-
-EXTRA_DIST = libtests.am
-
-include $(top_srcdir)/../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/libtests/README b/testsuites/libtests/README
deleted file mode 100644
index bc4b217832..0000000000
--- a/testsuites/libtests/README
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# $Id$
-#
-
-This directory contains tests for some of the items in
-the lib directories. The intent is to be able to
-verify the basic functionality of a library. For example,
-it is important to know that the stack checker successfully
-detects tasks which both stay within and exceed their
-stack limits.
diff --git a/testsuites/libtests/cpuuse/Makefile.am b/testsuites/libtests/cpuuse/Makefile.am
deleted file mode 100644
index e630c15cb1..0000000000
--- a/testsuites/libtests/cpuuse/Makefile.am
+++ /dev/null
@@ -1,41 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = cpuuse
-
-MANAGERS = io rate_monotonic
-
-C_FILES = init.c task1.c task2.c task3.c tswitch.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/libtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/libtests/cpuuse/cpuuse.scn b/testsuites/libtests/cpuuse/cpuuse.scn
deleted file mode 100644
index f104c0c482..0000000000
--- a/testsuites/libtests/cpuuse/cpuuse.scn
+++ /dev/null
@@ -1,24 +0,0 @@
-*** TEST 4 ***
-TA1 - 09:15:00 12/31/1988
-TA1 - rtems_task_suspend - on Task 2
-TA1 - rtems_task_suspend - on Task 3
-TA1 - killing time
-TA1 - rtems_task_resume - on Task 2
-TA1 - rtems_task_resume - on Task 3
-TA2 - 09:15:03 12/31/1988
-TA3 - 09:15:04 12/31/1988
-TA1 - 09:15:05 12/31/1988
-TA2 - 09:15:06 12/31/1988
-TA3 - 09:15:07 12/31/1988
-TA1 - 09:15:08 12/31/1988
-TA1 - rtems_task_mode - change mode to NO RTEMS_PREEMPT
-TA1 - 09:15:09 12/31/1988
-TA1 - 09:15:10 12/31/1988
-TA1 - 09:15:11 12/31/1988
-TA1 - 09:15:12 12/31/1988
-TA1 - 09:15:13 12/31/1988
-TA1 - 09:15:14 12/31/1988
-TA1 - rtems_task_mode - change mode to RTEMS_PREEMPT
-TA2 - 09:15:15 12/31/1988
-TA3 - 09:15:16 12/31/1988
-*** END OF TEST 4 ***
diff --git a/testsuites/libtests/cpuuse/init.c b/testsuites/libtests/cpuuse/init.c
deleted file mode 100644
index 3f7538ab92..0000000000
--- a/testsuites/libtests/cpuuse/init.c
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * This is a clone of sp04 which has been modified to use the cpu monitoring
- * library.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_extensions_table Extensions = {
- NULL, /* task create user extension */
- NULL, /* task start user extension */
- NULL, /* task restart user extension */
- NULL, /* task delete user extension */
- Task_switch, /* task switch user extension */
- NULL, /* task begin user extension */
- NULL, /* task exitted user extension */
- NULL /* fatal error user extension */
-};
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
- rtems_time_of_day time;
-
- puts( "\n\n*** CPU USAGE LIBRARY TEST ***" );
- build_time( &time, 12, 31, 1988, 9, 15, 0, 0 );
-
- status = rtems_clock_set( &time );
- directive_failed( status, "rtems_clock_set" );
-
- Extension_name[ 1 ] = rtems_build_name( 'E', 'X', 'T', ' ' );
-
- status = rtems_extension_create(
- Extension_name[ 1 ],
- &Extensions,
- &Extension_id[ 1 ]
- );
- directive_failed( status, "rtems_extension_create" );
-
- Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
- Task_name[ 2 ] = rtems_build_name( 'T', 'A', '2', ' ' );
- Task_name[ 3 ] = rtems_build_name( 'T', 'A', '3', ' ' );
-
- Run_count[ 1 ] = 0;
- Run_count[ 2 ] = 0;
- Run_count[ 3 ] = 0;
-
- status = rtems_task_create(
- Task_name[ 1 ],
- 1,
- RTEMS_MINIMUM_STACK_SIZE * 2,
- RTEMS_TIMESLICE,
- RTEMS_FLOATING_POINT,
- &Task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_create of TA1" );
-
- status = rtems_task_create(
- Task_name[ 2 ],
- 1,
- RTEMS_MINIMUM_STACK_SIZE * 2,
- RTEMS_TIMESLICE,
- RTEMS_FLOATING_POINT,
- &Task_id[ 2 ]
- );
- directive_failed( status, "rtems_task_create of TA2" );
-
- status = rtems_task_create(
- Task_name[ 3 ],
- 1,
- RTEMS_MINIMUM_STACK_SIZE * 2,
- RTEMS_TIMESLICE,
- RTEMS_FLOATING_POINT,
- &Task_id[ 3 ]
- );
- directive_failed( status, "rtems_task_create of TA3" );
-
- status = rtems_task_start( Task_id[ 1 ], Task_1, 0 );
- directive_failed( status, "rtems_task_start of TA1" );
-
- status = rtems_task_start( Task_id[ 2 ], Task_2, 0 );
- directive_failed( status, "rtems_task_start of TA2" );
-
- status = rtems_task_start( Task_id[ 3 ], Task_3, 0 );
- directive_failed( status, "rtems_task_start of TA3" );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
diff --git a/testsuites/libtests/cpuuse/system.h b/testsuites/libtests/cpuuse/system.h
deleted file mode 100644
index 83aa39f121..0000000000
--- a/testsuites/libtests/cpuuse/system.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_task Task_1(
- rtems_task_argument argument
-);
-
-rtems_task Task_2(
- rtems_task_argument argument
-);
-
-rtems_task Task_3(
- rtems_task_argument argument
-);
-
-void Task_switch(
- rtems_tcb *unused,
- rtems_tcb *heir
-);
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MAXIMUM_USER_EXTENSIONS 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 100
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#define CONFIGURE_EXTRA_TASK_STACKS (6 * RTEMS_MINIMUM_STACK_SIZE)
-
-#include <confdefs.h>
-
-/* global variables */
-
-TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
-
-TEST_EXTERN rtems_id Extension_id[ 4 ];
-TEST_EXTERN rtems_name Extension_name[ 4 ]; /* array of task names */
-
-/* array of task run counts */
-TEST_EXTERN volatile rtems_unsigned32 Run_count[ 4 ];
-
-/* end of include file */
diff --git a/testsuites/libtests/cpuuse/task1.c b/testsuites/libtests/cpuuse/task1.c
deleted file mode 100644
index 8819803f55..0000000000
--- a/testsuites/libtests/cpuuse/task1.c
+++ /dev/null
@@ -1,102 +0,0 @@
-/* Task_1
- *
- * This test serves as a test task. It verifies timeslicing activities
- * and tswitch extension processing.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task_1(
- rtems_task_argument argument
-)
-{
- rtems_unsigned32 seconds;
- rtems_unsigned32 old_seconds;
- rtems_mode previous_mode;
- rtems_time_of_day time;
- rtems_status_code status;
- rtems_unsigned32 start_time;
- rtems_unsigned32 end_time;
-
- puts( "TA1 - rtems_task_suspend - on Task 2" );
- status = rtems_task_suspend( Task_id[ 2 ] );
- directive_failed( status, "rtems_task_suspend of TA2" );
-
- puts( "TA1 - rtems_task_suspend - on Task 3" );
- status = rtems_task_suspend( Task_id[ 3 ] );
- directive_failed( status, "rtems_task_suspend of TA3" );
-
- status = rtems_clock_get( RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH, &start_time );
- directive_failed( status, "rtems_clock_get" );
-
- puts( "TA1 - killing time" );
-
- for ( ; ; ) {
- status = rtems_clock_get( RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH, &end_time );
- directive_failed( status, "rtems_clock_get" );
-
- if ( end_time > (start_time + 2) )
- break;
- }
-
- puts( "TA1 - rtems_task_resume - on Task 2" );
- status = rtems_task_resume( Task_id[ 2 ] );
- directive_failed( status, "rtems_task_resume of TA2" );
-
- puts( "TA1 - rtems_task_resume - on Task 3" );
- status = rtems_task_resume( Task_id[ 3 ] );
- directive_failed( status, "rtems_task_resume of TA3" );
-
- while ( FOREVER ) {
- if ( Run_count[ 1 ] == 3 ) {
- puts( "TA1 - rtems_task_mode - change mode to NO RTEMS_PREEMPT" );
-
- status = rtems_task_mode(
- RTEMS_NO_PREEMPT,
- RTEMS_PREEMPT_MASK,
- &previous_mode
- );
- directive_failed( status, "rtems_task_mode" );
-
- status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
- directive_failed( status, "rtems_clock_get" );
-
- old_seconds = time.second;
-
- for ( seconds = 0 ; seconds < 6 ; ) {
- status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
- directive_failed( status, "rtems_clock_get" );
-
- if ( time.second != old_seconds ) {
- old_seconds = time.second;
- seconds++;
- print_time( "TA1 - ", &time, "\n" );
- }
- }
-
- puts( "TA1 - rtems_task_mode - change mode to RTEMS_PREEMPT" );
- status = rtems_task_mode(
- RTEMS_PREEMPT,
- RTEMS_PREEMPT_MASK,
- &previous_mode
- );
- directive_failed( status, "rtems_task_mode" );
-
- while ( FOREVER );
- }
- }
-}
diff --git a/testsuites/libtests/cpuuse/task2.c b/testsuites/libtests/cpuuse/task2.c
deleted file mode 100644
index 5dbdda331d..0000000000
--- a/testsuites/libtests/cpuuse/task2.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Task_2
- *
- * This routine serves as a test task. It is just a CPU bound task
- * requiring timesliced operation.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task_2(
- rtems_task_argument argument
-)
-{
- while( FOREVER );
-}
diff --git a/testsuites/libtests/cpuuse/task3.c b/testsuites/libtests/cpuuse/task3.c
deleted file mode 100644
index 829f52820f..0000000000
--- a/testsuites/libtests/cpuuse/task3.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Task_3
- *
- * This routine serves as a test task. It is just a CPU bound task
- * requiring timesliced operation.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task_3(
- rtems_task_argument argument
-)
-{
- while( FOREVER );
-}
diff --git a/testsuites/libtests/cpuuse/tswitch.c b/testsuites/libtests/cpuuse/tswitch.c
deleted file mode 100644
index f083709497..0000000000
--- a/testsuites/libtests/cpuuse/tswitch.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/* Task_switch
- *
- * This routine is the tswitch user extension. It determines which
- * task is being switched to and displays a message indicating the
- * time and date that it gained control.
- *
- * Input parameters:
- * unused - pointer to currently running TCB
- * heir - pointer to heir TCB
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-#include <rtems/cpuuse.h>
-
-rtems_extension Task_switch(
- rtems_tcb *unused,
- rtems_tcb *heir
-)
-{
- rtems_unsigned32 index;
- rtems_time_of_day time;
- rtems_status_code status;
-
- index = task_number( heir->Object.id );
-
- switch( index ) {
- case 1:
- case 2:
- case 3:
- Run_count[ index ] += 1;
-
- status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
- directive_failed( status, "rtems_clock_get" );
-
- put_name( Task_name[ index ], FALSE );
- print_time( "- ", &time, "\n" );
-
- if ( time.second >= 16 ) {
- CPU_usage_Dump();
- puts( "*** END OF CPU USAGE LIBRARY TEST ***" );
- exit( 0 );
- }
- break;
-
- case 0:
- default:
- break;
- }
-}
diff --git a/testsuites/libtests/libtests.am b/testsuites/libtests/libtests.am
deleted file mode 100644
index 577bac9fd2..0000000000
--- a/testsuites/libtests/libtests.am
+++ /dev/null
@@ -1,11 +0,0 @@
-project_bspdir=$(PROJECT_ROOT)/@RTEMS_BSP@
-
-$(project_bspdir)/tests:
- @$(mkinstalldirs) $@
-
-$(project_bspdir)/tests/$(TEST)$(LIB_VARIANT).exe: $(PGM)
- $(INSTALL_PROGRAM) $< $@
-
-TMPINSTALL_FILES += \
-$(project_bspdir)/tests \
-$(project_bspdir)/tests/$(TEST)$(LIB_VARIANT).exe
diff --git a/testsuites/libtests/malloctest/Makefile.am b/testsuites/libtests/malloctest/Makefile.am
deleted file mode 100644
index 70ca6e7add..0000000000
--- a/testsuites/libtests/malloctest/Makefile.am
+++ /dev/null
@@ -1,41 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = malloctest
-
-MANAGERS = io
-
-C_FILES = init.c task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES =
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(CC_FILES) $(H_FILES) $(S_FILES)
-OBJS = $(C_O_FILES) $(CC_O_FILES) $(S_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/libtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/libtests/malloctest/init.c b/testsuites/libtests/malloctest/init.c
deleted file mode 100644
index 0744f11866..0000000000
--- a/testsuites/libtests/malloctest/init.c
+++ /dev/null
@@ -1,113 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is a user initialization task and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_time_of_day time;
- rtems_status_code status;
-
- puts( "\n\n*** MALLOC TEST ***" );
-
- build_time( &time, 12, 31, 1988, 9, 0, 0, 0 );
- status = rtems_clock_set( &time );
- directive_failed( status, "rtems_clock_set" );
-
- Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
- Task_name[ 2 ] = rtems_build_name( 'T', 'A', '2', ' ' );
- Task_name[ 3 ] = rtems_build_name( 'T', 'A', '3', ' ' );
- Task_name[ 4 ] = rtems_build_name( 'T', 'A', '4', ' ' );
- Task_name[ 5 ] = rtems_build_name( 'T', 'A', '5', ' ' );
-
- status = rtems_task_create(
- Task_name[ 1 ],
- 1,
- TASK_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_create of TA1" );
-
- status = rtems_task_create(
- Task_name[ 2 ],
- 1,
- TASK_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 2 ]
- );
- directive_failed( status, "rtems_task_create of TA2" );
-
- status = rtems_task_create(
- Task_name[ 3 ],
- 1,
- TASK_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 3 ]
- );
- directive_failed( status, "rtems_task_create of TA3" );
-
- status = rtems_task_create(
- Task_name[ 4 ],
- 1,
- TASK_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 4 ]
- );
- directive_failed( status, "rtems_task_create of TA4" );
-
- status = rtems_task_create(
- Task_name[ 5 ],
- 1,
- TASK_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 5 ]
- );
- directive_failed( status, "rtems_task_create of TA5" );
-
- status = rtems_task_start( Task_id[ 1 ], Task_1_through_5, 0 );
- directive_failed( status, "rtems_task_start of TA1" );
-
- status = rtems_task_start( Task_id[ 2 ], Task_1_through_5, 0 );
- directive_failed( status, "rtems_task_start of TA2" );
-
- status = rtems_task_start( Task_id[ 3 ], Task_1_through_5, 0 );
- directive_failed( status, "rtems_task_start of TA3" );
-
- status = rtems_task_start( Task_id[ 4 ], Task_1_through_5, 0 );
- directive_failed( status, "rtems_task_start of TA4" );
-
- status = rtems_task_start( Task_id[ 5 ], Task_1_through_5, 0 );
- directive_failed( status, "rtems_task_start of TA5" );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
diff --git a/testsuites/libtests/malloctest/system.h b/testsuites/libtests/malloctest/system.h
deleted file mode 100644
index 3f03aa5873..0000000000
--- a/testsuites/libtests/malloctest/system.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* macros */
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_task Task_1_through_5(
- rtems_task_argument argument
-);
-
-void blow_stack( void );
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define TASK_STACK_SIZE (RTEMS_MINIMUM_STACK_SIZE*3)
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* global variables */
-
-TEST_EXTERN rtems_id Task_id[ 6 ]; /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 6 ]; /* array of task names */
-
-/* end of include file */
diff --git a/testsuites/libtests/malloctest/task1.c b/testsuites/libtests/malloctest/task1.c
deleted file mode 100644
index 91b7e3e147..0000000000
--- a/testsuites/libtests/malloctest/task1.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/* task1.c
- *
- * This set of three tasks do some simple task switching for about
- * 15 seconds and then call a routine to "blow the stack".
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-#include <libcsupport.h> /* for malloc_dump, malloc_walk */
-#include <string.h> /* for memset */
-#include <stdlib.h>
-
-#define NUM_PASSES 100
-
-rtems_task Task_1_through_5(
- rtems_task_argument argument
-)
-{
- int i;
- unsigned int passes = 0;
- rtems_id tid;
- rtems_time_of_day time;
- rtems_status_code status;
- unsigned char *mem_ptr;
- int mem_amt;
-
- status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
- directive_failed( status, "rtems_task_ident" );
-
- while (TRUE)
- {
- if ( passes++ > NUM_PASSES ) {
- puts("*** END OF MALLOC TEST ***");
- exit(0);
- }
-
- status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
- directive_failed( status, "rtems_clock_get" );
-
- put_name( Task_name[ task_number( tid ) ], FALSE );
- print_time( " - rtems_clock_get - ", &time, "\n" );
-
- mem_amt = ((int)((float)rand()*1000.0/(float)RAND_MAX));
- while (!(mem_ptr = malloc ( mem_amt))) {
- printf("out of memory... trying again.\n");
- mem_amt = ((int)((float)rand()*1000.0/(float)RAND_MAX));
- }
- printf("mallocing %d bytes\n",mem_amt);
- memset( mem_ptr, mem_amt, mem_amt );
- malloc_dump();
- malloc_walk(1,FALSE);
- status = rtems_task_wake_after( task_number( tid ) * 1 * TICKS_PER_SECOND/4 );
- for (i=0; i < mem_amt; i++)
- {
- if ( mem_ptr[i] != (mem_amt & 0xff))
- {
- printf("failed %d, %d, 0x%x, 0x%x\n",i,mem_amt,mem_ptr[i],mem_amt&0xff);
- exit(1);
- }
- }
- directive_failed( status, "rtems_task_wake_after" );
- free( mem_ptr );
- }
-}
diff --git a/testsuites/libtests/monitor/Makefile.am b/testsuites/libtests/monitor/Makefile.am
deleted file mode 100644
index d73ca64e0f..0000000000
--- a/testsuites/libtests/monitor/Makefile.am
+++ /dev/null
@@ -1,42 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = monitor
-
-MANAGERS = dpmem event io msg mp part region sem signal timer rate_monotonic \
- ext
-
-C_FILES = init.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = scn
-DOCS = #$(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/libtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/libtests/monitor/init.c b/testsuites/libtests/monitor/init.c
deleted file mode 100644
index 2d62df856f..0000000000
--- a/testsuites/libtests/monitor/init.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * This is a simple test whose only purpose is to start the Monitor
- * task. The Monitor task can be used to obtain information about
- * a variety of RTEMS objects.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-#include <rtems/monitor.h>
-
-rtems_task_priority Priorities[6] = { 0, 1, 1, 3, 4, 5 };
-
-rtems_task Task_1_through_5(
- rtems_unsigned32 argument
-)
-{
- rtems_status_code status;
-
- for ( ; ; ) {
- status = rtems_task_wake_after( 100 );
- directive_failed( status, "rtems_task_wake_after" );
- }
-}
-
-
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_unsigned32 index;
- rtems_status_code status;
-
- puts( "\n\n*** MONITOR TASK TEST ***" );
-
- Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
- Task_name[ 2 ] = rtems_build_name( 'T', 'A', '2', ' ' );
- Task_name[ 3 ] = rtems_build_name( 'T', 'A', '3', ' ' );
- Task_name[ 4 ] = rtems_build_name( 'T', 'A', '4', ' ' );
- Task_name[ 5 ] = rtems_build_name( 'T', 'A', '5', ' ' );
-
- for ( index = 1 ; index <= 5 ; index++ ) {
- status = rtems_task_create(
- Task_name[ index ],
- Priorities[ index ],
- RTEMS_MINIMUM_STACK_SIZE * 4,
- RTEMS_DEFAULT_MODES,
- (index == 5) ? RTEMS_FLOATING_POINT : RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ index ]
- );
- directive_failed( status, "rtems_task_create loop" );
- }
-
- for ( index = 1 ; index <= 5 ; index++ ) {
- status = rtems_task_start( Task_id[ index ], Task_1_through_5, index );
- directive_failed( status, "rtems_task_start loop" );
- }
-
- rtems_monitor_init( 0 );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
diff --git a/testsuites/libtests/monitor/system.h b/testsuites/libtests/monitor/system.h
deleted file mode 100644
index 52280bb9a3..0000000000
--- a/testsuites/libtests/monitor/system.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* types */
-
-struct counters {
- rtems_unsigned32 count[6];
-};
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_task Task_1_through_5(
- rtems_task_argument argument
-);
-
-void Get_all_counters( void );
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_INIT_TASK_PRIORITY 10
-#define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_DEFAULT_MODES
-#define CONFIGURE_MAXIMUM_PERIODS 10
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-#define CONFIGURE_EXTRA_TASK_STACKS (3 * RTEMS_MINIMUM_STACK_SIZE)
-
-#include <confdefs.h>
-
-/* global variables */
-
-TEST_EXTERN rtems_id Task_id[ 6 ]; /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 6 ]; /* array of task names */
-
-/* end of include file */
diff --git a/testsuites/libtests/putenvtest/Makefile.am b/testsuites/libtests/putenvtest/Makefile.am
deleted file mode 100644
index 901cee10d0..0000000000
--- a/testsuites/libtests/putenvtest/Makefile.am
+++ /dev/null
@@ -1,41 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = putenvtest
-
-MANAGERS = io
-
-C_FILES = init.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES =
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES =
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(CC_FILES) $(H_FILES) $(S_FILES)
-OBJS = $(C_O_FILES) $(CC_O_FILES) $(S_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/libtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/libtests/putenvtest/init.c b/testsuites/libtests/putenvtest/init.c
deleted file mode 100644
index eb19d4af80..0000000000
--- a/testsuites/libtests/putenvtest/init.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is a user initialization task and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include <tmacros.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-/* putenv is beyond ANSI so prototype it here */
-int putenv(const char *string);
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define TASK_STACK_SIZE (RTEMS_MINIMUM_STACK_SIZE*3)
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- puts( "\n\n*** PUTENV/GETENV TEST ***" );
-
- puts( "putenv(\"FOO=BAR\") - expected to work" );
- putenv ("FOO=BAR");
- printf ("getenv(\"FOO\") ==> \"%s\"\n", getenv ("FOO"));
-
- puts( "*** END OF PUTENV/GETENV TEST ***" );
- exit(0);
-}
diff --git a/testsuites/libtests/rtems++/Init.cc b/testsuites/libtests/rtems++/Init.cc
deleted file mode 100644
index b1d14efa68..0000000000
--- a/testsuites/libtests/rtems++/Init.cc
+++ /dev/null
@@ -1,62 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1997
- * Objective Design Systems Ltd Pty (ODS)
- * All rights reserved (R) Objective Design Systems Ltd Pty
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "System.h"
-
-// make global so it lasts past the Init task's stack's life time
-Task1 task_1;
-
-rtems_task Init(rtems_task_argument )
-{
- puts( "\n\n*** RTEMS++ TEST ***" );
-
- printf( "INIT - Task.create() - " );
- task_1.create("TA1 ", 0, RTEMS_MINIMUM_STACK_SIZE);
- printf("%s\n", task_1.last_status_string());
-
- printf( "INIT - Task.create() - " );
- task_1.create("TA1 ", 10, RTEMS_MINIMUM_STACK_SIZE * 6);
- printf("%s\n", task_1.last_status_string());
-
- printf( "INIT - Task.create() - " );
- task_1.create("TA1 ", 10, RTEMS_MINIMUM_STACK_SIZE * 6);
- printf("%s\n", task_1.last_status_string());
-
- printf( "INIT - Task.restart() - " );
- task_1.restart(0);
- printf("%s\n", task_1.last_status_string());
-
- printf( "INIT - Task.start(0xDEADDEAD) - " );
- task_1.start(0xDEADDEAD);
- printf("%s\n", task_1.last_status_string());
-
- printf("INIT - Destroy it's self\n");
-
- // needs to be in C, no C++ object owns the Init task
- rtems_status_code status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
-
-
-
diff --git a/testsuites/libtests/rtems++/Makefile.am b/testsuites/libtests/rtems++/Makefile.am
deleted file mode 100644
index 58f6d25a40..0000000000
--- a/testsuites/libtests/rtems++/Makefile.am
+++ /dev/null
@@ -1,47 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = rtems++
-
-MANAGERS = event io msg sem signal timer rate_monotonic
-
-CC_FILES = Init.cc Task1.cc Task2.cc Task3.cc
-CC_O_FILES = $(CC_FILES:%.cc=${ARCH}/%.o)
-
-H_FILES = System.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = scn doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(CC_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/libtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-LD_LIBS += $(CPLUS_LD_LIBS)
-
-if HAS_CXX
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-else
-all-local:
-endif
-
-EXTRA_DIST = $(CC_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/libtests/rtems++/System.h b/testsuites/libtests/rtems++/System.h
deleted file mode 100644
index f849e53503..0000000000
--- a/testsuites/libtests/rtems++/System.h
+++ /dev/null
@@ -1,136 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-#include <rtems++/rtemsEvent.h>
-#include <rtems++/rtemsMessageQueue.h>
-#include <rtems++/rtemsTask.h>
-#include <rtems++/rtemsTaskMode.h>
-
-/* functions */
-
-extern "C"
-{
- rtems_task Init(
- rtems_task_argument argument
- );
-}
-
-rtems_timer_service_routine Delayed_routine(
- rtems_id ignored_id,
- void *ignored_address
-);
-
-class Task1
- : public rtemsTask
-{
- void print_mode(rtems_mode mode, rtems_mode mask);
-
- void screen1(void);
- void screen2(void);
- void screen3(void);
- void screen4(void);
- void screen5(void);
- void screen6(void);
-
-protected:
- virtual void body(rtems_task_argument argument);
-
-public:
-};
-
-class Task2
- : public rtemsTask
-{
- void screen4(void);
-
-protected:
- virtual void body(rtems_task_argument argument);
-
-public:
- Task2(const char* name,
- const rtems_task_priority initial_priority,
- const rtems_unsigned32 stack_size);
-};
-
-class Task3
- : public rtemsTask
-{
- void screen6(void);
-
-protected:
- virtual void body(rtems_task_argument argument);
-
-public:
- Task3(const char* name,
- const rtems_task_priority initial_priority,
- const rtems_unsigned32 stack_size);
-};
-
-class EndTask
- : public rtemsTask
-{
-protected:
- virtual void body(rtems_task_argument argument);
-
-public:
- EndTask(const char* name,
- const rtems_task_priority initial_priority,
- const rtems_unsigned32 stack_size);
-};
-
-#if 0
-
-//
-// Not sure this can be tested in a generic manner, any ideas anyone !!
-//
-
-class Service_routine
- : public rtemsInterrupt
-{
-};
-
-class Io_during_interrupt
- : pubic rtemsTimer
-{
-
-};
-
-#endif
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MAXIMUM_TIMERS 1
-#define CONFIGURE_MAXIMUM_SEMAPHORES 2
-#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_MAXIMUM_PARTITIONS 1
-#define CONFIGURE_MAXIMUM_REGIONS 1
-#define CONFIGURE_MAXIMUM_PERIODS 1
-#define CONFIGURE_MAXIMUM_USER_EXTENSIONS 0
-#define CONFIGURE_TICKS_PER_TIMESLICE 100
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-#define CONFIGURE_INIT_TASK_STACK_SIZE (4 * RTEMS_MINIMUM_STACK_SIZE)
-
-#define CONFIGURE_EXTRA_TASK_STACKS (3 * RTEMS_MINIMUM_STACK_SIZE)
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/testsuites/libtests/rtems++/Task1.cc b/testsuites/libtests/rtems++/Task1.cc
deleted file mode 100644
index 07d2179077..0000000000
--- a/testsuites/libtests/rtems++/Task1.cc
+++ /dev/null
@@ -1,681 +0,0 @@
-/* Task1
- *
- * This task is the main line for the test. It creates other
- * tasks which can create
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1997
- * Objective Design Systems Ltd Pty (ODS)
- * All rights reserved (R) Objective Design Systems Ltd Pty
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <stdlib.h>
-#include <string.h>
-#include "System.h"
-
-void Task1::body(rtems_task_argument argument)
-{
- rtems_test_pause_and_screen_number(1);
-
- printf(" * START Task Class test *\n");
-
- printf("%s - test argument - ", name_string());
- if (argument != 0xDEADDEAD)
- printf("argument is not 0xDEADDEAD\n");
- else
- printf("argument matched\n");
-
- screen1();
- rtems_test_pause_and_screen_number(2);
-
- screen2();
- rtems_test_pause_and_screen_number(3);
-
- screen3();
- rtems_test_pause_and_screen_number(4);
-
- screen4();
- rtems_test_pause_and_screen_number(5);
-
- screen5();
- rtems_test_pause_and_screen_number(6);
-
- screen6();
-
- // do not call exit(0) from this thread as this object is static
- // the static destructor call delete the task which is calling exit
- // so exit never completes
-
- EndTask end_task("ENDT", (rtems_task_priority) 1, RTEMS_MINIMUM_STACK_SIZE * 6);
- end_task.start(0);
-
- rtemsEvent block_me;
- rtems_event_set out;
-
- block_me.receive(RTEMS_SIGNAL_0, out);
-
- printf("**** TASK 1 did not block ????\n");
-}
-
-void Task1::screen1(void)
-{
- // create two local task objects to connect to this task
- rtemsTask local_task_1 = *this;
- rtemsTask local_task_2;
-
- local_task_2 = *this;
-
- // check the copy constructor works
- printf("%s - copy constructor - ", name_string());
- if (local_task_1.id_is() == id_is())
- printf("local and this id's match\n");
- else
- printf("local and this id's do not match\n");
-
- printf("%s - copy constructor - ", name_string());
- if (local_task_1.name_is() == name_is())
- printf("local and this name's match\n");
- else
- printf("local and this name's do not match\n");
-
- // check the copy operator works
- printf("%s - copy operator - ", name_string());
- if (local_task_2.id_is() == id_is())
- printf("local and this id's match\n");
- else
- printf("local and this id's do not match\n");
- printf("%s - copy operator - ", name_string());
- if (local_task_2.name_is() == name_is())
- printf("local and this name's match\n");
- else
- printf("local and this name's do not match\n");
-
- // check that the owner of the id cannot delete this task
- printf("%s - not owner destroy's task - ", local_task_1.name_string());
- local_task_1.destroy();
- printf("%s\n", local_task_1.last_status_string());
-
- // connect to a valid task
- printf("%s - connect to a local valid task name - ", local_task_2.name_string());
- local_task_2.connect("TA1 ", RTEMS_SEARCH_ALL_NODES);
- printf("%s\n", local_task_2.last_status_string());
-
- // connect to an invalid task
- printf("%s - connect to an invalid task name - ", local_task_2.name_string());
- local_task_2.connect("BADT", RTEMS_SEARCH_ALL_NODES);
- printf("%s\n", local_task_2.last_status_string());
-
- // connect to a task an invalid node
- printf("%s - connect to a task on an invalid node - ", local_task_2.name_string());
- local_task_2.connect("BADT", 10);
- printf("%s\n", local_task_2.last_status_string());
-
- // restart this task
- printf("%s - restart from a non-owner - ", name_string());
- local_task_1.restart(0);
- printf("%s\n", local_task_1.last_status_string());
-}
-
-void Task1::screen2(void)
-{
- // wake after using this object
-
- printf("%s - wake after 0 secs - ", name_string());
- wake_after(0);
- printf("%s\n", last_status_string());
-
- printf("%s - wake after 500 msecs - ", name_string());
- wake_after(500000);
- printf("%s\n", last_status_string());
-
- printf("%s - wake after 5 secs - ", name_string());
- wake_after(5000000);
- printf("%s\n", last_status_string());
-
- printf("%s - wake when - to do\n", name_string());
-
- rtemsTask task_1 = *this;
-
- // wake after using a connected object
-
- printf("%s - connected object wake after 0 secs - ", task_1.name_string());
- task_1.wake_after(0);
- printf("%s\n", task_1.last_status_string());
-
- printf("%s - connected object wake after 500 msecs - ", task_1.name_string());
- task_1.wake_after(500000);
- printf("%s\n", task_1.last_status_string());
-
- printf("%s - connected object wake after 5 secs - ", task_1.name_string());
- task_1.wake_after(5000000);
- printf("%s\n", task_1.last_status_string());
-
- printf("%s - connected object wake when - to do\n", task_1.name_string());
-
- rtemsTask task_2;
-
- // wake after using a self object
-
- printf("%s - self object wake after 0 secs - ", task_2.name_string());
- task_2.wake_after(0);
- printf("%s\n", task_2.last_status_string());
-
- printf("%s - self object wake after 500 msecs - ", task_2.name_string());
- task_2.wake_after(500000);
- printf("%s\n", task_2.last_status_string());
-
- printf("%s - self object wake after 5 secs - ", task_2.name_string());
- task_2.wake_after(5000000);
- printf("%s\n", task_2.last_status_string());
-
- printf("%s - self object wake when - to do\n", task_2.name_string());
-
- rtems_task_priority current_priority;
- rtems_task_priority priority;
-
- // priorities with this object
-
- printf("%s - get priority - ", name_string());
- get_priority(current_priority);
- printf("%s, priority is %i\n", last_status_string(), current_priority);
-
- printf("%s - set priority to 512 - ", name_string());
- set_priority(512);
- printf("%s\n", last_status_string());
-
- printf("%s - set priority to 25 - ", name_string());
- set_priority(25);
- printf("%s\n", last_status_string());
-
- printf("%s - set priority to original - ", name_string());
- set_priority(current_priority, priority);
- printf("%s, priority was %i\n", last_status_string(), priority);
-
- // priorities with connected object
-
- printf("%s - connected object get priority - ", task_1.name_string());
- task_1.get_priority(current_priority);
- printf("%s, priority is %i\n", task_1.last_status_string(), current_priority);
-
- printf("%s - connected object set priority to 512 - ", task_1.name_string());
- task_1.set_priority(512);
- printf("%s\n", task_1.last_status_string());
-
- printf("%s - connected object set priority to 25 - ", task_1.name_string());
- task_1.set_priority(25);
- printf("%s\n", task_1.last_status_string());
-
- printf("%s - connected object set priority to original - ", task_1.name_string());
- task_1.set_priority(current_priority, priority);
- printf("%s, priority was %i\n", task_1.last_status_string(), priority);
-
- // priorities with self object
-
- printf("%s - self object get priority - ", task_2.name_string());
- task_2.get_priority(current_priority);
- printf("%s, priority is %i\n", task_2.last_status_string(), current_priority);
-
- printf("%s - self object set priority to 512 - ", task_2.name_string());
- task_2.set_priority(512);
- printf("%s\n", task_2.last_status_string());
-
- printf("%s - self object set priority to 25 - ", task_2.name_string());
- task_2.set_priority(25);
- printf("%s\n", task_2.last_status_string());
-
- printf("%s - self object set priority to original - ", task_2.name_string());
- task_2.set_priority(current_priority, priority);
- printf("%s, priority was %i\n", task_2.last_status_string(), priority);
-
- rtems_unsigned32 current_note;
- rtems_unsigned32 note;
-
- // notepad registers for this object
-
- printf("%s - get note - ", name_string());
- get_note(0, current_note);
- printf("%s, note is %i\n", last_status_string(), current_note);
-
- printf("%s - get with bad notepad number - ", name_string());
- get_note(100, current_note);
- printf("%s, note is %i\n", last_status_string(), current_note);
-
- printf("%s - set note to 0xDEADBEEF - ", name_string());
- set_note(0, 0xDEADBEEF);
- printf("%s\n", last_status_string());
-
- printf("%s - get note - ", name_string());
- get_note(0, note);
- printf("%s, note is 0x%08X\n", last_status_string(), note);
-
- printf("%s - set note to original value - ", name_string());
- set_note(0, current_note);
- printf("%s\n", last_status_string());
-
- // notepad registers for connected object
-
- printf("%s - connected object get note - ", task_1.name_string());
- task_1.get_note(0, current_note);
- printf("%s, notepad is %i\n", task_1.last_status_string(), current_note);
-
- printf("%s - connected object get with bad notepad number - ", task_1.name_string());
- task_1.get_note(100, current_note);
- printf("%s, note is %i\n", task_1.last_status_string(), current_note);
-
- printf("%s - connected object set note to 0xDEADBEEF - ", task_1.name_string());
- task_1.set_note(0, 0xDEADBEEF);
- printf("%s\n", task_1.last_status_string());
-
- printf("%s - connected object get note - ", task_1.name_string());
- task_1.get_note(0, note);
- printf("%s, note is 0x%08X\n", task_1.last_status_string(), note);
-
- printf("%s - connected object set note to original value - ", task_1.name_string());
- task_1.set_note(0, current_note);
- printf("%s\n", task_1.last_status_string());
-
- // notepad registers for self object
-
- printf("%s - self object get note - ", task_2.name_string());
- task_2.get_note(0, current_note);
- printf("%s, note is %i\n", task_2.last_status_string(), current_note);
-
- printf("%s - self object get with bad notepad number - ", task_2.name_string());
- task_2.get_note(100, current_note);
- printf("%s, note is %i\n", task_2.last_status_string(), current_note);
-
- printf("%s - self object set note to 0xDEADBEEF - ", task_2.name_string());
- task_2.set_note(0, 0xDEADBEEF);
- printf("%s\n", task_2.last_status_string());
-
- printf("%s - self object get note - ", task_2.name_string());
- task_2.get_note(0, note);
- printf("%s, notepad is 0x%08X\n", task_2.last_status_string(), note);
-
- printf("%s - self object set note to original value - ", task_2.name_string());
- task_2.set_note(0, current_note);
- printf("%s\n", task_2.last_status_string());
-
- printf(" * END Task Class test *\n");
-}
-
-#define RTEMS_ALL_MODES (RTEMS_PREEMPT_MASK | \
- RTEMS_TIMESLICE_MASK | \
- RTEMS_ASR_MASK | \
- RTEMS_INTERRUPT_MASK)
-
-void Task1::screen3(void)
-{
- printf(" * START TaskMode Class test *\n");
-
- rtemsTask self;
- rtemsTaskMode task_mode;
- rtems_mode current_mode;
- rtems_mode mode;
-
- printf("%s - get mode - ", self.name_string());
- task_mode.get_mode(current_mode);
- printf("%s,\n\t mode is 0x%08X, ", task_mode.last_status_string(), current_mode);
- print_mode(current_mode, RTEMS_ALL_MODES);
- printf("\n");
-
- // PREEMPTION mode control
-
- printf("%s - get preemption state - ", self.name_string());
- task_mode.get_preemption_state(mode);
- printf("%s,\n\t mode is 0x%08X, ", task_mode.last_status_string(), mode);
- print_mode(mode, RTEMS_PREEMPT_MASK);
- printf("\n");
-
- printf("%s - set preemption state to RTEMS_PREEMPT - ", self.name_string());
- task_mode.set_preemption_state(RTEMS_PREEMPT);
- task_mode.get_mode(mode);
- printf("%s,\n\t mode is 0x%08X, ", task_mode.last_status_string(), mode);
- print_mode(mode, RTEMS_ALL_MODES);
- printf("\n");
-
- printf("%s - set preemption state to RTEMS_NO_PREEMPT - ", self.name_string());
- task_mode.set_preemption_state(RTEMS_NO_PREEMPT);
- task_mode.get_mode(mode);
- printf("%s,\n\t mode is 0x%08X, ", task_mode.last_status_string(), mode);
- print_mode(mode, RTEMS_ALL_MODES);
- printf("\n");
-
- // TIMESLICE mode control
-
- printf("%s - get timeslice state - ", self.name_string());
- task_mode.get_timeslice_state(mode);
- printf("%s,\n\t mode is 0x%08X, ", task_mode.last_status_string(), mode);
- print_mode(mode, RTEMS_TIMESLICE_MASK);
- printf("\n");
-
- printf("%s - set timeslice state to RTEMS_TIMESLICE - ", self.name_string());
- task_mode.set_timeslice_state(RTEMS_TIMESLICE);
- task_mode.get_mode(mode);
- printf("%s,\n\t mode is 0x%08X, ", task_mode.last_status_string(), mode);
- print_mode(mode, RTEMS_ALL_MODES);
- printf("\n");
-
- printf("%s - set timeslice state to RTEMS_NO_TIMESLICE - ", self.name_string());
- task_mode.set_timeslice_state(RTEMS_NO_TIMESLICE);
- task_mode.get_mode(mode);
- printf("%s,\n\t mode is 0x%08X, ", task_mode.last_status_string(), mode);
- print_mode(mode, RTEMS_ALL_MODES);
- printf("\n");
-
- // ASR mode control
-
- printf("%s - get asr state - ", self.name_string());
- task_mode.get_asr_state(mode);
- printf("%s,\n\t mode is 0x%08X, ", task_mode.last_status_string(), mode);
- print_mode(mode, RTEMS_ASR_MASK);
- printf("\n");
-
- printf("%s - set asr state to RTEMS_ASR - ", self.name_string());
- task_mode.set_asr_state(RTEMS_ASR);
- task_mode.get_mode(mode);
- printf("%s,\n\t mode is 0x%08X, ", task_mode.last_status_string(), mode);
- print_mode(mode, RTEMS_ALL_MODES);
- printf("\n");
-
- printf("%s - set asr state to RTEMS_NO_ASR - ", self.name_string());
- task_mode.set_asr_state(RTEMS_NO_ASR);
- task_mode.get_mode(mode);
- printf("%s,\n\t mode is 0x%08X, ", task_mode.last_status_string(), mode);
- print_mode(mode, RTEMS_ALL_MODES);
- printf("\n");
-
- // interrupt level control
-
- rtems_interrupt_level current_level;
- rtems_interrupt_level level;
-
- printf("%s - get current interrupt level - ", self.name_string());
- task_mode.get_interrupt_level(current_level);
- printf("%s, level is %i\n", task_mode.last_status_string(), current_level);
-
- printf("%s - set interrupt level to 102 - ", self.name_string());
- task_mode.set_interrupt_level(102);
- printf("%s\n", task_mode.last_status_string());
-
- printf("%s - set interrupt level to original level - ", self.name_string());
- task_mode.set_interrupt_level(current_level, level);
- printf("%s, level was %i\n", task_mode.last_status_string(), level);
-
- printf("%s - set mode to original mode - ", self.name_string());
- task_mode.set_mode(current_mode,
- RTEMS_PREEMPT_MASK | RTEMS_TIMESLICE_MASK |
- RTEMS_ASR_MASK | RTEMS_INTERRUPT_MASK);
- task_mode.get_mode(mode);
- printf("%s,\n\t mode is 0x%08X, ", task_mode.last_status_string(), mode);
- print_mode(mode, RTEMS_ALL_MODES);
- printf("\n");
-
- printf(" * END TaskMode Class test *\n");
-}
-
-void Task1::screen4(void)
-{
- printf(" * START Event Class test *\n");
-
- printf("%s - create task 2 - ", name_string());
- Task2 task_2("TA2", (rtems_task_priority) 9, RTEMS_MINIMUM_STACK_SIZE * 6);
- printf("%s\n", task_2.last_status_string());
-
- printf("%s - start task 2 - ", name_string());
- task_2.start(0);
- printf("%s\n", task_2.last_status_string());
-
- printf("%s - construct event connecting to task 2 - ", name_string());
- rtemsEvent event_2("TA2 ");
- printf("%s\n", event_2.last_status_string());
-
- // wait for task 2 to complete its timeout tests
- wake_after(7000000);
-
- printf("%s - send event signal 0 using the task id - ", name_string());
- event_2.send(task_2.id_is(), RTEMS_SIGNAL_0);
- printf("%s\n", event_2.last_status_string());
-
- wake_after(1000000);
-
- printf("%s - send event signal 0 using the task object reference - ", name_string());
- event_2.send(task_2, RTEMS_SIGNAL_0);
- printf("%s\n", event_2.last_status_string());
-
- wake_after(1000000);
-
- printf("%s - send event signal 31 using connected id - ", name_string());
- event_2.send(RTEMS_SIGNAL_31);
- printf("%s\n", event_2.last_status_string());
-
- wake_after(1000000);
-
- rtemsEvent event_2_2;
-
- event_2_2.connect("TA2");
-
- printf("%s - send event signal 0 and 31 - ", name_string());
- event_2_2.send(task_2, RTEMS_SIGNAL_0 | RTEMS_SIGNAL_31);
- printf("%s\n", event_2_2.last_status_string());
-
- printf("%s - waiting 5 secs for TA2 to finish\n", name_string());
- wake_after(500000);
-
- printf(" * END Event Class test *\n");
-}
-
-void Task1::screen5(void)
-{
- printf(" * START Interrupt Class test *\n");
-
- printf(" do not know a portable BSP type interrupt test\n");
-
- printf(" * END Interrupt Class test *\n");
-}
-
-void Task1::screen6(void)
-{
- printf(" * START MessageQueue Class test *\n");
-
- printf("%s - construct message queue 1 with no memory error - ", name_string());
- rtemsMessageQueue mq_1("MQ1", 1000000, 1000);
- printf("%s\n", mq_1.last_status_string());
-
- printf("%s - construct/create message queue 2 - ", name_string());
- rtemsMessageQueue mq_2("MQ2", 4, 50);
- printf("%s\n", mq_2.last_status_string());
-
- char *u1 = "normal send";
- char *u2 = "urgent send";
- char in[100];
- rtems_unsigned32 size;
-
- printf("%s - send u1 to mq_2 - ", name_string());
- mq_2.send(u1, strlen(u1) + 1);
- printf("%s\n", mq_2.last_status_string());
-
- printf("%s - urgent send u2 to mq_2 - ", name_string());
- mq_2.urgent(u2, strlen(u2) + 1);
- printf("%s\n", mq_2.last_status_string());
-
- printf("%s - create task 3_1 - ", name_string());
- Task3 task_3_1("TA31", 9, RTEMS_MINIMUM_STACK_SIZE * 6);
- printf("%s\n", task_3_1.last_status_string());
-
- printf("%s - start task 3_1 - ", name_string());
- task_3_1.start(0);
- printf("%s\n", task_3_1.last_status_string());
-
- printf("%s - create task 3_2 - ", name_string());
- Task3 task_3_2("TA32", 9, RTEMS_MINIMUM_STACK_SIZE * 6);
- printf("%s\n", task_3_2.last_status_string());
-
- printf("%s - start task 3_2 - ", name_string());
- task_3_2.start(0);
- printf("%s\n", task_3_1.last_status_string());
-
- wake_after(1000000);
-
- printf("%s - receive u2 on mq_2 ...\n", name_string()); fflush(stdout);
- mq_2.receive(in, size, 5000000);
- printf("%s - %s\n", name_string(), mq_2.last_status_string());
-
- if (size == (strlen(u2) + 5))
- {
- if ((strncmp(in, task_3_1.name_string(), 4) == 0) &&
- (strcmp(in + 4, u2) == 0))
- {
- printf("%s - message u2 received correctly\n", name_string());
- }
- else
- {
- printf("%s - message u2 received incorrectly, message='%s', size=%i\n",
- name_string(), in, size);
- }
- }
- else
- printf("%s - message u2 size incorrect, size=%i\n", name_string(), size);
-
- printf("%s - receive u1 on mq_2 ...\n", name_string()); fflush(stdout);
- mq_2.receive(in, size, 5000000);
- printf("%s - %s\n", name_string(), mq_2.last_status_string());
-
- if (size == (strlen(u1) + 5))
- {
- if ((strncmp(in, task_3_2.name_string(), 4) == 0) &&
- (strcmp(in + 4, u1) == 0))
- {
- printf("%s - message u1 received correctly\n", name_string());
- }
- else
- {
- printf("%s - message u1 received incorrectly, message='%s', size=%i\n",
- name_string(), in, size);
- }
- }
- else
- printf("%s - message u1 size incorrect, size=%i\n", name_string(), size);
-
- wake_after(3000000);
-
- char *b1 = "broadcast message";
- rtems_unsigned32 count;
-
- printf("%s - broadcast send b1 ...\n", name_string());
- mq_2.broadcast(b1, strlen(b1) + 1, count);
- printf("%s - mq_2 broadcast send - %s, count=%i\n",
- name_string(), mq_2.last_status_string(), count);
-
- wake_after(1000000);
-
- printf("%s - receive message b1 on mq_2 from %s...\n",
- name_string(), task_3_1.name_string()); fflush(stdout);
- mq_2.receive(in, size, 5000000);
- printf("%s - %s\n", name_string(), mq_2.last_status_string());
-
- if (size == (strlen(b1) + 5))
- {
- if ((strncmp(in, task_3_1.name_string(), 4) == 0) &&
- (strcmp(in + 4, b1) == 0))
- {
- printf("%s - message b1 received correctly\n", name_string());
- }
- else
- {
- printf("%s - message b1 received incorrectly, message='%s'\n",
- name_string(), in);
- }
- }
- else
- printf("%s - message b1 size incorrect, size=%i\n", name_string(), size);
-
- printf("%s - receive message b1 on mq_2 from %s...\n",
- name_string(), task_3_1.name_string()); fflush(stdout);
- mq_2.receive(in, size, 5000000);
- printf("%s - %s\n", name_string(), mq_2.last_status_string());
-
- if (size == (strlen(b1) + 5))
- {
- if ((strncmp(in, task_3_2.name_string(), 4) == 0) &&
- (strcmp(in + 4, b1) == 0))
- {
- printf("%s - message b1 received correctly\n", name_string());
- }
- else
- {
- printf("%s - message b1 received incorrectly, message='%s', size=%i\n",
- name_string(), in, size);
- }
- }
- else
- printf("%s - message b1 size incorrect, size=%i\n", name_string(), size);
-
- // wait for task 3_1, and 3_2 to complete their timeout tests, will
- // start these after getting the broadcast message
- wake_after(7000000);
-
- char *f1 = "flush message";
-
- printf("%s - send f1 to mq_2 - ", name_string());
- mq_2.send(f1, strlen(f1) + 1);
- printf("%s\n", mq_2.last_status_string());
-
- printf("%s - send f1 to mq_2 - ", name_string());
- mq_2.send(f1, strlen(f1) + 1);
- printf("%s\n", mq_2.last_status_string());
-
- printf("%s - send f1 to mq_2 - ", name_string());
- mq_2.send(f1, strlen(f1) + 1);
- printf("%s\n", mq_2.last_status_string());
-
- printf("%s - flush mq_2 - ", name_string());
- mq_2.flush(size);
- printf("%s, flushed=%i\n", mq_2.last_status_string(), size);
-
- printf(" * END MessageQueue Class test *\n");
-}
-
-void Task1::print_mode(rtems_mode mode, rtems_mode mask)
-{
- rtemsTaskMode task_mode;
- if (mask & RTEMS_PREEMPT_MASK)
- printf("RTEMS_%sPREEMPT ",
- task_mode.preemption_set(mode) ? "" : "NO_");
- if (mask & RTEMS_TIMESLICE_MASK)
- printf("RTEMS_%sTIMESLICE ",
- task_mode.preemption_set(mode) ? "" : "NO_");
- if (mask & RTEMS_ASR_MASK)
- printf("RTEMS_%sASR ",
- task_mode.asr_set(mode) ? "" : "NO_");
- if (mask & RTEMS_INTERRUPT_MASK)
- printf("INTMASK=%i",
- mode & RTEMS_INTERRUPT_MASK);
-}
-
-EndTask::EndTask(const char* name,
- const rtems_task_priority initial_priority,
- const rtems_unsigned32 stack_size)
- : rtemsTask(name, initial_priority, stack_size, RTEMS_NO_PREEMPT)
-{
-}
-
-void EndTask::body(rtems_task_argument)
-{
- printf("*** END OF RTEMS++ TEST ***\n");
- exit(0);
-}
-
diff --git a/testsuites/libtests/rtems++/Task2.cc b/testsuites/libtests/rtems++/Task2.cc
deleted file mode 100644
index 1a44f4b0ef..0000000000
--- a/testsuites/libtests/rtems++/Task2.cc
+++ /dev/null
@@ -1,80 +0,0 @@
-/* Task_2
- *
- * This routine serves as a test task. Its only purpose is to generate the
- * error where a semaphore is deleted while a task is waiting for it.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "System.h"
-
-Task2::Task2(const char* name,
- const rtems_task_priority initial_priority,
- const rtems_unsigned32 stack_size)
- : rtemsTask(name, initial_priority, stack_size, RTEMS_NO_PREEMPT)
-{
-}
-
-void Task2::body(rtems_task_argument )
-{
- screen4();
-
- printf("%s - destroy itself\n", name_string());
- destroy();
-}
-
-void Task2::screen4()
-{
- rtemsEvent event;
-
- // block waiting for any event
- rtems_event_set out;
-
- printf("%s - event no wait - ", name_string());
- event.receive(RTEMS_SIGNAL_0, out, 0, rtemsEvent::no_wait);
- printf("%s\n", event.last_status_string());
-
- printf("%s - event 5 secs timeout - ", name_string()); fflush(stdout);
- event.receive(RTEMS_SIGNAL_0, out, 5000000);
- printf("%s\n", event.last_status_string());
-
- // send using task id
- printf("%s - event wait forever for signal 0 from TA1 ....\n", name_string());
- event.receive(RTEMS_SIGNAL_0, out);
- printf("%s - %s, signals out are 0x%08X\n", name_string(), event.last_status_string(), out);
-
- // send using task object reference
- printf("%s - event wait forever for signal 0 from TA1 ....\n", name_string());
- event.receive(RTEMS_SIGNAL_0, out);
- printf("%s - %s, signals out are 0x%08X\n", name_string(), event.last_status_string(), out);
-
- printf("%s - event wait forever for signal 31 from TA1 ....\n", name_string());
- event.receive(RTEMS_SIGNAL_31, out);
- printf("%s - %s, signals out are 0x%08X\n", name_string(), event.last_status_string(), out);
-
- printf("%s - event wait forever for signal 0 and 31 from TA1 ....\n", name_string());
- event.receive(RTEMS_SIGNAL_0 | RTEMS_SIGNAL_31, out, 0, rtemsEvent::wait, rtemsEvent::all);
- printf("%s - %s, signals out are 0x%08X\n", name_string(), event.last_status_string(), out);
-
- printf("%s - send event signal 1 - ", name_string());
- event.send(RTEMS_SIGNAL_1);
- printf("%s\n", event.last_status_string());
-
- printf("%s - event wait forever for signal 1 from TA2 - ", name_string());
- event.receive(RTEMS_SIGNAL_1, out, 0, rtemsEvent::wait, rtemsEvent::all);
- printf("%s, signals out are 0x%08X\n", event.last_status_string(), out);
-}
-
-
diff --git a/testsuites/libtests/rtems++/Task3.cc b/testsuites/libtests/rtems++/Task3.cc
deleted file mode 100644
index b1a0595757..0000000000
--- a/testsuites/libtests/rtems++/Task3.cc
+++ /dev/null
@@ -1,80 +0,0 @@
-/* Task_3
- *
- * This routine serves as a test task. Loopback the messages and test
- * timeouts
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "System.h"
-
-Task3::Task3(const char* name,
- const rtems_task_priority initial_priority,
- const rtems_unsigned32 stack_size)
- : rtemsTask(name, initial_priority, stack_size, RTEMS_NO_PREEMPT)
-{
-}
-
-void Task3::body(rtems_task_argument )
-{
- screen6();
-
- printf("%s - destroy itself\n", name_string());
- destroy();
-}
-
-void Task3::screen6()
-{
- rtemsMessageQueue mq_2("MQ2");
- printf("%s - construction connect mq_2 - %s\n", name_string(), mq_2.last_status_string());
-
- if (mq_2.successful())
- {
- char in[100];
- char out[100];
- rtems_unsigned32 size;
- bool loopback = true;
-
- while (loopback)
- {
- printf("%s - loopback from mq_2 to mq_2 ...\n", name_string()); fflush(stdout);
-
- mq_2.receive(in, size);
- printf("%s - mq_2 receive - %s, size=%i, message string size=%i\n",
- name_string(), mq_2.last_status_string(), size, (int) strlen(in));
- if (mq_2.successful())
- {
- if (size > (100 - 5))
- printf("%s - size to large\n", name_string());
- else
- {
- strcpy(out, name_string());
- strcpy(out + 4, in);
-
- printf("%s - loopback to mq_2 - ", name_string());
- mq_2.send(out, strlen(out) + 1);
- printf("%s\n", mq_2.last_status_string());
- }
-
- if (strcmp(in, "broadcast message") == 0)
- loopback = false;
- else
- wake_after(1500000);
- }
- }
- }
-}
-
-
diff --git a/testsuites/libtests/rtems++/rtems++.doc b/testsuites/libtests/rtems++/rtems++.doc
deleted file mode 100644
index 5834b4077d..0000000000
--- a/testsuites/libtests/rtems++/rtems++.doc
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1997
-# Objective Design Systems Ltd Pty (ODS)
-# All rights reserved (R) Objective Design Systems Ltd Pty
-#
-# The license and distribution terms for this file may be found in the
-# file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-The file describes the directives and concepts tested by this test set.
-
-test set name: rtems++
-
-classes:
- rtemsTask, rtemsTaskMode, rtemsEvent, rtemsMessageQueue
-
-concepts:
-
- a. Verify each class tested can be constructed using each of the constructors.
-
- b. Verify each class can be an owner of an object id if capable.
-
- c. Verify each class can connect to an existing object id if capable.
-
- d. Verify the operation of each method of each class.
-
diff --git a/testsuites/libtests/rtems++/rtems++.scn b/testsuites/libtests/rtems++/rtems++.scn
deleted file mode 100644
index 2b3682d6b6..0000000000
--- a/testsuites/libtests/rtems++/rtems++.scn
+++ /dev/null
@@ -1,161 +0,0 @@
-*** RTEMS++ TEST ***
-INIT - Task.create() - RTEMS[19] invalid thread priority
-INIT - Task.create() - RTEMS[00] successful completion
-INIT - Task.create() - RTEMS[16] illegal on calling thread
-INIT - Task.restart() - RTEMS[14] thread is in wrong state
-INIT - Task.start(0xDEADDEAD) - RTEMS[00] successful completion
-<pause - screen 1>
- * START Task Class test *
-TA1 - test argument - argument matched
-TA1 - copy constructor - local and this id's match
-TA1 - copy constructor - local and this name's match
-TA1 - copy operator - local and this id's match
-TA1 - copy operator - local and this name's match
-TA1 - not owner destroy's task - RTEMS[23] not owner of resource
-TA1 - connect to a local valid task name - RTEMS[00] successful completion
-TA1 - connect to an invalid task name - RTEMS[03] invalid object name
-SELF - connect to a task on an invalid node - RTEMS[21] invalid node id
-TA1 - restart from a non-owner - RTEMS[23] not owner of resource
-<pause - screen 2>
-TA1 - wake after 0 secs - RTEMS[00] successful completion
-TA1 - wake after 500 msecs - RTEMS[00] successful completion
-TA1 - wake after 5 secs - RTEMS[00] successful completion
-TA1 - wake when - to do
-TA1 - connected object wake after 0 secs - RTEMS[00] successful completion
-TA1 - connected object wake after 500 msecs - RTEMS[00] successful completion
-TA1 - connected object wake after 5 secs - RTEMS[00] successful completion
-TA1 - connected object wake when - to do
-SELF - self object wake after 0 secs - RTEMS[00] successful completion
-SELF - self object wake after 500 msecs - RTEMS[00] successful completion
-SELF - self object wake after 5 secs - RTEMS[00] successful completion
-SELF - self object wake when - to do
-TA1 - get priority - RTEMS[00] successful completion, priority is 10
-TA1 - set priority to 512 - RTEMS[19] invalid thread priority
-TA1 - set priority to 25 - RTEMS[00] successful completion
-TA1 - set priority to original - RTEMS[00] successful completion, priority was 25
-TA1 - connected object get priority - RTEMS[00] successful completion, priority is 10
-TA1 - connected object set priority to 512 - RTEMS[19] invalid thread priority
-TA1 - connected object set priority to 25 - RTEMS[00] successful completion
-TA1 - connected object set priority to original - RTEMS[00] successful completion, priority was 25
-SELF - self object get priority - RTEMS[00] successful completion, priority is 10
-SELF - self object set priority to 512 - RTEMS[19] invalid thread priority
-SELF - self object set priority to 25 - RTEMS[00] successful completion
-SELF - self object set priority to original - RTEMS[00] successful completion, priority was 25
-TA1 - get note - RTEMS[00] successful completion, note is 0
-TA1 - get with bad notepad number - RTEMS[10] number was invalid, note is 0
-TA1 - set note to 0xDEADBEEF - RTEMS[00] successful completion
-TA1 - get note - RTEMS[00] successful completion, note is 0xDEADBEEF
-TA1 - set note to original value - RTEMS[00] successful completion
-TA1 - connected object get note - RTEMS[00] successful completion, notepad is 0
-TA1 - connected object get with bad notepad number - RTEMS[10] number was invalid, note is 0
-TA1 - connected object set note to 0xDEADBEEF - RTEMS[00] successful completion
-TA1 - connected object get note - RTEMS[00] successful completion, note is 0xDEADBEEF
-TA1 - connected object set note to original value - RTEMS[00] successful completion
-SELF - self object get note - RTEMS[00] successful completion, note is 0
-SELF - self object get with bad notepad number - RTEMS[10] number was invalid, note is 0
-SELF - self object set note to 0xDEADBEEF - RTEMS[00] successful completion
-SELF - self object get note - RTEMS[00] successful completion, notepad is 0xDEADBEEF
-SELF - self object set note to original value - RTEMS[00] successful completion
- * END Task Class test *
-<pause - screen 3>
- * START TaskMode Class test *
-SELF - get mode - RTEMS[00] successful completion,
- mode is 0x00000100, RTEMS_NO_PREEMPT RTEMS_NO_TIMESLICE RTEMS_NO_ASR INTMASK=0
-SELF - get preemption state - RTEMS[00] successful completion,
- mode is 0x00000100, RTEMS_NO_PREEMPT
-SELF - set preemption state to RTEMS_PREEMPT - RTEMS[00] successful completion,
- mode is 0x00000000, RTEMS_PREEMPT RTEMS_TIMESLICE RTEMS_NO_ASR INTMASK=0
-SELF - set preemption state to RTEMS_NO_PREEMPT - RTEMS[00] successful completion,
- mode is 0x00000100, RTEMS_NO_PREEMPT RTEMS_NO_TIMESLICE RTEMS_NO_ASR INTMASK=0
-SELF - get timeslice state - RTEMS[00] successful completion,
- mode is 0x00000000, RTEMS_TIMESLICE
-SELF - set timeslice state to RTEMS_TIMESLICE - RTEMS[00] successful completion,
- mode is 0x00000300, RTEMS_NO_PREEMPT RTEMS_NO_TIMESLICE RTEMS_NO_ASR INTMASK=0
-SELF - set timeslice state to RTEMS_NO_TIMESLICE - RTEMS[00] successful completion,
- mode is 0x00000100, RTEMS_NO_PREEMPT RTEMS_NO_TIMESLICE RTEMS_NO_ASR INTMASK=0
-SELF - get asr state - RTEMS[00] successful completion,
- mode is 0x00000000, RTEMS_NO_ASR
-SELF - set asr state to RTEMS_ASR - RTEMS[00] successful completion,
- mode is 0x00000100, RTEMS_NO_PREEMPT RTEMS_NO_TIMESLICE RTEMS_NO_ASR INTMASK=0
-SELF - set asr state to RTEMS_NO_ASR - RTEMS[00] successful completion,
- mode is 0x00000500, RTEMS_NO_PREEMPT RTEMS_NO_TIMESLICE RTEMS_ASR INTMASK=0
-SELF - get current interrupt level - RTEMS[00] successful completion, level is 0
-SELF - set interrupt level to 102 - RTEMS[00] successful completion
-SELF - set interrupt level to original level - RTEMS[00] successful completion, level was 0
-SELF - set mode to original mode - RTEMS[00] successful completion,
- mode is 0x00000100, RTEMS_NO_PREEMPT RTEMS_NO_TIMESLICE RTEMS_NO_ASR INTMASK=0
- * END TaskMode Class test *
-<pause - screen 4>
- * START Event Class test *
-TA1 - create task 2 - RTEMS[00] successful completion
-TA1 - start task 2 - RTEMS[00] successful completion
-TA1 - construct event connecting to task 2 - RTEMS[00] successful completion
-TA2 - event no wait - RTEMS[13] request not satisfied
-TA2 - event 5 secs timeout - RTEMS[06] timed out waiting
-TA2 - event wait forever for signal 0 from TA1 ....
-TA1 - send event signal 0 using the task id - RTEMS[00] successful completion
-TA2 - RTEMS[00] successful completion, signals out are 0x00000001
-TA2 - event wait forever for signal 0 from TA1 ....
-TA1 - send event signal 0 using the task object reference - RTEMS[00] successful completion
-TA2 - RTEMS[00] successful completion, signals out are 0x00000001
-TA2 - event wait forever for signal 31 from TA1 ....
-TA1 - send event signal 31 using connected id - RTEMS[00] successful completion
-TA2 - RTEMS[00] successful completion, signals out are 0x80000000
-TA2 - event wait forever for signal 0 and 31 from TA1 ....
-TA1 - send event signal 0 and 31 - RTEMS[00] successful completion
-TA1 - waiting 5 secs for TA2 to finish
-TA2 - RTEMS[00] successful completion, signals out are 0x80000001
-TA2 - send event signal 1 - RTEMS[00] successful completion
-TA2 - event wait forever for signal 1 from TA2 - RTEMS[00] successful completion, signals out are 0x00000002
-TA2 - destory itself
- * END Event Class test *
-<pause - screen 5>
- * START Interrupt Class test *
- do not know a portable BSP type interrupt test
- * END Interrupt Class test *
-<pause - screen 6>
- * START MessageQueue Class test *
-TA1 - construct message queue 1 with no memory error - RTEMS[05] too many
-TA1 - construct/create message queue 2 - RTEMS[00] successful completion
-TA1 - send u1 to mq_2 - RTEMS[00] successful completion
-TA1 - urgent send u2 to mq_2 - RTEMS[00] successful completion
-TA1 - create task 3_1 - RTEMS[00] successful completion
-TA1 - start task 3_1 - RTEMS[00] successful completion
-TA1 - create task 3_2 - RTEMS[00] successful completion
-TA1 - start task 3_2 - RTEMS[00] successful completion
-TA31 - construction connect mq_2 - RTEMS[00] successful completion
-TA31 - loopback from mq_2 to mq_2 ...
-TA31 - mq_2 receive - RTEMS[00] successful completion, size=12, message string size=11
-TA31 - loopback to mq_2 - RTEMS[00] successful completion
-TA32 - construction connect mq_2 - RTEMS[00] successful completion
-TA32 - loopback from mq_2 to mq_2 ...
-TA32 - mq_2 receive - RTEMS[00] successful completion, size=12, message string size=11
-TA32 - loopback to mq_2 - RTEMS[00] successful completion
-TA1 - receive u2 on mq_2 ...
-TA1 - RTEMS[00] successful completion
-TA1 - message u2 received correctly
-TA1 - receive u1 on mq_2 ...
-TA1 - RTEMS[00] successful completion
-TA1 - message u1 received correctly
-TA31 - loopback from mq_2 to mq_2 ...
-TA32 - loopback from mq_2 to mq_2 ...
-TA1 - broadcast send b1 ...
-TA1 - mq_2 broadcast send - RTEMS[00] successful completion, count=2
-TA31 - mq_2 receive - RTEMS[00] successful completion, size=18, message string size=17
-TA31 - loopback to mq_2 - RTEMS[00] successful completion
-TA31 - destory itself
-TA32 - mq_2 receive - RTEMS[00] successful completion, size=18, message string size=17
-TA32 - loopback to mq_2 - RTEMS[00] successful completion
-TA32 - destory itself
-TA1 - receive message b1 on mq_2 from TA31...
-TA1 - RTEMS[00] successful completion
-TA1 - message b1 received correctly
-TA1 - receive message b1 on mq_2 from TA31...
-TA1 - RTEMS[00] successful completion
-TA1 - message b1 received correctly
-TA1 - send f1 to mq_2 - RTEMS[00] successful completion
-TA1 - send f1 to mq_2 - RTEMS[00] successful completion
-TA1 - send f1 to mq_2 - RTEMS[00] successful completion
-TA1 - flush mq_2 - RTEMS[00] successful completion, flushed=3
- * END MessageQueue Class test *
-<pause - screen 7>
diff --git a/testsuites/libtests/rtmonuse/Makefile.am b/testsuites/libtests/rtmonuse/Makefile.am
deleted file mode 100644
index 38ef675e57..0000000000
--- a/testsuites/libtests/rtmonuse/Makefile.am
+++ /dev/null
@@ -1,41 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = rtmonuse
-
-MANAGERS = io rate_monotonic
-
-C_FILES = init.c getall.c task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/libtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/libtests/rtmonuse/getall.c b/testsuites/libtests/rtmonuse/getall.c
deleted file mode 100644
index a99ecf3d8c..0000000000
--- a/testsuites/libtests/rtmonuse/getall.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/* Get_all_counters
- *
- * This routine allows TA5 to atomically obtain the iteration counters.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-void Get_all_counters()
-{
- rtems_mode previous_mode;
- rtems_status_code status;
-
- status = rtems_task_mode(
- RTEMS_NO_PREEMPT,
- RTEMS_PREEMPT_MASK,
- &previous_mode
- );
- directive_failed( status, "rtems_task_mode to RTEMS_NO_PREEMPT" );
-
- Temporary_count = Count;
- Count.count[ 1 ] = 0;
- Count.count[ 2 ] = 0;
- Count.count[ 3 ] = 0;
- Count.count[ 4 ] = 0;
- Count.count[ 5 ] = 0;
-
- status = rtems_task_mode( RTEMS_PREEMPT, RTEMS_PREEMPT_MASK, &previous_mode );
- directive_failed( status, "rtems_task_mode to RTEMS_PREEMPT" );
-}
diff --git a/testsuites/libtests/rtmonuse/init.c b/testsuites/libtests/rtmonuse/init.c
deleted file mode 100644
index a406a18a35..0000000000
--- a/testsuites/libtests/rtmonuse/init.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is a user initialization task and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-#include <rtems/rtmonuse.h>
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_unsigned32 index;
- rtems_status_code status;
-
- puts( "\n\n*** RATE MONOTONIC PERIOD STATISTICS TEST ***" );
- Period_usage_Initialize();
-
- Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
- Task_name[ 2 ] = rtems_build_name( 'T', 'A', '2', ' ' );
- Task_name[ 3 ] = rtems_build_name( 'T', 'A', '3', ' ' );
- Task_name[ 4 ] = rtems_build_name( 'T', 'A', '4', ' ' );
- Task_name[ 5 ] = rtems_build_name( 'T', 'A', '5', ' ' );
-
- for ( index = 1 ; index <= 5 ; index++ ) {
- status = rtems_task_create(
- Task_name[ index ],
- Priorities[ index ],
- RTEMS_MINIMUM_STACK_SIZE * 4,
- RTEMS_DEFAULT_MODES,
- (index == 5) ? RTEMS_FLOATING_POINT : RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ index ]
- );
- directive_failed( status, "rtems_task_create loop" );
- }
-
- for ( index = 1 ; index <= 5 ; index++ ) {
- status = rtems_task_start( Task_id[ index ], Task_1_through_5, index );
- directive_failed( status, "rtems_task_start loop" );
- }
-
- Count.count[ 1 ] = 0;
- Count.count[ 2 ] = 0;
- Count.count[ 3 ] = 0;
- Count.count[ 4 ] = 0;
- Count.count[ 5 ] = 0;
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
diff --git a/testsuites/libtests/rtmonuse/rtmonuse.scn b/testsuites/libtests/rtmonuse/rtmonuse.scn
deleted file mode 100644
index bb4e8814da..0000000000
--- a/testsuites/libtests/rtmonuse/rtmonuse.scn
+++ /dev/null
@@ -1,27 +0,0 @@
-*** TEST 20 ***
-TA1 - rtems_rate_monotonic_create id = 0x28010001
-TA1 - rtems_rate_monotonic_ident id = 0x28010001
-TA1 - (0x28010001) period 2
-TA2 - rtems_rate_monotonic_create id = 0x28010002
-TA2 - rtems_rate_monotonic_ident id = 0x28010002
-TA2 - (0x28010002) period 2
-TA3 - rtems_rate_monotonic_create id = 0x28010003
-TA3 - rtems_rate_monotonic_ident id = 0x28010003
-TA3 - (0x28010003) period 2
-TA4 - rtems_rate_monotonic_create id = 0x28010004
-TA4 - rtems_rate_monotonic_ident id = 0x28010004
-TA4 - (0x28010004) period 2
-TA5 - rtems_rate_monotonic_create id = 0x28010005
-TA5 - rtems_rate_monotonic_ident id = 0x28010005
-TA5 - (0x28010005) period 100
-TA5 - PERIODS CHECK OK (1)
-TA5 - PERIODS CHECK OK (2)
-TA5 - PERIODS CHECK OK (3)
-TA5 - PERIODS CHECK OK (4)
-TA5 - PERIODS CHECK OK (5)
-TA5 - PERIODS CHECK OK (6)
-TA5 - PERIODS CHECK OK (7)
-TA5 - PERIODS CHECK OK (8)
-TA5 - PERIODS CHECK OK (9)
-TA5 - PERIODS CHECK OK (10)
-*** END OF TEST 20 ***
diff --git a/testsuites/libtests/rtmonuse/system.h b/testsuites/libtests/rtmonuse/system.h
deleted file mode 100644
index 9d92d23d14..0000000000
--- a/testsuites/libtests/rtmonuse/system.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* types */
-
-struct counters {
- rtems_unsigned32 count[6];
-};
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_task Task_1_through_5(
- rtems_task_argument argument
-);
-
-void Get_all_counters( void );
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_INIT_TASK_PRIORITY 10
-#define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_DEFAULT_MODES
-#define CONFIGURE_MAXIMUM_PERIODS 10
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#define CONFIGURE_EXTRA_TASK_STACKS (15 * RTEMS_MINIMUM_STACK_SIZE)
-#include <confdefs.h>
-
-/* global variables */
-
-TEST_EXTERN rtems_id Task_id[ 6 ]; /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 6 ]; /* array of task names */
-
-TEST_EXTERN struct counters Count; /* iteration counters */
-TEST_EXTERN struct counters Temporary_count;
-extern rtems_task_priority Priorities[ 6 ];
-
-/* end of include file */
diff --git a/testsuites/libtests/rtmonuse/task1.c b/testsuites/libtests/rtmonuse/task1.c
deleted file mode 100644
index 2d9a828f04..0000000000
--- a/testsuites/libtests/rtmonuse/task1.c
+++ /dev/null
@@ -1,123 +0,0 @@
-/* Task_1_through_5
- *
- * This routine serves as a test task for the period capabilities of the
- * Rate Monotonic Manager.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-#include <rtems/cpuuse.h>
-#include <rtems/rtmonuse.h>
-
-rtems_unsigned32 Periods[6] = { 0, 2, 2, 2, 2, 100 };
-rtems_unsigned32 Iterations[6] = { 0, 50, 50, 50, 50, 1 };
-rtems_task_priority Priorities[6] = { 0, 1, 1, 3, 4, 5 };
-
-rtems_task Task_1_through_5(
- rtems_unsigned32 argument
-)
-{
- rtems_id rmid;
- rtems_id test_rmid;
- rtems_unsigned32 index;
- rtems_unsigned32 pass;
- rtems_unsigned32 failed;
- rtems_status_code status;
-
- status = rtems_rate_monotonic_create( argument, &rmid );
- directive_failed( status, "rtems_rate_monotonic_create" );
- put_name( Task_name[ argument ], FALSE );
- printf( "- rtems_rate_monotonic_create id = 0x%08x\n", rmid );
-
- status = rtems_rate_monotonic_ident( argument, &test_rmid );
- directive_failed( status, "rtems_rate_monotonic_ident" );
- put_name( Task_name[ argument ], FALSE );
- printf( "- rtems_rate_monotonic_ident id = 0x%08x\n", test_rmid );
-
- if ( rmid != test_rmid ) {
- printf( "RMID's DO NOT MATCH (0x%x and 0x%x)\n", rmid, test_rmid );
- exit( 0 );
- }
-
- put_name( Task_name[ argument ], FALSE );
- printf( "- (0x%08x) period %d\n", rmid, Periods[ argument ] );
-
- status = rtems_task_wake_after( 2 );
- directive_failed( status, "rtems_task_wake_after" );
-
- switch ( argument ) {
- case 1:
- case 2:
- case 3:
- case 4:
- while ( FOREVER ) {
- Period_usage_Update( rmid );
-
- status = rtems_rate_monotonic_period( rmid, Periods[ argument ] );
- directive_failed( status, "rtems_rate_monotonic_period" );
- Count.count[ argument ]++;
- }
- break;
- case 5:
- pass = 0;
- failed = 0;
-
- status = rtems_rate_monotonic_period( rmid, Periods[ argument ] );
- directive_failed( status, "rtems_rate_monotonic_period 1 of TA5" );
-
- Get_all_counters();
-
- while ( FOREVER ) {
- Period_usage_Update( rmid );
-
- status = rtems_rate_monotonic_period( rmid, Periods[ argument ] );
- directive_failed( status, "rtems_rate_monotonic_period 2 of TA5" );
-
- Get_all_counters();
-
- for( index = 1 ; index <= 4 ; index++ ) {
- if ( Temporary_count.count[ index ] != Iterations[ index ] ) {
- puts_nocr( "FAIL -- " );
- put_name ( Task_name[ index ], FALSE );
- printf ( " Actual=%d, Expected=%d\n",
- Temporary_count.count[ index ],
- Iterations[ index ]
- );
- failed += 1;
- }
- }
-
- if ( failed == 5 )
- exit( 0 );
-
- pass += 1;
-
- printf( "TA5 - PERIODS CHECK OK (%d)\n", pass );
-
- fflush( stdout );
-
- if ( pass == 10 ) {
- puts( "*** END OF RATE MONOTONIC PERIOD STATISTICS TEST ***" );
- CPU_usage_Dump();
- Period_usage_Dump();
- exit( 0 );
- }
-
- }
- break;
- }
-}
diff --git a/testsuites/libtests/stackchk/Makefile.am b/testsuites/libtests/stackchk/Makefile.am
deleted file mode 100644
index de59857ea3..0000000000
--- a/testsuites/libtests/stackchk/Makefile.am
+++ /dev/null
@@ -1,41 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = stackchk
-
-MANAGERS = io
-
-C_FILES = blow.c init.c task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/libtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/libtests/stackchk/blow.c b/testsuites/libtests/stackchk/blow.c
deleted file mode 100644
index 944cf9e73c..0000000000
--- a/testsuites/libtests/stackchk/blow.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* task1.c
- *
- * This set of three tasks do some simple task switching for about
- * 15 seconds and then call a routine to "blow the stack".
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-
-void b() {}
-
-void blow_stack( void )
-{
- volatile unsigned32 *low, *high;
- unsigned char *area;
-
-b();
- /*
- * Destroy the first and last 16 bytes of our stack... Hope it
- * does not cause problems :)
- */
-
- area = (unsigned char *)_Thread_Executing->Start.Initial_stack.area;
-
- low = (volatile unsigned32 *) (area + HEAP_OVERHEAD);
- high = (volatile unsigned32 *)
- (area + _Thread_Executing->Start.Initial_stack.size - 16);
-
-
- low[0] = 0x11111111;
- low[1] = 0x22222222;
- low[2] = 0x33333333;
- low[3] = 0x44444444;
-
- high[0] = 0x55555555;
- high[1] = 0x66666666;
- high[2] = 0x77777777;
- high[3] = 0x88888888;
-
-}
diff --git a/testsuites/libtests/stackchk/init.c b/testsuites/libtests/stackchk/init.c
deleted file mode 100644
index 7a3a5e9422..0000000000
--- a/testsuites/libtests/stackchk/init.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is a user initialization task and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_time_of_day time;
- rtems_status_code status;
-
- puts( "\n\n*** TEST STACK CHECKER ***" );
-
- build_time( &time, 12, 31, 1988, 9, 0, 0, 0 );
- status = rtems_clock_set( &time );
- directive_failed( status, "rtems_clock_set" );
-
- Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
- Task_name[ 2 ] = rtems_build_name( 'T', 'A', '2', ' ' );
- Task_name[ 3 ] = rtems_build_name( 'T', 'A', '3', ' ' );
-
- status = rtems_task_create(
- Task_name[ 1 ],
- 1,
- TASK_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_create of TA1" );
-
- status = rtems_task_create(
- Task_name[ 2 ],
- 1,
- TASK_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 2 ]
- );
- directive_failed( status, "rtems_task_create of TA2" );
-
- status = rtems_task_create(
- Task_name[ 3 ],
- 1,
- TASK_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 3 ]
- );
- directive_failed( status, "rtems_task_create of TA3" );
-
- status = rtems_task_start( Task_id[ 1 ], Task_1_through_3, 0 );
- directive_failed( status, "rtems_task_start of TA1" );
-
- status = rtems_task_start( Task_id[ 2 ], Task_1_through_3, 0 );
- directive_failed( status, "rtems_task_start of TA2" );
-
- status = rtems_task_start( Task_id[ 3 ], Task_1_through_3, 0 );
- directive_failed( status, "rtems_task_start of TA3" );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
diff --git a/testsuites/libtests/stackchk/stackchk.scn b/testsuites/libtests/stackchk/stackchk.scn
deleted file mode 100644
index 84a5c5e342..0000000000
--- a/testsuites/libtests/stackchk/stackchk.scn
+++ /dev/null
@@ -1,9 +0,0 @@
-*** TEST STACK CHECKER ***
-TA1 - rtems_clock_get - 09:00:00 12/31/1988
-TA2 - rtems_clock_get - 09:00:00 12/31/1988
-TA3 - rtems_clock_get - 09:00:00 12/31/1988
-TA1 - rtems_clock_get - 09:00:05 12/31/1988
-TA1 - rtems_clock_get - 09:00:10 12/31/1988
-TA2 - rtems_clock_get - 09:00:10 12/31/1988
-TA1 - rtems_clock_get - 09:00:15 12/31/1988
----> error indictation
diff --git a/testsuites/libtests/stackchk/system.h b/testsuites/libtests/stackchk/system.h
deleted file mode 100644
index 4c43388163..0000000000
--- a/testsuites/libtests/stackchk/system.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* macros */
-
-#define TASK_STACK_SIZE (RTEMS_MINIMUM_STACK_SIZE*3)
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_task Task_1_through_3(
- rtems_task_argument argument
-);
-
-void blow_stack( void );
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#define STACK_CHECKER_ON
-
-#include <confdefs.h>
-
-/* global variables */
-
-TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
-
-/* end of include file */
diff --git a/testsuites/libtests/stackchk/task1.c b/testsuites/libtests/stackchk/task1.c
deleted file mode 100644
index 7a95467485..0000000000
--- a/testsuites/libtests/stackchk/task1.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/* task1.c
- *
- * This set of three tasks do some simple task switching for about
- * 15 seconds and then call a routine to "blow the stack".
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task_1_through_3(
- rtems_task_argument argument
-)
-{
- rtems_id tid;
- rtems_time_of_day time;
- rtems_status_code status;
-
- status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
- directive_failed( status, "rtems_task_ident" );
-
- while( FOREVER ) {
- status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
- directive_failed( status, "rtems_clock_get" );
-
- if ( time.second >= 15 && tid == Task_id[ 1 ] ) {
- blow_stack();
- }
-
- put_name( Task_name[ task_number( tid ) ], FALSE );
- print_time( " - rtems_clock_get - ", &time, "\n" );
-
- status = rtems_task_wake_after( task_number( tid ) * 5 * TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
- }
-}
diff --git a/testsuites/libtests/termios/Makefile.am b/testsuites/libtests/termios/Makefile.am
deleted file mode 100644
index 455730ee90..0000000000
--- a/testsuites/libtests/termios/Makefile.am
+++ /dev/null
@@ -1,41 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = termios
-
-MANAGERS = io
-
-C_FILES = init.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES =
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES =
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(CC_FILES) $(H_FILES) $(S_FILES)
-OBJS = $(C_O_FILES) $(CC_O_FILES) $(S_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/libtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/libtests/termios/README b/testsuites/libtests/termios/README
deleted file mode 100644
index 6991d80309..0000000000
--- a/testsuites/libtests/termios/README
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# $Id$
-#
-
-These tests are brought to you by the letter `q'.
-
-VMIN=0, VTIME=0
- Each letter you type should produce a line of output.
- The `count' should be quite large, since (as you correctly
- pointed out) the read is non-blocking. The time should be
- the interval between typing characters.
- Type a `q' to finish the test.
-VMIN=0, VTIME=20
- Again, each letter should produce a line of output. The
- `count' should be much smaller -- the read is non-blocking
- but has a timeout of 2 seconds, so the count should be about
- half the `interval'.
- Type a `q' to finish the test.
-VMIN=5, VTIME=0
- A line should be produced for every 5 characters typed. The
- count should be 1. This is a blocking read.
- Type a `q' as the first character of a group of 5 to finish
- the test.
-VMIN=5, VTIME=20
- Type a character. Two seconds later a line should be printed.
- Count should be 1. Type a character, and another within 2
-seconds.
- Two seconds after last character (or right after the 5th
-character)
- a line should be printed.
- Type a `q' as the first character of a group to finish the test.
-
-Clear???
-
-Also, when testing the cooked mode input, try typing some tabs
-and/or control characters and make sure that you can backspace over
-them properly.
-
----
-Eric Norum
-eric@skatter.usask.ca
-Saskatchewan Accelerator Laboratory
-University of Saskatchewan
-Saskatoon, Canada.
-
diff --git a/testsuites/libtests/termios/init.c b/testsuites/libtests/termios/init.c
deleted file mode 100644
index 067b82ac07..0000000000
--- a/testsuites/libtests/termios/init.c
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * RTEMS configuration/initialization
- *
- * This program may be distributed and used for any purpose.
- * I ask only that you:
- * 1. Leave this author information intact.
- * 2. Document any changes you make.
- *
- * W. Eric Norum
- * Saskatchewan Accelerator Laboratory
- * University of Saskatchewan
- * Saskatoon, Saskatchewan, CANADA
- * eric@skatter.usask.ca
- *
- * $Id$
- */
-
-#include <bsp.h>
-
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#define CONFIGURE_MAXIMUM_SEMAPHORES 20
-#define CONFIGURE_MAXIMUM_TIMERS 5
-#define CONFIGURE_MAXIMUM_PERIODS 1
-
-#define CONFIGURE_MICROSECONDS_PER_TICK 1000
-
-#define CONFIGURE_INIT
-rtems_task Init (rtems_task_argument argument);
-
-#include <confdefs.h>
-
-#include <stdio.h>
-#include <unistd.h>
-#include <termios.h>
-#include <errno.h>
-#include <string.h>
-
-int fileno( FILE *stream); /* beyond ANSI */
-
-/*
- * Test raw (ICANON=0) input
- */
-static void
-testRawInput (int vmin, int vtime)
-{
- int i;
- struct termios old, new;
- rtems_interval ticksPerSecond, then, now;
- unsigned int msec;
- unsigned long count;
- int nread;
- unsigned char cbuf[100];
-
- printf ("*** Raw input VMIN=%d VTIME=%d ***\n", vmin, vtime);
- rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticksPerSecond);
- i = tcgetattr (fileno (stdin), &old);
- if (i < 0) {
- printf ("tcgetattr failed: %s\n", strerror (errno));
- return;
- }
- new = old;
- new.c_lflag &= ~(ICANON|ECHO|ECHONL|ECHOK|ECHOE|ECHOPRT|ECHOCTL);
- new.c_cc[VMIN] = vmin;
- new.c_cc[VTIME] = vtime;
- i = tcsetattr (fileno (stdin), TCSANOW, &new);
- if (i < 0) {
- printf ("tcsetattr failed: %s\n", strerror (errno));
- return;
- }
- do {
- rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then);
- count = 0;
- for (;;) {
- nread = read (fileno (stdin), cbuf, sizeof cbuf);
- if (nread < 0) {
- printf ("Read error: %s\n", strerror (errno));
- goto out;
- }
- count++;
- if (nread != 0)
- break;
- }
- rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now);
- msec = (now - then) * 1000 / ticksPerSecond;
- printf ("Count:%-10lu Interval:%3u.%3.3d Char:",
- count, msec / 1000, msec % 1000);
- for (i = 0 ; i < nread ; i++)
- printf (" %2.2x", cbuf[i]);
- printf ("\n");
- } while (cbuf[0] != 'q');
- out:
- i = tcsetattr (fileno (stdin), TCSANOW, &old);
- if (i < 0)
- printf ("tcsetattr failed: %s\n", strerror (errno));
- printf ("*** End of Raw input VMIN=%d VTIME=%d ***\n", vmin, vtime);
-}
-
-/*
- * RTEMS Startup Task
- */
-rtems_task
-Init (rtems_task_argument ignored)
-{
- int i, j;
-
- printf( "\n\n*** HELLO WORLD TEST ***\n" );
- printf( "Hello World\n" );
- printf( "*** END OF HELLO WORLD TEST ***\n" );
-
- printf( "\n\ntype 'q' to exit raw input tests\n\n" );
-
- for (;;) {
- /*
- * Test blocking, line-oriented input
- */
- do {
- printf (">>> ");
- fflush (stdout);
- i = scanf (" %d", &j);
- printf ("Return: %d Value: %d\n", i, j);
- } while (i != 0);
-
- /*
- * Consume what scanf rejected
- */
- while ((i = getchar ()) != '\n')
- if (i == EOF)
- break;
-
- /*
- * Test character-oriented input
- */
- testRawInput (0, 0);
- testRawInput (0, 20);
- testRawInput (5, 0);
- testRawInput (5, 20);
- }
- exit (1);
-}
diff --git a/testsuites/mptests/Makefile.am b/testsuites/mptests/Makefile.am
deleted file mode 100644
index 8143d1b540..0000000000
--- a/testsuites/mptests/Makefile.am
+++ /dev/null
@@ -1,14 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-
-SUBDIRS = mp01 mp02 mp03 mp04 mp05 mp06 mp07 mp08 mp09 mp10 mp11 mp12 mp13 \
- mp14
-
-EXTRA_DIST = mptests.am
-
-include $(top_srcdir)/../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/mptests/README b/testsuites/mptests/README
deleted file mode 100644
index 68cb459b55..0000000000
--- a/testsuites/mptests/README
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# $Id$
-#
-
-This directory contains the RTEMS Multiprocessor Test Suite.
-The tests in this directory provide near complete (98%+) test
-coverage of the multiprocessor specific code in RTEMS.
-
-These tests are designed to test RTEMS in a two node configuration.
-
diff --git a/testsuites/mptests/mp01/Makefile.am b/testsuites/mptests/mp01/Makefile.am
deleted file mode 100644
index cdae39f815..0000000000
--- a/testsuites/mptests/mp01/Makefile.am
+++ /dev/null
@@ -1,12 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-SUBDIRS = node1 node2
-
-EXTRA_DIST = system.h init.c task1.c
-
-include $(top_srcdir)/../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/mptests/mp01/init.c b/testsuites/mptests/mp01/init.c
deleted file mode 100644
index 22b7494a6a..0000000000
--- a/testsuites/mptests/mp01/init.c
+++ /dev/null
@@ -1,95 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is a user initialization task and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
- rtems_time_of_day time;
- char c;
-
- printf(
- "\n\n*** TEST 1 -- NODE %d ***\n",
- Multiprocessing_configuration.node
- );
-
- if ( Multiprocessing_configuration.node != 1 ) c = 'S';
- else c = 'M';
-
- Task_name[ 1 ] = rtems_build_name( c, 'A', '1', ' ' );
- Task_name[ 2 ] = rtems_build_name( c, 'A', '2', ' ' );
- Task_name[ 3 ] = rtems_build_name( c, 'A', '3', ' ' );
-
- build_time( &time, 12, 31, 1988, 9, 0, 0, 0 );
- status = rtems_clock_set( &time );
- directive_failed( status, "rtems_clock_set" );
-
- puts( "Creating task 1 (Global)" );
- status = rtems_task_create(
- Task_name[ 1 ],
- 1,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_GLOBAL,
- &Task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_create of Task 1" );
-
- puts( "Creating task 2 (Global)" );
- status = rtems_task_create(
- Task_name[ 2 ],
- 1,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_TIMESLICE,
- RTEMS_GLOBAL,
- &Task_id[ 2 ]
- );
- directive_failed( status, "rtems_task_create of Task 2" );
-
- puts( "Creating task 3 (Local)" );
- status = rtems_task_create(
- Task_name[ 3 ],
- 1,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 3 ]
- );
- directive_failed( status, "rtems_task_create of Task 3" );
-
- status = rtems_task_start( Task_id[ 1 ], Test_task, 0 );
- directive_failed( status, "rtems_task_start of Task 1" );
-
- status = rtems_task_start( Task_id[ 2 ], Test_task, 0 );
- directive_failed( status, "rtems_task_start of Task 2" );
-
- status = rtems_task_start( Task_id[ 3 ], Test_task, 0 );
- directive_failed( status, "rtems_task_start of Task 3" );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
diff --git a/testsuites/mptests/mp01/node1/Makefile.am b/testsuites/mptests/mp01/node1/Makefile.am
deleted file mode 100644
index 36d8d0dfb4..0000000000
--- a/testsuites/mptests/mp01/node1/Makefile.am
+++ /dev/null
@@ -1,50 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-VPATH = @srcdir@:@srcdir@/..
-
-NODE = 1
-TEST = mp01
-PGM = ${ARCH}/$(TEST)-node$(NODE).exe
-
-MANAGERS = io mp
-
-C_FILES = init.c task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/mptests.am
-
-if HAS_MP
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -DNODE_NUMBER=$(NODE) -I$(srcdir)/..
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-else
-all-local:
-endif
-
-EXTRA_DIST = $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/mptests/mp01/node1/mp01.doc b/testsuites/mptests/mp01/node1/mp01.doc
deleted file mode 100644
index 58810185c6..0000000000
--- a/testsuites/mptests/mp01/node1/mp01.doc
+++ /dev/null
@@ -1,52 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: test50
-
-directives:
- ex_init, ex_start, t_create, t_start, tm_tick, i_return, t_ident,
- tm_set, tm_get, tm_wkafter, t_delete
-
-concepts:
-
- a. Verifies system can create and start both the executive's system
- initialization and idle task.
-
- b. Verifies executive can swap between three application tasks at the
- same priority and the executive's internal idle task.
-
- c. Verifies can print strings to the CRT on port 2 of the mvme136 board
- using Print and Println in the board support package.
-
- d. Verifies interrupt handler can handler a task switch from an interrupt
- as specified with the i_return directive.
-
- e. Verifies executive initialization performed correctly.
-
- f. Verifies the executive trap handler except for the halt function.
-
- g. Verifies that a task can get the task identification number of itself.
-
- h. Verifies that a task can get the task identification number
- of a global task on the local processor.
-
- i. Verifies that a task can delete itself or a global task on
- the local processor.
-
- j. Verifies Shared Memory Locked Queue driver for initialization,
- getting a packet, broadcasting a packet, and returning a packet.
-
- k. Can be used to verify that global packet type P_SYSVERIFY,
- P_OBJCREATE (task), and P_OBJDELETE (task) are sent and
- correctly processed by a remote node.
diff --git a/testsuites/mptests/mp01/node1/mp01.scn b/testsuites/mptests/mp01/node1/mp01.scn
deleted file mode 100644
index d399f79b2a..0000000000
--- a/testsuites/mptests/mp01/node1/mp01.scn
+++ /dev/null
@@ -1,15 +0,0 @@
-*** TEST 1 -- NODE 1 ***
-Creating task 1 (Global)
-Creating task 2 (Global)
-Creating task 3 (Local)
-MA1 - rtems_clock_get - 09:00:00 12/31/1988
-MA2 - rtems_clock_get - 09:00:00 12/31/1988
-MA3 - rtems_clock_get - 09:00:00 12/31/1988
-MA1 - rtems_clock_get - 09:00:05 12/31/1988
-MA1 - deleting self
-MA2 - rtems_clock_get - 09:00:10 12/31/1988
-MA2 - waiting to be deleted by MA3
-MA3 - rtems_clock_get - 09:00:15 12/31/1988
-MA3 - getting TID of MA2
-MA3 - deleting MA2
-*** END OF TEST 1 ***
diff --git a/testsuites/mptests/mp01/node2/Makefile.am b/testsuites/mptests/mp01/node2/Makefile.am
deleted file mode 100644
index 0a80134c68..0000000000
--- a/testsuites/mptests/mp01/node2/Makefile.am
+++ /dev/null
@@ -1,50 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-VPATH = @srcdir@:@srcdir@/..
-
-NODE = 2
-TEST = mp01
-PGM = ${ARCH}/$(TEST)-node$(NODE).exe
-
-MANAGERS = io mp
-
-C_FILES = init.c task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/mptests.am
-
-if HAS_MP
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -DNODE_NUMBER=$(NODE) -I$(srcdir)/..
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-else
-all-local:
-endif
-
-EXTRA_DIST = $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/mptests/mp01/node2/mp01.doc b/testsuites/mptests/mp01/node2/mp01.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/mptests/mp01/node2/mp01.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/mptests/mp01/node2/mp01.scn b/testsuites/mptests/mp01/node2/mp01.scn
deleted file mode 100644
index c9831ff9db..0000000000
--- a/testsuites/mptests/mp01/node2/mp01.scn
+++ /dev/null
@@ -1,15 +0,0 @@
-*** TEST 1 -- NODE 2 ***
-Creating task 1 (Global)
-Creating task 2 (Global)
-Creating task 3 (Local)
-SA1 - rtems_clock_get - 09:00:00 12/31/1988
-SA2 - rtems_clock_get - 09:00:00 12/31/1988
-SA3 - rtems_clock_get - 09:00:00 12/31/1988
-SA1 - rtems_clock_get - 09:00:05 12/31/1988
-SA1 - deleting self
-SA2 - rtems_clock_get - 09:00:10 12/31/1988
-SA2 - waiting to be deleted by SA3
-SA3 - rtems_clock_get - 09:00:15 12/31/1988
-SA3 - getting TID of SA2
-SA3 - deleting SA2
-*** END OF TEST 1 ***
diff --git a/testsuites/mptests/mp01/system.h b/testsuites/mptests/mp01/system.h
deleted file mode 100644
index c1ce67d249..0000000000
--- a/testsuites/mptests/mp01/system.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_task Test_task(
- rtems_task_argument argument
-);
-
-/* configuration information */
-
-#define CONFIGURE_MPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_GLOBAL
-
-#include <confdefs.h>
-
-/* variables */
-
-TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
-
-/* end of include file */
diff --git a/testsuites/mptests/mp01/task1.c b/testsuites/mptests/mp01/task1.c
deleted file mode 100644
index 958860691f..0000000000
--- a/testsuites/mptests/mp01/task1.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/* Test_task
- *
- * This task is used for three test tasks. It obtains its task id and
- * based upon that id, performs certain actions.
- *
- * Task_1 delays 5 seconds and deletes itself.
- * Task_2 delays 10 seconds and then loops until
- * deleted by the third task.
- * Task 3 delays 15 seconds, then deletes task 2 and itself.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Test_task(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
- rtems_id tid;
- rtems_time_of_day time;
-
- status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
- directive_failed( status, "rtems_task_ident" );
-
- status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
- directive_failed( status, "rtems_clock_get" );
-
- put_name( Task_name[ task_number( tid ) ], FALSE );
- print_time( " - rtems_clock_get - ", &time, "\n" );
-
- status = rtems_task_wake_after( task_number( tid ) * 1 * TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
-
- status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
- directive_failed( status, "rtems_clock_get" );
- put_name( Task_name[ task_number( tid ) ], FALSE );
- print_time( " - rtems_clock_get - ", &time, "\n" );
-
- if ( task_number(tid) == 1 ) { /* TASK 1 */
- put_name( Task_name[ 1 ], FALSE );
- printf( " - deleting self\n" );
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
- }
- else if ( task_number(tid) == 2 ) { /* TASK 2 */
- put_name( Task_name[ 2 ], FALSE );
- printf( " - waiting to be deleted by " );
- put_name( Task_name[ 3 ], TRUE );
- while ( FOREVER );
- }
- else { /* TASK 3 */
- put_name( Task_name[ 3 ], FALSE );
- printf( " - getting TID of " );
- put_name( Task_name[ 2 ], TRUE );
- do {
- status = rtems_task_ident( Task_name[ 2 ], RTEMS_SEARCH_ALL_NODES, &tid );
- } while ( status != RTEMS_SUCCESSFUL );
- directive_failed( status, "rtems_task_ident" );
-
- put_name( Task_name[ 3 ], FALSE );
- printf( " - deleting " );
- put_name( Task_name[ 2 ], TRUE );
- status = rtems_task_delete( tid );
- directive_failed( status, "rtems_task_delete of Task 2" );
-
- puts( "*** END OF TEST 1 ***" );
- exit(0);
- }
-}
diff --git a/testsuites/mptests/mp02/Makefile.am b/testsuites/mptests/mp02/Makefile.am
deleted file mode 100644
index cdae39f815..0000000000
--- a/testsuites/mptests/mp02/Makefile.am
+++ /dev/null
@@ -1,12 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-SUBDIRS = node1 node2
-
-EXTRA_DIST = system.h init.c task1.c
-
-include $(top_srcdir)/../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/mptests/mp02/init.c b/testsuites/mptests/mp02/init.c
deleted file mode 100644
index aee81c906c..0000000000
--- a/testsuites/mptests/mp02/init.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is a user initialization task and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- printf(
- "\n\n*** TEST 2 -- NODE %d ***\n",
- Multiprocessing_configuration.node
- );
-
- Task_name[ 1 ] = rtems_build_name( '1', '1', '1', ' ' );
- Task_name[ 2 ] = rtems_build_name( '2', '2', '2', ' ' );
-
- puts( "Creating Test_task (Global)" );
- status = rtems_task_create(
- Task_name[Multiprocessing_configuration.node],
- 1,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_NO_PREEMPT,
- RTEMS_GLOBAL,
- &Task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_create" );
-
- puts( "Starting Test_task (Global)" );
- status = rtems_task_start( Task_id[ 1 ], Test_task, 0 );
- directive_failed( status, "rtems_task_start" );
-
- puts( "Deleting initialization task" );
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
diff --git a/testsuites/mptests/mp02/node1/Makefile.am b/testsuites/mptests/mp02/node1/Makefile.am
deleted file mode 100644
index 4f1f920303..0000000000
--- a/testsuites/mptests/mp02/node1/Makefile.am
+++ /dev/null
@@ -1,50 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-VPATH = @srcdir@:@srcdir@/..
-
-NODE = 1
-TEST = mp02
-PGM = ${ARCH}/$(TEST)-node$(NODE).exe
-
-MANAGERS = io mp
-
-C_FILES = init.c task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/mptests.am
-
-if HAS_MP
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -DNODE_NUMBER=$(NODE) -I$(srcdir)/..
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-else
-all-local:
-endif
-
-EXTRA_DIST = $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/mptests/mp02/node1/mp02.doc b/testsuites/mptests/mp02/node1/mp02.doc
deleted file mode 100644
index e8e1fed5fb..0000000000
--- a/testsuites/mptests/mp02/node1/mp02.doc
+++ /dev/null
@@ -1,46 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: test51
-
-directives:
- ex_init, ex_start, t_create, t_start, tm_tick, i_return, t_ident,
- tm_set, tm_get, tm_wkafter, t_delete, t_restart, t_getreg, t_setreg
-
-concepts:
-
- a. Verifies system can create and start both the executive's system
- initialization and idle task.
-
- b. Verifies can print strings to the CRT on port 2 of the mvme136 board
- using Print and Println in the board support package.
-
- c. Verifies interrupt handler can handler a task switch from an interrupt
- as specified with the i_return directive.
-
- d. Verifies executive initialization performed correctly.
-
- e. Verifies that a task can get the task identification number of itself.
-
- f. Verifies that a task can get the task identification number
- of another task.
-
- g. Verifies that a task can delete itself or another task.
-
- h. Verifies that errors are returned in the following situations:
- 1) when attempting to delete a remote task.
- 2) when attempting to start a remote task.
- 3) when attempting to restart a remote task.
-
- i. Verifies that a remote task's registers can be set and read.
diff --git a/testsuites/mptests/mp02/node1/mp02.scn b/testsuites/mptests/mp02/node1/mp02.scn
deleted file mode 100644
index 72fdefe69d..0000000000
--- a/testsuites/mptests/mp02/node1/mp02.scn
+++ /dev/null
@@ -1,14 +0,0 @@
-*** TEST 2 -- NODE 1 ***
-Creating Test_task (Global)
-Starting Test_task (Global)
-Deleting initialization task
-Remote task's name is : 222
-Getting TID of remote task (all nodes)
-Getting TID of remote task (1 node)
-rtems_task_delete of remote task returned the correct error
-rtems_task_start of remote task returned the correct error
-rtems_task_restart of remote task returned the correct error
-Setting notepad 1 of the remote task to 1
-Getting a notepad of the remote task
-Remote notepad set and read correctly
-*** END OF TEST 2 ***
diff --git a/testsuites/mptests/mp02/node2/Makefile.am b/testsuites/mptests/mp02/node2/Makefile.am
deleted file mode 100644
index 9887d04d42..0000000000
--- a/testsuites/mptests/mp02/node2/Makefile.am
+++ /dev/null
@@ -1,50 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-VPATH = @srcdir@:@srcdir@/..
-
-NODE = 2
-TEST = mp02
-PGM = ${ARCH}/$(TEST)-node$(NODE).exe
-
-MANAGERS = io mp
-
-C_FILES = init.c task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/mptests.am
-
-if HAS_MP
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -DNODE_NUMBER=$(NODE) -I$(srcdir)/..
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-else
-all-local:
-endif
-
-EXTRA_DIST = $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/mptests/mp02/node2/mp02.doc b/testsuites/mptests/mp02/node2/mp02.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/mptests/mp02/node2/mp02.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/mptests/mp02/node2/mp02.scn b/testsuites/mptests/mp02/node2/mp02.scn
deleted file mode 100644
index 233a910999..0000000000
--- a/testsuites/mptests/mp02/node2/mp02.scn
+++ /dev/null
@@ -1,14 +0,0 @@
-*** TEST 2 -- NODE 2 ***
-Creating Test_task (Global)
-Starting Test_task (Global)
-Deleting initialization task
-Remote task's name is : 111
-Getting TID of remote task (all nodes)
-Getting TID of remote task (1 node)
-rtems_task_delete of remote task returned the correct error
-rtems_task_start of remote task returned the correct error
-rtems_task_restart of remote task returned the correct error
-Setting notepad 2 of the remote task to 2
-Getting a notepad of the remote task
-Remote notepad set and read correctly
-*** END OF TEST 2 ***
diff --git a/testsuites/mptests/mp02/system.h b/testsuites/mptests/mp02/system.h
deleted file mode 100644
index af065a5e67..0000000000
--- a/testsuites/mptests/mp02/system.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_task Test_task(
- rtems_task_argument argument
-);
-
-/* configuration information */
-
-#define CONFIGURE_MPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* variables */
-
-TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
-
-/* end of include file */
diff --git a/testsuites/mptests/mp02/task1.c b/testsuites/mptests/mp02/task1.c
deleted file mode 100644
index 7837f475a4..0000000000
--- a/testsuites/mptests/mp02/task1.c
+++ /dev/null
@@ -1,117 +0,0 @@
-/* Test_task
- *
- * This task tests the rtems_task_set_note directive on a remote task and that
- * errors are returned when attempting to delete, start, or restart
- * a remote task.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-extern rtems_multiprocessing_table Multiprocessing_configuration;
-
-rtems_task Test_task(
- rtems_task_argument argument
-)
-{
- rtems_id tid;
- rtems_status_code status;
- rtems_unsigned32 remote_node;
- rtems_id remote_tid;
- rtems_id test_tid;
- rtems_unsigned32 note;
-
- status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
-
- remote_node = (Multiprocessing_configuration.node == 1) ? 2 : 1;
- printf( "Remote task's name is : " );
- put_name( Task_name[ remote_node ], TRUE );
-
- puts( "Getting TID of remote task (all nodes)" );
- do {
- status = rtems_task_ident(
- Task_name[ remote_node ],
- RTEMS_SEARCH_ALL_NODES,
- &remote_tid
- );
- } while ( status != RTEMS_SUCCESSFUL );
-
- directive_failed( status, "rtems_task_ident" );
-
- puts( "Getting TID of remote task (1 node)" );
- status = rtems_task_ident( Task_name[ remote_node ], remote_node, &test_tid );
- directive_failed( status, "rtems_task_ident" );
-
- if ( test_tid != remote_tid ) {
- puts( "rtems_task_ident tid's do not match!!" );
- rtems_fatal_error_occurred( status );
- }
-
- status = rtems_task_delete( remote_tid );
- fatal_directive_status(
- status,
- RTEMS_ILLEGAL_ON_REMOTE_OBJECT,
- "rtems_task_delete of remote task"
- );
- puts( "rtems_task_delete of remote task returned the correct error" );
-
- status = rtems_task_start( remote_tid, Test_task, 0 );
- fatal_directive_status(
- status,
- RTEMS_ILLEGAL_ON_REMOTE_OBJECT,
- "rtems_task_start of remote task"
- );
- puts( "rtems_task_start of remote task returned the correct error" );
-
- status = rtems_task_restart( remote_tid, 0 );
- fatal_directive_status(
- status,
- RTEMS_ILLEGAL_ON_REMOTE_OBJECT,
- "rtems_task_restart of remote task"
- );
- puts( "rtems_task_restart of remote task returned the correct error" );
-
- printf(
- "Setting notepad %d of the remote task to %d\n",
- rtems_get_node(tid),
- rtems_get_node(tid)
- );
- status = rtems_task_set_note(
- remote_tid,
- rtems_get_node(tid),
- rtems_get_node(tid)
- );
- directive_failed( status, "rtems_task_set_note" );
-
- puts( "Getting a notepad of the remote task" );
- status = rtems_task_get_note( remote_tid, rtems_get_node(tid), &note );
- directive_failed( status, "rtems_task_get_note" );
-
- if ( note == rtems_get_node(tid) )
- puts( "Remote notepad set and read correctly" );
- else
- printf(
- "FAILURE!! Remote notepad was not set and read correctly (%d, %d)\n",
- note,
- rtems_get_node( tid )
- );
-
- status = rtems_task_wake_after( TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
-
- puts( "*** END OF TEST 2 ***" );
- exit( 0 );
-}
diff --git a/testsuites/mptests/mp03/Makefile.am b/testsuites/mptests/mp03/Makefile.am
deleted file mode 100644
index c467df661d..0000000000
--- a/testsuites/mptests/mp03/Makefile.am
+++ /dev/null
@@ -1,12 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-SUBDIRS = node1 node2
-
-EXTRA_DIST = system.h delay.c init.c task1.c
-
-include $(top_srcdir)/../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/mptests/mp03/delay.c b/testsuites/mptests/mp03/delay.c
deleted file mode 100644
index 957a18aa7f..0000000000
--- a/testsuites/mptests/mp03/delay.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Delayed_send_event
- *
- * This routine is a timer service routine which sends an event to task 1.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_timer_service_routine Delayed_send_event(
- rtems_id ignored_id,
- void *ignored_address
-)
-{
- rtems_status_code status;
-
- status = rtems_event_send( Task_id[ 1 ], RTEMS_EVENT_16 );
- directive_failed( status, "rtems_event_send" );
-}
diff --git a/testsuites/mptests/mp03/init.c b/testsuites/mptests/mp03/init.c
deleted file mode 100644
index edf1060d92..0000000000
--- a/testsuites/mptests/mp03/init.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is a user initialization task and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- printf(
- "\n\n*** TEST 3 -- NODE %d ***\n",
- Multiprocessing_configuration.node
- );
-
- Task_name[ 1 ] = rtems_build_name( '1', '1', '1', ' ' );
- Task_name[ 2 ] = rtems_build_name( '2', '2', '2', ' ' );
-
- puts( "Creating Test_task (Global)" );
- status = rtems_task_create(
- Task_name[ Multiprocessing_configuration.node ],
- 1,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_NO_PREEMPT,
- RTEMS_GLOBAL,
- &Task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_create" );
-
- puts( "Starting Test_task (Global)" );
- status = rtems_task_start( Task_id[ 1 ], Test_task, 0 );
- directive_failed( status, "rtems_task_start" );
-
- Timer_name[ 1 ] = rtems_build_name( 'T', 'M', '1', ' ' );
-
- status = rtems_timer_create( Timer_name[ 1 ], &Timer_id[ 1 ] );
- directive_failed( status, "rtems_timer_create" );
-
- puts( "Deleting initialization task" );
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
diff --git a/testsuites/mptests/mp03/node1/Makefile.am b/testsuites/mptests/mp03/node1/Makefile.am
deleted file mode 100644
index 94e3c5d068..0000000000
--- a/testsuites/mptests/mp03/node1/Makefile.am
+++ /dev/null
@@ -1,50 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-VPATH = @srcdir@:@srcdir@/..
-
-NODE = 1
-TEST = mp03
-PGM = ${ARCH}/$(TEST)-node$(NODE).exe
-
-MANAGERS = io mp timer event
-
-C_FILES = init.c task1.c delay.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/mptests.am
-
-if HAS_MP
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -DNODE_NUMBER=$(NODE) -I$(srcdir)/..
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-else
-all-local:
-endif
-
-EXTRA_DIST = $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/mptests/mp03/node1/mp03.doc b/testsuites/mptests/mp03/node1/mp03.doc
deleted file mode 100644
index da8d744432..0000000000
--- a/testsuites/mptests/mp03/node1/mp03.doc
+++ /dev/null
@@ -1,44 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: test52
-
-directives:
- ex_init, ex_start, t_create, t_start, tm_tick, i_return, t_ident,
- tm_wkafter, t_suspend, t_resume
-
-concepts:
-
- a. Verifies system can create and start both the executive's system
- initialization and idle task.
-
- b. Verifies executive can swap between three application tasks at the
- same priority and the executive's internal idle task.
-
- c. Verifies can print strings to the CRT on port 2 of the mvme136 board
- using Print and Println in the board support package.
-
- d. Verifies interrupt handler can handler a task switch from an interrupt
- as specified with the i_return directive.
-
- e. Verifies executive initialization performed correctly.
-
- f. Verifies the executive trap handler except for the halt function.
-
- g. Verifies that a task can get the task identification number of itself.
-
- h. Verifies that a task can get the task identification number
- of another task (on another node).
-
- i. Verifies that a task can suspend and resume a remote task.
diff --git a/testsuites/mptests/mp03/node1/mp03.scn b/testsuites/mptests/mp03/node1/mp03.scn
deleted file mode 100644
index 129e5bccba..0000000000
--- a/testsuites/mptests/mp03/node1/mp03.scn
+++ /dev/null
@@ -1,24 +0,0 @@
-*** TEST 3 -- NODE 1 ***
-Creating Test_task (Global)
-Starting Test_task (Global)
-Deleting initialization task
-Getting TID of remote task
-Remote task's name is : 222
-111 - Suspending remote task
-111 - Resuming remote task
-111 - Suspending remote task
-111 - Resuming remote task
-111 - Suspending remote task
-111 - Resuming remote task
-111 - Have I been suspended?????
-111 - Have I been suspended?????
-111 - Have I been suspended?????
-111 - Have I been suspended?????
-
- ........
-
-111 - Have I been suspended?????
-111 - Have I been suspended?????
-111 - Have I been suspended?????
-111 - Have I been suspended?????
-*** END OF TEST 3 ***
diff --git a/testsuites/mptests/mp03/node2/Makefile.am b/testsuites/mptests/mp03/node2/Makefile.am
deleted file mode 100644
index 08acad9391..0000000000
--- a/testsuites/mptests/mp03/node2/Makefile.am
+++ /dev/null
@@ -1,50 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-VPATH = @srcdir@:@srcdir@/..
-
-NODE = 2
-TEST = mp03
-PGM = ${ARCH}/$(TEST)-node$(NODE).exe
-
-MANAGERS = io mp timer event
-
-C_FILES = init.c delay.c task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/mptests.am
-
-if HAS_MP
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -DNODE_NUMBER=$(NODE) -I$(srcdir)/..
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-else
-all-local:
-endif
-
-EXTRA_DIST = $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/mptests/mp03/node2/mp03.doc b/testsuites/mptests/mp03/node2/mp03.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/mptests/mp03/node2/mp03.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/mptests/mp03/node2/mp03.scn b/testsuites/mptests/mp03/node2/mp03.scn
deleted file mode 100644
index d77c09e9f7..0000000000
--- a/testsuites/mptests/mp03/node2/mp03.scn
+++ /dev/null
@@ -1,24 +0,0 @@
-*** TEST 3 -- NODE 2 ***
-Creating Test_task (Global)
-Starting Test_task (Global)
-Deleting initialization task
-Getting TID of remote task
-Remote task's name is : 111
-222 - Have I been suspended?????
-222 - Have I been suspended?????
-222 - Have I been suspended?????
-222 - Have I been suspended?????
-
- ........
-
-222 - Have I been suspended?????
-222 - Have I been suspended?????
-222 - Have I been suspended?????
-222 - Have I been suspended?????
-222 - Suspending remote task
-222 - Resuming remote task
-222 - Suspending remote task
-222 - Resuming remote task
-222 - Suspending remote task
-222 - Resuming remote task
-*** END OF TEST 3 ***
diff --git a/testsuites/mptests/mp03/system.h b/testsuites/mptests/mp03/system.h
deleted file mode 100644
index c2c27f3196..0000000000
--- a/testsuites/mptests/mp03/system.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_task Test_task(
- rtems_task_argument argument
-);
-
-rtems_timer_service_routine Delayed_send_event(
- rtems_id ignored_id,
- void *ignored_address
-);
-
-/* configuration information */
-
-#define CONFIGURE_MPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MAXIMUM_TIMERS 1
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* variables */
-
-TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
-
-TEST_EXTERN rtems_id Timer_id[ 2 ]; /* array of timer ids */
-TEST_EXTERN rtems_name Timer_name[ 2 ]; /* array of timer names */
-
-TEST_EXTERN rtems_unsigned32 remote_node;
-TEST_EXTERN rtems_id remote_tid;
-
-/* end of include file */
diff --git a/testsuites/mptests/mp03/task1.c b/testsuites/mptests/mp03/task1.c
deleted file mode 100644
index 7645619e8a..0000000000
--- a/testsuites/mptests/mp03/task1.c
+++ /dev/null
@@ -1,154 +0,0 @@
-/* Test_task
- *
- * This task suspends and resumes a remote task.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-/*PAGE
- *
- * Test_Task_Support
- *
- */
-
-void Test_Task_Support(
- rtems_unsigned32 node
-)
-{
- rtems_event_set events;
- rtems_status_code status;
-
- if ( Multiprocessing_configuration.node == node ) {
-
- for ( ; ; ) {
-
- status = rtems_event_receive(
- RTEMS_EVENT_16,
- RTEMS_NO_WAIT,
- RTEMS_NO_TIMEOUT,
- &events
- );
-
- if ( status == RTEMS_SUCCESSFUL )
- break;
-
- fatal_directive_status(status, RTEMS_UNSATISFIED, "rtems_event_receive");
-
- status = rtems_task_wake_after( 2 * TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
-
- put_name( Task_name[ node ], FALSE );
- puts( " - Suspending remote task" );
-
- status = rtems_task_suspend( remote_tid );
- directive_failed( status, "rtems_task_suspend" );
-
- status = rtems_task_wake_after( 2 * TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
-
- put_name( Task_name[ node ], FALSE );
- puts( " - Resuming remote task" );
-
- status = rtems_task_resume( remote_tid ) ;
- directive_failed( status, "rtems_task_resume" );
-
- }
-
- } else {
-
- for ( ; ; ) {
- status = rtems_event_receive(
- RTEMS_EVENT_16,
- RTEMS_NO_WAIT,
- RTEMS_NO_TIMEOUT,
- &events
- );
-
- if ( status == RTEMS_SUCCESSFUL )
- break;
-
- fatal_directive_status(status, RTEMS_UNSATISFIED, "rtems_event_receive");
-
- put_name( Task_name[ remote_node ], FALSE );
- puts( " - have I been suspended???" );
-
- status = rtems_task_wake_after( TICKS_PER_SECOND / 2 );
- directive_failed( status, "rtems_task_wake_after" );
- }
-
- }
-
-}
-
-/*PAGE
- *
- * Test_task
- */
-
-rtems_task Test_task(
- rtems_task_argument argument
-)
-{
- rtems_id tid;
- rtems_status_code status;
-
- status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
- directive_failed( status, "rtems_task_ident" );
-
- puts( "Getting TID of remote task" );
- remote_node = (Multiprocessing_configuration.node == 1) ? 2 : 1;
- printf( "Remote task's name is : " );
- put_name( Task_name[ remote_node ], TRUE );
-
- do {
- status = rtems_task_ident(
- Task_name[ remote_node ],
- RTEMS_SEARCH_ALL_NODES,
- &remote_tid
- );
- } while ( status != RTEMS_SUCCESSFUL );
-
- directive_failed( status, "rtems_task_ident" );
-
- status = rtems_timer_fire_after(
- Timer_id[ 1 ],
- 5 * TICKS_PER_SECOND,
- Delayed_send_event,
- NULL
- );
- directive_failed( status, "rtems_timer_fire_after" );
-
- Test_Task_Support( 1 );
-
- status = rtems_timer_fire_after(
- Timer_id[ 1 ],
- 5 * TICKS_PER_SECOND,
- Delayed_send_event,
- NULL
- );
- directive_failed( status, "rtems_timer_fire_after" );
-
- if ( Multiprocessing_configuration.node == 1 ) {
- status = rtems_task_wake_after( 2 * TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
- }
-
- Test_Task_Support( 2 );
-
- puts( "*** END OF TEST 3 ***" );
- exit( 0 );
-}
diff --git a/testsuites/mptests/mp04/Makefile.am b/testsuites/mptests/mp04/Makefile.am
deleted file mode 100644
index cdae39f815..0000000000
--- a/testsuites/mptests/mp04/Makefile.am
+++ /dev/null
@@ -1,12 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-SUBDIRS = node1 node2
-
-EXTRA_DIST = system.h init.c task1.c
-
-include $(top_srcdir)/../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/mptests/mp04/init.c b/testsuites/mptests/mp04/init.c
deleted file mode 100644
index 05d2959e3b..0000000000
--- a/testsuites/mptests/mp04/init.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is a user initialization task and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- printf(
- "\n\n*** TEST 4 -- NODE %d ***\n",
- Multiprocessing_configuration.node
- );
-
- Task_name[ 1 ] = rtems_build_name( '1', '1', '1', ' ' );
- Task_name[ 2 ] = rtems_build_name( '2', '2', '2', ' ' );
-
- puts( "Creating Test_task (Global)" );
- status = rtems_task_create(
- Task_name[ Multiprocessing_configuration.node ],
- Multiprocessing_configuration.node,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_GLOBAL,
- &Task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_create" );
-
- puts( "Starting Test_task (Global)" );
- status = rtems_task_start( Task_id[ 1 ], Test_task, 0 );
- directive_failed( status, "rtems_task_start" );
-
- puts( "Deleting initialization task" );
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
diff --git a/testsuites/mptests/mp04/node1/Makefile.am b/testsuites/mptests/mp04/node1/Makefile.am
deleted file mode 100644
index 20201ccb6a..0000000000
--- a/testsuites/mptests/mp04/node1/Makefile.am
+++ /dev/null
@@ -1,50 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-VPATH = @srcdir@:@srcdir@/..
-
-NODE = 1
-TEST = mp04
-PGM = ${ARCH}/$(TEST)-node$(NODE).exe
-
-MANAGERS = io mp
-
-C_FILES = init.c task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/mptests.am
-
-if HAS_MP
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -DNODE_NUMBER=$(NODE) -I$(srcdir)/..
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-else
-all-local:
-endif
-
-EXTRA_DIST = $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/mptests/mp04/node1/mp04.doc b/testsuites/mptests/mp04/node1/mp04.doc
deleted file mode 100644
index d9330e0799..0000000000
--- a/testsuites/mptests/mp04/node1/mp04.doc
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: test53
-
-directives:
- ex_init, ex_start, t_create, t_start, i_return, t_ident, tm_get,
- tm_wkafter, tm_setpri
-
-concepts:
-
- a. Verifies system can create and start both the executive's system
- initialization and idle task.
-
- b. Verifies that the system can get the id of a remote task.
-
- c. Verifies that the system can change the priority of a remote
- task.
-
- d. Verifies interrupt handler can handler a task switch from an interrupt
- as specified with the i_return directive.
-
- e. Verifies executive initialization performed correctly.
-
- f. Verifies the executive trap handler except for the halt function.
-
- g. Verifies that a task can get the task identification number of itself.
-
- h. Verifies that a task can delete itself or another task.
diff --git a/testsuites/mptests/mp04/node1/mp04.scn b/testsuites/mptests/mp04/node1/mp04.scn
deleted file mode 100644
index e9518f3ac2..0000000000
--- a/testsuites/mptests/mp04/node1/mp04.scn
+++ /dev/null
@@ -1,8 +0,0 @@
-*** TEST 4 -- NODE 1 ***
-Creating Test_task (Global)
-Starting Test_task (Global)
-Deleting initialization task
-Getting TID of remote task
-Remote task's name is : 222
-Local task priority has been set
-*** END OF TEST 4 ***
diff --git a/testsuites/mptests/mp04/node2/Makefile.am b/testsuites/mptests/mp04/node2/Makefile.am
deleted file mode 100644
index a3a537743a..0000000000
--- a/testsuites/mptests/mp04/node2/Makefile.am
+++ /dev/null
@@ -1,50 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-VPATH = @srcdir@:@srcdir@/..
-
-NODE = 2
-TEST = mp04
-PGM = ${ARCH}/$(TEST)-node$(NODE).exe
-
-MANAGERS = io mp
-
-C_FILES = init.c task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/mptests.am
-
-if HAS_MP
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -DNODE_NUMBER=$(NODE) -I$(srcdir)/..
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-else
-all-local:
-endif
-
-EXTRA_DIST = $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/mptests/mp04/node2/mp04.doc b/testsuites/mptests/mp04/node2/mp04.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/mptests/mp04/node2/mp04.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/mptests/mp04/node2/mp04.scn b/testsuites/mptests/mp04/node2/mp04.scn
deleted file mode 100644
index 8ccfcfef79..0000000000
--- a/testsuites/mptests/mp04/node2/mp04.scn
+++ /dev/null
@@ -1,8 +0,0 @@
-*** TEST 4 -- NODE 2 ***
-Creating Test_task (Global)
-Starting Test_task (Global)
-Deleting initialization task
-Getting TID of remote task
-Remote task's name is : 111
-Local task priority has been set
-*** END OF TEST 4 ***
diff --git a/testsuites/mptests/mp04/system.h b/testsuites/mptests/mp04/system.h
deleted file mode 100644
index 0b343c86a3..0000000000
--- a/testsuites/mptests/mp04/system.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_task Test_task(
- rtems_task_argument argument
-);
-
-/* configuration information */
-
-#define CONFIGURE_MPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MAXIMUM_TIMERS 1
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* variables */
-
-TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
-
-/* end of include file */
diff --git a/testsuites/mptests/mp04/task1.c b/testsuites/mptests/mp04/task1.c
deleted file mode 100644
index 49419f0979..0000000000
--- a/testsuites/mptests/mp04/task1.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/* Test_task
- *
- * This task tests the rtems_task_set_priority directive on a remote task.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-extern rtems_multiprocessing_table Multiprocessing_configuration;
-
-rtems_task Test_task(
- rtems_task_argument argument
-)
-{
- rtems_id tid;
- rtems_status_code status;
- rtems_unsigned32 remote_node;
- rtems_id remote_tid;
- rtems_task_priority previous_priority;
- rtems_task_priority previous_priority_1;
-
- status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
- directive_failed( status, "rtems_task_ident" );
-
- puts( "Getting TID of remote task" );
- remote_node = (Multiprocessing_configuration.node == 1) ? 2 : 1;
- puts_nocr( "Remote task's name is : " );
- put_name( Task_name[ remote_node ], TRUE );
-
- do {
- status = rtems_task_ident(
- Task_name[ remote_node ],
- RTEMS_SEARCH_ALL_NODES,
- &remote_tid
- );
- } while ( status != RTEMS_SUCCESSFUL );
-
- directive_failed( status, "rtems_task_ident" );
-
- status = rtems_task_set_priority(
- remote_tid,
- Multiprocessing_configuration.node,
- &previous_priority
- );
- directive_failed( status, "rtems_task_set_priority" );
-
- if ( previous_priority != remote_node ) {
- printf(
- "Remote priority (0x%x) does not match remote node (0x%x)!!!\n",
- previous_priority,
- remote_node
- );
- exit( 0xf0000 );
- }
-
- do {
- status = rtems_task_set_priority(
- RTEMS_SELF,
- RTEMS_CURRENT_PRIORITY,
- &previous_priority_1
- );
- directive_failed( status, "rtems_task_set_priority" );
- } while ( previous_priority_1 != remote_node );
-
- puts( "Local task priority has been set" );
-
- puts( "*** END OF TEST 4 ***" );
- exit( 0 );
-}
diff --git a/testsuites/mptests/mp05/Makefile.am b/testsuites/mptests/mp05/Makefile.am
deleted file mode 100644
index 27564a9335..0000000000
--- a/testsuites/mptests/mp05/Makefile.am
+++ /dev/null
@@ -1,12 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-SUBDIRS = node1 node2
-
-EXTRA_DIST = system.h asr.c init.c task1.c
-
-include $(top_srcdir)/../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/mptests/mp05/asr.c b/testsuites/mptests/mp05/asr.c
deleted file mode 100644
index 793211faf9..0000000000
--- a/testsuites/mptests/mp05/asr.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Process_asr
- *
- * This routine performs the processing for task 1's RTEMS_ASR. It is called
- * by an assembly routine which saves the necessary registers.
- *
- * Input parameters:
- * signal - signal set
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_asr Process_asr(
- rtems_signal_set signal
-)
-{
- if ( signal != expected_signal ) {
- printf(
- "ERROR: I was expecting signal 0x%.8x got 0x%.8x\n",
- expected_signal,
- signal
- );
- rtems_fatal_error_occurred( 0xf0000 );
- }
- signal_caught = 1;
-}
diff --git a/testsuites/mptests/mp05/init.c b/testsuites/mptests/mp05/init.c
deleted file mode 100644
index 63dee28d0b..0000000000
--- a/testsuites/mptests/mp05/init.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is a user initialization task and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- printf(
- "\n\n*** TEST 5 -- NODE %d ***\n",
- Multiprocessing_configuration.node
- );
-
- Task_name[ 1 ] = rtems_build_name( '1', '1', '1', ' ' );
- Task_name[ 2 ] = rtems_build_name( '2', '2', '2', ' ' );
-
- puts( "Creating Test_task (Global)" );
- status = rtems_task_create(
- Task_name[Multiprocessing_configuration.node],
- 1,
- RTEMS_MINIMUM_STACK_SIZE * 2,
- RTEMS_TIMESLICE,
- RTEMS_GLOBAL,
- &Task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_create" );
-
- puts( "Starting Test_task (Global)" );
- status = rtems_task_start( Task_id[ 1 ], Test_task, 0 );
- directive_failed( status, "rtems_task_start" );
-
- Timer_name[ 1 ] = rtems_build_name( 'T', 'M', '1', ' ' );
-
- status = rtems_timer_create( Timer_name[ 1 ], &Timer_id[ 1 ] );
- directive_failed( status, "rtems_timer_create" );
-
- puts( "Deleting initialization task" );
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
diff --git a/testsuites/mptests/mp05/node1/Makefile.am b/testsuites/mptests/mp05/node1/Makefile.am
deleted file mode 100644
index 7de770e601..0000000000
--- a/testsuites/mptests/mp05/node1/Makefile.am
+++ /dev/null
@@ -1,50 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-VPATH = @srcdir@:@srcdir@/..
-
-NODE = 1
-TEST = mp05
-PGM = ${ARCH}/$(TEST)-node$(NODE).exe
-
-MANAGERS = io mp signal timer
-
-C_FILES = init.c asr.c task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/mptests.am
-
-if HAS_MP
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -DNODE_NUMBER=$(NODE) -I$(srcdir)/..
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-else
-all-local:
-endif
-
-EXTRA_DIST = $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/mptests/mp05/node1/mp05.doc b/testsuites/mptests/mp05/node1/mp05.doc
deleted file mode 100644
index f22bd1c204..0000000000
--- a/testsuites/mptests/mp05/node1/mp05.doc
+++ /dev/null
@@ -1,44 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: test54
-
-directives:
- ex_init, ex_start, t_create, t_start, tm_tick, i_return, t_ident,
- tm_wkafter, as_catch, as_return
-
-concepts:
-
- a. Verifies system can create and start both the executive's system
- initialization and idle task.
-
- b. Verifies executive can swap between three application tasks at the
- same priority and the executive's internal idle task.
-
- c. Verifies can print strings to the CRT on port 2 of the mvme136 board
- using Print and Println in the board support package.
-
- d. Verifies interrupt handler can handler a task switch from an interrupt
- as specified with the i_return directive.
-
- e. Verifies executive initialization performed correctly.
-
- f. Verifies the executive trap handler except for the halt function.
-
- g. Verifies that a task can get the task identification number of itself.
-
- h. Verifies that a task can get the task identification number
- of another task.
-
- i. Verifies that a signal can be sent to a remote task.
diff --git a/testsuites/mptests/mp05/node1/mp05.scn b/testsuites/mptests/mp05/node1/mp05.scn
deleted file mode 100644
index 472740ba18..0000000000
--- a/testsuites/mptests/mp05/node1/mp05.scn
+++ /dev/null
@@ -1,11 +0,0 @@
-*** TEST 5 -- NODE 1 ***
-Creating Test_task (Global)
-Starting Test_task (Global)
-Deleting initialization task
-rtems_signal_catch: initializing signal catcher
-Remote task's name is : 222
-Getting TID of remote task
-Sending signal to remote task
-....................................................
-....................................................
-*** END OF TEST 5 ***
diff --git a/testsuites/mptests/mp05/node2/Makefile.am b/testsuites/mptests/mp05/node2/Makefile.am
deleted file mode 100644
index 3bb698dd47..0000000000
--- a/testsuites/mptests/mp05/node2/Makefile.am
+++ /dev/null
@@ -1,50 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-VPATH = @srcdir@:@srcdir@/..
-
-NODE = 2
-TEST = mp05
-PGM = ${ARCH}/$(TEST)-node$(NODE).exe
-
-MANAGERS = io mp signal timer
-
-C_FILES = init.c asr.c task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/mptests.am
-
-if HAS_MP
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -DNODE_NUMBER=$(NODE) -I$(srcdir)/..
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-else
-all-local:
-endif
-
-EXTRA_DIST = $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/mptests/mp05/node2/mp05.doc b/testsuites/mptests/mp05/node2/mp05.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/mptests/mp05/node2/mp05.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/mptests/mp05/node2/mp05.scn b/testsuites/mptests/mp05/node2/mp05.scn
deleted file mode 100644
index 0c4b412f65..0000000000
--- a/testsuites/mptests/mp05/node2/mp05.scn
+++ /dev/null
@@ -1,10 +0,0 @@
-*** TEST 5 -- NODE 2 ***
-Creating Test_task (Global)
-Starting Test_task (Global)
-Deleting initialization task
-rtems_signal_catch: initializing signal catcher
-Remote task's name is : 111
-Getting TID of remote task
-....................................................
-....................................................
-*** END OF TEST 5 ***
diff --git a/testsuites/mptests/mp05/system.h b/testsuites/mptests/mp05/system.h
deleted file mode 100644
index a5ec04e368..0000000000
--- a/testsuites/mptests/mp05/system.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_task Test_task(
- rtems_task_argument argument
-);
-
-rtems_asr Process_asr( rtems_signal_set );
-
-/* configuration information */
-
-#define CONFIGURE_MPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MAXIMUM_TIMERS 1
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#define CONFIGURE_EXTRA_TASK_STACKS (1 * RTEMS_MINIMUM_STACK_SIZE)
-
-#include <confdefs.h>
-
-/* variables */
-
-TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
-
-TEST_EXTERN rtems_id Timer_id[ 2 ]; /* array of timer ids */
-TEST_EXTERN rtems_name Timer_name[ 2 ]; /* array of timer names */
-
-TEST_EXTERN volatile rtems_boolean Stop_Test;
-
-TEST_EXTERN rtems_unsigned32 remote_node;
-TEST_EXTERN rtems_id remote_tid;
-TEST_EXTERN rtems_signal_set remote_signal;
-TEST_EXTERN rtems_signal_set expected_signal;
-TEST_EXTERN volatile rtems_unsigned32 signal_count;
-TEST_EXTERN volatile rtems_unsigned32 signal_caught;
-
-/* end of include file */
diff --git a/testsuites/mptests/mp05/task1.c b/testsuites/mptests/mp05/task1.c
deleted file mode 100644
index 1eb0f4690a..0000000000
--- a/testsuites/mptests/mp05/task1.c
+++ /dev/null
@@ -1,105 +0,0 @@
-/* Test_task
- *
- * This task initializes the signal catcher, sends the first signal
- * if running on the first node, and loops while waiting for signals.
- *
- * NOTE: The signal catcher is not reentrant and hence RTEMS_NO_ASR must
- * be a part of its execution mode.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-#define SIGNALS_PER_DOT 15
-
-rtems_timer_service_routine Stop_Test_TSR(
- rtems_id ignored_id,
- void *ignored_address
-)
-{
- Stop_Test = TRUE;
-}
-
-rtems_task Test_task(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- Stop_Test = FALSE;
-
- signal_caught = 0;
- signal_count = 0;
-
- puts( "rtems_signal_catch: initializing signal catcher" );
- status = rtems_signal_catch( Process_asr, RTEMS_NO_ASR|RTEMS_NO_PREEMPT );
- directive_failed( status, "rtems_signal_catch" );
-
- if (Multiprocessing_configuration.node == 1) {
- remote_node = 2;
- remote_signal = RTEMS_SIGNAL_18;
- expected_signal = RTEMS_SIGNAL_17;
- }
- else {
- remote_node = 1;
- remote_signal = RTEMS_SIGNAL_17;
- expected_signal = RTEMS_SIGNAL_18;
- }
- puts_nocr( "Remote task's name is : " );
- put_name( Task_name[ remote_node ], TRUE );
-
- puts( "Getting TID of remote task" );
- do {
- status = rtems_task_ident(
- Task_name[ remote_node ],
- RTEMS_SEARCH_ALL_NODES,
- &remote_tid
- );
- } while ( status != RTEMS_SUCCESSFUL );
- directive_failed( status, "rtems_task_ident" );
-
- status = rtems_timer_fire_after(
- Timer_id[ 1 ],
- 3 * TICKS_PER_SECOND,
- Stop_Test_TSR,
- NULL
- );
- directive_failed( status, "rtems_timer_fire_after" );
-
- if ( Multiprocessing_configuration.node == 1 ) {
- puts( "Sending signal to remote task" );
- do {
- status = rtems_signal_send( remote_tid, remote_signal );
- if ( status == RTEMS_NOT_DEFINED )
- continue;
- } while ( status != RTEMS_SUCCESSFUL );
- directive_failed( status, "rtems_signal_send" );
- }
-
- while ( Stop_Test == FALSE ) {
- if ( signal_caught ) {
- signal_caught = 0;
- if ( ++signal_count >= SIGNALS_PER_DOT ) {
- signal_count = 0;
- put_dot( '.' );
- }
- status = rtems_signal_send( remote_tid, remote_signal );
- directive_failed( status, "rtems_signal_send" );
- }
- }
- puts( "\n*** END OF TEST 5 ***" );
- exit( 0 );
-}
diff --git a/testsuites/mptests/mp06/Makefile.am b/testsuites/mptests/mp06/Makefile.am
deleted file mode 100644
index cdae39f815..0000000000
--- a/testsuites/mptests/mp06/Makefile.am
+++ /dev/null
@@ -1,12 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-SUBDIRS = node1 node2
-
-EXTRA_DIST = system.h init.c task1.c
-
-include $(top_srcdir)/../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/mptests/mp06/init.c b/testsuites/mptests/mp06/init.c
deleted file mode 100644
index a45fac3766..0000000000
--- a/testsuites/mptests/mp06/init.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is a user initialization task and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- printf(
- "\n\n*** TEST 6 -- NODE %d ***\n",
- Multiprocessing_configuration.node
- );
-
- Task_name[ 1 ] = rtems_build_name( '1', '1', '1', ' ' );
- Task_name[ 2 ] = rtems_build_name( '2', '2', '2', ' ' );
-
- puts( "Creating Test_task (Global)" );
- status = rtems_task_create(
- Task_name[Multiprocessing_configuration.node],
- 1,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_GLOBAL,
- &Task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_create" );
-
- puts( "Starting Test_task (Global)" );
- status = rtems_task_start( Task_id[ 1 ], Test_task, 0 );
- directive_failed( status, "rtems_task_start" );
-
- Timer_name[ 1 ] = rtems_build_name( 'T', 'M', '1', ' ' );
-
- status = rtems_timer_create( Timer_name[ 1 ], &Timer_id[ 1 ] );
- directive_failed( status, "rtems_timer_create" );
-
- puts( "Deleting initialization task" );
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
diff --git a/testsuites/mptests/mp06/node1/Makefile.am b/testsuites/mptests/mp06/node1/Makefile.am
deleted file mode 100644
index ab7c67d1c1..0000000000
--- a/testsuites/mptests/mp06/node1/Makefile.am
+++ /dev/null
@@ -1,50 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-VPATH = @srcdir@:@srcdir@/..
-
-NODE = 1
-TEST = mp06
-PGM = ${ARCH}/$(TEST)-node$(NODE).exe
-
-MANAGERS = io mp event timer
-
-C_FILES = init.c task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/mptests.am
-
-if HAS_MP
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -DNODE_NUMBER=$(NODE) -I$(srcdir)/..
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-else
-all-local:
-endif
-
-EXTRA_DIST = $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/mptests/mp06/node1/mp06.doc b/testsuites/mptests/mp06/node1/mp06.doc
deleted file mode 100644
index d45e24b3bd..0000000000
--- a/testsuites/mptests/mp06/node1/mp06.doc
+++ /dev/null
@@ -1,44 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: test55
-
-directives:
- ex_init, ex_start, t_create, t_start, tm_tick, i_return, t_ident,
- ev_send, ev_receive
-
-concepts:
-
- a. Verifies system can create and start both the executive's system
- initialization and idle task.
-
- b. Verifies executive can swap between three application tasks at the
- same priority and the executive's internal idle task.
-
- c. Verifies can print strings to the CRT on port 2 of the mvme136 board
- using Print and Println in the board support package.
-
- d. Verifies interrupt handler can handler a task switch from an interrupt
- as specified with the i_return directive.
-
- e. Verifies executive initialization performed correctly.
-
- f. Verifies the executive trap handler except for the halt function.
-
- g. Verifies that a task can get the task identification number of itself.
-
- h. Verifies that a task can get the task identification number
- of another task.
-
- i. Verifies that events can be sent to a remote task.
diff --git a/testsuites/mptests/mp06/node1/mp06.scn b/testsuites/mptests/mp06/node1/mp06.scn
deleted file mode 100644
index 592777e5d7..0000000000
--- a/testsuites/mptests/mp06/node1/mp06.scn
+++ /dev/null
@@ -1,11 +0,0 @@
-*** TEST 6 -- NODE 1 ***
-Creating Test_task (Global)
-Starting Test_task (Global)
-Deleting initialization task
-Remote task's name is : 222
-Getting TID of remote task
-Sending events to remote task
-....................................................
-....................................................
-*** END OF TEST 6 ***
-
diff --git a/testsuites/mptests/mp06/node2/Makefile.am b/testsuites/mptests/mp06/node2/Makefile.am
deleted file mode 100644
index 08ce32ea8b..0000000000
--- a/testsuites/mptests/mp06/node2/Makefile.am
+++ /dev/null
@@ -1,50 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-VPATH = @srcdir@:@srcdir@/..
-
-NODE = 2
-TEST = mp06
-PGM = ${ARCH}/$(TEST)-node$(NODE).exe
-
-MANAGERS = io mp event timer
-
-C_FILES = init.c task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/mptests.am
-
-if HAS_MP
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -DNODE_NUMBER=$(NODE) -I$(srcdir)/..
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-else
-all-local:
-endif
-
-EXTRA_DIST = $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/mptests/mp06/node2/mp06.doc b/testsuites/mptests/mp06/node2/mp06.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/mptests/mp06/node2/mp06.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/mptests/mp06/node2/mp06.scn b/testsuites/mptests/mp06/node2/mp06.scn
deleted file mode 100644
index 9cb653c2f3..0000000000
--- a/testsuites/mptests/mp06/node2/mp06.scn
+++ /dev/null
@@ -1,12 +0,0 @@
-*** TEST 6 -- NODE 2 ***
-Creating Test_task (Global)
-Starting Test_task (Global)
-Deleting initialization task
-Remote task's name is : 111
-Getting TID of remote task
-Receiving events from remote task
-....................................................
-....................................................
-rtems_event_receive - correctly returned RTEMS_TIMEOUT
-*** END OF TEST 6 ***
-
diff --git a/testsuites/mptests/mp06/system.h b/testsuites/mptests/mp06/system.h
deleted file mode 100644
index 2062710560..0000000000
--- a/testsuites/mptests/mp06/system.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_task Test_task(
- rtems_task_argument argument
-);
-
-/* configuration information */
-
-#define CONFIGURE_MPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MAXIMUM_TIMERS 1
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* variables */
-
-TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
-
-TEST_EXTERN rtems_id Timer_id[ 4 ]; /* array of timer ids */
-TEST_EXTERN rtems_name Timer_name[ 4 ]; /* array of timer names */
-
-TEST_EXTERN volatile rtems_boolean Stop_Test;
-
-/* end of include file */
diff --git a/testsuites/mptests/mp06/task1.c b/testsuites/mptests/mp06/task1.c
deleted file mode 100644
index 0f9b9a6e97..0000000000
--- a/testsuites/mptests/mp06/task1.c
+++ /dev/null
@@ -1,175 +0,0 @@
-/* Test_task
- *
- * This task tests global event operations. If running on node one, it
- * continuously sends events. If running on node two, it continuously
- * receives events.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-#define DOT_COUNT 25
-
-/*PAGE
- *
- * Stop_Test_TSR
- */
-
-rtems_timer_service_routine Stop_Test_TSR(
- rtems_id ignored_id,
- void *ignored_address
-)
-{
- Stop_Test = TRUE;
-}
-
-/*PAGE
- *
- * Event_set_table
- */
-
-rtems_event_set Event_set_table[] = {
- RTEMS_EVENT_0,
- RTEMS_EVENT_1,
- RTEMS_EVENT_2,
- RTEMS_EVENT_3,
- RTEMS_EVENT_4,
- RTEMS_EVENT_5,
- RTEMS_EVENT_6,
- RTEMS_EVENT_7,
- RTEMS_EVENT_8,
- RTEMS_EVENT_9,
- RTEMS_EVENT_10,
- RTEMS_EVENT_11,
- RTEMS_EVENT_12,
- RTEMS_EVENT_13,
- RTEMS_EVENT_14,
- RTEMS_EVENT_15,
- RTEMS_EVENT_16,
- RTEMS_EVENT_17,
- RTEMS_EVENT_18,
- RTEMS_EVENT_19,
- RTEMS_EVENT_20,
- RTEMS_EVENT_21,
- RTEMS_EVENT_22,
- RTEMS_EVENT_23,
- RTEMS_EVENT_24,
- RTEMS_EVENT_25,
- RTEMS_EVENT_26,
- RTEMS_EVENT_27,
- RTEMS_EVENT_28,
- RTEMS_EVENT_29,
- RTEMS_EVENT_30,
- RTEMS_EVENT_31
-};
-
-/*PAGE
- *
- * Test_task
- */
-
-rtems_task Test_task(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
- rtems_unsigned32 count;
- rtems_unsigned32 remote_node;
- rtems_id remote_tid;
- rtems_event_set event_out;
- rtems_event_set event_for_this_iteration;
-
- Stop_Test = FALSE;
-
- remote_node = (Multiprocessing_configuration.node == 1) ? 2 : 1;
- puts_nocr( "Remote task's name is : " );
- put_name( Task_name[ remote_node ], TRUE );
-
- puts( "Getting TID of remote task" );
- do {
- status = rtems_task_ident(
- Task_name[ remote_node ],
- RTEMS_SEARCH_ALL_NODES,
- &remote_tid
- );
- } while ( status != RTEMS_SUCCESSFUL );
- directive_failed( status, "rtems_task_ident FAILED!!" );
-
- if ( Multiprocessing_configuration.node == 1 )
- puts( "Sending events to remote task" );
- else
- puts( "Receiving events from remote task" );
-
- status = rtems_timer_fire_after(
- Timer_id[ 1 ],
- 5 * TICKS_PER_SECOND,
- Stop_Test_TSR,
- NULL
- );
- directive_failed( status, "rtems_timer_fire_after" );
-
- count = 0;
-
- for ( ; ; ) {
- if ( Stop_Test == TRUE )
- break;
-
- event_for_this_iteration = Event_set_table[ count % 32 ];
-
- if ( Multiprocessing_configuration.node == 1 ) {
- status = rtems_event_send( remote_tid, event_for_this_iteration );
- directive_failed( status, "rtems_event_send" );
-
- status = rtems_task_wake_after( 1 );
- directive_failed( status, "rtems_task_wake_after" );
- } else {
- status = rtems_event_receive(
- event_for_this_iteration,
- RTEMS_DEFAULT_OPTIONS,
- 1 * TICKS_PER_SECOND,
- &event_out
- );
- if ( rtems_are_statuses_equal( status, RTEMS_TIMEOUT ) ) {
- if ( Multiprocessing_configuration.node == 2 )
- puts( "\nCorrect behavior if the other node exitted." );
- else
- puts( "\nERROR... node 1 died" );
- break;
- } else
- directive_failed( status, "rtems_event_receive" );
- }
-
- if ( (count % DOT_COUNT) == 0 )
- put_dot('.');
-
- count++;
- }
-
- putchar( '\n' );
-
- if ( Multiprocessing_configuration.node == 2 ) {
- status = rtems_event_receive(
- RTEMS_EVENT_16,
- RTEMS_DEFAULT_OPTIONS,
- 1 * TICKS_PER_SECOND,
- &event_out
- );
- fatal_directive_status( status, RTEMS_TIMEOUT, "rtems_event_receive" );
- puts( "rtems_event_receive - correctly returned RTEMS_TIMEOUT" );
- }
- puts( "*** END OF TEST 6 ***" );
- exit( 0 );
-}
diff --git a/testsuites/mptests/mp07/Makefile.am b/testsuites/mptests/mp07/Makefile.am
deleted file mode 100644
index cdae39f815..0000000000
--- a/testsuites/mptests/mp07/Makefile.am
+++ /dev/null
@@ -1,12 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-SUBDIRS = node1 node2
-
-EXTRA_DIST = system.h init.c task1.c
-
-include $(top_srcdir)/../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/mptests/mp07/init.c b/testsuites/mptests/mp07/init.c
deleted file mode 100644
index 20c844fd1b..0000000000
--- a/testsuites/mptests/mp07/init.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is a user initialization task and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- printf(
- "\n\n*** TEST 7 -- NODE %d ***\n",
- Multiprocessing_configuration.node
- );
-
- Task_name[ 1 ] = rtems_build_name( '1', '1', '1', ' ' );
- Task_name[ 2 ] = rtems_build_name( '2', '2', '2', ' ' );
-
- puts( "Creating Test_task (Global)" );
- status = rtems_task_create(
- Task_name[Multiprocessing_configuration.node],
- 1,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_TIMESLICE,
- RTEMS_GLOBAL,
- &Task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_create" );
-
- puts( "Starting Test_task (Global)" );
- status = rtems_task_start( Task_id[ 1 ], Test_task, 0 );
- directive_failed( status, "rtems_task_start" );
-
- Timer_name[ 1 ] = rtems_build_name( 'T', 'M', '1', ' ' );
-
- status = rtems_timer_create( Timer_name[ 1 ], &Timer_id[ 1 ] );
- directive_failed( status, "rtems_timer_create" );
-
- puts( "Deleting initialization task" );
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
diff --git a/testsuites/mptests/mp07/node1/Makefile.am b/testsuites/mptests/mp07/node1/Makefile.am
deleted file mode 100644
index c83109eedc..0000000000
--- a/testsuites/mptests/mp07/node1/Makefile.am
+++ /dev/null
@@ -1,50 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-VPATH = @srcdir@:@srcdir@/..
-
-NODE = 1
-TEST = mp07
-PGM = ${ARCH}/$(TEST)-node$(NODE).exe
-
-MANAGERS = io mp event timer
-
-C_FILES = init.c task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/mptests.am
-
-if HAS_MP
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -DNODE_NUMBER=$(NODE) -I$(srcdir)/..
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-else
-all-local:
-endif
-
-EXTRA_DIST = $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/mptests/mp07/node1/mp07.doc b/testsuites/mptests/mp07/node1/mp07.doc
deleted file mode 100644
index a308cce370..0000000000
--- a/testsuites/mptests/mp07/node1/mp07.doc
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: test56
-
-directives:
- ex_init, ex_start, t_create, t_start, tm_tick, i_return, t_ident,
- ev_send, ev_receive
-
-concepts:
-
- a. Verifies system can create and start both the executive's system
- initialization and idle task.
-
- b. Verifies executive can swap between three application tasks at the
- same priority and the executive's internal idle task.
-
- c. Verifies can print strings to the CRT on port 2 of the mvme136 board
- using Print and Println in the board support package.
-
- d. Verifies interrupt handler can handler a task switch from an interrupt
- as specified with the i_return directive.
-
- e. Verifies executive initialization performed correctly.
-
- f. Verifies the executive trap handler except for the halt function.
-
- g. Verifies that a task can get the task identification number of itself.
-
- h. Verifies that a task can get the task identification number
- of another task.
-
- i. Verifies that two tasks on different processors can alternate
- sending each other events.
diff --git a/testsuites/mptests/mp07/node1/mp07.scn b/testsuites/mptests/mp07/node1/mp07.scn
deleted file mode 100644
index d348f48612..0000000000
--- a/testsuites/mptests/mp07/node1/mp07.scn
+++ /dev/null
@@ -1,10 +0,0 @@
-*** TEST 7 -- NODE 1 ***
-Creating Test_task (Global)
-Starting Test_task (Global)
-Deleting initialization task
-Remote task's name is : 222
-Getting TID of remote task
-Sending first event to remote task
-....................................................
-....................................................
-*** END OF TEST 7 ***
diff --git a/testsuites/mptests/mp07/node2/Makefile.am b/testsuites/mptests/mp07/node2/Makefile.am
deleted file mode 100644
index 2a6e01a60f..0000000000
--- a/testsuites/mptests/mp07/node2/Makefile.am
+++ /dev/null
@@ -1,50 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-VPATH = @srcdir@:@srcdir@/..
-
-NODE = 2
-TEST = mp07
-PGM = ${ARCH}/$(TEST)-node$(NODE).exe
-
-MANAGERS = io mp event timer
-
-C_FILES = init.c task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/mptests.am
-
-if HAS_MP
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -DNODE_NUMBER=$(NODE) -I$(srcdir)/..
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-else
-all-local:
-endif
-
-EXTRA_DIST = $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/mptests/mp07/node2/mp07.doc b/testsuites/mptests/mp07/node2/mp07.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/mptests/mp07/node2/mp07.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/mptests/mp07/node2/mp07.scn b/testsuites/mptests/mp07/node2/mp07.scn
deleted file mode 100644
index 9e361d713c..0000000000
--- a/testsuites/mptests/mp07/node2/mp07.scn
+++ /dev/null
@@ -1,9 +0,0 @@
-*** TEST 7 -- NODE 2 ***
-Creating Test_task (Global)
-Starting Test_task (Global)
-Deleting initialization task
-Remote task's name is : 111
-Getting TID of remote task
-....................................................
-....................................................
-*** END OF TEST 7 ***
diff --git a/testsuites/mptests/mp07/system.h b/testsuites/mptests/mp07/system.h
deleted file mode 100644
index 2062710560..0000000000
--- a/testsuites/mptests/mp07/system.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_task Test_task(
- rtems_task_argument argument
-);
-
-/* configuration information */
-
-#define CONFIGURE_MPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MAXIMUM_TIMERS 1
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* variables */
-
-TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
-
-TEST_EXTERN rtems_id Timer_id[ 4 ]; /* array of timer ids */
-TEST_EXTERN rtems_name Timer_name[ 4 ]; /* array of timer names */
-
-TEST_EXTERN volatile rtems_boolean Stop_Test;
-
-/* end of include file */
diff --git a/testsuites/mptests/mp07/task1.c b/testsuites/mptests/mp07/task1.c
deleted file mode 100644
index 43509fef27..0000000000
--- a/testsuites/mptests/mp07/task1.c
+++ /dev/null
@@ -1,102 +0,0 @@
-/* Test_task
- *
- * This task continuously sends an event to its counterpart on the
- * other node, and then waits for it to send an event. The copy
- * running on node one send the first event.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-#define DOT_COUNT 100
-
-rtems_timer_service_routine Stop_Test_TSR(
- rtems_id ignored_id,
- void *ignored_address
-)
-{
- Stop_Test = TRUE;
-}
-
-rtems_task Test_task(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
- rtems_unsigned32 count;
- rtems_unsigned32 remote_node;
- rtems_id remote_tid;
- rtems_event_set event_out;
-
- Stop_Test = FALSE;
-
- remote_node = (Multiprocessing_configuration.node == 1) ? 2 : 1;
- puts_nocr( "Remote task's name is : " );
- put_name( Task_name[ remote_node ], TRUE );
-
- puts( "Getting TID of remote task" );
- do {
- status = rtems_task_ident(
- Task_name[ remote_node ],
- RTEMS_SEARCH_ALL_NODES,
- &remote_tid
- );
- } while ( !rtems_is_status_successful( status ) );
-
- if ( Multiprocessing_configuration.node == 1 ) {
- puts( "Sending first event to remote task" );
- status = rtems_event_send( remote_tid, RTEMS_EVENT_16 );
- directive_failed( status, "rtems_event_send" );
- }
-
- status = rtems_timer_fire_after(
- Timer_id[ 1 ],
- 5 * TICKS_PER_SECOND,
- Stop_Test_TSR,
- NULL
- );
- directive_failed( status, "rtems_timer_fire_after" );
-
- while ( Stop_Test == FALSE ) {
- for ( count=DOT_COUNT ; count && (Stop_Test == FALSE) ; count-- ) {
- status = rtems_event_receive(
- RTEMS_EVENT_16,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT,
- &event_out
- );
- if ( status == RTEMS_TIMEOUT ) {
- puts( "\nTA1 - RTEMS_TIMEOUT .. probably OK if the other node exits" );
- break;
- } else
- directive_failed( status, "rtems_event_receive" );
-
- status = rtems_event_send( remote_tid, RTEMS_EVENT_16 );
- directive_failed( status, "rtems_event_send" );
- }
- put_dot('.');
- }
-
- /*
- * Wait a bit before shutting down so we don't screw up the other node
- * when our MPCI shuts down
- */
-
- rtems_task_wake_after(10);
-
- puts( "\n*** END OF TEST 7 ***" );
- exit( 0 );
-}
diff --git a/testsuites/mptests/mp08/Makefile.am b/testsuites/mptests/mp08/Makefile.am
deleted file mode 100644
index cdae39f815..0000000000
--- a/testsuites/mptests/mp08/Makefile.am
+++ /dev/null
@@ -1,12 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-SUBDIRS = node1 node2
-
-EXTRA_DIST = system.h init.c task1.c
-
-include $(top_srcdir)/../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/mptests/mp08/init.c b/testsuites/mptests/mp08/init.c
deleted file mode 100644
index e564eac891..0000000000
--- a/testsuites/mptests/mp08/init.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is a user initialization task and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- printf(
- "\n\n*** TEST 8 -- NODE %d ***\n",
- Multiprocessing_configuration.node
- );
-
- Task_name[ 1 ] = rtems_build_name( '1', '1', '1', ' ' );
- Task_name[ 2 ] = rtems_build_name( '2', '2', '2', ' ' );
-
- Semaphore_name[ 1 ] = rtems_build_name( 'S', 'E', 'M', '\0' );
-
- if ( Multiprocessing_configuration.node == 1 ) {
- puts( "Creating Sempahore (Global)" );
- status = rtems_semaphore_create(
- Semaphore_name[ 1 ],
- 1,
- RTEMS_GLOBAL,
- RTEMS_NO_PRIORITY,
- &Semaphore_id[ 1 ]
- );
- directive_failed( status, "rtems_semaphore_create" );
- }
-
- puts( "Creating Test_task (Global)" );
- status = rtems_task_create(
- Task_name[ Multiprocessing_configuration.node ],
- 1,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_TIMESLICE,
- RTEMS_GLOBAL,
- &Task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_create" );
-
- puts( "Starting Test_task (Global)" );
- status = rtems_task_start( Task_id[ 1 ], Test_task, 0 );
- directive_failed( status, "rtems_task_start" );
-
- puts( "Deleting initialization task" );
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
diff --git a/testsuites/mptests/mp08/node1/Makefile.am b/testsuites/mptests/mp08/node1/Makefile.am
deleted file mode 100644
index 1af1d8c753..0000000000
--- a/testsuites/mptests/mp08/node1/Makefile.am
+++ /dev/null
@@ -1,50 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-VPATH = @srcdir@:@srcdir@/..
-
-NODE = 1
-TEST = mp08
-PGM = ${ARCH}/$(TEST)-node$(NODE).exe
-
-MANAGERS = io mp semaphore
-
-C_FILES = init.c task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/mptests.am
-
-if HAS_MP
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -DNODE_NUMBER=$(NODE) -I$(srcdir)/..
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-else
-all-local:
-endif
-
-EXTRA_DIST = $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/mptests/mp08/node1/mp08.doc b/testsuites/mptests/mp08/node1/mp08.doc
deleted file mode 100644
index 9f3b527f04..0000000000
--- a/testsuites/mptests/mp08/node1/mp08.doc
+++ /dev/null
@@ -1,51 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: test57
-
-GLOBAL SEMAPHORE TEST
-
-directives:
- ex_init, ex_start, t_create, t_start, tm_tick, i_return, t_ident,
- sm_create, sm_ident, sm_p, sm_v, sm_delete
-
-concepts:
-
- a. Verifies system can create and start both the executive's system
- initialization and idle task.
-
- b. Verifies executive can swap between three application tasks at the
- same priority and the executive's internal idle task.
-
- c. Verifies can print strings to the CRT on port 2 of the mvme136 board
- using Print and Println in the board support package.
-
- d. Verifies interrupt handler can handler a task switch from an interrupt
- as specified with the i_return directive.
-
- e. Verifies executive initialization performed correctly.
-
- f. Verifies the executive trap handler except for the halt function.
-
- g. Verifies that a task can get the identification number of
- a global sempahore.
-
- h. Verifies that two tasks on different processors can
- alternate accessing a semaphore.
-
- i. Verifies operation of sm_delete on global semaphores
- for both normal and error case.
-
- j. Verifies Rpc and Process_pkt for packet types Q_SMP, Q_SMV,
- P_OBJCREATE (semaphore), P_OBJDELETE (semaphore), P_SMDEL_TQ.
-
diff --git a/testsuites/mptests/mp08/node1/mp08.scn b/testsuites/mptests/mp08/node1/mp08.scn
deleted file mode 100644
index cde263420c..0000000000
--- a/testsuites/mptests/mp08/node1/mp08.scn
+++ /dev/null
@@ -1,11 +0,0 @@
-*** TEST 8 -- NODE 1 ***
-Creating Test_task (Global)
-Starting Test_task (Global)
-Deleting initialization task
-Getting SMID of semaphore
-pvpvpvpvpvp.......
-(continued) pvp
-
-Deleting global semaphore
-*** END OF TEST 8 ***
-
diff --git a/testsuites/mptests/mp08/node2/Makefile.am b/testsuites/mptests/mp08/node2/Makefile.am
deleted file mode 100644
index 10494437e2..0000000000
--- a/testsuites/mptests/mp08/node2/Makefile.am
+++ /dev/null
@@ -1,50 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-VPATH = @srcdir@:@srcdir@/..
-
-NODE = 2
-TEST = mp08
-PGM = ${ARCH}/$(TEST)-node$(NODE).exe
-
-MANAGERS = io mp semaphore
-
-C_FILES = init.c task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/mptests.am
-
-if HAS_MP
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -DNODE_NUMBER=$(NODE) -I$(srcdir)/..
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-else
-all-local:
-endif
-
-EXTRA_DIST = $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/mptests/mp08/node2/mp08.doc b/testsuites/mptests/mp08/node2/mp08.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/mptests/mp08/node2/mp08.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/mptests/mp08/node2/mp08.scn b/testsuites/mptests/mp08/node2/mp08.scn
deleted file mode 100644
index 5a613f45e5..0000000000
--- a/testsuites/mptests/mp08/node2/mp08.scn
+++ /dev/null
@@ -1,12 +0,0 @@
-*** TEST 8 -- NODE 2 ***
-Creating Test_task (Global)
-Starting Test_task (Global)
-Deleting initialization task
-Getting SMID of semaphore
-rtems_semaphore_delete correctly returned RTEMS_ILLEGAL_ON_REMOTE_OBJECT
-pvpvpvpvpvp.......
-(continued) pvp
-
-Global semaphore deleted
-*** END OF TEST 8 ***
-
diff --git a/testsuites/mptests/mp08/system.h b/testsuites/mptests/mp08/system.h
deleted file mode 100644
index 925a2e1ed8..0000000000
--- a/testsuites/mptests/mp08/system.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_task Test_task(
- rtems_task_argument argument
-);
-
-/* configuration information */
-
-#define CONFIGURE_MPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MAXIMUM_TIMERS 1
-#define CONFIGURE_MAXIMUM_SEMAPHORES 1
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* variables */
-
-TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
-
-TEST_EXTERN rtems_id Semaphore_id[ 2 ]; /* array of semaphore ids */
-TEST_EXTERN rtems_name Semaphore_name[ 2 ]; /* array of semaphore names */
-
-/* end of include file */
diff --git a/testsuites/mptests/mp08/task1.c b/testsuites/mptests/mp08/task1.c
deleted file mode 100644
index b45936c95b..0000000000
--- a/testsuites/mptests/mp08/task1.c
+++ /dev/null
@@ -1,88 +0,0 @@
-/* Test_task
- *
- * This task tests global semaphore operations. It verifies that
- * global semaphore errors are correctly returned.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Test_task(
- rtems_task_argument argument
-)
-{
- rtems_unsigned32 count;
- rtems_status_code status;
-
- puts( "Getting SMID of semaphore" );
-
- do {
- status = rtems_semaphore_ident(
- Semaphore_name[ 1 ],
- RTEMS_SEARCH_ALL_NODES,
- &Semaphore_id[ 1 ]
- );
- } while ( !rtems_is_status_successful( status ) );
-
- if ( Multiprocessing_configuration.node == 2 ) {
- status = rtems_semaphore_delete( Semaphore_id[ 1 ] );
- fatal_directive_status(
- status,
- RTEMS_ILLEGAL_ON_REMOTE_OBJECT,
- "rtems_semaphore_delete did not return RTEMS_ILLEGAL_ON_REMOTE_OBJECT"
- );
- puts(
- "rtems_semaphore_delete correctly returned RTEMS_ILLEGAL_ON_REMOTE_OBJECT"
- );
- }
-
- count = 0; /* number of times node 1 releases semaphore */
- while ( FOREVER ) {
- put_dot( 'p' );
- status = rtems_semaphore_obtain(
- Semaphore_id[ 1 ],
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
- if ( status != RTEMS_SUCCESSFUL ) {
- fatal_directive_status(
- status,
- RTEMS_OBJECT_WAS_DELETED,
- "rtems_semaphore_obtain"
- );
- puts( "\nGlobal semaphore deleted" );
- puts( "*** END OF TEST 8 ***" );
- exit( 0 );
- }
-
- if ( Multiprocessing_configuration.node == 1 && ++count == 1000 ) {
- status = rtems_task_wake_after( TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
-
- puts( "\nDeleting global semaphore" );
- status = rtems_semaphore_delete( Semaphore_id[ 1 ] );
- directive_failed( status, "rtems_semaphore_delete" );
-
- puts( "*** END OF TEST 8 ***" );
- exit( 0 );
- }
- else {
- put_dot( 'v' );
- status = rtems_semaphore_release( Semaphore_id[ 1 ] );
- directive_failed( status, "rtems_semaphore_release FAILED!!" );
- }
- }
-}
diff --git a/testsuites/mptests/mp09/Makefile.am b/testsuites/mptests/mp09/Makefile.am
deleted file mode 100644
index f15aa15612..0000000000
--- a/testsuites/mptests/mp09/Makefile.am
+++ /dev/null
@@ -1,12 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-SUBDIRS = node1 node2
-
-EXTRA_DIST = system.h init.c recvmsg.c sendmsg.c task1.c
-
-include $(top_srcdir)/../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/mptests/mp09/init.c b/testsuites/mptests/mp09/init.c
deleted file mode 100644
index aa6f70266f..0000000000
--- a/testsuites/mptests/mp09/init.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is a user initialization task and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- printf(
- "\n\n*** TEST 9 -- NODE %d ***\n",
- Multiprocessing_configuration.node
- );
-
- Task_name[ 1 ] = rtems_build_name( '1', '1', '1', ' ' );
- Task_name[ 2 ] = rtems_build_name( '2', '2', '2', ' ' );
-
- Queue_name[ 1 ] = rtems_build_name( 'M', 'S', 'G', ' ' );
-
- if ( Multiprocessing_configuration.node == 1 ) {
- puts( "Creating Message Queue (Global)" );
- status = rtems_message_queue_create(
- Queue_name[ 1 ],
- 3,
- 16,
- RTEMS_GLOBAL,
- &Queue_id[ 1 ]
- );
- directive_failed( status, "rtems_message_queue_create" );
- }
-
- puts( "Creating Test_task (local)" );
- status = rtems_task_create(
- Task_name[Multiprocessing_configuration.node],
- 1,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_TIMESLICE,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_create" );
-
- puts( "Starting Test_task (local)" );
- status = rtems_task_start( Task_id[ 1 ], Test_task, 0 );
- directive_failed( status, "rtems_task_start" );
-
- puts( "Deleting initialization task" );
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
diff --git a/testsuites/mptests/mp09/node1/Makefile.am b/testsuites/mptests/mp09/node1/Makefile.am
deleted file mode 100644
index 01998048c8..0000000000
--- a/testsuites/mptests/mp09/node1/Makefile.am
+++ /dev/null
@@ -1,50 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-VPATH = @srcdir@:@srcdir@/..
-
-NODE = 1
-TEST = mp09
-PGM = ${ARCH}/$(TEST)-node$(NODE).exe
-
-MANAGERS = io mp message
-
-C_FILES = init.c task1.c recvmsg.c sendmsg.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/mptests.am
-
-if HAS_MP
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -DNODE_NUMBER=$(NODE) -I$(srcdir)/..
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-else
-all-local:
-endif
-
-EXTRA_DIST = $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/mptests/mp09/node1/mp09.doc b/testsuites/mptests/mp09/node1/mp09.doc
deleted file mode 100644
index 16459a47bc..0000000000
--- a/testsuites/mptests/mp09/node1/mp09.doc
+++ /dev/null
@@ -1,49 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: test58
-
-GLOBAL MESSAGE QUEUE TEST
-
-directives:
- ex_init, ex_start, t_create, t_start, tm_tick, i_return,
- tm_wkafter, q_create, q_send, q_broadcast, q_urgent, q_receive,
- q_delete
-
-concepts:
-
- a. Verifies system can create and start both the executive's system
- initialization and idle task.
-
- b. Verifies executive can swap between three application tasks at the
- same priority and the executive's internal idle task.
-
- c. Verifies can print strings to the CRT on port 2 of the mvme136 board
- using Print and Println in the board support package.
-
- d. Verifies interrupt handler can handler a task switch from an interrupt
- as specified with the i_return directive.
-
- e. Verifies executive initialization performed correctly.
-
- f. Verifies the executive trap handler except for the halt function.
-
- g. Verifies that a task can get the task identification number of itself.
-
- h. Verifies that a task can delete itself.
-
- i. Verifies Rpc and Process_pkt for message queue related packets.
-
- j. Verifies normal and error paths for global message queue handling.
-
-NOTE: The SLAVE must be started first for this test to successfully run.
diff --git a/testsuites/mptests/mp09/node1/mp09.scn b/testsuites/mptests/mp09/node1/mp09.scn
deleted file mode 100644
index 74cf06904d..0000000000
--- a/testsuites/mptests/mp09/node1/mp09.scn
+++ /dev/null
@@ -1,22 +0,0 @@
-*** TEST 9 -- NODE 1 ***
-Creating Message Queue (Global)
-Creating Test_task (local)
-Starting Test_task (local)
-Deleting initialization task
-Getting QID of message queue
-Receiving message ...
-Received : 123456789012345
-Receiving message ...
-Received : abcdefghijklmno
-Receiving message ...
-Received : ABCDEFGHIJKLMNO
-Receiver delaying for a second
-rtems_message_queue_send: 123456789012345
-Delaying for a second
-rtems_message_queue_urgent: abcdefghijklmno
-Delaying for a second
-rtems_message_queue_broadcast: ABCDEFGHIJKLMNO
-Delaying for a second
-Delaying for 5 seconds
-Deleting Message queue
-*** END OF TEST 9 ***
diff --git a/testsuites/mptests/mp09/node2/Makefile.am b/testsuites/mptests/mp09/node2/Makefile.am
deleted file mode 100644
index ea8d3b2fc5..0000000000
--- a/testsuites/mptests/mp09/node2/Makefile.am
+++ /dev/null
@@ -1,50 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-VPATH = @srcdir@:@srcdir@/..
-
-NODE = 2
-TEST = mp09
-PGM = ${ARCH}/$(TEST)-node$(NODE).exe
-
-MANAGERS = io mp message
-
-C_FILES = init.c task1.c recvmsg.c sendmsg.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/mptests.am
-
-if HAS_MP
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -DNODE_NUMBER=$(NODE) -I$(srcdir)/..
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-else
-all-local:
-endif
-
-EXTRA_DIST = $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/mptests/mp09/node2/mp09.doc b/testsuites/mptests/mp09/node2/mp09.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/mptests/mp09/node2/mp09.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/mptests/mp09/node2/mp09.scn b/testsuites/mptests/mp09/node2/mp09.scn
deleted file mode 100644
index 1bd17cecd9..0000000000
--- a/testsuites/mptests/mp09/node2/mp09.scn
+++ /dev/null
@@ -1,27 +0,0 @@
-*** TEST 9 -- NODE 2 ***
-Creating Test_task (local)
-Starting Test_task (local)
-Deleting initialization task
-Getting QID of message queue
-rtems_message_queue_delete correctly returned RTEMS_ILLEGAL_ON_REMOTE_OBJECT
-rtems_message_queue_send: 123456789012345
-Delaying for a second
-rtems_message_queue_urgent: abcdefghijklmno
-Delaying for a second
-rtems_message_queue_broadcast: ABCDEFGHIJKLMNO
-Delaying for a second
-Receiving message ...
-Received : 123456789012345
-Receiving message ...
-Received : abcdefghijklmno
-Receiving message ...
-Received : ABCDEFGHIJKLMNO
-Receiver delaying for a second
-Flushing remote empty queue
-0 messages were flushed on the remote queue
-Send messages to be flushed from remote queue
-Flushing remote queue
-1 messages were flushed on the remote queue
-Waiting for message queue to be deleted
-Global message queue deleted
-*** END OF TEST 9 ***
diff --git a/testsuites/mptests/mp09/recvmsg.c b/testsuites/mptests/mp09/recvmsg.c
deleted file mode 100644
index ba9fff9e87..0000000000
--- a/testsuites/mptests/mp09/recvmsg.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Receive_messages
- *
- * This routine receives and prints three messages.
- * an error condition.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-void Receive_messages()
-{
- rtems_status_code status;
- rtems_unsigned32 index;
- rtems_unsigned32 size;
- char receive_buffer[16];
-
- for ( index=1 ; index <=3 ; index++ ) {
- puts( "Receiving message ..." );
- status = rtems_message_queue_receive(
- Queue_id[ 1 ],
- (long (*)[4])receive_buffer,
- &size,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
- directive_failed( status, "rtems_message_queue_receive" );
- puts_nocr( "Received : ");
- puts( receive_buffer );
- }
-
- puts( "Receiver delaying for a second" );
- status = rtems_task_wake_after( TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
-}
diff --git a/testsuites/mptests/mp09/sendmsg.c b/testsuites/mptests/mp09/sendmsg.c
deleted file mode 100644
index e798bc1997..0000000000
--- a/testsuites/mptests/mp09/sendmsg.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Send_messages
- *
- * This routine sends a series of three messages.
- * an error condition.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-void Send_messages()
-{
- rtems_status_code status;
- rtems_unsigned32 broadcast_count;
-
- puts_nocr( "rtems_message_queue_send: " );
- puts( buffer1 );
-
- status = rtems_message_queue_send( Queue_id[ 1 ], (long (*)[4])buffer1, 16 );
- directive_failed( status, "rtems_message_queue_send" );
-
- puts( "Delaying for a second" );
- status = rtems_task_wake_after( TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
-
- puts_nocr( "rtems_message_queue_urgent: " );
- puts( buffer2 );
- status = rtems_message_queue_urgent( Queue_id[ 1 ], (long (*)[4])buffer2, 16 );
- directive_failed( status, "rtems_message_queue_urgent" );
-
- puts( "Delaying for a second" );
- status = rtems_task_wake_after( TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
-
- puts_nocr( "rtems_message_queue_broadcast: " );
- puts( buffer3 );
- status = rtems_message_queue_broadcast(
- Queue_id[ 1 ],
- (long (*)[4])buffer3,
- 16,
- &broadcast_count
- );
- directive_failed( status, "rtems_message_queue_broadcast" );
-
- puts( "Delaying for a second" );
- status = rtems_task_wake_after( TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
-}
diff --git a/testsuites/mptests/mp09/system.h b/testsuites/mptests/mp09/system.h
deleted file mode 100644
index 66eed7f097..0000000000
--- a/testsuites/mptests/mp09/system.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_task Test_task(
- rtems_task_argument argument
-);
-
-void Receive_messages( void );
-
-void Send_messages( void );
-
-/* configuration information */
-
-#define CONFIGURE_MPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MAXIMUM_TIMERS 1
-#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* variables */
-
-TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
-
-TEST_EXTERN rtems_id Queue_id[ 2 ]; /* array of message queue ids */
-TEST_EXTERN rtems_name Queue_name[ 2 ]; /* array of message queue names */
-
-extern char buffer1[16];
-extern char buffer2[16];
-extern char buffer3[16];
-extern char buffer4[16];
-
-/* end of include file */
diff --git a/testsuites/mptests/mp09/task1.c b/testsuites/mptests/mp09/task1.c
deleted file mode 100644
index 426ed9e3ae..0000000000
--- a/testsuites/mptests/mp09/task1.c
+++ /dev/null
@@ -1,108 +0,0 @@
-/* Test_task
- *
- * This task tests global message queue operations. It also generates
- * an error condition.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-char buffer1[16] = "123456789012345";
-char buffer2[16] = "abcdefghijklmno";
-char buffer3[16] = "ABCDEFGHIJKLMNO";
-char buffer4[16] = "PQRSTUVWXYZ(){}";
-
-rtems_task Test_task(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
- rtems_unsigned32 count;
- rtems_unsigned32 size;
- char receive_buffer[16];
-
- status = rtems_task_wake_after( TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
-
- puts( "Getting QID of message queue" );
-
- do {
- status = rtems_message_queue_ident(
- Queue_name[ 1 ],
- RTEMS_SEARCH_ALL_NODES,
- &Queue_id[ 1 ]
- );
- } while ( !rtems_is_status_successful( status ) );
-
- if ( Multiprocessing_configuration.node == 2 ) {
- status = rtems_message_queue_delete( Queue_id[ 1 ] );
- fatal_directive_status(
- status,
- RTEMS_ILLEGAL_ON_REMOTE_OBJECT,
- "rtems_message_queue_delete"
- );
- puts(
- "rtems_message_queue_delete correctly returned RTEMS_ILLEGAL_ON_REMOTE_OBJECT"
- );
-
- Send_messages();
- Receive_messages();
-
- puts( "Flushing remote empty queue" );
- status = rtems_message_queue_flush( Queue_id[ 1 ], &count );
- directive_failed( status, "rtems_message_queue_flush" );
- printf( "%d messages were flushed on the remote queue\n", count );
-
- puts( "Send messages to be flushed from remote queue" );
- status = rtems_message_queue_send( Queue_id[ 1 ], (long (*)[4])buffer1, 16 );
- directive_failed( status, "rtems_message_queue_send" );
-
- puts( "Flushing remote queue" );
- status = rtems_message_queue_flush( Queue_id[ 1 ], &count );
- directive_failed( status, "rtems_message_queue_flush" );
- printf( "%d messages were flushed on the remote queue\n", count );
-
- puts( "Waiting for message queue to be deleted" );
- status = rtems_message_queue_receive(
- Queue_id[ 1 ],
- (long (*)[4])receive_buffer,
- &size,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
- fatal_directive_status(
- status,
- RTEMS_OBJECT_WAS_DELETED,
- "rtems_message_queue_receive"
- );
- puts( "\nGlobal message queue deleted" );
- }
- else { /* node == 1 */
- Receive_messages();
- Send_messages();
-
- puts( "Delaying for 5 seconds" );
- status = rtems_task_wake_after( 5*TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
-
- puts( "Deleting Message queue" );
- status = rtems_message_queue_delete( Queue_id[ 1 ] );
- directive_failed( status, "rtems_message_queue_delete" );
- }
-
- puts( "*** END OF TEST 9 ***" );
- exit( 0 );
-}
diff --git a/testsuites/mptests/mp10/Makefile.am b/testsuites/mptests/mp10/Makefile.am
deleted file mode 100644
index 5ccb6eac78..0000000000
--- a/testsuites/mptests/mp10/Makefile.am
+++ /dev/null
@@ -1,12 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-SUBDIRS = node1 node2
-
-EXTRA_DIST = system.h init.c task1.c task2.c task3.c
-
-include $(top_srcdir)/../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/mptests/mp10/init.c b/testsuites/mptests/mp10/init.c
deleted file mode 100644
index 87e26758f1..0000000000
--- a/testsuites/mptests/mp10/init.c
+++ /dev/null
@@ -1,142 +0,0 @@
-/* Init
- *
- * This routine is the initialization routine for this test program.
- * Other than creating all objects needed by this test, if this routine
- * is running on node one, it acquires a global semaphore to
- * force all other tasks to pend. If running on node two, this task
- * sleeps for a while, and then deletes two local tasks which are
- * waiting on a remote message queue or a semaphore.
- * This routine is the initialization task for this test program.
- * It is a user initialization task and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- printf(
- "\n\n*** TEST 10 -- NODE %d ***\n",
- Multiprocessing_configuration.node
- );
-
- Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
- Task_name[ 2 ] = rtems_build_name( 'T', 'A', '2', ' ' );
- Task_name[ 3 ] = rtems_build_name( 'S', 'A', '3', ' ' );
-
- Queue_name[ 1 ] = rtems_build_name( 'M', 'S', 'G', ' ' );
-
- Semaphore_name[ 1 ] = rtems_build_name( 'S', 'E', 'M', ' ' );
-
- if ( Multiprocessing_configuration.node == 1 ) {
- puts( "Creating Message Queue (Global)" );
- status = rtems_message_queue_create(
- Queue_name[ 1 ],
- 3,
- 16,
- RTEMS_GLOBAL,
- &Queue_id[ 1 ]
- );
- directive_failed( status, "rtems_message_queue_create" );
-
- puts( "Creating Semaphore (Global)" );
- status = rtems_semaphore_create(
- Semaphore_name[ 1 ],
- 0,
- RTEMS_GLOBAL | RTEMS_PRIORITY,
- RTEMS_NO_PRIORITY,
- &Semaphore_id[ 1 ]
- );
- directive_failed( status, "rtems_semaphore_create" );
-
- status = rtems_task_wake_after( 10 * TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
-
- } else {
-
- puts( "Creating Test_task 1 (local)" );
- status = rtems_task_create(
- Task_name[ 1 ],
- 1,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_TIMESLICE,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_create" );
-
- puts( "Starting Test_task 1 (local)" );
- status = rtems_task_start( Task_id[ 1 ], Test_task1, 0 );
- directive_failed( status, "rtems_task_start" );
-
- puts( "Creating Test_task 2 (local)" );
- status = rtems_task_create(
- Task_name[ 2 ],
- 1,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_TIMESLICE,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 2 ]
- );
- directive_failed( status, "rtems_task_create" );
-
- puts( "Starting Test_task 2 (local)" );
- status = rtems_task_start( Task_id[ 2 ], Test_task2, 0 );
- directive_failed( status, "rtems_task_start" );
-
- puts( "Creating Test_task 3 (local)" );
- status = rtems_task_create(
- Task_name[ 3 ],
- 1,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_TIMESLICE,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 3 ]
- );
- directive_failed( status, "rtems_task_create" );
-
- puts( "Starting Test_task 3 (local)" );
- status = rtems_task_start( Task_id[ 3 ], Test_task2, 0 );
- directive_failed( status, "rtems_task_start" );
-
- puts( "Sleeping for 1 seconds ..." );
- status = rtems_task_wake_after( TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
-
- puts( "Deleting Test_task2" );
- status = rtems_task_delete( Task_id[ 2 ] );
- directive_failed( status, "rtems_task_delete of Task 2" );
-
- puts( "Deleting Test_task1" );
- status = rtems_task_delete( Task_id[ 1 ] );
- directive_failed( status, "rtems_task_delete of Task 1" );
-
- puts( "Restarting Test_task3" );
- status = rtems_task_restart( Task_id[ 3 ], 1 );
- directive_failed( status, "rtems_task_restart of Task 3" );
-
- }
- puts( "*** END OF TEST 10 ***" );
- exit( 0 );
-}
diff --git a/testsuites/mptests/mp10/node1/Makefile.am b/testsuites/mptests/mp10/node1/Makefile.am
deleted file mode 100644
index 15c3130981..0000000000
--- a/testsuites/mptests/mp10/node1/Makefile.am
+++ /dev/null
@@ -1,50 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-VPATH = @srcdir@:@srcdir@/..
-
-NODE = 1
-TEST = mp10
-PGM = ${ARCH}/$(TEST)-node$(NODE).exe
-
-MANAGERS = io mp message semaphore
-
-C_FILES = init.c task1.c task2.c task3.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/mptests.am
-
-if HAS_MP
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -DNODE_NUMBER=$(NODE) -I$(srcdir)/..
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-else
-all-local:
-endif
-
-EXTRA_DIST = $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/mptests/mp10/node1/mp10.doc b/testsuites/mptests/mp10/node1/mp10.doc
deleted file mode 100644
index dce783e641..0000000000
--- a/testsuites/mptests/mp10/node1/mp10.doc
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: test59
-
-GLOBAL SEMAPHORE TEST
-
-directives:
- ex_init, ex_start, t_create, t_start, tm_tick, i_return, t_ident,
- tm_set, tm_get, tm_wkafter
-
-concepts:
-
- a. Verifies system can create and start both the executive's system
- initialization and idle task.
-
- b. Verifies executive can swap between three application tasks at the
- same priority and the executive's internal idle task.
-
- c. Verifies can print strings to the CRT on port 2 of the mvme136 board
- using Print and Println in the board support package.
-
- d. Verifies interrupt handler can handler a task switch from an interrupt
- as specified with the i_return directive.
-
- e. Verifies executive initialization performed correctly.
-
- f. Verifies the executive trap handler except for the halt function.
-
- g. Verifies that a task can get the task identification number of itself.
-
- h. Verifies that a task can get the task identification number
- of another task.
-
- i. Verifies that a task can delete itself or another task.
diff --git a/testsuites/mptests/mp10/node1/mp10.scn b/testsuites/mptests/mp10/node1/mp10.scn
deleted file mode 100644
index deeafc0a9a..0000000000
--- a/testsuites/mptests/mp10/node1/mp10.scn
+++ /dev/null
@@ -1,4 +0,0 @@
-*** TEST 10 -- NODE 1 ***
-Creating Message Queue (Global)
-Creating Semaphore (Global)
-*** END OF TEST 10 ***
diff --git a/testsuites/mptests/mp10/node2/Makefile.am b/testsuites/mptests/mp10/node2/Makefile.am
deleted file mode 100644
index 9631817320..0000000000
--- a/testsuites/mptests/mp10/node2/Makefile.am
+++ /dev/null
@@ -1,50 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-VPATH = @srcdir@:@srcdir@/..
-
-NODE = 2
-TEST = mp10
-PGM = ${ARCH}/$(TEST)-node$(NODE).exe
-
-MANAGERS = io mp message semaphore
-
-C_FILES = init.c task1.c task2.c task3.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/mptests.am
-
-if HAS_MP
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -DNODE_NUMBER=$(NODE) -I$(srcdir)/..
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-else
-all-local:
-endif
-
-EXTRA_DIST = $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/mptests/mp10/node2/mp10.doc b/testsuites/mptests/mp10/node2/mp10.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/mptests/mp10/node2/mp10.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/mptests/mp10/node2/mp10.scn b/testsuites/mptests/mp10/node2/mp10.scn
deleted file mode 100644
index 25c07e6202..0000000000
--- a/testsuites/mptests/mp10/node2/mp10.scn
+++ /dev/null
@@ -1,19 +0,0 @@
-*** TEST 10 -- NODE 2 ***
-Creating Test_task 1 (local)
-Starting Test_task 1 (local)
-Creating Test_task 2 (local)
-Starting Test_task 2 (local)
-Creating Test_task 3 (local)
-Starting Test_task 3 (local)
-Sleeping for 1 seconds ...
-Getting QID of message queue
-Attempting to receive message ...
-Getting SMID of semaphore
-Attempting to acquire semaphore ...
-Getting SMID of semaphore
-Attempting to acquire semaphore ...
-Deleting Test_task2
-Deleting Test_task1
-Restarting Test_task3
-*** END OF TEST 10 ***
-
diff --git a/testsuites/mptests/mp10/system.h b/testsuites/mptests/mp10/system.h
deleted file mode 100644
index d41dd4c8e4..0000000000
--- a/testsuites/mptests/mp10/system.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_task Test_task1(
- rtems_task_argument argument
-);
-
-rtems_task Test_task2(
- rtems_task_argument argument
-);
-
-rtems_task Test_task3(
- rtems_task_argument restart
-);
-
-/* configuration information */
-
-#define CONFIGURE_MPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#if ( NODE_NUMBER == 1 )
-#define CONFIGURE_MAXIMUM_SEMAPHORES 1
-#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#endif
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* variables */
-
-TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
-
-TEST_EXTERN rtems_id Queue_id[ 2 ]; /* array of message queue ids */
-TEST_EXTERN rtems_name Queue_name[ 2 ]; /* array of message queue names */
-
-TEST_EXTERN rtems_id Semaphore_id[ 2 ]; /* array of semaphore ids */
-TEST_EXTERN rtems_name Semaphore_name[ 2 ]; /* array of semaphore names */
-
-/* end of include file */
diff --git a/testsuites/mptests/mp10/task1.c b/testsuites/mptests/mp10/task1.c
deleted file mode 100644
index 6e87cd4389..0000000000
--- a/testsuites/mptests/mp10/task1.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Test_task1
- *
- * This task attempts to receive a message from a global message queue.
- * It should never actually receive the message.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Test_task1(
- rtems_task_argument argument
-)
-{
- char receive_buffer[16];
- rtems_unsigned32 size;
- rtems_status_code status;
-
- puts( "Getting QID of message queue" );
-
- do {
- status = rtems_message_queue_ident(
- Queue_name[ 1 ],
- RTEMS_SEARCH_ALL_NODES,
- &Queue_id[ 1 ]
- );
- } while ( !rtems_is_status_successful( status ) );
-
- puts( "Attempting to receive message ..." );
- status = rtems_message_queue_receive(
- Queue_id[ 1 ],
- (long (*)[4])receive_buffer,
- &size,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
- directive_failed( status, "rtems_message_queue_receive" );
-
-}
diff --git a/testsuites/mptests/mp10/task2.c b/testsuites/mptests/mp10/task2.c
deleted file mode 100644
index b2c17a9175..0000000000
--- a/testsuites/mptests/mp10/task2.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Test_task2
- *
- * This task attempts to receive control of a global semaphore.
- * It should never receive control of the semaphore.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Test_task2(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- puts( "Getting SMID of semaphore" );
-
- do {
- status = rtems_semaphore_ident(
- Semaphore_name[ 1 ],
- RTEMS_SEARCH_ALL_NODES,
- &Semaphore_id[ 1 ]
- );
- } while ( !rtems_is_status_successful( status ) );
-
- puts( "Attempting to acquire semaphore ..." );
- status = rtems_semaphore_obtain(
- Semaphore_id[ 1 ],
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
- directive_failed( status, "rtems_semaphore_obtain" );
-}
diff --git a/testsuites/mptests/mp10/task3.c b/testsuites/mptests/mp10/task3.c
deleted file mode 100644
index 3ab7255253..0000000000
--- a/testsuites/mptests/mp10/task3.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/* Test_task3
- *
- * This task attempts to receive control of a global semaphore.
- * It should never receive control of the semaphore.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Test_task3( restart )
-rtems_task_argument restart;
-{
- rtems_status_code status;
-
- if ( restart == 1 ) {
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete" );
- }
-
- puts( "Getting SMID of semaphore" );
-
- do {
- status = rtems_semaphore_ident(
- Semaphore_name[ 1 ],
- RTEMS_SEARCH_ALL_NODES,
- &Semaphore_id[ 1 ]
- );
- } while ( !rtems_is_status_successful( status ) );
-
- puts( "Attempting to acquire semaphore ..." );
- status = rtems_semaphore_obtain(
- Semaphore_id[ 1 ],
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
- directive_failed( status, "rtems_semaphore_obtain" );
-}
diff --git a/testsuites/mptests/mp11/Makefile.am b/testsuites/mptests/mp11/Makefile.am
deleted file mode 100644
index b911e9c09c..0000000000
--- a/testsuites/mptests/mp11/Makefile.am
+++ /dev/null
@@ -1,12 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-SUBDIRS = node1 node2
-
-EXTRA_DIST = system.h init.c
-
-include $(top_srcdir)/../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/mptests/mp11/init.c b/testsuites/mptests/mp11/init.c
deleted file mode 100644
index d76918852b..0000000000
--- a/testsuites/mptests/mp11/init.c
+++ /dev/null
@@ -1,104 +0,0 @@
-/* Init
- *
- * This routine is the initialization and test routine for
- * this test program. It attempts to create more global
- * objects than are configured (zero should be configured).
- * This routine is the initialization task for this test program.
- * It is a user initialization task and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_unsigned8 my_partition[0x30000] CPU_STRUCTURE_ALIGNMENT;
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_id junk_id;
- rtems_status_code status;
-
- printf(
- "\n\n*** TEST 11 -- NODE %d ***\n",
- Multiprocessing_configuration.node
- );
-
- Task_name[ 1 ] = rtems_build_name( '1', '1', '1', ' ' );
- Task_name[ 2 ] = rtems_build_name( '2', '2', '2', ' ' );
-
- Queue_name[ 1 ] = rtems_build_name( 'M', 'S', 'G', ' ' );
-
- Semaphore_name[ 1 ] = rtems_build_name( 'S', 'E', 'M', ' ' );
-
- if ( Multiprocessing_configuration.node == 1 ) {
- puts( "Attempting to create Test_task (Global)" );
- status = rtems_task_create(
- Task_name[ 1 ],
- 1,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_GLOBAL,
- &junk_id
- );
- fatal_directive_status( status, RTEMS_TOO_MANY, "rtems_task_create" );
- puts( "rtems_task_create correctly returned RTEMS_TOO_MANY" );
-
- puts( "Attempting to create Message Queue (Global)" );
- status = rtems_message_queue_create(
- Queue_name[ 1 ],
- 3,
- 16,
- RTEMS_GLOBAL,
- &junk_id
- );
- fatal_directive_status(
- status,
- RTEMS_TOO_MANY,
- "rtems_message_queue_create"
- );
- puts( "rtems_message_queue_create correctly returned RTEMS_TOO_MANY" );
-
- puts( "Attempting to create Semaphore (Global)" );
- status = rtems_semaphore_create(
- Semaphore_name[ 1 ],
- 1,
- RTEMS_GLOBAL,
- RTEMS_NO_PRIORITY,
- &junk_id
- );
- fatal_directive_status( status, RTEMS_TOO_MANY, "rtems_semaphore_create" );
- puts( "rtems_semaphore_create correctly returned RTEMS_TOO_MANY" );
-
- puts( "Attempting to create Partition (Global)" );
- status = rtems_partition_create(
- 1,
- (rtems_unsigned8 *) my_partition,
- 128,
- 64,
- RTEMS_GLOBAL,
- &junk_id
- );
- fatal_directive_status( status, RTEMS_TOO_MANY, "rtems_partition_create" );
- puts( "rtems_partition_create correctly returned RTEMS_TOO_MANY" );
- }
- puts( "*** END OF TEST 11 ***" );
- exit( 0 );
-}
diff --git a/testsuites/mptests/mp11/node1/Makefile.am b/testsuites/mptests/mp11/node1/Makefile.am
deleted file mode 100644
index 903abd0c45..0000000000
--- a/testsuites/mptests/mp11/node1/Makefile.am
+++ /dev/null
@@ -1,50 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-VPATH = @srcdir@:@srcdir@/..
-
-NODE = 1
-TEST = mp11
-PGM = ${ARCH}/$(TEST)-node$(NODE).exe
-
-MANAGERS = io mp message partition semaphore
-
-C_FILES = init.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/mptests.am
-
-if HAS_MP
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -DNODE_NUMBER=$(NODE) -I$(srcdir)/..
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-else
-all-local:
-endif
-
-EXTRA_DIST = $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/mptests/mp11/node1/mp11.doc b/testsuites/mptests/mp11/node1/mp11.doc
deleted file mode 100644
index 1bb89e8371..0000000000
--- a/testsuites/mptests/mp11/node1/mp11.doc
+++ /dev/null
@@ -1,41 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: test60
-
-TOO MANY GLOBAL OBJECTS ERROR TEST
-
-directives:
- ex_init, ex_start, t_create, t_start, tm_tick, i_return,
- t_create, q_create, sm_create, pt_create
-
-concepts:
-
- a. Verifies system can create and start both the executive's system
- initialization and idle task.
-
- b. Verifies executive can swap between three application tasks at the
- same priority and the executive's internal idle task.
-
- c. Verifies can print strings to the CRT on port 2 of the mvme136 board
- using Print and Println in the board support package.
-
- d. Verifies interrupt handler can handler a task switch from an interrupt
- as specified with the i_return directive.
-
- e. Verifies executive initialization performed correctly.
-
- f. Verifies the executive trap handler except for the halt function.
-
- g. Verifies that all object create directives correctly return
- E_TOOMANYGOBJECTS.
diff --git a/testsuites/mptests/mp11/node1/mp11.scn b/testsuites/mptests/mp11/node1/mp11.scn
deleted file mode 100644
index fb26583852..0000000000
--- a/testsuites/mptests/mp11/node1/mp11.scn
+++ /dev/null
@@ -1,10 +0,0 @@
-*** TEST 11 -- NODE 1 ***
-Attempting to create Test_task (Global)
-rtems_task_create correctly returned RTEMS_TOO_MANY
-Attempting to create Message Queue (Global)
-rtems_message_queue_create correctly returned RTEMS_TOO_MANY
-Attempting to create Semaphore (Global)
-rtems_semaphore_create correctly returned RTEMS_TOO_MANY
-Attempting to create Partition (Global)
-rtems_partition_create correctly returned RTEMS_TOO_MANY
-*** END OF TEST 11 ***
diff --git a/testsuites/mptests/mp11/node2/Makefile.am b/testsuites/mptests/mp11/node2/Makefile.am
deleted file mode 100644
index c3f94096b4..0000000000
--- a/testsuites/mptests/mp11/node2/Makefile.am
+++ /dev/null
@@ -1,50 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-VPATH = @srcdir@:@srcdir@/..
-
-NODE = 2
-TEST = mp11
-PGM = ${ARCH}/$(TEST)-node$(NODE).exe
-
-MANAGERS = io mp message partition semaphore
-
-C_FILES = init.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/mptests.am
-
-if HAS_MP
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -DNODE_NUMBER=$(NODE) -I$(srcdir)/..
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-else
-all-local:
-endif
-
-EXTRA_DIST = $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/mptests/mp11/node2/mp11.doc b/testsuites/mptests/mp11/node2/mp11.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/mptests/mp11/node2/mp11.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/mptests/mp11/node2/mp11.scn b/testsuites/mptests/mp11/node2/mp11.scn
deleted file mode 100644
index 49bd8a3219..0000000000
--- a/testsuites/mptests/mp11/node2/mp11.scn
+++ /dev/null
@@ -1,2 +0,0 @@
-*** TEST 11 -- NODE 2 ***
-*** END OF TEST 11 ***
diff --git a/testsuites/mptests/mp11/system.h b/testsuites/mptests/mp11/system.h
deleted file mode 100644
index db553e813f..0000000000
--- a/testsuites/mptests/mp11/system.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-/* configuration information */
-
-#define CONFIGURE_MPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS 0
-#define CONFIGURE_MP_MAXIMUM_PROXIES 0
-
-#if ( NODE_NUMBER == 1 )
-#define CONFIGURE_MAXIMUM_SEMAPHORES 1
-#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_MAXIMUM_PARTITIONS 1
-#endif
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* variables */
-
-TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
-
-TEST_EXTERN rtems_id Queue_id[ 2 ]; /* array of message queue ids */
-TEST_EXTERN rtems_name Queue_name[ 2 ]; /* array of message queue names */
-
-TEST_EXTERN rtems_id Semaphore_id[ 2 ]; /* array of semaphore ids */
-TEST_EXTERN rtems_name Semaphore_name[ 2 ]; /* array of semaphore names */
-
-/* end of include file */
diff --git a/testsuites/mptests/mp12/Makefile.am b/testsuites/mptests/mp12/Makefile.am
deleted file mode 100644
index b911e9c09c..0000000000
--- a/testsuites/mptests/mp12/Makefile.am
+++ /dev/null
@@ -1,12 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-SUBDIRS = node1 node2
-
-EXTRA_DIST = system.h init.c
-
-include $(top_srcdir)/../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/mptests/mp12/init.c b/testsuites/mptests/mp12/init.c
deleted file mode 100644
index 5ba9e71b96..0000000000
--- a/testsuites/mptests/mp12/init.c
+++ /dev/null
@@ -1,112 +0,0 @@
-/* Init
- *
- * This routine is the initialization routine and test code for
- * global partitions. It creates a global partition, obtains and
- * releases a buffer, and deletes the partition. The partition
- * is created on node one, and an attempt is made to delete it
- * by node two.
- * This routine is the initialization task for this test program.
- * It is a user initialization task and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_unsigned8 Partition_area[ 1024 ] CPU_STRUCTURE_ALIGNMENT;
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
- void *bufaddr;
-
- printf(
- "\n\n*** TEST 12 -- NODE %d ***\n",
- Multiprocessing_configuration.node
- );
-
- Task_name[ 1 ] = rtems_build_name( '1', '1', '1', ' ' );
- Task_name[ 2 ] = rtems_build_name( '2', '2', '2', ' ' );
-
- Partition_name[ 1 ] = rtems_build_name( 'P', 'A', 'R', ' ' );
-
- puts( "Got to initialization task" );
-
- if ( Multiprocessing_configuration.node == 2 ) {
- status = rtems_task_wake_after( 1 * TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
-
- puts( "Getting ID of remote Partition (Global)" );
-
- do {
- status = rtems_partition_ident(
- Partition_name[ 1 ],
- RTEMS_SEARCH_ALL_NODES,
- &Partition_id[ 1 ]
- );
- } while ( !rtems_is_status_successful( status ) );
-
- puts( "Attempting to delete remote Partition (Global)" );
- status = rtems_partition_delete( Partition_id[ 1 ] );
- fatal_directive_status(
- status,
- RTEMS_ILLEGAL_ON_REMOTE_OBJECT,
- "rtems_partition_delete"
- );
- puts(
- "rtems_partition_delete correctly returned RTEMS_ILLEGAL_ON_REMOTE_OBJECT"
- );
-
- puts( "Obtaining a buffer from the global partition" );
- status = rtems_partition_get_buffer( Partition_id[ 1 ], &bufaddr );
- directive_failed( status, "rtems_partition_get_buffer" );
- printf( "Address returned was : 0x%p\n", bufaddr );
-
- puts( "Releasing a buffer to the global partition" );
- status = rtems_partition_return_buffer( Partition_id[ 1 ], bufaddr );
- directive_failed( status, "rtems_partition_return_buffer" );
-
- status = rtems_task_wake_after( 2 * TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
- }
- else {
- puts( "Creating Partition (Global)" );
- status = rtems_partition_create(
- Partition_name[ 1 ],
- Partition_area,
- 128,
- 64,
- RTEMS_GLOBAL,
- &Partition_id[ 1 ]
- );
- directive_failed( status, "rtems_partition_create" );
-
- puts( "Sleeping for two seconds" );
- status = rtems_task_wake_after( 2 * TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
-
- puts( "Deleting Partition (Global)" );
- status = rtems_partition_delete( Partition_id[ 1 ] );
- directive_failed( status, "rtems_partition_delete" );
- }
- puts( "*** END OF TEST 12 ***" );
- exit( 0 );
-}
diff --git a/testsuites/mptests/mp12/node1/Makefile.am b/testsuites/mptests/mp12/node1/Makefile.am
deleted file mode 100644
index 4c634741b1..0000000000
--- a/testsuites/mptests/mp12/node1/Makefile.am
+++ /dev/null
@@ -1,50 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-VPATH = @srcdir@:@srcdir@/..
-
-NODE = 1
-TEST = mp12
-PGM = ${ARCH}/$(TEST)-node$(NODE).exe
-
-MANAGERS = io mp partition
-
-C_FILES = init.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/mptests.am
-
-if HAS_MP
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -DNODE_NUMBER=$(NODE) -I$(srcdir)/..
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-else
-all-local:
-endif
-
-EXTRA_DIST = $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/mptests/mp12/node1/mp12.doc b/testsuites/mptests/mp12/node1/mp12.doc
deleted file mode 100644
index 512bb92934..0000000000
--- a/testsuites/mptests/mp12/node1/mp12.doc
+++ /dev/null
@@ -1,51 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: test61
-
-GLOBAL PARTITION TEST
-
-directives:
- ex_init, ex_start, t_create, t_start, tm_tick, i_return, tm_wkafter,
- pt_create, pt_delete, pt_getbuf, pt_retbuf
-
-concepts:
-
- a. Verifies system can create and start both the executive's system
- initialization and idle task.
-
- b. Verifies executive can swap between three application tasks at the
- same priority and the executive's internal idle task.
-
- c. Verifies can print strings to the CRT on port 2 of the mvme136 board
- using Print and Println in the board support package.
-
- d. Verifies interrupt handler can handler a task switch from an interrupt
- as specified with the i_return directive.
-
- e. Verifies executive initialization performed correctly.
-
- f. Verifies the executive trap handler except for the halt function.
-
- g. Verifies the Shared Memory Locked Queue Driver.
-
- h. Verifies _Rpc() and _Process_pkt() for the following packet types:
- P_OBJCREATE (partitions),
- P_OBJDELETE (partitions),
- P_PTGETBUF, and
- P_PTRETBUF.
-
- i. Verifies normal and error paths (other than E_TOOMANYGOBJECTS)
- for global partitions.
-
- j. Verifies that a task can delete itself.
diff --git a/testsuites/mptests/mp12/node1/mp12.scn b/testsuites/mptests/mp12/node1/mp12.scn
deleted file mode 100644
index 605a2c11db..0000000000
--- a/testsuites/mptests/mp12/node1/mp12.scn
+++ /dev/null
@@ -1,6 +0,0 @@
-*** TEST 12 -- NODE 1 ***
-Got to initialization task
-Creating Partition (Global)
-Sleeping for two seconds
-Deleting Partition (Global)
-*** END OF TEST 12 ***
diff --git a/testsuites/mptests/mp12/node2/Makefile.am b/testsuites/mptests/mp12/node2/Makefile.am
deleted file mode 100644
index dfdabec2e1..0000000000
--- a/testsuites/mptests/mp12/node2/Makefile.am
+++ /dev/null
@@ -1,50 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-VPATH = @srcdir@:@srcdir@/..
-
-NODE = 2
-TEST = mp12
-PGM = ${ARCH}/$(TEST)-node$(NODE).exe
-
-MANAGERS = io mp partition
-
-C_FILES = init.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/mptests.am
-
-if HAS_MP
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -DNODE_NUMBER=$(NODE) -I$(srcdir)/..
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-else
-all-local:
-endif
-
-EXTRA_DIST = $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/mptests/mp12/node2/mp12.doc b/testsuites/mptests/mp12/node2/mp12.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/mptests/mp12/node2/mp12.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/mptests/mp12/node2/mp12.scn b/testsuites/mptests/mp12/node2/mp12.scn
deleted file mode 100644
index ad65e9cb32..0000000000
--- a/testsuites/mptests/mp12/node2/mp12.scn
+++ /dev/null
@@ -1,10 +0,0 @@
-*** TEST 12 -- NODE 2 ***
-Got to initialization task
-Getting ID of remote Partition (Global)
-Attempting to delete remote Partition (Global)
-rtems_partition_delete correctly returned RTEMS_ILLEGAL_ON_REMOTE_OBJECT
-Obtaining a buffer from the global partition
->>>>>>> address returned will differ
-Address returned was : 0x200f0000
-Releasing a buffer to the global partition
-*** END OF TEST 12 ***
diff --git a/testsuites/mptests/mp12/system.h b/testsuites/mptests/mp12/system.h
deleted file mode 100644
index b464f17f1c..0000000000
--- a/testsuites/mptests/mp12/system.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-#define PT_NAME rtems_build_name( 'P', 'A', 'R', '\0' )
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-/* configuration information */
-
-#define CONFIGURE_MPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS 1
-#define CONFIGURE_MP_MAXIMUM_PROXIES 0
-
-#if ( NODE_NUMBER == 1 )
-#define CONFIGURE_MAXIMUM_PARTITIONS 1
-#elif ( NODE_NUMBER == 2 )
-#define CONFIGURE_MAXIMUM_PARTITIONS 2
-#endif
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* variables */
-
-TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
-
-TEST_EXTERN rtems_id Partition_id[ 2 ]; /* array of partition ids */
-TEST_EXTERN rtems_name Partition_name[ 2 ]; /* array of partition names */
-
-/* end of include file */
diff --git a/testsuites/mptests/mp13/Makefile.am b/testsuites/mptests/mp13/Makefile.am
deleted file mode 100644
index 7d4d002d1c..0000000000
--- a/testsuites/mptests/mp13/Makefile.am
+++ /dev/null
@@ -1,12 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-SUBDIRS = node1 node2
-
-EXTRA_DIST = system.h init.c task1.c task2.c
-
-include $(top_srcdir)/../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/mptests/mp13/init.c b/testsuites/mptests/mp13/init.c
deleted file mode 100644
index bc13f5fae8..0000000000
--- a/testsuites/mptests/mp13/init.c
+++ /dev/null
@@ -1,114 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is a user initialization task and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- printf(
- "\n\n*** TEST 13 -- NODE %d ***\n",
- Multiprocessing_configuration.node
- );
-
- Task_name[ 1 ] = rtems_build_name( '1', '1', '1', ' ' );
- Task_name[ 2 ] = rtems_build_name( '2', '2', '2', ' ' );
-
- Queue_name[ 1 ] = rtems_build_name( 'M', 'S', 'G', ' ' );
-
- Semaphore_name[ 1 ] = rtems_build_name( 'S', 'E', 'M', ' ' );
-
- if ( Multiprocessing_configuration.node == 1 ) {
- puts( "Creating Message Queue (Global)" );
- status = rtems_message_queue_create(
- Queue_name[ 1 ],
- 3,
- 16,
- RTEMS_GLOBAL,
- &Queue_id[ 1 ]
- );
- directive_failed( status, "rtems_message_queue_create" );
-
- puts( "Creating Semaphore (Global)" );
- status = rtems_semaphore_create(
- Semaphore_name[ 1 ],
- 1,
- RTEMS_GLOBAL | RTEMS_PRIORITY,
- RTEMS_NO_PRIORITY,
- &Semaphore_id[ 1 ]
- );
- directive_failed( status, "rtems_semaphore_create" );
-
- status = rtems_semaphore_obtain(
- Semaphore_id[ 1 ],
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
- directive_failed( status, "rtems_semaphore_obtain" );
- }
-
- puts( "Creating Test_task 1 (local)" );
- status = rtems_task_create(
- Task_name[ 1 ],
- 1,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_TIMESLICE,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_create" );
-
- puts( "Starting Test_task 1 (local)" );
- status = rtems_task_start( Task_id[ 1 ], Test_task1, 0 );
- directive_failed( status, "rtems_task_start" );
-
- puts( "Creating Test_task 2 (local)" );
- status = rtems_task_create(
- Task_name[ 2 ],
- 1,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_TIMESLICE,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 2 ]
- );
- directive_failed( status, "rtems_task_create" );
-
- puts( "Starting Test_task 2 (local)" );
- status = rtems_task_start( Task_id[ 2 ], Test_task2, 0 );
- directive_failed( status, "rtems_task_start" );
-
- if ( Multiprocessing_configuration.node == 1 ) {
- status = rtems_task_wake_after( 5 * TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
-
- puts( "*** END OF TEST 13 ***" );
- exit( 0 );
- }
- puts( "Deleting initialization task" );
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
diff --git a/testsuites/mptests/mp13/node1/Makefile.am b/testsuites/mptests/mp13/node1/Makefile.am
deleted file mode 100644
index fe34c6f673..0000000000
--- a/testsuites/mptests/mp13/node1/Makefile.am
+++ /dev/null
@@ -1,50 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-VPATH = @srcdir@:@srcdir@/..
-
-NODE = 1
-TEST = mp13
-PGM = ${ARCH}/$(TEST)-node$(NODE).exe
-
-MANAGERS = io mp message semaphore
-
-C_FILES = init.c task1.c task2.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/mptests.am
-
-if HAS_MP
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -DNODE_NUMBER=$(NODE) -I$(srcdir)/..
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-else
-all-local:
-endif
-
-EXTRA_DIST = $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/mptests/mp13/node1/mp13.doc b/testsuites/mptests/mp13/node1/mp13.doc
deleted file mode 100644
index dfd983fceb..0000000000
--- a/testsuites/mptests/mp13/node1/mp13.doc
+++ /dev/null
@@ -1,47 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: test62
-
-GLOBAL SEMAPHORE TEST
-
-directives:
- ex_init, ex_start, t_create, t_start, tm_tick, i_return, tm_wkafter,
- sm_create, q_create, sm_p, q_receive
-
-concepts:
-
- a. Verifies system can create and start both the executive's system
- initialization and idle task.
-
- b. Verifies executive can swap between three application tasks at the
- same priority and the executive's internal idle task.
-
- c. Verifies can print strings to the CRT on port 2 of the mvme136 board
- using Print and Println in the board support package.
-
- d. Verifies interrupt handler can handler a task switch from an interrupt
- as specified with the i_return directive.
-
- e. Verifies executive initialization performed correctly.
-
- f. Verifies the executive trap handler except for the halt function.
-
- g. Verifies the Shared Memory Locked Queue Driver.
-
- h. Verifies that E_MESSAGETIMEOUT is when waiting on a
- remote message queue.
-
- i. Verifies that E_SEMTIMEOUT is when waiting on a remote semaphore.
-
- j. Verifies that a task can delete itself.
diff --git a/testsuites/mptests/mp13/node1/mp13.scn b/testsuites/mptests/mp13/node1/mp13.scn
deleted file mode 100644
index d3bd11f65e..0000000000
--- a/testsuites/mptests/mp13/node1/mp13.scn
+++ /dev/null
@@ -1,14 +0,0 @@
-*** TEST 13 -- NODE 1 ***
-Creating Message Queue (Global)
-Creating Semaphore (Global)
-Creating Test_task 1 (local)
-Starting Test_task 1 (local)
-Creating Test_task 2 (local)
-Starting Test_task 2 (local)
-Getting QID of message queue
-Receiving message ...
-Getting SMID of semaphore
-Releasing semaphore ...
-Getting semaphore ...
-Getting semaphore ...
-*** END OF TEST 13 ***
diff --git a/testsuites/mptests/mp13/node2/Makefile.am b/testsuites/mptests/mp13/node2/Makefile.am
deleted file mode 100644
index d19b736e51..0000000000
--- a/testsuites/mptests/mp13/node2/Makefile.am
+++ /dev/null
@@ -1,50 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-VPATH = @srcdir@:@srcdir@/..
-
-NODE = 2
-TEST = mp13
-PGM = ${ARCH}/$(TEST)-node$(NODE).exe
-
-MANAGERS = io mp message semaphore
-
-C_FILES = init.c task1.c task2.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/mptests.am
-
-if HAS_MP
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -DNODE_NUMBER=$(NODE) -I$(srcdir)/..
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-else
-all-local:
-endif
-
-EXTRA_DIST = $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/mptests/mp13/node2/mp13.doc b/testsuites/mptests/mp13/node2/mp13.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/mptests/mp13/node2/mp13.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/mptests/mp13/node2/mp13.scn b/testsuites/mptests/mp13/node2/mp13.scn
deleted file mode 100644
index e9df202a94..0000000000
--- a/testsuites/mptests/mp13/node2/mp13.scn
+++ /dev/null
@@ -1,16 +0,0 @@
-*** TEST 13 -- NODE 2 ***
-Creating Test_task 1 (local)
-Starting Test_task 1 (local)
-Creating Test_task 2 (local)
-Starting Test_task 2 (local)
-Deleting initialization task
-Getting QID of message queue
-Getting SMID of semaphore
-Getting semaphore ...
-Receiving message ...
-Releasing semaphore ...
-Getting semaphore ...
-rtems_message_queue_receive correctly returned RTEMS_TIMEOUT
-Deleting self
-rtems_semaphore_obtain correctly returned RTEMS_TIMEOUT
-*** END OF TEST 13 ***
diff --git a/testsuites/mptests/mp13/system.h b/testsuites/mptests/mp13/system.h
deleted file mode 100644
index 08e0ef2152..0000000000
--- a/testsuites/mptests/mp13/system.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_task Test_task1(
- rtems_task_argument argument
-);
-
-rtems_task Test_task2(
- rtems_task_argument argument
-);
-
-/* configuration information */
-
-#define CONFIGURE_MPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#if ( NODE_NUMBER == 1 )
-#define CONFIGURE_MAXIMUM_SEMAPHORES 1
-#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#endif
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* variables */
-
-TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
-
-TEST_EXTERN rtems_id Queue_id[ 2 ]; /* array of message queue ids */
-TEST_EXTERN rtems_name Queue_name[ 2 ]; /* array of message queue names */
-
-TEST_EXTERN rtems_id Semaphore_id[ 2 ]; /* array of semaphore ids */
-TEST_EXTERN rtems_name Semaphore_name[ 2 ]; /* array of semaphore names */
-
-/* end of include file */
diff --git a/testsuites/mptests/mp13/task1.c b/testsuites/mptests/mp13/task1.c
deleted file mode 100644
index e83c24ce0a..0000000000
--- a/testsuites/mptests/mp13/task1.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/* Test_task1
- *
- * This task attempts to receive a message from a global message queue.
- * If running on the node on which the queue resides, the wait is
- * forever, otherwise it times out on a remote message queue.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Test_task1(
- rtems_task_argument argument
-)
-{
- char receive_buffer[16];
- rtems_unsigned32 size;
- rtems_status_code status;
-
- puts( "Getting QID of message queue" );
-
- do {
- status = rtems_message_queue_ident(
- Queue_name[ 1 ],
- RTEMS_SEARCH_ALL_NODES,
- &Queue_id[ 1 ]
- );
- } while ( !rtems_is_status_successful( status ) );
-
- if ( Multiprocessing_configuration.node == 1 ) {
- puts( "Receiving message ..." );
- status = rtems_message_queue_receive(
- Queue_id[ 1 ],
- (long (*)[4])receive_buffer,
- &size,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
- puts( "How did I get back from here????" );
- directive_failed( status, "rtems_message_queue_receive" );
- }
-
- status = rtems_task_wake_after( TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
-
- puts( "Receiving message ..." );
- status = rtems_message_queue_receive(
- Queue_id[ 1 ],
- (long (*)[4])receive_buffer,
- &size,
- RTEMS_DEFAULT_OPTIONS,
- 2 * TICKS_PER_SECOND
- );
- fatal_directive_status(status, RTEMS_TIMEOUT, "rtems_message_queue_receive");
- puts( "rtems_message_queue_receive correctly returned RTEMS_TIMEOUT" );
-
- puts( "Deleting self" );
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
diff --git a/testsuites/mptests/mp13/task2.c b/testsuites/mptests/mp13/task2.c
deleted file mode 100644
index e9ff88f4f6..0000000000
--- a/testsuites/mptests/mp13/task2.c
+++ /dev/null
@@ -1,105 +0,0 @@
-/* Test_task2
- *
- * This task attempts to receive control of a global semaphore.
- * If running on the node on which the semaphore resides, the wait is
- * forever, otherwise it times out on a remote semaphore.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Test_task2(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- puts( "Getting SMID of semaphore" );
- do {
- status = rtems_semaphore_ident(
- Semaphore_name[ 1 ],
- RTEMS_SEARCH_ALL_NODES,
- &Semaphore_id[ 1 ]
- );
- } while ( !rtems_is_status_successful( status ) );
-
- directive_failed( status, "rtems_semaphore_ident" );
-
- if ( Multiprocessing_configuration.node == 1 ) {
- status = rtems_task_wake_after( TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
-
- puts( "Releasing semaphore ..." );
- status = rtems_semaphore_release( Semaphore_id[ 1 ] );
- directive_failed( status, "rtems_semaphore_release" );
-
- status = rtems_task_wake_after( TICKS_PER_SECOND / 2 );
- directive_failed( status, "rtems_task_wake_after" );
-
- puts( "Getting semaphore ..." );
- status = rtems_semaphore_obtain(
- Semaphore_id[ 1 ],
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
- directive_failed( status, "rtems_semaphore_obtain" );
-
- puts( "Getting semaphore ..." );
- status = rtems_semaphore_obtain(
- Semaphore_id[ 1 ],
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
- puts( "How did I get back from here????" );
- directive_failed( status, "rtems_semaphore_obtain" );
- }
-
-/*
- status = rtems_task_wake_after( TICKS_PER_SECOND / 2 );
- directive_failed( status, "rtems_task_wake_after" );
-*/
-
- puts( "Getting semaphore ..." );
- status = rtems_semaphore_obtain(
- Semaphore_id[ 1 ],
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
- directive_failed( status, "rtems_semaphore_obtain" );
-
- puts( "Releasing semaphore ..." );
- status = rtems_semaphore_release( Semaphore_id[ 1 ] );
- directive_failed( status, "rtems_semaphore_release" );
-
- status = rtems_task_wake_after( TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
-
- puts( "Getting semaphore ..." );
- status = rtems_semaphore_obtain(
- Semaphore_id[ 1 ],
- RTEMS_DEFAULT_OPTIONS,
- 2 * TICKS_PER_SECOND
- );
- fatal_directive_status(
- status,
- RTEMS_TIMEOUT,
- "rtems_semaphore_obtain"
- );
- puts( "rtems_semaphore_obtain correctly returned RTEMS_TIMEOUT" );
-
- puts( "*** END OF TEST 13 ***" );
- exit( 0 );
-}
diff --git a/testsuites/mptests/mp14/Makefile.am b/testsuites/mptests/mp14/Makefile.am
deleted file mode 100644
index db1ff08d1d..0000000000
--- a/testsuites/mptests/mp14/Makefile.am
+++ /dev/null
@@ -1,12 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-SUBDIRS = node1 node2
-
-EXTRA_DIST = system.h delay.c evtask1.c evtmtask.c exit.c init.c msgtask1.c pttask1.c smtask1.c
-
-include $(top_srcdir)/../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/mptests/mp14/delay.c b/testsuites/mptests/mp14/delay.c
deleted file mode 100644
index 47f70f6b70..0000000000
--- a/testsuites/mptests/mp14/delay.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Delayed_send_event
- *
- * This routine is a timer service routine which sends an event to a task.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_timer_service_routine Delayed_send_event(
- rtems_id timer_id,
- void *ignored
-)
-{
- rtems_status_code status;
-
- status = rtems_event_send(
- Task_id[ rtems_get_index( timer_id ) ],
- RTEMS_EVENT_16
- );
- directive_failed( status, "rtems_event_send" );
-}
diff --git a/testsuites/mptests/mp14/evtask1.c b/testsuites/mptests/mp14/evtask1.c
deleted file mode 100644
index ea4c5e3d22..0000000000
--- a/testsuites/mptests/mp14/evtask1.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/* Test_task
- *
- * This task either continuously sends events to a remote task, or
- * continuously receives events sent by a remote task. This decision
- * is based upon the local node number.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-extern rtems_multiprocessing_table Multiprocessing_configuration;
-
-rtems_task Test_task(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
- rtems_unsigned32 count;
- rtems_unsigned32 remote_node;
- rtems_id remote_tid;
- rtems_event_set event_out;
-
- remote_node = ((Multiprocessing_configuration.node == 1) ? 2 : 1);
-
- puts( "About to go to sleep!" );
- status = rtems_task_wake_after( TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
- puts( "Waking up!" );
-
- puts_nocr( "Remote task's name is : " );
- put_name( Task_name[ remote_node ], TRUE );
-
- puts( "Getting TID of remote task" );
- while ( FOREVER ) {
- status = rtems_task_ident(
- Task_name[ remote_node ],
- RTEMS_SEARCH_ALL_NODES,
- &remote_tid
- );
-
- if ( status == RTEMS_SUCCESSFUL )
- break;
- puts( "rtems_task_ident FAILED!!" );
- rtems_task_wake_after(2);
- }
-
- if ( Multiprocessing_configuration.node == 1 ) {
- puts( "Sending events to remote task" );
- while ( Stop_Test == FALSE ) {
- for ( count=EVENT_TASK_DOT_COUNT; Stop_Test == FALSE && count; count-- ) {
- status = rtems_event_send( remote_tid, RTEMS_EVENT_16 );
- directive_failed( status, "rtems_event_send" );
- }
- put_dot( 'e' );
- }
- }
-
- puts( "Receiving events from remote task" );
- while ( Stop_Test == FALSE ) {
- for ( count=EVENT_TASK_DOT_COUNT ; Stop_Test == FALSE && count ; count-- ) {
- status = rtems_event_receive(
- RTEMS_EVENT_16,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT,
- &event_out
- );
- directive_failed( status, "rtems_event_receive" );
- }
- put_dot( 'e' );
- }
-
- Exit_test();
-}
diff --git a/testsuites/mptests/mp14/evtmtask.c b/testsuites/mptests/mp14/evtmtask.c
deleted file mode 100644
index 520b47a4d7..0000000000
--- a/testsuites/mptests/mp14/evtmtask.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/* Delayed_events_task
- *
- * This task continuously sends itself events at one tick
- * intervals.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Delayed_events_task(
- rtems_task_argument argument
-)
-{
- rtems_unsigned32 count;
- rtems_unsigned32 previous_mode;
- rtems_status_code status;
- rtems_event_set events;
-
- status = rtems_task_mode(
- RTEMS_PREEMPT | RTEMS_TIMESLICE,
- RTEMS_PREEMPT_MASK | RTEMS_TIMESLICE_MASK,
- &previous_mode
- );
- directive_failed( status, "rtems_task_mode" );
-
- status = rtems_timer_create( Timer_name[ 1 ], &Timer_id[ 1 ] );
- directive_failed( status, "rtems_timer_create" );
-
- while ( Stop_Test == FALSE ) {
- for ( count=DELAYED_EVENT_DOT_COUNT; Stop_Test == FALSE && count; count-- ){
- status = rtems_timer_fire_after(
- Timer_id[ 1 ],
- 1,
- Delayed_send_event,
- NULL
- );
- directive_failed( status, "rtems_timer_reset" );
-
- status = rtems_event_receive(
- RTEMS_EVENT_16,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT,
- &events
- );
- directive_failed( status, "rtems_event_receive" );
- }
- put_dot('.');
- }
-
- Exit_test();
-}
diff --git a/testsuites/mptests/mp14/exit.c b/testsuites/mptests/mp14/exit.c
deleted file mode 100644
index e186a4cafb..0000000000
--- a/testsuites/mptests/mp14/exit.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Exit_test
- *
- * This routine safely stops the test and prints some information
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-void Exit_test( void )
-{
- rtems_status_code status;
- rtems_mode old_mode;
-
- /*
- * Wait a bit before shutting down so we don't screw up the other node
- * when our MPCI shuts down
- */
-
- rtems_task_wake_after(20);
-
- status = rtems_task_mode( RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &old_mode );
- directive_failed( status, "rtems_task_mode" );
-
- MPCI_Print_statistics();
-
- rtems_shutdown_executive( 0 );
-}
diff --git a/testsuites/mptests/mp14/init.c b/testsuites/mptests/mp14/init.c
deleted file mode 100644
index e894db7a92..0000000000
--- a/testsuites/mptests/mp14/init.c
+++ /dev/null
@@ -1,190 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is a user initialization task and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_unsigned8 my_partition[0x30000] CPU_STRUCTURE_ALIGNMENT;
-
-rtems_timer_service_routine Stop_Test_TSR(
- rtems_id ignored_id,
- void *ignored_address
-)
-{
- Stop_Test = TRUE;
-}
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
- rtems_task_priority previous_priority;
-
- printf(
- "\n\n*** TEST 14 -- NODE %d ***\n",
- Multiprocessing_configuration.node
- );
-
- Stop_Test = FALSE;
-
- status = rtems_timer_create(
- rtems_build_name('S', 'T', 'O', 'P'),
- &timer_id
- );
- directive_failed( status, "rtems_timer_create" );
-
- status = rtems_timer_fire_after(
- timer_id,
- MAX_LONG_TEST_DURATION * TICKS_PER_SECOND,
- Stop_Test_TSR,
- NULL
- );
- directive_failed( status, "rtems_timer_fire_after" );
-
- Task_name[ 1 ] = rtems_build_name( '1', '1', '1', ' ' );
- Task_name[ 2 ] = rtems_build_name( '2', '2', '2', ' ' );
-
- Queue_task_name[ 1 ] = rtems_build_name( 'M', 'T', '1', ' ' );
- Queue_task_name[ 2 ] = rtems_build_name( 'M', 'T', '2', ' ' );
-
- Partition_task_name[ 1 ] = rtems_build_name( 'P', 'T', '1', ' ' );
- Partition_task_name[ 2 ] = rtems_build_name( 'P', 'T', '2', ' ' );
-
- Semaphore_task_name[ 1 ] = rtems_build_name( 'S', 'M', '1', ' ' );
- Semaphore_task_name[ 2 ] = rtems_build_name( 'S', 'M', '2', ' ' );
-
- Semaphore_name[ 1 ] = rtems_build_name( 'S', 'E', 'M', ' ' );
-
- Queue_name[ 1 ] = rtems_build_name( 'M', 'S', 'G', ' ' );
-
- Partition_name[ 1 ] = rtems_build_name( 'P', 'A', 'R', ' ' );
-
- Timer_name[ 1 ] = rtems_build_name( 'T', 'M', 'R', ' ' );
-
- if ( Multiprocessing_configuration.node == 1 ) {
- puts( "Creating Semaphore (Global)" );
- status = rtems_semaphore_create(
- Semaphore_name[ 1 ],
- 1,
- RTEMS_GLOBAL,
- RTEMS_NO_PRIORITY,
- &Semaphore_id[ 1 ]
- );
- directive_failed( status, "rtems_semaphore_create" );
-
- puts( "Creating Message Queue (Global)" );
- status = rtems_message_queue_create(
- Queue_name[ 1 ],
- 1,
- 16,
- RTEMS_GLOBAL,
- &Queue_id[ 1 ]
- );
- directive_failed( status, "rtems_message_queue_create" );
-
- puts( "Creating Partition (Global)" );
- status = rtems_partition_create(
- Partition_name[ 1 ],
- (void *)my_partition,
- 0x8000,
- 0x3800,
- RTEMS_GLOBAL,
- &Partition_id[ 1 ]
- );
- directive_failed( status, "rtems_partition_create" );
- }
-
- puts( "Creating Event task (Global)" );
- status = rtems_task_create(
- Task_name[ Multiprocessing_configuration.node ],
- 2,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_TIMESLICE,
- RTEMS_GLOBAL,
- &Event_task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_create" );
-
- puts( "Starting Event task (Global)" );
- status = rtems_task_start( Event_task_id[ 1 ], Test_task, 0 );
- directive_failed( status, "rtems_task_start" );
-
- puts( "Creating Semaphore task (Global)" );
- status = rtems_task_create(
- Semaphore_task_name[ Multiprocessing_configuration.node ],
- 2,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_TIMESLICE,
- RTEMS_GLOBAL,
- &Semaphore_task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_create" );
-
- puts( "Starting Semaphore task (Global)" );
- status = rtems_task_start( Semaphore_task_id[ 1 ], Semaphore_task, 0 );
- directive_failed( status, "rtems_task_start" );
-
- puts( "Creating Message Queue task (Global)" );
- status = rtems_task_create(
- Queue_task_name[ Multiprocessing_configuration.node ],
- 2,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_TIMESLICE,
- RTEMS_GLOBAL,
- &Queue_task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_create" );
-
- /* argument is index into Buffers */
- puts( "Starting Message Queue task (Global)" );
- status = rtems_task_start( Queue_task_id[ 1 ], Message_queue_task, 1 );
- directive_failed( status, "rtems_task_start" );
-
- puts( "Creating Partition task (Global)" );
- status = rtems_task_create(
- Partition_task_name[ Multiprocessing_configuration.node ],
- 2,
- RTEMS_MINIMUM_STACK_SIZE * 2,
- RTEMS_TIMESLICE,
- RTEMS_GLOBAL,
- &Partition_task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_create" );
-
- puts( "Starting Partition task (Global)" );
- status = rtems_task_start( Partition_task_id[ 1 ], Partition_task, 0 );
- directive_failed( status, "rtems_task_start" );
-
- status = rtems_task_set_priority( RTEMS_SELF, 2, &previous_priority );
- directive_failed( status, "rtems_task_set_priority" );
-
- status = rtems_task_ident(
- RTEMS_SELF,
- RTEMS_SEARCH_ALL_NODES,
- &Task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_ident" );
-
- Delayed_events_task( 1 );
-}
diff --git a/testsuites/mptests/mp14/msgtask1.c b/testsuites/mptests/mp14/msgtask1.c
deleted file mode 100644
index 254fb5c928..0000000000
--- a/testsuites/mptests/mp14/msgtask1.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/* Message_queue_task
- *
- * This task continuously sends messages to and receives messages from
- * a global message queue. The message buffer is viewed as an array
- * of two sixty-four bit counts which are incremented when a message is
- * received.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Message_queue_task(
- rtems_task_argument index
-)
-{
- rtems_status_code status;
- rtems_unsigned32 count;
- rtems_unsigned32 yield_count;
- rtems_unsigned32 *buffer_count;
- rtems_unsigned32 *overflow_count;
- rtems_unsigned32 size;
-
- Msg_buffer[ index ][0] = 0;
- Msg_buffer[ index ][1] = 0;
- Msg_buffer[ index ][2] = 0;
- Msg_buffer[ index ][3] = 0;
-
- puts( "Getting ID of msg queue" );
- while ( FOREVER ) {
- status = rtems_message_queue_ident(
- Queue_name[ 1 ],
- RTEMS_SEARCH_ALL_NODES,
- &Queue_id[ 1 ]
- );
- if ( status == RTEMS_SUCCESSFUL )
- break;
- puts( "rtems_message_queue_ident FAILED!!" );
- rtems_task_wake_after(2);
- }
-
- if ( Multiprocessing_configuration.node == 1 ) {
- status = rtems_message_queue_send(
- Queue_id[ 1 ],
- (long (*)[4])Msg_buffer[ index ],
- 16
- );
- directive_failed( status, "rtems_message_queue_send" );
- overflow_count = &Msg_buffer[ index ][0];
- buffer_count = &Msg_buffer[ index ][1];
- } else {
- overflow_count = &Msg_buffer[ index ][2];
- buffer_count = &Msg_buffer[ index ][3];
- }
-
- while ( Stop_Test == FALSE ) {
- yield_count = 100;
-
- for ( count=MESSAGE_DOT_COUNT ; Stop_Test == FALSE && count ; count-- ) {
- status = rtems_message_queue_receive(
- Queue_id[ 1 ],
- (long (*)[4])Msg_buffer[ index ],
- &size,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
- directive_failed( status, "rtems_message_queue_receive" );
-
- if ( *buffer_count == (rtems_unsigned32)0xffffffff ) {
- *buffer_count = 0;
- *overflow_count += 1;
- } else
- *buffer_count += 1;
-
- status = rtems_message_queue_send(
- Queue_id[ 1 ],
- (long (*)[4])Msg_buffer[ index ],
- 16
- );
- directive_failed( status, "rtems_message_queue_send" );
-
- if (Stop_Test == FALSE)
- if ( Multiprocessing_configuration.node == 1 && --yield_count == 0 ) {
- status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
- directive_failed( status, "rtems_task_wake_after" );
-
- yield_count = 100;
- }
- }
- put_dot( 'm' );
- }
-
- Exit_test();
-}
diff --git a/testsuites/mptests/mp14/node1/Makefile.am b/testsuites/mptests/mp14/node1/Makefile.am
deleted file mode 100644
index 1e79f51e25..0000000000
--- a/testsuites/mptests/mp14/node1/Makefile.am
+++ /dev/null
@@ -1,51 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-VPATH = @srcdir@:@srcdir@/..
-
-NODE = 1
-TEST = mp14
-PGM = ${ARCH}/$(TEST)-node$(NODE).exe
-
-MANAGERS = io mp event partition semaphore timer message
-
-C_FILES = exit.c init.c delay.c evtask1.c evtmtask.c pttask1.c smtask1.c \
- msgtask1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/mptests.am
-
-if HAS_MP
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -DNODE_NUMBER=$(NODE) -I$(srcdir)/..
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-else
-all-local:
-endif
-
-EXTRA_DIST = $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/mptests/mp14/node1/mp14.doc b/testsuites/mptests/mp14/node1/mp14.doc
deleted file mode 100644
index 33635998b8..0000000000
--- a/testsuites/mptests/mp14/node1/mp14.doc
+++ /dev/null
@@ -1,49 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: test63
-
-INTERRUPT SATURATION TEST
-
-directives:
- ex_init, ex_start, t_create, t_start, t_ident, tm_tick,
- tm_evwhen, tm_wkafter, i_return, ev_send, ev_receive
-
-concepts:
-
- a. Verifies system can create and start both the executive's system
- initialization and idle task.
-
- b. Verifies executive can swap between three application tasks at the
- same priority and the executive's internal idle task.
-
- c. Verifies printing of strings to the CRT on port 2 of the mvme136 board
- using Print and Println in the board support package.
-
- d. Verifies printing of strings to the CRT on port 2 of the mvme136 board
- using Write and Writeln and the TTY driver.
-
- e. Verifies interrupt handler can handler a task switch from an interrupt
- as specified with the i_return directive.
-
- f. Verifies executive initialization performed correctly.
-
- g. Verifies the executive trap handler except for the halt function.
-
- h. Verifies that a task can get the task identification number of itself.
-
- i. Verifies that a task can get the task identification number
- of another task.
-
- j. Verifies that events can be sent to a remote task.
diff --git a/testsuites/mptests/mp14/node1/mp14.scn b/testsuites/mptests/mp14/node1/mp14.scn
deleted file mode 100644
index f57c4f47b3..0000000000
--- a/testsuites/mptests/mp14/node1/mp14.scn
+++ /dev/null
@@ -1,41 +0,0 @@
-*** TEST 14 -- NODE 1 ***
-Creating Semaphore (Global)
-Creating Message Queue (Global)
-Creating Partition (Global)
-Creating Event task (Global)
-Starting Event task (Global)
-Creating Semaphore task (Global)
-About to go to sleep!
-Starting Semaphore task (Global)
-Creating Message Queue task (Global)
-Getting SMID of semaphore
-Starting Message Queue task (Global)
-Creating Partition task (Global)
-Getting ID of msg queue
-Starting Partition task (Global)
-Getting ID of partition
-Waking up!
-Remote task's name is : 222
-Getting TID of remote task
-Sending events to remote task
-<stream of following characters>
-
-. - indicates 100 iterations of
- tm_evafter of 1 tick and rtems_event_receive.
-
-e - indicates that 100
- events have been sent to the remote task.
-
-m - indicates 100 iterations of
- rtems_message_queue_send and rtems_message_queue_receive.
-
-p - indicates 100 iterations of
- rtems_partition_get_buffer and rtems_partition_return_buffer.
-
-s - indicates 100 iterations of
- rtems_semaphore_obtain and rtems_semaphore_release.
-
-NOTES: 1. The messages could be interspersed.
- 2. If one of the nodes exits first, the other may report
- timeout errors on blocking directives.
-
diff --git a/testsuites/mptests/mp14/node2/Makefile.am b/testsuites/mptests/mp14/node2/Makefile.am
deleted file mode 100644
index 28e92736db..0000000000
--- a/testsuites/mptests/mp14/node2/Makefile.am
+++ /dev/null
@@ -1,51 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-VPATH = @srcdir@:@srcdir@/..
-
-NODE = 2
-TEST = mp14
-PGM = ${ARCH}/$(TEST)-node$(NODE).exe
-
-MANAGERS = io mp event partition semaphore timer message
-
-C_FILES = exit.c init.c delay.c evtask1.c evtmtask.c pttask1.c smtask1.c \
- msgtask1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/mptests.am
-
-if HAS_MP
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -DNODE_NUMBER=$(NODE) -I$(srcdir)/..
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-else
-all-local:
-endif
-
-EXTRA_DIST = $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/mptests/mp14/node2/mp14.doc b/testsuites/mptests/mp14/node2/mp14.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/mptests/mp14/node2/mp14.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/mptests/mp14/node2/mp14.scn b/testsuites/mptests/mp14/node2/mp14.scn
deleted file mode 100644
index d128c870e9..0000000000
--- a/testsuites/mptests/mp14/node2/mp14.scn
+++ /dev/null
@@ -1,38 +0,0 @@
-*** TEST 14 -- NODE 2 ***
-Creating Event task (Global)
-Starting Event task (Global)
-Creating Semaphore task (Global)
-About to go to sleep!
-Starting Semaphore task (Global)
-Creating Message Queue task (Global)
-Getting SMID of semaphore
-Starting Message Queue task (Global)
-Creating Partition task (Global)
-Getting ID of msg queue
-Starting Partition task (Global)
-Getting ID of partition
-Waking up!
-Remote task's name is : 111
-Getting TID of remote task
-Receiving events from remote task
-<stream of following characters>
-
-. - indicates 100 iterations of
- tm_evafter of 1 tick and rtems_event_receive.
-
-e - indicates that 100
- events have been sent to the remote task.
-
-m - indicates 100 iterations of
- rtems_message_queue_send and rtems_message_queue_receive.
-
-p - indicates 100 iterations of
- rtems_partition_get_buffer and rtems_partition_return_buffer.
-
-s - indicates 100 iterations of
- rtems_semaphore_obtain and rtems_semaphore_release.
-
-NOTES: 1. The messages could be interspersed.
- 2. If one of the nodes exits first, the other may report
- timeout errors on blocking directives.
-
diff --git a/testsuites/mptests/mp14/pttask1.c b/testsuites/mptests/mp14/pttask1.c
deleted file mode 100644
index 520f7a6066..0000000000
--- a/testsuites/mptests/mp14/pttask1.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/* Partition_task
- *
- * This task continuously gets a buffer from and returns that buffer
- * to a global partition.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-extern rtems_multiprocessing_table Multiprocessing_configuration;
-
-rtems_task Partition_task(
- rtems_task_argument argument
-)
-{
- rtems_unsigned32 count;
- rtems_status_code status;
- rtems_unsigned32 yield_count;
- void *buffer;
-
- puts( "Getting ID of partition" );
- while ( FOREVER ) {
- status = rtems_partition_ident(
- Partition_name[ 1 ],
- RTEMS_SEARCH_ALL_NODES,
- &Partition_id[ 1 ]
- );
-
- if ( status == RTEMS_SUCCESSFUL )
- break;
-
- puts( "rtems_partition_ident FAILED!!" );
- rtems_task_wake_after(2);
- }
-
- yield_count = 100;
-
- while ( Stop_Test == FALSE ) {
- for ( count=PARTITION_DOT_COUNT ; Stop_Test == FALSE && count ; count-- ) {
- status = rtems_partition_get_buffer( Partition_id[ 1 ], &buffer );
- directive_failed( status, "rtems_partition_get_buffer" );
-
- status = rtems_partition_return_buffer( Partition_id[ 1 ], buffer );
- directive_failed( status, "rtems_partition_return_buffer" );
-
- if (Stop_Test == FALSE)
- if ( Multiprocessing_configuration.node == 1 && --yield_count == 0 ) {
- status = rtems_task_wake_after( 1 );
- directive_failed( status, "rtems_task_wake_after" );
- yield_count = 100;
- }
- }
- put_dot( 'p' );
- }
-
- Exit_test();
-}
diff --git a/testsuites/mptests/mp14/smtask1.c b/testsuites/mptests/mp14/smtask1.c
deleted file mode 100644
index d9e2865e9d..0000000000
--- a/testsuites/mptests/mp14/smtask1.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/* Sm_test_task
- *
- * This task continuously obtains and releases a global semaphore.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-extern rtems_multiprocessing_table Multiprocessing_configuration;
-
-rtems_task Semaphore_task(
- rtems_task_argument argument
-)
-{
- rtems_unsigned32 count;
- rtems_status_code status;
- rtems_unsigned32 yield_count;
-
- puts( "Getting SMID of semaphore" );
- while ( FOREVER ) {
- status = rtems_semaphore_ident(
- Semaphore_name[ 1 ],
- RTEMS_SEARCH_ALL_NODES,
- &Semaphore_id[ 1 ]
- );
- if ( status == RTEMS_SUCCESSFUL )
- break;
- puts( "rtems_semaphore_ident FAILED!!" );
- rtems_task_wake_after(2);
- }
-
- yield_count = 100;
-
- while ( Stop_Test == FALSE ) {
-
- for ( count=SEMAPHORE_DOT_COUNT ; Stop_Test == FALSE && count ; count-- ) {
- status = rtems_semaphore_obtain(
- Semaphore_id[ 1 ],
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
- directive_failed( status, "rtems_semaphore_obtain" );
-
- status = rtems_semaphore_release( Semaphore_id[ 1 ] );
- directive_failed( status, "rtems_semaphore_release" );
-
- if ( Stop_Test == FALSE )
- if ( Multiprocessing_configuration.node == 1 && --yield_count == 0 ) {
- status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
- directive_failed( status, "rtems_task_wake_after" );
-
- yield_count = 100;
- }
- }
- put_dot( 's' );
- }
-
- Exit_test();
-}
diff --git a/testsuites/mptests/mp14/system.h b/testsuites/mptests/mp14/system.h
deleted file mode 100644
index 92cb9881f3..0000000000
--- a/testsuites/mptests/mp14/system.h
+++ /dev/null
@@ -1,118 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* functions */
-
-rtems_timer_service_routine Delayed_send_event(
- rtems_id timer_id,
- void *ignored_address
-);
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_task Test_task(
- rtems_task_argument argument
-);
-
-rtems_task Delayed_events_task(
- rtems_task_argument argument
-);
-
-rtems_task Message_queue_task(
- rtems_task_argument index
-);
-
-rtems_task Partition_task(
- rtems_task_argument argument
-);
-
-rtems_task Semaphore_task(
- rtems_task_argument argument
-);
-
-void Exit_test( void );
-
-/* configuration information */
-
-#define CONFIGURE_MPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_TICKS_PER_TIMESLICE 1
-#define CONFIGURE_MICROSECONDS_PER_TICK RTEMS_MILLISECONDS_TO_MICROSECONDS(1)
-
-#if ( NODE_NUMBER == 1 )
-#define CONFIGURE_MAXIMUM_TIMERS 12
-#define CONFIGURE_MAXIMUM_SEMAPHORES 1
-#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_MAXIMUM_PARTITIONS 1
-#elif ( NODE_NUMBER == 2 )
-#define CONFIGURE_MAXIMUM_TIMERS 2
-#endif
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#define CONFIGURE_EXTRA_TASK_STACKS (1 * RTEMS_MINIMUM_STACK_SIZE)
-
-#include <confdefs.h>
-
-/* variables */
-
-TEST_EXTERN rtems_id Event_task_id[ 2 ]; /* event task ids */
-
-TEST_EXTERN rtems_id Semaphore_task_id[ 2 ]; /* semaphore task ids */
-TEST_EXTERN rtems_name Semaphore_task_name[ 2 ]; /* semaphore task names */
-
-TEST_EXTERN rtems_id Queue_task_id[ 3 ]; /* message queue task ids */
-TEST_EXTERN rtems_name Queue_task_name[ 3 ]; /* message queue task names */
-
-TEST_EXTERN rtems_id Partition_task_id[ 4 ]; /* partition task ids */
-TEST_EXTERN rtems_name Partition_task_name[ 4 ]; /* partition task names */
-
-TEST_EXTERN rtems_id Partition_id[ 3 ]; /* partition ids */
-TEST_EXTERN rtems_name Partition_name[ 3 ]; /* partition names */
-
-TEST_EXTERN rtems_id Semaphore_id[ 3 ]; /* semaphore ids */
-TEST_EXTERN rtems_name Semaphore_name[ 3 ]; /* semaphore names */
-
-TEST_EXTERN rtems_id Queue_id[ 3 ]; /* message queue ids */
-TEST_EXTERN rtems_name Queue_name[ 3 ]; /* message queue names */
-
-TEST_EXTERN rtems_id Task_id[ 4 ]; /* remote event task ids */
-TEST_EXTERN rtems_name Task_name[ 4 ]; /* remote event task names */
-
-TEST_EXTERN rtems_id Timer_id[ 4 ]; /* event timer ids */
-TEST_EXTERN rtems_name Timer_name[ 4 ]; /* event timer names */
-
-TEST_EXTERN rtems_unsigned32 Msg_buffer[ 4 ][ 4 ];
-
-extern rtems_multiprocessing_table Multiprocessing_configuration;
-
-TEST_EXTERN volatile rtems_boolean Stop_Test;
-TEST_EXTERN rtems_id timer_id;
-
-#define EVENT_TASK_DOT_COUNT 100
-#define EVENT_SEND_DOT_COUNT 100
-#define DELAYED_EVENT_DOT_COUNT 1000
-#define MESSAGE_DOT_COUNT 200
-#define PARTITION_DOT_COUNT 200
-#define SEMAPHORE_DOT_COUNT 200
-
-/* end of include file */
diff --git a/testsuites/mptests/mptests.am b/testsuites/mptests/mptests.am
deleted file mode 100644
index 815ef8e00d..0000000000
--- a/testsuites/mptests/mptests.am
+++ /dev/null
@@ -1,27 +0,0 @@
-project_bspdir=$(PROJECT_ROOT)/@RTEMS_BSP@
-
-$(project_bspdir)/tests:
- @$(mkinstalldirs) $@
-
-$(project_bspdir)/tests/$(TEST)-node$(NODE)$(LIB_VARIANT).exe: $(PGM)
- $(INSTALL_PROGRAM) $< $@
-
-$(project_bspdir)/tests/screens:
- @$(mkinstalldirs) $@
-
-$(project_bspdir)/tests/screens/mptests:
- @$(mkinstalldirs) $@
-
-$(project_bspdir)/tests/screens/mptests/node$(NODE):
- @$(mkinstalldirs) $@
-
-$(project_bspdir)/tests/screens/mptests/node$(NODE)/$(TEST).scn: $(TEST).scn
- $(INSTALL_DATA) $< $@
-
-TMPINSTALL_FILES += \
-$(project_bspdir)/tests \
-$(project_bspdir)/tests/$(TEST)-node$(NODE)$(LIB_VARIANT).exe \
-$(project_bspdir)/tests/screens \
-$(project_bspdir)/tests/screens/mptests \
-$(project_bspdir)/tests/screens/mptests/node$(NODE) \
-$(project_bspdir)/tests/screens/mptests/node$(NODE)/$(TEST).scn
diff --git a/testsuites/psxtests/Makefile.am b/testsuites/psxtests/Makefile.am
deleted file mode 100644
index e25e2b2b1a..0000000000
--- a/testsuites/psxtests/Makefile.am
+++ /dev/null
@@ -1,22 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-
-SHARED_DIRS =
-
-POSIX_DIRS = include psxhdrs psx01 psx02 psx03 psx04 psx05 psx06 psx07 psx08 \
- psx09 psx10 psx11 psx12 psxtime psxtimer psxcancel psxmsgq01 psxsem01
-
-POSIX_FILES_DIRS = psxfile01 psxreaddir psxstat psxmount psx13
-
-UNUSED_DIRS =
-
-SUBDIRS = $(SHARED_DIRS) $(POSIX_DIRS) $(POSIX_FILES_DIRS) $(UNUSED_DIRS)
-
-EXTRA_DIST = psxtests.am
-
-include $(top_srcdir)/../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/psxtests/include/Makefile.am b/testsuites/psxtests/include/Makefile.am
deleted file mode 100644
index 057f4043c1..0000000000
--- a/testsuites/psxtests/include/Makefile.am
+++ /dev/null
@@ -1,9 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-noinst_HEADERS = pmacros.h
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/psxtests/include/pmacros.h b/testsuites/psxtests/include/pmacros.h
deleted file mode 100644
index 38d0ee1904..0000000000
--- a/testsuites/psxtests/include/pmacros.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * $Id$
- */
-
-#ifndef __POSIX_TEST_MACROS_h
-#define __POSIX_TEST_MACROS_h
-
-#include <bsp.h>
-#include <pthread.h>
-#include <assert.h>
-#include <stdio.h>
-#include <string.h>
-#include <time.h>
-#include <unistd.h>
-
-/*
- * These help manipulate the "struct tm" form of time
- */
-
-#define TM_SUNDAY 0
-#define TM_MONDAY 1
-#define TM_TUESDAY 2
-#define TM_WEDNESDAY 3
-#define TM_THURSDAY 4
-#define TM_FRIDAY 5
-#define TM_SATURDAY 6
-
-#define TM_JANUARY 0
-#define TM_FEBRUARY 1
-#define TM_MARCH 2
-#define TM_APRIL 3
-#define TM_MAY 4
-#define TM_JUNE 5
-#define TM_JULY 6
-#define TM_AUGUST 7
-#define TM_SEPTEMBER 8
-#define TM_OCTOBER 10
-#define TM_NOVEMBER 12
-#define TM_DECEMBER 12
-
-#ifndef build_time
-#define build_time( TM, WEEKDAY, MON, DAY, YR, HR, MIN, SEC ) \
- { (TM)->tm_year = YR; \
- (TM)->tm_mon = MON; \
- (TM)->tm_mday = DAY; \
- (TM)->tm_wday = WEEKDAY; \
- (TM)->tm_hour = HR; \
- (TM)->tm_min = MIN; \
- (TM)->tm_sec = SEC; }
-#endif
-
-#define set_time( WEEKDAY, MON, DAY, YR, HR, MIN, SEC ) \
- do { \
- struct tm tm; \
- struct timespec tv; \
- int status; \
- \
- build_time( &tm, WEEKDAY, MON, DAY, YR, HR, MIN, SEC ); \
- \
- tv.tv_sec = mktime( &tm ); \
- tv.tv_nsec = 0; \
- assert( tv.tv_sec != -1 ); \
- \
- status = clock_settime( CLOCK_REALTIME, &tv ); \
- assert( !status ); \
- } while ( 0 )
-
-#define print_current_time(s1, s2) \
- do { \
- char _buffer[32]; \
- int _status; \
- struct timespec _tv; \
- \
- _status = clock_gettime( CLOCK_REALTIME, &_tv ); \
- assert( !_status ); \
- \
- (void) ctime_r( &_tv.tv_sec, _buffer ); \
- _buffer[ strlen( _buffer ) - 1 ] = 0; \
- printf( "%s%s%s\n", s1, _buffer, s2 ); \
- fflush(stdout); \
- } while ( 0 )
-
-#define empty_line() puts( "" )
-
-#endif
-
-/* end of file */
diff --git a/testsuites/psxtests/psx01/Makefile.am b/testsuites/psxtests/psx01/Makefile.am
deleted file mode 100644
index 43b7c3a42a..0000000000
--- a/testsuites/psxtests/psx01/Makefile.am
+++ /dev/null
@@ -1,43 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = psx01
-
-MANAGERS = all
-
-C_FILES = init.c task.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/psxtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CPPFLAGS = -I$(top_srcdir)/include
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/psxtests/psx01/init.c b/testsuites/psxtests/psx01/init.c
deleted file mode 100644
index 47d30c8aa4..0000000000
--- a/testsuites/psxtests/psx01/init.c
+++ /dev/null
@@ -1,242 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define CONFIGURE_INIT
-#include "system.h"
-#include <sched.h>
-#include <sys/utsname.h>
-
-void *POSIX_Init(
- void *argument
-)
-{
- struct timespec tv;
- struct timespec tr;
- int status;
- int priority;
- pthread_t thread_id;
- time_t seconds;
- time_t seconds1;
- time_t remaining;
- struct tm tm;
- struct utsname uts;
-
- puts( "\n\n*** POSIX TEST 1 ***" );
-
- build_time( &tm, TM_FRIDAY, TM_MAY, 24, 96, 11, 5, 0 );
-
- /* print some system information */
-
- puts( "Init: uname - EFAULT (invalid uts pointer argument)" );
- status = uname( NULL );
- assert( status == -1 );
- assert( errno == EFAULT );
-
- status = uname( &uts );
- assert( !status );
- printf( "Init: uts.sysname: %s\n", uts.sysname );
- printf( "Init: uts.nodename: %s\n", uts.nodename );
- printf( "Init: uts.release: %s\n", uts.release );
- printf( "Init: uts.version: %s\n", uts.version );
- printf( "Init: uts.machine: %s\n", uts.machine );
- puts("");
-
- /* error cases in clock_gettime and clock_settime */
-
- puts( "Init: clock_gettime - EINVAL (invalid clockid)" );
- status = clock_settime( -1, &tv );
- assert( status == -1 );
- assert( errno == EINVAL );
-
- puts( "Init: clock_settime - EINVAL (invalid clockid)" );
- status = clock_settime( -1, &tv );
- assert( status == -1 );
- assert( errno == EINVAL );
-
- /* exercise clock_getres */
-
- puts( "Init: clock_getres - EINVAL (invalid clockid)" );
- status = clock_getres( -1, &tv );
- assert( status == -1 );
- assert( errno == EINVAL );
-
- puts( "Init: clock_getres - EINVAL (NULL resolution)" );
- status = clock_getres( CLOCK_REALTIME, NULL );
- assert( status == -1 );
- assert( errno == EINVAL );
-
- puts( "Init: clock_getres - SUCCESSFUL" );
- status = clock_getres( CLOCK_REALTIME, &tv );
- printf( "Init: resolution = sec (%ld), nsec (%ld)\n", tv.tv_sec, tv.tv_nsec );
- assert( !status );
-
- /* set the time of day, and print our buffer in multiple ways */
-
- tv.tv_sec = mktime( &tm );
- assert( tv.tv_sec != -1 );
-
- tv.tv_nsec = 0;
-
- /* now set the time of day */
-
- empty_line();
-
- printf( asctime( &tm ) );
- puts( "Init: clock_settime - SUCCESSFUL" );
- status = clock_settime( CLOCK_REALTIME, &tv );
- assert( !status );
-
- printf( asctime( &tm ) );
- printf( ctime( &tv.tv_sec ) );
-
- /* use sleep to delay */
-
- remaining = sleep( 3 );
- assert( !remaining );
-
- /* print new times to make sure it has changed and we can get the realtime */
-
- status = clock_gettime( CLOCK_REALTIME, &tv );
- assert( !status );
-
- printf( ctime( &tv.tv_sec ) );
-
- seconds = time( NULL );
- printf( ctime( &seconds ) );
-
- /* just to have the value copied out through the parameter */
-
- seconds = time( &seconds1 );
- assert( seconds == seconds1 );
-
- /* check the time remaining */
-
- printf( "Init: seconds remaining (%d)\n", (int)remaining );
- assert( !remaining );
-
- /* error cases in nanosleep */
-
- empty_line();
- puts( "Init: nanosleep - EINVAL (NULL time)" );
- status = nanosleep ( NULL, &tr );
- assert( status == -1 );
- assert( errno == EINVAL );
-
- tv.tv_sec = 0;
- tv.tv_nsec = TOD_NANOSECONDS_PER_SECOND * 2;
- puts( "Init: nanosleep - EINVAL (too many nanoseconds)" );
- status = nanosleep ( &tv, &tr );
- assert( status == -1 );
- assert( errno == EINVAL );
-
- /* this is actually a small delay or yield */
- tv.tv_sec = -1;
- tv.tv_nsec = 0;
- puts( "Init: nanosleep - negative seconds small delay " );
- status = nanosleep ( &tv, &tr );
- assert( !status );
-
- /* use nanosleep to yield */
-
- tv.tv_sec = 0;
- tv.tv_nsec = 0;
-
- puts( "Init: nanosleep - yield" );
- status = nanosleep ( &tv, &tr );
- assert( !status );
- assert( !tr.tv_sec );
- assert( !tr.tv_nsec );
-
- /* use nanosleep to delay */
-
- tv.tv_sec = 3;
- tv.tv_nsec = 500000;
-
- puts( "Init: nanosleep - 3.05 seconds" );
- status = nanosleep ( &tv, &tr );
- assert( !status );
-
- /* print the current real time again */
-
- status = clock_gettime( CLOCK_REALTIME, &tv );
- assert( !status );
-
- printf( ctime( &tv.tv_sec ) );
-
- /* check the time remaining */
-
- printf( "Init: sec (%ld), nsec (%ld) remaining\n", tr.tv_sec, tr.tv_nsec );
- assert( !tr.tv_sec && !tr.tv_nsec );
-
- /* get id of this thread */
-
- Init_id = pthread_self();
- printf( "Init: ID is 0x%08x\n", Init_id );
-
- /* exercise get minimum priority */
-
- priority = sched_get_priority_min( SCHED_FIFO );
- printf( "Init: sched_get_priority_min (SCHED_FIFO) -- %d\n", priority );
- assert( priority != -1 );
-
- puts( "Init: sched_get_priority_min -- EINVAL (invalid policy)" );
- priority = sched_get_priority_min( -1 );
- assert( priority == -1 );
- assert( errno == EINVAL );
-
- /* exercise get maximum priority */
-
- priority = sched_get_priority_max( SCHED_FIFO );
- printf( "Init: sched_get_priority_max (SCHED_FIFO) -- %d\n", priority );
- assert( priority != -1 );
-
- puts( "Init: sched_get_priority_min -- EINVAL (invalid policy)" );
- priority = sched_get_priority_min( -1 );
- assert( priority == -1 );
- assert( errno == EINVAL );
-
- /* print the round robin time quantum */
-
- status = sched_rr_get_interval( getpid(), &tr );
- printf(
- "Init: Round Robin quantum is %ld seconds, %ld nanoseconds\n",
- tr.tv_sec,
- tr.tv_nsec
- );
- assert( !status );
-
- /* create a thread */
-
- puts( "Init: pthread_create - SUCCESSFUL" );
- status = pthread_create( &thread_id, NULL, Task_1_through_3, NULL );
- assert( !status );
-
- /* too may threads error */
-
- puts( "Init: pthread_create - EAGAIN (too many threads)" );
- status = pthread_create( &thread_id, NULL, Task_1_through_3, NULL );
- assert( status == EAGAIN );
-
- puts( "Init: sched_yield to Task_1" );
- status = sched_yield();
- assert( !status );
-
- /* switch to Task_1 */
-
- /* exit this thread */
-
- puts( "Init: pthread_exit" );
- pthread_exit( NULL );
-
- /* switch to Task_1 */
-
- return NULL; /* just so the compiler thinks we returned something */
-}
diff --git a/testsuites/psxtests/psx01/psx01.scn b/testsuites/psxtests/psx01/psx01.scn
deleted file mode 100644
index b5983ba11f..0000000000
--- a/testsuites/psxtests/psx01/psx01.scn
+++ /dev/null
@@ -1,53 +0,0 @@
-*** POSIX TEST 1 ***
-Init: uname - EFAULT (invalid uts pointer argument)
-Init: uts.sysname: RTEMS
-Init: uts.nodename: Node 1
-Init: uts.release: rtems-19991105
-Init: uts.version:
-Init: uts.machine: SPARC/erc32
-
-Init: clock_gettime - EINVAL (invalid clockid)
-Init: clock_settime - EINVAL (invalid clockid)
-Init: clock_getres - EINVAL (invalid clockid)
-Init: clock_getres - EINVAL (NULL resolution)
-Init: clock_getres - SUCCESSFUL
-Init: resolution = sec (100), nsec (0)
-
-Fri May 24 11:05:00 1996
-Init: clock_settime - SUCCESSFUL
-Fri May 24 11:05:00 1996
-Fri May 24 11:05:00 1996
-Fri May 24 11:05:03 1996
-Fri May 24 11:05:03 1996
-Init: seconds remaining (0)
-
-Init: nanosleep - EINVAL (NULL time)
-Init: nanosleep - EINVAL (too many nanoseconds)
-Init: nanosleep - negative seconds small delay
-Init: nanosleep - yield
-Init: nanosleep - 3.05 seconds
-Fri May 24 11:05:06 1996
-Init: sec (0), nsec (0) remaining
-Init: ID is 0x0c010001
-Init: sched_get_priority_min (SCHED_FIFO) -- 1
-Init: sched_get_priority_min -- EINVAL (invalid policy)
-Init: sched_get_priority_max (SCHED_FIFO) -- 254
-Init: sched_get_priority_min -- EINVAL (invalid policy)
-Init: Round Robin quantum is 0 seconds, 500000000 nanoseconds
-Init: pthread_create - SUCCESSFUL
-Init: pthread_create - EAGAIN (too many threads)
-Init: sched_yield to Task_1
-Task_1: sched_yield to Init
-Init: pthread_exit
-
-Task_1: ID is 0x0c010002
-Task_1: pthread_equal - match case passed
-Task_1: pthread_equal - different case passed
-Task_1: pthread_equal - first id bad
-Task_1: pthread_equal - second id bad
-Task_1: pthread_once - EINVAL (NULL once_control)
-Task_1: pthread_once - EINVAL (NULL init_routine)
-Task_1: pthread_once - SUCCESSFUL (init_routine executes)
-Test_init_routine: invoked
-Task_1: pthread_once - SUCCESSFUL (init_routine does not execute)
-*** END OF POSIX TEST 1 ***
diff --git a/testsuites/psxtests/psx01/system.h b/testsuites/psxtests/psx01/system.h
deleted file mode 100644
index 9b55eea1d0..0000000000
--- a/testsuites/psxtests/psx01/system.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-/* functions */
-
-#include <pmacros.h>
-#include <unistd.h>
-#include <errno.h>
-#include <sched.h>
-
-void *POSIX_Init(
- void *argument
-);
-
-void *Task_1_through_3(
- void *argument
-);
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 2
-
-#include <confdefs.h>
-
-/* global variables */
-
-#ifdef CONFIGURE_INIT
-#define TEST_EXTERN
-#else
-#define TEST_EXTERN extern
-#endif
-
-TEST_EXTERN pthread_t Init_id;
-TEST_EXTERN pthread_t Task_id;
-
-/* end of include file */
diff --git a/testsuites/psxtests/psx01/task.c b/testsuites/psxtests/psx01/task.c
deleted file mode 100644
index 612d69d2e3..0000000000
--- a/testsuites/psxtests/psx01/task.c
+++ /dev/null
@@ -1,93 +0,0 @@
-/* Task_1_through_3
- *
- * This routine serves as a test task. It verifies the basic task
- * switching capabilities of the executive.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-void Test_init_routine( void )
-{
- puts( "Test_init_routine: invoked" );
-}
-
-
-void *Task_1_through_3(
- void *argument
-)
-{
- int status;
- pthread_once_t once = PTHREAD_ONCE_INIT;
-
- puts( "Task_1: sched_yield to Init" );
- status = sched_yield();
- assert( !status );
-
- /* switch to Task_1 */
-
- /* now do some real testing */
-
- empty_line();
-
- /* get id of this thread */
-
- Task_id = pthread_self();
- printf( "Task_1: ID is 0x%08x\n", Task_id );
-
- /* exercise pthread_equal */
-
- status = pthread_equal( Task_id, Task_id );
- if ( status )
- puts( "Task_1: pthread_equal - match case passed" );
- assert( status );
-
- status = pthread_equal( Init_id, Task_id );
- if ( !status )
- puts( "Task_1: pthread_equal - different case passed" );
- assert( !status );
-
- puts( "Task_1: pthread_equal - first id bad" );
- status = pthread_equal( -1, Task_id );
- assert( !status );
-
- puts( "Task_1: pthread_equal - second id bad" );
- status = pthread_equal( Init_id, -1 );
- assert( !status );
-
- /* exercise pthread_once */
-
- puts( "Task_1: pthread_once - EINVAL (NULL once_control)" );
- status = pthread_once( NULL, Test_init_routine );
- assert( status == EINVAL );
-
- puts( "Task_1: pthread_once - EINVAL (NULL init_routine)" );
- status = pthread_once( &once, NULL );
- assert( status == EINVAL );
-
- puts( "Task_1: pthread_once - SUCCESSFUL (init_routine executes)" );
- status = pthread_once( &once, Test_init_routine );
- assert( !status );
-
- puts( "Task_1: pthread_once - SUCCESSFUL (init_routine does not execute)" );
- status = pthread_once( &once, Test_init_routine );
- assert( !status );
-
- puts( "*** END OF POSIX TEST 1 ***" );
- exit( 0 );
-
- return NULL; /* just so the compiler thinks we returned something */
-}
diff --git a/testsuites/psxtests/psx02/Makefile.am b/testsuites/psxtests/psx02/Makefile.am
deleted file mode 100644
index 8146141cc8..0000000000
--- a/testsuites/psxtests/psx02/Makefile.am
+++ /dev/null
@@ -1,43 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = psx02
-
-MANAGERS = all
-
-C_FILES = init.c task.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/psxtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CPPFLAGS = -I$(top_srcdir)/include
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/psxtests/psx02/init.c b/testsuites/psxtests/psx02/init.c
deleted file mode 100644
index 55e360b6f9..0000000000
--- a/testsuites/psxtests/psx02/init.c
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define CONFIGURE_INIT
-#include "system.h"
-#include <signal.h>
-
-volatile int Signal_occurred;
-volatile int Signal_count;
-
-void Signal_handler(
- int signo
-)
-{
- Signal_count++;
- printf(
- "Signal: %d caught by 0x%x (%d)\n",
- signo,
- pthread_self(),
- Signal_count
- );
- Signal_occurred = 1;
-}
-
-void *POSIX_Init(
- void *argument
-)
-{
- int status;
- struct timespec tv;
- struct timespec tr;
- struct sigaction act;
- sigset_t mask;
- sigset_t pending_set;
-
- puts( "\n\n*** POSIX TEST 2 ***" );
-
- /* set the time of day, and print our buffer in multiple ways */
-
- set_time( TM_FRIDAY, TM_MAY, 24, 96, 11, 5, 0 );
-
- /* get id of this thread */
-
- Init_id = pthread_self();
- printf( "Init's ID is 0x%08x\n", Init_id );
-
- /* install a signal handler */
-
- status = sigemptyset( &act.sa_mask );
- assert( !status );
-
- act.sa_handler = Signal_handler;
- act.sa_flags = 0;
-
- sigaction( SIGUSR1, &act, NULL );
-
- /* simple signal to self */
-
- Signal_count = 0;
- Signal_occurred = 0;
-
- status = pthread_kill( Init_id, SIGUSR1 );
- assert( !status );
-
- Signal_occurred = 0;
-
- /* now block the signal, send it, see if it is pending, and unblock it */
-
- status = sigemptyset( &mask );
- assert( !status );
-
- status = sigaddset( &mask, SIGUSR1 );
- assert( !status );
-
- printf( "Init: Block SIGUSR1\n" );
- status = sigprocmask( SIG_BLOCK, &mask, NULL );
- assert( !status );
-
- status = sigpending( &pending_set );
- assert( !status );
- printf( "Init: Signals pending 0x%08x\n", pending_set );
-
-
- printf( "Init: send SIGUSR1 to self\n" );
- status = pthread_kill( Init_id, SIGUSR1 );
- assert( !status );
-
- status = sigpending( &pending_set );
- assert( !status );
- printf( "Init: Signals pending 0x%08x\n", pending_set );
-
- printf( "Init: Unblock SIGUSR1\n" );
- status = sigprocmask( SIG_UNBLOCK, &mask, NULL );
- assert( !status );
-
- /* create a thread */
-
- status = pthread_create( &Task_id, NULL, Task_1_through_3, NULL );
- assert( !status );
-
- /*
- * Loop for 5 seconds seeing how many signals we catch
- */
-
- tr.tv_sec = 5;
- tr.tv_nsec = 0;
-
- do {
- tv = tr;
-
- Signal_occurred = 0;
-
- status = nanosleep ( &tv, &tr );
-
- if ( status == -1 ) {
- assert( errno == EINTR );
- assert( tr.tv_nsec || tr.tv_sec );
- } else if ( !status ) {
- assert( !tr.tv_nsec && !tr.tv_sec );
- }
-
- printf(
- "Init: signal was %sprocessed with %d:%d time remaining\n",
- (Signal_occurred) ? "" : "not ",
- (int) tr.tv_sec,
- (int) tr.tv_nsec
- );
-
- } while ( tr.tv_sec || tr.tv_nsec );
-
- /* exit this thread */
-
- puts( "*** END OF POSIX TEST 2 ***" );
- exit( 0 );
-
- return NULL; /* just so the compiler thinks we returned something */
-}
diff --git a/testsuites/psxtests/psx02/psx02.scn b/testsuites/psxtests/psx02/psx02.scn
deleted file mode 100644
index 3b0d373b16..0000000000
--- a/testsuites/psxtests/psx02/psx02.scn
+++ /dev/null
@@ -1,26 +0,0 @@
-*** POSIX TEST 2 ***
-Init's ID is 0x0c010001
-Signal: 16 caught by 0xc010001 (1)
-Init: Block SIGUSR1
-Init: Signals pending 0x00000000
-Init: send SIGUSR1 to self
-Init: Signals pending 0x00008000
-Init: Unblock SIGUSR1
-Signal: 16 caught by 0xc010001 (2)
-Task1: Fri May 24 11:05:00 1996
-Signal: 16 caught by 0xc010001 (3)
-Init: signal was processed with 5:0 time remaining
-Task1: Fri May 24 11:05:01 1996
-Signal: 16 caught by 0xc010001 (4)
-Init: signal was processed with 3:990000000 time remaining
-Task1: Fri May 24 11:05:02 1996
-Signal: 16 caught by 0xc010001 (5)
-Init: signal was processed with 2:980000000 time remaining
-Task1: Fri May 24 11:05:03 1996
-Signal: 16 caught by 0xc010001 (6)
-Init: signal was processed with 1:970000000 time remaining
-Task1: Fri May 24 11:05:04 1996
-Signal: 16 caught by 0xc010001 (7)
-Init: signal was processed with 0:960000000 time remaining
-Init: signal was not processed with 0:0 time remaining
-*** END OF POSIX TEST 2 ***
diff --git a/testsuites/psxtests/psx02/system.h b/testsuites/psxtests/psx02/system.h
deleted file mode 100644
index 03e9810bd9..0000000000
--- a/testsuites/psxtests/psx02/system.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-/* functions */
-
-#include <pmacros.h>
-#include <errno.h>
-
-void *POSIX_Init(
- void *argument
-);
-
-void *Task_1_through_3(
- void *argument
-);
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#include <confdefs.h>
-
-/* global variables */
-
-#ifdef CONFIGURE_INIT
-#define TEST_EXTERN
-#else
-#define TEST_EXTERN extern
-#endif
-
-TEST_EXTERN pthread_t Init_id;
-TEST_EXTERN pthread_t Task_id;
-
-/* end of include file */
diff --git a/testsuites/psxtests/psx02/task.c b/testsuites/psxtests/psx02/task.c
deleted file mode 100644
index 0f2730983b..0000000000
--- a/testsuites/psxtests/psx02/task.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/* Task_1_through_3
- *
- * This routine serves as a test task. It verifies the basic task
- * switching capabilities of the executive.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-#include <signal.h>
-
-void *Task_1_through_3(
- void *argument
-)
-{
- int seconds;
- int i;
- int status;
-
- for ( i=0 ; i<5 ; i++ ) {
- print_current_time( "Task1: ", "" );
- status = pthread_kill( Init_id, SIGUSR1 );
- assert( !status );
-
- seconds = sleep( 1 );
- assert( !seconds );
- }
- puts( "*** END OF POSIX TEST 2 ***" );
- exit( 0 );
-
- return NULL; /* just so the compiler thinks we returned something */
-}
diff --git a/testsuites/psxtests/psx03/Makefile.am b/testsuites/psxtests/psx03/Makefile.am
deleted file mode 100644
index 7b8c930c62..0000000000
--- a/testsuites/psxtests/psx03/Makefile.am
+++ /dev/null
@@ -1,43 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = psx03
-
-MANAGERS = all
-
-C_FILES = init.c task.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/psxtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CPPFLAGS = -I$(top_srcdir)/include
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/psxtests/psx03/init.c b/testsuites/psxtests/psx03/init.c
deleted file mode 100644
index 4547ac7221..0000000000
--- a/testsuites/psxtests/psx03/init.c
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define CONFIGURE_INIT
-#include "system.h"
-#include <signal.h>
-#include <errno.h>
-
-volatile int Signal_occurred;
-volatile int Signal_count;
-
-void Signal_handler(
- int signo
-)
-{
- Signal_count++;
- printf(
- "Signal: %d caught by 0x%x (%d)\n",
- signo,
- pthread_self(),
- Signal_count
- );
- Signal_occurred = 1;
-}
-
-void *POSIX_Init(
- void *argument
-)
-{
- int status;
- struct timespec timeout;
- struct sigaction act;
- sigset_t mask;
- sigset_t waitset;
- int signo;
- siginfo_t siginfo;
-
- puts( "\n\n*** POSIX TEST 3 ***" );
-
- /* set the time of day, and print our buffer in multiple ways */
-
- set_time( TM_FRIDAY, TM_MAY, 24, 96, 11, 5, 0 );
-
- /* get id of this thread */
-
- Init_id = pthread_self();
- printf( "Init's ID is 0x%08x\n", Init_id );
-
- /* install a signal handler */
-
- status = sigemptyset( &act.sa_mask );
- assert( !status );
-
- act.sa_handler = Signal_handler;
- act.sa_flags = 0;
-
- sigaction( SIGUSR1, &act, NULL );
-
- /* initialize signal handler variables */
-
- Signal_count = 0;
- Signal_occurred = 0;
-
- /*
- * wait on SIGUSR1 for 3 seconds, will timeout
- */
-
- /* initialize the signal set we will wait for to SIGUSR1 */
-
- status = sigemptyset( &waitset );
- assert( !status );
-
- status = sigaddset( &waitset, SIGUSR1 );
- assert( !status );
-
- timeout.tv_sec = 3;
- timeout.tv_nsec = 0;
-
- puts( "Init: waiting on any signal for 3 seconds." );
- signo = sigtimedwait( &waitset, &siginfo, &timeout );
- assert( signo == -1 );
-
- if ( errno == EAGAIN )
- puts( "Init: correctly timed out waiting for SIGUSR1." );
- else
- printf( "sigtimedwait returned wrong errno - %d\n", errno );
-
- Signal_occurred = 0;
-
- /*
- * wait on SIGUSR1 for 3 seconds, will timeout because Task_1 sends SIGUSR2
- */
-
- empty_line();
-
- /* initialize a mask to block SIGUSR2 */
-
- status = sigemptyset( &mask );
- assert( !status );
-
- status = sigaddset( &mask, SIGUSR2 );
- assert( !status );
-
- printf( "Init: Block SIGUSR2\n" );
- status = sigprocmask( SIG_BLOCK, &mask, NULL );
- assert( !status );
-
- /* create a thread */
-
- status = pthread_create( &Task_id, NULL, Task_1, NULL );
- assert( !status );
-
- /* signal handler is still installed, waitset is still set for SIGUSR1 */
-
- timeout.tv_sec = 3;
- timeout.tv_nsec = 0;
-
- puts( "Init: waiting on any signal for 3 seconds." );
- signo = sigtimedwait( &waitset, &siginfo, &timeout );
-
- /* switch to Task 1 */
-
- if ( errno == EAGAIN )
- puts( "Init: correctly timed out waiting for SIGUSR1." );
- else
- printf( "sigtimedwait returned wrong errno - %d\n", errno );
- assert( signo == -1 );
-
- /*
- * wait on SIGUSR1 for 3 seconds, Task_2 will send it to us
- */
-
- empty_line();
-
- /* create a thread */
-
- status = pthread_create( &Task_id, NULL, Task_2, NULL );
- assert( !status );
-
- /* signal handler is still installed, waitset is still set for SIGUSR1 */
-
- /* wait on SIGUSR1 for 3 seconds, will receive SIGUSR1 from Task_2 */
-
- timeout.tv_sec = 3;
- timeout.tv_nsec = 0;
-
- /* just so we can check that these were altered */
-
- siginfo.si_code = -1;
- siginfo.si_signo = -1;
- siginfo.si_value.sival_int = -1;
-
- puts( "Init: waiting on any signal for 3 seconds." );
- signo = sigtimedwait( &waitset, &siginfo, &timeout );
- printf( "Init: received (%d) SIGUSR1=%d\n", siginfo.si_signo, SIGUSR1 );
- assert( signo == SIGUSR1 );
- assert( siginfo.si_signo == SIGUSR1 );
- assert( siginfo.si_code == SI_USER );
- assert( siginfo.si_value.sival_int != -1 ); /* rtems does always set this */
-
- /* try out a process signal */
-
- empty_line();
- puts( "Init: kill with SIGUSR2." );
- status = kill( getpid(), SIGUSR2 );
- assert( !status );
-
- siginfo.si_code = -1;
- siginfo.si_signo = -1;
- siginfo.si_value.sival_int = -1;
-
- status = sigemptyset( &waitset );
- assert( !status );
-
- status = sigaddset( &waitset, SIGUSR1 );
- assert( !status );
-
- status = sigaddset( &waitset, SIGUSR2 );
- assert( !status );
-
- puts( "Init: waiting on any signal for 3 seconds." );
- signo = sigtimedwait( &waitset, &siginfo, &timeout );
- printf( "Init: received (%d) SIGUSR2=%d\n", siginfo.si_signo, SIGUSR2 );
- assert( signo == SIGUSR2 );
- assert( siginfo.si_signo == SIGUSR2 );
- assert( siginfo.si_code == SI_USER );
- assert( siginfo.si_value.sival_int != -1 ); /* rtems does always set this */
-
- /* exit this thread */
-
- puts( "*** END OF POSIX TEST 3 ***" );
- exit( 0 );
-
- return NULL; /* just so the compiler thinks we returned something */
-}
diff --git a/testsuites/psxtests/psx03/psx03.scn b/testsuites/psxtests/psx03/psx03.scn
deleted file mode 100644
index 28ebc311d4..0000000000
--- a/testsuites/psxtests/psx03/psx03.scn
+++ /dev/null
@@ -1,21 +0,0 @@
-*** POSIX TEST 3 ***
-Init's ID is 0x0c010001
-Init: waiting on any signal for 3 seconds.
-Init: correctly timed out waiting for SIGUSR1.
-
-Init: Block SIGUSR2
-Init: waiting on any signal for 3 seconds.
-Task_1: Fri May 24 11:05:03 1996
-Task_1: pthread_kill - SIGUSR2 to Init
-Init: correctly timed out waiting for SIGUSR1.
-
-Init: waiting on any signal for 3 seconds.
-Task_2: Fri May 24 11:05:06 1996
-Task_1: pthread_kill - SIGUSR1 to Init
-Signal: 16 caught by 0xc010001 (1)
-Init: received (16) SIGUSR1=16
-
-Init: kill with SIGUSR2.
-Init: waiting on any signal for 3 seconds.
-Init: received (17) SIGUSR2=17
-*** END OF POSIX TEST 3 ***
diff --git a/testsuites/psxtests/psx03/system.h b/testsuites/psxtests/psx03/system.h
deleted file mode 100644
index 4aa2492a8c..0000000000
--- a/testsuites/psxtests/psx03/system.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-/* functions */
-
-#include <pmacros.h>
-
-void *POSIX_Init(
- void *argument
-);
-
-void *Task_1(
- void *argument
-);
-
-void *Task_2(
- void *argument
-);
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#include <confdefs.h>
-
-/* global variables */
-
-#ifdef CONFIGURE_INIT
-#define TEST_EXTERN
-#else
-#define TEST_EXTERN extern
-#endif
-
-TEST_EXTERN pthread_t Init_id;
-TEST_EXTERN pthread_t Task_id;
-
-/* end of include file */
diff --git a/testsuites/psxtests/psx03/task.c b/testsuites/psxtests/psx03/task.c
deleted file mode 100644
index 88eb7469cd..0000000000
--- a/testsuites/psxtests/psx03/task.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/* Task_1_through_3
- *
- * This routine serves as a test task. It verifies the basic task
- * switching capabilities of the executive.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-#include <signal.h>
-
-void *Task_1(
- void *argument
-)
-{
- int status;
-
- /* send SIGUSR2 to Init which is waiting on SIGUSR1 */
-
- print_current_time( "Task_1: ", "" );
-
- puts( "Task_1: pthread_kill - SIGUSR2 to Init" );
- status = pthread_kill( Init_id, SIGUSR2 );
- assert( !status );
-
- pthread_exit( NULL );
-
- /* switch to Init */
-
- return NULL; /* just so the compiler thinks we returned something */
-}
-
-void *Task_2(
- void *argument
-)
-{
- int status;
-
- /* send SIGUSR1 to Init which is waiting on SIGUSR1 */
-
- print_current_time( "Task_2: ", "" );
-
- puts( "Task_1: pthread_kill - SIGUSR1 to Init" );
- status = pthread_kill( Init_id, SIGUSR1 );
- assert( !status );
-
- pthread_exit( NULL );
-
- /* switch to Init */
-
- return NULL; /* just so the compiler thinks we returned something */
-}
diff --git a/testsuites/psxtests/psx04/Makefile.am b/testsuites/psxtests/psx04/Makefile.am
deleted file mode 100644
index 34ccd386b7..0000000000
--- a/testsuites/psxtests/psx04/Makefile.am
+++ /dev/null
@@ -1,43 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = psx04
-
-MANAGERS = all
-
-C_FILES = init.c task1.c task2.c task3.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/psxtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CPPFLAGS = -I$(top_srcdir)/include
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/psxtests/psx04/init.c b/testsuites/psxtests/psx04/init.c
deleted file mode 100644
index da1856961b..0000000000
--- a/testsuites/psxtests/psx04/init.c
+++ /dev/null
@@ -1,568 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define CONFIGURE_INIT
-#include "system.h"
-#include <signal.h>
-#include <errno.h>
-
-volatile int Signal_occurred;
-volatile int Signal_count;
-
-void Signal_handler(
- int signo
-)
-{
- Signal_count++;
- printf(
- "Signal: %d caught by 0x%x (%d)\n",
- signo,
- pthread_self(),
- Signal_count
- );
- Signal_occurred = 1;
-}
-
-void Signal_info_handler(
- int signo,
- siginfo_t *info,
- void *context
-)
-{
- Signal_count++;
- printf(
- "Signal_info: %d caught by 0x%x (%d) si_signo= %d si_code= %d value= %d\n",
- signo,
- pthread_self(),
- Signal_count,
- info->si_signo,
- info->si_code,
- info->si_value.sival_int
- );
- Signal_occurred = 1;
-}
-
-void *POSIX_Init(
- void *argument
-)
-{
- int status;
- struct sigaction act;
- sigset_t mask;
- sigset_t pending_set;
- sigset_t oset;
- struct timespec timeout;
- siginfo_t info;
-
- puts( "\n\n*** POSIX TEST 4 ***" );
-
- /* set the time of day, and print our buffer in multiple ways */
-
- set_time( TM_FRIDAY, TM_MAY, 24, 96, 11, 5, 0 );
-
- /* get id of this thread */
-
- Init_id = pthread_self();
- printf( "Init's ID is 0x%08x\n", Init_id );
-
-/* install a signal handler for SIGUSR1 */
-
- status = sigemptyset( &act.sa_mask );
- assert( !status );
- printf( "Init: sigemptyset - set= 0x%08x\n", act.sa_mask );
-
- /* test sigfillset following the above sigemptyset */
-
- status = sigfillset( &act.sa_mask );
- assert( !status );
- printf( "Init: sigfillset - set= 0x%08x\n", act.sa_mask );
-
- /* test sigdelset */
-
- status = sigdelset( &act.sa_mask, SIGUSR1 );
- assert( !status );
- printf( "Init: sigdelset - delete SIGUSR1 set= 0x%08x\n", act.sa_mask );
-
- /* test sigismember - FALSE */
-
- status = sigismember( &act.sa_mask, SIGUSR1 );
- assert( !status );
- puts( "Init: sigismember - FALSE since SIGUSR1 is not a member" );
-
- /* test sigismember - TRUE */
-
- status = sigismember( &act.sa_mask, SIGUSR2 );
- assert( status );
- puts( "Init: sigismember - TRUE since SIGUSR2 is a member" );
-
- /* return the set to empty */
-
- act.sa_handler = Signal_handler;
- act.sa_flags = 0;
-
- sigaction( SIGUSR1, &act, NULL );
-
- /* simple signal to process */
-
- Signal_count = 0;
- Signal_occurred = 0;
-
- puts( "Init: send SIGUSR1 to process" );
- status = kill( getpid(), SIGUSR1 );
- assert( !status );
-
-/* end of install a signal handler for SIGUSR1 */
-
- Signal_occurred = 0;
-
- /* now block the signal, send it, see if it is pending, and unblock it */
-
- empty_line();
-
- status = sigemptyset( &mask );
- assert( !status );
-
- status = sigaddset( &mask, SIGUSR1 );
- assert( !status );
-
- puts( "Init: Block SIGUSR1" );
- act.sa_handler = Signal_handler;
- act.sa_flags = 0;
-
- sigaction( SIGUSR1, &act, NULL );
-
- /* simple signal to process */
-
- Signal_count = 0;
- Signal_occurred = 0;
-
- puts( "Init: send SIGUSR1 to process" );
- status = kill( getpid(), SIGUSR1 );
- assert( !status );
-
- Signal_occurred = 0;
-
- /* now block the signal, send it, see if it is pending, and unblock it */
-
- empty_line();
-
- status = sigemptyset( &mask );
- assert( !status );
-
- status = sigaddset( &mask, SIGUSR1 );
- assert( !status );
-
- puts( "Init: Block SIGUSR1" );
- status = sigprocmask( SIG_BLOCK, &mask, NULL );
- assert( !status );
-
- status = sigpending( &pending_set );
- assert( !status );
- printf( "Init: Signals pending 0x%08x\n", pending_set );
-
- puts( "Init: send SIGUSR1 to process" );
- status = kill( getpid(), SIGUSR1 );
- assert( !status );
-
- status = sigpending( &pending_set );
- assert( !status );
- printf( "Init: Signals pending 0x%08x\n", pending_set );
-
- puts( "Init: Unblock SIGUSR1" );
- status = sigprocmask( SIG_UNBLOCK, &mask, NULL );
- assert( !status );
-
- /* now let another task get interrupted by a signal */
-
- empty_line();
-
- puts( "Init: create a thread interested in SIGUSR1" );
- status = pthread_create( &Task1_id, NULL, Task_1, NULL );
- assert( !status );
-
- puts( "Init: Block SIGUSR1" );
- status = sigprocmask( SIG_BLOCK, &mask, NULL );
- assert( !status );
-
- status = sigpending( &pending_set );
- assert( !status );
- printf( "Init: Signals pending 0x%08x\n", pending_set );
-
- puts( "Init: sleep so the other task can block" );
- status = sleep( 1 );
- assert( !status );
-
- /* switch to task 1 */
-
- puts( "Init: send SIGUSR1 to process" );
- status = kill( getpid(), SIGUSR1 );
- assert( !status );
-
- status = sigpending( &pending_set );
- assert( !status );
- printf( "Init: Signals pending 0x%08x\n", pending_set );
-
- puts( "Init: sleep so the other task can catch signal" );
- status = sleep( 1 );
- assert( !status );
-
- /* switch to task 1 */
-
- /* test alarm */
-
- empty_line();
-
- /* install a signal handler for SIGALRM and unblock it */
-
- status = sigemptyset( &act.sa_mask );
- assert( !status );
-
- act.sa_handler = Signal_handler;
- act.sa_flags = 0;
-
- sigaction( SIGALRM, &act, NULL );
-
- status = sigemptyset( &mask );
- assert( !status );
-
- status = sigaddset( &mask, SIGALRM );
- assert( !status );
-
- puts( "Init: Unblock SIGALRM" );
- status = sigprocmask( SIG_UNBLOCK, &mask, NULL );
- assert( !status );
-
- /* schedule the alarm */
-
- puts( "Init: Firing alarm in 5 seconds" );
- status = alarm( 5 );
- printf( "Init: %d seconds left on previous alarm\n", status );
- assert( !status );
-
- puts( "Init: Firing alarm in 2 seconds" );
- status = alarm( 2 );
- printf( "Init: %d seconds left on previous alarm\n", status );
- assert( status );
-
- puts( "Init: Wait 4 seconds for alarm" );
- status = sleep( 4 );
- printf( "Init: %d seconds left in sleep\n", status );
- assert( status );
-
- /* test SIG_SETMASK case and returning oset of pthread_sigmask */
-
- empty_line();
-
- status = sigemptyset( &mask );
- assert( !status );
-
- status = sigaddset( &mask, SIGUSR1 );
- assert( !status );
-
- status = sigaddset( &mask, SIGUSR2 );
- assert( !status );
-
- puts( "Init: Block SIGUSR1 and SIGUSR2 only" );
- status = pthread_sigmask( SIG_SETMASK, &mask, &oset );
- printf( "Init: Previous blocked set was 0x%08x\n", oset );
- assert( !status );
-
- /* test inquiry about current blocked set with pthread_sigmask */
-
- status = pthread_sigmask( 0, NULL, &oset );
- printf( "Init: Current blocked set is 0x%08x\n", oset );
- assert( !status );
-
- /* return blocked mask to no signals blocked */
-
- status = sigemptyset( &mask );
- assert( !status );
-
- puts( "Init: Unblock all signals" );
- status = pthread_sigmask( SIG_SETMASK, &mask, &oset );
- printf( "Init: Previous blocked set was 0x%08x\n", oset );
- assert( !status );
-
- /* test sigsuspend */
-
- empty_line();
-
- puts( "Init: create a thread to send Init SIGUSR1" );
- status = pthread_create( &Task2_id, NULL, Task_2, NULL );
- assert( !status );
-
- status = sigemptyset( &mask );
- assert( !status );
-
- puts( "Init: sigsuspend for any signal" );
- status = sigsuspend( &mask );
- assert( status );
- printf( "Init: awakended from sigsuspend status=%08d \n", status );
-
- /* test a SIGINFO case, these are signals sent to a process only */
-
- empty_line();
-
- puts( "Init: create a thread to sent Process SIGUSR1 with SA_SIGINFO" );
- status = pthread_create( &Task3_id, NULL, Task_3, NULL );
- assert( !status );
-
- /* set action on SIGUSR1 to an info case */
- act.sa_handler = Signal_handler;
- act.sa_flags = SA_SIGINFO;
- act.sa_sigaction = Signal_info_handler;
-
- sigaction( SIGUSR1, &act, NULL );
-
- puts( "Init: sleep so the Task_3 can sigqueue SIGUSR1" );
- status = sleep( 1 );
- assert( !status );
-
- /* switch to task 1 */
-
- puts( "Init: sigqueue occurred" );
-
- /* Send SIGUSR1, Task_3 has issued a sigwaitinfo */
-
- status = sigemptyset( &mask );
- assert( !status );
-
- status = sigaddset( &mask, SIGUSR1 );
- assert( !status );
-
- puts( "Init: Block SIGUSR1" );
- status = sigprocmask( SIG_BLOCK, &mask, NULL );
- assert( !status );
-
- puts( "Init: send SIGUSR1 to process" );
- status = kill( getpid(), SIGUSR1 );
- assert( !status );
-
- puts( "Init: sleep so the Task_3 can receive SIGUSR1" );
- status = sleep( 1 );
- assert( !status );
-
- /* Send SIGUSR1, Task_3 has issued a sigwait */
-
- status = sigemptyset( &mask );
- assert( !status );
-
- status = sigaddset( &mask, SIGUSR1 );
- assert( !status );
-
- puts( "Init: Block SIGUSR1" );
- status = sigprocmask( SIG_BLOCK, &mask, NULL );
- assert( !status );
-
- puts( "Init: send SIGUSR1 to process" );
- status = kill( getpid(), SIGUSR1 );
- assert( !status );
-
- puts( "Init: sleep so the Task_3 can receive SIGUSR1" );
- status = sleep( 1 );
- assert( !status );
-
- /* Send SIGUSR1, Task_3 has issued a sigwaitinfo */
-
- status = sigemptyset( &mask );
- assert( !status );
-
- status = sigaddset( &mask, SIGUSR2 );
- assert( !status );
-
- puts( "Init: Block SIGUSR2" );
- status = sigprocmask( SIG_BLOCK, &mask, NULL );
- assert( !status );
-
- puts( "Init: send SIGUSR2 to process" );
- status = kill( getpid(), SIGUSR2 );
- assert( !status );
-
- puts( "Init: sleep so the Task_3 can receive SIGUSR2" );
- status = sleep( 1 );
- assert( !status );
-
- /* Suspend for signal that has already be sent */
-
- puts( "Init: sigsuspend for any signal" );
- status = sigsuspend( &mask );
- assert( status );
- printf( "Init: awakended from sigsuspend status=%d \n", status );
-
- /* generate error cases for psignal */
-
- empty_line();
-
- status = sigemptyset( NULL );
- if ( status != -1 )
- printf( "status = %d\n", status );
- assert( errno == EINVAL );
- puts( "Init: sigemptyset - EINVAL (set invalid)" );
-
- status = sigfillset( NULL );
- if ( status != -1 )
- printf( "status = %d\n", status );
- assert( errno == EINVAL );
- puts( "Init: sigfillset - EINVAL (set invalid)" );
-
- status = sigaddset( NULL, SIGUSR1 );
- if ( status != -1 )
- printf( "status = %d\n", status );
- assert( errno == EINVAL );
- puts( "Init: sigaddset - EINVAL (set invalid)" );
-
- status = sigaddset( &mask, 0 );
- assert( !status );
- puts( "Init: sigaddset - SUCCESSFUL (signal = 0)" );
-
- status = sigaddset( &mask, 999 );
- if ( status != -1 )
- printf( "status = %d\n", status );
- assert( errno == EINVAL );
- puts( "Init: sigaddset - EINVAL (set invalid)" );
-
- status = sigdelset( NULL, SIGUSR1 );
- if ( status != -1 )
- printf( "status = %d\n", status );
- assert( errno == EINVAL );
- puts( "Init: sigdelset - EINVAL (set invalid)" );
-
- status = sigdelset( &mask, 0 );
- assert( !status );
- puts( "Init: sigdelset - SUCCESSFUL (signal = 0)" );
-
- status = sigdelset( &mask, 999 );
- if ( status != -1 )
- printf( "status = %d\n", status );
- assert( errno == EINVAL );
- puts( "Init: sigdelset - EINVAL (set invalid)" );
-
- status = sigismember( NULL, SIGUSR1 );
- if ( status != -1 )
- printf( "status = %d\n", status );
- assert( errno == EINVAL );
- puts( "Init: sigismember - EINVAL (set invalid)" );
-
- status = sigismember( &mask, 0 );
- assert( !status );
- puts( "Init: sigismember - SUCCESSFUL (signal = 0)" );
-
- status = sigismember( &mask, 999 );
- if ( status != -1 )
- printf( "status = %d\n", status );
- assert( errno == EINVAL );
- puts( "Init: sigismember - EINVAL (signal invalid)" );
-
- status = sigaction( 0, &act, 0 );
- assert( !status );
- puts( "Init: sigaction - SUCCESSFUL (signal = 0)" );
-
- status = sigaction( 999, &act, NULL );
- if ( status != -1 )
- printf( "status = %d\n", status );
- assert( errno == EINVAL );
- puts( "Init: sigaction - EINVAL (signal invalid)" );
-
- status = sigaction( SIGKILL, &act, NULL );
- if ( status != -1 )
- printf( "status = %d\n", status );
- assert( errno == EINVAL );
- puts( "Init: sigaction - EINVAL (SIGKILL)" );
-
- status = pthread_sigmask( SIG_BLOCK, NULL, NULL );
- if ( status != -1 )
- printf( "status = %d\n", status );
- assert( errno == EINVAL );
- puts( "Init: pthread_sigmask - EINVAL (set and oset invalid)" );
-
- status = pthread_sigmask( 999, &pending_set, NULL );
- if ( status != -1 )
- printf( "status = %d\n", status );
- assert( errno == EINVAL );
- puts( "Init: pthread_sigmask - EINVAL (how invalid)" );
-
- status = sigpending( NULL );
- if ( status != -1 )
- printf( "status = %d\n", status );
- assert( errno == EINVAL );
- puts( "Init: sigpending - EINVAL (set invalid)" );
-
- timeout.tv_nsec = -1;
- status = sigtimedwait( &mask, &info, &timeout );
- if ( status != -1 )
- printf( "status = %d\n", status );
- assert( errno == EINVAL );
- puts( "Init: pthread_sigmask - EINVAL (timout->nsec invalid < 0)" );
-
- timeout.tv_nsec = 0x7fffffff;
- status = sigtimedwait( &mask, &info, &timeout );
- if ( status != -1 )
- printf( "status = %d\n", status );
- assert( errno == EINVAL );
- puts( "Init: pthread_sigmask - EINVAL (timout->nsec invalid to large)" );
-
- status = pthread_kill( Init_id, 999 );
- if ( status != -1 )
- printf( "status = %d\n", status );
- assert( errno == EINVAL );
- puts( "Init: pthread_kill - EINVAL (sig invalid)" );
-
-/*
- * This is now implemented. We should delete this but for now
- * we will just comment this out.
- *
- * status = pthread_kill( 0, SIGUSR1 );
- * if ( status != -1 )
- * printf( "status = %d\n", status );
- * assert( errno == ENOSYS );
- * puts( "Init: pthread_kill - ENOSYS (signal SA_SIGINFO)" );
- */
-
- status = pthread_kill( 0, SIGUSR2 );
- if ( status != -1 )
- printf( "status = %d\n", status );
- assert( errno == ESRCH );
- puts( "Init: pthread_kill - ESRCH (signal SA_SIGINFO)" );
-
- status = pthread_kill( Init_id, 0 );
- assert( !status );
- puts( "Init: pthread_kill - SUCCESSFUL (signal = 0)" );
-
- act.sa_handler = SIG_IGN;
- act.sa_flags = 0;
- sigaction( SIGUSR2, &act, NULL );
- status = pthread_kill( Init_id, SIGUSR2 );
- assert( !status );
- puts( "Init: pthread_kill - SUCCESSFUL (signal = SIG_IGN)" );
-
- status = kill( 0x7fffffff, SIGUSR1 );
- if ( status != -1 )
- printf( "status = %d\n", status );
- assert( errno == ESRCH );
- puts( "Init: kill - ESRCH (pid invalid)" );
-
- status = kill( getpid(), 0 );
- assert( !status );
- puts( "Init: kill - SUCCESSFUL (signal = 0)" );
-
- status = kill( getpid(), 999 );
- if ( status != -1 )
- printf( "status = %d\n", status );
- assert( errno == EINVAL );
- puts( "Init: kill - EINVAL (sig invalid)" );
-
- /* exit this thread */
-
- puts( "*** END OF POSIX TEST 4 ***" );
- exit( 0 );
-
- return NULL; /* just so the compiler thinks we returned something */
-}
diff --git a/testsuites/psxtests/psx04/psx04.scn b/testsuites/psxtests/psx04/psx04.scn
deleted file mode 100644
index 17f2e5db97..0000000000
--- a/testsuites/psxtests/psx04/psx04.scn
+++ /dev/null
@@ -1,100 +0,0 @@
-*** POSIX TEST 4 ***
-Init's ID is 0x0c010001
-Init: sigemptyset - set= 0x00000000
-Init: sigfillset - set= 0xffffffff
-Init: sigdelset - delete SIGUSR1 set= 0xffff7fff
-Init: sigismember - FALSE since SIGUSR1 is not a member
-Init: sigismember - TRUE since SIGUSR2 is a member
-Init: send SIGUSR1 to process
-Signal: 16 caught by 0xc010001 (1)
-Init: Block SIGUSR1
-Init: send SIGUSR1 to process
-Signal: 16 caught by 0xc010001 (1)
-Init: Block SIGUSR1
-Init: Signals pending 0x00000000
-Init: send SIGUSR1 to process
-Init: Signals pending 0x00008000
-Init: Unblock SIGUSR1
-Signal: 16 caught by 0xc010001 (2)
-Init: create a thread interested in SIGUSR1
-Init: Block SIGUSR1
-Init: Signals pending 0x00000000
-Init: sleep so the other task can block
-Task_1: sleeping for 5 seconds
-Init: send SIGUSR1 to process
-Init: Signals pending 0x00008000
-Init: sleep so the other task can catch signal
-Signal: 16 caught by 0xc010002 (3)
-Task_1: 4 seconds left
-Task_1: exit
-Init: Unblock SIGALRM
-Init: Firing alarm in 5 seconds
-Init: 0 seconds left on previous alarm
-Init: Firing alarm in 2 seconds
-Init: 4 seconds left on previous alarm - MAY BE 5 SECONDS ALSO
-Init: Wait 4 seconds for alarm
-Signal: 14 caught by 0xc010001 (4)
-Init: 2 seconds left in sleep
-Init: Block SIGUSR1 and SIGUSR2 only
-Init: Previous blocked set was 0x00008000
-Init: Current blocked set is 0x00018000
-Init: Unblock all signals
-Init: Previous blocked set was 0x00018000
-Init: create a thread to send Init SIGUSR1
-Init: sigsuspend for any signal
-Task_2: sending SIGUSR1
-Task_2: exit
-Signal: 16 caught by 0xc010001 (5)
-Init: awakended from sigsuspend status=00000016
-Init: create a thread to sent Process SIGUSR1 with SA_SIGINFO
-Init: sleep so the Task_3 can sigqueue SIGUSR1
-Task_3: sigqueue SIGUSR1 with value= 16
-Signal_info: 16 caught by 0xc010004 (6) si_signo= 16 si_code= 1 value= 16
-Task_3: sigwaitinfo SIGUSR1 with value= 16
-Init: sigqueue occurred
-Init: Block SIGUSR1
-Init: send SIGUSR1 to process
-Init: sleep so the Task_3 can receive SIGUSR1
-Task_3: si_signo= 16 si_code= 1 value= 0
-Task_3: sigwait SIGUSR1
-Init: Block SIGUSR1
-Init: send SIGUSR1 to process
-Init: sleep so the Task_3 can receive SIGUSR1
-Task_3: signo= 16
-Task_3: pause
-Init: Block SIGUSR2
-Init: send SIGUSR2 to process
-Init: sleep so the Task_3 can receive SIGUSR2
-Task_3: pause= 17
-Task_3: sending SIGUSR2
-Task_3: sleep so the Init task can reguest a signal
-Init: sigsuspend for any signal
-Init: awakended from sigsuspend status=17
-Init: sigemptyset - EINVAL (set invalid)
-Init: sigfillset - EINVAL (set invalid)
-Init: sigaddset - EINVAL (set invalid)
-Init: sigaddset - SUCCESSFUL (signal = 0)
-Init: sigaddset - EINVAL (set invalid)
-Init: sigdelset - EINVAL (set invalid)
-Init: sigdelset - SUCCESSFUL (signal = 0)
-Init: sigdelset - EINVAL (set invalid)
-Init: sigismember - EINVAL (set invalid)
-Init: sigismember - SUCCESSFUL (signal = 0)
-Init: sigismember - EINVAL (signal invalid)
-Init: sigaction - SUCCESSFUL (signal = 0)
-Init: sigaction - EINVAL (signal invalid)
-Init: sigaction - EINVAL (SIGKILL)
-Init: pthread_sigmask - EINVAL (set and oset invalid)
-Init: pthread_sigmask - EINVAL (how invalid)
-Init: sigpending - EINVAL (set invalid)
-Init: pthread_sigmask - EINVAL (timout->nsec invalid < 0)
-Init: pthread_sigmask - EINVAL (timout->nsec invalid to large)
-Init: pthread_kill - EINVAL (sig invalid)
-Init: pthread_kill - ENOSYS (signal SA_SIGINFO)
-Init: pthread_kill - ESRCH (signal SA_SIGINFO)
-Init: pthread_kill - SUCCESSFUL (signal = 0)
-Init: pthread_kill - SUCCESSFUL (signal = SIG_IGN)
-Init: kill - ESRCH (pid invalid)
-Init: kill - SUCCESSFUL (signal = 0)
-Init: kill - EINVAL (sig invalid)
-*** END OF POSIX TEST 4 ***
diff --git a/testsuites/psxtests/psx04/system.h b/testsuites/psxtests/psx04/system.h
deleted file mode 100644
index f4769c47d9..0000000000
--- a/testsuites/psxtests/psx04/system.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-/* functions */
-
-#include <pmacros.h>
-
-void *POSIX_Init(
- void *argument
-);
-
-void *Task_1(
- void *argument
-);
-
-void *Task_2(
- void *argument
-);
-
-void *Task_3(
- void *argument
-);
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS 5
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-#define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE \
- (RTEMS_MINIMUM_STACK_SIZE * 4)
-
-#include <confdefs.h>
-
-/* global variables */
-
-#ifdef CONFIGURE_INIT
-#define TEST_EXTERN
-#else
-#define TEST_EXTERN extern
-#endif
-
-TEST_EXTERN pthread_t Init_id;
-TEST_EXTERN pthread_t Task1_id;
-TEST_EXTERN pthread_t Task2_id;
-TEST_EXTERN pthread_t Task3_id;
-
-/* end of include file */
diff --git a/testsuites/psxtests/psx04/task1.c b/testsuites/psxtests/psx04/task1.c
deleted file mode 100644
index 78adc87007..0000000000
--- a/testsuites/psxtests/psx04/task1.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Task_1
- *
- * This routine serves as a test task.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-#include <signal.h>
-
-void *Task_1(
- void *argument
-)
-{
- int seconds;
-
- printf( "Task_1: sleeping for 5 seconds\n" );
-
- seconds = sleep( 5 );
- printf( "Task_1: %d seconds left\n", seconds );
- assert( seconds );
-
- /* switch to Init */
-
- printf( "Task_1: exit\n" );
- pthread_exit( NULL );
-
- /* switch to Init */
-
- return NULL; /* just so the compiler thinks we returned something */
-}
diff --git a/testsuites/psxtests/psx04/task2.c b/testsuites/psxtests/psx04/task2.c
deleted file mode 100644
index 8bec7dc43b..0000000000
--- a/testsuites/psxtests/psx04/task2.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Task_2
- *
- * This routine serves as a test task.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-#include <signal.h>
-
-void *Task_2(
- void *argument
-)
-{
- int status;
-
- printf( "Task_2: sending SIGUSR1\n" );
- status = pthread_kill( Init_id, SIGUSR1 );
- assert( !status );
-
- /* switch to Init */
-
- printf( "Task_2: exit\n" );
- pthread_exit( NULL );
-
- /* switch to Init */
-
- return NULL; /* just so the compiler thinks we returned something */
-}
diff --git a/testsuites/psxtests/psx04/task3.c b/testsuites/psxtests/psx04/task3.c
deleted file mode 100644
index b2019b109a..0000000000
--- a/testsuites/psxtests/psx04/task3.c
+++ /dev/null
@@ -1,118 +0,0 @@
-/* Task_3
- *
- * This routine serves as a test task.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-#include <signal.h>
-
-void *Task_3(
- void *argument
-)
-{
- int status;
- int sig;
- union sigval value;
- sigset_t mask;
- siginfo_t info;
-
- value.sival_int = SIGUSR1;
-
- printf( "Task_3: sigqueue SIGUSR1 with value= %d\n", value.sival_int );
- status = sigqueue( getpid(), SIGUSR1, value );
- assert( !status );
-
- /* catch signal with sigwaitinfo */
-
- empty_line();
-
- status = sigemptyset( &mask );
- assert( !status );
-
- status = sigaddset( &mask, SIGUSR1 );
- assert( !status );
-
- printf( "Task_3: sigwaitinfo SIGUSR1 with value= %d\n", value.sival_int );
- status = sigwaitinfo( &mask, &info );
-
- /* switch to Init */
-
- assert( !(status==-1) );
- printf(
- "Task_3: si_signo= %d si_code= %d value= %d\n",
- info.si_signo,
- info.si_code,
- info.si_value.sival_int
- );
-
- /* catch signal with sigwait */
-
- empty_line();
-
- status = sigemptyset( &mask );
- assert( !status );
-
- status = sigaddset( &mask, SIGUSR1 );
- assert( !status );
-
- printf( "Task_3: sigwait SIGUSR1\n" );
- status = sigwait( &mask, &sig );
-
- /* switch to Init */
-
- assert( !status );
- printf( "Task_3: signo= %d\n", sig );
-
- /* catch signal with pause */
-
- empty_line();
-
- status = sigemptyset( &mask );
- assert( !status );
-
- status = sigaddset( &mask, SIGUSR1 );
- assert( !status );
-
- printf( "Task_3: pause\n" );
- status = pause( );
-
- /* switch to Init */
-
- assert( !(status==-1) );
- printf( "Task_3: pause= %d\n", status );
-
-
- /* send signal to Init task before it has pended for a signal */
-
- empty_line();
-
- printf( "Task_3: sending SIGUSR2\n" );
- status = pthread_kill( Init_id, SIGUSR2 );
- assert( !status );
-
- printf( "Task_3: sleep so the Init task can reguest a signal\n" );
- status = sleep( 1 );
- assert( !status );
-
- /* end of task 3 */
- printf( "Task_3: exit\n" );
- pthread_exit( NULL );
-
- /* switch to Init */
-
- return NULL; /* just so the compiler thinks we returned something */
-}
diff --git a/testsuites/psxtests/psx05/Makefile.am b/testsuites/psxtests/psx05/Makefile.am
deleted file mode 100644
index 5103b2cd84..0000000000
--- a/testsuites/psxtests/psx05/Makefile.am
+++ /dev/null
@@ -1,43 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = psx05
-
-MANAGERS = all
-
-C_FILES = init.c task.c task2.c task3.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/psxtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CPPFLAGS = -I$(top_srcdir)/include
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/psxtests/psx05/init.c b/testsuites/psxtests/psx05/init.c
deleted file mode 100644
index 30998fbc95..0000000000
--- a/testsuites/psxtests/psx05/init.c
+++ /dev/null
@@ -1,583 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define CONFIGURE_INIT
-#include "system.h"
-#include <errno.h>
-
-#define MUTEX_BAD_ID 0xfffffffe
-
-void Print_mutexattr(
- char *msg,
- pthread_mutexattr_t *attr
-)
-{
- int status;
- int protocol;
- int prioceiling;
- int pshared;
-
- /* protocol */
-
- status = pthread_mutexattr_getprotocol( attr, &protocol );
- assert( !status );
-
- printf( "%smutex protocol is (%d) -- ", msg, protocol );
- switch ( protocol ) {
- case PTHREAD_PRIO_NONE:
- puts( "PTHREAD_PRIO_NONE" );
- break;
- case PTHREAD_PRIO_INHERIT:
- puts( "PTHREAD_PRIO_INHERIT" );
- break;
- case PTHREAD_PRIO_PROTECT:
- puts( "PTHREAD_PRIO_PROTECT" );
- break;
- default:
- puts( "UNKNOWN" );
- assert( 0 );
- break;
- }
-
- /* priority ceiling */
-
- status = pthread_mutexattr_getprioceiling( attr, &prioceiling );
- assert( !status );
- printf( "%smutex priority ceiling is %d\n", msg, prioceiling );
-
- /* process shared */
-
- status = pthread_mutexattr_getpshared( attr, &pshared );
- assert( !status );
- printf( "%smutex process shared is (%d) -- ", msg, pshared );
- switch ( pshared ) {
- case PTHREAD_PROCESS_PRIVATE:
- puts( "PTHREAD_PROCESS_PRIVATE" );
- break;
- case PTHREAD_PROCESS_SHARED:
- puts( "PTHREAD_PROCESS_SHARED" );
- break;
- default:
- puts( "UNKNOWN" );
- assert( 0 );
- break;
- }
-}
-
-void *POSIX_Init(
- void *argument
-)
-{
- int status;
- pthread_mutexattr_t attr;
- pthread_mutexattr_t destroyed_attr;
- struct timespec times;
- struct sched_param param;
- int pshared;
- int policy;
- int protocol;
- int ceiling;
- int old_ceiling;
-
- assert( MUTEX_BAD_ID != PTHREAD_MUTEX_INITIALIZER );
- Mutex_bad_id = MUTEX_BAD_ID;
-
- puts( "\n\n*** POSIX TEST 5 ***" );
-
- /* set the time of day, and print our buffer in multiple ways */
-
- set_time( TM_FRIDAY, TM_MAY, 24, 96, 11, 5, 0 );
-
- /* get id of this thread */
-
- Init_id = pthread_self();
- printf( "Init's ID is 0x%08x\n", Init_id );
-
- /* tes pthread_mutex_attr_init */
-
- puts( "Init: pthread_mutexattr_init - EINVAL (NULL attr)" );
- status = pthread_mutexattr_init( NULL );
- assert( status == EINVAL );
-
- puts( "Init: pthread_mutexattr_init - SUCCESSFUL" );
- status = pthread_mutexattr_init( &attr );
- assert( !status );
-
- Print_mutexattr( "Init: ", &attr );
-
- /* create an "uninitialized" attribute structure */
-
- status = pthread_mutexattr_init( &destroyed_attr );
- assert( !status );
-
- puts( "Init: pthread_mutexattr_destroy - SUCCESSFUL" );
- status = pthread_mutexattr_destroy( &destroyed_attr );
- assert( !status );
-
- puts( "Init: pthread_mutexattr_destroy - EINVAL (NULL attr)" );
- status = pthread_mutexattr_destroy( NULL );
- assert( status == EINVAL );
-
- puts( "Init: pthread_mutexattr_destroy - EINVAL (not initialized)" );
- status = pthread_mutexattr_destroy( &destroyed_attr );
- assert( status == EINVAL );
-
- /* error cases for set and get pshared attribute */
-
- empty_line();
-
- puts( "Init: pthread_mutexattr_getpshared - EINVAL (NULL attr)" );
- status = pthread_mutexattr_getpshared( NULL, &pshared );
- assert( status == EINVAL );
-
- puts( "Init: pthread_mutexattr_getpshared - EINVAL (NULL pshared)" );
- status = pthread_mutexattr_getpshared( &attr, NULL );
- assert( status == EINVAL );
-
- puts( "Init: pthread_mutexattr_getpshared - EINVAL (not initialized)" );
- status = pthread_mutexattr_getpshared( &destroyed_attr, &pshared );
- assert( status == EINVAL );
-
- pshared = PTHREAD_PROCESS_PRIVATE;
- puts( "Init: pthread_mutexattr_setpshared - EINVAL (NULL attr)" );
- status = pthread_mutexattr_setpshared( NULL, pshared );
- assert( status == EINVAL );
-
- pshared = PTHREAD_PROCESS_PRIVATE;
- puts( "Init: pthread_mutexattr_setpshared - EINVAL (not initialized)" );
- status = pthread_mutexattr_setpshared( &destroyed_attr, pshared );
- assert( status == EINVAL );
-
- /* error cases for set and get protocol attribute */
-
- empty_line();
-
- puts( "Init: pthread_mutexattr_getprotocol - EINVAL (NULL attr)" );
- status = pthread_mutexattr_getprotocol( NULL, &protocol );
- assert( status == EINVAL );
-
- puts( "Init: pthread_mutexattr_getprotocol - EINVAL (NULL protocol)" );
- status = pthread_mutexattr_getprotocol( &attr, NULL );
- assert( status == EINVAL );
-
- puts( "Init: pthread_mutexattr_getprotocol - EINVAL (not initialized)" );
- status = pthread_mutexattr_getprotocol( &destroyed_attr, &protocol );
- assert( status == EINVAL );
-
- puts( "Init: pthread_mutexattr_setprotocol - EINVAL (NULL attr)" );
- status = pthread_mutexattr_setprotocol( NULL, PTHREAD_PRIO_NONE );
- assert( status == EINVAL );
-
- puts( "Init: pthread_mutexattr_setprotocol - EINVAL (invalid protocol)" );
- status = pthread_mutexattr_setprotocol( &attr, -1 );
- assert( status == EINVAL );
-
- puts( "Init: pthread_mutexattr_setprotocol - EINVAL (not initialized)" );
- status = pthread_mutexattr_setprotocol( &destroyed_attr, -1 );
- assert( status == EINVAL );
-
- /* error cases for set and get prioceiling attribute */
-
- empty_line();
-
- puts( "Init: pthread_mutexattr_getprioceiling - EINVAL (NULL attr)" );
- status = pthread_mutexattr_getprioceiling( NULL, &ceiling );
- assert( status == EINVAL );
-
- puts( "Init: pthread_mutexattr_getprioceiling - EINVAL (NULL prioceiling)" );
- status = pthread_mutexattr_getprioceiling( &attr, NULL );
- assert( status == EINVAL );
-
- puts( "Init: pthread_mutexattr_getprioceiling - EINVAL (not initialized)" );
- status = pthread_mutexattr_getprioceiling( &destroyed_attr, &ceiling );
- assert( status == EINVAL );
-
- puts( "Init: pthread_mutexattr_setprioceiling - EINVAL (NULL attr)" );
- status = pthread_mutexattr_setprioceiling( NULL, 128 );
- assert( status == EINVAL );
-
- puts( "Init: pthread_mutexattr_setprioceiling - EINVAL (invalid priority)" );
- status = pthread_mutexattr_setprioceiling( &attr, 512 );
- if ( status != EINVAL )
- printf( "status = %d\n", status );
- assert( status == EINVAL );
-
- puts( "Init: pthread_mutexattr_setprioceiling - EINVAL (not initialized)" );
- status = pthread_mutexattr_setprioceiling( &destroyed_attr, -1 );
- assert( status == EINVAL );
-
- /* create a thread */
-
- status = pthread_create( &Task_id, NULL, Task_1, NULL );
- assert( !status );
-
- /* now try some basic mutex operations */
-
- empty_line();
-
- puts( "Init: pthread_mutex_init - EINVAL (NULL mutex_id)" );
- status = pthread_mutex_init( NULL, &attr );
- assert( status == EINVAL );
-
- puts( "Init: pthread_mutex_init - EINVAL (not initialized attr)" );
- status = pthread_mutex_init( &Mutex_id, &destroyed_attr );
- assert( status == EINVAL );
-
- /* must get around error checks in attribute set routines */
- attr.protocol = -1;
-
- puts( "Init: pthread_mutex_init - EINVAL (bad protocol)" );
- status = pthread_mutex_init( &Mutex_id, &attr );
- assert( status == EINVAL );
-
- /* must get around error checks in attribute set routines */
- attr.protocol = PTHREAD_PRIO_INHERIT;
- attr.prio_ceiling = -1;
-
- puts( "Init: pthread_mutex_init - EINVAL (bad priority ceiling)" );
- status = pthread_mutex_init( &Mutex_id, &attr );
- assert( status == EINVAL );
-
- /* now set up for a success pthread_mutex_init */
-
- puts( "Init: Resetting mutex attributes" );
- status = pthread_mutexattr_init( &attr );
- assert( !status );
-
- puts( "Init: Changing mutex attributes" );
- status = pthread_mutexattr_setprotocol( &attr, PTHREAD_PRIO_INHERIT );
- assert( !status );
-
- status = pthread_mutexattr_setprioceiling( &attr, 128 );
- assert( !status );
-
- status = pthread_mutexattr_setpshared( &attr, PTHREAD_PROCESS_SHARED );
- assert( !status );
-
- Print_mutexattr( "Init: ", &attr );
-
- puts( "Init: Resetting mutex attributes" );
- status = pthread_mutexattr_init( &attr );
- assert( !status );
-
- /*
- * Set the protocol to priority ceiling so the owner check happens
- * and the EPERM test (later) will work.
- */
-
- status = pthread_mutexattr_setprotocol( &attr, PTHREAD_PRIO_INHERIT );
- assert( !status );
-
- puts( "Init: pthread_mutex_init - SUCCESSFUL" );
- status = pthread_mutex_init( &Mutex_id, &attr );
- if ( status )
- printf( "status = %d\n", status );
- assert( !status );
-
- /*
- * This is not required to be an error and when it is, there are
- * behavioral conflicts with other implementations.
- */
- puts( "Init: pthread_mutex_init - EBUSY (reinitialize an existing mutex) - skipped" );
-
-#if 0
- status = pthread_mutex_init( &Mutex_id, &attr );
- if ( !status )
- printf( "status = %d\n", status );
- assert( status == EBUSY );
-#endif
-
- puts( "Init: pthread_mutex_trylock - EINVAL (illegal ID)" );
- status = pthread_mutex_trylock( &Mutex_bad_id );
- if ( status != EINVAL )
- printf( "status = %d\n", status );
- assert( status == EINVAL );
-
- puts( "Init: pthread_mutex_trylock - SUCCESSFUL" );
- status = pthread_mutex_trylock( &Mutex_id );
- if ( status )
- printf( "status = %d\n", status );
- assert( !status );
-
- puts( "Init: pthread_mutex_trylock - EDEADLK (already locked)" );
- status = pthread_mutex_trylock( &Mutex_id );
- if ( status != EDEADLK )
- printf( "status = %d\n", status );
- assert( status == EDEADLK );
-
- puts( "Init: pthread_mutex_lock - EDEADLK (already locked)" );
- status = pthread_mutex_lock( &Mutex_id );
- if ( status != EDEADLK )
- printf( "status = %d\n", status );
- assert( status == EDEADLK );
-
- puts( "Init: Sleep 1 second" );
-
- sleep( 1 );
-
- /* switch to task 1 */
-
- puts( "Init: pthread_mutex_unlock - EINVAL (invalid id)" );
- status = pthread_mutex_unlock( &Mutex_bad_id );
- if ( status != EINVAL )
- printf( "status = %d\n", status );
- assert( status == EINVAL );
-
- puts( "Init: pthread_mutex_unlock - SUCCESSFUL" );
- status = pthread_mutex_unlock( &Mutex_id );
- if ( status )
- printf( "status = %d\n", status );
- assert( !status );
-
- puts( "Init: pthread_mutex_unlock - EPERM (not owner)" );
- status = pthread_mutex_unlock( &Mutex_id );
- if ( status != EPERM )
- printf( "status = %d\n", status );
- assert( status == EPERM );
-
- times.tv_sec = 0;
- times.tv_nsec = 500000000;
- puts( "Init: pthread_mutex_timedlock - time out in 1/2 second" );
- status = pthread_mutex_timedlock( &Mutex_id, &times );
- if ( status != EAGAIN )
- printf( "status = %d\n", status );
- assert( status == EAGAIN );
-
- /* switch to idle */
-
- puts( "Init: pthread_mutex_timedlock - EAGAIN (timeout)" );
-
- /* destroy a mutex */
-
- empty_line();
-
- puts( "Init: pthread_mutex_init - SUCCESSFUL" );
- status = pthread_mutex_init( &Mutex2_id, &attr );
- if ( status )
- printf( "status = %d\n", status );
- assert( !status );
-
- puts( "Init: pthread_mutex_init - EAGAIN (too many)" );
- status = pthread_mutex_init( &Mutex3_id, &attr );
- assert( status == EAGAIN );
-
- puts( "Init: pthread_mutexattr_destroy - SUCCESSFUL" );
- status = pthread_mutexattr_destroy( &attr );
- assert( !status );
-
- puts( "Init: pthread_mutex_destroy - SUCCESSFUL" );
- status = pthread_mutex_destroy( &Mutex2_id );
- assert( !status );
-
- puts( "Init: pthread_mutex_destroy - EINVAL (invalid id)" );
- status = pthread_mutex_destroy( &Mutex_bad_id );
- assert( status == EINVAL );
-
- /* destroy a busy mutex */
-
- empty_line();
-
- puts( "Init: pthread_mutexattr_init - SUCCESSFUL" );
- status = pthread_mutexattr_init( &attr );
- assert( !status );
-
- puts( "Init: pthread_mutex_init - SUCCESSFUL" );
- status = pthread_mutex_init( &Mutex2_id, &attr );
- assert( !status );
-
- puts( "Init: pthread_mutex_trylock - SUCCESSFUL" );
- status = pthread_mutex_trylock( &Mutex2_id );
- if ( status )
- printf( "status = %d\n", status );
- assert( !status );
-
- puts( "Init: pthread_mutex_destroy - EBUSY (already locked)" );
- status = pthread_mutex_destroy( &Mutex2_id );
- if ( status != EBUSY )
- printf( "status = %d\n", status );
- assert( status == EBUSY );
-
- puts( "Init: pthread_mutex_unlock - SUCCESSFUL" );
- status = pthread_mutex_unlock( &Mutex2_id );
- assert( !status );
-
- puts( "Init: pthread_mutex_destroy - SUCCESSFUL" );
- status = pthread_mutex_destroy( &Mutex2_id );
- assert( !status );
-
- /* priority inherit mutex */
-
- empty_line();
-
- puts( "Init: pthread_mutexattr_init - SUCCESSFUL" );
- status = pthread_mutexattr_init( &attr );
- assert( !status );
-
- puts(
- "Init: pthread_mutexattr_setprotocol - SUCCESSFUL (PTHREAD_PRIO_INHERIT)"
- );
- status = pthread_mutexattr_setprotocol( &attr, PTHREAD_PRIO_INHERIT );
- assert( !status );
-
- puts( "Init: pthread_mutex_init - SUCCESSFUL" );
- status = pthread_mutex_init( &Mutex2_id, &attr );
- assert( !status );
-
- puts( "Init: pthread_mutex_trylock - SUCCESSFUL" );
- status = pthread_mutex_trylock( &Mutex2_id );
- assert( !status );
-
- /* create a thread at a lower priority */
-
- status = pthread_create( &Task2_id, NULL, Task_2, NULL );
- assert( !status );
-
- /* set priority of Task2 to highest priority */
-
- param.sched_priority = 254;
-
- puts( "Init: pthread_setschedparam - Setting Task2 priority to highest" );
- status = pthread_setschedparam( Task2_id, SCHED_FIFO, &param );
- assert( !status );
-
- /* switching to Task2 */
-
- status = pthread_getschedparam( pthread_self(), &policy, &param );
- assert( !status );
- printf( "Init: pthread_getschedparam - priority = %d\n", param.sched_priority);
-
- puts( "Init: pthread_mutex_unlock - SUCCESSFUL" );
- status = pthread_mutex_unlock( &Mutex2_id );
- assert( !status );
-
- puts( "Init: pthread_mutexattr_destroy - SUCCESSFUL" );
- status = pthread_mutexattr_destroy( &attr );
- assert( !status );
-
- puts( "Init: pthread_mutex_destroy - SUCCESSFUL" );
- status = pthread_mutex_destroy( &Mutex2_id );
- assert( !status );
-
- /* priority ceiling mutex */
-
- empty_line();
-
- puts( "Init: pthread_mutexattr_init - SUCCESSFUL" );
- status = pthread_mutexattr_init( &attr );
- assert( !status );
-
- puts(
- "Init: pthread_mutexattr_setprotocol - SUCCESSFUL (PTHREAD_PRIO_PROTECT)"
- );
- status = pthread_mutexattr_setprotocol( &attr, PTHREAD_PRIO_PROTECT );
- assert( !status );
-
- puts( "Init: pthread_mutex_init - SUCCESSFUL" );
- status = pthread_mutex_init( &Mutex2_id, &attr );
- assert( !status );
-
- puts( "Init: pthread_mutex_getprioceiling - EINVAL (invalid id)" );
- status = pthread_mutex_getprioceiling( &Mutex_bad_id, &ceiling );
- assert( status == EINVAL );
-
- puts( "Init: pthread_mutex_getprioceiling - EINVAL (NULL ceiling)" );
- status = pthread_mutex_getprioceiling( &Mutex2_id, NULL );
- assert( status == EINVAL );
-
- status = pthread_mutex_getprioceiling( &Mutex2_id, &ceiling );
- assert( !status );
- printf( "Init: pthread_mutex_getprioceiling - %d\n", ceiling );
-
- puts( "Init: pthread_mutex_setprioceiling - EINVAL (invalid id)" );
- status = pthread_mutex_setprioceiling( &Mutex_bad_id, 200, &old_ceiling );
- assert( status == EINVAL );
-
- puts( "Init: pthread_mutex_setprioceiling - EINVAL (illegal priority)" );
- status = pthread_mutex_setprioceiling( &Mutex2_id, 512, &old_ceiling );
- assert( status == EINVAL );
-
- puts( "Init: pthread_mutex_setprioceiling - EINVAL (NULL ceiling)" );
- status = pthread_mutex_setprioceiling( &Mutex2_id, 128, NULL );
- assert( status == EINVAL );
-
- /* normal cases of set priority ceiling */
-
- puts( "Init: pthread_mutex_setprioceiling - new ceiling = 200" );
- status = pthread_mutex_setprioceiling( &Mutex2_id, 200, &old_ceiling );
- assert( !status );
- printf(
- "Init: pthread_mutex_setprioceiling - old ceiling = %d\n",old_ceiling
- );
-
- status = pthread_getschedparam( pthread_self(), &policy, &param );
- assert( !status );
- printf(
- "Init: pthread_getschedparam - priority = %d\n", param.sched_priority
- );
-
- puts( "Init: pthread_mutex_trylock - SUCCESSFUL" );
- status = pthread_mutex_trylock( &Mutex2_id );
- assert( !status );
-
- status = pthread_getschedparam( pthread_self(), &policy, &param );
- assert( !status );
- printf(
- "Init: pthread_getschedparam - priority = %d\n", param.sched_priority
- );
-
- /* create a thread at a higher priority */
-
- status = pthread_create( &Task3_id, NULL, Task_3, NULL );
- assert( !status );
-
- /* set priority of Task3 to highest priority */
-
- param.sched_priority = 199;
-
- status = pthread_setschedparam( Task3_id, SCHED_FIFO, &param );
- assert( !status );
- puts( "Init: pthread_setschedparam - set Task3 priority to highest" );
-
- /* DOES NOT SWITCH to Task3 */
-
- puts( "Init: Sleep 1 second" );
- assert( !status );
- sleep( 1 );
-
- /* switch to task 3 */
-
- puts( "Init: pthread_mutex_unlock - SUCCESSFUL" );
- status = pthread_mutex_unlock( &Mutex2_id );
- assert( !status );
-
- status = pthread_mutex_getprioceiling( &Mutex2_id, &ceiling );
- assert( !status );
- printf( "Init: pthread_mutex_getprioceiling- ceiling = %d\n", ceiling );
-
- /* set priority of Init to highest priority */
-
- param.sched_priority = 254;
-
- status = pthread_setschedparam( Init_id, SCHED_FIFO, &param );
- assert( !status );
- puts( "Init: pthread_setschedparam - set Init priority to highest" );
-
- puts( "Init: pthread_mutex_lock - EINVAL (priority ceiling violation)" );
- status = pthread_mutex_lock( &Mutex2_id );
- if ( status != EINVAL )
- printf( "status = %d\n", status );
- assert( status == EINVAL );
-
- puts( "*** END OF POSIX TEST 5 ***" );
- exit( 0 );
-
- return NULL; /* just so the compiler thinks we returned something */
-}
diff --git a/testsuites/psxtests/psx05/psx05.scn b/testsuites/psxtests/psx05/psx05.scn
deleted file mode 100644
index 83d46b5a90..0000000000
--- a/testsuites/psxtests/psx05/psx05.scn
+++ /dev/null
@@ -1,103 +0,0 @@
-*** POSIX TEST 5 ***
-Init's ID is 0x0c010001
-Init: pthread_mutexattr_init - EINVAL (NULL attr)
-Init: pthread_mutexattr_init - SUCCESSFUL
-Init: mutex protocol is (0) -- PTHREAD_PRIO_NONE
-Init: mutex priority ceiling is 254
-Init: mutex process shared is (0) -- PTHREAD_PROCESS_PRIVATE
-Init: pthread_mutexattr_destroy - SUCCESSFUL
-Init: pthread_mutexattr_destroy - EINVAL (NULL attr)
-Init: pthread_mutexattr_destroy - EINVAL (not initialized)
-Init: pthread_mutexattr_getpshared - EINVAL (NULL attr)
-Init: pthread_mutexattr_getpshared - EINVAL (NULL pshared)
-Init: pthread_mutexattr_getpshared - EINVAL (not initialized)
-Init: pthread_mutexattr_setpshared - EINVAL (NULL attr)
-Init: pthread_mutexattr_setpshared - EINVAL (not initialized)
-Init: pthread_mutexattr_getprotocol - EINVAL (NULL attr)
-Init: pthread_mutexattr_getprotocol - EINVAL (NULL protocol)
-Init: pthread_mutexattr_getprotocol - EINVAL (not initialized)
-Init: pthread_mutexattr_setprotocol - EINVAL (NULL attr)
-Init: pthread_mutexattr_setprotocol - EINVAL (invalid protocol)
-Init: pthread_mutexattr_setprotocol - EINVAL (not initialized)
-Init: pthread_mutexattr_getprioceiling - EINVAL (NULL attr)
-Init: pthread_mutexattr_getprioceiling - EINVAL (NULL prioceiling)
-Init: pthread_mutexattr_getprioceiling - EINVAL (not initialized)
-Init: pthread_mutexattr_setprioceiling - EINVAL (NULL attr)
-Init: pthread_mutexattr_setprioceiling - EINVAL (invalid priority)
-Init: pthread_mutexattr_setprioceiling - EINVAL (not initialized)
-Init: pthread_mutex_init - EINVAL (NULL mutex_id)
-Init: pthread_mutex_init - EINVAL (not initialized attr)
-Init: pthread_mutex_init - EINVAL (bad protocol)
-Init: pthread_mutex_init - EINVAL (bad priority ceiling)
-Init: Resetting mutex attributes
-Init: Changing mutex attributes
-Init: mutex protocol is (1) -- PTHREAD_PRIO_INHERIT
-Init: mutex priority ceiling is 128
-Init: mutex process shared is (1) -- PTHREAD_PROCESS_SHARED
-Init: Resetting mutex attributes
-Init: pthread_mutex_init - SUCCESSFUL
-Init: pthread_mutex_init - EBUSY (reinitialize an existing mutex) - skipped
-Init: pthread_mutex_trylock - EINVAL (illegal ID)
-Init: pthread_mutex_trylock - SUCCESSFUL
-Init: pthread_mutex_trylock - EDEADLK (already locked)
-Init: pthread_mutex_lock - EDEADLK (already locked)
-Init: Sleep 1 second
-Task: pthread_mutex_trylock already locked
-Task: pthread_mutex_lock unavailable
-Init: pthread_mutex_unlock - EINVAL (invalid id)
-Init: pthread_mutex_unlock - SUCCESSFUL
-Init: pthread_mutex_unlock - EPERM (not owner)
-Init: pthread_mutex_timedlock - time out in 1/2 second
-Task: mutex acquired
-Task: sleep for 2 seconds
-Init: pthread_mutex_timedlock - EAGAIN (timeout)
-Init: pthread_mutex_init - SUCCESSFUL
-Init: pthread_mutex_init - EAGAIN (too many)
-Init: pthread_mutexattr_destroy - SUCCESSFUL
-Init: pthread_mutex_destroy - SUCCESSFUL
-Init: pthread_mutex_destroy - EINVAL (invalid id)
-Init: pthread_mutexattr_init - SUCCESSFUL
-Init: pthread_mutex_init - SUCCESSFUL
-Init: pthread_mutex_trylock - SUCCESSFUL
-Init: pthread_mutex_destroy - EBUSY (already locked)
-Init: pthread_mutex_unlock - SUCCESSFUL
-Init: pthread_mutex_destroy - SUCCESSFUL
-Init: pthread_mutexattr_init - SUCCESSFUL
-Init: pthread_mutexattr_setprotocol - SUCCESSFUL (PTHREAD_PRIO_INHERIT)
-Init: pthread_mutex_init - SUCCESSFUL
-Init: pthread_mutex_trylock - SUCCESSFUL
-Init: pthread_setschedparam - Setting Task2 priority to highest
-Task 2: pthread_mutex_lock unavailable (inherit case)
-Init: pthread_getschedparam - priority = 254
-Init: pthread_mutex_unlock - SUCCESSFUL
-Task 2: mutex acquired
-Task 2: unlock Mutex 2
-Task 2: exit
-Init: pthread_mutexattr_destroy - SUCCESSFUL
-Init: pthread_mutex_destroy - SUCCESSFUL
-Init: pthread_mutexattr_init - SUCCESSFUL
-Init: pthread_mutexattr_setprotocol - SUCCESSFUL (PTHREAD_PRIO_PROTECT)
-Init: pthread_mutex_init - SUCCESSFUL
-Init: pthread_mutex_getprioceiling - EINVAL (invalid id)
-Init: pthread_mutex_getprioceiling - EINVAL (NULL ceiling)
-Init: pthread_mutex_getprioceiling - 254
-Init: pthread_mutex_setprioceiling - EINVAL (invalid id)
-Init: pthread_mutex_setprioceiling - EINVAL (illegal priority)
-Init: pthread_mutex_setprioceiling - EINVAL (NULL ceiling)
-Init: pthread_mutex_setprioceiling - new ceiling = 200
-Init: pthread_mutex_setprioceiling - old ceiling = 254
-Init: pthread_getschedparam - priority = 2
-Init: pthread_mutex_trylock - SUCCESSFUL
-Init: pthread_getschedparam - priority = 200
-Init: pthread_setschedparam - set Task3 priority to highest
-Init: Sleep 1 second
-Task 3: pthread_mutex_lock unavailable (inherit case)
-Init: pthread_mutex_unlock - SUCCESSFUL
-Task 3: mutex acquired
-Task 3: unlock Mutex 2
-Task 3: pthread_getschedparam priority = 199
-Task 3: exit
-Init: pthread_mutex_getprioceiling- ceiling = 200
-Init: pthread_setschedparam - set Init priority to highest
-Init: pthread_mutex_lock - EINVAL (priority ceiling violation)
-*** END OF POSIX TEST 5 ***
diff --git a/testsuites/psxtests/psx05/system.h b/testsuites/psxtests/psx05/system.h
deleted file mode 100644
index ed901c71a9..0000000000
--- a/testsuites/psxtests/psx05/system.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-/* functions */
-
-#include <pmacros.h>
-
-void *POSIX_Init(
- void *argument
-);
-
-void *Task_1(
- void *argument
-);
-
-void *Task_2(
- void *argument
-);
-
-void *Task_3(
- void *argument
-);
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 2
-
-#include <confdefs.h>
-
-/* global variables */
-
-#ifdef CONFIGURE_INIT
-#define TEST_EXTERN
-#else
-#define TEST_EXTERN extern
-#endif
-
-TEST_EXTERN pthread_t Init_id;
-TEST_EXTERN pthread_t Task_id;
-TEST_EXTERN pthread_t Task2_id;
-TEST_EXTERN pthread_t Task3_id;
-TEST_EXTERN pthread_mutex_t Mutex_id;
-TEST_EXTERN pthread_mutex_t Mutex2_id;
-TEST_EXTERN pthread_mutex_t Mutex3_id;
-TEST_EXTERN pthread_mutex_t Mutex_bad_id;
-
-/* end of include file */
diff --git a/testsuites/psxtests/psx05/task.c b/testsuites/psxtests/psx05/task.c
deleted file mode 100644
index 64f6d4403a..0000000000
--- a/testsuites/psxtests/psx05/task.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/* Task_1
- *
- * This routine serves as a test task. It verifies the basic task
- * switching capabilities of the executive.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-#include <errno.h>
-
-void *Task_1(
- void *argument
-)
-{
- int status;
-
- printf( "Task: pthread_mutex_trylock already locked\n" );
- status = pthread_mutex_trylock( &Mutex_id );
- if ( status != EBUSY )
- printf( "status = %d\n", status );
- assert( status == EBUSY );
-
- printf( "Task: pthread_mutex_lock unavailable\n" );
- status = pthread_mutex_lock( &Mutex_id );
- if ( status )
- printf( "status = %d\n", status );
- assert( !status );
-
- /* switch to init */
-
- printf( "Task: mutex acquired\n" );
-
- printf( "Task: sleep for 2 seconds\n" );
- sleep( 2 );
-
- /* switch to init */
-
- printf( "Task: exit\n" );
- pthread_exit( NULL );
-
- /* switch to Init */
-
- return NULL; /* just so the compiler thinks we returned something */
-}
diff --git a/testsuites/psxtests/psx05/task2.c b/testsuites/psxtests/psx05/task2.c
deleted file mode 100644
index 57b891a422..0000000000
--- a/testsuites/psxtests/psx05/task2.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* Task_2
- *
- * This routine serves as a test task.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-#include <errno.h>
-
-void *Task_2(
- void *argument
-)
-{
- int status;
-
- printf( "Task 2: pthread_mutex_lock unavailable (inherit case)\n" );
- status = pthread_mutex_lock( &Mutex2_id );
- if ( status )
- printf( "status =%d\n", status );
- assert( !status );
- printf( "Task 2: mutex acquired\n" );
-
- /* switch to init */
-
- printf( "Task 2: unlock Mutex 2\n" );
- status = pthread_mutex_unlock( &Mutex2_id );
- assert( !status );
-
- printf( "Task 2: exit\n" );
- pthread_exit( NULL );
-
- /* switch to Init */
-
- return NULL; /* just so the compiler thinks we returned something */
-}
diff --git a/testsuites/psxtests/psx05/task3.c b/testsuites/psxtests/psx05/task3.c
deleted file mode 100644
index 3049d78ee7..0000000000
--- a/testsuites/psxtests/psx05/task3.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/* Task_3
- *
- * This routine serves as a test task.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-#include <errno.h>
-
-void *Task_3(
- void *argument
-)
-{
- int status;
- struct sched_param param;
- int policy;
-
- printf( "Task 3: pthread_mutex_lock unavailable (inherit case)\n" );
- status = pthread_mutex_lock( &Mutex2_id );
- printf( "Task 3: mutex acquired\n" );
- assert( !status );
-
- printf( "Task 3: unlock Mutex 2\n" );
- status = pthread_mutex_unlock( &Mutex2_id );
- assert( !status );
-
- status = pthread_getschedparam( pthread_self(), &policy, &param );
- assert( !status );
- printf( "Task 3: pthread_getschedparam priority = %d\n", param.sched_priority );
-
- printf( "Task 3: exit\n" );
- pthread_exit( NULL );
-
- /* switch to Init */
-
- return NULL; /* just so the compiler thinks we returned something */
-}
diff --git a/testsuites/psxtests/psx06/Makefile.am b/testsuites/psxtests/psx06/Makefile.am
deleted file mode 100644
index 7f2b97c1f2..0000000000
--- a/testsuites/psxtests/psx06/Makefile.am
+++ /dev/null
@@ -1,43 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = psx06
-
-MANAGERS = all
-
-C_FILES = init.c task.c task2.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/psxtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CPPFLAGS = -I$(top_srcdir)/include
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/psxtests/psx06/init.c b/testsuites/psxtests/psx06/init.c
deleted file mode 100644
index 0ccceeca12..0000000000
--- a/testsuites/psxtests/psx06/init.c
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define CONFIGURE_INIT
-#include "system.h"
-#include <errno.h>
-
-void Key_destructor(
- void *key_data
-)
-{
- Destructor_invoked++;
-
- /*
- * This checks out that we only run the destructor multiple times
- * when the key data is non null.
- */
-
- if ( Destructor_invoked == 5 )
- (void) pthread_setspecific( Key_id, NULL );
-}
-
-void *POSIX_Init(
- void *argument
-)
-{
- int status;
- unsigned int remaining;
- rtems_unsigned32 *key_data;
-
- puts( "\n\n*** POSIX TEST 6 ***" );
-
- /* set the time of day, and print our buffer in multiple ways */
-
- set_time( TM_FRIDAY, TM_MAY, 24, 96, 11, 5, 0 );
-
- /* get id of this thread */
-
- Init_id = pthread_self();
- printf( "Init's ID is 0x%08x\n", Init_id );
-
- /* create a couple of threads */
-
- status = pthread_create( &Task_id, NULL, Task_1, NULL );
- assert( !status );
-
- status = pthread_create( &Task2_id, NULL, Task_2, NULL );
- assert( !status );
-
- /* create a key */
-
- empty_line();
-
- Destructor_invoked = 0;
- puts( "Init: pthread_key_create - SUCCESSFUL" );
- status = pthread_key_create( &Key_id, Key_destructor );
- if ( status )
- printf( "status = %d\n", status );
- assert( !status );
-
- printf( "Destructor invoked %d times\n", Destructor_invoked );
-
- puts( "Init: pthread_key_create - EAGAIN (too many keys)" );
- status = pthread_key_create( &Key_id, Key_destructor );
- assert( status == EAGAIN );
-
- puts( "Init: pthread_setspecific - EINVAL (invalid key)" );
- status = pthread_setspecific( -1, &Data_array[ 0 ] );
- assert( status == EINVAL );
-
- puts( "Init: pthread_getspecific - EINVAL (invalid key)" );
- key_data = pthread_getspecific( -1 );
- assert( !key_data );
-
- puts( "Init: pthread_key_delete - EINVAL (invalid key)" );
- status = pthread_key_delete( -1 );
- assert( status == EINVAL );
-
- printf( "Init: Setting the key to %d\n", 0 );
- status = pthread_setspecific( Key_id, &Data_array[ 0 ] );
- if ( status )
- printf( "status = %d\n", status );
- assert( !status );
-
- /* switch to task 1 */
-
- key_data = pthread_getspecific( Key_id );
- printf( "Init: Got the key value of %ld\n",
- (unsigned long) ((rtems_unsigned32 *)key_data - Data_array) );
-
- remaining = sleep( 3 );
- if ( remaining )
- printf( "seconds remaining = %d\n", remaining );
- assert( !remaining );
-
- /* switch to task 1 */
-
- /* delete the key */
-
- puts( "Init: pthread_key_delete - SUCCESSFUL" );
- status = pthread_key_delete( Key_id );
- if ( status )
- printf( "status = %d\n", status );
- assert( !status );
-
- printf( "Destructor invoked %d times\n", Destructor_invoked );
-
- puts( "*** END OF POSIX TEST 6 ***" );
- exit( 0 );
-
- return NULL; /* just so the compiler thinks we returned something */
-}
diff --git a/testsuites/psxtests/psx06/psx06.scn b/testsuites/psxtests/psx06/psx06.scn
deleted file mode 100644
index ca50710ed2..0000000000
--- a/testsuites/psxtests/psx06/psx06.scn
+++ /dev/null
@@ -1,20 +0,0 @@
-*** POSIX TEST 6 ***
-Init's ID is 0x0c010001
-Init: pthread_key_create - SUCCESSFUL
-Destructor invoked 0 times
-Init: pthread_key_create - EAGAIN (too many keys)
-Init: pthread_setspecific - EINVAL (invalid key)
-Init: pthread_getspecific - EINVAL (invalid key)
-Init: pthread_key_delete - EINVAL (invalid key)
-Init: Setting the key to 0
-Init: Got the key value of 0
-Task_1: Setting the key to 1
-Task_1: Got the key value of 1
-Task_1: exitting
-Destructor invoked 4 times
-Task_2: Setting the key to 2
-Task_2: Got the key value of 2
-Task2: exitting
-Init: pthread_key_delete - SUCCESSFUL
-Destructor invoked 5 times
-*** END OF POSIX TEST 6 ***
diff --git a/testsuites/psxtests/psx06/system.h b/testsuites/psxtests/psx06/system.h
deleted file mode 100644
index de939d0c76..0000000000
--- a/testsuites/psxtests/psx06/system.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-/* functions */
-
-#include <pmacros.h>
-
-void *POSIX_Init(
- void *argument
-);
-
-void *Task_1(
- void *argument
-);
-
-void *Task_2(
- void *argument
-);
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 1
-
-#include <confdefs.h>
-
-/* global variables */
-
-#ifdef CONFIGURE_INIT
-#define TEST_EXTERN
-#else
-#define TEST_EXTERN extern
-#endif
-
-TEST_EXTERN pthread_t Init_id;
-TEST_EXTERN pthread_t Task_id;
-TEST_EXTERN pthread_t Task2_id;
-TEST_EXTERN pthread_key_t Key_id;
-TEST_EXTERN rtems_unsigned32 Data_array[ CONFIGURE_MAXIMUM_POSIX_THREADS ];
-TEST_EXTERN rtems_unsigned32 Destructor_invoked;
-
-/* end of include file */
diff --git a/testsuites/psxtests/psx06/task.c b/testsuites/psxtests/psx06/task.c
deleted file mode 100644
index 99fcf2f859..0000000000
--- a/testsuites/psxtests/psx06/task.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/* Task_1
- *
- * This routine serves as a test task. It verifies the basic task
- * switching capabilities of the executive.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-#include <errno.h>
-
-void *Task_1(
- void *argument
-)
-{
- int status;
- rtems_unsigned32 *key_data;
-
- printf( "Task_1: Setting the key to %d\n", 1 );
- status = pthread_setspecific( Key_id, &Data_array[ 1 ] );
- if ( status )
- printf( "status = %d\n", status );
- assert( !status );
-
- key_data = pthread_getspecific( Key_id );
- printf( "Task_1: Got the key value of %ld\n",
- (unsigned long) ((rtems_unsigned32 *)key_data - Data_array) );
- if ( status )
- printf( "status = %d\n", status );
- assert( !status );
-
- puts( "Task_1: exitting" );
- pthread_exit( NULL );
-
- /* switch to task 2 */
-
- return NULL; /* just so the compiler thinks we returned something */
-}
diff --git a/testsuites/psxtests/psx06/task2.c b/testsuites/psxtests/psx06/task2.c
deleted file mode 100644
index af6c1d4b6d..0000000000
--- a/testsuites/psxtests/psx06/task2.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Task_2
- *
- * This routine serves as a test task.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-#include <errno.h>
-
-void *Task_2(
- void *argument
-)
-{
- int status;
- rtems_unsigned32 *key_data;
-
- printf( "Destructor invoked %d times\n", Destructor_invoked );
-
- printf( "Task_2: Setting the key to %d\n", 2 );
- status = pthread_setspecific( Key_id, &Data_array[ 2 ] );
- if ( status )
- printf( "status = %d\n", status );
- assert( !status );
-
- key_data = pthread_getspecific( Key_id );
- printf( "Task_2: Got the key value of %ld\n",
- (unsigned long) ((rtems_unsigned32 *)key_data - Data_array) );
- if ( status )
- printf( "status = %d\n", status );
- assert( !status );
-
- puts( "Task2: exitting" );
- pthread_exit( NULL );
-
- /* switch to init task */
-
- return NULL; /* just so the compiler thinks we returned something */
-}
diff --git a/testsuites/psxtests/psx07/Makefile.am b/testsuites/psxtests/psx07/Makefile.am
deleted file mode 100644
index 979eb01209..0000000000
--- a/testsuites/psxtests/psx07/Makefile.am
+++ /dev/null
@@ -1,43 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = psx07
-
-MANAGERS = all
-
-C_FILES = init.c task.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/psxtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CPPFLAGS = -I$(top_srcdir)/include
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/psxtests/psx07/init.c b/testsuites/psxtests/psx07/init.c
deleted file mode 100644
index 59a2e93174..0000000000
--- a/testsuites/psxtests/psx07/init.c
+++ /dev/null
@@ -1,492 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define CONFIGURE_INIT
-#include "system.h"
-#include <errno.h>
-
-void print_schedparam(
- char *prefix,
- struct sched_param *schedparam
-)
-{
- printf( "%ssched priority = %d\n", prefix, schedparam->sched_priority );
-#if defined(_POSIX_SPORADIC_SERVER)
- printf( "%sss_low_priority = %d\n", prefix, schedparam->ss_low_priority );
- printf( "%sss_replenish_period = (%ld, %ld)\n", prefix,
- schedparam->ss_replenish_period.tv_sec,
- schedparam->ss_replenish_period.tv_nsec );
- printf( "%sss_initial_budget = (%ld, %ld)\n", prefix,
- schedparam->ss_initial_budget.tv_sec,
- schedparam->ss_initial_budget.tv_nsec );
-#else
- printf( "%s_POSIX_SPORADIC_SERVER is not defined\n" );
-#endif
-}
-
-void *POSIX_Init(
- void *argument
-)
-{
- int status;
- int scope;
- int inheritsched;
- int schedpolicy;
- size_t stacksize;
- void *stackaddr;
- int detachstate;
- struct sched_param schedparam;
- pthread_attr_t attr;
- pthread_attr_t destroyed_attr;
-
- puts( "\n\n*** POSIX TEST 7 ***" );
-
- /* set the time of day, and print our buffer in multiple ways */
-
- set_time( TM_FRIDAY, TM_MAY, 24, 96, 11, 5, 0 );
-
- /* get id of this thread */
-
- Init_id = pthread_self();
- printf( "Init's ID is 0x%08x\n", Init_id );
-
- /* exercise init and destroy */
-
- puts( "Init: pthread_attr_init - EINVAL (NULL attr)" );
- status = pthread_attr_init( NULL );
- assert( status == EINVAL );
-
- puts( "Init: pthread_attr_init - SUCCESSFUL" );
- status = pthread_attr_init( &attr );
- assert( !status );
-
- puts( "Init: initialize and destroy an attribute - SUCCESSFUL" );
- status = pthread_attr_init( &destroyed_attr );
- assert( !status );
-
- status = pthread_attr_destroy( &destroyed_attr );
- assert( !status );
-
- puts( "Init: pthread_attr_destroy - EINVAL (NULL attr)" );
- status = pthread_attr_destroy( NULL );
- assert( status == EINVAL );
-
- puts( "Init: pthread_attr_destroy - EINVAL (not initialized)" );
- status = pthread_attr_destroy( &destroyed_attr );
- assert( status == EINVAL );
-
- /* check some errors in pthread_create */
-
- puts( "Init: pthread_create - EINVAL (attr not initialized)" );
- status = pthread_create( &Task_id, &destroyed_attr, Task_1, NULL );
- assert( status == EINVAL );
-
- /* junk stack address */
- status = pthread_attr_setstackaddr( &attr, (void *)&schedparam );
- assert( !status );
-
- /* must go around pthread_attr_setstacksize to set a bad stack size */
- attr.stacksize = 0;
-
- puts( "Init: pthread_create - EINVAL (stacksize too small)" );
- status = pthread_create( &Task_id, &attr, Task_1, NULL );
- assert( status == EINVAL );
-
- /* reset all the fields */
- status = pthread_attr_init( &attr );
- assert( !status );
-
- attr.stacksize = rtems_configuration_get_work_space_size() * 10;
- puts( "Init: pthread_create - EAGAIN (stacksize too large)" );
- status = pthread_create( &Task_id, &attr, Task_1, NULL );
- assert( status == EAGAIN );
-
- status = pthread_attr_init( &attr );
- assert( !status );
-
- /* must go around pthread_attr_set routines to set a bad value */
- attr.inheritsched = -1;
-
- puts( "Init: pthread_create - EINVAL (invalid inherit scheduler)" );
- status = pthread_create( &Task_id, &attr, Task_1, NULL );
- assert( status == EINVAL );
-
- /* check out the error case for system scope not supported */
-
- status = pthread_attr_init( &attr );
- assert( !status );
-
- /* must go around pthread_attr_set routines to set a bad value */
- attr.contentionscope = PTHREAD_SCOPE_SYSTEM;
-
- puts( "Init: pthread_create - ENOTSUP (unsupported system contention scope)" );
- status = pthread_create( &Task_id, &attr, Task_1, NULL );
- assert( status == ENOTSUP );
-
- status = pthread_attr_init( &attr );
- assert( !status );
-
- /* now check out pthread_create for inherit scheduler */
-
- status = pthread_attr_setinheritsched( &attr, PTHREAD_INHERIT_SCHED );
- assert( !status );
-
- puts( "Init: pthread_create - SUCCESSFUL (inherit scheduler)" );
- status = pthread_create( &Task_id, &attr, Task_1, NULL );
- assert( !status );
-
- status = pthread_join( Task_id, NULL );
- assert( !status );
-
- /* switch to Task_1 */
-
- /* exercise get and set scope */
-
- empty_line();
-
- status = pthread_attr_init( &attr );
- assert( !status );
-
- puts( "Init: pthread_attr_setscope - EINVAL (NULL attr)" );
- status = pthread_attr_setscope( NULL, PTHREAD_SCOPE_PROCESS );
- assert( status == EINVAL );
-
- puts( "Init: pthread_attr_setscope - ENOTSUP" );
- status = pthread_attr_setscope( &attr, PTHREAD_SCOPE_SYSTEM );
- assert( status == ENOTSUP );
-
- puts( "Init: pthread_attr_setscope - EINVAL (not initialized attr)" );
- status = pthread_attr_setscope( &destroyed_attr, PTHREAD_SCOPE_PROCESS );
- assert( status == EINVAL );
-
- puts( "Init: pthread_attr_setscope - EINVAL (invalid scope)" );
- status = pthread_attr_setscope( &attr, -1 );
- assert( status == EINVAL );
-
- puts( "Init: pthread_attr_setscope - SUCCESSFUL" );
- status = pthread_attr_setscope( &attr, PTHREAD_SCOPE_PROCESS );
- assert( !status );
-
- puts( "Init: pthread_attr_getscope - EINVAL (NULL attr)" );
- status = pthread_attr_getscope( NULL, &scope );
- assert( status == EINVAL );
-
- puts( "Init: pthread_attr_getscope - EINVAL (NULL scope)" );
- status = pthread_attr_getscope( &attr, NULL );
- assert( status == EINVAL );
-
- puts( "Init: pthread_attr_getscope - EINVAL (not initialized attr)" );
- status = pthread_attr_getscope( &destroyed_attr, &scope );
- assert( status == EINVAL );
-
- puts( "Init: pthread_attr_getscope - SUCCESSFUL" );
- status = pthread_attr_getscope( &attr, &scope );
- assert( !status );
- printf( "Init: current scope attribute = %d\n", scope );
-
- /* exercise get and set inherit scheduler */
-
- empty_line();
-
- puts( "Init: pthread_attr_setinheritsched - EINVAL (NULL attr)" );
- status = pthread_attr_setinheritsched( NULL, PTHREAD_INHERIT_SCHED );
- assert( status == EINVAL );
-
- puts( "Init: pthread_attr_setinheritsched - EINVAL (not initialized attr)" );
- status =
- pthread_attr_setinheritsched( &destroyed_attr, PTHREAD_INHERIT_SCHED );
- assert( status == EINVAL );
-
- puts( "Init: pthread_attr_setinheritsched - ENOTSUP (invalid inheritsched)" );
- status = pthread_attr_setinheritsched( &attr, -1 );
- assert( status == ENOTSUP );
-
- puts( "Init: pthread_attr_setinheritsched - SUCCESSFUL" );
- status = pthread_attr_setinheritsched( &attr, PTHREAD_INHERIT_SCHED );
- assert( !status );
-
- puts( "Init: pthread_attr_getinheritsched - EINVAL (NULL attr)" );
- status = pthread_attr_getinheritsched( NULL, &inheritsched );
- assert( status == EINVAL );
-
- puts( "Init: pthread_attr_getinheritsched - EINVAL (NULL inheritsched)" );
- status = pthread_attr_getinheritsched( &attr, NULL );
- assert( status == EINVAL );
-
- puts( "Init: pthread_attr_getinheritsched - EINVAL (not initialized attr)" );
- status = pthread_attr_getinheritsched( &destroyed_attr, &inheritsched );
- assert( status == EINVAL );
-
- puts( "Init: pthread_attr_getinheritsched - SUCCESSFUL" );
- status = pthread_attr_getinheritsched( &attr, &inheritsched );
- assert( !status );
- printf( "Init: current inherit scheduler attribute = %d\n", inheritsched );
-
- /* exercise get and set inherit scheduler */
-
- empty_line();
-
- puts( "Init: pthread_attr_setschedpolicy - EINVAL (NULL attr)" );
- status = pthread_attr_setschedpolicy( NULL, SCHED_FIFO );
- assert( status == EINVAL );
-
- puts( "Init: pthread_attr_setschedpolicy - EINVAL (not initialized attr)" );
- status =
- pthread_attr_setschedpolicy( &destroyed_attr, SCHED_OTHER );
- assert( status == EINVAL );
-
- puts( "Init: pthread_attr_setschedpolicy - ENOTSUP (invalid schedpolicy)" );
- status = pthread_attr_setschedpolicy( &attr, -1 );
- assert( status == ENOTSUP );
-
- puts( "Init: pthread_attr_setschedpolicy - SUCCESSFUL" );
- status = pthread_attr_setschedpolicy( &attr, SCHED_RR );
- assert( !status );
-
- puts( "Init: pthread_attr_getschedpolicy - EINVAL (NULL attr)" );
- status = pthread_attr_getschedpolicy( NULL, &schedpolicy );
- assert( status == EINVAL );
-
- puts( "Init: pthread_attr_getschedpolicy - EINVAL (NULL schedpolicy)" );
- status = pthread_attr_getschedpolicy( &attr, NULL );
- assert( status == EINVAL );
-
- puts( "Init: pthread_attr_getschedpolicy - EINVAL (not initialized attr)" );
- status = pthread_attr_getschedpolicy( &destroyed_attr, &schedpolicy );
- assert( status == EINVAL );
-
- puts( "Init: pthread_attr_getschedpolicy - SUCCESSFUL" );
- status = pthread_attr_getschedpolicy( &attr, &schedpolicy );
- assert( !status );
- printf( "Init: current scheduler policy attribute = %d\n", schedpolicy );
-
- /* exercise get and set stack size */
-
- empty_line();
-
- puts( "Init: pthread_attr_setstacksize - EINVAL (NULL attr)" );
- status = pthread_attr_setstacksize( NULL, 0 );
- assert( status == EINVAL );
-
- puts( "Init: pthread_attr_setstacksize - EINVAL (not initialized attr)" );
- status =
- pthread_attr_setstacksize( &destroyed_attr, 0 );
- assert( status == EINVAL );
-
- puts( "Init: pthread_attr_setstacksize - SUCCESSFUL (low stacksize)" );
- status = pthread_attr_setstacksize( &attr, 0 );
- assert( !status );
-
- puts( "Init: pthread_attr_setstacksize - SUCCESSFUL (high stacksize)" );
- status = pthread_attr_setstacksize( &attr, STACK_MINIMUM_SIZE * 2 );
- assert( !status );
-
- puts( "Init: pthread_attr_getstacksize - EINVAL (NULL attr)" );
- status = pthread_attr_getstacksize( NULL, &stacksize );
- assert( status == EINVAL );
-
- puts( "Init: pthread_attr_getstacksize - EINVAL (NULL stacksize)" );
- status = pthread_attr_getstacksize( &attr, NULL );
- assert( status == EINVAL );
-
- puts( "Init: pthread_attr_getstacksize - EINVAL (not initialized attr)" );
- status = pthread_attr_getstacksize( &destroyed_attr, &stacksize );
- assert( status == EINVAL );
-
- puts( "Init: pthread_attr_getstacksize - SUCCESSFUL" );
- status = pthread_attr_getstacksize( &attr, &stacksize );
- assert( !status );
- printf( "Init: current stack size attribute = %ld\n", (long) stacksize );
-
- /* exercise get and set stack address */
-
- empty_line();
-
- puts( "Init: pthread_attr_setstackaddr - EINVAL (NULL attr)" );
- status = pthread_attr_setstackaddr( NULL, NULL );
- assert( status == EINVAL );
-
- puts( "Init: pthread_attr_setstackaddr - EINVAL (not initialized attr)" );
- status =
- pthread_attr_setstackaddr( &destroyed_attr, NULL );
- assert( status == EINVAL );
-
- puts( "Init: pthread_attr_setstackaddr - SUCCESSFUL" );
- status = pthread_attr_setstackaddr( &attr, 0 );
- assert( !status );
-
- puts( "Init: pthread_attr_getstackaddr - EINVAL (NULL attr)" );
- status = pthread_attr_getstackaddr( NULL, &stackaddr );
- assert( status == EINVAL );
-
- puts( "Init: pthread_attr_getstackaddr - EINVAL (NULL stackaddr)" );
- status = pthread_attr_getstackaddr( &attr, NULL );
- assert( status == EINVAL );
-
- puts( "Init: pthread_attr_getstackaddr - EINVAL (not initialized attr)" );
- status = pthread_attr_getstackaddr( &destroyed_attr, &stackaddr );
- assert( status == EINVAL );
-
- puts( "Init: pthread_attr_getstackaddr - SUCCESSFUL" );
- status = pthread_attr_getstackaddr( &attr, &stackaddr );
- assert( !status );
- printf( "Init: current stack address attribute = %p\n", stackaddr );
-
- /* exercise get and set detach state */
-
- empty_line();
-
- puts( "Init: pthread_attr_setdetachstate - EINVAL (NULL attr)" );
- status = pthread_attr_setdetachstate( NULL, PTHREAD_CREATE_DETACHED );
- assert( status == EINVAL );
-
- puts( "Init: pthread_attr_setdetachstate - EINVAL (not initialized attr)" );
- status =
- pthread_attr_setdetachstate( &destroyed_attr, PTHREAD_CREATE_JOINABLE );
- assert( status == EINVAL );
-
- puts( "Init: pthread_attr_setdetachstate - EINVAL (invalid detachstate)" );
- status = pthread_attr_setdetachstate( &attr, -1 );
- assert( status == EINVAL );
-
- puts( "Init: pthread_attr_setdetachstate - SUCCESSFUL" );
- status = pthread_attr_setdetachstate( &attr, PTHREAD_CREATE_JOINABLE );
- assert( !status );
-
- puts( "Init: pthread_attr_getdetachstate - EINVAL (NULL attr)" );
- status = pthread_attr_getdetachstate( NULL, &detachstate );
- assert( status == EINVAL );
-
- puts( "Init: pthread_attr_getdetachstate - EINVAL (NULL detatchstate)" );
- status = pthread_attr_getdetachstate( &attr, NULL );
- assert( status == EINVAL );
-
- puts( "Init: pthread_attr_getdetachstate - EINVAL (not initialized attr)" );
- status = pthread_attr_getdetachstate( &destroyed_attr, &detachstate );
- assert( status == EINVAL );
-
- puts( "Init: pthread_attr_getdetachstate - SUCCESSFUL" );
- status = pthread_attr_getdetachstate( &attr, &detachstate );
- assert( !status );
- printf( "Init: current detach state attribute = %d\n", detachstate );
-
- /* exercise get and set scheduling parameters */
-
- empty_line();
-
- puts( "Init: pthread_attr_getschedparam - SUCCESSFUL" );
- status = pthread_attr_getschedparam( &attr, &schedparam );
- assert( !status );
-
- print_schedparam( "Init: ", &schedparam );
-
- puts( "Init: pthread_attr_setschedparam - EINVAL (NULL attr)" );
- status = pthread_attr_setschedparam( NULL, &schedparam );
- assert( status == EINVAL );
-
- puts( "Init: pthread_attr_setschedparam - EINVAL (not initialized attr)" );
- status = pthread_attr_setschedparam( &destroyed_attr, &schedparam );
- assert( status == EINVAL );
-
- puts( "Init: pthread_attr_setschedparam - EINVAL (NULL schedparam)" );
- status = pthread_attr_setschedparam( &attr, NULL );
- assert( status == EINVAL );
-
- puts( "Init: pthread_attr_setschedparam - SUCCESSFUL" );
- status = pthread_attr_setschedparam( &attr, &schedparam );
- assert( !status );
-
- puts( "Init: pthread_attr_getschedparam - EINVAL (NULL attr)" );
- status = pthread_attr_getschedparam( NULL, &schedparam );
- assert( status == EINVAL );
-
- puts( "Init: pthread_attr_getschedparam - EINVAL (not initialized attr)" );
- status = pthread_attr_getschedparam( &destroyed_attr, &schedparam );
- assert( status == EINVAL );
-
- puts( "Init: pthread_attr_getschedparam - EINVAL (NULL schedparam)" );
- status = pthread_attr_getschedparam( &attr, NULL );
- assert( status == EINVAL );
-
- /* exercise pthread_getschedparam */
-
- empty_line();
-
- puts( "Init: pthread_getschedparam - EINVAL (NULL policy)" );
- status = pthread_getschedparam( pthread_self(), NULL, &schedparam );
- assert( status == EINVAL );
-
- puts( "Init: pthread_getschedparam - EINVAL (NULL schedparam)" );
- status = pthread_getschedparam( pthread_self(), &schedpolicy, NULL );
- assert( status == EINVAL );
-
- puts( "Init: pthread_getschedparam - ESRCH (bad thread)" );
- status = pthread_getschedparam( -1, &schedpolicy, &schedparam );
- assert( status == ESRCH );
-
- puts( "Init: pthread_getschedparam - SUCCESSFUL" );
- status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
- assert( !status );
-
- printf( "Init: policy = %d\n", schedpolicy );
-
- print_schedparam( "Init: ", &schedparam );
-
- /* exercise pthread_setschedparam */
-
- empty_line();
-
- puts( "Init: pthread_setschedparam - EINVAL (NULL schedparam)" );
- status = pthread_setschedparam( pthread_self(), SCHED_OTHER, NULL );
- assert( status == EINVAL );
-
- schedparam.sched_priority = -1;
-
- puts( "Init: pthread_setschedparam - EINVAL (invalid priority)" );
- status = pthread_setschedparam( pthread_self(), SCHED_OTHER, NULL );
- assert( status == EINVAL );
-
- schedparam.sched_priority = 128;
-
- puts( "Init: pthread_setschedparam - EINVAL (invalid policy)" );
- status = pthread_setschedparam( pthread_self(), -1, &schedparam );
- assert( status == EINVAL );
-
- puts( "Init: pthread_setschedparam - ESRCH (invalid thread)" );
- status = pthread_setschedparam( -1, SCHED_OTHER, &schedparam );
- assert( status == ESRCH );
-
- /* now get sporadic server errors */
-
- schedparam.ss_replenish_period.tv_sec = 1;
- schedparam.ss_replenish_period.tv_nsec = 0;
- schedparam.ss_initial_budget.tv_sec = 1;
- schedparam.ss_initial_budget.tv_nsec = 1;
-
- puts( "Init: pthread_setschedparam - EINVAL (replenish < budget)" );
- status = pthread_setschedparam( pthread_self(), SCHED_SPORADIC, &schedparam );
- assert( status == EINVAL );
-
- schedparam.ss_replenish_period.tv_sec = 2;
- schedparam.ss_replenish_period.tv_nsec = 0;
- schedparam.ss_initial_budget.tv_sec = 1;
- schedparam.ss_initial_budget.tv_nsec = 0;
- schedparam.ss_low_priority = -1;
-
- puts( "Init: pthread_setschedparam - EINVAL (invalid priority)" );
- status = pthread_setschedparam( pthread_self(), SCHED_SPORADIC, &schedparam );
- assert( status == EINVAL );
-
- puts( "*** END OF POSIX TEST 7 ***" );
- exit( 0 );
-
- return NULL; /* just so the compiler thinks we returned something */
-}
diff --git a/testsuites/psxtests/psx07/psx07.scn b/testsuites/psxtests/psx07/psx07.scn
deleted file mode 100644
index c8964694e2..0000000000
--- a/testsuites/psxtests/psx07/psx07.scn
+++ /dev/null
@@ -1,96 +0,0 @@
-*** POSIX TEST 7 ***
-Init's ID is 0x0c010001
-Init: pthread_attr_init - EINVAL (NULL attr)
-Init: pthread_attr_init - SUCCESSFUL
-Init: initialize and destroy an attribute - SUCCESSFUL
-Init: pthread_attr_destroy - EINVAL (NULL attr)
-Init: pthread_attr_destroy - EINVAL (not initialized)
-Init: pthread_create - EINVAL (attr not initialized)
-Init: pthread_create - EINVAL (stacksize too small)
-Init: pthread_create - EAGAIN (stacksize too large)
-Init: pthread_create - EINVAL (invalid inherit scheduler)
-Init: pthread_create - ENOTSUP (unsupported system contention scope)
-Init: pthread_create - SUCCESSFUL (inherit scheduler)
-Task_1: exitting
-Init: pthread_attr_setscope - EINVAL (NULL attr)
-Init: pthread_attr_setscope - ENOTSUP
-Init: pthread_attr_setscope - EINVAL (not initialized attr)
-Init: pthread_attr_setscope - EINVAL (invalid scope)
-Init: pthread_attr_setscope - SUCCESSFUL
-Init: pthread_attr_getscope - EINVAL (NULL attr)
-Init: pthread_attr_getscope - EINVAL (NULL scope)
-Init: pthread_attr_getscope - EINVAL (not initialized attr)
-Init: pthread_attr_getscope - SUCCESSFUL
-Init: current scope attribute = 0
-Init: pthread_attr_setinheritsched - EINVAL (NULL attr)
-Init: pthread_attr_setinheritsched - EINVAL (not initialized attr)
-Init: pthread_attr_setinheritsched - ENOTSUP (invalid inheritsched)
-Init: pthread_attr_setinheritsched - SUCCESSFUL
-Init: pthread_attr_getinheritsched - EINVAL (NULL attr)
-Init: pthread_attr_getinheritsched - EINVAL (NULL inheritsched)
-Init: pthread_attr_getinheritsched - EINVAL (not initialized attr)
-Init: pthread_attr_getinheritsched - SUCCESSFUL
-Init: current inherit scheduler attribute = 1
-Init: pthread_attr_setschedpolicy - EINVAL (NULL attr)
-Init: pthread_attr_setschedpolicy - EINVAL (not initialized attr)
-Init: pthread_attr_setschedpolicy - ENOTSUP (invalid schedpolicy)
-Init: pthread_attr_setschedpolicy - SUCCESSFUL
-Init: pthread_attr_getschedpolicy - EINVAL (NULL attr)
-Init: pthread_attr_getschedpolicy - EINVAL (NULL schedpolicy)
-Init: pthread_attr_getschedpolicy - EINVAL (not initialized attr)
-Init: pthread_attr_getschedpolicy - SUCCESSFUL
-Init: current scheduler policy attribute = 2
-Init: pthread_attr_setstacksize - EINVAL (NULL attr)
-Init: pthread_attr_setstacksize - EINVAL (not initialized attr)
-Init: pthread_attr_setstacksize - SUCCESSFUL (low stacksize)
-Init: pthread_attr_setstacksize - SUCCESSFUL (high stacksize)
-Init: pthread_attr_getstacksize - EINVAL (NULL attr)
-Init: pthread_attr_getstacksize - EINVAL (NULL stacksize)
-Init: pthread_attr_getstacksize - EINVAL (not initialized attr)
-Init: pthread_attr_getstacksize - SUCCESSFUL
-Init: current stack size attribute = 5120
-Init: pthread_attr_setstackaddr - EINVAL (NULL attr)
-Init: pthread_attr_setstackaddr - EINVAL (not initialized attr)
-Init: pthread_attr_setstackaddr - SUCCESSFUL
-Init: pthread_attr_getstackaddr - EINVAL (NULL attr)
-Init: pthread_attr_getstackaddr - EINVAL (NULL stackaddr)
-Init: pthread_attr_getstackaddr - EINVAL (not initialized attr)
-Init: pthread_attr_getstackaddr - SUCCESSFUL
-Init: current stack address attribute = 0x0
-Init: pthread_attr_setdetachstate - EINVAL (NULL attr)
-Init: pthread_attr_setdetachstate - EINVAL (not initialized attr)
-Init: pthread_attr_setdetachstate - EINVAL (invalid detachstate)
-Init: pthread_attr_setdetachstate - SUCCESSFUL
-Init: pthread_attr_getdetachstate - EINVAL (NULL attr)
-Init: pthread_attr_getdetachstate - EINVAL (NULL detatchstate)
-Init: pthread_attr_getdetachstate - EINVAL (not initialized attr)
-Init: pthread_attr_getdetachstate - SUCCESSFUL
-Init: current detach state attribute = 1
-Init: pthread_attr_getschedparam - SUCCESSFUL
-Init: sched priority = 2
-Init: ss_low_priority = 0
-Init: ss_replenish_period = (0, 0)
-Init: ss_initial_budget = (0, 0)
-Init: pthread_attr_setschedparam - EINVAL (NULL attr)
-Init: pthread_attr_setschedparam - EINVAL (not initialized attr)
-Init: pthread_attr_setschedparam - EINVAL (NULL schedparam)
-Init: pthread_attr_setschedparam - SUCCESSFUL
-Init: pthread_attr_getschedparam - EINVAL (NULL attr)
-Init: pthread_attr_getschedparam - EINVAL (not initialized attr)
-Init: pthread_attr_getschedparam - EINVAL (NULL schedparam)
-Init: pthread_getschedparam - EINVAL (NULL policy)
-Init: pthread_getschedparam - EINVAL (NULL schedparam)
-Init: pthread_getschedparam - ESRCH (bad thread)
-Init: pthread_getschedparam - SUCCESSFUL
-Init: policy = 1
-Init: sched priority = 2
-Init: ss_low_priority = 0
-Init: ss_replenish_period = (0, 0)
-Init: ss_initial_budget = (0, 0)
-Init: pthread_setschedparam - EINVAL (NULL schedparam)
-Init: pthread_setschedparam - EINVAL (invalid priority)
-Init: pthread_setschedparam - EINVAL (invalid policy)
-Init: pthread_setschedparam - ESRCH (invalid thread)
-Init: pthread_setschedparam - EINVAL (replenish < budget)
-Init: pthread_setschedparam - EINVAL (invalid priority)
-*** END OF POSIX TEST 7 ***
diff --git a/testsuites/psxtests/psx07/system.h b/testsuites/psxtests/psx07/system.h
deleted file mode 100644
index 0b5f3022c8..0000000000
--- a/testsuites/psxtests/psx07/system.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-/* functions */
-
-#include <pmacros.h>
-
-void *POSIX_Init(
- void *argument
-);
-
-void *Task_1(
- void *argument
-);
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#include <confdefs.h>
-
-/* global variables */
-
-#ifdef CONFIGURE_INIT
-#define TEST_EXTERN
-#else
-#define TEST_EXTERN extern
-#endif
-
-TEST_EXTERN pthread_t Init_id;
-TEST_EXTERN pthread_t Task_id;
-
-/* end of include file */
diff --git a/testsuites/psxtests/psx07/task.c b/testsuites/psxtests/psx07/task.c
deleted file mode 100644
index 8f04b1285f..0000000000
--- a/testsuites/psxtests/psx07/task.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Task_1
- *
- * This routine serves as a test task. It verifies the basic task
- * switching capabilities of the executive.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-#include <time.h>
-#include <sched.h>
-
-void *Task_1(
- void *argument
-)
-{
- puts( "Task_1: exitting" );
- pthread_exit( NULL );
-
- return NULL; /* just so the compiler thinks we returned something */
-}
diff --git a/testsuites/psxtests/psx08/Makefile.am b/testsuites/psxtests/psx08/Makefile.am
deleted file mode 100644
index e4cafdadcf..0000000000
--- a/testsuites/psxtests/psx08/Makefile.am
+++ /dev/null
@@ -1,43 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = psx08
-
-MANAGERS = all
-
-C_FILES = init.c task1.c task2.c task3.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/psxtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CPPFLAGS = -I$(top_srcdir)/include
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/psxtests/psx08/init.c b/testsuites/psxtests/psx08/init.c
deleted file mode 100644
index ae478f8a86..0000000000
--- a/testsuites/psxtests/psx08/init.c
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define CONFIGURE_INIT
-#include "system.h"
-#include <errno.h>
-
-void *POSIX_Init(
- void *argument
-)
-{
- int status;
- void *return_pointer;
-
- puts( "\n\n*** POSIX TEST 8 ***" );
-
- /* set the time of day, and print our buffer in multiple ways */
-
- set_time( TM_FRIDAY, TM_MAY, 24, 96, 11, 5, 0 );
-
- /* get id of this thread */
-
- Init_id = pthread_self();
- printf( "Init's ID is 0x%08x\n", Init_id );
-
- puts( "Init: pthread_detach - ESRCH (invalid id)" );
- status = pthread_detach( -1 );
- assert( status == ESRCH );
-
- /* detach this thread */
-
- puts( "Init: pthread_detach self" );
- status = pthread_detach( pthread_self() );
- assert( !status );
-
- /* create thread */
-
- status = pthread_create( &Task1_id, NULL, Task_1, NULL );
- assert( !status );
-
- puts( "Init: pthread_join - ESRCH (invalid id)" );
- status = pthread_join( -1, &return_pointer );
- assert( status == ESRCH );
-
- puts( "Init: pthread_join - SUCCESSFUL" );
- status = pthread_join( Task1_id, &return_pointer );
-
- puts( "Init: returned from pthread_join through return" );
- if ( status )
- printf( "status = %d\n", status );
- assert( !status );
-
- if ( return_pointer == &Task1_id )
- puts( "Init: pthread_join returned correct pointer" );
- else
- printf(
- "Init: pthread_join returned incorrect pointer (%p != %p)\n",
- return_pointer,
- &Task1_id
- );
-
- puts( "Init: creating two pthreads" );
- status = pthread_create( &Task2_id, NULL, Task_2, NULL );
- assert( !status );
-
- status = pthread_create( &Task3_id, NULL, Task_3, NULL );
- assert( !status );
-
- puts( "Init: pthread_join - SUCCESSFUL" );
- status = pthread_join( Task2_id, &return_pointer );
- /* assert is below comment */
-
- puts( "Init: returned from pthread_join through pthread_exit" );
- if ( status )
- printf( "status = %d\n", status );
- assert( !status );
-
- if ( return_pointer == &Task2_id )
- puts( "Init: pthread_join returned correct pointer" );
- else
- printf(
- "Init: pthread_join returned incorrect pointer (%p != %p)\n",
- return_pointer,
- &Task2_id
- );
-
- puts( "Init: exitting" );
- return NULL;
-}
diff --git a/testsuites/psxtests/psx08/psx08.scn b/testsuites/psxtests/psx08/psx08.scn
deleted file mode 100644
index 8629b610f2..0000000000
--- a/testsuites/psxtests/psx08/psx08.scn
+++ /dev/null
@@ -1,22 +0,0 @@
-*** POSIX TEST 8 ***
-Init's ID is 0x0c010001
-Init: pthread_detach - ESRCH (invalid id)
-Init: pthread_detach self
-Init: pthread_join - ESRCH (invalid id)
-Init: pthread_join - SUCCESSFUL
-Task_1: exitting
-Init: returned from pthread_join through return
-Init: pthread_join returned correct pointer
-Init: creating two pthreads
-Init: pthread_join - SUCCESSFUL
-Task_2: sleep 1 second
-Task_3: join to Task_2
-Task_2: join to detached task (Init) -- EINVAL
-Task_2: join to self task (Init) -- EDEADLK
-Task_2: exitting
-Init: returned from pthread_join through pthread_exit
-Init: pthread_join returned correct pointer
-Init: exitting
-Task_3: returned from pthread_join
-Task_3: pthread_join returned correct pointer
-*** END OF POSIX TEST 8 ***
diff --git a/testsuites/psxtests/psx08/system.h b/testsuites/psxtests/psx08/system.h
deleted file mode 100644
index 305b20e724..0000000000
--- a/testsuites/psxtests/psx08/system.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-/* functions */
-
-#include <pmacros.h>
-
-void *POSIX_Init(
- void *argument
-);
-
-void *Task_1(
- void *argument
-);
-
-void *Task_2(
- void *argument
-);
-
-void *Task_3(
- void *argument
-);
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#include <confdefs.h>
-
-/* global variables */
-
-#ifdef CONFIGURE_INIT
-#define TEST_EXTERN
-#else
-#define TEST_EXTERN extern
-#endif
-
-TEST_EXTERN pthread_t Init_id;
-TEST_EXTERN pthread_t Task1_id;
-TEST_EXTERN pthread_t Task2_id;
-TEST_EXTERN pthread_t Task3_id;
-
-/* end of include file */
diff --git a/testsuites/psxtests/psx08/task1.c b/testsuites/psxtests/psx08/task1.c
deleted file mode 100644
index e1e37ee67e..0000000000
--- a/testsuites/psxtests/psx08/task1.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Task_1
- *
- * This routine serves as a test task. It verifies the basic task
- * switching capabilities of the executive.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-#include <errno.h>
-
-void *Task_1(
- void *argument
-)
-{
- puts( "Task_1: exitting" );
-
- return( &Task1_id );
-}
diff --git a/testsuites/psxtests/psx08/task2.c b/testsuites/psxtests/psx08/task2.c
deleted file mode 100644
index 08e7dd3f7e..0000000000
--- a/testsuites/psxtests/psx08/task2.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/* Task_2
- *
- * This routine serves as a test task. It verifies the basic task
- * switching capabilities of the executive.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-#include <errno.h>
-
-void *Task_2(
- void *argument
-)
-{
- int status;
-
- puts( "Task_2: sleep 1 second" );
-
- sleep( 1 );
-
- /* switch to task 3 */
-
- puts( "Task_2: join to detached task (Init) -- EINVAL" );
- status = pthread_join( Init_id, NULL );
- if ( status != EINVAL )
- printf( "status = %d\n", status );
- assert( status == EINVAL );
-
- puts( "Task_2: join to self task (Init) -- EDEADLK" );
- status = pthread_join( pthread_self(), NULL );
- if ( status != EDEADLK )
- printf( "status = %d\n", status );
- assert( status == EDEADLK );
-
- puts( "Task_2: exitting" );
-
- pthread_exit( &Task2_id );
-
- /* switch to init task */
-
- return NULL; /* just so the compiler thinks we returned something */
-}
diff --git a/testsuites/psxtests/psx08/task3.c b/testsuites/psxtests/psx08/task3.c
deleted file mode 100644
index 6b0de52f59..0000000000
--- a/testsuites/psxtests/psx08/task3.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Task_3
- *
- * This routine serves as a test task. It verifies the basic task
- * switching capabilities of the executive.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-#include <errno.h>
-
-void *Task_3(
- void *argument
-)
-{
- int status;
- void *return_pointer;
-
- puts( "Task_3: join to Task_2" );
- status = pthread_join( Task2_id, &return_pointer );
- puts( "Task_3: returned from pthread_join" );
- if ( status )
- printf( "status = %d\n", status );
- assert( !status );
-
- if ( return_pointer == &Task2_id )
- puts( "Task_3: pthread_join returned correct pointer" );
- else
- printf(
- "Task_3: pthread_join returned incorrect pointer (%p != %p)\n",
- return_pointer,
- &Task2_id
- );
-
- puts( "*** END OF POSIX TEST 8 ***" );
- exit( 0 );
-
- return NULL; /* just so the compiler thinks we returned something */
-}
diff --git a/testsuites/psxtests/psx09/Makefile.am b/testsuites/psxtests/psx09/Makefile.am
deleted file mode 100644
index 9f8e2ad3d7..0000000000
--- a/testsuites/psxtests/psx09/Makefile.am
+++ /dev/null
@@ -1,43 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = psx09
-
-MANAGERS = all
-
-C_FILES = init.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/psxtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CPPFLAGS = -I$(top_srcdir)/include
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/psxtests/psx09/init.c b/testsuites/psxtests/psx09/init.c
deleted file mode 100644
index 2c5729752a..0000000000
--- a/testsuites/psxtests/psx09/init.c
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define CONFIGURE_INIT
-#include "system.h"
-#include <errno.h>
-
-void print_schedparam(
- char *prefix,
- struct sched_param *schedparam
-)
-{
- printf( "%ssched priority = %d\n", prefix, schedparam->sched_priority );
-#if defined(_POSIX_SPORADIC_SERVER)
- printf( "%sss_low_priority = %d\n", prefix, schedparam->ss_low_priority );
- printf( "%sss_replenish_period = (%ld, %ld)\n", prefix,
- schedparam->ss_replenish_period.tv_sec,
- schedparam->ss_replenish_period.tv_nsec );
- printf( "%sss_initial_budget = (%ld, %ld)\n", prefix,
- schedparam->ss_initial_budget.tv_sec,
- schedparam->ss_initial_budget.tv_nsec );
-#else
- printf( "%s_POSIX_SPORADIC_SERVER is not defined\n" );
-#endif
-}
-
-void *POSIX_Init(
- void *argument
-)
-{
- int status;
- int passes;
- int schedpolicy;
- int priority;
- struct sched_param schedparam;
- char buffer[ 80 ];
- pthread_mutexattr_t attr;
-
- puts( "\n\n*** POSIX TEST 9 ***" );
-
- /* set the time of day, and print our buffer in multiple ways */
-
- set_time( TM_FRIDAY, TM_MAY, 24, 96, 11, 5, 0 );
-
- /* get id of this thread */
-
- Init_id = pthread_self();
- printf( "Init's ID is 0x%08x\n", Init_id );
-
- /* try to use this thread as a sporadic server */
-
- puts( "Init: pthread_getschedparam - SUCCESSFUL" );
- status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
- assert( !status );
-
- priority = schedparam.sched_priority;
- sprintf( buffer, " - current priority = %d", priority );
- print_current_time( "Init: ", buffer );
-
- schedparam.ss_replenish_period.tv_sec = 0;
- schedparam.ss_replenish_period.tv_nsec = 500000000; /* 1/2 second */
- schedparam.ss_initial_budget.tv_sec = 0;
- schedparam.ss_initial_budget.tv_nsec = 250000000; /* 1/4 second */
-
- schedparam.sched_priority = 200;
- schedparam.ss_low_priority = 100;
-
- puts( "Init: pthread_setschedparam - SUCCESSFUL (sporadic server)" );
- status = pthread_setschedparam( pthread_self(), SCHED_SPORADIC, &schedparam );
- assert( !status );
-
- status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
- assert( !status );
-
- priority = schedparam.sched_priority;
- sprintf( buffer, " - new priority = %d", priority );
- print_current_time( "Init: ", buffer );
-
- /* go into a loop consuming CPU time to watch our priority change */
-
- for ( passes=0 ; passes <= 3 ; ) {
- status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
- assert( !status );
-
- if ( priority != schedparam.sched_priority ) {
- priority = schedparam.sched_priority;
- sprintf( buffer, " - new priority = %d", priority );
- print_current_time( "Init: ", buffer );
- passes++;
- }
- }
-
- /* now see if this works if we are holding a priority ceiling mutex */
-
- empty_line();
-
-
- status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
- assert( !status );
-
- schedparam.ss_replenish_period.tv_sec = 0;
- schedparam.ss_replenish_period.tv_nsec = 500000000; /* 1/2 second */
- schedparam.ss_initial_budget.tv_sec = 0;
- schedparam.ss_initial_budget.tv_nsec = 250000000; /* 1/4 second */
-
-#define HIGH_PRIORITY 150
-#define MEDIUM_PRIORITY 131
-#define LOW_PRIORITY 100
-
- schedparam.sched_priority = HIGH_PRIORITY;
- schedparam.ss_low_priority = LOW_PRIORITY;
-
- puts( "Init: pthread_setschedparam - SUCCESSFUL (sporadic server)" );
- status = pthread_setschedparam( pthread_self(), SCHED_SPORADIC, &schedparam );
- assert( !status );
-
- puts( "Init: Initializing mutex attributes for priority ceiling" );
- status = pthread_mutexattr_init( &attr );
- assert( !status );
-
- status = pthread_mutexattr_setprotocol( &attr, PTHREAD_PRIO_PROTECT );
- assert( !status );
-
- status = pthread_mutexattr_setprioceiling( &attr, MEDIUM_PRIORITY );
- assert( !status );
-
- puts( "Init: Creating a mutex" );
- status = pthread_mutex_init( &Mutex_id, &attr );
- if ( status )
- printf( "status = %d\n", status );
- assert( !status );
-
- status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
- assert( !status );
-
- priority = schedparam.sched_priority;
- sprintf( buffer, " - new priority = %d", priority );
- print_current_time( "Init: ", buffer );
-
- /* go into a loop consuming CPU time to watch our priority lower */
-
- for ( ; ; ) {
- status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
- assert( !status );
-
- if ( schedparam.sched_priority != LOW_PRIORITY )
- continue;
-
- priority = schedparam.sched_priority;
- sprintf( buffer, " - new priority = %d", priority );
- print_current_time( "Init: ", buffer );
-
- puts( "Init: pthread_mutex_lock acquire the lock" );
- status = pthread_mutex_lock( &Mutex_id );
- if ( status )
- printf( "status = %d\n", status );
- assert( !status );
-
- status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
- assert( !status );
-
- priority = schedparam.sched_priority;
- sprintf( buffer, " - new priority = %d", priority );
- print_current_time( "Init: ", buffer );
-
- break;
- }
-
- /* now spin waiting for our budget to be replenished */
-
- for ( ; ; ) {
- status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
- assert( !status );
-
- if ( schedparam.sched_priority == HIGH_PRIORITY )
- break;
- }
-
- priority = schedparam.sched_priority;
- sprintf( buffer, " - new priority = %d", priority );
- print_current_time( "Init: ", buffer );
-
- /* with this unlock we should be able to go to low priority */
-
- puts( "Init: unlock mutex" );
- status = pthread_mutex_unlock( &Mutex_id );
- if ( status )
- printf( "status = %d\n", status );
- assert( !status );
-
- status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
- assert( !status );
-
- priority = schedparam.sched_priority;
- sprintf( buffer, " - new priority = %d", priority );
- print_current_time( "Init: ", buffer );
-
- for ( ; ; ) {
- status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
- assert( !status );
-
- if ( schedparam.sched_priority == LOW_PRIORITY )
- break;
- }
-
- status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
- assert( !status );
-
- priority = schedparam.sched_priority;
- sprintf( buffer, " - new priority = %d", priority );
- print_current_time( "Init: ", buffer );
-
- puts( "*** END OF POSIX TEST 9 ***" );
- exit( 0 );
-
- return NULL; /* just so the compiler thinks we returned something */
-}
diff --git a/testsuites/psxtests/psx09/psx09.scn b/testsuites/psxtests/psx09/psx09.scn
deleted file mode 100644
index 373012f801..0000000000
--- a/testsuites/psxtests/psx09/psx09.scn
+++ /dev/null
@@ -1,22 +0,0 @@
-*** POSIX TEST 9 ***
-Init's ID is 0x0c010001
-Init: pthread_getschedparam - SUCCESSFUL
-Init: Fri May 24 11:05:00 1996 - current priority = 2
-Init: pthread_setschedparam - SUCCESSFUL (sporadic server)
-Init: Fri May 24 11:05:00 1996 - new priority = 200
-Init: Fri May 24 11:05:00 1996 - new priority = 100
-Init: Fri May 24 11:05:00 1996 - new priority = 200
-Init: Fri May 24 11:05:00 1996 - new priority = 100
-Init: Fri May 24 11:05:01 1996 - new priority = 200
-Init: pthread_setschedparam - SUCCESSFUL (sporadic server)
-Init: Initializing mutex attributes for priority ceiling
-Init: Creating a mutex
-Init: Fri May 24 11:05:01 1996 - new priority = 150
-Init: Fri May 24 11:05:01 1996 - new priority = 100
-Init: pthread_mutex_lock acquire the lock
-Init: Fri May 24 11:05:01 1996 - new priority = 131
-Init: Fri May 24 11:05:01 1996 - new priority = 150
-Init: unlock mutex
-Init: Fri May 24 11:05:01 1996 - new priority = 150
-Init: Fri May 24 11:05:01 1996 - new priority = 100
-*** END OF POSIX TEST 9 ***
diff --git a/testsuites/psxtests/psx09/system.h b/testsuites/psxtests/psx09/system.h
deleted file mode 100644
index 020b3f0892..0000000000
--- a/testsuites/psxtests/psx09/system.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-/* functions */
-
-#include <pmacros.h>
-
-void *POSIX_Init(
- void *argument
-);
-
-void *Task_1(
- void *argument
-);
-
-void *Task_2(
- void *argument
-);
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 10
-
-#include <confdefs.h>
-
-/* global variables */
-
-#ifdef CONFIGURE_INIT
-#define TEST_EXTERN
-#else
-#define TEST_EXTERN extern
-#endif
-
-TEST_EXTERN pthread_t Init_id;
-TEST_EXTERN pthread_mutex_t Mutex_id;
-
-/* end of include file */
diff --git a/testsuites/psxtests/psx10/Makefile.am b/testsuites/psxtests/psx10/Makefile.am
deleted file mode 100644
index 3b3811d517..0000000000
--- a/testsuites/psxtests/psx10/Makefile.am
+++ /dev/null
@@ -1,43 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = psx10
-
-MANAGERS = all
-
-C_FILES = init.c task.c task2.c task3.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/psxtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CPPFLAGS = -I$(top_srcdir)/include
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/psxtests/psx10/init.c b/testsuites/psxtests/psx10/init.c
deleted file mode 100644
index b08fafc937..0000000000
--- a/testsuites/psxtests/psx10/init.c
+++ /dev/null
@@ -1,311 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define CONFIGURE_INIT
-#include "system.h"
-#include <sched.h>
-
-
-void *POSIX_Init(
- void *argument
-)
-{
- int status;
- pthread_condattr_t attr;
- pthread_condattr_t attr_error;
- int pshared;
- pthread_cond_t cond;
- struct timespec timeout;
-
- puts( "\n\n*** POSIX TEST 10 ***" );
-
- puts( "Init: pthread_condattr_init" );
- status = pthread_condattr_init( &attr );
- assert( !status );
-
- puts( "Init: pthread_condattr_init - EINVAL (attribute invalid)" );
- status = pthread_condattr_init( NULL );
- if ( status != EINVAL )
- printf( "status = %d\n", status );
- assert( status == EINVAL );
-
- puts( "Init: pthread_condattr_destroy" );
- status = pthread_condattr_destroy( &attr );
- assert( !status );
-
- puts( "Init: pthread_condattr_destroy - EINVAL (attribute invalid)" );
- status = pthread_condattr_destroy( NULL );
- if ( status != EINVAL )
- printf( "status = %d\n", status );
- assert( status == EINVAL );
-
- puts( "Init: pthread_condattr_init" );
- status = pthread_condattr_init( &attr );
- assert( !status );
-
- puts( "Init: pthread_condattr_setpshared - PTHREAD_PROCESS_SHARED" );
- status = pthread_condattr_setpshared( &attr, PTHREAD_PROCESS_SHARED );
- assert( !status );
-
- puts( "Init: pthread_condattr_setpshared - PTHREAD_PROCESS_PRIVATE" );
- status = pthread_condattr_setpshared( &attr, PTHREAD_PROCESS_PRIVATE );
- assert( !status );
-
- status = pthread_condattr_setpshared( NULL, PTHREAD_PROCESS_PRIVATE );
- if ( status != EINVAL )
- printf( "status = %d\n", status );
- assert( status == EINVAL );
- puts( "Init: pthread_condattr_setpshared - EINVAL (attribute invalid)" );
-
- status = pthread_condattr_setpshared( &attr, 0xFFFFFF );
- if ( status != EINVAL )
- printf( "status = %d\n", status );
- assert( status == EINVAL );
- puts( "Init: pthread_condattr_setpshared - EINVAL (pshared invalid)" );
-
- status = pthread_condattr_getpshared( &attr, &pshared );
- assert( !status );
- printf( "Init: pthread_condattr_getpshared - %d\n", pshared );
-
- status = pthread_condattr_getpshared( NULL, &pshared );
- if ( status != EINVAL )
- printf( "status = %d\n", status );
- assert( status == EINVAL );
- puts( "Init: pthread_condattr_getpshared - EINVAL (attribute invalid)" );
-
- puts( "Init: pthread_cond_init - NULL attr" );
- status = pthread_cond_init( &cond, NULL );
- assert( !status );
-
-/* error for attribute not initialized */
-
- attr_error.is_initialized = FALSE;
- status = pthread_cond_init( &cond, &attr_error );
- if ( status != EINVAL )
- printf( "status = %d\n", status );
- assert( status == EINVAL );
- puts( "Init: pthread_cond_init - EINVAL (attr not initialized)" );
-
- status = pthread_cond_init( &cond, NULL );
- if ( status != ENOMEM )
- printf( "status = %d\n", status );
- assert( status == ENOMEM );
- puts( "Init: pthread_cond_init - ENOMEM (too many conds)" );
-
- puts( "Init: pthread_cond_destroy" );
- status = pthread_cond_destroy( &cond );
- assert( !status );
-
-/* error for bad condition variable passed */
-
- status = pthread_cond_destroy( NULL );
- if ( status != EINVAL )
- printf( "status = %d\n", status );
- assert( status == EINVAL );
- puts( "Init: pthread_cond_destroy - EINVAL (cond invalid)" );
-
-/* initiailize the attribute for the rest of the test */
-
- puts( "Init: pthread_cond_init - attr" );
- status = pthread_cond_init( &Cond1_id, &attr );
- assert( !status );
-
-/* signal task1 with a condition variable */
-
- empty_line();
-
- status = pthread_create( &Task_id, NULL, Task_1, NULL );
- assert( !status );
-
-/* switch to task1 to allow it to wait for a condition variable */
-
- puts( "Init: sleep to switch to Task_1" );
- sleep( 1 );
-
- status = pthread_cond_destroy( &Cond1_id );
- if ( status != EBUSY )
- printf( "status = %d\n", status );
- assert( status == EBUSY );
- puts( "Init: pthread_cond_destroy - EBUSY (task1 waiting)" );
-
- puts( "Init: pthread_cond_signal" );
- status = pthread_cond_signal( &Cond1_id );
- assert( !status );
-
- empty_line();
-
- status = pthread_create( &Task2_id, NULL, Task_2, NULL );
- assert( !status );
-
-/* switch to task1 and task2 to allow them to wait for broadcast signal */
-
- puts( "Init: sleep - switch to Task_1 and Task_2" );
- sleep( 1 );
-
-/* broadcast a condition variable to task1 and task2 */
-
- puts( "Init: pthread_cond_broadcast" );
- status = pthread_cond_broadcast( &Cond1_id );
- assert( !status );
-
- puts( "Init: sleep - switch to Task_1" );
- sleep( 0 );
-
-/* timedwait case - timeout */
-
- status = pthread_mutex_lock( &Mutex_id );
- assert( !status );
-
-/* set timeout to 3 seconds */
-
- status = clock_gettime( CLOCK_REALTIME, &timeout );
- assert( !status );
- timeout.tv_sec += 3;
- timeout.tv_nsec = 0;
-
- puts( "Init: pthread_cond_timedwait for 3 seconds" );
- status = pthread_cond_timedwait( &Cond1_id, &Mutex_id, &timeout );
- if ( status != ETIMEDOUT )
- printf( "status = %d\n", status );
- assert( status == ETIMEDOUT );
- puts( "Init: pthread_cond_timedwait - ETIMEDOUT - (mutex not acquired)" );
-
- status = pthread_mutex_unlock( &Mutex_id );
- assert( !status );
-
-/* remaining error messages */
-
- empty_line();
-
-/* errors for bad variable passed */
-
- status = pthread_cond_signal( NULL );
- if ( status != EINVAL )
- printf( "status = %d\n", status );
- assert( status == EINVAL );
- puts( "Init: pthread_cond_signal - EINVAL (cond invalid)" );
-
- status = pthread_cond_broadcast( NULL );
- if ( status != EINVAL )
- printf( "status = %d\n", status );
- assert( status == EINVAL );
- puts( "Init: pthread_cond_broadcast - EINVAL (cond invalid)" );
-
-/* acquire mutex so errors will occur */
-
- status = pthread_mutex_lock( &Mutex_id );
- assert( !status );
-
- status = pthread_cond_wait( NULL, &Mutex_id );
- if ( status != EINVAL )
- printf( "status = %d\n", status );
- assert( status == EINVAL );
- puts( "Init: pthread_cond_wait - EINVAL (cond invalid)" );
-
- status = pthread_cond_timedwait( NULL, &Mutex_id, &timeout );
- if ( status != EINVAL )
- printf( "status = %d\n", status );
- assert( status == EINVAL );
- puts( "Init: pthread_cond_timedwait - EINVAL (cond invalid)" );
-
- status = pthread_cond_wait( &Cond1_id, NULL );
- if ( status != EINVAL )
- printf( "status = %d\n", status );
- assert( status == EINVAL );
- puts( "Init: pthread_cond_wait - EINVAL (mutex invalid)" );
-
- status = pthread_cond_timedwait( &Cond1_id, NULL, &timeout );
- if ( status != EINVAL )
- printf( "status = %d\n", status );
- assert( status == EINVAL );
- puts( "Init: pthread_cond_timedwait - EINVAL (mutex invalid)" );
-
- status = pthread_cond_timedwait( &Cond1_id, &Mutex_id, NULL );
- if ( status != EINVAL )
- printf( "status = %d\n", status );
- assert( status == EINVAL );
- puts( "Init: pthread_cond_timedwait - EINVAL (abstime NULL)" );
-
- status = clock_gettime( CLOCK_REALTIME, &timeout );
- assert( !status );
- timeout.tv_sec -= 1;
- status = pthread_cond_timedwait( &Cond1_id, &Mutex_id, &timeout );
- if ( status != ETIMEDOUT )
- printf( "status = %d\n", status );
- assert( status == ETIMEDOUT );
- puts( "Init: pthread_cond_timedwait - ETIMEDOUT (abstime->tv_sec < current time)" );
- status = pthread_mutex_unlock( &Mutex_id );
- assert( !status );
-
- status = pthread_mutex_lock( &Mutex_id );
- assert( !status );
- status = clock_gettime( CLOCK_REALTIME, &timeout );
- assert( !status );
- timeout.tv_nsec -= 1;
- status = pthread_cond_timedwait( &Cond1_id, &Mutex_id, &timeout );
- if ( status != ETIMEDOUT )
- printf( "status = %d\n", status );
- assert( status == ETIMEDOUT );
- puts( "Init: pthread_cond_timedwait - ETIMEDOUT (abstime->tv_nsec < current time)" );
- status = pthread_mutex_unlock( &Mutex_id );
- assert( !status );
-
-/* wait and timedwait without mutex */
-
-/* XXX - this case is commented out in the code pending review
- *
- * status = pthread_cond_wait( &Cond1_id, &Mutex_id );
- * if ( status != EINVAL )
- * printf( "status = %d\n", status );
- * assert( status == EINVAL );
- */
- puts( "Init: pthread_cond_wait - EINVAL (mutex not locked before call)" );
-
-/* XXX - this case is commented out in the code pending review
- *
- * status = clock_gettime( CLOCK_REALTIME, &timeout );
- * assert( !status );
- * timeout.tv_sec += 1;
- * status = pthread_cond_timedwait( &Cond1_id, &Mutex_id, &timeout );
- * if ( status != EINVAL )
- * printf( "status = %d\n", status );
- * assert( status == EINVAL );
- */
- puts( "Init: pthread_cond_timedwait - EINVAL (mutex not locked before call)");
-
- empty_line();
-
- status = pthread_create( &Task3_id, NULL, Task_3, NULL );
- assert( !status );
-
-/* switch to task3 to allow it to wait for broadcast signal */
-
- puts( "Init: sleep - switch to Task_3" );
- sleep( 1 );
-
-/* destroy the mutex so Task3 can not acguire at the end of Wait_support */
-
- status = pthread_mutex_destroy( &Mutex_id );
- assert( !status );
-
-/* signal a condition variable to task3 */
-
- puts( "Init: pthread_cond_signal" );
- status = pthread_cond_signal( &Cond1_id );
-
- puts( "Init: sleep - switch to Task_3" );
- sleep( 1 );
-
- puts( "*** END OF POSIX TEST 10 ***" );
- exit( 0 );
-
- return NULL; /* just so the compiler thinks we returned something */
-}
diff --git a/testsuites/psxtests/psx10/psx10.scn b/testsuites/psxtests/psx10/psx10.scn
deleted file mode 100644
index 0247781efa..0000000000
--- a/testsuites/psxtests/psx10/psx10.scn
+++ /dev/null
@@ -1,55 +0,0 @@
-*** POSIX TEST 10 ***
-Init: pthread_condattr_init
-Init: pthread_condattr_init - EINVAL (attribute invalid)
-Init: pthread_condattr_destroy
-Init: pthread_condattr_destroy - EINVAL (attribute invalid)
-Init: pthread_condattr_init
-Init: pthread_condattr_setpshared - PTHREAD_PROCESS_SHARED
-Init: pthread_condattr_setpshared - PTHREAD_PROCESS_PRIVATE
-Init: pthread_condattr_setpshared - EINVAL (attribute invalid)
-Init: pthread_condattr_setpshared - EINVAL (pshared invalid)
-Init: pthread_condattr_getpshared - 0
-Init: pthread_condattr_getpshared - EINVAL (attribute invalid)
-Init: pthread_cond_init - NULL attr
-Init: pthread_cond_init - EINVAL (attr not initialized)
-Init: pthread_cond_init - ENOMEM (too many conds)
-Init: pthread_cond_destroy
-Init: pthread_cond_destroy - EINVAL (cond invalid)
-Init: pthread_cond_init - attr
-Init: sleep to switch to Task_1
-Task_1: ID is 0x0c010002
-Task_1: pthread_cond_wait
-Init: pthread_cond_destroy - EBUSY (task1 waiting)
-Init: pthread_cond_signal
-Init: sleep - switch to Task_1 and Task_2
-Task_1: back from pthread_cond_wait release mutex
-Task_1: pthread_cond_wait
-Task_2: ID is 0x0c010003
-Task_2: pthread_cond_wait
-Init: pthread_cond_broadcast
-Init: sleep - switch to Task_1
-Task_1: back from pthread_cond_wait release mutex
-Task_1: task exit
-Task_2: back from pthread_cond_wait release mutex
-Task_2: task exit
-Init: pthread_cond_timedwait for 3 seconds
-Init: pthread_cond_timedwait - ETIMEDOUT - (mutex not acquired)
-Init: pthread_cond_signal - EINVAL (cond invalid)
-Init: pthread_cond_broadcast - EINVAL (cond invalid)
-Init: pthread_cond_wait - EINVAL (cond invalid)
-Init: pthread_cond_timedwait - EINVAL (cond invalid)
-Init: pthread_cond_wait - EINVAL (mutex invalid)
-Init: pthread_cond_timedwait - EINVAL (mutex invalid)
-Init: pthread_cond_timedwait - EINVAL (abstime NULL)
-Init: pthread_cond_timedwait - ETIMEDOUT (abstime->tv_sec < current time)
-Init: pthread_cond_timedwait - ETIMEDOUT (abstime->tv_nsec < current time)
-Init: pthread_cond_wait - EINVAL (mutex not locked before call)
-Init: pthread_cond_timedwait - EINVAL (mutex not locked before call)
-Init: sleep - switch to Task_3
-Task_3: ID is 0x0c010004
-Task_3: pthread_cond_wait
-Init: pthread_cond_signal
-Init: sleep - switch to Task_3
-Task_3: pthread_cond_wait - EINVAL (mutex not locked after signal)
-Task_3: task exit
-*** END OF POSIX TEST 10 ***
diff --git a/testsuites/psxtests/psx10/system.h b/testsuites/psxtests/psx10/system.h
deleted file mode 100644
index a4f126a7f1..0000000000
--- a/testsuites/psxtests/psx10/system.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-/* functions */
-
-#include <pmacros.h>
-#include <unistd.h>
-#include <errno.h>
-
-void *POSIX_Init(
- void *argument
-);
-
-void *Task_1(
- void *argument
-);
-
-void *Task_2(
- void *argument
-);
-
-void *Task_3(
- void *argument
-);
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 1
-
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 2
-
-#include <confdefs.h>
-
-/* global variables */
-
-#ifdef CONFIGURE_INIT
-#define TEST_EXTERN
-#else
-#define TEST_EXTERN extern
-#endif
-
-TEST_EXTERN pthread_t Init_id;
-TEST_EXTERN pthread_t Task_id;
-TEST_EXTERN pthread_t Task2_id;
-TEST_EXTERN pthread_t Task3_id;
-TEST_EXTERN pthread_cond_t Cond1_id;
-TEST_EXTERN pthread_mutex_t Mutex_id;
-
-/* end of include file */
diff --git a/testsuites/psxtests/psx10/task.c b/testsuites/psxtests/psx10/task.c
deleted file mode 100644
index f7c1fac1f2..0000000000
--- a/testsuites/psxtests/psx10/task.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/* Task_1
- *
- * This routine serves as a test task.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-void *Task_1(
- void *argument
-)
-{
- int status;
-
-/* wait for a condition variable signal from Init */
-
- Task_id = pthread_self();
- printf( "Task_1: ID is 0x%08x\n", Task_id );
-
- status = pthread_mutex_init( &Mutex_id, NULL );
- assert( !status );
-
- status = pthread_mutex_lock( &Mutex_id );
- assert( !status );
-
- puts( "Task_1: pthread_cond_wait" );
- status = pthread_cond_wait( &Cond1_id, &Mutex_id );
- assert( !status );
-
- puts( "Task_1: back from pthread_cond_wait release mutex" );
- status = pthread_mutex_unlock( &Mutex_id );
- assert( !status );
-
-/* wait for a condition variable broadcast from Init */
-
- status = pthread_mutex_lock( &Mutex_id );
- assert( !status );
-
- puts( "Task_1: pthread_cond_wait" );
- status = pthread_cond_wait( &Cond1_id, &Mutex_id );
- assert( !status );
-
- puts( "Task_1: back from pthread_cond_wait release mutex" );
- status = pthread_mutex_unlock( &Mutex_id );
- assert( !status );
-
- puts( "Task_1: task exit" );
- pthread_exit( NULL );
-
- return NULL; /* just so the compiler thinks we returned something */
-}
diff --git a/testsuites/psxtests/psx10/task2.c b/testsuites/psxtests/psx10/task2.c
deleted file mode 100644
index 404fabcc55..0000000000
--- a/testsuites/psxtests/psx10/task2.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Task_2
- *
- * This routine serves as a test task.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-void *Task_2(
- void *argument
-)
-{
- int status;
-
- Task_id = pthread_self();
- printf( "Task_2: ID is 0x%08x\n", Task_id );
-
- status = pthread_mutex_lock( &Mutex_id );
- assert( !status );
-
- puts( "Task_2: pthread_cond_wait" );
- status = pthread_cond_wait( &Cond1_id, &Mutex_id );
- assert( !status );
-
- puts( "Task_2: back from pthread_cond_wait release mutex" );
- status = pthread_mutex_unlock( &Mutex_id );
- assert( !status );
-
- puts( "Task_2: task exit" );
- pthread_exit( NULL );
-
- return NULL; /* just so the compiler thinks we returned something */
-}
diff --git a/testsuites/psxtests/psx10/task3.c b/testsuites/psxtests/psx10/task3.c
deleted file mode 100644
index 4531072c0e..0000000000
--- a/testsuites/psxtests/psx10/task3.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Task_3
- *
- * This routine serves as a test task.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-void *Task_3(
- void *argument
-)
-{
- int status;
-
- Task_id = pthread_self();
- printf( "Task_3: ID is 0x%08x\n", Task_id );
-
- status = pthread_mutex_lock( &Mutex_id );
- assert( !status );
-
- puts( "Task_3: pthread_cond_wait" );
- status = pthread_cond_wait( &Cond1_id, &Mutex_id );
- if ( status != EINVAL )
- printf( "status = %d\n", status );
- assert( status == EINVAL );
- puts( "Task_3: pthread_cond_wait - EINVAL (mutex not locked after signal)");
-
- puts( "Task_3: task exit" );
- pthread_exit( NULL );
-
- return NULL; /* just so the compiler thinks we returned something */
-}
diff --git a/testsuites/psxtests/psx11/Makefile.am b/testsuites/psxtests/psx11/Makefile.am
deleted file mode 100644
index 9557cd7899..0000000000
--- a/testsuites/psxtests/psx11/Makefile.am
+++ /dev/null
@@ -1,43 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = psx11
-
-MANAGERS = all
-
-C_FILES = init.c task.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/psxtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CPPFLAGS = -I$(top_srcdir)/include
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/psxtests/psx11/init.c b/testsuites/psxtests/psx11/init.c
deleted file mode 100644
index 5122d5a13f..0000000000
--- a/testsuites/psxtests/psx11/init.c
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define CONFIGURE_INIT
-#include "system.h"
-#include <errno.h>
-
-void *POSIX_Init(
- void *argument
-)
-{
- int status;
- struct sched_param param;
- pthread_attr_t attr;
-
- puts( "\n\n*** POSIX TEST 11 ***" );
-
- /* set the time of day, and print our buffer in multiple ways */
-
- set_time( TM_FRIDAY, TM_MAY, 24, 96, 11, 5, 0 );
-
- /* get id of this thread */
-
- Init_id = pthread_self();
- printf( "Init's ID is 0x%08x\n", Init_id );
-
- /* exercise pthread_setschedparam */
-
- param.sched_priority = 127;
-
- puts( "Init: Setting scheduling parameters to FIFO with priority 127" );
- status = pthread_setschedparam( Init_id, SCHED_FIFO, &param );
- assert( !status );
-
- param.sched_priority = 125;
-
- puts( "Init: Setting scheduling parameters to RR with priority 125" );
- status = pthread_setschedparam( Init_id, SCHED_RR, &param );
- assert( !status );
-
- param.sched_priority = 121;
-
- puts( "Init: Setting scheduling parameters to OTHER with priority 121" );
- status = pthread_setschedparam( Init_id, SCHED_OTHER, &param );
- assert( !status );
-
- /* create a thread as SCHED_FIFO */
-
- puts( "Init: create a thread of SCHED_FIFO with priority 120" );
- status = pthread_attr_init( &attr );
- assert( !status );
-
- attr.schedpolicy = SCHED_FIFO;
- attr.schedparam.sched_priority = 120;
-
- status = pthread_create( &Task_id, &attr, Task_1, NULL );
- assert( !status );
-
- puts( "Init: join with the other thread" );
- status = pthread_join( Task_id, NULL );
- assert( !status );
-
- /* create a thread as SCHED_RR */
-
- puts( "Init: create a thread of SCHED_RR with priority 120" );
- status = pthread_attr_init( &attr );
- assert( !status );
-
- attr.schedpolicy = SCHED_RR;
- attr.schedparam.sched_priority = 120;
-
- status = pthread_create( &Task_id, &attr, Task_1, NULL );
- assert( !status );
-
- puts( "Init: join with the other thread" );
- status = pthread_join( Task_id, NULL );
- assert( !status );
-
- /* create a thread as SCHED_OTHER */
-
- puts( "Init: create a thread of SCHED_OTHER with priority 120" );
- status = pthread_attr_init( &attr );
- assert( !status );
-
- attr.schedpolicy = SCHED_OTHER;
- attr.schedparam.sched_priority = 120;
-
- status = pthread_create( &Task_id, &attr, Task_1, NULL );
- assert( !status );
-
- puts( "Init: join with the other thread" );
- status = pthread_join( Task_id, NULL );
- assert( !status );
-
- puts( "*** END OF POSIX TEST 11 ***" );
- exit( 0 );
-
- return NULL; /* just so the compiler thinks we returned something */
-}
diff --git a/testsuites/psxtests/psx11/psx11.scn b/testsuites/psxtests/psx11/psx11.scn
deleted file mode 100644
index 69df5ec1b9..0000000000
--- a/testsuites/psxtests/psx11/psx11.scn
+++ /dev/null
@@ -1,18 +0,0 @@
-*** POSIX TEST 11 ***
-Init's ID is 0x0c010001
-Init: Setting scheduling parameters to FIFO with priority 127
-Init: Setting scheduling parameters to RR with priority 125
-Init: Setting scheduling parameters to OTHER with priority 121
-Init: create a thread of SCHED_FIFO with priority 120
-Init: join with the other thread
-Task_1: killing time
-Task_1: exitting
-Init: create a thread of SCHED_RR with priority 120
-Init: join with the other thread
-Task_1: killing time
-Task_1: exitting
-Init: create a thread of SCHED_OTHER with priority 120
-Init: join with the other thread
-Task_1: killing time
-Task_1: exitting
-*** END OF POSIX TEST 11 ***
diff --git a/testsuites/psxtests/psx11/system.h b/testsuites/psxtests/psx11/system.h
deleted file mode 100644
index 0b5f3022c8..0000000000
--- a/testsuites/psxtests/psx11/system.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-/* functions */
-
-#include <pmacros.h>
-
-void *POSIX_Init(
- void *argument
-);
-
-void *Task_1(
- void *argument
-);
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#include <confdefs.h>
-
-/* global variables */
-
-#ifdef CONFIGURE_INIT
-#define TEST_EXTERN
-#else
-#define TEST_EXTERN extern
-#endif
-
-TEST_EXTERN pthread_t Init_id;
-TEST_EXTERN pthread_t Task_id;
-
-/* end of include file */
diff --git a/testsuites/psxtests/psx11/task.c b/testsuites/psxtests/psx11/task.c
deleted file mode 100644
index d6faf6b64a..0000000000
--- a/testsuites/psxtests/psx11/task.c
+++ /dev/null
@@ -1,91 +0,0 @@
-/* Task_1
- *
- * This routine serves as a test task. It verifies the basic task
- * switching capabilities of the executive.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-#include <time.h>
-#include <sched.h>
-
-void diff_timespec(
- struct timespec *start,
- struct timespec *stop,
- struct timespec *result
-)
-{
- int nsecs_per_sec = 1000000000;
-
- result->tv_sec = stop->tv_sec - start->tv_sec;
- if ( stop->tv_nsec < start->tv_nsec ) {
- result->tv_nsec = nsecs_per_sec - start->tv_nsec + stop->tv_nsec;
- result->tv_sec--;
- } else
- result->tv_nsec = stop->tv_nsec - start->tv_nsec;
-
-}
-
-void *Task_1(
- void *argument
-)
-{
- int status;
- struct timespec start;
- struct timespec current;
- struct timespec difference;
- struct timespec delay;
-
- status = clock_gettime( CLOCK_REALTIME, &start );
- assert( !status );
-
- status = sched_rr_get_interval( getpid(), &delay );
- assert( !status );
-
- /* double the rr interval for confidence */
-
- delay.tv_sec *= 2;
- delay.tv_nsec *= 2;
- if ( delay.tv_nsec >= 1000000000 ) { /* handle overflow/carry */
- delay.tv_nsec -= 1000000000;
- delay.tv_sec++;
- }
-
-
- puts( "Task_1: killing time" );
- for ( ; ; ) {
-
- status = clock_gettime( CLOCK_REALTIME, &current );
- assert( !status );
-
- diff_timespec( &start, &current, &difference );
-
- if ( difference.tv_sec < delay.tv_sec )
- continue;
-
- if ( difference.tv_sec > delay.tv_sec )
- break;
-
- if ( difference.tv_nsec > delay.tv_nsec )
- break;
-
- }
-
- puts( "Task_1: exitting" );
- pthread_exit( NULL );
-
- return NULL; /* just so the compiler thinks we returned something */
-}
diff --git a/testsuites/psxtests/psx12/Makefile.am b/testsuites/psxtests/psx12/Makefile.am
deleted file mode 100644
index 29e1fb439e..0000000000
--- a/testsuites/psxtests/psx12/Makefile.am
+++ /dev/null
@@ -1,43 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = psx12
-
-MANAGERS = all
-
-C_FILES = init.c task.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/psxtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CPPFLAGS = -I$(top_srcdir)/include
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/psxtests/psx12/init.c b/testsuites/psxtests/psx12/init.c
deleted file mode 100644
index e14ff91d73..0000000000
--- a/testsuites/psxtests/psx12/init.c
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define CONFIGURE_INIT
-#include "system.h"
-#include <errno.h>
-
-void print_schedparam(
- char *prefix,
- struct sched_param *schedparam
-)
-{
- printf( "%ssched priority = %d\n", prefix, schedparam->sched_priority );
-#if defined(_POSIX_SPORADIC_SERVER)
- printf( "%sss_low_priority = %d\n", prefix, schedparam->ss_low_priority );
- printf( "%sss_replenish_period = (%ld, %ld)\n", prefix,
- schedparam->ss_replenish_period.tv_sec,
- schedparam->ss_replenish_period.tv_nsec );
- printf( "%sss_initial_budget = (%ld, %ld)\n", prefix,
- schedparam->ss_initial_budget.tv_sec,
- schedparam->ss_initial_budget.tv_nsec );
-#else
- printf( "%s_POSIX_SPORADIC_SERVER is not defined\n" );
-#endif
-}
-
-void *POSIX_Init(
- void *argument
-)
-{
- int status;
- pthread_attr_t attr;
- struct sched_param schedparam;
-
- puts( "\n\n*** POSIX TEST 12 ***" );
-
- /* set the time of day, and print our buffer in multiple ways */
-
- set_time( TM_FRIDAY, TM_MAY, 24, 96, 11, 5, 0 );
-
- /* get id of this thread */
-
- Init_id = pthread_self();
- printf( "Init's ID is 0x%08x\n", Init_id );
-
- /* invalid scheduling policy error */
-
- puts( "Init: pthread_attr_init - SUCCESSFUL" );
- status = pthread_attr_init( &attr );
- assert( !status );
-
- status = pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
- assert( !status );
- attr.schedpolicy = -1;
-
- puts( "Init: pthread_create - EINVAL (invalid scheduling policy)" );
- status = pthread_create( &Task_id, &attr, Task_1, NULL );
- assert( status == EINVAL );
-
- /* replenish period < budget error */
-
- puts( "Init: pthread_attr_init - SUCCESSFUL" );
- status = pthread_attr_init( &attr );
- assert( !status );
-
- puts( "Init: set scheduling parameter attributes for sporadic server" );
- status = pthread_attr_setschedpolicy( &attr, SCHED_SPORADIC );
- assert( !status );
-
- schedparam.ss_replenish_period.tv_sec = 1;
- schedparam.ss_replenish_period.tv_nsec = 0;
- schedparam.ss_initial_budget.tv_sec = 2;
- schedparam.ss_initial_budget.tv_nsec = 0;
-
- schedparam.sched_priority = 200;
- schedparam.ss_low_priority = 100;
-
- status = pthread_attr_setschedparam( &attr, &schedparam );
- assert( !status );
-
- status = pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
- assert( !status );
-
- puts( "Init: pthread_create - EINVAL (replenish < budget)" );
- status = pthread_create( &Task_id, &attr, Task_1, NULL );
- assert( status == EINVAL );
-
- /* invalid ss_low_priority error */
-
- schedparam.ss_replenish_period.tv_sec = 2;
- schedparam.ss_replenish_period.tv_nsec = 0;
- schedparam.ss_initial_budget.tv_sec = 1;
- schedparam.ss_initial_budget.tv_nsec = 0;
-
- schedparam.sched_priority = 200;
- schedparam.ss_low_priority = -1;
-
- status = pthread_attr_setschedparam( &attr, &schedparam );
- assert( !status );
-
- puts( "Init: pthread_create - EINVAL (invalid ss_low_priority)" );
- status = pthread_create( &Task_id, &attr, Task_1, NULL );
- assert( status == EINVAL );
-
- /* create a thread as a sporadic server */
-
- schedparam.ss_replenish_period.tv_sec = 2;
- schedparam.ss_replenish_period.tv_nsec = 0;
- schedparam.ss_initial_budget.tv_sec = 1;
- schedparam.ss_initial_budget.tv_nsec = 0;
-
- schedparam.sched_priority = 200;
- schedparam.ss_low_priority = 100;
-
- status = pthread_attr_setschedparam( &attr, &schedparam );
- assert( !status );
-
- puts( "Init: pthread_create - SUCCESSFUL" );
- status = pthread_create( &Task_id, &attr, Task_1, NULL );
- assert( !status );
-
- status = pthread_join( Task_id, NULL );
- assert( status );
-
- /* switch to Task_1 */
-
- puts( "*** END OF POSIX TEST 12 ***" );
- exit( 0 );
-
- return NULL; /* just so the compiler thinks we returned something */
-}
diff --git a/testsuites/psxtests/psx12/psx12.scn b/testsuites/psxtests/psx12/psx12.scn
deleted file mode 100644
index fd969cb122..0000000000
--- a/testsuites/psxtests/psx12/psx12.scn
+++ /dev/null
@@ -1,11 +0,0 @@
-*** POSIX TEST 12 ***
-Init's ID is 0x0c010001
-Init: pthread_attr_init - SUCCESSFUL
-Init: pthread_create - EINVAL (invalid scheduling policy)
-Init: pthread_attr_init - SUCCESSFUL
-Init: set scheduling parameter attributes for sporadic server
-Init: pthread_create - EINVAL (replenish < budget)
-Init: pthread_create - EINVAL (invalid ss_low_priority)
-Init: pthread_create - SUCCESSFUL
-Task_1: exitting
-*** END OF POSIX TEST 12 ***
diff --git a/testsuites/psxtests/psx12/system.h b/testsuites/psxtests/psx12/system.h
deleted file mode 100644
index 20abeef4ea..0000000000
--- a/testsuites/psxtests/psx12/system.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-/* functions */
-
-#include <pmacros.h>
-
-void *POSIX_Init(
- void *argument
-);
-
-void *Task_1(
- void *argument
-);
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 10
-
-#include <confdefs.h>
-
-/* global variables */
-
-#ifdef CONFIGURE_INIT
-#define TEST_EXTERN
-#else
-#define TEST_EXTERN extern
-#endif
-
-TEST_EXTERN pthread_t Init_id;
-TEST_EXTERN pthread_t Task_id;
-
-/* end of include file */
diff --git a/testsuites/psxtests/psx12/task.c b/testsuites/psxtests/psx12/task.c
deleted file mode 100644
index 8f04b1285f..0000000000
--- a/testsuites/psxtests/psx12/task.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Task_1
- *
- * This routine serves as a test task. It verifies the basic task
- * switching capabilities of the executive.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-#include <time.h>
-#include <sched.h>
-
-void *Task_1(
- void *argument
-)
-{
- puts( "Task_1: exitting" );
- pthread_exit( NULL );
-
- return NULL; /* just so the compiler thinks we returned something */
-}
diff --git a/testsuites/psxtests/psx13/Makefile.am b/testsuites/psxtests/psx13/Makefile.am
deleted file mode 100644
index 399eb51a49..0000000000
--- a/testsuites/psxtests/psx13/Makefile.am
+++ /dev/null
@@ -1,38 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = psx13
-
-MANAGERS = all
-
-C_FILES = main.c test.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-DOCTYPES = scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/psxtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/psxtests/psx13/main.c b/testsuites/psxtests/psx13/main.c
deleted file mode 100644
index 9f253e881b..0000000000
--- a/testsuites/psxtests/psx13/main.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Simple test program -- simplified version of sample test hello.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-
-#include <bsp.h>
-
-void test_main( void );
-
-rtems_task Init(
- rtems_task_argument ignored
-)
-{
- test_main();
- exit( 0 );
-}
-
-/* configuration information */
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#define CONFIGURE_INIT
-
-#include <confdefs.h>
-
-/* end of file */
diff --git a/testsuites/psxtests/psx13/psx13.scn b/testsuites/psxtests/psx13/psx13.scn
deleted file mode 100644
index 4a012eceaa..0000000000
--- a/testsuites/psxtests/psx13/psx13.scn
+++ /dev/null
@@ -1,16 +0,0 @@
-*** POSIX TEST 13 ***
-
-Files initialized successfully.
-Testing device_lseek()... Success.
-Testing dup()............ Success. ( Add when dup flags resolved )
-Testing dup2()........... Success.
-Testing fdatasync()...... Success.
-Testing umask().......... Success.
-Testing utime().......... Success.
-Testing pipe()........... Success.
-Testing fsync().......... Success.
-Testing pathconf()....... Success.
-Testing fpathconf()...... Success.
-
-
-*** END OF TEST PSX13 ***
diff --git a/testsuites/psxtests/psx13/test.c b/testsuites/psxtests/psx13/test.c
deleted file mode 100644
index 6e4de0de8c..0000000000
--- a/testsuites/psxtests/psx13/test.c
+++ /dev/null
@@ -1,686 +0,0 @@
-/*
- * Psx13
- * Chris Bond (working under Jennifer's account)
- *
- * This test exercises the following routines:
- *
- * device_lseek - test implemented
- * dup - test implemented
- * dup2 - test implemented
- * fdatasync - test implemented
- * fsync - test implemented
- * pathconf - test implemented
- * fpathconf - test implemented
- * pipe - test implemented
- * umask - test implemented
- * utime - test implemented
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include <rtems/libio.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#include <utime.h>
-
-#include <stdio.h>
-
-/*-------------------------------------------------------------------
- * InitFiles function
- *
- * Initializes the three files to be used in the test.
- *
- * arguments: none
- * assumptions: fopen, fprintf, fwrite, FILE are available
- * actions: creates testfile1, a text file with 'a'..'z' listed 4 times.
- * creates testfile2, a text file with 'a'..'z' listed 4 times.
- * creates testfile3, a binary file with 0..9 listed 4 times.
- * returns: TRUE if files opened successfully.
- * FALSE if fail on file open for write.
- *
- * ------------------------------------------------------------------
- */
-
-int InitFiles (void) {
-
- int count;
- FILE *fp1, *fp2, *fp3;
- char letter;
- int number;
- int retval;
-
- fp1 = fopen("testfile1.tst", "wt");
- fp2 = fopen("testfile2.tst", "wt");
- fp3 = fopen("testfile4.tst", "wb");
-
- if ((fp1 != NULL) && (fp2 != NULL) && (fp3 !=NULL)) {
-
- letter = 'a';
-
- for (count=0 ; count<(26*4); ++count) {
- fprintf (fp1, "%c", letter);
- fprintf (fp2, "%c", letter);
-
- ++letter;
- if (letter > 'z')
- letter = 'a';
- }
-
- number = 0;
-
- for (count = 0; count <40; ++count) {
-
- fwrite (&number, 1, sizeof(int), fp3);
-
- ++number;
- if (number > 9)
- number = 0;
- }
-
- fclose(fp1);
- fclose(fp2);
- fclose(fp3);
-
- retval = TRUE;
- }
-
- else
- retval = FALSE;
-
- /* assert (retval == TRUE);*/
-
- return (retval);
-}
-
-/* ---------------------------------------------------------------
- * DeviceLSeekTest function
- *
- * Hits the device_lseek code by lseeking on the console.
- *
- * arguments: none
- * assumptions: lseek available
- * actions: hits lseek with some dummy arguments.
- * returns: value of return from lseek.
- *
- * ---------------------------------------------------------------
- */
-
-int DeviceLSeekTest (void) {
-
- int error = -1, retval = FALSE;
-
- int fd = open ("/dev/console", O_RDONLY);
-
- error = lseek(fd, 5, SEEK_SET);
-
- if (error == 0)
- retval = TRUE;
- else
- retval = FALSE;
-
- /* assert (retval == TRUE);*/
-
- return (retval);
-
-}
-
-/* ---------------------------------------------------------------
- * DupTest function
- *
- * Hits the dup code.
- *
- * arguments: none
- * assumptions: dup, open, close, fcntl available.
- * actions: Gets a file descriptor(fd1) for test file1.
- * dups fd1 to fd2.
- * sets fd1 to append mode
- * checks fd2 to ensure it's in append mode, also.
- * returns: success if fd2 is indeed a copy of fd1.
- *
- * ---------------------------------------------------------------
- */
-
-int DupTest(void) {
-
- int fd1, fd2;
-
- int flags = 0, retval = FALSE;
-
- fd1 = open ("testfile1.tst", O_RDONLY);
- fd2 = dup(fd1);
-
- if (fd2 != -1) {
-
- fcntl(fd1, F_SETFL, O_APPEND);
- flags = fcntl(fd2, F_GETFL);
-
- close (fd1);
-
- flags = (flags & O_APPEND);
-
- retval = (flags == O_APPEND);
- }
-
- else
- retval = FALSE;
-
- /* assert (retval == TRUE);*/
-
- return (retval);
-
-}
-
-/* ---------------------------------------------------------------
- * Dup2Test function
- *
- * Hits the dup2 code.
- *
- * arguments: none
- * assumptions: dup, dup2, open, close, fcntl available.
- * actions: Gets a file descriptor(fd1) for test file1.
- * dups fd1 to fd2.
- * sets fd1 to append mode
- * checks fd2 to ensure it's in append mode, also.
- * sets fd1 to invalid value, fd2 to valid, tries to dup2.
- * sets fd2 to invalid value, fd1 to valid tries to dup2.
- * returns: success if fd2 is a copy of fd1, and invalid fd1 or fd2 produce errors.
- *
- * ---------------------------------------------------------------
- */
-
-int Dup2Test(void) {
-
- int fd1, fd2;
-
- int flags = 0, retval = FALSE;
-
- int error = 0;
-
- fd1 = open ("testfile1.tst", O_RDONLY);
- fd2 = open ("testfile2.tst", O_RDONLY);
- error = dup2(fd1, fd2);
-
- /* make sure dup2 works if both fd1 and fd2 are valid file descriptors. */
-
- if (error != -1) {
-
- fcntl(fd1, F_SETFL, O_APPEND);
- flags = fcntl(fd1, F_GETFL);
-
- flags = (flags & O_APPEND);
- retval = (flags == O_APPEND);
- }
-
- else {
- retval = FALSE;
- close(fd2);
- }
-
- if (retval == TRUE) {
-
- /* make sure dup2 fails correctly if one or the other arguments are invalid. */
- /* this assumes -1 is an invalid value for a file descriptor!!! (POSIX book, p.135) */
-
- fd1 = -1;
-
- if (dup2 (fd1, fd2) != -1)
- retval = FALSE;
- else {
- fd1 = dup(fd2);
- fd2 = -1;
-
- if (dup2(fd1, fd2) != -1)
- retval = FALSE;
- }
- }
-
- close (fd1);
-
- /* assert (retval == TRUE);*/
-
- return (retval);
-
-}
-
-/* ---------------------------------------------------------------
- * FDataSyncTest function
- *
- * Hits the fdatasync code. Does NOT test the functionality of the
- * underlying fdatasync entry in the IMFS op table.
- *
- * arguments: none
- * assumptions: open, close, fdatasync functions available.
- * actions: attempts to fdatasync a file descriptor flagged as read-only.
- * attempts to fdatasync an invalid file descriptor (-1).
- * attempts to fdatasync a perfectly valid fd opened as RDWR
- *
- * returns: TRUE if attempt to fdatasync invalid and read-only filed escriptor fail, and fdatasync succeeds on valid fd.
- * FALSE otherwise.
- *
- * ---------------------------------------------------------------
- */
-
-int FDataSyncTest(void) {
-
- int fd = -1;
- int error = 0, retval = TRUE;
-
- /* Try it with a RD_ONLY file. */
-
- fd = open ("testfile1.tst", O_RDONLY);
-
- error = fdatasync(fd);
- if ((error == -1) && (errno == EINVAL))
- retval = TRUE;
- else
- retval = FALSE;
-
- close (fd);
-
- if (retval == TRUE) {
-
- /* Try it with a bad file descriptor */
-
- fd = -1;
-
- error = fdatasync(fd);
- if ((errno == EBADF) && (error == -1))
- retval = TRUE;
- else
- retval = FALSE;
- }
-
- /* Okay - now the success case... */
-
- if (retval == TRUE) {
- fd = open ("testfile1.tst", O_RDWR);
- error = fdatasync(fd);
-
- if (error == 0)
- retval = TRUE;
- else
- retval = FALSE;
-
- close (fd);
-
- }
-
- /* assert (retval == TRUE);*/
-
- return (retval);
-}
-
-/* ---------------------------------------------------------------
- * UMaskTest function
- *
- * Hits the umask code.
- *
- * arguments: none
- * assumptions: umask function available.
- * actions: set umask to 0ctal 23.
- * set umask to Octal 22, retrieve the old value.
- *
- * returns: TRUE if old value is 23,
- * FALSE otherwise.
- *
- * ---------------------------------------------------------------
- */
-
-int UMaskTest (void) {
-
- int error = 0, retval = FALSE;
-
- umask (023);
- error = umask(022);
-
- if (error == 023)
- retval = TRUE;
- else
- retval = FALSE;
-
- /* assert (retval == TRUE);*/
-
- return(retval);
-
-}
-
-/* ---------------------------------------------------------------
- * UTimeTest function
- *
- * Hits the utime code. Does NOT test the functionality of the underlying utime
- * entry in the IMFS op table.
- *
- * arguments: none
- * assumptions: utime function available.
- * actions: set utime for an invalid filename.
- * set utime for a valid filename.
- *
- * returns: TRUE if time on valid file is set correctly and utime failed on an invaid filename.
- * FALSE otherwise.
- *
- * ---------------------------------------------------------------
- */
-
-int UTimeTest (void) {
-
- int error = 0, retval = FALSE;
- struct utimbuf time;
- struct stat fstat;
-
- /* First, an invalid filename. */
- error = utime("!This is an =invalid p@thname!!! :)", NULL);
-
- if (error == -1)
- retval = TRUE;
- else
- retval = FALSE;
-
- /* Now, the success test. */
- if (retval == TRUE) {
-
- time.actime = 12345;
- time.modtime = 54321;
-
- error = utime("testfile1.tst", &time);
-
- if (error == 0) {
-
- /* But, did it set the time? */
- stat ("testfile1.tst", &fstat);
-
- if ((fstat.st_atime == 12345) && (fstat.st_mtime == 54321 ))
- retval = TRUE;
- else
- retval = FALSE;
- }
-
- else
- retval = FALSE;
- }
-
- /* assert (retval == TRUE);*/
-
- return (retval);
-
-}
-
-/* ---------------------------------------------------------------
- * PipeTest function
- *
- * Hits the pipe code.
- *
- * arguments: none
- * assumptions: pipe function available.
- * actions: call pipe.
- *
- * returns: TRUE if pipe retuens ENOSYS,
- * FALSE otherwise.
- *
- * ---------------------------------------------------------------
- */
-
-int PipeTest (void) {
-
- int error = 0, retval = FALSE;
- int fd[2];
-
- error = pipe(fd);
-
- if ((error == -1) && (errno == ENOSYS))
- retval = TRUE;
- else
- retval = FALSE;
-
- /* assert (retval == TRUE);*/
-
- return(retval);
-
-}
-
-/* ---------------------------------------------------------------
- * PathConfTest function
- *
- * Hits the pathconf code.
- *
- * arguments: none
- * assumptions: pathconf function available.
- * actions: Try to pathconf a bad filename.
- * Try to pathconf a good filename.
- *
- * returns: TRUE if pathconf fails on bad file, succeeds on good file.
- * FALSE otherwise.
- *
- * ---------------------------------------------------------------
- */
-
-int PathConfTest (void) {
-
- int error = 0, retval = FALSE;
-
- error = pathconf("thisfiledoesnotexist", _PC_LINK_MAX);
-
- if (error == -1) {
- error = pathconf("testfile1.tst", _PC_LINK_MAX);
-
- if (error != -1)
- retval = TRUE;
- else
- retval = FALSE;
- }
-
- else
- retval = FALSE;
-
- /* assert (retval == TRUE);*/
-
- return(retval);
-
-}
-
-/* ---------------------------------------------------------------
- * FPathConfTest function
- *
- * Hits the fpathconf code.
- *
- * arguments: none
- * assumptions: fpathconf function available.
- * actions: Call fpathconf with all arguments, plus an invalid.
- *
- * returns: TRUE always.
- *
- * ---------------------------------------------------------------
- */
-
-int FPathConfTest (void) {
-
- int error = 0, retval = TRUE;
-
- int fd = -1;
-
- error = fpathconf(fd, _PC_LINK_MAX);
-
- if (error == -1) {
- fd = open("testfile1.tst", O_RDWR);
-
- error = fpathconf(fd, _PC_LINK_MAX);
- error = fpathconf(fd, _PC_MAX_CANON);
- error = fpathconf(fd, _PC_MAX_INPUT);
- error = fpathconf(fd, _PC_NAME_MAX);
- error = fpathconf(fd, _PC_PATH_MAX);
- error = fpathconf(fd, _PC_PIPE_BUF);
- error = fpathconf(fd, _PC_CHOWN_RESTRICTED);
- error = fpathconf(fd, _PC_NO_TRUNC);
- error = fpathconf(fd, _PC_VDISABLE);
- error = fpathconf(fd, _PC_ASYNC_IO);
- error = fpathconf(fd, _PC_PRIO_IO);
- error = fpathconf(fd, _PC_SYNC_IO);
- error = fpathconf(fd, 255);
-
- retval = TRUE;
- }
-
- else
- retval = FALSE;
-
- /* assert (retval == TRUE);*/
-
- return(retval);
-
-}
-
-/* ---------------------------------------------------------------
- * FSyncTest function
- *
- * Hits the fsync code.
- *
- * arguments: none
- * assumptions: open, fsync functions available.
- * actions: open test file,
- * try to fsync it.
- *
- * returns: TRUE if fsync doesn't return -1,
- * FALSE otherwise.
- *
- * ---------------------------------------------------------------
- */
-
-int FSyncTest (void) {
-
- int error = 0, retval = FALSE;
- int fd = -1;
-
- fd = open("testfile1.tst", O_RDWR);
-
- if (fd != -1) {
-
- error = fsync(fd);
-
- if (error != -1)
- retval = TRUE;
- else
- retval = FALSE;
-
- close(fd);
- }
-
- else
- retval = FALSE;
-
- /* assert (retval == TRUE);*/
-
- return(retval);
-
-}
-
-/* ---------------------------------------------------------------
- * Main function
- *
- * main entry point to the test
- *
- * ---------------------------------------------------------------
- */
-
-#if defined(__rtems__)
-int test_main(void)
-#else
-int main(
- int argc,
- char **argv
-)
-#endif
-{
- puts( "*** POSIX TEST 13 ***" );
-
- if (InitFiles() == TRUE) {
- printf ("\nFiles initialized successfully.\n");
-
- printf ("Testing device_lseek()... ");
- if (DeviceLSeekTest() == TRUE)
- printf ("Success.\n");
- else
- printf ("Failed!!!\n");
-
- printf ("Testing dup()............ ");
- if (DupTest() == TRUE)
- printf ("Success.\n");
- else
- printf ("Failed!!!\n");
-
- printf ("Testing dup2()........... ");
- if (Dup2Test() == TRUE)
- printf ("Success.\n");
- else
- printf ("Failed!!!\n");
-
- printf ("Testing fdatasync()...... ");
- if (FDataSyncTest() == TRUE)
- printf ("Success.\n");
- else
- printf ("Failed!!!\n");
-
- printf ("Testing umask().......... ");
- if (UMaskTest() == TRUE)
- printf ("Success.\n");
- else
- printf ("Failed!!!\n");
-
- printf ("Testing utime().......... ");
- if (UTimeTest() == TRUE)
- printf ("Success.\n");
- else
- printf ("Failed!!!\n");
-
- printf ("Testing pipe()........... ");
- if (PipeTest() == TRUE)
- printf ("Success.\n");
- else
- printf ("Failed!!!\n");
-
- printf ("Testing fsync().......... ");
- if (FSyncTest() == TRUE)
- printf ("Success.\n");
- else
- printf ("Failed!!!\n");
-
- printf ("Testing pathconf()....... ");
- if (PathConfTest() == TRUE)
- printf ("Success.\n");
- else
- printf ("Failed!!!\n");
-
- printf ("Testing fpathconf()...... ");
- if (FPathConfTest() == TRUE)
- printf ("Success.\n");
- else
- printf ("Failed!!!\n");
- }
-
-
- else
- printf ("\n\nError opening files for write!!!!\n");
-
- printf( "\n\n*** END OF TEST PSX13 ***" );
- exit(0);
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/testsuites/psxtests/psxcancel/Makefile.am b/testsuites/psxtests/psxcancel/Makefile.am
deleted file mode 100644
index cde45d8fff..0000000000
--- a/testsuites/psxtests/psxcancel/Makefile.am
+++ /dev/null
@@ -1,43 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = psxcancel
-
-MANAGERS = all
-
-C_FILES = init.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/psxtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CPPFLAGS = -I$(top_srcdir)/include
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/psxtests/psxcancel/init.c b/testsuites/psxtests/psxcancel/init.c
deleted file mode 100644
index 26536dad95..0000000000
--- a/testsuites/psxtests/psxcancel/init.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define CONFIGURE_INIT
-#include "system.h"
-#include <sched.h>
-
-void *POSIX_Init(
- void *argument
-)
-{
-
- puts( "\n\n*** POSIX CANCEL TEST ***" );
-
- puts( "*** END OF POSIX CANCEL TEST ***" );
- exit( 0 );
-
- return NULL; /* just so the compiler thinks we returned something */
-}
diff --git a/testsuites/psxtests/psxcancel/psxcancel.scn b/testsuites/psxtests/psxcancel/psxcancel.scn
deleted file mode 100644
index f6ef3ac9d3..0000000000
--- a/testsuites/psxtests/psxcancel/psxcancel.scn
+++ /dev/null
@@ -1,3 +0,0 @@
-*** POSIX CANCEL TEST ***
-
-*** END OF POSIX CANCEL TEST ***
diff --git a/testsuites/psxtests/psxfile01/Makefile.am b/testsuites/psxtests/psxfile01/Makefile.am
deleted file mode 100644
index 4cae479427..0000000000
--- a/testsuites/psxtests/psxfile01/Makefile.am
+++ /dev/null
@@ -1,41 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-VPATH = @srcdir@
-
-TEST = psxfile01
-
-MANAGERS = all
-
-C_FILES = main.c test.c test_cat.c test_extend.c test_write.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-DOCTYPES = scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/psxtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/psxtests/psxfile01/main.c b/testsuites/psxtests/psxfile01/main.c
deleted file mode 100644
index 9f253e881b..0000000000
--- a/testsuites/psxtests/psxfile01/main.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Simple test program -- simplified version of sample test hello.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-
-#include <bsp.h>
-
-void test_main( void );
-
-rtems_task Init(
- rtems_task_argument ignored
-)
-{
- test_main();
- exit( 0 );
-}
-
-/* configuration information */
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#define CONFIGURE_INIT
-
-#include <confdefs.h>
-
-/* end of file */
diff --git a/testsuites/psxtests/psxfile01/psxfile01.scn b/testsuites/psxtests/psxfile01/psxfile01.scn
deleted file mode 100644
index 22923a2369..0000000000
--- a/testsuites/psxtests/psxfile01/psxfile01.scn
+++ /dev/null
@@ -1,197 +0,0 @@
-
-
-*** FILE TEST 1 ***
-*************** Dump of Entire IMFS ***************
-/
-....dev/
-........console (device 0, 0)
-*************** End of Dump ***************
-stat of /dev/console
-....st_dev (0x0:0x0)
-....st_ino 3 may vary by small amount
-....mode = 00020771
-....nlink = 1
-....uid = 0
-....gid = 0
-....atime = Fri Jan 01 00:00:00 1988
-....mtime = Fri Jan 01 00:00:00 1988
-....ctime = Fri Jan 01 00:00:00 1988
-
-mkdir /dev/tty
-
-mkdir /usr
-mkdir /etc
-mkdir /tmp
-mkdir /tmp/..
-mkdir /tmp/
-mkdir /j/j1
-mkdir tmp
-
-rmdir /usr
-rmdir /dev
-rmdir /fred
-mknod /dev/test_console
-mknod /dev/tty/S3
-mknod /etc/passwd
-mkdir /tmp/my_dir
-mkfifo /c/my_dir
-mkdir /etc/passwd/j
-open /tmp/joel - should fail with ENOENT
-open /tmp/j
-open returned file descriptor 3
-close /tmp/j
-close /tmp/j again
-unlink /tmp/j
-unlink /tmp
-create and close /tmp/tom
-Attempt to recreate /tmp/tom
-create /tmp/john
-tcdrain /tmp/john
-mknod /tmp/joel
-(0)the first write!!!
-
-(10)the first write!!!
-
-stat( /tmp/joel ) returned
-....st_dev (0x0:0x0)
-....st_ino 10 may vary by small amount
-....mode = 00100700
-....nlink = 1
-....uid = 0
-....gid = 0
-....atime = Sat Dec 31 09:00:00 1988
-....mtime = Sat Dec 31 09:00:00 1988
-....ctime = Sat Dec 31 09:00:00 1988
-unlink /tmp/joel
-unlink /tmp/joel
-mknod /tmp/joel
-(514)the first write!!!
-
-(513)the first write!!!
-
-(24)the first write!!!
-
-(2)the first write!!!
-
-(1)the first write!!!
-
-(0)the first write!!!
-
-(0)rst write!!!
-
-(513)the first write!!!
-
-(139743)
-stat( /tmp/joel ) returned
-....st_dev (0x0:0x0)
-....st_ino 11 may vary by small amount
-....mode = 00100700
-....nlink = 1
-....uid = 0
-....gid = 0
-....atime = Sat Dec 31 09:00:00 1988
-....mtime = Sat Dec 31 09:00:00 1988
-....ctime = Sat Dec 31 09:00:00 1988
-stat of /tmp/j
-stat(/tmp/j) returned -1 (errno=2)
-....st_dev (0x0:0x0)
-....st_ino 3 may vary by small amount
-....mode = 00020771
-....nlink = 1
-....uid = 0
-....gid = 0
-....atime = Fri Jan 01 00:00:00 1988
-....mtime = Fri Jan 01 00:00:00 1988
-....ctime = Fri Jan 01 00:00:00 1988
-fopen of /tmp/j
-fprintf to /tmp/j
-(1) 26 characters written to the file
-(2) 26 characters written to the file
-(3) 26 characters written to the file
-(4) 26 characters written to the file
-(5) 26 characters written to the file
-....st_dev (0x0:0x0)
-....st_ino 12 may vary by small amount
-....mode = 00100660
-....nlink = 1
-....uid = 0
-....gid = 0
-....atime = Sat Dec 31 09:00:00 1988
-....mtime = Sat Dec 31 09:00:00 1988
-....ctime = Sat Dec 31 09:00:00 1988
-This is call 1 to fprintf
-This is call 2 to fprintf
-This is call 3 to fprintf
-This is call 4 to fprintf
-This is call 5 to fprintf
-....st_dev (0x0:0x0)
-....st_ino 12 may vary by small amount
-....mode = 00100660
-....nlink = 1
-....uid = 0
-....gid = 0
-....atime = Sat Dec 31 09:00:01 1988
-....mtime = Sat Dec 31 09:00:00 1988
-....ctime = Sat Dec 31 09:00:00 1988
-*************** Dump of Entire IMFS ***************
-/
-....dev/
-........console (device 0, 0)
-........tty/
-............S3 (device 255, 128)
-........test_console (device 0, 0)
-....etc/
-........passwd (file 0 0x0 0x0 0x0)
-....tmp/
-........my_dir/
-........tom (file 0 0x0 0x0 0x0)
-........john (file 0 0x0 0x0 0x0)
-........joel (file 279487 0x7d58d8 0x7d5388 0x7cfe38)
-........j (file 130 0x77a338 0x0 0x0)
-*************** End of Dump ***************
-truncate /tmp/j to length of 40
-....st_dev (0x0:0x0)
-....st_ino 12 may vary by small amount
-....mode = 00100660
-....nlink = 1
-....uid = 0
-....gid = 0
-....atime = Sat Dec 31 09:00:02 1988
-....mtime = Sat Dec 31 09:00:00 1988
-....ctime = Sat Dec 31 09:00:00 1988
-*************** Dump of Entire IMFS ***************
-/
-....dev/
-........console (device 0, 0)
-........tty/
-............S3 (device 255, 128)
-........test_console (device 0, 0)
-....etc/
-........passwd (file 0 0x0 0x0 0x0)
-....tmp/
-........my_dir/
-........tom (file 0 0x0 0x0 0x0)
-........john (file 0 0x0 0x0 0x0)
-........j (file 40 0x77a338 0x0 0x0)
-*************** End of Dump ***************
-truncate /tmp/j to length of 0
-truncate /tmp to length of 0 should fail with EISDIR
-
-21: Is a directory
-*************** Dump of Entire IMFS ***************
-/
-....dev/
-........console (device 0, 0)
-........tty/
-............S3 (device 255, 128)
-........test_console (device 0, 0)
-....etc/
-........passwd (file 0 0x0 0x0 0x0)
-....tmp/
-........my_dir/
-........tom (file 0 0x0 0x0 0x0)
-........john (file 0 0x0 0x0 0x0)
-........j (file 0 0x77a338 0x0 0x0)
-*************** End of Dump ***************
-*** END OF FILE TEST 1 ***
-
diff --git a/testsuites/psxtests/psxfile01/test.c b/testsuites/psxtests/psxfile01/test.c
deleted file mode 100644
index 3d90e6e712..0000000000
--- a/testsuites/psxtests/psxfile01/test.c
+++ /dev/null
@@ -1,500 +0,0 @@
-/*
- * Simple test program to exercise some of the basic functionality of
- * POSIX Files and Directories Support.
- *
- * This test assumes that the file system is initialized with the
- * following directory structure:
- *
- * XXXX fill this in.
- * /
- * /dev
- * /dev/XXX [where XXX includes at least console]
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <stdio.h>
-
-#include <tmacros.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#include <string.h>
-#include <ctype.h>
-
-#include <assert.h>
-#include <rtems.h>
-#include <rtems/libio.h>
-
-char test_write_buffer[ 1024 ];
-
-/*
- * File test support routines.
- */
-
-void test_cat(
- char *file,
- int offset_arg,
- int length
-);
-
-void test_write(
- char *file,
- off_t offset,
- char *buffer
-);
-
-void test_extend(
- char *file,
- off_t new_len
-);
-
-void IMFS_dump( void );
-int IMFS_memfile_maximum_size( void );
-
-/*
- * dump_statbuf
- */
-
-void dump_statbuf( struct stat *buf )
-{
- int major1;
- int minor1;
- int major2;
- int minor2;
-
- rtems_filesystem_split_dev_t( buf->st_dev, major1, minor1 );
- rtems_filesystem_split_dev_t( buf->st_rdev, major2, minor2 );
-
- printf( "....st_dev (0x%x:0x%x)\n", major1, minor1 );
- printf( "....st_ino %x may vary by small amount\n",
- (unsigned int) buf->st_ino );
- printf( "....mode = %08o\n", buf->st_mode );
- printf( "....nlink = %d\n", buf->st_nlink );
-
- printf( "....uid = %d\n", buf->st_uid );
- printf( "....gid = %d\n", buf->st_gid );
-
- printf( "....atime = %s", ctime(&buf->st_atime) );
- printf( "....mtime = %s", ctime(&buf->st_mtime) );
- printf( "....ctime = %s", ctime(&buf->st_ctime) );
-
-#if defined(__svr4__) && !defined(__PPC__) && !defined(__sun__)
- printf( "....st_blksize %x\n", buf.st_blksize );
- printf( "....st_blocks %x\n", buf.st_blocks );
-#endif
-
-}
-
-void stat_a_file(
- const char *file
-)
-{
- int status;
- struct stat statbuf;
-
- assert( file );
-
- printf( "stat( %s ) returned ", file );
- fflush( stdout );
-
- status = stat( file, &statbuf );
-
- if ( status == -1 ) {
- printf( ": %s\n", strerror( errno ) );
- } else {
- puts("");
- dump_statbuf( &statbuf );
- }
-
-}
-
-
-/*
- * Main entry point of the test
- */
-
-#if defined(__rtems__)
-int test_main(void)
-#else
-int main(
- int argc,
- char **argv
-)
-#endif
-{
- int status;
- int max_size;
- int fd;
- int i;
- struct stat buf;
- char buffer[128];
- FILE *file;
- time_t atime1;
- time_t mtime1;
- time_t ctime1;
- time_t atime2;
- time_t mtime2;
- time_t ctime2;
- rtems_status_code rtems_status;
- rtems_time_of_day time;
-
- printf( "\n\n*** FILE TEST 1 ***\n" );
-
- /*
- * Grab the maximum size of an in-memory file.
- */
-
- max_size = IMFS_memfile_maximum_size();
-
- build_time( &time, 12, 31, 1988, 9, 0, 0, 0 );
- rtems_status = rtems_clock_set( &time );
-
- /*
- * Dump an empty file system
- */
-
- IMFS_dump();
-
- /*
- * Simple stat() of /dev/console.
- */
-
- puts( "stat of /dev/console" );
- status = stat( "/dev/console", &buf );
- assert( !status );
-
- dump_statbuf( &buf );
-
- /*
- * Exercise mkdir() and some path evaluation.
- */
-
- puts( "" );
- puts( "mkdir /dev/tty" );
- status = mkdir( "/dev/tty", S_IRWXU );
- assert( !status );
-
- puts( "" );
- puts( "mkdir /usr" );
- status = mkdir( "/usr", S_IRWXU );
- assert( !status );
- puts( "mkdir /etc" );
- status = mkdir( "/etc", S_IRWXU );
- assert( !status );
-
- puts( "mkdir /tmp" );
- status = mkdir( "/tmp", S_IRWXU );
- assert( !status );
-
- /* this tests the ".." path in path name evaluation */
- puts( "mkdir /tmp/.." );
- status = mkdir( "/tmp/..", S_IRWXU );
- assert( status == -1 );
- assert( errno == EEXIST );
-
- /* now check out trailing separators */
- puts( "mkdir /tmp/" );
- status = mkdir( "/tmp/", S_IRWXU );
- assert( status == -1 );
- assert( errno == EEXIST );
-
- /* try to make a directory under a non-existent subdirectory */
- puts( "mkdir /j/j1" );
- status = mkdir( "/j/j1", S_IRWXU );
- assert( status == -1 );
- assert( errno == ENOENT );
-
- /* this tests the ability to make a directory in the current one */
- puts( "mkdir tmp" );
- status = mkdir( "tmp", S_IRWXU );
- assert( status == -1 );
- assert( errno == EEXIST );
-
- /* test rtems_filesystem_evaluate_path by sending NULL path */
- status = chdir( NULL );
- assert( status == -1 );
-
- /*
- * Now switch gears and exercise rmdir().
- */
-
- puts( "" );
- puts( "rmdir /usr" );
- status = rmdir( "/usr" );
- assert( !status );
-
- puts( "rmdir /dev" );
- status = rmdir( "/dev" );
- assert( status == -1 );
- assert( errno == ENOTEMPTY);
-
- puts( "rmdir /fred" );
- status = rmdir ("/fred");
- assert (status == -1);
- assert( errno == ENOENT );
-
- puts( "mknod /dev/test_console" );
- status = mknod( "/dev/test_console", S_IFCHR, 0LL );
- assert( !status );
-
- puts( "mknod /dev/tty/S3" );
- status = mknod( "/dev/tty/S3", S_IFCHR, 0xFF00000080LL );
- assert( !status );
-
- puts ("mknod /etc/passwd");
- status = mknod( "/etc/passwd", (S_IFREG | S_IRWXU), 0LL );
- assert( !status );
-
- puts( "mkdir /tmp/my_dir");
- status = mkdir( "/tmp/my_dir", S_IRWXU );
- assert( status == 0 );
-
- puts("mkfifo /c/my_dir" );
- status = mkfifo( "/c/my_dir", S_IRWXU );
- assert( status == -1 );
-
- /*
- * Try to make a directory under a file -- ERROR
- */
-
- puts( "mkdir /etc/passwd/j" );
- status = mkdir( "/etc/passwd/j", S_IRWXU );
- assert( status == -1 );
- assert( errno == ENOTDIR );
-
- /*
- * Simple open failure case on non-existent file
- */
-
- puts( "open /tmp/joel - should fail with ENOENT" );
- fd = open( "/tmp/joel", O_RDONLY );
- assert( fd == -1 );
- assert( errno == ENOENT );
-
- /*
- * Simple open case where the file is created.
- */
-
- puts( "open /tmp/j" );
- fd = open( "/tmp/j", O_RDWR|O_CREAT, S_IRWXU|S_IRWXG|S_IRWXO );
- assert( fd != -1 );
- printf( "open returned file descriptor %d\n", fd );
-
- puts( "close /tmp/j" );
- status = close( fd );
- assert( !status );
-
- puts( "close /tmp/j again" );
- status = close( fd );
- assert( status == -1 );
-
- puts( "unlink /tmp/j" );
- status = unlink( "/tmp/j" );
- assert( !status );
-
- puts( "unlink /tmp" );
- status = unlink( "/tmp" );
- assert( status );
-
- /*
- * Simple open failure. Trying to create an existing file.
- */
-
- puts("create and close /tmp/tom");
- fd = open( "/tmp/tom", O_CREAT, S_IRWXU|S_IRWXG|S_IRWXO );
- assert( fd != -1 );
- status = close( fd );
- assert( status == 0 );
-
- puts("Attempt to recreate /tmp/tom");
- fd = open( "/tmp/tom", O_CREAT | O_EXCL, S_IRWXU|S_IRWXG|S_IRWXO );
- assert( fd == -1 );
- assert( errno == EEXIST );
-
- puts("create /tmp/john");
- fd = open( "/tmp/john", O_RDWR|O_CREAT, S_IRWXU|S_IRWXG|S_IRWXO );
- assert( fd != -1 );
-
- puts("tcdrain /tmp/john" );
- status = tcdrain( fd );
- assert( status == 0 );
-
- /*
- * Test simple write to a file at offset 0
- */
-
- puts( "mknod /tmp/joel" );
- status = mknod( "/tmp/joel", (S_IFREG | S_IRWXU), 0LL );
- test_write( "/tmp/joel", 0, "the first write!!!\n" );
- test_cat( "/tmp/joel", 0, 0 );
-
- /*
- * Test simple write to a file at a non-0 offset in the first block
- */
-
- status = unlink( "/tmp/joel" );
- assert( !status );
-
- status = mknod( "/tmp/joel", (S_IFREG | S_IRWXU), 0LL );
- assert( !status );
-
- test_write( "/tmp/joel", 10, "the first write!!!\n" );
- test_cat( "/tmp/joel", 0, 0 );
- stat_a_file( "/tmp/joel" );
-
- /*
- * Test simple write to a file at a non-0 offset in the second block. Then
- * try to read from various offsets and lengths.
- */
-
- puts("unlink /tmp/joel");
- status = unlink( "/tmp/joel" );
- assert( !status );
-
- /* Test a failure path */
-
- puts( "unlink /tmp/joel" );
- status = unlink( "/tmp/joel" );
- assert( status == -1 );
-
- puts( "mknod /tmp/joel");
- status = mknod( "/tmp/joel", (S_IFREG | S_IRWXU), 0LL );
- assert( !status );
-
- test_write( "/tmp/joel", 514, "the first write!!!\n" );
- test_write( "/tmp/joel", 1, test_write_buffer );
- test_write( "/tmp/joel", 63, test_write_buffer );
- test_cat( "/tmp/joel", 0, 1 );
- test_cat( "/tmp/joel", 1, 1 );
- test_cat( "/tmp/joel", 490, 1 );
- test_cat( "/tmp/joel", 512, 1 );
- test_cat( "/tmp/joel", 513, 1 );
- test_cat( "/tmp/joel", 514, 1 );
- test_cat( "/tmp/joel", 520, 1 );
- test_cat( "/tmp/joel", 1, 1024 );
-
- /*
- * Read from a much longer file so we can descend into doubly and
- * triply indirect blocks.
- */
-
- test_extend( "/tmp/joel", max_size - 1 );
- test_cat( "/tmp/joel", max_size / 2, 1024 );
-
- stat_a_file( "/tmp/joel" );
-
- /*
- * Now try to use a FILE * descriptor
- *
- * /tmp/j should not exist at this point.
- */
-
- puts( "stat of /tmp/j" );
- errno = 0;
- status = stat( "/tmp/j", &buf );
- printf( "stat(/tmp/j) returned %d (errno=%d)\n", status, errno );
- dump_statbuf( &buf );
-
- puts( "fopen of /tmp/j" );
- file = fopen( "/tmp/j", "w+" );
- assert( file );
-
- puts( "fprintf to /tmp/j" );
- for (i=1 ; i<=5 ; i++) {
- status = fprintf( file, "This is call %d to fprintf\n", i );
- assert( status );
- printf( "(%d) %d characters written to the file\n", i, status );
- }
-
- fflush( file );
-
- status = stat( "/tmp/j", &buf );
- assert( !status );
- dump_statbuf( &buf );
- atime2 = buf.st_atime;
- mtime2 = buf.st_mtime;
- ctime2 = buf.st_ctime;
-
-
- status = rtems_task_wake_after( 1 * TICKS_PER_SECOND );
- rewind( file );
- while ( fgets(buffer, 128, file) )
- printf( buffer );
-
- /*
- * Verify only atime changed for a read.
- */
- status = stat( "/tmp/j", &buf );
- assert( !status );
- dump_statbuf( &buf );
- atime1 = buf.st_atime;
- mtime1 = buf.st_mtime;
- ctime1 = buf.st_ctime;
- assert( atime1 != atime2);
- assert( mtime1 == mtime2);
- assert( ctime1 == ctime2);
-
- IMFS_dump();
-
- unlink( "/tmp/joel" );
-
- /*
- * Now truncate a file
- */
-
- status = rtems_task_wake_after( 1 * TICKS_PER_SECOND );
- puts( "truncate /tmp/j to length of 40" );
- status = truncate( "/tmp/j", 40 );
- assert( !status );
-
- /*
- * Verify truncate changed only atime.
- */
- status = stat( "/tmp/j", &buf );
- assert( !status );
- dump_statbuf( &buf );
- atime2 = buf.st_atime;
- mtime2 = buf.st_mtime;
- ctime2 = buf.st_ctime;
- assert( atime1 != atime2);
- assert( mtime1 == mtime2);
- assert( ctime1 == ctime2);
-
- IMFS_dump();
-
- /* try to truncate the console and see what happens */
- status = truncate( "/dev/console", 40 );
- assert(status == -1 );
-
- puts( "truncate /tmp/j to length of 0" );
- status = truncate( "/tmp/j", 0 );
- assert( !status );
-
- puts( "truncate /tmp to length of 0 should fail with EISDIR\n");
- status = truncate( "/tmp", 0 );
- assert( status == -1 );
- printf( "%d: %s\n", errno, strerror( errno ) );
- assert( errno == EISDIR );
-
- IMFS_dump();
-
- status = truncate( "/tmp/fred", 10 );
- assert( status == -1);
-
- rtems_status = rtems_io_register_name( "/dev/console", 0, 0 );
-
- printf( "*** END OF FILE TEST 1 ***\n" );
- exit( 0 );
-}
-
-
diff --git a/testsuites/psxtests/psxfile01/test_cat.c b/testsuites/psxtests/psxfile01/test_cat.c
deleted file mode 100644
index f6daecfad7..0000000000
--- a/testsuites/psxtests/psxfile01/test_cat.c
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * A test support function which performs a crude version of
- * "cat" so you can look at specific parts of a file.
- *
- * $Id$
- */
-
-#include <stdio.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#include <string.h>
-#include <ctype.h>
-
-#include <assert.h>
-
-/*
- * test_cat routine
- */
-
-unsigned char test_cat_buffer[ 1024 ];
-
-void test_cat(
- char *file,
- int offset_arg,
- int length
-)
-{
- int fd;
- int status;
- int is_printable = 0;
- int my_length;
- int i;
- unsigned char c;
- int count = 0;
- off_t offset = (off_t)offset_arg;
-
- my_length = (length) ? length : sizeof( test_cat_buffer );
- assert( my_length <= sizeof( test_cat_buffer ) );
-
- fd = open( file, O_RDONLY );
- if ( fd == -1 ) {
- printf( "test_cat: open( %s ) failed : %s\n", file, strerror( errno ) );
- exit( 0 );
- }
-
- for ( ;; ) {
- status = lseek( fd, offset, SEEK_SET );
- assert( status != -1 );
-
- status = read( fd, test_cat_buffer, sizeof(test_cat_buffer) );
- if ( status <= 0 ) {
- if (!is_printable)
- printf( "(%d)", count );
- puts( "" );
- break;
- }
-
- for ( i=0 ; i<status ; i++ ) {
- c = test_cat_buffer[i];
- if (isprint(c) || isspace(c)) {
- if (!is_printable) {
- printf( "(%d)", count );
- count = 0;
- is_printable = 1;
- }
- putchar(c);
- } else {
- is_printable = 0;
- count++;
- }
- }
- offset += status;
- }
-
- status = close( fd );
- assert( !status );
-}
diff --git a/testsuites/psxtests/psxfile01/test_extend.c b/testsuites/psxtests/psxfile01/test_extend.c
deleted file mode 100644
index ae284aab46..0000000000
--- a/testsuites/psxtests/psxfile01/test_extend.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * A test support function which extends the file to the specified
- * length. This handles the implied open(), lseek(), write(), and close()
- * operations.
- *
- * The defined behavior is a seek() followed by a write() extends the file
- * and zero fills the new length part.
- *
- * $Id$
- */
-
-#include <stdio.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#include <string.h>
-#include <ctype.h>
-
-#include <assert.h>
-
-/*
- * test_extend routine
- */
-
-void test_extend(
- char *file,
- off_t offset
-)
-{
- int fd;
- int status;
- char c = 0;
-
- fd = open( file, O_WRONLY );
- if ( fd == -1 ) {
- printf( "test_extend: open( %s ) failed : %s\n", file, strerror( errno ) );
- exit( 0 );
- }
-
- status = lseek( fd, offset - 1, SEEK_SET );
- assert( status != -1 );
-
- status = write( fd, &c, 1 );
- if ( status == -1 ) {
- printf( "test_extend: write( %s ) failed : %s\n", file, strerror( errno ) );
- exit( 0 );
- }
-
- if ( status != 1 ) {
- printf( "test_extend: write( %s ) only wrote %d of %d bytes\n",
- file, status, 1 );
- exit( 0 );
- }
-
- status = close( fd );
- assert( !status );
-}
diff --git a/testsuites/psxtests/psxfile01/test_write.c b/testsuites/psxtests/psxfile01/test_write.c
deleted file mode 100644
index c025734532..0000000000
--- a/testsuites/psxtests/psxfile01/test_write.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * A test support function which performs a write() and
- * handles implied open(), lseek(), write(), and close() operations.
- *
- * $Id$
- */
-
-#include <stdio.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#include <string.h>
-
-#include <assert.h>
-
-/*
- * test_write routine
- */
-
-void test_write(
- char *file,
- off_t offset,
- char *buffer
-)
-{
- int fd;
- int status;
- int length;
-
-
- length = strlen( buffer );
-
- fd = open( file, O_WRONLY );
- if ( fd == -1 ) {
- printf( "test_write: open( %s ) failed : %s\n", file, strerror( errno ) );
- exit( 0 );
- }
-
- status = lseek( fd, offset, SEEK_SET );
- assert( status != -1 );
-
- status = write( fd, buffer, length );
- if ( status == -1 ) {
- printf( "test_write: write( %s ) failed : %s\n", file, strerror( errno ) );
- exit( 0 );
- }
-
- if ( status != length ) {
- printf( "test_write: write( %s ) only wrote %d of %d bytes\n",
- file, status, length );
- exit( 0 );
- }
-
- status = close( fd );
- assert( !status );
-}
diff --git a/testsuites/psxtests/psxhdrs/Makefile.am b/testsuites/psxtests/psxhdrs/Makefile.am
deleted file mode 100644
index 6233e205d2..0000000000
--- a/testsuites/psxtests/psxhdrs/Makefile.am
+++ /dev/null
@@ -1,39 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-C_FILES = clock01.c clock02.c clock03.c clock04.c clock05.c clock06.c cond01.c \
- cond02.c cond03.c cond04.c cond05.c cond06.c cond07.c cond08.c cond09.c \
- cond10.c key01.c key02.c key03.c key04.c mutex01.c mutex02.c mutex03.c \
- mutex04.c mutex05.c mutex06.c mutex07.c mutex08.c mutex09.c mutex10.c \
- mutex11.c mutex12.c mutex13.c mutex14.c mutex15.c mutex16.c pthread01.c \
- pthread02.c pthread03.c pthread04.c pthread05.c pthread06.c pthread07.c \
- pthread08.c pthread09.c pthread10.c pthread11.c pthread12.c pthread13.c \
- pthread14.c pthread15.c pthread16.c pthread17.c pthread18.c pthread19.c \
- pthread20.c pthread21.c pthread22.c pthread23.c pthread24.c pthread25.c \
- pthread26.c pthread27.c pthread28.c pthread29.c pthread30.c pthread31.c \
- pthread32.c pthread33.c pthread34.c pthread35.c pthread36.c proc01.c \
- proc02.c proc03.c proc04.c proc05.c proc06.c proc07.c proc08.c proc09.c \
- proc10.c proc11.c proc12.c proc13.c proc14.c sched01.c sched02.c \
- sched03.c sched04.c sched05.c sched06.c sched07.c sched08.c signal01.c \
- signal02.c signal03.c signal04.c signal05.c signal06.c signal07.c \
- signal08.c signal09.c signal10.c signal11.c signal12.c signal13.c \
- signal14.c signal15.c signal16.c signal17.c signal18.c signal19.c \
- signal20.c signal21.c signal22.c time01.c time02.c time03.c time04.c \
- time05.c time06.c time07.c time08.c time09.c time10.c time11.c time12.c \
- time13.c timer01.c timer02.c timer03.c timer04.c timer05.c timer06.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-SRCS = $(C_FILES)
-OBJS = $(C_O_FILES)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-
-all-local: ${ARCH} ${OBJS}
-
-EXTRA_DIST = $(C_FILES)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/psxtests/psxhdrs/clock01.c b/testsuites/psxtests/psxhdrs/clock01.c
deleted file mode 100644
index ab520983e2..0000000000
--- a/testsuites/psxtests/psxhdrs/clock01.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <time.h>
-
-#ifndef _POSIX_TIMERS
-#error "rtems is supposed to have clock_gettime"
-#endif
-
-void test( void )
-{
- clockid_t clock_id = 0;
- struct timespec tp;
- int result;
-
- result = clock_gettime( clock_id, &tp );
-}
diff --git a/testsuites/psxtests/psxhdrs/clock02.c b/testsuites/psxtests/psxhdrs/clock02.c
deleted file mode 100644
index c12aa3c906..0000000000
--- a/testsuites/psxtests/psxhdrs/clock02.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <time.h>
-
-#ifndef _POSIX_TIMERS
-#error "rtems is supposed to have clock_settime"
-#endif
-
-void test( void )
-{
- clockid_t clock_id = 0;
- struct timespec tp;
- int result;
-
- result = clock_settime( clock_id, &tp );
-}
diff --git a/testsuites/psxtests/psxhdrs/clock03.c b/testsuites/psxtests/psxhdrs/clock03.c
deleted file mode 100644
index 1e44eea91a..0000000000
--- a/testsuites/psxtests/psxhdrs/clock03.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <time.h>
-
-#ifndef _POSIX_TIMERS
-#error "rtems is supposed to have clock_getres"
-#endif
-
-void test( void )
-{
- clockid_t clock_id = 0;
- struct timespec res;
- int result;
-
- result = clock_getres( clock_id, &res );
-}
diff --git a/testsuites/psxtests/psxhdrs/clock04.c b/testsuites/psxtests/psxhdrs/clock04.c
deleted file mode 100644
index b65320d11e..0000000000
--- a/testsuites/psxtests/psxhdrs/clock04.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <time.h>
-
-#ifndef _POSIX_CPUTIME
-#error "rtems is supposed to have clock_getcpuclockid"
-#endif
-
-void test( void )
-{
- pid_t pid = 0;
- clockid_t clock_id;
- int result;
-
- result = clock_getcpuclockid( pid, &clock_id );
-}
diff --git a/testsuites/psxtests/psxhdrs/clock05.c b/testsuites/psxtests/psxhdrs/clock05.c
deleted file mode 100644
index a8b1357eb6..0000000000
--- a/testsuites/psxtests/psxhdrs/clock05.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <time.h>
-
-#ifndef _POSIX_CPUTIME
-#error "rtems is supposed to have clock_setenable_attr"
-#endif
-#ifndef _POSIX_THREAD_CPUTIME
-#error "rtems is supposed to have clock_setenable_attr"
-#endif
-
-void test( void )
-{
- clockid_t clock_id = 0;
- int attr;
- int result;
-
- attr = CLOCK_ENABLED;
- attr = CLOCK_DISABLED;
-
- result = clock_setenable_attr( clock_id, attr );
-}
diff --git a/testsuites/psxtests/psxhdrs/clock06.c b/testsuites/psxtests/psxhdrs/clock06.c
deleted file mode 100644
index eac0169ced..0000000000
--- a/testsuites/psxtests/psxhdrs/clock06.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <time.h>
-
-#ifndef _POSIX_CPUTIME
-#error "rtems is supposed to have clock_getenable_attr"
-#endif
-#ifndef _POSIX_THREAD_CPUTIME
-#error "rtems is supposed to have clock_getenable_attr"
-#endif
-
-void test( void )
-{
- clockid_t clock_id = 0;
- int attr;
- int result;
-
- result = clock_getenable_attr( clock_id, &attr );
-}
diff --git a/testsuites/psxtests/psxhdrs/cond01.c b/testsuites/psxtests/psxhdrs/cond01.c
deleted file mode 100644
index 28cf76d8bb..0000000000
--- a/testsuites/psxtests/psxhdrs/cond01.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREADS
-#error "rtems is supposed to have pthread_condattr_init"
-#endif
-
-void test( void )
-{
- pthread_condattr_t attribute;
- int result;
-
- result = pthread_condattr_init( &attribute );
-}
diff --git a/testsuites/psxtests/psxhdrs/cond02.c b/testsuites/psxtests/psxhdrs/cond02.c
deleted file mode 100644
index 1f6c3cfeff..0000000000
--- a/testsuites/psxtests/psxhdrs/cond02.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREADS
-#error "rtems is supposed to have pthread_condattr_destroy"
-#endif
-
-void test( void )
-{
- pthread_condattr_t attribute;
- int result;
-
- result = pthread_condattr_destroy( &attribute );
-}
diff --git a/testsuites/psxtests/psxhdrs/cond03.c b/testsuites/psxtests/psxhdrs/cond03.c
deleted file mode 100644
index 2bb7e29445..0000000000
--- a/testsuites/psxtests/psxhdrs/cond03.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREADS
-#error "rtems is supposed to have pthread_cond_init"
-#endif
-
-void test( void )
-{
- pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
- pthread_condattr_t attribute;
- int result;
-
- result = pthread_cond_init( &cond, &attribute );
-}
diff --git a/testsuites/psxtests/psxhdrs/cond04.c b/testsuites/psxtests/psxhdrs/cond04.c
deleted file mode 100644
index 6dcf08b94a..0000000000
--- a/testsuites/psxtests/psxhdrs/cond04.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREADS
-#error "rtems is supposed to have pthread_cond_destroy"
-#endif
-
-void test( void )
-{
- pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
- int result;
-
- result = pthread_cond_destroy( &cond );
-}
diff --git a/testsuites/psxtests/psxhdrs/cond05.c b/testsuites/psxtests/psxhdrs/cond05.c
deleted file mode 100644
index a7a9a2e207..0000000000
--- a/testsuites/psxtests/psxhdrs/cond05.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREADS
-#error "rtems is supposed to have pthread_cond_signal"
-#endif
-
-void test( void )
-{
- pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
- int result;
-
- result = pthread_cond_signal( &cond );
-}
diff --git a/testsuites/psxtests/psxhdrs/cond06.c b/testsuites/psxtests/psxhdrs/cond06.c
deleted file mode 100644
index 25a43087cd..0000000000
--- a/testsuites/psxtests/psxhdrs/cond06.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREADS
-#error "rtems is supposed to have pthread_cond_wait"
-#endif
-
-void test( void )
-{
- pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
- pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
- int result;
-
- result = pthread_cond_wait( &cond, &mutex );
-}
diff --git a/testsuites/psxtests/psxhdrs/cond07.c b/testsuites/psxtests/psxhdrs/cond07.c
deleted file mode 100644
index a88c16bd3c..0000000000
--- a/testsuites/psxtests/psxhdrs/cond07.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREADS
-#error "rtems is supposed to have pthread_cond_timedwait"
-#endif
-
-void test( void )
-{
- pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
- pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
- struct timespec abstime;
- int result;
-
- result = pthread_cond_timedwait( &cond, &mutex, &abstime );
-}
diff --git a/testsuites/psxtests/psxhdrs/cond08.c b/testsuites/psxtests/psxhdrs/cond08.c
deleted file mode 100644
index 353887c303..0000000000
--- a/testsuites/psxtests/psxhdrs/cond08.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREADS
-#error "rtems is supposed to have pthread_condattr_getpshared"
-#endif
-#ifndef _POSIX_THREAD_PROCESS_SHARED
-#error "rtems is supposed to have pthread_condattr_setpshared"
-#endif
-
-void test( void )
-{
- pthread_condattr_t attribute;
- int pshared;
- int result;
-
- result = pthread_condattr_getpshared( &attribute, &pshared );
-}
diff --git a/testsuites/psxtests/psxhdrs/cond09.c b/testsuites/psxtests/psxhdrs/cond09.c
deleted file mode 100644
index 0e5d10dbf4..0000000000
--- a/testsuites/psxtests/psxhdrs/cond09.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREADS
-#error "rtems is supposed to have pthread_condattr_setpshared"
-#endif
-#ifndef _POSIX_THREAD_PROCESS_SHARED
-#error "rtems is supposed to have pthread_condattr_setpshared"
-#endif
-
-void test( void )
-{
- pthread_condattr_t attribute;
- int pshared;
- int result;
-
- pshared = PTHREAD_PROCESS_SHARED;
- pshared = PTHREAD_PROCESS_PRIVATE;
-
- result = pthread_condattr_setpshared( &attribute, pshared );
-}
diff --git a/testsuites/psxtests/psxhdrs/cond10.c b/testsuites/psxtests/psxhdrs/cond10.c
deleted file mode 100644
index 4147fe4c24..0000000000
--- a/testsuites/psxtests/psxhdrs/cond10.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREADS
-#error "rtems is supposed to have pthread_cond_broadcast"
-#endif
-
-void test( void )
-{
- pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
- int result;
-
- result = pthread_cond_broadcast( &cond );
-}
diff --git a/testsuites/psxtests/psxhdrs/key01.c b/testsuites/psxtests/psxhdrs/key01.c
deleted file mode 100644
index b61e61a79f..0000000000
--- a/testsuites/psxtests/psxhdrs/key01.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREADS
-#error "rtems is supposed to have pthread_key_create"
-#endif
-
-void key_destructor(
- void *argument
-)
-{
-}
-
-void test( void )
-{
- pthread_key_t key;
- int result;
-
- result = pthread_key_create( &key, key_destructor );
-}
diff --git a/testsuites/psxtests/psxhdrs/key02.c b/testsuites/psxtests/psxhdrs/key02.c
deleted file mode 100644
index c8e88a1fee..0000000000
--- a/testsuites/psxtests/psxhdrs/key02.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREADS
-#error "rtems is supposed to have pthread_setspecific"
-#endif
-
-void test( void )
-{
- pthread_key_t key;
- int value;
- int result;
-
- key = 0;
- value = 0;
-
- result = pthread_setspecific( key, &value );
-}
diff --git a/testsuites/psxtests/psxhdrs/key03.c b/testsuites/psxtests/psxhdrs/key03.c
deleted file mode 100644
index ca8b4c3199..0000000000
--- a/testsuites/psxtests/psxhdrs/key03.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREADS
-#error "rtems is supposed to have pthread_getspecific"
-#endif
-
-void test( void )
-{
- pthread_key_t key;
- void *value;
-
- key = 0;
-
- value = pthread_getspecific( key );
-}
diff --git a/testsuites/psxtests/psxhdrs/key04.c b/testsuites/psxtests/psxhdrs/key04.c
deleted file mode 100644
index c03977f223..0000000000
--- a/testsuites/psxtests/psxhdrs/key04.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREADS
-#error "rtems is supposed to have pthread_key_delete"
-#endif
-
-void test( void )
-{
- pthread_key_t key = 0;
- int result;
-
- result = pthread_key_delete( key );
-}
diff --git a/testsuites/psxtests/psxhdrs/mutex01.c b/testsuites/psxtests/psxhdrs/mutex01.c
deleted file mode 100644
index fad7f89845..0000000000
--- a/testsuites/psxtests/psxhdrs/mutex01.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREADS
-#error "rtems is supposed to have pthread_mutexattr_init"
-#endif
-
-void test( void )
-{
- pthread_mutexattr_t attribute;
- int result;
-
- result = pthread_mutexattr_init( &attribute );
-}
diff --git a/testsuites/psxtests/psxhdrs/mutex02.c b/testsuites/psxtests/psxhdrs/mutex02.c
deleted file mode 100644
index 70a196c5b5..0000000000
--- a/testsuites/psxtests/psxhdrs/mutex02.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREADS
-#error "rtems is supposed to have pthread_mutexattr_destroy"
-#endif
-
-void test( void )
-{
- pthread_mutexattr_t attribute;
- int result;
-
- result = pthread_mutexattr_destroy( &attribute );
-}
diff --git a/testsuites/psxtests/psxhdrs/mutex03.c b/testsuites/psxtests/psxhdrs/mutex03.c
deleted file mode 100644
index 32f93d46b4..0000000000
--- a/testsuites/psxtests/psxhdrs/mutex03.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREADS
-#error "rtems is supposed to have pthread_mutex_init"
-#endif
-
-void test( void )
-{
- pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
- pthread_mutexattr_t attribute;
- int result;
-
- result = pthread_mutex_init( &mutex, &attribute );
-}
diff --git a/testsuites/psxtests/psxhdrs/mutex04.c b/testsuites/psxtests/psxhdrs/mutex04.c
deleted file mode 100644
index 54c52f3198..0000000000
--- a/testsuites/psxtests/psxhdrs/mutex04.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREADS
-#error "rtems is supposed to have pthread_mutex_destroy"
-#endif
-
-void test( void )
-{
- pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
- int result;
-
- result = pthread_mutex_destroy( &mutex );
-}
diff --git a/testsuites/psxtests/psxhdrs/mutex05.c b/testsuites/psxtests/psxhdrs/mutex05.c
deleted file mode 100644
index 2b3ce61b18..0000000000
--- a/testsuites/psxtests/psxhdrs/mutex05.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREADS
-#error "rtems is supposed to have pthread_mutex_lock"
-#endif
-
-void test( void )
-{
- pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
- int result;
-
- result = pthread_mutex_lock( &mutex );
-}
diff --git a/testsuites/psxtests/psxhdrs/mutex06.c b/testsuites/psxtests/psxhdrs/mutex06.c
deleted file mode 100644
index 7fa549000f..0000000000
--- a/testsuites/psxtests/psxhdrs/mutex06.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREADS
-#error "rtems is supposed to have pthread_mutex_unlock"
-#endif
-
-void test( void )
-{
- pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
- int result;
-
- result = pthread_mutex_unlock( &mutex );
-}
diff --git a/testsuites/psxtests/psxhdrs/mutex07.c b/testsuites/psxtests/psxhdrs/mutex07.c
deleted file mode 100644
index fc4cc1fb93..0000000000
--- a/testsuites/psxtests/psxhdrs/mutex07.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREAD_PRIO_INHERIT
-#error "rtems is supposed to have pthread_mutexattr_setprotocol"
-#endif
-#ifndef _POSIX_THREAD_PRIO_PROTECT
-#error "rtems is supposed to have pthread_mutexattr_setprotocol"
-#endif
-
-void test( void )
-{
- pthread_mutexattr_t attribute;
- int protocol;
- int result;
-
- protocol = PTHREAD_PRIO_NONE;
- protocol = PTHREAD_PRIO_INHERIT;
- protocol = PTHREAD_PRIO_PROTECT;
-
- result = pthread_mutexattr_setprotocol( &attribute, protocol );
-}
diff --git a/testsuites/psxtests/psxhdrs/mutex08.c b/testsuites/psxtests/psxhdrs/mutex08.c
deleted file mode 100644
index e46712b94c..0000000000
--- a/testsuites/psxtests/psxhdrs/mutex08.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREAD_PRIO_INHERIT
-#error "rtems is supposed to have pthread_mutexattr_getprioceiling"
-#endif
-#ifndef _POSIX_THREAD_PRIO_PROTECT
-#error "rtems is supposed to have pthread_mutexattr_getprioceiling"
-#endif
-
-void test( void )
-{
- pthread_mutexattr_t attribute;
- int prioceiling = 0;
- int result;
-
- result = pthread_mutexattr_getprioceiling( &attribute, &prioceiling );
-}
diff --git a/testsuites/psxtests/psxhdrs/mutex09.c b/testsuites/psxtests/psxhdrs/mutex09.c
deleted file mode 100644
index 4b8aff0a55..0000000000
--- a/testsuites/psxtests/psxhdrs/mutex09.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREAD_PRIO_INHERIT
-#error "rtems is supposed to have pthread_mutexattr_setprioceiling"
-#endif
-#ifndef _POSIX_THREAD_PRIO_PROTECT
-#error "rtems is supposed to have pthread_mutexattr_setprioceiling"
-#endif
-
-void test( void )
-{
- pthread_mutexattr_t attribute;
- int prioceiling = 0;
- int result;
-
- result = pthread_mutexattr_setprioceiling( &attribute, prioceiling );
-}
diff --git a/testsuites/psxtests/psxhdrs/mutex10.c b/testsuites/psxtests/psxhdrs/mutex10.c
deleted file mode 100644
index 550906b8ae..0000000000
--- a/testsuites/psxtests/psxhdrs/mutex10.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREADS
-#error "rtems is supposed to have pthread_mutexattr_getpshared"
-#endif
-#ifndef _POSIX_THREAD_PROCESS_SHARED
-#error "rtems is supposed to have pthread_mutexattr_setpshared"
-#endif
-
-void test( void )
-{
- pthread_mutexattr_t attribute;
- int pshared;
- int result;
-
- result = pthread_mutexattr_getpshared( &attribute, &pshared );
-}
diff --git a/testsuites/psxtests/psxhdrs/mutex11.c b/testsuites/psxtests/psxhdrs/mutex11.c
deleted file mode 100644
index 8d50790ddf..0000000000
--- a/testsuites/psxtests/psxhdrs/mutex11.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREADS
-#error "rtems is supposed to have pthread_mutexattr_setpshared"
-#endif
-#ifndef _POSIX_THREAD_PROCESS_SHARED
-#error "rtems is supposed to have pthread_mutexattr_setpshared"
-#endif
-
-void test( void )
-{
- pthread_mutexattr_t attribute;
- int pshared;
- int result;
-
- pshared = PTHREAD_PROCESS_SHARED;
- pshared = PTHREAD_PROCESS_PRIVATE;
-
- result = pthread_mutexattr_setpshared( &attribute, pshared );
-}
diff --git a/testsuites/psxtests/psxhdrs/mutex12.c b/testsuites/psxtests/psxhdrs/mutex12.c
deleted file mode 100644
index 0fcba60e29..0000000000
--- a/testsuites/psxtests/psxhdrs/mutex12.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREADS
-#error "rtems is supposed to have pthread_mutex_trylock"
-#endif
-
-void test( void )
-{
- pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
- int result;
-
- result = pthread_mutex_trylock( &mutex );
-}
diff --git a/testsuites/psxtests/psxhdrs/mutex13.c b/testsuites/psxtests/psxhdrs/mutex13.c
deleted file mode 100644
index d3027a06a9..0000000000
--- a/testsuites/psxtests/psxhdrs/mutex13.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREADS
-#error "rtems is supposed to have pthread_mutex_timedlock"
-#endif
-#ifndef _POSIX_TIMEOUTS
-#error "rtems is supposed to have pthread_mutex_timedlock"
-#endif
-
-void test( void )
-{
- pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
- struct timespec timeout;
- int result;
-
- result = pthread_mutex_timedlock( &mutex, &timeout );
-}
diff --git a/testsuites/psxtests/psxhdrs/mutex14.c b/testsuites/psxtests/psxhdrs/mutex14.c
deleted file mode 100644
index 966cfc58ba..0000000000
--- a/testsuites/psxtests/psxhdrs/mutex14.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREAD_PRIO_INHERIT
-#error "rtems is supposed to have pthread_mutexattr_getprotocol"
-#endif
-#ifndef _POSIX_THREAD_PRIO_PROTECT
-#error "rtems is supposed to have pthread_mutexattr_getprotocol"
-#endif
-
-void test( void )
-{
- pthread_mutexattr_t attribute;
- int protocol;
- int result;
-
- result = pthread_mutexattr_getprotocol( &attribute, &protocol );
-}
diff --git a/testsuites/psxtests/psxhdrs/mutex15.c b/testsuites/psxtests/psxhdrs/mutex15.c
deleted file mode 100644
index 25cab34a2a..0000000000
--- a/testsuites/psxtests/psxhdrs/mutex15.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREAD_PRIO_INHERIT
-#error "rtems is supposed to have pthread_mutex_getprioceiling"
-#endif
-#ifndef _POSIX_THREAD_PRIO_PROTECT
-#error "rtems is supposed to have pthread_mutex_getprioceiling"
-#endif
-
-void test( void )
-{
- pthread_mutex_t mutex;
- int prioceiling;
- int result;
-
- result = pthread_mutex_getprioceiling( &mutex, &prioceiling );
-}
diff --git a/testsuites/psxtests/psxhdrs/mutex16.c b/testsuites/psxtests/psxhdrs/mutex16.c
deleted file mode 100644
index be0c0ce135..0000000000
--- a/testsuites/psxtests/psxhdrs/mutex16.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREAD_PRIO_INHERIT
-#error "rtems is supposed to have pthread_mutex_setprioceiling"
-#endif
-#ifndef _POSIX_THREAD_PRIO_PROTECT
-#error "rtems is supposed to have pthread_mutex_setprioceiling"
-#endif
-
-void test( void )
-{
- pthread_mutex_t mutex;
- int prioceiling;
- int oldceiling;
- int result;
-
- prioceiling = 0;
-
- result = pthread_mutex_setprioceiling( &mutex, prioceiling, &oldceiling );
-}
diff --git a/testsuites/psxtests/psxhdrs/proc01.c b/testsuites/psxtests/psxhdrs/proc01.c
deleted file mode 100644
index c29deb0f3d..0000000000
--- a/testsuites/psxtests/psxhdrs/proc01.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h>
-
-void test( void )
-{
- pid_t pid;
-
- pid = getpid();
-}
diff --git a/testsuites/psxtests/psxhdrs/proc02.c b/testsuites/psxtests/psxhdrs/proc02.c
deleted file mode 100644
index 721f05f15f..0000000000
--- a/testsuites/psxtests/psxhdrs/proc02.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h>
-
-void test( void )
-{
- pid_t pid;
-
- pid = getppid();
-}
diff --git a/testsuites/psxtests/psxhdrs/proc03.c b/testsuites/psxtests/psxhdrs/proc03.c
deleted file mode 100644
index 692e0f7da4..0000000000
--- a/testsuites/psxtests/psxhdrs/proc03.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <unistd.h>
-#include <sys/types.h>
-
-void test( void )
-{
- uid_t uid;
-
- uid = getuid();
-}
diff --git a/testsuites/psxtests/psxhdrs/proc04.c b/testsuites/psxtests/psxhdrs/proc04.c
deleted file mode 100644
index e1b51e7e6d..0000000000
--- a/testsuites/psxtests/psxhdrs/proc04.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <unistd.h>
-#include <sys/types.h>
-
-void test( void )
-{
- uid_t uid;
-
- uid = geteuid();
-}
diff --git a/testsuites/psxtests/psxhdrs/proc05.c b/testsuites/psxtests/psxhdrs/proc05.c
deleted file mode 100644
index a105f20e96..0000000000
--- a/testsuites/psxtests/psxhdrs/proc05.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <unistd.h>
-#include <sys/types.h>
-
-void test( void )
-{
- gid_t gid;
-
- gid = getgid();
-}
diff --git a/testsuites/psxtests/psxhdrs/proc06.c b/testsuites/psxtests/psxhdrs/proc06.c
deleted file mode 100644
index 7cbc0ed490..0000000000
--- a/testsuites/psxtests/psxhdrs/proc06.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <unistd.h>
-#include <sys/types.h>
-
-void test( void )
-{
- gid_t gid;
-
- gid = getegid();
-}
diff --git a/testsuites/psxtests/psxhdrs/proc07.c b/testsuites/psxtests/psxhdrs/proc07.c
deleted file mode 100644
index 038c02aded..0000000000
--- a/testsuites/psxtests/psxhdrs/proc07.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h>
-
-void test( void )
-{
- uid_t uid;
- int result;
-
- uid = 0;
-
- result = setuid( uid );
-}
diff --git a/testsuites/psxtests/psxhdrs/proc08.c b/testsuites/psxtests/psxhdrs/proc08.c
deleted file mode 100644
index 8133f6a3b6..0000000000
--- a/testsuites/psxtests/psxhdrs/proc08.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h>
-
-void test( void )
-{
- gid_t gid;
- int result;
-
- gid = 0;
-
- result = setgid( gid );
-}
diff --git a/testsuites/psxtests/psxhdrs/proc09.c b/testsuites/psxtests/psxhdrs/proc09.c
deleted file mode 100644
index a6b7a0a27b..0000000000
--- a/testsuites/psxtests/psxhdrs/proc09.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h>
-
-void test( void )
-{
- gid_t grouplist[ 20 ];
- int gidsetsize;
- int result;
-
- gidsetsize = 20;
-
- result = getgroups( gidsetsize, grouplist );
-}
diff --git a/testsuites/psxtests/psxhdrs/proc10.c b/testsuites/psxtests/psxhdrs/proc10.c
deleted file mode 100644
index 7ea8ea0988..0000000000
--- a/testsuites/psxtests/psxhdrs/proc10.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h>
-
-void test( void )
-{
- char *loginname;
-
- loginname = getlogin();
-}
diff --git a/testsuites/psxtests/psxhdrs/proc11.c b/testsuites/psxtests/psxhdrs/proc11.c
deleted file mode 100644
index d09b5c183b..0000000000
--- a/testsuites/psxtests/psxhdrs/proc11.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h>
-#include <limits.h> /* for LOGIN_NAME_MAX */
-
-void test( void )
-{
- char loginnamebuffer[ LOGIN_NAME_MAX ];
- int result;
-
- result = getlogin_r( loginnamebuffer, LOGIN_NAME_MAX );
-}
diff --git a/testsuites/psxtests/psxhdrs/proc12.c b/testsuites/psxtests/psxhdrs/proc12.c
deleted file mode 100644
index faf88794b5..0000000000
--- a/testsuites/psxtests/psxhdrs/proc12.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h>
-
-void test( void )
-{
- pid_t pgrp;
-
- pgrp = getpgrp();
-}
diff --git a/testsuites/psxtests/psxhdrs/proc13.c b/testsuites/psxtests/psxhdrs/proc13.c
deleted file mode 100644
index a373e9a956..0000000000
--- a/testsuites/psxtests/psxhdrs/proc13.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h>
-
-void test( void )
-{
- pid_t pid;
-
- pid = setsid();
-}
diff --git a/testsuites/psxtests/psxhdrs/proc14.c b/testsuites/psxtests/psxhdrs/proc14.c
deleted file mode 100644
index 49e9d3ab5b..0000000000
--- a/testsuites/psxtests/psxhdrs/proc14.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h>
-
-void test( void )
-{
- pid_t pid = 0;
- pid_t pgid = 0;
- int result;
-
- result = setpgid( pid, pgid );
-}
diff --git a/testsuites/psxtests/psxhdrs/pthread01.c b/testsuites/psxtests/psxhdrs/pthread01.c
deleted file mode 100644
index af2d96f2a1..0000000000
--- a/testsuites/psxtests/psxhdrs/pthread01.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREADS
-#error "rtems is supposed to have pthread_attr_init"
-#endif
-
-void test( void )
-{
- pthread_attr_t attribute;
- int result;
-
- result = pthread_attr_init( &attribute );
-}
diff --git a/testsuites/psxtests/psxhdrs/pthread02.c b/testsuites/psxtests/psxhdrs/pthread02.c
deleted file mode 100644
index c69881f86f..0000000000
--- a/testsuites/psxtests/psxhdrs/pthread02.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREADS
-#error "rtems is supposed to have pthread_attr_destroy"
-#endif
-
-void test( void )
-{
- pthread_attr_t attribute;
- int result;
-
- result = pthread_attr_destroy( &attribute );
-}
diff --git a/testsuites/psxtests/psxhdrs/pthread03.c b/testsuites/psxtests/psxhdrs/pthread03.c
deleted file mode 100644
index 6200860216..0000000000
--- a/testsuites/psxtests/psxhdrs/pthread03.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREADS
-#error "rtems is supposed to have pthread_attr_setdetachstate"
-#endif
-
-void test( void )
-{
- pthread_attr_t attribute;
- int state;
- int result;
-
- state = PTHREAD_CREATE_DETACHED;
- state = PTHREAD_CREATE_JOINABLE;
-
- result = pthread_attr_setdetachstate( &attribute, state );
-}
diff --git a/testsuites/psxtests/psxhdrs/pthread04.c b/testsuites/psxtests/psxhdrs/pthread04.c
deleted file mode 100644
index 08c4c0405b..0000000000
--- a/testsuites/psxtests/psxhdrs/pthread04.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREADS
-#error "rtems is supposed to have pthread_attr_getdetachstate"
-#endif
-
-void test( void )
-{
- pthread_attr_t attribute;
- int state;
- int result;
-
- result = pthread_attr_getdetachstate( &attribute, &state );
-}
diff --git a/testsuites/psxtests/psxhdrs/pthread05.c b/testsuites/psxtests/psxhdrs/pthread05.c
deleted file mode 100644
index ce972c6f90..0000000000
--- a/testsuites/psxtests/psxhdrs/pthread05.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-#include <limits.h> /* only for PTHREAD_STACK_MIN */
-
-#ifndef _POSIX_THREADS
-#error "rtems is supposed to have pthread_setstacksize"
-#endif
-
-#ifndef _POSIX_THREAD_ATTR_STACKSIZE
-#error "rtems is supposed to have pthread_setstacksize"
-#endif
-
-void test( void )
-{
- pthread_attr_t attribute;
- size_t size;
- int result;
-
- size = PTHREAD_STACK_MIN;
-
- result = pthread_attr_setstacksize( &attribute, size );
-}
diff --git a/testsuites/psxtests/psxhdrs/pthread06.c b/testsuites/psxtests/psxhdrs/pthread06.c
deleted file mode 100644
index 5f0fc96237..0000000000
--- a/testsuites/psxtests/psxhdrs/pthread06.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREADS
-#error "rtems is supposed to have pthread_getstacksize"
-#endif
-
-#ifndef _POSIX_THREAD_ATTR_STACKSIZE
-#error "rtems is supposed to have pthread_getstacksize"
-#endif
-
-void test( void )
-{
- pthread_attr_t attribute;
- size_t size;
- int result;
-
- result = pthread_attr_getstacksize( &attribute, &size );
-}
diff --git a/testsuites/psxtests/psxhdrs/pthread07.c b/testsuites/psxtests/psxhdrs/pthread07.c
deleted file mode 100644
index 9192820821..0000000000
--- a/testsuites/psxtests/psxhdrs/pthread07.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREADS
-#error "rtems is supposed to have pthread_create"
-#endif
-
-void *test_task(
- void * arg
-)
-{
- for ( ; ; )
- ;
-}
-
-void test( void )
-{
- pthread_t thread;
- pthread_attr_t attribute;
- void *arg = NULL;
- int result;
-
- result = pthread_create( &thread, &attribute, test_task, arg );
-}
diff --git a/testsuites/psxtests/psxhdrs/pthread08.c b/testsuites/psxtests/psxhdrs/pthread08.c
deleted file mode 100644
index b8b7269365..0000000000
--- a/testsuites/psxtests/psxhdrs/pthread08.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREADS
-#error "rtems is supposed to have pthread_exit"
-#endif
-
-void test( void )
-{
- void *status = NULL;
-
- pthread_exit( status );
-}
diff --git a/testsuites/psxtests/psxhdrs/pthread09.c b/testsuites/psxtests/psxhdrs/pthread09.c
deleted file mode 100644
index 2a5bd6f93a..0000000000
--- a/testsuites/psxtests/psxhdrs/pthread09.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREADS
-#error "rtems is supposed to have pthread_self"
-#endif
-
-void test( void )
-{
- pthread_t self;
-
- self = pthread_self();
-}
diff --git a/testsuites/psxtests/psxhdrs/pthread10.c b/testsuites/psxtests/psxhdrs/pthread10.c
deleted file mode 100644
index f543ec4e76..0000000000
--- a/testsuites/psxtests/psxhdrs/pthread10.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREADS
-#error "rtems is supposed to have pthread_equal"
-#endif
-
-void test( void )
-{
- pthread_t id_1 = 0;
- pthread_t id_2 = 0;
- int result;
-
- result = pthread_equal( id_1, id_2 );
-}
diff --git a/testsuites/psxtests/psxhdrs/pthread11.c b/testsuites/psxtests/psxhdrs/pthread11.c
deleted file mode 100644
index 75075e8d45..0000000000
--- a/testsuites/psxtests/psxhdrs/pthread11.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING
-#error "RTEMS is supposed to have pthread_setschedparam"
-#endif
-
-void test( void )
-{
- pthread_t thread;
- int policy;
- struct sched_param param;
- int result;
-
- thread = 0;
-
- policy = SCHED_OTHER;
- policy = SCHED_FIFO;
- policy = SCHED_RR;
-#ifdef _POSIX_SPORADIC_SERVER
- policy = SCHED_SPORADIC;
-#endif
-
- /*
- * really should use sched_get_priority_min() and sched_get_priority_max()
- */
-
- param.sched_priority = 0;
-#ifdef _POSIX_SPORADIC_SERVER
- param.ss_low_priority = 0;
- param.ss_replenish_period.tv_sec = 0;
- param.ss_replenish_period.tv_nsec = 0;
- param.ss_initial_budget.tv_sec = 0;
- param.ss_initial_budget.tv_nsec = 0;
-#endif
-
- result = pthread_setschedparam( thread, policy, &param );
-}
diff --git a/testsuites/psxtests/psxhdrs/pthread12.c b/testsuites/psxtests/psxhdrs/pthread12.c
deleted file mode 100644
index c5ca91ae4c..0000000000
--- a/testsuites/psxtests/psxhdrs/pthread12.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING
-#error "RTEMS is supposed to have pthread_getschedparam"
-#endif
-
-void test( void )
-{
- pthread_t thread;
- int policy;
- struct sched_param param;
- int result;
-
- thread = 0;
-
- result = pthread_getschedparam( thread, &policy, &param );
-}
diff --git a/testsuites/psxtests/psxhdrs/pthread13.c b/testsuites/psxtests/psxhdrs/pthread13.c
deleted file mode 100644
index e4d70bc85c..0000000000
--- a/testsuites/psxtests/psxhdrs/pthread13.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING
-#error "RTEMS is supposed to have pthread_attr_setscope"
-#endif
-
-void test( void )
-{
- pthread_attr_t attr;
- int contentionscope;
- int result;
-
- contentionscope = PTHREAD_SCOPE_SYSTEM;
- contentionscope = PTHREAD_SCOPE_PROCESS;
-
- result = pthread_attr_setscope( &attr, contentionscope );
-}
diff --git a/testsuites/psxtests/psxhdrs/pthread14.c b/testsuites/psxtests/psxhdrs/pthread14.c
deleted file mode 100644
index 31fe6d6a86..0000000000
--- a/testsuites/psxtests/psxhdrs/pthread14.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING
-#error "RTEMS is supposed to have pthread_attr_getscope"
-#endif
-
-void test( void )
-{
- pthread_attr_t attr;
- int contentionscope;
- int result;
-
- result = pthread_attr_getscope( &attr, &contentionscope );
-}
diff --git a/testsuites/psxtests/psxhdrs/pthread15.c b/testsuites/psxtests/psxhdrs/pthread15.c
deleted file mode 100644
index f18f13be2c..0000000000
--- a/testsuites/psxtests/psxhdrs/pthread15.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING
-#error "RTEMS is supposed to have pthread_attr_setinheritsched"
-#endif
-
-void test( void )
-{
- pthread_attr_t attr;
- int inheritsched;
- int result;
-
- inheritsched = PTHREAD_INHERIT_SCHED;
- inheritsched = PTHREAD_EXPLICIT_SCHED;
-
- result = pthread_attr_setinheritsched( &attr, inheritsched );
-}
diff --git a/testsuites/psxtests/psxhdrs/pthread16.c b/testsuites/psxtests/psxhdrs/pthread16.c
deleted file mode 100644
index 8d8cb4a8db..0000000000
--- a/testsuites/psxtests/psxhdrs/pthread16.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING
-#error "RTEMS is supposed to have pthread_attr_getinheritsched"
-#endif
-
-void test( void )
-{
- pthread_attr_t attr;
- int inheritsched;
- int result;
-
- result = pthread_attr_getinheritsched( &attr, &inheritsched );
-}
diff --git a/testsuites/psxtests/psxhdrs/pthread17.c b/testsuites/psxtests/psxhdrs/pthread17.c
deleted file mode 100644
index bd259f7165..0000000000
--- a/testsuites/psxtests/psxhdrs/pthread17.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING
-#error "RTEMS is supposed to have pthread_attr_setschedpolicy"
-#endif
-
-void test( void )
-{
- pthread_attr_t attr;
- int policy;
- int result;
-
- policy = SCHED_FIFO;
- policy = SCHED_RR;
- policy = SCHED_OTHER;
-#ifdef _POSIX_SPORADIC_SERVER
- policy = SCHED_SPORADIC;
-#endif
-
- result = pthread_attr_setschedpolicy( &attr, policy );
-}
diff --git a/testsuites/psxtests/psxhdrs/pthread18.c b/testsuites/psxtests/psxhdrs/pthread18.c
deleted file mode 100644
index aeb3e630d4..0000000000
--- a/testsuites/psxtests/psxhdrs/pthread18.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING
-#error "RTEMS is supposed to have pthread_attr_getschedpolicy"
-#endif
-
-void test( void )
-{
- pthread_attr_t attr;
- int policy;
- int result;
-
- result = pthread_attr_getschedpolicy( &attr, &policy );
-}
diff --git a/testsuites/psxtests/psxhdrs/pthread19.c b/testsuites/psxtests/psxhdrs/pthread19.c
deleted file mode 100644
index f14a1d6241..0000000000
--- a/testsuites/psxtests/psxhdrs/pthread19.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING
-#error "RTEMS is supposed to have pthread_attr_setschedparam"
-#endif
-
-void test( void )
-{
- pthread_attr_t attr;
- struct sched_param param;
- int result;
-
- result = pthread_attr_setschedparam( &attr, &param );
-}
diff --git a/testsuites/psxtests/psxhdrs/pthread20.c b/testsuites/psxtests/psxhdrs/pthread20.c
deleted file mode 100644
index b679521082..0000000000
--- a/testsuites/psxtests/psxhdrs/pthread20.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING
-#error "RTEMS is supposed to have pthread_attr_getschedparam"
-#endif
-
-void test( void )
-{
- pthread_attr_t attr;
- struct sched_param param;
- int result;
-
- result = pthread_attr_getschedparam( &attr, &param );
-}
diff --git a/testsuites/psxtests/psxhdrs/pthread21.c b/testsuites/psxtests/psxhdrs/pthread21.c
deleted file mode 100644
index 9507ac36d5..0000000000
--- a/testsuites/psxtests/psxhdrs/pthread21.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREADS
-#error "rtems is supposed to have pthread_detach"
-#endif
-
-void test( void )
-{
- pthread_t thread;
- int result;
-
- thread = 0;
- result = pthread_detach( thread );
-}
diff --git a/testsuites/psxtests/psxhdrs/pthread22.c b/testsuites/psxtests/psxhdrs/pthread22.c
deleted file mode 100644
index ff889d37d2..0000000000
--- a/testsuites/psxtests/psxhdrs/pthread22.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING
-#error "RTEMS is supposed to have pthread_setschedparam"
-#endif
-
-void test( void )
-{
- pthread_t thread = 0;
- int policy;
- struct sched_param param;
- int result;
-
- policy = SCHED_OTHER;
- policy = SCHED_FIFO;
- policy = SCHED_RR;
-#ifdef _POSIX_SPORADIC_SERVER
- policy = SCHED_SPORADIC;
-#endif
-
- /*
- * really should use sched_get_priority_min() and sched_get_priority_max()
- */
-
- param.sched_priority = 0;
-#ifdef _POSIX_SPORADIC_SERVER
- param.ss_low_priority = 0;
- param.ss_replenish_period.tv_sec = 0;
- param.ss_replenish_period.tv_nsec = 0;
- param.ss_initial_budget.tv_sec = 0;
- param.ss_initial_budget.tv_nsec = 0;
-#endif
-
- result = pthread_setschedparam( thread, policy, &param );
-}
diff --git a/testsuites/psxtests/psxhdrs/pthread23.c b/testsuites/psxtests/psxhdrs/pthread23.c
deleted file mode 100644
index 6dd04d9512..0000000000
--- a/testsuites/psxtests/psxhdrs/pthread23.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING
-#error "RTEMS is supposed to have pthread_getschedparam"
-#endif
-
-void test( void )
-{
- pthread_t thread = 0;
- int policy;
- struct sched_param param;
- int result;
-
- result = pthread_getschedparam( thread, &policy, &param );
-}
diff --git a/testsuites/psxtests/psxhdrs/pthread24.c b/testsuites/psxtests/psxhdrs/pthread24.c
deleted file mode 100644
index 6727a5ea4d..0000000000
--- a/testsuites/psxtests/psxhdrs/pthread24.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-#include <limits.h> /* only for PTHREAD_STACK_MIN */
-
-#ifndef _POSIX_THREADS
-#error "rtems is supposed to have pthread_setstackaddr"
-#endif
-
-#ifndef _POSIX_THREAD_ATTR_STACKADDR
-#error "rtems is supposed to have pthread_setstackaddr"
-#endif
-
-void test( void )
-{
- pthread_attr_t attribute;
- void *stackaddr;
- int result;
-
- stackaddr = NULL;
-
- result = pthread_attr_setstackaddr( &attribute, stackaddr );
-}
diff --git a/testsuites/psxtests/psxhdrs/pthread25.c b/testsuites/psxtests/psxhdrs/pthread25.c
deleted file mode 100644
index 1b1bc57502..0000000000
--- a/testsuites/psxtests/psxhdrs/pthread25.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-#include <limits.h> /* only for PTHREAD_STACK_MIN */
-
-#ifndef _POSIX_THREADS
-#error "rtems is supposed to have pthread_getstackaddr"
-#endif
-
-#ifndef _POSIX_THREAD_ATTR_STACKADDR
-#error "rtems is supposed to have pthread_getstackaddr"
-#endif
-
-void test( void )
-{
- pthread_attr_t attribute;
- void *stackaddr;
- int result;
-
- result = pthread_attr_getstackaddr( &attribute, &stackaddr );
-}
diff --git a/testsuites/psxtests/psxhdrs/pthread26.c b/testsuites/psxtests/psxhdrs/pthread26.c
deleted file mode 100644
index e4d61e39fc..0000000000
--- a/testsuites/psxtests/psxhdrs/pthread26.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREADS
-#error "rtems is supposed to have pthread_join"
-#endif
-
-void test( void )
-{
- pthread_t thread;
- void *value_ptr;
- int result;
-
- thread = 0;
-
- result = pthread_join( thread, &value_ptr );
-}
diff --git a/testsuites/psxtests/psxhdrs/pthread27.c b/testsuites/psxtests/psxhdrs/pthread27.c
deleted file mode 100644
index cf152962d0..0000000000
--- a/testsuites/psxtests/psxhdrs/pthread27.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREADS
-#error "rtems is supposed to have pthread_once"
-#endif
-
-void init_routine( void )
-{
-}
-
-void test( void )
-{
- pthread_once_t once_control = PTHREAD_ONCE_INIT;
- int result;
-
- result = pthread_once( &once_control, init_routine );
-}
diff --git a/testsuites/psxtests/psxhdrs/pthread28.c b/testsuites/psxtests/psxhdrs/pthread28.c
deleted file mode 100644
index 011ddea8f5..0000000000
--- a/testsuites/psxtests/psxhdrs/pthread28.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREADS
-#error "rtems is supposed to have pthread_cancel"
-#endif
-
-void init_routine( void )
-{
-}
-
-void test( void )
-{
- pthread_t thread;
- int result;
-
- thread = 0;
- result = pthread_cancel( thread );
-}
diff --git a/testsuites/psxtests/psxhdrs/pthread29.c b/testsuites/psxtests/psxhdrs/pthread29.c
deleted file mode 100644
index 5bc5dc0a69..0000000000
--- a/testsuites/psxtests/psxhdrs/pthread29.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREADS
-#error "rtems is supposed to have pthread_setcancelstate"
-#endif
-
-void init_routine( void )
-{
-}
-
-void test( void )
-{
- int state;
- int oldstate;
- int result;
-
- state = PTHREAD_CANCEL_ENABLE;
- state = PTHREAD_CANCEL_DISABLE;
-
- result = pthread_setcancelstate( state, &oldstate );
-}
diff --git a/testsuites/psxtests/psxhdrs/pthread30.c b/testsuites/psxtests/psxhdrs/pthread30.c
deleted file mode 100644
index bb9e1da558..0000000000
--- a/testsuites/psxtests/psxhdrs/pthread30.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREADS
-#error "rtems is supposed to have pthread_setcanceltype"
-#endif
-
-void init_routine( void )
-{
-}
-
-void test( void )
-{
- int type;
- int oldtype;
- int result;
-
- type = PTHREAD_CANCEL_DEFERRED;
- type = PTHREAD_CANCEL_ASYNCHRONOUS;
-
- result = pthread_setcanceltype( type, &oldtype );
-}
diff --git a/testsuites/psxtests/psxhdrs/pthread31.c b/testsuites/psxtests/psxhdrs/pthread31.c
deleted file mode 100644
index d12df9829e..0000000000
--- a/testsuites/psxtests/psxhdrs/pthread31.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREADS
-#error "rtems is supposed to have pthread_testcancel"
-#endif
-
-void init_routine( void )
-{
-}
-
-void test( void )
-{
- pthread_testcancel();
-}
diff --git a/testsuites/psxtests/psxhdrs/pthread32.c b/testsuites/psxtests/psxhdrs/pthread32.c
deleted file mode 100644
index 0b03fd9e47..0000000000
--- a/testsuites/psxtests/psxhdrs/pthread32.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREADS
-#error "rtems is supposed to have pthread_cleanup_push"
-#endif
-
-void cleanup_routine(
- void *argument
-)
-{
-}
-
-void test( void )
-{
- int argument;
-
- argument = 0;
-
- pthread_cleanup_push( cleanup_routine, &argument );
-}
diff --git a/testsuites/psxtests/psxhdrs/pthread33.c b/testsuites/psxtests/psxhdrs/pthread33.c
deleted file mode 100644
index 88ed3e7127..0000000000
--- a/testsuites/psxtests/psxhdrs/pthread33.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREADS
-#error "rtems is supposed to have pthread_cleanup_pop"
-#endif
-
-void test( void )
-{
- pthread_cleanup_pop( 1 );
-}
diff --git a/testsuites/psxtests/psxhdrs/pthread34.c b/testsuites/psxtests/psxhdrs/pthread34.c
deleted file mode 100644
index 9d4072102a..0000000000
--- a/testsuites/psxtests/psxhdrs/pthread34.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREAD_CPUTIME
-#error "rtems is supposed to have pthread_getcpuclockid"
-#endif
-
-void test( void )
-{
- pthread_t thread;
- clockid_t clock_id;
- int result;
-
- thread = 0;
-
- result = pthread_getcpuclockid( thread, &clock_id );
-}
diff --git a/testsuites/psxtests/psxhdrs/pthread35.c b/testsuites/psxtests/psxhdrs/pthread35.c
deleted file mode 100644
index a53aaeedcb..0000000000
--- a/testsuites/psxtests/psxhdrs/pthread35.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREAD_CPUTIME
-#error "rtems is supposed to have pthread_attr_setcputime"
-#endif
-
-void test( void )
-{
- pthread_attr_t attr;
- int clock_allowed;
- int result;
-
- clock_allowed = CLOCK_ALLOWED;
- clock_allowed = CLOCK_DISALLOWED;
-
- result = pthread_attr_setcputime( &attr, clock_allowed );
-}
diff --git a/testsuites/psxtests/psxhdrs/pthread36.c b/testsuites/psxtests/psxhdrs/pthread36.c
deleted file mode 100644
index 21e503865d..0000000000
--- a/testsuites/psxtests/psxhdrs/pthread36.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <pthread.h>
-
-#ifndef _POSIX_THREAD_CPUTIME
-#error "rtems is supposed to have pthread_attr_getcputime"
-#endif
-
-void test( void )
-{
- pthread_attr_t attr;
- int clock_allowed;
- int result;
-
- result = pthread_attr_getcputime( &attr, &clock_allowed );
-}
diff --git a/testsuites/psxtests/psxhdrs/sched01.c b/testsuites/psxtests/psxhdrs/sched01.c
deleted file mode 100644
index 5b48736b09..0000000000
--- a/testsuites/psxtests/psxhdrs/sched01.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sched.h>
-
-#ifndef _POSIX_PRIORITY_SCHEDULING
-#error "rtems is supposed to have sched_setparam"
-#endif
-
-void test( void )
-{
- pid_t pid;
- struct sched_param param;
- int result;
-
- pid = 0;
-
- /*
- * really should use sched_get_priority_min() and sched_get_priority_max()
- */
-
- param.sched_priority = 0;
-#ifdef _POSIX_SPORADIC_SERVER
- param.ss_low_priority = 0;
- param.ss_replenish_period.tv_sec = 0;
- param.ss_replenish_period.tv_nsec = 0;
- param.ss_initial_budget.tv_sec = 0;
- param.ss_initial_budget.tv_nsec = 0;
-#endif
-
- result = sched_setparam( pid, &param );
-}
diff --git a/testsuites/psxtests/psxhdrs/sched02.c b/testsuites/psxtests/psxhdrs/sched02.c
deleted file mode 100644
index 8e66cfba46..0000000000
--- a/testsuites/psxtests/psxhdrs/sched02.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sched.h>
-
-#ifndef _POSIX_PRIORITY_SCHEDULING
-#error "rtems is supposed to have sched_getparam"
-#endif
-
-void test( void )
-{
- pid_t pid;
- struct sched_param param;
- int result;
-
- pid = 0;
-
- result = sched_getparam( pid, &param );
-}
diff --git a/testsuites/psxtests/psxhdrs/sched03.c b/testsuites/psxtests/psxhdrs/sched03.c
deleted file mode 100644
index 16e2aad92d..0000000000
--- a/testsuites/psxtests/psxhdrs/sched03.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sched.h>
-
-#ifndef _POSIX_PRIORITY_SCHEDULING
-#error "rtems is supposed to have sched_setscheduler"
-#endif
-
-void test( void )
-{
- pid_t pid;
- int policy;
- struct sched_param param;
- int result;
-
- pid = 0;
-
- policy = SCHED_RR;
- policy = SCHED_FIFO;
- policy = SCHED_OTHER;
-#ifdef _POSIX_SPORADIC_SERVER
- policy = SCHED_SPORADIC;
-#endif
-
- /*
- * really should use sched_get_priority_min() and sched_get_priority_max()
- */
-
- param.sched_priority = 0;
-#ifdef _POSIX_SPORADIC_SERVER
- param.ss_low_priority = 0;
- param.ss_replenish_period.tv_sec = 0;
- param.ss_replenish_period.tv_nsec = 0;
- param.ss_initial_budget.tv_sec = 0;
- param.ss_initial_budget.tv_nsec = 0;
-#endif
-
- result = sched_setscheduler( pid, policy, &param );
-}
diff --git a/testsuites/psxtests/psxhdrs/sched04.c b/testsuites/psxtests/psxhdrs/sched04.c
deleted file mode 100644
index ba81adb78d..0000000000
--- a/testsuites/psxtests/psxhdrs/sched04.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sched.h>
-
-#ifndef _POSIX_PRIORITY_SCHEDULING
-#error "rtems is supposed to have sched_getscheduler"
-#endif
-
-void test( void )
-{
- pid_t pid;
- int result;
-
- pid = 0;
-
- result = sched_getscheduler( pid );
-}
diff --git a/testsuites/psxtests/psxhdrs/sched05.c b/testsuites/psxtests/psxhdrs/sched05.c
deleted file mode 100644
index 158484b96c..0000000000
--- a/testsuites/psxtests/psxhdrs/sched05.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sched.h>
-
-#ifndef _POSIX_PRIORITY_SCHEDULING
-#error "rtems is supposed to have sched_yield"
-#endif
-
-void test( void )
-{
- int result;
-
- result = sched_yield();
-}
diff --git a/testsuites/psxtests/psxhdrs/sched06.c b/testsuites/psxtests/psxhdrs/sched06.c
deleted file mode 100644
index fdcb08eac5..0000000000
--- a/testsuites/psxtests/psxhdrs/sched06.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sched.h>
-
-#ifndef _POSIX_PRIORITY_SCHEDULING
-#error "rtems is supposed to have sched_get_priority_max"
-#endif
-
-void test( void )
-{
- int policy;
- int result;
-
- policy = SCHED_RR;
- policy = SCHED_FIFO;
- policy = SCHED_OTHER;
-#ifdef _POSIX_SPORADIC_SERVER
- policy = SCHED_SPORADIC;
-#endif
-
- result = sched_get_priority_max( policy );
-}
diff --git a/testsuites/psxtests/psxhdrs/sched07.c b/testsuites/psxtests/psxhdrs/sched07.c
deleted file mode 100644
index a41bbba830..0000000000
--- a/testsuites/psxtests/psxhdrs/sched07.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sched.h>
-
-#ifndef _POSIX_PRIORITY_SCHEDULING
-#error "rtems is supposed to have sched_get_priority_min"
-#endif
-
-void test( void )
-{
- int policy;
- int result;
-
- policy = SCHED_RR;
- policy = SCHED_FIFO;
- policy = SCHED_OTHER;
-#ifdef _POSIX_SPORADIC_SERVER
- policy = SCHED_SPORADIC;
-#endif
-
- result = sched_get_priority_min( policy );
-}
diff --git a/testsuites/psxtests/psxhdrs/sched08.c b/testsuites/psxtests/psxhdrs/sched08.c
deleted file mode 100644
index 8596ef60a0..0000000000
--- a/testsuites/psxtests/psxhdrs/sched08.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sched.h>
-
-#ifndef _POSIX_PRIORITY_SCHEDULING
-#error "rtems is supposed to have sched_rr_get_interval"
-#endif
-
-void test( void )
-{
- pid_t pid;
- struct timespec interval;
- int result;
-
- pid = 0;
-
- result = sched_rr_get_interval( pid, &interval );
-}
diff --git a/testsuites/psxtests/psxhdrs/signal01.c b/testsuites/psxtests/psxhdrs/signal01.c
deleted file mode 100644
index 50ee847513..0000000000
--- a/testsuites/psxtests/psxhdrs/signal01.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <signal.h>
-
-void test( void )
-{
- sigset_t signal_set;
- int signal_number;
- int result;
-
- signal_number = SIGALRM;
-
- result = sigaddset( &signal_set, signal_number );
-}
diff --git a/testsuites/psxtests/psxhdrs/signal02.c b/testsuites/psxtests/psxhdrs/signal02.c
deleted file mode 100644
index 16e3771b48..0000000000
--- a/testsuites/psxtests/psxhdrs/signal02.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <signal.h>
-
-void test( void )
-{
- sigset_t signal_set;
- int signal_number;
- int result;
-
- signal_number = SIGALRM;
-
- result = sigdelset( &signal_set, signal_number );
-}
diff --git a/testsuites/psxtests/psxhdrs/signal03.c b/testsuites/psxtests/psxhdrs/signal03.c
deleted file mode 100644
index bb17812a39..0000000000
--- a/testsuites/psxtests/psxhdrs/signal03.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <signal.h>
-
-void test( void )
-{
- sigset_t signal_set;
- int result;
-
- result = sigfillset( &signal_set );
-}
diff --git a/testsuites/psxtests/psxhdrs/signal04.c b/testsuites/psxtests/psxhdrs/signal04.c
deleted file mode 100644
index 8b0c960dcf..0000000000
--- a/testsuites/psxtests/psxhdrs/signal04.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <signal.h>
-
-void test( void )
-{
- sigset_t signal_set;
- int signal_number;
- int result;
-
- signal_number = SIGALRM;
-
- result = sigismember( &signal_set, signal_number );
-}
diff --git a/testsuites/psxtests/psxhdrs/signal05.c b/testsuites/psxtests/psxhdrs/signal05.c
deleted file mode 100644
index c21a79abbc..0000000000
--- a/testsuites/psxtests/psxhdrs/signal05.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <signal.h>
-
-void test( void )
-{
- sigset_t signal_set;
- int result;
-
- result = sigemptyset( &signal_set );
-}
diff --git a/testsuites/psxtests/psxhdrs/signal06.c b/testsuites/psxtests/psxhdrs/signal06.c
deleted file mode 100644
index f7eaff884a..0000000000
--- a/testsuites/psxtests/psxhdrs/signal06.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <signal.h>
-
-void test( void )
-{
- int signal_number;
- struct sigaction act;
- struct sigaction oact;
- int result;
-
- signal_number = SIGALRM;
-
- /*
- * Really should not reference sa_handler and sa_signction simultaneously.
- */
-
- act.sa_handler = SIG_DFL;
- act.sa_handler = SIG_IGN;
- act.sa_mask = 0;
- act.sa_flags = SA_NOCLDSTOP;
- act.sa_flags = SA_SIGINFO;
- act.sa_sigaction = NULL;
-
- result = sigaction( signal_number, &act, &oact );
-}
diff --git a/testsuites/psxtests/psxhdrs/signal07.c b/testsuites/psxtests/psxhdrs/signal07.c
deleted file mode 100644
index 0fe5817a70..0000000000
--- a/testsuites/psxtests/psxhdrs/signal07.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <signal.h>
-
-#ifndef _POSIX_THREADS
-#error "rtems is supposed to have pthread_kill"
-#endif
-
-void test( void )
-{
- pthread_t thread;
- int signal_number;
- int result;
-
- thread = 0;
- signal_number = SIGALRM;
-
- result = pthread_kill( thread, signal_number );
-}
diff --git a/testsuites/psxtests/psxhdrs/signal08.c b/testsuites/psxtests/psxhdrs/signal08.c
deleted file mode 100644
index 295800e599..0000000000
--- a/testsuites/psxtests/psxhdrs/signal08.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <signal.h>
-
-#ifndef _POSIX_THREADS
-#error "rtems is supposed to have pthread_sigmask"
-#endif
-
-void test( void )
-{
- int how;
- sigset_t set;
- sigset_t oset;
- int result;
-
- how = SIG_BLOCK;
- how = SIG_UNBLOCK;
- how = SIG_SETMASK;
-
- result = pthread_sigmask( how, &set, &oset );
-}
diff --git a/testsuites/psxtests/psxhdrs/signal09.c b/testsuites/psxtests/psxhdrs/signal09.c
deleted file mode 100644
index 97c7eddcef..0000000000
--- a/testsuites/psxtests/psxhdrs/signal09.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <sys/types.h>
-#include <signal.h>
-
-void test( void )
-{
- pid_t pid;
- int signal_number;
- int result;
-
- pid = 0;
- signal_number = SIGALRM;
-
- result = kill( pid, signal_number );
-}
diff --git a/testsuites/psxtests/psxhdrs/signal10.c b/testsuites/psxtests/psxhdrs/signal10.c
deleted file mode 100644
index a3155e1a67..0000000000
--- a/testsuites/psxtests/psxhdrs/signal10.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <signal.h>
-
-void test( void )
-{
- sigset_t set;
- int sig;
- int result;
-
- result = sigwait( &set, &sig );
-}
diff --git a/testsuites/psxtests/psxhdrs/signal11.c b/testsuites/psxtests/psxhdrs/signal11.c
deleted file mode 100644
index 63a840aeac..0000000000
--- a/testsuites/psxtests/psxhdrs/signal11.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <signal.h>
-
-void test( void )
-{
- int signal_number;
- int result;
-
- signal_number = SIGALRM;
-
- result = raise( signal_number );
-}
diff --git a/testsuites/psxtests/psxhdrs/signal12.c b/testsuites/psxtests/psxhdrs/signal12.c
deleted file mode 100644
index 85d4dd5c47..0000000000
--- a/testsuites/psxtests/psxhdrs/signal12.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <signal.h>
-
-void test( void )
-{
- void (*signal_function_pointer)();
- int signal_number;
-
- signal_number = SIGALRM;
-
- signal_function_pointer = signal( signal_number, SIG_IGN );
-}
diff --git a/testsuites/psxtests/psxhdrs/signal13.c b/testsuites/psxtests/psxhdrs/signal13.c
deleted file mode 100644
index 7b177dd3ff..0000000000
--- a/testsuites/psxtests/psxhdrs/signal13.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <signal.h>
-
-void test( void )
-{
- int how;
- sigset_t set;
- sigset_t oset;
- int result;
-
- how = SIG_BLOCK;
- how = SIG_UNBLOCK;
- how = SIG_SETMASK;
-
- (void) sigemptyset( &set );
-
- result = sigprocmask( how, &set, &oset );
-}
diff --git a/testsuites/psxtests/psxhdrs/signal14.c b/testsuites/psxtests/psxhdrs/signal14.c
deleted file mode 100644
index 20c6a9cf71..0000000000
--- a/testsuites/psxtests/psxhdrs/signal14.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <signal.h>
-
-void test( void )
-{
- sigset_t set;
- int result;
-
- (void) sigemptyset( &set );
-
- result = sigpending( &set );
-}
diff --git a/testsuites/psxtests/psxhdrs/signal15.c b/testsuites/psxtests/psxhdrs/signal15.c
deleted file mode 100644
index ddb1972d4f..0000000000
--- a/testsuites/psxtests/psxhdrs/signal15.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <signal.h>
-
-void test( void )
-{
- sigset_t sigmask;
- int result;
-
- (void) sigemptyset( &sigmask );
-
- result = sigsuspend( &sigmask );
-}
diff --git a/testsuites/psxtests/psxhdrs/signal16.c b/testsuites/psxtests/psxhdrs/signal16.c
deleted file mode 100644
index dca42d55bd..0000000000
--- a/testsuites/psxtests/psxhdrs/signal16.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <signal.h>
-
-#ifndef _POSIX_THREADS
-#define "rtems is supposed to have pthread_sigmask"
-#endif
-
-void test( void )
-{
- int how;
- sigset_t set;
- sigset_t oset;
- int result;
-
- how = SIG_BLOCK;
- how = SIG_UNBLOCK;
- how = SIG_SETMASK;
-
- (void) sigemptyset( &set );
-
- result = pthread_sigmask( how, &set, &oset );
-}
diff --git a/testsuites/psxtests/psxhdrs/signal17.c b/testsuites/psxtests/psxhdrs/signal17.c
deleted file mode 100644
index d9f4def624..0000000000
--- a/testsuites/psxtests/psxhdrs/signal17.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <signal.h>
-
-void test( void )
-{
- sigset_t set;
- siginfo_t info;
- int result;
-
- (void) sigemptyset( &set );
-
- result = sigwaitinfo( &set, &info );
-}
diff --git a/testsuites/psxtests/psxhdrs/signal18.c b/testsuites/psxtests/psxhdrs/signal18.c
deleted file mode 100644
index fe067a0886..0000000000
--- a/testsuites/psxtests/psxhdrs/signal18.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <signal.h>
-
-void test( void )
-{
- sigset_t set;
- siginfo_t info;
- struct timespec timeout;
- int result;
-
- (void) sigemptyset( &set );
-
- result = sigtimedwait( &set, &info, &timeout );
-}
diff --git a/testsuites/psxtests/psxhdrs/signal19.c b/testsuites/psxtests/psxhdrs/signal19.c
deleted file mode 100644
index d8852d32ef..0000000000
--- a/testsuites/psxtests/psxhdrs/signal19.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <signal.h>
-
-void test( void )
-{
- sigset_t set;
- int sig;
- int result;
-
- (void) sigemptyset( &set );
-
- result = sigwait( &set, &sig );
-}
diff --git a/testsuites/psxtests/psxhdrs/signal20.c b/testsuites/psxtests/psxhdrs/signal20.c
deleted file mode 100644
index aaf75a8611..0000000000
--- a/testsuites/psxtests/psxhdrs/signal20.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <signal.h>
-
-void test( void )
-{
- unsigned int seconds;
- unsigned int result;
-
- seconds = 10;
-
- result = alarm( seconds );
-}
diff --git a/testsuites/psxtests/psxhdrs/signal21.c b/testsuites/psxtests/psxhdrs/signal21.c
deleted file mode 100644
index 756147c2fd..0000000000
--- a/testsuites/psxtests/psxhdrs/signal21.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <signal.h>
-
-void test( void )
-{
- int result;
-
- result = pause();
-}
diff --git a/testsuites/psxtests/psxhdrs/signal22.c b/testsuites/psxtests/psxhdrs/signal22.c
deleted file mode 100644
index 6685ff6dea..0000000000
--- a/testsuites/psxtests/psxhdrs/signal22.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <unistd.h>
-
-void test( void )
-{
- unsigned int seconds;
- unsigned int result;
-
- seconds = 10;
-
- result = sleep( seconds );
-}
diff --git a/testsuites/psxtests/psxhdrs/time01.c b/testsuites/psxtests/psxhdrs/time01.c
deleted file mode 100644
index a9608adbf8..0000000000
--- a/testsuites/psxtests/psxhdrs/time01.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <time.h>
-
-void test( void )
-{
- clock_t clock_ticks;
-
- clock_ticks = clock();
-}
diff --git a/testsuites/psxtests/psxhdrs/time02.c b/testsuites/psxtests/psxhdrs/time02.c
deleted file mode 100644
index ecb890e72f..0000000000
--- a/testsuites/psxtests/psxhdrs/time02.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <time.h>
-
-void test( void )
-{
- time_t time1;
- time_t time2;
- double difference;
-
- time1 = 0;
- time2 = 0;
-
- difference = difftime( time1, time2 );
-}
diff --git a/testsuites/psxtests/psxhdrs/time03.c b/testsuites/psxtests/psxhdrs/time03.c
deleted file mode 100644
index a031109b6e..0000000000
--- a/testsuites/psxtests/psxhdrs/time03.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <time.h>
-
-void test( void )
-{
- struct tm timestruct;
- time_t time_encoded;
-
- timestruct.tm_sec = 0;
- timestruct.tm_min = 0;
- timestruct.tm_hour = 0;
- timestruct.tm_mday = 1;
- timestruct.tm_mon = 0;
- timestruct.tm_year = 0;
- timestruct.tm_wday = 0;
- timestruct.tm_yday = 0;
- timestruct.tm_isdst = 0;
-
- time_encoded = mktime( &timestruct );
-}
diff --git a/testsuites/psxtests/psxhdrs/time04.c b/testsuites/psxtests/psxhdrs/time04.c
deleted file mode 100644
index 72cdc5aeb3..0000000000
--- a/testsuites/psxtests/psxhdrs/time04.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <time.h>
-
-void test( void )
-{
- time_t new_time;
-
- new_time = time( &new_time );
-}
diff --git a/testsuites/psxtests/psxhdrs/time05.c b/testsuites/psxtests/psxhdrs/time05.c
deleted file mode 100644
index 62b4b2d85a..0000000000
--- a/testsuites/psxtests/psxhdrs/time05.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <time.h>
-
-void test( void )
-{
- size_t length;
- size_t max_length;
- char buffer[ 80 ];
- struct tm timestruct;
-
- max_length = sizeof( buffer );
-
- length = strftime( buffer, max_length, "%A", &timestruct );
-}
diff --git a/testsuites/psxtests/psxhdrs/time06.c b/testsuites/psxtests/psxhdrs/time06.c
deleted file mode 100644
index 9b694bfe11..0000000000
--- a/testsuites/psxtests/psxhdrs/time06.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <time.h>
-
-void test( void )
-{
- char *buffer;
- struct tm timestruct;
-
- buffer = asctime( &timestruct );
-}
diff --git a/testsuites/psxtests/psxhdrs/time07.c b/testsuites/psxtests/psxhdrs/time07.c
deleted file mode 100644
index 6eda111f6f..0000000000
--- a/testsuites/psxtests/psxhdrs/time07.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <time.h>
-
-void test( void )
-{
- char *buffer;
- time_t time;
-
- buffer = ctime( &time );
-}
diff --git a/testsuites/psxtests/psxhdrs/time08.c b/testsuites/psxtests/psxhdrs/time08.c
deleted file mode 100644
index 84a5b9e711..0000000000
--- a/testsuites/psxtests/psxhdrs/time08.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <time.h>
-
-void test( void )
-{
- time_t time;
- struct tm *timestruct;
-
- timestruct = gmtime( &time );
-}
diff --git a/testsuites/psxtests/psxhdrs/time09.c b/testsuites/psxtests/psxhdrs/time09.c
deleted file mode 100644
index c92072ffc0..0000000000
--- a/testsuites/psxtests/psxhdrs/time09.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <time.h>
-
-void test( void )
-{
- time_t time;
- struct tm *timestruct;
-
- timestruct = localtime( &time );
-}
diff --git a/testsuites/psxtests/psxhdrs/time10.c b/testsuites/psxtests/psxhdrs/time10.c
deleted file mode 100644
index b27be5037c..0000000000
--- a/testsuites/psxtests/psxhdrs/time10.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <time.h>
-
-void test( void )
-{
- char *buffer_pointer;
- struct tm timestruct;
- char buffer[ 80 ];
-
- buffer_pointer = asctime_r( &timestruct, buffer );
-}
diff --git a/testsuites/psxtests/psxhdrs/time11.c b/testsuites/psxtests/psxhdrs/time11.c
deleted file mode 100644
index 5fea8b4415..0000000000
--- a/testsuites/psxtests/psxhdrs/time11.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <time.h>
-
-void test( void )
-{
- char *buffer_pointer;
- char buffer[ 80 ];
- time_t time;
-
- buffer_pointer = ctime_r( &time, buffer );
-}
diff --git a/testsuites/psxtests/psxhdrs/time12.c b/testsuites/psxtests/psxhdrs/time12.c
deleted file mode 100644
index 5fd0cd856d..0000000000
--- a/testsuites/psxtests/psxhdrs/time12.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <time.h>
-
-void test( void )
-{
- time_t time;
- struct tm *timestruct_pointer;
- struct tm timestruct;
-
- timestruct_pointer = gmtime_r( &time, &timestruct );
-}
diff --git a/testsuites/psxtests/psxhdrs/time13.c b/testsuites/psxtests/psxhdrs/time13.c
deleted file mode 100644
index 39c738ddbd..0000000000
--- a/testsuites/psxtests/psxhdrs/time13.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <time.h>
-
-void test( void )
-{
- time_t time;
- struct tm *timestruct_pointer;
- struct tm timestruct;
-
- timestruct_pointer = localtime_r( &time, &timestruct );
-}
diff --git a/testsuites/psxtests/psxhdrs/timer01.c b/testsuites/psxtests/psxhdrs/timer01.c
deleted file mode 100644
index d2a01e0252..0000000000
--- a/testsuites/psxtests/psxhdrs/timer01.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <time.h>
-
-#ifndef _POSIX_TIMERS
-#error "rtems is supposed to have timer_create"
-#endif
-
-void test( void )
-{
- clockid_t clock_id = 0;
- timer_t timerid = 0;
- struct sigevent evp;
- int result;
-
- evp.sigev_notify = SIGEV_NONE;
- evp.sigev_notify = SIGEV_SIGNAL;
- evp.sigev_notify = SIGEV_THREAD;
- evp.sigev_signo = SIGALRM;
- evp.sigev_value.sival_int = 0;
- evp.sigev_value.sival_ptr = NULL;
-
- result = timer_create( clock_id, &evp, &timerid );
-}
diff --git a/testsuites/psxtests/psxhdrs/timer02.c b/testsuites/psxtests/psxhdrs/timer02.c
deleted file mode 100644
index e2116d0362..0000000000
--- a/testsuites/psxtests/psxhdrs/timer02.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <time.h>
-
-#ifndef _POSIX_TIMERS
-#error "rtems is supposed to have timer_delete"
-#endif
-
-void test( void )
-{
- timer_t timerid = 0;
- int result;
-
- result = timer_delete( timerid );
-}
diff --git a/testsuites/psxtests/psxhdrs/timer03.c b/testsuites/psxtests/psxhdrs/timer03.c
deleted file mode 100644
index d499f079d6..0000000000
--- a/testsuites/psxtests/psxhdrs/timer03.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <time.h>
-
-#ifndef _POSIX_TIMERS
-#error "rtems is supposed to have timer_settime"
-#endif
-
-void test( void )
-{
- timer_t timerid = 0;
- int flags;
- struct itimerspec value;
- struct itimerspec ovalue;
- int result;
-
- value.it_interval.tv_sec = 0;
- value.it_interval.tv_nsec = 0;
- value.it_value.tv_sec = 0;
- value.it_value.tv_nsec = 0;
-
- flags = TIMER_ABSTIME;
- flags = CLOCK_REALTIME;
-
- result = timer_settime( timerid, flags, &value, &ovalue );
-}
diff --git a/testsuites/psxtests/psxhdrs/timer04.c b/testsuites/psxtests/psxhdrs/timer04.c
deleted file mode 100644
index d0ee86e38b..0000000000
--- a/testsuites/psxtests/psxhdrs/timer04.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <time.h>
-
-#ifndef _POSIX_TIMERS
-#error "rtems is supposed to have timer_gettime"
-#endif
-
-void test( void )
-{
- timer_t timerid = 0;
- struct itimerspec value;
- int result;
-
- result = timer_gettime( timerid, &value );
-}
diff --git a/testsuites/psxtests/psxhdrs/timer05.c b/testsuites/psxtests/psxhdrs/timer05.c
deleted file mode 100644
index aac3e4e3ec..0000000000
--- a/testsuites/psxtests/psxhdrs/timer05.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <time.h>
-
-#ifndef _POSIX_TIMERS
-#error "rtems is supposed to have timer_getoverrun"
-#endif
-
-void test( void )
-{
- timer_t timerid = 0;
- int result;
-
- result = timer_getoverrun( timerid );
-}
diff --git a/testsuites/psxtests/psxhdrs/timer06.c b/testsuites/psxtests/psxhdrs/timer06.c
deleted file mode 100644
index 4db7cc524c..0000000000
--- a/testsuites/psxtests/psxhdrs/timer06.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * This test file is used to verify that the header files associated with
- * invoking this function are correct.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <time.h>
-
-#ifndef _POSIX_TIMERS
-#error "rtems is supposed to have nanosleep"
-#endif
-
-void test( void )
-{
- struct timespec rqtp;
- struct timespec rmtp;
- int result;
-
- rqtp.tv_sec = 0;
- rqtp.tv_nsec = 0;
- result = nanosleep( &rqtp, &rmtp );
-}
diff --git a/testsuites/psxtests/psxmount/Makefile.am b/testsuites/psxtests/psxmount/Makefile.am
deleted file mode 100644
index c50a43ae19..0000000000
--- a/testsuites/psxtests/psxmount/Makefile.am
+++ /dev/null
@@ -1,38 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = psxmount
-
-MANAGERS = all
-
-C_FILES = main.c test.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-DOCTYPES = scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/psxtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/psxtests/psxmount/main.c b/testsuites/psxtests/psxmount/main.c
deleted file mode 100644
index bd5e6165ae..0000000000
--- a/testsuites/psxtests/psxmount/main.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Simple test program -- check out of the basic file system mounting
- * capabilities
- * Attempt to mount the IMFS file system on a mount point in the base IMFS
- */
-
-#define TEST_INIT
-
-#include <bsp.h>
-
-void test_main( void );
-
-rtems_task Init(
- rtems_task_argument ignored
-)
-{
- test_main();
- exit( 0 );
-}
-
-/* configuration information */
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#define CONFIGURE_INIT
-
-#include <confdefs.h>
-
-/* end of file */
diff --git a/testsuites/psxtests/psxmount/psxmount.scn b/testsuites/psxtests/psxmount/psxmount.scn
deleted file mode 100644
index 76ccf822ca..0000000000
--- a/testsuites/psxtests/psxmount/psxmount.scn
+++ /dev/null
@@ -1,86 +0,0 @@
-
-
-*** MOUNT/UNMOUNT TEST ***
-
-chdir to the root directory
-chdir() status : 0
-
-
-Creating a series of directories under /
-Creating : a 0 0 Success
-Creating : b 0 0 Success
-Creating : c 0 0 Success
-Creating : d 0 0 Success
-Creating : e 0 0 Success
-Creating : f 0 0 Success
-Creating : c/y 0 0 Success
-Creating : c/z 0 0 Success
-Creating : c/x 0 0 Success
-Creating : c/y/a3333 0 0 Success
-Creating : c/y/j123 0 0 Success
-Creating : c/y/my_mount_point 0 0 Success
-Creating : c/y/my_mount_point/my_dir 0 0 Success
-Creating : c/z/my_mount_point 0 0 Success
-create /b/my_file
-Verify /b/my_file
-create c/y/my_mount_point/my_dir/d
-Verify c/y/my_mount_point/my_dir/d
-Attempting to mount IMFS file system at /c/z/my_mount_point
-2nd file system successfully mounted at /c/z/my_mount_point
-
-chdir to /c/z/my_mount_point.
-chdir() status : 0
-
-
-Creating a series of directories under /c/z/my_mount_point
-Creating: a 0 2 Success
-Creating: b 0 2 Success
-Creating: c 0 2 Success
-Creating: d 0 2 Success
-Creating: e 0 2 Success
-Creating: f 0 2 Success
-Creating: c/y 0 2 Success
-Creating: c/z 0 2 Success
-Creating: c/x 0 2 Success
-Creating: c/y/a3333 0 2 Success
-Creating: c/y/j123 0 2 Success
-Creating: c/y/my_mount_point 0 2 Success
-Creating: c/y/my_mount_point/my_dir 0 2 Success
-Creating: c/y/my_mount_point/my_dir/d 0 2 Success
-Creating: c/z/my_mount_point 0 2 Success
-Creating: /c/z/my_mount_point/a/../../my_mount_point/a/g 0 2 Success
-
-chdir to /
-chdir() status : 0
-
-Unmount status: 0
-Mount a NULL file system and verify EINVAL
-mount with option of -62 should fail with EINVAL
-Mount a Read Only filesystem at /c/y/my_mount_point
-Read only file system successfully mounted at /c/y/my_mount_point
-create c/y/my_mount_point/../../y/my_mount_point/new_dir
-Verify a mount point retruns EBUSY for another mount
-Mount on a file should fail with ENOTDIR
-Create and chdir to /c/y/my_mount_point/mydir
-unmount of /c/y/my_mount_point should fail with EBUSY
-chdir to / and verify we can unmount /c/y/my_mount_point
-unmount /c/y/my_mount_point
-unmount /b/mount_point should fail with EINVAL
-Mount /c/y/my_mount_point
-Create and open /c/y/my_mount_point/my_file
-
-mkdir /c/y/my_mount_point/my_dir
-Open /c/y/my_mount_point/my_dir
-Unmount /c/y/my_mount_point should fail with EBUSY
-Close /c/y/my_mount_point/my_dir
-Unmount /c/y/my_mount_point/my_dir
-Mount a file system at /c/y/my_mount_point/my_dir
-unmount /c/y/my_mount_point should fail with EBUSY
-Verify a hard link across filesystems fails with EXDEV
-Verify a symbolic link across file systems works
-unmount /c/y/my_mount_point/my_dir
-Verify the symbolic link now fails
-unmount /c/y/my_mount_point
-
-
-*** END OF MOUNT/UNMOUNT TEST ***
diff --git a/testsuites/psxtests/psxmount/test.c b/testsuites/psxtests/psxmount/test.c
deleted file mode 100644
index 4bd50efcf9..0000000000
--- a/testsuites/psxtests/psxmount/test.c
+++ /dev/null
@@ -1,445 +0,0 @@
-/*
- * This is a native test to explore how the readdir() family works.
- * Newlib supports the following readdir() family members:
- *
- * closedir() -
- * readdir() -
- * scandir() -
- * opendir() -
- * rewinddir() -
- * telldir() - BSD not in POSIX
- * seekdir() - BSD not in POSIX
- *
- *
- * seekdir() takes an offset which is a byte offset. The Linux
- * implementation of this appears to seek to the ((off/DIRENT_SIZE) + 1)
- * record where DIRENT_SIZE seems to be 12 bytes.
- *
- *
- *
- * $Id$
- */
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <dirent.h>
-#include <string.h>
-#include <assert.h>
-#include <unistd.h>
-#include <errno.h>
-#include <rtems.h>
-#include <rtems/libio.h>
-
-extern rtems_filesystem_location_info_t rtems_filesystem_current;
-
-DIR *directory;
-DIR *directory2;
-DIR *directory3;
-DIR *directory_not;
-
-#ifndef __P
-#define __P(args)()
-#endif
-
-char *dnames[] = {
- "a",
- "b",
- "c",
- "d",
- "e",
- "f",
- "c/y",
- "c/z",
- "c/x",
- "c/y/a3333",
- "c/y/j123",
- "c/y/my_mount_point",
- "c/y/my_mount_point/my_dir",
- "c/z/my_mount_point",
- "END"
-};
-
-char *fnames[] = {
- "a",
- "b",
- "c",
- "d",
- "e",
- "f",
- "c/y",
- "c/z",
- "c/x",
- "c/y/a3333",
- "c/y/j123",
- "c/y/my_mount_point",
- "c/y/my_mount_point/my_dir",
- "c/y/my_mount_point/my_dir/d",
- "c/z/my_mount_point",
- "/c/z/my_mount_point/a/../../my_mount_point/a/g",
- "END"
-};
-
-#if defined(__rtems__)
-int test_main(void)
-#else
-int main(
- int argc,
- char **argv
-)
-#endif
-{
- int i;
- int fd;
- int status;
- struct stat statbuf;
- rtems_filesystem_mount_table_entry_t *mt_entry;
- static char mount_point_string[25] = { "/c/z/my_mount_point" };
-
-
- printf( "\n\n*** MOUNT/UNMOUNT TEST ***\n" );
-
- /*
- * Change directory to the root and create files under
- * the base file system.
- */
-
- printf( "\nchdir to the root directory\n" );
- status = chdir( "/" );
- printf( "chdir() status : %d\n\n", status );
-
- printf( "\nCreating a series of directories under /\n" );
- i=0;
- while ( strcmp(dnames[i], "END") != 0 )
- {
- status = mkdir( dnames[i], 0777 );
- printf("Creating : %25s %d %d ", dnames[i], status, errno );
- if ( status == 0 )
- printf(" Success\n");
- else
- printf(" Failure\n");
-
- i++;
- }
-
- /*
- * Create a Files with all rwx for others group and user. Verify
- * the created file.
- */
-
- printf("create /b/my_file\n");
- fd = open ("/b/my_file", O_CREAT, S_IRWXU|S_IRWXG|S_IRWXO);
- assert( fd != 0 );
- close (fd);
-
- printf("Verify /b/my_file\n");
- fd = open("/b/my_file", S_IRWXU|S_IRWXG|S_IRWXO);
- assert( fd != 0 );
- close( fd );
-
-
- printf("create c/y/my_mount_point/my_dir/d\n");
- fd = open ("c/y/my_mount_point/my_dir/d", O_CREAT, S_IRWXU|S_IRWXG|S_IRWXO);
- assert( fd != 0 );
- close (fd);
-
- printf("Verify c/y/my_mount_point/my_dir/d\n");
- fd = open("c/y/my_mount_point/my_dir/d", S_IRWXU|S_IRWXG|S_IRWXO);
- assert( fd != 0 );
- close( fd );
-
- /*
- * Mount an the IMFS file system on the base file system.
- */
-
- printf("Attempting to mount IMFS file system at /c/z/my_mount_point \n");
- status = mount(
- &mt_entry,
- &IMFS_ops,
- RTEMS_FILESYSTEM_READ_WRITE,
- NULL,
- mount_point_string );
- assert( status == 0 );
- if( mt_entry == NULL ){
- printf(" NULL mount table entry was returned\n");
- }
- else {
- printf("2nd file system successfully mounted at /c/z/my_mount_point \n");
- }
-
- /*
- * Change directory to the mount point and create a group of files under
- * the mounted file system.
- */
-
- printf( "\nchdir to /c/z/my_mount_point.\n" );
- status = chdir( "/c/z/my_mount_point" );
- printf( "chdir() status : %d\n\n", status );
-
- printf( "\nCreating a series of directories under /c/z/my_mount_point\n" );
- i=0;
- while ( strcmp(fnames[i], "END") != 0 )
- {
- status = mkdir( fnames[i], 0777 );
- printf("Creating: %46s %d %d ", fnames[i], status, errno );
- if ( status == 0 )
- printf(" Success\n");
- else {
- printf(" Failure\n");
- perror("errno");
- }
-
- status = stat( fnames[i], &statbuf );
- if ( status == -1 )
- printf( ": %s\n", strerror( errno ) );
-
- i++;
- }
-
- printf( "\nchdir to /\n" );
- status = chdir( "/" );
- printf( "chdir() status : %d\n\n", status );
-
- /*
- * Unmount the first file system we mounted
- */
-
- printf( "Unmount status:");
- status = unmount( "/c/z/my_mount_point" );
- printf( " %d\n", status );
-
-
- /*
- * Mount a NULL filesystem and verify it fails.
- */
-
- printf("Mount a NULL file system and verify EINVAL\n");
- status = mount(
- &mt_entry,
- NULL,
- RTEMS_FILESYSTEM_READ_WRITE,
- NULL,
- mount_point_string );
- assert( status == -1 );
- assert( errno == EINVAL );
-
- /*
- * Verify mount with option of -62 fails with EINVAL
- */
-
- printf("mount with option of -62 should fail with EINVAL\n");
- status = mount(
- &mt_entry,
- &IMFS_ops,
- -62,
- NULL,
- "/c/y/my_mount_point" );
- assert( status == -1 );
- assert( errno == EINVAL );
-
- /*
- * Mount a Read Only File system.
- */
-
- printf("Mount a Read Only filesystem at /c/y/my_mount_point \n");
- status = mount(
- &mt_entry,
- &IMFS_ops,
- RTEMS_FILESYSTEM_READ_ONLY,
- NULL,
- "/c/y/my_mount_point" );
- assert( status == 0 );
- if( mt_entry == NULL ){
- printf(" NULL mount table entry was returned\n");
- }
- else {
- printf("Read only file system successfully mounted at /c/y/my_mount_point \n");
- }
-
- /*
- * Create a directory that passes through the read only file system.
- */
-
- printf("create c/y/my_mount_point/../../y/my_mount_point/new_dir\n");
- status = mkdir("c/y/my_mount_point/../../y/my_mount_point/new_dir",S_IRWXU );
- assert( status == 0 );
- status = stat("c/y/my_mount_point/../../y/my_mount_point/new_dir",&statbuf );
- assert( status == 0 );
- status = stat("c/y/my_mount_point/new_dir/..", &statbuf );
- assert( status == 0 );
-
- /*
- * Attempt to mount a second file system at a used mount point.
- */
-
- printf("Verify a mount point retruns EBUSY for another mount\n");
- status = mount(
- &mt_entry,
- &IMFS_ops,
- RTEMS_FILESYSTEM_READ_ONLY,
- NULL,
- "/c/y/my_mount_point" );
- assert( status == -1 );
- assert( errno == EBUSY);
-
- /*
- * Attempt to mount at a file.
- */
-
- printf("Mount on a file should fail with ENOTDIR\n");
- status = mount(
- &mt_entry,
- &IMFS_ops,
- RTEMS_FILESYSTEM_READ_ONLY,
- NULL,
- "/b/my_file" );
- assert( status == -1 );
- assert( errno == ENOTDIR );
-
-
- /*
- * Verify we cannot unmount a file system while we are in it.
- */
-
- printf("Create and chdir to /c/y/my_mount_point/mydir\n");
- status = mkdir( "/c/y/my_mount_point/mydir", 0777);
- assert( status == 0 );
-
- status = chdir( "/c/y/my_mount_point/mydir" );
- assert( status == 0 );
-
- printf("unmount of /c/y/my_mount_point should fail with EBUSY\n");
- status = unmount( "/c/y/my_mount_point" );
- assert( status == -1 );
- assert( errno == EBUSY );
-
- /*
- * Chdir to root and verify we can unmount the file system now.
- */
-
- printf("chdir to / and verify we can unmount /c/y/my_mount_point\n");
- status = chdir( "/" );
- assert( status == 0 );
-
- printf("unmount /c/y/my_mount_point \n");
- status = unmount( "/c/y/my_mount_point" );
- assert( status == 0 );
-
- /*
- * Attempt to unmount a directory that does not exist.
- */
-
- printf("unmount /b/mount_point should fail with EINVAL\n");
- status = unmount( "/b/mount_point" );
- assert( status == -1 );
- assert( errno == ENOENT );
-
- /*
- * Remount the filesystem.
- */
-
- printf("Mount /c/y/my_mount_point\n");
- status = mount(
- &mt_entry,
- &IMFS_ops,
- RTEMS_FILESYSTEM_READ_ONLY,
- NULL,
- "/c/y/my_mount_point" );
- assert( status == 0 );
-
- /*
- * Create a file and directory then open the directory.
- * Verify unmount will return EBUSY while directory is open.
- */
-
- printf("Create and open /c/y/my_mount_point/my_file\n");
- fd = open( "/c/y/my_mount_point/my_file", O_CREAT, S_IRWXU|S_IRWXG|S_IRWXO);
- assert( fd != -1 );
- status = close( fd );
- assert( status == 0 );
-
- printf("\nmkdir /c/y/my_mount_point/my_dir\n");
- status = mkdir( "/c/y/my_mount_point/my_dir", 0x1c0 );
- printf("Open /c/y/my_mount_point/my_dir\n");
- directory = opendir( "/c/y/my_mount_point/my_dir" );
- assert( directory );
-
- printf("Unmount /c/y/my_mount_point should fail with EBUSY\n");
- status = unmount( "/c/y/my_mount_point" );
- assert( status == -1 );
- assert( errno == EBUSY );
-
- printf("Close /c/y/my_mount_point/my_dir\n");
- status = closedir( directory );
- assert( status == 0 );
-
- /*
- * Attempt to unmount a directory that is not a mount point.
- */
-
- printf("Unmount /c/y/my_mount_point/my_dir\n");
- status = unmount( "/c/y/my_mount_point/my_dir" );
- assert( status == -1 );
- assert( errno == EACCES );
-
- /*
- * Verify a file system can not be unmounted with a mounted file system
- * in it.
- */
-
- printf("Mount a file system at /c/y/my_mount_point/my_dir\n");
- status = mount(
- &mt_entry,
- &IMFS_ops,
- RTEMS_FILESYSTEM_READ_WRITE,
- NULL,
- "/c/y/my_mount_point/my_dir");
- assert( status == 0 );
-
- printf("unmount /c/y/my_mount_point should fail with EBUSY\n");
- status = unmount( "/c/y/my_mount_point" );
- assert( status == -1 );
- assert( errno == EBUSY );
-
- /*
- * Verify you cannot create a hard link across mounted file systems.
- */
-
- printf("Verify a hard link across filesystems fails with EXDEV\n");
- status = mkdir( "/c/y/my_mount_point/my_dir2", S_IRWXU );
- assert( status == 0 );
-
- status = link( "/c/y/my_mount_point/my_dir2", "/c/y/my_mount_point/my_dir/my_link" );
- assert( status == -1 );
- assert( errno == EXDEV );
-
- /*
- * Create a symbolic link across mountpoints.
- */
-
- printf("Verify a symbolic link across file systems works\n");
- status = symlink( "/c/y/my_mount_point/my_dir2", "/c/y/my_mount_point/my_dir/my_link" );
- assert( status == 0 );
- status = stat( "/c/y/my_mount_point/my_dir/my_link", &statbuf );
- assert( status == 0 );
-
- printf("unmount /c/y/my_mount_point/my_dir\n");
- status = unmount( "/c/y/my_mount_point/my_dir" );
- assert( status == 0 );
-
- /*
- * Verify symblic link no longer works.
- */
-
- printf("Verify the symbolic link now fails\n");
- status = stat( "/c/y/my_mount_point/my_dir/my_link", &statbuf );
- assert( status != 0 );
-
- printf("unmount /c/y/my_mount_point\n");
- status = unmount( "/c/y/my_mount_point" );
- assert( status == 0 );
-
- printf( "\n\n*** END OF MOUNT/UNMOUNT TEST ***\n" );
- exit(0);
-}
-
diff --git a/testsuites/psxtests/psxmsgq01/Makefile.am b/testsuites/psxtests/psxmsgq01/Makefile.am
deleted file mode 100644
index 0737b0b6e7..0000000000
--- a/testsuites/psxtests/psxmsgq01/Makefile.am
+++ /dev/null
@@ -1,43 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = psxmsgq01
-
-MANAGERS = all
-
-C_FILES = init.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/psxtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CPPFLAGS = -I$(top_srcdir)/include
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/psxtests/psxmsgq01/init.c b/testsuites/psxtests/psxmsgq01/init.c
deleted file mode 100644
index d1197d6a90..0000000000
--- a/testsuites/psxtests/psxmsgq01/init.c
+++ /dev/null
@@ -1,1297 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define CONFIGURE_INIT
-#include "system.h"
-#include <sched.h>
-#include <fcntl.h>
-#include <time.h>
-#include <tmacros.h>
-#include <signal.h> /* signal facilities */
-
-typedef struct {
- char msg[ 50 ];
- int size;
- unsigned int priority;
-}Test_Message_t;
-Test_Message_t Predefined_Msgs[MAXMSG+1];
-Test_Message_t Predefined_Msgs[MAXMSG+1] = {
- { "12345678", 9, MQ_PRIO_MAX-1 }, /* Max Length Message med */
- { "", 1, 1 }, /* NULL Message low */
- { "Last", 5, MQ_PRIO_MAX }, /* Queue Full Message hi */
- { "No Message", 0, MQ_PRIO_MAX-1 }, /* 0 length Message med */
- { "1", 2, 0 }, /* Cause Overflow Behavior */
-};
-int Priority_Order[MAXMSG+1] = { 2, 0, 3, 1, MAXMSG };
-
-
-typedef struct {
- mqd_t mq;
- Test_Queue_Types index;
- char *name;
- int oflag;
- int maxmsg;
- int msgsize;
- int count;
-} Test_queue_type;
-
-Test_queue_type Test_q[ NUMBER_OF_TEST_QUEUES ] =
-{
- { 0, 0, "Qread", ( O_CREAT | O_RDONLY | O_NONBLOCK ), MAXMSG, MSGSIZE, 0 },
- { 0, 1, "Qwrite", ( O_CREAT | O_WRONLY | O_NONBLOCK ), MAXMSG, MSGSIZE, 0 },
- { 0, 2, "Qnoblock", ( O_CREAT | O_RDWR | O_NONBLOCK ), MAXMSG, MSGSIZE, 0 },
- { 0, 3, "Qblock", ( O_CREAT | O_RDWR ) , MAXMSG, MSGSIZE, 0 },
- { 0, 4, "Qdefault", ( O_CREAT | O_RDWR ) , 10, 16, 0 },
- { 0, 5, "mq6", ( O_CREAT | O_WRONLY | O_NONBLOCK ), MAXMSG, MSGSIZE, 0 },
-};
-
-#define RW_NAME Test_q[ RW_QUEUE ].name
-#define DEFAULT_NAME Test_q[ DEFAULT_RW ].name
-#define RD_NAME Test_q[ RD_QUEUE ].name
-#define WR_NAME Test_q[ WR_QUEUE ].name
-#define BLOCKING_NAME Test_q[ BLOCKING ].name
-#define CLOSED_NAME Test_q[ CLOSED ].name
-
-#define RW_ATTR Test_q[ RW_QUEUE ].oflag
-#define DEFAULT_ATTR Test_q[ DEFAULT_RW ].oflag
-#define RD_ATTR Test_q[ RD_QUEUE ].oflag
-#define WR_ATTR Test_q[ WR_QUEUE ].oflag
-#define BLOCK_ATTR Test_q[ BLOCKING ].oflag
-#define CLOSED_ATTR Test_q[ CLOSED ].oflag
-
-/*
- * Outputs a header at each test section.
- */
-void Start_Test(
- char *description
-)
-{
- printf( "_______________%s\n", description );
-}
-
-
-void Validate_attributes(
- mqd_t mq,
- int oflag,
- int msg_count
-)
-{
- int status;
- struct mq_attr attr;
-
- status = mq_getattr( mq, &attr );
- fatal_posix_service_status( status, 0, "mq_getattr valid return status");
-
- if ( mq != Test_q[ DEFAULT_RW ].mq ){
- fatal_int_service_status((int)attr.mq_maxmsg, MAXMSG, "maxmsg attribute" );
- fatal_int_service_status((int)attr.mq_msgsize,MSGSIZE,"msgsize attribute");
- }
-
- fatal_int_service_status((int)attr.mq_curmsgs, msg_count, "count attribute" );
- fatal_int_service_status((int)attr.mq_flags, oflag, "flag attribute" );
-}
-
-char Queue_Name[PATH_MAX + 2];
-#define Get_Queue_Name( i ) Test_q[i].name
-
-char *Build_Queue_Name( int i ) {
- sprintf(Queue_Name,"mq%d", i+1 );
- return Queue_Name;
-}
-
-char *Get_Too_Long_Name()
-{
- int i;
-
- for ( i=0; i< PATH_MAX+1; i++ )
- Queue_Name[i] = 'N';
- Queue_Name[i] = '\0';
- return Queue_Name;
-}
-
-
-void open_test_queues()
-{
- struct mq_attr attr;
- int status;
- Test_queue_type *tq;
- int que;
-
- attr.mq_maxmsg = MAXMSG;
- attr.mq_msgsize = MSGSIZE;
-
- puts( "Init: Open Test Queues" );
-
- for( que = 0; que < NUMBER_OF_TEST_QUEUES; que++ ) {
-
- tq = &Test_q[ que ];
- if ( que == DEFAULT_RW)
- Test_q[que].mq = mq_open( tq->name, tq->oflag, 0x777, NULL );
- else
- Test_q[que].mq = mq_open( tq->name, tq->oflag, 0x777, &attr );
-
- assert( Test_q[que].mq != (-1) );
- }
-
- status = mq_close( Test_q[CLOSED].mq );
- fatal_posix_service_status( status, 0, "mq_close message queue");
- status = mq_unlink( CLOSED_NAME );
- fatal_posix_service_status( status, 0, "mq_unlink message queue");
-}
-
-/*
- * Opens CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES then leaves size queues
- * opened but closes the rest.
- */
-
-void validate_mq_open_error_codes()
-{
- int i;
- mqd_t n_mq2;
- struct mq_attr attr;
- int status;
- mqd_t open_mq[CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES];
-
- attr.mq_maxmsg = MAXMSG;
- attr.mq_msgsize = MSGSIZE;
-
- Start_Test( "mq_open errors" );
-
- /*
- * XXX EINVAL - inappropriate name was given for the message queue
- */
-
- /*
- * EINVAL - Create with negative maxmsg.
- */
-
- attr.mq_maxmsg = -1;
- puts( "Init: mq_open - Create with maxmsg (-1) (EINVAL)" );
- n_mq2 = mq_open( "mq2", O_CREAT | O_RDONLY, 0x777, &attr);
- fatal_posix_service_status(
- (int) n_mq2, (int ) (-1), "mq_open error return status" );
- fatal_posix_service_status( errno, EINVAL, "mq_open errno EINVAL");
- attr.mq_maxmsg = MAXMSG;
-
- /*
- * EINVAL - Create withnegative msgsize.
- */
-
- attr.mq_msgsize = -1;
- puts( "Init: mq_open - Create with msgsize (-1) (EINVAL)" );
- n_mq2 = mq_open( "mq2", O_CREAT | O_RDONLY, 0x777, &attr);
- fatal_posix_service_status(
- (int) n_mq2, (int ) (-1), "mq_open error return status" );
- fatal_posix_service_status( errno, EINVAL, "mq_open errno EINVAL");
- attr.mq_msgsize = MSGSIZE;
-
- /*
- * ENOENT - Open a non-created file.
- */
-
- puts( "Init: mq_open - Open new mq without create flag (ENOENT)" );
- n_mq2 = mq_open( "mq3", O_EXCL | O_RDONLY, 0x777, NULL);
- fatal_posix_service_status(
- (int) n_mq2, (int ) (-1), "mq_open error return status" );
- fatal_posix_service_status( errno, ENOENT, "mq_open errno ENOENT");
-
-
- /*
- * XXX EINTR - call was interrupted by a signal
- */
-
- /*
- * ENAMETOOLONG - Give a name greater than PATH_MAX.
- */
-
- puts( "Init: mq_open - Open with too long of a name (ENAMETOOLONG)" );
- n_mq2 = mq_open( Get_Too_Long_Name(), O_CREAT | O_RDONLY, 0x777, NULL );
- fatal_posix_service_status(
- (int) n_mq2, (int ) (-1), "mq_open error return status" );
- fatal_posix_service_status( errno, ENAMETOOLONG, "mq_open errno ENAMETOOLONG");
-
- /*
- * XXX - ENAMETOOLONG - Give a name greater than NAME_MAX
- * Per implementation not possible.
- */
-
- /*
- * Open maximum number of message queues
- */
-
- puts( "Init: mq_open - SUCCESSFUL" );
- for (i = 0; i < CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES; i++) {
- open_mq[i] = mq_open(
- Build_Queue_Name(i), O_CREAT | O_RDWR | O_NONBLOCK, 0x777, NULL );
- assert( open_mq[i] != (-1) );
- /*XXX - Isn't there a more general check */
- }
-
- /*
- * XXX EACCES - permission to create is denied.
- */
-
- /*
- * XXX EACCES - queue exists permissions specified by o_flag are denied.
- */
-
- /*
- * EEXIST - Create an existing queue.
- */
-
- puts( "Init: mq_open - Create an Existing mq (EEXIST)" );
- n_mq2 = mq_open(
- Build_Queue_Name(0), O_CREAT | O_EXCL | O_RDONLY, 0x777, NULL);
- fatal_posix_service_status(
- (int) n_mq2, (int ) (-1), "mq_open error return status" );
- fatal_posix_service_status( errno, EEXIST, "mq_open errno EEXIST");
-
- /*
- * XXX EMFILE - Too many message queues in use by the process
- */
-
- /*
- * ENFILE - Too many message queues open in the system
- */
-
- puts( "Init: mq_open - system is out of resources (ENFILE)" );
- n_mq2 = mq_open( Build_Queue_Name(i), O_CREAT | O_RDONLY, 0x777, NULL );
- fatal_posix_service_status(
- (int) n_mq2, (int ) (-1), "mq_open error return status" );
- fatal_posix_service_status( errno, ENFILE, "mq_open errno ENFILE");
-
- /*
- * Unlink and Close all queues.
- */
-
- puts( "Init: mq_close and mq_unlink (mq3...mqn) - SUCCESSFUL" );
- for (i = 0; i < CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES; i++) {
-
- status = mq_close( open_mq[i]);
- fatal_posix_service_status( status, 0, "mq_close message queue");
-
- status = mq_unlink( Build_Queue_Name(i) );
- fatal_posix_service_status( status, 0, "mq_unlink message queue");
- }
-}
-
-void validate_mq_unlink_error_codes()
-{
- int status;
-
- Start_Test( "mq_unlink errors" );
-
- /*
- * XXX - EACCES Permission Denied
- */
-
- /*
- * ENAMETOOLONG - Give a name greater than PATH_MAX.
- */
-
- puts( "Init: mq_unlink - mq_unlink with too long of a name (ENAMETOOLONG)" );
- status = mq_unlink( Get_Too_Long_Name() );
- fatal_posix_service_status( status, -1, "mq_unlink error return status");
- fatal_posix_service_status( errno, ENAMETOOLONG, "mq_unlink errno ENAMETOOLONG");
-
- /*
- * XXX - ENAMETOOLONG - Give a name greater than NAME_MAX
- * Per implementation not possible.
- */
-
- /*
- * ENOENT - Unlink an unopened queue
- */
-
- puts( "Init: mq_unlink - A Queue not opened (ENOENT)" );
- status = mq_unlink( CLOSED_NAME );
- fatal_posix_service_status( status, -1, "mq_unlink error return status");
- fatal_posix_service_status( errno, ENOENT, "mq_unlink errno ENOENT");
-
- /*
- * XXX - The following were not listed in the POSIX document as
- * possible errors. Under other commands the EINVAL is
- * given for these conditions.
- */
-
- /*
- * EINVAL - Unlink a queue with no name
- */
-
- puts( "Init: mq_unlink (NULL) - EINVAL" );
- status = mq_unlink( NULL );
- fatal_posix_service_status( status, -1, "mq_unlink error return status");
- fatal_posix_service_status( errno, EINVAL, "mq_unlink errno value");
-
- /*
- * EINVAL - Unlink a queue with a null name
- */
-
- puts( "Init: mq_unlink (\"\") - EINVAL" );
- status = mq_unlink( "" );
- fatal_posix_service_status( status, -1, "mq_unlink error return status");
- fatal_posix_service_status( errno, EINVAL, "mq_unlink errno value");
-}
-
-void validate_mq_close_error_codes()
-{
- int status;
-
- Start_Test( "mq_close errors" );
-
- /*
- * EBADF - Close a queue that is not open.
- */
-
- puts( "Init: mq_close - unopened queue (EBADF)" );
- status = mq_close( Test_q[CLOSED].mq );
- fatal_posix_service_status( status, -1, "mq_close error return status");
- fatal_posix_service_status( errno, EBADF, "mq_close errno EBADF");
-}
-
-
-void validate_mq_getattr_error_codes()
-{
- struct mq_attr attr;
- int status;
-
- Start_Test( "mq_getattr errors" );
-
- /*
- * EBADF - Get the attributes from a closed queue.
- */
-
- puts( "Init: mq_getattr - unopened queue (EBADF)" );
- status = mq_getattr( Test_q[CLOSED].mq, &attr );
- fatal_posix_service_status( status, -1, "mq_close error return status");
- fatal_posix_service_status( errno, EBADF, "mq_close errno EBADF");
-
- /*
- * XXX - The following are not listed in the POSIX manual but
- * may occur.
- */
-
- /*
- * EINVAL - NULL attributes
- */
-
- puts( "Init: mq_getattr - NULL attributes (EINVAL)" );
- status = mq_getattr( Test_q[RW_QUEUE].mq, NULL );
- fatal_posix_service_status( status, -1, "mq_close error return status");
- fatal_posix_service_status( errno, EINVAL, "mq_close errno EINVAL");
-
-}
-
-
-void Send_msg_to_que(
- int que,
- int msg
-)
-{
- Test_Message_t *ptr = &Predefined_Msgs[msg];
- int status;
-
- status = mq_send( Test_q[que].mq, ptr->msg, ptr->size , ptr->priority );
- fatal_posix_service_status( status, 0, "mq_send valid return status");
- Test_q[que].count++;
-}
-
-void Show_send_msg_to_que(
- char *task_name,
- int que,
- int msg
-)
-{
- Test_Message_t *ptr = &Predefined_Msgs[msg];
- printf( "%s mq_send - to %s msg: %s priority %d\n",
- task_name, Test_q[que].name, ptr->msg, ptr->priority);
- Send_msg_to_que( que, msg );
-}
-
-void verify_queues_full(
- char *task_name
-)
-{
- int que;
-
- /*
- * Validate that the queues are full.
- */
-
- printf( "%s Verify Queues are full\n", task_name );
- for( que = RW_QUEUE; que < CLOSED; que++ )
- Validate_attributes( Test_q[que].mq, Test_q[que].oflag, Test_q[que].count );
-
-}
-void verify_queues_empty(
- char *task_name
-)
-{
- int que;
-
- printf( "%s Verify Queues are empty\n", task_name );
- for( que = RW_QUEUE; que < CLOSED; que++ )
- Validate_attributes( Test_q[que].mq, Test_q[que].oflag, 0 );
-}
-
-int fill_message_queues(
- char *task_name
-)
-{
- int msg;
- int que;
-
-
- verify_queues_empty( task_name );
-
- /*
- * Fill Queue with predefined messages.
- */
-
- printf( "%s Fill Queues with messages\n", task_name );
- for(msg=0; msg<MAXMSG; msg++){
- for( que = RW_QUEUE; que < CLOSED; que++ ) {
- Send_msg_to_que( que, msg );
- }
- }
-
- verify_queues_full( "Init:" );
- return msg;
-}
-
-
-void Read_msg_from_que(
- int que,
- int msg
-)
-{
- unsigned int priority;
- Test_Message_t *ptr;
- int status;
- char message[100];
- char err_msg[100];
-
- ptr = &Predefined_Msgs[msg];
- status = mq_receive(Test_q[ que ].mq, message, 100, &priority );
- Test_q[que].count--;
-
- sprintf( err_msg, "%s msg %s size failure", Test_q[ que ].name, ptr->msg );
- fatal_int_service_status( status, ptr->size, err_msg );
-
- assert( !strcmp( message, ptr->msg ) );
- strcpy( message, "No Message" );
-
- sprintf( err_msg,"%s msg %s size failure", Test_q[ que ].name, ptr->msg );
- fatal_int_service_status(priority, ptr->priority, err_msg );
-}
-
-int empty_message_queues(
- char *task_name
-)
-{
- int que;
- int i;
-
- printf( "%s Empty all Queues\n", task_name );
- for( que = RW_QUEUE; que < CLOSED; que++ ) {
- for(i=0; Test_q[que].count != 0; i++ )
- Read_msg_from_que( que, Priority_Order[i] );
-
- Validate_attributes( Test_q[ que].mq, Test_q[ que ].oflag, 0 );
- }
- return 0;
-}
-
-/*
- * Returns the number of messages queued after the test on the
- * first queue.
- */
-
-int validate_mq_send_error_codes( )
-{
- int status;
- int i;
- char *str;
-
- Start_Test( "mq_send errors" );
-
- /*
- * EBADF - Write to a closed queue.
- */
-
- puts( "Init: mq_send - Closed message queue (EBADF)" );
- status = mq_send( Test_q[CLOSED].mq, "", 1, 0 );
- fatal_posix_service_status( status, -1, "mq_send error return status");
- fatal_posix_service_status( errno, EBADF, "mq_send errno EBADF");
-
- /*
- * EBADF - Write to a read only queue.
- */
-
- puts( "Init: mq_send - Read only message queue (EBADF)" );
- status = mq_send( Test_q[ RD_QUEUE ].mq, "", 1, 0 );
- fatal_posix_service_status( status, -1, "mq_send error return status");
- fatal_posix_service_status( errno, EBADF, "mq_send errno EBADF");
-
- /*
- * XXX - EINTR Signal interrupted the call.
- *
- puts( "Init: mq_send - UNSUCCESSFUL (EINTR)" );
- status = mq_send( Test_q, "", 0xffff, 0 );
- fatal_posix_service_status( status, -1, "mq_send error return status");
- fatal_posix_service_status( errno, E, "mq_send errno E");
- */
-
- /*
- * EINVAL priority is out of range.
- */
-
- puts( "Init: mq_send - Priority out of range (EINVAL)" );
- status = mq_send( Test_q[ RW_QUEUE ].mq, "", 1, MQ_PRIO_MAX + 1 );
- fatal_posix_service_status( status, -1, "mq_send error return status");
- fatal_posix_service_status( errno, EINVAL, "mq_send errno EINVAL");
-
- /*
- * EMSGSIZE - Message size larger than msg_len
- * Validates that msgsize is stored correctly.
- */
-
- puts( "Init: mq_send - Message longer than msg_len (EMSGSIZE)" );
- status = mq_send( Test_q[ RW_QUEUE ].mq, "", MSGSIZE+1, 0 );
- fatal_posix_service_status( status, -1, "mq_send error return status");
- fatal_posix_service_status( errno, EMSGSIZE, "mq_send errno EMSGSIZE");
-
- i = fill_message_queues( "Init:" );
-
- /*
- * ENOSYS - send not supported
- puts( "Init: mq_send - Blocking Queue overflow (ENOSYS)" );
- status = mq_send( n_mq1, Predefined_Msgs[i], 0, 0 );
- fatal_posix_service_status( status, -1, "mq_send error return status");
- fatal_posix_service_status( errno, EBADF, "mq_send errno EBADF");
-
- status = mq_close( n_mq1 );
- fatal_posix_service_status( status, 0, "mq_close message queue");
-
- status = mq_unlink( "read_only" );
- fatal_posix_service_status( status, 0, "mq_unlink message queue");
- */
-
- /*
- * EAGAIN - O_NONBLOCK and message queue is full.
- */
-
- puts( "Init: mq_send - on a FULL non-blocking queue with (EAGAIN)" );
- str = Predefined_Msgs[i].msg;
- status = mq_send(Test_q[RW_QUEUE].mq, str, 0, 0 );
- fatal_posix_service_status( status, -1, "mq_send error return status");
- fatal_posix_service_status( errno, EAGAIN, "mq_send errno EAGAIN");
-
- return i-1;
-}
-
-void validate_mq_receive_error_codes( )
-{
- int status;
- char message[100];
- unsigned int priority;
-
- Start_Test( "mq_receive errors" );
-
- /*
- * EBADF - Not A Valid Message Queue
- */
-
- puts( "Init: mq_receive - Unopened message queue (EBADF)" );
- status = mq_receive( Test_q[CLOSED].mq, message, 100, &priority );
- fatal_posix_service_status( status, -1, "mq_ error return status");
- fatal_posix_service_status( errno, EBADF, "mq_receive errno EBADF");
-
- /*
- * EBADF - Queue not opened to read
- */
-
- puts( "Init: mq_receive - Write only queue (EBADF)" );
- status = mq_receive( Test_q[WR_QUEUE].mq, message, 100, &priority );
- fatal_posix_service_status( status, -1, "mq_ error return status");
- fatal_posix_service_status( errno, EBADF, "mq_receive errno EBADF");
-
- /*
- * EMSGSIZE - Size is less than the message size attribute
- */
-
- puts( "Init: mq_receive - Size is less than the message (EMSGSIZE)" );
- status = mq_receive(
- Test_q[RW_QUEUE].mq, message, Predefined_Msgs[0].size-1, &priority );
- fatal_posix_service_status( status, -1, "mq_ error return status");
- fatal_posix_service_status( errno, EMSGSIZE, "mq_receive errno EMSGSIZE");
-
-
- /*
- * EAGAIN - O_NONBLOCK and Queue is empty
- */
- verify_queues_full( "Init:" );
- empty_message_queues( "Init:" );
-
- puts( "Init: mq_receive - Queue is empty (EAGAIN)" );
- status = mq_receive( Test_q[RW_QUEUE].mq, message, 100, &priority );
- fatal_posix_service_status( status, -1, "mq_ error return status");
- fatal_posix_service_status( errno, EAGAIN, "mq_receive errno EAGAIN");
-
- /*
- * XXX - EINTR - Interrupted by a signal
- */
-
- /*
- * XXX - EBADMSG - a data corruption problem.
- */
-
- /*
- * XXX - ENOSYS - mq_receive not supported
- */
-}
-
-void verify_open_functionality()
-{
- mqd_t n_mq;
-
- Start_Test( "mq_open functionality" );
-
- /*
- * Validate a second open returns the same message queue.
- */
-
- puts( "Init: mq_open - Open an existing mq ( same id )" );
- n_mq = mq_open( RD_NAME, 0 );
- fatal_posix_service_status(
- (int) n_mq, (int ) Test_q[RD_QUEUE].mq, "mq_open error return status" );
-}
-
-void verify_unlink_functionality()
-{
- mqd_t n_mq;
- int status;
-
- Start_Test( "mq_unlink functionality" );
-
- /*
- * Unlink the message queue, then verify an open of the same name produces a
- * different message queue.
- */
-
- puts( "Init: Unlink and Open without closing SUCCESSFUL" );
- status = mq_unlink( DEFAULT_NAME );
- fatal_posix_service_status( status, 0, "mq_unlink locked message queue");
-
- n_mq = mq_open( DEFAULT_NAME, DEFAULT_ATTR, 0x777, NULL );
- assert( n_mq != (-1) );
- assert( n_mq != Test_q[ DEFAULT_RW ].mq );
-
-
- status = mq_unlink( DEFAULT_NAME );
- fatal_posix_service_status( status, 0, "mq_unlink locked message queue");
- status = mq_close( Test_q[ DEFAULT_RW ].mq );
- fatal_posix_service_status( status, 0, "mq_close message queue");
-
- Test_q[ DEFAULT_RW ].mq = n_mq;
-}
-
-void verify_close_functionality()
-{
- int i;
- int status;
- Start_Test( "Unlink and Close All Files" );
- for (i=0; i<DEFAULT_RW; i++) {
-
- status = mq_unlink( Get_Queue_Name(i) );
- fatal_posix_service_status( status, 0, "mq_unlink message queue");
-
- status = mq_close( Test_q[i].mq );
- fatal_posix_service_status( status, 0, "mq_close message queue");
- }
-}
-
-
-void verify_timed_send_queue(
- int que,
- int is_blocking
-)
-{
- struct timespec timeout;
- struct timeval tv1, tv2, tv3;
- struct timezone tz1, tz2;
- int len;
- int status;
- char *msg;
-
- timeout.tv_sec = 1;
- timeout.tv_nsec = 0;
-
- printf( "Init: mq_timedsend - on queue %s ", Test_q[que].name);
- len = Predefined_Msgs[MAXMSG].size;
- msg = Predefined_Msgs[MAXMSG].msg;
- gettimeofday( &tv1, &tz1 );
- status = mq_timedsend( Test_q[que].mq, msg, len , 0, &timeout );
- gettimeofday( &tv2, &tz2 );
- tv3.tv_sec = tv2.tv_sec - tv1.tv_sec;
- tv3.tv_usec = tv2.tv_usec - tv1.tv_usec;
-
- if ( is_blocking ) { /* Don't verify the non-blocking queue */
- fatal_int_service_status( status, -1, "mq_timedsend status");
- fatal_posix_service_status( errno, ETIMEDOUT, "errno ETIMEDOUT");
- }
-
- printf("Init: %d sec %d us\n", tv3.tv_sec, tv3.tv_usec );
-
- if ( is_blocking ) /* non-blocking queue */
- assert( tv3.tv_sec == 1 );
- else
- assert( tv3.tv_sec == 0 );
-
- if ( que == DEFAULT_RW )
- Test_q[que].count++;
-}
-
-void verify_timed_send()
-{
- int que;
-
- Start_Test( "mq_timedsend" );
-
- for( que = RW_QUEUE; que < CLOSED; que++ ) {
- if ( que == BLOCKING )
- verify_timed_send_queue( que, 1 );
- else
- verify_timed_send_queue( que, 0 );
- }
-}
-
-void verify_timed_receive_queue(
- char *task_name,
- int que,
- int is_blocking
-)
-{
- char message[ 100 ];
- unsigned int priority;
- struct timespec tm;
- struct timeval tv1, tv2, tv3;
- struct timezone tz1, tz2;
- int status;
-
- tm.tv_sec = 1;
- tm.tv_nsec = 0;
-
- printf( "Init: %s mq_timedreceive - on queue %s ", task_name, Test_q[que].name);
-
- gettimeofday( &tv1, &tz1 );
- status = mq_timedreceive( Test_q[ que ].mq, message, 100, &priority, &tm );
- gettimeofday( &tv2, &tz2 );
- tv3.tv_sec = tv2.tv_sec - tv1.tv_sec;
- tv3.tv_usec = tv2.tv_usec - tv1.tv_usec;
-
- fatal_int_service_status( status, -1, "mq_timedreceive status");
- if ( is_blocking )
- fatal_posix_service_status( errno, ETIMEDOUT, "errno ETIMEDOUT");
- printf( "Init: %d sec %d us\n", tv3.tv_sec, tv3.tv_usec );
-
- if ( is_blocking )
- assert( tv3.tv_sec == 1 );
- else
- assert( tv3.tv_sec == 0 );
-}
-
-
-
-void verify_timed_receive()
-{
- int que;
-
- Start_Test( "mq_timedreceive" );
-
- for( que = RW_QUEUE; que < CLOSED; que++ ) {
- if (( que == BLOCKING ) || ( que == DEFAULT_RW ))
- verify_timed_receive_queue( "Init:", que, 1 );
- else
- verify_timed_receive_queue( "Init:", que, 0 );
- }
-}
-
-#if (0)
-void verify_set_attr()
-{
- struct mq_attr save_attr[ NUMBER_OF_TEST_QUEUES ];
- struct mq_attr attr;
- int i;
- int status;
-
- attr.mq_maxmsg = 0;
- attr.mq_msgsize = 0;
-
- Start_Test( "mq_setattr" );
-
- puts( "Init: set_attr all queues to blocking" );
- for(i=0; i<CLOSED; i++) {
- attr.mq_flags = Test_q[i].oflag & (~O_NONBLOCK );
- status = mq_setattr( Test_q[i].mq, &attr, &save_attr[i] );
- fatal_int_service_status( status, 0, "mq_setattr valid return status");
-
- Validate_attributes( Test_q[i].mq, attr.mq_flags, 0 );
- }
-
- for( i = RW_QUEUE; i < CLOSED; i++ ) {
- verify_timed_receive_queue( "Init:", i, 1 );
- }
-
- for(i=0; i<CLOSED; i++) {
- attr.mq_flags = Test_q[i].oflag & (~O_NONBLOCK );
- status = mq_setattr( Test_q[i].mq, &save_attr[i], NULL );
- fatal_int_service_status( status, 0, "mq_setattr valid return status");
-
- Validate_attributes( Test_q[i].mq, Test_q[i].oflag, 0 );
- }
-}
-#endif
-
-void wait_for_signal(
- sigset_t *waitset,
- int sec,
- int expect_signal
-)
-{
- siginfo_t siginfo;
- int status;
- struct timespec timeout;
- int signo;
-
- siginfo.si_code = -1;
- siginfo.si_signo = -1;
- siginfo.si_value.sival_int = -1;
-
- timeout.tv_sec = sec;
- timeout.tv_nsec = 0;
-
- status = sigemptyset( waitset );
- assert( !status );
-
- status = sigaddset( waitset, SIGUSR1 );
- assert( !status );
-
- printf( "waiting on any signal for %d seconds.\n", sec );
- signo = sigtimedwait( waitset, &siginfo, &timeout );
- if (expect_signal) {
- fatal_int_service_status( signo, SIGUSR1, "got SISUSR1" );
- } else {
- fatal_int_service_status( signo, -1, "error return status");
- fatal_posix_service_status( errno, EAGAIN, "errno EAGAIN");
- }
-}
-
-void verify_notify()
-{
- struct sigevent event;
- int status;
- timer_t timer_id;
- sigset_t set;
-
- Start_Test( "mq_notify" );
-
- /* timer create */
- event.sigev_notify = SIGEV_SIGNAL;
- event.sigev_signo = SIGUSR1;
- if (timer_create (CLOCK_REALTIME, &event, &timer_id) == -1)
- fatal_posix_service_status( errno, 0, "errno ETIMEDOUT");
-
- /* block the timer signal */
- sigemptyset( &set );
- sigaddset( &set, SIGUSR1 );
- pthread_sigmask( SIG_BLOCK, &set, NULL );
-
- /*
- * EBADF - Not A Valid Message Queue
- */
-
- puts( "Init: mq_notify - Unopened message queue (EBADF)" );
- status = mq_notify( Test_q[CLOSED].mq, NULL );
- fatal_posix_service_status( status, -1, "mq_ error return status");
- fatal_posix_service_status( errno, EBADF, "mq_receive errno EBADF");
-
- /*
- * Create ...
- */
-
- /*
- * XXX setup notification
- */
-
- printf( "_____mq_notify - notify when %s gets a message\n",RW_NAME);
- status = mq_notify( Test_q[RW_QUEUE].mq, &event );
- fatal_posix_service_status( status, 0, "mq_notify valid status");
- wait_for_signal( &set, 3, 0 );
-
- /*
- * Send and verify signal occurs and registration is removed.
- */
-
- puts( "Init: Verify Signal when send" );
- Show_send_msg_to_que( "Init:", RW_QUEUE, 0 );
- wait_for_signal( &set, 3, 1 );
- Read_msg_from_que( RW_QUEUE, 0 );
-
- puts( "Init: Verify No Signal when send" );
- Show_send_msg_to_que( "Init:", RW_QUEUE, 0 );
- wait_for_signal( &set, 3, 0 );
- Read_msg_from_que( RW_QUEUE, 0 );
-
-
- /*
- * EBUSY - Already Registered
- */
-
- printf( "____mq_notify - notify when %s gets a message\n",RD_NAME);
- status = mq_notify( Test_q[RW_QUEUE].mq, &event );
- fatal_posix_service_status( status, 0, "mq_notify valid status");
- wait_for_signal( &set, 3, 0 );
-
- puts( "Init: mq_notify - (EBUSY)" );
- status = mq_notify( Test_q[RW_QUEUE].mq, &event );
- fatal_posix_service_status( status, -1, "mq_notify error return status");
- fatal_posix_service_status( errno, EBUSY, "mq_notify errno EBUSY");
-
- /*
- * Verify NULL removes registration.
- */
-
- puts( "Init: mq_notify - Remove notification with null" );
- status = mq_notify( Test_q[RW_QUEUE].mq, NULL );
- fatal_posix_service_status( status, 0, "mq_notify valid status");
-
- puts( "Init: Verify No Signal when send" );
- Show_send_msg_to_que( "Init:", RW_QUEUE, 0 );
- wait_for_signal( &set, 3, 0 );
- Read_msg_from_que( RW_QUEUE, 0 );
-
-}
-
-void verify_with_threads()
-{
- int status;
- pthread_t id;
- Test_Message_t *ptr;
- unsigned int priority;
- char message[100];
-
-
- /*
- * Create a task then block until the task sends the message.
- * Task tests set attributes so one queue will have a thread
- * blocked while attributes are changed.
- */
-
- Start_Test( "multi-thread Task 4 Receive Test" );
- status = pthread_create( &id, NULL, Task_4, NULL );
- assert( !status );
- puts( "Init: mq_receive - Empty queue changes to non-blocking (EAGAIN)" );
- status = mq_receive( Test_q[BLOCKING].mq, message, 100, &priority );
- fatal_int_service_status( status, -1, "mq_receive error return status");
- fatal_posix_service_status( errno, EAGAIN, "mq_receive errno EAGAIN");
- print_current_time( "Init: ", "" );
-
- /*
- * Create a task then block until the task sends the message.
- * Task tests set attributes so one queue will have a thread
- * blocked while attributes are changed.
- */
-
- Start_Test( "multi-thread Task 1 Test" );
- status = pthread_create( &id, NULL, Task_1, NULL );
- assert( !status );
- Read_msg_from_que( BLOCKING, 0 ); /* Block until init writes */
- print_current_time( "Init: ", "" );
-
- /*
- * Create a task then block until the task reads a message.
- */
-
- Start_Test( "multi-thread Task 4 Send Test" );
- fill_message_queues( "Init:" );
- status = pthread_create( &id, NULL, Task_4, NULL );
- assert( !status );
- puts( "Init: mq_send - Full queue changes to non-blocking (EAGAIN)" );
- status = mq_send(Test_q[BLOCKING].mq, message, 0, 0 );
- fatal_posix_service_status( status, -1, "mq_send error return status");
- fatal_posix_service_status( errno, EAGAIN, "mq_send errno EAGAIN");
- verify_queues_full( "Init:" );
- empty_message_queues( "Init:" );
-
- /*
- * Create a task then block until the task reads a message.
- */
-
- Start_Test( "multi-thread Task 2 Test" );
- fill_message_queues( "Init:" );
- status = pthread_create( &id, NULL, Task_2, NULL );
- assert( !status );
- Show_send_msg_to_que( "Init:", BLOCKING, Priority_Order[0] );
- print_current_time( "Init: ", "" );
- verify_queues_full( "Init:" );
- empty_message_queues( "Init:" );
-
- /*
- * Create a task then block until it deletes and closes all queues.
- * EBADF - Queue unlinked and closed while blocked
- */
-
- Start_Test( "multi-thread Task 3 Test" );
- fill_message_queues( "Init:" );
- status = pthread_create( &id, NULL, Task_3, NULL );
- assert( !status );
- puts( "Init: mq_send - Block while thread deletes queue (EBADF)" );
- ptr = &Predefined_Msgs[0];
- status = mq_send( Test_q[BLOCKING].mq, ptr->msg, ptr->size , ptr->priority );
- fatal_posix_service_status( status, -1, "mq_send error return status");
- fatal_posix_service_status( errno, EBADF, "mq_send errno EBADF");
-
-}
-
-void validate_mq_setattr()
-{
- struct mq_attr attr;
- struct mq_attr save_attr[ NUMBER_OF_TEST_QUEUES ];
- int status;
- int i;
-
- /*
- * EBADF - Get the attributes from a closed queue.
- */
-
- puts( "Task1:mq_setattr - unopened queue (EBADF)" );
- status = mq_setattr( Test_q[CLOSED].mq, &attr, NULL );
- fatal_posix_service_status( status, -1, "mq_setattr error return status");
- fatal_posix_service_status( errno, EBADF, "mq_setattr errno EBADF");
-
- /*
- * XXX - The following are not listed in the POSIX manual but
- * may occur.
- */
-
- /*
- * EINVAL - NULL attributes
- */
-
- puts( "Task1:mq_setattr - NULL attributes (EINVAL)" );
- status = mq_setattr( Test_q[RW_QUEUE].mq, NULL, NULL );
- fatal_posix_service_status( status, -1, "mq_setattr error return status");
- fatal_posix_service_status( errno, EINVAL, "mq_setattr errno EINVAL");
-
- /*
- * Verify change queues to blocking, by verifying all queues block
- * for a timed receive.
- */
-
- puts( "Init: set_attr all queues to blocking" );
- for(i=0; i<CLOSED; i++) {
- attr.mq_flags = Test_q[i].oflag & (~O_NONBLOCK );
- status = mq_setattr( Test_q[i].mq, &attr, &save_attr[i] );
- fatal_int_service_status( status, 0, "mq_setattr valid return status");
- Validate_attributes( Test_q[i].mq, attr.mq_flags, 0 );
- }
- for( i = RW_QUEUE; i < CLOSED; i++ ) {
- verify_timed_receive_queue( "Init:", i, 1 );
- }
-
- /*
- * Restore restore all queues to their old attribute.
- */
-
- for(i=0; i<CLOSED; i++) {
- status = mq_setattr( Test_q[i].mq, &save_attr[i], NULL );
- fatal_int_service_status( status, 0, "mq_setattr valid return status");
- Validate_attributes( Test_q[i].mq, Test_q[i].oflag, 0 );
- }
-}
-
-void *POSIX_Init(
- void *argument
-)
-{
- puts( "\n\n*** POSIX MESSAGE QUEUE TEST ***" );
-
- validate_mq_open_error_codes( );
- open_test_queues();
- validate_mq_unlink_error_codes();
- validate_mq_close_error_codes();
- verify_unlink_functionality();
- validate_mq_setattr( );
- validate_mq_send_error_codes();
- validate_mq_getattr_error_codes();
- verify_timed_send();
- validate_mq_receive_error_codes();
- verify_timed_receive();
- verify_open_functionality();
- verify_notify();
- verify_with_threads();
-
- puts( "*** END OF POSIX MESSAGE QUEUE TEST ***" );
- exit( 0 );
-
- return NULL; /* just so the compiler thinks we returned something */
-}
-
-
-void *Task_1 (
- void *argument
-)
-{
- /* Block Waiting for a message */
-
- print_current_time( "Task_1: ", "" );
-
- Show_send_msg_to_que( "Task_1:", BLOCKING, 0 );
-
- puts( "Task_1: pthread_exit" );
- pthread_exit( NULL );
-
- /* switch to Init */
-
- assert( 0 );
- return NULL; /* just so the compiler thinks we returned something */
-}
-
-void *Task_2(
- void *argument
-)
-{
- print_current_time( "Task_2: ", "" );
-
-
- /* Block waiting to send a message */
-
- verify_queues_full( "Task_2:" );
- Read_msg_from_que( BLOCKING, Priority_Order[0] ); /* Cause context switch */
-
- puts( "Task_2: pthread_exit" );
- pthread_exit( NULL );
-
- /* switch to Init */
-
- return NULL; /* just so the compiler thinks we returned something */
-}
-
-void *Task_3 (
- void *argument
-)
-{
-
- print_current_time( "Task_3: ", "" );
-
- /*
- * close and unlink all queues.
- */
-
- verify_close_functionality( "Task_3: " );
- puts( "Task_3: pthread_exit" );
- pthread_exit( NULL );
-
- /* switch to Init */
-
- return NULL; /* just so the compiler thinks we returned something */
-
-}
-
-void *Task_4 (
- void *argument
-)
-{
- struct mq_attr attr;
- int status;
- int count;
-
- print_current_time( "Task_4: ", "" );
-
- /*
- * Set the count to the number of messages in the queue.
- */
-
- status = mq_getattr( Test_q[BLOCKING].mq, &attr );
- fatal_posix_service_status( status, 0, "mq_getattr valid return status");
- count = attr.mq_curmsgs;
-
- puts("Task_4: Set queue to non-blocking");
- attr.mq_flags = Test_q[BLOCKING].oflag | O_NONBLOCK;
- status = mq_setattr( Test_q[BLOCKING].mq, &attr, NULL );
- fatal_int_service_status( status, 0, "mq_setattr valid return status");
- Validate_attributes( Test_q[BLOCKING].mq, attr.mq_flags, count );
-
- puts("Task_4: Return queue to blocking");
- attr.mq_flags = Test_q[BLOCKING].oflag;
- status = mq_setattr( Test_q[BLOCKING].mq, &attr, NULL );
- fatal_int_service_status( status, 0, "mq_setattr valid return status");
- Validate_attributes( Test_q[BLOCKING].mq, attr.mq_flags, count );
-
- puts( "Task_4: pthread_exit" );
- pthread_exit( NULL );
-
- /* switch to Init */
-
- return NULL; /* just so the compiler thinks we returned something */
-
-}
-
-void *Task_5 (
- void *argument
-)
-{
-
- print_current_time( "Task_5: ", "" );
-
- puts( "Task_5: pthread_exit" );
- pthread_exit( NULL );
-
- /* switch to Init */
-
- return NULL; /* just so the compiler thinks we returned something */
-
-}
-
-void *Task_ (
- void *argument
-)
-{
-
- print_current_time( "Task_: ", "" );
-
- puts( "Task_: pthread_exit" );
- pthread_exit( NULL );
-
- /* switch to Init */
-
- return NULL; /* just so the compiler thinks we returned something */
-
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/testsuites/psxtests/psxmsgq01/psxmsgq01.scn b/testsuites/psxtests/psxmsgq01/psxmsgq01.scn
deleted file mode 100644
index 7da252f70a..0000000000
--- a/testsuites/psxtests/psxmsgq01/psxmsgq01.scn
+++ /dev/null
@@ -1,116 +0,0 @@
-*** POSIX MESSAGE QUEUE TEST ***
-_______________mq_open errors
-Init: mq_open - Create with maxmsg (-1) (EINVAL)
-Init: mq_open - Create with msgsize (-1) (EINVAL)
-Init: mq_open - Open new mq without create flag (ENOENT)
-Init: mq_open - Open with too long of a name (ENAMETOOLONG)
-Init: mq_open - SUCCESSFUL
-Init: mq_open - Create an Existing mq (EEXIST)
-Init: mq_open - system is out of resources (ENFILE)
-Init: mq_close and mq_unlink (mq3...mqn) - SUCCESSFUL
-Init: Open Test Queues
-_______________mq_unlink errors
-Init: mq_unlink - mq_unlink with too long of a name (ENAMETOOLONG)
-Init: mq_unlink - A Queue not opened (ENOENT)
-Init: mq_unlink (NULL) - EINVAL
-Init: mq_unlink ("") - EINVAL
-_______________mq_close errors
-Init: mq_close - unopened queue (EBADF)
-_______________mq_unlink functionality
-Init: Unlink and Open without closing SUCCESSFUL
-Task1:mq_setattr - unopened queue (EBADF)
-Task1:mq_setattr - NULL attributes (EINVAL)
-Init: set_attr all queues to blocking
-Init: Init: mq_timedreceive - on queue Qnoblock Init: 1 sec 0 us
-Init: Init: mq_timedreceive - on queue Qblock Init: 1 sec 0 us
-Init: Init: mq_timedreceive - on queue Qdefault Init: 1 sec 0 us
-_______________mq_send errors
-Init: mq_send - Closed message queue (EBADF)
-Init: mq_send - Read only message queue (EBADF)
-Init: mq_send - Priority out of range (EINVAL)
-Init: mq_send - Message longer than msg_len (EMSGSIZE)
-Init: Verify Queues are empty
-Init: Fill Queues with messages
-Init: Verify Queues are full
-Init: mq_send - on a FULL non-blocking queue with (EAGAIN)
-_______________mq_getattr errors
-Init: mq_getattr - unopened queue (EBADF)
-Init: mq_getattr - NULL attributes (EINVAL)
-_______________mq_timedsend
-Init: mq_timedsend - on queue Qnoblock Init: 0 sec 0 us
-Init: mq_timedsend - on queue Qblock Init: 1 sec 0 us
-Init: mq_timedsend - on queue Qdefault Init: 0 sec 0 us
-_______________mq_receive errors
-Init: mq_receive - Unopened message queue (EBADF)
-Init: mq_receive - Write only queue (EBADF)
-Init: mq_receive - Size is less than the message (EMSGSIZE)
-Init: Verify Queues are full
-Init: Empty all Queues
-Init: mq_receive - Queue is empty (EAGAIN)
-_______________mq_timedreceive
-Init: Init: mq_timedreceive - on queue Qnoblock Init: 0 sec 0 us
-Init: Init: mq_timedreceive - on queue Qblock Init: 1 sec 0 us
-Init: Init: mq_timedreceive - on queue Qdefault Init: 1 sec 0 us
-_______________mq_open functionality
-Init: mq_open - Open an existing mq ( same id )
-_______________mq_notify
-Init: mq_notify - Unopened message queue (EBADF)
-_____mq_notify - notify when Qnoblock gets a message
-waiting on any signal for 3 seconds.
-Init: Verify Signal when send
-Init: mq_send - to Qnoblock msg: 12345678 priority 31
-waiting on any signal for 3 seconds.
-Init: Verify No Signal when send
-Init: mq_send - to Qnoblock msg: 12345678 priority 31
-waiting on any signal for 3 seconds.
-____mq_notify - notify when Qread gets a message
-waiting on any signal for 3 seconds.
-Init: mq_notify - (EBUSY)
-Init: mq_notify - Remove notification with null
-Init: Verify No Signal when send
-Init: mq_send - to Qnoblock msg: 12345678 priority 31
-waiting on any signal for 3 seconds.
-_______________multi-thread Task 4 Receive Test
-Init: mq_receive - Empty queue changes to non-blocking (EAGAIN)
-Task_4: Fri Jan 01 00:00:18 1988
-Task_4: Set queue to non-blocking
-Task_4: Return queue to blocking
-Task_4: pthread_exit
-Init: Fri Jan 01 00:00:18 1988
-_______________multi-thread Task 1 Test
-Task_1: Fri Jan 01 00:00:18 1988
-Task_1: mq_send - to Qblock msg: 12345678 priority 31
-Task_1: pthread_exit
-Init: Fri Jan 01 00:00:18 1988
-_______________multi-thread Task 4 Send Test
-Init: Verify Queues are empty
-Init: Fill Queues with messages
-Init: Verify Queues are full
-Init: mq_send - Full queue changes to non-blocking (EAGAIN)
-Task_4: Fri Jan 01 00:00:18 1988
-Task_4: Set queue to non-blocking
-Task_4: Return queue to blocking
-Task_4: pthread_exit
-Init: Verify Queues are full
-Init: Empty all Queues
-_______________multi-thread Task 2 Test
-Init: Verify Queues are empty
-Init: Fill Queues with messages
-Init: Verify Queues are full
-Init: mq_send - to Qblock msg: Last priority 32
-Task_2: Fri Jan 01 00:00:18 1988
-Task_2: Verify Queues are full
-Task_2: pthread_exit
-Init: Fri Jan 01 00:00:18 1988
-Init: Verify Queues are full
-Init: Empty all Queues
-_______________multi-thread Task 3 Test
-Init: Verify Queues are empty
-Init: Fill Queues with messages
-Init: Verify Queues are full
-Init: mq_send - Block while thread deletes queue (EBADF)
-Task_3: Fri Jan 01 00:00:18 1988
-_______________Unlink and Close All Files
-Task_3: pthread_exit
-*** END OF POSIX MESSAGE QUEUE TEST ***
-
diff --git a/testsuites/psxtests/psxmsgq01/system.h b/testsuites/psxtests/psxmsgq01/system.h
deleted file mode 100644
index 97775c304e..0000000000
--- a/testsuites/psxtests/psxmsgq01/system.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-/* functions */
-
-#include <pmacros.h>
-#include <unistd.h>
-#include <errno.h>
-#include <sched.h>
-#include <tmacros.h>
-
-void *POSIX_Init(
- void *argument
-);
-
-void *Task_1_through_3(
- void *argument
-);
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 5
-#define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES 10
-#define CONFIGURE_MAXIMUM_POSIX_TIMERS 4
-#define CONFIGURE_MAXIMUM_TIMERS 4
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-#define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE \
- (RTEMS_MINIMUM_STACK_SIZE * 10)
-
-#include <confdefs.h>
-
-/* global variables */
-
-TEST_EXTERN pthread_t Init_id;
-TEST_EXTERN pthread_t Task_id;
-
-#define MSGSIZE 9
-#define MAXMSG 4
-
-typedef enum {
- RD_QUEUE, /* Read only queue */
- WR_QUEUE, /* Write only queue */
- RW_QUEUE, /* Read Write non-blocking queue */
- BLOCKING, /* Read Write blocking queue */
- DEFAULT_RW, /* default must be last */
- CLOSED, /* Created and closed queue */
- NUMBER_OF_TEST_QUEUES
-} Test_Queue_Types;
-extern int Priority_Order[MAXMSG+1];
-void *Task_1 ( void *argument );
-void *Task_2( void *argument );
-void *Task_3( void *argument );
-void *Task_4( void *argument );
-
-/* end of include file */
-
-
diff --git a/testsuites/psxtests/psxreaddir/Makefile.am b/testsuites/psxtests/psxreaddir/Makefile.am
deleted file mode 100644
index 25c955b899..0000000000
--- a/testsuites/psxtests/psxreaddir/Makefile.am
+++ /dev/null
@@ -1,38 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = psxreaddir
-
-MANAGERS = all
-
-C_FILES = main.c test.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-DOCTYPES = scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/psxtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/psxtests/psxreaddir/main.c b/testsuites/psxtests/psxreaddir/main.c
deleted file mode 100644
index 0e8d54fc31..0000000000
--- a/testsuites/psxtests/psxreaddir/main.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Simple test program -- simplified version of sample test hello.
- */
-
-#define TEST_INIT
-
-#include <bsp.h>
-
-void test_main( void );
-
-rtems_task Init(
- rtems_task_argument ignored
-)
-{
- test_main();
- exit( 0 );
-}
-
-/* configuration information */
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#define CONFIGURE_INIT
-
-#include <confdefs.h>
-
-/* end of file */
diff --git a/testsuites/psxtests/psxreaddir/psxreaddir.scn b/testsuites/psxtests/psxreaddir/psxreaddir.scn
deleted file mode 100644
index ca1eef4900..0000000000
--- a/testsuites/psxtests/psxreaddir/psxreaddir.scn
+++ /dev/null
@@ -1,225 +0,0 @@
-*** READDIR TEST ***
-chdir to the root directory
-chdir() status : 0
-Creating a series of directories under /
-Creating directory: a 0 0 Success
-Creating directory: b 0 0 Success
-Creating directory: c 0 0 Success
-Creating directory: d 0 0 Success
-Creating directory: e 0 0 Success
-Creating directory: f 0 0 Success
-Creating directory: c/y 0 0 Success
-Creating directory: c/z 0 0 Success
-Creating directory: c/x 0 0 Success
-Creating directory: c/y/a3333 0 0 Success
-Creating directory: c/y/j123 0 0 Success
-Create a lot of files
-Create a
-Create b
-Create c
-Create d
-Create e
-Create f
-Create g
-Create h
-Create i
-Create j
-Create k
-Create l
-Create m
-Create n
-Create o
-Create p
-Create q
-Create r
-Create s
-Create t
-Create u
-Create v
-Create w
-Create x
-Create y
-Create z
-Create aa
-Create ab
-Create ac
-Create ad
-Create ae
-Create af
-Create ag
-Create ah
-Create ai
-Create aj
-Create ak
-Create al
-Create am
-Create an
-Create ao
-Create ap
-Create aq
-Create ar
-Open /many and print the directory
-name inode offset reclen type
-a 1 0 268 0x010c
-b 1 268 268 0x010c
-c 1 536 268 0x010c
-d 1 804 268 0x010c
-e 1 1072 268 0x010c
-f 1 1340 268 0x010c
-g 1 1608 268 0x010c
-h 1 1876 268 0x010c
-i 1 2144 268 0x010c
-j 1 2412 268 0x010c
-k 1 2680 268 0x010c
-l 1 2948 268 0x010c
-m 1 3216 268 0x010c
-n 1 3484 268 0x010c
-o 1 3752 268 0x010c
-p 1 4020 268 0x010c
-q 1 4288 268 0x010c
-r 1 4556 268 0x010c
-s 1 4824 268 0x010c
-t 1 5092 268 0x010c
-u 1 5360 268 0x010c
-v 1 5628 268 0x010c
-w 1 5896 268 0x010c
-x 1 6164 268 0x010c
-y 1 6432 268 0x010c
-z 1 6700 268 0x010c
-aa 1 6968 268 0x010c
-ab 1 7236 268 0x010c
-ac 1 7504 268 0x010c
-ad 1 7772 268 0x010c
-ae 1 8040 268 0x010c
-af 1 8308 268 0x010c
-ag 1 8576 268 0x010c
-ah 1 8844 268 0x010c
-ai 1 9112 268 0x010c
-aj 1 9380 268 0x010c
-ak 1 9648 268 0x010c
-al 1 9916 268 0x010c
-am 1 10184 268 0x010c
-an 1 10452 268 0x010c
-ao 1 10720 268 0x010c
-ap 1 10988 268 0x010c
-aq 1 11256 268 0x010c
-ar 1 11524 268 0x010c
-open /b/myfile
-scandir a file status: -1
-Open /b/new_file
-fcntl F_SETFD should return 0
-fcntl F_SETFD should return 1
-fcntl F_DUPFD should return 0 -- skip until implemented
-fcntl F_GETFL returns current flags
-fcntl F_GETFL returned 0x200
-fcntl F_SETFL to add O_APPEND and O_NONBLOCK
-fcntl F_GETFL return current flags to see changes
-fcntl F_GETFL returned 0x208
-fcntl F_GETLK should return -1
-fcntl F_SETLK should return -1
-fcntl F_SETLKW should return -1
-fcntl F_SETOWN should return -1
-fcntl F_GETOWN should return -1
-fcntl invalid argument should return -1
-Status -1
-opendir and readdir /b/myfile
-opendir and readdir
-chdir to /b/myfile
-Performing stat of directory /
-status for stat : 0, size of directory: 2144
-Open and print directory /
-name inode offset reclen type
-dev 1 0 268 0x010c
-a 1 268 268 0x010c
-b 1 536 268 0x010c
-c 1 804 268 0x010c
-d 1 1072 268 0x010c
-e 1 1340 268 0x010c
-f 1 1608 268 0x010c
-many 1 1876 268 0x010c
-mkdir /d/my_dir
-Open /d/my_dir
-remove /d/my_dir.
-close /d/my_dir.
-Opening directory /c
-name inode offset reclen type
-y 1 0 268 0x010c
-z 1 268 268 0x010c
-x 1 536 268 0x010c
-Opening directory /c/y
-name inode offset reclen type
-a3333 1 0 268 0x010c
-j123 1 268 268 0x010c
-LSEEK to the start of the open directory
-name inode offset reclen type
-dev 1 0 268 0x010c
-a 1 268 268 0x010c
-b 1 536 268 0x010c
-c 1 804 268 0x010c
-d 1 1072 268 0x010c
-e 1 1340 268 0x010c
-f 1 1608 268 0x010c
-many 1 1876 268 0x010c
-Rewinding directory
-name inode offset reclen type
-dev 1 0 268 0x010c
-a 1 268 268 0x010c
-b 1 536 268 0x010c
-c 1 804 268 0x010c
-d 1 1072 268 0x010c
-e 1 1340 268 0x010c
-f 1 1608 268 0x010c
-many 1 1876 268 0x010c
-Send rewinddir a NULL pointer
-Seek directory
-telldir() should report only sizeof(struct dirent) increments
-in position. Sizeof(struct dirent): 268
-seeked to 0 -- currently at 0
-seeked to 67 -- currently at 0
-seeked to 134 -- currently at 0
-Send seekdir a NULL pointer
-Closing directory
-SCANDIR TEST
-selection rule 1
-scanning for any entry under directory /c
-SCANDIR SELECT1 accepts nodename: y
-SCANDIR SELECT1 accepts nodename: z
-SCANDIR SELECT1 accepts nodename: x
-scandir status: 3
-Selected Node Name: y
-Selected Node Name: z
-Selected Node Name: x
-selection rule 2
-scanning for any entry under directory /c whose name = y
-SCANDIR SELECT accepted nodename: y
-SCANDIR SELECT rejected nodename: z
-SCANDIR SELECT rejected nodename: x
-scandir status: 1
-Selected Node Name: y
-SCANDIR with sorting
-selection rule 1
-scanning for any entry under directory /c
-sort in ascending order
-SCANDIR SELECT1 accepts nodename: y
-SCANDIR SELECT1 accepts nodename: z
-SCANDIR SELECT1 accepts nodename: x
-scandir status: 3
-Selected and Sorted Node Name: x
-Selected and Sorted Node Name: y
-Selected and Sorted Node Name: z
-SCANDIR with sorting
-selection rule 1
-scanning for any entry under directory /c
-sort in descending order
-SCANDIR SELECT1 accepts nodename: y
-SCANDIR SELECT1 accepts nodename: z
-SCANDIR SELECT1 accepts nodename: x
-scandir status: 3
-Selected and Sorted Node Name: z
-Selected and Sorted Node Name: y
-Selected and Sorted Node Name: x
-*** END OF READDIR TEST ***
-
-
-
-
diff --git a/testsuites/psxtests/psxreaddir/test.c b/testsuites/psxtests/psxreaddir/test.c
deleted file mode 100644
index 069400b463..0000000000
--- a/testsuites/psxtests/psxreaddir/test.c
+++ /dev/null
@@ -1,449 +0,0 @@
-/*
- * This is a native test to explore how the readdir() family works.
- * Newlib supports the following readdir() family members:
- *
- * closedir() -
- * readdir() -
- * scandir() -
- * opendir() -
- * rewinddir() -
- * telldir() - BSD not in POSIX
- * seekdir() - BSD not in POSIX
- *
- *
- * seekdir() takes an offset which is a byte offset. The Linux
- * implementation of this appears to seek to the ((off/DIRENT_SIZE) + 1)
- * record where DIRENT_SIZE seems to be 12 bytes.
- *
- *
- *
- * $Id$
- */
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <fcntl.h>
-#include <dirent.h>
-#include <string.h>
-#include <assert.h>
-#include <unistd.h>
-#include <errno.h>
-
-DIR *directory;
-DIR *directory2;
-DIR *directory3;
-DIR *directory_not;
-
-#ifndef __P
-#define __P(args)()
-#endif
-
-int scandir ( const char *dirname,
- struct dirent *** namelist,
- int (*select) __P((struct dirent *)),
- int (*dcomp) __P((const void *, const void *))
-);
-
-#if defined(__rtems__)
-#define d_type d_reclen
-#endif
-
-void printdir( DIR *directory )
-{
- struct dirent *d;
-
- printf( " %-20s %8s %8s %8s %4s\n",
- " name", "inode", " offset", "reclen", " type" );
- d = readdir(directory);
-
- while (d) {
- printf( " %-20s %8d %8d %6d 0x%04x\n",
- d->d_name, (int)d->d_ino, (int)d->d_off, d->d_reclen, d->d_type );
- d = readdir(directory);
-
- }
-}
-
-char *many_files[] = {
- "a",
- "b",
- "c",
- "d",
- "e",
- "f",
- "g",
- "h",
- "i",
- "j",
- "k",
- "l",
- "m",
- "n",
- "o",
- "p",
- "q",
- "r",
- "s",
- "t",
- "u",
- "v",
- "w",
- "x",
- "y",
- "z",
- "aa",
- "ab",
- "ac",
- "ad",
- "ae",
- "af",
- "ag",
- "ah",
- "ai",
- "aj",
- "ak",
- "al",
- "am",
- "an",
- "ao",
- "ap",
- "aq",
- "ar"
-};
-
-char *dnames[] = {
- "a",
- "b",
- "c",
- "d",
- "e",
- "f",
- "c/y",
- "c/z",
- "c/x",
- "c/y/a3333",
- "c/y/j123",
- "END"
-};
-
-int select1 ( struct dirent *entry )
-{
- printf("SCANDIR SELECT1 accepts nodename: %s\n", entry->d_name );
- return 1;
-}
-
-int select2 ( struct dirent *entry )
-{
- if( strcmp( entry->d_name, "y") == 0 ) {
- printf("SCANDIR SELECT accepted nodename: %s\n", entry->d_name );
- return 1;
- }
- printf("SCANDIR SELECT rejected nodename: %s\n", entry->d_name );
- return 0;
-}
-
-int compare_ascending( struct dirent **a, struct dirent **b )
-{
- int i;
-
- i = strcmp (
- (char *)((struct dirent *)(*a)->d_name),
- (char *)((struct dirent *)(*b)->d_name)
- );
- return i;
-}
-
-
-int compare_descending( struct dirent **a, struct dirent **b )
-{
- int i;
-
- i = strcmp (
- (char *)((struct dirent *)(*b)->d_name),
- (char *)((struct dirent *)(*a)->d_name)
- );
-
- return i;
-}
-
-#if defined(__rtems__)
-int test_main(void)
-#else
-int main(
- int argc,
- char **argv
-)
-#endif
-{
- int fd;
- int i;
- int status;
- off_t off;
- struct dirent *d_not;
- struct dirent **namelist;
- struct stat s;
-
-
- printf( "\n\n*** READDIR TEST ***\n" );
-
- printf( "\nchdir to the root directory\n" );
- status = chdir( "/" );
- printf( "chdir() status : %d\n\n", status );
-
- printf( "\nCreating a series of directories under /\n" );
- i=0;
- while ( strcmp(dnames[i], "END") != 0 )
- {
- status = mkdir( dnames[i], 0x1c0 );
- printf("Creating directory: %s %d %d ", dnames[i], status, errno );
- if ( errno == 0 )
- printf(" Success\n");
- else
- printf(" Failure\n");
-
- i++;
- }
-
- /*
- * Create files under many and open the directory.
- */
-
- printf("Create a lot of files\n");
- status = mkdir( "/many", 0x1c0 );
- status = chdir( "/many" );
- for (i = 0; i<44; i++) {
- printf(" Create %s\n", many_files[i]);
- fd = open (many_files[i], O_CREAT, S_IRWXU);
- close (fd);
- }
- printf("Open /many and print the directory\n");
- directory_not = opendir( "/many" );
- printdir ( directory_not );
- d_not = readdir( directory_not );
-
- printf("open /b/myfile\n");
- fd = open ("/b/my_file", O_CREAT, S_IRWXU);
- assert( fd != -1 );
- close (fd);
-
- printf("scandir a file status: ");
- status = scandir(
- "/b/my_file",
- &namelist,
- select1,
- NULL
- );
- printf("%d\n", status);
-
- printf("Open /b/new_file\n");
- fd = open( "/b/new_file", O_CREAT, S_IRWXU );
- assert( fd != -1 );
-
- printf("fcntl F_SETFD should return 0\n");
- status = fcntl( fd, F_SETFD, 1 );
- assert( status == 0 );
-
- printf("fcntl F_SETFD should return 1\n");
- status = fcntl( fd, F_GETFD, 1 );
- assert( status == 1 );
-
-#if 0
- printf("fcntl F_DUPFD should return 0\n");
- status = fcntl( fd, F_DUPFD, 0 );
- assert ( status == 0 );
-#else
- printf("fcntl F_DUPFD should return 0 -- skip until implemented\n");
-#endif
-
- printf("fcntl F_GETFL returns current flags\n");
- status = fcntl( fd, F_GETFL, 1 );
- printf("fcntl F_GETFL returned 0x%x\n", status );
- assert( status != -1 );
-
- printf("fcntl F_SETFL to add O_APPEND and O_NONBLOCK\n");
- status = fcntl( fd, F_SETFL, O_APPEND|O_NONBLOCK );
- assert ( status != -1 );
-
- printf("fcntl F_GETFL return current flags to see changes\n");
- status = fcntl( fd, F_GETFL, 1 );
- printf("fcntl F_GETFL returned 0x%x\n", status );
- assert( status != -1 );
-
- printf("fcntl F_GETLK should return -1\n");
- status = fcntl( fd, F_GETLK, 1 );
- assert ( status == -1 );
-
- printf("fcntl F_SETLK should return -1\n");
- status = fcntl( fd, F_SETLK, 1 );
- assert ( status == -1 );
-
- printf("fcntl F_SETLKW should return -1\n");
- status = fcntl( fd, F_SETLKW, 1 );
- assert ( status == -1 );
-
- printf("fcntl F_SETOWN should return -1\n");
- status = fcntl( fd, F_SETOWN, 1 );
- assert ( status == -1 );
-
- printf("fcntl F_GETOWN should return -1\n");
- status = fcntl( fd, F_GETOWN, 1 );
- assert ( status == -1 );
-
- printf("fcntl invalid argument should return -1\n");
- status = fcntl( fd, 0xb, 1 );
- printf("Status %d\n",status);
- assert( status == -1 );
-
- printf("opendir and readdir /b/myfile\n");
- directory_not = opendir ("/b/my_file");
- d_not = readdir(directory_not);
-
- printf("opendir and readdir\n");
- directory_not = opendir ("/a");
- d_not = readdir (directory_not);
-
- printf("chdir to /b/myfile\n");
- status = chdir ("/b/my_file");
- assert (status == -1);
-
- printf( "\nPerforming stat of directory /\n");
- status = stat( "/", &s );
- printf("status for stat : %d, size of directory: %d\n\n",
- status,(int)s.st_size);
-
- puts( "\nOpen and print directory /" );
- directory = opendir("/");
- assert( directory );
- printdir(directory);
-
- printf("\nmkdir /d/my_dir\n");
- status = mkdir( "/d/my_dir", 0x1c0 );
- printf("Open /d/my_dir\n");
- directory_not = opendir( "/d/my_dir" );
- assert( directory_not );
-
- printf( "remove /d/my_dir.\n" );
- status = rmdir( "/d/my_dir" );
- assert( status == 0 );
-
- printf( "close /d/my_dir.\n" );
- closedir( directory_not );
-
- printf( "\nOpening directory /c\n" );
- directory2 = opendir("/c");
-
- assert( directory2 );
-
- printdir(directory2);
- status = closedir( directory2 );
-
- printf( "\nOpening directory /c/y\n" );
- directory3 = opendir("/c/y");
- assert( directory3 );
- printdir(directory3);
- status = closedir( directory3 );
-
- printf( "\nLSEEK to the start of the open directory\n" );
- lseek( directory->dd_fd, 0, SEEK_SET );
- printdir(directory);
-
- lseek( directory->dd_fd, 0, SEEK_CUR );
-
- lseek( directory->dd_fd, 0, SEEK_END );
-
- lseek( directory->dd_fd, 0, -99 );
-
- printf( "\nRewinding directory\n" );
- rewinddir( directory );
- printdir(directory);
-
-/* Don't know how to check this one automatically. */
- printf( "Send rewinddir a NULL pointer\n");
- rewinddir( NULL );
-
- printf( "\nSeek directory\n" );
- printf( "telldir() should report only sizeof(struct dirent) increments \n" );
- printf( "in position. Sizeof(struct dirent): %d\n", sizeof(struct dirent) );
- rewinddir( directory );
- for( off=0 ; off<=200 ; off=off + sizeof(struct dirent) / 4 ) {
- seekdir( directory, off );
- printf(
- "seeked to %2d -- currently at %2d\n",
- (int)off,
- (int)telldir(directory)
- );
- }
-
- printf( "Send seekdir a NULL pointer\n");
- seekdir( NULL, off );
-
- printf( "\nClosing directory\n" );
- status = closedir( directory );
-
- printf( "\nSCANDIR TEST\n");
- printf( "\nselection rule 1\n");
- printf( "scanning for any entry under directory /c\n\n");
- status = scandir(
- "/c",
- &namelist,
- select1,
- NULL
- );
- printf("\nscandir status: %d\n", status );
- for ( i=0; i<status; i++)
- {
- printf("Selected Node Name: %s\n", namelist[i]->d_name );
- }
-
- printf( "\nselection rule 2\n");
- printf( "scanning for any entry under directory /c whose name = y\n\n");
- status = scandir(
- "/c",
- &namelist,
- select2,
- NULL
- );
- printf("\nscandir status: %d\n", status );
- for ( i=0; i<status; i++)
- {
- printf("Selected Node Name: %s\n", namelist[i]->d_name );
- }
-
- printf( "\nSCANDIR with sorting\n" );
- printf( "\nselection rule 1\n");
- printf( "scanning for any entry under directory /c\n");
- printf( "sort in ascending order\n\n");
- status = scandir(
- "/c",
- &namelist,
- select1,
- compare_ascending
- );
- printf("\nscandir status: %d\n", status );
- for ( i=0; i<status; i++)
- {
- printf("Selected and Sorted Node Name: %s\n", namelist[i]->d_name );
- }
-
-
- printf( "\nSCANDIR with sorting\n" );
- printf( "\nselection rule 1\n");
- printf( "scanning for any entry under directory /c\n");
- printf( "sort in descending order\n\n");
- status = scandir(
- "/c",
- &namelist,
- select1,
- compare_descending
- );
- printf("scandir status: %d\n", status );
- for ( i=0; i<status; i++)
- {
- printf("Selected and Sorted Node Name: %s\n", namelist[i]->d_name );
- }
-
-
- printf( "\n\n*** END OF READDIR TEST ***\n" );
- exit(0);
-}
-
diff --git a/testsuites/psxtests/psxsem01/Makefile.am b/testsuites/psxtests/psxsem01/Makefile.am
deleted file mode 100644
index 59dba33b12..0000000000
--- a/testsuites/psxtests/psxsem01/Makefile.am
+++ /dev/null
@@ -1,43 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = psxsem01
-
-MANAGERS = all
-
-C_FILES = init.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/psxtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CPPFLAGS = -I$(top_srcdir)/include
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/psxtests/psxsem01/init.c b/testsuites/psxtests/psxsem01/init.c
deleted file mode 100644
index b39e2e0ada..0000000000
--- a/testsuites/psxtests/psxsem01/init.c
+++ /dev/null
@@ -1,246 +0,0 @@
-#define CONFIGURE_INIT
-#include "system.h"
-#include <sched.h>
-#include <fcntl.h>
-#include <time.h>
-#include <tmacros.h>
-
-void *POSIX_Init(
- void *argument
-)
-{
- int status;
- int value;
- int i;
- sem_t sems[CONFIGURE_MAXIMUM_POSIX_SEMAPHORES];
- sem_t sem2;
- sem_t *n_sem1;
- sem_t *n_sem2;
- struct timespec waittime;
- char failure_msg[80];
-
- puts( "\n\n*** POSIX SEMAPHORE MANAGER TEST 1 ***" );
-
- puts( "Init: sem_init - SUCCESSFUL" );
- for (i = 0; i < CONFIGURE_MAXIMUM_POSIX_SEMAPHORES; i++) {
- status = sem_init(&sems[i], 0, i);
- sprintf(failure_msg, "sem_init %d", i );
- fatal_posix_service_status( status, 0, failure_msg);
- }
- puts( "Init: sem_init - UNSUCCESSFUL (ENOSPC)" );
- status = sem_init(&sem2, 0, 1);
- fatal_posix_service_status( status, -1, "sem_init error return status");
- fatal_posix_service_status( errno, ENOSPC, "sem_init errorno ENOSPC" );
-
- puts( "Init: sem_init - UNSUCCESSFUL (ENOSYS -- pshared not supported)" );
- status = sem_init(&sem2, 1, 1);
- fatal_posix_service_status( status, -1, "sem_init error return status");
- fatal_posix_service_status( errno, ENOSYS, "sem_init errno set to ENOSYS");
-
- puts( "Init: sem_getvalue - SUCCESSFUL ");
- for (i = 0; i < CONFIGURE_MAXIMUM_POSIX_SEMAPHORES; i++) {
- status = sem_getvalue(&sems[i], &value);
- sprintf( failure_msg, "sem_getvalue %d", i );
- fatal_posix_service_status( status, 0, failure_msg );
- fatal_posix_service_status( value, i, "sem_getvalue correct value" );
- }
- puts( "Init: sem_getvalue - UNSUCCESSFUL ");
- status = sem_getvalue(&sem2, &value);
- fatal_posix_service_status( status, -1, "sem_getvalue error return status");
- fatal_posix_service_status( errno, EINVAL, "sem_getvalue errno EINVAL");
-
- puts( "Init: sem_destroy - SUCCESSFUL" );
- status = sem_destroy(&sems[0]);
- fatal_posix_service_status( status, 0, "sem_destroy semaphore 0");
-
- puts( "Init: sem_destroy - UNSUCCESSFUL (EINVAL)" );
- status = sem_destroy(&sem2);
- fatal_posix_service_status( status, -1, "sem_destroy error return status");
- fatal_posix_service_status( errno, EINVAL, "sem_destroy errno EINVAL");
-
- puts( "Init: sem_wait - SUCCESSFUL" );
- status = sem_wait(&sems[1]);
- fatal_posix_service_status( status, 0, "sem_wait semaphore 1");
-
- puts( "Init: sem_wait - UNSUCCESSFUL (EINVAL)" );
- status = sem_wait(&sem2);
- fatal_posix_service_status( status, -1, "sem_wait error return status");
- fatal_posix_service_status( errno, EINVAL, "sem_wait errno EINVAL");
-
- puts( "Init: sem_post - SUCCESSFUL" );
- status = sem_post(&sems[1]);
- fatal_posix_service_status( status, 0, "sem_post semaphore 1");
-
- puts( "Init: sem_wait - SUCCESSFUL (after a sem_post)" );
- status = sem_wait(&sems[1]);
- fatal_posix_service_status( status, 0, "sem_wait semaphore 1");
-
- puts( "Init: sem_trywait - SUCCESSFUL" );
- status = sem_trywait(&sems[2]);
- fatal_posix_service_status( status, 0, "sem_trywait semaphore 2");
-
- puts( "Init: sem_trywait - UNSUCCESSFUL (EAGAIN)" );
- status = sem_trywait(&sems[1]);
- fatal_posix_service_status( status, -1, "sem_trywait error return status");
- fatal_posix_service_status( errno, EAGAIN, "sem_trywait errno EAGAIN");
-
- puts( "Init: sem_trywait - UNSUCCESSFUL (EINVAL)" );
- status = sem_trywait(&sem2);
- fatal_posix_service_status( status, -1, "sem_trywait error return status");
- fatal_posix_service_status( errno, EINVAL, "sem_trywait errno EINVAL");
-
- puts( "Init: sem_timedwait - SUCCESSFUL" );
- waittime.tv_sec = 0;
- waittime.tv_nsec = 100;
- status = sem_timedwait(&sems[2], &waittime);
- fatal_posix_service_status( status, 0, "sem_timedwait semaphore 2");
-
- puts( "Init: sem_timedwait - UNSUCCESSFUL (ETIMEDOUT)" );
- status = sem_timedwait(&sems[1], &waittime);
- fatal_posix_service_status( status, -1, "sem_timedwait error return status");
- fatal_posix_service_status( errno, ETIMEDOUT, "sem_timedwait errno ETIMEDOUT");
-
- puts( "Init: sem_timedwait - UNSUCCESSFUL (EINVAL)" );
- status = sem_timedwait(&sem2, &waittime);
- fatal_posix_service_status( status, -1, "sem_timedwait error return status");
- fatal_posix_service_status( errno, EINVAL, "sem_init errno EINVAL");
-
- puts( "Init: sem_post - UNSUCCESSFUL (EINVAL)" );
- status = sem_post(&sem2);
- fatal_posix_service_status( status, -1, "sem_post error return status");
- fatal_posix_service_status( errno, EINVAL, "sem_post errno EINVAL");
-
- puts( "Init: sem_destroy - SUCCESSFUL" );
- for (i = 1; i < CONFIGURE_MAXIMUM_POSIX_SEMAPHORES; i++) {
- status = sem_destroy(&sems[i]);
- sprintf( failure_msg, "sem_destroy %d", i );
- fatal_posix_service_status( status, 0, failure_msg );
- }
-
- /* Modes are currently unsupported */
-
- /*
- * Validate all sem_open return paths.
- */
-
- puts( "Init: sem_open - sem1 SUCCESSFUL" );
- n_sem1 = sem_open( "sem1", O_CREAT, 00777, 1 );
- assert( n_sem1 != SEM_FAILED );
-
- puts( "Init: sem_open - Create an Existing sem (EEXIST)" );
- n_sem2 = sem_open("sem1", O_CREAT | O_EXCL, 00777, 1);
- fatal_posix_service_status(
- (int) n_sem2, (int ) SEM_FAILED, "sem_open error return status" );
- fatal_posix_service_status( errno, EEXIST, "sem_open errno EEXIST");
-
- puts( "Init: sem_open - Open new sem without create flag (ENOENT)" );
- n_sem2 = sem_open("sem3", O_EXCL, 00777, 1);
- fatal_posix_service_status(
- (int) n_sem2, (int ) SEM_FAILED, "sem_open error return status" );
- fatal_posix_service_status( errno, ENOENT, "sem_open errno EEXIST");
-
- /*
- * XXX - Could not hit the following errors:
- * E_POSIX_Semaphore_Create_support only fails if
- * ENOSYS - When semaphore is shared between processes.
- * ENOSPC - When out of memory.
- */
-
- /*
- * Validate we can wait on a semaphore opened with sem_open.
- */
-
- puts( "Init: sem_wait on sem1" );
- status = sem_wait(n_sem1);
- fatal_posix_service_status( status, 0, "sem_wait opened semaphore");
-
- /*
- * Validate a second open returns the same semaphore.
- */
-
- puts( "Init: sem_open - Open an existing sem ( same id )" );
- n_sem2 = sem_open("sem1", 0 );
- fatal_posix_service_status(
- (int) n_sem2, (int ) n_sem1, "sem_open error return status" );
-
- /*
- * Unlink the semaphore, then verify an open of the same name produces a
- * different semaphore.
- */
-
- puts( "Init: sem_unlink - sem1 SUCCESSFUL" );
- status = sem_unlink( "sem1" );
- fatal_posix_service_status( status, 0, "sem_unlink locked semaphore");
-
- puts( "Init: sem_open - Reopen sem1 SUCCESSFUL with a different id" );
- n_sem2 = sem_open( "sem1", O_CREAT | O_EXCL, 00777, 1);
- assert( n_sem2 != SEM_FAILED );
- assert( n_sem2 != n_sem1 );
-
- /*
- * Validate we can call close on a semaphore opened with sem_open.
- */
-
- puts( "Init: sem_close (1) - SUCCESSFUL" );
- status = sem_close( n_sem1 );
- fatal_posix_service_status( status, 0, "sem_close semaphore");
-
-
- /*
- * Validate it n_sem2 (the last open for sem1 name can be
- * correctly closed and unlinked.
- */
-
- puts( "Init: sem_close (2) - SUCCESSFUL" );
- status = sem_close( n_sem2 );
- fatal_posix_service_status( status, 0, "sem_close semaphore");
-
- puts( "Init: sem_unlink - sem1 (2) SUCCESSFUL" );
- status = sem_unlink( "sem1" );
- fatal_posix_service_status( status, 0, "sem_unlink locked semaphore");
-
- puts( "Init: sem_close - UNSUCCESSFUL (EINVAL)" );
- status = sem_close(n_sem2);
- fatal_posix_service_status( status, -1, "sem_close error return status");
- fatal_posix_service_status( errno, EINVAL, "sem_close errno EINVAL");
-
- puts( "Init: sem_unlink - UNSUCCESSFUL (ENOENT)" );
- status = sem_unlink("sem1");
- fatal_posix_service_status( status, -1, "sem_unlink error return status");
- fatal_posix_service_status( errno, ENOENT, "sem_close errno EINVAL");
-
-
- /*
- * Validate we can unlink (2)
- */
-
- puts( "Init: sem_unlink (NULL) - EINVAL" );
- status = sem_unlink( NULL );
- fatal_posix_service_status( status, -1, "sem_unlink error return status");
- fatal_posix_service_status( errno, EINVAL, "sem_unlink errno value");
-
- puts( "Init: sem_unlink (\"\") - EINVAL" );
- status = sem_unlink( "" );
- fatal_posix_service_status( status, -1, "sem_unlink error return status");
- fatal_posix_service_status( errno, EINVAL, "sem_unlink errno value");
-
- /*
- * XXX - Cant' create location OBJECTS_ERROR or OBJECTS_REMOTE.
- * sem_close and sem_unlink.
- */
-
- puts( "Init: sem_unlink - UNSUCCESSFUL (ENOENT)" );
- status = sem_unlink("sem2");
- fatal_posix_service_status( status, -1, "sem_unlink error return status");
- fatal_posix_service_status( errno, ENOENT, "sem_unlink errno ENOENT");
- assert( (status == -1) && (errno == ENOENT) );
-
-
- /* Try adding in unlinking before closing... (can we still open?) */
-
- puts( "*** POSIX SEMAPHORE MANAGER TEST 1 COMPLETED ***" );
- exit(0);
-
- return NULL; /* just so the compiler thinks we returned something */
-}
-
diff --git a/testsuites/psxtests/psxsem01/psxsem01.scn b/testsuites/psxtests/psxsem01/psxsem01.scn
deleted file mode 100644
index cf8cf13fb1..0000000000
--- a/testsuites/psxtests/psxsem01/psxsem01.scn
+++ /dev/null
@@ -1,37 +0,0 @@
-*** POSIX SEMAPHORE MANAGER TEST 1 ***
-Init: sem_init - SUCCESSFUL
-Init: sem_init - UNSUCCESSFUL (ENOSPC)
-Init: sem_init - UNSUCCESSFUL (ENOSYS -- pshared not supported)
-Init: sem_getvalue - SUCCESSFUL
-Init: sem_getvalue - UNSUCCESSFUL
-Init: sem_destroy - SUCCESSFUL
-Init: sem_destroy - UNSUCCESSFUL (EINVAL)
-Init: sem_wait - SUCCESSFUL
-Init: sem_wait - UNSUCCESSFUL (EINVAL)
-Init: sem_post - SUCCESSFUL
-Init: sem_wait - SUCCESSFUL (after a sem_post)
-Init: sem_trywait - SUCCESSFUL
-Init: sem_trywait - UNSUCCESSFUL (EAGAIN)
-Init: sem_trywait - UNSUCCESSFUL (EINVAL)
-Init: sem_timedwait - SUCCESSFUL
-Init: sem_timedwait - UNSUCCESSFUL (ETIMEDOUT)
-Init: sem_timedwait - UNSUCCESSFUL (EINVAL)
-Init: sem_post - UNSUCCESSFUL (EINVAL)
-Init: sem_destroy - SUCCESSFUL
-Init: sem_open - sem1 SUCCESSFUL
-Init: sem_open - Create an Existing sem (EEXIST)
-Init: sem_open - Open new sem without create flag (ENOENT)
-Init: sem_wait on sem1
-Init: sem_open - Open an existing sem ( same id )
-Init: sem_unlink - sem1 SUCCESSFUL
-Init: sem_open - Reopen sem1 SUCCESSFUL with a different id
-Init: sem_close (1) - SUCCESSFUL
-Init: sem_close (2) - SUCCESSFUL
-Init: sem_unlink - sem1 (2) SUCCESSFUL
-Init: sem_close - UNSUCCESSFUL (EINVAL)
-Init: sem_unlink - UNSUCCESSFUL (ENOENT)
-Init: sem_unlink (NULL) - EINVAL
-Init: sem_unlink ("") - EINVAL
-Init: sem_unlink - UNSUCCESSFUL (ENOENT)
-*** POSIX SEMAPHORE MANAGER TEST 1 COMPLETED ***
-
diff --git a/testsuites/psxtests/psxsem01/system.h b/testsuites/psxtests/psxsem01/system.h
deleted file mode 100644
index 11ad344f3a..0000000000
--- a/testsuites/psxtests/psxsem01/system.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-/* functions */
-
-#include <pmacros.h>
-#include <unistd.h>
-#include <errno.h>
-#include <sched.h>
-#include <semaphore.h>
-#include <tmacros.h>
-
-void *POSIX_Init(
- void *argument
-);
-
-void *Task_1_through_3(
- void *argument
-);
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 2
-#define CONFIGURE_MAXIMUM_POSIX_SEMAPHORES 10
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-#define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE \
- (RTEMS_MINIMUM_STACK_SIZE * 4)
-
-#include <confdefs.h>
-
-/* global variables */
-
-TEST_EXTERN pthread_t Init_id;
-TEST_EXTERN pthread_t Task_id;
-
-/* end of include file */
-
diff --git a/testsuites/psxtests/psxstat/Makefile.am b/testsuites/psxtests/psxstat/Makefile.am
deleted file mode 100644
index 9c20ed100c..0000000000
--- a/testsuites/psxtests/psxstat/Makefile.am
+++ /dev/null
@@ -1,38 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = psxstat
-
-MANAGERS = all
-
-C_FILES = main.c test.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-DOCTYPES = scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/psxtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/psxtests/psxstat/main.c b/testsuites/psxtests/psxstat/main.c
deleted file mode 100644
index bced60fd25..0000000000
--- a/testsuites/psxtests/psxstat/main.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Simple test program -- simplified version of sample test hello.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-
-#include <bsp.h>
-
-void test_main( void );
-
-rtems_task Init(
- rtems_task_argument ignored
-)
-{
- test_main();
- exit( 0 );
-}
-
-/* configuration information */
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-#define CONFIGURE_INIT_TASK_STACK_SIZE (RTEMS_MINIMUM_STACK_SIZE * 2)
-
-
-#define CONFIGURE_INIT
-
-#include <confdefs.h>
-
-/* end of file */
diff --git a/testsuites/psxtests/psxstat/psxstat.scn b/testsuites/psxtests/psxstat/psxstat.scn
deleted file mode 100644
index 15b63846c4..0000000000
--- a/testsuites/psxtests/psxstat/psxstat.scn
+++ /dev/null
@@ -1,1245 +0,0 @@
-
-
-*** STAT TEST 01 ***
->>>>Current Time: - rtems_clock_get - 09:00:00 12/31/1988
-Making directory /dir1
-Making directory /dir2
-Making directory /dir3
-Making directory /dir4
-Making directory /dir1/dir1
-Making directory /./././dir1/ dir1
-Making directory /./././links
-Making directory ///dir1/dir1/../../dir1/../symlinks/////
-Making file ////dir1///file1\//
-Making file /dir1/file2
-Making file /dir1/file3
-Making file /dir1/file4
-Making file /dir1/dir1/file1
-Making file ../../..//dir1/./././dir1/ file1
-Making file main.c
-Making file dir1/dir1/../../links/dir1
-Making file links/dir2
-Making file links/dir3
-Making file links/dir4
-Making file links/dir1_dir1
-Making file links/dir1_ dir1
-Making file links/../links/../links/links
-Making file links/dir1_file1
-Making file links/dir1_file2
-Making file links/dir1_file3
-Making file links/dir1_file4
-Making file links/dir1_dir1_f1
-Making file links/dir1_dir1 f1
-Making file links/links/links/links_dir1
-Making file links//links_dir2
-Making file links//links_dir3
-Making file links//links_dir4
-Making file links//links_dir1_d1
-Making file links//links_dir1 d1
-Making file links//links_links
-Making file links///links_d1_file1
-Making file links///links_d1_file2
-Making file links///links_d1_file3
-Making file links///links_d1_file4
-Making file links///links_d1_d1_f1
-Making file links///links_r1_d1 f1
-Doing the stat() on all the good absolute paths
-stat( /dev ) returned
-st_dev (0x0:0x0)
-...st_ino 2 ( May vary slightly )
-...st_mode 40771
-...st_nlink 1
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 536
-...st_atime Fri Jan 01 00:00:00 1988
-...st_mtime Fri Jan 01 00:00:00 1988
-...st_ctime Fri Jan 01 00:00:00 1988
-stat( ////dir1///file1\// ) returned
-st_dev (0x0:0x0)
-...st_ino d ( May vary slightly )
-...st_mode 100000
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:10 1988
-stat( /dir1/\/file2 ) returned
-st_dev (0x0:0x0)
-...st_ino e ( May vary slightly )
-...st_mode 100000
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:10 1988
-stat( /dir1/file3/////\ ) returned
-st_dev (0x0:0x0)
-...st_ino f ( May vary slightly )
-...st_mode 100000
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:10 1988
-stat( /dir1/file4 ) returned
-st_dev (0x0:0x0)
-...st_ino 10 ( May vary slightly )
-...st_mode 100000
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:10 1988
-stat( /dir1/dir1/file1 ) returned
-st_dev (0x0:0x0)
-...st_ino 11 ( May vary slightly )
-...st_mode 100000
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:10 1988
-stat( /dir1/dir1/ file1 ) returned
-st_dev (0x0:0x0)
-...st_ino 12 ( May vary slightly )
-...st_mode 100000
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:10 1988
-stat( /dir1 ) returned
-st_dev (0x0:0x0)
-...st_ino 5 ( May vary slightly )
-...st_mode 40700
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 1608
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:05 1988
-stat( /dir2////// ) returned
-st_dev (0x0:0x0)
-...st_ino 6 ( May vary slightly )
-...st_mode 40700
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:05 1988
-stat( /dir3 ) returned
-st_dev (0x0:0x0)
-...st_ino 7 ( May vary slightly )
-...st_mode 40700
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:05 1988
-stat( /dir4 ) returned
-st_dev (0x0:0x0)
-...st_ino 8 ( May vary slightly )
-...st_mode 40700
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:05 1988
-stat( /dir1/dir1 ) returned
-st_dev (0x0:0x0)
-...st_ino 9 ( May vary slightly )
-...st_mode 40700
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 536
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:05 1988
-stat( /dir1/ dir1///\ ) returned
-st_dev (0x0:0x0)
-...st_ino a ( May vary slightly )
-...st_mode 40700
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:05 1988
-stat( ///////links///// ) returned
-st_dev (0x0:0x0)
-...st_ino b ( May vary slightly )
-...st_mode 40700
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 6968
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:05 1988
-Doing the stat() on all the good relative paths
-stat( dev ) returned
-st_dev (0x0:0x0)
-...st_ino 2 ( May vary slightly )
-...st_mode 40771
-...st_nlink 1
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 536
-...st_atime Fri Jan 01 00:00:00 1988
-...st_mtime Fri Jan 01 00:00:00 1988
-...st_ctime Fri Jan 01 00:00:00 1988
-stat( dir1///file1\// ) returned
-st_dev (0x0:0x0)
-...st_ino d ( May vary slightly )
-...st_mode 100000
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:10 1988
-stat( dir1/\/file2 ) returned
-st_dev (0x0:0x0)
-...st_ino e ( May vary slightly )
-...st_mode 100000
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:10 1988
-stat( dir1/file3/////\ ) returned
-st_dev (0x0:0x0)
-...st_ino f ( May vary slightly )
-...st_mode 100000
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:10 1988
-stat( dir1/file4 ) returned
-st_dev (0x0:0x0)
-...st_ino 10 ( May vary slightly )
-...st_mode 100000
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:10 1988
-stat( dir1/dir1/file1 ) returned
-st_dev (0x0:0x0)
-...st_ino 11 ( May vary slightly )
-...st_mode 100000
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:10 1988
-stat( dir1/dir1/ file1 ) returned
-st_dev (0x0:0x0)
-...st_ino 12 ( May vary slightly )
-...st_mode 100000
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:10 1988
-stat( dir1 ) returned
-st_dev (0x0:0x0)
-...st_ino 5 ( May vary slightly )
-...st_mode 40700
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 1608
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:05 1988
-stat( dir2////// ) returned
-st_dev (0x0:0x0)
-...st_ino 6 ( May vary slightly )
-...st_mode 40700
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:05 1988
-stat( dir3 ) returned
-st_dev (0x0:0x0)
-...st_ino 7 ( May vary slightly )
-...st_mode 40700
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:05 1988
-stat( dir4 ) returned
-st_dev (0x0:0x0)
-...st_ino 8 ( May vary slightly )
-...st_mode 40700
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:05 1988
-stat( dir1/dir1 ) returned
-st_dev (0x0:0x0)
-...st_ino 9 ( May vary slightly )
-...st_mode 40700
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 536
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:05 1988
-stat( dir1/ dir1///\ ) returned
-st_dev (0x0:0x0)
-...st_ino a ( May vary slightly )
-...st_mode 40700
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:05 1988
-stat( main.c ) returned
-st_dev (0x0:0x0)
-...st_ino 13 ( May vary slightly )
-...st_mode 100000
-...st_nlink 1
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:00 1988
-chdir to dev
-stat relative paths that are now bad
-stat( dev ) returned : No such file or directory
-stat( dir1///file1\// ) returned : No such file or directory
-stat( dir1/\/file2 ) returned : No such file or directory
-stat( dir1/file3/////\ ) returned : No such file or directory
-stat( dir1/file4 ) returned : No such file or directory
-stat( dir1/dir1/file1 ) returned : No such file or directory
-stat( dir1/dir1/ file1 ) returned : No such file or directory
-stat( dir1 ) returned : No such file or directory
-stat( dir2////// ) returned : No such file or directory
-stat( dir3 ) returned : No such file or directory
-stat( dir4 ) returned : No such file or directory
-stat( dir1/dir1 ) returned : No such file or directory
-stat( dir1/ dir1///\ ) returned : No such file or directory
-stat( main.c ) returned : No such file or directory
-chdir to ../links
-Doing the stat() on good links
-stat( dir1/dir1/../../links/dir1 ) returned
-st_dev (0x0:0x0)
-...st_ino 5 ( May vary slightly )
-...st_mode 40700
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 1608
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:05 1988
-stat( links/dir2 ) returned
-st_dev (0x0:0x0)
-...st_ino 6 ( May vary slightly )
-...st_mode 40700
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:05 1988
-stat( links/dir3 ) returned
-st_dev (0x0:0x0)
-...st_ino 7 ( May vary slightly )
-...st_mode 40700
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:05 1988
-stat( links/dir4 ) returned
-st_dev (0x0:0x0)
-...st_ino 8 ( May vary slightly )
-...st_mode 40700
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:05 1988
-stat( links/dir1_dir1 ) returned
-st_dev (0x0:0x0)
-...st_ino 9 ( May vary slightly )
-...st_mode 40700
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 536
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:05 1988
-stat( links/dir1_ dir1 ) returned
-st_dev (0x0:0x0)
-...st_ino a ( May vary slightly )
-...st_mode 40700
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:05 1988
-stat( links/../links/../links/links ) returned
-st_dev (0x0:0x0)
-...st_ino b ( May vary slightly )
-...st_mode 40700
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 6968
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:05 1988
-stat( links/dir1_file1 ) returned
-st_dev (0x0:0x0)
-...st_ino d ( May vary slightly )
-...st_mode 100000
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:10 1988
-stat( links/dir1_file2 ) returned
-st_dev (0x0:0x0)
-...st_ino e ( May vary slightly )
-...st_mode 100000
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:10 1988
-stat( links/dir1_file3 ) returned
-st_dev (0x0:0x0)
-...st_ino f ( May vary slightly )
-...st_mode 100000
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:10 1988
-stat( links/dir1_file4 ) returned
-st_dev (0x0:0x0)
-...st_ino 10 ( May vary slightly )
-...st_mode 100000
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:10 1988
-stat( links/dir1_dir1_f1 ) returned
-st_dev (0x0:0x0)
-...st_ino 11 ( May vary slightly )
-...st_mode 100000
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:10 1988
-stat( links/dir1_dir1 f1 ) returned
-st_dev (0x0:0x0)
-...st_ino 12 ( May vary slightly )
-...st_mode 100000
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:10 1988
-stat( links/links/links/links_dir1 ) returned
-st_dev (0x0:0x0)
-...st_ino 5 ( May vary slightly )
-...st_mode 40700
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 1608
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:05 1988
-stat( links//links_dir2 ) returned
-st_dev (0x0:0x0)
-...st_ino 6 ( May vary slightly )
-...st_mode 40700
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:05 1988
-stat( links//links_dir3 ) returned
-st_dev (0x0:0x0)
-...st_ino 7 ( May vary slightly )
-...st_mode 40700
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:05 1988
-stat( links//links_dir4 ) returned
-st_dev (0x0:0x0)
-...st_ino 8 ( May vary slightly )
-...st_mode 40700
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:05 1988
-stat( links//links_dir1_d1 ) returned
-st_dev (0x0:0x0)
-...st_ino 9 ( May vary slightly )
-...st_mode 40700
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 536
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:05 1988
-stat( links//links_dir1 d1 ) returned
-st_dev (0x0:0x0)
-...st_ino a ( May vary slightly )
-...st_mode 40700
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:05 1988
-stat( links//links_links ) returned
-st_dev (0x0:0x0)
-...st_ino b ( May vary slightly )
-...st_mode 40700
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 6968
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:05 1988
-stat( links///links_d1_file1 ) returned
-st_dev (0x0:0x0)
-...st_ino d ( May vary slightly )
-...st_mode 100000
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:10 1988
-stat( links///links_d1_file2 ) returned
-st_dev (0x0:0x0)
-...st_ino e ( May vary slightly )
-...st_mode 100000
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:10 1988
-stat( links///links_d1_file3 ) returned
-st_dev (0x0:0x0)
-...st_ino f ( May vary slightly )
-...st_mode 100000
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:10 1988
-stat( links///links_d1_file4 ) returned
-st_dev (0x0:0x0)
-...st_ino 10 ( May vary slightly )
-...st_mode 100000
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:10 1988
-stat( links///links_d1_d1_f1 ) returned
-st_dev (0x0:0x0)
-...st_ino 11 ( May vary slightly )
-...st_mode 100000
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:10 1988
-stat( links///links_r1_d1 f1 ) returned
-st_dev (0x0:0x0)
-...st_ino 12 ( May vary slightly )
-...st_mode 100000
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:10 1988
-chmod of /dir1/dir1 to Read/Write
-Doing the stat() on all the bad paths
-stat( /links/ENAMETOOLONG__________________________ ) returned : File or path name too long
-stat( /dir1/file4/NOTADIR ) returned : Not a directory
-stat( /dir1/dir1/EACCES__ ) returned : Permission denied
-Making file /links/ENAMETOOLONG__________________________ : File or path name too long
-Making file /dir1/file4/NOTADIR : Not a directory
-Making file /dir1/dir1/EACCES__ : Permission denied
-Return /dir1/dir1 to RWX
-Making file /symlinks/a_file_symlink
-Verify with readlink
-Making file /symlinks/a_dir_symlink
-Verify with readlink
-Making file /symlinks/a_link_symlink
-Verify with readlink
-Making file ../symlinks/no_file
-Verify with readlink
-Making file /symlinks/a_dir_symlink/a_file_symlink
-Verify with readlink
-Making file /symlinks/links
-Verify with readlink
-stat( /symlinks/a_file_symlink ) returned
-st_dev (0x0:0x0)
-...st_ino d ( May vary slightly )
-...st_mode 100000
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:10 1988
-stat( /symlinks/a_dir_symlink ) returned
-st_dev (0x0:0x0)
-...st_ino 5 ( May vary slightly )
-...st_mode 40700
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 1876
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:05 1988
-stat( /symlinks/a_link_symlink ) returned
-st_dev (0x0:0x0)
-...st_ino 5 ( May vary slightly )
-...st_mode 40700
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 1876
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:05 1988
-stat( ../symlinks/no_file ) returned : No such file or directory
-stat( /symlinks/a_dir_symlink/a_file_symlink ) returned
-st_dev (0x0:0x0)
-...st_ino 5 ( May vary slightly )
-...st_mode 40700
-...st_nlink 3
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 1876
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:05 1988
-Making file 1
-Verify with readlink
-Making file 2
-Verify with readlink
-Making file 3
-Verify with readlink
-Making file 4
-Verify with readlink
-Making file 5
-Verify with readlink
-Making file 6
-Verify with readlink
-Making file 7
-Verify with readlink
-Making file 8
-Verify with readlink
-Making file 9
-Verify with readlink
-stat( 1 ) returned
-st_dev (0x0:0x0)
-...st_ino c ( May vary slightly )
-...st_mode 40700
-...st_nlink 1
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 1340
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:00 1988
-stat( 2 ) returned
-st_dev (0x0:0x0)
-...st_ino c ( May vary slightly )
-...st_mode 40700
-...st_nlink 1
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 1340
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:00 1988
-stat( 3 ) returned
-st_dev (0x0:0x0)
-...st_ino c ( May vary slightly )
-...st_mode 40700
-...st_nlink 1
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 1340
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:00 1988
-stat( 4 ) returned
-st_dev (0x0:0x0)
-...st_ino c ( May vary slightly )
-...st_mode 40700
-...st_nlink 1
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 1340
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:00 1988
-stat( 5 ) returned : Too many symbolic links
-stat( 6 ) returned : Too many symbolic links
-stat( 7 ) returned : Too many symbolic links
-stat( 8 ) returned : Too many symbolic links
-stat( 9 ) returned : Too many symbolic links
-Pass an invalid mode to chmod should fail with EPERM
-chdir to a file should fail with ENOTDIR
-Verify RWX permission on /dir1 via access
-chmod of /dir1 to Read/Write
-chmod fred should fail with ENOENT
-Create under /dir1 should fail with EACCES
-chdir to /dir1/dir1 should fail with EACCES
-Stat with a NULL buffer should fail with EFAULT
-chmod of /dir1 to Read/Write
-mkdir /dir1/BADNAME should fail with EACCESS
-/dir1 Should exist ( access )
-/dir1 Should have read permission( access )
-/dir1 Should have write permission( access )
-/dir1 Should not have execute permission( access )
-Restore /dir1 to RWX
-chdir to /
-Remove /./././dir1/ dir1
-stat( /./././dir1/ dir1 ) returned : No such file or directory
-stat( links/dir1_ dir1 ) returned
-st_dev (0x0:0x0)
-...st_ino a ( May vary slightly )
-...st_mode 40700
-...st_nlink 2
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:20 1988
-stat( links//links_dir1 d1 ) returned
-st_dev (0x0:0x0)
-...st_ino a ( May vary slightly )
-...st_mode 40700
-...st_nlink 2
-...st_uid 0
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:20 1988
-Chdir to links/dir1_ dir1
-Chdir to .. should fail with ENOENT
-mkdir ../t should fail with ENOENT
-mkdir t
-chdir to /
-rmdir links/dir1_ dir1 should fail with ENOTDIR
-unlink links/dir1_ dir1
-unlink links//links_dir1 d1 should fail with ENOTEMPTY
-rmdir links//links_dir1 d1/t
-unlink links/dir1_ dir1
-Attempting to mount IMFS file system at /dir1/my_mount_point
-rmdir /dir1/my_mount_point should fail with EBUSY
-Unmount /dir1/my_mount_point
-chmod of ////dir1///file1\// to group and other execute
-Open ////dir1///file1\// for write should fail with EACCES
-chmod of /dir4 to User Execute and Read
-Mkdir of /dir4/NewFile should fail with EACCES
-Making too many hard links.
-Making file /LinkName1
-Making file /LinkName2
-Making file /LinkName3
-Making file /LinkName4
-Making file /LinkName5
-Making file /LinkName6
-Making file /LinkName7
-Making file /LinkName8
-pass fstat a null pointer should fail with EFAULT
-chdir to /
-Change group of ////dir1///file1\//
-stat( ////dir1///file1\// ) returned
-st_dev (0x0:0x0)
-...st_ino d ( May vary slightly )
-...st_mode 100011
-...st_nlink 3
-...st_uid 0
-...st_gid 1
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:25 1988
-Change owner of ////dir1///file1\//
-stat( ////dir1///file1\// ) returned
-st_dev (0x0:0x0)
-...st_ino d ( May vary slightly )
-...st_mode 100011
-...st_nlink 3
-...st_uid 1
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:25 1988
-Change group of /dir1/file2
-stat( /dir1/file2 ) returned
-st_dev (0x0:0x0)
-...st_ino e ( May vary slightly )
-...st_mode 100000
-...st_nlink 3
-...st_uid 0
-...st_gid 1
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:25 1988
-Change owner of /dir1/file2
-stat( /dir1/file2 ) returned
-st_dev (0x0:0x0)
-...st_ino e ( May vary slightly )
-...st_mode 100000
-...st_nlink 3
-...st_uid 1
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:25 1988
-Change group of /dir1/file3
-stat( /dir1/file3 ) returned
-st_dev (0x0:0x0)
-...st_ino f ( May vary slightly )
-...st_mode 100000
-...st_nlink 3
-...st_uid 0
-...st_gid 1
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:25 1988
-Change owner of /dir1/file3
-stat( /dir1/file3 ) returned
-st_dev (0x0:0x0)
-...st_ino f ( May vary slightly )
-...st_mode 100000
-...st_nlink 3
-...st_uid 1
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:25 1988
-Change group of /dir1/file4
-stat( /dir1/file4 ) returned
-st_dev (0x0:0x0)
-...st_ino 10 ( May vary slightly )
-...st_mode 100000
-...st_nlink 3
-...st_uid 0
-...st_gid 1
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:25 1988
-Change owner of /dir1/file4
-stat( /dir1/file4 ) returned
-st_dev (0x0:0x0)
-...st_ino 10 ( May vary slightly )
-...st_mode 100000
-...st_nlink 3
-...st_uid 1
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:25 1988
-Change group of /dir1/dir1/file1
-stat( /dir1/dir1/file1 ) returned
-st_dev (0x0:0x0)
-...st_ino 11 ( May vary slightly )
-...st_mode 100000
-...st_nlink 3
-...st_uid 0
-...st_gid 1
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:25 1988
-Change owner of /dir1/dir1/file1
-stat( /dir1/dir1/file1 ) returned
-st_dev (0x0:0x0)
-...st_ino 11 ( May vary slightly )
-...st_mode 100000
-...st_nlink 3
-...st_uid 1
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:25 1988
-Change group of ../../..//dir1/./././dir1/ file1
-stat( ../../..//dir1/./././dir1/ file1 ) returned
-st_dev (0x0:0x0)
-...st_ino 12 ( May vary slightly )
-...st_mode 100000
-...st_nlink 3
-...st_uid 0
-...st_gid 1
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:25 1988
-Change owner of ../../..//dir1/./././dir1/ file1
-stat( ../../..//dir1/./././dir1/ file1 ) returned
-st_dev (0x0:0x0)
-...st_ino 12 ( May vary slightly )
-...st_mode 100000
-...st_nlink 3
-...st_uid 1
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:25 1988
-Change group of main.c
-stat( main.c ) returned
-st_dev (0x0:0x0)
-...st_ino 13 ( May vary slightly )
-...st_mode 100000
-...st_nlink 1
-...st_uid 0
-...st_gid 1
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:25 1988
-Change owner of main.c
-stat( main.c ) returned
-st_dev (0x0:0x0)
-...st_ino 13 ( May vary slightly )
-...st_mode 100000
-...st_nlink 1
-...st_uid 1
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:25 1988
-Change group of dir1/dir1/../../links/dir1
-stat( dir1/dir1/../../links/dir1 ) returned
-st_dev (0x0:0x0)
-...st_ino 5 ( May vary slightly )
-...st_mode 40700
-...st_nlink 3
-...st_uid 0
-...st_gid 1
-...st_rdev (0x0:0x0)
-...st_size 1876
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:30 1988
-Change owner of dir1/dir1/../../links/dir1
-stat( dir1/dir1/../../links/dir1 ) returned : Permission denied
-Change group of links/dir2
-stat( links/dir2 ) returned
-st_dev (0x0:0x0)
-...st_ino 6 ( May vary slightly )
-...st_mode 40700
-...st_nlink 3
-...st_uid 0
-...st_gid 1
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:30 1988
-Change owner of links/dir2
-stat( links/dir2 ) returned
-st_dev (0x0:0x0)
-...st_ino 6 ( May vary slightly )
-...st_mode 40700
-...st_nlink 3
-...st_uid 1
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:30 1988
-Change group of links/dir3
-stat( links/dir3 ) returned
-st_dev (0x0:0x0)
-...st_ino 7 ( May vary slightly )
-...st_mode 40700
-...st_nlink 3
-...st_uid 0
-...st_gid 1
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:30 1988
-Change owner of links/dir3
-stat( links/dir3 ) returned
-st_dev (0x0:0x0)
-...st_ino 7 ( May vary slightly )
-...st_mode 40700
-...st_nlink 3
-...st_uid 1
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:30 1988
-Change group of links/dir4
-stat( links/dir4 ) returned
-st_dev (0x0:0x0)
-...st_ino 8 ( May vary slightly )
-...st_mode 40500
-...st_nlink 3
-...st_uid 0
-...st_gid 1
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:30 1988
-Change owner of links/dir4
-stat( links/dir4 ) returned
-st_dev (0x0:0x0)
-...st_ino 8 ( May vary slightly )
-...st_mode 40500
-...st_nlink 3
-...st_uid 1
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 0
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:30 1988
-Change group of links/dir1_dir1
-stat( links/dir1_dir1 ) returned
-st_dev (0x0:0x0)
-...st_ino 9 ( May vary slightly )
-...st_mode 40700
-...st_nlink 3
-...st_uid 0
-...st_gid 1
-...st_rdev (0x0:0x0)
-...st_size 536
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:30 1988
-Change owner of links/dir1_dir1
-stat( links/dir1_dir1 ) returned
-st_dev (0x0:0x0)
-...st_ino 9 ( May vary slightly )
-...st_mode 40700
-...st_nlink 3
-...st_uid 1
-...st_gid 0
-...st_rdev (0x0:0x0)
-...st_size 536
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:30 1988
-Change group of links/dir1_ dir1
-stat( links/dir1_ dir1 ) returned : No such file or directory
-Change owner of links/dir1_ dir1
-stat( links/dir1_ dir1 ) returned : No such file or directory
-Change group of links/../links/../links/links
-stat( links/../links/../links/links ) returned
-st_dev (0x0:0x0)
-...st_ino b ( May vary slightly )
-...st_mode 40700
-...st_nlink 3
-...st_uid 0
-...st_gid 1
-...st_rdev (0x0:0x0)
-...st_size 8844
-...st_atime Sat Dec 31 09:00:00 1988
-...st_mtime Sat Dec 31 09:00:00 1988
-...st_ctime Sat Dec 31 09:00:30 1988
-Change owner of links/../links/../links/links
-stat( links/../links/../links/links ) returned : Permission denied
-*** END OF STAT TEST 01 ***
diff --git a/testsuites/psxtests/psxstat/test.c b/testsuites/psxtests/psxstat/test.c
deleted file mode 100644
index 4fd49726b7..0000000000
--- a/testsuites/psxtests/psxstat/test.c
+++ /dev/null
@@ -1,835 +0,0 @@
-/*
- * This test exercises stat() via fstat() and generates as many of the
- * path evaluation cases as possible.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-#include <assert.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <limits.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <errno.h>
-#include <string.h>
-#include <rtems.h>
-#include <rtems/libio.h>
-
-#define MAXSYMLINK 5 /* There needs to be a better way of getting this. */
-
-
-/*
- * List of files which should exist.
- */
-
-char *Files[] = {
- "////dir1/\\//file1\\\\//",
- "/dir1/file2",
- "/dir1/file3",
- "/dir1/file4",
- "/dir1/dir1/file1",
- "../../..//dir1/./././dir1/ file1",
- "main.c",
- 0
-};
-
-/*
- * List of directories which should exist.
- */
-
-char *Directories[] = {
- "/dir1",
- "/dir2",
- "/dir3",
- "/dir4",
- "/dir1/dir1",
- "/./././dir1/ dir1",
- "/./././links",
- "///dir1/dir1/../../dir1/../symlinks/////",
- 0
-};
-
-char *Links_to_Dirs[]= {
- "dir1/dir1/../../links/dir1",
- "links/dir2",
- "links/dir3",
- "links/dir4",
- "links/dir1_dir1",
- "links/dir1_ dir1",
- "links/../links/../links/links",
- 0
-};
-
-char *Links_to_Files[]= {
- "links/dir1_file1",
- "links/dir1_file2",
- "links/dir1_file3",
- "links/dir1_file4",
- "links/dir1_dir1_f1",
- "links/dir1_dir1 f1",
- 0
-};
-
-char *Links_to_dirlinks[]= {
- "links/links/links/links_dir1",
- "links//links_dir2",
- "links//links_dir3",
- "links//links_dir4",
- "links//links_dir1_d1",
- "links//links_dir1 d1",
- "links//links_links",
- 0
-};
-
-char *Links_to_filelinks[]= {
- "links///links_d1_file1",
- "links///links_d1_file2",
- "links///links_d1_file3",
- "links///links_d1_file4",
- "links///links_d1_d1_f1",
- "links///links_r1_d1 f1",
- 0
-};
-
-char *SymLinks[]= {
- "/symlinks/a_file_symlink",
- "/symlinks/a_dir_symlink",
- "/symlinks/a_link_symlink",
- "../symlinks/no_file",
- "/symlinks/a_dir_symlink/a_file_symlink",
- 0
-};
-
-/*
- * List of absolute paths to stat.
- */
-
-char *Good_absolute_paths[] = {
- "/dev",
- "////dir1/\\//file1\\\\//",
- "/dir1/\\\\/file2",
- "/dir1/file3/////\\\\\\",
- "/dir1/file4",
- "/dir1/dir1/file1",
- "/dir1/dir1/ file1",
- "/dir1",
- "/dir2//////\\",
- "/dir3",
- "/dir4",
- "/dir1/dir1",
- "/dir1/ dir1///\\\\",
- "/\\/\\/\\/\\/\\/\\/links\\/\\/\\/\\/\\/\\",
- 0
-};
-
-
-char *Bad_paths[] = {
- "/links/ENAMETOOLONG__________________________",
- "/dir1/file4/NOTADIR",
- "/dir1/dir1/EACCES__",
- 0
-};
-
-/*
- * List of relative paths to stat.
- */
-
-char *Good_relative_paths[] = {
- "dev",
- "dir1/\\//file1\\\\//",
- "dir1/\\\\/file2",
- "dir1/file3/////\\\\\\",
- "dir1/file4",
- "dir1/dir1/file1",
- "dir1/dir1/ file1",
- "dir1",
- "dir2//////\\",
- "dir3",
- "dir4",
- "dir1/dir1",
- "dir1/ dir1///\\\\",
- "main.c",
- 0
-};
-
-/*
- * Do a stat on a single file and report the status.
- */
-
-void stat_a_file(
- const char *file
-)
-{
- int status;
- struct stat statbuf;
- int major1;
- int minor1;
- int major2;
- int minor2;
-
-
- assert( file );
-
- printf( "stat( %s ) returned ", file );
- fflush( stdout );
-
- status = stat( file, &statbuf );
-
- if ( status == -1 ) {
- printf( ": %s\n", strerror( errno ) );
- } else {
-
- rtems_filesystem_split_dev_t( statbuf.st_dev, major1, minor1 );
- rtems_filesystem_split_dev_t( statbuf.st_rdev, major2, minor2 );
-
-
- printf("\n\tst_dev (0x%x:0x%x)\n", major1, minor1 );
- printf( "...st_ino %x\n", (int) statbuf.st_ino );
- printf( "...st_mode %o\n", statbuf.st_mode );
- printf( "...st_nlink %x\n", statbuf.st_nlink );
- printf( "...st_uid %d\n", statbuf.st_uid );
- printf( "...st_gid %d\n", statbuf.st_gid );
- printf( "...st_rdev (0x%x:0x%x)\n", major2, minor2 );
- printf( "...st_size %d\n",(unsigned int) statbuf.st_size );
- printf( "...st_atime %s", ctime( &statbuf.st_atime ) );
- printf( "...st_mtime %s", ctime( &statbuf.st_mtime ) );
- printf( "...st_ctime %s", ctime( &statbuf.st_ctime ) );
-#if defined(__svr4__) && !defined(__PPC__) && !defined(__sun__)
- printf( "...st_blksize %x\n", statbuf.st_blksize );
- printf( "...st_blocks %x\n", statbuf.st_blocks );
-#endif
-
- }
-}
-
-/*
- * stat() multiple files at a time
- */
-
-void stat_multiple_files(
- char **files
-)
-{
- int i;
-
- i = 0;
- while ( files[i] ) {
- stat_a_file( files[i] );
- i++;
- }
-}
-
-/*
- * chown() multiple files at a time
- */
-void chown_multiple_files(
- char **files
-)
-{
- int i;
- uid_t st_uid;
- gid_t st_gid;
-
-#if defined(RTEMS_POSIX_API)
- st_uid = geteuid();
- st_gid = getegid();
-#else
- st_uid = 100;
-e
- st_gid = 0;
-#endif
-
- i = 0;
- while ( files[i] ) {
- printf("Change group of %s\n", files[i]);
- chown( files[i], st_uid, (st_gid+1) );
- stat_a_file( files[i] );
-
- printf("Change owner of %s\n", files[i]);
- chown( files[i], (st_uid+1), st_gid );
- stat_a_file( files[i] );
- i++;
- }
-
-}
-
-
-
-/*
- * mknod() multiple files at a time
- */
-
-void make_multiple_files(
- char **files
-)
-{
- int i;
- int status;
-
- i = 0;
- while ( files[i] ) {
- printf( "Making file %s\n", files[i] );
- status = mknod( files[i], ( S_IFREG | S_IROTH|S_IWOTH ), 0LL );
- assert( !status );
- i++;
- }
- puts( "" );
-}
-
-void make_multiple_bad_files(
- char **files
-)
-{
- int i;
- int status;
-
- i = 0;
- while ( files[i] ) {
- printf( "Making file %s ", files[i] );
- status = mknod( files[i], ( S_IFREG | S_IROTH|S_IWOTH ), 0LL );
- assert( status );
- printf( ": %s\n", strerror( errno ) );
- i++;
- }
- puts( "" );
-}
-
-void make_multiple_links(
- char **existing,
- char **new
-)
-{
- int i;
- int status;
-
- i = 0;
- while ( new[i] && existing[i] ) {
- printf( "Making file %s\n", new[i] );
- status = link( existing[i], new[i] );
- assert( !status );
- i++;
- }
- puts( "" );
-
- status = link( "fred", "bob" );
- assert( status == -1 );
-
- status = link( existing[1], "doug/bob" );
- assert( status == -1 );
-}
-
-
-void make_too_many_links()
-{
- int i;
- int status;
- char name [20];
-
- status = mkdir("/dummy", S_IRWXU );
- assert( status == 0 );
-
- for (i=1; i<= LINK_MAX; i++) {
-
- sprintf(name,"/LinkName%d",i);
- printf( "Making file %s\n", name );
- status = link("/dummy" , name );
- if( i < LINK_MAX )
- assert( !status );
- else
- assert( status == -1 );
-
- }
-}
-
-
-void make_a_symlink(
- char *existing,
- char *new
-)
-{
- int status;
- char buf[100];
- int len;
-
- memset( buf, 0, 100 );
-
- printf( "Making file %s\n", new );
- status = symlink( existing, new );
- assert( !status );
-
- printf( "Verify with readlink\n");
- status = readlink( new, buf, 100 );
- len = strlen( existing );
- assert ( status == len );
-
- status = readlink( new, buf, 3 );
- len = strlen( existing );
- if (len < 3 )
- assert( status == len );
- else
- assert( status == 3 );
-
- status = strcmp( existing, buf );
- assert( !status );
-}
-
-void make_multiple_symlinks()
-{
- int status;
-
- make_a_symlink( Files[0], SymLinks[0] );
- make_a_symlink( Directories[0], SymLinks[1] );
- make_a_symlink( Links_to_dirlinks[0], SymLinks[2] );
- make_a_symlink( "No_File", SymLinks[3] );
- make_a_symlink( SymLinks[1], SymLinks[4] );
- make_a_symlink( "//links", "/symlinks/links" );
-
- stat_a_file( SymLinks[0] );
- stat_a_file( SymLinks[1] );
- stat_a_file( SymLinks[2] );
- stat_a_file( SymLinks[3] );
- stat_a_file( SymLinks[4] );
-
- status = symlink( "//links", "bob/frank" );
- assert (status == -1);
-
-}
-/*
-void make_too_many_symlinks()
-{
- int i, status;
- char name1[8];
-
- for (i=1; i <= MAXSYMLINK; i++) {
- sprintf( name1, "SymLink%d", i );
- status = symlink( "/dummy", name1 );
- if( i < MAXSYMLINK )
- assert( !status );
- else
- assert( status == -1 );
- }
-}
-*/
-void make_many_symlinks(
- char *real_file,
- int link_count
-)
-{
- int i;
- char name1[5];
- char name2[5];
- char *link_file;
-
- link_file = real_file;
- for (i=1; i < link_count; i++) {
- sprintf( name1, "%d", i );
- make_a_symlink( link_file, name1 );
- strcpy( name2, name1 );
- link_file = name2;
- }
-
- for (i=1; i < link_count; i++) {
- sprintf( name1, "%d", i );
- stat_a_file( name1 );
- }
-
-}
-
-/*
- * mkdir() multiple directories at a time
- */
-
-void make_multiple_directories(
- char **files
-)
-{
- int i;
- int status;
-
- i = 0;
- while ( files[i] ) {
- printf( "Making directory %s\n", files[i] );
- status = mkdir( files[i], S_IRWXU );
- assert( !status );
- i++;
- }
- puts( "" );
-}
-
-/*
- * Cause faults.
- */
-
-
-void Cause_faults()
-{
- int fd;
- int status;
- char longer_name[100];
- rtems_filesystem_mount_table_entry_t *mt_entry;
-
- /*
- * Verify chmod with an invalid type.
- */
-
- printf("\n\nPass an invalid mode to chmod should fail with EPERM \n" );
- status = chmod( Files[0], S_IFREG );
- assert( status == -1 );
- assert( errno == EPERM );
-
- /*
- * Try to chdir to a file.
- */
-
- printf("chdir to a file should fail with ENOTDIR\n");
- status = chdir( Files[0] );
- assert( status == -1 );
- assert( errno == ENOTDIR );
-
- /*
- * Change mode to read/write on a directory.
- * Verify directory works properly.
- */
-
- printf("Verify RWX permission on %s via access\n", Directories[0]);
- status = access( Directories[0], ( R_OK | W_OK | X_OK ) );
- assert( status == 0 );
-
- printf( "chmod of %s to Read/Write\n", Directories[0] );
- status = chmod( Directories[0], (S_IXGRP | S_IXOTH) );
- assert( status == 0 );
-
- printf( "chmod fred should fail with ENOENT\n" );
- status = chmod( "fred", (S_IXGRP | S_IXOTH) );
- assert( status == -1 );
- assert( errno == ENOENT );
-
- strcpy(longer_name, Directories[0] );
- strcat(longer_name, "/BADNAME" );
- printf( "Create under %s should fail with EACCES\n", Directories[0] );
- status = mkdir( longer_name , S_IRWXU );
- assert( status == -1 );
- assert( errno == EACCES );
-
- printf("chdir to %s should fail with EACCES\n", Directories[4] );
- status = chdir( Directories[4] );
- assert( status == -1 );
- assert( errno == EACCES );
-
- /*
- * Check stat with a NULL buffer.
- */
-
- printf("Stat with a NULL buffer should fail with EFAULT\n");
- status = stat( Directories[0], NULL );
- assert( status == -1 );
- assert( errno == EFAULT );
-
- /*
- * Set current to a directory with no owner permissions.
- * Verify it works properly.
- */
-
- printf( "\n\nchmod of %s to Read/Write\n", Directories[0] );
- status = chmod( Directories[0], (S_IXGRP | S_IXOTH) );
- assert( status == 0 );
-
- printf("mkdir %s should fail with EACCESS\n", longer_name );
- status = mkdir( longer_name , S_IRWXU );
- assert( status == -1 );
- assert( errno == EACCES );
-
- printf("\n%s Should exist ( access )\n",Directories[0] );
- status = access( Directories[0], F_OK );
- assert( status == 0 );
- printf("\n%s Should have read permission( access )\n",Directories[0] );
- status = access( Directories[0], R_OK );
- assert( status != 0 );
- printf("\n%s Should have write permission( access )\n",Directories[0] );
- status = access( Directories[0], W_OK );
- assert( status != 0 );
- printf("\n%s Should not have execute permission( access )\n",Directories[0] );
- status = access( Directories[0], X_OK );
- assert( status != 0 );
-
- printf("\nRestore %s to RWX\n",Directories[0] );
- status = chmod( Directories[0], S_IRWXU );
- assert( status == 0 );
-
- printf("chdir to / \n");
- status = chdir( "/" );
- assert( status == 0 );
-
- /*
- * Remove one of the directories.
- * Verify links to the removed directory still work.
- */
-
- printf( "Remove %s\n", Directories[5] );
- status = rmdir( Directories[5] );
- assert( status == 0 );
-
- stat_a_file( Directories[5] );
- status = access( Directories[5], F_OK );
- assert( status != 0 );
-
- stat_a_file( Links_to_Dirs[5] );
- status = readlink( Links_to_Dirs[5], longer_name, 3 );
- assert( status == -1 );
- assert( errno == EINVAL );
-
- stat_a_file( Links_to_dirlinks[5] );
- printf("Chdir to %s\n", Links_to_Dirs[5] );
- status = chdir( Links_to_Dirs[5] );
- assert( status == 0 );
-
- /*
- * Verify we cannot move up from a node with no parent node.
- */
-
- printf("Chdir to .. should fail with ENOENT\n" );
- status = chdir( ".." );
- assert( status == -1 );
- assert( errno == ENOENT );
-
- /*
- * Create a subdirectory under the dangling node.
- */
-
- printf("mkdir ../t should fail with ENOENT\n" );
- status = mkdir( "../t" , S_IRWXU );
- assert( status == -1 );
- assert( errno == ENOENT );
-
- printf("mkdir t\n");
- status = mkdir( "t" , S_IRWXU );
- assert( status == 0 );
-
- printf("chdir to / \n");
- status = chdir( "/" );
- assert( status == 0 );
-
- /*
- * Check rmdir, rmnod, and unlink
- */
-
- printf("rmdir %s should fail with ENOTDIR\n", Links_to_Dirs[5] );
- status = rmdir( Links_to_Dirs[5] );
- assert( status == -1 );
- assert( errno == ENOTDIR );
-
- printf("unlink %s\n", Links_to_Dirs[5] );
- status = unlink( Links_to_Dirs[5] );
- assert( status == 0 );
-
- printf("unlink %s should fail with ENOTEMPTY\n", Links_to_dirlinks[5] );
- status = unlink( Links_to_dirlinks[5] );
- assert( status == -1 );
- assert( errno == ENOTEMPTY );
-
- strcpy( longer_name, Links_to_dirlinks[5] );
- strcat( longer_name, "/t");
- printf("rmdir %s\n", longer_name );
- status = rmdir( longer_name );
- assert( status == 0 );
-
- printf("unlink %s\n", Links_to_Dirs[5]);
- status = unlink( Links_to_dirlinks[5] );
- assert( status == 0 );
-
- status = chdir( Directories[0] );
- status = mkdir ( "my_mount_point", S_IRWXU );
- assert( status == 0 );
-
- printf("Attempting to mount IMFS file system at /dir1/my_mount_point \n");
- status = mount(
- &mt_entry,
- &IMFS_ops,
- RTEMS_FILESYSTEM_READ_WRITE,
- NULL,
- "/dir1/my_mount_point" );
- assert( status == 0 );
-
- printf("rmdir /dir1/my_mount_point should fail with EBUSY\n");
- status = rmdir ("/dir1/my_mount_point" );
- assert( status == -1 );
- assert( errno == EBUSY );
-
- printf( "Unmount /dir1/my_mount_point\n");
- status = unmount( "/dir1/my_mount_point" );
- assert( status == 0 );
-
- /*
- * Verify write permission is checked.
- */
-
- printf("chmod of %s to group and other execute\n", Files[0] );
- status = chmod (Files[0], (S_IXGRP | S_IXOTH) );
- assert( status == 0 );
-
- printf("Open %s for write should fail with EACCES\n", Files[0] );
- fd = open (Files[0], O_WRONLY);
- assert( fd == -1 );
- assert( errno == EACCES );
-
- printf("chmod of %s to User Execute and Read\n", Directories[3] );
- status = chmod (Directories[3], (S_IXUSR | S_IRUSR) );
- assert( status == 0 );
- strcpy(longer_name, Directories[3] );
- strcat(longer_name, "/NewFile" );
- printf("Mkdir of %s should fail with EACCES\n",longer_name );
- status = mkdir( longer_name, S_IRWXU );
- assert( status != 0 );
- assert( errno == EACCES );
-
- printf(" Making too many hard links.\n" );
- make_too_many_links( );
-
- printf( "pass fstat a null pointer should fail with EFAULT\n");
- status = fstat( fd, NULL );
- assert( status == -1 );
- assert( errno == EFAULT);
-
- /*
- * The current directory MUST be restored at the end of this test.
- */
-
- printf("chdir to / \n");
- status = chdir( "/" );
- assert( status == 0 );
-
-}
-
-void Show_Time()
-{
- rtems_time_of_day time;
- rtems_status_code status;
-
- status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
- printf(">>>>Current Time: ");
- print_time( " - rtems_clock_get - ", &time, "\n" );
-}
-
-/*
- * main entry point to the test
- */
-
-#if defined(__rtems__)
-int test_main(void)
-#else
-int main(
- int argc,
- char **argv
-)
-#endif
-{
- rtems_status_code status;
- rtems_time_of_day time;
-
- puts( "\n\n*** STAT TEST 01 ***" );
-
- build_time( &time, 12, 31, 1988, 9, 0, 0, 0 );
- status = rtems_clock_set( &time );
-
- /*
- * Create the files and directories for the test.
- */
- Show_Time();
-
- make_multiple_directories( Directories );
- make_multiple_files( Files );
- make_multiple_links( Directories, Links_to_Dirs );
- make_multiple_links( Files, Links_to_Files );
-
- status = rtems_task_wake_after( 5 * TICKS_PER_SECOND );
- make_multiple_links( Links_to_Dirs, Links_to_dirlinks );
- status = rtems_task_wake_after( 5 * TICKS_PER_SECOND );
- make_multiple_links( Links_to_Files, Links_to_filelinks );
-
- status = rtems_task_wake_after( 5 * TICKS_PER_SECOND );
-
- /*
- * Now go through all the absolute path.
- */
-
- puts( "Doing the stat() on all the good absolute paths" );
- stat_multiple_files( Good_absolute_paths );
-
- /*
- * run through the relative paths.
- */
-
- puts( "\nDoing the stat() on all the good relative paths" );
- stat_multiple_files( Good_relative_paths );
-
- /*
- * Change directory and releative paths are now bad.
- */
-
- puts("\nchdir to dev");
- chdir("dev");
- puts("\nstat relative paths that are now bad");
- stat_multiple_files( Good_relative_paths );
-
- /*
- * Change directory to the link directory and follow links.
- */
-
- puts("\nchdir to ../links");
- chdir("../links");
- puts("Doing the stat() on good links\n");
- stat_multiple_files( Links_to_Dirs );
- stat_multiple_files( Links_to_Files );
- stat_multiple_files( Links_to_dirlinks );
- stat_multiple_files( Links_to_filelinks );
-
- /*
- * Chmod on dir1/dir1. This allows the error path to be hit.
- */
-
- printf( "chmod of %s to Read/Write\n", Directories[4] );
- chmod( Directories[4], (S_IROTH|S_IWOTH) );
- puts( "\nDoing the stat() on all the bad paths" );
-
- stat_multiple_files( Bad_paths );
- make_multiple_bad_files( Bad_paths );
-
- printf( "Return %s to RWX\n", Directories[4] );
- chmod( Directories[4], S_IRWXU );
-
-
- /*
- * Check out symbolic links.
- */
-
- make_multiple_symlinks();
- make_many_symlinks( "/symlinks", 10 );
-
- status = rtems_task_wake_after( 5 * TICKS_PER_SECOND );
- Cause_faults();
-
- status = rtems_task_wake_after( 5 * TICKS_PER_SECOND );
- chown_multiple_files( Files );
-
- status = rtems_task_wake_after( 5 * TICKS_PER_SECOND );
- chown_multiple_files( Links_to_Dirs );
-
- puts( "\n\n*** END OF STAT TEST 01 ***" );
- exit(0);
-}
-
-
-
-
-
-
-
diff --git a/testsuites/psxtests/psxtests.am b/testsuites/psxtests/psxtests.am
deleted file mode 100644
index 15a8e28c9b..0000000000
--- a/testsuites/psxtests/psxtests.am
+++ /dev/null
@@ -1,23 +0,0 @@
-project_bspdir=$(PROJECT_ROOT)/@RTEMS_BSP@
-
-$(project_bspdir)/tests:
- @$(mkinstalldirs) $@
-
-$(project_bspdir)/tests/$(TEST)$(LIB_VARIANT).exe: $(PGM)
- $(INSTALL_PROGRAM) $< $@
-
-$(project_bspdir)/tests/screens:
- @$(mkinstalldirs) $@
-
-$(project_bspdir)/tests/screens/psxtests:
- @$(mkinstalldirs) $@
-
-$(project_bspdir)/tests/screens/psxtests/$(TEST).scn: $(TEST).scn
- $(INSTALL_DATA) $< $@
-
-TMPINSTALL_FILES += \
-$(project_bspdir)/tests \
-$(project_bspdir)/tests/$(TEST)$(LIB_VARIANT).exe \
-$(project_bspdir)/tests/screens \
-$(project_bspdir)/tests/screens/psxtests \
-$(project_bspdir)/tests/screens/psxtests/$(TEST).scn
diff --git a/testsuites/psxtests/psxtime/Makefile.am b/testsuites/psxtests/psxtime/Makefile.am
deleted file mode 100644
index 66b8c88f11..0000000000
--- a/testsuites/psxtests/psxtime/Makefile.am
+++ /dev/null
@@ -1,38 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = psxtime
-
-MANAGERS = all
-
-C_FILES = main.c test.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-DOCTYPES = scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/psxtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/psxtests/psxtime/main.c b/testsuites/psxtests/psxtime/main.c
deleted file mode 100644
index 9f253e881b..0000000000
--- a/testsuites/psxtests/psxtime/main.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Simple test program -- simplified version of sample test hello.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-
-#include <bsp.h>
-
-void test_main( void );
-
-rtems_task Init(
- rtems_task_argument ignored
-)
-{
- test_main();
- exit( 0 );
-}
-
-/* configuration information */
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#define CONFIGURE_INIT
-
-#include <confdefs.h>
-
-/* end of file */
diff --git a/testsuites/psxtests/psxtime/psxtime.scn b/testsuites/psxtests/psxtime/psxtime.scn
deleted file mode 100644
index 688e7c9442..0000000000
--- a/testsuites/psxtests/psxtime/psxtime.scn
+++ /dev/null
@@ -1,302 +0,0 @@
-
-
-*** POSIX TIME OF DAY TEST ***
-rtems_clock_set 12:45:00 01/01/1988
-rtems_clock_get 12:45:00 01/01/1988
-gettimeofday: Fri Jan 01 12:45:00 1988
-time: Fri Jan 01 12:45:00 1988
-localtime: Fri Jan 01 12:45:00 1988
-gmtime: Fri Jan 01 12:45:00 1988
-
-rtems_clock_get 12:45:05 01/01/1988
-gettimeofday: Fri Jan 01 12:45:05 1988
-time: Fri Jan 01 12:45:05 1988
-localtime: Fri Jan 01 12:45:05 1988
-gmtime: Fri Jan 01 12:45:05 1988
-
-rtems_clock_get 12:45:10 01/01/1988
-gettimeofday: Fri Jan 01 12:45:10 1988
-time: Fri Jan 01 12:45:10 1988
-localtime: Fri Jan 01 12:45:10 1988
-gmtime: Fri Jan 01 12:45:10 1988
-
-rtems_clock_get 12:45:15 01/01/1988
-gettimeofday: Fri Jan 01 12:45:15 1988
-time: Fri Jan 01 12:45:15 1988
-localtime: Fri Jan 01 12:45:15 1988
-gmtime: Fri Jan 01 12:45:15 1988
-
-rtems_clock_get 12:45:20 01/01/1988
-gettimeofday: Fri Jan 01 12:45:20 1988
-time: Fri Jan 01 12:45:20 1988
-localtime: Fri Jan 01 12:45:20 1988
-gmtime: Fri Jan 01 12:45:20 1988
-
-rtems_clock_get 12:45:25 01/01/1988
-gettimeofday: Fri Jan 01 12:45:25 1988
-time: Fri Jan 01 12:45:25 1988
-localtime: Fri Jan 01 12:45:25 1988
-gmtime: Fri Jan 01 12:45:25 1988
-
-rtems_clock_set 09:00:00 12/31/1988
-rtems_clock_get 09:00:00 12/31/1988
-gettimeofday: Sat Dec 31 09:00:00 1988
-time: Sat Dec 31 09:00:00 1988
-localtime: Sat Dec 31 09:00:00 1988
-gmtime: Sat Dec 31 09:00:00 1988
-
-rtems_clock_get 09:00:05 12/31/1988
-gettimeofday: Sat Dec 31 09:00:05 1988
-time: Sat Dec 31 09:00:05 1988
-localtime: Sat Dec 31 09:00:05 1988
-gmtime: Sat Dec 31 09:00:05 1988
-
-rtems_clock_get 09:00:10 12/31/1988
-gettimeofday: Sat Dec 31 09:00:10 1988
-time: Sat Dec 31 09:00:10 1988
-localtime: Sat Dec 31 09:00:10 1988
-gmtime: Sat Dec 31 09:00:10 1988
-
-rtems_clock_get 09:00:15 12/31/1988
-gettimeofday: Sat Dec 31 09:00:15 1988
-time: Sat Dec 31 09:00:15 1988
-localtime: Sat Dec 31 09:00:15 1988
-gmtime: Sat Dec 31 09:00:15 1988
-
-rtems_clock_get 09:00:20 12/31/1988
-gettimeofday: Sat Dec 31 09:00:20 1988
-time: Sat Dec 31 09:00:20 1988
-localtime: Sat Dec 31 09:00:20 1988
-gmtime: Sat Dec 31 09:00:20 1988
-
-rtems_clock_get 09:00:25 12/31/1988
-gettimeofday: Sat Dec 31 09:00:25 1988
-time: Sat Dec 31 09:00:25 1988
-localtime: Sat Dec 31 09:00:25 1988
-gmtime: Sat Dec 31 09:00:25 1988
-
-rtems_clock_set 23:55:59 12/31/1999
-rtems_clock_get 23:55:59 12/31/1999
-gettimeofday: Fri Dec 31 23:55:59 1999
-time: Fri Dec 31 23:55:59 1999
-localtime: Fri Dec 31 23:55:59 1999
-gmtime: Fri Dec 31 23:55:59 1999
-
-rtems_clock_get 23:56:04 12/31/1999
-gettimeofday: Fri Dec 31 23:56:04 1999
-time: Fri Dec 31 23:56:04 1999
-localtime: Fri Dec 31 23:56:04 1999
-gmtime: Fri Dec 31 23:56:04 1999
-
-rtems_clock_get 23:56:09 12/31/1999
-gettimeofday: Fri Dec 31 23:56:09 1999
-time: Fri Dec 31 23:56:09 1999
-localtime: Fri Dec 31 23:56:09 1999
-gmtime: Fri Dec 31 23:56:09 1999
-
-rtems_clock_get 23:56:14 12/31/1999
-gettimeofday: Fri Dec 31 23:56:14 1999
-time: Fri Dec 31 23:56:14 1999
-localtime: Fri Dec 31 23:56:14 1999
-gmtime: Fri Dec 31 23:56:14 1999
-
-rtems_clock_get 23:56:19 12/31/1999
-gettimeofday: Fri Dec 31 23:56:19 1999
-time: Fri Dec 31 23:56:19 1999
-localtime: Fri Dec 31 23:56:19 1999
-gmtime: Fri Dec 31 23:56:19 1999
-
-rtems_clock_get 23:56:24 12/31/1999
-gettimeofday: Fri Dec 31 23:56:24 1999
-time: Fri Dec 31 23:56:24 1999
-localtime: Fri Dec 31 23:56:24 1999
-gmtime: Fri Dec 31 23:56:24 1999
-
-rtems_clock_set 00:01:30 06/30/1999
-rtems_clock_get 00:01:30 06/30/1999
-gettimeofday: Wed Jun 30 00:01:30 1999
-time: Wed Jun 30 00:01:30 1999
-localtime: Wed Jun 30 00:01:30 1999
-gmtime: Wed Jun 30 00:01:30 1999
-
-rtems_clock_get 00:01:35 06/30/1999
-gettimeofday: Wed Jun 30 00:01:35 1999
-time: Wed Jun 30 00:01:35 1999
-localtime: Wed Jun 30 00:01:35 1999
-gmtime: Wed Jun 30 00:01:35 1999
-
-rtems_clock_get 00:01:40 06/30/1999
-gettimeofday: Wed Jun 30 00:01:40 1999
-time: Wed Jun 30 00:01:40 1999
-localtime: Wed Jun 30 00:01:40 1999
-gmtime: Wed Jun 30 00:01:40 1999
-
-rtems_clock_get 00:01:45 06/30/1999
-gettimeofday: Wed Jun 30 00:01:45 1999
-time: Wed Jun 30 00:01:45 1999
-localtime: Wed Jun 30 00:01:45 1999
-gmtime: Wed Jun 30 00:01:45 1999
-
-rtems_clock_get 00:01:50 06/30/1999
-gettimeofday: Wed Jun 30 00:01:50 1999
-time: Wed Jun 30 00:01:50 1999
-localtime: Wed Jun 30 00:01:50 1999
-gmtime: Wed Jun 30 00:01:50 1999
-
-rtems_clock_get 00:01:55 06/30/1999
-gettimeofday: Wed Jun 30 00:01:55 1999
-time: Wed Jun 30 00:01:55 1999
-localtime: Wed Jun 30 00:01:55 1999
-gmtime: Wed Jun 30 00:01:55 1999
-
-rtems_clock_set 00:15:59 01/01/2000
-rtems_clock_get 00:15:59 01/01/2000
-gettimeofday: Sat Jan 01 00:15:59 2000
-time: Sat Jan 01 00:15:59 2000
-localtime: Sat Jan 01 00:15:59 2000
-gmtime: Sat Jan 01 00:15:59 2000
-
-rtems_clock_get 00:16:04 01/01/2000
-gettimeofday: Sat Jan 01 00:16:04 2000
-time: Sat Jan 01 00:16:04 2000
-localtime: Sat Jan 01 00:16:04 2000
-gmtime: Sat Jan 01 00:16:04 2000
-
-rtems_clock_get 00:16:09 01/01/2000
-gettimeofday: Sat Jan 01 00:16:09 2000
-time: Sat Jan 01 00:16:09 2000
-localtime: Sat Jan 01 00:16:09 2000
-gmtime: Sat Jan 01 00:16:09 2000
-
-rtems_clock_get 00:16:14 01/01/2000
-gettimeofday: Sat Jan 01 00:16:14 2000
-time: Sat Jan 01 00:16:14 2000
-localtime: Sat Jan 01 00:16:14 2000
-gmtime: Sat Jan 01 00:16:14 2000
-
-rtems_clock_get 00:16:19 01/01/2000
-gettimeofday: Sat Jan 01 00:16:19 2000
-time: Sat Jan 01 00:16:19 2000
-localtime: Sat Jan 01 00:16:19 2000
-gmtime: Sat Jan 01 00:16:19 2000
-
-rtems_clock_get 00:16:24 01/01/2000
-gettimeofday: Sat Jan 01 00:16:24 2000
-time: Sat Jan 01 00:16:24 2000
-localtime: Sat Jan 01 00:16:24 2000
-gmtime: Sat Jan 01 00:16:24 2000
-
-rtems_clock_set 05:10:59 02/02/2005
-rtems_clock_get 05:10:59 02/02/2005
-gettimeofday: Wed Feb 02 05:10:59 2005
-time: Wed Feb 02 05:10:59 2005
-localtime: Wed Feb 02 05:10:59 2005
-gmtime: Wed Feb 02 05:10:59 2005
-
-rtems_clock_get 05:11:04 02/02/2005
-gettimeofday: Wed Feb 02 05:11:04 2005
-time: Wed Feb 02 05:11:04 2005
-localtime: Wed Feb 02 05:11:04 2005
-gmtime: Wed Feb 02 05:11:04 2005
-
-rtems_clock_get 05:11:09 02/02/2005
-gettimeofday: Wed Feb 02 05:11:09 2005
-time: Wed Feb 02 05:11:09 2005
-localtime: Wed Feb 02 05:11:09 2005
-gmtime: Wed Feb 02 05:11:09 2005
-
-rtems_clock_get 05:11:14 02/02/2005
-gettimeofday: Wed Feb 02 05:11:14 2005
-time: Wed Feb 02 05:11:14 2005
-localtime: Wed Feb 02 05:11:14 2005
-gmtime: Wed Feb 02 05:11:14 2005
-
-rtems_clock_get 05:11:19 02/02/2005
-gettimeofday: Wed Feb 02 05:11:19 2005
-time: Wed Feb 02 05:11:19 2005
-localtime: Wed Feb 02 05:11:19 2005
-gmtime: Wed Feb 02 05:11:19 2005
-
-rtems_clock_get 05:11:24 02/02/2005
-gettimeofday: Wed Feb 02 05:11:24 2005
-time: Wed Feb 02 05:11:24 2005
-localtime: Wed Feb 02 05:11:24 2005
-gmtime: Wed Feb 02 05:11:24 2005
-
-rtems_clock_set 10:05:59 03/03/2010
-rtems_clock_get 10:05:59 03/03/2010
-gettimeofday: Wed Mar 03 10:05:59 2010
-time: Wed Mar 03 10:05:59 2010
-localtime: Wed Mar 03 10:05:59 2010
-gmtime: Wed Mar 03 10:05:59 2010
-
-rtems_clock_get 10:06:04 03/03/2010
-gettimeofday: Wed Mar 03 10:06:04 2010
-time: Wed Mar 03 10:06:04 2010
-localtime: Wed Mar 03 10:06:04 2010
-gmtime: Wed Mar 03 10:06:04 2010
-
-rtems_clock_get 10:06:09 03/03/2010
-gettimeofday: Wed Mar 03 10:06:09 2010
-time: Wed Mar 03 10:06:09 2010
-localtime: Wed Mar 03 10:06:09 2010
-gmtime: Wed Mar 03 10:06:09 2010
-
-rtems_clock_get 10:06:14 03/03/2010
-gettimeofday: Wed Mar 03 10:06:14 2010
-time: Wed Mar 03 10:06:14 2010
-localtime: Wed Mar 03 10:06:14 2010
-gmtime: Wed Mar 03 10:06:14 2010
-
-rtems_clock_get 10:06:19 03/03/2010
-gettimeofday: Wed Mar 03 10:06:19 2010
-time: Wed Mar 03 10:06:19 2010
-localtime: Wed Mar 03 10:06:19 2010
-gmtime: Wed Mar 03 10:06:19 2010
-
-rtems_clock_get 10:06:24 03/03/2010
-gettimeofday: Wed Mar 03 10:06:24 2010
-time: Wed Mar 03 10:06:24 2010
-localtime: Wed Mar 03 10:06:24 2010
-gmtime: Wed Mar 03 10:06:24 2010
-
-rtems_clock_set 15:00:59 04/04/2020
-rtems_clock_get 15:00:59 04/04/2020
-gettimeofday: Sat Apr 04 15:00:59 2020
-time: Sat Apr 04 15:00:59 2020
-localtime: Sat Apr 04 15:00:59 2020
-gmtime: Sat Apr 04 15:00:59 2020
-
-rtems_clock_get 15:01:04 04/04/2020
-gettimeofday: Sat Apr 04 15:01:04 2020
-time: Sat Apr 04 15:01:04 2020
-localtime: Sat Apr 04 15:01:04 2020
-gmtime: Sat Apr 04 15:01:04 2020
-
-rtems_clock_get 15:01:09 04/04/2020
-gettimeofday: Sat Apr 04 15:01:09 2020
-time: Sat Apr 04 15:01:09 2020
-localtime: Sat Apr 04 15:01:09 2020
-gmtime: Sat Apr 04 15:01:09 2020
-
-rtems_clock_get 15:01:14 04/04/2020
-gettimeofday: Sat Apr 04 15:01:14 2020
-time: Sat Apr 04 15:01:14 2020
-localtime: Sat Apr 04 15:01:14 2020
-gmtime: Sat Apr 04 15:01:14 2020
-
-rtems_clock_get 15:01:19 04/04/2020
-gettimeofday: Sat Apr 04 15:01:19 2020
-time: Sat Apr 04 15:01:19 2020
-localtime: Sat Apr 04 15:01:19 2020
-gmtime: Sat Apr 04 15:01:19 2020
-
-rtems_clock_get 15:01:24 04/04/2020
-gettimeofday: Sat Apr 04 15:01:24 2020
-time: Sat Apr 04 15:01:24 2020
-localtime: Sat Apr 04 15:01:24 2020
-gmtime: Sat Apr 04 15:01:24 2020
-
-
-
-*** END OF TIME OF DAY TEST 01 ***
diff --git a/testsuites/psxtests/psxtime/test.c b/testsuites/psxtests/psxtime/test.c
deleted file mode 100644
index e21eb2da9e..0000000000
--- a/testsuites/psxtests/psxtime/test.c
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * This test exercises the time of day services via the Classic
- * and POSIX APIs to make sure they are consistent.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-#include <assert.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <errno.h>
-#include <string.h>
-#include <rtems.h>
-#include <rtems/libio.h>
-
-/*
- * List of dates and times to test.
- */
-#define NUMBER_OF_DATES 8
-rtems_time_of_day Dates[ NUMBER_OF_DATES ] = {
- /* YEAR, MONTH, DAY, HOUR, MINUTE, SECOND, TICKS */
- { 1988, 1, 1, 12, 45, 00, 0 },
- { 1988, 12, 31, 9, 00, 00, 0 },
- { 1999, 12, 31, 23, 55, 59, 0 },
- { 1999, 06, 30, 00, 01, 30, 0 },
- { 2000, 1, 1, 0, 15, 59, 0 },
- { 2005, 2, 2, 5, 10, 59, 0 },
- { 2010, 3, 3, 10, 5, 59, 0 },
- { 2020, 4, 4, 15, 0, 59, 0 },
-};
-
-/*
- * Check out a single date and time
- */
-
-void check_a_tod(
- rtems_time_of_day *the_tod
-)
-{
- rtems_status_code status;
- rtems_time_of_day new_tod;
- time_t a_time_t;
- struct timeval tv;
- struct tm *a_tm;
- int result;
- int i = 0;
-
- print_time( "rtems_clock_set ", the_tod, "\n" );
- status = rtems_clock_set( the_tod );
- assert( !status );
-
- do {
- status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &new_tod );
- assert( !status );
- print_time( "rtems_clock_get ", &new_tod, "\n" );
-
- /* now do the posix time gets */
- result = gettimeofday( &tv, 0 );
- assert( result == 0 );
- a_time_t = tv.tv_sec; /* ctime() takes a time_t */
- printf( "gettimeofday: %s", ctime( &a_time_t) );
-
- a_time_t = time( 0 );
- printf( "time: %s", ctime( &a_time_t ) );
-
- a_tm = localtime( &a_time_t );
- printf( "localtime: %s", asctime( a_tm ) );
-
- a_tm = gmtime( &a_time_t );
- printf( "gmtime: %s\n", asctime( a_tm ) );
-
- status = rtems_task_wake_after( 5 * TICKS_PER_SECOND );
-
- i++;
-
- } while( i < 6 );
-}
-
-/*
- * main entry point to the test
- */
-
-#if defined(__rtems__)
-int test_main(void)
-#else
-int main(
- int argc,
- char **argv
-)
-#endif
-{
- int i;
-
- puts( "\n\n*** POSIX TIME OF DAY TEST ***" );
-
- i = 0;
- while ( i < NUMBER_OF_DATES ) {
- check_a_tod( &Dates[i] );
- i++;
- }
-
- puts( "\n\n*** END OF TIME OF DAY TEST 01 ***" );
- exit(0);
-}
-
diff --git a/testsuites/psxtests/psxtimer/Makefile.am b/testsuites/psxtests/psxtimer/Makefile.am
deleted file mode 100644
index 7498d8514d..0000000000
--- a/testsuites/psxtests/psxtimer/Makefile.am
+++ /dev/null
@@ -1,43 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = psxtimer
-
-MANAGERS = all
-
-C_FILES = psxtimer.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS = $(H_FILES)
-
-DOCTYPES = scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/psxtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CPPFLAGS = -I$(top_srcdir)/include
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/psxtests/psxtimer/psxtimer.c b/testsuites/psxtests/psxtimer/psxtimer.c
deleted file mode 100644
index 844ede1caa..0000000000
--- a/testsuites/psxtests/psxtimer/psxtimer.c
+++ /dev/null
@@ -1,337 +0,0 @@
-/*
- *
- * This is a simple real-time applications which contains 3 periodic tasks.
- *
- * Task A is an independent task.
- *
- * Task B and C share a data.
- *
- * Tasks are implemented as POSIX threads.
- *
- * The share data is protected with a POSIX mutex.
- *
- * Other POSIX facilities such as timers, condition, .. is also used
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define CONFIGURE_INIT
-#include "system.h"
-#include <pthread.h> /* thread facilities */
-#include <signal.h> /* signal facilities */
-#include <unistd.h> /* sleep facilities */
-#include <sched.h> /* schedule facilities */
-#include <time.h> /* time facilities */
-#include <stdio.h> /* console facilities */
-
-
-
-/* temporal parameters of a task */
-
-struct periodic_params {
- struct timespec period;
- int signo; /* signal number */
- int id; /* task identification */
- };
-
-pthread_attr_t attr;
-
-/* shared datum */
-
-struct shared_data {
- pthread_mutex_t mutex;
- pthread_cond_t sync;
- int updated;
- int x;
- };
-
-struct shared_data data;
-
-/* task A */
-
-void * task_a (void *arg)
-{
- struct timespec my_period;
- int my_sig, received_sig;
- struct itimerspec timerdata;
- timer_t timer_id;
- time_t clock;
- struct sigevent event;
- sigset_t set;
-
- my_period = ((struct periodic_params*) arg)->period;
- my_sig = ((struct periodic_params*) arg)->signo;
-
- /* timer create */
- event.sigev_notify = SIGEV_SIGNAL;
- event.sigev_signo = my_sig;
- if (timer_create (CLOCK_REALTIME, &event, &timer_id) == -1) {
- perror ("Error in timer creation\n");
- pthread_exit ((void *) -1);
- }
-
- /* block the timer signal */
- sigemptyset (&set);
- sigaddset (&set,my_sig);
- pthread_sigmask(SIG_BLOCK,&set,NULL);
-
- /* set the timer in periodic mode */
- timerdata.it_interval = my_period;
- timerdata.it_value = my_period;
- if (timer_settime(timer_id, 0, &timerdata, NULL) == -1) {
- perror ("Error in timer setting\n");
- pthread_exit ((void *) -1);
- }
-
- /* periodic activity */
- while(1) {
- if (sigwait(&set,&received_sig) == -1) {
- perror ("Error in sigwait\n");
- }
- clock = time(NULL);
- printf("Executing task A %s", ctime(&clock));
- }
- }
-
-/* task B */
-
-void * task_b (void *arg)
-{
- struct timespec my_period;
- int my_sig, received_sig;
- struct itimerspec timerdata;
- timer_t timer_id;
- time_t clock;
- struct sigevent event;
- sigset_t set;
-
- int x; /* value to be copied to the shared datum */
-
- my_period = ((struct periodic_params*) arg)->period;
- my_sig = ((struct periodic_params*) arg)->signo;
-
- x = 1;
-
- /* timer create */
- event.sigev_notify = SIGEV_SIGNAL;
- event.sigev_signo = my_sig;
- if (timer_create (CLOCK_REALTIME, &event, &timer_id) == -1) {
- perror ("Error in timer creation\n");
- pthread_exit ((void *) -1);
- }
-
- /* block the timer signal */
- sigemptyset (&set);
- sigaddset (&set,my_sig);
- pthread_sigmask(SIG_BLOCK,&set,NULL);
-
- /* set the timer in periodic mode */
- timerdata.it_interval = my_period;
- timerdata.it_value = my_period;
- if (timer_settime(timer_id, 0, &timerdata, NULL) == -1) {
- perror ("Error in timer setting\n");
- pthread_exit ((void *) -1);
- }
-
- /* periodic activity */
- while(1) {
- if (sigwait(&set,&received_sig) == -1) {
- perror ("Error in sigwait\n");
- pthread_exit ((void *) -1);
- }
- pthread_mutex_lock (&data.mutex);
- clock = time(NULL);
- printf("Executing task B with x = %i %s", x, ctime(&clock));
- data.x = x;
- data.updated = TRUE;
- pthread_cond_signal (&data.sync);
- pthread_mutex_unlock (&data.mutex);
- x++;
- }
-}
-
-/* task C */
-
-void * task_c (void *arg)
-{
- struct timespec my_period;
- int my_sig, received_sig;
- struct itimerspec timerdata;
- timer_t timer_id;
- time_t clock;
- struct sigevent event;
- sigset_t set;
-
- int x; /* value to be copied to the shared datum */
-
- my_period = ((struct periodic_params*) arg)->period;
- my_sig = ((struct periodic_params*) arg)->signo;
-
- x = 0;
-
- /* timer create */
- event.sigev_notify = SIGEV_SIGNAL;
- event.sigev_signo = my_sig;
- if (timer_create (CLOCK_REALTIME, &event, &timer_id) == -1) {
- perror ("Error in timer creation\n");
- pthread_exit ((void *) -1);
- }
-
- /* block the timer signal */
- sigemptyset (&set);
- sigaddset (&set,my_sig);
- pthread_sigmask(SIG_BLOCK,&set,NULL);
-
- /* set the timer in periodic mode */
- timerdata.it_interval = my_period;
- timerdata.it_value = my_period;
- if (timer_settime(timer_id, 0, &timerdata, NULL) == -1) {
- perror ("Error in timer setting\n");
- pthread_exit ((void *) -1);
- }
-
- /* periodic activity */
- while(1) {
- if (sigwait(&set,&received_sig) == -1) {
- perror ("Error in sigwait\n");
- pthread_exit ((void *) -1);
- }
- pthread_mutex_lock (&data.mutex);
- while (data.updated == FALSE) {
- pthread_cond_wait (&data.sync,&data.mutex);
- }
- x = data.x;
- clock = time(NULL);
- printf("Executing task C with x = %i %s", x, ctime(&clock));
- pthread_mutex_unlock (&data.mutex);
- }
- }
-
-
-/* main */
-
-void *POSIX_Init (
- void *argument
-)
-
-{
- pthread_mutexattr_t mutexattr; /* mutex attributes */
- pthread_condattr_t condattr; /* condition attributes */
- pthread_attr_t attr; /* task attributes */
- pthread_t ta,tb,tc; /* threads */
- sigset_t set; /* signals */
-
- struct sched_param sch_param; /* schedule parameters */
- struct periodic_params params_a, params_b, params_c;
-
- puts( "\n\n*** POSIX Timers Test ***" );
-
- data.updated = FALSE;
- data.x = 0;
-
- /* mask signal */
- sigemptyset (&set);
- sigaddset (&set,SIGALRM);
- pthread_sigmask (SIG_BLOCK,&set,NULL);
-
- /* set mutex attributes */
- if (pthread_mutexattr_init (&mutexattr) != 0) {
- perror ("Error in mutex attribute init\n");
- }
-
- /* init mutex */
- if (pthread_mutex_init (&data.mutex,&mutexattr) != 0) {
- perror ("Error in mutex init");
- }
-
- /* init condition attributes */
- if (pthread_condattr_init (&condattr) != 0) {
- perror ("Error in condition attribute init\n");
- }
-
- /* init condition */
- if (pthread_cond_init (&data.sync,&condattr) != 0) {
- perror ("Error in condition init");
- }
-
- /* init task attributes */
- if (pthread_attr_init(&attr) != 0) {
- perror ("Error in attribute init\n");
- }
-
- /* set explicit schedule for every task */
- if (pthread_attr_setinheritsched (&attr,
- PTHREAD_EXPLICIT_SCHED) != 0) {
- perror("Error in attribute inheritsched\n");
- }
-
- /* set task independent (join will not use) */
- if (pthread_attr_setdetachstate (&attr,
- PTHREAD_CREATE_DETACHED) != 0) {
- perror ("Error in attribute detachstate\n");
- }
-
- /* schedule policy POSIX_FIFO (priority preemtive and FIFO within the same
- priority) */
- if (pthread_attr_setschedpolicy (&attr,
- SCHED_FIFO) != 0) {
- perror ("Error in attribute setschedpolicy\n");
- }
-
- /* set and create thread A with priority 1 */
-
- sch_param.sched_priority = 1;
- if (pthread_attr_setschedparam(&attr, &sch_param) != 0) {
- perror ("Error in attribute schedparam\n");
- }
-
- /* Temporal parameters (1 sec. periodicity) */
-
- params_a.period.tv_sec = 1; /* seconds */
- params_a.period.tv_nsec = 000000000; /* nanoseconds */
- params_a.signo = SIGALRM;
- if (pthread_create (&ta, &attr, task_a, &params_a) != 0 ) {
- perror ("Error in thread create for task a\n");
- }
-
- /* set and create thread B with priority 15 */
-
- sch_param.sched_priority = 15;
- if (pthread_attr_setschedparam(&attr, &sch_param) != 0) {
- perror ("Error in attribute schedparam");
- }
-
- /* Temporal parameters (2 sec. periodicity) */
- params_b.period.tv_sec = 2; /* seconds */
- params_b.period.tv_nsec = 000000000; /* nanoseconds */
- params_b.signo = SIGALRM;
- if (pthread_create (&tb, &attr, task_b, &params_b) != 0) {
- perror ("Error in thread create for task b\n");
- }
-
- /* set and create thread B with priority 14 */
-
- sch_param.sched_priority = 14;
- if (pthread_attr_setschedparam(&attr, &sch_param) != 0 ) {
- perror ("Error in attribute schedparam\n");
- }
-
- /* Temporal parameters (3 sec. periodicity) */
- params_c.period.tv_sec = 3; /* seconds */
- params_c.period.tv_nsec = 000000000; /* nanoseconds */
- params_c.signo = SIGALRM;
- if (pthread_create (&tc, &attr, task_c, &params_c) != 0) {
- perror ("Error in trhead create for task c\n");
- }
-
-
- /* execute 20 seconds and finish */
- sleep (20);
- puts( "\n\n*** End of POSIX Timers Test ***" );
- exit (0);
- }
-
diff --git a/testsuites/psxtests/psxtimer/psxtimer.scn b/testsuites/psxtests/psxtimer/psxtimer.scn
deleted file mode 100644
index 95f32724ca..0000000000
--- a/testsuites/psxtests/psxtimer/psxtimer.scn
+++ /dev/null
@@ -1,38 +0,0 @@
-*** POSIX Timers Test ***
-Executing task A Fri Jan 01 00:00:01 1988
-Executing task A Fri Jan 01 00:00:02 1988
-Executing task B with x = 1 Fri Jan 01 00:00:02 1988
-Executing task A Fri Jan 01 00:00:03 1988
-Executing task C with x = 1 Fri Jan 01 00:00:03 1988
-Executing task A Fri Jan 01 00:00:04 1988
-Executing task B with x = 2 Fri Jan 01 00:00:04 1988
-Executing task A Fri Jan 01 00:00:05 1988
-Executing task A Fri Jan 01 00:00:06 1988
-Executing task B with x = 3 Fri Jan 01 00:00:06 1988
-Executing task C with x = 3 Fri Jan 01 00:00:06 1988
-Executing task A Fri Jan 01 00:00:07 1988
-Executing task A Fri Jan 01 00:00:08 1988
-Executing task B with x = 4 Fri Jan 01 00:00:08 1988
-Executing task A Fri Jan 01 00:00:09 1988
-Executing task C with x = 4 Fri Jan 01 00:00:09 1988
-Executing task A Fri Jan 01 00:00:10 1988
-Executing task B with x = 5 Fri Jan 01 00:00:10 1988
-Executing task A Fri Jan 01 00:00:11 1988
-Executing task A Fri Jan 01 00:00:12 1988
-Executing task B with x = 6 Fri Jan 01 00:00:12 1988
-Executing task C with x = 6 Fri Jan 01 00:00:12 1988
-Executing task A Fri Jan 01 00:00:13 1988
-Executing task A Fri Jan 01 00:00:14 1988
-Executing task B with x = 7 Fri Jan 01 00:00:14 1988
-Executing task A Fri Jan 01 00:00:15 1988
-Executing task C with x = 7 Fri Jan 01 00:00:15 1988
-Executing task A Fri Jan 01 00:00:16 1988
-Executing task B with x = 8 Fri Jan 01 00:00:16 1988
-Executing task A Fri Jan 01 00:00:17 1988
-Executing task A Fri Jan 01 00:00:18 1988
-Executing task B with x = 9 Fri Jan 01 00:00:18 1988
-Executing task C with x = 9 Fri Jan 01 00:00:18 1988
-Executing task A Fri Jan 01 00:00:19 1988
-Executing task A Fri Jan 01 00:00:20 1988
-Executing task B with x = 10 Fri Jan 01 00:00:20 1988
-*** End of POSIX Timers Test ***
diff --git a/testsuites/psxtests/psxtimer/system.h b/testsuites/psxtests/psxtimer/system.h
deleted file mode 100644
index 9b6fe33dee..0000000000
--- a/testsuites/psxtests/psxtimer/system.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * system.h,v 1.9 1996/08/09 18:48:33 joel Exp
- */
-
-/* functions */
-
-#include <pmacros.h>
-#include <unistd.h>
-#include <errno.h>
-#include <sched.h>
-
-void *POSIX_Init (
- void *arg
-);
-
-void *task_a(
- void *arg
-);
-
-void *task_b(
- void *arg
-);
-
-void *task_c(
- void *arg
-);
-
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 4
-
-#define CONFIGURE_MAXIMUM_POSIX_TIMERS 4
-
-#define CONFIGURE_MAXIMUM_TIMERS 4
-
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 2
-
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 2
-
-
-#include <confdefs.h>
-
-/* global variables */
-
-#ifdef CONFIGURE_INIT
-#define TEST_EXTERN
-#else
-#define TEST_EXTERN extern
-#endif
-
-TEST_EXTERN pthread_t Init_id;
-TEST_EXTERN pthread_t Task_id;
-
-/* end of include file */
diff --git a/testsuites/samples/Makefile.am b/testsuites/samples/Makefile.am
deleted file mode 100644
index e8c84121ac..0000000000
--- a/testsuites/samples/Makefile.am
+++ /dev/null
@@ -1,24 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-
-CPLUSPLUS_TESTS = cdtest
-
-## base_mp is a sample multiprocessing test
-MP_TESTS = base_mp
-
-FP_TESTS = paranoia
-
-SUBDIRS = hello ticker base_sp unlimited minimum $(MP_TESTS) \
- $(CPLUSPLUS_TESTS) $(FP_TESTS)
-
-AUTOMAKE_FILES = \
-sample.am
-
-EXTRA_DIST = $(AUTOMAKE_FILES)
-
-include $(top_srcdir)/../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/samples/README b/testsuites/samples/README
deleted file mode 100644
index 9a94a9b0fd..0000000000
--- a/testsuites/samples/README
+++ /dev/null
@@ -1,72 +0,0 @@
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-# $Id$
-#
-
-This directory contains the RTEMS Sample Application Suite.
-The tests in this directory perform two functions:
-
- + provide simple examples of applications which can be
- used as a starting point for your application.
-
- + help test a new board support package
-
-The hello and ticker applications are useful when first bringing up
-a new board support package. The base_mp test is useful when
-performing initial checkout on a new MPCI layer.
-
-The following describes each of the sample applications:
-
- base_mp
-
- This is a very simple two node multiprocessor application. It consists
- of a single initialization task on each node which print out
- their respective node numbers and task IDs. This test can be
- used as a simple test of a new MPCI layer because it minimizes
- the number of packets sent by RTEMS.
-
- This is intended as a starting point for custom developed multiprocessor
- applications.
-
- base_sp
-
- This is a simple single processor application which consists of
- an initialization task which creates another task.
-
- This is intended as a starting point for custom developed single
- processor applications.
-
- cdtest
-
- A very simple C++ application which demonstrates that it is
- possible to use C++ contructors and destructors in an RTEMS
- application. Also does a perfunctory iostream test.
-
- hello
-
- This is the RTEMS version of the classic hello world program.
- It consists of single initialization task which prints out
- a few messages.
-
- This test does not include a Clock Tick device driver and can
- be used to test the startup code of the board support package
- as well as console output.
-
- paranoia
-
- A public domain test of the floating point and math library
- capabilities of a toolset. It reports discrepancies between
- actual and expected results. It is a large test.
-
- ticker
-
- This is a simple test of the user's Clock Tick device driver.
- This test has an initialization task create three application
- tasks which sleep and periodically wake up and print the time.
-
diff --git a/testsuites/samples/base_mp/Makefile.am b/testsuites/samples/base_mp/Makefile.am
deleted file mode 100644
index 7f17c2b0a8..0000000000
--- a/testsuites/samples/base_mp/Makefile.am
+++ /dev/null
@@ -1,12 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-SUBDIRS = node1 node2
-
-EXTRA_DIST = apptask.c init.c system.h
-
-include $(top_srcdir)/../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/samples/base_mp/apptask.c b/testsuites/samples/base_mp/apptask.c
deleted file mode 100644
index 5303b180d4..0000000000
--- a/testsuites/samples/base_mp/apptask.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Application_task
- *
- * This routine is as an example of an application task which
- * prints a message including its RTEMS task id. This task
- * then invokes exit to return to the monitor.
- *
- * Input parameters:
- * node - processor's node number
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Application_task(
- rtems_task_argument node
-)
-{
- rtems_id tid;
- rtems_status_code status;
-
- status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
- printf( "This task was invoked with the node argument (%d)\n", node );
- printf( "This task has the id of 0x%x\n", tid );
- printf( "*** END OF SAMPLE MULTIPROCESSOR APPLICATION ***\n" );
- exit( 0 );
-}
diff --git a/testsuites/samples/base_mp/init.c b/testsuites/samples/base_mp/init.c
deleted file mode 100644
index d47113d832..0000000000
--- a/testsuites/samples/base_mp/init.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is called from init_exec and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the application, the current time might be
- * set by this task.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_name task_name;
- rtems_id tid;
- rtems_status_code status;
-
- printf( "\n\n*** SAMPLE MULTIPROCESSOR APPLICATION ***\n" );
- printf( "Creating and starting an application task\n" );
- task_name = rtems_build_name( 'T', 'A', '1', ' ' );
- status = rtems_task_create( task_name, 1, RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_INTERRUPT_LEVEL(0), RTEMS_DEFAULT_ATTRIBUTES, &tid );
- status = rtems_task_start(
- tid,
- Application_task,
- Multiprocessing_configuration.node
- );
- status = rtems_task_delete( RTEMS_SELF );
-}
diff --git a/testsuites/samples/base_mp/node1/Makefile.am b/testsuites/samples/base_mp/node1/Makefile.am
deleted file mode 100644
index fdf0db6e15..0000000000
--- a/testsuites/samples/base_mp/node1/Makefile.am
+++ /dev/null
@@ -1,50 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-VPATH = @srcdir@:@srcdir@/..
-
-NODE = 1
-SAMPLE = base_mp-node$(NODE)
-PGM = ${ARCH}/$(SAMPLE).exe
-
-MANAGERS = io mp
-
-C_FILES = init.c apptask.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=base_mp.%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/sample.am
-
-if HAS_MP
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -DNODE_NUMBER=$(NODE) -I.
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-else
-all-local:
-endif
-
-EXTRA_DIST = $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/samples/base_mp/node1/base_mp.doc b/testsuites/samples/base_mp/node1/base_mp.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/samples/base_mp/node1/base_mp.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/samples/base_mp/node1/base_mp.scn b/testsuites/samples/base_mp/node1/base_mp.scn
deleted file mode 100644
index a2d2f359be..0000000000
--- a/testsuites/samples/base_mp/node1/base_mp.scn
+++ /dev/null
@@ -1,5 +0,0 @@
-*** SAMPLE MULTIPROCESSOR APPLICATION ***
-Creating and starting an application task
-This task was invoked with the node argument (1)
-This task has the id of 0x10002
-*** END OF SAMPLE MULTIPROCESSOR APPLICATION ***
diff --git a/testsuites/samples/base_mp/node2/Makefile.am b/testsuites/samples/base_mp/node2/Makefile.am
deleted file mode 100644
index acfe772653..0000000000
--- a/testsuites/samples/base_mp/node2/Makefile.am
+++ /dev/null
@@ -1,50 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-VPATH = @srcdir@:@srcdir@/..
-
-NODE = 2
-SAMPLE = base_mp-node$(NODE)
-PGM = ${ARCH}/$(SAMPLE).exe
-
-MANAGERS = io mp
-
-C_FILES = init.c apptask.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=base_mp.%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/sample.am
-
-if HAS_MP
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -DNODE_NUMBER=$(NODE) -I.
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-else
-all-local:
-endif
-
-EXTRA_DIST = $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/samples/base_mp/node2/base_mp.doc b/testsuites/samples/base_mp/node2/base_mp.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/samples/base_mp/node2/base_mp.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/samples/base_mp/node2/base_mp.scn b/testsuites/samples/base_mp/node2/base_mp.scn
deleted file mode 100644
index 95bc96a808..0000000000
--- a/testsuites/samples/base_mp/node2/base_mp.scn
+++ /dev/null
@@ -1,5 +0,0 @@
-*** SAMPLE MULTIPROCESSOR APPLICATION ***
-Creating and starting an application task
-This task was invoked with the node argument (2)
-This task has the id of 0x20002
-*** END OF SAMPLE MULTIPROCESSOR APPLICATION ***
diff --git a/testsuites/samples/base_mp/system.h b/testsuites/samples/base_mp/system.h
deleted file mode 100644
index b45fe15bd9..0000000000
--- a/testsuites/samples/base_mp/system.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_task Application_task(
- rtems_task_argument argument
-);
-
-/* configuration information */
-
-#define CONFIGURE_MPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-/*
- * Put the overrides of default configuration parameters here.
- */
-
-#include <confdefs.h>
-
-/* variables */
-
-TEST_EXTERN rtems_id Global_variable; /* example global variable */
-
-/* end of include file */
diff --git a/testsuites/samples/base_sp/Makefile.am b/testsuites/samples/base_sp/Makefile.am
deleted file mode 100644
index 2add0e0096..0000000000
--- a/testsuites/samples/base_sp/Makefile.am
+++ /dev/null
@@ -1,41 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-SAMPLE = base_sp
-PGM = ${ARCH}/$(SAMPLE).exe
-
-MANAGERS = io
-
-C_FILES = init.c apptask.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS = $(H_FILES)
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(SAMPLE).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/sample.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-all-local: ${ARCH} $(TMPINSTALL_FILES)
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/samples/base_sp/apptask.c b/testsuites/samples/base_sp/apptask.c
deleted file mode 100644
index c7b6580fad..0000000000
--- a/testsuites/samples/base_sp/apptask.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Application_task
- *
- * This routine is as an example of an application task which
- * prints a message including its RTEMS task id. This task
- * then invokes exit to return to the monitor.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Application_task(
- rtems_task_argument argument
-)
-{
- rtems_id tid;
- rtems_status_code status;
-
- status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
-
- printf( "Application task was invoked with argument (%d) "
- "and has id of 0x%x\n", argument, tid );
-
- printf( "*** END OF SAMPLE SINGLE PROCESSOR APPLICATION ***\n" );
- exit( 0 );
-}
diff --git a/testsuites/samples/base_sp/base_sp.doc b/testsuites/samples/base_sp/base_sp.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/samples/base_sp/base_sp.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/samples/base_sp/base_sp.scn b/testsuites/samples/base_sp/base_sp.scn
deleted file mode 100644
index 117ddaecb8..0000000000
--- a/testsuites/samples/base_sp/base_sp.scn
+++ /dev/null
@@ -1,5 +0,0 @@
-*** SAMPLE SINGLE PROCESSOR APPLICATION ***
-Creating and starting an application task
-Application task was invoked with argument (0) and has id of 0x10002
-*** END OF SAMPLE SINGLE PROCESSOR APPLICATION ***
-
diff --git a/testsuites/samples/base_sp/init.c b/testsuites/samples/base_sp/init.c
deleted file mode 100644
index d787f0233e..0000000000
--- a/testsuites/samples/base_sp/init.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is called from init_exec and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the application, the current time might be
- * set by this task.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-#define ARGUMENT 0
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_name task_name;
- rtems_id tid;
- rtems_status_code status;
-
- printf( "\n\n*** SAMPLE SINGLE PROCESSOR APPLICATION ***\n" );
- printf( "Creating and starting an application task\n" );
-
- task_name = rtems_build_name( 'T', 'A', '1', ' ' );
-
- status = rtems_task_create( task_name, 1, RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_INTERRUPT_LEVEL(0), RTEMS_DEFAULT_ATTRIBUTES, &tid );
-
- status = rtems_task_start( tid, Application_task, ARGUMENT );
-
- status = rtems_task_delete( RTEMS_SELF );
-}
diff --git a/testsuites/samples/base_sp/system.h b/testsuites/samples/base_sp/system.h
deleted file mode 100644
index 25139380f6..0000000000
--- a/testsuites/samples/base_sp/system.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_task Application_task(
- rtems_task_argument argument
-);
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* global variables */
-
-TEST_EXTERN rtems_id Global_variable; /* example global variable */
-
-/* end of include file */
diff --git a/testsuites/samples/cdtest/Makefile.am b/testsuites/samples/cdtest/Makefile.am
deleted file mode 100644
index 0bdf792c92..0000000000
--- a/testsuites/samples/cdtest/Makefile.am
+++ /dev/null
@@ -1,52 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-SAMPLE = cdtest
-PGM = ${ARCH}/$(SAMPLE).exe
-
-MANAGERS = all
-
-C_FILES = init.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-CC_FILES = main.cc
-CC_O_FILES = $(CC_FILES:%.cc=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS = $(H_FILES)
-
-DOCTYPES = scn
-DOCS = $(DOCTYPES:%=$(SAMPLE).%)
-
-SRCS = $(DOCS) $(C_FILES) $(CC_FILES) $(H_FILES)
-OBJS = $(C_O_FILES) $(CC_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(SAMPLE).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/sample.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-if HAS_CXX
-LD_LIBS += $(CPLUS_LD_LIBS)
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: ${ARCH} $(TMPINSTALL_FILES)
-else
-all-local:
-endif
-
-EXTRA_DIST = $(C_FILES) $(CC_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/samples/cdtest/cdtest.scn b/testsuites/samples/cdtest/cdtest.scn
deleted file mode 100644
index a832a72372..0000000000
--- a/testsuites/samples/cdtest/cdtest.scn
+++ /dev/null
@@ -1,31 +0,0 @@
-Hey I'm in base class constructor number 1 for 0x400010cc.
-Hey I'm in base class constructor number 2 for 0x400010d4.
-Hey I'm in derived class constructor number 3 for 0x400010d4.
-
-
-*** CONSTRUCTOR/DESTRUCTOR TEST ***
-Hey I'm in base class constructor number 4 for 0x4009ee08.
-Hey I'm in base class constructor number 5 for 0x4009ee10.
-Hey I'm in base class constructor number 6 for 0x4009ee18.
-Hey I'm in base class constructor number 7 for 0x4009ee20.
-Hey I'm in derived class constructor number 8 for 0x4009ee20.
-Testing a C++ I/O stream
-Hey I'm in derived class destructor number 8 for 0x4009ee20.
-Derived class - Instantiation order 8
-Hey I'm in base class destructor number 7 for 0x4009ee20.
-Instantiation order 8
-Hey I'm in base class destructor number 6 for 0x4009ee18.
-Instantiation order 6
-Hey I'm in base class destructor number 5 for 0x4009ee10.
-Instantiation order 5
-Hey I'm in base class destructor number 4 for 0x4009ee08.
-Instantiation order 5
-*** END OF CONSTRUCTOR/DESTRUCTOR TEST ***
-
-
-Hey I'm in derived class destructor number 3 for 0x400010d4.
-Derived class - Instantiation order 3
-Hey I'm in base class destructor number 2 for 0x400010d4.
-Instantiation order 3
-Hey I'm in base class destructor number 1 for 0x400010cc.
-Instantiation order 1
diff --git a/testsuites/samples/cdtest/init.c b/testsuites/samples/cdtest/init.c
deleted file mode 100644
index 807cd9e5ab..0000000000
--- a/testsuites/samples/cdtest/init.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is called from init_exec and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-#include <stdio.h>
diff --git a/testsuites/samples/cdtest/main.cc b/testsuites/samples/cdtest/main.cc
deleted file mode 100644
index 5d6a8774a4..0000000000
--- a/testsuites/samples/cdtest/main.cc
+++ /dev/null
@@ -1,215 +0,0 @@
-/*
- * This routine is the initialization task for this test program.
- * It is called from init_exec and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1994 by Division Incorporated
- * Based in part on OAR works.
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- *
- * by Rosimildo da Silva:
- * Modified the test a bit to indicate when an instance is
- * global or not, and added code to test C++ exception.
- *
- *
- * $Id$
- */
-// #define RTEMS_TEST_IO_STREAM
-
-#include <rtems.h>
-#include <stdio.h>
-#include <stdlib.h>
-#ifdef RTEMS_TEST_IO_STREAM
-#include <iostream.h>
-#endif
-
-extern "C"
-{
-#include <tmacros.h>
-extern rtems_task main_task(rtems_task_argument);
-}
-
-static int num_inst = 0;
-
-class AClass {
-public:
- AClass(const char *p = "LOCAL" ) : ptr( p )
- {
- num_inst++;
- printf(
- "%s: Hey I'm in base class constructor number %d for %p.\n",
- p, num_inst, this
- );
-
- /*
- * Make sure we use some space
- */
-
- string = new char[50];
- sprintf(string, "Instantiation order %d", num_inst);
- };
-
- virtual ~AClass()
- {
- printf(
- "%s: Hey I'm in base class destructor number %d for %p.\n",
- ptr, num_inst, this
- );
- print();
- num_inst--;
- };
-
- virtual void print() { printf("%s\n", string); };
-
-protected:
- char *string;
- const char *ptr;
-};
-
-class BClass : public AClass {
-public:
- BClass(const char *p = "LOCAL" ) : AClass( p )
- {
- num_inst++;
- printf(
- "%s: Hey I'm in derived class constructor number %d for %p.\n",
- p, num_inst, this
- );
-
- /*
- * Make sure we use some space
- */
-
- string = new char[50];
- sprintf(string, "Instantiation order %d", num_inst);
- };
-
- ~BClass()
- {
- printf(
- "%s: Hey I'm in derived class destructor number %d for %p.\n",
- ptr, num_inst,
- this
- );
- print();
- num_inst--;
- };
-
- void print() { printf("Derived class - %s\n", string); }
-};
-
-
-class RtemsException
-{
-public:
-
- RtemsException( char *module, int ln, int err = 0 )
- : error( err ), line( ln ), file( module )
- {
- printf( "RtemsException raised=File:%s, Line:%d, Error=%X\n",
- file, line, error );
- }
-
- void show()
- {
- printf( "RtemsException ---> File:%s, Line:%d, Error=%X\n",
- file, line, error );
- }
-
-private:
- int error;
- int line;
- char *file;
-
-};
-
-
-
-AClass foo( "GLOBAL" );
-BClass foobar( "GLOBAL" );
-
-void
-cdtest(void)
-{
- AClass bar, blech, blah;
- BClass bleak;
-
-#ifdef RTEMS_TEST_IO_STREAM
- cout << "Testing a C++ I/O stream" << endl;
-#else
- printf("IO Stream not tested\n");
-#endif
- bar = blech;
- rtems_task_wake_after( 5 * get_ticks_per_second() );
-}
-
-//
-// main equivalent
-// It can not be called 'main' since the bsp owns that name
-// in many implementations in order to get global constructors
-// run.
-//
-
-static void foo_function()
-{
- try
- {
- throw "foo_function() throw this exception";
- }
- catch( const char *e )
- {
- printf( "foo_function() catch block called:\n < %s >\n", e );
- throw "foo_function() re-throwing execption...";
- }
-}
-
-rtems_task main_task(
- rtems_task_argument
-)
-{
- printf( "\n\n*** CONSTRUCTOR/DESTRUCTOR TEST ***\n" );
-
- cdtest();
-
- printf( "*** END OF CONSTRUCTOR/DESTRUCTOR TEST ***\n\n\n" );
-
-
- printf( "*** TESTING C++ EXCEPTIONS ***\n\n" );
-
- try
- {
- foo_function();
- }
- catch( const char *e )
- {
- printf( "Success catching a char * exception\n%s\n", e );
- }
- try
- {
- printf( "throw an instance based exception\n" );
- throw RtemsException( __FILE__, __LINE__, 0x55 );
- }
- catch( RtemsException & ex )
- {
- printf( "Success catching RtemsException...\n" );
- ex.show();
- }
- catch(...)
- {
- printf( "Caught another exception.\n" );
- }
- printf( "Exceptions are working properly.\n" );
- rtems_task_wake_after( 5 * get_ticks_per_second() );
- printf( "Global Dtors should be called after this line....\n" );
- exit(0);
-}
diff --git a/testsuites/samples/cdtest/system.h b/testsuites/samples/cdtest/system.h
deleted file mode 100644
index 234651fc69..0000000000
--- a/testsuites/samples/cdtest/system.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task main_task(
- rtems_task_argument argument
-);
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-#define CONFIGURE_INIT_TASK_ENTRY_POINT main_task
-#define CONFIGURE_INIT_TASK_NAME rtems_build_name( 'C', 'T', 'O', 'R' )
-
-#include <confdefs.h>
-
-/* global variables */
-
-TEST_EXTERN rtems_id Global_variable; /* example global variable */
-
-/* end of include file */
diff --git a/testsuites/samples/hello/Makefile.am b/testsuites/samples/hello/Makefile.am
deleted file mode 100644
index 8f3ec339ab..0000000000
--- a/testsuites/samples/hello/Makefile.am
+++ /dev/null
@@ -1,43 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-SAMPLE = hello
-PGM = ${ARCH}/$(SAMPLE).exe
-
-MANAGERS = io
-
-C_FILES = init.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS = $(H_FILES)
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(SAMPLE).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(SAMPLE).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/sample.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-all-local: ${ARCH} $(TMPINSTALL_FILES)
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/samples/hello/hello.doc b/testsuites/samples/hello/hello.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/samples/hello/hello.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/samples/hello/hello.scn b/testsuites/samples/hello/hello.scn
deleted file mode 100644
index d9e92d81d5..0000000000
--- a/testsuites/samples/hello/hello.scn
+++ /dev/null
@@ -1,3 +0,0 @@
-*** HELLO WORLD TEST ***
-Hello World
-*** END OF HELLO WORLD TEST ***
diff --git a/testsuites/samples/hello/init.c b/testsuites/samples/hello/init.c
deleted file mode 100644
index 344617d598..0000000000
--- a/testsuites/samples/hello/init.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is called from init_exec and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-#include <stdio.h>
-
-rtems_task Init(
- rtems_task_argument ignored
-)
-{
- printf( "\n\n*** HELLO WORLD TEST ***\n" );
- printf( "Hello World\n" );
- printf( "*** END OF HELLO WORLD TEST ***\n" );
- exit( 0 );
-}
diff --git a/testsuites/samples/hello/system.h b/testsuites/samples/hello/system.h
deleted file mode 100644
index d27a884301..0000000000
--- a/testsuites/samples/hello/system.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-/* configuration information */
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#define CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM
-
-#include <confdefs.h>
-
-/* global variables */
-
-TEST_EXTERN rtems_id Global_variable; /* example global variable */
-
-/* end of include file */
diff --git a/testsuites/samples/minimum/Makefile.am b/testsuites/samples/minimum/Makefile.am
deleted file mode 100644
index 0ac5f1fe20..0000000000
--- a/testsuites/samples/minimum/Makefile.am
+++ /dev/null
@@ -1,41 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-SAMPLE = minimum
-PGM = ${ARCH}/$(SAMPLE).exe
-
-MANAGERS = all
-
-C_FILES = init.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(SAMPLE).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(SAMPLE).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/sample.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-all-local: ${ARCH} $(TMPINSTALL_FILES)
- # This test should not be executed
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/samples/minimum/init.c b/testsuites/samples/minimum/init.c
deleted file mode 100644
index 64a1aa7b62..0000000000
--- a/testsuites/samples/minimum/init.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Init
- *
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-
-rtems_task Init(
- rtems_task_argument ignored
-)
-{
-}
-
-/* configuration information */
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#define CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM
-
-#define CONFIGURE_INIT
-
-#include <confdefs.h>
-
-/* global variables */
-
diff --git a/testsuites/samples/minimum/minimum.doc b/testsuites/samples/minimum/minimum.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/samples/minimum/minimum.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/samples/minimum/minimum.scn b/testsuites/samples/minimum/minimum.scn
deleted file mode 100644
index 610f3d4ddd..0000000000
--- a/testsuites/samples/minimum/minimum.scn
+++ /dev/null
@@ -1 +0,0 @@
-*** TEST SHOULD NOT BE RUN ***
diff --git a/testsuites/samples/paranoia/Makefile.am b/testsuites/samples/paranoia/Makefile.am
deleted file mode 100644
index 6611f6efe5..0000000000
--- a/testsuites/samples/paranoia/Makefile.am
+++ /dev/null
@@ -1,49 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-SAMPLE = paranoia
-PGM = ${ARCH}/$(SAMPLE).exe
-
-MANAGERS = all
-
-C_FILES = init.c paranoia.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS = $(H_FILES)
-
-DOCTYPES = doc
-DOCS = $(DOCTYPES:%=$(SAMPLE).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(SAMPLE).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/sample.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-# -DCYGNUS turns on more verbose msgs
-#
-
-AM_CPPFLAGS += -DNOSIGNAL -DCYGNUS -DNOMAIN
-
-LD_LIBS += -lm
-
-all-local: ${ARCH} $(TMPINSTALL_FILES)
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/samples/paranoia/init.c b/testsuites/samples/paranoia/init.c
deleted file mode 100644
index 980a07d7c8..0000000000
--- a/testsuites/samples/paranoia/init.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is called from init_exec and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-extern int paranoia(int, char **);
-
-char *args[2] = { "paranoia", 0 };
-
-rtems_task Init(
- rtems_task_argument ignored
-)
-{
- /*
- * Install whatever optional floating point assistance package
- * is required by this CPU.
- */
-
-#if (defined (m68040))
- M68KFPSPInstallExceptionHandlers ();
-#endif
-
- printf( "\n\n*** PARANOIA TEST ***\n" );
- paranoia(1, args);
- printf( "*** END OF PARANOIA TEST ***\n" );
- exit( 0 );
-}
diff --git a/testsuites/samples/paranoia/paranoia.c b/testsuites/samples/paranoia/paranoia.c
deleted file mode 100644
index 5a3d4b9220..0000000000
--- a/testsuites/samples/paranoia/paranoia.c
+++ /dev/null
@@ -1,2304 +0,0 @@
-/*
- * $Id$
- *
- * A C version of Kahan's Floating Point Test "Paranoia"
- *
- * Thos Sumner, UCSF, Feb. 1985
- * David Gay, BTL, Jan. 1986
- *
- * This is a rewrite from the Pascal version by
- *
- * B. A. Wichmann, 18 Jan. 1985
- *
- * (and does NOT exhibit good C programming style).
- *
- * Sun May 16 18:21:51 MDT 1993 Jeffrey Wheat (cassidy@cygnus.com)
- * Removed KR_headers defines, removed ANSI prototyping
- * Cleaned up and reformated code. Added special CYGNUS
- * "verbose" mode type messages (-DCYGNUS).
- * Note: This code is VERY NASTY.
- *
- * Adjusted to use Standard C headers 19 Jan. 1992 (dmg);
- * compile with -DKR_headers or insert
- * #define KR_headers
- * at the beginning if you have an old-style C compiler.
- *
- * (C) Apr 19 1983 in BASIC version by:
- * Professor W. M. Kahan,
- * 567 Evans Hall
- * Electrical Engineering & Computer Science Dept.
- * University of California
- * Berkeley, California 94720
- * USA
- *
- * converted to Pascal by:
- * B. A. Wichmann
- * National Physical Laboratory
- * Teddington Middx
- * TW11 OLW
- * UK
- *
- * converted to C by:
- *
- * David M. Gay and Thos Sumner
- * AT&T Bell Labs Computer Center, Rm. U-76
- * 600 Mountain Avenue University of California
- * Murray Hill, NJ 07974 San Francisco, CA 94143
- * USA USA
- *
- * with simultaneous corrections to the Pascal source (reflected
- * in the Pascal source available over netlib).
- * [A couple of bug fixes from dgh = sun!dhough incorporated 31 July 1986.]
- *
- * Reports of results on various systems from all the versions
- * of Paranoia are being collected by Richard Karpinski at the
- * same address as Thos Sumner. This includes sample outputs,
- * bug reports, and criticisms.
- *
- * You may copy this program freely if you acknowledge its source.
- * Comments on the Pascal version to NPL, please.
- *
- *
- * The C version catches signals from floating-point exceptions.
- * If signal(SIGFPE,...) is unavailable in your environment, you may
- * #define NOSIGNAL to comment out the invocations of signal.
- *
- * This source file is too big for some C compilers, but may be split
- * into pieces. Comments containing "SPLIT" suggest convenient places
- * for this splitting. At the end of these comments is an "ed script"
- * (for the UNIX(tm) editor ed) that will do this splitting.
- *
- * By #defining SINGLE_PRECISION when you compile this source, you may
- * obtain a single-precision C version of Paranoia.
- *
- * The following is from the introductory commentary from Wichmann's work:
- *
- * The BASIC program of Kahan is written in Microsoft BASIC using many
- * facilities which have no exact analogy in Pascal. The Pascal
- * version below cannot therefore be exactly the same. Rather than be
- * a minimal transcription of the BASIC program, the Pascal coding
- * follows the conventional style of block-structured languages. Hence
- * the Pascal version could be useful in producing versions in other
- * structured languages.
- *
- * Rather than use identifiers of minimal length (which therefore have
- * little mnemonic significance), the Pascal version uses meaningful
- * identifiers as follows [Note: A few changes have been made for C]:
- *
- *
- * BASIC C BASIC C BASIC C
- *
- * A J S StickyBit
- * A1 AInverse J0 NoErrors T
- * B Radix [Failure] T0 Underflow
- * B1 BInverse J1 NoErrors T2 ThirtyTwo
- * B2 RadixD2 [SeriousDefect] T5 OneAndHalf
- * B9 BMinusU2 J2 NoErrors T7 TwentySeven
- * C [Defect] T8 TwoForty
- * C1 CInverse J3 NoErrors U OneUlp
- * D [Flaw] U0 UnderflowThreshold
- * D4 FourD K PageNo U1
- * E0 L Milestone U2
- * E1 M V
- * E2 Exp2 N V0
- * E3 N1 V8
- * E5 MinSqEr O Zero V9
- * E6 SqEr O1 One W
- * E7 MaxSqEr O2 Two X
- * E8 O3 Three X1
- * E9 O4 Four X8
- * F1 MinusOne O5 Five X9 Random1
- * F2 Half O8 Eight Y
- * F3 Third O9 Nine Y1
- * F6 P Precision Y2
- * F9 Q Y9 Random2
- * G1 GMult Q8 Z
- * G2 GDiv Q9 Z0 PseudoZero
- * G3 GAddSub R Z1
- * H R1 RMult Z2
- * H1 HInverse R2 RDiv Z9
- * I R3 RAddSub
- * IO NoTrials R4 RSqrt
- * I3 IEEE R9 Random9
- *
- * SqRWrng
- *
- * All the variables in BASIC are true variables and in consequence,
- * the program is more difficult to follow since the "constants" must
- * be determined (the glossary is very helpful). The Pascal version
- * uses Real constants, but checks are added to ensure that the values
- * are correctly converted by the compiler.
- *
- * The major textual change to the Pascal version apart from the
- * identifiersis that named procedures are used, inserting parameters
- * wherehelpful. New procedures are also introduced. The
- * correspondence is as follows:
- *
- *
- * BASIC Pascal
- * lines
- *
- * 90- 140 Pause
- * 170- 250 Instructions
- * 380- 460 Heading
- * 480- 670 Characteristics
- * 690- 870 History
- * 2940-2950 Random
- * 3710-3740 NewD
- * 4040-4080 DoesYequalX
- * 4090-4110 PrintIfNPositive
- * 4640-4850 TestPartialUnderflow
- *
-*/
-
-#include <stdio.h>
-#include <string.h>
-
-#if defined(solaris2)
-#include <math.h>
-#endif
-
-/*
- * To compile this on host using only libm from newlib (and using host libc)
- * do:
- * gcc -g -DNEED_REENT -DCYGNUS paranoia.c .../newlib-1.6/newlib/libm.a
- */
-
-#ifdef NEED_REENT
-#include <reent.h>
-struct _reent libm_reent = _REENT_INIT(libm_reent);
-struct _reent *_impure_ptr = &libm_reent;
-#endif
-
-#ifndef NOSIGNAL
-#include <signal.h>
-#include <setjmp.h>
-#else /* NOSIGNAL */
-#define longjmp(e,v)
-#define setjmp(e) 0
-#define jmp_buf int
-#endif /* NOSIGNAL */
-
-#ifdef SINGLE_PRECISION
-#define FLOAT float
-#define FABS(x) (float)fabs((double)(x))
-#define FLOOR(x) (float)floor((double)(x))
-#define LOG(x) (float)log((double)(x))
-#define POW(x,y) (float)pow((double)(x),(double)(y))
-#define SQRT(x) (float)sqrt((double)(x))
-#else /* !SINGLE_PRECISION */
-#define FLOAT double
-#define FABS(x) fabs(x)
-#define FLOOR(x) floor(x)
-#define LOG(x) log(x)
-#define POW(x,y) pow(x,y)
-#define SQRT(x) sqrt(x)
-#endif /* SINGLE_PRECISION */
-
-jmp_buf ovfl_buf;
-extern double fabs (), floor (), log (), pow (), sqrt ();
-extern void exit ();
-typedef void (*Sig_type) ();
-FLOAT Sign (), Random ();
-extern void BadCond ();
-extern void SqXMinX ();
-extern void TstCond ();
-extern void notify ();
-extern int read ();
-extern void Characteristics ();
-extern void Heading ();
-extern void History ();
-extern void Instructions ();
-extern void IsYeqX ();
-extern void NewD ();
-extern void Pause ();
-extern void PrintIfNPositive ();
-extern void SR3750 ();
-extern void SR3980 ();
-extern void TstPtUf ();
-
-Sig_type sigsave;
-
-#define KEYBOARD 0
-
-FLOAT Radix, BInvrse, RadixD2, BMinusU2;
-
-/*Small floating point constants.*/
-FLOAT Zero = 0.0;
-FLOAT Half = 0.5;
-FLOAT One = 1.0;
-FLOAT Two = 2.0;
-FLOAT Three = 3.0;
-FLOAT Four = 4.0;
-FLOAT Five = 5.0;
-FLOAT Eight = 8.0;
-FLOAT Nine = 9.0;
-FLOAT TwentySeven = 27.0;
-FLOAT ThirtyTwo = 32.0;
-FLOAT TwoForty = 240.0;
-FLOAT MinusOne = -1.0;
-FLOAT OneAndHalf = 1.5;
-
-/*Integer constants*/
-int NoTrials = 20; /*Number of tests for commutativity. */
-#define False 0
-#define True 1
-
-/*
- * Definitions for declared types
- * Guard == (Yes, No);
- * Rounding == (Chopped, Rounded, Other);
- * Message == packed array [1..40] of char;
- * Class == (Flaw, Defect, Serious, Failure);
- */
-#define Yes 1
-#define No 0
-#define Chopped 2
-#define Rounded 1
-#define Other 0
-#define Flaw 3
-#define Defect 2
-#define Serious 1
-#define Failure 0
-typedef int Guard, Rounding, Class;
-typedef char Message;
-
-/* Declarations of Variables */
-int Indx;
-char ch[8];
-FLOAT AInvrse, A1;
-FLOAT C, CInvrse;
-FLOAT D, FourD;
-FLOAT E0, E1, Exp2, E3, MinSqEr;
-FLOAT SqEr, MaxSqEr, E9;
-FLOAT Third;
-FLOAT F6, F9;
-FLOAT HVar, HInvrse;
-int I;
-FLOAT StickyBit, J;
-FLOAT MyZero;
-FLOAT Precision;
-FLOAT Q, Q9;
-FLOAT R, Random9;
-FLOAT T, Underflow, S;
-FLOAT OneUlp, UfThold, U1, U2;
-FLOAT V, V0, V9;
-FLOAT WVar;
-FLOAT X, X1, X2, X8, Random1;
-FLOAT Y, Y1, Y2, Random2;
-FLOAT Z, PseudoZero, Z1, Z2, Z9;
-int ErrCnt[4];
-int fpecount;
-int Milestone;
-int PageNo;
-int M, N, N1;
-Guard GMult, GDiv, GAddSub;
-Rounding RMult, RDiv, RAddSub, RSqrt;
-int Break, Done, NotMonot, Monot, Anomaly, IEEE, SqRWrng, UfNGrad;
-
-/* Computed constants.
- * U1 gap below 1.0, i.e, 1.0 - U1 is next number below 1.0
- * U2 gap above 1.0, i.e, 1.0 + U2 is next number above 1.0
- */
-
-int batchmode; /* global batchmode test */
-
-/* program name and version variables and macro */
-char *temp;
-char *program_name;
-char *program_vers;
-
-#ifndef VERSION
-#define VERSION "1.1 [cygnus]"
-#endif /* VERSION */
-
-#define basename(cp) ((temp=(char *)strrchr((cp), '/')) ? temp+1 : (cp))
-
-#ifndef BATCHMODE
-# ifdef CYGNUS
-# define BATCHMODE
-# endif
-#endif
-
-/* floating point exception receiver */
-void
-_sigfpe (x)
-int x;
-{
- fpecount++;
- printf ("\n* * * FLOATING-POINT ERROR %d * * *\n", x);
- fflush (stdout);
- if (sigsave) {
-#ifndef NOSIGNAL
- signal (SIGFPE, sigsave);
-#endif /* NOSIGNAL */
- sigsave = 0;
- longjmp (ovfl_buf, 1);
- }
- exit (1);
-}
-
-#ifdef NOMAIN
-#define main paranoia
-#endif
-
-int
-main (argc, argv)
-int argc;
-char **argv;
-{
- /* First two assignments use integer right-hand sides. */
- Zero = 0;
- One = 1;
- Two = One + One;
- Three = Two + One;
- Four = Three + One;
- Five = Four + One;
- Eight = Four + Four;
- Nine = Three * Three;
- TwentySeven = Nine * Three;
- ThirtyTwo = Four * Eight;
- TwoForty = Four * Five * Three * Four;
- MinusOne = -One;
- Half = One / Two;
- OneAndHalf = One + Half;
- ErrCnt[Failure] = 0;
- ErrCnt[Serious] = 0;
- ErrCnt[Defect] = 0;
- ErrCnt[Flaw] = 0;
- PageNo = 1;
-
-#ifdef BATCHMODE
- batchmode = 1; /* run test in batchmode? */
-#else /* !BATCHMODE */
- batchmode = 0; /* run test interactively */
-#endif /* BATCHMODE */
-
- program_name = basename (argv[0]);
- program_vers = VERSION;
-
- printf ("%s version %s\n", program_name, program_vers);
-
- /*=============================================*/
- Milestone = 0;
- /*=============================================*/
-#ifndef NOSIGNAL
- signal (SIGFPE, _sigfpe);
-#endif
-
- if (!batchmode) {
- Instructions ();
- Pause ();
- Heading ();
- Instructions ();
- Pause ();
- Heading ();
- Pause ();
- Characteristics ();
- Pause ();
- History ();
- Pause ();
- }
-
- /*=============================================*/
- Milestone = 7;
- /*=============================================*/
- printf ("Program is now RUNNING tests on small integers:\n");
- TstCond (Failure, (Zero + Zero == Zero) && (One - One == Zero)
- && (One > Zero) && (One + One == Two),
- "0+0 != 0, 1-1 != 0, 1 <= 0, or 1+1 != 2");
- Z = -Zero;
- if (Z != 0.0) {
- ErrCnt[Failure] = ErrCnt[Failure] + 1;
- printf ("Comparison alleges that -0.0 is Non-zero!\n");
- U1 = 0.001;
- Radix = 1;
- TstPtUf ();
- }
- TstCond (Failure, (Three == Two + One) && (Four == Three + One)
- && (Four + Two * (-Two) == Zero)
- && (Four - Three - One == Zero),
- "3 != 2+1, 4 != 3+1, 4+2*(-2) != 0, or 4-3-1 != 0");
- TstCond (Failure, (MinusOne == (0 - One))
- && (MinusOne + One == Zero) && (One + MinusOne == Zero)
- && (MinusOne + FABS (One) == Zero)
- && (MinusOne + MinusOne * MinusOne == Zero),
- "-1+1 != 0, (-1)+abs(1) != 0, or -1+(-1)*(-1) != 0");
- TstCond (Failure, Half + MinusOne + Half == Zero,
- "1/2 + (-1) + 1/2 != 0");
- /*=============================================*/
- Milestone = 10;
- /*=============================================*/
- TstCond (Failure, (Nine == Three * Three)
- && (TwentySeven == Nine * Three) && (Eight == Four + Four)
- && (ThirtyTwo == Eight * Four)
- && (ThirtyTwo - TwentySeven - Four - One == Zero),
- "9 != 3*3, 27 != 9*3, 32 != 8*4, or 32-27-4-1 != 0");
- TstCond (Failure, (Five == Four + One) &&
- (TwoForty == Four * Five * Three * Four)
- && (TwoForty / Three - Four * Four * Five == Zero)
- && (TwoForty / Four - Five * Three * Four == Zero)
- && (TwoForty / Five - Four * Three * Four == Zero),
- "5 != 4+1, 240/3 != 80, 240/4 != 60, or 240/5 != 48");
- if (ErrCnt[Failure] == 0) {
- printf ("-1, 0, 1/2, 1, 2, 3, 4, 5, 9, 27, 32 & 240 are O.K.\n");
- printf ("\n");
- }
- printf ("Searching for Radix and Precision.\n");
- WVar = One;
- do {
- WVar = WVar + WVar;
- Y = WVar + One;
- Z = Y - WVar;
- Y = Z - One;
- }
- while (MinusOne + FABS (Y) < Zero);
- /*.. now WVar is just big enough that |((WVar+1)-WVar)-1| >= 1 ...*/
- Precision = Zero;
- Y = One;
- do {
- Radix = WVar + Y;
- Y = Y + Y;
- Radix = Radix - WVar;
- }
- while (Radix == Zero);
- if (Radix < Two)
- Radix = One;
- printf ("Radix = %f .\n", Radix);
- if (Radix != 1) {
- WVar = One;
- do {
- Precision = Precision + One;
- WVar = WVar * Radix;
- Y = WVar + One;
- }
- while ((Y - WVar) == One);
- }
- /*... now WVar == Radix^Precision is barely too big to satisfy (WVar+1)-WVar == 1
- ...*/
- U1 = One / WVar;
- U2 = Radix * U1;
- printf ("Closest relative separation found is U1 = %.7e .\n\n", U1);
- printf ("Recalculating radix and precision\n ");
-
- /*save old values*/
- E0 = Radix;
- E1 = U1;
- E9 = U2;
- E3 = Precision;
-
- X = Four / Three;
- Third = X - One;
- F6 = Half - Third;
- X = F6 + F6;
- X = FABS (X - Third);
- if (X < U2)
- X = U2;
-
- /*... now X = (unknown no.) ulps of 1+...*/
- do {
- U2 = X;
- Y = Half * U2 + ThirtyTwo * U2 * U2;
- Y = One + Y;
- X = Y - One;
- }
- while (!((U2 <= X) || (X <= Zero)));
-
- /*... now U2 == 1 ulp of 1 + ... */
- X = Two / Three;
- F6 = X - Half;
- Third = F6 + F6;
- X = Third - Half;
- X = FABS (X + F6);
- if (X < U1)
- X = U1;
-
- /*... now X == (unknown no.) ulps of 1 -... */
- do {
- U1 = X;
- Y = Half * U1 + ThirtyTwo * U1 * U1;
- Y = Half - Y;
- X = Half + Y;
- Y = Half - X;
- X = Half + Y;
- }
- while (!((U1 <= X) || (X <= Zero)));
- /*... now U1 == 1 ulp of 1 - ... */
- if (U1 == E1)
- printf ("confirms closest relative separation U1 .\n");
- else
- printf ("gets better closest relative separation U1 = %.7e .\n", U1);
- WVar = One / U1;
- F9 = (Half - U1) + Half;
- Radix = FLOOR (0.01 + U2 / U1);
- if (Radix == E0)
- printf ("Radix confirmed.\n");
- else
- printf ("MYSTERY: recalculated Radix = %.7e .\n", Radix);
- TstCond (Defect, Radix <= Eight + Eight,
- "Radix is too big: roundoff problems");
- TstCond (Flaw, (Radix == Two) || (Radix == 10)
- || (Radix == One), "Radix is not as good as 2 or 10");
- /*=============================================*/
- Milestone = 20;
- /*=============================================*/
- TstCond (Failure, F9 - Half < Half,
- "(1-U1)-1/2 < 1/2 is FALSE, prog. fails?");
- X = F9;
- I = 1;
- Y = X - Half;
- Z = Y - Half;
- TstCond (Failure, (X != One)
- || (Z == Zero), "Comparison is fuzzy,X=1 but X-1/2-1/2 != 0");
- X = One + U2;
- I = 0;
- /*=============================================*/
- Milestone = 25;
- /*=============================================*/
- /*... BMinusU2 = nextafter(Radix, 0) */
- BMinusU2 = Radix - One;
- BMinusU2 = (BMinusU2 - U2) + One;
- /* Purify Integers */
- if (Radix != One) {
- X = -TwoForty * LOG (U1) / LOG (Radix);
- Y = FLOOR (Half + X);
- if (FABS (X - Y) * Four < One)
- X = Y;
- Precision = X / TwoForty;
- Y = FLOOR (Half + Precision);
- if (FABS (Precision - Y) * TwoForty < Half)
- Precision = Y;
- }
- if ((Precision != FLOOR (Precision)) || (Radix == One)) {
- printf ("Precision cannot be characterized by an Integer number\n");
- printf ("of significant digits but, by itself, this is a minor flaw.\n");
- }
- if (Radix == One)
- printf ("logarithmic encoding has precision characterized solely by U1.\n");
- else
- printf ("The number of significant digits of the Radix is %f .\n",
- Precision);
- TstCond (Serious, U2 * Nine * Nine * TwoForty < One,
- "Precision worse than 5 decimal figures ");
- /*=============================================*/
- Milestone = 30;
- /*=============================================*/
- /* Test for extra-precise subepressions */
- X = FABS (((Four / Three - One) - One / Four) * Three - One / Four);
- do {
- Z2 = X;
- X = (One + (Half * Z2 + ThirtyTwo * Z2 * Z2)) - One;
- }
- while (!((Z2 <= X) || (X <= Zero)));
- X = Y = Z = FABS ((Three / Four - Two / Three) * Three - One / Four);
- do {
- Z1 = Z;
- Z = (One / Two - ((One / Two - (Half * Z1 + ThirtyTwo * Z1 * Z1))
- + One / Two)) + One / Two;
- }
- while (!((Z1 <= Z) || (Z <= Zero)));
- do {
- do {
- Y1 = Y;
- Y = (Half - ((Half - (Half * Y1 + ThirtyTwo * Y1 * Y1)) + Half
- )) + Half;
- }
- while (!((Y1 <= Y) || (Y <= Zero)));
- X1 = X;
- X = ((Half * X1 + ThirtyTwo * X1 * X1) - F9) + F9;
- }
- while (!((X1 <= X) || (X <= Zero)));
- if ((X1 != Y1) || (X1 != Z1)) {
- BadCond (Serious, "Disagreements among the values X1, Y1, Z1,\n");
- printf ("respectively %.7e, %.7e, %.7e,\n", X1, Y1, Z1);
- printf ("are symptoms of inconsistencies introduced\n");
- printf ("by extra-precise evaluation of arithmetic subexpressions.\n");
- notify ("Possibly some part of this");
- if ((X1 == U1) || (Y1 == U1) || (Z1 == U1))
- printf (
- "That feature is not tested further by this program.\n");
- } else {
- if ((Z1 != U1) || (Z2 != U2)) {
- if ((Z1 >= U1) || (Z2 >= U2)) {
- BadCond (Failure, "");
- notify ("Precision");
- printf ("\tU1 = %.7e, Z1 - U1 = %.7e\n", U1, Z1 - U1);
- printf ("\tU2 = %.7e, Z2 - U2 = %.7e\n", U2, Z2 - U2);
- } else {
- if ((Z1 <= Zero) || (Z2 <= Zero)) {
- printf ("Because of unusual Radix = %f", Radix);
- printf (", or exact rational arithmetic a result\n");
- printf ("Z1 = %.7e, or Z2 = %.7e ", Z1, Z2);
- notify ("of an\nextra-precision");
- }
- if (Z1 != Z2 || Z1 > Zero) {
- X = Z1 / U1;
- Y = Z2 / U2;
- if (Y > X)
- X = Y;
- Q = -LOG (X);
- printf ("Some subexpressions appear to be calculated extra\n");
- printf ("precisely with about %g extra B-digits, i.e.\n",
- (Q / LOG (Radix)));
- printf ("roughly %g extra significant decimals.\n",
- Q / LOG (10.));
- }
- printf ("That feature is not tested further by this program.\n");
- }
- }
- }
- Pause ();
- /*=============================================*/
- Milestone = 35;
- /*=============================================*/
- if (Radix >= Two) {
- X = WVar / (Radix * Radix);
- Y = X + One;
- Z = Y - X;
- T = Z + U2;
- X = T - Z;
- TstCond (Failure, X == U2,
- "Subtraction is not normalized X=Y,X+Z != Y+Z!");
- if (X == U2)
- printf (
- "Subtraction appears to be normalized, as it should be.");
- }
- printf ("\nChecking for guard digit in *, /, and -.\n");
- Y = F9 * One;
- Z = One * F9;
- X = F9 - Half;
- Y = (Y - Half) - X;
- Z = (Z - Half) - X;
- X = One + U2;
- T = X * Radix;
- R = Radix * X;
- X = T - Radix;
- X = X - Radix * U2;
- T = R - Radix;
- T = T - Radix * U2;
- X = X * (Radix - One);
- T = T * (Radix - One);
- if ((X == Zero) && (Y == Zero) && (Z == Zero) && (T == Zero))
- GMult = Yes;
- else {
- GMult = No;
- TstCond (Serious, False,
- "* lacks a Guard Digit, so 1*X != X");
- }
- Z = Radix * U2;
- X = One + Z;
- Y = FABS ((X + Z) - X * X) - U2;
- X = One - U2;
- Z = FABS ((X - U2) - X * X) - U1;
- TstCond (Failure, (Y <= Zero)
- && (Z <= Zero), "* gets too many final digits wrong.\n");
- Y = One - U2;
- X = One + U2;
- Z = One / Y;
- Y = Z - X;
- X = One / Three;
- Z = Three / Nine;
- X = X - Z;
- T = Nine / TwentySeven;
- Z = Z - T;
- TstCond (Defect, X == Zero && Y == Zero && Z == Zero,
- "Division lacks a Guard Digit, so error can exceed 1 ulp\n\
-or 1/3 and 3/9 and 9/27 may disagree");
- Y = F9 / One;
- X = F9 - Half;
- Y = (Y - Half) - X;
- X = One + U2;
- T = X / One;
- X = T - X;
- if ((X == Zero) && (Y == Zero) && (Z == Zero))
- GDiv = Yes;
- else {
- GDiv = No;
- TstCond (Serious, False,
- "Division lacks a Guard Digit, so X/1 != X");
- }
- X = One / (One + U2);
- Y = X - Half - Half;
- TstCond (Serious, Y < Zero,
- "Computed value of 1/1.000..1 >= 1");
- X = One - U2;
- Y = One + Radix * U2;
- Z = X * Radix;
- T = Y * Radix;
- R = Z / Radix;
- StickyBit = T / Radix;
- X = R - X;
- Y = StickyBit - Y;
- TstCond (Failure, X == Zero && Y == Zero,
- "* and/or / gets too many last digits wrong");
- Y = One - U1;
- X = One - F9;
- Y = One - Y;
- T = Radix - U2;
- Z = Radix - BMinusU2;
- T = Radix - T;
- if ((X == U1) && (Y == U1) && (Z == U2) && (T == U2))
- GAddSub = Yes;
- else {
- GAddSub = No;
- TstCond (Serious, False,
- "- lacks Guard Digit, so cancellation is obscured");
- }
- if (F9 != One && F9 - One >= Zero) {
- BadCond (Serious, "comparison alleges (1-U1) < 1 although\n");
- printf (" subtraction yields (1-U1) - 1 = 0 , thereby vitiating\n");
- printf (" such precautions against division by zero as\n");
- printf (" ... if (X == 1.0) {.....} else {.../(X-1.0)...}\n");
- }
- if (GMult == Yes && GDiv == Yes && GAddSub == Yes)
- printf (
- " *, /, and - appear to have guard digits, as they should.\n");
- /*=============================================*/
- Milestone = 40;
- /*=============================================*/
- Pause ();
- printf ("Checking rounding on multiply, divide and add/subtract.\n");
- RMult = Other;
- RDiv = Other;
- RAddSub = Other;
- RadixD2 = Radix / Two;
- A1 = Two;
- Done = False;
- do {
- AInvrse = Radix;
- do {
- X = AInvrse;
- AInvrse = AInvrse / A1;
- }
- while (!(FLOOR (AInvrse) != AInvrse));
- Done = (X == One) || (A1 > Three);
- if (!Done)
- A1 = Nine + One;
- }
- while (!(Done));
- if (X == One)
- A1 = Radix;
- AInvrse = One / A1;
- X = A1;
- Y = AInvrse;
- Done = False;
- do {
- Z = X * Y - Half;
- TstCond (Failure, Z == Half,
- "X * (1/X) differs from 1");
- Done = X == Radix;
- X = Radix;
- Y = One / X;
- }
- while (!(Done));
- Y2 = One + U2;
- Y1 = One - U2;
- X = OneAndHalf - U2;
- Y = OneAndHalf + U2;
- Z = (X - U2) * Y2;
- T = Y * Y1;
- Z = Z - X;
- T = T - X;
- X = X * Y2;
- Y = (Y + U2) * Y1;
- X = X - OneAndHalf;
- Y = Y - OneAndHalf;
- if ((X == Zero) && (Y == Zero) && (Z == Zero) && (T <= Zero)) {
- X = (OneAndHalf + U2) * Y2;
- Y = OneAndHalf - U2 - U2;
- Z = OneAndHalf + U2 + U2;
- T = (OneAndHalf - U2) * Y1;
- X = X - (Z + U2);
- StickyBit = Y * Y1;
- S = Z * Y2;
- T = T - Y;
- Y = (U2 - Y) + StickyBit;
- Z = S - (Z + U2 + U2);
- StickyBit = (Y2 + U2) * Y1;
- Y1 = Y2 * Y1;
- StickyBit = StickyBit - Y2;
- Y1 = Y1 - Half;
- if ((X == Zero) && (Y == Zero) && (Z == Zero) && (T == Zero)
- && (StickyBit == Zero) && (Y1 == Half)) {
- RMult = Rounded;
- printf ("Multiplication appears to round correctly.\n");
- } else if ((X + U2 == Zero) && (Y < Zero) && (Z + U2 == Zero)
- && (T < Zero) && (StickyBit + U2 == Zero)
- && (Y1 < Half)) {
- RMult = Chopped;
- printf ("Multiplication appears to chop.\n");
- } else
- printf ("* is neither chopped nor correctly rounded.\n");
- if ((RMult == Rounded) && (GMult == No))
- notify ("Multiplication");
- } else
- printf ("* is neither chopped nor correctly rounded.\n");
- /*=============================================*/
- Milestone = 45;
- /*=============================================*/
- Y2 = One + U2;
- Y1 = One - U2;
- Z = OneAndHalf + U2 + U2;
- X = Z / Y2;
- T = OneAndHalf - U2 - U2;
- Y = (T - U2) / Y1;
- Z = (Z + U2) / Y2;
- X = X - OneAndHalf;
- Y = Y - T;
- T = T / Y1;
- Z = Z - (OneAndHalf + U2);
- T = (U2 - OneAndHalf) + T;
- if (!((X > Zero) || (Y > Zero) || (Z > Zero) || (T > Zero))) {
- X = OneAndHalf / Y2;
- Y = OneAndHalf - U2;
- Z = OneAndHalf + U2;
- X = X - Y;
- T = OneAndHalf / Y1;
- Y = Y / Y1;
- T = T - (Z + U2);
- Y = Y - Z;
- Z = Z / Y2;
- Y1 = (Y2 + U2) / Y2;
- Z = Z - OneAndHalf;
- Y2 = Y1 - Y2;
- Y1 = (F9 - U1) / F9;
- if ((X == Zero) && (Y == Zero) && (Z == Zero) && (T == Zero)
- && (Y2 == Zero) && (Y2 == Zero)
- && (Y1 - Half == F9 - Half)) {
- RDiv = Rounded;
- printf ("Division appears to round correctly.\n");
- if (GDiv == No)
- notify ("Division");
- } else if ((X < Zero) && (Y < Zero) && (Z < Zero) && (T < Zero)
- && (Y2 < Zero) && (Y1 - Half < F9 - Half)) {
- RDiv = Chopped;
- printf ("Division appears to chop.\n");
- }
- }
- if (RDiv == Other)
- printf ("/ is neither chopped nor correctly rounded.\n");
- BInvrse = One / Radix;
- TstCond (Failure, (BInvrse * Radix - Half == Half),
- "Radix * ( 1 / Radix ) differs from 1");
- /*=============================================*/
- Milestone = 50;
- /*=============================================*/
- TstCond (Failure, ((F9 + U1) - Half == Half)
- && ((BMinusU2 + U2) - One == Radix - One),
- "Incomplete carry-propagation in Addition");
- X = One - U1 * U1;
- Y = One + U2 * (One - U2);
- Z = F9 - Half;
- X = (X - Half) - Z;
- Y = Y - One;
- if ((X == Zero) && (Y == Zero)) {
- RAddSub = Chopped;
- printf ("Add/Subtract appears to be chopped.\n");
- }
- if (GAddSub == Yes) {
- X = (Half + U2) * U2;
- Y = (Half - U2) * U2;
- X = One + X;
- Y = One + Y;
- X = (One + U2) - X;
- Y = One - Y;
- if ((X == Zero) && (Y == Zero)) {
- X = (Half + U2) * U1;
- Y = (Half - U2) * U1;
- X = One - X;
- Y = One - Y;
- X = F9 - X;
- Y = One - Y;
- if ((X == Zero) && (Y == Zero)) {
- RAddSub = Rounded;
- printf ("Addition/Subtraction appears to round correctly.\n");
- if (GAddSub == No)
- notify ("Add/Subtract");
- } else
- printf ("Addition/Subtraction neither rounds nor chops.\n");
- } else
- printf ("Addition/Subtraction neither rounds nor chops.\n");
- } else
- printf ("Addition/Subtraction neither rounds nor chops.\n");
- S = One;
- X = One + Half * (One + Half);
- Y = (One + U2) * Half;
- Z = X - Y;
- T = Y - X;
- StickyBit = Z + T;
- if (StickyBit != Zero) {
- S = Zero;
- BadCond (Flaw, "(X - Y) + (Y - X) is non zero!\n");
- }
- StickyBit = Zero;
- if ((GMult == Yes) && (GDiv == Yes) && (GAddSub == Yes)
- && (RMult == Rounded) && (RDiv == Rounded)
- && (RAddSub == Rounded) && (FLOOR (RadixD2) == RadixD2)) {
- printf ("Checking for sticky bit.\n");
- X = (Half + U1) * U2;
- Y = Half * U2;
- Z = One + Y;
- T = One + X;
- if ((Z - One <= Zero) && (T - One >= U2)) {
- Z = T + Y;
- Y = Z - X;
- if ((Z - T >= U2) && (Y - T == Zero)) {
- X = (Half + U1) * U1;
- Y = Half * U1;
- Z = One - Y;
- T = One - X;
- if ((Z - One == Zero) && (T - F9 == Zero)) {
- Z = (Half - U1) * U1;
- T = F9 - Z;
- Q = F9 - Y;
- if ((T - F9 == Zero) && (F9 - U1 - Q == Zero)) {
- Z = (One + U2) * OneAndHalf;
- T = (OneAndHalf + U2) - Z + U2;
- X = One + Half / Radix;
- Y = One + Radix * U2;
- Z = X * Y;
- if (T == Zero && X + Radix * U2 - Z == Zero) {
- if (Radix != Two) {
- X = Two + U2;
- Y = X / Two;
- if ((Y - One == Zero))
- StickyBit = S;
- } else
- StickyBit = S;
- }
- }
- }
- }
- }
- }
- if (StickyBit == One)
- printf ("Sticky bit apparently used correctly.\n");
- else
- printf ("Sticky bit used incorrectly or not at all.\n");
- TstCond (Flaw, !(GMult == No || GDiv == No || GAddSub == No ||
- RMult == Other || RDiv == Other || RAddSub == Other),
- "lack(s) of guard digits or failure(s) to correctly round or chop\n\
-(noted above) count as one flaw in the final tally below");
- /*=============================================*/
- Milestone = 60;
- /*=============================================*/
- printf ("\n");
- printf ("Does Multiplication commute? ");
- printf ("Testing on %d random pairs.\n", NoTrials);
- Random9 = SQRT (3.0);
- Random1 = Third;
- I = 1;
- do {
- X = Random ();
- Y = Random ();
- Z9 = Y * X;
- Z = X * Y;
- Z9 = Z - Z9;
- I = I + 1;
- }
- while (!((I > NoTrials) || (Z9 != Zero)));
- if (I == NoTrials) {
- Random1 = One + Half / Three;
- Random2 = (U2 + U1) + One;
- Z = Random1 * Random2;
- Y = Random2 * Random1;
- Z9 = (One + Half / Three) * ((U2 + U1) + One) - (One + Half /
- Three) * ((U2 + U1) + One);
- }
- if (!((I == NoTrials) || (Z9 == Zero)))
- BadCond (Defect, "X * Y == Y * X trial fails.\n");
- else
- printf (" No failures found in %d integer pairs.\n", NoTrials);
- /*=============================================*/
- Milestone = 70;
- /*=============================================*/
- printf ("\nRunning test of square root(x).\n");
- TstCond (Failure, (Zero == SQRT (Zero))
- && (-Zero == SQRT (-Zero))
- && (One == SQRT (One)), "Square root of 0.0, -0.0 or 1.0 wrong");
- MinSqEr = Zero;
- MaxSqEr = Zero;
- J = Zero;
- X = Radix;
- OneUlp = U2;
- SqXMinX (Serious);
- X = BInvrse;
- OneUlp = BInvrse * U1;
- SqXMinX (Serious);
- X = U1;
- OneUlp = U1 * U1;
- SqXMinX (Serious);
- if (J != Zero)
- Pause ();
- printf ("Testing if sqrt(X * X) == X for %d Integers X.\n", NoTrials);
- J = Zero;
- X = Two;
- Y = Radix;
- if ((Radix != One))
- do {
- X = Y;
- Y = Radix * Y;
- }
- while (!((Y - X >= NoTrials)));
- OneUlp = X * U2;
- I = 1;
- while (I <= NoTrials) {
- X = X + One;
- SqXMinX (Defect);
- if (J > Zero)
- break;
- I = I + 1;
- }
- printf ("Test for sqrt monotonicity.\n");
- I = -1;
- X = BMinusU2;
- Y = Radix;
- Z = Radix + Radix * U2;
- NotMonot = False;
- Monot = False;
- while (!(NotMonot || Monot)) {
- I = I + 1;
- X = SQRT (X);
- Q = SQRT (Y);
- Z = SQRT (Z);
- if ((X > Q) || (Q > Z))
- NotMonot = True;
- else {
- Q = FLOOR (Q + Half);
- if ((I > 0) || (Radix == Q * Q))
- Monot = True;
- else if (I > 0) {
- if (I > 1)
- Monot = True;
- else {
- Y = Y * BInvrse;
- X = Y - U1;
- Z = Y + U1;
- }
- } else {
- Y = Q;
- X = Y - U2;
- Z = Y + U2;
- }
- }
- }
- if (Monot)
- printf ("sqrt has passed a test for Monotonicity.\n");
- else {
- BadCond (Defect, "");
- printf ("sqrt(X) is non-monotonic for X near %.7e .\n", Y);
- }
- /*=============================================*/
- Milestone = 80;
- /*=============================================*/
- MinSqEr = MinSqEr + Half;
- MaxSqEr = MaxSqEr - Half;
- Y = (SQRT (One + U2) - One) / U2;
- SqEr = (Y - One) + U2 / Eight;
- if (SqEr > MaxSqEr)
- MaxSqEr = SqEr;
- SqEr = Y + U2 / Eight;
- if (SqEr < MinSqEr)
- MinSqEr = SqEr;
- Y = ((SQRT (F9) - U2) - (One - U2)) / U1;
- SqEr = Y + U1 / Eight;
- if (SqEr > MaxSqEr)
- MaxSqEr = SqEr;
- SqEr = (Y + One) + U1 / Eight;
- if (SqEr < MinSqEr)
- MinSqEr = SqEr;
- OneUlp = U2;
- X = OneUlp;
- for (Indx = 1; Indx <= 3; ++Indx) {
- Y = SQRT ((X + U1 + X) + F9);
- Y = ((Y - U2) - ((One - U2) + X)) / OneUlp;
- Z = ((U1 - X) + F9) * Half * X * X / OneUlp;
- SqEr = (Y + Half) + Z;
- if (SqEr < MinSqEr)
- MinSqEr = SqEr;
- SqEr = (Y - Half) + Z;
- if (SqEr > MaxSqEr)
- MaxSqEr = SqEr;
- if (((Indx == 1) || (Indx == 3)))
- X = OneUlp * Sign (X) * FLOOR (Eight / (Nine * SQRT (OneUlp)));
- else {
- OneUlp = U1;
- X = -OneUlp;
- }
- }
- /*=============================================*/
- Milestone = 85;
- /*=============================================*/
- SqRWrng = False;
- Anomaly = False;
- RSqrt = Other; /* ~dgh */
- if (Radix != One) {
- printf ("Testing whether sqrt is rounded or chopped.\n");
- D = FLOOR (Half + POW (Radix, One + Precision - FLOOR (Precision)));
- /* ... == Radix^(1 + fract) if (Precision == Integer + fract. */
- X = D / Radix;
- Y = D / A1;
- if ((X != FLOOR (X)) || (Y != FLOOR (Y))) {
- Anomaly = True;
- } else {
- X = Zero;
- Z2 = X;
- Y = One;
- Y2 = Y;
- Z1 = Radix - One;
- FourD = Four * D;
- do {
- if (Y2 > Z2) {
- Q = Radix;
- Y1 = Y;
- do {
- X1 = FABS (Q + FLOOR (Half - Q / Y1) * Y1);
- Q = Y1;
- Y1 = X1;
- }
- while (!(X1 <= Zero));
- if (Q <= One) {
- Z2 = Y2;
- Z = Y;
- }
- }
- Y = Y + Two;
- X = X + Eight;
- Y2 = Y2 + X;
- if (Y2 >= FourD)
- Y2 = Y2 - FourD;
- }
- while (!(Y >= D));
- X8 = FourD - Z2;
- Q = (X8 + Z * Z) / FourD;
- X8 = X8 / Eight;
- if (Q != FLOOR (Q))
- Anomaly = True;
- else {
- Break = False;
- do {
- X = Z1 * Z;
- X = X - FLOOR (X / Radix) * Radix;
- if (X == One)
- Break = True;
- else
- Z1 = Z1 - One;
- }
- while (!(Break || (Z1 <= Zero)));
- if ((Z1 <= Zero) && (!Break))
- Anomaly = True;
- else {
- if (Z1 > RadixD2)
- Z1 = Z1 - Radix;
- do {
- NewD ();
- }
- while (!(U2 * D >= F9));
- if (D * Radix - D != WVar - D)
- Anomaly = True;
- else {
- Z2 = D;
- I = 0;
- Y = D + (One + Z) * Half;
- X = D + Z + Q;
- SR3750 ();
- Y = D + (One - Z) * Half + D;
- X = D - Z + D;
- X = X + Q + X;
- SR3750 ();
- NewD ();
- if (D - Z2 != WVar - Z2)
- Anomaly = True;
- else {
- Y = (D - Z2) + (Z2 + (One - Z) * Half);
- X = (D - Z2) + (Z2 - Z + Q);
- SR3750 ();
- Y = (One + Z) * Half;
- X = Q;
- SR3750 ();
- if (I == 0)
- Anomaly = True;
- }
- }
- }
- }
- }
- if ((I == 0) || Anomaly) {
- BadCond (Failure, "Anomalous arithmetic with Integer < ");
- printf ("Radix^Precision = %.7e\n", WVar);
- printf (" fails test whether sqrt rounds or chops.\n");
- SqRWrng = True;
- }
- }
- if (!Anomaly) {
- if (!((MinSqEr < Zero) || (MaxSqEr > Zero))) {
- RSqrt = Rounded;
- printf ("Square root appears to be correctly rounded.\n");
- } else {
- if ((MaxSqEr + U2 > U2 - Half) || (MinSqEr > Half)
- || (MinSqEr + Radix < Half))
- SqRWrng = True;
- else {
- RSqrt = Chopped;
- printf ("Square root appears to be chopped.\n");
- }
- }
- }
- if (SqRWrng) {
- printf ("Square root is neither chopped nor correctly rounded.\n");
- printf ("Observed errors run from %.7e ", MinSqEr - Half);
- printf ("to %.7e ulps.\n", Half + MaxSqEr);
- TstCond (Serious, MaxSqEr - MinSqEr < Radix * Radix,
- "sqrt gets too many last digits wrong");
- }
- /*=============================================*/
- Milestone = 90;
- /*=============================================*/
- Pause ();
- printf ("Testing powers Z^i for small Integers Z and i.\n");
- N = 0;
- /* ... test powers of zero. */
- I = 0;
- Z = -Zero;
- M = 3;
- Break = False;
- do {
- X = One;
- SR3980 ();
- if (I <= 10) {
- I = 1023;
- SR3980 ();
- }
- if (Z == MinusOne)
- Break = True;
- else {
- Z = MinusOne;
- /* .. if(-1)^N is invalid, replace MinusOne by One. */
- I = -4;
- }
- }
- while (!Break);
- PrintIfNPositive ();
- N1 = N;
- N = 0;
- Z = A1;
- M = (int) FLOOR (Two * LOG (WVar) / LOG (A1));
- Break = False;
- do {
- X = Z;
- I = 1;
- SR3980 ();
- if (Z == AInvrse)
- Break = True;
- else
- Z = AInvrse;
- }
- while (!(Break));
- /*=============================================*/
- Milestone = 100;
- /*=============================================*/
- /* Powers of Radix have been tested, */
- /* next try a few primes */
- M = NoTrials;
- Z = Three;
- do {
- X = Z;
- I = 1;
- SR3980 ();
- do {
- Z = Z + Two;
- }
- while (Three * FLOOR (Z / Three) == Z);
- }
- while (Z < Eight * Three);
- if (N > 0) {
- printf ("Errors like this may invalidate financial calculations\n");
- printf ("\tinvolving interest rates.\n");
- }
- PrintIfNPositive ();
- N += N1;
- if (N == 0)
- printf ("... no discrepancies found.\n");
- if (N > 0)
- Pause ();
- else
- printf ("\n");
- /*=============================================*/
- Milestone = 110;
- /*=============================================*/
- printf ("Seeking Underflow thresholds UfThold and E0.\n");
- D = U1;
- if (Precision != FLOOR (Precision)) {
- D = BInvrse;
- X = Precision;
- do {
- D = D * BInvrse;
- X = X - One;
- }
- while (X > Zero);
- }
- Y = One;
- Z = D;
- /* ... D is power of 1/Radix < 1. */
- do {
- C = Y;
- Y = Z;
- Z = Y * Y;
- }
- while ((Y > Z) && (Z + Z > Z));
- Y = C;
- Z = Y * D;
- do {
- C = Y;
- Y = Z;
- Z = Y * D;
- }
- while ((Y > Z) && (Z + Z > Z));
- if (Radix < Two)
- HInvrse = Two;
- else
- HInvrse = Radix;
- HVar = One / HInvrse;
- /* ... 1/HInvrse == HVar == Min(1/Radix, 1/2) */
- CInvrse = One / C;
- E0 = C;
- Z = E0 * HVar;
- /* ...1/Radix^(BIG Integer) << 1 << CInvrse == 1/C */
- do {
- Y = E0;
- E0 = Z;
- Z = E0 * HVar;
- }
- while ((E0 > Z) && (Z + Z > Z));
- UfThold = E0;
- E1 = Zero;
- Q = Zero;
- E9 = U2;
- S = One + E9;
- D = C * S;
- if (D <= C) {
- E9 = Radix * U2;
- S = One + E9;
- D = C * S;
- if (D <= C) {
- BadCond (Failure, "multiplication gets too many last digits wrong.\n");
- Underflow = E0;
- Y1 = Zero;
- PseudoZero = Z;
- Pause ();
- }
- } else {
- Underflow = D;
- PseudoZero = Underflow * HVar;
- UfThold = Zero;
- do {
- Y1 = Underflow;
- Underflow = PseudoZero;
- if (E1 + E1 <= E1) {
- Y2 = Underflow * HInvrse;
- E1 = FABS (Y1 - Y2);
- Q = Y1;
- if ((UfThold == Zero) && (Y1 != Y2))
- UfThold = Y1;
- }
- PseudoZero = PseudoZero * HVar;
- }
- while ((Underflow > PseudoZero)
- && (PseudoZero + PseudoZero > PseudoZero));
- }
- /* Comment line 4530 .. 4560 */
- if (PseudoZero != Zero) {
- printf ("\n");
- Z = PseudoZero;
- /* ... Test PseudoZero for "phoney- zero" violates */
- /* ... PseudoZero < Underflow or PseudoZero < PseudoZero + PseudoZero
- ... */
- if (PseudoZero <= Zero) {
- BadCond (Failure, "Positive expressions can underflow to an\n");
- printf ("allegedly negative value\n");
- printf ("PseudoZero that prints out as: %g .\n", PseudoZero);
- X = -PseudoZero;
- if (X <= Zero) {
- printf ("But -PseudoZero, which should be\n");
- printf ("positive, isn't; it prints out as %g .\n", X);
- }
- } else {
- BadCond (Flaw, "Underflow can stick at an allegedly positive\n");
- printf ("value PseudoZero that prints out as %g .\n", PseudoZero);
- }
- TstPtUf ();
- }
- /*=============================================*/
- Milestone = 120;
- /*=============================================*/
- if (CInvrse * Y > CInvrse * Y1) {
- S = HVar * S;
- E0 = Underflow;
- }
- if (!((E1 == Zero) || (E1 == E0))) {
- BadCond (Defect, "");
- if (E1 < E0) {
- printf ("Products underflow at a higher");
- printf (" threshold than differences.\n");
- if (PseudoZero == Zero)
- E0 = E1;
- } else {
- printf ("Difference underflows at a higher");
- printf (" threshold than products.\n");
- }
- }
- printf ("Smallest strictly positive number found is E0 = %g .\n", E0);
- Z = E0;
- TstPtUf ();
- Underflow = E0;
- if (N == 1)
- Underflow = Y;
- I = 4;
- if (E1 == Zero)
- I = 3;
- if (UfThold == Zero)
- I = I - 2;
- UfNGrad = True;
- switch (I) {
- case 1:
- UfThold = Underflow;
- if ((CInvrse * Q) != ((CInvrse * Y) * S)) {
- UfThold = Y;
- BadCond (Failure, "Either accuracy deteriorates as numbers\n");
- printf ("approach a threshold = %.17e\n", UfThold);;
- printf (" coming down from %.17e\n", C);
- printf (" or else multiplication gets too many last digits wrong.\n");
- }
- Pause ();
- break;
-
- case 2:
- BadCond (Failure, "Underflow confuses Comparison, which alleges that\n");
- printf ("Q == Y while denying that |Q - Y| == 0; these values\n");
- printf ("print out as Q = %.17e, Y = %.17e .\n", Q, Y2);
- printf ("|Q - Y| = %.17e .\n", FABS (Q - Y2));
- UfThold = Q;
- break;
-
- case 3:
- X = X;
- break;
-
- case 4:
- if ((Q == UfThold) && (E1 == E0)
- && (FABS (UfThold - E1 / E9) <= E1)) {
- UfNGrad = False;
- printf ("Underflow is gradual; it incurs Absolute Error =\n");
- printf ("(roundoff in UfThold) < E0.\n");
- Y = E0 * CInvrse;
- Y = Y * (OneAndHalf + U2);
- X = CInvrse * (One + U2);
- Y = Y / X;
- IEEE = (Y == E0);
- }
- }
- if (UfNGrad) {
- printf ("\n");
- sigsave = _sigfpe;
- if (setjmp (ovfl_buf)) {
- printf ("Underflow / UfThold failed!\n");
- R = HVar + HVar;
- } else
- R = SQRT (Underflow / UfThold);
- sigsave = 0;
- if (R <= HVar) {
- Z = R * UfThold;
- X = Z * (One + R * HVar * (One + HVar));
- } else {
- Z = UfThold;
- X = Z * (One + HVar * HVar * (One + HVar));
- }
- if (!((X == Z) || (X - Z != Zero))) {
- BadCond (Flaw, "");
- printf ("X = %.17e\n\tis not equal to Z = %.17e .\n", X, Z);
- Z9 = X - Z;
- printf ("yet X - Z yields %.17e .\n", Z9);
- printf (" Should this NOT signal Underflow, ");
- printf ("this is a SERIOUS DEFECT\nthat causes ");
- printf ("confusion when innocent statements like\n");;
- printf (" if (X == Z) ... else");
- printf (" ... (f(X) - f(Z)) / (X - Z) ...\n");
- printf ("encounter Division by Zero although actually\n");
- sigsave = _sigfpe;
- if (setjmp (ovfl_buf))
- printf ("X / Z fails!\n");
- else
- printf ("X / Z = 1 + %g .\n", (X / Z - Half) - Half);
- sigsave = 0;
- }
- }
- printf ("The Underflow threshold is %.17e, %s\n", UfThold,
- " below which");
- printf ("calculation may suffer larger Relative error than ");
- printf ("merely roundoff.\n");
- Y2 = U1 * U1;
- Y = Y2 * Y2;
- Y2 = Y * U1;
- if (Y2 <= UfThold) {
- if (Y > E0) {
- BadCond (Defect, "");
- I = 5;
- } else {
- BadCond (Serious, "");
- I = 4;
- }
- printf ("Range is too narrow; U1^%d Underflows.\n", I);
- }
- /*=============================================*/
- Milestone = 130;
- /*=============================================*/
- Y = -FLOOR (Half - TwoForty * LOG (UfThold) / LOG (HInvrse)) / TwoForty;
- Y2 = Y + Y;
- printf ("Since underflow occurs below the threshold\n");
- printf ("UfThold = (%.17e) ^ (%.17e)\nonly underflow ", HInvrse, Y);
- printf ("should afflict the expression\n\t(%.17e) ^ (%.17e);\n",
- HInvrse, Y2);
- printf ("actually calculating yields:");
- if (setjmp (ovfl_buf)) {
- sigsave = 0;
- BadCond (Serious, "trap on underflow.\n");
- } else {
- sigsave = _sigfpe;
- V9 = POW (HInvrse, Y2);
- sigsave = 0;
- printf (" %.17e .\n", V9);
- if (!((V9 >= Zero) && (V9 <= (Radix + Radix + E9) * UfThold))) {
- BadCond (Serious, "this is not between 0 and underflow\n");
- printf (" threshold = %.17e .\n", UfThold);
- } else if (!(V9 > UfThold * (One + E9)))
- printf ("This computed value is O.K.\n");
- else {
- BadCond (Defect, "this is not between 0 and underflow\n");
- printf (" threshold = %.17e .\n", UfThold);
- }
- }
- /*=============================================*/
- Milestone = 140;
- /*=============================================*/
- printf ("\n");
- /* ...calculate Exp2 == exp(2) == 7.389056099... */
- X = Zero;
- I = 2;
- Y = Two * Three;
- Q = Zero;
- N = 0;
- do {
- Z = X;
- I = I + 1;
- Y = Y / (I + I);
- R = Y + Q;
- X = Z + R;
- Q = (Z - X) + R;
- }
- while (X > Z);
- Z = (OneAndHalf + One / Eight) + X / (OneAndHalf * ThirtyTwo);
- X = Z * Z;
- Exp2 = X * X;
- X = F9;
- Y = X - U1;
- printf ("Testing X^((X + 1) / (X - 1)) vs. exp(2) = %.17e as X -> 1.\n",
- Exp2);
- for (I = 1;;) {
- Z = X - BInvrse;
- Z = (X + One) / (Z - (One - BInvrse));
- Q = POW (X, Z) - Exp2;
- if (FABS (Q) > TwoForty * U2) {
- N = 1;
- V9 = (X - BInvrse) - (One - BInvrse);
- BadCond (Defect, "Calculated");
- printf (" %.17e for\n", POW (X, Z));
- printf ("\t(1 + (%.17e) ^ (%.17e);\n", V9, Z);
- printf ("\tdiffers from correct value by %.17e .\n", Q);
- printf ("\tThis much error may spoil financial\n");
- printf ("\tcalculations involving tiny interest rates.\n");
- break;
- } else {
- Z = (Y - X) * Two + Y;
- X = Y;
- Y = Z;
- Z = One + (X - F9) * (X - F9);
- if (Z > One && I < NoTrials)
- I++;
- else {
- if (X > One) {
- if (N == 0)
- printf ("Accuracy seems adequate.\n");
- break;
- } else {
- X = One + U2;
- Y = U2 + U2;
- Y += X;
- I = 1;
- }
- }
- }
- }
- /*=============================================*/
- Milestone = 150;
- /*=============================================*/
- printf ("Testing powers Z^Q at four nearly extreme values.\n");
- N = 0;
- Z = A1;
- Q = FLOOR (Half - LOG (C) / LOG (A1));
- Break = False;
- do {
- X = CInvrse;
- Y = POW (Z, Q);
- IsYeqX ();
- Q = -Q;
- X = C;
- Y = POW (Z, Q);
- IsYeqX ();
- if (Z < One)
- Break = True;
- else
- Z = AInvrse;
- }
- while (!(Break));
- PrintIfNPositive ();
- if (N == 0)
- printf (" ... no discrepancies found.\n");
- printf ("\n");
-
- /*=============================================*/
- Milestone = 160;
- /*=============================================*/
- Pause ();
- printf ("Searching for Overflow threshold:\n");
- printf ("This may generate an error.\n");
- Y = -CInvrse;
- V9 = HInvrse * Y;
- sigsave = _sigfpe;
- if (setjmp (ovfl_buf)) {
- I = 0;
- V9 = Y;
- goto overflow;
- }
- do {
- V = Y;
- Y = V9;
- V9 = HInvrse * Y;
- }
- while (V9 < Y);
- I = 1;
- overflow:
- sigsave = 0;
- Z = V9;
- printf ("Can `Z = -Y' overflow?\n");
- printf ("Trying it on Y = %.17e .\n", Y);
- V9 = -Y;
- V0 = V9;
- if (V - Y == V + V0)
- printf ("Seems O.K.\n");
- else {
- printf ("finds a ");
- BadCond (Flaw, "-(-Y) differs from Y.\n");
- }
- if (Z != Y) {
- BadCond (Serious, "");
- printf ("overflow past %.17e\n\tshrinks to %.17e .\n", Y, Z);
- }
- if (I) {
- Y = V * (HInvrse * U2 - HInvrse);
- Z = Y + ((One - HInvrse) * U2) * V;
- if (Z < V0)
- Y = Z;
- if (Y < V0)
- V = Y;
- if (V0 - V < V0)
- V = V0;
- } else {
- V = Y * (HInvrse * U2 - HInvrse);
- V = V + ((One - HInvrse) * U2) * Y;
- }
- printf ("Overflow threshold is V = %.17e .\n", V);
- if (I)
- printf ("Overflow saturates at V0 = %.17e .\n", V0);
- else
- printf ("There is no saturation value because \
-the system traps on overflow.\n");
- V9 = V * One;
- printf ("No Overflow should be signaled for V * 1 = %.17e\n", V9);
- V9 = V / One;
- printf (" nor for V / 1 = %.17e .\n", V9);
- printf ("Any overflow signal separating this * from the one\n");
- printf ("above is a DEFECT.\n");
- /*=============================================*/
- Milestone = 170;
- /*=============================================*/
- if (!(-V < V && -V0 < V0 && -UfThold < V && UfThold < V)) {
- BadCond (Failure, "Comparisons involving ");
- printf ("+-%g, +-%g\nand +-%g are confused by Overflow.",
- V, V0, UfThold);
- }
- /*=============================================*/
- Milestone = 175;
- /*=============================================*/
- printf ("\n");
- for (Indx = 1; Indx <= 3; ++Indx) {
- switch (Indx) {
- case 1:
- Z = UfThold;
- break;
- case 2:
- Z = E0;
- break;
- case 3:
- Z = PseudoZero;
- break;
- }
- if (Z != Zero) {
- V9 = SQRT (Z);
- Y = V9 * V9;
- if (Y / (One - Radix * E9) < Z
- || Y > (One + Radix * E9) * Z) { /* dgh: + E9 --> * E9 */
- if (V9 > U1)
- BadCond (Serious, "");
- else
- BadCond (Defect, "");
- printf ("Comparison alleges that what prints as Z = %.17e\n", Z);
- printf (" is too far from sqrt(Z) ^ 2 = %.17e .\n", Y);
- }
- }
- }
- /*=============================================*/
- Milestone = 180;
- /*=============================================*/
- for (Indx = 1; Indx <= 2; ++Indx) {
- if (Indx == 1)
- Z = V;
- else
- Z = V0;
- V9 = SQRT (Z);
- X = (One - Radix * E9) * V9;
- V9 = V9 * X;
- if (((V9 < (One - Two * Radix * E9) * Z) || (V9 > Z))) {
- Y = V9;
- if (X < WVar)
- BadCond (Serious, "");
- else
- BadCond (Defect, "");
- printf ("Comparison alleges that Z = %17e\n", Z);
- printf (" is too far from sqrt(Z) ^ 2 (%.17e) .\n", Y);
- }
- }
- /*=============================================*/
- Milestone = 190;
- /*=============================================*/
- Pause ();
- X = UfThold * V;
- Y = Radix * Radix;
- if (X * Y < One || X > Y) {
- if (X * Y < U1 || X > Y / U1)
- BadCond (Defect, "Badly");
- else
- BadCond (Flaw, "");
-
- printf (" unbalanced range; UfThold * V = %.17e\n\t%s\n",
- X, "is too far from 1.\n");
- }
- /*=============================================*/
- Milestone = 200;
- /*=============================================*/
- for (Indx = 1; Indx <= 5; ++Indx) {
- X = F9;
- switch (Indx) {
- case 2:
- X = One + U2;
- break;
- case 3:
- X = V;
- break;
- case 4:
- X = UfThold;
- break;
- case 5:
- X = Radix;
- }
- Y = X;
- sigsave = _sigfpe;
- if (setjmp (ovfl_buf))
- printf (" X / X traps when X = %g\n", X);
- else {
- V9 = (Y / X - Half) - Half;
- if (V9 == Zero)
- continue;
- if (V9 == -U1 && Indx < 5)
- BadCond (Flaw, "");
- else
- BadCond (Serious, "");
- printf (" X / X differs from 1 when X = %.17e\n", X);
- printf (" instead, X / X - 1/2 - 1/2 = %.17e .\n", V9);
- }
- sigsave = 0;
- }
- /*=============================================*/
- Milestone = 210;
- /*=============================================*/
- MyZero = Zero;
- printf ("\n");
- printf ("What message and/or values does Division by Zero produce?\n");
-#ifndef BATCHMODE
- printf ("This can interupt your program. You can ");
- printf ("skip this part if you wish.\n");
- printf ("Do you wish to compute 1 / 0? ");
- fflush (stdout);
- read (KEYBOARD, ch, 8);
- if ((ch[0] == 'Y') || (ch[0] == 'y')) {
-#endif /* !BATCHMODE */
- sigsave = _sigfpe;
- printf (" Trying to compute 1 / 0 produces ...");
- if (!setjmp (ovfl_buf))
- printf (" %.7e .\n", One / MyZero);
- sigsave = 0;
-#ifndef BATCHMODE
- } else
- printf ("O.K.\n");
- printf ("\nDo you wish to compute 0 / 0? ");
- fflush (stdout);
- read (KEYBOARD, ch, 80);
- if ((ch[0] == 'Y') || (ch[0] == 'y')) {
-#endif /* !BATCHMODE */
- sigsave = _sigfpe;
- printf ("\n Trying to compute 0 / 0 produces ...");
- if (!setjmp (ovfl_buf))
- printf (" %.7e .\n", Zero / MyZero);
- sigsave = 0;
-#ifndef BATCHMODE
- } else
- printf ("O.K.\n");
-#endif /* !BATCHMODE */
- /*=============================================*/
- Milestone = 220;
- /*=============================================*/
-
- Pause ();
- printf ("\n");
- {
- static char *msg[] =
- {
- "FAILUREs encountered =",
- "SERIOUS DEFECTs discovered =",
- "DEFECTs discovered =",
- "FLAWs discovered ="};
- int i;
- for (i = 0; i < 4; i++)
- if (ErrCnt[i])
- printf ("The number of %-29s %d.\n",
- msg[i], ErrCnt[i]);
- }
-
- printf ("\n");
- if ((ErrCnt[Failure] + ErrCnt[Serious] + ErrCnt[Defect]
- + ErrCnt[Flaw]) > 0) {
- if ((ErrCnt[Failure] + ErrCnt[Serious] + ErrCnt[
- Defect] == 0) && (ErrCnt[Flaw] > 0)) {
- printf ("The arithmetic diagnosed seems ");
- printf ("Satisfactory though flawed.\n");
- }
- if ((ErrCnt[Failure] + ErrCnt[Serious] == 0)
- && (ErrCnt[Defect] > 0)) {
- printf ("The arithmetic diagnosed may be Acceptable\n");
- printf ("despite inconvenient Defects.\n");
- }
- if ((ErrCnt[Failure] + ErrCnt[Serious]) > 0) {
- printf ("The arithmetic diagnosed has ");
- printf ("unacceptable Serious Defects.\n");
- }
- if (ErrCnt[Failure] > 0) {
- printf ("Potentially fatal FAILURE may have spoiled this");
- printf (" program's subsequent diagnoses.\n");
- }
- } else {
-
- printf ("No failures, defects nor flaws have been discovered.\n");
- if (!((RMult == Rounded) && (RDiv == Rounded)
- && (RAddSub == Rounded) && (RSqrt == Rounded)))
- printf ("The arithmetic diagnosed seems Satisfactory.\n");
- else {
- if (StickyBit >= One &&
- (Radix - Two) * (Radix - Nine - One) == Zero) {
- printf ("Rounding appears to conform to ");
- printf ("the proposed IEEE standard P");
- if ((Radix == Two) &&
- ((Precision - Four * Three * Two) *
- (Precision - TwentySeven -
- TwentySeven + One) == Zero))
- printf ("754");
- else
- printf ("854");
- if (IEEE)
- printf (".\n");
- else {
- printf (",\nexcept for possibly Double Rounding");
- printf (" during Gradual Underflow.\n");
- }
- }
- printf ("The arithmetic diagnosed appears to be Excellent!\n");
- }
- }
-
- if (fpecount)
- printf ("\nA total of %d floating point exceptions were registered.\n",
- fpecount);
- printf ("END OF TEST.\n");
- return 0;
-}
-
-FLOAT
-Sign (X)
- FLOAT X;
-{
- return X >= 0. ? 1.0 : -1.0;
-}
-
-void
-Pause ()
-{
-#ifndef BATCHMODE
- char ch[8];
-
- printf ("\nTo continue, press RETURN");
- fflush (stdout);
- read (KEYBOARD, ch, 8);
-#endif /* !BATCHMODE */
-#ifndef CYGNUS
- printf ("\nDiagnosis resumes after milestone Number %d", Milestone);
- printf (" Page: %d\n\n", PageNo);
- ++Milestone;
- ++PageNo;
-#endif /* !CYGNUS */
-}
-
-void
-TstCond (K, Valid, T)
- int K, Valid;
- char *T;
-{
-#ifdef CYGNUS
- printf ("TEST: %s\n", T);
-#endif /* CYGNUS */
- if (!Valid) {
- BadCond (K, T);
- printf (".\n");
- }
-#ifdef CYGNUS
- printf ("PASS: %s\n", T);
-#endif /* CYGNUS */
-}
-
-void
-BadCond (K, T)
- int K;
- char *T;
-{
- static char *msg[] =
- {"FAILURE", "SERIOUS DEFECT", "DEFECT", "FLAW"};
-
- ErrCnt[K] = ErrCnt[K] + 1;
-#ifndef CYGNUS
- printf ("%s: %s", msg[K], T);
-#else
- printf ("ERROR: Severity: %s: %s", msg[K], T);
-#endif /* CYGNUS */
-}
-
-/*
- * Random computes
- * X = (Random1 + Random9)^5
- * Random1 = X - FLOOR(X) + 0.000005 * X;
- * and returns the new value of Random1
-*/
-FLOAT
-Random ()
-{
- FLOAT X, Y;
-
- X = Random1 + Random9;
- Y = X * X;
- Y = Y * Y;
- X = X * Y;
- Y = X - FLOOR (X);
- Random1 = Y + X * 0.000005;
- return (Random1);
-}
-
-void
-SqXMinX (ErrKind)
- int ErrKind;
-{
- FLOAT XA, XB;
-
- XB = X * BInvrse;
- XA = X - XB;
- SqEr = ((SQRT (X * X) - XB) - XA) / OneUlp;
- if (SqEr != Zero) {
- if (SqEr < MinSqEr)
- MinSqEr = SqEr;
- if (SqEr > MaxSqEr)
- MaxSqEr = SqEr;
- J = J + 1.0;
- BadCond (ErrKind, "\n");
- printf ("sqrt( %.17e) - %.17e = %.17e\n", X * X, X, OneUlp * SqEr);
- printf ("\tinstead of correct value 0 .\n");
- }
-}
-
-void
-NewD ()
-{
- X = Z1 * Q;
- X = FLOOR (Half - X / Radix) * Radix + X;
- Q = (Q - X * Z) / Radix + X * X * (D / Radix);
- Z = Z - Two * X * D;
- if (Z <= Zero) {
- Z = -Z;
- Z1 = -Z1;
- }
- D = Radix * D;
-}
-
-void
-SR3750 ()
-{
- if (!((X - Radix < Z2 - Radix) || (X - Z2 > WVar - Z2))) {
- I = I + 1;
- X2 = SQRT (X * D);
- Y2 = (X2 - Z2) - (Y - Z2);
- X2 = X8 / (Y - Half);
- X2 = X2 - Half * X2 * X2;
- SqEr = (Y2 + Half) + (Half - X2);
- if (SqEr < MinSqEr)
- MinSqEr = SqEr;
- SqEr = Y2 - X2;
- if (SqEr > MaxSqEr)
- MaxSqEr = SqEr;
- }
-}
-
-void
-IsYeqX ()
-{
- if (Y != X) {
- if (N <= 0) {
- if (Z == Zero && Q <= Zero)
- printf ("WARNING: computing\n");
- else
- BadCond (Defect, "computing\n");
- printf ("\t(%.17e) ^ (%.17e)\n", Z, Q);
- printf ("\tyielded %.17e;\n", Y);
- printf ("\twhich compared unequal to correct %.17e ;\n",
- X);
- printf ("\t\tthey differ by %.17e .\n", Y - X);
- }
- N = N + 1; /* ... count discrepancies. */
- }
-}
-
-void
-SR3980 ()
-{
- do {
- Q = (FLOAT) I;
- Y = POW (Z, Q);
- IsYeqX ();
- if (++I > M)
- break;
- X = Z * X;
- }
- while (X < WVar);
-}
-
-void
-PrintIfNPositive ()
-{
- if (N > 0)
- printf ("Similar discrepancies have occurred %d times.\n", N);
-}
-
-void
-TstPtUf ()
-{
- N = 0;
- if (Z != Zero) {
- printf ("Since comparison denies Z = 0, evaluating ");
- printf ("(Z + Z) / Z should be safe.\n");
- sigsave = _sigfpe;
- if (setjmp (ovfl_buf))
- goto very_serious;
- Q9 = (Z + Z) / Z;
- printf ("What the machine gets for (Z + Z) / Z is %.17e .\n",
- Q9);
- if (FABS (Q9 - Two) < Radix * U2) {
- printf ("This is O.K., provided Over/Underflow");
- printf (" has NOT just been signaled.\n");
- } else {
- if ((Q9 < One) || (Q9 > Two)) {
- very_serious:
- N = 1;
- ErrCnt[Serious] = ErrCnt[Serious] + 1;
- printf ("This is a VERY SERIOUS DEFECT!\n");
- } else {
- N = 1;
- ErrCnt[Defect] = ErrCnt[Defect] + 1;
- printf ("This is a DEFECT!\n");
- }
- }
- sigsave = 0;
- V9 = Z * One;
- Random1 = V9;
- V9 = One * Z;
- Random2 = V9;
- V9 = Z / One;
- if ((Z == Random1) && (Z == Random2) && (Z == V9)) {
- if (N > 0)
- Pause ();
- } else {
- N = 1;
- BadCond (Defect, "What prints as Z = ");
- printf ("%.17e\n\tcompares different from ", Z);
- if (Z != Random1)
- printf ("Z * 1 = %.17e ", Random1);
- if (!((Z == Random2)
- || (Random2 == Random1)))
- printf ("1 * Z == %g\n", Random2);
- if (!(Z == V9))
- printf ("Z / 1 = %.17e\n", V9);
- if (Random2 != Random1) {
- ErrCnt[Defect] = ErrCnt[Defect] + 1;
- BadCond (Defect, "Multiplication does not commute!\n");
- printf ("\tComparison alleges that 1 * Z = %.17e\n",
- Random2);
- printf ("\tdiffers from Z * 1 = %.17e\n", Random1);
- }
- Pause ();
- }
- }
-}
-
-void
-notify (s)
- char *s;
-{
- printf ("%s test appears to be inconsistent...\n", s);
- printf (" PLEASE NOTIFY KARPINKSI!\n");
-}
-
-void
-msglist (s)
- char **s;
-{
- while (*s)
- printf ("%s\n", *s++);
-}
-
-void
-Instructions ()
-{
- static char *instr[] =
- {
- "Lest this program stop prematurely, i.e. before displaying\n",
- " `END OF TEST',\n",
- "try to persuade the computer NOT to terminate execution when an",
- "error like Over/Underflow or Division by Zero occurs, but rather",
- "to persevere with a surrogate value after, perhaps, displaying some",
- "warning. If persuasion avails naught, don't despair but run this",
- "program anyway to see how many milestones it passes, and then",
- "amend it to make further progress.\n",
- "Answer questions with Y, y, N or n (unless otherwise indicated).\n",
- 0};
-
- msglist (instr);
-}
-
-void
-Heading ()
-{
- static char *head[] =
- {
- "Users are invited to help debug and augment this program so it will",
- "cope with unanticipated and newly uncovered arithmetic pathologies.\n",
- "Please send suggestions and interesting results to",
- "\tRichard Karpinski",
- "\tComputer Center U-76",
- "\tUniversity of California",
- "\tSan Francisco, CA 94143-0704, USA\n",
- "In doing so, please include the following information:",
-#ifdef SINGLE_PRECISION
- "\tPrecision:\tsingle;",
-#else /* !SINGLE_PRECISION */
- "\tPrecision:\tdouble;",
-#endif /* SINGLE_PRECISION */
- "\tVersion:\t10 February 1989;",
- "\tComputer:\n",
- "\tCompiler:\n",
- "\tOptimization level:\n",
- "\tOther relevant compiler options:",
- 0};
-
- msglist (head);
-}
-
-void
-Characteristics ()
-{
- static char *chars[] =
- {
- "Running this program should reveal these characteristics:",
- " Radix = 1, 2, 4, 8, 10, 16, 100, 256 ...",
- " Precision = number of significant digits carried.",
- " U2 = Radix/Radix^Precision = One Ulp",
- "\t(OneUlpnit in the Last Place) of 1.000xxx .",
- " U1 = 1/Radix^Precision = One Ulp of numbers a little less than 1.0 .",
- " Adequacy of guard digits for Mult., Div. and Subt.",
- " Whether arithmetic is chopped, correctly rounded, or something else",
- "\tfor Mult., Div., Add/Subt. and Sqrt.",
- " Whether a Sticky Bit used correctly for rounding.",
- " UnderflowThreshold = an underflow threshold.",
- " E0 and PseudoZero tell whether underflow is abrupt, gradual, or fuzzy.",
- " V = an overflow threshold, roughly.",
- " V0 tells, roughly, whether Infinity is represented.",
- " Comparisions are checked for consistency with subtraction",
- "\tand for contamination with pseudo-zeros.",
- " Sqrt is tested. Y^X is not tested.",
- " Extra-precise subexpressions are revealed but NOT YET tested.",
- " Decimal-Binary conversion is NOT YET tested for accuracy.",
- 0};
-
- msglist (chars);
-}
-
-void
-History ()
-{ /* History */
- /* Converted from Brian Wichmann's Pascal version to C by Thos Sumner,
- with further massaging by David M. Gay. */
-
- static char *hist[] =
- {
- "The program attempts to discriminate among",
- " FLAWs, like lack of a sticky bit,",
- " Serious DEFECTs, like lack of a guard digit, and",
- " FAILUREs, like 2+2 == 5 .",
- "Failures may confound subsequent diagnoses.\n",
- "The diagnostic capabilities of this program go beyond an earlier",
- "program called `MACHAR', which can be found at the end of the",
- "book `Software Manual for the Elementary Functions' (1980) by",
- "W. J. Cody and W. Waite. Although both programs try to discover",
- "the Radix, Precision and range (over/underflow thresholds)",
- "of the arithmetic, this program tries to cope with a wider variety",
- "of pathologies, and to say how well the arithmetic is implemented.",
- "\nThe program is based upon a conventional radix representation for",
- "floating-point numbers, but also allows logarithmic encoding",
- "as used by certain early WANG machines.\n",
- "BASIC version of this program (C) 1983 by Prof. W. M. Kahan;",
- "see source comments for more history.",
- 0};
-
- msglist (hist);
-}
diff --git a/testsuites/samples/paranoia/paranoia.doc b/testsuites/samples/paranoia/paranoia.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/samples/paranoia/paranoia.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/samples/paranoia/system.h b/testsuites/samples/paranoia/system.h
deleted file mode 100644
index 5996032cb1..0000000000
--- a/testsuites/samples/paranoia/system.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-/* configuration information */
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT
-#define CONFIGURE_INIT_TASK_STACK_SIZE (RTEMS_MINIMUM_STACK_SIZE * 2)
-
-#define CONFIGURE_EXTRA_TASK_STACKS (1 * RTEMS_MINIMUM_STACK_SIZE)
-
-#include <confdefs.h>
-
-/* global variables */
-
-TEST_EXTERN rtems_id Global_variable; /* example global variable */
-
-/* end of include file */
diff --git a/testsuites/samples/sample.am b/testsuites/samples/sample.am
deleted file mode 100644
index a294dcc949..0000000000
--- a/testsuites/samples/sample.am
+++ /dev/null
@@ -1,18 +0,0 @@
-project_bspdir=$(PROJECT_ROOT)/@RTEMS_BSP@
-
-$(project_bspdir)/samples:
- @$(mkinstalldirs) $@
-$(project_bspdir)/tests:
- @$(mkinstalldirs) $@
-
-$(project_bspdir)/samples/$(SAMPLE)$(LIB_VARIANT).exe: $(PGM)
- $(INSTALL_PROGRAM) $< $@
-
-$(project_bspdir)/tests/$(SAMPLE)$(LIB_VARIANT).exe: $(PGM)
- $(INSTALL_PROGRAM) $< $@
-
-TMPINSTALL_FILES += \
-$(project_bspdir)/tests \
-$(project_bspdir)/tests/$(SAMPLE)$(LIB_VARIANT).exe \
-$(project_bspdir)/samples \
-$(project_bspdir)/samples/$(SAMPLE)$(LIB_VARIANT).exe
diff --git a/testsuites/samples/ticker/Makefile.am b/testsuites/samples/ticker/Makefile.am
deleted file mode 100644
index 7c699ce03b..0000000000
--- a/testsuites/samples/ticker/Makefile.am
+++ /dev/null
@@ -1,43 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-SAMPLE = ticker
-PGM = ${ARCH}/$(SAMPLE).exe
-
-MANAGERS = io
-
-C_FILES = init.c tasks.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS = $(H_FILES)
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(SAMPLE).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(SAMPLE).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/sample.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-all-local: ${ARCH} $(TMPINSTALL_FILES)
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/samples/ticker/init.c b/testsuites/samples/ticker/init.c
deleted file mode 100644
index cd8c688887..0000000000
--- a/testsuites/samples/ticker/init.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is called from init_exec and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
- rtems_time_of_day time;
-
- puts( "\n\n*** CLOCK TICK TEST ***" );
-
- build_time( &time, 12, 31, 1988, 9, 0, 0, 0 );
- status = rtems_clock_set( &time );
-
- Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
- Task_name[ 2 ] = rtems_build_name( 'T', 'A', '2', ' ' );
- Task_name[ 3 ] = rtems_build_name( 'T', 'A', '3', ' ' );
-
- status = rtems_task_create(
- Task_name[ 1 ], 1, RTEMS_MINIMUM_STACK_SIZE * 2, RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 1 ]
- );
- status = rtems_task_create(
- Task_name[ 2 ], 1, RTEMS_MINIMUM_STACK_SIZE * 2, RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 2 ]
- );
- status = rtems_task_create(
- Task_name[ 3 ], 1, RTEMS_MINIMUM_STACK_SIZE * 2, RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 3 ]
- );
-
- status = rtems_task_start( Task_id[ 1 ], Test_task, 1 );
- status = rtems_task_start( Task_id[ 2 ], Test_task, 2 );
- status = rtems_task_start( Task_id[ 3 ], Test_task, 3 );
-
- status = rtems_task_delete( RTEMS_SELF );
-}
diff --git a/testsuites/samples/ticker/system.h b/testsuites/samples/ticker/system.h
deleted file mode 100644
index 0e50198815..0000000000
--- a/testsuites/samples/ticker/system.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_task Test_task(
- rtems_task_argument argument
-);
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#define CONFIGURE_EXTRA_TASK_STACKS (3 * RTEMS_MINIMUM_STACK_SIZE)
-
-#include <confdefs.h>
-
-/* global variables */
-
-TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
-
-/* end of include file */
diff --git a/testsuites/samples/ticker/tasks.c b/testsuites/samples/ticker/tasks.c
deleted file mode 100644
index b87a26cbbe..0000000000
--- a/testsuites/samples/ticker/tasks.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Test_task
- *
- * This routine serves as a test task. It verifies the basic task
- * switching capabilities of the executive.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Test_task(
- rtems_task_argument unused
-)
-{
- rtems_id tid;
- rtems_time_of_day time;
- rtems_unsigned32 task_index;
- rtems_status_code status;
-
- status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
- task_index = task_number( tid );
- while( FOREVER ) {
- status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
- if ( time.second >= 35 ) {
- puts( "*** END OF CLOCK TICK TEST ***" );
- exit( 0 );
- }
- put_name( Task_name[ task_index ], FALSE );
- print_time( " - rtems_clock_get - ", &time, "\n" );
- status = rtems_task_wake_after( task_index * 5 * TICKS_PER_SECOND );
- }
-}
diff --git a/testsuites/samples/ticker/ticker.doc b/testsuites/samples/ticker/ticker.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/samples/ticker/ticker.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/samples/ticker/ticker.scn b/testsuites/samples/ticker/ticker.scn
deleted file mode 100644
index 35952e6170..0000000000
--- a/testsuites/samples/ticker/ticker.scn
+++ /dev/null
@@ -1,16 +0,0 @@
-*** CLOCK TICK TEST ***
-TA1 - tm_get - 09:00:00 12/31/1988
-TA2 - tm_get - 09:00:00 12/31/1988
-TA3 - tm_get - 09:00:00 12/31/1988
-TA1 - tm_get - 09:00:05 12/31/1988
-TA1 - tm_get - 09:00:10 12/31/1988
-TA2 - tm_get - 09:00:10 12/31/1988
-TA1 - tm_get - 09:00:15 12/31/1988
-TA3 - tm_get - 09:00:15 12/31/1988
-TA1 - tm_get - 09:00:20 12/31/1988
-TA2 - tm_get - 09:00:20 12/31/1988
-TA1 - tm_get - 09:00:25 12/31/1988
-TA1 - tm_get - 09:00:30 12/31/1988
-TA2 - tm_get - 09:00:30 12/31/1988
-TA3 - tm_get - 09:00:30 12/31/1988
-*** END OF CLOCK TICK TEST ***
diff --git a/testsuites/samples/unlimited/Makefile.am b/testsuites/samples/unlimited/Makefile.am
deleted file mode 100644
index 32b865776d..0000000000
--- a/testsuites/samples/unlimited/Makefile.am
+++ /dev/null
@@ -1,43 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-SAMPLE = unlimited
-PGM = ${ARCH}/$(SAMPLE).exe
-
-MANAGERS = io event
-
-C_FILES = init.c test1.c test2.c test3.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS = $(H_FILES)
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(SAMPLE).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(SAMPLE).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/sample.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-all-local: ${ARCH} $(TMPINSTALL_FILES)
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/samples/unlimited/init.c b/testsuites/samples/unlimited/init.c
deleted file mode 100644
index 5036e72527..0000000000
--- a/testsuites/samples/unlimited/init.c
+++ /dev/null
@@ -1,127 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is called from init_exec and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-
-#include "system.h"
-#include <stdio.h>
-
-rtems_id task_id[MAX_TASKS];
-
-void test1();
-void test2();
-
-rtems_task Init(
- rtems_task_argument ignored
-)
-{
- rtems_task_priority old_priority;
- rtems_mode old_mode;
- rtems_unsigned32 task;
-
- /* lower the task priority to allow created tasks to execute */
-
- rtems_task_set_priority(RTEMS_SELF, 20, &old_priority);
- rtems_task_mode(RTEMS_PREEMPT, RTEMS_PREEMPT_MASK, &old_mode);
-
- printf( "\n*** UNLIMITED TASK TEST ***\n" );
-
- /*
- * Invalid state if the task id is 0
- */
-
- for (task = 0; task < MAX_TASKS; task++)
- task_id[task] = 0;
-
- test1();
- test2();
- test3();
-
- printf( "\n*** END OF UNLIMITED TASK TEST ***\n" );
- exit( 0 );
-}
-
-rtems_task test_task(
- rtems_task_argument my_number
- )
-{
- rtems_event_set out;
-
- printf( "task %i has started.\n", my_number);
-
- rtems_event_receive(1, RTEMS_WAIT | RTEMS_EVENT_ANY, 0, &out);
-
- printf( "task %i ending.\n", my_number);
-
- rtems_task_delete(RTEMS_SELF);
-}
-
-void destory_all_tasks(
- const char *who
-)
-{
- rtems_unsigned32 task;
-
- /*
- * If the id is not zero, signal the task to delete.
- */
-
- for (task = 0; task < MAX_TASKS; task++)
- if (task_id[task])
- {
- printf(" %s : signal task %08x to delete, ", who, task_id[task]);
- fflush(stdout);
- rtems_event_send(task_id[task], 1);
- task_id[task] = 0;
- }
-}
-
-boolean status_code_bad(
- rtems_status_code status_code
- )
-{
- if (status_code != RTEMS_SUCCESSFUL)
- {
- printf("failure, ");
-
- if (status_code == RTEMS_TOO_MANY)
- {
- printf("too many.\n");
- return TRUE;
- }
- if (status_code == RTEMS_UNSATISFIED)
- {
- printf("unsatisfied.\n");
- return TRUE;
- }
-
- printf("error code = %i\n", status_code);
- exit( 1 );
- }
- return FALSE;
-}
-
-
-
-
-
diff --git a/testsuites/samples/unlimited/system.h b/testsuites/samples/unlimited/system.h
deleted file mode 100644
index 5be04f0b6d..0000000000
--- a/testsuites/samples/unlimited/system.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_task test_task(
- rtems_task_argument my_number
-);
-
-void
-destory_all_tasks(
- const char *who
-);
-
-boolean status_code_bad(
- rtems_status_code status_code
-);
-
-void test1();
-void test2();
-void test3();
-
-/* configuration information */
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#define TASK_ALLOCATION_SIZE (5)
-#define CONFIGURE_MAXIMUM_TASKS rtems_resource_unlimited(TASK_ALLOCATION_SIZE)
-#define CONFIGURE_EXTRA_TASK_STACKS (62 * RTEMS_MINIMUM_STACK_SIZE)
-
-
-#include <confdefs.h>
-
-/* global variables */
-
-TEST_EXTERN rtems_id Global_variable; /* example global variable */
-
-/*
- * Keep track of the task id's created, use a large array.
- */
-
-#define MAX_TASKS (1000)
-#define TASK_INDEX_OFFSET (1)
-
-extern rtems_id task_id[MAX_TASKS];
-
-/*
- * Increment the task name.
- */
-
-#define NEXT_TASK_NAME(c1, c2, c3, c4) \
- if (c4 == '9') { \
- if (c3 == '9') { \
- if (c2 == 'z') { \
- if (c1 == 'z') { \
- printf("not enough task letters for names !!!\n"); \
- exit( 1 ); \
- } else \
- c1++; \
- c2 = 'a'; \
- } else \
- c2++; \
- c3 = '0'; \
- } else \
- c3++; \
- c4 = '0'; \
- } \
- else \
- c4++ \
-
-
-/* end of include file */
diff --git a/testsuites/samples/unlimited/test1.c b/testsuites/samples/unlimited/test1.c
deleted file mode 100644
index 2d70cc4e82..0000000000
--- a/testsuites/samples/unlimited/test1.c
+++ /dev/null
@@ -1,103 +0,0 @@
-/* Test1
- *
- * This test uses a hack to disable suto-extend then checks to see only the
- * requested number of objects are allocated.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-#include <rtems/score/object.h>
-#include <stdio.h>
-
-void test1()
-{
- boolean auto_extend;
- rtems_status_code result;
- rtems_unsigned32 task_count = 0;
-
- char c1 = 'a';
- char c2 = 'a';
- char c3 = '0';
- char c4 = '0';
-
- printf( "\n TEST1 : auto-extend disabled.\n" );
-
- /*
- * This is a major hack and only recommended for a test. Doing this
- * saves having another test.
- */
-
- auto_extend = _Objects_Information_table[OBJECTS_RTEMS_TASKS]->auto_extend;
- _Objects_Information_table[OBJECTS_RTEMS_TASKS]->auto_extend = FALSE;
-
- while (task_count < MAX_TASKS)
- {
- rtems_name name;
-
- printf(" TEST1 : creating task '%c%c%c%c', ", c1, c2, c3, c4);
-
- name = rtems_build_name(c1, c2, c3, c4);
-
- result = rtems_task_create(name,
- 10,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_ATTRIBUTES,
- RTEMS_LOCAL,
- &task_id[task_count]);
-
- if (status_code_bad(result))
- break;
-
- printf("number = %3i, id = %08x, starting, ", task_count, task_id[task_count]);
-
- fflush(stdout);
- result = rtems_task_start(task_id[task_count],
- test_task,
- (rtems_task_argument) task_count);
-
- if (status_code_bad(result))
- break;
-
- /*
- * Update the name.
- */
-
- NEXT_TASK_NAME(c1, c2, c3, c4);
-
- task_count++;
- }
-
- if (task_count >= MAX_TASKS)
- printf( "\nMAX_TASKS too small for work-space size, please make larger !!\n\n" );
-
- if (task_count != (TASK_ALLOCATION_SIZE - 1)) {
- printf( " FAIL1 : the number of tasks does not equal the expected size -\n"
- " task created = %i, required number = %i\n",
- task_count, TASK_ALLOCATION_SIZE);
- exit( 1 );
- }
-
- destory_all_tasks("TEST1");
-
- _Objects_Information_table[OBJECTS_RTEMS_TASKS]->auto_extend = auto_extend;
-
- printf( " TEST1 : completed\n" );
-}
-
-
-
-
-
diff --git a/testsuites/samples/unlimited/test2.c b/testsuites/samples/unlimited/test2.c
deleted file mode 100644
index 66c0f662d9..0000000000
--- a/testsuites/samples/unlimited/test2.c
+++ /dev/null
@@ -1,229 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is called from init_exec and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-#include <stdio.h>
-
-void test2()
-{
- rtems_status_code result;
- rtems_unsigned32 remove_task;
- rtems_unsigned32 task;
- rtems_unsigned32 block;
- rtems_unsigned32 task_count = 0;
- rtems_id removed_ids[TASK_ALLOCATION_SIZE * 2];
-
- char c1 = 'a';
- char c2 = 'a';
- char c3 = '0';
- char c4 = '0';
-
- printf( "\n TEST2 : re-allocate of index numbers, and a block free'ed and one inactive\n" );
-
- /*
- * Allocate enought tasks so the Inactive list is empty. Remember
- * to count the Init task, ie ... - 1.
- */
-
- while (task_count < ((TASK_ALLOCATION_SIZE * 5) - TASK_INDEX_OFFSET))
- {
- rtems_name name;
-
- printf(" TEST2 : creating task '%c%c%c%c', ", c1, c2, c3, c4);
-
- name = rtems_build_name(c1, c2, c3, c4);
-
- result = rtems_task_create(name,
- 10,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_ATTRIBUTES,
- RTEMS_LOCAL,
- &task_id[task_count]);
-
- if (status_code_bad(result))
- break;
-
- printf("number = %3i, id = %08x, starting, ", task_count, task_id[task_count]);
- fflush(stdout);
-
- result = rtems_task_start(task_id[task_count],
- test_task,
- (rtems_task_argument) task_count);
-
- if (status_code_bad(result))
- break;
-
- /*
- * Update the name.
- */
-
- NEXT_TASK_NAME(c1, c2, c3, c4);
-
- task_count++;
- }
-
- /*
- * Take out the second and fourth allocation size block of tasks
- */
-
- if (task_count != ((TASK_ALLOCATION_SIZE * 5) - TASK_INDEX_OFFSET)) {
- printf( " FAIL2 : not enough tasks created -\n"
- " task created = %i, required number = %i\n",
- task_count, (TASK_ALLOCATION_SIZE * 5) - TASK_INDEX_OFFSET);
- destory_all_tasks("TEST2");
- exit( 1 );
- }
-
- task = 0;
-
- for (block = 1; block < 4; block += 2)
- {
- for (remove_task = (block * TASK_ALLOCATION_SIZE) - TASK_INDEX_OFFSET;
- remove_task < (((block + 1) * TASK_ALLOCATION_SIZE) - TASK_INDEX_OFFSET);
- remove_task++)
- {
- if (!task_id[remove_task])
- {
- printf( " FAIL2 : remove task has a 0 id -\n"
- " task number = %i\n",
- remove_task);
- destory_all_tasks("TEST2");
- exit( 1 );
- }
-
- /*
- * Save the id's to match them against the reallocated ids
- */
-
- removed_ids[task++] = task_id[remove_task];
-
- printf(" TEST2 : block %i remove, signal task %08x, ", block, task_id[remove_task]);
- rtems_event_send(task_id[remove_task], 1);
- task_id[remove_task] = 0;
- }
- }
-
- for (task = 0; task < (TASK_ALLOCATION_SIZE * 2); task++)
- {
- rtems_name name;
- rtems_unsigned32 id_slot;
-
- /*
- * Find a free slot in the task id table.
- */
-
- for (id_slot = 0; id_slot < MAX_TASKS; id_slot++)
- if (!task_id[id_slot])
- break;
-
- if (id_slot == MAX_TASKS)
- {
- printf( " FAIL2 : no free task id slot.\n");
- destory_all_tasks("TEST2");
- exit( 1 );
- }
-
- printf(" TEST2 : creating task '%c%c%c%c', ", c1, c2, c3, c4);
-
- name = rtems_build_name(c1, c2, c3, c4);
-
- result = rtems_task_create(name,
- 10,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_ATTRIBUTES,
- RTEMS_LOCAL,
- &task_id[id_slot]);
-
- if (status_code_bad(result))
- {
- printf( " FAIL2 : re-creating a task -\n"
- " task number = %i\n",
- id_slot);
- destory_all_tasks("TEST2");
- exit( 1 );
- }
-
- printf("number = %3i, id = %08x, starting, ", task_count, task_id[id_slot]);
-
- result = rtems_task_start(task_id[id_slot],
- test_task,
- (rtems_task_argument) task_count);
-
- if (status_code_bad(result))
- {
- printf( " FAIL : re-starting a task -\n"
- " task number = %i\n",
- id_slot);
- destory_all_tasks("TEST2");
- exit( 1 );
- }
-
- /*
- * Update the name.
- */
-
- NEXT_TASK_NAME(c1, c2, c3, c4);
-
- /*
- * Search the removed ids to see if it existed, clear the removed id when found
- */
-
- for (remove_task = 0; remove_task < (TASK_ALLOCATION_SIZE * 2); remove_task++)
- if (removed_ids[remove_task] == task_id[id_slot])
- {
- removed_ids[remove_task] = 0;
- break;
- }
-
- /*
- * If not located in the removed id table, check and make sure it is not
- * already allocated
- */
-
- if (remove_task == (TASK_ALLOCATION_SIZE * 2))
- {
- rtems_unsigned32 allocated_id;
-
- for (allocated_id = 0; allocated_id < MAX_TASKS; allocated_id++)
- if ((task_id[id_slot] == task_id[allocated_id]) && (id_slot != allocated_id))
- {
- printf( " FAIL2 : the new id is the same as an id already allocated -\n"
- " task id = %08x\n",
- task_id[id_slot]);
- exit( 1 );
- }
-
- printf( " FAIL2 : could not find the task id in the removed table -\n"
- " task id = %08x\n",
- task_id[id_slot]);
- exit( 1 );
- }
-
- task_count++;
- }
-
- destory_all_tasks("TEST2");
-
- printf( " TEST2 : completed\n" );
-}
-
diff --git a/testsuites/samples/unlimited/test3.c b/testsuites/samples/unlimited/test3.c
deleted file mode 100644
index 283b548f0e..0000000000
--- a/testsuites/samples/unlimited/test3.c
+++ /dev/null
@@ -1,146 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is called from init_exec and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1997.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-#include <stdio.h>
-
-void test3()
-{
- rtems_status_code result;
- rtems_unsigned32 remove_task;
- rtems_unsigned32 block;
- rtems_unsigned32 task_count = 0;
-
- char c1 = 'a';
- char c2 = 'a';
- char c3 = '0';
- char c4 = '0';
-
- printf( "\n TEST3 : free more than 3 x allocation size, but not the same block,\n"
- " then free a block\n");
-
- /*
- * Check the value of the allocation unit
- */
-
- if (TASK_ALLOCATION_SIZE < 4)
- {
- printf( " FAIL3 : task allocation size must be greater than 4.\n");
- exit( 1 );
- }
-
- /*
- * Allocate as many tasks as possible.
- */
-
- while (task_count < MAX_TASKS)
- {
- rtems_name name;
-
- printf(" TEST3 : creating task '%c%c%c%c', ", c1, c2, c3, c4);
-
- name = rtems_build_name(c1, c2, c3, c4);
-
- result = rtems_task_create(name,
- 10,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_ATTRIBUTES,
- RTEMS_LOCAL,
- &task_id[task_count]);
-
- if (status_code_bad(result))
- break;
-
- printf("number = %3i, id = %08x, starting, ", task_count, task_id[task_count]);
- fflush(stdout);
-
- result = rtems_task_start(task_id[task_count],
- test_task,
- (rtems_task_argument) task_count);
-
- if (status_code_bad(result))
- break;
-
- /*
- * Update the name.
- */
-
- NEXT_TASK_NAME(c1, c2, c3, c4);
-
- task_count++;
- }
-
- /*
- * Take out 3 tasks from each block of allocated tasks. Do this for
- * allocation size number of blocks.
- */
-
- if (task_count < (TASK_ALLOCATION_SIZE * 11))
- {
- printf( " FAIL3 : not enough tasks created -\n"
- " task created = %i, required number = %i\n",
- task_count, (TASK_ALLOCATION_SIZE * 11));
- exit( 1 );
- }
-
- for (block = 0; block < TASK_ALLOCATION_SIZE; block++)
- {
- for (remove_task = ((block * TASK_ALLOCATION_SIZE) - TASK_INDEX_OFFSET);
- remove_task < (((block * TASK_ALLOCATION_SIZE) + 3) - TASK_INDEX_OFFSET);
- remove_task++)
- {
- if (!task_id[remove_task])
- {
- printf( " FAIL3 : remove task has a 0 id -\n"
- " task number = %i\n",
- remove_task);
- exit( 1 );
- }
-
- printf(" TEST3 : remove, signal task %08x, ", task_id[remove_task]);
- rtems_event_send(task_id[remove_task], 1);
- task_id[remove_task] = 0;
- }
- }
-
- /*
- * Remove a complete block, not the first, forces a scan of the blocks in the
- * allocator's free routine
- */
-
- for (remove_task = (TASK_ALLOCATION_SIZE - TASK_INDEX_OFFSET);
- remove_task < ((TASK_ALLOCATION_SIZE * 2) - - TASK_INDEX_OFFSET);
- remove_task++)
- {
- if (task_id[remove_task])
- {
- printf(" TEST3 : remove, signal task %08x, ", task_id[remove_task]);
- rtems_event_send(task_id[remove_task], 1);
- task_id[remove_task] = 0;
- }
- }
-
- destory_all_tasks("TEST3");
-
- printf( " TEST3 : completed\n" );
-}
diff --git a/testsuites/samples/unlimited/unlimited.doc b/testsuites/samples/unlimited/unlimited.doc
deleted file mode 100644
index aad9af7f8a..0000000000
--- a/testsuites/samples/unlimited/unlimited.doc
+++ /dev/null
@@ -1,37 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1997.
-# On-Line Applications Research Corporation (OAR).
-# Copyright assigned to U.S. Government, 1994.
-#
-# The license and distribution terms for this file may in
-# the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: test1
-
-directives:
- _Object_Allocate, _Object_Free, _Object_Extend_information,
- _Object_Shrink_information
-
-concepts:
-
- a. Verifies when the auto-extend is false the number of objects does
- not grow, and the number of objects is the maximum number specified
- in the Configuration table.
-
- b. Verify the re-allocation of index numbers, and a block of objects is
- freed while another remains yet all it objects are not in
- use. Four blocks of the allocation size of objects are created,
- then the first and third blocks are freed. Only the first
- block's memory will be released, while the second remains. This
- is due the allocation hystersis.
-
- c. Allocate as many objects are the work-space can hold. Free objects
- from a number of blocks with-out freeing the blocks. Free the remaining
- blocks.
-
diff --git a/testsuites/samples/unlimited/unlimited.scn b/testsuites/samples/unlimited/unlimited.scn
deleted file mode 100644
index f1c026fe4b..0000000000
--- a/testsuites/samples/unlimited/unlimited.scn
+++ /dev/null
@@ -1,337 +0,0 @@
-
-*** UNLIMITED TASK TEST ***
-
- TEST1 : auto-extend disabled.
- TEST1 : creating task 'aa00', number = 0, id = 08010002, starting, task 0 has started.
- TEST1 : creating task 'aa01', number = 1, id = 08010003, starting, task 1 has started.
- TEST1 : creating task 'aa02', number = 2, id = 08010004, starting, task 2 has started.
- TEST1 : creating task 'aa03', number = 3, id = 08010005, starting, task 3 has started.
- TEST1 : creating task 'aa04', failure, too many.
- TEST1 : signal task 08010002 to delete, task 0 ending.
- TEST1 : signal task 08010003 to delete, task 1 ending.
- TEST1 : signal task 08010004 to delete, task 2 ending.
- TEST1 : signal task 08010005 to delete, task 3 ending.
- TEST1 : completed
-
- TEST2 : re-allocate of index numbers, and a block free'ed and one inactive
- TEST2 : creating task 'aa00', number = 0, id = 08010002, starting, task 0 has started.
- TEST2 : creating task 'aa01', number = 1, id = 08010003, starting, task 1 has started.
- TEST2 : creating task 'aa02', number = 2, id = 08010004, starting, task 2 has started.
- TEST2 : creating task 'aa03', number = 3, id = 08010005, starting, task 3 has started.
- TEST2 : creating task 'aa04', number = 4, id = 08010006, starting, task 4 has started.
- TEST2 : creating task 'aa05', number = 5, id = 08010007, starting, task 5 has started.
- TEST2 : creating task 'aa06', number = 6, id = 08010008, starting, task 6 has started.
- TEST2 : creating task 'aa07', number = 7, id = 08010009, starting, task 7 has started.
- TEST2 : creating task 'aa08', number = 8, id = 0801000a, starting, task 8 has started.
- TEST2 : creating task 'aa09', number = 9, id = 0801000b, starting, task 9 has started.
- TEST2 : creating task 'aa10', number = 10, id = 0801000c, starting, task 10 has started.
- TEST2 : creating task 'aa11', number = 11, id = 0801000d, starting, task 11 has started.
- TEST2 : creating task 'aa12', number = 12, id = 0801000e, starting, task 12 has started.
- TEST2 : creating task 'aa13', number = 13, id = 0801000f, starting, task 13 has started.
- TEST2 : creating task 'aa14', number = 14, id = 08010010, starting, task 14 has started.
- TEST2 : creating task 'aa15', number = 15, id = 08010011, starting, task 15 has started.
- TEST2 : creating task 'aa16', number = 16, id = 08010012, starting, task 16 has started.
- TEST2 : creating task 'aa17', number = 17, id = 08010013, starting, task 17 has started.
- TEST2 : creating task 'aa18', number = 18, id = 08010014, starting, task 18 has started.
- TEST2 : creating task 'aa19', number = 19, id = 08010015, starting, task 19 has started.
- TEST2 : creating task 'aa20', number = 20, id = 08010016, starting, task 20 has started.
- TEST2 : creating task 'aa21', number = 21, id = 08010017, starting, task 21 has started.
- TEST2 : creating task 'aa22', number = 22, id = 08010018, starting, task 22 has started.
- TEST2 : creating task 'aa23', number = 23, id = 08010019, starting, task 23 has started.
- TEST2 : block 1 remove, signal task 08010006, task 4 ending.
- TEST2 : block 1 remove, signal task 08010007, task 5 ending.
- TEST2 : block 1 remove, signal task 08010008, task 6 ending.
- TEST2 : block 1 remove, signal task 08010009, task 7 ending.
- TEST2 : block 1 remove, signal task 0801000a, task 8 ending.
- TEST2 : block 3 remove, signal task 08010010, task 14 ending.
- TEST2 : block 3 remove, signal task 08010011, task 15 ending.
- TEST2 : block 3 remove, signal task 08010012, task 16 ending.
- TEST2 : block 3 remove, signal task 08010013, task 17 ending.
- TEST2 : block 3 remove, signal task 08010014, task 18 ending.
- TEST2 : creating task 'aa24', number = 24, id = 08010010, starting, task 24 has started.
- TEST2 : creating task 'aa25', number = 25, id = 08010011, starting, task 25 has started.
- TEST2 : creating task 'aa26', number = 26, id = 08010012, starting, task 26 has started.
- TEST2 : creating task 'aa27', number = 27, id = 08010013, starting, task 27 has started.
- TEST2 : creating task 'aa28', number = 28, id = 08010014, starting, task 28 has started.
- TEST2 : creating task 'aa29', number = 29, id = 08010006, starting, task 29 has started.
- TEST2 : creating task 'aa30', number = 30, id = 08010007, starting, task 30 has started.
- TEST2 : creating task 'aa31', number = 31, id = 08010008, starting, task 31 has started.
- TEST2 : creating task 'aa32', number = 32, id = 08010009, starting, task 32 has started.
- TEST2 : creating task 'aa33', number = 33, id = 0801000a, starting, task 33 has started.
- TEST2 : signal task 08010002 to delete, task 0 ending.
- TEST2 : signal task 08010003 to delete, task 1 ending.
- TEST2 : signal task 08010004 to delete, task 2 ending.
- TEST2 : signal task 08010005 to delete, task 3 ending.
- TEST2 : signal task 08010010 to delete, task 24 ending.
- TEST2 : signal task 08010011 to delete, task 25 ending.
- TEST2 : signal task 08010012 to delete, task 26 ending.
- TEST2 : signal task 08010013 to delete, task 27 ending.
- TEST2 : signal task 08010014 to delete, task 28 ending.
- TEST2 : signal task 0801000b to delete, task 9 ending.
- TEST2 : signal task 0801000c to delete, task 10 ending.
- TEST2 : signal task 0801000d to delete, task 11 ending.
- TEST2 : signal task 0801000e to delete, task 12 ending.
- TEST2 : signal task 0801000f to delete, task 13 ending.
- TEST2 : signal task 08010006 to delete, task 29 ending.
- TEST2 : signal task 08010007 to delete, task 30 ending.
- TEST2 : signal task 08010008 to delete, task 31 ending.
- TEST2 : signal task 08010009 to delete, task 32 ending.
- TEST2 : signal task 0801000a to delete, task 33 ending.
- TEST2 : signal task 08010015 to delete, task 19 ending.
- TEST2 : signal task 08010016 to delete, task 20 ending.
- TEST2 : signal task 08010017 to delete, task 21 ending.
- TEST2 : signal task 08010018 to delete, task 22 ending.
- TEST2 : signal task 08010019 to delete, task 23 ending.
- TEST2 : completed
- TEST3 : free more than 3 x allocation size, but not the same block,
- then free a block
- TEST3 : creating task 'aa00', number = 0, id = 08010002, starting, task 0 has started.
- TEST3 : creating task 'aa01', number = 1, id = 08010003, starting, task 1 has started.
- TEST3 : creating task 'aa02', number = 2, id = 08010004, starting, task 2 has started.
- TEST3 : creating task 'aa03', number = 3, id = 08010005, starting, task 3 has started.
- TEST3 : creating task 'aa04', number = 4, id = 08010015, starting, task 4 has started.
- TEST3 : creating task 'aa05', number = 5, id = 08010016, starting, task 5 has started.
- TEST3 : creating task 'aa06', number = 6, id = 08010017, starting, task 6 has started.
- TEST3 : creating task 'aa07', number = 7, id = 08010018, starting, task 7 has started.
- TEST3 : creating task 'aa08', number = 8, id = 08010019, starting, task 8 has started.
- TEST3 : creating task 'aa09', number = 9, id = 08010006, starting, task 9 has started.
- TEST3 : creating task 'aa10', number = 10, id = 08010007, starting, task 10 has started.
- TEST3 : creating task 'aa11', number = 11, id = 08010008, starting, task 11 has started.
- TEST3 : creating task 'aa12', number = 12, id = 08010009, starting, task 12 has started.
- TEST3 : creating task 'aa13', number = 13, id = 0801000a, starting, task 13 has started.
- TEST3 : creating task 'aa14', number = 14, id = 0801000b, starting, task 14 has started.
- TEST3 : creating task 'aa15', number = 15, id = 0801000c, starting, task 15 has started.
- TEST3 : creating task 'aa16', number = 16, id = 0801000d, starting, task 16 has started.
- TEST3 : creating task 'aa17', number = 17, id = 0801000e, starting, task 17 has started.
- TEST3 : creating task 'aa18', number = 18, id = 0801000f, starting, task 18 has started.
- TEST3 : creating task 'aa19', number = 19, id = 08010010, starting, task 19 has started.
- TEST3 : creating task 'aa20', number = 20, id = 08010011, starting, task 20 has started.
- TEST3 : creating task 'aa21', number = 21, id = 08010012, starting, task 21 has started.
- TEST3 : creating task 'aa22', number = 22, id = 08010013, starting, task 22 has started.
- TEST3 : creating task 'aa23', number = 23, id = 08010014, starting, task 23 has started.
- TEST3 : creating task 'aa24', number = 24, id = 0801001a, starting, task 24 has started.
- TEST3 : creating task 'aa25', number = 25, id = 0801001b, starting, task 25 has started.
- TEST3 : creating task 'aa26', number = 26, id = 0801001c, starting, task 26 has started.
- TEST3 : creating task 'aa27', number = 27, id = 0801001d, starting, task 27 has started.
- TEST3 : creating task 'aa28', number = 28, id = 0801001e, starting, task 28 has started.
- TEST3 : creating task 'aa29', number = 29, id = 0801001f, starting, task 29 has started.
- TEST3 : creating task 'aa30', number = 30, id = 08010020, starting, task 30 has started.
- TEST3 : creating task 'aa31', number = 31, id = 08010021, starting, task 31 has started.
- TEST3 : creating task 'aa32', number = 32, id = 08010022, starting, task 32 has started.
- TEST3 : creating task 'aa33', number = 33, id = 08010023, starting, task 33 has started.
- TEST3 : creating task 'aa34', number = 34, id = 08010024, starting, task 34 has started.
- TEST3 : creating task 'aa35', number = 35, id = 08010025, starting, task 35 has started.
- TEST3 : creating task 'aa36', number = 36, id = 08010026, starting, task 36 has started.
- TEST3 : creating task 'aa37', number = 37, id = 08010027, starting, task 37 has started.
- TEST3 : creating task 'aa38', number = 38, id = 08010028, starting, task 38 has started.
- TEST3 : creating task 'aa39', number = 39, id = 08010029, starting, task 39 has started.
- TEST3 : creating task 'aa40', number = 40, id = 0801002a, starting, task 40 has started.
- TEST3 : creating task 'aa41', number = 41, id = 0801002b, starting, task 41 has started.
- TEST3 : creating task 'aa42', number = 42, id = 0801002c, starting, task 42 has started.
- TEST3 : creating task 'aa43', number = 43, id = 0801002d, starting, task 43 has started.
- TEST3 : creating task 'aa44', number = 44, id = 0801002e, starting, task 44 has started.
- TEST3 : creating task 'aa45', number = 45, id = 0801002f, starting, task 45 has started.
- TEST3 : creating task 'aa46', number = 46, id = 08010030, starting, task 46 has started.
- TEST3 : creating task 'aa47', number = 47, id = 08010031, starting, task 47 has started.
- TEST3 : creating task 'aa48', number = 48, id = 08010032, starting, task 48 has started.
- TEST3 : creating task 'aa49', number = 49, id = 08010033, starting, task 49 has started.
- TEST3 : creating task 'aa50', number = 50, id = 08010034, starting, task 50 has started.
- TEST3 : creating task 'aa51', number = 51, id = 08010035, starting, task 51 has started.
- TEST3 : creating task 'aa52', number = 52, id = 08010036, starting, task 52 has started.
- TEST3 : creating task 'aa53', number = 53, id = 08010037, starting, task 53 has started.
- TEST3 : creating task 'aa54', number = 54, id = 08010038, starting, task 54 has started.
- TEST3 : creating task 'aa55', number = 55, id = 08010039, starting, task 55 has started.
- TEST3 : creating task 'aa56', number = 56, id = 0801003a, starting, task 56 has started.
- TEST3 : creating task 'aa57', number = 57, id = 0801003b, starting, task 57 has started.
- TEST3 : creating task 'aa58', number = 58, id = 0801003c, starting, task 58 has started.
- TEST3 : creating task 'aa59', number = 59, id = 0801003d, starting, task 59 has started.
- TEST3 : creating task 'aa60', number = 60, id = 0801003e, starting, task 60 has started.
- TEST3 : creating task 'aa61', number = 61, id = 0801003f, starting, task 61 has started.
- TEST3 : creating task 'aa62', number = 62, id = 08010040, starting, task 62 has started.
- TEST3 : creating task 'aa63', number = 63, id = 08010041, starting, task 63 has started.
- TEST3 : creating task 'aa64', number = 64, id = 08010042, starting, task 64 has started.
- TEST3 : creating task 'aa65', number = 65, id = 08010043, starting, task 65 has started.
- TEST3 : creating task 'aa66', number = 66, id = 08010044, starting, task 66 has started.
- TEST3 : creating task 'aa67', number = 67, id = 08010045, starting, task 67 has started.
- TEST3 : creating task 'aa68', number = 68, id = 08010046, starting, task 68 has started.
- TEST3 : creating task 'aa69', number = 69, id = 08010047, starting, task 69 has started.
- TEST3 : creating task 'aa70', number = 70, id = 08010048, starting, task 70 has started.
- TEST3 : creating task 'aa71', number = 71, id = 08010049, starting, task 71 has started.
- TEST3 : creating task 'aa72', number = 72, id = 0801004a, starting, task 72 has started.
- TEST3 : creating task 'aa73', number = 73, id = 0801004b, starting, task 73 has started.
- TEST3 : creating task 'aa74', number = 74, id = 0801004c, starting, task 74 has started.
- TEST3 : creating task 'aa75', number = 75, id = 0801004d, starting, task 75 has started.
- TEST3 : creating task 'aa76', number = 76, id = 0801004e, starting, task 76 has started.
- TEST3 : creating task 'aa77', number = 77, id = 0801004f, starting, task 77 has started.
- TEST3 : creating task 'aa78', number = 78, id = 08010050, starting, task 78 has started.
- TEST3 : creating task 'aa79', number = 79, id = 08010051, starting, task 79 has started.
- TEST3 : creating task 'aa80', number = 80, id = 08010052, starting, task 80 has started.
- TEST3 : creating task 'aa81', number = 81, id = 08010053, starting, task 81 has started.
- TEST3 : creating task 'aa82', number = 82, id = 08010054, starting, task 82 has started.
- TEST3 : creating task 'aa83', number = 83, id = 08010055, starting, task 83 has started.
- TEST3 : creating task 'aa84', number = 84, id = 08010056, starting, task 84 has started.
- TEST3 : creating task 'aa85', number = 85, id = 08010057, starting, task 85 has started.
- TEST3 : creating task 'aa86', number = 86, id = 08010058, starting, task 86 has started.
- TEST3 : creating task 'aa87', number = 87, id = 08010059, starting, task 87 has started.
- TEST3 : creating task 'aa88', number = 88, id = 0801005a, starting, task 88 has started.
- TEST3 : creating task 'aa89', number = 89, id = 0801005b, starting, task 89 has started.
- TEST3 : creating task 'aa90', number = 90, id = 0801005c, starting, task 90 has started.
- TEST3 : creating task 'aa91', number = 91, id = 0801005d, starting, task 91 has started.
- TEST3 : creating task 'aa92', number = 92, id = 0801005e, starting, task 92 has started.
- TEST3 : creating task 'aa93', number = 93, id = 0801005f, starting, task 93 has started.
- TEST3 : creating task 'aa94', number = 94, id = 08010060, starting, task 94 has started.
- TEST3 : creating task 'aa95', number = 95, id = 08010061, starting, task 95 has started.
- TEST3 : creating task 'aa96', number = 96, id = 08010062, starting, task 96 has started.
- TEST3 : creating task 'aa97', number = 97, id = 08010063, starting, task 97 has started.
- TEST3 : creating task 'aa98', number = 98, id = 08010064, starting, task 98 has started.
- TEST3 : creating task 'aa99', number = 99, id = 08010065, starting, task 99 has started.
- TEST3 : creating task 'ab00', number = 100, id = 08010066, starting, task 100 has started.
- TEST3 : creating task 'ab01', number = 101, id = 08010067, starting, task 101 has started.
- TEST3 : creating task 'ab02', number = 102, id = 08010068, starting, task 102 has started.
- TEST3 : creating task 'ab03', number = 103, id = 08010069, starting, task 103 has started.
- TEST3 : creating task 'ab04', number = 104, id = 0801006a, starting, task 104 has started.
- TEST3 : creating task 'ab05', number = 105, id = 0801006b, starting, task 105 has started.
- TEST3 : creating task 'ab06', number = 106, id = 0801006c, starting, task 106 has started.
- TEST3 : creating task 'ab07', number = 107, id = 0801006d, starting, task 107 has started.
- TEST3 : creating task 'ab08', number = 108, id = 0801006e, starting, task 108 has started.
- TEST3 : creating task 'ab09', number = 109, id = 0801006f, starting, task 109 has started.
- TEST3 : creating task 'ab10', number = 110, id = 08010070, starting, task 110 has started.
- TEST3 : creating task 'ab11', number = 111, id = 08010071, starting, task 111 has started.
- TEST3 : creating task 'ab12', number = 112, id = 08010072, starting, task 112 has started.
- TEST3 : creating task 'ab13', number = 113, id = 08010073, starting, task 113 has started.
- TEST3 : creating task 'ab14', number = 114, id = 08010074, starting, task 114 has started.
- TEST3 : creating task 'ab15', number = 115, id = 08010075, starting, task 115 has started.
- TEST3 : creating task 'ab16', number = 116, id = 08010076, starting, task 116 has started.
- TEST3 : creating task 'ab17', number = 117, id = 08010077, starting, task 117 has started.
- TEST3 : creating task 'ab18', number = 118, id = 08010078, starting, task 118 has started.
- TEST3 : creating task 'ab19', number = 119, id = 08010079, starting, task 119 has started.
- TEST3 : creating task 'ab20', number = 120, id = 0801007a, starting, task 120 has started.
- TEST3 : creating task 'ab21', failure, unsatisfied.
- TEST3 : remove, signal task 08010015, task 4 ending.
- TEST3 : remove, signal task 08010016, task 5 ending.
- TEST3 : remove, signal task 08010017, task 6 ending.
- TEST3 : remove, signal task 08010006, task 9 ending.
- TEST3 : remove, signal task 08010007, task 10 ending.
- TEST3 : remove, signal task 08010008, task 11 ending.
- TEST3 : remove, signal task 0801000b, task 14 ending.
- TEST3 : remove, signal task 0801000c, task 15 ending.
- TEST3 : remove, signal task 0801000d, task 16 ending.
- TEST3 : remove, signal task 08010010, task 19 ending.
- TEST3 : remove, signal task 08010011, task 20 ending.
- TEST3 : remove, signal task 08010012, task 21 ending.
- TEST3 : remove, signal task 08010018, task 7 ending.
- TEST3 : remove, signal task 08010019, task 8 ending.
- TEST3 : signal task 08010002 to delete, task 0 ending.
- TEST3 : signal task 08010003 to delete, task 1 ending.
- TEST3 : signal task 08010004 to delete, task 2 ending.
- TEST3 : signal task 08010005 to delete, task 3 ending.
- TEST3 : signal task 08010009 to delete, task 12 ending.
- TEST3 : signal task 0801000a to delete, task 13 ending.
- TEST3 : signal task 0801000e to delete, task 17 ending.
- TEST3 : signal task 0801000f to delete, task 18 ending.
- TEST3 : signal task 08010013 to delete, task 22 ending.
- TEST3 : signal task 08010014 to delete, task 23 ending.
- TEST3 : signal task 0801001a to delete, task 24 ending.
- TEST3 : signal task 0801001b to delete, task 25 ending.
- TEST3 : signal task 0801001c to delete, task 26 ending.
- TEST3 : signal task 0801001d to delete, task 27 ending.
- TEST3 : signal task 0801001e to delete, task 28 ending.
- TEST3 : signal task 0801001f to delete, task 29 ending.
- TEST3 : signal task 08010020 to delete, task 30 ending.
- TEST3 : signal task 08010021 to delete, task 31 ending.
- TEST3 : signal task 08010022 to delete, task 32 ending.
- TEST3 : signal task 08010023 to delete, task 33 ending.
- TEST3 : signal task 08010024 to delete, task 34 ending.
- TEST3 : signal task 08010025 to delete, task 35 ending.
- TEST3 : signal task 08010026 to delete, task 36 ending.
- TEST3 : signal task 08010027 to delete, task 37 ending.
- TEST3 : signal task 08010028 to delete, task 38 ending.
- TEST3 : signal task 08010029 to delete, task 39 ending.
- TEST3 : signal task 0801002a to delete, task 40 ending.
- TEST3 : signal task 0801002b to delete, task 41 ending.
- TEST3 : signal task 0801002c to delete, task 42 ending.
- TEST3 : signal task 0801002d to delete, task 43 ending.
- TEST3 : signal task 0801002e to delete, task 44 ending.
- TEST3 : signal task 0801002f to delete, task 45 ending.
- TEST3 : signal task 08010030 to delete, task 46 ending.
- TEST3 : signal task 08010031 to delete, task 47 ending.
- TEST3 : signal task 08010032 to delete, task 48 ending.
- TEST3 : signal task 08010033 to delete, task 49 ending.
- TEST3 : signal task 08010034 to delete, task 50 ending.
- TEST3 : signal task 08010035 to delete, task 51 ending.
- TEST3 : signal task 08010036 to delete, task 52 ending.
- TEST3 : signal task 08010037 to delete, task 53 ending.
- TEST3 : signal task 08010038 to delete, task 54 ending.
- TEST3 : signal task 08010039 to delete, task 55 ending.
- TEST3 : signal task 0801003a to delete, task 56 ending.
- TEST3 : signal task 0801003b to delete, task 57 ending.
- TEST3 : signal task 0801003c to delete, task 58 ending.
- TEST3 : signal task 0801003d to delete, task 59 ending.
- TEST3 : signal task 0801003e to delete, task 60 ending.
- TEST3 : signal task 0801003f to delete, task 61 ending.
- TEST3 : signal task 08010040 to delete, task 62 ending.
- TEST3 : signal task 08010041 to delete, task 63 ending.
- TEST3 : signal task 08010042 to delete, task 64 ending.
- TEST3 : signal task 08010043 to delete, task 65 ending.
- TEST3 : signal task 08010044 to delete, task 66 ending.
- TEST3 : signal task 08010045 to delete, task 67 ending.
- TEST3 : signal task 08010046 to delete, task 68 ending.
- TEST3 : signal task 08010047 to delete, task 69 ending.
- TEST3 : signal task 08010048 to delete, task 70 ending.
- TEST3 : signal task 08010049 to delete, task 71 ending.
- TEST3 : signal task 0801004a to delete, task 72 ending.
- TEST3 : signal task 0801004b to delete, task 73 ending.
- TEST3 : signal task 0801004c to delete, task 74 ending.
- TEST3 : signal task 0801004d to delete, task 75 ending.
- TEST3 : signal task 0801004e to delete, task 76 ending.
- TEST3 : signal task 0801004f to delete, task 77 ending.
- TEST3 : signal task 08010050 to delete, task 78 ending.
- TEST3 : signal task 08010051 to delete, task 79 ending.
- TEST3 : signal task 08010052 to delete, task 80 ending.
- TEST3 : signal task 08010053 to delete, task 81 ending.
- TEST3 : signal task 08010054 to delete, task 82 ending.
- TEST3 : signal task 08010055 to delete, task 83 ending.
- TEST3 : signal task 08010056 to delete, task 84 ending.
- TEST3 : signal task 08010057 to delete, task 85 ending.
- TEST3 : signal task 08010058 to delete, task 86 ending.
- TEST3 : signal task 08010059 to delete, task 87 ending.
- TEST3 : signal task 0801005a to delete, task 88 ending.
- TEST3 : signal task 0801005b to delete, task 89 ending.
- TEST3 : signal task 0801005c to delete, task 90 ending.
- TEST3 : signal task 0801005d to delete, task 91 ending.
- TEST3 : signal task 0801005e to delete, task 92 ending.
- TEST3 : signal task 0801005f to delete, task 93 ending.
- TEST3 : signal task 08010060 to delete, task 94 ending.
- TEST3 : signal task 08010061 to delete, task 95 ending.
- TEST3 : signal task 08010062 to delete, task 96 ending.
- TEST3 : signal task 08010063 to delete, task 97 ending.
- TEST3 : signal task 08010064 to delete, task 98 ending.
- TEST3 : signal task 08010065 to delete, task 99 ending.
- TEST3 : signal task 08010066 to delete, task 100 ending.
- TEST3 : signal task 08010067 to delete, task 101 ending.
- TEST3 : signal task 08010068 to delete, task 102 ending.
- TEST3 : signal task 08010069 to delete, task 103 ending.
- TEST3 : signal task 0801006a to delete, task 104 ending.
- TEST3 : signal task 0801006b to delete, task 105 ending.
- TEST3 : signal task 0801006c to delete, task 106 ending.
- TEST3 : signal task 0801006d to delete, task 107 ending.
- TEST3 : signal task 0801006e to delete, task 108 ending.
- TEST3 : signal task 0801006f to delete, task 109 ending.
- TEST3 : signal task 08010070 to delete, task 110 ending.
- TEST3 : signal task 08010071 to delete, task 111 ending.
- TEST3 : signal task 08010072 to delete, task 112 ending.
- TEST3 : signal task 08010073 to delete, task 113 ending.
- TEST3 : signal task 08010074 to delete, task 114 ending.
- TEST3 : signal task 08010075 to delete, task 115 ending.
- TEST3 : signal task 08010076 to delete, task 116 ending.
- TEST3 : signal task 08010077 to delete, task 117 ending.
- TEST3 : signal task 08010078 to delete, task 118 ending.
- TEST3 : signal task 08010079 to delete, task 119 ending.
- TEST3 : signal task 0801007a to delete, task 120 ending.
- TEST3 : completed
-
-*** END OF UNLIMITED TASK TEST ***
-
-NOTE: The failures are expected. This is the limiting factor, memory in the
- work-space.
-NOTE: The number of tasks may vary due to the size of the work-space.
diff --git a/testsuites/sptests/Makefile.am b/testsuites/sptests/Makefile.am
deleted file mode 100644
index 7452d72394..0000000000
--- a/testsuites/sptests/Makefile.am
+++ /dev/null
@@ -1,16 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-
-## sp10 and spfatal are not included for now
-SUBDIRS = sp01 sp02 sp03 sp04 sp05 sp06 sp07 sp08 sp09 sp11 sp12 sp13 sp14 \
- sp15 sp16 sp17 sp19 sp20 sp21 sp22 sp23 sp24 sp25 sp26 sp27 sp28 sp29 \
- spsize
-
-EXTRA_DIST = sptests.am spfatal
-
-include $(top_srcdir)/../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/sptests/README b/testsuites/sptests/README
deleted file mode 100644
index 2843063c31..0000000000
--- a/testsuites/sptests/README
+++ /dev/null
@@ -1,9 +0,0 @@
-#
-# $Id$
-#
-
-This directory contains the RTEMS Single Processor Test Suite.
-The tests in this directory provide near complete (98%+) test
-coverage of the non-multiprocessor code in RTEMS.
-
-
diff --git a/testsuites/sptests/sp01/Makefile.am b/testsuites/sptests/sp01/Makefile.am
deleted file mode 100644
index 065e7bcc2b..0000000000
--- a/testsuites/sptests/sp01/Makefile.am
+++ /dev/null
@@ -1,38 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-TEST = sp01
-
-MANAGERS = io
-
-C_FILES = init.c task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = scn doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/sptests.am
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/sptests/sp01/init.c b/testsuites/sptests/sp01/init.c
deleted file mode 100644
index b8f409b3bb..0000000000
--- a/testsuites/sptests/sp01/init.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is a user initialization task and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_time_of_day time;
- rtems_status_code status;
-
- puts( "\n\n*** TEST 1 ***" );
-
- build_time( &time, 12, 31, 1988, 9, 0, 0, 0 );
- status = rtems_clock_set( &time );
- directive_failed( status, "rtems_clock_set" );
-
- Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
- Task_name[ 2 ] = rtems_build_name( 'T', 'A', '2', ' ' );
- Task_name[ 3 ] = rtems_build_name( 'T', 'A', '3', ' ' );
-
- status = rtems_task_create(
- Task_name[ 1 ],
- 1,
- RTEMS_MINIMUM_STACK_SIZE * 2,
- RTEMS_INTERRUPT_LEVEL(31),
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_create of TA1" );
-
- status = rtems_task_create(
- Task_name[ 2 ],
- 1,
- RTEMS_MINIMUM_STACK_SIZE * 2,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 2 ]
- );
- directive_failed( status, "rtems_task_create of TA2" );
-
- status = rtems_task_create(
- Task_name[ 3 ],
- 1,
- RTEMS_MINIMUM_STACK_SIZE * 3,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 3 ]
- );
- directive_failed( status, "rtems_task_create of TA3" );
-
- status = rtems_task_start( Task_id[ 1 ], Task_1_through_3, 0 );
- directive_failed( status, "rtems_task_start of TA1" );
-
- status = rtems_task_start( Task_id[ 2 ], Task_1_through_3, 0 );
- directive_failed( status, "rtems_task_start of TA2" );
-
- status = rtems_task_start( Task_id[ 3 ], Task_1_through_3, 0 );
- directive_failed( status, "rtems_task_start of TA3" );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
diff --git a/testsuites/sptests/sp01/sp01.doc b/testsuites/sptests/sp01/sp01.doc
deleted file mode 100644
index 338ff1fb1b..0000000000
--- a/testsuites/sptests/sp01/sp01.doc
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: test1
-
-directives:
- ex_init, ex_start, t_create, t_start, tm_tick, i_return, t_ident,
- tm_set, tm_get, tm_wkafter
-
-concepts:
-
- a. Verifies system can create and start both the executive's system
- initialization and idle task.
-
- b. Verifies executive can swap between three application tasks at the
- same priority and the executive's internal idle task.
-
- c. Verifies can print strings to the CRT on port 2 of the mvme136 board
- using Print and Println in the board support package.
-
- d. Verifies interrupt handler can handle a task switch from an interrupt
- as specified with the i_return directive.
-
- e. Verifies executive initialization performed correctly.
-
- f. Verifies the executive trap handler except for the halt function.
-
- g. Verifies that a task can get the task identification number of itself.
-
-output:
- "TA1" is printed once every 5 seconds. "TA2" is printed once
- every 10 seconds. "TA3" is printed once every 15 seconds.
diff --git a/testsuites/sptests/sp01/sp01.scn b/testsuites/sptests/sp01/sp01.scn
deleted file mode 100644
index 6d687d042a..0000000000
--- a/testsuites/sptests/sp01/sp01.scn
+++ /dev/null
@@ -1,18 +0,0 @@
-*** TEST 1 ***
-TA1 - rtems_clock_get - 09:00:00 12/31/1988
-TA2 - rtems_clock_get - 09:00:00 12/31/1988
-TA3 - rtems_clock_get - 09:00:00 12/31/1988
-TA1 - rtems_clock_get - 09:00:05 12/31/1988
-TA2 - rtems_clock_get - 09:00:10 12/31/1988
-TA1 - rtems_clock_get - 09:00:10 12/31/1988
-TA3 - rtems_clock_get - 09:00:15 12/31/1988
-TA1 - rtems_clock_get - 09:00:15 12/31/1988
-TA2 - rtems_clock_get - 09:00:20 12/31/1988
-TA1 - rtems_clock_get - 09:00:20 12/31/1988
-TA1 - rtems_clock_get - 09:00:25 12/31/1988
-TA3 - rtems_clock_get - 09:00:30 12/31/1988
-TA2 - rtems_clock_get - 09:00:30 12/31/1988
-TA1 - rtems_clock_get - 09:00:30 12/31/1988
-*** END OF TEST 1 ***
-
-NOTE: The order of the prints at each time interval is irrelevant.
diff --git a/testsuites/sptests/sp01/system.h b/testsuites/sptests/sp01/system.h
deleted file mode 100644
index 5a1cbad8b8..0000000000
--- a/testsuites/sptests/sp01/system.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_task Task_1_through_3(
- rtems_task_argument argument
-);
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#define CONFIGURE_EXTRA_TASK_STACKS (4 * RTEMS_MINIMUM_STACK_SIZE)
-
-#include <confdefs.h>
-
-/* global variables */
-
-TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
-
-/* end of include file */
diff --git a/testsuites/sptests/sp01/task1.c b/testsuites/sptests/sp01/task1.c
deleted file mode 100644
index 34f24e2a14..0000000000
--- a/testsuites/sptests/sp01/task1.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/* Task_1_through_3
- *
- * This routine serves as a test task. It verifies the basic task
- * switching capabilities of the executive.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task_1_through_3(
- rtems_task_argument argument
-)
-{
- rtems_id tid;
- rtems_time_of_day time;
- rtems_status_code status;
-
- status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
- directive_failed( status, "rtems_task_ident" );
-
- while( FOREVER ) {
- status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
- directive_failed( status, "rtems_clock_get" );
-
- if ( time.second >= 35 ) {
- puts( "*** END OF TEST 1 ***" );
- exit( 0 );
- }
-
- put_name( Task_name[ task_number( tid ) ], FALSE );
- print_time( " - rtems_clock_get - ", &time, "\n" );
-
- status = rtems_task_wake_after( task_number( tid ) * 5 * TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
- }
-}
diff --git a/testsuites/sptests/sp02/Makefile.am b/testsuites/sptests/sp02/Makefile.am
deleted file mode 100644
index 174e249375..0000000000
--- a/testsuites/sptests/sp02/Makefile.am
+++ /dev/null
@@ -1,38 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-TEST = sp02
-
-MANAGERS = io
-
-C_FILES = init.c task1.c task2.c task3.c preempt.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = scn doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/sptests.am
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/sptests/sp02/init.c b/testsuites/sptests/sp02/init.c
deleted file mode 100644
index bd1274ceca..0000000000
--- a/testsuites/sptests/sp02/init.c
+++ /dev/null
@@ -1,151 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is a user initialization task and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- puts( "\n\n*** TEST 2 ***" );
-
- Preempt_task_name = rtems_build_name( 'P', 'R', 'M', 'T' );
-
- status = rtems_task_create(
- Preempt_task_name,
- 1,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Preempt_task_id
- );
- directive_failed( status, "rtems_task_create of RTEMS_PREEMPT" );
-
- status = rtems_task_start( Preempt_task_id, Preempt_task, 0 );
- directive_failed( status, "rtems_task_start of RTEMS_PREEMPT" );
-
- puts( "INIT - rtems_task_wake_after - yielding processor" );
- status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
- directive_failed( status, "rtems_task_wake_after" );
-
- Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
- Task_name[ 2 ] = rtems_build_name( 'T', 'A', '2', ' ' );
- Task_name[ 3 ] = rtems_build_name( 'T', 'A', '3', ' ' );
-
- status = rtems_task_create(
- Task_name[ 1 ],
- 3,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_create of TA1" );
-
- status = rtems_task_create(
- Task_name[ 2 ],
- 3,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 2 ]
- );
- directive_failed( status, "rtems_task_create of TA2" );
-
- status = rtems_task_create(
- Task_name[ 3 ],
- 3,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 3 ]
- );
- directive_failed( status, "rtems_task_create of TA3" );
-
- status = rtems_task_start( Task_id[ 1 ], Task_1, 0 );
- directive_failed( status, "rtems_task_start of TA1" );
-
- status = rtems_task_start( Task_id[ 2 ], Task_2, 0 );
- directive_failed( status, "rtems_task_start of TA2" );
-
- status = rtems_task_start( Task_id[ 3 ], Task_3, 0 );
- directive_failed( status, "rtems_task_start of TA3" );
-
- puts( "INIT - suspending TA2 while middle task on a ready chain" );
- status = rtems_task_suspend( Task_id[ 2 ] );
- directive_failed( status, "rtems_task_suspend of TA2" );
-
- status = rtems_task_delete( Task_id[ 1 ] );
- directive_failed( status, "rtems_task_delete of TA1" );
-
- status = rtems_task_delete( Task_id[ 2 ] );
- directive_failed( status, "rtems_task_delete of TA2" );
-
- status = rtems_task_delete( Task_id[ 3 ] );
- directive_failed( status, "rtems_task_delete of TA3" );
-
- status = rtems_task_create(
- Task_name[ 1 ],
- 1,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_create of TA1" );
-
- status = rtems_task_create(
- Task_name[ 2 ],
- 3,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 2 ]
- );
- directive_failed( status, "rtems_task_create of TA2" );
-
- status = rtems_task_create(
- Task_name[ 3 ],
- 3,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 3 ]
- );
- directive_failed( status, "rtems_task_create of TA3" );
-
- status = rtems_task_start( Task_id[ 1 ], Task_1, 0 );
- directive_failed( status, "rtems_task_start of TA1" );
-
- status = rtems_task_start( Task_id[ 2 ], Task_2, 0 );
- directive_failed( status, "rtems_task_start of TA2" );
-
- status = rtems_task_start( Task_id[ 3 ], Task_3, 0 );
- directive_failed( status, "rtems_task_start of TA3" );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
diff --git a/testsuites/sptests/sp02/preempt.c b/testsuites/sptests/sp02/preempt.c
deleted file mode 100644
index e494349c8a..0000000000
--- a/testsuites/sptests/sp02/preempt.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Preempt_task
- *
- * This routine serves as a test task. It verifies the task manager.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Preempt_task(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- puts( "PREEMPT - rtems_task_delete - deleting self" );
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_PREEMPT" );
-}
diff --git a/testsuites/sptests/sp02/sp02.doc b/testsuites/sptests/sp02/sp02.doc
deleted file mode 100644
index 2b624f8e23..0000000000
--- a/testsuites/sptests/sp02/sp02.doc
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: test2
-
-directives:
- ex_init, ex_start, t_create, t_start, tm_tick, i_return, t_ident,
- t_delete, tm_wkafter, t_setpri, t_suspend
-
-concepts:
-
- a. Verifies that a task can delete another task and also delete itself.
-
- b. Verifies that memory is freed back to the heap correctly.
-
- c. Verifies that TCBs are freed back to the inactive chain correctly.
-
- d. Verifies that a task can get the task identification number of
- another task.
-
- e. Verifies the _Set_state routine where the task is not READY.
-
- f. Verifies the break statement in the _Block_activate routine.
-
- g. Verifies the while loop in the _Prev_tcb routine.
diff --git a/testsuites/sptests/sp02/sp02.scn b/testsuites/sptests/sp02/sp02.scn
deleted file mode 100644
index d3f3d61cd1..0000000000
--- a/testsuites/sptests/sp02/sp02.scn
+++ /dev/null
@@ -1,15 +0,0 @@
-*** TEST 2 ***
-INIT - rtems_task_wake_after - yielding processor
-PREEMPT - rtems_task_delete - deleting self
-INIT - suspending TA2 while middle task on a ready chain
-TA1 - rtems_task_wake_after - sleep 1 second
-TA2 - rtems_task_wake_after - sleep 1 minute
-TA3 - rtems_task_wake_after - sleep 5 seconds
-TA1 - rtems_task_ident - tid of TA2 (0x08010007)
-TA1 - rtems_task_ident - tid of TA3 (0x08010008)
-TA1 - rtems_task_set_priority - set TA3's priority to 2
-TA1 - rtems_task_suspend - suspend TA2
-TA1 - rtems_task_delete - delete TA2
-TA1 - rtems_task_wake_after - sleep for 5 seconds
-TA3 - rtems_task_delete - delete self
-*** END OF TEST 2 ***
diff --git a/testsuites/sptests/sp02/system.h b/testsuites/sptests/sp02/system.h
deleted file mode 100644
index b383c058e3..0000000000
--- a/testsuites/sptests/sp02/system.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_task Preempt_task(
- rtems_task_argument argument
-);
-
-rtems_task Task_1(
- rtems_task_argument argument
-);
-
-rtems_task Task_2(
- rtems_task_argument argument
-);
-
-rtems_task Task_3(
- rtems_task_argument argument
-);
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* global variables */
-
-TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
-
-TEST_EXTERN rtems_id Preempt_task_id; /* preempt task id */
-TEST_EXTERN rtems_name Preempt_task_name; /* preempt task name */
-
-/* end of include file */
diff --git a/testsuites/sptests/sp02/task1.c b/testsuites/sptests/sp02/task1.c
deleted file mode 100644
index ed0d77c2e9..0000000000
--- a/testsuites/sptests/sp02/task1.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/* Task_1
- *
- * This routine serves as a test task. It verifies the task manager.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task_1(
- rtems_task_argument argument
-)
-{
- rtems_id tid2;
- rtems_id tid3;
- rtems_status_code status;
- rtems_unsigned32 previous_priority;
-
- puts( "TA1 - rtems_task_wake_after - sleep 1 second" );
- status = rtems_task_wake_after( 1*TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
-
- status = rtems_task_ident( Task_name[ 2 ], RTEMS_SEARCH_ALL_NODES, &tid2 );
- directive_failed( status, "rtems_task_ident of TA2" );
-
- printf( "TA1 - rtems_task_ident - tid of TA2 (0x%.8x)\n", tid2 );
-
- status = rtems_task_ident( Task_name[ 3 ], RTEMS_SEARCH_ALL_NODES, &tid3 );
- directive_failed( status, "rtems_task_ident of TA3" );
-
- printf( "TA1 - rtems_task_ident - tid of TA3 (0x%.8x)\n", tid3 );
-
- status = rtems_task_set_priority( tid3, 2, &previous_priority );
- directive_failed( status, "rtems_task_set_priority" );
-
- puts( "TA1 - rtems_task_set_priority - set TA3's priority to 2" );
-
-
- puts( "TA1 - rtems_task_suspend - suspend TA2" );
- status = rtems_task_suspend( tid2 );
- directive_failed( status, "rtems_task_suspend of TA2" );
-
- puts( "TA1 - rtems_task_delete - delete TA2" );
- status = rtems_task_delete( tid2 );
- directive_failed( status, "rtems_task_delete of TA2" );
-
- puts( "TA1 - rtems_task_wake_after - sleep for 5 seconds" );
- status = rtems_task_wake_after( 5*TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
-
- puts( "*** END OF TEST 2 ***" );
- exit( 0 );
-}
diff --git a/testsuites/sptests/sp02/task2.c b/testsuites/sptests/sp02/task2.c
deleted file mode 100644
index 583f0043f7..0000000000
--- a/testsuites/sptests/sp02/task2.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Task_2
- *
- * This routine serves as a test task. It sleeps for 1 minute but
- * does not expect to wake up. Task 1 should suspend then delete it
- * so that it appears to never wake up.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task_2(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- puts( "TA2 - rtems_task_wake_after - sleep 1 minute" );
- status = rtems_task_wake_after( 60*TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after in TA2" );
-}
diff --git a/testsuites/sptests/sp02/task3.c b/testsuites/sptests/sp02/task3.c
deleted file mode 100644
index 6fd637ecc6..0000000000
--- a/testsuites/sptests/sp02/task3.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Task_3
- *
- * This routine serves as a test task. It simply sleeps for 5 seconds
- * and then deletes itself.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task_3(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- puts( "TA3 - rtems_task_wake_after - sleep 5 seconds" );
- status = rtems_task_wake_after( 5*TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after in TA3" );
-
- puts( "TA3 - rtems_task_delete - delete self" );
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of TA3" );
-}
diff --git a/testsuites/sptests/sp03/Makefile.am b/testsuites/sptests/sp03/Makefile.am
deleted file mode 100644
index 8224948a64..0000000000
--- a/testsuites/sptests/sp03/Makefile.am
+++ /dev/null
@@ -1,38 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-TEST = sp03
-
-MANAGERS = io
-
-C_FILES = init.c task1.c task2.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = scn doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/sptests.am
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/sptests/sp03/init.c b/testsuites/sptests/sp03/init.c
deleted file mode 100644
index 560e01a53b..0000000000
--- a/testsuites/sptests/sp03/init.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is a user initialization task and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- puts( "\n\n*** TEST 3 ***" );
-
- Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
- Task_name[ 2 ] = rtems_build_name( 'T', 'A', '2', ' ' );
-
- status = rtems_task_create(
- Task_name[ 1 ],
- 1,
- RTEMS_MINIMUM_STACK_SIZE * 2,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_create of TA1" );
-
- status = rtems_task_create(
- Task_name[ 2 ],
- 1,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 2 ]
- );
- directive_failed( status, "rtems_task_create of TA2" );
-
- status = rtems_task_start( Task_id[ 1 ], Task_1, 0 );
- directive_failed( status, "rtems_task_start of TA1" );
-
- status = rtems_task_start( Task_id[ 2 ], Task_2, 0 );
- directive_failed( status, "rtems_task_start of TA2" );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
diff --git a/testsuites/sptests/sp03/sp03.doc b/testsuites/sptests/sp03/sp03.doc
deleted file mode 100644
index 4fb72db94b..0000000000
--- a/testsuites/sptests/sp03/sp03.doc
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: test3
-
-directives:
- ex_init, ex_start, t_create, t_start, tm_tick, i_return, tm_wkafter,
- tm_wkwhen, tm_set, tm_get
-
-concepts:
-
- a. Verifies conversion routines - _Utd_to_etd and _Etd_to_utd
diff --git a/testsuites/sptests/sp03/sp03.scn b/testsuites/sptests/sp03/sp03.scn
deleted file mode 100644
index 496982e86f..0000000000
--- a/testsuites/sptests/sp03/sp03.scn
+++ /dev/null
@@ -1,26 +0,0 @@
-*** TEST 3 ***
-TA1 sets clock: 09:15:00 12/31/1988
-TA1 going to sleep: 09:15:00 12/31/1988
-TA2 09:15:01 12/31/1988
-TA2 09:15:02 12/31/1988
-TA2 09:15:03 12/31/1988
-TA2 09:15:04 12/31/1988
-TA1 awakened: 09:15:05 12/31/1988
-TA1 going to sleep: 09:15:05 12/31/1988
-TA2 09:15:05 12/31/1988
-TA2 09:15:06 12/31/1988
-TA2 09:15:07 12/31/1988
-TA2 09:15:08 12/31/1988
-TA2 09:15:09 12/31/1988
-TA1 awakened: 09:15:10 12/31/1988
-TA1 going to sleep: 09:15:10 12/31/1988
-TA2 09:15:10 12/31/1988
-TA2 09:15:11 12/31/1988
-TA2 09:15:12 12/31/1988
-TA2 09:15:13 12/31/1988
-TA2 09:15:14 12/31/1988
-TA1 awakened: 09:15:15 12/31/1988
-TA1 going to sleep: 09:15:15 12/31/1988
-TA2 09:15:15 12/31/1988
-TA2 09:15:16 12/31/1988
-*** END OF TEST 3 ***
diff --git a/testsuites/sptests/sp03/system.h b/testsuites/sptests/sp03/system.h
deleted file mode 100644
index 72d992def9..0000000000
--- a/testsuites/sptests/sp03/system.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_task Task_1(
- rtems_task_argument argument
-);
-
-rtems_task Task_2(
- rtems_task_argument argument
-);
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#define CONFIGURE_EXTRA_TASK_STACKS (1 * RTEMS_MINIMUM_STACK_SIZE)
-
-#include <confdefs.h>
-
-/* global variables */
-
-TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
-
-/* end of include file */
diff --git a/testsuites/sptests/sp03/task1.c b/testsuites/sptests/sp03/task1.c
deleted file mode 100644
index 246e293839..0000000000
--- a/testsuites/sptests/sp03/task1.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/* Task_1
- *
- * This routine serves as a test task. It verifies the capability to
- * set and read the executives calender and clock.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task_1(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
- rtems_time_of_day time;
-
- build_time( &time, 12, 31, 1988, 9, 15, 0, 0 );
-
- status = rtems_clock_set( &time );
- directive_failed( status, "rtems_clock_set" );
-
- put_name( Task_name[ 1 ], FALSE );
- print_time( " sets clock: ", &time, "\n" );
-
- while( FOREVER ) {
- status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
- directive_failed( status, "rtems_clock_get" );
-
- put_name( Task_name[ 1 ], FALSE );
- print_time( " going to sleep: ", &time, "\n" );
-
- time.second += 5;
- time.minute += ( time.second / 60 );
- time.second %= 60;
- time.hour += ( time.minute / 60 );
- time.minute %= 60;
- time.hour %= 24;
-
- status = rtems_task_wake_when( &time );
- directive_failed( status, "rtems_task_wake_when" );
-
- put_name( Task_name[ 1 ], FALSE );
- print_time( " awakened: ", &time, "\n" );
- }
-}
diff --git a/testsuites/sptests/sp03/task2.c b/testsuites/sptests/sp03/task2.c
deleted file mode 100644
index 56d7da821e..0000000000
--- a/testsuites/sptests/sp03/task2.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Task_2
- *
- * This routine serves as a test task. It repeatedly gets the system time
- * and date, converts it to printable form, and print it.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task_2(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
- rtems_time_of_day time;
-
- while( FOREVER ) {
- status = rtems_task_wake_after( 1*TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
-
- status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
- directive_failed( status, "rtems_clock_get" );
-
- if ( time.second >= 17 ) {
- puts( "*** END OF TEST 3 *** " );
- exit( 0 );
- }
-
- put_name( Task_name[ 2 ], FALSE );
- print_time( " ", &time, "\n" );
- }
-}
diff --git a/testsuites/sptests/sp04/Makefile.am b/testsuites/sptests/sp04/Makefile.am
deleted file mode 100644
index 925439b0e3..0000000000
--- a/testsuites/sptests/sp04/Makefile.am
+++ /dev/null
@@ -1,38 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-TEST = sp04
-
-MANAGERS = io
-
-C_FILES = init.c task1.c task2.c task3.c tswitch.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = scn doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/sptests.am
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/sptests/sp04/init.c b/testsuites/sptests/sp04/init.c
deleted file mode 100644
index 032797c904..0000000000
--- a/testsuites/sptests/sp04/init.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is a user initialization task and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_extensions_table Extensions = {
- NULL, /* task create user extension */
- NULL, /* task start user extension */
- NULL, /* task restart user extension */
- NULL, /* task delete user extension */
- Task_switch, /* task switch user extension */
- NULL, /* task begin user extension */
- NULL, /* task exitted user extension */
- NULL /* fatal error user extension */
-};
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
- rtems_time_of_day time;
-
- puts( "\n\n*** TEST 4 ***" );
- build_time( &time, 12, 31, 1988, 9, 15, 0, 0 );
-
- status = rtems_clock_set( &time );
- directive_failed( status, "rtems_clock_set" );
-
- Extension_name[ 1 ] = rtems_build_name( 'E', 'X', 'T', ' ' );
-
- status = rtems_extension_create(
- Extension_name[ 1 ],
- &Extensions,
- &Extension_id[ 1 ]
- );
- directive_failed( status, "rtems_extension_create" );
-
- Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
- Task_name[ 2 ] = rtems_build_name( 'T', 'A', '2', ' ' );
- Task_name[ 3 ] = rtems_build_name( 'T', 'A', '3', ' ' );
-
- Run_count[ 1 ] = 0;
- Run_count[ 2 ] = 0;
- Run_count[ 3 ] = 0;
-
- status = rtems_task_create(
- Task_name[ 1 ],
- 1,
- RTEMS_MINIMUM_STACK_SIZE * 2,
- RTEMS_TIMESLICE,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_create of TA1" );
-
- status = rtems_task_create(
- Task_name[ 2 ],
- 1,
- RTEMS_MINIMUM_STACK_SIZE * 2,
- RTEMS_TIMESLICE,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 2 ]
- );
- directive_failed( status, "rtems_task_create of TA2" );
-
- status = rtems_task_create(
- Task_name[ 3 ],
- 1,
- RTEMS_MINIMUM_STACK_SIZE * 2,
- RTEMS_TIMESLICE,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 3 ]
- );
- directive_failed( status, "rtems_task_create of TA3" );
-
- status = rtems_task_start( Task_id[ 1 ], Task_1, 0 );
- directive_failed( status, "rtems_task_start of TA1" );
-
- status = rtems_task_start( Task_id[ 2 ], Task_2, 0 );
- directive_failed( status, "rtems_task_start of TA2" );
-
- status = rtems_task_start( Task_id[ 3 ], Task_3, 0 );
- directive_failed( status, "rtems_task_start of TA3" );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
diff --git a/testsuites/sptests/sp04/sp04.doc b/testsuites/sptests/sp04/sp04.doc
deleted file mode 100644
index 35c353e529..0000000000
--- a/testsuites/sptests/sp04/sp04.doc
+++ /dev/null
@@ -1,37 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: test4
-
-directives:
- ex_init, ex_start, t_create, t_start, tm_tick, i_return,
- tm_set, tm_get, ev_receive, t_mode
-
-concepts:
-
- a. Verifies timeslicing ( all tasks are in timeslice mode ).
-
- b. Verifies the tswitch user extension.
-
- c. Verifies the no preemption mode.
-
- d. Verifies time-slice gets reset even if only one task ready.
-
-output:
- The task name and the current time are printed out each time that a new
- task is being dispatched. The configured timeslice is 100 ticks
- ( 1 second ); therefore, a task name and the time are printed once
- every second. After each task runs 3 times, task 1 changes its mode to
- no preempt and runs for about 6 seconds and then changes its mode back to
- preempt mode.
diff --git a/testsuites/sptests/sp04/sp04.scn b/testsuites/sptests/sp04/sp04.scn
deleted file mode 100644
index 801ad8c6fb..0000000000
--- a/testsuites/sptests/sp04/sp04.scn
+++ /dev/null
@@ -1,25 +0,0 @@
-*** TEST 4 ***
-TA1 - rtems_task_suspend - on Task 2
-TA1 - rtems_task_suspend - on Task 3
-TA1 - killing time
-TA1 - rtems_task_resume - on Task 2
-TA1 - rtems_task_resume - on Task 3
-TA1 - rtems_task_mode - change mode to NO RTEMS_PREEMPT
-TA1 - 09:15:10 12/31/1988
-TA1 - 09:15:11 12/31/1988
-TA1 - 09:15:12 12/31/1988
-TA1 - 09:15:13 12/31/1988
-TA1 - 09:15:14 12/31/1988
-TA1 - 09:15:15 12/31/1988
-TA1 - rtems_task_mode - change mode to RTEMS_PREEMPT
-TA1 - 09:15:00 12/31/1988
-TA2 - 09:15:04 12/31/1988
-TA3 - 09:15:05 12/31/1988
-TA1 - 09:15:06 12/31/1988
-TA2 - 09:15:07 12/31/1988
-TA3 - 09:15:08 12/31/1988
-TA1 - 09:15:09 12/31/1988
-TA2 - 09:15:16 12/31/1988
-TA3 - 09:15:17 12/31/1988
-TA1 - 09:15:18 12/31/1988
-*** END OF TEST 4 ***
diff --git a/testsuites/sptests/sp04/system.h b/testsuites/sptests/sp04/system.h
deleted file mode 100644
index f7f2832f54..0000000000
--- a/testsuites/sptests/sp04/system.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_task Task_1(
- rtems_task_argument argument
-);
-
-rtems_task Task_2(
- rtems_task_argument argument
-);
-
-rtems_task Task_3(
- rtems_task_argument argument
-);
-
-void Task_switch(
- rtems_tcb *unused,
- rtems_tcb *heir
-);
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MAXIMUM_USER_EXTENSIONS 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 100
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#define CONFIGURE_EXTRA_TASK_STACKS (3 * RTEMS_MINIMUM_STACK_SIZE)
-
-#include <confdefs.h>
-
-/* global variables */
-
-TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
-
-TEST_EXTERN rtems_id Extension_id[ 4 ];
-TEST_EXTERN rtems_name Extension_name[ 4 ]; /* array of task names */
-
-/* array of task run counts */
-TEST_EXTERN volatile rtems_unsigned32 Run_count[ 4 ];
-
-/*
- * Keep track of task switches
- */
-struct taskSwitchLog {
- int taskIndex;
- rtems_time_of_day when;
-};
-extern struct taskSwitchLog taskSwitchLog[];
-extern int taskSwitchLogIndex;
-volatile extern int testsFinished;
-
-/* end of include file */
diff --git a/testsuites/sptests/sp04/task1.c b/testsuites/sptests/sp04/task1.c
deleted file mode 100644
index cbaa831890..0000000000
--- a/testsuites/sptests/sp04/task1.c
+++ /dev/null
@@ -1,117 +0,0 @@
-/* Task_1
- *
- * This test serves as a test task. It verifies timeslicing activities
- * and tswitch extension processing.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-static void
-showTaskSwitches (void)
-{
- int i;
- int switches = taskSwitchLogIndex;
-
- for (i = 0 ; i < switches ; i++) {
- put_name( Task_name[taskSwitchLog[i].taskIndex], FALSE );
- print_time( "- ", &taskSwitchLog[i].when, "\n" );
- }
-}
-
-rtems_task Task_1(
- rtems_task_argument argument
-)
-{
- rtems_unsigned32 seconds;
- rtems_unsigned32 old_seconds;
- rtems_mode previous_mode;
- rtems_time_of_day time;
- rtems_status_code status;
- rtems_unsigned32 start_time;
- rtems_unsigned32 end_time;
-
- puts( "TA1 - rtems_task_suspend - on Task 2" );
- status = rtems_task_suspend( Task_id[ 2 ] );
- directive_failed( status, "rtems_task_suspend of TA2" );
-
- puts( "TA1 - rtems_task_suspend - on Task 3" );
- status = rtems_task_suspend( Task_id[ 3 ] );
- directive_failed( status, "rtems_task_suspend of TA3" );
-
- status = rtems_clock_get( RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH, &start_time );
- directive_failed( status, "rtems_clock_get" );
-
- puts( "TA1 - killing time" );
-
- for ( ; ; ) {
- status = rtems_clock_get( RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH, &end_time );
- directive_failed( status, "rtems_clock_get" );
-
- if ( end_time > (start_time + 2) )
- break;
- }
-
- puts( "TA1 - rtems_task_resume - on Task 2" );
- status = rtems_task_resume( Task_id[ 2 ] );
- directive_failed( status, "rtems_task_resume of TA2" );
-
- puts( "TA1 - rtems_task_resume - on Task 3" );
- status = rtems_task_resume( Task_id[ 3 ] );
- directive_failed( status, "rtems_task_resume of TA3" );
-
- while ( FOREVER ) {
- if ( Run_count[ 1 ] == 3 ) {
- puts( "TA1 - rtems_task_mode - change mode to NO RTEMS_PREEMPT" );
-
- status = rtems_task_mode(
- RTEMS_NO_PREEMPT,
- RTEMS_PREEMPT_MASK,
- &previous_mode
- );
- directive_failed( status, "rtems_task_mode" );
-
- status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
- directive_failed( status, "rtems_clock_get" );
-
- old_seconds = time.second;
-
- for ( seconds = 0 ; seconds < 6 ; ) {
- status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
- directive_failed( status, "rtems_clock_get" );
-
- if ( time.second != old_seconds ) {
- old_seconds = time.second;
- seconds++;
- print_time( "TA1 - ", &time, "\n" );
- }
- }
-
- puts( "TA1 - rtems_task_mode - change mode to RTEMS_PREEMPT" );
- status = rtems_task_mode(
- RTEMS_PREEMPT,
- RTEMS_PREEMPT_MASK,
- &previous_mode
- );
- directive_failed( status, "rtems_task_mode" );
-
- while ( !testsFinished );
- showTaskSwitches ();
- puts( "*** END OF TEST 4 ***" );
- exit (0);
- }
- }
-}
diff --git a/testsuites/sptests/sp04/task2.c b/testsuites/sptests/sp04/task2.c
deleted file mode 100644
index 5dbdda331d..0000000000
--- a/testsuites/sptests/sp04/task2.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Task_2
- *
- * This routine serves as a test task. It is just a CPU bound task
- * requiring timesliced operation.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task_2(
- rtems_task_argument argument
-)
-{
- while( FOREVER );
-}
diff --git a/testsuites/sptests/sp04/task3.c b/testsuites/sptests/sp04/task3.c
deleted file mode 100644
index 829f52820f..0000000000
--- a/testsuites/sptests/sp04/task3.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Task_3
- *
- * This routine serves as a test task. It is just a CPU bound task
- * requiring timesliced operation.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task_3(
- rtems_task_argument argument
-)
-{
- while( FOREVER );
-}
diff --git a/testsuites/sptests/sp04/tswitch.c b/testsuites/sptests/sp04/tswitch.c
deleted file mode 100644
index 975ca710c3..0000000000
--- a/testsuites/sptests/sp04/tswitch.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/* Task_switch
- *
- * This routine is the tswitch user extension. It determines which
- * task is being switched to and displays a message indicating the
- * time and date that it gained control.
- *
- * Input parameters:
- * unused - pointer to currently running TCB
- * heir - pointer to heir TCB
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-struct taskSwitchLog taskSwitchLog[1000];
-int taskSwitchLogIndex;
-volatile int testsFinished;;
-
-rtems_extension Task_switch(
- rtems_tcb *unused,
- rtems_tcb *heir
-)
-{
- rtems_unsigned32 index;
- rtems_time_of_day time;
- rtems_status_code status;
-
- index = task_number( heir->Object.id );
-
- switch( index ) {
- case 1:
- case 2:
- case 3:
- Run_count[ index ] += 1;
-
- status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
- directive_failed_with_level( status, "rtems_clock_get", 1 );
-
- if (taskSwitchLogIndex < (sizeof taskSwitchLog / sizeof taskSwitchLog[0])) {
- taskSwitchLog[taskSwitchLogIndex].taskIndex = index;
- taskSwitchLog[taskSwitchLogIndex].when = time;
- taskSwitchLogIndex++;
- }
- if ( time.second >= 16 )
- testsFinished = 1;
- break;
-
- case 0:
- default:
- break;
- }
-}
diff --git a/testsuites/sptests/sp05/Makefile.am b/testsuites/sptests/sp05/Makefile.am
deleted file mode 100644
index 8e1d268e43..0000000000
--- a/testsuites/sptests/sp05/Makefile.am
+++ /dev/null
@@ -1,38 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-TEST = sp05
-
-MANAGERS = io
-
-C_FILES = init.c task1.c task2.c task3.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = scn doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/sptests.am
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/sptests/sp05/init.c b/testsuites/sptests/sp05/init.c
deleted file mode 100644
index 8d84d253f6..0000000000
--- a/testsuites/sptests/sp05/init.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is a user initialization task and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- puts( "\n\n*** TEST 5 ***" );
-
- Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
- Task_name[ 2 ] = rtems_build_name( 'T', 'A', '2', ' ' );
- Task_name[ 3 ] = rtems_build_name( 'T', 'A', '3', ' ' );
-
- status = rtems_task_create(
- Task_name[ 1 ],
- 1,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_create of TA1" );
-
- status = rtems_task_create(
- Task_name[ 2 ],
- 1,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 2 ]
- );
- directive_failed( status, "rtems_task_create of TA2" );
-
- status = rtems_task_create(
- Task_name[ 3 ],
- 1,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 3 ]
- );
- directive_failed( status, "rtems_task_create of TA3" );
-
- status = rtems_task_start( Task_id[ 1 ], Task_1, 0 );
- directive_failed( status, "rtems_task_start of TA1" );
-
- status = rtems_task_start( Task_id[ 2 ], Task_2, 0 );
- directive_failed( status, "rtems_task_start of TA2" );
-
- status = rtems_task_start( Task_id[ 3 ], Task_3, 0 );
- directive_failed( status, "rtems_task_start of TA3" );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
diff --git a/testsuites/sptests/sp05/sp05.doc b/testsuites/sptests/sp05/sp05.doc
deleted file mode 100644
index e13f88ffd7..0000000000
--- a/testsuites/sptests/sp05/sp05.doc
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: test5
-
-directives:
- ex_init, ex_start, t_create, t_start, tm_tick, i_return, t_ident
- tm_wkafter, t_suspend, t_resume
-
-concepts:
-
- a. Verifies that a task can be suspended and resumed.
-
- b. Verifies that a task can suspend itself.
diff --git a/testsuites/sptests/sp05/sp05.scn b/testsuites/sptests/sp05/sp05.scn
deleted file mode 100644
index 40afb2d4b2..0000000000
--- a/testsuites/sptests/sp05/sp05.scn
+++ /dev/null
@@ -1,47 +0,0 @@
-*** TEST 5 ***
-TA1 - rtems_task_wake_after - sleep 5 seconds
-TA2 - rtems_task_suspend - suspend self
-TA3 - rtems_task_suspend - suspend self
-TA1 - rtems_task_suspend - suspend TA3
-TA1 - rtems_task_resume - resume TA2
-TA1 - rtems_task_wake_after - sleep 5 seconds
-TA2 - rtems_task_wake_after - sleep 1 second
-TA2 - rtems_task_wake_after - sleep 1 second
-TA2 - rtems_task_wake_after - sleep 1 second
-TA2 - rtems_task_wake_after - sleep 1 second
-TA2 - rtems_task_wake_after - sleep 1 second
-TA1 - rtems_task_suspend - suspend TA2
-TA1 - rtems_task_resume - resume TA3
-TA1 - rtems_task_wake_after - sleep 5 seconds
-TA3 - rtems_task_wake_after - sleep 1 second
-TA3 - rtems_task_wake_after - sleep 1 second
-TA3 - rtems_task_wake_after - sleep 1 second
-TA3 - rtems_task_wake_after - sleep 1 second
-TA3 - rtems_task_wake_after - sleep 1 second
-TA1 - rtems_task_suspend - suspend TA3
-TA1 - rtems_task_resume - resume TA2
-TA1 - rtems_task_wake_after - sleep 5 seconds
-TA2 - rtems_task_wake_after - sleep 1 second
-TA2 - rtems_task_wake_after - sleep 1 second
-TA2 - rtems_task_wake_after - sleep 1 second
-TA2 - rtems_task_wake_after - sleep 1 second
-TA2 - rtems_task_wake_after - sleep 1 second
-TA1 - rtems_task_suspend - suspend TA2
-TA1 - rtems_task_resume - resume TA3
-TA1 - rtems_task_wake_after - sleep 5 seconds
-TA3 - rtems_task_wake_after - sleep 1 second
-TA3 - rtems_task_wake_after - sleep 1 second
-TA3 - rtems_task_wake_after - sleep 1 second
-TA3 - rtems_task_wake_after - sleep 1 second
-TA3 - rtems_task_wake_after - sleep 1 second
-TA1 - rtems_task_suspend - suspend TA3
-TA1 - rtems_task_resume - resume TA2
-TA1 - rtems_task_wake_after - sleep 5 seconds
-TA2 - rtems_task_wake_after - sleep 1 second
-TA2 - rtems_task_wake_after - sleep 1 second
-TA2 - rtems_task_wake_after - sleep 1 second
-TA2 - rtems_task_wake_after - sleep 1 second
-TA2 - rtems_task_wake_after - sleep 1 second
-TA1 - rtems_task_suspend - suspend TA2
-TA1 - rtems_task_resume - resume TA3
-*** END OF TEST 5 ***
diff --git a/testsuites/sptests/sp05/system.h b/testsuites/sptests/sp05/system.h
deleted file mode 100644
index ec5c85e9a0..0000000000
--- a/testsuites/sptests/sp05/system.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_task Task_1(
- rtems_task_argument argument
-);
-
-rtems_task Task_2(
- rtems_task_argument argument
-);
-
-rtems_task Task_3(
- rtems_task_argument argument
-);
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_TICKS_PER_TIMESLICE 100
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* global variables */
-
-TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
-
-/* end of include file */
diff --git a/testsuites/sptests/sp05/task1.c b/testsuites/sptests/sp05/task1.c
deleted file mode 100644
index 3a510cab97..0000000000
--- a/testsuites/sptests/sp05/task1.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/* Task_1
- *
- * This routine serves as a test task. It verifies that tasks can
- * be suspended and resumed.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * NOTE: The rtems_task_suspend() directives fail on the first iteration.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task_1(
- rtems_task_argument argument
-)
-{
- rtems_id tid2;
- rtems_id tid3;
- rtems_unsigned32 pass;
- rtems_status_code status;
-
- status = rtems_task_ident( Task_name[ 2 ], 1, &tid2 );
- directive_failed( status, "rtems_task_ident of TA2" );
-
- status = rtems_task_ident( Task_name[ 3 ], 1, &tid3 );
- directive_failed( status, "rtems_task_ident of TA3" );
-
- for ( pass=1 ; pass <= 3 ; pass++ ) {
-
- puts( "TA1 - rtems_task_wake_after - sleep 5 seconds" );
- status = rtems_task_wake_after( 5*TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after of TA1" );
-
- puts( "TA1 - rtems_task_suspend - suspend TA3" );
- status = rtems_task_suspend( tid3 );
- if ( pass == 1 ) {
- fatal_directive_status(
- status,
- RTEMS_ALREADY_SUSPENDED,
- "rtems_task_suspend of TA3"
- );
- } else {
- directive_failed( status, "rtems_task_suspend of TA3" );
- }
-
- puts( "TA1 - rtems_task_resume - resume TA2" );
- status = rtems_task_resume( tid2 );
- directive_failed( status, "rtems_task_resume of TA2" );
-
- puts( "TA1 - rtems_task_wake_after - sleep 5 seconds" );
- status = rtems_task_wake_after( 5*TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
-
- puts( "TA1 - rtems_task_suspend - suspend TA2" );
- status = rtems_task_suspend( tid2 );
- directive_failed( status, "rtems_task_suspend of TA2" );
-
- puts( "TA1 - rtems_task_resume - resume TA3" );
- status = rtems_task_resume( tid3 );
- directive_failed( status, "rtems_task_resume" );
- }
-
- puts( "*** END OF TEST 5 ***" );
- exit( 0 );
-}
diff --git a/testsuites/sptests/sp05/task2.c b/testsuites/sptests/sp05/task2.c
deleted file mode 100644
index 40e110693b..0000000000
--- a/testsuites/sptests/sp05/task2.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Task_2
- *
- * This routine serves as a test task. Makes sure a task can suspend
- * itself.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task_2(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- puts( "TA2 - rtems_task_suspend - suspend self" );
- status = rtems_task_suspend( RTEMS_SELF );
- directive_failed( status, "rtems_task_suspend of TA2" );
-
- while( FOREVER ) {
- puts( "TA2 - rtems_task_wake_after - sleep 1 second" );
- status = rtems_task_wake_after( 1*TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after of TA2" );
- }
-}
diff --git a/testsuites/sptests/sp05/task3.c b/testsuites/sptests/sp05/task3.c
deleted file mode 100644
index 7d1163e5de..0000000000
--- a/testsuites/sptests/sp05/task3.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Task_3
- *
- * This routine serves as a test task. Makes sure a task can suspend
- * itself.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task_3(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- puts( "TA3 - rtems_task_suspend - suspend self" );
- status = rtems_task_suspend( RTEMS_SELF );
- directive_failed( status, "rtems_task_suspend of TA3" );
-
- while( FOREVER ) {
- puts( "TA3 - rtems_task_wake_after - sleep 1 second" );
- status = rtems_task_wake_after( 1*TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after of TA3" );
- }
-}
diff --git a/testsuites/sptests/sp06/Makefile.am b/testsuites/sptests/sp06/Makefile.am
deleted file mode 100644
index 92d63010ba..0000000000
--- a/testsuites/sptests/sp06/Makefile.am
+++ /dev/null
@@ -1,38 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-TEST = sp06
-
-MANAGERS = io
-
-C_FILES = init.c task1.c task2.c task3.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = scn doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/sptests.am
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/sptests/sp06/init.c b/testsuites/sptests/sp06/init.c
deleted file mode 100644
index 4c7b858584..0000000000
--- a/testsuites/sptests/sp06/init.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is a user initialization task and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
- rtems_task_priority previous_priority;
-
- puts( "\n\n*** TEST 6 ***" );
-
- Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
- Task_name[ 2 ] = rtems_build_name( 'T', 'A', '2', ' ' );
- Task_name[ 3 ] = rtems_build_name( 'T', 'A', '3', ' ' );
-
- Argument = 0;
- Restart_argument = 1;
-
- status = rtems_task_create(
- Task_name[ 1 ],
- 1,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_create of TA1" );
-
- status = rtems_task_create(
- Task_name[ 2 ],
- 1,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 2 ]
- );
- directive_failed( status, "rtems_task_create of TA2" );
-
- status = rtems_task_create(
- Task_name[ 3 ],
- 10,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 3 ]
- );
- directive_failed( status, "rtems_task_create of TA3" );
-
- status = rtems_task_start( Task_id[ 1 ], Task_1, 0 );
- directive_failed( status, "rtems_task_start of TA1" );
-
- status = rtems_task_start( Task_id[ 2 ], Task_2, Argument );
- directive_failed( status, "rtems_task_start of TA2" );
-
- status = rtems_task_start( Task_id[ 3 ], Task_3, Argument );
- directive_failed( status, "rtems_task_start of TA3" );
-
- status = rtems_task_set_priority( Task_id[ 3 ], 5, &previous_priority );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
diff --git a/testsuites/sptests/sp06/sp06.doc b/testsuites/sptests/sp06/sp06.doc
deleted file mode 100644
index 2e2f59996a..0000000000
--- a/testsuites/sptests/sp06/sp06.doc
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: test6
-
-directives:
- ex_init, ex_start, t_create, t_start, tm_tick, i_return,
- tm_wkafter, t_restart
-
-concepts:
-
- a. Verifies that a task can restart a task other than itself.
-
- b. Verifies that a task can restart itself.
diff --git a/testsuites/sptests/sp06/sp06.scn b/testsuites/sptests/sp06/sp06.scn
deleted file mode 100644
index 64f6489dc8..0000000000
--- a/testsuites/sptests/sp06/sp06.scn
+++ /dev/null
@@ -1,40 +0,0 @@
-*** TEST 6 ***
-TA1 - is beginning to run
-TA1 - restarting TA3
-TA2 - is beginning to run
-TA2 - rtems_task_wake_after - sleep 1/2 second
-TA2 - rtems_task_wake_after - sleep 1/2 second
-TA1 - rtems_task_restart - restarting TA2
-TA2 - is beginning to run
-TA2 - rtems_task_wake_after - sleep 1/2 second
-TA2 - rtems_task_wake_after - sleep 1/2 second
-TA1 - rtems_task_restart - restarting self
-TA1 - is beginning to run
-TA2 - rtems_task_wake_after - sleep 1/2 second
-TA2 - rtems_task_wake_after - sleep 1/2 second
-TA1 - rtems_task_restart - restarting TA2
-TA2 - is beginning to run
-TA2 - rtems_task_wake_after - sleep 1/2 second
-TA2 - rtems_task_wake_after - sleep 1/2 second
-TA1 - rtems_task_restart - restarting self
-TA1 - is beginning to run
-TA2 - rtems_task_wake_after - sleep 1/2 second
-TA2 - rtems_task_wake_after - sleep 1/2 second
-TA1 - rtems_task_restart - restarting TA2
-TA2 - is beginning to run
-TA2 - rtems_task_wake_after - sleep 1/2 second
-TA2 - rtems_task_wake_after - sleep 1/2 second
-TA1 - rtems_task_restart - restarting self
-TA1 - is beginning to run
-TA2 - rtems_task_wake_after - sleep 1/2 second
-TA2 - rtems_task_wake_after - sleep 1/2 second
-TA1 - rtems_task_restart - restarting TA2
-TA2 - is beginning to run
-TA2 - rtems_task_wake_after - sleep 1/2 second
-TA2 - rtems_task_wake_after - sleep 1/2 second
-TA1 - rtems_task_restart - restarting self
-TA1 - is beginning to run
-*** END OF TEST 6 ***
-
-NOTE: The prints from TA2 may not be as regular as indicated in the screen.
- The important point is that TA2 is running and gets restarted.
diff --git a/testsuites/sptests/sp06/system.h b/testsuites/sptests/sp06/system.h
deleted file mode 100644
index f7687256bc..0000000000
--- a/testsuites/sptests/sp06/system.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_task Task_1(
- rtems_task_argument argument
-);
-
-rtems_task Task_2(
- rtems_task_argument argument
-);
-
-rtems_task Task_3(
- rtems_task_argument argument
-);
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_TICKS_PER_TIMESLICE 100
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* global variables */
-
-TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
-
-TEST_EXTERN rtems_task_argument Argument; /* generic task argument */
-TEST_EXTERN rtems_task_argument Restart_argument; /* task 1 restart argument */
-
-/* end of include file */
diff --git a/testsuites/sptests/sp06/task1.c b/testsuites/sptests/sp06/task1.c
deleted file mode 100644
index 18bcae73bb..0000000000
--- a/testsuites/sptests/sp06/task1.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Task_1
- *
- * This task serves as a test task. Verifies that a task can restart
- * both itself and other tasks.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task_1( argument )
-rtems_unsigned32 argument;
-{
- rtems_unsigned32 pass;
- rtems_status_code status;
-
- puts( "TA1 - is beginning to run" );
-
- pass = argument + 1;
-
- if ( pass == 5 ) {
- puts( "*** END OF TEST 6 ***" );
- exit( 0 );
- }
-
- if ( pass == 1 ) {
- puts( "TA1 - restarting TA3" );
- status = rtems_task_restart( Task_id[ 3 ], Restart_argument );
- directive_failed( status, "rtems_task_restart of TA3" );
-
- status = rtems_task_wake_after( 2 * TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
- }
-
- status = rtems_task_wake_after( TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
-
- puts( "TA1 - rtems_task_restart - restarting TA2" );
- status = rtems_task_restart( Task_id[ 2 ], Restart_argument );
- directive_failed( status, "rtems_task_restart TA2" );
-
- status = rtems_task_wake_after( 1*TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
-
- puts( "TA1 - rtems_task_restart - restarting self" );
- status = rtems_task_restart( Task_id[ 1 ], pass );
- directive_failed( status, "rtems_task_restart of RTEMS_SELF" );
-}
diff --git a/testsuites/sptests/sp06/task2.c b/testsuites/sptests/sp06/task2.c
deleted file mode 100644
index da3f7ff70d..0000000000
--- a/testsuites/sptests/sp06/task2.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Task_2
- *
- * This routine serves as a test task. It simply runs forever so
- * another task can restart it.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task_2( argument )
-rtems_task_argument argument;
-{
- rtems_status_code status;
-
- puts( "TA2 - is beginning to run" );
- if ( argument == Argument ) {
- status = rtems_task_wake_after( 2 * TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
- }
-
- while( FOREVER ) {
- puts( "TA2 - rtems_task_wake_after - sleep 1/2 second" );
- status = rtems_task_wake_after( TICKS_PER_SECOND / 2 );
- directive_failed( status, "rtems_task_wake_after" );
- }
-}
diff --git a/testsuites/sptests/sp06/task3.c b/testsuites/sptests/sp06/task3.c
deleted file mode 100644
index 677dec4404..0000000000
--- a/testsuites/sptests/sp06/task3.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Task_3
- *
- * This routine serves as a test task. It is started, has its priority
- * changed, and when it runs it deletes itself.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task_3(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
diff --git a/testsuites/sptests/sp07/Makefile.am b/testsuites/sptests/sp07/Makefile.am
deleted file mode 100644
index e61682c6b3..0000000000
--- a/testsuites/sptests/sp07/Makefile.am
+++ /dev/null
@@ -1,39 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-TEST = sp07
-
-MANAGERS = io
-
-C_FILES = init.c task1.c task2.c task3.c task4.c taskexit.c tcreate.c \
- tdelete.c trestart.c tstart.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = scn doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/sptests.am
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/sptests/sp07/init.c b/testsuites/sptests/sp07/init.c
deleted file mode 100644
index b45a7dc228..0000000000
--- a/testsuites/sptests/sp07/init.c
+++ /dev/null
@@ -1,127 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is a user initialization task and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_extensions_table Extensions = {
- Task_create_extension, /* task create user extension */
- Task_start_extension, /* task start user extension */
- Task_restart_extension, /* task restart user extension */
- Task_delete_extension, /* task delete user extension */
- NULL, /* task switch user extension */
- NULL, /* begin user extension */
- Task_exit_extension, /* task exitted user extension */
- NULL /* fatal error extension */
-};
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- puts( "\n\n*** TEST 7 ***" );
-
- Extension_name[ 1 ] = rtems_build_name( 'E', 'X', 'T', ' ' );
-
- status = rtems_extension_create(
- Extension_name[ 1 ],
- &Extensions,
- &Extension_id[ 1 ]
- );
- directive_failed( status, "rtems_extension_create" );
-
- Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
- Task_name[ 2 ] = rtems_build_name( 'T', 'A', '2', ' ' );
- Task_name[ 3 ] = rtems_build_name( 'T', 'A', '3', ' ' );
- Task_name[ 4 ] = rtems_build_name( 'T', 'A', '4', ' ' );
-
- status = rtems_task_create(
- Task_name[ 1 ],
- 4,
- RTEMS_MINIMUM_STACK_SIZE * 2,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_create of TA1" );
-
- status = rtems_task_create(
- Task_name[ 2 ],
- 4,
- RTEMS_MINIMUM_STACK_SIZE * 2,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 2 ]
- );
- directive_failed( status, "rtems_task_create of TA2" );
-
- status = rtems_task_create(
- Task_name[ 3 ],
- 250,
- RTEMS_MINIMUM_STACK_SIZE * 2,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 3 ]
- );
- directive_failed( status, "rtems_task_create of TA3" );
-
- status = rtems_task_create(
- Task_name[ 4 ],
- 254,
- RTEMS_MINIMUM_STACK_SIZE * 2,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 4 ]
- );
- directive_failed( status, "rtems_task_create of TA4" );
-
- status = rtems_task_start( Task_id[ 1 ], Task_1, 0 );
- directive_failed( status, "rtems_task_start of TA1" );
-
- status = rtems_task_start( Task_id[ 2 ], Task_2, 0 );
- directive_failed( status, "rtems_task_start of TA2" );
-
- status = rtems_task_start( Task_id[ 3 ], Task_3, 0 );
- directive_failed( status, "rtems_task_start of TA3" );
-
- status = rtems_task_start( Task_id[ 4 ], Task_4, 0 );
- directive_failed( status, "rtems_task_start of TA4" );
-
- status = rtems_task_restart( Task_id[ 3 ], 0 );
- directive_failed( status, "rtems_task_restart of TA3" );
-
- status = rtems_task_set_note( Task_id[ 1 ], RTEMS_NOTEPAD_8, 4 );
- directive_failed( status, "task_set_node of TA1" );
- printf( "INIT - rtems_task_set_note - set TA1's RTEMS_NOTEPAD_8 " );
- puts ( "to TA1's priority: 04" );
-
- status = rtems_task_set_note( Task_id[ 2 ], RTEMS_NOTEPAD_8, 4 );
- directive_failed( status, "task_set_node of TA2" );
- printf( "INIT - rtems_task_set_note - set TA2's RTEMS_NOTEPAD_8 " );
- puts ( "to TA2's priority: 04");
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
diff --git a/testsuites/sptests/sp07/sp07.doc b/testsuites/sptests/sp07/sp07.doc
deleted file mode 100644
index 6b2a162f4d..0000000000
--- a/testsuites/sptests/sp07/sp07.doc
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: test7
-
-directives:
- ex_init, ex_start, t_create, t_start, tm_tick, i_return,
- t_delete, t_setreg, t_getreg, t_setpri, t_suspend
-
-concepts:
-
- a. Verifies that tasks can communicate with each other via the
- t_setreg and t_getreg directives.
-
- b. Verifies that the highest priority task is dispatched to execute.
-
- c. Verifies setting the priority of both a ready and a blocked task.
-
- d. Verifies the deletion of ready and blocked tasks.
-
- e. Verifies the tcreate user extension.
-
- f. Verifies the tstart user extension.
-
- g. Verifies the tdelete user extension.
diff --git a/testsuites/sptests/sp07/sp07.scn b/testsuites/sptests/sp07/sp07.scn
deleted file mode 100644
index 1f6de2d93d..0000000000
--- a/testsuites/sptests/sp07/sp07.scn
+++ /dev/null
@@ -1,33 +0,0 @@
-*** TEST 7 ***
-TASK_CREATE - TA1 - created.
-TASK_CREATE - TA2 - created.
-TASK_CREATE - TA3 - created.
-TASK_CREATE - TA4 - created.
-TASK_START - TA1 - started.
-TASK_START - TA2 - started.
-TASK_START - TA3 - started.
-TASK_START - TA4 - started.
-TASK_RESTART - TA3 - restarted.
-INIT - rtems_task_set_note - set TA1's RTEMS_NOTEPAD_8 to TA1's priority: 04
-INIT - rtems_task_set_note - set TA2's RTEMS_NOTEPAD_8 to TA2's priority: 04
-<pause>
-TA1 - rtems_task_set_priority - get initial priority of self: 04
-TA1 - rtems_task_get_note - get RTEMS_NOTEPAD_8 - current priority: 04
-TA1 - rtems_task_set_note - set TA2's RTEMS_NOTEPAD_8: 03
-TA1 - rtems_task_set_priority - set TA2's priority: 03
-TA2 - rtems_task_get_note - get RTEMS_NOTEPAD_8 - current priority: 03
-TA2 - rtems_task_set_note - set TA1's RTEMS_NOTEPAD_8: 02
-TA2 - rtems_task_set_priority - set TA1's priority: 02
-TA1 - rtems_task_get_note - get RTEMS_NOTEPAD_8 - current priority: 02
-TA1 - rtems_task_set_note - set TA2's RTEMS_NOTEPAD_8: 01
-TA1 - rtems_task_set_priority - set TA2's priority: 01
-TA2 - rtems_task_get_note - get RTEMS_NOTEPAD_8 - current priority: 01
-TA2 - rtems_task_suspend - suspend TA1
-TA2 - rtems_task_set_priority - set priority of TA1 ( blocked )
-TASK_DELETE - TA2 deleting TA1
-TASK_DELETE - TA2 deleting TA3
-TASK_DELETE - TA2 deleting TA2
-TA4 - exitting task
-RTEMS_TASK_EXITTED - extension invoked for TA4
-*** END OF TEST 7 ***
-TASK_DELETE - TA4 deleting TA4 <---- may not appear
diff --git a/testsuites/sptests/sp07/system.h b/testsuites/sptests/sp07/system.h
deleted file mode 100644
index f9f8ddcdf4..0000000000
--- a/testsuites/sptests/sp07/system.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_task Task_1(
- rtems_task_argument argument
-);
-
-rtems_task Task_2(
- rtems_task_argument argument
-);
-
-rtems_task Task_3(
- rtems_task_argument argument
-);
-
-rtems_task Task_4(
- rtems_task_argument argument
-);
-
-rtems_boolean Task_create_extension(
- rtems_tcb *unused,
- rtems_tcb *created_task
-);
-
-rtems_extension Task_delete_extension(
- rtems_tcb *running_task,
- rtems_tcb *deleted_task
-);
-
-rtems_extension Task_restart_extension(
- rtems_tcb *unused,
- rtems_tcb *restarted_task
-);
-
-rtems_extension Task_start_extension(
- rtems_tcb *unused,
- rtems_tcb *started_task
-);
-
-rtems_extension Task_exit_extension(
- rtems_tcb *running_task
-);
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MAXIMUM_USER_EXTENSIONS 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 100
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#define CONFIGURE_EXTRA_TASK_STACKS (4 * RTEMS_MINIMUM_STACK_SIZE)
-
-#include <confdefs.h>
-
-/* global variables */
-
-TEST_EXTERN rtems_id Task_id[ 5 ]; /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 5 ]; /* array of task names */
-
-TEST_EXTERN rtems_id Extension_id[ 4 ];
-TEST_EXTERN rtems_name Extension_name[ 4 ]; /* array of task names */
-
-/* end of include file */
diff --git a/testsuites/sptests/sp07/task1.c b/testsuites/sptests/sp07/task1.c
deleted file mode 100644
index 858ee4b36a..0000000000
--- a/testsuites/sptests/sp07/task1.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/* Task_1
- *
- * This routine serves as a test task. It verifies intertask communication
- * using task notepads and verifies the the user extensions (tcreate, etc).
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task_1(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
- rtems_task_priority the_priority;
- rtems_task_priority previous_priority;
-
- rtems_test_pause();
-
- status = rtems_task_set_priority(
- RTEMS_SELF,
- RTEMS_CURRENT_PRIORITY,
- &the_priority
- );
- directive_failed( status, "rtems_task_set_priority" );
- printf(
- "TA1 - rtems_task_set_priority - get initial priority of self: %02d\n",
- the_priority
- );
-
- while( FOREVER ) {
- status = rtems_task_get_note( RTEMS_SELF, RTEMS_NOTEPAD_8, &the_priority );
- directive_failed( status, "rtems_task_get_note" );
- printf(
-"TA1 - rtems_task_get_note - get RTEMS_NOTEPAD_8 - current priority: %02d\n",
- the_priority
- );
-
- if ( --the_priority == 0 ) {
- puts( "TA1 - rtems_task_suspend - suspend TA2" );
- status = rtems_task_suspend( Task_id[ 2 ] );
- directive_failed( status, "rtems_task_suspend" );
-
- puts( "TA1 - rtems_task_set_priority - set priority of TA2 ( blocked )" );
- status = rtems_task_set_priority( Task_id[ 2 ], 5, &previous_priority );
- directive_failed( status, "rtems_task_set_priority" );
-
- status = rtems_task_delete( Task_id[ 2 ] );
- directive_failed( status, "rtems_task_delete of TA2" );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
- }
-
- printf( "TA1 - rtems_task_set_note - set TA2's RTEMS_NOTEPAD_8: %02d\n",
- the_priority
- );
- status = rtems_task_set_note( Task_id[ 2 ], RTEMS_NOTEPAD_8, the_priority );
- directive_failed( status, "rtems_task_set_note" );
-
- printf( "TA1 - rtems_task_set_priority - set TA2's priority: %02d\n",
- the_priority
- );
- status = rtems_task_set_priority(
- Task_id[ 2 ],
- the_priority,
- &previous_priority
- );
- directive_failed( status, "rtems_task_set_priority" );
- }
-}
diff --git a/testsuites/sptests/sp07/task2.c b/testsuites/sptests/sp07/task2.c
deleted file mode 100644
index 65869cc5ae..0000000000
--- a/testsuites/sptests/sp07/task2.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/* Task_2
- *
- * This routine serves as a test task. Plays with priorities to verify
- * that the highest priority task is always executed.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task_2(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
- rtems_task_priority the_priority;
- rtems_task_priority previous_priority;
-
- while( FOREVER ) {
-
- status = rtems_task_get_note( RTEMS_SELF, RTEMS_NOTEPAD_8, &the_priority );
- directive_failed( status, "rtems_task_get_note" );
- printf(
-"TA2 - rtems_task_get_note - get RTEMS_NOTEPAD_8 - current priority: %02d\n",
- the_priority
- );
-
- if ( --the_priority == 0 ) {
- puts( "TA2 - rtems_task_suspend - suspend TA1" );
- status = rtems_task_suspend( Task_id[ 1 ] );
- directive_failed( status, "rtems_task_suspend" );
-
- puts( "TA2 - rtems_task_set_priority - set priority of TA1 ( blocked )" );
- status = rtems_task_set_priority( Task_id[ 1 ], 5, &previous_priority );
- directive_failed( status, "rtems_task_set_priority" );
-
- status = rtems_task_delete( Task_id[ 1 ] ); /* TA1 is blocked */
- directive_failed( status, "rtems_task_delete of TA1" );
-
- status = rtems_task_delete( Task_id[ 3 ] ); /* TA3 is ready */
- directive_failed( status, "rtems_task_delete of TA3" );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of SELD" );
-
- } else {
-
- printf( "TA2 - rtems_task_set_note - set TA1's RTEMS_NOTEPAD_8: %02d\n",
- the_priority
- );
- status = rtems_task_set_note(Task_id[ 1 ], RTEMS_NOTEPAD_8, the_priority);
- directive_failed( status, "rtems_task_set_note" );
-
- printf( "TA2 - rtems_task_set_priority - set TA1's priority: %02d\n",
- the_priority
- );
- status = rtems_task_set_priority(
- Task_id[ 1 ],
- the_priority,
- &previous_priority
- );
- directive_failed( status, "rtems_task_set_priority" );
- }
- }
-}
diff --git a/testsuites/sptests/sp07/task3.c b/testsuites/sptests/sp07/task3.c
deleted file mode 100644
index f39eee5258..0000000000
--- a/testsuites/sptests/sp07/task3.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Task_3
- *
- * This routine serves as a low priority test task that should never
- * execute.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task_3(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- while( FOREVER ) {
- status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
- directive_failed( status, "rtems_task_wake_after" );
- }
-}
diff --git a/testsuites/sptests/sp07/task4.c b/testsuites/sptests/sp07/task4.c
deleted file mode 100644
index 17ff1c28be..0000000000
--- a/testsuites/sptests/sp07/task4.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Task_4
- *
- * This routine serves as a low priority test task that should exit
- * a soon as it runs to test the taskexitted user extension.
- * execute.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task_4(
- rtems_task_argument argument
-)
-{
- puts( "TA4 - exitting task" );
-}
diff --git a/testsuites/sptests/sp07/taskexit.c b/testsuites/sptests/sp07/taskexit.c
deleted file mode 100644
index 1452af73df..0000000000
--- a/testsuites/sptests/sp07/taskexit.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Task_exit_extension
- *
- * This routine is the task exitted user extension.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_extension Task_exit_extension(
- rtems_tcb *running_task
-)
-{
- if ( task_number( running_task->Object.id ) > 0 ) {
- puts_nocr( "RTEMS_TASK_EXITTED - extension invoked for " );
- put_name( Task_name[ task_number( running_task->Object.id ) ], TRUE );
- }
-
- puts("*** END OF TEST 7 ***" );
- exit( 0 );
-}
diff --git a/testsuites/sptests/sp07/tcreate.c b/testsuites/sptests/sp07/tcreate.c
deleted file mode 100644
index 27a5ac4ee1..0000000000
--- a/testsuites/sptests/sp07/tcreate.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Task_create_extension
- *
- * This routine is the tcreate user extension.
- *
- * Input parameters:
- * unused - pointer to currently running TCB
- * created_task - pointer to new TCB being created
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_boolean Task_create_extension(
- rtems_tcb *unused,
- rtems_tcb *created_task
-)
-{
- if ( task_number( created_task->Object.id ) > 0 ) {
- puts_nocr( "TASK_CREATE - " );
- put_name( Task_name[ task_number( created_task->Object.id ) ], FALSE );
- puts( " - created." );
- }
- return TRUE;
-}
diff --git a/testsuites/sptests/sp07/tdelete.c b/testsuites/sptests/sp07/tdelete.c
deleted file mode 100644
index b877f7e499..0000000000
--- a/testsuites/sptests/sp07/tdelete.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Task_delete_extension
- *
- * This routine is the delete user extension.
- *
- * Input parameters:
- * running_task - pointer to running TCB
- * deleted_task - pointer to TCB deleted
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_extension Task_delete_extension(
- rtems_tcb *running_task,
- rtems_tcb *deleted_task
-)
-{
- if ( task_number( running_task->Object.id ) > 0 ) {
- puts_nocr( "TASK_DELETE - " );
- put_name( Task_name[ task_number( running_task->Object.id ) ], FALSE );
- }
- if ( task_number( deleted_task->Object.id ) > 0 ) {
- puts_nocr( " deleting " );
- put_name( Task_name[ task_number( deleted_task->Object.id ) ], TRUE );
- }
-}
diff --git a/testsuites/sptests/sp07/trestart.c b/testsuites/sptests/sp07/trestart.c
deleted file mode 100644
index dcd5d15f72..0000000000
--- a/testsuites/sptests/sp07/trestart.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Task_restart_extension
- *
- * This routine is the trestart user extension.
- *
- * Input parameters:
- * unused - pointer to currently running TCB
- * restarted_task - pointer to new TCB being started
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-void Task_restart_extension(
- rtems_tcb *unused,
- rtems_tcb *restarted_task
-)
-{
- if ( task_number( restarted_task->Object.id ) > 0 ) {
- puts_nocr( "TASK_RESTART - " );
- put_name( Task_name[ task_number( restarted_task->Object.id ) ], FALSE );
- puts( " - restarted." );
- }
-}
diff --git a/testsuites/sptests/sp07/tstart.c b/testsuites/sptests/sp07/tstart.c
deleted file mode 100644
index 0aeed5b81f..0000000000
--- a/testsuites/sptests/sp07/tstart.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Task_start_extension
- *
- * This routine is the tstart user extension.
- *
- * Input parameters:
- * unused - pointer to currently running TCB
- * started_task - pointer to new TCB being started
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_extension Task_start_extension(
- rtems_tcb *unused,
- rtems_tcb *started_task
-)
-{
- if ( task_number( started_task->Object.id ) > 0 ) {
- puts_nocr( "TASK_START - " );
- put_name( Task_name[ task_number( started_task->Object.id ) ], FALSE );
- puts( " - started." );
- }
-}
diff --git a/testsuites/sptests/sp08/Makefile.am b/testsuites/sptests/sp08/Makefile.am
deleted file mode 100644
index f729b3ae59..0000000000
--- a/testsuites/sptests/sp08/Makefile.am
+++ /dev/null
@@ -1,38 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-TEST = sp08
-
-MANAGERS = io
-
-C_FILES = init.c task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = scn doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/sptests.am
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/sptests/sp08/init.c b/testsuites/sptests/sp08/init.c
deleted file mode 100644
index 35fc42c444..0000000000
--- a/testsuites/sptests/sp08/init.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is a user initialization task and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- puts( "\n\n*** TEST 8 ***" );
-
- Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
-
- status = rtems_task_create(
- Task_name[ 1 ],
- 1,
- RTEMS_MINIMUM_STACK_SIZE * 2,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_create of TA1" );
-
- status = rtems_task_start( Task_id[ 1 ], Task_1, 0 );
- directive_failed( status, "rtems_task_start of TA1" );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
diff --git a/testsuites/sptests/sp08/sp08.doc b/testsuites/sptests/sp08/sp08.doc
deleted file mode 100644
index 325fba0afd..0000000000
--- a/testsuites/sptests/sp08/sp08.doc
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: test8
-
-directives:
- ex_init, ex_start, t_create, t_start, tm_tick, i_return,
- t_mode
-
-concepts:
-
- a. Verifies every mode change possible.
-
- b. Verifies the fatal error handler.
diff --git a/testsuites/sptests/sp08/sp08.scn b/testsuites/sptests/sp08/sp08.scn
deleted file mode 100644
index d85ccc384f..0000000000
--- a/testsuites/sptests/sp08/sp08.scn
+++ /dev/null
@@ -1,22 +0,0 @@
-*** TEST 8 ***
-TA1 - rtems_task_mode - RTEMS_ASR - previous mode: 00000000
-TA1 - rtems_task_mode - RTEMS_NO_ASR - previous mode: 00000000
-TA1 - rtems_task_mode - RTEMS_NO_ASR - previous mode: 00000400
-TA1 - rtems_task_mode - RTEMS_ASR - previous mode: 00000400
-TA1 - rtems_task_mode - RTEMS_NO_TIMESLICE - previous mode: 00000000
-TA1 - rtems_task_mode - RTEMS_TIMESLICE - previous mode: 00000000
-TA1 - rtems_task_mode - RTEMS_TIMESLICE - previous mode: 00000200
-TA1 - rtems_task_mode - RTEMS_NO_TIMESLICE - previous mode: 00000200
-TA1 - rtems_task_mode - RTEMS_PREEMPT - previous mode: 00000000
-TA1 - rtems_task_mode - RTEMS_NO_PREEMPT - previous mode: 00000000
-TA1 - rtems_task_mode - RTEMS_NO_PREEMPT - previous mode: 00000100
-TA1 - rtems_task_mode - RTEMS_PREEMPT - previous mode: 00000100
-TA1 - rtems_task_mode - RTEMS_INTERRUPT_LEVEL( 3 ) - previous mode: 00000000
-TA1 - rtems_task_mode - RTEMS_INTERRUPT_LEVEL( 5 ) - previous mode: 00000003
-TA1 - rtems_task_mode - set all modes - previous mode: 00000005
-TA1 - rtems_task_mode - set all modes - previous mode: 00000703
-TA1 - rtems_task_mode - clear all modes - previous mode: 00000703
-TA1 - rtems_task_mode - get current mode - previous mode: 00000000
-*** END OF TEST 8 ***
-
-NOTE: The interrupt level lines will be different on CPUs with few levels.
diff --git a/testsuites/sptests/sp08/system.h b/testsuites/sptests/sp08/system.h
deleted file mode 100644
index fcc21d7b2a..0000000000
--- a/testsuites/sptests/sp08/system.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_task Task_1(
- rtems_task_argument argument
-);
-
-#define put_mode( _comment, _output_mode ) \
- printf( "%s %08x\n", _comment, _output_mode );
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_TICKS_PER_TIMESLICE 100
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#define CONFIGURE_EXTRA_TASK_STACKS (1 * RTEMS_MINIMUM_STACK_SIZE)
-
-#include <confdefs.h>
-
-/* global variables */
-
-TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
-
-/* end of include file */
diff --git a/testsuites/sptests/sp08/task1.c b/testsuites/sptests/sp08/task1.c
deleted file mode 100644
index 43c5f45264..0000000000
--- a/testsuites/sptests/sp08/task1.c
+++ /dev/null
@@ -1,255 +0,0 @@
-/* Task_1
- *
- * This routine serves as a test task. It verifies all combinations of
- * task mode changes.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task_1(
- rtems_task_argument argument
-)
-{
- rtems_mode previous_mode;
- rtems_status_code status;
-
-/* BEGINNING OF RTEMS_ASR */
-
- status = rtems_task_mode( RTEMS_ASR, RTEMS_ASR_MASK, &previous_mode );
- directive_failed( status, "rtems_task_mode" );
- put_mode(
- "TA1 - rtems_task_mode - RTEMS_ASR - previous mode: ",
- previous_mode
- );
-
- status = rtems_task_mode(
- RTEMS_NO_ASR,
- RTEMS_ASR_MASK,
- &previous_mode
- );
- directive_failed( status, "rtems_task_mode" );
- put_mode(
- "TA1 - rtems_task_mode - RTEMS_NO_ASR - previous mode: ",
- previous_mode
- );
-
- status = rtems_task_mode(
- RTEMS_NO_ASR,
- RTEMS_ASR_MASK,
- &previous_mode
- );
- directive_failed( status, "rtems_task_mode" );
- put_mode(
- "TA1 - rtems_task_mode - RTEMS_NO_ASR - previous mode: ",
- previous_mode
- );
-
- status = rtems_task_mode(
- RTEMS_ASR,
- RTEMS_ASR_MASK,
- &previous_mode
- );
- directive_failed( status, "rtems_task_mode" );
- put_mode(
- "TA1 - rtems_task_mode - RTEMS_ASR - previous mode: ",
- previous_mode
- );
-
-/* END OF RTEMS_ASR */
-
-/* BEGINNING OF RTEMS_TIMESLICE */
-
- status = rtems_task_mode(
- RTEMS_NO_TIMESLICE,
- RTEMS_TIMESLICE_MASK,
- &previous_mode
- );
- directive_failed( status, "rtems_task_mode" );
- put_mode(
- "TA1 - rtems_task_mode - RTEMS_NO_TIMESLICE - previous mode: ",
- previous_mode
- );
-
- status = rtems_task_mode(
- RTEMS_TIMESLICE,
- RTEMS_TIMESLICE_MASK,
- &previous_mode
- );
- directive_failed( status, "rtems_task_mode" );
- put_mode(
- "TA1 - rtems_task_mode - RTEMS_TIMESLICE - previous mode: ",
- previous_mode
- );
-
- status = rtems_task_mode(
- RTEMS_TIMESLICE,
- RTEMS_TIMESLICE_MASK,
- &previous_mode
- );
- directive_failed( status, "rtems_task_mode" );
- put_mode(
- "TA1 - rtems_task_mode - RTEMS_TIMESLICE - previous mode: ",
- previous_mode
- );
-
- status = rtems_task_mode(
- RTEMS_NO_TIMESLICE,
- RTEMS_TIMESLICE_MASK,
- &previous_mode
- );
- directive_failed( status, "rtems_task_mode" );
- put_mode(
- "TA1 - rtems_task_mode - RTEMS_NO_TIMESLICE - previous mode: ",
- previous_mode
- );
-
-/* END OF RTEMS_TIMESLICE */
-
-/* BEGINNING OF RTEMS_PREEMPT */
-
- status = rtems_task_mode(
- RTEMS_PREEMPT,
- RTEMS_PREEMPT_MASK,
- &previous_mode
- );
- directive_failed( status, "rtems_task_mode" );
- put_mode(
- "TA1 - rtems_task_mode - RTEMS_PREEMPT - previous mode: ",
- previous_mode
- );
-
- status = rtems_task_mode(
- RTEMS_NO_PREEMPT,
- RTEMS_PREEMPT_MASK,
- &previous_mode
- );
- directive_failed( status, "rtems_task_mode" );
- put_mode(
- "TA1 - rtems_task_mode - RTEMS_NO_PREEMPT - previous mode: ",
- previous_mode
- );
-
- status = rtems_task_mode(
- RTEMS_NO_PREEMPT,
- RTEMS_PREEMPT_MASK,
- &previous_mode
- );
- directive_failed( status, "rtems_task_mode" );
- put_mode(
- "TA1 - rtems_task_mode - RTEMS_NO_PREEMPT - previous mode: ",
- previous_mode
- );
-
- status = rtems_task_mode(
- RTEMS_PREEMPT,
- RTEMS_PREEMPT_MASK,
- &previous_mode
- );
- directive_failed( status, "rtems_task_mode" );
- put_mode(
- "TA1 - rtems_task_mode - RTEMS_PREEMPT - previous mode: ",
- previous_mode
- );
-
-/* END OF RTEMS_PREEMPT */
-
-/* BEGINNING OF RTEMS_INTERRUPT_LEVEL */
-
- status = rtems_task_mode(
- RTEMS_INTERRUPT_LEVEL(3),
- RTEMS_INTERRUPT_MASK,
- &previous_mode
- );
- directive_failed( status, "rtems_task_mode" );
- put_mode(
- "TA1 - rtems_task_mode - RTEMS_INTERRUPT_LEVEL( 3 ) - previous mode: ",
- previous_mode
- );
-
- status = rtems_task_mode(
- RTEMS_INTERRUPT_LEVEL(5),
- RTEMS_INTERRUPT_MASK,
- &previous_mode
- );
- directive_failed( status, "rtems_task_mode" );
- put_mode(
- "TA1 - rtems_task_mode - RTEMS_INTERRUPT_LEVEL( 5 ) - previous mode: ",
- previous_mode
- );
-
-/* END OF RTEMS_INTERRUPT_LEVEL */
-
-/* BEGINNING OF COMBINATIONS */
-
- status = rtems_task_mode(
- RTEMS_INTERRUPT_LEVEL(3) | RTEMS_NO_ASR |
- RTEMS_TIMESLICE | RTEMS_NO_PREEMPT,
- RTEMS_INTERRUPT_MASK | RTEMS_ASR_MASK |
- RTEMS_TIMESLICE_MASK | RTEMS_PREEMPT_MASK,
- &previous_mode
- );
- directive_failed( status, "rtems_task_mode" );
- put_mode(
- "TA1 - rtems_task_mode - set all modes - previous mode: ",
- previous_mode
- );
-
- status = rtems_task_mode(
- RTEMS_INTERRUPT_LEVEL(3) | RTEMS_NO_ASR |
- RTEMS_TIMESLICE | RTEMS_NO_PREEMPT,
- RTEMS_INTERRUPT_MASK | RTEMS_ASR_MASK |
- RTEMS_TIMESLICE_MASK | RTEMS_PREEMPT_MASK,
- &previous_mode
- );
- directive_failed( status, "rtems_task_mode" );
- put_mode(
- "TA1 - rtems_task_mode - set all modes - previous mode: ",
- previous_mode
- );
-
- status = rtems_task_mode(
- RTEMS_INTERRUPT_LEVEL(0) | RTEMS_ASR | RTEMS_NO_TIMESLICE | RTEMS_PREEMPT,
- RTEMS_INTERRUPT_MASK | RTEMS_ASR_MASK |
- RTEMS_TIMESLICE_MASK | RTEMS_PREEMPT_MASK,
- &previous_mode
- );
- directive_failed( status, "rtems_task_mode" );
- put_mode(
- "TA1 - rtems_task_mode - clear all modes - previous mode: ",
- previous_mode
- );
-
-/* END OF COMBINATIONS */
-
-/* BEGINNING OF CURRENT MODE */
-
- status = rtems_task_mode(
- RTEMS_CURRENT_MODE,
- RTEMS_CURRENT_MODE,
- &previous_mode
- );
- directive_failed( status, "rtems_task_mode" );
- put_mode(
- "TA1 - rtems_task_mode - get current mode - previous mode: ",
- previous_mode
- );
-
-/* END OF CURRENT MODE */
-
- puts( "*** END OF TEST 8 ***" );
- exit( 0 );
-}
diff --git a/testsuites/sptests/sp09/Makefile.am b/testsuites/sptests/sp09/Makefile.am
deleted file mode 100644
index 095c8876f0..0000000000
--- a/testsuites/sptests/sp09/Makefile.am
+++ /dev/null
@@ -1,42 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-TEST = sp09
-
-MANAGERS = io message dual_ported_memory event multi_processor region \
- semaphore signal rate_monotonic timer partition
-
-C_FILES = init.c delay.c isr.c screen01.c screen02.c screen03.c screen04.c \
- screen05.c screen06.c screen07.c screen08.c screen09.c screen10.c \
- screen11.c screen12.c screen13.c screen14.c task1.c task2.c task3.c \
- task4.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = scn doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/sptests.am
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/sptests/sp09/delay.c b/testsuites/sptests/sp09/delay.c
deleted file mode 100644
index 7a6d9cb245..0000000000
--- a/testsuites/sptests/sp09/delay.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Delayed_routine
- *
- * This routine is used as the timer routine for Timer Manager tests.
- *
- * Input parameters:
- * ignored - this parameter is ignored
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_timer_service_routine Delayed_routine(
- rtems_id ignored_id,
- void *ignored_address
-)
-{
-}
diff --git a/testsuites/sptests/sp09/init.c b/testsuites/sptests/sp09/init.c
deleted file mode 100644
index fe95de61da..0000000000
--- a/testsuites/sptests/sp09/init.c
+++ /dev/null
@@ -1,119 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is a user initialization task and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- puts( "\n\n*** TEST 9 ***" );
-
- Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
- Task_name[ 2 ] = rtems_build_name( 'T', 'A', '2', ' ' );
- Task_name[ 3 ] = rtems_build_name( 'T', 'A', '3', ' ' );
- Task_name[ 4 ] = rtems_build_name( 'T', 'A', '4', ' ' );
- Task_name[ 5 ] = rtems_build_name( 'T', 'A', '5', ' ' );
- Task_name[ 6 ] = rtems_build_name( 'T', 'A', '6', ' ' );
- Task_name[ 7 ] = rtems_build_name( 'T', 'A', '7', ' ' );
- Task_name[ 8 ] = rtems_build_name( 'T', 'A', '8', ' ' );
- Task_name[ 9 ] = rtems_build_name( 'T', 'A', '9', ' ' );
- Task_name[ 10 ] = rtems_build_name( 'T', 'A', 'A', ' ' );
-
- Timer_name[ 1 ] = rtems_build_name( 'T', 'M', '1', ' ' );
-
- Semaphore_name[ 1 ] = rtems_build_name( 'S', 'M', '1', ' ' );
- Semaphore_name[ 2 ] = rtems_build_name( 'S', 'M', '2', ' ' );
- Semaphore_name[ 3 ] = rtems_build_name( 'S', 'M', '3', ' ' );
-
- Queue_name[ 1 ] = rtems_build_name( 'M', 'Q', '1', ' ' );
- Queue_name[ 2 ] = rtems_build_name( 'M', 'Q', '2', ' ' );
-
- Partition_name[ 1 ] = rtems_build_name( 'P', 'T', '1', ' ' );
-
- Region_name[ 1 ] = rtems_build_name( 'R', 'N', '1', ' ' );
-
- Port_name[ 1 ] = rtems_build_name( 'D', 'P', '1', ' ' );
-
- Period_name[ 1 ] = rtems_build_name( 'T', 'M', '1', ' ' );
-
-#if 0
- status = rtems_task_create(
- Task_name[1],
- 4,
- 10,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 1 ]
- );
- fatal_directive_status(
- status,
- RTEMS_INVALID_SIZE,
- "rtems_task_create with illegal stack size"
- );
- puts( "INIT - rtems_task_create - RTEMS_INVALID_SIZE" );
-#endif
- puts( "INIT - rtems_task_create - RTEMS_INVALID_SIZE -- NOT CHECKED" );
-
- status = rtems_task_create(
- Task_name[1],
- 0,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 1 ]
- );
- fatal_directive_status(
- status,
- RTEMS_INVALID_PRIORITY,
- "rtems_task_create with illegal priority"
- );
- puts( "INIT - rtems_task_create - RTEMS_INVALID_PRIORITY" );
-
- status = rtems_task_create(
- Task_name[ 1 ],
- 4,
- RTEMS_MINIMUM_STACK_SIZE * 3,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_create of TA1" );
-
- status = rtems_task_restart( Task_id[ 1 ], 0 );
- fatal_directive_status(
- status,
- RTEMS_INCORRECT_STATE,
- "rtems_task_restart of DORMANT task"
- );
- puts( "INIT - rtems_task_restart - RTEMS_INCORRECT_STATE" );
-
- status = rtems_task_start( Task_id[ 1 ], Task_1, 0 );
- directive_failed( status, "rtems_task_start of TA1" );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
diff --git a/testsuites/sptests/sp09/isr.c b/testsuites/sptests/sp09/isr.c
deleted file mode 100644
index b3a213df09..0000000000
--- a/testsuites/sptests/sp09/isr.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Service_routine
- *
- * This routine is used as the timer routine for Interrupt Manager tests.
- *
- * Input parameters:
- * ignored - this parameter is ignored
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_isr Service_routine(
- rtems_vector_number ignored
-)
-{
-}
diff --git a/testsuites/sptests/sp09/screen01.c b/testsuites/sptests/sp09/screen01.c
deleted file mode 100644
index 96470b06c5..0000000000
--- a/testsuites/sptests/sp09/screen01.c
+++ /dev/null
@@ -1,179 +0,0 @@
-/* Screen1
- *
- * This routine generates error screen 1 for test 9.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-void Screen1()
-{
- rtems_unsigned32 notepad_value;
- rtems_id self_id;
- rtems_task_priority previous_priority;
- rtems_status_code status;
-
- status = rtems_task_delete( 100 );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ID,
- "rtems_task_delete with illegal id"
- );
- puts( "TA1 - rtems_task_delete - RTEMS_INVALID_ID" );
-
- status = rtems_task_get_note( RTEMS_SELF, 100, &notepad_value );
- fatal_directive_status(
- status,
- RTEMS_INVALID_NUMBER,
- "rtems_task_get_note with illegal notepad"
- );
- puts( "TA1 - rtems_task_get_note - RTEMS_INVALID_NUMBER" );
-
- status = rtems_task_get_note( 100, RTEMS_NOTEPAD_LAST, &notepad_value );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ID,
- "rtems_task_get_note with illegal id"
- );
- puts( "TA1 - rtems_task_get_note - RTEMS_INVALID_ID" );
-
- status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &self_id );
- directive_failed( status, "rtems_task_ident of self" );
-
- if ( self_id != Task_id[ 1 ] ) {
- puts( "ERROR - rtems_task_ident - incorrect ID returned!" );
- }
- puts( "TA1 - rtems_task_ident - current task RTEMS_SUCCESSFUL" );
-
- status = rtems_task_ident( 100, RTEMS_SEARCH_ALL_NODES, &Junk_id );
- fatal_directive_status(
- status,
- RTEMS_INVALID_NAME,
- "rtems_task_ident with illegal name (local)"
- );
- puts( "TA1 - rtems_task_ident - global RTEMS_INVALID_NAME" );
-
- status = rtems_task_ident( 100, 1, &Junk_id );
- fatal_directive_status(
- status,
- RTEMS_INVALID_NAME,
- "rtems_task_ident with illegal name (global)"
- );
- puts( "TA1 - rtems_task_ident - local RTEMS_INVALID_NAME" );
-
- /*
- * This one case is different if MP is enabled/disabled.
- */
-
- status = rtems_task_ident( 100, 2, &Junk_id );
-#if defined(RTEMS_MULTIPROCESSING)
- fatal_directive_status(
- status,
- RTEMS_INVALID_NODE,
- "rtems_task_ident with illegal node"
- );
-#else
- fatal_directive_status(
- status,
- RTEMS_INVALID_NAME,
- "rtems_task_ident with illegal node"
- );
-#endif
- puts( "TA1 - rtems_task_ident - RTEMS_INVALID_NODE" );
-
- status = rtems_task_restart( 100, 0 );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ID,
- "rtems_task_restart with illegal id"
- );
- puts( "TA1 - rtems_task_restart - RTEMS_INVALID_ID" );
-
- status = rtems_task_resume( 100 );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ID,
- "rtems_task_resume with illegal id"
- );
- puts( "TA1 - rtems_task_resume - RTEMS_INVALID_ID" );
-
- status = rtems_task_resume( RTEMS_SELF );
- fatal_directive_status(
- status,
- RTEMS_INCORRECT_STATE,
- "rtems_task_resume of ready task"
- );
- puts( "TA1 - rtems_task_resume - RTEMS_INCORRECT_STATE" );
-
- status = rtems_task_set_priority( RTEMS_SELF, 512, &previous_priority );
- fatal_directive_status(
- status,
- RTEMS_INVALID_PRIORITY,
- "rtems_task_set_priority with illegal priority"
- );
- puts( "TA1 - rtems_task_set_priority - RTEMS_INVALID_PRIORITY" );
-
- status = rtems_task_set_priority( 100, 8, &previous_priority );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ID,
- "rtems_task_set_priority with illegal id"
- );
- puts( "TA1 - rtems_task_set_priority - RTEMS_INVALID_ID" );
-
- status = rtems_task_set_note(
- RTEMS_SELF,
- RTEMS_NOTEPAD_LAST+10,
- notepad_value
- );
- fatal_directive_status(
- status,
- RTEMS_INVALID_NUMBER,
- "rtems_task_set_note with illegal notepad"
- );
- puts( "TA1 - rtems_task_set_note - RTEMS_INVALID_NUMBER" );
-
- status = rtems_task_set_note( 100, RTEMS_NOTEPAD_LAST, notepad_value );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ID,
- "rtems_task_set_note with illegal id"
- );
- puts( "TA1 - rtems_task_set_note - RTEMS_INVALID_ID" );
-
- status = rtems_task_start( 100, Task_1, 0 );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ID,
- "rtems_task_start with illegal id"
- );
- puts( "TA1 - rtems_task_start - RTEMS_INVALID_ID" );
-
- status = rtems_task_start( 0, Task_1, 0 );
- fatal_directive_status(
- status,
- RTEMS_INCORRECT_STATE,
- "rtems_task_start of ready task"
- );
- puts( "TA1 - rtems_task_start - RTEMS_INCORRECT_STATE" );
-
- status = rtems_task_suspend( 100 );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ID,
- "rtems_task_suspend with illegal id"
- );
- puts( "TA1 - rtems_task_suspend - RTEMS_INVALID_ID" );
-}
diff --git a/testsuites/sptests/sp09/screen02.c b/testsuites/sptests/sp09/screen02.c
deleted file mode 100644
index 8654d93f95..0000000000
--- a/testsuites/sptests/sp09/screen02.c
+++ /dev/null
@@ -1,191 +0,0 @@
-/* Screen2
- *
- * This routine generates error screen 2 for test 9.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-void Screen2()
-{
- rtems_time_of_day time;
- rtems_status_code status;
-
-/* errors before clock is set */
-
- status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
- if ( status == RTEMS_SUCCESSFUL ) {
- puts(
- "TA1 - rtems_clock_get - RTEMS_NOT_DEFINED -- DID BSP SET THE TIME OF DAY?"
- );
- } else {
- fatal_directive_status(
- status,
- RTEMS_NOT_DEFINED,
- "rtems_clock_get before clock is set"
- );
- puts( "TA1 - rtems_clock_get - RTEMS_NOT_DEFINED" );
- }
-
- status = rtems_task_wake_when( &time );
- if ( status == RTEMS_SUCCESSFUL ) {
- puts(
-"TA1 - rtems_task_wake_when - RTEMS_NOT_DEFINED -- DID BSP SET THE TIME OF DAY?"
- );
- } else {
- fatal_directive_status(
- status,
- RTEMS_NOT_DEFINED,
- "rtems_task_wake_when before clock is set"
- );
- puts( "TA1 - rtems_task_wake_when - RTEMS_NOT_DEFINED" );
- }
-
- status = rtems_timer_fire_when( 0, &time, Delayed_routine, NULL );
- if ( status == RTEMS_SUCCESSFUL ) {
- puts(
- "TA1 - timer_wake_when - RTEMS_NOT_DEFINED -- DID BSP SET THE TIME OF DAY?"
- );
- } else {
- fatal_directive_status(
- status,
- RTEMS_NOT_DEFINED,
- "task_fire_when before clock is set"
- );
- puts( "TA1 - rtems_timer_fire_when - RTEMS_NOT_DEFINED" );
- }
-
- build_time( &time, 2, 5, 1987, 8, 30, 45, 0 );
- print_time( "TA1 - rtems_clock_set - ", &time, "" );
- status = rtems_clock_set( &time );
- fatal_directive_status(
- status,
- RTEMS_INVALID_CLOCK,
- "rtems_clock_set with invalid year"
- );
- puts( " - RTEMS_INVALID_CLOCK" );
-
- build_time( &time, 15, 5, 1988, 8, 30, 45, 0 );
- print_time( "TA1 - rtems_clock_set - ", &time, "" );
- status = rtems_clock_set( &time );
- fatal_directive_status(
- status,
- RTEMS_INVALID_CLOCK,
- "rtems_clock_set with invalid month"
- );
- puts( " - RTEMS_INVALID_CLOCK" );
-
- build_time( &time, 2, 32, 1988, 8, 30, 45, 0 );
- print_time( "TA1 - rtems_clock_set - ", &time, "" );
- status = rtems_clock_set( &time );
- fatal_directive_status(
- status,
- RTEMS_INVALID_CLOCK,
- "rtems_clock_set with invalid day"
- );
- puts( " - RTEMS_INVALID_CLOCK" );
-
- build_time( &time, 2, 5, 1988, 25, 30, 45, 0 );
- print_time( "TA1 - rtems_clock_set - ", &time, "" );
- status = rtems_clock_set( &time );
- fatal_directive_status(
- status,
- RTEMS_INVALID_CLOCK,
- "rtems_clock_set with invalid hour"
- );
- puts( " - RTEMS_INVALID_CLOCK" );
-
- build_time( &time, 2, 5, 1988, 8, 61, 45, 0 );
- print_time( "TA1 - rtems_clock_set - ", &time, "" );
- status = rtems_clock_set( &time );
- fatal_directive_status(
- status,
- RTEMS_INVALID_CLOCK,
- "rtems_clock_set with invalid minute"
- );
- puts( " - RTEMS_INVALID_CLOCK" );
-
- build_time( &time, 2, 5, 1988, 8, 30, 61, 0 );
- print_time( "TA1 - rtems_clock_set - ", &time, "" );
- status = rtems_clock_set( &time );
- fatal_directive_status(
- status,
- RTEMS_INVALID_CLOCK,
- "rtems_clock_set with invalid second"
- );
- puts( " - RTEMS_INVALID_CLOCK" );
-
- build_time( &time, 2, 5, 1988, 8, 30, 45, TICKS_PER_SECOND + 1 );
- print_time( "TA1 - rtems_clock_set - ", &time, "" );
- status = rtems_clock_set( &time );
- fatal_directive_status(
- status,
- RTEMS_INVALID_CLOCK,
- "rtems_clock_set with invalid ticks per second"
- );
- puts( " - RTEMS_INVALID_CLOCK" );
-
- build_time( &time, 2, 5, 1988, 8, 30, 45, 0 );
- print_time( "TA1 - rtems_clock_set - ", &time, "" );
- status = rtems_clock_set( &time );
- directive_failed( status, "rtems_clock_set successful" );
- puts( " - RTEMS_SUCCESSFUL" );
-
-/* rtems_task_wake_when */
-
- build_time( &time, 2, 5, 1988, 8, 30, 48, TICKS_PER_SECOND + 1 );
- time.second += 3;
- puts( "TA1 - rtems_task_wake_when - TICKINVALID - sleep about 3 seconds" );
-
- status = rtems_task_wake_when( &time );
- directive_failed(
- status,
- "rtems_task_wake_when with invalid ticks per second"
- );
- puts( "TA1 - rtems_task_wake_when - TICKINVALID - woke up RTEMS_SUCCESSFUL" );
-
- build_time( &time, 2, 5, 1961, 8, 30, 48, 0 );
- print_time( "TA1 - rtems_task_wake_when - ", &time, "" );
- status = rtems_task_wake_when( &time );
- fatal_directive_status(
- status,
- RTEMS_INVALID_CLOCK,
- "rtems_task_wake_when with invalid year"
- );
- puts( " - RTEMS_INVALID_CLOCK" );
-
- build_time( &time, 2, 5, 1988, 25, 30, 48, 0 );
- print_time( "TA1 - rtems_task_wake_when - ", &time, "" );
- status = rtems_task_wake_when( &time );
- fatal_directive_status(
- status,
- RTEMS_INVALID_CLOCK,
- "rtems_task_wake_when with invalid hour"
- );
- puts( " - RTEMS_INVALID_CLOCK" );
-
- rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
- print_time( "TA1 - current time - ", &time, "\n" );
-
- time.month = 1;
- print_time( "TA1 - rtems_task_wake_when - ", &time, "" );
- status = rtems_task_wake_when( &time );
- fatal_directive_status(
- status,
- RTEMS_INVALID_CLOCK,
- "rtems_task_wake_when before current time"
- );
- puts( " - RTEMS_INVALID_CLOCK" );
-}
diff --git a/testsuites/sptests/sp09/screen03.c b/testsuites/sptests/sp09/screen03.c
deleted file mode 100644
index ed35ad7574..0000000000
--- a/testsuites/sptests/sp09/screen03.c
+++ /dev/null
@@ -1,217 +0,0 @@
-/* Screen3
- *
- * This routine generates error screen 3 for test 9.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-void Screen3()
-{
- rtems_name task_name;
- rtems_status_code status;
-
- task_name = 1;
- status = rtems_task_create(
- 0,
- 1,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Junk_id
- );
- fatal_directive_status(
- status,
- RTEMS_INVALID_NAME,
- "rtems_task_create with illegal name"
- );
- puts( "TA1 - rtems_task_create - RTEMS_INVALID_NAME" );
-
- /*
- * If the bsp provides its own stack allocator, then
- * skip the test that tries to allocate a stack that is too big.
- */
-
- if (rtems_cpu_configuration_get_stack_allocate_hook()) {
- puts( "TA1 - rtems_task_create - stack size - RTEMS_UNSATISFIED -- SKIPPED" );
- } else {
- status = rtems_task_create(
- task_name,
- 1,
- rtems_configuration_get_work_space_size(),
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Junk_id
- );
- fatal_directive_status(
- status,
- RTEMS_UNSATISFIED,
- "rtems_task_create with a stack size larger than the workspace"
- );
- puts( "TA1 - rtems_task_create - stack size - RTEMS_UNSATISFIED" );
- }
-
- status = rtems_task_create(
- Task_name[ 2 ],
- 4,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 2 ]
- );
- directive_failed( status, "rtems_task_create of TA2" );
- puts( "TA1 - rtems_task_create - TA2 created - RTEMS_SUCCESSFUL" );
-
- status = rtems_task_suspend( Task_id[ 2 ] );
- directive_failed( status, "rtems_task_suspend of TA2" );
- puts( "TA1 - rtems_task_suspend - suspend TA2 - RTEMS_SUCCESSFUL" );
-
- status = rtems_task_suspend( Task_id[ 2 ] );
- fatal_directive_status(
- status,
- RTEMS_ALREADY_SUSPENDED,
- "rtems_task_suspend of suspended TA2"
- );
- puts( "TA1 - rtems_task_suspend - suspend TA2 - RTEMS_ALREADY_SUSPENDED" );
-
- status = rtems_task_resume( Task_id[ 2 ] );
- directive_failed( status, "rtems_task_resume of TA2" );
- puts( "TA1 - rtems_task_resume - TA2 resumed - RTEMS_SUCCESSFUL" );
-
- status = rtems_task_create(
- Task_name[ 3 ],
- 4,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 3 ]
- );
- directive_failed( status, "rtems_task_create of TA3" );
- puts( "TA1 - rtems_task_create - TA3 created - RTEMS_SUCCESSFUL" );
-
- status = rtems_task_create(
- Task_name[ 4 ],
- 4,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 4 ]
- );
- directive_failed( status, "rtems_task_create of TA4" );
- puts( "TA1 - rtems_task_create - 4 created - RTEMS_SUCCESSFUL" );
-
- status = rtems_task_create(
- Task_name[ 5 ],
- 4,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 5 ]
- );
- directive_failed( status, "rtems_task_create of TA5" );
- puts( "TA1 - rtems_task_create - 5 created - RTEMS_SUCCESSFUL" );
-
- status = rtems_task_create(
- Task_name[ 6 ],
- 4,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 6 ]
- );
- directive_failed( status, "rtems_task_create of TA6" );
- puts( "TA1 - rtems_task_create - 6 created - RTEMS_SUCCESSFUL" );
-
- status = rtems_task_create(
- Task_name[ 7 ],
- 4,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 7 ]
- );
- directive_failed( status, "rtems_task_create of TA7" );
- puts( "TA1 - rtems_task_create - 7 created - RTEMS_SUCCESSFUL" );
-
- status = rtems_task_create(
- Task_name[ 8 ],
- 4,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 8 ]
- );
- directive_failed( status, "rtems_task_create of TA8" );
- puts( "TA1 - rtems_task_create - 8 created - RTEMS_SUCCESSFUL" );
-
- status = rtems_task_create(
- Task_name[ 9 ],
- 4,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 9 ]
- );
- directive_failed( status, "rtems_task_create of TA9" );
- puts( "TA1 - rtems_task_create - 9 created - RTEMS_SUCCESSFUL" );
-
- status = rtems_task_create(
- Task_name[ 10 ],
- 4,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 10 ]
- );
- directive_failed( status, "rtems_task_create of TA10" );
- puts( "TA1 - rtems_task_create - 10 created - RTEMS_SUCCESSFUL" );
-
- status = rtems_task_create(
- task_name,
- 4,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Junk_id
- );
- fatal_directive_status(
- status,
- RTEMS_TOO_MANY,
- "rtems_task_create for too many tasks"
- );
- puts( "TA1 - rtems_task_create - 11 - RTEMS_TOO_MANY" );
-
- /*
- * The check for an object being global is only made if
- * multiprocessing is enabled.
- */
-
-#if defined(RTEMS_MULTIPROCESSING)
- status = rtems_task_create(
- task_name,
- 4,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_GLOBAL,
- &Junk_id
- );
- fatal_directive_status(
- status,
- RTEMS_MP_NOT_CONFIGURED,
- "rtems_task_create of global task in a single cpu system"
- );
-#endif
- puts( "TA1 - rtems_task_create - RTEMS_MP_NOT_CONFIGURED" );
-}
diff --git a/testsuites/sptests/sp09/screen04.c b/testsuites/sptests/sp09/screen04.c
deleted file mode 100644
index fafd528fbc..0000000000
--- a/testsuites/sptests/sp09/screen04.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/* Screen4
- *
- * This routine generates error screen 4 for test 9.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-void Screen4()
-{
- rtems_event_set event_out;
- rtems_time_of_day time;
- rtems_status_code status;
-
- status = rtems_event_receive(
- RTEMS_EVENT_16,
- RTEMS_NO_WAIT,
- RTEMS_NO_TIMEOUT,
- &event_out
- );
- fatal_directive_status(
- status,
- RTEMS_UNSATISFIED,
- "rtems_event_receive unsatisfied (ALL)"
- );
- puts( "TA1 - rtems_event_receive - RTEMS_UNSATISFIED ( all conditions )" );
-
- status = rtems_event_receive(
- RTEMS_EVENT_16,
- RTEMS_EVENT_ANY | RTEMS_NO_WAIT,
- RTEMS_NO_TIMEOUT,
- &event_out
- );
- fatal_directive_status(
- status,
- RTEMS_UNSATISFIED,
- "rtems_event_receive unsatisfied (ANY)"
- );
- puts( "TA1 - rtems_event_receive - RTEMS_UNSATISFIED ( any condition )" );
-
- puts( "TA1 - rtems_event_receive - timeout in 3 seconds" );
- status = rtems_event_receive(
- RTEMS_EVENT_16,
- RTEMS_DEFAULT_OPTIONS,
- 3 * TICKS_PER_SECOND,
- &event_out
- );
- fatal_directive_status(
- status,
- RTEMS_TIMEOUT,
- "rtems_event_receive"
- );
- puts( "TA1 - rtems_event_receive - woke up with RTEMS_TIMEOUT" );
-
- status = rtems_event_send( 100, RTEMS_EVENT_16 );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ID,
- "rtems_event_send with illegal id"
- );
- puts( "TA1 - rtems_event_send - RTEMS_INVALID_ID" );
-
- puts( "TA1 - rtems_task_wake_after - sleep 1 second - RTEMS_SUCCESSFUL" );
- status = rtems_task_wake_after( TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
-
- build_time( &time, 2, 5, 1988, 8, 30, 45, 0 );
- print_time( "TA1 - rtems_clock_set - ", &time, "" );
- status = rtems_clock_set( &time );
- directive_failed( status, "rtems_clock_set" );
- puts( " - RTEMS_SUCCESSFUL" );
-}
diff --git a/testsuites/sptests/sp09/screen05.c b/testsuites/sptests/sp09/screen05.c
deleted file mode 100644
index deb990c42d..0000000000
--- a/testsuites/sptests/sp09/screen05.c
+++ /dev/null
@@ -1,170 +0,0 @@
-/* Screen5
- *
- * This routine generates error screen 5 for test 9.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-void Screen5()
-{
- rtems_status_code status;
-
- status = rtems_semaphore_create(
- 0,
- 1,
- RTEMS_DEFAULT_ATTRIBUTES,
- RTEMS_NO_PRIORITY,
- &Junk_id
- );
- fatal_directive_status(
- status,
- RTEMS_INVALID_NAME,
- "rtems_semaphore_create with illegal name"
- );
- puts( "TA1 - rtems_semaphore_create - RTEMS_INVALID_NAME" );
-
- status = rtems_semaphore_create(
- Semaphore_name[ 1 ],
- 1,
- RTEMS_DEFAULT_ATTRIBUTES,
- RTEMS_NO_PRIORITY,
- &Semaphore_id[ 1 ]
- );
- directive_failed( status, "rtems_semaphore_create" );
- puts( "TA1 - rtems_semaphore_create - 1 - RTEMS_SUCCESSFUL" );
-
- status = rtems_semaphore_create(
- Semaphore_name[ 2 ],
- 1,
- RTEMS_BINARY_SEMAPHORE | RTEMS_PRIORITY | RTEMS_INHERIT_PRIORITY,
- RTEMS_NO_PRIORITY,
- &Semaphore_id[ 2 ]
- );
- directive_failed( status, "rtems_semaphore_create" );
- puts( "TA1 - rtems_semaphore_create - 2 - RTEMS_SUCCESSFUL" );
-
- do {
- status = rtems_semaphore_create(
- Semaphore_name[ 3 ],
- 1,
- RTEMS_DEFAULT_ATTRIBUTES,
- RTEMS_NO_PRIORITY,
- &Junk_id
- );
- } while (status == RTEMS_SUCCESSFUL);
-
- fatal_directive_status(
- status,
- RTEMS_TOO_MANY,
- "rtems_semaphore_create of too many"
- );
- puts( "TA1 - rtems_semaphore_create - 3 - RTEMS_TOO_MANY" );
-
- status = rtems_semaphore_create(
- Semaphore_name[ 1 ],
- 1,
- RTEMS_INHERIT_PRIORITY | RTEMS_BINARY_SEMAPHORE | RTEMS_FIFO,
- RTEMS_NO_PRIORITY,
- &Junk_id
- );
- fatal_directive_status(
- status,
- RTEMS_NOT_DEFINED,
- "rtems_semaphore_create of RTEMS_FIFO RTEMS_INHERIT_PRIORITY"
- );
- puts( "TA1 - rtems_semaphore_create - RTEMS_NOT_DEFINED" );
-
- status = rtems_semaphore_create(
- Semaphore_name[ 1 ],
- 1,
- RTEMS_INHERIT_PRIORITY | RTEMS_COUNTING_SEMAPHORE | RTEMS_PRIORITY,
- RTEMS_NO_PRIORITY,
- &Junk_id
- );
- fatal_directive_status(
- status,
- RTEMS_NOT_DEFINED,
- "rtems_semaphore_create of RTEMS_COUNTING_SEMAPHORE RTEMS_INHERIT_PRIORITY"
- );
- puts( "TA1 - rtems_semaphore_create - RTEMS_NOT_DEFINED" );
-
- status = rtems_semaphore_create(
- Semaphore_name[ 1 ],
- 2,
- RTEMS_BINARY_SEMAPHORE,
- RTEMS_NO_PRIORITY,
- &Junk_id
- );
- fatal_directive_status(
- status,
- RTEMS_INVALID_NUMBER,
- "rtems_semaphore_create of binary semaphore with count > 1"
- );
- puts( "TA1 - rtems_semaphore_create - RTEMS_INVALID_NUMBER" );
-
- /*
- * The check for an object being global is only made if
- * multiprocessing is enabled.
- */
-
-#if defined(RTEMS_MULTIPROCESSING)
- status = rtems_semaphore_create(
- Semaphore_name[ 3 ],
- 1,
- RTEMS_GLOBAL,
- RTEMS_NO_PRIORITY,
- &Junk_id
- );
- fatal_directive_status(
- status,
- RTEMS_MP_NOT_CONFIGURED,
- "rtems_semaphore_create of mp not configured"
- );
-#endif
- puts( "TA1 - rtems_semaphore_create - RTEMS_MP_NOT_CONFIGURED" );
-
- status = rtems_semaphore_delete( 100 );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ID,
- "rtems_semaphore_delete with illegal id"
- );
- puts( "TA1 - rtems_semaphore_delete - unknown RTEMS_INVALID_ID" );
-
- status = rtems_semaphore_delete( 0x010100 );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ID,
- "rtems_semaphore_delete with local illegal id"
- );
- puts( "TA1 - rtems_semaphore_delete - local RTEMS_INVALID_ID" );
-
- status = rtems_semaphore_ident( 100, RTEMS_SEARCH_ALL_NODES, &Junk_id );
- fatal_directive_status(
- status,
- RTEMS_INVALID_NAME,
- "rtems_semaphore_ident will illegal name (local)"
- );
- puts( "TA1 - rtems_semaphore_ident - global RTEMS_INVALID_NAME" );
-
- status = rtems_semaphore_ident( 100, 1, &Junk_id );
- fatal_directive_status(
- status,
- RTEMS_INVALID_NAME,
- "rtems_semaphore_ident will illegal name (global)"
- );
- puts( "TA1 - rtems_semaphore_ident - local RTEMS_INVALID_NAME" );
-}
diff --git a/testsuites/sptests/sp09/screen06.c b/testsuites/sptests/sp09/screen06.c
deleted file mode 100644
index 90f522acde..0000000000
--- a/testsuites/sptests/sp09/screen06.c
+++ /dev/null
@@ -1,124 +0,0 @@
-/* Screen6
- *
- * This routine generates error screen 6 for test 9.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-void Screen6()
-{
- rtems_status_code status;
-
- status = rtems_semaphore_obtain(
- 100,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ID,
- "rtems_semaphore_obtain with illegal id"
- );
- puts( "TA1 - rtems_semaphore_obtain - RTEMS_INVALID_ID" );
-
- status = rtems_semaphore_obtain(
- Semaphore_id[ 1 ],
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
- directive_failed( status, "rtems_semaphore_obtain successful" );
- puts( "TA1 - rtems_semaphore_obtain - got sem 1 - RTEMS_SUCCESSFUL" );
-
- status = rtems_semaphore_obtain(
- Semaphore_id[ 1 ],
- RTEMS_NO_WAIT,
- RTEMS_NO_TIMEOUT
- );
- fatal_directive_status(
- status,
- RTEMS_UNSATISFIED,
- "rtems_semaphore_obtain not available"
- );
- puts( "TA1 - rtems_semaphore_obtain - RTEMS_UNSATISFIED" );
-
- puts( "TA1 - rtems_semaphore_obtain - timeout in 3 seconds" );
- status = rtems_semaphore_obtain(
- Semaphore_id[ 1 ],
- RTEMS_DEFAULT_OPTIONS,
- 3 * TICKS_PER_SECOND
- );
- fatal_directive_status(
- status,
- RTEMS_TIMEOUT,
- "rtems_semaphore_obtain timeout"
- );
- puts( "TA1 - rtems_semaphore_obtain - woke up with RTEMS_TIMEOUT" );
-
- status = rtems_semaphore_release( Semaphore_id[ 2 ] );
- fatal_directive_status(
- status,
- RTEMS_NOT_OWNER_OF_RESOURCE,
- "rtems_semaphore_release and not owner"
- );
- puts( "TA1 - rtems_semaphore_release - RTEMS_NOT_OWNER_OF_RESOURCE" );
-
- status = rtems_semaphore_release( 100 );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ID,
- "rtems_semaphore_release with illegal id"
- );
- puts( "TA1 - rtems_semaphore_release - RTEMS_INVALID_ID" );
-
- puts( "TA1 - rtems_task_start - start TA2 - RTEMS_SUCCESSFUL" );
- status = rtems_task_start( Task_id[ 2 ], Task_2, 0 );
- directive_failed( status, "rtems_task_start of TA2" );
-
- puts( "TA1 - rtems_task_wake_after - yield processor - RTEMS_SUCCESSFUL" );
- status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
- directive_failed( status, "rtems_task_wake_after (yield)" );
-
- puts( "TA1 - rtems_semaphore_delete - delete sem 1 - RTEMS_SUCCESSFUL" );
- status = rtems_semaphore_delete( Semaphore_id[ 1 ] );
- directive_failed( status, "rtems_semaphore_delete of SM1" );
-
- puts( "TA1 - rtems_semaphore_obtain - binary semaphore" );
- status = rtems_semaphore_obtain(
- Semaphore_id[ 2 ],
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
- directive_failed( status, "rtems_semaphore_obtain");
-
- puts( "TA1 - rtems_semaphore_delete - delete sem 2 - RTEMS_RESOURCE_IN_USE" );
- status = rtems_semaphore_delete( Semaphore_id[ 2 ] );
- fatal_directive_status(
- status,
- RTEMS_RESOURCE_IN_USE,
- "rtems_semaphore_delete of SM2"
- );
-
- puts( "TA1 - rtems_task_wake_after - yield processor - RTEMS_SUCCESSFUL" );
- status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
- directive_failed( status, "rtems_task_wake_after (yield)" );
-
- status = rtems_task_delete( Task_id[ 2 ] );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ID,
- "rtems_task_delete after the task has been deleted"
- );
-}
diff --git a/testsuites/sptests/sp09/screen07.c b/testsuites/sptests/sp09/screen07.c
deleted file mode 100644
index 26dab852d5..0000000000
--- a/testsuites/sptests/sp09/screen07.c
+++ /dev/null
@@ -1,206 +0,0 @@
-/* Screen7
- *
- * This routine generates error screen 7 for test 9.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-void Screen7()
-{
- long buffer[ 4 ];
- rtems_unsigned32 size;
- rtems_unsigned32 count;
- rtems_status_code status;
-
- status = rtems_message_queue_broadcast( 100, (long (*)[4]) buffer, 16, &count );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ID,
- "rtems_message_queue_broadcast with illegal id"
- );
- puts( "TA1 - rtems_message_queue_broadcast - RTEMS_INVALID_ID" );
-
- status = rtems_message_queue_create(
- 0,
- 3,
- 16,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Junk_id
- );
- fatal_directive_status(
- status,
- RTEMS_INVALID_NAME,
- "rtems_message_queue_create with illegal name"
- );
- puts( "TA1 - rtems_message_queue_create - Q 1 - RTEMS_INVALID_NAME" );
-
- /*
- * The check for an object being global is only made if
- * multiprocessing is enabled.
- */
-
-#if defined(RTEMS_MULTIPROCESSING)
- status = rtems_message_queue_create(
- Queue_name[ 1 ],
- 1,
- 16,
- RTEMS_GLOBAL,
- &Junk_id
- );
- fatal_directive_status(
- status,
- RTEMS_MP_NOT_CONFIGURED,
- "rtems_message_queue_create of mp not configured"
- );
-#endif
- puts( "TA1 - rtems_message_queue_create - Q 1 - RTEMS_MP_NOT_CONFIGURED" );
-
- status = rtems_message_queue_create(
- Queue_name[ 1 ],
- 2,
- 16,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Queue_id[ 1 ]
- );
- directive_failed( status, "rtems_message_queue_create successful" );
- puts(
- "TA1 - rtems_message_queue_create - Q 1 - 2 DEEP - RTEMS_SUCCESSFUL"
- );
-
- status = rtems_message_queue_create(
- Queue_name[ 2 ],
- 1,
- 16,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Junk_id
- );
- fatal_directive_status(
- status,
- RTEMS_TOO_MANY,
- "rtems_message_queue_create of too many"
- );
- puts( "TA1 - rtems_message_queue_create - Q 2 - RTEMS_TOO_MANY" );
-
- status = rtems_message_queue_delete( 100 );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ID,
- "rtems_message_queue_create with illegal id"
- );
- puts( "TA1 - rtems_message_queue_delete - unknown RTEMS_INVALID_ID" );
-
- status = rtems_message_queue_delete( 0x10100 );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ID,
- "rtems_message_queue_delete with local illegal id"
- );
- puts( "TA1 - rtems_message_queue_delete - local RTEMS_INVALID_ID" );
-
- status = rtems_message_queue_ident( 100, RTEMS_SEARCH_ALL_NODES, &Junk_id );
- fatal_directive_status(
- status,
- RTEMS_INVALID_NAME,
- "rtems_message_queue_ident with illegal name"
- );
- puts( "TA1 - rtems_message_queue_ident - RTEMS_INVALID_NAME" );
-
- status = rtems_message_queue_get_number_pending( 100, &count );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ID,
- "rtems_message_queue_get_number_pending with illegal id"
- );
- puts( "TA1 - rtems_message_queue_get_number_pending - RTEMS_INVALID_ID" );
-
- status = rtems_message_queue_flush( 100, &count );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ID,
- "rtems_message_queue_flush with illegal id"
- );
- puts( "TA1 - rtems_message_queue_flush - RTEMS_INVALID_ID" );
-
- status = rtems_message_queue_receive(
- 100,
- (long (*)[4]) buffer,
- &size,
- RTEMS_DEFAULT_OPTIONS,
- 0
- );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ID,
- "rtems_message_queue_receive wit illegal id"
- );
- puts( "TA1 - rtems_message_queue_receive - RTEMS_INVALID_ID" );
-
- status = rtems_message_queue_receive(
- Queue_id[ 1 ],
- (long (*)[4]) buffer,
- &size,
- RTEMS_NO_WAIT,
- RTEMS_NO_TIMEOUT
- );
- fatal_directive_status(
- status,
- RTEMS_UNSATISFIED,
- "rtems_message_queue_receive unsatisfied"
- );
- puts( "TA1 - rtems_message_queue_receive - Q 1 - RTEMS_UNSATISFIED" );
-
- puts( "TA1 - rtems_message_queue_receive - Q 1 - timeout in 3 seconds" );
- status = rtems_message_queue_receive(
- Queue_id[ 1 ],
- (long (*)[4]) buffer,
- &size,
- RTEMS_DEFAULT_OPTIONS,
- 3 * TICKS_PER_SECOND
- );
- fatal_directive_status(
- status,
- RTEMS_TIMEOUT,
- "rtems_message_queue_receive 3 second timeout"
- );
-
- puts(
- "TA1 - rtems_message_queue_receive - Q 1 - woke up with RTEMS_TIMEOUT"
- );
-
- status = rtems_message_queue_send( 100, (long (*)[4]) buffer, 16 );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ID,
- "rtems_message_queue_send with illegal id"
- );
- puts( "TA1 - rtems_message_queue_send - RTEMS_INVALID_ID" );
-
- status = rtems_message_queue_send( Queue_id[ 1 ], (long (*)[4]) buffer, 16 );
- directive_failed( status, "rtems_message_queue_send" );
- puts( "TA1 - rtems_message_queue_send - BUFFER 1 TO Q 1 - RTEMS_SUCCESSFUL" );
-
- status = rtems_message_queue_send( Queue_id[ 1 ], (long (*)[4]) buffer, 16 );
- directive_failed( status, "rtems_message_queue_send" );
- puts( "TA1 - rtems_message_queue_send - BUFFER 2 TO Q 1 - RTEMS_SUCCESSFUL" );
-
- status = rtems_message_queue_send( Queue_id[ 1 ], (long (*)[4]) buffer, 16 );
- fatal_directive_status(
- status,
- RTEMS_TOO_MANY,
- "rtems_message_queue_send too many to a limited queue"
- );
- puts( "TA1 - rtems_message_queue_send - BUFFER 3 TO Q 1 - RTEMS_TOO_MANY" );
-}
diff --git a/testsuites/sptests/sp09/screen08.c b/testsuites/sptests/sp09/screen08.c
deleted file mode 100644
index dd0a9afba4..0000000000
--- a/testsuites/sptests/sp09/screen08.c
+++ /dev/null
@@ -1,127 +0,0 @@
-/* Screen8
- *
- * This routine generates error screen 8 for test 9.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-void Screen8()
-{
- long buffer[ 4 ];
- rtems_status_code status;
-
- status = rtems_message_queue_delete( Queue_id[ 1 ] );
- directive_failed( status, "rtems_message_queue_delete successful" );
- puts( "TA1 - rtems_message_queue_delete - Q 1 - RTEMS_SUCCESSFUL" );
-
- status = rtems_message_queue_create(
- Queue_name[ 1 ],
- 2,
- 16,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Queue_id[ 1 ]
- );
- directive_failed( status, "rtems_message_queue_create successful" );
- puts(
- "TA1 - rtems_message_queue_create - Q 1 - 2 DEEP - RTEMS_SUCCESSFUL"
- );
-
- status = rtems_message_queue_send( Queue_id[ 1 ], (long (*)[4])buffer, 16 );
- directive_failed( status, "rtems_message_queue_send successful" );
- puts( "TA1 - rtems_message_queue_send - BUFFER 1 TO Q 1 - RTEMS_SUCCESSFUL" );
-
- status = rtems_message_queue_send( Queue_id[ 1 ], (long (*)[4])buffer, 16 );
- directive_failed( status, "rtems_message_queue_send successful" );
- puts( "TA1 - rtems_message_queue_send - BUFFER 2 TO Q 1 - RTEMS_SUCCESSFUL" );
-
- status = rtems_message_queue_send( Queue_id[ 1 ], (long (*)[4])buffer, 16 );
- fatal_directive_status(
- status,
- RTEMS_TOO_MANY,
- "rtems_message_queue_send too many to limited queue"
- );
- puts( "TA1 - rtems_message_queue_send - BUFFER 3 TO Q 1 - RTEMS_TOO_MANY" );
-
- status = rtems_message_queue_delete( Queue_id[ 1 ] );
- directive_failed( status, "rtems_message_queue_delete successful" );
- puts( "TA1 - rtems_message_queue_delete - Q 1 - RTEMS_SUCCESSFUL" );
-
- status = rtems_message_queue_create(
- Queue_name[ 1 ],
- 3,
- 16,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Queue_id[ 1 ]
- );
- directive_failed( status, "rtems_message_queue_create successful" );
- puts(
- "TA1 - rtems_message_queue_create - Q 1 - 3 DEEP - RTEMS_SUCCESSFUL"
- );
-
- status = rtems_message_queue_send( Queue_id[ 1 ], (long (*)[4])buffer, 16 );
- directive_failed( status, "rtems_message_queue_send successful" );
- puts( "TA1 - rtems_message_queue_send - BUFFER 1 TO Q 1 - RTEMS_SUCCESSFUL" );
-
- status = rtems_message_queue_send( Queue_id[ 1 ], (long (*)[4])buffer, 16 );
- directive_failed( status, "rtems_message_queue_send successful" );
- puts( "TA1 - rtems_message_queue_send - BUFFER 2 TO Q 1 - RTEMS_SUCCESSFUL" );
-
- status = rtems_message_queue_send( Queue_id[ 1 ], (long (*)[4])buffer, 16 );
- directive_failed( status, "rtems_message_queue_send successful" );
- puts( "TA1 - rtems_message_queue_send - BUFFER 3 TO Q 1 - RTEMS_SUCCESSFUL" );
-
- status = rtems_message_queue_send( Queue_id[ 1 ], (long (*)[4])buffer, 16 );
- fatal_directive_status(
- status,
- RTEMS_TOO_MANY,
- "rtems_message_queue_send too many to limited queue"
- );
- puts(
- "TA1 - rtems_message_queue_send - BUFFER 4 TO Q 1 - RTEMS_TOO_MANY"
- );
-
- status = rtems_message_queue_delete( Queue_id[ 1 ] );
- directive_failed( status, "rtems_message_queue_delete successful" );
- puts( "TA1 - rtems_message_queue_delete - Q 1 - RTEMS_SUCCESSFUL" );
-
- status = rtems_message_queue_create(
- Queue_name[ 1 ],
- 3,
- 16,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Queue_id[ 1 ]
- );
- directive_failed( status, "rtems_message_queue_create successful" );
- puts(
- "TA1 - rtems_message_queue_create - Q 1 - 3 DEEP - RTEMS_SUCCESSFUL"
- );
-
- puts( "TA1 - rtems_task_start - start TA3 - RTEMS_SUCCESSFUL" );
- status = rtems_task_start( Task_id[ 3 ], Task_3, 0 );
- directive_failed( status, "rtems_task_start of TA3" );
-
- puts( "TA1 - rtems_task_wake_after - yield processor - RTEMS_SUCCESSFUL" );
- status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
- directive_failed( status, "rtems_task_wake_after (yield)" );
-
- puts( "TA1 - rtems_message_queue_delete - delete Q 1 - RTEMS_SUCCESSFUL" );
- status = rtems_message_queue_delete( Queue_id[ 1 ] );
- directive_failed( status, "rtems_message_queue_delete successful" );
-
- puts( "TA1 - rtems_task_wake_after - yield processor - RTEMS_SUCCESSFUL" );
- status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
- directive_failed( status, "rtems_task_wake_after (yield)" );
-}
diff --git a/testsuites/sptests/sp09/screen09.c b/testsuites/sptests/sp09/screen09.c
deleted file mode 100644
index 45c55dc520..0000000000
--- a/testsuites/sptests/sp09/screen09.c
+++ /dev/null
@@ -1,151 +0,0 @@
-/* Screen9
- *
- * This routine generates error screen 9 for test 9.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-void Screen9()
-{
- void *converted;
- rtems_status_code status;
- rtems_isr_entry old_service_routine;
-
- status = rtems_interrupt_catch(
- Service_routine,
- ISR_INTERRUPT_MAXIMUM_VECTOR_NUMBER + 10,
- &old_service_routine
- );
- fatal_directive_status(
- status,
- RTEMS_INVALID_NUMBER,
- "rtems_interrupt_catch with invalid vector"
- );
- puts( "TA1 - rtems_interrupt_catch - RTEMS_INVALID_NUMBER" );
-
- status = rtems_interrupt_catch( NULL, 3, &old_service_routine );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ADDRESS,
- "rtems_interrupt_catch with invalid handler"
- );
- puts( "TA1 - rtems_interrupt_catch - bad handler RTEMS_INVALID_ADDRESS" );
-
- status = rtems_interrupt_catch( Service_routine, 3, NULL );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ADDRESS,
- "rtems_interrupt_catch with invalid old isr pointer"
- );
- puts( "TA1 - rtems_interrupt_catch - old isr RTEMS_INVALID_ADDRESS" );
-
- status = rtems_signal_send( 100, RTEMS_SIGNAL_1 );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ID,
- "rtems_signal_send with illegal id"
- );
- puts( "TA1 - rtems_signal_send - RTEMS_INVALID_ID" );
-
- status = rtems_signal_send( RTEMS_SELF, RTEMS_SIGNAL_16 );
- fatal_directive_status(
- status,
- RTEMS_NOT_DEFINED,
- "rtems_signal_send with no handler"
- );
- puts( "TA1 - rtems_signal_send - RTEMS_NOT_DEFINED" );
-
- status = rtems_port_create(
- 0,
- Internal_port_area,
- External_port_area,
- sizeof( Internal_port_area ),
- &Junk_id
- );
- fatal_directive_status(
- status,
- RTEMS_INVALID_NAME,
- "rtems_port_create with illegal name"
- );
- puts( "TA1 - rtems_port_create - RTEMS_INVALID_NAME" );
-
- status = rtems_port_create(
- Port_name[ 1 ],
- &((char *)Internal_port_area)[ 1 ],
- External_port_area,
- sizeof( Internal_port_area ),
- &Junk_id
- );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ADDRESS,
- "rtems_port_create with illegal address"
- );
- puts( "TA1 - rtems_port_create - RTEMS_INVALID_ADDRESS" );
-
- status = rtems_port_create(
- Port_name[ 1 ],
- Internal_port_area,
- External_port_area,
- sizeof( Internal_port_area ),
- &Junk_id
- );
- fatal_directive_status(
- status,
- RTEMS_TOO_MANY,
- "rtems_port_create of too many"
- );
- puts( "TA1 - rtems_port_create - RTEMS_TOO_MANY" );
-
- status = rtems_port_delete( 0 );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ID,
- "rtems_port_delete with illegal id"
- );
- puts( "TA1 - rtems_port_delete - RTEMS_INVALID_ID" );
-
- status = rtems_port_ident( 0, &Junk_id );
- fatal_directive_status(
- status,
- RTEMS_INVALID_NAME,
- "rtems_port_ident with illegal name"
- );
- puts( "TA1 - rtems_port_ident - RTEMS_INVALID_NAME" );
-
- status = rtems_port_external_to_internal(
- 100,
- Internal_port_area,
- &converted
- );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ID,
- "rtems_port_external_to_internal with illegal id"
- );
- puts( "TA1 - rtems_port_external_to_internal - RTEMS_INVALID_ID" );
- status = rtems_port_internal_to_external(
- 100,
- Internal_port_area,
- &converted
- );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ID,
- "rtems_port_internal_to_external with illegal id"
- );
- puts( "TA1 - rtems_port_internal_to_external - RTEMS_INVALID_ID" );
-}
diff --git a/testsuites/sptests/sp09/screen10.c b/testsuites/sptests/sp09/screen10.c
deleted file mode 100644
index f51ad2ebf9..0000000000
--- a/testsuites/sptests/sp09/screen10.c
+++ /dev/null
@@ -1,163 +0,0 @@
-/* Screen10
- *
- * This routine generates error screen 10 for test 9.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-void Screen10()
-{
- rtems_status_code status;
-
- status = rtems_rate_monotonic_create( 0, &Junk_id );
- fatal_directive_status(
- status,
- RTEMS_INVALID_NAME,
- "rtems_rate_monotonic_create with illegal name"
- );
- puts( "TA1 - rtems_rate_monotonic_create - RTEMS_INVALID_NAME" );
-
- status = rtems_rate_monotonic_create( Period_name[ 1 ], &Period_id[ 1 ] );
- directive_failed( status, "rtems_rate_monotonic_create successful" );
- puts( "TA1 - rtems_rate_monotonic_create - RTEMS_SUCCESSFUL" );
-
- status = rtems_rate_monotonic_create( Period_name[ 1 ], &Junk_id );
- fatal_directive_status(
- status,
- RTEMS_TOO_MANY,
- "rtems_rate_monotonic_create of too many"
- );
- puts( "TA1 - rtems_rate_monotonic_create - RTEMS_TOO_MANY" );
-
- status = rtems_rate_monotonic_ident( 0, &Junk_id );
- fatal_directive_status(
- status,
- RTEMS_INVALID_NAME,
- "rtems_rate_monotonic_ident with illegal name"
- );
- puts( "TA1 - rtems_rate_monotonic_ident - RTEMS_INVALID_NAME" );
-
- status = rtems_rate_monotonic_period( 100, 5 );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ID,
- "rtems_rate_monotonic_period with illegal id"
- );
- puts( "TA1 - rtems_rate_monotonic_period - unknown RTEMS_INVALID_ID" );
-
- status = rtems_rate_monotonic_period( 0x10100, 5 );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ID,
- "rtems_rate_monotonic_period with illegal id"
- );
- puts( "TA1 - rtems_rate_monotonic_period - local RTEMS_INVALID_ID" );
-
- status = rtems_rate_monotonic_period( Period_id[ 1 ], RTEMS_PERIOD_STATUS );
- fatal_directive_status(
- status,
- RTEMS_NOT_DEFINED,
- "rtems_rate_monotonic_period status not defined"
- );
- puts(
- "TA1 - rtems_rate_monotonic_period(RTEMS_PERIOD_STATUS) - RTEMS_NOT_DEFINED"
- );
-
- status = rtems_rate_monotonic_period( Period_id[ 1 ], 100 );
- directive_failed( status, "rtems_rate_monotonic_period successful" );
- puts( "TA1 - rtems_rate_monotonic_period - 100 ticks - RTEMS_SUCCESSFUL" );
-
- status = rtems_rate_monotonic_period( Period_id[ 1 ], RTEMS_PERIOD_STATUS );
- directive_failed( status, "rtems_rate_monotonic_period status" );
- puts(
- "TA1 - rtems_rate_monotonic_period(RTEMS_PERIOD_STATUS) - RTEMS_SUCCESSFUL"
- );
-
- while ( FOREVER ) {
-
- status = rtems_rate_monotonic_period(Period_id[ 1 ], RTEMS_PERIOD_STATUS);
-
- if ( status == RTEMS_TIMEOUT ) break;
-
- directive_failed(
- status,
- "rtems_rate_monotonic_period waiting for timeout"
- );
- }
- puts(
- "TA1 - rtems_rate_monotonic_period(RTEMS_PERIOD_STATUS) - RTEMS_TIMEOUT"
- );
-
- status = rtems_rate_monotonic_cancel( 100 );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ID,
- "rtems_rate_monotonic_cancel with illegal id"
- );
- puts( "TA1 - rtems_rate_monotonic_cancel - unknown RTEMS_INVALID_ID" );
-
- status = rtems_rate_monotonic_cancel( 0x10100 );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ID,
- "rtems_rate_monotonic_cancel will illegal id"
- );
- puts( "TA1 - rtems_rate_monotonic_cancel - local RTEMS_INVALID_ID" );
-
- status = rtems_rate_monotonic_cancel( Period_id[ 1 ] );
- directive_failed( status, "rtems_rate_monotonic_cancel" );
- puts( "TA1 - rtems_rate_monotonic_cancel - RTEMS_SUCCESSFUL" );
-
- status = rtems_rate_monotonic_period( Period_id[ 1 ], 5 );
- directive_failed( status, "rtems_rate_monotonic_period restart" );
-
- status = rtems_task_wake_after( 1 * TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
-
- status = rtems_rate_monotonic_period( Period_id[ 1 ], 5 );
- fatal_directive_status(
- status,
- RTEMS_TIMEOUT,
- "rtems_rate_monotonic_period"
- );
- puts( "TA1 - rtems_rate_monotonic_period - 5 ticks - RTEMS_TIMEOUT" );
-
- status = rtems_task_start( Task_id[ 4 ], Task_4, 0 );
- directive_failed( status, "rtems_task_start of TA4" );
-
- puts( "TA1 - yielding to TA4" );
- status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
-
- status = rtems_rate_monotonic_delete( 100 );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ID,
- "rtems_rate_monotonic_delete with illegal id"
- );
- puts( "TA1 - rtems_rate_monotonic_delete - unknown RTEMS_INVALID_ID" );
-
- status = rtems_rate_monotonic_delete( 0x10100 );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ID,
- "rtems_rate_monotonic_delete with illegal id"
- );
- puts( "TA1 - rtems_rate_monotonic_delete - local RTEMS_INVALID_ID" );
-
- status = rtems_rate_monotonic_delete( Period_id[ 1 ] );
- directive_failed( status, "rtems_rate_monotonic_delete" );
- puts( "TA1 - rtems_rate_monotonic_delete - RTEMS_SUCCESSFUL" );
-}
diff --git a/testsuites/sptests/sp09/screen11.c b/testsuites/sptests/sp09/screen11.c
deleted file mode 100644
index c5666a039c..0000000000
--- a/testsuites/sptests/sp09/screen11.c
+++ /dev/null
@@ -1,256 +0,0 @@
-/* Screen11
- *
- * This routine generates error screen 11 for test 9.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-void Screen11()
-{
- void *buffer_address_1;
- void *buffer_address_2;
- void *buffer_address_3;
- rtems_status_code status;
-
- status = rtems_partition_create(
- 0,
- Partition_good_area,
- 128,
- 40,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Junk_id
- );
- fatal_directive_status(
- status,
- RTEMS_INVALID_NAME,
- "rtems_partition_create with illegal name"
- );
- puts( "TA1 - rtems_partition_create - RTEMS_INVALID_NAME" );
-
- status = rtems_partition_create(
- Partition_name[ 1 ],
- Partition_good_area,
- 0,
- 80,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Junk_id
- );
- fatal_directive_status(
- status,
- RTEMS_INVALID_SIZE,
- "rtems_partition_create with illegal length"
- );
- puts( "TA1 - rtems_partition_create - length - RTEMS_INVALID_SIZE" );
-
- status = rtems_partition_create(
- Partition_name[ 1 ],
- Partition_good_area,
- 128,
- 0,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Junk_id
- );
- fatal_directive_status(
- status,
- RTEMS_INVALID_SIZE,
- "rtems_partition_create with illegal buffer size"
- );
- puts( "TA1 - rtems_partition_create - buffer size - RTEMS_INVALID_SIZE" );
-
- status = rtems_partition_create(
- Partition_name[ 1 ],
- Partition_good_area,
- 128,
- 256,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Junk_id
- );
- fatal_directive_status(
- status,
- RTEMS_INVALID_SIZE,
- "rtems_partition_create with buffer_size > length"
- );
- puts(
- "TA1 - rtems_partition_create - length < buffer size - RTEMS_INVALID_SIZE"
- );
-
- /*
- * The check for an object being global is only made if
- * multiprocessing is enabled.
- */
-
-#if defined(RTEMS_MULTIPROCESSING)
- status = rtems_partition_create(
- Partition_name[ 1 ],
- Partition_good_area,
- 128,
- 64,
- RTEMS_GLOBAL,
- &Junk_id
- );
- fatal_directive_status(
- status,
- RTEMS_MP_NOT_CONFIGURED,
- "rtems_partition_create of global"
- );
-#endif
- puts( "TA1 - rtems_partition_create - RTEMS_MP_NOT_CONFIGURED" );
-
- status = rtems_partition_create(
- Partition_name[ 1 ],
- Partition_bad_area,
- 128,
- 64,
- RTEMS_GLOBAL,
- &Junk_id
- );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ADDRESS,
- "rtems_partition_create with bad address"
- );
- puts( "TA1 - rtems_partition_create - RTEMS_INVALID_ADDRESS" );
-
- status = rtems_partition_create(
- Partition_name[ 1 ],
- Partition_good_area,
- 128,
- 34,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Junk_id
- );
- fatal_directive_status(
- status,
- RTEMS_INVALID_SIZE,
- "rtems_partition_create with unaligned buffer_size"
- );
- puts( "TA1 - rtems_partition_create - RTEMS_INVALID_SIZE" );
-
- status = rtems_partition_delete( 100 );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ID,
- "rtems_partition_delete with illegal id"
- );
- puts( "TA1 - rtems_partition_delete - unknown RTEMS_INVALID_ID" );
-
- status = rtems_partition_delete( 0x10100 );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ID,
- "rtems_partition_delete with illegal id"
- );
- puts( "TA1 - rtems_partition_delete - local RTEMS_INVALID_ID" );
-
- status = rtems_partition_get_buffer( 100, &buffer_address_1 );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ID,
- "rtems_partition_get_buffer with illegal id"
- );
- puts( "TA1 - rtems_partition_get_buffer - RTEMS_INVALID_ID" );
-
- status = rtems_partition_ident( 0, RTEMS_SEARCH_ALL_NODES, &Junk_id );
- fatal_directive_status(
- status,
- RTEMS_INVALID_NAME,
- "rtems_partition_ident with illegal name"
- );
- puts( "TA1 - rtems_partition_ident - RTEMS_INVALID_NAME" );
-
- status = rtems_partition_return_buffer( 100, buffer_address_1 );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ID,
- "rtems_partition_return_buffer with illegal id"
- );
- puts( "TA1 - rtems_partition_return_buffer - RTEMS_INVALID_ID" );
-
- status = rtems_partition_create(
- Partition_name[ 1 ],
- Partition_good_area,
- 128,
- 64,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Partition_id[ 1 ]
- );
- directive_failed( status, "rtems_partition_create" );
- puts( "TA1 - rtems_partition_create - RTEMS_SUCCESSFUL" );
-
- status = rtems_partition_create(
- Partition_name[ 1 ],
- Partition_good_area,
- 128,
- 32,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Junk_id
- );
- fatal_directive_status(
- status,
- RTEMS_TOO_MANY,
- "rtems_partition_create of too many"
- );
- puts( "TA1 - rtems_partition_create - RTEMS_TOO_MANY" );
-
- status = rtems_partition_get_buffer( Partition_id[ 1 ], &buffer_address_1 );
- directive_failed( status, "rtems_partition_get_buffer");
- puts( "TA1 - rtems_partition_get_buffer - RTEMS_SUCCESSFUL" );
-
- status = rtems_partition_get_buffer( Partition_id[ 1 ], &buffer_address_2 );
- directive_failed( status, "rtems_partition_get_buffer" );
- puts( "TA1 - rtems_partition_get_buffer - RTEMS_SUCCESSFUL" );
-
- status = rtems_partition_get_buffer( Partition_id[ 1 ], &buffer_address_3 );
- fatal_directive_status(
- status,
- RTEMS_UNSATISFIED,
- "rtems_partition_get_buffer unsatisfied"
- );
- puts( "TA1 - rtems_partition_get_buffer - RTEMS_UNSATISFIED" );
-
- status = rtems_partition_delete( Partition_id[ 1 ] );
- fatal_directive_status(
- status,
- RTEMS_RESOURCE_IN_USE,
- "rtems_partition_delete with buffers in use"
- );
- puts( "TA1 - rtems_partition_delete - RTEMS_RESOURCE_IN_USE" );
-
- status = rtems_partition_return_buffer(
- Partition_id[ 1 ],
- Region_good_area /* NOTE: Region Memory */
- );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ADDRESS,
- "rtems_partition_return_buffer with buffer address out of partition"
- );
- puts(
- "TA1 - rtems_partition_return_buffer - RTEMS_INVALID_ADDRESS - out of range"
- );
-
- status = rtems_partition_return_buffer(
- Partition_id[ 1 ],
- &Partition_good_area[ 7 ]
- );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ADDRESS,
- "rtems_partition_return_buffer with buffer address not on boundary"
- );
- puts_nocr( "TA1 - rtems_partition_return_buffer - " );
- puts ( "RTEMS_INVALID_ADDRESS - not on boundary");
-}
diff --git a/testsuites/sptests/sp09/screen12.c b/testsuites/sptests/sp09/screen12.c
deleted file mode 100644
index 26ee620fb3..0000000000
--- a/testsuites/sptests/sp09/screen12.c
+++ /dev/null
@@ -1,336 +0,0 @@
-/* Screen12
- *
- * This routine generates error screen 12 for test 9.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-void Screen12()
-{
- void *segment_address_1;
- void *segment_address_2;
- void *segment_address_3;
- rtems_unsigned32 offset;
- rtems_unsigned32 good_front_flag;
- rtems_unsigned32 good_back_flag;
- rtems_status_code status;
-
- status = rtems_region_create(
- 0,
- Region_good_area,
- 0x40,
- 32,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Junk_id
- );
- fatal_directive_status(
- status,
- RTEMS_INVALID_NAME,
- "rtems_region_create with illegal name"
- );
- puts( "TA1 - rtems_region_create - RTEMS_INVALID_NAME" );
-
- status = rtems_region_create(
- Region_name[ 1 ],
- Region_bad_area,
- 0x40,
- 32,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Junk_id
- );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ADDRESS,
- "rtems_region_create with illegal address"
- );
- puts( "TA1 - rtems_region_create - RTEMS_INVALID_ADDRESS" );
-
- status = rtems_region_create(
- Region_name[ 1 ],
- Region_good_area,
- 0x40,
- 34,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Junk_id
- );
- fatal_directive_status(
- status,
- RTEMS_INVALID_SIZE,
- "rtems_region_create with illegal size"
- );
- puts( "TA1 - rtems_region_create - RTEMS_INVALID_SIZE" );
-
- status = rtems_region_create(
- Region_name[ 1 ],
- &Region_good_area[ REGION_START_OFFSET ],
- REGION_LENGTH,
- 0x40,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Region_id[ 1 ]
- );
- directive_failed( status, "rtems_region_create" );
- puts( "TA1 - rtems_region_create - RTEMS_SUCCESSFUL" );
-
- status = rtems_region_create(
- Region_name[ 1 ],
- Region_good_area,
- REGION_LENGTH,
- 0x40,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Junk_id
- );
- fatal_directive_status(
- status,
- RTEMS_TOO_MANY,
- "rtems_region_create of too many"
- );
- puts( "TA1 - rtems_region_create - RTEMS_TOO_MANY" );
-
- status = rtems_region_delete( 100 );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ID,
- "rtems_region_delete with illegal id"
- );
- puts( "TA1 - rtems_region_delete - unknown RTEMS_INVALID_ID" );
-
- status = rtems_region_delete( 0x10100 );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ID,
- "rtems_region_delete with illegal id"
- );
- puts( "TA1 - rtems_region_delete - local RTEMS_INVALID_ID" );
-
- status = rtems_region_ident( 0, &Junk_id );
- fatal_directive_status(
- status,
- RTEMS_INVALID_NAME,
- "rtems_region_ident with illegal name"
- );
- puts( "TA1 - rtems_region_ident - RTEMS_INVALID_NAME" );
-
- status = rtems_region_get_segment(
- 100,
- 0x40,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT,
- &segment_address_1
- );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ID,
- "rtems_region_get_segment with illegal id"
- );
- puts( "TA1 - rtems_region_get_segment - RTEMS_INVALID_ID" );
-
- status = rtems_region_get_segment(
- Region_id[ 1 ],
- sizeof( Region_good_area ) * 2,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT,
- &segment_address_1
- );
- fatal_directive_status(
- status,
- RTEMS_INVALID_SIZE,
- "rtems_region_get_segment with illegal size"
- );
- puts( "TA1 - rtems_region_get_segment - RTEMS_INVALID_SIZE" );
-
- status = rtems_region_get_segment(
- Region_id[ 1 ],
- 384,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT,
- &segment_address_1
- );
- directive_failed( status, "rtems_region_get_segment" );
- puts( "TA1 - rtems_region_get_segment - RTEMS_SUCCESSFUL" );
-
- status = rtems_region_get_segment(
- Region_id[ 1 ],
- REGION_LENGTH / 2,
- RTEMS_NO_WAIT,
- RTEMS_NO_TIMEOUT,
- &segment_address_2
- );
- fatal_directive_status(
- status,
- RTEMS_UNSATISFIED,
- "rtems_region_get_segment unsatisfied"
- );
- puts( "TA1 - rtems_region_get_segment - RTEMS_UNSATISFIED" );
-
- puts( "TA1 - rtems_region_get_segment - timeout in 3 seconds" );
- status = rtems_region_get_segment(
- Region_id[ 1 ],
- 128,
- RTEMS_DEFAULT_OPTIONS,
- 3 * TICKS_PER_SECOND,
- &segment_address_3
- );
- fatal_directive_status(
- status,
- RTEMS_TIMEOUT,
- "rtems_region_get_segment timeout"
- );
- puts( "TA1 - rtems_region_get_segment - woke up with RTEMS_TIMEOUT" );
-
- status = rtems_region_delete( Region_id[ 1 ] );
- fatal_directive_status(
- status,
- RTEMS_RESOURCE_IN_USE,
- "rtems_region_delete with buffers in use"
- );
- puts( "TA1 - rtems_region_delete - RTEMS_RESOURCE_IN_USE" );
-
- status = rtems_region_return_segment( 100, segment_address_1 );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ID,
- "rtems_region_return_segment with illegal id"
- );
- puts( "TA1 - rtems_region_return_segment - RTEMS_INVALID_ID" );
-
- status = rtems_region_return_segment( Region_id[ 1 ], Region_good_area );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ADDRESS,
- "rtems_region_return_segment with illegal segment"
- );
- puts( "TA1 - rtems_region_return_segment - RTEMS_INVALID_ADDRESS" );
-
-/*
- * The following generate internal heap errors. Thus this code
- * is subject to change if the heap code changes.
- */
-
- puts( "TA1 - rtems_debug_disable - RTEMS_DEBUG_REGION" );
- rtems_debug_disable( RTEMS_DEBUG_REGION );
-
-#if 0
-
- offset = (segment_address_1 - (void *)Region_good_area) / 4;
-
-/* bad FRONT_FLAG error */
-
- good_front_flag = Region_good_area[ offset - 1 ];
- Region_good_area[ offset - 1 ] = good_front_flag + 2;
-
- status = rtems_region_return_segment( Region_id[ 1 ], segment_address_1 );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ADDRESS,
- "rtems_region_return_segment with back_flag != front_flag"
- );
- puts( "TA1 - rtems_region_return_segment - RTEMS_INVALID_ADDRESS" );
-
- Region_good_area[ offset - 1 ] = good_front_flag;
-
-/* bad FRONT_FLAG error */
-
- good_back_flag = Region_good_area[ offset - 2 ];
- Region_good_area[ offset - 2 ] = 1024;
-
- status = rtems_region_return_segment( Region_id[ 1 ], segment_address_1 );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ADDRESS,
- "rtems_region_return_segment with back_flag != front_flag"
- );
- puts( "TA1 - rtems_region_return_segment - RTEMS_INVALID_ADDRESS" );
-
- Region_good_area[ offset - 2 ] = good_back_flag;
-
-#else
- offset = 0;
- good_front_flag = 0;
- good_back_flag = 0;
- puts( "TA1 - rtems_region_return_segment - RTEMS_INVALID_ADDRESS - SKIPPED" );
- puts( "TA1 - rtems_region_return_segment - RTEMS_INVALID_ADDRESS - SKIPPED" );
-#endif
-
- puts( "TA1 - rtems_debug_enable - RTEMS_DEBUG_REGION" );
- rtems_debug_enable( RTEMS_DEBUG_REGION );
-
- status = rtems_region_extend(
- 100,
- Region_good_area,
- 128
- );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ID,
- "rtems_region_extend with illegal id"
- );
- puts( "TA1 - rtems_region_extend - RTEMS_INVALID_ID" );
-
- status = rtems_region_extend(
- Region_id[ 1 ],
- &Region_good_area[ REGION_START_OFFSET + 16 ],
- 128
- );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ADDRESS,
- "rtems_region_extend with illegal starting address"
- );
- puts( "TA1 - rtems_region_extend - within heap - RTEMS_INVALID_ADDRESS" );
-
- status = rtems_region_extend(
- Region_id[ 1 ],
- Region_bad_area,
- 128
- );
- fatal_directive_status(
- status,
- RTEMS_NOT_IMPLEMENTED,
- "rtems_region_extend with unsupported starting address"
- );
- puts(
- "TA1 - rtems_region_extend - non-contiguous lower - RTEMS_NOT_IMPLEMENTED"
- );
-
- status = rtems_region_extend(
- Region_id[ 1 ],
- &Region_good_area[ REGION_START_OFFSET - REGION_LENGTH ],
- 128
- );
- fatal_directive_status(
- status,
- RTEMS_NOT_IMPLEMENTED,
- "rtems_region_extend with unsupported starting address"
- );
- puts(
- "TA1 - rtems_region_extend - contiguous lower - RTEMS_NOT_IMPLEMENTED"
- );
-
- status = rtems_region_extend(
- Region_id[ 1 ],
- &Region_good_area[ REGION_START_OFFSET + REGION_LENGTH + 16 ],
- 128
- );
- fatal_directive_status(
- status,
- RTEMS_NOT_IMPLEMENTED,
- "rtems_region_extend with unsupported starting address"
- );
- puts(
- "TA1 - rtems_region_extend - non-contiguous higher - RTEMS_NOT_IMPLEMENTED"
- );
-
-}
diff --git a/testsuites/sptests/sp09/screen13.c b/testsuites/sptests/sp09/screen13.c
deleted file mode 100644
index 6e9584d279..0000000000
--- a/testsuites/sptests/sp09/screen13.c
+++ /dev/null
@@ -1,113 +0,0 @@
-/* Screen13
- *
- * This routine generates error screen 13 for test 9.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-void Screen13()
-{
- rtems_time_of_day time;
- rtems_status_code status;
-
- status = rtems_io_close( 0xffff, 0x0000, NULL);
- fatal_directive_status(
- status,
- RTEMS_INVALID_NUMBER,
- "rtems_io_close with bad major number"
- );
- puts( "TA1 - rtems_io_close - RTEMS_INVALID_NUMBER" );
- status = rtems_io_control( 0xffff, 0x00000, NULL);
- fatal_directive_status(
- status,
- RTEMS_INVALID_NUMBER,
- "rtems_io_close with bad major number"
- );
- puts( "TA1 - rtems_io_control - RTEMS_INVALID_NUMBER" );
- status = rtems_io_initialize( 0xffff, 0x00000, NULL);
- fatal_directive_status(
- status,
- RTEMS_INVALID_NUMBER,
- "rtems_io_initialize with bad major number"
- );
- puts( "TA1 - rtems_io_initialize - RTEMS_INVALID_NUMBER" );
- status = rtems_io_open( 0xffff, 0x00000, NULL);
- fatal_directive_status(
- status,
- RTEMS_INVALID_NUMBER,
- "rtems_io_open with bad major number"
- );
- puts( "TA1 - rtems_io_open - RTEMS_INVALID_NUMBER" );
- status = rtems_io_read( 0xffff, 0x00000, NULL);
- fatal_directive_status(
- status,
- RTEMS_INVALID_NUMBER,
- "rtems_io_read with bad major number"
- );
- puts( "TA1 - rtems_io_read - RTEMS_INVALID_NUMBER" );
- status = rtems_io_write( 0xffff, 0x0ffff, NULL);
- fatal_directive_status(
- status,
- RTEMS_INVALID_NUMBER,
- "rtems_io_write with bad major number"
- );
- puts( "TA1 - rtems_io_write - RTEMS_INVALID_NUMBER" );
-
- build_time( &time, 12, 31, 2000, 23, 59, 59, 0 );
- status = rtems_clock_set( &time );
- directive_failed( status, "rtems_clock_set" );
- print_time( "TA1 - rtems_clock_set - ", &time, " - RTEMS_SUCCESSFUL\n" );
- status = rtems_task_wake_after( 1 * TICKS_PER_SECOND );
- status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
- directive_failed( status, "rtems_clock_set" );
- print_time( "TA1 - rtems_clock_get - ", &time, " - RTEMS_SUCCESSFUL\n" );
-
- build_time( &time, 12, 31, 1999, 23, 59, 59, 0 );
- status = rtems_clock_set( &time );
- directive_failed( status, "rtems_clock_set" );
- print_time( "TA1 - rtems_clock_set - ", &time, " - RTEMS_SUCCESSFUL\n" );
- status = rtems_task_wake_after( 1 * TICKS_PER_SECOND );
- status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
- directive_failed( status, "rtems_clock_set" );
- print_time( "TA1 - rtems_clock_get - ", &time, " - RTEMS_SUCCESSFUL\n" );
-
- build_time( &time, 12, 31, 2100, 23, 59, 59, 0 );
- status = rtems_clock_set( &time );
- directive_failed( status, "rtems_clock_set" );
- print_time( "TA1 - rtems_clock_set - ", &time, " - RTEMS_SUCCESSFUL\n" );
- status = rtems_task_wake_after( 1 * TICKS_PER_SECOND );
- status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
- directive_failed( status, "rtems_clock_set" );
- print_time( "TA1 - rtems_clock_get - ", &time, " - RTEMS_SUCCESSFUL\n" );
-
- build_time( &time, 12, 31, 2099, 23, 59, 59, 0 );
- status = rtems_clock_set( &time );
- directive_failed( status, "rtems_clock_set" );
- print_time( "TA1 - rtems_clock_set - ", &time, " - RTEMS_SUCCESSFUL\n" );
- status = rtems_task_wake_after( 1 * TICKS_PER_SECOND );
- status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
- directive_failed( status, "rtems_clock_set" );
- print_time( "TA1 - rtems_clock_get - ", &time, " - RTEMS_SUCCESSFUL\n" );
-
- build_time( &time, 12, 31, 1991, 23, 59, 59, 0 );
- status = rtems_clock_set( &time );
- directive_failed( status, "rtems_clock_set" );
- print_time( "TA1 - rtems_clock_set - ", &time, " - RTEMS_SUCCESSFUL\n" );
- status = rtems_task_wake_after( 1 * TICKS_PER_SECOND );
- status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
- directive_failed( status, "rtems_clock_set" );
- print_time( "TA1 - rtems_clock_get - ", &time, " - RTEMS_SUCCESSFUL\n" );
-}
diff --git a/testsuites/sptests/sp09/screen14.c b/testsuites/sptests/sp09/screen14.c
deleted file mode 100644
index 6c7fd0176d..0000000000
--- a/testsuites/sptests/sp09/screen14.c
+++ /dev/null
@@ -1,153 +0,0 @@
-/* Screen14
- *
- * This routine generates error screen 14 for test 9.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-void Screen14()
-{
- rtems_status_code status;
- rtems_time_of_day time;
-
- status = rtems_timer_create( 0, &Junk_id );
- fatal_directive_status(
- status,
- RTEMS_INVALID_NAME,
- "rtems_timer_create with illegal name"
- );
- puts( "TA1 - rtems_timer_create - RTEMS_INVALID_NAME" );
-
- status = rtems_timer_create( Timer_name[ 1 ], &Timer_id[ 1 ] );
- directive_failed( status, "rtems_timer_create" );
- puts( "TA1 - rtems_timer_create - 1 - RTEMS_SUCCESSFUL" );
-
- status = rtems_timer_create( 2, &Junk_id );
- fatal_directive_status(
- status,
- RTEMS_TOO_MANY,
- "rtems_timer_create for too many"
- );
- puts( "TA1 - rtems_timer_create - 2 - RTEMS_TOO_MANY" );
-
- status = rtems_timer_delete( 100 );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ID,
- "rtems_timer_delete with illegal id"
- );
- puts( "TA1 - rtems_timer_delete - local RTEMS_INVALID_ID" );
-
- status = rtems_timer_delete( 0x010100 );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ID,
- "rtems_timer_delete with illegal id"
- );
- puts( "TA1 - rtems_timer_delete - global RTEMS_INVALID_ID" );
-
- status = rtems_timer_ident( 0, &Junk_id );
- fatal_directive_status(
- status,
- RTEMS_INVALID_NAME,
- "rtems_timer_ident with illegal name"
- );
- puts( "TA1 - rtems_timer_ident - RTEMS_INVALID_NAME" );
-
- status = rtems_timer_cancel( 0x010100 );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ID,
- "rtems_timer_cancel with illegal id"
- );
- puts( "TA1 - rtems_timer_cancel - RTEMS_INVALID_ID" );
-
- status = rtems_timer_reset( 0x010100 );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ID,
- "rtems_timer_reset with illegal id"
- );
- puts( "TA1 - rtems_timer_reset - RTEMS_INVALID_ID" );
-
- status = rtems_timer_reset( Timer_id[ 1 ] );
- fatal_directive_status(
- status,
- RTEMS_NOT_DEFINED,
- "rtems_timer_reset before initiated"
- );
- puts( "TA1 - rtems_timer_reset - RTEMS_NOT_DEFINED" );
-
- status = rtems_timer_fire_after(
- 0x010100,
- 5 * TICKS_PER_SECOND,
- Delayed_routine,
- NULL
- );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ID,
- "rtems_timer_fire_after illegal id"
- );
- puts( "TA1 - rtems_timer_fire_after - RTEMS_INVALID_ID" );
-
- build_time( &time, 12, 31, 1994, 9, 0, 0, 0 );
- status = rtems_timer_fire_when( 0x010100, &time, Delayed_routine, NULL );
- fatal_directive_status(
- status,
- RTEMS_INVALID_ID,
- "rtems_timer_fire_when with illegal id"
- );
- puts( "TA1 - rtems_timer_fire_when - RTEMS_INVALID_ID" );
-
- status = rtems_timer_fire_after( Timer_id[ 1 ], 0, Delayed_routine, NULL );
- fatal_directive_status(
- status,
- RTEMS_INVALID_NUMBER,
- "rtems_timer_fire_after with 0 ticks"
- );
- puts( "TA1 - rtems_timer_fire_after - RTEMS_INVALID_NUMBER" );
-
- build_time( &time, 2, 5, 1987, 8, 30, 45, 0 );
- status = rtems_timer_fire_when( Timer_id[ 1 ], &time, Delayed_routine, NULL );
- fatal_directive_status(
- status,
- RTEMS_INVALID_CLOCK,
- "rtems_timer_fire_when with illegal time"
- );
- print_time(
- "TA1 - rtems_timer_fire_when - ",
- &time,
- " - RTEMS_INVALID_CLOCK\n"
- );
-
- status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
- directive_failed( status, "rtems_clock_set" );
- print_time( "TA1 - rtems_clock_get - ", &time, "\n" );
-
- build_time( &time, 2, 5, 1990, 8, 30, 45, 0 );
- status = rtems_timer_fire_when( Timer_id[ 1 ], &time, Delayed_routine, NULL );
- fatal_directive_status(
- status,
- RTEMS_INVALID_CLOCK,
- "rtems_timer_fire_when before current time"
- );
- print_time(
- "TA1 - rtems_timer_fire_when - ",
- &time,
- " - before RTEMS_INVALID_CLOCK\n"
- );
-}
diff --git a/testsuites/sptests/sp09/sp09.doc b/testsuites/sptests/sp09/sp09.doc
deleted file mode 100644
index 6737d3c8e6..0000000000
--- a/testsuites/sptests/sp09/sp09.doc
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: test9
-
-directives:
- ex_init, ex_start, tm_tick, i_return,
- t_create,t_delete, t_getreg, t_ident, t_restart, t_resume, t_setpri,
- t_setreg, t_start, t_suspend, tm_delete, tm_get,
- tm_set, tm_wkafter, tm_wkwhen, ev_receive, ev_send, sm_create, sm_delete,
- sm_ident, sm_p, sm_v, q_broadcast, q_create, q_delete, q_ident, q_receive,
- q_send, q_urgent, as_catch, as_send, as_return, rn_create, rn_delete,
- rn_getseg, rn_ident, rn_retseg, pt_create, pt_delete, pt_getbug, pt_ident,
- pt_retbuf, de_close, de_cntrl, de_init, de_open, de_read, de_write
-
-concepts:
-
- a. Verifies all error codes returned by the executive in single
- processor configurations.
-
- b. Verifies error conditions in the following kernel routines or macros:
- _Ck_date_time, _Expired, _Q_submit, _Get_mnodes, _Get_node,
- _Free_mem, _Get_mem, _Valid_block, _Set_tcb, _Set_resource,
- _In_range, _On_boundary
diff --git a/testsuites/sptests/sp09/sp09.scn b/testsuites/sptests/sp09/sp09.scn
deleted file mode 100644
index 67471b8d7d..0000000000
--- a/testsuites/sptests/sp09/sp09.scn
+++ /dev/null
@@ -1,251 +0,0 @@
-*** TEST 9 ***
-INIT - rtems_task_create - RTEMS_INVALID_SIZE -- NOT CHECKED
-INIT - rtems_task_create - RTEMS_INVALID_PRIORITY
-INIT - rtems_task_restart - RTEMS_INCORRECT_STATE
-TA1 - rtems_task_delete - RTEMS_INVALID_ID
-TA1 - rtems_task_get_note - RTEMS_INVALID_NUMBER
-TA1 - rtems_task_get_note - RTEMS_INVALID_ID
-TA1 - rtems_task_ident - current task RTEMS_SUCCESSFUL
-TA1 - rtems_task_ident - global RTEMS_INVALID_NAME
-TA1 - rtems_task_ident - local RTEMS_INVALID_NAME
-TA1 - rtems_task_ident - RTEMS_INVALID_NODE
-TA1 - rtems_task_restart - RTEMS_INVALID_ID
-TA1 - rtems_task_resume - RTEMS_INVALID_ID
-TA1 - rtems_task_resume - RTEMS_INCORRECT_STATE
-TA1 - rtems_task_set_priority - RTEMS_INVALID_PRIORITY
-TA1 - rtems_task_set_priority - RTEMS_INVALID_ID
-TA1 - rtems_task_set_note - RTEMS_INVALID_NUMBER
-TA1 - rtems_task_set_note - RTEMS_INVALID_ID
-TA1 - rtems_task_start - RTEMS_INVALID_ID
-TA1 - rtems_task_start - RTEMS_INCORRECT_STATE
-TA1 - rtems_task_suspend - RTEMS_INVALID_ID
-<pause - screen 2>
-TA1 - rtems_clock_get - RTEMS_NOT_DEFINED
-TA1 - rtems_task_wake_when - RTEMS_NOT_DEFINED
-TA1 - rtems_timer_fire_when - RTEMS_NOT_DEFINED
-TA1 - rtems_clock_set - 08:30:45 02/05/1987 - RTEMS_INVALID_CLOCK
-TA1 - rtems_clock_set - 08:30:45 15/05/1988 - RTEMS_INVALID_CLOCK
-TA1 - rtems_clock_set - 08:30:45 02/32/1988 - RTEMS_INVALID_CLOCK
-TA1 - rtems_clock_set - 25:30:45 02/05/1988 - RTEMS_INVALID_CLOCK
-TA1 - rtems_clock_set - 08:61:45 02/05/1988 - RTEMS_INVALID_CLOCK
-TA1 - rtems_clock_set - 08:30:61 02/05/1988 - RTEMS_INVALID_CLOCK
-TA1 - rtems_clock_set - 08:30:45 02/05/1988 - RTEMS_INVALID_CLOCK
-TA1 - rtems_clock_set - 08:30:45 02/05/1988 - RTEMS_SUCCESSFUL
-TA1 - rtems_task_wake_when - TICKINVALID - sleep about 3 seconds
-TA1 - rtems_task_wake_when - TICKINVALID - woke up RTEMS_SUCCESSFUL
-TA1 - rtems_task_wake_when - 08:30:48 02/05/1961 - RTEMS_INVALID_CLOCK
-TA1 - rtems_task_wake_when - 25:30:48 02/05/1988 - RTEMS_INVALID_CLOCK
-TA1 - current time - 08:30:51 02/05/1988
-TA1 - rtems_task_wake_when - 08:30:51 01/05/1988 - RTEMS_INVALID_CLOCK
-<pause - screen 3>
-TA1 - rtems_task_create - RTEMS_INVALID_NAME
-TA1 - rtems_task_create - stack size - RTEMS_UNSATISFIED
-TA1 - rtems_task_create - TA2 created - RTEMS_SUCCESSFUL
-TA1 - rtems_task_suspend - suspend TA2 - RTEMS_SUCCESSFUL
-TA1 - rtems_task_suspend - suspend TA2 - RTEMS_ALREADY_SUSPENDED
-TA1 - rtems_task_resume - TA2 resumed - RTEMS_SUCCESSFUL
-TA1 - rtems_task_create - TA3 created - RTEMS_SUCCESSFUL
-TA1 - rtems_task_create - 4 created - RTEMS_SUCCESSFUL
-TA1 - rtems_task_create - 5 created - RTEMS_SUCCESSFUL
-TA1 - rtems_task_create - 6 created - RTEMS_SUCCESSFUL
-TA1 - rtems_task_create - 7 created - RTEMS_SUCCESSFUL
-TA1 - rtems_task_create - 8 created - RTEMS_SUCCESSFUL
-TA1 - rtems_task_create - 9 created - RTEMS_SUCCESSFUL
-TA1 - rtems_task_create - 10 created - RTEMS_SUCCESSFUL
-TA1 - rtems_task_create - 11 - RTEMS_TOO_MANY
-TA1 - rtems_task_create - RTEMS_MP_NOT_CONFIGURED
-<pause - screen 4>
-TA1 - rtems_event_receive - RTEMS_UNSATISFIED ( all conditions )
-TA1 - rtems_event_receive - RTEMS_UNSATISFIED ( any condition )
-TA1 - rtems_event_receive - timeout in 3 seconds
-TA1 - rtems_event_receive - woke up with RTEMS_TIMEOUT
-TA1 - rtems_event_send - RTEMS_INVALID_ID
-TA1 - rtems_task_wake_after - sleep 1 second - RTEMS_SUCCESSFUL
-TA1 - rtems_clock_set - 08:30:45 02/05/1988 - RTEMS_SUCCESSFUL
-<pause - screen 5>
-TA1 - rtems_semaphore_create - RTEMS_INVALID_NAME
-TA1 - rtems_semaphore_create - 1 - RTEMS_SUCCESSFUL
-TA1 - rtems_semaphore_create - 2 - RTEMS_SUCCESSFUL
-TA1 - rtems_semaphore_create - 3 - RTEMS_TOO_MANY
-TA1 - rtems_semaphore_create - RTEMS_NOT_DEFINED
-TA1 - rtems_semaphore_create - RTEMS_NOT_DEFINED
-TA1 - rtems_semaphore_create - RTEMS_INVALID_NUMBER
-TA1 - rtems_semaphore_create - RTEMS_MP_NOT_CONFIGURED
-TA1 - rtems_semaphore_delete - unknown RTEMS_INVALID_ID
-TA1 - rtems_semaphore_delete - local RTEMS_INVALID_ID
-TA1 - rtems_semaphore_ident - global RTEMS_INVALID_NAME
-TA1 - rtems_semaphore_ident - local RTEMS_INVALID_NAME
-<pause - screen 6>
-TA1 - rtems_semaphore_obtain - RTEMS_INVALID_ID
-TA1 - rtems_semaphore_obtain - got sem 1 - RTEMS_SUCCESSFUL
-TA1 - rtems_semaphore_obtain - RTEMS_UNSATISFIED
-TA1 - rtems_semaphore_obtain - timeout in 3 seconds
-TA1 - rtems_semaphore_obtain - woke up with RTEMS_TIMEOUT
-TA1 - rtems_semaphore_release - RTEMS_NOT_OWNER_OF_RESOURCE
-TA1 - rtems_semaphore_release - RTEMS_INVALID_ID
-TA1 - rtems_task_start - start TA2 - RTEMS_SUCCESSFUL
-TA1 - rtems_task_wake_after - yield processor - RTEMS_SUCCESSFUL
-TA2 - rtems_semaphore_obtain - sem 1 - RTEMS_WAIT FOREVER
-TA1 - rtems_semaphore_delete - delete sem 1 - RTEMS_SUCCESSFUL
-TA1 - rtems_semaphore_obtain - binary semaphore
-TA1 - rtems_semaphore_delete - delete sem 2 - RTEMS_RESOURCE_IN_USE
-TA1 - rtems_task_wake_after - yield processor - RTEMS_SUCCESSFUL
-TA2 - rtems_semaphore_obtain - woke up with RTEMS_OBJECT_WAS_DELETED
-TA2 - rtems_task_delete - delete self - RTEMS_SUCCESSFUL
-<pause - screen 7>
-TA1 - rtems_message_queue_broadcast - RTEMS_INVALID_ID
-TA1 - rtems_message_queue_create - Q 1 - RTEMS_INVALID_NAME
-TA1 - rtems_message_queue_create - Q 1 - RTEMS_MP_NOT_CONFIGURED
-TA1 - rtems_message_queue_create - Q 1 - 2 DEEP - RTEMS_SUCCESSFUL
-TA1 - rtems_message_queue_create - Q 2 - RTEMS_TOO_MANY
-TA1 - rtems_message_queue_delete - unknown RTEMS_INVALID_ID
-TA1 - rtems_message_queue_delete - local RTEMS_INVALID_ID
-TA1 - rtems_message_queue_ident - RTEMS_INVALID_NAME
-TA1 - rtems_message_queue_get_number_pending - RTEMS_INVALID_ID
-TA1 - rtems_message_queue_flush - RTEMS_INVALID_ID
-TA1 - rtems_message_queue_receive - RTEMS_INVALID_ID
-TA1 - rtems_message_queue_receive - Q 1 - RTEMS_UNSATISFIED
-TA1 - rtems_message_queue_receive - Q 1 - timeout in 3 seconds
-TA1 - rtems_message_queue_receive - Q 1 - woke up with RTEMS_TIMEOUT
-TA1 - rtems_message_queue_send - RTEMS_INVALID_ID
-TA1 - rtems_message_queue_send - BUFFER 1 TO Q 1 - RTEMS_SUCCESSFUL
-TA1 - rtems_message_queue_send - BUFFER 2 TO Q 1 - RTEMS_SUCCESSFUL
-TA1 - rtems_message_queue_send - BUFFER 3 TO Q 1 - RTEMS_TOO_MANY
-<pause - screen 8>
-TA1 - rtems_message_queue_delete - Q 1 - RTEMS_SUCCESSFUL
-TA1 - rtems_message_queue_create - Q 1 - 2 DEEP - RTEMS_SUCCESSFUL
-TA1 - rtems_message_queue_send - BUFFER 1 TO Q 1 - RTEMS_SUCCESSFUL
-TA1 - rtems_message_queue_send - BUFFER 2 TO Q 1 - RTEMS_SUCCESSFUL
-TA1 - rtems_message_queue_send - BUFFER 3 TO Q 1 - RTEMS_TOO_MANY
-TA1 - rtems_message_queue_delete - Q 1 - RTEMS_SUCCESSFUL
-TA1 - rtems_message_queue_create - Q 1 - 3 DEEP - RTEMS_SUCCESSFUL
-TA1 - rtems_message_queue_send - BUFFER 1 TO Q 1 - RTEMS_SUCCESSFUL
-TA1 - rtems_message_queue_send - BUFFER 2 TO Q 1 - RTEMS_SUCCESSFUL
-TA1 - rtems_message_queue_send - BUFFER 3 TO Q 1 - RTEMS_SUCCESSFUL
-TA1 - rtems_message_queue_send - BUFFER 4 TO Q 1 - RTEMS_TOO_MANY
-TA1 - rtems_message_queue_delete - Q 1 - RTEMS_SUCCESSFUL
-TA1 - rtems_message_queue_create - Q 1 - 3 DEEP - RTEMS_SUCCESSFUL
-TA1 - rtems_task_start - start TA3 - RTEMS_SUCCESSFUL
-TA1 - rtems_task_wake_after - yield processor - RTEMS_SUCCESSFUL
-TA3 - rtems_message_queue_receive - Q 1 - RTEMS_WAIT FOREVER
-TA1 - rtems_message_queue_delete - delete Q 1 - RTEMS_SUCCESSFUL
-TA1 - rtems_task_wake_after - yield processor - RTEMS_SUCCESSFUL
-TA3 - rtems_message_queue_receive - woke up with RTEMS_OBJECT_WAS_DELETED
-TA3 - rtems_task_delete - delete self - RTEMS_SUCCESSFUL
-<pause - screen 9>
-TA1 - rtems_interrupt_catch - RTEMS_INVALID_NUMBER
-TA1 - rtems_interrupt_catch - bad handler RTEMS_INVALID_ADDRESS
-TA1 - rtems_interrupt_catch - old isr RTEMS_INVALID_ADDRESS
-TA1 - rtems_signal_send - RTEMS_INVALID_ID
-TA1 - rtems_signal_send - RTEMS_NOT_DEFINED
-TA1 - rtems_port_create - RTEMS_INVALID_NAME
-TA1 - rtems_port_create - RTEMS_INVALID_ADDRESS
-TA1 - rtems_port_create - RTEMS_TOO_MANY
-TA1 - rtems_port_delete - RTEMS_INVALID_ID
-TA1 - rtems_port_ident - RTEMS_INVALID_NAME
-TA1 - rtems_port_external_to_internal - RTEMS_INVALID_ID
-TA1 - rtems_port_internal_to_external - RTEMS_INVALID_ID
-<pause - screen 10>
-TA1 - rtems_rate_monotonic_create - RTEMS_INVALID_NAME
-TA1 - rtems_rate_monotonic_create - RTEMS_SUCCESSFUL
-TA1 - rtems_rate_monotonic_create - RTEMS_TOO_MANY
-TA1 - rtems_rate_monotonic_ident - RTEMS_INVALID_NAME
-TA1 - rtems_rate_monotonic_period - unknown RTEMS_INVALID_ID
-TA1 - rtems_rate_monotonic_period - local RTEMS_INVALID_ID
-TA1 - rtems_rate_monotonic_period(RTEMS_PERIOD_STATUS) - RTEMS_NOT_DEFINED
-TA1 - rtems_rate_monotonic_period - 100 ticks - RTEMS_SUCCESSFUL
-TA1 - rtems_rate_monotonic_period(RTEMS_PERIOD_STATUS) - RTEMS_SUCCESSFUL
-TA1 - rtems_rate_monotonic_period(RTEMS_PERIOD_STATUS) - RTEMS_TIMEOUT
-TA1 - rtems_rate_monotonic_cancel - unknown RTEMS_INVALID_ID
-TA1 - rtems_rate_monotonic_cancel - local RTEMS_INVALID_ID
-TA1 - rtems_rate_monotonic_cancel - RTEMS_SUCCESSFUL
-TA1 - rtems_rate_monotonic_period - 5 ticks - RTEMS_TIMEOUT
-TA1 - yielding to TA4
-TA4 - rtems_rate_monotonic_cancel - RTEMS_NOT_OWNER_OF_RESOURCE
-TA4 - rtems_rate_monotonic_period - RTEMS_NOT_OWNER_OF_RESOURCE
-TA4 - rtems_task_delete - delete self - RTEMS_SUCCESSFUL
-TA1 - rtems_rate_monotonic_delete - unknown RTEMS_INVALID_ID
-TA1 - rtems_rate_monotonic_delete - local RTEMS_INVALID_ID
-TA1 - rtems_rate_monotonic_delete - RTEMS_SUCCESSFUL
-<pause - screen 11>
-TA1 - rtems_partition_create - RTEMS_INVALID_NAME
-TA1 - rtems_partition_create - length - RTEMS_INVALID_SIZE
-TA1 - rtems_partition_create - buffer size - RTEMS_INVALID_SIZE
-TA1 - rtems_partition_create - length < buffer size - RTEMS_INVALID_SIZE
-TA1 - rtems_partition_create - RTEMS_MP_NOT_CONFIGURED
-TA1 - rtems_partition_create - RTEMS_INVALID_ADDRESS
-TA1 - rtems_partition_create - RTEMS_INVALID_SIZE
-TA1 - rtems_partition_delete - unknown RTEMS_INVALID_ID
-TA1 - rtems_partition_delete - local RTEMS_INVALID_ID
-TA1 - rtems_partition_get_buffer - RTEMS_INVALID_ID
-TA1 - rtems_partition_ident - RTEMS_INVALID_NAME
-TA1 - rtems_partition_return_buffer - RTEMS_INVALID_ID
-TA1 - rtems_partition_create - RTEMS_SUCCESSFUL
-TA1 - rtems_partition_create - RTEMS_TOO_MANY
-TA1 - rtems_partition_get_buffer - RTEMS_SUCCESSFUL
-TA1 - rtems_partition_get_buffer - RTEMS_SUCCESSFUL
-TA1 - rtems_partition_get_buffer - RTEMS_UNSATISFIED
-TA1 - rtems_partition_delete - RTEMS_RESOURCE_IN_USE
-TA1 - rtems_partition_return_buffer - RTEMS_INVALID_ADDRESS - out of range
-TA1 - rtems_partition_return_buffer - RTEMS_INVALID_ADDRESS - not on boundary
-<pause - screen 12>
-TA1 - rtems_region_create - RTEMS_INVALID_NAME
-TA1 - rtems_region_create - RTEMS_INVALID_ADDRESS
-TA1 - rtems_region_create - RTEMS_INVALID_SIZE
-TA1 - rtems_region_create - RTEMS_SUCCESSFUL
-TA1 - rtems_region_create - RTEMS_TOO_MANY
-TA1 - rtems_region_delete - unknown RTEMS_INVALID_ID
-TA1 - rtems_region_delete - local RTEMS_INVALID_ID
-TA1 - rtems_region_ident - RTEMS_INVALID_NAME
-TA1 - rtems_region_get_segment - RTEMS_INVALID_ID
-TA1 - rtems_region_get_segment - RTEMS_INVALID_SIZE
-TA1 - rtems_region_get_segment - RTEMS_SUCCESSFUL
-TA1 - rtems_region_get_segment - RTEMS_UNSATISFIED
-TA1 - rtems_region_get_segment - timeout in 3 seconds
-TA1 - rtems_region_get_segment - woke up with RTEMS_TIMEOUT
-TA1 - rtems_region_delete - RTEMS_RESOURCE_IN_USE
-TA1 - rtems_region_return_segment - RTEMS_INVALID_ID
-TA1 - rtems_region_return_segment - RTEMS_INVALID_ADDRESS
-TA1 - rtems_debug_disable - RTEMS_DEBUG_REGION
-TA1 - rtems_region_return_segment - RTEMS_INVALID_ADDRESS - SKIPPED
-TA1 - rtems_region_return_segment - RTEMS_INVALID_ADDRESS - SKIPPED
-TA1 - rtems_debug_enable - RTEMS_DEBUG_REGION
-TA1 - rtems_region_extend - RTEMS_INVALID_ID
-TA1 - rtems_region_extend - within heap - RTEMS_INVALID_ADDRESS
-TA1 - rtems_region_extend - non-contiguous lower - RTEMS_NOT_IMPLEMENTED
-TA1 - rtems_region_extend - contiguous lower - RTEMS_NOT_IMPLEMENTED
-TA1 - rtems_region_extend - non-contiguous higher - RTEMS_NOT_IMPLEMENTED
-<pause - screen 13>
-TA1 - rtems_io_close - RTEMS_INVALID_NUMBER
-TA1 - rtems_io_control - RTEMS_INVALID_NUMBER
-TA1 - rtems_io_initialize - RTEMS_INVALID_NUMBER
-TA1 - rtems_io_open - RTEMS_INVALID_NUMBER
-TA1 - rtems_io_read - RTEMS_INVALID_NUMBER
-TA1 - rtems_io_write - RTEMS_INVALID_NUMBER
-TA1 - rtems_clock_set - 23:59:59 12/31/2000 - RTEMS_SUCCESSFUL
-TA1 - rtems_clock_get - 00:00:00 01/01/2001 - RTEMS_SUCCESSFUL
-TA1 - rtems_clock_set - 23:59:59 12/31/1999 - RTEMS_SUCCESSFUL
-TA1 - rtems_clock_get - 00:00:00 01/01/2000 - RTEMS_SUCCESSFUL
-TA1 - rtems_clock_set - 23:59:59 12/31/2100 - RTEMS_SUCCESSFUL
-TA1 - rtems_clock_get - 00:00:00 01/01/2101 - RTEMS_SUCCESSFUL
-TA1 - rtems_clock_set - 23:59:59 12/31/2099 - RTEMS_SUCCESSFUL
-TA1 - rtems_clock_get - 00:00:00 01/01/2100 - RTEMS_SUCCESSFUL
-TA1 - rtems_clock_set - 23:59:59 12/31/1991 - RTEMS_SUCCESSFUL
-TA1 - rtems_clock_get - 00:00:00 01/01/1992 - RTEMS_SUCCESSFUL
-<pause - screen 14>
-TA1 - rtems_timer_create - RTEMS_INVALID_NAME
-TA1 - rtems_timer_create - 1 - RTEMS_SUCCESSFUL
-TA1 - rtems_timer_create - 2 - RTEMS_TOO_MANY
-TA1 - rtems_timer_delete - local RTEMS_INVALID_ID
-TA1 - rtems_timer_delete - global RTEMS_INVALID_ID
-TA1 - rtems_timer_ident - RTEMS_INVALID_NAME
-TA1 - rtems_timer_cancel - RTEMS_INVALID_ID
-TA1 - rtems_timer_reset - RTEMS_INVALID_ID
-TA1 - rtems_timer_reset - RTEMS_NOT_DEFINED
-TA1 - rtems_timer_fire_after - RTEMS_INVALID_ID
-TA1 - rtems_timer_fire_when - RTEMS_INVALID_ID
-TA1 - rtems_timer_fire_after - RTEMS_INVALID_NUMBER
-TA1 - rtems_timer_fire_when - 08:30:45 02/05/1987 - RTEMS_INVALID_CLOCK
-TA1 - rtems_clock_get - 00:00:00 01/01/1992
-TA1 - rtems_timer_fire_when - 08:30:45 02/05/1990 - before RTEMS_INVALID_CLOCK
-*** END OF TEST 9 ***
diff --git a/testsuites/sptests/sp09/system.h b/testsuites/sptests/sp09/system.h
deleted file mode 100644
index c3a93d3b80..0000000000
--- a/testsuites/sptests/sp09/system.h
+++ /dev/null
@@ -1,142 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_timer_service_routine Delayed_routine(
- rtems_id ignored_id,
- void *ignored_address
-);
-
-rtems_task Task_1(
- rtems_task_argument argument
-);
-
-rtems_task Task_2(
- rtems_task_argument argument
-);
-
-rtems_task Task_3(
- rtems_task_argument argument
-);
-
-rtems_task Task_4(
- rtems_task_argument argument
-);
-
-rtems_isr Service_routine(
- rtems_vector_number ignored
-);
-
-rtems_timer_service_routine Io_during_interrupt(
- rtems_id ignored
-);
-
-void Screen1( void );
-
-void Screen2( void );
-
-void Screen3( void );
-
-void Screen4( void );
-
-void Screen5( void );
-
-void Screen6( void );
-
-void Screen7( void );
-
-void Screen8( void );
-
-void Screen9( void );
-
-void Screen10( void );
-
-void Screen11( void );
-
-void Screen12( void );
-
-void Screen13( void );
-
-void Screen14( void );
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MAXIMUM_TIMERS 1
-#define CONFIGURE_MAXIMUM_SEMAPHORES 2
-#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_MAXIMUM_PARTITIONS 1
-#define CONFIGURE_MAXIMUM_REGIONS 1
-#define CONFIGURE_MAXIMUM_PERIODS 1
-#define CONFIGURE_MAXIMUM_USER_EXTENSIONS 0
-#define CONFIGURE_TICKS_PER_TIMESLICE 100
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#define CONFIGURE_EXTRA_TASK_STACKS (2 * RTEMS_MINIMUM_STACK_SIZE)
-
-#include <confdefs.h>
-
-/* global variables */
-
-TEST_EXTERN rtems_id Task_id[ 11 ]; /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 11 ]; /* array of task names */
-
-TEST_EXTERN rtems_name Timer_name[ 2 ]; /* array of timer names */
-TEST_EXTERN rtems_id Timer_id[ 2 ]; /* array of timer ids */
-
-TEST_EXTERN rtems_name Semaphore_name[ 4 ]; /* array of semaphore names */
-TEST_EXTERN rtems_id Semaphore_id[ 4 ]; /* array of semaphore ids */
-
-TEST_EXTERN rtems_name Queue_name[ 3 ]; /* array of queue names */
-TEST_EXTERN rtems_id Queue_id[ 3 ]; /* array of queue ids */
-
-TEST_EXTERN rtems_name Partition_name[ 2 ]; /* array of partition names */
-TEST_EXTERN rtems_id Partition_id[ 2 ]; /* array of partition ids */
-
-TEST_EXTERN rtems_name Region_name[ 2 ]; /* array of region names */
-TEST_EXTERN rtems_id Region_id[ 2 ]; /* array of region ids */
-
-TEST_EXTERN rtems_name Port_name[ 2 ]; /* array of port names */
-TEST_EXTERN rtems_id Port_id[ 2 ]; /* array of port ids */
-
-TEST_EXTERN rtems_name Period_name[ 2 ]; /* array of period names */
-TEST_EXTERN rtems_id Period_id[ 2 ]; /* array of period ids */
-
-TEST_EXTERN rtems_id Junk_id; /* id used to return errors */
-
-#define Internal_port_area (void *) 0x00001000
-#define External_port_area (void *) 0x00002000
-
-TEST_EXTERN rtems_unsigned8 Partition_good_area[256] CPU_STRUCTURE_ALIGNMENT;
-#define Partition_bad_area (void *) 0x00000006
-
-TEST_EXTERN rtems_unsigned32 Region_good_area[4096] CPU_STRUCTURE_ALIGNMENT;
-#define Region_bad_area (void *) 0x00000006
-#define REGION_START_OFFSET 1024
-#define REGION_LENGTH 512
-
-/* end of include file */
diff --git a/testsuites/sptests/sp09/task1.c b/testsuites/sptests/sp09/task1.c
deleted file mode 100644
index 7a4e107b73..0000000000
--- a/testsuites/sptests/sp09/task1.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/* Task_1
- *
- * This task generates all possible errors for the RTEMS executive.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task_1(
- rtems_task_argument argument
-)
-{
- Screen1();
- rtems_test_pause_and_screen_number( 2 );
-
- Screen2();
- rtems_test_pause_and_screen_number( 3 );
-
- Screen3();
- rtems_test_pause_and_screen_number( 4 );
-
- Screen4();
- rtems_test_pause_and_screen_number( 5 );
-
- Screen5();
- rtems_test_pause_and_screen_number( 6 );
-
- Screen6();
- rtems_test_pause_and_screen_number( 7 );
-
- Screen7();
- rtems_test_pause_and_screen_number( 8 );
-
- Screen8();
- rtems_test_pause_and_screen_number( 9 );
-
- Screen9();
- rtems_test_pause_and_screen_number( 10 );
-
- Screen10();
- rtems_test_pause_and_screen_number( 11 );
-
- Screen11();
- rtems_test_pause_and_screen_number( 12 );
-
- Screen12();
- rtems_test_pause_and_screen_number( 13 );
-
- Screen13();
- rtems_test_pause_and_screen_number( 14 );
-
- Screen14();
-
- puts( "*** END OF TEST 9 ***" );
- exit( 0 );
-}
diff --git a/testsuites/sptests/sp09/task2.c b/testsuites/sptests/sp09/task2.c
deleted file mode 100644
index 5f9a7205c7..0000000000
--- a/testsuites/sptests/sp09/task2.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* Task_2
- *
- * This routine serves as a test task. Its only purpose is to generate the
- * error where a semaphore is deleted while a task is waiting for it.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task_2(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- puts( "TA2 - rtems_semaphore_obtain - sem 1 - RTEMS_WAIT FOREVER" );
- status = rtems_semaphore_obtain(
- Semaphore_id[ 1 ],
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
- fatal_directive_status(
- status,
- RTEMS_OBJECT_WAS_DELETED,
- "rtems_semaphore_obtain waiting to be deleted"
- );
- puts(
- "TA2 - rtems_semaphore_obtain - woke up with RTEMS_OBJECT_WAS_DELETED"
- );
-
- puts( "TA2 - rtems_task_delete - delete self - RTEMS_SUCCESSFUL" );
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of TA2" );
-}
diff --git a/testsuites/sptests/sp09/task3.c b/testsuites/sptests/sp09/task3.c
deleted file mode 100644
index 4c90d37134..0000000000
--- a/testsuites/sptests/sp09/task3.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/* Task_3
- *
- * This routine serves as a test task. Its only purpose in life is to
- * generate the error where a message queue is deleted while a task
- * is waiting there for a message.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task_3(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
- long buffer[ 4 ];
- rtems_unsigned32 size;
-
- puts( "TA3 - rtems_message_queue_receive - Q 1 - RTEMS_WAIT FOREVER" );
- status = rtems_message_queue_receive(
- Queue_id[ 1 ],
- (long (*)[4])buffer,
- &size,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
- fatal_directive_status(
- status,
- RTEMS_OBJECT_WAS_DELETED,
- "rtems_message_queue_receive waiting to be deleted"
- );
- puts(
- "TA3 - rtems_message_queue_receive - woke up with RTEMS_OBJECT_WAS_DELETED"
- );
-
- puts( "TA3 - rtems_task_delete - delete self - RTEMS_SUCCESSFUL" );
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of TA3" );
-}
diff --git a/testsuites/sptests/sp09/task4.c b/testsuites/sptests/sp09/task4.c
deleted file mode 100644
index f5e254c9fe..0000000000
--- a/testsuites/sptests/sp09/task4.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/* Task_4
- *
- * This routine serves as a test task. Its only purpose in life is to
- * generate the error where a rate monotonic period is accessed by a
- * task other than its creator.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task_4(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- status = rtems_rate_monotonic_cancel( Period_id[ 1 ] );
- fatal_directive_status(
- status,
- RTEMS_NOT_OWNER_OF_RESOURCE,
- "rtems_rate_monotonic_cancel not the owner"
- );
- puts( "TA4 - rtems_rate_monotonic_cancel - RTEMS_NOT_OWNER_OF_RESOURCE" );
-
- status = rtems_rate_monotonic_period( Period_id[ 1 ], 5 );
- fatal_directive_status(
- status,
- RTEMS_NOT_OWNER_OF_RESOURCE,
- "rtems_rate_monotonic_period not the owner"
- );
- puts( "TA4 - rtems_rate_monotonic_period - RTEMS_NOT_OWNER_OF_RESOURCE" );
-
- puts( "TA4 - rtems_task_delete - delete self - RTEMS_SUCCESSFUL" );
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of TA4" );
-}
diff --git a/testsuites/sptests/sp11/Makefile.am b/testsuites/sptests/sp11/Makefile.am
deleted file mode 100644
index a2641d0e0d..0000000000
--- a/testsuites/sptests/sp11/Makefile.am
+++ /dev/null
@@ -1,38 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-TEST = sp11
-
-MANAGERS = io event timer
-
-C_FILES = init.c task1.c task2.c timer.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = scn doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/sptests.am
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/sptests/sp11/init.c b/testsuites/sptests/sp11/init.c
deleted file mode 100644
index 55b60936fa..0000000000
--- a/testsuites/sptests/sp11/init.c
+++ /dev/null
@@ -1,91 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is a user initialization task and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- puts( "\n\n*** TEST 11 ***" );
-
- Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
- Task_name[ 2 ] = rtems_build_name( 'T', 'A', '2', ' ' );
-
- status = rtems_task_create(
- Task_name[ 1 ],
- 4,
- RTEMS_MINIMUM_STACK_SIZE * 2,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_create of TA1" );
-
- status = rtems_task_create(
- Task_name[ 2 ],
- 4,
- RTEMS_MINIMUM_STACK_SIZE * 2,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 2 ]
- );
- directive_failed( status, "rtems_task_create of TA2" );
-
- status = rtems_task_start( Task_id[ 1 ], Task_1, 0 );
- directive_failed( status, "rtems_task_start of TA1" );
-
- status = rtems_task_start( Task_id[ 2 ], Task_2, 0 );
- directive_failed( status, "rtems_task_start of TA2" );
-
- Timer_name[ 1 ] = rtems_build_name( 'T', 'M', '1', ' ' );
- Timer_name[ 2 ] = rtems_build_name( 'T', 'M', '2', ' ' );
- Timer_name[ 3 ] = rtems_build_name( 'T', 'M', '3', ' ' );
- Timer_name[ 4 ] = rtems_build_name( 'T', 'M', '4', ' ' );
- Timer_name[ 5 ] = rtems_build_name( 'T', 'M', '5', ' ' );
- Timer_name[ 6 ] = rtems_build_name( 'T', 'M', '6', ' ' );
-
- status = rtems_timer_create( Timer_name[ 1 ], &Timer_id[ 1 ] );
- directive_failed( status, "rtems_timer_create of TM1" );
-
- status = rtems_timer_create( Timer_name[ 2 ], &Timer_id[ 2 ] );
- directive_failed( status, "rtems_timer_create of TM2" );
-
- status = rtems_timer_create( Timer_name[ 3 ], &Timer_id[ 3 ] );
- directive_failed( status, "rtems_timer_create of TM3" );
-
- status = rtems_timer_create( Timer_name[ 4 ], &Timer_id[ 4 ] );
- directive_failed( status, "rtems_timer_create of TM4" );
-
- status = rtems_timer_create( Timer_name[ 5 ], &Timer_id[ 5 ] );
- directive_failed( status, "rtems_timer_create of TM5" );
-
- status = rtems_timer_create( Timer_name[ 6 ], &Timer_id[ 6 ] );
- directive_failed( status, "rtems_timer_create of TM6" );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
diff --git a/testsuites/sptests/sp11/sp11.doc b/testsuites/sptests/sp11/sp11.doc
deleted file mode 100644
index 57c09d5532..0000000000
--- a/testsuites/sptests/sp11/sp11.doc
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: test11
-
-directives:
- ex_init, ex_start, t_create, t_start, t_delete, tm_tick, i_return,
- ev_send, ev_receive
- tm_wkafter, tm_set, tm_get
-
-concepts:
-
- a. This test checks out the event manager along with the associated
- event directives contained in the time manager.
diff --git a/testsuites/sptests/sp11/sp11.scn b/testsuites/sptests/sp11/sp11.scn
deleted file mode 100644
index db0469eb60..0000000000
--- a/testsuites/sptests/sp11/sp11.scn
+++ /dev/null
@@ -1,74 +0,0 @@
-*** TEST 11 ***
-TA1 - rtems_event_send - send RTEMS_EVENT_16 to TA2
-TA1 - rtems_event_receive - waiting forever on RTEMS_EVENT_14 and RTEMS_EVENT_15
-TA2 - rtems_event_receive - waiting forever on RTEMS_EVENT_16
-TA2 - RTEMS_EVENT_16 received - eventout => 00010000
-TA2 - rtems_event_send - send RTEMS_EVENT_14 and RTEMS_EVENT_15 to TA1
-TA2 - rtems_event_receive - RTEMS_EVENT_17 or RTEMS_EVENT_18 - forever and ANY
-TA1 - RTEMS_EVENT_14 and RTEMS_EVENT_15 received - eventout => 0000c000
-TA1 - rtems_event_send - send RTEMS_EVENT_18 to TA2
-TA1 - rtems_event_receive - waiting with 10 second timeout on RTEMS_EVENT_14
-TA2 - RTEMS_EVENT_17 or RTEMS_EVENT_18 received - eventout => 00040000
-TA2 - rtems_event_send - send RTEMS_EVENT_14 to TA1
-TA2 - rtems_clock_set - 08:15:00 02/12/1988
-TA2 - rtems_event_send - sending RTEMS_EVENT_10 to self after 4 seconds
-TA2 - rtems_event_receive - waiting forever on RTEMS_EVENT_10
-TA1 - RTEMS_EVENT_14 received - eventout => 00004000
-TA1 - rtems_event_send - send RTEMS_EVENT_19 to TA2
-TA1 - rtems_clock_get - 08:15:00 02/12/1988
-<pause>
-TA1 - rtems_event_send - send RTEMS_EVENT_18 to self after 5 seconds
-TA1 - rtems_event_receive - waiting forever on RTEMS_EVENT_18
-TA2 - RTEMS_EVENT_10 received - eventout => 00000400
-TA2 - rtems_clock_get - 08:15:05 02/12/1988
-TA2 - rtems_event_receive - RTEMS_PENDING_EVENTS
-TA2 - eventout => 00080000
-TA2 - rtems_event_receive - RTEMS_EVENT_19 - RTEMS_NO_WAIT
-TA2 - RTEMS_EVENT_19 received - eventout => 00080000
-TA2 - rtems_task_delete - deletes self
-TA1 - RTEMS_EVENT_18 received - eventout => 00040000
-TA1 - rtems_clock_get - 08:15:05 02/12/1988
-TA1 - rtems_event_send - send RTEMS_EVENT_3 to self
-TA1 - rtems_event_receive - RTEMS_EVENT_3 or RTEMS_EVENT_22 - NO_WAIT and ANY
-TA1 - RTEMS_EVENT_3 received - eventout => 00000008
-TA1 - rtems_event_send - send RTEMS_EVENT_4 to self
-TA1 - rtems_event_receive - RTEMS_EVENT_4 or RTEMS_EVENT_5 - forever and ANY
-TA1 - RTEMS_EVENT_4 received - eventout => 00000010
-<pause>
-TA1 - rtems_event_send - send RTEMS_EVENT_18 to self after 5 seconds
-TA1 - rtems_timer_cancel - cancelling timer for event RTEMS_EVENT_18
-TA1 - rtems_event_send - send RTEMS_EVENT_8 to self after 60 seconds
-TA1 - rtems_event_send - send RTEMS_EVENT_9 to self after 60 seconds
-TA1 - rtems_event_send - send RTEMS_EVENT_10 to self after 60 seconds
-TA1 - rtems_timer_cancel - cancelling timer for event RTEMS_EVENT_8
-TA1 - rtems_clock_set - 08:15:00 02/12/1988
-TA1 - rtems_event_send - send RTEMS_EVENT_1 every second
-TA1 - RTEMS_EVENT_1 received - eventout => 00000002 - at 08:15:01 02/12/1988
-TA1 - RTEMS_EVENT_1 received - eventout => 00000002 - at 08:15:02 02/12/1988
-TA1 - RTEMS_EVENT_1 received - eventout => 00000002 - at 08:15:03 02/12/1988
-TA1 - rtems_timer_cancel - cancelling timer for event RTEMS_EVENT_1
-<pause>
-TA1 - rtems_event_send - sending RTEMS_EVENT_11 to self in 1 day
-TA1 - rtems_event_send - sending RTEMS_EVENT_11 to self in 1 day
-TA1 - rtems_event_send - sending RTEMS_EVENT_11 to self in 2 days
-TA1 - rtems_timer_cancel - cancelling RTEMS_EVENT_11 to self in 1 day
-TA1 - rtems_timer_cancel - cancelling RTEMS_EVENT_11 to self in 2 days
-TA1 - rtems_event_send - resending RTEMS_EVENT_11 to self in 2 days
-TA1 - rtems_clock_set - 08:15:03 02/15/1988
-TA1 - rtems_event_receive - waiting forever on RTEMS_EVENT_11
-TA1 - RTEMS_EVENT_11 received - eventout => 00000800
-<pause>
-TA1 - rtems_event_send/rtems_event_receive combination
-TA1 - rtems_clock_set - 08:15:00 02/12/1988
-TA1 - rtems_event_receive all outstanding events
-TA1 - rtems_event_send - sending RTEMS_EVENT_10 to self in 1 day
-TA1 - rtems_event_send - sending RTEMS_EVENT_11 to self in 2 days
-TA1 - rtems_clock_set - 07:15:00 02/12/1988
-TA1 - set time backwards
-TA1 - no events received
-TA1 - rtems_clock_set - 07:15:00 02/14/1988
-TA1 - set time forwards (leave a timer)
-TA1 - RTEMS_EVENT_10 received
-TA1 - rtems_event_send - sending RTEMS_EVENT_11 to self in 100 ticks
-TA1 - rtems_event_send - sending RTEMS_EVENT_11 to self in 200 ticks
-*** END OF TEST 11 ***
diff --git a/testsuites/sptests/sp11/system.h b/testsuites/sptests/sp11/system.h
deleted file mode 100644
index 133f23ec5d..0000000000
--- a/testsuites/sptests/sp11/system.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_task Task_1(
- rtems_task_argument argument
-);
-
-rtems_task Task_2(
- rtems_task_argument argument
-);
-
-rtems_timer_service_routine TA1_send_18_to_self_5_seconds(
- rtems_id ignored_id,
- void *ignored_address
-);
-
-rtems_timer_service_routine TA1_send_8_to_self_60_seconds(
- rtems_id ignored_id,
- void *ignored_address
-);
-
-rtems_timer_service_routine TA1_send_9_to_self_60_seconds(
- rtems_id ignored_id,
- void *ignored_address
-);
-
-rtems_timer_service_routine TA1_send_10_to_self(
- rtems_id ignored_id,
- void *ignored_address
-);
-
-rtems_timer_service_routine TA1_send_1_to_self_every_second(
- rtems_id ignored_id,
- void *ignored_address
-);
-
-rtems_timer_service_routine TA1_send_11_to_self(
- rtems_id ignored_id,
- void *ignored_address
-);
-
-rtems_timer_service_routine TA2_send_10_to_self(
- rtems_id ignored_id,
- void *ignored_address
-);
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MAXIMUM_TIMERS 6
-#define CONFIGURE_TICKS_PER_TIMESLICE 100
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#define CONFIGURE_EXTRA_TASK_STACKS (2 * RTEMS_MINIMUM_STACK_SIZE)
-
-#include <confdefs.h>
-
-/* global variables */
-
-TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
-
-TEST_EXTERN rtems_id Timer_id[ 7 ]; /* array of timer ids */
-TEST_EXTERN rtems_name Timer_name[ 7 ]; /* array of timer names */
-
-/* end of include file */
diff --git a/testsuites/sptests/sp11/task1.c b/testsuites/sptests/sp11/task1.c
deleted file mode 100644
index 77e94e3db6..0000000000
--- a/testsuites/sptests/sp11/task1.c
+++ /dev/null
@@ -1,409 +0,0 @@
-/* Task_1
- *
- * This routine serves as a test task. It verifies the event maager.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task_1(
- rtems_task_argument argument
-)
-{
- rtems_event_set eventout;
- rtems_time_of_day time;
- rtems_status_code status;
- rtems_unsigned32 index;
-
- puts( "TA1 - rtems_event_send - send RTEMS_EVENT_16 to TA2" );
- status = rtems_event_send( Task_id[ 2 ], RTEMS_EVENT_16 );
- directive_failed( status, "rtems_event_send" );
-
- puts(
- "TA1 - rtems_event_receive - waiting forever on "
- "RTEMS_EVENT_14 and RTEMS_EVENT_15"
- );
- status = rtems_event_receive(
- RTEMS_EVENT_14 | RTEMS_EVENT_15,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT,
- &eventout
- );
- directive_failed( status, "rtems_event_receive" );
- printf(
- "TA1 - RTEMS_EVENT_14 and RTEMS_EVENT_15 received - eventout => %08x\n",
- eventout
- );
-
- puts( "TA1 - rtems_event_send - send RTEMS_EVENT_18 to TA2" );
- status = rtems_event_send( Task_id[ 2 ], RTEMS_EVENT_18 );
- directive_failed( status, "rtems_event_send" );
-
- puts(
- "TA1 - rtems_event_receive - waiting with 10 second timeout on RTEMS_EVENT_14"
- );
- status = rtems_event_receive(
- RTEMS_EVENT_14,
- RTEMS_DEFAULT_OPTIONS,
- 10 * TICKS_PER_SECOND,
- &eventout
- );
- directive_failed( status, "rtems_event_receive" );
- printf( "TA1 - RTEMS_EVENT_14 received - eventout => %08x\n", eventout );
-
- puts( "TA1 - rtems_event_send - send RTEMS_EVENT_19 to TA2" );
- status = rtems_event_send( Task_id[ 2 ], RTEMS_EVENT_19 );
- directive_failed( status, "rtems_event_send" );
-
- status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
- directive_failed( status, "rtems_clock_get" );
- print_time( "TA1 - rtems_clock_get - ", &time, "\n" );
-
-rtems_test_pause();
-
- puts( "TA1 - rtems_event_send - send RTEMS_EVENT_18 to self after 5 seconds");
- status = rtems_timer_fire_after(
- Timer_id[ 1 ],
- 5 * TICKS_PER_SECOND,
- TA1_send_18_to_self_5_seconds,
- NULL
- );
- directive_failed( status, "rtems_timer_fire_after 5 seconds" );
-
- puts( "TA1 - rtems_event_receive - waiting forever on RTEMS_EVENT_18" );
- status = rtems_event_receive(
- RTEMS_EVENT_18,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT,
- &eventout
- );
- directive_failed( status, "rtems_event_receive of 18" );
- printf( "TA1 - RTEMS_EVENT_18 received - eventout => %08x\n", eventout );
-
- status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
- directive_failed( status, "TA1 rtems_clock_get" );
- print_time( "TA1 - rtems_clock_get - ", &time, "\n" );
-
- puts( "TA1 - rtems_event_send - send RTEMS_EVENT_3 to self" );
- status = rtems_event_send( RTEMS_SELF, RTEMS_EVENT_3 );
- directive_failed( status, "rtems_event_send" );
-
- puts(
- "TA1 - rtems_event_receive - RTEMS_EVENT_3 or "
- "RTEMS_EVENT_22 - NO_WAIT and ANY"
- );
- status = rtems_event_receive(
- RTEMS_EVENT_3 | RTEMS_EVENT_22,
- RTEMS_NO_WAIT | RTEMS_EVENT_ANY,
- RTEMS_NO_TIMEOUT,
- &eventout
- );
- directive_failed( status, "rtems_event_receive of 3 and 22" );
- printf( "TA1 - RTEMS_EVENT_3 received - eventout => %08x\n", eventout );
-
- puts( "TA1 - rtems_event_send - send RTEMS_EVENT_4 to self" );
- status = rtems_event_send( RTEMS_SELF, RTEMS_EVENT_4 );
- directive_failed( status, "rtems_event_send" );
-
- puts (
- "TA1 - rtems_event_receive - RTEMS_EVENT_4 or "
- "RTEMS_EVENT_5 - forever and ANY"
- );
- status = rtems_event_receive(
- RTEMS_EVENT_4 | RTEMS_EVENT_5,
- RTEMS_EVENT_ANY,
- RTEMS_NO_TIMEOUT,
- &eventout
- );
- directive_failed( status, "rtems_event_receive" );
- printf( "TA1 - RTEMS_EVENT_4 received - eventout => %08x\n", eventout );
-
-rtems_test_pause();
-
- puts( "TA1 - rtems_event_send - send RTEMS_EVENT_18 to self after 5 seconds");
- status = rtems_timer_fire_after(
- Timer_id[ 1 ],
- 5 * TICKS_PER_SECOND,
- TA1_send_18_to_self_5_seconds,
- NULL
- );
- directive_failed( status, "rtems_timer_fire_after 5 seconds" );
-
- puts( "TA1 - rtems_timer_cancel - cancelling timer for event RTEMS_EVENT_18");
- status = rtems_timer_cancel( Timer_id[ 1 ] );
- directive_failed( status, "rtems_timer_cancel" );
-
- puts( "TA1 - rtems_event_send - send RTEMS_EVENT_8 to self after 60 seconds");
- status = rtems_timer_fire_after(
- Timer_id[ 1 ],
- 60 * TICKS_PER_SECOND,
- TA1_send_8_to_self_60_seconds,
- NULL
- );
- directive_failed( status, "rtems_timer_fire_after 60 seconds" );
-
- puts( "TA1 - rtems_event_send - send RTEMS_EVENT_9 to self after 60 seconds");
- status = rtems_timer_fire_after(
- Timer_id[ 2 ],
- 60 * TICKS_PER_SECOND,
- TA1_send_9_to_self_60_seconds,
- NULL
- );
- directive_failed( status, "rtems_timer_fire_after 60 seconds" );
-
- puts(
- "TA1 - rtems_event_send - send RTEMS_EVENT_10 to self after 60 seconds"
- );
- status = rtems_timer_fire_after(
- Timer_id[ 3 ],
- 60 * TICKS_PER_SECOND,
- TA1_send_10_to_self,
- NULL
- );
- directive_failed( status, "rtems_timer_fire_after 60 seconds" );
-
- puts( "TA1 - rtems_timer_cancel - cancelling timer for event RTEMS_EVENT_8" );
- status = rtems_timer_cancel( Timer_id[ 1 ] );
- directive_failed( status, "rtems_timer_cancel" );
-
- build_time( &time, 2, 12, 1988, 8, 15, 0, 0 );
-
- print_time( "TA1 - rtems_clock_set - ", &time, "\n" );
- status = rtems_clock_set( &time );
- directive_failed( status, "rtems_clock_set" );
-
- puts( "TA1 - rtems_event_send - send RTEMS_EVENT_1 every second" );
- status = rtems_timer_fire_after(
- Timer_id[ 1 ],
- TICKS_PER_SECOND,
- TA1_send_1_to_self_every_second,
- NULL
- );
- directive_failed( status, "rtems_timer_fire_after 1 second" );
-
- for ( index = 0; index < 3; index++ ) {
-
- status = rtems_event_receive(
- RTEMS_EVENT_1,
- RTEMS_EVENT_ANY,
- RTEMS_NO_TIMEOUT,
- &eventout
- );
- directive_failed( status, "rtems_event_receive" );
-
- status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
- directive_failed( status, "rtems_clock_get" );
-
- printf( "TA1 - RTEMS_EVENT_1 received - eventout => %08x - ", eventout );
- print_time( "at ", &time, "\n" );
-
- if ( index < 2 ) {
- status = rtems_timer_reset( Timer_id[ 1 ] );
- directive_failed( status, "rtems_timer_reset" );
- };
-
- }
-
- puts( "TA1 - rtems_timer_cancel - cancelling timer for event RTEMS_EVENT_1" );
- status = rtems_timer_cancel( Timer_id[ 1 ] );
- directive_failed( status, "rtems_timer_cancel" );
-
-rtems_test_pause();
-
- time.day = 13;
- puts( "TA1 - rtems_event_send - sending RTEMS_EVENT_11 to self in 1 day" );
- status = rtems_timer_fire_when(
- Timer_id[ 1 ],
- &time,
- TA1_send_11_to_self,
- NULL
- );
- directive_failed( status, "rtems_timer_fire_when 1 day" );
-
- time.hour = 7;
- puts( "TA1 - rtems_event_send - sending RTEMS_EVENT_11 to self in 1 day" );
- status = rtems_timer_fire_when(
- Timer_id[ 2 ],
- &time,
- TA1_send_11_to_self,
- NULL
- );
- directive_failed( status, "rtems_timer_fire_when 1 day" );
-
- time.hour = 8; /* so code below has correct time/date */
- time.day = 14;
- puts( "TA1 - rtems_event_send - sending RTEMS_EVENT_11 to self in 2 days" );
- status = rtems_timer_fire_when(
- Timer_id[ 3 ],
- &time,
- TA1_send_11_to_self,
- NULL
- );
- directive_failed( status, "rtems_timer_fire_when 2 days" );
-
- puts("TA1 - rtems_timer_cancel - cancelling RTEMS_EVENT_11 to self in 1 day");
- status = rtems_timer_cancel( Timer_id[ 1 ] );
- directive_failed( status, "rtems_timer_cancel" );
-
- puts(
- "TA1 - rtems_timer_cancel - cancelling RTEMS_EVENT_11 to self in 2 days"
- );
- status = rtems_timer_cancel( Timer_id[ 3 ] );
- directive_failed( status, "rtems_timer_cancel" );
-
- puts(
- "TA1 - rtems_event_send - resending RTEMS_EVENT_11 to self in 2 days"
- );
- status = rtems_timer_fire_when(
- Timer_id[ 3 ],
- &time,
- TA1_send_11_to_self,
- NULL
- );
- directive_failed( status, "rtems_timer_fire_when 2 days" );
-
- time.day = 15;
- print_time( "TA1 - rtems_clock_set - ", &time, "\n" );
- status = rtems_clock_set( &time );
- directive_failed( status, "TA1 rtems_clock_set" );
-
- puts( "TA1 - rtems_event_receive - waiting forever on RTEMS_EVENT_11" );
- status = rtems_event_receive(
- RTEMS_EVENT_11,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT,
- &eventout
- );
- directive_failed( status, "rtems_event_receive" );
- printf( "TA1 - RTEMS_EVENT_11 received - eventout => %08x\n", eventout );
-
-rtems_test_pause();
-
- puts( "TA1 - rtems_event_send/rtems_event_receive combination" );
- status = rtems_timer_fire_after(
- Timer_id[ 1 ],
- 10,
- TA1_send_11_to_self,
- NULL
- );
- directive_failed( status, "rtems_timer_fire_after 10 ticks" );
-
- status = rtems_event_receive(
- RTEMS_EVENT_11,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT,
- &eventout
- );
- directive_failed( status, "rtems_event_receive" );
-
- build_time( &time, 2, 12, 1988, 8, 15, 0, 0 );
-
- print_time( "TA1 - rtems_clock_set - ", &time, "\n" );
- status = rtems_clock_set( &time );
- directive_failed( status, "rtems_clock_set" );
-
- time.day = 13;
- puts( "TA1 - rtems_event_receive all outstanding events" );
- status = rtems_event_receive(
- RTEMS_ALL_EVENTS,
- RTEMS_NO_WAIT | RTEMS_EVENT_ANY,
- 0,
- &eventout
- );
- fatal_directive_status(
- status,
- RTEMS_UNSATISFIED,
- "rtems_event_receive all events"
- );
-
- puts( "TA1 - rtems_event_send - sending RTEMS_EVENT_10 to self in 1 day" );
- status = rtems_timer_fire_when(
- Timer_id[ 1 ],
- &time,
- TA1_send_10_to_self,
- NULL
- );
- directive_failed( status, "rtems_timer_fire_when 1 day" );
-
- time.day = 14;
- puts( "TA1 - rtems_event_send - sending RTEMS_EVENT_11 to self in 2 days" );
- status = rtems_timer_fire_when(
- Timer_id[ 2 ],
- &time,
- TA1_send_11_to_self,
- NULL
- );
- directive_failed( status, "rtems_timer_fire_when 2 days" );
-
- build_time( &time, 2, 12, 1988, 7, 15, 0, 0 );
-
- print_time( "TA1 - rtems_clock_set - ", &time, "\n" );
- puts( "TA1 - set time backwards" );
- status = rtems_clock_set( &time );
- directive_failed( status, "rtems_clock_set" );
-
- status = rtems_event_receive(
- RTEMS_ALL_EVENTS,
- RTEMS_NO_WAIT | RTEMS_EVENT_ANY,
- RTEMS_NO_TIMEOUT,
- &eventout
- );
- if ( eventout ) printf( "ERROR -0x%08x events received\n", eventout );
- else puts( "TA1 - no events received" );
- fatal_directive_status(
- status,
- RTEMS_UNSATISFIED,
- "rtems_event_receive all events"
- );
-
- build_time( &time, 2, 14, 1988, 7, 15, 0, 0 );
-
- print_time( "TA1 - rtems_clock_set - ", &time, "\n" );
- puts( "TA1 - set time forwards (leave a timer)" );
- status = rtems_clock_set( &time );
- directive_failed( status, "rtems_clock_set" );
-
- status = rtems_event_receive(
- RTEMS_ALL_EVENTS,
- RTEMS_NO_WAIT | RTEMS_EVENT_ANY,
- RTEMS_NO_TIMEOUT,
- &eventout
- );
- if ( eventout == RTEMS_EVENT_10 ) puts( "TA1 - RTEMS_EVENT_10 received" );
- else printf( "ERROR -0x%08x events received\n", eventout );
- directive_failed( status, "rtems_event_receive all events" );
-
- puts( "TA1 - rtems_event_send - sending RTEMS_EVENT_11 to self in 100 ticks");
- status = rtems_timer_fire_after(
- Timer_id[ 1 ],
- 100,
- TA1_send_11_to_self,
- NULL
- );
- directive_failed( status, "rtems_timer_fire_after 100 ticks" );
-
- puts( "TA1 - rtems_event_send - sending RTEMS_EVENT_11 to self in 200 ticks");
- status = rtems_timer_fire_after(
- Timer_id[ 1 ],
- 200,
- TA1_send_11_to_self,
- NULL
- );
- directive_failed( status, "rtems_timer_fire_after 200 ticks" );
-
- puts( "*** END OF TEST 11 ***" );
- exit( 0 );
-}
diff --git a/testsuites/sptests/sp11/task2.c b/testsuites/sptests/sp11/task2.c
deleted file mode 100644
index bbfa27fd9f..0000000000
--- a/testsuites/sptests/sp11/task2.c
+++ /dev/null
@@ -1,125 +0,0 @@
-/* Task_2
- *
- * This routine serves as a test task. Multiple tasks are required to
- * verify all capabilities of the event manager.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task_2(
- rtems_task_argument argument
-)
-{
- rtems_event_set eventout;
- rtems_time_of_day time;
- rtems_status_code status;
-
- status = rtems_task_wake_after( 1*TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
-
- puts( "TA2 - rtems_event_receive - waiting forever on RTEMS_EVENT_16" );
- status = rtems_event_receive(
- RTEMS_EVENT_16,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT,
- &eventout
- );
- directive_failed( status, "rtems_event_receive" );
- printf( "TA2 - RTEMS_EVENT_16 received - eventout => %08x\n", eventout );
-
- puts(
- "TA2 - rtems_event_send - send RTEMS_EVENT_14 and RTEMS_EVENT_15 to TA1"
- );
- status = rtems_event_send( Task_id[ 1 ], RTEMS_EVENT_14 | RTEMS_EVENT_15 );
- directive_failed( status, "rtems_event_send" );
-
- puts(
- "TA2 - rtems_event_receive - RTEMS_EVENT_17 or "
- "RTEMS_EVENT_18 - forever and ANY"
- );
- status = rtems_event_receive(
- RTEMS_EVENT_17 | RTEMS_EVENT_18,
- RTEMS_EVENT_ANY,
- RTEMS_NO_TIMEOUT,
- &eventout
- );
- directive_failed( status, "rtems_event_receive" );
- printf(
- "TA2 - RTEMS_EVENT_17 or RTEMS_EVENT_18 received - eventout => %08x\n",
- eventout
- );
-
- puts( "TA2 - rtems_event_send - send RTEMS_EVENT_14 to TA1" );
- status = rtems_event_send( Task_id[ 1 ], RTEMS_EVENT_14 );
- directive_failed( status, "rtems_event_send" );
-
- build_time( &time, 2, 12, 1988, 8, 15, 0, 0 );
- print_time( "TA2 - rtems_clock_set - ", &time, "\n" );
- status = rtems_clock_set( &time );
- directive_failed( status, "TA2 rtems_clock_set" );
-
- time.second += 4;
- puts(
- "TA2 - rtems_event_send - sending RTEMS_EVENT_10 to self after 4 seconds"
- );
- status = rtems_timer_fire_when(
- Timer_id[ 5 ],
- &time,
- TA2_send_10_to_self,
- NULL
- );
- directive_failed( status, "rtems_timer_fire_when after 4 seconds" );
-
- puts( "TA2 - rtems_event_receive - waiting forever on RTEMS_EVENT_10" );
- status = rtems_event_receive(
- RTEMS_EVENT_10,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT,
- &eventout
- );
- directive_failed( status, "rtems_event_receive" );
-
- status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
- directive_failed( status, "rtems_clock_get" );
-
- printf( "TA2 - RTEMS_EVENT_10 received - eventout => %08x\n", eventout );
- print_time( "TA2 - rtems_clock_get - ", &time, "\n" );
-
- puts( "TA2 - rtems_event_receive - RTEMS_PENDING_EVENTS" );
- status = rtems_event_receive(
- RTEMS_PENDING_EVENTS,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT,
- &eventout
- );
- directive_failed( status, "rtems_event_receive" );
- printf( "TA2 - eventout => %08x\n", eventout );
-
- puts( "TA2 - rtems_event_receive - RTEMS_EVENT_19 - RTEMS_NO_WAIT" );
- status = rtems_event_receive(
- RTEMS_EVENT_19,
- RTEMS_NO_WAIT,
- RTEMS_NO_TIMEOUT,
- &eventout
- );
- directive_failed( status, "rtems_event_receive" );
- printf( "TA2 - RTEMS_EVENT_19 received - eventout => %08x\n", eventout );
-
- puts( "TA2 - rtems_task_delete - deletes self" );
- status = rtems_task_delete( Task_id[ 2 ] );
- directive_failed( status, "rtems_task_delete of TA2" );
-}
diff --git a/testsuites/sptests/sp11/timer.c b/testsuites/sptests/sp11/timer.c
deleted file mode 100644
index f6dff55dd5..0000000000
--- a/testsuites/sptests/sp11/timer.c
+++ /dev/null
@@ -1,96 +0,0 @@
-/* Timer_functions
- *
- * These routines are the timer service routines used by this test.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_timer_service_routine TA1_send_18_to_self_5_seconds(
- rtems_id ignored_id,
- void *ignored_address
-)
-{
- rtems_status_code status;
-
- status = rtems_event_send( Task_id[ 1 ], RTEMS_EVENT_18 );
- directive_failed_with_level( status, "rtems_event_send of 18", 1 );
-}
-
-rtems_timer_service_routine TA1_send_8_to_self_60_seconds(
- rtems_id ignored_id,
- void *ignored_address
-)
-{
- rtems_status_code status;
-
- status = rtems_event_send( Task_id[ 1 ], RTEMS_EVENT_8 );
- directive_failed_with_level( status, "rtems_event_send of 8", 1 );
-}
-
-rtems_timer_service_routine TA1_send_9_to_self_60_seconds(
- rtems_id ignored_id,
- void *ignored_address
-)
-{
- rtems_status_code status;
-
- status = rtems_event_send( Task_id[ 1 ], RTEMS_EVENT_9 );
- directive_failed_with_level( status, "rtems_event_send of 9", 1 );
-}
-
-rtems_timer_service_routine TA1_send_10_to_self(
- rtems_id ignored_id,
- void *ignored_address
-)
-{
- rtems_status_code status;
-
- status = rtems_event_send( Task_id[ 1 ], RTEMS_EVENT_10 );
- directive_failed_with_level( status, "rtems_event_send of 10", -1 );
-}
-
-rtems_timer_service_routine TA1_send_1_to_self_every_second(
- rtems_id ignored_id,
- void *ignored_address
-)
-{
- rtems_status_code status;
-
- status = rtems_event_send( Task_id[ 1 ], RTEMS_EVENT_1 );
- directive_failed_with_level( status, "rtems_event_send of 1", 1 );
-}
-
-rtems_timer_service_routine TA1_send_11_to_self(
- rtems_id ignored_id,
- void *ignored_address
-)
-{
- rtems_status_code status;
-
- status = rtems_event_send( Task_id[ 1 ], RTEMS_EVENT_11 );
- directive_failed_with_level( status, "rtems_event_send of 11", -1 );
-}
-
-rtems_timer_service_routine TA2_send_10_to_self(
- rtems_id ignored_id,
- void *ignored_address
-)
-{
- rtems_status_code status;
-
- status = rtems_event_send( Task_id[ 2 ], RTEMS_EVENT_10 );
- directive_failed_with_level( status, "rtems_event_send of 10", 1 );
-}
diff --git a/testsuites/sptests/sp12/Makefile.am b/testsuites/sptests/sp12/Makefile.am
deleted file mode 100644
index cd748472e5..0000000000
--- a/testsuites/sptests/sp12/Makefile.am
+++ /dev/null
@@ -1,38 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-TEST = sp12
-
-MANAGERS = io semaphore
-
-C_FILES = init.c task1.c task2.c task3.c task4.c task5.c pridrv.c pritask.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = scn doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/sptests.am
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/sptests/sp12/init.c b/testsuites/sptests/sp12/init.c
deleted file mode 100644
index b7155354c5..0000000000
--- a/testsuites/sptests/sp12/init.c
+++ /dev/null
@@ -1,178 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is a user initialization task and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- puts( "\n\n*** TEST 12 ***" );
-
- Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
- Task_name[ 2 ] = rtems_build_name( 'T', 'A', '2', ' ' );
- Task_name[ 3 ] = rtems_build_name( 'T', 'A', '3', ' ' );
- Task_name[ 4 ] = rtems_build_name( 'T', 'A', '4', ' ' );
- Task_name[ 5 ] = rtems_build_name( 'T', 'A', '5', ' ' );
-
- Priority_task_name[ 1 ] = rtems_build_name( 'P', 'R', 'I', '1' );
- Priority_task_name[ 2 ] = rtems_build_name( 'P', 'R', 'I', '2' );
- Priority_task_name[ 3 ] = rtems_build_name( 'P', 'R', 'I', '3' );
- Priority_task_name[ 4 ] = rtems_build_name( 'P', 'R', 'I', '4' );
- Priority_task_name[ 5 ] = rtems_build_name( 'P', 'R', 'I', '5' );
-
- Semaphore_name[ 1 ] = rtems_build_name( 'S', 'M', '1', ' ' );
- Semaphore_name[ 2 ] = rtems_build_name( 'S', 'M', '2', ' ' );
- Semaphore_name[ 3 ] = rtems_build_name( 'S', 'M', '3', ' ' );
-
- status = rtems_semaphore_create(
- Semaphore_name[ 1 ],
- 1,
- RTEMS_DEFAULT_ATTRIBUTES,
- RTEMS_NO_PRIORITY,
- &Semaphore_id[ 1 ]
- );
- directive_failed( status, "rtems_semaphore_create of SM1" );
-
- status = rtems_semaphore_create(
- Semaphore_name[ 2 ],
- 0,
- RTEMS_PRIORITY,
- RTEMS_NO_PRIORITY,
- &Semaphore_id[ 2 ]
- );
- directive_failed( status, "rtems_semaphore_create of SM2" );
-
- status = rtems_semaphore_create(
- Semaphore_name[ 3 ],
- 1,
- RTEMS_DEFAULT_ATTRIBUTES,
- RTEMS_NO_PRIORITY,
- &Semaphore_id[ 3 ]
- );
- directive_failed( status, "rtems_semaphore_create of SM3" );
-
- puts( "INIT - Forward priority queue test" );
- Priority_test_driver( 0 );
-
- puts( "INIT - Backward priority queue test" );
- Priority_test_driver( 32 );
-
-rtems_test_pause();
-
- puts( "INIT - Binary Semaphore and Priority Inheritance Test" );
-
- status = rtems_semaphore_delete( Semaphore_id[ 2 ] );
- directive_failed( status, "rtems_semaphore_delete of SM2" );
-
- puts( "INIT - rtems_semaphore_create - allocated binary semaphore" );
- status = rtems_semaphore_create(
- Semaphore_name[ 2 ],
- 0,
- RTEMS_BINARY_SEMAPHORE | RTEMS_PRIORITY | RTEMS_INHERIT_PRIORITY,
- RTEMS_NO_PRIORITY,
- &Semaphore_id[ 2 ]
- );
- directive_failed( status, "rtems_semaphore_create of priority inherit SM2" );
-
- puts( "INIT - rtems_semaphore_release - allocated binary semaphore" );
- status = rtems_semaphore_release( Semaphore_id[ 2 ] );
- directive_failed( status, "rtems_semaphore_release of SM2" );
-
- puts( "INIT - rtems_semaphore_delete - allocated binary semaphore" );
- status = rtems_semaphore_delete( Semaphore_id[ 2 ] );
- directive_failed( status, "rtems_semaphore_delete of SM2" );
-
- status = rtems_semaphore_create(
- Semaphore_name[ 2 ],
- 1,
- RTEMS_BINARY_SEMAPHORE | RTEMS_PRIORITY | RTEMS_INHERIT_PRIORITY,
- RTEMS_NO_PRIORITY,
- &Semaphore_id[ 2 ]
- );
- directive_failed( status, "rtems_semaphore_create of priority inherit SM2" );
-
- Priority_test_driver( 64 );
-
-rtems_test_pause();
-
- status = rtems_semaphore_delete( Semaphore_id[ 2 ] );
- directive_failed( status, "rtems_semaphore_delete of SM2" );
-
- status = rtems_semaphore_create(
- Semaphore_name[ 2 ],
- 0,
- RTEMS_PRIORITY,
- RTEMS_NO_PRIORITY,
- &Semaphore_id[ 2 ]
- );
- directive_failed( status, "rtems_semaphore_create of priority SM2" );
-
- status = rtems_semaphore_release( Semaphore_id[ 2 ] );
- directive_failed( status, "rtems_semaphore_release of SM2" );
-
- status = rtems_task_create(
- Task_name[ 1 ],
- 4,
- RTEMS_MINIMUM_STACK_SIZE * 2,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_create of TA1" );
-
- status = rtems_task_create(
- Task_name[ 2 ],
- 4,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 2 ]
- );
- directive_failed( status, "rtems_task_create of TA2" );
-
- status = rtems_task_create(
- Task_name[ 3 ],
- 4,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 3 ]
- );
- directive_failed( status, "rtems_task_create of TA3" );
-
- status = rtems_task_start( Task_id[ 1 ], Task_1, 0 );
- directive_failed( status, "rtems_task_start of TA1" );
-
- status = rtems_task_start( Task_id[ 2 ], Task_2, 0 );
- directive_failed( status, "rtems_task_start of TA2" );
-
- status = rtems_task_start( Task_id[ 3 ], Task_3, 0 );
- directive_failed( status, "rtems_task_start of TA3" );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
diff --git a/testsuites/sptests/sp12/pridrv.c b/testsuites/sptests/sp12/pridrv.c
deleted file mode 100644
index 2d945c4e12..0000000000
--- a/testsuites/sptests/sp12/pridrv.c
+++ /dev/null
@@ -1,130 +0,0 @@
-/* Priority_test_driver
- *
- * This routine is the initialization task for this test program.
- * It is a user initialization task and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters:
- * priority_base - priority_base switch
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-void Priority_test_driver(
- rtems_unsigned32 priority_base
-)
-{
- rtems_task_priority previous_priority;
- rtems_unsigned32 index;
- rtems_status_code status;
-
- for ( index = 1 ; index <= 5 ; index++ ) {
- switch ( index ) {
- case 1:
- case 2:
- case 3:
- Task_priority[ index ] = priority_base + index;
- break;
- default:
- Task_priority[ index ] = priority_base + 3;
- break;
- }
-
- status = rtems_task_create(
- Priority_task_name[ index ],
- Task_priority[ index ],
- RTEMS_MINIMUM_STACK_SIZE * 2,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Priority_task_id[ index ]
- );
- directive_failed( status, "rtems_task_create loop" );
-
- }
-
- if ( priority_base == 0 ) {
- for ( index = 1 ; index <= 5 ; index++ ) {
- status = rtems_task_start(
- Priority_task_id[ index ],
- Priority_task,
- index
- );
- directive_failed( status, "rtems_task_start loop" );
- }
- } else {
- for ( index = 5 ; index >= 1 ; index-- ) {
- status = rtems_task_start(
- Priority_task_id[ index ],
- Priority_task,
- index
- );
- directive_failed( status, "rtems_task_start loop" );
-
- status = rtems_task_wake_after( TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after loop" );
-
- if ( priority_base == 64 ) {
- if ( index == 4 ) {
- status = rtems_task_set_priority(
- Priority_task_id[ 5 ],
- priority_base + 4,
- &previous_priority
- );
- printf( "PDRV - change priority of PRI5 from %d to %d\n",
- previous_priority,
- priority_base + 4
- );
- directive_failed( status, "PDRV rtems_task_set_priority" );
- }
- status = rtems_task_set_priority(
- Priority_task_id[ 5 ],
- RTEMS_CURRENT_PRIORITY,
- &previous_priority
- );
- directive_failed( status, "PDRV rtems_task_set_priority CURRENT" );
- printf( "PDRV - priority of PRI5 is %d\n", previous_priority );
- }
- }
- }
-
- status = rtems_task_wake_after( TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after after loop" );
-
- if ( priority_base == 0 ) {
- for ( index = 1 ; index <= 5 ; index++ ) {
- status = rtems_semaphore_release( Semaphore_id[ 2 ] );
- directive_failed( status, "rtems_semaphore_release loop" );
- }
- }
-
- if ( priority_base == 64 ) {
- puts( "PDRV - rtems_task_resume - PRI5" );
- status = rtems_task_resume( Priority_task_id[ 5 ] );
- directive_failed( status, "rtems_task_resume" );
-
- status = rtems_task_wake_after( 1 * TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after so PRI5 can run" );
-
- status = rtems_task_delete( Priority_task_id[ 5 ] );
- directive_failed( status, "rtems_task_delete of PRI5" );
- }
- else {
- for ( index = 1 ; index <= 5 ; index++ ) {
- status = rtems_task_delete( Priority_task_id[ index ] );
- directive_failed( status, "rtems_task_delete loop" );
- }
- }
-}
diff --git a/testsuites/sptests/sp12/pritask.c b/testsuites/sptests/sp12/pritask.c
deleted file mode 100644
index 4ccf31f786..0000000000
--- a/testsuites/sptests/sp12/pritask.c
+++ /dev/null
@@ -1,90 +0,0 @@
-/* Priority_task
- *
- * This routine serves as a test task. It verifies the semaphore manager.
- *
- * Input parameters:
- * its_index - priority index
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Priority_task(
- rtems_task_argument its_index
-)
-{
- rtems_interval timeout;
- rtems_task_priority its_priority;
- rtems_task_priority current_priority;
- rtems_status_code status;
- rtems_unsigned32 index;
-
- its_priority = Task_priority[ its_index ];
-
- if ( its_priority < 3 )
- timeout = 5 * TICKS_PER_SECOND;
- else
- timeout = RTEMS_NO_TIMEOUT;
-
- put_name( Priority_task_name[ its_index ], FALSE );
- puts( " - rtems_semaphore_obtain - wait forever on SM2" );
-
- status = rtems_semaphore_obtain(
- Semaphore_id[ 2 ],
- RTEMS_DEFAULT_OPTIONS,
- timeout
- );
- directive_failed( status, "rtems_semaphore_obtain of SM2" );
-
- if ( its_priority < 64 ) {
- printf( "PRI%d - WHY AM I HERE? (pri=%d)", its_index, its_priority );
- exit( 0 );
- }
-
- if ( its_index == 5 )
- puts( "PRI5 - rtems_task_suspend - until all priority tasks blocked" );
- status = rtems_task_suspend( RTEMS_SELF );
- directive_failed( status, "rtems_task_suspend" );
-
- puts( "PRI5 - rtems_task_delete - all tasks waiting on SM2" );
- for ( index = 1 ; index < 5 ; index++ ) {
- status = rtems_task_delete( Priority_task_id[ index ] );
- directive_failed( status, "rtems_task_delete loop" );
- }
-
- puts( "PRI5 - rtems_semaphore_obtain - nested" );
- status = rtems_semaphore_obtain(
- Semaphore_id[ 2 ],
- RTEMS_DEFAULT_OPTIONS,
- timeout
- );
- directive_failed( status, "rtems_semaphore_obtain nested" );
-
- puts( "PRI5 - rtems_semaphore_release - nested" );
- status = rtems_semaphore_release( Semaphore_id[ 2 ] );
- directive_failed( status, "rtems_semaphore_release nested " );
-
- puts( "PRI5 - rtems_semaphore_release - restore priority" );
- status = rtems_semaphore_release( Semaphore_id[ 2 ] );
- directive_failed( status, "rtems_semaphore_release" );
-
- status = rtems_task_set_priority(
- RTEMS_SELF,
- RTEMS_CURRENT_PRIORITY,
- &current_priority
- );
- directive_failed( status, "PRI5 rtems_task_set_priority CURRENT" );
- printf( "PRI5 - priority of PRI5 is %d\n", current_priority );
-
- (void) rtems_task_suspend( RTEMS_SELF );
-}
diff --git a/testsuites/sptests/sp12/sp12.doc b/testsuites/sptests/sp12/sp12.doc
deleted file mode 100644
index 5ecfc25939..0000000000
--- a/testsuites/sptests/sp12/sp12.doc
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: test12
-
-directives:
- ex_init, ex_start, t_create, t_start, t_delete, tm_tick, i_return,
- sm_create, sm_ident, sm_delete, sm_p, sm_v, tm_wkafter, t_setpri
-
-concepts:
-
- a. This test checks out the semaphore manager.
-
- b. This test forces _Flush_taskq() to unblock a task waiting
- on a deleted object.
diff --git a/testsuites/sptests/sp12/sp12.scn b/testsuites/sptests/sp12/sp12.scn
deleted file mode 100644
index e75a804b0c..0000000000
--- a/testsuites/sptests/sp12/sp12.scn
+++ /dev/null
@@ -1,78 +0,0 @@
-*** TEST 12 ***
-INIT - Forward priority queue test
-PRI1 - rtems_semaphore_obtain - wait forever on SM2
-PRI2 - rtems_semaphore_obtain - wait forever on SM2
-PRI3 - rtems_semaphore_obtain - wait forever on SM2
-PRI4 - rtems_semaphore_obtain - wait forever on SM2
-PRI5 - rtems_semaphore_obtain - wait forever on SM2
-INIT - Backward priority queue test
-PRI5 - rtems_semaphore_obtain - wait forever on SM2
-PRI4 - rtems_semaphore_obtain - wait forever on SM2
-PRI3 - rtems_semaphore_obtain - wait forever on SM2
-PRI2 - rtems_semaphore_obtain - wait forever on SM2
-PRI1 - rtems_semaphore_obtain - wait forever on SM2
-<pause>
-INIT - Binary Semaphore and Priority Inheritance Test
-INIT - rtems_semaphore_create - allocated binary semaphore
-INIT - rtems_semaphore_release - allocated binary semaphore
-INIT - rtems_semaphore_delete - allocated binary semaphore
-PRI5 - rtems_semaphore_obtain - wait forever on SM2
-PRI5 - rtems_task_suspend - until all priority tasks blocked
-PDRV - priority of PRI5 is 67
-PRI4 - rtems_semaphore_obtain - wait forever on SM2
-PDRV - change priority of PRI5 from 67 to 68
-PDRV - priority of PRI5 is 67
-PRI3 - rtems_semaphore_obtain - wait forever on SM2
-PDRV - priority of PRI5 is 67
-PRI2 - rtems_semaphore_obtain - wait forever on SM2
-PDRV - priority of PRI5 is 66
-PRI1 - rtems_semaphore_obtain - wait forever on SM2
-PDRV - priority of PRI5 is 65
-PDRV - rtems_task_resume - PRI5
-PRI5 - rtems_task_delete - all tasks waiting on SM2
-PRI5 - rtems_semaphore_obtain - nested
-PRI5 - rtems_semaphore_release - nested
-PRI5 - rtems_semaphore_release - restore priority
-PRI5 - priority of PRI5 is 68
-<pause>
-TA1 - rtems_semaphore_ident - smid => 18010002
-TA1 - rtems_semaphore_obtain - wait forever on SM2
-TA1 - got SM2
-TA1 - rtems_semaphore_obtain - wait forever on SM3
-TA1 - got SM3
-TA1 - rtems_semaphore_obtain - get SM1 - RTEMS_NO_WAIT
-TA1 - got SM1
-TA1 - rtems_task_wake_after - sleep 5 seconds
-TA2 - rtems_semaphore_obtain - wait forever on SM1
-TA3 - rtems_semaphore_obtain - wait forever on SM2
-<pause>
-TA1 - rtems_semaphore_release - release SM1
-TA1 - rtems_semaphore_obtain - waiting for SM1 with 10 second timeout
-TA2 - got SM1
-TA2 - rtems_semaphore_release - release SM1
-TA2 - rtems_task_set_priority - make self highest priority task
-TA2 - rtems_semaphore_obtain - wait forever on SM2
-TA1 - got SM1
-TA1 - rtems_semaphore_release - release SM2
-TA2 - got SM2
-TA2 - rtems_semaphore_release - release SM2
-TA2 - rtems_task_delete - delete self
-TA1 - rtems_task_wake_after - sleep 5 seconds
-TA3 - got SM2
-TA3 - rtems_semaphore_release - release SM2
-TA3 - rtems_semaphore_obtain - wait forever on SM3
-<pause>
-TA1 - rtems_task_delete - delete TA3
-TA1 - rtems_task_wake_after - sleep 5 seconds
-TA4 - rtems_semaphore_obtain - wait forever on SM1
-TA5 - rtems_semaphore_obtain - wait forever on SM1
-TA1 - rtems_task_delete - delete TA4
-TA1 - rtems_semaphore_release - release SM1
-TA1 - rtems_task_wake_after - sleep 5 seconds
-TA5 - got SM1
-TA5 - rtems_semaphore_obtain - wait forever on SM1
-TA1 - rtems_semaphore_delete - delete SM1
-TA1 - rtems_semaphore_delete - delete SM3
-TA1 - rtems_task_delete - delete self
-TA5 - SM1 deleted by TA1
-*** END OF TEST 12 ***
diff --git a/testsuites/sptests/sp12/system.h b/testsuites/sptests/sp12/system.h
deleted file mode 100644
index 9ab3cb985f..0000000000
--- a/testsuites/sptests/sp12/system.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-void Priority_test_driver(
- rtems_unsigned32 priority_base
-);
-
-rtems_task Priority_task(
- rtems_task_argument its_index
-);
-
-rtems_task Task_1(
- rtems_task_argument argument
-);
-
-rtems_task Task_2(
- rtems_task_argument argument
-);
-
-rtems_task Task_3(
- rtems_task_argument argument
-);
-
-rtems_task Task_4(
- rtems_task_argument argument
-);
-
-rtems_task Task5(
- rtems_task_argument argument
-);
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_INIT_TASK_STACK_SIZE (RTEMS_MINIMUM_STACK_SIZE * 2)
-#define CONFIGURE_MAXIMUM_SEMAPHORES 10
-#define CONFIGURE_TICKS_PER_TIMESLICE 100
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#define CONFIGURE_EXTRA_TASK_STACKS (6 * RTEMS_MINIMUM_STACK_SIZE)
-
-#include <confdefs.h>
-
-/* global variables */
-
-
-TEST_EXTERN rtems_id Task_id[ 6 ]; /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 6 ]; /* array of task names */
-
-TEST_EXTERN rtems_id Priority_task_id[ 6 ]; /* array of task ids */
-TEST_EXTERN rtems_name Priority_task_name[ 6 ]; /* array of task names */
-
-TEST_EXTERN rtems_task_priority Task_priority[ 6 ];
-
-TEST_EXTERN rtems_id Semaphore_id[ 4 ]; /* array of semaphore ids */
-TEST_EXTERN rtems_name Semaphore_name[ 4 ]; /* array of semaphore names */
-
-/* end of include file */
diff --git a/testsuites/sptests/sp12/task1.c b/testsuites/sptests/sp12/task1.c
deleted file mode 100644
index 6f1c5356f8..0000000000
--- a/testsuites/sptests/sp12/task1.c
+++ /dev/null
@@ -1,152 +0,0 @@
-/* Task_1
- *
- * This routine serves as a test task. It verifies the semaphore manager.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task_1(
- rtems_task_argument argument
-)
-{
- rtems_id smid;
- rtems_status_code status;
-
- status = rtems_semaphore_ident(
- Semaphore_name[ 1 ],
- RTEMS_SEARCH_ALL_NODES,
- &smid
- );
- printf( "TA1 - rtems_semaphore_ident - smid => %08x\n", smid );
- directive_failed( status, "rtems_semaphore_ident of SM1" );
-
- puts( "TA1 - rtems_semaphore_obtain - wait forever on SM2" );
- status = rtems_semaphore_obtain(
- Semaphore_id[ 2 ],
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
- directive_failed( status, "rtems_semaphore_obtain of SM2" );
- puts( "TA1 - got SM2" );
-
- puts( "TA1 - rtems_semaphore_obtain - wait forever on SM3" );
- status = rtems_semaphore_obtain(
- Semaphore_id[ 3 ],
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
- directive_failed( status, "rtems_semaphore_obtain of SM3" );
- puts( "TA1 - got SM3" );
-
- puts( "TA1 - rtems_semaphore_obtain - get SM1 - RTEMS_NO_WAIT" );
- status = rtems_semaphore_obtain(
- Semaphore_id[ 1 ],
- RTEMS_NO_WAIT,
- RTEMS_NO_TIMEOUT
- );
- directive_failed( status, "rtems_semaphore_obtain of SM1" );
- puts( "TA1 - got SM1" );
-
- puts( "TA1 - rtems_task_wake_after - sleep 5 seconds" );
- status = rtems_task_wake_after( 5*TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
-
-rtems_test_pause();
-
- puts( "TA1 - rtems_semaphore_release - release SM1" );
- status = rtems_semaphore_release( Semaphore_id[ 1 ] );
- directive_failed( status, "rtems_semaphore_release of SM1" );
-
- puts(
- "TA1 - rtems_semaphore_obtain - waiting for SM1 with 10 second timeout"
- );
- status = rtems_semaphore_obtain(
- Semaphore_id[ 1 ],
- RTEMS_DEFAULT_OPTIONS,
- 10 * TICKS_PER_SECOND
- );
- directive_failed( status, "rtems_semaphore_obtain of SM1" );
- puts( "TA1 - got SM1" );
-
- puts( "TA1 - rtems_semaphore_release - release SM2" );
- status = rtems_semaphore_release( Semaphore_id[ 2 ] );
- directive_failed( status, "rtems_semaphore_release of SM2" );
-
- puts( "TA1 - rtems_task_wake_after - sleep 5 seconds" );
- status = rtems_task_wake_after( 5*TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
-
-rtems_test_pause();
-
- puts( "TA1 - rtems_task_delete - delete TA3" );
- status = rtems_task_delete( Task_id[ 3 ] );
- directive_failed( status, "rtems_task_delete of TA3" );
-
- status = rtems_task_create(
- Task_name[ 4 ],
- 4,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 4 ]
- );
- directive_failed( status, "rtems_task_create of TA4" );
-
- status = rtems_task_create(
- Task_name[ 5 ],
- 4,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 5 ]
- );
- directive_failed( status, "rtems_task_create of TA5" );
-
- status = rtems_task_start( Task_id[ 4 ], Task_4, 0 );
- directive_failed( status, "rtems_task_start of TA4" );
-
- status = rtems_task_start( Task_id[ 5 ], Task5, 0 );
- directive_failed( status, "rtems_task_start of TA5" );
-
- puts( "TA1 - rtems_task_wake_after - sleep 5 seconds" );
- status = rtems_task_wake_after( 5*TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
-
- puts( "TA1 - rtems_task_delete - delete TA4" );
- status = rtems_task_delete( Task_id[ 4 ] );
- directive_failed( status, "rtems_task_delete of TA4" );
-
- puts( "TA1 - rtems_semaphore_release - release SM1" );
- status = rtems_semaphore_release( Semaphore_id[ 1 ] );
- directive_failed( status, "rtems_semaphore_release on SM1" );
-
- puts( "TA1 - rtems_task_wake_after - sleep 5 seconds" );
- status = rtems_task_wake_after( 5*TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
-
- puts( "TA1 - rtems_semaphore_delete - delete SM1" );
- status = rtems_semaphore_delete( Semaphore_id[ 1 ] );
- directive_failed( status, "rtems_semaphore_delete of SM1" );
-
- puts( "TA1 - rtems_semaphore_delete - delete SM3" );
- status = rtems_semaphore_delete( Semaphore_id[ 3 ] );
- directive_failed( status, "rtems_semaphore_delete of SM3" );
-
- puts( "TA1 - rtems_task_delete - delete self" );
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of TA1" );
-}
diff --git a/testsuites/sptests/sp12/task2.c b/testsuites/sptests/sp12/task2.c
deleted file mode 100644
index d5bd9c5199..0000000000
--- a/testsuites/sptests/sp12/task2.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/* Task_2
- *
- * This routine serves as a test task. It simply obtains semaphores
- * 1 and 2, the later when it is a high priority task.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include "system.h"
-
-rtems_task Task_2(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
- rtems_task_priority previous_priority;
-
- puts( "TA2 - rtems_semaphore_obtain - wait forever on SM1" );
- status = rtems_semaphore_obtain(
- Semaphore_id[ 1 ],
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
- puts( "TA2 - got SM1" );
- directive_failed( status, "rtems_semaphore_obtain on SM1" );
-
- puts( "TA2 - rtems_semaphore_release - release SM1" );
- status = rtems_semaphore_release( Semaphore_id[ 1 ] );
- directive_failed( status, "rtems_semaphore_release on SM1" );
-
- puts( "TA2 - rtems_task_set_priority - make self highest priority task" );
- status = rtems_task_set_priority( RTEMS_SELF, 3, &previous_priority );
- directive_failed( status, "rtems_task_set_priority on TA2" );
-
- puts( "TA2 - rtems_semaphore_obtain - wait forever on SM2" );
- status = rtems_semaphore_obtain(
- Semaphore_id[ 2 ],
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
- puts( "TA2 - got SM2" );
- directive_failed( status, "rtems_semaphore_obtain on SM2" );
-
- puts( "TA2 - rtems_semaphore_release - release SM2" );
- status = rtems_semaphore_release( Semaphore_id[ 2 ] );
- directive_failed( status, "rtems_semaphore_release on SM2" );
-
- puts( "TA2 - rtems_task_delete - delete self" );
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of TA2" );
-}
diff --git a/testsuites/sptests/sp12/task3.c b/testsuites/sptests/sp12/task3.c
deleted file mode 100644
index ceb7b56232..0000000000
--- a/testsuites/sptests/sp12/task3.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/* Task_3
- *
- * This routine serves as a test task. It simply obtains semaphore
- * 2 and waits forever attempting to obtain semaphore 3.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task_3(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- puts( "TA3 - rtems_semaphore_obtain - wait forever on SM2" );
- status = rtems_semaphore_obtain(
- Semaphore_id[ 2 ],
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
- directive_failed( status, "rtems_semaphore_obtain on SM2" );
- puts( "TA3 - got SM2" );
-
- puts( "TA3 - rtems_semaphore_release - release SM2" );
- status = rtems_semaphore_release( Semaphore_id[ 2 ] );
- directive_failed( status, "rtems_semaphore_release on SM2" );
-
- puts( "TA3 - rtems_semaphore_obtain - wait forever on SM3" );
- status = rtems_semaphore_obtain(
- Semaphore_id[ 3 ],
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
- directive_failed( status, "rtems_semaphore_obtain on SM3" );
-}
diff --git a/testsuites/sptests/sp12/task4.c b/testsuites/sptests/sp12/task4.c
deleted file mode 100644
index ce3a82f856..0000000000
--- a/testsuites/sptests/sp12/task4.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Task_4
- *
- * This routine serves as a test task. It waits forever attempting
- * to obtain semaphore 1. However, it should never get the semaphore!
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task_4(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- puts( "TA4 - rtems_semaphore_obtain - wait forever on SM1" );
- status = rtems_semaphore_obtain(
- Semaphore_id[ 1 ],
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
- directive_failed( status, "rtems_semaphore_obtain on SM1" );
-}
diff --git a/testsuites/sptests/sp12/task5.c b/testsuites/sptests/sp12/task5.c
deleted file mode 100644
index 06ccb3f25b..0000000000
--- a/testsuites/sptests/sp12/task5.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/* Task5
- *
- * This routine serves as a test task. It obtains semaphore 1 correctly
- * once, then waits for semaphore 1 again. Task 1 should delete the
- * semaphore, thus waking this task up.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task5(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- puts( "TA5 - rtems_semaphore_obtain - wait forever on SM1" );
- status = rtems_semaphore_obtain(
- Semaphore_id[ 1 ],
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
- directive_failed( status, "rtems_semaphore_obtain on SM1" );
- puts( "TA5 - got SM1" );
-
- puts( "TA5 - rtems_semaphore_obtain - wait forever on SM1" );
- status = rtems_semaphore_obtain(
- Semaphore_id[ 1 ],
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
- fatal_directive_status(
- status,
- RTEMS_OBJECT_WAS_DELETED,
- "rtems_semaphore_obtain on SM1"
- );
- puts( "TA5 - SM1 deleted by TA1" );
-
- puts( "*** END OF TEST 12 ***" );
- exit( 0 );
-}
diff --git a/testsuites/sptests/sp13/Makefile.am b/testsuites/sptests/sp13/Makefile.am
deleted file mode 100644
index e5cd4b406b..0000000000
--- a/testsuites/sptests/sp13/Makefile.am
+++ /dev/null
@@ -1,38 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-TEST = sp13
-
-MANAGERS = io message
-
-C_FILES = init.c fillbuff.c putbuff.c task1.c task2.c task3.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = scn doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/sptests.am
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/sptests/sp13/fillbuff.c b/testsuites/sptests/sp13/fillbuff.c
deleted file mode 100644
index 728606e5bb..0000000000
--- a/testsuites/sptests/sp13/fillbuff.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Fill_buffer
- *
- * This test routine copies a given source string to a given destination
- * buffer.
- *
- * Input parameters:
- * source - pointer to string to be copied
- * buffer - pointer to message buffer to be filled
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-void Fill_buffer(
- char *source,
- long *buffer
-)
-{
- memcpy( buffer, source, 16 );
-}
diff --git a/testsuites/sptests/sp13/init.c b/testsuites/sptests/sp13/init.c
deleted file mode 100644
index 2614d2a5d4..0000000000
--- a/testsuites/sptests/sp13/init.c
+++ /dev/null
@@ -1,111 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is a user initialization task and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- puts( "\n\n*** TEST 13 ***" );
-
- Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
- Task_name[ 2 ] = rtems_build_name( 'T', 'A', '2', ' ' );
- Task_name[ 3 ] = rtems_build_name( 'T', 'A', '3', ' ' );
-
- status = rtems_task_create(
- Task_name[ 1 ],
- 4,
- RTEMS_MINIMUM_STACK_SIZE * 2,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_create of TA1" );
-
- status = rtems_task_create(
- Task_name[ 2 ],
- 4,
- RTEMS_MINIMUM_STACK_SIZE * 2,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 2 ]
- );
- directive_failed( status, "rtems_task_create of TA2" );
-
- status = rtems_task_create(
- Task_name[ 3 ],
- 4,
- RTEMS_MINIMUM_STACK_SIZE * 2,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 3 ]
- );
- directive_failed( status, "rtems_task_create of TA3" );
-
- status = rtems_task_start( Task_id[ 1 ], Task_1, 0 );
- directive_failed( status, "rtems_task_start of TA1" );
-
- status = rtems_task_start( Task_id[ 2 ], Task_2, 0 );
- directive_failed( status, "rtems_task_start of TA2" );
-
- status = rtems_task_start( Task_id[ 3 ], Task_3, 0 );
- directive_failed( status, "rtems_task_start of TA3" );
-
- Queue_name[ 1 ] = rtems_build_name( 'Q', '1', ' ', ' ' );
- Queue_name[ 2 ] = rtems_build_name( 'Q', '2', ' ', ' ' );
- Queue_name[ 3 ] = rtems_build_name( 'Q', '3', ' ', ' ' );
-
- status = rtems_message_queue_create(
- Queue_name[ 1 ],
- 100,
- 16,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Queue_id[ 1 ]
- );
- directive_failed( status, "rtems_message_queue_create of Q1" );
-
- status = rtems_message_queue_create(
- Queue_name[ 2 ],
- 10,
- 16,
- RTEMS_PRIORITY,
- &Queue_id[ 2 ]
- );
- directive_failed( status, "rtems_message_queue_create of Q2" );
-
- status = rtems_message_queue_create(
- Queue_name[ 3 ],
- 100,
- 16,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Queue_id[ 3 ]
- );
- directive_failed( status, "rtems_message_queue_create of Q3" );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
diff --git a/testsuites/sptests/sp13/putbuff.c b/testsuites/sptests/sp13/putbuff.c
deleted file mode 100644
index 26bf149049..0000000000
--- a/testsuites/sptests/sp13/putbuff.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Put_buffer
- *
- * This test routine prints the given buffer.
- * buffer.
- *
- * Input parameters:
- * buffer - pointer to message buffer to be printer
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-void Put_buffer(
- long *buffer
-)
-{
- printf( "%16s", (char *)buffer );
-}
diff --git a/testsuites/sptests/sp13/sp13.doc b/testsuites/sptests/sp13/sp13.doc
deleted file mode 100644
index 8cdd44ac80..0000000000
--- a/testsuites/sptests/sp13/sp13.doc
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: test13
-
-directives:
- ex_init, ex_start, t_create, t_start, t_delete, tm_tick, i_return,
- q_create, q_ident, q_delete, q_send, q_urgent, q_broadcast, q_receive,
- tm_wkafter, t_setpri
-
-concepts:
-
- a. This test checks out the message manager.
diff --git a/testsuites/sptests/sp13/sp13.scn b/testsuites/sptests/sp13/sp13.scn
deleted file mode 100644
index 66ecca6c60..0000000000
--- a/testsuites/sptests/sp13/sp13.scn
+++ /dev/null
@@ -1,78 +0,0 @@
-*** TEST 13 ***
-TA1 - rtems_message_queue_ident - qid => 18010001
-TA1 - rtems_message_queue_send - BUFFER 1 TO Q 1
-TA1 - rtems_message_queue_send - BUFFER 2 TO Q 1
-TA1 - rtems_task_wake_after - sleep 5 seconds
-TA2 - rtems_message_queue_receive - receive from queue 1 - RTEMS_NO_WAIT
-TA2 - buffer received: BUFFER 1 TO Q 1
-TA2 - rtems_message_queue_receive - receive from queue 1 - RTEMS_WAIT FOREVER
-TA2 - buffer received: BUFFER 2 TO Q 1
-TA2 - rtems_message_queue_receive - receive from queue 1 - RTEMS_WAIT FOREVER
-TA3 - rtems_message_queue_receive - receive from queue 2 - RTEMS_WAIT FOREVER
-TA1 - rtems_message_queue_send - BUFFER 3 TO Q 1
-TA1 - rtems_task_wake_after - sleep 5 seconds
-TA2 - buffer received: BUFFER 3 TO Q 1
-TA2 - rtems_task_set_priority - make self highest priority task
-TA2 - rtems_message_queue_receive - receive from queue 2 - RTEMS_WAIT FOREVER
-<pause>
-TA1 - rtems_message_queue_send - BUFFER 1 TO Q 2
-TA2 - buffer received: BUFFER 1 TO Q 2
-TA2 - rtems_message_queue_send - BUFFER 2 TO Q 2
-TA2 - rtems_message_queue_receive - receive from queue 1 - 10 second timeout
-TA1 - rtems_message_queue_receive - receive from queue 1 - 10 second timeout
-TA3 - buffer received: BUFFER 2 TO Q 2
-TA3 - rtems_message_queue_broadcast - BUFFER 3 TO Q 1
-TA2 - buffer received: BUFFER 3 TO Q 1
-TA2 - rtems_message_queue_receive - receive from queue 3 - RTEMS_WAIT FOREVER
-TA3 - number of tasks awakened = 02
-TA3 - rtems_message_queue_receive - receive from queue 3 - RTEMS_WAIT FOREVER
-TA1 - buffer received: BUFFER 3 TO Q 1
-TA1 - rtems_task_delete - delete TA2
-TA1 - rtems_message_queue_send - BUFFER 1 TO Q 3
-TA1 - rtems_task_wake_after - sleep 5 seconds
-TA3 - buffer received: BUFFER 1 TO Q 3
-TA3 - rtems_task_delete - delete self
-<pause>
-TA1 - rtems_message_queue_send - BUFFER 2 TO Q 3
-TA1 - rtems_message_queue_send - BUFFER 3 TO Q 3
-TA1 - rtems_message_queue_send - BUFFER 4 TO Q 3
-TA1 - rtems_message_queue_urgent - BUFFER 5 TO Q 3
-TA1 - rtems_message_queue_receive - receive from queue 3 - RTEMS_WAIT FOREVER
-TA1 - buffer received: BUFFER 5 TO Q 3
-TA1 - rtems_message_queue_receive - receive from queue 3 - RTEMS_WAIT FOREVER
-TA1 - buffer received: BUFFER 2 TO Q 3
-TA1 - rtems_message_queue_receive - receive from queue 3 - RTEMS_WAIT FOREVER
-TA1 - buffer received: BUFFER 3 TO Q 3
-TA1 - rtems_message_queue_receive - receive from queue 3 - RTEMS_WAIT FOREVER
-TA1 - buffer received: BUFFER 4 TO Q 3
-TA1 - rtems_message_queue_urgent - BUFFER 3 TO Q 2
-TA1 - rtems_message_queue_receive - receive from queue 2 - RTEMS_WAIT FOREVER
-TA1 - buffer received: BUFFER 3 TO Q 2
-<pause>
-TA1 - rtems_message_queue_delete - delete queue 1
-TA1 - rtems_message_queue_urgent - BUFFER 3 TO Q 2
-TA1 - rtems_message_queue_delete - delete queue 2
-TA1 - rtems_message_queue_get_number_pending - SUCCESSFUL
-TA1 - 0 messages are pending on Q 3
-TA1 - rtems_message_queue_flush - empty Q 3
-TA1 - 0 messages were flushed from Q 3
-TA1 - rtems_message_queue_send - BUFFER 1 TO Q 3
-TA1 - rtems_message_queue_send - BUFFER 2 TO Q 3
-TA3 - rtems_message_queue_broadcast - NO BUFFER TO Q1
-TA3 - number of tasks awakened = 0
-TA1 - rtems_message_queue_get_number_pending - SUCCESSFUL
-TA1 - 2 messages are pending on Q 3
-TA1 - rtems_message_queue_send - BUFFER 3 TO Q 3
-TA1 - rtems_message_queue_flush - Q 3
-TA1 - 3 messages were flushed from Q 3
-TA1 - rtems_message_queue_send until all message buffers consumed
-TA1 - all message buffers consumed
-TA1 - rtems_message_queue_flush - Q 3
-TA1 - 100 messages were flushed from Q 3
-<pause>
-TA1 - create message queue of 20 bytes on queue 1
-TA1 - rtems_message_queue_delete - delete queue 1
-<pause>
-TA1 - rtems_message_queue_create - variable sizes
-TA1 - rtems_message_queue_create and send - variable sizes
-*** END OF TEST 13 ***
diff --git a/testsuites/sptests/sp13/system.h b/testsuites/sptests/sp13/system.h
deleted file mode 100644
index 49b6d6feaf..0000000000
--- a/testsuites/sptests/sp13/system.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-void Fill_buffer(
- char source[],
- long *buffer
-);
-
-void Put_buffer(
- long *buffer
-);
-
-rtems_task Task_1(
- rtems_task_argument argument
-);
-
-rtems_task Task_2(
- rtems_task_argument argument
-);
-
-rtems_task Task_3(
- rtems_task_argument argument
-);
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 10
-#define CONFIGURE_TICKS_PER_TIMESLICE 100
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#define CONFIGURE_EXTRA_TASK_STACKS (3 * RTEMS_MINIMUM_STACK_SIZE)
-
-#include <confdefs.h>
-
-/* global variables */
-
-TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
-
-TEST_EXTERN rtems_id Queue_id[ 4 ]; /* array of queue ids */
-TEST_EXTERN rtems_name Queue_name[ 4 ]; /* array of queue names */
-
-/* end of include file */
diff --git a/testsuites/sptests/sp13/task1.c b/testsuites/sptests/sp13/task1.c
deleted file mode 100644
index 859c3d46ab..0000000000
--- a/testsuites/sptests/sp13/task1.c
+++ /dev/null
@@ -1,361 +0,0 @@
-/* Task_1
- *
- * This routine serves as a test task. It verifies the message manager.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-#include <string.h> /* for memcmp */
-
-char big_send_buffer[2048];
-char big_receive_buffer[2048];
-
-long buffer[ 4 ];
-
-void dope_buffer(unsigned char *buff,
- int buff_size,
- unsigned32 v)
-{
- int i;
- unsigned char ch;
-
- ch = (' ' + (v % (0x7f - ' ')));
-
- for (i=0; i<buff_size; i++)
- {
- *buff++ = ch++;
- if (ch >= 0x7f)
- ch = ' ';
- }
-}
-
-rtems_task Task_1(
- rtems_task_argument argument
-)
-{
- rtems_id qid;
- rtems_unsigned32 index;
- rtems_unsigned32 count;
- rtems_status_code status;
- rtems_unsigned32 size;
- rtems_unsigned32 queue_size;
- char *cp;
-
- status = rtems_message_queue_ident(
- Queue_name[ 1 ],
- RTEMS_SEARCH_ALL_NODES,
- &qid
- );
- printf( "TA1 - rtems_message_queue_ident - qid => %08x\n", qid );
- directive_failed( status, "rtems_message_queue_ident" );
-
- Fill_buffer( "BUFFER 1 TO Q 1", buffer );
- puts( "TA1 - rtems_message_queue_send - BUFFER 1 TO Q 1" );
- status = rtems_message_queue_send( Queue_id[ 1 ], buffer, 16 );
- directive_failed( status, "rtems_message_queue_send" );
-
- Fill_buffer( "BUFFER 2 TO Q 1", buffer );
- puts( "TA1 - rtems_message_queue_send - BUFFER 2 TO Q 1" );
- status = rtems_message_queue_send( Queue_id[ 1 ], buffer, 16 );
- directive_failed( status, "rtems_message_queue_send" );
-
- puts( "TA1 - rtems_task_wake_after - sleep 5 seconds" );
- status = rtems_task_wake_after( 5*TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
-
- Fill_buffer( "BUFFER 3 TO Q 1", buffer );
- puts( "TA1 - rtems_message_queue_send - BUFFER 3 TO Q 1" );
- status = rtems_message_queue_send( Queue_id[ 1 ], buffer, 16 );
- directive_failed( status, "rtems_message_queue_send" );
-
- puts( "TA1 - rtems_task_wake_after - sleep 5 seconds" );
- status = rtems_task_wake_after( 5*TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
-
-rtems_test_pause();
-
- Fill_buffer( "BUFFER 1 TO Q 2", buffer );
- puts( "TA1 - rtems_message_queue_send - BUFFER 1 TO Q 2" );
- status = rtems_message_queue_send( Queue_id[ 2 ], buffer, 16 );
- directive_failed( status, "rtems_message_queue_send" );
-
- puts_nocr( "TA1 - rtems_message_queue_receive - receive from queue 1 - " );
- puts ( "10 second timeout" );
- status = rtems_message_queue_receive(
- Queue_id[ 1 ],
- buffer,
- &size,
- RTEMS_DEFAULT_OPTIONS,
- 10 * TICKS_PER_SECOND
- );
- directive_failed( status, "rtems_message_queue_receive" );
- puts_nocr( "TA1 - buffer received: " );
- Put_buffer( buffer );
- new_line;
-
- puts( "TA1 - rtems_task_delete - delete TA2" );
- status = rtems_task_delete( Task_id[ 2 ] );
- directive_failed( status, "rtems_task_delete" );
-
- Fill_buffer( "BUFFER 1 TO Q 3", buffer );
- puts( "TA1 - rtems_message_queue_send - BUFFER 1 TO Q 3" );
- status = rtems_message_queue_send( Queue_id[ 3 ], buffer, 16 );
- directive_failed( status, "rtems_message_queue_send" );
-
- puts( "TA1 - rtems_task_wake_after - sleep 5 seconds" );
- status = rtems_task_wake_after( 5*TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
-
-rtems_test_pause();
-
- Fill_buffer( "BUFFER 2 TO Q 3", buffer );
- puts( "TA1 - rtems_message_queue_send - BUFFER 2 TO Q 3" );
- status = rtems_message_queue_send( Queue_id[ 3 ], buffer, 16 );
- directive_failed( status, "rtems_message_queue_send" );
-
- Fill_buffer( "BUFFER 3 TO Q 3", buffer );
- puts( "TA1 - rtems_message_queue_send - BUFFER 3 TO Q 3" );
- status = rtems_message_queue_send( Queue_id[ 3 ], buffer, 16 );
- directive_failed( status, "rtems_message_queue_send" );
-
- Fill_buffer( "BUFFER 4 TO Q 3", buffer );
- puts( "TA1 - rtems_message_queue_send - BUFFER 4 TO Q 3" );
- status = rtems_message_queue_send( Queue_id[ 3 ], buffer, 16 );
- directive_failed( status, "rtems_message_queue_send" );
-
- Fill_buffer( "BUFFER 5 TO Q 3", buffer );
- puts( "TA1 - rtems_message_queue_urgent - BUFFER 5 TO Q 3" );
- status = rtems_message_queue_urgent( Queue_id[ 3 ], buffer, 16 );
- directive_failed( status, "rtems_message_queue_urgent" );
-
- for ( index = 1 ; index <= 4 ; index++ ) {
- puts(
- "TA1 - rtems_message_queue_receive - receive from queue 3 - "
- "RTEMS_WAIT FOREVER"
- );
- status = rtems_message_queue_receive(
- Queue_id[ 3 ],
- buffer,
- &size,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
- directive_failed( status, "rtems_message_queue_receive" );
- puts_nocr( "TA1 - buffer received: " );
- Put_buffer( buffer );
- new_line;
- }
-
- Fill_buffer( "BUFFER 3 TO Q 2", buffer );
- puts( "TA1 - rtems_message_queue_urgent - BUFFER 3 TO Q 2" );
- status = rtems_message_queue_urgent( Queue_id[ 2 ], buffer, 16 );
- directive_failed( status, "rtems_message_queue_urgent" );
-
- puts(
- "TA1 - rtems_message_queue_receive - receive from queue 2 - "
- "RTEMS_WAIT FOREVER"
- );
- status = rtems_message_queue_receive(
- Queue_id[ 2 ],
- buffer,
- &size,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
- directive_failed( status, "rtems_message_queue_receive" );
- puts_nocr( "TA1 - buffer received: " );
- Put_buffer( buffer );
- new_line;
-
-rtems_test_pause();
-
- puts( "TA1 - rtems_message_queue_delete - delete queue 1" );
- status = rtems_message_queue_delete( Queue_id[ 1 ] );
- directive_failed( status, "rtems_message_queue_delete" );
-
- Fill_buffer( "BUFFER 3 TO Q 2", buffer );
- puts( "TA1 - rtems_message_queue_urgent - BUFFER 3 TO Q 2" );
- status = rtems_message_queue_urgent( Queue_id[ 2 ], buffer, 16 );
- directive_failed( status, "rtems_message_queue_urgent" );
-
- puts( "TA1 - rtems_message_queue_delete - delete queue 2" );
- status = rtems_message_queue_delete( Queue_id[ 2 ] );
- directive_failed( status, "rtems_message_queue_delete" );
-
- puts( "TA1 - rtems_message_queue_get_number_pending - SUCCESSFUL\n" );
- status = rtems_message_queue_get_number_pending( Queue_id[ 3 ], &count );
- printf( "TA1 - %d messages are pending on Q 3\n", count );
-
- puts( "TA1 - rtems_message_queue_flush - empty Q 3" );
- status = rtems_message_queue_flush( Queue_id[ 3 ], &count );
- printf( "TA1 - %d messages were flushed from Q 3\n", count );
-
- Fill_buffer( "BUFFER 1 TO Q 3", buffer );
- puts( "TA1 - rtems_message_queue_send - BUFFER 1 TO Q 3" );
- status = rtems_message_queue_send( Queue_id[ 3 ], buffer, 16 );
- directive_failed( status, "rtems_message_queue_send" );
-
- Fill_buffer( "BUFFER 2 TO Q 3", buffer );
- puts( "TA1 - rtems_message_queue_send - BUFFER 2 TO Q 3" );
- status = rtems_message_queue_send( Queue_id[ 3 ], buffer, 16 );
- directive_failed( status, "rtems_message_queue_send" );
-
- /* this broadcast should have no effect on the queue */
- Fill_buffer( "NO BUFFER TO Q1", (long *)buffer );
- puts( "TA3 - rtems_message_queue_broadcast - NO BUFFER TO Q1" );
- status = rtems_message_queue_broadcast(
- Queue_id[ 1 ],
- (long (*)[4])buffer,
- 16,
- &count
- );
- printf( "TA3 - number of tasks awakened = %d\n", count );
-
-
- puts( "TA1 - rtems_message_queue_get_number_pending - SUCCESSFUL\n" );
- status = rtems_message_queue_get_number_pending( Queue_id[ 3 ], &count );
- printf( "TA1 - %d messages are pending on Q 3\n", count );
-
- Fill_buffer( "BUFFER 3 TO Q 3", buffer );
- puts( "TA1 - rtems_message_queue_send - BUFFER 3 TO Q 3" );
- status = rtems_message_queue_send( Queue_id[ 3 ], buffer, 16 );
- directive_failed( status, "rtems_message_queue_send" );
-
- puts( "TA1 - rtems_message_queue_flush - Q 3" );
- status = rtems_message_queue_flush( Queue_id[ 3 ], &count );
- printf( "TA1 - %d messages were flushed from Q 3\n", count );
-
- puts( "TA1 - rtems_message_queue_send until all message buffers consumed" );
- while ( FOREVER ) {
- status = rtems_message_queue_send( Queue_id[ 3 ], buffer, 16 );
- if ( status == RTEMS_TOO_MANY ) break;
- directive_failed( status, "rtems_message_queue_send loop" );
- }
-
- puts( "TA1 - all message buffers consumed" );
- puts( "TA1 - rtems_message_queue_flush - Q 3" );
- status = rtems_message_queue_flush( Queue_id[ 3 ], &count );
- printf( "TA1 - %d messages were flushed from Q 3\n", count );
-
-rtems_test_pause();
-
- puts( "TA1 - create message queue of 20 bytes on queue 1" );
- status = rtems_message_queue_create(
- Queue_name[ 1 ],
- 100,
- 20,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Queue_id[ 1 ]
- );
- directive_failed( status, "rtems_message_queue_create of Q1; 20 bytes each" );
- status = rtems_message_queue_send( Queue_id[ 3 ], big_send_buffer, 40 );
- fatal_directive_status(status, RTEMS_INVALID_SIZE, "expected RTEMS_INVALID_SIZE");
-
- puts( "TA1 - rtems_message_queue_delete - delete queue 1" );
- status = rtems_message_queue_delete( Queue_id[ 1 ] );
- directive_failed( status, "rtems_message_queue_delete" );
-
-rtems_test_pause();
-
- puts( "TA1 - rtems_message_queue_create - variable sizes " );
- for (queue_size = 1; queue_size < 1030; queue_size++)
- {
- status = rtems_message_queue_create(
- Queue_name[ 1 ],
- 2, /* just 2 msgs each */
- queue_size,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Queue_id[ 1 ]
- );
- if (status != RTEMS_SUCCESSFUL)
- {
- printf("TA1 - msq que size: %d\n", queue_size);
- directive_failed( status, "rtems_message_queue_create of Q1" );
- }
-
- status = rtems_message_queue_delete( Queue_id[ 1 ] );
- directive_failed( status, "rtems_message_queue_delete" );
- }
-
- puts( "TA1 - rtems_message_queue_create and send - variable sizes " );
- for (queue_size = 1; queue_size < 1030; queue_size++)
- {
- /* printf("TA1 - message queue size: %d\n", queue_size); */
-
- status = rtems_message_queue_create(
- Queue_name[ 1 ],
- 2, /* just 2 msgs each */
- queue_size,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Queue_id[ 1 ]
- );
-
- directive_failed( status, "rtems_message_queue_create of Q1" );
-
- dope_buffer(big_send_buffer, sizeof(big_send_buffer), queue_size);
- memset(big_receive_buffer, 'Z', sizeof(big_receive_buffer));
-
- /* send a msg too big */
- status = rtems_message_queue_send( Queue_id[ 1 ],
- big_send_buffer,
- queue_size + 1 );
-
- fatal_directive_status(status,
- RTEMS_INVALID_SIZE,
- "rtems_message_queue_send too large");
-
- /* send a msg that is just right */
- status = rtems_message_queue_send(Queue_id[ 1 ],
- big_send_buffer,
- queue_size);
- directive_failed(status, "rtems_message_queue_send exact size");
-
- /* now read and verify the message just sent */
- status = rtems_message_queue_receive(Queue_id[ 1 ],
- big_receive_buffer,
- &size,
- RTEMS_DEFAULT_OPTIONS,
- 1 * TICKS_PER_SECOND);
- directive_failed(status, "rtems_message_queue_receive exact size");
- if (size != queue_size)
- {
- puts("TA1 - exact size size match failed");
- exit(1);
- }
-
- if (memcmp(big_send_buffer, big_receive_buffer, size) != 0)
- {
- puts("TA1 - exact size data match failed");
- exit(1);
- }
-
- for (cp = (big_receive_buffer + size);
- cp < (big_receive_buffer + sizeof(big_receive_buffer));
- cp++)
- if (*cp != 'Z')
- {
- puts("TA1 - exact size overrun match failed");
- exit(1);
- }
-
- /* all done with this one; delete it */
- status = rtems_message_queue_delete( Queue_id[ 1 ] );
- directive_failed( status, "rtems_message_queue_delete" );
- }
-
- puts( "*** END OF TEST 13 ***" );
- exit( 0 );
-}
diff --git a/testsuites/sptests/sp13/task2.c b/testsuites/sptests/sp13/task2.c
deleted file mode 100644
index c3e117fae3..0000000000
--- a/testsuites/sptests/sp13/task2.c
+++ /dev/null
@@ -1,138 +0,0 @@
-/* Task_2
- *
- * This routine serves as a test task. Multiple tasks are required to
- * verify all message manager capabilities.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task_2(
- rtems_task_argument argument
-)
-{
- long buffer[ 4 ];
- rtems_unsigned32 size;
- rtems_task_priority previous_priority;
- rtems_status_code status;
-
- puts(
- "TA2 - rtems_message_queue_receive - receive from queue 1 - RTEMS_NO_WAIT"
- );
- status = rtems_message_queue_receive(
- Queue_id[ 1 ],
- (long (*)[4])buffer,
- &size,
- RTEMS_NO_WAIT,
- RTEMS_NO_TIMEOUT
- );
- directive_failed( status, "rtems_message_queue_receive" );
- puts_nocr( "TA2 - buffer received: " );
- Put_buffer( buffer );
- new_line;
-
- puts(
- "TA2 - rtems_message_queue_receive - receive from queue 1 - "
- "RTEMS_WAIT FOREVER"
- );
- status = rtems_message_queue_receive(
- Queue_id[ 1 ],
- (long (*)[4])buffer,
- &size,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
- directive_failed( status, "rtems_message_queue_receive" );
- puts_nocr( "TA2 - buffer received: " );
- Put_buffer( buffer );
- new_line;
-
- puts(
- "TA2 - rtems_message_queue_receive - receive from queue 1 - "
- "RTEMS_WAIT FOREVER"
- );
- status = rtems_message_queue_receive(
- Queue_id[ 1 ],
- (long (*)[4])buffer,
- &size,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
- directive_failed( status, "rtems_message_queue_receive" );
- puts_nocr( "TA2 - buffer received: " );
- Put_buffer( buffer );
- new_line;
-
- puts( "TA2 - rtems_task_set_priority - make self highest priority task" );
- status = rtems_task_set_priority( RTEMS_SELF, 3, &previous_priority );
- directive_failed( status, "rtems_task_set_priority" );
-
- puts(
- "TA2 - rtems_message_queue_receive - receive from queue 2 - "
- "RTEMS_WAIT FOREVER"
- );
- status = rtems_message_queue_receive(
- Queue_id[ 2 ],
- (long (*)[4])buffer,
- &size,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
- directive_failed( status, "rtems_message_queue_receive" );
- puts_nocr( "TA2 - buffer received: " );
- Put_buffer( buffer );
- new_line;
-
- Fill_buffer( "BUFFER 2 TO Q 2", (long *)buffer );
- puts( "TA2 - rtems_message_queue_send - BUFFER 2 TO Q 2" );
- directive_failed( status, "rtems_message_queue_send" );
-
- status = rtems_message_queue_send( Queue_id[ 2 ], (long (*)[4])buffer, 16 );
- directive_failed( status, "rtems_message_queue_send" );
-
- puts(
- "TA2 - rtems_message_queue_receive - receive from queue 1 - "
- "10 second timeout"
- );
- status = rtems_message_queue_receive(
- Queue_id[ 1 ],
- (long (*)[4])buffer,
- &size,
- RTEMS_DEFAULT_OPTIONS,
- 10 * TICKS_PER_SECOND
- );
- directive_failed( status, "rtems_message_queue_receive" );
- puts_nocr( "TA2 - buffer received: " );
- Put_buffer( buffer );
- new_line;
-
- puts(
- "TA2 - rtems_message_queue_receive - receive from queue 3 - "
- "RTEMS_WAIT FOREVER"
- );
- status = rtems_message_queue_receive(
- Queue_id[ 3 ],
- (long (*)[4])buffer,
- &size,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
- directive_failed( status, "rtems_message_queue_receive" );
- puts_nocr( "TA2 - buffer received: " );
- Put_buffer( buffer );
- new_line;
-
-}
diff --git a/testsuites/sptests/sp13/task3.c b/testsuites/sptests/sp13/task3.c
deleted file mode 100644
index 95acec01fc..0000000000
--- a/testsuites/sptests/sp13/task3.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/* Task_3
- *
- * This routine serves as a test task. Its major function is to
- * broadcast a messge to all the other tasks.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task_3(
- rtems_task_argument argument
-)
-{
- long buffer[ 4 ];
- rtems_unsigned32 size;
- rtems_unsigned32 count;
- rtems_status_code status;
-
- puts(
- "TA3 - rtems_message_queue_receive - receive from queue 2 - "
- "RTEMS_WAIT FOREVER"
- );
- status = rtems_message_queue_receive(
- Queue_id[ 2 ],
- (long (*)[4])buffer,
- &size,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
- directive_failed( status, "rtems_message_queue_receive" );
- puts_nocr( "TA3 - buffer received: " );
- Put_buffer( buffer );
- new_line;
-
- Fill_buffer( "BUFFER 3 TO Q 1", (long *)buffer );
- puts( "TA3 - rtems_message_queue_broadcast - BUFFER 3 TO Q 1" );
- status = rtems_message_queue_broadcast(
- Queue_id[ 1 ],
- (long (*)[4])buffer,
- 16,
- &count
- );
- printf( "TA3 - number of tasks awakened = %02d\n", count );
- puts(
- "TA3 - rtems_message_queue_receive - receive from queue 3 - "
- "RTEMS_WAIT FOREVER"
- );
-
- status = rtems_message_queue_receive(
- Queue_id[ 3 ],
- (long (*)[4])buffer,
- &size,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
- directive_failed( status, "rtems_message_queue_receive" );
- puts_nocr( "TA3 - buffer received: " );
- Put_buffer( buffer );
- new_line;
-
- puts( "TA3 - rtems_task_delete - delete self" );
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
diff --git a/testsuites/sptests/sp14/Makefile.am b/testsuites/sptests/sp14/Makefile.am
deleted file mode 100644
index 223bb0e03e..0000000000
--- a/testsuites/sptests/sp14/Makefile.am
+++ /dev/null
@@ -1,38 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-TEST = sp14
-
-MANAGERS = io signal timer
-
-C_FILES = init.c asr.c task1.c task2.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = scn doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/sptests.am
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/sptests/sp14/asr.c b/testsuites/sptests/sp14/asr.c
deleted file mode 100644
index 6c635b00f3..0000000000
--- a/testsuites/sptests/sp14/asr.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Process_asr
- *
- * This is the asynchronous signal routine (asr) for task 1.
- * It demonstrates that ASRs can block execute and block.
- *
- * Input parameters:
- * the_signal_set - signal set
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_asr Process_asr(
- rtems_signal_set the_signal_set
-)
-{
- rtems_status_code status;
-
- printf( "ASR - ENTRY - signal => %08x\n", the_signal_set );
- switch( the_signal_set ) {
- case RTEMS_SIGNAL_16:
- case RTEMS_SIGNAL_17:
- case RTEMS_SIGNAL_18 | RTEMS_SIGNAL_19:
- break;
- case RTEMS_SIGNAL_0:
- case RTEMS_SIGNAL_1:
- puts( "ASR - rtems_task_wake_after - yield processor" );
- status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
- directive_failed( status, "rtems_task_wake_after yield" );
- break;
- case RTEMS_SIGNAL_3:
- Asr_fired = TRUE;
- break;
- }
- printf( "ASR - EXIT - signal => %08x\n", the_signal_set );
-}
diff --git a/testsuites/sptests/sp14/init.c b/testsuites/sptests/sp14/init.c
deleted file mode 100644
index 3ce5be0be0..0000000000
--- a/testsuites/sptests/sp14/init.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is a user initialization task and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- puts( "\n\n*** TEST 14 ***" );
-
- Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
- Task_name[ 2 ] = rtems_build_name( 'T', 'A', '2', ' ' );
-
- status = rtems_task_create(
- Task_name[ 1 ],
- 4,
- RTEMS_MINIMUM_STACK_SIZE * 2,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_create of TA1" );
-
- status = rtems_task_create(
- Task_name[ 2 ],
- 4,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 2 ]
- );
- directive_failed( status, "rtems_task_create of TA2" );
-
- status = rtems_task_start( Task_id[ 1 ], Task_1, 0 );
- directive_failed( status, "rtems_task_start of TA1" );
-
- status = rtems_task_start( Task_id[ 2 ], Task_2, 0 );
- directive_failed( status, "rtems_task_start of TA2" );
-
- Timer_name[ 1 ] = rtems_build_name( 'T', 'M', '1', ' ' );
-
- status = rtems_timer_create( Timer_name[ 1 ], &Timer_id[ 1 ] );
- directive_failed( status, "rtems_timer_create of TM1" );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
diff --git a/testsuites/sptests/sp14/sp14.doc b/testsuites/sptests/sp14/sp14.doc
deleted file mode 100644
index 7bf040ca03..0000000000
--- a/testsuites/sptests/sp14/sp14.doc
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: test14
-
-directives:
- ex_init, ex_start, t_create, t_start, t_delete, tm_tick, i_return,
- as_catch, as_return, as_send, tm_wkafter
-
-concepts:
-
- a. This test checks out the signal manager.
diff --git a/testsuites/sptests/sp14/sp14.scn b/testsuites/sptests/sp14/sp14.scn
deleted file mode 100644
index 31e6d067d2..0000000000
--- a/testsuites/sptests/sp14/sp14.scn
+++ /dev/null
@@ -1,33 +0,0 @@
-*** TEST 14 ***
-TA1 - rtems_signal_catch - RTEMS_INTERRUPT_LEVEL( 3 )
-TA1 - rtems_signal_send - RTEMS_SIGNAL_16 to self
-ASR - ENTRY - signal => 00010000
-ASR - EXIT - signal => 00010000
-TA1 - rtems_signal_send - RTEMS_SIGNAL_0 to self
-ASR - ENTRY - signal => 00000001
-ASR - rtems_task_wake_after - yield processor
-TA2 - rtems_signal_send - RTEMS_SIGNAL_17 to TA1
-TA2 - rtems_task_wake_after - yield processor
-ASR - ENTRY - signal => 00020000
-ASR - EXIT - signal => 00020000
-ASR - EXIT - signal => 00000001
-TA1 - rtems_signal_catch - RTEMS_NO_ASR
-<pause>
-TA1 - rtems_signal_send - RTEMS_SIGNAL_1 to self
-ASR - ENTRY - signal => 00000002
-ASR - rtems_task_wake_after - yield processor
-TA2 - rtems_signal_send - RTEMS_SIGNAL_18 and RTEMS_SIGNAL_19 to TA1
-TA2 - rtems_task_wake_after - yield processor
-ASR - EXIT - signal => 00000002
-ASR - ENTRY - signal => 000c0000
-ASR - EXIT - signal => 000c0000
-TA1 - rtems_task_mode - disable ASRs
-TA1 - sending signal to RTEMS_SELF from timer
-TA1 - waiting for signal to arrive
-TA1 - timer routine got the correct arguments
-TA1 - rtems_task_mode - enable ASRs
-ASR - ENTRY - signal => 00000008
-ASR - EXIT - signal => 00000008
-TA1 - rtems_signal_catch - asraddr of NULL
-TA1 - rtems_task_delete - delete self
-*** END OF TEST 14 ***
diff --git a/testsuites/sptests/sp14/system.h b/testsuites/sptests/sp14/system.h
deleted file mode 100644
index 48de462729..0000000000
--- a/testsuites/sptests/sp14/system.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_timer_service_routine Signal_3_to_task_1(
- rtems_id id,
- void *pointer
-);
-
-rtems_asr Process_asr(
- rtems_signal_set the_signal_set
-);
-
-rtems_task Task_1(
- rtems_task_argument argument
-);
-
-rtems_task Task_2(
- rtems_task_argument argument
-);
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MAXIMUM_TIMERS 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 100
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#define CONFIGURE_EXTRA_TASK_STACKS (1 * RTEMS_MINIMUM_STACK_SIZE)
-
-#include <confdefs.h>
-
-/* global variables */
-
-TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
-
-TEST_EXTERN rtems_id Timer_id[ 3 ]; /* array of timer ids */
-TEST_EXTERN rtems_name Timer_name[ 3 ]; /* array of timer names */
-
-TEST_EXTERN volatile rtems_unsigned32 Signals_sent;
- /* set to TRUE to indicate that a */
- /* signal set has been sent from */
- /* an ISR to the executing task */
-
-TEST_EXTERN volatile rtems_unsigned32 Asr_fired;
- /* set to TRUE to indicate that the */
- /* RTEMS_ASR has executed and was */
- /* passed the correct signal set */
-
-TEST_EXTERN volatile rtems_id Timer_got_this_id;
-
-TEST_EXTERN volatile void *Timer_got_this_pointer;
-
-/* end of include file */
diff --git a/testsuites/sptests/sp14/task1.c b/testsuites/sptests/sp14/task1.c
deleted file mode 100644
index 23ab0a84b7..0000000000
--- a/testsuites/sptests/sp14/task1.c
+++ /dev/null
@@ -1,115 +0,0 @@
-/* Task_1
- *
- * This routine serves as a test task. It establishes an RTEMS_ASR and
- * sends signal to itself to determine if the RTEMS_ASR gets to execute.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_timer_service_routine Signal_3_to_task_1(
- rtems_id id,
- void *pointer
-)
-{
- rtems_status_code status;
-
- status = rtems_signal_send( Task_id[ 1 ], RTEMS_SIGNAL_3 );
- directive_failed_with_level( status, "rtems_signal_send of 3", 1 );
-
- Timer_got_this_id = id;
- Timer_got_this_pointer = pointer;
-
- Signals_sent = TRUE;
-}
-
-rtems_task Task_1(
- rtems_task_argument argument
-)
-{
- rtems_mode previous_mode;
- rtems_status_code status;
-
- puts( "TA1 - rtems_signal_catch - RTEMS_INTERRUPT_LEVEL( 3 )" );
- status = rtems_signal_catch( Process_asr, RTEMS_INTERRUPT_LEVEL(3) );
- directive_failed( status, "rtems_signal_catch" );
-
- puts( "TA1 - rtems_signal_send - RTEMS_SIGNAL_16 to self" );
- status = rtems_signal_send( RTEMS_SELF, RTEMS_SIGNAL_16 );
- directive_failed( status, "rtems_signal_send" );
-
- puts( "TA1 - rtems_signal_send - RTEMS_SIGNAL_0 to self" );
- status = rtems_signal_send( RTEMS_SELF, RTEMS_SIGNAL_0 );
- directive_failed( status, "rtems_signal_send" );
-
- puts( "TA1 - rtems_signal_catch - RTEMS_NO_ASR" );
- status = rtems_signal_catch( Process_asr, RTEMS_NO_ASR );
- directive_failed( status, "rtems_signal_catch" );
-
-rtems_test_pause();
-
- puts( "TA1 - rtems_signal_send - RTEMS_SIGNAL_1 to self" );
- status = rtems_signal_send( RTEMS_SELF, RTEMS_SIGNAL_1 );
- directive_failed( status, "rtems_signal_send" );
-
- puts( "TA1 - rtems_task_mode - disable ASRs" );
- status = rtems_task_mode( RTEMS_NO_ASR, RTEMS_ASR_MASK, &previous_mode );
- directive_failed( status, "rtems_task_mode" );
-
- Timer_got_this_id = 0;
- Timer_got_this_pointer = NULL;
-
- puts( "TA1 - sending signal to RTEMS_SELF from timer" );
- status = rtems_timer_fire_after(
- Timer_id[ 1 ],
- TICKS_PER_SECOND / 2,
- Signal_3_to_task_1,
- (void *) Task_1
- );
- directive_failed( status, "rtems_timer_fire_after" );
-
- puts( "TA1 - waiting for signal to arrive" );
-
- Signals_sent = FALSE;
- Asr_fired = FALSE;
-
- while ( Signals_sent == FALSE )
- ;
-
- if ( Timer_got_this_id == Timer_id[ 1 ] &&
- Timer_got_this_pointer == Task_1 )
- puts( "TA1 - timer routine got the correct arguments" );
- else
- printf(
- "TA1 - timer got (0x%x, %p) instead of (0x%x, %p)!!!!\n",
- Timer_got_this_id,
- Timer_got_this_pointer,
- Timer_id[ 1 ],
- Task_1
- );
-
- puts( "TA1 - rtems_task_mode - enable ASRs" );
- status = rtems_task_mode( RTEMS_ASR, RTEMS_ASR_MASK, &previous_mode );
- directive_failed( status, "rtems_task_mode" );
-
- puts( "TA1 - rtems_signal_catch - asraddr of NULL" );
- status = rtems_signal_catch( NULL, RTEMS_DEFAULT_MODES );
- directive_failed( status, "rtems_signal_catch" );
-
- puts( "TA1 - rtems_task_delete - delete self" );
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
diff --git a/testsuites/sptests/sp14/task2.c b/testsuites/sptests/sp14/task2.c
deleted file mode 100644
index 4abf718dd6..0000000000
--- a/testsuites/sptests/sp14/task2.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* Task_2
- *
- * This routine serves as a test task. It verifies that one task can
- * send signals to another task ( invoking the other task's RTEMS_ASR ).
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task_2(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- puts( "TA2 - rtems_signal_send - RTEMS_SIGNAL_17 to TA1" );
- status = rtems_signal_send( Task_id[ 1 ], RTEMS_SIGNAL_17 );
- directive_failed( status, "rtems_signal_send" );
-
- puts( "TA2 - rtems_task_wake_after - yield processor" );
- status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
- directive_failed( status, "rtems_task_wake_after" );
-
- puts("TA2 - rtems_signal_send - RTEMS_SIGNAL_18 and RTEMS_SIGNAL_19 to TA1");
- status = rtems_signal_send( Task_id[ 1 ], RTEMS_SIGNAL_18 | RTEMS_SIGNAL_19 );
- directive_failed( status, "rtems_signal_send" );
-
- puts( "TA2 - rtems_task_wake_after - yield processor" );
- status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
- directive_failed( status, "rtems_task_wake_after" );
-
- puts( "*** END OF TEST 14 ***" );
- exit( 0 );
-}
diff --git a/testsuites/sptests/sp15/Makefile.am b/testsuites/sptests/sp15/Makefile.am
deleted file mode 100644
index 453aad182f..0000000000
--- a/testsuites/sptests/sp15/Makefile.am
+++ /dev/null
@@ -1,38 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-TEST = sp15
-
-MANAGERS = io partition
-
-C_FILES = init.c task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = scn doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/sptests.am
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/sptests/sp15/init.c b/testsuites/sptests/sp15/init.c
deleted file mode 100644
index 747646fb37..0000000000
--- a/testsuites/sptests/sp15/init.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is a user initialization task and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- puts( "\n\n*** TEST 15 ***" );
-
- Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
-
- Partition_name[ 1 ] = rtems_build_name( 'P', 'T', '1', ' ' );
- Partition_name[ 2 ] = rtems_build_name( 'P', 'T', '2', ' ' );
-
- status = rtems_task_create(
- Task_name[ 1 ],
- 4,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_create of TA1" );
-
- status = rtems_task_start( Task_id[ 1 ], Task_1, 0 );
- directive_failed( status, "rtems_task_start of TA1" );
-
- puts("INIT - rtems_partition_create - partition 1");
- status = rtems_partition_create(
- Partition_name[ 1 ],
- Area_1,
- 4096,
- 512,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Partition_id[ 1 ]
- );
- directive_failed( status, "rtems_partition_create of PT1" );
-
- puts("INIT - rtems_partition_create - partition 2");
- status = rtems_partition_create(
- Partition_name[ 2 ],
- Area_2,
- 274,
- 128,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Partition_id[ 2 ]
- );
- directive_failed( status, "rtems_partition_create of PT2" );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
diff --git a/testsuites/sptests/sp15/sp15.doc b/testsuites/sptests/sp15/sp15.doc
deleted file mode 100644
index dd8f7d6a37..0000000000
--- a/testsuites/sptests/sp15/sp15.doc
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: test15
-
-directives:
- ex_init, ex_start, t_create, t_start, t_delete, tm_tick, i_return,
- pt_create, pt_ident, pt_getbuf, pt_retbuf, pt_delete
-
-concepts:
-
- a. This test checks out the partition manager.
diff --git a/testsuites/sptests/sp15/sp15.scn b/testsuites/sptests/sp15/sp15.scn
deleted file mode 100644
index 95480fa89f..0000000000
--- a/testsuites/sptests/sp15/sp15.scn
+++ /dev/null
@@ -1,16 +0,0 @@
-*** TEST 15 ***
-INIT - rtems_partition_create - partition 1
-INIT - rtems_partition_create - partition 2
-TA1 - rtems_partition_ident - partition 1 id = 20010001
-TA1 - rtems_partition_ident - partition 2 id = 20010002
-TA1 - rtems_partition_get_buffer - buffer 1 from partition 1 - 0x00000000
-TA1 - rtems_partition_get_buffer - buffer 2 from partition 1 - 0x00000200
-TA1 - rtems_partition_get_buffer - buffer 1 from partition 2 - 0x00000000
-TA1 - rtems_partition_get_buffer - buffer 2 from partition 2 - 0x00000080
-TA1 - rtems_partition_return_buffer - buffer 1 to partition 1 - 0x00000000
-TA1 - rtems_partition_return_buffer - buffer 2 to partition 1 - 0x00000200
-TA1 - rtems_partition_return_buffer - buffer 1 to partition 2 - 0x00000000
-TA1 - rtems_partition_return_buffer - buffer 2 to partition 2 - 0x00000080
-TA1 - rtems_partition_delete - delete partition 1
-TA1 - rtems_partition_delete - delete partition 2
-*** END OF TEST 15 ***
diff --git a/testsuites/sptests/sp15/system.h b/testsuites/sptests/sp15/system.h
deleted file mode 100644
index f69ce5eb4c..0000000000
--- a/testsuites/sptests/sp15/system.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_task Task_1(
- rtems_task_argument argument
-);
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MAXIMUM_PARTITIONS 2
-#define CONFIGURE_TICKS_PER_TIMESLICE 100
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* global variables */
-
-TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
-
-TEST_EXTERN rtems_name Partition_id[ 4 ]; /* array of partition ids */
-TEST_EXTERN rtems_name Partition_name[ 4 ]; /* array of partition names */
-
-TEST_EXTERN rtems_unsigned8 Area_1[4096] CPU_STRUCTURE_ALIGNMENT;
-TEST_EXTERN rtems_unsigned8 Area_2[274] CPU_STRUCTURE_ALIGNMENT;
-
-#define Put_address_from_area_1( _to_be_printed ) \
- printf( "0x%08lx", \
- (unsigned long)((rtems_unsigned8 *)(_to_be_printed) - Area_1 ) )
-
-#define Put_address_from_area_2( _to_be_printed ) \
- printf( "0x%08lx", \
- (unsigned long)((rtems_unsigned8 *)(_to_be_printed) - Area_2 ) )
-
-/* end of include file */
diff --git a/testsuites/sptests/sp15/task1.c b/testsuites/sptests/sp15/task1.c
deleted file mode 100644
index 5d8a1b82dc..0000000000
--- a/testsuites/sptests/sp15/task1.c
+++ /dev/null
@@ -1,128 +0,0 @@
-/* Task_1
- *
- * This routine serves as a test task. It tests the partition manager.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task_1(
- rtems_task_argument argument
-)
-{
- rtems_id ptid_1;
- rtems_id ptid_2;
- void *buffer_address_1;
- void *buffer_address_2;
- void *buffer_address_3;
- void *buffer_address_4;
- rtems_status_code status;
-
- puts_nocr( "TA1 - rtems_partition_ident - partition 1 id = " );
- status = rtems_partition_ident(
- Partition_name[ 1 ],
- RTEMS_SEARCH_ALL_NODES,
- &ptid_1
- );
- directive_failed( status, "rtems_partition_ident of PT1" );
- printf( "%08x\n", ptid_1 );
-
- puts_nocr( "TA1 - rtems_partition_ident - partition 2 id = " );
- status = rtems_partition_ident(
- Partition_name[ 2 ],
- RTEMS_SEARCH_ALL_NODES,
- &ptid_2
- );
- directive_failed( status, "rtems_partition_ident of PT2" );
- printf( "%08x\n", ptid_2 );
-
- puts_nocr(
- "TA1 - rtems_partition_get_buffer - buffer 1 from partition 1 - "
- );
- status = rtems_partition_get_buffer( ptid_1, &buffer_address_1 );
- directive_failed( status, "rtems_partition_get_buffer" );
- Put_address_from_area_1( buffer_address_1 );
- new_line;
-
- puts_nocr(
- "TA1 - rtems_partition_get_buffer - buffer 2 from partition 1 - "
- );
- status = rtems_partition_get_buffer( ptid_1, &buffer_address_2 );
- directive_failed( status, "rtems_partition_get_buffer" );
- Put_address_from_area_1( buffer_address_2 );
- new_line;
-
- puts_nocr(
- "TA1 - rtems_partition_get_buffer - buffer 1 from partition 2 - "
- );
- status = rtems_partition_get_buffer( ptid_2, &buffer_address_3 );
- directive_failed( status, "rtems_partition_get_buffer" );
- Put_address_from_area_2( buffer_address_3 );
- new_line;
-
- puts_nocr(
- "TA1 - rtems_partition_get_buffer - buffer 2 from partition 2 - "
- );
- status = rtems_partition_get_buffer( ptid_2, &buffer_address_4 );
- directive_failed( status, "rtems_partition_get_buffer" );
- Put_address_from_area_2( buffer_address_4 );
- new_line;
-
- puts_nocr(
- "TA1 - rtems_partition_return_buffer - buffer 1 to partition 1 - "
- );
- Put_address_from_area_1( buffer_address_1 );
- new_line;
- status = rtems_partition_return_buffer( ptid_1, buffer_address_1 );
- directive_failed( status, "rtems_partition_return_buffer" );
-
- puts_nocr(
- "TA1 - rtems_partition_return_buffer - buffer 2 to partition 1 - "
- );
- Put_address_from_area_1( buffer_address_2 );
- new_line;
- status = rtems_partition_return_buffer( ptid_1, buffer_address_2 );
- directive_failed( status, "rtems_partition_return_buffer" );
-
- puts_nocr(
- "TA1 - rtems_partition_return_buffer - buffer 1 to partition 2 - "
- );
- Put_address_from_area_2( buffer_address_3 );
- new_line;
- status = rtems_partition_return_buffer( ptid_2, buffer_address_3 );
- directive_failed( status, "rtems_partition_return_buffer" );
-
- puts_nocr(
- "TA1 - rtems_partition_return_buffer - buffer 2 to partition 2 - "
- );
- Put_address_from_area_2( buffer_address_4 );
- new_line;
- status = rtems_partition_return_buffer( ptid_2, buffer_address_4 );
- directive_failed( status, "rtems_partition_return_buffer" );
-
- puts( "TA1 - rtems_partition_delete - delete partition 1"
- );
- status = rtems_partition_delete( ptid_1 );
- directive_failed( status, "rtems_partition_delete" );
-
- puts( "TA1 - rtems_partition_delete - delete partition 2"
- );
- status = rtems_partition_delete( ptid_2 );
- directive_failed( status, "rtems_partition_delete" );
-
- puts( "*** END OF TEST 15 ***" );
- exit( 0 );
-}
diff --git a/testsuites/sptests/sp16/Makefile.am b/testsuites/sptests/sp16/Makefile.am
deleted file mode 100644
index 87f9279f15..0000000000
--- a/testsuites/sptests/sp16/Makefile.am
+++ /dev/null
@@ -1,38 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-TEST = sp16
-
-MANAGERS = io region
-
-C_FILES = init.c task1.c task2.c task3.c task4.c task5.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = scn doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/sptests.am
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/sptests/sp16/init.c b/testsuites/sptests/sp16/init.c
deleted file mode 100644
index c78eca4b24..0000000000
--- a/testsuites/sptests/sp16/init.c
+++ /dev/null
@@ -1,127 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is a user initialization task and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- puts( "\n\n*** TEST 16 ***" );
-
- Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
- Task_name[ 2 ] = rtems_build_name( 'T', 'A', '2', ' ' );
- Task_name[ 3 ] = rtems_build_name( 'T', 'A', '3', ' ' );
- Task_name[ 4 ] = rtems_build_name( 'T', 'A', '4', ' ' );
- Task_name[ 5 ] = rtems_build_name( 'T', 'A', '5', ' ' );
-
- status = rtems_task_create(
- Task_name[ 1 ],
- BASE_PRIORITY,
- RTEMS_MINIMUM_STACK_SIZE * 2,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_create of TA1" );
-
- status = rtems_task_create(
- Task_name[ 2 ],
- BASE_PRIORITY,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 2 ]
- );
- directive_failed( status, "rtems_task_create of TA2" );
-
- status = rtems_task_create(
- Task_name[ 3 ],
- BASE_PRIORITY,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 3 ]
- );
- directive_failed( status, "rtems_task_create of TA3" );
-
- status = rtems_task_start( Task_id[ 1 ], Task_1, 0 );
- directive_failed( status, "rtems_task_start of TA1" );
-
- status = rtems_task_start( Task_id[ 2 ], Task_2, 0 );
- directive_failed( status, "rtems_task_start of TA2" );
-
- status = rtems_task_start( Task_id[ 3 ], Task_3, 0 );
- directive_failed( status, "rtems_task_start of TA3" );
-
- Region_name[ 1 ] = rtems_build_name( 'R', 'N', '1', ' ' );
- Region_name[ 2 ] = rtems_build_name( 'R', 'N', '2', ' ' );
- Region_name[ 3 ] = rtems_build_name( 'R', 'N', '3', ' ' );
- Region_name[ 4 ] = rtems_build_name( 'R', 'N', '4', ' ' );
-
- status = rtems_region_create(
- Region_name[ 1 ],
- Area_1,
- 4096,
- 128,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Region_id[ 1 ]
- );
- directive_failed( status, "rtems_region_create of RN1" );
-
- status = rtems_region_create(
- Region_name[ 2 ],
- Area_2,
- 4096,
- 128,
- RTEMS_PRIORITY,
- &Region_id[ 2 ]
- );
- directive_failed( status, "rtems_region_create of RN2" );
-
- status = rtems_region_create(
- Region_name[ 3 ],
- Area_3,
- 4096,
- 128,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Region_id[ 3 ]
- );
- directive_failed( status, "rtems_region_create of RN3" );
-
- status = rtems_region_create(
- Region_name[ 4 ],
- Area_4,
- 4096,
- 128,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Region_id[ 4 ]
- );
- directive_failed( status, "rtems_region_create of RN4" );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
diff --git a/testsuites/sptests/sp16/sp16.doc b/testsuites/sptests/sp16/sp16.doc
deleted file mode 100644
index d93abe33c4..0000000000
--- a/testsuites/sptests/sp16/sp16.doc
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: test16
-
-directives:
- ex_init, ex_start, t_create, t_start, t_delete, tm_tick, i_return,
- rn_create, rn_ident, rn_getbuf, rn_retbuf, rn_delete
-
-concepts:
-
- a. This test checks out the region manager.
diff --git a/testsuites/sptests/sp16/sp16.scn b/testsuites/sptests/sp16/sp16.scn
deleted file mode 100644
index 660e9fe352..0000000000
--- a/testsuites/sptests/sp16/sp16.scn
+++ /dev/null
@@ -1,58 +0,0 @@
-*** TEST 16 ***
-TA1 - rtems_region_ident - rnid => 24010002
-TA1 - rtems_region_get_segment - wait on 100 byte segment from region 2
-TA1 - got segment from region 2 - 0x00000f78
-TA1 - rtems_region_get_segment - wait on 3K segment from region 3
-TA1 - got segment from region 3 - 0x000003f8
-TA1 - rtems_region_get_segment - get 3080 byte segment from region 1 - NO_WAIT
-TA1 - got segment from region 1 - 0x00000378
-TA1 - rtems_task_wake_after - yield processor
-TA2 - rtems_region_get_segment - wait on 2K segment from region 1
-TA3 - rtems_region_get_segment - wait on 3968 byte segment from region 2
-<pause>
-TA1 - rtems_region_return_segment - return segment to region 1 - 0x00000378
-TA1 - rtems_region_get_segment - wait 10 seconds for 3K segment from region 1
-TA2 - got segment from region 1 - 0x000007f8
-TA2 - rtems_region_return_segment - return segment to region 1 - 0x000007f8
-TA2 - rtems_task_set_priority - make self highest priority task
-TA2 - rtems_region_get_segment - wait on 3968 byte segment
-TA1 - got segment from region 1 - 0x000003f8
-TA1 - rtems_region_return_segment - return segment to region 2 - 0x00000f78
-TA2 - got segment from region 2 - 0x00000008
-TA2 - rtems_region_return_segment - return segment to region 2 - 0x00000008
-TA2 - rtems_task_delete - delete self
-TA1 - rtems_task_wake_after - yield processor
-TA3 - got segment from region 2 - 0x00000008
-TA3 - rtems_region_get_segment - wait on 2K segment from region 3
-TA1 - rtems_task_delete - delete TA3
-<pause>
-TA1 - rtems_task_wake_after - yield processor
-TA4 - rtems_region_get_segment - wait on 1.5K segment from region 1
-TA5 - rtems_region_get_segment - wait on 1.5K segment from region 1
-TA1 - rtems_region_return_segment - return segment to region 1 - 0x000003f8
-TA1 - rtems_task_wake_after - yield processor
-TA4 - got and returned 0x000009f8
-TA5 - got and returned 0x000003f0
-TA1 - rtems_region_get_segment - wait 10 seconds for 3K segment from region 1
-TA1 - got segment from region 1 - 0x000003f8
-TA1 - rtems_task_wake_after - yield processor
-TA4 - rtems_region_get_segment - wait on 3K segment from region 1
-TA5 - rtems_region_get_segment - wait on 3K segment from region 1
-TA1 - rtems_task_delete - delete TA4
-TA1 - rtems_region_return_segment - return segment to region 1 - 0x000003f8
-TA1 - rtems_task_wake_after - yield processor
-TA5 - got segment from region 1 - 0x000003f8
-TA5 - rtems_region_return_segment - return segment to region 1 - 0x000003f8
-TA5 - rtems_task_delete - delete self
-TA1 - rtems_region_delete - delete region 1
-TA1 - rtems_region_get_segment - get 3K segment from region 4
-TA1 - got segment from region 4 - 0x000003f8
-TA1 - rtems_region_get_segment - attempt to get 3K segment from region 4
-TA1 - rtems_task_get_note - RTEMS_UNSATISFIED
-TA1 - rtems_region_extend - extend region 4 by 4K
-TA1 - rtems_region_get_segment - attempt to get 3K segment from region 4
-TA1 - got 3K segment from region 4 - 0x00001400
-TA1 - rtems_region_return_segment - return segment to region 4 - 0x000003f8
-TA1 - rtems_region_return_segment - return segment to region 4 - 0x00001400
-TA1 - rtems_region_delete - delete region 4
-*** END OF TEST 16 ***
diff --git a/testsuites/sptests/sp16/system.h b/testsuites/sptests/sp16/system.h
deleted file mode 100644
index d3a3922382..0000000000
--- a/testsuites/sptests/sp16/system.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_task Task_1(
- rtems_task_argument argument
-);
-
-rtems_task Task_2(
- rtems_task_argument argument
-);
-
-rtems_task Task_3(
- rtems_task_argument argument
-);
-
-rtems_task Task_4(
- rtems_task_argument argument
-);
-
-rtems_task Task5(
- rtems_task_argument argument
-);
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MAXIMUM_REGIONS 4
-#define CONFIGURE_TICKS_PER_TIMESLICE 100
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#define CONFIGURE_EXTRA_TASK_STACKS (1 * RTEMS_MINIMUM_STACK_SIZE)
-
-#include <confdefs.h>
-
-/* global variables */
-
-TEST_EXTERN rtems_id Task_id[ 6 ]; /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 6 ]; /* array of task names */
-TEST_EXTERN rtems_id Region_id[ 5 ]; /* array of region ids */
-TEST_EXTERN rtems_name Region_name[ 5 ]; /* array of region names */
-
-TEST_EXTERN rtems_unsigned8 Area_1[4096] CPU_STRUCTURE_ALIGNMENT;
-TEST_EXTERN rtems_unsigned8 Area_2[4096] CPU_STRUCTURE_ALIGNMENT;
-TEST_EXTERN rtems_unsigned8 Area_3[4096] CPU_STRUCTURE_ALIGNMENT;
-TEST_EXTERN rtems_unsigned8 Area_4[8192] CPU_STRUCTURE_ALIGNMENT;
-
-#define BASE_PRIORITY 140
-
-#define Put_address_from_area_1( _to_be_printed ) \
- printf( "0x%08lx", \
- (unsigned long) ((rtems_unsigned8 *)(_to_be_printed) - Area_1 ) )
-
-#define Put_address_from_area_2( _to_be_printed ) \
- printf( "0x%08lx", \
- (unsigned long) ((rtems_unsigned8 *)(_to_be_printed) - Area_2 ) )
-
-#define Put_address_from_area_3( _to_be_printed ) \
- printf( "0x%08lx", \
- (unsigned long) ((rtems_unsigned8 *)(_to_be_printed) - Area_3 ) )
-
-#define Put_address_from_area_4( _to_be_printed ) \
- printf( "0x%08lx", \
- (unsigned long) ((rtems_unsigned8 *)(_to_be_printed) - Area_4 ) )
-
-/* end of include file */
diff --git a/testsuites/sptests/sp16/task1.c b/testsuites/sptests/sp16/task1.c
deleted file mode 100644
index 3891610f38..0000000000
--- a/testsuites/sptests/sp16/task1.c
+++ /dev/null
@@ -1,281 +0,0 @@
-/* Task_1
- *
- * This routine serves as a test task. It tests the region manager.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task_1(
- rtems_task_argument argument
-)
-{
- rtems_id rnid;
- void *segment_address_1;
- void *segment_address_2;
- void *segment_address_3;
- void *segment_address_4;
- rtems_status_code status;
-
- status = rtems_region_ident( Region_name[ 1 ], &rnid );
- printf( "TA1 - rtems_region_ident - rnid => %08x\n", rnid );
- directive_failed( status, "rtems_region_ident of RN1" );
-
- puts(
- "TA1 - rtems_region_get_segment - wait on 100 byte segment from region 2"
- );
- status = rtems_region_get_segment(
- Region_id[ 2 ],
- 100,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT,
- &segment_address_1
- );
- directive_failed( status, "rtems_region_get_segment" );
- puts_nocr( "TA1 - got segment from region 2 - " );
- Put_address_from_area_2( segment_address_1 );
- new_line;
-
- puts( "TA1 - rtems_region_get_segment - wait on 3K segment from region 3" );
- status = rtems_region_get_segment(
- Region_id[ 3 ],
- 3072,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT,
- &segment_address_2
- );
- directive_failed( status, "rtems_region_get_segment" );
- puts_nocr( "TA1 - got segment from region 3 - " );
- Put_address_from_area_3( segment_address_2 );
- new_line;
-
- puts_nocr( "TA1 - rtems_region_get_segment - get 3080 byte segment " );
- puts ( "from region 1 - NO_WAIT" );
- status = rtems_region_get_segment(
- Region_id[ 1 ],
- 3080,
- RTEMS_NO_WAIT,
- RTEMS_NO_TIMEOUT,
- &segment_address_3
- );
- directive_failed( status, "rtems_region_get_segment" );
- puts_nocr( "TA1 - got segment from region 1 - " );
- Put_address_from_area_1( segment_address_3 );
- new_line;
-
- puts( "TA1 - rtems_task_wake_after - yield processor" );
- status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
- directive_failed( status, "rtems_task_wake_after" );
-
-rtems_test_pause();
-
- puts_nocr(
- "TA1 - rtems_region_return_segment - return segment to region 1 - "
- );
- Put_address_from_area_1( segment_address_3 );
- status = rtems_region_return_segment( Region_id[ 1 ], segment_address_3 );
- directive_failed( status, "rtems_region_return_segment" );
- new_line;
-
- puts(
- "TA1 - rtems_region_get_segment - wait 10 seconds for 3K "
- "segment from region 1"
- );
- status = rtems_region_get_segment(
- Region_id[ 1 ],
- 3072,
- RTEMS_DEFAULT_OPTIONS,
- 10 * TICKS_PER_SECOND,
- &segment_address_4
- );
- directive_failed( status, "rtems_region_get_segment" );
- puts_nocr( "TA1 - got segment from region 1 - " );
- Put_address_from_area_1( segment_address_4 );
- new_line;
-
- puts_nocr(
- "TA1 - rtems_region_return_segment - return segment to region 2 - "
- );
- Put_address_from_area_2( segment_address_1 );
- new_line;
- status = rtems_region_return_segment( Region_id[ 2 ], segment_address_1 );
- directive_failed( status, "rtems_region_return_segment" );
-
- puts( "TA1 - rtems_task_wake_after - yield processor" );
- status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
- directive_failed( status, "rtems_task_wake_after" );
-
- puts( "TA1 - rtems_task_delete - delete TA3" );
- status = rtems_task_delete( Task_id[ 3 ] );
- directive_failed( status, "rtems_task_delete of TA3" );
-
-rtems_test_pause();
-
- status = rtems_task_create(
- Task_name[ 4 ],
- BASE_PRIORITY,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 4 ]
- );
- directive_failed( status, "rtems_task_create of TA4" );
-
- status = rtems_task_create(
- Task_name[ 5 ],
- BASE_PRIORITY,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 5 ]
- );
- directive_failed( status, "rtems_task_create of TA5" );
-
- status = rtems_task_start( Task_id[ 4 ], Task_4, 0 );
- directive_failed( status, "rtems_task_start of TA4" );
-
- status = rtems_task_start( Task_id[ 5 ], Task5, 0 );
- directive_failed( status, "rtems_task_start of TA5" );
-
- puts( "TA1 - rtems_task_wake_after - yield processor" );
- status = rtems_task_wake_after( 1 * TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
-
- puts_nocr(
- "TA1 - rtems_region_return_segment - return segment to region 1 - "
- );
- Put_address_from_area_1( segment_address_4 );
- status = rtems_region_return_segment( Region_id[ 1 ], segment_address_4 );
- directive_failed( status, "rtems_region_return_segment" );
- new_line;
-
- puts( "TA1 - rtems_task_wake_after - yield processor" );
- status = rtems_task_wake_after( 1 * TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
-
- puts_nocr( "TA1 - rtems_region_get_segment - wait 10 seconds for 3K " );
- puts ( "segment from region 1");
- status = rtems_region_get_segment(
- Region_id[ 1 ],
- 3072,
- RTEMS_DEFAULT_OPTIONS,
- 10 * TICKS_PER_SECOND,
- &segment_address_4
- );
- directive_failed( status, "rtems_region_get_segment" );
- puts_nocr( "TA1 - got segment from region 1 - " );
- Put_address_from_area_1( segment_address_4 );
- new_line;
-
- puts( "TA1 - rtems_task_wake_after - yield processor" );
- status = rtems_task_wake_after( 1 * TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
-
- puts( "TA1 - rtems_task_delete - delete TA4" );
- status = rtems_task_delete( Task_id[ 4 ] );
- directive_failed( status, "rtems_task_delete of TA4" );
-
- puts_nocr(
- "TA1 - rtems_region_return_segment - return segment to region 1 - "
- );
- Put_address_from_area_1( segment_address_4 );
- status = rtems_region_return_segment( Region_id[ 1 ], segment_address_4 );
- directive_failed( status, "rtems_region_return_segment" );
- new_line;
-
- puts( "TA1 - rtems_task_wake_after - yield processor" );
- status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
-
- puts( "TA1 - rtems_region_delete - delete region 1" );
- status = rtems_region_delete( Region_id[ 1 ] );
- directive_failed( status, "rtems_region_delete" );
-
- puts( "TA1 - rtems_region_get_segment - get 3K segment from region 4" );
- status = rtems_region_get_segment(
- Region_id[ 4 ],
- 3072,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT,
- &segment_address_1
- );
- directive_failed( status, "rtems_region_get_segment" );
- puts_nocr( "TA1 - got segment from region 4 - " );
- Put_address_from_area_4( segment_address_1 );
- new_line;
-
- puts(
- "TA1 - rtems_region_get_segment - attempt to get 3K segment from region 4"
- );
- status = rtems_region_get_segment(
- Region_id[ 4 ],
- 3072,
- RTEMS_NO_WAIT,
- RTEMS_NO_TIMEOUT,
- &segment_address_2
- );
- fatal_directive_status(
- status,
- RTEMS_UNSATISFIED,
- "rtems_task_get_segment with no memory left"
- );
- puts( "TA1 - rtems_task_get_note - RTEMS_UNSATISFIED" );
-
- puts( "TA1 - rtems_region_extend - extend region 4 by 4K" );
- status = rtems_region_extend(
- Region_id[ 4 ],
- &Area_4[4096],
- 4096
- );
- directive_failed( status, "rtems_region_extend" );
-
- puts(
- "TA1 - rtems_region_get_segment - attempt to get 3K segment from region 4"
- );
- status = rtems_region_get_segment(
- Region_id[ 4 ],
- 3072,
- RTEMS_NO_WAIT,
- RTEMS_NO_TIMEOUT,
- &segment_address_3
- );
- directive_failed( status, "rtems_region_get_segment" );
- puts_nocr( "TA1 - got 3K segment from region 4 - " );
- Put_address_from_area_4( segment_address_3 );
- new_line;
-
- puts_nocr(
- "TA1 - rtems_region_return_segment - return segment to region 4 - "
- );
- Put_address_from_area_4( segment_address_1 );
- status = rtems_region_return_segment( Region_id[ 4 ], segment_address_1 );
- directive_failed( status, "rtems_region_return_segment" );
- new_line;
-
- puts_nocr(
- "TA1 - rtems_region_return_segment - return segment to region 4 - "
- );
- Put_address_from_area_4( segment_address_3 );
- status = rtems_region_return_segment( Region_id[ 4 ], segment_address_3 );
- directive_failed( status, "rtems_region_return_segment" );
- new_line;
-
- puts( "TA1 - rtems_region_delete - delete region 4" );
- status = rtems_region_delete( Region_id[ 4 ] );
- directive_failed( status, "rtems_region_delete" );
-
- puts( "*** END OF TEST 16 ***" );
- exit( 0 );
-}
diff --git a/testsuites/sptests/sp16/task2.c b/testsuites/sptests/sp16/task2.c
deleted file mode 100644
index 8bed4585e1..0000000000
--- a/testsuites/sptests/sp16/task2.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/* Task_2
- *
- * This routine serves as a test task. It competes with the other tasks
- * for region resources.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task_2(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
- rtems_task_priority previous_priority;
- void *segment_address_1;
- void *segment_address_2;
-
- puts( "TA2 - rtems_region_get_segment - wait on 2K segment from region 1" );
- status = rtems_region_get_segment(
- Region_id[ 1 ],
- 2048,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT,
- &segment_address_1
- );
- directive_failed( status, "rtems_region_get_segment" );
- puts_nocr( "TA2 - got segment from region 1 - " );
- Put_address_from_area_1( segment_address_1 );
- new_line;
-
- puts_nocr(
- "TA2 - rtems_region_return_segment - return segment to region 1 - "
- );
- Put_address_from_area_1( segment_address_1 );
- status = rtems_region_return_segment( Region_id[ 1 ], segment_address_1 );
- directive_failed( status, "rtems_region_return_segment" );
- new_line;
-
- puts( "TA2 - rtems_task_set_priority - make self highest priority task" );
- status = rtems_task_set_priority(
- RTEMS_SELF,
- BASE_PRIORITY-1,
- &previous_priority
- );
- directive_failed( status, "rtems_task_set_priority" );
-
- puts("TA2 - rtems_region_get_segment - wait on 3968 byte segment");
- status = rtems_region_get_segment(
- Region_id[ 2 ],
- 3968,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT,
- &segment_address_2
- );
- directive_failed( status, "rtems_region_get_segment" );
- puts_nocr( "TA2 - got segment from region 2 - ");
- Put_address_from_area_2( segment_address_2 );
- new_line;
-
- puts_nocr(
- "TA2 - rtems_region_return_segment - return segment to region 2 - "
- );
- Put_address_from_area_2( segment_address_2 );
- status = rtems_region_return_segment( Region_id[ 2 ], segment_address_2 );
- directive_failed( status, "rtems_region_return_segment" );
- new_line;
-
- puts( "TA2 - rtems_task_delete - delete self" );
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
diff --git a/testsuites/sptests/sp16/task3.c b/testsuites/sptests/sp16/task3.c
deleted file mode 100644
index 4b49b8e19d..0000000000
--- a/testsuites/sptests/sp16/task3.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/* Task_3
- *
- * This routine serves as a test task. It competes with the other tasks
- * for region resources.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task_3(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
- void *segment_address_1;
- void *segment_address_2;
-
- puts(
- "TA3 - rtems_region_get_segment - wait on 3968 byte segment from region 2"
- );
- status = rtems_region_get_segment(
- Region_id[ 2 ],
- 3968,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT,
- &segment_address_1
- );
- directive_failed( status, "rtems_region_get_segment" );
- puts_nocr( "TA3 - got segment from region 2 - " );
- Put_address_from_area_2( segment_address_1 );
- new_line;
- directive_failed( status, "rtems_region_return_segment" );
-
- puts( "TA3 - rtems_region_get_segment - wait on 2K segment from region 3" );
- status = rtems_region_get_segment(
- Region_id[ 3 ],
- 2048,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT,
- &segment_address_2
- );
- directive_failed( status, "rtems_region_get_segment" );
-}
diff --git a/testsuites/sptests/sp16/task4.c b/testsuites/sptests/sp16/task4.c
deleted file mode 100644
index ae0814b7eb..0000000000
--- a/testsuites/sptests/sp16/task4.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Task_4
- *
- * This routine serves as a test task. It competes with the other tasks
- * for region resources.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task_4(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
- void *segment_address_1;
- void *segment_address_2;
-
- puts( "TA4 - rtems_region_get_segment - wait on 1.5K segment from region 1" );
- status = rtems_region_get_segment(
- Region_id[ 1 ],
- 1536,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT,
- &segment_address_1
- );
- directive_failed( status, "rtems_region_get_segment" );
-
- status = rtems_region_return_segment( Region_id[ 1 ], segment_address_1 );
- directive_failed( status, "rtems_region_return_segment" );
- puts_nocr( "TA4 - got and returned " );
- Put_address_from_area_1( segment_address_1 );
- new_line;
-
- status = rtems_task_wake_after( TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
-
- puts( "TA4 - rtems_region_get_segment - wait on 3K segment from region 1" );
- status = rtems_region_get_segment(
- Region_id[ 1 ],
- 3072,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT,
- &segment_address_2
- );
- directive_failed( status, "rtems_region_get_segment" );
-}
diff --git a/testsuites/sptests/sp16/task5.c b/testsuites/sptests/sp16/task5.c
deleted file mode 100644
index 770dc0f081..0000000000
--- a/testsuites/sptests/sp16/task5.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/* Task5
- *
- * This routine serves as a test task. It competes with the other tasks
- * for region resources.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task5(
- rtems_task_argument argument
-)
-{
- void *segment_address_1;
- void *segment_address_2;
- rtems_status_code status;
-
- puts( "TA5 - rtems_region_get_segment - wait on 1.5K segment from region 1" );
- status = rtems_region_get_segment(
- Region_id[ 1 ],
- 1536,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT,
- &segment_address_1
- );
- directive_failed( status, "rtems_region_get_segment" );
-
- status = rtems_region_return_segment( Region_id[ 1 ], segment_address_1 );
- directive_failed( status, "rtems_region_return_segment" );
- puts_nocr( "TA5 - got and returned " );
- Put_address_from_area_1( segment_address_1 );
- new_line;
-
- status = rtems_task_wake_after( TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
-
- puts( "TA5 - rtems_region_get_segment - wait on 3K segment from region 1" );
- status = rtems_region_get_segment(
- Region_id[ 1 ],
- 3072,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT,
- &segment_address_2
- );
- puts_nocr( "TA5 - got segment from region 1 - " );
- Put_address_from_area_1( segment_address_2 );
- new_line;
-
- status = rtems_region_return_segment( Region_id[ 1 ], segment_address_2 );
- puts_nocr(
- "TA5 - rtems_region_return_segment - return segment to region 1 - "
- );
- Put_address_from_area_1( segment_address_2 );
- new_line;
-
- puts( "TA5 - rtems_task_delete - delete self" );
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
diff --git a/testsuites/sptests/sp17/Makefile.am b/testsuites/sptests/sp17/Makefile.am
deleted file mode 100644
index d9697ea5a6..0000000000
--- a/testsuites/sptests/sp17/Makefile.am
+++ /dev/null
@@ -1,38 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-TEST = sp17
-
-MANAGERS = io signal
-
-C_FILES = init.c asr.c task1.c task2.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = scn doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/sptests.am
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/sptests/sp17/asr.c b/testsuites/sptests/sp17/asr.c
deleted file mode 100644
index 4be76d76e0..0000000000
--- a/testsuites/sptests/sp17/asr.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Process_asr
- *
- * This routine performs the processing for task 1's RTEMS_ASR. It is called
- * by an assembly routine which saves the necessary registers.
- *
- * Input parameters:
- * signal - signal set
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_asr Process_asr(
- rtems_signal_set signal_set
-)
-{
- rtems_status_code status;
-
- status = rtems_task_resume( Task_id[ 2 ] );
- directive_failed( status, "RTEMS_ASR - rtems_task_resume of TA2" );
-}
diff --git a/testsuites/sptests/sp17/init.c b/testsuites/sptests/sp17/init.c
deleted file mode 100644
index 241070de02..0000000000
--- a/testsuites/sptests/sp17/init.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is a user initialization task and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- puts( "\n\n*** TEST 17 ***" );
-
- Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
- Task_name[ 2 ] = rtems_build_name( 'T', 'A', '2', ' ' );
-
- Task_2_preempted = FALSE;
-
- status = rtems_task_create(
- Task_name[ 1 ],
- 2,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_create of TA1" );
-
- status = rtems_task_start( Task_id[ 1 ], Task_1, 0 );
- directive_failed( status, "rtems_task_start of TA1" );
-
- status = rtems_task_create(
- Task_name[ 2 ],
- 1,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 2 ]
- );
- directive_failed( status, "rtems_task_create of TA2" );
-
- status = rtems_task_start( Task_id[ 2 ], Task_2, 0 );
- directive_failed( status, "rtems_task_start of TA2" );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
diff --git a/testsuites/sptests/sp17/sp17.doc b/testsuites/sptests/sp17/sp17.doc
deleted file mode 100644
index 2c4a79cb1a..0000000000
--- a/testsuites/sptests/sp17/sp17.doc
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: test17
-
-directives:
- ex_init, ex_start, t_create, t_start, tm_tick, i_return, t_ident,
- as_catch, as_return
-
-concepts:
-
- a. Verifies system can create and start both the executive's system
- initialization and idle task.
-
- b. Verifies can print strings to the CRT on port 2 of the mvme136 board
- using Print and Println in the board support package.
-
- c. Verifies executive initialization performed correctly.
-
- d. Verifies that a task can get the task identification number
- of another task.
-
- e. Verifies that a signal can be sent to a remote task.
diff --git a/testsuites/sptests/sp17/sp17.scn b/testsuites/sptests/sp17/sp17.scn
deleted file mode 100644
index 47fd140e2a..0000000000
--- a/testsuites/sptests/sp17/sp17.scn
+++ /dev/null
@@ -1,8 +0,0 @@
-*** TEST 17 ***
-TA2 - Suspending self
-TA1 - rtems_signal_catch: initializing signal catcher
-TA1 - Sending signal to self
-TA2 - signal_return preempted correctly
-TA1 - TA2 correctly preempted me
-TA1 - Got Back!!!
-*** END OF TEST 17 ***
diff --git a/testsuites/sptests/sp17/system.h b/testsuites/sptests/sp17/system.h
deleted file mode 100644
index e5f88b9fe2..0000000000
--- a/testsuites/sptests/sp17/system.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_asr Process_asr(
- rtems_signal_set signal_set
-);
-
-rtems_task Task_1(
- rtems_task_argument argument
-);
-
-rtems_task Task_2(
- rtems_task_argument argument
-);
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MICROSECONDS_PER_TICK RTEMS_MILLISECONDS_TO_MICROSECONDS(25)
-#define CONFIGURE_TICKS_PER_TIMESLICE 1000
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* global variables */
-
-TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
-
-TEST_EXTERN rtems_unsigned32 Task_2_preempted;
-
-/* end of include file */
diff --git a/testsuites/sptests/sp17/task1.c b/testsuites/sptests/sp17/task1.c
deleted file mode 100644
index dfcb5f0779..0000000000
--- a/testsuites/sptests/sp17/task1.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* Task_1
- *
- * This task initializes the signal catcher, sends the first signal
- * if running on the first node, and loops while waiting for signals.
- *
- * NOTE: The signal catcher is not reentrant and hence RTEMS_NO_ASR must
- * be a part of its execution mode.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task_1(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- puts( "TA1 - rtems_signal_catch: initializing signal catcher" );
- status = rtems_signal_catch( Process_asr, RTEMS_NO_ASR | RTEMS_NO_PREEMPT );
- directive_failed( status, "rtems_signal_catch" );
-
- puts( "TA1 - Sending signal to self" );
- status = rtems_signal_send( Task_id[ 1 ], RTEMS_SIGNAL_16 );
- directive_failed( status, "rtems_signal_send" );
-
- if ( Task_2_preempted == TRUE )
- puts( "TA1 - TA2 correctly preempted me" );
-
- puts("TA1 - Got Back!!!");
-
- puts( "*** END OF TEST 17 ***" );
- exit( 0 );
-}
diff --git a/testsuites/sptests/sp17/task2.c b/testsuites/sptests/sp17/task2.c
deleted file mode 100644
index 4935c57ba8..0000000000
--- a/testsuites/sptests/sp17/task2.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/* Task_2
- *
- * This task initializes the signal catcher, sends the first signal
- * if running on the first node, and loops while waiting for signals.
- *
- * NOTE: The signal catcher is not reentrant and hence RTEMS_NO_ASR must
- * be a part of its execution mode.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task_2(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- Task_2_preempted = FALSE;
-
- puts( "TA2 - Suspending self" );
- status = rtems_task_suspend( RTEMS_SELF );
- directive_failed( status, "rtems_task_suspend of TA2" );
-
- puts( "TA2 - signal_return preempted correctly" );
-
- Task_2_preempted = TRUE;
-
- status = rtems_task_suspend( RTEMS_SELF );
- directive_failed( status, "rtems_task_suspend of TA2" );
-}
diff --git a/testsuites/sptests/sp19/Makefile.am b/testsuites/sptests/sp19/Makefile.am
deleted file mode 100644
index 45c43db672..0000000000
--- a/testsuites/sptests/sp19/Makefile.am
+++ /dev/null
@@ -1,38 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-TEST = sp19
-
-MANAGERS = io
-
-C_FILES = init.c first.c fptask.c task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h fptest.h inttest.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = scn doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/sptests.am
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/sptests/sp19/first.c b/testsuites/sptests/sp19/first.c
deleted file mode 100644
index aa566e1d30..0000000000
--- a/testsuites/sptests/sp19/first.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/* First_FP_task
- *
- * This routine serves as a floating point test task. It verifies the
- * basic task switching capabilities of the executive when floating
- * point is configured.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-#include "fptest.h"
-#include "inttest.h"
-
-rtems_task First_FP_task(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
- rtems_id tid;
- rtems_time_of_day time;
- rtems_unsigned32 task_index;
- INTEGER_DECLARE;
- FP_DECLARE;
-
- status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
- directive_failed( status, "rtems_task_ident" );
-
- task_index = task_number( tid );
-
- INTEGER_LOAD( INTEGER_factors[ task_index ] );
- FP_LOAD( FP_factors[ task_index ] );
-
- put_name( Task_name[ task_index ], FALSE );
- printf( " - integer base = (0x%x)\n", INTEGER_factors[ task_index ] );
- put_name( Task_name[ task_index ], FALSE );
-#if ( RTEMS_HAS_HARDWARE_FP == 1 )
- printf( " - float base = (%g)\n", FP_factors[ task_index ] );
-#else
- printf( " - float base = (NA)\n" );
-#endif
-
- if ( argument == 0 ) {
- status = rtems_task_restart( RTEMS_SELF, 1 );
- directive_failed( status, "rtems_task_restart of RTEMS_SELF" );
- } else {
- build_time( &time, 12, 31, 1988, 9, 0, 0, 0 );
- status = rtems_clock_set( &time );
- directive_failed( status, "rtems_clock_set" );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
- }
-}
diff --git a/testsuites/sptests/sp19/fptask.c b/testsuites/sptests/sp19/fptask.c
deleted file mode 100644
index d8a7a0f22d..0000000000
--- a/testsuites/sptests/sp19/fptask.c
+++ /dev/null
@@ -1,97 +0,0 @@
-/* FP_task
- *
- * This routine serves as a floating point test task. It verifies the
- * basic task switching capabilities of the executive when floating
- * point is configured.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-#include "fptest.h"
-#include "inttest.h"
-
-rtems_task FP_task(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
- rtems_id tid;
- rtems_time_of_day time;
- rtems_unsigned32 task_index;
- rtems_unsigned32 previous_seconds;
- INTEGER_DECLARE;
- FP_DECLARE;
-
- status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
- directive_failed( status, "rtems_task_ident of self" );
-
- task_index = task_number( tid );
-
- INTEGER_LOAD( INTEGER_factors[ task_index ] );
- FP_LOAD( FP_factors[ task_index ] );
-
- put_name( Task_name[ task_index ], FALSE );
- printf( " - integer base = (0x%x)\n", INTEGER_factors[ task_index ] );
- put_name( Task_name[ task_index ], FALSE );
-#if ( RTEMS_HAS_HARDWARE_FP == 1 )
- printf( " - float base = (%g)\n", FP_factors[ task_index ] );
-#else
- printf( " - float base = (NA)\n" );
-#endif
-
- previous_seconds = -1;
-
- while( FOREVER ) {
-
- status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
- directive_failed( status, "rtems_clock_get" );
-
- if ( time.second >= 16 ) {
-
- if ( task_number( tid ) == 4 ) {
- puts( "TA4 - rtems_task_delete - self" );
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of TA4" );
- }
- puts( "TA5 - rtems_task_delete - TA3" );
- status = rtems_task_delete( Task_id[ 3 ] );
- directive_failed( status, "rtems_task_delete of TA3" );
-
- puts( "*** END OF TEST 19 *** " );
- exit( 0 );
- }
-
- if (previous_seconds != time.second)
- {
- put_name( Task_name[ task_index ], FALSE );
- print_time( " - rtems_clock_get - ", &time, "\n" );
- previous_seconds = time.second;
- }
-
- INTEGER_CHECK( INTEGER_factors[ task_index ] );
- FP_CHECK( FP_factors[ task_index ] );
-
- /* for the first 4 seconds we spin as fast as possible
- * so that we likely are interrupted
- * After that, we go to sleep for a second at a time
- */
- if (time.second >= 4)
- {
- status = rtems_task_wake_after( TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
- }
- }
-}
diff --git a/testsuites/sptests/sp19/fptest.h b/testsuites/sptests/sp19/fptest.h
deleted file mode 100644
index 48839d3204..0000000000
--- a/testsuites/sptests/sp19/fptest.h
+++ /dev/null
@@ -1,171 +0,0 @@
-/* fptest.h
- *
- * This include file contains the CPU dependent implementation
- * of the following routines needed to test RTEMS floating
- * point support:
- * FP_load( &context )
- * FP_check( &context )
- *
- * FP_load - loads the specified floating point context
- * FP_check - checks the specified floating point context
- *
- * NOTE: These routines are VERY CPU dependent and are thus
- * located in in the CPU dependent include file
- * fptest.h. These routines form the core of the
- * floating point context switch test.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#ifndef __FPTEST_h
-#define __FPTEST_h
-
-#include <stdio.h>
-
-#ifndef RTEMS_HAS_HARDWARE_FP
-#error "This CPU does not have RTEMS_HAS_HARDWARE_FP defined"
-#endif
-
-#if ( RTEMS_HAS_HARDWARE_FP == FALSE )
-
-/*
- * The following is useless except to avoid some warnings.
- */
-
-#define FP_DECLARE unsigned int fp01 = 0;
-#define FP_LOAD( _factor ) fp01 = 2;
-#define FP_CHECK( _factor ) \
- if ( fp01 != 2 ) \
- printf("%d: single integer is wrong -- (%d != 2) \n", \
- task_index, fp01 ); \
-
-#else
-
-#define FP_DECLARE \
- double fp01 = 1.0; \
- double fp02 = 2.0; \
- double fp03 = 3.0; \
- double fp04 = 4.0; \
- double fp05 = 5.0; \
- double fp06 = 6.0; \
- double fp07 = 7.0; \
- double fp08 = 8.0; \
- double fp09 = 9.0; \
- double fp10 = 10.0; \
- double fp11 = 11.0; \
- double fp12 = 12.0; \
- double fp13 = 13.0; \
- double fp14 = 14.0; \
- double fp15 = 15.0; \
- double fp16 = 16.0; \
- double fp17 = 17.0; \
- double fp18 = 18.0; \
- double fp19 = 19.0; \
- double fp20 = 20.0; \
- double fp21 = 21.0; \
- double fp22 = 22.0; \
- double fp23 = 23.0; \
- double fp24 = 24.0; \
- double fp25 = 25.0; \
- double fp26 = 26.0; \
- double fp27 = 27.0; \
- double fp28 = 28.0; \
- double fp29 = 29.0; \
- double fp30 = 30.0; \
- double fp31 = 31.0; \
- double fp32 = 32.0
-
-#define FP_LOAD( _factor ) \
- do { \
- fp01 += _factor; \
- fp02 += _factor; \
- fp03 += _factor; \
- fp04 += _factor; \
- fp05 += _factor; \
- fp06 += _factor; \
- fp07 += _factor; \
- fp08 += _factor; \
- fp09 += _factor; \
- fp10 += _factor; \
- fp11 += _factor; \
- fp12 += _factor; \
- fp13 += _factor; \
- fp14 += _factor; \
- fp15 += _factor; \
- fp16 += _factor; \
- fp17 += _factor; \
- fp18 += _factor; \
- fp19 += _factor; \
- fp20 += _factor; \
- fp21 += _factor; \
- fp22 += _factor; \
- fp23 += _factor; \
- fp24 += _factor; \
- fp25 += _factor; \
- fp26 += _factor; \
- fp27 += _factor; \
- fp28 += _factor; \
- fp29 += _factor; \
- fp30 += _factor; \
- fp31 += _factor; \
- fp32 += _factor; \
- } while (0)
-
-#define EPSILON (0.0005)
-#define FPABS(d) (((d) < 0.0) ? -(d) : (d))
-#define FPNEQ(a,b) (FPABS((a)-(b)) > EPSILON)
-
-#define FP_CHECK_ONE( _v, _base, _factor ) \
- if ( FPNEQ( (_v), ((_base) + (_factor)) ) ) { \
- printf("%d: " #_v " wrong -- (%g not %g)\n", \
- task_index, (_v), (_base + _factor)); \
- }
-
-
-#define FP_CHECK( _factor ) \
- do { \
- FP_CHECK_ONE( fp01, 1.0, (_factor) ); \
- FP_CHECK_ONE( fp02, 2.0, (_factor) ); \
- FP_CHECK_ONE( fp03, 3.0, (_factor) ); \
- FP_CHECK_ONE( fp04, 4.0, (_factor) ); \
- FP_CHECK_ONE( fp05, 5.0, (_factor) ); \
- FP_CHECK_ONE( fp06, 6.0, (_factor) ); \
- FP_CHECK_ONE( fp07, 7.0, (_factor) ); \
- FP_CHECK_ONE( fp08, 8.0, (_factor) ); \
- FP_CHECK_ONE( fp09, 9.0, (_factor) ); \
- FP_CHECK_ONE( fp10, 10.0, (_factor) ); \
- FP_CHECK_ONE( fp11, 11.0, (_factor) ); \
- FP_CHECK_ONE( fp12, 12.0, (_factor) ); \
- FP_CHECK_ONE( fp13, 13.0, (_factor) ); \
- FP_CHECK_ONE( fp14, 14.0, (_factor) ); \
- FP_CHECK_ONE( fp15, 15.0, (_factor) ); \
- FP_CHECK_ONE( fp16, 16.0, (_factor) ); \
- FP_CHECK_ONE( fp17, 17.0, (_factor) ); \
- FP_CHECK_ONE( fp18, 18.0, (_factor) ); \
- FP_CHECK_ONE( fp19, 19.0, (_factor) ); \
- FP_CHECK_ONE( fp20, 20.0, (_factor) ); \
- FP_CHECK_ONE( fp21, 21.0, (_factor) ); \
- FP_CHECK_ONE( fp22, 22.0, (_factor) ); \
- FP_CHECK_ONE( fp23, 23.0, (_factor) ); \
- FP_CHECK_ONE( fp24, 24.0, (_factor) ); \
- FP_CHECK_ONE( fp25, 25.0, (_factor) ); \
- FP_CHECK_ONE( fp26, 26.0, (_factor) ); \
- FP_CHECK_ONE( fp27, 27.0, (_factor) ); \
- FP_CHECK_ONE( fp28, 28.0, (_factor) ); \
- FP_CHECK_ONE( fp29, 29.0, (_factor) ); \
- FP_CHECK_ONE( fp30, 30.0, (_factor) ); \
- FP_CHECK_ONE( fp31, 31.0, (_factor) ); \
- FP_CHECK_ONE( fp32, 32.0, (_factor) ); \
- } while (0)
-
-#endif
-
-#endif
diff --git a/testsuites/sptests/sp19/init.c b/testsuites/sptests/sp19/init.c
deleted file mode 100644
index 4a4cd9adc8..0000000000
--- a/testsuites/sptests/sp19/init.c
+++ /dev/null
@@ -1,149 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is a user initialization task and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- puts( "\n\n*** TEST 19 ***" );
-
- Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
- Task_name[ 2 ] = rtems_build_name( 'T', 'A', '2', ' ' );
- Task_name[ 3 ] = rtems_build_name( 'T', 'A', '3', ' ' );
- Task_name[ 4 ] = rtems_build_name( 'T', 'A', '4', ' ' );
- Task_name[ 5 ] = rtems_build_name( 'T', 'A', '5', ' ' );
- Task_name[ 6 ] = rtems_build_name( 'F', 'P', '1', ' ' );
-
- status = rtems_task_create(
- Task_name[ 1 ],
- 2,
- RTEMS_MINIMUM_STACK_SIZE * 4,
- RTEMS_DEFAULT_MODES,
- RTEMS_FLOATING_POINT,
- &Task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_create of TA1" );
-
- status = rtems_task_create(
- Task_name[ 2 ],
- 2,
- RTEMS_MINIMUM_STACK_SIZE * 4,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 2 ]
- );
- directive_failed( status, "rtems_task_create of TA2" );
-
- status = rtems_task_create(
- Task_name[ 3 ],
- 2,
- RTEMS_MINIMUM_STACK_SIZE * 4,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 3 ]
- );
- directive_failed( status, "rtems_task_create of TA3" );
-
- status = rtems_task_create(
- Task_name[ 4 ],
- 2,
- RTEMS_MINIMUM_STACK_SIZE * 4,
- RTEMS_DEFAULT_MODES,
- RTEMS_FLOATING_POINT,
- &Task_id[ 4 ]
- );
- directive_failed( status, "rtems_task_create of TA4" );
-
- status = rtems_task_create(
- Task_name[ 5 ],
- 2,
- RTEMS_MINIMUM_STACK_SIZE * 4,
- RTEMS_DEFAULT_MODES,
- RTEMS_FLOATING_POINT,
- &Task_id[ 5 ]
- );
- directive_failed( status, "rtems_task_create of TA5" );
-
- status = rtems_task_create(
- Task_name[ 6 ],
- 1,
- RTEMS_MINIMUM_STACK_SIZE * 4,
- RTEMS_DEFAULT_MODES,
- RTEMS_FLOATING_POINT,
- &Task_id[ 6 ]
- );
- directive_failed( status, "rtems_task_create of FP1" );
-
- status = rtems_task_start( Task_id[ 6 ], First_FP_task, 0 );
- directive_failed( status, "rtems_task_start of FP1" );
-
- status = rtems_task_start( Task_id[ 1 ], Task_1, 0 );
- directive_failed( status, "rtems_task_start of TA1" );
-
- status = rtems_task_start( Task_id[ 2 ], Task_1, 0 );
- directive_failed( status, "rtems_task_start of TA2" );
-
- status = rtems_task_start( Task_id[ 3 ], Task_1, 0 );
- directive_failed( status, "rtems_task_start of TA3" );
-
- status = rtems_task_start( Task_id[ 4 ], FP_task, 0 );
- directive_failed( status, "rtems_task_start of TA4" );
-
- status = rtems_task_start( Task_id[ 5 ], FP_task, 0 );
- directive_failed( status, "rtems_task_create of TA5" );
-
- /*
- * Load "task dependent factors" in the context areas
- */
-
-
- FP_factors[0] = 0.0;
- FP_factors[1] = 1000.1;
- FP_factors[2] = 2000.2;
- FP_factors[3] = 3000.3;
- FP_factors[4] = 4000.4;
- FP_factors[5] = 5000.5;
- FP_factors[6] = 6000.6;
- FP_factors[7] = 7000.7;
- FP_factors[8] = 8000.8;
- FP_factors[9] = 9000.9;
-
- INTEGER_factors[0] = 0x0000;
- INTEGER_factors[1] = 0x1000;
- INTEGER_factors[2] = 0x2000;
- INTEGER_factors[3] = 0x3000;
- INTEGER_factors[4] = 0x4000;
- INTEGER_factors[5] = 0x5000;
- INTEGER_factors[6] = 0x6000;
- INTEGER_factors[7] = 0x7000;
- INTEGER_factors[8] = 0x8000;
- INTEGER_factors[9] = 0x9000;
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of TA1" );
-}
diff --git a/testsuites/sptests/sp19/inttest.h b/testsuites/sptests/sp19/inttest.h
deleted file mode 100644
index 5ab9870996..0000000000
--- a/testsuites/sptests/sp19/inttest.h
+++ /dev/null
@@ -1,148 +0,0 @@
-/* inttest.h
- *
- * XXX: ???
- * This include file contains the CPU dependent implementation
- * of the following routines needed to test RTEMS floating
- * point support:
- * INTEGER_load( &context )
- * INTEGER_check( &context )
- *
- * INTEGER_load - loads the specified floating point context
- * INTEGER_check - checks the specified floating point context
- *
- * NOTE: These routines are VERY CPU dependent and are thus
- * located in in the CPU dependent include file
- * inttest.h. These routines form the core of the
- * floating point context switch test.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#ifndef __INTEGER_TEST_h
-#define __INTEGER_TEST_h
-
-#include <stdio.h>
-#define REG_VARIABLE rtems_unsigned32
-
-#define INTEGER_DECLARE \
- REG_VARIABLE int01 = 1; \
- REG_VARIABLE int02 = 2; \
- REG_VARIABLE int03 = 3; \
- REG_VARIABLE int04 = 4; \
- REG_VARIABLE int05 = 5; \
- REG_VARIABLE int06 = 6; \
- REG_VARIABLE int07 = 7; \
- REG_VARIABLE int08 = 8; \
- REG_VARIABLE int09 = 9; \
- REG_VARIABLE int10 = 10; \
- REG_VARIABLE int11 = 11; \
- REG_VARIABLE int12 = 12; \
- REG_VARIABLE int13 = 13; \
- REG_VARIABLE int14 = 14; \
- REG_VARIABLE int15 = 15; \
- REG_VARIABLE int16 = 16; \
- REG_VARIABLE int17 = 17; \
- REG_VARIABLE int18 = 18; \
- REG_VARIABLE int19 = 19; \
- REG_VARIABLE int20 = 20; \
- REG_VARIABLE int21 = 21; \
- REG_VARIABLE int22 = 22; \
- REG_VARIABLE int23 = 23; \
- REG_VARIABLE int24 = 24; \
- REG_VARIABLE int25 = 25; \
- REG_VARIABLE int26 = 26; \
- REG_VARIABLE int27 = 27; \
- REG_VARIABLE int28 = 28; \
- REG_VARIABLE int29 = 29; \
- REG_VARIABLE int30 = 30; \
- REG_VARIABLE int31 = 31; \
- REG_VARIABLE int32 = 32
-
-#define INTEGER_LOAD( _factor ) \
- do { \
- int01 += _factor; \
- int02 += _factor; \
- int03 += _factor; \
- int04 += _factor; \
- int05 += _factor; \
- int06 += _factor; \
- int07 += _factor; \
- int08 += _factor; \
- int09 += _factor; \
- int10 += _factor; \
- int11 += _factor; \
- int12 += _factor; \
- int13 += _factor; \
- int14 += _factor; \
- int15 += _factor; \
- int16 += _factor; \
- int17 += _factor; \
- int18 += _factor; \
- int19 += _factor; \
- int20 += _factor; \
- int21 += _factor; \
- int22 += _factor; \
- int23 += _factor; \
- int24 += _factor; \
- int25 += _factor; \
- int26 += _factor; \
- int27 += _factor; \
- int28 += _factor; \
- int29 += _factor; \
- int30 += _factor; \
- int31 += _factor; \
- int32 += _factor; \
- } while (0)
-
-#define INTEGER_CHECK_ONE( _v, _base, _factor ) \
- if ( (_v) != ((_base) + (_factor)) ) { \
- printf("%d: " #_v " wrong -- (0x%x not 0x%x)\n", \
- task_index, (_v), (_base + _factor)); \
- }
-
-
-#define INTEGER_CHECK( _factor ) \
- do { \
- INTEGER_CHECK_ONE( int01, 1, (_factor) ); \
- INTEGER_CHECK_ONE( int02, 2, (_factor) ); \
- INTEGER_CHECK_ONE( int03, 3, (_factor) ); \
- INTEGER_CHECK_ONE( int04, 4, (_factor) ); \
- INTEGER_CHECK_ONE( int05, 5, (_factor) ); \
- INTEGER_CHECK_ONE( int06, 6, (_factor) ); \
- INTEGER_CHECK_ONE( int07, 7, (_factor) ); \
- INTEGER_CHECK_ONE( int08, 8, (_factor) ); \
- INTEGER_CHECK_ONE( int09, 9, (_factor) ); \
- INTEGER_CHECK_ONE( int10, 10, (_factor) ); \
- INTEGER_CHECK_ONE( int11, 11, (_factor) ); \
- INTEGER_CHECK_ONE( int12, 12, (_factor) ); \
- INTEGER_CHECK_ONE( int13, 13, (_factor) ); \
- INTEGER_CHECK_ONE( int14, 14, (_factor) ); \
- INTEGER_CHECK_ONE( int15, 15, (_factor) ); \
- INTEGER_CHECK_ONE( int16, 16, (_factor) ); \
- INTEGER_CHECK_ONE( int17, 17, (_factor) ); \
- INTEGER_CHECK_ONE( int18, 18, (_factor) ); \
- INTEGER_CHECK_ONE( int19, 19, (_factor) ); \
- INTEGER_CHECK_ONE( int20, 20, (_factor) ); \
- INTEGER_CHECK_ONE( int21, 21, (_factor) ); \
- INTEGER_CHECK_ONE( int22, 22, (_factor) ); \
- INTEGER_CHECK_ONE( int23, 23, (_factor) ); \
- INTEGER_CHECK_ONE( int24, 24, (_factor) ); \
- INTEGER_CHECK_ONE( int25, 25, (_factor) ); \
- INTEGER_CHECK_ONE( int26, 26, (_factor) ); \
- INTEGER_CHECK_ONE( int27, 27, (_factor) ); \
- INTEGER_CHECK_ONE( int28, 28, (_factor) ); \
- INTEGER_CHECK_ONE( int29, 29, (_factor) ); \
- INTEGER_CHECK_ONE( int30, 30, (_factor) ); \
- INTEGER_CHECK_ONE( int31, 31, (_factor) ); \
- INTEGER_CHECK_ONE( int32, 32, (_factor) ); \
- } while (0)
-
-#endif
diff --git a/testsuites/sptests/sp19/sp19.doc b/testsuites/sptests/sp19/sp19.doc
deleted file mode 100644
index a5939bb566..0000000000
--- a/testsuites/sptests/sp19/sp19.doc
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: test19
-
-directives:
-
-concepts:
-
- a. Verifies system can dispatch a mixture of floating point and
- non-floating point tasks.
diff --git a/testsuites/sptests/sp19/sp19.scn b/testsuites/sptests/sp19/sp19.scn
deleted file mode 100644
index d70c8ad89a..0000000000
--- a/testsuites/sptests/sp19/sp19.scn
+++ /dev/null
@@ -1,50 +0,0 @@
-*** TEST 19 ***
-FP1 - integer base = (0x6000)
-FP1 - float base = (6000.6)
-FP1 - integer base = (0x6000)
-FP1 - float base = (6000.6)
-TA1 - integer base = (0x1000)
-TA1 - rtems_clock_get - 09:00:00 12/31/1988
-TA2 - integer base = (0x2000)
-TA2 - rtems_clock_get - 09:00:00 12/31/1988
-TA3 - integer base = (0x3000)
-TA3 - rtems_clock_get - 09:00:00 12/31/1988
-TA4 - integer base = (0x4000)
-TA4 - float base = (4000.4)
-TA4 - rtems_clock_get - 09:00:00 12/31/1988
-TA4 - rtems_clock_get - 09:00:01 12/31/1988
-TA4 - rtems_clock_get - 09:00:02 12/31/1988
-TA4 - rtems_clock_get - 09:00:03 12/31/1988
-TA4 - rtems_clock_get - 09:00:04 12/31/1988
-TA5 - integer base = (0x5000)
-TA5 - float base = (5000.5)
-TA5 - rtems_clock_get - 09:00:04 12/31/1988
-TA1 - rtems_clock_get - 09:00:05 12/31/1988
-TA5 - rtems_clock_get - 09:00:05 12/31/1988
-TA4 - rtems_clock_get - 09:00:05 12/31/1988
-TA5 - rtems_clock_get - 09:00:06 12/31/1988
-TA4 - rtems_clock_get - 09:00:06 12/31/1988
-TA5 - rtems_clock_get - 09:00:07 12/31/1988
-TA4 - rtems_clock_get - 09:00:07 12/31/1988
-TA5 - rtems_clock_get - 09:00:08 12/31/1988
-TA4 - rtems_clock_get - 09:00:08 12/31/1988
-TA5 - rtems_clock_get - 09:00:09 12/31/1988
-TA4 - rtems_clock_get - 09:00:09 12/31/1988
-TA2 - rtems_clock_get - 09:00:10 12/31/1988
-TA1 - rtems_clock_get - 09:00:10 12/31/1988
-TA5 - rtems_clock_get - 09:00:10 12/31/1988
-TA4 - rtems_clock_get - 09:00:10 12/31/1988
-TA5 - rtems_clock_get - 09:00:11 12/31/1988
-TA4 - rtems_clock_get - 09:00:11 12/31/1988
-TA5 - rtems_clock_get - 09:00:12 12/31/1988
-TA4 - rtems_clock_get - 09:00:12 12/31/1988
-TA5 - rtems_clock_get - 09:00:13 12/31/1988
-TA4 - rtems_clock_get - 09:00:13 12/31/1988
-TA5 - rtems_clock_get - 09:00:14 12/31/1988
-TA4 - rtems_clock_get - 09:00:14 12/31/1988
-TA3 - rtems_clock_get - 09:00:15 12/31/1988
-TA1 - rtems_clock_get - 09:00:15 12/31/1988
-TA5 - rtems_clock_get - 09:00:15 12/31/1988
-TA4 - rtems_clock_get - 09:00:15 12/31/1988
-TA5 - rtems_task_delete - TA3
-*** END OF TEST 19 ***
diff --git a/testsuites/sptests/sp19/system.h b/testsuites/sptests/sp19/system.h
deleted file mode 100644
index 026d0a2c9b..0000000000
--- a/testsuites/sptests/sp19/system.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_task First_FP_task(
- rtems_task_argument argument
-);
-
-rtems_task FP_task(
- rtems_task_argument argument
-);
-
-rtems_task Task_1(
- rtems_task_argument argument
-);
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#define CONFIGURE_EXTRA_TASK_STACKS (18 * RTEMS_MINIMUM_STACK_SIZE)
-
-#include <confdefs.h>
-
-/* global variables */
-
-TEST_EXTERN rtems_id Task_id[ 7 ]; /* array of task ids */
-TEST_EXTERN rtems_id Task_name[ 7 ]; /* array of task names */
-
-TEST_EXTERN rtems_double FP_factors[ 10 ]; /* FP "uniqueness" factors */
-TEST_EXTERN rtems_unsigned32 INTEGER_factors[ 10 ]; /* INT "uniqueness" factors */
-/* end of include file */
diff --git a/testsuites/sptests/sp19/task1.c b/testsuites/sptests/sp19/task1.c
deleted file mode 100644
index 5f6d7a854d..0000000000
--- a/testsuites/sptests/sp19/task1.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/* Task_1
- *
- * This routine serves as a test task. It verifies the basic task
- * switching capabilities of the executive.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-#include "inttest.h"
-
-rtems_task Task_1(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
- rtems_id tid;
- rtems_time_of_day time;
- rtems_unsigned32 task_index;
- INTEGER_DECLARE;
-
- status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
- directive_failed( status, "rtems_task_ident" );
-
- task_index = task_number( tid );
-
- INTEGER_LOAD( INTEGER_factors[ task_index ] );
-
- put_name( Task_name[ task_index ], FALSE );
- printf( " - integer base = (0x%x)\n", INTEGER_factors[ task_index ] );
-
- while( FOREVER ) {
- status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
- directive_failed( status, "rtems_clock_get" );
-
- put_name( Task_name[ task_number( tid ) ], FALSE );
- print_time( " - rtems_clock_get - ", &time, "\n" );
-
- INTEGER_CHECK( INTEGER_factors[ task_index ] );
-
- status = rtems_task_wake_after(
- ( task_number( tid ) ) * 5 * TICKS_PER_SECOND
- );
- directive_failed( status, "rtems_task_wake_after" );
- }
-}
diff --git a/testsuites/sptests/sp20/Makefile.am b/testsuites/sptests/sp20/Makefile.am
deleted file mode 100644
index 74db12b302..0000000000
--- a/testsuites/sptests/sp20/Makefile.am
+++ /dev/null
@@ -1,38 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-TEST = sp20
-
-MANAGERS = io rate_monotonic
-
-C_FILES = init.c getall.c task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = scn doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/sptests.am
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/sptests/sp20/getall.c b/testsuites/sptests/sp20/getall.c
deleted file mode 100644
index a99ecf3d8c..0000000000
--- a/testsuites/sptests/sp20/getall.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/* Get_all_counters
- *
- * This routine allows TA5 to atomically obtain the iteration counters.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-void Get_all_counters()
-{
- rtems_mode previous_mode;
- rtems_status_code status;
-
- status = rtems_task_mode(
- RTEMS_NO_PREEMPT,
- RTEMS_PREEMPT_MASK,
- &previous_mode
- );
- directive_failed( status, "rtems_task_mode to RTEMS_NO_PREEMPT" );
-
- Temporary_count = Count;
- Count.count[ 1 ] = 0;
- Count.count[ 2 ] = 0;
- Count.count[ 3 ] = 0;
- Count.count[ 4 ] = 0;
- Count.count[ 5 ] = 0;
-
- status = rtems_task_mode( RTEMS_PREEMPT, RTEMS_PREEMPT_MASK, &previous_mode );
- directive_failed( status, "rtems_task_mode to RTEMS_PREEMPT" );
-}
diff --git a/testsuites/sptests/sp20/init.c b/testsuites/sptests/sp20/init.c
deleted file mode 100644
index 5b70c7f927..0000000000
--- a/testsuites/sptests/sp20/init.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is a user initialization task and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_unsigned32 index;
- rtems_status_code status;
-
- puts( "\n\n*** TEST 20 ***" );
-
- Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
- Task_name[ 2 ] = rtems_build_name( 'T', 'A', '2', ' ' );
- Task_name[ 3 ] = rtems_build_name( 'T', 'A', '3', ' ' );
- Task_name[ 4 ] = rtems_build_name( 'T', 'A', '4', ' ' );
- Task_name[ 5 ] = rtems_build_name( 'T', 'A', '5', ' ' );
-
- for ( index = 1 ; index <= 5 ; index++ ) {
- status = rtems_task_create(
- Task_name[ index ],
- Priorities[ index ],
- RTEMS_MINIMUM_STACK_SIZE * 4,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ index ]
- );
- directive_failed( status, "rtems_task_create loop" );
- }
-
- for ( index = 1 ; index <= 5 ; index++ ) {
- status = rtems_task_start( Task_id[ index ], Task_1_through_5, index );
- directive_failed( status, "rtems_task_start loop" );
- }
-
- Count.count[ 1 ] = 0;
- Count.count[ 2 ] = 0;
- Count.count[ 3 ] = 0;
- Count.count[ 4 ] = 0;
- Count.count[ 5 ] = 0;
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
diff --git a/testsuites/sptests/sp20/sp20.doc b/testsuites/sptests/sp20/sp20.doc
deleted file mode 100644
index a3ff426ca6..0000000000
--- a/testsuites/sptests/sp20/sp20.doc
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: test20
-
-directives:
-
- rm_create, rm_period
-
-concepts:
-
- a. Verifies Rate Monotonic Manager behavior.
diff --git a/testsuites/sptests/sp20/sp20.scn b/testsuites/sptests/sp20/sp20.scn
deleted file mode 100644
index 746c317782..0000000000
--- a/testsuites/sptests/sp20/sp20.scn
+++ /dev/null
@@ -1,27 +0,0 @@
-*** TEST 20 ***
-TA1 - rtems_rate_monotonic_create id = 0x2c010001
-TA1 - rtems_rate_monotonic_ident id = 0x2c010001
-TA1 - (0x2c010001) period 2
-TA2 - rtems_rate_monotonic_create id = 0x2c010002
-TA2 - rtems_rate_monotonic_ident id = 0x2c010002
-TA2 - (0x2c010002) period 2
-TA3 - rtems_rate_monotonic_create id = 0x2c010003
-TA3 - rtems_rate_monotonic_ident id = 0x2c010003
-TA3 - (0x2c010003) period 2
-TA4 - rtems_rate_monotonic_create id = 0x2c010004
-TA4 - rtems_rate_monotonic_ident id = 0x2c010004
-TA4 - (0x2c010004) period 2
-TA5 - rtems_rate_monotonic_create id = 0x2c010005
-TA5 - rtems_rate_monotonic_ident id = 0x2c010005
-TA5 - (0x28010005) period 100
-TA5 - PERIODS CHECK OK (1)
-TA5 - PERIODS CHECK OK (2)
-TA5 - PERIODS CHECK OK (3)
-TA5 - PERIODS CHECK OK (4)
-TA5 - PERIODS CHECK OK (5)
-TA5 - PERIODS CHECK OK (6)
-TA5 - PERIODS CHECK OK (7)
-TA5 - PERIODS CHECK OK (8)
-TA5 - PERIODS CHECK OK (9)
-TA5 - PERIODS CHECK OK (10)
-*** END OF TEST 20 ***
diff --git a/testsuites/sptests/sp20/system.h b/testsuites/sptests/sp20/system.h
deleted file mode 100644
index 03b6084606..0000000000
--- a/testsuites/sptests/sp20/system.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* types */
-
-struct counters {
- rtems_unsigned32 count[6];
-};
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_task Task_1_through_5(
- rtems_task_argument argument
-);
-
-void Get_all_counters( void );
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_INIT_TASK_PRIORITY 10
-#define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_DEFAULT_MODES
-#define CONFIGURE_MAXIMUM_PERIODS 10
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#define CONFIGURE_EXTRA_TASK_STACKS (15 * RTEMS_MINIMUM_STACK_SIZE)
-
-#include <confdefs.h>
-
-/* global variables */
-
-TEST_EXTERN rtems_id Task_id[ 6 ]; /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 6 ]; /* array of task names */
-
-TEST_EXTERN struct counters Count; /* iteration counters */
-TEST_EXTERN struct counters Temporary_count;
-extern rtems_task_priority Priorities[ 6 ];
-
-/* end of include file */
diff --git a/testsuites/sptests/sp20/task1.c b/testsuites/sptests/sp20/task1.c
deleted file mode 100644
index e0c01f0baa..0000000000
--- a/testsuites/sptests/sp20/task1.c
+++ /dev/null
@@ -1,115 +0,0 @@
-/* Task_1_through_5
- *
- * This routine serves as a test task for the period capabilities of the
- * Rate Monotonic Manager.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_unsigned32 Periods[6] = { 0, 2, 2, 2, 2, 100 };
-rtems_unsigned32 Iterations[6] = { 0, 50, 50, 50, 50, 1 };
-rtems_task_priority Priorities[6] = { 0, 1, 1, 3, 4, 5 };
-
-rtems_task Task_1_through_5(
- rtems_unsigned32 argument
-)
-{
- rtems_id rmid;
- rtems_id test_rmid;
- rtems_unsigned32 index;
- rtems_unsigned32 pass;
- rtems_unsigned32 failed;
- rtems_status_code status;
-
- status = rtems_rate_monotonic_create( argument, &rmid );
- directive_failed( status, "rtems_rate_monotonic_create" );
- put_name( Task_name[ argument ], FALSE );
- printf( "- rtems_rate_monotonic_create id = 0x%08x\n", rmid );
-
- status = rtems_rate_monotonic_ident( argument, &test_rmid );
- directive_failed( status, "rtems_rate_monotonic_ident" );
- put_name( Task_name[ argument ], FALSE );
- printf( "- rtems_rate_monotonic_ident id = 0x%08x\n", test_rmid );
-
- if ( rmid != test_rmid ) {
- printf( "RMID's DO NOT MATCH (0x%x and 0x%x)\n", rmid, test_rmid );
- exit( 0 );
- }
-
- put_name( Task_name[ argument ], FALSE );
- printf( "- (0x%08x) period %d\n", rmid, Periods[ argument ] );
-
- status = rtems_task_wake_after( 2 );
- directive_failed( status, "rtems_task_wake_after" );
-
- switch ( argument ) {
- case 1:
- case 2:
- case 3:
- case 4:
- while ( FOREVER ) {
- status = rtems_rate_monotonic_period( rmid, Periods[ argument ] );
- directive_failed( status, "rtems_rate_monotonic_period" );
- Count.count[ argument ]++;
- }
- break;
- case 5:
- pass = 0;
- failed = 0;
-
- status = rtems_rate_monotonic_period( rmid, Periods[ argument ] );
- directive_failed( status, "rtems_rate_monotonic_period 1 of TA5" );
-
- Get_all_counters();
-
- while ( FOREVER ) {
-
- status = rtems_rate_monotonic_period( rmid, Periods[ argument ] );
- directive_failed( status, "rtems_rate_monotonic_period 2 of TA5" );
-
- Get_all_counters();
-
- for( index = 1 ; index <= 4 ; index++ ) {
- if ( Temporary_count.count[ index ] != Iterations[ index ] ) {
- puts_nocr( "FAIL -- " );
- put_name ( Task_name[ index ], FALSE );
- printf ( " Actual=%d, Expected=%d\n",
- Temporary_count.count[ index ],
- Iterations[ index ]
- );
- failed += 1;
- }
- }
-
- if ( failed == 5 )
- exit( 0 );
-
- pass += 1;
-
- printf( "TA5 - PERIODS CHECK OK (%d)\n", pass );
-
- fflush( stdout );
-
- if ( pass == 10 ) {
- puts( "*** END OF TEST 20 ***" );
- exit( 0 );
- }
-
- }
- break;
- }
-}
diff --git a/testsuites/sptests/sp21/Makefile.am b/testsuites/sptests/sp21/Makefile.am
deleted file mode 100644
index 6d7cfa66c0..0000000000
--- a/testsuites/sptests/sp21/Makefile.am
+++ /dev/null
@@ -1,40 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-TEST = sp21
-
-MANAGERS = io
-
-C_FILES = init.c task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = scn doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/sptests.am
-
-LD_LIBS += $(PROJECT_RELEASE)/lib/libtest$(LIBSUFFIX_VA)
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/sptests/sp21/init.c b/testsuites/sptests/sp21/init.c
deleted file mode 100644
index d2a666e97b..0000000000
--- a/testsuites/sptests/sp21/init.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is a user initialization task and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- puts( "\n\n*** TEST 21 ***" );
-
- Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
-
- status = rtems_task_create(
- Task_name[ 1 ],
- 1,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_create of TA1" );
-
- status = rtems_task_start( Task_id[ 1 ], Task_1, 0 );
- directive_failed( status, "rtems_task_start of TA1" );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
diff --git a/testsuites/sptests/sp21/sp21.doc b/testsuites/sptests/sp21/sp21.doc
deleted file mode 100644
index 52cb5a8f43..0000000000
--- a/testsuites/sptests/sp21/sp21.doc
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: test21
-
-directives:
- ex_init, ex_start, t_create, t_start, tm_tick, i_return, t_delete
- de_init, de_open, de_close, de_read, de_write, de_cntrl
-
-concepts:
-
- a. Verifies all I/O manager directives always return successful for
- null drivers.
-
- b. Verifies all I/O manager directives call and return from the driver
- entry points in the driver address table.
diff --git a/testsuites/sptests/sp21/sp21.scn b/testsuites/sptests/sp21/sp21.scn
deleted file mode 100644
index c6392e3ea3..0000000000
--- a/testsuites/sptests/sp21/sp21.scn
+++ /dev/null
@@ -1,19 +0,0 @@
-*** TEST 21 ***
------ TESTING THE NULL DRIVER CHECKS -----
-TA1 - rtems_io_initialize - NULL DRIVER RTEMS_SUCCESSFUL
-TA1 - rtems_io_open - NULL DRIVER RTEMS_SUCCESSFUL
-TA1 - rtems_io_close - NULL DRIVER RTEMS_SUCCESSFUL
-TA1 - rtems_io_read - NULL DRIVER RTEMS_SUCCESSFUL
-TA1 - rtems_io_write - NULL DRIVER RTEMS_SUCCESSFUL
-TA1 - rtems_io_control - NULL DRIVER RTEMS_SUCCESSFUL
------ TESTING THE I/O MANAGER DIRECTIVES -----
-TA1 - rtems_io_initialize - STUB DRIVER RTEMS_SUCCESSFUL
-TA1 - rtems_io_open - STUB DRIVER RTEMS_SUCCESSFUL
-TA1 - rtems_io_close - STUB DRIVER RTEMS_SUCCESSFUL
-TA1 - rtems_io_read - STUB DRIVER RTEMS_SUCCESSFUL
-TA1 - rtems_io_write - STUB DRIVER RTEMS_SUCCESSFUL
-TA1 - rtems_io_control - STUB DRIVER RTEMS_SUCCESSFUL
------ RETURNING INVALID MAJOR NUMBER -----
-TA1 - rtems_io_initialize - RTEMS_INVALID_NUMBER
-TA1 - rtems_io_open - RTEMS_INVALID_NUMBER
-*** END OF TEST 21 ***
diff --git a/testsuites/sptests/sp21/system.h b/testsuites/sptests/sp21/system.h
deleted file mode 100644
index fe38835aa0..0000000000
--- a/testsuites/sptests/sp21/system.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_task Task_1(
- rtems_task_argument argument
-);
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-#define CONFIGURE_TEST_NEEDS_STUB_DRIVER
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* global variables */
-
-TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
-
-/* end of include file */
diff --git a/testsuites/sptests/sp21/task1.c b/testsuites/sptests/sp21/task1.c
deleted file mode 100644
index b28b1f019c..0000000000
--- a/testsuites/sptests/sp21/task1.c
+++ /dev/null
@@ -1,104 +0,0 @@
-/* Task_1
- *
- * This routine serves as a test task. It tests the I/O manager.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-#define STUB_DRIVER_MAJOR 0x2
-#define NO_DRIVER_MAJOR 0x3
-#define INVALID_DRIVER_MAJOR 0x5
-
-rtems_task Task_1(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- puts( "----- TESTING THE NULL DRIVER CHECKS -----" );
-
- status = rtems_io_initialize( NO_DRIVER_MAJOR, 0, NULL );
- directive_failed( status, "rtems_io_initialize" );
- puts( "TA1 - rtems_io_initialize - NULL DRIVER RTEMS_SUCCESSFUL" );
-
- status = rtems_io_open( NO_DRIVER_MAJOR, 0, NULL );
- directive_failed( status, "rtems_io_open" );
- puts( "TA1 - rtems_io_open - NULL DRIVER RTEMS_SUCCESSFUL" );
-
- status = rtems_io_close( NO_DRIVER_MAJOR, 0, NULL );
- directive_failed( status, "rtems_io_close" );
- puts( "TA1 - rtems_io_close - NULL DRIVER RTEMS_SUCCESSFUL" );
-
- status = rtems_io_read( NO_DRIVER_MAJOR, 0, NULL );
- directive_failed( status, "rtems_io_read" );
- puts( "TA1 - rtems_io_read - NULL DRIVER RTEMS_SUCCESSFUL" );
-
- status = rtems_io_write( NO_DRIVER_MAJOR, 0, NULL );
- directive_failed( status, "rtems_io_write" );
- puts( "TA1 - rtems_io_write - NULL DRIVER RTEMS_SUCCESSFUL" );
-
- status = rtems_io_control( NO_DRIVER_MAJOR, 0, NULL );
- directive_failed( status, "rtems_io_control" );
- puts( "TA1 - rtems_io_control - NULL DRIVER RTEMS_SUCCESSFUL" );
-
- puts( "----- TESTING THE I/O MANAGER DIRECTIVES -----" );
-
- status = rtems_io_initialize( STUB_DRIVER_MAJOR, 0, NULL );
- directive_failed( status, "rtems_io_initialize" );
- puts( "TA1 - rtems_io_initialize - STUB DRIVER RTEMS_SUCCESSFUL" );
-
- status = rtems_io_open( STUB_DRIVER_MAJOR, 0, NULL );
- directive_failed( status, "rtems_io_open" );
- puts( "TA1 - rtems_io_open - STUB DRIVER RTEMS_SUCCESSFUL" );
-
- status = rtems_io_close( STUB_DRIVER_MAJOR, 0, NULL );
- directive_failed( status, "rtems_io_close" );
- puts( "TA1 - rtems_io_close - STUB DRIVER RTEMS_SUCCESSFUL" );
-
- status = rtems_io_read( STUB_DRIVER_MAJOR, 0, NULL );
- directive_failed( status, "rtems_io_read" );
- puts( "TA1 - rtems_io_read - STUB DRIVER RTEMS_SUCCESSFUL" );
-
- status = rtems_io_write( STUB_DRIVER_MAJOR, 0, NULL );
- directive_failed( status, "rtems_io_write" );
- puts( "TA1 - rtems_io_write - STUB DRIVER RTEMS_SUCCESSFUL" );
-
- status = rtems_io_control( STUB_DRIVER_MAJOR, 0, NULL );
- directive_failed( status, "rtems_io_control" );
- puts( "TA1 - rtems_io_control - STUB DRIVER RTEMS_SUCCESSFUL" );
-
- puts( "----- RETURNING INVALID MAJOR NUMBER -----" );
-
- status = rtems_io_initialize( INVALID_DRIVER_MAJOR, 0, NULL );
- fatal_directive_status(
- status,
- RTEMS_INVALID_NUMBER,
- "rtems_io_initialize"
- );
- puts( "TA1 - rtems_io_initialize - RTEMS_INVALID_NUMBER" );
-
- status = rtems_io_open( INVALID_DRIVER_MAJOR, 0, NULL );
- fatal_directive_status(
- status,
- RTEMS_INVALID_NUMBER,
- "rtems_io_open"
- );
- puts( "TA1 - rtems_io_open - RTEMS_INVALID_NUMBER" );
-
- puts( "*** END OF TEST 21 ***" );
- exit( 0 );
-}
diff --git a/testsuites/sptests/sp22/Makefile.am b/testsuites/sptests/sp22/Makefile.am
deleted file mode 100644
index af0558eb24..0000000000
--- a/testsuites/sptests/sp22/Makefile.am
+++ /dev/null
@@ -1,38 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-TEST = sp22
-
-MANAGERS = io timer
-
-C_FILES = init.c prtime.c delay.c task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = scn doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/sptests.am
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/sptests/sp22/delay.c b/testsuites/sptests/sp22/delay.c
deleted file mode 100644
index c3438e3a03..0000000000
--- a/testsuites/sptests/sp22/delay.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Delayed_resume
- *
- * This routine is scheduled to be fired as a timer service routine.
- * When fired this subprogram resumes Task_1.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_timer_service_routine Delayed_resume(
- rtems_id ignored_id,
- void *ignored_address
-)
-{
- rtems_status_code status;
-
- status = rtems_task_resume( Task_id[ 1 ] );
- directive_failed_with_level( status, "rtems_task_resume of self", 1 );
-}
diff --git a/testsuites/sptests/sp22/init.c b/testsuites/sptests/sp22/init.c
deleted file mode 100644
index 0ba8803a6d..0000000000
--- a/testsuites/sptests/sp22/init.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is a user initialization task and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_time_of_day time;
- rtems_status_code status;
-
- puts( "\n\n*** TEST 22 ***" );
-
- build_time( &time, 12, 31, 1988, 9, 0, 0, 0 );
-
- status = rtems_clock_set( &time );
- directive_failed( status, "rtems_clock_set" );
-
- Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
- Timer_name[ 1 ] = rtems_build_name( 'T', 'M', '1', ' ' );
-
- status = rtems_task_create(
- Task_name[ 1 ],
- 1,
- RTEMS_MINIMUM_STACK_SIZE * 2,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_create of TA1" );
-
- status = rtems_task_start( Task_id[ 1 ], Task_1, 0 );
- directive_failed( status, "rtems_task_start of TA1" );
-
- puts( "INIT - rtems_timer_create - creating timer 1" );
- status = rtems_timer_create( Timer_name[ 1 ], &Timer_id[ 1 ] );
- directive_failed( status, "rtems_timer_create" );
-
- printf( "INIT - timer 1 has id (0x%x)\n", Timer_id[ 1 ] );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
diff --git a/testsuites/sptests/sp22/prtime.c b/testsuites/sptests/sp22/prtime.c
deleted file mode 100644
index 2ab81606e0..0000000000
--- a/testsuites/sptests/sp22/prtime.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Print_time
- *
- * This routine prints the name of Task_1 and the current time of day.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-void Print_time( void )
-{
- rtems_time_of_day time;
- rtems_status_code status;
-
- status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
- directive_failed( status, "rtems_clock_get" );
-
- put_name( Task_name[ 1 ], FALSE );
- print_time( "- rtems_clock_get - ", &time, "\n" );
-}
diff --git a/testsuites/sptests/sp22/sp22.doc b/testsuites/sptests/sp22/sp22.doc
deleted file mode 100644
index 636cdc2a1d..0000000000
--- a/testsuites/sptests/sp22/sp22.doc
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: test22
-
-directives:
-
-concepts:
diff --git a/testsuites/sptests/sp22/sp22.scn b/testsuites/sptests/sp22/sp22.scn
deleted file mode 100644
index c95e45a73a..0000000000
--- a/testsuites/sptests/sp22/sp22.scn
+++ /dev/null
@@ -1,29 +0,0 @@
-*** TEST 22 ***
-INIT - rtems_timer_create - creating timer 1
-INIT - timer 1 has id (0x14010001)
-TA1 - rtems_timer_ident - identing timer 1
-TA1 - timer 1 has id (0x14010001)
-TA1 - rtems_clock_get - 09:00:00 12/31/1988
-TA1 - rtems_timer_fire_after - timer 1 in 3 seconds
-TA1 - rtems_task_suspend( RTEMS_SELF )
-TA1 - rtems_clock_get - 09:00:03 12/31/1988
-TA1 - rtems_timer_fire_after - timer 1 in 3 seconds
-TA1 - rtems_task_wake_after - 1 second
-TA1 - rtems_clock_get - 09:00:04 12/31/1988
-TA1 - rtems_timer_reset - timer 1
-TA1 - rtems_task_suspend( RTEMS_SELF )
-TA1 - rtems_clock_get - 09:00:07 12/31/1988
-<pause>
-TA1 - rtems_timer_fire_after - timer 1 in 3 seconds
-TA1 - rtems_timer_cancel - timer 1
-TA1 - rtems_clock_get - 09:00:07 12/31/1988
-TA1 - rtems_timer_fire_when - timer 1 in 3 seconds
-TA1 - rtems_task_suspend( RTEMS_SELF )
-TA1 - rtems_clock_get - 09:00:10 12/31/1988
-TA1 - rtems_timer_fire_when - timer 1 in 3 seconds
-TA1 - rtems_task_wake_after - 1 second
-TA1 - rtems_clock_get - 09:00:11 12/31/1988
-TA1 - rtems_timer_cancel - timer 1
-TA1 - rtems_task_wake_after - YIELD (only task at priority)
-TA1 - timer_deleting - timer 1
-*** END OF TEST 22 ***
diff --git a/testsuites/sptests/sp22/system.h b/testsuites/sptests/sp22/system.h
deleted file mode 100644
index 102be71e0c..0000000000
--- a/testsuites/sptests/sp22/system.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_timer_service_routine Delayed_resume(
- rtems_id ignored_id,
- void *ignored_address
-);
-
-void Print_time( void );
-
-rtems_task Task_1(
- rtems_task_argument argument
-);
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MAXIMUM_TIMERS 2
-#define CONFIGURE_INIT_TASK_STACK_SIZE (RTEMS_MINIMUM_STACK_SIZE * 2)
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#define CONFIGURE_EXTRA_TASK_STACKS (1 * RTEMS_MINIMUM_STACK_SIZE)
-
-#include <confdefs.h>
-
-/* global variables */
-
-TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
-
-TEST_EXTERN rtems_id Timer_id[ 2 ]; /* array of timer ids */
-TEST_EXTERN rtems_name Timer_name[ 2 ]; /* array of timer names */
-
-/* end of include file */
diff --git a/testsuites/sptests/sp22/task1.c b/testsuites/sptests/sp22/task1.c
deleted file mode 100644
index a0ad5da955..0000000000
--- a/testsuites/sptests/sp22/task1.c
+++ /dev/null
@@ -1,163 +0,0 @@
-/* Task_1
- *
- * This routine serves as a test task. It verifies the basic task
- * switching capabilities of the executive.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task_1(
- rtems_task_argument argument
-)
-{
- rtems_id tmid;
- rtems_time_of_day time;
- rtems_status_code status;
-
-/* Get id */
-
- puts( "TA1 - rtems_timer_ident - identing timer 1" );
- status = rtems_timer_ident( Timer_name[ 1 ], &tmid );
- directive_failed( status, "rtems_timer_ident" );
- printf( "TA1 - timer 1 has id (0x%x)\n", tmid );
-
-/* after which is allowed to fire */
-
- Print_time();
-
- puts( "TA1 - rtems_timer_fire_after - timer 1 in 3 seconds" );
- status = rtems_timer_fire_after(
- tmid,
- 3 * TICKS_PER_SECOND,
- Delayed_resume,
- NULL
- );
- directive_failed( status, "rtems_timer_fire_after" );
-
- puts( "TA1 - rtems_task_suspend( RTEMS_SELF )" );
- status = rtems_task_suspend( RTEMS_SELF );
- directive_failed( status, "rtems_task_suspend" );
-
- Print_time();
-
-/* after which is reset and allowed to fire */
-
- puts( "TA1 - rtems_timer_fire_after - timer 1 in 3 seconds" );
- status = rtems_timer_fire_after(
- tmid,
- 3 * TICKS_PER_SECOND,
- Delayed_resume,
- NULL
- );
- directive_failed( status, "rtems_timer_fire_after" );
-
- puts( "TA1 - rtems_task_wake_after - 1 second" );
- status = rtems_task_wake_after( 1 * TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
-
- Print_time();
-
- puts( "TA1 - rtems_timer_reset - timer 1" );
- status = rtems_timer_reset( tmid );
- directive_failed( status, "rtems_timer_reset" );
-
- puts( "TA1 - rtems_task_suspend( RTEMS_SELF )" );
- status = rtems_task_suspend( RTEMS_SELF );
- directive_failed( status, "rtems_task_suspend" );
-
- Print_time();
-
- rtems_test_pause();
-
- /*
- * Reset the time since we do not know how long the user waited
- * before pressing <cr> at the pause. This insures that the
- * actual output matches the screen.
- */
-
- build_time( &time, 12, 31, 1988, 9, 0, 7, 0 );
-
- status = rtems_clock_set( &time );
- directive_failed( status, "rtems_clock_set" );
-
-/* after which is canceled */
-
- puts( "TA1 - rtems_timer_fire_after - timer 1 in 3 seconds" );
- status = rtems_timer_fire_after(
- tmid,
- 3 * TICKS_PER_SECOND,
- Delayed_resume,
- NULL
- );
- directive_failed( status, "rtems_timer_fire_after" );
-
- puts( "TA1 - rtems_timer_cancel - timer 1" );
- status = rtems_timer_cancel( tmid );
- directive_failed( status, "rtems_timer_cancel" );
-
-/* when which is allowed to fire */
-
- Print_time();
-
- status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
- directive_failed( status, "rtems_clock_get" );
-
- time.second += 3;
-
- puts( "TA1 - rtems_timer_fire_when - timer 1 in 3 seconds" );
- status = rtems_timer_fire_when( tmid, &time, Delayed_resume, NULL );
- directive_failed( status, "rtems_timer_fire_when" );
-
- puts( "TA1 - rtems_task_suspend( RTEMS_SELF )" );
- status = rtems_task_suspend( RTEMS_SELF );
- directive_failed( status, "rtems_task_suspend" );
-
- Print_time();
-
-/* when which is canceled */
-
- status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
- directive_failed( status, "rtems_clock_get" );
-
- time.second += 3;
-
- puts( "TA1 - rtems_timer_fire_when - timer 1 in 3 seconds" );
- status = rtems_timer_fire_when( tmid, &time, Delayed_resume, NULL );
- directive_failed( status, "rtems_timer_fire_when" );
-
- puts( "TA1 - rtems_task_wake_after - 1 second" );
- status = rtems_task_wake_after( 1 * TICKS_PER_SECOND );
- directive_failed( status, "rtems_task_wake_after" );
-
- Print_time();
-
- puts( "TA1 - rtems_timer_cancel - timer 1" );
- status = rtems_timer_cancel( tmid );
- directive_failed( status, "rtems_timer_cancel" );
-
-/* delete */
- puts( "TA1 - rtems_task_wake_after - YIELD (only task at priority)" );
- status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
- directive_failed( status, "rtems_task_wake_after" );
-
- puts( "TA1 - timer_deleting - timer 1" );
- status = rtems_timer_delete( tmid );
- directive_failed( status, "rtems_timer_delete" );
-
- puts( "*** END OF TEST 22 *** " );
- exit( 0 );
-}
diff --git a/testsuites/sptests/sp23/Makefile.am b/testsuites/sptests/sp23/Makefile.am
deleted file mode 100644
index 58d175b655..0000000000
--- a/testsuites/sptests/sp23/Makefile.am
+++ /dev/null
@@ -1,38 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-TEST = sp23
-
-MANAGERS = io dual_ported_memory
-
-C_FILES = init.c task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = scn doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/sptests.am
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/sptests/sp23/init.c b/testsuites/sptests/sp23/init.c
deleted file mode 100644
index 70964dd18e..0000000000
--- a/testsuites/sptests/sp23/init.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is a user initialization task and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- puts( "\n\n*** TEST 23 ***" );
-
- Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
-
- status = rtems_task_create(
- Task_name[ 1 ],
- 1,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_create of TA1" );
-
- status = rtems_task_start( Task_id[ 1 ], Task_1, 0 );
- directive_failed( status, "rtems_task_start of TA1" );
-
- Port_name[ 1 ] = rtems_build_name( 'D', 'P', '1', ' ' );
-
- status = rtems_port_create(
- Port_name[ 1 ],
- Internal_port_area,
- External_port_area,
- 0xff,
- &Port_id[ 1 ]
- );
- directive_failed( status, "rtems_port_create of DP1" );
-
- printf( "INIT - rtems_port_create - DP1 - int = %p ext = %p\n",
- Internal_port_area,
- External_port_area
- );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
diff --git a/testsuites/sptests/sp23/sp23.doc b/testsuites/sptests/sp23/sp23.doc
deleted file mode 100644
index 2f3cbe4aed..0000000000
--- a/testsuites/sptests/sp23/sp23.doc
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: test23
-
-directives:
- ex_init, ex_start, t_create, t_start, tm_tick, i_return, t_delete,
- m_ext2int, m_int2ext
-
-concepts:
-
- a. Verifies the dual ported RAM directives work correctly.
-
-output:
diff --git a/testsuites/sptests/sp23/sp23.scn b/testsuites/sptests/sp23/sp23.scn
deleted file mode 100644
index 8aef169c56..0000000000
--- a/testsuites/sptests/sp23/sp23.scn
+++ /dev/null
@@ -1,9 +0,0 @@
-*** TEST 23 ***
-INIT - rtems_port_create - DP1 - int = 0x1000 ext = 0x2000
-TA1 - rtems_port_ident - 0x28010001
-TA1 - rtems_port_external_to_internal - 0x200e => 0x100e
-TA1 - rtems_port_internal_to_external - 0x100e => 0x200e
-TA1 - rtems_port_external_to_internal - 0x300e => 0x300e
-TA1 - rtems_port_internal_to_external - 0x50e => 0x50e
-TA1 - rtems_port_delete - DP1
-*** END OF TEST 23 ***
diff --git a/testsuites/sptests/sp23/system.h b/testsuites/sptests/sp23/system.h
deleted file mode 100644
index 24679a900a..0000000000
--- a/testsuites/sptests/sp23/system.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_task Task_1(
- rtems_task_argument argument
-);
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MAXIMUM_PORTS 1
-#define CONFIGURE_INIT_TASK_STACK_SIZE (RTEMS_MINIMUM_STACK_SIZE * 2)
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#define CONFIGURE_EXTRA_TASK_STACKS (1 * RTEMS_MINIMUM_STACK_SIZE)
-
-#include <confdefs.h>
-
-/* global variables */
-
-TEST_EXTERN rtems_id Task_id[ 2 ]; /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 2 ]; /* array of task names */
-
-TEST_EXTERN rtems_id Port_id[ 2 ]; /* array of port ids */
-TEST_EXTERN rtems_name Port_name[ 2 ]; /* array of port names */
-
-#define Internal_port_area ((rtems_unsigned8 *) 0x00001000)
-#define External_port_area ((rtems_unsigned8 *) 0x00002000)
-
-#define Below_port_area ((rtems_unsigned8 *) 0x00000500)
-#define Above_port_area ((rtems_unsigned8 *) 0x00003000)
-
-/* end of include file */
diff --git a/testsuites/sptests/sp23/task1.c b/testsuites/sptests/sp23/task1.c
deleted file mode 100644
index ea1f8deab7..0000000000
--- a/testsuites/sptests/sp23/task1.c
+++ /dev/null
@@ -1,95 +0,0 @@
-/* Task_1
- *
- * This task verifies that the dual ported RAM directives work
- * correctly by converting external addresses to internal addresses and
- * internal addresses to external addresses.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task_1(
- rtems_task_argument argument
-)
-{
- rtems_id dpid;
- void *to_be_converted;
- void *converted;
- rtems_status_code status;
-
- status = rtems_port_ident( Port_name[ 1 ], &dpid );
- directive_failed( status, "rtems_port_ident" );
- printf( "TA1 - rtems_port_ident - 0x%08x\n", dpid );
-
- to_be_converted = &External_port_area[ 0xe ];
- status = rtems_port_external_to_internal(
- Port_id[ 1 ],
- to_be_converted,
- &converted
- );
- directive_failed( status, "rtems_port_external_to_internal" );
- printf(
- "TA1 - rtems_port_external_to_internal - %p => %p\n",
- to_be_converted,
- converted
- );
-
- to_be_converted = &Internal_port_area[ 0xe ];
- status = rtems_port_internal_to_external(
- Port_id[ 1 ],
- to_be_converted,
- &converted
- );
- directive_failed( status, "rtems_port_internal_to_external" );
- printf(
- "TA1 - rtems_port_internal_to_external - %p => %p\n",
- to_be_converted,
- converted
- );
-
- to_be_converted = &Above_port_area[ 0xe ];
- status = rtems_port_external_to_internal(
- Port_id[ 1 ],
- to_be_converted,
- &converted
- );
- directive_failed( status, "rtems_port_external_to_internal" );
- printf(
- "TA1 - rtems_port_external_to_internal - %p => %p\n",
- to_be_converted,
- converted
- );
-
- to_be_converted = &Below_port_area[ 0xe ];
- status = rtems_port_internal_to_external(
- Port_id[ 1 ],
- to_be_converted,
- &converted
- );
- directive_failed( status, "rtems_port_internal_to_external" );
- printf(
- "TA1 - rtems_port_internal_to_external - %p => %p\n",
- to_be_converted,
- converted
- );
-
- status = rtems_port_delete( Port_id[ 1 ] );
- directive_failed( status, "rtems_port_delete" );
- puts( "TA1 - rtems_port_delete - DP1" );
-
- puts( "*** END OF TEST 23 ***" );
- exit( 0 );
-}
diff --git a/testsuites/sptests/sp24/Makefile.am b/testsuites/sptests/sp24/Makefile.am
deleted file mode 100644
index a0b836b0f4..0000000000
--- a/testsuites/sptests/sp24/Makefile.am
+++ /dev/null
@@ -1,38 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-TEST = sp24
-
-MANAGERS = io event timer
-
-C_FILES = init.c resume.c task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = scn doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/sptests.am
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/sptests/sp24/init.c b/testsuites/sptests/sp24/init.c
deleted file mode 100644
index 541c08cc7d..0000000000
--- a/testsuites/sptests/sp24/init.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is a user initialization task and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_time_of_day time;
- rtems_unsigned32 index;
- rtems_status_code status;
-
- puts( "\n\n*** TEST 24 ***" );
-
- build_time( &time, 12, 31, 1988, 9, 0, 0, 0 );
-
- status = rtems_clock_set( &time );
- directive_failed( status, "rtems_clock_set" );
-
- Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
- Task_name[ 2 ] = rtems_build_name( 'T', 'A', '2', ' ' );
- Task_name[ 3 ] = rtems_build_name( 'T', 'A', '3', ' ' );
-
- Timer_name[ 1 ] = rtems_build_name( 'T', 'M', '1', ' ' );
- Timer_name[ 2 ] = rtems_build_name( 'T', 'M', '2', ' ' );
- Timer_name[ 3 ] = rtems_build_name( 'T', 'M', '3', ' ' );
-
- for ( index = 1 ; index <= 3 ; index++ ) {
- status = rtems_task_create(
- Task_name[ index ],
- 1,
- RTEMS_MINIMUM_STACK_SIZE * 2,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ index ]
- );
- directive_failed( status, "rtems_task_create loop" );
-
- status = rtems_timer_create(
- Timer_name[ index ],
- &Timer_id[ index ]
- );
- directive_failed( status, "rtems_timer_create loop" );
- }
-
- for ( index = 1 ; index <= 3 ; index++ ) {
- status = rtems_task_start( Task_id[ index ], Task_1_through_3, index );
- directive_failed( status, "rtems_task_start loop" );
- }
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
diff --git a/testsuites/sptests/sp24/resume.c b/testsuites/sptests/sp24/resume.c
deleted file mode 100644
index 0267bff50e..0000000000
--- a/testsuites/sptests/sp24/resume.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Resume_task
- *
- * This subprogram is scheduled as a timer service routine. When
- * it fires it resumes the task which is mapped to this timer.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_timer_service_routine Resume_task(
- rtems_id timer_id,
- void *ignored_address
-)
-{
- rtems_id task_to_resume;
- rtems_status_code status;
-
- task_to_resume = Task_id[ rtems_get_index( timer_id ) ];
- status = rtems_task_resume( task_to_resume );
- directive_failed_with_level( status, "rtems_task_resume", 1 );
-}
diff --git a/testsuites/sptests/sp24/sp24.doc b/testsuites/sptests/sp24/sp24.doc
deleted file mode 100644
index de9c617409..0000000000
--- a/testsuites/sptests/sp24/sp24.doc
+++ /dev/null
@@ -1,50 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: test24
-
-directives:
- ex_init, ex_start, t_create, t_start, tm_tick, i_return, t_ident,
- ev_receive
-
-concepts:
-
- a. This test is a cyclic version of test1. The times printed by
- each test should not skew as in test1 (see output section).
-
- b. Verifies system can create and start both the executive's system
- initialization and idle task.
-
- c. Verifies executive can swap between three application tasks at the
- same priority and the executive's internal idle task.
-
- d. Verifies can print strings to the CRT on port 2 of the mvme136 board
- using Print and Println in the board support package.
-
- e. Verifies interrupt handler can handler a task switch from an interrupt
- as specified with the i_return directive.
-
- f. Verifies executive initialization performed correctly.
-
- g. Verifies the executive trap handler except for the halt function.
-
- h. Verifies that a task can get the task identification number of itself.
-
-output:
- "TA1" is printed once every 5 seconds. "TA2" is printed once
- every 10 seconds. "TA3" is printed once every 15 seconds.
-
- The times printed should be multiples of 5 seconds for TA1, 10 seconds
- for TA2, and 15 seconds for TA3. If this does not happen, the calendar
- time does not correspond correctly to the number of ticks.
diff --git a/testsuites/sptests/sp24/sp24.scn b/testsuites/sptests/sp24/sp24.scn
deleted file mode 100644
index 96a58f35e3..0000000000
--- a/testsuites/sptests/sp24/sp24.scn
+++ /dev/null
@@ -1,16 +0,0 @@
-*** TEST 24 ***
-TA1 - rtems_clock_get - 09:00:00 12/31/1988
-TA2 - rtems_clock_get - 09:00:00 12/31/1988
-TA3 - rtems_clock_get - 09:00:00 12/31/1988
-TA1 - rtems_clock_get - 09:00:05 12/31/1988
-TA2 - rtems_clock_get - 09:00:10 12/31/1988
-TA1 - rtems_clock_get - 09:00:10 12/31/1988
-TA3 - rtems_clock_get - 09:00:15 12/31/1988
-TA1 - rtems_clock_get - 09:00:15 12/31/1988
-TA2 - rtems_clock_get - 09:00:20 12/31/1988
-TA1 - rtems_clock_get - 09:00:20 12/31/1988
-TA1 - rtems_clock_get - 09:00:25 12/31/1988
-TA3 - rtems_clock_get - 09:00:30 12/31/1988
-TA2 - rtems_clock_get - 09:00:30 12/31/1988
-TA1 - rtems_clock_get - 09:00:30 12/31/1988
-*** END OF TEST 24 ***
diff --git a/testsuites/sptests/sp24/system.h b/testsuites/sptests/sp24/system.h
deleted file mode 100644
index e048dc5722..0000000000
--- a/testsuites/sptests/sp24/system.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_timer_service_routine Resume_task(
- rtems_id timer_id,
- void *ignored_address
-);
-
-rtems_task Task_1_through_3(
- rtems_task_argument argument
-);
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MAXIMUM_TIMERS 3
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#define CONFIGURE_EXTRA_TASK_STACKS (3 * RTEMS_MINIMUM_STACK_SIZE)
-
-#include <confdefs.h>
-
-/* global variables */
-
-TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
-
-TEST_EXTERN rtems_id Timer_id[ 4 ]; /* array of timer ids */
-TEST_EXTERN rtems_name Timer_name[ 4 ]; /* array of timer names */
-
-/* end of include file */
diff --git a/testsuites/sptests/sp24/task1.c b/testsuites/sptests/sp24/task1.c
deleted file mode 100644
index 9bad11d046..0000000000
--- a/testsuites/sptests/sp24/task1.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/* Task_1_through_3
- *
- * This task is a cyclic version of test1 to asssure that the times
- * displayed are not skewed as in test1. "TA1" is printed once every
- * 5 seconds, "TA2" is printed once every 10 seconds, and "TA3" is
- * printed once every 15 seconds. The times displayed should be
- * in multiples of 5, 10, and 15 for TA1, TA2, and TA3 respectively.
- * If the times are skewed from these values, then the calendar time
- * does not correspond correctly with the number of ticks.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task_1_through_3(
- rtems_task_argument argument
-)
-{
- rtems_id tid;
- rtems_time_of_day time;
- rtems_status_code status;
-
- status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
- directive_failed( status, "rtems_task_ident of self" );
-
- while ( FOREVER ) {
- status = rtems_timer_fire_after(
- Timer_id[ argument ],
- task_number( tid ) * 5 * TICKS_PER_SECOND,
- Resume_task,
- NULL
- );
- directive_failed( status, "tm_fire_after failed" );
-
- status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
- directive_failed( status, "rtems_clock_get failed" );
-
- if ( time.second >= 35 ) {
- puts( "*** END OF TEST 24 ***" );
- exit( 0 );
- }
-
- put_name( Task_name[ task_number( tid ) ], FALSE );
- print_time( " - rtems_clock_get - ", &time, "\n" );
-
- status = rtems_task_suspend( RTEMS_SELF );
- directive_failed( status, "rtems_task_suspend" );
- }
-}
diff --git a/testsuites/sptests/sp25/Makefile.am b/testsuites/sptests/sp25/Makefile.am
deleted file mode 100644
index a785691f09..0000000000
--- a/testsuites/sptests/sp25/Makefile.am
+++ /dev/null
@@ -1,38 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-TEST = sp25
-
-MANAGERS = io region
-
-C_FILES = init.c task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = scn doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/sptests.am
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/sptests/sp25/init.c b/testsuites/sptests/sp25/init.c
deleted file mode 100644
index fd4fca8cca..0000000000
--- a/testsuites/sptests/sp25/init.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is a user initialization task and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- puts( "\n\n*** TEST 25 ***" );
-
- Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
-
- status = rtems_task_create(
- Task_name[ 1 ],
- BASE_PRIORITY,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_create of TA1" );
-
- status = rtems_task_start( Task_id[ 1 ], Task_1, 0 );
- directive_failed( status, "rtems_task_start of TA1" );
-
- Region_name[ 1 ] = rtems_build_name('R', 'N', '0', '1');
-
-
- status = rtems_region_create(
- Region_name[ 1 ],
- Area_1,
- sizeof( Area_1 ),
- 64,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Region_id[ 1 ]
- );
- directive_failed( status, "rtems_region_create of RN1" );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
diff --git a/testsuites/sptests/sp25/sp25.doc b/testsuites/sptests/sp25/sp25.doc
deleted file mode 100644
index 5312465362..0000000000
--- a/testsuites/sptests/sp25/sp25.doc
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: test25
-
-directives:
- task_create
- task_start
- task_delete
- region_create
- region_ident
- region_get_segment
- region_return_segment
- region_delete
-
-concepts:
-
- a. Verifies that the heap maintains it's integrity trhough a series
- on region_get_segments and region_return_segments.
-
diff --git a/testsuites/sptests/sp25/sp25.scn b/testsuites/sptests/sp25/sp25.scn
deleted file mode 100644
index 090bc35856..0000000000
--- a/testsuites/sptests/sp25/sp25.scn
+++ /dev/null
@@ -1,29 +0,0 @@
-*** TEST 25 ***
-TA1 - rtems_region_ident - 0x24010002
-TA1 - rtems_region_get_segment - wait on 64 byte segment from region 1
-TA1 - got segment from region 1 - 0x0000f9b8
-TA1 - rtems_region_get_segment - wait on 128 byte segment from region 1
-TA1 - got segment from region 1 - 0x0000f930
-TA1 - rtems_region_get_segment - wait on 256 byte segment from region 1
-TA1 - got segment from region 1 - 0x0000f828
-TA1 - rtems_region_get_segment - wait on 512 byte segment from region 1
-TA1 - got segment from region 1 - 0x0000f620
-TA1 - rtems_region_get_segment - wait on 1024 byte segment from region 1
-TA1 - got segment from region 1 - 0x0000f218
-TA1 - rtems_region_get_segment - wait on 2048 byte segment from region 1
-TA1 - got segment from region 1 - 0x0000ea10
-TA1 - rtems_region_get_segment - wait on 4096 byte segment from region 1
-TA1 - got segment from region 1 - 0x0000da08
-TA1 - rtems_region_get_segment - wait on 8192 byte segment from region 1
-TA1 - got segment from region 1 - 0x0000ba00
-<pause>
-TA1 - rtems_region_return_segment - return segment to region 1 - 0x0000f828
-TA1 - rtems_region_return_segment - return segment to region 1 - 0x0000f620
-TA1 - rtems_region_return_segment - return segment to region 1 - 0x0000f9b8
-TA1 - rtems_region_return_segment - return segment to region 1 - 0x0000f930
-TA1 - rtems_region_return_segment - return segment to region 1 - 0x0000da08
-TA1 - rtems_region_return_segment - return segment to region 1 - 0x0000ea10
-TA1 - rtems_region_return_segment - return segment to region 1 - 0x0000ba00
-TA1 - rtems_region_return_segment - return segment to region 1 - 0x0000f218
-TA1 - rtems_region_delete - walks heap if debug enabled
-*** END OF TEST 25 ***
diff --git a/testsuites/sptests/sp25/system.h b/testsuites/sptests/sp25/system.h
deleted file mode 100644
index 05b90c4164..0000000000
--- a/testsuites/sptests/sp25/system.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_task Task_1(
- rtems_task_argument argument
-);
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MAXIMUM_REGIONS 1
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* global variables */
-
-TEST_EXTERN rtems_id Task_id[ 6 ]; /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 6 ]; /* array of task names */
-TEST_EXTERN rtems_id Region_id[ 2 ]; /* array of region ids */
-TEST_EXTERN rtems_name Region_name[ 2 ]; /* array of region names */
-
-TEST_EXTERN rtems_unsigned8 Area_1[64000] CPU_STRUCTURE_ALIGNMENT;
-
-#define BASE_PRIORITY 140
-
-#define Put_address_from_area_1( _to_be_printed ) \
- printf( "0x%08lx", \
- (unsigned long) ((rtems_unsigned8 *)(_to_be_printed) - Area_1 ) )
-
-/* end of include file */
diff --git a/testsuites/sptests/sp25/task1.c b/testsuites/sptests/sp25/task1.c
deleted file mode 100644
index df9207429d..0000000000
--- a/testsuites/sptests/sp25/task1.c
+++ /dev/null
@@ -1,240 +0,0 @@
-/* Task_1
- *
- * This routine serves as a test task. It tests the region manager.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task_1(
- rtems_task_argument argument
-)
-{
- void *address_1;
- void *address_2;
- void *address_3;
- void *address_4;
- void *address_5;
- void *address_6;
- void *address_7;
- void *address_8;
- rtems_status_code status;
- rtems_id region_id;
-
- status = rtems_region_ident(Region_name[ 1 ], &region_id);
- printf( "TA1 - rtems_region_ident - 0x%08x\n", region_id );
- directive_failed(status, "rtems_region_ident of RN01");
-
- puts(
- "TA1 - rtems_region_get_segment - wait on 64 byte segment from region 1"
- );
- rtems_region_get_segment(
- Region_id[ 1 ],
- 64,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT,
- &address_1
- );
- directive_failed( status, "rtems_region_get_segment" );
- puts_nocr( "TA1 - got segment from region 1 - " );
- Put_address_from_area_1( address_1 );
- new_line;
-
- puts(
- "TA1 - rtems_region_get_segment - wait on 128 byte segment from region 1"
- );
- rtems_region_get_segment(
- Region_id[ 1 ],
- 128,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT,
- &address_2
- );
- directive_failed( status, "rtems_region_get_segment" );
- puts_nocr( "TA1 - got segment from region 1 - " );
- Put_address_from_area_1( address_2 );
- new_line;
-
- puts(
- "TA1 - rtems_region_get_segment - wait on 256 byte segment from region 1"
- );
- rtems_region_get_segment(
- Region_id[ 1 ],
- 256,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT,
- &address_3
- );
- directive_failed( status, "rtems_region_get_segment" );
- puts_nocr( "TA1 - got segment from region 1 - " );
- Put_address_from_area_1( address_3 );
- new_line;
-
- puts(
- "TA1 - rtems_region_get_segment - wait on 512 byte segment from region 1"
- );
- rtems_region_get_segment(
- Region_id[ 1 ],
- 512,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT,
- &address_4
- );
- directive_failed( status, "rtems_region_get_segment" );
- puts_nocr( "TA1 - got segment from region 1 - " );
- Put_address_from_area_1( address_4 );
- new_line;
-
- puts(
- "TA1 - rtems_region_get_segment - wait on 1024 byte segment from region 1"
- );
- rtems_region_get_segment(
- Region_id[ 1 ],
- 1024,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT,
- &address_5
- );
- directive_failed( status, "rtems_region_get_segment" );
- puts_nocr( "TA1 - got segment from region 1 - " );
- Put_address_from_area_1( address_5 );
- new_line;
-
- puts(
- "TA1 - rtems_region_get_segment - wait on 2048 byte segment from region 1"
- );
- rtems_region_get_segment(
- Region_id[ 1 ],
- 2048,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT,
- &address_6
- );
- directive_failed( status, "rtems_region_get_segment" );
- puts_nocr( "TA1 - got segment from region 1 - " );
- Put_address_from_area_1( address_6 );
- new_line;
-
- puts(
- "TA1 - rtems_region_get_segment - wait on 4096 byte segment from region 1"
- );
- rtems_region_get_segment(
- Region_id[ 1 ],
- 4096,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT,
- &address_7
- );
- directive_failed( status, "rtems_region_get_segment" );
- puts_nocr( "TA1 - got segment from region 1 - " );
- Put_address_from_area_1( address_7 );
- new_line;
-
- puts(
- "TA1 - rtems_region_get_segment - wait on 8192 byte segment from region 1"
- );
- rtems_region_get_segment(
- Region_id[ 1 ],
- 8192,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT,
- &address_8
- );
- directive_failed( status, "rtems_region_get_segment" );
- puts_nocr( "TA1 - got segment from region 1 - " );
- Put_address_from_area_1( address_8 );
- new_line;
-
-rtems_test_pause();
-
- puts_nocr(
- "TA1 - rtems_region_return_segment - return segment to region 1 - "
- );
- Put_address_from_area_1( address_3 );
- status = rtems_region_return_segment( Region_id[ 1 ], address_3 );
- directive_failed( status, "rtems_region_return_segment" );
- new_line;
- address_3 = 0;
-
- puts_nocr(
- "TA1 - rtems_region_return_segment - return segment to region 1 - "
- );
- Put_address_from_area_1( address_4 );
- status = rtems_region_return_segment( Region_id[ 1 ], address_4 );
- directive_failed( status, "rtems_region_return_segment" );
- new_line;
- address_4 = 0;
-
- puts_nocr(
- "TA1 - rtems_region_return_segment - return segment to region 1 - "
- );
- Put_address_from_area_1( address_1 );
- status = rtems_region_return_segment( Region_id[ 1 ], address_1 );
- directive_failed( status, "rtems_region_return_segment" );
- new_line;
- address_1 = 0;
-
- puts_nocr(
- "TA1 - rtems_region_return_segment - return segment to region 1 - "
- );
- Put_address_from_area_1( address_2 );
- status = rtems_region_return_segment( Region_id[ 1 ], address_2 );
- directive_failed( status, "rtems_region_return_segment" );
- new_line;
- address_2 = 0;
-
- puts_nocr(
- "TA1 - rtems_region_return_segment - return segment to region 1 - "
- );
- Put_address_from_area_1( address_7 );
- status = rtems_region_return_segment( Region_id[ 1 ], address_7 );
- directive_failed( status, "rtems_region_return_segment" );
- new_line;
- address_7 = 0;
-
- puts_nocr(
- "TA1 - rtems_region_return_segment - return segment to region 1 - "
- );
- Put_address_from_area_1( address_6 );
- status = rtems_region_return_segment( Region_id[ 1 ], address_6 );
- directive_failed( status, "rtems_region_return_segment" );
- new_line;
- address_6 = 0;
-
- puts_nocr(
- "TA1 - rtems_region_return_segment - return segment to region 1 - "
- );
- Put_address_from_area_1( address_8 );
- status = rtems_region_return_segment( Region_id[ 1 ], address_8 );
- directive_failed( status, "rtems_region_return_segment" );
- new_line;
- address_8 = 0;
-
- puts_nocr(
- "TA1 - rtems_region_return_segment - return segment to region 1 - "
- );
- Put_address_from_area_1( address_5 );
- status = rtems_region_return_segment( Region_id[ 1 ], address_5 );
- directive_failed( status, "rtems_region_return_segment" );
- new_line;
- address_5 = 0;
-
- puts( "TA1 - rtems_region_delete - walks heap if debug enabled" );
- rtems_region_delete(Region_id[ 1 ]);
-
- puts( "*** END OF TEST 25 ***" );
- exit( 0 );
-}
diff --git a/testsuites/sptests/sp26/Makefile.am b/testsuites/sptests/sp26/Makefile.am
deleted file mode 100644
index 754b94cef0..0000000000
--- a/testsuites/sptests/sp26/Makefile.am
+++ /dev/null
@@ -1,38 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-TEST = sp26
-
-MANAGERS = io region event
-
-C_FILES = init.c task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = scn doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/sptests.am
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/sptests/sp26/init.c b/testsuites/sptests/sp26/init.c
deleted file mode 100644
index 7682ad0011..0000000000
--- a/testsuites/sptests/sp26/init.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is a user initialization task and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- puts( "\n\n*** TEST 26 ***" );
-
- task1();
- /* does not return */
- puts( "Init - task1 should not have returned" );
- exit( 0 );
-}
diff --git a/testsuites/sptests/sp26/sp26.doc b/testsuites/sptests/sp26/sp26.doc
deleted file mode 100644
index 7ad648ea00..0000000000
--- a/testsuites/sptests/sp26/sp26.doc
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: sp26
-
-directives:
- task_is_suspended
-
-concepts:
-
- a. task_is_suspended operates correctly.
-
diff --git a/testsuites/sptests/sp26/sp26.scn b/testsuites/sptests/sp26/sp26.scn
deleted file mode 100644
index 0e3faf5cd7..0000000000
--- a/testsuites/sptests/sp26/sp26.scn
+++ /dev/null
@@ -1,8 +0,0 @@
-*** TEST 26 ***
-subTask2 - Task 1 suspended? - should be 0: 0
-subTask1 - Event sent
-subTask2 - Task 1 suspended? - should be 1: 1
-subTask2 - Task 1 suspended? - should be 0: 0
-subTask1 - Back to task 1
-subTask2 - Task 1 suspended? - should be 1: 1
-*** END OF TEST 26 ***
diff --git a/testsuites/sptests/sp26/system.h b/testsuites/sptests/sp26/system.h
deleted file mode 100644
index 5f13e865b3..0000000000
--- a/testsuites/sptests/sp26/system.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-void task1(void);
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MAXIMUM_REGIONS 1
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* global variables */
-
-TEST_EXTERN rtems_id Task_id[ 6 ]; /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 6 ]; /* array of task names */
-TEST_EXTERN rtems_id Region_id[ 2 ]; /* array of region ids */
-TEST_EXTERN rtems_name Region_name[ 2 ]; /* array of region names */
-
-TEST_EXTERN rtems_unsigned8 Area_1[64000] CPU_STRUCTURE_ALIGNMENT;
-
-#define BASE_PRIORITY 140
-
-#define Put_address_from_area_1( _to_be_printed ) \
- printf( "0x%08lx", \
- (unsigned long) ((rtems_unsigned8 *)(_to_be_printed) - Area_1 ) )
-
-/* end of include file */
diff --git a/testsuites/sptests/sp26/task1.c b/testsuites/sptests/sp26/task1.c
deleted file mode 100644
index f29adb2701..0000000000
--- a/testsuites/sptests/sp26/task1.c
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <stdio.h>
-#include <rtems.h>
-#include <rtems/error.h>
-
-static rtems_id taskId1;
-static rtems_id taskId2;
-rtems_interval ticksPerSecond;
-
-static int
-isSuspended (rtems_id tid)
-{
- rtems_status_code sc;
-
- sc = rtems_task_is_suspended (tid);
- if (sc == RTEMS_ALREADY_SUSPENDED)
- return 1;
- if (sc != RTEMS_SUCCESSFUL)
- printf ("rtems_task_is_suspended: %s\n", rtems_status_text (sc));
- return 0;
-}
-
-static void
-subTask1 (rtems_task_argument arg)
-{
- rtems_status_code sc;
-
- rtems_task_wake_after (ticksPerSecond * 3);
- sc = rtems_event_send (taskId2, 1);
- if (sc != RTEMS_SUCCESSFUL) {
- printf ("subTask1 - Can't send event (%d)\n", sc);
- rtems_task_suspend (RTEMS_SELF);
- }
- rtems_task_wake_after (ticksPerSecond * 3);
- printf ("subTask1 - Event sent\n");
- rtems_task_suspend (RTEMS_SELF);
- printf ("subTask1 - Back to task 1\n");
- rtems_task_wake_after (ticksPerSecond * 3);
- rtems_task_suspend (RTEMS_SELF);
-}
-
-static void
-subTask2 (rtems_task_argument arg)
-{
- rtems_status_code sc;
- rtems_event_set ev;
-
- rtems_task_wake_after (ticksPerSecond * 1);
- sc = rtems_event_receive (1, RTEMS_WAIT|RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &ev);
- if (sc != RTEMS_SUCCESSFUL) {
- printf ("subTask2 - Can't receive event (%d)\n", sc);
- rtems_task_suspend (RTEMS_SELF);
- }
- printf ("subTask2 - Task 1 suspended? - should be 0: %d\n",
- isSuspended (taskId1));
- rtems_task_wake_after (ticksPerSecond * 4);
- printf ("subTask2 - Task 1 suspended? - should be 1: %d\n",
- isSuspended (taskId1));
- rtems_task_resume (taskId1);
- printf ("subTask2 - Task 1 suspended? - should be 0: %d\n",
- isSuspended (taskId1));
- rtems_task_wake_after (ticksPerSecond * 4);
- printf ("subTask2 - Task 1 suspended? - should be 1: %d\n",
- isSuspended (taskId1));
-
- puts( "*** END OF TEST 26 ***" );
- exit( 0 );
-}
-
-static void
-createTask (char c, rtems_id *tid)
-{
- rtems_status_code sc;
-
- sc = rtems_task_create (rtems_build_name('S','u','b',c),
- 100,
- RTEMS_MINIMUM_STACK_SIZE * 4,
- RTEMS_PREEMPT|RTEMS_NO_TIMESLICE|RTEMS_NO_ASR|RTEMS_INTERRUPT_LEVEL(0),
- RTEMS_NO_FLOATING_POINT|RTEMS_LOCAL,
- tid);
- if (sc != RTEMS_SUCCESSFUL) {
- printf ("Can't create task (%d)\n", sc);
- rtems_task_suspend (RTEMS_SELF);
- }
-}
-
-static void
-startTask (rtems_id tid, rtems_task_entry entry_point)
-{
- rtems_status_code sc;
-
- sc = rtems_task_start (tid, entry_point, 0);
- if (sc != RTEMS_SUCCESSFUL) {
- printf ("Can't start task (%d)\n", sc);
- rtems_task_suspend (RTEMS_SELF);
- }
-}
-
-void
-task1 (void)
-{
- rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticksPerSecond);
- createTask ('1', &taskId1);
- createTask ('2', &taskId2);
- startTask (taskId1, subTask1);
- startTask (taskId2, subTask2);
- rtems_task_suspend (RTEMS_SELF);
-}
diff --git a/testsuites/sptests/sp27/Makefile.am b/testsuites/sptests/sp27/Makefile.am
deleted file mode 100644
index 1cb20586dd..0000000000
--- a/testsuites/sptests/sp27/Makefile.am
+++ /dev/null
@@ -1,35 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-TEST = sp27
-
-MANAGERS = all
-
-C_FILES = init.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-DOCTYPES = scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/sptests.am
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/sptests/sp27/init.c b/testsuites/sptests/sp27/init.c
deleted file mode 100644
index 4ae5befb78..0000000000
--- a/testsuites/sptests/sp27/init.c
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Test for rtems_semaphore_flush
- *
- * $Id$
- */
-
-#include <bsp.h>
-
-rtems_task Init (rtems_task_argument argument);
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MICROSECONDS_PER_TICK 52429
-
-#define CONFIGURE_INIT
-
-#include <confdefs.h>
-
-#include <rtems/error.h>
-#include <stdio.h>
-
-#define NTASK 4
-
-rtems_id semaphore;
-volatile int flags[NTASK];
-
-rtems_task
-subtask (rtems_task_argument arg)
-{
- rtems_status_code sc;
-
- for (;;) {
- flags[arg]++;
- sc = rtems_semaphore_obtain (semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
- if (sc == RTEMS_SUCCESSFUL)
- puts ("Obtained semaphore -- and should not have done so!");
- else if (sc != RTEMS_UNSATISFIED)
- printf ("Can't get semaphore: %s\n", rtems_status_text (sc));
- }
-}
-
-void
-starttask (int arg)
-{
- rtems_id tid;
- rtems_status_code sc;
- rtems_task_priority priority;
-
- rtems_task_set_priority (RTEMS_SELF, RTEMS_CURRENT_PRIORITY, &priority);
- sc = rtems_task_create (rtems_build_name ('S', 'R', 'V', arg + 'A'),
- priority,
- 10000,
- RTEMS_PREEMPT|RTEMS_NO_TIMESLICE|RTEMS_NO_ASR|RTEMS_INTERRUPT_LEVEL(0),
- RTEMS_NO_FLOATING_POINT|RTEMS_LOCAL,
- &tid);
- if (sc != RTEMS_SUCCESSFUL) {
- printf ("Can't create task: %s\n", rtems_status_text (sc));
- rtems_task_suspend (RTEMS_SELF);
- }
- sc = rtems_task_start (tid, subtask, arg);
- if (sc != RTEMS_SUCCESSFUL) {
- printf ("Can't start task: %s\n", rtems_status_text (sc));
- rtems_task_suspend (RTEMS_SELF);
- }
-}
-
-rtems_task
-Init (rtems_task_argument ignored)
-{
- int pass, i;
- rtems_status_code sc;
-
- puts("**** Semaphore flush test ****");
- sc = rtems_semaphore_create (
- rtems_build_name ('S', 'E', 'M', 'F'),
- 0,
- RTEMS_LOCAL|RTEMS_BINARY_SEMAPHORE|RTEMS_NO_INHERIT_PRIORITY|RTEMS_NO_PRIORITY_CEILING|RTEMS_FIFO,
- 0,
- &semaphore);
- if (sc != RTEMS_SUCCESSFUL) {
- printf ("Can't flush semaphore: %s\n", rtems_status_text (sc));
- exit (1);
- }
- for (i = 0 ; i < NTASK ; i++)
- starttask (i);
- for (pass = 1 ; pass < 10 ; pass++) {
- rtems_task_wake_after (1);
- for (i = 0 ; i < NTASK ; i++) {
- if (flags[i] != pass)
- printf ("flags[%d] = %d -- expected %d\n", i, flags[i], pass);
- }
- sc = rtems_semaphore_flush (semaphore);
- if (sc != RTEMS_SUCCESSFUL) {
- printf ("Can't flush semaphore: %s\n", rtems_status_text (sc));
- exit (1);
- }
- }
- puts ("**** Semaphore flush test succeeded ****");
- exit (1);
-}
diff --git a/testsuites/sptests/sp27/sp27.doc b/testsuites/sptests/sp27/sp27.doc
deleted file mode 100644
index e69de29bb2..0000000000
--- a/testsuites/sptests/sp27/sp27.doc
+++ /dev/null
diff --git a/testsuites/sptests/sp27/sp27.scn b/testsuites/sptests/sp27/sp27.scn
deleted file mode 100644
index 7c1c36e95e..0000000000
--- a/testsuites/sptests/sp27/sp27.scn
+++ /dev/null
@@ -1,2 +0,0 @@
-**** Semaphore flush test ****
-**** Semaphore flush test succeeded ****
diff --git a/testsuites/sptests/sp28/Makefile.am b/testsuites/sptests/sp28/Makefile.am
deleted file mode 100644
index 5f966b4eb2..0000000000
--- a/testsuites/sptests/sp28/Makefile.am
+++ /dev/null
@@ -1,35 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-TEST = sp28
-
-MANAGERS = all
-
-C_FILES = init.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-DOCTYPES = scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/sptests.am
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/sptests/sp28/init.c b/testsuites/sptests/sp28/init.c
deleted file mode 100644
index f6f7d70218..0000000000
--- a/testsuites/sptests/sp28/init.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * $Id$
- */
-
-#define TEST_INIT
-#include <tmacros.h>
-
-rtems_task Init(rtems_task_argument argument);
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-#define CONFIGURE_MAXIMUM_USER_EXTENSIONS 2
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-#define CONFIGURE_MICROSECONDS_PER_TICK 52429
-
-#define CONFIGURE_MICROSECONDS_INIT
-
-#include <confdefs.h>
-
-#include <bsp.h>
-#include <rtems/error.h>
-#include <stdio.h>
-
-volatile void *taskvar;
-
-rtems_task
-subtask (rtems_task_argument arg)
-{
- int localvar = arg;
- int i;
- rtems_status_code sc;
-
- sc = rtems_task_variable_add (RTEMS_SELF, &taskvar, NULL);
- if (sc != RTEMS_SUCCESSFUL) {
- printf ("Can't add task variable: %s\n", rtems_status_text (sc));
- rtems_task_suspend (RTEMS_SELF);
- }
- taskvar = (void *)localvar;
- while (localvar < 1000) {
- localvar++;
- rtems_task_wake_after (0);
- taskvar = (void *)((int)taskvar + 1);
- rtems_task_wake_after (0);
- if ((int)taskvar != localvar) {
- printf ("Task:%d taskvar:%d localvar:%d\n", arg, (int)taskvar, localvar);
- rtems_task_suspend (RTEMS_SELF);
- }
- }
- sc = rtems_task_variable_delete (RTEMS_SELF, &taskvar);
- if (sc != RTEMS_SUCCESSFUL) {
- printf ("Can't delete task variable: %s\n", rtems_status_text (sc));
- rtems_task_suspend (RTEMS_SELF);
- }
- for (i = 0 ; ; i++) {
- taskvar = (void *)(localvar = 100 * arg);
- rtems_task_wake_after (0);
- if ((int)taskvar == localvar) {
- printf ("Task:%d taskvar:%d localvar:%d\n", arg, (int)taskvar, localvar);
- rtems_task_suspend (RTEMS_SELF);
- }
- if ((arg == 3) && (i == 100)) {
- printf ("Task variables test succeeded.\n");
- exit (0);
- }
- }
-}
-
-void
-starttask (int arg)
-{
- rtems_id tid;
- rtems_status_code sc;
-
- sc = rtems_task_create (rtems_build_name ('S', 'R', 'V', arg + 'A'),
- 100,
- 10000,
- RTEMS_PREEMPT|RTEMS_NO_TIMESLICE|RTEMS_NO_ASR|RTEMS_INTERRUPT_LEVEL(0),
- RTEMS_NO_FLOATING_POINT|RTEMS_LOCAL,
- &tid);
- if (sc != RTEMS_SUCCESSFUL) {
- printf ("Can't create task: %s\n", rtems_status_text (sc));
- rtems_task_suspend (RTEMS_SELF);
- }
- sc = rtems_task_start (tid, subtask, arg);
- if (sc != RTEMS_SUCCESSFUL) {
- printf ("Can't start task: %s\n", rtems_status_text (sc));
- rtems_task_suspend (RTEMS_SELF);
- }
-}
-
-rtems_task
-Init (rtems_task_argument ignored)
-{
- starttask (1);
- starttask (2);
- starttask (3);
- rtems_task_suspend (RTEMS_SELF);
-}
diff --git a/testsuites/sptests/sp28/sp28.doc b/testsuites/sptests/sp28/sp28.doc
deleted file mode 100644
index e69de29bb2..0000000000
--- a/testsuites/sptests/sp28/sp28.doc
+++ /dev/null
diff --git a/testsuites/sptests/sp28/sp28.scn b/testsuites/sptests/sp28/sp28.scn
deleted file mode 100644
index e0d59a3559..0000000000
--- a/testsuites/sptests/sp28/sp28.scn
+++ /dev/null
@@ -1,3 +0,0 @@
-*** START OF TEST SP28 ***
-Task variables test succeeded.
-*** END OF TEST SP28 ***
diff --git a/testsuites/sptests/sp29/Makefile.am b/testsuites/sptests/sp29/Makefile.am
deleted file mode 100644
index e34dfda22c..0000000000
--- a/testsuites/sptests/sp29/Makefile.am
+++ /dev/null
@@ -1,35 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-TEST = sp29
-
-MANAGERS = all
-
-C_FILES = init.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-DOCTYPES = scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/sptests.am
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/sptests/sp29/init.c b/testsuites/sptests/sp29/init.c
deleted file mode 100644
index bf866bd32e..0000000000
--- a/testsuites/sptests/sp29/init.c
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * Test for rtems_semaphore_flush
- *
- * $Id$
- */
-
-#include <bsp.h>
-
-rtems_task Init (rtems_task_argument argument);
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_INIT
-
-#include <confdefs.h>
-
-#include <rtems/error.h>
-#include <stdio.h>
-
-rtems_interval ticksPerSecond;
-
-rtems_task
-subtask (rtems_task_argument arg)
-{
- rtems_status_code sc;
- rtems_id sem = (rtems_id)arg;
-
- for (;;) {
- rtems_task_wake_after (ticksPerSecond * 2);
-
- sc = rtems_semaphore_release (sem);
- if (sc != RTEMS_SUCCESSFUL)
- printf ("%d: Can't release semaphore: %s\n", __LINE__, rtems_status_text (sc));
- }
-}
-
-void
-startTask (rtems_id arg)
-{
- rtems_id tid;
- rtems_status_code sc;
-
- sc = rtems_task_create (rtems_build_name ('S', 'R', 'V', 'A'),
- 100,
- 10000,
- RTEMS_PREEMPT|RTEMS_NO_TIMESLICE|RTEMS_NO_ASR|RTEMS_INTERRUPT_LEVEL(0),
- RTEMS_NO_FLOATING_POINT|RTEMS_LOCAL,
- &tid);
- if (sc != RTEMS_SUCCESSFUL) {
- printf ("Can't create task: %s\n", rtems_status_text (sc));
- rtems_task_suspend (RTEMS_SELF);
- }
- sc = rtems_task_start (tid, subtask, arg);
- if (sc != RTEMS_SUCCESSFUL) {
- printf ("Can't start task: %s\n", rtems_status_text (sc));
- rtems_task_suspend (RTEMS_SELF);
- }
-}
-
-rtems_task Init (rtems_task_argument ignored)
-{
- int i;
- rtems_id semrec, semnorec;
- rtems_status_code sc;
- rtems_interval then, now;
-
- puts( "*** SP29 - SIMPLE SEMAPHORE TEST ***" );
- puts( "This test only prints on errors." );
-
- sc = rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticksPerSecond);
- if (sc != RTEMS_SUCCESSFUL) {
- printf ("Can't get ticks per second: %s\n", rtems_status_text (sc));
- exit (1);
- }
- sc = rtems_semaphore_create (rtems_build_name ('S', 'M', 'r', 'c'),
- 1,
- RTEMS_PRIORITY|RTEMS_BINARY_SEMAPHORE|RTEMS_INHERIT_PRIORITY |RTEMS_NO_PRIORITY_CEILING|RTEMS_LOCAL,
- 0,
- &semrec);
- if (sc != RTEMS_SUCCESSFUL) {
- printf ("%d: Can't create recursive-lock semaphore: %s\n", __LINE__, rtems_status_text (sc));
- exit (1);
- }
- sc = rtems_semaphore_create (rtems_build_name ('S', 'M', 'n', 'c'),
- 1,
- RTEMS_PRIORITY|RTEMS_SIMPLE_BINARY_SEMAPHORE|RTEMS_INHERIT_PRIORITY |RTEMS_NO_PRIORITY_CEILING|RTEMS_LOCAL,
- 0,
- &semnorec);
- if (sc != RTEMS_SUCCESSFUL) {
- printf ("%d: Can't create non-recursive-lock semaphore: %s\n", __LINE__, rtems_status_text (sc));
- exit (1);
- }
-
- sc = rtems_semaphore_obtain (semrec, RTEMS_NO_WAIT, 0);
- if (sc != RTEMS_SUCCESSFUL) {
- printf ("%d: Can't obtain recursive-lock semaphore: %s\n", __LINE__, rtems_status_text (sc));
- }
- sc = rtems_semaphore_obtain (semrec, RTEMS_NO_WAIT, 0);
- if (sc != RTEMS_SUCCESSFUL) {
- printf ("%d: Can't reobtain recursive-lock semaphore: %s\n", __LINE__, rtems_status_text (sc));
- }
-
- sc = rtems_semaphore_obtain (semnorec, RTEMS_NO_WAIT, 0);
- if (sc != RTEMS_SUCCESSFUL) {
- printf ("%d: Can't obtain non-recursive-lock semaphore: %s\n", __LINE__, rtems_status_text (sc));
- }
- sc = rtems_semaphore_obtain (semnorec, RTEMS_NO_WAIT, 0);
- if (sc == RTEMS_SUCCESSFUL) {
- printf ("%d: Reobtain non-recursive-lock semaphore -- and should not have.\n", __LINE__);
- }
-
- sc = rtems_semaphore_release (semnorec);
- if (sc != RTEMS_SUCCESSFUL) {
- printf ("%d: Can't release non-recursive-lock semaphore: %s\n", __LINE__, rtems_status_text (sc));
- }
- sc = rtems_semaphore_release (semnorec);
- if (sc != RTEMS_SUCCESSFUL) {
- printf ("%d: Can't rerelease non-recursive-lock semaphore: %s\n", __LINE__, rtems_status_text (sc));
- }
- sc = rtems_semaphore_obtain (semnorec, RTEMS_NO_WAIT, 0);
- if (sc != RTEMS_SUCCESSFUL) {
- printf ("%d: Can't obtain non-recursive-lock semaphore: %s\n", __LINE__, rtems_status_text (sc));
- }
- sc = rtems_semaphore_obtain (semnorec, RTEMS_NO_WAIT, 0);
- if (sc == RTEMS_SUCCESSFUL) {
- printf ("%d: Reobtain non-recursive-lock semaphore -- and should not have.\n", __LINE__);
- }
- else if (sc != RTEMS_UNSATISFIED) {
- printf ("%d: Reobtain non-recursive-lock semaphore failed, but error is %d (%s), not RTEMS_UNSATISFIED.\n", __LINE__, sc, rtems_status_text (sc));
- }
-
- sc = rtems_semaphore_release (semnorec);
- if (sc != RTEMS_SUCCESSFUL) {
- printf ("%d: Can't release non-recursive-lock semaphore: %s\n", __LINE__, rtems_status_text (sc));
- }
- sc = rtems_semaphore_release (semnorec);
- if (sc != RTEMS_SUCCESSFUL) {
- printf ("%d: Can't rerelease non-recursive-lock semaphore: %s\n", __LINE__, rtems_status_text (sc));
- }
- sc = rtems_semaphore_obtain (semnorec, RTEMS_NO_WAIT, 0);
- if (sc != RTEMS_SUCCESSFUL) {
- printf ("%d: Can't obtain non-recursive-lock semaphore: %s\n", __LINE__, rtems_status_text (sc));
- }
- /*
- * Since this task is holding this, this task will block and timeout.
- * Then the timeout error will be returned.
- */
- rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then);
- sc = rtems_semaphore_obtain (semnorec, RTEMS_WAIT, 5);
- rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now);
- if (sc == RTEMS_SUCCESSFUL) {
- printf ("%d: Reobtain non-recursive-lock semaphore -- and should not have.\n", __LINE__);
- }
- else if (sc != RTEMS_TIMEOUT) {
- printf ("%d: Reobtain non-recursive-lock semaphore failed, but error is %d (%s), not RTEMS_TIMEOUT.\n", __LINE__, sc, rtems_status_text (sc));
- }
- if ((then - now) < 4)
- printf ("%d: Reobtain non-recursive-lock semaphore failed without timeout.\n", __LINE__);
-
- startTask (semnorec);
- rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then);
- for (i = 0 ; i < 5 ; i++) {
- int diff;
-
- sc = rtems_semaphore_obtain (semnorec, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
- rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now);
- diff = now - then;
- then = now;
- if (sc != RTEMS_SUCCESSFUL)
- printf ("%d: Failed to obtain non-recursive-lock semaphore: %s\n", __LINE__, rtems_status_text (sc));
- else if (diff < (2 * ticksPerSecond))
- printf ("%d: Obtained obtain non-recursive-lock semaphore too quickly -- %d ticks not %d ticks\n", __LINE__, diff, (2 * ticksPerSecond) );
- }
-
- puts( "*** END OF SP29 ***" );
- exit (0);
-}
diff --git a/testsuites/sptests/sp29/sp29.doc b/testsuites/sptests/sp29/sp29.doc
deleted file mode 100644
index e69de29bb2..0000000000
--- a/testsuites/sptests/sp29/sp29.doc
+++ /dev/null
diff --git a/testsuites/sptests/sp29/sp29.scn b/testsuites/sptests/sp29/sp29.scn
deleted file mode 100644
index 700ed7f98f..0000000000
--- a/testsuites/sptests/sp29/sp29.scn
+++ /dev/null
@@ -1,4 +0,0 @@
-*** SP29 - SIMPLE SEMAPHORE TEST ***
-This test only prints on errors.
-*** END OF SP29 ***
-
diff --git a/testsuites/sptests/spfatal/Makefile.am b/testsuites/sptests/spfatal/Makefile.am
deleted file mode 100644
index 7e2daafc95..0000000000
--- a/testsuites/sptests/spfatal/Makefile.am
+++ /dev/null
@@ -1,38 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-TEST = spfatal
-
-MANAGERS = io
-
-C_FILES = init.c puterr.c fatal.c task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = scn doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/sptests.am
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/sptests/spfatal/README b/testsuites/sptests/spfatal/README
deleted file mode 100644
index ad56f040b7..0000000000
--- a/testsuites/sptests/spfatal/README
+++ /dev/null
@@ -1,8 +0,0 @@
-#
-# $Id$
-#
-
-This test depends on tricks to test the fatal error paths in the
-RTEMS executive initialization path. These tricks have gotten
-out of sync with the implementation. So this test is no longer
-included in the build set.
diff --git a/testsuites/sptests/spfatal/fatal.c b/testsuites/sptests/spfatal/fatal.c
deleted file mode 100644
index 4f5972c144..0000000000
--- a/testsuites/sptests/spfatal/fatal.c
+++ /dev/null
@@ -1,136 +0,0 @@
-/* Fatal Error Test
- *
- * NOTE:
- *
- * This test actually modifies the Configuration table and restarts
- * the executive. It is very carefully constructed to do this and
- * uses the Configuration very carefully.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-#include <setjmp.h>
-
-char Workspace[ 64 * 1024 ] CPU_STRUCTURE_ALIGNMENT;
-
-typedef enum {
- FATAL_WORKSPACE_OF_ZERO,
- FATAL_NULL_WORKSPACE,
- FATAL_WORKSPACE_TOO_SMALL,
- FATAL_TASK_CREATE,
- FATAL_TASK_START
-} Fatal_errors_t;
-
-#define FATAL_LAST FATAL_TASK_START
-
-volatile Fatal_errors_t Case_in_switch;
-
-rtems_status_code Expected_Errors[] = {
- RTEMS_UNSATISFIED,
- RTEMS_INVALID_ADDRESS,
- RTEMS_UNSATISFIED,
- RTEMS_INVALID_PRIORITY,
- RTEMS_TASK_EXITTED
-};
-
-rtems_status_code Error_Happened[ FATAL_LAST + 1];
-
-jmp_buf Restart_Context;
-
-/*
- * We depend on this being zeroed during initialization. This
- * occurs automatically because this is part of the BSS.
- */
-
-rtems_unsigned32 First_Time_Through;
-
-void Process_case();
-
-rtems_extension Fatal_extension(
- rtems_unsigned32 source,
- boolean is_internal,
- rtems_unsigned32 error
-)
-{
- int index;
-
- Error_Happened[ Case_in_switch ] = error;
-
- if ( First_Time_Through == 0 ) {
- Case_in_switch = FATAL_WORKSPACE_OF_ZERO;
- First_Time_Through = 1;
- setjmp( Restart_Context );
- } else if ( Case_in_switch == FATAL_LAST ) {
-
- /*
- * Depending on the C library we use, we cannot get the
- * task exitted error so do not check for it.
- */
-
- puts( "*** TEST FATAL ***" );
- for ( index=0 ; index< FATAL_LAST ; index++ )
- put_error( Error_Happened[ index ], Expected_Errors[ index ] );
- puts( "NOT TESTING FATAL ERROR WHEN TASK EXITS -- C LIBRARY CATCHES THIS" );
- puts( "*** END OF TEST FATAL ***" );
-
- /*
- * returns to the default fatal error handler instead of
- * calling rtems_shutdown_executive
- */
- return;
-
- } else {
-
- longjmp( Restart_Context, 1 );
- }
-
- Process_case();
-}
-
-
-
-void Process_case()
-{
- switch ( Case_in_switch ) {
- case FATAL_WORKSPACE_OF_ZERO:
- New_Configuration = rtems_configuration_get_table();
- New_Configuration.work_space_start = NULL;
- Case_in_switch = FATAL_NULL_WORKSPACE;
- break;
-
- case FATAL_NULL_WORKSPACE:
- New_Configuration.work_space_start = Workspace;
- New_Configuration.work_space_size = 256;
- Case_in_switch = FATAL_WORKSPACE_TOO_SMALL;
- break;
-
- case FATAL_WORKSPACE_TOO_SMALL:
- Initialization_tasks[ 0 ].initial_priority = RTEMS_CURRENT_PRIORITY;
- New_Configuration.work_space_size = sizeof( Workspace );
- Case_in_switch = FATAL_TASK_CREATE;
- break;
-
- case FATAL_TASK_CREATE:
- Initialization_tasks[ 0 ].initial_priority = 1;
- Initialization_tasks[ 0 ].entry_point = NULL;
- Case_in_switch = FATAL_TASK_START;
- break;
-
- case FATAL_TASK_START:
- /* this extension exits the test */
- Initialization_tasks[ 0 ].entry_point = Init;
- break;
- }
- rtems_initialize_executive(
- &New_Configuration, rtems_cpu_configuration_get_table() );
-}
-
diff --git a/testsuites/sptests/spfatal/init.c b/testsuites/sptests/spfatal/init.c
deleted file mode 100644
index 98b8eab4ed..0000000000
--- a/testsuites/sptests/spfatal/init.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is a user initialization task and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
-
- status = rtems_task_create(
- Task_name[ 1 ],
- 1,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_create of TA1" );
-
- status = rtems_task_start( Task_id[ 1 ], Task_1, 0 );
- directive_failed( status, "rtems_task_start of TA1" );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
diff --git a/testsuites/sptests/spfatal/puterr.c b/testsuites/sptests/spfatal/puterr.c
deleted file mode 100644
index efde7a7219..0000000000
--- a/testsuites/sptests/spfatal/puterr.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/* put_error
- *
- * This routine verifies that the given error is the expected error.
- *
- * Input parameters:
- * error - actual error code
- * expected - expected error code
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-char *Errors[] = {
- "RTEMS_SUCCESSFUL", /* successful completion */
- "RTEMS_TASK_EXITTED", /* returned from a task */
- "RTEMS_MP_NOT_CONFIGURED", /* multiprocessing not configured */
- "RTEMS_INVALID_NAME", /* invalid object name */
- "RTEMS_INVALID_ID", /* invalid object id */
- "RTEMS_TOO_MANY", /* too many */
- "RTEMS_TIMEOUT", /* timed out waiting */
- "RTEMS_OBJECT_WAS_DELETED", /* object was deleted while waiting */
- "RTEMS_INVALID_SIZE", /* specified size was invalid */
- "RTEMS_INVALID_ADDRESS", /* address specified is invalid */
- "RTEMS_INVALID_NUMBER", /* number was invalid */
- "RTEMS_NOT_DEFINED", /* item has not been initialized */
- "RTEMS_RESOURCE_IN_USE", /* resources still outstanding */
- "RTEMS_UNSATISFIED", /* request not satisfied */
- "RTEMS_INCORRECT_STATE", /* task is in wrong state */
- "RTEMS_ALREADY_SUSPENDED", /* task already in state */
- "RTEMS_ILLEGAL_ON_SELF", /* illegal operation on calling task */
- "RTEMS_ILLEGAL_ON_REMOTE_OBJECT", /* illegal operation for remote object */
- "RTEMS_CALLED_FROM_ISR", /* called from ISR */
- "RTEMS_INVALID_PRIORITY", /* invalid task priority */
- "RTEMS_INVALID_CLOCK", /* invalid date/time */
- "RTEMS_INVALID_NODE", /* invalid node id */
- "RTEMS_NOT_OWNER_OF_RESOURCE", /* not owner of resource */
- "RTEMS_NOT_CONFIGURED", /* directive not configured */
- "RTEMS_NOT_IMPLEMENTED" /* directive not implemented */
-};
-
-/* Task states */
-
-void put_error(
- rtems_unsigned32 error,
- rtems_status_code expected
-)
-{
-
- if ( error <= RTEMS_NOT_IMPLEMENTED )
- printf( "EXPECTED FATAL - error code is correctly %s\n", Errors[ error ] );
- else
- printf( "ERROR - out of range error code is %d\n", error );
-
- if ( error != expected ) {
- printf( "ERROR - did not get expected code of %d\n", expected );
- }
-}
diff --git a/testsuites/sptests/spfatal/spfatal.doc b/testsuites/sptests/spfatal/spfatal.doc
deleted file mode 100644
index fd70b4a4ad..0000000000
--- a/testsuites/sptests/spfatal/spfatal.doc
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: testfatal
-
-directives: none
-
-concepts:
-
- a. Verifies that the proper error is reported by k_fatal when a task
- exits.
-
- b. Verifies that the task exitted extension works correctly.
-
- c. Verifies that the fatal error extension works corectly.
-
diff --git a/testsuites/sptests/spfatal/spfatal.scn b/testsuites/sptests/spfatal/spfatal.scn
deleted file mode 100644
index ecb9f63597..0000000000
--- a/testsuites/sptests/spfatal/spfatal.scn
+++ /dev/null
@@ -1,8 +0,0 @@
-*** TEST FATAL ***
-EXPECTED FATAL - error code is correctly RTEMS_UNSATISFIED
-EXPECTED FATAL - error code is correctly RTEMS_INVALID_ADDRESS
-EXPECTED FATAL - error code is correctly RTEMS_UNSATISFIED
-EXPECTED FATAL - error code is correctly RTEMS_INVALID_PRIORITY
-EXPECTED FATAL - error code is correctly RTEMS_TASK_EXITTED
-NOT TESTING FATAL ERROR WHEN TASK EXITS -- C LIBRARY CATCHES THIS
-*** END OF TEST FATAL ***
diff --git a/testsuites/sptests/spfatal/system.h b/testsuites/sptests/spfatal/system.h
deleted file mode 100644
index 091a07476d..0000000000
--- a/testsuites/sptests/spfatal/system.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-void put_error(
- rtems_unsigned32 error,
- rtems_status_code expected
-);
-
-rtems_extension Fatal_extension(
- rtems_unsigned32 source,
- boolean is_internal,
- rtems_unsigned32 error
-);
-
-rtems_task Task_1(
- rtems_task_argument argument
-);
-
-/* configuration information */
-
-extern rtems_extensions_table initial_extensions;
-
-#define CONFIGURE_INITIAL_EXTENSIONS \
- { \
- NULL, /* create */ \
- NULL, /* start */ \
- NULL, /* restart */ \
- NULL, /* delete */ \
- NULL, /* switch */ \
- NULL, /* begin */ \
- NULL, /* exitted */ \
- Fatal_extension /* fatal */ \
- }
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MICROSECONDS_PER_TICK RTEMS_MILLISECONDS_TO_MICROSECONDS(0)
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* global variables */
-
-TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
-
-TEST_EXTERN rtems_configuration_table New_Configuration;
-
-extern rtems_extensions_table Extensions;
-
-/* end of include file */
diff --git a/testsuites/sptests/spfatal/task1.c b/testsuites/sptests/spfatal/task1.c
deleted file mode 100644
index c009d2c10e..0000000000
--- a/testsuites/sptests/spfatal/task1.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Task_1
- *
- * This routine serves as a test task. It verifies the task manager.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_task Task_1(
- rtems_task_argument argument
-)
-{
- puts( "\n\n*** TEST FATAL ***" );
- puts( "TA1 - exitting task" );
-}
diff --git a/testsuites/sptests/spsize/Makefile.am b/testsuites/sptests/spsize/Makefile.am
deleted file mode 100644
index 4e7d4aca2d..0000000000
--- a/testsuites/sptests/spsize/Makefile.am
+++ /dev/null
@@ -1,36 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-TEST = size
-
-MANAGERS = io
-
-C_FILES = init.c getint.c size.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/sptests.am
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/sptests/spsize/getint.c b/testsuites/sptests/spsize/getint.c
deleted file mode 100644
index 2572cec3e3..0000000000
--- a/testsuites/sptests/spsize/getint.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* getint
- *
- * This routine reads and returns an integer.
- * It assumes decimal.
- *
- * Input parameters: NONE
- *
- * Output parameters:
- * returns - number read
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-int getint( void )
-{
- char buff[16];
-
- gets(buff);
- return atoi(buff);
-}
diff --git a/testsuites/sptests/spsize/init.c b/testsuites/sptests/spsize/init.c
deleted file mode 100644
index 9a8c66d2df..0000000000
--- a/testsuites/sptests/spsize/init.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is a user initialization task and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-/* #define HAVE_MENU */
-
-rtems_task Test_task();
-void size_rtems( int mode );
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
-#if defined(HAVE_MENU)
- int choice = 0;
-#endif
-
- setvbuf(stdout, 0, _IONBF, 0);
-
- puts( "\n*** RTEMS SIZE PROGRAM ***" );
- size_rtems( 1 );
- puts( "*** END OF RTEMS SIZE PROGRAM ***" );
- exit( 0 );
-#if defined(HAVE_MENU)
- do {
- printf( "\n\nPlease select program mode:\n" );
- printf( " 1) Print Formulas\n" );
- printf( " 2) Determine Workspace Size\n" );
- printf( " 3) Exit\n" );
- printf( "Enter number of choice (1,2,3) : " );
-
- choice = getint();
- switch( choice ) {
- case 1: size_rtems( 1 ); break;
- case 2: size_rtems( 0 ); break;
- case 3: exit( 0 );
- default: continue;
- }
- } while ( FOREVER );
-#endif
-}
diff --git a/testsuites/sptests/spsize/size.c b/testsuites/sptests/spsize/size.c
deleted file mode 100644
index c00ad5a95d..0000000000
--- a/testsuites/sptests/spsize/size.c
+++ /dev/null
@@ -1,693 +0,0 @@
-/* main
- *
- * This program is run to determine the data space and work space
- * requirements of the current version of RTEMS.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/config.h>
-#include <rtems/directives.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/copyrt.h>
-#include <rtems/rtems/clock.h>
-#include <rtems/rtems/tasks.h>
-#include <rtems/rtems/dpmem.h>
-#include <rtems/rtems/event.h>
-#include <rtems/extension.h>
-#include <rtems/fatal.h>
-#include <rtems/init.h>
-#include <rtems/score/isr.h>
-#include <rtems/rtems/intr.h>
-#include <rtems/io.h>
-#include <rtems/rtems/message.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/rtems/mp.h>
-#include <rtems/score/mpci.h>
-#endif
-#include <rtems/rtems/part.h>
-#include <rtems/score/priority.h>
-#include <rtems/rtems/ratemon.h>
-#include <rtems/rtems/region.h>
-#include <rtems/rtems/sem.h>
-#include <rtems/rtems/signal.h>
-#include <rtems/score/sysstate.h>
-#include <rtems/score/thread.h>
-#include <rtems/rtems/timer.h>
-#include <rtems/score/tod.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
-
-#include <stdlib.h>
-
-/* These are always defined by the executive.
- *
- * #include <rtems/copyrt.h>
- * #include <rtems/tables.h>
- * #include <rtems/sptables.h>
- */
-#define HEAP_OVHD 16 /* wasted heap space per task stack */
-#define NAME_PTR_SIZE 8 /* size of name and pointer table entries */
-#define READYCHAINS_SIZE \
- ((RTEMS_MAXIMUM_PRIORITY + 1) * sizeof(Chain_Control ))
-
-#define PER_TASK \
- (long) (sizeof (Thread_Control) + \
- NAME_PTR_SIZE + HEAP_OVHD + sizeof( RTEMS_API_Control ))
-#define PER_SEMAPHORE \
- (long) (sizeof (Semaphore_Control) + NAME_PTR_SIZE)
-#define PER_TIMER \
- (long) (sizeof (Timer_Control) + NAME_PTR_SIZE)
-#define PER_MSGQ \
- (long) (sizeof (Message_queue_Control) + NAME_PTR_SIZE)
-#define PER_REGN \
- (long) (sizeof (Region_Control) + NAME_PTR_SIZE)
-#define PER_PART \
- (long) (sizeof (Partition_Control) + NAME_PTR_SIZE)
-#define PER_PERIOD \
- (long) (sizeof (Rate_monotonic_Control) + NAME_PTR_SIZE)
-#define PER_PORT \
- (long) (sizeof (Dual_ported_memory_Control) + NAME_PTR_SIZE)
-#define PER_EXTENSION \
- (long) (sizeof (Extension_Control) + NAME_PTR_SIZE)
-
-#define PER_DRV (long) (0)
-#define PER_FPTASK (long) (CONTEXT_FP_SIZE)
-#define PER_GOBTBL (long) (sizeof (Chain_Control)*4)
-#define PER_NODE (long) PER_GOBTBL
-#if defined(RTEMS_MULTIPROCESSING)
-#define PER_GOBJECT (long) (sizeof (Objects_MP_Control))
-#else
-#define PER_GOBJECT (long) 0
-#endif
-#define PER_PROXY (long) (sizeof (Thread_Proxy_control))
-
-#if !defined(RTEMS_MULTIPROCESSING) || (CPU_ALL_TASKS_ARE_FP != TRUE)
-#define MPCI_RECEIVE_SERVER_FP (long) 0
-#else
-#define MPCI_RECEIVE_SERVER_FP (long) (sizeof( Context_Control_fp ))
-#endif
-
-#if (CPU_IDLE_TASK_IS_FP == TRUE)
-#define SYSTEM_IDLE_FP (long) (sizeof( Context_Control_fp ))
-#else
-#define SYSTEM_IDLE_FP (long) 0
-#endif
-
-#if defined(RTEMS_MULTIPROCESSING)
-#define MPCI_RECEIVE_SERVER_STACK_SIZE 0
-#endif
-
-#if defined(RTEMS_MULTIPROCESSING)
-#define MP_SYSTEM_TASKS \
- (MPCI_RECEIVE_SERVER_STACK_SIZE + \
- sizeof(Thread_Control) + \
- MPCI_RECEIVE_SERVER_FP)
-#else
-#define MP_SYSTEM_TASKS 0
-#endif
-
-/*
- * Idle and the MPCI Receive Server Threads
- */
-
-#define SYSTEM_TASKS \
- (STACK_MINIMUM_SIZE + sizeof(Thread_Control) + SYSTEM_IDLE_FP + \
- MP_SYSTEM_TASKS)
-
-#define rtems_unsigned32 unsigned32
-
-rtems_unsigned32 sys_req;
-
-/* to avoid warnings */
-int puts();
-int printf();
-int getint();
-#undef getchar
-int getchar();
-void help_size();
-void print_formula();
-
-void size_rtems(
- int mode
-)
-{
-int uninitialized = 0;
-int initialized = 0;
-
-/*
- * The following data is allocated for each Manager:
- *
- * + Per Manager Object Information
- * - local pointer table
- * - local name table
- * - the object's control blocks
- * - global name chains
- *
- * The following is the data allocate from the RTEMS Workspace Area.
- * The order indicates the order in which RTEMS allocates it.
- *
- * + Object MP
- * - Global Object CB's
- * + Thread
- * - Ready Chain
- * + Thread MP
- * - Proxies Chain
- * + Interrupt Manager
- * - Interrupt Stack
- * + Timer Manager
- * - per Manager Object Data
- * + Extension Manager
- * - per Manager Object Data
- * + Message Queue Manager
- * - per Manager Object Data
- * - Message Buffers
- * + Semaphore Manager
- * - per Manager Object Data
- * + Partition Manager
- * - per Manager Object Data
- * + Region Manager
- * - per Manager Object Data
- * + Dual Ported Memory Manager
- * - per Manager Object Data
- * + Rate Monotonic Manager
- * - per Manager Object Data
- * + Internal Threads Handler
- * - MPCI Receive Server Thread TCB
- * - IDLE Thread TCB
- * - MPCI Receive Server Thread stack
- * - MPCI Receive Server Thread FP area (if CPU requires this)
- * - IDLE Thread stack
- * - IDLE Thread FP area (if CPU requires this)
- *
- * This does not take into account any CPU dependent alignment requirements.
- *
- * The following calculates the overhead needed by RTEMS from the
- * Workspace Area.
- */
-sys_req = SYSTEM_TASKS + /* MPCI Receive Server and IDLE */
- NAME_PTR_SIZE + /* Task Overhead */
- READYCHAINS_SIZE + /* Ready Chains */
- NAME_PTR_SIZE + /* Timer Overhead */
- NAME_PTR_SIZE + /* Semaphore Overhead */
- NAME_PTR_SIZE + /* Message Queue Overhead */
- NAME_PTR_SIZE + /* Region Overhead */
- NAME_PTR_SIZE + /* Partition Overhead */
- NAME_PTR_SIZE + /* Dual-Ported Memory Overhead */
- NAME_PTR_SIZE + /* Rate Monotonic Overhead */
- NAME_PTR_SIZE + /* Extension Overhead */
- PER_NODE; /* Extra Gobject Table */
-
-uninitialized =
-/*address.h*/ 0 +
-
-/*apiext.h*/ (sizeof _API_extensions_List) +
-
-/*asr.h*/ 0 +
-
-/*attr.h*/ 0 +
-
-/*bitfield.h*/ 0 +
-
-/*chain.h*/ 0 +
-
-/*clock.h*/ 0 +
-
-/*config.h*/ (sizeof _Configuration_Table) +
- (sizeof _Configuration_MP_table) +
-
-/*context.h*/ (sizeof _Context_Switch_necessary) +
-
-/*copyrt.h*/ 0 +
-
-/*debug.h*/ (sizeof _Debug_Level) +
-
-/*dpmem.h*/ (sizeof _Dual_ported_memory_Information) +
-
-/*event.h*/ (sizeof _Event_Sync_state) +
-
-#if defined(RTEMS_MULTIPROCESSING)
-/*eventmp.h*/ 0 +
-#endif
-
-/*eventset.h*/ 0 +
-
-/*extension.h*/ (sizeof _Extension_Information) +
-
-/*fatal.h*/ 0 +
-
-/*heap.h*/ 0 +
-
-/*init.h*/ 0 +
-
-/*interr.h*/ (sizeof Internal_errors_What_happened) +
-
-/*intr.h*/ 0 +
-
-/*io.h*/ (sizeof _IO_Number_of_drivers) +
- (sizeof _IO_Driver_address_table) +
- (sizeof _IO_Number_of_devices) +
- (sizeof _IO_Driver_name_table) +
-
-/*isr.h*/ (sizeof _ISR_Nest_level) +
- (sizeof _ISR_Vector_table) +
- (sizeof _ISR_Signals_to_thread_executing) +
-
-/*message.h*/ (sizeof _Message_queue_Information) +
-
-/*modes.h*/ 0 +
-
-#if defined(RTEMS_MULTIPROCESSING)
-/*mp.h*/ 0 +
-#endif
-
-#if defined(RTEMS_MULTIPROCESSING)
-/*mpci.h*/ (sizeof _MPCI_Remote_blocked_threads) +
- (sizeof _MPCI_Semaphore) +
- (sizeof _MPCI_table) +
- (sizeof _MPCI_Receive_server_tcb) +
- (sizeof _MPCI_Packet_processors) +
-#endif
-
-#if defined(RTEMS_MULTIPROCESSING)
-/*mppkt.h*/ 0 +
-#endif
-
-#if defined(RTEMS_MULTIPROCESSING)
-/*mptables.h*/ 0 +
-#endif
-
-#if defined(RTEMS_MULTIPROCESSING)
-/*msgmp.h*/ 0 +
-#endif
-
-/*object.h*/ (sizeof _Objects_Local_node) +
- (sizeof _Objects_Maximum_nodes) +
- (sizeof _Objects_Information_table) +
-
-#if defined(RTEMS_MULTIPROCESSING)
-/*objectmp.h*/ (sizeof _Objects_MP_Maximum_global_objects) +
- (sizeof _Objects_MP_Inactive_global_objects) +
-#endif
-
-/*options.h*/ 0 +
-
-/*part.h*/ (sizeof _Partition_Information) +
-
-#if defined(RTEMS_MULTIPROCESSING)
-/*partmp.h*/ 0 +
-#endif
-
-/*priority.h*/ (sizeof _Priority_Major_bit_map) +
- (sizeof _Priority_Bit_map) +
-
-/*ratemon.h*/ (sizeof _Rate_monotonic_Information) +
-
-/*region.h*/ (sizeof _Region_Information) +
-
-#if defined(RTEMS_MULTIPROCESSING)
-/*regionmp.h*/ 0 +
-#endif
-
-/*rtems.h*/ /* Not applicable */
-
-/*sem.h*/ (sizeof _Semaphore_Information) +
-
-#if defined(RTEMS_MULTIPROCESSING)
-/*semmp.h*/ 0 +
-#endif
-
-/*signal.h*/ 0 +
-
-/*signalmp.h*/ 0 +
-
-/*stack.h*/ 0 +
-
-/*states.h*/ 0 +
-
-/*status.h*/ 0 +
-
-/*sysstate.h*/ (sizeof _System_state_Is_multiprocessing) +
- (sizeof _System_state_Current) +
-
-/*system.h*/ (sizeof _CPU_Table) +
-
-#if defined(RTEMS_MULTIPROCESSING)
-/*taskmp.h*/ 0 +
-#endif
-
-/*tasks.h*/ (sizeof _RTEMS_tasks_Information) +
- (sizeof _RTEMS_tasks_User_initialization_tasks) +
- (sizeof _RTEMS_tasks_Number_of_initialization_tasks) +
-
-/*thread.h*/ (sizeof _Thread_BSP_context) +
- (sizeof _Thread_Dispatch_disable_level) +
- (sizeof _Thread_Do_post_task_switch_extension) +
- (sizeof _Thread_Maximum_extensions) +
- (sizeof _Thread_Ticks_per_timeslice) +
- (sizeof _Thread_Ready_chain) +
- (sizeof _Thread_Executing) +
- (sizeof _Thread_Heir) +
- (sizeof _Thread_Allocated_fp) +
- (sizeof _Thread_Internal_information) +
- (sizeof _Thread_Idle) +
-
-#if defined(RTEMS_MULTIPROCESSING)
-/*threadmp.h*/ (sizeof _Thread_MP_Receive) +
- (sizeof _Thread_MP_Active_proxies) +
- (sizeof _Thread_MP_Inactive_proxies) +
-#endif
-
-/*threadq.h*/ (sizeof _Thread_queue_Extract_table) +
-
-/*timer.h*/ (sizeof _Timer_Information) +
-
-/*tod.h*/ (sizeof _TOD_Current) +
- (sizeof _TOD_Seconds_since_epoch) +
- (sizeof _TOD_Microseconds_per_tick) +
- (sizeof _TOD_Ticks_per_second) +
- (sizeof _TOD_Seconds_watchdog) +
-
-/*tqdata.h*/ 0 +
-
-/*types.h*/ 0 +
-
-/*userext.h*/ (sizeof _User_extensions_List) +
-
-/*watchdog.h*/ (sizeof _Watchdog_Sync_level) +
- (sizeof _Watchdog_Sync_count) +
- (sizeof _Watchdog_Ticks_since_boot) +
- (sizeof _Watchdog_Ticks_chain) +
- (sizeof _Watchdog_Seconds_chain) +
-
-/*wkspace.h*/ (sizeof _Workspace_Area);
-
-uninitialized = 0;
-
-#ifndef unix /* make sure this is not a native compile */
-
-#ifdef __i386__
-
-/* cpu.h */
-uninitialized += (sizeof _CPU_Null_fp_context) +
- (sizeof _CPU_Interrupt_stack_low) +
- (sizeof _CPU_Interrupt_stack_high);
-
-#endif
-
-#ifdef __i960__
-
-/* cpu.h */
-uninitialized += (sizeof _CPU_Interrupt_stack_low) +
- (sizeof _CPU_Interrupt_stack_high);
-
-#endif
-
-#ifdef __hppa__
-
-/* cpu.h */
-uninitialized += (sizeof _CPU_Null_fp_context) +
-#ifndef RTEMS_UNIX
- (sizeof _CPU_Default_gr27) +
-#endif
- (sizeof _CPU_Interrupt_stack_low) +
- (sizeof _CPU_Interrupt_stack_high);
-#endif
-
-#ifdef __mc68000__
-
-/* cpu.h */
-uninitialized += (sizeof _CPU_Interrupt_stack_low) +
- (sizeof _CPU_Interrupt_stack_high);
-
-#endif
-
-#ifdef __sparc__
-
-/* cpu.h */
-uninitialized += (sizeof _CPU_Interrupt_stack_low) +
- (sizeof _CPU_Interrupt_stack_high) +
- (sizeof _CPU_Null_fp_context);
-
-#ifndef NO_TABLE_MOVE
-uninitialized += (sizeof _CPU_Trap_Table_area);
-#endif
-
-#ifdef erc32
-uninitialized += (sizeof _ERC32_MEC_Timer_Control_Mirror);
-#endif
-
-
-#endif
-
-
-#ifdef no_cpu
-
-/* cpu.h */
-uninitialized += (sizeof _CPU_Null_fp_context) +
- (sizeof _CPU_Interrupt_stack_low) +
- (sizeof _CPU_Interrupt_stack_high) +
- (sizeof _CPU_Thread_dispatch_pointer);
-
-#endif
-
-#ifdef __PPC__
-
-/* cpu.h */
-uninitialized += (sizeof _CPU_Interrupt_stack_low) +
- (sizeof _CPU_Interrupt_stack_high) +
- (sizeof _CPU_IRQ_info);
-
-#endif
-#endif /* !unix */
-
-initialized +=
-/*copyrt.h*/ (strlen(_Copyright_Notice)+1) +
-
-/*sptables.h*/ (sizeof _Initialization_Default_multiprocessing_table) +
- (strlen(_RTEMS_version)+1) +
- (sizeof _Entry_points) +
-
-
-/*tod.h*/ (sizeof _TOD_Days_per_month) +
- (sizeof _TOD_Days_to_date) +
- (sizeof _TOD_Days_since_last_leap_year);
-
-#ifndef unix /* make sure this is not native */
-#ifdef __sparc__
-
-initialized += (sizeof _CPU_Trap_slot_template);
-
-#endif
-#endif /* !unix */
-
-puts( "" );
-
- if ( mode == 0 ) help_size();
- else print_formula();
-
-printf( "\n" );
-printf( "RTEMS uninitialized data consumes %d bytes\n", uninitialized );
-printf( "RTEMS intialized data consumes %d bytes\n", initialized );
-
-}
-
-void help_size()
-{
-int c = '\0';
-int break_loop;
-int total_size;
-int task_stacks;
-int interrupt_stack;
-int maximum_tasks, size_tasks;
-int maximum_sems, size_sems;
-int maximum_timers, size_timers;
-int maximum_msgqs, size_msgqs;
-int maximum_msgs, size_msgs_overhead;
-int maximum_regns, size_regns;
-int maximum_parts, size_parts;
-int maximum_ports, size_ports;
-int maximum_periods, size_periods;
-int maximum_extensions, size_extensions;
-int maximum_drvs, size_drvs;
-int maximum_fps, size_fps;
-int maximum_nodes, size_nodes;
-int maximum_gobjs, size_gobjs;
-int maximum_proxies, size_proxies;
-
-total_size = sys_req; /* Fixed Overhead */
-printf( "What is maximum_tasks? " );
-maximum_tasks = getint();
-size_tasks = PER_TASK * maximum_tasks;
-total_size += size_tasks;
-
-printf( "What is maximum_semaphores? " );
-maximum_sems = getint();
-size_sems = PER_SEMAPHORE * maximum_sems;
-total_size += size_sems;
-
-printf( "What is maximum_timers? " );
-maximum_timers = getint();
-size_timers = PER_TIMER * maximum_timers;
-total_size += size_timers;
-
-printf( "What is maximum_message_queues? " );
-maximum_msgqs = getint();
-size_msgqs = PER_MSGQ * maximum_msgqs;
-total_size += size_msgqs;
-
-printf( "What is maximum_messages? XXXX " );
-maximum_msgs = getint();
-size_msgs_overhead = 0;
-total_size += size_msgs_overhead;
-
-printf( "What is maximum_regions? " );
-maximum_regns = getint();
-size_regns = PER_REGN * maximum_regns;
-total_size += size_regns;
-
-printf( "What is maximum_partitions? " );
-maximum_parts = getint();
-size_parts = PER_PART * maximum_parts;
-total_size += size_parts;
-
-printf( "What is maximum_ports? " );
-maximum_ports = getint();
-size_ports = PER_PORT * maximum_ports;
-total_size += size_ports;
-
-printf( "What is maximum_periods? " );
-maximum_periods = getint();
-size_periods = PER_PORT * maximum_periods;
-total_size += size_periods;
-
-printf( "What is maximum_extensions? " );
-maximum_extensions = getint();
-size_extensions = PER_EXTENSION * maximum_extensions;
-total_size += size_extensions;
-
-printf( "What is number_of_device_drivers? " );
-maximum_drvs = getint();
-size_drvs = PER_DRV * maximum_drvs;
-total_size += size_drvs;
-
-printf( "What will be total stack requirement for all tasks? " );
-task_stacks = getint();
-total_size += task_stacks;
-
-printf( "What is the size of the interrupt stack? " );
-interrupt_stack = getint();
-total_size += interrupt_stack;
-
-printf( "How many tasks will be created with the FP flag? " );
-maximum_fps = getint();
-size_fps = PER_FPTASK * maximum_fps;
-total_size += size_fps;
-
-printf( "Is this a single processor system? " );
-for ( break_loop=0 ; !break_loop; c = getchar() ) {
- switch ( c ) {
- case 'Y': case 'y':
- case 'N': case 'n':
- break_loop = 1;
- break;
- }
-}
-printf( "%c\n", c );
-if ( c == 'n' || c == 'N' ) {
- printf( "What is maximum_nodes? " );
- maximum_nodes = getint();
- size_nodes = PER_NODE * maximum_nodes;
- total_size += size_nodes;
- printf( "What is maximum_global_objects? " );
- maximum_gobjs = getint();
- size_gobjs = PER_GOBJECT * maximum_gobjs;
- total_size += size_gobjs;
- printf( "What is maximum_proxies? " );
- maximum_proxies = getint();
- size_proxies = PER_PROXY * maximum_proxies;
- total_size += size_proxies;
-} else {
- maximum_nodes = 0;
- size_nodes = PER_NODE * 0;
- maximum_gobjs = 0;
- size_gobjs = PER_GOBJECT * 0;
- maximum_proxies = 0;
- size_proxies = PER_PROXY * 0;
-}
-
-printf( "\n\n" );
-printf( " ************** EXECUTIVE WORK SPACE REQUIRED **************\n" );
-printf( " Tasks - %03d * %03ld = %ld\n",
- maximum_tasks, PER_TASK, (long) size_tasks );
-printf( " Semaphores - %03d * %03ld = %ld\n",
- maximum_sems, PER_SEMAPHORE, (long) size_sems );
-printf( " Timers - %03d * %03ld = %ld\n",
- maximum_timers, PER_TIMER, (long) size_timers );
-printf( " Msg Queues - %03d * %03ld = %ld\n",
- maximum_msgqs, PER_MSGQ, (long) size_msgqs );
-printf( " Messages Overhead - %03d * %03d = %ld\n",
- maximum_msgs, 0 /* PER_MSG_OVERHEAD */, (long) size_msgs_overhead );
-printf( " Regions - %03d * %03ld = %ld\n",
- maximum_regns, PER_REGN, (long) size_regns);
-printf( " Partitions - %03d * %03ld = %ld\n",
- maximum_parts, PER_PART, (long) size_parts );
-printf( " Periods - %03d * %03ld = %ld\n",
- maximum_periods, PER_PERIOD, (long) size_periods );
-printf( " Extensions - %03d * %03ld = %ld\n",
- maximum_extensions, PER_EXTENSION, (long) size_extensions );
-printf( " Device Drivers - %03d * %03ld = %ld\n",
- maximum_drvs, PER_DRV, (long) size_drvs );
-
-printf( " System Requirements - %04d = %d\n",
- sys_req, sys_req );
-
-printf( " Floating Point Tasks - %03d * %03ld = %ld\n",
- maximum_fps, PER_FPTASK, (long) size_fps );
-printf( " Application Task Stacks - = %d\n",
- task_stacks );
-printf( " Interrupt Stacks - = %d\n",
- task_stacks );
-printf( " \n" );
-printf( " Global object tables - %03d * %03ld = %ld\n",
- maximum_nodes, PER_NODE, (long) size_nodes );
-printf( " Global objects - %03d * %03ld = %ld\n",
- maximum_gobjs, PER_GOBJECT, (long) size_gobjs );
-printf( " Proxies - %03d * %03ld = %ld\n",
- maximum_proxies, PER_PROXY, (long) size_proxies );
-printf( "\n\n" );
-printf( " TOTAL = %d bytes\n",
- total_size );
-}
-
-void print_formula()
-{
-printf( " ************** EXECUTIVE WORK SPACE FORMULA **************\n" );
-printf( " Tasks - maximum_tasks * %ld\n", PER_TASK );
-printf( " Timers - maximum_timers * %ld\n", PER_TIMER );
-printf( " Semaphores - maximum_semaphores * %ld\n", PER_SEMAPHORE);
-printf( " Message Queues - maximum_message_queues * %ld\n", PER_MSGQ );
-printf( " Messages -\n");
-printf( " Regions - maximum_regions * %ld\n", PER_REGN );
-printf( " Partitions - maximum_partitions * %ld\n", PER_PART );
-printf( " Ports - maximum_ports * %ld\n", PER_PORT );
-printf( " Periods - maximum_periods * %ld\n", PER_PORT );
-printf( " Extensions - maximum_extensions * %ld\n", PER_EXTENSION );
-printf( " Device Drivers - number_of_device_drivers * %ld\n", PER_DRV);
-printf( " System Requirements - %d\n", sys_req );
-printf( " Floating Point Tasks - FPMASK Tasks * %ld\n", PER_FPTASK );
-printf( " User's Tasks' Stacks -\n" );
-printf( " Interrupt Stack -\n" );
-printf( " \n" );
-printf( " Global object tables - maximum_nodes * %ld\n", PER_NODE );
-printf( " Global objects - maximum_global_objects * %ld\n", PER_GOBJECT );
-printf( " Proxies - maximum_proxies * %ld\n", PER_PROXY );
-}
diff --git a/testsuites/sptests/spsize/size.scn b/testsuites/sptests/spsize/size.scn
deleted file mode 100644
index 6ca8147f8b..0000000000
--- a/testsuites/sptests/spsize/size.scn
+++ /dev/null
@@ -1 +0,0 @@
-This is a dummy file
diff --git a/testsuites/sptests/spsize/system.h b/testsuites/sptests/spsize/system.h
deleted file mode 100644
index 4a432760b0..0000000000
--- a/testsuites/sptests/spsize/system.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_task Test_task(
- rtems_task_argument argument
-);
-
-int getint( void );
-
-/* configuration information */
-
-#define CONFIGURE_SPTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* global variables */
-
-TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
-
-/* end of include file */
diff --git a/testsuites/sptests/sptests.am b/testsuites/sptests/sptests.am
deleted file mode 100644
index 0ef24f02dc..0000000000
--- a/testsuites/sptests/sptests.am
+++ /dev/null
@@ -1,23 +0,0 @@
-project_bspdir=$(PROJECT_ROOT)/@RTEMS_BSP@
-
-$(project_bspdir)/tests:
- @$(mkinstalldirs) $@
-
-$(project_bspdir)/tests/$(TEST)$(LIB_VARIANT).exe: $(PGM)
- $(INSTALL_PROGRAM) $< $@
-
-$(project_bspdir)/tests/screens:
- @$(mkinstalldirs) $@
-
-$(project_bspdir)/tests/screens/sptests:
- @$(mkinstalldirs) $@
-
-$(project_bspdir)/tests/screens/sptests/$(TEST).scn: $(TEST).scn
- $(INSTALL_DATA) $< $@
-
-TMPINSTALL_FILES += \
-$(project_bspdir)/tests \
-$(project_bspdir)/tests/$(TEST)$(LIB_VARIANT).exe \
-$(project_bspdir)/tests/screens \
-$(project_bspdir)/tests/screens/sptests \
-$(project_bspdir)/tests/screens/sptests/$(TEST).scn
diff --git a/testsuites/support/Makefile.am b/testsuites/support/Makefile.am
deleted file mode 100644
index 0db07bc089..0000000000
--- a/testsuites/support/Makefile.am
+++ /dev/null
@@ -1,11 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-
-SUBDIRS = include stubdr wrapup
-
-include $(top_srcdir)/../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/support/include/tmacros.h b/testsuites/support/include/tmacros.h
deleted file mode 100644
index 6009ef473e..0000000000
--- a/testsuites/support/include/tmacros.h
+++ /dev/null
@@ -1,226 +0,0 @@
-/* tmacros.h
- *
- * This include file contains macros which are useful in the RTEMS
- * test suites.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __TMACROS_h
-#define __TMACROS_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <bsp.h> /* includes <rtems.h> */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <rtems/error.h>
-
-#define FOREVER 1 /* infinite loop */
-
-#ifdef TEST_INIT
-#define TEST_EXTERN
-#define CONFIGURE_INIT
-#else
-#define TEST_EXTERN extern
-#endif
-
-#define check_dispatch_disable_level( _expect ) \
- do { \
- extern volatile rtems_unsigned32 _Thread_Dispatch_disable_level; \
- if ( (_expect) != -1 && _Thread_Dispatch_disable_level != (_expect) ) { \
- printf( "\n_Thread_Dispatch_disable_level is (%d) not %d\n", \
- _Thread_Dispatch_disable_level, (_expect) ); \
- fflush(stdout); \
- exit( 1 ); \
- } \
- } while ( 0 )
-
-/*
- * These macros properly report errors within the Classic API
- */
-
-#define directive_failed( _dirstat, _failmsg ) \
- fatal_directive_status( _dirstat, RTEMS_SUCCESSFUL, _failmsg )
-
-#define directive_failed_with_level( _dirstat, _failmsg, _level ) \
- fatal_directive_status_with_level( \
- _dirstat, RTEMS_SUCCESSFUL, _failmsg, _level )
-
-#define fatal_directive_status( _stat, _desired, _msg ) \
- fatal_directive_status_with_level( _stat, _desired, _msg, 0 )
-
-#define fatal_directive_status_with_level( _stat, _desired, _msg, _level ) \
- do { \
- check_dispatch_disable_level( _level ); \
- if ( (_stat) != (_desired) ) { \
- printf( "\n%s FAILED -- expected (%s) got (%s)\n", \
- (_msg), rtems_status_text(_desired), rtems_status_text(_stat) ); \
- fflush(stdout); \
- exit( _stat ); \
- } \
- } while ( 0 )
-
-/*
- * These macros properly report errors from the POSIX API
- */
-
-#define posix_service_failed( _dirstat, _failmsg ) \
- fatal_posix_service_status( _dirstat, RTEMS_SUCCESSFUL, _failmsg )
-
-#define posix_service_failed_with_level( _dirstat, _failmsg, _level ) \
- fatal_posix_service_status_with_level( \
- _dirstat, RTEMS_SUCCESSFUL, _failmsg, _level )
-
-#define fatal_posix_service_status( _stat, _desired, _msg ) \
- fatal_posix_service_status_with_level( _stat, _desired, _msg, 0 )
-
-#define fatal_posix_service_status_with_level( _stat, _desired, _msg, _level ) \
- do { \
- check_dispatch_disable_level( _level ); \
- if ( (_stat) != (_desired) ) { \
- printf( "\n%s FAILED -- expected (%s) got (%s)\n", \
- (_msg), strerror(_desired), strerror(_stat) ); \
- fflush(stdout); \
- exit( _stat ); \
- } \
- } while ( 0 )
-
-/*
- * Generic integer version of the error reporting
- */
-
-#define int_service_failed( _dirstat, _failmsg ) \
- fatal_int_service_status( _dirstat, RTEMS_SUCCESSFUL, _failmsg )
-
-#define int_service_failed_with_level( _dirstat, _failmsg, _level ) \
- fatal_int_service_status_with_level( \
- _dirstat, RTEMS_SUCCESSFUL, _failmsg, _level )
-
-#define fatal_int_service_status( _stat, _desired, _msg ) \
- fatal_int_service_status_with_level( _stat, _desired, _msg, 0 )
-
-#define fatal_int_service_status_with_level( _stat, _desired, _msg, _level ) \
- do { \
- check_dispatch_disable_level( _level ); \
- if ( (_stat) != (_desired) ) { \
- printf( "\n%s FAILED -- expected (%d) got (%d)\n", \
- (_msg), (_desired), (_stat) ); \
- fflush(stdout); \
- exit( _stat ); \
- } \
- } while ( 0 )
-
-
-/*
- * Print the time
- */
-
-#define sprint_time(_str, _s1, _tb, _s2) \
- do { \
- sprintf( (str), "%s%02d:%02d:%02d %02d/%02d/%04d%s", \
- _s1, (_tb)->hour, (_tb)->minute, (_tb)->second, \
- (_tb)->month, (_tb)->day, (_tb)->year, _s2 ); \
- } while ( 0 )
-
-#define print_time(_s1, _tb, _s2) \
- do { \
- printf( "%s%02d:%02d:%02d %02d/%02d/%04d%s", \
- _s1, (_tb)->hour, (_tb)->minute, (_tb)->second, \
- (_tb)->month, (_tb)->day, (_tb)->year, _s2 ); \
- fflush(stdout); \
- } while ( 0 )
-
-#define put_dot( _c ) \
- do { \
- putchar( _c ); \
- fflush( stdout ); \
- } while ( 0 )
-
-#define new_line puts( "" )
-
-#define puts_nocr printf
-
-#ifdef RTEMS_TEST_NO_PAUSE
-#define rtems_test_pause() \
- do { \
- printf( "<pause>\n" ); fflush( stdout ); \
- } while ( 0 )
-
-#define rtems_test_pause_and_screen_number( _screen ) \
- do { \
- printf( "<pause - screen %d>\n", (_screen) ); fflush( stdout ); \
- } while ( 0 )
-#else
-#define rtems_test_pause() \
- do { \
- char buffer[ 80 ]; \
- printf( "<pause>" ); fflush( stdout ); \
- gets( buffer ); \
- puts( "" ); \
- } while ( 0 )
-
-#define rtems_test_pause_and_screen_number( _screen ) \
- do { \
- char buffer[ 80 ]; \
- printf( "<pause - screen %d>", (_screen) ); fflush( stdout ); \
- gets( buffer ); \
- puts( "" ); \
- } while ( 0 )
-#endif
-
-#define put_name( name, crlf ) \
-{ rtems_unsigned32 c0, c1, c2, c3; \
- c0 = (name >> 24) & 0xff; \
- c1 = (name >> 16) & 0xff; \
- c2 = (name >> 8) & 0xff; \
- c3 = name & 0xff; \
- putchar( (char)c0 ); \
- if ( c1 ) putchar( (char)c1 ); \
- if ( c2 ) putchar( (char)c2 ); \
- if ( c3 ) putchar( (char)c3 ); \
- if ( crlf ) \
- putchar( '\n' ); \
-}
-
-#ifndef build_time
-#define build_time( TB, MON, DAY, YR, HR, MIN, SEC, TK ) \
- { (TB)->year = YR; \
- (TB)->month = MON; \
- (TB)->day = DAY; \
- (TB)->hour = HR; \
- (TB)->minute = MIN; \
- (TB)->second = SEC; \
- (TB)->ticks = TK; }
-#endif
-
-#define task_number( tid ) \
- ( rtems_get_index( tid ) - \
- rtems_configuration_get_rtems_api_configuration()->number_of_initialization_tasks )
-
-static inline rtems_unsigned32 get_ticks_per_second( void )
-{
- rtems_interval ticks_per_second;
- (void) rtems_clock_get( RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticks_per_second );
- return ticks_per_second;
-}
-
-#define TICKS_PER_SECOND get_ticks_per_second()
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/testsuites/tmitrontests/Makefile.am b/testsuites/tmitrontests/Makefile.am
deleted file mode 100644
index 2d5edaf1bc..0000000000
--- a/testsuites/tmitrontests/Makefile.am
+++ /dev/null
@@ -1,15 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-
-ITRON_DIRS = include tmitronsem01
-
-SUBDIRS = $(ITRON_DIRS)
-
-EXTRA_DIST = tmitrontests.am
-
-include $(top_srcdir)/../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/tmitrontests/README b/testsuites/tmitrontests/README
deleted file mode 100644
index 65c5d4165d..0000000000
--- a/testsuites/tmitrontests/README
+++ /dev/null
@@ -1,6 +0,0 @@
-#
-# $Id$
-#
-
-This directory contains the functionality tests for the ITRON 3.0 API
-implementation.
diff --git a/testsuites/tmitrontests/include/Makefile.am b/testsuites/tmitrontests/include/Makefile.am
deleted file mode 100644
index fcf88cb578..0000000000
--- a/testsuites/tmitrontests/include/Makefile.am
+++ /dev/null
@@ -1,9 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-noinst_HEADERS = timesys.h
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/tmitrontests/include/timesys.h b/testsuites/tmitrontests/include/timesys.h
deleted file mode 100644
index 4a9ebf55ad..0000000000
--- a/testsuites/tmitrontests/include/timesys.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* timesys.h
- *
- * This header file contains the global variables for the Time
- * suite.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/*
- * How many times a particular operation is performed while timed.
- */
-
-#ifndef OPERATION_COUNT
-#define OPERATION_COUNT 100
-#endif
-
-/* functions */
-
-#define put_time( _message, _total_time, \
- _iterations, _loop_overhead, _overhead ) \
- printf( \
- "%s %d\n", \
- (_message), \
- (((_total_time) - (_loop_overhead)) / (_iterations)) - (_overhead) \
- )
-
-#if defined(STACK_CHECKER_ON) || defined(RTEMS_DEBUG)
-#define Print_Warning() \
- do { \
- puts( \
- "\n" \
- "THE TIMES REPORTED BY THIS TEST INCLUDE DEBUG CODE!\n" \
- "\n" \
- ); \
- } while (0)
-
-#else
-#define Print_Warning()
-#endif
-
-/* variables */
-
-TEST_EXTERN volatile unsigned32 end_time; /* ending time variable */
-TEST_EXTERN volatile unsigned32 overhead; /* loop overhead variable */
-
-/* end of include file */
diff --git a/testsuites/tmitrontests/tmitronsem01/Makefile.am b/testsuites/tmitrontests/tmitronsem01/Makefile.am
deleted file mode 100644
index 2cb351e2a9..0000000000
--- a/testsuites/tmitrontests/tmitronsem01/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = tmitronsem01
-
-MANAGERS = all
-
-C_FILES = init.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/tmitrontests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-OPERATION_COUNT = @OPERATION_COUNT@
-AM_CPPFLAGS += -I$(top_srcdir)/include -DOPERATION_COUNT=$(OPERATION_COUNT)
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/tmitrontests/tmitronsem01/init.c b/testsuites/tmitrontests/tmitronsem01/init.c
deleted file mode 100644
index 1428d5ce5d..0000000000
--- a/testsuites/tmitrontests/tmitronsem01/init.c
+++ /dev/null
@@ -1,144 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is called from init_exec and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-#include <timesys.h>
-#include <stdio.h>
-
-void ITRON_Init( void )
-{
- T_CSEM pk_csem;
- T_RSEM pk_rsem;
- int index;
-
- pk_csem.isemcnt = 2;
- pk_csem.maxsem = 3;
- pk_csem.sematr = TA_TFIFO;
-
- printf( "\n\n*** TMITRON01 -- ITRON TIMING TEST ***\n" );
-
- /*
- * time one invocation of cre_sem
- */
-
- Timer_initialize();
- (void) cre_sem( 1, &pk_csem );
- end_time = Read_timer();
- put_time(
- "cre_sem",
- end_time,
- 1,
- 0, /* no loop overhead to take out */
- 0 /* no calling overhead */
- );
-
- /*
- * time one invocation of del_sem
- */
-
- Timer_initialize();
- (void) del_sem( 1 );
- end_time = Read_timer();
- put_time(
- "del_sem",
- end_time,
- 1,
- 0, /* no loop overhead to take out */
- 0 /* no calling overhead */
- );
-
- pk_csem.isemcnt = 100;
- pk_csem.maxsem = 100;
- pk_csem.sematr = TA_TFIFO;
- (void) cre_sem( 1, &pk_csem );
-
- /*
- * time preq_sem (available)
- */
-
- Timer_initialize();
- for ( index = 1 ; index<=OPERATION_COUNT ; index++ )
- (void) preq_sem( 1 );
- end_time = Read_timer();
- put_time(
- "preq_sem (available)",
- end_time,
- OPERATION_COUNT,
- 0, /* don't take the loop overhead out */
- 0 /* no calling overhead */
- );
-
- /*
- * time preq_sem (not available)
- */
-
- Timer_initialize();
- for ( index = 1 ; index<=OPERATION_COUNT ; index++ )
- (void) preq_sem( 1 );
- end_time = Read_timer();
- put_time(
- "preq_sem (not available)",
- end_time,
- OPERATION_COUNT,
- 0, /* don't take the loop overhead out */
- 0 /* no calling overhead */
- );
-
- /*
- * time sig_sem (no waiting tasks)
- */
-
- Timer_initialize();
- for ( index = 1 ; index<=OPERATION_COUNT ; index++ )
- (void) sig_sem( 1 );
- end_time = Read_timer();
- put_time(
- "sig_sem (no waiting tasks)",
- end_time,
- OPERATION_COUNT,
- 0, /* don't take the loop overhead out */
- 0 /* no calling overhead */
- );
-
- /*
- * time ref_sem
- */
-
- Timer_initialize();
- for ( index = 1 ; index<=OPERATION_COUNT ; index++ )
- (void) ref_sem( 1, &pk_rsem );
- end_time = Read_timer();
- put_time(
- "ref_sem",
- end_time,
- OPERATION_COUNT,
- 0, /* don't take the loop overhead out */
- 0 /* no calling overhead */
- );
-
- printf( "\n\nXXX ADD BLOCKING AND PREEMPTING TIME TESTS\n\n" );
-
-
- printf( "*** END OF TMITRON01 -- ITRON TIMING TEST ***\n" );
- exit( 0 );
-}
diff --git a/testsuites/tmitrontests/tmitronsem01/system.h b/testsuites/tmitrontests/tmitronsem01/system.h
deleted file mode 100644
index 87f3612e67..0000000000
--- a/testsuites/tmitrontests/tmitronsem01/system.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-#include <itron.h>
-#include <assert.h>
-
-/* functions */
-
-void ITRON_Init( void );
-
-/* configuration information */
-
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-
-#define CONFIGURE_ITRON_INIT_TASK_TABLE
-#define CONFIGURE_MAXIMUM_ITRON_SEMAPHORES 100
-
-#include <confdefs.h>
-
-/* global variables */
-
-TEST_EXTERN rtems_id Global_variable; /* example global variable */
-
-/* end of include file */
diff --git a/testsuites/tmitrontests/tmitronsem01/tmitronsem01.doc b/testsuites/tmitrontests/tmitronsem01/tmitronsem01.doc
deleted file mode 100644
index 558f0594c8..0000000000
--- a/testsuites/tmitrontests/tmitronsem01/tmitronsem01.doc
+++ /dev/null
@@ -1,9 +0,0 @@
-#
-# $Id$
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-Time some basic ITRON semaphore operations
diff --git a/testsuites/tmitrontests/tmitrontests.am b/testsuites/tmitrontests/tmitrontests.am
deleted file mode 100644
index 577bac9fd2..0000000000
--- a/testsuites/tmitrontests/tmitrontests.am
+++ /dev/null
@@ -1,11 +0,0 @@
-project_bspdir=$(PROJECT_ROOT)/@RTEMS_BSP@
-
-$(project_bspdir)/tests:
- @$(mkinstalldirs) $@
-
-$(project_bspdir)/tests/$(TEST)$(LIB_VARIANT).exe: $(PGM)
- $(INSTALL_PROGRAM) $< $@
-
-TMPINSTALL_FILES += \
-$(project_bspdir)/tests \
-$(project_bspdir)/tests/$(TEST)$(LIB_VARIANT).exe
diff --git a/testsuites/tmtests/Makefile.am b/testsuites/tmtests/Makefile.am
deleted file mode 100644
index 57d15492c6..0000000000
--- a/testsuites/tmtests/Makefile.am
+++ /dev/null
@@ -1,15 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-
-SUBDIRS = include tmck tmoverhd tm01 tm02 tm03 tm04 tm05 tm06 tm07 tm08 \
- tm09 tm10 tm11 tm12 tm13 tm14 tm15 tm16 tm17 tm18 tm19 tm20 tm21 tm22 \
- tm23 tm24 tm25 tm26 tm27 tm28 tm29
-
-EXTRA_DIST = tmtests.am
-
-include $(top_srcdir)/../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/tmtests/README b/testsuites/tmtests/README
deleted file mode 100644
index c27617d5a3..0000000000
--- a/testsuites/tmtests/README
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# $Id$
-#
-
-This directory contains the RTEMS Timing Test Suite.
-The tests in this directory are used to measure the execution
-time of RTEMS directive and some critical internal functions.
-The results of these test are reported in the Fact Sheets
-and Supplental Manuals.
-
-These tests attempt to benchmark RTEMS as the user would. They measure
-the execution time for a directive (under various circumstances)
-from the time RTEMS is entered until it is executed. Where possible,
-the time is the average of at least 100 invocations of the directive.
-
-The accuracy of the times reported by these benchmarks is very dependent
-on the resolution of the timer being used. It is also important to
-insure that all sources of hardware interrupts are disabled during
-execution of the tests. This insures that the directive time reported
-does not include any interrupt time.
-
diff --git a/testsuites/tmtests/include/Makefile.am b/testsuites/tmtests/include/Makefile.am
deleted file mode 100644
index fcf88cb578..0000000000
--- a/testsuites/tmtests/include/Makefile.am
+++ /dev/null
@@ -1,9 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-
-noinst_HEADERS = timesys.h
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/tmtests/include/timesys.h b/testsuites/tmtests/include/timesys.h
deleted file mode 100644
index 5c21ae5d68..0000000000
--- a/testsuites/tmtests/include/timesys.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* timesys.h
- *
- * This header file contains the global variables for the Time
- * suite.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <tmacros.h>
-
-/*
- * This constant determines the maximum number of a resource
- * that will be created. For example, some test create multiple
- * blocking tasks to determine the execution time of blocking
- * services. By default, the blocking time of 100 tasks will
- * be measured. Small targets often do not have enough memory
- * to create 100 tasks. By overriding the default OPERATION_COUNT
- * with a lower number (typically 10 or less), all of the time tests
- * can usually be run. This is stil not very fine-grained but
- * is enough to significantly reduce memory consumption.
- */
-
-#ifndef OPERATION_COUNT
-#define OPERATION_COUNT 100
-#endif
-
-/* functions */
-
-#define put_time( _message, _total_time, \
- _iterations, _loop_overhead, _overhead ) \
- fprintf( stderr, \
- "%s %d\n", \
- (_message), \
- (((_total_time) - (_loop_overhead)) / (_iterations)) - (_overhead) \
- )
-
-#if defined(STACK_CHECKER_ON) || defined(RTEMS_DEBUG)
-#define Print_Warning() \
- do { \
- puts( \
- "\n" \
- "THE TIMES REPORTED BY THIS TEST INCLUDE DEBUG CODE!\n" \
- "\n" \
- ); \
- } while (0)
-
-#else
-#define Print_Warning()
-#endif
-
-/* variables */
-
-TEST_EXTERN volatile rtems_unsigned32 end_time; /* ending time variable */
-TEST_EXTERN volatile rtems_unsigned32 overhead; /* loop overhead variable */
-
-TEST_EXTERN rtems_id Task_id[ OPERATION_COUNT+1 ]; /* array of task ids */
-TEST_EXTERN rtems_id Task_name[ OPERATION_COUNT+1 ]; /* array of task names */
-
-/* end of include file */
diff --git a/testsuites/tmtests/tm01/Makefile.am b/testsuites/tmtests/tm01/Makefile.am
deleted file mode 100644
index cec68ff0b8..0000000000
--- a/testsuites/tmtests/tm01/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = tm01
-
-MANAGERS = io semaphore
-
-C_FILES = task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/tmtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-OPERATION_COUNT = @OPERATION_COUNT@
-AM_CPPFLAGS += -I$(top_srcdir)/include -DOPERATION_COUNT=$(OPERATION_COUNT)
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/tmtests/tm01/system.h b/testsuites/tmtests/tm01/system.h
deleted file mode 100644
index 891ad109c3..0000000000
--- a/testsuites/tmtests/tm01/system.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* system.h
- *
- * This include file is used by all tests in the Time Suite.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <coverhd.h>
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-#include <timesys.h>
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 2
-#define CONFIGURE_MAXIMUM_SEMAPHORES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/testsuites/tmtests/tm01/task1.c b/testsuites/tmtests/tm01/task1.c
deleted file mode 100644
index 525f2f69d1..0000000000
--- a/testsuites/tmtests/tm01/task1.c
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_task Test_task(
- rtems_task_argument argument
-);
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- Print_Warning();
-
- puts( "\n\n*** TIME TEST 1 ***" );
-
- Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
- Task_name[ 2 ] = rtems_build_name( 'T', 'A', '2', ' ' );
- Task_name[ 3 ] = rtems_build_name( 'T', 'A', '3', ' ' );
-
- status = rtems_task_create(
- Task_name[ 1 ],
- 128,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_create of TA1" );
-
- status = rtems_task_start( Task_id[ 1 ], Test_task, 0 );
- directive_failed( status, "rtems_task_start of TA1" );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-
-}
-
-rtems_task Test_task(
- rtems_task_argument argument
-)
-{
- rtems_unsigned32 semaphore_obtain_time;
- rtems_unsigned32 semaphore_release_time;
- rtems_unsigned32 semaphore_obtain_no_wait_time;
- rtems_unsigned32 semaphore_obtain_loop_time;
- rtems_unsigned32 semaphore_release_loop_time;
- rtems_unsigned32 index;
- rtems_unsigned32 iterations;
- rtems_name name;
- rtems_id smid;
- rtems_status_code status;
-
- name = rtems_build_name( 'S', 'M', '1', ' ' );
-
- semaphore_obtain_time = 0;
- semaphore_release_time = 0;
- semaphore_obtain_no_wait_time = 0;
- semaphore_obtain_loop_time = 0;
- semaphore_release_loop_time = 0;
-
-
- /* Time one invocation of rtems_semaphore_create */
-
- Timer_initialize();
- (void) rtems_semaphore_create(
- name,
- OPERATION_COUNT,
- RTEMS_DEFAULT_MODES,
- RTEMS_NO_PRIORITY,
- &smid
- );
- end_time = Read_timer();
- put_time(
- "rtems_semaphore_create",
- end_time,
- 1,
- 0,
- CALLING_OVERHEAD_SEMAPHORE_CREATE
- );
-
- /* Time one invocation of rtems_semaphore_delete */
-
- Timer_initialize();
- (void) rtems_semaphore_delete( smid );
- end_time = Read_timer();
- put_time(
- "rtems_semaphore_delete",
- end_time,
- 1,
- 0,
- CALLING_OVERHEAD_SEMAPHORE_CREATE
- );
-
- status = rtems_semaphore_create(
- name,
- OPERATION_COUNT,
- RTEMS_DEFAULT_ATTRIBUTES,
- RTEMS_NO_PRIORITY,
- &smid
- );
-
- for ( iterations=OPERATION_COUNT ; iterations ; iterations-- ) {
-
- Timer_initialize();
- for ( index = 1 ; index<=OPERATION_COUNT ; index++ )
- (void) Empty_function();
- end_time = Read_timer();
-
- semaphore_obtain_loop_time += end_time;
- semaphore_release_loop_time += end_time;
-
- /* rtems_semaphore_obtain (available) */
-
- Timer_initialize();
- for ( index = 1 ; index<=OPERATION_COUNT ; index++ )
- (void) rtems_semaphore_obtain(
- smid,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
- end_time = Read_timer();
-
- semaphore_obtain_time += end_time;
-
- /* rtems_semaphore_release */
-
- Timer_initialize();
- for ( index = 1 ; index<=OPERATION_COUNT ; index++ )
- (void) rtems_semaphore_release( smid );
- end_time = Read_timer();
-
- semaphore_release_time += end_time;
-
- /* semaphore obtain (RTEMS_NO_WAIT) */
- Timer_initialize();
- for ( index = 1 ; index<=OPERATION_COUNT ; index++ )
- rtems_semaphore_obtain( smid, RTEMS_NO_WAIT, RTEMS_NO_TIMEOUT );
- semaphore_obtain_no_wait_time += Read_timer();
-
- Timer_initialize();
- for ( index = 1 ; index<=OPERATION_COUNT ; index++ )
- rtems_semaphore_release( smid );
- end_time = Read_timer();
-
- semaphore_release_time += end_time;
- }
-
- put_time(
- "rtems_semaphore_obtain: available",
- semaphore_obtain_time,
- OPERATION_COUNT * OPERATION_COUNT,
- semaphore_obtain_loop_time,
- CALLING_OVERHEAD_SEMAPHORE_OBTAIN
- );
-
- put_time(
- "rtems_semaphore_obtain: not available -- NO_WAIT",
- semaphore_obtain_no_wait_time,
- OPERATION_COUNT * OPERATION_COUNT,
- semaphore_obtain_loop_time,
- CALLING_OVERHEAD_SEMAPHORE_OBTAIN
- );
-
- put_time(
- "rtems_semaphore_release: no waiting tasks",
- semaphore_release_time,
- OPERATION_COUNT * OPERATION_COUNT * 2,
- semaphore_release_loop_time * 2,
- CALLING_OVERHEAD_SEMAPHORE_RELEASE
- );
-
- puts( "*** END OF TEST 1 ***" );
- exit( 0 );
-}
diff --git a/testsuites/tmtests/tm01/tm01.doc b/testsuites/tmtests/tm01/tm01.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/tmtests/tm01/tm01.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/tmtests/tm02/Makefile.am b/testsuites/tmtests/tm02/Makefile.am
deleted file mode 100644
index 972dce7e71..0000000000
--- a/testsuites/tmtests/tm02/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = tm02
-
-MANAGERS = io semaphore
-
-C_FILES = task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/tmtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-OPERATION_COUNT = @OPERATION_COUNT@
-AM_CPPFLAGS += -I$(top_srcdir)/include -DOPERATION_COUNT=$(OPERATION_COUNT)
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/tmtests/tm02/system.h b/testsuites/tmtests/tm02/system.h
deleted file mode 100644
index a2c701c05c..0000000000
--- a/testsuites/tmtests/tm02/system.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* system.h
- *
- * This include file is used by all tests in the Time Suite.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <coverhd.h>
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-#include <timesys.h>
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 111
-#define CONFIGURE_MAXIMUM_TIMERS 110
-#define CONFIGURE_MAXIMUM_SEMAPHORES 101
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/testsuites/tmtests/tm02/task1.c b/testsuites/tmtests/tm02/task1.c
deleted file mode 100644
index a4c6544d24..0000000000
--- a/testsuites/tmtests/tm02/task1.c
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_id High_id;
-rtems_id Low_id;
-rtems_id Semaphore_id;
-
-rtems_task High_task(
- rtems_task_argument argument
-);
-
-rtems_task Middle_tasks(
- rtems_task_argument argument
-);
-
-rtems_task Low_task(
- rtems_task_argument argument
-);
-
-
-void test_init();
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- Print_Warning();
-
- puts( "\n\n*** TIME TEST 2 ***" );
-
- test_init();
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete" );
-}
-
-void test_init()
-{
- rtems_status_code status;
- rtems_unsigned32 index;
- rtems_task_priority priority;
-
- priority = 5;
-
- status = rtems_task_create(
- rtems_build_name( 'H', 'I', 'G', 'H' ),
- priority,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &High_id
- );
- directive_failed( status, "rtems_task_create of high task" );
-
- priority++;
-
- status = rtems_task_start( High_id, High_task, 0 );
- directive_failed( status, "rtems_task_start of high task" );
-
- for ( index=2 ; index <= OPERATION_COUNT ; index++ ) {
- status = rtems_task_create(
- rtems_build_name( 'M', 'I', 'D', ' ' ),
- priority,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Low_id
- );
- directive_failed( status, "rtems_task_create middle" );
-
- priority++;
-
- status = rtems_task_start( Low_id, Middle_tasks, 0 );
- directive_failed( status, "rtems_task_start middle" );
- }
-
- status = rtems_task_create(
- rtems_build_name( 'L', 'O', 'W', ' ' ),
- priority,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Low_id
- );
- directive_failed( status, "rtems_task_create low" );
-
- status = rtems_task_start( Low_id, Low_task, 0 );
- directive_failed( status, "rtems_task_start low" );
-
- status = rtems_semaphore_create(
- rtems_build_name( 'S', 'M', '1', ' '),
- 0,
- RTEMS_DEFAULT_ATTRIBUTES,
- RTEMS_NO_PRIORITY,
- &Semaphore_id
- );
- directive_failed( status, "rtems_semaphore_create of SM1" );
-}
-
-rtems_task High_task(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- Timer_initialize(); /* start blocking rtems_semaphore_obtain time */
- status = rtems_semaphore_obtain(
- Semaphore_id,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
-}
-
-rtems_task Middle_tasks(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- status = rtems_semaphore_obtain(
- Semaphore_id,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
-}
-
-rtems_task Low_task(
- rtems_task_argument argument
-)
-{
- end_time = Read_timer();
-
- put_time(
- "rtems_semaphore_obtain: not available -- caller blocks",
- end_time,
- OPERATION_COUNT,
- 0,
- CALLING_OVERHEAD_SEMAPHORE_OBTAIN
- );
-
- puts( "*** END OF TEST 2 ***" );
- exit( 0 );
-}
diff --git a/testsuites/tmtests/tm02/tm02.doc b/testsuites/tmtests/tm02/tm02.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/tmtests/tm02/tm02.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/tmtests/tm03/Makefile.am b/testsuites/tmtests/tm03/Makefile.am
deleted file mode 100644
index 6f62d92019..0000000000
--- a/testsuites/tmtests/tm03/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = tm03
-
-MANAGERS = io semaphore
-
-C_FILES = task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/tmtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-OPERATION_COUNT = @OPERATION_COUNT@
-AM_CPPFLAGS += -I$(top_srcdir)/include -DOPERATION_COUNT=$(OPERATION_COUNT)
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/tmtests/tm03/system.h b/testsuites/tmtests/tm03/system.h
deleted file mode 100644
index a2c701c05c..0000000000
--- a/testsuites/tmtests/tm03/system.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* system.h
- *
- * This include file is used by all tests in the Time Suite.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <coverhd.h>
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-#include <timesys.h>
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 111
-#define CONFIGURE_MAXIMUM_TIMERS 110
-#define CONFIGURE_MAXIMUM_SEMAPHORES 101
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/testsuites/tmtests/tm03/task1.c b/testsuites/tmtests/tm03/task1.c
deleted file mode 100644
index 92ee59092b..0000000000
--- a/testsuites/tmtests/tm03/task1.c
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_id Semaphore_id;
-rtems_task test_init(
- rtems_task_argument argument
-);
-
-rtems_task Middle_tasks(
- rtems_task_argument argument
-);
-
-rtems_task High_task(
- rtems_task_argument argument
-);
-
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
- rtems_id task_id;
-
- Print_Warning();
-
- puts( "\n\n*** TIME TEST 3 ***" );
- status = rtems_task_create(
- rtems_build_name( 'T', 'A', '1', ' ' ),
- 252,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &task_id
- );
- directive_failed( status, "rtems_task_create of test_init" );
-
- status = rtems_task_start( task_id, test_init, 0 );
- directive_failed( status, "rtems_task_start of test_init" );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
-
-rtems_task test_init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
- rtems_unsigned32 index;
- rtems_id task_id;
- rtems_task_priority priority;
-
- priority = 250;
-
- status = rtems_semaphore_create(
- rtems_build_name( 'S', 'M', '1', '\0'),
- 0,
- RTEMS_DEFAULT_ATTRIBUTES,
- RTEMS_NO_PRIORITY,
- &Semaphore_id
- );
- directive_failed( status, "rtems_semaphore_create of SM1" );
-
- for ( index = 2 ; index <= OPERATION_COUNT ; index ++ ) {
- rtems_task_create(
- rtems_build_name( 'M', 'I', 'D', ' ' ),
- priority,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &task_id
- );
- directive_failed( status, "rtems_task_create middle" );
-
- priority--;
-
- rtems_task_start( task_id, Middle_tasks, 0 );
- directive_failed( status, "rtems_task_start middle" );
- }
-
- status = rtems_task_create(
- rtems_build_name( 'H', 'I', 'G', 'H' ),
- priority,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &task_id
- );
- directive_failed( status, "rtems_task_create of high task" );
-
- status = rtems_task_start( task_id, High_task, 0 );
- directive_failed( status, "rtems_task_start of high task" );
-
- Timer_initialize(); /* start the timer */
- status = rtems_semaphore_release( Semaphore_id );
-}
-
-rtems_task Middle_tasks(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- status = rtems_semaphore_obtain(
- Semaphore_id,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
-
- status = rtems_semaphore_release( Semaphore_id );
-}
-
-rtems_task High_task(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- status = rtems_semaphore_obtain(
- Semaphore_id,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
-
- end_time = Read_timer();
-
- put_time(
- "rtems_semaphore_release: task readied -- preempts caller",
- end_time,
- OPERATION_COUNT,
- 0,
- CALLING_OVERHEAD_SEMAPHORE_RELEASE
- );
-
- puts( "*** END OF TEST 3 ***" );
- exit( 0 );
-}
diff --git a/testsuites/tmtests/tm03/tm03.doc b/testsuites/tmtests/tm03/tm03.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/tmtests/tm03/tm03.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/tmtests/tm04/Makefile.am b/testsuites/tmtests/tm04/Makefile.am
deleted file mode 100644
index ba0f3b8b8d..0000000000
--- a/testsuites/tmtests/tm04/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = tm04
-
-MANAGERS = io semaphore
-
-C_FILES = task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/tmtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-OPERATION_COUNT = @OPERATION_COUNT@
-AM_CPPFLAGS += -I$(top_srcdir)/include -DOPERATION_COUNT=$(OPERATION_COUNT)
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/tmtests/tm04/system.h b/testsuites/tmtests/tm04/system.h
deleted file mode 100644
index ef4e319c73..0000000000
--- a/testsuites/tmtests/tm04/system.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* system.h
- *
- * This include file is used by all tests in the Time Suite.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <coverhd.h>
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-#include <timesys.h>
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 111
-#define CONFIGURE_MAXIMUM_SEMAPHORES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/testsuites/tmtests/tm04/task1.c b/testsuites/tmtests/tm04/task1.c
deleted file mode 100644
index 648828ebe1..0000000000
--- a/testsuites/tmtests/tm04/task1.c
+++ /dev/null
@@ -1,387 +0,0 @@
-/*
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_id Semaphore_id;
-rtems_id Task_id[OPERATION_COUNT+1];
-rtems_unsigned32 task_count;
-rtems_id Highest_id;
-
-rtems_task Low_tasks(
- rtems_task_argument argument
-);
-
-rtems_task High_task(
- rtems_task_argument argument
-);
-
-rtems_task Restart_task(
- rtems_task_argument argument
-);
-
-void test_init();
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- Print_Warning();
-
- puts( "\n\n*** TIME TEST 4 ***" );
-
- test_init();
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
-
-void test_init()
-{
- rtems_status_code status;
- rtems_unsigned32 index;
-
- task_count = OPERATION_COUNT;
-
- for ( index = 1 ; index <= OPERATION_COUNT ; index++ ) {
-
- status = rtems_task_create(
- rtems_build_name( 'T', 'I', 'M', 'E' ),
- 10,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_NO_PREEMPT,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ index ]
- );
- directive_failed( status, "rtems_task_create loop" );
-
- status = rtems_task_start( Task_id[ index ], Low_tasks, 0 );
- directive_failed( status, "rtems_task_start loop" );
- }
-
- status = rtems_semaphore_create(
- rtems_build_name( 'S', 'M', '1', ' ' ),
- 0,
- RTEMS_DEFAULT_ATTRIBUTES,
- RTEMS_NO_PRIORITY,
- &Semaphore_id
- );
- directive_failed( status, "rtems_semaphore_create of SM1" );
-}
-
-rtems_task Highest_task(
- rtems_task_argument argument
-)
-{
- rtems_task_priority old_priority;
- rtems_status_code status;
-
- if ( argument == 1 ) {
-
- end_time = Read_timer();
-
- put_time(
- "rtems_task_restart: blocked task -- preempts caller",
- end_time,
- 1,
- 0,
- CALLING_OVERHEAD_TASK_RESTART
- );
-
- status = rtems_task_set_priority(
- RTEMS_CURRENT_PRIORITY,
- 254,
- &old_priority
- );
- directive_failed( status, "rtems_task_set_priority" );
-
- } else if ( argument == 2 ) {
-
- end_time = Read_timer();
-
- put_time(
- "rtems_task_restart: ready task -- preempts caller",
- end_time,
- 1,
- 0,
- CALLING_OVERHEAD_TASK_RESTART
- );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-
- } else
- (void) rtems_semaphore_obtain(
- Semaphore_id,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
-
-}
-
-rtems_task High_task(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
- rtems_unsigned32 index;
- rtems_name name;
- rtems_task_priority old_priority;
-
- Timer_initialize();
- (void) rtems_task_restart( Highest_id, 1 );
- /* preempted by Higher_task */
-
- Timer_initialize();
- (void) rtems_task_restart( Highest_id, 2 );
- /* preempted by Higher_task */
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) Empty_function();
- overhead = Read_timer();
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- rtems_semaphore_release( Semaphore_id );
- end_time = Read_timer();
-
- put_time(
- "rtems_semaphore_release: task readied -- returns to caller",
- end_time,
- OPERATION_COUNT,
- 0,
- CALLING_OVERHEAD_SEMAPHORE_RELEASE
- );
-
- name = rtems_build_name( 'T', 'I', 'M', 'E' );
-
- for ( index=1 ; index <= OPERATION_COUNT ; index++ ) {
- status = rtems_task_delete( Task_id[index] );
- directive_failed( status, "rtems_task_delete" );
- }
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- rtems_task_create(
- name,
- 10,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_NO_PREEMPT,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ index ]
- );
- end_time = Read_timer();
-
- put_time(
- "rtems_task_create",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_TASK_CREATE
- );
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- rtems_task_start( Task_id[ index ], Low_tasks, 0 );
-
- end_time = Read_timer();
-
- put_time(
- "rtems_task_start",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_TASK_START
- );
-
- for ( index=1 ; index <= OPERATION_COUNT ; index++ ) {
- status = rtems_task_delete( Task_id[ index ] );
- directive_failed( status, "rtems_task_delete" );
- }
-
- for ( index=1 ; index <= OPERATION_COUNT ; index++ ) {
- status = rtems_task_create(
- name,
- 250,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_NO_PREEMPT,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ index ]
- );
- directive_failed( status, "rtems_task_create LOOP" );
-
- status = rtems_task_start( Task_id[ index ], Restart_task, 0 );
- directive_failed( status, "rtems_task_start LOOP" );
-
- status = rtems_task_suspend( Task_id[ index ] );
- directive_failed( status, "rtems_task_suspend LOOP" );
- }
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_task_restart( Task_id[ index ], 0 );
- end_time = Read_timer();
-
- put_time(
- "rtems_task_restart: suspended task -- returns to caller",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_TASK_RESTART
- );
-
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_task_suspend( Task_id[ index ] );
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_task_delete( Task_id[ index ] );
- end_time = Read_timer();
-
- put_time(
- "rtems_task_delete: suspended task",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_TASK_DELETE
- );
-
- for ( index=1 ; index <= OPERATION_COUNT ; index++ ) {
- status = rtems_task_create(
- name,
- 250,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ index ]
- );
- directive_failed( status, "rtems_task_create LOOP" );
-
- status = rtems_task_start( Task_id[ index ], Restart_task, 0 );
- directive_failed( status, "rtems_task_start LOOP" );
- }
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_task_restart( Task_id[ index ], 1 );
- end_time = Read_timer();
-
- put_time(
- "rtems_task_restart: ready task -- returns to caller",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_TASK_RESTART
- );
-
- for ( index=1 ; index <= OPERATION_COUNT ; index++ ) {
- status = rtems_task_set_priority( Task_id[ index ], 5, &old_priority );
- directive_failed( status, "rtems_task_set_priority loop" );
- }
-
- /* yield processor -- tasks block */
- status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
- directive_failed( status, "rtems_task_wake_after" );
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_task_restart( Task_id[ index ], 1 );
- end_time = Read_timer();
-
- put_time(
- "rtems_task_restart: blocked task -- returns to caller",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_TASK_RESTART
- );
-
- /* yield processor -- tasks block */
- status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
- directive_failed( status, "rtems_task_wake_after" );
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_task_delete( Task_id[ index ] );
- end_time = Read_timer();
-
- put_time(
- "rtems_task_delete: blocked task",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_TASK_DELETE
- );
-
- puts( "*** END OF TEST 4 ***" );
- exit( 0 );
-}
-
-rtems_task Low_tasks(
- rtems_task_argument argument
-)
-{
- rtems_id id;
- rtems_status_code status;
-
- task_count--;
-
- if ( task_count == 0 ) {
- status = rtems_task_create(
- rtems_build_name( 'H', 'I', ' ', ' ' ),
- 5,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &id
- );
- directive_failed( status, "rtems_task_create HI" );
-
- status = rtems_task_start( id, High_task, 0 );
- directive_failed( status, "rtems_task_start HI" );
-
- status = rtems_task_create(
- rtems_build_name( 'H', 'I', 'G', 'H' ),
- 3,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Highest_id
- );
- directive_failed( status, "rtems_task_create HIGH" );
-
- status = rtems_task_start( Highest_id, Highest_task, 0 );
- directive_failed( status, "rtems_task_start HIGH" );
-
- }
- (void) rtems_semaphore_obtain(
- Semaphore_id,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
-}
-
-rtems_task Restart_task(
- rtems_task_argument argument
-)
-{
- if ( argument == 1 )
- (void) rtems_semaphore_obtain(
- Semaphore_id,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
-}
diff --git a/testsuites/tmtests/tm04/tm04.doc b/testsuites/tmtests/tm04/tm04.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/tmtests/tm04/tm04.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/tmtests/tm05/Makefile.am b/testsuites/tmtests/tm05/Makefile.am
deleted file mode 100644
index 9650859f45..0000000000
--- a/testsuites/tmtests/tm05/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = tm05
-
-MANAGERS = io
-
-C_FILES = task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/tmtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-OPERATION_COUNT = @OPERATION_COUNT@
-AM_CPPFLAGS += -I$(top_srcdir)/include -DOPERATION_COUNT=$(OPERATION_COUNT)
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/tmtests/tm05/system.h b/testsuites/tmtests/tm05/system.h
deleted file mode 100644
index a2c701c05c..0000000000
--- a/testsuites/tmtests/tm05/system.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* system.h
- *
- * This include file is used by all tests in the Time Suite.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <coverhd.h>
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-#include <timesys.h>
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 111
-#define CONFIGURE_MAXIMUM_TIMERS 110
-#define CONFIGURE_MAXIMUM_SEMAPHORES 101
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/testsuites/tmtests/tm05/task1.c b/testsuites/tmtests/tm05/task1.c
deleted file mode 100644
index a942d35b33..0000000000
--- a/testsuites/tmtests/tm05/task1.c
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_id Task_id[OPERATION_COUNT+1];
-rtems_unsigned32 Task_index;
-
-rtems_task High_task(
- rtems_task_argument argument
-);
-
-rtems_task Middle_tasks(
- rtems_task_argument argument
-);
-
-rtems_task Low_task(
- rtems_task_argument argument
-);
-
-void test_init();
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- Print_Warning();
-
- puts( "\n\n*** TIME TEST 5 ***" );
-
- test_init();
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
-
-void test_init()
-{
- rtems_status_code status;
- rtems_task_entry task_entry;
- rtems_task_priority priority;
- rtems_unsigned32 index;
-
- priority = 250;
-
- for( index = 0; index <= OPERATION_COUNT ; index++ ) {
-
- status = rtems_task_create(
- rtems_build_name( 'T', 'I', 'M', 'E' ),
- priority,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ index ]
- );
- directive_failed( status, "rtems_task_create loop" );
-
- priority--;
-
- if ( index==0 ) task_entry = Low_task;
- else if ( index==OPERATION_COUNT ) task_entry = High_task;
- else task_entry = Middle_tasks;
-
- status = rtems_task_start( Task_id[ index ], task_entry, 0 );
- directive_failed( status, "rtems_task_start loop" );
- }
-}
-
-rtems_task High_task(
- rtems_task_argument argument
-)
-{
- Timer_initialize();
-
- (void) rtems_task_suspend( RTEMS_SELF );
-
- end_time = Read_timer();
-
- put_time(
- "rtems_task_resume: task readied -- preempts caller",
- end_time,
- OPERATION_COUNT,
- 0,
- CALLING_OVERHEAD_TASK_RESUME
- );
-
- puts( "*** END OF TEST 5 ***" );
- exit( 0 );
-}
-
-rtems_task Middle_tasks(
- rtems_task_argument argument
-)
-{
- (void) rtems_task_suspend( RTEMS_SELF );
-
- Task_index++;
- (void) rtems_task_resume( Task_id[ Task_index ] );
-}
-
-rtems_task Low_task(
- rtems_task_argument argument
-)
-{
-
- end_time = Read_timer();
-
- put_time(
- "rtems_task_suspend: calling task",
- end_time,
- OPERATION_COUNT,
- 0,
- CALLING_OVERHEAD_TASK_SUSPEND
- );
-
- Task_index = 1;
- Timer_initialize();
- (void) rtems_task_resume( Task_id[ Task_index ] );
-}
diff --git a/testsuites/tmtests/tm05/tm05.doc b/testsuites/tmtests/tm05/tm05.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/tmtests/tm05/tm05.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/tmtests/tm06/Makefile.am b/testsuites/tmtests/tm06/Makefile.am
deleted file mode 100644
index 034bce6b49..0000000000
--- a/testsuites/tmtests/tm06/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = tm06
-
-MANAGERS = io
-
-C_FILES = task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/tmtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-OPERATION_COUNT = @OPERATION_COUNT@
-AM_CPPFLAGS += -I$(top_srcdir)/include -DOPERATION_COUNT=$(OPERATION_COUNT)
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/tmtests/tm06/system.h b/testsuites/tmtests/tm06/system.h
deleted file mode 100644
index a2c701c05c..0000000000
--- a/testsuites/tmtests/tm06/system.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* system.h
- *
- * This include file is used by all tests in the Time Suite.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <coverhd.h>
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-#include <timesys.h>
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 111
-#define CONFIGURE_MAXIMUM_TIMERS 110
-#define CONFIGURE_MAXIMUM_SEMAPHORES 101
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/testsuites/tmtests/tm06/task1.c b/testsuites/tmtests/tm06/task1.c
deleted file mode 100644
index 3892044021..0000000000
--- a/testsuites/tmtests/tm06/task1.c
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_id Task_id[ OPERATION_COUNT + 1 ];
-
-rtems_unsigned32 Task_restarted;
-
-rtems_task null_task(
- rtems_task_argument argument
-);
-
-rtems_task Task_1(
- rtems_task_argument argument
-);
-
-void test_init( void );
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- Print_Warning();
-
- puts( "\n\n*** TIME TEST 6 ***" );
-
- test_init();
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
-
-void test_init( void )
-{
- rtems_status_code status;
- rtems_id id;
-
- Task_restarted = OPERATION_COUNT;
-
- status = rtems_task_create(
- rtems_build_name( 'T', 'I', 'M', 'E' ),
- 128,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &id
- );
- directive_failed( status, "rtems_task_create" );
-
- status = rtems_task_start( id, Task_1, 0 );
- directive_failed( status, "rtems_task_start" );
-}
-
-rtems_task Task_1(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
- rtems_unsigned32 index;
-
- if ( Task_restarted == OPERATION_COUNT )
- Timer_initialize();
-
- Task_restarted--;
-
- if ( Task_restarted != 0 )
- (void) rtems_task_restart( RTEMS_SELF, 0 );
-
- end_time = Read_timer();
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) Empty_function();
- overhead = Read_timer();
-
- put_time(
- "rtems_task_restart: calling task",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_TASK_RESTART
- );
-
- for ( index=1 ; index <= OPERATION_COUNT ; index++ ) {
- status = rtems_task_create(
- rtems_build_name( 'T', 'I', 'M', 'E' ),
- 254,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ index ]
- );
- directive_failed( status, "rtems_task_create loop" );
-
- status = rtems_task_start( Task_id[ index ], null_task, 0 );
- directive_failed( status, "rtems_task_start loop" );
- }
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_task_suspend( Task_id[ index ] );
- end_time = Read_timer();
-
- put_time(
- "rtems_task_suspend: returns to caller",
- end_time,
- OPERATION_COUNT,
- 0,
- CALLING_OVERHEAD_TASK_SUSPEND
- );
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_task_resume( Task_id[ index ] );
- end_time = Read_timer();
-
- put_time(
- "rtems_task_resume: task readied -- returns to caller",
- end_time,
- OPERATION_COUNT,
- 0,
- CALLING_OVERHEAD_TASK_RESUME
- );
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_task_delete( Task_id[ index ] );
- end_time = Read_timer();
-
- put_time(
- "rtems_task_delete: ready task",
- end_time,
- OPERATION_COUNT,
- 0,
- CALLING_OVERHEAD_TASK_RESUME
- );
-
- puts( "*** END OF TEST 6 ***" );
- exit( 0 );
-}
-
-rtems_task null_task(
- rtems_task_argument argument
-)
-{
- while ( FOREVER )
- ;
-}
diff --git a/testsuites/tmtests/tm06/tm06.doc b/testsuites/tmtests/tm06/tm06.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/tmtests/tm06/tm06.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/tmtests/tm07/Makefile.am b/testsuites/tmtests/tm07/Makefile.am
deleted file mode 100644
index cdec5806be..0000000000
--- a/testsuites/tmtests/tm07/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = tm07
-
-MANAGERS = io
-
-C_FILES = task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/tmtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-OPERATION_COUNT = @OPERATION_COUNT@
-AM_CPPFLAGS += -I$(top_srcdir)/include -DOPERATION_COUNT=$(OPERATION_COUNT)
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/tmtests/tm07/system.h b/testsuites/tmtests/tm07/system.h
deleted file mode 100644
index a2c701c05c..0000000000
--- a/testsuites/tmtests/tm07/system.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* system.h
- *
- * This include file is used by all tests in the Time Suite.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <coverhd.h>
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-#include <timesys.h>
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 111
-#define CONFIGURE_MAXIMUM_TIMERS 110
-#define CONFIGURE_MAXIMUM_SEMAPHORES 101
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/testsuites/tmtests/tm07/task1.c b/testsuites/tmtests/tm07/task1.c
deleted file mode 100644
index 08364c522e..0000000000
--- a/testsuites/tmtests/tm07/task1.c
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_id Task_id[ OPERATION_COUNT+1 ], task_index;
-
-rtems_task High_task(
- rtems_task_argument argument
-);
-
-rtems_task Middle_tasks(
- rtems_task_argument argument
-);
-
-rtems_task Low_task(
- rtems_task_argument argument
-);
-
-void test_init();
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- Print_Warning();
-
- puts( "\n\n*** TIME TEST 7 ***" );
-
- test_init();
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
-
-void test_init()
-{
- rtems_status_code status;
- rtems_task_priority priority;
- rtems_task_entry task_entry;
- rtems_unsigned32 index;
-
- priority = 250;
-
- for( index=0 ; index <= OPERATION_COUNT ; index++ ) {
- status = rtems_task_create(
- rtems_build_name( 'T', 'I', 'M', 'E' ),
- priority,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[index]
- );
- directive_failed( status, "rtems_task_create" );
- priority--;
-
- if ( index == 0 ) task_entry = Low_task;
- else if ( index == OPERATION_COUNT ) task_entry = High_task;
- else task_entry = Middle_tasks;
-
- status = rtems_task_start( Task_id[index], task_entry, 0 );
- directive_failed( status, "rtems_task_start" );
- }
-}
-
-rtems_task High_task(
- rtems_task_argument argument
-)
-{
- if ( argument != 0 ) {
- end_time = Read_timer();
-
- put_time(
- "rtems_task_restart: suspended task -- preempts caller",
- end_time,
- OPERATION_COUNT,
- 0,
- CALLING_OVERHEAD_TASK_RESTART
- );
- } else
- (void) rtems_task_suspend( RTEMS_SELF );
-
- puts( "*** END OF TEST 7 ***" );
- exit( 0 );
-}
-
-rtems_task Middle_tasks(
- rtems_task_argument argument
-)
-{
- task_index++;
-
- if ( argument != 0 )
- (void) rtems_task_restart( Task_id[ task_index ], 0xffffffff );
- else
- (void) rtems_task_suspend( RTEMS_SELF );
-}
-
-rtems_task Low_task(
- rtems_task_argument argument
-)
-{
- task_index = 1;
-
- Timer_initialize();
- (void) rtems_task_restart( Task_id[ task_index ], 0xffffffff );
-}
diff --git a/testsuites/tmtests/tm07/tm07.doc b/testsuites/tmtests/tm07/tm07.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/tmtests/tm07/tm07.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/tmtests/tm08/Makefile.am b/testsuites/tmtests/tm08/Makefile.am
deleted file mode 100644
index 66eefd2380..0000000000
--- a/testsuites/tmtests/tm08/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = tm08
-
-MANAGERS = io
-
-C_FILES = task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/tmtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-OPERATION_COUNT = @OPERATION_COUNT@
-AM_CPPFLAGS += -I$(top_srcdir)/include -DOPERATION_COUNT=$(OPERATION_COUNT)
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/tmtests/tm08/system.h b/testsuites/tmtests/tm08/system.h
deleted file mode 100644
index a2c701c05c..0000000000
--- a/testsuites/tmtests/tm08/system.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* system.h
- *
- * This include file is used by all tests in the Time Suite.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <coverhd.h>
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-#include <timesys.h>
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 111
-#define CONFIGURE_MAXIMUM_TIMERS 110
-#define CONFIGURE_MAXIMUM_SEMAPHORES 101
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/testsuites/tmtests/tm08/task1.c b/testsuites/tmtests/tm08/task1.c
deleted file mode 100644
index b78b375b59..0000000000
--- a/testsuites/tmtests/tm08/task1.c
+++ /dev/null
@@ -1,254 +0,0 @@
-/*
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_id Test_task_id;
-
-rtems_task test_task(
- rtems_task_argument argument
-);
-rtems_task test_task1(
- rtems_task_argument argument
-);
-void test_init();
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- Print_Warning();
-
- puts( "\n\n*** TIME TEST 8 ***" );
-
- test_init();
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
-
-void test_init()
-{
- rtems_status_code status;
-
- status = rtems_task_create(
- 1,
- 128,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Test_task_id
- );
- directive_failed( status, "rtems_task_create" );
-
- status = rtems_task_start( Test_task_id, test_task, 0 );
- directive_failed( status, "rtems_task_start" );
-
- status = rtems_task_create(
- 1,
- 254,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Test_task_id
- );
- directive_failed( status, "rtems_task_create" );
-
- status = rtems_task_start( Test_task_id, test_task1, 0 );
- directive_failed( status, "rtems_task_start" );
-}
-
-rtems_task test_task(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
- rtems_unsigned32 index;
- rtems_task_priority old_priority;
- rtems_time_of_day time;
- rtems_unsigned32 old_note;
- rtems_unsigned32 old_mode;
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) Empty_function();
- overhead = Read_timer();
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_task_set_priority(
- Test_task_id,
- RTEMS_CURRENT_PRIORITY,
- &old_priority
- );
- end_time = Read_timer();
-
- put_time(
- "rtems_task_set_priority: obtain current priority",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_TASK_SET_PRIORITY
- );
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_task_set_priority( Test_task_id, 253, &old_priority );
- end_time = Read_timer();
-
- put_time(
- "rtems_task_set_priority: returns to caller",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_TASK_SET_PRIORITY
- );
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_task_mode(
- RTEMS_CURRENT_MODE,
- RTEMS_CURRENT_MODE,
- &old_mode
- );
- end_time = Read_timer();
-
- put_time(
- "rtems_task_mode: obtain current mode",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_TASK_MODE
- );
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ ) {
- (void) rtems_task_mode(
- RTEMS_INTERRUPT_LEVEL(1),
- RTEMS_INTERRUPT_MASK,
- &old_mode
- );
- (void) rtems_task_mode(
- RTEMS_INTERRUPT_LEVEL(0),
- RTEMS_INTERRUPT_MASK,
- &old_mode
- );
- }
- end_time = Read_timer();
-
- put_time(
- "rtems_task_mode: no reschedule",
- end_time,
- OPERATION_COUNT * 2,
- overhead,
- CALLING_OVERHEAD_TASK_MODE
- );
-
- Timer_initialize(); /* must be one host */
- (void) rtems_task_mode( RTEMS_NO_ASR, RTEMS_ASR_MASK, &old_mode );
- end_time = Read_timer();
-
- put_time(
- "rtems_task_mode: reschedule -- returns to caller",
- end_time,
- 1,
- 0,
- CALLING_OVERHEAD_TASK_MODE
- );
-
- status = rtems_task_mode( RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &old_mode );
- directive_failed( status, "rtems_task_mode" );
-
- status = rtems_task_set_priority( Test_task_id, 1, &old_priority );
- directive_failed( status, "rtems_task_set_priority" );
-
- /* preempted by test_task1 */
- Timer_initialize();
- (void) rtems_task_mode( RTEMS_PREEMPT, RTEMS_PREEMPT_MASK, &old_mode );
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_task_set_note( Test_task_id, 8, 10 );
- end_time = Read_timer();
-
- put_time(
- "rtems_task_set_note",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_TASK_SET_NOTE
- );
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_task_get_note( Test_task_id, 8, &old_note );
- end_time = Read_timer();
-
- put_time(
- "rtems_task_get_note",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_TASK_GET_NOTE
- );
-
- build_time( &time, 1, 1, 1988, 0, 0, 0, 0 );
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_clock_set( &time );
- end_time = Read_timer();
-
- put_time(
- "rtems_clock_set",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_CLOCK_SET
- );
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
- end_time = Read_timer();
-
- put_time(
- "rtems_clock_get",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_CLOCK_GET
- );
-
- puts( "*** END OF TEST 8 ***" );
- exit( 0 );
-}
-
-rtems_task test_task1(
- rtems_task_argument argument
-)
-{
- end_time = Read_timer();
-
- put_time(
- "rtems_task_mode: reschedule -- preempts caller",
- end_time,
- 1,
- 0,
- CALLING_OVERHEAD_TASK_MODE
- );
-
- (void) rtems_task_suspend( RTEMS_SELF );
-}
diff --git a/testsuites/tmtests/tm08/tm08.doc b/testsuites/tmtests/tm08/tm08.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/tmtests/tm08/tm08.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/tmtests/tm09/Makefile.am b/testsuites/tmtests/tm09/Makefile.am
deleted file mode 100644
index 205a989fec..0000000000
--- a/testsuites/tmtests/tm09/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = tm09
-
-MANAGERS = io message
-
-C_FILES = task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/tmtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-OPERATION_COUNT = @OPERATION_COUNT@
-AM_CPPFLAGS += -I$(top_srcdir)/include -DOPERATION_COUNT=$(OPERATION_COUNT)
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/tmtests/tm09/system.h b/testsuites/tmtests/tm09/system.h
deleted file mode 100644
index b22856dafc..0000000000
--- a/testsuites/tmtests/tm09/system.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* system.h
- *
- * This include file is used by all tests in the Time Suite.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <coverhd.h>
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-#include <timesys.h>
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#define CONFIGURE_EXTRA_TASK_STACKS (1 * RTEMS_MINIMUM_STACK_SIZE)
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/testsuites/tmtests/tm09/task1.c b/testsuites/tmtests/tm09/task1.c
deleted file mode 100644
index 27bbc0931e..0000000000
--- a/testsuites/tmtests/tm09/task1.c
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_id Queue_id;
-
-rtems_task Test_task(
- rtems_task_argument argument
-);
-void queue_test();
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- Print_Warning();
-
- puts( "\n\n*** TIME TEST 9 ***" );
-
- status = rtems_task_create(
- 1,
- 128,
- RTEMS_MINIMUM_STACK_SIZE * 2,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_create" );
-
- status = rtems_task_start( Task_id[ 1 ], Test_task, 0 );
- directive_failed( status, "rtems_task_start" );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
-
-rtems_task Test_task (
- rtems_task_argument argument
-)
-{
- Timer_initialize();
- rtems_message_queue_create(
- 1,
- OPERATION_COUNT,
- 16,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Queue_id
- );
- end_time = Read_timer();
-
- put_time(
- "rtems_message_queue_create",
- end_time,
- 1,
- 0,
- CALLING_OVERHEAD_MESSAGE_QUEUE_CREATE
- );
-
- queue_test();
-
- Timer_initialize();
- rtems_message_queue_delete( Queue_id );
- end_time = Read_timer();
-
- put_time(
- "rtems_message_queue_delete",
- end_time,
- 1,
- 0,
- CALLING_OVERHEAD_MESSAGE_QUEUE_DELETE
- );
-
- puts( "*** END OF TEST 9 ***" );
- exit( 0 );
-}
-
-void queue_test()
-{
- rtems_unsigned32 send_loop_time;
- rtems_unsigned32 urgent_loop_time;
- rtems_unsigned32 receive_loop_time;
- rtems_unsigned32 send_time;
- rtems_unsigned32 urgent_time;
- rtems_unsigned32 receive_time;
- rtems_unsigned32 empty_flush_time;
- rtems_unsigned32 flush_time;
- rtems_unsigned32 empty_flush_count;
- rtems_unsigned32 flush_count;
- rtems_unsigned32 index;
- rtems_unsigned32 iterations;
- long buffer[4];
- rtems_status_code status;
- rtems_unsigned32 size;
-
- send_loop_time = 0;
- urgent_loop_time = 0;
- receive_loop_time = 0;
- send_time = 0;
- urgent_time = 0;
- receive_time = 0;
- empty_flush_time = 0;
- flush_time = 0;
- flush_count = 0;
- empty_flush_count = 0;
-
- for ( iterations = 1 ; iterations <= OPERATION_COUNT ; iterations++ ) {
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) Empty_function();
- send_loop_time += Read_timer();
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) Empty_function();
- urgent_loop_time += Read_timer();
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) Empty_function();
- receive_loop_time += Read_timer();
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_message_queue_send( Queue_id, (long (*)[4])buffer, 16 );
- send_time += Read_timer();
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_message_queue_receive(
- Queue_id,
- (long (*)[4])buffer,
- &size,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
- receive_time += Read_timer();
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_message_queue_urgent( Queue_id, (long (*)[4])buffer, 16 );
- urgent_time += Read_timer();
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_message_queue_receive(
- Queue_id,
- (long (*)[4])buffer,
- &size,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
- receive_time += Read_timer();
-
- Timer_initialize();
- rtems_message_queue_flush( Queue_id, &empty_flush_count );
- empty_flush_time += Read_timer();
-
- /* send one message to flush */
- status = rtems_message_queue_send(
- Queue_id,
- (long (*)[4])buffer,
- 16
- );
- directive_failed( status, "rtems_message_queue_send" );
-
- Timer_initialize();
- rtems_message_queue_flush( Queue_id, &flush_count );
- flush_time += Read_timer();
- }
-
- put_time(
- "rtems_message_queue_send: no waiting tasks",
- send_time,
- OPERATION_COUNT * OPERATION_COUNT,
- send_loop_time,
- CALLING_OVERHEAD_MESSAGE_QUEUE_SEND
- );
-
- put_time(
- "rtems_message_queue_urgent: no waiting tasks",
- urgent_time,
- OPERATION_COUNT * OPERATION_COUNT,
- urgent_loop_time,
- CALLING_OVERHEAD_MESSAGE_QUEUE_URGENT
- );
-
- put_time(
- "rtems_message_queue_receive: available",
- receive_time,
- OPERATION_COUNT * OPERATION_COUNT * 2,
- receive_loop_time * 2,
- CALLING_OVERHEAD_MESSAGE_QUEUE_RECEIVE
- );
-
- put_time(
- "rtems_message_queue_flush: no messages flushed",
- empty_flush_time,
- OPERATION_COUNT,
- 0,
- CALLING_OVERHEAD_MESSAGE_QUEUE_FLUSH
- );
-
- put_time(
- "rtems_message_queue_flush: messages flushed",
- flush_time,
- OPERATION_COUNT,
- 0,
- CALLING_OVERHEAD_MESSAGE_QUEUE_FLUSH
- );
-
-}
diff --git a/testsuites/tmtests/tm09/tm09.doc b/testsuites/tmtests/tm09/tm09.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/tmtests/tm09/tm09.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/tmtests/tm10/Makefile.am b/testsuites/tmtests/tm10/Makefile.am
deleted file mode 100644
index 72052067af..0000000000
--- a/testsuites/tmtests/tm10/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = tm10
-
-MANAGERS = io message
-
-C_FILES = task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/tmtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-OPERATION_COUNT = @OPERATION_COUNT@
-AM_CPPFLAGS += -I$(top_srcdir)/include -DOPERATION_COUNT=$(OPERATION_COUNT)
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/tmtests/tm10/system.h b/testsuites/tmtests/tm10/system.h
deleted file mode 100644
index ebdb1863a7..0000000000
--- a/testsuites/tmtests/tm10/system.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* system.h
- *
- * This include file is used by all tests in the Time Suite.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <coverhd.h>
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-#include <timesys.h>
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 110
-#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/testsuites/tmtests/tm10/task1.c b/testsuites/tmtests/tm10/task1.c
deleted file mode 100644
index 4a24d34db3..0000000000
--- a/testsuites/tmtests/tm10/task1.c
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_id Queue_id;
-long Buffer[4];
-
-rtems_task High_task(
- rtems_task_argument argument
-);
-
-rtems_task Middle_tasks(
- rtems_task_argument argument
-);
-
-rtems_task Low_task(
- rtems_task_argument argument
-);
-
-void test_init();
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- Print_Warning();
-
- puts( "\n\n*** TIME TEST 10 ***" );
-
- test_init();
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
-
-void test_init()
-{
- rtems_unsigned32 index;
- rtems_unsigned32 size;
- rtems_task_entry task_entry;
- rtems_status_code status;
- rtems_task_priority priority;
- rtems_id task_id;
-
- priority = 5;
-
- for( index = 0; index <= OPERATION_COUNT ; index++ ) {
- status = rtems_task_create(
- rtems_build_name( 'T', 'I', 'M', 'E' ),
- priority,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &task_id
- );
- directive_failed( status, "rtems_task_create LOOP" );
-
- priority++;
-
- if ( index==0 ) task_entry = High_task;
- else if ( index==OPERATION_COUNT ) task_entry = Low_task;
- else task_entry = Middle_tasks;
-
- status = rtems_task_start( task_id, task_entry, 0 );
- directive_failed( status, "rtems_task_start LOOP" );
- }
-
- status = rtems_message_queue_create(
- 1,
- OPERATION_COUNT,
- 16,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Queue_id
- );
- directive_failed( status, "rtems_message_queue_create" );
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) Empty_function();
- overhead = Read_timer();
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_message_queue_receive(
- Queue_id,
- (long (*)[4]) Buffer,
- &size,
- RTEMS_NO_WAIT,
- RTEMS_NO_TIMEOUT
- );
- end_time = Read_timer();
-
- put_time(
- "rtems_message_queue_receive: not available -- NO_WAIT",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_MESSAGE_QUEUE_RECEIVE
- );
-
-}
-
-rtems_task High_task(
- rtems_task_argument argument
-)
-{
- rtems_unsigned32 size;
-
- Timer_initialize();
- (void) rtems_message_queue_receive(
- Queue_id,
- (long (*)[4]) Buffer,
- &size,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
-}
-
-rtems_task Middle_tasks(
- rtems_task_argument argument
-)
-{
- rtems_unsigned32 size;
-
- (void) rtems_message_queue_receive(
- Queue_id,
- (long (*)[4]) Buffer,
- &size,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
-}
-
-
-rtems_task Low_task(
- rtems_task_argument argument
-)
-{
- end_time = Read_timer();
-
- put_time(
- "rtems_message_queue_receive: not available -- caller blocks",
- end_time,
- OPERATION_COUNT,
- 0,
- CALLING_OVERHEAD_MESSAGE_QUEUE_RECEIVE
- );
-
- puts( "*** END OF TEST 10 ***" );
- exit( 0 );
-}
diff --git a/testsuites/tmtests/tm10/tm10.doc b/testsuites/tmtests/tm10/tm10.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/tmtests/tm10/tm10.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/tmtests/tm11/Makefile.am b/testsuites/tmtests/tm11/Makefile.am
deleted file mode 100644
index c12ecf0788..0000000000
--- a/testsuites/tmtests/tm11/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = tm11
-
-MANAGERS = io message
-
-C_FILES = task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/tmtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-OPERATION_COUNT = @OPERATION_COUNT@
-AM_CPPFLAGS += -I$(top_srcdir)/include -DOPERATION_COUNT=$(OPERATION_COUNT)
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/tmtests/tm11/system.h b/testsuites/tmtests/tm11/system.h
deleted file mode 100644
index bed2533a81..0000000000
--- a/testsuites/tmtests/tm11/system.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* system.h
- *
- * This include file is used by all tests in the Time Suite.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <coverhd.h>
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-#include <timesys.h>
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 111
-#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/testsuites/tmtests/tm11/task1.c b/testsuites/tmtests/tm11/task1.c
deleted file mode 100644
index 0afc1b9590..0000000000
--- a/testsuites/tmtests/tm11/task1.c
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_id Queue_id;
-
-long Buffer[4];
-
-rtems_task test_init(
- rtems_task_argument argument
-);
-
-rtems_task Middle_tasks(
- rtems_task_argument argument
-);
-
-rtems_task High_task(
- rtems_task_argument argument
-);
-
-
-void Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
- rtems_id id;
-
- Print_Warning();
-
- puts( "\n\n*** TIME TEST 11 ***" );
-
- status = rtems_task_create(
- 1,
- 251,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &id
- );
- directive_failed( status, "rtems_task_create" );
-
- status = rtems_task_start( id, test_init, 0 );
- directive_failed( status, "rtems_task_start" );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
-
-rtems_task test_init(
- rtems_task_argument argument
-)
-{
- rtems_unsigned32 index;
- rtems_task_entry task_entry;
- rtems_task_priority priority;
- rtems_id task_id;
- rtems_status_code status;
-
-/* As each task is started, it preempts this task and
- * performs a blocking rtems_message_queue_receive. Upon completion of
- * this loop all created tasks are blocked.
- */
-
- status = rtems_message_queue_create(
- rtems_build_name( 'M', 'Q', '1', ' ' ),
- OPERATION_COUNT,
- 16,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Queue_id
- );
- directive_failed( status, "rtems_message_queue_create" );
-
- priority = 250;
-
- for( index = 0; index < OPERATION_COUNT ; index++ ) {
- status = rtems_task_create(
- rtems_build_name( 'T', 'I', 'M', 'E' ),
- priority,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &task_id
- );
- directive_failed( status, "rtems_task_create LOOP" );
-
- priority--;
-
- if ( index==OPERATION_COUNT-1 ) task_entry = High_task;
- else task_entry = Middle_tasks;
-
- status = rtems_task_start( task_id, task_entry, 0 );
- directive_failed( status, "rtems_task_start LOOP" );
- }
-
- Timer_initialize();
- (void) rtems_message_queue_send( Queue_id, (long (*)[4]) Buffer, 16 );
-}
-
-rtems_task Middle_tasks(
- rtems_task_argument argument
-)
-{
- rtems_unsigned32 size;
-
- (void) rtems_message_queue_receive(
- Queue_id,
- (long (*)[4]) Buffer,
- &size,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
-
- (void) rtems_message_queue_send( Queue_id, (long (*)[4]) Buffer, size );
-}
-
-rtems_task High_task(
- rtems_task_argument argument
-)
-{
- rtems_unsigned32 size;
-
- (void) rtems_message_queue_receive(
- Queue_id,
- (long (*)[4]) Buffer,
- &size,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
-
- end_time = Read_timer();
-
- put_time(
- "rtems_message_queue_send: task readied -- preempts caller",
- end_time,
- OPERATION_COUNT,
- 0,
- CALLING_OVERHEAD_MESSAGE_QUEUE_SEND
- );
-
- puts( "*** END OF TEST 11 ***" );
- exit( 0 );
-}
diff --git a/testsuites/tmtests/tm11/tm11.doc b/testsuites/tmtests/tm11/tm11.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/tmtests/tm11/tm11.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/tmtests/tm12/Makefile.am b/testsuites/tmtests/tm12/Makefile.am
deleted file mode 100644
index 213f72271e..0000000000
--- a/testsuites/tmtests/tm12/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = tm12
-
-MANAGERS = io message
-
-C_FILES = task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/tmtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-OPERATION_COUNT = @OPERATION_COUNT@
-AM_CPPFLAGS += -I$(top_srcdir)/include -DOPERATION_COUNT=$(OPERATION_COUNT)
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/tmtests/tm12/system.h b/testsuites/tmtests/tm12/system.h
deleted file mode 100644
index bed2533a81..0000000000
--- a/testsuites/tmtests/tm12/system.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* system.h
- *
- * This include file is used by all tests in the Time Suite.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <coverhd.h>
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-#include <timesys.h>
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 111
-#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/testsuites/tmtests/tm12/task1.c b/testsuites/tmtests/tm12/task1.c
deleted file mode 100644
index 7e57b29f12..0000000000
--- a/testsuites/tmtests/tm12/task1.c
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_id Queue_id;
-
-long Buffer[4];
-
-rtems_task test_init(
- rtems_task_argument argument
-);
-
-rtems_task High_task(
- rtems_task_argument argument
-);
-
-rtems_task Low_tasks(
- rtems_task_argument argument
-);
-
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_id task_id;
- rtems_status_code status;
-
- Print_Warning();
-
- puts( "\n\n*** TIME TEST 12 ***" );
-
- status = rtems_task_create(
- 1,
- 251,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &task_id
- );
- directive_failed( status, "rtems_task_create" );
-
- status = rtems_task_start( task_id, test_init, 0 );
- directive_failed( status, "rtems_task_start" );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
-
-rtems_task test_init(
- rtems_task_argument argument
-)
-{
- rtems_unsigned32 index;
- rtems_task_entry task_entry;
- rtems_task_priority priority;
- rtems_id task_id;
- rtems_status_code status;
-
-
- status = rtems_message_queue_create(
- rtems_build_name( 'M', 'Q', '1', ' ' ),
- OPERATION_COUNT,
- 16,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Queue_id
- );
- directive_failed( status, "rtems_message_queue_create" );
-
- priority = 250;
-
- for( index = 0; index <= OPERATION_COUNT ; index++ ) {
- status = rtems_task_create(
- rtems_build_name( 'T', 'I', 'M', 'E' ),
- priority,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &task_id
- );
- directive_failed( status, "rtems_task_create LOOP" );
-
- priority--;
-
- if ( index==OPERATION_COUNT ) task_entry = High_task;
- else task_entry = Low_tasks;
-
- status = rtems_task_start( task_id, task_entry, 0 );
- directive_failed( status, "rtems_task_start LOOP" );
- }
-}
-
-rtems_task High_task(
- rtems_task_argument argument
-)
-{
- rtems_unsigned32 index;
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) Empty_function();
- overhead = Read_timer();
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_message_queue_send( Queue_id, (long (*)[4]) Buffer, 16 );
- end_time = Read_timer();
-
- put_time(
- "rtems_message_queue_send: task readied -- returns to caller",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_MESSAGE_QUEUE_SEND
- );
-
- puts( "*** END OF TEST 12 ***" );
- exit( 0 );
-}
-
-rtems_task Low_tasks(
- rtems_task_argument argument
-)
-{
- rtems_unsigned32 size;
-
- (void) rtems_message_queue_receive(
- Queue_id,
- (long (*)[4]) Buffer,
- &size,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
-}
diff --git a/testsuites/tmtests/tm12/tm12.doc b/testsuites/tmtests/tm12/tm12.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/tmtests/tm12/tm12.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/tmtests/tm13/Makefile.am b/testsuites/tmtests/tm13/Makefile.am
deleted file mode 100644
index caaf71f8b3..0000000000
--- a/testsuites/tmtests/tm13/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = tm13
-
-MANAGERS = io message
-
-C_FILES = task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/tmtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-OPERATION_COUNT = @OPERATION_COUNT@
-AM_CPPFLAGS += -I$(top_srcdir)/include -DOPERATION_COUNT=$(OPERATION_COUNT)
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/tmtests/tm13/system.h b/testsuites/tmtests/tm13/system.h
deleted file mode 100644
index bed2533a81..0000000000
--- a/testsuites/tmtests/tm13/system.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* system.h
- *
- * This include file is used by all tests in the Time Suite.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <coverhd.h>
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-#include <timesys.h>
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 111
-#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/testsuites/tmtests/tm13/task1.c b/testsuites/tmtests/tm13/task1.c
deleted file mode 100644
index 317b1f1805..0000000000
--- a/testsuites/tmtests/tm13/task1.c
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_id Queue_id;
-
-long Buffer[4];
-
-rtems_task test_init(
- rtems_task_argument argument
-);
-
-rtems_task Middle_tasks(
- rtems_task_argument argument
-);
-
-rtems_task High_task(
- rtems_task_argument argument
-);
-
-void Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
- rtems_id id;
-
- Print_Warning();
-
- puts( "\n\n*** TIME TEST 13 ***" );
-
- status = rtems_task_create(
- 1,
- 251,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &id
- );
- directive_failed( status, "rtems_task_create" );
-
- status = rtems_task_start( id, test_init, 0 );
- directive_failed( status, "rtems_task_start" );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
-
-rtems_task test_init(
- rtems_task_argument argument
-)
-{
- rtems_unsigned32 index;
- rtems_task_entry task_entry;
- rtems_task_priority priority;
- rtems_id task_id;
- rtems_status_code status;
-
-/* As each task is started, it preempts this task and
- * performs a blocking rtems_message_queue_receive. Upon completion of
- * this loop all created tasks are blocked.
- */
-
- status = rtems_message_queue_create(
- rtems_build_name( 'M', 'Q', '1', ' ' ),
- OPERATION_COUNT,
- 16,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Queue_id
- );
- directive_failed( status, "rtems_message_queue_create" );
-
- priority = 250;
-
- for( index = 0; index < OPERATION_COUNT ; index++ ) {
- status = rtems_task_create(
- rtems_build_name( 'T', 'I', 'M', 'E' ),
- priority,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &task_id
- );
- directive_failed( status, "rtems_task_create LOOP" );
-
- priority--;
-
- if ( index==OPERATION_COUNT-1 ) task_entry = High_task;
- else task_entry = Middle_tasks;
-
- status = rtems_task_start( task_id, task_entry, 0 );
- directive_failed( status, "rtems_task_start LOOP" );
- }
-
- Timer_initialize();
- (void) rtems_message_queue_urgent( Queue_id, (long (*)[4]) Buffer, 16 );
-}
-
-rtems_task Middle_tasks(
- rtems_task_argument argument
-)
-{
- rtems_unsigned32 size;
-
- (void) rtems_message_queue_receive(
- Queue_id,
- (long (*)[4]) Buffer,
- &size,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
-
- (void) rtems_message_queue_urgent( Queue_id, (long (*)[4]) Buffer, size );
-}
-
-rtems_task High_task(
- rtems_task_argument argument
-)
-{
- rtems_unsigned32 size;
-
- (void) rtems_message_queue_receive(
- Queue_id,
- (long (*)[4]) Buffer,
- &size,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
-
- end_time = Read_timer();
-
- put_time(
- "rtems_message_queue_urgent: task readied -- preempts caller",
- end_time,
- OPERATION_COUNT,
- 0,
- CALLING_OVERHEAD_MESSAGE_QUEUE_URGENT
- );
-
- puts( "*** END OF TEST 13 ***" );
- exit( 0 );
-}
diff --git a/testsuites/tmtests/tm13/tm13.doc b/testsuites/tmtests/tm13/tm13.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/tmtests/tm13/tm13.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/tmtests/tm14/Makefile.am b/testsuites/tmtests/tm14/Makefile.am
deleted file mode 100644
index 41fb6c1db6..0000000000
--- a/testsuites/tmtests/tm14/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = tm14
-
-MANAGERS = io message
-
-C_FILES = task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/tmtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-OPERATION_COUNT = @OPERATION_COUNT@
-AM_CPPFLAGS += -I$(top_srcdir)/include -DOPERATION_COUNT=$(OPERATION_COUNT)
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/tmtests/tm14/system.h b/testsuites/tmtests/tm14/system.h
deleted file mode 100644
index bed2533a81..0000000000
--- a/testsuites/tmtests/tm14/system.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* system.h
- *
- * This include file is used by all tests in the Time Suite.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <coverhd.h>
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-#include <timesys.h>
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 111
-#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/testsuites/tmtests/tm14/task1.c b/testsuites/tmtests/tm14/task1.c
deleted file mode 100644
index fc84f6c19e..0000000000
--- a/testsuites/tmtests/tm14/task1.c
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_id Queue_id;
-
-long Buffer[4];
-
-rtems_task test_init(
- rtems_task_argument argument
-);
-
-rtems_task High_task(
- rtems_task_argument argument
-);
-
-rtems_task Low_tasks(
- rtems_task_argument argument
-);
-
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_id task_id;
- rtems_status_code status;
-
- Print_Warning();
-
- puts( "\n\n*** TIME TEST 14 ***" );
-
- status = rtems_task_create(
- 1,
- 251,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &task_id
- );
- directive_failed( status, "rtems_task_create" );
-
- status = rtems_task_start( task_id, test_init, 0 );
- directive_failed( status, "rtems_task_start" );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
-
-rtems_task test_init(
- rtems_task_argument argument
-)
-{
- rtems_unsigned32 index;
- rtems_task_entry task_entry;
- rtems_task_priority priority;
- rtems_id task_id;
- rtems_status_code status;
-
-
- status = rtems_message_queue_create(
- rtems_build_name( 'M', 'Q', '1', ' ' ),
- OPERATION_COUNT,
- 16,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Queue_id
- );
- directive_failed( status, "rtems_message_queue_create" );
-
- priority = 250;
-
- for( index = 0; index <= OPERATION_COUNT ; index++ ) {
- status = rtems_task_create(
- rtems_build_name( 'T', 'I', 'M', 'E' ),
- priority,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &task_id
- );
- directive_failed( status, "rtems_task_create LOOP" );
-
- priority--;
-
- if ( index==OPERATION_COUNT ) task_entry = High_task;
- else task_entry = Low_tasks;
-
- status = rtems_task_start( task_id, task_entry, 0 );
- directive_failed( status, "rtems_task_start LOOP" );
- }
-}
-
-rtems_task High_task(
- rtems_task_argument argument
-)
-{
- rtems_unsigned32 index;
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) Empty_function();
- overhead = Read_timer();
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_message_queue_urgent( Queue_id, (long (*)[4]) Buffer, 16 );
- end_time = Read_timer();
-
- put_time(
- "rtems_message_queue_urgent: task readied -- returns to caller",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_MESSAGE_QUEUE_URGENT
- );
-
- puts( "*** END OF TEST 14 ***" );
- exit( 0 );
-}
-
-rtems_task Low_tasks(
- rtems_task_argument argument
-)
-{
- rtems_unsigned32 size;
-
- (void) rtems_message_queue_receive(
- Queue_id,
- (long (*)[4]) Buffer,
- &size,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
-}
diff --git a/testsuites/tmtests/tm14/tm14.doc b/testsuites/tmtests/tm14/tm14.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/tmtests/tm14/tm14.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/tmtests/tm15/Makefile.am b/testsuites/tmtests/tm15/Makefile.am
deleted file mode 100644
index d8e9c9b2b5..0000000000
--- a/testsuites/tmtests/tm15/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = tm15
-
-MANAGERS = io event
-
-C_FILES = task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/tmtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-OPERATION_COUNT = @OPERATION_COUNT@
-AM_CPPFLAGS += -I$(top_srcdir)/include -DOPERATION_COUNT=$(OPERATION_COUNT)
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/tmtests/tm15/system.h b/testsuites/tmtests/tm15/system.h
deleted file mode 100644
index bed2533a81..0000000000
--- a/testsuites/tmtests/tm15/system.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* system.h
- *
- * This include file is used by all tests in the Time Suite.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <coverhd.h>
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-#include <timesys.h>
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 111
-#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/testsuites/tmtests/tm15/task1.c b/testsuites/tmtests/tm15/task1.c
deleted file mode 100644
index bd20002697..0000000000
--- a/testsuites/tmtests/tm15/task1.c
+++ /dev/null
@@ -1,221 +0,0 @@
-/*
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_unsigned32 time_set, eventout;
-
-rtems_task High_tasks(
- rtems_task_argument argument
-);
-
-rtems_task Low_task(
- rtems_task_argument argument
-);
-
-void test_init();
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- Print_Warning();
-
- puts( "\n\n*** TIME TEST 15 ***" );
-
- test_init();
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
-
-void test_init()
-{
- rtems_id id;
- rtems_unsigned32 index;
- rtems_event_set event_out;
- rtems_status_code status;
-
- time_set = FALSE;
-
- status = rtems_task_create(
- rtems_build_name( 'L', 'O', 'W', ' ' ),
- 10,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_NO_PREEMPT,
- RTEMS_DEFAULT_ATTRIBUTES,
- &id
- );
- directive_failed( status, "rtems_task_create LOW" );
-
- status = rtems_task_start( id, Low_task, 0 );
- directive_failed( status, "rtems_task_start LOW" );
-
- for ( index = 1 ; index <= OPERATION_COUNT ; index++ ) {
- status = rtems_task_create(
- rtems_build_name( 'H', 'I', 'G', 'H' ),
- 5,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ index ]
- );
- directive_failed( status, "rtems_task_create LOOP" );
-
- status = rtems_task_start( Task_id[ index ], High_tasks, 0 );
- directive_failed( status, "rtems_task_start LOOP" );
- }
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) Empty_function();
- overhead = Read_timer();
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- {
- (void) rtems_event_receive(
- RTEMS_PENDING_EVENTS,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT,
- &event_out
- );
- }
-
- end_time = Read_timer();
-
- put_time(
- "rtems_event_receive: obtain current events",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_EVENT_RECEIVE
- );
-
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- {
- (void) rtems_event_receive(
- RTEMS_ALL_EVENTS,
- RTEMS_NO_WAIT,
- RTEMS_NO_TIMEOUT,
- &event_out
- );
- }
- end_time = Read_timer();
-
- put_time(
- "rtems_event_receive: not available -- NO_WAIT",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_EVENT_RECEIVE
- );
-}
-
-rtems_task Low_task(
- rtems_task_argument argument
-)
-{
- rtems_unsigned32 index;
- rtems_event_set event_out;
-
- end_time = Read_timer();
-
- put_time(
- "rtems_event_receive: not available -- caller blocks",
- end_time,
- OPERATION_COUNT,
- 0,
- CALLING_OVERHEAD_EVENT_RECEIVE
- );
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) Empty_function();
- overhead = Read_timer();
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_event_send( RTEMS_SELF, RTEMS_EVENT_16 );
- end_time = Read_timer();
-
- put_time(
- "rtems_event_send: no task readied",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_EVENT_SEND
- );
-
- Timer_initialize();
- (void) rtems_event_receive(
- RTEMS_EVENT_16,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT,
- &event_out
- );
- end_time = Read_timer();
-
- put_time(
- "rtems_event_receive: available",
- end_time,
- 1,
- 0,
- CALLING_OVERHEAD_EVENT_RECEIVE
- );
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_event_send( Task_id[ index ], RTEMS_EVENT_16 );
- end_time = Read_timer();
-
- put_time(
- "rtems_event_send: task readied -- returns to caller",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_EVENT_SEND
- );
-
- puts( "*** END OF TEST 15 ***" );
- exit( 0 );
-}
-
-rtems_task High_tasks(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- if ( time_set )
- status = rtems_event_receive(
- RTEMS_EVENT_16,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT,
- &eventout
- );
- else {
- time_set = 1;
- Timer_initialize(); /* start blocking rtems_event_receive time */
- status = rtems_event_receive(
- RTEMS_EVENT_16,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT,
- &eventout
- );
- }
-}
diff --git a/testsuites/tmtests/tm15/tm15.doc b/testsuites/tmtests/tm15/tm15.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/tmtests/tm15/tm15.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/tmtests/tm16/Makefile.am b/testsuites/tmtests/tm16/Makefile.am
deleted file mode 100644
index 30655fd158..0000000000
--- a/testsuites/tmtests/tm16/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = tm16
-
-MANAGERS = io event
-
-C_FILES = task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/tmtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-OPERATION_COUNT = @OPERATION_COUNT@
-AM_CPPFLAGS += -I$(top_srcdir)/include -DOPERATION_COUNT=$(OPERATION_COUNT)
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/tmtests/tm16/system.h b/testsuites/tmtests/tm16/system.h
deleted file mode 100644
index bed2533a81..0000000000
--- a/testsuites/tmtests/tm16/system.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* system.h
- *
- * This include file is used by all tests in the Time Suite.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <coverhd.h>
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-#include <timesys.h>
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 111
-#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/testsuites/tmtests/tm16/task1.c b/testsuites/tmtests/tm16/task1.c
deleted file mode 100644
index f4c1f1b5cd..0000000000
--- a/testsuites/tmtests/tm16/task1.c
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_unsigned32 Task_count;
-
-rtems_task test_init(
- rtems_task_argument argument
-);
-
-rtems_task Middle_tasks(
- rtems_task_argument argument
-);
-
-rtems_task High_task(
- rtems_task_argument argument
-);
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_id id;
- rtems_status_code status;
-
- Print_Warning();
-
- puts( "\n\n*** TIME TEST 16 ***" );
-
- status = rtems_task_create(
- rtems_build_name( 'T', 'E', 'S', 'T' ),
- 251,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &id
- );
- directive_failed( status, "rtems_task_create of test_init" );
-
- status = rtems_task_start( id, test_init, 0 );
- directive_failed( status, "rtems_task_start of test_init" );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
-
-rtems_task test_init(
- rtems_task_argument argument
-)
-{
- rtems_task_priority priority;
- rtems_status_code status;
- rtems_unsigned32 index;
- rtems_task_entry task_entry;
-
-/* As each task is started, it preempts this task and
- * performs a blocking rtems_event_receive. Upon completion of
- * this loop all created tasks are blocked.
- */
-
- priority = 250;
-
- for( index = 0 ; index <= OPERATION_COUNT ; index++ ) {
- status = rtems_task_create(
- rtems_build_name( 'M', 'I', 'D', ' ' ),
- priority,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ index ]
- );
- directive_failed( status, "rtems_task_create LOOP" );
-
- if ( index == OPERATION_COUNT ) task_entry = High_task;
- else task_entry = Middle_tasks;
-
- status = rtems_task_start( Task_id[ index ], task_entry, 0 );
- directive_failed( status, "rtems_task_start LOOP" );
-
- priority--;
- }
-
- Task_count = 0;
-
- Timer_initialize();
- (void) rtems_event_send( Task_id[ Task_count ], RTEMS_EVENT_16 );
- /* preempts task */
-}
-
-rtems_task Middle_tasks(
- rtems_task_argument argument
-)
-{
- rtems_event_set event_out;
-
- (void) rtems_event_receive( /* task blocks */
- RTEMS_EVENT_16,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT,
- &event_out
- );
-
- Task_count++;
-
- (void) rtems_event_send( /* preempts task */
- Task_id[ Task_count ],
- RTEMS_EVENT_16
- );
-}
-
-rtems_task High_task(
- rtems_task_argument argument
-)
-{
- rtems_event_set event_out;
-
- (void) rtems_event_receive( /* task blocks */
- RTEMS_EVENT_16,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT,
- &event_out
- );
-
- end_time = Read_timer();
-
- put_time(
- "rtems_event_send: task readied -- preempts caller",
- end_time,
- OPERATION_COUNT,
- 0,
- CALLING_OVERHEAD_EVENT_SEND
- );
-
- puts( "*** END OF TEST 16 ***" );
- exit( 0 );
-}
diff --git a/testsuites/tmtests/tm16/tm16.doc b/testsuites/tmtests/tm16/tm16.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/tmtests/tm16/tm16.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/tmtests/tm17/Makefile.am b/testsuites/tmtests/tm17/Makefile.am
deleted file mode 100644
index 9bc35a9830..0000000000
--- a/testsuites/tmtests/tm17/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = tm17
-
-MANAGERS = io
-
-C_FILES = task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/tmtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-OPERATION_COUNT = @OPERATION_COUNT@
-AM_CPPFLAGS += -I$(top_srcdir)/include -DOPERATION_COUNT=$(OPERATION_COUNT)
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/tmtests/tm17/system.h b/testsuites/tmtests/tm17/system.h
deleted file mode 100644
index bed2533a81..0000000000
--- a/testsuites/tmtests/tm17/system.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* system.h
- *
- * This include file is used by all tests in the Time Suite.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <coverhd.h>
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-#include <timesys.h>
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 111
-#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/testsuites/tmtests/tm17/task1.c b/testsuites/tmtests/tm17/task1.c
deleted file mode 100644
index f510bbd320..0000000000
--- a/testsuites/tmtests/tm17/task1.c
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_unsigned32 Task_count;
-rtems_task_priority Task_priority;
-
-rtems_task First_task(
- rtems_task_argument argument
-);
-
-rtems_task Middle_tasks(
- rtems_task_argument argument
-);
-
-rtems_task Last_task(
- rtems_task_argument argument
-);
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_task_entry task_entry;
- rtems_unsigned32 index;
- rtems_status_code status;
-
- Print_Warning();
-
- puts( "\n\n*** TIME TEST 17 ***" );
-
- Task_priority = 254;
-
- for( index = 0; index <= OPERATION_COUNT ; index++ ) {
- status = rtems_task_create(
- rtems_build_name( 'T', 'I', 'M', 'E' ),
- Task_priority,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ index ]
- );
- directive_failed( status, "rtems_task_create loop" );
-
- if ( index == OPERATION_COUNT ) task_entry = Last_task;
- else if ( index == 0 ) task_entry = First_task;
- else task_entry = Middle_tasks;
-
- status = rtems_task_start( Task_id[ index ], task_entry, 0 );
- directive_failed( status, "rtems_task_start loop" );
- }
-
- Task_count = 1;
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
-
-rtems_task First_task(
- rtems_task_argument argument
-)
-{
- rtems_task_priority previous_priority;
-
- Timer_initialize();
-
- Task_priority--;
- Task_count++;
-
- (void) rtems_task_set_priority(
- Task_id[ Task_count ],
- Task_priority,
- &previous_priority
- );
-}
-
-rtems_task Middle_tasks(
- rtems_task_argument argument
-)
-{
- rtems_task_priority previous_priority;
-
- Task_priority--;
- Task_count++;
-
- (void) rtems_task_set_priority(
- Task_id[ Task_count ],
- Task_priority,
- &previous_priority
- );
-}
-
-rtems_task Last_task(
- rtems_task_argument argument
-)
-{
- rtems_unsigned32 index;
-
- end_time = Read_timer();
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) Empty_function();
- overhead = Read_timer();
-
- put_time(
- "rtems_task_set_priority: preempts caller",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_TASK_SET_PRIORITY
- );
-
- puts( "*** END OF TEST 17 ***" );
- exit( 0 );
-}
diff --git a/testsuites/tmtests/tm17/tm17.doc b/testsuites/tmtests/tm17/tm17.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/tmtests/tm17/tm17.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/tmtests/tm18/Makefile.am b/testsuites/tmtests/tm18/Makefile.am
deleted file mode 100644
index b9f96377ec..0000000000
--- a/testsuites/tmtests/tm18/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = tm18
-
-MANAGERS = io
-
-C_FILES = task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/tmtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-OPERATION_COUNT = @OPERATION_COUNT@
-AM_CPPFLAGS += -I$(top_srcdir)/include -DOPERATION_COUNT=$(OPERATION_COUNT)
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/tmtests/tm18/system.h b/testsuites/tmtests/tm18/system.h
deleted file mode 100644
index bed2533a81..0000000000
--- a/testsuites/tmtests/tm18/system.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* system.h
- *
- * This include file is used by all tests in the Time Suite.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <coverhd.h>
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-#include <timesys.h>
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 111
-#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/testsuites/tmtests/tm18/task1.c b/testsuites/tmtests/tm18/task1.c
deleted file mode 100644
index d4c132495a..0000000000
--- a/testsuites/tmtests/tm18/task1.c
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_unsigned32 taskcount;
-rtems_task_priority taskpri;
-
-rtems_task First_task(
- rtems_task_argument argument
-);
-
-rtems_task Middle_tasks(
- rtems_task_argument argument
-);
-
-rtems_task Last_task(
- rtems_task_argument argument
-);
-
-
-void test_init();
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- Print_Warning();
-
- puts( "\n\n*** TIME TEST 18 ***" );
-
- test_init();
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
-
-void test_init()
-{
- rtems_id id;
- rtems_task_entry task_entry;
- rtems_unsigned32 index;
- rtems_status_code status;
-
- for ( index = 0 ; index <= OPERATION_COUNT ; index++ ) {
- status = rtems_task_create(
- rtems_build_name( 'T', 'I', 'M', 'E' ),
- 128,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &id
- );
- directive_failed( status, "rtems_task_create loop" );
-
- if ( index == OPERATION_COUNT ) task_entry = Last_task;
- else if ( index == 0 ) task_entry = First_task;
- else task_entry = Middle_tasks;
-
-
- status = rtems_task_start( id, task_entry, 0 );
- directive_failed( status, "rtems_task_start loop" );
- }
-
-}
-
-rtems_task First_task(
- rtems_task_argument argument
-)
-{
- Timer_initialize();
-
- (void) rtems_task_delete( RTEMS_SELF );
-}
-
-rtems_task Middle_tasks(
- rtems_task_argument argument
-)
-{
- (void) rtems_task_delete( RTEMS_SELF );
-}
-
-rtems_task Last_task(
- rtems_task_argument argument
-)
-{
- end_time = Read_timer();
-
- put_time(
- "rtems_task_delete: calling task",
- end_time,
- OPERATION_COUNT,
- 0,
- CALLING_OVERHEAD_TASK_DELETE
- );
-
- puts( "*** END OF TEST 18 ***" );
- exit( 0 );
-}
diff --git a/testsuites/tmtests/tm18/tm18.doc b/testsuites/tmtests/tm18/tm18.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/tmtests/tm18/tm18.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/tmtests/tm19/Makefile.am b/testsuites/tmtests/tm19/Makefile.am
deleted file mode 100644
index cc74b7aea7..0000000000
--- a/testsuites/tmtests/tm19/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = tm19
-
-MANAGERS = io signal
-
-C_FILES = task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/tmtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-OPERATION_COUNT = @OPERATION_COUNT@
-AM_CPPFLAGS += -I$(top_srcdir)/include -DOPERATION_COUNT=$(OPERATION_COUNT)
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/tmtests/tm19/system.h b/testsuites/tmtests/tm19/system.h
deleted file mode 100644
index bed2533a81..0000000000
--- a/testsuites/tmtests/tm19/system.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* system.h
- *
- * This include file is used by all tests in the Time Suite.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <coverhd.h>
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-#include <timesys.h>
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 111
-#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/testsuites/tmtests/tm19/task1.c b/testsuites/tmtests/tm19/task1.c
deleted file mode 100644
index 496f69c3e0..0000000000
--- a/testsuites/tmtests/tm19/task1.c
+++ /dev/null
@@ -1,207 +0,0 @@
-/*
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_asr Process_asr_for_pass_1(
- rtems_signal_set signals
-);
-
-rtems_asr Process_asr_for_pass_2(
- rtems_signal_set signals
-);
-
-rtems_task Task_1(
- rtems_task_argument argument
-);
-
-rtems_task Task_2(
- rtems_task_argument argument
-);
-
-rtems_task Task_3(
- rtems_task_argument argument
-);
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- Print_Warning();
-
- puts( "\n\n*** TIME TEST 19 ***" );
-
- status = rtems_task_create(
- rtems_build_name( 'T', 'I', 'M', 'E' ),
- 128,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_create of TASK1" );
-
- status = rtems_task_start( Task_id[ 1 ], Task_1, 0 );
- directive_failed( status, "rtems_task_start of TASK1" );
-
- status = rtems_task_create(
- rtems_build_name( 'T', 'I', 'M', 'E' ),
- 127,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 2 ]
- );
- directive_failed( status, "rtems_task_create of TASK2" );
-
- status = rtems_task_start( Task_id[ 2 ], Task_2, 0 );
- directive_failed( status, "rtems_task_start of TASK2" );
-
- status = rtems_task_create(
- rtems_build_name( 'T', 'I', 'M', 'E' ),
- 126,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 3 ]
- );
- directive_failed( status, "rtems_task_create of TASK3" );
-
- status = rtems_task_start( Task_id[ 3 ], Task_3, 0 );
- directive_failed( status, "rtems_task_start of TASK3" );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
-
-rtems_asr Process_asr_for_pass_1(
- rtems_signal_set signals
-)
-{
- end_time = Read_timer();
-
- put_time(
- "rtems_signal_send: signal to self",
- end_time,
- 1,
- 0,
- CALLING_OVERHEAD_SIGNAL_SEND
- );
-
- Timer_initialize();
-}
-
-rtems_asr Process_asr_for_pass_2(
- rtems_signal_set signals
-)
-{
- rtems_status_code status;
-
- status = rtems_task_resume( Task_id[ 3 ] );
- directive_failed( status, "rtems_task_resume" );
-
- Timer_initialize();
-}
-
-rtems_task Task_1(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- Timer_initialize();
- (void) rtems_signal_catch( Process_asr_for_pass_1, RTEMS_DEFAULT_MODES );
- end_time = Read_timer();
-
- put_time(
- "rtems_signal_catch",
- end_time,
- 1,
- 0,
- CALLING_OVERHEAD_SIGNAL_CATCH
- );
-
- Timer_initialize();
- rtems_signal_send( Task_id[ 2 ], 1 );
- end_time = Read_timer();
-
- put_time(
- "rtems_signal_send: returns to caller",
- end_time,
- 1,
- 0,
- CALLING_OVERHEAD_SIGNAL_SEND
- );
-
- Timer_initialize();
- (void) rtems_signal_send( RTEMS_SELF, RTEMS_SIGNAL_1 );
-
- /* end time is done is RTEMS_ASR */
-
- end_time = Read_timer();
-
- put_time(
- "exit ASR overhead: returns to calling task",
- end_time,
- 1,
- 0,
- 0
- );
-
- status = rtems_signal_catch( Process_asr_for_pass_2, RTEMS_NO_PREEMPT );
- directive_failed( status, "rtems_signal_catch" );
-
- Timer_initialize();
- (void) rtems_signal_send( RTEMS_SELF, RTEMS_SIGNAL_1 );
-}
-
-rtems_asr Process_asr_for_task_2(
- rtems_signal_set signals
-)
-{
- ;
-}
-
-rtems_task Task_2(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- status = rtems_signal_catch( Process_asr_for_task_2, RTEMS_DEFAULT_MODES );
- directive_failed( status, "rtems_signal_catch" );
-
- (void) rtems_task_suspend( RTEMS_SELF );
-}
-
-rtems_task Task_3(
- rtems_task_argument argument
-)
-{
- (void) rtems_task_suspend( RTEMS_SELF );
-
- end_time = Read_timer();
-
- put_time(
- "exit ASR overhead: returns to preempting task",
- end_time,
- 1,
- 0,
- 0
- );
-
- puts( "*** END OF TEST 19 ***" );
- exit( 0 );
-}
diff --git a/testsuites/tmtests/tm19/tm19.doc b/testsuites/tmtests/tm19/tm19.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/tmtests/tm19/tm19.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/tmtests/tm20/Makefile.am b/testsuites/tmtests/tm20/Makefile.am
deleted file mode 100644
index f8b4d51fea..0000000000
--- a/testsuites/tmtests/tm20/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = tm20
-
-MANAGERS = io partition region
-
-C_FILES = task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES) ../../support/stubdr/$(ARCH)/stubdr.rel
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/tmtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-OPERATION_COUNT = @OPERATION_COUNT@
-AM_CPPFLAGS += -I$(top_srcdir)/include -DOPERATION_COUNT=$(OPERATION_COUNT)
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/tmtests/tm20/system.h b/testsuites/tmtests/tm20/system.h
deleted file mode 100644
index b6e8ffc87b..0000000000
--- a/testsuites/tmtests/tm20/system.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* system.h
- *
- * This include file is used by all tests in the Time Suite.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <coverhd.h>
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-#include <timesys.h>
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-#define CONFIGURE_TEST_NEEDS_STUB_DRIVER
-
-#define CONFIGURE_MAXIMUM_PARTITIONS 1
-#define CONFIGURE_MAXIMUM_REGIONS 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/testsuites/tmtests/tm20/task1.c b/testsuites/tmtests/tm20/task1.c
deleted file mode 100644
index 34247ead95..0000000000
--- a/testsuites/tmtests/tm20/task1.c
+++ /dev/null
@@ -1,473 +0,0 @@
-/*
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-#include <assert.h>
-
-rtems_device_major_number _STUB_major = 1;
-
-rtems_id Region_id;
-rtems_name Region_name;
-rtems_unsigned8 Region_area[ 2048 ] CPU_STRUCTURE_ALIGNMENT;
-
-#define PARTITION_SIZE 2048
-#define PARTITION_ELEMENT_SIZE 128
-#define PARTITION_BUFFER_POINTERS \
- ((PARTITION_SIZE / PARTITION_ELEMENT_SIZE) + 2)
-
-rtems_id Partition_id;
-rtems_name Partition_name;
-rtems_unsigned8 Partition_area[ PARTITION_SIZE ] CPU_STRUCTURE_ALIGNMENT;
-
-void *Buffer_address_1;
-void *Buffer_address_2;
-void *Buffer_address_3;
-void *Buffer_address_4;
-
-rtems_unsigned32 buffer_count;
-
-void *Buffer_addresses[ PARTITION_BUFFER_POINTERS ];
-
-rtems_task Task_1(
- rtems_task_argument argument
-);
-
-rtems_task Task_2(
- rtems_task_argument argument
-);
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- Print_Warning();
-
- puts( "\n\n*** TIME TEST 20 ***" );
-
- status = rtems_task_create(
- rtems_build_name( 'T', 'I', 'M', '1' ),
- 128,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_create of TASK1" );
-
- status = rtems_task_start( Task_id[ 1 ], Task_1, 0 );
- directive_failed( status, "rtems_task_start of TASK1" );
-
- status = rtems_task_create(
- rtems_build_name( 'T', 'I', 'M', '2' ),
- 129,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 2 ]
- );
- directive_failed( status, "rtems_task_create of TASK2" );
-
- status = rtems_task_start( Task_id[ 2 ], Task_2, 0 );
- directive_failed( status, "rtems_task_start of TASK2" );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
-
-rtems_task Task_1(
- rtems_task_argument argument
-)
-{
- rtems_unsigned32 index;
- rtems_mode previous_mode;
- rtems_task_priority previous_priority;
- rtems_status_code status;
-
- Partition_name = rtems_build_name( 'P', 'A', 'R', 'T' );
-
- Timer_initialize();
- rtems_partition_create(
- Partition_name,
- Partition_area,
- PARTITION_SIZE,
- 128,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Partition_id
- );
- end_time = Read_timer();
-
- put_time(
- "rtems_partition_create",
- end_time,
- 1,
- 0,
- CALLING_OVERHEAD_PARTITION_CREATE
- );
-
- Region_name = rtems_build_name( 'R', 'E', 'G', 'N' );
-
- Timer_initialize();
- rtems_region_create(
- Region_name,
- Region_area,
- 2048,
- 16,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Region_id
- );
- end_time = Read_timer();
-
- put_time(
- "rtems_region_create",
- end_time,
- 1,
- 0,
- CALLING_OVERHEAD_REGION_CREATE
- );
-
- Timer_initialize();
- (void) rtems_partition_get_buffer( Partition_id, &Buffer_address_1 );
- end_time = Read_timer();
-
- put_time(
- "rtems_partition_get_buffer: available",
- end_time,
- 1,
- 0,
- CALLING_OVERHEAD_PARTITION_GET_BUFFER
- );
-
- buffer_count = 0;
- while ( FOREVER ) {
-
- status = rtems_partition_get_buffer(
- Partition_id,
- &Buffer_addresses[ buffer_count ]
- );
-
- if ( status == RTEMS_UNSATISFIED ) break;
-
- buffer_count++;
-
- assert( buffer_count < PARTITION_BUFFER_POINTERS );
- }
-
- Timer_initialize();
- (void) rtems_partition_get_buffer( Partition_id, &Buffer_address_2 );
- end_time = Read_timer();
-
- put_time(
- "rtems_partition_get_buffer: not available",
- end_time,
- 1,
- 0,
- CALLING_OVERHEAD_PARTITION_GET_BUFFER
- );
-
- Timer_initialize();
- (void) rtems_partition_return_buffer( Partition_id, Buffer_address_1 );
- end_time = Read_timer();
-
- put_time(
- "rtems_partition_return_buffer",
- end_time,
- 1,
- 0,
- CALLING_OVERHEAD_PARTITION_RETURN_BUFFER
- );
-
- for ( index = 0 ; index < buffer_count ; index++ ) {
-
- status = rtems_partition_return_buffer(
- Partition_id,
- Buffer_addresses[ index ]
- );
- directive_failed( status, "rtems_partition_return_buffer" );
-
- }
-
- Timer_initialize();
- (void) rtems_partition_delete( Partition_id );
- end_time = Read_timer();
-
- put_time(
- "rtems_partition_delete",
- end_time,
- 1,
- 0,
- CALLING_OVERHEAD_PARTITION_DELETE
- );
-
- status = rtems_region_get_segment(
- Region_id,
- 400,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT,
- &Buffer_address_2
- );
- directive_failed( status, "region_get_segment" );
-
- Timer_initialize();
- (void) rtems_region_get_segment(
- Region_id,
- 400,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT,
- &Buffer_address_3
- );
- end_time = Read_timer();
-
- put_time(
- "rtems_region_get_segment: available",
- end_time,
- 1,
- 0,
- CALLING_OVERHEAD_REGION_GET_SEGMENT
- );
-
- Timer_initialize();
- (void) rtems_region_get_segment(
- Region_id,
- 1998,
- RTEMS_NO_WAIT,
- RTEMS_NO_TIMEOUT,
- &Buffer_address_4
- );
- end_time = Read_timer();
-
- put_time(
- "rtems_region_get_segment: not available -- NO_WAIT",
- end_time,
- 1,
- 0,
- CALLING_OVERHEAD_REGION_GET_SEGMENT
- );
-
- status = rtems_region_return_segment( Region_id, Buffer_address_3 );
- directive_failed( status, "rtems_region_return_segment" );
-
- Timer_initialize();
- (void) rtems_region_return_segment( Region_id, Buffer_address_2 );
- end_time = Read_timer();
-
- put_time(
- "rtems_region_return_segment: no waiting tasks",
- end_time,
- 1,
- 0,
- CALLING_OVERHEAD_REGION_RETURN_SEGMENT
- );
-
- status = rtems_region_get_segment(
- Region_id,
- 400,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT,
- &Buffer_address_1
- );
- directive_failed( status, "rtems_region_get_segment" );
-
- Timer_initialize();
- (void) rtems_region_get_segment(
- Region_id,
- 1998,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT,
- &Buffer_address_2
- );
-
- /* execute Task_2 */
-
- end_time = Read_timer();
-
- put_time(
- "rtems_region_return_segment: task readied -- preempts caller",
- end_time,
- 1,
- 0,
- CALLING_OVERHEAD_REGION_RETURN_SEGMENT
- );
-
- status = rtems_region_return_segment( Region_id, Buffer_address_2 );
- directive_failed( status, "rtems_region_return_segment" );
-
- status = rtems_task_mode(
- RTEMS_NO_PREEMPT,
- RTEMS_PREEMPT_MASK,
- &previous_mode
- );
- directive_failed( status, "rtems_task_mode" );
-
- status = rtems_task_set_priority( RTEMS_SELF, 254, &previous_priority );
- directive_failed( status, "rtems_task_set_priority" );
-
- status = rtems_region_get_segment(
- Region_id,
- 400,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT,
- &Buffer_address_1
- );
- directive_failed( status, "rtems_region_return_segment" );
-
- status = rtems_region_get_segment(
- Region_id,
- 1998,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT,
- &Buffer_address_2
- );
- directive_failed( status, "rtems_region_get_segment" );
-
- /* execute Task_2 */
-
- status = rtems_region_return_segment( Region_id, Buffer_address_2 );
- directive_failed( status, "rtems_region_return_segment" );
-
- Timer_initialize();
- (void) rtems_region_delete( Region_id );
- end_time = Read_timer();
-
- put_time(
- "rtems_region_delete",
- end_time,
- 1,
- 0,
- CALLING_OVERHEAD_REGION_DELETE
- );
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) Empty_function();
- overhead = Read_timer();
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_io_initialize( _STUB_major, 0, NULL );
- end_time = Read_timer();
-
- put_time(
- "rtems_io_initialize",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_IO_INITIALIZE
- );
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_io_open( _STUB_major, 0, NULL );
- end_time = Read_timer();
-
- put_time(
- "rtems_io_open",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_IO_OPEN
- );
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_io_close( _STUB_major, 0, NULL );
- end_time = Read_timer();
-
- put_time(
- "rtems_io_close",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_IO_CLOSE
- );
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_io_read( _STUB_major, 0, NULL );
- end_time = Read_timer();
-
- put_time(
- "rtems_io_read",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_IO_READ
- );
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_io_write( _STUB_major, 0, NULL );
- end_time = Read_timer();
-
- put_time(
- "rtems_io_write",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_IO_WRITE
- );
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_io_control( _STUB_major, 0, NULL );
- end_time = Read_timer();
-
- put_time(
- "rtems_io_control",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_IO_CONTROL
- );
-
- puts( "*** END OF TEST 20 ***" );
- exit( 0 );
-}
-
-rtems_task Task_2(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- end_time = Read_timer();
-
- put_time(
- "rtems_region_get_segment: not available -- caller blocks",
- end_time,
- 1,
- 0,
- CALLING_OVERHEAD_REGION_GET_SEGMENT
- );
-
- Timer_initialize();
- (void) rtems_region_return_segment( Region_id, Buffer_address_1 );
-
- /* preempt back to Task_1 */
-
- Timer_initialize();
- (void) rtems_region_return_segment( Region_id, Buffer_address_1 );
- end_time = Read_timer();
-
- put_time(
- "rtems_region_return_segment: task readied -- returns to caller",
- end_time,
- 1,
- 0,
- CALLING_OVERHEAD_REGION_RETURN_SEGMENT
- );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
diff --git a/testsuites/tmtests/tm20/tm20.doc b/testsuites/tmtests/tm20/tm20.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/tmtests/tm20/tm20.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/tmtests/tm21/Makefile.am b/testsuites/tmtests/tm21/Makefile.am
deleted file mode 100644
index a9fc96e91f..0000000000
--- a/testsuites/tmtests/tm21/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = tm21
-
-MANAGERS = io dpmem message partition region semaphore rate_monotonic timer
-
-C_FILES = task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/tmtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-OPERATION_COUNT = @OPERATION_COUNT@
-AM_CPPFLAGS += -I$(top_srcdir)/include -DOPERATION_COUNT=$(OPERATION_COUNT)
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/tmtests/tm21/system.h b/testsuites/tmtests/tm21/system.h
deleted file mode 100644
index e0b56c7e31..0000000000
--- a/testsuites/tmtests/tm21/system.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* system.h
- *
- * This include file is used by all tests in the Time Suite.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <coverhd.h>
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-#include <timesys.h>
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 102
-#define CONFIGURE_MAXIMUM_TIMERS 100
-#define CONFIGURE_MAXIMUM_SEMAPHORES 100
-#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 100
-#define CONFIGURE_MAXIMUM_PARTITIONS 100
-#define CONFIGURE_MAXIMUM_REGIONS 100
-#define CONFIGURE_MAXIMUM_PORTS 100
-#define CONFIGURE_MAXIMUM_PERIODS 100
-
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/testsuites/tmtests/tm21/task1.c b/testsuites/tmtests/tm21/task1.c
deleted file mode 100644
index 6b0086eb24..0000000000
--- a/testsuites/tmtests/tm21/task1.c
+++ /dev/null
@@ -1,235 +0,0 @@
-/*
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_unsigned8 Region_area[ 2048 ] CPU_STRUCTURE_ALIGNMENT;
-rtems_unsigned8 Partition_area[ 2048 ] CPU_STRUCTURE_ALIGNMENT;
-
-rtems_task Task_1(
- rtems_task_argument argument
-);
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_id id;
- rtems_status_code status;
-
- Print_Warning();
-
- puts( "\n\n*** TIME TEST 21 ***" );
-
- status = rtems_task_create(
- rtems_build_name( 'T', 'I', 'M', 'E' ),
- 250,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &id
- );
- directive_failed( status, "rtems_task_create of TASK1" );
-
- status = rtems_task_start( id, Task_1, 0 );
- directive_failed( status, "rtems_task_start of TASK1" );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
-
-rtems_task Task_1(
- rtems_task_argument argument
-)
-{
- rtems_unsigned32 index;
- rtems_id id;
- rtems_status_code status;
-
- for( index = 1 ; index <= OPERATION_COUNT ; index++ ) {
- status = rtems_task_create (
- index,
- 254,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &id
- );
- directive_failed( status, "rtems_task_create" );
-
- status = rtems_message_queue_create(
- index,
- 1, /* only going to ident this queue */
- 16,
- RTEMS_DEFAULT_ATTRIBUTES,
- &id
- );
- directive_failed( status, "rtems_message_queue_create" );
-
- status = rtems_semaphore_create(
- index,
- OPERATION_COUNT,
- RTEMS_DEFAULT_ATTRIBUTES,
- RTEMS_NO_PRIORITY,
- &id
- );
- directive_failed( status, "rtems_semaphore_create" );
-
- status = rtems_region_create(
- index,
- Region_area,
- 2048,
- 16,
- RTEMS_DEFAULT_ATTRIBUTES,
- &id
- );
- directive_failed( status, "rtems_region_create" );
-
- status = rtems_partition_create(
- index,
- Partition_area,
- 2048,
- 128,
- RTEMS_DEFAULT_ATTRIBUTES,
- &id
- );
- directive_failed( status, "rtems_partition_create" );
-
- status = rtems_port_create(
- index,
- Partition_area,
- Region_area,
- 0xff,
- &id
- );
- directive_failed( status, "rtems_port_create" );
-
- status = rtems_timer_create( index, &id );
- directive_failed( status, "rtems_timer_create" );
-
- status = rtems_rate_monotonic_create( index, &id );
- directive_failed( status, "rtems_rate_monotonic_create" );
- }
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) Empty_function();
- overhead = Read_timer();
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_task_ident( index, RTEMS_SEARCH_ALL_NODES, &id );
- end_time = Read_timer();
-
- put_time(
- "rtems_task_ident",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_TASK_IDENT
- );
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_message_queue_ident( index, RTEMS_SEARCH_ALL_NODES, &id );
- end_time = Read_timer();
-
- put_time(
- "rtems_message_queue_ident",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_MESSAGE_QUEUE_IDENT
- );
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_semaphore_ident( index, RTEMS_SEARCH_ALL_NODES, &id );
- end_time = Read_timer();
-
- put_time(
- "rtems_semaphore_ident",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_SEMAPHORE_IDENT
- );
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_partition_ident( index, RTEMS_SEARCH_ALL_NODES, &id );
- end_time = Read_timer();
-
- put_time(
- "rtems_partition_ident",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_PARTITION_IDENT
- );
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_region_ident( index, &id );
- end_time = Read_timer();
-
- put_time(
- "rtems_region_ident",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_REGION_IDENT
- );
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_port_ident( index, &id );
- end_time = Read_timer();
-
- put_time(
- "rtems_port_ident",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_PORT_IDENT
- );
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_timer_ident( index, &id );
- end_time = Read_timer();
-
- put_time(
- "rtems_timer_ident",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_TIMER_IDENT
- );
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_rate_monotonic_ident( index, &id );
- end_time = Read_timer();
-
- put_time(
- "rtems_rate_monotonic_ident",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_RATE_MONOTONIC_IDENT
- );
-
- puts( "*** END OF TEST 21 ***" );
- exit( 0 );
-}
diff --git a/testsuites/tmtests/tm21/tm21.doc b/testsuites/tmtests/tm21/tm21.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/tmtests/tm21/tm21.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/tmtests/tm22/Makefile.am b/testsuites/tmtests/tm22/Makefile.am
deleted file mode 100644
index b7118f5aed..0000000000
--- a/testsuites/tmtests/tm22/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = tm22
-
-MANAGERS = io message
-
-C_FILES = task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/tmtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-OPERATION_COUNT = @OPERATION_COUNT@
-AM_CPPFLAGS += -I$(top_srcdir)/include -DOPERATION_COUNT=$(OPERATION_COUNT)
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/tmtests/tm22/system.h b/testsuites/tmtests/tm22/system.h
deleted file mode 100644
index 01af43fe96..0000000000
--- a/testsuites/tmtests/tm22/system.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* system.h
- *
- * This include file is used by all tests in the Time Suite.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <coverhd.h>
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-#include <timesys.h>
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 103
-#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/testsuites/tmtests/tm22/task1.c b/testsuites/tmtests/tm22/task1.c
deleted file mode 100644
index f5d577d2bf..0000000000
--- a/testsuites/tmtests/tm22/task1.c
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_id Queue_id;
-
-long Buffer[4];
-
-rtems_task Low_task(
- rtems_task_argument argument
-);
-
-rtems_task High_task(
- rtems_task_argument argument
-);
-
-rtems_task Preempt_task(
- rtems_task_argument argument
-);
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_id id;
- rtems_status_code status;
-
- Print_Warning();
-
- puts( "\n\n*** TIME TEST 22 ***" );
-
- status = rtems_message_queue_create(
- rtems_build_name( 'M', 'Q', '1', ' '),
- 100,
- 16,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Queue_id
- );
- directive_failed( status, "rtems_message_queue_create" );
-
- status = rtems_task_create(
- rtems_build_name( 'L', 'O', 'W', ' ' ),
- 10,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_NO_PREEMPT,
- RTEMS_DEFAULT_ATTRIBUTES,
- &id
- );
- directive_failed( status, "rtems_task_create" );
-
- status = rtems_task_start( id, Low_task, 0 );
- directive_failed( status, "rtems_task_start LOW" );
-
- status = rtems_task_create(
- 1,
- 11,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &id
- );
- directive_failed( status, "rtems_task_create RTEMS_PREEMPT" );
-
- status = rtems_task_start( id, Preempt_task, 0 );
- directive_failed( status, "rtems_task_start RTEMS_PREEMPT" );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
-
-rtems_task High_task(
- rtems_task_argument argument
-)
-{
- rtems_unsigned32 count;
- rtems_status_code status;
-
- Timer_initialize();
- (void) rtems_message_queue_broadcast(
- Queue_id,
- (long (*)[4]) Buffer,
- 16,
- &count
- );
- end_time = Read_timer();
-
- put_time(
- "rtems_message_queue_broadcast: task readied -- returns to caller",
- end_time,
- 1,
- 0,
- CALLING_OVERHEAD_MESSAGE_QUEUE_BROADCAST
- );
-
- status = rtems_task_suspend(RTEMS_SELF);
- directive_failed( status, "rtems_task_suspend" );
-}
-
-rtems_task Low_task(
- rtems_task_argument argument
-)
-{
- rtems_id id;
- rtems_unsigned32 index;
- rtems_unsigned32 count;
- rtems_unsigned32 size;
- rtems_status_code status;
-
- status = rtems_task_create(
- rtems_build_name( 'H', 'I', 'G', 'H' ),
- 5,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_NO_PREEMPT,
- RTEMS_DEFAULT_ATTRIBUTES,
- &id
- );
- directive_failed( status, "rtems_task_create" );
-
- status = rtems_task_start( id, High_task, 0 );
- directive_failed( status, "rtems_task_start HIGH" );
-
- status = rtems_message_queue_receive(
- Queue_id,
- (long (*)[4]) Buffer,
- &size,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
- directive_failed( status, "message_queu_receive" );
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_message_queue_broadcast(
- Queue_id,
- (long (*)[4]) Buffer,
- 16,
- &count
- );
- end_time = Read_timer();
-
- put_time(
- "rtems_message_queue_broadcast: no waiting tasks",
- end_time,
- OPERATION_COUNT,
- 1,
- CALLING_OVERHEAD_MESSAGE_QUEUE_BROADCAST
- );
-
- (void) rtems_message_queue_receive(
- Queue_id,
- (long (*)[4]) Buffer,
- &size,
- RTEMS_DEFAULT_OPTIONS,
- RTEMS_NO_TIMEOUT
- );
-
- /* should go to Preempt_task here */
-
- end_time = Read_timer();
-
- put_time(
- "rtems_message_queue_broadcast: task readied -- preempts caller",
- end_time,
- 1,
- 0,
- CALLING_OVERHEAD_MESSAGE_QUEUE_BROADCAST
- );
-
- puts( "*** END OF TEST 22 ***" );
- exit( 0 );
-}
-
-rtems_task Preempt_task(
- rtems_task_argument argument
-)
-{
- rtems_unsigned32 count;
-
- Timer_initialize();
- (void) rtems_message_queue_broadcast(
- Queue_id,
- (long (*)[4]) Buffer,
- 16,
- &count
- );
-
- /* should be preempted by low task */
-}
diff --git a/testsuites/tmtests/tm22/tm22.doc b/testsuites/tmtests/tm22/tm22.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/tmtests/tm22/tm22.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/tmtests/tm23/Makefile.am b/testsuites/tmtests/tm23/Makefile.am
deleted file mode 100644
index 87511a98d0..0000000000
--- a/testsuites/tmtests/tm23/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = tm23
-
-MANAGERS = io event timer
-
-C_FILES = task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/tmtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-OPERATION_COUNT = @OPERATION_COUNT@
-AM_CPPFLAGS += -I$(top_srcdir)/include -DOPERATION_COUNT=$(OPERATION_COUNT)
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/tmtests/tm23/system.h b/testsuites/tmtests/tm23/system.h
deleted file mode 100644
index 02d86788f9..0000000000
--- a/testsuites/tmtests/tm23/system.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* system.h
- *
- * This include file is used by all tests in the Time Suite.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <coverhd.h>
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-#include <timesys.h>
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 111
-#define CONFIGURE_MAXIMUM_TIMERS 110
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/testsuites/tmtests/tm23/task1.c b/testsuites/tmtests/tm23/task1.c
deleted file mode 100644
index 0104893026..0000000000
--- a/testsuites/tmtests/tm23/task1.c
+++ /dev/null
@@ -1,301 +0,0 @@
-/*
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_id Timer_id[ OPERATION_COUNT+1 ];
-
-rtems_time_of_day time_of_day;
-
-void null_delay(
- rtems_id ignored_id,
- void *ignored_address
-);
-
-rtems_task Low_task(
- rtems_task_argument argument
-);
-
-rtems_task Middle_tasks(
- rtems_task_argument argument
-);
-
-rtems_task High_task(
- rtems_task_argument argument
-);
-
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
-
- rtems_task_priority priority;
- rtems_unsigned32 index;
- rtems_id id;
- rtems_task_entry task_entry;
- rtems_status_code status;
-
- Print_Warning();
-
- puts( "\n\n*** TIME TEST 23 ***" );
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) Empty_function();
- overhead = Read_timer();
-
- priority = 5;
-
- for( index=1 ; index <= OPERATION_COUNT ; index++ ) {
- status = rtems_task_create(
- rtems_build_name( 'T', 'I', 'M', 'E' ),
- priority,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &id
- );
- directive_failed( status, "rtems_task_create LOOP" );
-
- if ( index == 1 ) task_entry = High_task;
- else if ( index == OPERATION_COUNT ) task_entry = Low_task;
- else task_entry = Middle_tasks;
-
- status = rtems_task_start( id, task_entry, 0 );
- directive_failed( status, "rtems_task_start LOOP" );
-
- priority++;
- }
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
-
-void null_delay(
- rtems_id ignored_id,
- void *ignored_address
-)
-{
-}
-
-rtems_task High_task(
- rtems_task_argument argument
-)
-{
- rtems_unsigned32 index;
- rtems_status_code status;
- int i;
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) Empty_function();
- overhead = Read_timer();
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_timer_create( index, &Timer_id[ index ] );
- end_time = Read_timer();
-
- put_time(
- "rtems_timer_create",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_TIMER_CREATE
- );
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_timer_fire_after( Timer_id[ index ], 500, null_delay, NULL );
- end_time = Read_timer();
-
- put_time(
- "rtems_timer_fire_after: inactive",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_TIMER_FIRE_AFTER
- );
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_timer_fire_after( Timer_id[ index ], 500, null_delay, NULL );
- end_time = Read_timer();
-
- put_time(
- "rtems_timer_fire_after: active",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_TIMER_FIRE_AFTER
- );
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_timer_cancel( Timer_id[ index ] );
- end_time = Read_timer();
-
- put_time(
- "rtems_timer_cancel: active",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_TIMER_CANCEL
- );
-
- for ( Timer_initialize(), i=0 ; i<OPERATION_COUNT ; i++ )
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_timer_cancel( Timer_id[ index ] );
- end_time = Read_timer();
-
- put_time(
- "rtems_timer_cancel: inactive",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_TIMER_CANCEL
- );
-
- for ( Timer_initialize(), i=0 ; i<OPERATION_COUNT ; i++ )
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_timer_reset( Timer_id[ index ] );
- end_time = Read_timer();
-
- put_time(
- "rtems_timer_reset: inactive",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_TIMER_RESET
- );
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_timer_reset( Timer_id[ index ] );
- end_time = Read_timer();
-
- put_time(
- "rtems_timer_reset: active",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_TIMER_RESET
- );
-
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_timer_reset( Timer_id[ index ] );
-
- build_time( &time_of_day, 12, 31, 1988, 9, 0, 0, 0 );
-
- status = rtems_clock_set( &time_of_day );
- directive_failed( status, "rtems_clock_set" );
-
- time_of_day.year = 1989;
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_timer_fire_when(
- Timer_id[ index ], &time_of_day, null_delay, NULL );
- end_time = Read_timer();
-
- put_time(
- "rtems_timer_fire_when: inactive",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_TIMER_FIRE_WHEN
- );
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_timer_fire_when(
- Timer_id[ index ], &time_of_day, null_delay, NULL );
- end_time = Read_timer();
-
- put_time(
- "rtems_timer_fire_when: active",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_TIMER_FIRE_WHEN
- );
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_timer_delete( Timer_id[ index ] );
- end_time = Read_timer();
-
- put_time(
- "rtems_timer_delete: active",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_TIMER_DELETE
- );
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ ) {
- status = rtems_timer_create( index, &Timer_id[ index ] );
- directive_failed( status, "rtems_timer_create" );
-
- status = rtems_timer_fire_after( Timer_id[ index ], 500, null_delay, NULL );
- directive_failed( status, "rtems_timer_fire_after" );
-
- status = rtems_timer_cancel( Timer_id[ index ] );
- directive_failed( status, "rtems_timer_cancel" );
- }
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_timer_delete( Timer_id[ index ] );
- end_time = Read_timer();
-
- put_time(
- "rtems_timer_delete: inactive",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_TIMER_DELETE
- );
-
- Timer_initialize();
- (void) rtems_task_wake_when( &time_of_day );
-}
-
-rtems_task Middle_tasks(
- rtems_task_argument argument
-)
-{
- (void) rtems_task_wake_when( &time_of_day );
-}
-
-rtems_task Low_task(
- rtems_task_argument argument
-)
-{
- end_time = Read_timer();
-
- put_time(
- "rtems_task_wake_when",
- end_time,
- OPERATION_COUNT,
- 0,
- CALLING_OVERHEAD_TASK_WAKE_WHEN
- );
-
- puts( "*** END OF TEST 23 ***" );
- exit( 0 );
-}
diff --git a/testsuites/tmtests/tm23/tm23.doc b/testsuites/tmtests/tm23/tm23.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/tmtests/tm23/tm23.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/tmtests/tm24/Makefile.am b/testsuites/tmtests/tm24/Makefile.am
deleted file mode 100644
index 48e21ed881..0000000000
--- a/testsuites/tmtests/tm24/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = tm24
-
-MANAGERS = io message
-
-C_FILES = task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/tmtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-OPERATION_COUNT = @OPERATION_COUNT@
-AM_CPPFLAGS += -I$(top_srcdir)/include -DOPERATION_COUNT=$(OPERATION_COUNT)
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/tmtests/tm24/system.h b/testsuites/tmtests/tm24/system.h
deleted file mode 100644
index 9ef1a69c6d..0000000000
--- a/testsuites/tmtests/tm24/system.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* system.h
- *
- * This include file is used by all tests in the Time Suite.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <coverhd.h>
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-#include <timesys.h>
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 111
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/testsuites/tmtests/tm24/task1.c b/testsuites/tmtests/tm24/task1.c
deleted file mode 100644
index 1fbabdbbba..0000000000
--- a/testsuites/tmtests/tm24/task1.c
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_unsigned32 Task_count;
-
-rtems_task Tasks(
- rtems_task_argument argument
-);
-
-rtems_task High_task(
- rtems_task_argument argument
-);
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_id id;
- rtems_unsigned32 index;
- rtems_status_code status;
-
- Print_Warning();
-
- puts( "\n\n*** TIME TEST 24 ***" );
-
- status = rtems_task_create(
- rtems_build_name( 'H', 'I', 'G', 'H' ),
- 10,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &id
- );
- directive_failed( status, "rtems_task_create HIGH" );
-
- status = rtems_task_start( id, High_task, 0 );
- directive_failed( status, "rtems_task_create HIGH" );
-
- for ( index = 1 ; index <= OPERATION_COUNT ; index++ ) {
- status = rtems_task_create(
- rtems_build_name( 'R', 'E', 'S', 'T' ),
- 128,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &id
- );
- directive_failed( status, "rtems_task_create LOOP" );
-
- status = rtems_task_start( id, Tasks, 0 );
- directive_failed( status, "rtems_task_start LOOP" );
- }
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
-
-rtems_task High_task(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
- rtems_unsigned32 index;
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) Empty_function();
- overhead = Read_timer();
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
- end_time = Read_timer();
-
- put_time(
- "rtems_task_wake_after: yield -- returns to caller",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_TASK_WAKE_AFTER
- );
-
- Task_count = 0;
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
-
-rtems_task Tasks(
- rtems_task_argument argument
-)
-{
- Task_count++;
-
- if ( Task_count == 1 )
- Timer_initialize();
- else if ( Task_count == OPERATION_COUNT ) {
- end_time = Read_timer();
-
- put_time(
- "rtems_task_wake_after: yields -- preempts caller",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_TASK_WAKE_AFTER
- );
-
- puts( "*** END OF TEST 24 ***" );
- exit( 0 );
- }
- (void) rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
-}
diff --git a/testsuites/tmtests/tm24/tm24.doc b/testsuites/tmtests/tm24/tm24.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/tmtests/tm24/tm24.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/tmtests/tm25/Makefile.am b/testsuites/tmtests/tm25/Makefile.am
deleted file mode 100644
index dd41b13fa7..0000000000
--- a/testsuites/tmtests/tm25/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = tm25
-
-MANAGERS = io semaphore
-
-C_FILES = task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/tmtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-OPERATION_COUNT = @OPERATION_COUNT@
-AM_CPPFLAGS += -I$(top_srcdir)/include -DOPERATION_COUNT=$(OPERATION_COUNT)
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/tmtests/tm25/system.h b/testsuites/tmtests/tm25/system.h
deleted file mode 100644
index ef4e319c73..0000000000
--- a/testsuites/tmtests/tm25/system.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* system.h
- *
- * This include file is used by all tests in the Time Suite.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <coverhd.h>
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-#include <timesys.h>
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 111
-#define CONFIGURE_MAXIMUM_SEMAPHORES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/testsuites/tmtests/tm25/task1.c b/testsuites/tmtests/tm25/task1.c
deleted file mode 100644
index ffedf1501f..0000000000
--- a/testsuites/tmtests/tm25/task1.c
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_id Semaphore_id;
-
-rtems_task High_tasks(
- rtems_task_argument argument
-);
-
-rtems_task Low_task(
- rtems_task_argument argument
-);
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_id task_id;
- rtems_unsigned32 index;
- rtems_status_code status;
-
- Print_Warning();
-
- puts( "\n\n*** TIME TEST 25 ***" );
-
- status = rtems_semaphore_create(
- rtems_build_name( 'S', 'M', '1', ' ') ,
- 0,
- RTEMS_DEFAULT_ATTRIBUTES,
- RTEMS_NO_PRIORITY,
- &Semaphore_id
- );
- directive_failed( status, "rtems_semaphore_create of SM1" );
-
- status = rtems_task_create(
- rtems_build_name( 'L', 'O', 'W', ' ' ),
- 254,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &task_id
- );
- directive_failed( status, "rtems_task_create LOW" );
-
- status = rtems_task_start( task_id, Low_task, 0 );
- directive_failed( status, "rtems_task_start LOW" );
-
- for ( index=1 ; index <= OPERATION_COUNT ; index++ ) {
- status = rtems_task_create(
- rtems_build_name( 'T', 'I', 'M', 'E' ),
- 128,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &task_id
- );
- directive_failed( status, "rtems_task_create LOOP" );
-
- status = rtems_task_start( task_id, High_tasks, 0 );
- directive_failed( status, "rtems_task_start LOOP" );
- }
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
-
-rtems_task High_tasks(
- rtems_task_argument argument
-)
-{
- (void) rtems_semaphore_obtain(
- Semaphore_id,
- RTEMS_DEFAULT_OPTIONS,
- 0xffffffff
- );
-}
-
-rtems_task Low_task(
- rtems_task_argument argument
-)
-{
- Timer_initialize();
- (void) rtems_clock_tick();
- end_time = Read_timer();
-
- put_time(
- "rtems_clock_tick",
- end_time,
- 1,
- 0,
- CALLING_OVERHEAD_CLOCK_TICK
- );
-
- puts( "*** END OF TEST 25 ***" );
- exit( 0 );
-}
diff --git a/testsuites/tmtests/tm25/tm25.doc b/testsuites/tmtests/tm25/tm25.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/tmtests/tm25/tm25.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/tmtests/tm26/Makefile.am b/testsuites/tmtests/tm26/Makefile.am
deleted file mode 100644
index c488de3620..0000000000
--- a/testsuites/tmtests/tm26/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = tm26
-
-MANAGERS = io semaphore
-
-C_FILES = task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h fptest.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/tmtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-OPERATION_COUNT = @OPERATION_COUNT@
-AM_CPPFLAGS += -I$(top_srcdir)/include -DOPERATION_COUNT=$(OPERATION_COUNT)
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/tmtests/tm26/fptest.h b/testsuites/tmtests/tm26/fptest.h
deleted file mode 100644
index 9ebe585168..0000000000
--- a/testsuites/tmtests/tm26/fptest.h
+++ /dev/null
@@ -1,164 +0,0 @@
-/* fptest.h
- *
- * This include file contains the CPU dependent implementation
- * of the following routines needed to test RTEMS floating
- * point support:
- * FP_load( &context )
- * FP_check( &context )
- *
- * FP_load - loads the specified floating point context
- * FP_check - checks the specified floating point context
- *
- * NOTE: These routines are VERY CPU dependent and are thus
- * located in in the CPU dependent include file
- * fptest.h. These routines form the core of the
- * floating point context switch test.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#ifndef __FPTEST_h
-#define __FPTEST_h
-
-#include <stdio.h>
-
-#ifndef CPU_HARDWARE_FP
-#error "This CPU does not have CPU_HARDWARE_FP defined"
-#endif
-
-#if ( CPU_HARDWARE_FP == FALSE )
-
-#define FP_DECLARE
-#define FP_LOAD( _factor )
-#define FP_CHECK( _factor ) 0
-
-#else
-
-#define FP_DECLARE \
- double fp01 = 1.0; \
- double fp02 = 2.0; \
- double fp03 = 3.0; \
- double fp04 = 4.0; \
- double fp05 = 5.0; \
- double fp06 = 6.0; \
- double fp07 = 7.0; \
- double fp08 = 8.0; \
- double fp09 = 9.0; \
- double fp10 = 10.0; \
- double fp11 = 11.0; \
- double fp12 = 12.0; \
- double fp13 = 13.0; \
- double fp14 = 14.0; \
- double fp15 = 15.0; \
- double fp16 = 16.0; \
- double fp17 = 17.0; \
- double fp18 = 18.0; \
- double fp19 = 19.0; \
- double fp20 = 20.0; \
- double fp21 = 21.0; \
- double fp22 = 22.0; \
- double fp23 = 23.0; \
- double fp24 = 24.0; \
- double fp25 = 25.0; \
- double fp26 = 26.0; \
- double fp27 = 27.0; \
- double fp28 = 28.0; \
- double fp29 = 29.0; \
- double fp30 = 30.0; \
- double fp31 = 31.0; \
- double fp32 = 32.0
-
-#define FP_LOAD( _factor ) \
- do { \
- fp01 += _factor; \
- fp02 += _factor; \
- fp03 += _factor; \
- fp04 += _factor; \
- fp05 += _factor; \
- fp06 += _factor; \
- fp07 += _factor; \
- fp08 += _factor; \
- fp09 += _factor; \
- fp10 += _factor; \
- fp11 += _factor; \
- fp12 += _factor; \
- fp13 += _factor; \
- fp14 += _factor; \
- fp15 += _factor; \
- fp16 += _factor; \
- fp17 += _factor; \
- fp18 += _factor; \
- fp19 += _factor; \
- fp20 += _factor; \
- fp21 += _factor; \
- fp22 += _factor; \
- fp23 += _factor; \
- fp24 += _factor; \
- fp25 += _factor; \
- fp26 += _factor; \
- fp27 += _factor; \
- fp28 += _factor; \
- fp29 += _factor; \
- fp30 += _factor; \
- fp31 += _factor; \
- fp32 += _factor; \
- } while (0)
-
-#define EPSILON (0.0005)
-#define FPABS(d) (((d) < 0.0) ? -(d) : (d))
-#define FPNEQ(a,b) (FPABS((a)-(b)) > EPSILON)
-
-#define FP_CHECK_ONE( _v, _base, _factor ) \
- if ( FPNEQ( (_v), ((_base) + (_factor)) ) ) { \
- printf("%d: " #_v " wrong -- (%g not %g)\n", \
- task_index, (_v), (_base + _factor)); \
- }
-
-
-#define FP_CHECK( _factor ) \
- do { \
- FP_CHECK_ONE( fp01, 1.0, (_factor) ); \
- FP_CHECK_ONE( fp02, 2.0, (_factor) ); \
- FP_CHECK_ONE( fp03, 3.0, (_factor) ); \
- FP_CHECK_ONE( fp04, 4.0, (_factor) ); \
- FP_CHECK_ONE( fp05, 5.0, (_factor) ); \
- FP_CHECK_ONE( fp06, 6.0, (_factor) ); \
- FP_CHECK_ONE( fp07, 7.0, (_factor) ); \
- FP_CHECK_ONE( fp08, 8.0, (_factor) ); \
- FP_CHECK_ONE( fp09, 9.0, (_factor) ); \
- FP_CHECK_ONE( fp10, 10.0, (_factor) ); \
- FP_CHECK_ONE( fp11, 11.0, (_factor) ); \
- FP_CHECK_ONE( fp12, 12.0, (_factor) ); \
- FP_CHECK_ONE( fp13, 13.0, (_factor) ); \
- FP_CHECK_ONE( fp14, 14.0, (_factor) ); \
- FP_CHECK_ONE( fp15, 15.0, (_factor) ); \
- FP_CHECK_ONE( fp16, 16.0, (_factor) ); \
- FP_CHECK_ONE( fp17, 17.0, (_factor) ); \
- FP_CHECK_ONE( fp18, 18.0, (_factor) ); \
- FP_CHECK_ONE( fp19, 19.0, (_factor) ); \
- FP_CHECK_ONE( fp20, 20.0, (_factor) ); \
- FP_CHECK_ONE( fp21, 21.0, (_factor) ); \
- FP_CHECK_ONE( fp22, 22.0, (_factor) ); \
- FP_CHECK_ONE( fp23, 23.0, (_factor) ); \
- FP_CHECK_ONE( fp24, 24.0, (_factor) ); \
- FP_CHECK_ONE( fp25, 25.0, (_factor) ); \
- FP_CHECK_ONE( fp26, 26.0, (_factor) ); \
- FP_CHECK_ONE( fp27, 27.0, (_factor) ); \
- FP_CHECK_ONE( fp28, 28.0, (_factor) ); \
- FP_CHECK_ONE( fp29, 29.0, (_factor) ); \
- FP_CHECK_ONE( fp30, 30.0, (_factor) ); \
- FP_CHECK_ONE( fp31, 31.0, (_factor) ); \
- FP_CHECK_ONE( fp32, 32.0, (_factor) ); \
- } while (0)
-
-#endif
-
-#endif
diff --git a/testsuites/tmtests/tm26/system.h b/testsuites/tmtests/tm26/system.h
deleted file mode 100644
index ef4e319c73..0000000000
--- a/testsuites/tmtests/tm26/system.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* system.h
- *
- * This include file is used by all tests in the Time Suite.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <coverhd.h>
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-#include <timesys.h>
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 111
-#define CONFIGURE_MAXIMUM_SEMAPHORES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/testsuites/tmtests/tm26/task1.c b/testsuites/tmtests/tm26/task1.c
deleted file mode 100644
index 248ffae296..0000000000
--- a/testsuites/tmtests/tm26/task1.c
+++ /dev/null
@@ -1,579 +0,0 @@
-/*
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
-#include <rtems.h>
-#include "system.h"
-#include "fptest.h"
-#include <coverhd.h>
-#include <tmacros.h>
-#include <timesys.h>
-
-
-/* TEST DATA */
-rtems_id Semaphore_id;
-
-Objects_Locations location; /* uses internal RTEMS type */
-
-Thread_Control *Middle_tcb; /* uses internal RTEMS type */
-
-Thread_Control *Low_tcb; /* uses internal RTEMS type */
-
-/*
- * Variables to hold execution times until they are printed
- * at the end of the test.
- */
-
-rtems_unsigned32 isr_disable_time;
-rtems_unsigned32 isr_flash_time;
-rtems_unsigned32 isr_enable_time;
-rtems_unsigned32 thread_disable_dispatch_time;
-rtems_unsigned32 thread_enable_dispatch_time;
-rtems_unsigned32 thread_set_state_time;
-rtems_unsigned32 thread_dispatch_no_fp_time;
-rtems_unsigned32 context_switch_no_fp_time;
-rtems_unsigned32 context_switch_self_time;
-rtems_unsigned32 context_switch_another_task_time;
-rtems_unsigned32 context_switch_restore_1st_fp_time;
-rtems_unsigned32 context_switch_save_idle_restore_initted_time;
-rtems_unsigned32 context_switch_save_restore_idle_time;
-rtems_unsigned32 context_switch_save_restore_initted_time;
-rtems_unsigned32 thread_resume_time;
-rtems_unsigned32 thread_unblock_time;
-rtems_unsigned32 thread_ready_time;
-rtems_unsigned32 thread_get_time;
-rtems_unsigned32 semaphore_get_time;
-rtems_unsigned32 thread_get_invalid_time;
-
-rtems_task High_task(
- rtems_task_argument argument
-);
-
-rtems_task Middle_task(
- rtems_task_argument argument
-);
-
-rtems_task Low_task(
- rtems_task_argument argument
-);
-
-rtems_task Floating_point_task_1(
- rtems_task_argument argument
-);
-
-rtems_task Floating_point_task_2(
- rtems_task_argument argument
-);
-
-void complete_test( void );
-
-rtems_task null_task(
- rtems_task_argument argument
-)
-{
-}
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_unsigned32 index;
- rtems_id task_id;
- rtems_status_code status;
-
- Print_Warning();
-
- puts( "\n\n*** TIME TEST 26 ***" );
-
- status = rtems_task_create(
- rtems_build_name( 'F', 'P', '1', ' ' ),
- 201,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_FLOATING_POINT,
- &task_id
- );
- directive_failed( status, "rtems_task_create of FP1" );
-
- status = rtems_task_start( task_id, Floating_point_task_1, 0 );
- directive_failed( status, "rtems_task_start of FP1" );
-
- status = rtems_task_create(
- rtems_build_name( 'F', 'P', '2', ' ' ),
- 202,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_FLOATING_POINT,
- &task_id
- );
- directive_failed( status, "rtems_task_create of FP2" );
-
- status = rtems_task_start( task_id, Floating_point_task_2, 0 );
- directive_failed( status, "rtems_task_start of FP2" );
-
- status = rtems_task_create(
- rtems_build_name( 'L', 'O', 'W', ' ' ),
- 200,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &task_id
- );
- directive_failed( status, "rtems_task_create of LOW" );
-
- status = rtems_task_start( task_id, Low_task, 0 );
- directive_failed( status, "rtems_task_start of LOW" );
-
- status = rtems_task_create(
- rtems_build_name( 'M', 'I', 'D', ' ' ),
- 128,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &task_id
- );
- directive_failed( status, "rtems_task_create of MIDDLE" );
-
- status = rtems_task_start( task_id, Middle_task, 0 );
- directive_failed( status, "rtems_task_start of MIDDLE" );
-
- status = rtems_task_create(
- rtems_build_name( 'H', 'I', 'G', 'H' ),
- 5,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &task_id
- );
- directive_failed( status, "rtems_task_create of HIGH" );
-
- status = rtems_task_start( task_id, High_task, 0 );
- directive_failed( status, "rtems_task_start of HIGH" );
-
- status = rtems_semaphore_create(
- rtems_build_name( 'S', 'E', 'M', '1' ),
- OPERATION_COUNT,
- RTEMS_DEFAULT_ATTRIBUTES,
- RTEMS_NO_PRIORITY,
- &Semaphore_id
- );
- directive_failed( status, "rtems_semaphore_create" );
-
- for ( index = 1 ; index <= OPERATION_COUNT ; index++ ) {
- status = rtems_task_create(
- rtems_build_name( 'N', 'U', 'L', 'L' ),
- 254,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &task_id
- );
- directive_failed( status, "rtems_task_create LOOP" );
-
- status = rtems_task_start( task_id, null_task, 0 );
- directive_failed( status, "rtems_task_start LOOP" );
- }
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
-
-rtems_task High_task(
- rtems_task_argument argument
-)
-{
- rtems_interrupt_level level;
-
- Timer_initialize();
- rtems_interrupt_disable( level );
- isr_disable_time = Read_timer();
-
- Timer_initialize();
- rtems_interrupt_flash( level );
- isr_flash_time = Read_timer();
-
- Timer_initialize();
- rtems_interrupt_enable( level );
- isr_enable_time = Read_timer();
-
- Timer_initialize();
- _Thread_Disable_dispatch();
- thread_disable_dispatch_time = Read_timer();
-
- Timer_initialize();
- _Thread_Enable_dispatch();
- thread_enable_dispatch_time = Read_timer();
-
- Timer_initialize();
- _Thread_Set_state( _Thread_Executing, STATES_SUSPENDED );
- thread_set_state_time = Read_timer();
-
- _Context_Switch_necessary = TRUE;
-
- Timer_initialize();
- _Thread_Dispatch(); /* dispatches Middle_task */
-}
-
-rtems_task Middle_task(
- rtems_task_argument argument
-)
-{
- thread_dispatch_no_fp_time = Read_timer();
-
- _Thread_Set_state( _Thread_Executing, STATES_SUSPENDED );
-
- Middle_tcb = _Thread_Executing;
-
- _Thread_Executing =
- (Thread_Control *) _Thread_Ready_chain[200].first;
-
- /* do not force context switch */
-
- _Context_Switch_necessary = FALSE;
-
- _Thread_Disable_dispatch();
-
- Timer_initialize();
- _Context_Switch( &Middle_tcb->Registers, &_Thread_Executing->Registers );
-
- Timer_initialize();
- _Context_Switch(&Middle_tcb->Registers, &Low_tcb->Registers);
-}
-
-rtems_task Low_task(
- rtems_task_argument argument
-)
-{
- Thread_Control *executing;
-
- context_switch_no_fp_time = Read_timer();
-
- executing = _Thread_Executing;
-
- Low_tcb = executing;
-
- Timer_initialize();
- _Context_Switch( &executing->Registers, &executing->Registers );
-
- context_switch_self_time = Read_timer();
-
- _Context_Switch(&executing->Registers, &Middle_tcb->Registers);
-
- context_switch_another_task_time = Read_timer();
-
- _Thread_Executing =
- (Thread_Control *) _Thread_Ready_chain[201].first;
-
- /* do not force context switch */
-
- _Context_Switch_necessary = FALSE;
-
- _Thread_Disable_dispatch();
-
- Timer_initialize();
- _Context_Restore_fp( &_Thread_Executing->fp_context );
- _Context_Switch( &executing->Registers, &_Thread_Executing->Registers );
-}
-
-rtems_task Floating_point_task_1(
- rtems_task_argument argument
-)
-{
- Thread_Control *executing;
- FP_DECLARE;
-
- context_switch_restore_1st_fp_time = Read_timer();
-
- executing = _Thread_Executing;
-
- _Thread_Executing =
- (Thread_Control *) _Thread_Ready_chain[202].first;
-
- /* do not force context switch */
-
- _Context_Switch_necessary = FALSE;
-
- _Thread_Disable_dispatch();
-
- Timer_initialize();
- _Context_Save_fp( &executing->fp_context );
- _Context_Restore_fp( &_Thread_Executing->fp_context );
- _Context_Switch( &executing->Registers, &_Thread_Executing->Registers );
- /* switch to Floating_point_task_2 */
-
- context_switch_save_idle_restore_initted_time = Read_timer();
-
- FP_LOAD( 1.0 );
-
- executing = _Thread_Executing;
-
- _Thread_Executing =
- (Thread_Control *) _Thread_Ready_chain[202].first;
-
- /* do not force context switch */
-
- _Context_Switch_necessary = FALSE;
-
- _Thread_Disable_dispatch();
-
- Timer_initialize();
- _Context_Save_fp( &executing->fp_context );
- _Context_Restore_fp( &_Thread_Executing->fp_context );
- _Context_Switch( &executing->Registers, &_Thread_Executing->Registers );
- /* switch to Floating_point_task_2 */
-}
-
-rtems_task Floating_point_task_2(
- rtems_task_argument argument
-)
-{
- Thread_Control *executing;
- FP_DECLARE;
-
- context_switch_save_restore_idle_time = Read_timer();
-
- executing = _Thread_Executing;
-
- _Thread_Executing =
- (Thread_Control *) _Thread_Ready_chain[201].first;
-
- FP_LOAD( 1.0 );
-
- /* do not force context switch */
-
- _Context_Switch_necessary = FALSE;
-
- _Thread_Disable_dispatch();
-
- Timer_initialize();
- _Context_Save_fp( &executing->fp_context );
- _Context_Restore_fp( &_Thread_Executing->fp_context );
- _Context_Switch( &executing->Registers, &_Thread_Executing->Registers );
- /* switch to Floating_point_task_1 */
-
- context_switch_save_restore_initted_time = Read_timer();
-
- complete_test();
-}
-
-void complete_test( void )
-{
- rtems_unsigned32 index;
- rtems_id task_id;
-
- Timer_initialize();
- _Thread_Resume( Middle_tcb, TRUE );
- thread_resume_time = Read_timer();
-
- _Thread_Set_state( Middle_tcb, STATES_WAITING_FOR_MESSAGE );
-
- Timer_initialize();
- _Thread_Unblock( Middle_tcb );
- thread_unblock_time = Read_timer();
-
- _Thread_Set_state( Middle_tcb, STATES_WAITING_FOR_MESSAGE );
-
- Timer_initialize();
- _Thread_Ready( Middle_tcb );
- thread_ready_time = Read_timer();
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) Empty_function();
- overhead = Read_timer();
-
- task_id = Middle_tcb->Object.id;
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) _Thread_Get( task_id, &location );
- thread_get_time = Read_timer();
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) _Semaphore_Get( Semaphore_id, &location );
- semaphore_get_time = Read_timer();
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) _Thread_Get( 0x3, &location );
- thread_get_invalid_time = Read_timer();
-
- /*
- * Now dump all the times
- */
-
- put_time(
- "_ISR_Disable",
- isr_disable_time,
- 1,
- 0,
- 0
- );
-
- put_time(
- "_ISR_Flash",
- isr_flash_time,
- 1,
- 0,
- 0
- );
-
- put_time(
- "_ISR_Enable",
- isr_enable_time,
- 1,
- 0,
- 0
- );
-
- put_time(
- "_Thread_Disable_dispatch",
- thread_disable_dispatch_time,
- 1,
- 0,
- 0
- );
-
- put_time(
- "_Thread_Enable_dispatch",
- thread_enable_dispatch_time,
- 1,
- 0,
- 0
- );
-
- put_time(
- "_Thread_Set_state",
- thread_set_state_time,
- 1,
- 0,
- 0
- );
-
- put_time(
- "_Thread_Disptach (NO FP)",
- thread_dispatch_no_fp_time,
- 1,
- 0,
- 0
- );
-
- put_time(
- "context switch: no floating point contexts",
- context_switch_no_fp_time,
- 1,
- 0,
- 0
- );
-
- put_time(
- "context switch: self",
- context_switch_self_time,
- 1,
- 0,
- 0
- );
-
- put_time(
- "context switch: to another task",
- context_switch_another_task_time,
- 1,
- 0,
- 0
- );
-
- put_time(
- "fp context switch: restore 1st FP task",
- context_switch_restore_1st_fp_time,
- 1,
- 0,
- 0
- );
-
- put_time(
- "fp context switch: save idle, restore initialized",
- context_switch_save_idle_restore_initted_time,
- 1,
- 0,
- 0
- );
-
- put_time(
- "fp context switch: save idle, restore idle",
- context_switch_save_restore_idle_time,
- 1,
- 0,
- 0
- );
-
- put_time(
- "fp context switch: save initialized, restore initialized",
- context_switch_save_restore_initted_time,
- 1,
- 0,
- 0
- );
-
- put_time(
- "_Thread_Resume",
- thread_resume_time,
- 1,
- 0,
- 0
- );
-
- put_time(
- "_Thread_Unblock",
- thread_unblock_time,
- 1,
- 0,
- 0
- );
-
- put_time(
- "_Thread_Ready",
- thread_ready_time,
- 1,
- 0,
- 0
- );
-
- put_time(
- "_Thread_Get",
- thread_get_time,
- OPERATION_COUNT,
- 0,
- 0
- );
-
- put_time(
- "_Semaphore_Get",
- semaphore_get_time,
- OPERATION_COUNT,
- 0,
- 0
- );
-
- put_time(
- "_Thread_Get: invalid id",
- thread_get_invalid_time,
- OPERATION_COUNT,
- 0,
- 0
- );
-
- puts( "*** END OF TEST 26 ***" );
- exit( 0 );
-}
-
diff --git a/testsuites/tmtests/tm26/tm26.doc b/testsuites/tmtests/tm26/tm26.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/tmtests/tm26/tm26.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/tmtests/tm27/Makefile.am b/testsuites/tmtests/tm27/Makefile.am
deleted file mode 100644
index 02caaaaeae..0000000000
--- a/testsuites/tmtests/tm27/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = tm27
-
-MANAGERS = io
-
-C_FILES = task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/tmtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-OPERATION_COUNT = @OPERATION_COUNT@
-AM_CPPFLAGS += -I$(top_srcdir)/include -DOPERATION_COUNT=$(OPERATION_COUNT)
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/tmtests/tm27/system.h b/testsuites/tmtests/tm27/system.h
deleted file mode 100644
index 9ef1a69c6d..0000000000
--- a/testsuites/tmtests/tm27/system.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* system.h
- *
- * This include file is used by all tests in the Time Suite.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <coverhd.h>
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-#include <timesys.h>
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 111
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/testsuites/tmtests/tm27/task1.c b/testsuites/tmtests/tm27/task1.c
deleted file mode 100644
index 0c50f3d0a7..0000000000
--- a/testsuites/tmtests/tm27/task1.c
+++ /dev/null
@@ -1,272 +0,0 @@
-/*
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-/*
- * WARNING!!!!!!!!!
- *
- * THIS TEST USES INTERNAL RTEMS VARIABLES!!!
- */
-
-#define TEST_INIT
-#define RTEMS_TM27
-#include "system.h"
-
-#include <bsp.h>
-
-rtems_task Task_1(
- rtems_task_argument argument
-);
-
-rtems_task Task_2(
- rtems_task_argument argument
-);
-
-volatile rtems_unsigned32 Interrupt_occurred;
-volatile rtems_unsigned32 Interrupt_enter_time, Interrupt_enter_nested_time;
-volatile rtems_unsigned32 Interrupt_return_time, Interrupt_return_nested_time;
-rtems_unsigned32 Interrupt_nest;
-
-rtems_isr Isr_handler(
- rtems_vector_number vector
-);
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- Print_Warning();
-
- puts( "\n\n*** TIME TEST 27 ***" );
-
- status = rtems_task_create(
- rtems_build_name( 'T', 'A', '1', ' ' ),
- 254,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_create Task_1" );
-
- status = rtems_task_start( Task_id[ 1 ], Task_1, 0 );
- directive_failed( status, "rtems_task_start Task_1" );
-
- status = rtems_task_create(
- rtems_build_name( 'T', 'A', '2', ' ' ),
- 254,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 2 ]
- );
- directive_failed( status, "rtems_task_create of Task_2" );
-
- status = rtems_task_start( Task_id[ 2 ], Task_2, 0 );
- directive_failed( status, "rtems_task_start of Task_2" );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
-
-rtems_task Task_1(
- rtems_task_argument argument
-)
-{
- Install_tm27_vector( Isr_handler );
-
- /*
- * No preempt .. no nesting
- */
-
- Interrupt_nest = 0;
-
- _Thread_Dispatch_disable_level = 0;
-
- Interrupt_occurred = 0;
- Timer_initialize();
- Cause_tm27_intr();
- /* goes to Isr_handler */
-
-#if (MUST_WAIT_FOR_INTERRUPT == 1)
- while ( Interrupt_occurred == 0 );
-#endif
- Interrupt_return_time = Read_timer();
-
- put_time(
- "interrupt entry overhead: returns to interrupted task",
- Interrupt_enter_time,
- 1,
- 0,
- 0
- );
-
- put_time(
- "interrupt exit overhead: returns to interrupted task",
- Interrupt_return_time,
- 1,
- 0,
- 0
- );
-
- /*
- * No preempt .. nested
- */
-
- _Thread_Dispatch_disable_level = 1;
-
- Interrupt_nest = 1;
-
- Interrupt_occurred = 0;
- Timer_initialize();
- Cause_tm27_intr();
- /* goes to Isr_handler */
-
-#if (MUST_WAIT_FOR_INTERRUPT == 1)
- while ( Interrupt_occurred == 0 );
-#endif
- Interrupt_return_time = Read_timer();
-
- put_time(
- "interrupt entry overhead: returns to nested interrupt",
- Interrupt_enter_nested_time,
- 1,
- 0,
- 0
- );
-
- put_time(
- "interrupt exit overhead: returns to nested interrupt",
- Interrupt_return_nested_time,
- 1,
- 0,
- 0
- );
-
- /*
- * Does a preempt .. not nested
- */
-
- _Thread_Dispatch_disable_level = 0;
-
- _Thread_Heir = (rtems_tcb *) _Thread_Ready_chain[254].last;
-
- _Context_Switch_necessary = 1;
-
- Interrupt_occurred = 0;
- Timer_initialize();
- Cause_tm27_intr();
-
- /*
- * goes to Isr_handler and then returns
- */
-
- puts( "*** END OF TEST 27 ***" );
- exit( 0 );
-}
-
-/*
- * NOTE: When this task is executing, some of the assumptions made
- * regarding the placement of the currently executing task's TCB
- * on the ready chains have been violated. At least the assumption
- * that this task is at the head of the chain for its priority
- * has been violated.
- */
-
-rtems_task Task_2(
- rtems_task_argument argument
-)
-{
-#if (MUST_WAIT_FOR_INTERRUPT == 1)
- while ( Interrupt_occurred == 0 );
-#endif
- end_time = Read_timer();
-
- put_time(
- "interrupt entry overhead: returns to preempting task",
- Interrupt_enter_time,
- 1,
- 0,
- 0
- );
-
- put_time(
- "interrupt exit overhead: returns to preempting task",
- end_time,
- 1,
- 0,
- 0
- );
-
- fflush( stdout );
-
- /*
- * Switch back to the other task to exit the test.
- */
-
- _Thread_Dispatch_disable_level = 0;
-
- _Thread_Heir = (rtems_tcb *) _Thread_Ready_chain[254].first;
-
- _Context_Switch_necessary = 1;
-
- _Thread_Dispatch();
-
-}
-
-/* The Isr_handler() and Isr_handler_inner() routines are structured
- * so that there will be as little entry overhead as possible included
- * in the interrupt entry time.
- */
-
-void Isr_handler_inner( void );
-
-rtems_isr Isr_handler(
- rtems_vector_number vector
-)
-{
- end_time = Read_timer();
-
- Interrupt_occurred = 1;
- Isr_handler_inner();
-}
-
-void Isr_handler_inner( void )
-{
-
- /*enable_tracing();*/
- Clear_tm27_intr();
- switch ( Interrupt_nest ) {
- case 0:
- Interrupt_enter_time = end_time;
- break;
- case 1:
- Interrupt_enter_time = end_time;
- Interrupt_nest = 2;
- Interrupt_occurred = 0;
- Lower_tm27_intr();
- Timer_initialize();
- Cause_tm27_intr();
- /* goes to a nested copy of Isr_handler */
-#if (MUST_WAIT_FOR_INTERRUPT == 1)
- while ( Interrupt_occurred == 0 );
-#endif
- Interrupt_return_nested_time = Read_timer();
- break;
- case 2:
- Interrupt_enter_nested_time = end_time;
- break;
- }
-
- Timer_initialize();
-}
diff --git a/testsuites/tmtests/tm27/tm27.doc b/testsuites/tmtests/tm27/tm27.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/tmtests/tm27/tm27.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/tmtests/tm28/Makefile.am b/testsuites/tmtests/tm28/Makefile.am
deleted file mode 100644
index fc23e73d17..0000000000
--- a/testsuites/tmtests/tm28/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = tm28
-
-MANAGERS = io dpmem
-
-C_FILES = task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/tmtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-OPERATION_COUNT = @OPERATION_COUNT@
-AM_CPPFLAGS += -I$(top_srcdir)/include -DOPERATION_COUNT=$(OPERATION_COUNT)
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/tmtests/tm28/system.h b/testsuites/tmtests/tm28/system.h
deleted file mode 100644
index 85534f11ed..0000000000
--- a/testsuites/tmtests/tm28/system.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* system.h
- *
- * This include file is used by all tests in the Time Suite.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <coverhd.h>
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-#include <timesys.h>
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 2
-#define CONFIGURE_MAXIMUM_PORTS 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/testsuites/tmtests/tm28/task1.c b/testsuites/tmtests/tm28/task1.c
deleted file mode 100644
index ee1f173fb3..0000000000
--- a/testsuites/tmtests/tm28/task1.c
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_id Port_id;
-
-rtems_unsigned8 Internal_area[ 256 ] CPU_STRUCTURE_ALIGNMENT;
-rtems_unsigned8 External_area[ 256 ] CPU_STRUCTURE_ALIGNMENT;
-
-rtems_task Test_task(
- rtems_task_argument argument
-);
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- Print_Warning();
-
- puts( "\n\n*** TIME TEST 28 ***" );
-
- status = rtems_task_create(
- rtems_build_name( 'T', 'I', 'M', 'E' ),
- 128,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_create" );
-
- status = rtems_task_start( Task_id[ 1 ], Test_task, 0 );
- directive_failed( status, "rtems_task_start" );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
-
-rtems_task Test_task (
- rtems_task_argument argument
-)
-{
- rtems_name name;
- rtems_unsigned32 index;
- void *converted;
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) Empty_function();
- overhead = Read_timer();
-
- name = rtems_build_name( 'P', 'O', 'R', 'T' ),
-
- Timer_initialize();
- rtems_port_create(
- name,
- Internal_area,
- External_area,
- 0xff,
- &Port_id
- );
- end_time = Read_timer();
-
- put_time(
- "rtems_port_create",
- end_time,
- 1,
- 0,
- CALLING_OVERHEAD_PORT_CREATE
- );
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_port_external_to_internal(
- Port_id,
- &External_area[ 0xf ],
- &converted
- );
- end_time = Read_timer();
-
- put_time(
- "rtems_port_external_to_internal",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_PORT_EXTERNAL_TO_INTERNAL
- );
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_port_internal_to_external(
- Port_id,
- &Internal_area[ 0xf ],
- &converted
- );
- end_time = Read_timer();
-
- put_time(
- "rtems_port_internal_to_external",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_PORT_INTERNAL_TO_EXTERNAL
- );
-
- Timer_initialize();
- rtems_port_delete( Port_id );
- end_time = Read_timer();
-
- put_time(
- "rtems_port_delete",
- end_time,
- 1,
- 0,
- CALLING_OVERHEAD_PORT_DELETE
- );
-
- puts( "*** END OF TEST 28 ***" );
- exit( 0 );
-}
diff --git a/testsuites/tmtests/tm28/tm28.doc b/testsuites/tmtests/tm28/tm28.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/tmtests/tm28/tm28.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/tmtests/tm29/Makefile.am b/testsuites/tmtests/tm29/Makefile.am
deleted file mode 100644
index 83a1f29433..0000000000
--- a/testsuites/tmtests/tm29/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = tm29
-
-MANAGERS = io rate_monotonic
-
-C_FILES = task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/tmtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-OPERATION_COUNT = @OPERATION_COUNT@
-AM_CPPFLAGS += -I$(top_srcdir)/include -DOPERATION_COUNT=$(OPERATION_COUNT)
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/tmtests/tm29/system.h b/testsuites/tmtests/tm29/system.h
deleted file mode 100644
index 90c664f348..0000000000
--- a/testsuites/tmtests/tm29/system.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* system.h
- *
- * This include file is used by all tests in the Time Suite.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <coverhd.h>
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-#include <timesys.h>
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 111
-#define CONFIGURE_MAXIMUM_PERIODS 111
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-#define CONFIGURE_INIT_TASK_STACK_SIZE (RTEMS_MINIMUM_STACK_SIZE * 2)
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/testsuites/tmtests/tm29/task1.c b/testsuites/tmtests/tm29/task1.c
deleted file mode 100644
index f7d94898a4..0000000000
--- a/testsuites/tmtests/tm29/task1.c
+++ /dev/null
@@ -1,206 +0,0 @@
-/*
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_name Period_name;
-
-rtems_task Tasks(
- rtems_task_argument argument
-);
-
-rtems_task Low_task(
- rtems_task_argument argument
-);
-
-rtems_unsigned32 Task_count;
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_id id;
- rtems_unsigned32 index;
- rtems_status_code status;
-
- Print_Warning();
-
- puts( "\n\n*** TIME TEST 29 ***" );
-
- Period_name = rtems_build_name( 'P', 'R', 'D', ' ' );
-
- Timer_initialize();
- (void) rtems_rate_monotonic_create( Period_name, &id );
- end_time = Read_timer();
-
- put_time(
- "rtems_rate_monotonic_create",
- end_time,
- 1,
- 0,
- CALLING_OVERHEAD_RATE_MONOTONIC_CREATE
- );
-
- Timer_initialize();
- (void) rtems_rate_monotonic_period( id, 10 );
- end_time = Read_timer();
-
- put_time(
- "rtems_rate_monotonic_period: initiate period -- returns to caller",
- end_time,
- 1,
- 0,
- CALLING_OVERHEAD_RATE_MONOTONIC_PERIOD
- );
-
- Timer_initialize();
- (void) rtems_rate_monotonic_period( id, RTEMS_PERIOD_STATUS );
- end_time = Read_timer();
-
- put_time(
- "rtems_rate_monotonic_period: obtain status",
- end_time,
- 1,
- 0,
- CALLING_OVERHEAD_RATE_MONOTONIC_PERIOD
- );
-
- Timer_initialize();
- (void) rtems_rate_monotonic_cancel( id );
- end_time = Read_timer();
-
- put_time(
- "rtems_rate_monotonic_cancel",
- end_time,
- 1,
- 0,
- CALLING_OVERHEAD_RATE_MONOTONIC_CANCEL
- );
-
- Timer_initialize();
- (void) rtems_rate_monotonic_delete( id );
- end_time = Read_timer();
-
- put_time(
- "rtems_rate_monotonic_delete: inactive",
- end_time,
- 1,
- 0,
- CALLING_OVERHEAD_RATE_MONOTONIC_DELETE
- );
-
- status = rtems_rate_monotonic_create( Period_name, &id );
- directive_failed( status, "rtems_rate_monotonic_create" );
-
- status = rtems_rate_monotonic_period( id, 10 );
- directive_failed( status, "rtems_rate_monotonic_period" );
-
- Timer_initialize();
- rtems_rate_monotonic_delete( id );
- end_time = Read_timer();
-
- put_time(
- "rtems_rate_monotonic_delete: active",
- end_time,
- 1,
- 0,
- CALLING_OVERHEAD_RATE_MONOTONIC_DELETE
- );
-
- for ( index=1 ; index <= OPERATION_COUNT ; index++ ) {
- status = rtems_task_create(
- rtems_build_name( 'T', 'E', 'S', 'T' ),
- 128,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &id
- );
- directive_failed( status, "rtems_task_create LOOP" );
-
- status = rtems_task_start( id, Tasks, 0 );
- directive_failed( status, "rtems_task_start LOOP" );
- }
-
- status = rtems_task_create(
- rtems_build_name( 'L', 'O', 'W', ' ' ),
- 200,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &id
- );
- directive_failed( status, "rtems_task_create LOW" );
-
- status = rtems_task_start( id, Low_task, 0 );
- directive_failed( status, "rtems_task_start LOW" );
-
- Task_count = 0;
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
-
-rtems_task Tasks(
- rtems_task_argument argument
-)
-{
- rtems_id id;
- rtems_status_code status;
-
- status = rtems_rate_monotonic_create( 1, &id );
- directive_failed( status, "rtems_rate_monotonic_create" );
-
- status = rtems_rate_monotonic_period( id, 100 );
- directive_failed( status, "rtems_rate_monotonic_period" );
-
- /*
- * Give up the processor to allow all tasks to actually
- * create and start their period timer before the benchmark
- * timer is initialized.
- */
-
- (void) rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
-
- Task_count++;
-
- if ( Task_count == 1 )
- Timer_initialize();
-
- (void) rtems_rate_monotonic_period( id, 100 );
-}
-
-rtems_task Low_task(
- rtems_task_argument argument
-)
-{
- rtems_unsigned32 index;
-
- end_time = Read_timer();
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) Empty_function();
- overhead = Read_timer();
-
- put_time(
- "rtems_rate_monotonic_period: conclude periods -- caller blocks",
- end_time,
- OPERATION_COUNT,
- overhead,
- CALLING_OVERHEAD_RATE_MONOTONIC_PERIOD
- );
-
- puts( "*** END OF TEST 29 ***" );
- exit( 0 );
-}
diff --git a/testsuites/tmtests/tm29/tm29.doc b/testsuites/tmtests/tm29/tm29.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/tmtests/tm29/tm29.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/tmtests/tmck/Makefile.am b/testsuites/tmtests/tmck/Makefile.am
deleted file mode 100644
index c05e844246..0000000000
--- a/testsuites/tmtests/tmck/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = tmck
-
-MANAGERS = io
-
-C_FILES = task1.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/tmtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-OPERATION_COUNT = @OPERATION_COUNT@
-AM_CPPFLAGS += -I$(top_srcdir)/include -DOPERATION_COUNT=$(OPERATION_COUNT)
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/tmtests/tmck/system.h b/testsuites/tmtests/tmck/system.h
deleted file mode 100644
index 6866a1625e..0000000000
--- a/testsuites/tmtests/tmck/system.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* system.h
- *
- * This include file is used by all tests in the Time Suite.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <coverhd.h>
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-#include <timesys.h>
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 2
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/testsuites/tmtests/tmck/task1.c b/testsuites/tmtests/tmck/task1.c
deleted file mode 100644
index 458c51395d..0000000000
--- a/testsuites/tmtests/tmck/task1.c
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#define TEST_INIT
-#include "system.h"
-
-#define MAXIMUM_DISTRIBUTION 10000
-
-#undef OPERATION_COUNT
-#define OPERATION_COUNT 100000
-
-int Distribution[ MAXIMUM_DISTRIBUTION + 1 ];
-
-rtems_task Task_1(
- rtems_task_argument argument
-);
-
-void check_read_timer( void );
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_id id;
- rtems_status_code status;
-
- /*
- * Tell the Timer Driver what we are doing
- */
-
- Set_find_average_overhead( 1 );
-
- Print_Warning();
-
- puts( "\n\n*** TIME CHECKER ***" );
-
- Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' ),
-
- status = rtems_task_create(
- 1,
- 5,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &id
- );
- directive_failed( status, "rtems_task_create of TA1" );
-
- status = rtems_task_start( id, Task_1, 0 );
- directive_failed( status, "rtems_task_start of TA1" );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
-
-rtems_task Task_1(
- rtems_task_argument argument
-)
-{
- rtems_unsigned32 index;
-
- check_read_timer();
-rtems_test_pause();
-
- Timer_initialize();
- end_time = Read_timer();
-
- put_time(
- "NULL timer stopped at",
- end_time,
- 1,
- 0,
- 0
- );
-
- Timer_initialize();
- for ( index = 1 ; index <= 1000 ; index++ )
- (void) Empty_function();
- end_time = Read_timer();
-
- put_time(
- "LOOP (1000) timer stopped at",
- end_time,
- 1,
- 0,
- 0
- );
-
- Timer_initialize();
- for ( index = 1 ; index <= 10000 ; index++ )
- (void) Empty_function();
- end_time = Read_timer();
-
- put_time(
- "LOOP (10000) timer stopped at",
- end_time,
- 1,
- 0,
- 0
- );
-
- Timer_initialize();
- for ( index = 1 ; index <= 50000 ; index++ )
- (void) Empty_function();
- end_time = Read_timer();
-
- put_time(
- "LOOP (50000) timer stopped at",
- end_time,
- 1,
- 0,
- 0
- );
-
- Timer_initialize();
- for ( index = 1 ; index <= 100000 ; index++ )
- (void) Empty_function();
- end_time = Read_timer();
-
- put_time(
- "LOOP (100000) timer stopped at",
- end_time,
- 1,
- 0,
- 0
- );
-
- puts( "*** END OF TIME CHECKER ***" );
- exit( 0 );
-}
-
-void check_read_timer()
-{
- rtems_unsigned32 index;
- rtems_unsigned32 time;
-
- for ( index = 1 ; index <= MAXIMUM_DISTRIBUTION ; index++ )
- Distribution[ index ] = 0;
-
- for ( index = 1 ; index <= OPERATION_COUNT ; index++ ) {
- Timer_initialize();
- end_time = Read_timer();
- if ( end_time > MAXIMUM_DISTRIBUTION ) {
- /*
- * Under UNIX a simple process swap takes longer than we
- * consider valid for our testing purposes.
- */
- printf( "TOO LONG (%d) at index %d!!!\n", end_time, index );
-#if defined(unix)
- index--;
- continue;
-#else
- exit( 1 );
-#endif
- }
- else
- Distribution[ end_time ]++;
- }
-
- printf( "Units may not be in microseconds for this test!!!\n" );
- time = 0;
- for ( index = 0 ; index <= MAXIMUM_DISTRIBUTION ; index++ ) {
- time += (Distribution[ index ] * index);
- if ( Distribution[ index ] != 0 )
- printf( "%d %d\n", index, Distribution[ index ] );
- }
- printf( "Total time = %d\n", time );
- printf( "Average time = %d\n", time / OPERATION_COUNT );
-}
diff --git a/testsuites/tmtests/tmck/tmck.doc b/testsuites/tmtests/tmck/tmck.doc
deleted file mode 100644
index c88fc0fc97..0000000000
--- a/testsuites/tmtests/tmck/tmck.doc
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
-This file describes the directives timed by this test.
-
-benchmark name: timecheck
-
-This becnchmark is used to calibrate the timer. It is only used to
-when initial timing begins on a particular processor board.
-
diff --git a/testsuites/tmtests/tmoverhd/Makefile.am b/testsuites/tmtests/tmoverhd/Makefile.am
deleted file mode 100644
index 8455838e77..0000000000
--- a/testsuites/tmtests/tmoverhd/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-TEST = tmoverhd
-
-MANAGERS = io
-
-C_FILES = testtask.c empty.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES = system.h dumrtems.h
-noinst_HEADERS =$(H_FILES)
-
-DOCTYPES = doc
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-include $(top_srcdir)/tmtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-OPERATION_COUNT = @OPERATION_COUNT@
-AM_CPPFLAGS += -I$(top_srcdir)/include -DOPERATION_COUNT=$(OPERATION_COUNT)
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/tmtests/tmoverhd/dumrtems.h b/testsuites/tmtests/tmoverhd/dumrtems.h
deleted file mode 100644
index b1e1cbdfae..0000000000
--- a/testsuites/tmtests/tmoverhd/dumrtems.h
+++ /dev/null
@@ -1,254 +0,0 @@
-/* dumrtems.h
- *
- * This include file contains phony macros to map
- * executive calls to Empty_directive().
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __DUMRTEMS_h
-#define __DUMRTEMS_h
-
-/* RTEMS call redefinition macros */
-
-#undef rtems_signal_catch
-#undef rtems_signal_send
-#undef rtems_io_close
-#undef rtems_io_control
-#undef rtems_io_initialize
-#undef rtems_io_open
-#undef rtems_io_read
-#undef rtems_io_write
-#undef rtems_port_internal_to_external
-#undef rtems_port_external_to_internal
-#undef rtems_port_create
-#undef rtems_port_delete
-#undef rtems_port_ident
-#undef rtems_event_receive
-#undef rtems_event_send
-#undef rtems_initialize_executive
-#undef rtems_shutdown_executive
-#undef rtems_interrupt_catch
-#undef rtems_partition_create
-#undef rtems_partition_delete
-#undef rtems_partition_get_buffer
-#undef rtems_partition_ident
-#undef rtems_partition_return_buffer
-#undef rtems_message_queue_broadcast
-#undef rtems_message_queue_create
-#undef rtems_message_queue_delete
-#undef rtems_message_queue_flush
-#undef rtems_message_queue_ident
-#undef rtems_message_queue_receive
-#undef rtems_message_queue_send
-#undef rtems_message_queue_urgent
-#undef rtems_region_create
-#undef rtems_region_delete
-#undef rtems_region_get_segment
-#undef rtems_region_ident
-#undef rtems_region_return_segment
-#undef rtems_semaphore_create
-#undef rtems_semaphore_delete
-#undef rtems_semaphore_ident
-#undef rtems_semaphore_obtain
-#undef rtems_semaphore_release
-#undef rtems_task_create
-#undef rtems_task_delete
-#undef rtems_task_get_note
-#undef rtems_task_ident
-#undef rtems_task_mode
-#undef rtems_task_restart
-#undef rtems_task_resume
-#undef rtems_task_set_note
-#undef rtems_task_set_priority
-#undef rtems_task_start
-#undef rtems_task_suspend
-#undef rtems_clock_get
-#undef rtems_clock_set
-#undef rtems_clock_tick
-#undef rtems_task_wake_after
-#undef rtems_task_wake_when
-#undef rtems_fatal_error_occurred
-#undef rtems_rate_monotonic_create
-#undef rtems_rate_monotonic_ident
-#undef rtems_rate_monotonic_delete
-#undef rtems_rate_monotonic_cancel
-#undef rtems_rate_monotonic_period
-#undef rtems_multiprocessing_announce
-#undef rtems_timer_create
-#undef rtems_timer_ident
-#undef rtems_timer_delete
-#undef rtems_timer_cancel
-#undef rtems_timer_fire_after
-#undef rtems_timer_fire_when
-#undef rtems_timer_reset
-
-#define rtems_signal_catch( asraddr, mode ) \
- Empty_directive( asraddr, mode )
-#define rtems_signal_send( tid, signal ) \
- Empty_directive( tid, signal )
-
-#define rtems_io_close( major, minor, argp, rval ) \
- Empty_directive( major, minor, argp, rval )
-#define rtems_io_control( major, minor, argp, rval ) \
- Empty_directive( major, minor, argp, rval )
-#define rtems_io_initialize( major, minor, argp, rval ) \
- Empty_directive( major, minor, argp, rval )
-#define rtems_io_open( major, minor, argp, rval ) \
- Empty_directive( major, minor, argp, rval )
-#define rtems_io_read( major, minor, argp, rval ) \
- Empty_directive( major, minor, argp, rval )
-#define rtems_io_write( major, minor, argp, rval ) \
- Empty_directive( major, minor, argp, rval )
-
-#define rtems_port_internal_to_external( dpid, internal, external ) \
- Empty_directive( dpid, internal, external )
-#define rtems_port_external_to_internal( dpid, external, internal ) \
- Empty_directive( dpid, external, internal )
-#define rtems_port_create( name, intaddr, extaddr, length, dpid ) \
- Empty_directive( name, intaddr, extaddr, length, dpid )
-#define rtems_port_delete( dpid ) \
- Empty_directive( dpid )
-#define rtems_port_ident( name, dpid ) \
- Empty_directive( name, dpid )
-
-#define rtems_event_receive( eventin, options, timeout, eventout ) \
- Empty_directive( eventin, options, timeout, eventout )
-#define rtems_event_send( tid, event ) \
- Empty_directive( tid, event )
-
-#define rtems_initialize_executive( conftbl, cputbl ) \
- Empty_directive( conftbl, cputbl )
-#define rtems_shutdown_executive( the_error ) \
- Empty_directive( the_error )
-
-#define rtems_interrupt_catch( israddr, vector, oldisr ) \
- Empty_directive( israddr, vector, oldisr )
-
-#define rtems_partition_create( name, paddr, length, bsize, attr, ptid ) \
- Empty_directive( name, paddr, length, bsize, attr, ptid )
-#define rtems_partition_delete( ptid ) \
- Empty_directive( ptid )
-#define rtems_partition_get_buffer( ptid, bufaddr ) \
- Empty_directive( ptid, bufaddr )
-#define rtems_partition_ident( name, node, ptid ) \
- Empty_directive( name, node, ptid )
-#define rtems_partition_return_buffer( ptid, bufaddr ) \
- Empty_directive( ptid, bufaddr )
-
-#define rtems_message_queue_broadcast( qid, buffer, count ) \
- Empty_directive( qid, buffer, count )
-#define rtems_message_queue_create( name, count, attr, qid ) \
- Empty_directive( name, count, attr, qid )
-#define rtems_message_queue_delete( qid ) \
- Empty_directive( qid )
-#define rtems_message_queue_flush( qid, count ) \
- Empty_directive( qid, count )
-#define rtems_message_queue_ident( name, node, qid ) \
- Empty_directive( name, node, qid )
-#define rtems_message_queue_receive( qid, buffer, options, timeout ) \
- Empty_directive( qid, buffer, options, timeout )
-#define rtems_message_queue_send( qid, buffer ) \
- Empty_directive( qid, buffer )
-#define rtems_message_queue_urgent( qid, buffer ) \
- Empty_directive( qid, buffer )
-
-#define rtems_region_create( name, paddr, length, pagesize, attr, rnid ) \
- Empty_directive( name, paddr, length, pagesize, attr, rnid )
-#define rtems_region_delete( rnid ) \
- Empty_directive( rnid )
-#define rtems_region_get_segment( rnid, size, options, timeout, segaddr ) \
- Empty_directive( rnid, size, options, timeout, segaddr )
-#define rtems_region_ident( name, rnid ) \
- Empty_directive( name, rnid )
-#define rtems_region_return_segment( rnid, segaddr ) \
- Empty_directive( rnid, segaddr )
-
-#define rtems_semaphore_create( name, count, attr, priceil, smid ) \
- Empty_directive( name, count, attr, priceil, smid )
-#define rtems_semaphore_delete( smid ) \
- Empty_directive( smid )
-#define rtems_semaphore_ident( name, node, smid ) \
- Empty_directive( name, node, smid )
-#define rtems_semaphore_obtain( smid, options, timeout ) \
- Empty_directive( smid, options, timeout )
-#define rtems_semaphore_release( smid ) \
- Empty_directive( smid )
-
-#define rtems_task_create( name, priority, stack_size, mode, attr, tid ) \
- Empty_directive( name, priority, stack_size, mode, attr, tid )
-#define rtems_task_delete( tid ) \
- Empty_directive( tid )
-#define rtems_task_get_note( tid, notepad, note ) \
- Empty_directive( tid, notepad, note )
-#define rtems_task_ident( name, node, tid ) \
- Empty_directive( name, node, tid )
-#define rtems_task_mode( mode, mask, pmode ) \
- Empty_directive( mode, mask, pmode )
-#define rtems_task_restart( tid, arg ) \
- Empty_directive( tid, arg )
-#define rtems_task_resume( tid ) \
- Empty_directive( tid )
-#define rtems_task_set_note( tid, notepad, note ) \
- Empty_directive( tid, notepad, note )
-#define rtems_task_set_priority( tid, priority, ppriority ) \
- Empty_directive( tid, priority, ppriority )
-#define rtems_task_start( tid, saddr, arg ) \
- Empty_directive( tid, saddr, arg )
-#define rtems_task_suspend( tid ) \
- Empty_directive( tid )
-
-#define rtems_clock_get( options, time ) \
- Empty_directive( options, time )
-#define rtems_clock_set( time ) \
- Empty_directive( time )
-#define rtems_clock_tick() \
- Empty_directive()
-#define rtems_task_wake_after( ticks ) \
- Empty_directive( ticks )
-#define rtems_task_wake_when( time ) \
- Empty_directive( time )
-
-#define rtems_fatal_error_occurred( errcode ) \
- Empty_directive( errcode )
-
-#define rtems_rate_monotonic_create( name, id ) \
- Empty_directive( name, id )
-#define rtems_rate_monotonic_ident( name, id ) \
- Empty_directive( name, id )
-#define rtems_rate_monotonic_delete( id ) \
- Empty_directive( id )
-#define rtems_rate_monotonic_cancel( id ) \
- Empty_directive( id )
-#define rtems_rate_monotonic_period( id, period ) \
- Empty_directive( id, period )
-
-#define rtems_multiprocessing_announce() \
- Empty_directive()
-
-#define rtems_timer_create( name, tmid ) \
- Empty_directive( name, tmid )
-#define rtems_timer_delete( tmid ) \
- Empty_directive( tmid )
-#define rtems_timer_cancel( tmid ) \
- Empty_directive( tmid )
-#define rtems_timer_ident( name, tmid ) \
- Empty_directive( name, tmid )
-#define rtems_timer_fire_after( tmid, ticks, routine, user_data ) \
- Empty_directive( tmid, ticks, routine, user_data )
-#define rtems_timer_fire_when( tmid, time, routine, user_data ) \
- Empty_directive( tmid, time, routine, user_data )
-#define rtems_timer_reset( tmid ) \
- Empty_directive( tmid )
-
-rtems_status_code Empty_directive();
-
-#endif
-/* end of include file */
diff --git a/testsuites/tmtests/tmoverhd/empty.c b/testsuites/tmtests/tmoverhd/empty.c
deleted file mode 100644
index dc5c76f79d..0000000000
--- a/testsuites/tmtests/tmoverhd/empty.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include "system.h"
-
-rtems_timer_service_routine Timer_handler(
- rtems_id argument
-)
-{
-}
-
-rtems_asr Isr_handler(
- rtems_signal_set signals
-)
-{
-}
-
-rtems_asr Asr_handler(
- rtems_signal_set signals
-)
-{
-}
-
-rtems_task task_func() {}
-
-void null_func() {}
-
-rtems_status_code Empty_directive()
-{
- return( RTEMS_SUCCESSFUL );
-}
diff --git a/testsuites/tmtests/tmoverhd/system.h b/testsuites/tmtests/tmoverhd/system.h
deleted file mode 100644
index ab43834a89..0000000000
--- a/testsuites/tmtests/tmoverhd/system.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* system.h
- *
- * This include file is used by all tests in the Time Suite.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-
-#include <coverhd.h>
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_timer_service_routine Timer_handler(
- rtems_id argument
-);
-
-rtems_asr Isr_handler(
- rtems_signal_set signals
-);
-
-rtems_asr Asr_handler(
- rtems_signal_set signals
-);
-
-rtems_task task_func();
-
-void null_func();
-
-rtems_status_code Empty_directive();
-
-#include <timesys.h>
-
-/* configuration information */
-
-#define CONFIGURE_TMTEST
-
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 2
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <confdefs.h>
-
-/* end of include file */
diff --git a/testsuites/tmtests/tmoverhd/testtask.c b/testsuites/tmtests/tmoverhd/testtask.c
deleted file mode 100644
index 30f9c3aee1..0000000000
--- a/testsuites/tmtests/tmoverhd/testtask.c
+++ /dev/null
@@ -1,1278 +0,0 @@
-/*
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#define TEST_INIT
-#include "system.h"
-
-rtems_unsigned8 Memory_area[ 2048 ];
-rtems_unsigned8 Internal_port_area[ 256 ];
-rtems_unsigned8 External_port_area[ 256 ];
-
-rtems_task Task_1(
- rtems_task_argument argument
-);
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{ rtems_id id;
- rtems_status_code status;
-
- Set_find_average_overhead( TRUE );
-
- Print_Warning();
-
- puts( "\n\n*** TIME TEST OVERHEAD ***" );
-
- status = rtems_task_create(
- rtems_build_name( 'T', 'A', '1', ' ' ),
- 254,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &id
- );
- directive_failed( status, "rtems_task_create of TA1" );
-
- status = rtems_task_start( id, Task_1, 0 );
- directive_failed( status, "rtems_task_start of TA1" );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
-
-/* comment out the following include to verify type are correct */
-#include "dumrtems.h"
-
-rtems_task Task_1(
- rtems_task_argument argument
-)
-{
- rtems_name name;
- rtems_unsigned32 index;
- rtems_cpu_table cpu_table;
- rtems_id id;
- rtems_task_priority in_priority;
- rtems_task_priority out_priority;
- rtems_mode in_mode;
- rtems_mode mask;
- rtems_mode out_mode;
- rtems_unsigned32 note;
- rtems_time_of_day time;
- rtems_interval timeout;
- rtems_signal_set signals;
- void *address_1;
- rtems_event_set events;
- long buffer[ 4 ];
- rtems_unsigned32 count;
- rtems_device_major_number major;
- rtems_device_minor_number minor;
- rtems_unsigned32 io_result;
- rtems_unsigned32 error;
- rtems_clock_get_options options;
-
- name = rtems_build_name( 'N', 'A', 'M', 'E' );
- in_priority = 250;
- in_mode = RTEMS_NO_PREEMPT;
- mask = RTEMS_PREEMPT_MASK;
- note = 8;
- timeout = 100;
- signals = RTEMS_SIGNAL_1 | RTEMS_SIGNAL_3;
- major = 10;
- minor = 0;
- error = 100;
- options = 0;
-
-/* rtems_initialize_executive */
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_initialize_executive( rtems_configuration_get_table(), &cpu_table );
- end_time = Read_timer();
-
- put_time(
- "rtems_initialize_executive",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_shutdown_executive */
-
- Timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_shutdown_executive( error );
- end_time = Read_timer();
-
- put_time(
- "rtems_shutdown_executive",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_task_create */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_task_create(
- name,
- in_priority,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &id
- );
- end_time = Read_timer();
-
- put_time(
- "rtems_task_create",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_task_ident */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_task_ident( name, RTEMS_SEARCH_ALL_NODES, id );
- end_time = Read_timer();
-
- put_time(
- "rtems_task_ident",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_task_start */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_task_start( id, Task_1, 0 );
- end_time = Read_timer();
-
- put_time(
- "rtems_task_start",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_task_restart */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_task_restart( id, 0 );
- end_time = Read_timer();
-
- put_time(
- "rtems_task_restart",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_task_delete */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_task_delete( id );
- end_time = Read_timer();
-
- put_time(
- "rtems_task_delete",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_task_suspend */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_task_suspend( id );
- end_time = Read_timer();
-
- put_time(
- "rtems_task_suspend",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_task_resume */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_task_resume( id );
- end_time = Read_timer();
-
- put_time(
- "rtems_task_resume",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_task_set_priority */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_task_set_priority( id, in_priority, &out_priority );
- end_time = Read_timer();
-
- put_time(
- "rtems_task_set_priority",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_task_mode */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_task_mode( in_mode, mask, &out_mode );
- end_time = Read_timer();
-
- put_time(
- "rtems_task_mode",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_task_get_note */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_task_get_note( id, 1, note );
- end_time = Read_timer();
-
- put_time(
- "rtems_task_get_note",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_task_set_note */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_task_set_note( id, 1, note );
- end_time = Read_timer();
-
- put_time(
- "rtems_task_set_note",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_task_wake_when */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_task_wake_when( time );
- end_time = Read_timer();
-
- put_time(
- "rtems_task_wake_when",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_task_wake_after */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_task_wake_after( timeout );
- end_time = Read_timer();
-
- put_time(
- "rtems_task_wake_after",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_interrupt_catch */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_interrupt_catch( Isr_handler, 5, address_1 );
- end_time = Read_timer();
-
- put_time(
- "rtems_interrupt_catch",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_clock_get */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_clock_get( options, time );
- end_time = Read_timer();
-
- put_time(
- "rtems_clock_get",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_clock_set */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_clock_set( time );
- end_time = Read_timer();
-
- put_time(
- "rtems_clock_set",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_clock_tick */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_clock_tick();
- end_time = Read_timer();
-
- put_time(
- "rtems_clock_tick",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-rtems_test_pause();
-
-/* rtems_timer_create */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_timer_create( name, &id );
- end_time = Read_timer();
-
- put_time(
- "rtems_timer_create",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_timer_delete */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_timer_delete( id );
- end_time = Read_timer();
-
- put_time(
- "rtems_timer_delete",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_timer_ident */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_timer_ident( name, id );
- end_time = Read_timer();
-
- put_time(
- "rtems_timer_ident",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_timer_fire_after */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_timer_fire_after(
- id,
- timeout,
- Timer_handler,
- NULL
- );
- end_time = Read_timer();
-
- put_time(
- "rtems_timer_fire_after",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_timer_fire_when */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_timer_fire_when(
- id,
- time,
- Timer_handler,
- NULL
- );
- end_time = Read_timer();
-
- put_time(
- "rtems_timer_fire_when",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_timer_reset */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_timer_reset( id );
- end_time = Read_timer();
-
- put_time(
- "rtems_timer_reset",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_timer_cancel */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_timer_cancel( id );
- end_time = Read_timer();
-
- put_time(
- "rtems_timer_cancel",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_semaphore_create */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_semaphore_create(
- name,
- 128,
- RTEMS_DEFAULT_ATTRIBUTES,
- RTEMS_NO_PRIORITY,
- &id
- );
- end_time = Read_timer();
-
- put_time(
- "rtems_semaphore_create",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_semaphore_delete */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_semaphore_delete( id );
- end_time = Read_timer();
-
- put_time(
- "rtems_semaphore_delete",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_semaphore_ident */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_semaphore_ident( name, RTEMS_SEARCH_ALL_NODES, id );
- end_time = Read_timer();
-
- put_time(
- "rtems_semaphore_ident",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_semaphore_obtain */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_semaphore_obtain( id, RTEMS_DEFAULT_OPTIONS, timeout );
- end_time = Read_timer();
-
- put_time(
- "rtems_semaphore_obtain",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_semaphore_release */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_semaphore_release( id );
- end_time = Read_timer();
-
- put_time(
- "rtems_semaphore_release",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_message_queue_create */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_message_queue_create(
- name,
- 128,
- RTEMS_DEFAULT_ATTRIBUTES,
- &id
- );
- end_time = Read_timer();
-
- put_time(
- "rtems_message_queue_create",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_message_queue_ident */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_message_queue_ident(
- name,
- RTEMS_SEARCH_ALL_NODES,
- id
- );
- end_time = Read_timer();
-
- put_time(
- "rtems_message_queue_ident",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_message_queue_delete */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_message_queue_delete( id );
- end_time = Read_timer();
-
- put_time(
- "rtems_message_queue_delete",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_message_queue_send */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_message_queue_send( id, (long (*)[4])buffer );
- end_time = Read_timer();
-
- put_time(
- "rtems_message_queue_send",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_message_queue_urgent */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_message_queue_urgent( id, (long (*)[4])buffer );
- end_time = Read_timer();
-
- put_time(
- "rtems_message_queue_urgent",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_message_queue_broadcast */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_message_queue_broadcast(
- id,
- (long (*)[4])buffer,
- &count
- );
- end_time = Read_timer();
-
- put_time(
- "rtems_message_queue_broadcast",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_message_queue_receive */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_message_queue_receive(
- id,
- (long (*)[4])buffer,
- RTEMS_DEFAULT_OPTIONS,
- timeout
- );
- end_time = Read_timer();
-
- put_time(
- "rtems_message_queue_receive",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_message_queue_flush */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_message_queue_flush( id, &count );
- end_time = Read_timer();
-
- put_time(
- "rtems_message_queue_flush",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-rtems_test_pause();
-
-/* rtems_event_send */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_event_send( id, events );
- end_time = Read_timer();
-
- put_time(
- "rtems_event_send",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_event_receive */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_event_receive(
- RTEMS_EVENT_16,
- RTEMS_DEFAULT_OPTIONS,
- timeout,
- &events
- );
- end_time = Read_timer();
-
- put_time(
- "rtems_event_receive",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_signal_catch */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_signal_catch( Asr_handler, RTEMS_DEFAULT_MODES );
- end_time = Read_timer();
-
- put_time(
- "rtems_signal_catch",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_signal_send */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_signal_send( id, signals );
- end_time = Read_timer();
-
- put_time(
- "rtems_signal_send",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_partition_create */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_partition_create(
- name,
- Memory_area,
- 2048,
- 128,
- RTEMS_DEFAULT_ATTRIBUTES,
- &id
- );
- end_time = Read_timer();
-
- put_time(
- "rtems_partition_create",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_partition_ident */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_partition_ident( name, RTEMS_SEARCH_ALL_NODES, id );
- end_time = Read_timer();
-
- put_time(
- "rtems_partition_ident",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_partition_delete */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_partition_delete( id );
- end_time = Read_timer();
-
- put_time(
- "rtems_partition_delete",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_partition_get_buffer */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_partition_get_buffer( id, address_1 );
- end_time = Read_timer();
-
- put_time(
- "rtems_partition_get_buffer",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_partition_return_buffer */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_partition_return_buffer( id, address_1 );
- end_time = Read_timer();
-
- put_time(
- "rtems_partition_return_buffer",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_region_create */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_region_create(
- name,
- Memory_area,
- 2048,
- 128,
- RTEMS_DEFAULT_ATTRIBUTES,
- &id
- );
- end_time = Read_timer();
-
- put_time(
- "rtems_region_create",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_region_ident */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_region_ident( name, id );
- end_time = Read_timer();
-
- put_time(
- "rtems_region_ident",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_region_delete */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_region_delete( id );
- end_time = Read_timer();
-
- put_time(
- "rtems_region_delete",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_region_get_segment */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_region_get_segment(
- id,
- 243,
- RTEMS_DEFAULT_OPTIONS,
- timeout,
- &address_1
- );
- end_time = Read_timer();
-
- put_time(
- "rtems_region_get_segment",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_region_return_segment */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_region_return_segment( id, address_1 );
- end_time = Read_timer();
-
- put_time(
- "rtems_region_return_segment",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_port_create */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_port_create(
- name,
- Internal_port_area,
- External_port_area,
- 0xff,
- &id
- );
- end_time = Read_timer();
-
- put_time(
- "rtems_port_create",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_port_ident */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_port_ident( name, id );
- end_time = Read_timer();
-
- put_time(
- "rtems_port_ident",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_port_delete */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_port_delete( id );
- end_time = Read_timer();
-
- put_time(
- "rtems_port_delete",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_port_external_to_internal */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_port_external_to_internal(
- id,
- &External_port_area[ 7 ],
- address_1
- );
- end_time = Read_timer();
-
- put_time(
- "rtems_port_external_to_internal",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_port_internal_to_external */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_port_internal_to_external(
- id,
- &Internal_port_area[ 7 ],
- address_1
- );
- end_time = Read_timer();
-
- put_time(
- "rtems_port_internal_to_external",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-rtems_test_pause();
-
-/* rtems_io_initialize */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_io_initialize(
- major,
- minor,
- address_1,
- &io_result
- );
- end_time = Read_timer();
-
- put_time(
- "rtems_io_initialize",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_io_open */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_io_open(
- major,
- minor,
- address_1,
- &io_result
- );
- end_time = Read_timer();
-
- put_time(
- "rtems_io_open",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_io_close */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_io_close(
- major,
- minor,
- address_1,
- &io_result
- );
- end_time = Read_timer();
-
- put_time(
- "rtems_io_close",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_io_read */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_io_read(
- major,
- minor,
- address_1,
- &io_result
- );
- end_time = Read_timer();
-
- put_time(
- "rtems_io_read",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_io_write */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_io_write(
- major,
- minor,
- address_1,
- &io_result
- );
- end_time = Read_timer();
-
- put_time(
- "rtems_io_write",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_io_control */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_io_control(
- major,
- minor,
- address_1,
- &io_result
- );
- end_time = Read_timer();
-
- put_time(
- "rtems_io_control",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_fatal_error_occurred */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_fatal_error_occurred( error );
- end_time = Read_timer();
-
- put_time(
- "rtems_fatal_error_occurred",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_rate_monotonic_create */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_rate_monotonic_create( name, &id );
- end_time = Read_timer();
-
- put_time(
- "rtems_rate_monotonic_create",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_rate_monotonic_ident */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_rate_monotonic_ident( name, id );
- end_time = Read_timer();
-
- put_time(
- "rtems_rate_monotonic_ident",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_rate_monotonic_delete */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_rate_monotonic_delete( id );
- end_time = Read_timer();
-
- put_time(
- "rtems_rate_monotonic_delete",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_rate_monotonic_cancel */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_rate_monotonic_cancel( id );
- end_time = Read_timer();
-
- put_time(
- "rtems_rate_monotonic_cancel",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_rate_monotonic_period */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_rate_monotonic_period( id, timeout );
- end_time = Read_timer();
-
- put_time(
- "rtems_rate_monotonic_period",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
-/* rtems_multiprocessing_announce */
-
- Timer_initialize();
- for ( index = 1 ; index <= OPERATION_COUNT ; index ++ )
- (void) rtems_multiprocessing_announce();
- end_time = Read_timer();
-
- put_time(
- "rtems_multiprocessing_announce",
- end_time,
- OPERATION_COUNT,
- overhead,
- 0
- );
-
- puts( "*** END OF TIME OVERHEAD ***" );
-
- exit( 0 );
-}
diff --git a/testsuites/tmtests/tmoverhd/tmoverhd.doc b/testsuites/tmtests/tmoverhd/tmoverhd.doc
deleted file mode 100644
index f7e063ff14..0000000000
--- a/testsuites/tmtests/tmoverhd/tmoverhd.doc
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.OARcorp.com/rtems/license.html.
-#
-
-
diff --git a/testsuites/tmtests/tmtests.am b/testsuites/tmtests/tmtests.am
deleted file mode 100644
index 577bac9fd2..0000000000
--- a/testsuites/tmtests/tmtests.am
+++ /dev/null
@@ -1,11 +0,0 @@
-project_bspdir=$(PROJECT_ROOT)/@RTEMS_BSP@
-
-$(project_bspdir)/tests:
- @$(mkinstalldirs) $@
-
-$(project_bspdir)/tests/$(TEST)$(LIB_VARIANT).exe: $(PGM)
- $(INSTALL_PROGRAM) $< $@
-
-TMPINSTALL_FILES += \
-$(project_bspdir)/tests \
-$(project_bspdir)/tests/$(TEST)$(LIB_VARIANT).exe
diff --git a/testsuites/tools/Makefile.am b/testsuites/tools/Makefile.am
deleted file mode 100644
index ec01965fb6..0000000000
--- a/testsuites/tools/Makefile.am
+++ /dev/null
@@ -1,11 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-
-SUBDIRS = @subdirs@
-
-include $(top_srcdir)/../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/tools/generic/Makefile.am b/testsuites/tools/generic/Makefile.am
deleted file mode 100644
index 642274f63c..0000000000
--- a/testsuites/tools/generic/Makefile.am
+++ /dev/null
@@ -1,28 +0,0 @@
-##
-## $Id$
-##
-
-AUTOMAKE_OPTIONS = foreign 1.4
-ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-
-noinst_SCRIPTS = difftest sorttimes
-
-project_bspdir = $(PROJECT_ROOT)/@RTEMS_BSP@
-
-PREINSTALL_FILES = \
-$(project_bspdir)/tests \
-$(project_bspdir)/tests/difftest \
-$(project_bspdir)/tests/sorttimes
-
-$(project_bspdir)/tests:
- @$(mkinstalldirs) $@
-
-$(project_bspdir)/tests/difftest: difftest
- $(INSTALL_SCRIPT) $< $@
-
-$(project_bspdir)/tests/sorttimes: sorttimes
- $(INSTALL_SCRIPT) $< $@
-
-all-local: $(PREINSTALL_FILES)
-
-include $(top_srcdir)/../../../../../automake/local.am
diff --git a/testsuites/tools/generic/difftest.in b/testsuites/tools/generic/difftest.in
deleted file mode 100644
index cf25602f0d..0000000000
--- a/testsuites/tools/generic/difftest.in
+++ /dev/null
@@ -1,117 +0,0 @@
-#!@KSH@ -p
-#
-# Check test results against official output from the src tree
-#
-# $Id$
-#
-
-# XXX: do not run size.exe with this; it asks questions we don't answer
-
-# how to do arith in bash
-# i=$((i * 2))
-# b=$((b + 1))
-
-# progname=`basename $0`
-progname=${0##*/} # fast basename hack for ksh, bash
-
-USAGE=\
-"usage: $progname [ -opts ] test [ test ... ]
- -v -- verbose
- -l logdir -- specify log directory (default is 'logdir')
-"
-
-# log an error to stderr
-prerr()
-{
- echo "$*" >&2
-}
-
-fatal() {
- [ "$1" ] && prerr $*
- prerr "$USAGE"
- exit 1
-}
-
-warn() {
- [ "$1" ] && prerr $*
-}
-
-#
-# process the options
-#
-# defaults for getopt vars
-#
-
-verbose=""
-logdir=log
-
-while getopts v12o:l: OPT
-do
- case "$OPT" in
- v)
- verbose="yes";;
- l)
- logdir="$OPTARG";;
- *)
- fatal;;
- esac
-done
-shiftcount=`expr $OPTIND - 1`
-shift $shiftcount
-
-args=$*
-
-#
-# Run the tests
-#
-
-test -d $logdir || fatal "No log directory: ./$logdir"
-
-tests="$args"
-if [ ! "$tests" ]
-then
- cd $logdir
- set -- `ls -1 sp* mp??_? psx* itron* mp*_?_g 2>/dev/null | grep -v info`
- cd ..
- tests="$*"
-fi
-
-for t in $tests
-do
- logfile=$t
-
- if [ ! -f $logdir/$logfile ]
- then
- continue
- fi
-
- echo $logfile
- echo
-
- case $t in
- mp*)
- mptest=`echo $t | sed 's/_.//'`
- node=`echo $t | sed 's/...._//'`
- tmp_scn_file=mptests/node$node/$mptest.scn;;
- sp*)
- tmp_scn_file=sptests/$t.scn;;
- psx*)
- tmp_scn_file=psxtests/$t.scn;;
- itron*)
- tmp_scn_file=itrontests/$t.scn;;
- *)
- fatal "unknown test $t";;
- esac
-
- scn_file=`echo $tmp_scn_file | sed -e s/_g//`
- sed -e '/^$/d' < $logdir/$logfile | diff -b screens/$scn_file -
- echo
- echo
-done
-
-exit 0
-
-# Local Variables: ***
-# mode:ksh ***
-# End: ***
-
diff --git a/testsuites/tools/generic/sorttimes.in b/testsuites/tools/generic/sorttimes.in
deleted file mode 100644
index 594ae4397d..0000000000
--- a/testsuites/tools/generic/sorttimes.in
+++ /dev/null
@@ -1,194 +0,0 @@
-#!@KSH@ -p
-#
-# This script takes the output from the Timing Test Suite, reorders
-# it, and adds headers so it is in the same order as is printed in
-# the supplement.
-#
-# $Id$
-#
-
-usage()
-{
- echo "${progname} file [more files]"
-}
-
-header()
-{
- echo
- echo $*
- echo
-}
-
-lookup()
-{
- grep "$*" $files
-
-}
-
-progname=$0
-
-if [ $# -eq 0 ] ; then
- usage
- exit 0
-fi
-
-files=$*
-
-header Context Switch
-lookup context switch: self
-lookup context switch: to another task
-lookup context switch: no floating point contexts
-lookup fp context switch: restore 1st FP task
-lookup fp context switch: save initialized, restore initialized
-lookup fp context switch: save idle, restore initialized
-lookup fp context switch: save idle, restore idle
-
-header Task Manager
-lookup rtems_task_create
-lookup rtems_task_ident
-lookup rtems_task_start
-lookup rtems_task_restart: calling task
-lookup rtems_task_restart: suspended task -- returns to caller
-lookup rtems_task_restart: blocked task -- returns to caller
-lookup rtems_task_restart: ready task -- returns to caller
-lookup rtems_task_restart: suspended task -- preempts caller
-lookup rtems_task_restart: blocked task -- preempts caller
-lookup rtems_task_restart: ready task -- preempts caller
-lookup rtems_task_delete: calling task
-lookup rtems_task_delete: suspended task
-lookup rtems_task_delete: blocked task
-lookup rtems_task_delete: ready task
-lookup rtems_task_suspend: calling task
-lookup rtems_task_suspend: returns to caller
-lookup rtems_task_resume: task readied -- returns to caller
-lookup rtems_task_resume: task readied -- preempts caller
-lookup rtems_task_set_priority: obtain current priority
-lookup rtems_task_set_priority: returns to caller
-lookup rtems_task_set_priority: preempts caller
-lookup rtems_task_mode: obtain current mode
-lookup rtems_task_mode: no reschedule
-lookup rtems_task_mode: reschedule -- returns to caller
-lookup rtems_task_mode: reschedule -- preempts caller
-lookup rtems_task_get_note
-lookup rtems_task_set_note
-lookup rtems_task_wake_after: yield -- returns to caller
-lookup rtems_task_wake_after: yields -- preempts caller
-lookup rtems_task_wake_when
-
-header Interrupt Manager
-lookup interrupt entry overhead: returns to nested interrupt
-lookup interrupt entry overhead: returns to interrupted task
-lookup interrupt entry overhead: returns to preempting task
-lookup interrupt exit overhead: returns to nested interrupt
-lookup interrupt exit overhead: returns to interrupted task
-lookup interrupt exit overhead: returns to preempting task
-
-header Clock Manager
-lookup rtems_clock_set
-lookup rtems_clock_get
-lookup rtems_clock_tick
-
-header Timer Manager
-lookup rtems_timer_create
-lookup rtems_timer_ident
-lookup rtems_timer_delete: inactive
-lookup rtems_timer_delete: active
-lookup rtems_timer_fire_after: inactive
-lookup rtems_timer_fire_after: active
-lookup rtems_timer_fire_when: inactive
-lookup rtems_timer_fire_when: active
-lookup rtems_timer_reset: inactive
-lookup rtems_timer_reset: active
-lookup rtems_timer_cancel: inactive
-lookup rtems_timer_cancel: active
-
-header Semaphore Manager
-lookup rtems_semaphore_create
-lookup rtems_semaphore_ident
-lookup rtems_semaphore_delete
-lookup rtems_semaphore_obtain: available
-lookup rtems_semaphore_obtain: not available -- NO_WAIT
-lookup rtems_semaphore_obtain: not available -- caller blocks
-lookup rtems_semaphore_release: no waiting tasks
-lookup rtems_semaphore_release: task readied -- returns to caller
-lookup rtems_semaphore_release: task readied -- preempts caller
-
-header Message Queue Manager
-lookup rtems_message_queue_create
-lookup rtems_message_queue_ident
-lookup rtems_message_queue_delete
-lookup rtems_message_queue_send: no waiting tasks
-lookup rtems_message_queue_send: task readied -- returns to caller
-lookup rtems_message_queue_send: task readied -- preempts caller
-lookup rtems_message_queue_urgent: no waiting tasks
-lookup rtems_message_queue_urgent: task readied -- returns to caller
-lookup rtems_message_queue_urgent: task readied -- preempts caller
-lookup rtems_message_queue_broadcast: no waiting tasks
-lookup rtems_message_queue_broadcast: task readied -- returns to caller
-lookup rtems_message_queue_broadcast: task readied -- preempts caller
-lookup rtems_message_queue_receive: available
-lookup rtems_message_queue_receive: not available -- NO_WAIT
-lookup rtems_message_queue_receive: not available -- caller blocks
-lookup rtems_message_queue_flush: no messages flushed
-lookup rtems_message_queue_flush: messages flushed
-
-header Event Manager
-lookup rtems_event_send: no task readied
-lookup rtems_event_send: task readied -- returns to caller
-lookup rtems_event_send: task readied -- preempts caller
-lookup rtems_event_receive: obtain current events
-lookup rtems_event_receive: available
-lookup rtems_event_receive: not available -- NO_WAIT
-lookup rtems_event_receive: not available -- caller blocks
-
-header Signal Manager
-lookup rtems_signal_catch
-lookup rtems_signal_send: returns to caller
-lookup rtems_signal_send: signal to self
-lookup exit ASR overhead: returns to calling task
-lookup exit ASR overhead: returns to preempting task
-
-header Partition Manager
-lookup rtems_partition_create
-lookup rtems_partition_ident
-lookup rtems_partition_delete
-lookup rtems_partition_get_buffer: available
-lookup rtems_partition_get_buffer: not available
-lookup rtems_partition_return_buffer
-
-header Region Manager
-lookup rtems_region_create
-lookup rtems_region_ident
-lookup rtems_region_delete
-lookup rtems_region_get_segment: available
-lookup rtems_region_get_segment: not available -- NO_WAIT
-lookup rtems_region_get_segment: not available -- caller blocks
-lookup rtems_region_return_segment: no waiting tasks
-lookup rtems_region_return_segment: task readied -- returns to caller
-lookup rtems_region_return_segment: task readied -- preempts caller
-
-header Dual-Ported Memory Manager
-lookup rtems_port_create
-lookup rtems_port_ident
-lookup rtems_port_delete
-lookup rtems_port_internal_to_external
-lookup rtems_port_external_to_internal
-
-header IO Manager
-lookup rtems_io_initialize
-lookup rtems_io_open
-lookup rtems_io_close
-lookup rtems_io_read
-lookup rtems_io_write
-lookup rtems_io_control
-
-header Rate Monotonic Manager
-lookup rtems_rate_monotonic_create
-lookup rtems_rate_monotonic_ident
-lookup rtems_rate_monotonic_cancel
-lookup rtems_rate_monotonic_delete: active
-lookup rtems_rate_monotonic_delete: inactive
-lookup rtems_rate_monotonic_period: obtain status
-lookup rtems_rate_monotonic_period: initiate period -- returns to caller
-lookup rtems_rate_monotonic_period: conclude periods -- caller blocks
-exit 0